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
|
@@ -8,47 +8,20 @@ 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
12
|
exports.ProductionFootprintsHandler = void 0;
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
13
|
+
const fs = require("fs");
|
|
14
|
+
const os = require("os");
|
|
15
|
+
const sl_env_vars_1 = require("../constants/sl-env-vars");
|
|
16
|
+
const path = require("path");
|
|
17
|
+
const http_client_1 = require("../http/http-client");
|
|
18
|
+
const messages_formatter_1 = require("../messages-formatter");
|
|
19
|
+
const sl_routes_1 = require("../http/sl-routes");
|
|
20
|
+
const validation_utils_1 = require("../utils/validation-utils");
|
|
21
|
+
const system_date_1 = require("../system-date");
|
|
22
|
+
const FILE_NOT_FOUND_CODE = 'ENOENT';
|
|
23
|
+
class ProductionFootprintsHandler {
|
|
24
|
+
constructor(cfg, logger) {
|
|
52
25
|
this.validateConfig(cfg);
|
|
53
26
|
this.agentConfig = cfg;
|
|
54
27
|
validation_utils_1.ValidationUtils.verifyNotNullOrEmpty(logger, 'logger');
|
|
@@ -61,8 +34,8 @@ var ProductionFootprintsHandler = /** @class */ (function () {
|
|
|
61
34
|
this.httpClient = new http_client_1.HttpClient(this.httpConfig, logger);
|
|
62
35
|
this.setupProdListenerModes();
|
|
63
36
|
}
|
|
64
|
-
|
|
65
|
-
|
|
37
|
+
setupProdListenerModes() {
|
|
38
|
+
const prodListenerModes = sl_env_vars_1.SlEnvVars.getProductionListenerModes();
|
|
66
39
|
if (prodListenerModes.length == 0 || (prodListenerModes.length == 1 && prodListenerModes[0] == 'true')) {
|
|
67
40
|
//Defaults in case the production listener env var is not present or is set to 'true'
|
|
68
41
|
this.sendToServer = true;
|
|
@@ -73,17 +46,17 @@ var ProductionFootprintsHandler = /** @class */ (function () {
|
|
|
73
46
|
this.saveToFile = prodListenerModes.indexOf('file') > -1;
|
|
74
47
|
}
|
|
75
48
|
this.logger.info('Production listener send to server: ' + this.sendToServer + ', save to file: ' + this.saveToFile);
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
|
|
49
|
+
}
|
|
50
|
+
initHttpConfig(cfg) {
|
|
51
|
+
const config = {
|
|
79
52
|
token: cfg.token.value,
|
|
80
53
|
server: cfg.server.value,
|
|
81
54
|
proxy: cfg.proxy.value,
|
|
82
55
|
compressRequests: cfg.gzip.hasValue ? cfg.gzip.value : true
|
|
83
56
|
};
|
|
84
57
|
this.httpConfig = config;
|
|
85
|
-
}
|
|
86
|
-
|
|
58
|
+
}
|
|
59
|
+
handleFootprints(footprintsPacket, callback) {
|
|
87
60
|
if (!footprintsPacket) {
|
|
88
61
|
this.logger.info('Handle footprints - got null or empty packet. Skip saving.');
|
|
89
62
|
callback(null);
|
|
@@ -95,53 +68,39 @@ var ProductionFootprintsHandler = /** @class */ (function () {
|
|
|
95
68
|
return;
|
|
96
69
|
}
|
|
97
70
|
this.saveAndSendMethodsHits(footprintsPacket)
|
|
98
|
-
.then(
|
|
99
|
-
.catch(
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
case 2:
|
|
115
|
-
if (!this.saveToFile) return [3 /*break*/, 5];
|
|
116
|
-
this.methodIdToHits = {};
|
|
117
|
-
this.addHitsFromFootprints(packetToSend.apps[0].files);
|
|
118
|
-
return [4 /*yield*/, this.addHitsFromFile()];
|
|
119
|
-
case 3:
|
|
120
|
-
_a.sent();
|
|
121
|
-
return [4 /*yield*/, this.writeDataToFile()];
|
|
122
|
-
case 4:
|
|
123
|
-
_a.sent();
|
|
124
|
-
_a.label = 5;
|
|
125
|
-
case 5: return [2 /*return*/];
|
|
126
|
-
}
|
|
127
|
-
});
|
|
71
|
+
.then(() => callback(null))
|
|
72
|
+
.catch((err) => callback(err));
|
|
73
|
+
}
|
|
74
|
+
saveAndSendMethodsHits(packetToSend) {
|
|
75
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
76
|
+
const hitFiles = this.getHitFiles(packetToSend);
|
|
77
|
+
this.logger.debug(`Submitting production data, files: ${hitFiles}, toServer: ${this.sendToServer}, toFile: ${this.saveToFile} (${this.filename})`);
|
|
78
|
+
if (this.sendToServer) {
|
|
79
|
+
yield this.convertAndSubmitToServer(packetToSend);
|
|
80
|
+
}
|
|
81
|
+
if (this.saveToFile) {
|
|
82
|
+
this.methodIdToHits = {};
|
|
83
|
+
this.addHitsFromFootprints(packetToSend.apps[0].files);
|
|
84
|
+
yield this.addHitsFromFile();
|
|
85
|
+
yield this.writeDataToFile();
|
|
86
|
+
}
|
|
128
87
|
});
|
|
129
|
-
}
|
|
130
|
-
|
|
88
|
+
}
|
|
89
|
+
getHitFiles(packetToSend) {
|
|
131
90
|
if (!this.logger.isDebugEnabled()) {
|
|
132
91
|
return;
|
|
133
92
|
}
|
|
134
|
-
|
|
93
|
+
const formatter = new messages_formatter_1.MessagesFormatter();
|
|
135
94
|
if (packetToSend && packetToSend.apps && packetToSend.apps[0] && packetToSend.apps[0].files) {
|
|
136
|
-
packetToSend.apps[0].files.forEach(
|
|
95
|
+
packetToSend.apps[0].files.forEach((file) => {
|
|
137
96
|
formatter.addContent(file.path);
|
|
138
97
|
});
|
|
139
98
|
}
|
|
140
99
|
return formatter.content;
|
|
141
|
-
}
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
100
|
+
}
|
|
101
|
+
convertFootprintsToProductionData(footprintsPacket) {
|
|
102
|
+
const now = (0, system_date_1.getSystemDateValueOf)();
|
|
103
|
+
const productionDataPacket = {
|
|
145
104
|
meta: {
|
|
146
105
|
appName: this.agentConfig.appName.value,
|
|
147
106
|
branchName: this.agentConfig.branch.value,
|
|
@@ -157,14 +116,14 @@ var ProductionFootprintsHandler = /** @class */ (function () {
|
|
|
157
116
|
methodsHits: {}
|
|
158
117
|
};
|
|
159
118
|
if (footprintsPacket && footprintsPacket.apps && footprintsPacket.apps[0] && footprintsPacket.apps[0].files) {
|
|
160
|
-
footprintsPacket.apps[0].files.forEach(
|
|
119
|
+
footprintsPacket.apps[0].files.forEach((file) => {
|
|
161
120
|
if (!file.methods)
|
|
162
121
|
return;
|
|
163
|
-
file.methods.forEach(
|
|
164
|
-
|
|
122
|
+
file.methods.forEach(method => {
|
|
123
|
+
let totalHits = 0;
|
|
165
124
|
if (!method.hits)
|
|
166
125
|
return;
|
|
167
|
-
method.hits.forEach(
|
|
126
|
+
method.hits.forEach(testIdxAndHits => {
|
|
168
127
|
totalHits += testIdxAndHits[1];
|
|
169
128
|
});
|
|
170
129
|
productionDataPacket.methodsHits[method.uniqueId] = totalHits;
|
|
@@ -173,43 +132,41 @@ var ProductionFootprintsHandler = /** @class */ (function () {
|
|
|
173
132
|
}
|
|
174
133
|
this.collectionStartDate = now;
|
|
175
134
|
return productionDataPacket;
|
|
176
|
-
}
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
_this.httpClient.post(productionDataPacket, url, function (err) {
|
|
135
|
+
}
|
|
136
|
+
convertAndSubmitToServer(footprintsPacket) {
|
|
137
|
+
const productionDataPacket = this.convertFootprintsToProductionData(footprintsPacket);
|
|
138
|
+
return new Promise((resolve, reject) => {
|
|
139
|
+
const url = sl_routes_1.SLRoutes.productionV1(this.agentConfig.buildSessionId.value);
|
|
140
|
+
this.httpClient.post(productionDataPacket, url, (err) => {
|
|
183
141
|
err ? reject(err) : resolve();
|
|
184
142
|
});
|
|
185
143
|
});
|
|
186
|
-
}
|
|
144
|
+
}
|
|
187
145
|
/*
|
|
188
146
|
In production listener we are in anonymous mode, and all hits will refer to single anonymous test.
|
|
189
147
|
So we can there will be single array in "hits" array.
|
|
190
148
|
In this inner array firs element will be always '0'(the index of test in array which contains only one - the anonymous),
|
|
191
149
|
and the second element is the hits number.
|
|
192
150
|
*/
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
_this.methodIdToHits[method.uniqueId] = method.hits[0][1];
|
|
151
|
+
addHitsFromFootprints(files) {
|
|
152
|
+
files.forEach((file) => {
|
|
153
|
+
file.methods.forEach((method) => {
|
|
154
|
+
this.methodIdToHits[method.uniqueId] = method.hits[0][1];
|
|
198
155
|
});
|
|
199
156
|
});
|
|
200
|
-
}
|
|
201
|
-
|
|
157
|
+
}
|
|
158
|
+
tryParseFileContent(fileContent) {
|
|
202
159
|
try {
|
|
203
|
-
|
|
204
|
-
this.logger.debug(
|
|
160
|
+
const hitsData = JSON.parse(fileContent).methodsHits;
|
|
161
|
+
this.logger.debug(`Previous hit data parsed successfully, '${Object.keys(hitsData).length} items loaded`);
|
|
205
162
|
return hitsData;
|
|
206
163
|
}
|
|
207
164
|
catch (err) {
|
|
208
|
-
this.logger.error(
|
|
165
|
+
this.logger.error(`Error while parsing hits file content. ${err}`);
|
|
209
166
|
return null;
|
|
210
167
|
}
|
|
211
|
-
}
|
|
212
|
-
|
|
168
|
+
}
|
|
169
|
+
validateConfig(config) {
|
|
213
170
|
if (!config) {
|
|
214
171
|
throw new Error('cfg cannot be null or undefined');
|
|
215
172
|
}
|
|
@@ -219,91 +176,81 @@ var ProductionFootprintsHandler = /** @class */ (function () {
|
|
|
219
176
|
if (!config.buildSessionId.hasValue) {
|
|
220
177
|
throw new Error('Configuration must contains buildSessionId');
|
|
221
178
|
}
|
|
222
|
-
}
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
fs.readFile(_this.filename, function (err, data) {
|
|
179
|
+
}
|
|
180
|
+
addHitsFromFile() {
|
|
181
|
+
return new Promise((resolve, reject) => {
|
|
182
|
+
fs.readFile(this.filename, (err, data) => {
|
|
227
183
|
if (err && err.code != FILE_NOT_FOUND_CODE) {
|
|
228
|
-
|
|
184
|
+
this.logger.error(`Error while trying to read previous hits data. ${err}`);
|
|
229
185
|
}
|
|
230
186
|
if (data != null) {
|
|
231
|
-
|
|
187
|
+
const hits = this.tryParseFileContent(data.toString());
|
|
232
188
|
if (hits != null) {
|
|
233
|
-
|
|
189
|
+
this.updateHits(hits);
|
|
234
190
|
}
|
|
235
191
|
else {
|
|
236
|
-
|
|
192
|
+
this.logger.error('Could not load previous hits from file');
|
|
237
193
|
}
|
|
238
194
|
}
|
|
239
195
|
resolve();
|
|
240
196
|
});
|
|
241
197
|
});
|
|
242
|
-
}
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
fs.writeFile(_this.filename, data, function (err) {
|
|
198
|
+
}
|
|
199
|
+
writeDataToFile() {
|
|
200
|
+
return new Promise((resolve, reject) => {
|
|
201
|
+
const data = JSON.stringify(this.toJSonObject());
|
|
202
|
+
fs.writeFile(this.filename, data, (err) => {
|
|
248
203
|
if (err) {
|
|
249
|
-
|
|
204
|
+
this.logger.error(`Error while trying to write methods hits into file. ${err}`);
|
|
250
205
|
reject(err);
|
|
251
206
|
}
|
|
252
207
|
resolve();
|
|
253
208
|
});
|
|
254
209
|
});
|
|
255
|
-
}
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
210
|
+
}
|
|
211
|
+
createFilePath(config) {
|
|
212
|
+
const filename = this.combineArgsWithDash(config.buildSessionId.value, config.labId.value, process.pid) + '.json';
|
|
213
|
+
const fileStorage = sl_env_vars_1.SlEnvVars.getFileStorage();
|
|
259
214
|
if (fileStorage) {
|
|
260
215
|
return path.join(fileStorage, filename);
|
|
261
216
|
}
|
|
262
217
|
return filename;
|
|
263
|
-
}
|
|
264
|
-
|
|
265
|
-
var args = [];
|
|
266
|
-
for (var _i = 0; _i < arguments.length; _i++) {
|
|
267
|
-
args[_i] = arguments[_i];
|
|
268
|
-
}
|
|
218
|
+
}
|
|
219
|
+
combineArgsWithDash(...args) {
|
|
269
220
|
return args.join('-');
|
|
270
|
-
}
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
_this.methodIdToHits[methodId] += parseInt(methodsHitFromFile[methodId]);
|
|
221
|
+
}
|
|
222
|
+
updateHits(methodsHitFromFile) {
|
|
223
|
+
Object.keys(methodsHitFromFile).forEach(methodId => {
|
|
224
|
+
if (this.methodIdToHits[methodId]) {
|
|
225
|
+
this.methodIdToHits[methodId] += parseInt(methodsHitFromFile[methodId]);
|
|
276
226
|
}
|
|
277
227
|
else {
|
|
278
|
-
|
|
228
|
+
this.methodIdToHits[methodId] = parseInt(methodsHitFromFile[methodId]);
|
|
279
229
|
}
|
|
280
230
|
});
|
|
281
|
-
}
|
|
282
|
-
|
|
231
|
+
}
|
|
232
|
+
toJSonObject() {
|
|
283
233
|
return {
|
|
284
234
|
meta: this.metaData.toJsonObject(),
|
|
285
235
|
methodsHits: this.methodIdToHits
|
|
286
236
|
};
|
|
287
|
-
}
|
|
288
|
-
|
|
289
|
-
}());
|
|
237
|
+
}
|
|
238
|
+
}
|
|
290
239
|
exports.ProductionFootprintsHandler = ProductionFootprintsHandler;
|
|
291
|
-
|
|
292
|
-
|
|
240
|
+
class MetaData {
|
|
241
|
+
constructor(buildSessionId, labId) {
|
|
293
242
|
this.buildSessionId = buildSessionId;
|
|
294
243
|
this.labId = labId;
|
|
295
244
|
this.createdAt = (0, system_date_1.getSystemDate)().toLocaleString();
|
|
296
245
|
this.pid = process.pid;
|
|
297
246
|
}
|
|
298
|
-
|
|
299
|
-
var _this = this;
|
|
247
|
+
toJsonObject() {
|
|
300
248
|
this.lastModifiedAt = (0, system_date_1.getSystemDate)().toLocaleString();
|
|
301
|
-
|
|
302
|
-
Object.keys(this).forEach(
|
|
303
|
-
json[key] =
|
|
249
|
+
const json = {};
|
|
250
|
+
Object.keys(this).forEach(key => {
|
|
251
|
+
json[key] = this[key];
|
|
304
252
|
});
|
|
305
253
|
return json;
|
|
306
|
-
}
|
|
307
|
-
|
|
308
|
-
}());
|
|
254
|
+
}
|
|
255
|
+
}
|
|
309
256
|
//# sourceMappingURL=production-footprints-handler.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"production-footprints-handler.js","sourceRoot":"","sources":["../../../common/footprints-process/production-footprints-handler.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"production-footprints-handler.js","sourceRoot":"","sources":["../../../common/footprints-process/production-footprints-handler.ts"],"names":[],"mappings":";;;;;;;;;;;;AAOA,yBAAyB;AACzB,yBAAyB;AACzB,0DAAqD;AACrD,6BAA6B;AAE7B,qDAAiD;AACjD,8DAA0D;AAC1D,iDAA6C;AAC7C,gEAA4D;AAC5D,gDAAmE;AACnE,MAAM,mBAAmB,GAAG,QAAQ,CAAC;AAqBrC,MAAa,2BAA2B;IAapC,YAAmB,GAAgB,EAAE,MAAc;QAC/C,IAAI,CAAC,cAAc,CAAC,GAAG,CAAC,CAAC;QACzB,IAAI,CAAC,WAAW,GAAG,GAAG,CAAC;QACvB,kCAAe,CAAC,oBAAoB,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC;QACvD,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QAErB,IAAI,CAAC,QAAQ,GAAG,IAAI,QAAQ,CAAC,GAAG,CAAC,cAAc,CAAC,KAAK,EAAE,GAAG,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;QACxE,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,cAAc,CAAC,GAAG,CAAC,CAAC,CAAC,kDAAkD;QAC5F,IAAI,CAAC,mBAAmB,GAAG,IAAA,kCAAoB,GAAE,CAAC;QAElD,IAAI,CAAC,cAAc,GA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I,CAAC,SAAS,GAAG,IAAA,2BAAa,GAAE,CAAC,cAAc,EAAE,CAAC;QAClD,IAAI,CAAC,GAAG,GAAG,OAAO,CAAC,GAAG,CAAC;IAC3B,CAAC;IAEM,YAAY;QACf,IAAI,CAAC,cAAc,GAAE,IAAA,2BAAa,GAAE,CAAC,cAAc,EAAE,CAAC;QACtD,MAAM,IAAI,GAAG,EAAE,CAAC;QAChB,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE;YAC5B,IAAI,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC;QAC1B,CAAC,CAAC,CAAC;QACH,OAAO,IAAI,CAAC;IAChB,CAAC;CAEJ"}
|
|
@@ -1,66 +1,48 @@
|
|
|
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.BaseBrowserHitsConverter = void 0;
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
4
|
+
const location_formatter_1 = require("./location-formatter");
|
|
5
|
+
const hits_converter_1 = require("../../common/footprints-process-v6/hits-converter");
|
|
6
|
+
const files_utils_1 = require("../utils/files-utils");
|
|
22
7
|
/**
|
|
23
8
|
* Converts hits to uniqueId using sl-mapping
|
|
24
9
|
*/
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
_this.buildSessionId = buildSessionId;
|
|
30
|
-
return _this;
|
|
10
|
+
class BaseBrowserHitsConverter extends hits_converter_1.HitsConverter {
|
|
11
|
+
constructor(relativePathResolver, buildSessionId, logger) {
|
|
12
|
+
super(relativePathResolver, {}, {}, logger);
|
|
13
|
+
this.buildSessionId = buildSessionId;
|
|
31
14
|
}
|
|
32
|
-
|
|
33
|
-
|
|
15
|
+
getMethodUniqueId(startLoc, relativePath, absolutePath) {
|
|
16
|
+
const uniqueId = absolutePath + hits_converter_1.HitsConverter.METHOD_ID_DEL + this.formatLoc(startLoc);
|
|
34
17
|
return this.tryGetUniqueIdFromSlMapping(uniqueId);
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
|
|
18
|
+
}
|
|
19
|
+
getBranchUniqueId(startLoc, relativePath, absolutePath, leaveIndex) {
|
|
20
|
+
const uniqueId = absolutePath + hits_converter_1.HitsConverter.BRANCH_ID_DEL + this.formatLoc(startLoc) + hits_converter_1.HitsConverter.BRANCH_ID_DEL + leaveIndex;
|
|
38
21
|
return this.tryGetUniqueIdFromSlMapping(uniqueId);
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
|
|
22
|
+
}
|
|
23
|
+
getDeclStart(hit) {
|
|
24
|
+
const decl = this.getDecl(hit);
|
|
42
25
|
return decl.start || decl.st;
|
|
43
|
-
}
|
|
44
|
-
|
|
26
|
+
}
|
|
27
|
+
getDecl(hit) {
|
|
45
28
|
return (hit.decl || hit.d);
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
|
|
29
|
+
}
|
|
30
|
+
getStartLoc(hit) {
|
|
31
|
+
const loc = hit.loc || hit.lc;
|
|
49
32
|
return loc.start || loc.st;
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
|
|
33
|
+
}
|
|
34
|
+
getLeaveStartLoc(hit, leaveIdx) {
|
|
35
|
+
const locations = hit.branchData.locations || hit.branchData.lcs;
|
|
53
36
|
return locations[leaveIdx].start || locations[leaveIdx].st;
|
|
54
|
-
}
|
|
55
|
-
|
|
37
|
+
}
|
|
38
|
+
formatLoc(loc) {
|
|
56
39
|
return (0, location_formatter_1.formatLocation)(loc, this.logger);
|
|
57
|
-
}
|
|
58
|
-
|
|
40
|
+
}
|
|
41
|
+
tryGetUniqueIdFromSlMapping(rawUniqueId) {
|
|
59
42
|
rawUniqueId = files_utils_1.FilesUtils.adjustPathSlashes(rawUniqueId);
|
|
60
|
-
|
|
43
|
+
const mapping = this.getSlMapping() || {};
|
|
61
44
|
return mapping[rawUniqueId] || rawUniqueId;
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
}(hits_converter_1.HitsConverter));
|
|
45
|
+
}
|
|
46
|
+
}
|
|
65
47
|
exports.BaseBrowserHitsConverter = BaseBrowserHitsConverter;
|
|
66
48
|
//# sourceMappingURL=base-browser-hits-converter.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"base-browser-hits-converter.js","sourceRoot":"","sources":["../../../common/footprints-process-v6/base-browser-hits-converter.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"base-browser-hits-converter.js","sourceRoot":"","sources":["../../../common/footprints-process-v6/base-browser-hits-converter.ts"],"names":[],"mappings":";;;AAAA,6DAAoD;AACpD,sFAAgF;AAQhF,sDAAgD;AAGhD;;GAEG;AACH,MAAsB,wBAAyB,SAAQ,8BAAa;IAIhE,YAAY,oBAA0C,EAAE,cAAsB,EAAE,MAAc;QAC1F,KAAK,CAAC,oBAAoB,EAAE,EAAS,EAAE,EAAS,EAAE,MAAM,CAAC,CAAC;QAC1D,IAAI,CAAC,cAAc,GAAG,cAAc,CAAC;IACzC,CAAC;IAIS,iBAAiB,CAAC,QAAmB,EAAE,Y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E,IAAI,CAAC,MAAa,CAAC,CAAC;IACnD,CAAC;IAEO,2BAA2B,CAAC,WAAmB;QACnD,WAAW,GAAG,wBAAU,CAAC,iBAAiB,CAAC,WAAW,CAAC,CAAC;QACxD,MAAM,OAAO,GAAG,IAAI,CAAC,YAAY,EAAE,IAAI,EAAE,CAAC;QAC1C,OAAO,OAAO,CAAC,WAAW,CAAC,IAAI,WAAW,CAAC;IAC/C,CAAC;CAEJ;AAlDD,4DAkDC"}
|
|
@@ -1,31 +1,13 @@
|
|
|
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.BrowserFootprintsBuffer = void 0;
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
_this.meta.footprintsMapping = footprintsMapping === contracts_1.FootprintsMapping.SERVER ? footprintsMapping : contracts_1.FootprintsMapping.AGENT;
|
|
26
|
-
return _this;
|
|
4
|
+
const footprints_buffer_1 = require("./footprints-buffer");
|
|
5
|
+
const contracts_1 = require("../contracts");
|
|
6
|
+
class BrowserFootprintsBuffer extends footprints_buffer_1.FootprintsBuffer {
|
|
7
|
+
constructor(agentInstanceData, agentConfig, footprintsMapping) {
|
|
8
|
+
super(agentInstanceData, agentConfig);
|
|
9
|
+
this.meta.footprintsMapping = footprintsMapping === contracts_1.FootprintsMapping.SERVER ? footprintsMapping : contracts_1.FootprintsMapping.AGENT;
|
|
27
10
|
}
|
|
28
|
-
|
|
29
|
-
}(footprints_buffer_1.FootprintsBuffer));
|
|
11
|
+
}
|
|
30
12
|
exports.BrowserFootprintsBuffer = BrowserFootprintsBuffer;
|
|
31
13
|
//# sourceMappingURL=browser-footprints-buffer.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"browser-footprints-buffer.js","sourceRoot":"","sources":["../../../common/footprints-process-v6/browser-footprints-buffer.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"browser-footprints-buffer.js","sourceRoot":"","sources":["../../../common/footprints-process-v6/browser-footprints-buffer.ts"],"names":[],"mappings":";;;AAEA,2DAAuD;AAEvD,4CAAiD;AAEjD,MAAa,uBAAwB,SAAQ,oCAAgB;IAEzD,YAAY,iBAAoC,EAAE,WAAwB,EAAE,iBAAqC;QAC7G,KAAK,CAAC,iBAAiB,EAAE,WAAW,CAAC,CAAC;QACtC,IAAI,CAAC,IAAI,CAAC,iBAAiB,GAAG,iBAAiB,KAAK,6BAAiB,CAAC,MAAM,CAAC,CAAC,CAAC,iBAAiB,CAAC,CAAC,CAAC,6BAAiB,CAAC,KAAK,CAAC;IAC/H,CAAC;CACJ;AAND,0DAMC"}
|