slnodejs 6.1.2 → 6.1.10
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 +101189 -0
- package/browser-agent/dist/browser-agent-all.min.js +57 -0
- package/browser-agent/package.json +44 -0
- package/lib/cli.js +1 -1
- package/package.json +125 -124
- package/tsOutputs/api.d.ts +10 -12
- package/tsOutputs/api.js +115 -116
- package/tsOutputs/build-scanner/ast-utils.js +38 -38
- package/tsOutputs/build-scanner/ast-utils.js.map +1 -1
- package/tsOutputs/build-scanner/build-diff-process.js +352 -352
- package/tsOutputs/build-scanner/cia.js +95 -95
- package/tsOutputs/build-scanner/configuration-loader.js +17 -17
- package/tsOutputs/build-scanner/current-agent-instance.js +5 -5
- package/tsOutputs/build-scanner/default-values-resolver.js +42 -42
- package/tsOutputs/build-scanner/entities-mapper.js +35 -35
- package/tsOutputs/build-scanner/file-and-folder-utils.js +176 -176
- package/tsOutputs/build-scanner/file-system/actual-file.js +66 -66
- package/tsOutputs/build-scanner/file-system/actual-file.js.map +1 -1
- package/tsOutputs/build-scanner/git-format-builder.js +68 -68
- package/tsOutputs/build-scanner/global-error-handler.js +20 -20
- package/tsOutputs/build-scanner/instrumentation/browser-instrumenter.js +299 -299
- package/tsOutputs/build-scanner/instrumentation/file-instrumenter.js +271 -271
- package/tsOutputs/build-scanner/instrumentation/file-instrumenter.js.map +1 -1
- package/tsOutputs/build-scanner/instrumentation/instrumentation-utils.js +58 -58
- package/tsOutputs/build-scanner/instrumentation/instrumented-file-size-reducer.js +159 -159
- package/tsOutputs/build-scanner/instrumentation/markup-file-instrumenter.js +187 -185
- package/tsOutputs/build-scanner/instrumentation/markup-file-instrumenter.js.map +1 -1
- package/tsOutputs/build-scanner/instrumentation/sync-instrumenter.js +39 -39
- package/tsOutputs/build-scanner/js_diff/ast-node-types.js +44 -44
- package/tsOutputs/build-scanner/js_diff/branch-key.js +10 -10
- package/tsOutputs/build-scanner/js_diff/branch-signature.js +156 -156
- package/tsOutputs/build-scanner/js_diff/create-node-key.js +7 -7
- package/tsOutputs/build-scanner/js_diff/dry-run-files-mapping.js +23 -23
- package/tsOutputs/build-scanner/js_diff/file-signature.js +234 -234
- package/tsOutputs/build-scanner/js_diff/files-mapping.js +456 -460
- package/tsOutputs/build-scanner/js_diff/files-mapping.js.map +1 -1
- package/tsOutputs/build-scanner/js_diff/generated-file-signature.js +143 -143
- package/tsOutputs/build-scanner/js_diff/globalMethodIndexer.js +26 -26
- package/tsOutputs/build-scanner/js_diff/guess-method-location.js +100 -100
- package/tsOutputs/build-scanner/js_diff/guess-method-name.js +54 -54
- package/tsOutputs/build-scanner/js_diff/method-signature.js +142 -142
- package/tsOutputs/build-scanner/js_diff/sl-mapper.js +136 -136
- package/tsOutputs/build-scanner/js_diff/source-data-enricher.js +89 -89
- package/tsOutputs/build-scanner/js_diff/source-files-notifier.js +31 -31
- package/tsOutputs/build-scanner/js_diff/source-position-mapper.js +29 -29
- package/tsOutputs/build-scanner/mappings/ensure-files-handler.service.js +213 -213
- package/tsOutputs/build-scanner/mappings/ensure-files-handler.service.js.map +1 -1
- package/tsOutputs/build-scanner/mappings/file-element-utils.js +46 -46
- package/tsOutputs/build-scanner/mappings/file-element-utils.js.map +1 -1
- package/tsOutputs/build-scanner/mappings/file-enricher.js +209 -204
- package/tsOutputs/build-scanner/mappings/file-enricher.js.map +1 -1
- package/tsOutputs/build-scanner/mappings/files-data-container.js +51 -51
- package/tsOutputs/build-scanner/mappings/files-data-container.js.map +1 -1
- package/tsOutputs/build-scanner/mappings/scm-file-fixer.js +79 -77
- package/tsOutputs/build-scanner/mappings/scm-file-fixer.js.map +1 -1
- package/tsOutputs/build-scanner/markup-files-parser.js +71 -71
- package/tsOutputs/build-scanner/nopt-types.js +19 -19
- package/tsOutputs/build-scanner/nopt-usage-2.js +56 -56
- package/tsOutputs/build-scanner/polyfills.js +6 -6
- package/tsOutputs/build-scanner/scm/parse-log.js +5 -5
- package/tsOutputs/build-scanner/scm/scm-files-container.js +49 -49
- package/tsOutputs/build-scanner/sl-config-cia-cli.js +175 -175
- package/tsOutputs/build-scanner/utils.js +91 -91
- package/tsOutputs/cli-parse/agent-instance-data.d.ts +2 -2
- package/tsOutputs/cli-parse/agent-instance-data.js +6 -6
- package/tsOutputs/cli-parse/child-process-wrapper.js +82 -82
- package/tsOutputs/cli-parse/child-process-wrapper.js.map +1 -1
- package/tsOutputs/cli-parse/cli.js +509 -509
- package/tsOutputs/cli-parse/constants/constants.js +56 -55
- package/tsOutputs/cli-parse/constants/constants.js.map +1 -1
- package/tsOutputs/cli-parse/constants/third-parties.js +10 -10
- package/tsOutputs/cli-parse/contracts.js +2 -2
- package/tsOutputs/cli-parse/custom-commander.js +44 -44
- package/tsOutputs/cli-parse/executors/base-executor.js +254 -263
- package/tsOutputs/cli-parse/executors/base-executor.js.map +1 -1
- package/tsOutputs/cli-parse/executors/build-args-dto.js +55 -55
- package/tsOutputs/cli-parse/executors/build-end-executor.js +117 -115
- package/tsOutputs/cli-parse/executors/build-end-executor.js.map +1 -1
- package/tsOutputs/cli-parse/executors/build-executor.js +149 -147
- package/tsOutputs/cli-parse/executors/build-executor.js.map +1 -1
- package/tsOutputs/cli-parse/executors/config-executor.js +114 -112
- package/tsOutputs/cli-parse/executors/config-executor.js.map +1 -1
- package/tsOutputs/cli-parse/executors/dry-run/base-data.js +55 -55
- package/tsOutputs/cli-parse/executors/dry-run/base-data.js.map +1 -1
- package/tsOutputs/cli-parse/executors/dry-run/build-mapping-data.js +230 -228
- 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 +279 -277
- 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 +122 -120
- package/tsOutputs/cli-parse/executors/dry-run/dry-run-validation.js.map +1 -1
- package/tsOutputs/cli-parse/executors/dry-run/footprints-data.js +132 -130
- package/tsOutputs/cli-parse/executors/dry-run/footprints-data.js.map +1 -1
- package/tsOutputs/cli-parse/executors/dry-run/helper-methods.js +104 -104
- package/tsOutputs/cli-parse/executors/dry-run/helper-methods.js.map +1 -1
- package/tsOutputs/cli-parse/executors/end-execution-executor.js +90 -88
- package/tsOutputs/cli-parse/executors/end-execution-executor.js.map +1 -1
- package/tsOutputs/cli-parse/executors/integration-build-components-executor.js +134 -132
- package/tsOutputs/cli-parse/executors/integration-build-components-executor.js.map +1 -1
- package/tsOutputs/cli-parse/executors/integration-build-delete-components-executor.js +75 -73
- 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 +73 -71
- package/tsOutputs/cli-parse/executors/integration-build-update-components-executor.js.map +1 -1
- package/tsOutputs/cli-parse/executors/mocha-executor.js +124 -122
- package/tsOutputs/cli-parse/executors/mocha-executor.js.map +1 -1
- package/tsOutputs/cli-parse/executors/nyc-report-executor.js +106 -104
- package/tsOutputs/cli-parse/executors/nyc-report-executor.js.map +1 -1
- package/tsOutputs/cli-parse/executors/pr-config-executor.js +85 -83
- package/tsOutputs/cli-parse/executors/pr-config-executor.js.map +1 -1
- package/tsOutputs/cli-parse/executors/run-executor.js +95 -93
- package/tsOutputs/cli-parse/executors/run-executor.js.map +1 -1
- package/tsOutputs/cli-parse/executors/start-execution-executor.js +93 -91
- package/tsOutputs/cli-parse/executors/start-execution-executor.js.map +1 -1
- package/tsOutputs/cli-parse/executors/test-executions-executor.js +77 -75
- package/tsOutputs/cli-parse/executors/test-executions-executor.js.map +1 -1
- package/tsOutputs/cli-parse/executors/test-listener-executor.js +151 -149
- package/tsOutputs/cli-parse/executors/test-listener-executor.js.map +1 -1
- package/tsOutputs/cli-parse/executors/test-runner-build-session-data-builder.js +77 -75
- package/tsOutputs/cli-parse/executors/test-runner-build-session-data-builder.js.map +1 -1
- package/tsOutputs/cli-parse/executors/upload-report-executor.js +118 -116
- package/tsOutputs/cli-parse/executors/upload-report-executor.js.map +1 -1
- package/tsOutputs/cli-parse/utils.js +32 -32
- package/tsOutputs/cli-parse/utils.js.map +1 -1
- package/tsOutputs/common/agent-events/agent-events-conracts.d.ts +123 -123
- package/tsOutputs/common/agent-events/agent-events-conracts.js +56 -56
- package/tsOutputs/common/agent-events/agent-events-controller.d.ts +45 -45
- package/tsOutputs/common/agent-events/agent-events-controller.js +301 -301
- package/tsOutputs/common/agent-events/agent-events-controller.js.map +1 -1
- package/tsOutputs/common/agent-events/agent-instance-info-builder.d.ts +22 -22
- package/tsOutputs/common/agent-events/agent-instance-info-builder.js +63 -63
- package/tsOutputs/common/agent-events/agent-instance-info-builder.js.map +1 -1
- package/tsOutputs/common/agent-events/agent-start-info-builder.d.ts +14 -14
- package/tsOutputs/common/agent-events/agent-start-info-builder.js +23 -23
- package/tsOutputs/common/agent-events/ci-info-builder.d.ts +7 -7
- package/tsOutputs/common/agent-events/ci-info-builder.js +30 -30
- package/tsOutputs/common/agent-events/cockpit-notifier.d.ts +26 -26
- package/tsOutputs/common/agent-events/cockpit-notifier.js +119 -119
- package/tsOutputs/common/agent-events/dry-run-agent-events-controller.d.ts +7 -7
- package/tsOutputs/common/agent-events/dry-run-agent-events-controller.js +33 -31
- package/tsOutputs/common/agent-events/dry-run-agent-events-controller.js.map +1 -1
- package/tsOutputs/common/agent-events/machine-info-builder.d.ts +7 -7
- package/tsOutputs/common/agent-events/machine-info-builder.js +35 -35
- package/tsOutputs/common/agent-events/machine-info-builder.js.map +1 -1
- package/tsOutputs/common/agent-events/nodejs-env-info-builder.d.ts +8 -8
- package/tsOutputs/common/agent-events/nodejs-env-info-builder.js +19 -19
- package/tsOutputs/common/agent-events/sensitive-data-filter.d.ts +2 -2
- package/tsOutputs/common/agent-events/sensitive-data-filter.js +54 -54
- package/tsOutputs/common/agent-instance-data.d.ts +10 -10
- package/tsOutputs/common/agent-instance-data.js +39 -39
- package/tsOutputs/common/agent-instance-data.js.map +1 -1
- package/tsOutputs/common/config-process/config-loader.d.ts +8 -8
- package/tsOutputs/common/config-process/config-loader.js +86 -86
- package/tsOutputs/common/config-process/config-system.d.ts +88 -88
- package/tsOutputs/common/config-process/config-system.js +293 -293
- package/tsOutputs/common/config-process/config.d.ts +60 -60
- package/tsOutputs/common/config-process/config.js +92 -90
- package/tsOutputs/common/config-process/config.js.map +1 -1
- package/tsOutputs/common/config-process/index.d.ts +21 -21
- package/tsOutputs/common/config-process/index.js +127 -125
- package/tsOutputs/common/config-process/index.js.map +1 -1
- package/tsOutputs/common/constants/constants.d.ts +18 -18
- package/tsOutputs/common/constants/constants.js +29 -29
- package/tsOutputs/common/constants/sl-env-vars.d.ts +52 -52
- package/tsOutputs/common/constants/sl-env-vars.js +122 -122
- package/tsOutputs/common/contracts.d.ts +123 -123
- package/tsOutputs/common/contracts.js +2 -2
- package/tsOutputs/common/coverage-elements/contracts.d.ts +25 -25
- package/tsOutputs/common/coverage-elements/contracts.js +8 -8
- package/tsOutputs/common/coverage-elements/file-element.d.ts +35 -35
- package/tsOutputs/common/coverage-elements/file-element.js +158 -158
- package/tsOutputs/common/coverage-elements/istanbul-unique-id-converter.d.ts +12 -12
- package/tsOutputs/common/coverage-elements/istanbul-unique-id-converter.js +97 -95
- package/tsOutputs/common/coverage-elements/istanbul-unique-id-converter.js.map +1 -1
- package/tsOutputs/common/coverage-elements/new-id-resolver.d.ts +3 -3
- package/tsOutputs/common/coverage-elements/new-id-resolver.js +45 -45
- package/tsOutputs/common/coverage-elements/new-id-resolver.js.map +1 -1
- package/tsOutputs/common/coverage-elements/original-module-loader.d.ts +41 -41
- package/tsOutputs/common/coverage-elements/original-module-loader.js +189 -189
- package/tsOutputs/common/coverage-elements/unique-id-converter.d.ts +32 -32
- package/tsOutputs/common/coverage-elements/unique-id-converter.js +234 -234
- package/tsOutputs/common/environment-data-service.d.ts +15 -15
- package/tsOutputs/common/environment-data-service.js +60 -60
- package/tsOutputs/common/events-process/events-contracts.d.ts +52 -52
- package/tsOutputs/common/events-process/events-contracts.js +19 -19
- package/tsOutputs/common/events-process/events-creator.js +40 -42
- package/tsOutputs/common/events-process/events-creator.js.map +1 -1
- package/tsOutputs/common/events-process/index.d.ts +42 -42
- package/tsOutputs/common/events-process/index.js +266 -265
- package/tsOutputs/common/events-process/index.js.map +1 -1
- package/tsOutputs/common/footprints-process/collection-interval.d.ts +10 -10
- package/tsOutputs/common/footprints-process/collection-interval.js +27 -27
- package/tsOutputs/common/footprints-process/collection-interval.js.map +1 -1
- package/tsOutputs/common/footprints-process/footprints-service-proxy.d.ts +12 -12
- package/tsOutputs/common/footprints-process/footprints-service-proxy.js +51 -51
- package/tsOutputs/common/footprints-process/index.d.ts +71 -71
- package/tsOutputs/common/footprints-process/index.js +264 -264
- package/tsOutputs/common/footprints-process/index.js.map +1 -1
- package/tsOutputs/common/footprints-process/istanbul-to-footprints-contract.d.ts +98 -98
- package/tsOutputs/common/footprints-process/istanbul-to-footprints-contract.js +9 -9
- package/tsOutputs/common/footprints-process/istanbul-to-footprints.d.ts +47 -47
- package/tsOutputs/common/footprints-process/istanbul-to-footprints.js +421 -421
- package/tsOutputs/common/footprints-process/istanbul-to-footprints.js.map +1 -1
- package/tsOutputs/common/footprints-process/production-footprints-handler.d.ts +54 -54
- package/tsOutputs/common/footprints-process/production-footprints-handler.js +308 -308
- package/tsOutputs/common/footprints-process/production-footprints-handler.js.map +1 -1
- package/tsOutputs/common/footprints-process-v6/base-browser-hits-converter.d.ts +20 -20
- package/tsOutputs/common/footprints-process-v6/base-browser-hits-converter.js +65 -63
- package/tsOutputs/common/footprints-process-v6/base-browser-hits-converter.js.map +1 -1
- package/tsOutputs/common/footprints-process-v6/buffer-size-helper.d.ts +15 -15
- package/tsOutputs/common/footprints-process-v6/buffer-size-helper.js +40 -40
- package/tsOutputs/common/footprints-process-v6/contracts.d.ts +181 -184
- package/tsOutputs/common/footprints-process-v6/contracts.js +9 -9
- package/tsOutputs/common/footprints-process-v6/footprints-buffer.d.ts +34 -36
- package/tsOutputs/common/footprints-process-v6/footprints-buffer.js +135 -147
- package/tsOutputs/common/footprints-process-v6/footprints-buffer.js.map +1 -1
- package/tsOutputs/common/footprints-process-v6/hits-collector.d.ts +24 -24
- package/tsOutputs/common/footprints-process-v6/hits-collector.js +168 -168
- package/tsOutputs/common/footprints-process-v6/hits-converter.d.ts +28 -30
- package/tsOutputs/common/footprints-process-v6/hits-converter.js +114 -135
- package/tsOutputs/common/footprints-process-v6/hits-converter.js.map +1 -1
- package/tsOutputs/common/footprints-process-v6/index.d.ts +40 -41
- package/tsOutputs/common/footprints-process-v6/index.js +258 -304
- package/tsOutputs/common/footprints-process-v6/index.js.map +1 -1
- package/tsOutputs/common/footprints-process-v6/location-formatter.d.ts +6 -6
- package/tsOutputs/common/footprints-process-v6/location-formatter.js +25 -25
- package/tsOutputs/common/footprints-process-v6/relative-path-resolver.d.ts +8 -8
- package/tsOutputs/common/footprints-process-v6/relative-path-resolver.js +28 -28
- package/tsOutputs/common/footprints-process-v6/remote-browser-hits-converter.d.ts +9 -9
- package/tsOutputs/common/footprints-process-v6/remote-browser-hits-converter.js +40 -38
- package/tsOutputs/common/footprints-process-v6/remote-browser-hits-converter.js.map +1 -1
- package/tsOutputs/common/footprints-process-v6/remote-footprints-process.d.ts +8 -8
- package/tsOutputs/common/footprints-process-v6/remote-footprints-process.js +34 -32
- package/tsOutputs/common/footprints-process-v6/remote-footprints-process.js.map +1 -1
- package/tsOutputs/common/footprints-process-v6/remote-hits-collector.d.ts +14 -14
- package/tsOutputs/common/footprints-process-v6/remote-hits-collector.js +41 -39
- package/tsOutputs/common/footprints-process-v6/remote-hits-collector.js.map +1 -1
- package/tsOutputs/common/footprints-process-v6/source-map-data.d.ts +9 -9
- package/tsOutputs/common/footprints-process-v6/source-map-data.js +32 -32
- package/tsOutputs/common/footprints-process-v6/source-map-data.js.map +1 -1
- package/tsOutputs/common/http/backend-proxy-interface.d.ts +33 -33
- package/tsOutputs/common/http/backend-proxy-interface.js +2 -2
- package/tsOutputs/common/http/backend-proxy.d.ts +54 -54
- package/tsOutputs/common/http/backend-proxy.js +408 -408
- package/tsOutputs/common/http/contracts.d.ts +280 -280
- package/tsOutputs/common/http/contracts.js +158 -156
- package/tsOutputs/common/http/contracts.js.map +1 -1
- package/tsOutputs/common/http/dry-run-proxy.js +106 -106
- package/tsOutputs/common/http/entities-mapper.d.ts +4 -4
- package/tsOutputs/common/http/entities-mapper.js +17 -17
- package/tsOutputs/common/http/http-client.d.ts +21 -21
- package/tsOutputs/common/http/http-client.js +191 -195
- package/tsOutputs/common/http/http-client.js.map +1 -1
- package/tsOutputs/common/http/http-verb.d.ts +6 -6
- package/tsOutputs/common/http/http-verb.js +10 -10
- package/tsOutputs/common/http/sl-routes.d.ts +70 -70
- package/tsOutputs/common/http/sl-routes.js +218 -218
- package/tsOutputs/common/ignored-files-handler.js +122 -122
- package/tsOutputs/common/ignored-files-handler.js.map +1 -1
- package/tsOutputs/common/logger.d.ts +40 -40
- package/tsOutputs/common/logger.js +190 -188
- package/tsOutputs/common/logger.js.map +1 -1
- package/tsOutputs/common/messages-formatter.d.ts +6 -6
- package/tsOutputs/common/messages-formatter.js +21 -21
- package/tsOutputs/common/queue.d.ts +19 -19
- package/tsOutputs/common/queue.js +57 -55
- package/tsOutputs/common/queue.js.map +1 -1
- package/tsOutputs/common/scm/contracts.js +2 -2
- package/tsOutputs/common/scm/git-cloner.js +137 -137
- package/tsOutputs/common/scm/git-cloner.js.map +1 -1
- package/tsOutputs/common/scm/git-format-builder.js +72 -72
- package/tsOutputs/common/scm/git.js +411 -411
- package/tsOutputs/common/scm/git.js.map +1 -1
- package/tsOutputs/common/scm/none.js +115 -115
- package/tsOutputs/common/scm/scm-factory.js +21 -21
- package/tsOutputs/common/short-name-to-file-mapper.js +79 -79
- package/tsOutputs/common/source-map-handler.d.ts +58 -58
- package/tsOutputs/common/source-map-handler.js +197 -197
- package/tsOutputs/common/source-map-reader.js +84 -84
- package/tsOutputs/common/source-maps-utils.d.ts +3 -3
- package/tsOutputs/common/source-maps-utils.js +39 -39
- package/tsOutputs/common/state-tracker-fpv6.d.ts +6 -6
- package/tsOutputs/common/state-tracker-fpv6.js +44 -42
- package/tsOutputs/common/state-tracker-fpv6.js.map +1 -1
- package/tsOutputs/common/state-tracker.d.ts +49 -49
- package/tsOutputs/common/state-tracker.js +301 -299
- package/tsOutputs/common/state-tracker.js.map +1 -1
- package/tsOutputs/common/system-date.d.ts +2 -2
- package/tsOutputs/common/system-date.js +21 -21
- package/tsOutputs/common/utils/abstract-data-builder.d.ts +10 -10
- package/tsOutputs/common/utils/abstract-data-builder.js +24 -24
- package/tsOutputs/common/utils/abstract-data-builder.js.map +1 -1
- package/tsOutputs/common/utils/build-session-data-builder.d.ts +18 -18
- package/tsOutputs/common/utils/build-session-data-builder.js +137 -135
- package/tsOutputs/common/utils/build-session-data-builder.js.map +1 -1
- package/tsOutputs/common/utils/dependency-utils.js +69 -69
- package/tsOutputs/common/utils/files-utils.d.ts +6 -6
- package/tsOutputs/common/utils/files-utils.js +45 -45
- package/tsOutputs/common/utils/parsing-utils.d.ts +4 -4
- package/tsOutputs/common/utils/parsing-utils.js +29 -29
- package/tsOutputs/common/utils/test-utils/mock-server-utils/contracts.js +10 -10
- package/tsOutputs/common/utils/test-utils/mock-server-utils/mock-server-proxy.js +248 -248
- package/tsOutputs/common/utils/timer-utils.d.ts +3 -3
- package/tsOutputs/common/utils/timer-utils.js +12 -12
- package/tsOutputs/common/utils/token-data-builder.d.ts +21 -21
- package/tsOutputs/common/utils/token-data-builder.js +97 -95
- package/tsOutputs/common/utils/token-data-builder.js.map +1 -1
- package/tsOutputs/common/utils/validation-utils.d.ts +3 -3
- package/tsOutputs/common/utils/validation-utils.js +18 -18
- package/tsOutputs/common/uuid.js +23 -23
- package/tsOutputs/common/watchdog.d.ts +96 -96
- package/tsOutputs/common/watchdog.js +151 -149
- package/tsOutputs/common/watchdog.js.map +1 -1
- package/tsOutputs/mocha-reporter/constants.js +27 -27
- package/tsOutputs/mocha-reporter/end-execution.js +22 -22
- package/tsOutputs/mocha-reporter/index.js +323 -323
- package/tsOutputs/test-listener/IConsoleLogger.js +5 -5
- package/tsOutputs/test-listener/SlNodeJsProxy.js +96 -96
- package/tsOutputs/test-listener/UserMessageHelper.js +47 -47
- package/tsOutputs/test-listener/agent-loader.js +58 -58
- package/tsOutputs/test-listener/agent.d.ts +53 -53
- package/tsOutputs/test-listener/agent.js +273 -273
- package/tsOutputs/test-listener/agent.js.map +1 -1
- package/tsOutputs/test-listener/api.js +157 -157
- package/tsOutputs/test-listener/base-proxy.d.ts +15 -15
- package/tsOutputs/test-listener/base-proxy.js +133 -133
- package/tsOutputs/test-listener/bootstrap.js +16 -16
- package/tsOutputs/test-listener/child-process-patcher.js +136 -136
- package/tsOutputs/test-listener/child-process-patcher.js.map +1 -1
- package/tsOutputs/test-listener/cli.js +64 -64
- package/tsOutputs/test-listener/coloring/http-coloring.d.ts +15 -15
- package/tsOutputs/test-listener/coloring/http-coloring.js +188 -188
- package/tsOutputs/test-listener/coloring/icoloring-provider.d.ts +10 -10
- package/tsOutputs/test-listener/coloring/icoloring-provider.js +2 -2
- package/tsOutputs/test-listener/coloring/listening-port.d.ts +20 -20
- package/tsOutputs/test-listener/coloring/listening-port.js +48 -48
- package/tsOutputs/test-listener/command-line-arg-parser.js +91 -91
- package/tsOutputs/test-listener/config-process/config-loader.js +104 -104
- package/tsOutputs/test-listener/config-process/config-system.d.ts +88 -88
- package/tsOutputs/test-listener/config-process/config-system.js +285 -285
- package/tsOutputs/test-listener/config-process/index.js +128 -126
- package/tsOutputs/test-listener/config-process/index.js.map +1 -1
- package/tsOutputs/test-listener/config.d.ts +50 -50
- package/tsOutputs/test-listener/config.js +82 -80
- package/tsOutputs/test-listener/config.js.map +1 -1
- package/tsOutputs/test-listener/contracts.d.ts +72 -72
- package/tsOutputs/test-listener/contracts.js +2 -2
- package/tsOutputs/test-listener/entities/BasicConfigurationData.js +72 -72
- package/tsOutputs/test-listener/entities/build-scanner/ConfigModeData.js +50 -48
- package/tsOutputs/test-listener/entities/build-scanner/ConfigModeData.js.map +1 -1
- package/tsOutputs/test-listener/entities/build-scanner/ScanModeData.js +53 -51
- package/tsOutputs/test-listener/entities/build-scanner/ScanModeData.js.map +1 -1
- package/tsOutputs/test-listener/environment-data-service.d.ts +11 -11
- package/tsOutputs/test-listener/environment-data-service.js +60 -60
- package/tsOutputs/test-listener/execution-process/contracts.js +5 -5
- package/tsOutputs/test-listener/execution-process/entities-mapper.js +49 -49
- package/tsOutputs/test-listener/execution-process/execution-service-proxy.js +207 -205
- package/tsOutputs/test-listener/execution-process/execution-service-proxy.js.map +1 -1
- package/tsOutputs/test-listener/execution-process/index.js +163 -163
- package/tsOutputs/test-listener/factory.d.ts +87 -87
- package/tsOutputs/test-listener/factory.js +285 -285
- package/tsOutputs/test-listener/footprints-process/footprints-service-proxy.js +52 -50
- package/tsOutputs/test-listener/footprints-process/footprints-service-proxy.js.map +1 -1
- package/tsOutputs/test-listener/footprints-process/index.js +230 -230
- package/tsOutputs/test-listener/footprints-process/index.js.map +1 -1
- package/tsOutputs/test-listener/footprints-process/istanbul-to-footprints-base.js +130 -130
- package/tsOutputs/test-listener/footprints-process/istanbul-to-footprints-contract.js +2 -2
- package/tsOutputs/test-listener/footprints-process/istanbul-to-footprints-v3.js +290 -288
- package/tsOutputs/test-listener/footprints-process/istanbul-to-footprints-v3.js.map +1 -1
- package/tsOutputs/test-listener/integrations/SlGulp.js +104 -104
- package/tsOutputs/test-listener/logs-process/index.d.ts +48 -48
- package/tsOutputs/test-listener/logs-process/index.js +142 -142
- package/tsOutputs/test-listener/logs-process/index.js.map +1 -1
- package/tsOutputs/test-listener/logs-process/log-service-proxy.d.ts +9 -9
- package/tsOutputs/test-listener/logs-process/log-service-proxy.js +31 -29
- package/tsOutputs/test-listener/logs-process/log-service-proxy.js.map +1 -1
- package/tsOutputs/test-listener/nyc-report-executor-fpv6.js +143 -143
- package/tsOutputs/test-listener/nyc-report-executor-fpv6.js.map +1 -1
- package/tsOutputs/test-listener/nyc-report-executor.js +144 -144
- package/tsOutputs/test-listener/nyc-report-executor.js.map +1 -1
- package/tsOutputs/test-listener/queue.js +57 -55
- package/tsOutputs/test-listener/queue.js.map +1 -1
- package/tsOutputs/test-listener/remote-agent.d.ts +42 -42
- package/tsOutputs/test-listener/remote-agent.js +200 -200
- package/tsOutputs/test-listener/remote-agent.js.map +1 -1
- package/tsOutputs/test-listener/resolvers/AppNameResolver.js +34 -32
- package/tsOutputs/test-listener/resolvers/AppNameResolver.js.map +1 -1
- package/tsOutputs/test-listener/resolvers/ArgumentResolver.js +64 -64
- package/tsOutputs/test-listener/resolvers/ArgumentResolver.js.map +1 -1
- package/tsOutputs/test-listener/resolvers/BuildResolver.js +33 -31
- package/tsOutputs/test-listener/resolvers/BuildResolver.js.map +1 -1
- package/tsOutputs/test-listener/resolvers/BuildSessionIdFileResolver.js +33 -31
- package/tsOutputs/test-listener/resolvers/BuildSessionIdFileResolver.js.map +1 -1
- package/tsOutputs/test-listener/resolvers/BuildSessionIdResolver.js +36 -34
- package/tsOutputs/test-listener/resolvers/BuildSessionIdResolver.js.map +1 -1
- package/tsOutputs/test-listener/resolvers/ProxyResolver.js +33 -31
- package/tsOutputs/test-listener/resolvers/ProxyResolver.js.map +1 -1
- package/tsOutputs/test-listener/resolvers/TokenResolver.js +33 -31
- package/tsOutputs/test-listener/resolvers/TokenResolver.js.map +1 -1
- package/tsOutputs/test-listener/state-tracker-process/index.js +162 -160
- package/tsOutputs/test-listener/state-tracker-process/index.js.map +1 -1
- package/tsOutputs/test-listener/state-tracker-process/state-tracker-proxy.d.ts +8 -8
- package/tsOutputs/test-listener/state-tracker-process/state-tracker-proxy.js +71 -69
- package/tsOutputs/test-listener/state-tracker-process/state-tracker-proxy.js.map +1 -1
- package/tsOutputs/test-listener/test-recommendation-handler.d.ts +29 -29
- package/tsOutputs/test-listener/test-recommendation-handler.js +161 -161
- package/tsOutputs/test-listener/upload-report-handler.js +96 -96
- package/tsOutputs/test-listener/utils.js +68 -68
- package/tsOutputs/test-listener/uuid.d.ts +3 -3
- package/tsOutputs/test-listener/uuid.js +23 -23
- package/tsOutputs/test-listener/wait-for-multiple-callbacks.d.ts +22 -22
- package/tsOutputs/test-listener/wait-for-multiple-callbacks.js +60 -60
- package/tsOutputs/test-listener/watchdog.d.ts +89 -89
- package/tsOutputs/test-listener/watchdog.js +146 -144
- package/tsOutputs/test-listener/watchdog.js.map +1 -1
- package/tsOutputs/build-scanner/complexity-metrics/complexity-metrics.js +0 -1
- package/tsOutputs/build-scanner/complexity-metrics/complexity-metrics.js.map +0 -1
- package/tsOutputs/build-scanner/js_diff/code-metrics-spec.js +0 -1
- package/tsOutputs/build-scanner/js_diff/code-metrics-spec.js.map +0 -1
- package/tsOutputs/build-scanner/js_diff/code-metrics.js +0 -1
- package/tsOutputs/build-scanner/js_diff/code-metrics.js.map +0 -1
- package/tsOutputs/build-scanner/mappings/contracts.js +0 -3
- package/tsOutputs/build-scanner/mappings/contracts.js.map +0 -1
|
@@ -1,274 +1,274 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
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 (_) 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
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
-
exports.NodeJsAgent = void 0;
|
|
40
|
-
var uuid_1 = require("./uuid");
|
|
41
|
-
var wait_for_multiple_callbacks_1 = require("./wait-for-multiple-callbacks");
|
|
42
|
-
var readline_1 = require("readline");
|
|
43
|
-
var state_tracker_1 = require("../common/state-tracker");
|
|
44
|
-
var cockpit_notifier_1 = require("../common/agent-events/cockpit-notifier");
|
|
45
|
-
var events_contracts_1 = require("../common/events-process/events-contracts");
|
|
46
|
-
var system_date_1 = require("../common/system-date");
|
|
47
|
-
var version = process.env.npm_package_version;
|
|
48
|
-
var NodeJsAgent = /** @class */ (function () {
|
|
49
|
-
function NodeJsAgent(_cfg, footprintsProcess, eventsProcess, logsProcess, stateTracker, configProcess, flushCurrentTestFootprints, coloringProviders, _testRecommendationHandler, agentInstanceData, logger) {
|
|
50
|
-
var _this = this;
|
|
51
|
-
this._cfg = _cfg;
|
|
52
|
-
this.footprintsProcess = footprintsProcess;
|
|
53
|
-
this.eventsProcess = eventsProcess;
|
|
54
|
-
this.logsProcess = logsProcess;
|
|
55
|
-
this.stateTracker = stateTracker;
|
|
56
|
-
this.configProcess = configProcess;
|
|
57
|
-
this.flushCurrentTestFootprints = flushCurrentTestFootprints;
|
|
58
|
-
this.coloringProviders = coloringProviders;
|
|
59
|
-
this._testRecommendationHandler = _testRecommendationHandler;
|
|
60
|
-
this.agentInstanceData = agentInstanceData;
|
|
61
|
-
this.logger = logger;
|
|
62
|
-
this.isRunning = false;
|
|
63
|
-
this.isStopping = false;
|
|
64
|
-
if (!_cfg)
|
|
65
|
-
throw new Error('cfg is required');
|
|
66
|
-
if (!footprintsProcess)
|
|
67
|
-
throw new Error('footprintsProcess is required');
|
|
68
|
-
if (!eventsProcess)
|
|
69
|
-
throw new Error('eventsProcess is required');
|
|
70
|
-
if (!logsProcess)
|
|
71
|
-
throw new Error('logsProcess is required');
|
|
72
|
-
if (!stateTracker)
|
|
73
|
-
throw new Error('stateTracker is required');
|
|
74
|
-
if (!configProcess)
|
|
75
|
-
throw new Error('configProcess is required');
|
|
76
|
-
if (!flushCurrentTestFootprints)
|
|
77
|
-
throw new Error('flushCurrentTestFootprints is required');
|
|
78
|
-
if (!coloringProviders)
|
|
79
|
-
throw new Error('coloringProviders is required');
|
|
80
|
-
if (!_testRecommendationHandler)
|
|
81
|
-
throw new Error('testRecommendationHandler is required');
|
|
82
|
-
if (!logger)
|
|
83
|
-
throw new Error('logger is required');
|
|
84
|
-
stateTracker.on('test_identifier_changed', this.footprintsProcess.handleTestIdChanged.bind(this.footprintsProcess));
|
|
85
|
-
configProcess.on('configuration_changed', function (updatedCfg) {
|
|
86
|
-
if (updatedCfg.enabled.value === false) {
|
|
87
|
-
_this.stop(function () { });
|
|
88
|
-
}
|
|
89
|
-
_this.flushCurrentTestFootprints.setInterval(updatedCfg.footprintsCollectIntervalSecs.value);
|
|
90
|
-
});
|
|
91
|
-
flushCurrentTestFootprints.on('alarm', function () {
|
|
92
|
-
_this.footprintsProcess.flushCurrentFootprints();
|
|
93
|
-
});
|
|
94
|
-
}
|
|
95
|
-
NodeJsAgent.prototype.getLogger = function (component) {
|
|
96
|
-
return this.logger.child({ component: component });
|
|
97
|
-
};
|
|
98
|
-
Object.defineProperty(NodeJsAgent.prototype, "testRecommendationHandler", {
|
|
99
|
-
get: function () {
|
|
100
|
-
return this._testRecommendationHandler;
|
|
101
|
-
},
|
|
102
|
-
enumerable: false,
|
|
103
|
-
configurable: true
|
|
104
|
-
});
|
|
105
|
-
/**
|
|
106
|
-
* Starts the Test Listener
|
|
107
|
-
*
|
|
108
|
-
* @param {(err: Error) => void} [callback] Optional callback that will be called if agent is either disabled, or finished loading (incl. remote config)
|
|
109
|
-
* @returns
|
|
110
|
-
*
|
|
111
|
-
* @memberOf NodeJsAgent
|
|
112
|
-
*/
|
|
113
|
-
NodeJsAgent.prototype.start = function (callback, toolInfo) {
|
|
114
|
-
var _this = this;
|
|
115
|
-
this.logger.info('Agent is starting. process.argv: \'' + process.argv.join(' ') + '\'');
|
|
116
|
-
if (this._cfg.enabled.value === false) {
|
|
117
|
-
this.logger.warn('Agent is disabled');
|
|
118
|
-
if (callback) {
|
|
119
|
-
return callback(null);
|
|
120
|
-
}
|
|
121
|
-
return;
|
|
122
|
-
}
|
|
123
|
-
if (!this._cfg.token.hasValue) {
|
|
124
|
-
this.logger.warn('Agent is disabled since token was not specified');
|
|
125
|
-
if (callback) {
|
|
126
|
-
return callback(null);
|
|
127
|
-
}
|
|
128
|
-
return;
|
|
129
|
-
}
|
|
130
|
-
if (this.isRunning) {
|
|
131
|
-
this.logger.warn('Agent is already running');
|
|
132
|
-
if (callback) {
|
|
133
|
-
return callback(null);
|
|
134
|
-
}
|
|
135
|
-
return;
|
|
136
|
-
}
|
|
137
|
-
cockpit_notifier_1.CockpitNotifier.notifyStart(this._cfg, this.agentInstanceData, this.logger, {}, null, toolInfo);
|
|
138
|
-
this.flushCurrentTestFootprints.start();
|
|
139
|
-
this.footprintsProcess.start();
|
|
140
|
-
this.eventsProcess.start();
|
|
141
|
-
this.logsProcess.start();
|
|
142
|
-
this.stateTracker.start();
|
|
143
|
-
this.configProcess.start(function (err) {
|
|
144
|
-
if (callback) {
|
|
145
|
-
return callback(null);
|
|
146
|
-
} //Even if configuration failed to be loaded from the server, don't shut down the agent
|
|
147
|
-
});
|
|
148
|
-
this.coloringProviders.forEach(function (provider) {
|
|
149
|
-
provider.setup(_this._cfg, _this.stateTracker, _this.logger);
|
|
150
|
-
});
|
|
151
|
-
this.registerGlobalAPI();
|
|
152
|
-
this.registerShutdownEvents();
|
|
153
|
-
this.isRunning = true;
|
|
154
|
-
this.eventsProcess.enqueueEvent({
|
|
155
|
-
type: events_contracts_1.EventTypes.AgentStarted,
|
|
156
|
-
localTime: system_date_1.getSystemDateValueOf()
|
|
157
|
-
});
|
|
158
|
-
this.logger.info('Agent is now running');
|
|
159
|
-
};
|
|
160
|
-
NodeJsAgent.prototype.stop = function (callback) {
|
|
161
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
162
|
-
var waiter;
|
|
163
|
-
return __generator(this, function (_a) {
|
|
164
|
-
switch (_a.label) {
|
|
165
|
-
case 0:
|
|
166
|
-
if (!this.isRunning) {
|
|
167
|
-
return [2 /*return*/, callback()];
|
|
168
|
-
}
|
|
169
|
-
if (this.isStopping) {
|
|
170
|
-
this.logger.error('Already stopping %s', new Error());
|
|
171
|
-
}
|
|
172
|
-
this.isStopping = true;
|
|
173
|
-
this.logger.info('Agent is now stopping');
|
|
174
|
-
this.stateTracker.setTestIdentifier(null);
|
|
175
|
-
waiter = new wait_for_multiple_callbacks_1.WaitForMultipleCallbacks();
|
|
176
|
-
return [4 /*yield*/, cockpit_notifier_1.CockpitNotifier.notifyShutdown()];
|
|
177
|
-
case 1:
|
|
178
|
-
_a.sent();
|
|
179
|
-
return [4 /*yield*/, this.eventsProcess.stop()];
|
|
180
|
-
case 2:
|
|
181
|
-
_a.sent();
|
|
182
|
-
this.flushCurrentTestFootprints.stop();
|
|
183
|
-
this.stateTracker.stop(waiter.getCallbackForProcess('stateTracker'));
|
|
184
|
-
this.footprintsProcess.stop(waiter.getCallbackForProcess('footprionts'));
|
|
185
|
-
this.logsProcess.stop(waiter.getCallbackForProcess('logs'));
|
|
186
|
-
this.logger.info('Agent is now stopped');
|
|
187
|
-
return [2 /*return*/, waiter.waitForAll(callback)];
|
|
188
|
-
}
|
|
189
|
-
});
|
|
190
|
-
});
|
|
191
|
-
};
|
|
192
|
-
//PUBLIC INTERFACE
|
|
193
|
-
NodeJsAgent.prototype.createExecutionId = function () {
|
|
194
|
-
var now = system_date_1.getSystemDateValueOf().toString();
|
|
195
|
-
var result = uuid_1.UUID.newGuid([now, this._cfg.customerId.value].join());
|
|
196
|
-
return result;
|
|
197
|
-
};
|
|
198
|
-
//Deprecated
|
|
199
|
-
NodeJsAgent.prototype.createTestSuiteId = function () {
|
|
200
|
-
return this.createExecutionId();
|
|
201
|
-
};
|
|
202
|
-
NodeJsAgent.prototype.createTestId = function (executionId, testName) {
|
|
203
|
-
return state_tracker_1.StateTracker.combineExecutionIdAndTestName(executionId, testName);
|
|
204
|
-
};
|
|
205
|
-
NodeJsAgent.prototype.setCurrentTestIdentifier = function (testIdentifier) {
|
|
206
|
-
this.logger.info('Agent.setCurrentTestIdentifier - testIdentifier:\'' + testIdentifier + '\'.');
|
|
207
|
-
this.stateTracker.setTestIdentifier(testIdentifier, false);
|
|
208
|
-
};
|
|
209
|
-
NodeJsAgent.getVersion = function () {
|
|
210
|
-
return version;
|
|
211
|
-
};
|
|
212
|
-
NodeJsAgent.prototype.pushEvent = function (evt) {
|
|
213
|
-
this.eventsProcess.enqueueEvent(evt);
|
|
214
|
-
};
|
|
215
|
-
NodeJsAgent.prototype.startColoredExecution = function (executionId) {
|
|
216
|
-
return this.stateTracker.startColoredExecution(executionId);
|
|
217
|
-
};
|
|
218
|
-
Object.defineProperty(NodeJsAgent.prototype, "cfg", {
|
|
219
|
-
get: function () {
|
|
220
|
-
return this._cfg;
|
|
221
|
-
},
|
|
222
|
-
enumerable: false,
|
|
223
|
-
configurable: true
|
|
224
|
-
});
|
|
225
|
-
NodeJsAgent.prototype.registerGlobalAPI = function () {
|
|
226
|
-
var _this = this;
|
|
227
|
-
var globalObject = global;
|
|
228
|
-
var sealights = '$$SeaLights$$';
|
|
229
|
-
if (globalObject[sealights])
|
|
230
|
-
return;
|
|
231
|
-
globalObject[sealights] = {
|
|
232
|
-
setCurrentTestIdentifier: function (testIdentifier, silent) {
|
|
233
|
-
_this.stateTracker.setTestIdentifier(testIdentifier, silent);
|
|
234
|
-
},
|
|
235
|
-
getCurrentTestIdentifier: function () {
|
|
236
|
-
return _this.stateTracker.getCurrentTestIdentifier();
|
|
237
|
-
},
|
|
238
|
-
pushEvent: function (event) {
|
|
239
|
-
_this.pushEvent(event);
|
|
240
|
-
},
|
|
241
|
-
shutdown: function (callback) {
|
|
242
|
-
if (!callback)
|
|
243
|
-
throw new Error('\'callback\' is required.');
|
|
244
|
-
_this.stop(callback);
|
|
245
|
-
}
|
|
246
|
-
};
|
|
247
|
-
};
|
|
248
|
-
NodeJsAgent.prototype.registerShutdownEvents = function () {
|
|
249
|
-
var _this = this;
|
|
250
|
-
var dummyCallback = function () {
|
|
251
|
-
};
|
|
252
|
-
process.on('SIGTERM', function () { return _this.stop(dummyCallback); });
|
|
253
|
-
process.on('SIGINT', function () { return _this.stop(dummyCallback); });
|
|
254
|
-
};
|
|
255
|
-
// Enable if your'e running on windows and want to test shutdown process
|
|
256
|
-
NodeJsAgent.prototype.registerShutdownEventsOnWindows = function () {
|
|
257
|
-
var _this = this;
|
|
258
|
-
var readLine = readline_1.createInterface({
|
|
259
|
-
input: process.stdin,
|
|
260
|
-
output: process.stdout
|
|
261
|
-
});
|
|
262
|
-
var windowsListener = function () {
|
|
263
|
-
console.log('before exit');
|
|
264
|
-
_this.stop(function () {
|
|
265
|
-
process.exit();
|
|
266
|
-
});
|
|
267
|
-
};
|
|
268
|
-
readLine.on('SIGINT', function () { windowsListener(); });
|
|
269
|
-
readLine.on('SIGTERM', function () { windowsListener(); });
|
|
270
|
-
};
|
|
271
|
-
return NodeJsAgent;
|
|
272
|
-
}());
|
|
273
|
-
exports.NodeJsAgent = NodeJsAgent;
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
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 (_) 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
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
+
exports.NodeJsAgent = void 0;
|
|
40
|
+
var uuid_1 = require("./uuid");
|
|
41
|
+
var wait_for_multiple_callbacks_1 = require("./wait-for-multiple-callbacks");
|
|
42
|
+
var readline_1 = require("readline");
|
|
43
|
+
var state_tracker_1 = require("../common/state-tracker");
|
|
44
|
+
var cockpit_notifier_1 = require("../common/agent-events/cockpit-notifier");
|
|
45
|
+
var events_contracts_1 = require("../common/events-process/events-contracts");
|
|
46
|
+
var system_date_1 = require("../common/system-date");
|
|
47
|
+
var version = process.env.npm_package_version;
|
|
48
|
+
var NodeJsAgent = /** @class */ (function () {
|
|
49
|
+
function NodeJsAgent(_cfg, footprintsProcess, eventsProcess, logsProcess, stateTracker, configProcess, flushCurrentTestFootprints, coloringProviders, _testRecommendationHandler, agentInstanceData, logger) {
|
|
50
|
+
var _this = this;
|
|
51
|
+
this._cfg = _cfg;
|
|
52
|
+
this.footprintsProcess = footprintsProcess;
|
|
53
|
+
this.eventsProcess = eventsProcess;
|
|
54
|
+
this.logsProcess = logsProcess;
|
|
55
|
+
this.stateTracker = stateTracker;
|
|
56
|
+
this.configProcess = configProcess;
|
|
57
|
+
this.flushCurrentTestFootprints = flushCurrentTestFootprints;
|
|
58
|
+
this.coloringProviders = coloringProviders;
|
|
59
|
+
this._testRecommendationHandler = _testRecommendationHandler;
|
|
60
|
+
this.agentInstanceData = agentInstanceData;
|
|
61
|
+
this.logger = logger;
|
|
62
|
+
this.isRunning = false;
|
|
63
|
+
this.isStopping = false;
|
|
64
|
+
if (!_cfg)
|
|
65
|
+
throw new Error('cfg is required');
|
|
66
|
+
if (!footprintsProcess)
|
|
67
|
+
throw new Error('footprintsProcess is required');
|
|
68
|
+
if (!eventsProcess)
|
|
69
|
+
throw new Error('eventsProcess is required');
|
|
70
|
+
if (!logsProcess)
|
|
71
|
+
throw new Error('logsProcess is required');
|
|
72
|
+
if (!stateTracker)
|
|
73
|
+
throw new Error('stateTracker is required');
|
|
74
|
+
if (!configProcess)
|
|
75
|
+
throw new Error('configProcess is required');
|
|
76
|
+
if (!flushCurrentTestFootprints)
|
|
77
|
+
throw new Error('flushCurrentTestFootprints is required');
|
|
78
|
+
if (!coloringProviders)
|
|
79
|
+
throw new Error('coloringProviders is required');
|
|
80
|
+
if (!_testRecommendationHandler)
|
|
81
|
+
throw new Error('testRecommendationHandler is required');
|
|
82
|
+
if (!logger)
|
|
83
|
+
throw new Error('logger is required');
|
|
84
|
+
stateTracker.on('test_identifier_changed', this.footprintsProcess.handleTestIdChanged.bind(this.footprintsProcess));
|
|
85
|
+
configProcess.on('configuration_changed', function (updatedCfg) {
|
|
86
|
+
if (updatedCfg.enabled.value === false) {
|
|
87
|
+
_this.stop(function () { });
|
|
88
|
+
}
|
|
89
|
+
_this.flushCurrentTestFootprints.setInterval(updatedCfg.footprintsCollectIntervalSecs.value);
|
|
90
|
+
});
|
|
91
|
+
flushCurrentTestFootprints.on('alarm', function () {
|
|
92
|
+
_this.footprintsProcess.flushCurrentFootprints();
|
|
93
|
+
});
|
|
94
|
+
}
|
|
95
|
+
NodeJsAgent.prototype.getLogger = function (component) {
|
|
96
|
+
return this.logger.child({ component: component });
|
|
97
|
+
};
|
|
98
|
+
Object.defineProperty(NodeJsAgent.prototype, "testRecommendationHandler", {
|
|
99
|
+
get: function () {
|
|
100
|
+
return this._testRecommendationHandler;
|
|
101
|
+
},
|
|
102
|
+
enumerable: false,
|
|
103
|
+
configurable: true
|
|
104
|
+
});
|
|
105
|
+
/**
|
|
106
|
+
* Starts the Test Listener
|
|
107
|
+
*
|
|
108
|
+
* @param {(err: Error) => void} [callback] Optional callback that will be called if agent is either disabled, or finished loading (incl. remote config)
|
|
109
|
+
* @returns
|
|
110
|
+
*
|
|
111
|
+
* @memberOf NodeJsAgent
|
|
112
|
+
*/
|
|
113
|
+
NodeJsAgent.prototype.start = function (callback, toolInfo) {
|
|
114
|
+
var _this = this;
|
|
115
|
+
this.logger.info('Agent is starting. process.argv: \'' + process.argv.join(' ') + '\'');
|
|
116
|
+
if (this._cfg.enabled.value === false) {
|
|
117
|
+
this.logger.warn('Agent is disabled');
|
|
118
|
+
if (callback) {
|
|
119
|
+
return callback(null);
|
|
120
|
+
}
|
|
121
|
+
return;
|
|
122
|
+
}
|
|
123
|
+
if (!this._cfg.token.hasValue) {
|
|
124
|
+
this.logger.warn('Agent is disabled since token was not specified');
|
|
125
|
+
if (callback) {
|
|
126
|
+
return callback(null);
|
|
127
|
+
}
|
|
128
|
+
return;
|
|
129
|
+
}
|
|
130
|
+
if (this.isRunning) {
|
|
131
|
+
this.logger.warn('Agent is already running');
|
|
132
|
+
if (callback) {
|
|
133
|
+
return callback(null);
|
|
134
|
+
}
|
|
135
|
+
return;
|
|
136
|
+
}
|
|
137
|
+
cockpit_notifier_1.CockpitNotifier.notifyStart(this._cfg, this.agentInstanceData, this.logger, {}, null, toolInfo);
|
|
138
|
+
this.flushCurrentTestFootprints.start();
|
|
139
|
+
this.footprintsProcess.start();
|
|
140
|
+
this.eventsProcess.start();
|
|
141
|
+
this.logsProcess.start();
|
|
142
|
+
this.stateTracker.start();
|
|
143
|
+
this.configProcess.start(function (err) {
|
|
144
|
+
if (callback) {
|
|
145
|
+
return callback(null);
|
|
146
|
+
} //Even if configuration failed to be loaded from the server, don't shut down the agent
|
|
147
|
+
});
|
|
148
|
+
this.coloringProviders.forEach(function (provider) {
|
|
149
|
+
provider.setup(_this._cfg, _this.stateTracker, _this.logger);
|
|
150
|
+
});
|
|
151
|
+
this.registerGlobalAPI();
|
|
152
|
+
this.registerShutdownEvents();
|
|
153
|
+
this.isRunning = true;
|
|
154
|
+
this.eventsProcess.enqueueEvent({
|
|
155
|
+
type: events_contracts_1.EventTypes.AgentStarted,
|
|
156
|
+
localTime: (0, system_date_1.getSystemDateValueOf)()
|
|
157
|
+
});
|
|
158
|
+
this.logger.info('Agent is now running');
|
|
159
|
+
};
|
|
160
|
+
NodeJsAgent.prototype.stop = function (callback) {
|
|
161
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
162
|
+
var waiter;
|
|
163
|
+
return __generator(this, function (_a) {
|
|
164
|
+
switch (_a.label) {
|
|
165
|
+
case 0:
|
|
166
|
+
if (!this.isRunning) {
|
|
167
|
+
return [2 /*return*/, callback()];
|
|
168
|
+
}
|
|
169
|
+
if (this.isStopping) {
|
|
170
|
+
this.logger.error('Already stopping %s', new Error());
|
|
171
|
+
}
|
|
172
|
+
this.isStopping = true;
|
|
173
|
+
this.logger.info('Agent is now stopping');
|
|
174
|
+
this.stateTracker.setTestIdentifier(null);
|
|
175
|
+
waiter = new wait_for_multiple_callbacks_1.WaitForMultipleCallbacks();
|
|
176
|
+
return [4 /*yield*/, cockpit_notifier_1.CockpitNotifier.notifyShutdown()];
|
|
177
|
+
case 1:
|
|
178
|
+
_a.sent();
|
|
179
|
+
return [4 /*yield*/, this.eventsProcess.stop()];
|
|
180
|
+
case 2:
|
|
181
|
+
_a.sent();
|
|
182
|
+
this.flushCurrentTestFootprints.stop();
|
|
183
|
+
this.stateTracker.stop(waiter.getCallbackForProcess('stateTracker'));
|
|
184
|
+
this.footprintsProcess.stop(waiter.getCallbackForProcess('footprionts'));
|
|
185
|
+
this.logsProcess.stop(waiter.getCallbackForProcess('logs'));
|
|
186
|
+
this.logger.info('Agent is now stopped');
|
|
187
|
+
return [2 /*return*/, waiter.waitForAll(callback)];
|
|
188
|
+
}
|
|
189
|
+
});
|
|
190
|
+
});
|
|
191
|
+
};
|
|
192
|
+
//PUBLIC INTERFACE
|
|
193
|
+
NodeJsAgent.prototype.createExecutionId = function () {
|
|
194
|
+
var now = (0, system_date_1.getSystemDateValueOf)().toString();
|
|
195
|
+
var result = uuid_1.UUID.newGuid([now, this._cfg.customerId.value].join());
|
|
196
|
+
return result;
|
|
197
|
+
};
|
|
198
|
+
//Deprecated
|
|
199
|
+
NodeJsAgent.prototype.createTestSuiteId = function () {
|
|
200
|
+
return this.createExecutionId();
|
|
201
|
+
};
|
|
202
|
+
NodeJsAgent.prototype.createTestId = function (executionId, testName) {
|
|
203
|
+
return state_tracker_1.StateTracker.combineExecutionIdAndTestName(executionId, testName);
|
|
204
|
+
};
|
|
205
|
+
NodeJsAgent.prototype.setCurrentTestIdentifier = function (testIdentifier) {
|
|
206
|
+
this.logger.info('Agent.setCurrentTestIdentifier - testIdentifier:\'' + testIdentifier + '\'.');
|
|
207
|
+
this.stateTracker.setTestIdentifier(testIdentifier, false);
|
|
208
|
+
};
|
|
209
|
+
NodeJsAgent.getVersion = function () {
|
|
210
|
+
return version;
|
|
211
|
+
};
|
|
212
|
+
NodeJsAgent.prototype.pushEvent = function (evt) {
|
|
213
|
+
this.eventsProcess.enqueueEvent(evt);
|
|
214
|
+
};
|
|
215
|
+
NodeJsAgent.prototype.startColoredExecution = function (executionId) {
|
|
216
|
+
return this.stateTracker.startColoredExecution(executionId);
|
|
217
|
+
};
|
|
218
|
+
Object.defineProperty(NodeJsAgent.prototype, "cfg", {
|
|
219
|
+
get: function () {
|
|
220
|
+
return this._cfg;
|
|
221
|
+
},
|
|
222
|
+
enumerable: false,
|
|
223
|
+
configurable: true
|
|
224
|
+
});
|
|
225
|
+
NodeJsAgent.prototype.registerGlobalAPI = function () {
|
|
226
|
+
var _this = this;
|
|
227
|
+
var globalObject = global;
|
|
228
|
+
var sealights = '$$SeaLights$$';
|
|
229
|
+
if (globalObject[sealights])
|
|
230
|
+
return;
|
|
231
|
+
globalObject[sealights] = {
|
|
232
|
+
setCurrentTestIdentifier: function (testIdentifier, silent) {
|
|
233
|
+
_this.stateTracker.setTestIdentifier(testIdentifier, silent);
|
|
234
|
+
},
|
|
235
|
+
getCurrentTestIdentifier: function () {
|
|
236
|
+
return _this.stateTracker.getCurrentTestIdentifier();
|
|
237
|
+
},
|
|
238
|
+
pushEvent: function (event) {
|
|
239
|
+
_this.pushEvent(event);
|
|
240
|
+
},
|
|
241
|
+
shutdown: function (callback) {
|
|
242
|
+
if (!callback)
|
|
243
|
+
throw new Error('\'callback\' is required.');
|
|
244
|
+
_this.stop(callback);
|
|
245
|
+
}
|
|
246
|
+
};
|
|
247
|
+
};
|
|
248
|
+
NodeJsAgent.prototype.registerShutdownEvents = function () {
|
|
249
|
+
var _this = this;
|
|
250
|
+
var dummyCallback = function () {
|
|
251
|
+
};
|
|
252
|
+
process.on('SIGTERM', function () { return _this.stop(dummyCallback); });
|
|
253
|
+
process.on('SIGINT', function () { return _this.stop(dummyCallback); });
|
|
254
|
+
};
|
|
255
|
+
// Enable if your'e running on windows and want to test shutdown process
|
|
256
|
+
NodeJsAgent.prototype.registerShutdownEventsOnWindows = function () {
|
|
257
|
+
var _this = this;
|
|
258
|
+
var readLine = (0, readline_1.createInterface)({
|
|
259
|
+
input: process.stdin,
|
|
260
|
+
output: process.stdout
|
|
261
|
+
});
|
|
262
|
+
var windowsListener = function () {
|
|
263
|
+
console.log('before exit');
|
|
264
|
+
_this.stop(function () {
|
|
265
|
+
process.exit();
|
|
266
|
+
});
|
|
267
|
+
};
|
|
268
|
+
readLine.on('SIGINT', function () { windowsListener(); });
|
|
269
|
+
readLine.on('SIGTERM', function () { windowsListener(); });
|
|
270
|
+
};
|
|
271
|
+
return NodeJsAgent;
|
|
272
|
+
}());
|
|
273
|
+
exports.NodeJsAgent = NodeJsAgent;
|
|
274
274
|
//# sourceMappingURL=agent.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agent.js","sourceRoot":"","sources":["../../test-listener/agent.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,+BAA4B;AAE5B,6EAAsE;AAEtE,qCAAyC;AAKzC,yDAAqD;AAIrD,4EAAwE;AACxE,8EAA6E;AAC7E,qDAA2D;AAG3D,IAAM,OAAO,GAAG,OAAO,CAAC,GAAG,CAAC,mBAAmB,CAAC;AAGhD;IACI,qBAA2B,IAAiB,EAChC,iBAA0D,EAC1D,aAA4B,EAC5B,WAAwB,EACxB,YAA0B,EAC1B,aAA4B,EAC5B,0BAAoC,EACpC,iBAA2C,EAC3C,0BAAqD,EACrD,iBAAoC,EACpC,MAAc;QAV1B,iBAkCC;QAlC0B,SAAI,GAAJ,IAAI,CAAa;QAChC,sBAAi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