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,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.tsPath = exports.Plugin = exports.Config = void 0;
|
|
4
|
+
var config_1 = require("./config");
|
|
5
|
+
Object.defineProperty(exports, "Config", { enumerable: true, get: function () { return config_1.Config; } });
|
|
6
|
+
var plugin_1 = require("./plugin");
|
|
7
|
+
Object.defineProperty(exports, "Plugin", { enumerable: true, get: function () { return plugin_1.Plugin; } });
|
|
8
|
+
var ts_path_1 = require("./ts-path");
|
|
9
|
+
Object.defineProperty(exports, "tsPath", { enumerable: true, get: function () { return ts_path_1.tsPath; } });
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { PJSON } from '../interfaces';
|
|
2
|
+
import { Plugin as IPlugin } from '../interfaces/plugin';
|
|
3
|
+
type PluginLoaderOptions = {
|
|
4
|
+
plugins?: IPlugin[] | PluginsMap | undefined;
|
|
5
|
+
root: string;
|
|
6
|
+
};
|
|
7
|
+
type LoadOpts = {
|
|
8
|
+
dataDir: string;
|
|
9
|
+
devPlugins?: boolean | undefined;
|
|
10
|
+
force?: boolean | undefined;
|
|
11
|
+
rootPlugin: IPlugin;
|
|
12
|
+
userPlugins?: boolean | undefined;
|
|
13
|
+
pluginAdditions?: {
|
|
14
|
+
core?: string[];
|
|
15
|
+
dev?: string[];
|
|
16
|
+
path?: string;
|
|
17
|
+
} | undefined;
|
|
18
|
+
};
|
|
19
|
+
type PluginsMap = Map<string, IPlugin>;
|
|
20
|
+
export default class PluginLoader {
|
|
21
|
+
options: PluginLoaderOptions;
|
|
22
|
+
errors: (Error | string)[];
|
|
23
|
+
plugins: PluginsMap;
|
|
24
|
+
private pluginsProvided;
|
|
25
|
+
constructor(options: PluginLoaderOptions);
|
|
26
|
+
loadChildren(opts: LoadOpts): Promise<{
|
|
27
|
+
errors: (Error | string)[];
|
|
28
|
+
plugins: PluginsMap;
|
|
29
|
+
}>;
|
|
30
|
+
loadRoot({ pjson }: {
|
|
31
|
+
pjson?: PJSON | undefined;
|
|
32
|
+
}): Promise<IPlugin>;
|
|
33
|
+
private loadCorePlugins;
|
|
34
|
+
private loadDevPlugins;
|
|
35
|
+
private loadPlugins;
|
|
36
|
+
private loadUserPlugins;
|
|
37
|
+
}
|
|
38
|
+
export {};
|
|
@@ -0,0 +1,188 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const minimatch_1 = require("minimatch");
|
|
4
|
+
const node_path_1 = require("node:path");
|
|
5
|
+
const performance_1 = require("../performance");
|
|
6
|
+
const fs_1 = require("../util/fs");
|
|
7
|
+
const util_1 = require("../util/util");
|
|
8
|
+
const plugin_1 = require("./plugin");
|
|
9
|
+
const util_2 = require("./util");
|
|
10
|
+
const debug = (0, util_2.makeDebug)();
|
|
11
|
+
function findMatchingDependencies(dependencies, patterns) {
|
|
12
|
+
return Object.keys(dependencies).filter((p) => patterns.some((w) => (0, minimatch_1.minimatch)(p, w)));
|
|
13
|
+
}
|
|
14
|
+
class PluginLoader {
|
|
15
|
+
options;
|
|
16
|
+
errors = [];
|
|
17
|
+
plugins = new Map();
|
|
18
|
+
pluginsProvided = false;
|
|
19
|
+
constructor(options) {
|
|
20
|
+
this.options = options;
|
|
21
|
+
if (options.plugins) {
|
|
22
|
+
this.pluginsProvided = true;
|
|
23
|
+
this.plugins = Array.isArray(options.plugins) ? new Map(options.plugins.map((p) => [p.name, p])) : options.plugins;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
async loadChildren(opts) {
|
|
27
|
+
if (!this.pluginsProvided || opts.force) {
|
|
28
|
+
await this.loadUserPlugins(opts);
|
|
29
|
+
await this.loadDevPlugins(opts);
|
|
30
|
+
await this.loadCorePlugins(opts);
|
|
31
|
+
}
|
|
32
|
+
return { errors: this.errors, plugins: this.plugins };
|
|
33
|
+
}
|
|
34
|
+
async loadRoot({ pjson }) {
|
|
35
|
+
let rootPlugin;
|
|
36
|
+
if (this.pluginsProvided) {
|
|
37
|
+
const plugins = [...this.plugins.values()];
|
|
38
|
+
rootPlugin = plugins.find((p) => p.root === this.options.root) ?? plugins[0];
|
|
39
|
+
}
|
|
40
|
+
else {
|
|
41
|
+
const marker = performance_1.Performance.mark(performance_1.OCLIF_MARKER_OWNER, 'plugin.load#root');
|
|
42
|
+
rootPlugin = new plugin_1.Plugin({ isRoot: true, pjson, root: this.options.root });
|
|
43
|
+
await rootPlugin.load();
|
|
44
|
+
marker?.addDetails({
|
|
45
|
+
commandCount: rootPlugin.commands.length,
|
|
46
|
+
hasManifest: rootPlugin.hasManifest ?? false,
|
|
47
|
+
name: rootPlugin.name,
|
|
48
|
+
topicCount: rootPlugin.topics.length,
|
|
49
|
+
type: rootPlugin.type,
|
|
50
|
+
usesMain: Boolean(rootPlugin.pjson.main),
|
|
51
|
+
});
|
|
52
|
+
marker?.stop();
|
|
53
|
+
}
|
|
54
|
+
this.plugins.set(rootPlugin.name, rootPlugin);
|
|
55
|
+
return rootPlugin;
|
|
56
|
+
}
|
|
57
|
+
async loadCorePlugins(opts) {
|
|
58
|
+
const { plugins: corePlugins } = opts.rootPlugin.pjson.oclif;
|
|
59
|
+
if (corePlugins) {
|
|
60
|
+
const plugins = findMatchingDependencies(opts.rootPlugin.pjson.dependencies ?? {}, corePlugins);
|
|
61
|
+
await this.loadPlugins(opts.rootPlugin.root, 'core', plugins);
|
|
62
|
+
}
|
|
63
|
+
const { core: pluginAdditionsCore, path } = opts.pluginAdditions ?? { core: [] };
|
|
64
|
+
if (pluginAdditionsCore) {
|
|
65
|
+
if (path) {
|
|
66
|
+
// If path is provided, load plugins from the path
|
|
67
|
+
const pjson = await (0, fs_1.readJson)((0, node_path_1.join)(path, 'package.json'));
|
|
68
|
+
const plugins = findMatchingDependencies(pjson.dependencies ?? {}, pluginAdditionsCore);
|
|
69
|
+
await this.loadPlugins(path, 'core', plugins);
|
|
70
|
+
}
|
|
71
|
+
else {
|
|
72
|
+
const plugins = findMatchingDependencies(opts.rootPlugin.pjson.dependencies ?? {}, pluginAdditionsCore);
|
|
73
|
+
await this.loadPlugins(opts.rootPlugin.root, 'core', plugins);
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
async loadDevPlugins(opts) {
|
|
78
|
+
if (opts.devPlugins !== false) {
|
|
79
|
+
// do not load oclif.devPlugins in production
|
|
80
|
+
if ((0, util_1.isProd)())
|
|
81
|
+
return;
|
|
82
|
+
try {
|
|
83
|
+
const { devPlugins } = opts.rootPlugin.pjson.oclif;
|
|
84
|
+
if (devPlugins) {
|
|
85
|
+
const allDeps = { ...opts.rootPlugin.pjson.dependencies, ...opts.rootPlugin.pjson.devDependencies };
|
|
86
|
+
const plugins = findMatchingDependencies(allDeps ?? {}, devPlugins);
|
|
87
|
+
await this.loadPlugins(opts.rootPlugin.root, 'dev', plugins);
|
|
88
|
+
}
|
|
89
|
+
const { dev: pluginAdditionsDev, path } = opts.pluginAdditions ?? { core: [] };
|
|
90
|
+
if (pluginAdditionsDev) {
|
|
91
|
+
if (path) {
|
|
92
|
+
// If path is provided, load plugins from the path
|
|
93
|
+
const pjson = await (0, fs_1.readJson)((0, node_path_1.join)(path, 'package.json'));
|
|
94
|
+
const allDeps = { ...pjson.dependencies, ...pjson.devDependencies };
|
|
95
|
+
const plugins = findMatchingDependencies(allDeps ?? {}, pluginAdditionsDev);
|
|
96
|
+
await this.loadPlugins(path, 'dev', plugins);
|
|
97
|
+
}
|
|
98
|
+
else {
|
|
99
|
+
const allDeps = { ...opts.rootPlugin.pjson.dependencies, ...opts.rootPlugin.pjson.devDependencies };
|
|
100
|
+
const plugins = findMatchingDependencies(allDeps ?? {}, pluginAdditionsDev);
|
|
101
|
+
await this.loadPlugins(opts.rootPlugin.root, 'dev', plugins);
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
catch (error) {
|
|
106
|
+
process.emitWarning(error);
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
async loadPlugins(root, type, plugins, parent) {
|
|
111
|
+
if (!plugins || plugins.length === 0)
|
|
112
|
+
return;
|
|
113
|
+
const mark = performance_1.Performance.mark(performance_1.OCLIF_MARKER_OWNER, `config.loadPlugins#${type}`);
|
|
114
|
+
debug('loading plugins', plugins);
|
|
115
|
+
await Promise.all((plugins || []).map(async (plugin) => {
|
|
116
|
+
try {
|
|
117
|
+
const name = typeof plugin === 'string' ? plugin : plugin.name;
|
|
118
|
+
const opts = {
|
|
119
|
+
name,
|
|
120
|
+
root,
|
|
121
|
+
type,
|
|
122
|
+
};
|
|
123
|
+
if (typeof plugin !== 'string') {
|
|
124
|
+
opts.tag = plugin.tag || opts.tag;
|
|
125
|
+
opts.root = plugin.root || opts.root;
|
|
126
|
+
opts.url = plugin.url;
|
|
127
|
+
}
|
|
128
|
+
if (parent) {
|
|
129
|
+
opts.parent = parent;
|
|
130
|
+
}
|
|
131
|
+
if (this.plugins.has(name))
|
|
132
|
+
return;
|
|
133
|
+
const pluginMarker = performance_1.Performance.mark(performance_1.OCLIF_MARKER_OWNER, `plugin.load#${name}`);
|
|
134
|
+
const instance = new plugin_1.Plugin(opts);
|
|
135
|
+
await instance.load();
|
|
136
|
+
pluginMarker?.addDetails({
|
|
137
|
+
commandCount: instance.commands.length,
|
|
138
|
+
hasManifest: instance.hasManifest,
|
|
139
|
+
name: instance.name,
|
|
140
|
+
topicCount: instance.topics.length,
|
|
141
|
+
type: instance.type,
|
|
142
|
+
usesMain: Boolean(instance.pjson.main),
|
|
143
|
+
});
|
|
144
|
+
pluginMarker?.stop();
|
|
145
|
+
this.plugins.set(instance.name, instance);
|
|
146
|
+
if (parent) {
|
|
147
|
+
instance.parent = parent;
|
|
148
|
+
if (!parent.children)
|
|
149
|
+
parent.children = [];
|
|
150
|
+
parent.children.push(instance);
|
|
151
|
+
}
|
|
152
|
+
if (instance.pjson.oclif.plugins) {
|
|
153
|
+
const allDeps = type === 'dev'
|
|
154
|
+
? { ...instance.pjson.dependencies, ...instance.pjson.devDependencies }
|
|
155
|
+
: instance.pjson.dependencies;
|
|
156
|
+
const plugins = findMatchingDependencies(allDeps ?? {}, instance.pjson.oclif.plugins);
|
|
157
|
+
await this.loadPlugins(instance.root, type, plugins, instance);
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
catch (error) {
|
|
161
|
+
this.errors.push(error);
|
|
162
|
+
}
|
|
163
|
+
}));
|
|
164
|
+
mark?.addDetails({ pluginCount: plugins.length });
|
|
165
|
+
mark?.stop();
|
|
166
|
+
}
|
|
167
|
+
async loadUserPlugins(opts) {
|
|
168
|
+
if (opts.userPlugins !== false) {
|
|
169
|
+
try {
|
|
170
|
+
const userPJSONPath = (0, node_path_1.join)(opts.dataDir, 'package.json');
|
|
171
|
+
debug('reading user plugins pjson %s', userPJSONPath);
|
|
172
|
+
// ignore cache because the file might have changed within the same process (e.g. during a JIT plugin install)
|
|
173
|
+
const pjson = await (0, fs_1.readJson)(userPJSONPath, false);
|
|
174
|
+
if (!pjson.oclif)
|
|
175
|
+
pjson.oclif = { schema: 1 };
|
|
176
|
+
if (!pjson.oclif.plugins)
|
|
177
|
+
pjson.oclif.plugins = [];
|
|
178
|
+
await this.loadPlugins(userPJSONPath, 'user', pjson.oclif.plugins.filter((p) => p.type === 'user'));
|
|
179
|
+
await this.loadPlugins(userPJSONPath, 'link', pjson.oclif.plugins.filter((p) => p.type === 'link'));
|
|
180
|
+
}
|
|
181
|
+
catch (error) {
|
|
182
|
+
if (error.code !== 'ENOENT')
|
|
183
|
+
process.emitWarning(error);
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
exports.default = PluginLoader;
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { Command } from '../command';
|
|
2
|
+
import { Manifest } from '../interfaces/manifest';
|
|
3
|
+
import { HookOptions, PJSON } from '../interfaces/pjson';
|
|
4
|
+
import { Plugin as IPlugin, PluginOptions } from '../interfaces/plugin';
|
|
5
|
+
import { Topic } from '../interfaces/topic';
|
|
6
|
+
export declare class Plugin implements IPlugin {
|
|
7
|
+
options: PluginOptions;
|
|
8
|
+
_base: string;
|
|
9
|
+
protected _debug: (..._: any) => void;
|
|
10
|
+
alias: string;
|
|
11
|
+
alreadyLoaded: boolean;
|
|
12
|
+
children: Plugin[];
|
|
13
|
+
commandIDs: string[];
|
|
14
|
+
commands: Command.Loadable[];
|
|
15
|
+
commandsDir: string | undefined;
|
|
16
|
+
hasManifest: boolean;
|
|
17
|
+
hooks: {
|
|
18
|
+
[key: string]: HookOptions[];
|
|
19
|
+
};
|
|
20
|
+
isRoot: boolean;
|
|
21
|
+
manifest: Manifest;
|
|
22
|
+
moduleType: 'commonjs' | 'module';
|
|
23
|
+
name: string;
|
|
24
|
+
parent?: Plugin | undefined;
|
|
25
|
+
pjson: PJSON;
|
|
26
|
+
root: string;
|
|
27
|
+
tag?: string | undefined;
|
|
28
|
+
type: string;
|
|
29
|
+
valid: boolean;
|
|
30
|
+
version: string;
|
|
31
|
+
private commandCache;
|
|
32
|
+
private commandDiscoveryOpts;
|
|
33
|
+
private flexibleTaxonomy;
|
|
34
|
+
constructor(options: PluginOptions);
|
|
35
|
+
get topics(): Topic[];
|
|
36
|
+
findCommand(id: string, opts: {
|
|
37
|
+
must: true;
|
|
38
|
+
}): Promise<Command.Class>;
|
|
39
|
+
findCommand(id: string, opts?: {
|
|
40
|
+
must: boolean;
|
|
41
|
+
}): Promise<Command.Class | undefined>;
|
|
42
|
+
load(): Promise<void>;
|
|
43
|
+
private _manifest;
|
|
44
|
+
private addErrorScope;
|
|
45
|
+
private getCommandIDs;
|
|
46
|
+
private getCommandIdsFromPattern;
|
|
47
|
+
private getCommandIdsFromTarget;
|
|
48
|
+
private getCommandsDir;
|
|
49
|
+
private loadCommandsFromTarget;
|
|
50
|
+
private warn;
|
|
51
|
+
}
|
|
@@ -0,0 +1,373 @@
|
|
|
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.Plugin = void 0;
|
|
7
|
+
const node_path_1 = require("node:path");
|
|
8
|
+
const node_util_1 = require("node:util");
|
|
9
|
+
const tinyglobby_1 = require("tinyglobby");
|
|
10
|
+
const cache_1 = __importDefault(require("../cache"));
|
|
11
|
+
const errors_1 = require("../errors");
|
|
12
|
+
const module_loader_1 = require("../module-loader");
|
|
13
|
+
const performance_1 = require("../performance");
|
|
14
|
+
const symbols_1 = require("../symbols");
|
|
15
|
+
const cache_command_1 = require("../util/cache-command");
|
|
16
|
+
const find_root_1 = require("../util/find-root");
|
|
17
|
+
const fs_1 = require("../util/fs");
|
|
18
|
+
const read_pjson_1 = require("../util/read-pjson");
|
|
19
|
+
const util_1 = require("../util/util");
|
|
20
|
+
const ts_path_1 = require("./ts-path");
|
|
21
|
+
const util_2 = require("./util");
|
|
22
|
+
const _pjson = cache_1.default.getInstance().get('@oclif/core');
|
|
23
|
+
function topicsToArray(input, base) {
|
|
24
|
+
if (!input)
|
|
25
|
+
return [];
|
|
26
|
+
base = base ? `${base}:` : '';
|
|
27
|
+
if (Array.isArray(input)) {
|
|
28
|
+
return [...input, input.flatMap((t) => topicsToArray(t.subtopics, `${base}${t.name}`))];
|
|
29
|
+
}
|
|
30
|
+
return Object.keys(input).flatMap((k) => {
|
|
31
|
+
input[k].name = k;
|
|
32
|
+
return [{ ...input[k], name: `${base}${k}` }, ...topicsToArray(input[k].subtopics, `${base}${input[k].name}`)];
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
const cachedCommandCanBeUsed = (manifest, id) => Boolean(manifest?.commands[id] && 'isESM' in manifest.commands[id] && 'relativePath' in manifest.commands[id]);
|
|
36
|
+
const searchForCommandClass = (cmd) => {
|
|
37
|
+
if (typeof cmd.run === 'function')
|
|
38
|
+
return cmd;
|
|
39
|
+
if (cmd.default && cmd.default.run)
|
|
40
|
+
return cmd.default;
|
|
41
|
+
return Object.values(cmd).find((cmd) => typeof cmd.run === 'function');
|
|
42
|
+
};
|
|
43
|
+
const ensureCommandClass = (cmd) => {
|
|
44
|
+
if (cmd && typeof cmd.run === 'function')
|
|
45
|
+
return cmd;
|
|
46
|
+
};
|
|
47
|
+
const GLOB_PATTERNS = [
|
|
48
|
+
'**/*.+(js|cjs|mjs|ts|tsx|mts|cts)',
|
|
49
|
+
'!**/*.+(d.ts|test.ts|test.js|spec.ts|spec.js|d.mts|d.cts)?(x)',
|
|
50
|
+
];
|
|
51
|
+
function processCommandIds(files) {
|
|
52
|
+
return files.map((file) => {
|
|
53
|
+
const p = (0, node_path_1.parse)(file);
|
|
54
|
+
const topics = p.dir.split('/');
|
|
55
|
+
const command = p.name !== 'index' && p.name;
|
|
56
|
+
const id = [...topics, command].filter(Boolean).join(':');
|
|
57
|
+
return id === '' ? symbols_1.SINGLE_COMMAND_CLI_SYMBOL : id;
|
|
58
|
+
});
|
|
59
|
+
}
|
|
60
|
+
function determineCommandDiscoveryOptions(commandDiscovery) {
|
|
61
|
+
if (!commandDiscovery)
|
|
62
|
+
return;
|
|
63
|
+
if (typeof commandDiscovery === 'string') {
|
|
64
|
+
return { globPatterns: GLOB_PATTERNS, strategy: 'pattern', target: commandDiscovery };
|
|
65
|
+
}
|
|
66
|
+
if (!commandDiscovery.target)
|
|
67
|
+
throw new errors_1.CLIError('`oclif.commandDiscovery.target` is required.');
|
|
68
|
+
if (!commandDiscovery.strategy)
|
|
69
|
+
throw new errors_1.CLIError('`oclif.commandDiscovery.strategy` is required.');
|
|
70
|
+
if (commandDiscovery.strategy === 'explicit' && !commandDiscovery.identifier) {
|
|
71
|
+
commandDiscovery.identifier = 'default';
|
|
72
|
+
}
|
|
73
|
+
return commandDiscovery;
|
|
74
|
+
}
|
|
75
|
+
function determineHookOptions(hook) {
|
|
76
|
+
if (typeof hook === 'string')
|
|
77
|
+
return { identifier: 'default', target: hook };
|
|
78
|
+
if (!hook.identifier)
|
|
79
|
+
return { ...hook, identifier: 'default' };
|
|
80
|
+
return hook;
|
|
81
|
+
}
|
|
82
|
+
class Plugin {
|
|
83
|
+
options;
|
|
84
|
+
_base = `${_pjson.name}@${_pjson.version}`;
|
|
85
|
+
_debug = (0, util_2.makeDebug)();
|
|
86
|
+
alias;
|
|
87
|
+
alreadyLoaded = false;
|
|
88
|
+
children = [];
|
|
89
|
+
commandIDs = [];
|
|
90
|
+
// This will be initialized in the _manifest() method, which gets called in the load() method.
|
|
91
|
+
commands;
|
|
92
|
+
commandsDir;
|
|
93
|
+
hasManifest = false;
|
|
94
|
+
hooks;
|
|
95
|
+
isRoot = false;
|
|
96
|
+
manifest;
|
|
97
|
+
moduleType;
|
|
98
|
+
name;
|
|
99
|
+
parent;
|
|
100
|
+
pjson;
|
|
101
|
+
root;
|
|
102
|
+
tag;
|
|
103
|
+
type;
|
|
104
|
+
valid = false;
|
|
105
|
+
version;
|
|
106
|
+
commandCache;
|
|
107
|
+
commandDiscoveryOpts;
|
|
108
|
+
flexibleTaxonomy;
|
|
109
|
+
constructor(options) {
|
|
110
|
+
this.options = options;
|
|
111
|
+
}
|
|
112
|
+
get topics() {
|
|
113
|
+
return topicsToArray(this.pjson.oclif.topics || {});
|
|
114
|
+
}
|
|
115
|
+
async findCommand(id, opts = {}) {
|
|
116
|
+
const marker = performance_1.Performance.mark(performance_1.OCLIF_MARKER_OWNER, `plugin.findCommand#${this.name}.${id}`, {
|
|
117
|
+
id,
|
|
118
|
+
plugin: this.name,
|
|
119
|
+
});
|
|
120
|
+
const fetch = async () => {
|
|
121
|
+
if (this.commandDiscoveryOpts?.strategy === 'pattern') {
|
|
122
|
+
const commandsDir = await this.getCommandsDir();
|
|
123
|
+
if (!commandsDir)
|
|
124
|
+
return;
|
|
125
|
+
let module;
|
|
126
|
+
let isESM;
|
|
127
|
+
let filePath;
|
|
128
|
+
try {
|
|
129
|
+
;
|
|
130
|
+
({ filePath, isESM, module } = cachedCommandCanBeUsed(this.manifest, id)
|
|
131
|
+
? await (0, module_loader_1.loadWithDataFromManifest)(this.manifest.commands[id], this.root)
|
|
132
|
+
: await (0, module_loader_1.loadWithData)(this, (0, node_path_1.join)(commandsDir ?? this.pjson.oclif.commands, ...id.split(':'))));
|
|
133
|
+
this._debug(isESM ? '(import)' : '(require)', filePath);
|
|
134
|
+
}
|
|
135
|
+
catch (error) {
|
|
136
|
+
if (!opts.must && error.code === 'MODULE_NOT_FOUND')
|
|
137
|
+
return;
|
|
138
|
+
throw error;
|
|
139
|
+
}
|
|
140
|
+
const cmd = searchForCommandClass(module);
|
|
141
|
+
if (!cmd)
|
|
142
|
+
return;
|
|
143
|
+
cmd.id = id;
|
|
144
|
+
cmd.plugin = this;
|
|
145
|
+
cmd.isESM = isESM;
|
|
146
|
+
cmd.relativePath = (0, node_path_1.relative)(this.root, filePath || '').split(node_path_1.sep);
|
|
147
|
+
return cmd;
|
|
148
|
+
}
|
|
149
|
+
if (this.commandDiscoveryOpts?.strategy === 'single' || this.commandDiscoveryOpts?.strategy === 'explicit') {
|
|
150
|
+
const commandCache = await this.loadCommandsFromTarget();
|
|
151
|
+
const cmd = ensureCommandClass(commandCache?.[id]);
|
|
152
|
+
if (!cmd)
|
|
153
|
+
return;
|
|
154
|
+
cmd.id = id;
|
|
155
|
+
cmd.plugin = this;
|
|
156
|
+
return cmd;
|
|
157
|
+
}
|
|
158
|
+
};
|
|
159
|
+
const cmd = await fetch();
|
|
160
|
+
if (!cmd && opts.must)
|
|
161
|
+
(0, errors_1.error)(`command ${id} not found`);
|
|
162
|
+
marker?.stop();
|
|
163
|
+
return cmd;
|
|
164
|
+
}
|
|
165
|
+
// eslint-disable-next-line complexity
|
|
166
|
+
async load() {
|
|
167
|
+
this.type = this.options.type ?? 'core';
|
|
168
|
+
this.tag = this.options.tag;
|
|
169
|
+
this.isRoot = this.options.isRoot ?? false;
|
|
170
|
+
if (this.options.parent)
|
|
171
|
+
this.parent = this.options.parent;
|
|
172
|
+
// Linked plugins already have a root so there's no need to search for it.
|
|
173
|
+
// However there could be child plugins nested inside the linked plugin, in which
|
|
174
|
+
// case we still need to search for the child plugin's root.
|
|
175
|
+
const root = this.options.pjson && this.options.isRoot
|
|
176
|
+
? this.options.root
|
|
177
|
+
: this.type === 'link' && !this.parent
|
|
178
|
+
? this.options.root
|
|
179
|
+
: await (0, find_root_1.findRoot)(this.options.name, this.options.root);
|
|
180
|
+
if (!root)
|
|
181
|
+
throw new errors_1.CLIError(`could not find package.json with ${(0, node_util_1.inspect)(this.options)}`);
|
|
182
|
+
this.root = root;
|
|
183
|
+
this._debug(`loading ${this.type} plugin from ${root}`);
|
|
184
|
+
this.pjson = this.options.pjson ?? (await (0, read_pjson_1.readPjson)(root));
|
|
185
|
+
this.flexibleTaxonomy = this.options?.flexibleTaxonomy || this.pjson.oclif?.flexibleTaxonomy || false;
|
|
186
|
+
this.moduleType = this.pjson.type === 'module' ? 'module' : 'commonjs';
|
|
187
|
+
this.name = this.pjson.name;
|
|
188
|
+
this.alias = this.options.name ?? this.pjson.name;
|
|
189
|
+
if (!this.name)
|
|
190
|
+
throw new errors_1.CLIError(`no name in package.json (${root})`);
|
|
191
|
+
this._debug = (0, util_2.makeDebug)(this.name);
|
|
192
|
+
this.version = this.pjson.version;
|
|
193
|
+
if (this.pjson.oclif) {
|
|
194
|
+
this.valid = true;
|
|
195
|
+
}
|
|
196
|
+
else {
|
|
197
|
+
this.pjson.oclif = this.pjson['cli-engine'] || {};
|
|
198
|
+
}
|
|
199
|
+
this.hooks = Object.fromEntries(Object.entries(this.pjson.oclif.hooks ?? {}).map(([k, v]) => [
|
|
200
|
+
k,
|
|
201
|
+
(0, util_1.castArray)(v).map((v) => determineHookOptions(v)),
|
|
202
|
+
]));
|
|
203
|
+
this.commandDiscoveryOpts = determineCommandDiscoveryOptions(this.pjson.oclif?.commands);
|
|
204
|
+
this._debug('command discovery options', this.commandDiscoveryOpts);
|
|
205
|
+
this.manifest = await this._manifest();
|
|
206
|
+
this.commands = Object.entries(this.manifest.commands)
|
|
207
|
+
.map(([id, c]) => ({
|
|
208
|
+
...c,
|
|
209
|
+
load: async () => this.findCommand(id, { must: true }),
|
|
210
|
+
pluginAlias: this.alias,
|
|
211
|
+
pluginType: c.pluginType === 'jit' ? 'jit' : this.type,
|
|
212
|
+
}))
|
|
213
|
+
.sort((a, b) => a.id.localeCompare(b.id));
|
|
214
|
+
}
|
|
215
|
+
async _manifest() {
|
|
216
|
+
const ignoreManifest = Boolean(this.options.ignoreManifest);
|
|
217
|
+
const errorOnManifestCreate = Boolean(this.options.errorOnManifestCreate);
|
|
218
|
+
const respectNoCacheDefault = Boolean(this.options.respectNoCacheDefault);
|
|
219
|
+
const readManifest = async (dotfile = false) => {
|
|
220
|
+
try {
|
|
221
|
+
const p = (0, node_path_1.join)(this.root, `${dotfile ? '.' : ''}oclif.manifest.json`);
|
|
222
|
+
const manifest = await (0, fs_1.readJson)(p);
|
|
223
|
+
if (!process.env.OCLIF_NEXT_VERSION && manifest.version.split('-')[0] !== this.version.split('-')[0]) {
|
|
224
|
+
process.emitWarning(`Mismatched version in ${this.name} plugin manifest. Expected: ${this.version} Received: ${manifest.version}\nThis usually means you have an oclif.manifest.json file that should be deleted in development. This file should be automatically generated when publishing.`);
|
|
225
|
+
}
|
|
226
|
+
else {
|
|
227
|
+
this._debug('using manifest from', p);
|
|
228
|
+
this.hasManifest = true;
|
|
229
|
+
return manifest;
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
catch (error) {
|
|
233
|
+
if (error.code === 'ENOENT') {
|
|
234
|
+
if (!dotfile)
|
|
235
|
+
return readManifest(true);
|
|
236
|
+
}
|
|
237
|
+
else {
|
|
238
|
+
this.warn(error, 'readManifest');
|
|
239
|
+
}
|
|
240
|
+
}
|
|
241
|
+
};
|
|
242
|
+
const marker = performance_1.Performance.mark(performance_1.OCLIF_MARKER_OWNER, `plugin.manifest#${this.name}`, { plugin: this.name });
|
|
243
|
+
if (!ignoreManifest) {
|
|
244
|
+
const manifest = await readManifest();
|
|
245
|
+
if (manifest) {
|
|
246
|
+
marker?.addDetails({ commandCount: Object.keys(manifest.commands).length, fromCache: true });
|
|
247
|
+
marker?.stop();
|
|
248
|
+
this.commandIDs = Object.keys(manifest.commands);
|
|
249
|
+
return manifest;
|
|
250
|
+
}
|
|
251
|
+
}
|
|
252
|
+
this.commandIDs = await this.getCommandIDs();
|
|
253
|
+
const manifest = {
|
|
254
|
+
commands: (await Promise.all(this.commandIDs.map(async (id) => {
|
|
255
|
+
try {
|
|
256
|
+
const found = await this.findCommand(id, { must: true });
|
|
257
|
+
const cached = await (0, cache_command_1.cacheCommand)(found, this, respectNoCacheDefault);
|
|
258
|
+
// Ensure that id is set to the id being processed
|
|
259
|
+
// This is necessary because the id is set by findCommand but if there
|
|
260
|
+
// are multiple instances of a Command, then the id will be set to the
|
|
261
|
+
// last one found.
|
|
262
|
+
cached.id = id;
|
|
263
|
+
if (this.flexibleTaxonomy) {
|
|
264
|
+
const permutations = (0, util_2.getCommandIdPermutations)(id);
|
|
265
|
+
const aliasPermutations = cached.aliases.flatMap((a) => (0, util_2.getCommandIdPermutations)(a));
|
|
266
|
+
return [id, { ...cached, aliasPermutations, permutations }];
|
|
267
|
+
}
|
|
268
|
+
return [id, cached];
|
|
269
|
+
}
|
|
270
|
+
catch (error) {
|
|
271
|
+
const scope = `findCommand (${id})`;
|
|
272
|
+
if (Boolean(errorOnManifestCreate) === false)
|
|
273
|
+
this.warn(error, scope);
|
|
274
|
+
else
|
|
275
|
+
throw this.addErrorScope(error, scope);
|
|
276
|
+
}
|
|
277
|
+
})))
|
|
278
|
+
.filter((f) => Boolean(f))
|
|
279
|
+
.reduce((commands, [id, c]) => {
|
|
280
|
+
commands[id] = c;
|
|
281
|
+
return commands;
|
|
282
|
+
}, {}),
|
|
283
|
+
version: this.version,
|
|
284
|
+
};
|
|
285
|
+
marker?.addDetails({ commandCount: Object.keys(manifest.commands).length, fromCache: false });
|
|
286
|
+
marker?.stop();
|
|
287
|
+
return manifest;
|
|
288
|
+
}
|
|
289
|
+
addErrorScope(err, scope) {
|
|
290
|
+
err.name = err.name ?? (0, node_util_1.inspect)(err).trim();
|
|
291
|
+
err.detail = (0, util_1.compact)([
|
|
292
|
+
err.detail,
|
|
293
|
+
`module: ${this._base}`,
|
|
294
|
+
scope && `task: ${scope}`,
|
|
295
|
+
`plugin: ${this.name}`,
|
|
296
|
+
`root: ${this.root}`,
|
|
297
|
+
...(err.code ? [`code: ${err.code}`] : []),
|
|
298
|
+
...(err.message ? [`message: ${err.message}`] : []),
|
|
299
|
+
'See more details with DEBUG=*',
|
|
300
|
+
]).join('\n');
|
|
301
|
+
return err;
|
|
302
|
+
}
|
|
303
|
+
async getCommandIDs() {
|
|
304
|
+
const marker = performance_1.Performance.mark(performance_1.OCLIF_MARKER_OWNER, `plugin.getCommandIDs#${this.name}`, { plugin: this.name });
|
|
305
|
+
let ids;
|
|
306
|
+
switch (this.commandDiscoveryOpts?.strategy) {
|
|
307
|
+
case 'explicit': {
|
|
308
|
+
ids = (await this.getCommandIdsFromTarget()) ?? [];
|
|
309
|
+
break;
|
|
310
|
+
}
|
|
311
|
+
case 'pattern': {
|
|
312
|
+
ids = await this.getCommandIdsFromPattern();
|
|
313
|
+
break;
|
|
314
|
+
}
|
|
315
|
+
case 'single': {
|
|
316
|
+
ids = (await this.getCommandIdsFromTarget()) ?? [];
|
|
317
|
+
break;
|
|
318
|
+
}
|
|
319
|
+
default: {
|
|
320
|
+
ids = [];
|
|
321
|
+
}
|
|
322
|
+
}
|
|
323
|
+
this._debug('found commands', ids);
|
|
324
|
+
marker?.addDetails({ count: ids.length });
|
|
325
|
+
marker?.stop();
|
|
326
|
+
return ids;
|
|
327
|
+
}
|
|
328
|
+
async getCommandIdsFromPattern() {
|
|
329
|
+
const commandsDir = await this.getCommandsDir();
|
|
330
|
+
if (!commandsDir)
|
|
331
|
+
return [];
|
|
332
|
+
this._debug(`loading IDs from ${commandsDir}`);
|
|
333
|
+
const files = await (0, tinyglobby_1.glob)(this.commandDiscoveryOpts?.globPatterns ?? GLOB_PATTERNS, { cwd: commandsDir });
|
|
334
|
+
return processCommandIds(files);
|
|
335
|
+
}
|
|
336
|
+
async getCommandIdsFromTarget() {
|
|
337
|
+
const commandsFromExport = await this.loadCommandsFromTarget();
|
|
338
|
+
if (commandsFromExport) {
|
|
339
|
+
return Object.entries((await this.loadCommandsFromTarget()) ?? [])
|
|
340
|
+
.filter(([, cmd]) => ensureCommandClass(cmd))
|
|
341
|
+
.map(([id]) => id);
|
|
342
|
+
}
|
|
343
|
+
}
|
|
344
|
+
async getCommandsDir() {
|
|
345
|
+
if (this.commandsDir)
|
|
346
|
+
return this.commandsDir;
|
|
347
|
+
this.commandsDir = await (0, ts_path_1.tsPath)(this.root, this.commandDiscoveryOpts?.target, this);
|
|
348
|
+
return this.commandsDir;
|
|
349
|
+
}
|
|
350
|
+
async loadCommandsFromTarget() {
|
|
351
|
+
if (this.commandCache)
|
|
352
|
+
return this.commandCache;
|
|
353
|
+
if (this.commandDiscoveryOpts?.strategy === 'explicit' && this.commandDiscoveryOpts.target) {
|
|
354
|
+
const filePath = await (0, ts_path_1.tsPath)(this.root, this.commandDiscoveryOpts.target, this);
|
|
355
|
+
const module = await (0, module_loader_1.load)(this, filePath);
|
|
356
|
+
this.commandCache = module[this.commandDiscoveryOpts?.identifier ?? 'default'] ?? {};
|
|
357
|
+
return this.commandCache;
|
|
358
|
+
}
|
|
359
|
+
if (this.commandDiscoveryOpts?.strategy === 'single' && this.commandDiscoveryOpts.target) {
|
|
360
|
+
const filePath = await (0, ts_path_1.tsPath)(this.root, this.commandDiscoveryOpts?.target ?? this.root, this);
|
|
361
|
+
const module = await (0, module_loader_1.load)(this, filePath);
|
|
362
|
+
this.commandCache = { [symbols_1.SINGLE_COMMAND_CLI_SYMBOL]: searchForCommandClass(module) };
|
|
363
|
+
return this.commandCache;
|
|
364
|
+
}
|
|
365
|
+
}
|
|
366
|
+
warn(err, scope) {
|
|
367
|
+
if (typeof err === 'string')
|
|
368
|
+
err = new Error(err);
|
|
369
|
+
const warning = this.addErrorScope(err, scope);
|
|
370
|
+
process.emitWarning(warning.name, warning);
|
|
371
|
+
}
|
|
372
|
+
}
|
|
373
|
+
exports.Plugin = Plugin;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Plugin, TSConfig } from '../interfaces';
|
|
2
|
+
export declare const TS_CONFIGS: Record<string, TSConfig | undefined>;
|
|
3
|
+
/**
|
|
4
|
+
* Convert a path from the compiled ./lib files to the ./src typescript source
|
|
5
|
+
* this is for developing typescript plugins/CLIs
|
|
6
|
+
* if there is a tsconfig and the original sources exist, it attempts to require ts-node
|
|
7
|
+
*/
|
|
8
|
+
export declare function tsPath(root: string, orig: string, plugin: Plugin): Promise<string>;
|
|
9
|
+
export declare function tsPath(root: string, orig: string | undefined, plugin?: Plugin | undefined): Promise<string | undefined>;
|