slnodejs 6.1.415 → 6.1.429
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/browser-agent/dist/browser-agent-all.js +1 -1
- package/browser-agent/dist/browser-agent-all.min.js +1 -1
- package/browser-agent/package.json +1 -1
- package/package.json +2 -2
- package/tsOutputs/api.js +32 -86
- package/tsOutputs/build-scanner/ast-utils.js +11 -11
- package/tsOutputs/build-scanner/ast-utils.js.map +1 -1
- package/tsOutputs/build-scanner/build-diff-process.js +35 -16
- package/tsOutputs/build-scanner/build-diff-process.js.map +1 -1
- package/tsOutputs/build-scanner/cia.js +2 -2
- package/tsOutputs/build-scanner/cia.js.map +1 -1
- package/tsOutputs/build-scanner/default-values-resolver.js +5 -7
- package/tsOutputs/build-scanner/default-values-resolver.js.map +1 -1
- package/tsOutputs/build-scanner/diagnostic/build-scan-diagnosis.js +101 -159
- package/tsOutputs/build-scanner/diagnostic/build-scan-diagnosis.js.map +1 -1
- package/tsOutputs/build-scanner/diagnostic/none-diagnosis.js +23 -55
- package/tsOutputs/build-scanner/diagnostic/none-diagnosis.js.map +1 -1
- package/tsOutputs/build-scanner/file-and-folder-utils.js +3 -3
- package/tsOutputs/build-scanner/file-and-folder-utils.js.map +1 -1
- package/tsOutputs/build-scanner/file-system/actual-file.js +3 -3
- package/tsOutputs/build-scanner/file-system/actual-file.js.map +1 -1
- package/tsOutputs/build-scanner/instrumentation/browser-instrumenter.js +56 -60
- package/tsOutputs/build-scanner/instrumentation/browser-instrumenter.js.map +1 -1
- package/tsOutputs/build-scanner/instrumentation/content-instrumenter.js +9 -10
- package/tsOutputs/build-scanner/instrumentation/content-instrumenter.js.map +1 -1
- package/tsOutputs/build-scanner/instrumentation/files-instrumenter.js +80 -124
- package/tsOutputs/build-scanner/instrumentation/files-instrumenter.js.map +1 -1
- package/tsOutputs/build-scanner/instrumentation/instrumentation-utils.js +3 -3
- package/tsOutputs/build-scanner/instrumentation/instrumentation-utils.js.map +1 -1
- package/tsOutputs/build-scanner/instrumentation/instrumented-file-size-reducer.js +4 -4
- package/tsOutputs/build-scanner/instrumentation/instrumented-file-size-reducer.js.map +1 -1
- package/tsOutputs/build-scanner/instrumentation/process-pool/instrumenter-spawn.js +15 -50
- package/tsOutputs/build-scanner/instrumentation/process-pool/instrumenter-spawn.js.map +1 -1
- package/tsOutputs/build-scanner/instrumentation/process-pool/process-pool.js +84 -141
- package/tsOutputs/build-scanner/instrumentation/process-pool/process-pool.js.map +1 -1
- package/tsOutputs/build-scanner/instrumentation/process-pool/split-by-transform-stream.js +15 -34
- package/tsOutputs/build-scanner/instrumentation/process-pool/split-by-transform-stream.js.map +1 -1
- package/tsOutputs/build-scanner/instrumentation/process-pool/stop-by-condition-transform-stream.js +9 -27
- package/tsOutputs/build-scanner/instrumentation/process-pool/stop-by-condition-transform-stream.js.map +1 -1
- package/tsOutputs/build-scanner/instrumentation/strategies/copy-as-is-strategy.js +8 -10
- package/tsOutputs/build-scanner/instrumentation/strategies/copy-as-is-strategy.js.map +1 -1
- package/tsOutputs/build-scanner/instrumentation/strategies/js-instrumnetation-strategy.js +22 -54
- package/tsOutputs/build-scanner/instrumentation/strategies/js-instrumnetation-strategy.js.map +1 -1
- package/tsOutputs/build-scanner/instrumentation/strategies/markup-instrumnetation-strategy.js +55 -107
- package/tsOutputs/build-scanner/instrumentation/strategies/markup-instrumnetation-strategy.js.map +1 -1
- package/tsOutputs/build-scanner/js_diff/file-signature.js +5 -6
- package/tsOutputs/build-scanner/js_diff/file-signature.js.map +1 -1
- package/tsOutputs/build-scanner/js_diff/files-mapping.js +6 -6
- package/tsOutputs/build-scanner/js_diff/files-mapping.js.map +1 -1
- package/tsOutputs/build-scanner/js_diff/generated-file-signature.js +3 -3
- package/tsOutputs/build-scanner/js_diff/generated-file-signature.js.map +1 -1
- package/tsOutputs/build-scanner/js_diff/guess-method-location.js +26 -27
- package/tsOutputs/build-scanner/js_diff/guess-method-location.js.map +1 -1
- package/tsOutputs/build-scanner/js_diff/method-signature.js +1 -1
- package/tsOutputs/build-scanner/js_diff/method-signature.js.map +1 -1
- package/tsOutputs/build-scanner/js_diff/sl-mapper.js +28 -79
- package/tsOutputs/build-scanner/js_diff/sl-mapper.js.map +1 -1
- package/tsOutputs/build-scanner/js_diff/source-data-enricher.js +3 -2
- package/tsOutputs/build-scanner/js_diff/source-data-enricher.js.map +1 -1
- package/tsOutputs/build-scanner/js_diff/source-files-notifier.js +1 -1
- package/tsOutputs/build-scanner/js_diff/source-files-notifier.js.map +1 -1
- package/tsOutputs/build-scanner/mappings/ensure-files-handler.service.js +76 -149
- package/tsOutputs/build-scanner/mappings/ensure-files-handler.service.js.map +1 -1
- package/tsOutputs/build-scanner/mappings/file-element-utils.js +9 -9
- package/tsOutputs/build-scanner/mappings/file-element-utils.js.map +1 -1
- package/tsOutputs/build-scanner/mappings/file-enricher.js +71 -100
- package/tsOutputs/build-scanner/mappings/file-enricher.js.map +1 -1
- package/tsOutputs/build-scanner/mappings/file-path-fixer.js +106 -0
- package/tsOutputs/build-scanner/mappings/file-path-fixer.js.map +1 -0
- package/tsOutputs/build-scanner/mappings/files-container.js +89 -0
- package/tsOutputs/build-scanner/mappings/files-container.js.map +1 -0
- package/tsOutputs/build-scanner/mappings/files-data-container.js +18 -23
- package/tsOutputs/build-scanner/mappings/files-data-container.js.map +1 -1
- package/tsOutputs/build-scanner/mappings/source-path-mapper.js +15 -45
- package/tsOutputs/build-scanner/mappings/source-path-mapper.js.map +1 -1
- package/tsOutputs/build-scanner/markup-files-parser.js +1 -1
- package/tsOutputs/build-scanner/markup-files-parser.js.map +1 -1
- package/tsOutputs/build-scanner/scm/scm-file-fixer.js +27 -0
- package/tsOutputs/build-scanner/scm/scm-file-fixer.js.map +1 -0
- package/tsOutputs/build-scanner/scm/scm-files-container.js +9 -45
- package/tsOutputs/build-scanner/scm/scm-files-container.js.map +1 -1
- package/tsOutputs/build-scanner/sl-config-cia-cli.js +1 -1
- package/tsOutputs/build-scanner/sl-config-cia-cli.js.map +1 -1
- package/tsOutputs/build-scanner/utils.js +5 -5
- package/tsOutputs/build-scanner/utils.js.map +1 -1
- package/tsOutputs/cli-parse/agent-instance-data.js +2 -2
- package/tsOutputs/cli-parse/agent-instance-data.js.map +1 -1
- package/tsOutputs/cli-parse/child-process-wrapper.js +26 -60
- package/tsOutputs/cli-parse/child-process-wrapper.js.map +1 -1
- package/tsOutputs/cli-parse/cli.js +72 -191
- package/tsOutputs/cli-parse/cli.js.map +1 -1
- package/tsOutputs/cli-parse/constants/constants.js +9 -9
- package/tsOutputs/cli-parse/constants/constants.js.map +1 -1
- package/tsOutputs/cli-parse/custom-commander.js +17 -18
- package/tsOutputs/cli-parse/custom-commander.js.map +1 -1
- package/tsOutputs/cli-parse/executors/base-executor.js +121 -236
- package/tsOutputs/cli-parse/executors/base-executor.js.map +1 -1
- package/tsOutputs/cli-parse/executors/build-args-dto.js +10 -11
- package/tsOutputs/cli-parse/executors/build-args-dto.js.map +1 -1
- package/tsOutputs/cli-parse/executors/build-end-executor.js +34 -92
- package/tsOutputs/cli-parse/executors/build-end-executor.js.map +1 -1
- package/tsOutputs/cli-parse/executors/build-executor.js +64 -133
- package/tsOutputs/cli-parse/executors/build-executor.js.map +1 -1
- package/tsOutputs/cli-parse/executors/config-executor.js +35 -92
- package/tsOutputs/cli-parse/executors/config-executor.js.map +1 -1
- package/tsOutputs/cli-parse/executors/dry-run/base-data.js +29 -39
- package/tsOutputs/cli-parse/executors/dry-run/base-data.js.map +1 -1
- package/tsOutputs/cli-parse/executors/dry-run/build-mapping-data.js +92 -177
- package/tsOutputs/cli-parse/executors/dry-run/build-mapping-data.js.map +1 -1
- package/tsOutputs/cli-parse/executors/dry-run/dry-run-executor.js +110 -194
- package/tsOutputs/cli-parse/executors/dry-run/dry-run-executor.js.map +1 -1
- package/tsOutputs/cli-parse/executors/dry-run/dry-run-validation.js +49 -83
- package/tsOutputs/cli-parse/executors/dry-run/dry-run-validation.js.map +1 -1
- package/tsOutputs/cli-parse/executors/dry-run/footprints-data.js +55 -113
- package/tsOutputs/cli-parse/executors/dry-run/footprints-data.js.map +1 -1
- package/tsOutputs/cli-parse/executors/dry-run/helper-methods.js +24 -25
- package/tsOutputs/cli-parse/executors/dry-run/helper-methods.js.map +1 -1
- package/tsOutputs/cli-parse/executors/end-execution-executor.js +16 -64
- package/tsOutputs/cli-parse/executors/end-execution-executor.js.map +1 -1
- package/tsOutputs/cli-parse/executors/integration-build-components-executor.js +29 -82
- package/tsOutputs/cli-parse/executors/integration-build-components-executor.js.map +1 -1
- package/tsOutputs/cli-parse/executors/integration-build-delete-components-executor.js +12 -59
- package/tsOutputs/cli-parse/executors/integration-build-delete-components-executor.js.map +1 -1
- package/tsOutputs/cli-parse/executors/integration-build-update-components-executor.js +9 -58
- package/tsOutputs/cli-parse/executors/integration-build-update-components-executor.js.map +1 -1
- package/tsOutputs/cli-parse/executors/mocha-executor.js +41 -101
- package/tsOutputs/cli-parse/executors/mocha-executor.js.map +1 -1
- package/tsOutputs/cli-parse/executors/nyc-report-executor.js +24 -83
- package/tsOutputs/cli-parse/executors/nyc-report-executor.js.map +1 -1
- package/tsOutputs/cli-parse/executors/pr-config-executor.js +15 -63
- package/tsOutputs/cli-parse/executors/pr-config-executor.js.map +1 -1
- package/tsOutputs/cli-parse/executors/run-executor.js +23 -75
- package/tsOutputs/cli-parse/executors/run-executor.js.map +1 -1
- package/tsOutputs/cli-parse/executors/start-execution-executor.js +16 -64
- package/tsOutputs/cli-parse/executors/start-execution-executor.js.map +1 -1
- package/tsOutputs/cli-parse/executors/test-executions-executor.js +9 -63
- package/tsOutputs/cli-parse/executors/test-executions-executor.js.map +1 -1
- package/tsOutputs/cli-parse/executors/test-listener-executor.js +47 -117
- package/tsOutputs/cli-parse/executors/test-listener-executor.js.map +1 -1
- package/tsOutputs/cli-parse/executors/upload-report-executor.js +23 -71
- package/tsOutputs/cli-parse/executors/upload-report-executor.js.map +1 -1
- package/tsOutputs/cli-parse/utils.js +10 -10
- package/tsOutputs/cli-parse/utils.js.map +1 -1
- package/tsOutputs/common/agent-events/agent-events-controller.js +146 -251
- package/tsOutputs/common/agent-events/agent-events-controller.js.map +1 -1
- package/tsOutputs/common/agent-events/agent-events-guard.js +12 -15
- package/tsOutputs/common/agent-events/agent-events-guard.js.map +1 -1
- package/tsOutputs/common/agent-events/agent-instance-info-builder.js +22 -24
- package/tsOutputs/common/agent-events/agent-instance-info-builder.js.map +1 -1
- package/tsOutputs/common/agent-events/agent-start-info-builder.js +7 -8
- package/tsOutputs/common/agent-events/agent-start-info-builder.js.map +1 -1
- package/tsOutputs/common/agent-events/browser-info-builder.js +9 -10
- package/tsOutputs/common/agent-events/browser-info-builder.js.map +1 -1
- package/tsOutputs/common/agent-events/ci-info-builder.js +12 -13
- package/tsOutputs/common/agent-events/ci-info-builder.js.map +1 -1
- package/tsOutputs/common/agent-events/cockpit-notifier.js +38 -87
- package/tsOutputs/common/agent-events/cockpit-notifier.js.map +1 -1
- package/tsOutputs/common/agent-events/dry-run-agent-events-controller.js +10 -27
- package/tsOutputs/common/agent-events/dry-run-agent-events-controller.js.map +1 -1
- package/tsOutputs/common/agent-events/machine-info-builder.js +21 -22
- package/tsOutputs/common/agent-events/machine-info-builder.js.map +1 -1
- package/tsOutputs/common/agent-events/no-op-agent-events-controller.js +30 -84
- package/tsOutputs/common/agent-events/no-op-agent-events-controller.js.map +1 -1
- package/tsOutputs/common/agent-events/nodejs-env-info-builder.js +7 -8
- package/tsOutputs/common/agent-events/nodejs-env-info-builder.js.map +1 -1
- package/tsOutputs/common/agent-events/sensitive-data-filter.js +3 -4
- package/tsOutputs/common/agent-events/sensitive-data-filter.js.map +1 -1
- package/tsOutputs/common/agent-instance-data.js +23 -28
- package/tsOutputs/common/agent-instance-data.js.map +1 -1
- package/tsOutputs/common/cli-progress.js +16 -19
- package/tsOutputs/common/cli-progress.js.map +1 -1
- package/tsOutputs/common/config-process/config-loader.js +23 -24
- package/tsOutputs/common/config-process/config-loader.js.map +1 -1
- package/tsOutputs/common/config-process/config-system.js +104 -131
- package/tsOutputs/common/config-process/config-system.js.map +1 -1
- package/tsOutputs/common/config-process/config.js +52 -73
- package/tsOutputs/common/config-process/config.js.map +1 -1
- package/tsOutputs/common/config-process/index.js +38 -57
- package/tsOutputs/common/config-process/index.js.map +1 -1
- package/tsOutputs/common/config-process/no-op-config-process.js +9 -29
- package/tsOutputs/common/config-process/no-op-config-process.js.map +1 -1
- package/tsOutputs/common/constants/constants.js +19 -25
- package/tsOutputs/common/constants/constants.js.map +1 -1
- package/tsOutputs/common/constants/sl-env-vars.js +125 -131
- package/tsOutputs/common/constants/sl-env-vars.js.map +1 -1
- package/tsOutputs/common/coverage-elements/file-element.js +66 -103
- package/tsOutputs/common/coverage-elements/file-element.js.map +1 -1
- package/tsOutputs/common/coverage-elements/istanbul-unique-id-converter.js +28 -47
- package/tsOutputs/common/coverage-elements/istanbul-unique-id-converter.js.map +1 -1
- package/tsOutputs/common/coverage-elements/new-id-resolver.js +17 -17
- package/tsOutputs/common/coverage-elements/new-id-resolver.js.map +1 -1
- package/tsOutputs/common/coverage-elements/original-module-loader.js +71 -79
- package/tsOutputs/common/coverage-elements/original-module-loader.js.map +1 -1
- package/tsOutputs/common/coverage-elements/unique-id-converter.js +90 -110
- package/tsOutputs/common/coverage-elements/unique-id-converter.js.map +1 -1
- package/tsOutputs/common/environment-data-service.js +10 -11
- package/tsOutputs/common/environment-data-service.js.map +1 -1
- package/tsOutputs/common/events-process/events-creator.js +20 -32
- package/tsOutputs/common/events-process/events-creator.js.map +1 -1
- package/tsOutputs/common/events-process/index.js +97 -186
- package/tsOutputs/common/events-process/index.js.map +1 -1
- package/tsOutputs/common/footprints-process/collection-interval.js +10 -11
- package/tsOutputs/common/footprints-process/collection-interval.js.map +1 -1
- package/tsOutputs/common/footprints-process/footprints-service-proxy.js +21 -22
- package/tsOutputs/common/footprints-process/footprints-service-proxy.js.map +1 -1
- package/tsOutputs/common/footprints-process/index.js +68 -102
- package/tsOutputs/common/footprints-process/index.js.map +1 -1
- package/tsOutputs/common/footprints-process/istanbul-to-footprints-contract.js +2 -5
- package/tsOutputs/common/footprints-process/istanbul-to-footprints-contract.js.map +1 -1
- package/tsOutputs/common/footprints-process/istanbul-to-footprints.js +160 -162
- package/tsOutputs/common/footprints-process/istanbul-to-footprints.js.map +1 -1
- package/tsOutputs/common/footprints-process/production-footprints-handler.js +103 -156
- package/tsOutputs/common/footprints-process/production-footprints-handler.js.map +1 -1
- package/tsOutputs/common/footprints-process-v6/base-browser-hits-converter.js +30 -48
- package/tsOutputs/common/footprints-process-v6/base-browser-hits-converter.js.map +1 -1
- package/tsOutputs/common/footprints-process-v6/browser-footprints-buffer.js +7 -25
- package/tsOutputs/common/footprints-process-v6/browser-footprints-buffer.js.map +1 -1
- package/tsOutputs/common/footprints-process-v6/buffer-size-helper.js +13 -14
- package/tsOutputs/common/footprints-process-v6/buffer-size-helper.js.map +1 -1
- package/tsOutputs/common/footprints-process-v6/collector-footprints-buffer.js +14 -32
- package/tsOutputs/common/footprints-process-v6/collector-footprints-buffer.js.map +1 -1
- package/tsOutputs/common/footprints-process-v6/collector-footprints-process.js +43 -109
- package/tsOutputs/common/footprints-process-v6/collector-footprints-process.js.map +1 -1
- package/tsOutputs/common/footprints-process-v6/contracts.js +2 -5
- package/tsOutputs/common/footprints-process-v6/contracts.js.map +1 -1
- package/tsOutputs/common/footprints-process-v6/footprints-buffer.js +55 -78
- package/tsOutputs/common/footprints-process-v6/footprints-buffer.js.map +1 -1
- package/tsOutputs/common/footprints-process-v6/hits-collector.js +89 -129
- package/tsOutputs/common/footprints-process-v6/hits-collector.js.map +1 -1
- package/tsOutputs/common/footprints-process-v6/hits-converter.js +70 -78
- package/tsOutputs/common/footprints-process-v6/hits-converter.js.map +1 -1
- package/tsOutputs/common/footprints-process-v6/index.js +204 -347
- package/tsOutputs/common/footprints-process-v6/index.js.map +1 -1
- package/tsOutputs/common/footprints-process-v6/location-formatter.js +2 -2
- package/tsOutputs/common/footprints-process-v6/location-formatter.js.map +1 -1
- package/tsOutputs/common/footprints-process-v6/relative-path-resolver.js +10 -11
- package/tsOutputs/common/footprints-process-v6/relative-path-resolver.js.map +1 -1
- package/tsOutputs/common/footprints-process-v6/remote-browser-hits-converter.js +5 -25
- package/tsOutputs/common/footprints-process-v6/remote-browser-hits-converter.js.map +1 -1
- package/tsOutputs/common/footprints-process-v6/remote-footprints-process.js +6 -57
- package/tsOutputs/common/footprints-process-v6/remote-footprints-process.js.map +1 -1
- package/tsOutputs/common/footprints-process-v6/remote-hits-collector.js +7 -27
- package/tsOutputs/common/footprints-process-v6/remote-hits-collector.js.map +1 -1
- package/tsOutputs/common/footprints-process-v6/source-map-data.js +14 -15
- package/tsOutputs/common/footprints-process-v6/source-map-data.js.map +1 -1
- package/tsOutputs/common/http/backend-proxy.js +222 -321
- package/tsOutputs/common/http/backend-proxy.js.map +1 -1
- package/tsOutputs/common/http/contracts.js +40 -116
- package/tsOutputs/common/http/contracts.js.map +1 -1
- package/tsOutputs/common/http/dry-run-proxy.js +68 -111
- package/tsOutputs/common/http/dry-run-proxy.js.map +1 -1
- package/tsOutputs/common/http/entities-mapper.js +6 -9
- package/tsOutputs/common/http/entities-mapper.js.map +1 -1
- package/tsOutputs/common/http/http-client.js +76 -86
- package/tsOutputs/common/http/http-client.js.map +1 -1
- package/tsOutputs/common/http/sl-routes.js +119 -122
- package/tsOutputs/common/http/sl-routes.js.map +1 -1
- package/tsOutputs/common/ignored-files-handler.js +48 -49
- package/tsOutputs/common/ignored-files-handler.js.map +1 -1
- package/tsOutputs/common/logger.js +66 -88
- package/tsOutputs/common/logger.js.map +1 -1
- package/tsOutputs/common/messages-formatter.js +9 -14
- package/tsOutputs/common/messages-formatter.js.map +1 -1
- package/tsOutputs/common/no-op-state-tracker.js +14 -37
- package/tsOutputs/common/no-op-state-tracker.js.map +1 -1
- package/tsOutputs/common/queue.js +18 -36
- package/tsOutputs/common/queue.js.map +1 -1
- package/tsOutputs/common/scm/git-cloner.js +30 -94
- package/tsOutputs/common/scm/git-cloner.js.map +1 -1
- package/tsOutputs/common/scm/git-format-builder.js +24 -25
- package/tsOutputs/common/scm/git-format-builder.js.map +1 -1
- package/tsOutputs/common/scm/git.js +192 -327
- package/tsOutputs/common/scm/git.js.map +1 -1
- package/tsOutputs/common/scm/none.js +58 -110
- package/tsOutputs/common/scm/none.js.map +1 -1
- package/tsOutputs/common/scm/scm-factory.js +6 -9
- package/tsOutputs/common/scm/scm-factory.js.map +1 -1
- package/tsOutputs/common/short-name-to-file-mapper.js +30 -33
- package/tsOutputs/common/short-name-to-file-mapper.js.map +1 -1
- package/tsOutputs/common/source-map-handler.js +76 -98
- package/tsOutputs/common/source-map-handler.js.map +1 -1
- package/tsOutputs/common/source-map-reader.js +35 -36
- package/tsOutputs/common/source-map-reader.js.map +1 -1
- package/tsOutputs/common/source-maps-utils.js +8 -11
- package/tsOutputs/common/source-maps-utils.js.map +1 -1
- package/tsOutputs/common/state-tracker-fpv6.js +15 -37
- package/tsOutputs/common/state-tracker-fpv6.js.map +1 -1
- package/tsOutputs/common/state-tracker.js +124 -212
- package/tsOutputs/common/state-tracker.js.map +1 -1
- package/tsOutputs/common/system-date.js +3 -3
- package/tsOutputs/common/system-date.js.map +1 -1
- package/tsOutputs/common/utils/abstract-data-builder.js +8 -9
- package/tsOutputs/common/utils/abstract-data-builder.js.map +1 -1
- package/tsOutputs/common/utils/build-session-data-builder.js +25 -79
- package/tsOutputs/common/utils/build-session-data-builder.js.map +1 -1
- package/tsOutputs/common/utils/dependency-utils.js +13 -16
- package/tsOutputs/common/utils/dependency-utils.js.map +1 -1
- package/tsOutputs/common/utils/env-var-parsing.js +10 -14
- package/tsOutputs/common/utils/env-var-parsing.js.map +1 -1
- package/tsOutputs/common/utils/files-utils.js +16 -19
- package/tsOutputs/common/utils/files-utils.js.map +1 -1
- package/tsOutputs/common/utils/process-utils.js +12 -25
- package/tsOutputs/common/utils/process-utils.js.map +1 -1
- package/tsOutputs/common/utils/test-runner-build-session-data-builder.js +16 -62
- package/tsOutputs/common/utils/test-runner-build-session-data-builder.js.map +1 -1
- package/tsOutputs/common/utils/test-utils/mock-server-utils/mock-server-proxy.js +120 -192
- package/tsOutputs/common/utils/test-utils/mock-server-utils/mock-server-proxy.js.map +1 -1
- package/tsOutputs/common/utils/timer-utils.js +4 -7
- package/tsOutputs/common/utils/timer-utils.js.map +1 -1
- package/tsOutputs/common/utils/token-data-builder.js +30 -50
- package/tsOutputs/common/utils/token-data-builder.js.map +1 -1
- package/tsOutputs/common/utils/validation-utils.js +7 -10
- package/tsOutputs/common/utils/validation-utils.js.map +1 -1
- package/tsOutputs/common/uuid.js +7 -10
- package/tsOutputs/common/uuid.js.map +1 -1
- package/tsOutputs/common/v8-utils.js +12 -50
- package/tsOutputs/common/v8-utils.js.map +1 -1
- package/tsOutputs/common/watchdog.js +35 -56
- package/tsOutputs/common/watchdog.js.map +1 -1
- package/tsOutputs/mocha-reporter/index.js +12 -12
- package/tsOutputs/mocha-reporter/index.js.map +1 -1
- package/tsOutputs/mocha-reporter/otel-agent.js +47 -118
- package/tsOutputs/mocha-reporter/otel-agent.js.map +1 -1
- package/tsOutputs/test-listener/SlNodeJsProxy.js +34 -35
- package/tsOutputs/test-listener/SlNodeJsProxy.js.map +1 -1
- package/tsOutputs/test-listener/UserMessageHelper.js +14 -19
- package/tsOutputs/test-listener/UserMessageHelper.js.map +1 -1
- package/tsOutputs/test-listener/agent-loader.js +42 -59
- package/tsOutputs/test-listener/agent-loader.js.map +1 -1
- package/tsOutputs/test-listener/agent.js +93 -150
- package/tsOutputs/test-listener/agent.js.map +1 -1
- package/tsOutputs/test-listener/api.js +36 -70
- package/tsOutputs/test-listener/api.js.map +1 -1
- package/tsOutputs/test-listener/base-proxy.js +25 -27
- package/tsOutputs/test-listener/base-proxy.js.map +1 -1
- package/tsOutputs/test-listener/bootstrap.js +6 -6
- package/tsOutputs/test-listener/bootstrap.js.map +1 -1
- package/tsOutputs/test-listener/child-process-patcher.js +10 -10
- package/tsOutputs/test-listener/child-process-patcher.js.map +1 -1
- package/tsOutputs/test-listener/cli.js +27 -30
- package/tsOutputs/test-listener/cli.js.map +1 -1
- package/tsOutputs/test-listener/coloring/http-coloring.js +30 -33
- package/tsOutputs/test-listener/coloring/http-coloring.js.map +1 -1
- package/tsOutputs/test-listener/coloring/listening-port.js +14 -17
- package/tsOutputs/test-listener/coloring/listening-port.js.map +1 -1
- package/tsOutputs/test-listener/command-line-arg-parser.js +12 -15
- package/tsOutputs/test-listener/command-line-arg-parser.js.map +1 -1
- package/tsOutputs/test-listener/config-process/config-loader.js +21 -22
- package/tsOutputs/test-listener/config-process/config-loader.js.map +1 -1
- package/tsOutputs/test-listener/config-process/config-system.js +100 -127
- package/tsOutputs/test-listener/config-process/config-system.js.map +1 -1
- package/tsOutputs/test-listener/config-process/index.js +38 -57
- package/tsOutputs/test-listener/config-process/index.js.map +1 -1
- package/tsOutputs/test-listener/config.js +38 -59
- package/tsOutputs/test-listener/config.js.map +1 -1
- package/tsOutputs/test-listener/entities/BasicConfigurationData.js +37 -64
- package/tsOutputs/test-listener/entities/BasicConfigurationData.js.map +1 -1
- package/tsOutputs/test-listener/entities/build-scanner/ConfigModeData.js +17 -42
- package/tsOutputs/test-listener/entities/build-scanner/ConfigModeData.js.map +1 -1
- package/tsOutputs/test-listener/entities/build-scanner/ScanModeData.js +19 -45
- package/tsOutputs/test-listener/entities/build-scanner/ScanModeData.js.map +1 -1
- package/tsOutputs/test-listener/environment-data-service.js +10 -11
- package/tsOutputs/test-listener/environment-data-service.js.map +1 -1
- package/tsOutputs/test-listener/execution-process/entities-mapper.js +11 -14
- package/tsOutputs/test-listener/execution-process/entities-mapper.js.map +1 -1
- package/tsOutputs/test-listener/execution-process/execution-service-proxy.js +54 -72
- package/tsOutputs/test-listener/execution-process/execution-service-proxy.js.map +1 -1
- package/tsOutputs/test-listener/execution-process/index.js +26 -26
- package/tsOutputs/test-listener/execution-process/index.js.map +1 -1
- package/tsOutputs/test-listener/factory.js +140 -175
- package/tsOutputs/test-listener/factory.js.map +1 -1
- package/tsOutputs/test-listener/footprints-process/footprints-service-proxy.js +17 -34
- package/tsOutputs/test-listener/footprints-process/footprints-service-proxy.js.map +1 -1
- package/tsOutputs/test-listener/footprints-process/index.js +53 -58
- package/tsOutputs/test-listener/footprints-process/index.js.map +1 -1
- package/tsOutputs/test-listener/footprints-process/istanbul-to-footprints-base.js +49 -50
- package/tsOutputs/test-listener/footprints-process/istanbul-to-footprints-base.js.map +1 -1
- package/tsOutputs/test-listener/footprints-process/istanbul-to-footprints-v3.js +98 -117
- package/tsOutputs/test-listener/footprints-process/istanbul-to-footprints-v3.js.map +1 -1
- package/tsOutputs/test-listener/footprints-process/ts-node-hits-collector.js +57 -141
- package/tsOutputs/test-listener/footprints-process/ts-node-hits-collector.js.map +1 -1
- package/tsOutputs/test-listener/integrations/SlGulp.js +25 -26
- package/tsOutputs/test-listener/integrations/SlGulp.js.map +1 -1
- package/tsOutputs/test-listener/logs-process/index.js +30 -35
- package/tsOutputs/test-listener/logs-process/index.js.map +1 -1
- package/tsOutputs/test-listener/logs-process/log-service-proxy.js +8 -25
- package/tsOutputs/test-listener/logs-process/log-service-proxy.js.map +1 -1
- package/tsOutputs/test-listener/nyc-report-executor-fpv6.js +53 -110
- package/tsOutputs/test-listener/nyc-report-executor-fpv6.js.map +1 -1
- package/tsOutputs/test-listener/nyc-report-executor.js +48 -85
- package/tsOutputs/test-listener/nyc-report-executor.js.map +1 -1
- package/tsOutputs/test-listener/otel-agent-loader.js +30 -33
- package/tsOutputs/test-listener/otel-agent-loader.js.map +1 -1
- package/tsOutputs/test-listener/queue.js +18 -36
- package/tsOutputs/test-listener/queue.js.map +1 -1
- package/tsOutputs/test-listener/remote-agent.js +97 -223
- package/tsOutputs/test-listener/remote-agent.js.map +1 -1
- package/tsOutputs/test-listener/resolvers/AppNameResolver.js +8 -25
- package/tsOutputs/test-listener/resolvers/AppNameResolver.js.map +1 -1
- package/tsOutputs/test-listener/resolvers/ArgumentResolver.js +11 -12
- package/tsOutputs/test-listener/resolvers/ArgumentResolver.js.map +1 -1
- package/tsOutputs/test-listener/resolvers/BuildResolver.js +8 -25
- package/tsOutputs/test-listener/resolvers/BuildResolver.js.map +1 -1
- package/tsOutputs/test-listener/resolvers/BuildSessionIdFileResolver.js +8 -25
- package/tsOutputs/test-listener/resolvers/BuildSessionIdFileResolver.js.map +1 -1
- package/tsOutputs/test-listener/resolvers/BuildSessionIdResolver.js +8 -25
- package/tsOutputs/test-listener/resolvers/BuildSessionIdResolver.js.map +1 -1
- package/tsOutputs/test-listener/resolvers/ProxyResolver.js +8 -25
- package/tsOutputs/test-listener/resolvers/ProxyResolver.js.map +1 -1
- package/tsOutputs/test-listener/resolvers/TokenResolver.js +8 -25
- package/tsOutputs/test-listener/resolvers/TokenResolver.js.map +1 -1
- package/tsOutputs/test-listener/state-tracker-process/index.js +54 -74
- package/tsOutputs/test-listener/state-tracker-process/index.js.map +1 -1
- package/tsOutputs/test-listener/state-tracker-process/state-tracker-proxy.js +18 -37
- package/tsOutputs/test-listener/state-tracker-process/state-tracker-proxy.js.map +1 -1
- package/tsOutputs/test-listener/test-recommendation-handler.js +66 -109
- package/tsOutputs/test-listener/test-recommendation-handler.js.map +1 -1
- package/tsOutputs/test-listener/upload-report-handler.js +33 -35
- package/tsOutputs/test-listener/upload-report-handler.js.map +1 -1
- package/tsOutputs/test-listener/utils.js +13 -14
- package/tsOutputs/test-listener/utils.js.map +1 -1
- package/tsOutputs/test-listener/uuid.js +7 -10
- package/tsOutputs/test-listener/uuid.js.map +1 -1
- package/tsOutputs/test-listener/wait-for-multiple-callbacks.js +17 -19
- package/tsOutputs/test-listener/wait-for-multiple-callbacks.js.map +1 -1
- package/tsOutputs/test-listener/watchdog.js +32 -51
- package/tsOutputs/test-listener/watchdog.js.map +1 -1
- package/tsOutputs/build-scanner/mappings/scm-file-fixer.js +0 -96
- package/tsOutputs/build-scanner/mappings/scm-file-fixer.js.map +0 -1
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.BaseProxy = void 0;
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
const zlib = require("zlib");
|
|
5
|
+
class BaseProxy {
|
|
6
|
+
constructor(cfg, request, logger) {
|
|
7
7
|
this.cfg = cfg;
|
|
8
8
|
this.request = request;
|
|
9
9
|
this.logger = logger;
|
|
@@ -17,8 +17,8 @@ var BaseProxy = /** @class */ (function () {
|
|
|
17
17
|
throw new Error('logger is required');
|
|
18
18
|
}
|
|
19
19
|
}
|
|
20
|
-
|
|
21
|
-
|
|
20
|
+
get(urlPath, callback) {
|
|
21
|
+
const opts = {
|
|
22
22
|
url: this.cfg.server.value + urlPath,
|
|
23
23
|
json: true,
|
|
24
24
|
compressed: true,
|
|
@@ -31,7 +31,7 @@ var BaseProxy = /** @class */ (function () {
|
|
|
31
31
|
opts.proxy = this.cfg.proxy.value;
|
|
32
32
|
this.allowUntrustedCertificates();
|
|
33
33
|
}
|
|
34
|
-
this.request.get(opts,
|
|
34
|
+
this.request.get(opts, (err, response, data) => {
|
|
35
35
|
if (err) {
|
|
36
36
|
return callback(err, null);
|
|
37
37
|
}
|
|
@@ -43,9 +43,9 @@ var BaseProxy = /** @class */ (function () {
|
|
|
43
43
|
}
|
|
44
44
|
return callback(null, data);
|
|
45
45
|
});
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
|
|
46
|
+
}
|
|
47
|
+
delete(urlPath, callback) {
|
|
48
|
+
const opts = {
|
|
49
49
|
url: this.cfg.server + urlPath,
|
|
50
50
|
json: true,
|
|
51
51
|
compressed: true,
|
|
@@ -58,7 +58,7 @@ var BaseProxy = /** @class */ (function () {
|
|
|
58
58
|
opts.proxy = this.cfg.proxy;
|
|
59
59
|
this.allowUntrustedCertificates();
|
|
60
60
|
}
|
|
61
|
-
this.request.delete(opts,
|
|
61
|
+
this.request.delete(opts, (err, response, data) => {
|
|
62
62
|
if (err) {
|
|
63
63
|
return callback(err, null);
|
|
64
64
|
}
|
|
@@ -70,29 +70,28 @@ var BaseProxy = /** @class */ (function () {
|
|
|
70
70
|
}
|
|
71
71
|
return callback(null, data);
|
|
72
72
|
});
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
var shouldZip = this.cfg.gzip.value;
|
|
73
|
+
}
|
|
74
|
+
post(bufferToSend, urlPath, callback) {
|
|
75
|
+
const shouldZip = this.cfg.gzip.value;
|
|
77
76
|
//let bufferToSend = new Buffer(JSON.stringify(packetToSend));
|
|
78
77
|
if (shouldZip) {
|
|
79
|
-
zlib.gzip(bufferToSend,
|
|
78
|
+
zlib.gzip(bufferToSend, (err, compressedBuf) => {
|
|
80
79
|
if (err) {
|
|
81
80
|
//Fallback to sending data uncompressed
|
|
82
|
-
|
|
81
|
+
this.internalPost(urlPath, bufferToSend, null, callback);
|
|
83
82
|
}
|
|
84
83
|
else {
|
|
85
|
-
|
|
84
|
+
this.internalPost(urlPath, compressedBuf, { 'Content-Encoding': 'gzip' }, callback);
|
|
86
85
|
}
|
|
87
86
|
});
|
|
88
87
|
}
|
|
89
88
|
else {
|
|
90
89
|
this.internalPost(urlPath, bufferToSend, null, callback); //Submit buffer as-is
|
|
91
90
|
}
|
|
92
|
-
}
|
|
93
|
-
|
|
91
|
+
}
|
|
92
|
+
internalPost(urlPath, buffer, additionalHeaders, callback) {
|
|
94
93
|
try {
|
|
95
|
-
|
|
94
|
+
const opts = {
|
|
96
95
|
url: this.cfg.server.value + urlPath,
|
|
97
96
|
//json: true,
|
|
98
97
|
compressed: true,
|
|
@@ -103,7 +102,7 @@ var BaseProxy = /** @class */ (function () {
|
|
|
103
102
|
body: buffer,
|
|
104
103
|
};
|
|
105
104
|
if (additionalHeaders) {
|
|
106
|
-
for (
|
|
105
|
+
for (const header in additionalHeaders) { //Copy additional headers
|
|
107
106
|
opts.headers[header] = additionalHeaders[header];
|
|
108
107
|
}
|
|
109
108
|
}
|
|
@@ -111,7 +110,7 @@ var BaseProxy = /** @class */ (function () {
|
|
|
111
110
|
opts.proxy = this.cfg.proxy.value;
|
|
112
111
|
this.allowUntrustedCertificates();
|
|
113
112
|
}
|
|
114
|
-
this.request.post(opts,
|
|
113
|
+
this.request.post(opts, (err, response, data) => {
|
|
115
114
|
if (err)
|
|
116
115
|
return callback(err);
|
|
117
116
|
if (response.statusCode >= 400)
|
|
@@ -123,12 +122,11 @@ var BaseProxy = /** @class */ (function () {
|
|
|
123
122
|
this.logger.error('Failed sending Http POST to :\'' + urlPath + '\'. Error:' + err);
|
|
124
123
|
callback(err);
|
|
125
124
|
}
|
|
126
|
-
}
|
|
127
|
-
|
|
125
|
+
}
|
|
126
|
+
allowUntrustedCertificates() {
|
|
128
127
|
//For more information: https://stackoverflow.com/questions/17383351/how-to-capture-http-messages-from-request-node-library-with-fiddler/22996076#22996076
|
|
129
128
|
process.env['NODE_TLS_REJECT_UNAUTHORIZED'] = '0';
|
|
130
|
-
}
|
|
131
|
-
|
|
132
|
-
}());
|
|
129
|
+
}
|
|
130
|
+
}
|
|
133
131
|
exports.BaseProxy = BaseProxy;
|
|
134
132
|
//# sourceMappingURL=base-proxy.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"base-proxy.js","sourceRoot":"","sources":["../../test-listener/base-proxy.ts"],"names":[],"mappings":";;;AACA,
|
|
1
|
+
{"version":3,"file":"base-proxy.js","sourceRoot":"","sources":["../../test-listener/base-proxy.ts"],"names":[],"mappings":";;;AACA,6BAA8B;AAI9B,MAAsB,SAAS;IAC3B,YAA6B,GAAgB,EAAY,OAA0C,EAAY,MAAc;QAAhG,QAAG,GAAH,GAAG,CAAa;QAAY,YAAO,GAAP,OAAO,CAAmC;QAAY,WAAM,GAAN,MAAM,CAAQ;QACzH,IAAI,CAAC,GAAG,EAAE;YACN,MAAM,IAAI,KAAK,CAAC,iBAAiB,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;YAED,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC,GAAG,EAAE,QAAQ,EAAE,IAAI,EAAE,EAAE;gBAC5C,IAAI,GAAG;oBAAE,OAAO,QAAQ,CAAC,GAAG,CAAC,CAAC;gBAC9B,IAAI,QAAQ,CAAC,UAAU,IAAI,GAAG;oBAC1B,OAAO,QAAQ,CAAC,IAAI,KAAK,CAAC,aAAa,GAAG,QAAQ,CAAC,UAAU,CAAC,CAAC,CAAC;gBACpE,OAAO,QAAQ,CAAC,IAAI,CAAC,CAAC;YAC1B,CAAC,CAAC,CAAC;SACN;QACD,OAAO,GAAG,EAAE;YACR,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,iCAAiC,GAAG,OAAO,GAAG,YAAY,GAAG,GAAG,CAAC,CAAC;YACpF,QAAQ,CAAC,GAAG,CAAC,CAAC;SACjB;IAEL,CAAC;IAEO,0BAA0B;QAC9B,0JAA0J;QAC1J,OAAO,CAAC,GAAG,CAAC,8BAA8B,CAAC,GAAG,GAAG,CAAA;IACrD,CAAC;CACJ;AA1ID,8BA0IC"}
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
const factory_1 = require("./factory");
|
|
4
|
+
const config_loader_1 = require("../common/config-process/config-loader");
|
|
5
5
|
try {
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
const configLoader = new config_loader_1.ConfigLoader();
|
|
7
|
+
let agentCfg = global['agentCfg'];
|
|
8
8
|
if (!agentCfg)
|
|
9
9
|
agentCfg = configLoader.loadAgentConfiguration(null);
|
|
10
|
-
|
|
11
|
-
|
|
10
|
+
const factory = new factory_1.NodeAgentFactory(agentCfg);
|
|
11
|
+
const agent = factory.getCreateNodeJsAgent();
|
|
12
12
|
agent.footprintsProcess.loadSlMapping();
|
|
13
13
|
agent.start();
|
|
14
14
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bootstrap.js","sourceRoot":"","sources":["../../test-listener/bootstrap.ts"],"names":[],"mappings":";;AAAA,
|
|
1
|
+
{"version":3,"file":"bootstrap.js","sourceRoot":"","sources":["../../test-listener/bootstrap.ts"],"names":[],"mappings":";;AAAA,uCAA6C;AAC7C,0EAAoE;AAEpE,IAAI;IACA,MAAM,YAAY,GAAG,IAAI,4BAAY,EAAE,CAAC;IACxC,IAAI,QAAQ,GAAG,MAAM,CAAC,UAAU,CAAC,CAAC;IAClC,IAAI,CAAC,QAAQ;QACT,QAAQ,GAAG,YAAY,CAAC,sBAAsB,CAAC,IAAI,CAAC,CAAC;IACzD,MAAM,OAAO,GAAG,IAAI,0BAAgB,CAAC,QAAQ,CAAC,CAAC;IAC/C,MAAM,KAAK,GAAG,OAAO,CAAC,oBAAoB,EAAE,CAAC;IAC7C,KAAK,CAAC,iBAAiB,CAAC,aAAa,EAAE,CAAC;IACxC,KAAK,CAAC,KAAK,EAAE,CAAC;CACjB;AAAC,OAAO,GAAG,EAAE;IACV,OAAO,CAAC,KAAK,CAAC,iCAAiC,GAAG,GAAG,CAAC,KAAK,CAAC,CAAC;CAChE"}
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
// eslint-disable-next-line @typescript-eslint/no-var-requires
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
const childProcess = require('child_process');
|
|
5
|
+
const shell_quote_1 = require("shell-quote");
|
|
6
|
+
const fs = require("fs");
|
|
7
7
|
function isNodeBinary(command) {
|
|
8
8
|
try {
|
|
9
|
-
|
|
9
|
+
const source = fs.readFileSync(command, 'utf-8');
|
|
10
10
|
// regex taken from eslint - https://github.com/eslint/eslint/blob/183def6115cad6f17c82ef1c1a245eb22d0bee83/lib/eslint.js#L800
|
|
11
|
-
|
|
11
|
+
const result = /^#!([^\r\n]+)/.exec(source);
|
|
12
12
|
if (result && result.length && result[0].indexOf('node') > 0) {
|
|
13
13
|
return true;
|
|
14
14
|
}
|
|
@@ -19,8 +19,8 @@ function isNodeBinary(command) {
|
|
|
19
19
|
}
|
|
20
20
|
}
|
|
21
21
|
function isNodeCommand(command) {
|
|
22
|
-
|
|
23
|
-
|
|
22
|
+
const commandParts = command.split('/');
|
|
23
|
+
const lastPath = commandParts.slice(-1)[0];
|
|
24
24
|
if (lastPath === 'node') {
|
|
25
25
|
return true;
|
|
26
26
|
}
|
|
@@ -40,9 +40,9 @@ function execWrapper(slNodePath, exec) {
|
|
|
40
40
|
return function (command, options, callback) {
|
|
41
41
|
try {
|
|
42
42
|
if (command) {
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
43
|
+
const argv = (0, shell_quote_1.parse)(command);
|
|
44
|
+
const commandArg = argv[0];
|
|
45
|
+
const args = argv.splice(1);
|
|
46
46
|
command = wrapper(commandArg, args, true, slNodePath);
|
|
47
47
|
command = [command].concat(args).join(' ');
|
|
48
48
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"child-process-patcher.js","sourceRoot":"","sources":["../../test-listener/child-process-patcher.ts"],"names":[],"mappings":";;AAAA,8DAA8D;AAC9D,
|
|
1
|
+
{"version":3,"file":"child-process-patcher.js","sourceRoot":"","sources":["../../test-listener/child-process-patcher.ts"],"names":[],"mappings":";;AAAA,8DAA8D;AAC9D,MAAM,YAAY,GAAG,OAAO,CAAC,eAAe,CAAC,CAAC;AAC9C,6CAAqD;AAErD,yBAAyB;AAEzB,SAAS,YAAY,CAAC,OAAO;IACzB,IAAI;QACA,MAAM,MAAM,GAAG,EAAE,CAAC,YAAY,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;QACjD,8HAA8H;QAC9H,MAAM,MAAM,GAAG,eAAe,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;QAC5C,IAAI,MAAM,IAAI,MAAM,CAAC,MAAM,IAAI,MAAM,CAAC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
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.NodeAgentCLI = void 0;
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
4
|
+
const program = require("commander");
|
|
5
|
+
const config_loader_1 = require("./config-process/config-loader");
|
|
6
|
+
const command_line_arg_parser_1 = require("./command-line-arg-parser");
|
|
7
|
+
const agent_loader_1 = require("./agent-loader");
|
|
8
8
|
// eslint-disable-next-line @typescript-eslint/no-var-requires
|
|
9
|
-
|
|
10
|
-
|
|
9
|
+
const Module = require('module');
|
|
10
|
+
const nycBinFile = require.resolve('nyc/bin/nyc.js');
|
|
11
11
|
//TODO: Agent formal CLIs
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
}
|
|
15
|
-
NodeAgentCLI.booleanOption = function (option) {
|
|
12
|
+
class NodeAgentCLI {
|
|
13
|
+
static booleanOption(option) {
|
|
16
14
|
return (option && option.toLowerCase() == 'true');
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
|
|
15
|
+
}
|
|
16
|
+
static execRun(argv, firstArgIdx) {
|
|
17
|
+
const knownRunOptions = {
|
|
20
18
|
'--cfg': { name: 'cfg' },
|
|
21
19
|
'--token': { name: 'token' },
|
|
22
20
|
'--tokenfile': { name: 'tokenFile' },
|
|
@@ -26,15 +24,15 @@ var NodeAgentCLI = /** @class */ (function () {
|
|
|
26
24
|
'--usebranchcoverage': { name: 'useBranchCoverage' },
|
|
27
25
|
'--startagent': { name: 'startAgent', type: 'boolean' }
|
|
28
26
|
};
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
27
|
+
const parsedCmd = new command_line_arg_parser_1.CommandLineArgParser().parseCommand(argv, firstArgIdx, knownRunOptions);
|
|
28
|
+
const configLoader = new config_loader_1.ConfigLoader();
|
|
29
|
+
const agentCfg = configLoader.loadAgentConfiguration(parsedCmd.keysAndValues, parsedCmd.keysAndValues['cfg']);
|
|
30
|
+
const spawnNodeArgs = this.getSpawnNodeArgs();
|
|
33
31
|
agent_loader_1.AgentLoader.init(agentCfg, parsedCmd.restArgs, spawnNodeArgs);
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
32
|
+
}
|
|
33
|
+
static run() {
|
|
34
|
+
const args = process.argv;
|
|
35
|
+
const cmd = args[2];
|
|
38
36
|
if (cmd == 'run')
|
|
39
37
|
return NodeAgentCLI.execRun(process.argv, 3);
|
|
40
38
|
program
|
|
@@ -43,23 +41,22 @@ var NodeAgentCLI = /** @class */ (function () {
|
|
|
43
41
|
program.help();
|
|
44
42
|
});
|
|
45
43
|
program.parse(process.argv);
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
|
|
44
|
+
}
|
|
45
|
+
static runUserCode(args) {
|
|
46
|
+
const bootstrapFile = require.resolve('./bootstrap');
|
|
49
47
|
process.argv = [process.argv0, nycBinFile, '-i', bootstrapFile].concat(args);
|
|
50
48
|
Module.runMain();
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
|
|
49
|
+
}
|
|
50
|
+
static getSpawnNodeArgs() {
|
|
51
|
+
const args = [];
|
|
54
52
|
process.execArgv.forEach(function (arg) {
|
|
55
53
|
if (arg.indexOf('--max_old_space_size') == 0) {
|
|
56
54
|
args.push(arg);
|
|
57
55
|
}
|
|
58
56
|
});
|
|
59
57
|
return args;
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
}());
|
|
58
|
+
}
|
|
59
|
+
}
|
|
63
60
|
exports.NodeAgentCLI = NodeAgentCLI;
|
|
64
61
|
NodeAgentCLI.run();
|
|
65
62
|
//# sourceMappingURL=cli.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cli.js","sourceRoot":"","sources":["../../test-listener/cli.ts"],"names":[],"mappings":";;;AAAA,
|
|
1
|
+
{"version":3,"file":"cli.js","sourceRoot":"","sources":["../../test-listener/cli.ts"],"names":[],"mappings":";;;AAAA,qCAAsC;AACtC,kEAA8D;AAC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perty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.HttpColoring = void 0;
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
}
|
|
15
|
-
HttpColoring.prototype.setup = function (config, stateTracker, log) {
|
|
7
|
+
const url = require("url");
|
|
8
|
+
const objectAssign = require("object-assign");
|
|
9
|
+
const http = require("http");
|
|
10
|
+
const https = require("https");
|
|
11
|
+
const cookie = require("lightcookie");
|
|
12
|
+
class HttpColoring {
|
|
13
|
+
setup(config, stateTracker, log) {
|
|
16
14
|
this.setupHttpColoring(config, stateTracker, log);
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
}
|
|
20
|
-
|
|
15
|
+
}
|
|
16
|
+
teardown() {
|
|
17
|
+
}
|
|
18
|
+
setupHttpColoring(config, stateTracker, log) {
|
|
21
19
|
if (config.httpServerColoring.value) {
|
|
22
20
|
this.setupHttpServerColoring(config, stateTracker, log);
|
|
23
21
|
}
|
|
@@ -30,7 +28,7 @@ var HttpColoring = /** @class */ (function () {
|
|
|
30
28
|
else {
|
|
31
29
|
log.info('HTTP Client coloring is disabled');
|
|
32
30
|
}
|
|
33
|
-
}
|
|
31
|
+
}
|
|
34
32
|
/*
|
|
35
33
|
*
|
|
36
34
|
* Server coloring means that we wrap the prototype of "Http.Server" in such a way that:
|
|
@@ -39,23 +37,23 @@ var HttpColoring = /** @class */ (function () {
|
|
|
39
37
|
*
|
|
40
38
|
* Basically this handles all the INCOMING requests and their responses.
|
|
41
39
|
* */
|
|
42
|
-
|
|
40
|
+
setupHttpServerColoring(config, stateTracker, log) {
|
|
43
41
|
function wrapListener(listener) {
|
|
44
42
|
if (typeof listener !== 'function')
|
|
45
43
|
return listener;
|
|
46
44
|
return function (request, response) {
|
|
47
45
|
try {
|
|
48
46
|
if (request && request.headers) {
|
|
49
|
-
|
|
47
|
+
let newTestIdentifier = request.headers[HttpColoring.COLORING_HEADER_NAME];
|
|
50
48
|
if (newTestIdentifier) {
|
|
51
49
|
log.info('Got test identifier from Sealights HTTP header: ' + newTestIdentifier);
|
|
52
50
|
}
|
|
53
51
|
else {
|
|
54
|
-
|
|
52
|
+
const cookiesHeader = request.headers['cookie'];
|
|
55
53
|
if (cookiesHeader) {
|
|
56
54
|
try {
|
|
57
55
|
log.info('\'Got cookiesHeader: \'' + cookiesHeader + '\'');
|
|
58
|
-
|
|
56
|
+
const parsed = cookie.parse(cookiesHeader) || {};
|
|
59
57
|
newTestIdentifier = parsed[HttpColoring.COLORING_HEADER_NAME];
|
|
60
58
|
if (newTestIdentifier) {
|
|
61
59
|
log.info('\'Got test identifier from HTTP cookie: \'' + newTestIdentifier + '\'');
|
|
@@ -65,7 +63,7 @@ var HttpColoring = /** @class */ (function () {
|
|
|
65
63
|
}
|
|
66
64
|
}
|
|
67
65
|
catch (e) {
|
|
68
|
-
log.error(
|
|
66
|
+
log.error(`Got invalid cookie header: '${cookiesHeader}' Error: ${e}`);
|
|
69
67
|
}
|
|
70
68
|
}
|
|
71
69
|
}
|
|
@@ -79,7 +77,7 @@ var HttpColoring = /** @class */ (function () {
|
|
|
79
77
|
log.error('Exception in server communication hook: ' + e);
|
|
80
78
|
}
|
|
81
79
|
try {
|
|
82
|
-
|
|
80
|
+
const currentTestIdentifier = stateTracker.getCurrentTestIdentifier();
|
|
83
81
|
if (currentTestIdentifier) {
|
|
84
82
|
response.setHeader(HttpColoring.COLORING_HEADER_NAME, currentTestIdentifier);
|
|
85
83
|
}
|
|
@@ -99,10 +97,10 @@ var HttpColoring = /** @class */ (function () {
|
|
|
99
97
|
return oldListener.apply(this, arguments);
|
|
100
98
|
};
|
|
101
99
|
}
|
|
102
|
-
|
|
100
|
+
const httpServerPrototype = http.Server.prototype;
|
|
103
101
|
httpServerPrototype.on = hookAddListenerFunction(httpServerPrototype.on);
|
|
104
102
|
httpServerPrototype.addListener = hookAddListenerFunction(httpServerPrototype.addListener);
|
|
105
|
-
}
|
|
103
|
+
}
|
|
106
104
|
/*
|
|
107
105
|
*
|
|
108
106
|
* Client coloring means that we wrap 'http.request' and 'https.request' in such a way that:
|
|
@@ -113,10 +111,10 @@ var HttpColoring = /** @class */ (function () {
|
|
|
113
111
|
*
|
|
114
112
|
* Basically this handles all the OUTGOING requests and their responses.
|
|
115
113
|
* */
|
|
116
|
-
|
|
114
|
+
setupHttpClientColoring(config, stateTracker, log) {
|
|
117
115
|
function hookRequestFunction(oldRequest, protocol) {
|
|
118
116
|
return function (options, callback) {
|
|
119
|
-
|
|
117
|
+
const currentTestIdentifier = stateTracker.getCurrentTestIdentifier();
|
|
120
118
|
try {
|
|
121
119
|
if (currentTestIdentifier) {
|
|
122
120
|
if (typeof options === 'string') {
|
|
@@ -127,7 +125,7 @@ var HttpColoring = /** @class */ (function () {
|
|
|
127
125
|
}
|
|
128
126
|
options.headers = options.headers || {};
|
|
129
127
|
options.protocol = options.protocol || protocol;
|
|
130
|
-
|
|
128
|
+
let fullUrl = url.format(options);
|
|
131
129
|
if (options.path)
|
|
132
130
|
fullUrl += options.path; //according to the docs, the generated url will NOT include the path
|
|
133
131
|
if (options.href) {
|
|
@@ -137,7 +135,7 @@ var HttpColoring = /** @class */ (function () {
|
|
|
137
135
|
//config.server.value: "https://DEV-nadav-gw.sealights.co/api"
|
|
138
136
|
fullUrl = options.href;
|
|
139
137
|
}
|
|
140
|
-
|
|
138
|
+
const shouldSend = shouldSendHeader(config.server.value, options.method, fullUrl, currentTestIdentifier);
|
|
141
139
|
if (shouldSend) {
|
|
142
140
|
log.info('Sending test identifier: ' + currentTestIdentifier + ', url:' + fullUrl);
|
|
143
141
|
options.headers[HttpColoring.COLORING_HEADER_NAME] = currentTestIdentifier;
|
|
@@ -147,10 +145,10 @@ var HttpColoring = /** @class */ (function () {
|
|
|
147
145
|
catch (e) {
|
|
148
146
|
log.error('Exception in client communication hook: ' + e);
|
|
149
147
|
}
|
|
150
|
-
|
|
148
|
+
const originalCallback = callback;
|
|
151
149
|
callback = function (res) {
|
|
152
150
|
if (res && res.headers && res.headers[HttpColoring.COLORING_HEADER_NAME]) {
|
|
153
|
-
|
|
151
|
+
const newTestIdentifier = res.headers[HttpColoring.COLORING_HEADER_NAME];
|
|
154
152
|
if (newTestIdentifier) {
|
|
155
153
|
try {
|
|
156
154
|
log.info('Setting color from server response. newTestIdentifier:\'' + newTestIdentifier + '\'.');
|
|
@@ -163,7 +161,7 @@ var HttpColoring = /** @class */ (function () {
|
|
|
163
161
|
}
|
|
164
162
|
originalCallback && originalCallback.apply(this, arguments);
|
|
165
163
|
};
|
|
166
|
-
|
|
164
|
+
const req = oldRequest(options, callback);
|
|
167
165
|
return req;
|
|
168
166
|
};
|
|
169
167
|
}
|
|
@@ -181,9 +179,8 @@ var HttpColoring = /** @class */ (function () {
|
|
|
181
179
|
}
|
|
182
180
|
http.request = hookRequestFunction(http.request, 'http:');
|
|
183
181
|
https.request = hookRequestFunction(https.request, 'https:');
|
|
184
|
-
}
|
|
185
|
-
|
|
186
|
-
return HttpColoring;
|
|
187
|
-
}());
|
|
182
|
+
}
|
|
183
|
+
}
|
|
188
184
|
exports.HttpColoring = HttpColoring;
|
|
185
|
+
HttpColoring.COLORING_HEADER_NAME = 'x-sl-testid';
|
|
189
186
|
//# sourceMappingURL=http-coloring.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"http-coloring.js","sourceRoot":"","sources":["../../../test-listener/coloring/http-coloring.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAEH,
|
|
1
|
+
{"version":3,"file":"http-coloring.js","sourceRoot":"","sources":["../../../test-listener/coloring/http-coloring.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAEH,2BAA4B;AAC5B,8CAA+C;AAC/C,6BAA8B;AAC9B,+BAAgC;AAEhC,sCAAuC;AAKvC,MAAa,YAAY;IAGd,KAAK,CAAC,MAAmB,EAAE,YAA0B,EAAE,GAAW;QACrE,IAAI,CAAC,iBAAiB,CAAC,MAAM,EAAE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QAED,SAAS,gBAAgB,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,qBAAqB;YACpE,IAAG,CAAC,qBAAqB,EAAC;gBACtB,OAAO,KAAK,CAAA;aACf;YACD,IAAG,MAAM,KAAK,SAAS,EAAC;gBACpB,OAAO,KAAK,CAAC;aAChB;YACD,OAAO,CAAC,iBAAiB,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;QAC/C,CAAC;QAED,SAAS,iBAAiB,CAAC,OAAO,EAAE,MAAM;YACtC,OAAO,OAAO,CAAC,WAAW,EAAE,CAAC,OAAO,CAAC,MAAM,CAAC,WAAW,EAAE,CAAC,KAAK,CAAC,CAAC;QACrE,CAAC;QAED,IAAI,CAAC,OAAO,GAAG,mBAAmB,CAAC,IAAI,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;QAC1D,KAAK,CAAC,OAAO,GAAG,mBAAmB,CAAC,KAAK,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAC;IACjE,CAAC;;AAvLL,oCAwLC;AAvLiB,iCAAoB,GAAG,aAAa,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.ListeningPort = void 0;
|
|
4
|
-
|
|
4
|
+
const http = require("http");
|
|
5
5
|
/**
|
|
6
6
|
* Created by nadav on 19/03/2017.
|
|
7
7
|
*/
|
|
@@ -10,17 +10,15 @@ var http = require("http");
|
|
|
10
10
|
* We'll probably need that when the client's uses something that is unsupported (ie, not HTTP).
|
|
11
11
|
* The actual color will be set by the HttpColoring class.
|
|
12
12
|
* */
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
}
|
|
16
|
-
ListeningPort.prototype.setup = function (config, stateTracker, log) {
|
|
13
|
+
class ListeningPort {
|
|
14
|
+
setup(config, stateTracker, log) {
|
|
17
15
|
this.setupListeningPort(config, log);
|
|
18
|
-
}
|
|
19
|
-
|
|
16
|
+
}
|
|
17
|
+
teardown() {
|
|
20
18
|
this.stopListening();
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
|
|
19
|
+
}
|
|
20
|
+
setupListeningPort(config, log) {
|
|
21
|
+
const httpListeningPort = config.httpListeningPort.value;
|
|
24
22
|
if (httpListeningPort) {
|
|
25
23
|
//Create a server
|
|
26
24
|
this.server = http.createServer(this.handleRequest);
|
|
@@ -34,16 +32,15 @@ var ListeningPort = /** @class */ (function () {
|
|
|
34
32
|
}
|
|
35
33
|
});
|
|
36
34
|
}
|
|
37
|
-
}
|
|
38
|
-
|
|
35
|
+
}
|
|
36
|
+
handleRequest(request, response) {
|
|
39
37
|
response.end();
|
|
40
|
-
}
|
|
41
|
-
|
|
38
|
+
}
|
|
39
|
+
stopListening() {
|
|
42
40
|
if (this.server) {
|
|
43
41
|
this.server.close();
|
|
44
42
|
}
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
}());
|
|
43
|
+
}
|
|
44
|
+
}
|
|
48
45
|
exports.ListeningPort = ListeningPort;
|
|
49
46
|
//# sourceMappingURL=listening-port.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"listening-port.js","sourceRoot":"","sources":["../../../test-listener/coloring/listening-port.ts"],"names":[],"mappings":";;;AACA,
|
|
1
|
+
{"version":3,"file":"listening-port.js","sourceRoot":"","sources":["../../../test-listener/coloring/listening-port.ts"],"names":[],"mappings":";;;AACA,6BAA8B;AAM9B;;GAEG;AAEH;;;;KAIK;AACL,MAAa,aAAa;IAGtB,KAAK,CAAC,MAAmB,EAAE,YAA0B,EAAE,GAAW;QAC9D,IAAI,CAAC,kBAAkB,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IACzC,CAAC;IAED,QAAQ;QACJ,IAAI,CAAC,aAAa,EAAE,CAAC;IACzB,CAAC;IAEO,kBAAkB,CAAC,MAAmB,EAAE,GAAW;QAEvD,MAAM,iBAAiB,GAAG,MAAM,CAAC,iBAAiB,CAAC,KAAK,CAAC;QAEzD,IAAI,iBAAiB,EAAE;YAEnB,iBAAiB;YACjB,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC;YACpD,uBAAuB;YACvB,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,iBAAiB,EAAE;gBAClC,GAAG,CAAC,IAAI,CAAC,6CAA6C,GAAG,iBAAiB,GAAG,GAAG,CAAC,CAAA;gBACjF,IAAI;oBACA,IAAI,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC,CAAC,+DAA+D;iBACvF;gBACD,OAAO,CAAC,EAAE;iBACT;YACL,CAAC,CAAC,CAAC;SACN;IAGL,CAAC;IAEO,aAAa,CAAC,OAAO,EAAE,QAAQ;QACnC,QAAQ,CAAC,GAAG,EAAE,CAAC;IACnB,CAAC;IAGO,aAAa;QACjB,IAAI,IAAI,CAAC,MAAM,EAAE;YACb,IAAI,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC;SACvB;IACL,CAAC;CAEJ;AA5CD,sCA4CC"}
|