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,19 +1,4 @@
|
|
|
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
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
18
3
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
19
4
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
@@ -23,132 +8,64 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
23
8
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
24
9
|
});
|
|
25
10
|
};
|
|
26
|
-
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
27
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
28
|
-
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
29
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
30
|
-
function step(op) {
|
|
31
|
-
if (f) throw new TypeError("Generator is already executing.");
|
|
32
|
-
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
33
|
-
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
34
|
-
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
35
|
-
switch (op[0]) {
|
|
36
|
-
case 0: case 1: t = op; break;
|
|
37
|
-
case 4: _.label++; return { value: op[1], done: false };
|
|
38
|
-
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
39
|
-
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
40
|
-
default:
|
|
41
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
42
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
43
|
-
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
44
|
-
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
45
|
-
if (t[2]) _.ops.pop();
|
|
46
|
-
_.trys.pop(); continue;
|
|
47
|
-
}
|
|
48
|
-
op = body.call(thisArg, _);
|
|
49
|
-
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
50
|
-
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
51
|
-
}
|
|
52
|
-
};
|
|
53
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
54
12
|
exports.TsNodeHitsCollector = void 0;
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
_this._transformedFilesOutput = {};
|
|
64
|
-
return _this;
|
|
13
|
+
const files_utils_1 = require("../../common/utils/files-utils");
|
|
14
|
+
const IstanbulCoverage = require("istanbul-lib-coverage");
|
|
15
|
+
const IstanbulSourceMapStore = require("istanbul-lib-source-maps");
|
|
16
|
+
const hits_collector_1 = require("../../common/footprints-process-v6/hits-collector");
|
|
17
|
+
class TsNodeHitsCollector extends hits_collector_1.HitsCollector {
|
|
18
|
+
constructor() {
|
|
19
|
+
super(...arguments);
|
|
20
|
+
this._transformedFilesOutput = {};
|
|
65
21
|
}
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
return [4 /*yield*/, this.transformJsCoverageToTs()];
|
|
75
|
-
case 2:
|
|
76
|
-
transformed = _a.sent();
|
|
77
|
-
return [2 /*return*/, this.extractHitsFromTransformedCoverage(hitFilesData, transformed)];
|
|
78
|
-
}
|
|
79
|
-
});
|
|
22
|
+
getHitElements() {
|
|
23
|
+
const _super = Object.create(null, {
|
|
24
|
+
getHitElements: { get: () => super.getHitElements }
|
|
25
|
+
});
|
|
26
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
27
|
+
const hitFilesData = yield _super.getHitElements.call(this);
|
|
28
|
+
const transformed = yield this.transformJsCoverageToTs();
|
|
29
|
+
return this.extractHitsFromTransformedCoverage(hitFilesData, transformed);
|
|
80
30
|
});
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
_loop_1 = function (fileName) {
|
|
91
|
-
var transformedCoverageFile, transformedCoverageMap, singleCoverageMap, fileNameAfterTransform, err_1;
|
|
92
|
-
var _c;
|
|
93
|
-
return __generator(this, function (_d) {
|
|
94
|
-
switch (_d.label) {
|
|
95
|
-
case 0:
|
|
96
|
-
transformedCoverageFile = this_1._transformedFilesOutput[fileName];
|
|
97
|
-
if (transformedCoverageFile) {
|
|
98
|
-
return [2 /*return*/, "continue"];
|
|
99
|
-
}
|
|
100
|
-
transformedCoverageMap = null;
|
|
101
|
-
_d.label = 1;
|
|
102
|
-
case 1:
|
|
103
|
-
_d.trys.push([1, 3, , 4]);
|
|
104
|
-
singleCoverageMap = IstanbulCoverage.createCoverageMap((_c = {},
|
|
105
|
-
_c[fileName] = coverageMap.fileCoverageFor(fileName),
|
|
106
|
-
_c));
|
|
107
|
-
return [4 /*yield*/, IstanbulSourceMapStore.createSourceMapStore().transformCoverage(singleCoverageMap)];
|
|
108
|
-
case 2:
|
|
109
|
-
transformedCoverageMap = _d.sent();
|
|
110
|
-
fileNameAfterTransform = transformedCoverageMap.files().find(function (f) { return files_utils_1.FilesUtils.adjustPathSlashes(f) === files_utils_1.FilesUtils.adjustPathSlashes(fileName); });
|
|
111
|
-
this_1._transformedFilesOutput[fileName] = transformedCoverageMap.fileCoverageFor(fileNameAfterTransform);
|
|
112
|
-
return [3 /*break*/, 4];
|
|
113
|
-
case 3:
|
|
114
|
-
err_1 = _d.sent();
|
|
115
|
-
this_1.errors.push({
|
|
116
|
-
fileName: fileName,
|
|
117
|
-
transformedCoverageMapKeys: Object.keys(transformedCoverageMap || {}),
|
|
118
|
-
});
|
|
119
|
-
this_1.logger.error("Failed during the coverage transform with error: ".concat(err_1.message));
|
|
120
|
-
return [3 /*break*/, 4];
|
|
121
|
-
case 4: return [2 /*return*/];
|
|
122
|
-
}
|
|
123
|
-
});
|
|
124
|
-
};
|
|
125
|
-
this_1 = this;
|
|
126
|
-
_i = 0, _a = coverageMap.files();
|
|
127
|
-
_b.label = 1;
|
|
128
|
-
case 1:
|
|
129
|
-
if (!(_i < _a.length)) return [3 /*break*/, 4];
|
|
130
|
-
fileName = _a[_i];
|
|
131
|
-
return [5 /*yield**/, _loop_1(fileName)];
|
|
132
|
-
case 2:
|
|
133
|
-
_b.sent();
|
|
134
|
-
_b.label = 3;
|
|
135
|
-
case 3:
|
|
136
|
-
_i++;
|
|
137
|
-
return [3 /*break*/, 1];
|
|
138
|
-
case 4:
|
|
139
|
-
this._transformedFilesMap = IstanbulCoverage.createCoverageMap(this._transformedFilesOutput);
|
|
140
|
-
return [2 /*return*/, this._transformedFilesMap];
|
|
31
|
+
}
|
|
32
|
+
transformJsCoverageToTs() {
|
|
33
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
34
|
+
const globalCoverageObject = this.getGlobalCoverageObject();
|
|
35
|
+
const coverageMap = IstanbulCoverage.createCoverageMap(globalCoverageObject);
|
|
36
|
+
for (const fileName of coverageMap.files()) {
|
|
37
|
+
const transformedCoverageFile = this._transformedFilesOutput[fileName];
|
|
38
|
+
if (transformedCoverageFile) {
|
|
39
|
+
continue;
|
|
141
40
|
}
|
|
142
|
-
|
|
41
|
+
let transformedCoverageMap = null;
|
|
42
|
+
try {
|
|
43
|
+
const singleCoverageMap = IstanbulCoverage.createCoverageMap({
|
|
44
|
+
[fileName]: coverageMap.fileCoverageFor(fileName),
|
|
45
|
+
});
|
|
46
|
+
transformedCoverageMap = yield IstanbulSourceMapStore.createSourceMapStore().transformCoverage(singleCoverageMap);
|
|
47
|
+
const fileNameAfterTransform = transformedCoverageMap.files().find(f => files_utils_1.FilesUtils.adjustPathSlashes(f) === files_utils_1.FilesUtils.adjustPathSlashes(fileName));
|
|
48
|
+
this._transformedFilesOutput[fileName] = transformedCoverageMap.fileCoverageFor(fileNameAfterTransform);
|
|
49
|
+
}
|
|
50
|
+
catch (err) {
|
|
51
|
+
this.errors.push({
|
|
52
|
+
fileName,
|
|
53
|
+
transformedCoverageMapKeys: Object.keys(transformedCoverageMap || {}),
|
|
54
|
+
});
|
|
55
|
+
this.logger.error(`Failed during the coverage transform with error: ${err.message}`);
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
this._transformedFilesMap = IstanbulCoverage.createCoverageMap(this._transformedFilesOutput);
|
|
59
|
+
return this._transformedFilesMap;
|
|
143
60
|
});
|
|
144
|
-
}
|
|
145
|
-
|
|
146
|
-
return hits.map(
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
hitObj.hitMethods.forEach(
|
|
151
|
-
|
|
61
|
+
}
|
|
62
|
+
extractHitsFromTransformedCoverage(hits, transformed) {
|
|
63
|
+
return hits.map(hitObj => {
|
|
64
|
+
const fileCoverage = transformed.fileCoverageFor(hitObj.filename);
|
|
65
|
+
const fnMap = Object.values(fileCoverage.fnMap);
|
|
66
|
+
const hitMethods = [];
|
|
67
|
+
hitObj.hitMethods.forEach(hitMethod => {
|
|
68
|
+
const transformedMethod = fnMap.find(x => x.name === hitMethod.name);
|
|
152
69
|
if (transformedMethod) {
|
|
153
70
|
hitMethods.push({
|
|
154
71
|
name: hitMethod.name,
|
|
@@ -160,16 +77,15 @@ var TsNodeHitsCollector = /** @class */ (function (_super) {
|
|
|
160
77
|
});
|
|
161
78
|
return {
|
|
162
79
|
filename: hitObj.filename,
|
|
163
|
-
hitMethods
|
|
80
|
+
hitMethods,
|
|
164
81
|
hitBranches: [],
|
|
165
82
|
shouldResolveRelativePath: true
|
|
166
83
|
};
|
|
167
84
|
});
|
|
168
|
-
}
|
|
169
|
-
|
|
85
|
+
}
|
|
86
|
+
getHitBranches(currentHits, fileHitSnapshot) {
|
|
170
87
|
return [];
|
|
171
|
-
}
|
|
172
|
-
|
|
173
|
-
}(hits_collector_1.HitsCollector));
|
|
88
|
+
}
|
|
89
|
+
}
|
|
174
90
|
exports.TsNodeHitsCollector = TsNodeHitsCollector;
|
|
175
91
|
//# sourceMappingURL=ts-node-hits-collector.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ts-node-hits-collector.js","sourceRoot":"","sources":["../../../test-listener/footprints-process/ts-node-hits-collector.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ts-node-hits-collector.js","sourceRoot":"","sources":["../../../test-listener/footprints-process/ts-node-hits-collector.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,gEAA4D;AAC5D,0DAA0D;AAK1D,mEAAmE;AAGnE,sFAAgF;AAEhF,MAAa,mBAAoB,SAAQ,8BAAa;IA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gBACV,WAAW,EAAE,EAAE;gBACf,yBAAyB,EAAE,IAAI;aAClC,CAAA;QACL,CAAC,CAAC,CAAC;IACP,CAAC;IAES,cAAc,CAAC,WAA4B,EAAE,eAAgC;QACnF,OAAO,EAAE,CAAC;IACd,CAAC;CACJ;AA5ED,kDA4EC"}
|
|
@@ -4,26 +4,26 @@ exports.SlGulp = void 0;
|
|
|
4
4
|
/**
|
|
5
5
|
* Created by nadav on 12/03/2017.
|
|
6
6
|
*/
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
7
|
+
const ScanModeData_1 = require("../entities/build-scanner/ScanModeData");
|
|
8
|
+
const ConfigModeData_1 = require("../entities/build-scanner/ConfigModeData");
|
|
9
|
+
const SlNodeJsProxy_1 = require("../SlNodeJsProxy");
|
|
10
|
+
const UserMessageHelper_1 = require("../UserMessageHelper");
|
|
11
|
+
const AppNameResolver_1 = require("../resolvers/AppNameResolver");
|
|
12
|
+
const BuildResolver_1 = require("../resolvers/BuildResolver");
|
|
13
|
+
const BuildSessionIdResolver_1 = require("../resolvers/BuildSessionIdResolver");
|
|
14
|
+
const BuildSessionIdFileResolver_1 = require("../resolvers/BuildSessionIdFileResolver");
|
|
15
|
+
const TokenResolver_1 = require("../resolvers/TokenResolver");
|
|
16
|
+
const ProxyResolver_1 = require("../resolvers/ProxyResolver");
|
|
17
|
+
const objectAssign = require("object-assign");
|
|
18
18
|
// gulp-util is used to created well-formed plugin errors
|
|
19
19
|
// eslint-disable-next-line @typescript-eslint/no-var-requires
|
|
20
|
-
|
|
20
|
+
const PluginError = require('plugin-error');
|
|
21
21
|
/**
|
|
22
22
|
* This class integrates Sealights into Gulp.
|
|
23
23
|
* Among its main responsibilities, it runs the build-scanner and test-listener.
|
|
24
24
|
* */
|
|
25
|
-
|
|
26
|
-
|
|
25
|
+
class SlGulp {
|
|
26
|
+
constructor(slNodeJsProxy) {
|
|
27
27
|
this.slNodeJsProxy = slNodeJsProxy;
|
|
28
28
|
this.userMessageHelper = new UserMessageHelper_1.UserMessageHelper('[SL-GULP]', false);
|
|
29
29
|
this.appNameResolver = new AppNameResolver_1.AppNameResolver(this.userMessageHelper);
|
|
@@ -36,7 +36,7 @@ var SlGulp = /** @class */ (function () {
|
|
|
36
36
|
this.slNodeJsProxy = new SlNodeJsProxy_1.SlNodeJsProxy(this.userMessageHelper);
|
|
37
37
|
}
|
|
38
38
|
}
|
|
39
|
-
|
|
39
|
+
runConfigMode(configModeData, callback) {
|
|
40
40
|
if (!this.isEnabled()) {
|
|
41
41
|
return callback(null);
|
|
42
42
|
}
|
|
@@ -54,9 +54,9 @@ var SlGulp = /** @class */ (function () {
|
|
|
54
54
|
configModeData.buildSessionIdFile = this.buildSessionIdFileResolver.resolve(configModeData.buildSessionIdFile);
|
|
55
55
|
configModeData.token = this.tokenResolver.resolve(configModeData.token, configModeData.tokenFile);
|
|
56
56
|
configModeData.proxy = this.proxyResolver.resolve(configModeData.proxy);
|
|
57
|
-
this.slNodeJsProxy.runConfigMode(configModeData,
|
|
57
|
+
this.slNodeJsProxy.runConfigMode(configModeData, (error) => {
|
|
58
58
|
if (error) {
|
|
59
|
-
|
|
59
|
+
const e = new PluginError('gulp-slnodejs', 'SlNodeJS failed while running \'config\' mode. Error: ' + error.message);
|
|
60
60
|
if (e) {
|
|
61
61
|
console.log('Failed to run \'config\' mode. Error:', e);
|
|
62
62
|
return callback(e);
|
|
@@ -64,8 +64,8 @@ var SlGulp = /** @class */ (function () {
|
|
|
64
64
|
}
|
|
65
65
|
return callback(null);
|
|
66
66
|
});
|
|
67
|
-
}
|
|
68
|
-
|
|
67
|
+
}
|
|
68
|
+
runScanMode(scanModeData, callback) {
|
|
69
69
|
if (!this.isEnabled()) {
|
|
70
70
|
return callback(null);
|
|
71
71
|
}
|
|
@@ -81,9 +81,9 @@ var SlGulp = /** @class */ (function () {
|
|
|
81
81
|
scanModeData.buildSessionId = this.buildSessionIdResolver.resolve(scanModeData.buildSessionId, scanModeData.buildSessionIdFile);
|
|
82
82
|
scanModeData.token = this.tokenResolver.resolve(scanModeData.token, scanModeData.tokenFile);
|
|
83
83
|
scanModeData.proxy = this.proxyResolver.resolve(scanModeData.proxy);
|
|
84
|
-
this.slNodeJsProxy.runScanMode(scanModeData,
|
|
84
|
+
this.slNodeJsProxy.runScanMode(scanModeData, (error) => {
|
|
85
85
|
if (error) {
|
|
86
|
-
|
|
86
|
+
const e = new PluginError('gulp-slnodejs', 'SlNodeJS failed while running \'scan\' mode. Error: ' + error.message);
|
|
87
87
|
if (e) {
|
|
88
88
|
console.log('Failed to run \'scan\' mode. Error:', e);
|
|
89
89
|
return callback(e);
|
|
@@ -91,15 +91,14 @@ var SlGulp = /** @class */ (function () {
|
|
|
91
91
|
}
|
|
92
92
|
return callback(null);
|
|
93
93
|
});
|
|
94
|
-
}
|
|
95
|
-
|
|
94
|
+
}
|
|
95
|
+
isEnabled() {
|
|
96
96
|
if (process.env && process.env['SL_ENABLED']) {
|
|
97
97
|
process.env['SL_ENABLED'].toLowerCase() === 'true';
|
|
98
98
|
}
|
|
99
99
|
return true;
|
|
100
100
|
//return isEnabled;
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
}());
|
|
101
|
+
}
|
|
102
|
+
}
|
|
104
103
|
exports.SlGulp = SlGulp;
|
|
105
104
|
//# sourceMappingURL=SlGulp.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SlGulp.js","sourceRoot":"","sources":["../../../test-listener/integrations/SlGulp.ts"],"names":[],"mappings":";;;AAAA;;GAEG;AACH,
|
|
1
|
+
{"version":3,"file":"SlGulp.js","sourceRoot":"","sources":["../../../test-listener/integrations/SlGulp.ts"],"names":[],"mappings":";;;AAAA;;GAEG;AACH,yEAAoE;AACpE,6EAAwE;AACxE,oDAA+C;AAC/C,4DAAuD;AACvD,kEAA6D;AAC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C,CAAC,CAAC;IACP,CAAC;IAEO,SAAS;QACb,IAAI,OAAO,CAAC,GAAG,IAAI,OAAO,CAAC,GAAG,CAAC,YAAY,CAAC,EAAC;YACzC,OAAO,CAAC,GAAG,CAAC,YAAY,CAAC,CAAC,WAAW,EAAE,KAAK,MAAM,CAAC;SACtD;QACD,OAAO,IAAI,CAAC;QACZ,mBAAmB;IACvB,CAAC;CACJ;AA9FD,wBA8FC"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.LogsProcess = void 0;
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
const system_date_1 = require("../../common/system-date");
|
|
5
|
+
class LogsProcess {
|
|
6
|
+
constructor(cfg, bufferingLogger, logServiceProxy,
|
|
7
7
|
/**
|
|
8
8
|
* Environments service, used to get environmental data for submission (process id, machine data, etc.)
|
|
9
9
|
*/
|
|
@@ -16,7 +16,6 @@ var LogsProcess = /** @class */ (function () {
|
|
|
16
16
|
* Foreground thread that prevents the process from shutting down, and kept alive while there are items to submit to the server or items are currently being submitted
|
|
17
17
|
*/
|
|
18
18
|
keepaliveWatchdog, logger) {
|
|
19
|
-
var _this = this;
|
|
20
19
|
this.cfg = cfg;
|
|
21
20
|
this.bufferingLogger = bufferingLogger;
|
|
22
21
|
this.logServiceProxy = logServiceProxy;
|
|
@@ -50,23 +49,23 @@ var LogsProcess = /** @class */ (function () {
|
|
|
50
49
|
if (!keepaliveWatchdog) {
|
|
51
50
|
throw new Error('keepaliveWatchdog was not specified');
|
|
52
51
|
}
|
|
53
|
-
bufferingLogger.on('log_buffer_full',
|
|
52
|
+
bufferingLogger.on('log_buffer_full', (buffer) => {
|
|
54
53
|
if (buffer.length) {
|
|
55
|
-
|
|
54
|
+
this.submitLogBuffer(buffer);
|
|
56
55
|
}
|
|
57
56
|
});
|
|
58
|
-
sendToServerWatchdog.on('alarm',
|
|
59
|
-
if (
|
|
60
|
-
|
|
57
|
+
sendToServerWatchdog.on('alarm', () => {
|
|
58
|
+
if (this.cfg.sendLogs.value)
|
|
59
|
+
this.bufferingLogger.checkBuffer(true);
|
|
61
60
|
});
|
|
62
61
|
}
|
|
63
|
-
|
|
64
|
-
|
|
62
|
+
createLogsPacket(items) {
|
|
63
|
+
const packet = {
|
|
65
64
|
customerId: this.cfg.customerId.value,
|
|
66
65
|
appName: this.cfg.appName.value,
|
|
67
66
|
environment: this.environmentDataService.getEnvDataForSubmission(),
|
|
68
67
|
configurationData: this.cfg.toJsonObject(),
|
|
69
|
-
logs: items.map(
|
|
68
|
+
logs: items.map(t => JSON.stringify(t)),
|
|
70
69
|
meta: {
|
|
71
70
|
sequence: ++this.sequence,
|
|
72
71
|
generated: (0, system_date_1.getSystemDateValueOf)(),
|
|
@@ -74,44 +73,41 @@ var LogsProcess = /** @class */ (function () {
|
|
|
74
73
|
},
|
|
75
74
|
};
|
|
76
75
|
return packet;
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
var _this = this;
|
|
76
|
+
}
|
|
77
|
+
submitLogBuffer(items) {
|
|
80
78
|
if (!items.length)
|
|
81
79
|
return;
|
|
82
|
-
|
|
80
|
+
const packet = this.createLogsPacket(items);
|
|
83
81
|
if (this.isSubmittingLogs) {
|
|
84
82
|
//drop logs packet
|
|
85
83
|
return;
|
|
86
84
|
}
|
|
87
85
|
this.isSubmittingLogs = true;
|
|
88
|
-
this.logServiceProxy.submitLogs(packet,
|
|
86
|
+
this.logServiceProxy.submitLogs(packet, (err) => {
|
|
89
87
|
if (err) {
|
|
90
88
|
//log?
|
|
91
89
|
}
|
|
92
|
-
|
|
93
|
-
|
|
90
|
+
this.isSubmittingLogs = false;
|
|
91
|
+
this.callStopCallbacks();
|
|
94
92
|
});
|
|
95
|
-
}
|
|
96
|
-
|
|
93
|
+
}
|
|
94
|
+
start() {
|
|
97
95
|
this.isRunning = true;
|
|
98
96
|
this.sendToServerWatchdog.start();
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
var _this = this;
|
|
97
|
+
}
|
|
98
|
+
callStopCallbacks() {
|
|
102
99
|
if (this.stopCallbacks.length > 0) {
|
|
103
|
-
this.stopCallbacks.forEach(
|
|
100
|
+
this.stopCallbacks.forEach((cb) => {
|
|
104
101
|
try {
|
|
105
102
|
cb();
|
|
106
103
|
}
|
|
107
104
|
catch (err) {
|
|
108
|
-
|
|
105
|
+
this.environmentDataService.setLastError(err.stack);
|
|
109
106
|
}
|
|
110
107
|
});
|
|
111
108
|
}
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
var _this = this;
|
|
109
|
+
}
|
|
110
|
+
stop(callback) {
|
|
115
111
|
this.sendToServerWatchdog.stop();
|
|
116
112
|
try {
|
|
117
113
|
if (this.cfg.enabled.value === false || this.cfg.sendLogs.value === false) { //Log sending/Agent functionality is disabled. Return immediately
|
|
@@ -121,9 +117,9 @@ var LogsProcess = /** @class */ (function () {
|
|
|
121
117
|
this.bufferingLogger.checkBuffer(true);
|
|
122
118
|
this.bufferingLogger.stop();
|
|
123
119
|
if (this.isSubmittingLogs) {
|
|
124
|
-
this.stopCallbacks.push(
|
|
125
|
-
|
|
126
|
-
|
|
120
|
+
this.stopCallbacks.push(() => {
|
|
121
|
+
this.isRunning = false;
|
|
122
|
+
this.keepaliveWatchdog.stop();
|
|
127
123
|
return callback();
|
|
128
124
|
});
|
|
129
125
|
}
|
|
@@ -136,8 +132,7 @@ var LogsProcess = /** @class */ (function () {
|
|
|
136
132
|
catch (err) {
|
|
137
133
|
return callback();
|
|
138
134
|
}
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
}());
|
|
135
|
+
}
|
|
136
|
+
}
|
|
142
137
|
exports.LogsProcess = LogsProcess;
|
|
143
138
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../test-listener/logs-process/index.ts"],"names":[],"mappings":";;;AA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AC,gBAAgB,EAAE;gBACvB,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,GAAG,EAAE;oBACzB,IAAI,CAAC,SAAS,GAAG,KAAK,CAAC;oBACvB,IAAI,CAAC,iBAAiB,CAAC,IAAI,EAAE,CAAC;oBAC9B,OAAO,QAAQ,EAAE,CAAC;gBACtB,CAAC,CAAC,CAAC;aACN;iBACI;gBACD,IAAI,CAAC,SAAS,GAAG,KAAK,CAAC;gBACvB,IAAI,CAAC,iBAAiB,CAAC,IAAI,EAAE,CAAC;gBAC9B,OAAO,QAAQ,EAAE,CAAC;aACrB;SACJ;QAAC,OAAO,GAAG,EAAE;YACV,OAAO,QAAQ,EAAE,CAAC;SACrB;IACL,CAAC;CACJ;AAxID,kCAwIC"}
|
|
@@ -1,32 +1,15 @@
|
|
|
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.LogServiceProxy = void 0;
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
return _super.call(this, cfg, request, logger) || this;
|
|
4
|
+
const base_proxy_1 = require("../base-proxy");
|
|
5
|
+
class LogServiceProxy extends base_proxy_1.BaseProxy {
|
|
6
|
+
constructor(cfg, request, logger) {
|
|
7
|
+
super(cfg, request, logger);
|
|
24
8
|
}
|
|
25
|
-
|
|
26
|
-
|
|
9
|
+
submitLogs(packetToSend, callback) {
|
|
10
|
+
const bufferToSend = new Buffer(JSON.stringify(packetToSend));
|
|
27
11
|
this.post(bufferToSend, '/v2/logsubmission', callback);
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
}(base_proxy_1.BaseProxy));
|
|
12
|
+
}
|
|
13
|
+
}
|
|
31
14
|
exports.LogServiceProxy = LogServiceProxy;
|
|
32
15
|
//# sourceMappingURL=log-service-proxy.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"log-service-proxy.js","sourceRoot":"","sources":["../../../test-listener/logs-process/log-service-proxy.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"log-service-proxy.js","sourceRoot":"","sources":["../../../test-listener/logs-process/log-service-proxy.ts"],"names":[],"mappings":";;;AAAA,8CAA0C;AAK1C,MAAa,eAAgB,SAAQ,sBAAS;IAC1C,YAAmB,GAAgB,EAAE,OAAkC,EAAE,MAAc;QACnF,KAAK,CAAC,GAAG,EAAE,OAAO,EAAE,MAAM,CAAC,CAAC;IAChC,CAAC;IAEM,UAAU,CAAC,YAA0B,EAAE,QAA8B;QACxE,MAAM,YAAY,GAAG,IAAI,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC,YAAY,CAAC,CAAC,CAAC;QAC9D,IAAI,CAAC,IAAI,CAAC,YAAY,EAAE,mBAAmB,EAAE,QAAQ,CAAC,CAAC;IAC3D,CAAC;CACJ;AATD,0CASC"}
|