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,40 +8,13 @@ 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.NycReportExecutorFpv6 = void 0;
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
13
|
+
const fs_1 = require("fs");
|
|
14
|
+
const cockpit_notifier_1 = require("../common/agent-events/cockpit-notifier");
|
|
15
|
+
const collection_interval_1 = require("../common/footprints-process/collection-interval");
|
|
16
|
+
class NycReportExecutorFpv6 {
|
|
17
|
+
constructor(backendProxy, hitsCollector, hitsConverter, footprintsBuffer, agentConfig, reportFilePath, logger) {
|
|
45
18
|
this.backendProxy = backendProxy;
|
|
46
19
|
this.hitsCollector = hitsCollector;
|
|
47
20
|
this.hitsConverter = hitsConverter;
|
|
@@ -50,91 +23,62 @@ var NycReportExecutorFpv6 = /** @class */ (function () {
|
|
|
50
23
|
this.reportFilePath = reportFilePath;
|
|
51
24
|
this.logger = logger;
|
|
52
25
|
}
|
|
53
|
-
|
|
54
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
case 3:
|
|
68
|
-
_a.sent();
|
|
69
|
-
return [2 /*return*/, true];
|
|
70
|
-
case 4:
|
|
71
|
-
e_1 = _a.sent();
|
|
72
|
-
message = "Failed to upload nyc report. error '".concat(e_1, "'");
|
|
73
|
-
cockpit_notifier_1.CockpitNotifier.sendError(message);
|
|
74
|
-
this.logger.error(message);
|
|
75
|
-
return [2 /*return*/, false];
|
|
76
|
-
case 5: return [2 /*return*/];
|
|
77
|
-
}
|
|
78
|
-
});
|
|
26
|
+
execute() {
|
|
27
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
28
|
+
try {
|
|
29
|
+
const executionData = yield this.getCurrentExecution();
|
|
30
|
+
const footprintsV6File = yield this.convertToFootprints(executionData.executionId);
|
|
31
|
+
yield this.backendProxy.submitFootprintsV6(footprintsV6File, executionData.buildSessionId, executionData.testStage, this.agentConfig.buildSessionId.value);
|
|
32
|
+
return true;
|
|
33
|
+
}
|
|
34
|
+
catch (e) {
|
|
35
|
+
const message = `Failed to upload nyc report. error '${e}'`;
|
|
36
|
+
cockpit_notifier_1.CockpitNotifier.sendError(message);
|
|
37
|
+
this.logger.error(message);
|
|
38
|
+
return false;
|
|
39
|
+
}
|
|
79
40
|
});
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
83
|
-
return
|
|
84
|
-
return [2 /*return*/, this.convertToFootprints('exid')];
|
|
85
|
-
});
|
|
41
|
+
}
|
|
42
|
+
dryRun() {
|
|
43
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
44
|
+
return this.convertToFootprints('exid');
|
|
86
45
|
});
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
return [4 /*yield*/, this.hitsCollector.getHitElements()];
|
|
96
|
-
case 1:
|
|
97
|
-
hitElements = _a.sent();
|
|
98
|
-
convertedFootprints = this.hitsConverter.convertHits(hitElements);
|
|
99
|
-
this.footprintsBuffer.addHit(convertedFootprints, this.getCollectionInterval(), executionId, '', true, true);
|
|
100
|
-
return [2 /*return*/, this.footprintsBuffer.createPacket()];
|
|
101
|
-
}
|
|
102
|
-
});
|
|
46
|
+
}
|
|
47
|
+
convertToFootprints(executionId) {
|
|
48
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
49
|
+
this.hitsCollector.globalCoverageObject = this.readReportFile();
|
|
50
|
+
const hitElements = yield this.hitsCollector.getHitElements();
|
|
51
|
+
const convertedFootprints = this.hitsConverter.convertHits(hitElements);
|
|
52
|
+
this.footprintsBuffer.addHit(convertedFootprints, this.getCollectionInterval(), executionId, '', true, true);
|
|
53
|
+
return this.footprintsBuffer.createPacket();
|
|
103
54
|
});
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
|
|
55
|
+
}
|
|
56
|
+
getCollectionInterval() {
|
|
57
|
+
const collectionInterval = new collection_interval_1.CollectionInterval(this.agentConfig.footprintsCollectIntervalSecs.value);
|
|
107
58
|
collectionInterval.next();
|
|
108
59
|
return collectionInterval.toJson();
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
executionResponse = _a.sent();
|
|
118
|
-
if (!executionResponse.execution) {
|
|
119
|
-
throw new Error('Could not find open execution');
|
|
120
|
-
}
|
|
121
|
-
return [2 /*return*/, executionResponse.execution];
|
|
122
|
-
}
|
|
123
|
-
});
|
|
60
|
+
}
|
|
61
|
+
getCurrentExecution() {
|
|
62
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
63
|
+
const executionResponse = yield this.backendProxy.testExecutionV4(this.agentConfig.labId.value);
|
|
64
|
+
if (!executionResponse.execution) {
|
|
65
|
+
throw new Error('Could not find open execution');
|
|
66
|
+
}
|
|
67
|
+
return executionResponse.execution;
|
|
124
68
|
});
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
|
|
69
|
+
}
|
|
70
|
+
readReportFile() {
|
|
71
|
+
const content = (0, fs_1.readFileSync)(this.reportFilePath, { encoding: 'utf8' });
|
|
128
72
|
if (!content) {
|
|
129
|
-
throw new Error(
|
|
73
|
+
throw new Error(`Cannot read report data from: '${this.reportFilePath}'`);
|
|
130
74
|
}
|
|
131
|
-
|
|
75
|
+
const parsed = JSON.parse(content);
|
|
132
76
|
this.validateJsonStructure(parsed);
|
|
133
77
|
return parsed;
|
|
134
|
-
}
|
|
135
|
-
|
|
136
|
-
Object.keys(obj).forEach(
|
|
137
|
-
|
|
78
|
+
}
|
|
79
|
+
validateJsonStructure(obj) {
|
|
80
|
+
Object.keys(obj).forEach(key => {
|
|
81
|
+
const fileCoverage = obj[key].data || obj[key];
|
|
138
82
|
if (!fileCoverage.hasOwnProperty('f') ||
|
|
139
83
|
!fileCoverage.hasOwnProperty('fnMap') ||
|
|
140
84
|
!fileCoverage.hasOwnProperty('b') ||
|
|
@@ -142,8 +86,7 @@ var NycReportExecutorFpv6 = /** @class */ (function () {
|
|
|
142
86
|
throw new Error('The provided json file is not in a valid nyc coverage report format');
|
|
143
87
|
}
|
|
144
88
|
});
|
|
145
|
-
}
|
|
146
|
-
|
|
147
|
-
}());
|
|
89
|
+
}
|
|
90
|
+
}
|
|
148
91
|
exports.NycReportExecutorFpv6 = NycReportExecutorFpv6;
|
|
149
92
|
//# sourceMappingURL=nyc-report-executor-fpv6.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"nyc-report-executor-fpv6.js","sourceRoot":"","sources":["../../test-listener/nyc-report-executor-fpv6.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"nyc-report-executor-fpv6.js","sourceRoot":"","sources":["../../test-listener/nyc-report-executor-fpv6.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2BAAkC;AAMlC,8EAAwE;AAExE,0FAAoF;AAGpF,MAAa,qBAAqB;IAU9B,YAAY,YAA0B,EAAE,aAA4B,EAAE,aAA4B,EACtF,gBAAkC,EAAE,WAAwB,EAAE,cAAsB,EAAE,MAAc;QAC5G,IAAI,CAAC,YAAY,GAAG,YAAY,CAAC;QACjC,IAAI,CAAC,aAAa,GAAG,aAAa,CAAC;QACnC,IAAI,CAAC,aAAa,GAAG,aAAa,CAAC;QACnC,IAA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C,IACI,CAAC,YAAY,CAAC,cAAc,CAAC,GAAG,CAAC;gBACjC,CAAC,YAAY,CAAC,cAAc,CAAC,OAAO,CAAC;gBACrC,CAAC,YAAY,CAAC,cAAc,CAAC,GAAG,CAAC;gBACjC,CAAC,YAAY,CAAC,cAAc,CAAC,WAAW,CAAC,EAC3C;gBACE,MAAM,IAAI,KAAK,CAAC,qEAAqE,CAAC,CAAA;aACzF;QACL,CAAC,CAAC,CAAA;IACN,CAAC;CACJ;AArFD,sDAqFC"}
|
|
@@ -8,46 +8,19 @@ 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.NycReportExecutor = void 0;
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
13
|
+
const logger_1 = require("../common/logger");
|
|
14
|
+
const environment_data_service_1 = require("../common/environment-data-service");
|
|
15
|
+
const istanbul_to_footprints_1 = require("../common/footprints-process/istanbul-to-footprints");
|
|
16
|
+
const footprints_service_proxy_1 = require("../common/footprints-process/footprints-service-proxy");
|
|
17
|
+
const system_date_1 = require("../common/system-date");
|
|
18
|
+
const fs = require("fs");
|
|
46
19
|
//TODO: use all constants and interfaces from infra
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
20
|
+
const DEFAULT_TEST_NAME = '__init';
|
|
21
|
+
const DEFAULT_EXECUTION_ID = '00000000-0000-0000-0000-000000000000';
|
|
22
|
+
class NycReportExecutor {
|
|
23
|
+
constructor(reportFile, agentConfig, agentInstanceData) {
|
|
51
24
|
if (!reportFile) {
|
|
52
25
|
throw new Error('reportFile must be given');
|
|
53
26
|
}
|
|
@@ -63,66 +36,57 @@ var NycReportExecutor = /** @class */ (function () {
|
|
|
63
36
|
this.agentInstanceData = agentInstanceData;
|
|
64
37
|
this.createLogger();
|
|
65
38
|
}
|
|
66
|
-
|
|
67
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
return [2 /*return*/, true];
|
|
81
|
-
case 2:
|
|
82
|
-
err_1 = _a.sent();
|
|
83
|
-
this.logger.error("Failed to upload nyc report. error: ".concat(err_1));
|
|
84
|
-
return [2 /*return*/, false];
|
|
85
|
-
case 3: return [2 /*return*/];
|
|
86
|
-
}
|
|
87
|
-
});
|
|
39
|
+
execute() {
|
|
40
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
41
|
+
try {
|
|
42
|
+
const reportData = this.readReportFile();
|
|
43
|
+
const extendedIstanbulData = this.createExtendedIstanbulData(reportData);
|
|
44
|
+
const footprintsFile = this.convertToFootprints(extendedIstanbulData);
|
|
45
|
+
yield this.submitFootprints(footprintsFile);
|
|
46
|
+
this.logger.lifecycle('Command \'uploadNycReport\' finished successfully');
|
|
47
|
+
return true;
|
|
48
|
+
}
|
|
49
|
+
catch (err) {
|
|
50
|
+
this.logger.error(`Failed to upload nyc report. error: ${err}`);
|
|
51
|
+
return false;
|
|
52
|
+
}
|
|
88
53
|
});
|
|
89
|
-
}
|
|
90
|
-
|
|
54
|
+
}
|
|
55
|
+
dryRun(logger) {
|
|
91
56
|
this.logger = logger;
|
|
92
|
-
|
|
93
|
-
|
|
57
|
+
const reportData = this.readReportFile();
|
|
58
|
+
const extendedIstanbulData = this.createExtendedIstanbulData(reportData);
|
|
94
59
|
return this.convertToFootprints(extendedIstanbulData);
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
|
|
60
|
+
}
|
|
61
|
+
readReportFile() {
|
|
62
|
+
const content = fs.readFileSync(this.reportFile, { encoding: 'utf8' });
|
|
98
63
|
if (!content) {
|
|
99
64
|
throw new Error('Cannot read report data from: ' + this.reportFile);
|
|
100
65
|
}
|
|
101
66
|
return JSON.parse(content);
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
67
|
+
}
|
|
68
|
+
convertToFootprints(extendedIstanbulData) {
|
|
69
|
+
const istanbulToFP = new istanbul_to_footprints_1.IstanbulToFootprints(this.agentConfig, this.logger);
|
|
70
|
+
const footprintsFile = this.createFootprintsFile();
|
|
106
71
|
return istanbulToFP.createFootprintsPackageFromRawData(extendedIstanbulData, footprintsFile);
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
footprintsProxy.handleFootprints(footprintsFile, function (err) {
|
|
72
|
+
}
|
|
73
|
+
submitFootprints(footprintsFile) {
|
|
74
|
+
return new Promise((resolve, reject) => {
|
|
75
|
+
const footprintsProxy = new footprints_service_proxy_1.FootprintsServiceProxy(this.agentConfig, this.logger);
|
|
76
|
+
footprintsProxy.handleFootprints(footprintsFile, (err) => {
|
|
113
77
|
return err ? reject(err) : resolve();
|
|
114
78
|
});
|
|
115
79
|
});
|
|
116
|
-
}
|
|
117
|
-
|
|
80
|
+
}
|
|
81
|
+
createExtendedIstanbulData(rawIstanbulData) {
|
|
118
82
|
return {
|
|
119
83
|
footprints: rawIstanbulData,
|
|
120
84
|
testName: DEFAULT_TEST_NAME,
|
|
121
85
|
executionId: DEFAULT_EXECUTION_ID,
|
|
122
86
|
localTime: (0, system_date_1.getSystemDateValueOf)()
|
|
123
87
|
};
|
|
124
|
-
}
|
|
125
|
-
|
|
88
|
+
}
|
|
89
|
+
createFootprintsFile() {
|
|
126
90
|
return {
|
|
127
91
|
customerId: this.agentConfig.customerId.value,
|
|
128
92
|
environment: this.environmentDataService.getEnvDataForSubmission(),
|
|
@@ -135,11 +99,10 @@ var NycReportExecutor = /** @class */ (function () {
|
|
|
135
99
|
tests: [],
|
|
136
100
|
apps: []
|
|
137
101
|
};
|
|
138
|
-
}
|
|
139
|
-
|
|
102
|
+
}
|
|
103
|
+
createLogger() {
|
|
140
104
|
this.logger = logger_1.LoggerFactory.getCreateApplicationLogger(this.agentConfig);
|
|
141
|
-
}
|
|
142
|
-
|
|
143
|
-
}());
|
|
105
|
+
}
|
|
106
|
+
}
|
|
144
107
|
exports.NycReportExecutor = NycReportExecutor;
|
|
145
108
|
//# sourceMappingURL=nyc-report-executor.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"nyc-report-executor.js","sourceRoot":"","sources":["../../test-listener/nyc-report-executor.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"nyc-report-executor.js","sourceRoot":"","sources":["../../test-listener/nyc-report-executor.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,6CAA+C;AAE/C,iFAA4E;AAG5E,gGAA2F;AAE3F,oGAA+F;AAC/F,uDAA6D;AAE7D,yBAAyB;AACzB,mDAAmD;AACnD,MAAM,iBAAiB,GAAG,QAAQ,CAAC;AACnC,MAAM,oBAAoB,GAAG,sCAAsC,CAAC;AAEpE,MAAa,iBAAiB;IAQ1B,YAAY,UAAkB,EAAE,WAAwB,EAAE,iBAAoC;QAC1F,IAAG,CAAC,UAAU,EAAC;YAAC,MAAM,IAAI,KAAK,CAAC,0BAA0B,CAAC,CAAA;SAAC;QAC5D,IAAG,CAAC,WAAW,EAAC;YAAC,MAAM,IAAI,KAAK,CAAC,2BAA2B,CAAC,CAAA;SAAC;QAC9D,IAAG,CAAC,iBAAiB,EAAC;YAAC,MAAM,IAAI,KAAK,CAAC,iCAAiC,CAAC,CAAA;SAAC;QAC1E,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC;QAC7B,IAAI,CAAC,WAAW,GAAG,WAAW,CAAC;QAC/B,IAAI,CAAC,sBAAsB,GAAG,IAAI,iDAAsB,CAAC,WAAW,CAAC,CAAC;QACtE,IAAI,CAAC,iBAAiB,GAAG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MAAM,GAAG,sBAAa,CAAC,0BAA0B,CAAC,IAAI,CAAC,WAAmB,CAAC,CAAA;IACnF,CAAC;CACJ;AA5FD,8CA4FC"}
|
|
@@ -1,32 +1,30 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.OtelAgentLoader = void 0;
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
var command = _a.command, _b = _a.useIstanbul, useIstanbul = _b === void 0 ? false : _b, agentConfig = _a.agentConfig, logger = _a.logger;
|
|
4
|
+
const agent_instance_data_1 = require("../cli-parse/agent-instance-data");
|
|
5
|
+
const process_utils_1 = require("../common/utils/process-utils");
|
|
6
|
+
class OtelAgentLoader {
|
|
7
|
+
constructor({ command, useIstanbul = false, agentConfig, logger }) {
|
|
9
8
|
if (!OtelAgentLoader.instance) {
|
|
10
9
|
OtelAgentLoader.instance = this;
|
|
11
|
-
this.setUpOptions({ agentConfig
|
|
10
|
+
this.setUpOptions({ agentConfig, logger, command, useIstanbul });
|
|
12
11
|
}
|
|
13
12
|
return OtelAgentLoader.instance;
|
|
14
13
|
}
|
|
15
|
-
|
|
16
|
-
var
|
|
17
|
-
var command = _a.command, _d = _a.useIstanbul, useIstanbul = _d === void 0 ? false : _d, agentConfig = _a.agentConfig, logger = _a.logger;
|
|
14
|
+
setUpOptions({ command, useIstanbul = false, agentConfig, logger }) {
|
|
15
|
+
var _a, _b;
|
|
18
16
|
this.useIstanbul = useIstanbul;
|
|
19
17
|
this.runningCommand = command;
|
|
20
18
|
this.agentConfig = agentConfig;
|
|
21
19
|
this.logger = logger;
|
|
22
|
-
this.useOtel = ((
|
|
23
|
-
}
|
|
24
|
-
|
|
20
|
+
this.useOtel = ((_b = (_a = this.agentConfig) === null || _a === void 0 ? void 0 : _a.useOtel) === null || _b === void 0 ? void 0 : _b.value) || false;
|
|
21
|
+
}
|
|
22
|
+
resolveAgentRunningOtelAgent() {
|
|
25
23
|
if (this.runningCommand !== 'mocha' && this.runningCommand !== 'run') {
|
|
26
24
|
return;
|
|
27
25
|
}
|
|
28
26
|
try {
|
|
29
|
-
|
|
27
|
+
const { loaded: otelAgentLoaded } = OtelAgentLoader.loadOtelAsModule();
|
|
30
28
|
if (this.useOtel && otelAgentLoaded) {
|
|
31
29
|
OtelAgentLoader.setOtelAgentEnvVariables(this.agentConfig);
|
|
32
30
|
this.resolveUsingIstanbul();
|
|
@@ -36,22 +34,22 @@ var OtelAgentLoader = /** @class */ (function () {
|
|
|
36
34
|
catch (e) {
|
|
37
35
|
this.logger.warn('SL Otel error in process.', e === null || e === void 0 ? void 0 : e.message);
|
|
38
36
|
}
|
|
39
|
-
}
|
|
40
|
-
|
|
37
|
+
}
|
|
38
|
+
resolveUsingIstanbul() {
|
|
41
39
|
if (this.useIstanbul) {
|
|
42
|
-
require((
|
|
40
|
+
require((() => 'sl-otel-agent')());
|
|
43
41
|
}
|
|
44
|
-
}
|
|
45
|
-
|
|
42
|
+
}
|
|
43
|
+
resolveUsingDefaultCommand() {
|
|
46
44
|
if (!this.useIstanbul) {
|
|
47
|
-
|
|
45
|
+
const commandIndex = this.resolveOtelCommandIndex();
|
|
48
46
|
if (commandIndex !== -1) {
|
|
49
47
|
process_utils_1.ProcessUtils.addCommandByIndex({ commandIndex: commandIndex + 1, command: ['-r', 'sl-otel-agent'] });
|
|
50
48
|
}
|
|
51
49
|
}
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
|
|
50
|
+
}
|
|
51
|
+
resolveOtelCommandIndex() {
|
|
52
|
+
let commandIndex = -1;
|
|
55
53
|
if (this.runningCommand === 'mocha') {
|
|
56
54
|
commandIndex = process_utils_1.ProcessUtils.findMochaBinIndexInProcess();
|
|
57
55
|
}
|
|
@@ -59,10 +57,10 @@ var OtelAgentLoader = /** @class */ (function () {
|
|
|
59
57
|
commandIndex = process_utils_1.ProcessUtils.findLastIndexBinNodeInProcess();
|
|
60
58
|
}
|
|
61
59
|
return commandIndex;
|
|
62
|
-
}
|
|
63
|
-
|
|
60
|
+
}
|
|
61
|
+
static setOtelAgentEnvVariables(config) {
|
|
64
62
|
var _a;
|
|
65
|
-
|
|
63
|
+
const { loaded, module: { Config } } = OtelAgentLoader.loadOtelAsModule();
|
|
66
64
|
if (!loaded)
|
|
67
65
|
return;
|
|
68
66
|
Config.setEnvVariables({
|
|
@@ -76,14 +74,14 @@ var OtelAgentLoader = /** @class */ (function () {
|
|
|
76
74
|
agentInstanceId: agent_instance_data_1.agentInstanceData.agentId,
|
|
77
75
|
labId: (_a = config.labId) === null || _a === void 0 ? void 0 : _a.value,
|
|
78
76
|
});
|
|
79
|
-
}
|
|
80
|
-
|
|
77
|
+
}
|
|
78
|
+
static loadOtelAsModule() {
|
|
81
79
|
try {
|
|
82
80
|
// eslint-disable-next-line @typescript-eslint/no-var-requires
|
|
83
|
-
|
|
81
|
+
const module = require((() => 'sl-otel-agent/module')());
|
|
84
82
|
return ({
|
|
85
83
|
loaded: true,
|
|
86
|
-
module
|
|
84
|
+
module
|
|
87
85
|
});
|
|
88
86
|
}
|
|
89
87
|
catch (e) {
|
|
@@ -92,9 +90,8 @@ var OtelAgentLoader = /** @class */ (function () {
|
|
|
92
90
|
module: {}
|
|
93
91
|
});
|
|
94
92
|
}
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
return OtelAgentLoader;
|
|
98
|
-
}());
|
|
93
|
+
}
|
|
94
|
+
}
|
|
99
95
|
exports.OtelAgentLoader = OtelAgentLoader;
|
|
96
|
+
OtelAgentLoader.instance = null;
|
|
100
97
|
//# sourceMappingURL=otel-agent-loader.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"otel-agent-loader.js","sourceRoot":"","sources":["../../test-listener/otel-agent-loader.ts"],"names":[],"mappings":";;;AAEA,
|
|
1
|
+
{"version":3,"file":"otel-agent-loader.js","sourceRoot":"","sources":["../../test-listener/otel-agent-loader.ts"],"names":[],"mappings":";;;A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M,CAAC,OAAO,CAAC,KAAK;YACjC,QAAQ,EAAE,MAAM,CAAC,UAAU,CAAC,KAAK;YACjC,SAAS,EAAE,MAAM,CAAC,SAAS,CAAC,KAAK;YACjC,cAAc,EAAE,MAAM,CAAC,cAAc,CAAC,KAAK;YAC3C,eAAe,EAAE,uCAAiB,CAAC,OAAO;YAC1C,KAAK,EAAE,MAAA,MAAM,CAAC,KAAK,0CAAE,KAAK;SAC7B,CAAC,CAAA;IACN,CAAC;IAEM,MAAM,CAAC,gBAAgB;QAC1B,IAAI;YACA,8DAA8D;YAC9D,MAAM,MAAM,GAAG,OAAO,CAAC,CAAC,GAAG,EAAE,CAAC,sBAAsB,CAAC,EAAE,CAAC,CAAC;YAEzD,OAAO,CAAC;gBACJ,MAAM,EAAE,IAAI;gBACZ,MAAM;aACT,CAAC,CAAA;SACL;QAAC,OAAO,CAAC,EAAE;YACR,OAAO,CAAC;gBACJ,MAAM,EAAE,KAAK;gBACb,MAAM,EAAE,EAAE;aACb,CAAC,CAAA;SACL;IACL,CAAC;;AA9GL,0CA+GC;AA9GU,wBAAQ,GAAG,IAAI,CAAC"}
|
|
@@ -1,58 +1,40 @@
|
|
|
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.Queue = void 0;
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
_this.maxItemsInQueue = 1000;
|
|
26
|
-
return _this;
|
|
4
|
+
const events = require("events");
|
|
5
|
+
class Queue extends events.EventEmitter {
|
|
6
|
+
constructor() {
|
|
7
|
+
super(...arguments);
|
|
8
|
+
this.queue = [];
|
|
9
|
+
this.maxItemsInQueue = 1000;
|
|
27
10
|
}
|
|
28
|
-
|
|
11
|
+
requeue(items) {
|
|
29
12
|
if (!items || !items.length)
|
|
30
13
|
return;
|
|
31
14
|
this.queue = items.concat(this.queue);
|
|
32
|
-
}
|
|
33
|
-
|
|
15
|
+
}
|
|
16
|
+
enqueue(item) {
|
|
34
17
|
this.queue.push(item);
|
|
35
18
|
if (this.maxItemsInQueue == this.queue.length) {
|
|
36
19
|
this.emit('full');
|
|
37
20
|
}
|
|
38
|
-
}
|
|
39
|
-
|
|
21
|
+
}
|
|
22
|
+
getQueueSize() {
|
|
40
23
|
return this.queue.length;
|
|
41
|
-
}
|
|
42
|
-
|
|
24
|
+
}
|
|
25
|
+
dequeue(size) {
|
|
43
26
|
if (size == 0)
|
|
44
27
|
size = this.queue.length; //dequeue all
|
|
45
28
|
if (this.queue.length == 0)
|
|
46
29
|
return [];
|
|
47
30
|
if (size > this.queue.length)
|
|
48
31
|
size = this.queue.length;
|
|
49
|
-
|
|
32
|
+
const dequeuedItems = this.queue.splice(0, size);
|
|
50
33
|
return dequeuedItems;
|
|
51
|
-
}
|
|
52
|
-
|
|
34
|
+
}
|
|
35
|
+
clear() {
|
|
53
36
|
this.queue = [];
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
}(events.EventEmitter));
|
|
37
|
+
}
|
|
38
|
+
}
|
|
57
39
|
exports.Queue = Queue;
|
|
58
40
|
//# sourceMappingURL=queue.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"queue.js","sourceRoot":"","sources":["../../test-listener/queue.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"queue.js","sourceRoot":"","sources":["../../test-listener/queue.ts"],"names":[],"mappings":";;;AAAA,iCAAkC;AAClC,MAAa,KAAS,SAAQ,MAAM,CAAC,YAAY;IAAjD;;QAaY,UAAK,GAAQ,EAAE,CAAC;QAChB,oBAAe,GAAW,IAAI,CAAC;IAmB3C,CAAC;IAhCU,OAAO,CAAC,KAAU;QACrB,IAAI,CAAC,KAAK,IAAI,CAAC,KAAK,CAAC,MAAM;YAAE,OAAO;QACpC,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IAC1C,CAAC;IAEM,OAAO,CAAC,IAAO;QAClB,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACtB,IAAG,IAAI,CAAC,eAAe,IAAI,IAAI,CAAC,KAAK,CAAC,MAAM,EAAC;YACzC,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;SACrB;IACL,CAAC;IAKM,YAAY;QACf,OAAO,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC;IAC7B,CAAC;IAEM,OAAO,CAAC,IAAY;QACvB,IAAI,IAAI,IAAI,CAAC;YAAE,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,aAAa;QACtD,IAAI,IAAI,CAAC,KAAK,CAAC,MAAM,IAAI,CAAC;YAAE,OAAO,EAAE,CAAC;QACtC,IAAI,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,MAAM;YACxB,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC;QAE7B,MAAM,aAAa,GAAG,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,EAAE,IAAI,CAAC,CAAC;QACjD,OAA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