@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
package/dist/commands/diff.d.ts
CHANGED
|
@@ -14,8 +14,6 @@ export default class Diff extends SkCommand<DiffServiceBuildContext> {
|
|
|
14
14
|
variations: Interfaces.OptionFlag<string[], Interfaces.CustomOptions>;
|
|
15
15
|
against: Interfaces.OptionFlag<string, Interfaces.CustomOptions>;
|
|
16
16
|
variation: Interfaces.OptionFlag<string, Interfaces.CustomOptions>;
|
|
17
|
-
base: Interfaces.OptionFlag<string, Interfaces.CustomOptions>;
|
|
18
|
-
html: Interfaces.OptionFlag<string, Interfaces.CustomOptions>;
|
|
19
17
|
baseline: Interfaces.BooleanFlag<boolean>;
|
|
20
18
|
params: Interfaces.BooleanFlag<boolean>;
|
|
21
19
|
param: Interfaces.OptionFlag<string[], Interfaces.CustomOptions>;
|
|
@@ -25,7 +23,6 @@ export default class Diff extends SkCommand<DiffServiceBuildContext> {
|
|
|
25
23
|
browserFetch: Interfaces.BooleanFlag<boolean>;
|
|
26
24
|
host: Interfaces.OptionFlag<string, Interfaces.CustomOptions>;
|
|
27
25
|
variationsFile: Interfaces.OptionFlag<string, Interfaces.CustomOptions>;
|
|
28
|
-
run: Interfaces.OptionFlag<string, Interfaces.CustomOptions>;
|
|
29
26
|
hideDiff: Interfaces.BooleanFlag<boolean>;
|
|
30
27
|
configName: Interfaces.OptionFlag<string, Interfaces.CustomOptions>;
|
|
31
28
|
};
|
|
@@ -34,10 +31,7 @@ export default class Diff extends SkCommand<DiffServiceBuildContext> {
|
|
|
34
31
|
init(): Promise<void>;
|
|
35
32
|
/** The documentHandler runs locally, with the customer's extra node modules. */
|
|
36
33
|
protected customerPathForModules(args: Record<string, unknown>): string | undefined;
|
|
37
|
-
/**
|
|
38
|
-
* JSON and a patch own stdout, so the CLI keeps its action lines out of it.
|
|
39
|
-
* A stdout that is no terminal gets a patch by default.
|
|
40
|
-
*/
|
|
34
|
+
/** JSON owns stdout, so the CLI keeps its action lines out of it. */
|
|
41
35
|
protected quietCli(flags: Record<string, unknown>): boolean;
|
|
42
36
|
/**
|
|
43
37
|
* A run that could not compare exits with 2, as diff(1) does, so a script
|
package/dist/commands/diff.js
CHANGED
|
@@ -12,7 +12,7 @@ const EXIT_CODES = {
|
|
|
12
12
|
uncacheable: 3,
|
|
13
13
|
};
|
|
14
14
|
export default class Diff extends SkCommand {
|
|
15
|
-
static description = "Diff a page with and without its query parameters, across variations, against another page,
|
|
15
|
+
static description = "Diff a page with and without its query parameters, across variations, or against another page, as Speed Kit requests it from origin and the customer's documentHandler renders it. Exits with 1 when a diff is found, with 2 when the pages could not be compared, and with 3 when the documentHandler aborts a page, so Speed Kit never caches it";
|
|
16
16
|
static buildContext = DiffServiceBuildContext;
|
|
17
17
|
static args = DiffServiceBuildContext.args;
|
|
18
18
|
static flags = DiffServiceBuildContext.flags;
|
|
@@ -30,8 +30,6 @@ export default class Diff extends SkCommand {
|
|
|
30
30
|
`$ sk diff customers/decathlon.de https://www.decathlon.de/ --variations tablet,mobile`,
|
|
31
31
|
`$ sk diff --raw "https://www.decathlon.de/?sort=price" --variations mobile`,
|
|
32
32
|
`$ sk diff customers/decathlon.de "https://www.decathlon.de/?sort=price" --variations mobile --params`,
|
|
33
|
-
`$ sk diff customers/decathlon.de https://www.decathlon.de/c/shoes --base origin/main`,
|
|
34
|
-
`$ sk diff customers/decathlon.de https://www.decathlon.de/c/shoes --base HEAD~1 --html saved-page.html --variation mobile`,
|
|
35
33
|
];
|
|
36
34
|
/** A bare --param or --variations asks, rather than oclif refusing it. */
|
|
37
35
|
async init() {
|
|
@@ -43,13 +41,9 @@ export default class Diff extends SkCommand {
|
|
|
43
41
|
const customerPath = args["customerPath"];
|
|
44
42
|
return /^https?:\/\//i.test(customerPath ?? "") ? undefined : customerPath;
|
|
45
43
|
}
|
|
46
|
-
/**
|
|
47
|
-
* JSON and a patch own stdout, so the CLI keeps its action lines out of it.
|
|
48
|
-
* A stdout that is no terminal gets a patch by default.
|
|
49
|
-
*/
|
|
44
|
+
/** JSON owns stdout, so the CLI keeps its action lines out of it. */
|
|
50
45
|
quietCli(flags) {
|
|
51
|
-
|
|
52
|
-
return output === "json" || output === "patch";
|
|
46
|
+
return flags["output"] === "json";
|
|
53
47
|
}
|
|
54
48
|
/**
|
|
55
49
|
* A run that could not compare exits with 2, as diff(1) does, so a script
|
package/dist/commands/login.d.ts
CHANGED
|
@@ -4,9 +4,6 @@ export default class Login extends SkCommand {
|
|
|
4
4
|
static args: {
|
|
5
5
|
app: import("@oclif/core/interfaces").Arg<string, Record<string, unknown>>;
|
|
6
6
|
};
|
|
7
|
-
static flags: {
|
|
8
|
-
auth: import("@oclif/core/interfaces").OptionFlag<"password" | "google" | "facebook" | "github", import("@oclif/core/interfaces").CustomOptions>;
|
|
9
|
-
};
|
|
10
7
|
static examples: string[];
|
|
11
8
|
run(): Promise<void>;
|
|
12
9
|
private createLoginTokenFileIfNotExists;
|
package/dist/commands/login.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Args
|
|
1
|
+
import { Args } from "@oclif/core";
|
|
2
2
|
import { SkCommand } from "../base/sk-command.js";
|
|
3
3
|
import { account } from "baqend/cli";
|
|
4
4
|
import { existsSync, writeFileSync } from "node:fs";
|
|
@@ -13,23 +13,12 @@ export default class Login extends SkCommand {
|
|
|
13
13
|
description: "The customers appName", // help description
|
|
14
14
|
}),
|
|
15
15
|
};
|
|
16
|
-
static
|
|
17
|
-
auth: Flags.option({
|
|
18
|
-
options: ["password", "google", "facebook", "github"],
|
|
19
|
-
description: "How to log in. Without it, the login asks for the provider",
|
|
20
|
-
})(),
|
|
21
|
-
};
|
|
22
|
-
static examples = [
|
|
23
|
-
`$ sk login <app>`,
|
|
24
|
-
"$ sk login appName",
|
|
25
|
-
"$ sk login appName --auth google",
|
|
26
|
-
];
|
|
16
|
+
static examples = [`$ sk login <app>`, "$ sk login appName"];
|
|
27
17
|
async run() {
|
|
28
18
|
const parsedLogin = await this.parse(Login);
|
|
29
19
|
const { app } = parsedLogin.args;
|
|
30
|
-
const { auth } = parsedLogin.flags;
|
|
31
20
|
this.createLoginTokenFileIfNotExists();
|
|
32
|
-
await account.persistLogin({ app
|
|
21
|
+
await account.persistLogin({ app });
|
|
33
22
|
}
|
|
34
23
|
createLoginTokenFileIfNotExists() {
|
|
35
24
|
if (!existsSync(path.resolve(this.config.home, ".baqend"))) {
|
|
@@ -1,22 +1,5 @@
|
|
|
1
1
|
import { SkCommand } from "../base/sk-command.js";
|
|
2
2
|
import { OnboardingServiceBuildContext } from "../services/onboarding/index.js";
|
|
3
|
-
import { CliServiceInterface } from "../services/cli/index.js";
|
|
4
|
-
import { RunRegistry } from "../services/run-registry/index.js";
|
|
5
|
-
/**
|
|
6
|
-
* Warn about a live run this one would collide with, and ask before joining it.
|
|
7
|
-
*
|
|
8
|
-
* Both collisions used to be silent, and the second one is the expensive kind:
|
|
9
|
-
* a second run on the same debug port does not fail, it quietly ends up with
|
|
10
|
-
* one Chrome on `127.0.0.1` and the other on `[::1]`, and CDP reaches whichever
|
|
11
|
-
* resolves first. Finding that out costs an hour of inspecting the wrong
|
|
12
|
-
* browser.
|
|
13
|
-
*
|
|
14
|
-
* @returns whether to go ahead.
|
|
15
|
-
*/
|
|
16
|
-
export declare function confirmConflicts(cli: CliServiceInterface, registry: RunRegistry, intent: {
|
|
17
|
-
customerPath?: string;
|
|
18
|
-
debugPort?: number;
|
|
19
|
-
}): Promise<boolean>;
|
|
20
3
|
export default class Onboarding extends SkCommand<OnboardingServiceBuildContext> {
|
|
21
4
|
static description: string;
|
|
22
5
|
static buildContext: typeof OnboardingServiceBuildContext;
|
|
@@ -31,7 +14,6 @@ export default class Onboarding extends SkCommand<OnboardingServiceBuildContext>
|
|
|
31
14
|
debuggingPort: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
32
15
|
debugPort: import("@oclif/core/interfaces").OptionFlag<number, import("@oclif/core/interfaces").CustomOptions>;
|
|
33
16
|
verboseLevel: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
34
|
-
logFile: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
35
17
|
ignoreContentSecurityPolicy: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
36
18
|
headless: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
37
19
|
device: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
@@ -47,13 +29,5 @@ export default class Onboarding extends SkCommand<OnboardingServiceBuildContext>
|
|
|
47
29
|
init(): Promise<void>;
|
|
48
30
|
/** Onboarding runs the customer's documentHandler, with its node modules. */
|
|
49
31
|
protected customerPathForModules(args: Record<string, unknown>): string | undefined;
|
|
50
|
-
/**
|
|
51
|
-
* Why a customer path that is not there was refused — and, when its words
|
|
52
|
-
* name a subcommand, the call that was meant.
|
|
53
|
-
*
|
|
54
|
-
* `sk onboarding "rum get"`, with the two words as one argument, is what a
|
|
55
|
-
* script or an agent produces, and oclif can only read it as a path.
|
|
56
|
-
*/
|
|
57
|
-
private missingCustomerPath;
|
|
58
32
|
run(): Promise<void>;
|
|
59
33
|
}
|
|
@@ -1,59 +1,5 @@
|
|
|
1
1
|
import { SkCommand } from "../base/sk-command.js";
|
|
2
2
|
import { OnboardingServiceBuildContext, OnboardingServiceFactory, withInjectDefault, } from "../services/onboarding/index.js";
|
|
3
|
-
import { buildInfo } from "../services/cli/index.js";
|
|
4
|
-
import { classifyExit, RunRegistry } from "../services/run-registry/index.js";
|
|
5
|
-
import { LOG_SCHEMA_VERSION, mirrorCrashes, RequestLog, RunLog, } from "../services/run-log/index.js";
|
|
6
|
-
import { existsSync, statSync } from "node:fs";
|
|
7
|
-
import { fileURLToPath } from "node:url";
|
|
8
|
-
/**
|
|
9
|
-
* When the running build was compiled, from the mtime of this very module.
|
|
10
|
-
*
|
|
11
|
-
* `cliVersion` reports the same string for every development build of a
|
|
12
|
-
* version, so a run from a fixed build looks exactly like one from the build it
|
|
13
|
-
* fixed. This is what tells them apart without a release.
|
|
14
|
-
*/
|
|
15
|
-
function buildTime() {
|
|
16
|
-
try {
|
|
17
|
-
return statSync(fileURLToPath(import.meta.url)).mtime.toISOString();
|
|
18
|
-
}
|
|
19
|
-
catch {
|
|
20
|
-
return undefined;
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
/**
|
|
24
|
-
* Warn about a live run this one would collide with, and ask before joining it.
|
|
25
|
-
*
|
|
26
|
-
* Both collisions used to be silent, and the second one is the expensive kind:
|
|
27
|
-
* a second run on the same debug port does not fail, it quietly ends up with
|
|
28
|
-
* one Chrome on `127.0.0.1` and the other on `[::1]`, and CDP reaches whichever
|
|
29
|
-
* resolves first. Finding that out costs an hour of inspecting the wrong
|
|
30
|
-
* browser.
|
|
31
|
-
*
|
|
32
|
-
* @returns whether to go ahead.
|
|
33
|
-
*/
|
|
34
|
-
export async function confirmConflicts(cli, registry, intent) {
|
|
35
|
-
const { sameCustomer, samePort } = registry.conflicts(intent);
|
|
36
|
-
if (sameCustomer.length === 0 && samePort.length === 0) {
|
|
37
|
-
return true;
|
|
38
|
-
}
|
|
39
|
-
cli.spacer();
|
|
40
|
-
for (const run of sameCustomer) {
|
|
41
|
-
cli.writeWarning(`${run.meta.customerPath} is already open in run ${run.meta.id} (pid ${run.meta.pid}, config ${run.meta.configName}), started ${run.meta.startedAt}.`);
|
|
42
|
-
cli.comment(" Two runs of one customer share its config files, its .local directory and its browser profile.");
|
|
43
|
-
}
|
|
44
|
-
for (const run of samePort) {
|
|
45
|
-
cli.writeWarning(`Debug port ${intent.debugPort} is already taken by run ${run.meta.id} (pid ${run.meta.pid}).`);
|
|
46
|
-
cli.comment(" Chrome will not report this. One instance ends up on 127.0.0.1 and the other on [::1], and a debugger reaches whichever resolves first — quite possibly the other one. Pass --debugPort to pick a free one.");
|
|
47
|
-
}
|
|
48
|
-
cli.spacer();
|
|
49
|
-
// A shell that cannot be asked is not a reason to refuse: say it plainly and
|
|
50
|
-
// carry on, so a scripted run is warned rather than wedged.
|
|
51
|
-
if (cli.nonInteractive) {
|
|
52
|
-
cli.writeWarning("Continuing anyway — this shell cannot be asked.");
|
|
53
|
-
return true;
|
|
54
|
-
}
|
|
55
|
-
return cli.confirm("Start anyway?", false);
|
|
56
|
-
}
|
|
57
3
|
export default class Onboarding extends SkCommand {
|
|
58
4
|
static description = "Start a local dev environment for building and testing the Speed Kit configuration";
|
|
59
5
|
static buildContext = OnboardingServiceBuildContext;
|
|
@@ -62,7 +8,7 @@ export default class Onboarding extends SkCommand {
|
|
|
62
8
|
static examples = [
|
|
63
9
|
`$ sk onboarding <customerPath> -c <configName> -d <domain>`,
|
|
64
10
|
`$ sk onboarding customers/decathlon.de -c production -d www.decathlon.de`,
|
|
65
|
-
`$ sk onboarding --browse -d www.decathlon.de --headless`,
|
|
11
|
+
`$ sk onboarding --browse -d www.decathlon.de --headless --debugPort 9290`,
|
|
66
12
|
`$ sk onboarding customers/decathlon.de --browse -p`,
|
|
67
13
|
`$ sk onboarding customers/decathlon.de -p --device tablet`,
|
|
68
14
|
`$ sk onboarding customers/decathlon.de --inject`,
|
|
@@ -76,183 +22,20 @@ export default class Onboarding extends SkCommand {
|
|
|
76
22
|
customerPathForModules(args) {
|
|
77
23
|
return args.customerPath;
|
|
78
24
|
}
|
|
79
|
-
/**
|
|
80
|
-
* Why a customer path that is not there was refused — and, when its words
|
|
81
|
-
* name a subcommand, the call that was meant.
|
|
82
|
-
*
|
|
83
|
-
* `sk onboarding "rum get"`, with the two words as one argument, is what a
|
|
84
|
-
* script or an agent produces, and oclif can only read it as a path.
|
|
85
|
-
*/
|
|
86
|
-
missingCustomerPath(customerPath) {
|
|
87
|
-
const words = customerPath.trim().split(/\s+/);
|
|
88
|
-
for (let length = words.length; length > 0; length -= 1) {
|
|
89
|
-
const id = ["onboarding", ...words.slice(0, length)].join(":");
|
|
90
|
-
if (this.config.findCommand(id)) {
|
|
91
|
-
return `No customer directory at "${customerPath}". To run \`sk onboarding ${words.slice(0, length).join(" ")}\`, pass its words as separate arguments.`;
|
|
92
|
-
}
|
|
93
|
-
}
|
|
94
|
-
return `No customer directory at "${customerPath}".`;
|
|
95
|
-
}
|
|
96
25
|
async run() {
|
|
97
|
-
const
|
|
98
|
-
// The invocation's one CLI — the signal handler below restores the
|
|
99
|
-
// terminal with it.
|
|
100
|
-
const cli = this.environment.cli;
|
|
101
|
-
// Before anything is recorded: a path that is not there would leave a
|
|
102
|
-
// failed run in the registry, and retention keeps only the newest twenty,
|
|
103
|
-
// so a few of those push real runs out of `sk onboarding list`.
|
|
104
|
-
if (customerPath && !existsSync(customerPath)) {
|
|
105
|
-
this.error(this.missingCustomerPath(customerPath), { exit: 2 });
|
|
106
|
-
}
|
|
107
|
-
const registry = new RunRegistry(this.environment.cacheDir);
|
|
108
|
-
if (!(await confirmConflicts(cli, registry, {
|
|
109
|
-
customerPath,
|
|
110
|
-
debugPort: debuggingPort ? debugPort : undefined,
|
|
111
|
-
}))) {
|
|
112
|
-
return;
|
|
113
|
-
}
|
|
114
|
-
// Recorded before the factory runs, so a run that dies while loading its
|
|
115
|
-
// config still leaves something to read afterwards.
|
|
116
|
-
const run = registry.start({
|
|
117
|
-
customerPath,
|
|
118
|
-
configName,
|
|
119
|
-
domain,
|
|
120
|
-
cliVersion: this.config.version,
|
|
121
|
-
buildTime: buildTime(),
|
|
122
|
-
commit: buildInfo().commit,
|
|
123
|
-
debugPort: debuggingPort ? debugPort : undefined,
|
|
124
|
-
logSchemaVersion: logFile ? LOG_SCHEMA_VERSION : undefined,
|
|
125
|
-
flags: {
|
|
126
|
-
local: true,
|
|
127
|
-
headless,
|
|
128
|
-
useTestConfig,
|
|
129
|
-
ignoreContentSecurityPolicy,
|
|
130
|
-
},
|
|
131
|
-
});
|
|
132
|
-
// Attached only now: the run directory does not exist until the collision
|
|
133
|
-
// question above has been answered, and a declined start has to leave
|
|
134
|
-
// nothing behind. Everything printed before this point belonged to no run.
|
|
135
|
-
const log = logFile ? new RunLog(run.dir) : undefined;
|
|
136
|
-
// A second stream rather than a second kind of line in the first: one
|
|
137
|
-
// navigation of a large site produces hundreds of request records, and
|
|
138
|
-
// mixing them into the narration would bury it under the traffic.
|
|
139
|
-
const requestLog = logFile ? new RequestLog(run.dir) : undefined;
|
|
140
|
-
const unmirror = log ? mirrorCrashes(log) : undefined;
|
|
141
|
-
if (log) {
|
|
142
|
-
cli.attachLog(log);
|
|
143
|
-
log.event({
|
|
144
|
-
level: "info",
|
|
145
|
-
msg: `run ${run.id} started`,
|
|
146
|
-
data: {
|
|
147
|
-
customerPath,
|
|
148
|
-
configName,
|
|
149
|
-
domain,
|
|
150
|
-
debugPort: debuggingPort ? debugPort : undefined,
|
|
151
|
-
flags: {
|
|
152
|
-
local: true,
|
|
153
|
-
headless,
|
|
154
|
-
useTestConfig,
|
|
155
|
-
ignoreContentSecurityPolicy,
|
|
156
|
-
},
|
|
157
|
-
cliVersion: this.config.version,
|
|
158
|
-
buildTime: buildTime(),
|
|
159
|
-
commit: buildInfo().commit,
|
|
160
|
-
},
|
|
161
|
-
});
|
|
162
|
-
}
|
|
163
|
-
// Ctrl+C signals the whole foreground process group, so Chrome dies too and
|
|
164
|
-
// every handle closes at once. The event loop can then drain while the
|
|
165
|
-
// awaited shutdown below is still unwinding, which fires `exit` *before* the
|
|
166
|
-
// `finally` — so the exit handler has to know a stop was asked for, or it
|
|
167
|
-
// records a deliberate shutdown as a failure. First-write-wins made that
|
|
168
|
-
// stick.
|
|
169
|
-
let stopping = false;
|
|
170
|
-
let signalName;
|
|
171
|
-
// Whether the run got to the end on its own. Without this a process that
|
|
172
|
-
// vanished mid-run and a run that ended by itself are indistinguishable:
|
|
173
|
-
// both leave exit code 0 and no signal.
|
|
174
|
-
let runReturned = false;
|
|
175
|
-
// Layer two of three (see .local/onboarding-log-api.md §11.5): `finally`
|
|
176
|
-
// covers a normal or thrown exit, this covers a `process.exit` from
|
|
177
|
-
// anywhere, and nothing covers SIGKILL — for that, a reader reconciles the
|
|
178
|
-
// recorded status against the pid and reports `crashed`.
|
|
179
|
-
// A clean exit is never a failure. The disconnect path stamps itself in
|
|
180
|
-
// OnboardingService, so by the time this runs the outcome is usually
|
|
181
|
-
// already recorded; this is the backstop for everything that did not.
|
|
182
|
-
const onExit = (code) => {
|
|
183
|
-
run.update({ exitCode: code });
|
|
184
|
-
const { status, error } = classifyExit({
|
|
185
|
-
stopping,
|
|
186
|
-
signal: signalName,
|
|
187
|
-
runReturned,
|
|
188
|
-
code,
|
|
189
|
-
});
|
|
190
|
-
run.finish(status, error);
|
|
191
|
-
};
|
|
192
|
-
process.once("exit", onExit);
|
|
26
|
+
const service = await new OnboardingServiceFactory(this.context).getService();
|
|
193
27
|
const shutdown = new AbortController();
|
|
194
|
-
const onSignal = (
|
|
195
|
-
stopping = true;
|
|
196
|
-
signalName = signal;
|
|
197
|
-
// Stamped here, synchronously, and not left for the shutdown to finish.
|
|
198
|
-
// `signal-exit` — reached through spinnies → cli-cursor →
|
|
199
|
-
// restore-cursor — re-raises the signal with
|
|
200
|
-
// `process.kill(process.pid, sig)` once its own cleanup is done, so the
|
|
201
|
-
// process dies *by signal*. Death by signal fires no `exit` handlers, so
|
|
202
|
-
// nothing registered after this point is guaranteed to run at all. A run
|
|
203
|
-
// ended with SIGTERM or SIGHUP used to be left `running` with a dead pid,
|
|
204
|
-
// which a reader reconciles to `crashed` — the wrong word for closing a
|
|
205
|
-
// window on purpose.
|
|
206
|
-
//
|
|
207
|
-
// The cost is that the run reads as ended a moment before its pid goes.
|
|
208
|
-
// That is the correct trade: it *is* ending, and the alternative is no
|
|
209
|
-
// status at all.
|
|
210
|
-
run.update({ signal });
|
|
211
|
-
run.finish("stopped", `received ${signal}`);
|
|
212
|
-
// Spinnies' own SIGINT handler used to do this before exiting; it no
|
|
213
|
-
// longer exists (see createSpinners), so the cursor is ours to restore.
|
|
214
|
-
cli.restoreTerminal();
|
|
215
|
-
shutdown.abort();
|
|
216
|
-
};
|
|
28
|
+
const onSignal = () => shutdown.abort();
|
|
217
29
|
// `once`: a second Ctrl+C falls through to Node's default handler and
|
|
218
|
-
// force-quits if cleanup hangs.
|
|
30
|
+
// force-quits if cleanup hangs.
|
|
219
31
|
process.once("SIGINT", onSignal);
|
|
220
32
|
process.once("SIGTERM", onSignal);
|
|
221
|
-
// Closing the terminal — or the tmux pane a run lives in — sends SIGHUP.
|
|
222
|
-
process.once("SIGHUP", onSignal);
|
|
223
33
|
try {
|
|
224
|
-
const service = await new OnboardingServiceFactory(this.context, run, requestLog).getService();
|
|
225
34
|
await service.run(shutdown.signal);
|
|
226
|
-
runReturned = true;
|
|
227
|
-
const { status, error } = classifyExit({
|
|
228
|
-
stopping,
|
|
229
|
-
signal: signalName,
|
|
230
|
-
runReturned,
|
|
231
|
-
});
|
|
232
|
-
run.finish(status, error);
|
|
233
|
-
}
|
|
234
|
-
catch (error) {
|
|
235
|
-
// A teardown that throws after Ctrl+C is still a run that was stopped —
|
|
236
|
-
// calling it "failed" describes the exit path rather than what happened.
|
|
237
|
-
// The message is recorded either way, so nothing is lost by saying so.
|
|
238
|
-
run.finish(stopping ? "stopped" : "failed", error instanceof Error ? error.message : String(error));
|
|
239
|
-
throw error;
|
|
240
35
|
}
|
|
241
36
|
finally {
|
|
242
|
-
process.off("exit", onExit);
|
|
243
37
|
process.off("SIGINT", onSignal);
|
|
244
38
|
process.off("SIGTERM", onSignal);
|
|
245
|
-
process.off("SIGHUP", onSignal);
|
|
246
|
-
unmirror?.();
|
|
247
|
-
// Said once, at the end, and never mid-run: a log that cannot be written
|
|
248
|
-
// is worth knowing about, and a run that printed the same errno on every
|
|
249
|
-
// line would have buried whatever it was actually doing.
|
|
250
|
-
const stopped = log?.error ?? requestLog?.error;
|
|
251
|
-
if (stopped) {
|
|
252
|
-
cli.writeWarning(`This run's log stopped early: ${stopped}. Everything up to that point is in ${run.dir}.`);
|
|
253
|
-
}
|
|
254
|
-
log?.close();
|
|
255
|
-
requestLog?.close();
|
|
256
39
|
}
|
|
257
40
|
}
|
|
258
41
|
}
|
|
@@ -14,15 +14,11 @@ export default class OriginRequest extends SkCommand<OriginRequestServiceBuildCo
|
|
|
14
14
|
host: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
15
15
|
body: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
16
16
|
grep: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
17
|
-
select: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
18
|
-
maxMatches: import("@oclif/core/interfaces").OptionFlag<number, import("@oclif/core/interfaces").CustomOptions>;
|
|
19
17
|
json: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
20
18
|
variations: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
21
19
|
raw: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
22
20
|
configName: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
23
21
|
};
|
|
24
22
|
static examples: string[];
|
|
25
|
-
/** `--json` owns stdout: the progress lines would land in front of the document. */
|
|
26
|
-
protected quietCli(flags: Record<string, unknown>): boolean;
|
|
27
23
|
run(): Promise<void>;
|
|
28
24
|
}
|
|
@@ -11,10 +11,6 @@ export default class OriginRequest extends SkCommand {
|
|
|
11
11
|
`$ sk origin-request customers/decathlon.de https://www.decathlon.de/ --grep "storeId" --body /tmp/origin.html`,
|
|
12
12
|
`$ sk origin-request --raw https://www.decathlon.de/ -v mobile --body /tmp/mobile.html`,
|
|
13
13
|
];
|
|
14
|
-
/** `--json` owns stdout: the progress lines would land in front of the document. */
|
|
15
|
-
quietCli(flags) {
|
|
16
|
-
return flags["json"] === true;
|
|
17
|
-
}
|
|
18
14
|
async run() {
|
|
19
15
|
const service = await new OriginRequestServiceFactory(this.context).buildService();
|
|
20
16
|
// Exit 2 like `sk diff` when nothing could be requested, so a script does not read a success.
|
|
@@ -57,14 +57,3 @@ export declare function deviceForUserAgent(userAgent?: string): FetchDevice | un
|
|
|
57
57
|
* fingerprint matches; `sk onboarding --device desktop` presents Windows.
|
|
58
58
|
*/
|
|
59
59
|
export declare function deviceEmulation(browserVersionString: string, device: FetchDevice, platform?: string): DeviceEmulation;
|
|
60
|
-
/** A device as `sk onboarding` presents it: always with a viewport, also for the desktop. */
|
|
61
|
-
export type OnboardingDeviceEmulation = DeviceEmulation & {
|
|
62
|
-
viewport: Viewport;
|
|
63
|
-
};
|
|
64
|
-
/**
|
|
65
|
-
* The one device profile of `sk onboarding --device` and `sk onboarding browser emulate`: the
|
|
66
|
-
* {@link DEVICE_VIEWPORTS} screen, and the user agent and client hints of {@link deviceEmulation}.
|
|
67
|
-
*
|
|
68
|
-
* @param browserVersionString - `browser.version()`, e.g. `Chrome/146.0.7680.165`.
|
|
69
|
-
*/
|
|
70
|
-
export declare function onboardingDeviceEmulation(browserVersionString: string, device: FetchDevice): OnboardingDeviceEmulation;
|
|
@@ -143,20 +143,6 @@ export function deviceEmulation(browserVersionString, device, platform = process
|
|
|
143
143
|
viewport,
|
|
144
144
|
};
|
|
145
145
|
}
|
|
146
|
-
/** `--device desktop` and `browser emulate desktop` present Chrome on Windows, the most common Chrome desktop in RUM (60%). */
|
|
147
|
-
const ONBOARDING_DESKTOP_PLATFORM = "win32";
|
|
148
|
-
/**
|
|
149
|
-
* The one device profile of `sk onboarding --device` and `sk onboarding browser emulate`: the
|
|
150
|
-
* {@link DEVICE_VIEWPORTS} screen, and the user agent and client hints of {@link deviceEmulation}.
|
|
151
|
-
*
|
|
152
|
-
* @param browserVersionString - `browser.version()`, e.g. `Chrome/146.0.7680.165`.
|
|
153
|
-
*/
|
|
154
|
-
export function onboardingDeviceEmulation(browserVersionString, device) {
|
|
155
|
-
return {
|
|
156
|
-
...deviceEmulation(browserVersionString, device, ONBOARDING_DESKTOP_PLATFORM),
|
|
157
|
-
viewport: DEVICE_VIEWPORTS[device],
|
|
158
|
-
};
|
|
159
|
-
}
|
|
160
146
|
/**
|
|
161
147
|
* The client hints the headed desktop Chrome would send.
|
|
162
148
|
*
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import { BundleService } from "./bundle-service.js";
|
|
2
2
|
export declare class BundleServiceFactory {
|
|
3
3
|
private customerFolder?;
|
|
4
|
+
/**
|
|
5
|
+
* @param customerFolder the directory bundled code resolves its own imports from
|
|
6
|
+
*/
|
|
4
7
|
constructor(customerFolder?: string);
|
|
5
8
|
buildService(): BundleService;
|
|
6
9
|
}
|
|
@@ -1,10 +1,14 @@
|
|
|
1
1
|
import { BundleService } from "./bundle-service.js";
|
|
2
|
+
import { PackjockelService } from "./packjockel-service.js";
|
|
2
3
|
export class BundleServiceFactory {
|
|
3
4
|
customerFolder;
|
|
5
|
+
/**
|
|
6
|
+
* @param customerFolder the directory bundled code resolves its own imports from
|
|
7
|
+
*/
|
|
4
8
|
constructor(customerFolder) {
|
|
5
9
|
this.customerFolder = customerFolder;
|
|
6
10
|
}
|
|
7
11
|
buildService() {
|
|
8
|
-
return new BundleService(this.customerFolder);
|
|
12
|
+
return new BundleService(this.customerFolder, new PackjockelService());
|
|
9
13
|
}
|
|
10
14
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { PluginBuild, LogLevel } from "esbuild";
|
|
2
|
+
import type { PackjockelService } from "./packjockel-service.js";
|
|
2
3
|
export type BundleEntryPoints = Record<string, string>;
|
|
3
4
|
export type BundleBasePaths = Record<string, string>;
|
|
4
5
|
/**
|
|
@@ -8,10 +9,18 @@ export type BundleBasePaths = Record<string, string>;
|
|
|
8
9
|
export type BundleResolveFallback = (specifier: string) => Promise<string | null>;
|
|
9
10
|
export declare class BundleService {
|
|
10
11
|
private moduleDiscoveryDir;
|
|
12
|
+
private readonly packjockelService?;
|
|
11
13
|
/**
|
|
12
14
|
* @param moduleDiscoveryDir the directory bundled code resolves its own imports from
|
|
15
|
+
* @param packjockelService bundles instead of esbuild for customers with the `enableSpeedKitConfigPlugins` feature
|
|
13
16
|
*/
|
|
14
|
-
constructor(moduleDiscoveryDir: string);
|
|
17
|
+
constructor(moduleDiscoveryDir: string, packjockelService?: PackjockelService);
|
|
18
|
+
/**
|
|
19
|
+
* The packjockel bundler for customers with the `enableSpeedKitConfigPlugins` feature.
|
|
20
|
+
*
|
|
21
|
+
* @throws ApplicationError when the service was built without one
|
|
22
|
+
*/
|
|
23
|
+
get packjockel(): PackjockelService;
|
|
15
24
|
bundle({ entryPoints, basePaths, define, target, minify, logLevel, alias, platform, resolveFallback, packages, }: {
|
|
16
25
|
entryPoints: BundleEntryPoints;
|
|
17
26
|
basePaths?: BundleBasePaths;
|
|
@@ -4,16 +4,31 @@ import { URL } from "node:url";
|
|
|
4
4
|
import { BundleResolveError } from "./error/bundle-resolve-error.js";
|
|
5
5
|
import { BundleFetchError } from "./error/bundle-fetch-error.js";
|
|
6
6
|
import { resolve } from "node:path";
|
|
7
|
+
import ApplicationError from "../error-handling/error/application-error.js";
|
|
7
8
|
const FALLBACK_NAMESPACE = "bundle-resolve-fallback";
|
|
8
9
|
const RELATIVE_SPECIFIER = /^\.{1,2}\//;
|
|
9
10
|
const importCache = {};
|
|
10
11
|
export class BundleService {
|
|
11
12
|
moduleDiscoveryDir;
|
|
13
|
+
packjockelService;
|
|
12
14
|
/**
|
|
13
15
|
* @param moduleDiscoveryDir the directory bundled code resolves its own imports from
|
|
16
|
+
* @param packjockelService bundles instead of esbuild for customers with the `enableSpeedKitConfigPlugins` feature
|
|
14
17
|
*/
|
|
15
|
-
constructor(moduleDiscoveryDir) {
|
|
18
|
+
constructor(moduleDiscoveryDir, packjockelService) {
|
|
16
19
|
this.moduleDiscoveryDir = moduleDiscoveryDir;
|
|
20
|
+
this.packjockelService = packjockelService;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* The packjockel bundler for customers with the `enableSpeedKitConfigPlugins` feature.
|
|
24
|
+
*
|
|
25
|
+
* @throws ApplicationError when the service was built without one
|
|
26
|
+
*/
|
|
27
|
+
get packjockel() {
|
|
28
|
+
if (!this.packjockelService) {
|
|
29
|
+
throw new ApplicationError("This bundler has no packjockel");
|
|
30
|
+
}
|
|
31
|
+
return this.packjockelService;
|
|
17
32
|
}
|
|
18
33
|
async bundle({ entryPoints, basePaths, define, target = "es5", minify = true, logLevel = "silent", alias = {}, platform, resolveFallback, packages = "bundle", }) {
|
|
19
34
|
const plugins = [];
|