slnodejs 6.1.415 → 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 +1 -1
- package/browser-agent/dist/browser-agent-all.min.js +1 -1
- 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 +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 +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.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,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.EnvironmentDataService = void 0;
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
const os = require("os");
|
|
5
|
+
const version = process.env.npm_package_version;
|
|
6
6
|
function clone(o) {
|
|
7
7
|
//if (!o) return o; //Unreachable
|
|
8
8
|
return JSON.parse(JSON.stringify(o));
|
|
@@ -10,8 +10,8 @@ function clone(o) {
|
|
|
10
10
|
/**
|
|
11
11
|
* The service is used to get environmental data for submission (process id, machine data, etc.)
|
|
12
12
|
*/
|
|
13
|
-
|
|
14
|
-
|
|
13
|
+
class EnvironmentDataService {
|
|
14
|
+
constructor(cfg) {
|
|
15
15
|
this.cfg = cfg;
|
|
16
16
|
this.envData = null;
|
|
17
17
|
if (!cfg)
|
|
@@ -40,8 +40,8 @@ var EnvironmentDataService = /** @class */ (function () {
|
|
|
40
40
|
this.envData.testStage = cfg.testStage.value;
|
|
41
41
|
}
|
|
42
42
|
}
|
|
43
|
-
|
|
44
|
-
|
|
43
|
+
getEnvDataForSubmission() {
|
|
44
|
+
const returnedEnvData = clone(this.envData);
|
|
45
45
|
returnedEnvData.memory = {
|
|
46
46
|
process: process.memoryUsage(),
|
|
47
47
|
machine: {
|
|
@@ -51,11 +51,10 @@ var EnvironmentDataService = /** @class */ (function () {
|
|
|
51
51
|
};
|
|
52
52
|
this.setLastError(null);
|
|
53
53
|
return returnedEnvData;
|
|
54
|
-
}
|
|
55
|
-
|
|
54
|
+
}
|
|
55
|
+
setLastError(message) {
|
|
56
56
|
this.envData.lastError = message;
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
}());
|
|
57
|
+
}
|
|
58
|
+
}
|
|
60
59
|
exports.EnvironmentDataService = EnvironmentDataService;
|
|
61
60
|
//# sourceMappingURL=environment-data-service.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"environment-data-service.js","sourceRoot":"","sources":["../../common/environment-data-service.ts"],"names":[],"mappings":";;;AACA,
|
|
1
|
+
{"version":3,"file":"environment-data-service.js","sourceRoot":"","sources":["../../common/environment-data-service.ts"],"names":[],"mappings":";;;AACA,yBAA0B;AAC1B,MAAM,OAAO,GAAG,OAAO,CAAC,GAAG,CAAC,mBAAmB,CAAC;AAEhD,SAAS,KAAK,CAAI,CAAI;IAClB,iCAAiC;IACjC,OAAU,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC;AAC5C,CAAC;AAOD;;GAEG;AACH,MAAa,sBAAsB;IAC/B,YAA2B,GAAgB;QAAhB,QAAG,GAAH,GAAG,CAAa;QA2BnC,YAAO,GAAQ,IAAI,CAAC;QA1BxB,IAAI,CAAC,GAAG;YAAE,MAAM,IAAI,KAAK,CAAC,iBAAiB,CAAC,CAAC;QAC7C,IAAI,CAAC,OAAO,GAAG;YACX,WAAW,EAAE,EAAE,CAAC,QAAQ,EAAE;YAC1B,QAAQ,EAAE,EAAE,CAAC,QAAQ,EAAE;YACvB,WAAW,EAAC,OAAO,CAAC,IAAI;YACxB,EAAE,EAAE,EAAE,CAAC,IAAI,EAAE;YACb,SAAS,EAAE,EAAE,CAAC,OAAO,EAAE;YACvB,IAAI,EAAE,EAAE,CAAC,IAAI,EAAE;YACf,SAAS,EAAE,OAAO,CAAC,GAAG;YACtB,SAAS,EAAE,KAAK,CAAC,EAAE,CAAC,iBAAiB,EAAE,CAAC;YACxC,YAAY,EAAE,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC;YACrC,OAAO,EAAE,OAAO,CAAC,OAAO;YACxB,SAAS,EAAE,QAAQ;YACnB,YAAY,EAAE,OAAO;SACxB,CAAC;QACF,IAAI,GAAG,IAAI,GAAG,CAAC,eAAe,CAAC,QAAQ,EAAE;YACrC,IAAI,CAAC,OAAO,CAAC,eAAe,GAAG,GAAG,CAAC,eAAe,CAAC,KAAK,CAAC;SAC5D;QACD,IAAI,GAAG,IAAI,GAAG,CAAC,KAAK,CAAC,QAAQ,EAAE;YAC3B,IAAI,CAAC,OAAO,CAAC,KAAK,GAAG,GAAG,CAAC,KAAK,CAAC,KAAK,CAAC;SACxC;QACD,IAAI,GAAG,IAAI,GAAG,CAAC,SAAS,CAAC,QAAQ,EAAE;YAC/B,IAAI,CAAC,OAAO,CAAC,SAAS,GAAG,GAAG,CAAC,SAAS,CAAC,KAAK,CAAC;SAChD;IACL,CAAC;IAIM,uBAAuB;QAC1B,MAAM,eAAe,GAAG,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QAC5C,eAAe,CAAC,MAAM,GAAG;YACrB,OAAO,EAAE,OAAO,CAAC,WAAW,EAAE;YAC9B,OAAO,EAAE;gBACL,OAAO,EAAE,EAAE,CAAC,OAAO,EAAE;gBACrB,QAAQ,EAAE,EAAE,CAAC,QAAQ,EAAE;aAC1B;SACJ,CAAC;QACF,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC;QACxB,OAAO,eAAe,CAAC;IAC3B,CAAC;IAEM,YAAY,CAAC,OAAe;QAC/B,IAAI,CAAC,OAAO,CAAC,SAAS,GAAG,OAAO,CAAC;IACrC,CAAC;CACJ;AA9CD,wDA8CC"}
|
|
@@ -1,41 +1,29 @@
|
|
|
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
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14
3
|
exports.EventsCreator = void 0;
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
var eventBase = this.createEvent(events_contracts_1.EventTypes.TestStart, executionId, framework);
|
|
22
|
-
var startTimeStamp = (0, system_date_1.getSystemDateValueOf)() - duration;
|
|
4
|
+
const events_contracts_1 = require("./events-contracts");
|
|
5
|
+
const system_date_1 = require("../system-date");
|
|
6
|
+
class EventsCreator {
|
|
7
|
+
static createTestStartedEvent(executionId, framework, testName, duration) {
|
|
8
|
+
const eventBase = this.createEvent(events_contracts_1.EventTypes.TestStart, executionId, framework);
|
|
9
|
+
const startTimeStamp = (0, system_date_1.getSystemDateValueOf)() - duration;
|
|
23
10
|
eventBase.localTime = startTimeStamp;
|
|
24
|
-
return
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
return
|
|
29
|
-
|
|
30
|
-
|
|
11
|
+
return Object.assign(Object.assign({}, eventBase), { testName });
|
|
12
|
+
}
|
|
13
|
+
static createTestEndEvent(executionId, framework, testName, result, duration) {
|
|
14
|
+
const eventBase = this.createEvent(events_contracts_1.EventTypes.TestEnd, executionId, framework);
|
|
15
|
+
return Object.assign(Object.assign({}, eventBase), { result,
|
|
16
|
+
duration,
|
|
17
|
+
testName });
|
|
18
|
+
}
|
|
19
|
+
static createEvent(type, executionId, framework) {
|
|
31
20
|
return {
|
|
32
|
-
type
|
|
33
|
-
executionId
|
|
34
|
-
framework
|
|
21
|
+
type,
|
|
22
|
+
executionId,
|
|
23
|
+
framework,
|
|
35
24
|
localTime: (0, system_date_1.getSystemDateValueOf)()
|
|
36
25
|
};
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
}());
|
|
26
|
+
}
|
|
27
|
+
}
|
|
40
28
|
exports.EventsCreator = EventsCreator;
|
|
41
29
|
//# sourceMappingURL=events-creator.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"events-creator.js","sourceRoot":"","sources":["../../../common/events-process/events-creator.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"events-creator.js","sourceRoot":"","sources":["../../../common/events-process/events-creator.ts"],"names":[],"mappings":";;;AAAA,yDAAsF;AACtF,gDAAoD;AAEpD,MAAa,aAAa;IACf,MAAM,CAAC,sBAAsB,CAAC,WAAmB,EAAE,SAAiB,EAAE,QAAgB,EAAE,QAAgB;QAC3G,MAAM,SAAS,GAAG,IAAI,CAAC,WAAW,CAAC,6BAAU,CAAC,SAAS,EAAE,WAAW,EAAE,SAAS,CAAC,CAAC;QACjF,MAAM,cAAc,GAAG,IAAA,kCAAoB,GAAE,GAAG,QAAQ,CAAC;QACzD,SAAS,CAAC,SAAS,GAAG,cAAc,CAAC;QACrC,OAAO,gCACA,SAAS,KACZ,QAAQ,GACX,CAAC;IACN,CAAC;IAEM,MAAM,CAAC,kBAAkB,CAAC,WAAmB,EAAE,SAAiB,EAAE,QAAgB,EACrF,MAAc,EAAE,QAAgB;QAChC,MAAM,SAAS,GAAG,IAAI,CAAC,WAAW,CAAC,6BAAU,CAAC,OAAO,EAAE,WAAW,EAAE,SAAS,CAAC,CAAC;QAC/E,OAAO,gCACA,SAAS,KACZ,MAAM;YACN,QAAQ;YACR,QAAQ,GACX,CAAC;IACN,CAAC;IAGM,MAAM,CAAC,WAAW,CAAC,IAAgB,EAAE,WAAmB,EAAE,SAAiB;QAC9E,OAAO;YACH,IAAI;YACJ,WAAW;YACX,SAAS;YACT,SAAS,EAAE,IAAA,kCAAoB,GAAE;SACpC,CAAA;IACL,CAAC;CACJ;AA/BD,sCA+BC"}
|
|
@@ -8,39 +8,12 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
8
8
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
9
|
});
|
|
10
10
|
};
|
|
11
|
-
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
12
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
13
|
-
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
14
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
15
|
-
function step(op) {
|
|
16
|
-
if (f) throw new TypeError("Generator is already executing.");
|
|
17
|
-
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
18
|
-
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;
|
|
19
|
-
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
20
|
-
switch (op[0]) {
|
|
21
|
-
case 0: case 1: t = op; break;
|
|
22
|
-
case 4: _.label++; return { value: op[1], done: false };
|
|
23
|
-
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
24
|
-
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
25
|
-
default:
|
|
26
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
27
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
28
|
-
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
29
|
-
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
30
|
-
if (t[2]) _.ops.pop();
|
|
31
|
-
_.trys.pop(); continue;
|
|
32
|
-
}
|
|
33
|
-
op = body.call(thisArg, _);
|
|
34
|
-
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
35
|
-
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
36
|
-
}
|
|
37
|
-
};
|
|
38
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
12
|
exports.EventsProcess = void 0;
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
13
|
+
const validation_utils_1 = require("../utils/validation-utils");
|
|
14
|
+
const system_date_1 = require("../system-date");
|
|
15
|
+
class EventsProcess {
|
|
16
|
+
constructor(configuration, agentInstanceData, sendToServerWatchdog, keepAliveWatchdog, environmentDataService, backendProxy, eventsQueue, logger) {
|
|
44
17
|
this._isRunning = false;
|
|
45
18
|
this.sequence = 0;
|
|
46
19
|
this._onGoingRequests = [];
|
|
@@ -62,14 +35,14 @@ var EventsProcess = /** @class */ (function () {
|
|
|
62
35
|
this._eventsQueue = eventsQueue;
|
|
63
36
|
this.init();
|
|
64
37
|
}
|
|
65
|
-
|
|
38
|
+
enqueueEvent(evt) {
|
|
66
39
|
evt.localTime = evt.localTime || (0, system_date_1.getSystemDateValueOf)();
|
|
67
40
|
this._eventsQueue.enqueue(evt);
|
|
68
41
|
if (this.isRunning && this.configuration.sendEvents.value && this.configuration.enabled.value) {
|
|
69
42
|
this.ensureKeepaliveThreadRunning();
|
|
70
43
|
}
|
|
71
|
-
}
|
|
72
|
-
|
|
44
|
+
}
|
|
45
|
+
start() {
|
|
73
46
|
if (this._isRunning || !this._configuration.enabled.value) {
|
|
74
47
|
return;
|
|
75
48
|
}
|
|
@@ -78,92 +51,64 @@ var EventsProcess = /** @class */ (function () {
|
|
|
78
51
|
this.ensureKeepaliveThreadRunning();
|
|
79
52
|
}
|
|
80
53
|
this._isRunning = true;
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
case 2:
|
|
98
|
-
_a.sent();
|
|
99
|
-
return [4 /*yield*/, this.submitEventsSync()];
|
|
100
|
-
case 3:
|
|
101
|
-
_a.sent();
|
|
102
|
-
return [3 /*break*/, 5];
|
|
103
|
-
case 4:
|
|
104
|
-
e_1 = _a.sent();
|
|
105
|
-
this._logger.warn('Error while stopping EventsProcess: ', e_1);
|
|
106
|
-
return [3 /*break*/, 5];
|
|
107
|
-
case 5:
|
|
108
|
-
this._isRunning = false;
|
|
109
|
-
return [2 /*return*/];
|
|
110
|
-
}
|
|
111
|
-
});
|
|
54
|
+
}
|
|
55
|
+
stop() {
|
|
56
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
57
|
+
this._sendToServerWatchdog.stop();
|
|
58
|
+
this.keepAliveWatchdog.stop();
|
|
59
|
+
if (this._configuration.enabled.value === false || this._configuration.sendEvents.value === false) { //Events/Agent functionality is disabled. Return immediately
|
|
60
|
+
return;
|
|
61
|
+
}
|
|
62
|
+
try {
|
|
63
|
+
yield Promise.all(this._onGoingRequests);
|
|
64
|
+
yield this.submitEventsSync();
|
|
65
|
+
}
|
|
66
|
+
catch (e) {
|
|
67
|
+
this._logger.warn('Error while stopping EventsProcess: ', e);
|
|
68
|
+
}
|
|
69
|
+
this._isRunning = false;
|
|
112
70
|
});
|
|
113
|
-
}
|
|
114
|
-
|
|
71
|
+
}
|
|
72
|
+
getQueueSize() {
|
|
115
73
|
return this._eventsQueue.getQueueSize();
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
var _this = this;
|
|
74
|
+
}
|
|
75
|
+
submitEvents() {
|
|
119
76
|
if (!this._isRunning ||
|
|
120
77
|
!this._configuration.sendEvents.value ||
|
|
121
78
|
!this._configuration.enabled.value ||
|
|
122
79
|
this._eventsQueue.getQueueSize() == 0) {
|
|
123
80
|
return;
|
|
124
81
|
}
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
82
|
+
const items = this._eventsQueue.dequeue(EventsProcess.ITEMS_TO_DEQUE);
|
|
83
|
+
const packet = this.createEventsPacket(items);
|
|
84
|
+
const promise = this._backendProxy.submitEventsPromise(packet);
|
|
128
85
|
this._onGoingRequests.push(promise);
|
|
129
|
-
promise.then(
|
|
130
|
-
if (
|
|
131
|
-
|
|
86
|
+
promise.then(() => {
|
|
87
|
+
if (this._eventsQueue.getQueueSize() > 0) {
|
|
88
|
+
this.submitEvents();
|
|
132
89
|
}
|
|
133
|
-
|
|
134
|
-
}).catch(
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
90
|
+
this.removeRequest(promise);
|
|
91
|
+
}).catch(err => {
|
|
92
|
+
this._logger.warn(`Error while submitting events, ${err}`);
|
|
93
|
+
this._eventsQueue.requeue(items);
|
|
94
|
+
this.removeRequest(promise);
|
|
138
95
|
});
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
_a.label = 1;
|
|
148
|
-
case 1:
|
|
149
|
-
if (!(this._eventsQueue.getQueueSize() > 0)) return [3 /*break*/, 3];
|
|
150
|
-
items = this._eventsQueue.dequeue(EventsProcess.ITEMS_TO_DEQUE);
|
|
151
|
-
packet = this.createEventsPacket(items);
|
|
152
|
-
return [4 /*yield*/, this._backendProxy.submitEventsPromise(packet)];
|
|
153
|
-
case 2:
|
|
154
|
-
_a.sent();
|
|
155
|
-
return [3 /*break*/, 1];
|
|
156
|
-
case 3: return [3 /*break*/, 5];
|
|
157
|
-
case 4:
|
|
158
|
-
e_2 = _a.sent();
|
|
159
|
-
this._logger.warn("Error while sending events synchronously. ".concat(e_2));
|
|
160
|
-
return [3 /*break*/, 5];
|
|
161
|
-
case 5: return [2 /*return*/];
|
|
96
|
+
}
|
|
97
|
+
submitEventsSync() {
|
|
98
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
99
|
+
try {
|
|
100
|
+
while (this._eventsQueue.getQueueSize() > 0) {
|
|
101
|
+
const items = this._eventsQueue.dequeue(EventsProcess.ITEMS_TO_DEQUE);
|
|
102
|
+
const packet = this.createEventsPacket(items);
|
|
103
|
+
yield this._backendProxy.submitEventsPromise(packet);
|
|
162
104
|
}
|
|
163
|
-
}
|
|
105
|
+
}
|
|
106
|
+
catch (e) {
|
|
107
|
+
this._logger.warn(`Error while sending events synchronously. ${e}`);
|
|
108
|
+
}
|
|
164
109
|
});
|
|
165
|
-
}
|
|
166
|
-
|
|
110
|
+
}
|
|
111
|
+
createEventsPacket(items) {
|
|
167
112
|
return {
|
|
168
113
|
customerId: this._configuration.customerId.value,
|
|
169
114
|
appName: this._configuration.appName.value,
|
|
@@ -179,88 +124,54 @@ var EventsProcess = /** @class */ (function () {
|
|
|
179
124
|
agentId: this._agentInstanceData.agentId,
|
|
180
125
|
},
|
|
181
126
|
};
|
|
182
|
-
}
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
this.
|
|
186
|
-
this.
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
_this.keepAliveWatchdog.stop();
|
|
127
|
+
}
|
|
128
|
+
init() {
|
|
129
|
+
this._sendToServerWatchdog.on('alarm', () => this.submitEvents());
|
|
130
|
+
this._eventsQueue.on('full', () => this.submitEvents());
|
|
131
|
+
this.keepAliveWatchdog.on('alarm', () => {
|
|
132
|
+
if (this.eventsQueue.getQueueSize() == 0) {
|
|
133
|
+
this.keepAliveWatchdog.stop();
|
|
190
134
|
}
|
|
191
135
|
});
|
|
192
|
-
}
|
|
193
|
-
|
|
136
|
+
}
|
|
137
|
+
ensureKeepaliveThreadRunning() {
|
|
194
138
|
this.keepAliveWatchdog.start();
|
|
195
|
-
}
|
|
196
|
-
|
|
197
|
-
|
|
139
|
+
}
|
|
140
|
+
removeRequest(request) {
|
|
141
|
+
const index = this._onGoingRequests.indexOf(request);
|
|
198
142
|
this._onGoingRequests.splice(index, 1);
|
|
199
|
-
}
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
}
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
Object.defineProperty(EventsProcess.prototype, "sendToServerWatchdog", {
|
|
232
|
-
get: function () {
|
|
233
|
-
return this._sendToServerWatchdog;
|
|
234
|
-
},
|
|
235
|
-
enumerable: false,
|
|
236
|
-
configurable: true
|
|
237
|
-
});
|
|
238
|
-
Object.defineProperty(EventsProcess.prototype, "backendProxy", {
|
|
239
|
-
get: function () {
|
|
240
|
-
return this._backendProxy;
|
|
241
|
-
},
|
|
242
|
-
enumerable: false,
|
|
243
|
-
configurable: true
|
|
244
|
-
});
|
|
245
|
-
Object.defineProperty(EventsProcess.prototype, "eventsQueue", {
|
|
246
|
-
get: function () {
|
|
247
|
-
return this._eventsQueue;
|
|
248
|
-
},
|
|
249
|
-
enumerable: false,
|
|
250
|
-
configurable: true
|
|
251
|
-
});
|
|
252
|
-
Object.defineProperty(EventsProcess.prototype, "testSelectionStatus", {
|
|
253
|
-
get: function () {
|
|
254
|
-
return this._testSelectionStatus;
|
|
255
|
-
},
|
|
256
|
-
set: function (testSelectionStatus) {
|
|
257
|
-
this._testSelectionStatus = testSelectionStatus;
|
|
258
|
-
},
|
|
259
|
-
enumerable: false,
|
|
260
|
-
configurable: true
|
|
261
|
-
});
|
|
262
|
-
EventsProcess.ITEMS_TO_DEQUE = 1000;
|
|
263
|
-
return EventsProcess;
|
|
264
|
-
}());
|
|
143
|
+
}
|
|
144
|
+
get onGoingRequests() {
|
|
145
|
+
return this._onGoingRequests;
|
|
146
|
+
}
|
|
147
|
+
get configuration() {
|
|
148
|
+
return this._configuration;
|
|
149
|
+
}
|
|
150
|
+
get logger() {
|
|
151
|
+
return this._logger;
|
|
152
|
+
}
|
|
153
|
+
get isRunning() {
|
|
154
|
+
return this._isRunning;
|
|
155
|
+
}
|
|
156
|
+
set isRunning(value) {
|
|
157
|
+
this._isRunning = value;
|
|
158
|
+
}
|
|
159
|
+
get sendToServerWatchdog() {
|
|
160
|
+
return this._sendToServerWatchdog;
|
|
161
|
+
}
|
|
162
|
+
get backendProxy() {
|
|
163
|
+
return this._backendProxy;
|
|
164
|
+
}
|
|
165
|
+
get eventsQueue() {
|
|
166
|
+
return this._eventsQueue;
|
|
167
|
+
}
|
|
168
|
+
set testSelectionStatus(testSelectionStatus) {
|
|
169
|
+
this._testSelectionStatus = testSelectionStatus;
|
|
170
|
+
}
|
|
171
|
+
get testSelectionStatus() {
|
|
172
|
+
return this._testSelectionStatus;
|
|
173
|
+
}
|
|
174
|
+
}
|
|
265
175
|
exports.EventsProcess = EventsProcess;
|
|
176
|
+
EventsProcess.ITEMS_TO_DEQUE = 1000;
|
|
266
177
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../common/events-process/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../common/events-process/index.ts"],"names":[],"mappings":";;;;;;;;;;;;AAEA,gEAA0D;AAI1D,gDAAoD;AAGpD,MAAa,aAAa;IAetB,YAAY,aAA0B,EAAE,iBAAoC,EAAE,oBAA+B,EAAE,iBAA4B,EACvI,sBAAoC,EAAE,YAA0B,EAAE,WAA2B,EAAE,MAAW;QANtG,eAAU,GAAY,KAAK,CAAC;QAC5B,aAAQ,GAAW,CAAC,CAAC;QACrB,qBAAgB,GAAmB,EAAE,CAAC;QAK1C,kCAAe,CAAC,oBAAoB,CAAC,aAAa,EAAE,eAAe,CAAC,CAAC;QACrE,kCAAe,CAAC,oBAAoB,CAAC,iBAAiB,EAAE,mBAAmB,CAAC,CAAC;QAC7E,kCAAe,CAAC,oBAAoB,CAAC,oBAAoB,EAAE,sBAAsB,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O,IAAI,CAAC,gBAAgB,CAAC;IACjC,CAAC;IAGD,IAAI,aAAa;QACb,OAAO,IAAI,CAAC,cAAc,CAAC;IAC/B,CAAC;IAED,IAAI,MAAM;QACN,OAAO,IAAI,CAAC,OAAO,CAAC;IACxB,CAAC;IAED,IAAI,SAAS;QACT,OAAO,IAAI,CAAC,UAAU,CAAC;IAC3B,CAAC;IAED,IAAI,SAAS,CAAC,KAAc;QACxB,IAAI,CAAC,UAAU,GAAG,KAAK,CAAC;IAC5B,CAAC;IAGD,IAAI,oBAAoB;QACpB,OAAO,IAAI,CAAC,qBAAqB,CAAC;IACtC,CAAC;IAED,IAAI,YAAY;QACZ,OAAO,IAAI,CAAC,aAAa,CAAC;IAC9B,CAAC;IAGD,IAAI,WAAW;QACX,OAAO,IAAI,CAAC,YAAY,CAAC;IAC7B,CAAC;IAGD,IAAI,mBAAmB,CAAC,mBAAwC;QAC5D,IAAI,CAAC,oBAAoB,GAAG,mBAAmB,CAAC;IACpD,CAAC;IAED,IAAI,mBAAmB;QACnB,OAAO,IAAI,CAAC,oBAAoB,CAAC;IACrC,CAAC;;AA7LL,sCA8LC;AA7L6B,4BAAc,GAAG,IAAI,CAAC"}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.CollectionInterval = void 0;
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
const system_date_1 = require("../system-date");
|
|
5
|
+
class CollectionInterval {
|
|
6
|
+
constructor(intervalInMS) {
|
|
7
7
|
this.intervalInSeconds = this.toSeconds(intervalInMS);
|
|
8
8
|
this.start = this.toSeconds((0, system_date_1.getSystemDateValueOf)());
|
|
9
9
|
}
|
|
10
|
-
|
|
10
|
+
next() {
|
|
11
11
|
if (this.end) {
|
|
12
12
|
this.start = this.end;
|
|
13
13
|
}
|
|
@@ -15,14 +15,13 @@ var CollectionInterval = /** @class */ (function () {
|
|
|
15
15
|
if ((this.end - this.start) > this.intervalInSeconds) {
|
|
16
16
|
this.start = this.end - this.intervalInSeconds;
|
|
17
17
|
}
|
|
18
|
-
}
|
|
19
|
-
|
|
18
|
+
}
|
|
19
|
+
toJson() {
|
|
20
20
|
return { start: this.start, end: this.end };
|
|
21
|
-
}
|
|
22
|
-
|
|
21
|
+
}
|
|
22
|
+
toSeconds(time) {
|
|
23
23
|
return Math.floor(time / 1000);
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
}());
|
|
24
|
+
}
|
|
25
|
+
}
|
|
27
26
|
exports.CollectionInterval = CollectionInterval;
|
|
28
27
|
//# sourceMappingURL=collection-interval.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"collection-interval.js","sourceRoot":"","sources":["../../../common/footprints-process/collection-interval.ts"],"names":[],"mappings":";;;AACA,
|
|
1
|
+
{"version":3,"file":"collection-interval.js","sourceRoot":"","sources":["../../../common/footprints-process/collection-interval.ts"],"names":[],"mappings":";;;AACA,gDAAoD;AAEpD,MAAa,kBAAkB;IAK3B,YAAY,YAAoB;QAC5B,IAAI,CAAC,iBAAiB,GAAG,IAAI,CAAC,SAAS,CAAC,YAAY,CAAC,CAAA;QACrD,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,SAAS,CAAC,IAAA,kCAAoB,GAAE,CAAC,CAAC;IACxD,CAAC;IAEM,IAAI;QACP,IAAI,IAAI,CAAC,GAAG,EAAE;YACV,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,GAAG,CAAC;SACzB;QACD,IAAI,CAAC,GAAG,GAAG,IAAI,CAAC,SAAS,CAAC,IAAA,kCAAoB,GAAE,CAAC,CAAC;QAClD,IAAG,CAAC,IAAI,CAAC,GAAG,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,IAAI,CAAC,iBAAiB,EAAC;YAChD,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,GAAG,GAAG,IAAI,CAAC,iBAAiB,CAAC;SAClD;IACL,CAAC;IAEM,MAAM;QACT,OAAO,EAAC,KAAK,EAAE,IAAI,CAAC,KAAK,EAAE,GAAG,EAAE,IAAI,CAAC,GAAG,EAAC,CAAA;IAC7C,CAAC;IAEO,SAAS,CAAC,IAAY;QAC1B,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,GAAG,IAAI,CAAC,CAAC;IACnC,CAAC;CACJ;AA3BD,gDA2BC"}
|
|
@@ -1,52 +1,51 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.FootprintsServiceProxy = void 0;
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
4
|
+
const http_client_1 = require("../http/http-client");
|
|
5
|
+
const sl_routes_1 = require("../http/sl-routes");
|
|
6
|
+
const messages_formatter_1 = require("../messages-formatter");
|
|
7
|
+
class FootprintsServiceProxy {
|
|
8
|
+
constructor(cfg, logger) {
|
|
9
9
|
this.initHttpConfig(cfg);
|
|
10
10
|
this.logger = logger;
|
|
11
11
|
this.httpClient = new http_client_1.HttpClient(this.httpConfig, logger);
|
|
12
12
|
}
|
|
13
|
-
|
|
13
|
+
handleFootprints(footprintsPacket, callback) {
|
|
14
14
|
if (!footprintsPacket) {
|
|
15
15
|
this.logger.info('Submit footprints - got null or empty packet. Skip submitting.');
|
|
16
16
|
callback(null);
|
|
17
17
|
return;
|
|
18
18
|
}
|
|
19
|
-
|
|
20
|
-
this.logger.debug(
|
|
21
|
-
this.logger.debug(
|
|
22
|
-
|
|
19
|
+
const hitFiles = this.getHitFiles(footprintsPacket);
|
|
20
|
+
this.logger.debug(`Submitting footprints, tests: ${JSON.stringify(footprintsPacket.tests)}`);
|
|
21
|
+
this.logger.debug(`Submitting footprints, files: ${hitFiles}`);
|
|
22
|
+
const url = sl_routes_1.SLRoutes.footprintsV5();
|
|
23
23
|
this.httpClient.post(footprintsPacket, url, callback);
|
|
24
|
-
}
|
|
25
|
-
|
|
24
|
+
}
|
|
25
|
+
submitFootprints(footprintsPacket, callback) {
|
|
26
26
|
this.handleFootprints(footprintsPacket, callback);
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
|
|
27
|
+
}
|
|
28
|
+
initHttpConfig(cfg) {
|
|
29
|
+
const config = {
|
|
30
30
|
token: cfg.token.value,
|
|
31
31
|
server: cfg.server.value,
|
|
32
32
|
proxy: cfg.proxy.value,
|
|
33
33
|
compressRequests: cfg.gzip.hasValue ? cfg.gzip.value : true
|
|
34
34
|
};
|
|
35
35
|
this.httpConfig = config;
|
|
36
|
-
}
|
|
37
|
-
|
|
36
|
+
}
|
|
37
|
+
getHitFiles(packetToSend) {
|
|
38
38
|
if (!this.logger.isDebugEnabled()) {
|
|
39
39
|
return;
|
|
40
40
|
}
|
|
41
|
-
|
|
41
|
+
const formatter = new messages_formatter_1.MessagesFormatter();
|
|
42
42
|
if (packetToSend && packetToSend.apps && packetToSend.apps[0] && packetToSend.apps[0].files) {
|
|
43
|
-
packetToSend.apps[0].files.forEach(
|
|
43
|
+
packetToSend.apps[0].files.forEach((file) => {
|
|
44
44
|
formatter.addContent(file.path);
|
|
45
45
|
});
|
|
46
46
|
}
|
|
47
47
|
return formatter.content;
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
}());
|
|
48
|
+
}
|
|
49
|
+
}
|
|
51
50
|
exports.FootprintsServiceProxy = FootprintsServiceProxy;
|
|
52
51
|
//# sourceMappingURL=footprints-service-proxy.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"footprints-service-proxy.js","sourceRoot":"","sources":["../../../common/footprints-process/footprints-service-proxy.ts"],"names":[],"mappings":";;;AAEA,
|
|
1
|
+
{"version":3,"file":"footprints-service-proxy.js","sourceRoot":"","sources":["../../../common/footprints-process/footprints-service-proxy.ts"],"names":[],"mappings":";;;AAEA,qDAA+C;AAE/C,iDAA2C;AAC3C,8DAAwD;AAExD,MAAa,sBAAsB;IAI/B,YA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