You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
CLI: Remove help --verbose option and improve general help output #8497
Currently sls --help --verbose simply outputs CLI commands grouped by plugins.
Where plugins are also internal plugins, which resemble characteristcs of internal implementation which should not be interesting in anyway for regular users.
If read properly in an issue with which it was introduced, it seemed helpful for Framework contributors back then, when Framework was frequently extended with new command.
I doubt there's a value for it now (but ofc that's open for discussion).
I believe that all commands that come with Framework (and dashboard plugin) should be listed as they're listed now in regular help. While all commands as introduced by external plugins could be listed as they are when w use --verbose mode.
And that could all be covered under regular --help, making --verbose option obsolete
Proposed solution
In lib/classes/PluginManager.js ensure that commands coming from external commands are recognizable:
In pluginManager.loadCommands() support isExternal option, and ensure to mark all produced command with isExternal: true if that option was passed
In pluginManager.loadAllPlugins() ensure to pass isExternal: true for all plugins resolved via resolveServicePlugins() method
In context of cli.generateMainHelp() ensure to not list external plugin commands in main listing, but instead (if there are any external plugins) add "Commands by plugin" section below "Plugins" and list all those commands there in same manner as they're displayed now with --verbose option.
In "Plugins" section do not list internal plugins. If there are no external plugin, do not present this section at all.
As we're simply affecting CLI help output, I think it's ok to not consider this change as breaking, it has no influence for deployment or any application setup/processing process.
Activity
vinod-tahelyani commentedon Nov 20, 2020
@medikoo Can I take this?
medikoo commentedon Nov 20, 2020
@vinod-tahelyani definitely! That'll be very welcome