slnodejs 6.1.410 → 6.1.429
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 +33 -28
- package/browser-agent/dist/browser-agent-all.min.js +2 -2
- 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 +36 -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 +57 -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 +106 -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 +74 -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/contracts.d.ts +2 -0
- package/tsOutputs/cli-parse/contracts.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 +11 -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 +68 -132
- 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.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.js +204 -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 +6 -9
- 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.js +7 -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,15 +1,4 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __assign = (this && this.__assign) || function () {
|
|
3
|
-
__assign = Object.assign || function(t) {
|
|
4
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
-
s = arguments[i];
|
|
6
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
-
t[p] = s[p];
|
|
8
|
-
}
|
|
9
|
-
return t;
|
|
10
|
-
};
|
|
11
|
-
return __assign.apply(this, arguments);
|
|
12
|
-
};
|
|
13
2
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
14
3
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
15
4
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
@@ -19,44 +8,17 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
19
8
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
20
9
|
});
|
|
21
10
|
};
|
|
22
|
-
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
23
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
24
|
-
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
25
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
26
|
-
function step(op) {
|
|
27
|
-
if (f) throw new TypeError("Generator is already executing.");
|
|
28
|
-
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
29
|
-
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;
|
|
30
|
-
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
31
|
-
switch (op[0]) {
|
|
32
|
-
case 0: case 1: t = op; break;
|
|
33
|
-
case 4: _.label++; return { value: op[1], done: false };
|
|
34
|
-
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
35
|
-
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
36
|
-
default:
|
|
37
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
38
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
39
|
-
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
40
|
-
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
41
|
-
if (t[2]) _.ops.pop();
|
|
42
|
-
_.trys.pop(); continue;
|
|
43
|
-
}
|
|
44
|
-
op = body.call(thisArg, _);
|
|
45
|
-
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
46
|
-
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
47
|
-
}
|
|
48
|
-
};
|
|
49
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
50
12
|
exports.FootprintsProcess = void 0;
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
13
|
+
const footprints_buffer_1 = require("./footprints-buffer");
|
|
14
|
+
const collection_interval_1 = require("../footprints-process/collection-interval");
|
|
15
|
+
const state_tracker_1 = require("../state-tracker");
|
|
16
|
+
const cockpit_notifier_1 = require("../agent-events/cockpit-notifier");
|
|
17
|
+
const agent_events_contracts_1 = require("../agent-events/agent-events-contracts");
|
|
18
|
+
const sl_env_vars_1 = require("../constants/sl-env-vars");
|
|
19
|
+
const agent_events_guard_1 = require("../agent-events/agent-events-guard");
|
|
20
|
+
class FootprintsProcess {
|
|
21
|
+
constructor(cfg, sendToServerWatchdog, keepaliveWatchdog, logger, hitsCollector, hitsConverter, footprintsBuffer, backendProxy, stateTracker) {
|
|
60
22
|
this.isRunning = false;
|
|
61
23
|
this._ongoingRequestsCounter = 0;
|
|
62
24
|
this.footprintsEnqueueOnce = false;
|
|
@@ -72,120 +34,79 @@ var FootprintsProcess = /** @class */ (function () {
|
|
|
72
34
|
this.logger = logger;
|
|
73
35
|
this.delegateEvents();
|
|
74
36
|
}
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
this.logger.info('No files were hits, not collecting footprints');
|
|
94
|
-
}
|
|
95
|
-
if (this.isRunning && this.cfg.sendFootprints.value && this.cfg.enabled.value) {
|
|
96
|
-
this.ensureKeepaliveThreadRunning();
|
|
97
|
-
this.sendToServerWatchdog.startIfNotRunning();
|
|
98
|
-
}
|
|
99
|
-
this.footprintsEnqueueOnce = true;
|
|
100
|
-
return [2 /*return*/];
|
|
101
|
-
}
|
|
102
|
-
});
|
|
37
|
+
enqueueCurrentFootprints(execution, testName, isFinalFootprints = false) {
|
|
38
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
39
|
+
this.currentExecutionBsid = execution.buildSessionId;
|
|
40
|
+
this.collectionInterval.next();
|
|
41
|
+
const hitFilesData = yield this.hitsCollector.getHitElements();
|
|
42
|
+
if (hitFilesData.length) {
|
|
43
|
+
this.logger.info(`Collecting hits for '${hitFilesData.length}' files`);
|
|
44
|
+
const convertedHits = this.hitsConverter.convertHits(hitFilesData);
|
|
45
|
+
this.footprintsBuffer.addHit(convertedHits, this.collectionInterval.toJson(), execution.executionId, testName, this.isInitFootprints(), isFinalFootprints);
|
|
46
|
+
}
|
|
47
|
+
else {
|
|
48
|
+
this.logger.info('No files were hits, not collecting footprints');
|
|
49
|
+
}
|
|
50
|
+
if (this.isRunning && this.cfg.sendFootprints.value && this.cfg.enabled.value) {
|
|
51
|
+
this.ensureKeepaliveThreadRunning();
|
|
52
|
+
this.sendToServerWatchdog.startIfNotRunning();
|
|
53
|
+
}
|
|
54
|
+
this.footprintsEnqueueOnce = true;
|
|
103
55
|
});
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
return [4 /*yield*/, this.stopIfNeededAfterConfigChanged(updatedCfg)];
|
|
112
|
-
case 1:
|
|
113
|
-
_a.sent();
|
|
114
|
-
this.sendToServerWatchdog.setInterval(this.cfg.footprintsSendIntervalSecs.value);
|
|
115
|
-
this.footprintsBuffer.agentConfig = updatedCfg;
|
|
116
|
-
return [2 /*return*/];
|
|
117
|
-
}
|
|
118
|
-
});
|
|
56
|
+
}
|
|
57
|
+
updateConfig(updatedCfg) {
|
|
58
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
59
|
+
this.cfg = updatedCfg;
|
|
60
|
+
yield this.stopIfNeededAfterConfigChanged(updatedCfg);
|
|
61
|
+
this.sendToServerWatchdog.setInterval(this.cfg.footprintsSendIntervalSecs.value);
|
|
62
|
+
this.footprintsBuffer.agentConfig = updatedCfg;
|
|
119
63
|
});
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
cockpit_notifier_1.CockpitNotifier.sendEvent(agent_events_contracts_1.AgentEventCode.AGENT_MUTED);
|
|
129
|
-
this.footprintsBuffer.resetState();
|
|
130
|
-
_a.label = 1;
|
|
131
|
-
case 1:
|
|
132
|
-
_a.trys.push([1, 3, , 4]);
|
|
133
|
-
return [4 /*yield*/, this.stop()];
|
|
134
|
-
case 2:
|
|
135
|
-
_a.sent();
|
|
136
|
-
return [3 /*break*/, 4];
|
|
137
|
-
case 3:
|
|
138
|
-
e_1 = _a.sent();
|
|
139
|
-
this.logger.error("Error stopping footprints process ".concat(e_1.message));
|
|
140
|
-
this.logger.debug(e_1.stackTrace);
|
|
141
|
-
return [3 /*break*/, 4];
|
|
142
|
-
case 4: return [2 /*return*/];
|
|
64
|
+
}
|
|
65
|
+
stopIfNeededAfterConfigChanged(updatedCfg) {
|
|
66
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
67
|
+
if (updatedCfg.sendFootprints.value === false || updatedCfg.enabled.value === false) {
|
|
68
|
+
cockpit_notifier_1.CockpitNotifier.sendEvent(agent_events_contracts_1.AgentEventCode.AGENT_MUTED);
|
|
69
|
+
this.footprintsBuffer.resetState();
|
|
70
|
+
try {
|
|
71
|
+
yield this.stop();
|
|
143
72
|
}
|
|
144
|
-
|
|
73
|
+
catch (e) {
|
|
74
|
+
this.logger.error(`Error stopping footprints process ${e.message}`);
|
|
75
|
+
this.logger.debug(e.stackTrace);
|
|
76
|
+
}
|
|
77
|
+
}
|
|
145
78
|
});
|
|
146
|
-
}
|
|
147
|
-
|
|
79
|
+
}
|
|
80
|
+
ensureKeepaliveThreadRunning() {
|
|
148
81
|
this.keepaliveWatchdog.start();
|
|
149
|
-
}
|
|
150
|
-
|
|
151
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
this.ongoingRequestsCounter++;
|
|
163
|
-
_a.label = 1;
|
|
164
|
-
case 1:
|
|
165
|
-
_a.trys.push([1, 3, 4, 5]);
|
|
166
|
-
return [4 /*yield*/, this.backendProxy.submitFootprintsV6(packet, execution.buildSessionId, execution.testStage, this.cfg.buildSessionId.value)];
|
|
167
|
-
case 2:
|
|
168
|
-
_a.sent();
|
|
169
|
-
this.logger.info("Footprints packet submitted successfully. packet contains ".concat(packet.methods.length, " methods, ").concat(packet.branches.length, " branches in ").concat(packet.executions.length, " executions"));
|
|
170
|
-
return [3 /*break*/, 5];
|
|
171
|
-
case 3:
|
|
172
|
-
e_2 = _a.sent();
|
|
173
|
-
this.logger.error("Error while submitting footprints '".concat(e_2, "'"));
|
|
174
|
-
agent_events_guard_1.AgentEventsGuard.notifyIfNeeded(agent_events_contracts_1.AgentEventCode.FOOTPRINTS_SUBMISSION_ERROR, e_2);
|
|
175
|
-
return [3 /*break*/, 5];
|
|
176
|
-
case 4:
|
|
177
|
-
this.ongoingRequestsCounter--;
|
|
178
|
-
return [7 /*endfinally*/];
|
|
179
|
-
case 5: return [3 /*break*/, 7];
|
|
180
|
-
case 6:
|
|
181
|
-
this.logger.info('No hits collected nothing to submit');
|
|
182
|
-
_a.label = 7;
|
|
183
|
-
case 7: return [2 /*return*/];
|
|
82
|
+
}
|
|
83
|
+
submitQueuedFootprints(execution) {
|
|
84
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
85
|
+
this.hitsCollector.sendErrors();
|
|
86
|
+
if (!this.shouldSubmitFootprints()) {
|
|
87
|
+
return;
|
|
88
|
+
}
|
|
89
|
+
const packet = this.footprintsBuffer.createPacket();
|
|
90
|
+
if (packet) {
|
|
91
|
+
this.ongoingRequestsCounter++;
|
|
92
|
+
try {
|
|
93
|
+
yield this.backendProxy.submitFootprintsV6(packet, execution.buildSessionId, execution.testStage, this.cfg.buildSessionId.value);
|
|
94
|
+
this.logger.info(`Footprints packet submitted successfully. packet contains ${packet.methods.length} methods, ${packet.branches.length} branches in ${packet.executions.length} executions`);
|
|
184
95
|
}
|
|
185
|
-
|
|
96
|
+
catch (e) {
|
|
97
|
+
this.logger.error(`Error while submitting footprints '${e}'`);
|
|
98
|
+
agent_events_guard_1.AgentEventsGuard.notifyIfNeeded(agent_events_contracts_1.AgentEventCode.FOOTPRINTS_SUBMISSION_ERROR, e);
|
|
99
|
+
}
|
|
100
|
+
finally {
|
|
101
|
+
this.ongoingRequestsCounter--;
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
else {
|
|
105
|
+
this.logger.info('No hits collected nothing to submit');
|
|
106
|
+
}
|
|
186
107
|
});
|
|
187
|
-
}
|
|
188
|
-
|
|
108
|
+
}
|
|
109
|
+
shouldSubmitFootprints() {
|
|
189
110
|
if (!this.isRunning) {
|
|
190
111
|
this.logger.info('Agent is not running, not sending footprints');
|
|
191
112
|
return false;
|
|
@@ -195,8 +116,8 @@ var FootprintsProcess = /** @class */ (function () {
|
|
|
195
116
|
return false;
|
|
196
117
|
}
|
|
197
118
|
return true;
|
|
198
|
-
}
|
|
199
|
-
|
|
119
|
+
}
|
|
120
|
+
start() {
|
|
200
121
|
if (this.isRunning)
|
|
201
122
|
return;
|
|
202
123
|
if (this.cfg.enabled.value == false)
|
|
@@ -206,225 +127,161 @@ var FootprintsProcess = /** @class */ (function () {
|
|
|
206
127
|
if (this.footprintsBuffer.hasHitsInBuffer()) {
|
|
207
128
|
this.ensureKeepaliveThreadRunning();
|
|
208
129
|
}
|
|
209
|
-
}
|
|
210
|
-
|
|
211
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
return [4 /*yield*/, this.backendProxy.submitFootprintsV6(packet, this.currentExecutionBsid, this.stateTracker.getTestStage(), this.cfg.buildSessionId.value)];
|
|
236
|
-
case 3:
|
|
237
|
-
_a.sent();
|
|
238
|
-
this.logger.info('Final footprints submitted successfully');
|
|
239
|
-
return [3 /*break*/, 5];
|
|
240
|
-
case 4:
|
|
241
|
-
e_3 = _a.sent();
|
|
242
|
-
this.logger.error("Failed to submit final footprints, error: ".concat(e_3.message));
|
|
243
|
-
this.logger.debug(e_3);
|
|
244
|
-
return [2 /*return*/];
|
|
245
|
-
case 5: return [2 /*return*/];
|
|
246
|
-
}
|
|
247
|
-
});
|
|
130
|
+
}
|
|
131
|
+
stop() {
|
|
132
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
133
|
+
this.sendToServerWatchdog.stop();
|
|
134
|
+
this.hitsCollector.sendErrors();
|
|
135
|
+
if (!this.shouldSubmitFootprints()) {
|
|
136
|
+
this.isRunning = false;
|
|
137
|
+
return;
|
|
138
|
+
}
|
|
139
|
+
yield this.flushCurrentFootprints(true);
|
|
140
|
+
const packet = this.footprintsBuffer.createPacket();
|
|
141
|
+
this.isRunning = false;
|
|
142
|
+
if (!packet) {
|
|
143
|
+
this.logger.info('No hits collected, nothing to submit');
|
|
144
|
+
return;
|
|
145
|
+
}
|
|
146
|
+
this.logger.info('Start submitting footprints, triggered by stop event.');
|
|
147
|
+
try {
|
|
148
|
+
yield this.backendProxy.submitFootprintsV6(packet, this.currentExecutionBsid, this.stateTracker.getTestStage(), this.cfg.buildSessionId.value);
|
|
149
|
+
this.logger.info('Final footprints submitted successfully');
|
|
150
|
+
}
|
|
151
|
+
catch (e) {
|
|
152
|
+
this.logger.error(`Failed to submit final footprints, error: ${e.message}`);
|
|
153
|
+
this.logger.debug(e);
|
|
154
|
+
return;
|
|
155
|
+
}
|
|
248
156
|
});
|
|
249
|
-
}
|
|
250
|
-
|
|
157
|
+
}
|
|
158
|
+
handleTestIdChanged(newTestIdentifier, previousTestIdentifier) {
|
|
251
159
|
if (previousTestIdentifier == null) {
|
|
252
160
|
this.logger.info('Test identifier changed, previous identifier wasn\'t set, meaning that we didn\'t have active test. Skip enqueuing footprints process.');
|
|
253
161
|
}
|
|
254
162
|
else {
|
|
255
|
-
|
|
163
|
+
const { shouldCollectHits, message } = this.stateTracker.getCollectHitsState();
|
|
256
164
|
if (!shouldCollectHits) {
|
|
257
|
-
this.logger.info(
|
|
165
|
+
this.logger.info(`Test identifier changed. ${message}`);
|
|
258
166
|
return;
|
|
259
167
|
}
|
|
260
168
|
this.logger.debug('Test identifier changed, start enqueuing footprints process.');
|
|
261
|
-
|
|
169
|
+
const prevTestIdentifierParts = state_tracker_1.StateTracker.splitTestIdToExecutionAndTestName(previousTestIdentifier);
|
|
262
170
|
this.enqueueCurrentFootprints(this.stateTracker.currentExecution, prevTestIdentifierParts.testName);
|
|
263
171
|
}
|
|
264
|
-
}
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
_this.submitQueuedFootprints(_this.stateTracker.currentExecution);
|
|
172
|
+
}
|
|
173
|
+
delegateEvents() {
|
|
174
|
+
this.sendToServerWatchdog.on(FootprintsProcess.ALARM_FIRED, () => {
|
|
175
|
+
this.logger.debug('Start submitting footprints, triggered by send to server watchdog.');
|
|
176
|
+
this.submitQueuedFootprints(this.stateTracker.currentExecution);
|
|
270
177
|
});
|
|
271
|
-
this.keepaliveWatchdog.on(FootprintsProcess.ALARM_FIRED,
|
|
272
|
-
if (!
|
|
273
|
-
|
|
178
|
+
this.keepaliveWatchdog.on(FootprintsProcess.ALARM_FIRED, () => {
|
|
179
|
+
if (!this.hasOngoingRequests() && !this.footprintsBuffer.hasHitsInBuffer()) {
|
|
180
|
+
this.keepaliveWatchdog.stop();
|
|
274
181
|
}
|
|
275
182
|
});
|
|
276
|
-
this.footprintsBuffer.on(footprints_buffer_1.FootprintsBuffer.BUFFER_FULL,
|
|
277
|
-
|
|
183
|
+
this.footprintsBuffer.on(footprints_buffer_1.FootprintsBuffer.BUFFER_FULL, () => {
|
|
184
|
+
this.submitQueuedFootprints(this.stateTracker.currentExecution);
|
|
278
185
|
});
|
|
279
|
-
this.stateTracker.on(state_tracker_1.StateTracker.EXECUTION_BSID_CHANGED,
|
|
280
|
-
|
|
281
|
-
|
|
186
|
+
this.stateTracker.on(state_tracker_1.StateTracker.EXECUTION_BSID_CHANGED, (prevExecution, newBuildSession) => {
|
|
187
|
+
this.logger.warn(`Execution points to different build session '${newBuildSession}'. Collecting and submitting previous footprints`);
|
|
188
|
+
this.enqueueAndSubmit(prevExecution);
|
|
282
189
|
});
|
|
283
|
-
this.stateTracker.on(state_tracker_1.StateTracker.EXECUTION_ID_CHANGED,
|
|
284
|
-
|
|
285
|
-
|
|
190
|
+
this.stateTracker.on(state_tracker_1.StateTracker.EXECUTION_ID_CHANGED, (prevExecution, newExecutionId) => {
|
|
191
|
+
this.logger.warn(`Execution id changed to'${newExecutionId}'. Collecting previous footprints`);
|
|
192
|
+
this.enqueueCurrentFootprints(prevExecution, null);
|
|
286
193
|
});
|
|
287
|
-
this.stateTracker.on(state_tracker_1.StateTracker.TEST_STAGE_CHANGED,
|
|
288
|
-
|
|
289
|
-
|
|
194
|
+
this.stateTracker.on(state_tracker_1.StateTracker.TEST_STAGE_CHANGED, (prevExecution, newTestStage) => {
|
|
195
|
+
this.logger.warn(`Execution points to different test stage '${newTestStage}'. Collecting and submitting previous footprints`);
|
|
196
|
+
this.enqueueAndSubmit(prevExecution);
|
|
290
197
|
});
|
|
291
|
-
this.stateTracker.on(state_tracker_1.StateTracker.EXECUTION_STATUS_PENDING_DELETE,
|
|
292
|
-
|
|
198
|
+
this.stateTracker.on(state_tracker_1.StateTracker.EXECUTION_STATUS_PENDING_DELETE, (execution) => {
|
|
199
|
+
this.enqueueAndSubmit(execution);
|
|
293
200
|
});
|
|
294
|
-
}
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
switch (_a.label) {
|
|
300
|
-
case 0: return [4 /*yield*/, this.enqueueCurrentFootprints(executionData, null, isFinalFootprints)];
|
|
301
|
-
case 1:
|
|
302
|
-
_a.sent();
|
|
303
|
-
return [4 /*yield*/, this.submitQueuedFootprints(executionData)];
|
|
304
|
-
case 2:
|
|
305
|
-
_a.sent();
|
|
306
|
-
return [2 /*return*/];
|
|
307
|
-
}
|
|
308
|
-
});
|
|
201
|
+
}
|
|
202
|
+
enqueueAndSubmit(executionData, isFinalFootprints = false) {
|
|
203
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
204
|
+
yield this.enqueueCurrentFootprints(executionData, null, isFinalFootprints);
|
|
205
|
+
yield this.submitQueuedFootprints(executionData);
|
|
309
206
|
});
|
|
310
|
-
}
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
return [3 /*break*/, 4];
|
|
333
|
-
case 2:
|
|
334
|
-
this.logger.debug('Enqueue footprints interval - start enqueuing process. anonymous footprints');
|
|
335
|
-
return [4 /*yield*/, this.enqueueCurrentFootprints(this.stateTracker.currentExecution, null, isFinalFootprints)];
|
|
336
|
-
case 3:
|
|
337
|
-
_b.sent();
|
|
338
|
-
_b.label = 4;
|
|
339
|
-
case 4: return [2 /*return*/];
|
|
340
|
-
}
|
|
341
|
-
});
|
|
207
|
+
}
|
|
208
|
+
flushCurrentFootprints(isFinalFootprints = false) {
|
|
209
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
210
|
+
const currentTestIdentifier = this.stateTracker.getCurrentTestIdentifier();
|
|
211
|
+
const { shouldCollectHits, message, reason } = this.stateTracker.getCollectHitsState();
|
|
212
|
+
// No active execution or execution is pending delete
|
|
213
|
+
if (!shouldCollectHits) {
|
|
214
|
+
this.logger.info(`Enqueue footprints interval - ${message}`);
|
|
215
|
+
this.checkShouldUpdateCoverageSnapshot(reason);
|
|
216
|
+
return;
|
|
217
|
+
}
|
|
218
|
+
// Colored footprints with active execution
|
|
219
|
+
if (currentTestIdentifier) {
|
|
220
|
+
const testIdentifierParts = state_tracker_1.StateTracker.splitTestIdToExecutionAndTestName(currentTestIdentifier);
|
|
221
|
+
this.logger.debug(`Enqueue footprints interval - start enqueuing process. currentTestIdentifier: '${currentTestIdentifier}'`);
|
|
222
|
+
yield this.enqueueCurrentFootprints(this.stateTracker.currentExecution, testIdentifierParts.testName, isFinalFootprints);
|
|
223
|
+
}
|
|
224
|
+
// Anonymous footprints with active execution
|
|
225
|
+
else {
|
|
226
|
+
this.logger.debug('Enqueue footprints interval - start enqueuing process. anonymous footprints');
|
|
227
|
+
yield this.enqueueCurrentFootprints(this.stateTracker.currentExecution, null, isFinalFootprints);
|
|
228
|
+
}
|
|
342
229
|
});
|
|
343
|
-
}
|
|
344
|
-
|
|
230
|
+
}
|
|
231
|
+
checkShouldUpdateCoverageSnapshot(reason) {
|
|
345
232
|
if (this.stateTracker.openExecutionFoundOnce) {
|
|
346
|
-
this.logger.debug(
|
|
233
|
+
this.logger.debug(`Did not collect hits - reason: ${reason} and not in initFootprints mode, updating coverage snapshot`);
|
|
347
234
|
this.hitsCollector.dropHits();
|
|
348
235
|
}
|
|
349
|
-
}
|
|
350
|
-
|
|
236
|
+
}
|
|
237
|
+
isInitFootprints() {
|
|
351
238
|
return this.stateTracker.openExecutionFoundOnce && !this.footprintsEnqueueOnce;
|
|
352
|
-
}
|
|
353
|
-
|
|
239
|
+
}
|
|
240
|
+
hasOngoingRequests() {
|
|
354
241
|
return this.ongoingRequestsCounter > 0;
|
|
355
|
-
}
|
|
242
|
+
}
|
|
356
243
|
// TODO: use generic solution for browser and remote agents
|
|
357
|
-
|
|
358
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
return [4 /*yield*/, this.backendProxy.getBlobsAsJson(this.cfg.buildSessionId.value)];
|
|
367
|
-
case 1:
|
|
368
|
-
mappingsArr = _a.sent();
|
|
369
|
-
flatted = {};
|
|
370
|
-
mappingsArr.forEach(function (mapping) {
|
|
371
|
-
flatted = __assign(__assign({}, flatted), mapping);
|
|
372
|
-
});
|
|
373
|
-
this.hitsConverter.slMapping = flatted;
|
|
374
|
-
return [2 /*return*/];
|
|
375
|
-
}
|
|
244
|
+
loadSlMapping() {
|
|
245
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
246
|
+
if (!sl_env_vars_1.SlEnvVars.useSlMapping()) {
|
|
247
|
+
return;
|
|
248
|
+
}
|
|
249
|
+
const mappingsArr = yield this.backendProxy.getBlobsAsJson(this.cfg.buildSessionId.value);
|
|
250
|
+
let flatted = {};
|
|
251
|
+
mappingsArr.forEach(mapping => {
|
|
252
|
+
flatted = Object.assign(Object.assign({}, flatted), mapping);
|
|
376
253
|
});
|
|
254
|
+
this.hitsConverter.slMapping = flatted;
|
|
377
255
|
});
|
|
378
|
-
}
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
}
|
|
406
|
-
|
|
407
|
-
get: function () {
|
|
408
|
-
return this._sendToServerWatchdog;
|
|
409
|
-
},
|
|
410
|
-
set: function (value) {
|
|
411
|
-
this._sendToServerWatchdog = value;
|
|
412
|
-
},
|
|
413
|
-
enumerable: false,
|
|
414
|
-
configurable: true
|
|
415
|
-
});
|
|
416
|
-
Object.defineProperty(FootprintsProcess.prototype, "keepaliveWatchdog", {
|
|
417
|
-
get: function () {
|
|
418
|
-
return this._keepaliveWatchdog;
|
|
419
|
-
},
|
|
420
|
-
set: function (value) {
|
|
421
|
-
this._keepaliveWatchdog = value;
|
|
422
|
-
},
|
|
423
|
-
enumerable: false,
|
|
424
|
-
configurable: true
|
|
425
|
-
});
|
|
426
|
-
FootprintsProcess.ALARM_FIRED = 'alarm';
|
|
427
|
-
return FootprintsProcess;
|
|
428
|
-
}());
|
|
256
|
+
}
|
|
257
|
+
set ongoingRequestsCounter(value) {
|
|
258
|
+
this._ongoingRequestsCounter = value;
|
|
259
|
+
}
|
|
260
|
+
get backendProxy() {
|
|
261
|
+
return this._backendProxy;
|
|
262
|
+
}
|
|
263
|
+
set backendProxy(value) {
|
|
264
|
+
this._backendProxy = value;
|
|
265
|
+
}
|
|
266
|
+
get cfg() {
|
|
267
|
+
return this._cfg;
|
|
268
|
+
}
|
|
269
|
+
set cfg(value) {
|
|
270
|
+
this._cfg = value;
|
|
271
|
+
}
|
|
272
|
+
get sendToServerWatchdog() {
|
|
273
|
+
return this._sendToServerWatchdog;
|
|
274
|
+
}
|
|
275
|
+
set sendToServerWatchdog(value) {
|
|
276
|
+
this._sendToServerWatchdog = value;
|
|
277
|
+
}
|
|
278
|
+
get keepaliveWatchdog() {
|
|
279
|
+
return this._keepaliveWatchdog;
|
|
280
|
+
}
|
|
281
|
+
set keepaliveWatchdog(value) {
|
|
282
|
+
this._keepaliveWatchdog = value;
|
|
283
|
+
}
|
|
284
|
+
}
|
|
429
285
|
exports.FootprintsProcess = FootprintsProcess;
|
|
286
|
+
FootprintsProcess.ALARM_FIRED = 'alarm';
|
|
430
287
|
//# sourceMappingURL=index.js.map
|