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,91 +8,57 @@ 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.BackendProxy = void 0;
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
13
|
+
const contracts_1 = require("./contracts");
|
|
14
|
+
const http_client_1 = require("./http-client");
|
|
15
|
+
const sl_routes_1 = require("./sl-routes");
|
|
16
|
+
const validation_utils_1 = require("../utils/validation-utils");
|
|
17
|
+
const entities_mapper_1 = require("./entities-mapper");
|
|
18
|
+
const constants_1 = require("../constants/constants");
|
|
19
|
+
const sl_env_vars_1 = require("../constants/sl-env-vars");
|
|
20
|
+
const timer_utils_1 = require("../utils/timer-utils");
|
|
21
|
+
class BackendProxy {
|
|
49
22
|
// TODO: get httpClient in constructor always
|
|
50
|
-
|
|
23
|
+
constructor(agentInstanceData, config, logger, httpClient) {
|
|
51
24
|
this.agentInstanceData = agentInstanceData;
|
|
52
25
|
this.config = config;
|
|
53
26
|
this.logger = logger;
|
|
54
27
|
this.client = httpClient || new http_client_1.HttpClient(this.config, this.logger);
|
|
55
28
|
}
|
|
56
|
-
|
|
57
|
-
var _this = this;
|
|
29
|
+
getBuildSession(buildSessionId, callback) {
|
|
58
30
|
validation_utils_1.ValidationUtils.verifyNotNullOrEmpty(buildSessionId, constants_1.Constants.BUILD_SESSION_ID);
|
|
59
|
-
|
|
60
|
-
this.client.get(url,
|
|
61
|
-
|
|
31
|
+
const url = sl_routes_1.SLRoutes.buildSessionV2(buildSessionId);
|
|
32
|
+
this.client.get(url, (err, body) => {
|
|
33
|
+
this.invokeCallback(callback, err, body);
|
|
62
34
|
});
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
var _this = this;
|
|
35
|
+
}
|
|
36
|
+
createBuildSessionId(request, callback) {
|
|
66
37
|
validation_utils_1.ValidationUtils.verifyNotNullOrEmpty(request, constants_1.Constants.REQUEST);
|
|
67
|
-
|
|
68
|
-
this.client.post(request, url,
|
|
69
|
-
|
|
38
|
+
const url = sl_routes_1.SLRoutes.buildSessionV2();
|
|
39
|
+
this.client.post(request, url, (err, body) => {
|
|
40
|
+
this.invokeCallback(callback, err, body, entities_mapper_1.EntitiesMapper.toCreateBuildSessionIdResponse);
|
|
70
41
|
});
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
return
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
}
|
|
84
|
-
return resolve(body);
|
|
85
|
-
});
|
|
86
|
-
})];
|
|
42
|
+
}
|
|
43
|
+
createBuildSessionIdPromise(request) {
|
|
44
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
45
|
+
validation_utils_1.ValidationUtils.verifyNotNullOrEmpty(request, constants_1.Constants.REQUEST);
|
|
46
|
+
const url = constants_1.Constants.PULL_REQUEST_PARAMS in request ? sl_routes_1.SLRoutes.prBuildSession() : sl_routes_1.SLRoutes.buildSessionV2();
|
|
47
|
+
return new Promise((resolve, reject) => {
|
|
48
|
+
this.client.post(request, url, (err, body) => {
|
|
49
|
+
if (err) {
|
|
50
|
+
return reject(err);
|
|
51
|
+
}
|
|
52
|
+
return resolve(body);
|
|
53
|
+
});
|
|
87
54
|
});
|
|
88
55
|
});
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
var _this = this;
|
|
56
|
+
}
|
|
57
|
+
getRecommendedVersion(request) {
|
|
92
58
|
validation_utils_1.ValidationUtils.verifyNotNullOrEmpty(request, constants_1.Constants.REQUEST);
|
|
93
|
-
|
|
94
|
-
return new Promise(
|
|
95
|
-
|
|
59
|
+
const url = sl_routes_1.SLRoutes.recommendedAgentV2(request.componentName, request.customerId, request.appName, request.branchName, request.testStage);
|
|
60
|
+
return new Promise((resolve, reject) => {
|
|
61
|
+
this.client.get(url, (err, body) => {
|
|
96
62
|
if (err) {
|
|
97
63
|
return reject(err);
|
|
98
64
|
}
|
|
@@ -104,256 +70,212 @@ var BackendProxy = /** @class */ (function () {
|
|
|
104
70
|
}
|
|
105
71
|
});
|
|
106
72
|
});
|
|
107
|
-
}
|
|
108
|
-
|
|
73
|
+
}
|
|
74
|
+
submitBuildMapping(request) {
|
|
109
75
|
validation_utils_1.ValidationUtils.verifyNotNullOrEmpty(request, constants_1.Constants.REQUEST);
|
|
110
|
-
|
|
76
|
+
const url = sl_routes_1.SLRoutes.buildMappingV4();
|
|
111
77
|
return this.submitPostRequestWithRetries(request, url);
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
var _this = this;
|
|
78
|
+
}
|
|
79
|
+
submitLogs(request, callback) {
|
|
115
80
|
validation_utils_1.ValidationUtils.verifyNotNullOrEmpty(request, constants_1.Constants.REQUEST);
|
|
116
|
-
|
|
117
|
-
this.client.post(request, url,
|
|
118
|
-
|
|
81
|
+
const url = sl_routes_1.SLRoutes.logSubmissionV2();
|
|
82
|
+
this.client.post(request, url, (err, body) => {
|
|
83
|
+
this.invokeCallback(callback, err, body);
|
|
119
84
|
});
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
var _this = this;
|
|
85
|
+
}
|
|
86
|
+
getRemoteConfig(request, callback) {
|
|
123
87
|
validation_utils_1.ValidationUtils.verifyNotNullOrEmpty(request, constants_1.Constants.REQUEST);
|
|
124
|
-
|
|
125
|
-
this.client.get(url,
|
|
126
|
-
|
|
88
|
+
const url = sl_routes_1.SLRoutes.configV3(this.agentInstanceData, request.appName, request.branch, request.build, request.testStage, request.labId);
|
|
89
|
+
this.client.get(url, (err, body) => {
|
|
90
|
+
this.invokeCallback(callback, err, body);
|
|
127
91
|
});
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
var _this = this;
|
|
92
|
+
}
|
|
93
|
+
getRemoteConfigPromise(request) {
|
|
131
94
|
validation_utils_1.ValidationUtils.verifyNotNullOrEmpty(request, constants_1.Constants.REQUEST);
|
|
132
|
-
return new Promise(
|
|
133
|
-
|
|
134
|
-
|
|
95
|
+
return new Promise((resolve, reject) => {
|
|
96
|
+
const url = sl_routes_1.SLRoutes.configV3(this.agentInstanceData, request.appName, request.branch, request.build, request.testStage, request.labId);
|
|
97
|
+
this.client.get(url, (err, body) => {
|
|
135
98
|
if (err) {
|
|
136
99
|
reject(err);
|
|
137
100
|
}
|
|
138
101
|
resolve(body);
|
|
139
102
|
});
|
|
140
103
|
});
|
|
141
|
-
}
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
_this.invokeCallback(callback, err, body);
|
|
104
|
+
}
|
|
105
|
+
startExecution(request, callback) {
|
|
106
|
+
const url = sl_routes_1.SLRoutes.testExecution();
|
|
107
|
+
this.client.post(request, url, (err, body) => {
|
|
108
|
+
this.invokeCallback(callback, err, body);
|
|
147
109
|
});
|
|
148
|
-
}
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
_this.client.post(request, url, function (err) {
|
|
110
|
+
}
|
|
111
|
+
startColoredExecution(request) {
|
|
112
|
+
return new Promise((resolve, reject) => {
|
|
113
|
+
const url = sl_routes_1.SLRoutes.testExecution();
|
|
114
|
+
this.client.post(request, url, (err) => {
|
|
154
115
|
if (err) {
|
|
155
116
|
reject(err);
|
|
156
117
|
}
|
|
157
118
|
resolve();
|
|
158
119
|
});
|
|
159
120
|
});
|
|
160
|
-
}
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
var url = sl_routes_1.SLRoutes.testExecutionV4(labId);
|
|
166
|
-
_this.client.get(url, function (err, body) {
|
|
121
|
+
}
|
|
122
|
+
testExecutionV4(labId, async = true, executionId) {
|
|
123
|
+
return new Promise((resolve, reject) => {
|
|
124
|
+
const url = sl_routes_1.SLRoutes.testExecutionV4(labId);
|
|
125
|
+
this.client.get(url, (err, body) => {
|
|
167
126
|
if (err) {
|
|
168
127
|
reject(err);
|
|
169
128
|
}
|
|
170
129
|
resolve(body);
|
|
171
130
|
}, false, async);
|
|
172
131
|
});
|
|
173
|
-
}
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
_this.invokeCallback(callback, err, body);
|
|
132
|
+
}
|
|
133
|
+
uploadReport(request, callback) {
|
|
134
|
+
const url = sl_routes_1.SLRoutes.externalData();
|
|
135
|
+
this.client.postMultipart(request, url, (err, body) => {
|
|
136
|
+
this.invokeCallback(callback, err, body);
|
|
179
137
|
});
|
|
180
|
-
}
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
_this.invokeCallback(callback, err, body);
|
|
138
|
+
}
|
|
139
|
+
externalReport(request, callback) {
|
|
140
|
+
const url = sl_routes_1.SLRoutes.externalReport();
|
|
141
|
+
this.client.post(request, url, (err, body) => {
|
|
142
|
+
this.invokeCallback(callback, err, body);
|
|
186
143
|
});
|
|
187
|
-
}
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
_this.invokeCallback(callback, err, body);
|
|
144
|
+
}
|
|
145
|
+
endExecution(request, callback) {
|
|
146
|
+
const url = sl_routes_1.SLRoutes.endExecution(request.customerId, request.appName, request.buildName, request.branchName, request.environment);
|
|
147
|
+
const body = request.executionIds ? { executionIds: request.executionIds } : null;
|
|
148
|
+
this.client.delete(body, url, (err, body) => {
|
|
149
|
+
this.invokeCallback(callback, err, body);
|
|
194
150
|
});
|
|
195
|
-
}
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
_this.client.delete(body, url, function (err) {
|
|
151
|
+
}
|
|
152
|
+
endExecutionPromise(request) {
|
|
153
|
+
const url = sl_routes_1.SLRoutes.endExecution(request.customerId, request.appName, request.buildName, request.branchName, request.environment);
|
|
154
|
+
const body = request.executionIds ? { executionIds: request.executionIds } : null;
|
|
155
|
+
return new Promise((resolve, reject) => {
|
|
156
|
+
this.client.delete(body, url, (err) => {
|
|
202
157
|
err ? reject(err) : resolve();
|
|
203
158
|
});
|
|
204
159
|
});
|
|
205
|
-
}
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
var url = sl_routes_1.SLRoutes.eventsV2();
|
|
160
|
+
}
|
|
161
|
+
submitEvents(packetToSend, callback, async = true) {
|
|
162
|
+
const url = sl_routes_1.SLRoutes.eventsV2();
|
|
209
163
|
this.client.post(packetToSend, url, callback);
|
|
210
|
-
}
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
_this.client.post(packetToSend, url, function (err) {
|
|
164
|
+
}
|
|
165
|
+
submitEventsPromise(packetToSend) {
|
|
166
|
+
return new Promise((resolve, reject) => {
|
|
167
|
+
const url = sl_routes_1.SLRoutes.eventsV2();
|
|
168
|
+
this.client.post(packetToSend, url, err => {
|
|
216
169
|
if (err) {
|
|
217
170
|
reject(err);
|
|
218
171
|
}
|
|
219
172
|
resolve();
|
|
220
173
|
});
|
|
221
174
|
});
|
|
222
|
-
}
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
_this.client.post(body, url, function (error, statusCode) {
|
|
229
|
-
_this.logger.debug("Blob ".concat(blobId, " uploaded with status code ").concat(statusCode));
|
|
175
|
+
}
|
|
176
|
+
submitBlobAsync(body, buildSessionId, blobId, blobType = 'unspecified') {
|
|
177
|
+
const url = sl_routes_1.SLRoutes.blobs(buildSessionId, blobId, blobType);
|
|
178
|
+
return new Promise((resolve, reject) => {
|
|
179
|
+
this.client.post(body, url, (error, statusCode) => {
|
|
180
|
+
this.logger.debug(`Blob ${blobId} uploaded with status code ${statusCode}`);
|
|
230
181
|
if (error) {
|
|
231
|
-
|
|
182
|
+
this.logger.error(`Error while submitting a blob, '${error}'`);
|
|
232
183
|
return reject(error);
|
|
233
184
|
}
|
|
234
185
|
else {
|
|
235
|
-
|
|
186
|
+
this.logger.info('blob submitted successfully');
|
|
236
187
|
return resolve({});
|
|
237
188
|
}
|
|
238
189
|
}, true, contracts_1.ContentType.OCTET_STREAM);
|
|
239
190
|
});
|
|
240
|
-
}
|
|
241
|
-
|
|
242
|
-
|
|
191
|
+
}
|
|
192
|
+
submitBlob(body, buildSessionId, blobId, callback) {
|
|
193
|
+
const url = sl_routes_1.SLRoutes.blobs(buildSessionId, blobId);
|
|
243
194
|
this.client.post(body, url, callback, true, contracts_1.ContentType.OCTET_STREAM);
|
|
244
|
-
}
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
url = sl_routes_1.SLRoutes.blobsForBsidAsJson(buildSessionId, blobType);
|
|
257
|
-
return [4 /*yield*/, this.submitGetRequestWithRetries(url)];
|
|
258
|
-
case 2:
|
|
259
|
-
slMapping = _a.sent();
|
|
260
|
-
return [3 /*break*/, 4];
|
|
261
|
-
case 3:
|
|
262
|
-
e_1 = _a.sent();
|
|
263
|
-
this.logger.error(e_1);
|
|
264
|
-
return [3 /*break*/, 4];
|
|
265
|
-
case 4: return [2 /*return*/, slMapping];
|
|
266
|
-
}
|
|
267
|
-
});
|
|
195
|
+
}
|
|
196
|
+
getBlobsAsJson(buildSessionId, blobType = 'unspecified') {
|
|
197
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
198
|
+
let slMapping = [];
|
|
199
|
+
try {
|
|
200
|
+
const url = sl_routes_1.SLRoutes.blobsForBsidAsJson(buildSessionId, blobType);
|
|
201
|
+
slMapping = yield this.submitGetRequestWithRetries(url);
|
|
202
|
+
}
|
|
203
|
+
catch (e) {
|
|
204
|
+
this.logger.error(e);
|
|
205
|
+
}
|
|
206
|
+
return slMapping;
|
|
268
207
|
});
|
|
269
|
-
}
|
|
270
|
-
|
|
271
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
272
|
-
return
|
|
273
|
-
return [2 /*return*/, this.getBlobsAsJson(buildSessionId, 'unspecified')];
|
|
274
|
-
});
|
|
208
|
+
}
|
|
209
|
+
getSlMappingFromServer(buildSessionId) {
|
|
210
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
211
|
+
return this.getBlobsAsJson(buildSessionId, 'unspecified');
|
|
275
212
|
});
|
|
276
|
-
}
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
_this.client.post(body, url, function (error, response) {
|
|
213
|
+
}
|
|
214
|
+
submitAgentEvent(body) {
|
|
215
|
+
const url = sl_routes_1.SLRoutes.agentEvents();
|
|
216
|
+
return new Promise((resolve, reject) => {
|
|
217
|
+
this.client.post(body, url, (error, response) => {
|
|
282
218
|
if (error) {
|
|
283
219
|
return reject(error);
|
|
284
220
|
}
|
|
285
221
|
return resolve();
|
|
286
222
|
});
|
|
287
223
|
});
|
|
288
|
-
}
|
|
289
|
-
|
|
290
|
-
|
|
224
|
+
}
|
|
225
|
+
getTestsRecommendation(buildSessionId, stage, testGroupId) {
|
|
226
|
+
const url = sl_routes_1.SLRoutes.testsRecommendations(buildSessionId, stage, testGroupId);
|
|
291
227
|
return this.submitGetRequestWithRetries(url, null, null, [400, 404], false);
|
|
292
|
-
}
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
return this.submitPutRequestWithRetries({ components
|
|
296
|
-
}
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
return this.submitDelRequestWithRetries({ components
|
|
300
|
-
}
|
|
301
|
-
|
|
228
|
+
}
|
|
229
|
+
addOrUpdateIntegrationBuildComponents(buildSessionId, components, agentId) {
|
|
230
|
+
const url = sl_routes_1.SLRoutes.integrationBuildComponents(buildSessionId);
|
|
231
|
+
return this.submitPutRequestWithRetries({ components, agentId }, url);
|
|
232
|
+
}
|
|
233
|
+
deleteIntegrationBuildComponents(buildSessionId, components, agentId) {
|
|
234
|
+
const url = sl_routes_1.SLRoutes.integrationBuildComponents(buildSessionId);
|
|
235
|
+
return this.submitDelRequestWithRetries({ components, agentId }, url);
|
|
236
|
+
}
|
|
237
|
+
buildEnd(data) {
|
|
302
238
|
return this.submitPostRequestWithRetries(data, sl_routes_1.SLRoutes.buildEnd());
|
|
303
|
-
}
|
|
304
|
-
|
|
305
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
url = sl_routes_1.SLRoutes.footprintsV6(executionBsid, testStage, buildSessionId);
|
|
313
|
-
return [2 /*return*/, this.submitPostRequestWithRetries(footprintsPacket, url, null, null, true, contracts_1.ContentType.OCTET_STREAM)];
|
|
314
|
-
});
|
|
239
|
+
}
|
|
240
|
+
submitFootprintsV6(footprintsPacket, executionBsid, testStage, buildSessionId) {
|
|
241
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
242
|
+
validation_utils_1.ValidationUtils.verifyNotNullOrEmpty(footprintsPacket, constants_1.Constants.FOOTPRINTS_PACKET);
|
|
243
|
+
validation_utils_1.ValidationUtils.verifyNotNullOrEmpty(executionBsid, constants_1.Constants.EXECUTION_BSID);
|
|
244
|
+
validation_utils_1.ValidationUtils.verifyNotNullOrEmpty(testStage, constants_1.Constants.TEST_STAGE);
|
|
245
|
+
validation_utils_1.ValidationUtils.verifyNotNullOrEmpty(buildSessionId, constants_1.Constants.BUILD_SESSION_ID);
|
|
246
|
+
const url = sl_routes_1.SLRoutes.footprintsV6(executionBsid, testStage, buildSessionId);
|
|
247
|
+
return this.submitPostRequestWithRetries(footprintsPacket, url, null, null, true, contracts_1.ContentType.OCTET_STREAM);
|
|
315
248
|
});
|
|
316
|
-
}
|
|
317
|
-
|
|
318
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
url = sl_routes_1.SLRoutes.footprintsToCollector(buildSessionId);
|
|
324
|
-
return [2 /*return*/, this.submitPostRequestWithRetries(footprintsPacket, url, null, null, true, contracts_1.ContentType.JSON)];
|
|
325
|
-
});
|
|
249
|
+
}
|
|
250
|
+
submitFootprintsToCollector(footprintsPacket, buildSessionId) {
|
|
251
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
252
|
+
validation_utils_1.ValidationUtils.verifyNotNullOrEmpty(footprintsPacket, constants_1.Constants.FOOTPRINTS_PACKET);
|
|
253
|
+
validation_utils_1.ValidationUtils.verifyNotNullOrEmpty(buildSessionId, constants_1.Constants.BUILD_SESSION_ID);
|
|
254
|
+
const url = sl_routes_1.SLRoutes.footprintsToCollector(buildSessionId);
|
|
255
|
+
return this.submitPostRequestWithRetries(footprintsPacket, url, null, null, true, contracts_1.ContentType.JSON);
|
|
326
256
|
});
|
|
327
|
-
}
|
|
328
|
-
|
|
329
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
err ? reject(err) : resolve(response);
|
|
335
|
-
});
|
|
336
|
-
})];
|
|
257
|
+
}
|
|
258
|
+
getBuildSessionData(buildSessionId) {
|
|
259
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
260
|
+
return new Promise((resolve, reject) => {
|
|
261
|
+
this.getBuildSession(buildSessionId, (err, response) => {
|
|
262
|
+
err ? reject(err) : resolve(response);
|
|
263
|
+
});
|
|
337
264
|
});
|
|
338
265
|
});
|
|
339
|
-
}
|
|
340
|
-
|
|
341
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
342
|
-
return
|
|
343
|
-
return [2 /*return*/, {}];
|
|
344
|
-
});
|
|
266
|
+
}
|
|
267
|
+
getRecommendedAgent(configuration) {
|
|
268
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
269
|
+
return {};
|
|
345
270
|
});
|
|
346
|
-
}
|
|
347
|
-
|
|
348
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
349
|
-
|
|
350
|
-
return
|
|
351
|
-
url = sl_routes_1.SLRoutes.activeBuildSessionId(labid);
|
|
352
|
-
return [2 /*return*/, this.submitGetRequestWithRetries(url)];
|
|
353
|
-
});
|
|
271
|
+
}
|
|
272
|
+
getBuildSessionDataFromLabId(labid) {
|
|
273
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
274
|
+
const url = sl_routes_1.SLRoutes.activeBuildSessionId(labid);
|
|
275
|
+
return this.submitGetRequestWithRetries(url);
|
|
354
276
|
});
|
|
355
|
-
}
|
|
356
|
-
|
|
277
|
+
}
|
|
278
|
+
invokeCallback(callback, err, body, map) {
|
|
357
279
|
validation_utils_1.ValidationUtils.verifyNotNullOrEmpty(callback, constants_1.Constants.CALLBACK);
|
|
358
280
|
if (err != null) {
|
|
359
281
|
return callback(err, body);
|
|
@@ -361,76 +283,55 @@ var BackendProxy = /** @class */ (function () {
|
|
|
361
283
|
if (map == null) {
|
|
362
284
|
return callback(null, body);
|
|
363
285
|
}
|
|
364
|
-
|
|
286
|
+
const apiResponse = map(body);
|
|
365
287
|
return callback(null, apiResponse);
|
|
366
|
-
}
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
return this.makeRequestWithRetries(
|
|
378
|
-
}
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
_a.label = 1;
|
|
394
|
-
case 1:
|
|
395
|
-
_a.trys.push([1, 3, , 4]);
|
|
396
|
-
retriesLeft--;
|
|
397
|
-
return [4 /*yield*/, new Promise(function (resolve, reject) {
|
|
398
|
-
doSingleRequest(function (err, body, statusCode) {
|
|
399
|
-
err ? reject({ err: err, statusCode: statusCode }) : resolve({ body: body, statusCode: statusCode }); //Always return status code
|
|
400
|
-
});
|
|
401
|
-
})];
|
|
402
|
-
case 2:
|
|
403
|
-
bodyAndStatusCode = _a.sent();
|
|
404
|
-
return [2 /*return*/, bodyAndStatusCode.body];
|
|
405
|
-
case 3:
|
|
406
|
-
errAndStatusCode_1 = _a.sent();
|
|
407
|
-
this.logger.info(errAndStatusCode_1);
|
|
408
|
-
lastError = errAndStatusCode_1.err;
|
|
409
|
-
if (!this.shouldRetryRequest(errAndStatusCode_1.statusCode, statusesForRetry)) {
|
|
410
|
-
return [3 /*break*/, 7]; //Non-retriable error, break do..while loop and
|
|
411
|
-
}
|
|
412
|
-
return [3 /*break*/, 4];
|
|
413
|
-
case 4: return [4 /*yield*/, timer_utils_1.TimerUtils.sleep(intervalBetweenRetries)];
|
|
414
|
-
case 5:
|
|
415
|
-
_a.sent();
|
|
416
|
-
_a.label = 6;
|
|
417
|
-
case 6:
|
|
418
|
-
if (retriesLeft > 0) return [3 /*break*/, 1];
|
|
419
|
-
_a.label = 7;
|
|
420
|
-
case 7: throw lastError;
|
|
288
|
+
}
|
|
289
|
+
submitPostRequestWithRetries(body, url, retries, delayBetweenRetires, async, contentType) {
|
|
290
|
+
return this.makeRequestWithRetries((callback) => { this.client.post(body, url, callback, async, contentType); }, retries, delayBetweenRetires);
|
|
291
|
+
}
|
|
292
|
+
submitPutRequestWithRetries(body, url, retries, delayBetweenRetires) {
|
|
293
|
+
return this.makeRequestWithRetries((callback) => { this.client.put(body, url, callback); }, retries, delayBetweenRetires);
|
|
294
|
+
}
|
|
295
|
+
submitDelRequestWithRetries(body, url, retries, delayBetweenRetires) {
|
|
296
|
+
return this.makeRequestWithRetries((callback) => { this.client.delete(body, url, callback); }, retries, delayBetweenRetires);
|
|
297
|
+
}
|
|
298
|
+
submitGetRequestWithRetries(url, retries, delayBetweenRetires, statusesForRetry, isNotFoundAcceptable = true) {
|
|
299
|
+
return this.makeRequestWithRetries((callback) => { this.client.get(url, callback, isNotFoundAcceptable); }, retries, delayBetweenRetires, statusesForRetry);
|
|
300
|
+
}
|
|
301
|
+
makeRequestWithRetries(doSingleRequest, retries, delayBetweenRetires, statusesForRetry) {
|
|
302
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
303
|
+
let retriesLeft = retries || sl_env_vars_1.SlEnvVars.getHttpMaxAttempts() || BackendProxy.DEFAULT_HTTP_MAX_ATTEMPTS;
|
|
304
|
+
const intervalBetweenRetries = delayBetweenRetires || sl_env_vars_1.SlEnvVars.getHttpAttemptInterval() || BackendProxy.DEFAULT_HTTP_ATTEMPT_INTERVAL;
|
|
305
|
+
let lastError = undefined;
|
|
306
|
+
do {
|
|
307
|
+
try {
|
|
308
|
+
retriesLeft--;
|
|
309
|
+
const bodyAndStatusCode = yield new Promise((resolve, reject) => {
|
|
310
|
+
doSingleRequest((err, body, statusCode) => {
|
|
311
|
+
err ? reject({ err, statusCode }) : resolve({ body, statusCode }); //Always return status code
|
|
312
|
+
});
|
|
313
|
+
});
|
|
314
|
+
return bodyAndStatusCode.body;
|
|
421
315
|
}
|
|
422
|
-
|
|
316
|
+
catch (errAndStatusCode) {
|
|
317
|
+
this.logger.info(errAndStatusCode);
|
|
318
|
+
lastError = errAndStatusCode.err;
|
|
319
|
+
if (!this.shouldRetryRequest(errAndStatusCode.statusCode, statusesForRetry)) {
|
|
320
|
+
break; //Non-retriable error, break do..while loop and
|
|
321
|
+
}
|
|
322
|
+
}
|
|
323
|
+
yield timer_utils_1.TimerUtils.sleep(intervalBetweenRetries);
|
|
324
|
+
} while (retriesLeft > 0);
|
|
325
|
+
throw lastError;
|
|
423
326
|
});
|
|
424
|
-
}
|
|
425
|
-
|
|
426
|
-
if (statusesForRetry === void 0) { statusesForRetry = []; }
|
|
327
|
+
}
|
|
328
|
+
shouldRetryRequest(statusCode, statusesForRetry = []) {
|
|
427
329
|
if (statusCode >= 500 || statusCode && statusesForRetry.includes(statusCode))
|
|
428
330
|
return true;
|
|
429
331
|
return false;
|
|
430
|
-
}
|
|
431
|
-
|
|
432
|
-
BackendProxy.DEFAULT_HTTP_ATTEMPT_INTERVAL = 5 * 1000;
|
|
433
|
-
return BackendProxy;
|
|
434
|
-
}());
|
|
332
|
+
}
|
|
333
|
+
}
|
|
435
334
|
exports.BackendProxy = BackendProxy;
|
|
335
|
+
BackendProxy.DEFAULT_HTTP_MAX_ATTEMPTS = 6;
|
|
336
|
+
BackendProxy.DEFAULT_HTTP_ATTEMPT_INTERVAL = 5 * 1000;
|
|
436
337
|
//# sourceMappingURL=backend-proxy.js.map
|