slnodejs 6.1.415 → 6.1.429

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (429) hide show
  1. package/browser-agent/dist/browser-agent-all.js +1 -1
  2. package/browser-agent/dist/browser-agent-all.min.js +1 -1
  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 +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 +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.js +55 -78
  227. package/tsOutputs/common/footprints-process-v6/footprints-buffer.js.map +1 -1
  228. package/tsOutputs/common/footprints-process-v6/hits-collector.js +89 -129
  229. package/tsOutputs/common/footprints-process-v6/hits-collector.js.map +1 -1
  230. package/tsOutputs/common/footprints-process-v6/hits-converter.js +70 -78
  231. package/tsOutputs/common/footprints-process-v6/hits-converter.js.map +1 -1
  232. package/tsOutputs/common/footprints-process-v6/index.js +204 -347
  233. package/tsOutputs/common/footprints-process-v6/index.js.map +1 -1
  234. package/tsOutputs/common/footprints-process-v6/location-formatter.js +2 -2
  235. package/tsOutputs/common/footprints-process-v6/location-formatter.js.map +1 -1
  236. package/tsOutputs/common/footprints-process-v6/relative-path-resolver.js +10 -11
  237. package/tsOutputs/common/footprints-process-v6/relative-path-resolver.js.map +1 -1
  238. package/tsOutputs/common/footprints-process-v6/remote-browser-hits-converter.js +5 -25
  239. package/tsOutputs/common/footprints-process-v6/remote-browser-hits-converter.js.map +1 -1
  240. package/tsOutputs/common/footprints-process-v6/remote-footprints-process.js +6 -57
  241. package/tsOutputs/common/footprints-process-v6/remote-footprints-process.js.map +1 -1
  242. package/tsOutputs/common/footprints-process-v6/remote-hits-collector.js +7 -27
  243. package/tsOutputs/common/footprints-process-v6/remote-hits-collector.js.map +1 -1
  244. package/tsOutputs/common/footprints-process-v6/source-map-data.js +14 -15
  245. package/tsOutputs/common/footprints-process-v6/source-map-data.js.map +1 -1
  246. package/tsOutputs/common/http/backend-proxy.js +222 -321
  247. package/tsOutputs/common/http/backend-proxy.js.map +1 -1
  248. package/tsOutputs/common/http/contracts.js +40 -116
  249. package/tsOutputs/common/http/contracts.js.map +1 -1
  250. package/tsOutputs/common/http/dry-run-proxy.js +68 -111
  251. package/tsOutputs/common/http/dry-run-proxy.js.map +1 -1
  252. package/tsOutputs/common/http/entities-mapper.js +6 -9
  253. package/tsOutputs/common/http/entities-mapper.js.map +1 -1
  254. package/tsOutputs/common/http/http-client.js +76 -86
  255. package/tsOutputs/common/http/http-client.js.map +1 -1
  256. package/tsOutputs/common/http/sl-routes.js +119 -122
  257. package/tsOutputs/common/http/sl-routes.js.map +1 -1
  258. package/tsOutputs/common/ignored-files-handler.js +48 -49
  259. package/tsOutputs/common/ignored-files-handler.js.map +1 -1
  260. package/tsOutputs/common/logger.js +66 -88
  261. package/tsOutputs/common/logger.js.map +1 -1
  262. package/tsOutputs/common/messages-formatter.js +9 -14
  263. package/tsOutputs/common/messages-formatter.js.map +1 -1
  264. package/tsOutputs/common/no-op-state-tracker.js +14 -37
  265. package/tsOutputs/common/no-op-state-tracker.js.map +1 -1
  266. package/tsOutputs/common/queue.js +18 -36
  267. package/tsOutputs/common/queue.js.map +1 -1
  268. package/tsOutputs/common/scm/git-cloner.js +30 -94
  269. package/tsOutputs/common/scm/git-cloner.js.map +1 -1
  270. package/tsOutputs/common/scm/git-format-builder.js +24 -25
  271. package/tsOutputs/common/scm/git-format-builder.js.map +1 -1
  272. package/tsOutputs/common/scm/git.js +192 -327
  273. package/tsOutputs/common/scm/git.js.map +1 -1
  274. package/tsOutputs/common/scm/none.js +58 -110
  275. package/tsOutputs/common/scm/none.js.map +1 -1
  276. package/tsOutputs/common/scm/scm-factory.js +6 -9
  277. package/tsOutputs/common/scm/scm-factory.js.map +1 -1
  278. package/tsOutputs/common/short-name-to-file-mapper.js +30 -33
  279. package/tsOutputs/common/short-name-to-file-mapper.js.map +1 -1
  280. package/tsOutputs/common/source-map-handler.js +76 -98
  281. package/tsOutputs/common/source-map-handler.js.map +1 -1
  282. package/tsOutputs/common/source-map-reader.js +35 -36
  283. package/tsOutputs/common/source-map-reader.js.map +1 -1
  284. package/tsOutputs/common/source-maps-utils.js +8 -11
  285. package/tsOutputs/common/source-maps-utils.js.map +1 -1
  286. package/tsOutputs/common/state-tracker-fpv6.js +15 -37
  287. package/tsOutputs/common/state-tracker-fpv6.js.map +1 -1
  288. package/tsOutputs/common/state-tracker.js +124 -212
  289. package/tsOutputs/common/state-tracker.js.map +1 -1
  290. package/tsOutputs/common/system-date.js +3 -3
  291. package/tsOutputs/common/system-date.js.map +1 -1
  292. package/tsOutputs/common/utils/abstract-data-builder.js +8 -9
  293. package/tsOutputs/common/utils/abstract-data-builder.js.map +1 -1
  294. package/tsOutputs/common/utils/build-session-data-builder.js +25 -79
  295. package/tsOutputs/common/utils/build-session-data-builder.js.map +1 -1
  296. package/tsOutputs/common/utils/dependency-utils.js +13 -16
  297. package/tsOutputs/common/utils/dependency-utils.js.map +1 -1
  298. package/tsOutputs/common/utils/env-var-parsing.js +10 -14
  299. package/tsOutputs/common/utils/env-var-parsing.js.map +1 -1
  300. package/tsOutputs/common/utils/files-utils.js +16 -19
  301. package/tsOutputs/common/utils/files-utils.js.map +1 -1
  302. package/tsOutputs/common/utils/process-utils.js +12 -25
  303. package/tsOutputs/common/utils/process-utils.js.map +1 -1
  304. package/tsOutputs/common/utils/test-runner-build-session-data-builder.js +16 -62
  305. package/tsOutputs/common/utils/test-runner-build-session-data-builder.js.map +1 -1
  306. package/tsOutputs/common/utils/test-utils/mock-server-utils/mock-server-proxy.js +120 -192
  307. package/tsOutputs/common/utils/test-utils/mock-server-utils/mock-server-proxy.js.map +1 -1
  308. package/tsOutputs/common/utils/timer-utils.js +4 -7
  309. package/tsOutputs/common/utils/timer-utils.js.map +1 -1
  310. package/tsOutputs/common/utils/token-data-builder.js +30 -50
  311. package/tsOutputs/common/utils/token-data-builder.js.map +1 -1
  312. package/tsOutputs/common/utils/validation-utils.js +7 -10
  313. package/tsOutputs/common/utils/validation-utils.js.map +1 -1
  314. package/tsOutputs/common/uuid.js +7 -10
  315. package/tsOutputs/common/uuid.js.map +1 -1
  316. package/tsOutputs/common/v8-utils.js +12 -50
  317. package/tsOutputs/common/v8-utils.js.map +1 -1
  318. package/tsOutputs/common/watchdog.js +35 -56
  319. package/tsOutputs/common/watchdog.js.map +1 -1
  320. package/tsOutputs/mocha-reporter/index.js +12 -12
  321. package/tsOutputs/mocha-reporter/index.js.map +1 -1
  322. package/tsOutputs/mocha-reporter/otel-agent.js +47 -118
  323. package/tsOutputs/mocha-reporter/otel-agent.js.map +1 -1
  324. package/tsOutputs/test-listener/SlNodeJsProxy.js +34 -35
  325. package/tsOutputs/test-listener/SlNodeJsProxy.js.map +1 -1
  326. package/tsOutputs/test-listener/UserMessageHelper.js +14 -19
  327. package/tsOutputs/test-listener/UserMessageHelper.js.map +1 -1
  328. package/tsOutputs/test-listener/agent-loader.js +42 -59
  329. package/tsOutputs/test-listener/agent-loader.js.map +1 -1
  330. package/tsOutputs/test-listener/agent.js +93 -150
  331. package/tsOutputs/test-listener/agent.js.map +1 -1
  332. package/tsOutputs/test-listener/api.js +36 -70
  333. package/tsOutputs/test-listener/api.js.map +1 -1
  334. package/tsOutputs/test-listener/base-proxy.js +25 -27
  335. package/tsOutputs/test-listener/base-proxy.js.map +1 -1
  336. package/tsOutputs/test-listener/bootstrap.js +6 -6
  337. package/tsOutputs/test-listener/bootstrap.js.map +1 -1
  338. package/tsOutputs/test-listener/child-process-patcher.js +10 -10
  339. package/tsOutputs/test-listener/child-process-patcher.js.map +1 -1
  340. package/tsOutputs/test-listener/cli.js +27 -30
  341. package/tsOutputs/test-listener/cli.js.map +1 -1
  342. package/tsOutputs/test-listener/coloring/http-coloring.js +30 -33
  343. package/tsOutputs/test-listener/coloring/http-coloring.js.map +1 -1
  344. package/tsOutputs/test-listener/coloring/listening-port.js +14 -17
  345. package/tsOutputs/test-listener/coloring/listening-port.js.map +1 -1
  346. package/tsOutputs/test-listener/command-line-arg-parser.js +12 -15
  347. package/tsOutputs/test-listener/command-line-arg-parser.js.map +1 -1
  348. package/tsOutputs/test-listener/config-process/config-loader.js +21 -22
  349. package/tsOutputs/test-listener/config-process/config-loader.js.map +1 -1
  350. package/tsOutputs/test-listener/config-process/config-system.js +100 -127
  351. package/tsOutputs/test-listener/config-process/config-system.js.map +1 -1
  352. package/tsOutputs/test-listener/config-process/index.js +38 -57
  353. package/tsOutputs/test-listener/config-process/index.js.map +1 -1
  354. package/tsOutputs/test-listener/config.js +38 -59
  355. package/tsOutputs/test-listener/config.js.map +1 -1
  356. package/tsOutputs/test-listener/entities/BasicConfigurationData.js +37 -64
  357. package/tsOutputs/test-listener/entities/BasicConfigurationData.js.map +1 -1
  358. package/tsOutputs/test-listener/entities/build-scanner/ConfigModeData.js +17 -42
  359. package/tsOutputs/test-listener/entities/build-scanner/ConfigModeData.js.map +1 -1
  360. package/tsOutputs/test-listener/entities/build-scanner/ScanModeData.js +19 -45
  361. package/tsOutputs/test-listener/entities/build-scanner/ScanModeData.js.map +1 -1
  362. package/tsOutputs/test-listener/environment-data-service.js +10 -11
  363. package/tsOutputs/test-listener/environment-data-service.js.map +1 -1
  364. package/tsOutputs/test-listener/execution-process/entities-mapper.js +11 -14
  365. package/tsOutputs/test-listener/execution-process/entities-mapper.js.map +1 -1
  366. package/tsOutputs/test-listener/execution-process/execution-service-proxy.js +54 -72
  367. package/tsOutputs/test-listener/execution-process/execution-service-proxy.js.map +1 -1
  368. package/tsOutputs/test-listener/execution-process/index.js +26 -26
  369. package/tsOutputs/test-listener/execution-process/index.js.map +1 -1
  370. package/tsOutputs/test-listener/factory.js +140 -175
  371. package/tsOutputs/test-listener/factory.js.map +1 -1
  372. package/tsOutputs/test-listener/footprints-process/footprints-service-proxy.js +17 -34
  373. package/tsOutputs/test-listener/footprints-process/footprints-service-proxy.js.map +1 -1
  374. package/tsOutputs/test-listener/footprints-process/index.js +53 -58
  375. package/tsOutputs/test-listener/footprints-process/index.js.map +1 -1
  376. package/tsOutputs/test-listener/footprints-process/istanbul-to-footprints-base.js +49 -50
  377. package/tsOutputs/test-listener/footprints-process/istanbul-to-footprints-base.js.map +1 -1
  378. package/tsOutputs/test-listener/footprints-process/istanbul-to-footprints-v3.js +98 -117
  379. package/tsOutputs/test-listener/footprints-process/istanbul-to-footprints-v3.js.map +1 -1
  380. package/tsOutputs/test-listener/footprints-process/ts-node-hits-collector.js +57 -141
  381. package/tsOutputs/test-listener/footprints-process/ts-node-hits-collector.js.map +1 -1
  382. package/tsOutputs/test-listener/integrations/SlGulp.js +25 -26
  383. package/tsOutputs/test-listener/integrations/SlGulp.js.map +1 -1
  384. package/tsOutputs/test-listener/logs-process/index.js +30 -35
  385. package/tsOutputs/test-listener/logs-process/index.js.map +1 -1
  386. package/tsOutputs/test-listener/logs-process/log-service-proxy.js +8 -25
  387. package/tsOutputs/test-listener/logs-process/log-service-proxy.js.map +1 -1
  388. package/tsOutputs/test-listener/nyc-report-executor-fpv6.js +53 -110
  389. package/tsOutputs/test-listener/nyc-report-executor-fpv6.js.map +1 -1
  390. package/tsOutputs/test-listener/nyc-report-executor.js +48 -85
  391. package/tsOutputs/test-listener/nyc-report-executor.js.map +1 -1
  392. package/tsOutputs/test-listener/otel-agent-loader.js +30 -33
  393. package/tsOutputs/test-listener/otel-agent-loader.js.map +1 -1
  394. package/tsOutputs/test-listener/queue.js +18 -36
  395. package/tsOutputs/test-listener/queue.js.map +1 -1
  396. package/tsOutputs/test-listener/remote-agent.js +97 -223
  397. package/tsOutputs/test-listener/remote-agent.js.map +1 -1
  398. package/tsOutputs/test-listener/resolvers/AppNameResolver.js +8 -25
  399. package/tsOutputs/test-listener/resolvers/AppNameResolver.js.map +1 -1
  400. package/tsOutputs/test-listener/resolvers/ArgumentResolver.js +11 -12
  401. package/tsOutputs/test-listener/resolvers/ArgumentResolver.js.map +1 -1
  402. package/tsOutputs/test-listener/resolvers/BuildResolver.js +8 -25
  403. package/tsOutputs/test-listener/resolvers/BuildResolver.js.map +1 -1
  404. package/tsOutputs/test-listener/resolvers/BuildSessionIdFileResolver.js +8 -25
  405. package/tsOutputs/test-listener/resolvers/BuildSessionIdFileResolver.js.map +1 -1
  406. package/tsOutputs/test-listener/resolvers/BuildSessionIdResolver.js +8 -25
  407. package/tsOutputs/test-listener/resolvers/BuildSessionIdResolver.js.map +1 -1
  408. package/tsOutputs/test-listener/resolvers/ProxyResolver.js +8 -25
  409. package/tsOutputs/test-listener/resolvers/ProxyResolver.js.map +1 -1
  410. package/tsOutputs/test-listener/resolvers/TokenResolver.js +8 -25
  411. package/tsOutputs/test-listener/resolvers/TokenResolver.js.map +1 -1
  412. package/tsOutputs/test-listener/state-tracker-process/index.js +54 -74
  413. package/tsOutputs/test-listener/state-tracker-process/index.js.map +1 -1
  414. package/tsOutputs/test-listener/state-tracker-process/state-tracker-proxy.js +18 -37
  415. package/tsOutputs/test-listener/state-tracker-process/state-tracker-proxy.js.map +1 -1
  416. package/tsOutputs/test-listener/test-recommendation-handler.js +66 -109
  417. package/tsOutputs/test-listener/test-recommendation-handler.js.map +1 -1
  418. package/tsOutputs/test-listener/upload-report-handler.js +33 -35
  419. package/tsOutputs/test-listener/upload-report-handler.js.map +1 -1
  420. package/tsOutputs/test-listener/utils.js +13 -14
  421. package/tsOutputs/test-listener/utils.js.map +1 -1
  422. package/tsOutputs/test-listener/uuid.js +7 -10
  423. package/tsOutputs/test-listener/uuid.js.map +1 -1
  424. package/tsOutputs/test-listener/wait-for-multiple-callbacks.js +17 -19
  425. package/tsOutputs/test-listener/wait-for-multiple-callbacks.js.map +1 -1
  426. package/tsOutputs/test-listener/watchdog.js +32 -51
  427. package/tsOutputs/test-listener/watchdog.js.map +1 -1
  428. package/tsOutputs/build-scanner/mappings/scm-file-fixer.js +0 -96
  429. package/tsOutputs/build-scanner/mappings/scm-file-fixer.js.map +0 -1
