@speedkit/cli 4.36.1 → 4.37.0
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 +14 -0
- package/README.md +12 -5
- 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 -6
- package/dist/commands/browser/list.d.ts +2 -2
- package/dist/commands/browser/list.js +6 -7
- package/dist/commands/browser/update.d.ts +2 -2
- package/dist/commands/browser/update.js +9 -11
- 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 +9 -19
- package/dist/commands/deploy.d.ts +12 -3
- package/dist/commands/deploy.js +14 -20
- package/dist/commands/diff-url-parameters.d.ts +3 -2
- package/dist/commands/diff-url-parameters.js +19 -16
- 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 +10 -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 +19 -15
- package/dist/commands/login.d.ts +2 -2
- package/dist/commands/login.js +6 -9
- package/dist/commands/onboarding.d.ts +19 -3
- package/dist/commands/onboarding.js +15 -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 +13 -56
- package/dist/commands/wpt-launcher.d.ts +2 -2
- package/dist/commands/wpt-launcher.js +16 -17
- package/dist/hooks/init/first-run.js +9 -10
- 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 -16
- package/dist/services/athena/athena-service-factory.js +11 -27
- 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/spec/baqend-athena-service.spec.js +2 -2
- 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/spec/browser-origin-fetch.spec.js +10 -10
- 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 +7 -7
- package/dist/services/cli/cli-service-factory.js +7 -7
- package/dist/services/cli/cli-service-model.d.ts +0 -4
- package/dist/services/cli/cli-service-model.js +0 -6
- package/dist/services/cli/cli-service.d.ts +16 -2
- package/dist/services/cli/cli-service.js +17 -18
- package/dist/services/cli/cli-settings.d.ts +37 -0
- package/dist/services/cli/cli-settings.js +23 -0
- package/dist/services/cli/command-build-context.d.ts +23 -0
- package/dist/services/cli/index.d.ts +5 -1
- package/dist/services/cli/index.js +5 -1
- 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/spec/cli-service.spec.js +9 -19
- 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 -4
- package/dist/services/customer-config/customer-config-service-factory.js +5 -8
- package/dist/services/customer-config/customer-config-service.d.ts +2 -2
- 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 +1 -0
- package/dist/services/customer-config/site-analyzer/index.js +1 -0
- 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 +3 -3
- package/dist/services/customer-config/site-analyzer/site-analyzer-service-factory.js +4 -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/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 +5 -8
- package/dist/services/deploy/deploy-service-factory.js +28 -19
- package/dist/services/deploy/mr/base-config-reader.d.ts +6 -4
- package/dist/services/deploy/mr/base-config-reader.js +6 -8
- 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/spec/bulk/bulk-deploy-service.spec.js +14 -3
- package/dist/services/deploy/spec/checks/activation/customer-approval-check.spec.js +7 -5
- package/dist/services/deploy/spec/checks/pre-deploy/split-change-check.spec.js +2 -1
- 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 -5
- package/dist/services/diff/diff-service-factory.js +4 -7
- package/dist/services/diff/index.d.ts +1 -1
- package/dist/services/diff/index.js +1 -1
- package/dist/services/document-handler-runtime/{context/document-handler-runtime-context.d.ts → document-handler-runtime-model.d.ts} +0 -5
- 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.js +2 -2
- package/dist/services/document-handler-runtime/factory/document-handler-runtime-service-factory.d.ts +3 -6
- package/dist/services/document-handler-runtime/factory/document-handler-runtime-service-factory.js +14 -14
- package/dist/services/document-handler-runtime/server/request.js +1 -1
- 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/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/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 -6
- package/dist/services/integration-api/integration-api-factory.js +11 -11
- 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/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/onboarding/browse/browse-service.d.ts +18 -0
- package/dist/services/onboarding/browse/browse-service.js +61 -0
- package/dist/services/onboarding/browse/browse-url.d.ts +10 -0
- package/dist/services/onboarding/browse/browse-url.js +19 -0
- 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 -3
- package/dist/services/onboarding/browser/executable/executable-validator.js +20 -16
- package/dist/services/onboarding/browser/extension/extension-downloader.d.ts +3 -3
- package/dist/services/onboarding/browser/extension/extension-downloader.js +8 -6
- package/dist/services/onboarding/browser/extension/extension-validator.d.ts +3 -3
- package/dist/services/onboarding/browser/extension/extension-validator.js +4 -4
- package/dist/services/onboarding/browser/launch-browser.d.ts +9 -0
- package/dist/services/onboarding/browser/launch-browser.js +20 -0
- package/dist/services/onboarding/error/browse-domain-error.d.ts +6 -0
- package/dist/services/onboarding/error/browse-domain-error.js +11 -0
- package/dist/services/onboarding/error/missing-customer-path-error.d.ts +6 -0
- package/dist/services/onboarding/error/missing-customer-path-error.js +11 -0
- package/dist/services/onboarding/file-events/file-watcher.js +1 -0
- 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 +61 -0
- package/dist/services/onboarding/onboarding-service-build-context.js +79 -0
- package/dist/services/onboarding/onboarding-service-factory.d.ts +31 -6
- package/dist/services/onboarding/onboarding-service-factory.js +120 -48
- package/dist/services/onboarding/onboarding-service.d.ts +2 -0
- package/dist/services/onboarding/onboarding-service.js +5 -16
- package/dist/services/onboarding/spec/browse/browse-url.spec.d.ts +1 -0
- package/dist/services/onboarding/spec/browse/browse-url.spec.js +28 -0
- package/dist/services/onboarding/spec/onboarding-model.spec.js +11 -6
- package/dist/services/onboarding/spec/onboarding-service-factory.spec.d.ts +1 -0
- package/dist/services/onboarding/spec/onboarding-service-factory.spec.js +155 -0
- 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 -5
- package/dist/services/origin-request/origin-request-service-factory.js +12 -12
- package/dist/services/origin-request/origin-request-service.d.ts +2 -2
- 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/auto-pre-warm-factory.d.ts +3 -31
- package/dist/services/prewarm/auto-pre-warm-factory.js +6 -11
- 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/services/prewarm/pre-warm-factory.d.ts +4 -5
- package/dist/services/prewarm/pre-warm-factory.js +6 -8
- 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/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 -5
- package/dist/services/pull/pull-service-factory.js +13 -14
- 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 -7
- package/dist/services/query-builder/query-builder-factory.js +26 -15
- package/dist/{models/cli-parameters.d.ts → services/query-builder/query-builder-flags.d.ts} +1 -120
- 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/spec/query-builder-flags.spec.d.ts +1 -0
- package/dist/{models/spec/cli-parameters.spec.js → services/query-builder/spec/query-builder-flags.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 -5
- package/dist/services/revalidate/revalidate-factory.js +2 -6
- 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/setup/browser/browser-setup-service.d.ts +3 -4
- package/dist/services/setup/browser/browser-setup-service.js +16 -18
- package/dist/services/setup/difftool/difftool-setup-service.d.ts +3 -4
- package/dist/services/setup/difftool/difftool-setup-service.js +5 -7
- package/dist/services/setup/extension/extension-setup-service.d.ts +3 -4
- 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 -6
- package/dist/services/setup/setup-service-factory.js +10 -18
- package/dist/services/setup/setup-service.d.ts +4 -5
- package/dist/services/setup/setup-service.js +6 -7
- package/oclif.manifest.json +155 -147
- package/package.json +4 -2
- package/dist/models/cli-parameters.js +0 -297
- package/dist/services/cli/cli-config.d.ts +0 -59
- package/dist/services/cli/cli-config.js +0 -180
- package/dist/services/cli/environment.d.ts +0 -15
- package/dist/services/cli/environment.js +0 -40
- package/dist/services/cli/spec/cli-config.spec.js +0 -117
- package/dist/services/cli/spec/environment.spec.js +0 -28
- package/dist/services/config-api/entity-manager-factory.d.ts +0 -5
- 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/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/{models/spec/cli-parameters.spec.d.ts → services/cli/command-build-context.js} +0 -0
- /package/dist/services/cli/spec/{cli-config.spec.d.ts → cli-environment-detection.spec.d.ts} +0 -0
- /package/dist/services/cli/spec/{environment.spec.d.ts → cli-environment.spec.d.ts} +0 -0
- /package/dist/services/document-handler-runtime/{context/document-handler-runtime-context.js → document-handler-runtime-model.js} +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
# [4.37.0](https://gitlab.orestes.info/baqend/speed-kit-cli/compare/v4.36.2...v4.37.0) (2026-09-30)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Features
|
|
5
|
+
|
|
6
|
+
* **onboarding:** add --browse to open the live site in the onboarding Chrome ([baa3b2e](https://gitlab.orestes.info/baqend/speed-kit-cli/commit/baa3b2e2bfb6215df5cf7791c0d6a6696ce3aafe))
|
|
7
|
+
|
|
8
|
+
## [4.36.2](https://gitlab.orestes.info/baqend/speed-kit-cli/compare/v4.36.1...v4.36.2) (2026-09-25)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Bug Fixes
|
|
12
|
+
|
|
13
|
+
* **query:** keep the action lines out of a --quiet payload ([a71aa5e](https://gitlab.orestes.info/baqend/speed-kit-cli/commit/a71aa5eb80ed0f121d43e1191efaf1135860bb9a))
|
|
14
|
+
|
|
1
15
|
## [4.36.1](https://gitlab.orestes.info/baqend/speed-kit-cli/compare/v4.36.0...v4.36.1) (2026-09-25)
|
|
2
16
|
|
|
3
17
|
|
package/README.md
CHANGED
|
@@ -88,7 +88,7 @@ By either...
|
|
|
88
88
|
* [`sk generate-pop-config APP`](#sk-generate-pop-config-app)
|
|
89
89
|
* [`sk help [COMMAND]`](#sk-help-command)
|
|
90
90
|
* [`sk login [APP]`](#sk-login-app)
|
|
91
|
-
* [`sk onboarding CUSTOMERPATH`](#sk-onboarding-customerpath)
|
|
91
|
+
* [`sk onboarding [CUSTOMERPATH]`](#sk-onboarding-customerpath)
|
|
92
92
|
* [`sk origin-request CUSTOMERPATH PAGEURL`](#sk-origin-request-customerpath-pageurl)
|
|
93
93
|
* [`sk param-diff PAGEURL`](#sk-param-diff-pageurl)
|
|
94
94
|
* [`sk prewarm APP PATH`](#sk-prewarm-app-path)
|
|
@@ -712,17 +712,17 @@ EXAMPLES
|
|
|
712
712
|
$ sk login appName
|
|
713
713
|
```
|
|
714
714
|
|
|
715
|
-
## `sk onboarding CUSTOMERPATH`
|
|
715
|
+
## `sk onboarding [CUSTOMERPATH]`
|
|
716
716
|
|
|
717
717
|
Start a local dev environment for building and testing the Speed Kit configuration
|
|
718
718
|
|
|
719
719
|
```
|
|
720
720
|
USAGE
|
|
721
|
-
$ sk onboarding CUSTOMERPATH [-c <value>] [-t] [-d <value>] [-l] [-p] [--debugPort <value>] [-v] [-s]
|
|
722
|
-
[--headless] [--browserFetch]
|
|
721
|
+
$ sk onboarding [CUSTOMERPATH] [-c <value>] [-t] [-d <value>] [-l] [-p] [--debugPort <value>] [-v] [-s]
|
|
722
|
+
[--headless] [--browse] [--browserFetch]
|
|
723
723
|
|
|
724
724
|
ARGUMENTS
|
|
725
|
-
CUSTOMERPATH The customer config path
|
|
725
|
+
[CUSTOMERPATH] The customer config path (optional with --browse)
|
|
726
726
|
|
|
727
727
|
FLAGS
|
|
728
728
|
-c, --configName=<value> [default: production] The costumer config name
|
|
@@ -732,6 +732,9 @@ FLAGS
|
|
|
732
732
|
-s, --ignoreContentSecurityPolicy Removes header/meta "content-security-policy" for origin-responses
|
|
733
733
|
-t, --useTestConfig Override app with configured testApp
|
|
734
734
|
-v, --verboseLevel Show all messages
|
|
735
|
+
--browse Open the live site in the onboarding Chrome, with its extensions, but without
|
|
736
|
+
request interception or Speed Kit injection. Takes the domain from -d or from the
|
|
737
|
+
customer config.
|
|
735
738
|
--browserFetch Fetch every origin document with a second headless Chrome instead of a direct
|
|
736
739
|
request. Only needed when bot protection refuses the CLI outright — a refusal is
|
|
737
740
|
otherwise detected and rerouted on its own.
|
|
@@ -747,6 +750,10 @@ EXAMPLES
|
|
|
747
750
|
$ sk onboarding <customerPath> -c <configName> -d <domain>
|
|
748
751
|
|
|
749
752
|
$ sk onboarding customers/decathlon.de -c production -d www.decathlon.de
|
|
753
|
+
|
|
754
|
+
$ sk onboarding --browse -d www.decathlon.de --headless --debugPort 9290
|
|
755
|
+
|
|
756
|
+
$ sk onboarding customers/decathlon.de --browse -p
|
|
750
757
|
```
|
|
751
758
|
|
|
752
759
|
## `sk origin-request CUSTOMERPATH PAGEURL`
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { Command } from "@oclif/core";
|
|
2
|
+
import { CliEnvironment, CommandBuildContext } from "../services/cli/index.js";
|
|
3
|
+
/**
|
|
4
|
+
* The base of every `sk` command: before `run()` it builds the invocation's
|
|
5
|
+
* environment, with its one CLI, and — when the command names one — the build
|
|
6
|
+
* context of the service it runs.
|
|
7
|
+
*
|
|
8
|
+
* ```ts
|
|
9
|
+
* export default class Pull extends SkCommand<PullServiceBuildContext> {
|
|
10
|
+
* static buildContext = PullServiceBuildContext;
|
|
11
|
+
* static args = PullServiceBuildContext.args;
|
|
12
|
+
* static flags = PullServiceBuildContext.flags;
|
|
13
|
+
*
|
|
14
|
+
* async run() {
|
|
15
|
+
* const service = await new PullServiceFactory(this.context).buildService();
|
|
16
|
+
* await service.run();
|
|
17
|
+
* }
|
|
18
|
+
* }
|
|
19
|
+
* ```
|
|
20
|
+
*
|
|
21
|
+
* Building both here, once, is what makes the environment and the CLI single
|
|
22
|
+
* per run. Commands live in `src/commands/`, where oclif loads every file as a
|
|
23
|
+
* command, so this base lives outside it.
|
|
24
|
+
*/
|
|
25
|
+
export declare abstract class SkCommand<Built = never> extends Command {
|
|
26
|
+
/** The build context this command creates from its args and flags, if any. */
|
|
27
|
+
static buildContext?: CommandBuildContext<unknown>;
|
|
28
|
+
/** The environment of this invocation; `environment.cli` is its CLI. */
|
|
29
|
+
protected environment: CliEnvironment;
|
|
30
|
+
/** The build context, when the command names one in `buildContext`. */
|
|
31
|
+
protected context: Built;
|
|
32
|
+
init(): Promise<void>;
|
|
33
|
+
/**
|
|
34
|
+
* The customer whose documentHandler node modules the environment points
|
|
35
|
+
* at. None by default; onboarding, which runs the documentHandler locally,
|
|
36
|
+
* names its customer.
|
|
37
|
+
*/
|
|
38
|
+
protected customerPathForModules(_args: Record<string, unknown>): string | undefined;
|
|
39
|
+
/** Whether the CLI is built quiet: the command's `--quiet`, if it has one. */
|
|
40
|
+
protected quietCli(flags: Record<string, unknown>): boolean;
|
|
41
|
+
}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { Command } from "@oclif/core";
|
|
2
|
+
import { CliEnvironmentFactory, } from "../services/cli/index.js";
|
|
3
|
+
/**
|
|
4
|
+
* The base of every `sk` command: before `run()` it builds the invocation's
|
|
5
|
+
* environment, with its one CLI, and — when the command names one — the build
|
|
6
|
+
* context of the service it runs.
|
|
7
|
+
*
|
|
8
|
+
* ```ts
|
|
9
|
+
* export default class Pull extends SkCommand<PullServiceBuildContext> {
|
|
10
|
+
* static buildContext = PullServiceBuildContext;
|
|
11
|
+
* static args = PullServiceBuildContext.args;
|
|
12
|
+
* static flags = PullServiceBuildContext.flags;
|
|
13
|
+
*
|
|
14
|
+
* async run() {
|
|
15
|
+
* const service = await new PullServiceFactory(this.context).buildService();
|
|
16
|
+
* await service.run();
|
|
17
|
+
* }
|
|
18
|
+
* }
|
|
19
|
+
* ```
|
|
20
|
+
*
|
|
21
|
+
* Building both here, once, is what makes the environment and the CLI single
|
|
22
|
+
* per run. Commands live in `src/commands/`, where oclif loads every file as a
|
|
23
|
+
* command, so this base lives outside it.
|
|
24
|
+
*/
|
|
25
|
+
export class SkCommand extends Command {
|
|
26
|
+
/** The build context this command creates from its args and flags, if any. */
|
|
27
|
+
static buildContext;
|
|
28
|
+
/** The environment of this invocation; `environment.cli` is its CLI. */
|
|
29
|
+
environment;
|
|
30
|
+
/** The build context, when the command names one in `buildContext`. */
|
|
31
|
+
context;
|
|
32
|
+
async init() {
|
|
33
|
+
await super.init();
|
|
34
|
+
const { args, flags } = await this.parse();
|
|
35
|
+
this.environment = new CliEnvironmentFactory(this.config, {
|
|
36
|
+
customerPath: this.customerPathForModules(args),
|
|
37
|
+
quiet: this.quietCli(flags),
|
|
38
|
+
}).buildEnvironment();
|
|
39
|
+
const { buildContext } = this.constructor;
|
|
40
|
+
if (buildContext) {
|
|
41
|
+
this.context = buildContext.create(args, flags, this.environment);
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* The customer whose documentHandler node modules the environment points
|
|
46
|
+
* at. None by default; onboarding, which runs the documentHandler locally,
|
|
47
|
+
* names its customer.
|
|
48
|
+
*/
|
|
49
|
+
customerPathForModules(_args) {
|
|
50
|
+
return undefined;
|
|
51
|
+
}
|
|
52
|
+
/** Whether the CLI is built quiet: the command's `--quiet`, if it has one. */
|
|
53
|
+
quietCli(flags) {
|
|
54
|
+
return flags["quiet"] === true;
|
|
55
|
+
}
|
|
56
|
+
}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import { SkCommand } from "../base/sk-command.js";
|
|
2
|
+
import { AutoPreWarmServiceBuildContext } from "../services/prewarm/index.js";
|
|
3
|
+
export default class AutoPrewarm extends SkCommand<AutoPreWarmServiceBuildContext> {
|
|
4
|
+
static buildContext: typeof AutoPreWarmServiceBuildContext;
|
|
3
5
|
static args: {
|
|
4
6
|
customerPath: import("@oclif/core/interfaces").Arg<string, {
|
|
5
7
|
exists?: boolean;
|
|
6
8
|
}>;
|
|
7
9
|
};
|
|
8
|
-
static description: string;
|
|
9
|
-
static examples: string[];
|
|
10
10
|
static flags: {
|
|
11
11
|
variationPath: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
12
12
|
keepParameterSorting: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
@@ -27,5 +27,7 @@ export default class AutoPrewarm extends Command {
|
|
|
27
27
|
catalog: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
28
28
|
workgroup: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
29
29
|
};
|
|
30
|
+
static description: string;
|
|
31
|
+
static examples: string[];
|
|
30
32
|
run(): Promise<void>;
|
|
31
33
|
}
|
|
@@ -1,73 +1,20 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
static
|
|
1
|
+
import { SkCommand } from "../base/sk-command.js";
|
|
2
|
+
import { AutoPreWarmFactory, AutoPreWarmServiceBuildContext, } from "../services/prewarm/index.js";
|
|
3
|
+
export default class AutoPrewarm extends SkCommand {
|
|
4
|
+
static buildContext = AutoPreWarmServiceBuildContext;
|
|
5
|
+
static args = AutoPreWarmServiceBuildContext.args;
|
|
6
|
+
static flags = AutoPreWarmServiceBuildContext.flags;
|
|
7
7
|
static description = "Build and execute the prewarm query for a customer config and start a prewarm job from the resulting URLs — no CSV needed";
|
|
8
8
|
static examples = [
|
|
9
|
-
`$ sk auto-prewarm
|
|
10
|
-
`$ sk auto-prewarm
|
|
11
|
-
`$ sk auto-prewarm
|
|
12
|
-
`$ sk auto-prewarm
|
|
13
|
-
`$ sk auto-prewarm
|
|
14
|
-
`$ sk auto-prewarm
|
|
9
|
+
`$ sk auto-prewarm <customerPath> -c <configName>`,
|
|
10
|
+
`$ sk auto-prewarm customers/decathlon.de -c production`,
|
|
11
|
+
`$ sk auto-prewarm customers/decathlon.de --device desktop,mobile`,
|
|
12
|
+
`$ sk auto-prewarm customers/decathlon.de -v MOBILE,DESKTOP`,
|
|
13
|
+
`$ sk auto-prewarm customers/decathlon.de --limit 5000 --minHits 5`,
|
|
14
|
+
`$ sk auto-prewarm customers/decathlon.de --workgroup prewarming`,
|
|
15
15
|
];
|
|
16
|
-
static flags = {
|
|
17
|
-
...CLI_ATHENA,
|
|
18
|
-
...CLI_CONFIG_NAME,
|
|
19
|
-
...CLI_QUERY_DAYS,
|
|
20
|
-
...CLI_QUERY_FILTERS,
|
|
21
|
-
// Every flag that shapes the pre-warm list, not a subset of them: this
|
|
22
|
-
// command builds the same query `sk query prewarm` does, and a list it
|
|
23
|
-
// could not narrow the same way could not be counted by that command
|
|
24
|
-
// either — the two would describe different runs. `--count` is not among
|
|
25
|
-
// them: this command warms the list rather than reporting its size.
|
|
26
|
-
...CLI_QUERY_PREWARM_LIST,
|
|
27
|
-
// A variations file says what `--variation` says, read from disk.
|
|
28
|
-
[CLIParameters.VariationPath]: Flags.file({
|
|
29
|
-
char: CLIParametersChar.VariationPath,
|
|
30
|
-
description: "path to variations.csv",
|
|
31
|
-
exclusive: [CLIParameters.Device, CLIParameters.Variation],
|
|
32
|
-
}),
|
|
33
|
-
[CLIParameters.KeepParameterSorting]: Flags.boolean({
|
|
34
|
-
char: CLIParametersChar.KeepParameterSorting,
|
|
35
|
-
default: false,
|
|
36
|
-
description: "Prevents alphabetical sorting of the URL parameters",
|
|
37
|
-
}),
|
|
38
|
-
[CLIParameters.Quiet]: Flags.boolean({
|
|
39
|
-
char: CLIParametersChar.Quiet,
|
|
40
|
-
default: false,
|
|
41
|
-
description: "less output non interactive",
|
|
42
|
-
}),
|
|
43
|
-
[CLIParameters.Verbose]: Flags.boolean({
|
|
44
|
-
default: false,
|
|
45
|
-
description: "Log information about failed requests",
|
|
46
|
-
}),
|
|
47
|
-
};
|
|
48
16
|
async run() {
|
|
49
|
-
const
|
|
50
|
-
const service = await new AutoPreWarmFactory({
|
|
51
|
-
customerPath,
|
|
52
|
-
configName,
|
|
53
|
-
days,
|
|
54
|
-
device,
|
|
55
|
-
excludeNoindex,
|
|
56
|
-
excludeNotFound,
|
|
57
|
-
excludeSuspicious,
|
|
58
|
-
hardNavigationsOnly,
|
|
59
|
-
limit,
|
|
60
|
-
match,
|
|
61
|
-
minHits,
|
|
62
|
-
variation,
|
|
63
|
-
variationPath,
|
|
64
|
-
sortParameters: !keepParameterSorting,
|
|
65
|
-
quiet,
|
|
66
|
-
verbose,
|
|
67
|
-
workgroup,
|
|
68
|
-
catalog,
|
|
69
|
-
isWindows: this.config.windows,
|
|
70
|
-
}, new CliConfig(this.config).load()).getService();
|
|
17
|
+
const service = await new AutoPreWarmFactory(this.context).getService();
|
|
71
18
|
await service.run();
|
|
72
19
|
}
|
|
73
20
|
}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { SkCommand } from "../../base/sk-command.js";
|
|
2
2
|
/**
|
|
3
3
|
* Fish is not supported by @oclif/plugin-autocomplete (only bash, zsh and
|
|
4
4
|
* powershell), so this command generates a fish completion script from the
|
|
5
5
|
* oclif command manifest and installs it to ~/.config/fish/completions,
|
|
6
6
|
* where fish picks it up automatically.
|
|
7
7
|
*/
|
|
8
|
-
export default class AutocompleteFish extends
|
|
8
|
+
export default class AutocompleteFish extends SkCommand {
|
|
9
9
|
static description: string;
|
|
10
10
|
static examples: string[];
|
|
11
11
|
static flags: {
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Flags } from "@oclif/core";
|
|
2
|
+
import { SkCommand } from "../../base/sk-command.js";
|
|
2
3
|
import { mkdir, writeFile } from "node:fs/promises";
|
|
3
4
|
import os from "node:os";
|
|
4
5
|
import path from "node:path";
|
|
@@ -8,7 +9,7 @@ import path from "node:path";
|
|
|
8
9
|
* oclif command manifest and installs it to ~/.config/fish/completions,
|
|
9
10
|
* where fish picks it up automatically.
|
|
10
11
|
*/
|
|
11
|
-
export default class AutocompleteFish extends
|
|
12
|
+
export default class AutocompleteFish extends SkCommand {
|
|
12
13
|
static description = "Generate fish shell completions and install them to ~/.config/fish/completions.";
|
|
13
14
|
static examples = [
|
|
14
15
|
"$ sk autocomplete fish",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export default class BrowserClean extends
|
|
1
|
+
import { SkCommand } from "../../base/sk-command.js";
|
|
2
|
+
export default class BrowserClean extends SkCommand {
|
|
3
3
|
static description: string;
|
|
4
4
|
static examples: string[];
|
|
5
5
|
static flags: {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { Flags } from "@oclif/core";
|
|
2
|
+
import { SkCommand } from "../../base/sk-command.js";
|
|
3
3
|
import { BrowserManager, } from "../../services/setup/index.js";
|
|
4
|
-
export default class BrowserClean extends
|
|
4
|
+
export default class BrowserClean extends SkCommand {
|
|
5
5
|
static description = "Remove puppeteer-managed browser builds from the cache";
|
|
6
6
|
static examples = ["$ sk browser clean", "$ sk browser clean --all"];
|
|
7
7
|
static flags = {
|
|
@@ -12,9 +12,9 @@ export default class BrowserClean extends Command {
|
|
|
12
12
|
};
|
|
13
13
|
async run() {
|
|
14
14
|
const { flags } = await this.parse(BrowserClean);
|
|
15
|
-
const cli =
|
|
16
|
-
const
|
|
17
|
-
const manager = new BrowserManager(
|
|
15
|
+
const cli = this.environment.cli;
|
|
16
|
+
const environment = this.environment;
|
|
17
|
+
const manager = new BrowserManager(environment.cacheDir, cli);
|
|
18
18
|
const installed = manager.list();
|
|
19
19
|
if (installed.length === 0) {
|
|
20
20
|
cli.writeWarning("No puppeteer-managed browsers to clean.");
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export default class BrowserList extends
|
|
1
|
+
import { SkCommand } from "../../base/sk-command.js";
|
|
2
|
+
export default class BrowserList extends SkCommand {
|
|
3
3
|
static description: string;
|
|
4
4
|
static examples: string[];
|
|
5
5
|
run(): Promise<void>;
|
|
@@ -1,13 +1,12 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { CliConfig, CliServiceFactory } from "../../services/cli/index.js";
|
|
1
|
+
import { SkCommand } from "../../base/sk-command.js";
|
|
3
2
|
import { BrowserDetector, normalizePlatform, } from "../../services/setup/index.js";
|
|
4
|
-
export default class BrowserList extends
|
|
3
|
+
export default class BrowserList extends SkCommand {
|
|
5
4
|
static description = "List detected system browsers and puppeteer-managed builds";
|
|
6
5
|
static examples = ["$ sk browser list"];
|
|
7
6
|
async run() {
|
|
8
|
-
const cli =
|
|
9
|
-
const
|
|
10
|
-
const detector = new BrowserDetector(normalizePlatform(this.config.platform), this.config.home,
|
|
7
|
+
const cli = this.environment.cli;
|
|
8
|
+
const environment = this.environment;
|
|
9
|
+
const detector = new BrowserDetector(normalizePlatform(this.config.platform), this.config.home, environment.cacheDir);
|
|
11
10
|
const browsers = detector.detectAll();
|
|
12
11
|
if (browsers.length === 0) {
|
|
13
12
|
cli.writeWarning("No browsers detected.");
|
|
@@ -17,7 +16,7 @@ export default class BrowserList extends Command {
|
|
|
17
16
|
name: browser.name,
|
|
18
17
|
source: browser.source,
|
|
19
18
|
path: browser.executablePath,
|
|
20
|
-
active: browser.executablePath ===
|
|
19
|
+
active: browser.executablePath === environment.settings.chromePath ? "✔" : "",
|
|
21
20
|
})), {
|
|
22
21
|
name: { header: "Browser" },
|
|
23
22
|
source: { header: "Source" },
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export default class BrowserUpdate extends
|
|
1
|
+
import { SkCommand } from "../../base/sk-command.js";
|
|
2
|
+
export default class BrowserUpdate extends SkCommand {
|
|
3
3
|
static description: string;
|
|
4
4
|
static examples: string[];
|
|
5
5
|
run(): Promise<void>;
|
|
@@ -1,27 +1,25 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { CliConfig, CliServiceFactory } from "../../services/cli/index.js";
|
|
1
|
+
import { SkCommand } from "../../base/sk-command.js";
|
|
3
2
|
import { BrowserManager } from "../../services/setup/index.js";
|
|
4
|
-
export default class BrowserUpdate extends
|
|
3
|
+
export default class BrowserUpdate extends SkCommand {
|
|
5
4
|
static description = "Update the puppeteer-managed browser to the latest build of its channel";
|
|
6
5
|
static examples = ["$ sk browser update"];
|
|
7
6
|
async run() {
|
|
8
|
-
const cli =
|
|
9
|
-
const
|
|
10
|
-
const
|
|
11
|
-
const channel = userConfig.browserChannel;
|
|
7
|
+
const cli = this.environment.cli;
|
|
8
|
+
const environment = this.environment;
|
|
9
|
+
const channel = environment.settings.browserChannel;
|
|
12
10
|
if (channel !== "stable" && channel !== "experimental") {
|
|
13
11
|
cli.writeWarning("No puppeteer-managed browser configured. Run `sk config setup` first.");
|
|
14
12
|
return;
|
|
15
13
|
}
|
|
16
|
-
const manager = new BrowserManager(
|
|
14
|
+
const manager = new BrowserManager(environment.cacheDir, cli);
|
|
17
15
|
const latest = await manager.resolveBuildId(channel);
|
|
18
|
-
if (latest ===
|
|
16
|
+
if (latest === environment.settings.browserBuildId) {
|
|
19
17
|
cli.writeSuccess(`Already on the latest ${channel} build (${latest}).`);
|
|
20
|
-
|
|
18
|
+
environment.save({ lastBrowserUpdateCheck: new Date().toISOString() });
|
|
21
19
|
return;
|
|
22
20
|
}
|
|
23
21
|
const installed = await manager.installChannel(channel);
|
|
24
|
-
|
|
22
|
+
environment.save({
|
|
25
23
|
chromePath: installed.executablePath,
|
|
26
24
|
browserBuildId: installed.buildId,
|
|
27
25
|
lastBrowserUpdateCheck: new Date().toISOString(),
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import { SkCommand } from "../base/sk-command.js";
|
|
2
|
+
import { BulkDeployServiceBuildContext } from "../services/deploy/bulk/index.js";
|
|
3
|
+
export default class BulkDeploy extends SkCommand<BulkDeployServiceBuildContext> {
|
|
4
|
+
static buildContext: typeof BulkDeployServiceBuildContext;
|
|
3
5
|
static args: {
|
|
4
6
|
mr: import("@oclif/core/interfaces").Arg<number, {
|
|
5
7
|
max?: number;
|
|
@@ -1,47 +1,17 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { BulkDeployContext, BulkDeployServiceFactory, } from "../services/deploy/bulk/index.js";
|
|
1
|
+
import { SkCommand } from "../base/sk-command.js";
|
|
2
|
+
import { BulkDeployServiceBuildContext, BulkDeployServiceFactory, } from "../services/deploy/bulk/index.js";
|
|
4
3
|
import { DeployOutcome } from "../services/deploy/mr/index.js";
|
|
5
|
-
export default class BulkDeploy extends
|
|
6
|
-
static
|
|
7
|
-
|
|
8
|
-
name: "mr",
|
|
9
|
-
required: true,
|
|
10
|
-
description: "The number of the merged merge request",
|
|
11
|
-
}),
|
|
12
|
-
};
|
|
4
|
+
export default class BulkDeploy extends SkCommand {
|
|
5
|
+
static buildContext = BulkDeployServiceBuildContext;
|
|
6
|
+
static args = BulkDeployServiceBuildContext.args;
|
|
13
7
|
static description = "Deploys the production config of every customer of a merged merge request at once. Use sk deploy --mr for a single customer";
|
|
14
|
-
static flags =
|
|
15
|
-
repository: Flags.directory({
|
|
16
|
-
char: "r",
|
|
17
|
-
default: ".",
|
|
18
|
-
description: "A path in the repository that holds the customer configs",
|
|
19
|
-
}),
|
|
20
|
-
approval: Flags.string({
|
|
21
|
-
options: ["approved", "testing", "skip"],
|
|
22
|
-
description: "what to do with a customer that approves every rollout themselves",
|
|
23
|
-
}),
|
|
24
|
-
description: Flags.string({
|
|
25
|
-
description: "the description every installation of the run gets, asked while it is left out",
|
|
26
|
-
}),
|
|
27
|
-
dryRun: Flags.boolean({
|
|
28
|
-
char: "d",
|
|
29
|
-
default: false,
|
|
30
|
-
description: "dry run",
|
|
31
|
-
}),
|
|
32
|
-
yes: Flags.boolean({
|
|
33
|
-
char: "y",
|
|
34
|
-
default: false,
|
|
35
|
-
description: "deploy the plan without the confirmation",
|
|
36
|
-
}),
|
|
37
|
-
};
|
|
8
|
+
static flags = BulkDeployServiceBuildContext.flags;
|
|
38
9
|
static examples = [
|
|
39
10
|
"$ sk bulk-deploy 8017",
|
|
40
11
|
"$ sk bulk-deploy 8017 -r ../sk-onboarding --approval testing",
|
|
41
12
|
];
|
|
42
13
|
async run() {
|
|
43
|
-
const
|
|
44
|
-
const service = new BulkDeployServiceFactory(new BulkDeployContext(repository, mr, approval, description, dryRun, yes), new CliConfig(this.config).load()).getService();
|
|
14
|
+
const service = new BulkDeployServiceFactory(this.context).getService();
|
|
45
15
|
const results = await service.run();
|
|
46
16
|
// A failure of one configuration is a failure of the run, so a pipeline
|
|
47
17
|
// that calls this command sees it.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export default class Edit extends
|
|
1
|
+
import { SkCommand } from "../../base/sk-command.js";
|
|
2
|
+
export default class Edit extends SkCommand {
|
|
3
3
|
static description: string;
|
|
4
4
|
static examples: string[];
|
|
5
5
|
run(): Promise<void>;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { SkCommand } from "../../base/sk-command.js";
|
|
2
2
|
import path from "node:path";
|
|
3
3
|
import { spawn } from "node:child_process";
|
|
4
4
|
import * as dotenv from "dotenv";
|
|
5
5
|
dotenv.config({ quiet: true });
|
|
6
|
-
export default class Edit extends
|
|
6
|
+
export default class Edit extends SkCommand {
|
|
7
7
|
static description = "Edit cli config";
|
|
8
8
|
static examples = [`$ sk config edit`];
|
|
9
9
|
async run() {
|
|
@@ -1,7 +1,10 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import { SkCommand } from "../../base/sk-command.js";
|
|
2
|
+
import { SetupServiceBuildContext } from "../../services/setup/index.js";
|
|
3
|
+
export default class Setup extends SkCommand<SetupServiceBuildContext> {
|
|
3
4
|
static description: string;
|
|
4
5
|
static examples: string[];
|
|
6
|
+
static buildContext: typeof SetupServiceBuildContext;
|
|
7
|
+
static args: {};
|
|
5
8
|
static flags: {
|
|
6
9
|
force: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
7
10
|
postInstall: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
@@ -1,26 +1,16 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
export default class Setup extends Command {
|
|
1
|
+
import { SkCommand } from "../../base/sk-command.js";
|
|
2
|
+
import { SetupServiceBuildContext, SetupServiceFactory, } from "../../services/setup/index.js";
|
|
3
|
+
export default class Setup extends SkCommand {
|
|
5
4
|
static description = "Run the Speed Kit CLI setup wizard (choose browser and diff tool)";
|
|
6
5
|
static examples = ["$ sk config setup", "$ sk config setup --force"];
|
|
7
|
-
static
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
description: "Re-run even if setup was already completed",
|
|
11
|
-
}),
|
|
12
|
-
postInstall: Flags.boolean({
|
|
13
|
-
hidden: true,
|
|
14
|
-
description: "Internal flag used by the npm postinstall hook",
|
|
15
|
-
}),
|
|
16
|
-
};
|
|
6
|
+
static buildContext = SetupServiceBuildContext;
|
|
7
|
+
static args = SetupServiceBuildContext.args;
|
|
8
|
+
static flags = SetupServiceBuildContext.flags;
|
|
17
9
|
async run() {
|
|
18
|
-
const
|
|
19
|
-
const
|
|
20
|
-
const context = new SetupContext(flags.postInstall, flags.force);
|
|
21
|
-
const service = new SetupServiceFactory(this.config, context, cli).getService();
|
|
10
|
+
const cli = this.environment.cli;
|
|
11
|
+
const service = new SetupServiceFactory(this.context).getService();
|
|
22
12
|
// When triggered by postinstall, only run if it is safe and not yet done.
|
|
23
|
-
if (
|
|
13
|
+
if (this.context.postInstall &&
|
|
24
14
|
(cli.nonInteractive || service.isFirstRunCompleted())) {
|
|
25
15
|
return;
|
|
26
16
|
}
|
|
@@ -1,11 +1,20 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export default class Deploy extends
|
|
1
|
+
import { SkCommand } from "../base/sk-command.js";
|
|
2
|
+
export default class Deploy extends SkCommand {
|
|
3
3
|
static args: {
|
|
4
4
|
customerPath: import("@oclif/core/interfaces").Arg<string, {
|
|
5
5
|
exists?: boolean;
|
|
6
6
|
}>;
|
|
7
7
|
};
|
|
8
|
-
static flags:
|
|
8
|
+
static flags: {
|
|
9
|
+
dryRun: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
10
|
+
verboseLevel: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
11
|
+
artifacts: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
12
|
+
mr: import("@oclif/core/interfaces").OptionFlag<number, import("@oclif/core/interfaces").CustomOptions>;
|
|
13
|
+
description: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
14
|
+
approval: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
15
|
+
useTestConfig: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
16
|
+
configName: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
17
|
+
};
|
|
9
18
|
static description: string;
|
|
10
19
|
static examples: string[];
|
|
11
20
|
run(): Promise<void>;
|