slnodejs 6.1.415 → 6.1.447
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/browser-agent/dist/browser-agent-all.js +249 -414
- package/browser-agent/dist/browser-agent-all.min.js +3 -3
- package/browser-agent/package.json +1 -1
- package/package.json +2 -2
- package/tsOutputs/api.js +32 -86
- package/tsOutputs/build-scanner/ast-utils.js +11 -11
- package/tsOutputs/build-scanner/ast-utils.js.map +1 -1
- package/tsOutputs/build-scanner/build-diff-process.js +35 -16
- package/tsOutputs/build-scanner/build-diff-process.js.map +1 -1
- package/tsOutputs/build-scanner/cia.js +2 -2
- package/tsOutputs/build-scanner/cia.js.map +1 -1
- package/tsOutputs/build-scanner/default-values-resolver.js +5 -7
- package/tsOutputs/build-scanner/default-values-resolver.js.map +1 -1
- package/tsOutputs/build-scanner/diagnostic/build-scan-diagnosis.js +101 -159
- package/tsOutputs/build-scanner/diagnostic/build-scan-diagnosis.js.map +1 -1
- package/tsOutputs/build-scanner/diagnostic/none-diagnosis.js +23 -55
- package/tsOutputs/build-scanner/diagnostic/none-diagnosis.js.map +1 -1
- package/tsOutputs/build-scanner/file-and-folder-utils.js +3 -3
- package/tsOutputs/build-scanner/file-and-folder-utils.js.map +1 -1
- package/tsOutputs/build-scanner/file-system/actual-file.js +3 -3
- package/tsOutputs/build-scanner/file-system/actual-file.js.map +1 -1
- package/tsOutputs/build-scanner/instrumentation/browser-instrumenter.js +56 -60
- package/tsOutputs/build-scanner/instrumentation/browser-instrumenter.js.map +1 -1
- package/tsOutputs/build-scanner/instrumentation/content-instrumenter.js +9 -10
- package/tsOutputs/build-scanner/instrumentation/content-instrumenter.js.map +1 -1
- package/tsOutputs/build-scanner/instrumentation/files-instrumenter.js +80 -124
- package/tsOutputs/build-scanner/instrumentation/files-instrumenter.js.map +1 -1
- package/tsOutputs/build-scanner/instrumentation/instrumentation-utils.js +3 -3
- package/tsOutputs/build-scanner/instrumentation/instrumentation-utils.js.map +1 -1
- package/tsOutputs/build-scanner/instrumentation/instrumented-file-size-reducer.js +4 -4
- package/tsOutputs/build-scanner/instrumentation/instrumented-file-size-reducer.js.map +1 -1
- package/tsOutputs/build-scanner/instrumentation/process-pool/instrumenter-spawn.js +15 -50
- package/tsOutputs/build-scanner/instrumentation/process-pool/instrumenter-spawn.js.map +1 -1
- package/tsOutputs/build-scanner/instrumentation/process-pool/process-pool.js +84 -141
- package/tsOutputs/build-scanner/instrumentation/process-pool/process-pool.js.map +1 -1
- package/tsOutputs/build-scanner/instrumentation/process-pool/split-by-transform-stream.js +15 -34
- package/tsOutputs/build-scanner/instrumentation/process-pool/split-by-transform-stream.js.map +1 -1
- package/tsOutputs/build-scanner/instrumentation/process-pool/stop-by-condition-transform-stream.js +9 -27
- package/tsOutputs/build-scanner/instrumentation/process-pool/stop-by-condition-transform-stream.js.map +1 -1
- package/tsOutputs/build-scanner/instrumentation/strategies/copy-as-is-strategy.js +8 -10
- package/tsOutputs/build-scanner/instrumentation/strategies/copy-as-is-strategy.js.map +1 -1
- package/tsOutputs/build-scanner/instrumentation/strategies/js-instrumnetation-strategy.js +22 -54
- package/tsOutputs/build-scanner/instrumentation/strategies/js-instrumnetation-strategy.js.map +1 -1
- package/tsOutputs/build-scanner/instrumentation/strategies/markup-instrumnetation-strategy.js +55 -107
- package/tsOutputs/build-scanner/instrumentation/strategies/markup-instrumnetation-strategy.js.map +1 -1
- package/tsOutputs/build-scanner/js_diff/file-signature.js +5 -6
- package/tsOutputs/build-scanner/js_diff/file-signature.js.map +1 -1
- package/tsOutputs/build-scanner/js_diff/files-mapping.js +6 -6
- package/tsOutputs/build-scanner/js_diff/files-mapping.js.map +1 -1
- package/tsOutputs/build-scanner/js_diff/generated-file-signature.js +3 -3
- package/tsOutputs/build-scanner/js_diff/generated-file-signature.js.map +1 -1
- package/tsOutputs/build-scanner/js_diff/guess-method-location.js +26 -27
- package/tsOutputs/build-scanner/js_diff/guess-method-location.js.map +1 -1
- package/tsOutputs/build-scanner/js_diff/method-signature.js +1 -1
- package/tsOutputs/build-scanner/js_diff/method-signature.js.map +1 -1
- package/tsOutputs/build-scanner/js_diff/sl-mapper.js +28 -79
- package/tsOutputs/build-scanner/js_diff/sl-mapper.js.map +1 -1
- package/tsOutputs/build-scanner/js_diff/source-data-enricher.js +3 -2
- package/tsOutputs/build-scanner/js_diff/source-data-enricher.js.map +1 -1
- package/tsOutputs/build-scanner/js_diff/source-files-notifier.js +1 -1
- package/tsOutputs/build-scanner/js_diff/source-files-notifier.js.map +1 -1
- package/tsOutputs/build-scanner/mappings/ensure-files-handler.service.js +76 -149
- package/tsOutputs/build-scanner/mappings/ensure-files-handler.service.js.map +1 -1
- package/tsOutputs/build-scanner/mappings/file-element-utils.js +9 -9
- package/tsOutputs/build-scanner/mappings/file-element-utils.js.map +1 -1
- package/tsOutputs/build-scanner/mappings/file-enricher.js +71 -100
- package/tsOutputs/build-scanner/mappings/file-enricher.js.map +1 -1
- package/tsOutputs/build-scanner/mappings/file-path-fixer.js +112 -0
- package/tsOutputs/build-scanner/mappings/file-path-fixer.js.map +1 -0
- package/tsOutputs/build-scanner/mappings/files-container.js +89 -0
- package/tsOutputs/build-scanner/mappings/files-container.js.map +1 -0
- package/tsOutputs/build-scanner/mappings/files-data-container.js +18 -23
- package/tsOutputs/build-scanner/mappings/files-data-container.js.map +1 -1
- package/tsOutputs/build-scanner/mappings/source-path-mapper.js +15 -45
- package/tsOutputs/build-scanner/mappings/source-path-mapper.js.map +1 -1
- package/tsOutputs/build-scanner/markup-files-parser.js +1 -1
- package/tsOutputs/build-scanner/markup-files-parser.js.map +1 -1
- package/tsOutputs/build-scanner/scm/scm-file-fixer.js +27 -0
- package/tsOutputs/build-scanner/scm/scm-file-fixer.js.map +1 -0
- package/tsOutputs/build-scanner/scm/scm-files-container.js +9 -45
- package/tsOutputs/build-scanner/scm/scm-files-container.js.map +1 -1
- package/tsOutputs/build-scanner/sl-config-cia-cli.js +1 -1
- package/tsOutputs/build-scanner/sl-config-cia-cli.js.map +1 -1
- package/tsOutputs/build-scanner/utils.js +5 -5
- package/tsOutputs/build-scanner/utils.js.map +1 -1
- package/tsOutputs/cli-parse/agent-instance-data.js +2 -2
- package/tsOutputs/cli-parse/agent-instance-data.js.map +1 -1
- package/tsOutputs/cli-parse/child-process-wrapper.js +26 -60
- package/tsOutputs/cli-parse/child-process-wrapper.js.map +1 -1
- package/tsOutputs/cli-parse/cli.js +72 -191
- package/tsOutputs/cli-parse/cli.js.map +1 -1
- package/tsOutputs/cli-parse/constants/constants.js +9 -9
- package/tsOutputs/cli-parse/constants/constants.js.map +1 -1
- package/tsOutputs/cli-parse/custom-commander.js +17 -18
- package/tsOutputs/cli-parse/custom-commander.js.map +1 -1
- package/tsOutputs/cli-parse/executors/base-executor.js +121 -236
- package/tsOutputs/cli-parse/executors/base-executor.js.map +1 -1
- package/tsOutputs/cli-parse/executors/build-args-dto.js +10 -11
- package/tsOutputs/cli-parse/executors/build-args-dto.js.map +1 -1
- package/tsOutputs/cli-parse/executors/build-end-executor.js +34 -92
- package/tsOutputs/cli-parse/executors/build-end-executor.js.map +1 -1
- package/tsOutputs/cli-parse/executors/build-executor.js +64 -133
- package/tsOutputs/cli-parse/executors/build-executor.js.map +1 -1
- package/tsOutputs/cli-parse/executors/config-executor.js +35 -92
- package/tsOutputs/cli-parse/executors/config-executor.js.map +1 -1
- package/tsOutputs/cli-parse/executors/dry-run/base-data.js +29 -39
- package/tsOutputs/cli-parse/executors/dry-run/base-data.js.map +1 -1
- package/tsOutputs/cli-parse/executors/dry-run/build-mapping-data.js +92 -177
- package/tsOutputs/cli-parse/executors/dry-run/build-mapping-data.js.map +1 -1
- package/tsOutputs/cli-parse/executors/dry-run/dry-run-executor.js +110 -194
- package/tsOutputs/cli-parse/executors/dry-run/dry-run-executor.js.map +1 -1
- package/tsOutputs/cli-parse/executors/dry-run/dry-run-validation.js +49 -83
- package/tsOutputs/cli-parse/executors/dry-run/dry-run-validation.js.map +1 -1
- package/tsOutputs/cli-parse/executors/dry-run/footprints-data.js +55 -113
- package/tsOutputs/cli-parse/executors/dry-run/footprints-data.js.map +1 -1
- package/tsOutputs/cli-parse/executors/dry-run/helper-methods.js +24 -25
- package/tsOutputs/cli-parse/executors/dry-run/helper-methods.js.map +1 -1
- package/tsOutputs/cli-parse/executors/end-execution-executor.js +16 -64
- package/tsOutputs/cli-parse/executors/end-execution-executor.js.map +1 -1
- package/tsOutputs/cli-parse/executors/integration-build-components-executor.js +29 -82
- package/tsOutputs/cli-parse/executors/integration-build-components-executor.js.map +1 -1
- package/tsOutputs/cli-parse/executors/integration-build-delete-components-executor.js +12 -59
- package/tsOutputs/cli-parse/executors/integration-build-delete-components-executor.js.map +1 -1
- package/tsOutputs/cli-parse/executors/integration-build-update-components-executor.js +9 -58
- package/tsOutputs/cli-parse/executors/integration-build-update-components-executor.js.map +1 -1
- package/tsOutputs/cli-parse/executors/mocha-executor.js +41 -101
- package/tsOutputs/cli-parse/executors/mocha-executor.js.map +1 -1
- package/tsOutputs/cli-parse/executors/nyc-report-executor.js +24 -83
- package/tsOutputs/cli-parse/executors/nyc-report-executor.js.map +1 -1
- package/tsOutputs/cli-parse/executors/pr-config-executor.js +15 -63
- package/tsOutputs/cli-parse/executors/pr-config-executor.js.map +1 -1
- package/tsOutputs/cli-parse/executors/run-executor.js +23 -75
- package/tsOutputs/cli-parse/executors/run-executor.js.map +1 -1
- package/tsOutputs/cli-parse/executors/start-execution-executor.js +16 -64
- package/tsOutputs/cli-parse/executors/start-execution-executor.js.map +1 -1
- package/tsOutputs/cli-parse/executors/test-executions-executor.js +9 -63
- package/tsOutputs/cli-parse/executors/test-executions-executor.js.map +1 -1
- package/tsOutputs/cli-parse/executors/test-listener-executor.js +47 -117
- package/tsOutputs/cli-parse/executors/test-listener-executor.js.map +1 -1
- package/tsOutputs/cli-parse/executors/upload-report-executor.js +23 -71
- package/tsOutputs/cli-parse/executors/upload-report-executor.js.map +1 -1
- package/tsOutputs/cli-parse/utils.js +10 -10
- package/tsOutputs/cli-parse/utils.js.map +1 -1
- package/tsOutputs/common/agent-events/agent-events-controller.js +146 -251
- package/tsOutputs/common/agent-events/agent-events-controller.js.map +1 -1
- package/tsOutputs/common/agent-events/agent-events-guard.js +12 -15
- package/tsOutputs/common/agent-events/agent-events-guard.js.map +1 -1
- package/tsOutputs/common/agent-events/agent-instance-info-builder.js +22 -24
- package/tsOutputs/common/agent-events/agent-instance-info-builder.js.map +1 -1
- package/tsOutputs/common/agent-events/agent-start-info-builder.js +7 -8
- package/tsOutputs/common/agent-events/agent-start-info-builder.js.map +1 -1
- package/tsOutputs/common/agent-events/browser-info-builder.js +9 -10
- package/tsOutputs/common/agent-events/browser-info-builder.js.map +1 -1
- package/tsOutputs/common/agent-events/ci-info-builder.js +12 -13
- package/tsOutputs/common/agent-events/ci-info-builder.js.map +1 -1
- package/tsOutputs/common/agent-events/cockpit-notifier.js +38 -87
- package/tsOutputs/common/agent-events/cockpit-notifier.js.map +1 -1
- package/tsOutputs/common/agent-events/dry-run-agent-events-controller.js +10 -27
- package/tsOutputs/common/agent-events/dry-run-agent-events-controller.js.map +1 -1
- package/tsOutputs/common/agent-events/machine-info-builder.js +21 -22
- package/tsOutputs/common/agent-events/machine-info-builder.js.map +1 -1
- package/tsOutputs/common/agent-events/no-op-agent-events-controller.js +30 -84
- package/tsOutputs/common/agent-events/no-op-agent-events-controller.js.map +1 -1
- package/tsOutputs/common/agent-events/nodejs-env-info-builder.js +7 -8
- package/tsOutputs/common/agent-events/nodejs-env-info-builder.js.map +1 -1
- package/tsOutputs/common/agent-events/sensitive-data-filter.js +3 -4
- package/tsOutputs/common/agent-events/sensitive-data-filter.js.map +1 -1
- package/tsOutputs/common/agent-instance-data.js +23 -28
- package/tsOutputs/common/agent-instance-data.js.map +1 -1
- package/tsOutputs/common/cli-progress.js +16 -19
- package/tsOutputs/common/cli-progress.js.map +1 -1
- package/tsOutputs/common/config-process/config-loader.js +23 -24
- package/tsOutputs/common/config-process/config-loader.js.map +1 -1
- package/tsOutputs/common/config-process/config-system.js +104 -131
- package/tsOutputs/common/config-process/config-system.js.map +1 -1
- package/tsOutputs/common/config-process/config.js +52 -73
- package/tsOutputs/common/config-process/config.js.map +1 -1
- package/tsOutputs/common/config-process/index.js +38 -57
- package/tsOutputs/common/config-process/index.js.map +1 -1
- package/tsOutputs/common/config-process/no-op-config-process.js +9 -29
- package/tsOutputs/common/config-process/no-op-config-process.js.map +1 -1
- package/tsOutputs/common/constants/constants.js +19 -25
- package/tsOutputs/common/constants/constants.js.map +1 -1
- package/tsOutputs/common/constants/sl-env-vars.js +125 -131
- package/tsOutputs/common/constants/sl-env-vars.js.map +1 -1
- package/tsOutputs/common/coverage-elements/file-element.js +66 -103
- package/tsOutputs/common/coverage-elements/file-element.js.map +1 -1
- package/tsOutputs/common/coverage-elements/istanbul-unique-id-converter.js +28 -47
- package/tsOutputs/common/coverage-elements/istanbul-unique-id-converter.js.map +1 -1
- package/tsOutputs/common/coverage-elements/new-id-resolver.js +17 -17
- package/tsOutputs/common/coverage-elements/new-id-resolver.js.map +1 -1
- package/tsOutputs/common/coverage-elements/original-module-loader.js +71 -79
- package/tsOutputs/common/coverage-elements/original-module-loader.js.map +1 -1
- package/tsOutputs/common/coverage-elements/unique-id-converter.js +90 -110
- package/tsOutputs/common/coverage-elements/unique-id-converter.js.map +1 -1
- package/tsOutputs/common/environment-data-service.js +10 -11
- package/tsOutputs/common/environment-data-service.js.map +1 -1
- package/tsOutputs/common/events-process/events-creator.js +20 -32
- package/tsOutputs/common/events-process/events-creator.js.map +1 -1
- package/tsOutputs/common/events-process/index.js +97 -186
- package/tsOutputs/common/events-process/index.js.map +1 -1
- package/tsOutputs/common/footprints-process/collection-interval.js +10 -11
- package/tsOutputs/common/footprints-process/collection-interval.js.map +1 -1
- package/tsOutputs/common/footprints-process/footprints-service-proxy.js +21 -22
- package/tsOutputs/common/footprints-process/footprints-service-proxy.js.map +1 -1
- package/tsOutputs/common/footprints-process/index.js +68 -102
- package/tsOutputs/common/footprints-process/index.js.map +1 -1
- package/tsOutputs/common/footprints-process/istanbul-to-footprints-contract.js +2 -5
- package/tsOutputs/common/footprints-process/istanbul-to-footprints-contract.js.map +1 -1
- package/tsOutputs/common/footprints-process/istanbul-to-footprints.js +160 -162
- package/tsOutputs/common/footprints-process/istanbul-to-footprints.js.map +1 -1
- package/tsOutputs/common/footprints-process/production-footprints-handler.js +103 -156
- package/tsOutputs/common/footprints-process/production-footprints-handler.js.map +1 -1
- package/tsOutputs/common/footprints-process-v6/base-browser-hits-converter.js +30 -48
- package/tsOutputs/common/footprints-process-v6/base-browser-hits-converter.js.map +1 -1
- package/tsOutputs/common/footprints-process-v6/browser-footprints-buffer.js +7 -25
- package/tsOutputs/common/footprints-process-v6/browser-footprints-buffer.js.map +1 -1
- package/tsOutputs/common/footprints-process-v6/buffer-size-helper.js +13 -14
- package/tsOutputs/common/footprints-process-v6/buffer-size-helper.js.map +1 -1
- package/tsOutputs/common/footprints-process-v6/collector-footprints-buffer.js +14 -32
- package/tsOutputs/common/footprints-process-v6/collector-footprints-buffer.js.map +1 -1
- package/tsOutputs/common/footprints-process-v6/collector-footprints-process.js +43 -109
- package/tsOutputs/common/footprints-process-v6/collector-footprints-process.js.map +1 -1
- package/tsOutputs/common/footprints-process-v6/contracts.js +2 -5
- package/tsOutputs/common/footprints-process-v6/contracts.js.map +1 -1
- package/tsOutputs/common/footprints-process-v6/footprints-buffer.d.ts +1 -1
- package/tsOutputs/common/footprints-process-v6/footprints-buffer.js +55 -78
- package/tsOutputs/common/footprints-process-v6/footprints-buffer.js.map +1 -1
- package/tsOutputs/common/footprints-process-v6/hits-collector.js +89 -129
- package/tsOutputs/common/footprints-process-v6/hits-collector.js.map +1 -1
- package/tsOutputs/common/footprints-process-v6/hits-converter.js +70 -78
- package/tsOutputs/common/footprints-process-v6/hits-converter.js.map +1 -1
- package/tsOutputs/common/footprints-process-v6/index.d.ts +1 -0
- package/tsOutputs/common/footprints-process-v6/index.js +210 -347
- package/tsOutputs/common/footprints-process-v6/index.js.map +1 -1
- package/tsOutputs/common/footprints-process-v6/location-formatter.js +2 -2
- package/tsOutputs/common/footprints-process-v6/location-formatter.js.map +1 -1
- package/tsOutputs/common/footprints-process-v6/relative-path-resolver.js +10 -11
- package/tsOutputs/common/footprints-process-v6/relative-path-resolver.js.map +1 -1
- package/tsOutputs/common/footprints-process-v6/remote-browser-hits-converter.js +5 -25
- package/tsOutputs/common/footprints-process-v6/remote-browser-hits-converter.js.map +1 -1
- package/tsOutputs/common/footprints-process-v6/remote-footprints-process.js +6 -57
- package/tsOutputs/common/footprints-process-v6/remote-footprints-process.js.map +1 -1
- package/tsOutputs/common/footprints-process-v6/remote-hits-collector.js +7 -27
- package/tsOutputs/common/footprints-process-v6/remote-hits-collector.js.map +1 -1
- package/tsOutputs/common/footprints-process-v6/source-map-data.js +14 -15
- package/tsOutputs/common/footprints-process-v6/source-map-data.js.map +1 -1
- package/tsOutputs/common/http/backend-proxy.js +222 -321
- package/tsOutputs/common/http/backend-proxy.js.map +1 -1
- package/tsOutputs/common/http/contracts.js +40 -116
- package/tsOutputs/common/http/contracts.js.map +1 -1
- package/tsOutputs/common/http/dry-run-proxy.js +68 -111
- package/tsOutputs/common/http/dry-run-proxy.js.map +1 -1
- package/tsOutputs/common/http/entities-mapper.js +6 -9
- package/tsOutputs/common/http/entities-mapper.js.map +1 -1
- package/tsOutputs/common/http/http-client.js +76 -86
- package/tsOutputs/common/http/http-client.js.map +1 -1
- package/tsOutputs/common/http/sl-routes.js +119 -122
- package/tsOutputs/common/http/sl-routes.js.map +1 -1
- package/tsOutputs/common/ignored-files-handler.js +48 -49
- package/tsOutputs/common/ignored-files-handler.js.map +1 -1
- package/tsOutputs/common/logger.js +66 -88
- package/tsOutputs/common/logger.js.map +1 -1
- package/tsOutputs/common/messages-formatter.js +9 -14
- package/tsOutputs/common/messages-formatter.js.map +1 -1
- package/tsOutputs/common/no-op-state-tracker.js +14 -37
- package/tsOutputs/common/no-op-state-tracker.js.map +1 -1
- package/tsOutputs/common/queue.js +18 -36
- package/tsOutputs/common/queue.js.map +1 -1
- package/tsOutputs/common/scm/git-cloner.js +30 -94
- package/tsOutputs/common/scm/git-cloner.js.map +1 -1
- package/tsOutputs/common/scm/git-format-builder.js +24 -25
- package/tsOutputs/common/scm/git-format-builder.js.map +1 -1
- package/tsOutputs/common/scm/git.js +192 -327
- package/tsOutputs/common/scm/git.js.map +1 -1
- package/tsOutputs/common/scm/none.js +58 -110
- package/tsOutputs/common/scm/none.js.map +1 -1
- package/tsOutputs/common/scm/scm-factory.js +13 -16
- package/tsOutputs/common/scm/scm-factory.js.map +1 -1
- package/tsOutputs/common/short-name-to-file-mapper.js +30 -33
- package/tsOutputs/common/short-name-to-file-mapper.js.map +1 -1
- package/tsOutputs/common/source-map-handler.js +76 -98
- package/tsOutputs/common/source-map-handler.js.map +1 -1
- package/tsOutputs/common/source-map-reader.js +35 -36
- package/tsOutputs/common/source-map-reader.js.map +1 -1
- package/tsOutputs/common/source-maps-utils.js +8 -11
- package/tsOutputs/common/source-maps-utils.js.map +1 -1
- package/tsOutputs/common/state-tracker-fpv6.js +15 -37
- package/tsOutputs/common/state-tracker-fpv6.js.map +1 -1
- package/tsOutputs/common/state-tracker.js +124 -212
- package/tsOutputs/common/state-tracker.js.map +1 -1
- package/tsOutputs/common/system-date.js +3 -3
- package/tsOutputs/common/system-date.js.map +1 -1
- package/tsOutputs/common/utils/abstract-data-builder.js +8 -9
- package/tsOutputs/common/utils/abstract-data-builder.js.map +1 -1
- package/tsOutputs/common/utils/build-session-data-builder.js +25 -79
- package/tsOutputs/common/utils/build-session-data-builder.js.map +1 -1
- package/tsOutputs/common/utils/dependency-utils.js +13 -16
- package/tsOutputs/common/utils/dependency-utils.js.map +1 -1
- package/tsOutputs/common/utils/env-var-parsing.js +10 -14
- package/tsOutputs/common/utils/env-var-parsing.js.map +1 -1
- package/tsOutputs/common/utils/files-utils.js +16 -19
- package/tsOutputs/common/utils/files-utils.js.map +1 -1
- package/tsOutputs/common/utils/process-utils.js +12 -25
- package/tsOutputs/common/utils/process-utils.js.map +1 -1
- package/tsOutputs/common/utils/test-runner-build-session-data-builder.js +16 -62
- package/tsOutputs/common/utils/test-runner-build-session-data-builder.js.map +1 -1
- package/tsOutputs/common/utils/test-utils/mock-server-utils/mock-server-proxy.js +120 -192
- package/tsOutputs/common/utils/test-utils/mock-server-utils/mock-server-proxy.js.map +1 -1
- package/tsOutputs/common/utils/timer-utils.js +4 -7
- package/tsOutputs/common/utils/timer-utils.js.map +1 -1
- package/tsOutputs/common/utils/token-data-builder.js +30 -50
- package/tsOutputs/common/utils/token-data-builder.js.map +1 -1
- package/tsOutputs/common/utils/validation-utils.d.ts +4 -0
- package/tsOutputs/common/utils/validation-utils.js +13 -10
- package/tsOutputs/common/utils/validation-utils.js.map +1 -1
- package/tsOutputs/common/uuid.js +7 -10
- package/tsOutputs/common/uuid.js.map +1 -1
- package/tsOutputs/common/v8-utils.js +12 -50
- package/tsOutputs/common/v8-utils.js.map +1 -1
- package/tsOutputs/common/watchdog.js +35 -56
- package/tsOutputs/common/watchdog.js.map +1 -1
- package/tsOutputs/mocha-reporter/index.js +12 -12
- package/tsOutputs/mocha-reporter/index.js.map +1 -1
- package/tsOutputs/mocha-reporter/otel-agent.js +47 -118
- package/tsOutputs/mocha-reporter/otel-agent.js.map +1 -1
- package/tsOutputs/test-listener/SlNodeJsProxy.js +34 -35
- package/tsOutputs/test-listener/SlNodeJsProxy.js.map +1 -1
- package/tsOutputs/test-listener/UserMessageHelper.js +14 -19
- package/tsOutputs/test-listener/UserMessageHelper.js.map +1 -1
- package/tsOutputs/test-listener/agent-loader.js +42 -59
- package/tsOutputs/test-listener/agent-loader.js.map +1 -1
- package/tsOutputs/test-listener/agent.js +93 -150
- package/tsOutputs/test-listener/agent.js.map +1 -1
- package/tsOutputs/test-listener/api.js +36 -70
- package/tsOutputs/test-listener/api.js.map +1 -1
- package/tsOutputs/test-listener/base-proxy.js +25 -27
- package/tsOutputs/test-listener/base-proxy.js.map +1 -1
- package/tsOutputs/test-listener/bootstrap.js +6 -6
- package/tsOutputs/test-listener/bootstrap.js.map +1 -1
- package/tsOutputs/test-listener/child-process-patcher.js +10 -10
- package/tsOutputs/test-listener/child-process-patcher.js.map +1 -1
- package/tsOutputs/test-listener/cli.js +27 -30
- package/tsOutputs/test-listener/cli.js.map +1 -1
- package/tsOutputs/test-listener/coloring/http-coloring.js +30 -33
- package/tsOutputs/test-listener/coloring/http-coloring.js.map +1 -1
- package/tsOutputs/test-listener/coloring/listening-port.js +14 -17
- package/tsOutputs/test-listener/coloring/listening-port.js.map +1 -1
- package/tsOutputs/test-listener/command-line-arg-parser.js +12 -15
- package/tsOutputs/test-listener/command-line-arg-parser.js.map +1 -1
- package/tsOutputs/test-listener/config-process/config-loader.js +21 -22
- package/tsOutputs/test-listener/config-process/config-loader.js.map +1 -1
- package/tsOutputs/test-listener/config-process/config-system.js +100 -127
- package/tsOutputs/test-listener/config-process/config-system.js.map +1 -1
- package/tsOutputs/test-listener/config-process/index.js +38 -57
- package/tsOutputs/test-listener/config-process/index.js.map +1 -1
- package/tsOutputs/test-listener/config.js +38 -59
- package/tsOutputs/test-listener/config.js.map +1 -1
- package/tsOutputs/test-listener/entities/BasicConfigurationData.js +37 -64
- package/tsOutputs/test-listener/entities/BasicConfigurationData.js.map +1 -1
- package/tsOutputs/test-listener/entities/build-scanner/ConfigModeData.js +17 -42
- package/tsOutputs/test-listener/entities/build-scanner/ConfigModeData.js.map +1 -1
- package/tsOutputs/test-listener/entities/build-scanner/ScanModeData.js +19 -45
- package/tsOutputs/test-listener/entities/build-scanner/ScanModeData.js.map +1 -1
- package/tsOutputs/test-listener/environment-data-service.js +10 -11
- package/tsOutputs/test-listener/environment-data-service.js.map +1 -1
- package/tsOutputs/test-listener/execution-process/entities-mapper.js +11 -14
- package/tsOutputs/test-listener/execution-process/entities-mapper.js.map +1 -1
- package/tsOutputs/test-listener/execution-process/execution-service-proxy.js +54 -72
- package/tsOutputs/test-listener/execution-process/execution-service-proxy.js.map +1 -1
- package/tsOutputs/test-listener/execution-process/index.js +26 -26
- package/tsOutputs/test-listener/execution-process/index.js.map +1 -1
- package/tsOutputs/test-listener/factory.js +140 -175
- package/tsOutputs/test-listener/factory.js.map +1 -1
- package/tsOutputs/test-listener/footprints-process/footprints-service-proxy.js +17 -34
- package/tsOutputs/test-listener/footprints-process/footprints-service-proxy.js.map +1 -1
- package/tsOutputs/test-listener/footprints-process/index.js +53 -58
- package/tsOutputs/test-listener/footprints-process/index.js.map +1 -1
- package/tsOutputs/test-listener/footprints-process/istanbul-to-footprints-base.js +49 -50
- package/tsOutputs/test-listener/footprints-process/istanbul-to-footprints-base.js.map +1 -1
- package/tsOutputs/test-listener/footprints-process/istanbul-to-footprints-v3.js +98 -117
- package/tsOutputs/test-listener/footprints-process/istanbul-to-footprints-v3.js.map +1 -1
- package/tsOutputs/test-listener/footprints-process/ts-node-hits-collector.js +57 -141
- package/tsOutputs/test-listener/footprints-process/ts-node-hits-collector.js.map +1 -1
- package/tsOutputs/test-listener/integrations/SlGulp.js +25 -26
- package/tsOutputs/test-listener/integrations/SlGulp.js.map +1 -1
- package/tsOutputs/test-listener/logs-process/index.js +30 -35
- package/tsOutputs/test-listener/logs-process/index.js.map +1 -1
- package/tsOutputs/test-listener/logs-process/log-service-proxy.js +8 -25
- package/tsOutputs/test-listener/logs-process/log-service-proxy.js.map +1 -1
- package/tsOutputs/test-listener/nyc-report-executor-fpv6.js +53 -110
- package/tsOutputs/test-listener/nyc-report-executor-fpv6.js.map +1 -1
- package/tsOutputs/test-listener/nyc-report-executor.js +48 -85
- package/tsOutputs/test-listener/nyc-report-executor.js.map +1 -1
- package/tsOutputs/test-listener/otel-agent-loader.js +30 -33
- package/tsOutputs/test-listener/otel-agent-loader.js.map +1 -1
- package/tsOutputs/test-listener/queue.js +18 -36
- package/tsOutputs/test-listener/queue.js.map +1 -1
- package/tsOutputs/test-listener/remote-agent.js +97 -223
- package/tsOutputs/test-listener/remote-agent.js.map +1 -1
- package/tsOutputs/test-listener/resolvers/AppNameResolver.js +8 -25
- package/tsOutputs/test-listener/resolvers/AppNameResolver.js.map +1 -1
- package/tsOutputs/test-listener/resolvers/ArgumentResolver.js +11 -12
- package/tsOutputs/test-listener/resolvers/ArgumentResolver.js.map +1 -1
- package/tsOutputs/test-listener/resolvers/BuildResolver.js +8 -25
- package/tsOutputs/test-listener/resolvers/BuildResolver.js.map +1 -1
- package/tsOutputs/test-listener/resolvers/BuildSessionIdFileResolver.js +8 -25
- package/tsOutputs/test-listener/resolvers/BuildSessionIdFileResolver.js.map +1 -1
- package/tsOutputs/test-listener/resolvers/BuildSessionIdResolver.js +8 -25
- package/tsOutputs/test-listener/resolvers/BuildSessionIdResolver.js.map +1 -1
- package/tsOutputs/test-listener/resolvers/ProxyResolver.js +8 -25
- package/tsOutputs/test-listener/resolvers/ProxyResolver.js.map +1 -1
- package/tsOutputs/test-listener/resolvers/TokenResolver.js +8 -25
- package/tsOutputs/test-listener/resolvers/TokenResolver.js.map +1 -1
- package/tsOutputs/test-listener/state-tracker-process/index.js +54 -74
- package/tsOutputs/test-listener/state-tracker-process/index.js.map +1 -1
- package/tsOutputs/test-listener/state-tracker-process/state-tracker-proxy.js +18 -37
- package/tsOutputs/test-listener/state-tracker-process/state-tracker-proxy.js.map +1 -1
- package/tsOutputs/test-listener/test-recommendation-handler.js +66 -109
- package/tsOutputs/test-listener/test-recommendation-handler.js.map +1 -1
- package/tsOutputs/test-listener/upload-report-handler.js +33 -35
- package/tsOutputs/test-listener/upload-report-handler.js.map +1 -1
- package/tsOutputs/test-listener/utils.js +13 -14
- package/tsOutputs/test-listener/utils.js.map +1 -1
- package/tsOutputs/test-listener/uuid.js +7 -10
- package/tsOutputs/test-listener/uuid.js.map +1 -1
- package/tsOutputs/test-listener/wait-for-multiple-callbacks.js +17 -19
- package/tsOutputs/test-listener/wait-for-multiple-callbacks.js.map +1 -1
- package/tsOutputs/test-listener/watchdog.js +32 -51
- package/tsOutputs/test-listener/watchdog.js.map +1 -1
- package/tsOutputs/build-scanner/mappings/scm-file-fixer.js +0 -96
- package/tsOutputs/build-scanner/mappings/scm-file-fixer.js.map +0 -1
|
@@ -1,30 +1,4 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __extends = (this && this.__extends) || (function () {
|
|
3
|
-
var extendStatics = function (d, b) {
|
|
4
|
-
extendStatics = Object.setPrototypeOf ||
|
|
5
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
6
|
-
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
7
|
-
return extendStatics(d, b);
|
|
8
|
-
};
|
|
9
|
-
return function (d, b) {
|
|
10
|
-
if (typeof b !== "function" && b !== null)
|
|
11
|
-
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
12
|
-
extendStatics(d, b);
|
|
13
|
-
function __() { this.constructor = d; }
|
|
14
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
15
|
-
};
|
|
16
|
-
})();
|
|
17
|
-
var __assign = (this && this.__assign) || function () {
|
|
18
|
-
__assign = Object.assign || function(t) {
|
|
19
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
20
|
-
s = arguments[i];
|
|
21
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
22
|
-
t[p] = s[p];
|
|
23
|
-
}
|
|
24
|
-
return t;
|
|
25
|
-
};
|
|
26
|
-
return __assign.apply(this, arguments);
|
|
27
|
-
};
|
|
28
2
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
29
3
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
30
4
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
@@ -34,145 +8,102 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
34
8
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
35
9
|
});
|
|
36
10
|
};
|
|
37
|
-
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
38
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
39
|
-
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
40
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
41
|
-
function step(op) {
|
|
42
|
-
if (f) throw new TypeError("Generator is already executing.");
|
|
43
|
-
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
44
|
-
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
45
|
-
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
46
|
-
switch (op[0]) {
|
|
47
|
-
case 0: case 1: t = op; break;
|
|
48
|
-
case 4: _.label++; return { value: op[1], done: false };
|
|
49
|
-
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
50
|
-
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
51
|
-
default:
|
|
52
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
53
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
54
|
-
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
55
|
-
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
56
|
-
if (t[2]) _.ops.pop();
|
|
57
|
-
_.trys.pop(); continue;
|
|
58
|
-
}
|
|
59
|
-
op = body.call(thisArg, _);
|
|
60
|
-
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
61
|
-
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
62
|
-
}
|
|
63
|
-
};
|
|
64
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
65
12
|
exports.StateTracker = void 0;
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
_this._openExecutionFoundOnce = false;
|
|
13
|
+
const events = require("events");
|
|
14
|
+
const sl_env_vars_1 = require("./constants/sl-env-vars");
|
|
15
|
+
const validation_utils_1 = require("./utils/validation-utils");
|
|
16
|
+
const cockpit_notifier_1 = require("./agent-events/cockpit-notifier");
|
|
17
|
+
const agent_events_contracts_1 = require("./agent-events/agent-events-contracts");
|
|
18
|
+
const INITIAL_COLOR = '00000000-0000-0000-0000-000000000000/__init';
|
|
19
|
+
class StateTracker extends events.EventEmitter {
|
|
20
|
+
constructor(cfg, configProcess, checkTestStatusWatchdog, backendProxy, logger) {
|
|
21
|
+
super();
|
|
22
|
+
this.currentTestIdentifier = null;
|
|
23
|
+
this.isRunning = false;
|
|
24
|
+
this._openExecutionFoundOnce = false;
|
|
79
25
|
validation_utils_1.ValidationUtils.verifyNotNullOrEmpty(cfg, 'agentConfig');
|
|
80
26
|
validation_utils_1.ValidationUtils.verifyNotNullOrEmpty(configProcess, 'configProcess');
|
|
81
27
|
validation_utils_1.ValidationUtils.verifyNotNullOrEmpty(checkTestStatusWatchdog, 'watchdog');
|
|
82
28
|
validation_utils_1.ValidationUtils.verifyNotNullOrEmpty(backendProxy, 'backendProxy');
|
|
83
29
|
validation_utils_1.ValidationUtils.verifyNotNullOrEmpty(logger, 'logger');
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
if (
|
|
90
|
-
|
|
30
|
+
this.cfg = cfg;
|
|
31
|
+
this.configProcess = configProcess;
|
|
32
|
+
this.checkTestStatusWatchdog = checkTestStatusWatchdog;
|
|
33
|
+
this.backendProxy = backendProxy;
|
|
34
|
+
this.logger = logger;
|
|
35
|
+
if (this.cfg.useInitialColor.value && this.currentTestIdentifier == null) {
|
|
36
|
+
this.switchToAnonFootprints();
|
|
91
37
|
}
|
|
92
|
-
configProcess.on('configuration_changed',
|
|
93
|
-
if (newCfg.useInitialColor.value &&
|
|
94
|
-
|
|
38
|
+
configProcess.on('configuration_changed', (newCfg) => {
|
|
39
|
+
if (newCfg.useInitialColor.value && this.currentTestIdentifier == null) {
|
|
40
|
+
this.switchToAnonFootprints();
|
|
95
41
|
}
|
|
96
|
-
|
|
97
|
-
|
|
42
|
+
this.cfg = newCfg;
|
|
43
|
+
this.checkTestStatusWatchdog.setInterval(newCfg.executionQueryIntervalSecs.value);
|
|
98
44
|
});
|
|
99
|
-
|
|
100
|
-
return _this;
|
|
45
|
+
this.startCheckingTestStatusAtServer();
|
|
101
46
|
}
|
|
102
|
-
|
|
103
|
-
var _this = this;
|
|
47
|
+
startCheckingTestStatusAtServer() {
|
|
104
48
|
if (sl_env_vars_1.SlEnvVars.inProductionListenerMode()) {
|
|
105
49
|
this.logger.debug('In production listener, no need to check test status in server');
|
|
106
50
|
return;
|
|
107
51
|
}
|
|
108
|
-
this.checkTestStatusWatchdog.on('alarm',
|
|
109
|
-
|
|
52
|
+
this.checkTestStatusWatchdog.on('alarm', () => {
|
|
53
|
+
this.checkTestStatusAtServer();
|
|
110
54
|
});
|
|
111
55
|
//Invoke it directly after the CTOR ends when needed.
|
|
112
56
|
if (this.cfg.shouldCheckForActiveExecutionOnStartUp.value) {
|
|
113
57
|
this.checkTestStatusAtServer(false);
|
|
114
58
|
}
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
var _this = this;
|
|
118
|
-
if (async === void 0) { async = true; }
|
|
59
|
+
}
|
|
60
|
+
checkTestStatusAtServer(async = true) {
|
|
119
61
|
if (!this.currentTestIdentifier) {
|
|
120
62
|
this.logger.info('\'currentTestIdentifier\' is null. That means that footprints will not be sent.');
|
|
121
63
|
}
|
|
122
64
|
else {
|
|
123
|
-
this.getActiveExecution(async).then(
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
}).catch(
|
|
128
|
-
|
|
65
|
+
this.getActiveExecution(async).then((response) => {
|
|
66
|
+
this.fireExecutionEvents(response.execution);
|
|
67
|
+
this.notifyCockpit(response.execution);
|
|
68
|
+
this._currentExecution = response.execution;
|
|
69
|
+
}).catch(err => {
|
|
70
|
+
this.logger.warn(`Error while checking test execution status ${err}`);
|
|
129
71
|
});
|
|
130
72
|
}
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
this.notifyCockpit(executionResponse.execution);
|
|
144
|
-
this._currentExecution = executionResponse.execution;
|
|
145
|
-
return [3 /*break*/, 3];
|
|
146
|
-
case 2:
|
|
147
|
-
err_1 = _a.sent();
|
|
148
|
-
this.logger.warn("Error while checking test execution status ".concat(err_1));
|
|
149
|
-
return [3 /*break*/, 3];
|
|
150
|
-
case 3: return [2 /*return*/];
|
|
151
|
-
}
|
|
152
|
-
});
|
|
73
|
+
}
|
|
74
|
+
loadExecutionSync() {
|
|
75
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
76
|
+
try {
|
|
77
|
+
const executionResponse = yield this.getActiveExecution();
|
|
78
|
+
this.fireExecutionEvents(executionResponse.execution);
|
|
79
|
+
this.notifyCockpit(executionResponse.execution);
|
|
80
|
+
this._currentExecution = executionResponse.execution;
|
|
81
|
+
}
|
|
82
|
+
catch (err) {
|
|
83
|
+
this.logger.warn(`Error while checking test execution status ${err}`);
|
|
84
|
+
}
|
|
153
85
|
});
|
|
154
|
-
}
|
|
155
|
-
|
|
156
|
-
if (async === void 0) { async = true; }
|
|
86
|
+
}
|
|
87
|
+
getActiveExecution(async = true) {
|
|
157
88
|
return this.backendProxy.testExecutionV4(this.cfg.labId.value, async, this.getExecutionIdForQuery());
|
|
158
|
-
}
|
|
159
|
-
|
|
89
|
+
}
|
|
90
|
+
getExecutionIdForQuery() {
|
|
160
91
|
if (this.isAnonymousColor(this.currentTestIdentifier) || !this.currentExecution) {
|
|
161
92
|
return null;
|
|
162
93
|
}
|
|
163
94
|
return this.currentExecution.executionId;
|
|
164
|
-
}
|
|
165
|
-
|
|
95
|
+
}
|
|
96
|
+
hasMappingAtServer() {
|
|
166
97
|
return this._currentExecution != null;
|
|
167
|
-
}
|
|
168
|
-
|
|
98
|
+
}
|
|
99
|
+
getCollectHitsState() {
|
|
169
100
|
var _a;
|
|
170
|
-
|
|
101
|
+
const NO_EXECUTION_HITS_DATA = {
|
|
171
102
|
shouldCollectHits: false,
|
|
172
103
|
reason: StateTracker.NO_ACTIVE_EXECUTION,
|
|
173
104
|
message: 'State tracker has no active execution, agent will not collect hits.',
|
|
174
105
|
};
|
|
175
|
-
|
|
106
|
+
const PENDING_EXECUTION_DELETE_DATA = {
|
|
176
107
|
shouldCollectHits: false,
|
|
177
108
|
reason: StateTracker.EXECUTION_STATUS_PENDING_DELETE,
|
|
178
109
|
message: 'State tracker active execution is currently pending for delete, agent will not collect hits.',
|
|
@@ -184,38 +115,30 @@ var StateTracker = /** @class */ (function (_super) {
|
|
|
184
115
|
return PENDING_EXECUTION_DELETE_DATA;
|
|
185
116
|
}
|
|
186
117
|
return { shouldCollectHits: true };
|
|
187
|
-
}
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
Object.defineProperty(StateTracker.prototype, "openExecutionFoundOnce", {
|
|
199
|
-
get: function () {
|
|
200
|
-
return this._openExecutionFoundOnce;
|
|
201
|
-
},
|
|
202
|
-
enumerable: false,
|
|
203
|
-
configurable: true
|
|
204
|
-
});
|
|
205
|
-
StateTracker.prototype.isAnonymousColor = function (testIdentifier) {
|
|
118
|
+
}
|
|
119
|
+
get currentExecution() {
|
|
120
|
+
return this._currentExecution;
|
|
121
|
+
}
|
|
122
|
+
set currentExecution(value) {
|
|
123
|
+
this._currentExecution = value;
|
|
124
|
+
}
|
|
125
|
+
get openExecutionFoundOnce() {
|
|
126
|
+
return this._openExecutionFoundOnce;
|
|
127
|
+
}
|
|
128
|
+
isAnonymousColor(testIdentifier) {
|
|
206
129
|
return INITIAL_COLOR == testIdentifier;
|
|
207
|
-
}
|
|
208
|
-
|
|
130
|
+
}
|
|
131
|
+
switchToAnonFootprints() {
|
|
209
132
|
this.logger.info('Switching to anonymous footprints.');
|
|
210
133
|
this.setTestIdentifier(INITIAL_COLOR, false);
|
|
211
|
-
}
|
|
212
|
-
|
|
134
|
+
}
|
|
135
|
+
getCurrentTestIdentifier() {
|
|
213
136
|
return this.currentTestIdentifier;
|
|
214
|
-
}
|
|
215
|
-
|
|
137
|
+
}
|
|
138
|
+
setTestIdentifier(newTestIdentifier, silent) {
|
|
216
139
|
this.logger.info('setting test identifier: ' + newTestIdentifier);
|
|
217
140
|
if ((this.currentTestIdentifier == null) && (newTestIdentifier != null) || (this.currentTestIdentifier != null && this.currentTestIdentifier != newTestIdentifier && newTestIdentifier != INITIAL_COLOR)) {
|
|
218
|
-
|
|
141
|
+
const previousTestIdentifier = this.currentTestIdentifier;
|
|
219
142
|
this.currentTestIdentifier = newTestIdentifier;
|
|
220
143
|
if (this.isRunning) {
|
|
221
144
|
if (!silent) {
|
|
@@ -230,18 +153,18 @@ var StateTracker = /** @class */ (function (_super) {
|
|
|
230
153
|
else {
|
|
231
154
|
this.logger.info('Not setting the color. newTestIdentifier is \'' + newTestIdentifier + '\' ' + 'and currentTestIdentifier is \'' + this.currentTestIdentifier + '\'');
|
|
232
155
|
}
|
|
233
|
-
}
|
|
156
|
+
}
|
|
234
157
|
// Added for backward compatibility with browser agent
|
|
235
|
-
|
|
158
|
+
setCurrentTestIdentifier(newTestIdentifier) {
|
|
236
159
|
this.setTestIdentifier(newTestIdentifier);
|
|
237
|
-
}
|
|
238
|
-
|
|
160
|
+
}
|
|
161
|
+
start() {
|
|
239
162
|
if (!this.isRunning) {
|
|
240
163
|
this.checkTestStatusWatchdog.start();
|
|
241
164
|
this.isRunning = true;
|
|
242
165
|
}
|
|
243
|
-
}
|
|
244
|
-
|
|
166
|
+
}
|
|
167
|
+
stop() {
|
|
245
168
|
try {
|
|
246
169
|
if (!this.isRunning) {
|
|
247
170
|
return;
|
|
@@ -250,63 +173,53 @@ var StateTracker = /** @class */ (function (_super) {
|
|
|
250
173
|
this.isRunning = false;
|
|
251
174
|
}
|
|
252
175
|
catch (err) {
|
|
253
|
-
this.logger.error(
|
|
176
|
+
this.logger.error(`Error while stopping StateTracker. '${err}'`);
|
|
254
177
|
return;
|
|
255
178
|
}
|
|
256
|
-
}
|
|
257
|
-
|
|
179
|
+
}
|
|
180
|
+
getTestStage() {
|
|
258
181
|
var _a;
|
|
259
182
|
return (_a = this.currentExecution) === null || _a === void 0 ? void 0 : _a.testStage;
|
|
260
|
-
}
|
|
261
|
-
|
|
183
|
+
}
|
|
184
|
+
static splitTestIdToExecutionAndTestName(testId) {
|
|
262
185
|
testId = testId || '';
|
|
263
|
-
|
|
264
|
-
|
|
186
|
+
const executionId = testId.split('/')[0];
|
|
187
|
+
let testName = (testId.indexOf('/') == -1) ? '' : testId.substring(executionId.length + 1);
|
|
265
188
|
if (!executionId) {
|
|
266
189
|
testName = '';
|
|
267
190
|
}
|
|
268
191
|
return { executionId: executionId, testName: testName };
|
|
269
|
-
}
|
|
270
|
-
|
|
192
|
+
}
|
|
193
|
+
static combineExecutionIdAndTestName(executionId, testName) {
|
|
271
194
|
testName = testName || '';
|
|
272
195
|
if (!executionId) {
|
|
273
196
|
return '';
|
|
274
197
|
}
|
|
275
198
|
return executionId + '/' + testName;
|
|
276
|
-
}
|
|
277
|
-
|
|
278
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
executionId: executionId,
|
|
291
|
-
};
|
|
292
|
-
if (this.cfg.testGroupId.value) {
|
|
293
|
-
request.testGroupId = this.cfg.testGroupId.value;
|
|
294
|
-
}
|
|
295
|
-
return [4 /*yield*/, this.backendProxy.startColoredExecution(request)];
|
|
296
|
-
case 1:
|
|
297
|
-
_a.sent();
|
|
298
|
-
this.currentExecution = __assign(__assign({}, request), { buildSessionId: this.cfg.buildSessionId.value, status: StateTracker.EXECUTION_STATUS_CREATED });
|
|
299
|
-
return [3 /*break*/, 3];
|
|
300
|
-
case 2:
|
|
301
|
-
e_1 = _a.sent();
|
|
302
|
-
this.logger.error("Failed to create execution, error '".concat(e_1, "'. Footprints will not be sent"));
|
|
303
|
-
return [3 /*break*/, 3];
|
|
304
|
-
case 3: return [2 /*return*/];
|
|
199
|
+
}
|
|
200
|
+
startColoredExecution(executionId) {
|
|
201
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
202
|
+
try {
|
|
203
|
+
const request = {
|
|
204
|
+
appName: this.cfg.appName.value,
|
|
205
|
+
branchName: this.cfg.branch.value,
|
|
206
|
+
buildName: this.cfg.build.value,
|
|
207
|
+
labId: this.cfg.labId.value,
|
|
208
|
+
testStage: this.cfg.testStage.value,
|
|
209
|
+
executionId: executionId,
|
|
210
|
+
};
|
|
211
|
+
if (this.cfg.testGroupId.value) {
|
|
212
|
+
request.testGroupId = this.cfg.testGroupId.value;
|
|
305
213
|
}
|
|
306
|
-
|
|
214
|
+
yield this.backendProxy.startColoredExecution(request);
|
|
215
|
+
this.currentExecution = Object.assign(Object.assign({}, request), { buildSessionId: this.cfg.buildSessionId.value, status: StateTracker.EXECUTION_STATUS_CREATED });
|
|
216
|
+
}
|
|
217
|
+
catch (e) {
|
|
218
|
+
this.logger.error(`Failed to create execution, error '${e}'. Footprints will not be sent`);
|
|
219
|
+
}
|
|
307
220
|
});
|
|
308
|
-
}
|
|
309
|
-
|
|
221
|
+
}
|
|
222
|
+
fireExecutionEvents(executionData) {
|
|
310
223
|
// No active execution on the server
|
|
311
224
|
if (!executionData) {
|
|
312
225
|
return;
|
|
@@ -335,8 +248,8 @@ var StateTracker = /** @class */ (function (_super) {
|
|
|
335
248
|
this.emit(StateTracker.TEST_STAGE_CHANGED, this.currentExecution, executionData.testStage);
|
|
336
249
|
return;
|
|
337
250
|
}
|
|
338
|
-
}
|
|
339
|
-
|
|
251
|
+
}
|
|
252
|
+
notifyCockpit(execution) {
|
|
340
253
|
if (!execution) {
|
|
341
254
|
cockpit_notifier_1.CockpitNotifier.sendEventOnce(agent_events_contracts_1.AgentEventCode.FIRST_TIME_NO_EXECUTION);
|
|
342
255
|
}
|
|
@@ -344,15 +257,14 @@ var StateTracker = /** @class */ (function (_super) {
|
|
|
344
257
|
cockpit_notifier_1.CockpitNotifier.sendEventOnce(agent_events_contracts_1.AgentEventCode.FIRST_TIME_HAS_EXECUTION);
|
|
345
258
|
this._openExecutionFoundOnce = true;
|
|
346
259
|
}
|
|
347
|
-
}
|
|
348
|
-
|
|
349
|
-
StateTracker.EXECUTION_BSID_CHANGED = 'executionBsidChanged';
|
|
350
|
-
StateTracker.EXECUTION_ID_CHANGED = 'executionIdChanged';
|
|
351
|
-
StateTracker.TEST_STAGE_CHANGED = 'testStageChanged';
|
|
352
|
-
StateTracker.EXECUTION_STATUS_CREATED = 'created';
|
|
353
|
-
StateTracker.EXECUTION_STATUS_PENDING_DELETE = 'pendingDelete';
|
|
354
|
-
StateTracker.NO_ACTIVE_EXECUTION = 'noActiveExecution';
|
|
355
|
-
return StateTracker;
|
|
356
|
-
}(events.EventEmitter));
|
|
260
|
+
}
|
|
261
|
+
}
|
|
357
262
|
exports.StateTracker = StateTracker;
|
|
263
|
+
StateTracker.EXECUTION_ENDS = 'executionEnds';
|
|
264
|
+
StateTracker.EXECUTION_BSID_CHANGED = 'executionBsidChanged';
|
|
265
|
+
StateTracker.EXECUTION_ID_CHANGED = 'executionIdChanged';
|
|
266
|
+
StateTracker.TEST_STAGE_CHANGED = 'testStageChanged';
|
|
267
|
+
StateTracker.EXECUTION_STATUS_CREATED = 'created';
|
|
268
|
+
StateTracker.EXECUTION_STATUS_PENDING_DELETE = 'pendingDelete';
|
|
269
|
+
StateTracker.NO_ACTIVE_EXECUTION = 'noActiveExecution';
|
|
358
270
|
//# sourceMappingURL=state-tracker.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"state-tracker.js","sourceRoot":"","sources":["../../common/state-tracker.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"state-tracker.js","sourceRoot":"","sources":["../../common/state-tracker.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,iCAAkC;AAMlC,yDAAkD;AAClD,+DAAyD;AACzD,sEAAgE;AAChE,kFAAqE;AAIrE,MAAM,aAAa,GAAG,6CAA6C,CAAC;AACpE,MAAa,YAAa,SAAQ,MAAM,CAAC,YAAY;IAoBjD,YAAY,GAAgB,EAAE,aAA4B,EAAE,uBAAiC,EAAE,YAA0B,EAAE,MAAc;QACrI,KAAK,EAAE,CAAC;QARJ,0BAAqB,GAAW,IAAI,CAAC;QAErC,cAAS,GAAG,KAAK,CAAC;QAClB,4BAAuB,GAAG,KAAK,CAAC;QAOpC,kCAAe,CAAC,oBAAoB,CAAC,GAAG,EAAE,aAAa,CAAC,CAAC;QACzD,kCAAe,CAAC,oBAAoB,CAAC,aAAa,EAAE,eAAe,CAAC,CAAC;QACrE,kCAAe,CAAC,oBAAoB,CAAC,uBAAuB,EAAE,UAAU,CAAC,CAAC;QAC1E,kCAAe,CAAC,oBAAoB,CAAC,YAAY,EAAE,cAAc,CAA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GAAG,eAAe,CAAA;AACjD,gCAAmB,GAAG,mBAAmB,CAAA"}
|
|
@@ -5,17 +5,17 @@ exports.getSystemDateValueOf = exports.getSystemDate = void 0;
|
|
|
5
5
|
/**
|
|
6
6
|
* This captures the original Date, in case it's mocked (happens with sinon, MockDate)
|
|
7
7
|
*/
|
|
8
|
-
|
|
8
|
+
const SystemDate = Date;
|
|
9
9
|
/**
|
|
10
10
|
* This captures the original Date's valueOf(), in case it's mocked manually
|
|
11
11
|
*/
|
|
12
|
-
|
|
12
|
+
const SystemDateValueOf = Date.prototype.valueOf;
|
|
13
13
|
function getSystemDate() {
|
|
14
14
|
return new SystemDate();
|
|
15
15
|
}
|
|
16
16
|
exports.getSystemDate = getSystemDate;
|
|
17
17
|
function getSystemDateValueOf() {
|
|
18
|
-
|
|
18
|
+
const date = getSystemDate();
|
|
19
19
|
return SystemDateValueOf.call(date);
|
|
20
20
|
}
|
|
21
21
|
exports.getSystemDateValueOf = getSystemDateValueOf;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"system-date.js","sourceRoot":"","sources":["../../common/system-date.ts"],"names":[],"mappings":";;;AAAA,4DAA4D;AAC5D;;GAEG;AACH,
|
|
1
|
+
{"version":3,"file":"system-date.js","sourceRoot":"","sources":["../../common/system-date.ts"],"names":[],"mappings":";;;AAAA,4DAA4D;AAC5D;;GAEG;AACH,MAAM,UAAU,GAAG,IAAI,CAAC;AAExB;;GAEG;AACH,MAAM,iBAAiB,GAAG,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC;AAEjD,SAAgB,aAAa;IACzB,OAAO,IAAI,UAAU,EAAE,CAAC;AAC5B,CAAC;AAFD,sCAEC;AAED,SAAgB,oBAAoB;IAChC,MAAM,IAAI,GAAG,aAAa,EAAE,CAAC;IAC7B,OAAO,iBAAiB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AACxC,CAAC;AAHD,oDAGC"}
|
|
@@ -1,25 +1,24 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.AbstractDataBuilder = void 0;
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
const fs_1 = require("fs");
|
|
5
|
+
const logger_1 = require("../logger");
|
|
6
6
|
/**
|
|
7
7
|
* Base class for reading data (token or buildSessionId) from file.
|
|
8
8
|
*/
|
|
9
|
-
|
|
10
|
-
|
|
9
|
+
class AbstractDataBuilder {
|
|
10
|
+
constructor() {
|
|
11
11
|
this.logger = logger_1.LoggerFactory.getCreateApplicationLogger();
|
|
12
12
|
}
|
|
13
|
-
|
|
13
|
+
getFromFile(cmd, key) {
|
|
14
14
|
try {
|
|
15
15
|
return (0, fs_1.readFileSync)(cmd[key], 'utf-8').trim();
|
|
16
16
|
}
|
|
17
17
|
catch (e) {
|
|
18
|
-
this.logger.error(
|
|
18
|
+
this.logger.error(`Failed to read ${key}. Error ${e}`);
|
|
19
19
|
}
|
|
20
20
|
return null;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
}());
|
|
21
|
+
}
|
|
22
|
+
}
|
|
24
23
|
exports.AbstractDataBuilder = AbstractDataBuilder;
|
|
25
24
|
//# sourceMappingURL=abstract-data-builder.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"abstract-data-builder.js","sourceRoot":"","sources":["../../../common/utils/abstract-data-builder.ts"],"names":[],"mappings":";;;AAAA,
|
|
1
|
+
{"version":3,"file":"abstract-data-builder.js","sourceRoot":"","sources":["../../../common/utils/abstract-data-builder.ts"],"names":[],"mappings":";;;AAAA,2BAAgC;AAGhC,sCAAwC;AAExC;;GAEG;AACH,MAAsB,mBAAmB;IAAzC;QACc,WAAM,GAAW,sBAAa,CAAC,0BAA0B,EAAE,CAAC;IAY1E,CAAC;IARa,WAAW,CAAC,GAAQ,EAAE,GAAW;QACvC,IAAI;YACA,OAAO,IAAA,iBAAY,EAAC,GAAG,CAAC,GAAG,CAAC,EAAE,OAAO,CAAC,CAAC,IAAI,EAAE,CAAC;SACjD;QAAC,OAAO,CAAC,EAAE;YACR,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,kBAAkB,GAAG,WAAW,CAAC,EAAE,CAAC,CAAC;SAC1D;QACD,OAAO,IAAI,CAAC;IAChB,CAAC;CACJ;AAbD,kDAaC"}
|