@speedkit/cli 3.43.2 → 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 +31 -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 +6 -10
- 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
|
@@ -1,26 +1,22 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
const connection_error_1 = require("../error-handling/error/connection-error");
|
|
11
|
-
const application_error_1 = tslib_1.__importDefault(require("../error-handling/error/application-error"));
|
|
12
|
-
const login_error_1 = require("./error/login-error");
|
|
13
|
-
const orestes_api_error_1 = require("./error/orestes-api-error");
|
|
1
|
+
import deepmerge from "deepmerge";
|
|
2
|
+
import { Agent } from "node:https";
|
|
3
|
+
import { race, RaceTimeOutError } from "../../helpers/race.js";
|
|
4
|
+
import { safe } from "../../helpers/safe.js";
|
|
5
|
+
import { JsonResponseError } from "./error/json-response-error.js";
|
|
6
|
+
import { ConnectionError } from "../error-handling/error/connection-error.js";
|
|
7
|
+
import ApplicationError from "../error-handling/error/application-error.js";
|
|
8
|
+
import { LoginError } from "./error/login-error.js";
|
|
9
|
+
import { OrestesApiError } from "./error/orestes-api-error.js";
|
|
14
10
|
const REQUEST_TIMEOUT = 10_000;
|
|
15
11
|
const CONTENT_TYPE = "application/json;charset=UTF-8";
|
|
16
|
-
class Client {
|
|
12
|
+
export class Client {
|
|
17
13
|
agent;
|
|
18
14
|
app;
|
|
19
15
|
entityManagerFactory;
|
|
20
16
|
constructor(app, entityManagerFactory) {
|
|
21
17
|
this.app = app;
|
|
22
18
|
this.entityManagerFactory = entityManagerFactory;
|
|
23
|
-
this.agent = new
|
|
19
|
+
this.agent = new Agent({ keepAlive: true, rejectUnauthorized: false });
|
|
24
20
|
}
|
|
25
21
|
async createRequest(requestExtension) {
|
|
26
22
|
const entityManager = await this.getEntityManager();
|
|
@@ -34,63 +30,62 @@ class Client {
|
|
|
34
30
|
timeout: REQUEST_TIMEOUT,
|
|
35
31
|
};
|
|
36
32
|
// @ts-expect-error agent seems not to be part of type RequestInit
|
|
37
|
-
return { ...(
|
|
33
|
+
return { ...deepmerge(baseRequest, requestExtension), agent: this.agent };
|
|
38
34
|
}
|
|
39
35
|
async getEntityManager() {
|
|
40
|
-
const result = await
|
|
36
|
+
const result = await safe(race(this.entityManagerFactory.getEntityManager(this.app), REQUEST_TIMEOUT));
|
|
41
37
|
if (result.success === true) {
|
|
42
38
|
return result.data;
|
|
43
39
|
}
|
|
44
|
-
if (result.errorObj instanceof
|
|
40
|
+
if (result.errorObj instanceof ApplicationError) {
|
|
45
41
|
throw result.errorObj;
|
|
46
42
|
}
|
|
47
|
-
if (result.errorObj instanceof
|
|
48
|
-
throw new
|
|
43
|
+
if (result.errorObj instanceof RaceTimeOutError) {
|
|
44
|
+
throw new ConnectionError(`Got timeout of ${REQUEST_TIMEOUT}ms while trying to connect to app ${this.app}`, ["Check you internet-connection"]);
|
|
49
45
|
}
|
|
50
46
|
if (result.error.includes("Root login is disabled")) {
|
|
51
|
-
throw new
|
|
47
|
+
throw new LoginError(this.app);
|
|
52
48
|
}
|
|
53
|
-
throw new
|
|
49
|
+
throw new ConnectionError(`Could not connect to app: ${this.app} - ${result.error}`);
|
|
54
50
|
}
|
|
55
51
|
async getModule(moduleName) {
|
|
56
52
|
const entityManager = await this.getEntityManager();
|
|
57
|
-
const moduleResponse = await
|
|
53
|
+
const moduleResponse = await safe(entityManager.code.loadCode(moduleName, "module"));
|
|
58
54
|
if (moduleResponse.success !== true) {
|
|
59
|
-
throw new
|
|
55
|
+
throw new ConnectionError(`Could not load module "${moduleName}" from app "${this.app}" - ${moduleResponse.error}`);
|
|
60
56
|
}
|
|
61
57
|
return moduleResponse.data;
|
|
62
58
|
}
|
|
63
59
|
async send(url, requestExtension = {}) {
|
|
64
60
|
const requestInit = await this.createRequest(requestExtension);
|
|
65
|
-
const responseResult = await
|
|
61
|
+
const responseResult = await safe(fetch(url, requestInit));
|
|
66
62
|
if (responseResult.success !== true) {
|
|
67
|
-
throw new
|
|
63
|
+
throw new ConnectionError(responseResult.error);
|
|
68
64
|
}
|
|
69
65
|
const response = responseResult.data;
|
|
70
66
|
if (response.status !== 200) {
|
|
71
67
|
const errorBody = (await response.json());
|
|
72
|
-
throw new
|
|
68
|
+
throw new OrestesApiError(errorBody?.message || response.statusText, errorBody.reason, errorBody.status);
|
|
73
69
|
}
|
|
74
|
-
const jsonResponse = await
|
|
70
|
+
const jsonResponse = await safe(response.json());
|
|
75
71
|
if (jsonResponse.success !== true) {
|
|
76
|
-
throw new
|
|
72
|
+
throw new JsonResponseError(jsonResponse.error);
|
|
77
73
|
}
|
|
78
74
|
return jsonResponse.data;
|
|
79
75
|
}
|
|
80
76
|
async setModule(moduleName, moduleCode) {
|
|
81
77
|
const entityManager = await this.getEntityManager();
|
|
82
|
-
const moduleResponse = await
|
|
78
|
+
const moduleResponse = await safe(entityManager.code.saveCode(moduleName, "module", moduleCode));
|
|
83
79
|
if (moduleResponse.success !== true) {
|
|
84
|
-
throw new
|
|
80
|
+
throw new ConnectionError(`Could not save module "${moduleName}" to app "${this.app}" - ${moduleResponse.error}`);
|
|
85
81
|
}
|
|
86
82
|
return moduleResponse.data;
|
|
87
83
|
}
|
|
88
84
|
async deleteModule(moduleName) {
|
|
89
85
|
const entityManager = await this.getEntityManager();
|
|
90
|
-
const moduleResponse = await
|
|
86
|
+
const moduleResponse = await safe(entityManager.code.deleteCode(moduleName, "module"));
|
|
91
87
|
if (moduleResponse.success !== true) {
|
|
92
|
-
throw new
|
|
88
|
+
throw new ConnectionError(`Could not delete module "${moduleName}" to app "${this.app}" - ${moduleResponse.error}`);
|
|
93
89
|
}
|
|
94
90
|
}
|
|
95
91
|
}
|
|
96
|
-
exports.Client = Client;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ConfigApiService } from "./config-api-service";
|
|
2
|
-
import { ConfigApiContextInterface } from "./";
|
|
1
|
+
import { ConfigApiService } from "./config-api-service.js";
|
|
2
|
+
import { ConfigApiContextInterface } from "./index.js";
|
|
3
3
|
export declare class ConfigApiServiceFactory {
|
|
4
4
|
context: ConfigApiContextInterface;
|
|
5
5
|
service: ConfigApiService;
|
|
@@ -1,39 +1,34 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
const node_os_1 = tslib_1.__importDefault(require("node:os"));
|
|
10
|
-
const node_path_1 = tslib_1.__importDefault(require("node:path"));
|
|
11
|
-
const application_error_1 = tslib_1.__importDefault(require("../error-handling/error/application-error"));
|
|
12
|
-
class ConfigApiServiceFactory {
|
|
1
|
+
import { ConfigApiService } from "./config-api-service.js";
|
|
2
|
+
import { Client } from "./client.js";
|
|
3
|
+
import { EntityManagerFactory } from "./entity-manager-factory.js";
|
|
4
|
+
import { existsSync, writeFileSync } from "node:fs";
|
|
5
|
+
import os from "node:os";
|
|
6
|
+
import path from "node:path";
|
|
7
|
+
import ApplicationError from "../error-handling/error/application-error.js";
|
|
8
|
+
export class ConfigApiServiceFactory {
|
|
13
9
|
context;
|
|
14
10
|
service = undefined;
|
|
15
11
|
constructor(context) {
|
|
16
12
|
this.context = context;
|
|
17
13
|
}
|
|
18
14
|
getService() {
|
|
19
|
-
if (!(this.service instanceof
|
|
15
|
+
if (!(this.service instanceof ConfigApiService)) {
|
|
20
16
|
this.buildService();
|
|
21
17
|
}
|
|
22
18
|
return this.service;
|
|
23
19
|
}
|
|
24
20
|
buildService() {
|
|
25
21
|
if (!this.context.app) {
|
|
26
|
-
throw new
|
|
22
|
+
throw new ApplicationError("app is undefined");
|
|
27
23
|
}
|
|
28
24
|
this.createLoginTokenFileIfNotExists();
|
|
29
|
-
const entityManagerFactory = new
|
|
30
|
-
const client = new
|
|
31
|
-
this.service = new
|
|
25
|
+
const entityManagerFactory = new EntityManagerFactory();
|
|
26
|
+
const client = new Client(this.context.app, entityManagerFactory);
|
|
27
|
+
this.service = new ConfigApiService(this.context.app, client);
|
|
32
28
|
}
|
|
33
29
|
createLoginTokenFileIfNotExists() {
|
|
34
|
-
if (!
|
|
35
|
-
|
|
30
|
+
if (!existsSync(path.resolve(os.homedir(), ".baqend"))) {
|
|
31
|
+
writeFileSync(path.resolve(os.homedir(), ".baqend"), "{}");
|
|
36
32
|
}
|
|
37
33
|
}
|
|
38
34
|
}
|
|
39
|
-
exports.ConfigApiServiceFactory = ConfigApiServiceFactory;
|
|
@@ -1,10 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ConfigApiContext = void 0;
|
|
4
|
-
class ConfigApiContext {
|
|
1
|
+
export class ConfigApiContext {
|
|
5
2
|
app = undefined;
|
|
6
3
|
constructor(app) {
|
|
7
4
|
this.app = app;
|
|
8
5
|
}
|
|
9
6
|
}
|
|
10
|
-
exports.ConfigApiContext = ConfigApiContext;
|
|
@@ -1,7 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ConfigApiService = void 0;
|
|
4
|
-
class ConfigApiService {
|
|
1
|
+
export class ConfigApiService {
|
|
5
2
|
client;
|
|
6
3
|
app;
|
|
7
4
|
constructor(app, client) {
|
|
@@ -76,4 +73,3 @@ class ConfigApiService {
|
|
|
76
73
|
await this.client.deleteModule(moduleName);
|
|
77
74
|
}
|
|
78
75
|
}
|
|
79
|
-
exports.ConfigApiService = ConfigApiService;
|
|
@@ -1,15 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
exports.EntityManagerFactory = void 0;
|
|
4
|
-
const cli_1 = require("baqend/cli");
|
|
5
|
-
class EntityManagerFactory {
|
|
1
|
+
import { account } from "baqend/cli";
|
|
2
|
+
export class EntityManagerFactory {
|
|
6
3
|
EntityManager;
|
|
7
4
|
async getEntityManager(app) {
|
|
8
5
|
if (this.EntityManager) {
|
|
9
6
|
return this.EntityManager;
|
|
10
7
|
}
|
|
11
|
-
this.EntityManager = await
|
|
8
|
+
this.EntityManager = await account.login({ app });
|
|
12
9
|
return this.EntityManager;
|
|
13
10
|
}
|
|
14
11
|
}
|
|
15
|
-
exports.EntityManagerFactory = EntityManagerFactory;
|
|
@@ -1,9 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
exports.JsonResponseError = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const application_error_1 = tslib_1.__importDefault(require("../../error-handling/error/application-error"));
|
|
6
|
-
class JsonResponseError extends application_error_1.default {
|
|
1
|
+
import ApplicationError from "../../error-handling/error/application-error.js";
|
|
2
|
+
export class JsonResponseError extends ApplicationError {
|
|
7
3
|
code = "JSON_RESPONSE_ERROR";
|
|
8
4
|
}
|
|
9
|
-
exports.JsonResponseError = JsonResponseError;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import ApplicationError from "../../error-handling/error/application-error";
|
|
1
|
+
import ApplicationError from "../../error-handling/error/application-error.js";
|
|
2
2
|
export declare class LoginError extends ApplicationError {
|
|
3
3
|
readonly code = "LOGIN_ERROR";
|
|
4
4
|
constructor(app: string);
|
|
@@ -1,12 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
exports.LoginError = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const application_error_1 = tslib_1.__importDefault(require("../../error-handling/error/application-error"));
|
|
6
|
-
class LoginError extends application_error_1.default {
|
|
1
|
+
import ApplicationError from "../../error-handling/error/application-error.js";
|
|
2
|
+
export class LoginError extends ApplicationError {
|
|
7
3
|
code = "LOGIN_ERROR";
|
|
8
4
|
constructor(app) {
|
|
9
5
|
super(`Could not login to app ${app}`, ["run sk login"]);
|
|
10
6
|
}
|
|
11
7
|
}
|
|
12
|
-
exports.LoginError = LoginError;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import ApplicationError from "../../error-handling/error/application-error";
|
|
1
|
+
import ApplicationError from "../../error-handling/error/application-error.js";
|
|
2
2
|
export declare class OrestesApiError extends ApplicationError {
|
|
3
3
|
readonly message: string;
|
|
4
4
|
readonly reason: string;
|
|
@@ -1,9 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
exports.OrestesApiError = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const application_error_1 = tslib_1.__importDefault(require("../../error-handling/error/application-error"));
|
|
6
|
-
class OrestesApiError extends application_error_1.default {
|
|
1
|
+
import ApplicationError from "../../error-handling/error/application-error.js";
|
|
2
|
+
export class OrestesApiError extends ApplicationError {
|
|
7
3
|
message;
|
|
8
4
|
reason;
|
|
9
5
|
status;
|
|
@@ -15,4 +11,3 @@ class OrestesApiError extends application_error_1.default {
|
|
|
15
11
|
this.status = status;
|
|
16
12
|
}
|
|
17
13
|
}
|
|
18
|
-
exports.OrestesApiError = OrestesApiError;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export * from "./config-api-factory";
|
|
2
|
-
export * from "./config-api-service";
|
|
3
|
-
export * from "./config-api-model";
|
|
1
|
+
export * from "./config-api-factory.js";
|
|
2
|
+
export * from "./config-api-service.js";
|
|
3
|
+
export * from "./config-api-model.js";
|
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
tslib_1.__exportStar(require("./config-api-factory"), exports);
|
|
5
|
-
tslib_1.__exportStar(require("./config-api-service"), exports);
|
|
6
|
-
tslib_1.__exportStar(require("./config-api-model"), exports);
|
|
1
|
+
export * from "./config-api-factory.js";
|
|
2
|
+
export * from "./config-api-service.js";
|
|
3
|
+
export * from "./config-api-model.js";
|
|
@@ -1,18 +1,14 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
const
|
|
5
|
-
const node_fetch_1 = tslib_1.__importDefault(require("node-fetch"));
|
|
6
|
-
const node_https_1 = tslib_1.__importDefault(require("node:https"));
|
|
7
|
-
const agent = new node_https_1.default.Agent({
|
|
1
|
+
import * as fs from "fs-extra";
|
|
2
|
+
import fetch from "node-fetch";
|
|
3
|
+
import https from "node:https";
|
|
4
|
+
const agent = new https.Agent({
|
|
8
5
|
rejectUnauthorized: false,
|
|
9
6
|
keepAlive: true,
|
|
10
7
|
});
|
|
11
8
|
/**
|
|
12
9
|
* @deprecated
|
|
13
10
|
*/
|
|
14
|
-
|
|
15
|
-
class ConfigApiService {
|
|
11
|
+
export default class ConfigApiService {
|
|
16
12
|
db;
|
|
17
13
|
app;
|
|
18
14
|
requestInit;
|
|
@@ -100,7 +96,7 @@ class ConfigApiService {
|
|
|
100
96
|
await this.fetchAndGetBody(urlPath, putInit);
|
|
101
97
|
}
|
|
102
98
|
async fetchAndGetBody(url, requestInit = this.requestInit) {
|
|
103
|
-
const response = await (
|
|
99
|
+
const response = await fetch(url, requestInit);
|
|
104
100
|
const body = await response.json();
|
|
105
101
|
if (response.status !== 200) {
|
|
106
102
|
// @ts-expect-error unknown message in body
|
|
@@ -109,4 +105,3 @@ class ConfigApiService {
|
|
|
109
105
|
return body;
|
|
110
106
|
}
|
|
111
107
|
}
|
|
112
|
-
exports.default = ConfigApiService;
|
|
@@ -1,15 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
exports.CustomerConfigServiceContext = void 0;
|
|
4
|
-
const cli_parameters_1 = require("../../models/cli-parameters");
|
|
5
|
-
class CustomerConfigServiceContext {
|
|
1
|
+
import { CLIParametersExample } from "../../models/cli-parameters.js";
|
|
2
|
+
export class CustomerConfigServiceContext {
|
|
6
3
|
appName;
|
|
7
4
|
customersDirectory;
|
|
8
|
-
constructor(appName = "", customersDirectory =
|
|
5
|
+
constructor(appName = "", customersDirectory = CLIParametersExample.CustomersDirectory) {
|
|
9
6
|
this.appName = appName;
|
|
10
7
|
this.customersDirectory = customersDirectory;
|
|
11
8
|
this.appName = appName;
|
|
12
9
|
this.customersDirectory = customersDirectory;
|
|
13
10
|
}
|
|
14
11
|
}
|
|
15
|
-
exports.CustomerConfigServiceContext = CustomerConfigServiceContext;
|
|
@@ -1,24 +1,20 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
const cli_1 = require("../cli");
|
|
5
|
-
const _1 = require(".");
|
|
6
|
-
class CustomerConfigServiceFactory {
|
|
1
|
+
import { CliServiceFactory } from "../cli/index.js";
|
|
2
|
+
import { CustomerConfigService, } from "./index.js";
|
|
3
|
+
export class CustomerConfigServiceFactory {
|
|
7
4
|
context;
|
|
8
5
|
service;
|
|
9
6
|
constructor(context) {
|
|
10
7
|
this.context = context;
|
|
11
8
|
}
|
|
12
9
|
async buildService() {
|
|
13
|
-
if (!(this.service instanceof
|
|
10
|
+
if (!(this.service instanceof CustomerConfigService)) {
|
|
14
11
|
await this.build();
|
|
15
12
|
}
|
|
16
13
|
return this.service;
|
|
17
14
|
}
|
|
18
15
|
async build() {
|
|
19
16
|
const context = this.context;
|
|
20
|
-
const cliService = new
|
|
21
|
-
this.service = new
|
|
17
|
+
const cliService = new CliServiceFactory().getService();
|
|
18
|
+
this.service = new CustomerConfigService(context, cliService);
|
|
22
19
|
}
|
|
23
20
|
}
|
|
24
|
-
exports.CustomerConfigServiceFactory = CustomerConfigServiceFactory;
|
|
@@ -1,13 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.EnvironmentType = exports.ShopSystem = exports.DirectoryOverwriteOption = void 0;
|
|
4
|
-
var DirectoryOverwriteOption;
|
|
1
|
+
export var DirectoryOverwriteOption;
|
|
5
2
|
(function (DirectoryOverwriteOption) {
|
|
6
3
|
DirectoryOverwriteOption["NEW_NAME"] = "Choose a new directory name";
|
|
7
4
|
DirectoryOverwriteOption["OVERWRITE_FILE_WISE"] = "Keep and overwrite file-wise (ask)";
|
|
8
5
|
DirectoryOverwriteOption["OVERWRITE_COMPLETELY"] = "Empty and create new";
|
|
9
|
-
})(DirectoryOverwriteOption || (
|
|
10
|
-
var ShopSystem;
|
|
6
|
+
})(DirectoryOverwriteOption || (DirectoryOverwriteOption = {}));
|
|
7
|
+
export var ShopSystem;
|
|
11
8
|
(function (ShopSystem) {
|
|
12
9
|
ShopSystem["OTHER"] = "- unknown -";
|
|
13
10
|
// DACH / Europe
|
|
@@ -28,10 +25,10 @@ var ShopSystem;
|
|
|
28
25
|
// Japan
|
|
29
26
|
ShopSystem["ECFORCE"] = "ecforce";
|
|
30
27
|
ShopSystem["FUTURESHOP"] = "futureshop";
|
|
31
|
-
})(ShopSystem || (
|
|
32
|
-
var EnvironmentType;
|
|
28
|
+
})(ShopSystem || (ShopSystem = {}));
|
|
29
|
+
export var EnvironmentType;
|
|
33
30
|
(function (EnvironmentType) {
|
|
34
31
|
EnvironmentType["PRODUCTION"] = "production";
|
|
35
32
|
EnvironmentType["STAGING"] = "staging";
|
|
36
33
|
EnvironmentType["TEST"] = "test";
|
|
37
|
-
})(EnvironmentType || (
|
|
34
|
+
})(EnvironmentType || (EnvironmentType = {}));
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { CliService } from "../cli";
|
|
2
|
-
import { CustomerConfigServiceContext } from "./customer-config-service-context";
|
|
3
|
-
import { CustomerConfigSettings } from "./customer-config-service-model";
|
|
1
|
+
import { CliService } from "../cli/index.js";
|
|
2
|
+
import { CustomerConfigServiceContext } from "./customer-config-service-context.js";
|
|
3
|
+
import { CustomerConfigSettings } from "./customer-config-service-model.js";
|
|
4
4
|
export declare class CustomerConfigService {
|
|
5
5
|
private context;
|
|
6
6
|
private cli;
|