@automattic/vip 4.1.5 → 4.1.8
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.
- package/assets/dev-env.lando.template.yml.ejs +7 -3
- package/config/config.local.json +6 -0
- package/dist/bin/vip-app-deploy-token-generate.js +110 -78
- package/dist/bin/vip-app-deploy-token.js +24 -16
- package/dist/bin/vip-app-deploy-validate.js +45 -41
- package/dist/bin/vip-app-deploy.js +222 -215
- package/dist/bin/vip-app-list.js +59 -43
- package/dist/bin/vip-app.js +97 -66
- package/dist/bin/vip-backup-db.js +36 -29
- package/dist/bin/vip-backup.js +16 -9
- package/dist/bin/vip-cache-purge-url.js +93 -55
- package/dist/bin/vip-cache.js +23 -14
- package/dist/bin/vip-config-envvar-delete.js +74 -73
- package/dist/bin/vip-config-envvar-get-all.js +68 -68
- package/dist/bin/vip-config-envvar-get.js +46 -46
- package/dist/bin/vip-config-envvar-list.js +54 -57
- package/dist/bin/vip-config-envvar-set.js +102 -96
- package/dist/bin/vip-config-envvar.js +38 -24
- package/dist/bin/vip-config-software-get.js +89 -67
- package/dist/bin/vip-config-software-update.js +116 -120
- package/dist/bin/vip-config-software.js +31 -21
- package/dist/bin/vip-config.js +25 -17
- package/dist/bin/vip-db-phpmyadmin.js +40 -39
- package/dist/bin/vip-db.js +13 -12
- package/dist/bin/vip-defensive-mode-configure.js +197 -197
- package/dist/bin/vip-defensive-mode-disable.js +43 -35
- package/dist/bin/vip-defensive-mode-enable.js +47 -38
- package/dist/bin/vip-defensive-mode.js +28 -17
- package/dist/bin/vip-dev-env-create.js +147 -104
- package/dist/bin/vip-dev-env-destroy.js +48 -39
- package/dist/bin/vip-dev-env-envvar-delete.js +60 -49
- package/dist/bin/vip-dev-env-envvar-get-all.js +52 -45
- package/dist/bin/vip-dev-env-envvar-get.js +48 -37
- package/dist/bin/vip-dev-env-envvar-list.js +48 -41
- package/dist/bin/vip-dev-env-envvar-set.js +83 -70
- package/dist/bin/vip-dev-env-envvar.js +38 -23
- package/dist/bin/vip-dev-env-exec.js +81 -74
- package/dist/bin/vip-dev-env-import-media.js +34 -26
- package/dist/bin/vip-dev-env-import-sql.js +65 -51
- package/dist/bin/vip-dev-env-import.js +23 -14
- package/dist/bin/vip-dev-env-info.js +59 -50
- package/dist/bin/vip-dev-env-list.js +34 -31
- package/dist/bin/vip-dev-env-logs.js +59 -49
- package/dist/bin/vip-dev-env-purge.js +71 -63
- package/dist/bin/vip-dev-env-shell.js +82 -71
- package/dist/bin/vip-dev-env-start.js +77 -65
- package/dist/bin/vip-dev-env-stop.js +80 -74
- package/dist/bin/vip-dev-env-sync-sql.js +80 -72
- package/dist/bin/vip-dev-env-sync.js +18 -11
- package/dist/bin/vip-dev-env-update.js +93 -84
- package/dist/bin/vip-dev-env.js +25 -8
- package/dist/bin/vip-edge-workers-build.js +82 -54
- package/dist/bin/vip-edge-workers-delete.js +84 -52
- package/dist/bin/vip-edge-workers-deploy.js +186 -126
- package/dist/bin/vip-edge-workers-disable.js +75 -44
- package/dist/bin/vip-edge-workers-enable.js +86 -54
- package/dist/bin/vip-edge-workers-get.js +108 -88
- package/dist/bin/vip-edge-workers-init.js +83 -53
- package/dist/bin/vip-edge-workers-list.js +89 -54
- package/dist/bin/vip-edge-workers-new.js +98 -69
- package/dist/bin/vip-edge-workers-validate.js +123 -82
- package/dist/bin/vip-edge-workers.js +19 -6
- package/dist/bin/vip-export-sql.js +75 -69
- package/dist/bin/vip-export.js +12 -7
- package/dist/bin/vip-import-media-abort.js +99 -73
- package/dist/bin/vip-import-media-status.js +83 -51
- package/dist/bin/vip-import-media.js +165 -166
- package/dist/bin/vip-import-sql-status.js +75 -45
- package/dist/bin/vip-import-sql.js +536 -596
- package/dist/bin/vip-import-validate-files.js +122 -141
- package/dist/bin/vip-import-validate-sql.js +52 -16
- package/dist/bin/vip-import.js +16 -7
- package/dist/bin/vip-logout.js +17 -13
- package/dist/bin/vip-logs.js +209 -183
- package/dist/bin/vip-search-replace.js +85 -53
- package/dist/bin/vip-slowlogs.js +168 -147
- package/dist/bin/vip-sync.js +163 -133
- package/dist/bin/vip-whoami.js +71 -35
- package/dist/bin/vip-wp.js +505 -459
- package/dist/bin/vip.js +161 -116
- package/dist/commands/backup-db.js +183 -149
- package/dist/commands/dev-env-import-sql.js +162 -117
- package/dist/commands/dev-env-sync-sql.js +372 -330
- package/dist/commands/export-sql.js +441 -425
- package/dist/commands/phpmyadmin.js +232 -212
- package/dist/commands/wp-ssh.js +218 -187
- package/dist/lib/analytics/clients/tracks.js +84 -91
- package/dist/lib/analytics/index.js +27 -27
- package/dist/lib/api/app.js +37 -36
- package/dist/lib/api/cache-purge.js +17 -20
- package/dist/lib/api/constants.js +5 -6
- package/dist/lib/api/edge-workers.js +84 -135
- package/dist/lib/api/error-debug.js +10 -13
- package/dist/lib/api/feature-flags.js +16 -17
- package/dist/lib/api/http.js +47 -48
- package/dist/lib/api/user.js +17 -18
- package/dist/lib/api.js +107 -116
- package/dist/lib/app-logs/app-logs.js +24 -25
- package/dist/lib/app-slowlogs/app-slowlogs.js +23 -24
- package/dist/lib/app-slowlogs/types.js +2 -1
- package/dist/lib/app.js +6 -8
- package/dist/lib/backup-storage-availability/backup-storage-availability.js +119 -119
- package/dist/lib/backup-storage-availability/docker-machine-not-found-error.js +5 -6
- package/dist/lib/cli/apiConfig.js +71 -41
- package/dist/lib/cli/command.js +1120 -873
- package/dist/lib/cli/config.js +29 -29
- package/dist/lib/cli/envAlias.js +35 -50
- package/dist/lib/cli/exit.js +19 -19
- package/dist/lib/cli/format.js +172 -172
- package/dist/lib/cli/progress.js +193 -236
- package/dist/lib/cli/prompt.js +14 -15
- package/dist/lib/cli/runtime-mode.js +5 -6
- package/dist/lib/client-file-uploader.js +492 -615
- package/dist/lib/config/software.js +225 -191
- package/dist/lib/constants/dev-environment.js +40 -37
- package/dist/lib/constants/file-size.js +6 -7
- package/dist/lib/constants/vipgo.js +24 -12
- package/dist/lib/custom-deploy/custom-deploy.js +138 -120
- package/dist/lib/database.js +88 -85
- package/dist/lib/defensive-mode/api.js +41 -46
- package/dist/lib/defensive-mode/cli-helpers.js +40 -40
- package/dist/lib/dev-environment/dev-environment-cli.js +776 -735
- package/dist/lib/dev-environment/dev-environment-configuration-file.js +224 -191
- package/dist/lib/dev-environment/dev-environment-core.js +697 -732
- package/dist/lib/dev-environment/dev-environment-database.js +57 -41
- package/dist/lib/dev-environment/dev-environment-lando.js +734 -666
- package/dist/lib/dev-environment/docker-utils.js +96 -90
- package/dist/lib/dev-environment/env-vars.js +61 -59
- package/dist/lib/dev-environment/lando-loader.js +6 -7
- package/dist/lib/dev-environment/types.js +2 -1
- package/dist/lib/edge-workers/confirmation.js +42 -36
- package/dist/lib/edge-workers/deployment.js +150 -159
- package/dist/lib/edge-workers/index.js +68 -85
- package/dist/lib/edge-workers/location.js +26 -26
- package/dist/lib/edge-workers/output.js +14 -15
- package/dist/lib/edge-workers/project.js +123 -132
- package/dist/lib/edge-workers/toolchains/assemblyscript/constants.js +6 -8
- package/dist/lib/edge-workers/toolchains/assemblyscript/index.js +100 -101
- package/dist/lib/edge-workers/toolchains/assemblyscript/templates.js +31 -33
- package/dist/lib/edge-workers/toolchains/index.js +15 -15
- package/dist/lib/edge-workers/types.js +10 -38
- package/dist/lib/edge-workers/validation.js +161 -150
- package/dist/lib/env.js +16 -17
- package/dist/lib/envvar/api-delete.js +16 -18
- package/dist/lib/envvar/api-get-all.js +15 -19
- package/dist/lib/envvar/api-get.js +8 -9
- package/dist/lib/envvar/api-list.js +16 -21
- package/dist/lib/envvar/api-set.js +20 -19
- package/dist/lib/envvar/api.js +34 -29
- package/dist/lib/envvar/input.js +29 -34
- package/dist/lib/envvar/logging.js +9 -11
- package/dist/lib/envvar/read-file.js +6 -7
- package/dist/lib/http/download-file.js +76 -44
- package/dist/lib/http/proxy-agent.js +37 -40
- package/dist/lib/http/proxy-dispatcher.js +69 -71
- package/dist/lib/keychain/insecure.js +40 -36
- package/dist/lib/keychain/keychain.js +2 -1
- package/dist/lib/keychain/secure.js +16 -15
- package/dist/lib/keychain.js +22 -22
- package/dist/lib/live-backup-copy.js +117 -115
- package/dist/lib/logout.js +17 -19
- package/dist/lib/media-import/config.js +15 -14
- package/dist/lib/media-import/media-file-import.js +9 -13
- package/dist/lib/media-import/progress.js +53 -65
- package/dist/lib/media-import/status.js +241 -256
- package/dist/lib/media-import/utils.js +15 -15
- package/dist/lib/node-version-check.js +16 -16
- package/dist/lib/promise.js +16 -17
- package/dist/lib/read-file.js +48 -16
- package/dist/lib/rechallenge/client.js +37 -43
- package/dist/lib/rechallenge/errors.js +38 -37
- package/dist/lib/rechallenge/flow.js +148 -123
- package/dist/lib/rechallenge/index.js +23 -24
- package/dist/lib/rechallenge/link.js +153 -151
- package/dist/lib/rechallenge/open-browser.js +14 -17
- package/dist/lib/rechallenge/token-cache.js +83 -86
- package/dist/lib/rechallenge/types.js +5 -14
- package/dist/lib/retry.js +93 -129
- package/dist/lib/search-and-replace.js +164 -148
- package/dist/lib/site-import/db-file-import.js +12 -16
- package/dist/lib/site-import/status.js +291 -291
- package/dist/lib/token.js +86 -87
- package/dist/lib/tracker.js +51 -62
- package/dist/lib/types/graphql/rate-limit-exceeded-error.js +2 -1
- package/dist/lib/types.js +2 -1
- package/dist/lib/user-error.js +6 -8
- package/dist/lib/utils.js +81 -87
- package/dist/lib/validations/custom-deploy.js +218 -186
- package/dist/lib/validations/is-multi-site-sql-dump.js +6 -6
- package/dist/lib/validations/is-multi-site.js +83 -50
- package/dist/lib/validations/is-multisite-domain-mapped.js +92 -62
- package/dist/lib/validations/line-by-line.js +78 -46
- package/dist/lib/validations/site-type.js +59 -63
- package/dist/lib/validations/sql-insert-parser.js +415 -0
- package/dist/lib/validations/sql.js +551 -431
- package/dist/lib/validations/utils.js +27 -29
- package/dist/lib/vip-import-validate-files.js +481 -490
- package/dist/lib/wp/helpers.js +41 -45
- package/dist/lib/wp/readline.js +21 -57
- package/dist/lib/xdg-data.js +11 -12
- package/helpers/generate-docs.js +9 -3
- package/helpers/mark-cli-executable.js +9 -0
- package/node_modules/@apollo/client/CHANGELOG.md +42 -0
- package/node_modules/@apollo/client/__cjs/cache/core/cache.cjs +1 -1
- package/node_modules/@apollo/client/__cjs/cache/core/cache.cjs.map +1 -1
- package/node_modules/@apollo/client/__cjs/cache/core/cache.d.cts +4 -1
- package/node_modules/@apollo/client/__cjs/cache/core/types/Cache.d.cts +5 -0
- package/node_modules/@apollo/client/__cjs/cache/inmemory/entityStore.cjs +4 -4
- package/node_modules/@apollo/client/__cjs/cache/inmemory/helpers.cjs +5 -0
- package/node_modules/@apollo/client/__cjs/cache/inmemory/helpers.cjs.map +1 -1
- package/node_modules/@apollo/client/__cjs/cache/inmemory/inMemoryCache.cjs +17 -6
- package/node_modules/@apollo/client/__cjs/cache/inmemory/inMemoryCache.cjs.map +1 -1
- package/node_modules/@apollo/client/__cjs/cache/inmemory/inMemoryCache.d.cts +3 -1
- package/node_modules/@apollo/client/__cjs/cache/inmemory/key-extractor.cjs +15 -3
- package/node_modules/@apollo/client/__cjs/cache/inmemory/key-extractor.cjs.map +1 -1
- package/node_modules/@apollo/client/__cjs/cache/inmemory/policies.cjs +21 -5
- package/node_modules/@apollo/client/__cjs/cache/inmemory/policies.cjs.map +1 -1
- package/node_modules/@apollo/client/__cjs/cache/inmemory/policies.d.cts +2 -0
- package/node_modules/@apollo/client/__cjs/cache/inmemory/readFromStore.cjs +28 -10
- package/node_modules/@apollo/client/__cjs/cache/inmemory/readFromStore.cjs.map +1 -1
- package/node_modules/@apollo/client/__cjs/cache/inmemory/types.d.cts +7 -2
- package/node_modules/@apollo/client/__cjs/cache/inmemory/writeToStore.cjs +32 -16
- package/node_modules/@apollo/client/__cjs/cache/inmemory/writeToStore.cjs.map +1 -1
- package/node_modules/@apollo/client/__cjs/cache/inmemory/writeToStore.d.cts +5 -2
- package/node_modules/@apollo/client/__cjs/core/ApolloClient.cjs +14 -14
- package/node_modules/@apollo/client/__cjs/core/ObservableQuery.cjs +8 -8
- package/node_modules/@apollo/client/__cjs/core/QueryInfo.cjs +22 -33
- package/node_modules/@apollo/client/__cjs/core/QueryInfo.cjs.map +1 -1
- package/node_modules/@apollo/client/__cjs/core/QueryInfo.d.cts +1 -1
- package/node_modules/@apollo/client/__cjs/core/QueryManager.cjs +22 -15
- package/node_modules/@apollo/client/__cjs/core/QueryManager.cjs.map +1 -1
- package/node_modules/@apollo/client/__cjs/core/RefetchEventManager.cjs +3 -3
- package/node_modules/@apollo/client/__cjs/incremental/handlers/defer20220824.cjs +15 -2
- package/node_modules/@apollo/client/__cjs/incremental/handlers/defer20220824.cjs.map +1 -1
- package/node_modules/@apollo/client/__cjs/incremental/handlers/defer20220824.d.cts +5 -1
- package/node_modules/@apollo/client/__cjs/incremental/handlers/graphql17Alpha9.cjs +58 -14
- package/node_modules/@apollo/client/__cjs/incremental/handlers/graphql17Alpha9.cjs.map +1 -1
- package/node_modules/@apollo/client/__cjs/incremental/handlers/graphql17Alpha9.d.cts +23 -12
- package/node_modules/@apollo/client/__cjs/incremental/handlers/notImplemented.cjs +1 -1
- package/node_modules/@apollo/client/__cjs/incremental/types.d.cts +19 -1
- package/node_modules/@apollo/client/__cjs/invariantErrorCodes.cjs +64 -58
- package/node_modules/@apollo/client/__cjs/link/http/parseAndCheckHttpResponse.cjs +1 -1
- package/node_modules/@apollo/client/__cjs/link/http/parseAndCheckHttpResponse.cjs.map +1 -1
- package/node_modules/@apollo/client/__cjs/react/hooks/useFragment.cjs.map +1 -1
- package/node_modules/@apollo/client/__cjs/react/hooks/useFragment.d.cts +42 -43
- package/node_modules/@apollo/client/__cjs/utilities/internal/index.cjs.map +1 -1
- package/node_modules/@apollo/client/__cjs/utilities/internal/index.d.cts +0 -1
- package/node_modules/@apollo/client/__cjs/utilities/internal/isDeferredFragment.cjs +24 -26
- package/node_modules/@apollo/client/__cjs/utilities/internal/isDeferredFragment.cjs.map +1 -1
- package/node_modules/@apollo/client/__cjs/utilities/internal/isDeferredFragment.d.cts +1 -1
- package/node_modules/@apollo/client/__cjs/utilities/internal/isStreamField.cjs +24 -20
- package/node_modules/@apollo/client/__cjs/utilities/internal/isStreamField.cjs.map +1 -1
- package/node_modules/@apollo/client/__cjs/utilities/internal/isStreamField.d.cts +1 -1
- package/node_modules/@apollo/client/__cjs/version.cjs +1 -1
- package/node_modules/@apollo/client/cache/core/cache.d.ts +4 -1
- package/node_modules/@apollo/client/cache/core/cache.js +1 -1
- package/node_modules/@apollo/client/cache/core/cache.js.map +1 -1
- package/node_modules/@apollo/client/cache/core/types/Cache.d.ts +5 -0
- package/node_modules/@apollo/client/cache/core/types/Cache.js.map +1 -1
- package/node_modules/@apollo/client/cache/inmemory/entityStore.js +4 -4
- package/node_modules/@apollo/client/cache/inmemory/helpers.js +5 -0
- package/node_modules/@apollo/client/cache/inmemory/helpers.js.map +1 -1
- package/node_modules/@apollo/client/cache/inmemory/inMemoryCache.d.ts +3 -1
- package/node_modules/@apollo/client/cache/inmemory/inMemoryCache.js +17 -6
- package/node_modules/@apollo/client/cache/inmemory/inMemoryCache.js.map +1 -1
- package/node_modules/@apollo/client/cache/inmemory/key-extractor.js +15 -3
- package/node_modules/@apollo/client/cache/inmemory/key-extractor.js.map +1 -1
- package/node_modules/@apollo/client/cache/inmemory/policies.d.ts +2 -0
- package/node_modules/@apollo/client/cache/inmemory/policies.js +22 -6
- package/node_modules/@apollo/client/cache/inmemory/policies.js.map +1 -1
- package/node_modules/@apollo/client/cache/inmemory/readFromStore.js +28 -10
- package/node_modules/@apollo/client/cache/inmemory/readFromStore.js.map +1 -1
- package/node_modules/@apollo/client/cache/inmemory/types.d.ts +7 -2
- package/node_modules/@apollo/client/cache/inmemory/types.js.map +1 -1
- package/node_modules/@apollo/client/cache/inmemory/writeToStore.d.ts +5 -2
- package/node_modules/@apollo/client/cache/inmemory/writeToStore.js +33 -17
- package/node_modules/@apollo/client/cache/inmemory/writeToStore.js.map +1 -1
- package/node_modules/@apollo/client/core/ApolloClient.js +14 -14
- package/node_modules/@apollo/client/core/ObservableQuery.js +8 -8
- package/node_modules/@apollo/client/core/QueryInfo.d.ts +1 -1
- package/node_modules/@apollo/client/core/QueryInfo.js +23 -34
- package/node_modules/@apollo/client/core/QueryInfo.js.map +1 -1
- package/node_modules/@apollo/client/core/QueryManager.js +22 -15
- package/node_modules/@apollo/client/core/QueryManager.js.map +1 -1
- package/node_modules/@apollo/client/core/RefetchEventManager.js +3 -3
- package/node_modules/@apollo/client/incremental/handlers/defer20220824.d.ts +5 -1
- package/node_modules/@apollo/client/incremental/handlers/defer20220824.js +15 -2
- package/node_modules/@apollo/client/incremental/handlers/defer20220824.js.map +1 -1
- package/node_modules/@apollo/client/incremental/handlers/graphql17Alpha9.d.ts +23 -12
- package/node_modules/@apollo/client/incremental/handlers/graphql17Alpha9.js +58 -14
- package/node_modules/@apollo/client/incremental/handlers/graphql17Alpha9.js.map +1 -1
- package/node_modules/@apollo/client/incremental/handlers/notImplemented.js +1 -1
- package/node_modules/@apollo/client/incremental/types.d.ts +19 -1
- package/node_modules/@apollo/client/incremental/types.js.map +1 -1
- package/node_modules/@apollo/client/invariantErrorCodes.js +64 -58
- package/node_modules/@apollo/client/link/http/parseAndCheckHttpResponse.js +1 -1
- package/node_modules/@apollo/client/link/http/parseAndCheckHttpResponse.js.map +1 -1
- package/node_modules/@apollo/client/package.json +1 -1
- package/node_modules/@apollo/client/react/hooks/useFragment.d.ts +42 -43
- package/node_modules/@apollo/client/react/hooks/useFragment.js.map +1 -1
- package/node_modules/@apollo/client/react/hooks-compiled/useFragment.d.ts +42 -43
- package/node_modules/@apollo/client/react/hooks-compiled/useFragment.js.map +1 -1
- package/node_modules/@apollo/client/utilities/internal/index.d.ts +0 -1
- package/node_modules/@apollo/client/utilities/internal/index.js.map +1 -1
- package/node_modules/@apollo/client/utilities/internal/isDeferredFragment.d.ts +1 -1
- package/node_modules/@apollo/client/utilities/internal/isDeferredFragment.js +23 -25
- package/node_modules/@apollo/client/utilities/internal/isDeferredFragment.js.map +1 -1
- package/node_modules/@apollo/client/utilities/internal/isStreamField.d.ts +1 -1
- package/node_modules/@apollo/client/utilities/internal/isStreamField.js +23 -19
- package/node_modules/@apollo/client/utilities/internal/isStreamField.js.map +1 -1
- package/node_modules/@apollo/client/version.js +1 -1
- package/node_modules/@automattic/vip-search-replace/README.md +6 -1
- package/node_modules/@automattic/vip-search-replace/lib/index.js +46 -14
- package/node_modules/@automattic/vip-search-replace/package.json +1 -1
- package/node_modules/@types/node/README.md +1 -1
- package/node_modules/@types/node/crypto.d.ts +2 -2
- package/node_modules/@types/node/dgram.d.ts +1 -1
- package/node_modules/@types/node/package.json +2 -2
- package/node_modules/@types/node/util.d.ts +6 -3
- package/node_modules/@types/node/zlib.d.ts +758 -0
- package/node_modules/axios/CHANGELOG.md +62 -0
- package/node_modules/axios/README.md +297 -5
- package/node_modules/axios/dist/axios.js +728 -170
- package/node_modules/axios/dist/axios.min.js +3 -3
- package/node_modules/axios/dist/axios.min.js.map +1 -1
- package/node_modules/axios/dist/browser/axios.cjs +871 -188
- package/node_modules/axios/dist/esm/axios.js +871 -188
- package/node_modules/axios/dist/esm/axios.min.js +2 -2
- package/node_modules/axios/dist/esm/axios.min.js.map +1 -1
- package/node_modules/axios/dist/node/axios.cjs +1037 -225
- package/node_modules/axios/index.d.cts +102 -74
- package/node_modules/axios/index.d.ts +100 -68
- package/node_modules/axios/lib/adapters/fetch.js +64 -11
- package/node_modules/axios/lib/adapters/http.js +140 -67
- package/node_modules/axios/lib/adapters/xhr.js +52 -3
- package/node_modules/axios/lib/core/Axios.js +43 -20
- package/node_modules/axios/lib/core/AxiosError.js +33 -2
- package/node_modules/axios/lib/core/AxiosHeaders.js +124 -1
- package/node_modules/axios/lib/core/InterceptorManager.js +107 -8
- package/node_modules/axios/lib/core/buildFullPath.js +41 -15
- package/node_modules/axios/lib/core/dispatchRequest.js +8 -2
- package/node_modules/axios/lib/core/mergeConfig.js +19 -4
- package/node_modules/axios/lib/core/methodList.js +17 -0
- package/node_modules/axios/lib/core/setFormDataHeaders.js +27 -0
- package/node_modules/axios/lib/defaults/index.js +2 -1
- package/node_modules/axios/lib/env/data.js +1 -1
- package/node_modules/axios/lib/helpers/Http2Sessions.js +2 -0
- package/node_modules/axios/lib/helpers/HttpStatusCode.js +12 -1
- package/node_modules/axios/lib/helpers/combineURLs.js +11 -3
- package/node_modules/axios/lib/helpers/composeSignals.js +12 -1
- package/node_modules/axios/lib/helpers/estimateDataURLDecodedBytes.js +115 -54
- package/node_modules/axios/lib/helpers/formDataToJSON.js +11 -5
- package/node_modules/axios/lib/helpers/fromDataURI.js +5 -4
- package/node_modules/axios/lib/helpers/normalizeURLForProtocolCheck.js +24 -0
- package/node_modules/axios/lib/helpers/parseHeaders.js +5 -3
- package/node_modules/axios/lib/helpers/progressEventReducer.js +4 -4
- package/node_modules/axios/lib/helpers/resolveConfig.js +5 -17
- package/node_modules/axios/lib/helpers/shouldBypassProxy.js +300 -5
- package/node_modules/axios/lib/helpers/throttle.js +3 -2
- package/node_modules/axios/lib/helpers/toFormData.js +17 -23
- package/node_modules/axios/lib/platform/node/classes/Buffer.js +11 -0
- package/node_modules/axios/lib/utils.js +151 -18
- package/node_modules/axios/package.json +21 -19
- package/node_modules/chalk/package.json +1 -1
- package/node_modules/chalk/source/index.js +2 -1
- package/node_modules/check-disk-space/README.md +92 -32
- package/node_modules/check-disk-space/dist/check-disk-space.d.mts +58 -0
- package/node_modules/check-disk-space/dist/check-disk-space.mjs +170 -190
- package/node_modules/check-disk-space/package.json +43 -71
- package/node_modules/cpu-features/build/Makefile +2 -2
- package/node_modules/cpu-features/build/Release/.deps/Release/obj.target/cpu_features/deps/cpu_features/src/filesystem.o.d +1 -1
- package/node_modules/cpu-features/build/Release/.deps/Release/obj.target/cpu_features/deps/cpu_features/src/impl_aarch64_linux_or_android.o.d +1 -1
- package/node_modules/cpu-features/build/Release/.deps/Release/obj.target/cpu_features/deps/cpu_features/src/impl_aarch64_macos_or_iphone.o.d +1 -1
- package/node_modules/cpu-features/build/Release/.deps/Release/obj.target/cpu_features/deps/cpu_features/src/impl_aarch64_windows.o.d +1 -1
- package/node_modules/cpu-features/build/Release/.deps/Release/obj.target/cpu_features/deps/cpu_features/src/impl_arm_linux_or_android.o.d +1 -1
- package/node_modules/cpu-features/build/Release/.deps/Release/obj.target/cpu_features/deps/cpu_features/src/impl_mips_linux_or_android.o.d +1 -1
- package/node_modules/cpu-features/build/Release/.deps/Release/obj.target/cpu_features/deps/cpu_features/src/impl_ppc_linux.o.d +1 -1
- package/node_modules/cpu-features/build/Release/.deps/Release/obj.target/cpu_features/deps/cpu_features/src/impl_x86_freebsd.o.d +1 -1
- package/node_modules/cpu-features/build/Release/.deps/Release/obj.target/cpu_features/deps/cpu_features/src/impl_x86_linux_or_android.o.d +1 -1
- package/node_modules/cpu-features/build/Release/.deps/Release/obj.target/cpu_features/deps/cpu_features/src/impl_x86_macos.o.d +1 -1
- package/node_modules/cpu-features/build/Release/.deps/Release/obj.target/cpu_features/deps/cpu_features/src/impl_x86_windows.o.d +1 -1
- package/node_modules/cpu-features/build/Release/.deps/Release/obj.target/cpu_features/deps/cpu_features/src/stack_line_reader.o.d +1 -1
- package/node_modules/cpu-features/build/Release/.deps/Release/obj.target/cpu_features/deps/cpu_features/src/string_view.o.d +1 -1
- package/node_modules/cpu-features/build/Release/.deps/Release/obj.target/cpufeatures/src/binding.o.d +157 -145
- package/node_modules/cpu-features/build/Release/cpufeatures.node +0 -0
- package/node_modules/cpu-features/build/Release/obj.target/cpufeatures/src/binding.o +0 -0
- package/node_modules/cpu-features/build/Release/obj.target/cpufeatures.node +0 -0
- package/node_modules/cpu-features/build/config.gypi +100 -31
- package/node_modules/cpu-features/build/cpufeatures.target.mk +14 -14
- package/node_modules/cpu-features/build/deps/cpu_features/cpu_features.target.mk +14 -14
- package/node_modules/ejs/README.md +64 -28
- package/node_modules/ejs/bin/cli.js +220 -158
- package/node_modules/ejs/ejs.js +64 -94
- package/node_modules/ejs/ejs.min.js +1 -1
- package/node_modules/ejs/jakefile.js +44 -0
- package/node_modules/ejs/lib/cjs/ejs.js +64 -63
- package/node_modules/ejs/lib/cjs/parseargs.js +129 -77
- package/node_modules/ejs/lib/cjs/utils.js +0 -31
- package/node_modules/ejs/lib/esm/ejs.js +66 -65
- package/node_modules/ejs/lib/esm/parseargs.js +136 -82
- package/node_modules/ejs/lib/esm/utils.js +0 -32
- package/node_modules/ejs/package.json +3 -2
- package/node_modules/ejs/usage.txt +9 -9
- package/node_modules/follow-redirects/index.js +10 -1
- package/node_modules/follow-redirects/package.json +1 -1
- package/node_modules/graphql-ws/dist/client.cjs +28 -13
- package/node_modules/graphql-ws/dist/client.js +28 -13
- package/node_modules/graphql-ws/dist/index.cjs +1 -1
- package/node_modules/graphql-ws/dist/index.d.cts +1 -1
- package/node_modules/graphql-ws/dist/index.d.ts +1 -1
- package/node_modules/graphql-ws/dist/index.js +1 -1
- package/node_modules/graphql-ws/dist/{server-B8ZBs9OC.d.ts → server-BzBeHlSW.d.ts} +26 -1
- package/node_modules/graphql-ws/dist/{server-DN5-9C2B.cjs → server-Ce-Z86Ys.cjs} +10 -4
- package/node_modules/graphql-ws/dist/{server-ChpuX357.d.cts → server-u6zrlwzL.d.cts} +26 -1
- package/node_modules/graphql-ws/dist/{server-DHPI7HHW.js → server-zBhvXJ_Z.js} +10 -4
- package/node_modules/graphql-ws/dist/use/@fastify/websocket.cjs +2 -2
- package/node_modules/graphql-ws/dist/use/@fastify/websocket.d.cts +8 -2
- package/node_modules/graphql-ws/dist/use/@fastify/websocket.d.ts +8 -2
- package/node_modules/graphql-ws/dist/use/@fastify/websocket.js +2 -2
- package/node_modules/graphql-ws/dist/use/bun.cjs +1 -1
- package/node_modules/graphql-ws/dist/use/bun.d.cts +2 -2
- package/node_modules/graphql-ws/dist/use/bun.d.ts +2 -2
- package/node_modules/graphql-ws/dist/use/bun.js +2 -2
- package/node_modules/graphql-ws/dist/use/crossws.cjs +16 -4
- package/node_modules/graphql-ws/dist/use/crossws.d.cts +6 -1
- package/node_modules/graphql-ws/dist/use/crossws.d.ts +6 -1
- package/node_modules/graphql-ws/dist/use/crossws.js +16 -4
- package/node_modules/graphql-ws/dist/use/deno.d.ts +1 -1
- package/node_modules/graphql-ws/dist/use/deno.js +1 -1
- package/node_modules/graphql-ws/dist/use/uWebSockets.cjs +2 -2
- package/node_modules/graphql-ws/dist/use/uWebSockets.d.cts +8 -2
- package/node_modules/graphql-ws/dist/use/uWebSockets.d.ts +8 -2
- package/node_modules/graphql-ws/dist/use/uWebSockets.js +2 -2
- package/node_modules/graphql-ws/dist/use/ws.cjs +2 -2
- package/node_modules/graphql-ws/dist/use/ws.d.cts +8 -2
- package/node_modules/graphql-ws/dist/use/ws.d.ts +8 -2
- package/node_modules/graphql-ws/dist/use/ws.js +2 -2
- package/node_modules/graphql-ws/package.json +3 -3
- package/node_modules/graphql-ws/umd/graphql-ws.js +28 -13
- package/node_modules/graphql-ws/umd/graphql-ws.min.js +1 -1
- package/node_modules/graphql-ws/umd/graphql-ws.min.js.gz +0 -0
- package/node_modules/js-yaml/dist/browser/js-yaml.esm.min.mjs +522 -495
- package/node_modules/js-yaml/dist/browser/js-yaml.esm.min.mjs.map +1 -1
- package/node_modules/js-yaml/dist/browser/js-yaml.umd.min.js +24 -24
- package/node_modules/js-yaml/dist/browser/js-yaml.umd.min.js.map +1 -1
- package/node_modules/js-yaml/dist/js-yaml.cjs.js +135 -78
- package/node_modules/js-yaml/dist/js-yaml.cjs.js.map +1 -1
- package/node_modules/js-yaml/dist/js-yaml.mjs +129 -72
- package/node_modules/js-yaml/dist/js-yaml.mjs.map +1 -1
- package/node_modules/js-yaml/node_modules/argparse/LICENSE +47 -0
- package/node_modules/js-yaml/node_modules/argparse/README.md +89 -0
- package/node_modules/js-yaml/node_modules/argparse/lib/_colorize.js +72 -0
- package/node_modules/js-yaml/node_modules/argparse/lib/argparse.d.ts +292 -0
- package/node_modules/{argparse → js-yaml/node_modules/argparse/lib}/argparse.js +1142 -1029
- package/node_modules/js-yaml/node_modules/argparse/lib/difflib.js +190 -0
- package/node_modules/{argparse → js-yaml/node_modules/argparse}/lib/sub.js +4 -4
- package/node_modules/{argparse → js-yaml/node_modules/argparse}/lib/textwrap.js +28 -28
- package/node_modules/js-yaml/node_modules/argparse/package.json +38 -0
- package/node_modules/js-yaml/package.json +12 -12
- package/node_modules/lando/.github/dependabot.yml +4 -0
- package/node_modules/lando/.github/workflows/build-util-images.yml +1 -1
- package/node_modules/lando/.github/workflows/pr-core-tests.yml +4 -2
- package/node_modules/lando/.github/workflows/pr-db-tools-tests.yml +4 -2
- package/node_modules/lando/.github/workflows/pr-django-tests.yml +4 -2
- package/node_modules/lando/.github/workflows/pr-linter.yml +2 -2
- package/node_modules/lando/.github/workflows/pr-unit-tests.yml +2 -2
- package/node_modules/lando/.node-version +1 -1
- package/node_modules/lando/bin/lando.js +3 -83
- package/node_modules/lando/config.yml +0 -1
- package/node_modules/lando/eslint.config.mjs +4 -0
- package/node_modules/lando/examples/django/.lando.yml +1 -1
- package/node_modules/lando/examples/django/README.md +1 -1
- package/node_modules/lando/examples/django/requirements.txt +1 -1
- package/node_modules/lando/examples/sql-export/README.md +5 -0
- package/node_modules/lando/lib/app.js +78 -84
- package/node_modules/lando/lib/art.js +86 -30
- package/node_modules/lando/lib/bootstrap.js +148 -45
- package/node_modules/lando/lib/cache.js +14 -15
- package/node_modules/lando/lib/cli.js +67 -63
- package/node_modules/lando/lib/compose.js +76 -45
- package/node_modules/lando/lib/config.js +51 -33
- package/node_modules/lando/lib/daemon.js +27 -10
- package/node_modules/lando/lib/docker.js +46 -19
- package/node_modules/lando/lib/engine.js +131 -144
- package/node_modules/lando/lib/env.js +25 -46
- package/node_modules/lando/lib/error.js +15 -6
- package/node_modules/lando/lib/esm/package.json +3 -0
- package/node_modules/lando/lib/esm/string-argv.js +2 -0
- package/node_modules/lando/lib/esm/yargs.js +2 -0
- package/node_modules/lando/lib/events.js +15 -15
- package/node_modules/lando/lib/factory.js +43 -14
- package/node_modules/lando/lib/formatters.js +19 -31
- package/node_modules/lando/lib/lando.js +59 -48
- package/node_modules/lando/lib/logger.js +12 -24
- package/node_modules/lando/lib/plugins.js +27 -15
- package/node_modules/lando/lib/promise.js +17 -17
- package/node_modules/lando/lib/router.js +75 -21
- package/node_modules/lando/lib/scan.js +29 -12
- package/node_modules/lando/lib/shell.js +44 -20
- package/node_modules/lando/lib/user.js +14 -20
- package/node_modules/lando/lib/utils.js +87 -44
- package/node_modules/lando/lib/yaml.js +11 -9
- package/node_modules/lando/node_modules/ansi-regex/index.d.ts +33 -0
- package/node_modules/lando/node_modules/ansi-regex/index.js +15 -0
- package/node_modules/lando/node_modules/ansi-regex/package.json +61 -0
- package/node_modules/lando/node_modules/ansi-regex/readme.md +66 -0
- package/node_modules/lando/node_modules/cliui/README.md +26 -6
- package/node_modules/lando/node_modules/cliui/build/lib/index.js +2 -2
- package/node_modules/lando/node_modules/cliui/build/tsconfig.tsbuildinfo +1 -0
- package/node_modules/lando/node_modules/cliui/index.mjs +7 -5
- package/node_modules/lando/node_modules/cliui/node_modules/string-width/index.d.ts +39 -0
- package/node_modules/lando/node_modules/cliui/node_modules/string-width/index.js +82 -0
- package/node_modules/lando/node_modules/cliui/node_modules/string-width/license +9 -0
- package/node_modules/lando/node_modules/cliui/node_modules/string-width/package.json +64 -0
- package/node_modules/lando/node_modules/cliui/node_modules/string-width/readme.md +66 -0
- package/node_modules/lando/node_modules/cliui/package.json +21 -32
- package/node_modules/lando/node_modules/emoji-regex/LICENSE-MIT.txt +20 -0
- package/node_modules/lando/node_modules/emoji-regex/README.md +107 -0
- package/node_modules/lando/node_modules/emoji-regex/index.d.ts +3 -0
- package/node_modules/lando/node_modules/emoji-regex/index.js +4 -0
- package/node_modules/lando/node_modules/emoji-regex/index.mjs +4 -0
- package/node_modules/lando/node_modules/emoji-regex/package.json +45 -0
- package/node_modules/lando/node_modules/string-width/index.d.ts +39 -0
- package/node_modules/lando/node_modules/string-width/index.js +203 -0
- package/node_modules/lando/node_modules/string-width/license +9 -0
- package/node_modules/lando/node_modules/string-width/package.json +65 -0
- package/node_modules/lando/node_modules/string-width/readme.md +66 -0
- package/node_modules/lando/node_modules/strip-ansi/index.d.ts +15 -0
- package/node_modules/lando/node_modules/strip-ansi/index.js +19 -0
- package/node_modules/lando/node_modules/strip-ansi/license +9 -0
- package/node_modules/lando/node_modules/strip-ansi/package.json +59 -0
- package/node_modules/lando/node_modules/strip-ansi/readme.md +37 -0
- package/node_modules/lando/node_modules/yargs/README.md +16 -36
- package/node_modules/lando/node_modules/yargs/browser.d.ts +5 -0
- package/node_modules/lando/node_modules/yargs/browser.mjs +2 -2
- package/node_modules/lando/node_modules/yargs/build/lib/command.js +308 -211
- package/node_modules/lando/node_modules/yargs/build/lib/completion-templates.js +28 -9
- package/node_modules/lando/node_modules/yargs/build/lib/completion.js +233 -91
- package/node_modules/lando/node_modules/yargs/build/lib/middleware.js +51 -16
- package/node_modules/lando/node_modules/yargs/build/lib/usage.js +88 -52
- package/node_modules/lando/node_modules/yargs/build/lib/utils/apply-extends.js +4 -2
- package/node_modules/lando/node_modules/yargs/build/lib/utils/levenshtein.js +9 -1
- package/node_modules/lando/node_modules/yargs/build/lib/utils/maybe-async-result.js +17 -0
- package/node_modules/lando/node_modules/yargs/build/lib/validation.js +51 -54
- package/node_modules/lando/node_modules/yargs/build/lib/yargs-factory.js +1261 -887
- package/node_modules/lando/node_modules/yargs/build/lib/yerror.js +3 -1
- package/node_modules/lando/node_modules/yargs/index.mjs +4 -2
- package/node_modules/lando/node_modules/yargs/lib/platform-shims/browser.mjs +9 -2
- package/node_modules/lando/node_modules/yargs/lib/platform-shims/esm.mjs +22 -22
- package/node_modules/lando/node_modules/yargs/locales/cs.json +51 -0
- package/node_modules/lando/node_modules/yargs/locales/de.json +1 -1
- package/node_modules/lando/node_modules/yargs/locales/en.json +4 -0
- package/node_modules/lando/node_modules/yargs/locales/fi.json +1 -1
- package/node_modules/lando/node_modules/yargs/locales/he.json +55 -0
- package/node_modules/lando/node_modules/yargs/locales/ka.json +55 -0
- package/node_modules/lando/node_modules/yargs/locales/ko.json +25 -25
- package/node_modules/lando/node_modules/yargs/locales/ru.json +6 -1
- package/node_modules/lando/node_modules/yargs/locales/uk_UA.json +51 -0
- package/node_modules/lando/node_modules/yargs/locales/uz.json +52 -0
- package/node_modules/lando/node_modules/yargs/locales/zh_TW.json +50 -46
- package/node_modules/lando/node_modules/yargs/package.json +41 -60
- package/node_modules/lando/node_modules/yargs-parser/build/lib/index.js +13 -8
- package/node_modules/lando/node_modules/yargs-parser/build/lib/yargs-parser.js +21 -12
- package/node_modules/lando/node_modules/yargs-parser/package.json +31 -40
- package/node_modules/lando/package.json +59 -22
- package/node_modules/lando/plugins/lando-compose/index.js +4 -0
- package/node_modules/lando/plugins/lando-compose/lib/utils.js +16 -7
- package/node_modules/lando/plugins/lando-core/index.js +1 -2
- package/node_modules/lando/plugins/lando-core/lib/utils.js +35 -15
- package/node_modules/lando/plugins/lando-core/lib/warnings.js +27 -0
- package/node_modules/lando/plugins/lando-core/tasks/destroy.js +1 -1
- package/node_modules/lando/plugins/lando-core/tasks/rebuild.js +1 -1
- package/node_modules/lando/plugins/lando-events/index.js +4 -0
- package/node_modules/lando/plugins/lando-events/lib/utils.js +27 -6
- package/node_modules/lando/plugins/lando-networking/app.js +2 -2
- package/node_modules/lando/plugins/lando-networking/index.js +9 -2
- package/node_modules/lando/plugins/lando-networking/test/app.spec.js +87 -0
- package/node_modules/lando/plugins/lando-proxy/index.js +6 -1
- package/node_modules/lando/plugins/lando-proxy/lib/utils.js +63 -28
- package/node_modules/lando/plugins/lando-proxy/lib/warnings.js +10 -0
- package/node_modules/lando/plugins/lando-recipes/index.js +4 -0
- package/node_modules/lando/plugins/lando-recipes/lib/build.js +22 -4
- package/node_modules/lando/plugins/lando-recipes/lib/options.js +42 -66
- package/node_modules/lando/plugins/lando-recipes/lib/utils.js +30 -13
- package/node_modules/lando/plugins/lando-recipes/lib/warnings.js +5 -0
- package/node_modules/lando/plugins/lando-recipes/sources/remote.js +0 -26
- package/node_modules/lando/plugins/lando-recipes/tasks/init.js +1 -1
- package/node_modules/lando/plugins/lando-services/index.js +4 -0
- package/node_modules/lando/plugins/lando-services/lib/utils.js +38 -15
- package/node_modules/lando/plugins/lando-sharing/index.js +4 -0
- package/node_modules/lando/plugins/lando-sharing/lib/utils.js +28 -5
- package/node_modules/lando/plugins/lando-tooling/index.js +5 -0
- package/node_modules/lando/plugins/lando-tooling/lib/build.js +5 -2
- package/node_modules/lando/plugins/lando-tooling/lib/utils.js +83 -47
- package/node_modules/lando/test/cli.spec.js +59 -21
- package/node_modules/lando/test/docker.spec.js +24 -28
- package/node_modules/lando/test/env.spec.js +8 -0
- package/node_modules/lando/test/error.spec.js +1 -1
- package/node_modules/lando/test/events.spec.js +6 -7
- package/node_modules/lando/test/lando.spec.js +1 -1
- package/node_modules/lando/test/plugins.spec.js +2 -3
- package/node_modules/lando/test/promise.spec.js +1 -1
- package/node_modules/lando/test/scan.spec.js +1 -1
- package/node_modules/lando/test/shell.spec.js +19 -2
- package/node_modules/lando/test/utils.spec.js +52 -0
- package/node_modules/open/index.js +3 -5
- package/node_modules/open/package.json +1 -1
- package/node_modules/ssh2/lib/protocol/crypto/build/Makefile +2 -2
- package/node_modules/ssh2/lib/protocol/crypto/build/Release/.deps/Release/obj.target/sshcrypto/src/binding.o.d.raw +136 -0
- package/node_modules/ssh2/lib/protocol/crypto/build/sshcrypto.target.mk +14 -14
- package/node_modules/string-argv/CHANGELOG.md +38 -0
- package/node_modules/string-argv/README.md +96 -50
- package/node_modules/string-argv/index.d.ts +2 -0
- package/node_modules/string-argv/index.js +55 -35
- package/node_modules/string-argv/package.json +50 -40
- package/node_modules/undici/README.md +25 -3
- package/node_modules/undici/docs/docs/api/CacheStore.md +24 -9
- package/node_modules/undici/docs/docs/api/Client.md +11 -6
- package/node_modules/undici/docs/docs/api/Dispatcher.md +3 -0
- package/node_modules/undici/docs/docs/api/Errors.md +76 -1
- package/node_modules/undici/docs/docs/api/H2CClient.md +3 -2
- package/node_modules/undici/docs/docs/api/Interceptors.md +28 -8
- package/node_modules/undici/docs/docs/api/RedirectHandler.md +13 -10
- package/node_modules/undici/docs/docs/index.md +12 -12
- package/node_modules/undici/docs/docs/type-map.json +66 -66
- package/node_modules/undici/lib/cache/memory-cache-store.js +48 -13
- package/node_modules/undici/lib/cache/sqlite-cache-store.js +83 -5
- package/node_modules/undici/lib/core/connect.js +10 -4
- package/node_modules/undici/lib/core/constants.js +12 -1
- package/node_modules/undici/lib/core/errors.js +38 -1
- package/node_modules/undici/lib/core/request.js +16 -1
- package/node_modules/undici/lib/core/symbols.js +2 -0
- package/node_modules/undici/lib/core/util.js +26 -1
- package/node_modules/undici/lib/dispatcher/agent.js +6 -2
- package/node_modules/undici/lib/dispatcher/client-h1.js +116 -80
- package/node_modules/undici/lib/dispatcher/client-h2.js +124 -17
- package/node_modules/undici/lib/dispatcher/client.js +4 -1
- package/node_modules/undici/lib/dispatcher/dispatcher-base.js +3 -2
- package/node_modules/undici/lib/dispatcher/dispatcher1-wrapper.js +20 -3
- package/node_modules/undici/lib/dispatcher/parser-h1.js +1064 -0
- package/node_modules/undici/lib/dispatcher/pool-base.js +85 -31
- package/node_modules/undici/lib/dispatcher/pool.js +11 -8
- package/node_modules/undici/lib/dispatcher/proxy-agent.js +18 -8
- package/node_modules/undici/lib/dispatcher/retry-agent.js +10 -0
- package/node_modules/undici/lib/dispatcher/round-robin-pool.js +15 -5
- package/node_modules/undici/lib/handler/cache-handler.js +153 -15
- package/node_modules/undici/lib/handler/deduplication-handler.js +112 -51
- package/node_modules/undici/lib/handler/redirect-handler.js +28 -8
- package/node_modules/undici/lib/handler/retry-handler.js +44 -11
- package/node_modules/undici/lib/interceptor/cache.js +11 -3
- package/node_modules/undici/lib/interceptor/decompress.js +22 -9
- package/node_modules/undici/lib/interceptor/dns.js +11 -0
- package/node_modules/undici/lib/interceptor/response-error.js +72 -28
- package/node_modules/undici/lib/milo/LICENSE.md +7 -0
- package/node_modules/undici/lib/milo/no-simd.js +1002 -0
- package/node_modules/undici/lib/milo/simd.js +1002 -0
- package/node_modules/undici/lib/mock/mock-agent.js +11 -0
- package/node_modules/undici/lib/mock/snapshot-recorder.js +3 -2
- package/node_modules/undici/lib/mock/snapshot-utils.js +3 -2
- package/node_modules/undici/lib/util/cache.js +11 -5
- package/node_modules/undici/lib/web/cookies/util.js +19 -2
- package/node_modules/undici/lib/web/eventsource/eventsource-stream.js +69 -15
- package/node_modules/undici/lib/web/eventsource/eventsource.js +25 -2
- package/node_modules/undici/lib/web/fetch/body.js +47 -38
- package/node_modules/undici/lib/web/fetch/formdata-parser.js +12 -4
- package/node_modules/undici/lib/web/fetch/headers.js +2 -2
- package/node_modules/undici/lib/web/fetch/index.js +8 -4
- package/node_modules/undici/lib/web/subresource-integrity/subresource-integrity.js +5 -5
- package/node_modules/undici/lib/web/websocket/receiver.js +25 -4
- package/node_modules/undici/package.json +9 -7
- package/node_modules/undici/types/api.d.ts +1 -1
- package/node_modules/undici/types/cache-interceptor.d.ts +10 -0
- package/node_modules/undici/types/client.d.ts +10 -4
- package/node_modules/undici/types/errors.d.ts +16 -1
- package/node_modules/undici/types/h2c-client.d.ts +1 -1
- package/node_modules/undici/types/interceptors.d.ts +6 -1
- package/node_modules/undici/types/utility.d.ts +4 -4
- package/node_modules/{fetch-retry → unicode-segmenter}/LICENSE +2 -2
- package/node_modules/unicode-segmenter/README.md +324 -0
- package/node_modules/unicode-segmenter/_emoji_data.cjs +24 -0
- package/node_modules/unicode-segmenter/_emoji_data.d.cts +1 -0
- package/node_modules/unicode-segmenter/_emoji_data.d.ts +12 -0
- package/node_modules/unicode-segmenter/_emoji_data.js +26 -0
- package/node_modules/unicode-segmenter/_general_data.cjs +30 -0
- package/node_modules/unicode-segmenter/_general_data.d.cts +1 -0
- package/node_modules/unicode-segmenter/_general_data.d.ts +16 -0
- package/node_modules/unicode-segmenter/_general_data.js +34 -0
- package/node_modules/unicode-segmenter/_grapheme_data.cjs +125 -0
- package/node_modules/unicode-segmenter/_grapheme_data.d.cts +1 -0
- package/node_modules/unicode-segmenter/_grapheme_data.d.ts +112 -0
- package/node_modules/unicode-segmenter/_grapheme_data.js +123 -0
- package/node_modules/unicode-segmenter/core.cjs +135 -0
- package/node_modules/unicode-segmenter/core.d.cts +1 -0
- package/node_modules/unicode-segmenter/core.d.ts +118 -0
- package/node_modules/unicode-segmenter/core.js +129 -0
- package/node_modules/unicode-segmenter/emoji.cjs +43 -0
- package/node_modules/unicode-segmenter/emoji.d.cts +1 -0
- package/node_modules/unicode-segmenter/emoji.d.ts +23 -0
- package/node_modules/unicode-segmenter/emoji.js +42 -0
- package/node_modules/unicode-segmenter/general.cjs +51 -0
- package/node_modules/unicode-segmenter/general.d.cts +1 -0
- package/node_modules/unicode-segmenter/general.d.ts +26 -0
- package/node_modules/unicode-segmenter/general.js +50 -0
- package/node_modules/unicode-segmenter/grapheme.cjs +405 -0
- package/node_modules/unicode-segmenter/grapheme.d.cts +1 -0
- package/node_modules/unicode-segmenter/grapheme.d.ts +64 -0
- package/node_modules/unicode-segmenter/grapheme.js +438 -0
- package/node_modules/unicode-segmenter/index.cjs +26 -0
- package/node_modules/unicode-segmenter/index.d.cts +1 -0
- package/node_modules/unicode-segmenter/index.d.ts +4 -0
- package/node_modules/unicode-segmenter/index.js +6 -0
- package/node_modules/unicode-segmenter/intl-adapter.cjs +124 -0
- package/node_modules/unicode-segmenter/intl-adapter.d.cts +1 -0
- package/node_modules/unicode-segmenter/intl-adapter.d.ts +62 -0
- package/node_modules/unicode-segmenter/intl-adapter.js +113 -0
- package/node_modules/unicode-segmenter/intl-polyfill.cjs +17 -0
- package/node_modules/unicode-segmenter/intl-polyfill.d.cts +1 -0
- package/node_modules/unicode-segmenter/intl-polyfill.d.ts +1 -0
- package/node_modules/unicode-segmenter/intl-polyfill.js +16 -0
- package/node_modules/unicode-segmenter/package.json +165 -0
- package/node_modules/unicode-segmenter/utils.cjs +99 -0
- package/node_modules/unicode-segmenter/utils.d.cts +1 -0
- package/node_modules/unicode-segmenter/utils.d.ts +64 -0
- package/node_modules/unicode-segmenter/utils.js +89 -0
- package/package.json +48 -17
- package/.buildkite/build-linux.sh +0 -68
- package/.buildkite/build-macos-installer.sh +0 -34
- package/.buildkite/build-macos.sh +0 -67
- package/.buildkite/build-windows-installer.ps1 +0 -65
- package/.buildkite/build-windows.ps1 +0 -59
- package/.buildkite/fetch-search-replace.sh +0 -65
- package/.buildkite/pack-release.sh +0 -26
- package/.buildkite/pipeline.yml +0 -81
- package/.buildkite/shared-pipeline-vars +0 -16
- package/.buildkite/sign-windows.ps1 +0 -21
- package/.buildkite/test-windows-installer-download.ps1 +0 -54
- package/.buildkite/test_pipeline.py +0 -69
- package/.bundle/config +0 -4
- package/.editorconfig +0 -11
- package/.prettierignore +0 -13
- package/.ruby-version +0 -1
- package/.sonarcloud.properties +0 -2
- package/.xcode-version +0 -1
- package/AGENTS.md +0 -101
- package/CLAUDE.md +0 -4
- package/Gemfile +0 -8
- package/Gemfile.lock +0 -377
- package/Makefile +0 -293
- package/cmd/installer-payload/main.go +0 -19
- package/cmd/installer-version/main.go +0 -22
- package/cmd/stamp-version/main.go +0 -25
- package/cmd/vip-next/auth_bootstrap.go +0 -139
- package/cmd/vip-next/auth_bootstrap_test.go +0 -379
- package/cmd/vip-next/auth_bypass_wiring_test.go +0 -162
- package/cmd/vip-next/cli_error_hook_test.go +0 -91
- package/cmd/vip-next/commands/app.go +0 -23
- package/cmd/vip-next/commands/app_debug_test.go +0 -89
- package/cmd/vip-next/commands/app_deploy.go +0 -217
- package/cmd/vip-next/commands/app_deploy_test.go +0 -297
- package/cmd/vip-next/commands/app_deploy_validate.go +0 -58
- package/cmd/vip-next/commands/app_get.go +0 -293
- package/cmd/vip-next/commands/app_get_test.go +0 -226
- package/cmd/vip-next/commands/app_list.go +0 -93
- package/cmd/vip-next/commands/app_list_test.go +0 -95
- package/cmd/vip-next/commands/backup.go +0 -16
- package/cmd/vip-next/commands/backup_db.go +0 -137
- package/cmd/vip-next/commands/backup_db_test.go +0 -187
- package/cmd/vip-next/commands/cache.go +0 -16
- package/cmd/vip-next/commands/cache_purge_url.go +0 -90
- package/cmd/vip-next/commands/cache_purge_url_test.go +0 -154
- package/cmd/vip-next/commands/config.go +0 -17
- package/cmd/vip-next/commands/config_debug_test.go +0 -137
- package/cmd/vip-next/commands/config_envvar.go +0 -16
- package/cmd/vip-next/commands/config_envvar_delete.go +0 -135
- package/cmd/vip-next/commands/config_envvar_delete_test.go +0 -140
- package/cmd/vip-next/commands/config_envvar_get.go +0 -72
- package/cmd/vip-next/commands/config_envvar_get_all.go +0 -58
- package/cmd/vip-next/commands/config_envvar_get_all_test.go +0 -83
- package/cmd/vip-next/commands/config_envvar_get_test.go +0 -79
- package/cmd/vip-next/commands/config_envvar_list.go +0 -70
- package/cmd/vip-next/commands/config_envvar_list_test.go +0 -134
- package/cmd/vip-next/commands/config_envvar_set.go +0 -162
- package/cmd/vip-next/commands/config_envvar_set_test.go +0 -251
- package/cmd/vip-next/commands/config_software.go +0 -229
- package/cmd/vip-next/commands/config_software_test.go +0 -161
- package/cmd/vip-next/commands/config_software_update.go +0 -270
- package/cmd/vip-next/commands/config_software_update_test.go +0 -334
- package/cmd/vip-next/commands/db.go +0 -16
- package/cmd/vip-next/commands/db_phpmyadmin.go +0 -122
- package/cmd/vip-next/commands/db_phpmyadmin_test.go +0 -277
- package/cmd/vip-next/commands/defensive_mode.go +0 -106
- package/cmd/vip-next/commands/defensive_mode_configure.go +0 -150
- package/cmd/vip-next/commands/defensive_mode_disable.go +0 -62
- package/cmd/vip-next/commands/defensive_mode_enable.go +0 -62
- package/cmd/vip-next/commands/defensive_mode_test.go +0 -389
- package/cmd/vip-next/commands/devenv.go +0 -49
- package/cmd/vip-next/commands/devenv_create_appinfo.go +0 -158
- package/cmd/vip-next/commands/devenv_create_appinfo_test.go +0 -29
- package/cmd/vip-next/commands/devenv_create_test.go +0 -269
- package/cmd/vip-next/commands/devenv_data.go +0 -86
- package/cmd/vip-next/commands/devenv_data_confirm_test.go +0 -49
- package/cmd/vip-next/commands/devenv_debug_test.go +0 -34
- package/cmd/vip-next/commands/devenv_e2e_gate_test.go +0 -17
- package/cmd/vip-next/commands/devenv_e2e_test.go +0 -34
- package/cmd/vip-next/commands/devenv_envvar.go +0 -186
- package/cmd/vip-next/commands/devenv_envvar_test.go +0 -183
- package/cmd/vip-next/commands/devenv_exec.go +0 -75
- package/cmd/vip-next/commands/devenv_exec_test.go +0 -39
- package/cmd/vip-next/commands/devenv_flag_grammar_test.go +0 -241
- package/cmd/vip-next/commands/devenv_lifecycle.go +0 -785
- package/cmd/vip-next/commands/devenv_logs.go +0 -29
- package/cmd/vip-next/commands/devenv_resolve.go +0 -118
- package/cmd/vip-next/commands/devenv_resolve_test.go +0 -221
- package/cmd/vip-next/commands/devenv_sync.go +0 -256
- package/cmd/vip-next/commands/devenv_sync_sites.go +0 -116
- package/cmd/vip-next/commands/devenv_sync_sites_test.go +0 -151
- package/cmd/vip-next/commands/devenv_sync_test.go +0 -63
- package/cmd/vip-next/commands/devenv_telemetry.go +0 -265
- package/cmd/vip-next/commands/devenv_telemetry_test.go +0 -322
- package/cmd/vip-next/commands/devenv_test.go +0 -60
- package/cmd/vip-next/commands/devenv_update.go +0 -207
- package/cmd/vip-next/commands/devenv_update_test.go +0 -109
- package/cmd/vip-next/commands/devenv_versions_proxy_test.go +0 -133
- package/cmd/vip-next/commands/edge_workers.go +0 -197
- package/cmd/vip-next/commands/edge_workers_flags.go +0 -56
- package/cmd/vip-next/commands/edge_workers_local.go +0 -127
- package/cmd/vip-next/commands/edge_workers_mutation.go +0 -130
- package/cmd/vip-next/commands/edge_workers_read.go +0 -103
- package/cmd/vip-next/commands/edge_workers_test.go +0 -272
- package/cmd/vip-next/commands/export.go +0 -16
- package/cmd/vip-next/commands/export_sql.go +0 -333
- package/cmd/vip-next/commands/export_sql_test.go +0 -321
- package/cmd/vip-next/commands/format_env.go +0 -17
- package/cmd/vip-next/commands/import.go +0 -19
- package/cmd/vip-next/commands/import_debug_test.go +0 -110
- package/cmd/vip-next/commands/import_media.go +0 -433
- package/cmd/vip-next/commands/import_media_abort.go +0 -76
- package/cmd/vip-next/commands/import_media_confirm.go +0 -83
- package/cmd/vip-next/commands/import_media_confirm_test.go +0 -249
- package/cmd/vip-next/commands/import_media_fetch_test.go +0 -98
- package/cmd/vip-next/commands/import_media_status.go +0 -58
- package/cmd/vip-next/commands/import_media_test.go +0 -370
- package/cmd/vip-next/commands/import_sql.go +0 -1161
- package/cmd/vip-next/commands/import_sql_status.go +0 -67
- package/cmd/vip-next/commands/import_sql_test.go +0 -746
- package/cmd/vip-next/commands/import_validate_files.go +0 -157
- package/cmd/vip-next/commands/import_validate_files_test.go +0 -157
- package/cmd/vip-next/commands/import_validate_sql.go +0 -207
- package/cmd/vip-next/commands/import_validate_sql_test.go +0 -293
- package/cmd/vip-next/commands/login.go +0 -53
- package/cmd/vip-next/commands/login_test.go +0 -25
- package/cmd/vip-next/commands/logout.go +0 -43
- package/cmd/vip-next/commands/logout_test.go +0 -158
- package/cmd/vip-next/commands/logs.go +0 -169
- package/cmd/vip-next/commands/logs_test.go +0 -174
- package/cmd/vip-next/commands/nodeflag_aliases.go +0 -59
- package/cmd/vip-next/commands/progress_renderer.go +0 -118
- package/cmd/vip-next/commands/progress_renderer_test.go +0 -28
- package/cmd/vip-next/commands/searchreplace.go +0 -75
- package/cmd/vip-next/commands/searchreplace_debug_test.go +0 -82
- package/cmd/vip-next/commands/searchreplace_test.go +0 -155
- package/cmd/vip-next/commands/slowlogs.go +0 -167
- package/cmd/vip-next/commands/slowlogs_test.go +0 -159
- package/cmd/vip-next/commands/sqlreport.go +0 -183
- package/cmd/vip-next/commands/sqlreport_test.go +0 -66
- package/cmd/vip-next/commands/sync.go +0 -189
- package/cmd/vip-next/commands/sync_confirm.go +0 -121
- package/cmd/vip-next/commands/sync_confirm_test.go +0 -202
- package/cmd/vip-next/commands/sync_render.go +0 -207
- package/cmd/vip-next/commands/sync_render_test.go +0 -101
- package/cmd/vip-next/commands/sync_test.go +0 -148
- package/cmd/vip-next/commands/update.go +0 -85
- package/cmd/vip-next/commands/update_test.go +0 -49
- package/cmd/vip-next/commands/whoami.go +0 -161
- package/cmd/vip-next/commands/whoami_debug_test.go +0 -79
- package/cmd/vip-next/commands/whoami_test.go +0 -85
- package/cmd/vip-next/commands/wp.go +0 -376
- package/cmd/vip-next/commands/wp_debug_test.go +0 -32
- package/cmd/vip-next/commands/wp_test.go +0 -276
- package/cmd/vip-next/debug_args.go +0 -63
- package/cmd/vip-next/debug_test.go +0 -122
- package/cmd/vip-next/edge_workers_test.go +0 -108
- package/cmd/vip-next/flags_node_parity_test.go +0 -434
- package/cmd/vip-next/main.go +0 -391
- package/cmd/vip-next/main_test.go +0 -202
- package/cmd/vip-next/pendo_wiring_test.go +0 -148
- package/cmd/vip-next/root.go +0 -211
- package/cmd/vip-next/update_bootstrap.go +0 -94
- package/cmd/vip-next/update_bootstrap_test.go +0 -85
- package/cmd/vip-next/update_integration_test.go +0 -137
- package/cmd/vip-next-prerelease/main.go +0 -108
- package/cmd/vip-next-prerelease/main_test.go +0 -46
- package/dist/lib/analytics/clients/client.js +0 -1
- package/dist/lib/analytics/clients/pendo.js +0 -78
- package/docs/ARCHITECTURE.md +0 -95
- package/docs/BUILD-SIGNING.md +0 -501
- package/docs/CHANGELOG.md +0 -1844
- package/docs/COMMANDER-MIGRATION.md +0 -45
- package/docs/CONTRIBUTING.md +0 -29
- package/docs/CUTOVER-BREAKING-CHANGES.md +0 -261
- package/docs/DEBUGGING.md +0 -94
- package/docs/EDGE-WORKERS.md +0 -256
- package/docs/GO-UPDATES.md +0 -97
- package/docs/NPM-RELEASE-RECOVERY.md +0 -47
- package/docs/RELEASING.md +0 -211
- package/docs/SECURITY.md +0 -9
- package/docs/SETUP.md +0 -154
- package/docs/TESTING.md +0 -67
- package/docs/decisions/0001-operation-scoped-elevated-token-reuse.md +0 -87
- package/docs/dev-env-windows-wsl-testing.md +0 -191
- package/docs/vip-next-vip-command-reference.md +0 -257
- package/docs/vip-wp-line-parse-dfa.dot +0 -31
- package/eslint.config.js +0 -35
- package/fastlane/Fastfile +0 -204
- package/fastlane/example.env +0 -8
- package/fastlane/test_signing.rb +0 -83
- package/go.mod +0 -39
- package/go.sum +0 -127
- package/helpers/check-version.js +0 -16
- package/internal/appctx/app_resolver.go +0 -202
- package/internal/appctx/app_resolver_test.go +0 -187
- package/internal/appctx/confirm.go +0 -180
- package/internal/appctx/confirm_payload_test.go +0 -201
- package/internal/appctx/confirm_test.go +0 -120
- package/internal/appctx/context.go +0 -94
- package/internal/appctx/context_test.go +0 -56
- package/internal/appctx/env_resolver.go +0 -110
- package/internal/appctx/env_resolver_test.go +0 -215
- package/internal/appctx/format.go +0 -72
- package/internal/appctx/format_test.go +0 -75
- package/internal/appctx/interactive.go +0 -50
- package/internal/appctx/interactive_test.go +0 -134
- package/internal/appctx/middleware.go +0 -56
- package/internal/appctx/middleware_test.go +0 -88
- package/internal/appctx/prompts.go +0 -70
- package/internal/appctx/prompts_test.go +0 -97
- package/internal/appctx/required_args.go +0 -24
- package/internal/appctx/required_args_test.go +0 -38
- package/internal/appctx/telemetry.go +0 -22
- package/internal/appctx/telemetry_test.go +0 -42
- package/internal/appctx/wildcard.go +0 -29
- package/internal/appctx/wildcard_test.go +0 -53
- package/internal/auth/bypass.go +0 -84
- package/internal/auth/bypass_test.go +0 -97
- package/internal/auth/login.go +0 -156
- package/internal/auth/login_test.go +0 -184
- package/internal/auth/logout.go +0 -44
- package/internal/auth/logout_test.go +0 -78
- package/internal/auth/store.go +0 -130
- package/internal/auth/store_test.go +0 -339
- package/internal/auth/token.go +0 -117
- package/internal/auth/token_test.go +0 -90
- package/internal/backup/backup.go +0 -194
- package/internal/backup/backup_test.go +0 -228
- package/internal/cachepurge/cachepurge.go +0 -38
- package/internal/cachepurge/cachepurge_test.go +0 -92
- package/internal/customdeploy/archive.go +0 -205
- package/internal/customdeploy/archive_test.go +0 -174
- package/internal/customdeploy/customdeploy.go +0 -91
- package/internal/customdeploy/customdeploy_test.go +0 -82
- package/internal/debuglog/debuglog.go +0 -85
- package/internal/debuglog/debuglog_test.go +0 -44
- package/internal/defensivemode/api.go +0 -89
- package/internal/defensivemode/api_test.go +0 -122
- package/internal/devenv/adapters.go +0 -168
- package/internal/devenv/adapters_test.go +0 -44
- package/internal/devenv/adopt.go +0 -20
- package/internal/devenv/adopt_setup_test.go +0 -30
- package/internal/devenv/compose/labels.go +0 -90
- package/internal/devenv/compose/labels_test.go +0 -136
- package/internal/devenv/compose/project.go +0 -88
- package/internal/devenv/compose/project_test.go +0 -148
- package/internal/devenv/compose/render.go +0 -54
- package/internal/devenv/compose/render_test.go +0 -90
- package/internal/devenv/compose/services.go +0 -337
- package/internal/devenv/compose/services_test.go +0 -258
- package/internal/devenv/compose/testdata/full.golden.yml +0 -265
- package/internal/devenv/compose/types.go +0 -97
- package/internal/devenv/compose/types_test.go +0 -61
- package/internal/devenv/compose/view.go +0 -205
- package/internal/devenv/compose/view_test.go +0 -120
- package/internal/devenv/configfile.go +0 -300
- package/internal/devenv/configfile_test.go +0 -246
- package/internal/devenv/create.go +0 -130
- package/internal/devenv/create_test.go +0 -98
- package/internal/devenv/debug.go +0 -4
- package/internal/devenv/debug_test.go +0 -103
- package/internal/devenv/devenv.go +0 -434
- package/internal/devenv/devenv_test.go +0 -77
- package/internal/devenv/devexec.go +0 -140
- package/internal/devenv/devexec_test.go +0 -91
- package/internal/devenv/devlog/devlog.go +0 -219
- package/internal/devenv/devlog/devlog_test.go +0 -112
- package/internal/devenv/devterm/devterm.go +0 -65
- package/internal/devenv/devterm/devterm_pty.go +0 -58
- package/internal/devenv/devterm/devterm_stub.go +0 -20
- package/internal/devenv/devterm/devterm_test.go +0 -78
- package/internal/devenv/dockercli/capture.go +0 -84
- package/internal/devenv/dockercli/capture_test.go +0 -33
- package/internal/devenv/dockercli/compose.go +0 -30
- package/internal/devenv/dockercli/compose_test.go +0 -35
- package/internal/devenv/dockercli/runner.go +0 -214
- package/internal/devenv/dockercli/runner_test.go +0 -157
- package/internal/devenv/dockercli/socket.go +0 -56
- package/internal/devenv/dockercli/socket_test.go +0 -52
- package/internal/devenv/e2e_gate_test.go +0 -17
- package/internal/devenv/e2e_test.go +0 -499
- package/internal/devenv/e2esafety/gate_wiring_test.go +0 -90
- package/internal/devenv/e2esafety/safety.go +0 -52
- package/internal/devenv/e2esafety/safety_test.go +0 -71
- package/internal/devenv/eachenv_test.go +0 -132
- package/internal/devenv/editor.go +0 -82
- package/internal/devenv/editor_test.go +0 -60
- package/internal/devenv/envfile.go +0 -287
- package/internal/devenv/envvar.go +0 -165
- package/internal/devenv/envvar_test.go +0 -178
- package/internal/devenv/hostops/context.go +0 -38
- package/internal/devenv/hostops/context_test.go +0 -24
- package/internal/devenv/hostops/e2e_gate_test.go +0 -17
- package/internal/devenv/hostops/e2e_test.go +0 -429
- package/internal/devenv/hostops/elevate.go +0 -248
- package/internal/devenv/hostops/elevate_message_test.go +0 -35
- package/internal/devenv/hostops/elevate_test.go +0 -111
- package/internal/devenv/hostops/hosts.go +0 -255
- package/internal/devenv/hostops/hosts_test.go +0 -178
- package/internal/devenv/hostops/thumbprint_test.go +0 -57
- package/internal/devenv/hostops/trust.go +0 -115
- package/internal/devenv/hostops/trust_test.go +0 -90
- package/internal/devenv/hostrefresh.go +0 -127
- package/internal/devenv/hostrefresh_test.go +0 -123
- package/internal/devenv/importdata.go +0 -491
- package/internal/devenv/importdata_test.go +0 -142
- package/internal/devenv/importdecompress_test.go +0 -90
- package/internal/devenv/importgate_test.go +0 -166
- package/internal/devenv/importvalidate.go +0 -437
- package/internal/devenv/importvalidate_test.go +0 -293
- package/internal/devenv/info_table.go +0 -165
- package/internal/devenv/info_table_test.go +0 -111
- package/internal/devenv/instancedata/instancedata.go +0 -239
- package/internal/devenv/instancedata/instancedata_test.go +0 -281
- package/internal/devenv/instancedata/testdata/legacy_keys.json +0 -16
- package/internal/devenv/instancedata/testdata/unknown_keys.json +0 -19
- package/internal/devenv/lifecycle/adopt.go +0 -24
- package/internal/devenv/lifecycle/adopt_test.go +0 -43
- package/internal/devenv/lifecycle/health.go +0 -28
- package/internal/devenv/lifecycle/health_test.go +0 -34
- package/internal/devenv/lifecycle/hosts.go +0 -42
- package/internal/devenv/lifecycle/hosts_test.go +0 -41
- package/internal/devenv/lifecycle/migrate.go +0 -44
- package/internal/devenv/lifecycle/migrate_test.go +0 -78
- package/internal/devenv/lifecycle/pull.go +0 -19
- package/internal/devenv/lifecycle/pull_test.go +0 -29
- package/internal/devenv/lifecycle/setup.go +0 -35
- package/internal/devenv/lifecycle/setup_test.go +0 -46
- package/internal/devenv/lifecycle/start.go +0 -132
- package/internal/devenv/lifecycle/start_test.go +0 -350
- package/internal/devenv/lifecycle/teardown.go +0 -32
- package/internal/devenv/lifecycle/teardown_test.go +0 -83
- package/internal/devenv/lifecycle/types.go +0 -86
- package/internal/devenv/lifecycle/waiter.go +0 -49
- package/internal/devenv/lifecycle/waiter_test.go +0 -98
- package/internal/devenv/list.go +0 -49
- package/internal/devenv/list_test.go +0 -24
- package/internal/devenv/logs.go +0 -43
- package/internal/devenv/logs_test.go +0 -28
- package/internal/devenv/materialize.go +0 -44
- package/internal/devenv/materialize_test.go +0 -112
- package/internal/devenv/paths/paths.go +0 -42
- package/internal/devenv/paths/paths_test.go +0 -39
- package/internal/devenv/postimport.go +0 -134
- package/internal/devenv/postimport_test.go +0 -389
- package/internal/devenv/proxy/ca.go +0 -110
- package/internal/devenv/proxy/ca_test.go +0 -111
- package/internal/devenv/proxy/network.go +0 -28
- package/internal/devenv/proxy/network_test.go +0 -68
- package/internal/devenv/proxy/ports.go +0 -104
- package/internal/devenv/proxy/ports_test.go +0 -76
- package/internal/devenv/proxy/proxy.go +0 -143
- package/internal/devenv/proxy/proxy_test.go +0 -149
- package/internal/devenv/proxy/scripts/gen-certs.sh +0 -73
- package/internal/devenv/proxy/spec.go +0 -60
- package/internal/devenv/proxy/spec_test.go +0 -44
- package/internal/devenv/proxy/testhelpers_test.go +0 -7
- package/internal/devenv/proxy_policy_test.go +0 -155
- package/internal/devenv/syncplan.go +0 -573
- package/internal/devenv/syncplan_test.go +0 -256
- package/internal/devenv/syncsql.go +0 -247
- package/internal/devenv/syncsql_repair.go +0 -169
- package/internal/devenv/syncsql_repair_test.go +0 -150
- package/internal/devenv/syncsql_test.go +0 -220
- package/internal/devenv/update.go +0 -87
- package/internal/devenv/update_test.go +0 -47
- package/internal/edgeworkers/api.go +0 -173
- package/internal/edgeworkers/api_test.go +0 -256
- package/internal/edgeworkers/build.go +0 -188
- package/internal/edgeworkers/build_test.go +0 -175
- package/internal/edgeworkers/confirmation.go +0 -72
- package/internal/edgeworkers/deployment.go +0 -156
- package/internal/edgeworkers/deployment_test.go +0 -165
- package/internal/edgeworkers/output.go +0 -131
- package/internal/edgeworkers/output_test.go +0 -98
- package/internal/edgeworkers/project.go +0 -264
- package/internal/edgeworkers/project_test.go +0 -167
- package/internal/edgeworkers/scaffold.go +0 -88
- package/internal/edgeworkers/templates/README.md +0 -25
- package/internal/edgeworkers/templates/edge-workers.json +0 -4
- package/internal/edgeworkers/templates/gitignore +0 -2
- package/internal/edgeworkers/templates/package.json +0 -16
- package/internal/edgeworkers/templates/tsconfig.json +0 -6
- package/internal/edgeworkers/templates/worker.ts +0 -19
- package/internal/edgeworkers/types.go +0 -37
- package/internal/edgeworkers/validation.go +0 -177
- package/internal/envalias/envalias.go +0 -50
- package/internal/envalias/envalias_test.go +0 -147
- package/internal/envvar/envvar.go +0 -253
- package/internal/envvar/envvar_test.go +0 -274
- package/internal/envvar/reload_manifest.go +0 -99
- package/internal/envvar/reload_manifest_test.go +0 -44
- package/internal/envvar/value_confirm.go +0 -26
- package/internal/envvar/value_confirm_test.go +0 -22
- package/internal/exit/exit.go +0 -94
- package/internal/exit/exit_test.go +0 -119
- package/internal/gql/SCHEMA.md +0 -21
- package/internal/gql/client.go +0 -54
- package/internal/gql/client_test.go +0 -71
- package/internal/gql/debug_test.go +0 -79
- package/internal/gql/decoder_compat_helpers_test.go +0 -35
- package/internal/gql/decoder_compat_test.go +0 -78
- package/internal/gql/doc.go +0 -13
- package/internal/gql/edgeworkerinput/input.go +0 -58
- package/internal/gql/edgeworkerinput/input_test.go +0 -52
- package/internal/gql/error.go +0 -163
- package/internal/gql/error_test.go +0 -203
- package/internal/gql/generated.go +0 -10425
- package/internal/gql/genqlient.yaml +0 -26
- package/internal/gql/import_sql_marshal_test.go +0 -69
- package/internal/gql/operation.go +0 -67
- package/internal/gql/operation_test.go +0 -60
- package/internal/gql/operations/app_get.graphql +0 -43
- package/internal/gql/operations/app_list.graphql +0 -9
- package/internal/gql/operations/app_resolve.graphql +0 -37
- package/internal/gql/operations/backup_export_deploy.graphql +0 -123
- package/internal/gql/operations/cachepurge.graphql +0 -6
- package/internal/gql/operations/defensive_mode.graphql +0 -13
- package/internal/gql/operations/dev_env_create.graphql +0 -38
- package/internal/gql/operations/dev_env_sync.graphql +0 -15
- package/internal/gql/operations/edge_workers.graphql +0 -53
- package/internal/gql/operations/envvar.graphql +0 -52
- package/internal/gql/operations/fragments.graphql +0 -5
- package/internal/gql/operations/import_media.graphql +0 -61
- package/internal/gql/operations/import_sql.graphql +0 -135
- package/internal/gql/operations/logs.graphql +0 -22
- package/internal/gql/operations/me.graphql +0 -13
- package/internal/gql/operations/phpmyadmin.graphql +0 -21
- package/internal/gql/operations/slowlogs.graphql +0 -25
- package/internal/gql/operations/software.graphql +0 -53
- package/internal/gql/operations/sync.graphql +0 -51
- package/internal/gql/operations/wp.graphql +0 -37
- package/internal/gql/proxy_test.go +0 -62
- package/internal/gql/rechallenge.go +0 -218
- package/internal/gql/rechallenge_test.go +0 -471
- package/internal/gql/retry.go +0 -130
- package/internal/gql/retry_test.go +0 -230
- package/internal/gql/schema.gql +0 -9337
- package/internal/gql/transport.go +0 -65
- package/internal/gql/transport_helper.go +0 -24
- package/internal/httpproxy/callers_test.go +0 -211
- package/internal/httpproxy/debug_test.go +0 -32
- package/internal/httpproxy/httpproxy.go +0 -315
- package/internal/httpproxy/httpproxy_test.go +0 -435
- package/internal/installer/version.go +0 -41
- package/internal/installer/version_test.go +0 -33
- package/internal/keychain/fallback.go +0 -93
- package/internal/keychain/keychain.go +0 -197
- package/internal/keychain/keychain_select_test.go +0 -34
- package/internal/keychain/keychain_test.go +0 -112
- package/internal/logsapi/logsapi.go +0 -165
- package/internal/logsapi/logsapi_test.go +0 -82
- package/internal/mediaimport/mediaimport.go +0 -26
- package/internal/mediaimport/mediaimport_test.go +0 -46
- package/internal/mediaimport/status.go +0 -162
- package/internal/mediaimport/status_test.go +0 -159
- package/internal/mediaimport/tracker.go +0 -116
- package/internal/mediaimport/tracker_test.go +0 -62
- package/internal/nodeflags/nodeflags.go +0 -130
- package/internal/nodeflags/nodeflags_test.go +0 -138
- package/internal/nodeflags/optionalvalue.go +0 -123
- package/internal/nodeflags/optionalvalue_test.go +0 -158
- package/internal/output/csv.go +0 -178
- package/internal/output/fields.go +0 -22
- package/internal/output/fields_test.go +0 -21
- package/internal/output/ids.go +0 -26
- package/internal/output/ids_test.go +0 -32
- package/internal/output/json.go +0 -113
- package/internal/output/keyvalue.go +0 -35
- package/internal/output/keyvalue_block.go +0 -77
- package/internal/output/keyvalue_block_test.go +0 -95
- package/internal/output/keyvalue_test.go +0 -35
- package/internal/output/ordered.go +0 -44
- package/internal/output/ordered_test.go +0 -42
- package/internal/output/output.go +0 -62
- package/internal/output/output_test.go +0 -400
- package/internal/output/table.go +0 -231
- package/internal/output/table_layout.go +0 -472
- package/internal/output/table_layout_test.go +0 -107
- package/internal/output/table_layout_tty_test.go +0 -63
- package/internal/output/text.go +0 -24
- package/internal/output/text_test.go +0 -31
- package/internal/output/typename.go +0 -35
- package/internal/output/typename_test.go +0 -48
- package/internal/parity/backup_export_deploy_scenario_test.go +0 -285
- package/internal/parity/cache_scenario_test.go +0 -173
- package/internal/parity/command_surface_scenario_test.go +0 -530
- package/internal/parity/defensive_mode_scenario_test.go +0 -133
- package/internal/parity/diff.go +0 -128
- package/internal/parity/diff_test.go +0 -155
- package/internal/parity/differential_test.go +0 -166
- package/internal/parity/edge_workers_build_smoke_test.go +0 -69
- package/internal/parity/edge_workers_cases_test.go +0 -77
- package/internal/parity/edge_workers_debug_test.go +0 -87
- package/internal/parity/edge_workers_differential_test.go +0 -483
- package/internal/parity/edge_workers_prompt_test.go +0 -151
- package/internal/parity/env.go +0 -176
- package/internal/parity/env_test.go +0 -211
- package/internal/parity/envvar_mutation_scenario_test.go +0 -188
- package/internal/parity/harness.go +0 -28
- package/internal/parity/harness_test.go +0 -62
- package/internal/parity/import_media_scenario_test.go +0 -207
- package/internal/parity/import_sql_scenario_test.go +0 -198
- package/internal/parity/import_validate_sql_scenario_test.go +0 -68
- package/internal/parity/keychain.go +0 -538
- package/internal/parity/keychain_test.go +0 -201
- package/internal/parity/m5_differential_test.go +0 -185
- package/internal/parity/m5_scenarios_test.go +0 -225
- package/internal/parity/nodebin.go +0 -120
- package/internal/parity/nodebin_test.go +0 -148
- package/internal/parity/parker.go +0 -491
- package/internal/parity/parker_discovery.go +0 -373
- package/internal/parity/parker_discovery_test.go +0 -267
- package/internal/parity/parker_live_test.go +0 -164
- package/internal/parity/parker_test.go +0 -480
- package/internal/parity/pendo_test.go +0 -122
- package/internal/parity/phpmyadmin_scenario_test.go +0 -214
- package/internal/parity/runner.go +0 -56
- package/internal/parity/runner_test.go +0 -67
- package/internal/parity/scenario.go +0 -82
- package/internal/parity/scenario_test.go +0 -52
- package/internal/parity/surface_differential_test.go +0 -494
- package/internal/parity/sync_scenario_test.go +0 -172
- package/internal/parity/vendored_src_test.go +0 -84
- package/internal/parity/whoami_scenario_test.go +0 -69
- package/internal/parity/wp_scenario_test.go +0 -428
- package/internal/phpmyadmin/client.go +0 -221
- package/internal/phpmyadmin/client_test.go +0 -418
- package/internal/poll/poll.go +0 -85
- package/internal/poll/poll_test.go +0 -136
- package/internal/polling/polling.go +0 -97
- package/internal/polling/polling_test.go +0 -59
- package/internal/rechallenge/browser.go +0 -16
- package/internal/rechallenge/client.go +0 -198
- package/internal/rechallenge/client_test.go +0 -169
- package/internal/rechallenge/errors.go +0 -137
- package/internal/rechallenge/errors_test.go +0 -81
- package/internal/rechallenge/flow.go +0 -232
- package/internal/rechallenge/flow_noninteractive_test.go +0 -285
- package/internal/rechallenge/flow_test.go +0 -217
- package/internal/rechallenge/interactive.go +0 -90
- package/internal/rechallenge/interactive_test.go +0 -106
- package/internal/rechallenge/redact.go +0 -36
- package/internal/rechallenge/redact_test.go +0 -142
- package/internal/rechallenge/tokencache.go +0 -148
- package/internal/rechallenge/tokencache_test.go +0 -139
- package/internal/rechallenge/types.go +0 -100
- package/internal/rechallenge/types_test.go +0 -56
- package/internal/redact/redact.go +0 -99
- package/internal/redact/redact_test.go +0 -80
- package/internal/releasepromotion/buildkite.go +0 -233
- package/internal/releasepromotion/buildkite_test.go +0 -284
- package/internal/releasepromotion/contract.go +0 -165
- package/internal/releasepromotion/contract_test.go +0 -211
- package/internal/releasepromotion/github.go +0 -378
- package/internal/releasepromotion/github_test.go +0 -399
- package/internal/releasepromotion/optional_installers_test.go +0 -87
- package/internal/releasepromotion/promoter.go +0 -134
- package/internal/releasepromotion/promoter_test.go +0 -147
- package/internal/releasepromotion/verify.go +0 -239
- package/internal/releasepromotion/verify_test.go +0 -296
- package/internal/searchreplace/debug_test.go +0 -71
- package/internal/searchreplace/dumpdetails.go +0 -104
- package/internal/searchreplace/dumpdetails_test.go +0 -86
- package/internal/searchreplace/searchreplace.go +0 -261
- package/internal/searchreplace/searchreplace_test.go +0 -250
- package/internal/siteimport/debug_test.go +0 -34
- package/internal/siteimport/siteimport.go +0 -18
- package/internal/siteimport/siteimport_test.go +0 -19
- package/internal/siteimport/sitetype.go +0 -74
- package/internal/siteimport/sitetype_test.go +0 -62
- package/internal/siteimport/status.go +0 -282
- package/internal/siteimport/status_test.go +0 -234
- package/internal/slowlogsapi/slowlogsapi.go +0 -176
- package/internal/slowlogsapi/slowlogsapi_test.go +0 -93
- package/internal/softwaresettings/format.go +0 -192
- package/internal/softwaresettings/format_test.go +0 -123
- package/internal/sqlexport/diskspace.go +0 -36
- package/internal/sqlexport/diskspace_unix.go +0 -24
- package/internal/sqlexport/diskspace_windows.go +0 -26
- package/internal/sqlexport/download.go +0 -75
- package/internal/sqlexport/download_test.go +0 -103
- package/internal/sqlexport/export.go +0 -321
- package/internal/sqlexport/export_test.go +0 -313
- package/internal/sqlexport/format.go +0 -44
- package/internal/sqlexport/livecopy.go +0 -150
- package/internal/sqlexport/livecopy_test.go +0 -273
- package/internal/sqlvalidation/devenv_checks_test.go +0 -134
- package/internal/sqlvalidation/filename.go +0 -30
- package/internal/sqlvalidation/line_by_line.go +0 -91
- package/internal/sqlvalidation/line_by_line_test.go +0 -165
- package/internal/sqlvalidation/multisite.go +0 -31
- package/internal/sqlvalidation/multisite_test.go +0 -34
- package/internal/sqlvalidation/sql.go +0 -510
- package/internal/sqlvalidation/sql_test.go +0 -206
- package/internal/sync/sync.go +0 -246
- package/internal/sync/sync_test.go +0 -253
- package/internal/telemetry/config.go +0 -34
- package/internal/telemetry/default.go +0 -67
- package/internal/telemetry/default_endpoint_test.go +0 -111
- package/internal/telemetry/pendo.go +0 -185
- package/internal/telemetry/pendo_auth_test.go +0 -92
- package/internal/telemetry/pendo_test.go +0 -252
- package/internal/telemetry/scrub.go +0 -90
- package/internal/telemetry/scrub_test.go +0 -131
- package/internal/telemetry/tracker.go +0 -102
- package/internal/telemetry/tracker_test.go +0 -76
- package/internal/telemetry/tracks.go +0 -82
- package/internal/telemetry/tracks_test.go +0 -129
- package/internal/telemetry/uuid.go +0 -50
- package/internal/telemetry/uuid_test.go +0 -90
- package/internal/tui/progress.go +0 -153
- package/internal/tui/progress_test.go +0 -89
- package/internal/tui/progress_tracker.go +0 -299
- package/internal/tui/progress_tracker_test.go +0 -155
- package/internal/update/archive.go +0 -134
- package/internal/update/archive_test.go +0 -132
- package/internal/update/download.go +0 -138
- package/internal/update/download_test.go +0 -32
- package/internal/update/github.go +0 -121
- package/internal/update/install.go +0 -265
- package/internal/update/install_test.go +0 -151
- package/internal/update/lock_unix.go +0 -23
- package/internal/update/lock_windows.go +0 -22
- package/internal/update/native_test.go +0 -70
- package/internal/update/notify.go +0 -91
- package/internal/update/ownership.go +0 -117
- package/internal/update/ownership_test.go +0 -102
- package/internal/update/release.go +0 -120
- package/internal/update/release_test.go +0 -168
- package/internal/update/service.go +0 -197
- package/internal/update/service_test.go +0 -118
- package/internal/update/state.go +0 -116
- package/internal/update/state_test.go +0 -132
- package/internal/upload/debug_test.go +0 -76
- package/internal/upload/filemeta.go +0 -112
- package/internal/upload/filemeta_test.go +0 -94
- package/internal/upload/multipart.go +0 -215
- package/internal/upload/multipart_test.go +0 -210
- package/internal/upload/orchestrate.go +0 -81
- package/internal/upload/parts.go +0 -39
- package/internal/upload/parts_test.go +0 -39
- package/internal/upload/presign.go +0 -103
- package/internal/upload/presign_test.go +0 -128
- package/internal/upload/proxy_test.go +0 -55
- package/internal/upload/putobject.go +0 -92
- package/internal/upload/putobject_test.go +0 -79
- package/internal/upload/retry.go +0 -45
- package/internal/upload/upload.go +0 -22
- package/internal/upload/xmlerror.go +0 -28
- package/internal/validatefiles/files.go +0 -105
- package/internal/validatefiles/files_test.go +0 -143
- package/internal/validatefiles/report.go +0 -172
- package/internal/validatefiles/validatefiles.go +0 -271
- package/internal/validatefiles/validatefiles_test.go +0 -127
- package/internal/version/stamp.go +0 -15
- package/internal/version/stamp_test.go +0 -25
- package/internal/version/version.go +0 -14
- package/internal/version/version_test.go +0 -25
- package/internal/wpshell/parser.go +0 -68
- package/internal/wpshell/parser_test.go +0 -58
- package/internal/wpshell/repl.go +0 -81
- package/internal/wpshell/repl_test.go +0 -71
- package/internal/wpshell/requote.go +0 -13
- package/internal/wpshell/requote_test.go +0 -15
- package/internal/wpssh/debug_test.go +0 -67
- package/internal/wpssh/wpssh.go +0 -124
- package/internal/wpssh/wpssh_test.go +0 -203
- package/internal/wpstream/debug_test.go +0 -116
- package/internal/wpstream/e2e_test.go +0 -178
- package/internal/wpstream/engineio.go +0 -291
- package/internal/wpstream/engineio_test.go +0 -82
- package/internal/wpstream/iostream.go +0 -391
- package/internal/wpstream/iostream_test.go +0 -138
- package/internal/wpstream/run.go +0 -364
- package/internal/wpstream/run_test.go +0 -184
- package/internal/wpstream/socketio.go +0 -435
- package/internal/wpstream/socketio_test.go +0 -402
- package/internal/wpstream/testdata/fixture-server.js +0 -54
- package/make.ps1 +0 -155
- package/node_modules/@apollo/client/__cjs/utilities/internal/types/DeferInfo.cjs +0 -3
- package/node_modules/@apollo/client/__cjs/utilities/internal/types/DeferInfo.cjs.map +0 -1
- package/node_modules/@apollo/client/__cjs/utilities/internal/types/DeferInfo.d.cts +0 -10
- package/node_modules/@apollo/client/utilities/internal/types/DeferInfo.d.ts +0 -10
- package/node_modules/@apollo/client/utilities/internal/types/DeferInfo.js +0 -2
- package/node_modules/@apollo/client/utilities/internal/types/DeferInfo.js.map +0 -1
- package/node_modules/argparse/LICENSE +0 -254
- package/node_modules/argparse/README.md +0 -84
- package/node_modules/argparse/package.json +0 -31
- package/node_modules/check-disk-space/dist/check-disk-space.cjs +0 -210
- package/node_modules/check-disk-space/dist/check-disk-space.d.ts +0 -53
- package/node_modules/fetch-retry/.eslintignore +0 -1
- package/node_modules/fetch-retry/.eslintrc.yml +0 -20
- package/node_modules/fetch-retry/.github/workflows/node.js.yml +0 -32
- package/node_modules/fetch-retry/.husky/pre-commit +0 -6
- package/node_modules/fetch-retry/.nycrc.json +0 -24
- package/node_modules/fetch-retry/.travis.yml +0 -3
- package/node_modules/fetch-retry/README.md +0 -128
- package/node_modules/fetch-retry/dist/fetch-retry.umd.js +0 -151
- package/node_modules/fetch-retry/index.d.ts +0 -29
- package/node_modules/fetch-retry/index.js +0 -143
- package/node_modules/fetch-retry/package.json +0 -41
- package/node_modules/fetch-retry/rollup.config.js +0 -12
- package/node_modules/fetch-retry/test/.eslintrc.yml +0 -7
- package/node_modules/fetch-retry/test/integration/index.js +0 -212
- package/node_modules/fetch-retry/test/integration/mock-api/index.js +0 -42
- package/node_modules/fetch-retry/test/unit/index.js +0 -1169
- package/node_modules/lando/node_modules/cliui/build/index.cjs +0 -302
- package/node_modules/lando/node_modules/cliui/build/lib/string-utils.js +0 -27
- package/node_modules/lando/node_modules/js-yaml/LICENSE +0 -21
- package/node_modules/lando/node_modules/js-yaml/README.md +0 -233
- package/node_modules/lando/node_modules/js-yaml/bin/js-yaml.js +0 -117
- package/node_modules/lando/node_modules/js-yaml/dist/js-yaml.js +0 -3022
- package/node_modules/lando/node_modules/js-yaml/dist/js-yaml.js.map +0 -1
- package/node_modules/lando/node_modules/js-yaml/dist/js-yaml.min.js +0 -2
- package/node_modules/lando/node_modules/js-yaml/dist/js-yaml.min.js.map +0 -1
- package/node_modules/lando/node_modules/js-yaml/dist/js-yaml.mjs +0 -3082
- package/node_modules/lando/node_modules/js-yaml/dist/js-yaml.mjs.map +0 -1
- package/node_modules/lando/node_modules/js-yaml/index.js +0 -44
- package/node_modules/lando/node_modules/js-yaml/lib/common.js +0 -50
- package/node_modules/lando/node_modules/js-yaml/lib/dumper.js +0 -937
- package/node_modules/lando/node_modules/js-yaml/lib/exception.js +0 -51
- package/node_modules/lando/node_modules/js-yaml/lib/index_vite_proxy.tmp.mjs +0 -37
- package/node_modules/lando/node_modules/js-yaml/lib/loader.js +0 -1803
- package/node_modules/lando/node_modules/js-yaml/lib/schema/core.js +0 -9
- package/node_modules/lando/node_modules/js-yaml/lib/schema/default.js +0 -20
- package/node_modules/lando/node_modules/js-yaml/lib/schema/failsafe.js +0 -14
- package/node_modules/lando/node_modules/js-yaml/lib/schema/json.js +0 -17
- package/node_modules/lando/node_modules/js-yaml/lib/schema.js +0 -109
- package/node_modules/lando/node_modules/js-yaml/lib/snippet.js +0 -96
- package/node_modules/lando/node_modules/js-yaml/lib/type/binary.js +0 -122
- package/node_modules/lando/node_modules/js-yaml/lib/type/bool.js +0 -35
- package/node_modules/lando/node_modules/js-yaml/lib/type/float.js +0 -99
- package/node_modules/lando/node_modules/js-yaml/lib/type/int.js +0 -142
- package/node_modules/lando/node_modules/js-yaml/lib/type/map.js +0 -8
- package/node_modules/lando/node_modules/js-yaml/lib/type/merge.js +0 -12
- package/node_modules/lando/node_modules/js-yaml/lib/type/null.js +0 -35
- package/node_modules/lando/node_modules/js-yaml/lib/type/omap.js +0 -45
- package/node_modules/lando/node_modules/js-yaml/lib/type/pairs.js +0 -50
- package/node_modules/lando/node_modules/js-yaml/lib/type/seq.js +0 -8
- package/node_modules/lando/node_modules/js-yaml/lib/type/set.js +0 -29
- package/node_modules/lando/node_modules/js-yaml/lib/type/str.js +0 -8
- package/node_modules/lando/node_modules/js-yaml/lib/type/timestamp.js +0 -88
- package/node_modules/lando/node_modules/js-yaml/lib/type.js +0 -66
- package/node_modules/lando/node_modules/js-yaml/package.json +0 -83
- package/node_modules/lando/node_modules/wrap-ansi/index.js +0 -216
- package/node_modules/lando/node_modules/wrap-ansi/package.json +0 -62
- package/node_modules/lando/node_modules/wrap-ansi/readme.md +0 -91
- package/node_modules/lando/node_modules/yargs/build/index.cjs +0 -2920
- package/node_modules/lando/node_modules/yargs/helpers/index.js +0 -14
- package/node_modules/lando/node_modules/yargs/index.cjs +0 -39
- package/node_modules/lando/node_modules/yargs/yargs +0 -9
- package/node_modules/lando/node_modules/yargs-parser/build/index.cjs +0 -1042
- package/node_modules/lando/plugins/lando-test/index.js +0 -3
- package/node_modules/lando/plugins/lando-test/plugin.yml +0 -2
- package/node_modules/ssh2/lib/protocol/crypto/build/Release/.deps/Release/obj.target/sshcrypto/src/binding.o.d +0 -265
- package/node_modules/ssh2/lib/protocol/crypto/build/Release/.deps/Release/obj.target/sshcrypto.node.d +0 -1
- package/node_modules/ssh2/lib/protocol/crypto/build/Release/.deps/Release/sshcrypto.node.d +0 -1
- package/node_modules/ssh2/lib/protocol/crypto/build/Release/obj.target/sshcrypto/src/binding.o +0 -0
- package/node_modules/ssh2/lib/protocol/crypto/build/Release/obj.target/sshcrypto.node +0 -0
- package/node_modules/ssh2/lib/protocol/crypto/build/Release/sshcrypto.node +0 -0
- package/packaging/macos/build-pkg.sh +0 -53
- package/packaging/macos/preinstall +0 -33
- package/packaging/macos/test-install.sh +0 -51
- package/packaging/macos/test_package.py +0 -74
- package/packaging/macos/uninstall.sh +0 -24
- package/packaging/macos/verify-pkg.py +0 -61
- package/packaging/windows/build-msi.ps1 +0 -153
- package/packaging/windows/test-msi.ps1 +0 -225
- package/packaging/windows/verify-msi.ps1 +0 -74
- package/packaging/windows/vip-next.wxs +0 -79
- package/scripts/catalog_script_test.go +0 -123
- package/scripts/vip-next-command-catalog.sh +0 -506
- package/test-utils/undici-mock.js +0 -25
- package/testdata/installer-fixture/main.go +0 -40
- package/testdata/parity/app-deploy-completed.yaml +0 -14
- package/testdata/parity/app-deploy-missing-token.yaml +0 -21
- package/testdata/parity/app-deploy-validate-clean.yaml +0 -11
- package/testdata/parity/app-deploy-validate-missing-themes.yaml +0 -21
- package/testdata/parity/app-get-baseline.yaml +0 -14
- package/testdata/parity/app-get-custom-deploy.yaml +0 -14
- package/testdata/parity/app-get-json.yaml +0 -14
- package/testdata/parity/app-get-not-found.yaml +0 -13
- package/testdata/parity/app-list-baseline.yaml +0 -14
- package/testdata/parity/app-list-csv.yaml +0 -13
- package/testdata/parity/app-list-empty.yaml +0 -13
- package/testdata/parity/app-list-ids.yaml +0 -26
- package/testdata/parity/app-list-json.yaml +0 -13
- package/testdata/parity/app-list-unknown-format.yaml +0 -29
- package/testdata/parity/backup-db-already-in-progress.yaml +0 -15
- package/testdata/parity/backup-db-completed.yaml +0 -14
- package/testdata/parity/backup-db-help.yaml +0 -10
- package/testdata/parity/cache-purge-url-empty.yaml +0 -26
- package/testdata/parity/cache-purge-url-from-file.yaml +0 -21
- package/testdata/parity/cache-purge-url-multi.yaml +0 -19
- package/testdata/parity/cache-purge-url-single.yaml +0 -18
- package/testdata/parity/defensive-mode-enable-with-rechallenge.yaml +0 -20
- package/testdata/parity/edge-workers-artifact-symlink.yaml +0 -8
- package/testdata/parity/edge-workers-bare-location.yaml +0 -8
- package/testdata/parity/edge-workers-bare-path.yaml +0 -8
- package/testdata/parity/edge-workers-bare-type.yaml +0 -8
- package/testdata/parity/edge-workers-build-all.yaml +0 -8
- package/testdata/parity/edge-workers-build-compiler-error.yaml +0 -8
- package/testdata/parity/edge-workers-build-empty.yaml +0 -8
- package/testdata/parity/edge-workers-build-missing-compiler.yaml +0 -8
- package/testdata/parity/edge-workers-build-name-all.yaml +0 -8
- package/testdata/parity/edge-workers-build-one.yaml +0 -8
- package/testdata/parity/edge-workers-delete-force.yaml +0 -8
- package/testdata/parity/edge-workers-delete-rejected.yaml +0 -8
- package/testdata/parity/edge-workers-deploy-active-update-enable.yaml +0 -8
- package/testdata/parity/edge-workers-deploy-active-update.yaml +0 -8
- package/testdata/parity/edge-workers-deploy-all-preparation-failure.yaml +0 -8
- package/testdata/parity/edge-workers-deploy-create-enable.yaml +0 -8
- package/testdata/parity/edge-workers-deploy-create.yaml +0 -8
- package/testdata/parity/edge-workers-deploy-enable-failure.yaml +0 -8
- package/testdata/parity/edge-workers-deploy-inactive-update-enable.yaml +0 -8
- package/testdata/parity/edge-workers-deploy-inactive-update.yaml +0 -8
- package/testdata/parity/edge-workers-deploy-location-clear.yaml +0 -8
- package/testdata/parity/edge-workers-deploy-location-preserve.yaml +0 -8
- package/testdata/parity/edge-workers-deploy-location-replace.yaml +0 -8
- package/testdata/parity/edge-workers-deploy-name-all.yaml +0 -8
- package/testdata/parity/edge-workers-deploy-production-refused.yaml +0 -8
- package/testdata/parity/edge-workers-deploy-production-skip.yaml +0 -8
- package/testdata/parity/edge-workers-deploy-skip-source-create.yaml +0 -8
- package/testdata/parity/edge-workers-deploy-skip-source.yaml +0 -8
- package/testdata/parity/edge-workers-deploy-skip-validate.yaml +0 -8
- package/testdata/parity/edge-workers-deploy-source-empty.yaml +0 -8
- package/testdata/parity/edge-workers-deploy-upload-failure.yaml +0 -8
- package/testdata/parity/edge-workers-disable.yaml +0 -8
- package/testdata/parity/edge-workers-double-dash.yaml +0 -8
- package/testdata/parity/edge-workers-duplicate-names.yaml +0 -8
- package/testdata/parity/edge-workers-enable-production-refused.yaml +0 -8
- package/testdata/parity/edge-workers-enable.yaml +0 -8
- package/testdata/parity/edge-workers-entry-escape.yaml +0 -8
- package/testdata/parity/edge-workers-get-empty-source.yaml +0 -8
- package/testdata/parity/edge-workers-get-missing.yaml +0 -8
- package/testdata/parity/edge-workers-get-no-source.yaml +0 -8
- package/testdata/parity/edge-workers-get-source.yaml +0 -8
- package/testdata/parity/edge-workers-get.yaml +0 -8
- package/testdata/parity/edge-workers-init-invalid-type.yaml +0 -8
- package/testdata/parity/edge-workers-init-nonempty.yaml +0 -8
- package/testdata/parity/edge-workers-init.yaml +0 -8
- package/testdata/parity/edge-workers-json-control-name.yaml +0 -8
- package/testdata/parity/edge-workers-list-csv.yaml +0 -8
- package/testdata/parity/edge-workers-list-empty-json.yaml +0 -8
- package/testdata/parity/edge-workers-list-empty.yaml +0 -8
- package/testdata/parity/edge-workers-list-json.yaml +0 -8
- package/testdata/parity/edge-workers-list-table.yaml +0 -8
- package/testdata/parity/edge-workers-mutation-graphql-error.yaml +0 -8
- package/testdata/parity/edge-workers-mutation-null.yaml +0 -8
- package/testdata/parity/edge-workers-new-invalid-location.yaml +0 -8
- package/testdata/parity/edge-workers-new-invalid-name.yaml +0 -8
- package/testdata/parity/edge-workers-new-location.yaml +0 -8
- package/testdata/parity/edge-workers-new.yaml +0 -8
- package/testdata/parity/edge-workers-read-null.yaml +0 -8
- package/testdata/parity/edge-workers-repeated-path.yaml +0 -8
- package/testdata/parity/edge-workers-repeated-type.yaml +0 -8
- package/testdata/parity/edge-workers-short-equals.yaml +0 -8
- package/testdata/parity/edge-workers-table-control-name.yaml +0 -8
- package/testdata/parity/edge-workers-unicode-order.yaml +0 -8
- package/testdata/parity/edge-workers-validate-all.yaml +0 -8
- package/testdata/parity/edge-workers-validate-invalid.yaml +0 -8
- package/testdata/parity/edge-workers-validate-name-all.yaml +0 -8
- package/testdata/parity/edge-workers-validate-no-artifact.yaml +0 -8
- package/testdata/parity/edge-workers-validate-no-name.yaml +0 -8
- package/testdata/parity/edge-workers-validate-null.yaml +0 -8
- package/testdata/parity/edge-workers-validate.yaml +0 -8
- package/testdata/parity/envvar-delete-baseline.yaml +0 -19
- package/testdata/parity/envvar-delete-prod-cancel.yaml +0 -41
- package/testdata/parity/envvar-delete-typed-mismatch.yaml +0 -44
- package/testdata/parity/envvar-get-baseline.yaml +0 -14
- package/testdata/parity/envvar-get-lowercase-input.yaml +0 -14
- package/testdata/parity/envvar-get-named-help.yaml +0 -24
- package/testdata/parity/envvar-get-not-found.yaml +0 -17
- package/testdata/parity/envvar-getall-baseline.yaml +0 -14
- package/testdata/parity/envvar-getall-empty.yaml +0 -15
- package/testdata/parity/envvar-getall-keyvalue.yaml +0 -22
- package/testdata/parity/envvar-list-baseline.yaml +0 -15
- package/testdata/parity/envvar-list-empty.yaml +0 -15
- package/testdata/parity/envvar-list-ids.yaml +0 -14
- package/testdata/parity/envvar-list-json.yaml +0 -14
- package/testdata/parity/envvar-list-keyvalue.yaml +0 -22
- package/testdata/parity/envvar-set-baseline.yaml +0 -21
- package/testdata/parity/envvar-set-invalid-name.yaml +0 -20
- package/testdata/parity/envvar-set-newrelic-blocked.yaml +0 -21
- package/testdata/parity/envvar-set-prod-cancel.yaml +0 -42
- package/testdata/parity/envvar-set-prod-confirm-skipped.yaml +0 -20
- package/testdata/parity/export-sql-completed.yaml +0 -14
- package/testdata/parity/export-sql-config-conflict.yaml +0 -21
- package/testdata/parity/export-sql-help.yaml +0 -11
- package/testdata/parity/import-media-abort-noninteractive.yaml +0 -19
- package/testdata/parity/import-media-help.yaml +0 -12
- package/testdata/parity/import-media-invalid-archive.yaml +0 -18
- package/testdata/parity/import-media-status-completed.yaml +0 -19
- package/testdata/parity/import-media-status-failed.yaml +0 -18
- package/testdata/parity/import-media-url-completed.yaml +0 -18
- package/testdata/parity/import-sql-bad-extension.yaml +0 -26
- package/testdata/parity/import-sql-help.yaml +0 -12
- package/testdata/parity/import-sql-in-progress.yaml +0 -26
- package/testdata/parity/import-sql-invalid-md5.yaml +0 -27
- package/testdata/parity/import-sql-noninteractive-abort.yaml +0 -20
- package/testdata/parity/import-sql-status-completed.yaml +0 -17
- package/testdata/parity/import-sql-status-no-job.yaml +0 -17
- package/testdata/parity/import-sql-validation-failure.yaml +0 -18
- package/testdata/parity/import-validate-files-clean.yaml +0 -18
- package/testdata/parity/import-validate-files-not-dir.yaml +0 -16
- package/testdata/parity/import-validate-sql-clean.yaml +0 -23
- package/testdata/parity/import-validate-sql-dangerous-stmt.yaml +0 -27
- package/testdata/parity/import-validate-sql-multisite-warn.yaml +0 -23
- package/testdata/parity/logs-baseline.yaml +0 -24
- package/testdata/parity/logs-batch.yaml +0 -24
- package/testdata/parity/logs-empty.yaml +0 -15
- package/testdata/parity/logs-format-json.yaml +0 -15
- package/testdata/parity/logs-limit-100.yaml +0 -24
- package/testdata/parity/phpmyadmin-error.yaml +0 -24
- package/testdata/parity/phpmyadmin-print.yaml +0 -22
- package/testdata/parity/phpmyadmin-silent.yaml +0 -16
- package/testdata/parity/recordings/app-get-baseline/app.json +0 -11
- package/testdata/parity/recordings/app-get-custom-deploy/app.json +0 -8
- package/testdata/parity/recordings/app-get-json/app.json +0 -11
- package/testdata/parity/recordings/app-get-not-found/app.json +0 -1
- package/testdata/parity/recordings/app-list-baseline/apps.json +0 -1
- package/testdata/parity/recordings/app-list-csv/apps.json +0 -1
- package/testdata/parity/recordings/app-list-empty/apps.json +0 -1
- package/testdata/parity/recordings/app-list-json/apps.json +0 -1
- package/testdata/parity/recordings/backup-db-already-in-progress/backup-status-1.json +0 -1
- package/testdata/parity/recordings/backup-db-already-in-progress/backup-status-2.json +0 -1
- package/testdata/parity/recordings/backup-db-completed/backup-status-1.json +0 -1
- package/testdata/parity/recordings/backup-db-completed/backup-status-2.json +0 -1
- package/testdata/parity/recordings/backup-db-completed/backup-status-3.json +0 -1
- package/testdata/parity/recordings/cache-purge-url-empty/resolve-app.json +0 -1
- package/testdata/parity/recordings/cache-purge-url-from-file/purge.json +0 -1
- package/testdata/parity/recordings/cache-purge-url-from-file/resolve-app.json +0 -1
- package/testdata/parity/recordings/cache-purge-url-from-file/urls.txt +0 -2
- package/testdata/parity/recordings/cache-purge-url-multi/purge.json +0 -1
- package/testdata/parity/recordings/cache-purge-url-multi/resolve-app.json +0 -1
- package/testdata/parity/recordings/cache-purge-url-single/purge.json +0 -1
- package/testdata/parity/recordings/cache-purge-url-single/resolve-app.json +0 -1
- package/testdata/parity/recordings/config-software-get/resolve-app.json +0 -1
- package/testdata/parity/recordings/config-software-update/resolve-app.json +0 -1
- package/testdata/parity/recordings/defensive-mode-enable-rechallenge/mutation-elevated.json +0 -1
- package/testdata/parity/recordings/defensive-mode-enable-rechallenge/mutation-success.json +0 -1
- package/testdata/parity/recordings/defensive-mode-enable-rechallenge/parker-create-session.json +0 -1
- package/testdata/parity/recordings/defensive-mode-enable-rechallenge/parker-exchange.json +0 -1
- package/testdata/parity/recordings/defensive-mode-enable-rechallenge/parker-status-verified.json +0 -1
- package/testdata/parity/recordings/envvar-delete-baseline/delete.json +0 -1
- package/testdata/parity/recordings/envvar-delete-baseline/resolve-app.json +0 -1
- package/testdata/parity/recordings/envvar-delete-prod-cancel/resolve-app.json +0 -1
- package/testdata/parity/recordings/envvar-delete-typed-mismatch/resolve-app.json +0 -1
- package/testdata/parity/recordings/envvar-get-baseline/envvars.json +0 -1
- package/testdata/parity/recordings/envvar-get-baseline/resolve-app.json +0 -1
- package/testdata/parity/recordings/envvar-get-lowercase-input/envvars.json +0 -1
- package/testdata/parity/recordings/envvar-get-lowercase-input/resolve-app.json +0 -1
- package/testdata/parity/recordings/envvar-get-named-help/envvars.json +0 -1
- package/testdata/parity/recordings/envvar-get-named-help/resolve-app.json +0 -1
- package/testdata/parity/recordings/envvar-get-not-found/envvars.json +0 -1
- package/testdata/parity/recordings/envvar-get-not-found/resolve-app.json +0 -1
- package/testdata/parity/recordings/envvar-getall-baseline/envvars.json +0 -1
- package/testdata/parity/recordings/envvar-getall-baseline/resolve-app.json +0 -1
- package/testdata/parity/recordings/envvar-getall-empty/envvars.json +0 -1
- package/testdata/parity/recordings/envvar-getall-empty/resolve-app.json +0 -1
- package/testdata/parity/recordings/envvar-getall-keyvalue/envvars.json +0 -1
- package/testdata/parity/recordings/envvar-getall-keyvalue/resolve-app.json +0 -1
- package/testdata/parity/recordings/envvar-list-baseline/envvars.json +0 -1
- package/testdata/parity/recordings/envvar-list-baseline/resolve-app.json +0 -1
- package/testdata/parity/recordings/envvar-list-empty/envvars.json +0 -1
- package/testdata/parity/recordings/envvar-list-empty/resolve-app.json +0 -1
- package/testdata/parity/recordings/envvar-list-ids/envvars.json +0 -1
- package/testdata/parity/recordings/envvar-list-ids/resolve-app.json +0 -1
- package/testdata/parity/recordings/envvar-list-json/envvars.json +0 -1
- package/testdata/parity/recordings/envvar-list-json/resolve-app.json +0 -1
- package/testdata/parity/recordings/envvar-list-keyvalue/envvars.json +0 -1
- package/testdata/parity/recordings/envvar-list-keyvalue/resolve-app.json +0 -1
- package/testdata/parity/recordings/envvar-set-baseline/add.json +0 -1
- package/testdata/parity/recordings/envvar-set-baseline/resolve-app.json +0 -1
- package/testdata/parity/recordings/envvar-set-baseline/value.txt +0 -1
- package/testdata/parity/recordings/envvar-set-invalid-name/resolve-app.json +0 -1
- package/testdata/parity/recordings/envvar-set-invalid-name/value.txt +0 -1
- package/testdata/parity/recordings/envvar-set-newrelic-blocked/resolve-app.json +0 -1
- package/testdata/parity/recordings/envvar-set-newrelic-blocked/value.txt +0 -1
- package/testdata/parity/recordings/envvar-set-prod-cancel/resolve-app.json +0 -1
- package/testdata/parity/recordings/envvar-set-prod-cancel/value.txt +0 -1
- package/testdata/parity/recordings/envvar-set-prod-confirm-skipped/add.json +0 -1
- package/testdata/parity/recordings/envvar-set-prod-confirm-skipped/resolve-app.json +0 -1
- package/testdata/parity/recordings/envvar-set-prod-confirm-skipped/value.txt +0 -1
- package/testdata/parity/recordings/export-sql-completed/export-status-1.json +0 -1
- package/testdata/parity/recordings/export-sql-completed/export-status-2.json +0 -1
- package/testdata/parity/recordings/import-media-invalid-archive/file.sql +0 -1
- package/testdata/parity/recordings/import-media-shared/abort-media-import.json +0 -1
- package/testdata/parity/recordings/import-media-shared/env-info.json +0 -1
- package/testdata/parity/recordings/import-media-shared/resolve-app.json +0 -1
- package/testdata/parity/recordings/import-media-shared/start-media-import.json +0 -1
- package/testdata/parity/recordings/import-media-status-completed/progress.json +0 -1
- package/testdata/parity/recordings/import-media-status-failed/progress.json +0 -1
- package/testdata/parity/recordings/import-media-url-completed/progress.json +0 -1
- package/testdata/parity/recordings/import-sql-bad-extension/file.txt +0 -1
- package/testdata/parity/recordings/import-sql-in-progress/env-info.json +0 -1
- package/testdata/parity/recordings/import-sql-in-progress/resolve-app.json +0 -1
- package/testdata/parity/recordings/import-sql-noninteractive-abort/clean.sql +0 -5
- package/testdata/parity/recordings/import-sql-shared/env-info.json +0 -1
- package/testdata/parity/recordings/import-sql-shared/multisite.json +0 -1
- package/testdata/parity/recordings/import-sql-shared/resolve-app.json +0 -1
- package/testdata/parity/recordings/import-sql-status-completed/progress.json +0 -1
- package/testdata/parity/recordings/import-sql-status-no-job/progress.json +0 -1
- package/testdata/parity/recordings/import-sql-validation-failure/dirty.sql +0 -6
- package/testdata/parity/recordings/import-validate-files-clean/config.json +0 -1
- package/testdata/parity/recordings/import-validate-files-clean/uploads/2020/06/a.jpg +0 -1
- package/testdata/parity/recordings/import-validate-files-clean/uploads/2020/06/b.png +0 -1
- package/testdata/parity/recordings/import-validate-sql-clean/clean.sql +0 -17
- package/testdata/parity/recordings/import-validate-sql-dangerous-stmt/dangerous.sql +0 -11
- package/testdata/parity/recordings/import-validate-sql-multisite-warn/multisite.sql +0 -12
- package/testdata/parity/recordings/logs-baseline/logs.json +0 -1
- package/testdata/parity/recordings/logs-baseline/resolve-app.json +0 -1
- package/testdata/parity/recordings/logs-batch/logs.json +0 -1
- package/testdata/parity/recordings/logs-batch/resolve-app.json +0 -1
- package/testdata/parity/recordings/logs-empty/logs.json +0 -1
- package/testdata/parity/recordings/logs-empty/resolve-app.json +0 -1
- package/testdata/parity/recordings/logs-format-json/logs.json +0 -1
- package/testdata/parity/recordings/logs-format-json/resolve-app.json +0 -1
- package/testdata/parity/recordings/logs-limit-100/logs.json +0 -1
- package/testdata/parity/recordings/logs-limit-100/resolve-app.json +0 -1
- package/testdata/parity/recordings/m7c-shared/resolve-app.json +0 -1
- package/testdata/parity/recordings/phpmyadmin-error/enable.json +0 -1
- package/testdata/parity/recordings/phpmyadmin-error/resolve-app.json +0 -1
- package/testdata/parity/recordings/phpmyadmin-print/enable.json +0 -1
- package/testdata/parity/recordings/phpmyadmin-print/generate.json +0 -1
- package/testdata/parity/recordings/phpmyadmin-print/resolve-app.json +0 -1
- package/testdata/parity/recordings/phpmyadmin-print/status.json +0 -1
- package/testdata/parity/recordings/phpmyadmin-silent/enable.json +0 -1
- package/testdata/parity/recordings/phpmyadmin-silent/generate.json +0 -1
- package/testdata/parity/recordings/phpmyadmin-silent/resolve-app.json +0 -1
- package/testdata/parity/recordings/phpmyadmin-silent/status.json +0 -1
- package/testdata/parity/recordings/slowlogs-baseline/resolve-app.json +0 -1
- package/testdata/parity/recordings/slowlogs-baseline/slowlogs.json +0 -1
- package/testdata/parity/recordings/slowlogs-csv/resolve-app.json +0 -1
- package/testdata/parity/recordings/slowlogs-csv/slowlogs.json +0 -1
- package/testdata/parity/recordings/slowlogs-empty/resolve-app.json +0 -1
- package/testdata/parity/recordings/slowlogs-empty/slowlogs.json +0 -1
- package/testdata/parity/recordings/slowlogs-limit-50/resolve-app.json +0 -1
- package/testdata/parity/recordings/slowlogs-limit-50/slowlogs.json +0 -1
- package/testdata/parity/recordings/sync-already-syncing/resolve-app.json +0 -1
- package/testdata/parity/recordings/sync-already-syncing/sync-start.json +0 -1
- package/testdata/parity/recordings/sync-already-syncing/sync-status-1.json +0 -1
- package/testdata/parity/recordings/sync-already-syncing/sync-status-2.json +0 -1
- package/testdata/parity/recordings/sync-baseline/resolve-app.json +0 -1
- package/testdata/parity/recordings/sync-baseline/sync-start.json +0 -1
- package/testdata/parity/recordings/sync-baseline/sync-status-1.json +0 -1
- package/testdata/parity/recordings/sync-baseline/sync-status-2.json +0 -1
- package/testdata/parity/recordings/whoami-baseline/me-response.json +0 -1
- package/testdata/parity/recordings/wp-nodejs-rejected/resolve-app.json +0 -1
- package/testdata/parity/recordings/wp-production-confirm-decline/resolve-app.json +0 -1
- package/testdata/parity/recordings/wp-ssh-happy/resolve-app.json +0 -1
- package/testdata/parity/recordings/wp-websocket-redirect/resolve-app.json +0 -1
- package/testdata/parity/slowlogs-baseline.yaml +0 -18
- package/testdata/parity/slowlogs-csv.yaml +0 -16
- package/testdata/parity/slowlogs-empty.yaml +0 -17
- package/testdata/parity/slowlogs-limit-50.yaml +0 -16
- package/testdata/parity/sync-already-syncing.yaml +0 -20
- package/testdata/parity/sync-baseline.yaml +0 -19
- package/testdata/parity/version-smoke.yaml +0 -14
- package/testdata/parity/whoami-baseline.yaml +0 -14
- package/testdata/parity/wp-help.yaml +0 -12
- package/testdata/parity/wp-nodejs-rejected.yaml +0 -13
- package/testdata/parity/wp-production-confirm-decline.yaml +0 -14
- package/testdata/parity/wp-ssh-happy.yaml +0 -15
- package/testdata/parity/wp-websocket-redirect.yaml +0 -14
- package/testdata/parity-local/app-get-csv.yaml +0 -8
- package/testdata/parity-local/app-get-json.yaml +0 -8
- package/testdata/parity-local/app-get-table.yaml +0 -8
- package/testdata/parity-local/app-list-csv.yaml +0 -8
- package/testdata/parity-local/app-list-json.yaml +0 -8
- package/testdata/parity-local/app-list-table.yaml +0 -8
- package/testdata/parity-local/edge-workers/basic/edge-workers.json +0 -1
- package/testdata/parity-local/edge-workers/basic/workers/headers/assembly/index.ts +0 -1
- package/testdata/parity-local/edge-workers/basic/workers/headers/worker.json +0 -1
- package/testdata/parity-local/edge-workers/two-workers/edge-workers.json +0 -1
- package/testdata/parity-local/edge-workers/two-workers/workers/a/assembly/index.ts +0 -1
- package/testdata/parity-local/edge-workers/two-workers/workers/a/worker.json +0 -1
- package/testdata/parity-local/edge-workers/two-workers/workers/b/assembly/index.ts +0 -1
- package/testdata/parity-local/edge-workers/two-workers/workers/b/worker.json +0 -1
- package/testdata/parity-local/envvar-list-csv.yaml +0 -8
- package/testdata/parity-local/envvar-list-ids.yaml +0 -8
- package/testdata/parity-local/envvar-list-json.yaml +0 -8
- package/testdata/parity-local/envvar-list-keyvalue.yaml +0 -8
- package/testdata/parity-local/envvar-list-table.yaml +0 -8
- package/testdata/parity-local/software-get-csv.yaml +0 -8
- package/testdata/parity-local/software-get-json.yaml +0 -8
- package/testdata/parity-local/software-get-table.yaml +0 -8
- package/testdata/parity-local/whoami.yaml +0 -8
- package/testdata/update-fixture/main.go +0 -62
- package/third_party/go-search-replace/MANIFEST +0 -33
- package/tsconfig.json +0 -25
- /package/node_modules/lando/node_modules/{wrap-ansi → ansi-regex}/license +0 -0
package/dist/lib/cli/command.js
CHANGED
|
@@ -1,40 +1,329 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
36
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
37
|
+
};
|
|
38
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
+
exports.formatFatalError = formatFatalError;
|
|
40
|
+
exports.uncaughtError = uncaughtError;
|
|
41
|
+
exports.default = default_1;
|
|
6
42
|
exports.getEnvIdentifier = getEnvIdentifier;
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
43
|
+
exports.containsAppEnvArgument = containsAppEnvArgument;
|
|
44
|
+
const chalk_1 = __importDefault(require("chalk"));
|
|
45
|
+
const commander_1 = require("commander");
|
|
46
|
+
const debug_1 = __importDefault(require("debug"));
|
|
47
|
+
const enquirer_1 = require("enquirer");
|
|
48
|
+
const graphql_tag_1 = __importDefault(require("graphql-tag"));
|
|
49
|
+
const node_child_process_1 = require("node:child_process");
|
|
50
|
+
const node_fs_1 = __importDefault(require("node:fs"));
|
|
51
|
+
const node_path_1 = __importDefault(require("node:path"));
|
|
52
|
+
const node_util_1 = __importDefault(require("node:util"));
|
|
53
|
+
const envAlias_1 = require("./envAlias");
|
|
54
|
+
const exit = __importStar(require("./exit"));
|
|
55
|
+
const format_1 = require("./format");
|
|
56
|
+
const prompt_1 = require("./prompt");
|
|
57
|
+
const package_json_1 = __importDefault(require("../../../package.json"));
|
|
58
|
+
const api_1 = __importDefault(require("../../lib/api"));
|
|
59
|
+
const app_1 = __importDefault(require("../../lib/api/app"));
|
|
60
|
+
const tracker_1 = require("../../lib/tracker");
|
|
61
|
+
const utils_1 = require("../../lib/utils");
|
|
62
|
+
const user_error_1 = __importDefault(require("../user-error"));
|
|
63
|
+
const secretFragments = [
|
|
64
|
+
'password',
|
|
65
|
+
'passwd',
|
|
66
|
+
'passphrase',
|
|
67
|
+
'secret',
|
|
68
|
+
'token',
|
|
69
|
+
'credential',
|
|
70
|
+
'authorization',
|
|
71
|
+
'cookie',
|
|
72
|
+
'privatekey',
|
|
73
|
+
'apikey',
|
|
74
|
+
'signature',
|
|
75
|
+
];
|
|
76
|
+
/**
|
|
77
|
+
* Determines if a given property key is considered secret.
|
|
78
|
+
* Secret properties are typically sensitive information like passwords, tokens, and API keys.
|
|
79
|
+
*
|
|
80
|
+
* @param {string|symbol} key - The property key to check.
|
|
81
|
+
* @returns {boolean} True if the property is considered secret, false otherwise.
|
|
82
|
+
*/
|
|
83
|
+
function isSecretProperty(key) {
|
|
84
|
+
const normalized = String(key)
|
|
85
|
+
.replace(/[^a-z0-9]/gi, '')
|
|
86
|
+
.toLowerCase();
|
|
87
|
+
return (normalized === 'key' || secretFragments.some(fragment => normalized.includes(fragment)));
|
|
88
|
+
}
|
|
89
|
+
/**
|
|
90
|
+
* Redacts sensitive information from a diagnostic text value.
|
|
91
|
+
*
|
|
92
|
+
* @param {string} value - The diagnostic text to redact.
|
|
93
|
+
* @returns {string} The redacted diagnostic text.
|
|
94
|
+
*/
|
|
95
|
+
function redactDiagnosticText(value) {
|
|
96
|
+
return value
|
|
97
|
+
.replace(/\b((?:https?|wss?|socks[45]h?|ftp):\/\/)[^/?#\s]+@/gi, '$1[REDACTED]@')
|
|
98
|
+
.replace(/([?&])([^?=&\s]+)=([^?&#\s]*)/g, (match, separator, key) => {
|
|
99
|
+
try {
|
|
100
|
+
return isSecretProperty(decodeURIComponent(key))
|
|
101
|
+
? `${separator}${key}=[REDACTED]`
|
|
102
|
+
: match;
|
|
103
|
+
}
|
|
104
|
+
catch {
|
|
105
|
+
return `${separator}[REDACTED]`;
|
|
106
|
+
}
|
|
107
|
+
})
|
|
108
|
+
.replace(/\b(Bearer|Basic)\s+\S+/gi, '$1 [REDACTED]');
|
|
109
|
+
}
|
|
110
|
+
/**
|
|
111
|
+
* Reads a property from a diagnostic value safely.
|
|
112
|
+
* Returns '[Unreadable property]' if the property cannot be accessed.
|
|
113
|
+
*
|
|
114
|
+
* @param {Record<string, unknown>|Error|null|undefined} value - The diagnostic value to read from.
|
|
115
|
+
* @param {string} key - The property key to read.
|
|
116
|
+
* @returns {unknown} The property value or '[Unreadable property]' if inaccessible.
|
|
117
|
+
*/
|
|
118
|
+
function readDiagnosticProperty(value, key) {
|
|
119
|
+
try {
|
|
120
|
+
return /** @type {Record<string, unknown>|null|undefined} */ (value)?.[key];
|
|
121
|
+
}
|
|
122
|
+
catch {
|
|
123
|
+
return '[Unreadable property]';
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
/**
|
|
127
|
+
* Creates a shallow copy of a diagnostic value, redacting sensitive information.
|
|
128
|
+
*
|
|
129
|
+
* @param {unknown} value - The diagnostic value to copy.
|
|
130
|
+
* @returns {unknown} The copied diagnostic value with sensitive information redacted.
|
|
131
|
+
*/
|
|
132
|
+
function createDiagnosticCopy(value) {
|
|
133
|
+
if (!(value instanceof Error)) {
|
|
134
|
+
if (Array.isArray(value)) {
|
|
135
|
+
return [];
|
|
136
|
+
}
|
|
137
|
+
return Object.create(Object.getPrototypeOf(value) === null ? null : Object.prototype);
|
|
138
|
+
}
|
|
139
|
+
const copy = new Error(); // NOSONAR
|
|
140
|
+
copy.stack = undefined;
|
|
141
|
+
for (const key of ['message', 'stack', 'name']) {
|
|
142
|
+
const text = readDiagnosticProperty(value, key);
|
|
143
|
+
if (typeof text === 'string' && (key !== 'name' || text !== 'Error')) {
|
|
144
|
+
Object.defineProperty(copy, key, {
|
|
145
|
+
value: redactDiagnosticText(text),
|
|
146
|
+
configurable: true,
|
|
147
|
+
});
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
return copy;
|
|
151
|
+
}
|
|
152
|
+
/**
|
|
153
|
+
* Copies diagnostic properties from a value to its shallow copy, redacting sensitive information.
|
|
154
|
+
*
|
|
155
|
+
* @param {object} value - The original diagnostic value.
|
|
156
|
+
* @param {unknown} copy - The shallow copy of the diagnostic value.
|
|
157
|
+
* @param {WeakMap<object, unknown>} seen - A WeakMap tracking already seen objects to handle circular references.
|
|
158
|
+
* @param {number} depth - The current depth of the recursive sanitization.
|
|
159
|
+
* @returns {void} This function does not return a value.
|
|
160
|
+
*/
|
|
161
|
+
function copyDiagnosticProperties(value, copy, seen, depth) {
|
|
162
|
+
const isError = value instanceof Error;
|
|
163
|
+
for (const key of Reflect.ownKeys(value)) {
|
|
164
|
+
if (key === node_util_1.default.inspect.custom ||
|
|
165
|
+
(isError && ['message', 'stack', 'name'].includes(/** @type {string} */ (key))) ||
|
|
166
|
+
(Array.isArray(copy) && key === 'length')) {
|
|
167
|
+
continue;
|
|
168
|
+
}
|
|
169
|
+
const descriptor = Object.getOwnPropertyDescriptor(value, key);
|
|
170
|
+
const secret = isSecretProperty(key) ||
|
|
171
|
+
(typeof key === 'string' && /^(?:body|bodyText|requestBody|responseBody)$/i.test(key)) ||
|
|
172
|
+
(isError &&
|
|
173
|
+
key === 'input' &&
|
|
174
|
+
readDiagnosticProperty(value, 'code') === 'ERR_INVALID_URL');
|
|
175
|
+
/** @type {unknown} */
|
|
176
|
+
let propertyValue = '[Accessor]';
|
|
177
|
+
if (secret) {
|
|
178
|
+
propertyValue = '[REDACTED]';
|
|
179
|
+
}
|
|
180
|
+
else if (descriptor && 'value' in descriptor) {
|
|
181
|
+
propertyValue = sanitizeDiagnostic(descriptor.value, seen, depth + 1);
|
|
182
|
+
}
|
|
183
|
+
Object.defineProperty(copy, key, {
|
|
184
|
+
value: propertyValue,
|
|
185
|
+
enumerable: descriptor?.enumerable ?? true,
|
|
186
|
+
configurable: true,
|
|
187
|
+
});
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
/**
|
|
191
|
+
* Copy own diagnostic data before inspection so nested secrets are redacted and
|
|
192
|
+
* accessors and custom inspectors cannot run while the snapshot is rendered.
|
|
193
|
+
*
|
|
194
|
+
* @param {unknown} value - The diagnostic value to sanitize.
|
|
195
|
+
* @param {WeakMap<object, unknown>} [seen] - A WeakMap tracking already seen objects to handle circular references.
|
|
196
|
+
* @param {number} [depth] - The current depth of the recursive sanitization.
|
|
197
|
+
* @returns {unknown} The sanitized diagnostic value.
|
|
198
|
+
*/
|
|
199
|
+
function sanitizeDiagnostic(value, seen = new WeakMap(), depth = 0) {
|
|
200
|
+
try {
|
|
201
|
+
if (typeof value === 'string' || typeof value === 'symbol') {
|
|
202
|
+
return redactDiagnosticText(String(value));
|
|
203
|
+
}
|
|
204
|
+
if (typeof value === 'function') {
|
|
205
|
+
return '[Function]';
|
|
206
|
+
}
|
|
207
|
+
if (value === null || typeof value !== 'object') {
|
|
208
|
+
return value;
|
|
209
|
+
}
|
|
210
|
+
if (seen.has(value)) {
|
|
211
|
+
return seen.get(value);
|
|
212
|
+
}
|
|
213
|
+
if (depth > 5) {
|
|
214
|
+
return '[Object]';
|
|
215
|
+
}
|
|
216
|
+
const copy = createDiagnosticCopy(value);
|
|
217
|
+
seen.set(value, copy);
|
|
218
|
+
copyDiagnosticProperties(value, copy, seen, depth);
|
|
219
|
+
return copy;
|
|
220
|
+
}
|
|
221
|
+
catch {
|
|
222
|
+
return '[Uninspectable value]';
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
/**
|
|
226
|
+
* Renders any thrown value as a single line without throwing.
|
|
227
|
+
*
|
|
228
|
+
* `String()` prints plain objects as "[object Object]" and throws for objects
|
|
229
|
+
* without a prototype, so objects are inspected instead.
|
|
230
|
+
*
|
|
231
|
+
* @param {unknown} value The value to render.
|
|
232
|
+
* @returns {string} A one-line description of the value.
|
|
233
|
+
*/
|
|
234
|
+
function describeValue(value) {
|
|
235
|
+
try {
|
|
236
|
+
const safeValue = sanitizeDiagnostic(value);
|
|
237
|
+
return typeof safeValue === 'object' && safeValue !== null
|
|
238
|
+
? node_util_1.default.inspect(safeValue, {
|
|
239
|
+
depth: 0,
|
|
240
|
+
breakLength: Infinity,
|
|
241
|
+
showHidden: true,
|
|
242
|
+
customInspect: false,
|
|
243
|
+
})
|
|
244
|
+
: String(safeValue);
|
|
245
|
+
}
|
|
246
|
+
catch {
|
|
247
|
+
return '[Uninspectable value]';
|
|
248
|
+
}
|
|
249
|
+
}
|
|
250
|
+
/**
|
|
251
|
+
* Inspects sanitized diagnostic data, returning a placeholder on failure.
|
|
252
|
+
*
|
|
253
|
+
* @param {unknown} value The value to inspect.
|
|
254
|
+
* @returns {string} The inspected string.
|
|
255
|
+
*/
|
|
256
|
+
function inspect(value) {
|
|
257
|
+
try {
|
|
258
|
+
return node_util_1.default.inspect(sanitizeDiagnostic(value), {
|
|
259
|
+
depth: 5,
|
|
260
|
+
showHidden: true,
|
|
261
|
+
customInspect: false,
|
|
262
|
+
});
|
|
263
|
+
}
|
|
264
|
+
catch {
|
|
265
|
+
return '[Uninspectable value]';
|
|
266
|
+
}
|
|
267
|
+
}
|
|
268
|
+
/**
|
|
269
|
+
* Builds a human-readable, multi-line description of a fatal error for display.
|
|
270
|
+
*
|
|
271
|
+
* Bare native rejections (e.g. keytar's "An unknown error occurred.") arrive as
|
|
272
|
+
* Errors whose stack is only the message line, so the usual stack print reveals
|
|
273
|
+
* nothing. In those cases — and whenever the error carries extra own properties
|
|
274
|
+
* that would otherwise be lost — we append a sanitized `util.inspect` dump so
|
|
275
|
+
* diagnostic properties survive without printing credentials.
|
|
276
|
+
*
|
|
277
|
+
* @param {unknown} err The thrown value.
|
|
278
|
+
* @returns {string} The formatted details to print.
|
|
279
|
+
*/
|
|
280
|
+
function formatFatalError(err) {
|
|
281
|
+
err = sanitizeDiagnostic(err);
|
|
282
|
+
if (!(err instanceof Error)) {
|
|
283
|
+
// Plain objects would stringify to "[object Object]"; inspect them instead.
|
|
284
|
+
return typeof err === 'object' && err !== null ? inspect(err) : String(err);
|
|
285
|
+
}
|
|
286
|
+
const lines = [];
|
|
287
|
+
if (err.stack) {
|
|
288
|
+
lines.push(err.stack);
|
|
289
|
+
}
|
|
290
|
+
else {
|
|
291
|
+
lines.push(err.message);
|
|
292
|
+
}
|
|
293
|
+
if (err.code !== undefined) {
|
|
294
|
+
lines.push(`Code: ${describeValue(err.code)}`);
|
|
295
|
+
}
|
|
296
|
+
if (err.cause !== undefined) {
|
|
297
|
+
lines.push(`Cause: ${inspect(err.cause)}`);
|
|
298
|
+
}
|
|
299
|
+
// A stack with no frames beyond the message line tells us nothing, and extra
|
|
300
|
+
// own properties would be dropped by the stack/message print above. In either
|
|
301
|
+
// case, dump the sanitized object to preserve diagnostic properties.
|
|
302
|
+
const stackHasFrames = Boolean(err.stack) && /\n[ \t]+at\s/.test(err.stack);
|
|
303
|
+
const hasExtraOwnProps = Object.getOwnPropertyNames(err).some(prop => !['message', 'stack', 'name'].includes(prop));
|
|
304
|
+
if (!stackHasFrames || hasExtraOwnProps) {
|
|
305
|
+
lines.push(inspect(err));
|
|
306
|
+
}
|
|
307
|
+
return lines.join('\n');
|
|
308
|
+
}
|
|
309
|
+
/**
|
|
310
|
+
* Last-resort handler for uncaught exceptions and unhandled rejections.
|
|
311
|
+
*
|
|
312
|
+
* @param {unknown} err The thrown value, which need not be an Error.
|
|
313
|
+
*/
|
|
27
314
|
function uncaughtError(err) {
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
315
|
+
// Error raised when trying to write to an already closed stream
|
|
316
|
+
if (readDiagnosticProperty(err, 'code') === 'EPIPE') {
|
|
317
|
+
return;
|
|
318
|
+
}
|
|
319
|
+
if (err instanceof user_error_1.default) {
|
|
320
|
+
exit.withError(err);
|
|
321
|
+
}
|
|
322
|
+
console.log(chalk_1.default.red('✕'), 'Please contact VIP Support with the following information:');
|
|
323
|
+
console.log(chalk_1.default.dim(formatFatalError(err)));
|
|
324
|
+
console.log(chalk_1.default.dim('Hint: re-run with the environment variable DEBUG=@automattic/vip:* to print verbose logs, even when the failure happens before argument parsing.'));
|
|
325
|
+
const message = describeValue(err instanceof Error ? readDiagnosticProperty(err, 'message') : err);
|
|
326
|
+
exit.withError(`Unexpected error: ${message}`);
|
|
38
327
|
}
|
|
39
328
|
process.on('uncaughtException', uncaughtError);
|
|
40
329
|
process.on('unhandledRejection', uncaughtError);
|
|
@@ -42,473 +331,466 @@ let _opts = {};
|
|
|
42
331
|
let alreadyConfirmedDebugAttachment = false;
|
|
43
332
|
const RESERVED_AUTO_SHORT_ALIASES = new Set(['h', 'v', 'd']);
|
|
44
333
|
function normalizeUsage(program, usage) {
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
334
|
+
if (!usage) {
|
|
335
|
+
return;
|
|
336
|
+
}
|
|
337
|
+
const [rootCommand, ...rest] = usage.trim().split(/\s+/);
|
|
338
|
+
if (rootCommand) {
|
|
339
|
+
program.name(rootCommand);
|
|
340
|
+
}
|
|
341
|
+
if (rest.length) {
|
|
342
|
+
const usageString = rest.join(' ');
|
|
343
|
+
program.usage(usageString.includes('[options]') ? usageString : `${usageString} [options]`);
|
|
344
|
+
}
|
|
56
345
|
}
|
|
57
346
|
function createOptionDefinition(name, description, defaultValue, parseFn, usedShortNames) {
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
parser
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
347
|
+
const isArray = Array.isArray(name);
|
|
348
|
+
const shortName = isArray ? name[0] : null;
|
|
349
|
+
const longName = isArray ? name[1] : name;
|
|
350
|
+
const normalizedLongName = String(longName).trim().replace(/^--?/, '');
|
|
351
|
+
const explicitShortName = shortName ? String(shortName).trim().replace(/^-/, '') : null;
|
|
352
|
+
let normalizedShortName = explicitShortName;
|
|
353
|
+
if (!normalizedShortName) {
|
|
354
|
+
const autoShortName = normalizedLongName.charAt(0);
|
|
355
|
+
const canUseAutoShortName = autoShortName &&
|
|
356
|
+
!RESERVED_AUTO_SHORT_ALIASES.has(autoShortName) &&
|
|
357
|
+
!usedShortNames.has(autoShortName);
|
|
358
|
+
if (canUseAutoShortName) {
|
|
359
|
+
normalizedShortName = autoShortName;
|
|
360
|
+
}
|
|
361
|
+
}
|
|
362
|
+
if (normalizedShortName) {
|
|
363
|
+
usedShortNames.add(normalizedShortName);
|
|
364
|
+
}
|
|
365
|
+
const isBooleanOption = typeof defaultValue === 'boolean';
|
|
366
|
+
const usesOptionalValue = !isBooleanOption;
|
|
367
|
+
const parseOptionValue = value => {
|
|
368
|
+
if (parseFn) {
|
|
369
|
+
return parseFn(value);
|
|
370
|
+
}
|
|
371
|
+
return value;
|
|
372
|
+
};
|
|
373
|
+
let parser;
|
|
374
|
+
if (usesOptionalValue) {
|
|
375
|
+
parser = (value, previousValue) => {
|
|
376
|
+
const parsedValue = parseOptionValue(value);
|
|
377
|
+
if (previousValue === undefined) {
|
|
378
|
+
return parsedValue;
|
|
379
|
+
}
|
|
380
|
+
if (Array.isArray(previousValue)) {
|
|
381
|
+
return [...previousValue, parsedValue];
|
|
382
|
+
}
|
|
383
|
+
return [previousValue, parsedValue];
|
|
384
|
+
};
|
|
385
|
+
}
|
|
386
|
+
let flags = `--${normalizedLongName}`;
|
|
387
|
+
if (usesOptionalValue) {
|
|
388
|
+
flags += ' [value]';
|
|
389
|
+
}
|
|
390
|
+
if (normalizedShortName) {
|
|
391
|
+
flags = `-${normalizedShortName}, ${flags}`;
|
|
392
|
+
}
|
|
393
|
+
return {
|
|
394
|
+
flags,
|
|
395
|
+
description,
|
|
396
|
+
defaultValue,
|
|
397
|
+
parser,
|
|
398
|
+
normalizedShortName,
|
|
93
399
|
};
|
|
94
|
-
}
|
|
95
|
-
let flags = `--${normalizedLongName}`;
|
|
96
|
-
if (usesOptionalValue) {
|
|
97
|
-
flags += ' [value]';
|
|
98
|
-
}
|
|
99
|
-
if (normalizedShortName) {
|
|
100
|
-
flags = `-${normalizedShortName}, ${flags}`;
|
|
101
|
-
}
|
|
102
|
-
return {
|
|
103
|
-
flags,
|
|
104
|
-
description,
|
|
105
|
-
defaultValue,
|
|
106
|
-
parser,
|
|
107
|
-
normalizedShortName
|
|
108
|
-
};
|
|
109
400
|
}
|
|
110
401
|
function isOptionToken(arg) {
|
|
111
|
-
|
|
402
|
+
return arg !== '-' && arg.startsWith('-');
|
|
112
403
|
}
|
|
113
404
|
class CommanderArgsCompat {
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
};
|
|
118
|
-
this.sub = [];
|
|
119
|
-
this.examplesList = [];
|
|
120
|
-
this.usedShortNames = new Set();
|
|
121
|
-
this.shortOptionsExpectingValue = new Set();
|
|
122
|
-
this.longOptionsExpectingValue = new Set();
|
|
123
|
-
this.knownShortOptions = new Set();
|
|
124
|
-
this.knownLongOptions = new Set();
|
|
125
|
-
this._opts = opts;
|
|
126
|
-
this.program = new _commander.Command();
|
|
127
|
-
this.program.allowUnknownOption(true);
|
|
128
|
-
this.program.allowExcessArguments(true);
|
|
129
|
-
this.program.helpOption(false);
|
|
130
|
-
normalizeUsage(this.program, this._opts.usage);
|
|
131
|
-
this.optionDefaults = new Map();
|
|
132
|
-
}
|
|
133
|
-
option(name, description, defaultValue, parseFn) {
|
|
134
|
-
const definition = createOptionDefinition(name, description, defaultValue, parseFn, this.usedShortNames);
|
|
135
|
-
const {
|
|
136
|
-
flags,
|
|
137
|
-
parser,
|
|
138
|
-
normalizedShortName
|
|
139
|
-
} = definition;
|
|
140
|
-
const normalizedLongName = String(Array.isArray(name) ? name[1] : name).trim().replace(/^--?/, '');
|
|
141
|
-
const isValueOption = typeof defaultValue !== 'boolean';
|
|
142
|
-
this.knownLongOptions.add(normalizedLongName);
|
|
143
|
-
if (normalizedShortName) {
|
|
144
|
-
this.knownShortOptions.add(normalizedShortName);
|
|
145
|
-
}
|
|
146
|
-
if (isValueOption && normalizedShortName) {
|
|
147
|
-
this.shortOptionsExpectingValue.add(normalizedShortName);
|
|
148
|
-
}
|
|
149
|
-
if (isValueOption) {
|
|
150
|
-
this.longOptionsExpectingValue.add(normalizedLongName);
|
|
151
|
-
}
|
|
152
|
-
|
|
153
|
-
// When there's a parser, track the default separately and don't pass it to Commander.
|
|
154
|
-
// This prevents the parser from incorrectly accumulating the default value with the first explicit value.
|
|
155
|
-
if (parser && defaultValue !== undefined) {
|
|
156
|
-
this.optionDefaults.set(normalizedLongName, defaultValue);
|
|
157
|
-
this.program.option(flags, description, parser);
|
|
158
|
-
} else if (parser) {
|
|
159
|
-
this.program.option(flags, description, parser);
|
|
160
|
-
} else if (defaultValue !== undefined) {
|
|
161
|
-
this.program.option(flags, description, defaultValue);
|
|
162
|
-
} else {
|
|
163
|
-
this.program.option(flags, description);
|
|
164
|
-
}
|
|
165
|
-
return this;
|
|
166
|
-
}
|
|
167
|
-
command(name, description = '') {
|
|
168
|
-
this.details.commands.push({
|
|
169
|
-
usage: name,
|
|
170
|
-
description
|
|
171
|
-
});
|
|
172
|
-
return this;
|
|
173
|
-
}
|
|
174
|
-
example(usage, description) {
|
|
175
|
-
this.examplesList.push({
|
|
176
|
-
usage,
|
|
177
|
-
description
|
|
178
|
-
});
|
|
179
|
-
return this;
|
|
180
|
-
}
|
|
181
|
-
examples(examples = []) {
|
|
182
|
-
for (const example of examples) {
|
|
183
|
-
this.example(example.usage, example.description);
|
|
184
|
-
}
|
|
185
|
-
return this;
|
|
186
|
-
}
|
|
187
|
-
showVersion() {
|
|
188
|
-
console.log(_package.default.version);
|
|
189
|
-
process.exit(0);
|
|
190
|
-
}
|
|
191
|
-
showHelp() {
|
|
192
|
-
const lines = [this.program.helpInformation().trimEnd()];
|
|
193
|
-
if (this.details.commands.length) {
|
|
194
|
-
lines.push('');
|
|
195
|
-
lines.push('Commands:');
|
|
196
|
-
for (const entry of this.details.commands) {
|
|
197
|
-
const commandName = entry.usage.padEnd(26, ' ');
|
|
198
|
-
lines.push(` ${commandName}${entry.description}`);
|
|
199
|
-
}
|
|
200
|
-
}
|
|
201
|
-
if (this.examplesList.length) {
|
|
202
|
-
lines.push('');
|
|
203
|
-
lines.push('Examples:');
|
|
204
|
-
for (const example of this.examplesList) {
|
|
205
|
-
lines.push(` - ${example.description}`);
|
|
206
|
-
lines.push(` $ ${example.usage}`);
|
|
207
|
-
}
|
|
208
|
-
}
|
|
209
|
-
console.log(lines.join('\n'));
|
|
210
|
-
process.exit(0);
|
|
211
|
-
}
|
|
212
|
-
isDefined(value, key) {
|
|
213
|
-
if (key !== 'commands') {
|
|
214
|
-
return false;
|
|
215
|
-
}
|
|
216
|
-
return this.details.commands.some(entry => entry.usage === value);
|
|
217
|
-
}
|
|
218
|
-
parse(argv) {
|
|
219
|
-
this.program.parse(this.normalizeShortOptionEqualsSyntax(argv), {
|
|
220
|
-
from: 'node'
|
|
221
|
-
});
|
|
222
|
-
this.sub = this.program.args.slice();
|
|
223
|
-
const opts = this.program.opts();
|
|
224
|
-
|
|
225
|
-
// Apply tracked defaults for options with parsers
|
|
226
|
-
for (const [optionName, defaultValue] of this.optionDefaults) {
|
|
227
|
-
if (opts[optionName] === undefined) {
|
|
228
|
-
opts[optionName] = defaultValue;
|
|
229
|
-
}
|
|
230
|
-
}
|
|
231
|
-
return opts;
|
|
232
|
-
}
|
|
233
|
-
normalizeShortOptionEqualsSyntax(argv) {
|
|
234
|
-
const normalizedArgv = argv.slice(0, 2);
|
|
235
|
-
for (const arg of argv.slice(2)) {
|
|
236
|
-
const shortOptionEqualsMatch = /^-([A-Za-z0-9])=(.*)$/.exec(arg);
|
|
237
|
-
if (!shortOptionEqualsMatch) {
|
|
238
|
-
normalizedArgv.push(arg);
|
|
239
|
-
continue;
|
|
240
|
-
}
|
|
241
|
-
const shortOptionName = shortOptionEqualsMatch[1];
|
|
242
|
-
const optionValue = shortOptionEqualsMatch[2];
|
|
243
|
-
if (!this.shortOptionsExpectingValue.has(shortOptionName)) {
|
|
244
|
-
normalizedArgv.push(arg);
|
|
245
|
-
continue;
|
|
246
|
-
}
|
|
247
|
-
normalizedArgv.push(`-${shortOptionName}`, optionValue);
|
|
248
|
-
}
|
|
249
|
-
return normalizedArgv;
|
|
250
|
-
}
|
|
251
|
-
findSubcommand(argv) {
|
|
252
|
-
const searchStart = argv[2] === '--' ? 3 : 2;
|
|
253
|
-
const dashDashIndex = argv.indexOf('--', searchStart);
|
|
254
|
-
const searchEnd = dashDashIndex === -1 ? argv.length : dashDashIndex;
|
|
255
|
-
for (let index = searchStart; index < searchEnd; index++) {
|
|
256
|
-
const arg = argv[index];
|
|
257
|
-
if (this.isDefined(arg, 'commands')) {
|
|
258
|
-
return {
|
|
259
|
-
index,
|
|
260
|
-
name: arg
|
|
405
|
+
constructor(opts) {
|
|
406
|
+
this.details = {
|
|
407
|
+
commands: [],
|
|
261
408
|
};
|
|
262
|
-
|
|
263
|
-
|
|
409
|
+
this.sub = [];
|
|
410
|
+
this.examplesList = [];
|
|
411
|
+
this.usedShortNames = new Set();
|
|
412
|
+
this.shortOptionsExpectingValue = new Set();
|
|
413
|
+
this.longOptionsExpectingValue = new Set();
|
|
414
|
+
this.knownShortOptions = new Set();
|
|
415
|
+
this.knownLongOptions = new Set();
|
|
416
|
+
this._opts = opts;
|
|
417
|
+
this.program = new commander_1.Command();
|
|
418
|
+
this.program.allowUnknownOption(true);
|
|
419
|
+
this.program.allowExcessArguments(true);
|
|
420
|
+
this.program.helpOption(false);
|
|
421
|
+
normalizeUsage(this.program, this._opts.usage);
|
|
422
|
+
this.optionDefaults = new Map();
|
|
423
|
+
}
|
|
424
|
+
option(name, description, defaultValue, parseFn) {
|
|
425
|
+
const definition = createOptionDefinition(name, description, defaultValue, parseFn, this.usedShortNames);
|
|
426
|
+
const { flags, parser, normalizedShortName } = definition;
|
|
427
|
+
const normalizedLongName = String(Array.isArray(name) ? name[1] : name)
|
|
428
|
+
.trim()
|
|
429
|
+
.replace(/^--?/, '');
|
|
430
|
+
const isValueOption = typeof defaultValue !== 'boolean';
|
|
431
|
+
this.knownLongOptions.add(normalizedLongName);
|
|
432
|
+
if (normalizedShortName) {
|
|
433
|
+
this.knownShortOptions.add(normalizedShortName);
|
|
434
|
+
}
|
|
435
|
+
if (isValueOption && normalizedShortName) {
|
|
436
|
+
this.shortOptionsExpectingValue.add(normalizedShortName);
|
|
437
|
+
}
|
|
438
|
+
if (isValueOption) {
|
|
439
|
+
this.longOptionsExpectingValue.add(normalizedLongName);
|
|
440
|
+
}
|
|
441
|
+
// When there's a parser, track the default separately and don't pass it to Commander.
|
|
442
|
+
// This prevents the parser from incorrectly accumulating the default value with the first explicit value.
|
|
443
|
+
if (parser && defaultValue !== undefined) {
|
|
444
|
+
this.optionDefaults.set(normalizedLongName, defaultValue);
|
|
445
|
+
this.program.option(flags, description, parser);
|
|
446
|
+
}
|
|
447
|
+
else if (parser) {
|
|
448
|
+
this.program.option(flags, description, parser);
|
|
449
|
+
}
|
|
450
|
+
else if (defaultValue !== undefined) {
|
|
451
|
+
this.program.option(flags, description, defaultValue);
|
|
452
|
+
}
|
|
453
|
+
else {
|
|
454
|
+
this.program.option(flags, description);
|
|
455
|
+
}
|
|
456
|
+
return this;
|
|
457
|
+
}
|
|
458
|
+
command(name, description = '') {
|
|
459
|
+
this.details.commands.push({
|
|
460
|
+
usage: name,
|
|
461
|
+
description,
|
|
462
|
+
});
|
|
463
|
+
return this;
|
|
464
|
+
}
|
|
465
|
+
example(usage, description) {
|
|
466
|
+
this.examplesList.push({
|
|
467
|
+
usage,
|
|
468
|
+
description,
|
|
469
|
+
});
|
|
470
|
+
return this;
|
|
471
|
+
}
|
|
472
|
+
examples(examples = []) {
|
|
473
|
+
for (const example of examples) {
|
|
474
|
+
this.example(example.usage, example.description);
|
|
475
|
+
}
|
|
476
|
+
return this;
|
|
477
|
+
}
|
|
478
|
+
showVersion() {
|
|
479
|
+
console.log(package_json_1.default.version);
|
|
480
|
+
process.exit(0);
|
|
481
|
+
}
|
|
482
|
+
showHelp() {
|
|
483
|
+
const lines = [this.program.helpInformation().trimEnd()];
|
|
484
|
+
if (this.details.commands.length) {
|
|
485
|
+
lines.push('');
|
|
486
|
+
lines.push('Commands:');
|
|
487
|
+
for (const entry of this.details.commands) {
|
|
488
|
+
const commandName = entry.usage.padEnd(26, ' ');
|
|
489
|
+
lines.push(` ${commandName}${entry.description}`);
|
|
490
|
+
}
|
|
491
|
+
}
|
|
492
|
+
if (this.examplesList.length) {
|
|
493
|
+
lines.push('');
|
|
494
|
+
lines.push('Examples:');
|
|
495
|
+
for (const example of this.examplesList) {
|
|
496
|
+
lines.push(` - ${example.description}`);
|
|
497
|
+
lines.push(` $ ${example.usage}`);
|
|
498
|
+
}
|
|
499
|
+
}
|
|
500
|
+
console.log(lines.join('\n'));
|
|
501
|
+
process.exit(0);
|
|
502
|
+
}
|
|
503
|
+
isDefined(value, key) {
|
|
504
|
+
if (key !== 'commands') {
|
|
505
|
+
return false;
|
|
506
|
+
}
|
|
507
|
+
return this.details.commands.some(entry => entry.usage === value);
|
|
508
|
+
}
|
|
509
|
+
parse(argv) {
|
|
510
|
+
this.program.parse(this.normalizeShortOptionEqualsSyntax(argv), { from: 'node' });
|
|
511
|
+
this.sub = this.program.args.slice();
|
|
512
|
+
const opts = this.program.opts();
|
|
513
|
+
// Apply tracked defaults for options with parsers
|
|
514
|
+
for (const [optionName, defaultValue] of this.optionDefaults) {
|
|
515
|
+
if (opts[optionName] === undefined) {
|
|
516
|
+
opts[optionName] = defaultValue;
|
|
517
|
+
}
|
|
518
|
+
}
|
|
519
|
+
return opts;
|
|
520
|
+
}
|
|
521
|
+
normalizeShortOptionEqualsSyntax(argv) {
|
|
522
|
+
const normalizedArgv = argv.slice(0, 2);
|
|
523
|
+
for (const arg of argv.slice(2)) {
|
|
524
|
+
const shortOptionEqualsMatch = /^-([A-Za-z0-9])=(.*)$/.exec(arg);
|
|
525
|
+
if (!shortOptionEqualsMatch) {
|
|
526
|
+
normalizedArgv.push(arg);
|
|
527
|
+
continue;
|
|
528
|
+
}
|
|
529
|
+
const shortOptionName = shortOptionEqualsMatch[1];
|
|
530
|
+
const optionValue = shortOptionEqualsMatch[2];
|
|
531
|
+
if (!this.shortOptionsExpectingValue.has(shortOptionName)) {
|
|
532
|
+
normalizedArgv.push(arg);
|
|
533
|
+
continue;
|
|
534
|
+
}
|
|
535
|
+
normalizedArgv.push(`-${shortOptionName}`, optionValue);
|
|
536
|
+
}
|
|
537
|
+
return normalizedArgv;
|
|
538
|
+
}
|
|
539
|
+
findSubcommand(argv) {
|
|
540
|
+
const searchStart = argv[2] === '--' ? 3 : 2;
|
|
541
|
+
const dashDashIndex = argv.indexOf('--', searchStart);
|
|
542
|
+
const searchEnd = dashDashIndex === -1 ? argv.length : dashDashIndex;
|
|
543
|
+
for (let index = searchStart; index < searchEnd; index++) {
|
|
544
|
+
const arg = argv[index];
|
|
545
|
+
if (this.isDefined(arg, 'commands')) {
|
|
546
|
+
return { index, name: arg };
|
|
547
|
+
}
|
|
548
|
+
if (!isOptionToken(arg)) {
|
|
549
|
+
return null;
|
|
550
|
+
}
|
|
551
|
+
const nextArg = argv[index + 1];
|
|
552
|
+
const optionHasInlineValue = arg.includes('=');
|
|
553
|
+
const nextArgCouldBeOptionValue = nextArg && !isOptionToken(nextArg) && !this.isDefined(nextArg, 'commands');
|
|
554
|
+
if (!optionHasInlineValue && nextArgCouldBeOptionValue) {
|
|
555
|
+
index++;
|
|
556
|
+
}
|
|
557
|
+
}
|
|
558
|
+
if (dashDashIndex > -1 && this.isDefined(argv[dashDashIndex + 1], 'commands')) {
|
|
559
|
+
return { index: dashDashIndex + 1, name: argv[dashDashIndex + 1] };
|
|
560
|
+
}
|
|
561
|
+
return null;
|
|
562
|
+
}
|
|
563
|
+
findUnknownOption(argv) {
|
|
564
|
+
const dashDashIndex = argv.indexOf('--', 2);
|
|
565
|
+
const searchEnd = dashDashIndex === -1 ? argv.length : dashDashIndex;
|
|
566
|
+
for (let index = 2; index < searchEnd; index++) {
|
|
567
|
+
const arg = argv[index];
|
|
568
|
+
if (!isOptionToken(arg)) {
|
|
569
|
+
continue;
|
|
570
|
+
}
|
|
571
|
+
if (arg.startsWith('--')) {
|
|
572
|
+
const [tokenName] = arg.slice(2).split('=');
|
|
573
|
+
if (!this.knownLongOptions.has(tokenName)) {
|
|
574
|
+
return tokenName;
|
|
575
|
+
}
|
|
576
|
+
const hasInlineValue = arg.includes('=');
|
|
577
|
+
const nextArg = argv[index + 1];
|
|
578
|
+
if (this.longOptionsExpectingValue.has(tokenName) &&
|
|
579
|
+
!hasInlineValue &&
|
|
580
|
+
nextArg &&
|
|
581
|
+
!isOptionToken(nextArg)) {
|
|
582
|
+
index++;
|
|
583
|
+
}
|
|
584
|
+
continue;
|
|
585
|
+
}
|
|
586
|
+
const shortEqualsMatch = /^-([A-Za-z0-9])=(.*)$/.exec(arg);
|
|
587
|
+
if (shortEqualsMatch) {
|
|
588
|
+
const shortName = shortEqualsMatch[1];
|
|
589
|
+
if (!this.knownShortOptions.has(shortName)) {
|
|
590
|
+
return shortName;
|
|
591
|
+
}
|
|
592
|
+
continue;
|
|
593
|
+
}
|
|
594
|
+
const shortMatch = /^-([A-Za-z0-9])$/.exec(arg);
|
|
595
|
+
if (shortMatch) {
|
|
596
|
+
const shortName = shortMatch[1];
|
|
597
|
+
if (!this.knownShortOptions.has(shortName)) {
|
|
598
|
+
return shortName;
|
|
599
|
+
}
|
|
600
|
+
const nextArg = argv[index + 1];
|
|
601
|
+
if (this.shortOptionsExpectingValue.has(shortName) &&
|
|
602
|
+
nextArg &&
|
|
603
|
+
!isOptionToken(nextArg)) {
|
|
604
|
+
index++;
|
|
605
|
+
}
|
|
606
|
+
continue;
|
|
607
|
+
}
|
|
608
|
+
return arg.replace(/^-+/, '');
|
|
609
|
+
}
|
|
264
610
|
return null;
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
}
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
const
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
const
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
const
|
|
316
|
-
if (
|
|
317
|
-
|
|
318
|
-
}
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
}
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
if (wpFlagsWithoutValue.has(arg)) {
|
|
348
|
-
continue;
|
|
349
|
-
}
|
|
350
|
-
expectOptionValue = true;
|
|
351
|
-
continue;
|
|
352
|
-
}
|
|
353
|
-
if (/^-[A-Za-z0-9]+=/.test(arg)) {
|
|
354
|
-
continue;
|
|
355
|
-
}
|
|
356
|
-
return true;
|
|
357
|
-
}
|
|
358
|
-
return false;
|
|
359
|
-
}
|
|
360
|
-
async executeSubcommand(argv, parsedAlias, subcommand) {
|
|
361
|
-
const currentScript = argv[1];
|
|
362
|
-
const subcommandName = subcommand.name;
|
|
363
|
-
const extension = _nodePath.default.extname(currentScript);
|
|
364
|
-
const baseScriptPath = extension ? currentScript.slice(0, -extension.length) : currentScript;
|
|
365
|
-
const childScriptPath = extension ? `${baseScriptPath}-${subcommandName}${extension}` : `${baseScriptPath}-${subcommandName}`;
|
|
366
|
-
const aliasFromRawArgv = argv.slice(2).find(arg => (0, _envAlias.isAlias)(arg));
|
|
367
|
-
const rawArgsBeforeSubcommand = parsedAlias.argv.slice(2, subcommand.index);
|
|
368
|
-
const hasSeparatorBeforeSubcommand = rawArgsBeforeSubcommand.includes('--');
|
|
369
|
-
const argsBeforeSubcommand = rawArgsBeforeSubcommand.filter(arg => arg !== '--');
|
|
370
|
-
const subcommandArgs = parsedAlias.argv.slice(subcommand.index + 1);
|
|
371
|
-
const hasWpCommandPayload = this.hasWpCommandPayload(subcommandArgs);
|
|
372
|
-
const hasSeparator = argv.includes('--');
|
|
373
|
-
if (subcommandName === 'wp' && hasWpCommandPayload && !hasSeparator) {
|
|
374
|
-
exit.withError('A double dash ("--") must separate the arguments of "vip" from those of "wp". Run "vip wp --help" for examples.');
|
|
375
|
-
}
|
|
376
|
-
let childArgs = [...argsBeforeSubcommand, ...(hasSeparatorBeforeSubcommand ? ['--'] : []), ...subcommandArgs];
|
|
377
|
-
if (aliasFromRawArgv) {
|
|
378
|
-
childArgs = [aliasFromRawArgv, ...childArgs];
|
|
379
|
-
}
|
|
380
|
-
let runResult;
|
|
381
|
-
if (_nodeFs.default.existsSync(childScriptPath)) {
|
|
382
|
-
runResult = (0, _nodeChild_process.spawnSync)(process.execPath, [childScriptPath, ...childArgs], {
|
|
383
|
-
stdio: 'inherit',
|
|
384
|
-
env: process.env
|
|
385
|
-
});
|
|
386
|
-
} else {
|
|
387
|
-
const fallbackCommand = `${_nodePath.default.basename(baseScriptPath)}-${subcommandName}`;
|
|
388
|
-
runResult = (0, _nodeChild_process.spawnSync)(fallbackCommand, childArgs, {
|
|
389
|
-
stdio: 'inherit',
|
|
390
|
-
env: process.env,
|
|
391
|
-
shell: process.platform === 'win32'
|
|
392
|
-
});
|
|
393
|
-
}
|
|
394
|
-
if (runResult.error) {
|
|
395
|
-
throw runResult.error;
|
|
396
|
-
}
|
|
397
|
-
process.exit(runResult.status ?? 1);
|
|
398
|
-
}
|
|
611
|
+
}
|
|
612
|
+
hasWpCommandPayload(subcommandArgs) {
|
|
613
|
+
const wpFlagsWithoutValue = new Set(['--help', '-h', '--version', '-v', '--yes', '-y']);
|
|
614
|
+
let expectOptionValue = false;
|
|
615
|
+
for (const arg of subcommandArgs) {
|
|
616
|
+
if (expectOptionValue) {
|
|
617
|
+
if (!isOptionToken(arg)) {
|
|
618
|
+
expectOptionValue = false;
|
|
619
|
+
continue;
|
|
620
|
+
}
|
|
621
|
+
expectOptionValue = false;
|
|
622
|
+
}
|
|
623
|
+
if (!isOptionToken(arg)) {
|
|
624
|
+
return true;
|
|
625
|
+
}
|
|
626
|
+
if (arg.startsWith('--')) {
|
|
627
|
+
if (arg.includes('=') || wpFlagsWithoutValue.has(arg)) {
|
|
628
|
+
continue;
|
|
629
|
+
}
|
|
630
|
+
expectOptionValue = true;
|
|
631
|
+
continue;
|
|
632
|
+
}
|
|
633
|
+
if (/^-[A-Za-z0-9]$/.test(arg)) {
|
|
634
|
+
if (wpFlagsWithoutValue.has(arg)) {
|
|
635
|
+
continue;
|
|
636
|
+
}
|
|
637
|
+
expectOptionValue = true;
|
|
638
|
+
continue;
|
|
639
|
+
}
|
|
640
|
+
if (/^-[A-Za-z0-9]+=/.test(arg)) {
|
|
641
|
+
continue;
|
|
642
|
+
}
|
|
643
|
+
return true;
|
|
644
|
+
}
|
|
645
|
+
return false;
|
|
646
|
+
}
|
|
647
|
+
async executeSubcommand(argv, parsedAlias, subcommand) {
|
|
648
|
+
const currentScript = argv[1];
|
|
649
|
+
const subcommandName = subcommand.name;
|
|
650
|
+
const extension = node_path_1.default.extname(currentScript);
|
|
651
|
+
const baseScriptPath = extension ? currentScript.slice(0, -extension.length) : currentScript;
|
|
652
|
+
const childScriptPath = extension
|
|
653
|
+
? `${baseScriptPath}-${subcommandName}${extension}`
|
|
654
|
+
: `${baseScriptPath}-${subcommandName}`;
|
|
655
|
+
const aliasFromRawArgv = argv.slice(2).find(arg => (0, envAlias_1.isAlias)(arg));
|
|
656
|
+
const rawArgsBeforeSubcommand = parsedAlias.argv.slice(2, subcommand.index);
|
|
657
|
+
const hasSeparatorBeforeSubcommand = rawArgsBeforeSubcommand.includes('--');
|
|
658
|
+
const argsBeforeSubcommand = rawArgsBeforeSubcommand.filter(arg => arg !== '--');
|
|
659
|
+
const subcommandArgs = parsedAlias.argv.slice(subcommand.index + 1);
|
|
660
|
+
const hasWpCommandPayload = this.hasWpCommandPayload(subcommandArgs);
|
|
661
|
+
const hasSeparator = argv.includes('--');
|
|
662
|
+
if (subcommandName === 'wp' && hasWpCommandPayload && !hasSeparator) {
|
|
663
|
+
exit.withError('A double dash ("--") must separate the arguments of "vip" from those of "wp". Run "vip wp --help" for examples.');
|
|
664
|
+
}
|
|
665
|
+
let childArgs = [
|
|
666
|
+
...argsBeforeSubcommand,
|
|
667
|
+
...(hasSeparatorBeforeSubcommand ? ['--'] : []),
|
|
668
|
+
...subcommandArgs,
|
|
669
|
+
];
|
|
670
|
+
if (aliasFromRawArgv) {
|
|
671
|
+
childArgs = [aliasFromRawArgv, ...childArgs];
|
|
672
|
+
}
|
|
673
|
+
let runResult;
|
|
674
|
+
if (node_fs_1.default.existsSync(childScriptPath)) {
|
|
675
|
+
runResult = (0, node_child_process_1.spawnSync)(process.execPath, [childScriptPath, ...childArgs], {
|
|
676
|
+
stdio: 'inherit',
|
|
677
|
+
env: process.env,
|
|
678
|
+
});
|
|
679
|
+
}
|
|
680
|
+
else {
|
|
681
|
+
const fallbackCommand = `${node_path_1.default.basename(baseScriptPath)}-${subcommandName}`;
|
|
682
|
+
runResult = (0, node_child_process_1.spawnSync)(fallbackCommand, childArgs, {
|
|
683
|
+
stdio: 'inherit',
|
|
684
|
+
env: process.env,
|
|
685
|
+
shell: process.platform === 'win32',
|
|
686
|
+
});
|
|
687
|
+
}
|
|
688
|
+
if (runResult.error) {
|
|
689
|
+
throw runResult.error;
|
|
690
|
+
}
|
|
691
|
+
process.exit(runResult.status ?? 1);
|
|
692
|
+
}
|
|
399
693
|
}
|
|
400
|
-
|
|
401
694
|
/**
|
|
402
695
|
* @param {string[]} argv
|
|
403
696
|
*/
|
|
404
697
|
// eslint-disable-next-line complexity
|
|
405
698
|
CommanderArgsCompat.prototype.argv = async function (argv, cb) {
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
}
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
const
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
}
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
// Set the site in options.app
|
|
503
|
-
let res;
|
|
504
|
-
if (_opts.appContext) {
|
|
505
|
-
// If --app is not set, try to infer the app context
|
|
506
|
-
if (!options.app) {
|
|
507
|
-
const api = (0, _api.default)();
|
|
508
|
-
await (0, _tracker.trackEvent)('command_appcontext_list_fetch');
|
|
509
|
-
try {
|
|
510
|
-
res = await api.query({
|
|
511
|
-
query: (0, _graphqlTag.default)`query Apps( $first: Int, $after: String ) {
|
|
699
|
+
if (process.execArgv.includes('--inspect') && !alreadyConfirmedDebugAttachment) {
|
|
700
|
+
await (0, enquirer_1.prompt)({
|
|
701
|
+
type: 'confirm',
|
|
702
|
+
name: 'confirm',
|
|
703
|
+
message: "\nAttach the debugger, once you see 'Debugger attached' above hit 'y' to continue",
|
|
704
|
+
});
|
|
705
|
+
alreadyConfirmedDebugAttachment = true;
|
|
706
|
+
}
|
|
707
|
+
const parsedAlias = (0, envAlias_1.parseEnvAliasFromArgv)(argv);
|
|
708
|
+
const options = this.parse(parsedAlias.argv);
|
|
709
|
+
// If there's a sub-command, run that instead
|
|
710
|
+
const dispatchSubcommand = this.findSubcommand(parsedAlias.argv);
|
|
711
|
+
if (dispatchSubcommand) {
|
|
712
|
+
await this.executeSubcommand(argv, parsedAlias, dispatchSubcommand);
|
|
713
|
+
return {};
|
|
714
|
+
}
|
|
715
|
+
if (!_opts.wildcardCommand) {
|
|
716
|
+
const unknownOption = this.findUnknownOption(parsedAlias.argv);
|
|
717
|
+
if (unknownOption) {
|
|
718
|
+
await (0, tracker_1.trackEvent)('command_validation_error', {
|
|
719
|
+
error: `Unknown option: ${unknownOption}`,
|
|
720
|
+
});
|
|
721
|
+
exit.withError(`The option "${unknownOption}" is unknown. Did you mean the following one?\n-h, --help Retrieve a description, examples, and available options for a (sub)command.`);
|
|
722
|
+
}
|
|
723
|
+
}
|
|
724
|
+
if (_opts.format && !options.format) {
|
|
725
|
+
options.format = 'table';
|
|
726
|
+
}
|
|
727
|
+
if (options.h || options.help) {
|
|
728
|
+
this.showHelp();
|
|
729
|
+
}
|
|
730
|
+
if (options.v || options.version) {
|
|
731
|
+
this.showVersion();
|
|
732
|
+
}
|
|
733
|
+
if (options.debug || options.d) {
|
|
734
|
+
debug_1.default.enable(options.debug === true ? '*' : options.debug);
|
|
735
|
+
}
|
|
736
|
+
// If we have both an --app/--env and an alias, we need to give a warning
|
|
737
|
+
if (parsedAlias.app && (options.app || options.env)) {
|
|
738
|
+
exit.withError('Please only use an environment alias, or the --app and --env parameters, but not both');
|
|
739
|
+
}
|
|
740
|
+
// If there is an alias, use it to populate the app/env options
|
|
741
|
+
if (parsedAlias.app) {
|
|
742
|
+
options.app = parsedAlias.app;
|
|
743
|
+
options.env = parsedAlias.env; // Can be undefined
|
|
744
|
+
}
|
|
745
|
+
const validationError = validateOpts(options);
|
|
746
|
+
if (validationError) {
|
|
747
|
+
const error = validationError.toString();
|
|
748
|
+
await (0, tracker_1.trackEvent)('command_validation_error', { error });
|
|
749
|
+
exit.withError(error);
|
|
750
|
+
}
|
|
751
|
+
if (process.env.NODE_ENV !== 'test') {
|
|
752
|
+
const { default: updateNotifier } = await import('update-notifier');
|
|
753
|
+
updateNotifier({ pkg: package_json_1.default, updateCheckInterval: 1000 * 60 * 60 * 24 }).notify({
|
|
754
|
+
isGlobal: true,
|
|
755
|
+
});
|
|
756
|
+
}
|
|
757
|
+
const customCommands = this.details.commands;
|
|
758
|
+
// Show help if no args passed
|
|
759
|
+
if (Boolean(customCommands.length) && !this.sub.length) {
|
|
760
|
+
await (0, tracker_1.trackEvent)('command_help_view');
|
|
761
|
+
this.showHelp();
|
|
762
|
+
return {};
|
|
763
|
+
}
|
|
764
|
+
// Show help if required arg is missing
|
|
765
|
+
if (_opts.requiredArgs > this.sub.length) {
|
|
766
|
+
await (0, tracker_1.trackEvent)('command_validation_error', {
|
|
767
|
+
error: 'Missing required arg',
|
|
768
|
+
});
|
|
769
|
+
this.showHelp();
|
|
770
|
+
return {};
|
|
771
|
+
}
|
|
772
|
+
// Show help if subcommand is invalid
|
|
773
|
+
const subCommands = this.details.commands.map(cmd => cmd.usage);
|
|
774
|
+
if (!_opts.wildcardCommand &&
|
|
775
|
+
this.sub[_opts.requiredArgs] &&
|
|
776
|
+
subCommands.length &&
|
|
777
|
+
0 > subCommands.indexOf(this.sub[_opts.requiredArgs])) {
|
|
778
|
+
const subcommand = this.sub.join(' ');
|
|
779
|
+
await (0, tracker_1.trackEvent)('command_validation_error', {
|
|
780
|
+
error: `Invalid subcommand: ${subcommand}`,
|
|
781
|
+
});
|
|
782
|
+
exit.withError(`\`${subcommand}\` is not a valid subcommand. See \`vip --help\``);
|
|
783
|
+
}
|
|
784
|
+
// Set the site in options.app
|
|
785
|
+
let res;
|
|
786
|
+
if (_opts.appContext) {
|
|
787
|
+
// If --app is not set, try to infer the app context
|
|
788
|
+
if (!options.app) {
|
|
789
|
+
const api = (0, api_1.default)();
|
|
790
|
+
await (0, tracker_1.trackEvent)('command_appcontext_list_fetch');
|
|
791
|
+
try {
|
|
792
|
+
res = await api.query({
|
|
793
|
+
query: (0, graphql_tag_1.default) `query Apps( $first: Int, $after: String ) {
|
|
512
794
|
apps( first: $first, after: $after ) {
|
|
513
795
|
total
|
|
514
796
|
nextCursor
|
|
@@ -518,408 +800,373 @@ CommanderArgsCompat.prototype.argv = async function (argv, cb) {
|
|
|
518
800
|
}
|
|
519
801
|
}
|
|
520
802
|
${_opts.appQueryFragments || ''}`,
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
}
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
});
|
|
624
|
-
exit.withError(`Could not find any non-production environments for ${_chalk.default.blueBright(options.app.name)}.`);
|
|
625
|
-
} else if (options.app.environments.length === 1) {
|
|
626
|
-
options.env = options.app.environments[0];
|
|
627
|
-
} else if (options.app.environments.length > 1) {
|
|
628
|
-
const environmentNames = options.app.environments.map(envObject => getEnvIdentifier(envObject));
|
|
629
|
-
let envSelection;
|
|
630
|
-
try {
|
|
631
|
-
envSelection = await (0, _enquirer.prompt)({
|
|
632
|
-
type: 'select',
|
|
633
|
-
name: 'env',
|
|
634
|
-
message: 'Which environment?',
|
|
635
|
-
choices: environmentNames
|
|
636
|
-
});
|
|
637
|
-
} catch (err) {
|
|
638
|
-
if (!err) {
|
|
639
|
-
process.exit();
|
|
640
|
-
}
|
|
641
|
-
exit.withError(err.message || err);
|
|
642
|
-
}
|
|
643
|
-
|
|
644
|
-
// Get full environment info after user selection
|
|
645
|
-
envSelection.env = options.app.environments.find(envObject => getEnvIdentifier(envObject) === envSelection.env);
|
|
646
|
-
if (!envSelection.env?.id) {
|
|
647
|
-
await (0, _tracker.trackEvent)('command_childcontext_list_select_error', {
|
|
648
|
-
error: 'Invalid environment selected'
|
|
649
|
-
});
|
|
650
|
-
exit.withError(`Environment ${_chalk.default.blueBright(getEnvIdentifier(envSelection.env))} does not exist`);
|
|
651
|
-
}
|
|
652
|
-
await (0, _tracker.trackEvent)('command_childcontext_list_select_success');
|
|
653
|
-
options.env = envSelection.env;
|
|
654
|
-
}
|
|
655
|
-
}
|
|
656
|
-
|
|
657
|
-
// Negotiate flag values
|
|
658
|
-
if (_opts.module === 'import-media') {
|
|
659
|
-
if ([true, 'true', 'yes'].includes(options.saveErrorLog)) {
|
|
660
|
-
options.saveErrorLog = 'true';
|
|
661
|
-
} else if ([false, 'false', 'no'].includes(options.saveErrorLog)) {
|
|
662
|
-
options.saveErrorLog = 'false';
|
|
663
|
-
} else {
|
|
664
|
-
options.saveErrorLog = 'prompt';
|
|
665
|
-
}
|
|
666
|
-
}
|
|
667
|
-
|
|
668
|
-
// Prompt for confirmation if necessary
|
|
669
|
-
if (_opts.requireConfirm && !options.force) {
|
|
670
|
-
/** @type {import('./format').Tuple[]} */
|
|
671
|
-
const info = [];
|
|
672
|
-
if (options.app) {
|
|
673
|
-
info.push({
|
|
674
|
-
key: 'App',
|
|
675
|
-
value: `${options.app.name} (id: ${options.app.id})`
|
|
676
|
-
});
|
|
677
|
-
}
|
|
678
|
-
if (options.env) {
|
|
679
|
-
const envName = getEnvIdentifier(options.env);
|
|
680
|
-
info.push({
|
|
681
|
-
key: 'Environment',
|
|
682
|
-
value: `${envName} (id: ${options.env.id})`
|
|
683
|
-
});
|
|
684
|
-
}
|
|
685
|
-
let message = 'Are you sure?';
|
|
686
|
-
if ('string' === typeof _opts.requireConfirm) {
|
|
687
|
-
message = _opts.requireConfirm;
|
|
688
|
-
}
|
|
689
|
-
switch (_opts.module) {
|
|
690
|
-
case 'import-sql':
|
|
691
|
-
{
|
|
692
|
-
const site = options.env;
|
|
693
|
-
if (site?.primaryDomain) {
|
|
694
|
-
const primaryDomainName = site.primaryDomain.name;
|
|
695
|
-
info.push({
|
|
696
|
-
key: 'Primary Domain Name',
|
|
697
|
-
value: primaryDomainName
|
|
698
|
-
});
|
|
699
|
-
}
|
|
700
|
-
|
|
701
|
-
// Site launched details
|
|
702
|
-
const haveLaunchedField = Object.hasOwn(site, 'launched');
|
|
703
|
-
if (haveLaunchedField) {
|
|
704
|
-
const launched = site.launched ? '✅ Yes' : `${_chalk.default.red('x')} No`;
|
|
705
|
-
info.push({
|
|
706
|
-
key: 'Launched?',
|
|
707
|
-
value: `${_chalk.default.cyan(launched)}`
|
|
708
|
-
});
|
|
709
|
-
}
|
|
710
|
-
if (this.sub.length) {
|
|
711
|
-
info.push({
|
|
712
|
-
key: 'SQL File',
|
|
713
|
-
value: `${_chalk.default.blueBright(this.sub)}`
|
|
714
|
-
});
|
|
715
|
-
}
|
|
716
|
-
options.skipValidate = Object.hasOwn(options, 'skipValidate') && Boolean(options.skipValidate) && !['false', 'no'].includes(options.skipValidate);
|
|
717
|
-
if (options.skipValidate) {
|
|
718
|
-
info.push({
|
|
719
|
-
key: 'Pre-Upload Validations',
|
|
720
|
-
value: _chalk.default.red('SKIPPED!')
|
|
803
|
+
variables: {
|
|
804
|
+
first: 100,
|
|
805
|
+
after: null, // TODO make dynamic?
|
|
806
|
+
},
|
|
807
|
+
});
|
|
808
|
+
}
|
|
809
|
+
catch (err) {
|
|
810
|
+
const message = err.toString();
|
|
811
|
+
await (0, tracker_1.trackEvent)('command_appcontext_list_fetch_error', {
|
|
812
|
+
error: message,
|
|
813
|
+
});
|
|
814
|
+
exit.withError(`Failed to get app (${_opts.appQuery}) details: ${message}`);
|
|
815
|
+
}
|
|
816
|
+
if (!res.data?.apps?.edges?.length) {
|
|
817
|
+
await (0, tracker_1.trackEvent)('command_appcontext_list_fetch_error', {
|
|
818
|
+
error: 'No apps found',
|
|
819
|
+
});
|
|
820
|
+
exit.withError("Couldn't find any apps");
|
|
821
|
+
}
|
|
822
|
+
const appNames = res.data.apps.edges.map(cur => cur.name);
|
|
823
|
+
let appSelection;
|
|
824
|
+
try {
|
|
825
|
+
appSelection = await (0, enquirer_1.prompt)({
|
|
826
|
+
type: 'autocomplete',
|
|
827
|
+
name: 'app',
|
|
828
|
+
message: 'Which app?',
|
|
829
|
+
limit: 10,
|
|
830
|
+
choices: appNames,
|
|
831
|
+
});
|
|
832
|
+
}
|
|
833
|
+
catch (err) {
|
|
834
|
+
if (!err) {
|
|
835
|
+
process.exit();
|
|
836
|
+
}
|
|
837
|
+
exit.withError(err.message || err);
|
|
838
|
+
}
|
|
839
|
+
// Copy all app information
|
|
840
|
+
appSelection.app = res.data.apps.edges.find(cur => cur.name === appSelection.app);
|
|
841
|
+
if (!appSelection.app?.id) {
|
|
842
|
+
await (0, tracker_1.trackEvent)('command_appcontext_list_select_error', {
|
|
843
|
+
error: 'Invalid app selected',
|
|
844
|
+
});
|
|
845
|
+
exit.withError(`App ${chalk_1.default.blueBright(appSelection.app.name)} could not be located`);
|
|
846
|
+
}
|
|
847
|
+
await (0, tracker_1.trackEvent)('command_appcontext_list_select_success');
|
|
848
|
+
options.app = { ...appSelection.app };
|
|
849
|
+
}
|
|
850
|
+
else {
|
|
851
|
+
let appLookup;
|
|
852
|
+
try {
|
|
853
|
+
appLookup = await (0, app_1.default)(options.app, _opts.appQuery, _opts.appQueryFragments);
|
|
854
|
+
}
|
|
855
|
+
catch (err) {
|
|
856
|
+
await (0, tracker_1.trackEvent)('command_appcontext_param_error', {
|
|
857
|
+
error: 'App lookup failed',
|
|
858
|
+
});
|
|
859
|
+
// Get error message, if available.
|
|
860
|
+
const apiErrorMsg = (0, utils_1.parseApiError)(err);
|
|
861
|
+
let errorMsg = `Unable to find app ${chalk_1.default.blueBright(options.app)}: `;
|
|
862
|
+
if (apiErrorMsg) {
|
|
863
|
+
errorMsg += apiErrorMsg;
|
|
864
|
+
}
|
|
865
|
+
else {
|
|
866
|
+
// Should happen rarely, if ever. Let's include stack trace for debugging.
|
|
867
|
+
errorMsg += 'Unknown error. If this persists, please contact VIP support.\n' + err.stack;
|
|
868
|
+
}
|
|
869
|
+
exit.withError(errorMsg);
|
|
870
|
+
}
|
|
871
|
+
if (!appLookup?.id) {
|
|
872
|
+
await (0, tracker_1.trackEvent)('command_appcontext_param_error', {
|
|
873
|
+
error: 'Invalid app specified',
|
|
874
|
+
});
|
|
875
|
+
exit.withError(`App ${chalk_1.default.blueBright(options.app)} does not exist`);
|
|
876
|
+
}
|
|
877
|
+
await (0, tracker_1.trackEvent)('command_appcontext_param_select');
|
|
878
|
+
options.app = { ...appLookup };
|
|
879
|
+
}
|
|
880
|
+
if (_opts.childEnvContext) {
|
|
881
|
+
options.app.environments = options.app.environments.filter(cur => cur.id !== options.app.id);
|
|
882
|
+
}
|
|
883
|
+
}
|
|
884
|
+
if ((_opts.envContext || _opts.childEnvContext) && options.app) {
|
|
885
|
+
if (options.env) {
|
|
886
|
+
if (_opts.childEnvContext && options.env.toLowerCase() === 'production') {
|
|
887
|
+
await (0, tracker_1.trackEvent)('command_childcontext_param_error', {
|
|
888
|
+
error: 'Cannot use `production`',
|
|
889
|
+
});
|
|
890
|
+
exit.withError('Environment production is not allowed for this command');
|
|
891
|
+
}
|
|
892
|
+
const env = options.app.environments.find(cur => getEnvIdentifier(cur).toLowerCase() === options.env.toLowerCase());
|
|
893
|
+
if (!env) {
|
|
894
|
+
await (0, tracker_1.trackEvent)('command_childcontext_param_error', {
|
|
895
|
+
error: `Invalid child environment (${options.env}) specified`,
|
|
896
|
+
});
|
|
897
|
+
exit.withError(`Environment ${chalk_1.default.blueBright(options.env)} for app ${chalk_1.default.blueBright(options.app.name)} does not exist`);
|
|
898
|
+
}
|
|
899
|
+
options.env = env;
|
|
900
|
+
}
|
|
901
|
+
else if (!options.app?.environments?.length) {
|
|
902
|
+
console.log('To set up a new development environment, please contact VIP Support.');
|
|
903
|
+
await (0, tracker_1.trackEvent)('command_childcontext_fetch_error', {
|
|
904
|
+
error: 'No child environments found',
|
|
721
905
|
});
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
906
|
+
exit.withError(`Could not find any non-production environments for ${chalk_1.default.blueBright(options.app.name)}.`);
|
|
907
|
+
}
|
|
908
|
+
else if (options.app.environments.length === 1) {
|
|
909
|
+
options.env = options.app.environments[0];
|
|
910
|
+
}
|
|
911
|
+
else if (options.app.environments.length > 1) {
|
|
912
|
+
const environmentNames = options.app.environments.map(envObject => getEnvIdentifier(envObject));
|
|
913
|
+
let envSelection;
|
|
914
|
+
try {
|
|
915
|
+
envSelection = await (0, enquirer_1.prompt)({
|
|
916
|
+
type: 'select',
|
|
917
|
+
name: 'env',
|
|
918
|
+
message: 'Which environment?',
|
|
919
|
+
choices: environmentNames,
|
|
920
|
+
});
|
|
921
|
+
}
|
|
922
|
+
catch (err) {
|
|
923
|
+
if (!err) {
|
|
924
|
+
process.exit();
|
|
925
|
+
}
|
|
926
|
+
exit.withError(err.message || err);
|
|
927
|
+
}
|
|
928
|
+
// Get full environment info after user selection
|
|
929
|
+
envSelection.env = options.app.environments.find(envObject => getEnvIdentifier(envObject) === envSelection.env);
|
|
930
|
+
if (!envSelection.env?.id) {
|
|
931
|
+
await (0, tracker_1.trackEvent)('command_childcontext_list_select_error', {
|
|
932
|
+
error: 'Invalid environment selected',
|
|
933
|
+
});
|
|
934
|
+
exit.withError(`Environment ${chalk_1.default.blueBright(getEnvIdentifier(envSelection.env))} does not exist`);
|
|
935
|
+
}
|
|
936
|
+
await (0, tracker_1.trackEvent)('command_childcontext_list_select_success');
|
|
937
|
+
options.env = envSelection.env;
|
|
938
|
+
}
|
|
939
|
+
}
|
|
940
|
+
// Negotiate flag values
|
|
941
|
+
if (_opts.module === 'import-media') {
|
|
942
|
+
if ([true, 'true', 'yes'].includes(options.saveErrorLog)) {
|
|
943
|
+
options.saveErrorLog = 'true';
|
|
944
|
+
}
|
|
945
|
+
else if ([false, 'false', 'no'].includes(options.saveErrorLog)) {
|
|
946
|
+
options.saveErrorLog = 'false';
|
|
947
|
+
}
|
|
948
|
+
else {
|
|
949
|
+
options.saveErrorLog = 'prompt';
|
|
950
|
+
}
|
|
951
|
+
}
|
|
952
|
+
// Prompt for confirmation if necessary
|
|
953
|
+
if (_opts.requireConfirm && !options.force) {
|
|
954
|
+
/** @type {import('./format').Tuple[]} */
|
|
955
|
+
const info = [];
|
|
956
|
+
if (options.app) {
|
|
957
|
+
info.push({ key: 'App', value: `${options.app.name} (id: ${options.app.id})` });
|
|
958
|
+
}
|
|
959
|
+
if (options.env) {
|
|
960
|
+
const envName = getEnvIdentifier(options.env);
|
|
961
|
+
info.push({ key: 'Environment', value: `${envName} (id: ${options.env.id})` });
|
|
962
|
+
}
|
|
963
|
+
let message = 'Are you sure?';
|
|
964
|
+
if ('string' === typeof _opts.requireConfirm) {
|
|
965
|
+
message = _opts.requireConfirm;
|
|
966
|
+
}
|
|
967
|
+
switch (_opts.module) {
|
|
968
|
+
case 'import-sql': {
|
|
969
|
+
const site = options.env;
|
|
970
|
+
if (site?.primaryDomain) {
|
|
971
|
+
const primaryDomainName = site.primaryDomain.name;
|
|
972
|
+
info.push({ key: 'Primary Domain Name', value: primaryDomainName });
|
|
973
|
+
}
|
|
974
|
+
// Site launched details
|
|
975
|
+
const haveLaunchedField = Object.hasOwn(site, 'launched');
|
|
976
|
+
if (haveLaunchedField) {
|
|
977
|
+
const launched = site.launched ? '✅ Yes' : `${chalk_1.default.red('x')} No`;
|
|
978
|
+
info.push({ key: 'Launched?', value: `${chalk_1.default.cyan(launched)}` });
|
|
979
|
+
}
|
|
980
|
+
if (this.sub.length) {
|
|
981
|
+
info.push({ key: 'SQL File', value: `${chalk_1.default.blueBright(this.sub)}` });
|
|
982
|
+
}
|
|
983
|
+
options.skipValidate =
|
|
984
|
+
Object.hasOwn(options, 'skipValidate') &&
|
|
985
|
+
Boolean(options.skipValidate) &&
|
|
986
|
+
!['false', 'no'].includes(options.skipValidate);
|
|
987
|
+
if (options.skipValidate) {
|
|
988
|
+
info.push({ key: 'Pre-Upload Validations', value: chalk_1.default.red('SKIPPED!') });
|
|
989
|
+
}
|
|
990
|
+
// Show S-R params if the `search-replace` flag is set
|
|
991
|
+
const searchReplace = options.searchReplace;
|
|
992
|
+
const assignSRValues = (from, to) => {
|
|
993
|
+
const pairs = {
|
|
994
|
+
From: `${from}`,
|
|
995
|
+
To: `${to}`,
|
|
996
|
+
};
|
|
997
|
+
return pairs;
|
|
998
|
+
};
|
|
999
|
+
if (searchReplace) {
|
|
1000
|
+
const searchReplaceValues = (0, format_1.formatSearchReplaceValues)(searchReplace, assignSRValues);
|
|
1001
|
+
// Format data into a user-friendly table
|
|
1002
|
+
info.push({
|
|
1003
|
+
key: 'Replacements',
|
|
1004
|
+
value: '\n' + (0, format_1.formatData)(searchReplaceValues, 'table'),
|
|
1005
|
+
});
|
|
1006
|
+
}
|
|
1007
|
+
break;
|
|
1008
|
+
}
|
|
1009
|
+
case 'sync': {
|
|
1010
|
+
const { backup, canSync, errors } = options.env.syncPreview;
|
|
1011
|
+
if (!canSync) {
|
|
1012
|
+
// User can not sync due to some error(s)
|
|
1013
|
+
// Shows the first error in the array
|
|
1014
|
+
exit.withError(`Could not sync to this environment: ${errors[0].message}`);
|
|
1015
|
+
}
|
|
1016
|
+
// remove __typename from replacements.
|
|
1017
|
+
// can not be deleted afterwards if deconstructed
|
|
1018
|
+
const replacements = options.env.syncPreview.replacements.map(rep => {
|
|
1019
|
+
const { from, to } = rep;
|
|
1020
|
+
return { from, to };
|
|
1021
|
+
});
|
|
1022
|
+
if (backup) {
|
|
1023
|
+
info.push({ key: 'From backup', value: new Date(backup.createdAt).toUTCString() });
|
|
1024
|
+
}
|
|
1025
|
+
info.push({ key: 'Replacements', value: '\n' + (0, format_1.formatData)(replacements, 'table') });
|
|
1026
|
+
break;
|
|
1027
|
+
}
|
|
1028
|
+
case 'import-media': {
|
|
1029
|
+
const isUrl = this.sub.length &&
|
|
1030
|
+
(String(this.sub).startsWith('http://') ||
|
|
1031
|
+
String(this.sub).startsWith('https://'));
|
|
1032
|
+
const archiveLabel = isUrl ? 'Archive URL' : 'Archive Path';
|
|
1033
|
+
info.push({ key: archiveLabel, value: chalk_1.default.blue.underline(this.sub) });
|
|
1034
|
+
// Update confirmation message if it's a local path
|
|
1035
|
+
if (!isUrl && 'string' === typeof _opts.requireConfirm) {
|
|
1036
|
+
message = message.replaceAll('the URL', 'the path');
|
|
1037
|
+
}
|
|
1038
|
+
options.overwriteExistingFiles =
|
|
1039
|
+
Object.hasOwn(options, 'overwriteExistingFiles') &&
|
|
1040
|
+
Boolean(options.overwriteExistingFiles) &&
|
|
1041
|
+
!['false', 'no'].includes(options.overwriteExistingFiles);
|
|
1042
|
+
info.push({
|
|
1043
|
+
key: 'Overwrite any existing files',
|
|
1044
|
+
value: options.overwriteExistingFiles ? '✅ Yes' : `${chalk_1.default.red('x')} No`,
|
|
1045
|
+
});
|
|
1046
|
+
options.importIntermediateImages =
|
|
1047
|
+
Object.hasOwn(options, 'importIntermediateImages') &&
|
|
1048
|
+
Boolean(options.importIntermediateImages) &&
|
|
1049
|
+
!['false', 'no'].includes(options.importIntermediateImages);
|
|
1050
|
+
info.push({
|
|
1051
|
+
key: 'Import intermediate image files',
|
|
1052
|
+
value: options.importIntermediateImages ? '✅ Yes' : `${chalk_1.default.red('x')} No`,
|
|
1053
|
+
});
|
|
1054
|
+
options.exportFileErrorsToJson =
|
|
1055
|
+
Object.hasOwn(options, 'exportFileErrorsToJson') &&
|
|
1056
|
+
Boolean(options.exportFileErrorsToJson) &&
|
|
1057
|
+
!['false', 'no'].includes(options.exportFileErrorsToJson);
|
|
1058
|
+
info.push({
|
|
1059
|
+
key: 'Export any file errors encountered to a JSON file instead of a plain text file.',
|
|
1060
|
+
value: options.exportFileErrorsToJson ? '✅ Yes' : `${chalk_1.default.red('x')} No`,
|
|
1061
|
+
});
|
|
1062
|
+
info.push({
|
|
1063
|
+
key: 'Download file-error logs?',
|
|
1064
|
+
value: options.saveErrorLog,
|
|
1065
|
+
});
|
|
1066
|
+
break;
|
|
1067
|
+
}
|
|
1068
|
+
default:
|
|
1069
|
+
}
|
|
1070
|
+
const skipPrompt = _opts.skipConfirmPrompt || false;
|
|
1071
|
+
const yes = await (0, prompt_1.confirm)(info, message, skipPrompt);
|
|
1072
|
+
if (!yes) {
|
|
1073
|
+
await (0, tracker_1.trackEvent)('command_confirm_cancel');
|
|
1074
|
+
return {};
|
|
1075
|
+
}
|
|
1076
|
+
await (0, tracker_1.trackEvent)('command_confirm_success');
|
|
1077
|
+
}
|
|
1078
|
+
if (cb) {
|
|
1079
|
+
res = await cb(this.sub, options);
|
|
1080
|
+
if (_opts.format && res) {
|
|
1081
|
+
if (res.header) {
|
|
1082
|
+
if (options.format !== 'json') {
|
|
1083
|
+
console.log((0, format_1.formatData)(res.header, 'keyValue'));
|
|
1084
|
+
}
|
|
1085
|
+
res = res.data;
|
|
1086
|
+
}
|
|
1087
|
+
res = res.map(row => {
|
|
1088
|
+
const out = { ...row };
|
|
1089
|
+
if (out.__typename) {
|
|
1090
|
+
// Apollo injects __typename
|
|
1091
|
+
delete out.__typename;
|
|
1092
|
+
}
|
|
1093
|
+
return out;
|
|
740
1094
|
});
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
}
|
|
744
|
-
case 'sync':
|
|
745
|
-
{
|
|
746
|
-
const {
|
|
747
|
-
backup,
|
|
748
|
-
canSync,
|
|
749
|
-
errors
|
|
750
|
-
} = options.env.syncPreview;
|
|
751
|
-
if (!canSync) {
|
|
752
|
-
// User can not sync due to some error(s)
|
|
753
|
-
// Shows the first error in the array
|
|
754
|
-
exit.withError(`Could not sync to this environment: ${errors[0].message}`);
|
|
755
|
-
}
|
|
756
|
-
|
|
757
|
-
// remove __typename from replacements.
|
|
758
|
-
// can not be deleted afterwards if deconstructed
|
|
759
|
-
const replacements = options.env.syncPreview.replacements.map(rep => {
|
|
760
|
-
const {
|
|
761
|
-
from,
|
|
762
|
-
to
|
|
763
|
-
} = rep;
|
|
764
|
-
return {
|
|
765
|
-
from,
|
|
766
|
-
to
|
|
767
|
-
};
|
|
768
|
-
});
|
|
769
|
-
if (backup) {
|
|
770
|
-
info.push({
|
|
771
|
-
key: 'From backup',
|
|
772
|
-
value: new Date(backup.createdAt).toUTCString()
|
|
1095
|
+
await (0, tracker_1.trackEvent)('command_output', {
|
|
1096
|
+
format: options.format,
|
|
773
1097
|
});
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
}
|
|
781
|
-
case 'import-media':
|
|
782
|
-
{
|
|
783
|
-
const isUrl = this.sub.length && (String(this.sub).startsWith('http://') || String(this.sub).startsWith('https://'));
|
|
784
|
-
const archiveLabel = isUrl ? 'Archive URL' : 'Archive Path';
|
|
785
|
-
info.push({
|
|
786
|
-
key: archiveLabel,
|
|
787
|
-
value: _chalk.default.blue.underline(this.sub)
|
|
788
|
-
});
|
|
789
|
-
|
|
790
|
-
// Update confirmation message if it's a local path
|
|
791
|
-
if (!isUrl && 'string' === typeof _opts.requireConfirm) {
|
|
792
|
-
message = message.replaceAll('the URL', 'the path');
|
|
793
|
-
}
|
|
794
|
-
options.overwriteExistingFiles = Object.hasOwn(options, 'overwriteExistingFiles') && Boolean(options.overwriteExistingFiles) && !['false', 'no'].includes(options.overwriteExistingFiles);
|
|
795
|
-
info.push({
|
|
796
|
-
key: 'Overwrite any existing files',
|
|
797
|
-
value: options.overwriteExistingFiles ? '✅ Yes' : `${_chalk.default.red('x')} No`
|
|
798
|
-
});
|
|
799
|
-
options.importIntermediateImages = Object.hasOwn(options, 'importIntermediateImages') && Boolean(options.importIntermediateImages) && !['false', 'no'].includes(options.importIntermediateImages);
|
|
800
|
-
info.push({
|
|
801
|
-
key: 'Import intermediate image files',
|
|
802
|
-
value: options.importIntermediateImages ? '✅ Yes' : `${_chalk.default.red('x')} No`
|
|
803
|
-
});
|
|
804
|
-
options.exportFileErrorsToJson = Object.hasOwn(options, 'exportFileErrorsToJson') && Boolean(options.exportFileErrorsToJson) && !['false', 'no'].includes(options.exportFileErrorsToJson);
|
|
805
|
-
info.push({
|
|
806
|
-
key: 'Export any file errors encountered to a JSON file instead of a plain text file.',
|
|
807
|
-
value: options.exportFileErrorsToJson ? '✅ Yes' : `${_chalk.default.red('x')} No`
|
|
808
|
-
});
|
|
809
|
-
info.push({
|
|
810
|
-
key: 'Download file-error logs?',
|
|
811
|
-
value: options.saveErrorLog
|
|
812
|
-
});
|
|
813
|
-
break;
|
|
814
|
-
}
|
|
815
|
-
default:
|
|
816
|
-
}
|
|
817
|
-
const skipPrompt = _opts.skipConfirmPrompt || false;
|
|
818
|
-
const yes = await (0, _prompt.confirm)(info, message, skipPrompt);
|
|
819
|
-
if (!yes) {
|
|
820
|
-
await (0, _tracker.trackEvent)('command_confirm_cancel');
|
|
821
|
-
return {};
|
|
822
|
-
}
|
|
823
|
-
await (0, _tracker.trackEvent)('command_confirm_success');
|
|
824
|
-
}
|
|
825
|
-
if (cb) {
|
|
826
|
-
res = await cb(this.sub, options);
|
|
827
|
-
if (_opts.format && res) {
|
|
828
|
-
if (res.header) {
|
|
829
|
-
if (options.format !== 'json') {
|
|
830
|
-
console.log((0, _format.formatData)(res.header, 'keyValue'));
|
|
831
|
-
}
|
|
832
|
-
res = res.data;
|
|
833
|
-
}
|
|
834
|
-
res = res.map(row => {
|
|
835
|
-
const out = {
|
|
836
|
-
...row
|
|
837
|
-
};
|
|
838
|
-
if (out.__typename) {
|
|
839
|
-
// Apollo injects __typename
|
|
840
|
-
delete out.__typename;
|
|
841
|
-
}
|
|
842
|
-
return out;
|
|
843
|
-
});
|
|
844
|
-
await (0, _tracker.trackEvent)('command_output', {
|
|
845
|
-
format: options.format
|
|
846
|
-
});
|
|
847
|
-
const formattedOut = (0, _format.formatData)(res, options.format);
|
|
848
|
-
console.log(formattedOut);
|
|
849
|
-
return {};
|
|
850
|
-
}
|
|
851
|
-
}
|
|
852
|
-
return options;
|
|
1098
|
+
const formattedOut = (0, format_1.formatData)(res, options.format);
|
|
1099
|
+
console.log(formattedOut);
|
|
1100
|
+
return {};
|
|
1101
|
+
}
|
|
1102
|
+
}
|
|
1103
|
+
return options;
|
|
853
1104
|
};
|
|
854
|
-
|
|
855
1105
|
/**
|
|
856
1106
|
* @returns {Error|undefined}
|
|
857
1107
|
*/
|
|
858
1108
|
function validateOpts(opts) {
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
}
|
|
867
|
-
if (opts.env) {
|
|
868
|
-
if (typeof opts.env !== 'string' && typeof opts.env !== 'number') {
|
|
869
|
-
return new Error('Invalid --env');
|
|
1109
|
+
if (opts.app) {
|
|
1110
|
+
if (typeof opts.app !== 'string' && typeof opts.app !== 'number') {
|
|
1111
|
+
return new Error('Invalid --app');
|
|
1112
|
+
}
|
|
1113
|
+
if (opts.app.length < 1) {
|
|
1114
|
+
return new Error('Invalid --app');
|
|
1115
|
+
}
|
|
870
1116
|
}
|
|
871
|
-
if (opts.env
|
|
872
|
-
|
|
1117
|
+
if (opts.env) {
|
|
1118
|
+
if (typeof opts.env !== 'string' && typeof opts.env !== 'number') {
|
|
1119
|
+
return new Error('Invalid --env');
|
|
1120
|
+
}
|
|
1121
|
+
if (opts.env.length < 1) {
|
|
1122
|
+
return new Error('Invalid --env');
|
|
1123
|
+
}
|
|
873
1124
|
}
|
|
874
|
-
}
|
|
875
1125
|
}
|
|
876
|
-
|
|
877
1126
|
/**
|
|
878
1127
|
* @returns {CommanderArgsCompat}
|
|
879
1128
|
*/
|
|
880
|
-
function
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
return args;
|
|
1129
|
+
function default_1(opts) {
|
|
1130
|
+
_opts = {
|
|
1131
|
+
appContext: false,
|
|
1132
|
+
appQuery: 'id,name',
|
|
1133
|
+
childEnvContext: false,
|
|
1134
|
+
envContext: false,
|
|
1135
|
+
format: false,
|
|
1136
|
+
requireConfirm: false,
|
|
1137
|
+
requiredArgs: 0,
|
|
1138
|
+
wildcardCommand: false,
|
|
1139
|
+
...opts,
|
|
1140
|
+
};
|
|
1141
|
+
const args = new CommanderArgsCompat(_opts);
|
|
1142
|
+
if (_opts.appContext || _opts.requireConfirm) {
|
|
1143
|
+
args.option('app', 'Target an application. Accepts a string value for the application name or an integer for the application ID.');
|
|
1144
|
+
}
|
|
1145
|
+
if (_opts.envContext || _opts.childEnvContext) {
|
|
1146
|
+
args.option('env', 'Target an environment. Accepts a string value for the environment type.');
|
|
1147
|
+
}
|
|
1148
|
+
if (_opts.requireConfirm) {
|
|
1149
|
+
args.option('force', 'Skip confirmation.', false);
|
|
1150
|
+
}
|
|
1151
|
+
if (_opts.format) {
|
|
1152
|
+
args.option('format', 'Render output in a particular format. Accepts “table“ (default), “csv“, and “json“.');
|
|
1153
|
+
}
|
|
1154
|
+
// Add help and version to all subcommands
|
|
1155
|
+
args.option(['h', 'help'], 'Retrieve a description, examples, and available options for a (sub)command.', false);
|
|
1156
|
+
args.option(['v', 'version'], 'Retrieve the version number of VIP-CLI currently installed on the local machine.', false);
|
|
1157
|
+
args.option(['d', 'debug'], 'Generate verbose output during command execution to help identify or fix errors or bugs.');
|
|
1158
|
+
return args;
|
|
911
1159
|
}
|
|
912
1160
|
function getEnvIdentifier(env) {
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
return identifier;
|
|
1161
|
+
let identifier = env.type;
|
|
1162
|
+
// If the env has a unique name (happens when site has multiple envs of a type), add on name
|
|
1163
|
+
// for disambiguation. Only on non-main-env
|
|
1164
|
+
if (env.name !== env.type && env.name && env.appId !== env.id) {
|
|
1165
|
+
identifier = `${identifier}.${env.name}`;
|
|
1166
|
+
}
|
|
1167
|
+
return identifier;
|
|
921
1168
|
}
|
|
922
1169
|
function containsAppEnvArgument(argv) {
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
}
|
|
1170
|
+
const parsedAlias = (0, envAlias_1.parseEnvAliasFromArgv)(argv);
|
|
1171
|
+
return Boolean(parsedAlias.app || parsedAlias.env || argv.includes('--app') || argv.includes('--env'));
|
|
1172
|
+
}
|