slnodejs 6.1.415 → 6.1.447

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.
Files changed (432) hide show
  1. package/browser-agent/dist/browser-agent-all.js +249 -414
  2. package/browser-agent/dist/browser-agent-all.min.js +3 -3
  3. package/browser-agent/package.json +1 -1
  4. package/package.json +2 -2
  5. package/tsOutputs/api.js +32 -86
  6. package/tsOutputs/build-scanner/ast-utils.js +11 -11
  7. package/tsOutputs/build-scanner/ast-utils.js.map +1 -1
  8. package/tsOutputs/build-scanner/build-diff-process.js +35 -16
  9. package/tsOutputs/build-scanner/build-diff-process.js.map +1 -1
  10. package/tsOutputs/build-scanner/cia.js +2 -2
  11. package/tsOutputs/build-scanner/cia.js.map +1 -1
  12. package/tsOutputs/build-scanner/default-values-resolver.js +5 -7
  13. package/tsOutputs/build-scanner/default-values-resolver.js.map +1 -1
  14. package/tsOutputs/build-scanner/diagnostic/build-scan-diagnosis.js +101 -159
  15. package/tsOutputs/build-scanner/diagnostic/build-scan-diagnosis.js.map +1 -1
  16. package/tsOutputs/build-scanner/diagnostic/none-diagnosis.js +23 -55
  17. package/tsOutputs/build-scanner/diagnostic/none-diagnosis.js.map +1 -1
  18. package/tsOutputs/build-scanner/file-and-folder-utils.js +3 -3
  19. package/tsOutputs/build-scanner/file-and-folder-utils.js.map +1 -1
  20. package/tsOutputs/build-scanner/file-system/actual-file.js +3 -3
  21. package/tsOutputs/build-scanner/file-system/actual-file.js.map +1 -1
  22. package/tsOutputs/build-scanner/instrumentation/browser-instrumenter.js +56 -60
  23. package/tsOutputs/build-scanner/instrumentation/browser-instrumenter.js.map +1 -1
  24. package/tsOutputs/build-scanner/instrumentation/content-instrumenter.js +9 -10
  25. package/tsOutputs/build-scanner/instrumentation/content-instrumenter.js.map +1 -1
  26. package/tsOutputs/build-scanner/instrumentation/files-instrumenter.js +80 -124
  27. package/tsOutputs/build-scanner/instrumentation/files-instrumenter.js.map +1 -1
  28. package/tsOutputs/build-scanner/instrumentation/instrumentation-utils.js +3 -3
  29. package/tsOutputs/build-scanner/instrumentation/instrumentation-utils.js.map +1 -1
  30. package/tsOutputs/build-scanner/instrumentation/instrumented-file-size-reducer.js +4 -4
  31. package/tsOutputs/build-scanner/instrumentation/instrumented-file-size-reducer.js.map +1 -1
  32. package/tsOutputs/build-scanner/instrumentation/process-pool/instrumenter-spawn.js +15 -50
  33. package/tsOutputs/build-scanner/instrumentation/process-pool/instrumenter-spawn.js.map +1 -1
  34. package/tsOutputs/build-scanner/instrumentation/process-pool/process-pool.js +84 -141
  35. package/tsOutputs/build-scanner/instrumentation/process-pool/process-pool.js.map +1 -1
  36. package/tsOutputs/build-scanner/instrumentation/process-pool/split-by-transform-stream.js +15 -34
  37. package/tsOutputs/build-scanner/instrumentation/process-pool/split-by-transform-stream.js.map +1 -1
  38. package/tsOutputs/build-scanner/instrumentation/process-pool/stop-by-condition-transform-stream.js +9 -27
  39. package/tsOutputs/build-scanner/instrumentation/process-pool/stop-by-condition-transform-stream.js.map +1 -1
  40. package/tsOutputs/build-scanner/instrumentation/strategies/copy-as-is-strategy.js +8 -10
  41. package/tsOutputs/build-scanner/instrumentation/strategies/copy-as-is-strategy.js.map +1 -1
  42. package/tsOutputs/build-scanner/instrumentation/strategies/js-instrumnetation-strategy.js +22 -54
  43. package/tsOutputs/build-scanner/instrumentation/strategies/js-instrumnetation-strategy.js.map +1 -1
  44. package/tsOutputs/build-scanner/instrumentation/strategies/markup-instrumnetation-strategy.js +55 -107
  45. package/tsOutputs/build-scanner/instrumentation/strategies/markup-instrumnetation-strategy.js.map +1 -1
  46. package/tsOutputs/build-scanner/js_diff/file-signature.js +5 -6
  47. package/tsOutputs/build-scanner/js_diff/file-signature.js.map +1 -1
  48. package/tsOutputs/build-scanner/js_diff/files-mapping.js +6 -6
  49. package/tsOutputs/build-scanner/js_diff/files-mapping.js.map +1 -1
  50. package/tsOutputs/build-scanner/js_diff/generated-file-signature.js +3 -3
  51. package/tsOutputs/build-scanner/js_diff/generated-file-signature.js.map +1 -1
  52. package/tsOutputs/build-scanner/js_diff/guess-method-location.js +26 -27
  53. package/tsOutputs/build-scanner/js_diff/guess-method-location.js.map +1 -1
  54. package/tsOutputs/build-scanner/js_diff/method-signature.js +1 -1
  55. package/tsOutputs/build-scanner/js_diff/method-signature.js.map +1 -1
  56. package/tsOutputs/build-scanner/js_diff/sl-mapper.js +28 -79
  57. package/tsOutputs/build-scanner/js_diff/sl-mapper.js.map +1 -1
  58. package/tsOutputs/build-scanner/js_diff/source-data-enricher.js +3 -2
  59. package/tsOutputs/build-scanner/js_diff/source-data-enricher.js.map +1 -1
  60. package/tsOutputs/build-scanner/js_diff/source-files-notifier.js +1 -1
  61. package/tsOutputs/build-scanner/js_diff/source-files-notifier.js.map +1 -1
  62. package/tsOutputs/build-scanner/mappings/ensure-files-handler.service.js +76 -149
  63. package/tsOutputs/build-scanner/mappings/ensure-files-handler.service.js.map +1 -1
  64. package/tsOutputs/build-scanner/mappings/file-element-utils.js +9 -9
  65. package/tsOutputs/build-scanner/mappings/file-element-utils.js.map +1 -1
  66. package/tsOutputs/build-scanner/mappings/file-enricher.js +71 -100
  67. package/tsOutputs/build-scanner/mappings/file-enricher.js.map +1 -1
  68. package/tsOutputs/build-scanner/mappings/file-path-fixer.js +112 -0
  69. package/tsOutputs/build-scanner/mappings/file-path-fixer.js.map +1 -0
  70. package/tsOutputs/build-scanner/mappings/files-container.js +89 -0
  71. package/tsOutputs/build-scanner/mappings/files-container.js.map +1 -0
  72. package/tsOutputs/build-scanner/mappings/files-data-container.js +18 -23
  73. package/tsOutputs/build-scanner/mappings/files-data-container.js.map +1 -1
  74. package/tsOutputs/build-scanner/mappings/source-path-mapper.js +15 -45
  75. package/tsOutputs/build-scanner/mappings/source-path-mapper.js.map +1 -1
  76. package/tsOutputs/build-scanner/markup-files-parser.js +1 -1
  77. package/tsOutputs/build-scanner/markup-files-parser.js.map +1 -1
  78. package/tsOutputs/build-scanner/scm/scm-file-fixer.js +27 -0
  79. package/tsOutputs/build-scanner/scm/scm-file-fixer.js.map +1 -0
  80. package/tsOutputs/build-scanner/scm/scm-files-container.js +9 -45
  81. package/tsOutputs/build-scanner/scm/scm-files-container.js.map +1 -1
  82. package/tsOutputs/build-scanner/sl-config-cia-cli.js +1 -1
  83. package/tsOutputs/build-scanner/sl-config-cia-cli.js.map +1 -1
  84. package/tsOutputs/build-scanner/utils.js +5 -5
  85. package/tsOutputs/build-scanner/utils.js.map +1 -1
  86. package/tsOutputs/cli-parse/agent-instance-data.js +2 -2
  87. package/tsOutputs/cli-parse/agent-instance-data.js.map +1 -1
  88. package/tsOutputs/cli-parse/child-process-wrapper.js +26 -60
  89. package/tsOutputs/cli-parse/child-process-wrapper.js.map +1 -1
  90. package/tsOutputs/cli-parse/cli.js +72 -191
  91. package/tsOutputs/cli-parse/cli.js.map +1 -1
  92. package/tsOutputs/cli-parse/constants/constants.js +9 -9
  93. package/tsOutputs/cli-parse/constants/constants.js.map +1 -1
  94. package/tsOutputs/cli-parse/custom-commander.js +17 -18
  95. package/tsOutputs/cli-parse/custom-commander.js.map +1 -1
  96. package/tsOutputs/cli-parse/executors/base-executor.js +121 -236
  97. package/tsOutputs/cli-parse/executors/base-executor.js.map +1 -1
  98. package/tsOutputs/cli-parse/executors/build-args-dto.js +10 -11
  99. package/tsOutputs/cli-parse/executors/build-args-dto.js.map +1 -1
  100. package/tsOutputs/cli-parse/executors/build-end-executor.js +34 -92
  101. package/tsOutputs/cli-parse/executors/build-end-executor.js.map +1 -1
  102. package/tsOutputs/cli-parse/executors/build-executor.js +64 -133
  103. package/tsOutputs/cli-parse/executors/build-executor.js.map +1 -1
  104. package/tsOutputs/cli-parse/executors/config-executor.js +35 -92
  105. package/tsOutputs/cli-parse/executors/config-executor.js.map +1 -1
  106. package/tsOutputs/cli-parse/executors/dry-run/base-data.js +29 -39
  107. package/tsOutputs/cli-parse/executors/dry-run/base-data.js.map +1 -1
  108. package/tsOutputs/cli-parse/executors/dry-run/build-mapping-data.js +92 -177
  109. package/tsOutputs/cli-parse/executors/dry-run/build-mapping-data.js.map +1 -1
  110. package/tsOutputs/cli-parse/executors/dry-run/dry-run-executor.js +110 -194
  111. package/tsOutputs/cli-parse/executors/dry-run/dry-run-executor.js.map +1 -1
  112. package/tsOutputs/cli-parse/executors/dry-run/dry-run-validation.js +49 -83
  113. package/tsOutputs/cli-parse/executors/dry-run/dry-run-validation.js.map +1 -1
  114. package/tsOutputs/cli-parse/executors/dry-run/footprints-data.js +55 -113
  115. package/tsOutputs/cli-parse/executors/dry-run/footprints-data.js.map +1 -1
  116. package/tsOutputs/cli-parse/executors/dry-run/helper-methods.js +24 -25
  117. package/tsOutputs/cli-parse/executors/dry-run/helper-methods.js.map +1 -1
  118. package/tsOutputs/cli-parse/executors/end-execution-executor.js +16 -64
  119. package/tsOutputs/cli-parse/executors/end-execution-executor.js.map +1 -1
  120. package/tsOutputs/cli-parse/executors/integration-build-components-executor.js +29 -82
  121. package/tsOutputs/cli-parse/executors/integration-build-components-executor.js.map +1 -1
  122. package/tsOutputs/cli-parse/executors/integration-build-delete-components-executor.js +12 -59
  123. package/tsOutputs/cli-parse/executors/integration-build-delete-components-executor.js.map +1 -1
  124. package/tsOutputs/cli-parse/executors/integration-build-update-components-executor.js +9 -58
  125. package/tsOutputs/cli-parse/executors/integration-build-update-components-executor.js.map +1 -1
  126. package/tsOutputs/cli-parse/executors/mocha-executor.js +41 -101
  127. package/tsOutputs/cli-parse/executors/mocha-executor.js.map +1 -1
  128. package/tsOutputs/cli-parse/executors/nyc-report-executor.js +24 -83
  129. package/tsOutputs/cli-parse/executors/nyc-report-executor.js.map +1 -1
  130. package/tsOutputs/cli-parse/executors/pr-config-executor.js +15 -63
  131. package/tsOutputs/cli-parse/executors/pr-config-executor.js.map +1 -1
  132. package/tsOutputs/cli-parse/executors/run-executor.js +23 -75
  133. package/tsOutputs/cli-parse/executors/run-executor.js.map +1 -1
  134. package/tsOutputs/cli-parse/executors/start-execution-executor.js +16 -64
  135. package/tsOutputs/cli-parse/executors/start-execution-executor.js.map +1 -1
  136. package/tsOutputs/cli-parse/executors/test-executions-executor.js +9 -63
  137. package/tsOutputs/cli-parse/executors/test-executions-executor.js.map +1 -1
  138. package/tsOutputs/cli-parse/executors/test-listener-executor.js +47 -117
  139. package/tsOutputs/cli-parse/executors/test-listener-executor.js.map +1 -1
  140. package/tsOutputs/cli-parse/executors/upload-report-executor.js +23 -71
  141. package/tsOutputs/cli-parse/executors/upload-report-executor.js.map +1 -1
  142. package/tsOutputs/cli-parse/utils.js +10 -10
  143. package/tsOutputs/cli-parse/utils.js.map +1 -1
  144. package/tsOutputs/common/agent-events/agent-events-controller.js +146 -251
  145. package/tsOutputs/common/agent-events/agent-events-controller.js.map +1 -1
  146. package/tsOutputs/common/agent-events/agent-events-guard.js +12 -15
  147. package/tsOutputs/common/agent-events/agent-events-guard.js.map +1 -1
  148. package/tsOutputs/common/agent-events/agent-instance-info-builder.js +22 -24
  149. package/tsOutputs/common/agent-events/agent-instance-info-builder.js.map +1 -1
  150. package/tsOutputs/common/agent-events/agent-start-info-builder.js +7 -8
  151. package/tsOutputs/common/agent-events/agent-start-info-builder.js.map +1 -1
  152. package/tsOutputs/common/agent-events/browser-info-builder.js +9 -10
  153. package/tsOutputs/common/agent-events/browser-info-builder.js.map +1 -1
  154. package/tsOutputs/common/agent-events/ci-info-builder.js +12 -13
  155. package/tsOutputs/common/agent-events/ci-info-builder.js.map +1 -1
  156. package/tsOutputs/common/agent-events/cockpit-notifier.js +38 -87
  157. package/tsOutputs/common/agent-events/cockpit-notifier.js.map +1 -1
  158. package/tsOutputs/common/agent-events/dry-run-agent-events-controller.js +10 -27
  159. package/tsOutputs/common/agent-events/dry-run-agent-events-controller.js.map +1 -1
  160. package/tsOutputs/common/agent-events/machine-info-builder.js +21 -22
  161. package/tsOutputs/common/agent-events/machine-info-builder.js.map +1 -1
  162. package/tsOutputs/common/agent-events/no-op-agent-events-controller.js +30 -84
  163. package/tsOutputs/common/agent-events/no-op-agent-events-controller.js.map +1 -1
  164. package/tsOutputs/common/agent-events/nodejs-env-info-builder.js +7 -8
  165. package/tsOutputs/common/agent-events/nodejs-env-info-builder.js.map +1 -1
  166. package/tsOutputs/common/agent-events/sensitive-data-filter.js +3 -4
  167. package/tsOutputs/common/agent-events/sensitive-data-filter.js.map +1 -1
  168. package/tsOutputs/common/agent-instance-data.js +23 -28
  169. package/tsOutputs/common/agent-instance-data.js.map +1 -1
  170. package/tsOutputs/common/cli-progress.js +16 -19
  171. package/tsOutputs/common/cli-progress.js.map +1 -1
  172. package/tsOutputs/common/config-process/config-loader.js +23 -24
  173. package/tsOutputs/common/config-process/config-loader.js.map +1 -1
  174. package/tsOutputs/common/config-process/config-system.js +104 -131
  175. package/tsOutputs/common/config-process/config-system.js.map +1 -1
  176. package/tsOutputs/common/config-process/config.js +52 -73
  177. package/tsOutputs/common/config-process/config.js.map +1 -1
  178. package/tsOutputs/common/config-process/index.js +38 -57
  179. package/tsOutputs/common/config-process/index.js.map +1 -1
  180. package/tsOutputs/common/config-process/no-op-config-process.js +9 -29
  181. package/tsOutputs/common/config-process/no-op-config-process.js.map +1 -1
  182. package/tsOutputs/common/constants/constants.js +19 -25
  183. package/tsOutputs/common/constants/constants.js.map +1 -1
  184. package/tsOutputs/common/constants/sl-env-vars.js +125 -131
  185. package/tsOutputs/common/constants/sl-env-vars.js.map +1 -1
  186. package/tsOutputs/common/coverage-elements/file-element.js +66 -103
  187. package/tsOutputs/common/coverage-elements/file-element.js.map +1 -1
  188. package/tsOutputs/common/coverage-elements/istanbul-unique-id-converter.js +28 -47
  189. package/tsOutputs/common/coverage-elements/istanbul-unique-id-converter.js.map +1 -1
  190. package/tsOutputs/common/coverage-elements/new-id-resolver.js +17 -17
  191. package/tsOutputs/common/coverage-elements/new-id-resolver.js.map +1 -1
  192. package/tsOutputs/common/coverage-elements/original-module-loader.js +71 -79
  193. package/tsOutputs/common/coverage-elements/original-module-loader.js.map +1 -1
  194. package/tsOutputs/common/coverage-elements/unique-id-converter.js +90 -110
  195. package/tsOutputs/common/coverage-elements/unique-id-converter.js.map +1 -1
  196. package/tsOutputs/common/environment-data-service.js +10 -11
  197. package/tsOutputs/common/environment-data-service.js.map +1 -1
  198. package/tsOutputs/common/events-process/events-creator.js +20 -32
  199. package/tsOutputs/common/events-process/events-creator.js.map +1 -1
  200. package/tsOutputs/common/events-process/index.js +97 -186
  201. package/tsOutputs/common/events-process/index.js.map +1 -1
  202. package/tsOutputs/common/footprints-process/collection-interval.js +10 -11
  203. package/tsOutputs/common/footprints-process/collection-interval.js.map +1 -1
  204. package/tsOutputs/common/footprints-process/footprints-service-proxy.js +21 -22
  205. package/tsOutputs/common/footprints-process/footprints-service-proxy.js.map +1 -1
  206. package/tsOutputs/common/footprints-process/index.js +68 -102
  207. package/tsOutputs/common/footprints-process/index.js.map +1 -1
  208. package/tsOutputs/common/footprints-process/istanbul-to-footprints-contract.js +2 -5
  209. package/tsOutputs/common/footprints-process/istanbul-to-footprints-contract.js.map +1 -1
  210. package/tsOutputs/common/footprints-process/istanbul-to-footprints.js +160 -162
  211. package/tsOutputs/common/footprints-process/istanbul-to-footprints.js.map +1 -1
  212. package/tsOutputs/common/footprints-process/production-footprints-handler.js +103 -156
  213. package/tsOutputs/common/footprints-process/production-footprints-handler.js.map +1 -1
  214. package/tsOutputs/common/footprints-process-v6/base-browser-hits-converter.js +30 -48
  215. package/tsOutputs/common/footprints-process-v6/base-browser-hits-converter.js.map +1 -1
  216. package/tsOutputs/common/footprints-process-v6/browser-footprints-buffer.js +7 -25
  217. package/tsOutputs/common/footprints-process-v6/browser-footprints-buffer.js.map +1 -1
  218. package/tsOutputs/common/footprints-process-v6/buffer-size-helper.js +13 -14
  219. package/tsOutputs/common/footprints-process-v6/buffer-size-helper.js.map +1 -1
  220. package/tsOutputs/common/footprints-process-v6/collector-footprints-buffer.js +14 -32
  221. package/tsOutputs/common/footprints-process-v6/collector-footprints-buffer.js.map +1 -1
  222. package/tsOutputs/common/footprints-process-v6/collector-footprints-process.js +43 -109
  223. package/tsOutputs/common/footprints-process-v6/collector-footprints-process.js.map +1 -1
  224. package/tsOutputs/common/footprints-process-v6/contracts.js +2 -5
  225. package/tsOutputs/common/footprints-process-v6/contracts.js.map +1 -1
  226. package/tsOutputs/common/footprints-process-v6/footprints-buffer.d.ts +1 -1
  227. package/tsOutputs/common/footprints-process-v6/footprints-buffer.js +55 -78
  228. package/tsOutputs/common/footprints-process-v6/footprints-buffer.js.map +1 -1
  229. package/tsOutputs/common/footprints-process-v6/hits-collector.js +89 -129
  230. package/tsOutputs/common/footprints-process-v6/hits-collector.js.map +1 -1
  231. package/tsOutputs/common/footprints-process-v6/hits-converter.js +70 -78
  232. package/tsOutputs/common/footprints-process-v6/hits-converter.js.map +1 -1
  233. package/tsOutputs/common/footprints-process-v6/index.d.ts +1 -0
  234. package/tsOutputs/common/footprints-process-v6/index.js +210 -347
  235. package/tsOutputs/common/footprints-process-v6/index.js.map +1 -1
  236. package/tsOutputs/common/footprints-process-v6/location-formatter.js +2 -2
  237. package/tsOutputs/common/footprints-process-v6/location-formatter.js.map +1 -1
  238. package/tsOutputs/common/footprints-process-v6/relative-path-resolver.js +10 -11
  239. package/tsOutputs/common/footprints-process-v6/relative-path-resolver.js.map +1 -1
  240. package/tsOutputs/common/footprints-process-v6/remote-browser-hits-converter.js +5 -25
  241. package/tsOutputs/common/footprints-process-v6/remote-browser-hits-converter.js.map +1 -1
  242. package/tsOutputs/common/footprints-process-v6/remote-footprints-process.js +6 -57
  243. package/tsOutputs/common/footprints-process-v6/remote-footprints-process.js.map +1 -1
  244. package/tsOutputs/common/footprints-process-v6/remote-hits-collector.js +7 -27
  245. package/tsOutputs/common/footprints-process-v6/remote-hits-collector.js.map +1 -1
  246. package/tsOutputs/common/footprints-process-v6/source-map-data.js +14 -15
  247. package/tsOutputs/common/footprints-process-v6/source-map-data.js.map +1 -1
  248. package/tsOutputs/common/http/backend-proxy.js +222 -321
  249. package/tsOutputs/common/http/backend-proxy.js.map +1 -1
  250. package/tsOutputs/common/http/contracts.js +40 -116
  251. package/tsOutputs/common/http/contracts.js.map +1 -1
  252. package/tsOutputs/common/http/dry-run-proxy.js +68 -111
  253. package/tsOutputs/common/http/dry-run-proxy.js.map +1 -1
  254. package/tsOutputs/common/http/entities-mapper.js +6 -9
  255. package/tsOutputs/common/http/entities-mapper.js.map +1 -1
  256. package/tsOutputs/common/http/http-client.js +76 -86
  257. package/tsOutputs/common/http/http-client.js.map +1 -1
  258. package/tsOutputs/common/http/sl-routes.js +119 -122
  259. package/tsOutputs/common/http/sl-routes.js.map +1 -1
  260. package/tsOutputs/common/ignored-files-handler.js +48 -49
  261. package/tsOutputs/common/ignored-files-handler.js.map +1 -1
  262. package/tsOutputs/common/logger.js +66 -88
  263. package/tsOutputs/common/logger.js.map +1 -1
  264. package/tsOutputs/common/messages-formatter.js +9 -14
  265. package/tsOutputs/common/messages-formatter.js.map +1 -1
  266. package/tsOutputs/common/no-op-state-tracker.js +14 -37
  267. package/tsOutputs/common/no-op-state-tracker.js.map +1 -1
  268. package/tsOutputs/common/queue.js +18 -36
  269. package/tsOutputs/common/queue.js.map +1 -1
  270. package/tsOutputs/common/scm/git-cloner.js +30 -94
  271. package/tsOutputs/common/scm/git-cloner.js.map +1 -1
  272. package/tsOutputs/common/scm/git-format-builder.js +24 -25
  273. package/tsOutputs/common/scm/git-format-builder.js.map +1 -1
  274. package/tsOutputs/common/scm/git.js +192 -327
  275. package/tsOutputs/common/scm/git.js.map +1 -1
  276. package/tsOutputs/common/scm/none.js +58 -110
  277. package/tsOutputs/common/scm/none.js.map +1 -1
  278. package/tsOutputs/common/scm/scm-factory.js +13 -16
  279. package/tsOutputs/common/scm/scm-factory.js.map +1 -1
  280. package/tsOutputs/common/short-name-to-file-mapper.js +30 -33
  281. package/tsOutputs/common/short-name-to-file-mapper.js.map +1 -1
  282. package/tsOutputs/common/source-map-handler.js +76 -98
  283. package/tsOutputs/common/source-map-handler.js.map +1 -1
  284. package/tsOutputs/common/source-map-reader.js +35 -36
  285. package/tsOutputs/common/source-map-reader.js.map +1 -1
  286. package/tsOutputs/common/source-maps-utils.js +8 -11
  287. package/tsOutputs/common/source-maps-utils.js.map +1 -1
  288. package/tsOutputs/common/state-tracker-fpv6.js +15 -37
  289. package/tsOutputs/common/state-tracker-fpv6.js.map +1 -1
  290. package/tsOutputs/common/state-tracker.js +124 -212
  291. package/tsOutputs/common/state-tracker.js.map +1 -1
  292. package/tsOutputs/common/system-date.js +3 -3
  293. package/tsOutputs/common/system-date.js.map +1 -1
  294. package/tsOutputs/common/utils/abstract-data-builder.js +8 -9
  295. package/tsOutputs/common/utils/abstract-data-builder.js.map +1 -1
  296. package/tsOutputs/common/utils/build-session-data-builder.js +25 -79
  297. package/tsOutputs/common/utils/build-session-data-builder.js.map +1 -1
  298. package/tsOutputs/common/utils/dependency-utils.js +13 -16
  299. package/tsOutputs/common/utils/dependency-utils.js.map +1 -1
  300. package/tsOutputs/common/utils/env-var-parsing.js +10 -14
  301. package/tsOutputs/common/utils/env-var-parsing.js.map +1 -1
  302. package/tsOutputs/common/utils/files-utils.js +16 -19
  303. package/tsOutputs/common/utils/files-utils.js.map +1 -1
  304. package/tsOutputs/common/utils/process-utils.js +12 -25
  305. package/tsOutputs/common/utils/process-utils.js.map +1 -1
  306. package/tsOutputs/common/utils/test-runner-build-session-data-builder.js +16 -62
  307. package/tsOutputs/common/utils/test-runner-build-session-data-builder.js.map +1 -1
  308. package/tsOutputs/common/utils/test-utils/mock-server-utils/mock-server-proxy.js +120 -192
  309. package/tsOutputs/common/utils/test-utils/mock-server-utils/mock-server-proxy.js.map +1 -1
  310. package/tsOutputs/common/utils/timer-utils.js +4 -7
  311. package/tsOutputs/common/utils/timer-utils.js.map +1 -1
  312. package/tsOutputs/common/utils/token-data-builder.js +30 -50
  313. package/tsOutputs/common/utils/token-data-builder.js.map +1 -1
  314. package/tsOutputs/common/utils/validation-utils.d.ts +4 -0
  315. package/tsOutputs/common/utils/validation-utils.js +13 -10
  316. package/tsOutputs/common/utils/validation-utils.js.map +1 -1
  317. package/tsOutputs/common/uuid.js +7 -10
  318. package/tsOutputs/common/uuid.js.map +1 -1
  319. package/tsOutputs/common/v8-utils.js +12 -50
  320. package/tsOutputs/common/v8-utils.js.map +1 -1
  321. package/tsOutputs/common/watchdog.js +35 -56
  322. package/tsOutputs/common/watchdog.js.map +1 -1
  323. package/tsOutputs/mocha-reporter/index.js +12 -12
  324. package/tsOutputs/mocha-reporter/index.js.map +1 -1
  325. package/tsOutputs/mocha-reporter/otel-agent.js +47 -118
  326. package/tsOutputs/mocha-reporter/otel-agent.js.map +1 -1
  327. package/tsOutputs/test-listener/SlNodeJsProxy.js +34 -35
  328. package/tsOutputs/test-listener/SlNodeJsProxy.js.map +1 -1
  329. package/tsOutputs/test-listener/UserMessageHelper.js +14 -19
  330. package/tsOutputs/test-listener/UserMessageHelper.js.map +1 -1
  331. package/tsOutputs/test-listener/agent-loader.js +42 -59
  332. package/tsOutputs/test-listener/agent-loader.js.map +1 -1
  333. package/tsOutputs/test-listener/agent.js +93 -150
  334. package/tsOutputs/test-listener/agent.js.map +1 -1
  335. package/tsOutputs/test-listener/api.js +36 -70
  336. package/tsOutputs/test-listener/api.js.map +1 -1
  337. package/tsOutputs/test-listener/base-proxy.js +25 -27
  338. package/tsOutputs/test-listener/base-proxy.js.map +1 -1
  339. package/tsOutputs/test-listener/bootstrap.js +6 -6
  340. package/tsOutputs/test-listener/bootstrap.js.map +1 -1
  341. package/tsOutputs/test-listener/child-process-patcher.js +10 -10
  342. package/tsOutputs/test-listener/child-process-patcher.js.map +1 -1
  343. package/tsOutputs/test-listener/cli.js +27 -30
  344. package/tsOutputs/test-listener/cli.js.map +1 -1
  345. package/tsOutputs/test-listener/coloring/http-coloring.js +30 -33
  346. package/tsOutputs/test-listener/coloring/http-coloring.js.map +1 -1
  347. package/tsOutputs/test-listener/coloring/listening-port.js +14 -17
  348. package/tsOutputs/test-listener/coloring/listening-port.js.map +1 -1
  349. package/tsOutputs/test-listener/command-line-arg-parser.js +12 -15
  350. package/tsOutputs/test-listener/command-line-arg-parser.js.map +1 -1
  351. package/tsOutputs/test-listener/config-process/config-loader.js +21 -22
  352. package/tsOutputs/test-listener/config-process/config-loader.js.map +1 -1
  353. package/tsOutputs/test-listener/config-process/config-system.js +100 -127
  354. package/tsOutputs/test-listener/config-process/config-system.js.map +1 -1
  355. package/tsOutputs/test-listener/config-process/index.js +38 -57
  356. package/tsOutputs/test-listener/config-process/index.js.map +1 -1
  357. package/tsOutputs/test-listener/config.js +38 -59
  358. package/tsOutputs/test-listener/config.js.map +1 -1
  359. package/tsOutputs/test-listener/entities/BasicConfigurationData.js +37 -64
  360. package/tsOutputs/test-listener/entities/BasicConfigurationData.js.map +1 -1
  361. package/tsOutputs/test-listener/entities/build-scanner/ConfigModeData.js +17 -42
  362. package/tsOutputs/test-listener/entities/build-scanner/ConfigModeData.js.map +1 -1
  363. package/tsOutputs/test-listener/entities/build-scanner/ScanModeData.js +19 -45
  364. package/tsOutputs/test-listener/entities/build-scanner/ScanModeData.js.map +1 -1
  365. package/tsOutputs/test-listener/environment-data-service.js +10 -11
  366. package/tsOutputs/test-listener/environment-data-service.js.map +1 -1
  367. package/tsOutputs/test-listener/execution-process/entities-mapper.js +11 -14
  368. package/tsOutputs/test-listener/execution-process/entities-mapper.js.map +1 -1
  369. package/tsOutputs/test-listener/execution-process/execution-service-proxy.js +54 -72
  370. package/tsOutputs/test-listener/execution-process/execution-service-proxy.js.map +1 -1
  371. package/tsOutputs/test-listener/execution-process/index.js +26 -26
  372. package/tsOutputs/test-listener/execution-process/index.js.map +1 -1
  373. package/tsOutputs/test-listener/factory.js +140 -175
  374. package/tsOutputs/test-listener/factory.js.map +1 -1
  375. package/tsOutputs/test-listener/footprints-process/footprints-service-proxy.js +17 -34
  376. package/tsOutputs/test-listener/footprints-process/footprints-service-proxy.js.map +1 -1
  377. package/tsOutputs/test-listener/footprints-process/index.js +53 -58
  378. package/tsOutputs/test-listener/footprints-process/index.js.map +1 -1
  379. package/tsOutputs/test-listener/footprints-process/istanbul-to-footprints-base.js +49 -50
  380. package/tsOutputs/test-listener/footprints-process/istanbul-to-footprints-base.js.map +1 -1
  381. package/tsOutputs/test-listener/footprints-process/istanbul-to-footprints-v3.js +98 -117
  382. package/tsOutputs/test-listener/footprints-process/istanbul-to-footprints-v3.js.map +1 -1
  383. package/tsOutputs/test-listener/footprints-process/ts-node-hits-collector.js +57 -141
  384. package/tsOutputs/test-listener/footprints-process/ts-node-hits-collector.js.map +1 -1
  385. package/tsOutputs/test-listener/integrations/SlGulp.js +25 -26
  386. package/tsOutputs/test-listener/integrations/SlGulp.js.map +1 -1
  387. package/tsOutputs/test-listener/logs-process/index.js +30 -35
  388. package/tsOutputs/test-listener/logs-process/index.js.map +1 -1
  389. package/tsOutputs/test-listener/logs-process/log-service-proxy.js +8 -25
  390. package/tsOutputs/test-listener/logs-process/log-service-proxy.js.map +1 -1
  391. package/tsOutputs/test-listener/nyc-report-executor-fpv6.js +53 -110
  392. package/tsOutputs/test-listener/nyc-report-executor-fpv6.js.map +1 -1
  393. package/tsOutputs/test-listener/nyc-report-executor.js +48 -85
  394. package/tsOutputs/test-listener/nyc-report-executor.js.map +1 -1
  395. package/tsOutputs/test-listener/otel-agent-loader.js +30 -33
  396. package/tsOutputs/test-listener/otel-agent-loader.js.map +1 -1
  397. package/tsOutputs/test-listener/queue.js +18 -36
  398. package/tsOutputs/test-listener/queue.js.map +1 -1
  399. package/tsOutputs/test-listener/remote-agent.js +97 -223
  400. package/tsOutputs/test-listener/remote-agent.js.map +1 -1
  401. package/tsOutputs/test-listener/resolvers/AppNameResolver.js +8 -25
  402. package/tsOutputs/test-listener/resolvers/AppNameResolver.js.map +1 -1
  403. package/tsOutputs/test-listener/resolvers/ArgumentResolver.js +11 -12
  404. package/tsOutputs/test-listener/resolvers/ArgumentResolver.js.map +1 -1
  405. package/tsOutputs/test-listener/resolvers/BuildResolver.js +8 -25
  406. package/tsOutputs/test-listener/resolvers/BuildResolver.js.map +1 -1
  407. package/tsOutputs/test-listener/resolvers/BuildSessionIdFileResolver.js +8 -25
  408. package/tsOutputs/test-listener/resolvers/BuildSessionIdFileResolver.js.map +1 -1
  409. package/tsOutputs/test-listener/resolvers/BuildSessionIdResolver.js +8 -25
  410. package/tsOutputs/test-listener/resolvers/BuildSessionIdResolver.js.map +1 -1
  411. package/tsOutputs/test-listener/resolvers/ProxyResolver.js +8 -25
  412. package/tsOutputs/test-listener/resolvers/ProxyResolver.js.map +1 -1
  413. package/tsOutputs/test-listener/resolvers/TokenResolver.js +8 -25
  414. package/tsOutputs/test-listener/resolvers/TokenResolver.js.map +1 -1
  415. package/tsOutputs/test-listener/state-tracker-process/index.js +54 -74
  416. package/tsOutputs/test-listener/state-tracker-process/index.js.map +1 -1
  417. package/tsOutputs/test-listener/state-tracker-process/state-tracker-proxy.js +18 -37
  418. package/tsOutputs/test-listener/state-tracker-process/state-tracker-proxy.js.map +1 -1
  419. package/tsOutputs/test-listener/test-recommendation-handler.js +66 -109
  420. package/tsOutputs/test-listener/test-recommendation-handler.js.map +1 -1
  421. package/tsOutputs/test-listener/upload-report-handler.js +33 -35
  422. package/tsOutputs/test-listener/upload-report-handler.js.map +1 -1
  423. package/tsOutputs/test-listener/utils.js +13 -14
  424. package/tsOutputs/test-listener/utils.js.map +1 -1
  425. package/tsOutputs/test-listener/uuid.js +7 -10
  426. package/tsOutputs/test-listener/uuid.js.map +1 -1
  427. package/tsOutputs/test-listener/wait-for-multiple-callbacks.js +17 -19
  428. package/tsOutputs/test-listener/wait-for-multiple-callbacks.js.map +1 -1
  429. package/tsOutputs/test-listener/watchdog.js +32 -51
  430. package/tsOutputs/test-listener/watchdog.js.map +1 -1
  431. package/tsOutputs/build-scanner/mappings/scm-file-fixer.js +0 -96
  432. 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
