@speedkit/cli 4.51.0-run-control.5 → 4.51.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +37 -0
- package/README.md +14 -1426
- package/dist/commands/diff.d.ts +1 -7
- package/dist/commands/diff.js +3 -9
- package/dist/commands/login.d.ts +0 -3
- package/dist/commands/login.js +3 -14
- package/dist/commands/onboarding.d.ts +0 -26
- package/dist/commands/onboarding.js +4 -221
- package/dist/commands/origin-request.d.ts +0 -4
- package/dist/commands/origin-request.js +0 -4
- package/dist/services/browser-fetch/device-emulation.d.ts +0 -11
- package/dist/services/browser-fetch/device-emulation.js +0 -14
- package/dist/services/bundler/bundle-service-factory.d.ts +3 -0
- package/dist/services/bundler/bundle-service-factory.js +5 -1
- package/dist/services/bundler/bundle-service.d.ts +10 -1
- package/dist/services/bundler/bundle-service.js +16 -1
- package/dist/services/bundler/error/packjockel-error.d.ts +3 -0
- package/dist/services/bundler/error/packjockel-error.js +3 -0
- package/dist/services/bundler/index.d.ts +1 -0
- package/dist/services/bundler/index.js +1 -0
- package/dist/services/bundler/packjockel-service.d.ts +112 -0
- package/dist/services/bundler/packjockel-service.js +202 -0
- package/dist/services/bundler/spec/packjockel-service.spec.js +186 -0
- package/dist/services/cli/cli-environment-factory.d.ts +0 -3
- package/dist/services/cli/cli-environment-factory.js +0 -1
- package/dist/services/cli/cli-service-build-context.d.ts +0 -3
- package/dist/services/cli/cli-service-factory.js +1 -1
- package/dist/services/cli/cli-service-model.d.ts +10 -29
- package/dist/services/cli/cli-service.d.ts +11 -60
- package/dist/services/cli/cli-service.js +32 -196
- package/dist/services/cli/index.d.ts +0 -2
- package/dist/services/cli/index.js +0 -2
- package/dist/services/cli/spec/cli-service.spec.js +50 -113
- package/dist/services/deploy/checks/activation/customer-approval-check.js +1 -1
- package/dist/services/deploy/checks/pre-deploy/device-detection-changed-check.js +2 -3
- package/dist/services/deploy/checks/pre-deploy/split-change-check.js +2 -3
- package/dist/services/deploy/handler/customer-config-handler.d.ts +9 -0
- package/dist/services/deploy/handler/customer-config-handler.js +41 -6
- package/dist/services/deploy/interface/install.d.ts +7 -1
- package/dist/services/deploy/mr/live-state-check.js +21 -2
- package/dist/services/deploy/policy/auto-deploy-policy.js +2 -0
- package/dist/services/deploy/policy/deploy-policy-model.d.ts +4 -0
- package/dist/services/deploy/policy/deploy-policy-model.js +4 -0
- package/dist/services/deploy/policy/testing-deploy-policy.js +2 -0
- package/dist/services/deploy/spec/handler/customer-config-handler.spec.js +98 -0
- package/dist/services/deploy/spec/mr/live-state-check.spec.js +45 -4
- package/dist/services/deploy/spec/policy/auto-deploy-policy.spec.js +2 -0
- package/dist/services/deploy/spec/policy/testing-deploy-policy.spec.js +3 -1
- package/dist/services/diff/diff-service-build-context.d.ts +0 -12
- package/dist/services/diff/diff-service-build-context.js +1 -45
- package/dist/services/diff/diff-service-factory.d.ts +0 -2
- package/dist/services/diff/diff-service-factory.js +25 -65
- package/dist/services/diff/diff-service.d.ts +0 -11
- package/dist/services/diff/diff-service.js +11 -37
- package/dist/services/diff/page-source.d.ts +0 -12
- package/dist/services/diff/page-source.js +11 -16
- package/dist/services/diff/sinks/tool-diff-sink.d.ts +2 -3
- package/dist/services/diff/sinks/tool-diff-sink.js +2 -3
- package/dist/services/diff/spec/diff-service-build-context.spec.js +0 -19
- package/dist/services/diff/spec/diff-service.spec.js +0 -95
- package/dist/services/document-handler-runtime/document-handler-browser-mock.d.ts +13 -0
- package/dist/services/document-handler-runtime/document-handler-browser-mock.js +69 -0
- package/dist/services/document-handler-runtime/document-handler-server.d.ts +27 -0
- package/dist/services/document-handler-runtime/document-handler-server.js +112 -19
- package/dist/services/document-handler-runtime/spec/document-handler-browser-mock.spec.js +34 -0
- package/dist/services/git/git-repository.d.ts +0 -2
- package/dist/services/git/git-repository.js +0 -6
- package/dist/services/integration-api/customer-config-flags.js +0 -1
- package/dist/services/integration-api/integration-api-model.d.ts +4 -1
- package/dist/services/integration-api/spec/customer-config-file.spec.js +56 -0
- package/dist/services/integration-api/spec/speed-kit-config-file.spec.js +68 -8
- package/dist/services/integration-api/struct/customer-config-file.d.ts +15 -0
- package/dist/services/integration-api/struct/customer-config-file.js +42 -0
- package/dist/services/integration-api/struct/customer-config.d.ts +55 -1
- package/dist/services/integration-api/struct/customer-config.js +70 -3
- package/dist/services/integration-api/struct/speed-kit-config-file.d.ts +11 -4
- package/dist/services/integration-api/struct/speed-kit-config-file.js +31 -10
- package/dist/services/onboarding/browse/browse-service.d.ts +1 -13
- package/dist/services/onboarding/browse/browse-service.js +7 -43
- package/dist/services/onboarding/browser/baqend-response.d.ts +1 -17
- package/dist/services/onboarding/browser/baqend-response.js +0 -23
- package/dist/services/onboarding/browser/emulate-device.d.ts +1 -12
- package/dist/services/onboarding/browser/emulate-device.js +13 -68
- package/dist/services/onboarding/browser/executable/executable-validator.js +2 -4
- package/dist/services/onboarding/browser/extension/extension-bridge.js +3 -5
- package/dist/services/onboarding/browser/extension/extension-downloader.js +8 -17
- package/dist/services/onboarding/browser/extension/extension-validator.js +4 -9
- package/dist/services/onboarding/browser/launch-browser.d.ts +1 -2
- package/dist/services/onboarding/browser/launch-browser.js +1 -6
- package/dist/services/onboarding/config-renderer/speed-kit-install-context.d.ts +2 -0
- package/dist/services/onboarding/config-renderer/speed-kit-install-context.js +29 -8
- package/dist/services/onboarding/dashboard/diff-against-current-page.js +1 -3
- package/dist/services/onboarding/dashboard/index.js +2 -7
- package/dist/services/onboarding/fetch-event-handler.d.ts +5 -24
- package/dist/services/onboarding/fetch-event-handler.js +32 -103
- package/dist/services/onboarding/fetch-events/spec/speed-kit-install-js.spec.js +59 -0
- package/dist/services/onboarding/fetch-events/speed-kit-install-js.js +7 -14
- package/dist/services/onboarding/fetch-events/speed-kit-rum-pi-request.d.ts +0 -14
- package/dist/services/onboarding/fetch-events/speed-kit-rum-pi-request.js +0 -30
- package/dist/services/onboarding/fetch-events/speed-kit-service-worker-js.d.ts +3 -14
- package/dist/services/onboarding/fetch-events/speed-kit-service-worker-js.js +10 -29
- package/dist/services/onboarding/file-events/file-watcher.d.ts +4 -43
- package/dist/services/onboarding/file-events/file-watcher.js +21 -119
- package/dist/services/onboarding/inject/inject-service.js +1 -1
- package/dist/services/onboarding/onboarding-model.d.ts +7 -40
- package/dist/services/onboarding/onboarding-model.js +9 -20
- package/dist/services/onboarding/onboarding-service-build-context.d.ts +0 -4
- package/dist/services/onboarding/onboarding-service-build-context.js +1 -7
- package/dist/services/onboarding/onboarding-service-factory.d.ts +1 -17
- package/dist/services/onboarding/onboarding-service-factory.js +35 -152
- package/dist/services/onboarding/onboarding-service.d.ts +1 -40
- package/dist/services/onboarding/onboarding-service.js +23 -139
- package/dist/services/onboarding/request-cache/cache.d.ts +5 -62
- package/dist/services/onboarding/request-cache/cache.js +17 -128
- package/dist/services/onboarding/spec/file-events/file-watcher.spec.js +67 -0
- package/dist/services/onboarding/spec/onboarding-model.spec.js +3 -39
- package/dist/services/onboarding/spec/onboarding-service-factory.spec.js +1 -25
- package/dist/services/onboarding/templates/install-speed-kit-js-template.js +5 -0
- package/dist/services/onboarding/todo-collector.d.ts +2 -7
- package/dist/services/onboarding/todo-collector.js +12 -49
- package/dist/services/onboarding/virtual-orestes-app/index.d.ts +0 -38
- package/dist/services/onboarding/virtual-orestes-app/index.js +27 -113
- package/dist/services/origin-request/asset-variations.d.ts +0 -14
- package/dist/services/origin-request/asset-variations.js +4 -11
- package/dist/services/origin-request/origin-fetcher.d.ts +0 -7
- package/dist/services/origin-request/origin-fetcher.js +5 -43
- package/dist/services/origin-request/origin-request-service-build-context.d.ts +0 -17
- package/dist/services/origin-request/origin-request-service-build-context.js +0 -8
- package/dist/services/origin-request/origin-request-service-factory.d.ts +5 -0
- package/dist/services/origin-request/origin-request-service-factory.js +30 -2
- package/dist/services/origin-request/origin-request-service.d.ts +6 -121
- package/dist/services/origin-request/origin-request-service.js +49 -273
- package/dist/services/origin-request/runtime-config-source.d.ts +0 -6
- package/dist/services/origin-request/runtime-config-source.js +4 -15
- package/dist/services/origin-request/spec/asset-variations.spec.js +0 -20
- package/dist/services/origin-request/spec/origin-request-service.spec.js +6 -329
- package/dist/services/pull/pull-service.js +23 -5
- package/dist/services/query-builder/query-builder-factory.js +3 -3
- package/dist/services/setup/os/tool-registry.js +2 -2
- package/oclif.manifest.json +269 -3390
- package/package.json +3 -20
- package/dist/base/run-control-command.d.ts +0 -15
- package/dist/base/run-control-command.js +0 -20
- package/dist/build-info.json +0 -6
- package/dist/commands/onboarding/browser/click.d.ts +0 -75
- package/dist/commands/onboarding/browser/click.js +0 -19
- package/dist/commands/onboarding/browser/emulate.d.ts +0 -105
- package/dist/commands/onboarding/browser/emulate.js +0 -26
- package/dist/commands/onboarding/browser/navigate.d.ts +0 -75
- package/dist/commands/onboarding/browser/navigate.js +0 -19
- package/dist/commands/onboarding/browser/panel.d.ts +0 -63
- package/dist/commands/onboarding/browser/panel.js +0 -12
- package/dist/commands/onboarding/browser/reinstall-sw.d.ts +0 -63
- package/dist/commands/onboarding/browser/reinstall-sw.js +0 -14
- package/dist/commands/onboarding/browser/reset.d.ts +0 -71
- package/dist/commands/onboarding/browser/reset.js +0 -18
- package/dist/commands/onboarding/browser/screenshot.d.ts +0 -77
- package/dist/commands/onboarding/browser/screenshot.js +0 -19
- package/dist/commands/onboarding/browser/state.d.ts +0 -63
- package/dist/commands/onboarding/browser/state.js +0 -12
- package/dist/commands/onboarding/browser/tabs.d.ts +0 -58
- package/dist/commands/onboarding/browser/tabs.js +0 -16
- package/dist/commands/onboarding/cache/clear.d.ts +0 -58
- package/dist/commands/onboarding/cache/clear.js +0 -12
- package/dist/commands/onboarding/cache/errors.d.ts +0 -58
- package/dist/commands/onboarding/cache/errors.js +0 -12
- package/dist/commands/onboarding/cache/evict.d.ts +0 -62
- package/dist/commands/onboarding/cache/evict.js +0 -15
- package/dist/commands/onboarding/cache/get.d.ts +0 -85
- package/dist/commands/onboarding/cache/get.js +0 -17
- package/dist/commands/onboarding/cache/list.d.ts +0 -58
- package/dist/commands/onboarding/cache/list.js +0 -15
- package/dist/commands/onboarding/cache/prewarm.d.ts +0 -73
- package/dist/commands/onboarding/cache/prewarm.js +0 -20
- package/dist/commands/onboarding/cache/refresh.d.ts +0 -62
- package/dist/commands/onboarding/cache/refresh.js +0 -18
- package/dist/commands/onboarding/cdp.d.ts +0 -81
- package/dist/commands/onboarding/cdp.js +0 -18
- package/dist/commands/onboarding/debug/arm.d.ts +0 -83
- package/dist/commands/onboarding/debug/arm.js +0 -19
- package/dist/commands/onboarding/debug/await.d.ts +0 -71
- package/dist/commands/onboarding/debug/await.js +0 -18
- package/dist/commands/onboarding/debug/disarm.d.ts +0 -63
- package/dist/commands/onboarding/debug/disarm.js +0 -12
- package/dist/commands/onboarding/debug/eval.d.ts +0 -75
- package/dist/commands/onboarding/debug/eval.js +0 -16
- package/dist/commands/onboarding/debug/release.d.ts +0 -63
- package/dist/commands/onboarding/debug/release.js +0 -12
- package/dist/commands/onboarding/debug/resume.d.ts +0 -63
- package/dist/commands/onboarding/debug/resume.js +0 -12
- package/dist/commands/onboarding/debug/status.d.ts +0 -63
- package/dist/commands/onboarding/debug/status.js +0 -12
- package/dist/commands/onboarding/debug/step.d.ts +0 -67
- package/dist/commands/onboarding/debug/step.js +0 -15
- package/dist/commands/onboarding/files/list.d.ts +0 -58
- package/dist/commands/onboarding/files/list.js +0 -12
- package/dist/commands/onboarding/files/read.d.ts +0 -73
- package/dist/commands/onboarding/files/read.js +0 -16
- package/dist/commands/onboarding/files/rebuild.d.ts +0 -63
- package/dist/commands/onboarding/files/rebuild.js +0 -18
- package/dist/commands/onboarding/files/validate.d.ts +0 -58
- package/dist/commands/onboarding/files/validate.js +0 -12
- package/dist/commands/onboarding/fouc.d.ts +0 -77
- package/dist/commands/onboarding/fouc.js +0 -16
- package/dist/commands/onboarding/inject/add.d.ts +0 -89
- package/dist/commands/onboarding/inject/add.js +0 -17
- package/dist/commands/onboarding/inject/clear.d.ts +0 -63
- package/dist/commands/onboarding/inject/clear.js +0 -12
- package/dist/commands/onboarding/inject/list.d.ts +0 -63
- package/dist/commands/onboarding/inject/list.js +0 -12
- package/dist/commands/onboarding/inject/read.d.ts +0 -75
- package/dist/commands/onboarding/inject/read.js +0 -18
- package/dist/commands/onboarding/inject/recipes.d.ts +0 -63
- package/dist/commands/onboarding/inject/recipes.js +0 -12
- package/dist/commands/onboarding/inject/remove.d.ts +0 -67
- package/dist/commands/onboarding/inject/remove.js +0 -15
- package/dist/commands/onboarding/list.d.ts +0 -13
- package/dist/commands/onboarding/list.js +0 -12
- package/dist/commands/onboarding/logs.d.ts +0 -41
- package/dist/commands/onboarding/logs.js +0 -257
- package/dist/commands/onboarding/navwalk.d.ts +0 -95
- package/dist/commands/onboarding/navwalk.js +0 -19
- package/dist/commands/onboarding/response.d.ts +0 -67
- package/dist/commands/onboarding/response.js +0 -18
- package/dist/commands/onboarding/rum/beacons.d.ts +0 -75
- package/dist/commands/onboarding/rum/beacons.js +0 -16
- package/dist/commands/onboarding/rum/get.d.ts +0 -77
- package/dist/commands/onboarding/rum/get.js +0 -18
- package/dist/commands/onboarding/rum/key.d.ts +0 -67
- package/dist/commands/onboarding/rum/key.js +0 -13
- package/dist/commands/onboarding/rum/previous.d.ts +0 -63
- package/dist/commands/onboarding/rum/previous.js +0 -12
- package/dist/commands/onboarding/status.d.ts +0 -13
- package/dist/commands/onboarding/status.js +0 -17
- package/dist/commands/onboarding/stop.d.ts +0 -13
- package/dist/commands/onboarding/stop.js +0 -17
- package/dist/commands/onboarding/todo.d.ts +0 -58
- package/dist/commands/onboarding/todo.js +0 -12
- package/dist/commands/onboarding/viewport.d.ts +0 -101
- package/dist/commands/onboarding/viewport.js +0 -18
- package/dist/commands/onboarding/watch.d.ts +0 -93
- package/dist/commands/onboarding/watch.js +0 -16
- package/dist/commands/spec/onboarding.spec.js +0 -127
- package/dist/services/cli/build-info.d.ts +0 -33
- package/dist/services/cli/build-info.js +0 -63
- package/dist/services/cli/sink.d.ts +0 -47
- package/dist/services/cli/sink.js +0 -31
- package/dist/services/cli/spec/build-identity.spec.js +0 -85
- package/dist/services/cli/spec/build-info.spec.js +0 -10
- package/dist/services/cli/spec/cli-service-log.spec.js +0 -133
- package/dist/services/cli/spec/memory-cli.d.ts +0 -9
- package/dist/services/cli/spec/memory-cli.js +0 -9
- package/dist/services/diff/config-at-ref.d.ts +0 -20
- package/dist/services/diff/config-at-ref.js +0 -33
- package/dist/services/diff/run-runtime-config.d.ts +0 -33
- package/dist/services/diff/run-runtime-config.js +0 -74
- package/dist/services/diff/spec/config-at-ref.spec.js +0 -46
- package/dist/services/diff/spec/run-runtime-config.spec.js +0 -87
- package/dist/services/onboarding/browser/answer-dialogs.d.ts +0 -12
- package/dist/services/onboarding/browser/answer-dialogs.js +0 -25
- package/dist/services/onboarding/browser/console-log.d.ts +0 -9
- package/dist/services/onboarding/browser/console-log.js +0 -27
- package/dist/services/onboarding/browser/resume-restarted-workers.d.ts +0 -14
- package/dist/services/onboarding/browser/resume-restarted-workers.js +0 -26
- package/dist/services/onboarding/control/body-inspect.d.ts +0 -24
- package/dist/services/onboarding/control/body-inspect.js +0 -106
- package/dist/services/onboarding/control/browser-session.d.ts +0 -547
- package/dist/services/onboarding/control/browser-session.js +0 -1337
- package/dist/services/onboarding/control/config-validation.d.ts +0 -17
- package/dist/services/onboarding/control/config-validation.js +0 -46
- package/dist/services/onboarding/control/control-protocol.d.ts +0 -1430
- package/dist/services/onboarding/control/control-protocol.js +0 -58
- package/dist/services/onboarding/control/control-server.d.ts +0 -292
- package/dist/services/onboarding/control/control-server.js +0 -1629
- package/dist/services/onboarding/control/debug-session.d.ts +0 -219
- package/dist/services/onboarding/control/debug-session.js +0 -897
- package/dist/services/onboarding/control/fouc.d.ts +0 -23
- package/dist/services/onboarding/control/fouc.js +0 -151
- package/dist/services/onboarding/control/index.d.ts +0 -4
- package/dist/services/onboarding/control/index.js +0 -4
- package/dist/services/onboarding/control/navigate-wait.d.ts +0 -33
- package/dist/services/onboarding/control/navigate-wait.js +0 -56
- package/dist/services/onboarding/control/navwalk.d.ts +0 -65
- package/dist/services/onboarding/control/navwalk.js +0 -248
- package/dist/services/onboarding/control/preload-registry.d.ts +0 -150
- package/dist/services/onboarding/control/preload-registry.js +0 -829
- package/dist/services/onboarding/control/response-explainer.d.ts +0 -24
- package/dist/services/onboarding/control/response-explainer.js +0 -257
- package/dist/services/onboarding/control/rum.d.ts +0 -8
- package/dist/services/onboarding/control/rum.js +0 -220
- package/dist/services/onboarding/control/service-worker-tracker.d.ts +0 -68
- package/dist/services/onboarding/control/service-worker-tracker.js +0 -120
- package/dist/services/onboarding/control/viewport.d.ts +0 -45
- package/dist/services/onboarding/control/viewport.js +0 -344
- package/dist/services/onboarding/control/watch.d.ts +0 -26
- package/dist/services/onboarding/control/watch.js +0 -157
- package/dist/services/onboarding/request-cache/asset-key.d.ts +0 -61
- package/dist/services/onboarding/request-cache/asset-key.js +0 -115
- package/dist/services/onboarding/spec/browser/answer-dialogs.spec.d.ts +0 -1
- package/dist/services/onboarding/spec/browser/answer-dialogs.spec.js +0 -66
- package/dist/services/onboarding/spec/browser/console-log.spec.d.ts +0 -1
- package/dist/services/onboarding/spec/browser/console-log.spec.js +0 -42
- package/dist/services/onboarding/spec/browser/resume-restarted-workers.spec.d.ts +0 -1
- package/dist/services/onboarding/spec/browser/resume-restarted-workers.spec.js +0 -45
- package/dist/services/onboarding/spec/control/browser-session.spec.d.ts +0 -1
- package/dist/services/onboarding/spec/control/browser-session.spec.js +0 -753
- package/dist/services/onboarding/spec/control/control-server.spec.d.ts +0 -1
- package/dist/services/onboarding/spec/control/control-server.spec.js +0 -371
- package/dist/services/onboarding/spec/control/debug-session.spec.d.ts +0 -1
- package/dist/services/onboarding/spec/control/debug-session.spec.js +0 -751
- package/dist/services/onboarding/spec/control/fakes.d.ts +0 -31
- package/dist/services/onboarding/spec/control/fakes.js +0 -67
- package/dist/services/onboarding/spec/control/fouc.spec.d.ts +0 -1
- package/dist/services/onboarding/spec/control/fouc.spec.js +0 -167
- package/dist/services/onboarding/spec/control/navigate-wait.spec.d.ts +0 -1
- package/dist/services/onboarding/spec/control/navigate-wait.spec.js +0 -47
- package/dist/services/onboarding/spec/control/navwalk.spec.d.ts +0 -1
- package/dist/services/onboarding/spec/control/navwalk.spec.js +0 -222
- package/dist/services/onboarding/spec/control/preload-registry.spec.d.ts +0 -1
- package/dist/services/onboarding/spec/control/preload-registry.spec.js +0 -432
- package/dist/services/onboarding/spec/control/response-explainer.spec.d.ts +0 -1
- package/dist/services/onboarding/spec/control/response-explainer.spec.js +0 -324
- package/dist/services/onboarding/spec/control/rum.spec.d.ts +0 -1
- package/dist/services/onboarding/spec/control/rum.spec.js +0 -222
- package/dist/services/onboarding/spec/control/service-worker-tracker.spec.d.ts +0 -1
- package/dist/services/onboarding/spec/control/service-worker-tracker.spec.js +0 -193
- package/dist/services/onboarding/spec/control/viewport.spec.d.ts +0 -1
- package/dist/services/onboarding/spec/control/viewport.spec.js +0 -200
- package/dist/services/onboarding/spec/control/watch.spec.d.ts +0 -1
- package/dist/services/onboarding/spec/control/watch.spec.js +0 -187
- package/dist/services/onboarding/spec/fetch-event-handler.spec.d.ts +0 -1
- package/dist/services/onboarding/spec/fetch-event-handler.spec.js +0 -219
- package/dist/services/onboarding/spec/fetch-events/speed-kit-service-worker-js.spec.d.ts +0 -1
- package/dist/services/onboarding/spec/fetch-events/speed-kit-service-worker-js.spec.js +0 -41
- package/dist/services/onboarding/spec/request-cache/cache.spec.d.ts +0 -1
- package/dist/services/onboarding/spec/request-cache/cache.spec.js +0 -107
- package/dist/services/onboarding/spec/todo-collector.spec.d.ts +0 -1
- package/dist/services/onboarding/spec/todo-collector.spec.js +0 -136
- package/dist/services/onboarding/spec/virtual-orestes-app/virtual-orestes-app.spec.d.ts +0 -1
- package/dist/services/onboarding/spec/virtual-orestes-app/virtual-orestes-app.spec.js +0 -65
- package/dist/services/query-builder/rules/rule-match.d.ts +0 -35
- package/dist/services/query-builder/rules/rule-match.js +0 -70
- package/dist/services/query-builder/spec/rules/rule-match.spec.d.ts +0 -1
- package/dist/services/query-builder/spec/rules/rule-match.spec.js +0 -121
- package/dist/services/run-control/browser/run-browser-contexts.d.ts +0 -557
- package/dist/services/run-control/browser/run-browser-contexts.js +0 -91
- package/dist/services/run-control/browser/run-browser-service-factory.d.ts +0 -5
- package/dist/services/run-control/browser/run-browser-service-factory.js +0 -7
- package/dist/services/run-control/browser/run-browser-service.d.ts +0 -68
- package/dist/services/run-control/browser/run-browser-service.js +0 -206
- package/dist/services/run-control/cache/run-cache-contexts.d.ts +0 -349
- package/dist/services/run-control/cache/run-cache-contexts.js +0 -51
- package/dist/services/run-control/cache/run-cache-service-factory.d.ts +0 -6
- package/dist/services/run-control/cache/run-cache-service-factory.js +0 -12
- package/dist/services/run-control/cache/run-cache-service.d.ts +0 -35
- package/dist/services/run-control/cache/run-cache-service.js +0 -151
- package/dist/services/run-control/control-client.d.ts +0 -36
- package/dist/services/run-control/control-client.js +0 -147
- package/dist/services/run-control/debug/run-debug-contexts.d.ts +0 -416
- package/dist/services/run-control/debug/run-debug-contexts.js +0 -47
- package/dist/services/run-control/debug/run-debug-service-factory.d.ts +0 -5
- package/dist/services/run-control/debug/run-debug-service-factory.js +0 -7
- package/dist/services/run-control/debug/run-debug-service.d.ts +0 -39
- package/dist/services/run-control/debug/run-debug-service.js +0 -164
- package/dist/services/run-control/files/run-files-contexts.d.ts +0 -238
- package/dist/services/run-control/files/run-files-contexts.js +0 -26
- package/dist/services/run-control/files/run-files-service-factory.d.ts +0 -5
- package/dist/services/run-control/files/run-files-service-factory.js +0 -7
- package/dist/services/run-control/files/run-files-service.d.ts +0 -29
- package/dist/services/run-control/files/run-files-service.js +0 -120
- package/dist/services/run-control/index.d.ts +0 -32
- package/dist/services/run-control/index.js +0 -31
- package/dist/services/run-control/inject/run-inject-contexts.d.ts +0 -319
- package/dist/services/run-control/inject/run-inject-contexts.js +0 -38
- package/dist/services/run-control/inject/run-inject-service-factory.d.ts +0 -5
- package/dist/services/run-control/inject/run-inject-service-factory.js +0 -7
- package/dist/services/run-control/inject/run-inject-service.d.ts +0 -31
- package/dist/services/run-control/inject/run-inject-service.js +0 -227
- package/dist/services/run-control/live-run.d.ts +0 -37
- package/dist/services/run-control/live-run.js +0 -56
- package/dist/services/run-control/probe/run-probe-contexts.d.ts +0 -333
- package/dist/services/run-control/probe/run-probe-contexts.js +0 -73
- package/dist/services/run-control/probe/run-probe-service-factory.d.ts +0 -5
- package/dist/services/run-control/probe/run-probe-service-factory.js +0 -7
- package/dist/services/run-control/probe/run-probe-service.d.ts +0 -54
- package/dist/services/run-control/probe/run-probe-service.js +0 -194
- package/dist/services/run-control/rum/run-rum-contexts.d.ts +0 -216
- package/dist/services/run-control/rum/run-rum-contexts.js +0 -34
- package/dist/services/run-control/rum/run-rum-service-factory.d.ts +0 -5
- package/dist/services/run-control/rum/run-rum-service-factory.js +0 -7
- package/dist/services/run-control/rum/run-rum-service.d.ts +0 -36
- package/dist/services/run-control/rum/run-rum-service.js +0 -122
- package/dist/services/run-control/run-answer.d.ts +0 -28
- package/dist/services/run-control/run-answer.js +0 -58
- package/dist/services/run-control/run-control-context.d.ts +0 -102
- package/dist/services/run-control/run-control-context.js +0 -36
- package/dist/services/run-control/run-control-flags.d.ts +0 -12
- package/dist/services/run-control/run-control-flags.js +0 -22
- package/dist/services/run-control/run-control-model.d.ts +0 -9
- package/dist/services/run-control/run-control-model.js +0 -1
- package/dist/services/run-control/run-control-service-factory.d.ts +0 -14
- package/dist/services/run-control/run-control-service-factory.js +0 -26
- package/dist/services/run-control/session/run-session-contexts.d.ts +0 -25
- package/dist/services/run-control/session/run-session-contexts.js +0 -20
- package/dist/services/run-control/session/run-session-service-factory.d.ts +0 -8
- package/dist/services/run-control/session/run-session-service-factory.js +0 -18
- package/dist/services/run-control/session/run-session-service.d.ts +0 -32
- package/dist/services/run-control/session/run-session-service.js +0 -151
- package/dist/services/run-control/spec/browser/run-browser-service.spec.d.ts +0 -1
- package/dist/services/run-control/spec/browser/run-browser-service.spec.js +0 -328
- package/dist/services/run-control/spec/cache/run-cache-service.spec.d.ts +0 -1
- package/dist/services/run-control/spec/cache/run-cache-service.spec.js +0 -454
- package/dist/services/run-control/spec/debug/run-debug-service.spec.d.ts +0 -1
- package/dist/services/run-control/spec/debug/run-debug-service.spec.js +0 -113
- package/dist/services/run-control/spec/files/run-files-service.spec.d.ts +0 -1
- package/dist/services/run-control/spec/files/run-files-service.spec.js +0 -234
- package/dist/services/run-control/spec/inject/run-inject-service.spec.d.ts +0 -1
- package/dist/services/run-control/spec/inject/run-inject-service.spec.js +0 -251
- package/dist/services/run-control/spec/live-run-fixture.d.ts +0 -32
- package/dist/services/run-control/spec/live-run-fixture.js +0 -109
- package/dist/services/run-control/spec/probe/run-probe-service.spec.d.ts +0 -1
- package/dist/services/run-control/spec/probe/run-probe-service.spec.js +0 -108
- package/dist/services/run-control/spec/rum/run-rum-service.spec.d.ts +0 -1
- package/dist/services/run-control/spec/rum/run-rum-service.spec.js +0 -47
- package/dist/services/run-control/spec/run-answer.spec.d.ts +0 -1
- package/dist/services/run-control/spec/run-answer.spec.js +0 -57
- package/dist/services/run-control/spec/session/run-session-service.spec.d.ts +0 -1
- package/dist/services/run-control/spec/session/run-session-service.spec.js +0 -150
- package/dist/services/run-log/crash-mirror.d.ts +0 -31
- package/dist/services/run-log/crash-mirror.js +0 -69
- package/dist/services/run-log/index.d.ts +0 -11
- package/dist/services/run-log/index.js +0 -11
- package/dist/services/run-log/jsonl-appender.d.ts +0 -46
- package/dist/services/run-log/jsonl-appender.js +0 -91
- package/dist/services/run-log/log-event-model.d.ts +0 -104
- package/dist/services/run-log/log-event-model.js +0 -56
- package/dist/services/run-log/log-query-service-factory.d.ts +0 -11
- package/dist/services/run-log/log-query-service-factory.js +0 -14
- package/dist/services/run-log/log-query-service.d.ts +0 -59
- package/dist/services/run-log/log-query-service.js +0 -111
- package/dist/services/run-log/log-reader.d.ts +0 -84
- package/dist/services/run-log/log-reader.js +0 -180
- package/dist/services/run-log/log-summary.d.ts +0 -72
- package/dist/services/run-log/log-summary.js +0 -208
- package/dist/services/run-log/redaction.d.ts +0 -34
- package/dist/services/run-log/redaction.js +0 -124
- package/dist/services/run-log/request-log.d.ts +0 -82
- package/dist/services/run-log/request-log.js +0 -69
- package/dist/services/run-log/request-summary.d.ts +0 -76
- package/dist/services/run-log/request-summary.js +0 -0
- package/dist/services/run-log/run-log.d.ts +0 -61
- package/dist/services/run-log/run-log.js +0 -102
- package/dist/services/run-log/spec/log-query-service.spec.d.ts +0 -1
- package/dist/services/run-log/spec/log-query-service.spec.js +0 -197
- package/dist/services/run-log/spec/log-reader.spec.d.ts +0 -1
- package/dist/services/run-log/spec/log-reader.spec.js +0 -109
- package/dist/services/run-log/spec/log-summary.spec.d.ts +0 -1
- package/dist/services/run-log/spec/log-summary.spec.js +0 -153
- package/dist/services/run-log/spec/redaction.spec.d.ts +0 -1
- package/dist/services/run-log/spec/redaction.spec.js +0 -61
- package/dist/services/run-log/spec/request-log.spec.d.ts +0 -1
- package/dist/services/run-log/spec/request-log.spec.js +0 -101
- package/dist/services/run-log/spec/request-summary.spec.d.ts +0 -1
- package/dist/services/run-log/spec/request-summary.spec.js +0 -171
- package/dist/services/run-log/spec/run-log.spec.d.ts +0 -1
- package/dist/services/run-log/spec/run-log.spec.js +0 -122
- package/dist/services/run-registry/exit-classification.d.ts +0 -39
- package/dist/services/run-registry/exit-classification.js +0 -42
- package/dist/services/run-registry/index.d.ts +0 -3
- package/dist/services/run-registry/index.js +0 -3
- package/dist/services/run-registry/process-identity.d.ts +0 -28
- package/dist/services/run-registry/process-identity.js +0 -80
- package/dist/services/run-registry/run-registry-model.d.ts +0 -128
- package/dist/services/run-registry/run-registry-model.js +0 -16
- package/dist/services/run-registry/run-registry.d.ts +0 -155
- package/dist/services/run-registry/run-registry.js +0 -430
- package/dist/services/run-registry/spec/exit-classification.spec.d.ts +0 -1
- package/dist/services/run-registry/spec/exit-classification.spec.js +0 -82
- package/dist/services/run-registry/spec/run-registry.spec.d.ts +0 -1
- package/dist/services/run-registry/spec/run-registry.spec.js +0 -526
- /package/dist/{commands/spec/onboarding.spec.d.ts → services/bundler/spec/packjockel-service.spec.d.ts} +0 -0
- /package/dist/services/{cli/spec/build-identity.spec.d.ts → deploy/spec/handler/customer-config-handler.spec.d.ts} +0 -0
- /package/dist/services/{cli/spec/build-info.spec.d.ts → document-handler-runtime/spec/document-handler-browser-mock.spec.d.ts} +0 -0
- /package/dist/services/{cli/spec/cli-service-log.spec.d.ts → integration-api/spec/customer-config-file.spec.d.ts} +0 -0
- /package/dist/services/{diff/spec/config-at-ref.spec.d.ts → onboarding/fetch-events/spec/speed-kit-install-js.spec.d.ts} +0 -0
- /package/dist/services/{diff/spec/run-runtime-config.spec.d.ts → onboarding/spec/file-events/file-watcher.spec.d.ts} +0 -0
|
@@ -1,67 +1,58 @@
|
|
|
1
1
|
import { expect } from "chai";
|
|
2
2
|
import { afterEach, beforeEach, describe, it } from "mocha";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
3
|
+
import { CliService } from "../cli-service.js";
|
|
4
|
+
import { ClipboardService } from "../clipboard/index.js";
|
|
5
|
+
/** What a CI runner looks like to the CLI: no spinner can spin, nobody to ask. */
|
|
6
|
+
const CI_TERMINAL = { isCI: true, nonInteractive: true };
|
|
7
|
+
/** The lines a block of work put on stdout. */
|
|
8
|
+
function captured(work) {
|
|
9
|
+
const lines = [];
|
|
10
|
+
const log = console.log;
|
|
11
|
+
console.log = (line) => lines.push(line);
|
|
12
|
+
try {
|
|
13
|
+
work();
|
|
14
|
+
}
|
|
15
|
+
finally {
|
|
16
|
+
console.log = log;
|
|
17
|
+
}
|
|
18
|
+
return lines;
|
|
19
|
+
}
|
|
5
20
|
describe("CliService actions without a terminal", () => {
|
|
6
|
-
let sink;
|
|
7
|
-
beforeEach(() => {
|
|
8
|
-
sink = new MemorySink();
|
|
9
|
-
});
|
|
10
21
|
it("should say nothing while an action runs", () => {
|
|
11
|
-
const cli =
|
|
12
|
-
cli.startAction("BUILD", "build prewarm-query");
|
|
13
|
-
expect(sink.lines).to.have.lengthOf(0);
|
|
22
|
+
const cli = new CliService(new ClipboardService(), CI_TERMINAL);
|
|
23
|
+
expect(captured(() => cli.startAction("BUILD", "build prewarm-query"))).to.have.lengthOf(0);
|
|
14
24
|
});
|
|
15
25
|
it("should log an action that ended exactly once", () => {
|
|
16
26
|
// Spinnies re-renders every spinner it knows on each update when it cannot
|
|
17
27
|
// animate, so a running action reappears under each later one — a job with
|
|
18
28
|
// four actions logged "build prewarm-query" four times.
|
|
19
|
-
const cli =
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
expect(
|
|
27
|
-
expect(
|
|
29
|
+
const cli = new CliService(new ClipboardService(), CI_TERMINAL);
|
|
30
|
+
const lines = captured(() => {
|
|
31
|
+
cli.startAction("BUILD", "build prewarm-query");
|
|
32
|
+
cli.successAction("BUILD");
|
|
33
|
+
cli.startAction("QUERY", "execute athena query");
|
|
34
|
+
cli.failAction("QUERY");
|
|
35
|
+
});
|
|
36
|
+
expect(lines).to.have.lengthOf(2);
|
|
37
|
+
expect(lines[0]).to.contain("build prewarm-query");
|
|
38
|
+
expect(lines[1]).to.contain("execute athena query");
|
|
39
|
+
expect(lines.join("\n")).to.not.contain("build prewarm-query\n✖ execute athena query\n✔ build prewarm-query");
|
|
28
40
|
});
|
|
29
41
|
it("should keep the text of the action it ends", () => {
|
|
30
|
-
const cli =
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
42
|
+
const cli = new CliService(new ClipboardService(), CI_TERMINAL);
|
|
43
|
+
const lines = captured(() => {
|
|
44
|
+
cli.startAction("WARM", "warm the list");
|
|
45
|
+
cli.endAction("WARM");
|
|
46
|
+
});
|
|
47
|
+
expect(lines).to.deep.equal(["- warm the list"]);
|
|
34
48
|
});
|
|
35
49
|
it("should stay silent when it was told to be quiet", () => {
|
|
36
|
-
const cli =
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
describe("CliService channels", () => {
|
|
43
|
-
it("should keep a payload off the line channel and asides off both", () => {
|
|
44
|
-
const sink = new MemorySink();
|
|
45
|
-
const cli = memoryCli(sink);
|
|
46
|
-
cli.write("a human line");
|
|
47
|
-
cli.pipe("SELECT 1");
|
|
48
|
-
cli.note("2 rules were reduced");
|
|
49
|
-
expect(sink.lines).to.deep.equal(["a human line"]);
|
|
50
|
-
expect(sink.payloads).to.deep.equal(["SELECT 1"]);
|
|
51
|
-
expect(sink.asides).to.deep.equal(["2 rules were reduced"]);
|
|
52
|
-
});
|
|
53
|
-
it("should not add a newline to a payload", () => {
|
|
54
|
-
const sink = new MemorySink();
|
|
55
|
-
const cli = memoryCli(sink);
|
|
56
|
-
cli.pipe("a\tb\n");
|
|
57
|
-
cli.pipe("c");
|
|
58
|
-
expect(sink.payloads.join("")).to.equal("a\tb\nc");
|
|
59
|
-
});
|
|
60
|
-
it("should write a payload even when quiet, because quiet is what asks for it", () => {
|
|
61
|
-
const sink = new MemorySink();
|
|
62
|
-
const cli = memoryCli(sink, true);
|
|
63
|
-
cli.pipe("SELECT 1");
|
|
64
|
-
expect(sink.payloads).to.deep.equal(["SELECT 1"]);
|
|
50
|
+
const cli = new CliService(new ClipboardService(), CI_TERMINAL, true);
|
|
51
|
+
const lines = captured(() => {
|
|
52
|
+
cli.startAction("BUILD", "build prewarm-query");
|
|
53
|
+
cli.successAction("BUILD");
|
|
54
|
+
});
|
|
55
|
+
expect(lines).to.have.lengthOf(0);
|
|
65
56
|
});
|
|
66
57
|
});
|
|
67
58
|
describe("CliService table", () => {
|
|
@@ -85,77 +76,23 @@ describe("CliService table", () => {
|
|
|
85
76
|
outcome: "alreadyDeployed",
|
|
86
77
|
reason: "commits after !8021 change config_documentHandler.js and config_dynamicStyles.css of this customer",
|
|
87
78
|
};
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
const sink = new MemorySink();
|
|
91
|
-
memoryCli(sink).table([row], {
|
|
79
|
+
it("keeps the short columns readable and wraps the long one", () => {
|
|
80
|
+
const lines = captured(() => new CliService(new ClipboardService(), CI_TERMINAL).table([row], {
|
|
92
81
|
customer: {},
|
|
93
82
|
outcome: {},
|
|
94
83
|
reason: {},
|
|
95
|
-
});
|
|
96
|
-
return sink.lines;
|
|
97
|
-
}
|
|
98
|
-
it("keeps the short columns readable and wraps the long one", () => {
|
|
99
|
-
const lines = tabled();
|
|
84
|
+
}));
|
|
100
85
|
expect(lines.join("\n")).to.contain("carhartt-wip-new");
|
|
101
86
|
expect(lines.join("\n")).to.contain("alreadyDeployed");
|
|
102
87
|
});
|
|
103
88
|
it("stays inside the terminal", () => {
|
|
104
|
-
const lines =
|
|
89
|
+
const lines = captured(() => new CliService(new ClipboardService(), CI_TERMINAL).table([row], {
|
|
90
|
+
customer: {},
|
|
91
|
+
outcome: {},
|
|
92
|
+
reason: {},
|
|
93
|
+
}));
|
|
105
94
|
for (const line of lines.join("\n").split("\n")) {
|
|
106
95
|
expect(line.length, line).to.be.at.most(80);
|
|
107
96
|
}
|
|
108
97
|
});
|
|
109
98
|
});
|
|
110
|
-
describe("CliService and the SIGINT listener", () => {
|
|
111
|
-
let saved;
|
|
112
|
-
beforeEach(() => {
|
|
113
|
-
// Start from a known-clean slate. Without this a listener spinnies left
|
|
114
|
-
// behind in an earlier case makes the count assertions pass by accident.
|
|
115
|
-
saved = process.rawListeners("SIGINT");
|
|
116
|
-
for (const listener of saved) {
|
|
117
|
-
process.off("SIGINT", listener);
|
|
118
|
-
}
|
|
119
|
-
});
|
|
120
|
-
afterEach(() => {
|
|
121
|
-
for (const listener of process.rawListeners("SIGINT")) {
|
|
122
|
-
process.off("SIGINT", listener);
|
|
123
|
-
}
|
|
124
|
-
for (const listener of saved) {
|
|
125
|
-
process.on("SIGINT", listener);
|
|
126
|
-
}
|
|
127
|
-
});
|
|
128
|
-
it("should leave a handler registered before it alone", () => {
|
|
129
|
-
// Spinnies' constructor calls process.removeAllListeners("SIGINT") and
|
|
130
|
-
// installs one that process.exit(0)s. `sk onboarding` registers its
|
|
131
|
-
// shutdown handler before the browser launches, so constructing a
|
|
132
|
-
// CliService used to delete it — silently, and three test sessions blamed
|
|
133
|
-
// the CLI's own handler for the result.
|
|
134
|
-
const ours = () => undefined;
|
|
135
|
-
process.on("SIGINT", ours);
|
|
136
|
-
try {
|
|
137
|
-
memoryCli();
|
|
138
|
-
expect(process.listeners("SIGINT")).to.contain(ours);
|
|
139
|
-
}
|
|
140
|
-
finally {
|
|
141
|
-
process.off("SIGINT", ours);
|
|
142
|
-
}
|
|
143
|
-
});
|
|
144
|
-
it("should not leave a listener of its own behind", () => {
|
|
145
|
-
memoryCli();
|
|
146
|
-
// Spinnies' handler would otherwise exit(0) on Ctrl+C, skipping every
|
|
147
|
-
// shutdown the CLI owns. The cursor it restored is restoreTerminal's job.
|
|
148
|
-
expect(process.listeners("SIGINT")).to.have.lengthOf(0);
|
|
149
|
-
});
|
|
150
|
-
it("should keep a once-registration a once-registration", () => {
|
|
151
|
-
const ours = () => undefined;
|
|
152
|
-
process.once("SIGINT", ours);
|
|
153
|
-
memoryCli();
|
|
154
|
-
// Deliberately asserted on the wrapper rather than by emitting a signal:
|
|
155
|
-
// if this regresses, the listener in place is spinnies' `process.exit(0)`,
|
|
156
|
-
// and emitting would take the test runner down with it instead of failing.
|
|
157
|
-
// Node marks a once-wrapper by hanging the original off `.listener`.
|
|
158
|
-
const [raw] = process.rawListeners("SIGINT");
|
|
159
|
-
expect(raw?.listener).to.equal(ours);
|
|
160
|
-
});
|
|
161
|
-
});
|
|
@@ -50,7 +50,7 @@ export class CustomerApprovalCheck {
|
|
|
50
50
|
const configFile = await VirtualSpeedKitConfigFile.createRemote(speedKitConfig, this.bundler);
|
|
51
51
|
const splits = [];
|
|
52
52
|
for (const origin of this.customer.origins) {
|
|
53
|
-
const result = await safe(configFile.evaluate(this.customer
|
|
53
|
+
const result = await safe(configFile.evaluate(this.customer, origin));
|
|
54
54
|
if (result.success === false) {
|
|
55
55
|
// An unreadable config is not proof that the split is 0, so keep the
|
|
56
56
|
// approval question rather than skipping it.
|
|
@@ -70,11 +70,10 @@ export class DeviceDetectionChangedCheck {
|
|
|
70
70
|
}
|
|
71
71
|
async checkForChangedDeviceDetection(speedKitConfigFile, activeSpeedKitConfig) {
|
|
72
72
|
const remoteConfigFile = await VirtualSpeedKitConfigFile.createRemote(activeSpeedKitConfig, this.bundler);
|
|
73
|
-
const app = this.customerConfig.app;
|
|
74
73
|
const origin = this.customerConfig.origins[0];
|
|
75
74
|
const changes = [];
|
|
76
|
-
const localSpeedKit = await speedKitConfigFile.evaluate(
|
|
77
|
-
const remoteSpeedKit = await remoteConfigFile.evaluate(
|
|
75
|
+
const localSpeedKit = await speedKitConfigFile.evaluate(this.customerConfig, origin);
|
|
76
|
+
const remoteSpeedKit = await remoteConfigFile.evaluate(this.customerConfig, origin);
|
|
78
77
|
if ((localSpeedKit.detectDevice && !remoteSpeedKit.detectDevice) ||
|
|
79
78
|
(!localSpeedKit.detectDevice && remoteSpeedKit.detectDevice)) {
|
|
80
79
|
changes.push("detectDevice");
|
|
@@ -63,11 +63,10 @@ export class SplitChangeCheck {
|
|
|
63
63
|
}
|
|
64
64
|
async checkSplitsForEachOrigin(speedKitConfigFile, activeSpeedKitConfig) {
|
|
65
65
|
const remoteConfigFile = await VirtualSpeedKitConfigFile.createRemote(activeSpeedKitConfig, this.bundler);
|
|
66
|
-
const app = this.customerConfig.app;
|
|
67
66
|
const changes = [];
|
|
68
67
|
for (const origin of this.customerConfig.origins) {
|
|
69
|
-
const localSpeedKit = await speedKitConfigFile.evaluate(
|
|
70
|
-
const remoteSpeedKit = await remoteConfigFile.evaluate(
|
|
68
|
+
const localSpeedKit = await speedKitConfigFile.evaluate(this.customerConfig, origin);
|
|
69
|
+
const remoteSpeedKit = await remoteConfigFile.evaluate(this.customerConfig, origin);
|
|
71
70
|
// check for split change
|
|
72
71
|
if (localSpeedKit.split !== remoteSpeedKit.split) {
|
|
73
72
|
changes.push({
|
|
@@ -13,9 +13,18 @@ export default class CustomerConfigHandler implements DeployHandlerInterface {
|
|
|
13
13
|
private cli;
|
|
14
14
|
private builder;
|
|
15
15
|
private policy;
|
|
16
|
+
/** The confirmed features that differ from the installation. */
|
|
17
|
+
private features;
|
|
18
|
+
/** The confirmed version tags that differ from the installation. */
|
|
19
|
+
private versions;
|
|
16
20
|
constructor(customer: CustomerConfig, configApi: ConfigApiService, configName: string, diffService: DiffEngine, cli: CliServiceInterface, builder: InstallResourceBuilder, policy: DeployPolicyInterface);
|
|
17
21
|
canHandle(type: FILE_TYPE): boolean;
|
|
18
22
|
handle(files: CustomerConfigFile[]): Promise<void>;
|
|
19
23
|
upload(files: CustomerConfigFile[]): Promise<void>;
|
|
24
|
+
/**
|
|
25
|
+
* The fields whose local value differs from the installation, once confirmed. A field that the
|
|
26
|
+
* config omits is `null`, so the diff shows its reset.
|
|
27
|
+
*/
|
|
28
|
+
private confirmChanges;
|
|
20
29
|
private handleMissingRemoteInstallResource;
|
|
21
30
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { FILE_TYPE, } from "../../integration-api/index.js";
|
|
1
|
+
import { changedFields, FILE_TYPE, VERSION_FIELDS, versionsOfConfig, versionsOfInstall, } from "../../integration-api/index.js";
|
|
2
2
|
import chalk from "chalk";
|
|
3
3
|
import { DeployQuestion } from "../policy/index.js";
|
|
4
4
|
import { DeployAbortedError } from "../error/deploy-aborted-error.js";
|
|
@@ -10,6 +10,10 @@ export default class CustomerConfigHandler {
|
|
|
10
10
|
cli;
|
|
11
11
|
builder;
|
|
12
12
|
policy;
|
|
13
|
+
/** The confirmed features that differ from the installation. */
|
|
14
|
+
features = {};
|
|
15
|
+
/** The confirmed version tags that differ from the installation. */
|
|
16
|
+
versions = {};
|
|
13
17
|
constructor(customer, configApi, configName, diffService, cli, builder, policy) {
|
|
14
18
|
this.customer = customer;
|
|
15
19
|
this.configApi = configApi;
|
|
@@ -26,6 +30,8 @@ export default class CustomerConfigHandler {
|
|
|
26
30
|
const installResource = await this.configApi.getActiveInstall(this.configName);
|
|
27
31
|
const file = files[0];
|
|
28
32
|
const config = file.config;
|
|
33
|
+
this.features = await this.confirmChanges(DeployQuestion.UpdateFeatures, "features", config.features, installResource?.features);
|
|
34
|
+
this.versions = await this.confirmChanges(DeployQuestion.UpdateVersions, "version tags", versionsOfConfig(config), versionsOfInstall(installResource));
|
|
29
35
|
if (!installResource) {
|
|
30
36
|
await this.handleMissingRemoteInstallResource(config);
|
|
31
37
|
this.cli.write("with origins:", true);
|
|
@@ -58,12 +64,41 @@ export default class CustomerConfigHandler {
|
|
|
58
64
|
async upload(files) {
|
|
59
65
|
const file = files[0];
|
|
60
66
|
const installResource = await this.builder.init(this.configName);
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
67
|
+
const updatesFeatures = Object.keys(this.features).length > 0;
|
|
68
|
+
const updatesVersions = Object.keys(this.versions).length > 0;
|
|
69
|
+
if (updatesFeatures) {
|
|
70
|
+
installResource.features = {
|
|
71
|
+
...installResource.features,
|
|
72
|
+
...this.features,
|
|
73
|
+
};
|
|
74
|
+
}
|
|
75
|
+
for (const [tag, value] of Object.entries(this.versions)) {
|
|
76
|
+
installResource[VERSION_FIELDS[tag]] = value;
|
|
77
|
+
}
|
|
78
|
+
// if installResource already exists its possible to skip the origin update
|
|
79
|
+
if (!file.shouldSkipFile()) {
|
|
80
|
+
installResource.origins = file.config.origins;
|
|
81
|
+
}
|
|
82
|
+
if (updatesFeatures || updatesVersions || !file.shouldSkipFile()) {
|
|
83
|
+
this.builder.merge(installResource);
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
/**
|
|
87
|
+
* The fields whose local value differs from the installation, once confirmed. A field that the
|
|
88
|
+
* config omits is `null`, so the diff shows its reset.
|
|
89
|
+
*/
|
|
90
|
+
async confirmChanges(question, label, local, live) {
|
|
91
|
+
const changed = changedFields(local, live);
|
|
92
|
+
if (Object.keys(changed).length === 0) {
|
|
93
|
+
return {};
|
|
94
|
+
}
|
|
95
|
+
// Unbuffered, so the diff shows before the question.
|
|
96
|
+
this.cli.write(`will update ${label}:`);
|
|
97
|
+
for (const [name, value] of Object.entries(changed)) {
|
|
98
|
+
this.cli.code(`${name}: ${JSON.stringify(live?.[name] ?? null)} -> ${JSON.stringify(value)}`);
|
|
64
99
|
}
|
|
65
|
-
|
|
66
|
-
|
|
100
|
+
const update = await this.policy.confirm(question, `Update ${label}?`, true);
|
|
101
|
+
return update ? changed : {};
|
|
67
102
|
}
|
|
68
103
|
async handleMissingRemoteInstallResource(config) {
|
|
69
104
|
const configName = config?.name || this.configName;
|
|
@@ -6,9 +6,15 @@ export default interface Install extends Partial<InstallConfigs<string>> {
|
|
|
6
6
|
createdAt?: Date;
|
|
7
7
|
updatedAt?: Date;
|
|
8
8
|
status?: string;
|
|
9
|
-
swVersion?: string;
|
|
9
|
+
swVersion?: string | null;
|
|
10
|
+
rumVersion?: string | null;
|
|
11
|
+
ppVersion?: string | null;
|
|
12
|
+
configPluginsVersion?: string | null;
|
|
13
|
+
documentHandlerVersion?: string | null;
|
|
10
14
|
domain: string;
|
|
11
15
|
configVersion?: number;
|
|
12
16
|
description?: string;
|
|
13
17
|
origins?: string[];
|
|
18
|
+
/** The feature flags, under the field names the installation stores. */
|
|
19
|
+
features?: Record<string, unknown>;
|
|
14
20
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { changedFields, versionsOfConfig, versionsOfInstall, } from "../../integration-api/index.js";
|
|
1
2
|
import { InstallResourceToFileMapping } from "../../pull/index.js";
|
|
2
3
|
/** How the live installation relates to the merge request. */
|
|
3
4
|
export var LiveState;
|
|
@@ -13,6 +14,10 @@ export var LiveState;
|
|
|
13
14
|
})(LiveState || (LiveState = {}));
|
|
14
15
|
/** The origins are one file of the comparison, under the name of their file. */
|
|
15
16
|
const ORIGINS = "config_customer(origins)";
|
|
17
|
+
/** The features are one file of the comparison, under the name of their file. */
|
|
18
|
+
const FEATURES = "config_customer(features)";
|
|
19
|
+
/** The version tags are one file of the comparison, under the name of their file. */
|
|
20
|
+
const VERSIONS = "config_customer(versions)";
|
|
16
21
|
/**
|
|
17
22
|
* Compares the live installation with the state before the merge request.
|
|
18
23
|
*
|
|
@@ -57,6 +62,12 @@ export class LiveStateCheck {
|
|
|
57
62
|
JSON.stringify([...right.origins].sort())) {
|
|
58
63
|
differences.push(ORIGINS);
|
|
59
64
|
}
|
|
65
|
+
if (Object.keys(changedFields(left.features, right.features)).length) {
|
|
66
|
+
differences.push(FEATURES);
|
|
67
|
+
}
|
|
68
|
+
if (Object.keys(changedFields(left.versions, right.versions)).length) {
|
|
69
|
+
differences.push(VERSIONS);
|
|
70
|
+
}
|
|
60
71
|
return differences;
|
|
61
72
|
}
|
|
62
73
|
stateOfFiles(files) {
|
|
@@ -66,9 +77,12 @@ export class LiveStateCheck {
|
|
|
66
77
|
contents[file.remoteKey] = file.getContent();
|
|
67
78
|
}
|
|
68
79
|
}
|
|
80
|
+
const config = files.getCustomerConfig()?.config;
|
|
69
81
|
return {
|
|
70
82
|
contents,
|
|
71
|
-
origins:
|
|
83
|
+
origins: config?.origins ?? [],
|
|
84
|
+
features: config?.features ?? {},
|
|
85
|
+
versions: versionsOfConfig(config),
|
|
72
86
|
};
|
|
73
87
|
}
|
|
74
88
|
stateOfInstall(install) {
|
|
@@ -76,6 +90,11 @@ export class LiveStateCheck {
|
|
|
76
90
|
for (const key of Object.keys(InstallResourceToFileMapping)) {
|
|
77
91
|
contents[key] = install[key] ?? "";
|
|
78
92
|
}
|
|
79
|
-
return {
|
|
93
|
+
return {
|
|
94
|
+
contents,
|
|
95
|
+
origins: install.origins ?? [],
|
|
96
|
+
features: install.features ?? {},
|
|
97
|
+
versions: versionsOfInstall(install),
|
|
98
|
+
};
|
|
80
99
|
}
|
|
81
100
|
}
|
|
@@ -53,6 +53,8 @@ export class AutoDeployPolicy {
|
|
|
53
53
|
// The reviewed change itself.
|
|
54
54
|
case DeployQuestion.UpdateFile:
|
|
55
55
|
case DeployQuestion.UpdateOrigins:
|
|
56
|
+
case DeployQuestion.UpdateFeatures:
|
|
57
|
+
case DeployQuestion.UpdateVersions:
|
|
56
58
|
case DeployQuestion.DeleteInstallResourceKey:
|
|
57
59
|
case DeployQuestion.UploadModules:
|
|
58
60
|
case DeployQuestion.UploadServerConfig: {
|
|
@@ -9,6 +9,10 @@ export declare enum DeployQuestion {
|
|
|
9
9
|
UpdateFile = "updateFile",
|
|
10
10
|
/** Take over the local origins into the installation. */
|
|
11
11
|
UpdateOrigins = "updateOrigins",
|
|
12
|
+
/** Take over the local feature flags into the installation. */
|
|
13
|
+
UpdateFeatures = "updateFeatures",
|
|
14
|
+
/** Take over the local version tags into the installation. */
|
|
15
|
+
UpdateVersions = "updateVersions",
|
|
12
16
|
/** Create a configuration that does not exist in the app yet. */
|
|
13
17
|
CreateConfig = "createConfig",
|
|
14
18
|
/** Drop a resource whose local file is gone. */
|
|
@@ -10,6 +10,10 @@ export var DeployQuestion;
|
|
|
10
10
|
DeployQuestion["UpdateFile"] = "updateFile";
|
|
11
11
|
/** Take over the local origins into the installation. */
|
|
12
12
|
DeployQuestion["UpdateOrigins"] = "updateOrigins";
|
|
13
|
+
/** Take over the local feature flags into the installation. */
|
|
14
|
+
DeployQuestion["UpdateFeatures"] = "updateFeatures";
|
|
15
|
+
/** Take over the local version tags into the installation. */
|
|
16
|
+
DeployQuestion["UpdateVersions"] = "updateVersions";
|
|
13
17
|
/** Create a configuration that does not exist in the app yet. */
|
|
14
18
|
DeployQuestion["CreateConfig"] = "createConfig";
|
|
15
19
|
/** Drop a resource whose local file is gone. */
|
|
@@ -18,6 +18,8 @@ export class TestingDeployPolicy {
|
|
|
18
18
|
// The content of the new installation.
|
|
19
19
|
case DeployQuestion.UpdateFile:
|
|
20
20
|
case DeployQuestion.UpdateOrigins:
|
|
21
|
+
case DeployQuestion.UpdateFeatures:
|
|
22
|
+
case DeployQuestion.UpdateVersions:
|
|
21
23
|
case DeployQuestion.CreateConfig:
|
|
22
24
|
case DeployQuestion.DeleteInstallResourceKey:
|
|
23
25
|
case DeployQuestion.UploadInstallResource:
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
import { expect } from "chai";
|
|
2
|
+
import { describe, it } from "mocha";
|
|
3
|
+
import CustomerConfigHandler from "../../handler/customer-config-handler.js";
|
|
4
|
+
import InstallResourceBuilder from "../../builder/install-resource-builder.js";
|
|
5
|
+
import { DiffEngine, NoDiffSink } from "../../../diff/index.js";
|
|
6
|
+
import { changedFields, } from "../../../integration-api/index.js";
|
|
7
|
+
import { DeployQuestion } from "../../policy/index.js";
|
|
8
|
+
const ORIGINS = ["https://www.example.com"];
|
|
9
|
+
/** A deploy of `features` against a live installation with the same origins. */
|
|
10
|
+
async function deploy(features, live, versions = {}, liveVersions = {}) {
|
|
11
|
+
const install = {
|
|
12
|
+
domain: "production",
|
|
13
|
+
configVersion: 1,
|
|
14
|
+
origins: [...ORIGINS],
|
|
15
|
+
features: live,
|
|
16
|
+
...liveVersions,
|
|
17
|
+
};
|
|
18
|
+
const configApi = {
|
|
19
|
+
getActiveInstall: async () => structuredClone(install),
|
|
20
|
+
};
|
|
21
|
+
const questions = [];
|
|
22
|
+
/** The console output and the questions, in their order. */
|
|
23
|
+
const output = [];
|
|
24
|
+
const policy = {
|
|
25
|
+
confirm: async (question) => {
|
|
26
|
+
questions.push(question);
|
|
27
|
+
output.push(`? ${question}`);
|
|
28
|
+
return true;
|
|
29
|
+
},
|
|
30
|
+
};
|
|
31
|
+
const cli = new Proxy({}, {
|
|
32
|
+
get: (_, method) => (message, buffered = false) => output.push(`${method}${buffered ? " (buffered)" : ""}: ${message}`),
|
|
33
|
+
});
|
|
34
|
+
const builder = new InstallResourceBuilder(configApi);
|
|
35
|
+
let skipped = false;
|
|
36
|
+
const file = {
|
|
37
|
+
config: {
|
|
38
|
+
origins: [...ORIGINS],
|
|
39
|
+
features,
|
|
40
|
+
...versions,
|
|
41
|
+
},
|
|
42
|
+
skipFile: () => (skipped = true),
|
|
43
|
+
shouldSkipFile: () => skipped,
|
|
44
|
+
};
|
|
45
|
+
const handler = new CustomerConfigHandler({}, configApi, "production", new DiffEngine({ sink: new NoDiffSink() }), cli, builder, policy);
|
|
46
|
+
await handler.handle([file]);
|
|
47
|
+
await handler.upload([file]);
|
|
48
|
+
return { builder, questions, output };
|
|
49
|
+
}
|
|
50
|
+
describe("CustomerConfigHandler", () => {
|
|
51
|
+
it("uploads a changed feature although the origins are the same", async () => {
|
|
52
|
+
const { builder, questions } = await deploy({ embeddedConfig: true, enableSpeedKitConfigPlugins: null }, { embeddedConfig: false, suppressOriginNoStore: true });
|
|
53
|
+
expect(questions).to.deep.equal([DeployQuestion.UpdateFeatures]);
|
|
54
|
+
expect(builder.hasChanges()).to.equal(true);
|
|
55
|
+
// An omitted feature is null, so the deploy resets it.
|
|
56
|
+
expect(builder.getInstallResource().features).to.deep.equal({
|
|
57
|
+
embeddedConfig: true,
|
|
58
|
+
suppressOriginNoStore: null,
|
|
59
|
+
});
|
|
60
|
+
});
|
|
61
|
+
it("changes nothing while the installation has the features", async () => {
|
|
62
|
+
const { builder, questions } = await deploy({ embeddedConfig: true }, { embeddedConfig: true });
|
|
63
|
+
expect(questions).to.deep.equal([]);
|
|
64
|
+
expect(builder.hasChanges()).to.equal(false);
|
|
65
|
+
});
|
|
66
|
+
});
|
|
67
|
+
describe("CustomerConfigHandler version tags", () => {
|
|
68
|
+
it("stores a tag in its installation field, and resets an omitted one", async () => {
|
|
69
|
+
const { builder, questions } = await deploy({}, {}, { speedKitVersion: "2.22.4" }, { swVersion: "2.21.0", rumVersion: "@release" });
|
|
70
|
+
expect(questions).to.deep.equal([DeployQuestion.UpdateVersions]);
|
|
71
|
+
expect(builder.getInstallResource()).to.include({
|
|
72
|
+
swVersion: "2.22.4",
|
|
73
|
+
rumVersion: null,
|
|
74
|
+
});
|
|
75
|
+
});
|
|
76
|
+
});
|
|
77
|
+
describe("CustomerConfigHandler diff", () => {
|
|
78
|
+
it("shows the diff of the features and the version tags before each question", async () => {
|
|
79
|
+
const { output } = await deploy({ embeddedConfig: true }, { suppressOriginNoStore: true }, { speedKitVersion: "2.22.4" }, { swVersion: "2.21.0" });
|
|
80
|
+
expect(output.slice(0, 7)).to.deep.equal([
|
|
81
|
+
"write: will update features:",
|
|
82
|
+
"code: embeddedConfig: null -> true",
|
|
83
|
+
"code: suppressOriginNoStore: true -> null",
|
|
84
|
+
`? ${DeployQuestion.UpdateFeatures}`,
|
|
85
|
+
"write: will update version tags:",
|
|
86
|
+
'code: speedKitVersion: "2.21.0" -> "2.22.4"',
|
|
87
|
+
`? ${DeployQuestion.UpdateVersions}`,
|
|
88
|
+
]);
|
|
89
|
+
});
|
|
90
|
+
});
|
|
91
|
+
describe("changedFields", () => {
|
|
92
|
+
it("resets a feature the config omits", () => {
|
|
93
|
+
expect(changedFields({ embeddedConfig: false, allowCaseSensitiveVariation: null }, { prefetchingOnDeploymentJob: true, allowCaseSensitiveVariation: null })).to.deep.equal({
|
|
94
|
+
embeddedConfig: false,
|
|
95
|
+
prefetchingOnDeploymentJob: null,
|
|
96
|
+
});
|
|
97
|
+
});
|
|
98
|
+
});
|
|
@@ -4,7 +4,7 @@ import { LiveState, LiveStateCheck } from "../../mr/live-state-check.js";
|
|
|
4
4
|
import { DiffEngine, NoDiffSink } from "../../../diff/index.js";
|
|
5
5
|
const ORIGINS = ["https://www.example.com"];
|
|
6
6
|
/** A configuration of the install resource files it holds. */
|
|
7
|
-
function configuration(files, origins = ORIGINS) {
|
|
7
|
+
function configuration(files, origins = ORIGINS, features) {
|
|
8
8
|
const resources = Object.entries(files).map(([remoteKey, content]) => ({
|
|
9
9
|
remoteKey,
|
|
10
10
|
name: remoteKey,
|
|
@@ -13,11 +13,11 @@ function configuration(files, origins = ORIGINS) {
|
|
|
13
13
|
}));
|
|
14
14
|
return {
|
|
15
15
|
getInstallResources: () => resources,
|
|
16
|
-
getCustomerConfig: () => ({ config: { origins } }),
|
|
16
|
+
getCustomerConfig: () => ({ config: { origins, features } }),
|
|
17
17
|
};
|
|
18
18
|
}
|
|
19
|
-
function installOf(files, origins = ORIGINS) {
|
|
20
|
-
return { domain: "production", origins, ...files };
|
|
19
|
+
function installOf(files, origins = ORIGINS, features) {
|
|
20
|
+
return { domain: "production", origins, features, ...files };
|
|
21
21
|
}
|
|
22
22
|
const check = new LiveStateCheck(new DiffEngine({ sink: new NoDiffSink() }));
|
|
23
23
|
describe("LiveStateCheck", () => {
|
|
@@ -71,4 +71,45 @@ describe("LiveStateCheck", () => {
|
|
|
71
71
|
const result = check.compare(base, base, null);
|
|
72
72
|
expect(result.state).to.equal(LiveState.Missing);
|
|
73
73
|
});
|
|
74
|
+
it("deploys a merge request that only turns on a feature", () => {
|
|
75
|
+
const base = configuration({ config: "same" }, ORIGINS, {
|
|
76
|
+
embeddedConfig: false,
|
|
77
|
+
});
|
|
78
|
+
const local = configuration({ config: "same" }, ORIGINS, {
|
|
79
|
+
embeddedConfig: true,
|
|
80
|
+
});
|
|
81
|
+
const live = installOf({ config: "same" }, ORIGINS, {
|
|
82
|
+
embeddedConfig: false,
|
|
83
|
+
});
|
|
84
|
+
expect(check.isUnchanged(base, local)).to.equal(false);
|
|
85
|
+
expect(check.compare(base, local, live).state).to.equal(LiveState.Reviewed);
|
|
86
|
+
});
|
|
87
|
+
it("names the features when live changed one", () => {
|
|
88
|
+
const features = { embeddedConfig: false };
|
|
89
|
+
const base = configuration({ config: "same" }, ORIGINS, features);
|
|
90
|
+
const local = configuration({ config: "after" }, ORIGINS, features);
|
|
91
|
+
const result = check.compare(base, local, installOf({ config: "same" }, ORIGINS, { embeddedConfig: true }));
|
|
92
|
+
expect(result.state).to.equal(LiveState.Drifted);
|
|
93
|
+
expect(result.driftedFiles).to.deep.equal(["config_customer(features)"]);
|
|
94
|
+
});
|
|
95
|
+
it("calls a feature that only live sets drift, because the deploy resets it", () => {
|
|
96
|
+
const base = configuration({ config: "before" });
|
|
97
|
+
const local = configuration({ config: "after" });
|
|
98
|
+
const result = check.compare(base, local, installOf({ config: "before" }, ORIGINS, {
|
|
99
|
+
suppressOriginNoStore: true,
|
|
100
|
+
embeddedConfig: null,
|
|
101
|
+
}));
|
|
102
|
+
expect(result.state).to.equal(LiveState.Drifted);
|
|
103
|
+
expect(result.driftedFiles).to.deep.equal(["config_customer(features)"]);
|
|
104
|
+
});
|
|
105
|
+
it("names the version tags when live pins another build", () => {
|
|
106
|
+
const base = configuration({ config: "before" });
|
|
107
|
+
const local = configuration({ config: "after" });
|
|
108
|
+
const result = check.compare(base, local, {
|
|
109
|
+
...installOf({ config: "before" }),
|
|
110
|
+
swVersion: "2.21.0",
|
|
111
|
+
});
|
|
112
|
+
expect(result.state).to.equal(LiveState.Drifted);
|
|
113
|
+
expect(result.driftedFiles).to.deep.equal(["config_customer(versions)"]);
|
|
114
|
+
});
|
|
74
115
|
});
|
|
@@ -5,6 +5,8 @@ import { DeployQuestion } from "../../policy/deploy-policy-model.js";
|
|
|
5
5
|
const REVIEWED = [
|
|
6
6
|
DeployQuestion.UpdateFile,
|
|
7
7
|
DeployQuestion.UpdateOrigins,
|
|
8
|
+
DeployQuestion.UpdateFeatures,
|
|
9
|
+
DeployQuestion.UpdateVersions,
|
|
8
10
|
DeployQuestion.DeleteInstallResourceKey,
|
|
9
11
|
DeployQuestion.UploadInstallResource,
|
|
10
12
|
DeployQuestion.UploadModules,
|
|
@@ -15,6 +15,8 @@ describe("TestingDeployPolicy", () => {
|
|
|
15
15
|
for (const question of [
|
|
16
16
|
DeployQuestion.UpdateFile,
|
|
17
17
|
DeployQuestion.UpdateOrigins,
|
|
18
|
+
DeployQuestion.UpdateFeatures,
|
|
19
|
+
DeployQuestion.UpdateVersions,
|
|
18
20
|
DeployQuestion.CreateConfig,
|
|
19
21
|
DeployQuestion.DeleteInstallResourceKey,
|
|
20
22
|
DeployQuestion.UploadInstallResource,
|
|
@@ -37,7 +39,7 @@ describe("TestingDeployPolicy", () => {
|
|
|
37
39
|
}
|
|
38
40
|
it("answers every question of the deploy, so a new one needs a decision here", () => {
|
|
39
41
|
// Fails when DeployQuestion grows: decide then whether a testing deploy may answer yes.
|
|
40
|
-
expect(Object.values(DeployQuestion)).to.have.length(
|
|
42
|
+
expect(Object.values(DeployQuestion)).to.have.length(16);
|
|
41
43
|
});
|
|
42
44
|
it("gives the description, and nothing for another open question", async () => {
|
|
43
45
|
expect(await policy.text(DeployQuestion.Description)).to.equal("branch feature/x");
|