@speedkit/cli 4.35.1 → 4.36.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +30 -0
- package/README.md +43 -34
- package/dist/commands/auto-prewarm.js +1 -1
- package/dist/commands/browser/clean.js +1 -2
- package/dist/commands/browser/list.js +1 -2
- package/dist/commands/browser/update.js +1 -2
- package/dist/commands/bulk-deploy.d.ts +19 -0
- package/dist/commands/bulk-deploy.js +52 -0
- package/dist/commands/config/setup.js +4 -3
- package/dist/commands/deploy.d.ts +2 -0
- package/dist/commands/deploy.js +34 -3
- package/dist/commands/diff-url-parameters.d.ts +2 -2
- package/dist/commands/diff-url-parameters.js +12 -5
- package/dist/commands/extension/add.js +1 -1
- package/dist/commands/extension/devtools.js +1 -1
- package/dist/commands/extension/list.js +1 -1
- package/dist/commands/extension/remove.js +1 -1
- package/dist/commands/extension/update.js +1 -1
- package/dist/commands/find-pops.js +3 -2
- package/dist/commands/generate-pop-config.js +9 -13
- package/dist/commands/onboarding.js +1 -1
- package/dist/commands/origin-request.js +1 -1
- package/dist/commands/pull.js +1 -1
- package/dist/commands/revalidate.js +4 -3
- package/dist/commands/wpt-launcher.js +3 -2
- 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 +3 -3
- 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/cli-parameters.d.ts +0 -2
- package/dist/models/cli-parameters.js +0 -2
- package/dist/models/{cli-parameters.spec.js → spec/cli-parameters.spec.js} +1 -1
- package/dist/services/athena/athena-service-factory.d.ts +3 -1
- package/dist/services/athena/athena-service-factory.js +4 -2
- 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} +2 -2
- package/dist/services/browser-fetch/browser-origin-fetch.d.ts +1 -1
- package/dist/services/browser-fetch/browser-origin-fetcher.d.ts +1 -1
- package/dist/services/browser-fetch/{browser-origin-fetch.spec.js → spec/browser-origin-fetch.spec.js} +2 -2
- 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/{helpers → services/cli}/cli-config.js +1 -1
- package/dist/services/cli/cli-service-factory.d.ts +10 -2
- package/dist/services/cli/cli-service-factory.js +11 -9
- package/dist/services/cli/cli-service-model.d.ts +10 -2
- package/dist/services/cli/cli-service.d.ts +37 -0
- package/dist/services/cli/cli-service.js +90 -3
- 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/index.d.ts +1 -0
- package/dist/services/cli/index.js +1 -0
- package/dist/{helpers → services/cli/spec}/cli-config.spec.js +1 -1
- package/dist/services/cli/{cli-service.spec.js → spec/cli-service.spec.js} +42 -1
- package/dist/{helpers → services/cli/spec}/environment.spec.js +1 -1
- package/dist/services/customer-config/customer-config-service-factory.d.ts +3 -1
- package/dist/services/customer-config/customer-config-service-factory.js +7 -3
- package/dist/services/customer-config/customer-config-service.d.ts +4 -2
- package/dist/services/customer-config/customer-config-service.js +4 -3
- package/dist/services/customer-config/site-analyzer/index.d.ts +3 -0
- package/dist/services/customer-config/site-analyzer/index.js +3 -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-factory.d.ts +7 -0
- package/dist/services/customer-config/site-analyzer/site-analyzer-service-factory.js +11 -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 +46 -0
- package/dist/services/deploy/bulk/bulk-deploy-model.js +27 -0
- package/dist/services/deploy/bulk/bulk-deploy-service-factory.d.ts +11 -0
- package/dist/services/deploy/bulk/bulk-deploy-service-factory.js +24 -0
- package/dist/services/deploy/bulk/bulk-deploy-service.d.ts +47 -0
- package/dist/services/deploy/bulk/bulk-deploy-service.js +201 -0
- package/dist/services/deploy/bulk/config-deploy-factory.d.ts +13 -0
- package/dist/services/deploy/bulk/config-deploy-factory.js +20 -0
- package/dist/services/deploy/bulk/index.d.ts +5 -0
- package/dist/services/deploy/bulk/index.js +5 -0
- package/dist/services/deploy/bulk/touched-configs.d.ts +12 -0
- package/dist/services/deploy/bulk/touched-configs.js +54 -0
- package/dist/services/deploy/checks/activation/customer-approval-check.d.ts +3 -1
- package/dist/services/deploy/checks/activation/customer-approval-check.js +5 -2
- package/dist/services/deploy/checks/post-deploy/deprecated-deployment-detection-check.d.ts +4 -2
- package/dist/services/deploy/checks/post-deploy/deprecated-deployment-detection-check.js +6 -3
- 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 +4 -2
- package/dist/services/deploy/checks/post-deploy/save-files-check.js +5 -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 +9 -5
- 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 +8 -5
- package/dist/services/deploy/context/deploy-context.d.ts +21 -1
- package/dist/services/deploy/context/deploy-context.js +30 -1
- package/dist/services/deploy/deploy-service-factory.d.ts +15 -2
- package/dist/services/deploy/deploy-service-factory.js +43 -20
- package/dist/services/deploy/deploy-service.d.ts +2 -2
- package/dist/services/deploy/error/deploy-aborted-error.d.ts +12 -0
- package/dist/services/deploy/error/deploy-aborted-error.js +16 -0
- package/dist/services/deploy/handler/customer-config-handler.d.ts +4 -2
- package/dist/services/deploy/handler/customer-config-handler.js +11 -7
- package/dist/services/deploy/handler/install-resource-handler.d.ts +4 -2
- package/dist/services/deploy/handler/install-resource-handler.js +12 -7
- package/dist/services/deploy/handler/install-resource-modifier/deleted-file-check.d.ts +4 -2
- package/dist/services/deploy/handler/install-resource-modifier/deleted-file-check.js +5 -2
- package/dist/services/deploy/handler/module-handler.d.ts +4 -2
- package/dist/services/deploy/handler/module-handler.js +7 -4
- package/dist/services/deploy/handler/server-config-handler.d.ts +4 -2
- package/dist/services/deploy/handler/server-config-handler.js +6 -3
- package/dist/services/deploy/mr/base-config-reader.d.ts +25 -0
- package/dist/services/deploy/mr/base-config-reader.js +55 -0
- package/dist/services/deploy/mr/index.d.ts +6 -0
- package/dist/services/deploy/mr/index.js +6 -0
- package/dist/services/deploy/mr/live-state-check.d.ts +38 -0
- package/dist/services/deploy/mr/live-state-check.js +81 -0
- package/dist/services/deploy/mr/merge-request-deploy-model.d.ts +59 -0
- package/dist/services/deploy/mr/merge-request-deploy-model.js +50 -0
- package/dist/services/deploy/mr/merge-request-deploy-service-factory.d.ts +20 -0
- package/dist/services/deploy/mr/merge-request-deploy-service-factory.js +46 -0
- package/dist/services/deploy/mr/merge-request-deploy-service.d.ts +61 -0
- package/dist/services/deploy/mr/merge-request-deploy-service.js +189 -0
- package/dist/services/deploy/mr/merge-request-description.d.ts +16 -0
- package/dist/services/deploy/mr/merge-request-description.js +27 -0
- package/dist/services/deploy/policy/auto-deploy-policy.d.ts +43 -0
- package/dist/services/deploy/policy/auto-deploy-policy.js +77 -0
- package/dist/services/deploy/policy/deploy-policy-model.d.ts +61 -0
- package/dist/services/deploy/policy/deploy-policy-model.js +41 -0
- package/dist/services/deploy/policy/index.d.ts +2 -0
- package/dist/services/deploy/policy/index.js +2 -0
- package/dist/services/deploy/policy/interactive-deploy-policy.d.ts +15 -0
- package/dist/services/deploy/policy/interactive-deploy-policy.js +16 -0
- package/dist/services/deploy/spec/bulk/bulk-deploy-service.spec.js +146 -0
- package/dist/services/deploy/spec/bulk/touched-configs.spec.js +77 -0
- package/dist/services/deploy/{checks → spec/checks}/activation/customer-approval-check.spec.js +20 -17
- package/dist/services/deploy/{checks → spec/checks}/post-deploy/refresh-deployment-job-check.spec.js +2 -2
- package/dist/services/deploy/spec/checks/pre-deploy/split-change-check.spec.js +55 -0
- package/dist/services/deploy/spec/handler/module-handler.spec.js +49 -0
- package/dist/services/deploy/{handler → spec/handler}/testing-installation-links.spec.js +1 -1
- package/dist/services/deploy/spec/mr/live-state-check.spec.js +74 -0
- package/dist/services/deploy/spec/mr/merge-request-description.spec.js +55 -0
- package/dist/services/deploy/spec/policy/auto-deploy-policy.spec.js +83 -0
- package/dist/services/diff/diff-model.d.ts +5 -1
- package/dist/services/diff/diff-model.js +5 -1
- package/dist/services/diff/diff-service-factory.d.ts +3 -1
- package/dist/services/diff/diff-service-factory.js +5 -3
- package/dist/services/diff/diff-service.d.ts +11 -2
- package/dist/services/diff/diff-service.js +32 -7
- package/dist/services/diff/index.d.ts +1 -0
- package/dist/services/diff/index.js +1 -0
- package/dist/services/document-handler-runtime/context/document-handler-runtime-context.d.ts +2 -14
- package/dist/services/document-handler-runtime/context/document-handler-runtime-context.js +0 -52
- package/dist/services/document-handler-runtime/document-handler-server.d.ts +2 -2
- package/dist/services/document-handler-runtime/factory/document-handler-runtime-service-factory.d.ts +3 -11
- package/dist/services/document-handler-runtime/factory/document-handler-runtime-service-factory.js +6 -72
- package/dist/services/document-handler-runtime/{document-handler-abort.spec.js → spec/document-handler-abort.spec.js} +2 -2
- package/dist/services/git/git-repository-model.d.ts +13 -0
- package/dist/services/git/git-repository.d.ts +35 -0
- package/dist/services/git/git-repository.js +120 -0
- package/dist/services/git/index.d.ts +2 -0
- package/dist/services/git/index.js +2 -0
- package/dist/services/git/spec/git-repository.spec.js +87 -0
- package/dist/services/integration-api/handler/customer-config-handler.d.ts +2 -2
- package/dist/services/integration-api/integration-api-factory.d.ts +3 -2
- package/dist/services/integration-api/integration-api-factory.js +5 -3
- package/dist/services/integration-api/spec/speed-kit-config-file.spec.js +1 -1
- package/dist/services/integration-api/struct/customer-config-file.js +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 +1 -1
- package/dist/services/onboarding/browser/executable/executable-validator.d.ts +1 -2
- package/dist/services/onboarding/browser/extension/extension-downloader.d.ts +1 -2
- package/dist/services/onboarding/browser/extension/extension-validator.d.ts +1 -2
- 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 +2 -2
- package/dist/services/onboarding/onboarding-model.d.ts +1 -1
- package/dist/services/onboarding/onboarding-service-factory.d.ts +3 -2
- package/dist/services/onboarding/onboarding-service-factory.js +17 -17
- 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} +2 -2
- 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/origin-request-service-factory.d.ts +3 -2
- package/dist/services/origin-request/origin-request-service-factory.js +8 -6
- package/dist/services/origin-request/origin-request-service.d.ts +2 -2
- package/dist/services/origin-request/{asset-variations.spec.js → spec/asset-variations.spec.js} +1 -1
- 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 -2
- package/dist/services/prewarm/auto-pre-warm-factory.js +8 -5
- 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 +3 -1
- package/dist/services/prewarm/pre-warm-factory.js +7 -4
- 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/pull-service-factory.d.ts +3 -2
- package/dist/services/pull/pull-service-factory.js +8 -6
- package/dist/services/query-builder/query-builder-factory.d.ts +3 -2
- package/dist/services/query-builder/query-builder-factory.js +9 -7
- package/dist/services/query-builder/query-builder-service.js +4 -5
- package/dist/services/query-builder/query-command.js +1 -1
- 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/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/spec/rules/strip-parameters.spec.d.ts +1 -0
- package/dist/services/query-builder/{rules/spec → spec/rules}/strip-parameters.spec.js +3 -3
- package/dist/services/query-builder/spec/sql/expression.spec.d.ts +1 -0
- package/dist/services/query-builder/{sql/spec → spec/sql}/expression.spec.js +2 -2
- package/dist/services/query-builder/spec/sql/format.spec.d.ts +1 -0
- package/dist/services/query-builder/{sql/spec → spec/sql}/format.spec.js +2 -2
- package/dist/services/query-builder/spec/sql/predicate.spec.d.ts +1 -0
- package/dist/services/query-builder/{sql/spec → spec/sql}/predicate.spec.js +1 -1
- package/dist/services/query-builder/spec/sql/regex.spec.d.ts +1 -0
- package/dist/services/query-builder/{sql/spec → spec/sql}/regex.spec.js +1 -1
- package/dist/services/revalidate/revalidate-factory.d.ts +3 -1
- package/dist/services/revalidate/revalidate-factory.js +6 -3
- package/dist/services/revalidate/revalidate-service.d.ts +2 -2
- package/dist/services/revalidate/spec/revalidate-service.spec.d.ts +1 -0
- 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 +1 -2
- package/dist/services/setup/difftool/difftool-setup-service.d.ts +1 -2
- package/dist/services/setup/extension/extension-installer.d.ts +1 -1
- package/dist/services/setup/extension/extension-setup-service.d.ts +1 -2
- package/dist/services/setup/setup-service-factory.d.ts +3 -1
- package/dist/services/setup/setup-service-factory.js +5 -4
- package/dist/services/setup/setup-service.d.ts +1 -2
- package/dist/services/setup/spec/extension/crx.spec.d.ts +1 -0
- package/dist/services/setup/{extension → spec/extension}/crx.spec.js +1 -1
- package/dist/services/setup/spec/extension/webstore.spec.d.ts +1 -0
- 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 +139 -84
- package/package.json +3 -2
- package/dist/commands/document-handler.d.ts +0 -16
- package/dist/commands/document-handler.js +0 -32
- package/dist/helpers/customer-config.d.ts +0 -45
- package/dist/helpers/customer-config.js +0 -136
- 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/install.d.ts +0 -24
- package/dist/services/config-api-service.d.ts +0 -21
- package/dist/services/config-api-service.js +0 -107
- package/dist/services/diff-service.d.ts +0 -27
- package/dist/services/diff-service.js +0 -116
- 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/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/models/{cli-parameters.spec.d.ts → spec/cli-parameters.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 → services/cli}/cli-config.d.ts +0 -0
- /package/dist/{helpers → services/cli}/environment.d.ts +0 -0
- /package/dist/{helpers → services/cli}/environment.js +0 -0
- /package/dist/{helpers → services/cli/spec}/cli-config.spec.d.ts +0 -0
- /package/dist/services/cli/{cli-service.spec.d.ts → spec/cli-service.spec.d.ts} +0 -0
- /package/dist/{helpers → services/cli/spec}/environment.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/{checks/activation/customer-approval-check.spec.d.ts → spec/bulk/bulk-deploy-service.spec.d.ts} +0 -0
- /package/dist/services/deploy/{checks/post-deploy/refresh-deployment-job-check.spec.d.ts → spec/bulk/touched-configs.spec.d.ts} +0 -0
- /package/dist/services/deploy/{handler/testing-installation-links.spec.d.ts → spec/checks/activation/customer-approval-check.spec.d.ts} +0 -0
- /package/dist/services/{document-handler-runtime/document-handler-abort.spec.d.ts → deploy/spec/checks/post-deploy/refresh-deployment-job-check.spec.d.ts} +0 -0
- /package/dist/services/{onboarding/browser/executable/headed-user-agent.spec.d.ts → deploy/spec/checks/pre-deploy/split-change-check.spec.d.ts} +0 -0
- /package/dist/services/{onboarding/empty-service-worker.spec.d.ts → deploy/spec/handler/module-handler.spec.d.ts} +0 -0
- /package/dist/services/{onboarding/onboarding-model.spec.d.ts → deploy/spec/handler/testing-installation-links.spec.d.ts} +0 -0
- /package/dist/services/{onboarding/virtual-orestes-app/crawler.spec.d.ts → deploy/spec/mr/live-state-check.spec.d.ts} +0 -0
- /package/dist/services/{onboarding/virtual-orestes-app/origin-error-cause.spec.d.ts → deploy/spec/mr/merge-request-description.spec.d.ts} +0 -0
- /package/dist/services/{origin-request/asset-variations.spec.d.ts → deploy/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/{prewarm/csv-reader.spec.d.ts → document-handler-runtime/spec/document-handler-abort.spec.d.ts} +0 -0
- /package/dist/services/{prewarm/prewarm-targets.spec.d.ts → git/git-repository-model.js} +0 -0
- /package/dist/services/{query-builder/queries/spec/golden.spec.d.ts → git/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/{query-builder/queries/spec/pops-query.spec.d.ts → onboarding/spec/browser/executable/headed-user-agent.spec.d.ts} +0 -0
- /package/dist/services/{query-builder/queries/spec/queries.spec.d.ts → onboarding/spec/empty-service-worker.spec.d.ts} +0 -0
- /package/dist/services/{query-builder/queries/spec/reported-bugs.spec.d.ts → onboarding/spec/onboarding-model.spec.d.ts} +0 -0
- /package/dist/services/{query-builder/query-builder-service.spec.d.ts → onboarding/spec/virtual-orestes-app/crawler.spec.d.ts} +0 -0
- /package/dist/services/{query-builder/rules/spec/pattern-language.spec.d.ts → onboarding/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/{query-builder/rules/spec/rule-parser.spec.d.ts → origin-request/spec/asset-variations.spec.d.ts} +0 -0
- /package/dist/services/{query-builder/rules/spec/rule-reducer.spec.d.ts → prewarm/spec/csv-reader.spec.d.ts} +0 -0
- /package/dist/services/{query-builder/rules/spec/rule-relevance.spec.d.ts → prewarm/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/{rules/spec/rule-to-sql.spec.d.ts → spec/queries/golden.spec.d.ts} +0 -0
- /package/dist/services/query-builder/{rules/spec/runtime-semantics.spec.d.ts → spec/queries/pops-query.spec.d.ts} +0 -0
- /package/dist/services/query-builder/{rules/spec/strip-parameters.spec.d.ts → spec/queries/queries.spec.d.ts} +0 -0
- /package/dist/services/query-builder/{sql/spec/expression.spec.d.ts → spec/queries/reported-bugs.spec.d.ts} +0 -0
- /package/dist/services/query-builder/{sql/spec/format.spec.d.ts → spec/query-builder-service.spec.d.ts} +0 -0
- /package/dist/services/query-builder/{sql/spec/predicate.spec.d.ts → spec/rules/pattern-language.spec.d.ts} +0 -0
- /package/dist/services/query-builder/{sql/spec/regex.spec.d.ts → spec/rules/rule-parser.spec.d.ts} +0 -0
- /package/dist/services/{revalidate/revalidate-service.spec.d.ts → query-builder/spec/rules/rule-reducer.spec.d.ts} +0 -0
- /package/dist/services/{setup/extension/crx.spec.d.ts → query-builder/spec/rules/rule-relevance.spec.d.ts} +0 -0
- /package/dist/services/{setup/extension/webstore.spec.d.ts → query-builder/spec/rules/rule-to-sql.spec.d.ts} +0 -0
- /package/dist/services/{setup/os/tool-registry.spec.d.ts → query-builder/spec/rules/runtime-semantics.spec.d.ts} +0 -0
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { CliServiceInterface } from "../../../cli/index.js";
|
|
2
2
|
import { CustomerConfig } from "../../../integration-api/index.js";
|
|
3
3
|
import Install from "../../interface/install.js";
|
|
4
|
+
import { DeployPolicyInterface } from "../../policy/index.js";
|
|
4
5
|
/**
|
|
5
6
|
* Some customers reserve the go-live decision for themselves: nothing may reach
|
|
6
7
|
* their real users before they signed it off. `needsCustomerApproval` in
|
|
@@ -11,7 +12,8 @@ import Install from "../../interface/install.js";
|
|
|
11
12
|
export declare class CustomerApprovalCheck {
|
|
12
13
|
private cli;
|
|
13
14
|
private customer;
|
|
14
|
-
|
|
15
|
+
private policy;
|
|
16
|
+
constructor(cli: CliServiceInterface, customer: CustomerConfig, policy: DeployPolicyInterface);
|
|
15
17
|
/**
|
|
16
18
|
* Whether the installation may be offered for regular activation. `false`
|
|
17
19
|
* means the deploy is limited to a testing installation.
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { VirtualSpeedKitConfigFile, } from "../../../integration-api/index.js";
|
|
2
2
|
import { safe } from "../../../../helpers/safe.js";
|
|
3
|
+
import { DeployQuestion } from "../../policy/index.js";
|
|
3
4
|
/** The install resource key config_SpeedKit.js is stored under. */
|
|
4
5
|
const SPEED_KIT_CONFIG_KEY = "config";
|
|
5
6
|
/**
|
|
@@ -12,9 +13,11 @@ const SPEED_KIT_CONFIG_KEY = "config";
|
|
|
12
13
|
export class CustomerApprovalCheck {
|
|
13
14
|
cli;
|
|
14
15
|
customer;
|
|
15
|
-
|
|
16
|
+
policy;
|
|
17
|
+
constructor(cli, customer, policy) {
|
|
16
18
|
this.cli = cli;
|
|
17
19
|
this.customer = customer;
|
|
20
|
+
this.policy = policy;
|
|
18
21
|
}
|
|
19
22
|
/**
|
|
20
23
|
* Whether the installation may be offered for regular activation. `false`
|
|
@@ -32,7 +35,7 @@ export class CustomerApprovalCheck {
|
|
|
32
35
|
this.cli.writeWarning("This customer approves every rollout themselves and the configuration " +
|
|
33
36
|
"to be activated has a split greater than 0:");
|
|
34
37
|
this.cli.table(splits, { origin: {}, split: {} });
|
|
35
|
-
return this.
|
|
38
|
+
return this.policy.confirm(DeployQuestion.CustomerApproval, "Was this change approved by customer?", false);
|
|
36
39
|
}
|
|
37
40
|
async getSplitsGreaterZero(install) {
|
|
38
41
|
const speedKitConfig = install[SPEED_KIT_CONFIG_KEY];
|
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
import { PostDeployCheckInterface } from "../../deploy-service-model.js";
|
|
2
2
|
import { FileListInterface } from "../../../integration-api/index.js";
|
|
3
|
-
import {
|
|
3
|
+
import { CliServiceInterface } from "../../../cli/index.js";
|
|
4
4
|
import { ConfigApiService } from "../../../config-api/index.js";
|
|
5
|
+
import { DeployPolicyInterface } from "../../policy/index.js";
|
|
5
6
|
export declare class DeprecatedDeploymentDetectionCheck implements PostDeployCheckInterface {
|
|
6
7
|
private fileList;
|
|
7
8
|
private cli;
|
|
8
9
|
private configApi;
|
|
9
10
|
private app;
|
|
10
|
-
|
|
11
|
+
private policy;
|
|
12
|
+
constructor(fileList: FileListInterface, cli: CliServiceInterface, configApi: ConfigApiService, app: string, policy: DeployPolicyInterface);
|
|
11
13
|
check(): Promise<void>;
|
|
12
14
|
private deleteDeploymentJobDefinition;
|
|
13
15
|
}
|
|
@@ -1,16 +1,19 @@
|
|
|
1
1
|
import { INTEGRATION_FILES } from "../../../../models/files.js";
|
|
2
2
|
import { safe } from "../../../../helpers/safe.js";
|
|
3
3
|
import { PostDeployDeploymentDetectionError } from "../../error/post-deploy-deployment-detection-error.js";
|
|
4
|
+
import { DeployQuestion } from "../../policy/index.js";
|
|
4
5
|
export class DeprecatedDeploymentDetectionCheck {
|
|
5
6
|
fileList;
|
|
6
7
|
cli;
|
|
7
8
|
configApi;
|
|
8
9
|
app;
|
|
9
|
-
|
|
10
|
+
policy;
|
|
11
|
+
constructor(fileList, cli, configApi, app, policy) {
|
|
10
12
|
this.fileList = fileList;
|
|
11
13
|
this.cli = cli;
|
|
12
14
|
this.configApi = configApi;
|
|
13
15
|
this.app = app;
|
|
16
|
+
this.policy = policy;
|
|
14
17
|
}
|
|
15
18
|
async check() {
|
|
16
19
|
this.cli.startAction("POST:CHECK:DEPLOYMENT_DETECTION", "[postDeployCheck] deploymentDetection");
|
|
@@ -36,7 +39,7 @@ export class DeprecatedDeploymentDetectionCheck {
|
|
|
36
39
|
this.cli.successAction("POST:CHECK:DEPLOYMENT_DETECTION");
|
|
37
40
|
if (deployCheckJob) {
|
|
38
41
|
this.cli.writeWarning(`Found active Job for ${this.cli.style.bold("deprecated")} deploymentDetection in app: ${this.app}`);
|
|
39
|
-
if (await this.
|
|
42
|
+
if (await this.policy.confirm(DeployQuestion.DeleteDeprecatedJob, "Delete job for deploymentDetection?")) {
|
|
40
43
|
await this.deleteDeploymentJobDefinition(deployCheckJob);
|
|
41
44
|
}
|
|
42
45
|
}
|
|
@@ -44,7 +47,7 @@ export class DeprecatedDeploymentDetectionCheck {
|
|
|
44
47
|
moduleResult.data &&
|
|
45
48
|
moduleResult.data.length > 0) {
|
|
46
49
|
this.cli.writeWarning(`Found ${this.cli.style.bold("deprecated")} module deploymentDetection in app: ${this.app}`);
|
|
47
|
-
if (await this.
|
|
50
|
+
if (await this.policy.confirm(DeployQuestion.DeleteDeprecatedModule, "Delete module deploymentDetection?")) {
|
|
48
51
|
this.cli.startAction("POST:CHECK:DEPLOYMENT_DETECTION:DELETE", "Delete module deploymentDetection");
|
|
49
52
|
await this.configApi.deleteModule(INTEGRATION_FILES.DEPRECATED.DEPLOYMENT_DETECTION);
|
|
50
53
|
this.cli.successAction("POST:CHECK:DEPLOYMENT_DETECTION:DELETE");
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { EntityManager } from "baqend";
|
|
2
2
|
import { PostDeployCheckInterface } from "../../deploy-service-model.js";
|
|
3
|
-
import {
|
|
3
|
+
import { CliServiceInterface } from "../../../cli/index.js";
|
|
4
4
|
export declare class RefreshDeploymentJobCheck implements PostDeployCheckInterface {
|
|
5
5
|
private entityManager;
|
|
6
6
|
private cli;
|
|
7
|
-
constructor(entityManager: EntityManager, cli:
|
|
7
|
+
constructor(entityManager: EntityManager, cli: CliServiceInterface);
|
|
8
8
|
check(): Promise<void>;
|
|
9
9
|
}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { CliServiceInterface } from "../../../cli/index.js";
|
|
2
2
|
import { PostDeployCheckInterface } from "../../deploy-service-model.js";
|
|
3
3
|
import { ConfigApiService } from "../../../config-api/index.js";
|
|
4
4
|
export default class RevalidatedModuleCheck implements PostDeployCheckInterface {
|
|
5
5
|
private readonly configApi;
|
|
6
6
|
private cli;
|
|
7
7
|
private readonly app;
|
|
8
|
-
constructor(configApi: ConfigApiService, cli:
|
|
8
|
+
constructor(configApi: ConfigApiService, cli: CliServiceInterface, app: string);
|
|
9
9
|
check(): Promise<void>;
|
|
10
10
|
}
|
|
@@ -1,10 +1,12 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { CliServiceInterface } from "../../../cli/index.js";
|
|
2
2
|
import { FileListInterface, InstallResourceFile } from "../../../integration-api/index.js";
|
|
3
3
|
import { PostDeployCheckInterface } from "../../deploy-service-model.js";
|
|
4
|
+
import { DeployPolicyInterface } from "../../policy/index.js";
|
|
4
5
|
export default class SaveFilesCheck implements PostDeployCheckInterface {
|
|
6
|
+
private policy;
|
|
5
7
|
private fileList;
|
|
6
8
|
private readonly cli;
|
|
7
|
-
constructor(fileList: FileListInterface, cli:
|
|
9
|
+
constructor(fileList: FileListInterface, cli: CliServiceInterface, policy: DeployPolicyInterface);
|
|
8
10
|
check(): Promise<void>;
|
|
9
11
|
safeFiles(fileList: InstallResourceFile[]): Promise<void>;
|
|
10
12
|
}
|
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
import { safe } from "../../../../helpers/safe.js";
|
|
2
2
|
import { SafeFileError } from "../../error/safe-file-error.js";
|
|
3
|
+
import { DeployQuestion } from "../../policy/index.js";
|
|
3
4
|
export default class SaveFilesCheck {
|
|
5
|
+
policy;
|
|
4
6
|
fileList;
|
|
5
7
|
cli;
|
|
6
|
-
constructor(fileList, cli) {
|
|
8
|
+
constructor(fileList, cli, policy) {
|
|
9
|
+
this.policy = policy;
|
|
7
10
|
this.fileList = fileList;
|
|
8
11
|
this.cli = cli;
|
|
9
12
|
}
|
|
@@ -14,7 +17,7 @@ export default class SaveFilesCheck {
|
|
|
14
17
|
if (fileList.length === 0) {
|
|
15
18
|
return;
|
|
16
19
|
}
|
|
17
|
-
if (!(await this.
|
|
20
|
+
if (!(await this.policy.confirm(DeployQuestion.SaveLocalFiles, `Changes to localFiles will be saved now. Proceed?`))) {
|
|
18
21
|
return;
|
|
19
22
|
}
|
|
20
23
|
this.cli.startAction("POST:DEPLOY:SAVE_FILES", "safe changed files");
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { FileListInterface, CustomerConfig } from "../../../integration-api/index.js";
|
|
2
2
|
import { CliServiceInterface } from "../../../cli/index.js";
|
|
3
3
|
import { ConfigApiService } from "../../../config-api/index.js";
|
|
4
|
+
import { DeployPolicyInterface } from "../../policy/index.js";
|
|
4
5
|
export declare class DeviceDetectionChangedCheck {
|
|
5
6
|
private cli;
|
|
6
7
|
private fileList;
|
|
@@ -8,7 +9,8 @@ export declare class DeviceDetectionChangedCheck {
|
|
|
8
9
|
private customerConfig;
|
|
9
10
|
private configName;
|
|
10
11
|
private isProduction;
|
|
11
|
-
|
|
12
|
+
private policy;
|
|
13
|
+
constructor(cli: CliServiceInterface, fileList: FileListInterface, configApi: ConfigApiService, customerConfig: CustomerConfig, configName: string, isProduction: boolean, policy: DeployPolicyInterface);
|
|
12
14
|
check(): Promise<void>;
|
|
13
15
|
private checkForChangedDeviceDetection;
|
|
14
16
|
private getActiveInstallResource;
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import { VirtualSpeedKitConfigFile, } from "../../../integration-api/index.js";
|
|
2
2
|
import { INTEGRATION_FILES } from "../../../../models/files.js";
|
|
3
3
|
import { safe } from "../../../../helpers/safe.js";
|
|
4
|
+
import { DeployQuestion } from "../../policy/index.js";
|
|
5
|
+
import { DeployAbortedError } from "../../error/deploy-aborted-error.js";
|
|
6
|
+
import ApplicationError from "../../../error-handling/error/application-error.js";
|
|
4
7
|
export class DeviceDetectionChangedCheck {
|
|
5
8
|
cli;
|
|
6
9
|
fileList;
|
|
@@ -8,13 +11,15 @@ export class DeviceDetectionChangedCheck {
|
|
|
8
11
|
customerConfig;
|
|
9
12
|
configName;
|
|
10
13
|
isProduction;
|
|
11
|
-
|
|
14
|
+
policy;
|
|
15
|
+
constructor(cli, fileList, configApi, customerConfig, configName, isProduction, policy) {
|
|
12
16
|
this.cli = cli;
|
|
13
17
|
this.fileList = fileList;
|
|
14
18
|
this.configApi = configApi;
|
|
15
19
|
this.customerConfig = customerConfig;
|
|
16
20
|
this.configName = configName;
|
|
17
21
|
this.isProduction = isProduction;
|
|
22
|
+
this.policy = policy;
|
|
18
23
|
}
|
|
19
24
|
async check() {
|
|
20
25
|
if (
|
|
@@ -47,9 +52,9 @@ export class DeviceDetectionChangedCheck {
|
|
|
47
52
|
return;
|
|
48
53
|
}
|
|
49
54
|
// this.cli.table(changes, { origin: {}, type: {}, old: {}, new: {} });
|
|
50
|
-
const result = await this.
|
|
55
|
+
const result = await this.policy.confirm(DeployQuestion.DeviceDetectionChange, `Detected change in ${changes.join(" | ")}. ${this.cli.style.red("Was this checked by QA?")}`, false);
|
|
51
56
|
if (!result) {
|
|
52
|
-
|
|
57
|
+
throw new DeployAbortedError("the device detection change was not confirmed");
|
|
53
58
|
}
|
|
54
59
|
}
|
|
55
60
|
async checkForChangedDeviceDetection(speedKitConfigFile, activeSpeedKitConfig) {
|
|
@@ -94,8 +99,7 @@ export class DeviceDetectionChangedCheck {
|
|
|
94
99
|
const activeInstallResourceResponse = await safe(this.configApi.getActiveInstall(this.configName));
|
|
95
100
|
if (activeInstallResourceResponse.success !== true) {
|
|
96
101
|
this.cli.failAction("PRE:CHECK:DEVICE_DETECTION", "Could not load active install resource");
|
|
97
|
-
this.
|
|
98
|
-
return;
|
|
102
|
+
throw new ApplicationError(`Could not load the active install resource of ${this.configName}`);
|
|
99
103
|
}
|
|
100
104
|
return activeInstallResourceResponse.data;
|
|
101
105
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { FileListInterface, CustomerConfig } from "../../../integration-api/index.js";
|
|
2
2
|
import { CliServiceInterface } from "../../../cli/index.js";
|
|
3
3
|
import { ConfigApiService } from "../../../config-api/index.js";
|
|
4
|
+
import { DeployPolicyInterface } from "../../policy/index.js";
|
|
4
5
|
export declare class SplitChangeCheck {
|
|
5
6
|
private cli;
|
|
6
7
|
private fileList;
|
|
@@ -8,7 +9,8 @@ export declare class SplitChangeCheck {
|
|
|
8
9
|
private customerConfig;
|
|
9
10
|
private configName;
|
|
10
11
|
private isProduction;
|
|
11
|
-
|
|
12
|
+
private policy;
|
|
13
|
+
constructor(cli: CliServiceInterface, fileList: FileListInterface, configApi: ConfigApiService, customerConfig: CustomerConfig, configName: string, isProduction: boolean, policy: DeployPolicyInterface);
|
|
12
14
|
check(): Promise<void>;
|
|
13
15
|
private checkSplitsForEachOrigin;
|
|
14
16
|
private getActiveInstallResource;
|
|
@@ -2,6 +2,8 @@ import { VirtualSpeedKitConfigFile, } from "../../../integration-api/index.js";
|
|
|
2
2
|
import { INTEGRATION_FILES } from "../../../../models/files.js";
|
|
3
3
|
import { safe } from "../../../../helpers/safe.js";
|
|
4
4
|
import ApplicationError from "../../../error-handling/error/application-error.js";
|
|
5
|
+
import { DeployQuestion } from "../../policy/index.js";
|
|
6
|
+
import { DeployAbortedError } from "../../error/deploy-aborted-error.js";
|
|
5
7
|
export class SplitChangeCheck {
|
|
6
8
|
cli;
|
|
7
9
|
fileList;
|
|
@@ -9,13 +11,15 @@ export class SplitChangeCheck {
|
|
|
9
11
|
customerConfig;
|
|
10
12
|
configName;
|
|
11
13
|
isProduction;
|
|
12
|
-
|
|
14
|
+
policy;
|
|
15
|
+
constructor(cli, fileList, configApi, customerConfig, configName, isProduction, policy) {
|
|
13
16
|
this.cli = cli;
|
|
14
17
|
this.fileList = fileList;
|
|
15
18
|
this.configApi = configApi;
|
|
16
19
|
this.customerConfig = customerConfig;
|
|
17
20
|
this.configName = configName;
|
|
18
21
|
this.isProduction = isProduction;
|
|
22
|
+
this.policy = policy;
|
|
19
23
|
}
|
|
20
24
|
async check() {
|
|
21
25
|
if (
|
|
@@ -50,9 +54,9 @@ export class SplitChangeCheck {
|
|
|
50
54
|
}
|
|
51
55
|
// @ts-expect-error incompatible type
|
|
52
56
|
this.cli.table(changes, { origin: {}, type: {}, old: {}, new: {} });
|
|
53
|
-
const result = await this.
|
|
57
|
+
const result = await this.policy.confirm(DeployQuestion.SplitChange, "Split change detected. Do you want to continue?", false);
|
|
54
58
|
if (!result) {
|
|
55
|
-
|
|
59
|
+
throw new DeployAbortedError("the split change was not confirmed");
|
|
56
60
|
}
|
|
57
61
|
}
|
|
58
62
|
async checkSplitsForEachOrigin(speedKitConfigFile, activeSpeedKitConfig) {
|
|
@@ -116,8 +120,7 @@ export class SplitChangeCheck {
|
|
|
116
120
|
const activeInstallResourceResponse = await safe(this.configApi.getActiveInstall(this.configName));
|
|
117
121
|
if (activeInstallResourceResponse.success !== true) {
|
|
118
122
|
this.cli.failAction("PRE:CHECK:SPLIT_CHANGE", "Could not load active install resource");
|
|
119
|
-
this.
|
|
120
|
-
return;
|
|
123
|
+
throw new ApplicationError(`Could not load the active install resource of ${this.configName}`);
|
|
121
124
|
}
|
|
122
125
|
return activeInstallResourceResponse.data;
|
|
123
126
|
}
|
|
@@ -4,9 +4,29 @@ export default class DeployContext {
|
|
|
4
4
|
readonly configName: string;
|
|
5
5
|
readonly dryRun: boolean;
|
|
6
6
|
readonly useTestConfig: boolean;
|
|
7
|
+
/** Leave out the modules and the server config, which a bulk never deploys. */
|
|
8
|
+
readonly installFilesOnly: boolean;
|
|
9
|
+
/**
|
|
10
|
+
* Leave out the checks that run after the upload. Each of them asks the
|
|
11
|
+
* app for its jobs and its modules, which a run over many customers pays
|
|
12
|
+
* for once per customer.
|
|
13
|
+
*/
|
|
14
|
+
readonly skipPostDeployChecks: boolean;
|
|
15
|
+
/** Open the diff tool for a file that differs, as a person expects. */
|
|
16
|
+
readonly opensDiffTool: boolean;
|
|
7
17
|
static flags: Record<string, Command.Flag>;
|
|
8
18
|
readonly artifacts?: string[];
|
|
9
19
|
readonly isProduction: boolean;
|
|
10
|
-
constructor(customerPath: string, configName?: string, artifacts?: string, dryRun?: boolean, useTestConfig?: boolean
|
|
20
|
+
constructor(customerPath: string, configName?: string, artifacts?: string, dryRun?: boolean, useTestConfig?: boolean,
|
|
21
|
+
/** Leave out the modules and the server config, which a bulk never deploys. */
|
|
22
|
+
installFilesOnly?: boolean,
|
|
23
|
+
/**
|
|
24
|
+
* Leave out the checks that run after the upload. Each of them asks the
|
|
25
|
+
* app for its jobs and its modules, which a run over many customers pays
|
|
26
|
+
* for once per customer.
|
|
27
|
+
*/
|
|
28
|
+
skipPostDeployChecks?: boolean,
|
|
29
|
+
/** Open the diff tool for a file that differs, as a person expects. */
|
|
30
|
+
opensDiffTool?: boolean);
|
|
11
31
|
hasArtifacts(): boolean;
|
|
12
32
|
}
|
|
@@ -9,6 +9,9 @@ export default class DeployContext {
|
|
|
9
9
|
configName;
|
|
10
10
|
dryRun;
|
|
11
11
|
useTestConfig;
|
|
12
|
+
installFilesOnly;
|
|
13
|
+
skipPostDeployChecks;
|
|
14
|
+
opensDiffTool;
|
|
12
15
|
static flags = {
|
|
13
16
|
...CLI_CONFIG_NAME,
|
|
14
17
|
...CLI_CONFIG_IS_TEST,
|
|
@@ -26,14 +29,40 @@ export default class DeployContext {
|
|
|
26
29
|
char: "a",
|
|
27
30
|
description: "which files to upload",
|
|
28
31
|
}),
|
|
32
|
+
mr: Flags.integer({
|
|
33
|
+
description: "deploy the reviewed change of this merged merge request, without questions",
|
|
34
|
+
}),
|
|
35
|
+
description: Flags.string({
|
|
36
|
+
dependsOn: ["mr"],
|
|
37
|
+
description: "the description every installation of the run gets, asked while it is left out",
|
|
38
|
+
}),
|
|
39
|
+
approval: Flags.string({
|
|
40
|
+
options: ["approved", "testing", "skip"],
|
|
41
|
+
// No default: oclif counts a defaulted flag as given, so dependsOn would fail every deploy.
|
|
42
|
+
dependsOn: ["mr"],
|
|
43
|
+
description: "what to do with a customer that approves every rollout themselves",
|
|
44
|
+
}),
|
|
29
45
|
};
|
|
30
46
|
artifacts;
|
|
31
47
|
isProduction;
|
|
32
|
-
constructor(customerPath, configName = DEFAULT_CONFIG_NAME, artifacts, dryRun = false, useTestConfig = false
|
|
48
|
+
constructor(customerPath, configName = DEFAULT_CONFIG_NAME, artifacts, dryRun = false, useTestConfig = false,
|
|
49
|
+
/** Leave out the modules and the server config, which a bulk never deploys. */
|
|
50
|
+
installFilesOnly = false,
|
|
51
|
+
/**
|
|
52
|
+
* Leave out the checks that run after the upload. Each of them asks the
|
|
53
|
+
* app for its jobs and its modules, which a run over many customers pays
|
|
54
|
+
* for once per customer.
|
|
55
|
+
*/
|
|
56
|
+
skipPostDeployChecks = false,
|
|
57
|
+
/** Open the diff tool for a file that differs, as a person expects. */
|
|
58
|
+
opensDiffTool = true) {
|
|
33
59
|
this.customerPath = customerPath;
|
|
34
60
|
this.configName = configName;
|
|
35
61
|
this.dryRun = dryRun;
|
|
36
62
|
this.useTestConfig = useTestConfig;
|
|
63
|
+
this.installFilesOnly = installFilesOnly;
|
|
64
|
+
this.skipPostDeployChecks = skipPostDeployChecks;
|
|
65
|
+
this.opensDiffTool = opensDiffTool;
|
|
37
66
|
this.artifacts = artifacts ? artifacts.split(ARTIFACTS_SEPARATOR) : [];
|
|
38
67
|
this.isProduction = configName.toLowerCase().includes("prod");
|
|
39
68
|
}
|
|
@@ -1,11 +1,24 @@
|
|
|
1
|
-
import { UserCliConfig } from "
|
|
1
|
+
import { CliServiceInterface, UserCliConfig } from "../cli/index.js";
|
|
2
2
|
import DeployContext from "./context/deploy-context.js";
|
|
3
3
|
import DeployService from "./deploy-service.js";
|
|
4
|
+
import { FileListInterface } from "../integration-api/index.js";
|
|
5
|
+
import { ConfigApiService } from "../config-api/index.js";
|
|
6
|
+
import { DeployPolicyInterface } from "./policy/index.js";
|
|
4
7
|
export default class DeployServiceFactory {
|
|
5
8
|
private context;
|
|
6
9
|
private cliConfig;
|
|
10
|
+
/** The answers of the deploy. A person answers while this is left out. */
|
|
11
|
+
private policyOverride?;
|
|
12
|
+
private cli?;
|
|
7
13
|
private service?;
|
|
8
|
-
|
|
14
|
+
/** The configuration on disk, as the service it built deploys it. */
|
|
15
|
+
files?: FileListInterface;
|
|
16
|
+
/** The name the installation has in the app. */
|
|
17
|
+
configName?: string;
|
|
18
|
+
configApi?: ConfigApiService;
|
|
19
|
+
constructor(context: DeployContext, cliConfig: UserCliConfig,
|
|
20
|
+
/** The answers of the deploy. A person answers while this is left out. */
|
|
21
|
+
policyOverride?: DeployPolicyInterface, cli?: CliServiceInterface);
|
|
9
22
|
buildService(): Promise<DeployService>;
|
|
10
23
|
private build;
|
|
11
24
|
private getConfigApi;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CliServiceFactory } from "../cli/index.js";
|
|
1
|
+
import { CliServiceFactory, } from "../cli/index.js";
|
|
2
2
|
import { DiffContext, DiffServiceFactory } from "../diff/index.js";
|
|
3
3
|
import InstallResourceBuilder from "./builder/install-resource-builder.js";
|
|
4
4
|
import RevalidatedModuleCheck from "./checks/post-deploy/revalidated-module-check.js";
|
|
@@ -9,20 +9,32 @@ import InstallResourceHandler from "./handler/install-resource-handler.js";
|
|
|
9
9
|
import DeletedFileCheck from "./handler/install-resource-modifier/deleted-file-check.js";
|
|
10
10
|
import ModuleHandler from "./handler/module-handler.js";
|
|
11
11
|
import ServerConfigHandler from "./handler/server-config-handler.js";
|
|
12
|
-
import { IntegrationApiFactory, IntegrationApiContext, DEFAULT_BLOCKED_FOLDERS, } from "../integration-api/index.js";
|
|
12
|
+
import { IntegrationApiFactory, IntegrationApiContext, FILE_TYPE, DEFAULT_BLOCKED_FOLDERS, } from "../integration-api/index.js";
|
|
13
13
|
import { SplitChangeCheck } from "./checks/pre-deploy/split-change-check.js";
|
|
14
14
|
import { ConfigApiContext, ConfigApiServiceFactory, } from "../config-api/index.js";
|
|
15
15
|
import { DeprecatedDeploymentDetectionCheck } from "./checks/post-deploy/deprecated-deployment-detection-check.js";
|
|
16
16
|
import { DeviceDetectionChangedCheck } from "./checks/pre-deploy/device-detection-changed-check.js";
|
|
17
17
|
import { RefreshDeploymentJobCheck } from "./checks/post-deploy/refresh-deployment-job-check.js";
|
|
18
18
|
import { CustomerApprovalCheck } from "./checks/activation/customer-approval-check.js";
|
|
19
|
+
import { InteractiveDeployPolicy, } from "./policy/index.js";
|
|
19
20
|
export default class DeployServiceFactory {
|
|
20
21
|
context;
|
|
21
22
|
cliConfig;
|
|
23
|
+
policyOverride;
|
|
24
|
+
cli;
|
|
22
25
|
service = undefined;
|
|
23
|
-
|
|
26
|
+
/** The configuration on disk, as the service it built deploys it. */
|
|
27
|
+
files = undefined;
|
|
28
|
+
/** The name the installation has in the app. */
|
|
29
|
+
configName = undefined;
|
|
30
|
+
configApi = undefined;
|
|
31
|
+
constructor(context, cliConfig,
|
|
32
|
+
/** The answers of the deploy. A person answers while this is left out. */
|
|
33
|
+
policyOverride, cli) {
|
|
24
34
|
this.context = context;
|
|
25
35
|
this.cliConfig = cliConfig;
|
|
36
|
+
this.policyOverride = policyOverride;
|
|
37
|
+
this.cli = cli;
|
|
26
38
|
}
|
|
27
39
|
async buildService() {
|
|
28
40
|
if (!(this.service instanceof DeployService)) {
|
|
@@ -31,38 +43,49 @@ export default class DeployServiceFactory {
|
|
|
31
43
|
return this.service;
|
|
32
44
|
}
|
|
33
45
|
async build() {
|
|
34
|
-
const
|
|
46
|
+
const cliService = this.cli ?? new CliServiceFactory().getService();
|
|
47
|
+
const files = await this.getIntegrationFiles(cliService);
|
|
35
48
|
const customer = files.getCustomerConfig().config;
|
|
36
49
|
const configName = customer.name || this.context.configName;
|
|
37
50
|
const configApi = this.getConfigApi(customer.app);
|
|
38
|
-
|
|
39
|
-
|
|
51
|
+
this.files = files;
|
|
52
|
+
this.configName = configName;
|
|
53
|
+
this.configApi = configApi;
|
|
54
|
+
const diffService = new DiffServiceFactory(new DiffContext(this.cliConfig.diffExec, this.cliConfig.diffExecTemplate, this.context.opensDiffTool), cliService).getService();
|
|
55
|
+
const policy = this.policyOverride ?? new InteractiveDeployPolicy(cliService);
|
|
40
56
|
const installResourceBuilder = new InstallResourceBuilder(configApi);
|
|
41
|
-
const deletedFilesChecker = new DeletedFileCheck(cliService, this.context.hasArtifacts());
|
|
57
|
+
const deletedFilesChecker = new DeletedFileCheck(cliService, policy, this.context.hasArtifacts());
|
|
42
58
|
this.service = new DeployService(files, [
|
|
43
|
-
new CustomerConfigHandler(customer, configApi, configName, diffService, cliService, installResourceBuilder),
|
|
44
|
-
new InstallResourceHandler(customer, configApi, configName, diffService, cliService, installResourceBuilder, deletedFilesChecker, new CustomerApprovalCheck(cliService, customer)),
|
|
45
|
-
new ModuleHandler(configApi, diffService, cliService, []),
|
|
46
|
-
new ServerConfigHandler(configApi, diffService, cliService),
|
|
59
|
+
new CustomerConfigHandler(customer, configApi, configName, diffService, cliService, installResourceBuilder, policy),
|
|
60
|
+
new InstallResourceHandler(customer, configApi, configName, diffService, cliService, installResourceBuilder, deletedFilesChecker, new CustomerApprovalCheck(cliService, customer, policy), policy),
|
|
61
|
+
new ModuleHandler(configApi, diffService, cliService, [], policy),
|
|
62
|
+
new ServerConfigHandler(configApi, diffService, cliService, policy),
|
|
47
63
|
], cliService, [
|
|
48
|
-
new SplitChangeCheck(cliService, files, configApi, customer, configName, this.context.isProduction),
|
|
49
|
-
new DeviceDetectionChangedCheck(cliService, files, configApi, customer, configName, this.context.isProduction),
|
|
50
|
-
],
|
|
64
|
+
new SplitChangeCheck(cliService, files, configApi, customer, configName, this.context.isProduction, policy),
|
|
65
|
+
new DeviceDetectionChangedCheck(cliService, files, configApi, customer, configName, this.context.isProduction, policy),
|
|
66
|
+
], this.context.skipPostDeployChecks
|
|
67
|
+
? []
|
|
68
|
+
: await this.getPostDeployChecks(files, cliService, configApi, customer.app, policy), this.context.dryRun);
|
|
51
69
|
}
|
|
52
70
|
getConfigApi(app) {
|
|
53
71
|
const configApiContext = new ConfigApiContext(app);
|
|
54
72
|
return new ConfigApiServiceFactory(configApiContext).getService();
|
|
55
73
|
}
|
|
56
|
-
async getIntegrationFiles() {
|
|
74
|
+
async getIntegrationFiles(cli) {
|
|
57
75
|
const integrationApiContext = new IntegrationApiContext(this.context.customerPath, this.context.configName, this.context.artifacts, DEFAULT_BLOCKED_FOLDERS, this.context.useTestConfig);
|
|
58
|
-
const integrationApi = new IntegrationApiFactory(integrationApiContext, this.cliConfig).buildService();
|
|
59
|
-
|
|
76
|
+
const integrationApi = new IntegrationApiFactory(integrationApiContext, this.cliConfig, cli).buildService();
|
|
77
|
+
const files = await integrationApi.run();
|
|
78
|
+
if (this.context.installFilesOnly) {
|
|
79
|
+
files.filter((file) => file.type === FILE_TYPE.INSTALL_FILE ||
|
|
80
|
+
file.type === FILE_TYPE.CUSTOMER_FILE);
|
|
81
|
+
}
|
|
82
|
+
return files;
|
|
60
83
|
}
|
|
61
|
-
async getPostDeployChecks(files, cliService, configApi, app) {
|
|
84
|
+
async getPostDeployChecks(files, cliService, configApi, app, policy) {
|
|
62
85
|
return [
|
|
63
|
-
new SaveFilesCheck(files, cliService),
|
|
86
|
+
new SaveFilesCheck(files, cliService, policy),
|
|
64
87
|
new RevalidatedModuleCheck(configApi, cliService, app),
|
|
65
|
-
new DeprecatedDeploymentDetectionCheck(files, cliService, configApi, app),
|
|
88
|
+
new DeprecatedDeploymentDetectionCheck(files, cliService, configApi, app, policy),
|
|
66
89
|
new RefreshDeploymentJobCheck(await configApi.client.getEntityManager(), cliService),
|
|
67
90
|
];
|
|
68
91
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import DeployHandlerInterface from "./interface/deploy-handler-interface.js";
|
|
2
|
-
import {
|
|
2
|
+
import { CliServiceInterface } from "../cli/index.js";
|
|
3
3
|
import { FileListInterface } from "../integration-api/index.js";
|
|
4
4
|
import { PostDeployCheckInterface, PreDeployCheckInterface } from "./deploy-service-model.js";
|
|
5
5
|
export default class DeployService {
|
|
@@ -9,7 +9,7 @@ export default class DeployService {
|
|
|
9
9
|
private readonly preDeployChecks;
|
|
10
10
|
private readonly postDeployChecks;
|
|
11
11
|
private readonly dryRun;
|
|
12
|
-
constructor(fileList: FileListInterface, deployHandler: DeployHandlerInterface[], cli:
|
|
12
|
+
constructor(fileList: FileListInterface, deployHandler: DeployHandlerInterface[], cli: CliServiceInterface, preDeployChecks: PreDeployCheckInterface[], postDeployChecks: PostDeployCheckInterface[], dryRun?: boolean);
|
|
13
13
|
run(): Promise<void>;
|
|
14
14
|
private handleType;
|
|
15
15
|
private uploadType;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A deploy that stopped on purpose, because a question was answered with no.
|
|
3
|
+
*
|
|
4
|
+
* This is not a failure: the command reports the reason and ends with 0. A
|
|
5
|
+
* caller that deploys several configurations catches it, records the reason
|
|
6
|
+
* and continues with the next configuration.
|
|
7
|
+
*/
|
|
8
|
+
export declare class DeployAbortedError extends Error {
|
|
9
|
+
readonly reason: string;
|
|
10
|
+
readonly code = "DEPLOY_ABORTED";
|
|
11
|
+
constructor(reason: string);
|
|
12
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A deploy that stopped on purpose, because a question was answered with no.
|
|
3
|
+
*
|
|
4
|
+
* This is not a failure: the command reports the reason and ends with 0. A
|
|
5
|
+
* caller that deploys several configurations catches it, records the reason
|
|
6
|
+
* and continues with the next configuration.
|
|
7
|
+
*/
|
|
8
|
+
export class DeployAbortedError extends Error {
|
|
9
|
+
reason;
|
|
10
|
+
code = "DEPLOY_ABORTED";
|
|
11
|
+
constructor(reason) {
|
|
12
|
+
super(reason);
|
|
13
|
+
this.reason = reason;
|
|
14
|
+
this.name = "DeployAbortedError";
|
|
15
|
+
}
|
|
16
|
+
}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import DeployHandlerInterface from "../interface/deploy-handler-interface.js";
|
|
2
2
|
import { CustomerConfig, CustomerConfigFile, FILE_TYPE } from "../../integration-api/index.js";
|
|
3
3
|
import { DiffService } from "../../diff/index.js";
|
|
4
|
-
import {
|
|
4
|
+
import { CliServiceInterface } from "../../cli/index.js";
|
|
5
5
|
import InstallResourceBuilder from "../builder/install-resource-builder.js";
|
|
6
6
|
import { ConfigApiService } from "../../config-api/index.js";
|
|
7
|
+
import { DeployPolicyInterface } from "../policy/index.js";
|
|
7
8
|
export default class CustomerConfigHandler implements DeployHandlerInterface {
|
|
8
9
|
private readonly customer;
|
|
9
10
|
private readonly configApi;
|
|
@@ -11,7 +12,8 @@ export default class CustomerConfigHandler implements DeployHandlerInterface {
|
|
|
11
12
|
private diffService;
|
|
12
13
|
private cli;
|
|
13
14
|
private builder;
|
|
14
|
-
|
|
15
|
+
private policy;
|
|
16
|
+
constructor(customer: CustomerConfig, configApi: ConfigApiService, configName: string, diffService: DiffService, cli: CliServiceInterface, builder: InstallResourceBuilder, policy: DeployPolicyInterface);
|
|
15
17
|
canHandle(type: FILE_TYPE): boolean;
|
|
16
18
|
handle(files: CustomerConfigFile[]): Promise<void>;
|
|
17
19
|
upload(files: CustomerConfigFile[]): Promise<void>;
|