@speedkit/cli 4.36.0 → 4.36.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +15 -0
- package/README.md +3 -29
- package/dist/base/sk-command.d.ts +41 -0
- package/dist/base/sk-command.js +56 -0
- package/dist/commands/auto-prewarm.d.ts +6 -4
- package/dist/commands/auto-prewarm.js +13 -66
- package/dist/commands/autocomplete/fish.d.ts +2 -2
- package/dist/commands/autocomplete/fish.js +3 -2
- package/dist/commands/browser/clean.d.ts +2 -2
- package/dist/commands/browser/clean.js +6 -7
- package/dist/commands/browser/list.d.ts +2 -2
- package/dist/commands/browser/list.js +6 -8
- package/dist/commands/browser/update.d.ts +2 -2
- package/dist/commands/browser/update.js +9 -12
- package/dist/commands/bulk-deploy.d.ts +4 -2
- package/dist/commands/bulk-deploy.js +7 -37
- package/dist/commands/config/edit.d.ts +2 -2
- package/dist/commands/config/edit.js +2 -2
- package/dist/commands/config/setup.d.ts +5 -2
- package/dist/commands/config/setup.js +10 -19
- package/dist/commands/deploy.d.ts +12 -3
- package/dist/commands/deploy.js +14 -19
- package/dist/commands/diff-url-parameters.d.ts +5 -4
- package/dist/commands/diff-url-parameters.js +28 -18
- package/dist/commands/extension/add.d.ts +2 -2
- package/dist/commands/extension/add.js +6 -6
- package/dist/commands/extension/devtools.d.ts +2 -2
- package/dist/commands/extension/devtools.js +6 -7
- package/dist/commands/extension/list.d.ts +2 -2
- package/dist/commands/extension/list.js +5 -6
- package/dist/commands/extension/remove.d.ts +2 -2
- package/dist/commands/extension/remove.js +6 -6
- package/dist/commands/extension/update.d.ts +2 -2
- package/dist/commands/extension/update.js +5 -6
- package/dist/commands/find-pops.d.ts +2 -2
- package/dist/commands/find-pops.js +11 -11
- package/dist/commands/generate-customer-config.d.ts +5 -2
- package/dist/commands/generate-customer-config.js +9 -27
- package/dist/commands/generate-pop-config.d.ts +2 -2
- package/dist/commands/generate-pop-config.js +26 -26
- package/dist/commands/login.d.ts +2 -2
- package/dist/commands/login.js +6 -9
- package/dist/commands/onboarding.d.ts +18 -3
- package/dist/commands/onboarding.js +13 -11
- package/dist/commands/origin-request.d.ts +4 -2
- package/dist/commands/origin-request.js +10 -42
- package/dist/commands/prewarm.d.ts +4 -2
- package/dist/commands/prewarm.js +12 -56
- package/dist/commands/pull.d.ts +4 -2
- package/dist/commands/pull.js +9 -14
- package/dist/commands/query/parameter.d.ts +4 -2
- package/dist/commands/query/parameter.js +12 -19
- package/dist/commands/query/prewarm.d.ts +4 -2
- package/dist/commands/query/prewarm.js +16 -23
- package/dist/commands/revalidate.d.ts +4 -2
- package/dist/commands/revalidate.js +14 -56
- package/dist/commands/wpt-launcher.d.ts +2 -2
- package/dist/commands/wpt-launcher.js +17 -17
- package/dist/helpers/{chrome-flags.spec.js → spec/chrome-flags.spec.js} +1 -1
- package/dist/helpers/{origin-proxy.spec.js → spec/origin-proxy.spec.js} +1 -1
- package/dist/hooks/init/first-run.js +9 -10
- package/dist/hooks/{init → spec/init}/dns-result-order.spec.js +1 -1
- package/dist/hooks/{init → spec/init}/http1-global-dispatcher.spec.js +1 -1
- package/dist/models/context.d.ts +24 -0
- package/dist/models/context.js +31 -0
- package/dist/services/athena/athena-flags.d.ts +18 -0
- package/dist/services/athena/athena-flags.js +29 -0
- package/dist/services/athena/athena-service-build-context.d.ts +25 -0
- package/dist/services/athena/athena-service-build-context.js +4 -0
- package/dist/services/athena/athena-service-factory.d.ts +3 -14
- package/dist/services/athena/athena-service-factory.js +11 -25
- package/dist/services/athena/baqend-athena-service.d.ts +3 -14
- package/dist/services/athena/baqend-athena-service.js +8 -16
- package/dist/services/athena/index.d.ts +1 -0
- package/dist/services/athena/index.js +1 -0
- package/dist/services/athena/{athena-service.spec.js → spec/athena-service.spec.js} +1 -1
- package/dist/services/athena/{baqend-athena-service.spec.js → spec/baqend-athena-service.spec.js} +4 -4
- package/dist/services/browser-fetch/browser-origin-fetch.d.ts +2 -2
- package/dist/services/browser-fetch/browser-origin-fetch.js +1 -1
- package/dist/services/browser-fetch/browser-origin-fetcher.d.ts +3 -3
- package/dist/services/browser-fetch/browser-origin-fetcher.js +5 -5
- package/dist/services/browser-fetch/{browser-origin-fetch.spec.js → spec/browser-origin-fetch.spec.js} +12 -12
- package/dist/services/browser-fetch/{browser-origin-fetcher.spec.js → spec/browser-origin-fetcher.spec.js} +1 -1
- package/dist/services/browser-fetch/{browser-response.spec.js → spec/browser-response.spec.js} +1 -1
- package/dist/services/browser-fetch/{device-emulation.spec.js → spec/device-emulation.spec.js} +2 -2
- package/dist/services/bundler/{bundle-service.spec.js → spec/bundle-service.spec.js} +1 -1
- package/dist/services/cli/cli-environment-factory.d.ts +25 -0
- package/dist/services/cli/cli-environment-factory.js +30 -0
- package/dist/services/cli/cli-environment.d.ts +73 -0
- package/dist/services/cli/cli-environment.js +216 -0
- package/dist/services/cli/cli-service-build-context.d.ts +10 -0
- package/dist/services/cli/cli-service-build-context.js +4 -0
- package/dist/services/cli/cli-service-factory.d.ts +12 -4
- package/dist/services/cli/cli-service-factory.js +11 -9
- package/dist/services/cli/cli-service-model.d.ts +10 -6
- package/dist/services/cli/cli-service-model.js +0 -6
- package/dist/services/cli/cli-service.d.ts +52 -1
- package/dist/services/cli/cli-service.js +60 -14
- package/dist/services/cli/cli-settings.d.ts +37 -0
- package/dist/services/cli/cli-settings.js +23 -0
- package/dist/{helpers/clipboard.d.ts → services/cli/clipboard/clipboard-service.d.ts} +3 -1
- package/dist/{helpers/clipboard.js → services/cli/clipboard/clipboard-service.js} +6 -1
- package/dist/services/cli/clipboard/index.d.ts +1 -0
- package/dist/services/cli/clipboard/index.js +1 -0
- package/dist/services/cli/command-build-context.d.ts +23 -0
- package/dist/services/cli/index.d.ts +5 -0
- package/dist/services/cli/index.js +5 -0
- package/dist/services/cli/spec/cli-environment-detection.spec.js +52 -0
- package/dist/services/cli/spec/cli-environment.spec.js +125 -0
- package/dist/services/cli/{cli-service.spec.js → spec/cli-service.spec.js} +10 -20
- package/dist/services/config-api/client.d.ts +3 -3
- package/dist/services/config-api/client.js +4 -4
- package/dist/services/config-api/config-api-factory.js +3 -3
- package/dist/services/config-api/entity-manager-provider.d.ts +11 -0
- package/dist/services/config-api/{entity-manager-factory.js → entity-manager-provider.js} +7 -1
- package/dist/services/customer-config/customer-config-service-build-context.d.ts +33 -0
- package/dist/services/customer-config/customer-config-service-build-context.js +36 -0
- package/dist/services/customer-config/customer-config-service-factory.d.ts +3 -2
- package/dist/services/customer-config/customer-config-service-factory.js +5 -4
- package/dist/services/customer-config/customer-config-service.d.ts +5 -3
- package/dist/services/customer-config/customer-config-service.js +4 -3
- package/dist/services/customer-config/index.d.ts +1 -1
- package/dist/services/customer-config/index.js +1 -1
- package/dist/services/customer-config/site-analyzer/index.d.ts +4 -0
- package/dist/services/customer-config/site-analyzer/index.js +4 -0
- package/dist/{helpers/site-analyzer.d.ts → services/customer-config/site-analyzer/site-analyzer-model.d.ts} +0 -1
- package/dist/services/customer-config/site-analyzer/site-analyzer-service-build-context.d.ts +6 -0
- package/dist/services/customer-config/site-analyzer/site-analyzer-service-build-context.js +4 -0
- package/dist/services/customer-config/site-analyzer/site-analyzer-service-factory.d.ts +7 -0
- package/dist/services/customer-config/site-analyzer/site-analyzer-service-factory.js +10 -0
- package/dist/services/customer-config/site-analyzer/site-analyzer-service.d.ts +16 -0
- package/dist/{helpers/site-analyzer.js → services/customer-config/site-analyzer/site-analyzer-service.js} +20 -5
- package/dist/services/deploy/bulk/bulk-deploy-model.d.ts +0 -25
- package/dist/services/deploy/bulk/bulk-deploy-model.js +1 -27
- package/dist/services/deploy/bulk/bulk-deploy-service-build-context.d.ts +51 -0
- package/dist/services/deploy/bulk/bulk-deploy-service-build-context.js +50 -0
- package/dist/services/deploy/bulk/bulk-deploy-service-factory.d.ts +2 -4
- package/dist/services/deploy/bulk/bulk-deploy-service-factory.js +2 -5
- package/dist/services/deploy/bulk/bulk-deploy-service.d.ts +3 -2
- package/dist/services/deploy/bulk/config-deploy-factory.d.ts +3 -3
- package/dist/services/deploy/bulk/config-deploy-factory.js +16 -8
- package/dist/services/deploy/bulk/index.d.ts +1 -0
- package/dist/services/deploy/bulk/index.js +1 -0
- package/dist/services/deploy/checks/activation/customer-approval-check.d.ts +3 -1
- package/dist/services/deploy/checks/activation/customer-approval-check.js +4 -2
- package/dist/services/deploy/checks/post-deploy/deprecated-deployment-detection-check.d.ts +2 -2
- package/dist/services/deploy/checks/post-deploy/refresh-deployment-job-check.d.ts +2 -2
- package/dist/services/deploy/checks/post-deploy/revalidated-module-check.d.ts +2 -2
- package/dist/services/deploy/checks/post-deploy/save-files-check.d.ts +2 -2
- package/dist/services/deploy/checks/pre-deploy/device-detection-changed-check.d.ts +3 -1
- package/dist/services/deploy/checks/pre-deploy/device-detection-changed-check.js +4 -2
- package/dist/services/deploy/checks/pre-deploy/split-change-check.d.ts +3 -1
- package/dist/services/deploy/checks/pre-deploy/split-change-check.js +4 -2
- package/dist/services/deploy/deploy-service-build-context.d.ts +63 -0
- package/dist/services/deploy/deploy-service-build-context.js +64 -0
- package/dist/services/deploy/deploy-service-factory.d.ts +4 -6
- package/dist/services/deploy/deploy-service-factory.js +25 -14
- package/dist/services/deploy/deploy-service.d.ts +2 -2
- package/dist/services/deploy/handler/customer-config-handler.d.ts +2 -2
- package/dist/services/deploy/handler/install-resource-handler.d.ts +2 -2
- package/dist/services/deploy/handler/install-resource-modifier/deleted-file-check.d.ts +2 -2
- package/dist/services/deploy/handler/module-handler.d.ts +2 -2
- package/dist/services/deploy/handler/server-config-handler.d.ts +2 -2
- package/dist/services/deploy/mr/base-config-reader.d.ts +6 -4
- package/dist/services/deploy/mr/base-config-reader.js +14 -13
- package/dist/services/deploy/mr/index.d.ts +1 -0
- package/dist/services/deploy/mr/index.js +1 -0
- package/dist/services/deploy/mr/merge-request-deploy-model.d.ts +0 -35
- package/dist/services/deploy/mr/merge-request-deploy-model.js +0 -34
- package/dist/services/deploy/mr/merge-request-deploy-service-build-context.d.ts +32 -0
- package/dist/services/deploy/mr/merge-request-deploy-service-build-context.js +20 -0
- package/dist/services/deploy/mr/merge-request-deploy-service-factory.d.ts +2 -4
- package/dist/services/deploy/mr/merge-request-deploy-service-factory.js +31 -10
- package/dist/services/deploy/mr/merge-request-deploy-service.d.ts +3 -2
- package/dist/services/deploy/{bulk → spec/bulk}/bulk-deploy-service.spec.js +18 -7
- package/dist/services/deploy/{bulk → spec/bulk}/touched-configs.spec.js +2 -2
- package/dist/services/deploy/{checks → spec/checks}/activation/customer-approval-check.spec.js +9 -7
- package/dist/services/deploy/{checks → spec/checks}/post-deploy/refresh-deployment-job-check.spec.js +2 -2
- package/dist/services/deploy/{checks → spec/checks}/pre-deploy/split-change-check.spec.js +5 -4
- package/dist/services/deploy/{handler → spec/handler}/module-handler.spec.js +2 -2
- package/dist/services/deploy/{handler → spec/handler}/testing-installation-links.spec.js +1 -1
- package/dist/services/deploy/{mr → spec/mr}/live-state-check.spec.js +2 -2
- package/dist/services/deploy/{mr → spec/mr}/merge-request-description.spec.js +1 -1
- package/dist/services/deploy/{policy → spec/policy}/auto-deploy-policy.spec.js +2 -2
- package/dist/services/diff/diff-service-build-context.d.ts +14 -0
- package/dist/services/diff/diff-service-build-context.js +4 -0
- package/dist/services/diff/diff-service-factory.d.ts +4 -3
- package/dist/services/diff/diff-service-factory.js +3 -4
- package/dist/services/diff/diff-service.d.ts +10 -2
- package/dist/services/diff/diff-service.js +26 -3
- package/dist/services/diff/index.d.ts +2 -1
- package/dist/services/diff/index.js +2 -1
- package/dist/services/document-handler-runtime/document-handler-runtime-model.d.ts +7 -0
- package/dist/services/document-handler-runtime/document-handler-runtime-model.js +10 -0
- package/dist/services/document-handler-runtime/document-handler-runtime-service-build-context.d.ts +11 -0
- package/dist/services/document-handler-runtime/document-handler-runtime-service-build-context.js +4 -0
- package/dist/services/document-handler-runtime/document-handler-server.d.ts +2 -2
- package/dist/services/document-handler-runtime/document-handler-server.js +2 -2
- package/dist/services/document-handler-runtime/factory/document-handler-runtime-service-factory.d.ts +3 -14
- package/dist/services/document-handler-runtime/factory/document-handler-runtime-service-factory.js +14 -80
- package/dist/services/document-handler-runtime/server/request.js +1 -1
- package/dist/services/document-handler-runtime/{document-handler-abort.spec.js → spec/document-handler-abort.spec.js} +2 -2
- package/dist/services/document-handler-runtime/templates/database-mock.d.ts +1 -1
- package/dist/services/document-handler-runtime/templates/database-mock.js +1 -1
- package/dist/services/git/{git-repository.spec.js → spec/git-repository.spec.js} +1 -1
- package/dist/services/integration-api/customer-config-flags.d.ts +16 -0
- package/dist/services/integration-api/customer-config-flags.js +30 -0
- package/dist/services/integration-api/handler/customer-config-handler.d.ts +2 -2
- package/dist/services/integration-api/handler/install-resource-handler.d.ts +8 -0
- package/dist/services/integration-api/handler/install-resource-handler.js +10 -1
- package/dist/services/integration-api/index.d.ts +1 -0
- package/dist/services/integration-api/index.js +1 -0
- package/dist/services/integration-api/integration-api-factory.d.ts +4 -5
- package/dist/services/integration-api/integration-api-factory.js +11 -9
- package/dist/services/integration-api/integration-api-model.d.ts +0 -9
- package/dist/services/integration-api/integration-api-model.js +0 -16
- package/dist/services/integration-api/integration-api-service-build-context.d.ts +19 -0
- package/dist/services/integration-api/integration-api-service-build-context.js +4 -0
- package/dist/services/integration-api/spec/config-plugin.spec.js +1 -1
- package/dist/services/integration-api/spec/integration-api-service.spec.js +7 -3
- package/dist/services/integration-api/spec/speed-kit-config-file.spec.js +9 -2
- package/dist/services/integration-api/struct/config-plugin.d.ts +1 -1
- package/dist/services/integration-api/struct/config-plugin.js +12 -7
- package/dist/services/integration-api/struct/customer-config-file.js +1 -1
- package/dist/services/integration-api/struct/speed-kit-config-file.d.ts +18 -2
- package/dist/services/integration-api/struct/speed-kit-config-file.js +22 -12
- package/dist/services/integration-api/struct/speed-kit-config.d.ts +1 -1
- package/dist/services/integration-api/virtual/virtual-file-handler.d.ts +2 -2
- package/dist/services/onboarding/browser/config/browser-config.d.ts +3 -3
- package/dist/services/onboarding/browser/config/browser-config.js +5 -5
- package/dist/services/onboarding/browser/executable/executable-validator.d.ts +3 -4
- package/dist/services/onboarding/browser/executable/executable-validator.js +17 -15
- package/dist/services/onboarding/browser/extension/extension-downloader.d.ts +3 -4
- package/dist/services/onboarding/browser/extension/extension-downloader.js +6 -6
- package/dist/services/onboarding/browser/extension/extension-validator.d.ts +3 -4
- package/dist/services/onboarding/browser/extension/extension-validator.js +4 -4
- package/dist/services/onboarding/dashboard/diff-against-current-page.d.ts +2 -2
- package/dist/services/onboarding/dashboard/diff-against-current-page.js +1 -1
- package/dist/services/onboarding/dashboard/request-diff-service.d.ts +3 -1
- package/dist/services/onboarding/dashboard/request-diff-service.js +5 -3
- package/dist/services/onboarding/fetch-event-handler.d.ts +2 -2
- package/dist/services/onboarding/fetch-events/speed-kit-install-js.d.ts +3 -1
- package/dist/services/onboarding/fetch-events/speed-kit-install-js.js +5 -3
- package/dist/services/onboarding/file-events/file-watcher.d.ts +2 -2
- package/dist/services/onboarding/file-events/file-watcher.js +3 -2
- package/dist/services/onboarding/index.d.ts +1 -1
- package/dist/services/onboarding/index.js +1 -1
- package/dist/services/onboarding/onboarding-model.d.ts +8 -24
- package/dist/services/onboarding/onboarding-model.js +19 -87
- package/dist/services/onboarding/onboarding-service-build-context.d.ts +57 -0
- package/dist/services/onboarding/onboarding-service-build-context.js +67 -0
- package/dist/services/onboarding/onboarding-service-factory.d.ts +2 -4
- package/dist/services/onboarding/onboarding-service-factory.js +50 -37
- package/dist/services/onboarding/onboarding-service.d.ts +2 -2
- package/dist/services/onboarding/request-cache/cache.d.ts +2 -2
- package/dist/services/onboarding/server-config/index.d.ts +2 -2
- package/dist/services/onboarding/{browser → spec/browser}/executable/headed-user-agent.spec.js +1 -1
- package/dist/services/onboarding/{empty-service-worker.spec.js → spec/empty-service-worker.spec.js} +1 -1
- package/dist/services/onboarding/{onboarding-model.spec.js → spec/onboarding-model.spec.js} +13 -8
- package/dist/services/onboarding/{virtual-orestes-app → spec/virtual-orestes-app}/crawler.spec.js +1 -1
- package/dist/services/onboarding/{virtual-orestes-app → spec/virtual-orestes-app}/origin-error-cause.spec.js +1 -1
- package/dist/services/onboarding/virtual-orestes-app/crawler.d.ts +2 -2
- package/dist/services/onboarding/virtual-orestes-app/index.d.ts +2 -2
- package/dist/services/origin-request/asset-variations.js +1 -1
- package/dist/services/origin-request/index.d.ts +1 -1
- package/dist/services/origin-request/index.js +1 -1
- package/dist/services/origin-request/origin-request-service-build-context.d.ts +52 -0
- package/dist/services/origin-request/origin-request-service-build-context.js +54 -0
- package/dist/services/origin-request/origin-request-service-factory.d.ts +2 -4
- package/dist/services/origin-request/origin-request-service-factory.js +10 -8
- package/dist/services/origin-request/origin-request-service.d.ts +3 -3
- package/dist/services/origin-request/{asset-variations.spec.js → spec/asset-variations.spec.js} +1 -1
- package/dist/services/pop-config/index.d.ts +1 -0
- package/dist/services/pop-config/index.js +1 -0
- package/dist/services/pop-config/pop-config-factory.d.ts +4 -1
- package/dist/services/pop-config/pop-config-factory.js +10 -3
- package/dist/services/pop-config/pop-config-service-build-context.d.ts +10 -0
- package/dist/services/pop-config/pop-config-service-build-context.js +4 -0
- package/dist/services/prewarm/assets/asset-api-client.d.ts +3 -1
- package/dist/services/prewarm/assets/asset-api-client.js +5 -3
- package/dist/services/prewarm/auto-pre-warm-factory.d.ts +3 -30
- package/dist/services/prewarm/auto-pre-warm-factory.js +7 -9
- package/dist/services/prewarm/auto-pre-warm-service-build-context.d.ts +84 -0
- package/dist/services/prewarm/auto-pre-warm-service-build-context.js +68 -0
- package/dist/services/prewarm/index.d.ts +2 -0
- package/dist/services/prewarm/index.js +2 -0
- package/dist/{helpers → services/prewarm}/normalize.d.ts +0 -6
- package/dist/{helpers → services/prewarm}/normalize.js +0 -8
- package/dist/services/prewarm/pre-warm-factory.d.ts +4 -3
- package/dist/services/prewarm/pre-warm-factory.js +5 -4
- package/dist/services/prewarm/pre-warm-model.d.ts +0 -10
- package/dist/services/prewarm/pre-warm-model.js +0 -18
- package/dist/services/prewarm/pre-warm-service-build-context.d.ts +47 -0
- package/dist/services/prewarm/pre-warm-service-build-context.js +64 -0
- package/dist/services/prewarm/{csv-reader.spec.js → spec/csv-reader.spec.js} +1 -1
- package/dist/services/prewarm/{prewarm-targets.spec.js → spec/prewarm-targets.spec.js} +1 -1
- package/dist/services/pull/index.d.ts +1 -0
- package/dist/services/pull/index.js +1 -0
- package/dist/services/pull/pull-service-build-context.d.ts +28 -0
- package/dist/services/pull/pull-service-build-context.js +17 -0
- package/dist/services/pull/pull-service-factory.d.ts +3 -4
- package/dist/services/pull/pull-service-factory.js +11 -10
- package/dist/services/pull/pull-service-model.d.ts +0 -5
- package/dist/services/pull/pull-service-model.js +0 -9
- package/dist/services/query-builder/query-builder-factory.d.ts +9 -6
- package/dist/services/query-builder/query-builder-factory.js +24 -11
- package/dist/{models/cli-parameters.d.ts → services/query-builder/query-builder-flags.d.ts} +1 -122
- package/dist/services/query-builder/query-builder-flags.js +150 -0
- package/dist/services/query-builder/query-builder-model.d.ts +1 -14
- package/dist/services/query-builder/query-builder-service-build-context.d.ts +113 -0
- package/dist/services/query-builder/query-builder-service-build-context.js +68 -0
- package/dist/services/query-builder/query-builder-service.d.ts +3 -3
- package/dist/services/query-builder/query-builder-service.js +4 -5
- package/dist/services/query-builder/{queries/spec → spec/queries}/golden.spec.js +3 -3
- package/dist/services/query-builder/{queries/spec → spec/queries}/pops-query.spec.js +2 -2
- package/dist/services/query-builder/{queries/spec → spec/queries}/queries.spec.js +3 -3
- package/dist/services/query-builder/{queries/spec → spec/queries}/reported-bugs.spec.js +2 -2
- package/dist/{models/cli-parameters.spec.js → services/query-builder/spec/query-builder-flags.spec.js} +1 -1
- package/dist/services/query-builder/{query-builder-service.spec.js → spec/query-builder-service.spec.js} +4 -4
- package/dist/services/query-builder/{rules/spec → spec/rules}/pattern-language.spec.js +1 -1
- package/dist/services/query-builder/{rules/spec → spec/rules}/rule-parser.spec.js +1 -1
- package/dist/services/query-builder/{rules/spec → spec/rules}/rule-reducer.spec.js +2 -2
- package/dist/services/query-builder/{rules/spec → spec/rules}/rule-relevance.spec.js +2 -2
- package/dist/services/query-builder/{rules/spec → spec/rules}/rule-to-sql.spec.js +2 -2
- package/dist/services/query-builder/{rules/spec → spec/rules}/runtime-semantics.spec.js +1 -1
- package/dist/services/query-builder/{rules/spec → spec/rules}/strip-parameters.spec.js +3 -3
- package/dist/services/query-builder/{sql/spec → spec/sql}/expression.spec.js +2 -2
- package/dist/services/query-builder/{sql/spec → spec/sql}/format.spec.js +2 -2
- package/dist/services/query-builder/{sql/spec → spec/sql}/predicate.spec.js +1 -1
- package/dist/services/query-builder/{sql/spec → spec/sql}/regex.spec.js +1 -1
- package/dist/services/revalidate/index.d.ts +1 -0
- package/dist/services/revalidate/index.js +1 -0
- package/dist/services/revalidate/revalidate-factory.d.ts +3 -3
- package/dist/services/revalidate/revalidate-factory.js +1 -2
- package/dist/services/revalidate/revalidate-model.d.ts +0 -9
- package/dist/services/revalidate/revalidate-model.js +0 -8
- package/dist/services/revalidate/revalidate-service-build-context.d.ts +38 -0
- package/dist/services/revalidate/revalidate-service-build-context.js +59 -0
- package/dist/services/revalidate/revalidate-service.d.ts +2 -2
- package/dist/services/revalidate/{revalidate-service.spec.js → spec/revalidate-service.spec.js} +1 -1
- package/dist/services/setup/browser/browser-setup-service.d.ts +3 -5
- package/dist/services/setup/browser/browser-setup-service.js +16 -18
- package/dist/services/setup/difftool/difftool-setup-service.d.ts +3 -5
- package/dist/services/setup/difftool/difftool-setup-service.js +5 -7
- package/dist/services/setup/extension/extension-installer.d.ts +1 -1
- package/dist/services/setup/extension/extension-setup-service.d.ts +3 -5
- package/dist/services/setup/extension/extension-setup-service.js +8 -10
- package/dist/services/setup/index.d.ts +1 -1
- package/dist/services/setup/index.js +1 -1
- package/dist/services/setup/setup-service-build-context.d.ts +27 -0
- package/dist/services/setup/setup-service-build-context.js +26 -0
- package/dist/services/setup/setup-service-factory.d.ts +2 -4
- package/dist/services/setup/setup-service-factory.js +10 -17
- package/dist/services/setup/setup-service.d.ts +4 -6
- package/dist/services/setup/setup-service.js +6 -7
- package/dist/services/setup/{extension → spec/extension}/crx.spec.js +1 -1
- package/dist/services/setup/{extension → spec/extension}/webstore.spec.js +1 -1
- package/dist/services/setup/spec/os/tool-registry.spec.d.ts +1 -0
- package/dist/services/setup/{os → spec/os}/tool-registry.spec.js +1 -1
- package/oclif.manifest.json +1 -52
- package/package.json +6 -3
- package/dist/commands/document-handler.d.ts +0 -16
- package/dist/commands/document-handler.js +0 -32
- package/dist/helpers/cli-config.d.ts +0 -59
- package/dist/helpers/cli-config.js +0 -180
- package/dist/helpers/cli-config.spec.js +0 -117
- package/dist/helpers/customer-config.d.ts +0 -45
- package/dist/helpers/customer-config.js +0 -136
- package/dist/helpers/environment.d.ts +0 -15
- package/dist/helpers/environment.js +0 -40
- package/dist/helpers/environment.spec.js +0 -28
- package/dist/helpers/file-helper.d.ts +0 -8
- package/dist/helpers/file-helper.js +0 -28
- package/dist/helpers/is-directory.d.ts +0 -5
- package/dist/helpers/is-directory.js +0 -19
- package/dist/helpers/is-file.d.ts +0 -5
- package/dist/helpers/is-file.js +0 -19
- package/dist/helpers/logging-helper.d.ts +0 -15
- package/dist/helpers/logging-helper.js +0 -23
- package/dist/helpers/scrape.d.ts +0 -1
- package/dist/helpers/scrape.js +0 -8
- package/dist/helpers/speed-kit-rule-to-reg-exp.d.ts +0 -1
- package/dist/helpers/speed-kit-rule-to-reg-exp.js +0 -6
- package/dist/models/cli-parameters.js +0 -299
- package/dist/models/install.d.ts +0 -24
- package/dist/services/config-api/entity-manager-factory.d.ts +0 -5
- package/dist/services/config-api-service.d.ts +0 -21
- package/dist/services/config-api-service.js +0 -107
- package/dist/services/customer-config/customer-config-service-context.d.ts +0 -13
- package/dist/services/customer-config/customer-config-service-context.js +0 -21
- package/dist/services/deploy/context/deploy-context.d.ts +0 -32
- package/dist/services/deploy/context/deploy-context.js +0 -72
- package/dist/services/diff/diff-model.d.ts +0 -9
- package/dist/services/diff/diff-model.js +0 -12
- package/dist/services/diff-service.d.ts +0 -27
- package/dist/services/diff-service.js +0 -116
- package/dist/services/document-handler-runtime/context/document-handler-runtime-context.d.ts +0 -24
- package/dist/services/document-handler-runtime/context/document-handler-runtime-context.js +0 -62
- package/dist/services/document-handler-runtime/document-handler-runtime-service.d.ts +0 -31
- package/dist/services/document-handler-runtime/document-handler-runtime-service.js +0 -222
- package/dist/services/document-handler-runtime/interface/document-handler-runtime-config-interface.d.ts +0 -3
- package/dist/services/document-handler-runtime/interface/document-handler-runtime-config-interface.js +0 -3
- package/dist/services/document-handler-runtime/templates/execute-document-handler.d.ts +0 -6
- package/dist/services/document-handler-runtime/templates/execute-document-handler.js +0 -74
- package/dist/services/document-handler-runtime/templates/orestes-mock.d.ts +0 -9
- package/dist/services/document-handler-runtime/templates/orestes-mock.js +0 -166
- package/dist/services/document-handler-runtime/templates/package-json.d.ts +0 -6
- package/dist/services/document-handler-runtime/templates/package-json.js +0 -17
- package/dist/services/document-handler-runtime/templates/test.d.ts +0 -6
- package/dist/services/document-handler-runtime/templates/test.js +0 -64
- package/dist/services/origin-request/origin-request-context.d.ts +0 -13
- package/dist/services/origin-request/origin-request-context.js +0 -23
- package/dist/services/query-builder/query-command.d.ts +0 -28
- package/dist/services/query-builder/query-command.js +0 -37
- package/dist/services/setup/setup-context.d.ts +0 -14
- package/dist/services/setup/setup-context.js +0 -15
- /package/dist/helpers/{chrome-flags.spec.d.ts → spec/chrome-flags.spec.d.ts} +0 -0
- /package/dist/helpers/{origin-proxy.spec.d.ts → spec/origin-proxy.spec.d.ts} +0 -0
- /package/dist/hooks/{init → spec/init}/dns-result-order.spec.d.ts +0 -0
- /package/dist/hooks/{init → spec/init}/http1-global-dispatcher.spec.d.ts +0 -0
- /package/dist/services/athena/{athena-service.spec.d.ts → spec/athena-service.spec.d.ts} +0 -0
- /package/dist/services/athena/{baqend-athena-service.spec.d.ts → spec/baqend-athena-service.spec.d.ts} +0 -0
- /package/dist/services/browser-fetch/{browser-origin-fetch.spec.d.ts → spec/browser-origin-fetch.spec.d.ts} +0 -0
- /package/dist/services/browser-fetch/{browser-origin-fetcher.spec.d.ts → spec/browser-origin-fetcher.spec.d.ts} +0 -0
- /package/dist/services/browser-fetch/{browser-response.spec.d.ts → spec/browser-response.spec.d.ts} +0 -0
- /package/dist/services/browser-fetch/{device-emulation.spec.d.ts → spec/device-emulation.spec.d.ts} +0 -0
- /package/dist/services/bundler/{bundle-service.spec.d.ts → spec/bundle-service.spec.d.ts} +0 -0
- /package/dist/{helpers/cli-config.spec.d.ts → services/cli/command-build-context.js} +0 -0
- /package/dist/{helpers/environment.spec.d.ts → services/cli/spec/cli-environment-detection.spec.d.ts} +0 -0
- /package/dist/{models/cli-parameters.spec.d.ts → services/cli/spec/cli-environment.spec.d.ts} +0 -0
- /package/dist/services/cli/{cli-service.spec.d.ts → spec/cli-service.spec.d.ts} +0 -0
- /package/dist/{models/install.js → services/customer-config/site-analyzer/site-analyzer-model.js} +0 -0
- /package/dist/services/deploy/{bulk → spec/bulk}/bulk-deploy-service.spec.d.ts +0 -0
- /package/dist/services/deploy/{bulk → spec/bulk}/touched-configs.spec.d.ts +0 -0
- /package/dist/services/deploy/{checks → spec/checks}/activation/customer-approval-check.spec.d.ts +0 -0
- /package/dist/services/deploy/{checks → spec/checks}/post-deploy/refresh-deployment-job-check.spec.d.ts +0 -0
- /package/dist/services/deploy/{checks → spec/checks}/pre-deploy/split-change-check.spec.d.ts +0 -0
- /package/dist/services/deploy/{handler → spec/handler}/module-handler.spec.d.ts +0 -0
- /package/dist/services/deploy/{handler → spec/handler}/testing-installation-links.spec.d.ts +0 -0
- /package/dist/services/deploy/{mr → spec/mr}/live-state-check.spec.d.ts +0 -0
- /package/dist/services/deploy/{mr → spec/mr}/merge-request-description.spec.d.ts +0 -0
- /package/dist/services/deploy/{policy → spec/policy}/auto-deploy-policy.spec.d.ts +0 -0
- /package/dist/{helpers/html-format-helper.d.ts → services/diff/html-format.d.ts} +0 -0
- /package/dist/{helpers/html-format-helper.js → services/diff/html-format.js} +0 -0
- /package/dist/services/document-handler-runtime/{document-handler-abort.spec.d.ts → spec/document-handler-abort.spec.d.ts} +0 -0
- /package/dist/services/git/{git-repository.spec.d.ts → spec/git-repository.spec.d.ts} +0 -0
- /package/dist/{helpers → services/integration-api}/array-helper.d.ts +0 -0
- /package/dist/{helpers → services/integration-api}/array-helper.js +0 -0
- /package/dist/services/onboarding/{browser → spec/browser}/executable/headed-user-agent.spec.d.ts +0 -0
- /package/dist/services/onboarding/{empty-service-worker.spec.d.ts → spec/empty-service-worker.spec.d.ts} +0 -0
- /package/dist/services/onboarding/{onboarding-model.spec.d.ts → spec/onboarding-model.spec.d.ts} +0 -0
- /package/dist/services/onboarding/{virtual-orestes-app → spec/virtual-orestes-app}/crawler.spec.d.ts +0 -0
- /package/dist/services/onboarding/{virtual-orestes-app → spec/virtual-orestes-app}/origin-error-cause.spec.d.ts +0 -0
- /package/dist/{helpers → services/origin-request}/java-regex.d.ts +0 -0
- /package/dist/{helpers → services/origin-request}/java-regex.js +0 -0
- /package/dist/services/origin-request/{asset-variations.spec.d.ts → spec/asset-variations.spec.d.ts} +0 -0
- /package/dist/services/prewarm/{csv-reader.spec.d.ts → spec/csv-reader.spec.d.ts} +0 -0
- /package/dist/services/prewarm/{prewarm-targets.spec.d.ts → spec/prewarm-targets.spec.d.ts} +0 -0
- /package/dist/services/query-builder/{queries/spec → spec/queries}/golden-configs.d.ts +0 -0
- /package/dist/services/query-builder/{queries/spec → spec/queries}/golden-configs.js +0 -0
- /package/dist/services/query-builder/{queries/spec → spec/queries}/golden.spec.d.ts +0 -0
- /package/dist/services/query-builder/{queries/spec → spec/queries}/pops-query.spec.d.ts +0 -0
- /package/dist/services/query-builder/{queries/spec → spec/queries}/queries.spec.d.ts +0 -0
- /package/dist/services/query-builder/{queries/spec → spec/queries}/reported-bugs.spec.d.ts +0 -0
- /package/dist/services/query-builder/{query-builder-service.spec.d.ts → spec/query-builder-flags.spec.d.ts} +0 -0
- /package/dist/services/query-builder/{rules/spec/pattern-language.spec.d.ts → spec/query-builder-service.spec.d.ts} +0 -0
- /package/dist/services/query-builder/{rules/spec/rule-parser.spec.d.ts → spec/rules/pattern-language.spec.d.ts} +0 -0
- /package/dist/services/query-builder/{rules/spec/rule-reducer.spec.d.ts → spec/rules/rule-parser.spec.d.ts} +0 -0
- /package/dist/services/query-builder/{rules/spec/rule-relevance.spec.d.ts → spec/rules/rule-reducer.spec.d.ts} +0 -0
- /package/dist/services/query-builder/{rules/spec/rule-to-sql.spec.d.ts → spec/rules/rule-relevance.spec.d.ts} +0 -0
- /package/dist/services/query-builder/{rules/spec/runtime-semantics.spec.d.ts → spec/rules/rule-to-sql.spec.d.ts} +0 -0
- /package/dist/services/query-builder/{rules/spec/strip-parameters.spec.d.ts → spec/rules/runtime-semantics.spec.d.ts} +0 -0
- /package/dist/services/query-builder/{sql/spec/expression.spec.d.ts → spec/rules/strip-parameters.spec.d.ts} +0 -0
- /package/dist/services/query-builder/{sql/spec/format.spec.d.ts → spec/sql/expression.spec.d.ts} +0 -0
- /package/dist/services/query-builder/{sql/spec/predicate.spec.d.ts → spec/sql/format.spec.d.ts} +0 -0
- /package/dist/services/query-builder/{sql/spec/regex.spec.d.ts → spec/sql/predicate.spec.d.ts} +0 -0
- /package/dist/services/{revalidate/revalidate-service.spec.d.ts → query-builder/spec/sql/regex.spec.d.ts} +0 -0
- /package/dist/services/{setup/extension/crx.spec.d.ts → revalidate/spec/revalidate-service.spec.d.ts} +0 -0
- /package/dist/services/setup/{extension/webstore.spec.d.ts → spec/extension/crx.spec.d.ts} +0 -0
- /package/dist/services/setup/{os/tool-registry.spec.d.ts → spec/extension/webstore.spec.d.ts} +0 -0
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { CliEnvironment } from "./cli-environment.js";
|
|
2
|
+
import { CliServiceFactory } from "./cli-service-factory.js";
|
|
3
|
+
import { CliServiceBuildContext } from "./cli-service-build-context.js";
|
|
4
|
+
/**
|
|
5
|
+
* Builds the environment of one invocation, with its one CLI.
|
|
6
|
+
*
|
|
7
|
+
* The CLI asks the environment whether it runs in CI and whether it may prompt,
|
|
8
|
+
* and the environment hands the CLI out, so the settings are loaded first, the
|
|
9
|
+
* CLI is built against them, and only then is the environment complete.
|
|
10
|
+
*/
|
|
11
|
+
export class CliEnvironmentFactory {
|
|
12
|
+
oclif;
|
|
13
|
+
options;
|
|
14
|
+
/**
|
|
15
|
+
* @param oclif the oclif config of the running command
|
|
16
|
+
* @param options what the command knows about its invocation
|
|
17
|
+
*/
|
|
18
|
+
constructor(oclif, options = {}) {
|
|
19
|
+
this.oclif = oclif;
|
|
20
|
+
this.options = options;
|
|
21
|
+
}
|
|
22
|
+
buildEnvironment() {
|
|
23
|
+
const environment = CliEnvironment.load(this.oclif, this.options.customerPath);
|
|
24
|
+
const cli = new CliServiceFactory(new CliServiceBuildContext({
|
|
25
|
+
environment,
|
|
26
|
+
quiet: this.options.quiet ?? false,
|
|
27
|
+
})).getService();
|
|
28
|
+
return environment.attachCli(cli);
|
|
29
|
+
}
|
|
30
|
+
}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { Config } from "@oclif/core";
|
|
2
|
+
import { CliSettings } from "./cli-settings.js";
|
|
3
|
+
import type { CliServiceInterface } from "./cli-service-model.js";
|
|
4
|
+
/**
|
|
5
|
+
* Where a command runs: the user's settings, oclif's config and the
|
|
6
|
+
* directories the CLI owns.
|
|
7
|
+
*
|
|
8
|
+
* One per invocation, built by {@link CliEnvironmentFactory} together with the
|
|
9
|
+
* invocation's one CLI ({@link cli}) and handed to every factory in its
|
|
10
|
+
* context. The settings merge three sources, later winning over earlier:
|
|
11
|
+
*
|
|
12
|
+
* ```
|
|
13
|
+
* ~/.config/speed-kit-cli/config.json < .env < process.env
|
|
14
|
+
* ```
|
|
15
|
+
*/
|
|
16
|
+
export declare class CliEnvironment {
|
|
17
|
+
readonly oclif: Config;
|
|
18
|
+
private readonly env;
|
|
19
|
+
/** The user's settings; {@link save} writes changes back. */
|
|
20
|
+
readonly settings: CliSettings;
|
|
21
|
+
/** Where the extra node modules of a customer's documentHandler live. */
|
|
22
|
+
readonly nodeModulesPath: string;
|
|
23
|
+
private attachedCli?;
|
|
24
|
+
/**
|
|
25
|
+
* Loads the settings for one invocation.
|
|
26
|
+
*
|
|
27
|
+
* @param oclif the oclif config of the running command
|
|
28
|
+
* @param customerPath the customer the command works on, if any, for its
|
|
29
|
+
* node modules
|
|
30
|
+
* @param env the process environment; a test passes its own
|
|
31
|
+
*/
|
|
32
|
+
static load(oclif: Config, customerPath?: string, env?: NodeJS.ProcessEnv): CliEnvironment;
|
|
33
|
+
private constructor();
|
|
34
|
+
/** The one CLI of this invocation: every output and every prompt. */
|
|
35
|
+
get cli(): CliServiceInterface;
|
|
36
|
+
/**
|
|
37
|
+
* Completes the environment with its CLI. Only {@link CliEnvironmentFactory}
|
|
38
|
+
* calls this, once: the CLI is built against the environment, so the two
|
|
39
|
+
* cannot be created in one step.
|
|
40
|
+
*/
|
|
41
|
+
attachCli(cli: CliServiceInterface): this;
|
|
42
|
+
/** The directory the CLI keeps its caches and scratch files in. */
|
|
43
|
+
get cacheDir(): string;
|
|
44
|
+
/**
|
|
45
|
+
* Whether this runs in CI. Most CI providers set `CI=true`, and several set
|
|
46
|
+
* their own dedicated variable, so both are checked.
|
|
47
|
+
*/
|
|
48
|
+
get isCI(): boolean;
|
|
49
|
+
/**
|
|
50
|
+
* True when the user cannot safely be prompted: in CI, without an attached
|
|
51
|
+
* TTY (piped output, an npm background install), or when they opted out
|
|
52
|
+
* with SK_NON_INTERACTIVE.
|
|
53
|
+
*/
|
|
54
|
+
get nonInteractive(): boolean;
|
|
55
|
+
/**
|
|
56
|
+
* Persists the given settings into the user config.json, merging with what
|
|
57
|
+
* is already there. Also reflects the change in {@link settings} so the
|
|
58
|
+
* running command sees it immediately.
|
|
59
|
+
*/
|
|
60
|
+
save(partial: Partial<CliSettings>): void;
|
|
61
|
+
private loadSettings;
|
|
62
|
+
private createEmptyConfigFile;
|
|
63
|
+
private getConfigFilePath;
|
|
64
|
+
private loadConfigFromConfigFile;
|
|
65
|
+
private loadConfigFromEnvironment;
|
|
66
|
+
private resolveExtensionConfigPaths;
|
|
67
|
+
private readCliConfigFromFile;
|
|
68
|
+
/**
|
|
69
|
+
* Reads and parses config.json without any side effects. Returns null when
|
|
70
|
+
* the file is missing or cannot be parsed.
|
|
71
|
+
*/
|
|
72
|
+
private readRawConfigFile;
|
|
73
|
+
}
|
|
@@ -0,0 +1,216 @@
|
|
|
1
|
+
import * as dotenv from "dotenv";
|
|
2
|
+
import fs from "node:fs";
|
|
3
|
+
import path, { resolve } from "node:path";
|
|
4
|
+
import { parseChromeFlags } from "../../helpers/chrome-flags.js";
|
|
5
|
+
import { defaultSettings } from "./cli-settings.js";
|
|
6
|
+
import ApplicationError from "../error-handling/error/application-error.js";
|
|
7
|
+
dotenv.config({ quiet: true });
|
|
8
|
+
const environmentMapping = {
|
|
9
|
+
chromeExtensionPaths: "CHROME_EXTENSION_PATHS",
|
|
10
|
+
chromeFlags: "CHROME_FLAGS",
|
|
11
|
+
chromePath: "CHROME_PATH",
|
|
12
|
+
chromeUserProfilePath: "CHROME_USER_PROFILE_PATH",
|
|
13
|
+
diffExec: "DIFF_EXEC",
|
|
14
|
+
diffExecTemplate: "DIFF_EXEC_TEMPLATE",
|
|
15
|
+
ideaDirectory: "IDEA_INITIAL_DIRECTORY",
|
|
16
|
+
slackToken: "SLACK_TOKEN",
|
|
17
|
+
testApp: "TEST_APP",
|
|
18
|
+
};
|
|
19
|
+
const CONFIG_FILE_NAME = "config.json";
|
|
20
|
+
/** Variables CI providers set besides `CI`. */
|
|
21
|
+
const CI_MARKERS = [
|
|
22
|
+
"CONTINUOUS_INTEGRATION",
|
|
23
|
+
"BUILD_NUMBER",
|
|
24
|
+
"GITLAB_CI",
|
|
25
|
+
"GITHUB_ACTIONS",
|
|
26
|
+
"JENKINS_URL",
|
|
27
|
+
"TEAMCITY_VERSION",
|
|
28
|
+
"TF_BUILD",
|
|
29
|
+
"BITBUCKET_BUILD_NUMBER",
|
|
30
|
+
"CIRCLECI",
|
|
31
|
+
"TRAVIS",
|
|
32
|
+
];
|
|
33
|
+
/**
|
|
34
|
+
* Where a command runs: the user's settings, oclif's config and the
|
|
35
|
+
* directories the CLI owns.
|
|
36
|
+
*
|
|
37
|
+
* One per invocation, built by {@link CliEnvironmentFactory} together with the
|
|
38
|
+
* invocation's one CLI ({@link cli}) and handed to every factory in its
|
|
39
|
+
* context. The settings merge three sources, later winning over earlier:
|
|
40
|
+
*
|
|
41
|
+
* ```
|
|
42
|
+
* ~/.config/speed-kit-cli/config.json < .env < process.env
|
|
43
|
+
* ```
|
|
44
|
+
*/
|
|
45
|
+
export class CliEnvironment {
|
|
46
|
+
oclif;
|
|
47
|
+
env;
|
|
48
|
+
/** The user's settings; {@link save} writes changes back. */
|
|
49
|
+
settings = defaultSettings();
|
|
50
|
+
/** Where the extra node modules of a customer's documentHandler live. */
|
|
51
|
+
nodeModulesPath;
|
|
52
|
+
attachedCli;
|
|
53
|
+
/**
|
|
54
|
+
* Loads the settings for one invocation.
|
|
55
|
+
*
|
|
56
|
+
* @param oclif the oclif config of the running command
|
|
57
|
+
* @param customerPath the customer the command works on, if any, for its
|
|
58
|
+
* node modules
|
|
59
|
+
* @param env the process environment; a test passes its own
|
|
60
|
+
*/
|
|
61
|
+
static load(oclif, customerPath, env = process.env) {
|
|
62
|
+
const environment = new CliEnvironment(oclif, env, customerPath);
|
|
63
|
+
environment.loadSettings();
|
|
64
|
+
return environment;
|
|
65
|
+
}
|
|
66
|
+
constructor(oclif, env, customerPath) {
|
|
67
|
+
this.oclif = oclif;
|
|
68
|
+
this.env = env;
|
|
69
|
+
this.nodeModulesPath = resolve(oclif.cacheDir, "additional_node_modules", customerPath || "");
|
|
70
|
+
}
|
|
71
|
+
/** The one CLI of this invocation: every output and every prompt. */
|
|
72
|
+
get cli() {
|
|
73
|
+
if (!this.attachedCli) {
|
|
74
|
+
throw new ApplicationError("This environment has no CLI: build it with CliEnvironmentFactory.");
|
|
75
|
+
}
|
|
76
|
+
return this.attachedCli;
|
|
77
|
+
}
|
|
78
|
+
/**
|
|
79
|
+
* Completes the environment with its CLI. Only {@link CliEnvironmentFactory}
|
|
80
|
+
* calls this, once: the CLI is built against the environment, so the two
|
|
81
|
+
* cannot be created in one step.
|
|
82
|
+
*/
|
|
83
|
+
attachCli(cli) {
|
|
84
|
+
if (this.attachedCli) {
|
|
85
|
+
throw new ApplicationError("This environment already has a CLI.");
|
|
86
|
+
}
|
|
87
|
+
this.attachedCli = cli;
|
|
88
|
+
return this;
|
|
89
|
+
}
|
|
90
|
+
/** The directory the CLI keeps its caches and scratch files in. */
|
|
91
|
+
get cacheDir() {
|
|
92
|
+
return this.oclif.cacheDir;
|
|
93
|
+
}
|
|
94
|
+
/**
|
|
95
|
+
* Whether this runs in CI. Most CI providers set `CI=true`, and several set
|
|
96
|
+
* their own dedicated variable, so both are checked.
|
|
97
|
+
*/
|
|
98
|
+
get isCI() {
|
|
99
|
+
const ci = this.env.CI;
|
|
100
|
+
if (ci !== undefined && ci !== "false" && ci !== "0") {
|
|
101
|
+
return true;
|
|
102
|
+
}
|
|
103
|
+
return CI_MARKERS.some((marker) => Boolean(this.env[marker]));
|
|
104
|
+
}
|
|
105
|
+
/**
|
|
106
|
+
* True when the user cannot safely be prompted: in CI, without an attached
|
|
107
|
+
* TTY (piped output, an npm background install), or when they opted out
|
|
108
|
+
* with SK_NON_INTERACTIVE.
|
|
109
|
+
*/
|
|
110
|
+
get nonInteractive() {
|
|
111
|
+
const optOut = this.env.SK_NON_INTERACTIVE;
|
|
112
|
+
if (optOut !== undefined && optOut !== "") {
|
|
113
|
+
return true;
|
|
114
|
+
}
|
|
115
|
+
if (this.isCI) {
|
|
116
|
+
return true;
|
|
117
|
+
}
|
|
118
|
+
return !process.stdin.isTTY || !process.stdout.isTTY;
|
|
119
|
+
}
|
|
120
|
+
/**
|
|
121
|
+
* Persists the given settings into the user config.json, merging with what
|
|
122
|
+
* is already there. Also reflects the change in {@link settings} so the
|
|
123
|
+
* running command sees it immediately.
|
|
124
|
+
*/
|
|
125
|
+
save(partial) {
|
|
126
|
+
const existing = this.readRawConfigFile() ?? {};
|
|
127
|
+
const merged = { ...existing, ...partial };
|
|
128
|
+
fs.mkdirSync(path.resolve(this.oclif.configDir), { recursive: true });
|
|
129
|
+
fs.writeFileSync(this.getConfigFilePath(), JSON.stringify(merged, null, `\t`));
|
|
130
|
+
Object.assign(this.settings, partial);
|
|
131
|
+
}
|
|
132
|
+
loadSettings() {
|
|
133
|
+
// load config from configFile
|
|
134
|
+
this.loadConfigFromConfigFile();
|
|
135
|
+
// override config from environment
|
|
136
|
+
this.loadConfigFromEnvironment();
|
|
137
|
+
// The environment holds a string, config.json an array.
|
|
138
|
+
this.settings.chromeFlags = parseChromeFlags(this.settings.chromeFlags);
|
|
139
|
+
this.resolveExtensionConfigPaths();
|
|
140
|
+
}
|
|
141
|
+
createEmptyConfigFile() {
|
|
142
|
+
fs.mkdirSync(path.resolve(this.oclif.configDir), { recursive: true });
|
|
143
|
+
fs.writeFileSync(this.getConfigFilePath(), JSON.stringify(defaultSettings(), null, `\t`));
|
|
144
|
+
}
|
|
145
|
+
getConfigFilePath() {
|
|
146
|
+
return path.resolve(this.oclif.configDir, CONFIG_FILE_NAME);
|
|
147
|
+
}
|
|
148
|
+
loadConfigFromConfigFile() {
|
|
149
|
+
const configJson = this.readCliConfigFromFile();
|
|
150
|
+
if (!configJson) {
|
|
151
|
+
return;
|
|
152
|
+
}
|
|
153
|
+
for (const configKey in this.settings) {
|
|
154
|
+
if (!(configKey in configJson)) {
|
|
155
|
+
continue;
|
|
156
|
+
}
|
|
157
|
+
const value = configJson[configKey];
|
|
158
|
+
// skip null/undefined and empty strings so file values only override
|
|
159
|
+
// defaults when they carry an actual setting (keeps booleans/numbers,
|
|
160
|
+
// unlike the previous `.length`-only check which dropped them)
|
|
161
|
+
if (value === undefined || value === null) {
|
|
162
|
+
continue;
|
|
163
|
+
}
|
|
164
|
+
if (typeof value === "string" && value.length === 0) {
|
|
165
|
+
continue;
|
|
166
|
+
}
|
|
167
|
+
this.settings[configKey] = value;
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
loadConfigFromEnvironment() {
|
|
171
|
+
for (const configKey in this.settings) {
|
|
172
|
+
if (!(configKey in environmentMapping)) {
|
|
173
|
+
continue;
|
|
174
|
+
}
|
|
175
|
+
const environmentVariable = environmentMapping[configKey];
|
|
176
|
+
if (environmentVariable in this.env &&
|
|
177
|
+
this.env[environmentVariable].length > 0) {
|
|
178
|
+
this.settings[configKey] = this.env[environmentVariable];
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
resolveExtensionConfigPaths() {
|
|
183
|
+
const pathKeys = [
|
|
184
|
+
"chromeExtensionPaths",
|
|
185
|
+
"chromeUserProfilePath",
|
|
186
|
+
"chromePath",
|
|
187
|
+
"ideaDirectory",
|
|
188
|
+
];
|
|
189
|
+
for (const key of pathKeys) {
|
|
190
|
+
this.settings[key] = this.settings[key].replaceAll(new RegExp("~", "g"), this.oclif.home);
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
readCliConfigFromFile() {
|
|
194
|
+
if (!fs.existsSync(this.getConfigFilePath())) {
|
|
195
|
+
this.createEmptyConfigFile();
|
|
196
|
+
return;
|
|
197
|
+
}
|
|
198
|
+
return this.readRawConfigFile();
|
|
199
|
+
}
|
|
200
|
+
/**
|
|
201
|
+
* Reads and parses config.json without any side effects. Returns null when
|
|
202
|
+
* the file is missing or cannot be parsed.
|
|
203
|
+
*/
|
|
204
|
+
readRawConfigFile() {
|
|
205
|
+
if (!fs.existsSync(this.getConfigFilePath())) {
|
|
206
|
+
return null;
|
|
207
|
+
}
|
|
208
|
+
try {
|
|
209
|
+
const configFileContent = fs.readFileSync(this.getConfigFilePath(), "utf8");
|
|
210
|
+
return JSON.parse(configFileContent);
|
|
211
|
+
}
|
|
212
|
+
catch {
|
|
213
|
+
return null;
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { CommandContextValues } from "./command-build-context.js";
|
|
2
|
+
export interface CliServiceBuildContextValues extends CommandContextValues {
|
|
3
|
+
/** Keep to what `--quiet` allows: no spinners, default answers. */
|
|
4
|
+
readonly quiet: boolean;
|
|
5
|
+
}
|
|
6
|
+
declare const CliServiceBuildContext_base: new (values: CliServiceBuildContextValues) => Readonly<CliServiceBuildContextValues>;
|
|
7
|
+
/** What the invocation's one CLI is built from. */
|
|
8
|
+
export declare class CliServiceBuildContext extends CliServiceBuildContext_base {
|
|
9
|
+
}
|
|
10
|
+
export {};
|
|
@@ -1,8 +1,16 @@
|
|
|
1
1
|
import { CliService } from "./cli-service.js";
|
|
2
|
-
import {
|
|
2
|
+
import { CliServiceBuildContext } from "./cli-service-build-context.js";
|
|
3
|
+
/**
|
|
4
|
+
* Builds the CLI service. Deliberately neither a singleton nor cached.
|
|
5
|
+
*
|
|
6
|
+
* {@link CliEnvironmentFactory} builds the one instance of an invocation and
|
|
7
|
+
* hands it out as `environment.cli`; nothing else calls this. Sharing by
|
|
8
|
+
* construction rather than by global state is what keeps `--quiet` honest:
|
|
9
|
+
* with a CLI per factory the flag would be decided by whichever factory
|
|
10
|
+
* happened to build first, which is not something a caller can reason about.
|
|
11
|
+
*/
|
|
3
12
|
export declare class CliServiceFactory {
|
|
4
|
-
private context
|
|
5
|
-
|
|
6
|
-
constructor(context?: CliContext);
|
|
13
|
+
private readonly context;
|
|
14
|
+
constructor(context: CliServiceBuildContext);
|
|
7
15
|
getService(): CliService;
|
|
8
16
|
}
|
|
@@ -1,18 +1,20 @@
|
|
|
1
1
|
import { CliService } from "./cli-service.js";
|
|
2
|
-
import {
|
|
2
|
+
import { ClipboardService } from "./clipboard/index.js";
|
|
3
|
+
/**
|
|
4
|
+
* Builds the CLI service. Deliberately neither a singleton nor cached.
|
|
5
|
+
*
|
|
6
|
+
* {@link CliEnvironmentFactory} builds the one instance of an invocation and
|
|
7
|
+
* hands it out as `environment.cli`; nothing else calls this. Sharing by
|
|
8
|
+
* construction rather than by global state is what keeps `--quiet` honest:
|
|
9
|
+
* with a CLI per factory the flag would be decided by whichever factory
|
|
10
|
+
* happened to build first, which is not something a caller can reason about.
|
|
11
|
+
*/
|
|
3
12
|
export class CliServiceFactory {
|
|
4
13
|
context;
|
|
5
|
-
service = undefined;
|
|
6
14
|
constructor(context) {
|
|
7
15
|
this.context = context;
|
|
8
|
-
if (!context) {
|
|
9
|
-
this.context = new CliContext(false);
|
|
10
|
-
}
|
|
11
16
|
}
|
|
12
17
|
getService() {
|
|
13
|
-
|
|
14
|
-
this.service = new CliService(this.context.quiet);
|
|
15
|
-
}
|
|
16
|
-
return this.service;
|
|
18
|
+
return new CliService(new ClipboardService(), this.context.environment, this.context.quiet);
|
|
17
19
|
}
|
|
18
20
|
}
|
|
@@ -1,10 +1,6 @@
|
|
|
1
1
|
import { Options } from "cli-progress";
|
|
2
2
|
import { ExecSyncOptions } from "node:child_process";
|
|
3
3
|
import { ChalkInstance } from "chalk";
|
|
4
|
-
export declare class CliContext {
|
|
5
|
-
readonly quiet: boolean;
|
|
6
|
-
constructor(quiet?: boolean);
|
|
7
|
-
}
|
|
8
4
|
export declare enum CliActionStatus {
|
|
9
5
|
COMPLETED = "completed",
|
|
10
6
|
FAILED = "failed",
|
|
@@ -27,11 +23,13 @@ export interface CliTableOptions {
|
|
|
27
23
|
export interface CliServiceInterface {
|
|
28
24
|
style: ChalkInstance;
|
|
29
25
|
readonly quiet: boolean;
|
|
26
|
+
/** True when this shell cannot be prompted (CI, no TTY, SK_NON_INTERACTIVE). */
|
|
27
|
+
readonly nonInteractive: boolean;
|
|
30
28
|
code(code: string, buffered?: boolean): void;
|
|
31
29
|
codeStyle(code: string): string;
|
|
32
30
|
comment(message: string, buffered?: boolean): void;
|
|
33
|
-
confirm(message: string, defaultAnswer
|
|
34
|
-
exit(code
|
|
31
|
+
confirm(message: string, defaultAnswer?: boolean): Promise<boolean>;
|
|
32
|
+
exit(code?: number): void;
|
|
35
33
|
prompt(message: string, options?: {
|
|
36
34
|
defaultAnswer?: any;
|
|
37
35
|
validator?: any;
|
|
@@ -43,6 +41,12 @@ export interface CliServiceInterface {
|
|
|
43
41
|
checked?: boolean;
|
|
44
42
|
description?: string;
|
|
45
43
|
}[]): Promise<T[]>;
|
|
44
|
+
/** Put text on the system clipboard; resolves to whether it arrived. */
|
|
45
|
+
copyToClipboard(text: string): Promise<boolean>;
|
|
46
|
+
/** Machine-readable payload, verbatim, to the data channel. */
|
|
47
|
+
pipe(data: string): void;
|
|
48
|
+
/** A human-facing line that must stay out of the data channel. */
|
|
49
|
+
note(message: string): void;
|
|
46
50
|
spacer(): void;
|
|
47
51
|
startAction(name: string, message: string): void;
|
|
48
52
|
endAction(name: string, message?: string): void;
|
|
@@ -1,17 +1,39 @@
|
|
|
1
1
|
import { ChalkInstance } from "chalk";
|
|
2
2
|
import { Options } from "cli-progress";
|
|
3
3
|
import { CliServiceInterface, CliTableColumns } from "./cli-service-model.js";
|
|
4
|
+
import { ClipboardService } from "./clipboard/index.js";
|
|
5
|
+
import type { CliEnvironment } from "./cli-environment.js";
|
|
4
6
|
import { ExecSyncOptions } from "node:child_process";
|
|
7
|
+
/** What the CLI needs to know about where it runs. */
|
|
8
|
+
export type CliTerminal = Pick<CliEnvironment, "isCI" | "nonInteractive">;
|
|
5
9
|
export declare class CliService implements CliServiceInterface {
|
|
10
|
+
private readonly clipboard;
|
|
11
|
+
private readonly terminal;
|
|
6
12
|
readonly quiet: boolean;
|
|
7
13
|
style: ChalkInstance;
|
|
8
14
|
private buffer;
|
|
9
15
|
private progressBar?;
|
|
10
16
|
private spinners;
|
|
17
|
+
/**
|
|
18
|
+
* Whether a spinner can actually spin here.
|
|
19
|
+
*
|
|
20
|
+
* The same condition spinnies itself uses to decide, so the two never
|
|
21
|
+
* disagree: without it spinnies falls back to re-rendering *every* spinner it
|
|
22
|
+
* knows on every update, which in a CI log means the first action's line is
|
|
23
|
+
* printed again under each later one — a page of "build prewarm-query" for a
|
|
24
|
+
* job that only ever built one.
|
|
25
|
+
*/
|
|
11
26
|
private readonly animates;
|
|
12
27
|
/** The text of each running action, for the log line that replaces it. */
|
|
13
28
|
private readonly actions;
|
|
14
|
-
|
|
29
|
+
/**
|
|
30
|
+
* True when this shell cannot be asked a question: CI, no TTY on either end,
|
|
31
|
+
* or SK_NON_INTERACTIVE. Callers that would otherwise block on a prompt check
|
|
32
|
+
* it and take the non-interactive branch — which is why it lives here rather
|
|
33
|
+
* than being re-derived wherever a prompt happens to be.
|
|
34
|
+
*/
|
|
35
|
+
get nonInteractive(): boolean;
|
|
36
|
+
constructor(clipboard: ClipboardService, terminal: CliTerminal, quiet?: boolean);
|
|
15
37
|
code(code: string, buffered?: boolean): void;
|
|
16
38
|
codeStyle(code: string): string;
|
|
17
39
|
comment(message: string, buffered?: boolean): void;
|
|
@@ -28,6 +50,35 @@ export declare class CliService implements CliServiceInterface {
|
|
|
28
50
|
checked?: boolean;
|
|
29
51
|
description?: string;
|
|
30
52
|
}[]): Promise<T[]>;
|
|
53
|
+
/**
|
|
54
|
+
* Put text on the system clipboard.
|
|
55
|
+
*
|
|
56
|
+
* Reports whether it arrived rather than throwing: a machine with no
|
|
57
|
+
* clipboard tool, or one whose tool cannot be reached in time, is an
|
|
58
|
+
* ordinary condition, and every caller has something useful to print
|
|
59
|
+
* instead.
|
|
60
|
+
*/
|
|
61
|
+
copyToClipboard(text: string): Promise<boolean>;
|
|
62
|
+
/**
|
|
63
|
+
* Write machine-readable output to the data channel, verbatim.
|
|
64
|
+
*
|
|
65
|
+
* No styling, no trailing newline, and deliberately not suppressed by
|
|
66
|
+
* `quiet`: under `--quiet` stdout *is* the result, and this is the one path
|
|
67
|
+
* whose bytes a caller pipes into a file or another process. Callers add
|
|
68
|
+
* their own separators, because whether the payload ends in a newline is
|
|
69
|
+
* part of the format.
|
|
70
|
+
*
|
|
71
|
+
* Human-facing lines never come through here — they go to `write` (stdout,
|
|
72
|
+
* for a terminal) or `note` (stderr, alongside a payload).
|
|
73
|
+
*/
|
|
74
|
+
pipe(data: string): void;
|
|
75
|
+
/**
|
|
76
|
+
* A human-facing line that must stay out of the data channel.
|
|
77
|
+
*
|
|
78
|
+
* Goes to stderr, so it stays visible on the terminal while `pipe` output is
|
|
79
|
+
* being redirected — and so it can never corrupt the payload.
|
|
80
|
+
*/
|
|
81
|
+
note(message: string): void;
|
|
31
82
|
spacer(): void;
|
|
32
83
|
startAction(name: string, message: string): void;
|
|
33
84
|
endAction(name: string, message?: string): void;
|
|
@@ -6,18 +6,6 @@ import Spinnies from "spinnies";
|
|
|
6
6
|
import { safe } from "../../helpers/safe.js";
|
|
7
7
|
import { execSync } from "node:child_process";
|
|
8
8
|
import ApplicationError from "../error-handling/error/application-error.js";
|
|
9
|
-
/**
|
|
10
|
-
* Whether a spinner can actually spin here.
|
|
11
|
-
*
|
|
12
|
-
* The same condition spinnies itself uses to decide, so the two never
|
|
13
|
-
* disagree: without it spinnies falls back to re-rendering *every* spinner it
|
|
14
|
-
* knows on every update, which in a CI log means the first action's line is
|
|
15
|
-
* printed again under each later one — a page of "build prewarm-query" for a
|
|
16
|
-
* job that only ever built one.
|
|
17
|
-
*/
|
|
18
|
-
function canAnimate() {
|
|
19
|
-
return Boolean(!process.env.CI && process.stderr && process.stderr.isTTY);
|
|
20
|
-
}
|
|
21
9
|
/** The padding and the gutter that a table draws inside every column. */
|
|
22
10
|
const CELL_OVERHEAD = 3;
|
|
23
11
|
/** The left margin and the outer borders of a table. */
|
|
@@ -56,16 +44,39 @@ function columnWidths(entries, rows) {
|
|
|
56
44
|
return widths;
|
|
57
45
|
}
|
|
58
46
|
export class CliService {
|
|
47
|
+
clipboard;
|
|
48
|
+
terminal;
|
|
59
49
|
quiet;
|
|
60
50
|
style;
|
|
61
51
|
buffer = [];
|
|
62
52
|
progressBar;
|
|
63
53
|
spinners;
|
|
64
|
-
|
|
54
|
+
/**
|
|
55
|
+
* Whether a spinner can actually spin here.
|
|
56
|
+
*
|
|
57
|
+
* The same condition spinnies itself uses to decide, so the two never
|
|
58
|
+
* disagree: without it spinnies falls back to re-rendering *every* spinner it
|
|
59
|
+
* knows on every update, which in a CI log means the first action's line is
|
|
60
|
+
* printed again under each later one — a page of "build prewarm-query" for a
|
|
61
|
+
* job that only ever built one.
|
|
62
|
+
*/
|
|
63
|
+
animates;
|
|
65
64
|
/** The text of each running action, for the log line that replaces it. */
|
|
66
65
|
actions = new Map();
|
|
67
|
-
|
|
66
|
+
/**
|
|
67
|
+
* True when this shell cannot be asked a question: CI, no TTY on either end,
|
|
68
|
+
* or SK_NON_INTERACTIVE. Callers that would otherwise block on a prompt check
|
|
69
|
+
* it and take the non-interactive branch — which is why it lives here rather
|
|
70
|
+
* than being re-derived wherever a prompt happens to be.
|
|
71
|
+
*/
|
|
72
|
+
get nonInteractive() {
|
|
73
|
+
return this.terminal.nonInteractive;
|
|
74
|
+
}
|
|
75
|
+
constructor(clipboard, terminal, quiet = false) {
|
|
76
|
+
this.clipboard = clipboard;
|
|
77
|
+
this.terminal = terminal;
|
|
68
78
|
this.quiet = quiet;
|
|
79
|
+
this.animates = Boolean(!terminal.isCI && process.stderr && process.stderr.isTTY);
|
|
69
80
|
this.spinners = new Spinnies();
|
|
70
81
|
this.style = new Chalk();
|
|
71
82
|
}
|
|
@@ -135,6 +146,41 @@ export class CliService {
|
|
|
135
146
|
message: this.getFormattedMessage(message),
|
|
136
147
|
});
|
|
137
148
|
}
|
|
149
|
+
/**
|
|
150
|
+
* Put text on the system clipboard.
|
|
151
|
+
*
|
|
152
|
+
* Reports whether it arrived rather than throwing: a machine with no
|
|
153
|
+
* clipboard tool, or one whose tool cannot be reached in time, is an
|
|
154
|
+
* ordinary condition, and every caller has something useful to print
|
|
155
|
+
* instead.
|
|
156
|
+
*/
|
|
157
|
+
async copyToClipboard(text) {
|
|
158
|
+
return this.clipboard.copy(text);
|
|
159
|
+
}
|
|
160
|
+
/**
|
|
161
|
+
* Write machine-readable output to the data channel, verbatim.
|
|
162
|
+
*
|
|
163
|
+
* No styling, no trailing newline, and deliberately not suppressed by
|
|
164
|
+
* `quiet`: under `--quiet` stdout *is* the result, and this is the one path
|
|
165
|
+
* whose bytes a caller pipes into a file or another process. Callers add
|
|
166
|
+
* their own separators, because whether the payload ends in a newline is
|
|
167
|
+
* part of the format.
|
|
168
|
+
*
|
|
169
|
+
* Human-facing lines never come through here — they go to `write` (stdout,
|
|
170
|
+
* for a terminal) or `note` (stderr, alongside a payload).
|
|
171
|
+
*/
|
|
172
|
+
pipe(data) {
|
|
173
|
+
process.stdout.write(data);
|
|
174
|
+
}
|
|
175
|
+
/**
|
|
176
|
+
* A human-facing line that must stay out of the data channel.
|
|
177
|
+
*
|
|
178
|
+
* Goes to stderr, so it stays visible on the terminal while `pipe` output is
|
|
179
|
+
* being redirected — and so it can never corrupt the payload.
|
|
180
|
+
*/
|
|
181
|
+
note(message) {
|
|
182
|
+
process.stderr.write(`${message}\n`);
|
|
183
|
+
}
|
|
138
184
|
spacer() {
|
|
139
185
|
console.log("");
|
|
140
186
|
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/** A Chrome extension installed via the setup wizard and tracked for updates. */
|
|
2
|
+
export interface ManagedExtension {
|
|
3
|
+
/** Chrome Web Store extension id */
|
|
4
|
+
id: string;
|
|
5
|
+
name: string;
|
|
6
|
+
version: string;
|
|
7
|
+
/** absolute path to the unpacked extension directory */
|
|
8
|
+
path: string;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* The user's settings: what `config.json` holds, overridden by `.env` and the
|
|
12
|
+
* process environment. Nothing in here is derived at run time — that lives on
|
|
13
|
+
* {@link CliEnvironment}.
|
|
14
|
+
*/
|
|
15
|
+
export interface CliSettings {
|
|
16
|
+
chromeExtensionPaths: string;
|
|
17
|
+
/** system-specific flags, appended to the onboarding browser's launch args */
|
|
18
|
+
chromeFlags: string[];
|
|
19
|
+
chromePath: string;
|
|
20
|
+
chromeUserProfilePath: string;
|
|
21
|
+
diffExec: string;
|
|
22
|
+
diffExecTemplate: string;
|
|
23
|
+
diffTool: string;
|
|
24
|
+
ideaDirectory: string;
|
|
25
|
+
slackToken: string;
|
|
26
|
+
testApp: string;
|
|
27
|
+
browserChannel: string;
|
|
28
|
+
browserBuildId: string;
|
|
29
|
+
browserAutoUpdate: boolean;
|
|
30
|
+
updateReminderDays: number;
|
|
31
|
+
lastBrowserUpdateCheck: string;
|
|
32
|
+
managedChromeExtensions: ManagedExtension[];
|
|
33
|
+
lastExtensionUpdateCheck: string;
|
|
34
|
+
firstRunCompleted: boolean;
|
|
35
|
+
}
|
|
36
|
+
/** The settings of a user who has configured nothing yet. */
|
|
37
|
+
export declare function defaultSettings(): CliSettings;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/** The settings of a user who has configured nothing yet. */
|
|
2
|
+
export function defaultSettings() {
|
|
3
|
+
return {
|
|
4
|
+
chromeExtensionPaths: "",
|
|
5
|
+
chromeFlags: [],
|
|
6
|
+
chromePath: "",
|
|
7
|
+
chromeUserProfilePath: "",
|
|
8
|
+
diffExec: "",
|
|
9
|
+
diffExecTemplate: "$exec $file1 $file2",
|
|
10
|
+
diffTool: "",
|
|
11
|
+
ideaDirectory: "",
|
|
12
|
+
slackToken: "",
|
|
13
|
+
testApp: "",
|
|
14
|
+
browserChannel: "",
|
|
15
|
+
browserBuildId: "",
|
|
16
|
+
browserAutoUpdate: false,
|
|
17
|
+
updateReminderDays: 3,
|
|
18
|
+
lastBrowserUpdateCheck: "",
|
|
19
|
+
managedChromeExtensions: [],
|
|
20
|
+
lastExtensionUpdateCheck: "",
|
|
21
|
+
firstRunCompleted: false,
|
|
22
|
+
};
|
|
23
|
+
}
|