slnodejs 6.1.410 → 6.1.429

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (431) hide show
  1. package/browser-agent/dist/browser-agent-all.js +33 -28
  2. package/browser-agent/dist/browser-agent-all.min.js +2 -2
  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 +36 -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 +57 -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 +106 -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 +74 -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/contracts.d.ts +2 -0
  95. package/tsOutputs/cli-parse/contracts.js.map +1 -1
  96. package/tsOutputs/cli-parse/custom-commander.js +17 -18
  97. package/tsOutputs/cli-parse/custom-commander.js.map +1 -1
  98. package/tsOutputs/cli-parse/executors/base-executor.js +121 -236
  99. package/tsOutputs/cli-parse/executors/base-executor.js.map +1 -1
  100. package/tsOutputs/cli-parse/executors/build-args-dto.js +11 -11
  101. package/tsOutputs/cli-parse/executors/build-args-dto.js.map +1 -1
  102. package/tsOutputs/cli-parse/executors/build-end-executor.js +34 -92
  103. package/tsOutputs/cli-parse/executors/build-end-executor.js.map +1 -1
  104. package/tsOutputs/cli-parse/executors/build-executor.js +68 -132
  105. package/tsOutputs/cli-parse/executors/build-executor.js.map +1 -1
  106. package/tsOutputs/cli-parse/executors/config-executor.js +35 -92
  107. package/tsOutputs/cli-parse/executors/config-executor.js.map +1 -1
  108. package/tsOutputs/cli-parse/executors/dry-run/base-data.js +29 -39
  109. package/tsOutputs/cli-parse/executors/dry-run/base-data.js.map +1 -1
  110. package/tsOutputs/cli-parse/executors/dry-run/build-mapping-data.js +92 -177
  111. package/tsOutputs/cli-parse/executors/dry-run/build-mapping-data.js.map +1 -1
  112. package/tsOutputs/cli-parse/executors/dry-run/dry-run-executor.js +110 -194
  113. package/tsOutputs/cli-parse/executors/dry-run/dry-run-executor.js.map +1 -1
  114. package/tsOutputs/cli-parse/executors/dry-run/dry-run-validation.js +49 -83
  115. package/tsOutputs/cli-parse/executors/dry-run/dry-run-validation.js.map +1 -1
  116. package/tsOutputs/cli-parse/executors/dry-run/footprints-data.js +55 -113
  117. package/tsOutputs/cli-parse/executors/dry-run/footprints-data.js.map +1 -1
  118. package/tsOutputs/cli-parse/executors/dry-run/helper-methods.js +24 -25
  119. package/tsOutputs/cli-parse/executors/dry-run/helper-methods.js.map +1 -1
  120. package/tsOutputs/cli-parse/executors/end-execution-executor.js +16 -64
  121. package/tsOutputs/cli-parse/executors/end-execution-executor.js.map +1 -1
  122. package/tsOutputs/cli-parse/executors/integration-build-components-executor.js +29 -82
  123. package/tsOutputs/cli-parse/executors/integration-build-components-executor.js.map +1 -1
  124. package/tsOutputs/cli-parse/executors/integration-build-delete-components-executor.js +12 -59
  125. package/tsOutputs/cli-parse/executors/integration-build-delete-components-executor.js.map +1 -1
  126. package/tsOutputs/cli-parse/executors/integration-build-update-components-executor.js +9 -58
  127. package/tsOutputs/cli-parse/executors/integration-build-update-components-executor.js.map +1 -1
  128. package/tsOutputs/cli-parse/executors/mocha-executor.js +41 -101
  129. package/tsOutputs/cli-parse/executors/mocha-executor.js.map +1 -1
  130. package/tsOutputs/cli-parse/executors/nyc-report-executor.js +24 -83
  131. package/tsOutputs/cli-parse/executors/nyc-report-executor.js.map +1 -1
  132. package/tsOutputs/cli-parse/executors/pr-config-executor.js +15 -63
  133. package/tsOutputs/cli-parse/executors/pr-config-executor.js.map +1 -1
  134. package/tsOutputs/cli-parse/executors/run-executor.js +23 -75
  135. package/tsOutputs/cli-parse/executors/run-executor.js.map +1 -1
  136. package/tsOutputs/cli-parse/executors/start-execution-executor.js +16 -64
  137. package/tsOutputs/cli-parse/executors/start-execution-executor.js.map +1 -1
  138. package/tsOutputs/cli-parse/executors/test-executions-executor.js +9 -63
  139. package/tsOutputs/cli-parse/executors/test-executions-executor.js.map +1 -1
  140. package/tsOutputs/cli-parse/executors/test-listener-executor.js +47 -117
  141. package/tsOutputs/cli-parse/executors/test-listener-executor.js.map +1 -1
  142. package/tsOutputs/cli-parse/executors/upload-report-executor.js +23 -71
  143. package/tsOutputs/cli-parse/executors/upload-report-executor.js.map +1 -1
  144. package/tsOutputs/cli-parse/utils.js +10 -10
  145. package/tsOutputs/cli-parse/utils.js.map +1 -1
  146. package/tsOutputs/common/agent-events/agent-events-controller.js +146 -251
  147. package/tsOutputs/common/agent-events/agent-events-controller.js.map +1 -1
  148. package/tsOutputs/common/agent-events/agent-events-guard.js +12 -15
  149. package/tsOutputs/common/agent-events/agent-events-guard.js.map +1 -1
  150. package/tsOutputs/common/agent-events/agent-instance-info-builder.js +22 -24
  151. package/tsOutputs/common/agent-events/agent-instance-info-builder.js.map +1 -1
  152. package/tsOutputs/common/agent-events/agent-start-info-builder.js +7 -8
  153. package/tsOutputs/common/agent-events/agent-start-info-builder.js.map +1 -1
  154. package/tsOutputs/common/agent-events/browser-info-builder.js +9 -10
  155. package/tsOutputs/common/agent-events/browser-info-builder.js.map +1 -1
  156. package/tsOutputs/common/agent-events/ci-info-builder.js +12 -13
  157. package/tsOutputs/common/agent-events/ci-info-builder.js.map +1 -1
  158. package/tsOutputs/common/agent-events/cockpit-notifier.js +38 -87
  159. package/tsOutputs/common/agent-events/cockpit-notifier.js.map +1 -1
  160. package/tsOutputs/common/agent-events/dry-run-agent-events-controller.js +10 -27
  161. package/tsOutputs/common/agent-events/dry-run-agent-events-controller.js.map +1 -1
  162. package/tsOutputs/common/agent-events/machine-info-builder.js +21 -22
  163. package/tsOutputs/common/agent-events/machine-info-builder.js.map +1 -1
  164. package/tsOutputs/common/agent-events/no-op-agent-events-controller.js +30 -84
  165. package/tsOutputs/common/agent-events/no-op-agent-events-controller.js.map +1 -1
  166. package/tsOutputs/common/agent-events/nodejs-env-info-builder.js +7 -8
  167. package/tsOutputs/common/agent-events/nodejs-env-info-builder.js.map +1 -1
  168. package/tsOutputs/common/agent-events/sensitive-data-filter.js +3 -4
  169. package/tsOutputs/common/agent-events/sensitive-data-filter.js.map +1 -1
  170. package/tsOutputs/common/agent-instance-data.js +23 -28
  171. package/tsOutputs/common/agent-instance-data.js.map +1 -1
  172. package/tsOutputs/common/cli-progress.js +16 -19
  173. package/tsOutputs/common/cli-progress.js.map +1 -1
  174. package/tsOutputs/common/config-process/config-loader.js +23 -24
  175. package/tsOutputs/common/config-process/config-loader.js.map +1 -1
  176. package/tsOutputs/common/config-process/config-system.js +104 -131
  177. package/tsOutputs/common/config-process/config-system.js.map +1 -1
  178. package/tsOutputs/common/config-process/config.js +52 -73
  179. package/tsOutputs/common/config-process/config.js.map +1 -1
  180. package/tsOutputs/common/config-process/index.js +38 -57
  181. package/tsOutputs/common/config-process/index.js.map +1 -1
  182. package/tsOutputs/common/config-process/no-op-config-process.js +9 -29
  183. package/tsOutputs/common/config-process/no-op-config-process.js.map +1 -1
  184. package/tsOutputs/common/constants/constants.js +19 -25
  185. package/tsOutputs/common/constants/constants.js.map +1 -1
  186. package/tsOutputs/common/constants/sl-env-vars.js +125 -131
  187. package/tsOutputs/common/constants/sl-env-vars.js.map +1 -1
  188. package/tsOutputs/common/coverage-elements/file-element.js +66 -103
  189. package/tsOutputs/common/coverage-elements/file-element.js.map +1 -1
  190. package/tsOutputs/common/coverage-elements/istanbul-unique-id-converter.js +28 -47
  191. package/tsOutputs/common/coverage-elements/istanbul-unique-id-converter.js.map +1 -1
  192. package/tsOutputs/common/coverage-elements/new-id-resolver.js +17 -17
  193. package/tsOutputs/common/coverage-elements/new-id-resolver.js.map +1 -1
  194. package/tsOutputs/common/coverage-elements/original-module-loader.js +71 -79
  195. package/tsOutputs/common/coverage-elements/original-module-loader.js.map +1 -1
  196. package/tsOutputs/common/coverage-elements/unique-id-converter.js +90 -110
  197. package/tsOutputs/common/coverage-elements/unique-id-converter.js.map +1 -1
  198. package/tsOutputs/common/environment-data-service.js +10 -11
  199. package/tsOutputs/common/environment-data-service.js.map +1 -1
  200. package/tsOutputs/common/events-process/events-creator.js +20 -32
  201. package/tsOutputs/common/events-process/events-creator.js.map +1 -1
  202. package/tsOutputs/common/events-process/index.js +97 -186
  203. package/tsOutputs/common/events-process/index.js.map +1 -1
  204. package/tsOutputs/common/footprints-process/collection-interval.js +10 -11
  205. package/tsOutputs/common/footprints-process/collection-interval.js.map +1 -1
  206. package/tsOutputs/common/footprints-process/footprints-service-proxy.js +21 -22
  207. package/tsOutputs/common/footprints-process/footprints-service-proxy.js.map +1 -1
  208. package/tsOutputs/common/footprints-process/index.js +68 -102
  209. package/tsOutputs/common/footprints-process/index.js.map +1 -1
  210. package/tsOutputs/common/footprints-process/istanbul-to-footprints-contract.js +2 -5
  211. package/tsOutputs/common/footprints-process/istanbul-to-footprints-contract.js.map +1 -1
  212. package/tsOutputs/common/footprints-process/istanbul-to-footprints.js +160 -162
  213. package/tsOutputs/common/footprints-process/istanbul-to-footprints.js.map +1 -1
  214. package/tsOutputs/common/footprints-process/production-footprints-handler.js +103 -156
  215. package/tsOutputs/common/footprints-process/production-footprints-handler.js.map +1 -1
  216. package/tsOutputs/common/footprints-process-v6/base-browser-hits-converter.js +30 -48
  217. package/tsOutputs/common/footprints-process-v6/base-browser-hits-converter.js.map +1 -1
  218. package/tsOutputs/common/footprints-process-v6/browser-footprints-buffer.js +7 -25
  219. package/tsOutputs/common/footprints-process-v6/browser-footprints-buffer.js.map +1 -1
  220. package/tsOutputs/common/footprints-process-v6/buffer-size-helper.js +13 -14
  221. package/tsOutputs/common/footprints-process-v6/buffer-size-helper.js.map +1 -1
  222. package/tsOutputs/common/footprints-process-v6/collector-footprints-buffer.js +14 -32
  223. package/tsOutputs/common/footprints-process-v6/collector-footprints-buffer.js.map +1 -1
  224. package/tsOutputs/common/footprints-process-v6/collector-footprints-process.js +43 -109
  225. package/tsOutputs/common/footprints-process-v6/collector-footprints-process.js.map +1 -1
  226. package/tsOutputs/common/footprints-process-v6/contracts.js +2 -5
  227. package/tsOutputs/common/footprints-process-v6/contracts.js.map +1 -1
  228. package/tsOutputs/common/footprints-process-v6/footprints-buffer.js +55 -78
  229. package/tsOutputs/common/footprints-process-v6/footprints-buffer.js.map +1 -1
  230. package/tsOutputs/common/footprints-process-v6/hits-collector.js +89 -129
  231. package/tsOutputs/common/footprints-process-v6/hits-collector.js.map +1 -1
  232. package/tsOutputs/common/footprints-process-v6/hits-converter.js +70 -78
  233. package/tsOutputs/common/footprints-process-v6/hits-converter.js.map +1 -1
  234. package/tsOutputs/common/footprints-process-v6/index.js +204 -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 +6 -9
  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.js +7 -10
  315. package/tsOutputs/common/utils/validation-utils.js.map +1 -1
  316. package/tsOutputs/common/uuid.js +7 -10
  317. package/tsOutputs/common/uuid.js.map +1 -1
  318. package/tsOutputs/common/v8-utils.js +12 -50
  319. package/tsOutputs/common/v8-utils.js.map +1 -1
  320. package/tsOutputs/common/watchdog.js +35 -56
  321. package/tsOutputs/common/watchdog.js.map +1 -1
  322. package/tsOutputs/mocha-reporter/index.js +12 -12
  323. package/tsOutputs/mocha-reporter/index.js.map +1 -1
  324. package/tsOutputs/mocha-reporter/otel-agent.js +47 -118
  325. package/tsOutputs/mocha-reporter/otel-agent.js.map +1 -1
  326. package/tsOutputs/test-listener/SlNodeJsProxy.js +34 -35
  327. package/tsOutputs/test-listener/SlNodeJsProxy.js.map +1 -1
  328. package/tsOutputs/test-listener/UserMessageHelper.js +14 -19
  329. package/tsOutputs/test-listener/UserMessageHelper.js.map +1 -1
  330. package/tsOutputs/test-listener/agent-loader.js +42 -59
  331. package/tsOutputs/test-listener/agent-loader.js.map +1 -1
  332. package/tsOutputs/test-listener/agent.js +93 -150
  333. package/tsOutputs/test-listener/agent.js.map +1 -1
  334. package/tsOutputs/test-listener/api.js +36 -70
  335. package/tsOutputs/test-listener/api.js.map +1 -1
  336. package/tsOutputs/test-listener/base-proxy.js +25 -27
  337. package/tsOutputs/test-listener/base-proxy.js.map +1 -1
  338. package/tsOutputs/test-listener/bootstrap.js +6 -6
  339. package/tsOutputs/test-listener/bootstrap.js.map +1 -1
  340. package/tsOutputs/test-listener/child-process-patcher.js +10 -10
  341. package/tsOutputs/test-listener/child-process-patcher.js.map +1 -1
  342. package/tsOutputs/test-listener/cli.js +27 -30
  343. package/tsOutputs/test-listener/cli.js.map +1 -1
  344. package/tsOutputs/test-listener/coloring/http-coloring.js +30 -33
  345. package/tsOutputs/test-listener/coloring/http-coloring.js.map +1 -1
  346. package/tsOutputs/test-listener/coloring/listening-port.js +14 -17
  347. package/tsOutputs/test-listener/coloring/listening-port.js.map +1 -1
  348. package/tsOutputs/test-listener/command-line-arg-parser.js +12 -15
  349. package/tsOutputs/test-listener/command-line-arg-parser.js.map +1 -1
  350. package/tsOutputs/test-listener/config-process/config-loader.js +21 -22
  351. package/tsOutputs/test-listener/config-process/config-loader.js.map +1 -1
  352. package/tsOutputs/test-listener/config-process/config-system.js +100 -127
  353. package/tsOutputs/test-listener/config-process/config-system.js.map +1 -1
  354. package/tsOutputs/test-listener/config-process/index.js +38 -57
  355. package/tsOutputs/test-listener/config-process/index.js.map +1 -1
  356. package/tsOutputs/test-listener/config.js +38 -59
  357. package/tsOutputs/test-listener/config.js.map +1 -1
  358. package/tsOutputs/test-listener/entities/BasicConfigurationData.js +37 -64
  359. package/tsOutputs/test-listener/entities/BasicConfigurationData.js.map +1 -1
  360. package/tsOutputs/test-listener/entities/build-scanner/ConfigModeData.js +17 -42
  361. package/tsOutputs/test-listener/entities/build-scanner/ConfigModeData.js.map +1 -1
  362. package/tsOutputs/test-listener/entities/build-scanner/ScanModeData.js +19 -45
  363. package/tsOutputs/test-listener/entities/build-scanner/ScanModeData.js.map +1 -1
  364. package/tsOutputs/test-listener/environment-data-service.js +10 -11
  365. package/tsOutputs/test-listener/environment-data-service.js.map +1 -1
  366. package/tsOutputs/test-listener/execution-process/entities-mapper.js +11 -14
  367. package/tsOutputs/test-listener/execution-process/entities-mapper.js.map +1 -1
  368. package/tsOutputs/test-listener/execution-process/execution-service-proxy.js +54 -72
  369. package/tsOutputs/test-listener/execution-process/execution-service-proxy.js.map +1 -1
  370. package/tsOutputs/test-listener/execution-process/index.js +26 -26
  371. package/tsOutputs/test-listener/execution-process/index.js.map +1 -1
  372. package/tsOutputs/test-listener/factory.js +140 -175
  373. package/tsOutputs/test-listener/factory.js.map +1 -1
  374. package/tsOutputs/test-listener/footprints-process/footprints-service-proxy.js +17 -34
  375. package/tsOutputs/test-listener/footprints-process/footprints-service-proxy.js.map +1 -1
  376. package/tsOutputs/test-listener/footprints-process/index.js +53 -58
  377. package/tsOutputs/test-listener/footprints-process/index.js.map +1 -1
  378. package/tsOutputs/test-listener/footprints-process/istanbul-to-footprints-base.js +49 -50
  379. package/tsOutputs/test-listener/footprints-process/istanbul-to-footprints-base.js.map +1 -1
  380. package/tsOutputs/test-listener/footprints-process/istanbul-to-footprints-v3.js +98 -117
  381. package/tsOutputs/test-listener/footprints-process/istanbul-to-footprints-v3.js.map +1 -1
  382. package/tsOutputs/test-listener/footprints-process/ts-node-hits-collector.js +57 -141
  383. package/tsOutputs/test-listener/footprints-process/ts-node-hits-collector.js.map +1 -1
  384. package/tsOutputs/test-listener/integrations/SlGulp.js +25 -26
  385. package/tsOutputs/test-listener/integrations/SlGulp.js.map +1 -1
  386. package/tsOutputs/test-listener/logs-process/index.js +30 -35
  387. package/tsOutputs/test-listener/logs-process/index.js.map +1 -1
  388. package/tsOutputs/test-listener/logs-process/log-service-proxy.js +8 -25
  389. package/tsOutputs/test-listener/logs-process/log-service-proxy.js.map +1 -1
  390. package/tsOutputs/test-listener/nyc-report-executor-fpv6.js +53 -110
  391. package/tsOutputs/test-listener/nyc-report-executor-fpv6.js.map +1 -1
  392. package/tsOutputs/test-listener/nyc-report-executor.js +48 -85
  393. package/tsOutputs/test-listener/nyc-report-executor.js.map +1 -1
  394. package/tsOutputs/test-listener/otel-agent-loader.js +30 -33
  395. package/tsOutputs/test-listener/otel-agent-loader.js.map +1 -1
  396. package/tsOutputs/test-listener/queue.js +18 -36
  397. package/tsOutputs/test-listener/queue.js.map +1 -1
  398. package/tsOutputs/test-listener/remote-agent.js +97 -223
  399. package/tsOutputs/test-listener/remote-agent.js.map +1 -1
  400. package/tsOutputs/test-listener/resolvers/AppNameResolver.js +8 -25
  401. package/tsOutputs/test-listener/resolvers/AppNameResolver.js.map +1 -1
  402. package/tsOutputs/test-listener/resolvers/ArgumentResolver.js +11 -12
  403. package/tsOutputs/test-listener/resolvers/ArgumentResolver.js.map +1 -1
  404. package/tsOutputs/test-listener/resolvers/BuildResolver.js +8 -25
  405. package/tsOutputs/test-listener/resolvers/BuildResolver.js.map +1 -1
  406. package/tsOutputs/test-listener/resolvers/BuildSessionIdFileResolver.js +8 -25
  407. package/tsOutputs/test-listener/resolvers/BuildSessionIdFileResolver.js.map +1 -1
  408. package/tsOutputs/test-listener/resolvers/BuildSessionIdResolver.js +8 -25
  409. package/tsOutputs/test-listener/resolvers/BuildSessionIdResolver.js.map +1 -1
  410. package/tsOutputs/test-listener/resolvers/ProxyResolver.js +8 -25
  411. package/tsOutputs/test-listener/resolvers/ProxyResolver.js.map +1 -1
  412. package/tsOutputs/test-listener/resolvers/TokenResolver.js +8 -25
  413. package/tsOutputs/test-listener/resolvers/TokenResolver.js.map +1 -1
  414. package/tsOutputs/test-listener/state-tracker-process/index.js +54 -74
  415. package/tsOutputs/test-listener/state-tracker-process/index.js.map +1 -1
  416. package/tsOutputs/test-listener/state-tracker-process/state-tracker-proxy.js +18 -37
  417. package/tsOutputs/test-listener/state-tracker-process/state-tracker-proxy.js.map +1 -1
  418. package/tsOutputs/test-listener/test-recommendation-handler.js +66 -109
  419. package/tsOutputs/test-listener/test-recommendation-handler.js.map +1 -1
  420. package/tsOutputs/test-listener/upload-report-handler.js +33 -35
  421. package/tsOutputs/test-listener/upload-report-handler.js.map +1 -1
  422. package/tsOutputs/test-listener/utils.js +13 -14
  423. package/tsOutputs/test-listener/utils.js.map +1 -1
  424. package/tsOutputs/test-listener/uuid.js +7 -10
  425. package/tsOutputs/test-listener/uuid.js.map +1 -1
  426. package/tsOutputs/test-listener/wait-for-multiple-callbacks.js +17 -19
  427. package/tsOutputs/test-listener/wait-for-multiple-callbacks.js.map +1 -1
  428. package/tsOutputs/test-listener/watchdog.js +32 -51
  429. package/tsOutputs/test-listener/watchdog.js.map +1 -1
  430. package/tsOutputs/build-scanner/mappings/scm-file-fixer.js +0 -96
  431. package/tsOutputs/build-scanner/mappings/scm-file-fixer.js.map +0 -1
