slnodejs 6.1.410 → 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 +33 -28
- package/browser-agent/dist/browser-agent-all.min.js +2 -2
- 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 +36 -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 +57 -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 +74 -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/contracts.d.ts +2 -0
- package/tsOutputs/cli-parse/contracts.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 +11 -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 +68 -132
- 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,202 +8,131 @@ 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.MockServerProxy = void 0;
|
|
40
|
-
|
|
41
|
-
|
|
13
|
+
const request = require("request");
|
|
14
|
+
const contracts_1 = require("./contracts");
|
|
42
15
|
/**
|
|
43
16
|
* A proxy for interacting sealights mock server using promises
|
|
44
17
|
*/
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
50
|
-
return __generator(this, function (_a) {
|
|
51
|
-
switch (_a.label) {
|
|
52
|
-
case 0: return [4 /*yield*/, this.executeSlRequest(this.GET_ALL_FOOTPRINTS, contracts_1.HttpVerb.GET)];
|
|
53
|
-
case 1: return [2 /*return*/, _a.sent()];
|
|
54
|
-
}
|
|
55
|
-
});
|
|
18
|
+
class MockServerProxy {
|
|
19
|
+
static getAllFootprints() {
|
|
20
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
21
|
+
return yield this.executeSlRequest(this.GET_ALL_FOOTPRINTS, contracts_1.HttpVerb.GET);
|
|
56
22
|
});
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
60
|
-
return
|
|
61
|
-
return [2 /*return*/, this.executeSlRequest(this.SET_RECOMMENDED_VERSION, contracts_1.HttpVerb.POST, null, requestParams)];
|
|
62
|
-
});
|
|
23
|
+
}
|
|
24
|
+
static setRecommendedVersion(requestParams) {
|
|
25
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
26
|
+
return this.executeSlRequest(this.SET_RECOMMENDED_VERSION, contracts_1.HttpVerb.POST, null, requestParams);
|
|
63
27
|
});
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
67
|
-
return
|
|
68
|
-
return [2 /*return*/, this.executeSlRequest(this.CREATE_BUILDSESSION_ID, contracts_1.HttpVerb.POST, false, buildSessionParams)];
|
|
69
|
-
});
|
|
28
|
+
}
|
|
29
|
+
static createBuildSessionId(buildSessionParams) {
|
|
30
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
31
|
+
return this.executeSlRequest(this.CREATE_BUILDSESSION_ID, contracts_1.HttpVerb.POST, false, buildSessionParams);
|
|
70
32
|
});
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
74
|
-
return
|
|
75
|
-
switch (_a.label) {
|
|
76
|
-
case 0: return [4 /*yield*/, this.executeSlRequest(this.GET_BUILD_MAPPING, contracts_1.HttpVerb.GET)];
|
|
77
|
-
case 1: return [2 /*return*/, _a.sent()];
|
|
78
|
-
}
|
|
79
|
-
});
|
|
33
|
+
}
|
|
34
|
+
static getBuildMapping() {
|
|
35
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
36
|
+
return yield this.executeSlRequest(this.GET_BUILD_MAPPING, contracts_1.HttpVerb.GET);
|
|
80
37
|
});
|
|
81
|
-
}
|
|
82
|
-
|
|
38
|
+
}
|
|
39
|
+
static resetState() {
|
|
83
40
|
return this.executeSlRequest(this.RESET, contracts_1.HttpVerb.GET, false);
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
87
|
-
return
|
|
88
|
-
return [2 /*return*/, this.executeSlRequest(this.GET_TOKEN, contracts_1.HttpVerb.GET, false)];
|
|
89
|
-
});
|
|
41
|
+
}
|
|
42
|
+
static getToken() {
|
|
43
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
44
|
+
return this.executeSlRequest(this.GET_TOKEN, contracts_1.HttpVerb.GET, false);
|
|
90
45
|
});
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
94
|
-
return
|
|
95
|
-
return [2 /*return*/, this.executeSlRequest("".concat(this.SET_ACTIVE_BSID, "/").concat(buildSessionId), contracts_1.HttpVerb.POST, false)];
|
|
96
|
-
});
|
|
46
|
+
}
|
|
47
|
+
static setActiveBSID(buildSessionId) {
|
|
48
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
49
|
+
return this.executeSlRequest(`${this.SET_ACTIVE_BSID}/${buildSessionId}`, contracts_1.HttpVerb.POST, false);
|
|
97
50
|
});
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
101
|
-
return
|
|
102
|
-
return [2 /*return*/, this.executeSlRequest(this.GET_TEST_EVENTS, contracts_1.HttpVerb.GET)];
|
|
103
|
-
});
|
|
51
|
+
}
|
|
52
|
+
static getTestEvents() {
|
|
53
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
54
|
+
return this.executeSlRequest(this.GET_TEST_EVENTS, contracts_1.HttpVerb.GET);
|
|
104
55
|
});
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
108
|
-
|
|
109
|
-
return
|
|
110
|
-
uri = "".concat(this.SET_TEST_EXCLUSIONS, "/").concat(buildSessionId, "/").concat(testStage);
|
|
111
|
-
return [2 /*return*/, this.executeSlRequest(uri, contracts_1.HttpVerb.POST, false, setTestExclusionRequest)];
|
|
112
|
-
});
|
|
56
|
+
}
|
|
57
|
+
static setTestExclusions(buildSessionId, testStage, setTestExclusionRequest) {
|
|
58
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
59
|
+
const uri = `${this.SET_TEST_EXCLUSIONS}/${buildSessionId}/${testStage}`;
|
|
60
|
+
return this.executeSlRequest(uri, contracts_1.HttpVerb.POST, false, setTestExclusionRequest);
|
|
113
61
|
});
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
117
|
-
return
|
|
118
|
-
return [2 /*return*/, this.executeSlRequest(this.GET_RETRY_COUNTERS, contracts_1.HttpVerb.GET)];
|
|
119
|
-
});
|
|
62
|
+
}
|
|
63
|
+
static getRetryCounters() {
|
|
64
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
65
|
+
return this.executeSlRequest(this.GET_RETRY_COUNTERS, contracts_1.HttpVerb.GET);
|
|
120
66
|
});
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
124
|
-
return
|
|
125
|
-
return [2 /*return*/, this.executeSlRequest(this.GET_AGENT_EVENTS, contracts_1.HttpVerb.GET)];
|
|
126
|
-
});
|
|
67
|
+
}
|
|
68
|
+
static getAgentEvents() {
|
|
69
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
70
|
+
return this.executeSlRequest(this.GET_AGENT_EVENTS, contracts_1.HttpVerb.GET);
|
|
127
71
|
});
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
131
|
-
return
|
|
132
|
-
return [2 /*return*/, this.executeSlRequest(this.GET_BUILD_END, contracts_1.HttpVerb.GET)];
|
|
133
|
-
});
|
|
72
|
+
}
|
|
73
|
+
static getBuildEndStatus() {
|
|
74
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
75
|
+
return this.executeSlRequest(this.GET_BUILD_END, contracts_1.HttpVerb.GET);
|
|
134
76
|
});
|
|
135
|
-
}
|
|
136
|
-
|
|
137
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
138
|
-
return
|
|
139
|
-
return [2 /*return*/, this.executeSlRequest(this.GET_LOGS, contracts_1.HttpVerb.GET)];
|
|
140
|
-
});
|
|
77
|
+
}
|
|
78
|
+
static getLogs() {
|
|
79
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
80
|
+
return this.executeSlRequest(this.GET_LOGS, contracts_1.HttpVerb.GET);
|
|
141
81
|
});
|
|
142
|
-
}
|
|
143
|
-
|
|
144
|
-
|
|
82
|
+
}
|
|
83
|
+
static setDelay(duration_ms, requestToBeDelayed) {
|
|
84
|
+
const requestData = { duration_ms, requestToBeDelayed };
|
|
145
85
|
return this.executeRequest(MockServerProxy.SET_DELAY, contracts_1.HttpVerb.POST, null, requestData);
|
|
146
|
-
}
|
|
147
|
-
|
|
148
|
-
|
|
86
|
+
}
|
|
87
|
+
static setEnabled(enabled) {
|
|
88
|
+
const requestData = { enabled };
|
|
149
89
|
return this.executeRequest(MockServerProxy.SET_ENABLED, contracts_1.HttpVerb.POST, null, requestData);
|
|
150
|
-
}
|
|
151
|
-
|
|
90
|
+
}
|
|
91
|
+
static setConfig(config) {
|
|
152
92
|
return this.executeSlRequest(MockServerProxy.SET_CONFIG, contracts_1.HttpVerb.POST, null, config);
|
|
153
|
-
}
|
|
154
|
-
|
|
155
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
};
|
|
166
|
-
return [2 /*return*/, this.executeSlRequest(this.SETTINGS, contracts_1.HttpVerb.PUT, false, [request])];
|
|
167
|
-
});
|
|
93
|
+
}
|
|
94
|
+
static setRouteSettings(url, verb, status, requestsBeforeStatusExpires) {
|
|
95
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
96
|
+
const request = {
|
|
97
|
+
url,
|
|
98
|
+
method: verb,
|
|
99
|
+
settings: {
|
|
100
|
+
requestsBeforeStatusExpires,
|
|
101
|
+
status
|
|
102
|
+
}
|
|
103
|
+
};
|
|
104
|
+
return this.executeSlRequest(this.SETTINGS, contracts_1.HttpVerb.PUT, false, [request]);
|
|
168
105
|
});
|
|
169
|
-
}
|
|
170
|
-
|
|
171
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
172
|
-
return
|
|
173
|
-
return [2 /*return*/, this.executeSlRequest(this.SET_TEST_EXECUTION, contracts_1.HttpVerb.POST, false, { execution: execution })];
|
|
174
|
-
});
|
|
106
|
+
}
|
|
107
|
+
static setTestExecution(execution) {
|
|
108
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
109
|
+
return this.executeSlRequest(this.SET_TEST_EXECUTION, contracts_1.HttpVerb.POST, false, { execution });
|
|
175
110
|
});
|
|
176
|
-
}
|
|
177
|
-
|
|
178
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
179
|
-
return
|
|
180
|
-
return [2 /*return*/, this.executeSlRequest("".concat(this.GET_TEST_EXECUTION).concat(labid), contracts_1.HttpVerb.GET)];
|
|
181
|
-
});
|
|
111
|
+
}
|
|
112
|
+
static getTestExecution(labid) {
|
|
113
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
114
|
+
return this.executeSlRequest(`${this.GET_TEST_EXECUTION}${labid}`, contracts_1.HttpVerb.GET);
|
|
182
115
|
});
|
|
183
|
-
}
|
|
184
|
-
|
|
185
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
186
|
-
return
|
|
187
|
-
return [2 /*return*/, this.executeSlRequest(this.SETTINGS, contracts_1.HttpVerb.GET)];
|
|
188
|
-
});
|
|
116
|
+
}
|
|
117
|
+
static getSettings() {
|
|
118
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
119
|
+
return this.executeSlRequest(this.SETTINGS, contracts_1.HttpVerb.GET);
|
|
189
120
|
});
|
|
190
|
-
}
|
|
191
|
-
|
|
192
|
-
if (shouldParse === void 0) { shouldParse = true; }
|
|
121
|
+
}
|
|
122
|
+
static executeSlRequest(uri, verb, shouldParse = true, requestData) {
|
|
193
123
|
return this.executeRequest(this.SERVER_URL + uri, verb, shouldParse, requestData);
|
|
194
|
-
}
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
url: url,
|
|
124
|
+
}
|
|
125
|
+
static executeRequest(url, verb, shouldParse = true, requestData) {
|
|
126
|
+
return new Promise((resolve, reject) => {
|
|
127
|
+
const options = {
|
|
128
|
+
url,
|
|
200
129
|
method: verb,
|
|
201
130
|
headers: {
|
|
202
131
|
'content-type': 'application/json',
|
|
203
132
|
},
|
|
204
133
|
json: requestData
|
|
205
134
|
};
|
|
206
|
-
request(options,
|
|
135
|
+
request(options, (err, resp, body) => {
|
|
207
136
|
if (err) {
|
|
208
137
|
reject(err);
|
|
209
138
|
}
|
|
@@ -212,7 +141,7 @@ var MockServerProxy = /** @class */ (function () {
|
|
|
212
141
|
}
|
|
213
142
|
if (shouldParse) {
|
|
214
143
|
try {
|
|
215
|
-
|
|
144
|
+
const parsedResponse = JSON.parse(body);
|
|
216
145
|
resolve(parsedResponse);
|
|
217
146
|
}
|
|
218
147
|
catch (err) {
|
|
@@ -222,32 +151,31 @@ var MockServerProxy = /** @class */ (function () {
|
|
|
222
151
|
resolve(body);
|
|
223
152
|
});
|
|
224
153
|
});
|
|
225
|
-
}
|
|
226
|
-
|
|
227
|
-
MockServerProxy.SERVER_URL = 'http://localhost:9900';
|
|
228
|
-
MockServerProxy.GET_ALL_FOOTPRINTS = '/api/test/footprints';
|
|
229
|
-
MockServerProxy.GET_BUILD_MAPPING = '/api/test/buildmapping';
|
|
230
|
-
MockServerProxy.RESET = '/api/test/reset';
|
|
231
|
-
MockServerProxy.GET_TOKEN = '/api/test/token';
|
|
232
|
-
MockServerProxy.CREATE_BUILDSESSION_ID = '/api/v2/agents/buildsession';
|
|
233
|
-
MockServerProxy.SET_RECOMMENDED_VERSION = '/api/test/recommended';
|
|
234
|
-
MockServerProxy.SET_ACTIVE_BSID = '/api/test/lab-ids/build-sessions/active';
|
|
235
|
-
MockServerProxy.GET_TEST_EVENTS = '/api/test/agents/events';
|
|
236
|
-
MockServerProxy.SET_TEST_EXCLUSIONS = '/api/test/test-exclusions';
|
|
237
|
-
MockServerProxy.GET_RETRY_COUNTERS = '/api/test/retry-counters';
|
|
238
|
-
MockServerProxy.GET_AGENT_EVENTS = '/api/test/v3/agents/agent-events';
|
|
239
|
-
MockServerProxy.SETTINGS = '/settings';
|
|
240
|
-
MockServerProxy.TEST_EXCLUSION = '/api/v3/test-exclusions/:buildSessionId/:testStage';
|
|
241
|
-
MockServerProxy.GET_BUILD_END = '/api/test/buildend';
|
|
242
|
-
MockServerProxy.GET_LOGS = '/api/test/logs';
|
|
243
|
-
MockServerProxy.SET_DELAY = '/api/test/setDelay';
|
|
244
|
-
MockServerProxy.SET_ENABLED = '/api/test/setEnabled';
|
|
245
|
-
MockServerProxy.SET_CONFIG = '/api/test/config';
|
|
246
|
-
MockServerProxy.SET_BUILD_END = '/api/v3/agents/buildend';
|
|
247
|
-
MockServerProxy.SET_TEST_EXECUTION = '/api/test/testExecution';
|
|
248
|
-
MockServerProxy.GET_TEST_EXECUTION = '/api/v4/testExecution/';
|
|
249
|
-
MockServerProxy.FOOTPRINTS_V6 = '/api/v6/agents/:executionBsId/footprints/:testStage/:buildSessionId';
|
|
250
|
-
return MockServerProxy;
|
|
251
|
-
}());
|
|
154
|
+
}
|
|
155
|
+
}
|
|
252
156
|
exports.MockServerProxy = MockServerProxy;
|
|
157
|
+
//TODO: extract to external 'routes' file
|
|
158
|
+
MockServerProxy.SERVER_URL = 'http://localhost:9900';
|
|
159
|
+
MockServerProxy.GET_ALL_FOOTPRINTS = '/api/test/footprints';
|
|
160
|
+
MockServerProxy.GET_BUILD_MAPPING = '/api/test/buildmapping';
|
|
161
|
+
MockServerProxy.RESET = '/api/test/reset';
|
|
162
|
+
MockServerProxy.GET_TOKEN = '/api/test/token';
|
|
163
|
+
MockServerProxy.CREATE_BUILDSESSION_ID = '/api/v2/agents/buildsession';
|
|
164
|
+
MockServerProxy.SET_RECOMMENDED_VERSION = '/api/test/recommended';
|
|
165
|
+
MockServerProxy.SET_ACTIVE_BSID = '/api/test/lab-ids/build-sessions/active';
|
|
166
|
+
MockServerProxy.GET_TEST_EVENTS = '/api/test/agents/events';
|
|
167
|
+
MockServerProxy.SET_TEST_EXCLUSIONS = '/api/test/test-exclusions';
|
|
168
|
+
MockServerProxy.GET_RETRY_COUNTERS = '/api/test/retry-counters';
|
|
169
|
+
MockServerProxy.GET_AGENT_EVENTS = '/api/test/v3/agents/agent-events';
|
|
170
|
+
MockServerProxy.SETTINGS = '/settings';
|
|
171
|
+
MockServerProxy.TEST_EXCLUSION = '/api/v3/test-exclusions/:buildSessionId/:testStage';
|
|
172
|
+
MockServerProxy.GET_BUILD_END = '/api/test/buildend';
|
|
173
|
+
MockServerProxy.GET_LOGS = '/api/test/logs';
|
|
174
|
+
MockServerProxy.SET_DELAY = '/api/test/setDelay';
|
|
175
|
+
MockServerProxy.SET_ENABLED = '/api/test/setEnabled';
|
|
176
|
+
MockServerProxy.SET_CONFIG = '/api/test/config';
|
|
177
|
+
MockServerProxy.SET_BUILD_END = '/api/v3/agents/buildend';
|
|
178
|
+
MockServerProxy.SET_TEST_EXECUTION = '/api/test/testExecution';
|
|
179
|
+
MockServerProxy.GET_TEST_EXECUTION = '/api/v4/testExecution/';
|
|
180
|
+
MockServerProxy.FOOTPRINTS_V6 = '/api/v6/agents/:executionBsId/footprints/:testStage/:buildSessionId';
|
|
253
181
|
//# sourceMappingURL=mock-server-proxy.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mock-server-proxy.js","sourceRoot":"","sources":["../../../../../common/utils/test-utils/mock-server-utils/mock-server-proxy.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"mock-server-proxy.js","sourceRoot":"","sources":["../../../../../common/utils/test-utils/mock-server-utils/mock-server-proxy.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,mCAAoC;AACpC,2CAQqB;AAMrB;;GAEG;AACH,MAAa,eAAe;IA2BjB,MAAM,CAAO,gBAAgB;;YAChC,OAAO,MAAM,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC,kBAAkB,EAAE,oBAA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,CAAC;AAClD,+BAAe,GAAG,yCAAyC,CAAC;AAC5D,+BAAe,GAAG,yBAAyB,CAAC;AAC5C,mCAAmB,GAAG,2BAA2B,CAAC;AAClD,kCAAkB,GAAG,0BAA0B,CAAC;AAChD,gCAAgB,GAAG,kCAAkC,CAAC;AACtD,wBAAQ,GAAG,WAAW,CAAC;AACxB,8BAAc,GAAG,oDAAoD,CAAC;AACtE,6BAAa,GAAG,oBAAoB,CAAC;AACrC,wBAAQ,GAAG,gBAAgB,CAAC;AAC5B,yBAAS,GAAG,oBAAoB,CAAC;AACjC,2BAAW,GAAG,sBAAsB,CAAC;AACrC,0BAAU,GAAG,kBAAkB,CAAC;AAChC,6BAAa,GAAG,yBAAyB,CAAC;AAC1C,kCAAkB,GAAG,yBAAyB,CAAC;AAC/C,kCAAkB,GAAG,wBAAwB,CAAC;AAC9C,6BAAa,GAAG,qEAAqE,CAAC"}
|
|
@@ -1,13 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.TimerUtils = void 0;
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
class TimerUtils {
|
|
5
|
+
static sleep(timeout) {
|
|
6
|
+
return new Promise(resolve => { setTimeout(resolve, timeout); });
|
|
6
7
|
}
|
|
7
|
-
|
|
8
|
-
return new Promise(function (resolve) { setTimeout(resolve, timeout); });
|
|
9
|
-
};
|
|
10
|
-
return TimerUtils;
|
|
11
|
-
}());
|
|
8
|
+
}
|
|
12
9
|
exports.TimerUtils = TimerUtils;
|
|
13
10
|
//# sourceMappingURL=timer-utils.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"timer-utils.js","sourceRoot":"","sources":["../../../common/utils/timer-utils.ts"],"names":[],"mappings":";;;AAAA;
|
|
1
|
+
{"version":3,"file":"timer-utils.js","sourceRoot":"","sources":["../../../common/utils/timer-utils.ts"],"names":[],"mappings":";;;AAAA,MAAa,UAAU;IACZ,MAAM,CAAC,KAAK,CAAC,OAAe;QAC/B,OAAO,IAAI,OAAO,CAAC,OAAO,CAAC,EAAE,GAAE,UAAU,CAAC,OAAO,EAAE,OAAO,CAAC,CAAA,CAAA,CAAC,CAAC,CAAA;IACjE,CAAC;CACJ;AAJD,gCAIC"}
|
|
@@ -1,75 +1,56 @@
|
|
|
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.TokenDataBuilder = void 0;
|
|
19
|
-
|
|
20
|
-
|
|
4
|
+
const jwtDecode = require("jwt-decode");
|
|
5
|
+
const abstract_data_builder_1 = require("./abstract-data-builder");
|
|
21
6
|
/**
|
|
22
7
|
* Decode and validate token data.
|
|
23
8
|
*/
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
function TokenDataBuilder() {
|
|
27
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
|
28
|
-
}
|
|
29
|
-
TokenDataBuilder.prototype.build = function (cmd) {
|
|
9
|
+
class TokenDataBuilder extends abstract_data_builder_1.AbstractDataBuilder {
|
|
10
|
+
build(cmd) {
|
|
30
11
|
if (!this.validateTokenArgs(cmd)) {
|
|
31
12
|
return { isValid: false };
|
|
32
13
|
}
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
return { token: rawToken, customerid: customerId, server
|
|
39
|
-
}
|
|
14
|
+
const rawToken = this.getRawToken(cmd);
|
|
15
|
+
const decodedToken = this.getDecodedToken(rawToken);
|
|
16
|
+
const customerId = this.getCustomerId(decodedToken);
|
|
17
|
+
const server = decodedToken[TokenDataBuilder.SERVER_KEY];
|
|
18
|
+
const isValid = this.isValidToken(decodedToken);
|
|
19
|
+
return { token: rawToken, customerid: customerId, server, isValid };
|
|
20
|
+
}
|
|
40
21
|
/**
|
|
41
22
|
* Added for testing only
|
|
42
23
|
* @param rawToken
|
|
43
24
|
*/
|
|
44
|
-
|
|
25
|
+
getDecodedToken(rawToken) {
|
|
45
26
|
try {
|
|
46
27
|
return jwtDecode(rawToken);
|
|
47
28
|
}
|
|
48
29
|
catch (e) {
|
|
49
|
-
this.logger.warn(
|
|
30
|
+
this.logger.warn(`Failed to decode token data. Error ${e}`);
|
|
50
31
|
return {};
|
|
51
32
|
}
|
|
52
|
-
}
|
|
53
|
-
|
|
33
|
+
}
|
|
34
|
+
getRawToken(cmd) {
|
|
54
35
|
if (cmd.token) {
|
|
55
36
|
return cmd.token;
|
|
56
37
|
}
|
|
57
38
|
else if (cmd.tokenfile) {
|
|
58
39
|
return this.getFromFile(cmd, 'tokenfile');
|
|
59
40
|
}
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
|
|
41
|
+
}
|
|
42
|
+
validateTokenArgs(cmd) {
|
|
43
|
+
const missingKeys = !cmd.token && !cmd.tokenfile;
|
|
63
44
|
if (missingKeys) {
|
|
64
45
|
this.logger.error('CLI Error: \'token\' or \'tokenfile\' must be provided');
|
|
65
46
|
}
|
|
66
47
|
return !missingKeys;
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
|
|
48
|
+
}
|
|
49
|
+
getCustomerId(decodedToken) {
|
|
50
|
+
const subject = decodedToken[TokenDataBuilder.SUBJECT_KEY] || '';
|
|
70
51
|
return subject.split('@')[0];
|
|
71
|
-
}
|
|
72
|
-
|
|
52
|
+
}
|
|
53
|
+
isValidToken(decodedToken) {
|
|
73
54
|
if (!decodedToken.hasOwnProperty(TokenDataBuilder.SUBJECT_KEY)) {
|
|
74
55
|
this.logger.error('Token Is Invalid. Doesn\'t Contains customerId');
|
|
75
56
|
return false;
|
|
@@ -83,16 +64,15 @@ var TokenDataBuilder = /** @class */ (function (_super) {
|
|
|
83
64
|
return false;
|
|
84
65
|
}
|
|
85
66
|
if (decodedToken[TokenDataBuilder.ROLE_KEY] != TokenDataBuilder.AGENT_ROLE) {
|
|
86
|
-
this.logger.error(
|
|
67
|
+
this.logger.error(`Token Is Invalid. Expected role to be ${TokenDataBuilder.AGENT_ROLE} but got ${decodedToken[TokenDataBuilder.ROLE_KEY]}`);
|
|
87
68
|
return false;
|
|
88
69
|
}
|
|
89
70
|
return true;
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
TokenDataBuilder.SERVER_KEY = 'x-sl-server';
|
|
93
|
-
TokenDataBuilder.ROLE_KEY = 'x-sl-role';
|
|
94
|
-
TokenDataBuilder.AGENT_ROLE = 'agent';
|
|
95
|
-
return TokenDataBuilder;
|
|
96
|
-
}(abstract_data_builder_1.AbstractDataBuilder));
|
|
71
|
+
}
|
|
72
|
+
}
|
|
97
73
|
exports.TokenDataBuilder = TokenDataBuilder;
|
|
74
|
+
TokenDataBuilder.SUBJECT_KEY = 'subject';
|
|
75
|
+
TokenDataBuilder.SERVER_KEY = 'x-sl-server';
|
|
76
|
+
TokenDataBuilder.ROLE_KEY = 'x-sl-role';
|
|
77
|
+
TokenDataBuilder.AGENT_ROLE = 'agent';
|
|
98
78
|
//# sourceMappingURL=token-data-builder.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"token-data-builder.js","sourceRoot":"","sources":["../../../common/utils/token-data-builder.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"token-data-builder.js","sourceRoot":"","sources":["../../../common/utils/token-data-builder.ts"],"names":[],"mappings":";;;AAAA,wCAAwC;AACxC,mEAA4D;AAG5D;;GAEG;AACH,MAAa,gBAAiB,SAAQ,2CAAmB;IAM9C,KAAK,CAAC,GAAe;QACxB,IAAG,CAAC,IAAI,CAAC,iBAAiB,CAAC,GAAG,CAAC,EAAE;YAC7B,OAAmB,EAAC,OAAO,EAAE,KAAK,EAAC,CAAC;SACvC;QACD,MAAM,QAAQ,GAAG,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC;QACvC,MAAM,YAAY,GAAG,IAAI,CAAC,eAAe,CAAC,QAAQ,CAAC,CAAC;QACpD,MAAM,UAAU,GAAG,IAAI,CAAC,aAAa,CAAC,YAAY,CAAC,CAAC;QACpD,MAAM,MAAM,GAAG,YAAY,CAAC,gBAAgB,CAAC,UAAU,CAAC,CAAC;QACzD,MAAM,OAAO,GAAG,IAAI,CAAC,YAAY,CAAC,YAAY,CAAC,CAAC;QAChD,OAAO,EAAC,KAAK,EAAE,QAAQ,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,EAAE,OAAO,EAAC,CAAA;IACrE,CAAC;IAED;;;OAGG;IACK,eAAe,CAAC,QAAgB;QACpC,IAAI;YACA,OAAO,SAAS,CAAC,QAAQ,CAAC,CAAC;SAC9B;QAAC,OAAO,CAAC,EAAE;YACR,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,sCAAsC,CAAC,EAAE,CAAC,CAAC;YAC5D,OAAO,EAAE,CAAC;SACb;IACL,CAAC;IAES,WAAW,CAAC,GAAe;QACjC,IAAG,GAAG,CAAC,KAAK,EAAC;YACT,OAAO,GAAG,CAAC,KAAK,CAAC;SACpB;aACI,IAAI,GAAG,CAAC,SAAS,EAAE;YACrB,OAAO,IAAI,CAAC,WAAW,CAAC,GAAG,EAAE,WAAW,CAAC,CAAA;SAC3C;IACL,CAAC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AC;IAChB,CAAC;;AAzEL,4CA0EC;AAzE0B,4BAAW,GAAG,SAAS,CAAC;AACxB,2BAAU,GAAG,aAAa,CAAC;AAC3B,yBAAQ,GAAG,WAAW,CAAC;AACvB,2BAAU,GAAG,OAAO,CAAC"}
|
|
@@ -1,19 +1,16 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.ValidationUtils = void 0;
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
}
|
|
8
|
-
ValidationUtils.verifyNotNullOrEmpty = function (value, paramName) {
|
|
4
|
+
const constants_1 = require("../constants/constants");
|
|
5
|
+
class ValidationUtils {
|
|
6
|
+
static verifyNotNullOrEmpty(value, paramName) {
|
|
9
7
|
if (value === undefined || value === null) {
|
|
10
|
-
throw new Error(
|
|
8
|
+
throw new Error(`${paramName} ${constants_1.Constants.Messages.CANNOT_BE_NULL_OR_UNDEFINED}.`);
|
|
11
9
|
}
|
|
12
10
|
if (typeof (value) === 'string' && value.length === 0) {
|
|
13
|
-
throw new Error(
|
|
11
|
+
throw new Error(`${paramName} ${constants_1.Constants.Messages.CANNOT_BE_EMPTY_STRING}.`);
|
|
14
12
|
}
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
}());
|
|
13
|
+
}
|
|
14
|
+
}
|
|
18
15
|
exports.ValidationUtils = ValidationUtils;
|
|
19
16
|
//# sourceMappingURL=validation-utils.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"validation-utils.js","sourceRoot":"","sources":["../../../common/utils/validation-utils.ts"],"names":[],"mappings":";;;AAAA,
|
|
1
|
+
{"version":3,"file":"validation-utils.js","sourceRoot":"","sources":["../../../common/utils/validation-utils.ts"],"names":[],"mappings":";;;AAAA,sDAAmD;AAEnD,MAAa,eAAe;IACjB,MAAM,CAAC,oBAAoB,CAAC,KAAU,EAAE,SAAiB;QAC5D,IAAI,KAAK,KAAK,SAAS,IAAI,KAAK,KAAK,IAAI,EAAC;YACtC,MAAM,IAAI,KAAK,CAAC,GAAG,SAAS,IAAI,qBAAS,CAAC,QAAQ,CAAC,2BAA2B,GAAG,CAAC,CAAA;SACrF;QAED,IAAI,OAAM,CAAC,KAAK,CAAC,KAAK,QAAQ,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC,EACpD;YACI,MAAM,IAAI,KAAK,CAAC,GAAG,SAAS,IAAI,qBAAS,CAAC,QAAQ,CAAC,sBAAsB,GAAG,CAAC,CAAA;SAChF;IACL,CAAC;CAEJ;AAZD,0CAYC"}
|
package/tsOutputs/common/uuid.js
CHANGED
|
@@ -1,15 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.UUID = void 0;
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
UUID.newGuid = function (str) {
|
|
9
|
-
var out = crypto.createHash('sha1').update(str).digest();
|
|
4
|
+
const crypto = require("crypto");
|
|
5
|
+
class UUID {
|
|
6
|
+
static newGuid(str) {
|
|
7
|
+
const out = crypto.createHash('sha1').update(str).digest();
|
|
10
8
|
out[8] = out[8] & 0x3f | 0xa0; // set variant
|
|
11
9
|
out[6] = out[6] & 0x0f | 0x50; // set version
|
|
12
|
-
|
|
10
|
+
const hex = out.toString('hex', 0, 16);
|
|
13
11
|
return [
|
|
14
12
|
hex.substring(0, 8),
|
|
15
13
|
hex.substring(8, 12),
|
|
@@ -17,8 +15,7 @@ var UUID = /** @class */ (function () {
|
|
|
17
15
|
hex.substring(16, 20),
|
|
18
16
|
hex.substring(20, 32),
|
|
19
17
|
].join('-');
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
}());
|
|
18
|
+
}
|
|
19
|
+
}
|
|
23
20
|
exports.UUID = UUID;
|
|
24
21
|
//# sourceMappingURL=uuid.js.map
|