@speedkit/cli 4.36.0 → 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 +8 -0
- package/README.md +3 -29
- 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.js +1 -1
- package/dist/commands/config/setup.js +4 -3
- package/dist/commands/deploy.js +3 -2
- 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 +48 -1
- 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} +1 -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-service-factory.d.ts +1 -1
- package/dist/services/deploy/bulk/config-deploy-factory.d.ts +1 -1
- package/dist/services/deploy/checks/post-deploy/deprecated-deployment-detection-check.d.ts +2 -2
- package/dist/services/deploy/checks/post-deploy/refresh-deployment-job-check.d.ts +2 -2
- package/dist/services/deploy/checks/post-deploy/revalidated-module-check.d.ts +2 -2
- package/dist/services/deploy/checks/post-deploy/save-files-check.d.ts +2 -2
- package/dist/services/deploy/context/deploy-context.js +1 -1
- package/dist/services/deploy/deploy-service-factory.d.ts +3 -2
- package/dist/services/deploy/deploy-service-factory.js +9 -7
- package/dist/services/deploy/deploy-service.d.ts +2 -2
- package/dist/services/deploy/handler/customer-config-handler.d.ts +2 -2
- package/dist/services/deploy/handler/install-resource-handler.d.ts +2 -2
- package/dist/services/deploy/handler/install-resource-modifier/deleted-file-check.d.ts +2 -2
- package/dist/services/deploy/handler/module-handler.d.ts +2 -2
- package/dist/services/deploy/handler/server-config-handler.d.ts +2 -2
- package/dist/services/deploy/mr/base-config-reader.d.ts +1 -1
- package/dist/services/deploy/mr/base-config-reader.js +8 -5
- package/dist/services/deploy/mr/merge-request-deploy-service-factory.d.ts +1 -1
- package/dist/services/deploy/{bulk → spec/bulk}/bulk-deploy-service.spec.js +5 -5
- package/dist/services/deploy/{bulk → spec/bulk}/touched-configs.spec.js +2 -2
- package/dist/services/deploy/{checks → spec/checks}/activation/customer-approval-check.spec.js +2 -2
- package/dist/services/deploy/{checks → spec/checks}/post-deploy/refresh-deployment-job-check.spec.js +2 -2
- package/dist/services/deploy/{checks → spec/checks}/pre-deploy/split-change-check.spec.js +3 -3
- package/dist/services/deploy/{handler → spec/handler}/module-handler.spec.js +2 -2
- package/dist/services/deploy/{handler → spec/handler}/testing-installation-links.spec.js +1 -1
- package/dist/services/deploy/{mr → spec/mr}/live-state-check.spec.js +2 -2
- package/dist/services/deploy/{mr → spec/mr}/merge-request-description.spec.js +1 -1
- package/dist/services/deploy/{policy → spec/policy}/auto-deploy-policy.spec.js +2 -2
- package/dist/services/diff/diff-service-factory.d.ts +3 -1
- package/dist/services/diff/diff-service-factory.js +4 -2
- package/dist/services/diff/diff-service.d.ts +10 -2
- package/dist/services/diff/diff-service.js +26 -3
- package/dist/services/diff/index.d.ts +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.spec.js → spec/git-repository.spec.js} +1 -1
- 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/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/{rules/spec → spec/rules}/strip-parameters.spec.js +3 -3
- package/dist/services/query-builder/{sql/spec → spec/sql}/expression.spec.js +2 -2
- package/dist/services/query-builder/{sql/spec → spec/sql}/format.spec.js +2 -2
- package/dist/services/query-builder/{sql/spec → spec/sql}/predicate.spec.js +1 -1
- package/dist/services/query-builder/{sql/spec → spec/sql}/regex.spec.js +1 -1
- package/dist/services/revalidate/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/{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/{extension → spec/extension}/crx.spec.js +1 -1
- package/dist/services/setup/{extension → spec/extension}/webstore.spec.js +1 -1
- package/dist/services/setup/{os → spec/os}/tool-registry.spec.js +1 -1
- package/oclif.manifest.json +1 -52
- 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/{bulk → spec/bulk}/bulk-deploy-service.spec.d.ts +0 -0
- /package/dist/services/deploy/{bulk → spec/bulk}/touched-configs.spec.d.ts +0 -0
- /package/dist/services/deploy/{checks → spec/checks}/activation/customer-approval-check.spec.d.ts +0 -0
- /package/dist/services/deploy/{checks → spec/checks}/post-deploy/refresh-deployment-job-check.spec.d.ts +0 -0
- /package/dist/services/deploy/{checks → spec/checks}/pre-deploy/split-change-check.spec.d.ts +0 -0
- /package/dist/services/deploy/{handler → spec/handler}/module-handler.spec.d.ts +0 -0
- /package/dist/services/deploy/{handler → spec/handler}/testing-installation-links.spec.d.ts +0 -0
- /package/dist/services/deploy/{mr → spec/mr}/live-state-check.spec.d.ts +0 -0
- /package/dist/services/deploy/{mr → spec/mr}/merge-request-description.spec.d.ts +0 -0
- /package/dist/services/deploy/{policy → spec/policy}/auto-deploy-policy.spec.d.ts +0 -0
- /package/dist/{helpers/html-format-helper.d.ts → services/diff/html-format.d.ts} +0 -0
- /package/dist/{helpers/html-format-helper.js → services/diff/html-format.js} +0 -0
- /package/dist/services/document-handler-runtime/{document-handler-abort.spec.d.ts → spec/document-handler-abort.spec.d.ts} +0 -0
- /package/dist/services/git/{git-repository.spec.d.ts → spec/git-repository.spec.d.ts} +0 -0
- /package/dist/{helpers → services/integration-api}/array-helper.d.ts +0 -0
- /package/dist/{helpers → services/integration-api}/array-helper.js +0 -0
- /package/dist/services/onboarding/{browser → spec/browser}/executable/headed-user-agent.spec.d.ts +0 -0
- /package/dist/services/onboarding/{empty-service-worker.spec.d.ts → spec/empty-service-worker.spec.d.ts} +0 -0
- /package/dist/services/onboarding/{onboarding-model.spec.d.ts → spec/onboarding-model.spec.d.ts} +0 -0
- /package/dist/services/onboarding/{virtual-orestes-app → spec/virtual-orestes-app}/crawler.spec.d.ts +0 -0
- /package/dist/services/onboarding/{virtual-orestes-app → spec/virtual-orestes-app}/origin-error-cause.spec.d.ts +0 -0
- /package/dist/{helpers → services/origin-request}/java-regex.d.ts +0 -0
- /package/dist/{helpers → services/origin-request}/java-regex.js +0 -0
- /package/dist/services/origin-request/{asset-variations.spec.d.ts → spec/asset-variations.spec.d.ts} +0 -0
- /package/dist/services/prewarm/{csv-reader.spec.d.ts → spec/csv-reader.spec.d.ts} +0 -0
- /package/dist/services/prewarm/{prewarm-targets.spec.d.ts → spec/prewarm-targets.spec.d.ts} +0 -0
- /package/dist/services/query-builder/{queries/spec → spec/queries}/golden-configs.d.ts +0 -0
- /package/dist/services/query-builder/{queries/spec → spec/queries}/golden-configs.js +0 -0
- /package/dist/services/query-builder/{queries/spec → spec/queries}/golden.spec.d.ts +0 -0
- /package/dist/services/query-builder/{queries/spec → spec/queries}/pops-query.spec.d.ts +0 -0
- /package/dist/services/query-builder/{queries/spec → spec/queries}/queries.spec.d.ts +0 -0
- /package/dist/services/query-builder/{queries/spec → spec/queries}/reported-bugs.spec.d.ts +0 -0
- /package/dist/services/query-builder/{query-builder-service.spec.d.ts → spec/query-builder-service.spec.d.ts} +0 -0
- /package/dist/services/query-builder/{rules/spec → spec/rules}/pattern-language.spec.d.ts +0 -0
- /package/dist/services/query-builder/{rules/spec → spec/rules}/rule-parser.spec.d.ts +0 -0
- /package/dist/services/query-builder/{rules/spec → spec/rules}/rule-reducer.spec.d.ts +0 -0
- /package/dist/services/query-builder/{rules/spec → spec/rules}/rule-relevance.spec.d.ts +0 -0
- /package/dist/services/query-builder/{rules/spec → spec/rules}/rule-to-sql.spec.d.ts +0 -0
- /package/dist/services/query-builder/{rules/spec → spec/rules}/runtime-semantics.spec.d.ts +0 -0
- /package/dist/services/query-builder/{rules/spec → spec/rules}/strip-parameters.spec.d.ts +0 -0
- /package/dist/services/query-builder/{sql/spec → spec/sql}/expression.spec.d.ts +0 -0
- /package/dist/services/query-builder/{sql/spec → spec/sql}/format.spec.d.ts +0 -0
- /package/dist/services/query-builder/{sql/spec → spec/sql}/predicate.spec.d.ts +0 -0
- /package/dist/services/query-builder/{sql/spec → spec/sql}/regex.spec.d.ts +0 -0
- /package/dist/services/revalidate/{revalidate-service.spec.d.ts → spec/revalidate-service.spec.d.ts} +0 -0
- /package/dist/services/setup/{extension → spec/extension}/crx.spec.d.ts +0 -0
- /package/dist/services/setup/{extension → spec/extension}/webstore.spec.d.ts +0 -0
- /package/dist/services/setup/{os → spec/os}/tool-registry.spec.d.ts +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,11 @@
|
|
|
1
|
+
## [4.36.1](https://gitlab.orestes.info/baqend/speed-kit-cli/compare/v4.36.0...v4.36.1) (2026-09-25)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* **cli:** register the first-run init hook ([1e9c073](https://gitlab.orestes.info/baqend/speed-kit-cli/commit/1e9c073caf296c158054a745a4a56f86dbeff1e8))
|
|
7
|
+
* **deploy:** let a deploy without --mr pass the --approval check ([72ae3d4](https://gitlab.orestes.info/baqend/speed-kit-cli/commit/72ae3d4d08dd9b4371f82734ddbaceec7ba32842))
|
|
8
|
+
|
|
1
9
|
# [4.36.0](https://gitlab.orestes.info/baqend/speed-kit-cli/compare/v4.35.1...v4.36.0) (2026-09-24)
|
|
2
10
|
|
|
3
11
|
|
package/README.md
CHANGED
|
@@ -8,6 +8,8 @@
|
|
|
8
8
|
|
|
9
9
|
## Quicklinks
|
|
10
10
|
|
|
11
|
+
Working on the CLI itself? The contributing docs are in [docs/](./docs/index.md) — architecture, one page per service, and a command-to-service map.
|
|
12
|
+
|
|
11
13
|
<!-- toc -->
|
|
12
14
|
* [Usage](#usage)
|
|
13
15
|
* [Commands](#commands)
|
|
@@ -15,19 +17,16 @@
|
|
|
15
17
|
|
|
16
18
|
# Usage
|
|
17
19
|
|
|
18
|
-
<!-- usage -->
|
|
19
20
|
```sh-session
|
|
20
21
|
$ npm install -g @speedkit/cli
|
|
21
22
|
$ sk COMMAND
|
|
22
23
|
running command...
|
|
23
24
|
$ sk (--version)
|
|
24
|
-
@speedkit/cli/4.36.0 linux-x64 node-v22.23.3
|
|
25
25
|
$ sk --help [COMMAND]
|
|
26
26
|
USAGE
|
|
27
27
|
$ sk COMMAND
|
|
28
28
|
...
|
|
29
29
|
```
|
|
30
|
-
<!-- usagestop -->
|
|
31
30
|
|
|
32
31
|
> **💡 NOTE:**
|
|
33
32
|
Set up auto-completion for the CLI by executing [`sk autocomplete [SHELL]`](#sk-autocomplete-shell) once.
|
|
@@ -79,7 +78,6 @@ By either...
|
|
|
79
78
|
* [`sk config setup`](#sk-config-setup)
|
|
80
79
|
* [`sk deploy CUSTOMERPATH`](#sk-deploy-customerpath)
|
|
81
80
|
* [`sk diff-url-parameters PAGEURL`](#sk-diff-url-parameters-pageurl)
|
|
82
|
-
* [`sk document-handler CUSTOMERPATH`](#sk-document-handler-customerpath)
|
|
83
81
|
* [`sk extension add [REF]`](#sk-extension-add-ref)
|
|
84
82
|
* [`sk extension devtools`](#sk-extension-devtools)
|
|
85
83
|
* [`sk extension list`](#sk-extension-list)
|
|
@@ -452,7 +450,7 @@ FLAGS
|
|
|
452
450
|
-d, --dryRun dry run
|
|
453
451
|
-t, --useTestConfig Override app with configured testApp
|
|
454
452
|
-v, --verboseLevel Show all messages
|
|
455
|
-
--approval=<option>
|
|
453
|
+
--approval=<option> what to do with a customer that approves every rollout themselves
|
|
456
454
|
<options: approved|testing|skip>
|
|
457
455
|
--description=<value> the description every installation of the run gets, asked while it is left out
|
|
458
456
|
--mr=<value> deploy the reviewed change of this merged merge request, without questions
|
|
@@ -492,30 +490,6 @@ EXAMPLES
|
|
|
492
490
|
$ sk prewarm https://www.decathlon.de/ -h
|
|
493
491
|
```
|
|
494
492
|
|
|
495
|
-
## `sk document-handler CUSTOMERPATH`
|
|
496
|
-
|
|
497
|
-
Creates testable documentHandler in folder {CUSTOMER_PATH}/test/src/
|
|
498
|
-
|
|
499
|
-
```
|
|
500
|
-
USAGE
|
|
501
|
-
$ sk document-handler CUSTOMERPATH [-c <value>] [-t <value>...]
|
|
502
|
-
|
|
503
|
-
ARGUMENTS
|
|
504
|
-
CUSTOMERPATH The customer config path
|
|
505
|
-
|
|
506
|
-
FLAGS
|
|
507
|
-
-c, --configName=<value> [default: production] The costumer config name
|
|
508
|
-
-t, --CreateTests=<value>... name of the test to create
|
|
509
|
-
|
|
510
|
-
DESCRIPTION
|
|
511
|
-
Creates testable documentHandler in folder {CUSTOMER_PATH}/test/src/
|
|
512
|
-
|
|
513
|
-
EXAMPLES
|
|
514
|
-
$ sk documentHandler <customerPath> -c <configName>
|
|
515
|
-
|
|
516
|
-
$ sk deploy customers/decathlon.de -c production
|
|
517
|
-
```
|
|
518
|
-
|
|
519
493
|
## `sk extension add [REF]`
|
|
520
494
|
|
|
521
495
|
Install a Chrome extension into the onboarding browser by Web Store link or id
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Command, Flags } from "@oclif/core";
|
|
2
2
|
import { CLI_ATHENA, CLI_CONFIG_NAME, CLI_CUSTOMER_CONFIG, CLI_QUERY_DAYS, CLI_QUERY_FILTERS, CLI_QUERY_PREWARM_LIST, CLIParameters, CLIParametersChar, CLIParametersExample, } from "../models/cli-parameters.js";
|
|
3
|
-
import { CliConfig } from "../helpers/cli-config.js";
|
|
4
3
|
import { AutoPreWarmFactory } from "../services/prewarm/index.js";
|
|
4
|
+
import { CliConfig } from "../services/cli/index.js";
|
|
5
5
|
export default class AutoPrewarm extends Command {
|
|
6
6
|
static args = CLI_CUSTOMER_CONFIG;
|
|
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";
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { Command, Flags } from "@oclif/core";
|
|
2
|
-
import { CliServiceFactory } from "../../services/cli/index.js";
|
|
3
|
-
import { CliConfig } from "../../helpers/cli-config.js";
|
|
2
|
+
import { CliConfig, CliServiceFactory } from "../../services/cli/index.js";
|
|
4
3
|
import { BrowserManager, } from "../../services/setup/index.js";
|
|
5
4
|
export default class BrowserClean extends Command {
|
|
6
5
|
static description = "Remove puppeteer-managed browser builds from the cache";
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { Command } from "@oclif/core";
|
|
2
|
-
import { CliServiceFactory } from "../../services/cli/index.js";
|
|
3
|
-
import { CliConfig } from "../../helpers/cli-config.js";
|
|
2
|
+
import { CliConfig, CliServiceFactory } from "../../services/cli/index.js";
|
|
4
3
|
import { BrowserDetector, normalizePlatform, } from "../../services/setup/index.js";
|
|
5
4
|
export default class BrowserList extends Command {
|
|
6
5
|
static description = "List detected system browsers and puppeteer-managed builds";
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { Command } from "@oclif/core";
|
|
2
|
-
import { CliServiceFactory } from "../../services/cli/index.js";
|
|
3
|
-
import { CliConfig } from "../../helpers/cli-config.js";
|
|
2
|
+
import { CliConfig, CliServiceFactory } from "../../services/cli/index.js";
|
|
4
3
|
import { BrowserManager } from "../../services/setup/index.js";
|
|
5
4
|
export default class BrowserUpdate extends Command {
|
|
6
5
|
static description = "Update the puppeteer-managed browser to the latest build of its channel";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Args, Command, Flags } from "@oclif/core";
|
|
2
|
-
import { CliConfig } from "../
|
|
2
|
+
import { CliConfig } from "../services/cli/index.js";
|
|
3
3
|
import { BulkDeployContext, BulkDeployServiceFactory, } from "../services/deploy/bulk/index.js";
|
|
4
4
|
import { DeployOutcome } from "../services/deploy/mr/index.js";
|
|
5
5
|
export default class BulkDeploy extends Command {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Command, Flags } from "@oclif/core";
|
|
2
2
|
import { SetupContext, SetupServiceFactory, } from "../../services/setup/index.js";
|
|
3
|
-
import {
|
|
3
|
+
import { CliServiceFactory } from "../../services/cli/index.js";
|
|
4
4
|
export default class Setup extends Command {
|
|
5
5
|
static description = "Run the Speed Kit CLI setup wizard (choose browser and diff tool)";
|
|
6
6
|
static examples = ["$ sk config setup", "$ sk config setup --force"];
|
|
@@ -16,11 +16,12 @@ export default class Setup extends Command {
|
|
|
16
16
|
};
|
|
17
17
|
async run() {
|
|
18
18
|
const { flags } = await this.parse(Setup);
|
|
19
|
+
const cli = new CliServiceFactory().getService();
|
|
19
20
|
const context = new SetupContext(flags.postInstall, flags.force);
|
|
20
|
-
const service = new SetupServiceFactory(this.config, context).getService();
|
|
21
|
+
const service = new SetupServiceFactory(this.config, context, cli).getService();
|
|
21
22
|
// When triggered by postinstall, only run if it is safe and not yet done.
|
|
22
23
|
if (flags.postInstall &&
|
|
23
|
-
(
|
|
24
|
+
(cli.nonInteractive || service.isFirstRunCompleted())) {
|
|
24
25
|
return;
|
|
25
26
|
}
|
|
26
27
|
await service.run();
|
package/dist/commands/deploy.js
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { Command } from "@oclif/core";
|
|
2
|
-
import { CliConfig } from "../helpers/cli-config.js";
|
|
3
2
|
import { CLI_CUSTOMER_CONFIG, CLIParameters, CLIParametersChar, CLIParametersExample, } from "../models/cli-parameters.js";
|
|
4
3
|
import DeployContext from "../services/deploy/context/deploy-context.js";
|
|
5
4
|
import DeployServiceFactory from "../services/deploy/deploy-service-factory.js";
|
|
6
5
|
import { DeployAbortedError } from "../services/deploy/error/deploy-aborted-error.js";
|
|
7
6
|
import { MergeRequestDeployContext, MergeRequestDeployServiceFactory, } from "../services/deploy/mr/index.js";
|
|
7
|
+
import { ApprovalAnswer } from "../services/deploy/policy/auto-deploy-policy.js";
|
|
8
|
+
import { CliConfig } from "../services/cli/index.js";
|
|
8
9
|
export default class Deploy extends Command {
|
|
9
10
|
static args = CLI_CUSTOMER_CONFIG;
|
|
10
11
|
static flags = DeployContext.flags;
|
|
@@ -16,7 +17,7 @@ export default class Deploy extends Command {
|
|
|
16
17
|
async run() {
|
|
17
18
|
const { args: { customerPath }, flags: { artifacts, configName, dryRun, useTestConfig, mr, approval, description, }, } = await this.parse(Deploy);
|
|
18
19
|
if (mr) {
|
|
19
|
-
await this.deployMergeRequest(customerPath, configName, mr, approval, description, dryRun);
|
|
20
|
+
await this.deployMergeRequest(customerPath, configName, mr, (approval ?? ApprovalAnswer.Skip), description, dryRun);
|
|
20
21
|
return;
|
|
21
22
|
}
|
|
22
23
|
const deployContext = new DeployContext(customerPath, configName, artifacts, dryRun, useTestConfig);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Config, Command } from "@oclif/core";
|
|
2
|
-
import {
|
|
2
|
+
import { CliServiceInterface } from "../services/cli/index.js";
|
|
3
3
|
export default class DiffUrlParameters extends Command {
|
|
4
|
-
cli:
|
|
4
|
+
cli: CliServiceInterface;
|
|
5
5
|
static description: string;
|
|
6
6
|
static aliases: string[];
|
|
7
7
|
static deprecateAliases: boolean;
|
|
@@ -1,11 +1,18 @@
|
|
|
1
1
|
import { Args, Command, Flags } from "@oclif/core";
|
|
2
|
-
import
|
|
2
|
+
import { originFetch } from "../helpers/origin-proxy.js";
|
|
3
3
|
import { CLIParameters, CLIParametersChar, CLIParametersExample, } from "../models/cli-parameters.js";
|
|
4
|
-
import { CliServiceFactory } from "../services/cli/index.js";
|
|
4
|
+
import { CliConfig, CliServiceFactory, } from "../services/cli/index.js";
|
|
5
5
|
import * as url from "node:url";
|
|
6
6
|
import { DiffContext, DiffServiceFactory } from "../services/diff/index.js";
|
|
7
|
-
import {
|
|
8
|
-
|
|
7
|
+
import { formatHtml } from "../services/diff/index.js";
|
|
8
|
+
/**
|
|
9
|
+
* Fetch a page for diffing, or null when the origin does not answer with 200 —
|
|
10
|
+
* the command reports the miss itself and carries on with what it did get.
|
|
11
|
+
*/
|
|
12
|
+
async function scrape(url) {
|
|
13
|
+
const response = await originFetch(url);
|
|
14
|
+
return response.status === 200 ? response.text() : null;
|
|
15
|
+
}
|
|
9
16
|
export default class DiffUrlParameters extends Command {
|
|
10
17
|
cli;
|
|
11
18
|
static description = "Shows difference in documents with query parameters on/off";
|
|
@@ -57,7 +64,7 @@ export default class DiffUrlParameters extends Command {
|
|
|
57
64
|
}
|
|
58
65
|
const userConfig = new CliConfig(this.config).load();
|
|
59
66
|
const context = new DiffContext(userConfig.diffExec, userConfig.diffExecTemplate);
|
|
60
|
-
const diffService = new DiffServiceFactory(context).getService();
|
|
67
|
+
const diffService = new DiffServiceFactory(context, this.cli).getService();
|
|
61
68
|
const originalFilePath = await diffService.writeContentToTemporalFile("original.html", formatHtml(originalData));
|
|
62
69
|
const withoutAnyParametersFilePath = await diffService.writeContentToTemporalFile("without-any-params.html", formatHtml(withoutAnyParametersData));
|
|
63
70
|
this.cli.spacer();
|
|
@@ -18,7 +18,7 @@ export default class ExtensionAdd extends Command {
|
|
|
18
18
|
async run() {
|
|
19
19
|
const { args } = await this.parse(ExtensionAdd);
|
|
20
20
|
const cli = new CliServiceFactory().getService();
|
|
21
|
-
const { extensions } = new SetupServiceFactory(this.config).getService();
|
|
21
|
+
const { extensions } = new SetupServiceFactory(this.config, undefined, cli).getService();
|
|
22
22
|
let ref = args.ref;
|
|
23
23
|
if (!ref) {
|
|
24
24
|
ref = await cli.prompt("Paste a Chrome Web Store link or extension id", {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Command, Flags } from "@oclif/core";
|
|
2
2
|
import { CliServiceFactory } from "../../services/cli/index.js";
|
|
3
|
-
import { CliConfig } from "../../
|
|
3
|
+
import { CliConfig } from "../../services/cli/index.js";
|
|
4
4
|
import { ExtensionDownloader } from "../../services/onboarding/browser/extension/extension-downloader.js";
|
|
5
5
|
export default class ExtensionDevtools extends Command {
|
|
6
6
|
static description = "Install the integration-devtools extension for the onboarding browser, or update it to the latest release";
|
|
@@ -6,7 +6,7 @@ export default class ExtensionList extends Command {
|
|
|
6
6
|
static examples = ["$ sk extension list"];
|
|
7
7
|
async run() {
|
|
8
8
|
const cli = new CliServiceFactory().getService();
|
|
9
|
-
const { extensions } = new SetupServiceFactory(this.config).getService();
|
|
9
|
+
const { extensions } = new SetupServiceFactory(this.config, undefined, cli).getService();
|
|
10
10
|
const list = extensions.list();
|
|
11
11
|
if (list.length === 0) {
|
|
12
12
|
cli.writeWarning("No managed extensions installed.");
|
|
@@ -14,7 +14,7 @@ export default class ExtensionRemove extends Command {
|
|
|
14
14
|
async run() {
|
|
15
15
|
const { args } = await this.parse(ExtensionRemove);
|
|
16
16
|
const cli = new CliServiceFactory().getService();
|
|
17
|
-
const { extensions } = new SetupServiceFactory(this.config).getService();
|
|
17
|
+
const { extensions } = new SetupServiceFactory(this.config, undefined, cli).getService();
|
|
18
18
|
const list = extensions.list();
|
|
19
19
|
if (list.length === 0) {
|
|
20
20
|
cli.writeWarning("No managed extensions to remove.");
|
|
@@ -6,7 +6,7 @@ export default class ExtensionUpdate extends Command {
|
|
|
6
6
|
static examples = ["$ sk extension update"];
|
|
7
7
|
async run() {
|
|
8
8
|
const cli = new CliServiceFactory().getService();
|
|
9
|
-
const { extensions } = new SetupServiceFactory(this.config).getService();
|
|
9
|
+
const { extensions } = new SetupServiceFactory(this.config, undefined, cli).getService();
|
|
10
10
|
const list = extensions.list();
|
|
11
11
|
if (list.length === 0) {
|
|
12
12
|
cli.writeWarning("No managed extensions to update.");
|
|
@@ -3,7 +3,7 @@ import fs from "node:fs";
|
|
|
3
3
|
import fetch from "node-fetch";
|
|
4
4
|
import * as https from "node:https";
|
|
5
5
|
import { account } from "baqend/cli";
|
|
6
|
-
import {
|
|
6
|
+
import { CliServiceFactory } from "../services/cli/index.js";
|
|
7
7
|
import { CLIParameters, CLIParametersChar } from "../models/cli-parameters.js";
|
|
8
8
|
import * as airports from "./airports_iata.json" with { type: "json" };
|
|
9
9
|
const agent = new https.Agent({
|
|
@@ -33,6 +33,7 @@ export default class FindPops extends Command {
|
|
|
33
33
|
pops = {};
|
|
34
34
|
async run() {
|
|
35
35
|
const { args: { app }, flags: { ips }, } = await this.parse(FindPops);
|
|
36
|
+
const cli = new CliServiceFactory().getService();
|
|
36
37
|
const database = await account.login({ app });
|
|
37
38
|
const ranges = ips.split(",");
|
|
38
39
|
const fetches = [];
|
|
@@ -56,7 +57,7 @@ export default class FindPops extends Command {
|
|
|
56
57
|
}
|
|
57
58
|
}
|
|
58
59
|
fs.writeFileSync("pops.json", JSON.stringify(this.pops));
|
|
59
|
-
|
|
60
|
+
cli.writeSuccess("List of POPs was successfully created in pops.json");
|
|
60
61
|
}
|
|
61
62
|
async getPop(ip, app, token) {
|
|
62
63
|
try {
|
|
@@ -1,13 +1,11 @@
|
|
|
1
1
|
import { Args, Command, Flags } from "@oclif/core";
|
|
2
|
-
import { account } from "baqend/cli";
|
|
3
|
-
import { readLocalFile } from "../helpers/file-helper.js";
|
|
4
2
|
import { CLI_QUERY_DAYS_DESCRIPTION, CLIParameters, } from "../models/cli-parameters.js";
|
|
5
|
-
import { CliServiceFactory } from "../services/cli/index.js";
|
|
6
|
-
import
|
|
3
|
+
import { CliConfig, CliServiceFactory } from "../services/cli/index.js";
|
|
4
|
+
import { ConfigApiContext, ConfigApiServiceFactory, } from "../services/config-api/index.js";
|
|
7
5
|
import { PopConfigFactory, } from "../services/pop-config/index.js";
|
|
8
6
|
import { DiffContext, DiffServiceFactory } from "../services/diff/index.js";
|
|
9
|
-
import { CliConfig } from "../helpers/cli-config.js";
|
|
10
7
|
import path from "node:path";
|
|
8
|
+
import { readFile } from "node:fs/promises";
|
|
11
9
|
import { fileURLToPath } from "node:url";
|
|
12
10
|
const POP_REMAPPING = {
|
|
13
11
|
HHN: "FRA",
|
|
@@ -127,21 +125,19 @@ export default class GeneratePopConfig extends Command {
|
|
|
127
125
|
};
|
|
128
126
|
async createPopPrewarmingCode(popConfig) {
|
|
129
127
|
const __dirname = path.dirname(fileURLToPath(import.meta.url));
|
|
130
|
-
const revalidationTemplate = await
|
|
131
|
-
const pops = await
|
|
128
|
+
const revalidationTemplate = await readFile(path.resolve(__dirname, "../templates/speedKit.Revalidated.js"), "utf-8");
|
|
129
|
+
const pops = await readFile(path.resolve(__dirname, "../templates/pops.js"), "utf-8");
|
|
132
130
|
popConfig = pops + popConfig;
|
|
133
131
|
return revalidationTemplate.replace("{{config}}", popConfig);
|
|
134
132
|
}
|
|
135
133
|
async deployPrewarmingConfig(app, config, deploy) {
|
|
136
134
|
const moduleName = "speedKit.Revalidated";
|
|
137
|
-
const
|
|
138
|
-
const configService = new ConfigApiService(database, app);
|
|
135
|
+
const configService = new ConfigApiServiceFactory(new ConfigApiContext(app)).getService();
|
|
139
136
|
const cliService = new CliServiceFactory().getService();
|
|
140
137
|
const userConfig = new CliConfig(this.config).load();
|
|
141
|
-
const diffService = new DiffServiceFactory(new DiffContext(userConfig.diffExec, userConfig.diffExecTemplate)).getService();
|
|
142
|
-
// new DiffService(cliService);
|
|
138
|
+
const diffService = new DiffServiceFactory(new DiffContext(userConfig.diffExec, userConfig.diffExecTemplate), cliService).getService();
|
|
143
139
|
const popPrewarmingCode = await this.createPopPrewarmingCode(config);
|
|
144
|
-
const remoteConfig = await configService.
|
|
140
|
+
const remoteConfig = await configService.getModule(moduleName);
|
|
145
141
|
const result = await diffService.diffContent(moduleName, remoteConfig, // remoteContent
|
|
146
142
|
popPrewarmingCode);
|
|
147
143
|
const content = result.updatedFile;
|
|
@@ -151,7 +147,7 @@ export default class GeneratePopConfig extends Command {
|
|
|
151
147
|
}
|
|
152
148
|
const doDeploy = !isEqual && (deploy ?? (await cliService.confirm("deploy changes?")));
|
|
153
149
|
if (doDeploy) {
|
|
154
|
-
await configService.
|
|
150
|
+
await configService.setModule(content, moduleName);
|
|
155
151
|
this.log(`Changes for module ${moduleName} were updated successfully`);
|
|
156
152
|
}
|
|
157
153
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Command } from "@oclif/core";
|
|
2
2
|
import { CLI_CUSTOMER_CONFIG, CLIParameters, CLIParametersExample, CLIParametersChar, } from "../models/cli-parameters.js";
|
|
3
3
|
import { OnboardingContext, OnboardingServiceFactory, } from "../services/onboarding/index.js";
|
|
4
|
-
import { CliConfig } from "../
|
|
4
|
+
import { CliConfig } from "../services/cli/index.js";
|
|
5
5
|
export default class Onboarding extends Command {
|
|
6
6
|
static description = "Start a local dev environment for building and testing the Speed Kit configuration";
|
|
7
7
|
static flags = OnboardingContext.flags;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Args, Command, Flags } from "@oclif/core";
|
|
2
2
|
import { CLI_CONFIG_NAME, CLI_CUSTOMER_CONFIG, CLIParameters, CLIParametersChar, CLIParametersExample, } from "../models/cli-parameters.js";
|
|
3
|
-
import { CliConfig } from "../helpers/cli-config.js";
|
|
4
3
|
import { OriginRequestContext, OriginRequestServiceFactory, } from "../services/origin-request/index.js";
|
|
4
|
+
import { CliConfig } from "../services/cli/index.js";
|
|
5
5
|
export default class OriginRequest extends Command {
|
|
6
6
|
static description = "Request a page from origin with the exact headers Speed Kit's server sends for a cache variation, using the app's deployed runtime config";
|
|
7
7
|
static args = {
|
package/dist/commands/pull.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Command } from "@oclif/core";
|
|
2
2
|
import { CLIParametersChar, CLIParameters, CLIParametersExample, CLI_CUSTOMER_CONFIG, CLI_CONFIG_NAME, } from "../models/cli-parameters.js";
|
|
3
3
|
import { PullContext, PullServiceFactory } from "../services/pull/index.js";
|
|
4
|
-
import { CliConfig } from "../
|
|
4
|
+
import { CliConfig } from "../services/cli/index.js";
|
|
5
5
|
export default class Pull extends Command {
|
|
6
6
|
static description = "Pull the specified customer config from orestes";
|
|
7
7
|
static args = CLI_CUSTOMER_CONFIG;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Args, Command, Flags } from "@oclif/core";
|
|
2
2
|
import { CLIParameters, CLIParametersChar } from "../models/cli-parameters.js";
|
|
3
|
-
import {
|
|
3
|
+
import { CliContext, CliServiceFactory } from "../services/cli/index.js";
|
|
4
4
|
import { CONFIRMATION_THRESHOLD, DROPPING_TYPES, REVALIDATE_TYPES, RevalidateContext, RevalidateFactory, } from "../services/revalidate/index.js";
|
|
5
5
|
const SAMPLE_SIZE = 10;
|
|
6
6
|
export default class Revalidate extends Command {
|
|
@@ -57,7 +57,8 @@ export default class Revalidate extends Command {
|
|
|
57
57
|
async run() {
|
|
58
58
|
const { args, flags } = await this.parse(Revalidate);
|
|
59
59
|
const app = args[CLIParameters.AppName];
|
|
60
|
-
const
|
|
60
|
+
const cli = new CliServiceFactory(new CliContext(flags[CLIParameters.Quiet])).getService();
|
|
61
|
+
const service = new RevalidateFactory(new RevalidateContext(app, flags[CLIParameters.Quiet]), cli).getService();
|
|
61
62
|
const patterns = flags["pattern"] ?? [];
|
|
62
63
|
const prefixes = flags["prefix"] ?? [];
|
|
63
64
|
if (!patterns.length && !prefixes.length) {
|
|
@@ -91,7 +92,7 @@ export default class Revalidate extends Command {
|
|
|
91
92
|
if (DROPPING_TYPES.has(type) &&
|
|
92
93
|
preview.count > CONFIRMATION_THRESHOLD &&
|
|
93
94
|
!flags["yes"]) {
|
|
94
|
-
if (
|
|
95
|
+
if (cli.nonInteractive) {
|
|
95
96
|
this.error(`${preview.count} assets exceed the ${CONFIRMATION_THRESHOLD}-asset threshold, and this shell cannot ask`, {
|
|
96
97
|
exit: 1,
|
|
97
98
|
suggestions: [
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Args, Command, Flags } from "@oclif/core";
|
|
2
2
|
import fetch from "node-fetch";
|
|
3
3
|
import { CLIParameters, CLIParametersExample, CLIParametersChar, } from "../models/cli-parameters.js";
|
|
4
|
-
import {
|
|
4
|
+
import { CliServiceFactory } from "../services/cli/index.js";
|
|
5
5
|
export default class WptLauncher extends Command {
|
|
6
6
|
static description = "Analyze the performance impact that Speed Kit has compared to the original version.";
|
|
7
7
|
static args = {
|
|
@@ -35,6 +35,7 @@ export default class WptLauncher extends Command {
|
|
|
35
35
|
static localhostUrl = "http://localhost:8888/orange.html";
|
|
36
36
|
async run() {
|
|
37
37
|
const { args: { urls, testId }, flags: { group, mobile, cookies }, } = await this.parse(WptLauncher);
|
|
38
|
+
const cli = new CliServiceFactory().getService();
|
|
38
39
|
const resourceOrigin = this.getResourceOrigin(this.allResourceUrls(urls));
|
|
39
40
|
let script = `setViewportSize ${this.getViewPortSize(this.isMobile(mobile))}
|
|
40
41
|
navigate ${resourceOrigin}/wrapper-sw.js
|
|
@@ -48,7 +49,7 @@ export default class WptLauncher extends Command {
|
|
|
48
49
|
const postscript = (await this.postScript(script));
|
|
49
50
|
const currentTestIdUrl = `http://wpt.baqend.com/results.php?test=${postscript.wptTestId}`;
|
|
50
51
|
if (!currentTestIdUrl) {
|
|
51
|
-
|
|
52
|
+
cli.writeError("Getting testId failed, " + currentTestIdUrl);
|
|
52
53
|
process.exit(1);
|
|
53
54
|
}
|
|
54
55
|
this.log("testUrl: ", currentTestIdUrl);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { expect } from "chai";
|
|
2
2
|
import { describe, it } from "mocha";
|
|
3
|
-
import { chromeFeatureName, findChromeFeatureFindings, findDuplicateChromeFlags, formatChromeFeatureFinding, formatChromeFlagDuplicate, mergeChromeFeatureFlags, parseChromeFlags, } from "
|
|
3
|
+
import { chromeFeatureName, findChromeFeatureFindings, findDuplicateChromeFlags, formatChromeFeatureFinding, formatChromeFlagDuplicate, mergeChromeFeatureFlags, parseChromeFlags, } from "../chrome-flags.js";
|
|
4
4
|
describe("parseChromeFlags", () => {
|
|
5
5
|
it("keeps an array from config.json, trimmed and without empty entries", () => {
|
|
6
6
|
expect(parseChromeFlags([" --foo ", "", "--bar=1", 3])).to.deep.equal([
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { expect } from "chai";
|
|
2
2
|
import { describe, beforeEach, afterEach, it } from "mocha";
|
|
3
3
|
import http from "node:http";
|
|
4
|
-
import { applyOriginProxy, chromeProxyFlag, findProxyInChromeFlags, originFetch, parseSocksProxy, PROXY_ENVIRONMENT_VARIABLE, resetOriginProxy, setOriginProxy, withOriginProxyFlag, } from "
|
|
4
|
+
import { applyOriginProxy, chromeProxyFlag, findProxyInChromeFlags, originFetch, parseSocksProxy, PROXY_ENVIRONMENT_VARIABLE, resetOriginProxy, setOriginProxy, withOriginProxyFlag, } from "../origin-proxy.js";
|
|
5
5
|
/** Sets or clears the enforcing environment variable. */
|
|
6
6
|
function setEnvironmentProxy(value) {
|
|
7
7
|
if (value === undefined) {
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { CliConfig } from "../../helpers/cli-config.js";
|
|
2
1
|
import { SetupServiceFactory } from "../../services/setup/index.js";
|
|
3
|
-
import {
|
|
2
|
+
import { CliConfig, CliServiceFactory } from "../../services/cli/index.js";
|
|
4
3
|
// commands the hook must never interfere with (setup itself, help, plugins)
|
|
5
4
|
const IGNORED_PREFIXES = ["config:setup", "help", "autocomplete", "plugins"];
|
|
6
5
|
/**
|
|
@@ -10,7 +9,8 @@ const IGNORED_PREFIXES = ["config:setup", "help", "autocomplete", "plugins"];
|
|
|
10
9
|
*/
|
|
11
10
|
const hook = async function (opts) {
|
|
12
11
|
try {
|
|
13
|
-
|
|
12
|
+
const cli = new CliServiceFactory().getService();
|
|
13
|
+
if (cli.nonInteractive) {
|
|
14
14
|
return;
|
|
15
15
|
}
|
|
16
16
|
const id = opts.id ?? "";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { expect } from "chai";
|
|
2
2
|
import { after, describe, it } from "mocha";
|
|
3
3
|
import { getDefaultResultOrder, setDefaultResultOrder } from "node:dns";
|
|
4
|
-
import hook from "
|
|
4
|
+
import hook from "../../init/dns-result-order.js";
|
|
5
5
|
describe("dns-result-order hook", () => {
|
|
6
6
|
const previousOrder = getDefaultResultOrder();
|
|
7
7
|
after(() => {
|
|
@@ -2,7 +2,7 @@ import { expect } from "chai";
|
|
|
2
2
|
import { after, before, describe, it } from "mocha";
|
|
3
3
|
import tls from "node:tls";
|
|
4
4
|
import { Agent, getGlobalDispatcher, setGlobalDispatcher } from "undici";
|
|
5
|
-
import hook from "
|
|
5
|
+
import hook from "../../init/http1-global-dispatcher.js";
|
|
6
6
|
describe("http1-global-dispatcher hook", () => {
|
|
7
7
|
const previousDispatcher = getGlobalDispatcher();
|
|
8
8
|
let server;
|
|
@@ -6,7 +6,6 @@ export declare enum CLIParameters {
|
|
|
6
6
|
Catalog = "catalog",
|
|
7
7
|
Cookies = "cookies",
|
|
8
8
|
Count = "count",
|
|
9
|
-
CreateTests = "CreateTests",
|
|
10
9
|
CustomerPath = "customerPath",
|
|
11
10
|
CustomersDirectory = "customersDirectory",
|
|
12
11
|
Days = "days",
|
|
@@ -48,7 +47,6 @@ export declare enum CLIParametersChar {
|
|
|
48
47
|
ConfigName = "c",
|
|
49
48
|
ContentTypes = "c",
|
|
50
49
|
Cookies = "c",
|
|
51
|
-
CreateTests = "t",
|
|
52
50
|
CustomerPath = "p",
|
|
53
51
|
CustomersDirectory = "d",
|
|
54
52
|
Days = "d",
|
|
@@ -14,7 +14,6 @@ export var CLIParameters;
|
|
|
14
14
|
CLIParameters["Catalog"] = "catalog";
|
|
15
15
|
CLIParameters["Cookies"] = "cookies";
|
|
16
16
|
CLIParameters["Count"] = "count";
|
|
17
|
-
CLIParameters["CreateTests"] = "CreateTests";
|
|
18
17
|
CLIParameters["CustomerPath"] = "customerPath";
|
|
19
18
|
CLIParameters["CustomersDirectory"] = "customersDirectory";
|
|
20
19
|
CLIParameters["Days"] = "days";
|
|
@@ -58,7 +57,6 @@ export var CLIParametersChar;
|
|
|
58
57
|
CLIParametersChar["ConfigName"] = "c";
|
|
59
58
|
CLIParametersChar["ContentTypes"] = "c";
|
|
60
59
|
CLIParametersChar["Cookies"] = "c";
|
|
61
|
-
CLIParametersChar["CreateTests"] = "t";
|
|
62
60
|
CLIParametersChar["CustomerPath"] = "p";
|
|
63
61
|
CLIParametersChar["CustomersDirectory"] = "d";
|
|
64
62
|
CLIParametersChar["Days"] = "d";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { parse } from "@oclif/core/parser";
|
|
2
2
|
import { expect } from "chai";
|
|
3
3
|
import { describe, it } from "mocha";
|
|
4
|
-
import { CLI_QUERY_VARIATIONS } from "
|
|
4
|
+
import { CLI_QUERY_VARIATIONS } from "../cli-parameters.js";
|
|
5
5
|
async function parseFlags(argv) {
|
|
6
6
|
const { flags } = await parse(argv, { flags: CLI_QUERY_VARIATIONS });
|
|
7
7
|
return flags;
|
|
@@ -1,8 +1,10 @@
|
|
|
1
|
+
import { CliServiceInterface } from "../cli/index.js";
|
|
1
2
|
import { AthenaService } from "./athena-query-service.js";
|
|
2
3
|
export declare class AthenaServiceFactory {
|
|
3
4
|
private app?;
|
|
4
5
|
private workgroup?;
|
|
5
6
|
private catalog?;
|
|
7
|
+
private cli?;
|
|
6
8
|
service?: AthenaService;
|
|
7
9
|
/**
|
|
8
10
|
* @param app - the app to query. Enables the Baqend native query path (app
|
|
@@ -14,7 +16,7 @@ export declare class AthenaServiceFactory {
|
|
|
14
16
|
* told so it can recognise the prefix, not so it can use it: the server
|
|
15
17
|
* resolves the catalog itself.
|
|
16
18
|
*/
|
|
17
|
-
constructor(app?: string, workgroup?: string, catalog?: string);
|
|
19
|
+
constructor(app?: string, workgroup?: string, catalog?: string, cli?: CliServiceInterface);
|
|
18
20
|
getService(): Promise<AthenaService>;
|
|
19
21
|
/**
|
|
20
22
|
* Prefer direct AWS Athena whenever AWS credentials are present — they
|
|
@@ -10,6 +10,7 @@ export class AthenaServiceFactory {
|
|
|
10
10
|
app;
|
|
11
11
|
workgroup;
|
|
12
12
|
catalog;
|
|
13
|
+
cli;
|
|
13
14
|
service;
|
|
14
15
|
/**
|
|
15
16
|
* @param app - the app to query. Enables the Baqend native query path (app
|
|
@@ -21,10 +22,11 @@ export class AthenaServiceFactory {
|
|
|
21
22
|
* told so it can recognise the prefix, not so it can use it: the server
|
|
22
23
|
* resolves the catalog itself.
|
|
23
24
|
*/
|
|
24
|
-
constructor(app, workgroup, catalog) {
|
|
25
|
+
constructor(app, workgroup, catalog, cli) {
|
|
25
26
|
this.app = app;
|
|
26
27
|
this.workgroup = workgroup;
|
|
27
28
|
this.catalog = catalog;
|
|
29
|
+
this.cli = cli;
|
|
28
30
|
}
|
|
29
31
|
async getService() {
|
|
30
32
|
if (!this.service) {
|
|
@@ -39,7 +41,7 @@ export class AthenaServiceFactory {
|
|
|
39
41
|
* path (which needs an `app`).
|
|
40
42
|
*/
|
|
41
43
|
async createService() {
|
|
42
|
-
const cli = new CliServiceFactory().getService();
|
|
44
|
+
const cli = this.cli ?? new CliServiceFactory().getService();
|
|
43
45
|
const client = await this.tryGetAthenaClient();
|
|
44
46
|
if (client) {
|
|
45
47
|
cli.comment(this.workgroup
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { GetQueryResultsCommand, StartQueryExecutionCommand, } from "@aws-sdk/client-athena";
|
|
2
2
|
import { expect } from "chai";
|
|
3
3
|
import { describe, it } from "mocha";
|
|
4
|
-
import { AwsAthenaService } from "
|
|
4
|
+
import { AwsAthenaService } from "../athena-service.js";
|
|
5
5
|
/** The cli calls the service makes, in the order it made them. */
|
|
6
6
|
function recordingCli() {
|
|
7
7
|
const calls = [];
|
package/dist/services/athena/{baqend-athena-service.spec.js → spec/baqend-athena-service.spec.js}
RENAMED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { expect } from "chai";
|
|
2
2
|
import { describe, it } from "mocha";
|
|
3
|
-
import { AthenaBucket } from "
|
|
4
|
-
import { BaqendAthenaService } from "
|
|
3
|
+
import { AthenaBucket } from "../athena-query-service.js";
|
|
4
|
+
import { BaqendAthenaService } from "../baqend-athena-service.js";
|
|
5
5
|
const cli = {
|
|
6
6
|
failAction: () => undefined,
|
|
7
7
|
startAction: () => undefined,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { UserCliConfig } from "
|
|
1
|
+
import { UserCliConfig } from "../cli/index.js";
|
|
2
2
|
import { directOriginFetch } from "../../helpers/origin-proxy.js";
|
|
3
3
|
import { BrowserFetchLogger, BrowserOriginFetcher } from "./browser-origin-fetcher.js";
|
|
4
4
|
/**
|