@speedkit/cli 3.43.1 → 4.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +38 -0
- package/README.md +6 -6
- package/bin/dev +2 -15
- package/bin/run +2 -2
- package/dist/commands/build-parameter-query.d.ts +3 -3
- package/dist/commands/build-parameter-query.js +12 -15
- package/dist/commands/build-prewarm-query.d.ts +4 -4
- package/dist/commands/build-prewarm-query.js +13 -16
- package/dist/commands/config/edit.js +7 -11
- package/dist/commands/deploy.d.ts +3 -5
- package/dist/commands/deploy.js +12 -16
- package/dist/commands/diff-url-parameters.d.ts +3 -3
- package/dist/commands/diff-url-parameters.js +27 -30
- package/dist/commands/document-handler.d.ts +4 -4
- package/dist/commands/document-handler.js +13 -17
- package/dist/commands/find-pops.d.ts +2 -2
- package/dist/commands/find-pops.js +22 -24
- package/dist/commands/generate-customer-config.d.ts +2 -2
- package/dist/commands/generate-customer-config.js +13 -16
- package/dist/commands/generate-pop-config.d.ts +7 -7
- package/dist/commands/generate-pop-config.js +32 -41
- package/dist/commands/login.d.ts +1 -1
- package/dist/commands/login.js +13 -17
- package/dist/commands/onboarding.d.ts +3 -5
- package/dist/commands/onboarding.js +10 -13
- package/dist/commands/prewarm.d.ts +9 -9
- package/dist/commands/prewarm.js +25 -28
- package/dist/commands/pull.d.ts +3 -3
- package/dist/commands/pull.js +11 -14
- package/dist/commands/wpt-launcher.d.ts +7 -7
- package/dist/commands/wpt-launcher.js +21 -26
- package/dist/helpers/array-helper.js +1 -4
- package/dist/helpers/build-query-helper.js +5 -12
- package/dist/helpers/cli-config.d.ts +3 -3
- package/dist/helpers/cli-config.js +11 -16
- package/dist/helpers/customer-config.d.ts +4 -8
- package/dist/helpers/customer-config.js +18 -23
- package/dist/helpers/evaluate-speed-kit-config.d.ts +1 -1
- package/dist/helpers/evaluate-speed-kit-config.js +42 -26
- package/dist/helpers/file-helper.js +8 -13
- package/dist/helpers/get-parsed-config.d.ts +1 -1
- package/dist/helpers/get-parsed-config.js +6 -10
- package/dist/helpers/html-format-helper.js +3 -6
- package/dist/helpers/is-directory.js +3 -6
- package/dist/helpers/is-file.js +3 -6
- package/dist/helpers/logging-helper.js +7 -13
- package/dist/helpers/normalize.js +10 -17
- package/dist/helpers/race.d.ts +1 -1
- package/dist/helpers/race.js +3 -9
- package/dist/helpers/safe.js +1 -4
- package/dist/helpers/scrape.d.ts +1 -1
- package/dist/helpers/scrape.js +3 -7
- package/dist/helpers/site-analyzer.js +5 -9
- package/dist/helpers/speed-kit-rule-to-reg-exp.js +1 -4
- package/dist/models/cli-parameters.d.ts +4 -4
- package/dist/models/cli-parameters.js +13 -16
- package/dist/models/files.js +1 -4
- package/dist/models/install.js +1 -2
- package/dist/models/os.js +1 -4
- package/dist/services/athena/athena-service-factory.d.ts +1 -1
- package/dist/services/athena/athena-service-factory.js +15 -19
- package/dist/services/athena/athena-service-model.js +2 -5
- package/dist/services/athena/athena-service.d.ts +1 -1
- package/dist/services/athena/athena-service.js +18 -23
- package/dist/services/athena/error/athena-query-error.d.ts +1 -1
- package/dist/services/athena/error/athena-query-error.js +2 -7
- package/dist/services/athena/error/fetch-credentials-error.d.ts +1 -1
- package/dist/services/athena/error/fetch-credentials-error.js +2 -7
- package/dist/services/athena/index.d.ts +4 -4
- package/dist/services/athena/index.js +4 -7
- package/dist/services/bundler/bundle-service-factory.d.ts +3 -1
- package/dist/services/bundler/bundle-service-factory.js +7 -7
- package/dist/services/bundler/bundle-service.d.ts +9 -12
- package/dist/services/bundler/bundle-service.js +42 -32
- package/dist/services/bundler/error/bundle-fetch-error.d.ts +1 -1
- package/dist/services/bundler/error/bundle-fetch-error.js +2 -7
- package/dist/services/bundler/error/bundle-resolve-error.d.ts +1 -1
- package/dist/services/bundler/error/bundle-resolve-error.js +2 -7
- package/dist/services/bundler/index.d.ts +2 -2
- package/dist/services/bundler/index.js +2 -5
- package/dist/services/cli/cli-service-factory.d.ts +2 -2
- package/dist/services/cli/cli-service-factory.js +6 -10
- package/dist/services/cli/cli-service-model.d.ts +21 -6
- package/dist/services/cli/cli-service-model.js +3 -7
- package/dist/services/cli/cli-service.d.ts +10 -8
- package/dist/services/cli/cli-service.js +64 -61
- package/dist/services/cli/error/cli-type-error.js +1 -4
- package/dist/services/cli/index.d.ts +3 -3
- package/dist/services/cli/index.js +3 -6
- package/dist/services/config-api/client.d.ts +2 -2
- package/dist/services/config-api/client.js +29 -34
- package/dist/services/config-api/config-api-factory.d.ts +2 -2
- package/dist/services/config-api/config-api-factory.js +15 -20
- package/dist/services/config-api/config-api-model.d.ts +2 -2
- package/dist/services/config-api/config-api-model.js +1 -5
- package/dist/services/config-api/config-api-service.d.ts +2 -2
- package/dist/services/config-api/config-api-service.js +1 -5
- package/dist/services/config-api/entity-manager-factory.js +3 -7
- package/dist/services/config-api/error/json-response-error.d.ts +1 -1
- package/dist/services/config-api/error/json-response-error.js +2 -7
- package/dist/services/config-api/error/login-error.d.ts +1 -1
- package/dist/services/config-api/error/login-error.js +2 -7
- package/dist/services/config-api/error/orestes-api-error.d.ts +1 -1
- package/dist/services/config-api/error/orestes-api-error.js +2 -7
- package/dist/services/config-api/index.d.ts +3 -3
- package/dist/services/config-api/index.js +3 -6
- package/dist/services/config-api-service.d.ts +1 -1
- package/dist/services/config-api-service.js +6 -11
- package/dist/services/customer-config/customer-config-service-context.js +3 -7
- package/dist/services/customer-config/customer-config-service-factory.d.ts +1 -1
- package/dist/services/customer-config/customer-config-service-factory.js +6 -10
- package/dist/services/customer-config/customer-config-service-model.js +6 -9
- package/dist/services/customer-config/customer-config-service.d.ts +3 -3
- package/dist/services/customer-config/customer-config-service.js +55 -55
- package/dist/services/customer-config/index.d.ts +4 -4
- package/dist/services/customer-config/index.js +4 -7
- package/dist/services/deploy/builder/install-resource-builder.d.ts +2 -2
- package/dist/services/deploy/builder/install-resource-builder.js +3 -7
- package/dist/services/deploy/checks/post-deploy/deprecated-deployment-detection-check.d.ts +4 -4
- package/dist/services/deploy/checks/post-deploy/deprecated-deployment-detection-check.js +19 -24
- package/dist/services/deploy/checks/post-deploy/revalidated-module-check.d.ts +3 -3
- package/dist/services/deploy/checks/post-deploy/revalidated-module-check.js +10 -14
- package/dist/services/deploy/checks/post-deploy/save-files-check.d.ts +3 -3
- package/dist/services/deploy/checks/post-deploy/save-files-check.js +8 -12
- package/dist/services/deploy/checks/pre-deploy/device-detection-changed-check.d.ts +3 -3
- package/dist/services/deploy/checks/pre-deploy/device-detection-changed-check.js +14 -20
- package/dist/services/deploy/checks/pre-deploy/split-change-check.d.ts +3 -3
- package/dist/services/deploy/checks/pre-deploy/split-change-check.js +19 -20
- package/dist/services/deploy/context/deploy-context.d.ts +2 -2
- package/dist/services/deploy/context/deploy-context.js +10 -14
- package/dist/services/deploy/deploy-service-factory.d.ts +3 -3
- package/dist/services/deploy/deploy-service-factory.js +36 -40
- package/dist/services/deploy/deploy-service-model.d.ts +10 -10
- package/dist/services/deploy/deploy-service-model.js +1 -2
- package/dist/services/deploy/deploy-service.d.ts +4 -4
- package/dist/services/deploy/deploy-service.js +10 -15
- package/dist/services/deploy/error/check-module-file-error.d.ts +1 -1
- package/dist/services/deploy/error/check-module-file-error.js +2 -7
- package/dist/services/deploy/error/deploy-install-resource-error.d.ts +1 -1
- package/dist/services/deploy/error/deploy-install-resource-error.js +2 -7
- package/dist/services/deploy/error/deploy-module-file-error.d.ts +1 -1
- package/dist/services/deploy/error/deploy-module-file-error.js +2 -7
- package/dist/services/deploy/error/deploy-server-config-error.d.ts +1 -1
- package/dist/services/deploy/error/deploy-server-config-error.js +2 -7
- package/dist/services/deploy/error/evaluate-sk-config-error.d.ts +1 -1
- package/dist/services/deploy/error/evaluate-sk-config-error.js +2 -7
- package/dist/services/deploy/error/file-handler-error.d.ts +1 -1
- package/dist/services/deploy/error/file-handler-error.js +2 -7
- package/dist/services/deploy/error/post-deploy-deployment-detection-error.d.ts +1 -1
- package/dist/services/deploy/error/post-deploy-deployment-detection-error.js +2 -7
- package/dist/services/deploy/error/safe-file-error.d.ts +1 -1
- package/dist/services/deploy/error/safe-file-error.js +2 -7
- package/dist/services/deploy/handler/customer-config-handler.d.ts +6 -6
- package/dist/services/deploy/handler/customer-config-handler.js +7 -12
- package/dist/services/deploy/handler/install-resource-handler.d.ts +7 -7
- package/dist/services/deploy/handler/install-resource-handler.js +22 -27
- package/dist/services/deploy/handler/install-resource-modifier/deleted-file-check.d.ts +4 -4
- package/dist/services/deploy/handler/install-resource-modifier/deleted-file-check.js +1 -4
- package/dist/services/deploy/handler/module-handler.d.ts +6 -6
- package/dist/services/deploy/handler/module-handler.js +12 -18
- package/dist/services/deploy/handler/server-config-handler.d.ts +5 -5
- package/dist/services/deploy/handler/server-config-handler.js +10 -14
- package/dist/services/deploy/interface/deploy-handler-interface.d.ts +1 -1
- package/dist/services/deploy/interface/deploy-handler-interface.js +1 -2
- package/dist/services/deploy/interface/install-configs.js +1 -2
- package/dist/services/deploy/interface/install-resource-processor-interface.d.ts +1 -1
- package/dist/services/deploy/interface/install-resource-processor-interface.js +1 -2
- package/dist/services/deploy/interface/install.d.ts +1 -1
- package/dist/services/deploy/interface/install.js +1 -2
- package/dist/services/deploy/interface/runtime-modifier.d.ts +1 -1
- package/dist/services/deploy/interface/runtime-modifier.js +1 -2
- package/dist/services/deploy/interface/validate-origins-response.js +1 -2
- package/dist/services/diff/diff-model.js +1 -5
- package/dist/services/diff/diff-service-factory.d.ts +1 -1
- package/dist/services/diff/diff-service-factory.js +6 -10
- package/dist/services/diff/diff-service.d.ts +1 -1
- package/dist/services/diff/diff-service.js +19 -24
- package/dist/services/diff/index.d.ts +3 -3
- package/dist/services/diff/index.js +3 -6
- package/dist/services/diff-service.d.ts +1 -1
- package/dist/services/diff-service.js +16 -21
- package/dist/services/document-handler-runtime/context/document-handler-runtime-context.js +30 -34
- package/dist/services/document-handler-runtime/document-handler-runtime-service.d.ts +3 -3
- package/dist/services/document-handler-runtime/document-handler-runtime-service.js +38 -42
- package/dist/services/document-handler-runtime/document-handler-server.d.ts +7 -11
- package/dist/services/document-handler-runtime/document-handler-server.js +77 -59
- package/dist/services/document-handler-runtime/error/required-file-not-found-error.js +1 -4
- package/dist/services/document-handler-runtime/factory/document-handler-runtime-service-factory.d.ts +5 -5
- package/dist/services/document-handler-runtime/factory/document-handler-runtime-service-factory.js +42 -46
- package/dist/services/document-handler-runtime/interface/document-handler-runtime-config-interface.js +1 -4
- package/dist/services/document-handler-runtime/interface/template-context-interface.d.ts +2 -3
- package/dist/services/document-handler-runtime/interface/template-context-interface.js +1 -2
- package/dist/services/document-handler-runtime/interface/template-interface.d.ts +2 -2
- package/dist/services/document-handler-runtime/interface/template-interface.js +1 -2
- package/dist/services/document-handler-runtime/interface/template-parameter-interface.js +1 -2
- package/dist/services/document-handler-runtime/server/document-handler-response.d.ts +1 -3
- package/dist/services/document-handler-runtime/server/document-handler-response.js +1 -5
- package/dist/services/document-handler-runtime/server/request.d.ts +4 -10
- package/dist/services/document-handler-runtime/server/request.js +1 -5
- package/dist/services/document-handler-runtime/templates/abstract-template.d.ts +3 -3
- package/dist/services/document-handler-runtime/templates/abstract-template.js +3 -7
- package/dist/services/document-handler-runtime/templates/database-mock.d.ts +2 -2
- package/dist/services/document-handler-runtime/templates/database-mock.js +2 -6
- package/dist/services/document-handler-runtime/templates/execute-document-handler.d.ts +2 -2
- package/dist/services/document-handler-runtime/templates/execute-document-handler.js +2 -6
- package/dist/services/document-handler-runtime/templates/orestes-mock.d.ts +2 -2
- package/dist/services/document-handler-runtime/templates/orestes-mock.js +2 -6
- package/dist/services/document-handler-runtime/templates/package-json.d.ts +3 -5
- package/dist/services/document-handler-runtime/templates/package-json.js +2 -6
- package/dist/services/document-handler-runtime/templates/test.d.ts +2 -2
- package/dist/services/document-handler-runtime/templates/test.js +2 -6
- package/dist/services/error-handling/error/application-error.d.ts +1 -1
- package/dist/services/error-handling/error/application-error.js +1 -5
- package/dist/services/error-handling/error/config-file-error.d.ts +1 -1
- package/dist/services/error-handling/error/config-file-error.js +2 -7
- package/dist/services/error-handling/error/connection-error.d.ts +1 -1
- package/dist/services/error-handling/error/connection-error.js +2 -7
- package/dist/services/integration-api/error/customer-config-error.d.ts +1 -1
- package/dist/services/integration-api/error/customer-config-error.js +2 -5
- package/dist/services/integration-api/error/customer-config-legacy-error.d.ts +1 -1
- package/dist/services/integration-api/error/customer-config-legacy-error.js +2 -6
- package/dist/services/integration-api/error/invalid-config-format-error.d.ts +1 -1
- package/dist/services/integration-api/error/invalid-config-format-error.js +4 -7
- package/dist/services/integration-api/error/mandatory-file-missing-error.d.ts +1 -1
- package/dist/services/integration-api/error/mandatory-file-missing-error.js +2 -6
- package/dist/services/integration-api/error/origin-error.d.ts +1 -1
- package/dist/services/integration-api/error/origin-error.js +2 -5
- package/dist/services/integration-api/error/read-files-error.d.ts +1 -1
- package/dist/services/integration-api/error/read-files-error.js +2 -7
- package/dist/services/integration-api/external/external-file-reader.d.ts +1 -1
- package/dist/services/integration-api/external/external-file-reader.js +9 -14
- package/dist/services/integration-api/file-list.d.ts +1 -1
- package/dist/services/integration-api/file-list.js +8 -11
- package/dist/services/integration-api/file-reader.js +11 -15
- package/dist/services/integration-api/file-writer.js +4 -8
- package/dist/services/integration-api/handler/customer-config-handler.d.ts +5 -5
- package/dist/services/integration-api/handler/customer-config-handler.js +17 -21
- package/dist/services/integration-api/handler/file-handler.d.ts +2 -2
- package/dist/services/integration-api/handler/file-handler.js +1 -4
- package/dist/services/integration-api/handler/install-resource-handler.d.ts +2 -2
- package/dist/services/integration-api/handler/install-resource-handler.js +6 -10
- package/dist/services/integration-api/handler/module-handler.d.ts +2 -2
- package/dist/services/integration-api/handler/module-handler.js +4 -8
- package/dist/services/integration-api/handler/server-config-handler.d.ts +2 -2
- package/dist/services/integration-api/handler/server-config-handler.js +4 -8
- package/dist/services/integration-api/index.d.ts +3 -3
- package/dist/services/integration-api/index.js +3 -6
- package/dist/services/integration-api/integration-api-factory.d.ts +3 -3
- package/dist/services/integration-api/integration-api-factory.js +23 -28
- package/dist/services/integration-api/integration-api-model.d.ts +17 -19
- package/dist/services/integration-api/integration-api-model.js +16 -21
- package/dist/services/integration-api/integration-api-service.d.ts +5 -5
- package/dist/services/integration-api/integration-api-service.js +6 -12
- package/dist/services/integration-api/spec/customer-config-validator.spec.js +29 -32
- package/dist/services/integration-api/spec/file-list.spec.js +107 -110
- package/dist/services/integration-api/spec/file-reader.spec.js +27 -30
- package/dist/services/integration-api/spec/file-writer.spec.js +34 -37
- package/dist/services/integration-api/spec/integration-api-service.spec.js +42 -45
- package/dist/services/integration-api/spec/mandatory-files-validator.spec.js +48 -51
- package/dist/services/integration-api/struct/customer-config-file.d.ts +1 -1
- package/dist/services/integration-api/struct/customer-config-file.js +10 -15
- package/dist/services/integration-api/struct/customer-config.d.ts +4 -8
- package/dist/services/integration-api/struct/customer-config.js +5 -10
- package/dist/services/integration-api/struct/file.d.ts +1 -1
- package/dist/services/integration-api/struct/file.js +9 -13
- package/dist/services/integration-api/struct/install-resource-file.d.ts +2 -2
- package/dist/services/integration-api/struct/install-resource-file.js +4 -8
- package/dist/services/integration-api/struct/module-file.d.ts +2 -2
- package/dist/services/integration-api/struct/module-file.js +4 -8
- package/dist/services/integration-api/struct/ro-file.d.ts +1 -1
- package/dist/services/integration-api/struct/ro-file.js +1 -5
- package/dist/services/integration-api/struct/server-config-file.d.ts +2 -2
- package/dist/services/integration-api/struct/server-config-file.js +4 -8
- package/dist/services/integration-api/struct/virtual-file.d.ts +1 -1
- package/dist/services/integration-api/struct/virtual-file.js +3 -7
- package/dist/services/integration-api/validator/customer-config-validator.d.ts +1 -1
- package/dist/services/integration-api/validator/customer-config-validator.js +8 -12
- package/dist/services/integration-api/validator/mandatory-files-validator.d.ts +2 -2
- package/dist/services/integration-api/validator/mandatory-files-validator.js +4 -8
- package/dist/services/integration-api/virtual/external-recipe.d.ts +2 -2
- package/dist/services/integration-api/virtual/external-recipe.js +1 -5
- package/dist/services/integration-api/virtual/static-recipe.d.ts +1 -1
- package/dist/services/integration-api/virtual/static-recipe.js +1 -5
- package/dist/services/integration-api/virtual/virtual-file-handler.d.ts +2 -2
- package/dist/services/integration-api/virtual/virtual-file-handler.js +8 -13
- package/dist/services/onboarding/browser/abort-response.js +1 -5
- package/dist/services/onboarding/browser/baqend-response.d.ts +1 -1
- package/dist/services/onboarding/browser/baqend-response.js +1 -5
- package/dist/services/onboarding/browser/config/browser-config.d.ts +1 -1
- package/dist/services/onboarding/browser/config/browser-config.js +15 -20
- package/dist/services/onboarding/browser/executable/executable-validator.d.ts +2 -2
- package/dist/services/onboarding/browser/executable/executable-validator.js +12 -17
- package/dist/services/onboarding/browser/extension/devtools-extension-api.d.ts +1 -1
- package/dist/services/onboarding/browser/extension/devtools-extension-api.js +1 -5
- package/dist/services/onboarding/browser/extension/extension-downloader.d.ts +2 -2
- package/dist/services/onboarding/browser/extension/extension-downloader.js +24 -30
- package/dist/services/onboarding/browser/extension/extension-validator.d.ts +3 -3
- package/dist/services/onboarding/browser/extension/extension-validator.js +18 -23
- package/dist/services/onboarding/browser/origin-response.d.ts +1 -1
- package/dist/services/onboarding/browser/origin-response.js +1 -5
- package/dist/services/onboarding/config-renderer/install-file-recipe.d.ts +2 -2
- package/dist/services/onboarding/config-renderer/install-file-recipe.js +1 -5
- package/dist/services/onboarding/config-renderer/speed-kit-install-context.d.ts +3 -3
- package/dist/services/onboarding/config-renderer/speed-kit-install-context.js +8 -11
- package/dist/services/onboarding/dashboard/diff-against-current-page.d.ts +4 -4
- package/dist/services/onboarding/dashboard/diff-against-current-page.js +9 -14
- package/dist/services/onboarding/dashboard/index.d.ts +7 -7
- package/dist/services/onboarding/dashboard/index.js +8 -13
- package/dist/services/onboarding/dashboard/parameter-query-builder.d.ts +1 -1
- package/dist/services/onboarding/dashboard/parameter-query-builder.js +9 -13
- package/dist/services/onboarding/dashboard/request-diff-service.d.ts +3 -3
- package/dist/services/onboarding/dashboard/request-diff-service.js +14 -19
- package/dist/services/onboarding/error/browser-extension-error.d.ts +1 -1
- package/dist/services/onboarding/error/browser-extension-error.js +1 -5
- package/dist/services/onboarding/error/document-handler-transform-error.js +1 -5
- package/dist/services/onboarding/error/unsupported-encoding-error.d.ts +1 -1
- package/dist/services/onboarding/error/unsupported-encoding-error.js +2 -7
- package/dist/services/onboarding/error/validate-extension-error.d.ts +1 -1
- package/dist/services/onboarding/error/validate-extension-error.js +2 -7
- package/dist/services/onboarding/error/vm-empty-response-error.d.ts +1 -1
- package/dist/services/onboarding/error/vm-empty-response-error.js +2 -7
- package/dist/services/onboarding/error/vm-error.d.ts +1 -1
- package/dist/services/onboarding/error/vm-error.js +2 -7
- package/dist/services/onboarding/fetch-event-handler.d.ts +4 -4
- package/dist/services/onboarding/fetch-event-handler.js +19 -25
- package/dist/services/onboarding/fetch-events/customer-domain-document-response.d.ts +4 -4
- package/dist/services/onboarding/fetch-events/customer-domain-document-response.js +15 -20
- package/dist/services/onboarding/fetch-events/customer-service-worker-js.d.ts +3 -3
- package/dist/services/onboarding/fetch-events/customer-service-worker-js.js +4 -8
- package/dist/services/onboarding/fetch-events/dashboard-request.d.ts +3 -3
- package/dist/services/onboarding/fetch-events/dashboard-request.js +1 -5
- package/dist/services/onboarding/fetch-events/speed-kit-asset-request.d.ts +5 -5
- package/dist/services/onboarding/fetch-events/speed-kit-asset-request.js +1 -5
- package/dist/services/onboarding/fetch-events/speed-kit-install-html.d.ts +4 -4
- package/dist/services/onboarding/fetch-events/speed-kit-install-html.js +3 -7
- package/dist/services/onboarding/fetch-events/speed-kit-install-js.d.ts +5 -5
- package/dist/services/onboarding/fetch-events/speed-kit-install-js.js +7 -11
- package/dist/services/onboarding/fetch-events/speed-kit-rum-pi-request.d.ts +6 -6
- package/dist/services/onboarding/fetch-events/speed-kit-rum-pi-request.js +4 -8
- package/dist/services/onboarding/fetch-events/speed-kit-service-worker-js.d.ts +3 -3
- package/dist/services/onboarding/fetch-events/speed-kit-service-worker-js.js +3 -7
- package/dist/services/onboarding/file-events/file-watcher.d.ts +5 -5
- package/dist/services/onboarding/file-events/file-watcher.js +24 -28
- package/dist/services/onboarding/index.d.ts +3 -3
- package/dist/services/onboarding/index.js +3 -8
- package/dist/services/onboarding/onboarding-model.d.ts +21 -23
- package/dist/services/onboarding/onboarding-model.js +22 -27
- package/dist/services/onboarding/onboarding-service-factory.d.ts +3 -3
- package/dist/services/onboarding/onboarding-service-factory.js +102 -108
- package/dist/services/onboarding/onboarding-service.d.ts +6 -6
- package/dist/services/onboarding/onboarding-service.js +12 -18
- package/dist/services/onboarding/request-cache/cache.d.ts +3 -3
- package/dist/services/onboarding/request-cache/cache.js +1 -5
- package/dist/services/onboarding/server-config/index.d.ts +3 -3
- package/dist/services/onboarding/server-config/index.js +6 -11
- package/dist/services/onboarding/templates/install-speed-kit-html-template.d.ts +1 -1
- package/dist/services/onboarding/templates/install-speed-kit-html-template.js +2 -7
- package/dist/services/onboarding/templates/install-speed-kit-js-template.d.ts +1 -1
- package/dist/services/onboarding/templates/install-speed-kit-js-template.js +2 -7
- package/dist/services/onboarding/todo-collector.d.ts +3 -3
- package/dist/services/onboarding/todo-collector.js +3 -7
- package/dist/services/onboarding/virtual-orestes-app/crawler.d.ts +2 -2
- package/dist/services/onboarding/virtual-orestes-app/crawler.js +12 -16
- package/dist/services/onboarding/virtual-orestes-app/index.d.ts +7 -7
- package/dist/services/onboarding/virtual-orestes-app/index.js +25 -32
- package/dist/services/pop-config/index.d.ts +3 -3
- package/dist/services/pop-config/index.js +3 -6
- package/dist/services/pop-config/pop-config-factory.d.ts +1 -1
- package/dist/services/pop-config/pop-config-factory.js +5 -9
- package/dist/services/pop-config/pop-config-model.d.ts +2 -2
- package/dist/services/pop-config/pop-config-model.js +1 -2
- package/dist/services/pop-config/pop-config-service.d.ts +2 -2
- package/dist/services/pop-config/pop-config-service.js +1 -5
- package/dist/services/prewarm/assets/asset-api-client.d.ts +2 -2
- package/dist/services/prewarm/assets/asset-api-client.js +18 -23
- package/dist/services/prewarm/assets/asset-item.d.ts +1 -1
- package/dist/services/prewarm/assets/asset-item.js +6 -10
- package/dist/services/prewarm/assets/asset-list.d.ts +2 -2
- package/dist/services/prewarm/assets/asset-list.js +6 -10
- package/dist/services/prewarm/csv-reader.js +6 -11
- package/dist/services/prewarm/error/invalid-origin-error.d.ts +1 -1
- package/dist/services/prewarm/error/invalid-origin-error.js +2 -7
- package/dist/services/prewarm/error/read-csv-error.d.ts +1 -1
- package/dist/services/prewarm/error/read-csv-error.js +2 -7
- package/dist/services/prewarm/index.d.ts +3 -3
- package/dist/services/prewarm/index.js +3 -6
- package/dist/services/prewarm/pre-warm-factory.d.ts +1 -1
- package/dist/services/prewarm/pre-warm-factory.js +13 -17
- package/dist/services/prewarm/pre-warm-model.js +16 -20
- package/dist/services/prewarm/pre-warm-service.d.ts +3 -3
- package/dist/services/prewarm/pre-warm-service.js +18 -22
- package/dist/services/pull/index.d.ts +3 -3
- package/dist/services/pull/index.js +3 -6
- package/dist/services/pull/pull-service-factory.d.ts +2 -2
- package/dist/services/pull/pull-service-factory.js +12 -16
- package/dist/services/pull/pull-service-model.js +4 -9
- package/dist/services/pull/pull-service.d.ts +3 -3
- package/dist/services/pull/pull-service.js +14 -19
- package/dist/services/query-builder/error/parse-config-speed-kit-error.d.ts +1 -1
- package/dist/services/query-builder/error/parse-config-speed-kit-error.js +2 -6
- package/dist/services/query-builder/query/parameter.js +1 -5
- package/dist/services/query-builder/query/prewarm.js +1 -5
- package/dist/services/query-builder/query-builder-factory.d.ts +3 -3
- package/dist/services/query-builder/query-builder-factory.js +16 -20
- package/dist/services/query-builder/query-builder-model.d.ts +6 -6
- package/dist/services/query-builder/query-builder-model.js +2 -5
- package/dist/services/query-builder/query-builder-service.d.ts +2 -2
- package/dist/services/query-builder/query-builder-service.js +24 -30
- package/oclif.manifest.json +15 -15
- package/package.json +63 -54
- package/dist/dummy.spec.d.ts +0 -1
- package/dist/dummy.spec.js +0 -18
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,41 @@
|
|
|
1
|
+
# [4.0.0](https://gitlab.orestes.info/baqend/speed-kit-cli/compare/v3.43.2...v4.0.0) (2026-05-06)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
* feat!: 0 vulnerabilities ([9e572f0](https://gitlab.orestes.info/baqend/speed-kit-cli/commit/9e572f087f177f41aafe16312e213907098ff0fd))
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
### Bug Fixes
|
|
8
|
+
|
|
9
|
+
* **config-wizzard:** resolve templateMath ([381e476](https://gitlab.orestes.info/baqend/speed-kit-cli/commit/381e476e4528f1f2e3cce10427fcef7366853cd1))
|
|
10
|
+
* **documentHandler:** exchange quickfix for postNotFound ([0d27c00](https://gitlab.orestes.info/baqend/speed-kit-cli/commit/0d27c002d1ee16c8fde7bb9eb21db125f1f0e7e6))
|
|
11
|
+
* remove dublicate output on cli write ([0eb9b18](https://gitlab.orestes.info/baqend/speed-kit-cli/commit/0eb9b188bc1c441e284506b4b8b09d1ede8d9bf0))
|
|
12
|
+
* usage of __dirname in moduleContext ([cf1681e](https://gitlab.orestes.info/baqend/speed-kit-cli/commit/cf1681ea3eb7e0bbf81f22d61e91236b922bd127))
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
### Features
|
|
16
|
+
|
|
17
|
+
* add missing package, fix typing-errors after migration ([c4860fb](https://gitlab.orestes.info/baqend/speed-kit-cli/commit/c4860fbbc1e4ee7d407dcab795663b94fe499b15))
|
|
18
|
+
* exchange node-fetch@v2 with node-fetch-native for docHandler runtime ([467bc42](https://gitlab.orestes.info/baqend/speed-kit-cli/commit/467bc42045b626095aa0de25df7778fd0afb7593))
|
|
19
|
+
* exchange oclif_ux with other packages ([7e45f44](https://gitlab.orestes.info/baqend/speed-kit-cli/commit/7e45f44dc858b5cd8be19ea04df0c57867070f00))
|
|
20
|
+
* exchange ora with spinnies ([0910106](https://gitlab.orestes.info/baqend/speed-kit-cli/commit/09101065936e34bd37bf62ee4cd605eb9fa0ab49))
|
|
21
|
+
* **project:** nvmrc ([d8fdcf4](https://gitlab.orestes.info/baqend/speed-kit-cli/commit/d8fdcf4893c458d761b111edec270e93a53d5a55))
|
|
22
|
+
* **tests:** bring tests back to life ([4dd057b](https://gitlab.orestes.info/baqend/speed-kit-cli/commit/4dd057b76b3613e9205cba78ae356a53921d5af0))
|
|
23
|
+
* update imports, fix esLint ([faef40d](https://gitlab.orestes.info/baqend/speed-kit-cli/commit/faef40d9034c20d2bf2e2260f8dfda9595c23b9b))
|
|
24
|
+
* update more packages ([58bdd6b](https://gitlab.orestes.info/baqend/speed-kit-cli/commit/58bdd6bf1e9bbe8bc3e39ff086539f2c54b4c258))
|
|
25
|
+
* update oclif package ([2e0c037](https://gitlab.orestes.info/baqend/speed-kit-cli/commit/2e0c037b9c8c261f8d50d8add6f19883c68c780d))
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
### BREAKING CHANGES
|
|
29
|
+
|
|
30
|
+
* Change from cjs to module
|
|
31
|
+
|
|
32
|
+
## [3.43.2](https://gitlab.orestes.info/baqend/speed-kit-cli/compare/v3.43.1...v3.43.2) (2026-04-24)
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
### Bug Fixes
|
|
36
|
+
|
|
37
|
+
* **deploy:** deploy origins ([c0bf34b](https://gitlab.orestes.info/baqend/speed-kit-cli/commit/c0bf34bba663d564130e426fea78ad0e06af46c9))
|
|
38
|
+
|
|
1
39
|
## [3.43.1](https://gitlab.orestes.info/baqend/speed-kit-cli/compare/v3.43.0...v3.43.1) (2026-04-23)
|
|
2
40
|
|
|
3
41
|
|
package/README.md
CHANGED
|
@@ -21,7 +21,7 @@ $ npm install -g @speedkit/cli
|
|
|
21
21
|
$ sk COMMAND
|
|
22
22
|
running command...
|
|
23
23
|
$ sk (--version)
|
|
24
|
-
@speedkit/cli/
|
|
24
|
+
@speedkit/cli/4.0.0 linux-x64 node-v22.22.2
|
|
25
25
|
$ sk --help [COMMAND]
|
|
26
26
|
USAGE
|
|
27
27
|
$ sk COMMAND
|
|
@@ -92,7 +92,7 @@ USAGE
|
|
|
92
92
|
$ sk autocomplete [SHELL] [-r]
|
|
93
93
|
|
|
94
94
|
ARGUMENTS
|
|
95
|
-
SHELL (zsh|bash|powershell) Shell type
|
|
95
|
+
[SHELL] (zsh|bash|powershell) Shell type
|
|
96
96
|
|
|
97
97
|
FLAGS
|
|
98
98
|
-r, --refresh-cache Refresh cache (ignores displaying instructions)
|
|
@@ -112,7 +112,7 @@ EXAMPLES
|
|
|
112
112
|
$ sk autocomplete --refresh-cache
|
|
113
113
|
```
|
|
114
114
|
|
|
115
|
-
_See code: [@oclif/plugin-autocomplete](https://github.com/oclif/plugin-autocomplete/blob/v3.
|
|
115
|
+
_See code: [@oclif/plugin-autocomplete](https://github.com/oclif/plugin-autocomplete/blob/v3.2.45/src/commands/autocomplete/index.ts)_
|
|
116
116
|
|
|
117
117
|
## `sk build-parameter-query CUSTOMERPATH`
|
|
118
118
|
|
|
@@ -346,7 +346,7 @@ USAGE
|
|
|
346
346
|
$ sk help [COMMAND...] [-n]
|
|
347
347
|
|
|
348
348
|
ARGUMENTS
|
|
349
|
-
COMMAND... Command to show help for.
|
|
349
|
+
[COMMAND...] Command to show help for.
|
|
350
350
|
|
|
351
351
|
FLAGS
|
|
352
352
|
-n, --nested-commands Include all nested commands in the output.
|
|
@@ -355,7 +355,7 @@ DESCRIPTION
|
|
|
355
355
|
Display help for sk.
|
|
356
356
|
```
|
|
357
357
|
|
|
358
|
-
_See code: [@oclif/plugin-help](https://github.com/oclif/plugin-help/blob/
|
|
358
|
+
_See code: [@oclif/plugin-help](https://github.com/oclif/plugin-help/blob/6.2.44/src/commands/help.ts)_
|
|
359
359
|
|
|
360
360
|
## `sk login [APP]`
|
|
361
361
|
|
|
@@ -366,7 +366,7 @@ USAGE
|
|
|
366
366
|
$ sk login [APP]
|
|
367
367
|
|
|
368
368
|
ARGUMENTS
|
|
369
|
-
APP [default: bbq] The customers appName
|
|
369
|
+
[APP] [default: bbq] The customers appName
|
|
370
370
|
|
|
371
371
|
DESCRIPTION
|
|
372
372
|
Login to your app
|
package/bin/dev
CHANGED
|
@@ -1,18 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
const path = require('path')
|
|
6
|
-
const project = path.join(__dirname, '..', 'tsconfig.json')
|
|
7
|
-
|
|
8
|
-
// In dev mode -> use ts-node and dev plugins
|
|
9
|
-
process.env.NODE_ENV = 'development'
|
|
10
|
-
|
|
11
|
-
require('ts-node').register({project})
|
|
12
|
-
|
|
13
|
-
// In dev mode, always show stack traces
|
|
14
|
-
oclif.settings.debug = true;
|
|
15
|
-
|
|
16
|
-
// Start the CLI
|
|
17
|
-
oclif.run().then(oclif.flush).catch(oclif.Errors.handle)
|
|
3
|
+
import {execute} from '@oclif/core'
|
|
4
|
+
await execute({development: true, dir: import.meta.url})
|
|
18
5
|
|
package/bin/run
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { Command } from "@oclif/core";
|
|
2
2
|
export default class BuildParameterQuery extends Command {
|
|
3
3
|
static args: {
|
|
4
|
-
customerPath: import("@oclif/core/
|
|
5
|
-
exists?: boolean
|
|
4
|
+
customerPath: import("@oclif/core/interfaces").Arg<string, {
|
|
5
|
+
exists?: boolean;
|
|
6
6
|
}>;
|
|
7
7
|
};
|
|
8
8
|
static description: string;
|
|
9
9
|
static examples: string[];
|
|
10
10
|
static flags: {
|
|
11
|
-
configName: import("@oclif/core/
|
|
11
|
+
configName: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
12
12
|
};
|
|
13
13
|
run(): Promise<void>;
|
|
14
14
|
}
|
|
@@ -1,28 +1,25 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
class BuildParameterQuery extends core_1.Command {
|
|
9
|
-
static args = cli_parameters_1.CLI_CUSTOMER_CONFIG;
|
|
1
|
+
import { Command } from "@oclif/core";
|
|
2
|
+
import { CLI_CONFIG_NAME, CLI_CUSTOMER_CONFIG, CLIParameters, CLIParametersChar, CLIParametersExample, } from "../models/cli-parameters.js";
|
|
3
|
+
import { QueryBuilderFactory } from "../services/query-builder/query-builder-factory.js";
|
|
4
|
+
import { CliConfig } from "../helpers/cli-config.js";
|
|
5
|
+
import { QueryTpe } from "../services/query-builder/query-builder-model.js";
|
|
6
|
+
export default class BuildParameterQuery extends Command {
|
|
7
|
+
static args = CLI_CUSTOMER_CONFIG;
|
|
10
8
|
static description = "Build a parameter query that can be executed in Athena";
|
|
11
9
|
static examples = [
|
|
12
|
-
`$ sk build-parameter-query <${
|
|
13
|
-
`$ sk build-parameter-query ${
|
|
10
|
+
`$ sk build-parameter-query <${CLIParameters.CustomerPath}> -${CLIParametersChar.ConfigName} <${CLIParameters.ConfigName}>`,
|
|
11
|
+
`$ sk build-parameter-query ${CLIParametersExample.CustomerPath} -${CLIParametersChar.ConfigName} ${CLIParametersExample.ConfigName}`,
|
|
14
12
|
];
|
|
15
13
|
static flags = {
|
|
16
|
-
...
|
|
14
|
+
...CLI_CONFIG_NAME,
|
|
17
15
|
};
|
|
18
16
|
async run() {
|
|
19
17
|
const { args: { customerPath }, flags: { configName }, } = await this.parse(BuildParameterQuery);
|
|
20
|
-
const service = await new
|
|
18
|
+
const service = await new QueryBuilderFactory({
|
|
21
19
|
configName,
|
|
22
20
|
customerPath,
|
|
23
21
|
isWindows: this.config.windows,
|
|
24
|
-
}, new
|
|
22
|
+
}, new CliConfig(this.config).load()).buildService(QueryTpe.parameter);
|
|
25
23
|
await service.run();
|
|
26
24
|
}
|
|
27
25
|
}
|
|
28
|
-
exports.default = BuildParameterQuery;
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { Command } from "@oclif/core";
|
|
2
2
|
export default class BuildPrewarmQuery extends Command {
|
|
3
3
|
static args: {
|
|
4
|
-
customerPath: import("@oclif/core/
|
|
5
|
-
exists?: boolean
|
|
4
|
+
customerPath: import("@oclif/core/interfaces").Arg<string, {
|
|
5
|
+
exists?: boolean;
|
|
6
6
|
}>;
|
|
7
7
|
};
|
|
8
8
|
static description: string;
|
|
9
9
|
static examples: string[];
|
|
10
10
|
static flags: {
|
|
11
|
-
quiet: import("@oclif/core/
|
|
12
|
-
configName: import("@oclif/core/
|
|
11
|
+
quiet: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
12
|
+
configName: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
13
13
|
};
|
|
14
14
|
run(): Promise<void>;
|
|
15
15
|
}
|
|
@@ -1,20 +1,18 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
class BuildPrewarmQuery extends core_1.Command {
|
|
9
|
-
static args = cli_parameters_1.CLI_CUSTOMER_CONFIG;
|
|
1
|
+
import { Command, Flags } from "@oclif/core";
|
|
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
|
+
import { QueryBuilderFactory } from "../services/query-builder/query-builder-factory.js";
|
|
5
|
+
import { QueryTpe } from "../services/query-builder/query-builder-model.js";
|
|
6
|
+
export default class BuildPrewarmQuery extends Command {
|
|
7
|
+
static args = CLI_CUSTOMER_CONFIG;
|
|
10
8
|
static description = "Build a prewarm query that can be executed in Athena";
|
|
11
9
|
static examples = [
|
|
12
|
-
`$ sk build-prewarm-query <${
|
|
13
|
-
`$ sk build-prewarm-query ${
|
|
10
|
+
`$ sk build-prewarm-query <${CLIParameters.CustomerPath}> -${CLIParametersChar.ConfigName} <${CLIParameters.ConfigName}>`,
|
|
11
|
+
`$ sk build-prewarm-query ${CLIParametersExample.CustomerPath} -${CLIParametersChar.ConfigName} ${CLIParametersExample.ConfigName}`,
|
|
14
12
|
];
|
|
15
13
|
static flags = {
|
|
16
|
-
...
|
|
17
|
-
quiet:
|
|
14
|
+
...CLI_CONFIG_NAME,
|
|
15
|
+
quiet: Flags.boolean({
|
|
18
16
|
char: "q",
|
|
19
17
|
description: "Output only the raw query without clipboard copy or styling",
|
|
20
18
|
default: false,
|
|
@@ -22,13 +20,12 @@ class BuildPrewarmQuery extends core_1.Command {
|
|
|
22
20
|
};
|
|
23
21
|
async run() {
|
|
24
22
|
const { args: { customerPath }, flags: { configName, quiet }, } = await this.parse(BuildPrewarmQuery);
|
|
25
|
-
const service = await new
|
|
23
|
+
const service = await new QueryBuilderFactory({
|
|
26
24
|
configName,
|
|
27
25
|
customerPath,
|
|
28
26
|
isWindows: this.config.windows,
|
|
29
27
|
quiet,
|
|
30
|
-
}, new
|
|
28
|
+
}, new CliConfig(this.config).load()).buildService(QueryTpe.prewarm);
|
|
31
29
|
await service.run();
|
|
32
30
|
}
|
|
33
31
|
}
|
|
34
|
-
exports.default = BuildPrewarmQuery;
|
|
@@ -1,17 +1,14 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
const dotenv = tslib_1.__importStar(require("dotenv"));
|
|
8
|
-
dotenv.config();
|
|
9
|
-
class Edit extends core_1.Command {
|
|
1
|
+
import { Command } from "@oclif/core";
|
|
2
|
+
import path from "node:path";
|
|
3
|
+
import { spawn } from "node:child_process";
|
|
4
|
+
import * as dotenv from "dotenv";
|
|
5
|
+
dotenv.config({ quiet: true });
|
|
6
|
+
export default class Edit extends Command {
|
|
10
7
|
static description = "Edit cli config";
|
|
11
8
|
static examples = [`$ sk config edit`];
|
|
12
9
|
async run() {
|
|
13
10
|
const editor = process.env.EDITOR || "nano";
|
|
14
|
-
const editorSpawn =
|
|
11
|
+
const editorSpawn = spawn(editor, [path.resolve(this.config.configDir, "config.json")], {
|
|
15
12
|
stdio: "inherit",
|
|
16
13
|
detached: true,
|
|
17
14
|
});
|
|
@@ -20,4 +17,3 @@ class Edit extends core_1.Command {
|
|
|
20
17
|
});
|
|
21
18
|
}
|
|
22
19
|
}
|
|
23
|
-
exports.default = Edit;
|
|
@@ -1,13 +1,11 @@
|
|
|
1
1
|
import { Command } from "@oclif/core";
|
|
2
2
|
export default class Deploy extends Command {
|
|
3
3
|
static args: {
|
|
4
|
-
customerPath: import("@oclif/core/
|
|
5
|
-
exists?: boolean
|
|
4
|
+
customerPath: import("@oclif/core/interfaces").Arg<string, {
|
|
5
|
+
exists?: boolean;
|
|
6
6
|
}>;
|
|
7
7
|
};
|
|
8
|
-
static flags:
|
|
9
|
-
[flag: string]: any;
|
|
10
|
-
}>;
|
|
8
|
+
static flags: Record<string, Command.Flag>;
|
|
11
9
|
static description: string;
|
|
12
10
|
static examples: string[];
|
|
13
11
|
run(): Promise<void>;
|
package/dist/commands/deploy.js
CHANGED
|
@@ -1,24 +1,20 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
class Deploy extends core_1.Command {
|
|
10
|
-
static args = cli_parameters_1.CLI_CUSTOMER_CONFIG;
|
|
11
|
-
static flags = deploy_context_1.default.flags;
|
|
1
|
+
import { Command } from "@oclif/core";
|
|
2
|
+
import { CliConfig } from "../helpers/cli-config.js";
|
|
3
|
+
import { CLI_CUSTOMER_CONFIG, CLIParameters, CLIParametersChar, CLIParametersExample, } from "../models/cli-parameters.js";
|
|
4
|
+
import DeployContext from "../services/deploy/context/deploy-context.js";
|
|
5
|
+
import DeployServiceFactory from "../services/deploy/deploy-service-factory.js";
|
|
6
|
+
export default class Deploy extends Command {
|
|
7
|
+
static args = CLI_CUSTOMER_CONFIG;
|
|
8
|
+
static flags = DeployContext.flags;
|
|
12
9
|
static description = "Deploys the specified customer config while comparing to the live version before";
|
|
13
10
|
static examples = [
|
|
14
|
-
`$ sk deploy <${
|
|
15
|
-
`$ sk deploy ${
|
|
11
|
+
`$ sk deploy <${CLIParameters.CustomerPath}> -${CLIParametersChar.ConfigName} <${CLIParameters.ConfigName}> -${CLIParametersChar.SlackToken} <${CLIParameters.SlackToken}> -${CLIParametersChar.Artifacts} <${CLIParameters.Artifacts}> -${CLIParametersChar.DryRun} <${CLIParameters.DryRun}>`,
|
|
12
|
+
`$ sk deploy ${CLIParametersExample.CustomerPath} -${CLIParametersChar.ConfigName} ${CLIParametersExample.ConfigName} -${CLIParametersChar.SlackToken} ${CLIParametersExample.SlackToken} -${CLIParametersChar.Artifacts} ${CLIParametersExample.Artifacts} -${CLIParametersChar.DryRun}`,
|
|
16
13
|
];
|
|
17
14
|
async run() {
|
|
18
15
|
const { args: { customerPath }, flags: { artifacts, configName, dryRun, useTestConfig }, } = await this.parse(Deploy);
|
|
19
|
-
const deployContext = new
|
|
20
|
-
const deployService = await new
|
|
16
|
+
const deployContext = new DeployContext(customerPath, configName, artifacts, dryRun, useTestConfig);
|
|
17
|
+
const deployService = await new DeployServiceFactory(deployContext, new CliConfig(this.config).load()).buildService();
|
|
21
18
|
await deployService.run();
|
|
22
19
|
}
|
|
23
20
|
}
|
|
24
|
-
exports.default = Deploy;
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { Config, Command } from "@oclif/core";
|
|
2
|
-
import { CliService } from "../services/cli";
|
|
2
|
+
import { CliService } from "../services/cli/index.js";
|
|
3
3
|
export default class DiffUrlParameters extends Command {
|
|
4
4
|
cli: CliService;
|
|
5
5
|
static description: string;
|
|
6
6
|
static aliases: string[];
|
|
7
7
|
static deprecateAliases: boolean;
|
|
8
8
|
static args: {
|
|
9
|
-
pageUrl: import("@oclif/core/
|
|
9
|
+
pageUrl: import("@oclif/core/interfaces").Arg<string, Record<string, unknown>>;
|
|
10
10
|
};
|
|
11
11
|
static flags: {
|
|
12
|
-
hideDiff: import("@oclif/core/
|
|
12
|
+
hideDiff: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
13
13
|
};
|
|
14
14
|
static examples: string[];
|
|
15
15
|
constructor(argv: string[], config: Config);
|
|
@@ -1,40 +1,37 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
const cli_config_1 = require("../helpers/cli-config");
|
|
11
|
-
const html_format_helper_1 = require("../helpers/html-format-helper");
|
|
12
|
-
class DiffUrlParameters extends core_1.Command {
|
|
1
|
+
import { Args, Command, Flags } from "@oclif/core";
|
|
2
|
+
import scrape from "../helpers/scrape.js";
|
|
3
|
+
import { CLIParameters, CLIParametersChar, CLIParametersExample, } from "../models/cli-parameters.js";
|
|
4
|
+
import { CliServiceFactory } from "../services/cli/index.js";
|
|
5
|
+
import * as url from "node:url";
|
|
6
|
+
import { DiffContext, DiffServiceFactory } from "../services/diff/index.js";
|
|
7
|
+
import { CliConfig } from "../helpers/cli-config.js";
|
|
8
|
+
import { formatHtml } from "../helpers/html-format-helper.js";
|
|
9
|
+
export default class DiffUrlParameters extends Command {
|
|
13
10
|
cli;
|
|
14
11
|
static description = "Shows difference in documents with query parameters on/off";
|
|
15
12
|
static aliases = ["param-diff"];
|
|
16
13
|
static deprecateAliases = true;
|
|
17
14
|
static args = {
|
|
18
|
-
[
|
|
19
|
-
name:
|
|
15
|
+
[CLIParameters.PageUrl]: Args.string({
|
|
16
|
+
name: CLIParameters.PageUrl,
|
|
20
17
|
required: true,
|
|
21
18
|
description: "Link of the page",
|
|
22
|
-
example:
|
|
19
|
+
example: CLIParametersExample.PageUrl,
|
|
23
20
|
}),
|
|
24
21
|
};
|
|
25
22
|
static flags = {
|
|
26
|
-
[
|
|
27
|
-
char:
|
|
23
|
+
[CLIParameters.HideDiff]: Flags.boolean({
|
|
24
|
+
char: CLIParametersChar.HideDiff,
|
|
28
25
|
description: "Hide the code diff in IDE code diff window",
|
|
29
26
|
}),
|
|
30
27
|
};
|
|
31
28
|
static examples = [
|
|
32
|
-
`$ sk prewarm <${
|
|
33
|
-
`$ sk prewarm ${
|
|
29
|
+
`$ sk prewarm <${CLIParameters.PageUrl}> -${CLIParametersChar.HideDiff}`,
|
|
30
|
+
`$ sk prewarm ${CLIParametersExample.PageUrl} -${CLIParametersChar.HideDiff}`,
|
|
34
31
|
];
|
|
35
32
|
constructor(argv, config) {
|
|
36
33
|
super(argv, config);
|
|
37
|
-
this.cli = new
|
|
34
|
+
this.cli = new CliServiceFactory().getService();
|
|
38
35
|
}
|
|
39
36
|
logError(message) {
|
|
40
37
|
this.cli.spacer();
|
|
@@ -44,7 +41,7 @@ class DiffUrlParameters extends core_1.Command {
|
|
|
44
41
|
async run() {
|
|
45
42
|
const { args, flags } = await this.parse(DiffUrlParameters);
|
|
46
43
|
const { pageUrl: originalUrl } = args;
|
|
47
|
-
const originalData = await (
|
|
44
|
+
const originalData = await scrape(originalUrl);
|
|
48
45
|
if (!originalData) {
|
|
49
46
|
this.logError("Failed to fetch original document");
|
|
50
47
|
}
|
|
@@ -54,15 +51,15 @@ class DiffUrlParameters extends core_1.Command {
|
|
|
54
51
|
host: parsedUrl.host,
|
|
55
52
|
pathname: parsedUrl.pathname,
|
|
56
53
|
});
|
|
57
|
-
const withoutAnyParametersData = await (
|
|
54
|
+
const withoutAnyParametersData = await scrape(withoutAnyParametersUrl);
|
|
58
55
|
if (!withoutAnyParametersData) {
|
|
59
56
|
this.logError("Failed to fetch document without any params");
|
|
60
57
|
}
|
|
61
|
-
const userConfig = new
|
|
62
|
-
const context = new
|
|
63
|
-
const diffService = new
|
|
64
|
-
const originalFilePath = await diffService.writeContentToTemporalFile("original.html",
|
|
65
|
-
const withoutAnyParametersFilePath = await diffService.writeContentToTemporalFile("without-any-params.html",
|
|
58
|
+
const userConfig = new CliConfig(this.config).load();
|
|
59
|
+
const context = new DiffContext(userConfig.diffExec, userConfig.diffExecTemplate);
|
|
60
|
+
const diffService = new DiffServiceFactory(context).getService();
|
|
61
|
+
const originalFilePath = await diffService.writeContentToTemporalFile("original.html", formatHtml(originalData));
|
|
62
|
+
const withoutAnyParametersFilePath = await diffService.writeContentToTemporalFile("without-any-params.html", formatHtml(withoutAnyParametersData));
|
|
66
63
|
this.cli.spacer();
|
|
67
64
|
this.cli.write(`Checking any parameter...`);
|
|
68
65
|
this.cli.write(`- with: ${originalUrl}`);
|
|
@@ -79,6 +76,7 @@ class DiffUrlParameters extends core_1.Command {
|
|
|
79
76
|
return;
|
|
80
77
|
for (const parameter in parsedUrl.query) {
|
|
81
78
|
const withoutCurrentParameterQuery = { ...parsedUrl.query };
|
|
79
|
+
// eslint-disable-next-line @typescript-eslint/no-dynamic-delete
|
|
82
80
|
delete withoutCurrentParameterQuery[parameter]; // Remove the current parameter
|
|
83
81
|
const withoutCurrentParameterUrl = url.format({
|
|
84
82
|
protocol: parsedUrl.protocol,
|
|
@@ -86,11 +84,11 @@ class DiffUrlParameters extends core_1.Command {
|
|
|
86
84
|
pathname: parsedUrl.pathname,
|
|
87
85
|
query: withoutCurrentParameterQuery,
|
|
88
86
|
});
|
|
89
|
-
const withoutCurrentParameterData = await (
|
|
87
|
+
const withoutCurrentParameterData = await scrape(withoutCurrentParameterUrl);
|
|
90
88
|
if (!withoutCurrentParameterData) {
|
|
91
89
|
this.logError(`Failed to fetch document without "${parameter}" parameter`);
|
|
92
90
|
}
|
|
93
|
-
const withoutCurrentParameterFilePath = await diffService.writeContentToTemporalFile(`without-${parameter}-param.html`,
|
|
91
|
+
const withoutCurrentParameterFilePath = await diffService.writeContentToTemporalFile(`without-${parameter}-param.html`, formatHtml(withoutCurrentParameterData));
|
|
94
92
|
this.cli.spacer();
|
|
95
93
|
this.cli.write(`Checking "${parameter}" parameter...`);
|
|
96
94
|
this.cli.write(`- with: ${originalUrl}`);
|
|
@@ -111,4 +109,3 @@ class DiffUrlParameters extends core_1.Command {
|
|
|
111
109
|
}
|
|
112
110
|
}
|
|
113
111
|
}
|
|
114
|
-
exports.default = DiffUrlParameters;
|
|
@@ -2,13 +2,13 @@ import { Command } from "@oclif/core";
|
|
|
2
2
|
export default class DocumentHandler extends Command {
|
|
3
3
|
static description: string;
|
|
4
4
|
static args: {
|
|
5
|
-
customerPath: import("@oclif/core/
|
|
6
|
-
exists?: boolean
|
|
5
|
+
customerPath: import("@oclif/core/interfaces").Arg<string, {
|
|
6
|
+
exists?: boolean;
|
|
7
7
|
}>;
|
|
8
8
|
};
|
|
9
9
|
static flags: {
|
|
10
|
-
CreateTests: import("@oclif/core/
|
|
11
|
-
configName: import("@oclif/core/
|
|
10
|
+
CreateTests: import("@oclif/core/interfaces").OptionFlag<string[], import("@oclif/core/interfaces").CustomOptions>;
|
|
11
|
+
configName: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
12
12
|
};
|
|
13
13
|
static examples: string[];
|
|
14
14
|
run(): Promise<void>;
|
|
@@ -1,30 +1,27 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
const document_handler_runtime_context_1 = tslib_1.__importDefault(require("../services/document-handler-runtime/context/document-handler-runtime-context"));
|
|
8
|
-
const cli_config_1 = require("../helpers/cli-config");
|
|
9
|
-
class DocumentHandler extends core_1.Command {
|
|
1
|
+
import { Command, Flags } from "@oclif/core";
|
|
2
|
+
import { CLIParametersChar, CLIParameters, CLIParametersExample, CLI_CUSTOMER_CONFIG, CLI_CONFIG_NAME, } from "../models/cli-parameters.js";
|
|
3
|
+
import DocumentHandlerRuntimeServiceFactory from "../services/document-handler-runtime/factory/document-handler-runtime-service-factory.js";
|
|
4
|
+
import DocumentHandlerRuntimeContext from "../services/document-handler-runtime/context/document-handler-runtime-context.js";
|
|
5
|
+
import { CliConfig } from "../helpers/cli-config.js";
|
|
6
|
+
export default class DocumentHandler extends Command {
|
|
10
7
|
static description = "Creates testable documentHandler in folder {CUSTOMER_PATH}/test/src/";
|
|
11
|
-
static args =
|
|
8
|
+
static args = CLI_CUSTOMER_CONFIG;
|
|
12
9
|
static flags = {
|
|
13
|
-
...
|
|
14
|
-
[
|
|
15
|
-
char:
|
|
10
|
+
...CLI_CONFIG_NAME,
|
|
11
|
+
[CLIParameters.CreateTests]: Flags.string({
|
|
12
|
+
char: CLIParametersChar.CreateTests,
|
|
16
13
|
multiple: true,
|
|
17
14
|
required: false,
|
|
18
15
|
description: "name of the test to create",
|
|
19
16
|
}),
|
|
20
17
|
};
|
|
21
18
|
static examples = [
|
|
22
|
-
`$ sk documentHandler <${
|
|
23
|
-
`$ sk deploy ${
|
|
19
|
+
`$ sk documentHandler <${CLIParameters.CustomerPath}> -${CLIParametersChar.ConfigName} <${CLIParameters.ConfigName}>`,
|
|
20
|
+
`$ sk deploy ${CLIParametersExample.CustomerPath} -${CLIParametersChar.ConfigName} ${CLIParametersExample.ConfigName}`,
|
|
24
21
|
];
|
|
25
22
|
async run() {
|
|
26
23
|
const { args: { customerPath }, flags: { configName, CreateTests }, } = await this.parse(DocumentHandler);
|
|
27
|
-
const runtime = await new
|
|
24
|
+
const runtime = await new DocumentHandlerRuntimeServiceFactory(new DocumentHandlerRuntimeContext(customerPath, configName, CreateTests), new CliConfig(this.config).load()).buildService();
|
|
28
25
|
await runtime.run();
|
|
29
26
|
}
|
|
30
27
|
async finally(error) {
|
|
@@ -33,4 +30,3 @@ class DocumentHandler extends core_1.Command {
|
|
|
33
30
|
}
|
|
34
31
|
}
|
|
35
32
|
}
|
|
36
|
-
exports.default = DocumentHandler;
|
|
@@ -2,10 +2,10 @@ import { Command } from "@oclif/core";
|
|
|
2
2
|
export default class FindPops extends Command {
|
|
3
3
|
static description: string;
|
|
4
4
|
static args: {
|
|
5
|
-
app: import("@oclif/core/
|
|
5
|
+
app: import("@oclif/core/interfaces").Arg<string, Record<string, unknown>>;
|
|
6
6
|
};
|
|
7
7
|
static flags: {
|
|
8
|
-
ips: import("@oclif/core/
|
|
8
|
+
ips: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
9
9
|
};
|
|
10
10
|
static examples: string[];
|
|
11
11
|
private pops;
|