slnodejs 6.1.410 → 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 +33 -28
- package/browser-agent/dist/browser-agent-all.min.js +2 -2
- 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 +36 -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 +57 -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 +74 -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/contracts.d.ts +2 -0
- package/tsOutputs/cli-parse/contracts.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 +11 -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 +68 -132
- package/tsOutputs/cli-parse/executors/build-executor.js.map +1 -1
- package/tsOutputs/cli-parse/executors/config-executor.js +35 -92
- package/tsOutputs/cli-parse/executors/config-executor.js.map +1 -1
- package/tsOutputs/cli-parse/executors/dry-run/base-data.js +29 -39
- package/tsOutputs/cli-parse/executors/dry-run/base-data.js.map +1 -1
- package/tsOutputs/cli-parse/executors/dry-run/build-mapping-data.js +92 -177
- package/tsOutputs/cli-parse/executors/dry-run/build-mapping-data.js.map +1 -1
- package/tsOutputs/cli-parse/executors/dry-run/dry-run-executor.js +110 -194
- package/tsOutputs/cli-parse/executors/dry-run/dry-run-executor.js.map +1 -1
- package/tsOutputs/cli-parse/executors/dry-run/dry-run-validation.js +49 -83
- package/tsOutputs/cli-parse/executors/dry-run/dry-run-validation.js.map +1 -1
- package/tsOutputs/cli-parse/executors/dry-run/footprints-data.js +55 -113
- package/tsOutputs/cli-parse/executors/dry-run/footprints-data.js.map +1 -1
- package/tsOutputs/cli-parse/executors/dry-run/helper-methods.js +24 -25
- package/tsOutputs/cli-parse/executors/dry-run/helper-methods.js.map +1 -1
- package/tsOutputs/cli-parse/executors/end-execution-executor.js +16 -64
- package/tsOutputs/cli-parse/executors/end-execution-executor.js.map +1 -1
- package/tsOutputs/cli-parse/executors/integration-build-components-executor.js +29 -82
- package/tsOutputs/cli-parse/executors/integration-build-components-executor.js.map +1 -1
- package/tsOutputs/cli-parse/executors/integration-build-delete-components-executor.js +12 -59
- package/tsOutputs/cli-parse/executors/integration-build-delete-components-executor.js.map +1 -1
- package/tsOutputs/cli-parse/executors/integration-build-update-components-executor.js +9 -58
- package/tsOutputs/cli-parse/executors/integration-build-update-components-executor.js.map +1 -1
- package/tsOutputs/cli-parse/executors/mocha-executor.js +41 -101
- package/tsOutputs/cli-parse/executors/mocha-executor.js.map +1 -1
- package/tsOutputs/cli-parse/executors/nyc-report-executor.js +24 -83
- package/tsOutputs/cli-parse/executors/nyc-report-executor.js.map +1 -1
- package/tsOutputs/cli-parse/executors/pr-config-executor.js +15 -63
- package/tsOutputs/cli-parse/executors/pr-config-executor.js.map +1 -1
- package/tsOutputs/cli-parse/executors/run-executor.js +23 -75
- package/tsOutputs/cli-parse/executors/run-executor.js.map +1 -1
- package/tsOutputs/cli-parse/executors/start-execution-executor.js +16 -64
- package/tsOutputs/cli-parse/executors/start-execution-executor.js.map +1 -1
- package/tsOutputs/cli-parse/executors/test-executions-executor.js +9 -63
- package/tsOutputs/cli-parse/executors/test-executions-executor.js.map +1 -1
- package/tsOutputs/cli-parse/executors/test-listener-executor.js +47 -117
- package/tsOutputs/cli-parse/executors/test-listener-executor.js.map +1 -1
- package/tsOutputs/cli-parse/executors/upload-report-executor.js +23 -71
- package/tsOutputs/cli-parse/executors/upload-report-executor.js.map +1 -1
- package/tsOutputs/cli-parse/utils.js +10 -10
- package/tsOutputs/cli-parse/utils.js.map +1 -1
- package/tsOutputs/common/agent-events/agent-events-controller.js +146 -251
- package/tsOutputs/common/agent-events/agent-events-controller.js.map +1 -1
- package/tsOutputs/common/agent-events/agent-events-guard.js +12 -15
- package/tsOutputs/common/agent-events/agent-events-guard.js.map +1 -1
- package/tsOutputs/common/agent-events/agent-instance-info-builder.js +22 -24
- package/tsOutputs/common/agent-events/agent-instance-info-builder.js.map +1 -1
- package/tsOutputs/common/agent-events/agent-start-info-builder.js +7 -8
- package/tsOutputs/common/agent-events/agent-start-info-builder.js.map +1 -1
- package/tsOutputs/common/agent-events/browser-info-builder.js +9 -10
- package/tsOutputs/common/agent-events/browser-info-builder.js.map +1 -1
- package/tsOutputs/common/agent-events/ci-info-builder.js +12 -13
- package/tsOutputs/common/agent-events/ci-info-builder.js.map +1 -1
- package/tsOutputs/common/agent-events/cockpit-notifier.js +38 -87
- package/tsOutputs/common/agent-events/cockpit-notifier.js.map +1 -1
- package/tsOutputs/common/agent-events/dry-run-agent-events-controller.js +10 -27
- package/tsOutputs/common/agent-events/dry-run-agent-events-controller.js.map +1 -1
- package/tsOutputs/common/agent-events/machine-info-builder.js +21 -22
- package/tsOutputs/common/agent-events/machine-info-builder.js.map +1 -1
- package/tsOutputs/common/agent-events/no-op-agent-events-controller.js +30 -84
- package/tsOutputs/common/agent-events/no-op-agent-events-controller.js.map +1 -1
- package/tsOutputs/common/agent-events/nodejs-env-info-builder.js +7 -8
- package/tsOutputs/common/agent-events/nodejs-env-info-builder.js.map +1 -1
- package/tsOutputs/common/agent-events/sensitive-data-filter.js +3 -4
- package/tsOutputs/common/agent-events/sensitive-data-filter.js.map +1 -1
- package/tsOutputs/common/agent-instance-data.js +23 -28
- package/tsOutputs/common/agent-instance-data.js.map +1 -1
- package/tsOutputs/common/cli-progress.js +16 -19
- package/tsOutputs/common/cli-progress.js.map +1 -1
- package/tsOutputs/common/config-process/config-loader.js +23 -24
- package/tsOutputs/common/config-process/config-loader.js.map +1 -1
- package/tsOutputs/common/config-process/config-system.js +104 -131
- package/tsOutputs/common/config-process/config-system.js.map +1 -1
- package/tsOutputs/common/config-process/config.js +52 -73
- package/tsOutputs/common/config-process/config.js.map +1 -1
- package/tsOutputs/common/config-process/index.js +38 -57
- package/tsOutputs/common/config-process/index.js.map +1 -1
- package/tsOutputs/common/config-process/no-op-config-process.js +9 -29
- package/tsOutputs/common/config-process/no-op-config-process.js.map +1 -1
- package/tsOutputs/common/constants/constants.js +19 -25
- package/tsOutputs/common/constants/constants.js.map +1 -1
- package/tsOutputs/common/constants/sl-env-vars.js +125 -131
- package/tsOutputs/common/constants/sl-env-vars.js.map +1 -1
- package/tsOutputs/common/coverage-elements/file-element.js +66 -103
- package/tsOutputs/common/coverage-elements/file-element.js.map +1 -1
- package/tsOutputs/common/coverage-elements/istanbul-unique-id-converter.js +28 -47
- package/tsOutputs/common/coverage-elements/istanbul-unique-id-converter.js.map +1 -1
- package/tsOutputs/common/coverage-elements/new-id-resolver.js +17 -17
- package/tsOutputs/common/coverage-elements/new-id-resolver.js.map +1 -1
- package/tsOutputs/common/coverage-elements/original-module-loader.js +71 -79
- package/tsOutputs/common/coverage-elements/original-module-loader.js.map +1 -1
- package/tsOutputs/common/coverage-elements/unique-id-converter.js +90 -110
- package/tsOutputs/common/coverage-elements/unique-id-converter.js.map +1 -1
- package/tsOutputs/common/environment-data-service.js +10 -11
- package/tsOutputs/common/environment-data-service.js.map +1 -1
- package/tsOutputs/common/events-process/events-creator.js +20 -32
- package/tsOutputs/common/events-process/events-creator.js.map +1 -1
- package/tsOutputs/common/events-process/index.js +97 -186
- package/tsOutputs/common/events-process/index.js.map +1 -1
- package/tsOutputs/common/footprints-process/collection-interval.js +10 -11
- package/tsOutputs/common/footprints-process/collection-interval.js.map +1 -1
- package/tsOutputs/common/footprints-process/footprints-service-proxy.js +21 -22
- package/tsOutputs/common/footprints-process/footprints-service-proxy.js.map +1 -1
- package/tsOutputs/common/footprints-process/index.js +68 -102
- package/tsOutputs/common/footprints-process/index.js.map +1 -1
- package/tsOutputs/common/footprints-process/istanbul-to-footprints-contract.js +2 -5
- package/tsOutputs/common/footprints-process/istanbul-to-footprints-contract.js.map +1 -1
- package/tsOutputs/common/footprints-process/istanbul-to-footprints.js +160 -162
- package/tsOutputs/common/footprints-process/istanbul-to-footprints.js.map +1 -1
- package/tsOutputs/common/footprints-process/production-footprints-handler.js +103 -156
- package/tsOutputs/common/footprints-process/production-footprints-handler.js.map +1 -1
- package/tsOutputs/common/footprints-process-v6/base-browser-hits-converter.js +30 -48
- package/tsOutputs/common/footprints-process-v6/base-browser-hits-converter.js.map +1 -1
- package/tsOutputs/common/footprints-process-v6/browser-footprints-buffer.js +7 -25
- package/tsOutputs/common/footprints-process-v6/browser-footprints-buffer.js.map +1 -1
- package/tsOutputs/common/footprints-process-v6/buffer-size-helper.js +13 -14
- package/tsOutputs/common/footprints-process-v6/buffer-size-helper.js.map +1 -1
- package/tsOutputs/common/footprints-process-v6/collector-footprints-buffer.js +14 -32
- package/tsOutputs/common/footprints-process-v6/collector-footprints-buffer.js.map +1 -1
- package/tsOutputs/common/footprints-process-v6/collector-footprints-process.js +43 -109
- package/tsOutputs/common/footprints-process-v6/collector-footprints-process.js.map +1 -1
- package/tsOutputs/common/footprints-process-v6/contracts.js +2 -5
- package/tsOutputs/common/footprints-process-v6/contracts.js.map +1 -1
- package/tsOutputs/common/footprints-process-v6/footprints-buffer.js +55 -78
- package/tsOutputs/common/footprints-process-v6/footprints-buffer.js.map +1 -1
- package/tsOutputs/common/footprints-process-v6/hits-collector.js +89 -129
- package/tsOutputs/common/footprints-process-v6/hits-collector.js.map +1 -1
- package/tsOutputs/common/footprints-process-v6/hits-converter.js +70 -78
- package/tsOutputs/common/footprints-process-v6/hits-converter.js.map +1 -1
- package/tsOutputs/common/footprints-process-v6/index.js +204 -347
- package/tsOutputs/common/footprints-process-v6/index.js.map +1 -1
- package/tsOutputs/common/footprints-process-v6/location-formatter.js +2 -2
- package/tsOutputs/common/footprints-process-v6/location-formatter.js.map +1 -1
- package/tsOutputs/common/footprints-process-v6/relative-path-resolver.js +10 -11
- package/tsOutputs/common/footprints-process-v6/relative-path-resolver.js.map +1 -1
- package/tsOutputs/common/footprints-process-v6/remote-browser-hits-converter.js +5 -25
- package/tsOutputs/common/footprints-process-v6/remote-browser-hits-converter.js.map +1 -1
- package/tsOutputs/common/footprints-process-v6/remote-footprints-process.js +6 -57
- package/tsOutputs/common/footprints-process-v6/remote-footprints-process.js.map +1 -1
- package/tsOutputs/common/footprints-process-v6/remote-hits-collector.js +7 -27
- package/tsOutputs/common/footprints-process-v6/remote-hits-collector.js.map +1 -1
- package/tsOutputs/common/footprints-process-v6/source-map-data.js +14 -15
- package/tsOutputs/common/footprints-process-v6/source-map-data.js.map +1 -1
- package/tsOutputs/common/http/backend-proxy.js +222 -321
- package/tsOutputs/common/http/backend-proxy.js.map +1 -1
- package/tsOutputs/common/http/contracts.js +40 -116
- package/tsOutputs/common/http/contracts.js.map +1 -1
- package/tsOutputs/common/http/dry-run-proxy.js +68 -111
- package/tsOutputs/common/http/dry-run-proxy.js.map +1 -1
- package/tsOutputs/common/http/entities-mapper.js +6 -9
- package/tsOutputs/common/http/entities-mapper.js.map +1 -1
- package/tsOutputs/common/http/http-client.js +76 -86
- package/tsOutputs/common/http/http-client.js.map +1 -1
- package/tsOutputs/common/http/sl-routes.js +119 -122
- package/tsOutputs/common/http/sl-routes.js.map +1 -1
- package/tsOutputs/common/ignored-files-handler.js +48 -49
- package/tsOutputs/common/ignored-files-handler.js.map +1 -1
- package/tsOutputs/common/logger.js +66 -88
- package/tsOutputs/common/logger.js.map +1 -1
- package/tsOutputs/common/messages-formatter.js +9 -14
- package/tsOutputs/common/messages-formatter.js.map +1 -1
- package/tsOutputs/common/no-op-state-tracker.js +14 -37
- package/tsOutputs/common/no-op-state-tracker.js.map +1 -1
- package/tsOutputs/common/queue.js +18 -36
- package/tsOutputs/common/queue.js.map +1 -1
- package/tsOutputs/common/scm/git-cloner.js +30 -94
- package/tsOutputs/common/scm/git-cloner.js.map +1 -1
- package/tsOutputs/common/scm/git-format-builder.js +24 -25
- package/tsOutputs/common/scm/git-format-builder.js.map +1 -1
- package/tsOutputs/common/scm/git.js +192 -327
- package/tsOutputs/common/scm/git.js.map +1 -1
- package/tsOutputs/common/scm/none.js +58 -110
- package/tsOutputs/common/scm/none.js.map +1 -1
- package/tsOutputs/common/scm/scm-factory.js +6 -9
- package/tsOutputs/common/scm/scm-factory.js.map +1 -1
- package/tsOutputs/common/short-name-to-file-mapper.js +30 -33
- package/tsOutputs/common/short-name-to-file-mapper.js.map +1 -1
- package/tsOutputs/common/source-map-handler.js +76 -98
- package/tsOutputs/common/source-map-handler.js.map +1 -1
- package/tsOutputs/common/source-map-reader.js +35 -36
- package/tsOutputs/common/source-map-reader.js.map +1 -1
- package/tsOutputs/common/source-maps-utils.js +8 -11
- package/tsOutputs/common/source-maps-utils.js.map +1 -1
- package/tsOutputs/common/state-tracker-fpv6.js +15 -37
- package/tsOutputs/common/state-tracker-fpv6.js.map +1 -1
- package/tsOutputs/common/state-tracker.js +124 -212
- package/tsOutputs/common/state-tracker.js.map +1 -1
- package/tsOutputs/common/system-date.js +3 -3
- package/tsOutputs/common/system-date.js.map +1 -1
- package/tsOutputs/common/utils/abstract-data-builder.js +8 -9
- package/tsOutputs/common/utils/abstract-data-builder.js.map +1 -1
- package/tsOutputs/common/utils/build-session-data-builder.js +25 -79
- package/tsOutputs/common/utils/build-session-data-builder.js.map +1 -1
- package/tsOutputs/common/utils/dependency-utils.js +13 -16
- package/tsOutputs/common/utils/dependency-utils.js.map +1 -1
- package/tsOutputs/common/utils/env-var-parsing.js +10 -14
- package/tsOutputs/common/utils/env-var-parsing.js.map +1 -1
- package/tsOutputs/common/utils/files-utils.js +16 -19
- package/tsOutputs/common/utils/files-utils.js.map +1 -1
- package/tsOutputs/common/utils/process-utils.js +12 -25
- package/tsOutputs/common/utils/process-utils.js.map +1 -1
- package/tsOutputs/common/utils/test-runner-build-session-data-builder.js +16 -62
- package/tsOutputs/common/utils/test-runner-build-session-data-builder.js.map +1 -1
- package/tsOutputs/common/utils/test-utils/mock-server-utils/mock-server-proxy.js +120 -192
- package/tsOutputs/common/utils/test-utils/mock-server-utils/mock-server-proxy.js.map +1 -1
- package/tsOutputs/common/utils/timer-utils.js +4 -7
- package/tsOutputs/common/utils/timer-utils.js.map +1 -1
- package/tsOutputs/common/utils/token-data-builder.js +30 -50
- package/tsOutputs/common/utils/token-data-builder.js.map +1 -1
- package/tsOutputs/common/utils/validation-utils.js +7 -10
- package/tsOutputs/common/utils/validation-utils.js.map +1 -1
- package/tsOutputs/common/uuid.js +7 -10
- package/tsOutputs/common/uuid.js.map +1 -1
- package/tsOutputs/common/v8-utils.js +12 -50
- package/tsOutputs/common/v8-utils.js.map +1 -1
- package/tsOutputs/common/watchdog.js +35 -56
- package/tsOutputs/common/watchdog.js.map +1 -1
- package/tsOutputs/mocha-reporter/index.js +12 -12
- package/tsOutputs/mocha-reporter/index.js.map +1 -1
- package/tsOutputs/mocha-reporter/otel-agent.js +47 -118
- package/tsOutputs/mocha-reporter/otel-agent.js.map +1 -1
- package/tsOutputs/test-listener/SlNodeJsProxy.js +34 -35
- package/tsOutputs/test-listener/SlNodeJsProxy.js.map +1 -1
- package/tsOutputs/test-listener/UserMessageHelper.js +14 -19
- package/tsOutputs/test-listener/UserMessageHelper.js.map +1 -1
- package/tsOutputs/test-listener/agent-loader.js +42 -59
- package/tsOutputs/test-listener/agent-loader.js.map +1 -1
- package/tsOutputs/test-listener/agent.js +93 -150
- package/tsOutputs/test-listener/agent.js.map +1 -1
- package/tsOutputs/test-listener/api.js +36 -70
- package/tsOutputs/test-listener/api.js.map +1 -1
- package/tsOutputs/test-listener/base-proxy.js +25 -27
- package/tsOutputs/test-listener/base-proxy.js.map +1 -1
- package/tsOutputs/test-listener/bootstrap.js +6 -6
- package/tsOutputs/test-listener/bootstrap.js.map +1 -1
- package/tsOutputs/test-listener/child-process-patcher.js +10 -10
- package/tsOutputs/test-listener/child-process-patcher.js.map +1 -1
- package/tsOutputs/test-listener/cli.js +27 -30
- package/tsOutputs/test-listener/cli.js.map +1 -1
- package/tsOutputs/test-listener/coloring/http-coloring.js +30 -33
- package/tsOutputs/test-listener/coloring/http-coloring.js.map +1 -1
- package/tsOutputs/test-listener/coloring/listening-port.js +14 -17
- package/tsOutputs/test-listener/coloring/listening-port.js.map +1 -1
- package/tsOutputs/test-listener/command-line-arg-parser.js +12 -15
- package/tsOutputs/test-listener/command-line-arg-parser.js.map +1 -1
- package/tsOutputs/test-listener/config-process/config-loader.js +21 -22
- package/tsOutputs/test-listener/config-process/config-loader.js.map +1 -1
- package/tsOutputs/test-listener/config-process/config-system.js +100 -127
- package/tsOutputs/test-listener/config-process/config-system.js.map +1 -1
- package/tsOutputs/test-listener/config-process/index.js +38 -57
- package/tsOutputs/test-listener/config-process/index.js.map +1 -1
- package/tsOutputs/test-listener/config.js +38 -59
- package/tsOutputs/test-listener/config.js.map +1 -1
- package/tsOutputs/test-listener/entities/BasicConfigurationData.js +37 -64
- package/tsOutputs/test-listener/entities/BasicConfigurationData.js.map +1 -1
- package/tsOutputs/test-listener/entities/build-scanner/ConfigModeData.js +17 -42
- package/tsOutputs/test-listener/entities/build-scanner/ConfigModeData.js.map +1 -1
- package/tsOutputs/test-listener/entities/build-scanner/ScanModeData.js +19 -45
- package/tsOutputs/test-listener/entities/build-scanner/ScanModeData.js.map +1 -1
- package/tsOutputs/test-listener/environment-data-service.js +10 -11
- package/tsOutputs/test-listener/environment-data-service.js.map +1 -1
- package/tsOutputs/test-listener/execution-process/entities-mapper.js +11 -14
- package/tsOutputs/test-listener/execution-process/entities-mapper.js.map +1 -1
- package/tsOutputs/test-listener/execution-process/execution-service-proxy.js +54 -72
- package/tsOutputs/test-listener/execution-process/execution-service-proxy.js.map +1 -1
- package/tsOutputs/test-listener/execution-process/index.js +26 -26
- package/tsOutputs/test-listener/execution-process/index.js.map +1 -1
- package/tsOutputs/test-listener/factory.js +140 -175
- package/tsOutputs/test-listener/factory.js.map +1 -1
- package/tsOutputs/test-listener/footprints-process/footprints-service-proxy.js +17 -34
- package/tsOutputs/test-listener/footprints-process/footprints-service-proxy.js.map +1 -1
- package/tsOutputs/test-listener/footprints-process/index.js +53 -58
- package/tsOutputs/test-listener/footprints-process/index.js.map +1 -1
- package/tsOutputs/test-listener/footprints-process/istanbul-to-footprints-base.js +49 -50
- package/tsOutputs/test-listener/footprints-process/istanbul-to-footprints-base.js.map +1 -1
- package/tsOutputs/test-listener/footprints-process/istanbul-to-footprints-v3.js +98 -117
- package/tsOutputs/test-listener/footprints-process/istanbul-to-footprints-v3.js.map +1 -1
- package/tsOutputs/test-listener/footprints-process/ts-node-hits-collector.js +57 -141
- package/tsOutputs/test-listener/footprints-process/ts-node-hits-collector.js.map +1 -1
- package/tsOutputs/test-listener/integrations/SlGulp.js +25 -26
- package/tsOutputs/test-listener/integrations/SlGulp.js.map +1 -1
- package/tsOutputs/test-listener/logs-process/index.js +30 -35
- package/tsOutputs/test-listener/logs-process/index.js.map +1 -1
- package/tsOutputs/test-listener/logs-process/log-service-proxy.js +8 -25
- package/tsOutputs/test-listener/logs-process/log-service-proxy.js.map +1 -1
- package/tsOutputs/test-listener/nyc-report-executor-fpv6.js +53 -110
- package/tsOutputs/test-listener/nyc-report-executor-fpv6.js.map +1 -1
- package/tsOutputs/test-listener/nyc-report-executor.js +48 -85
- package/tsOutputs/test-listener/nyc-report-executor.js.map +1 -1
- package/tsOutputs/test-listener/otel-agent-loader.js +30 -33
- package/tsOutputs/test-listener/otel-agent-loader.js.map +1 -1
- package/tsOutputs/test-listener/queue.js +18 -36
- package/tsOutputs/test-listener/queue.js.map +1 -1
- package/tsOutputs/test-listener/remote-agent.js +97 -223
- package/tsOutputs/test-listener/remote-agent.js.map +1 -1
- package/tsOutputs/test-listener/resolvers/AppNameResolver.js +8 -25
- package/tsOutputs/test-listener/resolvers/AppNameResolver.js.map +1 -1
- package/tsOutputs/test-listener/resolvers/ArgumentResolver.js +11 -12
- package/tsOutputs/test-listener/resolvers/ArgumentResolver.js.map +1 -1
- package/tsOutputs/test-listener/resolvers/BuildResolver.js +8 -25
- package/tsOutputs/test-listener/resolvers/BuildResolver.js.map +1 -1
- package/tsOutputs/test-listener/resolvers/BuildSessionIdFileResolver.js +8 -25
- package/tsOutputs/test-listener/resolvers/BuildSessionIdFileResolver.js.map +1 -1
- package/tsOutputs/test-listener/resolvers/BuildSessionIdResolver.js +8 -25
- package/tsOutputs/test-listener/resolvers/BuildSessionIdResolver.js.map +1 -1
- package/tsOutputs/test-listener/resolvers/ProxyResolver.js +8 -25
- package/tsOutputs/test-listener/resolvers/ProxyResolver.js.map +1 -1
- package/tsOutputs/test-listener/resolvers/TokenResolver.js +8 -25
- package/tsOutputs/test-listener/resolvers/TokenResolver.js.map +1 -1
- package/tsOutputs/test-listener/state-tracker-process/index.js +54 -74
- package/tsOutputs/test-listener/state-tracker-process/index.js.map +1 -1
- package/tsOutputs/test-listener/state-tracker-process/state-tracker-proxy.js +18 -37
- package/tsOutputs/test-listener/state-tracker-process/state-tracker-proxy.js.map +1 -1
- package/tsOutputs/test-listener/test-recommendation-handler.js +66 -109
- package/tsOutputs/test-listener/test-recommendation-handler.js.map +1 -1
- package/tsOutputs/test-listener/upload-report-handler.js +33 -35
- package/tsOutputs/test-listener/upload-report-handler.js.map +1 -1
- package/tsOutputs/test-listener/utils.js +13 -14
- package/tsOutputs/test-listener/utils.js.map +1 -1
- package/tsOutputs/test-listener/uuid.js +7 -10
- package/tsOutputs/test-listener/uuid.js.map +1 -1
- package/tsOutputs/test-listener/wait-for-multiple-callbacks.js +17 -19
- package/tsOutputs/test-listener/wait-for-multiple-callbacks.js.map +1 -1
- package/tsOutputs/test-listener/watchdog.js +32 -51
- package/tsOutputs/test-listener/watchdog.js.map +1 -1
- package/tsOutputs/build-scanner/mappings/scm-file-fixer.js +0 -96
- package/tsOutputs/build-scanner/mappings/scm-file-fixer.js.map +0 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.EnvironmentDataService = void 0;
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
const os = require("os");
|
|
5
|
+
const version = process.env.npm_package_version;
|
|
6
6
|
function clone(o) {
|
|
7
7
|
//if (!o) return o; //Unreachable
|
|
8
8
|
return JSON.parse(JSON.stringify(o));
|
|
@@ -10,8 +10,8 @@ function clone(o) {
|
|
|
10
10
|
/**
|
|
11
11
|
* The service is used to get environmental data for submission (process id, machine data, etc.)
|
|
12
12
|
*/
|
|
13
|
-
|
|
14
|
-
|
|
13
|
+
class EnvironmentDataService {
|
|
14
|
+
constructor(cfg) {
|
|
15
15
|
this.cfg = cfg;
|
|
16
16
|
this.envData = null;
|
|
17
17
|
if (!cfg)
|
|
@@ -40,8 +40,8 @@ var EnvironmentDataService = /** @class */ (function () {
|
|
|
40
40
|
this.envData.testStage = cfg.testStage.value;
|
|
41
41
|
}
|
|
42
42
|
}
|
|
43
|
-
|
|
44
|
-
|
|
43
|
+
getEnvDataForSubmission() {
|
|
44
|
+
const returnedEnvData = clone(this.envData);
|
|
45
45
|
returnedEnvData.memory = {
|
|
46
46
|
process: process.memoryUsage(),
|
|
47
47
|
machine: {
|
|
@@ -51,11 +51,10 @@ var EnvironmentDataService = /** @class */ (function () {
|
|
|
51
51
|
};
|
|
52
52
|
this.setLastError(null);
|
|
53
53
|
return returnedEnvData;
|
|
54
|
-
}
|
|
55
|
-
|
|
54
|
+
}
|
|
55
|
+
setLastError(message) {
|
|
56
56
|
this.envData.lastError = message;
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
}());
|
|
57
|
+
}
|
|
58
|
+
}
|
|
60
59
|
exports.EnvironmentDataService = EnvironmentDataService;
|
|
61
60
|
//# sourceMappingURL=environment-data-service.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"environment-data-service.js","sourceRoot":"","sources":["../../test-listener/environment-data-service.ts"],"names":[],"mappings":";;;AACA,
|
|
1
|
+
{"version":3,"file":"environment-data-service.js","sourceRoot":"","sources":["../../test-listener/environment-data-service.ts"],"names":[],"mappings":";;;AACA,yBAA0B;AAC1B,MAAM,OAAO,GAAG,OAAO,CAAC,GAAG,CAAC,mBAAmB,CAAC;AAEhD,SAAS,KAAK,CAAI,CAAI;IAClB,iCAAiC;IACjC,OAAU,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC;AAC5C,CAAC;AAED;;GAEG;AACH,MAAa,sBAAsB;IAC/B,YAA2B,GAAgB;QAAhB,QAAG,GAAH,GAAG,CAAa;QA2BnC,YAAO,GAAQ,IAAI,CAAC;QA1BxB,IAAI,CAAC,GAAG;YAAE,MAAM,IAAI,KAAK,CAAC,iBAAiB,CAAC,CAAC;QAC7C,IAAI,CAAC,OAAO,GAAG;YACX,WAAW,EAAE,EAAE,CAAC,QAAQ,EAAE;YAC1B,QAAQ,EAAE,EAAE,CAAC,QAAQ,EAAE;YACvB,WAAW,EAAC,OAAO,CAAC,IAAI;YACxB,EAAE,EAAE,EAAE,CAAC,IAAI,EAAE;YACb,SAAS,EAAE,EAAE,CAAC,OAAO,EAAE;YACvB,IAAI,EAAE,EAAE,CAAC,IAAI,EAAE;YACf,SAAS,EAAE,OAAO,CAAC,GAAG;YACtB,SAAS,EAAE,KAAK,CAAC,EAAE,CAAC,iBAAiB,EAAE,CAAC;YACxC,YAAY,EAAE,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC;YACrC,OAAO,EAAE,OAAO,CAAC,OAAO;YACxB,SAAS,EAAE,QAAQ;YACnB,YAAY,EAAE,OAAO;SACxB,CAAC;QACF,IAAI,GAAG,IAAI,GAAG,CAAC,eAAe,CAAC,QAAQ,EAAE;YACrC,IAAI,CAAC,OAAO,CAAC,eAAe,GAAG,GAAG,CAAC,eAAe,CAAC,KAAK,CAAC;SAC5D;QACD,IAAI,GAAG,IAAI,GAAG,CAAC,KAAK,CAAC,QAAQ,EAAE;YAC3B,IAAI,CAAC,OAAO,CAAC,KAAK,GAAG,GAAG,CAAC,KAAK,CAAC,KAAK,CAAC;SACxC;QACD,IAAI,GAAG,IAAI,GAAG,CAAC,SAAS,CAAC,QAAQ,EAAE;YAC/B,IAAI,CAAC,OAAO,CAAC,SAAS,GAAG,GAAG,CAAC,SAAS,CAAC,KAAK,CAAC;SAChD;IACL,CAAC;IAIM,uBAAuB;QAC1B,MAAM,eAAe,GAAG,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QAC5C,eAAe,CAAC,MAAM,GAAG;YACrB,OAAO,EAAE,OAAO,CAAC,WAAW,EAAE;YAC9B,OAAO,EAAE;gBACL,OAAO,EAAE,EAAE,CAAC,OAAO,EAAE;gBACrB,QAAQ,EAAE,EAAE,CAAC,QAAQ,EAAE;aAC1B;SACJ,CAAC;QACF,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC;QACxB,OAAO,eAAe,CAAC;IAC3B,CAAC;IAEM,YAAY,CAAC,OAAe;QAC/B,IAAI,CAAC,OAAO,CAAC,SAAS,GAAG,OAAO,CAAC;IACrC,CAAC;CACJ;AA9CD,wDA8CC"}
|
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.EntitiesMapper = void 0;
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
EntitiesMapper.prototype.toIStartExecutionRequest = function (agentConfig, testphase) {
|
|
8
|
-
var result = {
|
|
4
|
+
class EntitiesMapper {
|
|
5
|
+
toIStartExecutionRequest(agentConfig, testphase) {
|
|
6
|
+
const result = {
|
|
9
7
|
appName: agentConfig.appName.value,
|
|
10
8
|
customerId: agentConfig.customerId.value,
|
|
11
9
|
server: agentConfig.server.value,
|
|
@@ -17,9 +15,9 @@ var EntitiesMapper = /** @class */ (function () {
|
|
|
17
15
|
testStage: testphase
|
|
18
16
|
};
|
|
19
17
|
return result;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
|
|
18
|
+
}
|
|
19
|
+
toIEndExecutionRequest(agentConfig) {
|
|
20
|
+
const result = {
|
|
23
21
|
appName: agentConfig.appName.value,
|
|
24
22
|
customerId: agentConfig.customerId.value,
|
|
25
23
|
server: agentConfig.server.value,
|
|
@@ -30,9 +28,9 @@ var EntitiesMapper = /** @class */ (function () {
|
|
|
30
28
|
isValidToken: (agentConfig.token.hasValue || agentConfig.tokenFile.hasValue)
|
|
31
29
|
};
|
|
32
30
|
return result;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
|
|
31
|
+
}
|
|
32
|
+
toIUploadReportRequest(agentConfig) {
|
|
33
|
+
const result = {
|
|
36
34
|
appName: agentConfig.appName.value,
|
|
37
35
|
customerId: agentConfig.customerId.value,
|
|
38
36
|
server: agentConfig.server.value,
|
|
@@ -43,8 +41,7 @@ var EntitiesMapper = /** @class */ (function () {
|
|
|
43
41
|
isValidToken: (agentConfig.token.hasValue || agentConfig.tokenFile.hasValue)
|
|
44
42
|
};
|
|
45
43
|
return result;
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
}());
|
|
44
|
+
}
|
|
45
|
+
}
|
|
49
46
|
exports.EntitiesMapper = EntitiesMapper;
|
|
50
47
|
//# sourceMappingURL=entities-mapper.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"entities-mapper.js","sourceRoot":"","sources":["../../../test-listener/execution-process/entities-mapper.ts"],"names":[],"mappings":";;;AAMA
|
|
1
|
+
{"version":3,"file":"entities-mapper.js","sourceRoot":"","sources":["../../../test-listener/execution-process/entities-mapper.ts"],"names":[],"mappings":";;;AAMA,MAAa,cAAc;IAEvB,wBAAwB,C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,GAA8C;YACtD,OAAO,EAAE,WAAW,CAAC,OAAO,CAAC,KAAK;YAClC,UAAU,EAAC,WAAW,CAAC,UAAU,CAAC,KAAK;YACvC,MAAM,EAAC,WAAW,CAAC,MAAM,CAAC,KAAK;YAC/B,KAAK,EAAC,WAAW,CAAC,KAAK,CAAC,KAAK;YAC7B,KAAK,EAAC,WAAW,CAAC,KAAK,CAAC,KAAK;YAC7B,KAAK,EAAC,WAAW,CAAC,KAAK,CAAC,KAAK;YAC7B,MAAM,EAAC,WAAW,CAAC,MAAM,CAAC,KAAK;YAC/B,YAAY,EAAG,CAAC,WAAW,CAAC,KAAK,CAAC,QAAQ,IAAI,WAAW,CAAC,SAAS,CAAC,QAAQ,CAAC;SAChF,CAAA;QAED,OAAO,MAAM,CAAC;IAClB,CAAC;CAEJ;AAhDD,wCAgDC"}
|
|
@@ -1,35 +1,19 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __extends = (this && this.__extends) || (function () {
|
|
3
|
-
var extendStatics = function (d, b) {
|
|
4
|
-
extendStatics = Object.setPrototypeOf ||
|
|
5
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
6
|
-
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
7
|
-
return extendStatics(d, b);
|
|
8
|
-
};
|
|
9
|
-
return function (d, b) {
|
|
10
|
-
if (typeof b !== "function" && b !== null)
|
|
11
|
-
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
12
|
-
extendStatics(d, b);
|
|
13
|
-
function __() { this.constructor = d; }
|
|
14
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
15
|
-
};
|
|
16
|
-
})();
|
|
17
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
3
|
exports.ExecutionServiceProxy = void 0;
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
return _super.call(this, cfg, request, logger) || this;
|
|
4
|
+
const base_proxy_1 = require("../base-proxy");
|
|
5
|
+
const request = require("request");
|
|
6
|
+
const path = require("path");
|
|
7
|
+
const async_1 = require("async");
|
|
8
|
+
const fs = require("fs");
|
|
9
|
+
const querystring_1 = require("querystring");
|
|
10
|
+
class ExecutionServiceProxy extends base_proxy_1.BaseProxy {
|
|
11
|
+
constructor(cfg, request, logger) {
|
|
12
|
+
super(cfg, request, logger);
|
|
29
13
|
}
|
|
30
14
|
//var log = logger? logger.child({className: "ExecutionService"}) : consoleFileLogger("ExecutionService");
|
|
31
|
-
|
|
32
|
-
|
|
15
|
+
startExecution(config, callback) {
|
|
16
|
+
const data = {
|
|
33
17
|
'customerId': config.customerId,
|
|
34
18
|
'appName': config.appName,
|
|
35
19
|
'newEnvironment': config.testStage,
|
|
@@ -47,14 +31,14 @@ var ExecutionServiceProxy = /** @class */ (function (_super) {
|
|
|
47
31
|
if (config.branch) {
|
|
48
32
|
data.branchName = config.branch;
|
|
49
33
|
}
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
this.logger.info(
|
|
34
|
+
const routeVersion = config.isValidToken ? '/v3' : '/v2';
|
|
35
|
+
const relativeUrl = routeVersion + '/testExecution';
|
|
36
|
+
const bufferToSend = new Buffer(JSON.stringify(data));
|
|
37
|
+
this.logger.info(`Start execution. Url: '${relativeUrl} ', Data: ${data}`);
|
|
54
38
|
this.post(bufferToSend, relativeUrl, callback);
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
|
|
39
|
+
}
|
|
40
|
+
endExecution(config, callback) {
|
|
41
|
+
const queryParams = {
|
|
58
42
|
'customerId': config.customerId.valueOf,
|
|
59
43
|
'appName': config.appName
|
|
60
44
|
};
|
|
@@ -67,28 +51,28 @@ var ExecutionServiceProxy = /** @class */ (function (_super) {
|
|
|
67
51
|
if (config.labId) {
|
|
68
52
|
queryParams.environment = config.labId;
|
|
69
53
|
}
|
|
70
|
-
|
|
71
|
-
|
|
54
|
+
const routeVersion = config.isValidToken ? '/v3' : '/v2';
|
|
55
|
+
let relativeUrl = routeVersion + '/testExecution';
|
|
72
56
|
relativeUrl = relativeUrl.replace(/\?.*|$/, '?' + (0, querystring_1.stringify)(queryParams));
|
|
73
|
-
this.logger.info(
|
|
57
|
+
this.logger.info(`End execution. url: ${relativeUrl}`);
|
|
74
58
|
this.delete(relativeUrl, callback);
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
this.logger.info(
|
|
59
|
+
}
|
|
60
|
+
uploadExternalReport(config, data, callback) {
|
|
61
|
+
const relativeUrl = '/v1/externalreport';
|
|
62
|
+
const bufferToSend = new Buffer(JSON.stringify(data));
|
|
63
|
+
this.logger.info(`Uploading external report ${data}`);
|
|
80
64
|
this.post(bufferToSend, relativeUrl, callback);
|
|
81
|
-
}
|
|
82
|
-
|
|
65
|
+
}
|
|
66
|
+
uploadReport(config, agentData, reportFile, callback) {
|
|
83
67
|
if (!reportFile) {
|
|
84
68
|
return callback(new Error('\'reportFile\' can\'t be null or undefined'));
|
|
85
69
|
}
|
|
86
70
|
if (!reportFile.buffer) {
|
|
87
71
|
return callback(new Error('\'reportFile.buffer\' can\'t be null or undefined'));
|
|
88
72
|
}
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
73
|
+
const routeVersion = config.isValidToken ? '/v3' : '/v2';
|
|
74
|
+
const relativeUrl = routeVersion + '/externaldata';
|
|
75
|
+
const req = request.post(relativeUrl, function (err, resp, body) {
|
|
92
76
|
if (!err && resp && resp.statusCode >= 400) {
|
|
93
77
|
err = new Error('HTTP ERROR: ' + resp.statusCode + ' ' + resp.statusMessage);
|
|
94
78
|
}
|
|
@@ -104,7 +88,7 @@ var ExecutionServiceProxy = /** @class */ (function (_super) {
|
|
|
104
88
|
//When I was learning node and the request module, I was confused as to why the form could be modified
|
|
105
89
|
// after the post method was called. Buried in the request docs is the explanation - "the form can be modified
|
|
106
90
|
// until the request is fired on the next cycle of the event-loop"
|
|
107
|
-
|
|
91
|
+
const form = req.form();
|
|
108
92
|
form.append('file', JSON.stringify(agentData), {
|
|
109
93
|
filename: 'agentData',
|
|
110
94
|
contentType: 'multipart/form-data'
|
|
@@ -113,18 +97,18 @@ var ExecutionServiceProxy = /** @class */ (function (_super) {
|
|
|
113
97
|
filename: 'agentData',
|
|
114
98
|
contentType: 'multipart/form-data'
|
|
115
99
|
});
|
|
116
|
-
}
|
|
117
|
-
|
|
100
|
+
}
|
|
101
|
+
uploadReports(config, callback) {
|
|
118
102
|
// eslint-disable-next-line @typescript-eslint/no-this-alias
|
|
119
|
-
|
|
120
|
-
|
|
103
|
+
const context = this;
|
|
104
|
+
const agentData = this.getAgentData(config);
|
|
121
105
|
try {
|
|
122
|
-
|
|
123
|
-
if (
|
|
106
|
+
const files = context.getAllFiles(config.reportFile, config.reportFilesFolder);
|
|
107
|
+
if (files.length == 0) {
|
|
124
108
|
this.logger.info('No report files found');
|
|
125
109
|
return callback(null);
|
|
126
110
|
}
|
|
127
|
-
async_1.default.forEachLimit(
|
|
111
|
+
async_1.default.forEachLimit(files.slice(0, -1), 1, function (reportFile, callback) {
|
|
128
112
|
context.uploadReport(config, agentData, reportFile, function (err) {
|
|
129
113
|
if (err) {
|
|
130
114
|
callback(err);
|
|
@@ -137,7 +121,7 @@ var ExecutionServiceProxy = /** @class */ (function (_super) {
|
|
|
137
121
|
if (err) {
|
|
138
122
|
return callback(err);
|
|
139
123
|
}
|
|
140
|
-
|
|
124
|
+
const lastFile = files[files.length - 1];
|
|
141
125
|
agentData.hasMoreRequests = config.hasMoreRequests;
|
|
142
126
|
context.uploadReport(config, agentData, lastFile, function (err) {
|
|
143
127
|
if (err) {
|
|
@@ -152,16 +136,15 @@ var ExecutionServiceProxy = /** @class */ (function (_super) {
|
|
|
152
136
|
catch (err) {
|
|
153
137
|
callback(err);
|
|
154
138
|
}
|
|
155
|
-
}
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
var files = [];
|
|
139
|
+
}
|
|
140
|
+
getAllFiles(reportFiles, reportFilesFolders) {
|
|
141
|
+
const files = [];
|
|
159
142
|
// handle reportFilesFolders
|
|
160
|
-
reportFilesFolders.forEach(
|
|
143
|
+
reportFilesFolders.forEach((reportFilesFolder) => {
|
|
161
144
|
try {
|
|
162
|
-
|
|
145
|
+
const folderFiles = fs.readdirSync(reportFilesFolder);
|
|
163
146
|
folderFiles.forEach(function (folderFileName) {
|
|
164
|
-
|
|
147
|
+
const stat = fs.statSync(path.join(reportFilesFolder, folderFileName));
|
|
165
148
|
if (stat.isFile()) {
|
|
166
149
|
files.push({ filename: folderFileName, buffer: fs.readFileSync(path.join(reportFilesFolder, folderFileName)) });
|
|
167
150
|
}
|
|
@@ -171,22 +154,22 @@ var ExecutionServiceProxy = /** @class */ (function (_super) {
|
|
|
171
154
|
});
|
|
172
155
|
}
|
|
173
156
|
catch (err) {
|
|
174
|
-
|
|
157
|
+
this.logger.error('[UPLOAD REPORTS] Failed Reading Folder: ' + reportFilesFolder);
|
|
175
158
|
}
|
|
176
159
|
});
|
|
177
160
|
// handle reportFiles
|
|
178
|
-
reportFiles.forEach(
|
|
161
|
+
reportFiles.forEach((reportFilePath) => {
|
|
179
162
|
if (fs.existsSync(reportFilePath)) {
|
|
180
163
|
files.push({ filename: path.basename(reportFilePath), buffer: fs.readFileSync(reportFilePath) });
|
|
181
164
|
}
|
|
182
165
|
else {
|
|
183
|
-
|
|
166
|
+
this.logger.warn('[UPLOAD REPORTS] reportFile doesn\'t exist. report file: ' + reportFilePath);
|
|
184
167
|
}
|
|
185
168
|
});
|
|
186
169
|
return files;
|
|
187
|
-
}
|
|
188
|
-
|
|
189
|
-
|
|
170
|
+
}
|
|
171
|
+
getAgentData(config) {
|
|
172
|
+
const agentData = {
|
|
190
173
|
customerId: config.customerId,
|
|
191
174
|
appName: config.appName,
|
|
192
175
|
environment: {
|
|
@@ -204,8 +187,7 @@ var ExecutionServiceProxy = /** @class */ (function (_super) {
|
|
|
204
187
|
agentData.branchName = config.branch;
|
|
205
188
|
}
|
|
206
189
|
return agentData;
|
|
207
|
-
}
|
|
208
|
-
|
|
209
|
-
}(base_proxy_1.BaseProxy));
|
|
190
|
+
}
|
|
191
|
+
}
|
|
210
192
|
exports.ExecutionServiceProxy = ExecutionServiceProxy;
|
|
211
193
|
//# sourceMappingURL=execution-service-proxy.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"execution-service-proxy.js","sourceRoot":"","sources":["../../../test-listener/execution-process/execution-service-proxy.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"execution-service-proxy.js","sourceRoot":"","sources":["../../../test-listener/execution-process/execution-service-proxy.ts"],"names":[],"mappings":";;;AAIA,8CAA0C;AAC1C,mCAAoC;AAIpC,6BAA6B;AAE7B,iCAA0B;AAE1B,yBAAyB;AAEzB,6CAAsC;AAGtC,MAAa,qBAAsB,SAAQ,sBAAS;IAEhD,YAAmB,GAAgB,EAAE,OAA0C,EAAE,MAAc;QAC3F,KAAK,CAAC,GAAG,EAAE,OAAO,EAAE,MAAM,CAAC,CAAC;IAChC,CAAC;IAED,0GAA0G;IAEnG,cAAc,CAAC,MAA8B,EAAE,QAA8B;QAChF,MAAM,IAAI,GAAQ;YACd,YAAY,EAAE,MAAM,CAAC,UAAU;YAC/B,SAAS,EAAE,MAAM,CAAC,OAAO;YACzB,gBAAgB,EAAE,MAAM,CAAC,SAAS;YAClC,QAAQ,EAAE,MAAM,CAAC,MAAM;SAC1B,CAAC;QACF,IAAI,MAAM,CAAC,KAAK,EAAE;YACd,IAAI,CAAC,WAAW,GAAG,MAAM,CAAC,KAAK,CAAC;SACnC;QACD,IAAI,MAAM,CAAC,WAAW,EAAE;YACpB,IAAI,CAAC,WAAW,GAAG,MAAM,CAAC,WAAW,CAAC;SACzC;QACD,IAAI,MAAM,CAAC,KAAK,EAAE;YAC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M,CAAC,IAAI;YACjB,MAAM,EAAE,MAAM,CAAC,MAAM;YACrB,eAAe,EAAE,IAAI;SACxB,CAAC;QACF,IAAI,MAAM,CAAC,KAAK,EAAE;YACd,SAAS,CAAC,SAAS,GAAG,MAAM,CAAC,KAAK,CAAC;SACtC;QACD,IAAI,MAAM,CAAC,MAAM,EAAE;YACf,SAAS,CAAC,UAAU,GAAG,MAAM,CAAC,MAAM,CAAC;SACxC;QACD,OAAO,SAAS,CAAC;IACrB,CAAC;CACJ;AA1MD,sDA0MC"}
|
|
@@ -3,14 +3,14 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
/**
|
|
4
4
|
* Created by nadav on 21/03/2017.
|
|
5
5
|
*/
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
6
|
+
const program = require("commander");
|
|
7
|
+
const fs = require("fs");
|
|
8
|
+
const request = require("request");
|
|
9
|
+
const config_loader_1 = require("../config-process/config-loader");
|
|
10
|
+
const logger_1 = require("../../common/logger");
|
|
11
|
+
const execution_service_proxy_1 = require("./execution-service-proxy");
|
|
12
|
+
const entities_mapper_1 = require("./entities-mapper");
|
|
13
|
+
const SEALIGHTS_JSON_FILENAME = './sealights.json';
|
|
14
14
|
function splitOption(option) {
|
|
15
15
|
if (option) {
|
|
16
16
|
return option.split(',');
|
|
@@ -24,13 +24,13 @@ function booleanOption(option) {
|
|
|
24
24
|
}
|
|
25
25
|
//TODO: Move it do a different location.
|
|
26
26
|
function getConfigFromFile() {
|
|
27
|
-
|
|
28
|
-
|
|
27
|
+
const configLoader = new config_loader_1.ConfigLoader();
|
|
28
|
+
const config = configLoader.loadAgentConfiguration(null, SEALIGHTS_JSON_FILENAME);
|
|
29
29
|
validateConfiguration(config);
|
|
30
30
|
return config;
|
|
31
31
|
}
|
|
32
32
|
function validateConfiguration(agentConfig) {
|
|
33
|
-
|
|
33
|
+
const errors = new Array();
|
|
34
34
|
if (!agentConfig.customerId.hasValue) {
|
|
35
35
|
errors.push('customerId is missing');
|
|
36
36
|
}
|
|
@@ -51,7 +51,7 @@ function validateConfiguration(agentConfig) {
|
|
|
51
51
|
}
|
|
52
52
|
if (errors && errors.length > 0) {
|
|
53
53
|
console.error('Wrong configuration. Found the following error(s):');
|
|
54
|
-
errors.forEach(
|
|
54
|
+
errors.forEach((err, i, errors) => {
|
|
55
55
|
console.error('* ' + err);
|
|
56
56
|
});
|
|
57
57
|
process.exit(1);
|
|
@@ -65,11 +65,11 @@ program
|
|
|
65
65
|
.command('end')
|
|
66
66
|
.description('End Execution')
|
|
67
67
|
.action(function (cmd) {
|
|
68
|
-
|
|
69
|
-
|
|
68
|
+
const agentConfig = getConfigFromFile();
|
|
69
|
+
const config = new entities_mapper_1.EntitiesMapper().toIEndExecutionRequest(agentConfig);
|
|
70
70
|
//TODO: Add validation for the configuration. Repeat in the file.
|
|
71
|
-
|
|
72
|
-
new execution_service_proxy_1.ExecutionServiceProxy(agentConfig, request, logger).endExecution(config,
|
|
71
|
+
const logger = logger_1.LoggerFactory.getCreateApplicationLogger(agentConfig);
|
|
72
|
+
new execution_service_proxy_1.ExecutionServiceProxy(agentConfig, request, logger).endExecution(config, (err) => {
|
|
73
73
|
if (err) {
|
|
74
74
|
process.exit(1);
|
|
75
75
|
}
|
|
@@ -98,15 +98,15 @@ program
|
|
|
98
98
|
console.error('[UPLOAD REPORTS] at least one of --reportFile, --reportFilesFolder must be provided');
|
|
99
99
|
process.exit(1);
|
|
100
100
|
}
|
|
101
|
-
|
|
102
|
-
|
|
101
|
+
const agentConfig = getConfigFromFile();
|
|
102
|
+
const config = new entities_mapper_1.EntitiesMapper().toIUploadReportRequest(agentConfig);
|
|
103
103
|
config.reportFile = cmd.reportFile;
|
|
104
104
|
config.reportFilesFolder = cmd.reportFilesFolder;
|
|
105
105
|
config.type = cmd.type;
|
|
106
106
|
config.source = cmd.source;
|
|
107
107
|
config.hasMoreRequests = cmd.hasMoreRequests;
|
|
108
|
-
|
|
109
|
-
new execution_service_proxy_1.ExecutionServiceProxy(agentConfig, request, logger).uploadReports(config,
|
|
108
|
+
const logger = logger_1.LoggerFactory.getCreateApplicationLogger(agentConfig);
|
|
109
|
+
new execution_service_proxy_1.ExecutionServiceProxy(agentConfig, request, logger).uploadReports(config, (err) => {
|
|
110
110
|
if (err) {
|
|
111
111
|
process.exit(1);
|
|
112
112
|
}
|
|
@@ -128,15 +128,15 @@ program
|
|
|
128
128
|
console.log('[UPLOAD EXTERNAL REPORT] --report must be provided');
|
|
129
129
|
process.exit(1);
|
|
130
130
|
}
|
|
131
|
-
|
|
132
|
-
|
|
131
|
+
const agentConfig = getConfigFromFile();
|
|
132
|
+
const config = new entities_mapper_1.EntitiesMapper().toIUploadReportRequest(agentConfig);
|
|
133
133
|
if (!config.appName || !config.build || !config.branch) {
|
|
134
134
|
console.log('[UPLOAD EXTERNAL REPORT] appName, branch and build must exist in the config file');
|
|
135
135
|
process.exit(1);
|
|
136
136
|
}
|
|
137
|
-
|
|
137
|
+
let data = {};
|
|
138
138
|
try {
|
|
139
|
-
|
|
139
|
+
const report = fs.readFileSync(cmd.report, 'utf-8');
|
|
140
140
|
data = JSON.parse(report);
|
|
141
141
|
}
|
|
142
142
|
catch (err) {
|
|
@@ -146,8 +146,8 @@ program
|
|
|
146
146
|
data.appName = config.appName;
|
|
147
147
|
data.buildName = config.build;
|
|
148
148
|
data.branchName = config.branch;
|
|
149
|
-
|
|
150
|
-
new execution_service_proxy_1.ExecutionServiceProxy(agentConfig, request, logger).uploadExternalReport(config, data,
|
|
149
|
+
const logger = logger_1.LoggerFactory.getCreateApplicationLogger(agentConfig);
|
|
150
|
+
new execution_service_proxy_1.ExecutionServiceProxy(agentConfig, request, logger).uploadExternalReport(config, data, (err) => {
|
|
151
151
|
if (err) {
|
|
152
152
|
process.exit(1);
|
|
153
153
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../test-listener/execution-process/index.ts"],"names":[],"mappings":";;AAAA;;GAEG;AACH,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../test-listener/execution-process/index.ts"],"names":[],"mappings":";;AAAA;;GAEG;AACH,qCAAsC;AACtC,yBAA0B;AAC1B,mCAAoC;AACpC,mEAA6D;AAC7D,gDAAkD;AAClD,uEAAgE;AAEhE,uDAAgD;AAGhD,MAAM,uBAAuB,GAAG,kBAAkB,CAAC;AAEnD,SAAS,WAAW,CAAC,MAAM;IACvB,IAAI,MAAM,EAAE;QACR,OAAO,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC,CAAA;KAC3B;SACI;QACD,OAAO,EAAE,CAAC;KACb;AACL,CAAC;AAED,SAAS,aAAa,CAAC,MAAM;IACzB,OAAO,CAAC,MAAM,CAAC,WAAW,EAAE,IAAI,MAAM,CAAC,CAAC;AAC5C,CAAC;AAGD,wCAAwC;AACxC,SAAS,iBAAiB;IACtB,MAAM,YAAY,GAAG,IAAI,4BAAY,EAAE,CAAC;IACxC,MAAM,MAAM,GAAG,YAAY,CAAC,sBAAsB,CAAC,IAAI,EAAE,uBAAuB,CAAC,CAAC;IAClF,qBAAqB,CAAC,MAAM,CAAC,CAAC;IAC9B,OAAO,MAAM,CAAC;AAClB,CAAC;AAED,SAAS,qBAAqB,CAAC,WAAwB;IACnD,MAAM,MAAM,GAAG,IAAI,KAAK,EAAU,CAAC;IACnC,IAAI,CAAC,WAAW,CAAC,UAAU,CAAC,QAAQ,EAAC;QACjC,MAAM,CAAC,IAAI,CAAC,uBAAuB,CAAC,CAAC;KACxC;IACD,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC,QAAQ,EAAC;QAC9B,MAAM,CAAC,IAAI,CAAC,oBAAoB,CAAC,CAAC;KACrC;IACD,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC,QAAQ,EAAC;QAC7B,MAAM,CAAC,IAAI,CAAC,mBAAmB,CAAC,CA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