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,297 +8,165 @@ 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.Git = void 0;
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
13
|
+
const child_process_1 = require("child_process");
|
|
14
|
+
const git_format_builder_1 = require("./git-format-builder");
|
|
15
|
+
const cockpit_notifier_1 = require("../agent-events/cockpit-notifier");
|
|
16
|
+
const agent_events_contracts_1 = require("../agent-events/agent-events-contracts");
|
|
17
|
+
const GIT_ROOT_DIR_COMMAND = 'rev-parse --show-toplevel';
|
|
18
|
+
const GIT_LS_FILES_COMMAND = 'ls-tree --full-tree -r --name-only HEAD';
|
|
19
|
+
const MAX_BUFFER_VALUE = 1024 * 1024 * 200; //200 Mb, instead of 200Kb
|
|
20
|
+
class Git {
|
|
21
|
+
constructor(buildArgs, globalErrorHandler) {
|
|
49
22
|
this.buildArgs = buildArgs;
|
|
50
23
|
this.globalErrorHandler = globalErrorHandler;
|
|
51
24
|
}
|
|
52
|
-
|
|
53
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
case 0:
|
|
58
|
-
log = logger.child({ methodName: 'detectCommitVersion' });
|
|
59
|
-
return [4 /*yield*/, this.executeGit('log -n 1 --pretty=format:%H', handlerParams, log)];
|
|
60
|
-
case 1:
|
|
61
|
-
commit = _a.sent();
|
|
62
|
-
return [2 /*return*/, commit];
|
|
63
|
-
}
|
|
64
|
-
});
|
|
25
|
+
detectCommitVersion(handlerParams, logger) {
|
|
26
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
27
|
+
const log = logger.child({ methodName: 'detectCommitVersion' });
|
|
28
|
+
const commit = yield this.executeGit('log -n 1 --pretty=format:%H', handlerParams, log);
|
|
29
|
+
return commit;
|
|
65
30
|
});
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
format = new git_format_builder_1.GitFormatBuilder().withCommit().withAuthorName().withAuthorEmail().withCommiterName().withCommiterEmail()
|
|
77
|
-
.withAuthorDate().withCommiterDate().withTitle().build();
|
|
78
|
-
return [4 /*yield*/, this.executeGit('log -n ' + historyLength + ' --format=' + format, handlerParams, log)];
|
|
79
|
-
case 1:
|
|
80
|
-
stdout = _a.sent();
|
|
81
|
-
return [2 /*return*/, this.parseBranchHistoryOutput(stdout, handlerParams, log)];
|
|
82
|
-
}
|
|
83
|
-
});
|
|
31
|
+
}
|
|
32
|
+
getBranchHistory(handlerParams, logger) {
|
|
33
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
34
|
+
const buildArgs = this.getBuildArgs();
|
|
35
|
+
const log = logger.child({ methodName: 'getBranchHistory' });
|
|
36
|
+
const historyLength = this.getHistoryLength(buildArgs, log);
|
|
37
|
+
const format = new git_format_builder_1.GitFormatBuilder().withCommit().withAuthorName().withAuthorEmail().withCommiterName().withCommiterEmail()
|
|
38
|
+
.withAuthorDate().withCommiterDate().withTitle().build();
|
|
39
|
+
const stdout = yield this.executeGit('log -n ' + historyLength + ' --format=' + format, handlerParams, log);
|
|
40
|
+
return this.parseBranchHistoryOutput(stdout, handlerParams, log);
|
|
84
41
|
});
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
return [2 /*return*/, {}];
|
|
99
|
-
}
|
|
100
|
-
return [4 /*yield*/, this.executeGit('log -' + historyLength + ' --name-only --pretty=format:hash:%H', handlerParams, log)];
|
|
101
|
-
case 1:
|
|
102
|
-
stdout = _a.sent();
|
|
103
|
-
return [2 /*return*/, this.parseCommitsPerFileOutput(stdout, commitToIndexMap, log)];
|
|
104
|
-
}
|
|
105
|
-
});
|
|
42
|
+
}
|
|
43
|
+
getCommitsPerFile(handlerParams, logger) {
|
|
44
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
45
|
+
const buildArgs = this.getBuildArgs();
|
|
46
|
+
const log = logger.child({ methodName: 'getCommitsPerFile' });
|
|
47
|
+
const historyLength = this.getHistoryLength(buildArgs, log);
|
|
48
|
+
const commitToIndexMap = handlerParams.commitToIndexMap;
|
|
49
|
+
if (!commitToIndexMap) {
|
|
50
|
+
logger.error('Cannot get commits for file, Commits log map is null or undefined');
|
|
51
|
+
return {};
|
|
52
|
+
}
|
|
53
|
+
const stdout = yield this.executeGit('log -' + historyLength + ' --name-only --pretty=format:hash:%H', handlerParams, log);
|
|
54
|
+
return this.parseCommitsPerFileOutput(stdout, commitToIndexMap, log);
|
|
106
55
|
});
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
parsedLog = this.logParse(stdout.toString());
|
|
121
|
-
//NOTE: If there are multiple (fetch) remotes, it would be best to pick the line with that has "origin" as the first column (before the \t), if one exists.
|
|
122
|
-
//Anyway we should also warn that there were multiple remotes detected
|
|
123
|
-
repositoryUrl = parsedLog[0].split('\t').map(function (l) { return l.trim(); })[1].replace(' (fetch)', '');
|
|
124
|
-
}
|
|
125
|
-
return [2 /*return*/, repositoryUrl];
|
|
126
|
-
}
|
|
127
|
-
});
|
|
56
|
+
}
|
|
57
|
+
getRepositoryUrl(handlerParams, logger) {
|
|
58
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
59
|
+
const log = logger.child({ methodName: 'getRepositoryUrl' });
|
|
60
|
+
const stdout = yield this.executeGit('remote -v', handlerParams, log);
|
|
61
|
+
let repositoryUrl = '';
|
|
62
|
+
if (stdout.toString()) {
|
|
63
|
+
const parsedLog = this.logParse(stdout.toString());
|
|
64
|
+
//NOTE: If there are multiple (fetch) remotes, it would be best to pick the line with that has "origin" as the first column (before the \t), if one exists.
|
|
65
|
+
//Anyway we should also warn that there were multiple remotes detected
|
|
66
|
+
repositoryUrl = parsedLog[0].split('\t').map(function (l) { return l.trim(); })[1].replace(' (fetch)', '');
|
|
67
|
+
}
|
|
68
|
+
return repositoryUrl;
|
|
128
69
|
});
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
case 0:
|
|
136
|
-
log = logger.child({ methodName: 'getRootDirectory' });
|
|
137
|
-
return [4 /*yield*/, this.executeGit(GIT_ROOT_DIR_COMMAND, handlerParams, log)];
|
|
138
|
-
case 1:
|
|
139
|
-
stdout = _a.sent();
|
|
140
|
-
return [2 /*return*/, stdout.toString().trim()];
|
|
141
|
-
}
|
|
142
|
-
});
|
|
70
|
+
}
|
|
71
|
+
getRootDirectory(handlerParams, logger) {
|
|
72
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
73
|
+
const log = logger.child({ methodName: 'getRootDirectory' });
|
|
74
|
+
const stdout = yield this.executeGit(GIT_ROOT_DIR_COMMAND, handlerParams, log);
|
|
75
|
+
return stdout.toString().trim();
|
|
143
76
|
});
|
|
144
|
-
}
|
|
145
|
-
|
|
146
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
return [4 /*yield*/, this.executeGit('rev-parse --abbrev-ref HEAD', handlerParams, log)];
|
|
156
|
-
case 2:
|
|
157
|
-
stdout = _a.sent();
|
|
158
|
-
return [2 /*return*/, stdout.toString().trim()];
|
|
159
|
-
case 3:
|
|
160
|
-
e_1 = _a.sent();
|
|
161
|
-
log.error('Git get current branch error: ' + e_1);
|
|
162
|
-
return [3 /*break*/, 4];
|
|
163
|
-
case 4: return [2 /*return*/];
|
|
164
|
-
}
|
|
165
|
-
});
|
|
77
|
+
}
|
|
78
|
+
getCurrentGitBranch(handlerParams, logger) {
|
|
79
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
80
|
+
const log = logger.child({ methodName: 'getCurrentGitBranch' });
|
|
81
|
+
try {
|
|
82
|
+
const stdout = yield this.executeGit('rev-parse --abbrev-ref HEAD', handlerParams, log);
|
|
83
|
+
return stdout.toString().trim();
|
|
84
|
+
}
|
|
85
|
+
catch (e) {
|
|
86
|
+
log.error('Git get current branch error: ' + e);
|
|
87
|
+
}
|
|
166
88
|
});
|
|
167
|
-
}
|
|
168
|
-
|
|
169
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
return [4 /*yield*/, this.executeGit('show-ref', handlerParams, log)];
|
|
179
|
-
case 2:
|
|
180
|
-
stdout = _a.sent();
|
|
181
|
-
return [2 /*return*/, this.logParse(stdout.toString())];
|
|
182
|
-
case 3:
|
|
183
|
-
e_2 = _a.sent();
|
|
184
|
-
log.error('Git get open branches error: ' + e_2);
|
|
185
|
-
return [3 /*break*/, 4];
|
|
186
|
-
case 4: return [2 /*return*/];
|
|
187
|
-
}
|
|
188
|
-
});
|
|
89
|
+
}
|
|
90
|
+
getOpenGitBranches(handlerParams, logger) {
|
|
91
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
92
|
+
const log = logger.child({ methodName: 'getOpenGitBranches' });
|
|
93
|
+
try {
|
|
94
|
+
const stdout = yield this.executeGit('show-ref', handlerParams, log);
|
|
95
|
+
return this.logParse(stdout.toString());
|
|
96
|
+
}
|
|
97
|
+
catch (e) {
|
|
98
|
+
log.error('Git get open branches error: ' + e);
|
|
99
|
+
}
|
|
189
100
|
});
|
|
190
|
-
}
|
|
191
|
-
|
|
192
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
case 1:
|
|
200
|
-
_a.trys.push([1, 3, , 4]);
|
|
201
|
-
return [4 /*yield*/, this.executeGit('submodule', handlerParams, log)];
|
|
202
|
-
case 2:
|
|
203
|
-
stdout = _a.sent();
|
|
204
|
-
submoduleList = this.logParse(stdout.toString());
|
|
205
|
-
if (submoduleList.length) {
|
|
206
|
-
cockpit_notifier_1.CockpitNotifier.sendEvent(agent_events_contracts_1.AgentEventCode.GIT_SUBMODULES_DETECTED, submoduleList);
|
|
207
|
-
}
|
|
208
|
-
return [2 /*return*/, submoduleList];
|
|
209
|
-
case 3:
|
|
210
|
-
e_3 = _a.sent();
|
|
211
|
-
log.error('Git get submodules error: ' + e_3);
|
|
212
|
-
return [3 /*break*/, 4];
|
|
213
|
-
case 4: return [2 /*return*/];
|
|
101
|
+
}
|
|
102
|
+
getGitSubmodules(handlerParams, logger) {
|
|
103
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
104
|
+
const log = logger.child({ methodName: 'getGitSubmodules' });
|
|
105
|
+
try {
|
|
106
|
+
const stdout = yield this.executeGit('submodule', handlerParams, log);
|
|
107
|
+
const submoduleList = this.logParse(stdout.toString());
|
|
108
|
+
if (submoduleList.length) {
|
|
109
|
+
cockpit_notifier_1.CockpitNotifier.sendEvent(agent_events_contracts_1.AgentEventCode.GIT_SUBMODULES_DETECTED, submoduleList);
|
|
214
110
|
}
|
|
215
|
-
|
|
111
|
+
return submoduleList;
|
|
112
|
+
}
|
|
113
|
+
catch (e) {
|
|
114
|
+
log.error('Git get submodules error: ' + e);
|
|
115
|
+
}
|
|
216
116
|
});
|
|
217
|
-
}
|
|
218
|
-
|
|
219
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
case 0:
|
|
224
|
-
log = logger.child({ methodName: 'getFiles' });
|
|
225
|
-
return [4 /*yield*/, this.executeGit(GIT_LS_FILES_COMMAND, handlerParams, log)];
|
|
226
|
-
case 1:
|
|
227
|
-
stdout = _a.sent();
|
|
228
|
-
return [2 /*return*/, stdout.trim().split('\n').map(function (file) { return file.trim(); }).filter(function (file) { return file.length > 0; })];
|
|
229
|
-
}
|
|
230
|
-
});
|
|
117
|
+
}
|
|
118
|
+
getFiles(handlerParams, logger) {
|
|
119
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
120
|
+
const log = logger.child({ methodName: 'getFiles' });
|
|
121
|
+
const stdout = yield this.executeGit(GIT_LS_FILES_COMMAND, handlerParams, log);
|
|
122
|
+
return stdout.trim().split('\n').map(file => file.trim()).filter(file => file.length > 0);
|
|
231
123
|
});
|
|
232
|
-
}
|
|
233
|
-
|
|
234
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
historyLength = this.getHistoryLength(buildArgs, log);
|
|
242
|
-
format = new git_format_builder_1.GitFormatBuilder().withAuthorName('contributorName').withAuthorEmail('contributorEmail').build();
|
|
243
|
-
return [4 /*yield*/, this.executeGit('log -n ' + historyLength + ' --all --format=' + format, handlerParams, log)];
|
|
244
|
-
case 1:
|
|
245
|
-
stdout = _a.sent();
|
|
246
|
-
return [2 /*return*/, this.parseContributorsOutput(stdout, log)];
|
|
247
|
-
}
|
|
248
|
-
});
|
|
124
|
+
}
|
|
125
|
+
getContributors(handlerParams, logger) {
|
|
126
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
127
|
+
const buildArgs = this.getBuildArgs();
|
|
128
|
+
const log = logger.child({ methodName: 'getContributors' });
|
|
129
|
+
const historyLength = this.getHistoryLength(buildArgs, log);
|
|
130
|
+
const format = new git_format_builder_1.GitFormatBuilder().withAuthorName('contributorName').withAuthorEmail('contributorEmail').build();
|
|
131
|
+
const stdout = yield this.executeGit('log -n ' + historyLength + ' --all --format=' + format, handlerParams, log);
|
|
132
|
+
return this.parseContributorsOutput(stdout, log);
|
|
249
133
|
});
|
|
250
|
-
}
|
|
251
|
-
|
|
252
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
log = logger.child({ methodName: 'getGitDiffs' });
|
|
258
|
-
return [4 /*yield*/, this.executeGit('diff ' + refCommit + ' --name-status -M100', handlerParams, log)];
|
|
259
|
-
case 1:
|
|
260
|
-
stdout = _a.sent();
|
|
261
|
-
parsedLog = this.parseGitDiffs(stdout.toString()).filter(function (d) { return d.op != 'unknown' && d.path; });
|
|
262
|
-
return [2 /*return*/, parsedLog];
|
|
263
|
-
}
|
|
264
|
-
});
|
|
134
|
+
}
|
|
135
|
+
getGitDiffs(refCommit, handlerParams, logger) {
|
|
136
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
137
|
+
const log = logger.child({ methodName: 'getGitDiffs' });
|
|
138
|
+
const stdout = yield this.executeGit('diff ' + refCommit + ' --name-status -M100', handlerParams, log);
|
|
139
|
+
const parsedLog = this.parseGitDiffs(stdout.toString()).filter(d => d.op != 'unknown' && d.path);
|
|
140
|
+
return parsedLog;
|
|
265
141
|
});
|
|
266
|
-
}
|
|
267
|
-
|
|
268
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
log = logger.child({ methodName: 'getCommitOnlyHistory' });
|
|
276
|
-
format = new git_format_builder_1.GitFormatBuilder().withCommit();
|
|
277
|
-
return [4 /*yield*/, this.executeGit('log -n ' + historyLength + ' --format=' + format, handlerParams, log)];
|
|
278
|
-
case 1:
|
|
279
|
-
stdout = _a.sent();
|
|
280
|
-
return [2 /*return*/, this.logParse(stdout.toString())];
|
|
281
|
-
}
|
|
282
|
-
});
|
|
142
|
+
}
|
|
143
|
+
getCommitOnlyHistory(historyLength, handlerParams, logger) {
|
|
144
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
145
|
+
if (historyLength < 1)
|
|
146
|
+
historyLength = 1;
|
|
147
|
+
const log = logger.child({ methodName: 'getCommitOnlyHistory' });
|
|
148
|
+
const format = new git_format_builder_1.GitFormatBuilder().withCommit();
|
|
149
|
+
const stdout = yield this.executeGit('log -n ' + historyLength + ' --format=' + format, handlerParams, log);
|
|
150
|
+
return this.logParse(stdout.toString());
|
|
283
151
|
});
|
|
284
|
-
}
|
|
152
|
+
}
|
|
285
153
|
/**
|
|
286
154
|
*
|
|
287
155
|
* @param gitArgs full git command, without the 'git' prefix, e.g. log -n 1
|
|
288
156
|
* @param handlerParams
|
|
289
157
|
* @param log
|
|
290
158
|
*/
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
return new Promise(
|
|
159
|
+
executeGit(gitArgs, handlerParams, log) {
|
|
160
|
+
const gitPath = this.getGitPath();
|
|
161
|
+
return new Promise((resolve, reject) => {
|
|
294
162
|
try {
|
|
295
163
|
log.info('GIT: invoking git ' + gitArgs);
|
|
296
164
|
log.info('GIT PATH: ' + gitPath);
|
|
297
|
-
|
|
165
|
+
const cmd = gitPath + ' ' + gitArgs;
|
|
298
166
|
(0, child_process_1.exec)(cmd, {
|
|
299
167
|
cwd: handlerParams.buildArguments.workspacepath,
|
|
300
168
|
maxBuffer: MAX_BUFFER_VALUE
|
|
301
|
-
},
|
|
169
|
+
}, (error, stdout, stderr) => {
|
|
302
170
|
if (error !== null) {
|
|
303
171
|
log.error('GIT log error: ' + error);
|
|
304
172
|
return reject(error);
|
|
@@ -311,45 +179,44 @@ var Git = /** @class */ (function () {
|
|
|
311
179
|
reject(e);
|
|
312
180
|
}
|
|
313
181
|
});
|
|
314
|
-
}
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
lines.forEach(function (line, lineIndex) {
|
|
182
|
+
}
|
|
183
|
+
parseContributorsOutput(stdout, logger) {
|
|
184
|
+
const contributors = [];
|
|
185
|
+
const emailToIndexMap = {};
|
|
186
|
+
const lines = stdout.toString().split('\n');
|
|
187
|
+
let contributorIndex = 0;
|
|
188
|
+
lines.forEach((line, lineIndex) => {
|
|
322
189
|
if (!line || line.trim().length == 0) {
|
|
323
190
|
return;
|
|
324
191
|
}
|
|
325
192
|
line = line.trim();
|
|
326
193
|
try {
|
|
327
|
-
line =
|
|
328
|
-
|
|
194
|
+
line = this.fixUnSupportedJsonCharacters(line);
|
|
195
|
+
const contributorData = JSON.parse(line);
|
|
329
196
|
if (!emailToIndexMap.hasOwnProperty(contributorData.contributorEmail)) {
|
|
330
197
|
contributors.push(contributorData);
|
|
331
198
|
emailToIndexMap[contributorData.contributorEmail] = contributorIndex++;
|
|
332
199
|
}
|
|
333
200
|
}
|
|
334
201
|
catch (err) {
|
|
335
|
-
|
|
202
|
+
this.logJsonParsError(logger, line, 'contributor', err);
|
|
336
203
|
}
|
|
337
204
|
});
|
|
338
|
-
|
|
205
|
+
const contributorsLog = {
|
|
339
206
|
contributors: contributors,
|
|
340
207
|
emailToIndexMap: emailToIndexMap
|
|
341
208
|
};
|
|
342
209
|
return contributorsLog;
|
|
343
|
-
}
|
|
344
|
-
|
|
210
|
+
}
|
|
211
|
+
getGitPath() {
|
|
345
212
|
return (this.getBuildArgs() || {}).gitPath || 'git';
|
|
346
|
-
}
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
213
|
+
}
|
|
214
|
+
getBuildArgs() { return this.buildArgs; }
|
|
215
|
+
createCommitLogEntry(line, handlerParams) {
|
|
216
|
+
const lineObject = JSON.parse(line); //TODO: Improve typing
|
|
217
|
+
const authorEmail = lineObject.authorEmail;
|
|
218
|
+
const authorIndex = handlerParams.emailToIndexMap[authorEmail];
|
|
219
|
+
const commitLogEntry = {
|
|
353
220
|
contributorIndex: authorIndex,
|
|
354
221
|
commit: lineObject.commit,
|
|
355
222
|
commiterDate: parseInt(lineObject.committerDate),
|
|
@@ -357,29 +224,28 @@ var Git = /** @class */ (function () {
|
|
|
357
224
|
title: lineObject.title,
|
|
358
225
|
};
|
|
359
226
|
return commitLogEntry;
|
|
360
|
-
}
|
|
361
|
-
|
|
227
|
+
}
|
|
228
|
+
logJsonParsError(logger, line, field, err) {
|
|
362
229
|
logger.warn('Unsupported string format "' + line + '" .\'' + field + '\' may not be shown in dashboard');
|
|
363
|
-
logger.debug(
|
|
364
|
-
}
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
lines.forEach(function (line, index) {
|
|
230
|
+
logger.debug(`Error: ${err}`);
|
|
231
|
+
}
|
|
232
|
+
parseBranchHistoryOutput(stdout, handlerParams, logger) {
|
|
233
|
+
const commitHistory = [];
|
|
234
|
+
const commitLog = [];
|
|
235
|
+
const commitToIndexMap = {};
|
|
236
|
+
const sendContributors = handlerParams.buildArguments.sendContributors;
|
|
237
|
+
const sendCommitTitles = handlerParams.buildArguments.sendCommitTitles;
|
|
238
|
+
const lines = stdout.toString().split('\n');
|
|
239
|
+
lines.forEach((line, index) => {
|
|
374
240
|
if (!line || line.trim().length == 0) {
|
|
375
241
|
return;
|
|
376
242
|
}
|
|
377
243
|
line = line.trim();
|
|
378
|
-
line =
|
|
244
|
+
line = this.fixUnSupportedJsonCharacters(line);
|
|
379
245
|
try {
|
|
380
|
-
|
|
246
|
+
let gitLogEntry;
|
|
381
247
|
if (sendContributors) {
|
|
382
|
-
gitLogEntry =
|
|
248
|
+
gitLogEntry = this.createCommitLogEntry(line, handlerParams);
|
|
383
249
|
}
|
|
384
250
|
else {
|
|
385
251
|
gitLogEntry = JSON.parse(line);
|
|
@@ -392,10 +258,10 @@ var Git = /** @class */ (function () {
|
|
|
392
258
|
commitToIndexMap[gitLogEntry.commit] = index;
|
|
393
259
|
}
|
|
394
260
|
catch (err) {
|
|
395
|
-
|
|
261
|
+
this.logJsonParsError(logger, line, 'commit-log', err);
|
|
396
262
|
}
|
|
397
263
|
});
|
|
398
|
-
|
|
264
|
+
const gitLog = {
|
|
399
265
|
commitHistory: commitHistory,
|
|
400
266
|
commitLog: commitLog,
|
|
401
267
|
commitToIndexMap: undefined
|
|
@@ -404,19 +270,19 @@ var Git = /** @class */ (function () {
|
|
|
404
270
|
gitLog.commitToIndexMap = commitToIndexMap;
|
|
405
271
|
}
|
|
406
272
|
return gitLog;
|
|
407
|
-
}
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
273
|
+
}
|
|
274
|
+
parseCommitsPerFileOutput(stdout, commitToIndexMap, log) {
|
|
275
|
+
const fileToCommitMap = {};
|
|
276
|
+
const commits = stdout.toString().split('hash:');
|
|
411
277
|
try {
|
|
412
|
-
commits.forEach(
|
|
278
|
+
commits.forEach((currCommit) => {
|
|
413
279
|
currCommit = currCommit.trim();
|
|
414
|
-
|
|
280
|
+
const commitData = currCommit.split('\n');
|
|
415
281
|
if (commitData.length < 2) {
|
|
416
282
|
return;
|
|
417
283
|
}
|
|
418
|
-
|
|
419
|
-
for (
|
|
284
|
+
const commitHash = commitData[0];
|
|
285
|
+
for (let i = 1; i < commitData.length; i++) {
|
|
420
286
|
if (fileToCommitMap[commitData[i]]) {
|
|
421
287
|
fileToCommitMap[commitData[i]].push(commitToIndexMap[commitHash]);
|
|
422
288
|
}
|
|
@@ -430,11 +296,11 @@ var Git = /** @class */ (function () {
|
|
|
430
296
|
log.error('File to commit map error: ' + e);
|
|
431
297
|
}
|
|
432
298
|
return fileToCommitMap;
|
|
433
|
-
}
|
|
434
|
-
|
|
435
|
-
|
|
299
|
+
}
|
|
300
|
+
getHistoryLength(cfg, log) {
|
|
301
|
+
let historyLength = 100;
|
|
436
302
|
if (cfg.branchHistoryLength) {
|
|
437
|
-
|
|
303
|
+
const v = parseInt(cfg.branchHistoryLength);
|
|
438
304
|
if (v < 1 || Number.isNaN(v)) {
|
|
439
305
|
log.error('An invalid value was specified for branchHistoryLength in sealights.json: ' + cfg.branchHistoryLength + '. Valid values are positive integers. Defaulting to ' + historyLength);
|
|
440
306
|
}
|
|
@@ -443,24 +309,24 @@ var Git = /** @class */ (function () {
|
|
|
443
309
|
}
|
|
444
310
|
}
|
|
445
311
|
return historyLength;
|
|
446
|
-
}
|
|
447
|
-
|
|
312
|
+
}
|
|
313
|
+
fixUnSupportedJsonCharacters(entry) {
|
|
448
314
|
// Backslashes ar not supported by json format so we replace it to double slashes.
|
|
449
315
|
// For more info please see 'http://json.org/' (the string schema).
|
|
450
316
|
return entry.replace(/\\/g, '\\\\');
|
|
451
|
-
}
|
|
452
|
-
|
|
317
|
+
}
|
|
318
|
+
logParse(stdout) {
|
|
453
319
|
//git output contains exactly one hash per line, so little processing is required.
|
|
454
320
|
return stdout.split('\n').map(function (l) { return l.trim(); });
|
|
455
|
-
}
|
|
321
|
+
}
|
|
456
322
|
//Parse git log output from 'git diff [revision] --name-status -M100
|
|
457
|
-
|
|
323
|
+
parseGitDiffs(stdout) {
|
|
458
324
|
return stdout.split('\n').map(function (l) {
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
325
|
+
const parts = l.trim().split('\t');
|
|
326
|
+
const fileStatus = parts[0];
|
|
327
|
+
const path = parts[1];
|
|
328
|
+
const newPath = parts[2];
|
|
329
|
+
const diffEntry = { op: 'unknown', path };
|
|
464
330
|
switch (fileStatus[0]) {
|
|
465
331
|
case 'A':
|
|
466
332
|
diffEntry.op = 'added';
|
|
@@ -473,7 +339,7 @@ var Git = /** @class */ (function () {
|
|
|
473
339
|
break;
|
|
474
340
|
case 'R': //file renamed and possibly modified, depending on the rank (3 digits that follow the 'R'). rank = 100 means "renamed", otherwise renamed-modified
|
|
475
341
|
{
|
|
476
|
-
|
|
342
|
+
const rank = parseInt(fileStatus.substr(1));
|
|
477
343
|
diffEntry.op = (rank == 100) ? 'renamed' : 'renamed-modified';
|
|
478
344
|
diffEntry.newPath = newPath;
|
|
479
345
|
}
|
|
@@ -481,8 +347,7 @@ var Git = /** @class */ (function () {
|
|
|
481
347
|
}
|
|
482
348
|
return diffEntry;
|
|
483
349
|
});
|
|
484
|
-
}
|
|
485
|
-
|
|
486
|
-
}());
|
|
350
|
+
}
|
|
351
|
+
}
|
|
487
352
|
exports.Git = Git;
|
|
488
353
|
//# sourceMappingURL=git.js.map
|