avo-cli 0.0.2 → 4.2.0.beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +605 -0
- data/avo-cli.gemspec +22 -23
- data/exe/avo +6 -0
- data/lib/avo/cli/runner.rb +86 -0
- data/lib/avo/cli/version.rb +7 -0
- data/lib/avo-cli.rb +5 -0
- data/payload/README.md +605 -0
- data/payload/bin/run.cmd +3 -0
- data/payload/bin/run.js +5 -0
- data/payload/dist/base-command.js +60 -0
- data/payload/dist/client.js +77 -0
- data/payload/dist/commands/create.js +26 -0
- data/payload/dist/commands/delete.js +22 -0
- data/payload/dist/commands/get.js +19 -0
- data/payload/dist/commands/list.js +47 -0
- data/payload/dist/commands/login.js +93 -0
- data/payload/dist/commands/logout.js +13 -0
- data/payload/dist/commands/schema.js +58 -0
- data/payload/dist/commands/update.js +27 -0
- data/payload/dist/config.js +57 -0
- data/payload/dist/data.js +33 -0
- data/payload/dist/errors.js +93 -0
- data/payload/dist/hooks/command-not-found.js +22 -0
- data/payload/dist/index.js +1 -0
- data/payload/dist/list.js +7 -0
- data/payload/dist/payload.js +35 -0
- data/payload/dist/record-command.js +51 -0
- data/payload/dist/schema.js +29 -0
- data/payload/dist/store.js +91 -0
- data/payload/dist/suggest.js +29 -0
- data/payload/dist/table.js +40 -0
- data/payload/dist/write-command.js +26 -0
- data/payload/node_modules/@inquirer/ansi/LICENSE +22 -0
- data/payload/node_modules/@inquirer/ansi/README.md +89 -0
- data/payload/node_modules/@inquirer/ansi/dist/commonjs/index.d.ts +14 -0
- data/payload/node_modules/@inquirer/ansi/dist/commonjs/index.js +28 -0
- data/payload/node_modules/@inquirer/ansi/dist/commonjs/package.json +3 -0
- data/payload/node_modules/@inquirer/ansi/dist/esm/index.d.ts +14 -0
- data/payload/node_modules/@inquirer/ansi/dist/esm/index.js +21 -0
- data/payload/node_modules/@inquirer/ansi/dist/esm/package.json +3 -0
- data/payload/node_modules/@inquirer/ansi/package.json +97 -0
- data/payload/node_modules/@inquirer/core/LICENSE +22 -0
- data/payload/node_modules/@inquirer/core/README.md +383 -0
- data/payload/node_modules/@inquirer/core/dist/commonjs/index.d.ts +13 -0
- data/payload/node_modules/@inquirer/core/dist/commonjs/index.js +46 -0
- data/payload/node_modules/@inquirer/core/dist/commonjs/lib/Separator.d.ts +10 -0
- data/payload/node_modules/@inquirer/core/dist/commonjs/lib/Separator.js +28 -0
- data/payload/node_modules/@inquirer/core/dist/commonjs/lib/create-prompt.d.ts +4 -0
- data/payload/node_modules/@inquirer/core/dist/commonjs/lib/create-prompt.js +156 -0
- data/payload/node_modules/@inquirer/core/dist/commonjs/lib/errors.d.ts +20 -0
- data/payload/node_modules/@inquirer/core/dist/commonjs/lib/errors.js +29 -0
- data/payload/node_modules/@inquirer/core/dist/commonjs/lib/hook-engine.d.ts +23 -0
- data/payload/node_modules/@inquirer/core/dist/commonjs/lib/hook-engine.js +118 -0
- data/payload/node_modules/@inquirer/core/dist/commonjs/lib/key.d.ts +12 -0
- data/payload/node_modules/@inquirer/core/dist/commonjs/lib/key.js +29 -0
- data/payload/node_modules/@inquirer/core/dist/commonjs/lib/make-theme.d.ts +3 -0
- data/payload/node_modules/@inquirer/core/dist/commonjs/lib/make-theme.js +33 -0
- data/payload/node_modules/@inquirer/core/dist/commonjs/lib/pagination/use-pagination.d.ts +16 -0
- data/payload/node_modules/@inquirer/core/dist/commonjs/lib/pagination/use-pagination.js +124 -0
- data/payload/node_modules/@inquirer/core/dist/commonjs/lib/promise-polyfill.d.ts +7 -0
- data/payload/node_modules/@inquirer/core/dist/commonjs/lib/promise-polyfill.js +18 -0
- data/payload/node_modules/@inquirer/core/dist/commonjs/lib/screen-manager.d.ts +14 -0
- data/payload/node_modules/@inquirer/core/dist/commonjs/lib/screen-manager.js +82 -0
- data/payload/node_modules/@inquirer/core/dist/commonjs/lib/theme.d.ts +155 -0
- data/payload/node_modules/@inquirer/core/dist/commonjs/lib/theme.js +27 -0
- data/payload/node_modules/@inquirer/core/dist/commonjs/lib/use-effect.d.ts +2 -0
- data/payload/node_modules/@inquirer/core/dist/commonjs/lib/use-effect.js +14 -0
- data/payload/node_modules/@inquirer/core/dist/commonjs/lib/use-keypress.d.ts +3 -0
- data/payload/node_modules/@inquirer/core/dist/commonjs/lib/use-keypress.js +23 -0
- data/payload/node_modules/@inquirer/core/dist/commonjs/lib/use-memo.d.ts +1 -0
- data/payload/node_modules/@inquirer/core/dist/commonjs/lib/use-memo.js +17 -0
- data/payload/node_modules/@inquirer/core/dist/commonjs/lib/use-prefix.d.ts +5 -0
- data/payload/node_modules/@inquirer/core/dist/commonjs/lib/use-prefix.js +38 -0
- data/payload/node_modules/@inquirer/core/dist/commonjs/lib/use-ref.d.ts +6 -0
- data/payload/node_modules/@inquirer/core/dist/commonjs/lib/use-ref.js +7 -0
- data/payload/node_modules/@inquirer/core/dist/commonjs/lib/use-state.d.ts +4 -0
- data/payload/node_modules/@inquirer/core/dist/commonjs/lib/use-state.js +23 -0
- data/payload/node_modules/@inquirer/core/dist/commonjs/lib/utils.d.ts +13 -0
- data/payload/node_modules/@inquirer/core/dist/commonjs/lib/utils.js +32 -0
- data/payload/node_modules/@inquirer/core/dist/commonjs/package.json +3 -0
- data/payload/node_modules/@inquirer/core/dist/esm/index.d.ts +13 -0
- data/payload/node_modules/@inquirer/core/dist/esm/index.js +12 -0
- data/payload/node_modules/@inquirer/core/dist/esm/lib/Separator.d.ts +10 -0
- data/payload/node_modules/@inquirer/core/dist/esm/lib/Separator.js +21 -0
- data/payload/node_modules/@inquirer/core/dist/esm/lib/create-prompt.d.ts +4 -0
- data/payload/node_modules/@inquirer/core/dist/esm/lib/create-prompt.js +117 -0
- data/payload/node_modules/@inquirer/core/dist/esm/lib/errors.d.ts +20 -0
- data/payload/node_modules/@inquirer/core/dist/esm/lib/errors.js +21 -0
- data/payload/node_modules/@inquirer/core/dist/esm/lib/hook-engine.d.ts +23 -0
- data/payload/node_modules/@inquirer/core/dist/esm/lib/hook-engine.js +110 -0
- data/payload/node_modules/@inquirer/core/dist/esm/lib/key.d.ts +12 -0
- data/payload/node_modules/@inquirer/core/dist/esm/lib/key.js +19 -0
- data/payload/node_modules/@inquirer/core/dist/esm/lib/make-theme.d.ts +3 -0
- data/payload/node_modules/@inquirer/core/dist/esm/lib/make-theme.js +30 -0
- data/payload/node_modules/@inquirer/core/dist/esm/lib/pagination/use-pagination.d.ts +16 -0
- data/payload/node_modules/@inquirer/core/dist/esm/lib/pagination/use-pagination.js +121 -0
- data/payload/node_modules/@inquirer/core/dist/esm/lib/promise-polyfill.d.ts +7 -0
- data/payload/node_modules/@inquirer/core/dist/esm/lib/promise-polyfill.js +14 -0
- data/payload/node_modules/@inquirer/core/dist/esm/lib/screen-manager.d.ts +14 -0
- data/payload/node_modules/@inquirer/core/dist/esm/lib/screen-manager.js +79 -0
- data/payload/node_modules/@inquirer/core/dist/esm/lib/theme.d.ts +155 -0
- data/payload/node_modules/@inquirer/core/dist/esm/lib/theme.js +21 -0
- data/payload/node_modules/@inquirer/core/dist/esm/lib/use-effect.d.ts +2 -0
- data/payload/node_modules/@inquirer/core/dist/esm/lib/use-effect.js +11 -0
- data/payload/node_modules/@inquirer/core/dist/esm/lib/use-keypress.d.ts +3 -0
- data/payload/node_modules/@inquirer/core/dist/esm/lib/use-keypress.js +20 -0
- data/payload/node_modules/@inquirer/core/dist/esm/lib/use-memo.d.ts +1 -0
- data/payload/node_modules/@inquirer/core/dist/esm/lib/use-memo.js +14 -0
- data/payload/node_modules/@inquirer/core/dist/esm/lib/use-prefix.d.ts +5 -0
- data/payload/node_modules/@inquirer/core/dist/esm/lib/use-prefix.js +35 -0
- data/payload/node_modules/@inquirer/core/dist/esm/lib/use-ref.d.ts +6 -0
- data/payload/node_modules/@inquirer/core/dist/esm/lib/use-ref.js +4 -0
- data/payload/node_modules/@inquirer/core/dist/esm/lib/use-state.d.ts +4 -0
- data/payload/node_modules/@inquirer/core/dist/esm/lib/use-state.js +20 -0
- data/payload/node_modules/@inquirer/core/dist/esm/lib/utils.d.ts +13 -0
- data/payload/node_modules/@inquirer/core/dist/esm/lib/utils.js +25 -0
- data/payload/node_modules/@inquirer/core/dist/esm/package.json +3 -0
- data/payload/node_modules/@inquirer/core/node_modules/mute-stream/LICENSE +15 -0
- data/payload/node_modules/@inquirer/core/node_modules/mute-stream/README.md +68 -0
- data/payload/node_modules/@inquirer/core/node_modules/mute-stream/lib/index.js +142 -0
- data/payload/node_modules/@inquirer/core/node_modules/mute-stream/package.json +54 -0
- data/payload/node_modules/@inquirer/core/package.json +119 -0
- data/payload/node_modules/@inquirer/figures/LICENSE +22 -0
- data/payload/node_modules/@inquirer/figures/dist/commonjs/index.d.ts +275 -0
- data/payload/node_modules/@inquirer/figures/dist/commonjs/index.js +321 -0
- data/payload/node_modules/@inquirer/figures/dist/commonjs/package.json +3 -0
- data/payload/node_modules/@inquirer/figures/dist/esm/index.d.ts +275 -0
- data/payload/node_modules/@inquirer/figures/dist/esm/index.js +314 -0
- data/payload/node_modules/@inquirer/figures/dist/esm/package.json +3 -0
- data/payload/node_modules/@inquirer/figures/package.json +98 -0
- data/payload/node_modules/@inquirer/input/LICENSE +22 -0
- data/payload/node_modules/@inquirer/input/README.md +101 -0
- data/payload/node_modules/@inquirer/input/dist/commonjs/index.d.ts +20 -0
- data/payload/node_modules/@inquirer/input/dist/commonjs/index.js +99 -0
- data/payload/node_modules/@inquirer/input/dist/commonjs/package.json +3 -0
- data/payload/node_modules/@inquirer/input/dist/esm/index.d.ts +20 -0
- data/payload/node_modules/@inquirer/input/dist/esm/index.js +97 -0
- data/payload/node_modules/@inquirer/input/dist/esm/package.json +3 -0
- data/payload/node_modules/@inquirer/input/package.json +110 -0
- data/payload/node_modules/@inquirer/password/LICENSE +22 -0
- data/payload/node_modules/@inquirer/password/README.md +93 -0
- data/payload/node_modules/@inquirer/password/dist/commonjs/index.d.ts +10 -0
- data/payload/node_modules/@inquirer/password/dist/commonjs/index.js +57 -0
- data/payload/node_modules/@inquirer/password/dist/commonjs/package.json +3 -0
- data/payload/node_modules/@inquirer/password/dist/esm/index.d.ts +10 -0
- data/payload/node_modules/@inquirer/password/dist/esm/index.js +55 -0
- data/payload/node_modules/@inquirer/password/dist/esm/package.json +3 -0
- data/payload/node_modules/@inquirer/password/package.json +111 -0
- data/payload/node_modules/@inquirer/type/LICENSE +22 -0
- data/payload/node_modules/@inquirer/type/dist/commonjs/index.d.ts +2 -0
- data/payload/node_modules/@inquirer/type/dist/commonjs/index.js +18 -0
- data/payload/node_modules/@inquirer/type/dist/commonjs/inquirer.d.ts +38 -0
- data/payload/node_modules/@inquirer/type/dist/commonjs/inquirer.js +2 -0
- data/payload/node_modules/@inquirer/type/dist/commonjs/package.json +3 -0
- data/payload/node_modules/@inquirer/type/dist/commonjs/utils.d.ts +29 -0
- data/payload/node_modules/@inquirer/type/dist/commonjs/utils.js +3 -0
- data/payload/node_modules/@inquirer/type/dist/esm/index.d.ts +2 -0
- data/payload/node_modules/@inquirer/type/dist/esm/index.js +2 -0
- data/payload/node_modules/@inquirer/type/dist/esm/inquirer.d.ts +38 -0
- data/payload/node_modules/@inquirer/type/dist/esm/inquirer.js +1 -0
- data/payload/node_modules/@inquirer/type/dist/esm/package.json +3 -0
- data/payload/node_modules/@inquirer/type/dist/esm/utils.d.ts +29 -0
- data/payload/node_modules/@inquirer/type/dist/esm/utils.js +2 -0
- data/payload/node_modules/@inquirer/type/package.json +106 -0
- data/payload/node_modules/@oclif/core/LICENSE +21 -0
- data/payload/node_modules/@oclif/core/README.md +150 -0
- data/payload/node_modules/@oclif/core/lib/args.d.ts +56 -0
- data/payload/node_modules/@oclif/core/lib/args.js +85 -0
- data/payload/node_modules/@oclif/core/lib/cache.d.ts +27 -0
- data/payload/node_modules/@oclif/core/lib/cache.js +40 -0
- data/payload/node_modules/@oclif/core/lib/command.d.ts +192 -0
- data/payload/node_modules/@oclif/core/lib/command.js +350 -0
- data/payload/node_modules/@oclif/core/lib/config/config.d.ts +135 -0
- data/payload/node_modules/@oclif/core/lib/config/config.js +749 -0
- data/payload/node_modules/@oclif/core/lib/config/index.d.ts +3 -0
- data/payload/node_modules/@oclif/core/lib/config/index.js +9 -0
- data/payload/node_modules/@oclif/core/lib/config/plugin-loader.d.ts +38 -0
- data/payload/node_modules/@oclif/core/lib/config/plugin-loader.js +188 -0
- data/payload/node_modules/@oclif/core/lib/config/plugin.d.ts +51 -0
- data/payload/node_modules/@oclif/core/lib/config/plugin.js +373 -0
- data/payload/node_modules/@oclif/core/lib/config/ts-path.d.ts +9 -0
- data/payload/node_modules/@oclif/core/lib/config/ts-path.js +293 -0
- data/payload/node_modules/@oclif/core/lib/config/util.d.ts +23 -0
- data/payload/node_modules/@oclif/core/lib/config/util.js +54 -0
- data/payload/node_modules/@oclif/core/lib/constraints.d.ts +217 -0
- data/payload/node_modules/@oclif/core/lib/constraints.js +638 -0
- data/payload/node_modules/@oclif/core/lib/errors/error.d.ts +8 -0
- data/payload/node_modules/@oclif/core/lib/errors/error.js +63 -0
- data/payload/node_modules/@oclif/core/lib/errors/errors/cli.d.ts +29 -0
- data/payload/node_modules/@oclif/core/lib/errors/errors/cli.js +77 -0
- data/payload/node_modules/@oclif/core/lib/errors/errors/exit.d.ts +7 -0
- data/payload/node_modules/@oclif/core/lib/errors/errors/exit.js +14 -0
- data/payload/node_modules/@oclif/core/lib/errors/errors/module-load.d.ts +6 -0
- data/payload/node_modules/@oclif/core/lib/errors/errors/module-load.js +12 -0
- data/payload/node_modules/@oclif/core/lib/errors/errors/pretty-print.d.ts +9 -0
- data/payload/node_modules/@oclif/core/lib/errors/errors/pretty-print.js +67 -0
- data/payload/node_modules/@oclif/core/lib/errors/exit.d.ts +1 -0
- data/payload/node_modules/@oclif/core/lib/errors/exit.js +7 -0
- data/payload/node_modules/@oclif/core/lib/errors/handle.d.ts +14 -0
- data/payload/node_modules/@oclif/core/lib/errors/handle.js +60 -0
- data/payload/node_modules/@oclif/core/lib/errors/index.d.ts +8 -0
- data/payload/node_modules/@oclif/core/lib/errors/index.js +17 -0
- data/payload/node_modules/@oclif/core/lib/errors/warn.d.ts +8 -0
- data/payload/node_modules/@oclif/core/lib/errors/warn.js +40 -0
- data/payload/node_modules/@oclif/core/lib/execute.d.ts +44 -0
- data/payload/node_modules/@oclif/core/lib/execute.js +61 -0
- data/payload/node_modules/@oclif/core/lib/flags.d.ts +181 -0
- data/payload/node_modules/@oclif/core/lib/flags.js +129 -0
- data/payload/node_modules/@oclif/core/lib/flush.d.ts +1 -0
- data/payload/node_modules/@oclif/core/lib/flush.js +26 -0
- data/payload/node_modules/@oclif/core/lib/help/command.d.ts +33 -0
- data/payload/node_modules/@oclif/core/lib/help/command.js +352 -0
- data/payload/node_modules/@oclif/core/lib/help/docopts.d.ts +69 -0
- data/payload/node_modules/@oclif/core/lib/help/docopts.js +198 -0
- data/payload/node_modules/@oclif/core/lib/help/formatter.d.ts +96 -0
- data/payload/node_modules/@oclif/core/lib/help/formatter.js +194 -0
- data/payload/node_modules/@oclif/core/lib/help/index.d.ts +46 -0
- data/payload/node_modules/@oclif/core/lib/help/index.js +345 -0
- data/payload/node_modules/@oclif/core/lib/help/root.d.ts +11 -0
- data/payload/node_modules/@oclif/core/lib/help/root.js +47 -0
- data/payload/node_modules/@oclif/core/lib/help/util.d.ts +7 -0
- data/payload/node_modules/@oclif/core/lib/help/util.js +99 -0
- data/payload/node_modules/@oclif/core/lib/index.d.ts +20 -0
- data/payload/node_modules/@oclif/core/lib/index.js +101 -0
- data/payload/node_modules/@oclif/core/lib/interfaces/alphabet.d.ts +2 -0
- data/payload/node_modules/@oclif/core/lib/interfaces/alphabet.js +2 -0
- data/payload/node_modules/@oclif/core/lib/interfaces/args.d.ts +22 -0
- data/payload/node_modules/@oclif/core/lib/interfaces/args.js +2 -0
- data/payload/node_modules/@oclif/core/lib/interfaces/config.d.ts +139 -0
- data/payload/node_modules/@oclif/core/lib/interfaces/config.js +2 -0
- data/payload/node_modules/@oclif/core/lib/interfaces/errors.d.ts +27 -0
- data/payload/node_modules/@oclif/core/lib/interfaces/errors.js +2 -0
- data/payload/node_modules/@oclif/core/lib/interfaces/flags.d.ts +34 -0
- data/payload/node_modules/@oclif/core/lib/interfaces/flags.js +2 -0
- data/payload/node_modules/@oclif/core/lib/interfaces/help.d.ts +58 -0
- data/payload/node_modules/@oclif/core/lib/interfaces/help.js +2 -0
- data/payload/node_modules/@oclif/core/lib/interfaces/hooks.d.ts +185 -0
- data/payload/node_modules/@oclif/core/lib/interfaces/hooks.js +2 -0
- data/payload/node_modules/@oclif/core/lib/interfaces/index.d.ts +16 -0
- data/payload/node_modules/@oclif/core/lib/interfaces/index.js +2 -0
- data/payload/node_modules/@oclif/core/lib/interfaces/logger.d.ts +9 -0
- data/payload/node_modules/@oclif/core/lib/interfaces/logger.js +2 -0
- data/payload/node_modules/@oclif/core/lib/interfaces/manifest.d.ts +7 -0
- data/payload/node_modules/@oclif/core/lib/interfaces/manifest.js +2 -0
- data/payload/node_modules/@oclif/core/lib/interfaces/parser.d.ts +520 -0
- data/payload/node_modules/@oclif/core/lib/interfaces/parser.js +2 -0
- data/payload/node_modules/@oclif/core/lib/interfaces/pjson.d.ts +314 -0
- data/payload/node_modules/@oclif/core/lib/interfaces/pjson.js +2 -0
- data/payload/node_modules/@oclif/core/lib/interfaces/plugin.d.ts +104 -0
- data/payload/node_modules/@oclif/core/lib/interfaces/plugin.js +2 -0
- data/payload/node_modules/@oclif/core/lib/interfaces/s3-manifest.d.ts +14 -0
- data/payload/node_modules/@oclif/core/lib/interfaces/s3-manifest.js +2 -0
- data/payload/node_modules/@oclif/core/lib/interfaces/theme.d.ts +32 -0
- data/payload/node_modules/@oclif/core/lib/interfaces/theme.js +44 -0
- data/payload/node_modules/@oclif/core/lib/interfaces/topic.d.ts +5 -0
- data/payload/node_modules/@oclif/core/lib/interfaces/topic.js +2 -0
- data/payload/node_modules/@oclif/core/lib/interfaces/ts-config.d.ts +23 -0
- data/payload/node_modules/@oclif/core/lib/interfaces/ts-config.js +2 -0
- data/payload/node_modules/@oclif/core/lib/logger.d.ts +14 -0
- data/payload/node_modules/@oclif/core/lib/logger.js +89 -0
- data/payload/node_modules/@oclif/core/lib/main.d.ts +4 -0
- data/payload/node_modules/@oclif/core/lib/main.js +106 -0
- data/payload/node_modules/@oclif/core/lib/module-loader.d.ts +71 -0
- data/payload/node_modules/@oclif/core/lib/module-loader.js +206 -0
- data/payload/node_modules/@oclif/core/lib/parser/errors.d.ts +58 -0
- data/payload/node_modules/@oclif/core/lib/parser/errors.js +117 -0
- data/payload/node_modules/@oclif/core/lib/parser/help.d.ts +3 -0
- data/payload/node_modules/@oclif/core/lib/parser/help.js +29 -0
- data/payload/node_modules/@oclif/core/lib/parser/index.d.ts +5 -0
- data/payload/node_modules/@oclif/core/lib/parser/index.js +25 -0
- data/payload/node_modules/@oclif/core/lib/parser/parse.d.ts +37 -0
- data/payload/node_modules/@oclif/core/lib/parser/parse.js +545 -0
- data/payload/node_modules/@oclif/core/lib/parser/validate.d.ts +5 -0
- data/payload/node_modules/@oclif/core/lib/parser/validate.js +287 -0
- data/payload/node_modules/@oclif/core/lib/performance.d.ts +73 -0
- data/payload/node_modules/@oclif/core/lib/performance.js +227 -0
- data/payload/node_modules/@oclif/core/lib/screen.d.ts +2 -0
- data/payload/node_modules/@oclif/core/lib/screen.js +20 -0
- data/payload/node_modules/@oclif/core/lib/settings.d.ts +36 -0
- data/payload/node_modules/@oclif/core/lib/settings.js +7 -0
- data/payload/node_modules/@oclif/core/lib/symbols.d.ts +1 -0
- data/payload/node_modules/@oclif/core/lib/symbols.js +4 -0
- data/payload/node_modules/@oclif/core/lib/util/aggregate-flags.d.ts +2 -0
- data/payload/node_modules/@oclif/core/lib/util/aggregate-flags.js +12 -0
- data/payload/node_modules/@oclif/core/lib/util/cache-command.d.ts +3 -0
- data/payload/node_modules/@oclif/core/lib/util/cache-command.js +120 -0
- data/payload/node_modules/@oclif/core/lib/util/cache-default-value.d.ts +2 -0
- data/payload/node_modules/@oclif/core/lib/util/cache-default-value.js +28 -0
- data/payload/node_modules/@oclif/core/lib/util/determine-priority.d.ts +18 -0
- data/payload/node_modules/@oclif/core/lib/util/determine-priority.js +51 -0
- data/payload/node_modules/@oclif/core/lib/util/ensure-arg-object.d.ts +12 -0
- data/payload/node_modules/@oclif/core/lib/util/ensure-arg-object.js +13 -0
- data/payload/node_modules/@oclif/core/lib/util/find-root.d.ts +16 -0
- data/payload/node_modules/@oclif/core/lib/util/find-root.js +185 -0
- data/payload/node_modules/@oclif/core/lib/util/fs.d.ts +35 -0
- data/payload/node_modules/@oclif/core/lib/util/fs.js +93 -0
- data/payload/node_modules/@oclif/core/lib/util/ids.d.ts +3 -0
- data/payload/node_modules/@oclif/core/lib/util/ids.js +11 -0
- data/payload/node_modules/@oclif/core/lib/util/os.d.ts +19 -0
- data/payload/node_modules/@oclif/core/lib/util/os.js +58 -0
- data/payload/node_modules/@oclif/core/lib/util/read-pjson.d.ts +7 -0
- data/payload/node_modules/@oclif/core/lib/util/read-pjson.js +55 -0
- data/payload/node_modules/@oclif/core/lib/util/read-tsconfig.d.ts +2 -0
- data/payload/node_modules/@oclif/core/lib/util/read-tsconfig.js +77 -0
- data/payload/node_modules/@oclif/core/lib/util/util.d.ts +23 -0
- data/payload/node_modules/@oclif/core/lib/util/util.js +103 -0
- data/payload/node_modules/@oclif/core/lib/ux/action/base.d.ts +34 -0
- data/payload/node_modules/@oclif/core/lib/ux/action/base.js +183 -0
- data/payload/node_modules/@oclif/core/lib/ux/action/simple.d.ts +11 -0
- data/payload/node_modules/@oclif/core/lib/ux/action/simple.js +47 -0
- data/payload/node_modules/@oclif/core/lib/ux/action/spinner.d.ts +19 -0
- data/payload/node_modules/@oclif/core/lib/ux/action/spinner.js +88 -0
- data/payload/node_modules/@oclif/core/lib/ux/action/types.d.ts +5 -0
- data/payload/node_modules/@oclif/core/lib/ux/action/types.js +2 -0
- data/payload/node_modules/@oclif/core/lib/ux/colorize-json.d.ts +29 -0
- data/payload/node_modules/@oclif/core/lib/ux/colorize-json.js +100 -0
- data/payload/node_modules/@oclif/core/lib/ux/index.d.ts +70 -0
- data/payload/node_modules/@oclif/core/lib/ux/index.js +89 -0
- data/payload/node_modules/@oclif/core/lib/ux/list.d.ts +3 -0
- data/payload/node_modules/@oclif/core/lib/ux/list.js +28 -0
- data/payload/node_modules/@oclif/core/lib/ux/supports-color.d.ts +1 -0
- data/payload/node_modules/@oclif/core/lib/ux/supports-color.js +7 -0
- data/payload/node_modules/@oclif/core/lib/ux/theme.d.ts +9 -0
- data/payload/node_modules/@oclif/core/lib/ux/theme.js +45 -0
- data/payload/node_modules/@oclif/core/lib/ux/write.d.ts +2 -0
- data/payload/node_modules/@oclif/core/lib/ux/write.js +34 -0
- data/payload/node_modules/@oclif/core/node_modules/balanced-match/LICENSE.md +23 -0
- data/payload/node_modules/@oclif/core/node_modules/balanced-match/README.md +57 -0
- data/payload/node_modules/@oclif/core/node_modules/balanced-match/dist/commonjs/index.d.ts +9 -0
- data/payload/node_modules/@oclif/core/node_modules/balanced-match/dist/commonjs/index.d.ts.map +1 -0
- data/payload/node_modules/@oclif/core/node_modules/balanced-match/dist/commonjs/index.js +59 -0
- data/payload/node_modules/@oclif/core/node_modules/balanced-match/dist/commonjs/index.js.map +1 -0
- data/payload/node_modules/@oclif/core/node_modules/balanced-match/dist/commonjs/package.json +3 -0
- data/payload/node_modules/@oclif/core/node_modules/balanced-match/dist/esm/index.d.ts +9 -0
- data/payload/node_modules/@oclif/core/node_modules/balanced-match/dist/esm/index.d.ts.map +1 -0
- data/payload/node_modules/@oclif/core/node_modules/balanced-match/dist/esm/index.js +54 -0
- data/payload/node_modules/@oclif/core/node_modules/balanced-match/dist/esm/index.js.map +1 -0
- data/payload/node_modules/@oclif/core/node_modules/balanced-match/dist/esm/package.json +3 -0
- data/payload/node_modules/@oclif/core/node_modules/balanced-match/package.json +68 -0
- data/payload/node_modules/@oclif/core/node_modules/brace-expansion/LICENSE +23 -0
- data/payload/node_modules/@oclif/core/node_modules/brace-expansion/README.md +105 -0
- data/payload/node_modules/@oclif/core/node_modules/brace-expansion/dist/commonjs/index.d.ts +8 -0
- data/payload/node_modules/@oclif/core/node_modules/brace-expansion/dist/commonjs/index.d.ts.map +1 -0
- data/payload/node_modules/@oclif/core/node_modules/brace-expansion/dist/commonjs/index.js +289 -0
- data/payload/node_modules/@oclif/core/node_modules/brace-expansion/dist/commonjs/index.js.map +1 -0
- data/payload/node_modules/@oclif/core/node_modules/brace-expansion/dist/commonjs/package.json +3 -0
- data/payload/node_modules/@oclif/core/node_modules/brace-expansion/dist/esm/index.d.ts +8 -0
- data/payload/node_modules/@oclif/core/node_modules/brace-expansion/dist/esm/index.d.ts.map +1 -0
- data/payload/node_modules/@oclif/core/node_modules/brace-expansion/dist/esm/index.js +285 -0
- data/payload/node_modules/@oclif/core/node_modules/brace-expansion/dist/esm/index.js.map +1 -0
- data/payload/node_modules/@oclif/core/node_modules/brace-expansion/dist/esm/package.json +3 -0
- data/payload/node_modules/@oclif/core/node_modules/brace-expansion/package.json +64 -0
- data/payload/node_modules/@oclif/core/node_modules/ejs/LICENSE +202 -0
- data/payload/node_modules/@oclif/core/node_modules/ejs/README.md +389 -0
- data/payload/node_modules/@oclif/core/node_modules/ejs/bin/cli.js +218 -0
- data/payload/node_modules/@oclif/core/node_modules/ejs/ejs.js +1820 -0
- data/payload/node_modules/@oclif/core/node_modules/ejs/ejs.min.js +1 -0
- data/payload/node_modules/@oclif/core/node_modules/ejs/jakefile.js +206 -0
- data/payload/node_modules/@oclif/core/node_modules/ejs/lib/cjs/ejs.js +853 -0
- data/payload/node_modules/@oclif/core/node_modules/ejs/lib/cjs/package.json +1 -0
- data/payload/node_modules/@oclif/core/node_modules/ejs/lib/cjs/parseargs.js +122 -0
- data/payload/node_modules/@oclif/core/node_modules/ejs/lib/cjs/utils.js +242 -0
- data/payload/node_modules/@oclif/core/node_modules/ejs/lib/esm/ejs.js +936 -0
- data/payload/node_modules/@oclif/core/node_modules/ejs/lib/esm/package.json +3 -0
- data/payload/node_modules/@oclif/core/node_modules/ejs/lib/esm/parseargs.js +136 -0
- data/payload/node_modules/@oclif/core/node_modules/ejs/lib/esm/utils.js +259 -0
- data/payload/node_modules/@oclif/core/node_modules/ejs/package.json +49 -0
- data/payload/node_modules/@oclif/core/node_modules/ejs/usage.txt +24 -0
- data/payload/node_modules/@oclif/core/node_modules/minimatch/LICENSE.md +55 -0
- data/payload/node_modules/@oclif/core/node_modules/minimatch/README.md +528 -0
- data/payload/node_modules/@oclif/core/node_modules/minimatch/dist/commonjs/assert-valid-pattern.d.ts +2 -0
- data/payload/node_modules/@oclif/core/node_modules/minimatch/dist/commonjs/assert-valid-pattern.d.ts.map +1 -0
- data/payload/node_modules/@oclif/core/node_modules/minimatch/dist/commonjs/assert-valid-pattern.js +14 -0
- data/payload/node_modules/@oclif/core/node_modules/minimatch/dist/commonjs/assert-valid-pattern.js.map +1 -0
- data/payload/node_modules/@oclif/core/node_modules/minimatch/dist/commonjs/ast.d.ts +22 -0
- data/payload/node_modules/@oclif/core/node_modules/minimatch/dist/commonjs/ast.d.ts.map +1 -0
- data/payload/node_modules/@oclif/core/node_modules/minimatch/dist/commonjs/ast.js +845 -0
- data/payload/node_modules/@oclif/core/node_modules/minimatch/dist/commonjs/ast.js.map +1 -0
- data/payload/node_modules/@oclif/core/node_modules/minimatch/dist/commonjs/brace-expressions.d.ts +8 -0
- data/payload/node_modules/@oclif/core/node_modules/minimatch/dist/commonjs/brace-expressions.d.ts.map +1 -0
- data/payload/node_modules/@oclif/core/node_modules/minimatch/dist/commonjs/brace-expressions.js +150 -0
- data/payload/node_modules/@oclif/core/node_modules/minimatch/dist/commonjs/brace-expressions.js.map +1 -0
- data/payload/node_modules/@oclif/core/node_modules/minimatch/dist/commonjs/escape.d.ts +15 -0
- data/payload/node_modules/@oclif/core/node_modules/minimatch/dist/commonjs/escape.d.ts.map +1 -0
- data/payload/node_modules/@oclif/core/node_modules/minimatch/dist/commonjs/escape.js +30 -0
- data/payload/node_modules/@oclif/core/node_modules/minimatch/dist/commonjs/escape.js.map +1 -0
- data/payload/node_modules/@oclif/core/node_modules/minimatch/dist/commonjs/index.d.ts +174 -0
- data/payload/node_modules/@oclif/core/node_modules/minimatch/dist/commonjs/index.d.ts.map +1 -0
- data/payload/node_modules/@oclif/core/node_modules/minimatch/dist/commonjs/index.js +1127 -0
- data/payload/node_modules/@oclif/core/node_modules/minimatch/dist/commonjs/index.js.map +1 -0
- data/payload/node_modules/@oclif/core/node_modules/minimatch/dist/commonjs/package.json +3 -0
- data/payload/node_modules/@oclif/core/node_modules/minimatch/dist/commonjs/unescape.d.ts +22 -0
- data/payload/node_modules/@oclif/core/node_modules/minimatch/dist/commonjs/unescape.d.ts.map +1 -0
- data/payload/node_modules/@oclif/core/node_modules/minimatch/dist/commonjs/unescape.js +38 -0
- data/payload/node_modules/@oclif/core/node_modules/minimatch/dist/commonjs/unescape.js.map +1 -0
- data/payload/node_modules/@oclif/core/node_modules/minimatch/dist/esm/assert-valid-pattern.d.ts +2 -0
- data/payload/node_modules/@oclif/core/node_modules/minimatch/dist/esm/assert-valid-pattern.d.ts.map +1 -0
- data/payload/node_modules/@oclif/core/node_modules/minimatch/dist/esm/assert-valid-pattern.js +10 -0
- data/payload/node_modules/@oclif/core/node_modules/minimatch/dist/esm/assert-valid-pattern.js.map +1 -0
- data/payload/node_modules/@oclif/core/node_modules/minimatch/dist/esm/ast.d.ts +22 -0
- data/payload/node_modules/@oclif/core/node_modules/minimatch/dist/esm/ast.d.ts.map +1 -0
- data/payload/node_modules/@oclif/core/node_modules/minimatch/dist/esm/ast.js +841 -0
- data/payload/node_modules/@oclif/core/node_modules/minimatch/dist/esm/ast.js.map +1 -0
- data/payload/node_modules/@oclif/core/node_modules/minimatch/dist/esm/brace-expressions.d.ts +8 -0
- data/payload/node_modules/@oclif/core/node_modules/minimatch/dist/esm/brace-expressions.d.ts.map +1 -0
- data/payload/node_modules/@oclif/core/node_modules/minimatch/dist/esm/brace-expressions.js +146 -0
- data/payload/node_modules/@oclif/core/node_modules/minimatch/dist/esm/brace-expressions.js.map +1 -0
- data/payload/node_modules/@oclif/core/node_modules/minimatch/dist/esm/escape.d.ts +15 -0
- data/payload/node_modules/@oclif/core/node_modules/minimatch/dist/esm/escape.d.ts.map +1 -0
- data/payload/node_modules/@oclif/core/node_modules/minimatch/dist/esm/escape.js +26 -0
- data/payload/node_modules/@oclif/core/node_modules/minimatch/dist/esm/escape.js.map +1 -0
- data/payload/node_modules/@oclif/core/node_modules/minimatch/dist/esm/index.d.ts +174 -0
- data/payload/node_modules/@oclif/core/node_modules/minimatch/dist/esm/index.d.ts.map +1 -0
- data/payload/node_modules/@oclif/core/node_modules/minimatch/dist/esm/index.js +1114 -0
- data/payload/node_modules/@oclif/core/node_modules/minimatch/dist/esm/index.js.map +1 -0
- data/payload/node_modules/@oclif/core/node_modules/minimatch/dist/esm/package.json +3 -0
- data/payload/node_modules/@oclif/core/node_modules/minimatch/dist/esm/unescape.d.ts +22 -0
- data/payload/node_modules/@oclif/core/node_modules/minimatch/dist/esm/unescape.d.ts.map +1 -0
- data/payload/node_modules/@oclif/core/node_modules/minimatch/dist/esm/unescape.js +34 -0
- data/payload/node_modules/@oclif/core/node_modules/minimatch/dist/esm/unescape.js.map +1 -0
- data/payload/node_modules/@oclif/core/node_modules/minimatch/package.json +73 -0
- data/payload/node_modules/@oclif/core/node_modules/wrap-ansi/index.js +216 -0
- data/payload/node_modules/@oclif/core/node_modules/wrap-ansi/license +9 -0
- data/payload/node_modules/@oclif/core/node_modules/wrap-ansi/package.json +62 -0
- data/payload/node_modules/@oclif/core/node_modules/wrap-ansi/readme.md +91 -0
- data/payload/node_modules/@oclif/core/package.json +135 -0
- data/payload/node_modules/@oclif/plugin-help/LICENSE +21 -0
- data/payload/node_modules/@oclif/plugin-help/README.md +35 -0
- data/payload/node_modules/@oclif/plugin-help/lib/commands/help.d.ts +12 -0
- data/payload/node_modules/@oclif/plugin-help/lib/commands/help.js +20 -0
- data/payload/node_modules/@oclif/plugin-help/lib/index.d.ts +4 -0
- data/payload/node_modules/@oclif/plugin-help/lib/index.js +4 -0
- data/payload/node_modules/@oclif/plugin-help/oclif.manifest.json +43 -0
- data/payload/node_modules/@oclif/plugin-help/package.json +68 -0
- data/payload/node_modules/ansi-escapes/index.d.ts +248 -0
- data/payload/node_modules/ansi-escapes/index.js +157 -0
- data/payload/node_modules/ansi-escapes/license +9 -0
- data/payload/node_modules/ansi-escapes/package.json +57 -0
- data/payload/node_modules/ansi-escapes/readme.md +245 -0
- data/payload/node_modules/ansi-regex/index.d.ts +37 -0
- data/payload/node_modules/ansi-regex/index.js +10 -0
- data/payload/node_modules/ansi-regex/license +9 -0
- data/payload/node_modules/ansi-regex/package.json +55 -0
- data/payload/node_modules/ansi-regex/readme.md +78 -0
- data/payload/node_modules/ansi-styles/index.d.ts +345 -0
- data/payload/node_modules/ansi-styles/index.js +163 -0
- data/payload/node_modules/ansi-styles/license +9 -0
- data/payload/node_modules/ansi-styles/package.json +56 -0
- data/payload/node_modules/ansi-styles/readme.md +152 -0
- data/payload/node_modules/ansis/LICENSE +15 -0
- data/payload/node_modules/ansis/README.md +3 -0
- data/payload/node_modules/ansis/index.d.ts +1 -0
- data/payload/node_modules/ansis/index.js +1 -0
- data/payload/node_modules/ansis/index.mjs +1 -0
- data/payload/node_modules/ansis/package.json +20 -0
- data/payload/node_modules/clean-stack/index.d.ts +56 -0
- data/payload/node_modules/clean-stack/index.js +45 -0
- data/payload/node_modules/clean-stack/license +9 -0
- data/payload/node_modules/clean-stack/package.json +42 -0
- data/payload/node_modules/clean-stack/readme.md +77 -0
- data/payload/node_modules/cli-spinners/index.d.ts +128 -0
- data/payload/node_modules/cli-spinners/index.js +15 -0
- data/payload/node_modules/cli-spinners/license +9 -0
- data/payload/node_modules/cli-spinners/package.json +50 -0
- data/payload/node_modules/cli-spinners/readme.md +54 -0
- data/payload/node_modules/cli-spinners/spinners.json +1622 -0
- data/payload/node_modules/cli-width/LICENSE +13 -0
- data/payload/node_modules/cli-width/README.md +71 -0
- data/payload/node_modules/cli-width/index.d.ts +13 -0
- data/payload/node_modules/cli-width/index.js +49 -0
- data/payload/node_modules/cli-width/package.json +40 -0
- data/payload/node_modules/color-convert/CHANGELOG.md +54 -0
- data/payload/node_modules/color-convert/LICENSE +21 -0
- data/payload/node_modules/color-convert/README.md +68 -0
- data/payload/node_modules/color-convert/conversions.js +839 -0
- data/payload/node_modules/color-convert/index.js +81 -0
- data/payload/node_modules/color-convert/package.json +48 -0
- data/payload/node_modules/color-convert/route.js +97 -0
- data/payload/node_modules/color-name/LICENSE +8 -0
- data/payload/node_modules/color-name/README.md +11 -0
- data/payload/node_modules/color-name/index.js +152 -0
- data/payload/node_modules/color-name/package.json +28 -0
- data/payload/node_modules/debug/LICENSE +20 -0
- data/payload/node_modules/debug/README.md +481 -0
- data/payload/node_modules/debug/package.json +64 -0
- data/payload/node_modules/debug/src/browser.js +272 -0
- data/payload/node_modules/debug/src/common.js +292 -0
- data/payload/node_modules/debug/src/index.js +10 -0
- data/payload/node_modules/debug/src/node.js +263 -0
- data/payload/node_modules/emoji-regex/LICENSE-MIT.txt +20 -0
- data/payload/node_modules/emoji-regex/README.md +73 -0
- data/payload/node_modules/emoji-regex/es2015/index.js +6 -0
- data/payload/node_modules/emoji-regex/es2015/text.js +6 -0
- data/payload/node_modules/emoji-regex/index.d.ts +23 -0
- data/payload/node_modules/emoji-regex/index.js +6 -0
- data/payload/node_modules/emoji-regex/package.json +50 -0
- data/payload/node_modules/emoji-regex/text.js +6 -0
- data/payload/node_modules/escape-string-regexp/index.d.ts +18 -0
- data/payload/node_modules/escape-string-regexp/index.js +13 -0
- data/payload/node_modules/escape-string-regexp/license +9 -0
- data/payload/node_modules/escape-string-regexp/package.json +38 -0
- data/payload/node_modules/escape-string-regexp/readme.md +34 -0
- data/payload/node_modules/fdir/LICENSE +7 -0
- data/payload/node_modules/fdir/README.md +91 -0
- data/payload/node_modules/fdir/dist/index.cjs +588 -0
- data/payload/node_modules/fdir/dist/index.d.cts +155 -0
- data/payload/node_modules/fdir/dist/index.d.mts +155 -0
- data/payload/node_modules/fdir/dist/index.mjs +570 -0
- data/payload/node_modules/fdir/package.json +103 -0
- data/payload/node_modules/get-package-type/CHANGELOG.md +10 -0
- data/payload/node_modules/get-package-type/LICENSE +21 -0
- data/payload/node_modules/get-package-type/README.md +32 -0
- data/payload/node_modules/get-package-type/async.cjs +52 -0
- data/payload/node_modules/get-package-type/cache.cjs +3 -0
- data/payload/node_modules/get-package-type/index.cjs +7 -0
- data/payload/node_modules/get-package-type/is-node-modules.cjs +15 -0
- data/payload/node_modules/get-package-type/package.json +35 -0
- data/payload/node_modules/get-package-type/sync.cjs +42 -0
- data/payload/node_modules/has-flag/index.d.ts +39 -0
- data/payload/node_modules/has-flag/index.js +8 -0
- data/payload/node_modules/has-flag/license +9 -0
- data/payload/node_modules/has-flag/package.json +46 -0
- data/payload/node_modules/has-flag/readme.md +89 -0
- data/payload/node_modules/indent-string/index.d.ts +42 -0
- data/payload/node_modules/indent-string/index.js +35 -0
- data/payload/node_modules/indent-string/license +9 -0
- data/payload/node_modules/indent-string/package.json +37 -0
- data/payload/node_modules/indent-string/readme.md +70 -0
- data/payload/node_modules/is-docker/cli.js +5 -0
- data/payload/node_modules/is-docker/index.d.ts +13 -0
- data/payload/node_modules/is-docker/index.js +29 -0
- data/payload/node_modules/is-docker/license +9 -0
- data/payload/node_modules/is-docker/package.json +44 -0
- data/payload/node_modules/is-docker/readme.md +27 -0
- data/payload/node_modules/is-fullwidth-code-point/index.d.ts +17 -0
- data/payload/node_modules/is-fullwidth-code-point/index.js +50 -0
- data/payload/node_modules/is-fullwidth-code-point/license +9 -0
- data/payload/node_modules/is-fullwidth-code-point/package.json +42 -0
- data/payload/node_modules/is-fullwidth-code-point/readme.md +39 -0
- data/payload/node_modules/is-inside-container/cli.js +5 -0
- data/payload/node_modules/is-inside-container/index.d.ts +13 -0
- data/payload/node_modules/is-inside-container/index.js +23 -0
- data/payload/node_modules/is-inside-container/license +9 -0
- data/payload/node_modules/is-inside-container/package.json +51 -0
- data/payload/node_modules/is-inside-container/readme.md +36 -0
- data/payload/node_modules/is-wsl/index.d.ts +15 -0
- data/payload/node_modules/is-wsl/index.js +36 -0
- data/payload/node_modules/is-wsl/license +9 -0
- data/payload/node_modules/is-wsl/package.json +58 -0
- data/payload/node_modules/is-wsl/readme.md +21 -0
- data/payload/node_modules/lilconfig/LICENSE +21 -0
- data/payload/node_modules/lilconfig/package.json +42 -0
- data/payload/node_modules/lilconfig/readme.md +98 -0
- data/payload/node_modules/lilconfig/src/index.d.ts +54 -0
- data/payload/node_modules/lilconfig/src/index.js +460 -0
- data/payload/node_modules/ms/index.js +162 -0
- data/payload/node_modules/ms/license.md +21 -0
- data/payload/node_modules/ms/package.json +38 -0
- data/payload/node_modules/ms/readme.md +59 -0
- data/payload/node_modules/picomatch/LICENSE +21 -0
- data/payload/node_modules/picomatch/README.md +743 -0
- data/payload/node_modules/picomatch/index.js +17 -0
- data/payload/node_modules/picomatch/lib/constants.js +184 -0
- data/payload/node_modules/picomatch/lib/parse.js +1425 -0
- data/payload/node_modules/picomatch/lib/picomatch.js +361 -0
- data/payload/node_modules/picomatch/lib/scan.js +403 -0
- data/payload/node_modules/picomatch/lib/utils.js +72 -0
- data/payload/node_modules/picomatch/package.json +83 -0
- data/payload/node_modules/picomatch/posix.js +3 -0
- data/payload/node_modules/powershell-utils/index.d.ts +122 -0
- data/payload/node_modules/powershell-utils/index.js +58 -0
- data/payload/node_modules/powershell-utils/license +9 -0
- data/payload/node_modules/powershell-utils/package.json +47 -0
- data/payload/node_modules/powershell-utils/readme.md +153 -0
- data/payload/node_modules/semver/LICENSE +15 -0
- data/payload/node_modules/semver/README.md +680 -0
- data/payload/node_modules/semver/bin/semver.js +195 -0
- data/payload/node_modules/semver/classes/comparator.js +143 -0
- data/payload/node_modules/semver/classes/index.js +7 -0
- data/payload/node_modules/semver/classes/range.js +577 -0
- data/payload/node_modules/semver/classes/semver.js +350 -0
- data/payload/node_modules/semver/functions/clean.js +8 -0
- data/payload/node_modules/semver/functions/cmp.js +54 -0
- data/payload/node_modules/semver/functions/coerce.js +62 -0
- data/payload/node_modules/semver/functions/compare-build.js +9 -0
- data/payload/node_modules/semver/functions/compare-loose.js +5 -0
- data/payload/node_modules/semver/functions/compare.js +7 -0
- data/payload/node_modules/semver/functions/diff.js +60 -0
- data/payload/node_modules/semver/functions/eq.js +5 -0
- data/payload/node_modules/semver/functions/gt.js +5 -0
- data/payload/node_modules/semver/functions/gte.js +5 -0
- data/payload/node_modules/semver/functions/inc.js +21 -0
- data/payload/node_modules/semver/functions/lt.js +5 -0
- data/payload/node_modules/semver/functions/lte.js +5 -0
- data/payload/node_modules/semver/functions/major.js +5 -0
- data/payload/node_modules/semver/functions/minor.js +5 -0
- data/payload/node_modules/semver/functions/neq.js +5 -0
- data/payload/node_modules/semver/functions/parse.js +18 -0
- data/payload/node_modules/semver/functions/patch.js +5 -0
- data/payload/node_modules/semver/functions/prerelease.js +8 -0
- data/payload/node_modules/semver/functions/rcompare.js +5 -0
- data/payload/node_modules/semver/functions/rsort.js +5 -0
- data/payload/node_modules/semver/functions/satisfies.js +12 -0
- data/payload/node_modules/semver/functions/sort.js +5 -0
- data/payload/node_modules/semver/functions/truncate.js +48 -0
- data/payload/node_modules/semver/functions/valid.js +8 -0
- data/payload/node_modules/semver/index.js +93 -0
- data/payload/node_modules/semver/internal/constants.js +37 -0
- data/payload/node_modules/semver/internal/debug.js +11 -0
- data/payload/node_modules/semver/internal/identifiers.js +29 -0
- data/payload/node_modules/semver/internal/lrucache.js +42 -0
- data/payload/node_modules/semver/internal/parse-options.js +17 -0
- data/payload/node_modules/semver/internal/re.js +223 -0
- data/payload/node_modules/semver/package.json +78 -0
- data/payload/node_modules/semver/preload.js +4 -0
- data/payload/node_modules/semver/range.bnf +17 -0
- data/payload/node_modules/semver/ranges/gtr.js +6 -0
- data/payload/node_modules/semver/ranges/intersects.js +9 -0
- data/payload/node_modules/semver/ranges/ltr.js +6 -0
- data/payload/node_modules/semver/ranges/max-satisfying.js +27 -0
- data/payload/node_modules/semver/ranges/min-satisfying.js +26 -0
- data/payload/node_modules/semver/ranges/min-version.js +63 -0
- data/payload/node_modules/semver/ranges/outside.js +82 -0
- data/payload/node_modules/semver/ranges/simplify.js +49 -0
- data/payload/node_modules/semver/ranges/subset.js +249 -0
- data/payload/node_modules/semver/ranges/to-comparators.js +10 -0
- data/payload/node_modules/semver/ranges/valid.js +13 -0
- data/payload/node_modules/signal-exit/LICENSE.txt +16 -0
- data/payload/node_modules/signal-exit/README.md +74 -0
- data/payload/node_modules/signal-exit/dist/cjs/browser.d.ts +12 -0
- data/payload/node_modules/signal-exit/dist/cjs/browser.d.ts.map +1 -0
- data/payload/node_modules/signal-exit/dist/cjs/browser.js +10 -0
- data/payload/node_modules/signal-exit/dist/cjs/browser.js.map +1 -0
- data/payload/node_modules/signal-exit/dist/cjs/index.d.ts +48 -0
- data/payload/node_modules/signal-exit/dist/cjs/index.d.ts.map +1 -0
- data/payload/node_modules/signal-exit/dist/cjs/index.js +279 -0
- data/payload/node_modules/signal-exit/dist/cjs/index.js.map +1 -0
- data/payload/node_modules/signal-exit/dist/cjs/package.json +3 -0
- data/payload/node_modules/signal-exit/dist/cjs/signals.d.ts +29 -0
- data/payload/node_modules/signal-exit/dist/cjs/signals.d.ts.map +1 -0
- data/payload/node_modules/signal-exit/dist/cjs/signals.js +42 -0
- data/payload/node_modules/signal-exit/dist/cjs/signals.js.map +1 -0
- data/payload/node_modules/signal-exit/dist/mjs/browser.d.ts +12 -0
- data/payload/node_modules/signal-exit/dist/mjs/browser.d.ts.map +1 -0
- data/payload/node_modules/signal-exit/dist/mjs/browser.js +4 -0
- data/payload/node_modules/signal-exit/dist/mjs/browser.js.map +1 -0
- data/payload/node_modules/signal-exit/dist/mjs/index.d.ts +48 -0
- data/payload/node_modules/signal-exit/dist/mjs/index.d.ts.map +1 -0
- data/payload/node_modules/signal-exit/dist/mjs/index.js +275 -0
- data/payload/node_modules/signal-exit/dist/mjs/index.js.map +1 -0
- data/payload/node_modules/signal-exit/dist/mjs/package.json +3 -0
- data/payload/node_modules/signal-exit/dist/mjs/signals.d.ts +29 -0
- data/payload/node_modules/signal-exit/dist/mjs/signals.d.ts.map +1 -0
- data/payload/node_modules/signal-exit/dist/mjs/signals.js +39 -0
- data/payload/node_modules/signal-exit/dist/mjs/signals.js.map +1 -0
- data/payload/node_modules/signal-exit/package.json +106 -0
- data/payload/node_modules/string-width/index.d.ts +29 -0
- data/payload/node_modules/string-width/index.js +47 -0
- data/payload/node_modules/string-width/license +9 -0
- data/payload/node_modules/string-width/package.json +56 -0
- data/payload/node_modules/string-width/readme.md +50 -0
- data/payload/node_modules/strip-ansi/index.d.ts +17 -0
- data/payload/node_modules/strip-ansi/index.js +4 -0
- data/payload/node_modules/strip-ansi/license +9 -0
- data/payload/node_modules/strip-ansi/package.json +54 -0
- data/payload/node_modules/strip-ansi/readme.md +46 -0
- data/payload/node_modules/supports-color/browser.js +24 -0
- data/payload/node_modules/supports-color/index.js +152 -0
- data/payload/node_modules/supports-color/license +9 -0
- data/payload/node_modules/supports-color/package.json +58 -0
- data/payload/node_modules/supports-color/readme.md +77 -0
- data/payload/node_modules/tinyglobby/LICENSE +21 -0
- data/payload/node_modules/tinyglobby/README.md +25 -0
- data/payload/node_modules/tinyglobby/dist/index.cjs +335 -0
- data/payload/node_modules/tinyglobby/dist/index.d.cts +148 -0
- data/payload/node_modules/tinyglobby/dist/index.d.mts +148 -0
- data/payload/node_modules/tinyglobby/dist/index.mjs +307 -0
- data/payload/node_modules/tinyglobby/package.json +70 -0
- data/payload/node_modules/type-fest/base.d.ts +39 -0
- data/payload/node_modules/type-fest/index.d.ts +2 -0
- data/payload/node_modules/type-fest/license +9 -0
- data/payload/node_modules/type-fest/package.json +58 -0
- data/payload/node_modules/type-fest/readme.md +760 -0
- data/payload/node_modules/type-fest/source/async-return-type.d.ts +23 -0
- data/payload/node_modules/type-fest/source/asyncify.d.ts +31 -0
- data/payload/node_modules/type-fest/source/basic.d.ts +51 -0
- data/payload/node_modules/type-fest/source/conditional-except.d.ts +43 -0
- data/payload/node_modules/type-fest/source/conditional-keys.d.ts +43 -0
- data/payload/node_modules/type-fest/source/conditional-pick.d.ts +42 -0
- data/payload/node_modules/type-fest/source/entries.d.ts +57 -0
- data/payload/node_modules/type-fest/source/entry.d.ts +60 -0
- data/payload/node_modules/type-fest/source/except.d.ts +22 -0
- data/payload/node_modules/type-fest/source/fixed-length-array.d.ts +38 -0
- data/payload/node_modules/type-fest/source/iterable-element.d.ts +46 -0
- data/payload/node_modules/type-fest/source/literal-union.d.ts +33 -0
- data/payload/node_modules/type-fest/source/merge-exclusive.d.ts +39 -0
- data/payload/node_modules/type-fest/source/merge.d.ts +25 -0
- data/payload/node_modules/type-fest/source/mutable.d.ts +38 -0
- data/payload/node_modules/type-fest/source/opaque.d.ts +65 -0
- data/payload/node_modules/type-fest/source/package-json.d.ts +611 -0
- data/payload/node_modules/type-fest/source/partial-deep.d.ts +72 -0
- data/payload/node_modules/type-fest/source/promisable.d.ts +23 -0
- data/payload/node_modules/type-fest/source/promise-value.d.ts +27 -0
- data/payload/node_modules/type-fest/source/readonly-deep.d.ts +59 -0
- data/payload/node_modules/type-fest/source/require-at-least-one.d.ts +33 -0
- data/payload/node_modules/type-fest/source/require-exactly-one.d.ts +35 -0
- data/payload/node_modules/type-fest/source/set-optional.d.ts +33 -0
- data/payload/node_modules/type-fest/source/set-required.d.ts +33 -0
- data/payload/node_modules/type-fest/source/set-return-type.d.ts +29 -0
- data/payload/node_modules/type-fest/source/simplify.d.ts +4 -0
- data/payload/node_modules/type-fest/source/stringified.d.ts +21 -0
- data/payload/node_modules/type-fest/source/tsconfig-json.d.ts +870 -0
- data/payload/node_modules/type-fest/source/typed-array.d.ts +15 -0
- data/payload/node_modules/type-fest/source/union-to-intersection.d.ts +58 -0
- data/payload/node_modules/type-fest/source/utilities.d.ts +5 -0
- data/payload/node_modules/type-fest/source/value-of.d.ts +40 -0
- data/payload/node_modules/type-fest/ts41/camel-case.d.ts +64 -0
- data/payload/node_modules/type-fest/ts41/delimiter-case.d.ts +85 -0
- data/payload/node_modules/type-fest/ts41/get.d.ts +131 -0
- data/payload/node_modules/type-fest/ts41/index.d.ts +10 -0
- data/payload/node_modules/type-fest/ts41/kebab-case.d.ts +36 -0
- data/payload/node_modules/type-fest/ts41/pascal-case.d.ts +36 -0
- data/payload/node_modules/type-fest/ts41/snake-case.d.ts +35 -0
- data/payload/node_modules/type-fest/ts41/utilities.d.ts +8 -0
- data/payload/node_modules/undici-types/LICENSE +21 -0
- data/payload/node_modules/undici-types/README.md +6 -0
- data/payload/node_modules/undici-types/agent.d.ts +31 -0
- data/payload/node_modules/undici-types/api.d.ts +43 -0
- data/payload/node_modules/undici-types/balanced-pool.d.ts +29 -0
- data/payload/node_modules/undici-types/cache.d.ts +36 -0
- data/payload/node_modules/undici-types/client.d.ts +108 -0
- data/payload/node_modules/undici-types/connector.d.ts +34 -0
- data/payload/node_modules/undici-types/content-type.d.ts +21 -0
- data/payload/node_modules/undici-types/cookies.d.ts +28 -0
- data/payload/node_modules/undici-types/diagnostics-channel.d.ts +66 -0
- data/payload/node_modules/undici-types/dispatcher.d.ts +256 -0
- data/payload/node_modules/undici-types/env-http-proxy-agent.d.ts +21 -0
- data/payload/node_modules/undici-types/errors.d.ts +149 -0
- data/payload/node_modules/undici-types/eventsource.d.ts +61 -0
- data/payload/node_modules/undici-types/fetch.d.ts +209 -0
- data/payload/node_modules/undici-types/file.d.ts +39 -0
- data/payload/node_modules/undici-types/filereader.d.ts +54 -0
- data/payload/node_modules/undici-types/formdata.d.ts +108 -0
- data/payload/node_modules/undici-types/global-dispatcher.d.ts +9 -0
- data/payload/node_modules/undici-types/global-origin.d.ts +7 -0
- data/payload/node_modules/undici-types/handlers.d.ts +15 -0
- data/payload/node_modules/undici-types/header.d.ts +4 -0
- data/payload/node_modules/undici-types/index.d.ts +71 -0
- data/payload/node_modules/undici-types/interceptors.d.ts +17 -0
- data/payload/node_modules/undici-types/mock-agent.d.ts +50 -0
- data/payload/node_modules/undici-types/mock-client.d.ts +25 -0
- data/payload/node_modules/undici-types/mock-errors.d.ts +12 -0
- data/payload/node_modules/undici-types/mock-interceptor.d.ts +93 -0
- data/payload/node_modules/undici-types/mock-pool.d.ts +25 -0
- data/payload/node_modules/undici-types/package.json +55 -0
- data/payload/node_modules/undici-types/patch.d.ts +33 -0
- data/payload/node_modules/undici-types/pool-stats.d.ts +19 -0
- data/payload/node_modules/undici-types/pool.d.ts +39 -0
- data/payload/node_modules/undici-types/proxy-agent.d.ts +28 -0
- data/payload/node_modules/undici-types/readable.d.ts +65 -0
- data/payload/node_modules/undici-types/retry-agent.d.ts +8 -0
- data/payload/node_modules/undici-types/retry-handler.d.ts +116 -0
- data/payload/node_modules/undici-types/util.d.ts +18 -0
- data/payload/node_modules/undici-types/webidl.d.ts +228 -0
- data/payload/node_modules/undici-types/websocket.d.ts +150 -0
- data/payload/node_modules/widest-line/index.d.ts +21 -0
- data/payload/node_modules/widest-line/index.js +16 -0
- data/payload/node_modules/widest-line/license +9 -0
- data/payload/node_modules/widest-line/package.json +54 -0
- data/payload/node_modules/widest-line/readme.md +34 -0
- data/payload/node_modules/wordwrap/LICENSE +18 -0
- data/payload/node_modules/wordwrap/README.markdown +70 -0
- data/payload/node_modules/wordwrap/example/center.js +10 -0
- data/payload/node_modules/wordwrap/example/meat.js +3 -0
- data/payload/node_modules/wordwrap/index.js +76 -0
- data/payload/node_modules/wordwrap/package.json +34 -0
- data/payload/node_modules/wordwrap/test/break.js +32 -0
- data/payload/node_modules/wordwrap/test/idleness.txt +63 -0
- data/payload/node_modules/wordwrap/test/wrap.js +33 -0
- data/payload/node_modules/wrap-ansi/index.js +186 -0
- data/payload/node_modules/wrap-ansi/license +9 -0
- data/payload/node_modules/wrap-ansi/package.json +61 -0
- data/payload/node_modules/wrap-ansi/readme.md +97 -0
- data/payload/node_modules/wsl-utils/index.d.ts +180 -0
- data/payload/node_modules/wsl-utils/index.js +140 -0
- data/payload/node_modules/wsl-utils/license +9 -0
- data/payload/node_modules/wsl-utils/package.json +48 -0
- data/payload/node_modules/wsl-utils/readme.md +223 -0
- data/payload/node_modules/wsl-utils/utilities.js +19 -0
- data/payload/node_modules/yoctocolors-cjs/index.d.ts +94 -0
- data/payload/node_modules/yoctocolors-cjs/index.js +98 -0
- data/payload/node_modules/yoctocolors-cjs/license +9 -0
- data/payload/node_modules/yoctocolors-cjs/package.json +67 -0
- data/payload/node_modules/yoctocolors-cjs/readme.md +130 -0
- data/payload/oclif.manifest.json +793 -0
- data/payload/package.json +80 -0
- metadata +809 -35
- data/Gemfile +0 -19
- data/Gemfile.lock +0 -78
- data/LICENSE.md +0 -7
- data/bin/avo +0 -9
- data/bin/rspec +0 -4
- data/lib/avo_cli/cli.rb +0 -60
- data/lib/avo_cli/rules/base.rb +0 -31
- data/lib/avo_cli/rules/fields_as_class_methods.rb +0 -14
- data/lib/avo_cli/scanner.rb +0 -42
- data/lib/avo_cli/scanners/base.rb +0 -13
- data/lib/avo_cli/scanners/resource_scanner.rb +0 -27
- data/lib/avo_cli/version.rb +0 -3
- data/lib/avo_cli.rb +0 -23
- data/lib/support.rb +0 -52
- data/linter.png +0 -0
- data/readme.md +0 -40
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import { Command } from '../command';
|
|
2
|
+
import * as Interfaces from '../interfaces';
|
|
3
|
+
export type HelpSectionKeyValueTable = {
|
|
4
|
+
description: string;
|
|
5
|
+
name: string;
|
|
6
|
+
}[];
|
|
7
|
+
export type HelpSection = {
|
|
8
|
+
body: [string, string | undefined][] | HelpSectionKeyValueTable | string | undefined;
|
|
9
|
+
header: string;
|
|
10
|
+
} | undefined;
|
|
11
|
+
export type HelpSectionRenderer = (data: {
|
|
12
|
+
args: Command.Arg.Any[];
|
|
13
|
+
cmd: Command.Loadable;
|
|
14
|
+
flags: Command.Flag.Any[];
|
|
15
|
+
}, header: string) => HelpSection | HelpSection[] | string | undefined;
|
|
16
|
+
export declare class HelpFormatter {
|
|
17
|
+
protected config: Interfaces.Config;
|
|
18
|
+
indentSpacing: number;
|
|
19
|
+
protected opts: Interfaces.HelpOptions;
|
|
20
|
+
/**
|
|
21
|
+
* Takes a string and replaces `<%= prop =>` with the value of prop, where prop is anything on
|
|
22
|
+
* `config=Interfaces.Config` or `opts=Interface.HelpOptions`.
|
|
23
|
+
*
|
|
24
|
+
* ```javascript
|
|
25
|
+
* `<%= config.bin =>` // will resolve to the bin defined in `pjson.oclif`.
|
|
26
|
+
* ```
|
|
27
|
+
*/
|
|
28
|
+
render: (input: string) => string;
|
|
29
|
+
constructor(config: Interfaces.Config, opts?: Partial<Interfaces.HelpOptions>);
|
|
30
|
+
/**
|
|
31
|
+
* Indent by `this.indentSpacing`. The text should be wrap based on terminal width before indented.
|
|
32
|
+
*
|
|
33
|
+
* In order to call indent multiple times on the same set or text, the caller must wrap based on
|
|
34
|
+
* the number of times the text has been indented. For example.
|
|
35
|
+
*
|
|
36
|
+
* ```javascript
|
|
37
|
+
* const body = `main line\n${indent(wrap('indented example line', 4))}`
|
|
38
|
+
* const header = 'SECTION'
|
|
39
|
+
* console.log(`${header}\n${indent(wrap(body))}`
|
|
40
|
+
* ```
|
|
41
|
+
* will output
|
|
42
|
+
* ```
|
|
43
|
+
* SECTION
|
|
44
|
+
* main line
|
|
45
|
+
* indented example line
|
|
46
|
+
* ```
|
|
47
|
+
*
|
|
48
|
+
* If the terminal width was 24 and the `4` was not provided in the first wrap, it would like like the following.
|
|
49
|
+
* ```
|
|
50
|
+
* SECTION
|
|
51
|
+
* main line
|
|
52
|
+
* indented example
|
|
53
|
+
* line
|
|
54
|
+
* ```
|
|
55
|
+
* @param body the text to indent
|
|
56
|
+
* @param spacing the final number of spaces this text will be indented
|
|
57
|
+
* @returns the formatted indented text
|
|
58
|
+
*/
|
|
59
|
+
indent(body: string, spacing?: number): string;
|
|
60
|
+
renderList(input: (string | undefined)[][], opts: {
|
|
61
|
+
indentation: number;
|
|
62
|
+
multiline?: boolean | undefined;
|
|
63
|
+
spacer?: string | undefined;
|
|
64
|
+
stripAnsi?: boolean | undefined;
|
|
65
|
+
}): string;
|
|
66
|
+
section(header: string, body: [string, string | undefined][] | HelpSection | HelpSectionKeyValueTable | string): string;
|
|
67
|
+
/**
|
|
68
|
+
* Wrap text according to `opts.maxWidth` which is typically set to the terminal width. All text
|
|
69
|
+
* will be rendered before bring wrapped, otherwise it could mess up the lengths.
|
|
70
|
+
*
|
|
71
|
+
* A terminal will automatically wrap text, so this method is primarily used for indented
|
|
72
|
+
* text. For indented text, specify the indentation so it is taken into account during wrapping.
|
|
73
|
+
*
|
|
74
|
+
* Here is an example of wrapping with indentation.
|
|
75
|
+
* ```
|
|
76
|
+
* <------ terminal window width ------>
|
|
77
|
+
* <---------- no indentation --------->
|
|
78
|
+
* This is my text that will be wrapped
|
|
79
|
+
* once it passes maxWidth.
|
|
80
|
+
*
|
|
81
|
+
* <- indent -><------ text space ----->
|
|
82
|
+
* This is my text that will
|
|
83
|
+
* be wrapped once it passes
|
|
84
|
+
* maxWidth.
|
|
85
|
+
*
|
|
86
|
+
* <-- indent not taken into account ->
|
|
87
|
+
* This is my text that will
|
|
88
|
+
* be wrapped
|
|
89
|
+
* once it passes maxWidth.
|
|
90
|
+
* ```
|
|
91
|
+
* @param body the text to wrap
|
|
92
|
+
* @param spacing the indentation size to subtract from the terminal width
|
|
93
|
+
* @returns the formatted wrapped text
|
|
94
|
+
*/
|
|
95
|
+
wrap(body: string, spacing?: number): string;
|
|
96
|
+
}
|
|
@@ -0,0 +1,194 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.HelpFormatter = void 0;
|
|
7
|
+
const ansis_1 = __importDefault(require("ansis"));
|
|
8
|
+
const indent_string_1 = __importDefault(require("indent-string"));
|
|
9
|
+
const string_width_1 = __importDefault(require("string-width"));
|
|
10
|
+
const widest_line_1 = __importDefault(require("widest-line"));
|
|
11
|
+
const wrap_ansi_1 = __importDefault(require("wrap-ansi"));
|
|
12
|
+
const screen_1 = require("../screen");
|
|
13
|
+
const theme_1 = require("../ux/theme");
|
|
14
|
+
const util_1 = require("./util");
|
|
15
|
+
class HelpFormatter {
|
|
16
|
+
config;
|
|
17
|
+
indentSpacing = 2;
|
|
18
|
+
opts;
|
|
19
|
+
/**
|
|
20
|
+
* Takes a string and replaces `<%= prop =>` with the value of prop, where prop is anything on
|
|
21
|
+
* `config=Interfaces.Config` or `opts=Interface.HelpOptions`.
|
|
22
|
+
*
|
|
23
|
+
* ```javascript
|
|
24
|
+
* `<%= config.bin =>` // will resolve to the bin defined in `pjson.oclif`.
|
|
25
|
+
* ```
|
|
26
|
+
*/
|
|
27
|
+
render;
|
|
28
|
+
constructor(config, opts = {}) {
|
|
29
|
+
this.config = config;
|
|
30
|
+
this.opts = { maxWidth: screen_1.stdtermwidth, ...opts };
|
|
31
|
+
this.render = (0, util_1.template)(this);
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Indent by `this.indentSpacing`. The text should be wrap based on terminal width before indented.
|
|
35
|
+
*
|
|
36
|
+
* In order to call indent multiple times on the same set or text, the caller must wrap based on
|
|
37
|
+
* the number of times the text has been indented. For example.
|
|
38
|
+
*
|
|
39
|
+
* ```javascript
|
|
40
|
+
* const body = `main line\n${indent(wrap('indented example line', 4))}`
|
|
41
|
+
* const header = 'SECTION'
|
|
42
|
+
* console.log(`${header}\n${indent(wrap(body))}`
|
|
43
|
+
* ```
|
|
44
|
+
* will output
|
|
45
|
+
* ```
|
|
46
|
+
* SECTION
|
|
47
|
+
* main line
|
|
48
|
+
* indented example line
|
|
49
|
+
* ```
|
|
50
|
+
*
|
|
51
|
+
* If the terminal width was 24 and the `4` was not provided in the first wrap, it would like like the following.
|
|
52
|
+
* ```
|
|
53
|
+
* SECTION
|
|
54
|
+
* main line
|
|
55
|
+
* indented example
|
|
56
|
+
* line
|
|
57
|
+
* ```
|
|
58
|
+
* @param body the text to indent
|
|
59
|
+
* @param spacing the final number of spaces this text will be indented
|
|
60
|
+
* @returns the formatted indented text
|
|
61
|
+
*/
|
|
62
|
+
indent(body, spacing = this.indentSpacing) {
|
|
63
|
+
return (0, indent_string_1.default)(body, spacing);
|
|
64
|
+
}
|
|
65
|
+
renderList(input, opts) {
|
|
66
|
+
if (input.length === 0) {
|
|
67
|
+
return '';
|
|
68
|
+
}
|
|
69
|
+
const renderMultiline = () => {
|
|
70
|
+
let output = '';
|
|
71
|
+
for (let [left, right] of input) {
|
|
72
|
+
if (!left && !right)
|
|
73
|
+
continue;
|
|
74
|
+
if (left) {
|
|
75
|
+
if (opts.stripAnsi)
|
|
76
|
+
left = ansis_1.default.strip(left);
|
|
77
|
+
output += this.wrap(left.trim(), opts.indentation);
|
|
78
|
+
}
|
|
79
|
+
if (right) {
|
|
80
|
+
if (opts.stripAnsi)
|
|
81
|
+
right = ansis_1.default.strip(right);
|
|
82
|
+
output += '\n';
|
|
83
|
+
output += this.indent(this.wrap(right.trim(), opts.indentation + 2), 4);
|
|
84
|
+
}
|
|
85
|
+
output += '\n\n';
|
|
86
|
+
}
|
|
87
|
+
return output.trim();
|
|
88
|
+
};
|
|
89
|
+
if (opts.multiline)
|
|
90
|
+
return renderMultiline();
|
|
91
|
+
const maxLength = (0, widest_line_1.default)(input.map((i) => i[0]).join('\n'));
|
|
92
|
+
let output = '';
|
|
93
|
+
let spacer = opts.spacer || '\n';
|
|
94
|
+
let cur = '';
|
|
95
|
+
for (const [left, r] of input) {
|
|
96
|
+
let right = r;
|
|
97
|
+
if (cur) {
|
|
98
|
+
output += spacer;
|
|
99
|
+
output += cur;
|
|
100
|
+
}
|
|
101
|
+
cur = left || '';
|
|
102
|
+
if (opts.stripAnsi)
|
|
103
|
+
cur = ansis_1.default.strip(cur);
|
|
104
|
+
if (!right) {
|
|
105
|
+
cur = cur.trim();
|
|
106
|
+
continue;
|
|
107
|
+
}
|
|
108
|
+
if (opts.stripAnsi)
|
|
109
|
+
right = ansis_1.default.strip(right);
|
|
110
|
+
right = this.wrap(right.trim(), opts.indentation + maxLength + 2);
|
|
111
|
+
const [first, ...lines] = right.split('\n').map((s) => s.trim());
|
|
112
|
+
cur += ' '.repeat(maxLength - (0, string_width_1.default)(cur) + 2);
|
|
113
|
+
cur += first;
|
|
114
|
+
if (lines.length === 0) {
|
|
115
|
+
continue;
|
|
116
|
+
}
|
|
117
|
+
// if we start putting too many lines down, render in multiline format
|
|
118
|
+
if (lines.length > 4)
|
|
119
|
+
return renderMultiline();
|
|
120
|
+
// if spacer is not defined, separate all rows with a newline
|
|
121
|
+
if (!opts.spacer)
|
|
122
|
+
spacer = '\n';
|
|
123
|
+
cur += '\n';
|
|
124
|
+
cur += this.indent(lines.join('\n'), maxLength + 2);
|
|
125
|
+
}
|
|
126
|
+
if (cur) {
|
|
127
|
+
output += spacer;
|
|
128
|
+
output += cur;
|
|
129
|
+
}
|
|
130
|
+
return output.trim();
|
|
131
|
+
}
|
|
132
|
+
section(header, body) {
|
|
133
|
+
// Always render template strings with the provided render function before wrapping and indenting
|
|
134
|
+
let newBody;
|
|
135
|
+
if (typeof body === 'string') {
|
|
136
|
+
newBody = this.render(body);
|
|
137
|
+
}
|
|
138
|
+
else if (Array.isArray(body)) {
|
|
139
|
+
newBody = body.map((entry) => {
|
|
140
|
+
if ('name' in entry) {
|
|
141
|
+
const tableEntry = entry;
|
|
142
|
+
return [this.render(tableEntry.name), this.render(tableEntry.description)];
|
|
143
|
+
}
|
|
144
|
+
const [left, right] = entry;
|
|
145
|
+
return [this.render(left), right && this.render(right)];
|
|
146
|
+
});
|
|
147
|
+
}
|
|
148
|
+
else if ('header' in body) {
|
|
149
|
+
return this.section(body.header, body.body);
|
|
150
|
+
}
|
|
151
|
+
else {
|
|
152
|
+
newBody = body
|
|
153
|
+
.map((entry) => [entry.name, entry.description])
|
|
154
|
+
.map(([left, right]) => [this.render(left), right && this.render(right)]);
|
|
155
|
+
}
|
|
156
|
+
const output = [
|
|
157
|
+
(0, theme_1.colorize)(this.config?.theme?.sectionHeader, (0, theme_1.colorize)('bold', header)),
|
|
158
|
+
(0, theme_1.colorize)(this.config?.theme?.sectionDescription, this.indent(Array.isArray(newBody) ? this.renderList(newBody, { indentation: 2, stripAnsi: this.opts.stripAnsi }) : newBody)),
|
|
159
|
+
].join('\n');
|
|
160
|
+
return this.opts.stripAnsi ? ansis_1.default.strip(output) : output;
|
|
161
|
+
}
|
|
162
|
+
/**
|
|
163
|
+
* Wrap text according to `opts.maxWidth` which is typically set to the terminal width. All text
|
|
164
|
+
* will be rendered before bring wrapped, otherwise it could mess up the lengths.
|
|
165
|
+
*
|
|
166
|
+
* A terminal will automatically wrap text, so this method is primarily used for indented
|
|
167
|
+
* text. For indented text, specify the indentation so it is taken into account during wrapping.
|
|
168
|
+
*
|
|
169
|
+
* Here is an example of wrapping with indentation.
|
|
170
|
+
* ```
|
|
171
|
+
* <------ terminal window width ------>
|
|
172
|
+
* <---------- no indentation --------->
|
|
173
|
+
* This is my text that will be wrapped
|
|
174
|
+
* once it passes maxWidth.
|
|
175
|
+
*
|
|
176
|
+
* <- indent -><------ text space ----->
|
|
177
|
+
* This is my text that will
|
|
178
|
+
* be wrapped once it passes
|
|
179
|
+
* maxWidth.
|
|
180
|
+
*
|
|
181
|
+
* <-- indent not taken into account ->
|
|
182
|
+
* This is my text that will
|
|
183
|
+
* be wrapped
|
|
184
|
+
* once it passes maxWidth.
|
|
185
|
+
* ```
|
|
186
|
+
* @param body the text to wrap
|
|
187
|
+
* @param spacing the indentation size to subtract from the terminal width
|
|
188
|
+
* @returns the formatted wrapped text
|
|
189
|
+
*/
|
|
190
|
+
wrap(body, spacing = this.indentSpacing) {
|
|
191
|
+
return (0, wrap_ansi_1.default)(this.render(body), this.opts.maxWidth - spacing, { hard: true });
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
exports.HelpFormatter = HelpFormatter;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { Command } from '../command';
|
|
2
|
+
import * as Interfaces from '../interfaces';
|
|
3
|
+
import { CommandHelp } from './command';
|
|
4
|
+
import { HelpFormatter } from './formatter';
|
|
5
|
+
export { CommandHelp } from './command';
|
|
6
|
+
export { HelpFormatter, type HelpSection, type HelpSectionKeyValueTable, type HelpSectionRenderer } from './formatter';
|
|
7
|
+
export { getHelpFlagAdditions, normalizeArgv, standardizeIDFromArgv } from './util';
|
|
8
|
+
export declare abstract class HelpBase extends HelpFormatter {
|
|
9
|
+
constructor(config: Interfaces.Config, opts?: Partial<Interfaces.HelpOptions>);
|
|
10
|
+
/**
|
|
11
|
+
* Show help for an individual command
|
|
12
|
+
* @param command
|
|
13
|
+
* @param topics
|
|
14
|
+
*/
|
|
15
|
+
abstract showCommandHelp(command: Command.Loadable, topics: Interfaces.Topic[]): Promise<void>;
|
|
16
|
+
/**
|
|
17
|
+
* Show help, used in multi-command CLIs
|
|
18
|
+
* @param args passed into your command, useful for determining which type of help to display
|
|
19
|
+
*/
|
|
20
|
+
abstract showHelp(argv: string[]): Promise<void>;
|
|
21
|
+
}
|
|
22
|
+
export declare class Help extends HelpBase {
|
|
23
|
+
protected CommandHelpClass: typeof CommandHelp;
|
|
24
|
+
constructor(config: Interfaces.Config, opts?: Partial<Interfaces.HelpOptions>);
|
|
25
|
+
private get _topics();
|
|
26
|
+
protected get sortedCommands(): Command.Loadable[];
|
|
27
|
+
protected get sortedTopics(): Interfaces.Topic[];
|
|
28
|
+
protected command(command: Command.Loadable): string;
|
|
29
|
+
protected description(c: Command.Loadable): string;
|
|
30
|
+
protected formatCommand(command: Command.Loadable): string;
|
|
31
|
+
protected formatCommands(commands: Array<Command.Loadable>): string;
|
|
32
|
+
formatRoot(): string;
|
|
33
|
+
protected formatTopic(topic: Interfaces.Topic): string;
|
|
34
|
+
protected formatTopics(topics: Interfaces.Topic[]): string;
|
|
35
|
+
protected getCommandHelpClass(command: Command.Loadable): CommandHelp;
|
|
36
|
+
protected log(...args: string[]): void;
|
|
37
|
+
showCommandHelp(command: Command.Loadable): Promise<void>;
|
|
38
|
+
showHelp(argv: string[]): Promise<void>;
|
|
39
|
+
protected showRootHelp(): Promise<void>;
|
|
40
|
+
protected showTopicHelp(topic: Interfaces.Topic): Promise<void>;
|
|
41
|
+
protected summary(c: Command.Loadable): string | undefined;
|
|
42
|
+
}
|
|
43
|
+
interface HelpBaseDerived {
|
|
44
|
+
new (config: Interfaces.Config, opts?: Partial<Interfaces.HelpOptions>): HelpBase;
|
|
45
|
+
}
|
|
46
|
+
export declare function loadHelpClass(config: Interfaces.Config): Promise<HelpBaseDerived>;
|
|
@@ -0,0 +1,345 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.Help = exports.HelpBase = exports.standardizeIDFromArgv = exports.normalizeArgv = exports.getHelpFlagAdditions = exports.HelpFormatter = exports.CommandHelp = void 0;
|
|
7
|
+
exports.loadHelpClass = loadHelpClass;
|
|
8
|
+
const ansis_1 = __importDefault(require("ansis"));
|
|
9
|
+
const ts_path_1 = require("../config/ts-path");
|
|
10
|
+
const error_1 = require("../errors/error");
|
|
11
|
+
const module_loader_1 = require("../module-loader");
|
|
12
|
+
const symbols_1 = require("../symbols");
|
|
13
|
+
const cache_default_value_1 = require("../util/cache-default-value");
|
|
14
|
+
const ids_1 = require("../util/ids");
|
|
15
|
+
const util_1 = require("../util/util");
|
|
16
|
+
const ux_1 = require("../ux");
|
|
17
|
+
const theme_1 = require("../ux/theme");
|
|
18
|
+
const command_1 = require("./command");
|
|
19
|
+
const formatter_1 = require("./formatter");
|
|
20
|
+
const root_1 = __importDefault(require("./root"));
|
|
21
|
+
const util_2 = require("./util");
|
|
22
|
+
var command_2 = require("./command");
|
|
23
|
+
Object.defineProperty(exports, "CommandHelp", { enumerable: true, get: function () { return command_2.CommandHelp; } });
|
|
24
|
+
var formatter_2 = require("./formatter");
|
|
25
|
+
Object.defineProperty(exports, "HelpFormatter", { enumerable: true, get: function () { return formatter_2.HelpFormatter; } });
|
|
26
|
+
var util_3 = require("./util");
|
|
27
|
+
Object.defineProperty(exports, "getHelpFlagAdditions", { enumerable: true, get: function () { return util_3.getHelpFlagAdditions; } });
|
|
28
|
+
Object.defineProperty(exports, "normalizeArgv", { enumerable: true, get: function () { return util_3.normalizeArgv; } });
|
|
29
|
+
Object.defineProperty(exports, "standardizeIDFromArgv", { enumerable: true, get: function () { return util_3.standardizeIDFromArgv; } });
|
|
30
|
+
function getHelpSubject(args, config) {
|
|
31
|
+
// for each help flag that starts with '--' create a new flag with same name sans '--'
|
|
32
|
+
const mergedHelpFlags = (0, util_2.getHelpFlagAdditions)(config);
|
|
33
|
+
for (const arg of args) {
|
|
34
|
+
if (arg === '--')
|
|
35
|
+
return;
|
|
36
|
+
if (mergedHelpFlags.includes(arg) || arg === 'help')
|
|
37
|
+
continue;
|
|
38
|
+
if (arg.startsWith('-'))
|
|
39
|
+
return;
|
|
40
|
+
return arg;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
class HelpBase extends formatter_1.HelpFormatter {
|
|
44
|
+
constructor(config, opts = {}) {
|
|
45
|
+
super(config, opts);
|
|
46
|
+
if (!config.topicSeparator)
|
|
47
|
+
config.topicSeparator = ':'; // back-support @oclif/config
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
exports.HelpBase = HelpBase;
|
|
51
|
+
class Help extends HelpBase {
|
|
52
|
+
CommandHelpClass = command_1.CommandHelp;
|
|
53
|
+
constructor(config, opts = {}) {
|
|
54
|
+
super(config, opts);
|
|
55
|
+
}
|
|
56
|
+
/*
|
|
57
|
+
* _topics is to work around Interfaces.topics mistakenly including commands that do
|
|
58
|
+
* not have children, as well as topics. A topic has children, either commands or other topics. When
|
|
59
|
+
* this is fixed upstream config.topics should return *only* topics with children,
|
|
60
|
+
* and this can be removed.
|
|
61
|
+
*/
|
|
62
|
+
get _topics() {
|
|
63
|
+
return this.config.topics.filter((topic) => {
|
|
64
|
+
// it is assumed a topic has a child if it has children
|
|
65
|
+
const hasChild = this.config.topics.some((subTopic) => subTopic.name.includes(`${topic.name}:`));
|
|
66
|
+
return hasChild;
|
|
67
|
+
});
|
|
68
|
+
}
|
|
69
|
+
get sortedCommands() {
|
|
70
|
+
let { commands } = this.config;
|
|
71
|
+
commands = commands.filter((c) => this.opts.all || !c.hidden);
|
|
72
|
+
commands = (0, util_1.sortBy)(commands, (c) => c.id);
|
|
73
|
+
commands = (0, util_1.uniqBy)(commands, (c) => c.id);
|
|
74
|
+
return commands;
|
|
75
|
+
}
|
|
76
|
+
get sortedTopics() {
|
|
77
|
+
let topics = this._topics;
|
|
78
|
+
topics = topics.filter((t) => this.opts.all || !t.hidden);
|
|
79
|
+
topics = (0, util_1.sortBy)(topics, (t) => t.name);
|
|
80
|
+
topics = (0, util_1.uniqBy)(topics, (t) => t.name);
|
|
81
|
+
return topics;
|
|
82
|
+
}
|
|
83
|
+
command(command) {
|
|
84
|
+
return this.formatCommand(command);
|
|
85
|
+
}
|
|
86
|
+
description(c) {
|
|
87
|
+
const description = this.render(c.description || '');
|
|
88
|
+
if (c.summary) {
|
|
89
|
+
return description;
|
|
90
|
+
}
|
|
91
|
+
return description.split('\n').slice(1).join('\n');
|
|
92
|
+
}
|
|
93
|
+
formatCommand(command) {
|
|
94
|
+
if (this.config.topicSeparator !== ':') {
|
|
95
|
+
command.id = command.id.replaceAll(':', this.config.topicSeparator);
|
|
96
|
+
command.aliases = command.aliases && command.aliases.map((a) => a.replaceAll(':', this.config.topicSeparator));
|
|
97
|
+
}
|
|
98
|
+
const help = this.getCommandHelpClass(command);
|
|
99
|
+
return help.generate();
|
|
100
|
+
}
|
|
101
|
+
formatCommands(commands) {
|
|
102
|
+
if (commands.length === 0)
|
|
103
|
+
return '';
|
|
104
|
+
const body = this.renderList(commands
|
|
105
|
+
.filter((c) => (this.opts.hideAliasesFromRoot ? !c.aliases?.includes(c.id) : true))
|
|
106
|
+
.map((c) => {
|
|
107
|
+
if (this.config.topicSeparator !== ':')
|
|
108
|
+
c.id = c.id.replaceAll(':', this.config.topicSeparator);
|
|
109
|
+
const summary = this.summary(c);
|
|
110
|
+
return [
|
|
111
|
+
(0, theme_1.colorize)(this.config?.theme?.command, c.id),
|
|
112
|
+
summary && (0, theme_1.colorize)(this.config?.theme?.sectionDescription, ansis_1.default.strip(summary)),
|
|
113
|
+
];
|
|
114
|
+
}), {
|
|
115
|
+
indentation: 2,
|
|
116
|
+
spacer: '\n',
|
|
117
|
+
stripAnsi: this.opts.stripAnsi,
|
|
118
|
+
});
|
|
119
|
+
return this.section('COMMANDS', body);
|
|
120
|
+
}
|
|
121
|
+
formatRoot() {
|
|
122
|
+
const help = new root_1.default(this.config, this.opts);
|
|
123
|
+
return help.root();
|
|
124
|
+
}
|
|
125
|
+
formatTopic(topic) {
|
|
126
|
+
let description = this.render(topic.description || '');
|
|
127
|
+
const summary = description.split('\n')[0];
|
|
128
|
+
description = description.split('\n').slice(1).join('\n');
|
|
129
|
+
let topicID = `${topic.name}:COMMAND`;
|
|
130
|
+
if (this.config.topicSeparator !== ':')
|
|
131
|
+
topicID = topicID.replaceAll(':', this.config.topicSeparator);
|
|
132
|
+
let output = (0, util_1.compact)([
|
|
133
|
+
(0, theme_1.colorize)(this.config?.theme?.commandSummary, summary),
|
|
134
|
+
this.section(this.opts.usageHeader || 'USAGE', `${(0, theme_1.colorize)(this.config?.theme?.dollarSign, '$')} ${(0, theme_1.colorize)(this.config?.theme?.bin, this.config.bin)} ${topicID}`),
|
|
135
|
+
description &&
|
|
136
|
+
this.section('DESCRIPTION', this.wrap((0, theme_1.colorize)(this.config?.theme?.sectionDescription, description))),
|
|
137
|
+
]).join('\n\n');
|
|
138
|
+
if (this.opts.stripAnsi)
|
|
139
|
+
output = ansis_1.default.strip(output);
|
|
140
|
+
return output + '\n';
|
|
141
|
+
}
|
|
142
|
+
formatTopics(topics) {
|
|
143
|
+
if (topics.length === 0)
|
|
144
|
+
return '';
|
|
145
|
+
const body = this.renderList(topics.map((c) => {
|
|
146
|
+
if (this.config.topicSeparator !== ':')
|
|
147
|
+
c.name = c.name.replaceAll(':', this.config.topicSeparator);
|
|
148
|
+
return [
|
|
149
|
+
(0, theme_1.colorize)(this.config?.theme?.topic, c.name),
|
|
150
|
+
c.description && this.render((0, theme_1.colorize)(this.config?.theme?.sectionDescription, c.description.split('\n')[0])),
|
|
151
|
+
];
|
|
152
|
+
}), {
|
|
153
|
+
indentation: 2,
|
|
154
|
+
spacer: '\n',
|
|
155
|
+
stripAnsi: this.opts.stripAnsi,
|
|
156
|
+
});
|
|
157
|
+
return this.section('TOPICS', body);
|
|
158
|
+
}
|
|
159
|
+
getCommandHelpClass(command) {
|
|
160
|
+
return new this.CommandHelpClass(command, this.config, this.opts);
|
|
161
|
+
}
|
|
162
|
+
log(...args) {
|
|
163
|
+
return this.opts.sendToStderr ? ux_1.ux.stderr(args) : ux_1.ux.stdout(args);
|
|
164
|
+
}
|
|
165
|
+
async showCommandHelp(command) {
|
|
166
|
+
const name = command.id;
|
|
167
|
+
const depth = name.split(':').length;
|
|
168
|
+
const subTopics = this.sortedTopics.filter((t) => t.name.startsWith(name + ':') && t.name.split(':').length === depth + 1);
|
|
169
|
+
const subCommands = this.sortedCommands.filter((c) => c.id.startsWith(name + ':') && c.id.split(':').length === depth + 1);
|
|
170
|
+
const plugin = this.config.plugins.get(command.pluginName);
|
|
171
|
+
const state = this.config.pjson?.oclif?.state || plugin?.pjson?.oclif?.state || command.state;
|
|
172
|
+
if (state) {
|
|
173
|
+
this.log(state === 'deprecated'
|
|
174
|
+
? `${(0, util_2.formatCommandDeprecationWarning)((0, ids_1.toConfiguredId)(name, this.config), command.deprecationOptions)}\n`
|
|
175
|
+
: `This command is in ${state}.\n`);
|
|
176
|
+
}
|
|
177
|
+
if (command.deprecateAliases && [...(command.aliases ?? []), ...(command.hiddenAliases ?? [])].includes(name)) {
|
|
178
|
+
const actualCmd = this.config.commands.find((c) => [...(c.aliases ?? []), ...(c.hiddenAliases ?? [])].includes(name));
|
|
179
|
+
const actualCmdName = actualCmd ? (0, ids_1.toConfiguredId)(actualCmd.id, this.config) : '';
|
|
180
|
+
const opts = { ...command.deprecationOptions, ...(actualCmd ? { to: actualCmdName } : {}) };
|
|
181
|
+
this.log(`${(0, util_2.formatCommandDeprecationWarning)((0, ids_1.toConfiguredId)(name, this.config), opts)}\n`);
|
|
182
|
+
}
|
|
183
|
+
const summary = this.summary(command);
|
|
184
|
+
if (summary) {
|
|
185
|
+
this.log(summary + '\n');
|
|
186
|
+
}
|
|
187
|
+
this.log(this.formatCommand(command));
|
|
188
|
+
this.log('');
|
|
189
|
+
if (subTopics.length > 0) {
|
|
190
|
+
this.log(this.formatTopics(subTopics));
|
|
191
|
+
this.log('');
|
|
192
|
+
}
|
|
193
|
+
if (subCommands.length > 0) {
|
|
194
|
+
const aliases = [];
|
|
195
|
+
const uniqueSubCommands = subCommands.filter((p) => {
|
|
196
|
+
aliases.push(...p.aliases);
|
|
197
|
+
return !aliases.includes(p.id);
|
|
198
|
+
});
|
|
199
|
+
this.log(this.formatCommands(uniqueSubCommands));
|
|
200
|
+
this.log('');
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
async showHelp(argv) {
|
|
204
|
+
const originalArgv = argv.slice(1);
|
|
205
|
+
argv = argv.filter((arg) => !(0, util_2.getHelpFlagAdditions)(this.config).includes(arg));
|
|
206
|
+
if (this.config.topicSeparator !== ':')
|
|
207
|
+
argv = (0, util_2.standardizeIDFromArgv)(argv, this.config);
|
|
208
|
+
const subject = getHelpSubject(argv, this.config);
|
|
209
|
+
if (!subject) {
|
|
210
|
+
if (this.config.isSingleCommandCLI) {
|
|
211
|
+
const rootCmd = this.config.findCommand(symbols_1.SINGLE_COMMAND_CLI_SYMBOL);
|
|
212
|
+
if (rootCmd) {
|
|
213
|
+
// set the command id to an empty string to prevent the
|
|
214
|
+
// SINGLE_COMMAND_CLI_SYMBOL from being displayed in the help output
|
|
215
|
+
rootCmd.id = '';
|
|
216
|
+
await this.showCommandHelp(rootCmd);
|
|
217
|
+
return;
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
await this.showRootHelp();
|
|
221
|
+
return;
|
|
222
|
+
}
|
|
223
|
+
const command = this.config.findCommand(subject);
|
|
224
|
+
if (command) {
|
|
225
|
+
if (command.id === symbols_1.SINGLE_COMMAND_CLI_SYMBOL) {
|
|
226
|
+
// If the command is the root command of a single command CLI,
|
|
227
|
+
// then set the command id to an empty string to prevent the
|
|
228
|
+
// the SINGLE_COMMAND_CLI_SYMBOL from being displayed in the help output.
|
|
229
|
+
command.id = '';
|
|
230
|
+
}
|
|
231
|
+
if (command.hasDynamicHelp && command.pluginType !== 'jit') {
|
|
232
|
+
const loaded = await command.load();
|
|
233
|
+
for (const [name, flag] of Object.entries(loaded.flags ?? {})) {
|
|
234
|
+
// As of v3 each flag that needs to be re-evaluated has the `hasDynamicHelp` property.
|
|
235
|
+
// However, we cannot assume that the absence of this property means that the flag
|
|
236
|
+
// doesn't need to be re-evaluated since any command from a v2 or older plugin will
|
|
237
|
+
// not have the `hasDynamicHelp` property on it.
|
|
238
|
+
// In the future we could improve performance by skipping any flag that doesn't
|
|
239
|
+
// have `hasDynamicHelp === true`
|
|
240
|
+
if (flag.type === 'boolean')
|
|
241
|
+
continue;
|
|
242
|
+
// eslint-disable-next-line no-await-in-loop
|
|
243
|
+
command.flags[name].default = await (0, cache_default_value_1.cacheDefaultValue)(flag, false);
|
|
244
|
+
}
|
|
245
|
+
await this.showCommandHelp(command);
|
|
246
|
+
}
|
|
247
|
+
else {
|
|
248
|
+
await this.showCommandHelp(command);
|
|
249
|
+
}
|
|
250
|
+
return;
|
|
251
|
+
}
|
|
252
|
+
const topic = this.config.findTopic(subject);
|
|
253
|
+
if (topic) {
|
|
254
|
+
await this.showTopicHelp(topic);
|
|
255
|
+
return;
|
|
256
|
+
}
|
|
257
|
+
if (this.config.flexibleTaxonomy) {
|
|
258
|
+
const matches = this.config.findMatches(subject, originalArgv);
|
|
259
|
+
if (matches.length > 0) {
|
|
260
|
+
const result = await this.config.runHook('command_incomplete', {
|
|
261
|
+
argv: originalArgv.filter((o) => !subject.split(':').includes(o)),
|
|
262
|
+
id: subject,
|
|
263
|
+
matches,
|
|
264
|
+
});
|
|
265
|
+
if (result.successes.length > 0)
|
|
266
|
+
return;
|
|
267
|
+
}
|
|
268
|
+
}
|
|
269
|
+
(0, error_1.error)(`Command ${subject} not found.`);
|
|
270
|
+
}
|
|
271
|
+
async showRootHelp() {
|
|
272
|
+
let rootTopics = this.sortedTopics;
|
|
273
|
+
let rootCommands = this.sortedCommands;
|
|
274
|
+
const state = this.config.pjson?.oclif?.state;
|
|
275
|
+
if (state) {
|
|
276
|
+
this.log(state === 'deprecated' ? `${this.config.bin} is deprecated` : `${this.config.bin} is in ${state}.\n`);
|
|
277
|
+
}
|
|
278
|
+
this.log(this.formatRoot());
|
|
279
|
+
this.log('');
|
|
280
|
+
if (!this.opts.all) {
|
|
281
|
+
rootTopics = rootTopics.filter((t) => !t.name.includes(':'));
|
|
282
|
+
rootCommands = rootCommands.filter((c) => !c.id.includes(':'));
|
|
283
|
+
}
|
|
284
|
+
if (rootTopics.length > 0) {
|
|
285
|
+
this.log(this.formatTopics(rootTopics));
|
|
286
|
+
this.log('');
|
|
287
|
+
}
|
|
288
|
+
if (rootCommands.length > 0) {
|
|
289
|
+
rootCommands = rootCommands.filter((c) => c.id);
|
|
290
|
+
this.log(this.formatCommands(rootCommands));
|
|
291
|
+
this.log('');
|
|
292
|
+
}
|
|
293
|
+
}
|
|
294
|
+
async showTopicHelp(topic) {
|
|
295
|
+
const { name } = topic;
|
|
296
|
+
const depth = name.split(':').length;
|
|
297
|
+
const subTopics = this.sortedTopics.filter((t) => t.name.startsWith(name + ':') && t.name.split(':').length === depth + 1);
|
|
298
|
+
const commands = this.sortedCommands.filter((c) => c.id.startsWith(name + ':') && c.id.split(':').length === depth + 1);
|
|
299
|
+
const state = this.config.pjson?.oclif?.state;
|
|
300
|
+
if (state)
|
|
301
|
+
this.log(`This topic is in ${state}.\n`);
|
|
302
|
+
this.log(this.formatTopic(topic));
|
|
303
|
+
if (subTopics.length > 0) {
|
|
304
|
+
this.log(this.formatTopics(subTopics));
|
|
305
|
+
this.log('');
|
|
306
|
+
}
|
|
307
|
+
if (commands.length > 0) {
|
|
308
|
+
this.log(this.formatCommands(commands));
|
|
309
|
+
this.log('');
|
|
310
|
+
}
|
|
311
|
+
}
|
|
312
|
+
summary(c) {
|
|
313
|
+
if (this.opts.sections && !this.opts.sections.map((s) => s.toLowerCase()).includes('summary'))
|
|
314
|
+
return;
|
|
315
|
+
if (c.summary)
|
|
316
|
+
return (0, theme_1.colorize)(this.config?.theme?.commandSummary, this.render(c.summary.split('\n')[0]));
|
|
317
|
+
return c.description && (0, theme_1.colorize)(this.config?.theme?.commandSummary, this.render(c.description).split('\n')[0]);
|
|
318
|
+
}
|
|
319
|
+
}
|
|
320
|
+
exports.Help = Help;
|
|
321
|
+
function extractClass(exported) {
|
|
322
|
+
return exported && exported.default ? exported.default : exported;
|
|
323
|
+
}
|
|
324
|
+
function determineLocation(helpClass) {
|
|
325
|
+
if (typeof helpClass === 'string')
|
|
326
|
+
return { identifier: 'default', target: helpClass };
|
|
327
|
+
if (!helpClass.identifier)
|
|
328
|
+
return { ...helpClass, identifier: 'default' };
|
|
329
|
+
return helpClass;
|
|
330
|
+
}
|
|
331
|
+
async function loadHelpClass(config) {
|
|
332
|
+
if (config.pjson.oclif?.helpClass) {
|
|
333
|
+
const { identifier, target } = determineLocation(config.pjson.oclif?.helpClass);
|
|
334
|
+
try {
|
|
335
|
+
const path = (await (0, ts_path_1.tsPath)(config.root, target)) ?? target;
|
|
336
|
+
const module = await (0, module_loader_1.load)(config, path);
|
|
337
|
+
const helpClass = module[identifier] ?? (identifier === 'default' ? extractClass(module) : undefined);
|
|
338
|
+
return extractClass(helpClass);
|
|
339
|
+
}
|
|
340
|
+
catch (error) {
|
|
341
|
+
throw new Error(`Unable to load configured help class "${target}", failed with message:\n${error.message}`);
|
|
342
|
+
}
|
|
343
|
+
}
|
|
344
|
+
return Help;
|
|
345
|
+
}
|