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,749 @@
|
|
|
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.Config = void 0;
|
|
7
|
+
const ejs_1 = __importDefault(require("ejs"));
|
|
8
|
+
const node_os_1 = require("node:os");
|
|
9
|
+
const node_path_1 = require("node:path");
|
|
10
|
+
const node_url_1 = require("node:url");
|
|
11
|
+
const cache_1 = __importDefault(require("../cache"));
|
|
12
|
+
const errors_1 = require("../errors");
|
|
13
|
+
const util_1 = require("../help/util");
|
|
14
|
+
const logger_1 = require("../logger");
|
|
15
|
+
const module_loader_1 = require("../module-loader");
|
|
16
|
+
const performance_1 = require("../performance");
|
|
17
|
+
const settings_1 = require("../settings");
|
|
18
|
+
const determine_priority_1 = require("../util/determine-priority");
|
|
19
|
+
const fs_1 = require("../util/fs");
|
|
20
|
+
const ids_1 = require("../util/ids");
|
|
21
|
+
const os_1 = require("../util/os");
|
|
22
|
+
const util_2 = require("../util/util");
|
|
23
|
+
const ux_1 = require("../ux");
|
|
24
|
+
const theme_1 = require("../ux/theme");
|
|
25
|
+
const plugin_loader_1 = __importDefault(require("./plugin-loader"));
|
|
26
|
+
const ts_path_1 = require("./ts-path");
|
|
27
|
+
const util_3 = require("./util");
|
|
28
|
+
const debug = (0, util_3.makeDebug)();
|
|
29
|
+
const _pjson = cache_1.default.getInstance().get('@oclif/core');
|
|
30
|
+
const BASE = `${_pjson.name}@${_pjson.version}`;
|
|
31
|
+
const ROOT_ONLY_HOOKS = new Set(['preparse']);
|
|
32
|
+
function displayWarnings() {
|
|
33
|
+
if (process.listenerCount('warning') > 1)
|
|
34
|
+
return;
|
|
35
|
+
process.on('warning', (warning) => {
|
|
36
|
+
console.error(warning.stack);
|
|
37
|
+
if (warning.detail)
|
|
38
|
+
console.error(warning.detail);
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
function channelFromVersion(version) {
|
|
42
|
+
const m = version.match(/[^-]+(?:-([^.]+))?/);
|
|
43
|
+
return (m && m[1]) || 'stable';
|
|
44
|
+
}
|
|
45
|
+
function isConfig(o) {
|
|
46
|
+
return o && Boolean(o._base);
|
|
47
|
+
}
|
|
48
|
+
class Permutations extends Map {
|
|
49
|
+
validPermutations = new Map();
|
|
50
|
+
add(permutation, commandId) {
|
|
51
|
+
this.validPermutations.set(permutation, commandId);
|
|
52
|
+
for (const id of (0, util_3.collectUsableIds)([permutation])) {
|
|
53
|
+
if (this.has(id)) {
|
|
54
|
+
this.set(id, this.get(id).add(commandId));
|
|
55
|
+
}
|
|
56
|
+
else {
|
|
57
|
+
this.set(id, new Set([commandId]));
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
get(key) {
|
|
62
|
+
return super.get(key) ?? new Set();
|
|
63
|
+
}
|
|
64
|
+
getAllValid() {
|
|
65
|
+
return [...this.validPermutations.keys()];
|
|
66
|
+
}
|
|
67
|
+
getValid(key) {
|
|
68
|
+
return this.validPermutations.get(key);
|
|
69
|
+
}
|
|
70
|
+
hasValid(key) {
|
|
71
|
+
return this.validPermutations.has(key);
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
class Config {
|
|
75
|
+
options;
|
|
76
|
+
arch;
|
|
77
|
+
bin;
|
|
78
|
+
binAliases;
|
|
79
|
+
binPath;
|
|
80
|
+
cacheDir;
|
|
81
|
+
channel;
|
|
82
|
+
configDir;
|
|
83
|
+
dataDir;
|
|
84
|
+
dirname;
|
|
85
|
+
flexibleTaxonomy;
|
|
86
|
+
home;
|
|
87
|
+
isSingleCommandCLI = false;
|
|
88
|
+
name;
|
|
89
|
+
npmRegistry;
|
|
90
|
+
nsisCustomization;
|
|
91
|
+
pjson;
|
|
92
|
+
platform;
|
|
93
|
+
plugins = new Map();
|
|
94
|
+
root;
|
|
95
|
+
shell;
|
|
96
|
+
theme;
|
|
97
|
+
topicSeparator = ':';
|
|
98
|
+
updateConfig;
|
|
99
|
+
userAgent;
|
|
100
|
+
userPJSON;
|
|
101
|
+
valid;
|
|
102
|
+
version;
|
|
103
|
+
warned = false;
|
|
104
|
+
windows;
|
|
105
|
+
_base = BASE;
|
|
106
|
+
_commandIDs;
|
|
107
|
+
_commands = new Map();
|
|
108
|
+
_topics = new Map();
|
|
109
|
+
commandPermutations = new Permutations();
|
|
110
|
+
pluginLoader;
|
|
111
|
+
rootPlugin;
|
|
112
|
+
topicPermutations = new Permutations();
|
|
113
|
+
constructor(options) {
|
|
114
|
+
this.options = options;
|
|
115
|
+
}
|
|
116
|
+
static async load(opts = module.filename || __dirname) {
|
|
117
|
+
(0, logger_1.setLogger)(opts);
|
|
118
|
+
// Handle the case when a file URL string is passed in such as 'import.meta.url'; covert to file path.
|
|
119
|
+
if (typeof opts === 'string' && opts.startsWith('file://')) {
|
|
120
|
+
opts = (0, node_url_1.fileURLToPath)(opts);
|
|
121
|
+
}
|
|
122
|
+
if (typeof opts === 'string')
|
|
123
|
+
opts = { root: opts };
|
|
124
|
+
if (isConfig(opts)) {
|
|
125
|
+
debug(`reloading config from ${opts._base} to ${BASE}`);
|
|
126
|
+
const pluginMap = new Map(opts.getPluginsList().map((p) => [p.name, p]));
|
|
127
|
+
const config = new Config({ ...opts.options, plugins: pluginMap });
|
|
128
|
+
await config.load();
|
|
129
|
+
return config;
|
|
130
|
+
}
|
|
131
|
+
const config = new Config(opts);
|
|
132
|
+
await config.load();
|
|
133
|
+
return config;
|
|
134
|
+
}
|
|
135
|
+
get commandIDs() {
|
|
136
|
+
if (this._commandIDs)
|
|
137
|
+
return this._commandIDs;
|
|
138
|
+
this._commandIDs = this.commands.map((c) => c.id);
|
|
139
|
+
return this._commandIDs;
|
|
140
|
+
}
|
|
141
|
+
get commands() {
|
|
142
|
+
return [...this._commands.values()];
|
|
143
|
+
}
|
|
144
|
+
get isProd() {
|
|
145
|
+
return (0, util_2.isProd)();
|
|
146
|
+
}
|
|
147
|
+
static get rootPlugin() {
|
|
148
|
+
return this.rootPlugin;
|
|
149
|
+
}
|
|
150
|
+
get topics() {
|
|
151
|
+
return [...this._topics.values()];
|
|
152
|
+
}
|
|
153
|
+
get versionDetails() {
|
|
154
|
+
const [cliVersion, architecture, nodeVersion] = this.userAgent.split(' ');
|
|
155
|
+
return {
|
|
156
|
+
architecture,
|
|
157
|
+
cliVersion,
|
|
158
|
+
nodeVersion,
|
|
159
|
+
osVersion: `${(0, node_os_1.type)()} ${(0, node_os_1.release)()}`,
|
|
160
|
+
pluginVersions: Object.fromEntries([...this.plugins.values()].map((p) => [p.name, { root: p.root, type: p.type, version: p.version }])),
|
|
161
|
+
rootPath: this.root,
|
|
162
|
+
shell: this.shell,
|
|
163
|
+
};
|
|
164
|
+
}
|
|
165
|
+
dir(category) {
|
|
166
|
+
const base = process.env[`XDG_${category.toUpperCase()}_HOME`] ||
|
|
167
|
+
(this.windows && process.env.LOCALAPPDATA) ||
|
|
168
|
+
(0, node_path_1.join)(this.home, category === 'data' ? '.local/share' : '.' + category);
|
|
169
|
+
return (0, node_path_1.join)(base, this.dirname);
|
|
170
|
+
}
|
|
171
|
+
findCommand(id, opts = {}) {
|
|
172
|
+
const lookupId = this.getCmdLookupId(id);
|
|
173
|
+
const command = this._commands.get(lookupId);
|
|
174
|
+
if (opts.must && !command)
|
|
175
|
+
(0, errors_1.error)(`command ${lookupId} not found`);
|
|
176
|
+
return command;
|
|
177
|
+
}
|
|
178
|
+
/**
|
|
179
|
+
* Find all command ids that include the provided command id.
|
|
180
|
+
*
|
|
181
|
+
* For example, if the command ids are:
|
|
182
|
+
* - foo:bar:baz
|
|
183
|
+
* - one:two:three
|
|
184
|
+
*
|
|
185
|
+
* `bar` would return `foo:bar:baz`
|
|
186
|
+
*
|
|
187
|
+
* @param partialCmdId string
|
|
188
|
+
* @param argv string[] process.argv containing the flags and arguments provided by the user
|
|
189
|
+
* @returns string[]
|
|
190
|
+
*/
|
|
191
|
+
findMatches(partialCmdId, argv) {
|
|
192
|
+
const flags = argv
|
|
193
|
+
.filter((arg) => !(0, util_1.getHelpFlagAdditions)(this).includes(arg) && arg.startsWith('-'))
|
|
194
|
+
.map((a) => a.replaceAll('-', ''));
|
|
195
|
+
const possibleMatches = [...this.commandPermutations.get(partialCmdId)].map((k) => this._commands.get(k));
|
|
196
|
+
const matches = possibleMatches.filter((command) => {
|
|
197
|
+
const cmdFlags = Object.entries(command.flags).flatMap(([flag, def]) => def.char ? [def.char, flag] : [flag]);
|
|
198
|
+
// A command is a match if the provided flags belong to the full command
|
|
199
|
+
return flags.every((f) => cmdFlags.includes(f));
|
|
200
|
+
});
|
|
201
|
+
return matches;
|
|
202
|
+
}
|
|
203
|
+
findTopic(name, opts = {}) {
|
|
204
|
+
const lookupId = this.getTopicLookupId(name);
|
|
205
|
+
const topic = this._topics.get(lookupId);
|
|
206
|
+
if (topic)
|
|
207
|
+
return topic;
|
|
208
|
+
if (opts.must)
|
|
209
|
+
throw new Error(`topic ${name} not found`);
|
|
210
|
+
}
|
|
211
|
+
/**
|
|
212
|
+
* Returns an array of all command ids. If flexible taxonomy is enabled then all permutations will be appended to the array.
|
|
213
|
+
* @returns string[]
|
|
214
|
+
*/
|
|
215
|
+
getAllCommandIDs() {
|
|
216
|
+
return this.getAllCommands().map((c) => c.id);
|
|
217
|
+
}
|
|
218
|
+
/**
|
|
219
|
+
* Returns an array of all commands. If flexible taxonomy is enabled then all permutations will be appended to the array.
|
|
220
|
+
* @returns Command.Loadable[]
|
|
221
|
+
*/
|
|
222
|
+
getAllCommands() {
|
|
223
|
+
const commands = [...this._commands.values()];
|
|
224
|
+
const validPermutations = [...this.commandPermutations.getAllValid()];
|
|
225
|
+
for (const permutation of validPermutations) {
|
|
226
|
+
if (!this._commands.has(permutation)) {
|
|
227
|
+
const cmd = this._commands.get(this.getCmdLookupId(permutation));
|
|
228
|
+
commands.push({ ...cmd, id: permutation });
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
return commands;
|
|
232
|
+
}
|
|
233
|
+
getPluginsList() {
|
|
234
|
+
return [...this.plugins.values()];
|
|
235
|
+
}
|
|
236
|
+
// eslint-disable-next-line complexity
|
|
237
|
+
async load() {
|
|
238
|
+
settings_1.settings.performanceEnabled =
|
|
239
|
+
(settings_1.settings.performanceEnabled === undefined ? this.options.enablePerf : settings_1.settings.performanceEnabled) ?? false;
|
|
240
|
+
if (settings_1.settings.debug)
|
|
241
|
+
displayWarnings();
|
|
242
|
+
(0, logger_1.setLogger)(this.options);
|
|
243
|
+
const marker = performance_1.Performance.mark(performance_1.OCLIF_MARKER_OWNER, 'config.load');
|
|
244
|
+
this.pluginLoader = new plugin_loader_1.default({ plugins: this.options.plugins, root: this.options.root });
|
|
245
|
+
this.rootPlugin = await this.pluginLoader.loadRoot({ pjson: this.options.pjson });
|
|
246
|
+
// Cache the root plugin so that we can reference it later when determining if
|
|
247
|
+
// we should skip ts-node registration for an ESM plugin.
|
|
248
|
+
const cache = cache_1.default.getInstance();
|
|
249
|
+
cache.set('rootPlugin', this.rootPlugin);
|
|
250
|
+
cache.set('exitCodes', this.rootPlugin.pjson.oclif.exitCodes ?? {});
|
|
251
|
+
this.root = this.rootPlugin.root;
|
|
252
|
+
this.pjson = this.rootPlugin.pjson;
|
|
253
|
+
this.plugins.set(this.rootPlugin.name, this.rootPlugin);
|
|
254
|
+
this.root = this.rootPlugin.root;
|
|
255
|
+
this.pjson = this.rootPlugin.pjson;
|
|
256
|
+
this.name = this.pjson.name;
|
|
257
|
+
this.version = this.options.version || this.pjson.version || '0.0.0';
|
|
258
|
+
this.channel = this.options.channel || channelFromVersion(this.version);
|
|
259
|
+
this.valid = this.rootPlugin.valid;
|
|
260
|
+
this.arch = (0, node_os_1.arch)() === 'ia32' ? 'x86' : (0, node_os_1.arch)();
|
|
261
|
+
this.platform = await (0, os_1.getPlatform)();
|
|
262
|
+
this.windows = this.platform === 'win32';
|
|
263
|
+
this.bin = this.pjson.oclif.bin || this.name;
|
|
264
|
+
this.binAliases = this.pjson.oclif.binAliases;
|
|
265
|
+
this.nsisCustomization = this.pjson.oclif.nsisCustomization;
|
|
266
|
+
this.dirname = this.pjson.oclif.dirname || this.name;
|
|
267
|
+
this.flexibleTaxonomy = this.pjson.oclif.flexibleTaxonomy || false;
|
|
268
|
+
// currently, only colons or spaces are valid separators
|
|
269
|
+
if (this.pjson.oclif.topicSeparator && [' ', ':'].includes(this.pjson.oclif.topicSeparator))
|
|
270
|
+
this.topicSeparator = this.pjson.oclif.topicSeparator;
|
|
271
|
+
if (this.platform === 'win32')
|
|
272
|
+
this.dirname = this.dirname.replace('/', '\\');
|
|
273
|
+
this.userAgent = `${this.name}/${this.version} ${this.platform}-${this.arch} node-${process.version}`;
|
|
274
|
+
this.shell = await (0, os_1.getShell)();
|
|
275
|
+
this.home = process.env.HOME || (this.windows && this.windowsHome()) || (0, os_1.getHomeDir)() || (0, node_os_1.tmpdir)();
|
|
276
|
+
this.cacheDir = this.scopedEnvVar('CACHE_DIR') || this.macosCacheDir() || this.dir('cache');
|
|
277
|
+
this.configDir = this.scopedEnvVar('CONFIG_DIR') || this.dir('config');
|
|
278
|
+
this.dataDir = this.scopedEnvVar('DATA_DIR') || this.dir('data');
|
|
279
|
+
this.binPath = this.scopedEnvVar('BINPATH');
|
|
280
|
+
this.npmRegistry = this.scopedEnvVar('NPM_REGISTRY') || this.pjson.oclif.npmRegistry;
|
|
281
|
+
this.theme = await this.loadTheme();
|
|
282
|
+
this.updateConfig = {
|
|
283
|
+
...this.pjson.oclif.update,
|
|
284
|
+
node: this.pjson.oclif.update?.node ?? {},
|
|
285
|
+
s3: this.buildS3Config(),
|
|
286
|
+
};
|
|
287
|
+
this.isSingleCommandCLI = Boolean(typeof this.pjson.oclif.commands !== 'string' &&
|
|
288
|
+
this.pjson.oclif.commands?.strategy === 'single' &&
|
|
289
|
+
this.pjson.oclif.commands?.target);
|
|
290
|
+
this.maybeAdjustDebugSetting();
|
|
291
|
+
await this.loadPluginsAndCommands();
|
|
292
|
+
debug('config done');
|
|
293
|
+
marker?.addDetails({
|
|
294
|
+
commandPermutations: this.commands.length,
|
|
295
|
+
commands: [...this.plugins.values()].reduce((acc, p) => acc + p.commands.length, 0),
|
|
296
|
+
plugins: this.plugins.size,
|
|
297
|
+
topics: this.topics.length,
|
|
298
|
+
});
|
|
299
|
+
marker?.stop();
|
|
300
|
+
}
|
|
301
|
+
async loadPluginsAndCommands(opts) {
|
|
302
|
+
const pluginsMarker = performance_1.Performance.mark(performance_1.OCLIF_MARKER_OWNER, 'config.loadAllPlugins');
|
|
303
|
+
const { errors, plugins } = await this.pluginLoader.loadChildren({
|
|
304
|
+
dataDir: this.dataDir,
|
|
305
|
+
devPlugins: this.options.devPlugins,
|
|
306
|
+
force: opts?.force ?? false,
|
|
307
|
+
pluginAdditions: this.options.pluginAdditions,
|
|
308
|
+
rootPlugin: this.rootPlugin,
|
|
309
|
+
userPlugins: this.options.userPlugins,
|
|
310
|
+
});
|
|
311
|
+
this.plugins = plugins;
|
|
312
|
+
pluginsMarker?.stop();
|
|
313
|
+
const commandsMarker = performance_1.Performance.mark(performance_1.OCLIF_MARKER_OWNER, 'config.loadAllCommands');
|
|
314
|
+
for (const plugin of this.plugins.values()) {
|
|
315
|
+
this.loadCommands(plugin);
|
|
316
|
+
this.loadTopics(plugin);
|
|
317
|
+
}
|
|
318
|
+
commandsMarker?.stop();
|
|
319
|
+
for (const error of errors) {
|
|
320
|
+
this.warn(error);
|
|
321
|
+
}
|
|
322
|
+
}
|
|
323
|
+
async loadTheme() {
|
|
324
|
+
if (this.scopedEnvVarTrue('DISABLE_THEME'))
|
|
325
|
+
return;
|
|
326
|
+
const userThemeFile = (0, node_path_1.resolve)(this.configDir, 'theme.json');
|
|
327
|
+
const getDefaultTheme = async () => {
|
|
328
|
+
if (!this.pjson.oclif.theme)
|
|
329
|
+
return;
|
|
330
|
+
if (typeof this.pjson.oclif.theme === 'string') {
|
|
331
|
+
return (0, fs_1.safeReadJson)((0, node_path_1.resolve)(this.root, this.pjson.oclif.theme));
|
|
332
|
+
}
|
|
333
|
+
return this.pjson.oclif.theme;
|
|
334
|
+
};
|
|
335
|
+
const [defaultTheme, userTheme] = await Promise.all([
|
|
336
|
+
getDefaultTheme(),
|
|
337
|
+
(0, fs_1.safeReadJson)(userThemeFile),
|
|
338
|
+
]);
|
|
339
|
+
// Merge the default theme with the user theme, giving the user theme precedence.
|
|
340
|
+
const merged = { ...defaultTheme, ...userTheme };
|
|
341
|
+
return Object.keys(merged).length > 0 ? (0, theme_1.parseTheme)(merged) : undefined;
|
|
342
|
+
}
|
|
343
|
+
macosCacheDir() {
|
|
344
|
+
return (this.platform === 'darwin' && (0, node_path_1.join)(this.home, 'Library', 'Caches', this.dirname)) || undefined;
|
|
345
|
+
}
|
|
346
|
+
async runCommand(id, argv = [], cachedCommand = null) {
|
|
347
|
+
const marker = performance_1.Performance.mark(performance_1.OCLIF_MARKER_OWNER, `config.runCommand#${id}`);
|
|
348
|
+
debug('runCommand %s %o', id, argv);
|
|
349
|
+
let c = cachedCommand ?? this.findCommand(id);
|
|
350
|
+
if (!c) {
|
|
351
|
+
const matches = this.flexibleTaxonomy ? this.findMatches(id, argv) : [];
|
|
352
|
+
const hookResult = this.flexibleTaxonomy && matches.length > 0
|
|
353
|
+
? await this.runHook('command_incomplete', { argv, id, matches })
|
|
354
|
+
: await this.runHook('command_not_found', { argv, id });
|
|
355
|
+
if (hookResult.successes[0])
|
|
356
|
+
return hookResult.successes[0].result;
|
|
357
|
+
if (hookResult.failures[0])
|
|
358
|
+
throw hookResult.failures[0].error;
|
|
359
|
+
throw new errors_1.CLIError(`command ${id} not found`);
|
|
360
|
+
}
|
|
361
|
+
if (this.isJitPluginCommand(c)) {
|
|
362
|
+
const pluginName = c.pluginName;
|
|
363
|
+
const pluginVersion = this.pjson.oclif.jitPlugins[pluginName];
|
|
364
|
+
const jitResult = await this.runHook('jit_plugin_not_installed', {
|
|
365
|
+
argv,
|
|
366
|
+
command: c,
|
|
367
|
+
id,
|
|
368
|
+
pluginName,
|
|
369
|
+
pluginVersion,
|
|
370
|
+
});
|
|
371
|
+
if (jitResult.failures[0])
|
|
372
|
+
throw jitResult.failures[0].error;
|
|
373
|
+
if (jitResult.successes[0]) {
|
|
374
|
+
await this.loadPluginsAndCommands({ force: true });
|
|
375
|
+
c = this.findCommand(id) ?? c;
|
|
376
|
+
}
|
|
377
|
+
else {
|
|
378
|
+
// this means that no jit_plugin_not_installed hook exists, so we should run the default behavior
|
|
379
|
+
const result = await this.runHook('command_not_found', { argv, id });
|
|
380
|
+
if (result.successes[0])
|
|
381
|
+
return result.successes[0].result;
|
|
382
|
+
if (result.failures[0])
|
|
383
|
+
throw result.failures[0].error;
|
|
384
|
+
throw new errors_1.CLIError(`command ${id} not found`);
|
|
385
|
+
}
|
|
386
|
+
}
|
|
387
|
+
const command = await c.load();
|
|
388
|
+
await this.runHook('prerun', { argv, Command: command });
|
|
389
|
+
const result = (await command.run(argv, this));
|
|
390
|
+
// If plugins:uninstall was run, we need to remove all the uninstalled plugins
|
|
391
|
+
// from this.plugins so that the postrun hook doesn't attempt to run any
|
|
392
|
+
// hooks that might have existed in the uninstalled plugins.
|
|
393
|
+
if (c.id === 'plugins:uninstall') {
|
|
394
|
+
for (const arg of argv)
|
|
395
|
+
this.plugins.delete(arg);
|
|
396
|
+
}
|
|
397
|
+
await this.runHook('postrun', { argv, Command: command, result });
|
|
398
|
+
marker?.addDetails({ command: id, plugin: c.pluginName });
|
|
399
|
+
marker?.stop();
|
|
400
|
+
return result;
|
|
401
|
+
}
|
|
402
|
+
async runHook(event, opts, timeout, captureErrors) {
|
|
403
|
+
const marker = performance_1.Performance.mark(performance_1.OCLIF_MARKER_OWNER, `config.runHook#${event}`);
|
|
404
|
+
debug('start %s hook', event);
|
|
405
|
+
const search = (m) => {
|
|
406
|
+
if (typeof m === 'function')
|
|
407
|
+
return m;
|
|
408
|
+
if (m.default && typeof m.default === 'function')
|
|
409
|
+
return m.default;
|
|
410
|
+
return Object.values(m).find((m) => typeof m === 'function');
|
|
411
|
+
};
|
|
412
|
+
const withTimeout = async (ms, promise) => {
|
|
413
|
+
let id;
|
|
414
|
+
const timeout = new Promise((_, reject) => {
|
|
415
|
+
id = setTimeout(() => {
|
|
416
|
+
reject(new Error(`Timed out after ${ms} ms.`));
|
|
417
|
+
}, ms).unref();
|
|
418
|
+
});
|
|
419
|
+
return Promise.race([promise, timeout]).then((result) => {
|
|
420
|
+
clearTimeout(id);
|
|
421
|
+
return result;
|
|
422
|
+
});
|
|
423
|
+
};
|
|
424
|
+
const final = {
|
|
425
|
+
failures: [],
|
|
426
|
+
successes: [],
|
|
427
|
+
};
|
|
428
|
+
const plugins = ROOT_ONLY_HOOKS.has(event) ? [this.rootPlugin] : [...this.plugins.values()];
|
|
429
|
+
const promises = plugins.map(async (p) => {
|
|
430
|
+
const debug = (0, logger_1.makeDebug)([p.name, 'hooks', event].join(':'));
|
|
431
|
+
const context = {
|
|
432
|
+
config: this,
|
|
433
|
+
debug,
|
|
434
|
+
error(message, options = {}) {
|
|
435
|
+
(0, errors_1.error)(message, options);
|
|
436
|
+
},
|
|
437
|
+
exit(code = 0) {
|
|
438
|
+
(0, errors_1.exit)(code);
|
|
439
|
+
},
|
|
440
|
+
log(message, ...args) {
|
|
441
|
+
ux_1.ux.stdout(message, ...args);
|
|
442
|
+
},
|
|
443
|
+
warn(message) {
|
|
444
|
+
(0, errors_1.warn)(message);
|
|
445
|
+
},
|
|
446
|
+
};
|
|
447
|
+
const hooks = p.hooks[event] || [];
|
|
448
|
+
for (const hook of hooks) {
|
|
449
|
+
const marker = performance_1.Performance.mark(performance_1.OCLIF_MARKER_OWNER, `config.runHook#${p.name}(${hook.target})`);
|
|
450
|
+
try {
|
|
451
|
+
/* eslint-disable no-await-in-loop */
|
|
452
|
+
const { filePath, isESM, module } = await (0, module_loader_1.loadWithData)(p, await (0, ts_path_1.tsPath)(p.root, hook.target, p));
|
|
453
|
+
debug('start', isESM ? '(import)' : '(require)', filePath);
|
|
454
|
+
// If no hook is found using the identifier, then we should `search` for the hook but only if the hook identifier is 'default'
|
|
455
|
+
// A named identifier (e.g. MY_HOOK) that isn't found indicates that the hook isn't implemented in the plugin.
|
|
456
|
+
const hookFn = module[hook.identifier] ?? (hook.identifier === 'default' ? search(module) : undefined);
|
|
457
|
+
if (!hookFn) {
|
|
458
|
+
debug('No hook found for hook definition:', hook);
|
|
459
|
+
continue;
|
|
460
|
+
}
|
|
461
|
+
const result = timeout
|
|
462
|
+
? await withTimeout(timeout, hookFn.call(context, { ...opts, config: this, context }))
|
|
463
|
+
: await hookFn.call(context, { ...opts, config: this, context });
|
|
464
|
+
final.successes.push({ plugin: p, result });
|
|
465
|
+
if (p.name === '@oclif/plugin-legacy' && event === 'init') {
|
|
466
|
+
this.insertLegacyPlugins(result);
|
|
467
|
+
}
|
|
468
|
+
debug('done');
|
|
469
|
+
}
|
|
470
|
+
catch (error) {
|
|
471
|
+
final.failures.push({ error: error, plugin: p });
|
|
472
|
+
debug(error);
|
|
473
|
+
// Do not throw the error if
|
|
474
|
+
// captureErrors is set to true
|
|
475
|
+
// error.oclif.exit is undefined or 0
|
|
476
|
+
// error.code is MODULE_NOT_FOUND
|
|
477
|
+
if (!captureErrors &&
|
|
478
|
+
error.oclif?.exit !== undefined &&
|
|
479
|
+
error.oclif?.exit !== 0 &&
|
|
480
|
+
error.code !== 'MODULE_NOT_FOUND')
|
|
481
|
+
throw error;
|
|
482
|
+
}
|
|
483
|
+
marker?.addDetails({
|
|
484
|
+
event,
|
|
485
|
+
hook: hook.target,
|
|
486
|
+
plugin: p.name,
|
|
487
|
+
});
|
|
488
|
+
marker?.stop();
|
|
489
|
+
}
|
|
490
|
+
});
|
|
491
|
+
await Promise.all(promises);
|
|
492
|
+
debug('%s hook done', event);
|
|
493
|
+
marker?.stop();
|
|
494
|
+
return final;
|
|
495
|
+
}
|
|
496
|
+
s3Key(type, ext, options = {}) {
|
|
497
|
+
if (typeof ext === 'object')
|
|
498
|
+
options = ext;
|
|
499
|
+
else if (ext)
|
|
500
|
+
options.ext = ext;
|
|
501
|
+
const template = this.updateConfig.s3?.templates?.[options.platform ? 'target' : 'vanilla'][type] ?? '';
|
|
502
|
+
return ejs_1.default.render(template, { ...this, ...options });
|
|
503
|
+
}
|
|
504
|
+
s3Url(key) {
|
|
505
|
+
const { host } = this.updateConfig.s3 ?? { host: undefined };
|
|
506
|
+
if (!host)
|
|
507
|
+
throw new Error('no s3 host is set');
|
|
508
|
+
const url = new node_url_1.URL(host);
|
|
509
|
+
url.pathname = (0, node_path_1.join)(url.pathname, key);
|
|
510
|
+
return url.toString();
|
|
511
|
+
}
|
|
512
|
+
scopedEnvVar(k) {
|
|
513
|
+
return process.env[this.scopedEnvVarKeys(k).find((k) => process.env[k])];
|
|
514
|
+
}
|
|
515
|
+
/**
|
|
516
|
+
* this DOES NOT account for bin aliases, use scopedEnvVarKeys instead which will account for bin aliases
|
|
517
|
+
* @param k {string}, the unscoped key you want to get the value for
|
|
518
|
+
* @returns {string} returns the env var key
|
|
519
|
+
*/
|
|
520
|
+
scopedEnvVarKey(k) {
|
|
521
|
+
return [this.bin, k]
|
|
522
|
+
.map((p) => p.replaceAll('@', '').replaceAll(/[/-]/g, '_'))
|
|
523
|
+
.join('_')
|
|
524
|
+
.toUpperCase();
|
|
525
|
+
}
|
|
526
|
+
/**
|
|
527
|
+
* gets the scoped env var keys for a given key, including bin aliases
|
|
528
|
+
* @param k {string}, the env key e.g. 'debug'
|
|
529
|
+
* @returns {string[]} e.g. ['SF_DEBUG', 'SFDX_DEBUG']
|
|
530
|
+
*/
|
|
531
|
+
scopedEnvVarKeys(k) {
|
|
532
|
+
return [this.bin, ...(this.binAliases ?? [])]
|
|
533
|
+
.filter(Boolean)
|
|
534
|
+
.map((alias) => [alias.replaceAll('@', '').replaceAll(/[/-]/g, '_'), k].join('_').toUpperCase());
|
|
535
|
+
}
|
|
536
|
+
scopedEnvVarTrue(k) {
|
|
537
|
+
const v = this.scopedEnvVar(k);
|
|
538
|
+
return v === '1' || v === 'true';
|
|
539
|
+
}
|
|
540
|
+
windowsHome() {
|
|
541
|
+
return this.windowsHomedriveHome() || this.windowsUserprofileHome();
|
|
542
|
+
}
|
|
543
|
+
windowsHomedriveHome() {
|
|
544
|
+
return process.env.HOMEDRIVE && process.env.HOMEPATH && (0, node_path_1.join)(process.env.HOMEDRIVE, process.env.HOMEPATH);
|
|
545
|
+
}
|
|
546
|
+
windowsUserprofileHome() {
|
|
547
|
+
return process.env.USERPROFILE;
|
|
548
|
+
}
|
|
549
|
+
buildS3Config() {
|
|
550
|
+
const s3 = this.pjson.oclif.update?.s3;
|
|
551
|
+
const bucket = this.scopedEnvVar('S3_BUCKET') ?? s3?.bucket;
|
|
552
|
+
const host = s3?.host ?? (bucket && `https://${bucket}.s3.amazonaws.com`);
|
|
553
|
+
const templates = {
|
|
554
|
+
...s3?.templates,
|
|
555
|
+
target: {
|
|
556
|
+
baseDir: '<%- bin %>',
|
|
557
|
+
manifest: "<%- channel === 'stable' ? '' : 'channels/' + channel + '/' %><%- platform %>-<%- arch %>",
|
|
558
|
+
unversioned: "<%- channel === 'stable' ? '' : 'channels/' + channel + '/' %><%- bin %>-<%- platform %>-<%- arch %><%- ext %>",
|
|
559
|
+
versioned: "<%- channel === 'stable' ? '' : 'channels/' + channel + '/' %><%- bin %>-v<%- version %>/<%- bin %>-v<%- version %>-<%- platform %>-<%- arch %><%- ext %>",
|
|
560
|
+
...(s3?.templates && s3?.templates.target),
|
|
561
|
+
},
|
|
562
|
+
vanilla: {
|
|
563
|
+
baseDir: '<%- bin %>',
|
|
564
|
+
manifest: "<%- channel === 'stable' ? '' : 'channels/' + channel + '/' %>version",
|
|
565
|
+
unversioned: "<%- channel === 'stable' ? '' : 'channels/' + channel + '/' %><%- bin %><%- ext %>",
|
|
566
|
+
versioned: "<%- channel === 'stable' ? '' : 'channels/' + channel + '/' %><%- bin %>-v<%- version %>/<%- bin %>-v<%- version %><%- ext %>",
|
|
567
|
+
...(s3?.templates && s3?.templates.vanilla),
|
|
568
|
+
},
|
|
569
|
+
};
|
|
570
|
+
return {
|
|
571
|
+
bucket,
|
|
572
|
+
host,
|
|
573
|
+
templates,
|
|
574
|
+
};
|
|
575
|
+
}
|
|
576
|
+
getCmdLookupId(id) {
|
|
577
|
+
if (this._commands.has(id))
|
|
578
|
+
return id;
|
|
579
|
+
if (this.commandPermutations.hasValid(id))
|
|
580
|
+
return this.commandPermutations.getValid(id);
|
|
581
|
+
return id;
|
|
582
|
+
}
|
|
583
|
+
getTopicLookupId(id) {
|
|
584
|
+
if (this._topics.has(id))
|
|
585
|
+
return id;
|
|
586
|
+
if (this.topicPermutations.hasValid(id))
|
|
587
|
+
return this.topicPermutations.getValid(id);
|
|
588
|
+
return id;
|
|
589
|
+
}
|
|
590
|
+
/**
|
|
591
|
+
* Insert legacy plugins
|
|
592
|
+
*
|
|
593
|
+
* Replace invalid CLI plugins (cli-engine plugins, mostly Heroku) loaded via `this.loadPlugins`
|
|
594
|
+
* with oclif-compatible ones returned by @oclif/plugin-legacy init hook.
|
|
595
|
+
*
|
|
596
|
+
* @param plugins array of oclif-compatible plugins
|
|
597
|
+
*/
|
|
598
|
+
insertLegacyPlugins(plugins) {
|
|
599
|
+
for (const plugin of plugins) {
|
|
600
|
+
this.plugins.set(plugin.name, plugin);
|
|
601
|
+
// Delete all commands from the legacy plugin so that we can re-add them.
|
|
602
|
+
// This is necessary because determinePriority will pick the initial
|
|
603
|
+
// command that was added, which won't have been converted by PluginLegacy yet.
|
|
604
|
+
for (const cmd of plugin.commands ?? []) {
|
|
605
|
+
this._commands.delete(cmd.id);
|
|
606
|
+
for (const alias of [...(cmd.aliases ?? []), ...(cmd.hiddenAliases ?? [])]) {
|
|
607
|
+
this._commands.delete(alias);
|
|
608
|
+
}
|
|
609
|
+
}
|
|
610
|
+
this.loadCommands(plugin);
|
|
611
|
+
}
|
|
612
|
+
}
|
|
613
|
+
isJitPluginCommand(c) {
|
|
614
|
+
// Return true if the command's plugin is listed under oclif.jitPlugins AND if the plugin hasn't been loaded to this.plugins
|
|
615
|
+
return (Object.keys(this.pjson.oclif.jitPlugins ?? {}).includes(c.pluginName ?? '') &&
|
|
616
|
+
Boolean(c?.pluginName && !this.plugins.has(c.pluginName)));
|
|
617
|
+
}
|
|
618
|
+
loadCommands(plugin) {
|
|
619
|
+
const marker = performance_1.Performance.mark(performance_1.OCLIF_MARKER_OWNER, `config.loadCommands#${plugin.name}`, { plugin: plugin.name });
|
|
620
|
+
for (const command of plugin.commands) {
|
|
621
|
+
// set canonical command id
|
|
622
|
+
if (this._commands.has(command.id)) {
|
|
623
|
+
const prioritizedCommand = (0, determine_priority_1.determinePriority)(this.pjson.oclif.plugins ?? [], [
|
|
624
|
+
this._commands.get(command.id),
|
|
625
|
+
command,
|
|
626
|
+
]);
|
|
627
|
+
this._commands.set(prioritizedCommand.id, prioritizedCommand);
|
|
628
|
+
}
|
|
629
|
+
else {
|
|
630
|
+
this._commands.set(command.id, command);
|
|
631
|
+
}
|
|
632
|
+
// v3 moved command id permutations to the manifest, but some plugins may not have
|
|
633
|
+
// the new manifest yet. For those, we need to calculate the permutations here.
|
|
634
|
+
const permutations = this.flexibleTaxonomy && command.permutations === undefined
|
|
635
|
+
? (0, util_3.getCommandIdPermutations)(command.id)
|
|
636
|
+
: (command.permutations ?? [command.id]);
|
|
637
|
+
// set every permutation
|
|
638
|
+
for (const permutation of permutations) {
|
|
639
|
+
this.commandPermutations.add(permutation, command.id);
|
|
640
|
+
}
|
|
641
|
+
const handleAlias = (alias, hidden = false) => {
|
|
642
|
+
const aliasWithDefaultTopicSeparator = (0, ids_1.toStandardizedId)(alias, this);
|
|
643
|
+
if (this._commands.has(aliasWithDefaultTopicSeparator)) {
|
|
644
|
+
const prioritizedCommand = (0, determine_priority_1.determinePriority)(this.pjson.oclif.plugins ?? [], [
|
|
645
|
+
this._commands.get(aliasWithDefaultTopicSeparator),
|
|
646
|
+
command,
|
|
647
|
+
]);
|
|
648
|
+
this._commands.set(aliasWithDefaultTopicSeparator, {
|
|
649
|
+
...prioritizedCommand,
|
|
650
|
+
id: aliasWithDefaultTopicSeparator,
|
|
651
|
+
});
|
|
652
|
+
}
|
|
653
|
+
else {
|
|
654
|
+
this._commands.set(aliasWithDefaultTopicSeparator, { ...command, hidden, id: aliasWithDefaultTopicSeparator });
|
|
655
|
+
}
|
|
656
|
+
// set every permutation of the aliases
|
|
657
|
+
// v3 moved command alias permutations to the manifest, but some plugins may not have
|
|
658
|
+
// the new manifest yet. For those, we need to calculate the permutations here.
|
|
659
|
+
const aliasPermutations = this.flexibleTaxonomy && command.aliasPermutations === undefined
|
|
660
|
+
? (0, util_3.getCommandIdPermutations)(aliasWithDefaultTopicSeparator)
|
|
661
|
+
: (command.permutations ?? [aliasWithDefaultTopicSeparator]);
|
|
662
|
+
// set every permutation
|
|
663
|
+
for (const permutation of aliasPermutations) {
|
|
664
|
+
this.commandPermutations.add(permutation, command.id);
|
|
665
|
+
}
|
|
666
|
+
};
|
|
667
|
+
// set command aliases
|
|
668
|
+
for (const alias of command.aliases ?? []) {
|
|
669
|
+
handleAlias(alias);
|
|
670
|
+
}
|
|
671
|
+
// set hidden command aliases
|
|
672
|
+
for (const alias of command.hiddenAliases ?? []) {
|
|
673
|
+
handleAlias(alias, true);
|
|
674
|
+
}
|
|
675
|
+
}
|
|
676
|
+
marker?.addDetails({ commandCount: plugin.commands.length });
|
|
677
|
+
marker?.stop();
|
|
678
|
+
}
|
|
679
|
+
loadTopics(plugin) {
|
|
680
|
+
const marker = performance_1.Performance.mark(performance_1.OCLIF_MARKER_OWNER, `config.loadTopics#${plugin.name}`, { plugin: plugin.name });
|
|
681
|
+
for (const topic of (0, util_2.compact)(plugin.topics)) {
|
|
682
|
+
const existing = this._topics.get(topic.name);
|
|
683
|
+
if (existing) {
|
|
684
|
+
existing.description = topic.description || existing.description;
|
|
685
|
+
existing.hidden = existing.hidden || topic.hidden;
|
|
686
|
+
}
|
|
687
|
+
else {
|
|
688
|
+
this._topics.set(topic.name, topic);
|
|
689
|
+
}
|
|
690
|
+
const permutations = this.flexibleTaxonomy ? (0, util_3.getCommandIdPermutations)(topic.name) : [topic.name];
|
|
691
|
+
for (const permutation of permutations) {
|
|
692
|
+
this.topicPermutations.add(permutation, topic.name);
|
|
693
|
+
}
|
|
694
|
+
}
|
|
695
|
+
// Add missing topics for displaying help when partial commands are entered.
|
|
696
|
+
for (const c of plugin.commands.filter((c) => !c.hidden)) {
|
|
697
|
+
const parts = c.id.split(':');
|
|
698
|
+
while (parts.length > 0) {
|
|
699
|
+
const name = parts.join(':');
|
|
700
|
+
if (name && !this._topics.has(name)) {
|
|
701
|
+
this._topics.set(name, { description: c.summary || c.description, name });
|
|
702
|
+
}
|
|
703
|
+
parts.pop();
|
|
704
|
+
}
|
|
705
|
+
}
|
|
706
|
+
marker?.stop();
|
|
707
|
+
}
|
|
708
|
+
maybeAdjustDebugSetting() {
|
|
709
|
+
if (this.scopedEnvVarTrue('DEBUG')) {
|
|
710
|
+
settings_1.settings.debug = true;
|
|
711
|
+
displayWarnings();
|
|
712
|
+
}
|
|
713
|
+
}
|
|
714
|
+
warn(err, scope) {
|
|
715
|
+
if (this.warned)
|
|
716
|
+
return;
|
|
717
|
+
if (typeof err === 'string') {
|
|
718
|
+
process.emitWarning(err);
|
|
719
|
+
return;
|
|
720
|
+
}
|
|
721
|
+
if (err instanceof Error) {
|
|
722
|
+
const modifiedErr = err;
|
|
723
|
+
modifiedErr.name = `${err.name} Plugin: ${this.name}`;
|
|
724
|
+
modifiedErr.detail = (0, util_2.compact)([
|
|
725
|
+
err.detail,
|
|
726
|
+
`module: ${this._base}`,
|
|
727
|
+
scope && `task: ${scope}`,
|
|
728
|
+
`plugin: ${this.name}`,
|
|
729
|
+
`root: ${this.root}`,
|
|
730
|
+
'See more details with DEBUG=*',
|
|
731
|
+
]).join('\n');
|
|
732
|
+
process.emitWarning(err);
|
|
733
|
+
return;
|
|
734
|
+
}
|
|
735
|
+
// err is an object
|
|
736
|
+
process.emitWarning('Config.warn expected either a string or Error, but instead received an object');
|
|
737
|
+
err.name = `${err.name} Plugin: ${this.name}`;
|
|
738
|
+
err.detail = (0, util_2.compact)([
|
|
739
|
+
err.detail,
|
|
740
|
+
`module: ${this._base}`,
|
|
741
|
+
scope && `task: ${scope}`,
|
|
742
|
+
`plugin: ${this.name}`,
|
|
743
|
+
`root: ${this.root}`,
|
|
744
|
+
'See more details with DEBUG=*',
|
|
745
|
+
]).join('\n');
|
|
746
|
+
process.emitWarning(JSON.stringify(err));
|
|
747
|
+
}
|
|
748
|
+
}
|
|
749
|
+
exports.Config = Config;
|