slnodejs 6.1.415 → 6.1.447
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/browser-agent/dist/browser-agent-all.js +249 -414
- package/browser-agent/dist/browser-agent-all.min.js +3 -3
- package/browser-agent/package.json +1 -1
- package/package.json +2 -2
- package/tsOutputs/api.js +32 -86
- package/tsOutputs/build-scanner/ast-utils.js +11 -11
- package/tsOutputs/build-scanner/ast-utils.js.map +1 -1
- package/tsOutputs/build-scanner/build-diff-process.js +35 -16
- package/tsOutputs/build-scanner/build-diff-process.js.map +1 -1
- package/tsOutputs/build-scanner/cia.js +2 -2
- package/tsOutputs/build-scanner/cia.js.map +1 -1
- package/tsOutputs/build-scanner/default-values-resolver.js +5 -7
- package/tsOutputs/build-scanner/default-values-resolver.js.map +1 -1
- package/tsOutputs/build-scanner/diagnostic/build-scan-diagnosis.js +101 -159
- package/tsOutputs/build-scanner/diagnostic/build-scan-diagnosis.js.map +1 -1
- package/tsOutputs/build-scanner/diagnostic/none-diagnosis.js +23 -55
- package/tsOutputs/build-scanner/diagnostic/none-diagnosis.js.map +1 -1
- package/tsOutputs/build-scanner/file-and-folder-utils.js +3 -3
- package/tsOutputs/build-scanner/file-and-folder-utils.js.map +1 -1
- package/tsOutputs/build-scanner/file-system/actual-file.js +3 -3
- package/tsOutputs/build-scanner/file-system/actual-file.js.map +1 -1
- package/tsOutputs/build-scanner/instrumentation/browser-instrumenter.js +56 -60
- package/tsOutputs/build-scanner/instrumentation/browser-instrumenter.js.map +1 -1
- package/tsOutputs/build-scanner/instrumentation/content-instrumenter.js +9 -10
- package/tsOutputs/build-scanner/instrumentation/content-instrumenter.js.map +1 -1
- package/tsOutputs/build-scanner/instrumentation/files-instrumenter.js +80 -124
- package/tsOutputs/build-scanner/instrumentation/files-instrumenter.js.map +1 -1
- package/tsOutputs/build-scanner/instrumentation/instrumentation-utils.js +3 -3
- package/tsOutputs/build-scanner/instrumentation/instrumentation-utils.js.map +1 -1
- package/tsOutputs/build-scanner/instrumentation/instrumented-file-size-reducer.js +4 -4
- package/tsOutputs/build-scanner/instrumentation/instrumented-file-size-reducer.js.map +1 -1
- package/tsOutputs/build-scanner/instrumentation/process-pool/instrumenter-spawn.js +15 -50
- package/tsOutputs/build-scanner/instrumentation/process-pool/instrumenter-spawn.js.map +1 -1
- package/tsOutputs/build-scanner/instrumentation/process-pool/process-pool.js +84 -141
- package/tsOutputs/build-scanner/instrumentation/process-pool/process-pool.js.map +1 -1
- package/tsOutputs/build-scanner/instrumentation/process-pool/split-by-transform-stream.js +15 -34
- package/tsOutputs/build-scanner/instrumentation/process-pool/split-by-transform-stream.js.map +1 -1
- package/tsOutputs/build-scanner/instrumentation/process-pool/stop-by-condition-transform-stream.js +9 -27
- package/tsOutputs/build-scanner/instrumentation/process-pool/stop-by-condition-transform-stream.js.map +1 -1
- package/tsOutputs/build-scanner/instrumentation/strategies/copy-as-is-strategy.js +8 -10
- package/tsOutputs/build-scanner/instrumentation/strategies/copy-as-is-strategy.js.map +1 -1
- package/tsOutputs/build-scanner/instrumentation/strategies/js-instrumnetation-strategy.js +22 -54
- package/tsOutputs/build-scanner/instrumentation/strategies/js-instrumnetation-strategy.js.map +1 -1
- package/tsOutputs/build-scanner/instrumentation/strategies/markup-instrumnetation-strategy.js +55 -107
- package/tsOutputs/build-scanner/instrumentation/strategies/markup-instrumnetation-strategy.js.map +1 -1
- package/tsOutputs/build-scanner/js_diff/file-signature.js +5 -6
- package/tsOutputs/build-scanner/js_diff/file-signature.js.map +1 -1
- package/tsOutputs/build-scanner/js_diff/files-mapping.js +6 -6
- package/tsOutputs/build-scanner/js_diff/files-mapping.js.map +1 -1
- package/tsOutputs/build-scanner/js_diff/generated-file-signature.js +3 -3
- package/tsOutputs/build-scanner/js_diff/generated-file-signature.js.map +1 -1
- package/tsOutputs/build-scanner/js_diff/guess-method-location.js +26 -27
- package/tsOutputs/build-scanner/js_diff/guess-method-location.js.map +1 -1
- package/tsOutputs/build-scanner/js_diff/method-signature.js +1 -1
- package/tsOutputs/build-scanner/js_diff/method-signature.js.map +1 -1
- package/tsOutputs/build-scanner/js_diff/sl-mapper.js +28 -79
- package/tsOutputs/build-scanner/js_diff/sl-mapper.js.map +1 -1
- package/tsOutputs/build-scanner/js_diff/source-data-enricher.js +3 -2
- package/tsOutputs/build-scanner/js_diff/source-data-enricher.js.map +1 -1
- package/tsOutputs/build-scanner/js_diff/source-files-notifier.js +1 -1
- package/tsOutputs/build-scanner/js_diff/source-files-notifier.js.map +1 -1
- package/tsOutputs/build-scanner/mappings/ensure-files-handler.service.js +76 -149
- package/tsOutputs/build-scanner/mappings/ensure-files-handler.service.js.map +1 -1
- package/tsOutputs/build-scanner/mappings/file-element-utils.js +9 -9
- package/tsOutputs/build-scanner/mappings/file-element-utils.js.map +1 -1
- package/tsOutputs/build-scanner/mappings/file-enricher.js +71 -100
- package/tsOutputs/build-scanner/mappings/file-enricher.js.map +1 -1
- package/tsOutputs/build-scanner/mappings/file-path-fixer.js +112 -0
- package/tsOutputs/build-scanner/mappings/file-path-fixer.js.map +1 -0
- package/tsOutputs/build-scanner/mappings/files-container.js +89 -0
- package/tsOutputs/build-scanner/mappings/files-container.js.map +1 -0
- package/tsOutputs/build-scanner/mappings/files-data-container.js +18 -23
- package/tsOutputs/build-scanner/mappings/files-data-container.js.map +1 -1
- package/tsOutputs/build-scanner/mappings/source-path-mapper.js +15 -45
- package/tsOutputs/build-scanner/mappings/source-path-mapper.js.map +1 -1
- package/tsOutputs/build-scanner/markup-files-parser.js +1 -1
- package/tsOutputs/build-scanner/markup-files-parser.js.map +1 -1
- package/tsOutputs/build-scanner/scm/scm-file-fixer.js +27 -0
- package/tsOutputs/build-scanner/scm/scm-file-fixer.js.map +1 -0
- package/tsOutputs/build-scanner/scm/scm-files-container.js +9 -45
- package/tsOutputs/build-scanner/scm/scm-files-container.js.map +1 -1
- package/tsOutputs/build-scanner/sl-config-cia-cli.js +1 -1
- package/tsOutputs/build-scanner/sl-config-cia-cli.js.map +1 -1
- package/tsOutputs/build-scanner/utils.js +5 -5
- package/tsOutputs/build-scanner/utils.js.map +1 -1
- package/tsOutputs/cli-parse/agent-instance-data.js +2 -2
- package/tsOutputs/cli-parse/agent-instance-data.js.map +1 -1
- package/tsOutputs/cli-parse/child-process-wrapper.js +26 -60
- package/tsOutputs/cli-parse/child-process-wrapper.js.map +1 -1
- package/tsOutputs/cli-parse/cli.js +72 -191
- package/tsOutputs/cli-parse/cli.js.map +1 -1
- package/tsOutputs/cli-parse/constants/constants.js +9 -9
- package/tsOutputs/cli-parse/constants/constants.js.map +1 -1
- package/tsOutputs/cli-parse/custom-commander.js +17 -18
- package/tsOutputs/cli-parse/custom-commander.js.map +1 -1
- package/tsOutputs/cli-parse/executors/base-executor.js +121 -236
- package/tsOutputs/cli-parse/executors/base-executor.js.map +1 -1
- package/tsOutputs/cli-parse/executors/build-args-dto.js +10 -11
- package/tsOutputs/cli-parse/executors/build-args-dto.js.map +1 -1
- package/tsOutputs/cli-parse/executors/build-end-executor.js +34 -92
- package/tsOutputs/cli-parse/executors/build-end-executor.js.map +1 -1
- package/tsOutputs/cli-parse/executors/build-executor.js +64 -133
- package/tsOutputs/cli-parse/executors/build-executor.js.map +1 -1
- package/tsOutputs/cli-parse/executors/config-executor.js +35 -92
- package/tsOutputs/cli-parse/executors/config-executor.js.map +1 -1
- package/tsOutputs/cli-parse/executors/dry-run/base-data.js +29 -39
- package/tsOutputs/cli-parse/executors/dry-run/base-data.js.map +1 -1
- package/tsOutputs/cli-parse/executors/dry-run/build-mapping-data.js +92 -177
- package/tsOutputs/cli-parse/executors/dry-run/build-mapping-data.js.map +1 -1
- package/tsOutputs/cli-parse/executors/dry-run/dry-run-executor.js +110 -194
- package/tsOutputs/cli-parse/executors/dry-run/dry-run-executor.js.map +1 -1
- package/tsOutputs/cli-parse/executors/dry-run/dry-run-validation.js +49 -83
- package/tsOutputs/cli-parse/executors/dry-run/dry-run-validation.js.map +1 -1
- package/tsOutputs/cli-parse/executors/dry-run/footprints-data.js +55 -113
- package/tsOutputs/cli-parse/executors/dry-run/footprints-data.js.map +1 -1
- package/tsOutputs/cli-parse/executors/dry-run/helper-methods.js +24 -25
- package/tsOutputs/cli-parse/executors/dry-run/helper-methods.js.map +1 -1
- package/tsOutputs/cli-parse/executors/end-execution-executor.js +16 -64
- package/tsOutputs/cli-parse/executors/end-execution-executor.js.map +1 -1
- package/tsOutputs/cli-parse/executors/integration-build-components-executor.js +29 -82
- package/tsOutputs/cli-parse/executors/integration-build-components-executor.js.map +1 -1
- package/tsOutputs/cli-parse/executors/integration-build-delete-components-executor.js +12 -59
- package/tsOutputs/cli-parse/executors/integration-build-delete-components-executor.js.map +1 -1
- package/tsOutputs/cli-parse/executors/integration-build-update-components-executor.js +9 -58
- package/tsOutputs/cli-parse/executors/integration-build-update-components-executor.js.map +1 -1
- package/tsOutputs/cli-parse/executors/mocha-executor.js +41 -101
- package/tsOutputs/cli-parse/executors/mocha-executor.js.map +1 -1
- package/tsOutputs/cli-parse/executors/nyc-report-executor.js +24 -83
- package/tsOutputs/cli-parse/executors/nyc-report-executor.js.map +1 -1
- package/tsOutputs/cli-parse/executors/pr-config-executor.js +15 -63
- package/tsOutputs/cli-parse/executors/pr-config-executor.js.map +1 -1
- package/tsOutputs/cli-parse/executors/run-executor.js +23 -75
- package/tsOutputs/cli-parse/executors/run-executor.js.map +1 -1
- package/tsOutputs/cli-parse/executors/start-execution-executor.js +16 -64
- package/tsOutputs/cli-parse/executors/start-execution-executor.js.map +1 -1
- package/tsOutputs/cli-parse/executors/test-executions-executor.js +9 -63
- package/tsOutputs/cli-parse/executors/test-executions-executor.js.map +1 -1
- package/tsOutputs/cli-parse/executors/test-listener-executor.js +47 -117
- package/tsOutputs/cli-parse/executors/test-listener-executor.js.map +1 -1
- package/tsOutputs/cli-parse/executors/upload-report-executor.js +23 -71
- package/tsOutputs/cli-parse/executors/upload-report-executor.js.map +1 -1
- package/tsOutputs/cli-parse/utils.js +10 -10
- package/tsOutputs/cli-parse/utils.js.map +1 -1
- package/tsOutputs/common/agent-events/agent-events-controller.js +146 -251
- package/tsOutputs/common/agent-events/agent-events-controller.js.map +1 -1
- package/tsOutputs/common/agent-events/agent-events-guard.js +12 -15
- package/tsOutputs/common/agent-events/agent-events-guard.js.map +1 -1
- package/tsOutputs/common/agent-events/agent-instance-info-builder.js +22 -24
- package/tsOutputs/common/agent-events/agent-instance-info-builder.js.map +1 -1
- package/tsOutputs/common/agent-events/agent-start-info-builder.js +7 -8
- package/tsOutputs/common/agent-events/agent-start-info-builder.js.map +1 -1
- package/tsOutputs/common/agent-events/browser-info-builder.js +9 -10
- package/tsOutputs/common/agent-events/browser-info-builder.js.map +1 -1
- package/tsOutputs/common/agent-events/ci-info-builder.js +12 -13
- package/tsOutputs/common/agent-events/ci-info-builder.js.map +1 -1
- package/tsOutputs/common/agent-events/cockpit-notifier.js +38 -87
- package/tsOutputs/common/agent-events/cockpit-notifier.js.map +1 -1
- package/tsOutputs/common/agent-events/dry-run-agent-events-controller.js +10 -27
- package/tsOutputs/common/agent-events/dry-run-agent-events-controller.js.map +1 -1
- package/tsOutputs/common/agent-events/machine-info-builder.js +21 -22
- package/tsOutputs/common/agent-events/machine-info-builder.js.map +1 -1
- package/tsOutputs/common/agent-events/no-op-agent-events-controller.js +30 -84
- package/tsOutputs/common/agent-events/no-op-agent-events-controller.js.map +1 -1
- package/tsOutputs/common/agent-events/nodejs-env-info-builder.js +7 -8
- package/tsOutputs/common/agent-events/nodejs-env-info-builder.js.map +1 -1
- package/tsOutputs/common/agent-events/sensitive-data-filter.js +3 -4
- package/tsOutputs/common/agent-events/sensitive-data-filter.js.map +1 -1
- package/tsOutputs/common/agent-instance-data.js +23 -28
- package/tsOutputs/common/agent-instance-data.js.map +1 -1
- package/tsOutputs/common/cli-progress.js +16 -19
- package/tsOutputs/common/cli-progress.js.map +1 -1
- package/tsOutputs/common/config-process/config-loader.js +23 -24
- package/tsOutputs/common/config-process/config-loader.js.map +1 -1
- package/tsOutputs/common/config-process/config-system.js +104 -131
- package/tsOutputs/common/config-process/config-system.js.map +1 -1
- package/tsOutputs/common/config-process/config.js +52 -73
- package/tsOutputs/common/config-process/config.js.map +1 -1
- package/tsOutputs/common/config-process/index.js +38 -57
- package/tsOutputs/common/config-process/index.js.map +1 -1
- package/tsOutputs/common/config-process/no-op-config-process.js +9 -29
- package/tsOutputs/common/config-process/no-op-config-process.js.map +1 -1
- package/tsOutputs/common/constants/constants.js +19 -25
- package/tsOutputs/common/constants/constants.js.map +1 -1
- package/tsOutputs/common/constants/sl-env-vars.js +125 -131
- package/tsOutputs/common/constants/sl-env-vars.js.map +1 -1
- package/tsOutputs/common/coverage-elements/file-element.js +66 -103
- package/tsOutputs/common/coverage-elements/file-element.js.map +1 -1
- package/tsOutputs/common/coverage-elements/istanbul-unique-id-converter.js +28 -47
- package/tsOutputs/common/coverage-elements/istanbul-unique-id-converter.js.map +1 -1
- package/tsOutputs/common/coverage-elements/new-id-resolver.js +17 -17
- package/tsOutputs/common/coverage-elements/new-id-resolver.js.map +1 -1
- package/tsOutputs/common/coverage-elements/original-module-loader.js +71 -79
- package/tsOutputs/common/coverage-elements/original-module-loader.js.map +1 -1
- package/tsOutputs/common/coverage-elements/unique-id-converter.js +90 -110
- package/tsOutputs/common/coverage-elements/unique-id-converter.js.map +1 -1
- package/tsOutputs/common/environment-data-service.js +10 -11
- package/tsOutputs/common/environment-data-service.js.map +1 -1
- package/tsOutputs/common/events-process/events-creator.js +20 -32
- package/tsOutputs/common/events-process/events-creator.js.map +1 -1
- package/tsOutputs/common/events-process/index.js +97 -186
- package/tsOutputs/common/events-process/index.js.map +1 -1
- package/tsOutputs/common/footprints-process/collection-interval.js +10 -11
- package/tsOutputs/common/footprints-process/collection-interval.js.map +1 -1
- package/tsOutputs/common/footprints-process/footprints-service-proxy.js +21 -22
- package/tsOutputs/common/footprints-process/footprints-service-proxy.js.map +1 -1
- package/tsOutputs/common/footprints-process/index.js +68 -102
- package/tsOutputs/common/footprints-process/index.js.map +1 -1
- package/tsOutputs/common/footprints-process/istanbul-to-footprints-contract.js +2 -5
- package/tsOutputs/common/footprints-process/istanbul-to-footprints-contract.js.map +1 -1
- package/tsOutputs/common/footprints-process/istanbul-to-footprints.js +160 -162
- package/tsOutputs/common/footprints-process/istanbul-to-footprints.js.map +1 -1
- package/tsOutputs/common/footprints-process/production-footprints-handler.js +103 -156
- package/tsOutputs/common/footprints-process/production-footprints-handler.js.map +1 -1
- package/tsOutputs/common/footprints-process-v6/base-browser-hits-converter.js +30 -48
- package/tsOutputs/common/footprints-process-v6/base-browser-hits-converter.js.map +1 -1
- package/tsOutputs/common/footprints-process-v6/browser-footprints-buffer.js +7 -25
- package/tsOutputs/common/footprints-process-v6/browser-footprints-buffer.js.map +1 -1
- package/tsOutputs/common/footprints-process-v6/buffer-size-helper.js +13 -14
- package/tsOutputs/common/footprints-process-v6/buffer-size-helper.js.map +1 -1
- package/tsOutputs/common/footprints-process-v6/collector-footprints-buffer.js +14 -32
- package/tsOutputs/common/footprints-process-v6/collector-footprints-buffer.js.map +1 -1
- package/tsOutputs/common/footprints-process-v6/collector-footprints-process.js +43 -109
- package/tsOutputs/common/footprints-process-v6/collector-footprints-process.js.map +1 -1
- package/tsOutputs/common/footprints-process-v6/contracts.js +2 -5
- package/tsOutputs/common/footprints-process-v6/contracts.js.map +1 -1
- package/tsOutputs/common/footprints-process-v6/footprints-buffer.d.ts +1 -1
- package/tsOutputs/common/footprints-process-v6/footprints-buffer.js +55 -78
- package/tsOutputs/common/footprints-process-v6/footprints-buffer.js.map +1 -1
- package/tsOutputs/common/footprints-process-v6/hits-collector.js +89 -129
- package/tsOutputs/common/footprints-process-v6/hits-collector.js.map +1 -1
- package/tsOutputs/common/footprints-process-v6/hits-converter.js +70 -78
- package/tsOutputs/common/footprints-process-v6/hits-converter.js.map +1 -1
- package/tsOutputs/common/footprints-process-v6/index.d.ts +1 -0
- package/tsOutputs/common/footprints-process-v6/index.js +210 -347
- package/tsOutputs/common/footprints-process-v6/index.js.map +1 -1
- package/tsOutputs/common/footprints-process-v6/location-formatter.js +2 -2
- package/tsOutputs/common/footprints-process-v6/location-formatter.js.map +1 -1
- package/tsOutputs/common/footprints-process-v6/relative-path-resolver.js +10 -11
- package/tsOutputs/common/footprints-process-v6/relative-path-resolver.js.map +1 -1
- package/tsOutputs/common/footprints-process-v6/remote-browser-hits-converter.js +5 -25
- package/tsOutputs/common/footprints-process-v6/remote-browser-hits-converter.js.map +1 -1
- package/tsOutputs/common/footprints-process-v6/remote-footprints-process.js +6 -57
- package/tsOutputs/common/footprints-process-v6/remote-footprints-process.js.map +1 -1
- package/tsOutputs/common/footprints-process-v6/remote-hits-collector.js +7 -27
- package/tsOutputs/common/footprints-process-v6/remote-hits-collector.js.map +1 -1
- package/tsOutputs/common/footprints-process-v6/source-map-data.js +14 -15
- package/tsOutputs/common/footprints-process-v6/source-map-data.js.map +1 -1
- package/tsOutputs/common/http/backend-proxy.js +222 -321
- package/tsOutputs/common/http/backend-proxy.js.map +1 -1
- package/tsOutputs/common/http/contracts.js +40 -116
- package/tsOutputs/common/http/contracts.js.map +1 -1
- package/tsOutputs/common/http/dry-run-proxy.js +68 -111
- package/tsOutputs/common/http/dry-run-proxy.js.map +1 -1
- package/tsOutputs/common/http/entities-mapper.js +6 -9
- package/tsOutputs/common/http/entities-mapper.js.map +1 -1
- package/tsOutputs/common/http/http-client.js +76 -86
- package/tsOutputs/common/http/http-client.js.map +1 -1
- package/tsOutputs/common/http/sl-routes.js +119 -122
- package/tsOutputs/common/http/sl-routes.js.map +1 -1
- package/tsOutputs/common/ignored-files-handler.js +48 -49
- package/tsOutputs/common/ignored-files-handler.js.map +1 -1
- package/tsOutputs/common/logger.js +66 -88
- package/tsOutputs/common/logger.js.map +1 -1
- package/tsOutputs/common/messages-formatter.js +9 -14
- package/tsOutputs/common/messages-formatter.js.map +1 -1
- package/tsOutputs/common/no-op-state-tracker.js +14 -37
- package/tsOutputs/common/no-op-state-tracker.js.map +1 -1
- package/tsOutputs/common/queue.js +18 -36
- package/tsOutputs/common/queue.js.map +1 -1
- package/tsOutputs/common/scm/git-cloner.js +30 -94
- package/tsOutputs/common/scm/git-cloner.js.map +1 -1
- package/tsOutputs/common/scm/git-format-builder.js +24 -25
- package/tsOutputs/common/scm/git-format-builder.js.map +1 -1
- package/tsOutputs/common/scm/git.js +192 -327
- package/tsOutputs/common/scm/git.js.map +1 -1
- package/tsOutputs/common/scm/none.js +58 -110
- package/tsOutputs/common/scm/none.js.map +1 -1
- package/tsOutputs/common/scm/scm-factory.js +13 -16
- package/tsOutputs/common/scm/scm-factory.js.map +1 -1
- package/tsOutputs/common/short-name-to-file-mapper.js +30 -33
- package/tsOutputs/common/short-name-to-file-mapper.js.map +1 -1
- package/tsOutputs/common/source-map-handler.js +76 -98
- package/tsOutputs/common/source-map-handler.js.map +1 -1
- package/tsOutputs/common/source-map-reader.js +35 -36
- package/tsOutputs/common/source-map-reader.js.map +1 -1
- package/tsOutputs/common/source-maps-utils.js +8 -11
- package/tsOutputs/common/source-maps-utils.js.map +1 -1
- package/tsOutputs/common/state-tracker-fpv6.js +15 -37
- package/tsOutputs/common/state-tracker-fpv6.js.map +1 -1
- package/tsOutputs/common/state-tracker.js +124 -212
- package/tsOutputs/common/state-tracker.js.map +1 -1
- package/tsOutputs/common/system-date.js +3 -3
- package/tsOutputs/common/system-date.js.map +1 -1
- package/tsOutputs/common/utils/abstract-data-builder.js +8 -9
- package/tsOutputs/common/utils/abstract-data-builder.js.map +1 -1
- package/tsOutputs/common/utils/build-session-data-builder.js +25 -79
- package/tsOutputs/common/utils/build-session-data-builder.js.map +1 -1
- package/tsOutputs/common/utils/dependency-utils.js +13 -16
- package/tsOutputs/common/utils/dependency-utils.js.map +1 -1
- package/tsOutputs/common/utils/env-var-parsing.js +10 -14
- package/tsOutputs/common/utils/env-var-parsing.js.map +1 -1
- package/tsOutputs/common/utils/files-utils.js +16 -19
- package/tsOutputs/common/utils/files-utils.js.map +1 -1
- package/tsOutputs/common/utils/process-utils.js +12 -25
- package/tsOutputs/common/utils/process-utils.js.map +1 -1
- package/tsOutputs/common/utils/test-runner-build-session-data-builder.js +16 -62
- package/tsOutputs/common/utils/test-runner-build-session-data-builder.js.map +1 -1
- package/tsOutputs/common/utils/test-utils/mock-server-utils/mock-server-proxy.js +120 -192
- package/tsOutputs/common/utils/test-utils/mock-server-utils/mock-server-proxy.js.map +1 -1
- package/tsOutputs/common/utils/timer-utils.js +4 -7
- package/tsOutputs/common/utils/timer-utils.js.map +1 -1
- package/tsOutputs/common/utils/token-data-builder.js +30 -50
- package/tsOutputs/common/utils/token-data-builder.js.map +1 -1
- package/tsOutputs/common/utils/validation-utils.d.ts +4 -0
- package/tsOutputs/common/utils/validation-utils.js +13 -10
- package/tsOutputs/common/utils/validation-utils.js.map +1 -1
- package/tsOutputs/common/uuid.js +7 -10
- package/tsOutputs/common/uuid.js.map +1 -1
- package/tsOutputs/common/v8-utils.js +12 -50
- package/tsOutputs/common/v8-utils.js.map +1 -1
- package/tsOutputs/common/watchdog.js +35 -56
- package/tsOutputs/common/watchdog.js.map +1 -1
- package/tsOutputs/mocha-reporter/index.js +12 -12
- package/tsOutputs/mocha-reporter/index.js.map +1 -1
- package/tsOutputs/mocha-reporter/otel-agent.js +47 -118
- package/tsOutputs/mocha-reporter/otel-agent.js.map +1 -1
- package/tsOutputs/test-listener/SlNodeJsProxy.js +34 -35
- package/tsOutputs/test-listener/SlNodeJsProxy.js.map +1 -1
- package/tsOutputs/test-listener/UserMessageHelper.js +14 -19
- package/tsOutputs/test-listener/UserMessageHelper.js.map +1 -1
- package/tsOutputs/test-listener/agent-loader.js +42 -59
- package/tsOutputs/test-listener/agent-loader.js.map +1 -1
- package/tsOutputs/test-listener/agent.js +93 -150
- package/tsOutputs/test-listener/agent.js.map +1 -1
- package/tsOutputs/test-listener/api.js +36 -70
- package/tsOutputs/test-listener/api.js.map +1 -1
- package/tsOutputs/test-listener/base-proxy.js +25 -27
- package/tsOutputs/test-listener/base-proxy.js.map +1 -1
- package/tsOutputs/test-listener/bootstrap.js +6 -6
- package/tsOutputs/test-listener/bootstrap.js.map +1 -1
- package/tsOutputs/test-listener/child-process-patcher.js +10 -10
- package/tsOutputs/test-listener/child-process-patcher.js.map +1 -1
- package/tsOutputs/test-listener/cli.js +27 -30
- package/tsOutputs/test-listener/cli.js.map +1 -1
- package/tsOutputs/test-listener/coloring/http-coloring.js +30 -33
- package/tsOutputs/test-listener/coloring/http-coloring.js.map +1 -1
- package/tsOutputs/test-listener/coloring/listening-port.js +14 -17
- package/tsOutputs/test-listener/coloring/listening-port.js.map +1 -1
- package/tsOutputs/test-listener/command-line-arg-parser.js +12 -15
- package/tsOutputs/test-listener/command-line-arg-parser.js.map +1 -1
- package/tsOutputs/test-listener/config-process/config-loader.js +21 -22
- package/tsOutputs/test-listener/config-process/config-loader.js.map +1 -1
- package/tsOutputs/test-listener/config-process/config-system.js +100 -127
- package/tsOutputs/test-listener/config-process/config-system.js.map +1 -1
- package/tsOutputs/test-listener/config-process/index.js +38 -57
- package/tsOutputs/test-listener/config-process/index.js.map +1 -1
- package/tsOutputs/test-listener/config.js +38 -59
- package/tsOutputs/test-listener/config.js.map +1 -1
- package/tsOutputs/test-listener/entities/BasicConfigurationData.js +37 -64
- package/tsOutputs/test-listener/entities/BasicConfigurationData.js.map +1 -1
- package/tsOutputs/test-listener/entities/build-scanner/ConfigModeData.js +17 -42
- package/tsOutputs/test-listener/entities/build-scanner/ConfigModeData.js.map +1 -1
- package/tsOutputs/test-listener/entities/build-scanner/ScanModeData.js +19 -45
- package/tsOutputs/test-listener/entities/build-scanner/ScanModeData.js.map +1 -1
- package/tsOutputs/test-listener/environment-data-service.js +10 -11
- package/tsOutputs/test-listener/environment-data-service.js.map +1 -1
- package/tsOutputs/test-listener/execution-process/entities-mapper.js +11 -14
- package/tsOutputs/test-listener/execution-process/entities-mapper.js.map +1 -1
- package/tsOutputs/test-listener/execution-process/execution-service-proxy.js +54 -72
- package/tsOutputs/test-listener/execution-process/execution-service-proxy.js.map +1 -1
- package/tsOutputs/test-listener/execution-process/index.js +26 -26
- package/tsOutputs/test-listener/execution-process/index.js.map +1 -1
- package/tsOutputs/test-listener/factory.js +140 -175
- package/tsOutputs/test-listener/factory.js.map +1 -1
- package/tsOutputs/test-listener/footprints-process/footprints-service-proxy.js +17 -34
- package/tsOutputs/test-listener/footprints-process/footprints-service-proxy.js.map +1 -1
- package/tsOutputs/test-listener/footprints-process/index.js +53 -58
- package/tsOutputs/test-listener/footprints-process/index.js.map +1 -1
- package/tsOutputs/test-listener/footprints-process/istanbul-to-footprints-base.js +49 -50
- package/tsOutputs/test-listener/footprints-process/istanbul-to-footprints-base.js.map +1 -1
- package/tsOutputs/test-listener/footprints-process/istanbul-to-footprints-v3.js +98 -117
- package/tsOutputs/test-listener/footprints-process/istanbul-to-footprints-v3.js.map +1 -1
- package/tsOutputs/test-listener/footprints-process/ts-node-hits-collector.js +57 -141
- package/tsOutputs/test-listener/footprints-process/ts-node-hits-collector.js.map +1 -1
- package/tsOutputs/test-listener/integrations/SlGulp.js +25 -26
- package/tsOutputs/test-listener/integrations/SlGulp.js.map +1 -1
- package/tsOutputs/test-listener/logs-process/index.js +30 -35
- package/tsOutputs/test-listener/logs-process/index.js.map +1 -1
- package/tsOutputs/test-listener/logs-process/log-service-proxy.js +8 -25
- package/tsOutputs/test-listener/logs-process/log-service-proxy.js.map +1 -1
- package/tsOutputs/test-listener/nyc-report-executor-fpv6.js +53 -110
- package/tsOutputs/test-listener/nyc-report-executor-fpv6.js.map +1 -1
- package/tsOutputs/test-listener/nyc-report-executor.js +48 -85
- package/tsOutputs/test-listener/nyc-report-executor.js.map +1 -1
- package/tsOutputs/test-listener/otel-agent-loader.js +30 -33
- package/tsOutputs/test-listener/otel-agent-loader.js.map +1 -1
- package/tsOutputs/test-listener/queue.js +18 -36
- package/tsOutputs/test-listener/queue.js.map +1 -1
- package/tsOutputs/test-listener/remote-agent.js +97 -223
- package/tsOutputs/test-listener/remote-agent.js.map +1 -1
- package/tsOutputs/test-listener/resolvers/AppNameResolver.js +8 -25
- package/tsOutputs/test-listener/resolvers/AppNameResolver.js.map +1 -1
- package/tsOutputs/test-listener/resolvers/ArgumentResolver.js +11 -12
- package/tsOutputs/test-listener/resolvers/ArgumentResolver.js.map +1 -1
- package/tsOutputs/test-listener/resolvers/BuildResolver.js +8 -25
- package/tsOutputs/test-listener/resolvers/BuildResolver.js.map +1 -1
- package/tsOutputs/test-listener/resolvers/BuildSessionIdFileResolver.js +8 -25
- package/tsOutputs/test-listener/resolvers/BuildSessionIdFileResolver.js.map +1 -1
- package/tsOutputs/test-listener/resolvers/BuildSessionIdResolver.js +8 -25
- package/tsOutputs/test-listener/resolvers/BuildSessionIdResolver.js.map +1 -1
- package/tsOutputs/test-listener/resolvers/ProxyResolver.js +8 -25
- package/tsOutputs/test-listener/resolvers/ProxyResolver.js.map +1 -1
- package/tsOutputs/test-listener/resolvers/TokenResolver.js +8 -25
- package/tsOutputs/test-listener/resolvers/TokenResolver.js.map +1 -1
- package/tsOutputs/test-listener/state-tracker-process/index.js +54 -74
- package/tsOutputs/test-listener/state-tracker-process/index.js.map +1 -1
- package/tsOutputs/test-listener/state-tracker-process/state-tracker-proxy.js +18 -37
- package/tsOutputs/test-listener/state-tracker-process/state-tracker-proxy.js.map +1 -1
- package/tsOutputs/test-listener/test-recommendation-handler.js +66 -109
- package/tsOutputs/test-listener/test-recommendation-handler.js.map +1 -1
- package/tsOutputs/test-listener/upload-report-handler.js +33 -35
- package/tsOutputs/test-listener/upload-report-handler.js.map +1 -1
- package/tsOutputs/test-listener/utils.js +13 -14
- package/tsOutputs/test-listener/utils.js.map +1 -1
- package/tsOutputs/test-listener/uuid.js +7 -10
- package/tsOutputs/test-listener/uuid.js.map +1 -1
- package/tsOutputs/test-listener/wait-for-multiple-callbacks.js +17 -19
- package/tsOutputs/test-listener/wait-for-multiple-callbacks.js.map +1 -1
- package/tsOutputs/test-listener/watchdog.js +32 -51
- package/tsOutputs/test-listener/watchdog.js.map +1 -1
- package/tsOutputs/build-scanner/mappings/scm-file-fixer.js +0 -96
- package/tsOutputs/build-scanner/mappings/scm-file-fixer.js.map +0 -1
|
@@ -8,42 +8,15 @@ 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.TestRecommendationHandler = void 0;
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
13
|
+
const validation_utils_1 = require("../common/utils/validation-utils");
|
|
14
|
+
const contracts_1 = require("../common/http/contracts");
|
|
15
|
+
const events_contracts_1 = require("../common/events-process/events-contracts");
|
|
16
|
+
const cockpit_notifier_1 = require("../common/agent-events/cockpit-notifier");
|
|
17
|
+
const timer_utils_1 = require("../common/utils/timer-utils");
|
|
18
|
+
class TestRecommendationHandler {
|
|
19
|
+
constructor(backendProxy, eventsProcess, logger, configParams) {
|
|
47
20
|
this.SLEEP_BETWEEN_RETRIES = 1000;
|
|
48
21
|
this.MAX_RETRIES = 60;
|
|
49
22
|
validation_utils_1.ValidationUtils.verifyNotNullOrEmpty(backendProxy, 'backendProxy');
|
|
@@ -63,82 +36,67 @@ var TestRecommendationHandler = /** @class */ (function () {
|
|
|
63
36
|
this.SLEEP_BETWEEN_RETRIES = configParams.testRecommendationSleepSeconds * 1000;
|
|
64
37
|
}
|
|
65
38
|
}
|
|
66
|
-
|
|
67
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
return [2 /*return*/, excludedTestsMap];
|
|
85
|
-
}
|
|
86
|
-
excludedTests = testsRecommendationResponse.excludedTests;
|
|
87
|
-
this.logExcludedTests(excludedTests);
|
|
88
|
-
excludedTests.forEach(function (test) { return excludedTestsMap[test.name] = true; });
|
|
89
|
-
this.eventsProcess.testSelectionStatus = events_contracts_1.TestSelectionStatus.RECOMMENDED_TESTS;
|
|
90
|
-
return [3 /*break*/, 4];
|
|
91
|
-
case 3:
|
|
92
|
-
e_1 = _a.sent();
|
|
93
|
-
message = "Error while trying to get excluded tests list, run all tests as fallback. Error: ".concat(e_1);
|
|
94
|
-
this.logger.warn(message);
|
|
95
|
-
cockpit_notifier_1.CockpitNotifier.sendGenericMessage(message);
|
|
96
|
-
this.eventsProcess.testSelectionStatus = events_contracts_1.TestSelectionStatus.ERROR;
|
|
97
|
-
return [3 /*break*/, 4];
|
|
98
|
-
case 4: return [2 /*return*/, excludedTestsMap];
|
|
39
|
+
getExcludedTests() {
|
|
40
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
41
|
+
const excludedTestsMap = {};
|
|
42
|
+
if (!this.shouldGetRecommendation()) {
|
|
43
|
+
return excludedTestsMap;
|
|
44
|
+
}
|
|
45
|
+
let message;
|
|
46
|
+
try {
|
|
47
|
+
const testsRecommendationResponse = yield this.getTestRecommendation();
|
|
48
|
+
this.logger.info(`Tests recommendation response: ${JSON.stringify(testsRecommendationResponse)}`);
|
|
49
|
+
if (!this.isSelectionEnabled(testsRecommendationResponse)) {
|
|
50
|
+
if (this.eventsProcess.testSelectionStatus === events_contracts_1.TestSelectionStatus.RECOMMENDATIONS_NOT_AVAILABLE) {
|
|
51
|
+
this.logger.info(`
|
|
52
|
+
**************************************************************************
|
|
53
|
+
* Test recommendation request timed out. Recommendations will be ignored *
|
|
54
|
+
**************************************************************************`);
|
|
55
|
+
}
|
|
56
|
+
return excludedTestsMap;
|
|
99
57
|
}
|
|
100
|
-
|
|
58
|
+
const excludedTests = testsRecommendationResponse.excludedTests;
|
|
59
|
+
this.logExcludedTests(excludedTests);
|
|
60
|
+
excludedTests.forEach(test => excludedTestsMap[test.name] = true);
|
|
61
|
+
this.eventsProcess.testSelectionStatus = events_contracts_1.TestSelectionStatus.RECOMMENDED_TESTS;
|
|
62
|
+
}
|
|
63
|
+
catch (e) {
|
|
64
|
+
message = `Error while trying to get excluded tests list, run all tests as fallback. Error: ${e}`;
|
|
65
|
+
this.logger.warn(message);
|
|
66
|
+
cockpit_notifier_1.CockpitNotifier.sendGenericMessage(message);
|
|
67
|
+
this.eventsProcess.testSelectionStatus = events_contracts_1.TestSelectionStatus.ERROR;
|
|
68
|
+
}
|
|
69
|
+
return excludedTestsMap;
|
|
101
70
|
});
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
this.getExcludedTests().then(
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
retries++;
|
|
120
|
-
this.logger.debug("Test recommendation status is ".concat(response.recommendationSetStatus, " retry ").concat(retries, "/").concat(this.MAX_RETRIES));
|
|
121
|
-
if (retries >= this.MAX_RETRIES || !this.isRecommendationsEnabledAndNotReady(response))
|
|
122
|
-
return [3 /*break*/, 4];
|
|
123
|
-
return [4 /*yield*/, timer_utils_1.TimerUtils.sleep(this.SLEEP_BETWEEN_RETRIES)];
|
|
124
|
-
case 3:
|
|
125
|
-
_a.sent();
|
|
126
|
-
return [3 /*break*/, 1];
|
|
127
|
-
case 4: return [2 /*return*/, response];
|
|
128
|
-
}
|
|
129
|
-
});
|
|
71
|
+
}
|
|
72
|
+
getExcludedTestsAsync(callback) {
|
|
73
|
+
this.getExcludedTests().then(excludedTests => callback(excludedTests));
|
|
74
|
+
}
|
|
75
|
+
getTestRecommendation() {
|
|
76
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
77
|
+
let response;
|
|
78
|
+
let retries = 0;
|
|
79
|
+
while (true) {
|
|
80
|
+
response = yield this.backendProxy.getTestsRecommendation(this.buildSessionId, this.testStage, this.testGroupId);
|
|
81
|
+
retries++;
|
|
82
|
+
this.logger.debug(`Test recommendation status is ${response.recommendationSetStatus} retry ${retries}/${this.MAX_RETRIES}`);
|
|
83
|
+
if (retries >= this.MAX_RETRIES || !this.isRecommendationsEnabledAndNotReady(response))
|
|
84
|
+
break;
|
|
85
|
+
yield timer_utils_1.TimerUtils.sleep(this.SLEEP_BETWEEN_RETRIES);
|
|
86
|
+
}
|
|
87
|
+
return response;
|
|
130
88
|
});
|
|
131
|
-
}
|
|
132
|
-
|
|
89
|
+
}
|
|
90
|
+
isRecommendationsEnabledAndNotReady(response) {
|
|
133
91
|
return response && response.testSelectionEnabled !== false && response.recommendationSetStatus == contracts_1.RecommendationSetStatus.NOT_READY;
|
|
134
|
-
}
|
|
135
|
-
|
|
136
|
-
this.logger.info(
|
|
92
|
+
}
|
|
93
|
+
logExcludedTests(excludedTests) {
|
|
94
|
+
this.logger.info(`${excludedTests.length} tests will be excluded`);
|
|
137
95
|
if (this.logger.isDebugEnabled()) {
|
|
138
|
-
this.logger.debug(
|
|
96
|
+
this.logger.debug(`The following tests will be excluded: ${JSON.stringify(excludedTests)}`);
|
|
139
97
|
}
|
|
140
|
-
}
|
|
141
|
-
|
|
98
|
+
}
|
|
99
|
+
isSelectionEnabled(response) {
|
|
142
100
|
if (response.recommendationSetStatus === contracts_1.RecommendationSetStatus.NOT_READY) {
|
|
143
101
|
cockpit_notifier_1.CockpitNotifier.sendGenericMessage('Test recommendation request timed out. Recommendations will be ignored');
|
|
144
102
|
this.eventsProcess.testSelectionStatus = events_contracts_1.TestSelectionStatus.RECOMMENDATIONS_NOT_AVAILABLE;
|
|
@@ -155,16 +113,15 @@ var TestRecommendationHandler = /** @class */ (function () {
|
|
|
155
113
|
return false;
|
|
156
114
|
}
|
|
157
115
|
return true;
|
|
158
|
-
}
|
|
159
|
-
|
|
116
|
+
}
|
|
117
|
+
shouldGetRecommendation() {
|
|
160
118
|
if (this.enforceFullRun) {
|
|
161
119
|
cockpit_notifier_1.CockpitNotifier.sendGenericMessage('Test recommendation disabled by configuration');
|
|
162
120
|
this.eventsProcess.testSelectionStatus = events_contracts_1.TestSelectionStatus.DISABLED_BY_CONFIGURATION;
|
|
163
121
|
return false;
|
|
164
122
|
}
|
|
165
123
|
return true;
|
|
166
|
-
}
|
|
167
|
-
|
|
168
|
-
}());
|
|
124
|
+
}
|
|
125
|
+
}
|
|
169
126
|
exports.TestRecommendationHandler = TestRecommendationHandler;
|
|
170
127
|
//# sourceMappingURL=test-recommendation-handler.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"test-recommendation-handler.js","sourceRoot":"","sources":["../../test-listener/test-recommendation-handler.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"test-recommendation-handler.js","sourceRoot":"","sources":["../../test-listener/test-recommendation-handler.ts"],"names":[],"mappings":";;;;;;;;;;;;AAMA,uEAAiE;AACjE,wDAA+F;AAC/F,gFAAgF;AAChF,8EAAwE;AAExE,6DAAyD;AAGzD,MAAa,yBAAyB;IAWlC,YAAY,YAA0B,EAAE,aAA2B,EAAE,MAAc,EAAE,YAAwC;QAHrH,0BAAqB,GAAG,IAAI,CAAC;QAC7B,gBAAW,GAAG,EAAE,CAAC;QAGrB,kCAAe,CAAC,oBAAoB,CAAC,YAAY,EAAE,cAAc,CAAC,CAAC;QACnE,kCAAe,CAAC,oBAAoB,CAAC,aAAa,EAAE,eAAe,CAAC,CAAC;QACrE,kCAAe,CAAC,oBAAoB,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC;QAEvD,kCAAe,CAAC,oBAAoB,CAAC,YAAY,CAAC,cAAc,EAAE,gBAAgB,CA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AAC,aAAa,CAAC,mBAAmB,GAAG,sCAAmB,CAAC,QAAQ,CAAC;YACtE,OAAO,KAAK,CAAC;SAChB;QACD,OAAO,IAAI,CAAC;IAChB,CAAC;IAEO,uBAAuB;QAC3B,IAAG,IAAI,CAAC,cAAc,EAAC;YACnB,kCAAe,CAAC,kBAAkB,CAAC,+CAA+C,CAAC,CAAC;YACpF,IAAI,CAAC,aAAa,CAAC,mBAAmB,GAAG,sCAAmB,CAAC,yBAAyB,CAAC;YACvF,OAAO,KAAK,CAAC;SAChB;QACD,OAAO,IAAI,CAAA;IACf,CAAC;CACJ;AAxHD,8DAwHC"}
|
|
@@ -1,30 +1,30 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.UploadReportHandler = void 0;
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
4
|
+
const path = require("path");
|
|
5
|
+
const fs = require("fs");
|
|
6
|
+
const async = require("async");
|
|
7
|
+
const logger_1 = require("../common/logger");
|
|
8
|
+
class UploadReportHandler {
|
|
9
|
+
constructor(args, backendProxy, agentData) {
|
|
10
10
|
this.reportRequest = args;
|
|
11
11
|
this.backendProxy = backendProxy;
|
|
12
12
|
this.agentData = agentData;
|
|
13
13
|
this.logger = logger_1.LoggerFactory.getCreateApplicationLogger();
|
|
14
14
|
}
|
|
15
|
-
|
|
16
|
-
var _this = this;
|
|
15
|
+
upload(callback) {
|
|
17
16
|
try {
|
|
18
|
-
|
|
19
|
-
if (
|
|
20
|
-
throw
|
|
17
|
+
const files = this.getAllFiles(this.reportRequest.reportFile, this.reportRequest.reportFilesFolder);
|
|
18
|
+
if (files.length == 0) {
|
|
19
|
+
throw `Couldn't find any reports files in '${this.reportRequest.reportFilesFolder}'.
|
|
20
|
+
Please specify a folder with valid report files. 'UploadReport' action was aborted`;
|
|
21
21
|
}
|
|
22
|
-
|
|
23
|
-
async.forEachLimit(
|
|
24
|
-
|
|
22
|
+
const context = this;
|
|
23
|
+
async.forEachLimit(files.slice(0, -1), 1, (reportFile, next) => {
|
|
24
|
+
const agentData = this.agentData;
|
|
25
25
|
agentData.hasMoreRequests = true;
|
|
26
|
-
|
|
27
|
-
|
|
26
|
+
const requestBody = this.createRequestBody(agentData, reportFile);
|
|
27
|
+
this.backendProxy.uploadReport(requestBody, (err) => {
|
|
28
28
|
if (err) {
|
|
29
29
|
next(err);
|
|
30
30
|
}
|
|
@@ -36,9 +36,9 @@ var UploadReportHandler = /** @class */ (function () {
|
|
|
36
36
|
if (err) {
|
|
37
37
|
return callback(err);
|
|
38
38
|
}
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
39
|
+
const lastFile = files[files.length - 1];
|
|
40
|
+
const requestBody = context.createRequestBody(context.agentData, lastFile);
|
|
41
|
+
context.backendProxy.uploadReport(requestBody, (err) => {
|
|
42
42
|
if (err) {
|
|
43
43
|
callback(err);
|
|
44
44
|
}
|
|
@@ -51,23 +51,22 @@ var UploadReportHandler = /** @class */ (function () {
|
|
|
51
51
|
catch (err) {
|
|
52
52
|
callback(err);
|
|
53
53
|
}
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
|
|
54
|
+
}
|
|
55
|
+
createRequestBody(agentData, reportFile) {
|
|
56
|
+
const requestBody = {
|
|
57
57
|
agentData: agentData,
|
|
58
58
|
reportFile: reportFile
|
|
59
59
|
};
|
|
60
60
|
return requestBody;
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
var files = [];
|
|
61
|
+
}
|
|
62
|
+
getAllFiles(reportFiles, reportFilesFolders) {
|
|
63
|
+
const files = [];
|
|
65
64
|
// handle reportFilesFolders
|
|
66
|
-
reportFilesFolders.forEach(
|
|
65
|
+
reportFilesFolders.forEach((reportFilesFolder) => {
|
|
67
66
|
try {
|
|
68
|
-
|
|
67
|
+
const folderFiles = fs.readdirSync(reportFilesFolder);
|
|
69
68
|
folderFiles.forEach(function (folderFileName) {
|
|
70
|
-
|
|
69
|
+
const stat = fs.statSync(path.join(reportFilesFolder, folderFileName));
|
|
71
70
|
if (stat.isFile()) {
|
|
72
71
|
files.push({ filename: folderFileName, buffer: fs.readFileSync(path.join(reportFilesFolder, folderFileName)) });
|
|
73
72
|
}
|
|
@@ -77,21 +76,20 @@ var UploadReportHandler = /** @class */ (function () {
|
|
|
77
76
|
});
|
|
78
77
|
}
|
|
79
78
|
catch (err) {
|
|
80
|
-
|
|
79
|
+
this.logger.error('[UPLOAD REPORTS] Failed Reading Folder: ' + reportFilesFolder);
|
|
81
80
|
}
|
|
82
81
|
});
|
|
83
82
|
// handle reportFiles
|
|
84
|
-
reportFiles.forEach(
|
|
83
|
+
reportFiles.forEach((reportFilePath) => {
|
|
85
84
|
if (fs.existsSync(reportFilePath)) {
|
|
86
85
|
files.push({ filename: path.basename(reportFilePath), buffer: fs.readFileSync(reportFilePath) });
|
|
87
86
|
}
|
|
88
87
|
else {
|
|
89
|
-
|
|
88
|
+
this.logger.error('[UPLOAD REPORTS] reportFile doesn\'t exist. report file: ' + reportFilePath);
|
|
90
89
|
}
|
|
91
90
|
});
|
|
92
91
|
return files;
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
}());
|
|
92
|
+
}
|
|
93
|
+
}
|
|
96
94
|
exports.UploadReportHandler = UploadReportHandler;
|
|
97
95
|
//# sourceMappingURL=upload-report-handler.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"upload-report-handler.js","sourceRoot":"","sources":["../../test-listener/upload-report-handler.ts"],"names":[],"mappings":";;;AAAA,
|
|
1
|
+
{"version":3,"file":"upload-report-handler.js","sourceRoot":"","sources":["../../test-listener/upload-report-handler.ts"],"names":[],"mappings":";;;AAAA,6BAA6B;AAC7B,yBAAyB;AACzB,+BAAgC;AAChC,6CAA+C;AAI/C,MAAa,mBAAmB;IAM5B,YAAY,IAAyB,EAAE,YAA0B,EAAE,SAAoB;QACnF,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AC,KAAK,CAAC,mBAAmB,GAAG,cAAc,GAAG,8BAA8B,CAAC,CAAA;qBAC3F;gBACL,CAAC,CAAC,CAAC;aACN;YACD,OAAO,GAAG,EAAE;gBACR,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,0CAA0C,GAAG,iBAAiB,CAAC,CAAA;aACpF;QACL,CAAC,CAAC,CAAC;QAEH,qBAAqB;QACrB,WAAW,CAAC,OAAO,CAAC,CAAC,cAAc,EAAC,EAAE;YAClC,IAAI,EAAE,CAAC,UAAU,CAAC,cAAc,CAAC,EAAE;gBAC/B,KAAK,CAAC,IAAI,CAAC,EAAC,QAAQ,EAAE,IAAI,CAAC,QAAQ,CAAC,cAAc,CAAC,EAAE,MAAM,EAAE,EAAE,CAAC,YAAY,CAAC,cAAc,CAAC,EAAC,CAAC,CAAC;aAClG;iBACI;gBACD,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,2DAA2D,GAAG,cAAc,CAAC,CAAA;aAClG;QACL,CAAC,CAAC,CAAC;QAEH,OAAO,KAAK,CAAC;IACjB,CAAC;CACJ;AA/FD,kDA+FC"}
|
|
@@ -4,12 +4,12 @@ exports.Utils = void 0;
|
|
|
4
4
|
/**
|
|
5
5
|
* Created by nadav on 21/03/2017.
|
|
6
6
|
*/
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
7
|
+
const jwtDecode = require("jwt-decode");
|
|
8
|
+
class Utils {
|
|
9
|
+
constructor() {
|
|
10
10
|
this.JWTPrefix = 'eyJhbGciOiJSUzUxMiIsInR5cCI6IkpXVCJ9.';
|
|
11
11
|
}
|
|
12
|
-
|
|
12
|
+
parseToken(parsedToken, parsedArgs) {
|
|
13
13
|
try {
|
|
14
14
|
if (parsedArgs.customerid && parsedArgs.customerid.indexOf(this.JWTPrefix) == 0) {
|
|
15
15
|
parsedToken = parsedArgs.customerid;
|
|
@@ -18,15 +18,15 @@ var Utils = /** @class */ (function () {
|
|
|
18
18
|
if (!parsedToken) {
|
|
19
19
|
throw new Error('Token Must Be Given');
|
|
20
20
|
}
|
|
21
|
-
|
|
21
|
+
const tokenData = jwtDecode(parsedToken);
|
|
22
22
|
if (!tokenData['x-sl-server']) {
|
|
23
23
|
throw new Error('Doesn\'t Contain Server');
|
|
24
24
|
}
|
|
25
25
|
if (!tokenData['subject']) {
|
|
26
26
|
throw new Error('Doesn\'t Contain Subject');
|
|
27
27
|
}
|
|
28
|
-
|
|
29
|
-
|
|
28
|
+
let customerId = tokenData['subject'];
|
|
29
|
+
const subjectParts = tokenData['subject'].split('@');
|
|
30
30
|
if (subjectParts.length >= 1) {
|
|
31
31
|
customerId = subjectParts[0];
|
|
32
32
|
}
|
|
@@ -38,8 +38,8 @@ var Utils = /** @class */ (function () {
|
|
|
38
38
|
console.error('Token Is Invalid. ' + err);
|
|
39
39
|
parsedArgs.isValidToken = false;
|
|
40
40
|
}
|
|
41
|
-
}
|
|
42
|
-
|
|
41
|
+
}
|
|
42
|
+
resolveLabId(labId, env, appName) {
|
|
43
43
|
if (labId) {
|
|
44
44
|
return labId;
|
|
45
45
|
}
|
|
@@ -50,8 +50,8 @@ var Utils = /** @class */ (function () {
|
|
|
50
50
|
return appName;
|
|
51
51
|
}
|
|
52
52
|
return 'DefaultLabId';
|
|
53
|
-
}
|
|
54
|
-
|
|
53
|
+
}
|
|
54
|
+
resolveTestStage(testStage, env, labId) {
|
|
55
55
|
if (testStage) {
|
|
56
56
|
return testStage;
|
|
57
57
|
}
|
|
@@ -62,8 +62,7 @@ var Utils = /** @class */ (function () {
|
|
|
62
62
|
return labId;
|
|
63
63
|
}
|
|
64
64
|
return 'Unit Tests';
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
}());
|
|
65
|
+
}
|
|
66
|
+
}
|
|
68
67
|
exports.Utils = Utils;
|
|
69
68
|
//# sourceMappingURL=utils.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../test-listener/utils.ts"],"names":[],"mappings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AAO,CAAC,KAAK,CAAC,oBAAoB,GAAG,GAAG,CAAC,CAAC;YAC1C,UAAU,CAAC,YAAY,GAAG,KAAK,CAAC;SACnC;IACL,CAAC;IAEM,YAAY,CAAC,KAAK,EAAE,GAAG,EAAE,OAAO;QACnC,IAAI,KAAK,EAAE;YACP,OAAO,KAAK,CAAC;SAChB;QACD,IAAI,GAAG,EAAE;YACL,OAAO,GAAG,CAAC;SACd;QACD,IAAI,OAAO,EAAE;YACT,OAAO,OAAO,CAAC;SAClB;QACD,OAAO,cAAc,CAAC;IAC1B,CAAC;IAEM,gBAAgB,CAAC,SAAS,EAAE,GAAG,EAAE,KAAK;QACzC,IAAI,SAAS,EAAE;YACX,OAAO,SAAS,CAAC;SACpB;QACD,IAAI,GAAG,EAAE;YACL,OAAO,GAAG,CAAC;SACd;QACD,IAAI,KAAK,EAAE,EAAE,sDAAsD;YAC/D,OAAO,KAAK,CAAC;SAChB;QACD,OAAO,YAAY,CAAC;IACxB,CAAC;CACJ;AA3DD,sBA2DC"}
|
|
@@ -1,15 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.UUID = void 0;
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
UUID.newGuid = function (str) {
|
|
9
|
-
var out = crypto.createHash('sha1').update(str).digest();
|
|
4
|
+
const crypto = require("crypto");
|
|
5
|
+
class UUID {
|
|
6
|
+
static newGuid(str) {
|
|
7
|
+
const out = crypto.createHash('sha1').update(str).digest();
|
|
10
8
|
out[8] = out[8] & 0x3f | 0xa0; // set variant
|
|
11
9
|
out[6] = out[6] & 0x0f | 0x50; // set version
|
|
12
|
-
|
|
10
|
+
const hex = out.toString('hex', 0, 16);
|
|
13
11
|
return [
|
|
14
12
|
hex.substring(0, 8),
|
|
15
13
|
hex.substring(8, 12),
|
|
@@ -17,8 +15,7 @@ var UUID = /** @class */ (function () {
|
|
|
17
15
|
hex.substring(16, 20),
|
|
18
16
|
hex.substring(20, 32),
|
|
19
17
|
].join('-');
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
}());
|
|
18
|
+
}
|
|
19
|
+
}
|
|
23
20
|
exports.UUID = UUID;
|
|
24
21
|
//# sourceMappingURL=uuid.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"uuid.js","sourceRoot":"","sources":["../../test-listener/uuid.ts"],"names":[],"mappings":";;;AAAA
|
|
1
|
+
{"version":3,"file":"uuid.js","sourceRoot":"","sources":["../../test-listener/uuid.ts"],"names":[],"mappings":";;;AAAA,iCAAkC;AAElC,MAAa,IAAI;IACN,MAAM,CAAC,OAAO,CAAC,GAAW;QAC7B,MAAM,GAAG,GAAG,MAAM,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,CAAC;QAE3D,GAAG,CAAC,CAAC,CAAC,GAAG,GAAG,CAAC,CAAC,CAAC,GAAG,IAAI,GAAG,IAAI,CAAC,CAAC,cAAc;QAC7C,GAAG,CAAC,CAAC,CAAC,GAAG,GAAG,CAAC,CAAC,CAAC,GAAG,IAAI,GAAG,IAAI,CAAC,CAAC,cAAc;QAE7C,MAAM,GAAG,GAAG,GAAG,CAAC,QAAQ,CAAC,KAAK,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC;QAEvC,OAAO;YACH,GAAG,CAAC,SAAS,CAAC,CAAC,EAAE,CAAC,CAAC;YACnB,GAAG,CAAC,SAAS,CAAC,CAAC,EAAE,EAAE,CAAC;YACpB,GAAG,CAAC,SAAS,CAAC,EAAE,EAAE,EAAE,CAAC;YACrB,GAAG,CAAC,SAAS,CAAC,EAAE,EAAE,EAAE,CAAC;YACrB,GAAG,CAAC,SAAS,CAAC,EAAE,EAAE,EAAE,CAAC;SACxB,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IAChB,CAAC;CACJ;AAjBD,oBAiBC"}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.WaitForMultipleCallbacks = void 0;
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
class WaitForMultipleCallbacks {
|
|
5
|
+
constructor() {
|
|
6
6
|
this.processStatuses = {};
|
|
7
7
|
}
|
|
8
|
-
|
|
8
|
+
waitForAll(callback) {
|
|
9
9
|
if (this.checkCompletion())
|
|
10
10
|
return callback(); //Already done (happens when all callbacks have been synchronously called)
|
|
11
11
|
else {
|
|
@@ -14,7 +14,7 @@ var WaitForMultipleCallbacks = /** @class */ (function () {
|
|
|
14
14
|
}
|
|
15
15
|
this.completionCallback = callback; //Not done yet. This callback will be invoked later in checkCompletionAndFireCallback()
|
|
16
16
|
}
|
|
17
|
-
}
|
|
17
|
+
}
|
|
18
18
|
/**
|
|
19
19
|
* Creates a named callback and waits for it to finish (asynchronously)
|
|
20
20
|
* @param {string} name
|
|
@@ -22,25 +22,24 @@ var WaitForMultipleCallbacks = /** @class */ (function () {
|
|
|
22
22
|
*
|
|
23
23
|
* @memberOf WaitForMultipleCallbacks
|
|
24
24
|
*/
|
|
25
|
-
|
|
26
|
-
var _this = this;
|
|
25
|
+
getCallbackForProcess(name) {
|
|
27
26
|
if (this.processStatuses.hasOwnProperty(name))
|
|
28
27
|
throw new Error('Duplicate process name: ' + name);
|
|
29
28
|
this.processStatuses[name] = false;
|
|
30
|
-
return
|
|
31
|
-
|
|
32
|
-
|
|
29
|
+
return () => {
|
|
30
|
+
this.processStatuses[name] = true;
|
|
31
|
+
this.checkCompletionAndFireCallback();
|
|
33
32
|
};
|
|
34
|
-
}
|
|
35
|
-
|
|
33
|
+
}
|
|
34
|
+
checkCompletionAndFireCallback() {
|
|
36
35
|
if (this.checkCompletion()) {
|
|
37
36
|
if (this.completionCallback) {
|
|
38
|
-
|
|
37
|
+
const cb = this.completionCallback;
|
|
39
38
|
this.completionCallback = null;
|
|
40
39
|
cb();
|
|
41
40
|
}
|
|
42
41
|
}
|
|
43
|
-
}
|
|
42
|
+
}
|
|
44
43
|
/**
|
|
45
44
|
* Checks if all callbacks have been called
|
|
46
45
|
*
|
|
@@ -48,14 +47,13 @@ var WaitForMultipleCallbacks = /** @class */ (function () {
|
|
|
48
47
|
*
|
|
49
48
|
* @memberOf WaitForMultipleCallbacks
|
|
50
49
|
*/
|
|
51
|
-
|
|
52
|
-
for (
|
|
53
|
-
if (this.processStatuses[
|
|
50
|
+
checkCompletion() {
|
|
51
|
+
for (const name in this.processStatuses) {
|
|
52
|
+
if (this.processStatuses[name] === false)
|
|
54
53
|
return false;
|
|
55
54
|
}
|
|
56
55
|
return true; //All done
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
}());
|
|
56
|
+
}
|
|
57
|
+
}
|
|
60
58
|
exports.WaitForMultipleCallbacks = WaitForMultipleCallbacks;
|
|
61
59
|
//# sourceMappingURL=wait-for-multiple-callbacks.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"wait-for-multiple-callbacks.js","sourceRoot":"","sources":["../../test-listener/wait-for-multiple-callbacks.ts"],"names":[],"mappings":";;;AAAA;
|
|
1
|
+
{"version":3,"file":"wait-for-multiple-callbacks.js","sourceRoot":"","sources":["../../test-listener/wait-for-multiple-callbacks.ts"],"names":[],"mappings":";;;AAAA,MAAa,wBAAwB;IAArC;QA+BY,oBAAe,GAAgC,EAAE,CAAC;IAyB9D,CAAC;IAtDU,UAAU,CAAC,QAAoB;QAClC,IAAI,IAAI,CAAC,eAAe,EAAE;YACtB,OAAO,QAAQ,EAAE,CAAC,CAAC,0EAA0E;aAC5F;YACD,IAAI,IAAI,CAAC,kBAAkB,EAAE;gBACzB,MAAM,IAAI,KAAK,CAAC,sBAAsB,CAAC,CAAC;aAC3C;YAED,IAAI,CAAC,kBAAkB,GAAG,QAAQ,CAAC,CAAC,uFAAuF;SAC9H;IACL,CAAC;IAED;;;;;;OAMG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