-
Notifications
You must be signed in to change notification settings - Fork 5.7k
Description
Use case description
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.jsensure that commands coming from external commands are recognizable:
- Support
isExternaloption inpluginManager.addPlugin(), and pass it through tothis.loadCommands() - In
pluginManager.loadCommands()supportisExternaloption, and ensure to mark all producedcommandwithisExternal: trueif that option was passed - In
pluginManager.loadAllPlugins()ensure to passisExternal: truefor all plugins resolved viaresolveServicePlugins()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
--verboseoption. - 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.