- var request = require("request");
41
- var contracts_1 = require("./contracts");
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
- var MockServerProxy = /** @class */ (function () {
46
- function MockServerProxy() {
47
- }
48
- MockServerProxy.getAllFootprints = function () {
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
- MockServerProxy.setRecommendedVersion = function (requestParams) {
59
- return __awaiter(this, void 0, void 0, function () {
60
- return __generator(this, function (_a) {
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
- MockServerProxy.createBuildSessionId = function (buildSessionParams) {
66
- return __awaiter(this, void 0, void 0, function () {
67
- return __generator(this, function (_a) {
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
- MockServerProxy.getBuildMapping = function () {
73
- return __awaiter(this, void 0, void 0, function () {
74
- return __generator(this, function (_a) {
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
- MockServerProxy.resetState = function () {
38
+ }
39
+ static resetState() {
83
40
  return this.executeSlRequest(this.RESET, contracts_1.HttpVerb.GET, false);
84
- };
85
- MockServerProxy.getToken = function () {
86
- return __awaiter(this, void 0, void 0, function () {
87
- return __generator(this, function (_a) {
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
- MockServerProxy.setActiveBSID = function (buildSessionId) {
93
- return __awaiter(this, void 0, void 0, function () {
94
- return __generator(this, function (_a) {
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
- MockServerProxy.getTestEvents = function () {
100
- return __awaiter(this, void 0, void 0, function () {
101
- return __generator(this, function (_a) {
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
- MockServerProxy.setTestExclusions = function (buildSessionId, testStage, setTestExclusionRequest) {
107
- return __awaiter(this, void 0, void 0, function () {
108
- var uri;
109
- return __generator(this, function (_a) {
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
- MockServerProxy.getRetryCounters = function () {
116
- return __awaiter(this, void 0, void 0, function () {
117
- return __generator(this, function (_a) {
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
- MockServerProxy.getAgentEvents = function () {
123
- return __awaiter(this, void 0, void 0, function () {
124
- return __generator(this, function (_a) {
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
- MockServerProxy.getBuildEndStatus = function () {
130
- return __awaiter(this, void 0, void 0, function () {
131
- return __generator(this, function (_a) {
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
- MockServerProxy.getLogs = function () {
137
- return __awaiter(this, void 0, void 0, function () {
138
- return __generator(this, function (_a) {
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
- MockServerProxy.setDelay = function (duration_ms, requestToBeDelayed) {
144
- var requestData = { duration_ms: duration_ms, requestToBeDelayed: requestToBeDelayed };
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
- MockServerProxy.setEnabled = function (enabled) {
148
- var requestData = { enabled: enabled };
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
- MockServerProxy.setConfig = function (config) {
90
+ }
91
+ static setConfig(config) {
152
92
  return this.executeSlRequest(MockServerProxy.SET_CONFIG, contracts_1.HttpVerb.POST, null, config);
153
- };
154
- MockServerProxy.setRouteSettings = function (url, verb, status, requestsBeforeStatusExpires) {
155
- return __awaiter(this, void 0, void 0, function () {
156
- var request;
157
- return __generator(this, function (_a) {
158
- request = {
159
- url: url,
160
- method: verb,
161
- settings: {
162
- requestsBeforeStatusExpires: requestsBeforeStatusExpires,
163
- status: status
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
- MockServerProxy.setTestExecution = function (execution) {
171
- return __awaiter(this, void 0, void 0, function () {
172
- return __generator(this, function (_a) {
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
- MockServerProxy.getTestExecution = function (labid) {
178
- return __awaiter(this, void 0, void 0, function () {
179
- return __generator(this, function (_a) {
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
- MockServerProxy.getSettings = function () {
185
- return __awaiter(this, void 0, void 0, function () {
186
- return __generator(this, function (_a) {
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
- MockServerProxy.executeSlRequest = function (uri, verb, shouldParse, requestData) {
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
- MockServerProxy.executeRequest = function (url, verb, shouldParse, requestData) {
196
- if (shouldParse === void 0) { shouldParse = true; }
197
- return new Promise(function (resolve, reject) {
198
- var options = {
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, function (err, resp, body) {
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
- var parsedResponse = JSON.parse(body);
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
- //TODO: extract to external 'routes' file
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":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,iCAAoC;AACpC,yCAQqB;AAMrB;;GAEG;AACH;IAAA;IAsJA,CAAC;IA3HuB,gCAAgB,GAApC;;;;4BACW,qBAAM,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC,kBAAkB,EAAE,oBAAQ,CAAC,GAAG,CAAC,EAAA;4BAAzE,sBAAO,SAAkE,EAAC;;;;KAC7E;IAEmB,qCAAqB,GAAzC,UAA0C,aAAa;;;gBACnD,sBAAO,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC,uBAAuB,EAAE,oBAAQ,CAAC,IAAI,EAAE,IAAI,EAAE,aAAa,CAAC,EAAC;;;KAClG;IAEmB,oCAAoB,GAAxC,UAAyC,kBAAuC;;;gBAC5E,sBAAO,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC,sBAAsB,EAAE,oBAAQ,CAAC,IAAI,EAAE,KAAK,EAAE,kBAAkB,CAAC,EAAC;;;KACvG;IAEmB,+BAAe,GAAnC;;;;4BACW,qBAAM,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC,iBAAiB,EAAE,oBAAQ,CAAC,GAAG,CAAC,EAAA;4BAAxE,sBAAO,SAAiE,EAAC;;;;KAC5E;IAEa,0BAAU,GAAxB;QAC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CAAC;AACpC,kCAAkB,GAAG,sBAAsB,CAAC;AAC5C,iCAAiB,GAAG,wBAAwB,CAAC;AAC7C,qBAAK,GAAG,iBAAiB,CAAC;AAC1B,yBAAS,GAAG,iBAAiB,CAAC;AAC9B,sCAAsB,GAAG,6BAA6B,CAAC;AACvD,uCAAuB,GAAG,uBAAuB,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
- var TimerUtils = /** @class */ (function () {
5
- function TimerUtils() {
4
+ class TimerUtils {
5
+ static sleep(timeout) {
6
+ return new Promise(resolve => { setTimeout(resolve, timeout); });
6
7
  }
7
- TimerUtils.sleep = function (timeout) {
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;IAAA;IAIA,CAAC;IAHiB,gBAAK,GAAnB,UAAoB,OAAe;QAC/B,OAAO,IAAI,OAAO,CAAC,UAAA,OAAO,IAAK,UAAU,CAAC,OAAO,EAAE,OAAO,CAAC,CAAA,CAAA,CAAC,CAAC,CAAA;IACjE,CAAC;IACL,iBAAC;AAAD,CAAC,AAJD,IAIC;AAJY,gCAAU"}
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
- var jwtDecode = require("jwt-decode");
20
- var abstract_data_builder_1 = require("./abstract-data-builder");
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
- var TokenDataBuilder = /** @class */ (function (_super) {
25
- __extends(TokenDataBuilder, _super);
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
- var rawToken = this.getRawToken(cmd);
34
- var decodedToken = this.getDecodedToken(rawToken);
35
- var customerId = this.getCustomerId(decodedToken);
36
- var server = decodedToken[TokenDataBuilder.SERVER_KEY];
37
- var isValid = this.isValidToken(decodedToken);
38
- return { token: rawToken, customerid: customerId, server: server, isValid: isValid };
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
- TokenDataBuilder.prototype.getDecodedToken = function (rawToken) {
25
+ getDecodedToken(rawToken) {
45
26
  try {
46
27
  return jwtDecode(rawToken);
47
28
  }
48
29
  catch (e) {
49
- this.logger.warn("Failed to decode token data. Error ".concat(e));
30
+ this.logger.warn(`Failed to decode token data. Error ${e}`);
50
31
  return {};
51
32
  }
52
- };
53
- TokenDataBuilder.prototype.getRawToken = function (cmd) {
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
- TokenDataBuilder.prototype.validateTokenArgs = function (cmd) {
62
- var missingKeys = !cmd.token && !cmd.tokenfile;
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
- TokenDataBuilder.prototype.getCustomerId = function (decodedToken) {
69
- var subject = decodedToken[TokenDataBuilder.SUBJECT_KEY] || '';
48
+ }
49
+ getCustomerId(decodedToken) {
50
+ const subject = decodedToken[TokenDataBuilder.SUBJECT_KEY] || '';
70
51
  return subject.split('@')[0];
71
- };
72
- TokenDataBuilder.prototype.isValidToken = function (decodedToken) {
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("Token Is Invalid. Expected role to be ".concat(TokenDataBuilder.AGENT_ROLE, " but got ").concat(decodedToken[TokenDataBuilder.ROLE_KEY]));
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
- TokenDataBuilder.SUBJECT_KEY = 'subject';
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":";;;;;;;;;;;;;;;;;;AAAA,sCAAwC;AACxC,iEAA4D;AAG5D;;GAEG;AACH;IAAsC,oCAAmB;IAAzD;;IA0EA,CAAC;IApEU,gCAAK,GAAZ,UAAa,GAAe;QACxB,IAAG,CAAC,IAAI,CAAC,iBAAiB,CAAC,GAAG,CAAC,EAAE;YAC7B,OAAmB,EAAC,OAAO,EAAE,KAAK,EAAC,CAAC;SACvC;QACD,IAAM,QAAQ,GAAG,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC;QACvC,IAAM,YAAY,GAAG,IAAI,CAAC,eAAe,CAAC,QAAQ,CAAC,CAAC;QACpD,IAAM,UAAU,GAAG,IAAI,CAAC,aAAa,CAAC,YAAY,CAAC,CAAC;QACpD,IAAM,MAAM,GAAG,YAAY,CAAC,gBAAgB,CAAC,UAAU,CAAC,CAAC;QACzD,IAAM,OAAO,GAAG,IAAI,CAAC,YAAY,CAAC,YAAY,CAAC,CAAC;QAChD,OAAO,EAAC,KAAK,EAAE,QAAQ,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,QAAA,EAAE,OAAO,SAAA,EAAC,CAAA;IACrE,CAAC;IAED;;;OAGG;IACK,0CAAe,GAAvB,UAAwB,QAAgB;QACpC,IAAI;YACA,OAAO,SAAS,CAAC,QAAQ,CAAC,CAAC;SAC9B;QAAC,OAAO,CAAC,EAAE;YACR,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,6CAAsC,CAAC,CAAE,CAAC,CAAC;YAC5D,OAAO,EAAE,CAAC;SACb;IACL,CAAC;IAES,sCAAW,GAArB,UAAsB,GAAe;QACjC,IAAG,GAAG,CAAC,KAAK,EAAC;YACT,OAAO,GAAG,CAAC,KAAK,CAAC;SACpB;aACI,IAAI,GAAG,CAAC,SAAS,EAAE;YACrB,OAAO,IAAI,CAAC,WAA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;QACD,IAAG,YAAY,CAAC,gBAAgB,CAAC,QAAQ,CAAC,IAAI,gBAAgB,CAAC,UAAU,EAAC;YACtE,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,yCAAyC,gBAAgB,CAAC,UAAU,YAAY,YAAY,CAAC,gBAAgB,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC;YAC7I,OAAO,KAAK,CAAC;SAChB;QACD,OAAO,IAAI,CAAC;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,3 +1,7 @@
1
1
  export declare class ValidationUtils {
2
2
  static verifyNotNullOrEmpty(value: any, paramName: string): void;
3
+ static verifyNotNullOrEmptyMultiParams(params: {
4
+ value: any;
5
+ paramName: string;
6
+ }[]): void;
3
7
  }
@@ -1,19 +1,22 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.ValidationUtils = void 0;
4
- var constants_1 = require("../constants/constants");
5
- var ValidationUtils = /** @class */ (function () {
6
- function ValidationUtils() {
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("".concat(paramName, " ").concat(constants_1.Constants.Messages.CANNOT_BE_NULL_OR_UNDEFINED, "."));
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("".concat(paramName, " ").concat(constants_1.Constants.Messages.CANNOT_BE_EMPTY_STRING, "."));
11
+ throw new Error(`${paramName} ${constants_1.Constants.Messages.CANNOT_BE_EMPTY_STRING}.`);
12
+ }
13
+ }
14
+ static verifyNotNullOrEmptyMultiParams(params) {
15
+ for (const param of params) {
16
+ const { value, paramName } = param;
17
+ ValidationUtils.verifyNotNullOrEmpty(value, paramName);
14
18
  }
15
- };
16
- return ValidationUtils;
17
- }());
19
+ }
20
+ }
18
21
  exports.ValidationUtils = ValidationUtils;
19
22
  //# sourceMappingURL=validation-utils.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"validation-utils.js","sourceRoot":"","sources":["../../../common/utils/validation-utils.ts"],"names":[],"mappings":";;;AAAA,oDAAmD;AAEnD;IAAA;IAYA,CAAC;IAXiB,oCAAoB,GAAlC,UAAmC,KAAU,EAAE,SAAiB;QAC5D,IAAI,KAAK,KAAK,SAAS,IAAI,KAAK,KAAK,IAAI,EAAC;YACtC,MAAM,IAAI,KAAK,CAAC,UAAG,SAAS,cAAI,qBAAS,CAAC,QAAQ,CAAC,2BAA2B,MAAG,CAAC,CAAA;SACrF;QAED,IAAI,OAAM,CAAC,KAAK,CAAC,KAAK,QAAQ,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC,EACpD;YACI,MAAM,IAAI,KAAK,CAAC,UAAG,SAAS,cAAI,qBAAS,CAAC,QAAQ,CAAC,sBAAsB,MAAG,CAAC,CAAA;SAChF;IACL,CAAC;IAEL,sBAAC;AAAD,CAAC,AAZD,IAYC;AAZY,0CAAe"}
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,KAA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