@@ -8,91 +8,57 @@ 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.BackendProxy = void 0;
40
- var contracts_1 = require("./contracts");
41
- var http_client_1 = require("./http-client");
42
- var sl_routes_1 = require("./sl-routes");
43
- var validation_utils_1 = require("../utils/validation-utils");
44
- var entities_mapper_1 = require("./entities-mapper");
45
- var constants_1 = require("../constants/constants");
46
- var sl_env_vars_1 = require("../constants/sl-env-vars");
47
- var timer_utils_1 = require("../utils/timer-utils");
48
- var BackendProxy = /** @class */ (function () {
13
+ const contracts_1 = require("./contracts");
14
+ const http_client_1 = require("./http-client");
15
+ const sl_routes_1 = require("./sl-routes");
16
+ const validation_utils_1 = require("../utils/validation-utils");
17
+ const entities_mapper_1 = require("./entities-mapper");
18
+ const constants_1 = require("../constants/constants");
19
+ const sl_env_vars_1 = require("../constants/sl-env-vars");
20
+ const timer_utils_1 = require("../utils/timer-utils");
21
+ class BackendProxy {
49
22
  // TODO: get httpClient in constructor always
50
- function BackendProxy(agentInstanceData, config, logger, httpClient) {
23
+ constructor(agentInstanceData, config, logger, httpClient) {
51
24
  this.agentInstanceData = agentInstanceData;
52
25
  this.config = config;
53
26
  this.logger = logger;
54
27
  this.client = httpClient || new http_client_1.HttpClient(this.config, this.logger);
55
28
  }
56
- BackendProxy.prototype.getBuildSession = function (buildSessionId, callback) {
57
- var _this = this;
29
+ getBuildSession(buildSessionId, callback) {
58
30
  validation_utils_1.ValidationUtils.verifyNotNullOrEmpty(buildSessionId, constants_1.Constants.BUILD_SESSION_ID);
59
- var url = sl_routes_1.SLRoutes.buildSessionV2(buildSessionId);
60
- this.client.get(url, function (err, body) {
61
- _this.invokeCallback(callback, err, body);
31
+ const url = sl_routes_1.SLRoutes.buildSessionV2(buildSessionId);
32
+ this.client.get(url, (err, body) => {
33
+ this.invokeCallback(callback, err, body);
62
34
  });
63
- };
64
- BackendProxy.prototype.createBuildSessionId = function (request, callback) {
65
- var _this = this;
35
+ }
36
+ createBuildSessionId(request, callback) {
66
37
  validation_utils_1.ValidationUtils.verifyNotNullOrEmpty(request, constants_1.Constants.REQUEST);
67
- var url = sl_routes_1.SLRoutes.buildSessionV2();
68
- this.client.post(request, url, function (err, body) {
69
- _this.invokeCallback(callback, err, body, entities_mapper_1.EntitiesMapper.toCreateBuildSessionIdResponse);
38
+ const url = sl_routes_1.SLRoutes.buildSessionV2();
39
+ this.client.post(request, url, (err, body) => {
40
+ this.invokeCallback(callback, err, body, entities_mapper_1.EntitiesMapper.toCreateBuildSessionIdResponse);
70
41
  });
71
- };
72
- BackendProxy.prototype.createBuildSessionIdPromise = function (request) {
73
- return __awaiter(this, void 0, void 0, function () {
74
- var url;
75
- var _this = this;
76
- return __generator(this, function (_a) {
77
- validation_utils_1.ValidationUtils.verifyNotNullOrEmpty(request, constants_1.Constants.REQUEST);
78
- url = constants_1.Constants.PULL_REQUEST_PARAMS in request ? sl_routes_1.SLRoutes.prBuildSession() : sl_routes_1.SLRoutes.buildSessionV2();
79
- return [2 /*return*/, new Promise(function (resolve, reject) {
80
- _this.client.post(request, url, function (err, body) {
81
- if (err) {
82
- return reject(err);
83
- }
84
- return resolve(body);
85
- });
86
- })];
42
+ }
43
+ createBuildSessionIdPromise(request) {
44
+ return __awaiter(this, void 0, void 0, function* () {
45
+ validation_utils_1.ValidationUtils.verifyNotNullOrEmpty(request, constants_1.Constants.REQUEST);
46
+ const url = constants_1.Constants.PULL_REQUEST_PARAMS in request ? sl_routes_1.SLRoutes.prBuildSession() : sl_routes_1.SLRoutes.buildSessionV2();
47
+ return new Promise((resolve, reject) => {
48
+ this.client.post(request, url, (err, body) => {
49
+ if (err) {
50
+ return reject(err);
51
+ }
52
+ return resolve(body);
53
+ });
87
54
  });
88
55
  });
89
- };
90
- BackendProxy.prototype.getRecommendedVersion = function (request) {
91
- var _this = this;
56
+ }
57
+ getRecommendedVersion(request) {
92
58
  validation_utils_1.ValidationUtils.verifyNotNullOrEmpty(request, constants_1.Constants.REQUEST);
93
- var url = sl_routes_1.SLRoutes.recommendedAgentV2(request.componentName, request.customerId, request.appName, request.branchName, request.testStage);
94
- return new Promise(function (resolve, reject) {
95
- _this.client.get(url, function (err, body) {
59
+ const url = sl_routes_1.SLRoutes.recommendedAgentV2(request.componentName, request.customerId, request.appName, request.branchName, request.testStage);
60
+ return new Promise((resolve, reject) => {
61
+ this.client.get(url, (err, body) => {
96
62
  if (err) {
97
63
  return reject(err);
98
64
  }
@@ -104,256 +70,212 @@ var BackendProxy = /** @class */ (function () {
104
70
  }
105
71
  });
106
72
  });
107
- };
108
- BackendProxy.prototype.submitBuildMapping = function (request) {
73
+ }
74
+ submitBuildMapping(request) {
109
75
  validation_utils_1.ValidationUtils.verifyNotNullOrEmpty(request, constants_1.Constants.REQUEST);
110
- var url = sl_routes_1.SLRoutes.buildMappingV4();
76
+ const url = sl_routes_1.SLRoutes.buildMappingV4();
111
77
  return this.submitPostRequestWithRetries(request, url);
112
- };
113
- BackendProxy.prototype.submitLogs = function (request, callback) {
114
- var _this = this;
78
+ }
79
+ submitLogs(request, callback) {
115
80
  validation_utils_1.ValidationUtils.verifyNotNullOrEmpty(request, constants_1.Constants.REQUEST);
116
- var url = sl_routes_1.SLRoutes.logSubmissionV2();
117
- this.client.post(request, url, function (err, body) {
118
- _this.invokeCallback(callback, err, body);
81
+ const url = sl_routes_1.SLRoutes.logSubmissionV2();
82
+ this.client.post(request, url, (err, body) => {
83
+ this.invokeCallback(callback, err, body);
119
84
  });
120
- };
121
- BackendProxy.prototype.getRemoteConfig = function (request, callback) {
122
- var _this = this;
85
+ }
86
+ getRemoteConfig(request, callback) {
123
87
  validation_utils_1.ValidationUtils.verifyNotNullOrEmpty(request, constants_1.Constants.REQUEST);
124
- var url = sl_routes_1.SLRoutes.configV3(this.agentInstanceData, request.appName, request.branch, request.build, request.testStage, request.labId);
125
- this.client.get(url, function (err, body) {
126
- _this.invokeCallback(callback, err, body);
88
+ const url = sl_routes_1.SLRoutes.configV3(this.agentInstanceData, request.appName, request.branch, request.build, request.testStage, request.labId);
89
+ this.client.get(url, (err, body) => {
90
+ this.invokeCallback(callback, err, body);
127
91
  });
128
- };
129
- BackendProxy.prototype.getRemoteConfigPromise = function (request) {
130
- var _this = this;
92
+ }
93
+ getRemoteConfigPromise(request) {
131
94
  validation_utils_1.ValidationUtils.verifyNotNullOrEmpty(request, constants_1.Constants.REQUEST);
132
- return new Promise(function (resolve, reject) {
133
- var url = sl_routes_1.SLRoutes.configV3(_this.agentInstanceData, request.appName, request.branch, request.build, request.testStage, request.labId);
134
- _this.client.get(url, function (err, body) {
95
+ return new Promise((resolve, reject) => {
96
+ const url = sl_routes_1.SLRoutes.configV3(this.agentInstanceData, request.appName, request.branch, request.build, request.testStage, request.labId);
97
+ this.client.get(url, (err, body) => {
135
98
  if (err) {
136
99
  reject(err);
137
100
  }
138
101
  resolve(body);
139
102
  });
140
103
  });
141
- };
142
- BackendProxy.prototype.startExecution = function (request, callback) {
143
- var _this = this;
144
- var url = sl_routes_1.SLRoutes.testExecution();
145
- this.client.post(request, url, function (err, body) {
146
- _this.invokeCallback(callback, err, body);
104
+ }
105
+ startExecution(request, callback) {
106
+ const url = sl_routes_1.SLRoutes.testExecution();
107
+ this.client.post(request, url, (err, body) => {
108
+ this.invokeCallback(callback, err, body);
147
109
  });
148
- };
149
- BackendProxy.prototype.startColoredExecution = function (request) {
150
- var _this = this;
151
- return new Promise(function (resolve, reject) {
152
- var url = sl_routes_1.SLRoutes.testExecution();
153
- _this.client.post(request, url, function (err) {
110
+ }
111
+ startColoredExecution(request) {
112
+ return new Promise((resolve, reject) => {
113
+ const url = sl_routes_1.SLRoutes.testExecution();
114
+ this.client.post(request, url, (err) => {
154
115
  if (err) {
155
116
  reject(err);
156
117
  }
157
118
  resolve();
158
119
  });
159
120
  });
160
- };
161
- BackendProxy.prototype.testExecutionV4 = function (labId, async, executionId) {
162
- var _this = this;
163
- if (async === void 0) { async = true; }
164
- return new Promise(function (resolve, reject) {
165
- var url = sl_routes_1.SLRoutes.testExecutionV4(labId);
166
- _this.client.get(url, function (err, body) {
121
+ }
122
+ testExecutionV4(labId, async = true, executionId) {
123
+ return new Promise((resolve, reject) => {
124
+ const url = sl_routes_1.SLRoutes.testExecutionV4(labId);
125
+ this.client.get(url, (err, body) => {
167
126
  if (err) {
168
127
  reject(err);
169
128
  }
170
129
  resolve(body);
171
130
  }, false, async);
172
131
  });
173
- };
174
- BackendProxy.prototype.uploadReport = function (request, callback) {
175
- var _this = this;
176
- var url = sl_routes_1.SLRoutes.externalData();
177
- this.client.postMultipart(request, url, function (err, body) {
178
- _this.invokeCallback(callback, err, body);
132
+ }
133
+ uploadReport(request, callback) {
134
+ const url = sl_routes_1.SLRoutes.externalData();
135
+ this.client.postMultipart(request, url, (err, body) => {
136
+ this.invokeCallback(callback, err, body);
179
137
  });
180
- };
181
- BackendProxy.prototype.externalReport = function (request, callback) {
182
- var _this = this;
183
- var url = sl_routes_1.SLRoutes.externalReport();
184
- this.client.post(request, url, function (err, body) {
185
- _this.invokeCallback(callback, err, body);
138
+ }
139
+ externalReport(request, callback) {
140
+ const url = sl_routes_1.SLRoutes.externalReport();
141
+ this.client.post(request, url, (err, body) => {
142
+ this.invokeCallback(callback, err, body);
186
143
  });
187
- };
188
- BackendProxy.prototype.endExecution = function (request, callback) {
189
- var _this = this;
190
- var url = sl_routes_1.SLRoutes.endExecution(request.customerId, request.appName, request.buildName, request.branchName, request.environment);
191
- var body = request.executionIds ? { executionIds: request.executionIds } : null;
192
- this.client.delete(body, url, function (err, body) {
193
- _this.invokeCallback(callback, err, body);
144
+ }
145
+ endExecution(request, callback) {
146
+ const url = sl_routes_1.SLRoutes.endExecution(request.customerId, request.appName, request.buildName, request.branchName, request.environment);
147
+ const body = request.executionIds ? { executionIds: request.executionIds } : null;
148
+ this.client.delete(body, url, (err, body) => {
149
+ this.invokeCallback(callback, err, body);
194
150
  });
195
- };
196
- BackendProxy.prototype.endExecutionPromise = function (request) {
197
- var _this = this;
198
- var url = sl_routes_1.SLRoutes.endExecution(request.customerId, request.appName, request.buildName, request.branchName, request.environment);
199
- var body = request.executionIds ? { executionIds: request.executionIds } : null;
200
- return new Promise(function (resolve, reject) {
201
- _this.client.delete(body, url, function (err) {
151
+ }
152
+ endExecutionPromise(request) {
153
+ const url = sl_routes_1.SLRoutes.endExecution(request.customerId, request.appName, request.buildName, request.branchName, request.environment);
154
+ const body = request.executionIds ? { executionIds: request.executionIds } : null;
155
+ return new Promise((resolve, reject) => {
156
+ this.client.delete(body, url, (err) => {
202
157
  err ? reject(err) : resolve();
203
158
  });
204
159
  });
205
- };
206
- BackendProxy.prototype.submitEvents = function (packetToSend, callback, async) {
207
- if (async === void 0) { async = true; }
208
- var url = sl_routes_1.SLRoutes.eventsV2();
160
+ }
161
+ submitEvents(packetToSend, callback, async = true) {
162
+ const url = sl_routes_1.SLRoutes.eventsV2();
209
163
  this.client.post(packetToSend, url, callback);
210
- };
211
- BackendProxy.prototype.submitEventsPromise = function (packetToSend) {
212
- var _this = this;
213
- return new Promise(function (resolve, reject) {
214
- var url = sl_routes_1.SLRoutes.eventsV2();
215
- _this.client.post(packetToSend, url, function (err) {
164
+ }
165
+ submitEventsPromise(packetToSend) {
166
+ return new Promise((resolve, reject) => {
167
+ const url = sl_routes_1.SLRoutes.eventsV2();
168
+ this.client.post(packetToSend, url, err => {
216
169
  if (err) {
217
170
  reject(err);
218
171
  }
219
172
  resolve();
220
173
  });
221
174
  });
222
- };
223
- BackendProxy.prototype.submitBlobAsync = function (body, buildSessionId, blobId, blobType) {
224
- var _this = this;
225
- if (blobType === void 0) { blobType = 'unspecified'; }
226
- var url = sl_routes_1.SLRoutes.blobs(buildSessionId, blobId, blobType);
227
- return new Promise(function (resolve, reject) {
228
- _this.client.post(body, url, function (error, statusCode) {
229
- _this.logger.debug("Blob ".concat(blobId, " uploaded with status code ").concat(statusCode));
175
+ }
176
+ submitBlobAsync(body, buildSessionId, blobId, blobType = 'unspecified') {
177
+ const url = sl_routes_1.SLRoutes.blobs(buildSessionId, blobId, blobType);
178
+ return new Promise((resolve, reject) => {
179
+ this.client.post(body, url, (error, statusCode) => {
180
+ this.logger.debug(`Blob ${blobId} uploaded with status code ${statusCode}`);
230
181
  if (error) {
231
- _this.logger.error("Error while submitting a blob, '".concat(error, "'"));
182
+ this.logger.error(`Error while submitting a blob, '${error}'`);
232
183
  return reject(error);
233
184
  }
234
185
  else {
235
- _this.logger.info('blob submitted successfully');
186
+ this.logger.info('blob submitted successfully');
236
187
  return resolve({});
237
188
  }
238
189
  }, true, contracts_1.ContentType.OCTET_STREAM);
239
190
  });
240
- };
241
- BackendProxy.prototype.submitBlob = function (body, buildSessionId, blobId, callback) {
242
- var url = sl_routes_1.SLRoutes.blobs(buildSessionId, blobId);
191
+ }
192
+ submitBlob(body, buildSessionId, blobId, callback) {
193
+ const url = sl_routes_1.SLRoutes.blobs(buildSessionId, blobId);
243
194
  this.client.post(body, url, callback, true, contracts_1.ContentType.OCTET_STREAM);
244
- };
245
- BackendProxy.prototype.getBlobsAsJson = function (buildSessionId, blobType) {
246
- if (blobType === void 0) { blobType = 'unspecified'; }
247
- return __awaiter(this, void 0, void 0, function () {
248
- var slMapping, url, e_1;
249
- return __generator(this, function (_a) {
250
- switch (_a.label) {
251
- case 0:
252
- slMapping = [];
253
- _a.label = 1;
254
- case 1:
255
- _a.trys.push([1, 3, , 4]);
256
- url = sl_routes_1.SLRoutes.blobsForBsidAsJson(buildSessionId, blobType);
257
- return [4 /*yield*/, this.submitGetRequestWithRetries(url)];
258
- case 2:
259
- slMapping = _a.sent();
260
- return [3 /*break*/, 4];
261
- case 3:
262
- e_1 = _a.sent();
263
- this.logger.error(e_1);
264
- return [3 /*break*/, 4];
265
- case 4: return [2 /*return*/, slMapping];
266
- }
267
- });
195
+ }
196
+ getBlobsAsJson(buildSessionId, blobType = 'unspecified') {
197
+ return __awaiter(this, void 0, void 0, function* () {
198
+ let slMapping = [];
199
+ try {
200
+ const url = sl_routes_1.SLRoutes.blobsForBsidAsJson(buildSessionId, blobType);
201
+ slMapping = yield this.submitGetRequestWithRetries(url);
202
+ }
203
+ catch (e) {
204
+ this.logger.error(e);
205
+ }
206
+ return slMapping;
268
207
  });
269
- };
270
- BackendProxy.prototype.getSlMappingFromServer = function (buildSessionId) {
271
- return __awaiter(this, void 0, void 0, function () {
272
- return __generator(this, function (_a) {
273
- return [2 /*return*/, this.getBlobsAsJson(buildSessionId, 'unspecified')];
274
- });
208
+ }
209
+ getSlMappingFromServer(buildSessionId) {
210
+ return __awaiter(this, void 0, void 0, function* () {
211
+ return this.getBlobsAsJson(buildSessionId, 'unspecified');
275
212
  });
276
- };
277
- BackendProxy.prototype.submitAgentEvent = function (body) {
278
- var _this = this;
279
- var url = sl_routes_1.SLRoutes.agentEvents();
280
- return new Promise(function (resolve, reject) {
281
- _this.client.post(body, url, function (error, response) {
213
+ }
214
+ submitAgentEvent(body) {
215
+ const url = sl_routes_1.SLRoutes.agentEvents();
216
+ return new Promise((resolve, reject) => {
217
+ this.client.post(body, url, (error, response) => {
282
218
  if (error) {
283
219
  return reject(error);
284
220
  }
285
221
  return resolve();
286
222
  });
287
223
  });
288
- };
289
- BackendProxy.prototype.getTestsRecommendation = function (buildSessionId, stage, testGroupId) {
290
- var url = sl_routes_1.SLRoutes.testsRecommendations(buildSessionId, stage, testGroupId);
224
+ }
225
+ getTestsRecommendation(buildSessionId, stage, testGroupId) {
226
+ const url = sl_routes_1.SLRoutes.testsRecommendations(buildSessionId, stage, testGroupId);
291
227
  return this.submitGetRequestWithRetries(url, null, null, [400, 404], false);
292
- };
293
- BackendProxy.prototype.addOrUpdateIntegrationBuildComponents = function (buildSessionId, components, agentId) {
294
- var url = sl_routes_1.SLRoutes.integrationBuildComponents(buildSessionId);
295
- return this.submitPutRequestWithRetries({ components: components, agentId: agentId }, url);
296
- };
297
- BackendProxy.prototype.deleteIntegrationBuildComponents = function (buildSessionId, components, agentId) {
298
- var url = sl_routes_1.SLRoutes.integrationBuildComponents(buildSessionId);
299
- return this.submitDelRequestWithRetries({ components: components, agentId: agentId }, url);
300
- };
301
- BackendProxy.prototype.buildEnd = function (data) {
228
+ }
229
+ addOrUpdateIntegrationBuildComponents(buildSessionId, components, agentId) {
230
+ const url = sl_routes_1.SLRoutes.integrationBuildComponents(buildSessionId);
231
+ return this.submitPutRequestWithRetries({ components, agentId }, url);
232
+ }
233
+ deleteIntegrationBuildComponents(buildSessionId, components, agentId) {
234
+ const url = sl_routes_1.SLRoutes.integrationBuildComponents(buildSessionId);
235
+ return this.submitDelRequestWithRetries({ components, agentId }, url);
236
+ }
237
+ buildEnd(data) {
302
238
  return this.submitPostRequestWithRetries(data, sl_routes_1.SLRoutes.buildEnd());
303
- };
304
- BackendProxy.prototype.submitFootprintsV6 = function (footprintsPacket, executionBsid, testStage, buildSessionId) {
305
- return __awaiter(this, void 0, void 0, function () {
306
- var url;
307
- return __generator(this, function (_a) {
308
- validation_utils_1.ValidationUtils.verifyNotNullOrEmpty(footprintsPacket, constants_1.Constants.FOOTPRINTS_PACKET);
309
- validation_utils_1.ValidationUtils.verifyNotNullOrEmpty(executionBsid, constants_1.Constants.EXECUTION_BSID);
310
- validation_utils_1.ValidationUtils.verifyNotNullOrEmpty(testStage, constants_1.Constants.TEST_STAGE);
311
- validation_utils_1.ValidationUtils.verifyNotNullOrEmpty(buildSessionId, constants_1.Constants.BUILD_SESSION_ID);
312
- url = sl_routes_1.SLRoutes.footprintsV6(executionBsid, testStage, buildSessionId);
313
- return [2 /*return*/, this.submitPostRequestWithRetries(footprintsPacket, url, null, null, true, contracts_1.ContentType.OCTET_STREAM)];
314
- });
239
+ }
240
+ submitFootprintsV6(footprintsPacket, executionBsid, testStage, buildSessionId) {
241
+ return __awaiter(this, void 0, void 0, function* () {
242
+ validation_utils_1.ValidationUtils.verifyNotNullOrEmpty(footprintsPacket, constants_1.Constants.FOOTPRINTS_PACKET);
243
+ validation_utils_1.ValidationUtils.verifyNotNullOrEmpty(executionBsid, constants_1.Constants.EXECUTION_BSID);
244
+ validation_utils_1.ValidationUtils.verifyNotNullOrEmpty(testStage, constants_1.Constants.TEST_STAGE);
245
+ validation_utils_1.ValidationUtils.verifyNotNullOrEmpty(buildSessionId, constants_1.Constants.BUILD_SESSION_ID);
246
+ const url = sl_routes_1.SLRoutes.footprintsV6(executionBsid, testStage, buildSessionId);
247
+ return this.submitPostRequestWithRetries(footprintsPacket, url, null, null, true, contracts_1.ContentType.OCTET_STREAM);
315
248
  });
316
- };
317
- BackendProxy.prototype.submitFootprintsToCollector = function (footprintsPacket, buildSessionId) {
318
- return __awaiter(this, void 0, void 0, function () {
319
- var url;
320
- return __generator(this, function (_a) {
321
- validation_utils_1.ValidationUtils.verifyNotNullOrEmpty(footprintsPacket, constants_1.Constants.FOOTPRINTS_PACKET);
322
- validation_utils_1.ValidationUtils.verifyNotNullOrEmpty(buildSessionId, constants_1.Constants.BUILD_SESSION_ID);
323
- url = sl_routes_1.SLRoutes.footprintsToCollector(buildSessionId);
324
- return [2 /*return*/, this.submitPostRequestWithRetries(footprintsPacket, url, null, null, true, contracts_1.ContentType.JSON)];
325
- });
249
+ }
250
+ submitFootprintsToCollector(footprintsPacket, buildSessionId) {
251
+ return __awaiter(this, void 0, void 0, function* () {
252
+ validation_utils_1.ValidationUtils.verifyNotNullOrEmpty(footprintsPacket, constants_1.Constants.FOOTPRINTS_PACKET);
253
+ validation_utils_1.ValidationUtils.verifyNotNullOrEmpty(buildSessionId, constants_1.Constants.BUILD_SESSION_ID);
254
+ const url = sl_routes_1.SLRoutes.footprintsToCollector(buildSessionId);
255
+ return this.submitPostRequestWithRetries(footprintsPacket, url, null, null, true, contracts_1.ContentType.JSON);
326
256
  });
327
- };
328
- BackendProxy.prototype.getBuildSessionData = function (buildSessionId) {
329
- return __awaiter(this, void 0, void 0, function () {
330
- var _this = this;
331
- return __generator(this, function (_a) {
332
- return [2 /*return*/, new Promise(function (resolve, reject) {
333
- _this.getBuildSession(buildSessionId, function (err, response) {
334
- err ? reject(err) : resolve(response);
335
- });
336
- })];
257
+ }
258
+ getBuildSessionData(buildSessionId) {
259
+ return __awaiter(this, void 0, void 0, function* () {
260
+ return new Promise((resolve, reject) => {
261
+ this.getBuildSession(buildSessionId, (err, response) => {
262
+ err ? reject(err) : resolve(response);
263
+ });
337
264
  });
338
265
  });
339
- };
340
- BackendProxy.prototype.getRecommendedAgent = function (configuration) {
341
- return __awaiter(this, void 0, void 0, function () {
342
- return __generator(this, function (_a) {
343
- return [2 /*return*/, {}];
344
- });
266
+ }
267
+ getRecommendedAgent(configuration) {
268
+ return __awaiter(this, void 0, void 0, function* () {
269
+ return {};
345
270
  });
346
- };
347
- BackendProxy.prototype.getBuildSessionDataFromLabId = function (labid) {
348
- return __awaiter(this, void 0, void 0, function () {
349
- var url;
350
- return __generator(this, function (_a) {
351
- url = sl_routes_1.SLRoutes.activeBuildSessionId(labid);
352
- return [2 /*return*/, this.submitGetRequestWithRetries(url)];
353
- });
271
+ }
272
+ getBuildSessionDataFromLabId(labid) {
273
+ return __awaiter(this, void 0, void 0, function* () {
274
+ const url = sl_routes_1.SLRoutes.activeBuildSessionId(labid);
275
+ return this.submitGetRequestWithRetries(url);
354
276
  });
355
- };
356
- BackendProxy.prototype.invokeCallback = function (callback, err, body, map) {
277
+ }
278
+ invokeCallback(callback, err, body, map) {
357
279
  validation_utils_1.ValidationUtils.verifyNotNullOrEmpty(callback, constants_1.Constants.CALLBACK);
358
280
  if (err != null) {
359
281
  return callback(err, body);
@@ -361,76 +283,55 @@ var BackendProxy = /** @class */ (function () {
361
283
  if (map == null) {
362
284
  return callback(null, body);
363
285
  }
364
- var apiResponse = map(body);
286
+ const apiResponse = map(body);
365
287
  return callback(null, apiResponse);
366
- };
367
- BackendProxy.prototype.submitPostRequestWithRetries = function (body, url, retries, delayBetweenRetires, async, contentType) {
368
- var _this = this;
369
- return this.makeRequestWithRetries(function (callback) { _this.client.post(body, url, callback, async, contentType); }, retries, delayBetweenRetires);
370
- };
371
- BackendProxy.prototype.submitPutRequestWithRetries = function (body, url, retries, delayBetweenRetires) {
372
- var _this = this;
373
- return this.makeRequestWithRetries(function (callback) { _this.client.put(body, url, callback); }, retries, delayBetweenRetires);
374
- };
375
- BackendProxy.prototype.submitDelRequestWithRetries = function (body, url, retries, delayBetweenRetires) {
376
- var _this = this;
377
- return this.makeRequestWithRetries(function (callback) { _this.client.delete(body, url, callback); }, retries, delayBetweenRetires);
378
- };
379
- BackendProxy.prototype.submitGetRequestWithRetries = function (url, retries, delayBetweenRetires, statusesForRetry, isNotFoundAcceptable) {
380
- var _this = this;
381
- if (isNotFoundAcceptable === void 0) { isNotFoundAcceptable = true; }
382
- return this.makeRequestWithRetries(function (callback) { _this.client.get(url, callback, isNotFoundAcceptable); }, retries, delayBetweenRetires, statusesForRetry);
383
- };
384
- BackendProxy.prototype.makeRequestWithRetries = function (doSingleRequest, retries, delayBetweenRetires, statusesForRetry) {
385
- return __awaiter(this, void 0, void 0, function () {
386
- var retriesLeft, intervalBetweenRetries, lastError, bodyAndStatusCode, errAndStatusCode_1;
387
- return __generator(this, function (_a) {
388
- switch (_a.label) {
389
- case 0:
390
- retriesLeft = retries || sl_env_vars_1.SlEnvVars.getHttpMaxAttempts() || BackendProxy.DEFAULT_HTTP_MAX_ATTEMPTS;
391
- intervalBetweenRetries = delayBetweenRetires || sl_env_vars_1.SlEnvVars.getHttpAttemptInterval() || BackendProxy.DEFAULT_HTTP_ATTEMPT_INTERVAL;
392
- lastError = undefined;
393
- _a.label = 1;
394
- case 1:
395
- _a.trys.push([1, 3, , 4]);
396
- retriesLeft--;
397
- return [4 /*yield*/, new Promise(function (resolve, reject) {
398
- doSingleRequest(function (err, body, statusCode) {
399
- err ? reject({ err: err, statusCode: statusCode }) : resolve({ body: body, statusCode: statusCode }); //Always return status code
400
- });
401
- })];
402
- case 2:
403
- bodyAndStatusCode = _a.sent();
404
- return [2 /*return*/, bodyAndStatusCode.body];
405
- case 3:
406
- errAndStatusCode_1 = _a.sent();
407
- this.logger.info(errAndStatusCode_1);
408
- lastError = errAndStatusCode_1.err;
409
- if (!this.shouldRetryRequest(errAndStatusCode_1.statusCode, statusesForRetry)) {
410
- return [3 /*break*/, 7]; //Non-retriable error, break do..while loop and
411
- }
412
- return [3 /*break*/, 4];
413
- case 4: return [4 /*yield*/, timer_utils_1.TimerUtils.sleep(intervalBetweenRetries)];
414
- case 5:
415
- _a.sent();
416
- _a.label = 6;
417
- case 6:
418
- if (retriesLeft > 0) return [3 /*break*/, 1];
419
- _a.label = 7;
420
- case 7: throw lastError;
288
+ }
289
+ submitPostRequestWithRetries(body, url, retries, delayBetweenRetires, async, contentType) {
290
+ return this.makeRequestWithRetries((callback) => { this.client.post(body, url, callback, async, contentType); }, retries, delayBetweenRetires);
291
+ }
292
+ submitPutRequestWithRetries(body, url, retries, delayBetweenRetires) {
293
+ return this.makeRequestWithRetries((callback) => { this.client.put(body, url, callback); }, retries, delayBetweenRetires);
294
+ }
295
+ submitDelRequestWithRetries(body, url, retries, delayBetweenRetires) {
296
+ return this.makeRequestWithRetries((callback) => { this.client.delete(body, url, callback); }, retries, delayBetweenRetires);
297
+ }
298
+ submitGetRequestWithRetries(url, retries, delayBetweenRetires, statusesForRetry, isNotFoundAcceptable = true) {
299
+ return this.makeRequestWithRetries((callback) => { this.client.get(url, callback, isNotFoundAcceptable); }, retries, delayBetweenRetires, statusesForRetry);
300
+ }
301
+ makeRequestWithRetries(doSingleRequest, retries, delayBetweenRetires, statusesForRetry) {
302
+ return __awaiter(this, void 0, void 0, function* () {
303
+ let retriesLeft = retries || sl_env_vars_1.SlEnvVars.getHttpMaxAttempts() || BackendProxy.DEFAULT_HTTP_MAX_ATTEMPTS;
304
+ const intervalBetweenRetries = delayBetweenRetires || sl_env_vars_1.SlEnvVars.getHttpAttemptInterval() || BackendProxy.DEFAULT_HTTP_ATTEMPT_INTERVAL;
305
+ let lastError = undefined;
306
+ do {
307
+ try {
308
+ retriesLeft--;
309
+ const bodyAndStatusCode = yield new Promise((resolve, reject) => {
310
+ doSingleRequest((err, body, statusCode) => {
311
+ err ? reject({ err, statusCode }) : resolve({ body, statusCode }); //Always return status code
312
+ });
313
+ });
314
+ return bodyAndStatusCode.body;
421
315
  }
422
- });
316
+ catch (errAndStatusCode) {
317
+ this.logger.info(errAndStatusCode);
318
+ lastError = errAndStatusCode.err;
319
+ if (!this.shouldRetryRequest(errAndStatusCode.statusCode, statusesForRetry)) {
320
+ break; //Non-retriable error, break do..while loop and
321
+ }
322
+ }
323
+ yield timer_utils_1.TimerUtils.sleep(intervalBetweenRetries);
324
+ } while (retriesLeft > 0);
325
+ throw lastError;
423
326
  });
424
- };
425
- BackendProxy.prototype.shouldRetryRequest = function (statusCode, statusesForRetry) {
426
- if (statusesForRetry === void 0) { statusesForRetry = []; }
327
+ }
328
+ shouldRetryRequest(statusCode, statusesForRetry = []) {
427
329
  if (statusCode >= 500 || statusCode && statusesForRetry.includes(statusCode))
428
330
  return true;
429
331
  return false;
430
- };
431
- BackendProxy.DEFAULT_HTTP_MAX_ATTEMPTS = 6;
432
- BackendProxy.DEFAULT_HTTP_ATTEMPT_INTERVAL = 5 * 1000;
433
- return BackendProxy;
434
- }());
332
+ }
333
+ }
435
334
  exports.BackendProxy = BackendProxy;
335
+ BackendProxy.DEFAULT_HTTP_MAX_ATTEMPTS = 6;
336
+ BackendProxy.DEFAULT_HTTP_ATTEMPT_INTERVAL = 5 * 1000;
436
337
  //# sourceMappingURL=backend-proxy.js.map