avo-cli 0.0.3 → 4.2.0.beta.2
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 +612 -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 +612 -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 +78 -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 +59 -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
data/payload/README.md
ADDED
|
@@ -0,0 +1,612 @@
|
|
|
1
|
+
# avo-cli
|
|
2
|
+
|
|
3
|
+
Command line client for the [Avo REST API](https://docs.avohq.io/4.0/rest-api.html).
|
|
4
|
+
It talks to any Rails app running `avo-api`; nothing is installed in the app.
|
|
5
|
+
|
|
6
|
+
Status: every command works against any app running `avo-api`, and the docs
|
|
7
|
+
site describes them. It ships as a Ruby gem that runs the built client on the
|
|
8
|
+
machine's Node ([docs/install.md](docs/install.md)); the gem builds and installs
|
|
9
|
+
locally and has not been released yet. What is left is in
|
|
10
|
+
[docs/plans/v1-todo.md](docs/plans/v1-todo.md).
|
|
11
|
+
|
|
12
|
+
## Requirements
|
|
13
|
+
|
|
14
|
+
- Running the CLI: Node 18.12.1 or newer. 18.0 fails at startup on a missing
|
|
15
|
+
`node:fs/promises` export. The installed gem also needs Ruby 3.0 or newer,
|
|
16
|
+
for the `avo` executable that finds Node and hands the line over.
|
|
17
|
+
- Developing it: Node 22.13 or newer (`.node-version` pins it). The lint toolchain
|
|
18
|
+
(`@typescript-eslint` → `eslint-visitor-keys@5`) refuses anything older.
|
|
19
|
+
- yarn
|
|
20
|
+
|
|
21
|
+
## Install (development)
|
|
22
|
+
|
|
23
|
+
```sh
|
|
24
|
+
cd gems/avo-cli
|
|
25
|
+
yarn install
|
|
26
|
+
./bin/dev.js --version
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
`./bin/dev.js` runs the TypeScript sources directly through tsx.
|
|
30
|
+
`./bin/run.js` runs the compiled `dist/` after `yarn build`. The installed gem's
|
|
31
|
+
`avo` runs that same `run.js`, from the `payload/` the gem carries. To build the
|
|
32
|
+
gem and install it locally, see [docs/distribution.md](docs/distribution.md) §6.
|
|
33
|
+
|
|
34
|
+
## Configuration
|
|
35
|
+
|
|
36
|
+
Log in once and every later command knows the app:
|
|
37
|
+
|
|
38
|
+
```sh
|
|
39
|
+
avo login # asks for the host, the token and the API version (Enter for v1), checks them, saves them
|
|
40
|
+
avo schema # works in any terminal from here on
|
|
41
|
+
avo logout # deletes what was saved
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
`avo login` saves to `~/.config/avo/config.json` (`$XDG_CONFIG_HOME/avo` when
|
|
45
|
+
set, `%LOCALAPPDATA%\avo` on Windows), readable by your user only. The token is
|
|
46
|
+
stored as plain text, like `~/.bundle/config`, so use a token you can revoke.
|
|
47
|
+
|
|
48
|
+
The host is the API base URL: the address `avo-api` answers on, mount path
|
|
49
|
+
included, exactly what you would paste into Postman before `/resources/...`.
|
|
50
|
+
An app that mounts it the usual way is `http://localhost:3000/api`; one that
|
|
51
|
+
mounts it elsewhere, say `mount_avo_api at: "avo"`, is
|
|
52
|
+
`http://localhost:3000/avo`. The CLI appends only `/resources/<version>/<path>`
|
|
53
|
+
and guesses no mount, so the address that works in a browser works here.
|
|
54
|
+
|
|
55
|
+
For CI and scripts, skip `login` and set the variables. A flag wins over its
|
|
56
|
+
variable, and either wins over what was saved. The saved host and token are
|
|
57
|
+
used only together: name a host or a token yourself and the saved pair is left
|
|
58
|
+
out, so a saved token never reaches another host. The saved API version goes
|
|
59
|
+
with them: `avo login --api-version v2` once, and later commands use `v2`.
|
|
60
|
+
|
|
61
|
+
| Variable | Flag | Default | Purpose |
|
|
62
|
+
| ----------------- | --------------- | ------- | ------------------------------------------------------------------- |
|
|
63
|
+
| `AVO_API_HOST` | `--host` | none | API base URL, mount path included, e.g. `http://localhost:3000/api` |
|
|
64
|
+
| `AVO_API_TOKEN` | `--token` | none | API token secret, sent as `Authorization: Bearer` |
|
|
65
|
+
| `AVO_API_VERSION` | `--api-version` | `v1` | API version segment of the URL, saved by `login` |
|
|
66
|
+
|
|
67
|
+
## Commands
|
|
68
|
+
|
|
69
|
+
The gem is not released yet, so there is no `avo` on anyone's PATH: every
|
|
70
|
+
example here runs the source through `./bin/dev.js`. The generated reference
|
|
71
|
+
further down prints `avo`, the released name. These examples are swept to it
|
|
72
|
+
when the gem ships.
|
|
73
|
+
|
|
74
|
+
```sh
|
|
75
|
+
./bin/dev.js schema # what the token may reach, as a table
|
|
76
|
+
./bin/dev.js schema --format json # the _schema body, byte for byte
|
|
77
|
+
./bin/dev.js schema users # the fields a create sends, with required
|
|
78
|
+
./bin/dev.js schema users --view show # the fields a record reads back
|
|
79
|
+
./bin/dev.js list users # first page, one row per record
|
|
80
|
+
./bin/dev.js list users --page 2 --per-page 10 # paging
|
|
81
|
+
./bin/dev.js list users --sort name --dir desc # sorting, server side
|
|
82
|
+
./bin/dev.js list users --fields id,name,email # pick the columns
|
|
83
|
+
./bin/dev.js get users 5 # one record, field by field
|
|
84
|
+
./bin/dev.js get users 5 --format json # the body, byte for byte
|
|
85
|
+
./bin/dev.js get users 5 --verbose # request and response lines on stderr
|
|
86
|
+
./bin/dev.js create users --data '{"name": "Ada", "email": "ada@example.com"}'
|
|
87
|
+
./bin/dev.js update users 5 --data '{"name": "Ada King", "bio": null}' # null clears
|
|
88
|
+
./bin/dev.js create users --data @user.json # the object from a file
|
|
89
|
+
./bin/dev.js update users 5 --data - < user.json # the object from stdin
|
|
90
|
+
./bin/dev.js delete users 5 # no confirmation, see below
|
|
91
|
+
./bin/dev.js login # save the host, token and API version
|
|
92
|
+
./bin/dev.js logout # delete what login saved
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
### Grammar
|
|
96
|
+
|
|
97
|
+
Every line has the same shape:
|
|
98
|
+
|
|
99
|
+
```
|
|
100
|
+
./bin/dev.js <verb> <resource> [id] [flags]
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
There are six verbs: `schema`, `list`, `get`, `create`, `update` and `delete`.
|
|
104
|
+
The resource is always an argument, never a command, because route keys come
|
|
105
|
+
from the app being talked to and only after an HTTP call. `login` and `logout`
|
|
106
|
+
are the two commands outside the grammar: they take no resource
|
|
107
|
+
([Configuration](#configuration)).
|
|
108
|
+
|
|
109
|
+
`./bin/dev.js --help` lists the six verbs, with `login`, `logout` and `help`
|
|
110
|
+
beside them, and `./bin/dev.js get --help` shows one. A line that names no
|
|
111
|
+
command prints the usage above, with a did-you-mean when the typo is close to
|
|
112
|
+
something real.
|
|
113
|
+
|
|
114
|
+
Each verb has a one-letter shortcut — `s l g c u d`, in the order listed above
|
|
115
|
+
— in the same slot, so `./bin/dev.js l users` is `list users`. They are hidden
|
|
116
|
+
aliases: help, the reference below and the error messages all keep to the full
|
|
117
|
+
spelling, and nothing else about the grammar bends. `./bin/dev.js users l` is
|
|
118
|
+
refused like any other line that puts the resource first.
|
|
119
|
+
|
|
120
|
+
### Output
|
|
121
|
+
|
|
122
|
+
A table is plain text, two spaces between columns. `--fields` picks the
|
|
123
|
+
columns and lays a table out in the flag's order; a single `get` reads down
|
|
124
|
+
the page in the record's own order. A cell is one line: `-` for null and
|
|
125
|
+
empty, a list joined with `, `, an object — an association included — as its
|
|
126
|
+
JSON, and anything past 40 characters cut with `…`.
|
|
127
|
+
|
|
128
|
+
`--format json` prints the body exactly as the server sent it and ignores
|
|
129
|
+
`--fields`; `table` is the default. `--verbose` logs each request and
|
|
130
|
+
response line to stderr, so `--format json --verbose | jq` still works.
|
|
131
|
+
|
|
132
|
+
### Writing fields
|
|
133
|
+
|
|
134
|
+
Fields are one JSON object, given through `--data` (`-d`): the JSON itself,
|
|
135
|
+
`@path` to read it from a file, or `-` to read stdin. Every key is a field as
|
|
136
|
+
`schema <resource>` lists them. JSON carries its own types, so nothing is
|
|
137
|
+
converted — a value is sent as written. Before sending, the CLI reads the
|
|
138
|
+
resource's form view: for the key the body nests under, for the `file` refusal
|
|
139
|
+
below, and for the two values the wire wants in another form. What each field
|
|
140
|
+
takes:
|
|
141
|
+
|
|
142
|
+
| The view says | You write | Sent |
|
|
143
|
+
| ------------------------------------------------- | ----------------------------------------------- | --------------------------------------- |
|
|
144
|
+
| `shape: array` | `"roles": ["editor", "reviewer"]` | as written; `null` sends `[]` |
|
|
145
|
+
| `shape: hash`, `keys: [latitude, longitude]` | `"coordinates": {"latitude": 44.4, …}` | as written; `null` sends every key null |
|
|
146
|
+
| polymorphic `belongs_to`, two scalars | `"reactable_type": "Post", "reactable_id": 7` | as written |
|
|
147
|
+
| `type: key_value` or `type: code` | `"settings": {"theme": "dark"}` | the object as a JSON string |
|
|
148
|
+
| `type: tags` | `"skills": "ruby,rails"` | the string; the field splits it |
|
|
149
|
+
| anything else | `"active": false`, `"birth_date": "1985-03-04"` | as written; the app casts |
|
|
150
|
+
|
|
151
|
+
Refused with exit `2`, before any request: `--data` that is not valid JSON or
|
|
152
|
+
not one object, and an `@path` that cannot be read. Refused once the view is
|
|
153
|
+
read, before the write: a `file` or `files` field, which needs a multipart
|
|
154
|
+
upload the CLI does not send. Nothing else is checked against the view: the API
|
|
155
|
+
validates a write, so an empty object, a field the view does not list or a
|
|
156
|
+
value outside a field's `options` goes out as written and the server answers.
|
|
157
|
+
An empty object is a `400`. A value outside a field's `options` is written as
|
|
158
|
+
given, or a `500` where a Rails enum raises on it, and a misspelled field name
|
|
159
|
+
or a value of the wrong shape is mostly dropped by the app's strong params
|
|
160
|
+
without a word — the write exits `0` with that field unchanged — until
|
|
161
|
+
[AVO-1804](https://linear.app/avo-hq/issue/AVO-1804) makes the API answer those
|
|
162
|
+
too. Read the record back when it matters.
|
|
163
|
+
[docs/field-types.md](docs/field-types.md) is the full table, type by type.
|
|
164
|
+
|
|
165
|
+
Quote the object in single quotes: the shell reads the line first, and an
|
|
166
|
+
unquoted `{"a":1,"b":2}` is a brace expansion that silently splits in two.
|
|
167
|
+
When the quoting gets in the way — a value holding a quote, or an object too
|
|
168
|
+
long for one line — write the JSON to a file and pass `--data @user.json`, or
|
|
169
|
+
pipe it in with `--data -`.
|
|
170
|
+
|
|
171
|
+
A `code` field takes its JSON as a string. Whether the field parses that string
|
|
172
|
+
on the way in is a write transform the view does not publish — it describes the
|
|
173
|
+
value a write sends, not what the field does with it afterwards — so over a
|
|
174
|
+
JSON column the string lands double-encoded unless the resource declares
|
|
175
|
+
`pretty_generated: true`. Setting such a field replaces the whole column;
|
|
176
|
+
nothing is merged.
|
|
177
|
+
|
|
178
|
+
`schema users` lists the fields a create may send, each with every key the
|
|
179
|
+
view publishes for it: its `type`, whether it is `required`, its `shape`, and
|
|
180
|
+
`options` or `keys` where it has them. `--view update` does the same for an
|
|
181
|
+
update, and `--view index` or `--view show` list what a record comes back
|
|
182
|
+
with, as `id` and `type`. The views are named by the API action they describe,
|
|
183
|
+
the same words `schema` shows under `entitlements`. The answer is always for
|
|
184
|
+
one view, never a merge of several, and each view needs the entitlement of the
|
|
185
|
+
request it describes: a read-only token gets `index` and `show`, and on
|
|
186
|
+
`create` and `update` a `403` the CLI relays like any other. A view the API
|
|
187
|
+
does not serve is refused by the API, which names the ones it has. A
|
|
188
|
+
`belongs_to` is listed by the key the body sets it through, `team_id`.
|
|
189
|
+
|
|
190
|
+
`delete` has no body, so it reads no view and sends straight away. The server
|
|
191
|
+
answers every request, and a refusal comes back as a `403` whose `reason` says
|
|
192
|
+
which side to widen, `token_entitlement` or `policy`. The CLI names the request
|
|
193
|
+
it made and relays the reason as it came:
|
|
194
|
+
|
|
195
|
+
```
|
|
196
|
+
› Error: Forbidden: DELETE /api/resources/v1/users/5 was refused (reason: token_entitlement).
|
|
197
|
+
```
|
|
198
|
+
|
|
199
|
+
`delete` asks for no confirmation: an agent or a CI job has no terminal to
|
|
200
|
+
answer a prompt on, and the line already names the record. A confirmation
|
|
201
|
+
step is parked for after v1.
|
|
202
|
+
|
|
203
|
+
### Errors
|
|
204
|
+
|
|
205
|
+
Every error is one sentence naming what to change, on stderr. A `404` is the
|
|
206
|
+
one message whatever the cause — a mistyped resource, a missing id, an app
|
|
207
|
+
without `avo-api` mounted or licensed — because the API does not yet say which,
|
|
208
|
+
and the CLI does not guess. `schema` lists the names this token may reach:
|
|
209
|
+
|
|
210
|
+
```
|
|
211
|
+
› Error: Not found: http://localhost:3030/api/resources/v1/user.
|
|
212
|
+
› Check the resource name and the API version, and that the app has avo-api mounted and licensed.
|
|
213
|
+
```
|
|
214
|
+
|
|
215
|
+
A line that names no command is answered with the one grammar there is, and a
|
|
216
|
+
correction above it when the typo is close to something real:
|
|
217
|
+
|
|
218
|
+
```
|
|
219
|
+
› Error: command lst users not found
|
|
220
|
+
› Did you mean: avo list?
|
|
221
|
+
› Usage: avo <verb> <resource> [id] [flags]
|
|
222
|
+
```
|
|
223
|
+
|
|
224
|
+
A `422` lists what the app refused, one line per field:
|
|
225
|
+
|
|
226
|
+
```
|
|
227
|
+
› Error: Failed to create User
|
|
228
|
+
› name: can't be blank
|
|
229
|
+
› email: has already been taken
|
|
230
|
+
```
|
|
231
|
+
|
|
232
|
+
A wrong secret, an expired token and a revoked one all read the same
|
|
233
|
+
`Unauthorized`: the server does not say which, since saying would confirm a
|
|
234
|
+
guessed secret.
|
|
235
|
+
|
|
236
|
+
A redirect is reported and never followed, since the token would not survive
|
|
237
|
+
it. It is usually `http://` on an app that forces `https://`:
|
|
238
|
+
|
|
239
|
+
```
|
|
240
|
+
› Error: http://app.example.com redirected to https://app.example.com/api/resources/v1/_schema. Use the address it points to as the host.
|
|
241
|
+
```
|
|
242
|
+
|
|
243
|
+
### Exit codes
|
|
244
|
+
|
|
245
|
+
| Code | Meaning |
|
|
246
|
+
| ----- | -------------------------------------------------------------------------------------------- |
|
|
247
|
+
| `0` | Success |
|
|
248
|
+
| `1` | The request failed: refused (400, 401, 403, 404, 422, 5xx), redirected, unreachable, timeout |
|
|
249
|
+
| `2` | Usage: the line or the setup was wrong, and nothing was written |
|
|
250
|
+
| `130` | Interrupted: Ctrl-C at an `avo login` prompt, with nothing saved |
|
|
251
|
+
|
|
252
|
+
Exit `1` also covers an answer that is not avo-api's: a `200` without the
|
|
253
|
+
`records`, `record` or schema the endpoint promises. Exit `2` is an unknown
|
|
254
|
+
command, a bad flag, `--view` with no resource, an empty id, a missing host or
|
|
255
|
+
token, a host without `http://` or `https://` or with a username and password
|
|
256
|
+
in it, a token holding a character a header cannot carry, `--data` that is not
|
|
257
|
+
one JSON object or names a file that cannot be read, and a `file` field. It is
|
|
258
|
+
also a saved login that cannot be read, written or parsed, `avo login` with a
|
|
259
|
+
value left to ask for and no terminal to ask on, and the installed gem finding
|
|
260
|
+
no Node, or one older than 18.12.1.
|
|
261
|
+
|
|
262
|
+
<!-- commands -->
|
|
263
|
+
* [`avo create RESOURCE`](#avo-create-resource)
|
|
264
|
+
* [`avo delete RESOURCE ID`](#avo-delete-resource-id)
|
|
265
|
+
* [`avo get RESOURCE ID`](#avo-get-resource-id)
|
|
266
|
+
* [`avo help [COMMAND]`](#avo-help-command)
|
|
267
|
+
* [`avo list RESOURCE`](#avo-list-resource)
|
|
268
|
+
* [`avo login`](#avo-login)
|
|
269
|
+
* [`avo logout`](#avo-logout)
|
|
270
|
+
* [`avo schema [RESOURCE]`](#avo-schema-resource)
|
|
271
|
+
* [`avo update RESOURCE ID`](#avo-update-resource-id)
|
|
272
|
+
|
|
273
|
+
## `avo create RESOURCE`
|
|
274
|
+
|
|
275
|
+
Create a record from one JSON object of fields
|
|
276
|
+
|
|
277
|
+
```
|
|
278
|
+
USAGE
|
|
279
|
+
$ avo create RESOURCE -d json|@path|- [--api-version <value>] [--host <value>] [--token <value>]
|
|
280
|
+
[--verbose] [--format table|json] [--fields field,field]
|
|
281
|
+
|
|
282
|
+
ARGUMENTS
|
|
283
|
+
RESOURCE A resource by its route key, as `schema` lists them
|
|
284
|
+
|
|
285
|
+
FLAGS
|
|
286
|
+
-d, --data=json|@path|- (required) Fields to write, as one JSON object; @path reads it from a file, - from stdin
|
|
287
|
+
|
|
288
|
+
CONNECTION FLAGS
|
|
289
|
+
--api-version=<value> [env: AVO_API_VERSION] API version segment of the URL; defaults to the one `avo login` saved,
|
|
290
|
+
then v1
|
|
291
|
+
--host=<value> [env: AVO_API_HOST] API base URL, including the mount path, e.g. http://localhost:3000/api
|
|
292
|
+
--token=<value> [env: AVO_API_TOKEN] API token secret, sent as a Bearer token
|
|
293
|
+
|
|
294
|
+
OUTPUT FLAGS
|
|
295
|
+
--fields=field,field Columns to show, comma-separated, e.g. id,name,email
|
|
296
|
+
--format=<option> [default: table] Output format; `json` prints the body exactly as the server sent it
|
|
297
|
+
<options: table|json>
|
|
298
|
+
--verbose Log each request and response line to stderr
|
|
299
|
+
|
|
300
|
+
DESCRIPTION
|
|
301
|
+
Create a record from one JSON object of fields
|
|
302
|
+
|
|
303
|
+
EXAMPLES
|
|
304
|
+
$ avo create users --data '{"name": "Ada Lovelace", "email": "ada@example.com"}'
|
|
305
|
+
|
|
306
|
+
$ avo create users --data '{"name": "Ada", "active": true, "roles": ["editor", "reviewer"]}'
|
|
307
|
+
|
|
308
|
+
$ avo create comments --data '{"body": "Hi", "commentable_type": "Post", "commentable_id": 7}'
|
|
309
|
+
|
|
310
|
+
$ avo create users --data @user.json
|
|
311
|
+
|
|
312
|
+
$ avo create users --data - < user.json
|
|
313
|
+
|
|
314
|
+
$ avo create users --data '{"name": "Ada"}' --format json
|
|
315
|
+
```
|
|
316
|
+
|
|
317
|
+
## `avo delete RESOURCE ID`
|
|
318
|
+
|
|
319
|
+
Delete a record
|
|
320
|
+
|
|
321
|
+
```
|
|
322
|
+
USAGE
|
|
323
|
+
$ avo delete RESOURCE ID [--api-version <value>] [--host <value>] [--token <value>] [--verbose] [--format
|
|
324
|
+
table|json]
|
|
325
|
+
|
|
326
|
+
ARGUMENTS
|
|
327
|
+
RESOURCE A resource by its route key, as `schema` lists them
|
|
328
|
+
ID Record id
|
|
329
|
+
|
|
330
|
+
CONNECTION FLAGS
|
|
331
|
+
--api-version=<value> [env: AVO_API_VERSION] API version segment of the URL; defaults to the one `avo login` saved,
|
|
332
|
+
then v1
|
|
333
|
+
--host=<value> [env: AVO_API_HOST] API base URL, including the mount path, e.g. http://localhost:3000/api
|
|
334
|
+
--token=<value> [env: AVO_API_TOKEN] API token secret, sent as a Bearer token
|
|
335
|
+
|
|
336
|
+
OUTPUT FLAGS
|
|
337
|
+
--format=<option> [default: table] Output format; `json` prints the body exactly as the server sent it
|
|
338
|
+
<options: table|json>
|
|
339
|
+
--verbose Log each request and response line to stderr
|
|
340
|
+
|
|
341
|
+
DESCRIPTION
|
|
342
|
+
Delete a record
|
|
343
|
+
|
|
344
|
+
EXAMPLES
|
|
345
|
+
$ avo delete users 5
|
|
346
|
+
|
|
347
|
+
$ avo delete users 5 --format json
|
|
348
|
+
```
|
|
349
|
+
|
|
350
|
+
## `avo get RESOURCE ID`
|
|
351
|
+
|
|
352
|
+
Show one record
|
|
353
|
+
|
|
354
|
+
```
|
|
355
|
+
USAGE
|
|
356
|
+
$ avo get RESOURCE ID [--api-version <value>] [--host <value>] [--token <value>] [--verbose] [--format
|
|
357
|
+
table|json] [--fields field,field]
|
|
358
|
+
|
|
359
|
+
ARGUMENTS
|
|
360
|
+
RESOURCE A resource by its route key, as `schema` lists them
|
|
361
|
+
ID Record id
|
|
362
|
+
|
|
363
|
+
CONNECTION FLAGS
|
|
364
|
+
--api-version=<value> [env: AVO_API_VERSION] API version segment of the URL; defaults to the one `avo login` saved,
|
|
365
|
+
then v1
|
|
366
|
+
--host=<value> [env: AVO_API_HOST] API base URL, including the mount path, e.g. http://localhost:3000/api
|
|
367
|
+
--token=<value> [env: AVO_API_TOKEN] API token secret, sent as a Bearer token
|
|
368
|
+
|
|
369
|
+
OUTPUT FLAGS
|
|
370
|
+
--fields=field,field Columns to show, comma-separated, e.g. id,name,email
|
|
371
|
+
--format=<option> [default: table] Output format; `json` prints the body exactly as the server sent it
|
|
372
|
+
<options: table|json>
|
|
373
|
+
--verbose Log each request and response line to stderr
|
|
374
|
+
|
|
375
|
+
DESCRIPTION
|
|
376
|
+
Show one record
|
|
377
|
+
|
|
378
|
+
EXAMPLES
|
|
379
|
+
$ avo get users 5
|
|
380
|
+
|
|
381
|
+
$ avo get users 5 --fields name,email
|
|
382
|
+
|
|
383
|
+
$ avo get users 5 --format json
|
|
384
|
+
```
|
|
385
|
+
|
|
386
|
+
## `avo help [COMMAND]`
|
|
387
|
+
|
|
388
|
+
Display help for avo.
|
|
389
|
+
|
|
390
|
+
```
|
|
391
|
+
USAGE
|
|
392
|
+
$ avo help [COMMAND...] [-n]
|
|
393
|
+
|
|
394
|
+
ARGUMENTS
|
|
395
|
+
[COMMAND...] Command to show help for.
|
|
396
|
+
|
|
397
|
+
FLAGS
|
|
398
|
+
-n, --nested-commands Include all nested commands in the output.
|
|
399
|
+
|
|
400
|
+
DESCRIPTION
|
|
401
|
+
Display help for avo.
|
|
402
|
+
```
|
|
403
|
+
|
|
404
|
+
## `avo list RESOURCE`
|
|
405
|
+
|
|
406
|
+
List the records of a resource, one page at a time
|
|
407
|
+
|
|
408
|
+
```
|
|
409
|
+
USAGE
|
|
410
|
+
$ avo list RESOURCE [--api-version <value>] [--host <value>] [--token <value>] [--verbose] [--format
|
|
411
|
+
table|json] [--dir <value> --sort <value>] [--fields field,field] [--page <value>] [--per-page <value>]
|
|
412
|
+
|
|
413
|
+
ARGUMENTS
|
|
414
|
+
RESOURCE A resource by its route key, as `schema` lists them
|
|
415
|
+
|
|
416
|
+
FLAGS
|
|
417
|
+
--dir=<value> Sort direction: asc or desc
|
|
418
|
+
--page=<value> Page number, starting at 1
|
|
419
|
+
--per-page=<value> Records per page (default: the app's Avo setting)
|
|
420
|
+
--sort=<value> Field to sort by
|
|
421
|
+
|
|
422
|
+
CONNECTION FLAGS
|
|
423
|
+
--api-version=<value> [env: AVO_API_VERSION] API version segment of the URL; defaults to the one `avo login` saved,
|
|
424
|
+
then v1
|
|
425
|
+
--host=<value> [env: AVO_API_HOST] API base URL, including the mount path, e.g. http://localhost:3000/api
|
|
426
|
+
--token=<value> [env: AVO_API_TOKEN] API token secret, sent as a Bearer token
|
|
427
|
+
|
|
428
|
+
OUTPUT FLAGS
|
|
429
|
+
--fields=field,field Columns to show, comma-separated, e.g. id,name,email
|
|
430
|
+
--format=<option> [default: table] Output format; `json` prints the body exactly as the server sent it
|
|
431
|
+
<options: table|json>
|
|
432
|
+
--verbose Log each request and response line to stderr
|
|
433
|
+
|
|
434
|
+
DESCRIPTION
|
|
435
|
+
List the records of a resource, one page at a time
|
|
436
|
+
|
|
437
|
+
EXAMPLES
|
|
438
|
+
$ avo list users
|
|
439
|
+
|
|
440
|
+
$ avo list users --page 2 --per-page 10
|
|
441
|
+
|
|
442
|
+
$ avo list users --sort name --dir desc
|
|
443
|
+
|
|
444
|
+
$ avo list users --fields id,name,email
|
|
445
|
+
|
|
446
|
+
$ avo list users --format json
|
|
447
|
+
```
|
|
448
|
+
|
|
449
|
+
## `avo login`
|
|
450
|
+
|
|
451
|
+
Save a host, an API token and the API version, so later commands need none of them
|
|
452
|
+
|
|
453
|
+
```
|
|
454
|
+
USAGE
|
|
455
|
+
$ avo login [--api-version <value>] [--host <value>] [--token <value>] [--verbose]
|
|
456
|
+
|
|
457
|
+
CONNECTION FLAGS
|
|
458
|
+
--api-version=<value> [env: AVO_API_VERSION] API version segment of the URL; defaults to the one `avo login` saved,
|
|
459
|
+
then v1
|
|
460
|
+
--host=<value> [env: AVO_API_HOST] API base URL, including the mount path, e.g. http://localhost:3000/api
|
|
461
|
+
--token=<value> [env: AVO_API_TOKEN] API token secret, sent as a Bearer token
|
|
462
|
+
|
|
463
|
+
OUTPUT FLAGS
|
|
464
|
+
--verbose Log each request and response line to stderr
|
|
465
|
+
|
|
466
|
+
DESCRIPTION
|
|
467
|
+
Save a host, an API token and the API version, so later commands need none of them
|
|
468
|
+
|
|
469
|
+
EXAMPLES
|
|
470
|
+
$ avo login
|
|
471
|
+
|
|
472
|
+
$ avo login --host http://localhost:3000/api
|
|
473
|
+
|
|
474
|
+
$ avo login --host http://localhost:3000/api --token avo_...
|
|
475
|
+
|
|
476
|
+
$ avo login --api-version v2
|
|
477
|
+
```
|
|
478
|
+
|
|
479
|
+
## `avo logout`
|
|
480
|
+
|
|
481
|
+
Delete the saved host and token. AVO_API_HOST and AVO_API_TOKEN set in the environment are not affected
|
|
482
|
+
|
|
483
|
+
```
|
|
484
|
+
USAGE
|
|
485
|
+
$ avo logout
|
|
486
|
+
|
|
487
|
+
DESCRIPTION
|
|
488
|
+
Delete the saved host and token. AVO_API_HOST and AVO_API_TOKEN set in the environment are not affected
|
|
489
|
+
|
|
490
|
+
EXAMPLES
|
|
491
|
+
$ avo logout
|
|
492
|
+
```
|
|
493
|
+
|
|
494
|
+
## `avo schema [RESOURCE]`
|
|
495
|
+
|
|
496
|
+
List the resources the API serves, or the fields of one resource on one view
|
|
497
|
+
|
|
498
|
+
```
|
|
499
|
+
USAGE
|
|
500
|
+
$ avo schema [RESOURCE] [--api-version <value>] [--host <value>] [--token <value>] [--verbose] [--format
|
|
501
|
+
table|json] [--view <value>]
|
|
502
|
+
|
|
503
|
+
ARGUMENTS
|
|
504
|
+
[RESOURCE] A resource by its route key; with none, the resources the API serves are listed
|
|
505
|
+
|
|
506
|
+
FLAGS
|
|
507
|
+
--view=<value> Which view's fields: create/update list what a write may send, with required; index/show what a record
|
|
508
|
+
reads back (default: create)
|
|
509
|
+
|
|
510
|
+
CONNECTION FLAGS
|
|
511
|
+
--api-version=<value> [env: AVO_API_VERSION] API version segment of the URL; defaults to the one `avo login` saved,
|
|
512
|
+
then v1
|
|
513
|
+
--host=<value> [env: AVO_API_HOST] API base URL, including the mount path, e.g. http://localhost:3000/api
|
|
514
|
+
--token=<value> [env: AVO_API_TOKEN] API token secret, sent as a Bearer token
|
|
515
|
+
|
|
516
|
+
OUTPUT FLAGS
|
|
517
|
+
--format=<option> [default: table] Output format; `json` prints the body exactly as the server sent it
|
|
518
|
+
<options: table|json>
|
|
519
|
+
--verbose Log each request and response line to stderr
|
|
520
|
+
|
|
521
|
+
DESCRIPTION
|
|
522
|
+
List the resources the API serves, or the fields of one resource on one view
|
|
523
|
+
|
|
524
|
+
EXAMPLES
|
|
525
|
+
$ avo schema
|
|
526
|
+
|
|
527
|
+
$ avo schema --format json
|
|
528
|
+
|
|
529
|
+
$ avo schema users
|
|
530
|
+
|
|
531
|
+
$ avo schema users --view show
|
|
532
|
+
|
|
533
|
+
$ avo schema --host http://localhost:3000/api --token avo_...
|
|
534
|
+
```
|
|
535
|
+
|
|
536
|
+
## `avo update RESOURCE ID`
|
|
537
|
+
|
|
538
|
+
Update a record from one JSON object of fields; every field not given is left as it is
|
|
539
|
+
|
|
540
|
+
```
|
|
541
|
+
USAGE
|
|
542
|
+
$ avo update RESOURCE ID -d json|@path|- [--api-version <value>] [--host <value>] [--token <value>]
|
|
543
|
+
[--verbose] [--format table|json] [--fields field,field]
|
|
544
|
+
|
|
545
|
+
ARGUMENTS
|
|
546
|
+
RESOURCE A resource by its route key, as `schema` lists them
|
|
547
|
+
ID Record id
|
|
548
|
+
|
|
549
|
+
FLAGS
|
|
550
|
+
-d, --data=json|@path|- (required) Fields to write, as one JSON object; @path reads it from a file, - from stdin
|
|
551
|
+
|
|
552
|
+
CONNECTION FLAGS
|
|
553
|
+
--api-version=<value> [env: AVO_API_VERSION] API version segment of the URL; defaults to the one `avo login` saved,
|
|
554
|
+
then v1
|
|
555
|
+
--host=<value> [env: AVO_API_HOST] API base URL, including the mount path, e.g. http://localhost:3000/api
|
|
556
|
+
--token=<value> [env: AVO_API_TOKEN] API token secret, sent as a Bearer token
|
|
557
|
+
|
|
558
|
+
OUTPUT FLAGS
|
|
559
|
+
--fields=field,field Columns to show, comma-separated, e.g. id,name,email
|
|
560
|
+
--format=<option> [default: table] Output format; `json` prints the body exactly as the server sent it
|
|
561
|
+
<options: table|json>
|
|
562
|
+
--verbose Log each request and response line to stderr
|
|
563
|
+
|
|
564
|
+
DESCRIPTION
|
|
565
|
+
Update a record from one JSON object of fields; every field not given is left as it is
|
|
566
|
+
|
|
567
|
+
EXAMPLES
|
|
568
|
+
$ avo update users 5 --data '{"name": "Ada King"}'
|
|
569
|
+
|
|
570
|
+
$ avo update users 5 --data '{"active": false, "age": 36}'
|
|
571
|
+
|
|
572
|
+
$ avo update users 5 --data '{"bio": null, "roles": []}'
|
|
573
|
+
|
|
574
|
+
$ avo update users 5 --data @user.json
|
|
575
|
+
|
|
576
|
+
$ avo update users 5 --data - < user.json
|
|
577
|
+
|
|
578
|
+
$ avo update users 5 --data '{"name": "Ada"}' --format json
|
|
579
|
+
```
|
|
580
|
+
<!-- commandsstop -->
|
|
581
|
+
|
|
582
|
+
## Development
|
|
583
|
+
|
|
584
|
+
```sh
|
|
585
|
+
cd gems/avo-cli
|
|
586
|
+
node --version # 22.13 or newer, per `.node-version`
|
|
587
|
+
|
|
588
|
+
yarn build # compile src/ to dist/
|
|
589
|
+
yarn test # mocha, then typecheck and eslint (posttest)
|
|
590
|
+
yarn typecheck # tsc over src/ and test/, writing nothing
|
|
591
|
+
yarn lint
|
|
592
|
+
```
|
|
593
|
+
|
|
594
|
+
Narrower runs, when the whole suite is more than you need:
|
|
595
|
+
|
|
596
|
+
```sh
|
|
597
|
+
yarn mocha test/commands/list.test.ts # one file
|
|
598
|
+
yarn mocha "test/**/*.test.ts" --grep "404" # every test whose name matches
|
|
599
|
+
```
|
|
600
|
+
|
|
601
|
+
Tests never reach the network: HTTP is stubbed with undici's `MockAgent`,
|
|
602
|
+
which Node's built-in `fetch` honours (see `test/http.test.ts`).
|
|
603
|
+
|
|
604
|
+
The command reference above is generated by `oclif readme` and regenerated on
|
|
605
|
+
`yarn version` and on pack. After changing a command's description, flags or
|
|
606
|
+
examples, run `yarn build && yarn oclif readme --no-source-links` and commit
|
|
607
|
+
the result. The flag matters: without it the reference links into the private
|
|
608
|
+
workspace repository, which `test/readme.test.ts` refuses.
|
|
609
|
+
|
|
610
|
+
To run the CLI against a real app, command by command, with the expected
|
|
611
|
+
output and every way a line can fail, follow
|
|
612
|
+
[docs/manual-testing.md](docs/manual-testing.md).
|
data/payload/bin/run.cmd
ADDED
data/payload/bin/run.js
ADDED
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { Command, Flags } from '@oclif/core';
|
|
2
|
+
import { Client } from './client.js';
|
|
3
|
+
import { DEFAULT_API_VERSION, resolveConfig } from './config.js';
|
|
4
|
+
// The connection flags every command shares, plus a client built from them. Flag > env is oclif's job; the saved
|
|
5
|
+
// file and the defaults come after, in `resolveConfig`. `login` stops here: it prints no table and no JSON.
|
|
6
|
+
export class ConnectionCommand extends Command {
|
|
7
|
+
static baseFlags = {
|
|
8
|
+
// No oclif `default`: it would fill the flag before the saved version is read, and always win over it.
|
|
9
|
+
// `resolveConfig` applies the default instead, after both.
|
|
10
|
+
'api-version': Flags.string({
|
|
11
|
+
description: `API version segment of the URL; defaults to the one \`avo login\` saved, then ${DEFAULT_API_VERSION}`,
|
|
12
|
+
env: 'AVO_API_VERSION',
|
|
13
|
+
helpGroup: 'CONNECTION',
|
|
14
|
+
}),
|
|
15
|
+
host: Flags.string({
|
|
16
|
+
description: 'API base URL, including the mount path, e.g. http://localhost:3000/api',
|
|
17
|
+
env: 'AVO_API_HOST',
|
|
18
|
+
helpGroup: 'CONNECTION',
|
|
19
|
+
}),
|
|
20
|
+
token: Flags.string({
|
|
21
|
+
description: 'API token secret, sent as a Bearer token',
|
|
22
|
+
env: 'AVO_API_TOKEN',
|
|
23
|
+
helpGroup: 'CONNECTION',
|
|
24
|
+
}),
|
|
25
|
+
verbose: Flags.boolean({
|
|
26
|
+
description: 'Log each request and response line to stderr',
|
|
27
|
+
helpGroup: 'OUTPUT',
|
|
28
|
+
}),
|
|
29
|
+
};
|
|
30
|
+
client(flags) {
|
|
31
|
+
return this.clientFor(resolveConfig(flags, this.config.configDir), flags.verbose);
|
|
32
|
+
}
|
|
33
|
+
// For a caller that already holds the resolved connection. `--verbose` lines go to stderr.
|
|
34
|
+
clientFor(connection, verbose) {
|
|
35
|
+
return new Client({ ...connection, log: verbose ? (line) => this.logToStderr(line) : undefined });
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
// Every command that prints a response, which adds `--format` to the connection flags.
|
|
39
|
+
export class BaseCommand extends ConnectionCommand {
|
|
40
|
+
static baseFlags = {
|
|
41
|
+
...ConnectionCommand.baseFlags,
|
|
42
|
+
format: Flags.string({
|
|
43
|
+
default: 'table',
|
|
44
|
+
description: 'Output format; `json` prints the body exactly as the server sent it',
|
|
45
|
+
helpGroup: 'OUTPUT',
|
|
46
|
+
options: ['table', 'json'],
|
|
47
|
+
}),
|
|
48
|
+
};
|
|
49
|
+
// Answers whether it printed. The record commands call it ahead of their shape check, so json relays a body they
|
|
50
|
+
// could not table; `schema` cannot, since its loaders check the shape as they fetch.
|
|
51
|
+
printedJson(flags, response) {
|
|
52
|
+
if (flags.format !== 'json')
|
|
53
|
+
return false;
|
|
54
|
+
// `this.log` always appends a newline, which would double the one a body ends with.
|
|
55
|
+
process.stdout.write(response.raw);
|
|
56
|
+
if (!response.raw.endsWith('\n'))
|
|
57
|
+
process.stdout.write('\n');
|
|
58
|
+
return true;
|
|
59
|
+
}
|
|
60
|
+
}
|