avo-cli 0.0.3 → 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,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.aggregateFlags = aggregateFlags;
|
|
4
|
+
const flags_1 = require("../flags");
|
|
5
|
+
const json = (0, flags_1.boolean)({
|
|
6
|
+
description: 'Format output as json.',
|
|
7
|
+
helpGroup: 'GLOBAL',
|
|
8
|
+
});
|
|
9
|
+
function aggregateFlags(flags, baseFlags, enableJsonFlag) {
|
|
10
|
+
const combinedFlags = { ...baseFlags, ...flags };
|
|
11
|
+
return (enableJsonFlag ? { json, ...combinedFlags } : combinedFlags);
|
|
12
|
+
}
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.cacheCommand = cacheCommand;
|
|
4
|
+
const aggregate_flags_1 = require("./aggregate-flags");
|
|
5
|
+
const cache_default_value_1 = require("./cache-default-value");
|
|
6
|
+
const ensure_arg_object_1 = require("./ensure-arg-object");
|
|
7
|
+
const util_1 = require("./util");
|
|
8
|
+
// In order to collect static properties up the inheritance chain, we need to recursively
|
|
9
|
+
// access the prototypes until there's nothing left. This allows us to combine baseFlags
|
|
10
|
+
// and flags as well as add in the json flag if enableJsonFlag is enabled.
|
|
11
|
+
function mergePrototype(result, cmd) {
|
|
12
|
+
const proto = Object.getPrototypeOf(cmd);
|
|
13
|
+
const filteredProto = (0, util_1.pickBy)(proto, (v) => v !== undefined);
|
|
14
|
+
return Object.keys(proto).length > 0 ? mergePrototype({ ...filteredProto, ...result }, proto) : result;
|
|
15
|
+
}
|
|
16
|
+
async function cacheFlags(cmdFlags, respectNoCacheDefault) {
|
|
17
|
+
const promises = Object.entries(cmdFlags).map(async ([name, flag]) => [
|
|
18
|
+
name,
|
|
19
|
+
{
|
|
20
|
+
aliases: flag.aliases,
|
|
21
|
+
char: flag.char,
|
|
22
|
+
charAliases: flag.charAliases,
|
|
23
|
+
combinable: flag.combinable,
|
|
24
|
+
dependsOn: flag.dependsOn,
|
|
25
|
+
deprecateAliases: flag.deprecateAliases,
|
|
26
|
+
deprecated: flag.deprecated,
|
|
27
|
+
description: flag.description,
|
|
28
|
+
env: flag.env,
|
|
29
|
+
exclusive: flag.exclusive,
|
|
30
|
+
helpGroup: flag.helpGroup,
|
|
31
|
+
helpLabel: flag.helpLabel,
|
|
32
|
+
hidden: flag.hidden,
|
|
33
|
+
name,
|
|
34
|
+
noCacheDefault: flag.noCacheDefault,
|
|
35
|
+
relationships: flag.relationships,
|
|
36
|
+
required: flag.required,
|
|
37
|
+
summary: flag.summary,
|
|
38
|
+
...(flag.type === 'boolean'
|
|
39
|
+
? {
|
|
40
|
+
allowNo: flag.allowNo,
|
|
41
|
+
type: flag.type,
|
|
42
|
+
}
|
|
43
|
+
: {
|
|
44
|
+
default: await (0, cache_default_value_1.cacheDefaultValue)(flag, respectNoCacheDefault),
|
|
45
|
+
delimiter: flag.delimiter,
|
|
46
|
+
hasDynamicHelp: typeof flag.defaultHelp === 'function',
|
|
47
|
+
helpValue: flag.helpValue,
|
|
48
|
+
multiple: flag.multiple,
|
|
49
|
+
options: flag.options,
|
|
50
|
+
type: flag.type,
|
|
51
|
+
}),
|
|
52
|
+
},
|
|
53
|
+
]);
|
|
54
|
+
return Object.fromEntries(await Promise.all(promises));
|
|
55
|
+
}
|
|
56
|
+
async function cacheArgs(cmdArgs, respectNoCacheDefault) {
|
|
57
|
+
const promises = Object.entries(cmdArgs).map(async ([name, arg]) => [
|
|
58
|
+
name,
|
|
59
|
+
{
|
|
60
|
+
default: await (0, cache_default_value_1.cacheDefaultValue)(arg, respectNoCacheDefault),
|
|
61
|
+
description: arg.description,
|
|
62
|
+
hidden: arg.hidden,
|
|
63
|
+
multiple: arg.multiple,
|
|
64
|
+
name,
|
|
65
|
+
noCacheDefault: arg.noCacheDefault,
|
|
66
|
+
options: arg.options,
|
|
67
|
+
required: arg.required,
|
|
68
|
+
},
|
|
69
|
+
]);
|
|
70
|
+
return Object.fromEntries(await Promise.all(promises));
|
|
71
|
+
}
|
|
72
|
+
async function cacheCommand(uncachedCmd, plugin, respectNoCacheDefault = false) {
|
|
73
|
+
const cmd = mergePrototype(uncachedCmd, uncachedCmd);
|
|
74
|
+
// @ts-expect-error because v2 commands have flags stored in _flags
|
|
75
|
+
const uncachedFlags = cmd.flags ?? cmd._flags;
|
|
76
|
+
// @ts-expect-error because v2 commands have base flags stored in _baseFlags
|
|
77
|
+
const uncachedBaseFlags = cmd.baseFlags ?? cmd._baseFlags;
|
|
78
|
+
const [flags, args] = await Promise.all([
|
|
79
|
+
cacheFlags((0, aggregate_flags_1.aggregateFlags)(uncachedFlags, uncachedBaseFlags, cmd.enableJsonFlag), respectNoCacheDefault),
|
|
80
|
+
cacheArgs((0, ensure_arg_object_1.ensureArgObject)(cmd.args), respectNoCacheDefault),
|
|
81
|
+
]);
|
|
82
|
+
const stdProperties = {
|
|
83
|
+
// Replace all spaces in aliases with colons to standardize them.
|
|
84
|
+
aliases: (cmd.aliases ?? []).map((a) => a.replaceAll(' ', ':')),
|
|
85
|
+
args,
|
|
86
|
+
deprecateAliases: cmd.deprecateAliases,
|
|
87
|
+
deprecationOptions: cmd.deprecationOptions,
|
|
88
|
+
description: cmd.description,
|
|
89
|
+
// Support both `examples` and `example` for backwards compatibility.
|
|
90
|
+
examples: cmd.examples ?? cmd.example,
|
|
91
|
+
flags,
|
|
92
|
+
hasDynamicHelp: Object.values(flags).some((f) => f.hasDynamicHelp),
|
|
93
|
+
hidden: cmd.hidden,
|
|
94
|
+
hiddenAliases: cmd.hiddenAliases ?? [],
|
|
95
|
+
id: cmd.id,
|
|
96
|
+
pluginAlias: plugin && plugin.alias,
|
|
97
|
+
pluginName: plugin && plugin.name,
|
|
98
|
+
pluginType: plugin && plugin.type,
|
|
99
|
+
state: cmd.state,
|
|
100
|
+
strict: cmd.strict,
|
|
101
|
+
summary: cmd.summary,
|
|
102
|
+
usage: cmd.usage,
|
|
103
|
+
};
|
|
104
|
+
// do not include these properties in manifest
|
|
105
|
+
const ignoreCommandProperties = [
|
|
106
|
+
'plugin',
|
|
107
|
+
'_flags',
|
|
108
|
+
'_enableJsonFlag',
|
|
109
|
+
'_globalFlags',
|
|
110
|
+
'_baseFlags',
|
|
111
|
+
'baseFlags',
|
|
112
|
+
'_--',
|
|
113
|
+
'_base',
|
|
114
|
+
];
|
|
115
|
+
// Add in any additional properties that are not standard command properties.
|
|
116
|
+
const stdKeysAndIgnored = new Set([...ignoreCommandProperties, ...Object.keys(stdProperties)]);
|
|
117
|
+
const keysToAdd = Object.keys(cmd).filter((property) => !stdKeysAndIgnored.has(property));
|
|
118
|
+
const additionalProperties = Object.fromEntries(keysToAdd.map((key) => [key, cmd[key]]));
|
|
119
|
+
return { ...stdProperties, ...additionalProperties };
|
|
120
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.cacheDefaultValue = void 0;
|
|
4
|
+
// when no manifest exists, the default is calculated. This may throw, so we need to catch it
|
|
5
|
+
const cacheDefaultValue = async (flagOrArg, respectNoCacheDefault) => {
|
|
6
|
+
if (respectNoCacheDefault && flagOrArg.noCacheDefault)
|
|
7
|
+
return;
|
|
8
|
+
// Prefer the defaultHelp function (returns a friendly string for complex types)
|
|
9
|
+
if (typeof flagOrArg.defaultHelp === 'function') {
|
|
10
|
+
try {
|
|
11
|
+
return await flagOrArg.defaultHelp({ flags: {}, options: flagOrArg });
|
|
12
|
+
}
|
|
13
|
+
catch {
|
|
14
|
+
return;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
// if not specified, try the default function
|
|
18
|
+
if (typeof flagOrArg.default === 'function') {
|
|
19
|
+
try {
|
|
20
|
+
return await flagOrArg.default({ flags: {}, options: flagOrArg });
|
|
21
|
+
}
|
|
22
|
+
catch { }
|
|
23
|
+
}
|
|
24
|
+
else {
|
|
25
|
+
return flagOrArg.default;
|
|
26
|
+
}
|
|
27
|
+
};
|
|
28
|
+
exports.cacheDefaultValue = cacheDefaultValue;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Command } from '../command';
|
|
2
|
+
/**
|
|
3
|
+
* This function is responsible for locating the correct plugin to use for a named command id
|
|
4
|
+
* It searches the {Config} registered commands to match either the raw command id or the command alias
|
|
5
|
+
* It is possible that more than one command will be found. This is due the ability of two distinct plugins to
|
|
6
|
+
* create the same command or command alias.
|
|
7
|
+
*
|
|
8
|
+
* In the case of more than one found command, the function will select the command based on the order in which
|
|
9
|
+
* the plugin is included in the package.json `oclif.plugins` list. The command that occurs first in the list
|
|
10
|
+
* is selected as the command to run.
|
|
11
|
+
*
|
|
12
|
+
* Commands can also be present from either an install or a link. When a command is one of these and a core plugin
|
|
13
|
+
* is present, this function defers to the core plugin.
|
|
14
|
+
*
|
|
15
|
+
* If there is not a core plugin command present, this function will return the first
|
|
16
|
+
* plugin as discovered (will not change the order)
|
|
17
|
+
*/
|
|
18
|
+
export declare function determinePriority(plugins: string[], commands: Command.Loadable[]): Command.Loadable;
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.determinePriority = determinePriority;
|
|
4
|
+
/**
|
|
5
|
+
* This function is responsible for locating the correct plugin to use for a named command id
|
|
6
|
+
* It searches the {Config} registered commands to match either the raw command id or the command alias
|
|
7
|
+
* It is possible that more than one command will be found. This is due the ability of two distinct plugins to
|
|
8
|
+
* create the same command or command alias.
|
|
9
|
+
*
|
|
10
|
+
* In the case of more than one found command, the function will select the command based on the order in which
|
|
11
|
+
* the plugin is included in the package.json `oclif.plugins` list. The command that occurs first in the list
|
|
12
|
+
* is selected as the command to run.
|
|
13
|
+
*
|
|
14
|
+
* Commands can also be present from either an install or a link. When a command is one of these and a core plugin
|
|
15
|
+
* is present, this function defers to the core plugin.
|
|
16
|
+
*
|
|
17
|
+
* If there is not a core plugin command present, this function will return the first
|
|
18
|
+
* plugin as discovered (will not change the order)
|
|
19
|
+
*/
|
|
20
|
+
function determinePriority(plugins, commands) {
|
|
21
|
+
const commandPlugins = commands.sort((a, b) => {
|
|
22
|
+
const pluginAliasA = a.pluginAlias ?? 'A-Cannot-Find-This';
|
|
23
|
+
const pluginAliasB = b.pluginAlias ?? 'B-Cannot-Find-This';
|
|
24
|
+
const aIndex = plugins.indexOf(pluginAliasA);
|
|
25
|
+
const bIndex = plugins.indexOf(pluginAliasB);
|
|
26
|
+
// When both plugin types are 'core' plugins sort based on index
|
|
27
|
+
if (a.pluginType === 'core' && b.pluginType === 'core') {
|
|
28
|
+
// If b appears first in the pjson.plugins sort it first
|
|
29
|
+
return aIndex - bIndex;
|
|
30
|
+
}
|
|
31
|
+
// if b is a core plugin and a is not sort b first
|
|
32
|
+
if (b.pluginType === 'core' && a.pluginType !== 'core') {
|
|
33
|
+
return 1;
|
|
34
|
+
}
|
|
35
|
+
// if a is a core plugin and b is not sort a first
|
|
36
|
+
if (a.pluginType === 'core' && b.pluginType !== 'core') {
|
|
37
|
+
return -1;
|
|
38
|
+
}
|
|
39
|
+
// if a is a jit plugin and b is not sort b first
|
|
40
|
+
if (a.pluginType === 'jit' && b.pluginType !== 'jit') {
|
|
41
|
+
return 1;
|
|
42
|
+
}
|
|
43
|
+
// if b is a jit plugin and a is not sort a first
|
|
44
|
+
if (b.pluginType === 'jit' && a.pluginType !== 'jit') {
|
|
45
|
+
return -1;
|
|
46
|
+
}
|
|
47
|
+
// neither plugin is core, so do not change the order
|
|
48
|
+
return 0;
|
|
49
|
+
});
|
|
50
|
+
return commandPlugins[0];
|
|
51
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Command } from '../command';
|
|
2
|
+
import { ArgInput } from '../interfaces/parser';
|
|
3
|
+
/**
|
|
4
|
+
* Ensure that the provided args are an object. This is for backwards compatibility with v1 commands which
|
|
5
|
+
* defined args as an array.
|
|
6
|
+
*
|
|
7
|
+
* @param args Either an array of args or an object of args
|
|
8
|
+
* @returns ArgInput
|
|
9
|
+
*/
|
|
10
|
+
export declare function ensureArgObject(args?: {
|
|
11
|
+
[name: string]: Command.Arg.Cached;
|
|
12
|
+
} | ArgInput | any[]): ArgInput;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ensureArgObject = ensureArgObject;
|
|
4
|
+
/**
|
|
5
|
+
* Ensure that the provided args are an object. This is for backwards compatibility with v1 commands which
|
|
6
|
+
* defined args as an array.
|
|
7
|
+
*
|
|
8
|
+
* @param args Either an array of args or an object of args
|
|
9
|
+
* @returns ArgInput
|
|
10
|
+
*/
|
|
11
|
+
function ensureArgObject(args) {
|
|
12
|
+
return (Array.isArray(args) ? (args ?? []).reduce((x, y) => ({ ...x, [y.name]: y }), {}) : args ?? {});
|
|
13
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export declare function debug(...scope: string[]): (..._: any) => void;
|
|
2
|
+
/**
|
|
3
|
+
* Returns the root directory of the plugin.
|
|
4
|
+
*
|
|
5
|
+
* It first attempts to use require.resolve to find the plugin root.
|
|
6
|
+
* If that returns a path, it will `cd` up the file system until if finds the package.json for the plugin
|
|
7
|
+
* Example: node_modules/@oclif/plugin-version/dist/index.js -> node_modules/@oclif/plugin-version
|
|
8
|
+
*
|
|
9
|
+
* If require.resolve throws an error, it will attempt to find the plugin root by traversing the file system.
|
|
10
|
+
* If we're in a PnP environment (determined by process.versions.pnp), it will use the pnpapi module to
|
|
11
|
+
* traverse the dependency tree. Otherwise, it will traverse the node_modules until it finds a package.json
|
|
12
|
+
* with a matching name.
|
|
13
|
+
*
|
|
14
|
+
* If no path is found, undefined is returned which will eventually result in a thrown Error from Plugin.
|
|
15
|
+
*/
|
|
16
|
+
export declare function findRoot(name: string | undefined, root: string): Promise<string | undefined>;
|
|
@@ -0,0 +1,185 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.debug = debug;
|
|
4
|
+
exports.findRoot = findRoot;
|
|
5
|
+
const node_path_1 = require("node:path");
|
|
6
|
+
const logger_1 = require("../logger");
|
|
7
|
+
const fs_1 = require("./fs");
|
|
8
|
+
function debug(...scope) {
|
|
9
|
+
return (formatter, ...args) => (0, logger_1.getLogger)(['find-root', ...scope].join(':')).debug(formatter, ...args);
|
|
10
|
+
}
|
|
11
|
+
// essentially just "cd .."
|
|
12
|
+
function* up(from) {
|
|
13
|
+
while ((0, node_path_1.dirname)(from) !== from) {
|
|
14
|
+
yield from;
|
|
15
|
+
from = (0, node_path_1.dirname)(from);
|
|
16
|
+
}
|
|
17
|
+
yield from;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Return the plugin root directory from a given file. This will `cd` up the file system until it finds
|
|
21
|
+
* a package.json and then return the dirname of that path.
|
|
22
|
+
*
|
|
23
|
+
* Example: node_modules/@oclif/plugin-version/dist/index.js -> node_modules/@oclif/plugin-version
|
|
24
|
+
*/
|
|
25
|
+
async function findPluginRoot(root, name) {
|
|
26
|
+
// If we know the plugin name then we just need to traverse the file
|
|
27
|
+
// system until we find the directory that matches the plugin name.
|
|
28
|
+
debug(name ?? 'root-plugin')(`Finding root starting at ${root}`);
|
|
29
|
+
if (name) {
|
|
30
|
+
for (const next of up(root)) {
|
|
31
|
+
if (next.endsWith((0, node_path_1.basename)(name))) {
|
|
32
|
+
debug(name)('Found root based on plugin name!');
|
|
33
|
+
return next;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
// If there's no plugin name (typically just the root plugin), then we need
|
|
38
|
+
// to traverse the file system until we find a directory with a package.json
|
|
39
|
+
for (const next of up(root)) {
|
|
40
|
+
// Skip the bin directory
|
|
41
|
+
if ((0, node_path_1.basename)((0, node_path_1.dirname)(next)) === 'bin' &&
|
|
42
|
+
['dev', 'dev.cmd', 'dev.js', 'run', 'run.cmd', 'run.js'].includes((0, node_path_1.basename)(next))) {
|
|
43
|
+
continue;
|
|
44
|
+
}
|
|
45
|
+
try {
|
|
46
|
+
const cur = (0, node_path_1.join)(next, 'package.json');
|
|
47
|
+
debug(name ?? 'root-plugin')(`Checking ${cur}`);
|
|
48
|
+
if (await (0, fs_1.safeReadJson)(cur)) {
|
|
49
|
+
debug(name ?? 'root-plugin')('Found root by traversing up from starting point!');
|
|
50
|
+
return (0, node_path_1.dirname)(cur);
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
catch { }
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* Find plugin root directory for plugins installed into node_modules that don't have a `main` or `export`.
|
|
58
|
+
* This will go up directories until it finds a directory with the plugin installed into it.
|
|
59
|
+
*
|
|
60
|
+
* See https://github.com/oclif/config/pull/289#issuecomment-983904051
|
|
61
|
+
*/
|
|
62
|
+
async function findRootLegacy(name, root) {
|
|
63
|
+
debug(name ?? 'root-plugin')('Finding root using legacy method');
|
|
64
|
+
for (const next of up(root)) {
|
|
65
|
+
let cur;
|
|
66
|
+
if (name) {
|
|
67
|
+
cur = (0, node_path_1.join)(next, 'node_modules', name, 'package.json');
|
|
68
|
+
if (await (0, fs_1.safeReadJson)(cur))
|
|
69
|
+
return (0, node_path_1.dirname)(cur);
|
|
70
|
+
const pkg = await (0, fs_1.safeReadJson)((0, node_path_1.join)(next, 'package.json'));
|
|
71
|
+
if (pkg?.name === name)
|
|
72
|
+
return next;
|
|
73
|
+
}
|
|
74
|
+
else {
|
|
75
|
+
cur = (0, node_path_1.join)(next, 'package.json');
|
|
76
|
+
if (await (0, fs_1.safeReadJson)(cur))
|
|
77
|
+
return (0, node_path_1.dirname)(cur);
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
let pnp;
|
|
82
|
+
/**
|
|
83
|
+
* The pnpapi module is only available if running in a pnp environment. Because of that
|
|
84
|
+
* we have to require it from the plugin.
|
|
85
|
+
*
|
|
86
|
+
* Solution taken from here: https://github.com/yarnpkg/berry/issues/1467#issuecomment-642869600
|
|
87
|
+
*/
|
|
88
|
+
function maybeRequirePnpApi(root) {
|
|
89
|
+
if (pnp)
|
|
90
|
+
return pnp;
|
|
91
|
+
try {
|
|
92
|
+
// eslint-disable-next-line n/no-missing-require
|
|
93
|
+
pnp = require(require.resolve('pnpapi', { paths: [root] }));
|
|
94
|
+
return pnp;
|
|
95
|
+
}
|
|
96
|
+
catch { }
|
|
97
|
+
}
|
|
98
|
+
const getKey = (locator) => JSON.stringify(locator);
|
|
99
|
+
const isPeerDependency = (pkg, parentPkg, name) => getKey(pkg?.packageDependencies.get(name)) === getKey(parentPkg?.packageDependencies.get(name));
|
|
100
|
+
/**
|
|
101
|
+
* Traverse PnP dependency tree to find plugin root directory.
|
|
102
|
+
*
|
|
103
|
+
* Implementation adapted from https://yarnpkg.com/advanced/pnpapi#traversing-the-dependency-tree
|
|
104
|
+
*/
|
|
105
|
+
function findPnpRoot(name, root) {
|
|
106
|
+
maybeRequirePnpApi(root);
|
|
107
|
+
if (!pnp)
|
|
108
|
+
return;
|
|
109
|
+
debug(name)('Finding root for using pnp method');
|
|
110
|
+
const seen = new Set();
|
|
111
|
+
const traverseDependencyTree = (locator, parentPkg) => {
|
|
112
|
+
// Prevent infinite recursion when A depends on B which depends on A
|
|
113
|
+
const key = getKey(locator);
|
|
114
|
+
if (seen.has(key))
|
|
115
|
+
return;
|
|
116
|
+
const pkg = pnp.getPackageInformation(locator);
|
|
117
|
+
if (locator.name === name) {
|
|
118
|
+
return pkg.packageLocation;
|
|
119
|
+
}
|
|
120
|
+
seen.add(key);
|
|
121
|
+
for (const [name, referencish] of pkg.packageDependencies) {
|
|
122
|
+
// Unmet peer dependencies
|
|
123
|
+
if (referencish === null)
|
|
124
|
+
continue;
|
|
125
|
+
// Avoid iterating on peer dependencies - very expensive
|
|
126
|
+
if (parentPkg !== null && isPeerDependency(pkg, parentPkg, name))
|
|
127
|
+
continue;
|
|
128
|
+
const childLocator = pnp.getLocator(name, referencish);
|
|
129
|
+
const foundSomething = traverseDependencyTree(childLocator, pkg);
|
|
130
|
+
if (foundSomething)
|
|
131
|
+
return foundSomething;
|
|
132
|
+
}
|
|
133
|
+
// Important: This `delete` here causes the traversal to go over nodes even
|
|
134
|
+
// if they have already been traversed in another branch. If you don't need
|
|
135
|
+
// that, remove this line for a hefty speed increase.
|
|
136
|
+
seen.delete(key);
|
|
137
|
+
};
|
|
138
|
+
// Iterate on each workspace
|
|
139
|
+
for (const locator of pnp.getDependencyTreeRoots()) {
|
|
140
|
+
const foundSomething = traverseDependencyTree(locator);
|
|
141
|
+
if (foundSomething)
|
|
142
|
+
return foundSomething;
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
/**
|
|
146
|
+
* Returns the root directory of the plugin.
|
|
147
|
+
*
|
|
148
|
+
* It first attempts to use require.resolve to find the plugin root.
|
|
149
|
+
* If that returns a path, it will `cd` up the file system until if finds the package.json for the plugin
|
|
150
|
+
* Example: node_modules/@oclif/plugin-version/dist/index.js -> node_modules/@oclif/plugin-version
|
|
151
|
+
*
|
|
152
|
+
* If require.resolve throws an error, it will attempt to find the plugin root by traversing the file system.
|
|
153
|
+
* If we're in a PnP environment (determined by process.versions.pnp), it will use the pnpapi module to
|
|
154
|
+
* traverse the dependency tree. Otherwise, it will traverse the node_modules until it finds a package.json
|
|
155
|
+
* with a matching name.
|
|
156
|
+
*
|
|
157
|
+
* If no path is found, undefined is returned which will eventually result in a thrown Error from Plugin.
|
|
158
|
+
*/
|
|
159
|
+
async function findRoot(name, root) {
|
|
160
|
+
if (name) {
|
|
161
|
+
debug(name)(`Finding root using ${root}`);
|
|
162
|
+
let pkgPath;
|
|
163
|
+
try {
|
|
164
|
+
pkgPath = require.resolve(name, { paths: [root] });
|
|
165
|
+
debug(name)(`Found starting point with require.resolve`);
|
|
166
|
+
}
|
|
167
|
+
catch {
|
|
168
|
+
debug(name)(`require.resolve could not find plugin starting point`);
|
|
169
|
+
}
|
|
170
|
+
if (pkgPath) {
|
|
171
|
+
const found = await findPluginRoot((0, node_path_1.dirname)(pkgPath), name);
|
|
172
|
+
if (found) {
|
|
173
|
+
debug(name)(`Found root at ${found}`);
|
|
174
|
+
return found;
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
const found = process.versions.pnp ? findPnpRoot(name, root) : await findRootLegacy(name, root);
|
|
178
|
+
debug(name)(found ? `Found root at ${found}` : 'No root found!');
|
|
179
|
+
return found;
|
|
180
|
+
}
|
|
181
|
+
debug('root-plugin')(`Finding root plugin using ${root}`);
|
|
182
|
+
const found = await findPluginRoot(root);
|
|
183
|
+
debug('root-plugin')(found ? `Found root at ${found}` : 'No root found!');
|
|
184
|
+
return found;
|
|
185
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Parser for Args.directory and Flags.directory. Checks that the provided path
|
|
3
|
+
* exists and is a directory.
|
|
4
|
+
* @param input flag or arg input
|
|
5
|
+
* @returns Promise<string>
|
|
6
|
+
*/
|
|
7
|
+
export declare const dirExists: (input: string) => Promise<string>;
|
|
8
|
+
/**
|
|
9
|
+
* Parser for Args.file and Flags.file. Checks that the provided path
|
|
10
|
+
* exists and is a file.
|
|
11
|
+
* @param input flag or arg input
|
|
12
|
+
* @returns Promise<string>
|
|
13
|
+
*/
|
|
14
|
+
export declare const fileExists: (input: string) => Promise<string>;
|
|
15
|
+
/**
|
|
16
|
+
* Read a file from disk and cache its contents if in production environment.
|
|
17
|
+
*
|
|
18
|
+
* Will throw an error if the file does not exist.
|
|
19
|
+
*
|
|
20
|
+
* @param path file path of JSON file
|
|
21
|
+
* @param useCache if false, ignore cache and read file from disk
|
|
22
|
+
* @returns <T>
|
|
23
|
+
*/
|
|
24
|
+
export declare function readJson<T = unknown>(path: string, useCache?: boolean): Promise<T>;
|
|
25
|
+
/**
|
|
26
|
+
* Safely read a file from disk and cache its contents if in production environment.
|
|
27
|
+
*
|
|
28
|
+
* Will return undefined if the file does not exist.
|
|
29
|
+
*
|
|
30
|
+
* @param path file path of JSON file
|
|
31
|
+
* @param useCache if false, ignore cache and read file from disk
|
|
32
|
+
* @returns <T> or undefined
|
|
33
|
+
*/
|
|
34
|
+
export declare function safeReadJson<T>(path: string, useCache?: boolean): Promise<T | undefined>;
|
|
35
|
+
export declare function existsSync(path: string): boolean;
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.fileExists = exports.dirExists = void 0;
|
|
4
|
+
exports.readJson = readJson;
|
|
5
|
+
exports.safeReadJson = safeReadJson;
|
|
6
|
+
exports.existsSync = existsSync;
|
|
7
|
+
const node_fs_1 = require("node:fs");
|
|
8
|
+
const promises_1 = require("node:fs/promises");
|
|
9
|
+
const util_1 = require("./util");
|
|
10
|
+
/**
|
|
11
|
+
* Parser for Args.directory and Flags.directory. Checks that the provided path
|
|
12
|
+
* exists and is a directory.
|
|
13
|
+
* @param input flag or arg input
|
|
14
|
+
* @returns Promise<string>
|
|
15
|
+
*/
|
|
16
|
+
const dirExists = async (input) => {
|
|
17
|
+
let dirStat;
|
|
18
|
+
try {
|
|
19
|
+
dirStat = await (0, promises_1.stat)(input);
|
|
20
|
+
}
|
|
21
|
+
catch {
|
|
22
|
+
throw new Error(`No directory found at ${input}`);
|
|
23
|
+
}
|
|
24
|
+
if (!dirStat.isDirectory()) {
|
|
25
|
+
throw new Error(`${input} exists but is not a directory`);
|
|
26
|
+
}
|
|
27
|
+
return input;
|
|
28
|
+
};
|
|
29
|
+
exports.dirExists = dirExists;
|
|
30
|
+
/**
|
|
31
|
+
* Parser for Args.file and Flags.file. Checks that the provided path
|
|
32
|
+
* exists and is a file.
|
|
33
|
+
* @param input flag or arg input
|
|
34
|
+
* @returns Promise<string>
|
|
35
|
+
*/
|
|
36
|
+
const fileExists = async (input) => {
|
|
37
|
+
let fileStat;
|
|
38
|
+
try {
|
|
39
|
+
fileStat = await (0, promises_1.stat)(input);
|
|
40
|
+
}
|
|
41
|
+
catch {
|
|
42
|
+
throw new Error(`No file found at ${input}`);
|
|
43
|
+
}
|
|
44
|
+
if (!fileStat.isFile()) {
|
|
45
|
+
throw new Error(`${input} exists but is not a file`);
|
|
46
|
+
}
|
|
47
|
+
return input;
|
|
48
|
+
};
|
|
49
|
+
exports.fileExists = fileExists;
|
|
50
|
+
class ProdOnlyCache extends Map {
|
|
51
|
+
set(key, value) {
|
|
52
|
+
if ((0, util_1.isProd)() ?? false) {
|
|
53
|
+
super.set(key, value);
|
|
54
|
+
}
|
|
55
|
+
return this;
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
const cache = new ProdOnlyCache();
|
|
59
|
+
/**
|
|
60
|
+
* Read a file from disk and cache its contents if in production environment.
|
|
61
|
+
*
|
|
62
|
+
* Will throw an error if the file does not exist.
|
|
63
|
+
*
|
|
64
|
+
* @param path file path of JSON file
|
|
65
|
+
* @param useCache if false, ignore cache and read file from disk
|
|
66
|
+
* @returns <T>
|
|
67
|
+
*/
|
|
68
|
+
async function readJson(path, useCache = true) {
|
|
69
|
+
if (useCache && cache.has(path)) {
|
|
70
|
+
return JSON.parse(cache.get(path));
|
|
71
|
+
}
|
|
72
|
+
const contents = await (0, promises_1.readFile)(path, 'utf8');
|
|
73
|
+
cache.set(path, contents);
|
|
74
|
+
return JSON.parse(contents);
|
|
75
|
+
}
|
|
76
|
+
/**
|
|
77
|
+
* Safely read a file from disk and cache its contents if in production environment.
|
|
78
|
+
*
|
|
79
|
+
* Will return undefined if the file does not exist.
|
|
80
|
+
*
|
|
81
|
+
* @param path file path of JSON file
|
|
82
|
+
* @param useCache if false, ignore cache and read file from disk
|
|
83
|
+
* @returns <T> or undefined
|
|
84
|
+
*/
|
|
85
|
+
async function safeReadJson(path, useCache = true) {
|
|
86
|
+
try {
|
|
87
|
+
return await readJson(path, useCache);
|
|
88
|
+
}
|
|
89
|
+
catch { }
|
|
90
|
+
}
|
|
91
|
+
function existsSync(path) {
|
|
92
|
+
return (0, node_fs_1.existsSync)(path);
|
|
93
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.toStandardizedId = toStandardizedId;
|
|
4
|
+
exports.toConfiguredId = toConfiguredId;
|
|
5
|
+
function toStandardizedId(commandID, config) {
|
|
6
|
+
return commandID.replaceAll(new RegExp(config.topicSeparator, 'g'), ':');
|
|
7
|
+
}
|
|
8
|
+
function toConfiguredId(commandID, config) {
|
|
9
|
+
const defaultTopicSeparator = ':';
|
|
10
|
+
return commandID.replaceAll(new RegExp(defaultTopicSeparator, 'g'), config.topicSeparator || defaultTopicSeparator);
|
|
11
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Call os.homedir() and return the result
|
|
3
|
+
*
|
|
4
|
+
* Wrapping this allows us to stub these in tests since os.homedir() is
|
|
5
|
+
* non-configurable and non-writable.
|
|
6
|
+
*
|
|
7
|
+
* @returns The user's home directory
|
|
8
|
+
*/
|
|
9
|
+
export declare function getHomeDir(): string;
|
|
10
|
+
/**
|
|
11
|
+
* Call os.platform() and return the result
|
|
12
|
+
*
|
|
13
|
+
* Wrapping this allows us to stub these in tests since os.platform() is
|
|
14
|
+
* non-configurable and non-writable.
|
|
15
|
+
*
|
|
16
|
+
* @returns The process' platform
|
|
17
|
+
*/
|
|
18
|
+
export declare function getPlatform(): Promise<'wsl' | NodeJS.Platform>;
|
|
19
|
+
export declare function getShell(): Promise<string>;
|