slnodejs 6.1.415 → 6.1.447
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/browser-agent/dist/browser-agent-all.js +249 -414
- package/browser-agent/dist/browser-agent-all.min.js +3 -3
- package/browser-agent/package.json +1 -1
- package/package.json +2 -2
- package/tsOutputs/api.js +32 -86
- package/tsOutputs/build-scanner/ast-utils.js +11 -11
- package/tsOutputs/build-scanner/ast-utils.js.map +1 -1
- package/tsOutputs/build-scanner/build-diff-process.js +35 -16
- package/tsOutputs/build-scanner/build-diff-process.js.map +1 -1
- package/tsOutputs/build-scanner/cia.js +2 -2
- package/tsOutputs/build-scanner/cia.js.map +1 -1
- package/tsOutputs/build-scanner/default-values-resolver.js +5 -7
- package/tsOutputs/build-scanner/default-values-resolver.js.map +1 -1
- package/tsOutputs/build-scanner/diagnostic/build-scan-diagnosis.js +101 -159
- package/tsOutputs/build-scanner/diagnostic/build-scan-diagnosis.js.map +1 -1
- package/tsOutputs/build-scanner/diagnostic/none-diagnosis.js +23 -55
- package/tsOutputs/build-scanner/diagnostic/none-diagnosis.js.map +1 -1
- package/tsOutputs/build-scanner/file-and-folder-utils.js +3 -3
- package/tsOutputs/build-scanner/file-and-folder-utils.js.map +1 -1
- package/tsOutputs/build-scanner/file-system/actual-file.js +3 -3
- package/tsOutputs/build-scanner/file-system/actual-file.js.map +1 -1
- package/tsOutputs/build-scanner/instrumentation/browser-instrumenter.js +56 -60
- package/tsOutputs/build-scanner/instrumentation/browser-instrumenter.js.map +1 -1
- package/tsOutputs/build-scanner/instrumentation/content-instrumenter.js +9 -10
- package/tsOutputs/build-scanner/instrumentation/content-instrumenter.js.map +1 -1
- package/tsOutputs/build-scanner/instrumentation/files-instrumenter.js +80 -124
- package/tsOutputs/build-scanner/instrumentation/files-instrumenter.js.map +1 -1
- package/tsOutputs/build-scanner/instrumentation/instrumentation-utils.js +3 -3
- package/tsOutputs/build-scanner/instrumentation/instrumentation-utils.js.map +1 -1
- package/tsOutputs/build-scanner/instrumentation/instrumented-file-size-reducer.js +4 -4
- package/tsOutputs/build-scanner/instrumentation/instrumented-file-size-reducer.js.map +1 -1
- package/tsOutputs/build-scanner/instrumentation/process-pool/instrumenter-spawn.js +15 -50
- package/tsOutputs/build-scanner/instrumentation/process-pool/instrumenter-spawn.js.map +1 -1
- package/tsOutputs/build-scanner/instrumentation/process-pool/process-pool.js +84 -141
- package/tsOutputs/build-scanner/instrumentation/process-pool/process-pool.js.map +1 -1
- package/tsOutputs/build-scanner/instrumentation/process-pool/split-by-transform-stream.js +15 -34
- package/tsOutputs/build-scanner/instrumentation/process-pool/split-by-transform-stream.js.map +1 -1
- package/tsOutputs/build-scanner/instrumentation/process-pool/stop-by-condition-transform-stream.js +9 -27
- package/tsOutputs/build-scanner/instrumentation/process-pool/stop-by-condition-transform-stream.js.map +1 -1
- package/tsOutputs/build-scanner/instrumentation/strategies/copy-as-is-strategy.js +8 -10
- package/tsOutputs/build-scanner/instrumentation/strategies/copy-as-is-strategy.js.map +1 -1
- package/tsOutputs/build-scanner/instrumentation/strategies/js-instrumnetation-strategy.js +22 -54
- package/tsOutputs/build-scanner/instrumentation/strategies/js-instrumnetation-strategy.js.map +1 -1
- package/tsOutputs/build-scanner/instrumentation/strategies/markup-instrumnetation-strategy.js +55 -107
- package/tsOutputs/build-scanner/instrumentation/strategies/markup-instrumnetation-strategy.js.map +1 -1
- package/tsOutputs/build-scanner/js_diff/file-signature.js +5 -6
- package/tsOutputs/build-scanner/js_diff/file-signature.js.map +1 -1
- package/tsOutputs/build-scanner/js_diff/files-mapping.js +6 -6
- package/tsOutputs/build-scanner/js_diff/files-mapping.js.map +1 -1
- package/tsOutputs/build-scanner/js_diff/generated-file-signature.js +3 -3
- package/tsOutputs/build-scanner/js_diff/generated-file-signature.js.map +1 -1
- package/tsOutputs/build-scanner/js_diff/guess-method-location.js +26 -27
- package/tsOutputs/build-scanner/js_diff/guess-method-location.js.map +1 -1
- package/tsOutputs/build-scanner/js_diff/method-signature.js +1 -1
- package/tsOutputs/build-scanner/js_diff/method-signature.js.map +1 -1
- package/tsOutputs/build-scanner/js_diff/sl-mapper.js +28 -79
- package/tsOutputs/build-scanner/js_diff/sl-mapper.js.map +1 -1
- package/tsOutputs/build-scanner/js_diff/source-data-enricher.js +3 -2
- package/tsOutputs/build-scanner/js_diff/source-data-enricher.js.map +1 -1
- package/tsOutputs/build-scanner/js_diff/source-files-notifier.js +1 -1
- package/tsOutputs/build-scanner/js_diff/source-files-notifier.js.map +1 -1
- package/tsOutputs/build-scanner/mappings/ensure-files-handler.service.js +76 -149
- package/tsOutputs/build-scanner/mappings/ensure-files-handler.service.js.map +1 -1
- package/tsOutputs/build-scanner/mappings/file-element-utils.js +9 -9
- package/tsOutputs/build-scanner/mappings/file-element-utils.js.map +1 -1
- package/tsOutputs/build-scanner/mappings/file-enricher.js +71 -100
- package/tsOutputs/build-scanner/mappings/file-enricher.js.map +1 -1
- package/tsOutputs/build-scanner/mappings/file-path-fixer.js +112 -0
- package/tsOutputs/build-scanner/mappings/file-path-fixer.js.map +1 -0
- package/tsOutputs/build-scanner/mappings/files-container.js +89 -0
- package/tsOutputs/build-scanner/mappings/files-container.js.map +1 -0
- package/tsOutputs/build-scanner/mappings/files-data-container.js +18 -23
- package/tsOutputs/build-scanner/mappings/files-data-container.js.map +1 -1
- package/tsOutputs/build-scanner/mappings/source-path-mapper.js +15 -45
- package/tsOutputs/build-scanner/mappings/source-path-mapper.js.map +1 -1
- package/tsOutputs/build-scanner/markup-files-parser.js +1 -1
- package/tsOutputs/build-scanner/markup-files-parser.js.map +1 -1
- package/tsOutputs/build-scanner/scm/scm-file-fixer.js +27 -0
- package/tsOutputs/build-scanner/scm/scm-file-fixer.js.map +1 -0
- package/tsOutputs/build-scanner/scm/scm-files-container.js +9 -45
- package/tsOutputs/build-scanner/scm/scm-files-container.js.map +1 -1
- package/tsOutputs/build-scanner/sl-config-cia-cli.js +1 -1
- package/tsOutputs/build-scanner/sl-config-cia-cli.js.map +1 -1
- package/tsOutputs/build-scanner/utils.js +5 -5
- package/tsOutputs/build-scanner/utils.js.map +1 -1
- package/tsOutputs/cli-parse/agent-instance-data.js +2 -2
- package/tsOutputs/cli-parse/agent-instance-data.js.map +1 -1
- package/tsOutputs/cli-parse/child-process-wrapper.js +26 -60
- package/tsOutputs/cli-parse/child-process-wrapper.js.map +1 -1
- package/tsOutputs/cli-parse/cli.js +72 -191
- package/tsOutputs/cli-parse/cli.js.map +1 -1
- package/tsOutputs/cli-parse/constants/constants.js +9 -9
- package/tsOutputs/cli-parse/constants/constants.js.map +1 -1
- package/tsOutputs/cli-parse/custom-commander.js +17 -18
- package/tsOutputs/cli-parse/custom-commander.js.map +1 -1
- package/tsOutputs/cli-parse/executors/base-executor.js +121 -236
- package/tsOutputs/cli-parse/executors/base-executor.js.map +1 -1
- package/tsOutputs/cli-parse/executors/build-args-dto.js +10 -11
- package/tsOutputs/cli-parse/executors/build-args-dto.js.map +1 -1
- package/tsOutputs/cli-parse/executors/build-end-executor.js +34 -92
- package/tsOutputs/cli-parse/executors/build-end-executor.js.map +1 -1
- package/tsOutputs/cli-parse/executors/build-executor.js +64 -133
- package/tsOutputs/cli-parse/executors/build-executor.js.map +1 -1
- package/tsOutputs/cli-parse/executors/config-executor.js +35 -92
- package/tsOutputs/cli-parse/executors/config-executor.js.map +1 -1
- package/tsOutputs/cli-parse/executors/dry-run/base-data.js +29 -39
- package/tsOutputs/cli-parse/executors/dry-run/base-data.js.map +1 -1
- package/tsOutputs/cli-parse/executors/dry-run/build-mapping-data.js +92 -177
- package/tsOutputs/cli-parse/executors/dry-run/build-mapping-data.js.map +1 -1
- package/tsOutputs/cli-parse/executors/dry-run/dry-run-executor.js +110 -194
- package/tsOutputs/cli-parse/executors/dry-run/dry-run-executor.js.map +1 -1
- package/tsOutputs/cli-parse/executors/dry-run/dry-run-validation.js +49 -83
- package/tsOutputs/cli-parse/executors/dry-run/dry-run-validation.js.map +1 -1
- package/tsOutputs/cli-parse/executors/dry-run/footprints-data.js +55 -113
- package/tsOutputs/cli-parse/executors/dry-run/footprints-data.js.map +1 -1
- package/tsOutputs/cli-parse/executors/dry-run/helper-methods.js +24 -25
- package/tsOutputs/cli-parse/executors/dry-run/helper-methods.js.map +1 -1
- package/tsOutputs/cli-parse/executors/end-execution-executor.js +16 -64
- package/tsOutputs/cli-parse/executors/end-execution-executor.js.map +1 -1
- package/tsOutputs/cli-parse/executors/integration-build-components-executor.js +29 -82
- package/tsOutputs/cli-parse/executors/integration-build-components-executor.js.map +1 -1
- package/tsOutputs/cli-parse/executors/integration-build-delete-components-executor.js +12 -59
- package/tsOutputs/cli-parse/executors/integration-build-delete-components-executor.js.map +1 -1
- package/tsOutputs/cli-parse/executors/integration-build-update-components-executor.js +9 -58
- package/tsOutputs/cli-parse/executors/integration-build-update-components-executor.js.map +1 -1
- package/tsOutputs/cli-parse/executors/mocha-executor.js +41 -101
- package/tsOutputs/cli-parse/executors/mocha-executor.js.map +1 -1
- package/tsOutputs/cli-parse/executors/nyc-report-executor.js +24 -83
- package/tsOutputs/cli-parse/executors/nyc-report-executor.js.map +1 -1
- package/tsOutputs/cli-parse/executors/pr-config-executor.js +15 -63
- package/tsOutputs/cli-parse/executors/pr-config-executor.js.map +1 -1
- package/tsOutputs/cli-parse/executors/run-executor.js +23 -75
- package/tsOutputs/cli-parse/executors/run-executor.js.map +1 -1
- package/tsOutputs/cli-parse/executors/start-execution-executor.js +16 -64
- package/tsOutputs/cli-parse/executors/start-execution-executor.js.map +1 -1
- package/tsOutputs/cli-parse/executors/test-executions-executor.js +9 -63
- package/tsOutputs/cli-parse/executors/test-executions-executor.js.map +1 -1
- package/tsOutputs/cli-parse/executors/test-listener-executor.js +47 -117
- package/tsOutputs/cli-parse/executors/test-listener-executor.js.map +1 -1
- package/tsOutputs/cli-parse/executors/upload-report-executor.js +23 -71
- package/tsOutputs/cli-parse/executors/upload-report-executor.js.map +1 -1
- package/tsOutputs/cli-parse/utils.js +10 -10
- package/tsOutputs/cli-parse/utils.js.map +1 -1
- package/tsOutputs/common/agent-events/agent-events-controller.js +146 -251
- package/tsOutputs/common/agent-events/agent-events-controller.js.map +1 -1
- package/tsOutputs/common/agent-events/agent-events-guard.js +12 -15
- package/tsOutputs/common/agent-events/agent-events-guard.js.map +1 -1
- package/tsOutputs/common/agent-events/agent-instance-info-builder.js +22 -24
- package/tsOutputs/common/agent-events/agent-instance-info-builder.js.map +1 -1
- package/tsOutputs/common/agent-events/agent-start-info-builder.js +7 -8
- package/tsOutputs/common/agent-events/agent-start-info-builder.js.map +1 -1
- package/tsOutputs/common/agent-events/browser-info-builder.js +9 -10
- package/tsOutputs/common/agent-events/browser-info-builder.js.map +1 -1
- package/tsOutputs/common/agent-events/ci-info-builder.js +12 -13
- package/tsOutputs/common/agent-events/ci-info-builder.js.map +1 -1
- package/tsOutputs/common/agent-events/cockpit-notifier.js +38 -87
- package/tsOutputs/common/agent-events/cockpit-notifier.js.map +1 -1
- package/tsOutputs/common/agent-events/dry-run-agent-events-controller.js +10 -27
- package/tsOutputs/common/agent-events/dry-run-agent-events-controller.js.map +1 -1
- package/tsOutputs/common/agent-events/machine-info-builder.js +21 -22
- package/tsOutputs/common/agent-events/machine-info-builder.js.map +1 -1
- package/tsOutputs/common/agent-events/no-op-agent-events-controller.js +30 -84
- package/tsOutputs/common/agent-events/no-op-agent-events-controller.js.map +1 -1
- package/tsOutputs/common/agent-events/nodejs-env-info-builder.js +7 -8
- package/tsOutputs/common/agent-events/nodejs-env-info-builder.js.map +1 -1
- package/tsOutputs/common/agent-events/sensitive-data-filter.js +3 -4
- package/tsOutputs/common/agent-events/sensitive-data-filter.js.map +1 -1
- package/tsOutputs/common/agent-instance-data.js +23 -28
- package/tsOutputs/common/agent-instance-data.js.map +1 -1
- package/tsOutputs/common/cli-progress.js +16 -19
- package/tsOutputs/common/cli-progress.js.map +1 -1
- package/tsOutputs/common/config-process/config-loader.js +23 -24
- package/tsOutputs/common/config-process/config-loader.js.map +1 -1
- package/tsOutputs/common/config-process/config-system.js +104 -131
- package/tsOutputs/common/config-process/config-system.js.map +1 -1
- package/tsOutputs/common/config-process/config.js +52 -73
- package/tsOutputs/common/config-process/config.js.map +1 -1
- package/tsOutputs/common/config-process/index.js +38 -57
- package/tsOutputs/common/config-process/index.js.map +1 -1
- package/tsOutputs/common/config-process/no-op-config-process.js +9 -29
- package/tsOutputs/common/config-process/no-op-config-process.js.map +1 -1
- package/tsOutputs/common/constants/constants.js +19 -25
- package/tsOutputs/common/constants/constants.js.map +1 -1
- package/tsOutputs/common/constants/sl-env-vars.js +125 -131
- package/tsOutputs/common/constants/sl-env-vars.js.map +1 -1
- package/tsOutputs/common/coverage-elements/file-element.js +66 -103
- package/tsOutputs/common/coverage-elements/file-element.js.map +1 -1
- package/tsOutputs/common/coverage-elements/istanbul-unique-id-converter.js +28 -47
- package/tsOutputs/common/coverage-elements/istanbul-unique-id-converter.js.map +1 -1
- package/tsOutputs/common/coverage-elements/new-id-resolver.js +17 -17
- package/tsOutputs/common/coverage-elements/new-id-resolver.js.map +1 -1
- package/tsOutputs/common/coverage-elements/original-module-loader.js +71 -79
- package/tsOutputs/common/coverage-elements/original-module-loader.js.map +1 -1
- package/tsOutputs/common/coverage-elements/unique-id-converter.js +90 -110
- package/tsOutputs/common/coverage-elements/unique-id-converter.js.map +1 -1
- package/tsOutputs/common/environment-data-service.js +10 -11
- package/tsOutputs/common/environment-data-service.js.map +1 -1
- package/tsOutputs/common/events-process/events-creator.js +20 -32
- package/tsOutputs/common/events-process/events-creator.js.map +1 -1
- package/tsOutputs/common/events-process/index.js +97 -186
- package/tsOutputs/common/events-process/index.js.map +1 -1
- package/tsOutputs/common/footprints-process/collection-interval.js +10 -11
- package/tsOutputs/common/footprints-process/collection-interval.js.map +1 -1
- package/tsOutputs/common/footprints-process/footprints-service-proxy.js +21 -22
- package/tsOutputs/common/footprints-process/footprints-service-proxy.js.map +1 -1
- package/tsOutputs/common/footprints-process/index.js +68 -102
- package/tsOutputs/common/footprints-process/index.js.map +1 -1
- package/tsOutputs/common/footprints-process/istanbul-to-footprints-contract.js +2 -5
- package/tsOutputs/common/footprints-process/istanbul-to-footprints-contract.js.map +1 -1
- package/tsOutputs/common/footprints-process/istanbul-to-footprints.js +160 -162
- package/tsOutputs/common/footprints-process/istanbul-to-footprints.js.map +1 -1
- package/tsOutputs/common/footprints-process/production-footprints-handler.js +103 -156
- package/tsOutputs/common/footprints-process/production-footprints-handler.js.map +1 -1
- package/tsOutputs/common/footprints-process-v6/base-browser-hits-converter.js +30 -48
- package/tsOutputs/common/footprints-process-v6/base-browser-hits-converter.js.map +1 -1
- package/tsOutputs/common/footprints-process-v6/browser-footprints-buffer.js +7 -25
- package/tsOutputs/common/footprints-process-v6/browser-footprints-buffer.js.map +1 -1
- package/tsOutputs/common/footprints-process-v6/buffer-size-helper.js +13 -14
- package/tsOutputs/common/footprints-process-v6/buffer-size-helper.js.map +1 -1
- package/tsOutputs/common/footprints-process-v6/collector-footprints-buffer.js +14 -32
- package/tsOutputs/common/footprints-process-v6/collector-footprints-buffer.js.map +1 -1
- package/tsOutputs/common/footprints-process-v6/collector-footprints-process.js +43 -109
- package/tsOutputs/common/footprints-process-v6/collector-footprints-process.js.map +1 -1
- package/tsOutputs/common/footprints-process-v6/contracts.js +2 -5
- package/tsOutputs/common/footprints-process-v6/contracts.js.map +1 -1
- package/tsOutputs/common/footprints-process-v6/footprints-buffer.d.ts +1 -1
- package/tsOutputs/common/footprints-process-v6/footprints-buffer.js +55 -78
- package/tsOutputs/common/footprints-process-v6/footprints-buffer.js.map +1 -1
- package/tsOutputs/common/footprints-process-v6/hits-collector.js +89 -129
- package/tsOutputs/common/footprints-process-v6/hits-collector.js.map +1 -1
- package/tsOutputs/common/footprints-process-v6/hits-converter.js +70 -78
- package/tsOutputs/common/footprints-process-v6/hits-converter.js.map +1 -1
- package/tsOutputs/common/footprints-process-v6/index.d.ts +1 -0
- package/tsOutputs/common/footprints-process-v6/index.js +210 -347
- package/tsOutputs/common/footprints-process-v6/index.js.map +1 -1
- package/tsOutputs/common/footprints-process-v6/location-formatter.js +2 -2
- package/tsOutputs/common/footprints-process-v6/location-formatter.js.map +1 -1
- package/tsOutputs/common/footprints-process-v6/relative-path-resolver.js +10 -11
- package/tsOutputs/common/footprints-process-v6/relative-path-resolver.js.map +1 -1
- package/tsOutputs/common/footprints-process-v6/remote-browser-hits-converter.js +5 -25
- package/tsOutputs/common/footprints-process-v6/remote-browser-hits-converter.js.map +1 -1
- package/tsOutputs/common/footprints-process-v6/remote-footprints-process.js +6 -57
- package/tsOutputs/common/footprints-process-v6/remote-footprints-process.js.map +1 -1
- package/tsOutputs/common/footprints-process-v6/remote-hits-collector.js +7 -27
- package/tsOutputs/common/footprints-process-v6/remote-hits-collector.js.map +1 -1
- package/tsOutputs/common/footprints-process-v6/source-map-data.js +14 -15
- package/tsOutputs/common/footprints-process-v6/source-map-data.js.map +1 -1
- package/tsOutputs/common/http/backend-proxy.js +222 -321
- package/tsOutputs/common/http/backend-proxy.js.map +1 -1
- package/tsOutputs/common/http/contracts.js +40 -116
- package/tsOutputs/common/http/contracts.js.map +1 -1
- package/tsOutputs/common/http/dry-run-proxy.js +68 -111
- package/tsOutputs/common/http/dry-run-proxy.js.map +1 -1
- package/tsOutputs/common/http/entities-mapper.js +6 -9
- package/tsOutputs/common/http/entities-mapper.js.map +1 -1
- package/tsOutputs/common/http/http-client.js +76 -86
- package/tsOutputs/common/http/http-client.js.map +1 -1
- package/tsOutputs/common/http/sl-routes.js +119 -122
- package/tsOutputs/common/http/sl-routes.js.map +1 -1
- package/tsOutputs/common/ignored-files-handler.js +48 -49
- package/tsOutputs/common/ignored-files-handler.js.map +1 -1
- package/tsOutputs/common/logger.js +66 -88
- package/tsOutputs/common/logger.js.map +1 -1
- package/tsOutputs/common/messages-formatter.js +9 -14
- package/tsOutputs/common/messages-formatter.js.map +1 -1
- package/tsOutputs/common/no-op-state-tracker.js +14 -37
- package/tsOutputs/common/no-op-state-tracker.js.map +1 -1
- package/tsOutputs/common/queue.js +18 -36
- package/tsOutputs/common/queue.js.map +1 -1
- package/tsOutputs/common/scm/git-cloner.js +30 -94
- package/tsOutputs/common/scm/git-cloner.js.map +1 -1
- package/tsOutputs/common/scm/git-format-builder.js +24 -25
- package/tsOutputs/common/scm/git-format-builder.js.map +1 -1
- package/tsOutputs/common/scm/git.js +192 -327
- package/tsOutputs/common/scm/git.js.map +1 -1
- package/tsOutputs/common/scm/none.js +58 -110
- package/tsOutputs/common/scm/none.js.map +1 -1
- package/tsOutputs/common/scm/scm-factory.js +13 -16
- package/tsOutputs/common/scm/scm-factory.js.map +1 -1
- package/tsOutputs/common/short-name-to-file-mapper.js +30 -33
- package/tsOutputs/common/short-name-to-file-mapper.js.map +1 -1
- package/tsOutputs/common/source-map-handler.js +76 -98
- package/tsOutputs/common/source-map-handler.js.map +1 -1
- package/tsOutputs/common/source-map-reader.js +35 -36
- package/tsOutputs/common/source-map-reader.js.map +1 -1
- package/tsOutputs/common/source-maps-utils.js +8 -11
- package/tsOutputs/common/source-maps-utils.js.map +1 -1
- package/tsOutputs/common/state-tracker-fpv6.js +15 -37
- package/tsOutputs/common/state-tracker-fpv6.js.map +1 -1
- package/tsOutputs/common/state-tracker.js +124 -212
- package/tsOutputs/common/state-tracker.js.map +1 -1
- package/tsOutputs/common/system-date.js +3 -3
- package/tsOutputs/common/system-date.js.map +1 -1
- package/tsOutputs/common/utils/abstract-data-builder.js +8 -9
- package/tsOutputs/common/utils/abstract-data-builder.js.map +1 -1
- package/tsOutputs/common/utils/build-session-data-builder.js +25 -79
- package/tsOutputs/common/utils/build-session-data-builder.js.map +1 -1
- package/tsOutputs/common/utils/dependency-utils.js +13 -16
- package/tsOutputs/common/utils/dependency-utils.js.map +1 -1
- package/tsOutputs/common/utils/env-var-parsing.js +10 -14
- package/tsOutputs/common/utils/env-var-parsing.js.map +1 -1
- package/tsOutputs/common/utils/files-utils.js +16 -19
- package/tsOutputs/common/utils/files-utils.js.map +1 -1
- package/tsOutputs/common/utils/process-utils.js +12 -25
- package/tsOutputs/common/utils/process-utils.js.map +1 -1
- package/tsOutputs/common/utils/test-runner-build-session-data-builder.js +16 -62
- package/tsOutputs/common/utils/test-runner-build-session-data-builder.js.map +1 -1
- package/tsOutputs/common/utils/test-utils/mock-server-utils/mock-server-proxy.js +120 -192
- package/tsOutputs/common/utils/test-utils/mock-server-utils/mock-server-proxy.js.map +1 -1
- package/tsOutputs/common/utils/timer-utils.js +4 -7
- package/tsOutputs/common/utils/timer-utils.js.map +1 -1
- package/tsOutputs/common/utils/token-data-builder.js +30 -50
- package/tsOutputs/common/utils/token-data-builder.js.map +1 -1
- package/tsOutputs/common/utils/validation-utils.d.ts +4 -0
- package/tsOutputs/common/utils/validation-utils.js +13 -10
- package/tsOutputs/common/utils/validation-utils.js.map +1 -1
- package/tsOutputs/common/uuid.js +7 -10
- package/tsOutputs/common/uuid.js.map +1 -1
- package/tsOutputs/common/v8-utils.js +12 -50
- package/tsOutputs/common/v8-utils.js.map +1 -1
- package/tsOutputs/common/watchdog.js +35 -56
- package/tsOutputs/common/watchdog.js.map +1 -1
- package/tsOutputs/mocha-reporter/index.js +12 -12
- package/tsOutputs/mocha-reporter/index.js.map +1 -1
- package/tsOutputs/mocha-reporter/otel-agent.js +47 -118
- package/tsOutputs/mocha-reporter/otel-agent.js.map +1 -1
- package/tsOutputs/test-listener/SlNodeJsProxy.js +34 -35
- package/tsOutputs/test-listener/SlNodeJsProxy.js.map +1 -1
- package/tsOutputs/test-listener/UserMessageHelper.js +14 -19
- package/tsOutputs/test-listener/UserMessageHelper.js.map +1 -1
- package/tsOutputs/test-listener/agent-loader.js +42 -59
- package/tsOutputs/test-listener/agent-loader.js.map +1 -1
- package/tsOutputs/test-listener/agent.js +93 -150
- package/tsOutputs/test-listener/agent.js.map +1 -1
- package/tsOutputs/test-listener/api.js +36 -70
- package/tsOutputs/test-listener/api.js.map +1 -1
- package/tsOutputs/test-listener/base-proxy.js +25 -27
- package/tsOutputs/test-listener/base-proxy.js.map +1 -1
- package/tsOutputs/test-listener/bootstrap.js +6 -6
- package/tsOutputs/test-listener/bootstrap.js.map +1 -1
- package/tsOutputs/test-listener/child-process-patcher.js +10 -10
- package/tsOutputs/test-listener/child-process-patcher.js.map +1 -1
- package/tsOutputs/test-listener/cli.js +27 -30
- package/tsOutputs/test-listener/cli.js.map +1 -1
- package/tsOutputs/test-listener/coloring/http-coloring.js +30 -33
- package/tsOutputs/test-listener/coloring/http-coloring.js.map +1 -1
- package/tsOutputs/test-listener/coloring/listening-port.js +14 -17
- package/tsOutputs/test-listener/coloring/listening-port.js.map +1 -1
- package/tsOutputs/test-listener/command-line-arg-parser.js +12 -15
- package/tsOutputs/test-listener/command-line-arg-parser.js.map +1 -1
- package/tsOutputs/test-listener/config-process/config-loader.js +21 -22
- package/tsOutputs/test-listener/config-process/config-loader.js.map +1 -1
- package/tsOutputs/test-listener/config-process/config-system.js +100 -127
- package/tsOutputs/test-listener/config-process/config-system.js.map +1 -1
- package/tsOutputs/test-listener/config-process/index.js +38 -57
- package/tsOutputs/test-listener/config-process/index.js.map +1 -1
- package/tsOutputs/test-listener/config.js +38 -59
- package/tsOutputs/test-listener/config.js.map +1 -1
- package/tsOutputs/test-listener/entities/BasicConfigurationData.js +37 -64
- package/tsOutputs/test-listener/entities/BasicConfigurationData.js.map +1 -1
- package/tsOutputs/test-listener/entities/build-scanner/ConfigModeData.js +17 -42
- package/tsOutputs/test-listener/entities/build-scanner/ConfigModeData.js.map +1 -1
- package/tsOutputs/test-listener/entities/build-scanner/ScanModeData.js +19 -45
- package/tsOutputs/test-listener/entities/build-scanner/ScanModeData.js.map +1 -1
- package/tsOutputs/test-listener/environment-data-service.js +10 -11
- package/tsOutputs/test-listener/environment-data-service.js.map +1 -1
- package/tsOutputs/test-listener/execution-process/entities-mapper.js +11 -14
- package/tsOutputs/test-listener/execution-process/entities-mapper.js.map +1 -1
- package/tsOutputs/test-listener/execution-process/execution-service-proxy.js +54 -72
- package/tsOutputs/test-listener/execution-process/execution-service-proxy.js.map +1 -1
- package/tsOutputs/test-listener/execution-process/index.js +26 -26
- package/tsOutputs/test-listener/execution-process/index.js.map +1 -1
- package/tsOutputs/test-listener/factory.js +140 -175
- package/tsOutputs/test-listener/factory.js.map +1 -1
- package/tsOutputs/test-listener/footprints-process/footprints-service-proxy.js +17 -34
- package/tsOutputs/test-listener/footprints-process/footprints-service-proxy.js.map +1 -1
- package/tsOutputs/test-listener/footprints-process/index.js +53 -58
- package/tsOutputs/test-listener/footprints-process/index.js.map +1 -1
- package/tsOutputs/test-listener/footprints-process/istanbul-to-footprints-base.js +49 -50
- package/tsOutputs/test-listener/footprints-process/istanbul-to-footprints-base.js.map +1 -1
- package/tsOutputs/test-listener/footprints-process/istanbul-to-footprints-v3.js +98 -117
- package/tsOutputs/test-listener/footprints-process/istanbul-to-footprints-v3.js.map +1 -1
- package/tsOutputs/test-listener/footprints-process/ts-node-hits-collector.js +57 -141
- package/tsOutputs/test-listener/footprints-process/ts-node-hits-collector.js.map +1 -1
- package/tsOutputs/test-listener/integrations/SlGulp.js +25 -26
- package/tsOutputs/test-listener/integrations/SlGulp.js.map +1 -1
- package/tsOutputs/test-listener/logs-process/index.js +30 -35
- package/tsOutputs/test-listener/logs-process/index.js.map +1 -1
- package/tsOutputs/test-listener/logs-process/log-service-proxy.js +8 -25
- package/tsOutputs/test-listener/logs-process/log-service-proxy.js.map +1 -1
- package/tsOutputs/test-listener/nyc-report-executor-fpv6.js +53 -110
- package/tsOutputs/test-listener/nyc-report-executor-fpv6.js.map +1 -1
- package/tsOutputs/test-listener/nyc-report-executor.js +48 -85
- package/tsOutputs/test-listener/nyc-report-executor.js.map +1 -1
- package/tsOutputs/test-listener/otel-agent-loader.js +30 -33
- package/tsOutputs/test-listener/otel-agent-loader.js.map +1 -1
- package/tsOutputs/test-listener/queue.js +18 -36
- package/tsOutputs/test-listener/queue.js.map +1 -1
- package/tsOutputs/test-listener/remote-agent.js +97 -223
- package/tsOutputs/test-listener/remote-agent.js.map +1 -1
- package/tsOutputs/test-listener/resolvers/AppNameResolver.js +8 -25
- package/tsOutputs/test-listener/resolvers/AppNameResolver.js.map +1 -1
- package/tsOutputs/test-listener/resolvers/ArgumentResolver.js +11 -12
- package/tsOutputs/test-listener/resolvers/ArgumentResolver.js.map +1 -1
- package/tsOutputs/test-listener/resolvers/BuildResolver.js +8 -25
- package/tsOutputs/test-listener/resolvers/BuildResolver.js.map +1 -1
- package/tsOutputs/test-listener/resolvers/BuildSessionIdFileResolver.js +8 -25
- package/tsOutputs/test-listener/resolvers/BuildSessionIdFileResolver.js.map +1 -1
- package/tsOutputs/test-listener/resolvers/BuildSessionIdResolver.js +8 -25
- package/tsOutputs/test-listener/resolvers/BuildSessionIdResolver.js.map +1 -1
- package/tsOutputs/test-listener/resolvers/ProxyResolver.js +8 -25
- package/tsOutputs/test-listener/resolvers/ProxyResolver.js.map +1 -1
- package/tsOutputs/test-listener/resolvers/TokenResolver.js +8 -25
- package/tsOutputs/test-listener/resolvers/TokenResolver.js.map +1 -1
- package/tsOutputs/test-listener/state-tracker-process/index.js +54 -74
- package/tsOutputs/test-listener/state-tracker-process/index.js.map +1 -1
- package/tsOutputs/test-listener/state-tracker-process/state-tracker-proxy.js +18 -37
- package/tsOutputs/test-listener/state-tracker-process/state-tracker-proxy.js.map +1 -1
- package/tsOutputs/test-listener/test-recommendation-handler.js +66 -109
- package/tsOutputs/test-listener/test-recommendation-handler.js.map +1 -1
- package/tsOutputs/test-listener/upload-report-handler.js +33 -35
- package/tsOutputs/test-listener/upload-report-handler.js.map +1 -1
- package/tsOutputs/test-listener/utils.js +13 -14
- package/tsOutputs/test-listener/utils.js.map +1 -1
- package/tsOutputs/test-listener/uuid.js +7 -10
- package/tsOutputs/test-listener/uuid.js.map +1 -1
- package/tsOutputs/test-listener/wait-for-multiple-callbacks.js +17 -19
- package/tsOutputs/test-listener/wait-for-multiple-callbacks.js.map +1 -1
- package/tsOutputs/test-listener/watchdog.js +32 -51
- package/tsOutputs/test-listener/watchdog.js.map +1 -1
- package/tsOutputs/build-scanner/mappings/scm-file-fixer.js +0 -96
- package/tsOutputs/build-scanner/mappings/scm-file-fixer.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"instrumentation-utils.js","sourceRoot":"","sources":["../../../build-scanner/instrumentation/instrumentation-utils.js"],"names":[],"mappings":"AAAA,6DAA6D;AAC7D,6FAA6F;AAC7F,wDAAwD;AACxD,EAAE;AACF,sCAAsC;AACtC,kDAAkD;AAClD,6DAA6D;AAC7D,SAAS,qBAAqB,CAAC,KAAK;IAChC,uEAAuE;IACvE,QAAQ;IACR,WAAW;IACX,YAAY;IACZ,0BAA0B;IAC1B,OAAO;IACP,UAAU;IACV,UAAU;IACV,cAAc;IACd,EAAE;IACF,IAAI,KAAK,GAAG,IAAI,MAAM,CAAC,cAAc,EAAE,GAAG,CAAC,CAAC;IAE5C,OAAO,IAAI,EAAE;QACT,uEAAuE;QACvE,IAAI,YAAY,GAAG,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QACrC,IAAI,CAAC,YAAY;YACb,MAAM;QACV,IAAI,UAAU,GAAG,YAAY,CAAC,KAAK,CAAC;QACpC,IAAI,WAAW,GAAG,YAAY,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC;QACzC,IAAI,UAAU,GAAG,gBAAgB,CAAC,WAAW,CAAC,CAAC;QAE/C,+CAA+C;QAC/C,KAAK,GAAG,SAAS,CAAC,KAAK,EAAE,UAAU,EAAE,UAAU,CAAC,CAAC;KACpD;IAED,OAAO,KAAK,CAAC;AACjB,CAAC;AAED,SAAS,gBAAgB,CAAC,MAAM;IAC5B,IAAI,GAAG,GAAG,IAAI,KAAK,CAAC,EAAE,MAAM,CAAC,CAAC;IAC9B,OAAO,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,CAAA;AACxB,CAAC;AAED,SAAS,SAAS,CAAC,MAAM,EAAE,KAAK,EAAE,WAAW;IACzC,OAAO,MAAM,CAAC,MAAM,CAAC,CAAC,EAAE,KAAK,CAAC,GAAG,WAAW,GAAG,MAAM,CAAC,MAAM,CAAC,KAAK,GAAG,WAAW,CAAC,MAAM,CAAC,CAAC;AAC7F,CAAC;AAED,SAAS,mBAAmB,CAAC,KAAK;IAC9B,IAAI,KAAK,IAAI,OAAO,CAAC,GAAG,CAAC,WAAW,KAAK,GAAG,EAAE;QAC1C,OAAO,KAAK,CAAC,OAAO,CAAC,IAAI,EAAE,SAAS,CAAC,CAAC;KACzC;IACD,OAAO,KAAK,CAAC;AACjB,CAAC;AAED,6DAA6D;AAC7D,2HAA2H;AAC3H,EAAE;AACF,2EAA2E;AAC3E,mBAAmB;AACnB,6DAA6D;AAC7D,SAAS,mCAAmC,CAAC,KAAK;IAC9C,OAAO,KAAK,CAAC,OAAO,CAAC,WAAW,EAAE,WAAW,CAAC,CAAC;AACnD,CAAC;AAGD,MAAM,CAAC,OAAO,GAAG;IACb,qBAAqB
|
|
1
|
+
{"version":3,"file":"instrumentation-utils.js","sourceRoot":"","sources":["../../../build-scanner/instrumentation/instrumentation-utils.js"],"names":[],"mappings":"AAAA,6DAA6D;AAC7D,6FAA6F;AAC7F,wDAAwD;AACxD,EAAE;AACF,sCAAsC;AACtC,kDAAkD;AAClD,6DAA6D;AAC7D,SAAS,qBAAqB,CAAC,KAAK;IAChC,uEAAuE;IACvE,QAAQ;IACR,WAAW;IACX,YAAY;IACZ,0BAA0B;IAC1B,OAAO;IACP,UAAU;IACV,UAAU;IACV,cAAc;IACd,EAAE;IACF,IAAI,KAAK,GAAG,IAAI,MAAM,CAAC,cAAc,EAAE,GAAG,CAAC,CAAC;IAE5C,OAAO,IAAI,EAAE;QACT,uEAAuE;QACvE,IAAI,YAAY,GAAG,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QACrC,IAAI,CAAC,YAAY;YACb,MAAM;QACV,IAAI,UAAU,GAAG,YAAY,CAAC,KAAK,C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|
function removeRedundantUpdateCommands(ast, shouldRemoveBranchCoverage, updateStatementCoverageRegEx, updateBranchCoverageRegEx) {
|
|
70
70
|
astTypes.visit(ast, {
|
|
71
|
-
visitUpdateExpression
|
|
71
|
+
visitUpdateExpression(path) {
|
|
72
72
|
if (nodeShouldBeDeleted(path, updateStatementCoverageRegEx, shouldRemoveBranchCoverage, updateBranchCoverageRegEx)) {
|
|
73
73
|
path.prune();
|
|
74
74
|
}
|
|
@@ -86,7 +86,7 @@ function removeRedundantUpdateCommands(ast, shouldRemoveBranchCoverage, updateSt
|
|
|
86
86
|
*/
|
|
87
87
|
function reduceCoverageObjectSize(ast, shouldRemoveBranchCoverage) {
|
|
88
88
|
astTypes.visit(ast, {
|
|
89
|
-
visitObjectProperty
|
|
89
|
+
visitObjectProperty(path) {
|
|
90
90
|
if (shouldConvertToEmptyObject(path, shouldRemoveBranchCoverage)) {
|
|
91
91
|
path.value.value.properties = [];
|
|
92
92
|
}
|
|
@@ -99,7 +99,7 @@ function reduceCoverageObjectSize(ast, shouldRemoveBranchCoverage) {
|
|
|
99
99
|
}
|
|
100
100
|
function convertToShortPropNames(path) {
|
|
101
101
|
astTypes.visit(path, {
|
|
102
|
-
visitObjectProperty
|
|
102
|
+
visitObjectProperty(path) {
|
|
103
103
|
if (path && path.value && path.value.key && path.value.key.name) {
|
|
104
104
|
path.value.key.name = propNameToShort[path.value.key.name] || path.value.key.name;
|
|
105
105
|
}
|
|
@@ -110,7 +110,7 @@ function convertToShortPropNames(path) {
|
|
|
110
110
|
function getCoverageObjectNode(ast) {
|
|
111
111
|
var coverageObject;
|
|
112
112
|
astTypes.visit(ast, {
|
|
113
|
-
visitVariableDeclarator
|
|
113
|
+
visitVariableDeclarator(path) {
|
|
114
114
|
if (path.value && path.value.id && path.value.id.name && path.value.id.name.startsWith("cov_")) {
|
|
115
115
|
coverageObject = path.value;
|
|
116
116
|
this.abort();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"instrumented-file-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AAI,EAAE,0BAA0B;IAC7D,IAAI,IAAI,IAAI,IAAI,CAAC,GAAG,IAAI,IAAI,CAAC,GAAG,CAAC,IAAI,EAAC;QAClC,OAAO,IAAI,CAAC,GAAG,CAAC,IAAI,IAAI,OAAO,IAAI,CAAC,CAAC,0BAA0B,IAAI,IAAI,CAAC,GAAG,CAAC,IAAI,IAAI,WAAW,CAAC,CAAA;KACnG;IACD,OAAO,gCAAgC,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,0BAA0B,IAAI,6BAA6B,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC;AACrI,CAAC;AAED,SAAS,mBAAmB,CAAC,IAAI,EAAE,4BAA4B,EAAE,0BAA0B,EAAE,yBAAyB;IAClH,OAAO,kCAAkC,CAAC,IAAI,CAAC,IAAI,EAAE,4BAA4B,CAAC,IAAI,CAAC,0BAA0B,IAAI,+BAA+B,CAAC,IAAI,CAAC,IAAI,EAAE,yBAAyB,CAAC,CAAC,CAAC;AAChM,CAAC;AAED;;;;;;GAMG;AACH,SAAS,6BAA6B,CAAC,GAAG,EAAE,0BAA0B,EAAE,4BAA4B,EAAE,yBAAyB;IAC3H,QAAQ,CAAC,KAAK,CAAC,GAAG,EAAE;QAChB,qBAAqB,
|
|
1
|
+
{"version":3,"file":"instrumented-file-size-reducer.js","sourceRoot":"","sources":["../../../build-scanner/instrumentation/instrumented-file-size-reducer.js"],"names":[],"mappings":"AAAA,IAAI,cAAc,GAAG,OAAO,CAAC,kBAAkB,CAAC,CAAC;AACjD,IAAI,WAAW,GAAG,OAAO,CAAC,eAAe,CAAC,CAAC;AAC3C,IAAI,QAAQ,GAAG,OAAO,CAAC,WAAW,CAAC,CAAC;AAEpC,IAAI,OAAO,GAAG,CAAC,GAAG,EAAE,CAAC,YAAY,EAAE,EAAC,sBAAsB,EAAE,IAAI,EAAC,CAAC,CAAC,CAAC;AACpE,IAAI,8BAA8B,GAAG,kBAAkB,CAAC;AACxD,IAAI,2BAA2B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AAA;KACV;AACL,CAAC;AAED,SAAS,SAAS,CAAC,gBAAgB,EAAE,cAAc;IAC/C,OAAO,WAAW,CAAC,KAAK,CAAC,gBAAgB,EAAE;QACvC,UAAU,EAAE,aAAa;QACzB,OAAO,EAAE,OAAO,CAAC,MAAM,CAAC,cAAc,CAAC;KAC1C,CAAC,CAAA;AACN,CAAC;AAED,SAAS,gCAAgC,CAAC,IAAI;IAC1C,OAAO,IAAI,IAAI,IAAI,CAAC,GAAG,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,KAAK,cAAc,IAAI,IAAI,CAAC,GAAG,CAAC,IAAI,KAAK,GAAG,CAAC,IAAI,IAAI,CAAC,KAAK,CAAC;AACzG,CAAC;AAED,SAAS,6BAA6B,CAAC,IAAI;IACvC,OAAO,IAAI,IAAI,IAAI,CAAC,GAAG,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,KAAK,WAAW,IAAI,IAAI,CAAC,GAAG,CAAC,IAAI,KAAK,GAAG,CAAC,IAAI,IAAI,CAAC,KAAK,CAAC;AACtG,CAAC;AAED,SAAS,kCAAkC,CAAC,IAAI,EAAE,4BAA4B;IAC1E,IAAI,cAAc,GAAG,cAAc,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;IACjD,OAAO,4BAA4B,CAAC,IAAI,CAAC,cAAc,CAAC,CAAA;AAC5D,CAAC;AAED,SAAS,+BAA+B,CAAC,IAAI,EAAE,yBAAyB;IACpE,IAAI,cAAc,GAAG,cAAc,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;IACjD,OAAO,yBAAyB,CAAC,IAAI,CAAC,cAAc,CAAC,CAAA;AACzD,CAAC;AAED,MAAM,CAAC,OAAO,CAAC,iBAAiB,GAAG,iBAAiB,CAAC"}
|
|
@@ -8,60 +8,25 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
8
8
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
9
|
});
|
|
10
10
|
};
|
|
11
|
-
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
12
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
13
|
-
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
14
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
15
|
-
function step(op) {
|
|
16
|
-
if (f) throw new TypeError("Generator is already executing.");
|
|
17
|
-
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
18
|
-
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
19
|
-
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
20
|
-
switch (op[0]) {
|
|
21
|
-
case 0: case 1: t = op; break;
|
|
22
|
-
case 4: _.label++; return { value: op[1], done: false };
|
|
23
|
-
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
24
|
-
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
25
|
-
default:
|
|
26
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
27
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
28
|
-
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
29
|
-
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
30
|
-
if (t[2]) _.ops.pop();
|
|
31
|
-
_.trys.pop(); continue;
|
|
32
|
-
}
|
|
33
|
-
op = body.call(thisArg, _);
|
|
34
|
-
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
35
|
-
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
36
|
-
}
|
|
37
|
-
};
|
|
38
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
sendError
|
|
12
|
+
const files_instrumenter_1 = require("../files-instrumenter");
|
|
13
|
+
const logger_1 = require("../../../common/logger");
|
|
14
|
+
const contracts_1 = require("./contracts");
|
|
15
|
+
const args = JSON.parse(process.argv[2]);
|
|
16
|
+
const params = args.config;
|
|
17
|
+
const preambleHeader = args.preambleHeader;
|
|
18
|
+
const logger = logger_1.LoggerFactory.getCreateSubprocessLogger(process);
|
|
19
|
+
const cockpitNotifierPiggyback = {
|
|
20
|
+
sendError(message) {
|
|
48
21
|
process.send({
|
|
49
22
|
type: contracts_1.PROCESS_MESSAGE_TYPE.COCKPIT_NOTIFY,
|
|
50
|
-
payload: { message
|
|
23
|
+
payload: { message },
|
|
51
24
|
});
|
|
52
25
|
},
|
|
53
26
|
};
|
|
54
|
-
|
|
55
|
-
process.on('message',
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
case 0: return [4 /*yield*/, filesInstrumenter.processSingleFileAsync(task.inputFile, task.skipInstrumentation)];
|
|
60
|
-
case 1:
|
|
61
|
-
result = _a.sent();
|
|
62
|
-
process.send({ type: contracts_1.PROCESS_MESSAGE_TYPE.INSTRUMENTATION_RESULT, payload: result });
|
|
63
|
-
return [2 /*return*/];
|
|
64
|
-
}
|
|
65
|
-
});
|
|
66
|
-
}); });
|
|
27
|
+
const filesInstrumenter = new files_instrumenter_1.FilesInstrumenter(params, preambleHeader, logger, cockpitNotifierPiggyback);
|
|
28
|
+
process.on('message', (task) => __awaiter(void 0, void 0, void 0, function* () {
|
|
29
|
+
const result = yield filesInstrumenter.processSingleFileAsync(task.inputFile, task.skipInstrumentation);
|
|
30
|
+
process.send({ type: contracts_1.PROCESS_MESSAGE_TYPE.INSTRUMENTATION_RESULT, payload: result });
|
|
31
|
+
}));
|
|
67
32
|
//# sourceMappingURL=instrumenter-spawn.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"instrumenter-spawn.js","sourceRoot":"","sources":["../../../../build-scanner/instrumentation/process-pool/instrumenter-spawn.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"instrumenter-spawn.js","sourceRoot":"","sources":["../../../../build-scanner/instrumentation/process-pool/instrumenter-spawn.ts"],"names":[],"mappings":";;;;;;;;;;;AACA,8DAAoF;AAEpF,mDAAuD;AACvD,2CAAyE;AAEzE,MAAM,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC;AACzC,MAAM,MAAM,GAAG,IAAI,CAAC,MAAkC,CAAC;AACvD,MAAM,cAAc,GAAG,IAAI,CAAC,cAA0B,CAAC;AACvD,MAAM,MAAM,GAAW,sBAAa,CAAC,yBAAyB,CAAC,OAAO,CAAC,CAAC;AAExE,MAAM,wBAAwB,GAA8B;IAC1D,SAAS,CAAC,OAAe;QACvB,OAAO,CAAC,IAAI,CAAC;YACX,IAAI,EAAE,gCAAoB,CAAC,cAAc;YACzC,OAAO,EAAE,EAAE,OAAO,EAAE;SACrB,CAAC,CAAC;IACL,CAAC;CACF,CAAC;AAEF,MAAM,iBAAiB,GAAG,IAAI,sCAAiB,CAAC,MAAM,EAAE,cAAc,EAAE,MAAM,EAAE,wBAAwB,CAAC,CAAC;AAE1G,OAAO,CAAC,EAAE,CAAC,SAAS,EAAE,CAAO,IAA0B,EAAE,EAAE;IAEvD,MAAM,MAAM,GAAG,MAAM,iBAAiB,CAAC,sBAAsB,CAAC,IAAI,CAAC,SAAS,EAAE,IAAI,CAAC,mBAAmB,CAAC,CAAC;IACxG,OAAO,CAAC,IAAI,CAAC,EAAC,IAAI,EAAE,gCAAoB,CAAC,sBAAsB,EAAE,OAAO,EAAE,MAAM,EAAC,CAAC,CAAC;AACvF,CAAC,CAAA,CAAC,CAAC"}
|
|
@@ -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,81 +8,50 @@ 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.ProcessPool = void 0;
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
13
|
+
const events_1 = require("events");
|
|
14
|
+
const path = require("path");
|
|
15
|
+
const child_process_1 = require("child_process");
|
|
16
|
+
const split_by_transform_stream_1 = require("./split-by-transform-stream");
|
|
17
|
+
const cockpit_notifier_1 = require("../../../common/agent-events/cockpit-notifier");
|
|
18
|
+
const contracts_1 = require("./contracts");
|
|
19
|
+
const stop_by_condition_transform_stream_1 = require("./stop-by-condition-transform-stream");
|
|
20
|
+
const kTaskInfo = Symbol('instrumentationTask');
|
|
21
|
+
const kProcessFreedEvent = Symbol('kProcessFreedEvent');
|
|
22
|
+
const OUT_OF_MEMORY_PATTERN = 'JavaScript heap out of memory';
|
|
23
|
+
class InstrumentationTask {
|
|
24
|
+
constructor(callback) {
|
|
67
25
|
this.callback = callback;
|
|
68
26
|
}
|
|
69
|
-
|
|
27
|
+
done(result) {
|
|
70
28
|
this.callback(null, result);
|
|
71
|
-
}
|
|
72
|
-
|
|
29
|
+
}
|
|
30
|
+
fail(error) {
|
|
73
31
|
this.callback(error, null);
|
|
74
|
-
};
|
|
75
|
-
return InstrumentationTask;
|
|
76
|
-
}());
|
|
77
|
-
var ProcessPool = /** @class */ (function (_super) {
|
|
78
|
-
__extends(ProcessPool, _super);
|
|
79
|
-
function ProcessPool(numProcesses, processOptions, logger) {
|
|
80
|
-
var _this = _super.call(this) || this;
|
|
81
|
-
_this.numProcesses = numProcesses;
|
|
82
|
-
_this.logger = logger;
|
|
83
|
-
_this.processes = [];
|
|
84
|
-
_this.freeProcesses = [];
|
|
85
|
-
_this.processOptions = '';
|
|
86
|
-
_this.processOptions = JSON.stringify(processOptions);
|
|
87
|
-
return _this;
|
|
88
32
|
}
|
|
89
|
-
|
|
90
|
-
|
|
33
|
+
}
|
|
34
|
+
class ProcessPool extends events_1.EventEmitter {
|
|
35
|
+
constructor(numProcesses, processOptions, logger) {
|
|
36
|
+
super();
|
|
37
|
+
this.numProcesses = numProcesses;
|
|
38
|
+
this.logger = logger;
|
|
39
|
+
this.processes = [];
|
|
40
|
+
this.freeProcesses = [];
|
|
41
|
+
this.processOptions = '';
|
|
42
|
+
this.processOptions = JSON.stringify(processOptions);
|
|
43
|
+
}
|
|
44
|
+
initSubprocesses() {
|
|
45
|
+
for (let i = 0; i < this.numProcesses; i++) {
|
|
91
46
|
this.addNewProcess();
|
|
92
47
|
}
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
subprocess.on('message', function (data) {
|
|
48
|
+
}
|
|
49
|
+
addNewProcess() {
|
|
50
|
+
const pathToInstrumenter = path.resolve(__dirname, 'instrumenter-spawn.js');
|
|
51
|
+
const subprocess = (0, child_process_1.fork)(pathToInstrumenter, [this.processOptions], { silent: true });
|
|
52
|
+
this.logger.info(`Subrocess with pid - ${subprocess.pid} was started`);
|
|
53
|
+
const subprocessPrefix = `Subprocess [${subprocess.pid}]: `;
|
|
54
|
+
subprocess.on('message', (data) => {
|
|
101
55
|
var _a;
|
|
102
56
|
if (data.type === contracts_1.PROCESS_MESSAGE_TYPE.INSTRUMENTATION_RESULT) {
|
|
103
57
|
// In case of success: Call the callback that was passed to `runTask`,
|
|
@@ -105,47 +59,47 @@ var ProcessPool = /** @class */ (function (_super) {
|
|
|
105
59
|
// again.
|
|
106
60
|
(_a = subprocess[kTaskInfo]) === null || _a === void 0 ? void 0 : _a.done(data.payload);
|
|
107
61
|
subprocess[kTaskInfo] = null;
|
|
108
|
-
|
|
62
|
+
this.emitFreeProcess(subprocess);
|
|
109
63
|
return;
|
|
110
64
|
}
|
|
111
65
|
if (data.type === contracts_1.PROCESS_MESSAGE_TYPE.LOG) {
|
|
112
|
-
|
|
113
|
-
|
|
66
|
+
const logMessage = data.payload;
|
|
67
|
+
this.logger.log(logMessage.level, logMessage.label + ' ' + logMessage.message);
|
|
114
68
|
return;
|
|
115
69
|
}
|
|
116
70
|
if (data.type === contracts_1.PROCESS_MESSAGE_TYPE.COCKPIT_NOTIFY) {
|
|
117
71
|
cockpit_notifier_1.CockpitNotifier.sendError(subprocessPrefix + data.payload.message);
|
|
118
72
|
return;
|
|
119
73
|
}
|
|
120
|
-
|
|
74
|
+
this.logger.info(`${subprocessPrefix} unprocessed message - ${JSON.stringify(data)}`);
|
|
121
75
|
});
|
|
122
|
-
subprocess.on('exit',
|
|
123
|
-
|
|
124
|
-
|
|
76
|
+
subprocess.on('exit', (_data) => {
|
|
77
|
+
this.logger.info(`Subrocess with pid - ${subprocess.pid} was closed`);
|
|
78
|
+
const processIndex = this.processes.indexOf(subprocess);
|
|
125
79
|
if (processIndex != -1) {
|
|
126
|
-
|
|
80
|
+
this.processes.splice(processIndex, 1);
|
|
127
81
|
}
|
|
128
82
|
});
|
|
129
83
|
// this listener doesn't trigger on oom exeption so we a waiting for synthetic error
|
|
130
|
-
subprocess.on('error',
|
|
84
|
+
subprocess.on('error', err => {
|
|
131
85
|
var _a;
|
|
132
86
|
if (err.message === contracts_1.OUT_OF_MEMORY) {
|
|
133
87
|
if (subprocess[kTaskInfo]) {
|
|
134
88
|
(_a = subprocess[kTaskInfo]) === null || _a === void 0 ? void 0 : _a.fail(err);
|
|
135
89
|
subprocess[kTaskInfo] = null;
|
|
136
|
-
|
|
90
|
+
const processIndex = this.processes.indexOf(subprocess);
|
|
137
91
|
if (processIndex != -1) {
|
|
138
|
-
|
|
92
|
+
this.processes.splice(processIndex, 1);
|
|
139
93
|
}
|
|
140
|
-
|
|
94
|
+
this.addNewProcess();
|
|
141
95
|
}
|
|
142
96
|
}
|
|
143
97
|
else {
|
|
144
|
-
|
|
98
|
+
this.logger.error(subprocessPrefix + err.message);
|
|
145
99
|
}
|
|
146
100
|
});
|
|
147
|
-
|
|
148
|
-
|
|
101
|
+
const splitByLines = new split_by_transform_stream_1.SplitByTransformStream('\n');
|
|
102
|
+
const stopIfOutOfMemoryDetected = new stop_by_condition_transform_stream_1.StopByConditionTransformStream(line => {
|
|
149
103
|
if (line.indexOf(OUT_OF_MEMORY_PATTERN) > -1) {
|
|
150
104
|
// emit synthetic oom exeption
|
|
151
105
|
subprocess.emit('error', new Error(contracts_1.OUT_OF_MEMORY));
|
|
@@ -153,68 +107,57 @@ var ProcessPool = /** @class */ (function (_super) {
|
|
|
153
107
|
}
|
|
154
108
|
return false;
|
|
155
109
|
});
|
|
156
|
-
subprocess.stderr.pipe(splitByLines).pipe(stopIfOutOfMemoryDetected).on('data',
|
|
157
|
-
|
|
158
|
-
|
|
110
|
+
subprocess.stderr.pipe(splitByLines).pipe(stopIfOutOfMemoryDetected).on('data', (data) => {
|
|
111
|
+
const errorText = data.toString();
|
|
112
|
+
this.logger.error(subprocessPrefix + errorText);
|
|
159
113
|
});
|
|
160
114
|
this.processes.push(subprocess);
|
|
161
115
|
this.freeProcesses.push(subprocess);
|
|
162
116
|
this.emit(kProcessFreedEvent);
|
|
163
|
-
}
|
|
164
|
-
|
|
165
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
if (error) {
|
|
181
|
-
return reject(error);
|
|
182
|
-
}
|
|
183
|
-
return resolve(result);
|
|
184
|
-
});
|
|
185
|
-
subprocess.send(task);
|
|
186
|
-
})];
|
|
187
|
-
}
|
|
117
|
+
}
|
|
118
|
+
runInstrumentationTask(task) {
|
|
119
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
120
|
+
if (this.freeProcesses.length === 0) {
|
|
121
|
+
// No free threads, wait until a worker thread becomes free.
|
|
122
|
+
yield this.waitForFreeProcess();
|
|
123
|
+
return this.runInstrumentationTask(task);
|
|
124
|
+
}
|
|
125
|
+
return new Promise((resolve, reject) => {
|
|
126
|
+
const subprocess = this.freeProcesses.pop();
|
|
127
|
+
subprocess[kTaskInfo] = new InstrumentationTask((error, result) => {
|
|
128
|
+
if (error) {
|
|
129
|
+
return reject(error);
|
|
130
|
+
}
|
|
131
|
+
return resolve(result);
|
|
132
|
+
});
|
|
133
|
+
subprocess.send(task);
|
|
188
134
|
});
|
|
189
135
|
});
|
|
190
|
-
}
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
_this.once(kProcessFreedEvent, function () { return resolve(); });
|
|
136
|
+
}
|
|
137
|
+
waitForFreeProcess() {
|
|
138
|
+
return new Promise(resolve => {
|
|
139
|
+
this.once(kProcessFreedEvent, () => resolve());
|
|
195
140
|
});
|
|
196
|
-
}
|
|
197
|
-
|
|
141
|
+
}
|
|
142
|
+
emitFreeProcess(subprocess) {
|
|
198
143
|
this.freeProcesses.push(subprocess);
|
|
199
144
|
this.emit(kProcessFreedEvent);
|
|
200
|
-
}
|
|
201
|
-
|
|
202
|
-
for (
|
|
203
|
-
var subprocess = _a[_i];
|
|
145
|
+
}
|
|
146
|
+
close() {
|
|
147
|
+
for (const subprocess of this.processes) {
|
|
204
148
|
try {
|
|
205
|
-
|
|
149
|
+
const killStatus = subprocess.kill();
|
|
206
150
|
if (!killStatus) {
|
|
207
|
-
this.logger.error(
|
|
151
|
+
this.logger.error(`Subprocess ${subprocess.pid} wasn't killed.`);
|
|
208
152
|
subprocess.unref();
|
|
209
153
|
}
|
|
210
154
|
}
|
|
211
155
|
catch (error) {
|
|
212
|
-
this.logger.error(
|
|
156
|
+
this.logger.error(`Subprocess ${subprocess.pid} wasn't killed.`, error);
|
|
213
157
|
subprocess.unref();
|
|
214
158
|
}
|
|
215
159
|
}
|
|
216
|
-
}
|
|
217
|
-
|
|
218
|
-
}(events_1.EventEmitter));
|
|
160
|
+
}
|
|
161
|
+
}
|
|
219
162
|
exports.ProcessPool = ProcessPool;
|
|
220
163
|
//# sourceMappingURL=process-pool.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"process-pool.js","sourceRoot":"","sources":["../../../../build-scanner/instrumentation/process-pool/process-pool.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"process-pool.js","sourceRoot":"","sources":["../../../../build-scanner/instrumentation/process-pool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3B,CAAC,CAAC,CAAC;gBACH,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;YAC1B,CAAC,CAAC,CAAA;QACN,CAAC;KAAA;IAEO,kBAAkB;QACtB,OAAO,IAAI,OAAO,CAAC,OAAO,CAAC,EAAE;YACzB,IAAI,CAAC,IAAI,CAAC,kBAAkB,EAAE,GAAG,EAAE,CAAC,OAAO,EAAE,CAAC,CAAC;QACnD,CAAC,CAAC,CAAA;IACN,CAAC;IAEO,eAAe,CAAC,UAAwB;QAC5C,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;QACpC,IAAI,CAAC,IAAI,CAAC,kBAAkB,CAAC,CAAC;IAClC,CAAC;IAED,KAAK;QACD,KAAK,MAAM,UAAU,IAAI,IAAI,CAAC,SAAS,EAAE;YACrC,IAAI;gBACA,MAAM,UAAU,GAAG,UAAU,CAAC,IAAI,EAAE,CAAC;gBAErC,IAAG,CAAC,UAAU,EAAE;oBACZ,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,cAAc,UAAU,CAAC,GAAG,iBAAiB,CAAC,CAAC;oBACjE,UAAU,CAAC,KAAK,EAAE,CAAC;iBACtB;aAEJ;YAAC,OAAO,KAAK,EAAE;gBACZ,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,cAAc,UAAU,CAAC,GAAG,iBAAiB,EAAE,KAAK,CAAC,CAAC;gBACxE,UAAU,CAAC,KAAK,EAAE,CAAC;aACtB;SACJ;IACL,CAAC;CACJ;AAhJD,kCAgJC"}
|
|
@@ -1,44 +1,25 @@
|
|
|
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.SplitByTransformStream = void 0;
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
_this.splitter = splitter;
|
|
27
|
-
return _this;
|
|
4
|
+
const stream_1 = require("stream");
|
|
5
|
+
class SplitByTransformStream extends stream_1.Transform {
|
|
6
|
+
constructor(splitter, streamOptions) {
|
|
7
|
+
super(streamOptions);
|
|
8
|
+
this.buffer = '';
|
|
9
|
+
this.splitter = '\n';
|
|
10
|
+
this.splitter = splitter;
|
|
28
11
|
}
|
|
29
|
-
|
|
30
|
-
var _this = this;
|
|
12
|
+
_transform(chunk, _encoding, callback) {
|
|
31
13
|
this.buffer = this.buffer || '';
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
parts.slice(0, -1).forEach(
|
|
14
|
+
const text = this.buffer + chunk.toString();
|
|
15
|
+
const parts = text.split(this.splitter);
|
|
16
|
+
parts.slice(0, -1).forEach(x => this.push(x));
|
|
35
17
|
this.buffer = parts.slice(-1)[0];
|
|
36
18
|
callback(null);
|
|
37
|
-
}
|
|
38
|
-
|
|
19
|
+
}
|
|
20
|
+
_flush(callback) {
|
|
39
21
|
callback(null, this.buffer);
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
}(stream_1.Transform));
|
|
22
|
+
}
|
|
23
|
+
}
|
|
43
24
|
exports.SplitByTransformStream = SplitByTransformStream;
|
|
44
25
|
//# sourceMappingURL=split-by-transform-stream.js.map
|
package/tsOutputs/build-scanner/instrumentation/process-pool/split-by-transform-stream.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"split-by-transform-stream.js","sourceRoot":"","sources":["../../../../build-scanner/instrumentation/process-pool/split-by-transform-stream.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"split-by-transform-stream.js","sourceRoot":"","sources":["../../../../build-scanner/instrumentation/process-pool/split-by-transform-stream.ts"],"names":[],"mappings":";;;AAAA,mCAAwE;AAExE,MAAa,sBAAuB,SAAQ,kBAAS;IAIjD,YAAY,QAAyB,EAAE,aAAgC;QACnE,KAAK,CAAC,aAAa,CAAC,CAAC;QAJjB,WAAM,GAAG,EAAE,CAAC;QACZ,aAAQ,GAAoB,IAAI,CAAC;QAIrC,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;IAC7B,CAAC;IAED,UAAU,CAAC,KAAa,EAAE,SAAiB,EAAE,QAA2B;QACpE,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,MAAM,IAAI,EAAE,CAAC;QAChC,MAAM,IAAI,GAAG,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC,QAAQ,EAAE,CAAC;QAC5C,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;QAExC,KAAK,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC;QAC9C,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QACjC,QAAQ,CAAC,IAAI,CAAC,CAAC;IACnB,CAAC;IAED,MAAM,CAAC,QAA2B;QAC9B,QAAQ,CAAC,IAAI,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC;IAChC,CAAC;CACJ;AAtBD,wDAsBC"}
|
package/tsOutputs/build-scanner/instrumentation/process-pool/stop-by-condition-transform-stream.js
CHANGED
|
@@ -1,37 +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.StopByConditionTransformStream = void 0;
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
_this.predicate = predicate;
|
|
25
|
-
return _this;
|
|
4
|
+
const stream_1 = require("stream");
|
|
5
|
+
class StopByConditionTransformStream extends stream_1.Transform {
|
|
6
|
+
constructor(predicate, streamOptions) {
|
|
7
|
+
super(streamOptions);
|
|
8
|
+
this.predicate = predicate;
|
|
26
9
|
}
|
|
27
|
-
|
|
28
|
-
|
|
10
|
+
_transform(chunk, _encoding, callback) {
|
|
11
|
+
const text = chunk.toString();
|
|
29
12
|
if (this.predicate(text)) {
|
|
30
13
|
this.end();
|
|
31
14
|
}
|
|
32
15
|
callback(null, text);
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
}(stream_1.Transform));
|
|
16
|
+
}
|
|
17
|
+
}
|
|
36
18
|
exports.StopByConditionTransformStream = StopByConditionTransformStream;
|
|
37
19
|
//# sourceMappingURL=stop-by-condition-transform-stream.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stop-by-condition-transform-stream.js","sourceRoot":"","sources":["../../../../build-scanner/instrumentation/process-pool/stop-by-condition-transform-stream.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"stop-by-condition-transform-stream.js","sourceRoot":"","sources":["../../../../build-scanner/instrumentation/process-pool/stop-by-condition-transform-stream.ts"],"names":[],"mappings":";;;AAAA,mCAAwE;AAExE,MAAa,8BAA+B,SAAQ,kBAAS;IAGzD,YAAY,SAAmC,EAAE,aAAgC;QAC7E,KAAK,CAAC,aAAa,CAAC,CAAC;QACrB,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;IAC/B,CAAC;IAED,UAAU,CAAC,KAAa,EAAE,SAAiB,EAAE,QAA2B;QACpE,MAAM,IAAI,GAAG,KAAK,CAAC,QAAQ,EAAE,CAAC;QAE9B,IAAG,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,EAAC;YACpB,IAAI,CAAC,GAAG,EAAE,CAAC;SACd;QAED,QAAQ,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;IACzB,CAAC;CACJ;AAjBD,wEAiBC"}
|