@speedkit/cli 4.51.0-run-control.4 → 4.51.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +30 -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/speed-kit-install-js.js +2 -11
- 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 +288 -3409
- 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.d.ts +0 -1
- 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/spec/file-events/file-watcher.spec.d.ts} +0 -0
|
@@ -1,194 +0,0 @@
|
|
|
1
|
-
/** Room for the reload and the drain, on top of the watch window itself. */
|
|
2
|
-
const WATCH_SLACK_MS = 10_000;
|
|
3
|
-
/** The navigations and the collection window, on top of the wait itself. */
|
|
4
|
-
const NAVWALK_SLACK_MS = 20_000;
|
|
5
|
-
const FOUC_SLACK_MS = 15_000;
|
|
6
|
-
/** Resizes per coarse step, plus the pin and the two boot loads. */
|
|
7
|
-
const VIEWPORT_OVERHEAD_MS = 60_000;
|
|
8
|
-
/**
|
|
9
|
-
* Questions about the page that one evaluation cannot answer: why a url came
|
|
10
|
-
* back the way it did, and what the page did over a load, a flow or a sweep
|
|
11
|
-
* of widths. All but `response` drive the page while they ask.
|
|
12
|
-
*/
|
|
13
|
-
export class RunProbeService {
|
|
14
|
-
cli;
|
|
15
|
-
run;
|
|
16
|
-
answer;
|
|
17
|
-
constructor(deps) {
|
|
18
|
-
this.cli = deps.cli;
|
|
19
|
-
this.run = deps.run;
|
|
20
|
-
this.answer = deps.answer;
|
|
21
|
-
}
|
|
22
|
-
/**
|
|
23
|
-
* Why was this page not accelerated: the rule verdict, the cache entry and
|
|
24
|
-
* what Speed Kit reported, side by side. Rules are read from the config as
|
|
25
|
-
* it is on disk now, so it follows an edit.
|
|
26
|
-
*/
|
|
27
|
-
async response(url) {
|
|
28
|
-
const data = await this.run.request({
|
|
29
|
-
op: "response.explain",
|
|
30
|
-
url,
|
|
31
|
-
});
|
|
32
|
-
this.answer.give(summariseResponse(data), { run: this.run.id, ...data }, () => {
|
|
33
|
-
this.cli.comment(data.url);
|
|
34
|
-
this.cli.write(data.explanation);
|
|
35
|
-
for (const note of data.notes) {
|
|
36
|
-
this.cli.comment(` ${note}`);
|
|
37
|
-
}
|
|
38
|
-
});
|
|
39
|
-
}
|
|
40
|
-
/** An expression's timeline across a load, with the console beside it. */
|
|
41
|
-
async watch(input) {
|
|
42
|
-
const window = Math.min(120_000, input.duration ?? 15_000);
|
|
43
|
-
const data = await this.run.request({
|
|
44
|
-
op: "watch",
|
|
45
|
-
expression: input.expression,
|
|
46
|
-
intervalMs: input.interval,
|
|
47
|
-
durationMs: input.duration,
|
|
48
|
-
reload: input.reload,
|
|
49
|
-
full: input.full,
|
|
50
|
-
}, window + WATCH_SLACK_MS);
|
|
51
|
-
this.answer.give(summariseWatch(data), { run: this.run.id, ...data }, () => {
|
|
52
|
-
const timeline = [
|
|
53
|
-
...data.samples.map((sample) => ({
|
|
54
|
-
t: sample.t,
|
|
55
|
-
line: sample.error
|
|
56
|
-
? this.cli.style.red(`threw ${sample.error}`)
|
|
57
|
-
: JSON.stringify(sample.v),
|
|
58
|
-
})),
|
|
59
|
-
...[...data.console, ...data.exceptions].map((message) => ({
|
|
60
|
-
t: message.t,
|
|
61
|
-
line: this.cli.style.grey(`[${message.level}] ${message.text}`),
|
|
62
|
-
})),
|
|
63
|
-
].sort((a, b) => a.t - b.t);
|
|
64
|
-
for (const { t, line } of timeline) {
|
|
65
|
-
this.cli.write(`${String(t).padStart(7)}ms ${line}`);
|
|
66
|
-
}
|
|
67
|
-
});
|
|
68
|
-
}
|
|
69
|
-
/** Every same-origin document hop a login or checkout flow makes. */
|
|
70
|
-
async navwalk(input) {
|
|
71
|
-
if (input.all) {
|
|
72
|
-
// One after the other: both drive the same page, and the walk puts the
|
|
73
|
-
// tab back where it started between them.
|
|
74
|
-
for (const flow of ["login", "checkout"]) {
|
|
75
|
-
this.cli.comment(`— ${flow}`);
|
|
76
|
-
await this.navwalk({ ...input, all: false, flow });
|
|
77
|
-
}
|
|
78
|
-
return;
|
|
79
|
-
}
|
|
80
|
-
const wait = input.wait ?? 9_000;
|
|
81
|
-
const data = await this.run.request({
|
|
82
|
-
op: "navwalk",
|
|
83
|
-
flow: input.flow,
|
|
84
|
-
click: input.click,
|
|
85
|
-
url: input.url,
|
|
86
|
-
waitMs: input.wait,
|
|
87
|
-
}, wait + NAVWALK_SLACK_MS);
|
|
88
|
-
this.answer.give(summariseNavwalk(data), { run: this.run.id, ...data }, () => {
|
|
89
|
-
for (const hit of data.sameOrigin) {
|
|
90
|
-
this.cli.write(` ${hit.status ?? " "} ${hit.target === "popup" ? "popup" : "main "} ${hit.url}`);
|
|
91
|
-
}
|
|
92
|
-
this.cli.comment(`candidate scopes, depth 1: ${data.candidateScopes.depth1.join(" ") || "none"}`);
|
|
93
|
-
this.cli.comment(`candidate scopes, depth 2: ${data.candidateScopes.depth2.join(" ") || "none"}`);
|
|
94
|
-
for (const dropped of data.droppedScopes) {
|
|
95
|
-
this.cli.comment(` not ${dropped.scope}: it would also disable ${dropped.covers}`);
|
|
96
|
-
}
|
|
97
|
-
if (data.endedOn && data.endedOn !== data.startedOn) {
|
|
98
|
-
this.cli.comment(data.returned
|
|
99
|
-
? `the flow ended on ${data.endedOn}; the tab is back on ${data.startedOn}`
|
|
100
|
-
: `the flow left the tab on ${data.endedOn}, and it could not be put back`);
|
|
101
|
-
}
|
|
102
|
-
});
|
|
103
|
-
}
|
|
104
|
-
/** Whether the page painted before it was styled. Always reloads. */
|
|
105
|
-
async fouc(input) {
|
|
106
|
-
const window = input.duration ?? 8_000;
|
|
107
|
-
const data = await this.run.request({ op: "fouc", selector: input.selector, durationMs: input.duration }, window + FOUC_SLACK_MS);
|
|
108
|
-
this.answer.give(data.verdict, { run: this.run.id, ...data }, () => {
|
|
109
|
-
for (const background of data.backgrounds) {
|
|
110
|
-
this.cli.write(`${String(background.t).padStart(7)}ms ${background.value ?? "(none)"}`);
|
|
111
|
-
}
|
|
112
|
-
});
|
|
113
|
-
}
|
|
114
|
-
/** The widths where the page's own JavaScript changes the DOM. */
|
|
115
|
-
async viewport(input) {
|
|
116
|
-
const data = await this.run.request({
|
|
117
|
-
op: "viewport",
|
|
118
|
-
url: input.url,
|
|
119
|
-
min: input.min,
|
|
120
|
-
max: input.max,
|
|
121
|
-
step: input.step,
|
|
122
|
-
settleMs: input.settle,
|
|
123
|
-
height: input.height,
|
|
124
|
-
}, viewportBudget(input));
|
|
125
|
-
this.answer.give(data.verdict, { run: this.run.id, ...data }, () => {
|
|
126
|
-
for (const breakpoint of data.breakpoints) {
|
|
127
|
-
this.cli.write(` ${breakpoint.width}px ${breakpoint.confirmed ? "confirmed" : "one way only"} ${breakpoint.hint ?? describeChanges(breakpoint)}`);
|
|
128
|
-
}
|
|
129
|
-
});
|
|
130
|
-
}
|
|
131
|
-
}
|
|
132
|
-
/**
|
|
133
|
-
* The verdict, then what was observed. If a rule excluded the url, that is the
|
|
134
|
-
* whole answer and the origin is a consequence, so it comes first.
|
|
135
|
-
*/
|
|
136
|
-
function summariseResponse(data) {
|
|
137
|
-
if (data.rules.decision === "excluded") {
|
|
138
|
-
return `excluded by ${data.rules.decidedBy} — ${data.explanation}`;
|
|
139
|
-
}
|
|
140
|
-
// `unknown` has two causes: nothing observed the url, or something did and
|
|
141
|
-
// reported a source this build does not know.
|
|
142
|
-
const cause = data.page?.responseCause ? ` (${data.page.responseCause})` : "";
|
|
143
|
-
const observed = data.servedFrom === "unknown"
|
|
144
|
-
? data.page
|
|
145
|
-
? `served from \`${data.page.responseSource}\`, which this build does not recognise${cause}`
|
|
146
|
-
: "not the current page, so nothing observed it"
|
|
147
|
-
: `served from ${data.servedFrom}${cause}${data.replayedFromBfCache ? ", replayed from the bfcache" : ""}`;
|
|
148
|
-
return `rules allow it; ${observed}${data.cache ? ", cached" : ", not cached"}`;
|
|
149
|
-
}
|
|
150
|
-
/** Answers "did it change", which is the question; a sample count answers nothing. */
|
|
151
|
-
function summariseWatch(data) {
|
|
152
|
-
const head = data.samples.length <= 1
|
|
153
|
-
? `never changed over ${data.durationMs}ms (${data.totalSamples} samples)`
|
|
154
|
-
: `${data.samples.length} transitions over ${data.durationMs}ms (${data.totalSamples} samples)`;
|
|
155
|
-
const notes = [
|
|
156
|
-
...(data.notes ?? []),
|
|
157
|
-
data.exceptions.length > 0
|
|
158
|
-
? `${data.exceptions.length} page exception${data.exceptions.length === 1 ? "" : "s"}`
|
|
159
|
-
: null,
|
|
160
|
-
data.console.length > 0 ? `${data.console.length} console messages` : null,
|
|
161
|
-
data.dropped > 0
|
|
162
|
-
? `${data.dropped} dropped — the buffer filled, so the timeline has a hole`
|
|
163
|
-
: null,
|
|
164
|
-
// Without a reload the sampler starts mid-life and may have missed it all.
|
|
165
|
-
data.reloaded ? null : "no reload, so this starts mid-life",
|
|
166
|
-
].filter(Boolean);
|
|
167
|
-
return notes.length > 0 ? `${head}. ${notes.join(", ")}.` : head;
|
|
168
|
-
}
|
|
169
|
-
/** Leads with the paths, which are the deliverable. */
|
|
170
|
-
function summariseNavwalk(data) {
|
|
171
|
-
if (data.sameOrigin.length === 0) {
|
|
172
|
-
return `clicked ${data.clicked} but no same-origin document hop followed in ${data.waitedMs}ms — the control may not be the flow's entry point, or the flow stays off-origin. ${data.offOrigin.length} off-origin hops were seen.`;
|
|
173
|
-
}
|
|
174
|
-
const paths = [...new Set(data.sameOrigin.map((hit) => hit.path))];
|
|
175
|
-
const popups = data.sameOrigin.filter((hit) => hit.target === "popup").length;
|
|
176
|
-
return `${paths.length} same-origin document path${paths.length === 1 ? "" : "s"} on ${data.host}${
|
|
177
|
-
// A hop found only in a popup is the one a single-target capture misses.
|
|
178
|
-
popups > 0 ? ` (${popups} seen only in a popup)` : ""}`;
|
|
179
|
-
}
|
|
180
|
-
/** A few keys and a count: the full list is `--json`'s, not the terminal's. */
|
|
181
|
-
function describeChanges(breakpoint) {
|
|
182
|
-
const shown = breakpoint.changed.slice(0, 3).join(", ");
|
|
183
|
-
const more = breakpoint.changedTotal - Math.min(3, breakpoint.changed.length);
|
|
184
|
-
return more > 0 ? `${shown} … +${more}` : shown;
|
|
185
|
-
}
|
|
186
|
-
/**
|
|
187
|
-
* Derived from the sweep's own arguments: a 1px step over 1200px is sixty
|
|
188
|
-
* times the work of a 60px one, and a fixed deadline would either time out the
|
|
189
|
-
* careful sweep or wait uselessly on the quick one.
|
|
190
|
-
*/
|
|
191
|
-
function viewportBudget({ min = 360, max = 1600, step = 20, settle = 350, }) {
|
|
192
|
-
const coarseSteps = Math.max(1, Math.ceil((max - min) / step));
|
|
193
|
-
return (coarseSteps + step * 4) * settle * 2 + VIEWPORT_OVERHEAD_MS;
|
|
194
|
-
}
|
|
@@ -1,216 +0,0 @@
|
|
|
1
|
-
export declare const RumGetBuildContext: {
|
|
2
|
-
new (values: import("../run-control-context.js").RunControlBuildContextValues<{
|
|
3
|
-
[x: string]: any;
|
|
4
|
-
} & {
|
|
5
|
-
key: string[];
|
|
6
|
-
flush: any;
|
|
7
|
-
tab: string;
|
|
8
|
-
json: boolean | undefined;
|
|
9
|
-
}>): {
|
|
10
|
-
readonly run?: string;
|
|
11
|
-
readonly json: boolean;
|
|
12
|
-
readonly timeout?: number;
|
|
13
|
-
readonly tab?: string;
|
|
14
|
-
readonly input: {
|
|
15
|
-
[x: string]: any;
|
|
16
|
-
} & {
|
|
17
|
-
key: string[];
|
|
18
|
-
flush: any;
|
|
19
|
-
tab: string;
|
|
20
|
-
json: boolean | undefined;
|
|
21
|
-
};
|
|
22
|
-
readonly environment: import("../../cli/cli-environment.js").CliEnvironment;
|
|
23
|
-
};
|
|
24
|
-
readonly args: {};
|
|
25
|
-
readonly flags: {
|
|
26
|
-
run: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
27
|
-
json: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
28
|
-
timeout: import("@oclif/core/interfaces").OptionFlag<number, import("@oclif/core/interfaces").CustomOptions>;
|
|
29
|
-
} & {
|
|
30
|
-
key: import("@oclif/core/interfaces").OptionFlag<string[], import("@oclif/core/interfaces").CustomOptions>;
|
|
31
|
-
flush: import("@oclif/core/interfaces").BooleanFlag<any>;
|
|
32
|
-
} & {
|
|
33
|
-
tab: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
34
|
-
};
|
|
35
|
-
create(parsedArgs: {
|
|
36
|
-
[x: string]: any;
|
|
37
|
-
}, parsedFlags: {
|
|
38
|
-
run: string;
|
|
39
|
-
json: boolean | undefined;
|
|
40
|
-
timeout: number;
|
|
41
|
-
key: string[];
|
|
42
|
-
flush: any;
|
|
43
|
-
tab: string;
|
|
44
|
-
}, environment: import("../../cli/cli-environment.js").CliEnvironment): {
|
|
45
|
-
readonly run?: string;
|
|
46
|
-
readonly json: boolean;
|
|
47
|
-
readonly timeout?: number;
|
|
48
|
-
readonly tab?: string;
|
|
49
|
-
readonly input: {
|
|
50
|
-
[x: string]: any;
|
|
51
|
-
} & {
|
|
52
|
-
key: string[];
|
|
53
|
-
flush: any;
|
|
54
|
-
tab: string;
|
|
55
|
-
json: boolean | undefined;
|
|
56
|
-
};
|
|
57
|
-
readonly environment: import("../../cli/cli-environment.js").CliEnvironment;
|
|
58
|
-
};
|
|
59
|
-
};
|
|
60
|
-
export declare const RumKeyBuildContext: {
|
|
61
|
-
new (values: import("../run-control-context.js").RunControlBuildContextValues<{
|
|
62
|
-
key: string;
|
|
63
|
-
} & {
|
|
64
|
-
tab: string;
|
|
65
|
-
json: boolean | undefined;
|
|
66
|
-
}>): {
|
|
67
|
-
readonly run?: string;
|
|
68
|
-
readonly json: boolean;
|
|
69
|
-
readonly timeout?: number;
|
|
70
|
-
readonly tab?: string;
|
|
71
|
-
readonly input: {
|
|
72
|
-
key: string;
|
|
73
|
-
} & {
|
|
74
|
-
tab: string;
|
|
75
|
-
json: boolean | undefined;
|
|
76
|
-
};
|
|
77
|
-
readonly environment: import("../../cli/cli-environment.js").CliEnvironment;
|
|
78
|
-
};
|
|
79
|
-
readonly args: {
|
|
80
|
-
key: import("@oclif/core/interfaces").Arg<string, Record<string, unknown>>;
|
|
81
|
-
};
|
|
82
|
-
readonly flags: {
|
|
83
|
-
run: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
84
|
-
json: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
85
|
-
timeout: import("@oclif/core/interfaces").OptionFlag<number, import("@oclif/core/interfaces").CustomOptions>;
|
|
86
|
-
} & {
|
|
87
|
-
tab: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
88
|
-
};
|
|
89
|
-
create(parsedArgs: {
|
|
90
|
-
key: string;
|
|
91
|
-
}, parsedFlags: {
|
|
92
|
-
run: string;
|
|
93
|
-
json: boolean | undefined;
|
|
94
|
-
timeout: number;
|
|
95
|
-
tab: string;
|
|
96
|
-
}, environment: import("../../cli/cli-environment.js").CliEnvironment): {
|
|
97
|
-
readonly run?: string;
|
|
98
|
-
readonly json: boolean;
|
|
99
|
-
readonly timeout?: number;
|
|
100
|
-
readonly tab?: string;
|
|
101
|
-
readonly input: {
|
|
102
|
-
key: string;
|
|
103
|
-
} & {
|
|
104
|
-
tab: string;
|
|
105
|
-
json: boolean | undefined;
|
|
106
|
-
};
|
|
107
|
-
readonly environment: import("../../cli/cli-environment.js").CliEnvironment;
|
|
108
|
-
};
|
|
109
|
-
};
|
|
110
|
-
export declare const RumPreviousBuildContext: {
|
|
111
|
-
new (values: import("../run-control-context.js").RunControlBuildContextValues<{
|
|
112
|
-
[x: string]: any;
|
|
113
|
-
} & {
|
|
114
|
-
tab: string;
|
|
115
|
-
json: boolean | undefined;
|
|
116
|
-
}>): {
|
|
117
|
-
readonly run?: string;
|
|
118
|
-
readonly json: boolean;
|
|
119
|
-
readonly timeout?: number;
|
|
120
|
-
readonly tab?: string;
|
|
121
|
-
readonly input: {
|
|
122
|
-
[x: string]: any;
|
|
123
|
-
} & {
|
|
124
|
-
tab: string;
|
|
125
|
-
json: boolean | undefined;
|
|
126
|
-
};
|
|
127
|
-
readonly environment: import("../../cli/cli-environment.js").CliEnvironment;
|
|
128
|
-
};
|
|
129
|
-
readonly args: {};
|
|
130
|
-
readonly flags: {
|
|
131
|
-
run: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
132
|
-
json: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
133
|
-
timeout: import("@oclif/core/interfaces").OptionFlag<number, import("@oclif/core/interfaces").CustomOptions>;
|
|
134
|
-
} & {
|
|
135
|
-
tab: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
136
|
-
};
|
|
137
|
-
create(parsedArgs: {
|
|
138
|
-
[x: string]: any;
|
|
139
|
-
}, parsedFlags: {
|
|
140
|
-
run: string;
|
|
141
|
-
json: boolean | undefined;
|
|
142
|
-
timeout: number;
|
|
143
|
-
tab: string;
|
|
144
|
-
}, environment: import("../../cli/cli-environment.js").CliEnvironment): {
|
|
145
|
-
readonly run?: string;
|
|
146
|
-
readonly json: boolean;
|
|
147
|
-
readonly timeout?: number;
|
|
148
|
-
readonly tab?: string;
|
|
149
|
-
readonly input: {
|
|
150
|
-
[x: string]: any;
|
|
151
|
-
} & {
|
|
152
|
-
tab: string;
|
|
153
|
-
json: boolean | undefined;
|
|
154
|
-
};
|
|
155
|
-
readonly environment: import("../../cli/cli-environment.js").CliEnvironment;
|
|
156
|
-
};
|
|
157
|
-
};
|
|
158
|
-
/** Beacons from every tab arrive at the run, so this takes no `--tab`. */
|
|
159
|
-
export declare const RumBeaconsBuildContext: {
|
|
160
|
-
new (values: import("../run-control-context.js").RunControlBuildContextValues<{
|
|
161
|
-
[x: string]: any;
|
|
162
|
-
} & {
|
|
163
|
-
key: string;
|
|
164
|
-
follow: any;
|
|
165
|
-
sinceSeq: number;
|
|
166
|
-
json: boolean | undefined;
|
|
167
|
-
}>): {
|
|
168
|
-
readonly run?: string;
|
|
169
|
-
readonly json: boolean;
|
|
170
|
-
readonly timeout?: number;
|
|
171
|
-
readonly tab?: string;
|
|
172
|
-
readonly input: {
|
|
173
|
-
[x: string]: any;
|
|
174
|
-
} & {
|
|
175
|
-
key: string;
|
|
176
|
-
follow: any;
|
|
177
|
-
sinceSeq: number;
|
|
178
|
-
json: boolean | undefined;
|
|
179
|
-
};
|
|
180
|
-
readonly environment: import("../../cli/cli-environment.js").CliEnvironment;
|
|
181
|
-
};
|
|
182
|
-
readonly args: {};
|
|
183
|
-
readonly flags: {
|
|
184
|
-
run: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
185
|
-
json: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
186
|
-
timeout: import("@oclif/core/interfaces").OptionFlag<number, import("@oclif/core/interfaces").CustomOptions>;
|
|
187
|
-
} & {
|
|
188
|
-
key: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
189
|
-
follow: import("@oclif/core/interfaces").BooleanFlag<any>;
|
|
190
|
-
sinceSeq: import("@oclif/core/interfaces").OptionFlag<number, import("@oclif/core/interfaces").CustomOptions>;
|
|
191
|
-
};
|
|
192
|
-
create(parsedArgs: {
|
|
193
|
-
[x: string]: any;
|
|
194
|
-
}, parsedFlags: {
|
|
195
|
-
run: string;
|
|
196
|
-
json: boolean | undefined;
|
|
197
|
-
timeout: number;
|
|
198
|
-
key: string;
|
|
199
|
-
follow: any;
|
|
200
|
-
sinceSeq: number;
|
|
201
|
-
}, environment: import("../../cli/cli-environment.js").CliEnvironment): {
|
|
202
|
-
readonly run?: string;
|
|
203
|
-
readonly json: boolean;
|
|
204
|
-
readonly timeout?: number;
|
|
205
|
-
readonly tab?: string;
|
|
206
|
-
readonly input: {
|
|
207
|
-
[x: string]: any;
|
|
208
|
-
} & {
|
|
209
|
-
key: string;
|
|
210
|
-
follow: any;
|
|
211
|
-
sinceSeq: number;
|
|
212
|
-
json: boolean | undefined;
|
|
213
|
-
};
|
|
214
|
-
readonly environment: import("../../cli/cli-environment.js").CliEnvironment;
|
|
215
|
-
};
|
|
216
|
-
};
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import { Args, Flags } from "@oclif/core";
|
|
2
|
-
import { pageControlContext, runControlContext, } from "../run-control-context.js";
|
|
3
|
-
export const RumGetBuildContext = pageControlContext({}, {
|
|
4
|
-
key: Flags.string({
|
|
5
|
-
multiple: true,
|
|
6
|
-
description: "Only this field; repeat for several",
|
|
7
|
-
}),
|
|
8
|
-
flush: Flags.boolean({
|
|
9
|
-
default: false,
|
|
10
|
-
description: "Force a send first, so nothing is missing. It ends the impression being measured: prefer `rum key`",
|
|
11
|
-
}),
|
|
12
|
-
});
|
|
13
|
-
export const RumKeyBuildContext = pageControlContext({
|
|
14
|
-
key: Args.string({
|
|
15
|
-
name: "key",
|
|
16
|
-
required: true,
|
|
17
|
-
description: "The RUM field, e.g. a custom dimension. Unsent data included",
|
|
18
|
-
}),
|
|
19
|
-
}, {});
|
|
20
|
-
export const RumPreviousBuildContext = pageControlContext({}, {});
|
|
21
|
-
/** Beacons from every tab arrive at the run, so this takes no `--tab`. */
|
|
22
|
-
export const RumBeaconsBuildContext = runControlContext({}, {
|
|
23
|
-
key: Flags.string({
|
|
24
|
-
description: "Only beacons carrying this field, anywhere in the payload, with its value",
|
|
25
|
-
}),
|
|
26
|
-
follow: Flags.boolean({
|
|
27
|
-
char: "f",
|
|
28
|
-
default: false,
|
|
29
|
-
description: "Keep printing new beacons until Ctrl+C: act, and watch",
|
|
30
|
-
}),
|
|
31
|
-
sinceSeq: Flags.integer({
|
|
32
|
-
description: "Only beacons after this sequence number",
|
|
33
|
-
}),
|
|
34
|
-
});
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { RunControlServiceFactory } from "../run-control-service-factory.js";
|
|
2
|
-
import { RunRumService } from "./run-rum-service.js";
|
|
3
|
-
export class RunRumServiceFactory extends RunControlServiceFactory {
|
|
4
|
-
buildService() {
|
|
5
|
-
return new RunRumService(this.deps((dead) => `Run ${dead.meta.id} is ${dead.status}. RUM data lives in the page, so it goes with the browser.`));
|
|
6
|
-
}
|
|
7
|
-
}
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import { RunControlServiceDeps } from "../run-control-model.js";
|
|
2
|
-
/**
|
|
3
|
-
* What Speed Kit tracked for the page in front of you: one impression on one
|
|
4
|
-
* local page. Aggregate production RUM is Athena's.
|
|
5
|
-
*/
|
|
6
|
-
export declare class RunRumService {
|
|
7
|
-
private readonly cli;
|
|
8
|
-
private readonly run;
|
|
9
|
-
private readonly answer;
|
|
10
|
-
private readonly json;
|
|
11
|
-
constructor(deps: RunControlServiceDeps);
|
|
12
|
-
/**
|
|
13
|
-
* The whole tracked object, as sent: anything tracked since the last beacon
|
|
14
|
-
* is missing unless `flush` forces a send — which ends the impression.
|
|
15
|
-
*/
|
|
16
|
-
get(input: {
|
|
17
|
-
keys?: string[];
|
|
18
|
-
flush?: boolean;
|
|
19
|
-
}): Promise<void>;
|
|
20
|
-
/** One field, unsent included, without ending the impression. */
|
|
21
|
-
key(key: string): Promise<void>;
|
|
22
|
-
/** The previous impression — on an SPA, the one that loaded the page. */
|
|
23
|
-
previous(): Promise<void>;
|
|
24
|
-
/**
|
|
25
|
-
* The beacons as they left the page — which one carried a field, and when.
|
|
26
|
-
* With `follow`, keeps printing new ones until Ctrl+C: click, and watch what
|
|
27
|
-
* the click sent.
|
|
28
|
-
*/
|
|
29
|
-
beacons(input: {
|
|
30
|
-
key?: string;
|
|
31
|
-
follow?: boolean;
|
|
32
|
-
sinceSeq?: number;
|
|
33
|
-
}): Promise<void>;
|
|
34
|
-
private printBeacons;
|
|
35
|
-
private ask;
|
|
36
|
-
}
|
|
@@ -1,122 +0,0 @@
|
|
|
1
|
-
/** How often `--follow` asks for new beacons. */
|
|
2
|
-
const FOLLOW_INTERVAL_MS = 500;
|
|
3
|
-
/**
|
|
4
|
-
* What Speed Kit tracked for the page in front of you: one impression on one
|
|
5
|
-
* local page. Aggregate production RUM is Athena's.
|
|
6
|
-
*/
|
|
7
|
-
export class RunRumService {
|
|
8
|
-
cli;
|
|
9
|
-
run;
|
|
10
|
-
answer;
|
|
11
|
-
json;
|
|
12
|
-
constructor(deps) {
|
|
13
|
-
this.cli = deps.cli;
|
|
14
|
-
this.run = deps.run;
|
|
15
|
-
this.answer = deps.answer;
|
|
16
|
-
this.json = deps.answer.json;
|
|
17
|
-
}
|
|
18
|
-
/**
|
|
19
|
-
* The whole tracked object, as sent: anything tracked since the last beacon
|
|
20
|
-
* is missing unless `flush` forces a send — which ends the impression.
|
|
21
|
-
*/
|
|
22
|
-
async get(input) {
|
|
23
|
-
await this.ask({ op: "rum.get", keys: input.keys, flush: input.flush }, (data) => summariseGet(data));
|
|
24
|
-
}
|
|
25
|
-
/** One field, unsent included, without ending the impression. */
|
|
26
|
-
async key(key) {
|
|
27
|
-
await this.ask({ op: "rum.key", key }, (data) => data.value === null || data.value === undefined
|
|
28
|
-
? `${data.key}: no value tracked (includes unsent, so it was not tracked)`
|
|
29
|
-
: `${data.key}: ${JSON.stringify(data.value)} (includes unsent)`);
|
|
30
|
-
}
|
|
31
|
-
/** The previous impression — on an SPA, the one that loaded the page. */
|
|
32
|
-
async previous() {
|
|
33
|
-
await this.ask({ op: "rum.previous" }, (data) => data.data
|
|
34
|
-
? `previous impression, ${Object.keys(data.data).length} fields`
|
|
35
|
-
: "no previous impression — this is the first on the page");
|
|
36
|
-
}
|
|
37
|
-
/**
|
|
38
|
-
* The beacons as they left the page — which one carried a field, and when.
|
|
39
|
-
* With `follow`, keeps printing new ones until Ctrl+C: click, and watch what
|
|
40
|
-
* the click sent.
|
|
41
|
-
*/
|
|
42
|
-
async beacons(input) {
|
|
43
|
-
const first = await this.run.request({
|
|
44
|
-
op: "rum.beacons",
|
|
45
|
-
key: input.key,
|
|
46
|
-
sinceSeq: input.sinceSeq,
|
|
47
|
-
});
|
|
48
|
-
this.answer.give(`${first.beacons.length} beacon${first.beacons.length === 1 ? "" : "s"}${input.key ? ` carrying ${input.key}` : ""} of the last ${first.kept} kept, cursor ${first.lastSeq}`, { run: this.run.id, ...first }, () => this.printBeacons(first, input.key));
|
|
49
|
-
if (!input.follow) {
|
|
50
|
-
return;
|
|
51
|
-
}
|
|
52
|
-
let cursor = first.lastSeq;
|
|
53
|
-
await new Promise((resolve) => {
|
|
54
|
-
const stop = () => {
|
|
55
|
-
clearInterval(timer);
|
|
56
|
-
process.off("SIGINT", stop);
|
|
57
|
-
resolve();
|
|
58
|
-
};
|
|
59
|
-
const timer = setInterval(() => {
|
|
60
|
-
void this.run
|
|
61
|
-
.request({
|
|
62
|
-
op: "rum.beacons",
|
|
63
|
-
key: input.key,
|
|
64
|
-
sinceSeq: cursor,
|
|
65
|
-
})
|
|
66
|
-
.then((next) => {
|
|
67
|
-
cursor = Math.max(cursor, next.lastSeq);
|
|
68
|
-
if (this.json) {
|
|
69
|
-
for (const beacon of next.beacons) {
|
|
70
|
-
this.cli.pipe(`${JSON.stringify(beacon)}\n`);
|
|
71
|
-
}
|
|
72
|
-
return;
|
|
73
|
-
}
|
|
74
|
-
this.printBeacons(next, input.key);
|
|
75
|
-
})
|
|
76
|
-
.catch(() => {
|
|
77
|
-
// The run went away; Ctrl+C is still how this ends.
|
|
78
|
-
});
|
|
79
|
-
}, FOLLOW_INTERVAL_MS);
|
|
80
|
-
process.once("SIGINT", stop);
|
|
81
|
-
});
|
|
82
|
-
}
|
|
83
|
-
printBeacons(data, key) {
|
|
84
|
-
for (const beacon of data.beacons) {
|
|
85
|
-
const time = beacon.at.slice(11, 19);
|
|
86
|
-
if (key) {
|
|
87
|
-
for (const match of beacon.matches ?? []) {
|
|
88
|
-
this.cli.write(`#${beacon.seq} ${this.cli.style.grey(time)} ${match.path} = ${JSON.stringify(match.value)}`);
|
|
89
|
-
}
|
|
90
|
-
continue;
|
|
91
|
-
}
|
|
92
|
-
const fields = beacon.data ? Object.keys(beacon.data) : [];
|
|
93
|
-
this.cli.write(`#${beacon.seq} ${this.cli.style.grey(time)} ${beacon.bytes} bytes ${fields.slice(0, 12).join(", ")}${fields.length > 12 ? " …" : ""}`);
|
|
94
|
-
}
|
|
95
|
-
}
|
|
96
|
-
async ask(command, summarise) {
|
|
97
|
-
const data = await this.run.request(command);
|
|
98
|
-
// A named cause, not a failure: Speed Kit is legitimately absent on some
|
|
99
|
-
// pages — and on a page still loading it is not absent, merely early.
|
|
100
|
-
if (!data.available) {
|
|
101
|
-
this.answer.give(`no Speed Kit RUM to read — ${data.reason}`, {
|
|
102
|
-
run: this.run.id,
|
|
103
|
-
...data,
|
|
104
|
-
});
|
|
105
|
-
return;
|
|
106
|
-
}
|
|
107
|
-
this.answer.give(summarise(data), { run: this.run.id, ...data }, () => {
|
|
108
|
-
for (const [field, value] of Object.entries(data.data ?? {})) {
|
|
109
|
-
this.cli.write(` ${field.padEnd(28)} ${JSON.stringify(value)}`);
|
|
110
|
-
}
|
|
111
|
-
});
|
|
112
|
-
}
|
|
113
|
-
}
|
|
114
|
-
/** The flush state leads, because it decides how to read the rest. */
|
|
115
|
-
function summariseGet(data) {
|
|
116
|
-
const fields = data.keys?.length ?? 0;
|
|
117
|
-
const head = `${fields} field${fields === 1 ? "" : "s"}, ${data.flushed ? "flushed first" : "sent data only — unsent not included"}`;
|
|
118
|
-
if (!data.notTracked?.length) {
|
|
119
|
-
return head;
|
|
120
|
-
}
|
|
121
|
-
return `${head}. Not tracked: ${data.notTracked.join(", ")}${data.flushed ? "" : " — `rum key` would see it if it is merely unsent"}`;
|
|
122
|
-
}
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { CliServiceInterface } from "../cli/index.js";
|
|
2
|
-
import { ControlError } from "./control-client.js";
|
|
3
|
-
/**
|
|
4
|
-
* How an op on a live run answers: a summary and its detail for a person, or
|
|
5
|
-
* the data as one JSON document for whatever reads stdout.
|
|
6
|
-
*
|
|
7
|
-
* The two never mix. Under `--json` nothing but the document reaches stdout,
|
|
8
|
-
* so `sk onboarding cache list --json | jq` needs no `--quiet`.
|
|
9
|
-
*/
|
|
10
|
-
export declare class RunAnswer {
|
|
11
|
-
private readonly cli;
|
|
12
|
-
readonly json: boolean;
|
|
13
|
-
constructor(cli: CliServiceInterface, json: boolean);
|
|
14
|
-
/**
|
|
15
|
-
* @param summary the one line that answers the question.
|
|
16
|
-
* @param data what `--json` prints. It names the run, so a saved answer
|
|
17
|
-
* still says where it came from.
|
|
18
|
-
* @param detail what a person reads below the summary.
|
|
19
|
-
*/
|
|
20
|
-
give(summary: string, data: object, detail?: () => void): void;
|
|
21
|
-
/**
|
|
22
|
-
* A failure, in the same two shapes.
|
|
23
|
-
*
|
|
24
|
-
* The `code` is the contract: a script branches on it, and the message is
|
|
25
|
-
* free to change. `next`, where there is one, is the move that gets past it.
|
|
26
|
-
*/
|
|
27
|
-
fail(error: ControlError): void;
|
|
28
|
-
}
|