@@ -8,297 +8,165 @@ 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.Git = void 0;
40
- var child_process_1 = require("child_process");
41
- var git_format_builder_1 = require("./git-format-builder");
42
- var cockpit_notifier_1 = require("../agent-events/cockpit-notifier");
43
- var agent_events_contracts_1 = require("../agent-events/agent-events-contracts");
44
- var GIT_ROOT_DIR_COMMAND = 'rev-parse --show-toplevel';
45
- var GIT_LS_FILES_COMMAND = 'ls-tree --full-tree -r --name-only HEAD';
46
- var MAX_BUFFER_VALUE = 1024 * 1024 * 200; //200 Mb, instead of 200Kb
47
- var Git = /** @class */ (function () {
48
- function Git(buildArgs, globalErrorHandler) {
13
+ const child_process_1 = require("child_process");
14
+ const git_format_builder_1 = require("./git-format-builder");
15
+ const cockpit_notifier_1 = require("../agent-events/cockpit-notifier");
16
+ const agent_events_contracts_1 = require("../agent-events/agent-events-contracts");
17
+ const GIT_ROOT_DIR_COMMAND = 'rev-parse --show-toplevel';
18
+ const GIT_LS_FILES_COMMAND = 'ls-tree --full-tree -r --name-only HEAD';
19
+ const MAX_BUFFER_VALUE = 1024 * 1024 * 200; //200 Mb, instead of 200Kb
20
+ class Git {
21
+ constructor(buildArgs, globalErrorHandler) {
49
22
  this.buildArgs = buildArgs;
50
23
  this.globalErrorHandler = globalErrorHandler;
51
24
  }
52
- Git.prototype.detectCommitVersion = function (handlerParams, logger) {
53
- return __awaiter(this, void 0, void 0, function () {
54
- var log, commit;
55
- return __generator(this, function (_a) {
56
- switch (_a.label) {
57
- case 0:
58
- log = logger.child({ methodName: 'detectCommitVersion' });
59
- return [4 /*yield*/, this.executeGit('log -n 1 --pretty=format:%H', handlerParams, log)];
60
- case 1:
61
- commit = _a.sent();
62
- return [2 /*return*/, commit];
63
- }
64
- });
25
+ detectCommitVersion(handlerParams, logger) {
26
+ return __awaiter(this, void 0, void 0, function* () {
27
+ const log = logger.child({ methodName: 'detectCommitVersion' });
28
+ const commit = yield this.executeGit('log -n 1 --pretty=format:%H', handlerParams, log);
29
+ return commit;
65
30
  });
66
- };
67
- Git.prototype.getBranchHistory = function (handlerParams, logger) {
68
- return __awaiter(this, void 0, void 0, function () {
69
- var buildArgs, log, historyLength, format, stdout;
70
- return __generator(this, function (_a) {
71
- switch (_a.label) {
72
- case 0:
73
- buildArgs = this.getBuildArgs();
74
- log = logger.child({ methodName: 'getBranchHistory' });
75
- historyLength = this.getHistoryLength(buildArgs, log);
76
- format = new git_format_builder_1.GitFormatBuilder().withCommit().withAuthorName().withAuthorEmail().withCommiterName().withCommiterEmail()
77
- .withAuthorDate().withCommiterDate().withTitle().build();
78
- return [4 /*yield*/, this.executeGit('log -n ' + historyLength + ' --format=' + format, handlerParams, log)];
79
- case 1:
80
- stdout = _a.sent();
81
- return [2 /*return*/, this.parseBranchHistoryOutput(stdout, handlerParams, log)];
82
- }
83
- });
31
+ }
32
+ getBranchHistory(handlerParams, logger) {
33
+ return __awaiter(this, void 0, void 0, function* () {
34
+ const buildArgs = this.getBuildArgs();
35
+ const log = logger.child({ methodName: 'getBranchHistory' });
36
+ const historyLength = this.getHistoryLength(buildArgs, log);
37
+ const format = new git_format_builder_1.GitFormatBuilder().withCommit().withAuthorName().withAuthorEmail().withCommiterName().withCommiterEmail()
38
+ .withAuthorDate().withCommiterDate().withTitle().build();
39
+ const stdout = yield this.executeGit('log -n ' + historyLength + ' --format=' + format, handlerParams, log);
40
+ return this.parseBranchHistoryOutput(stdout, handlerParams, log);
84
41
  });
85
- };
86
- Git.prototype.getCommitsPerFile = function (handlerParams, logger) {
87
- return __awaiter(this, void 0, void 0, function () {
88
- var buildArgs, log, historyLength, commitToIndexMap, stdout;
89
- return __generator(this, function (_a) {
90
- switch (_a.label) {
91
- case 0:
92
- buildArgs = this.getBuildArgs();
93
- log = logger.child({ methodName: 'getCommitsPerFile' });
94
- historyLength = this.getHistoryLength(buildArgs, log);
95
- commitToIndexMap = handlerParams.commitToIndexMap;
96
- if (!commitToIndexMap) {
97
- logger.error('Cannot get commits for file, Commits log map is null or undefined');
98
- return [2 /*return*/, {}];
99
- }
100
- return [4 /*yield*/, this.executeGit('log -' + historyLength + ' --name-only --pretty=format:hash:%H', handlerParams, log)];
101
- case 1:
102
- stdout = _a.sent();
103
- return [2 /*return*/, this.parseCommitsPerFileOutput(stdout, commitToIndexMap, log)];
104
- }
105
- });
42
+ }
43
+ getCommitsPerFile(handlerParams, logger) {
44
+ return __awaiter(this, void 0, void 0, function* () {
45
+ const buildArgs = this.getBuildArgs();
46
+ const log = logger.child({ methodName: 'getCommitsPerFile' });
47
+ const historyLength = this.getHistoryLength(buildArgs, log);
48
+ const commitToIndexMap = handlerParams.commitToIndexMap;
49
+ if (!commitToIndexMap) {
50
+ logger.error('Cannot get commits for file, Commits log map is null or undefined');
51
+ return {};
52
+ }
53
+ const stdout = yield this.executeGit('log -' + historyLength + ' --name-only --pretty=format:hash:%H', handlerParams, log);
54
+ return this.parseCommitsPerFileOutput(stdout, commitToIndexMap, log);
106
55
  });
107
- };
108
- Git.prototype.getRepositoryUrl = function (handlerParams, logger) {
109
- return __awaiter(this, void 0, void 0, function () {
110
- var log, stdout, repositoryUrl, parsedLog;
111
- return __generator(this, function (_a) {
112
- switch (_a.label) {
113
- case 0:
114
- log = logger.child({ methodName: 'getRepositoryUrl' });
115
- return [4 /*yield*/, this.executeGit('remote -v', handlerParams, log)];
116
- case 1:
117
- stdout = _a.sent();
118
- repositoryUrl = '';
119
- if (stdout.toString()) {
120
- parsedLog = this.logParse(stdout.toString());
121
- //NOTE: If there are multiple (fetch) remotes, it would be best to pick the line with that has "origin" as the first column (before the \t), if one exists.
122
- //Anyway we should also warn that there were multiple remotes detected
123
- repositoryUrl = parsedLog[0].split('\t').map(function (l) { return l.trim(); })[1].replace(' (fetch)', '');
124
- }
125
- return [2 /*return*/, repositoryUrl];
126
- }
127
- });
56
+ }
57
+ getRepositoryUrl(handlerParams, logger) {
58
+ return __awaiter(this, void 0, void 0, function* () {
59
+ const log = logger.child({ methodName: 'getRepositoryUrl' });
60
+ const stdout = yield this.executeGit('remote -v', handlerParams, log);
61
+ let repositoryUrl = '';
62
+ if (stdout.toString()) {
63
+ const parsedLog = this.logParse(stdout.toString());
64
+ //NOTE: If there are multiple (fetch) remotes, it would be best to pick the line with that has "origin" as the first column (before the \t), if one exists.
65
+ //Anyway we should also warn that there were multiple remotes detected
66
+ repositoryUrl = parsedLog[0].split('\t').map(function (l) { return l.trim(); })[1].replace(' (fetch)', '');
67
+ }
68
+ return repositoryUrl;
128
69
  });
129
- };
130
- Git.prototype.getRootDirectory = function (handlerParams, logger) {
131
- return __awaiter(this, void 0, void 0, function () {
132
- var log, stdout;
133
- return __generator(this, function (_a) {
134
- switch (_a.label) {
135
- case 0:
136
- log = logger.child({ methodName: 'getRootDirectory' });
137
- return [4 /*yield*/, this.executeGit(GIT_ROOT_DIR_COMMAND, handlerParams, log)];
138
- case 1:
139
- stdout = _a.sent();
140
- return [2 /*return*/, stdout.toString().trim()];
141
- }
142
- });
70
+ }
71
+ getRootDirectory(handlerParams, logger) {
72
+ return __awaiter(this, void 0, void 0, function* () {
73
+ const log = logger.child({ methodName: 'getRootDirectory' });
74
+ const stdout = yield this.executeGit(GIT_ROOT_DIR_COMMAND, handlerParams, log);
75
+ return stdout.toString().trim();
143
76
  });
144
- };
145
- Git.prototype.getCurrentGitBranch = function (handlerParams, logger) {
146
- return __awaiter(this, void 0, void 0, function () {
147
- var log, stdout, e_1;
148
- return __generator(this, function (_a) {
149
- switch (_a.label) {
150
- case 0:
151
- log = logger.child({ methodName: 'getCurrentGitBranch' });
152
- _a.label = 1;
153
- case 1:
154
- _a.trys.push([1, 3, , 4]);
155
- return [4 /*yield*/, this.executeGit('rev-parse --abbrev-ref HEAD', handlerParams, log)];
156
- case 2:
157
- stdout = _a.sent();
158
- return [2 /*return*/, stdout.toString().trim()];
159
- case 3:
160
- e_1 = _a.sent();
161
- log.error('Git get current branch error: ' + e_1);
162
- return [3 /*break*/, 4];
163
- case 4: return [2 /*return*/];
164
- }
165
- });
77
+ }
78
+ getCurrentGitBranch(handlerParams, logger) {
79
+ return __awaiter(this, void 0, void 0, function* () {
80
+ const log = logger.child({ methodName: 'getCurrentGitBranch' });
81
+ try {
82
+ const stdout = yield this.executeGit('rev-parse --abbrev-ref HEAD', handlerParams, log);
83
+ return stdout.toString().trim();
84
+ }
85
+ catch (e) {
86
+ log.error('Git get current branch error: ' + e);
87
+ }
166
88
  });
167
- };
168
- Git.prototype.getOpenGitBranches = function (handlerParams, logger) {
169
- return __awaiter(this, void 0, void 0, function () {
170
- var log, stdout, e_2;
171
- return __generator(this, function (_a) {
172
- switch (_a.label) {
173
- case 0:
174
- log = logger.child({ methodName: 'getOpenGitBranches' });
175
- _a.label = 1;
176
- case 1:
177
- _a.trys.push([1, 3, , 4]);
178
- return [4 /*yield*/, this.executeGit('show-ref', handlerParams, log)];
179
- case 2:
180
- stdout = _a.sent();
181
- return [2 /*return*/, this.logParse(stdout.toString())];
182
- case 3:
183
- e_2 = _a.sent();
184
- log.error('Git get open branches error: ' + e_2);
185
- return [3 /*break*/, 4];
186
- case 4: return [2 /*return*/];
187
- }
188
- });
89
+ }
90
+ getOpenGitBranches(handlerParams, logger) {
91
+ return __awaiter(this, void 0, void 0, function* () {
92
+ const log = logger.child({ methodName: 'getOpenGitBranches' });
93
+ try {
94
+ const stdout = yield this.executeGit('show-ref', handlerParams, log);
95
+ return this.logParse(stdout.toString());
96
+ }
97
+ catch (e) {
98
+ log.error('Git get open branches error: ' + e);
99
+ }
189
100
  });
190
- };
191
- Git.prototype.getGitSubmodules = function (handlerParams, logger) {
192
- return __awaiter(this, void 0, void 0, function () {
193
- var log, stdout, submoduleList, e_3;
194
- return __generator(this, function (_a) {
195
- switch (_a.label) {
196
- case 0:
197
- log = logger.child({ methodName: 'getGitSubmodules' });
198
- _a.label = 1;
199
- case 1:
200
- _a.trys.push([1, 3, , 4]);
201
- return [4 /*yield*/, this.executeGit('submodule', handlerParams, log)];
202
- case 2:
203
- stdout = _a.sent();
204
- submoduleList = this.logParse(stdout.toString());
205
- if (submoduleList.length) {
206
- cockpit_notifier_1.CockpitNotifier.sendEvent(agent_events_contracts_1.AgentEventCode.GIT_SUBMODULES_DETECTED, submoduleList);
207
- }
208
- return [2 /*return*/, submoduleList];
209
- case 3:
210
- e_3 = _a.sent();
211
- log.error('Git get submodules error: ' + e_3);
212
- return [3 /*break*/, 4];
213
- case 4: return [2 /*return*/];
101
+ }
102
+ getGitSubmodules(handlerParams, logger) {
103
+ return __awaiter(this, void 0, void 0, function* () {
104
+ const log = logger.child({ methodName: 'getGitSubmodules' });
105
+ try {
106
+ const stdout = yield this.executeGit('submodule', handlerParams, log);
107
+ const submoduleList = this.logParse(stdout.toString());
108
+ if (submoduleList.length) {
109
+ cockpit_notifier_1.CockpitNotifier.sendEvent(agent_events_contracts_1.AgentEventCode.GIT_SUBMODULES_DETECTED, submoduleList);
214
110
  }
215
- });
111
+ return submoduleList;
112
+ }
113
+ catch (e) {
114
+ log.error('Git get submodules error: ' + e);
115
+ }
216
116
  });
217
- };
218
- Git.prototype.getFiles = function (handlerParams, logger) {
219
- return __awaiter(this, void 0, void 0, function () {
220
- var log, stdout;
221
- return __generator(this, function (_a) {
222
- switch (_a.label) {
223
- case 0:
224
- log = logger.child({ methodName: 'getFiles' });
225
- return [4 /*yield*/, this.executeGit(GIT_LS_FILES_COMMAND, handlerParams, log)];
226
- case 1:
227
- stdout = _a.sent();
228
- return [2 /*return*/, stdout.trim().split('\n').map(function (file) { return file.trim(); }).filter(function (file) { return file.length > 0; })];
229
- }
230
- });
117
+ }
118
+ getFiles(handlerParams, logger) {
119
+ return __awaiter(this, void 0, void 0, function* () {
120
+ const log = logger.child({ methodName: 'getFiles' });
121
+ const stdout = yield this.executeGit(GIT_LS_FILES_COMMAND, handlerParams, log);
122
+ return stdout.trim().split('\n').map(file => file.trim()).filter(file => file.length > 0);
231
123
  });
232
- };
233
- Git.prototype.getContributors = function (handlerParams, logger) {
234
- return __awaiter(this, void 0, void 0, function () {
235
- var buildArgs, log, historyLength, format, stdout;
236
- return __generator(this, function (_a) {
237
- switch (_a.label) {
238
- case 0:
239
- buildArgs = this.getBuildArgs();
240
- log = logger.child({ methodName: 'getContributors' });
241
- historyLength = this.getHistoryLength(buildArgs, log);
242
- format = new git_format_builder_1.GitFormatBuilder().withAuthorName('contributorName').withAuthorEmail('contributorEmail').build();
243
- return [4 /*yield*/, this.executeGit('log -n ' + historyLength + ' --all --format=' + format, handlerParams, log)];
244
- case 1:
245
- stdout = _a.sent();
246
- return [2 /*return*/, this.parseContributorsOutput(stdout, log)];
247
- }
248
- });
124
+ }
125
+ getContributors(handlerParams, logger) {
126
+ return __awaiter(this, void 0, void 0, function* () {
127
+ const buildArgs = this.getBuildArgs();
128
+ const log = logger.child({ methodName: 'getContributors' });
129
+ const historyLength = this.getHistoryLength(buildArgs, log);
130
+ const format = new git_format_builder_1.GitFormatBuilder().withAuthorName('contributorName').withAuthorEmail('contributorEmail').build();
131
+ const stdout = yield this.executeGit('log -n ' + historyLength + ' --all --format=' + format, handlerParams, log);
132
+ return this.parseContributorsOutput(stdout, log);
249
133
  });
250
- };
251
- Git.prototype.getGitDiffs = function (refCommit, handlerParams, logger) {
252
- return __awaiter(this, void 0, void 0, function () {
253
- var log, stdout, parsedLog;
254
- return __generator(this, function (_a) {
255
- switch (_a.label) {
256
- case 0:
257
- log = logger.child({ methodName: 'getGitDiffs' });
258
- return [4 /*yield*/, this.executeGit('diff ' + refCommit + ' --name-status -M100', handlerParams, log)];
259
- case 1:
260
- stdout = _a.sent();
261
- parsedLog = this.parseGitDiffs(stdout.toString()).filter(function (d) { return d.op != 'unknown' && d.path; });
262
- return [2 /*return*/, parsedLog];
263
- }
264
- });
134
+ }
135
+ getGitDiffs(refCommit, handlerParams, logger) {
136
+ return __awaiter(this, void 0, void 0, function* () {
137
+ const log = logger.child({ methodName: 'getGitDiffs' });
138
+ const stdout = yield this.executeGit('diff ' + refCommit + ' --name-status -M100', handlerParams, log);
139
+ const parsedLog = this.parseGitDiffs(stdout.toString()).filter(d => d.op != 'unknown' && d.path);
140
+ return parsedLog;
265
141
  });
266
- };
267
- Git.prototype.getCommitOnlyHistory = function (historyLength, handlerParams, logger) {
268
- return __awaiter(this, void 0, void 0, function () {
269
- var log, format, stdout;
270
- return __generator(this, function (_a) {
271
- switch (_a.label) {
272
- case 0:
273
- if (historyLength < 1)
274
- historyLength = 1;
275
- log = logger.child({ methodName: 'getCommitOnlyHistory' });
276
- format = new git_format_builder_1.GitFormatBuilder().withCommit();
277
- return [4 /*yield*/, this.executeGit('log -n ' + historyLength + ' --format=' + format, handlerParams, log)];
278
- case 1:
279
- stdout = _a.sent();
280
- return [2 /*return*/, this.logParse(stdout.toString())];
281
- }
282
- });
142
+ }
143
+ getCommitOnlyHistory(historyLength, handlerParams, logger) {
144
+ return __awaiter(this, void 0, void 0, function* () {
145
+ if (historyLength < 1)
146
+ historyLength = 1;
147
+ const log = logger.child({ methodName: 'getCommitOnlyHistory' });
148
+ const format = new git_format_builder_1.GitFormatBuilder().withCommit();
149
+ const stdout = yield this.executeGit('log -n ' + historyLength + ' --format=' + format, handlerParams, log);
150
+ return this.logParse(stdout.toString());
283
151
  });
284
- };
152
+ }
285
153
  /**
286
154
  *
287
155
  * @param gitArgs full git command, without the 'git' prefix, e.g. log -n 1
288
156
  * @param handlerParams
289
157
  * @param log
290
158
  */
291
- Git.prototype.executeGit = function (gitArgs, handlerParams, log) {
292
- var gitPath = this.getGitPath();
293
- return new Promise(function (resolve, reject) {
159
+ executeGit(gitArgs, handlerParams, log) {
160
+ const gitPath = this.getGitPath();
161
+ return new Promise((resolve, reject) => {
294
162
  try {
295
163
  log.info('GIT: invoking git ' + gitArgs);
296
164
  log.info('GIT PATH: ' + gitPath);
297
- var cmd = gitPath + ' ' + gitArgs;
165
+ const cmd = gitPath + ' ' + gitArgs;
298
166
  (0, child_process_1.exec)(cmd, {
299
167
  cwd: handlerParams.buildArguments.workspacepath,
300
168
  maxBuffer: MAX_BUFFER_VALUE
301
- }, function (error, stdout, stderr) {
169
+ }, (error, stdout, stderr) => {
302
170
  if (error !== null) {
303
171
  log.error('GIT log error: ' + error);
304
172
  return reject(error);
@@ -311,45 +179,44 @@ var Git = /** @class */ (function () {
311
179
  reject(e);
312
180
  }
313
181
  });
314
- };
315
- Git.prototype.parseContributorsOutput = function (stdout, logger) {
316
- var _this = this;
317
- var contributors = [];
318
- var emailToIndexMap = {};
319
- var lines = stdout.toString().split('\n');
320
- var contributorIndex = 0;
321
- lines.forEach(function (line, lineIndex) {
182
+ }
183
+ parseContributorsOutput(stdout, logger) {
184
+ const contributors = [];
185
+ const emailToIndexMap = {};
186
+ const lines = stdout.toString().split('\n');
187
+ let contributorIndex = 0;
188
+ lines.forEach((line, lineIndex) => {
322
189
  if (!line || line.trim().length == 0) {
323
190
  return;
324
191
  }
325
192
  line = line.trim();
326
193
  try {
327
- line = _this.fixUnSupportedJsonCharacters(line);
328
- var contributorData = JSON.parse(line);
194
+ line = this.fixUnSupportedJsonCharacters(line);
195
+ const contributorData = JSON.parse(line);
329
196
  if (!emailToIndexMap.hasOwnProperty(contributorData.contributorEmail)) {
330
197
  contributors.push(contributorData);
331
198
  emailToIndexMap[contributorData.contributorEmail] = contributorIndex++;
332
199
  }
333
200
  }
334
201
  catch (err) {
335
- _this.logJsonParsError(logger, line, 'contributor', err);
202
+ this.logJsonParsError(logger, line, 'contributor', err);
336
203
  }
337
204
  });
338
- var contributorsLog = {
205
+ const contributorsLog = {
339
206
  contributors: contributors,
340
207
  emailToIndexMap: emailToIndexMap
341
208
  };
342
209
  return contributorsLog;
343
- };
344
- Git.prototype.getGitPath = function () {
210
+ }
211
+ getGitPath() {
345
212
  return (this.getBuildArgs() || {}).gitPath || 'git';
346
- };
347
- Git.prototype.getBuildArgs = function () { return this.buildArgs; };
348
- Git.prototype.createCommitLogEntry = function (line, handlerParams) {
349
- var lineObject = JSON.parse(line); //TODO: Improve typing
350
- var authorEmail = lineObject.authorEmail;
351
- var authorIndex = handlerParams.emailToIndexMap[authorEmail];
352
- var commitLogEntry = {
213
+ }
214
+ getBuildArgs() { return this.buildArgs; }
215
+ createCommitLogEntry(line, handlerParams) {
216
+ const lineObject = JSON.parse(line); //TODO: Improve typing
217
+ const authorEmail = lineObject.authorEmail;
218
+ const authorIndex = handlerParams.emailToIndexMap[authorEmail];
219
+ const commitLogEntry = {
353
220
  contributorIndex: authorIndex,
354
221
  commit: lineObject.commit,
355
222
  commiterDate: parseInt(lineObject.committerDate),
@@ -357,29 +224,28 @@ var Git = /** @class */ (function () {
357
224
  title: lineObject.title,
358
225
  };
359
226
  return commitLogEntry;
360
- };
361
- Git.prototype.logJsonParsError = function (logger, line, field, err) {
227
+ }
228
+ logJsonParsError(logger, line, field, err) {
362
229
  logger.warn('Unsupported string format "' + line + '" .\'' + field + '\' may not be shown in dashboard');
363
- logger.debug("Error: ".concat(err));
364
- };
365
- Git.prototype.parseBranchHistoryOutput = function (stdout, handlerParams, logger) {
366
- var _this = this;
367
- var commitHistory = [];
368
- var commitLog = [];
369
- var commitToIndexMap = {};
370
- var sendContributors = handlerParams.buildArguments.sendContributors;
371
- var sendCommitTitles = handlerParams.buildArguments.sendCommitTitles;
372
- var lines = stdout.toString().split('\n');
373
- lines.forEach(function (line, index) {
230
+ logger.debug(`Error: ${err}`);
231
+ }
232
+ parseBranchHistoryOutput(stdout, handlerParams, logger) {
233
+ const commitHistory = [];
234
+ const commitLog = [];
235
+ const commitToIndexMap = {};
236
+ const sendContributors = handlerParams.buildArguments.sendContributors;
237
+ const sendCommitTitles = handlerParams.buildArguments.sendCommitTitles;
238
+ const lines = stdout.toString().split('\n');
239
+ lines.forEach((line, index) => {
374
240
  if (!line || line.trim().length == 0) {
375
241
  return;
376
242
  }
377
243
  line = line.trim();
378
- line = _this.fixUnSupportedJsonCharacters(line);
244
+ line = this.fixUnSupportedJsonCharacters(line);
379
245
  try {
380
- var gitLogEntry = void 0;
246
+ let gitLogEntry;
381
247
  if (sendContributors) {
382
- gitLogEntry = _this.createCommitLogEntry(line, handlerParams);
248
+ gitLogEntry = this.createCommitLogEntry(line, handlerParams);
383
249
  }
384
250
  else {
385
251
  gitLogEntry = JSON.parse(line);
@@ -392,10 +258,10 @@ var Git = /** @class */ (function () {
392
258
  commitToIndexMap[gitLogEntry.commit] = index;
393
259
  }
394
260
  catch (err) {
395
- _this.logJsonParsError(logger, line, 'commit-log', err);
261
+ this.logJsonParsError(logger, line, 'commit-log', err);
396
262
  }
397
263
  });
398
- var gitLog = {
264
+ const gitLog = {
399
265
  commitHistory: commitHistory,
400
266
  commitLog: commitLog,
401
267
  commitToIndexMap: undefined
@@ -404,19 +270,19 @@ var Git = /** @class */ (function () {
404
270
  gitLog.commitToIndexMap = commitToIndexMap;
405
271
  }
406
272
  return gitLog;
407
- };
408
- Git.prototype.parseCommitsPerFileOutput = function (stdout, commitToIndexMap, log) {
409
- var fileToCommitMap = {};
410
- var commits = stdout.toString().split('hash:');
273
+ }
274
+ parseCommitsPerFileOutput(stdout, commitToIndexMap, log) {
275
+ const fileToCommitMap = {};
276
+ const commits = stdout.toString().split('hash:');
411
277
  try {
412
- commits.forEach(function (currCommit) {
278
+ commits.forEach((currCommit) => {
413
279
  currCommit = currCommit.trim();
414
- var commitData = currCommit.split('\n');
280
+ const commitData = currCommit.split('\n');
415
281
  if (commitData.length < 2) {
416
282
  return;
417
283
  }
418
- var commitHash = commitData[0];
419
- for (var i = 1; i < commitData.length; i++) {
284
+ const commitHash = commitData[0];
285
+ for (let i = 1; i < commitData.length; i++) {
420
286
  if (fileToCommitMap[commitData[i]]) {
421
287
  fileToCommitMap[commitData[i]].push(commitToIndexMap[commitHash]);
422
288
  }
@@ -430,11 +296,11 @@ var Git = /** @class */ (function () {
430
296
  log.error('File to commit map error: ' + e);
431
297
  }
432
298
  return fileToCommitMap;
433
- };
434
- Git.prototype.getHistoryLength = function (cfg, log) {
435
- var historyLength = 100;
299
+ }
300
+ getHistoryLength(cfg, log) {
301
+ let historyLength = 100;
436
302
  if (cfg.branchHistoryLength) {
437
- var v = parseInt(cfg.branchHistoryLength);
303
+ const v = parseInt(cfg.branchHistoryLength);
438
304
  if (v < 1 || Number.isNaN(v)) {
439
305
  log.error('An invalid value was specified for branchHistoryLength in sealights.json: ' + cfg.branchHistoryLength + '. Valid values are positive integers. Defaulting to ' + historyLength);
440
306
  }
@@ -443,24 +309,24 @@ var Git = /** @class */ (function () {
443
309
  }
444
310
  }
445
311
  return historyLength;
446
- };
447
- Git.prototype.fixUnSupportedJsonCharacters = function (entry) {
312
+ }
313
+ fixUnSupportedJsonCharacters(entry) {
448
314
  // Backslashes ar not supported by json format so we replace it to double slashes.
449
315
  // For more info please see 'http://json.org/' (the string schema).
450
316
  return entry.replace(/\\/g, '\\\\');
451
- };
452
- Git.prototype.logParse = function (stdout) {
317
+ }
318
+ logParse(stdout) {
453
319
  //git output contains exactly one hash per line, so little processing is required.
454
320
  return stdout.split('\n').map(function (l) { return l.trim(); });
455
- };
321
+ }
456
322
  //Parse git log output from 'git diff [revision] --name-status -M100
457
- Git.prototype.parseGitDiffs = function (stdout) {
323
+ parseGitDiffs(stdout) {
458
324
  return stdout.split('\n').map(function (l) {
459
- var parts = l.trim().split('\t');
460
- var fileStatus = parts[0];
461
- var path = parts[1];
462
- var newPath = parts[2];
463
- var diffEntry = { op: 'unknown', path: path };
325
+ const parts = l.trim().split('\t');
326
+ const fileStatus = parts[0];
327
+ const path = parts[1];
328
+ const newPath = parts[2];
329
+ const diffEntry = { op: 'unknown', path };
464
330
  switch (fileStatus[0]) {
465
331
  case 'A':
466
332
  diffEntry.op = 'added';
@@ -473,7 +339,7 @@ var Git = /** @class */ (function () {
473
339
  break;
474
340
  case 'R': //file renamed and possibly modified, depending on the rank (3 digits that follow the 'R'). rank = 100 means "renamed", otherwise renamed-modified
475
341
  {
476
- var rank = parseInt(fileStatus.substr(1));
342
+ const rank = parseInt(fileStatus.substr(1));
477
343
  diffEntry.op = (rank == 100) ? 'renamed' : 'renamed-modified';
478
344
  diffEntry.newPath = newPath;
479
345
  }
@@ -481,8 +347,7 @@ var Git = /** @class */ (function () {
481
347
  }
482
348
  return diffEntry;
483
349
  });
484
- };
485
- return Git;
486
- }());
350
+ }
351
+ }
487
352
  exports.Git = Git;
488
353
  //# sourceMappingURL=git.js.map