slnodejs 6.1.415 → 6.1.447
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/browser-agent/dist/browser-agent-all.js +249 -414
- package/browser-agent/dist/browser-agent-all.min.js +3 -3
- package/browser-agent/package.json +1 -1
- package/package.json +2 -2
- package/tsOutputs/api.js +32 -86
- package/tsOutputs/build-scanner/ast-utils.js +11 -11
- package/tsOutputs/build-scanner/ast-utils.js.map +1 -1
- package/tsOutputs/build-scanner/build-diff-process.js +35 -16
- package/tsOutputs/build-scanner/build-diff-process.js.map +1 -1
- package/tsOutputs/build-scanner/cia.js +2 -2
- package/tsOutputs/build-scanner/cia.js.map +1 -1
- package/tsOutputs/build-scanner/default-values-resolver.js +5 -7
- package/tsOutputs/build-scanner/default-values-resolver.js.map +1 -1
- package/tsOutputs/build-scanner/diagnostic/build-scan-diagnosis.js +101 -159
- package/tsOutputs/build-scanner/diagnostic/build-scan-diagnosis.js.map +1 -1
- package/tsOutputs/build-scanner/diagnostic/none-diagnosis.js +23 -55
- package/tsOutputs/build-scanner/diagnostic/none-diagnosis.js.map +1 -1
- package/tsOutputs/build-scanner/file-and-folder-utils.js +3 -3
- package/tsOutputs/build-scanner/file-and-folder-utils.js.map +1 -1
- package/tsOutputs/build-scanner/file-system/actual-file.js +3 -3
- package/tsOutputs/build-scanner/file-system/actual-file.js.map +1 -1
- package/tsOutputs/build-scanner/instrumentation/browser-instrumenter.js +56 -60
- package/tsOutputs/build-scanner/instrumentation/browser-instrumenter.js.map +1 -1
- package/tsOutputs/build-scanner/instrumentation/content-instrumenter.js +9 -10
- package/tsOutputs/build-scanner/instrumentation/content-instrumenter.js.map +1 -1
- package/tsOutputs/build-scanner/instrumentation/files-instrumenter.js +80 -124
- package/tsOutputs/build-scanner/instrumentation/files-instrumenter.js.map +1 -1
- package/tsOutputs/build-scanner/instrumentation/instrumentation-utils.js +3 -3
- package/tsOutputs/build-scanner/instrumentation/instrumentation-utils.js.map +1 -1
- package/tsOutputs/build-scanner/instrumentation/instrumented-file-size-reducer.js +4 -4
- package/tsOutputs/build-scanner/instrumentation/instrumented-file-size-reducer.js.map +1 -1
- package/tsOutputs/build-scanner/instrumentation/process-pool/instrumenter-spawn.js +15 -50
- package/tsOutputs/build-scanner/instrumentation/process-pool/instrumenter-spawn.js.map +1 -1
- package/tsOutputs/build-scanner/instrumentation/process-pool/process-pool.js +84 -141
- package/tsOutputs/build-scanner/instrumentation/process-pool/process-pool.js.map +1 -1
- package/tsOutputs/build-scanner/instrumentation/process-pool/split-by-transform-stream.js +15 -34
- package/tsOutputs/build-scanner/instrumentation/process-pool/split-by-transform-stream.js.map +1 -1
- package/tsOutputs/build-scanner/instrumentation/process-pool/stop-by-condition-transform-stream.js +9 -27
- package/tsOutputs/build-scanner/instrumentation/process-pool/stop-by-condition-transform-stream.js.map +1 -1
- package/tsOutputs/build-scanner/instrumentation/strategies/copy-as-is-strategy.js +8 -10
- package/tsOutputs/build-scanner/instrumentation/strategies/copy-as-is-strategy.js.map +1 -1
- package/tsOutputs/build-scanner/instrumentation/strategies/js-instrumnetation-strategy.js +22 -54
- package/tsOutputs/build-scanner/instrumentation/strategies/js-instrumnetation-strategy.js.map +1 -1
- package/tsOutputs/build-scanner/instrumentation/strategies/markup-instrumnetation-strategy.js +55 -107
- package/tsOutputs/build-scanner/instrumentation/strategies/markup-instrumnetation-strategy.js.map +1 -1
- package/tsOutputs/build-scanner/js_diff/file-signature.js +5 -6
- package/tsOutputs/build-scanner/js_diff/file-signature.js.map +1 -1
- package/tsOutputs/build-scanner/js_diff/files-mapping.js +6 -6
- package/tsOutputs/build-scanner/js_diff/files-mapping.js.map +1 -1
- package/tsOutputs/build-scanner/js_diff/generated-file-signature.js +3 -3
- package/tsOutputs/build-scanner/js_diff/generated-file-signature.js.map +1 -1
- package/tsOutputs/build-scanner/js_diff/guess-method-location.js +26 -27
- package/tsOutputs/build-scanner/js_diff/guess-method-location.js.map +1 -1
- package/tsOutputs/build-scanner/js_diff/method-signature.js +1 -1
- package/tsOutputs/build-scanner/js_diff/method-signature.js.map +1 -1
- package/tsOutputs/build-scanner/js_diff/sl-mapper.js +28 -79
- package/tsOutputs/build-scanner/js_diff/sl-mapper.js.map +1 -1
- package/tsOutputs/build-scanner/js_diff/source-data-enricher.js +3 -2
- package/tsOutputs/build-scanner/js_diff/source-data-enricher.js.map +1 -1
- package/tsOutputs/build-scanner/js_diff/source-files-notifier.js +1 -1
- package/tsOutputs/build-scanner/js_diff/source-files-notifier.js.map +1 -1
- package/tsOutputs/build-scanner/mappings/ensure-files-handler.service.js +76 -149
- package/tsOutputs/build-scanner/mappings/ensure-files-handler.service.js.map +1 -1
- package/tsOutputs/build-scanner/mappings/file-element-utils.js +9 -9
- package/tsOutputs/build-scanner/mappings/file-element-utils.js.map +1 -1
- package/tsOutputs/build-scanner/mappings/file-enricher.js +71 -100
- package/tsOutputs/build-scanner/mappings/file-enricher.js.map +1 -1
- package/tsOutputs/build-scanner/mappings/file-path-fixer.js +112 -0
- package/tsOutputs/build-scanner/mappings/file-path-fixer.js.map +1 -0
- package/tsOutputs/build-scanner/mappings/files-container.js +89 -0
- package/tsOutputs/build-scanner/mappings/files-container.js.map +1 -0
- package/tsOutputs/build-scanner/mappings/files-data-container.js +18 -23
- package/tsOutputs/build-scanner/mappings/files-data-container.js.map +1 -1
- package/tsOutputs/build-scanner/mappings/source-path-mapper.js +15 -45
- package/tsOutputs/build-scanner/mappings/source-path-mapper.js.map +1 -1
- package/tsOutputs/build-scanner/markup-files-parser.js +1 -1
- package/tsOutputs/build-scanner/markup-files-parser.js.map +1 -1
- package/tsOutputs/build-scanner/scm/scm-file-fixer.js +27 -0
- package/tsOutputs/build-scanner/scm/scm-file-fixer.js.map +1 -0
- package/tsOutputs/build-scanner/scm/scm-files-container.js +9 -45
- package/tsOutputs/build-scanner/scm/scm-files-container.js.map +1 -1
- package/tsOutputs/build-scanner/sl-config-cia-cli.js +1 -1
- package/tsOutputs/build-scanner/sl-config-cia-cli.js.map +1 -1
- package/tsOutputs/build-scanner/utils.js +5 -5
- package/tsOutputs/build-scanner/utils.js.map +1 -1
- package/tsOutputs/cli-parse/agent-instance-data.js +2 -2
- package/tsOutputs/cli-parse/agent-instance-data.js.map +1 -1
- package/tsOutputs/cli-parse/child-process-wrapper.js +26 -60
- package/tsOutputs/cli-parse/child-process-wrapper.js.map +1 -1
- package/tsOutputs/cli-parse/cli.js +72 -191
- package/tsOutputs/cli-parse/cli.js.map +1 -1
- package/tsOutputs/cli-parse/constants/constants.js +9 -9
- package/tsOutputs/cli-parse/constants/constants.js.map +1 -1
- package/tsOutputs/cli-parse/custom-commander.js +17 -18
- package/tsOutputs/cli-parse/custom-commander.js.map +1 -1
- package/tsOutputs/cli-parse/executors/base-executor.js +121 -236
- package/tsOutputs/cli-parse/executors/base-executor.js.map +1 -1
- package/tsOutputs/cli-parse/executors/build-args-dto.js +10 -11
- package/tsOutputs/cli-parse/executors/build-args-dto.js.map +1 -1
- package/tsOutputs/cli-parse/executors/build-end-executor.js +34 -92
- package/tsOutputs/cli-parse/executors/build-end-executor.js.map +1 -1
- package/tsOutputs/cli-parse/executors/build-executor.js +64 -133
- package/tsOutputs/cli-parse/executors/build-executor.js.map +1 -1
- package/tsOutputs/cli-parse/executors/config-executor.js +35 -92
- package/tsOutputs/cli-parse/executors/config-executor.js.map +1 -1
- package/tsOutputs/cli-parse/executors/dry-run/base-data.js +29 -39
- package/tsOutputs/cli-parse/executors/dry-run/base-data.js.map +1 -1
- package/tsOutputs/cli-parse/executors/dry-run/build-mapping-data.js +92 -177
- package/tsOutputs/cli-parse/executors/dry-run/build-mapping-data.js.map +1 -1
- package/tsOutputs/cli-parse/executors/dry-run/dry-run-executor.js +110 -194
- package/tsOutputs/cli-parse/executors/dry-run/dry-run-executor.js.map +1 -1
- package/tsOutputs/cli-parse/executors/dry-run/dry-run-validation.js +49 -83
- package/tsOutputs/cli-parse/executors/dry-run/dry-run-validation.js.map +1 -1
- package/tsOutputs/cli-parse/executors/dry-run/footprints-data.js +55 -113
- package/tsOutputs/cli-parse/executors/dry-run/footprints-data.js.map +1 -1
- package/tsOutputs/cli-parse/executors/dry-run/helper-methods.js +24 -25
- package/tsOutputs/cli-parse/executors/dry-run/helper-methods.js.map +1 -1
- package/tsOutputs/cli-parse/executors/end-execution-executor.js +16 -64
- package/tsOutputs/cli-parse/executors/end-execution-executor.js.map +1 -1
- package/tsOutputs/cli-parse/executors/integration-build-components-executor.js +29 -82
- package/tsOutputs/cli-parse/executors/integration-build-components-executor.js.map +1 -1
- package/tsOutputs/cli-parse/executors/integration-build-delete-components-executor.js +12 -59
- package/tsOutputs/cli-parse/executors/integration-build-delete-components-executor.js.map +1 -1
- package/tsOutputs/cli-parse/executors/integration-build-update-components-executor.js +9 -58
- package/tsOutputs/cli-parse/executors/integration-build-update-components-executor.js.map +1 -1
- package/tsOutputs/cli-parse/executors/mocha-executor.js +41 -101
- package/tsOutputs/cli-parse/executors/mocha-executor.js.map +1 -1
- package/tsOutputs/cli-parse/executors/nyc-report-executor.js +24 -83
- package/tsOutputs/cli-parse/executors/nyc-report-executor.js.map +1 -1
- package/tsOutputs/cli-parse/executors/pr-config-executor.js +15 -63
- package/tsOutputs/cli-parse/executors/pr-config-executor.js.map +1 -1
- package/tsOutputs/cli-parse/executors/run-executor.js +23 -75
- package/tsOutputs/cli-parse/executors/run-executor.js.map +1 -1
- package/tsOutputs/cli-parse/executors/start-execution-executor.js +16 -64
- package/tsOutputs/cli-parse/executors/start-execution-executor.js.map +1 -1
- package/tsOutputs/cli-parse/executors/test-executions-executor.js +9 -63
- package/tsOutputs/cli-parse/executors/test-executions-executor.js.map +1 -1
- package/tsOutputs/cli-parse/executors/test-listener-executor.js +47 -117
- package/tsOutputs/cli-parse/executors/test-listener-executor.js.map +1 -1
- package/tsOutputs/cli-parse/executors/upload-report-executor.js +23 -71
- package/tsOutputs/cli-parse/executors/upload-report-executor.js.map +1 -1
- package/tsOutputs/cli-parse/utils.js +10 -10
- package/tsOutputs/cli-parse/utils.js.map +1 -1
- package/tsOutputs/common/agent-events/agent-events-controller.js +146 -251
- package/tsOutputs/common/agent-events/agent-events-controller.js.map +1 -1
- package/tsOutputs/common/agent-events/agent-events-guard.js +12 -15
- package/tsOutputs/common/agent-events/agent-events-guard.js.map +1 -1
- package/tsOutputs/common/agent-events/agent-instance-info-builder.js +22 -24
- package/tsOutputs/common/agent-events/agent-instance-info-builder.js.map +1 -1
- package/tsOutputs/common/agent-events/agent-start-info-builder.js +7 -8
- package/tsOutputs/common/agent-events/agent-start-info-builder.js.map +1 -1
- package/tsOutputs/common/agent-events/browser-info-builder.js +9 -10
- package/tsOutputs/common/agent-events/browser-info-builder.js.map +1 -1
- package/tsOutputs/common/agent-events/ci-info-builder.js +12 -13
- package/tsOutputs/common/agent-events/ci-info-builder.js.map +1 -1
- package/tsOutputs/common/agent-events/cockpit-notifier.js +38 -87
- package/tsOutputs/common/agent-events/cockpit-notifier.js.map +1 -1
- package/tsOutputs/common/agent-events/dry-run-agent-events-controller.js +10 -27
- package/tsOutputs/common/agent-events/dry-run-agent-events-controller.js.map +1 -1
- package/tsOutputs/common/agent-events/machine-info-builder.js +21 -22
- package/tsOutputs/common/agent-events/machine-info-builder.js.map +1 -1
- package/tsOutputs/common/agent-events/no-op-agent-events-controller.js +30 -84
- package/tsOutputs/common/agent-events/no-op-agent-events-controller.js.map +1 -1
- package/tsOutputs/common/agent-events/nodejs-env-info-builder.js +7 -8
- package/tsOutputs/common/agent-events/nodejs-env-info-builder.js.map +1 -1
- package/tsOutputs/common/agent-events/sensitive-data-filter.js +3 -4
- package/tsOutputs/common/agent-events/sensitive-data-filter.js.map +1 -1
- package/tsOutputs/common/agent-instance-data.js +23 -28
- package/tsOutputs/common/agent-instance-data.js.map +1 -1
- package/tsOutputs/common/cli-progress.js +16 -19
- package/tsOutputs/common/cli-progress.js.map +1 -1
- package/tsOutputs/common/config-process/config-loader.js +23 -24
- package/tsOutputs/common/config-process/config-loader.js.map +1 -1
- package/tsOutputs/common/config-process/config-system.js +104 -131
- package/tsOutputs/common/config-process/config-system.js.map +1 -1
- package/tsOutputs/common/config-process/config.js +52 -73
- package/tsOutputs/common/config-process/config.js.map +1 -1
- package/tsOutputs/common/config-process/index.js +38 -57
- package/tsOutputs/common/config-process/index.js.map +1 -1
- package/tsOutputs/common/config-process/no-op-config-process.js +9 -29
- package/tsOutputs/common/config-process/no-op-config-process.js.map +1 -1
- package/tsOutputs/common/constants/constants.js +19 -25
- package/tsOutputs/common/constants/constants.js.map +1 -1
- package/tsOutputs/common/constants/sl-env-vars.js +125 -131
- package/tsOutputs/common/constants/sl-env-vars.js.map +1 -1
- package/tsOutputs/common/coverage-elements/file-element.js +66 -103
- package/tsOutputs/common/coverage-elements/file-element.js.map +1 -1
- package/tsOutputs/common/coverage-elements/istanbul-unique-id-converter.js +28 -47
- package/tsOutputs/common/coverage-elements/istanbul-unique-id-converter.js.map +1 -1
- package/tsOutputs/common/coverage-elements/new-id-resolver.js +17 -17
- package/tsOutputs/common/coverage-elements/new-id-resolver.js.map +1 -1
- package/tsOutputs/common/coverage-elements/original-module-loader.js +71 -79
- package/tsOutputs/common/coverage-elements/original-module-loader.js.map +1 -1
- package/tsOutputs/common/coverage-elements/unique-id-converter.js +90 -110
- package/tsOutputs/common/coverage-elements/unique-id-converter.js.map +1 -1
- package/tsOutputs/common/environment-data-service.js +10 -11
- package/tsOutputs/common/environment-data-service.js.map +1 -1
- package/tsOutputs/common/events-process/events-creator.js +20 -32
- package/tsOutputs/common/events-process/events-creator.js.map +1 -1
- package/tsOutputs/common/events-process/index.js +97 -186
- package/tsOutputs/common/events-process/index.js.map +1 -1
- package/tsOutputs/common/footprints-process/collection-interval.js +10 -11
- package/tsOutputs/common/footprints-process/collection-interval.js.map +1 -1
- package/tsOutputs/common/footprints-process/footprints-service-proxy.js +21 -22
- package/tsOutputs/common/footprints-process/footprints-service-proxy.js.map +1 -1
- package/tsOutputs/common/footprints-process/index.js +68 -102
- package/tsOutputs/common/footprints-process/index.js.map +1 -1
- package/tsOutputs/common/footprints-process/istanbul-to-footprints-contract.js +2 -5
- package/tsOutputs/common/footprints-process/istanbul-to-footprints-contract.js.map +1 -1
- package/tsOutputs/common/footprints-process/istanbul-to-footprints.js +160 -162
- package/tsOutputs/common/footprints-process/istanbul-to-footprints.js.map +1 -1
- package/tsOutputs/common/footprints-process/production-footprints-handler.js +103 -156
- package/tsOutputs/common/footprints-process/production-footprints-handler.js.map +1 -1
- package/tsOutputs/common/footprints-process-v6/base-browser-hits-converter.js +30 -48
- package/tsOutputs/common/footprints-process-v6/base-browser-hits-converter.js.map +1 -1
- package/tsOutputs/common/footprints-process-v6/browser-footprints-buffer.js +7 -25
- package/tsOutputs/common/footprints-process-v6/browser-footprints-buffer.js.map +1 -1
- package/tsOutputs/common/footprints-process-v6/buffer-size-helper.js +13 -14
- package/tsOutputs/common/footprints-process-v6/buffer-size-helper.js.map +1 -1
- package/tsOutputs/common/footprints-process-v6/collector-footprints-buffer.js +14 -32
- package/tsOutputs/common/footprints-process-v6/collector-footprints-buffer.js.map +1 -1
- package/tsOutputs/common/footprints-process-v6/collector-footprints-process.js +43 -109
- package/tsOutputs/common/footprints-process-v6/collector-footprints-process.js.map +1 -1
- package/tsOutputs/common/footprints-process-v6/contracts.js +2 -5
- package/tsOutputs/common/footprints-process-v6/contracts.js.map +1 -1
- package/tsOutputs/common/footprints-process-v6/footprints-buffer.d.ts +1 -1
- package/tsOutputs/common/footprints-process-v6/footprints-buffer.js +55 -78
- package/tsOutputs/common/footprints-process-v6/footprints-buffer.js.map +1 -1
- package/tsOutputs/common/footprints-process-v6/hits-collector.js +89 -129
- package/tsOutputs/common/footprints-process-v6/hits-collector.js.map +1 -1
- package/tsOutputs/common/footprints-process-v6/hits-converter.js +70 -78
- package/tsOutputs/common/footprints-process-v6/hits-converter.js.map +1 -1
- package/tsOutputs/common/footprints-process-v6/index.d.ts +1 -0
- package/tsOutputs/common/footprints-process-v6/index.js +210 -347
- package/tsOutputs/common/footprints-process-v6/index.js.map +1 -1
- package/tsOutputs/common/footprints-process-v6/location-formatter.js +2 -2
- package/tsOutputs/common/footprints-process-v6/location-formatter.js.map +1 -1
- package/tsOutputs/common/footprints-process-v6/relative-path-resolver.js +10 -11
- package/tsOutputs/common/footprints-process-v6/relative-path-resolver.js.map +1 -1
- package/tsOutputs/common/footprints-process-v6/remote-browser-hits-converter.js +5 -25
- package/tsOutputs/common/footprints-process-v6/remote-browser-hits-converter.js.map +1 -1
- package/tsOutputs/common/footprints-process-v6/remote-footprints-process.js +6 -57
- package/tsOutputs/common/footprints-process-v6/remote-footprints-process.js.map +1 -1
- package/tsOutputs/common/footprints-process-v6/remote-hits-collector.js +7 -27
- package/tsOutputs/common/footprints-process-v6/remote-hits-collector.js.map +1 -1
- package/tsOutputs/common/footprints-process-v6/source-map-data.js +14 -15
- package/tsOutputs/common/footprints-process-v6/source-map-data.js.map +1 -1
- package/tsOutputs/common/http/backend-proxy.js +222 -321
- package/tsOutputs/common/http/backend-proxy.js.map +1 -1
- package/tsOutputs/common/http/contracts.js +40 -116
- package/tsOutputs/common/http/contracts.js.map +1 -1
- package/tsOutputs/common/http/dry-run-proxy.js +68 -111
- package/tsOutputs/common/http/dry-run-proxy.js.map +1 -1
- package/tsOutputs/common/http/entities-mapper.js +6 -9
- package/tsOutputs/common/http/entities-mapper.js.map +1 -1
- package/tsOutputs/common/http/http-client.js +76 -86
- package/tsOutputs/common/http/http-client.js.map +1 -1
- package/tsOutputs/common/http/sl-routes.js +119 -122
- package/tsOutputs/common/http/sl-routes.js.map +1 -1
- package/tsOutputs/common/ignored-files-handler.js +48 -49
- package/tsOutputs/common/ignored-files-handler.js.map +1 -1
- package/tsOutputs/common/logger.js +66 -88
- package/tsOutputs/common/logger.js.map +1 -1
- package/tsOutputs/common/messages-formatter.js +9 -14
- package/tsOutputs/common/messages-formatter.js.map +1 -1
- package/tsOutputs/common/no-op-state-tracker.js +14 -37
- package/tsOutputs/common/no-op-state-tracker.js.map +1 -1
- package/tsOutputs/common/queue.js +18 -36
- package/tsOutputs/common/queue.js.map +1 -1
- package/tsOutputs/common/scm/git-cloner.js +30 -94
- package/tsOutputs/common/scm/git-cloner.js.map +1 -1
- package/tsOutputs/common/scm/git-format-builder.js +24 -25
- package/tsOutputs/common/scm/git-format-builder.js.map +1 -1
- package/tsOutputs/common/scm/git.js +192 -327
- package/tsOutputs/common/scm/git.js.map +1 -1
- package/tsOutputs/common/scm/none.js +58 -110
- package/tsOutputs/common/scm/none.js.map +1 -1
- package/tsOutputs/common/scm/scm-factory.js +13 -16
- package/tsOutputs/common/scm/scm-factory.js.map +1 -1
- package/tsOutputs/common/short-name-to-file-mapper.js +30 -33
- package/tsOutputs/common/short-name-to-file-mapper.js.map +1 -1
- package/tsOutputs/common/source-map-handler.js +76 -98
- package/tsOutputs/common/source-map-handler.js.map +1 -1
- package/tsOutputs/common/source-map-reader.js +35 -36
- package/tsOutputs/common/source-map-reader.js.map +1 -1
- package/tsOutputs/common/source-maps-utils.js +8 -11
- package/tsOutputs/common/source-maps-utils.js.map +1 -1
- package/tsOutputs/common/state-tracker-fpv6.js +15 -37
- package/tsOutputs/common/state-tracker-fpv6.js.map +1 -1
- package/tsOutputs/common/state-tracker.js +124 -212
- package/tsOutputs/common/state-tracker.js.map +1 -1
- package/tsOutputs/common/system-date.js +3 -3
- package/tsOutputs/common/system-date.js.map +1 -1
- package/tsOutputs/common/utils/abstract-data-builder.js +8 -9
- package/tsOutputs/common/utils/abstract-data-builder.js.map +1 -1
- package/tsOutputs/common/utils/build-session-data-builder.js +25 -79
- package/tsOutputs/common/utils/build-session-data-builder.js.map +1 -1
- package/tsOutputs/common/utils/dependency-utils.js +13 -16
- package/tsOutputs/common/utils/dependency-utils.js.map +1 -1
- package/tsOutputs/common/utils/env-var-parsing.js +10 -14
- package/tsOutputs/common/utils/env-var-parsing.js.map +1 -1
- package/tsOutputs/common/utils/files-utils.js +16 -19
- package/tsOutputs/common/utils/files-utils.js.map +1 -1
- package/tsOutputs/common/utils/process-utils.js +12 -25
- package/tsOutputs/common/utils/process-utils.js.map +1 -1
- package/tsOutputs/common/utils/test-runner-build-session-data-builder.js +16 -62
- package/tsOutputs/common/utils/test-runner-build-session-data-builder.js.map +1 -1
- package/tsOutputs/common/utils/test-utils/mock-server-utils/mock-server-proxy.js +120 -192
- package/tsOutputs/common/utils/test-utils/mock-server-utils/mock-server-proxy.js.map +1 -1
- package/tsOutputs/common/utils/timer-utils.js +4 -7
- package/tsOutputs/common/utils/timer-utils.js.map +1 -1
- package/tsOutputs/common/utils/token-data-builder.js +30 -50
- package/tsOutputs/common/utils/token-data-builder.js.map +1 -1
- package/tsOutputs/common/utils/validation-utils.d.ts +4 -0
- package/tsOutputs/common/utils/validation-utils.js +13 -10
- package/tsOutputs/common/utils/validation-utils.js.map +1 -1
- package/tsOutputs/common/uuid.js +7 -10
- package/tsOutputs/common/uuid.js.map +1 -1
- package/tsOutputs/common/v8-utils.js +12 -50
- package/tsOutputs/common/v8-utils.js.map +1 -1
- package/tsOutputs/common/watchdog.js +35 -56
- package/tsOutputs/common/watchdog.js.map +1 -1
- package/tsOutputs/mocha-reporter/index.js +12 -12
- package/tsOutputs/mocha-reporter/index.js.map +1 -1
- package/tsOutputs/mocha-reporter/otel-agent.js +47 -118
- package/tsOutputs/mocha-reporter/otel-agent.js.map +1 -1
- package/tsOutputs/test-listener/SlNodeJsProxy.js +34 -35
- package/tsOutputs/test-listener/SlNodeJsProxy.js.map +1 -1
- package/tsOutputs/test-listener/UserMessageHelper.js +14 -19
- package/tsOutputs/test-listener/UserMessageHelper.js.map +1 -1
- package/tsOutputs/test-listener/agent-loader.js +42 -59
- package/tsOutputs/test-listener/agent-loader.js.map +1 -1
- package/tsOutputs/test-listener/agent.js +93 -150
- package/tsOutputs/test-listener/agent.js.map +1 -1
- package/tsOutputs/test-listener/api.js +36 -70
- package/tsOutputs/test-listener/api.js.map +1 -1
- package/tsOutputs/test-listener/base-proxy.js +25 -27
- package/tsOutputs/test-listener/base-proxy.js.map +1 -1
- package/tsOutputs/test-listener/bootstrap.js +6 -6
- package/tsOutputs/test-listener/bootstrap.js.map +1 -1
- package/tsOutputs/test-listener/child-process-patcher.js +10 -10
- package/tsOutputs/test-listener/child-process-patcher.js.map +1 -1
- package/tsOutputs/test-listener/cli.js +27 -30
- package/tsOutputs/test-listener/cli.js.map +1 -1
- package/tsOutputs/test-listener/coloring/http-coloring.js +30 -33
- package/tsOutputs/test-listener/coloring/http-coloring.js.map +1 -1
- package/tsOutputs/test-listener/coloring/listening-port.js +14 -17
- package/tsOutputs/test-listener/coloring/listening-port.js.map +1 -1
- package/tsOutputs/test-listener/command-line-arg-parser.js +12 -15
- package/tsOutputs/test-listener/command-line-arg-parser.js.map +1 -1
- package/tsOutputs/test-listener/config-process/config-loader.js +21 -22
- package/tsOutputs/test-listener/config-process/config-loader.js.map +1 -1
- package/tsOutputs/test-listener/config-process/config-system.js +100 -127
- package/tsOutputs/test-listener/config-process/config-system.js.map +1 -1
- package/tsOutputs/test-listener/config-process/index.js +38 -57
- package/tsOutputs/test-listener/config-process/index.js.map +1 -1
- package/tsOutputs/test-listener/config.js +38 -59
- package/tsOutputs/test-listener/config.js.map +1 -1
- package/tsOutputs/test-listener/entities/BasicConfigurationData.js +37 -64
- package/tsOutputs/test-listener/entities/BasicConfigurationData.js.map +1 -1
- package/tsOutputs/test-listener/entities/build-scanner/ConfigModeData.js +17 -42
- package/tsOutputs/test-listener/entities/build-scanner/ConfigModeData.js.map +1 -1
- package/tsOutputs/test-listener/entities/build-scanner/ScanModeData.js +19 -45
- package/tsOutputs/test-listener/entities/build-scanner/ScanModeData.js.map +1 -1
- package/tsOutputs/test-listener/environment-data-service.js +10 -11
- package/tsOutputs/test-listener/environment-data-service.js.map +1 -1
- package/tsOutputs/test-listener/execution-process/entities-mapper.js +11 -14
- package/tsOutputs/test-listener/execution-process/entities-mapper.js.map +1 -1
- package/tsOutputs/test-listener/execution-process/execution-service-proxy.js +54 -72
- package/tsOutputs/test-listener/execution-process/execution-service-proxy.js.map +1 -1
- package/tsOutputs/test-listener/execution-process/index.js +26 -26
- package/tsOutputs/test-listener/execution-process/index.js.map +1 -1
- package/tsOutputs/test-listener/factory.js +140 -175
- package/tsOutputs/test-listener/factory.js.map +1 -1
- package/tsOutputs/test-listener/footprints-process/footprints-service-proxy.js +17 -34
- package/tsOutputs/test-listener/footprints-process/footprints-service-proxy.js.map +1 -1
- package/tsOutputs/test-listener/footprints-process/index.js +53 -58
- package/tsOutputs/test-listener/footprints-process/index.js.map +1 -1
- package/tsOutputs/test-listener/footprints-process/istanbul-to-footprints-base.js +49 -50
- package/tsOutputs/test-listener/footprints-process/istanbul-to-footprints-base.js.map +1 -1
- package/tsOutputs/test-listener/footprints-process/istanbul-to-footprints-v3.js +98 -117
- package/tsOutputs/test-listener/footprints-process/istanbul-to-footprints-v3.js.map +1 -1
- package/tsOutputs/test-listener/footprints-process/ts-node-hits-collector.js +57 -141
- package/tsOutputs/test-listener/footprints-process/ts-node-hits-collector.js.map +1 -1
- package/tsOutputs/test-listener/integrations/SlGulp.js +25 -26
- package/tsOutputs/test-listener/integrations/SlGulp.js.map +1 -1
- package/tsOutputs/test-listener/logs-process/index.js +30 -35
- package/tsOutputs/test-listener/logs-process/index.js.map +1 -1
- package/tsOutputs/test-listener/logs-process/log-service-proxy.js +8 -25
- package/tsOutputs/test-listener/logs-process/log-service-proxy.js.map +1 -1
- package/tsOutputs/test-listener/nyc-report-executor-fpv6.js +53 -110
- package/tsOutputs/test-listener/nyc-report-executor-fpv6.js.map +1 -1
- package/tsOutputs/test-listener/nyc-report-executor.js +48 -85
- package/tsOutputs/test-listener/nyc-report-executor.js.map +1 -1
- package/tsOutputs/test-listener/otel-agent-loader.js +30 -33
- package/tsOutputs/test-listener/otel-agent-loader.js.map +1 -1
- package/tsOutputs/test-listener/queue.js +18 -36
- package/tsOutputs/test-listener/queue.js.map +1 -1
- package/tsOutputs/test-listener/remote-agent.js +97 -223
- package/tsOutputs/test-listener/remote-agent.js.map +1 -1
- package/tsOutputs/test-listener/resolvers/AppNameResolver.js +8 -25
- package/tsOutputs/test-listener/resolvers/AppNameResolver.js.map +1 -1
- package/tsOutputs/test-listener/resolvers/ArgumentResolver.js +11 -12
- package/tsOutputs/test-listener/resolvers/ArgumentResolver.js.map +1 -1
- package/tsOutputs/test-listener/resolvers/BuildResolver.js +8 -25
- package/tsOutputs/test-listener/resolvers/BuildResolver.js.map +1 -1
- package/tsOutputs/test-listener/resolvers/BuildSessionIdFileResolver.js +8 -25
- package/tsOutputs/test-listener/resolvers/BuildSessionIdFileResolver.js.map +1 -1
- package/tsOutputs/test-listener/resolvers/BuildSessionIdResolver.js +8 -25
- package/tsOutputs/test-listener/resolvers/BuildSessionIdResolver.js.map +1 -1
- package/tsOutputs/test-listener/resolvers/ProxyResolver.js +8 -25
- package/tsOutputs/test-listener/resolvers/ProxyResolver.js.map +1 -1
- package/tsOutputs/test-listener/resolvers/TokenResolver.js +8 -25
- package/tsOutputs/test-listener/resolvers/TokenResolver.js.map +1 -1
- package/tsOutputs/test-listener/state-tracker-process/index.js +54 -74
- package/tsOutputs/test-listener/state-tracker-process/index.js.map +1 -1
- package/tsOutputs/test-listener/state-tracker-process/state-tracker-proxy.js +18 -37
- package/tsOutputs/test-listener/state-tracker-process/state-tracker-proxy.js.map +1 -1
- package/tsOutputs/test-listener/test-recommendation-handler.js +66 -109
- package/tsOutputs/test-listener/test-recommendation-handler.js.map +1 -1
- package/tsOutputs/test-listener/upload-report-handler.js +33 -35
- package/tsOutputs/test-listener/upload-report-handler.js.map +1 -1
- package/tsOutputs/test-listener/utils.js +13 -14
- package/tsOutputs/test-listener/utils.js.map +1 -1
- package/tsOutputs/test-listener/uuid.js +7 -10
- package/tsOutputs/test-listener/uuid.js.map +1 -1
- package/tsOutputs/test-listener/wait-for-multiple-callbacks.js +17 -19
- package/tsOutputs/test-listener/wait-for-multiple-callbacks.js.map +1 -1
- package/tsOutputs/test-listener/watchdog.js +32 -51
- package/tsOutputs/test-listener/watchdog.js.map +1 -1
- package/tsOutputs/build-scanner/mappings/scm-file-fixer.js +0 -96
- package/tsOutputs/build-scanner/mappings/scm-file-fixer.js.map +0 -1
|
@@ -1,44 +1,42 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.SLRoutes = void 0;
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
}
|
|
9
|
-
SLRoutes.agentsV1 = function () {
|
|
4
|
+
const constants_1 = require("../constants/constants");
|
|
5
|
+
const validation_utils_1 = require("../utils/validation-utils");
|
|
6
|
+
class SLRoutes {
|
|
7
|
+
static agentsV1() {
|
|
10
8
|
return SLRoutes.SLASH + SLRoutes.toUri(SLRoutes.V1) + SLRoutes.toUri(SLRoutes.AGENTS);
|
|
11
|
-
}
|
|
12
|
-
|
|
9
|
+
}
|
|
10
|
+
static agentsV2() {
|
|
13
11
|
return SLRoutes.SLASH + SLRoutes.toUri(SLRoutes.V2) + SLRoutes.toUri(SLRoutes.AGENTS);
|
|
14
|
-
}
|
|
15
|
-
|
|
12
|
+
}
|
|
13
|
+
static agentsV3() {
|
|
16
14
|
return SLRoutes.SLASH + SLRoutes.toUri(SLRoutes.V3) + SLRoutes.toUri(SLRoutes.AGENTS);
|
|
17
|
-
}
|
|
18
|
-
|
|
15
|
+
}
|
|
16
|
+
static agentsV4() {
|
|
19
17
|
return SLRoutes.SLASH + SLRoutes.toUri(SLRoutes.V4) + SLRoutes.toUri(SLRoutes.AGENTS);
|
|
20
|
-
}
|
|
21
|
-
|
|
18
|
+
}
|
|
19
|
+
static agentsV5() {
|
|
22
20
|
return SLRoutes.SLASH + SLRoutes.toUri(SLRoutes.V5) + SLRoutes.toUri(SLRoutes.AGENTS);
|
|
23
|
-
}
|
|
24
|
-
|
|
21
|
+
}
|
|
22
|
+
static agentsV6() {
|
|
25
23
|
return SLRoutes.SLASH + SLRoutes.toUri(SLRoutes.V6) + SLRoutes.toUri(SLRoutes.AGENTS);
|
|
26
|
-
}
|
|
27
|
-
|
|
24
|
+
}
|
|
25
|
+
static testExecution() {
|
|
28
26
|
return SLRoutes.SLASH + SLRoutes.toUri(SLRoutes.V3) + SLRoutes.toUri(SLRoutes.TEST_EXECUTION);
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
|
|
27
|
+
}
|
|
28
|
+
static testExecutionV4(labId, executionId) {
|
|
29
|
+
let url = SLRoutes.SLASH + SLRoutes.toUri(SLRoutes.V4) + SLRoutes.toUri(SLRoutes.TEST_EXECUTION) + SLRoutes.toUri(labId);
|
|
32
30
|
if (executionId) {
|
|
33
31
|
url += SLRoutes.buildQueryParams({ executionId: executionId });
|
|
34
32
|
}
|
|
35
33
|
return url;
|
|
36
|
-
}
|
|
37
|
-
|
|
34
|
+
}
|
|
35
|
+
static endExecution(customerId, appName, buildName, branchName, environment) {
|
|
38
36
|
validation_utils_1.ValidationUtils.verifyNotNullOrEmpty(appName, 'appName');
|
|
39
37
|
validation_utils_1.ValidationUtils.verifyNotNullOrEmpty(customerId, 'customerId');
|
|
40
|
-
|
|
41
|
-
|
|
38
|
+
let result = SLRoutes.testExecution();
|
|
39
|
+
const query = {
|
|
42
40
|
customerId: customerId,
|
|
43
41
|
appName: appName,
|
|
44
42
|
buildName: buildName,
|
|
@@ -47,17 +45,17 @@ var SLRoutes = /** @class */ (function () {
|
|
|
47
45
|
};
|
|
48
46
|
result += SLRoutes.buildQueryParams(query);
|
|
49
47
|
return result;
|
|
50
|
-
}
|
|
51
|
-
|
|
48
|
+
}
|
|
49
|
+
static externalData() {
|
|
52
50
|
return SLRoutes.SLASH + SLRoutes.toUri(SLRoutes.V3) + SLRoutes.toUri(SLRoutes.EXTERNAL_DATA);
|
|
53
|
-
}
|
|
54
|
-
|
|
51
|
+
}
|
|
52
|
+
static externalReport() {
|
|
55
53
|
return SLRoutes.SLASH + SLRoutes.toUri(SLRoutes.V1) + SLRoutes.toUri(SLRoutes.EXTERNAL_REPORT);
|
|
56
|
-
}
|
|
57
|
-
|
|
54
|
+
}
|
|
55
|
+
static configV3(agentInstanceData, appName, branchName, buildName, testStage, labId) {
|
|
58
56
|
validation_utils_1.ValidationUtils.verifyNotNullOrEmpty(agentInstanceData, 'agentInstanceData');
|
|
59
|
-
|
|
60
|
-
|
|
57
|
+
let result = SLRoutes.SLASH + SLRoutes.toUri(SLRoutes.V3) + SLRoutes.CONFIG;
|
|
58
|
+
const query = {
|
|
61
59
|
agentType: agentInstanceData.agentType,
|
|
62
60
|
agentVersion: agentInstanceData.agentVersion,
|
|
63
61
|
agentId: agentInstanceData.agentId
|
|
@@ -74,52 +72,52 @@ var SLRoutes = /** @class */ (function () {
|
|
|
74
72
|
query.labId = labId;
|
|
75
73
|
result += SLRoutes.buildQueryParams(query);
|
|
76
74
|
return result;
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
|
|
75
|
+
}
|
|
76
|
+
static buildSessionV2(buildSessionId) {
|
|
77
|
+
const result = SLRoutes.agentsV2() + SLRoutes.toUri(SLRoutes.BUILD_SESSION_ID) + SLRoutes.toUri(buildSessionId);
|
|
80
78
|
return result;
|
|
81
|
-
}
|
|
82
|
-
|
|
79
|
+
}
|
|
80
|
+
static prBuildSession() {
|
|
83
81
|
return SLRoutes.buildSessionV2() + SLRoutes.toUri(SLRoutes.PULL_REQUEST);
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
|
|
82
|
+
}
|
|
83
|
+
static logSubmissionV2() {
|
|
84
|
+
const result = SLRoutes.SLASH + SLRoutes.toUri(SLRoutes.V2) + SLRoutes.LOG_SUBMISSION;
|
|
87
85
|
return result;
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
|
|
86
|
+
}
|
|
87
|
+
static buildMappingV4() {
|
|
88
|
+
const result = SLRoutes.agentsV4() + SLRoutes.toUri(SLRoutes.BUILD_MAPPING);
|
|
91
89
|
return result;
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
|
|
90
|
+
}
|
|
91
|
+
static footprintsV5() {
|
|
92
|
+
const result = SLRoutes.agentsV5() + SLRoutes.toUri(SLRoutes.FOOTPRINTS);
|
|
95
93
|
return result;
|
|
96
|
-
}
|
|
94
|
+
}
|
|
97
95
|
/**
|
|
98
96
|
*
|
|
99
97
|
* @param executionBsid - The build session id that used to open the execution (could be integration build)
|
|
100
98
|
* @param testStage
|
|
101
99
|
* @param buildSessionId - The build session id that the agent started with
|
|
102
100
|
*/
|
|
103
|
-
|
|
101
|
+
static footprintsV6(executionBsid, testStage, buildSessionId) {
|
|
104
102
|
return SLRoutes.agentsV6() + SLRoutes.toUri(executionBsid) + SLRoutes.toUri(SLRoutes.FOOTPRINTS) + SLRoutes.toUri(testStage) + SLRoutes.toUri(buildSessionId);
|
|
105
|
-
}
|
|
106
|
-
|
|
103
|
+
}
|
|
104
|
+
static footprintsToCollector(buildSessionId) {
|
|
107
105
|
return SLRoutes.agentsV6() + SLRoutes.toUri(buildSessionId) + encodeURIComponent(SLRoutes.FOOTPRINTS);
|
|
108
|
-
}
|
|
109
|
-
|
|
106
|
+
}
|
|
107
|
+
static eventsV2() {
|
|
110
108
|
return SLRoutes.agentsV2() + SLRoutes.toUri(SLRoutes.EVENTS);
|
|
111
|
-
}
|
|
112
|
-
|
|
109
|
+
}
|
|
110
|
+
static productionV1(buildSessionId) {
|
|
113
111
|
validation_utils_1.ValidationUtils.verifyNotNullOrEmpty(buildSessionId, 'buildSessionId');
|
|
114
|
-
|
|
112
|
+
const result = SLRoutes.SLASH + SLRoutes.toUri(SLRoutes.V1) + SLRoutes.toUri(SLRoutes.AGENTS) + SLRoutes.toUri(SLRoutes.PRODUCTION) + SLRoutes.toUri(SLRoutes.BSID) + SLRoutes.toUri(buildSessionId);
|
|
115
113
|
return result;
|
|
116
|
-
}
|
|
117
|
-
|
|
114
|
+
}
|
|
115
|
+
static recommendedAgentV2(component, customerId, appName, branchName, testStage) {
|
|
118
116
|
if (!component) {
|
|
119
|
-
throw new Error(
|
|
117
|
+
throw new Error(`'component' ${constants_1.Constants.Messages.CANNOT_BE_NULL_OR_UNDEFINED}.`);
|
|
120
118
|
}
|
|
121
|
-
|
|
122
|
-
|
|
119
|
+
let result = SLRoutes.agentsV2() + SLRoutes.toUri(component) + SLRoutes.toUri(SLRoutes.RECOMMENDED_VERSION);
|
|
120
|
+
const query = {
|
|
123
121
|
customerId: customerId,
|
|
124
122
|
appName: appName,
|
|
125
123
|
branch: branchName,
|
|
@@ -127,103 +125,102 @@ var SLRoutes = /** @class */ (function () {
|
|
|
127
125
|
};
|
|
128
126
|
result += SLRoutes.buildQueryParams(query);
|
|
129
127
|
return result;
|
|
130
|
-
}
|
|
131
|
-
|
|
132
|
-
|
|
128
|
+
}
|
|
129
|
+
static blobs(buildSessionId, blobId, blobType) {
|
|
130
|
+
let route = SLRoutes.agentsV1() + SLRoutes.toUri(SLRoutes.BLOBS) + SLRoutes.toUri(buildSessionId) + SLRoutes.toUri(blobId);
|
|
133
131
|
if (blobType) {
|
|
134
132
|
route = route.slice(0, -1);
|
|
135
|
-
route += SLRoutes.buildQueryParams({ blobType
|
|
133
|
+
route += SLRoutes.buildQueryParams({ blobType });
|
|
136
134
|
}
|
|
137
135
|
return route;
|
|
138
|
-
}
|
|
139
|
-
|
|
140
|
-
|
|
136
|
+
}
|
|
137
|
+
static blobsForBsidAsJson(buildSessionId, blobType) {
|
|
138
|
+
let url = SLRoutes.agentsV1() + SLRoutes.toUri(SLRoutes.BLOBS) + SLRoutes.toUri(buildSessionId);
|
|
141
139
|
url = url.slice(0, -1); // Remove lastSlash
|
|
142
|
-
return url + SLRoutes.buildQueryParams({ view: 'concatJson', blobType
|
|
143
|
-
}
|
|
144
|
-
|
|
140
|
+
return url + SLRoutes.buildQueryParams({ view: 'concatJson', blobType });
|
|
141
|
+
}
|
|
142
|
+
static agentEvents() {
|
|
145
143
|
return SLRoutes.agentsV3() + SLRoutes.toUri(SLRoutes.AGENT_EVENTS);
|
|
146
|
-
}
|
|
147
|
-
|
|
144
|
+
}
|
|
145
|
+
static testsRecommendations(buildSessionId, stage, testGroupId) {
|
|
148
146
|
if (testGroupId === null || testGroupId === void 0 ? void 0 : testGroupId.length) {
|
|
149
147
|
return SLRoutes.SLASH + SLRoutes.toUri(SLRoutes.V4) + SLRoutes.toUri(SLRoutes.TEST_EXCLUSIONS) + SLRoutes.toUri(buildSessionId) + SLRoutes.toUri(stage) + SLRoutes.toUri(testGroupId);
|
|
150
148
|
}
|
|
151
149
|
return SLRoutes.SLASH + SLRoutes.toUri(SLRoutes.V3) + SLRoutes.toUri(SLRoutes.TEST_EXCLUSIONS) + SLRoutes.toUri(buildSessionId) + SLRoutes.toUri(stage);
|
|
152
|
-
}
|
|
153
|
-
|
|
150
|
+
}
|
|
151
|
+
static integrationBuildComponents(buildSessionId) {
|
|
154
152
|
return SLRoutes.SLASH + SLRoutes.toUri(SLRoutes.V1) + SLRoutes.AGENTS + SLRoutes.SLASH + SLRoutes.toUri(SLRoutes.INTEGRATION_BUILDS) +
|
|
155
153
|
SLRoutes.toUri(buildSessionId) + SLRoutes.COMPONENTS;
|
|
156
|
-
}
|
|
157
|
-
|
|
154
|
+
}
|
|
155
|
+
static buildEnd() {
|
|
158
156
|
return SLRoutes.agentsV3() + SLRoutes.toUri(SLRoutes.BUILD_END);
|
|
159
|
-
}
|
|
160
|
-
|
|
157
|
+
}
|
|
158
|
+
static activeBuildSessionId(labid) {
|
|
161
159
|
return SLRoutes.SLASH + SLRoutes.toUri(SLRoutes.V1) + SLRoutes.toUri(SLRoutes.LAB_IDS) + SLRoutes.toUri(labid) +
|
|
162
160
|
SLRoutes.toUri(SLRoutes.BUILD_SESSIONS) + SLRoutes.toUri(SLRoutes.ACTIVE);
|
|
163
|
-
}
|
|
164
|
-
|
|
161
|
+
}
|
|
162
|
+
static toUri(uri) {
|
|
165
163
|
if (uri == null || uri.length == null || uri.length === 0) {
|
|
166
164
|
return '';
|
|
167
165
|
}
|
|
168
166
|
return encodeURIComponent(uri) + SLRoutes.SLASH;
|
|
169
|
-
}
|
|
170
|
-
|
|
167
|
+
}
|
|
168
|
+
static buildQueryParams(paramsMap) {
|
|
171
169
|
if (!paramsMap) {
|
|
172
170
|
throw new Error('\'paramsMap\' cannot be null or undefined.');
|
|
173
171
|
}
|
|
174
|
-
|
|
175
|
-
for (
|
|
176
|
-
|
|
172
|
+
let queryString = '';
|
|
173
|
+
for (const key in paramsMap) {
|
|
174
|
+
const value = paramsMap[key];
|
|
177
175
|
queryString += SLRoutes.addQueryStringValue(key, value);
|
|
178
176
|
}
|
|
179
177
|
queryString = '?' + queryString;
|
|
180
178
|
queryString = queryString.substring(0, queryString.length - 1); //Remove the last &.
|
|
181
179
|
return queryString;
|
|
182
|
-
}
|
|
183
|
-
|
|
180
|
+
}
|
|
181
|
+
static addQueryStringValue(key, value) {
|
|
184
182
|
if (!key && !value)
|
|
185
183
|
return '';
|
|
186
184
|
if (!value) {
|
|
187
185
|
value = '';
|
|
188
186
|
}
|
|
189
|
-
|
|
187
|
+
let paramString = '';
|
|
190
188
|
paramString += encodeURIComponent(key);
|
|
191
189
|
paramString += '=';
|
|
192
190
|
paramString += encodeURIComponent(value);
|
|
193
191
|
paramString += '&';
|
|
194
192
|
return paramString;
|
|
195
|
-
}
|
|
196
|
-
|
|
197
|
-
SLRoutes.V1 = 'v1';
|
|
198
|
-
SLRoutes.V2 = 'v2';
|
|
199
|
-
SLRoutes.V3 = 'v3';
|
|
200
|
-
SLRoutes.V4 = 'v4';
|
|
201
|
-
SLRoutes.V5 = 'v5';
|
|
202
|
-
SLRoutes.V6 = 'v6';
|
|
203
|
-
SLRoutes.AGENTS = 'agents';
|
|
204
|
-
SLRoutes.EVENTS = 'events';
|
|
205
|
-
SLRoutes.PRODUCTION = 'productiondata';
|
|
206
|
-
SLRoutes.BSID = 'bsid';
|
|
207
|
-
SLRoutes.BUILD_SESSION_ID = 'buildsession';
|
|
208
|
-
SLRoutes.BUILD_MAPPING = 'buildmapping';
|
|
209
|
-
SLRoutes.RECOMMENDED_VERSION = 'recommended';
|
|
210
|
-
SLRoutes.CONFIG = 'config';
|
|
211
|
-
SLRoutes.LOG_SUBMISSION = 'logsubmission';
|
|
212
|
-
SLRoutes.FOOTPRINTS = 'footprints';
|
|
213
|
-
SLRoutes.TEST_EXECUTION = 'testExecution';
|
|
214
|
-
SLRoutes.EXTERNAL_DATA = 'externaldata';
|
|
215
|
-
SLRoutes.EXTERNAL_REPORT = 'externalreport';
|
|
216
|
-
SLRoutes.BLOBS = 'blobs';
|
|
217
|
-
SLRoutes.AGENT_EVENTS = 'agent-events';
|
|
218
|
-
SLRoutes.PULL_REQUEST = 'pull-request';
|
|
219
|
-
SLRoutes.TEST_EXCLUSIONS = 'test-exclusions';
|
|
220
|
-
SLRoutes.INTEGRATION_BUILDS = 'integration-builds';
|
|
221
|
-
SLRoutes.COMPONENTS = 'components';
|
|
222
|
-
SLRoutes.BUILD_END = 'buildend';
|
|
223
|
-
SLRoutes.LAB_IDS = 'lab-ids';
|
|
224
|
-
SLRoutes.BUILD_SESSIONS = 'build-sessions';
|
|
225
|
-
SLRoutes.ACTIVE = 'active';
|
|
226
|
-
return SLRoutes;
|
|
227
|
-
}());
|
|
193
|
+
}
|
|
194
|
+
}
|
|
228
195
|
exports.SLRoutes = SLRoutes;
|
|
196
|
+
SLRoutes.SLASH = '/';
|
|
197
|
+
SLRoutes.V1 = 'v1';
|
|
198
|
+
SLRoutes.V2 = 'v2';
|
|
199
|
+
SLRoutes.V3 = 'v3';
|
|
200
|
+
SLRoutes.V4 = 'v4';
|
|
201
|
+
SLRoutes.V5 = 'v5';
|
|
202
|
+
SLRoutes.V6 = 'v6';
|
|
203
|
+
SLRoutes.AGENTS = 'agents';
|
|
204
|
+
SLRoutes.EVENTS = 'events';
|
|
205
|
+
SLRoutes.PRODUCTION = 'productiondata';
|
|
206
|
+
SLRoutes.BSID = 'bsid';
|
|
207
|
+
SLRoutes.BUILD_SESSION_ID = 'buildsession';
|
|
208
|
+
SLRoutes.BUILD_MAPPING = 'buildmapping';
|
|
209
|
+
SLRoutes.RECOMMENDED_VERSION = 'recommended';
|
|
210
|
+
SLRoutes.CONFIG = 'config';
|
|
211
|
+
SLRoutes.LOG_SUBMISSION = 'logsubmission';
|
|
212
|
+
SLRoutes.FOOTPRINTS = 'footprints';
|
|
213
|
+
SLRoutes.TEST_EXECUTION = 'testExecution';
|
|
214
|
+
SLRoutes.EXTERNAL_DATA = 'externaldata';
|
|
215
|
+
SLRoutes.EXTERNAL_REPORT = 'externalreport';
|
|
216
|
+
SLRoutes.BLOBS = 'blobs';
|
|
217
|
+
SLRoutes.AGENT_EVENTS = 'agent-events';
|
|
218
|
+
SLRoutes.PULL_REQUEST = 'pull-request';
|
|
219
|
+
SLRoutes.TEST_EXCLUSIONS = 'test-exclusions';
|
|
220
|
+
SLRoutes.INTEGRATION_BUILDS = 'integration-builds';
|
|
221
|
+
SLRoutes.COMPONENTS = 'components';
|
|
222
|
+
SLRoutes.BUILD_END = 'buildend';
|
|
223
|
+
SLRoutes.LAB_IDS = 'lab-ids';
|
|
224
|
+
SLRoutes.BUILD_SESSIONS = 'build-sessions';
|
|
225
|
+
SLRoutes.ACTIVE = 'active';
|
|
229
226
|
//# sourceMappingURL=sl-routes.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sl-routes.js","sourceRoot":"","sources":["../../../common/http/sl-routes.ts"],"names":[],"mappings":";;;AAAA,
|
|
1
|
+
{"version":3,"file":"sl-routes.js","sourceRoot":"","sources":["../../../common/http/sl-routes.ts"],"names":[],"mappings":";;;AAAA,sDAAmD;AACnD,gEAA4D;AAG5D,MAAa,QAAQ;IAiCT,MAAM,CAAC,QAAQ;QACnB,OAAO,QAAQ,CAAC,KAAK,GAAG,QAAQ,CAAC,KAAK,CAAC,QAAQ,CAAC,EAAE,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,QAAQ,CAAC,MAAM,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AAC,IAAI,CAAC;AACR,WAAE,GAAC,IAAI,CAAC;AACR,eAAM,GAAC,QAAQ,CAAC;AAChB,eAAM,GAAG,QAAQ,CAAC;AAClB,mBAAU,GAAC,gBAAgB,CAAC;AAC5B,aAAI,GAAC,MAAM,CAAC;AACZ,yBAAgB,GAAC,cAAc,CAAC;AAChC,sBAAa,GAAC,cAAc,CAAC;AAC7B,4BAAmB,GAAC,aAAa,CAAC;AAClC,eAAM,GAAC,QAAQ,CAAC;AAChB,uBAAc,GAAC,eAAe,CAAC;AAC/B,mBAAU,GAAC,YAAY,CAAC;AACxB,uBAAc,GAAE,eAAe,CAAC;AAChC,sBAAa,GAAE,cAAc,CAAC;AAC9B,wBAAe,GAAE,gBAAgB,CAAC;AAClC,cAAK,GAAE,OAAO,CAAC;AACf,qBAAY,GAAE,cAAc,CAAC;AAC7B,qBAAY,GAAG,cAAc,CAAC;AAC9B,wBAAe,GAAE,iBAAiB,CAAC;AACnC,2BAAkB,GAAG,oBAAoB,CAAC;AAC1C,mBAAU,GAAG,YAAY,CAAC;AAC1B,kBAAS,GAAG,UAAU,CAAC;AACd,gBAAO,GAAE,SAAS,CAAC;AACnB,uBAAc,GAAE,gBAAgB,CAAC;AACjC,eAAM,GAAE,QAAQ,CAAC"}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.IgnoredFilesHandler = void 0;
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
4
|
+
const sl_env_vars_1 = require("./constants/sl-env-vars");
|
|
5
|
+
const files_utils_1 = require("./utils/files-utils");
|
|
6
|
+
const ignore_1 = require("ignore");
|
|
7
|
+
const fs = require("fs");
|
|
8
|
+
class IgnoredFilesHandler {
|
|
9
|
+
constructor(slIgnoreFilePath, outputPath, filename, logger) {
|
|
10
10
|
this.isUsingNycConfig = false;
|
|
11
11
|
this.slIgnoreFilePath = slIgnoreFilePath;
|
|
12
12
|
this.outputPath = outputPath;
|
|
@@ -15,12 +15,12 @@ var IgnoredFilesHandler = /** @class */ (function () {
|
|
|
15
15
|
this.loggedEntries = 0;
|
|
16
16
|
this.initIgnorePatterns();
|
|
17
17
|
}
|
|
18
|
-
|
|
18
|
+
initIgnorePatterns() {
|
|
19
19
|
this.ignoredPatterns = (0, ignore_1.default)().add(this.getRawPatterns());
|
|
20
|
-
}
|
|
21
|
-
|
|
20
|
+
}
|
|
21
|
+
getRawPatterns() {
|
|
22
22
|
if (!this.slIgnoreFilePath) {
|
|
23
|
-
this.logger.info(
|
|
23
|
+
this.logger.info(`'${this.filename}' file does not exists, trying to load nyc configuration.`);
|
|
24
24
|
this.rawPattern = this.readFromNycConfig();
|
|
25
25
|
}
|
|
26
26
|
else {
|
|
@@ -30,25 +30,25 @@ var IgnoredFilesHandler = /** @class */ (function () {
|
|
|
30
30
|
return this.addExcludedPath(this.rawPattern, this.outputPath);
|
|
31
31
|
}
|
|
32
32
|
return this.getDefaultPattern();
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
|
|
33
|
+
}
|
|
34
|
+
readFromSlIgnoreFile() {
|
|
35
|
+
let pattern;
|
|
36
36
|
try {
|
|
37
37
|
pattern = fs.readFileSync(this.slIgnoreFilePath, 'utf8');
|
|
38
|
-
this.logger.info(
|
|
38
|
+
this.logger.info(`Using '${this.filename}' file '${this.slIgnoreFilePath}'`);
|
|
39
39
|
}
|
|
40
40
|
catch (err) {
|
|
41
|
-
this.logger.info(
|
|
41
|
+
this.logger.info(`Failed to read from: '${this.slIgnoreFilePath}'. Using default behavior.`);
|
|
42
42
|
}
|
|
43
43
|
return pattern;
|
|
44
|
-
}
|
|
45
|
-
|
|
44
|
+
}
|
|
45
|
+
getFormattedPattern() {
|
|
46
46
|
if (!this.rawPattern) {
|
|
47
47
|
return null;
|
|
48
48
|
}
|
|
49
49
|
return this.rawPattern.replace(/\n/g, '; ');
|
|
50
|
-
}
|
|
51
|
-
|
|
50
|
+
}
|
|
51
|
+
addExcludedPath(pattern, excludedFolder) {
|
|
52
52
|
if (!excludedFolder)
|
|
53
53
|
return pattern;
|
|
54
54
|
if (excludedFolder && excludedFolder[excludedFolder.length - 1] != '/') { //Ensure the excludedFolder ends with / to comply with gitignore
|
|
@@ -56,44 +56,44 @@ var IgnoredFilesHandler = /** @class */ (function () {
|
|
|
56
56
|
}
|
|
57
57
|
pattern = pattern + '\n' + excludedFolder;
|
|
58
58
|
return pattern;
|
|
59
|
-
}
|
|
60
|
-
|
|
59
|
+
}
|
|
60
|
+
getDefaultPattern() {
|
|
61
61
|
// default pattern - all js files under test directory and it's sub directories.
|
|
62
|
-
|
|
62
|
+
let pattern = '';
|
|
63
63
|
pattern = this.addExcludedPath(pattern, this.outputPath);
|
|
64
64
|
return pattern;
|
|
65
|
-
}
|
|
66
|
-
|
|
65
|
+
}
|
|
66
|
+
readFromNycConfig() {
|
|
67
67
|
try {
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
68
|
+
const cwd = sl_env_vars_1.SlEnvVars.getBasePath() || process.cwd();
|
|
69
|
+
let excludeArr;
|
|
70
|
+
const rcFilePath = files_utils_1.FilesUtils.findFileUp('.nycrc', cwd) || files_utils_1.FilesUtils.findFileUp('.nycrc.json', cwd);
|
|
71
|
+
const packageJsonPath = files_utils_1.FilesUtils.findFileUp('package.json', cwd);
|
|
72
72
|
if (rcFilePath) {
|
|
73
|
-
this.logger.debug(
|
|
73
|
+
this.logger.debug(`Reading nyc exclude from '${rcFilePath}'`);
|
|
74
74
|
excludeArr = this.readNycConfig(rcFilePath, false);
|
|
75
75
|
}
|
|
76
76
|
else if (packageJsonPath) {
|
|
77
|
-
this.logger.debug(
|
|
77
|
+
this.logger.debug(`Reading nyc exclude from '${packageJsonPath}'`);
|
|
78
78
|
excludeArr = this.readNycConfig(packageJsonPath, true);
|
|
79
79
|
}
|
|
80
80
|
return this.createExcludePatternFromNyc(excludeArr);
|
|
81
81
|
}
|
|
82
82
|
catch (err) {
|
|
83
|
-
this.logger.warn(
|
|
83
|
+
this.logger.warn(`Error while trying to read nyc configuration. Error: ${err}`);
|
|
84
84
|
return null;
|
|
85
85
|
}
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
86
|
+
}
|
|
87
|
+
readNycConfig(file, isPackageJson) {
|
|
88
|
+
const fileContent = fs.readFileSync(file);
|
|
89
|
+
const configObject = JSON.parse(fileContent.toString());
|
|
90
|
+
const nycConfig = isPackageJson ? configObject.nyc : configObject;
|
|
91
91
|
if (nycConfig) {
|
|
92
92
|
return nycConfig.exclude;
|
|
93
93
|
}
|
|
94
94
|
return null;
|
|
95
|
-
}
|
|
96
|
-
|
|
95
|
+
}
|
|
96
|
+
createExcludePatternFromNyc(excludeArr) {
|
|
97
97
|
if (!excludeArr) {
|
|
98
98
|
this.logger.info('No files to exclude in nyc configuration');
|
|
99
99
|
return null;
|
|
@@ -101,28 +101,27 @@ var IgnoredFilesHandler = /** @class */ (function () {
|
|
|
101
101
|
this.isUsingNycConfig = true;
|
|
102
102
|
this.logger.debug('Found the following exclude patterns: ' + JSON.stringify(excludeArr, null, '\t'));
|
|
103
103
|
return excludeArr.join('\n');
|
|
104
|
-
}
|
|
105
|
-
|
|
104
|
+
}
|
|
105
|
+
denies(input) {
|
|
106
106
|
try {
|
|
107
107
|
return this.ignoredPatterns.ignores(input);
|
|
108
108
|
}
|
|
109
109
|
catch (e) {
|
|
110
110
|
// TODO: report OBD
|
|
111
111
|
if (this.loggedEntries < IgnoredFilesHandler.MAX_ENTRIES_TO_LOG) {
|
|
112
|
-
this.logger.warn(
|
|
112
|
+
this.logger.warn(`Slignore - Error thrown while checking file '${input}', Error: ${e.message}`);
|
|
113
113
|
this.logger.debug(e);
|
|
114
114
|
this.loggedEntries++;
|
|
115
115
|
}
|
|
116
116
|
return false;
|
|
117
117
|
}
|
|
118
|
-
}
|
|
119
|
-
|
|
118
|
+
}
|
|
119
|
+
accepts(input) {
|
|
120
120
|
return !this.denies(input);
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
IgnoredFilesHandler.GENERATED_IGNORE_FILE_NAME = '.slignore.generated';
|
|
124
|
-
IgnoredFilesHandler.MAX_ENTRIES_TO_LOG = 10;
|
|
125
|
-
return IgnoredFilesHandler;
|
|
126
|
-
}());
|
|
121
|
+
}
|
|
122
|
+
}
|
|
127
123
|
exports.IgnoredFilesHandler = IgnoredFilesHandler;
|
|
124
|
+
IgnoredFilesHandler.SCAN_IGNORE_FILE_NAME = '.slignore';
|
|
125
|
+
IgnoredFilesHandler.GENERATED_IGNORE_FILE_NAME = '.slignore.generated';
|
|
126
|
+
IgnoredFilesHandler.MAX_ENTRIES_TO_LOG = 10;
|
|
128
127
|
//# sourceMappingURL=ignored-files-handler.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ignored-files-handler.js","sourceRoot":"","sources":["../../common/ignored-files-handler.ts"],"names":[],"mappings":";;;AAAA,
|
|
1
|
+
{"version":3,"file":"ignored-files-handler.js","sourceRoot":"","sources":["../../common/ignored-files-handler.ts"],"names":[],"mappings":";;;AAAA,yDAAkD;AAClD,qDAA+C;AAC/C,mCAA4B;AAG5B,yBAAyB;AAGzB,MAAa,mBAAmB;IAa5B,YAAmB,gBAAwB,EAAE,UAAkB,EAAE,QAAgB,EAAE,MAAc;QAL1F,qBAAgB,GAAE,KAAK,CAAC;QAM3B,IAAI,CAAC,gBAAgB,GAAG,gBAAgB,CAAC;QACzC,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC;QAC7B,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;QACzB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,IAAI,CAAC,aAAa,GAAG,CAAC,CAAC;QACvB,IAAI,CAAC,kBAAkB,EAAE,CAAC;IAC9B,CAAC;IAEO,kBAAkB;QACtB,IAAI,CA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