Commit Graph

2 Commits

Author SHA1 Message Date
soulgalore 90683320f5 Add better Bearer/Auth info 2022-04-16 18:42:34 +02:00
Erick Wilder 8cf3c24722
Refactor grafana cli options (#2984)
* test(cli): add basic coverage to test cli help output

- Add basic coverated when invoking the command without arguments
- Basic checks for grafana help

* feat(cli): delegate command line options configuration to the Grafana plugin

It uses the name of the plugin as a namespace for all options. Plugin authors _may_ use this
in the future to show helpful messages in the default sitespeed CLI help output.

- Move CLI options to its own module to not pollute the plugin's `index.js` file.
- Change the plugin interface to define a `.cliOptions` property or method containing the `yargs`
  configuration to be used by the CLI code
- Add code coverage for the existing plugin API to ensure no regressions are introduced for Grafana
- Move parts of the `yargs`-related code to `cli/util.js`. Tests to ensure the initial proposition for
  plugin-based CLI options are included.

Co-authored-by: Peter Hedenskog <peter@soulgalore.com>
2020-05-11 20:31:52 +02:00