@datadog/datadog-ci 2.40.3 → 2.42.0

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 (294) hide show
  1. package/README.md +1 -0
  2. package/dist/commands/deployment/cli.js +2 -1
  3. package/dist/commands/deployment/cli.js.map +1 -1
  4. package/dist/commands/deployment/correlate.d.ts +18 -0
  5. package/dist/commands/deployment/correlate.js +154 -0
  6. package/dist/commands/deployment/correlate.js.map +1 -0
  7. package/dist/commands/dsyms/utils.js +2 -4
  8. package/dist/commands/dsyms/utils.js.map +1 -1
  9. package/dist/commands/elf-symbols/elf.d.ts +5 -3
  10. package/dist/commands/elf-symbols/elf.js +18 -16
  11. package/dist/commands/elf-symbols/elf.js.map +1 -1
  12. package/dist/commands/elf-symbols/helpers.js +1 -1
  13. package/dist/commands/elf-symbols/interfaces.d.ts +6 -2
  14. package/dist/commands/elf-symbols/upload.d.ts +3 -0
  15. package/dist/commands/elf-symbols/upload.js +46 -22
  16. package/dist/commands/elf-symbols/upload.js.map +1 -1
  17. package/dist/commands/sarif/renderer.d.ts +1 -1
  18. package/dist/commands/sarif/renderer.js +5 -2
  19. package/dist/commands/sarif/renderer.js.map +1 -1
  20. package/dist/commands/sarif/upload.d.ts +1 -0
  21. package/dist/commands/sarif/upload.js +12 -35
  22. package/dist/commands/sarif/upload.js.map +1 -1
  23. package/dist/commands/sarif/validation.d.ts +15 -0
  24. package/dist/commands/sarif/validation.js +78 -0
  25. package/dist/commands/sarif/validation.js.map +1 -0
  26. package/dist/commands/sbom/upload.d.ts +1 -0
  27. package/dist/commands/sbom/upload.js +6 -14
  28. package/dist/commands/sbom/upload.js.map +1 -1
  29. package/dist/commands/synthetics/batch.js +3 -2
  30. package/dist/commands/synthetics/batch.js.map +1 -1
  31. package/dist/commands/synthetics/compatibility.d.ts +2 -2
  32. package/dist/commands/synthetics/compatibility.js +26 -26
  33. package/dist/commands/synthetics/compatibility.js.map +1 -1
  34. package/dist/commands/synthetics/interfaces.d.ts +3 -2
  35. package/dist/commands/synthetics/interfaces.js.map +1 -1
  36. package/dist/commands/synthetics/reporters/junit.d.ts +1 -0
  37. package/dist/commands/synthetics/reporters/junit.js +1 -0
  38. package/dist/commands/synthetics/reporters/junit.js.map +1 -1
  39. package/dist/commands/synthetics/run-tests-command.d.ts +1 -0
  40. package/dist/commands/synthetics/run-tests-command.js +25 -17
  41. package/dist/commands/synthetics/run-tests-command.js.map +1 -1
  42. package/dist/commands/synthetics/utils/internal.d.ts +4 -0
  43. package/dist/commands/synthetics/utils/internal.js +37 -2
  44. package/dist/commands/synthetics/utils/internal.js.map +1 -1
  45. package/dist/commands/synthetics/utils/public.d.ts +3 -0
  46. package/dist/commands/synthetics/utils/public.js +3 -0
  47. package/dist/commands/synthetics/utils/public.js.map +1 -1
  48. package/dist/helpers/git/get-git-data.d.ts +2 -0
  49. package/dist/helpers/git/get-git-data.js +11 -1
  50. package/dist/helpers/git/get-git-data.js.map +1 -1
  51. package/dist/helpers/tags.d.ts +2 -1
  52. package/dist/helpers/tags.js +3 -2
  53. package/dist/helpers/tags.js.map +1 -1
  54. package/package.json +14 -12
  55. package/dist/__tests__/cli.test.d.ts +0 -1
  56. package/dist/__tests__/cli.test.js +0 -41
  57. package/dist/__tests__/cli.test.js.map +0 -1
  58. package/dist/commands/cloud-run/__tests__/fixtures.d.ts +0 -2
  59. package/dist/commands/cloud-run/__tests__/fixtures.js +0 -12
  60. package/dist/commands/cloud-run/__tests__/fixtures.js.map +0 -1
  61. package/dist/commands/cloud-run/__tests__/flare.test.d.ts +0 -1
  62. package/dist/commands/cloud-run/__tests__/flare.test.js +0 -557
  63. package/dist/commands/cloud-run/__tests__/flare.test.js.map +0 -1
  64. package/dist/commands/deployment/__tests__/mark.test.d.ts +0 -1
  65. package/dist/commands/deployment/__tests__/mark.test.js +0 -47
  66. package/dist/commands/deployment/__tests__/mark.test.js.map +0 -1
  67. package/dist/commands/dora/__tests__/deployment.test.d.ts +0 -1
  68. package/dist/commands/dora/__tests__/deployment.test.js +0 -201
  69. package/dist/commands/dora/__tests__/deployment.test.js.map +0 -1
  70. package/dist/commands/dsyms/__tests__/upload.test.d.ts +0 -1
  71. package/dist/commands/dsyms/__tests__/upload.test.js +0 -346
  72. package/dist/commands/dsyms/__tests__/upload.test.js.map +0 -1
  73. package/dist/commands/dsyms/__tests__/utils.test.d.ts +0 -1
  74. package/dist/commands/dsyms/__tests__/utils.test.js +0 -103
  75. package/dist/commands/dsyms/__tests__/utils.test.js.map +0 -1
  76. package/dist/commands/elf-symbols/__tests__/elf.test.d.ts +0 -1
  77. package/dist/commands/elf-symbols/__tests__/elf.test.js +0 -813
  78. package/dist/commands/elf-symbols/__tests__/elf.test.js.map +0 -1
  79. package/dist/commands/elf-symbols/__tests__/upload.test.d.ts +0 -1
  80. package/dist/commands/elf-symbols/__tests__/upload.test.js +0 -249
  81. package/dist/commands/elf-symbols/__tests__/upload.test.js.map +0 -1
  82. package/dist/commands/flutter-symbols/__tests__/upload.test.d.ts +0 -1
  83. package/dist/commands/flutter-symbols/__tests__/upload.test.js +0 -617
  84. package/dist/commands/flutter-symbols/__tests__/upload.test.js.map +0 -1
  85. package/dist/commands/gate/__tests__/evaluate.test.d.ts +0 -1
  86. package/dist/commands/gate/__tests__/evaluate.test.js +0 -398
  87. package/dist/commands/gate/__tests__/evaluate.test.js.map +0 -1
  88. package/dist/commands/gate/__tests__/scope.test.d.ts +0 -1
  89. package/dist/commands/gate/__tests__/scope.test.js +0 -29
  90. package/dist/commands/gate/__tests__/scope.test.js.map +0 -1
  91. package/dist/commands/git-metadata/__tests__/git.test.d.ts +0 -1
  92. package/dist/commands/git-metadata/__tests__/git.test.js +0 -132
  93. package/dist/commands/git-metadata/__tests__/git.test.js.map +0 -1
  94. package/dist/commands/git-metadata/__tests__/gitdb.test.d.ts +0 -1
  95. package/dist/commands/git-metadata/__tests__/gitdb.test.js +0 -1386
  96. package/dist/commands/git-metadata/__tests__/gitdb.test.js.map +0 -1
  97. package/dist/commands/git-metadata/__tests__/library.test.d.ts +0 -1
  98. package/dist/commands/git-metadata/__tests__/library.test.js +0 -118
  99. package/dist/commands/git-metadata/__tests__/library.test.js.map +0 -1
  100. package/dist/commands/git-metadata/__tests__/upload.test.d.ts +0 -1
  101. package/dist/commands/git-metadata/__tests__/upload.test.js +0 -52
  102. package/dist/commands/git-metadata/__tests__/upload.test.js.map +0 -1
  103. package/dist/commands/junit/__tests__/id.test.d.ts +0 -1
  104. package/dist/commands/junit/__tests__/id.test.js +0 -24
  105. package/dist/commands/junit/__tests__/id.test.js.map +0 -1
  106. package/dist/commands/junit/__tests__/upload.test.d.ts +0 -1
  107. package/dist/commands/junit/__tests__/upload.test.js +0 -495
  108. package/dist/commands/junit/__tests__/upload.test.js.map +0 -1
  109. package/dist/commands/lambda/__tests__/fixtures.d.ts +0 -51
  110. package/dist/commands/lambda/__tests__/fixtures.js +0 -146
  111. package/dist/commands/lambda/__tests__/fixtures.js.map +0 -1
  112. package/dist/commands/lambda/__tests__/flare.test.d.ts +0 -1
  113. package/dist/commands/lambda/__tests__/flare.test.js +0 -730
  114. package/dist/commands/lambda/__tests__/flare.test.js.map +0 -1
  115. package/dist/commands/lambda/__tests__/functions/commons.test.d.ts +0 -1
  116. package/dist/commands/lambda/__tests__/functions/commons.test.js +0 -791
  117. package/dist/commands/lambda/__tests__/functions/commons.test.js.map +0 -1
  118. package/dist/commands/lambda/__tests__/functions/instrument.part1.test.d.ts +0 -1
  119. package/dist/commands/lambda/__tests__/functions/instrument.part1.test.js +0 -386
  120. package/dist/commands/lambda/__tests__/functions/instrument.part1.test.js.map +0 -1
  121. package/dist/commands/lambda/__tests__/functions/instrument.part2.test.d.ts +0 -1
  122. package/dist/commands/lambda/__tests__/functions/instrument.part2.test.js +0 -721
  123. package/dist/commands/lambda/__tests__/functions/instrument.part2.test.js.map +0 -1
  124. package/dist/commands/lambda/__tests__/functions/uninstrument.test.d.ts +0 -1
  125. package/dist/commands/lambda/__tests__/functions/uninstrument.test.js +0 -513
  126. package/dist/commands/lambda/__tests__/functions/uninstrument.test.js.map +0 -1
  127. package/dist/commands/lambda/__tests__/functions/versionChecker.test.d.ts +0 -1
  128. package/dist/commands/lambda/__tests__/functions/versionChecker.test.js +0 -33
  129. package/dist/commands/lambda/__tests__/functions/versionChecker.test.js.map +0 -1
  130. package/dist/commands/lambda/__tests__/instrument.test.d.ts +0 -1
  131. package/dist/commands/lambda/__tests__/instrument.test.js +0 -1511
  132. package/dist/commands/lambda/__tests__/instrument.test.js.map +0 -1
  133. package/dist/commands/lambda/__tests__/loggroup.test.d.ts +0 -1
  134. package/dist/commands/lambda/__tests__/loggroup.test.js +0 -340
  135. package/dist/commands/lambda/__tests__/loggroup.test.js.map +0 -1
  136. package/dist/commands/lambda/__tests__/prompt.test.d.ts +0 -1
  137. package/dist/commands/lambda/__tests__/prompt.test.js +0 -206
  138. package/dist/commands/lambda/__tests__/prompt.test.js.map +0 -1
  139. package/dist/commands/lambda/__tests__/tags.test.d.ts +0 -1
  140. package/dist/commands/lambda/__tests__/tags.test.js +0 -305
  141. package/dist/commands/lambda/__tests__/tags.test.js.map +0 -1
  142. package/dist/commands/lambda/__tests__/uninstrument.test.d.ts +0 -1
  143. package/dist/commands/lambda/__tests__/uninstrument.test.js +0 -722
  144. package/dist/commands/lambda/__tests__/uninstrument.test.js.map +0 -1
  145. package/dist/commands/measure/__tests__/measure.test.d.ts +0 -1
  146. package/dist/commands/measure/__tests__/measure.test.js +0 -110
  147. package/dist/commands/measure/__tests__/measure.test.js.map +0 -1
  148. package/dist/commands/react-native/__tests__/codepush.test.d.ts +0 -1
  149. package/dist/commands/react-native/__tests__/codepush.test.js +0 -161
  150. package/dist/commands/react-native/__tests__/codepush.test.js.map +0 -1
  151. package/dist/commands/react-native/__tests__/interfaces.test.d.ts +0 -1
  152. package/dist/commands/react-native/__tests__/interfaces.test.js +0 -33
  153. package/dist/commands/react-native/__tests__/interfaces.test.js.map +0 -1
  154. package/dist/commands/react-native/__tests__/upload.test.d.ts +0 -1
  155. package/dist/commands/react-native/__tests__/upload.test.js +0 -238
  156. package/dist/commands/react-native/__tests__/upload.test.js.map +0 -1
  157. package/dist/commands/react-native/__tests__/utils.test.d.ts +0 -1
  158. package/dist/commands/react-native/__tests__/utils.test.js +0 -27
  159. package/dist/commands/react-native/__tests__/utils.test.js.map +0 -1
  160. package/dist/commands/react-native/__tests__/xcode.test.d.ts +0 -1
  161. package/dist/commands/react-native/__tests__/xcode.test.js +0 -465
  162. package/dist/commands/react-native/__tests__/xcode.test.js.map +0 -1
  163. package/dist/commands/sarif/__tests__/upload.test.d.ts +0 -1
  164. package/dist/commands/sarif/__tests__/upload.test.js +0 -228
  165. package/dist/commands/sarif/__tests__/upload.test.js.map +0 -1
  166. package/dist/commands/sbom/__tests__/payload.test.d.ts +0 -1
  167. package/dist/commands/sbom/__tests__/payload.test.js +0 -262
  168. package/dist/commands/sbom/__tests__/payload.test.js.map +0 -1
  169. package/dist/commands/sbom/__tests__/validation.test.d.ts +0 -1
  170. package/dist/commands/sbom/__tests__/validation.test.js +0 -41
  171. package/dist/commands/sbom/__tests__/validation.test.js.map +0 -1
  172. package/dist/commands/sourcemaps/__tests__/upload.test.d.ts +0 -1
  173. package/dist/commands/sourcemaps/__tests__/upload.test.js +0 -270
  174. package/dist/commands/sourcemaps/__tests__/upload.test.js.map +0 -1
  175. package/dist/commands/sourcemaps/__tests__/utils.test.d.ts +0 -1
  176. package/dist/commands/sourcemaps/__tests__/utils.test.js +0 -31
  177. package/dist/commands/sourcemaps/__tests__/utils.test.js.map +0 -1
  178. package/dist/commands/stepfunctions/__tests__/awsCommands.test.d.ts +0 -1
  179. package/dist/commands/stepfunctions/__tests__/awsCommands.test.js +0 -192
  180. package/dist/commands/stepfunctions/__tests__/awsCommands.test.js.map +0 -1
  181. package/dist/commands/stepfunctions/__tests__/fixtures/aws-resources.d.ts +0 -6
  182. package/dist/commands/stepfunctions/__tests__/fixtures/aws-resources.js +0 -45
  183. package/dist/commands/stepfunctions/__tests__/fixtures/aws-resources.js.map +0 -1
  184. package/dist/commands/stepfunctions/__tests__/fixtures/cli.d.ts +0 -5
  185. package/dist/commands/stepfunctions/__tests__/fixtures/cli.js +0 -19
  186. package/dist/commands/stepfunctions/__tests__/fixtures/cli.js.map +0 -1
  187. package/dist/commands/stepfunctions/__tests__/helpers.test.d.ts +0 -1
  188. package/dist/commands/stepfunctions/__tests__/helpers.test.js +0 -205
  189. package/dist/commands/stepfunctions/__tests__/helpers.test.js.map +0 -1
  190. package/dist/commands/stepfunctions/__tests__/instrument.test.d.ts +0 -1
  191. package/dist/commands/stepfunctions/__tests__/instrument.test.js +0 -431
  192. package/dist/commands/stepfunctions/__tests__/instrument.test.js.map +0 -1
  193. package/dist/commands/stepfunctions/__tests__/uninstrument.test.d.ts +0 -1
  194. package/dist/commands/stepfunctions/__tests__/uninstrument.test.js +0 -166
  195. package/dist/commands/stepfunctions/__tests__/uninstrument.test.js.map +0 -1
  196. package/dist/commands/synthetics/__tests__/api.test.d.ts +0 -1
  197. package/dist/commands/synthetics/__tests__/api.test.js +0 -422
  198. package/dist/commands/synthetics/__tests__/api.test.js.map +0 -1
  199. package/dist/commands/synthetics/__tests__/cli.test.d.ts +0 -1
  200. package/dist/commands/synthetics/__tests__/cli.test.js +0 -1325
  201. package/dist/commands/synthetics/__tests__/cli.test.js.map +0 -1
  202. package/dist/commands/synthetics/__tests__/fixtures.d.ts +0 -149
  203. package/dist/commands/synthetics/__tests__/fixtures.js +0 -507
  204. package/dist/commands/synthetics/__tests__/fixtures.js.map +0 -1
  205. package/dist/commands/synthetics/__tests__/mobile.test.d.ts +0 -1
  206. package/dist/commands/synthetics/__tests__/mobile.test.js +0 -376
  207. package/dist/commands/synthetics/__tests__/mobile.test.js.map +0 -1
  208. package/dist/commands/synthetics/__tests__/reporters/default.test.d.ts +0 -1
  209. package/dist/commands/synthetics/__tests__/reporters/default.test.js +0 -354
  210. package/dist/commands/synthetics/__tests__/reporters/default.test.js.map +0 -1
  211. package/dist/commands/synthetics/__tests__/reporters/junit.test.d.ts +0 -1
  212. package/dist/commands/synthetics/__tests__/reporters/junit.test.js +0 -353
  213. package/dist/commands/synthetics/__tests__/reporters/junit.test.js.map +0 -1
  214. package/dist/commands/synthetics/__tests__/reporters/mobile/app-upload.test.d.ts +0 -1
  215. package/dist/commands/synthetics/__tests__/reporters/mobile/app-upload.test.js +0 -232
  216. package/dist/commands/synthetics/__tests__/reporters/mobile/app-upload.test.js.map +0 -1
  217. package/dist/commands/synthetics/__tests__/run-tests-lib.test.d.ts +0 -1
  218. package/dist/commands/synthetics/__tests__/run-tests-lib.test.js +0 -735
  219. package/dist/commands/synthetics/__tests__/run-tests-lib.test.js.map +0 -1
  220. package/dist/commands/synthetics/__tests__/test.test.d.ts +0 -1
  221. package/dist/commands/synthetics/__tests__/test.test.js +0 -33
  222. package/dist/commands/synthetics/__tests__/test.test.js.map +0 -1
  223. package/dist/commands/synthetics/__tests__/tunnel/crypto.test.d.ts +0 -1
  224. package/dist/commands/synthetics/__tests__/tunnel/crypto.test.js +0 -21
  225. package/dist/commands/synthetics/__tests__/tunnel/crypto.test.js.map +0 -1
  226. package/dist/commands/synthetics/__tests__/tunnel/tunnel.test.d.ts +0 -1
  227. package/dist/commands/synthetics/__tests__/tunnel/tunnel.test.js +0 -80
  228. package/dist/commands/synthetics/__tests__/tunnel/tunnel.test.js.map +0 -1
  229. package/dist/commands/synthetics/__tests__/tunnel/websocket.test.d.ts +0 -1
  230. package/dist/commands/synthetics/__tests__/tunnel/websocket.test.js +0 -109
  231. package/dist/commands/synthetics/__tests__/tunnel/websocket.test.js.map +0 -1
  232. package/dist/commands/synthetics/__tests__/utils/internal.test.d.ts +0 -1
  233. package/dist/commands/synthetics/__tests__/utils/internal.test.js +0 -186
  234. package/dist/commands/synthetics/__tests__/utils/internal.test.js.map +0 -1
  235. package/dist/commands/synthetics/__tests__/utils/public.test.d.ts +0 -1
  236. package/dist/commands/synthetics/__tests__/utils/public.test.js +0 -1526
  237. package/dist/commands/synthetics/__tests__/utils/public.test.js.map +0 -1
  238. package/dist/commands/tag/__tests__/tag.test.d.ts +0 -1
  239. package/dist/commands/tag/__tests__/tag.test.js +0 -75
  240. package/dist/commands/tag/__tests__/tag.test.js.map +0 -1
  241. package/dist/commands/trace/__tests__/trace.test.d.ts +0 -1
  242. package/dist/commands/trace/__tests__/trace.test.js +0 -145
  243. package/dist/commands/trace/__tests__/trace.test.js.map +0 -1
  244. package/dist/commands/unity-symbols/__tests__/upload.test.d.ts +0 -1
  245. package/dist/commands/unity-symbols/__tests__/upload.test.js +0 -369
  246. package/dist/commands/unity-symbols/__tests__/upload.test.js.map +0 -1
  247. package/dist/helpers/__tests__/app.test.d.ts +0 -1
  248. package/dist/helpers/__tests__/app.test.js +0 -31
  249. package/dist/helpers/__tests__/app.test.js.map +0 -1
  250. package/dist/helpers/__tests__/ci.test.d.ts +0 -1
  251. package/dist/helpers/__tests__/ci.test.js +0 -252
  252. package/dist/helpers/__tests__/ci.test.js.map +0 -1
  253. package/dist/helpers/__tests__/fixtures.d.ts +0 -33
  254. package/dist/helpers/__tests__/fixtures.js +0 -71
  255. package/dist/helpers/__tests__/fixtures.js.map +0 -1
  256. package/dist/helpers/__tests__/flare.test.d.ts +0 -1
  257. package/dist/helpers/__tests__/flare.test.js +0 -226
  258. package/dist/helpers/__tests__/flare.test.js.map +0 -1
  259. package/dist/helpers/__tests__/fs.test.d.ts +0 -1
  260. package/dist/helpers/__tests__/fs.test.js +0 -189
  261. package/dist/helpers/__tests__/fs.test.js.map +0 -1
  262. package/dist/helpers/__tests__/plist.test.d.ts +0 -1
  263. package/dist/helpers/__tests__/plist.test.js +0 -43
  264. package/dist/helpers/__tests__/plist.test.js.map +0 -1
  265. package/dist/helpers/__tests__/prompt.test.d.ts +0 -1
  266. package/dist/helpers/__tests__/prompt.test.js +0 -71
  267. package/dist/helpers/__tests__/prompt.test.js.map +0 -1
  268. package/dist/helpers/__tests__/retry.test.d.ts +0 -1
  269. package/dist/helpers/__tests__/retry.test.js +0 -99
  270. package/dist/helpers/__tests__/retry.test.js.map +0 -1
  271. package/dist/helpers/__tests__/tags.test.d.ts +0 -1
  272. package/dist/helpers/__tests__/tags.test.js +0 -71
  273. package/dist/helpers/__tests__/tags.test.js.map +0 -1
  274. package/dist/helpers/__tests__/upload.test.d.ts +0 -1
  275. package/dist/helpers/__tests__/upload.test.js +0 -231
  276. package/dist/helpers/__tests__/upload.test.js.map +0 -1
  277. package/dist/helpers/__tests__/user-provided-git.test.d.ts +0 -1
  278. package/dist/helpers/__tests__/user-provided-git.test.js +0 -119
  279. package/dist/helpers/__tests__/user-provided-git.test.js.map +0 -1
  280. package/dist/helpers/__tests__/utils.test.d.ts +0 -1
  281. package/dist/helpers/__tests__/utils.test.js +0 -429
  282. package/dist/helpers/__tests__/utils.test.js.map +0 -1
  283. package/dist/helpers/__tests__/validation.test.d.ts +0 -1
  284. package/dist/helpers/__tests__/validation.test.js +0 -25
  285. package/dist/helpers/__tests__/validation.test.js.map +0 -1
  286. package/dist/helpers/git/__tests__/format-git-sourcemaps-data.test.d.ts +0 -1
  287. package/dist/helpers/git/__tests__/format-git-sourcemaps-data.test.js +0 -103
  288. package/dist/helpers/git/__tests__/format-git-sourcemaps-data.test.js.map +0 -1
  289. package/dist/helpers/git/__tests__/format-git-span-data.test.d.ts +0 -1
  290. package/dist/helpers/git/__tests__/format-git-span-data.test.js +0 -121
  291. package/dist/helpers/git/__tests__/format-git-span-data.test.js.map +0 -1
  292. package/dist/helpers/git/__tests__/get-git-data.test.d.ts +0 -1
  293. package/dist/helpers/git/__tests__/get-git-data.test.js +0 -72
  294. package/dist/helpers/git/__tests__/get-git-data.test.js.map +0 -1
@@ -1,270 +0,0 @@
1
- "use strict";
2
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
- return new (P || (P = Promise))(function (resolve, reject) {
5
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
- step((generator = generator.apply(thisArg, _arguments || [])).next());
9
- });
10
- };
11
- var __importDefault = (this && this.__importDefault) || function (mod) {
12
- return (mod && mod.__esModule) ? mod : { "default": mod };
13
- };
14
- Object.defineProperty(exports, "__esModule", { value: true });
15
- const os_1 = __importDefault(require("os"));
16
- const chalk_1 = __importDefault(require("chalk"));
17
- const advanced_1 = require("clipanion/lib/advanced");
18
- const interfaces_1 = require("../interfaces");
19
- const upload_1 = require("../upload");
20
- describe('upload', () => {
21
- describe('getMinifiedURL', () => {
22
- test('should return correct URL', () => {
23
- const command = new upload_1.UploadCommand();
24
- command['basePath'] = '/js/sourcemaps';
25
- command['minifiedPathPrefix'] = 'http://datadog.com/js';
26
- expect(command['getMinifiedURLAndRelativePath']('/js/sourcemaps/common.min.js.map')).toStrictEqual([
27
- 'http://datadog.com/js/common.min.js.map',
28
- '/common.min.js.map',
29
- ]);
30
- });
31
- });
32
- describe('getMinifiedURL: minifiedPathPrefix has the protocol omitted', () => {
33
- test('should return correct URL', () => {
34
- const command = new upload_1.UploadCommand();
35
- command['basePath'] = '/js/sourcemaps';
36
- command['minifiedPathPrefix'] = '//datadog.com/js';
37
- expect(command['getMinifiedURLAndRelativePath']('/js/sourcemaps/common.min.js.map')).toStrictEqual([
38
- '//datadog.com/js/common.min.js.map',
39
- '/common.min.js.map',
40
- ]);
41
- });
42
- });
43
- describe('getMinifiedURL: minifiedPathPrefix is an absolute path', () => {
44
- test('should return correct URL', () => {
45
- const command = new upload_1.UploadCommand();
46
- command['basePath'] = '/js/sourcemaps';
47
- command['minifiedPathPrefix'] = '/js';
48
- expect(command['getMinifiedURLAndRelativePath']('/js/sourcemaps/common.min.js.map')).toStrictEqual([
49
- '/js/common.min.js.map',
50
- '/common.min.js.map',
51
- ]);
52
- });
53
- });
54
- describe('isMinifiedPathPrefixValid: full URL', () => {
55
- test('should return true', () => {
56
- const command = new upload_1.UploadCommand();
57
- command['minifiedPathPrefix'] = 'http://datadog.com/js';
58
- expect(command['isMinifiedPathPrefixValid']()).toBe(true);
59
- });
60
- });
61
- describe('isMinifiedPathPrefixValid: URL without protocol', () => {
62
- test('should return true', () => {
63
- const command = new upload_1.UploadCommand();
64
- command['minifiedPathPrefix'] = '//datadog.com/js';
65
- expect(command['isMinifiedPathPrefixValid']()).toBe(true);
66
- });
67
- });
68
- describe('isMinifiedPathPrefixValid: leading slash', () => {
69
- test('should return true', () => {
70
- const command = new upload_1.UploadCommand();
71
- command['minifiedPathPrefix'] = '/js';
72
- expect(command['isMinifiedPathPrefixValid']()).toBe(true);
73
- });
74
- });
75
- describe('isMinifiedPathPrefixValid: no leading slash', () => {
76
- test('should return false', () => {
77
- const command = new upload_1.UploadCommand();
78
- command['minifiedPathPrefix'] = 'js';
79
- expect(command['isMinifiedPathPrefixValid']()).toBe(false);
80
- });
81
- });
82
- describe('isMinifiedPathPrefixValid: invalid URL without host', () => {
83
- test('should return false', () => {
84
- const command = new upload_1.UploadCommand();
85
- command['minifiedPathPrefix'] = 'info: undesired log line\nhttps://example.com/static/js/';
86
- expect(command['isMinifiedPathPrefixValid']()).toBe(false);
87
- });
88
- });
89
- describe('getApiHelper', () => {
90
- test('should throw an error if API key is undefined', () => __awaiter(void 0, void 0, void 0, function* () {
91
- process.env = {};
92
- const command = new upload_1.UploadCommand();
93
- expect(command['getRequestBuilder'].bind(command)).toThrow(`Missing ${chalk_1.default.bold('DATADOG_API_KEY')} in your environment.`);
94
- }));
95
- });
96
- describe('addRepositoryDataToPayloads', () => {
97
- test('repository url and commit still defined without payload', () => __awaiter(void 0, void 0, void 0, function* () {
98
- const command = new upload_1.UploadCommand();
99
- const write = jest.fn();
100
- command.context = { stdout: { write } };
101
- const sourcemaps = new Array(new interfaces_1.Sourcemap('src/commands/sourcemaps/__tests__/fixtures/sourcemap-with-no-files/empty.min.js', 'http://example/empty.min.js', 'src/commands/sourcemaps/__tests__/fixtures/sourcemap-with-no-files/empty.min.js.map', '', ''));
102
- // The command will fetch git metadatas for the current datadog-ci repository.
103
- // The `empty.min.js.map` contains no files, therefore no file payload should be set.
104
- yield command['addRepositoryDataToPayloads'](sourcemaps);
105
- expect(sourcemaps[0].gitData).toBeDefined();
106
- expect(sourcemaps[0].gitData.gitRepositoryURL).toBeDefined();
107
- expect(sourcemaps[0].gitData.gitCommitSha).toHaveLength(40);
108
- expect(sourcemaps[0].gitData.gitRepositoryPayload).toBeUndefined();
109
- }));
110
- test('should include payload', () => __awaiter(void 0, void 0, void 0, function* () {
111
- const command = new upload_1.UploadCommand();
112
- const write = jest.fn();
113
- command.context = { stdout: { write } };
114
- const sourcemaps = new Array(new interfaces_1.Sourcemap('src/commands/sourcemaps/__tests__/fixtures/basic/common.min.js', 'http://example/common.min.js', 'src/commands/sourcemaps/__tests__/fixtures/basic/common.min.js.map', '', ''));
115
- // The command will fetch git metadatas for the current datadog-ci repository.
116
- // The `common.min.js.map` contains the "git.test.ts" filename which matches a tracked filename,
117
- // therefore a file payload should be set.
118
- // Removing the "git.test.ts" file will break this test.
119
- yield command['addRepositoryDataToPayloads'](sourcemaps);
120
- expect(sourcemaps[0].gitData).toBeDefined();
121
- expect(sourcemaps[0].gitData.gitRepositoryURL).toBeDefined();
122
- expect(sourcemaps[0].gitData.gitCommitSha).toHaveLength(40);
123
- expect(sourcemaps[0].gitData.gitRepositoryPayload).toBeDefined();
124
- }));
125
- });
126
- });
127
- describe('execute', () => {
128
- const runCLI = (path) => __awaiter(void 0, void 0, void 0, function* () {
129
- const cli = makeCli();
130
- const context = createMockContext();
131
- process.env = { DATADOG_API_KEY: 'PLACEHOLDER' };
132
- const code = yield cli.run([
133
- 'sourcemaps',
134
- 'upload',
135
- path,
136
- '--release-version',
137
- '1234',
138
- '--service',
139
- 'test-service',
140
- '--minified-path-prefix',
141
- 'https://static.com/js',
142
- '--dry-run',
143
- ], context);
144
- return { context, code };
145
- });
146
- test('relative path with double dots', () => __awaiter(void 0, void 0, void 0, function* () {
147
- const { context, code } = yield runCLI('./src/commands/sourcemaps/__tests__/doesnotexist/../fixtures/basic');
148
- const output = context.stdout.toString().split(os_1.default.EOL);
149
- expect(code).toBe(0);
150
- checkConsoleOutput(output, {
151
- basePath: 'src/commands/sourcemaps/__tests__/fixtures/basic',
152
- concurrency: 20,
153
- jsFilesURLs: ['https://static.com/js/common.min.js'],
154
- minifiedPathPrefix: 'https://static.com/js',
155
- projectPath: '',
156
- service: 'test-service',
157
- sourcemapsPaths: ['src/commands/sourcemaps/__tests__/fixtures/basic/common.min.js.map'],
158
- version: '1234',
159
- });
160
- }));
161
- test('relative path', () => __awaiter(void 0, void 0, void 0, function* () {
162
- const { context, code } = yield runCLI('./src/commands/sourcemaps/__tests__/fixtures/basic');
163
- const output = context.stdout.toString().split(os_1.default.EOL);
164
- expect(code).toBe(0);
165
- checkConsoleOutput(output, {
166
- basePath: 'src/commands/sourcemaps/__tests__/fixtures/basic',
167
- concurrency: 20,
168
- jsFilesURLs: ['https://static.com/js/common.min.js'],
169
- minifiedPathPrefix: 'https://static.com/js',
170
- projectPath: '',
171
- service: 'test-service',
172
- sourcemapsPaths: ['src/commands/sourcemaps/__tests__/fixtures/basic/common.min.js.map'],
173
- version: '1234',
174
- });
175
- }));
176
- test('absolute path', () => __awaiter(void 0, void 0, void 0, function* () {
177
- const { context, code } = yield runCLI(process.cwd() + '/src/commands/sourcemaps/__tests__/fixtures/basic');
178
- const output = context.stdout.toString().split(os_1.default.EOL);
179
- expect(code).toBe(0);
180
- checkConsoleOutput(output, {
181
- basePath: `${process.cwd()}/src/commands/sourcemaps/__tests__/fixtures/basic`,
182
- concurrency: 20,
183
- jsFilesURLs: ['https://static.com/js/common.min.js'],
184
- minifiedPathPrefix: 'https://static.com/js',
185
- projectPath: '',
186
- service: 'test-service',
187
- sourcemapsPaths: [`${process.cwd()}/src/commands/sourcemaps/__tests__/fixtures/basic/common.min.js.map`],
188
- version: '1234',
189
- });
190
- }));
191
- test('using the mjs extension', () => __awaiter(void 0, void 0, void 0, function* () {
192
- const { context, code } = yield runCLI('./src/commands/sourcemaps/__tests__/mjs');
193
- const output = context.stdout.toString().split(os_1.default.EOL);
194
- expect(code).toBe(0);
195
- checkConsoleOutput(output, {
196
- basePath: 'src/commands/sourcemaps/__tests__/mjs',
197
- concurrency: 20,
198
- jsFilesURLs: ['https://static.com/js/common.mjs'],
199
- minifiedPathPrefix: 'https://static.com/js',
200
- projectPath: '',
201
- service: 'test-service',
202
- sourcemapsPaths: ['src/commands/sourcemaps/__tests__/mjs/common.mjs.map'],
203
- version: '1234',
204
- });
205
- }));
206
- test('all files are skipped', () => __awaiter(void 0, void 0, void 0, function* () {
207
- const { context, code } = yield runCLI('./src/commands/sourcemaps/__tests__/fixtures/stdout-output/all-skipped');
208
- const output = context.stdout.toString().split(os_1.default.EOL);
209
- expect(code).toBe(0);
210
- output.reverse();
211
- expect(output[3]).toContain('Some sourcemaps have been skipped');
212
- expect(output[2]).toContain('Details about the 2 found sourcemaps:');
213
- expect(output[1]).toContain(' * 2 sourcemaps were skipped');
214
- }));
215
- test('mix of skipped filed and correct files', () => __awaiter(void 0, void 0, void 0, function* () {
216
- const { context, code } = yield runCLI('./src/commands/sourcemaps/__tests__/fixtures/stdout-output/mixed');
217
- const output = context.stdout.toString().split(os_1.default.EOL);
218
- expect(code).toBe(0);
219
- output.reverse();
220
- expect(output[4]).toContain('Some sourcemaps have been skipped');
221
- expect(output[3]).toContain('Details about the 3 found sourcemaps:');
222
- expect(output[2]).toContain(' * 2 sourcemaps successfully uploaded');
223
- expect(output[1]).toContain(' * 1 sourcemap was skipped');
224
- }));
225
- test('completely empty sourcemap should be skipped', () => __awaiter(void 0, void 0, void 0, function* () {
226
- const { context, code } = yield runCLI('./src/commands/sourcemaps/__tests__/fixtures/empty-file/');
227
- const output = context.stdout.toString().split(os_1.default.EOL);
228
- expect(code).toBe(0);
229
- output.reverse();
230
- expect(output[3]).toContain('Some sourcemaps have been skipped');
231
- expect(output[2]).toContain('Details about the 2 found sourcemaps:');
232
- expect(output[1]).toContain(' * 2 sourcemaps were skipped');
233
- }));
234
- });
235
- const makeCli = () => {
236
- const cli = new advanced_1.Cli();
237
- cli.register(upload_1.UploadCommand);
238
- return cli;
239
- };
240
- const createMockContext = () => {
241
- let data = '';
242
- return {
243
- stdout: {
244
- toString: () => data,
245
- write: (input) => {
246
- data += input;
247
- },
248
- },
249
- };
250
- };
251
- const checkConsoleOutput = (output, expected) => {
252
- expect(output[0]).toContain('DRY-RUN MODE ENABLED. WILL NOT UPLOAD SOURCEMAPS');
253
- expect(output[1]).toContain(`Starting upload with concurrency ${expected.concurrency}.`);
254
- expect(output[2]).toContain(`Will look for sourcemaps in ${expected.basePath}`);
255
- expect(output[3]).toContain(`Will match JS files for errors on files starting with ${expected.minifiedPathPrefix}`);
256
- expect(output[4]).toContain(`version: ${expected.version} service: ${expected.service} project path: ${expected.projectPath}`);
257
- const uploadedFileLines = output.slice(5, -4);
258
- expect(expected.sourcemapsPaths.length).toEqual(uploadedFileLines.length); // Safety check
259
- expect(expected.jsFilesURLs.length).toEqual(uploadedFileLines.length); // Safety check
260
- uploadedFileLines.forEach((_, index) => {
261
- expect(uploadedFileLines[index]).toContain(`[DRYRUN] Uploading sourcemap ${expected.sourcemapsPaths} for JS file available at ${expected.jsFilesURLs}`);
262
- });
263
- if (uploadedFileLines.length > 1) {
264
- expect(output.slice(-2, -1)[0]).toContain(`[DRYRUN] Handled ${uploadedFileLines.length} sourcemaps with success`);
265
- }
266
- else {
267
- expect(output.slice(-2, -1)[0]).toContain(`[DRYRUN] Handled ${uploadedFileLines.length} sourcemap with success`);
268
- }
269
- };
270
- //# sourceMappingURL=upload.test.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"upload.test.js","sourceRoot":"","sources":["../../../../src/commands/sourcemaps/__tests__/upload.test.ts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,SAAS,CAAC,oBAAoB,iBAAiB,CAAC,MAAM,0BAA0B,CAAC,CAAA;KAClH;SAAM;QACL,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,oBAAoB,iBAAiB,CAAC,MAAM,yBAAyB,CAAC,CAAA;KACjH;AACH,CAAC,CAAA"}
@@ -1 +0,0 @@
1
- export {};
@@ -1,31 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const utils_1 = require("../utils");
4
- describe('utils', () => {
5
- describe('getMinifiedFilePath', () => {
6
- test('should return correct minified path', () => {
7
- const file1 = 'sourcemaps/file1.min.js.map';
8
- const file2 = 'sourcemaps/file2.js.map.xxx';
9
- expect((0, utils_1.getMinifiedFilePath)(file1)).toBe('sourcemaps/file1.min.js');
10
- expect(() => (0, utils_1.getMinifiedFilePath)(file2)).toThrow('cannot get minified file path from a file which is not a sourcemap');
11
- });
12
- });
13
- describe('arelastFoldersRepeated', () => {
14
- test('should return true', () => {
15
- const minifiedPathPrefix = 'https://subdomain.domain.dev/static/js';
16
- const relativePath = '/static/js/1.23.chunk.js';
17
- expect((0, utils_1.extractRepeatedPath)(minifiedPathPrefix, relativePath)).toBe('static/js');
18
- });
19
- test('should return true 2', () => {
20
- const minifiedPathPrefix = 'https://subdomain.domain.dev/static/js/';
21
- const relativePath = '/static/js/1.23.chunk.js';
22
- expect((0, utils_1.extractRepeatedPath)(minifiedPathPrefix, relativePath)).toBe('static/js');
23
- });
24
- test('should return false', () => {
25
- const minifiedPathPrefix = 'https://subdomain.domain.dev/static/js';
26
- const relativePath = '/1.23.chunk.js';
27
- expect((0, utils_1.extractRepeatedPath)(minifiedPathPrefix, relativePath)).toBe(undefined);
28
- });
29
- });
30
- });
31
- //# sourceMappingURL=utils.test.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"utils.test.js","sourceRoot":"","sources":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M,CAAC,IAAA,2BAAmB,EAAC,kBAAkB,EAAE,YAAY,CAAC,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,CAAA;QAC/E,CAAC,CAAC,CAAA;IACJ,CAAC,CAAC,CAAA;AACJ,CAAC,CAAC,CAAA"}
@@ -1,192 +0,0 @@
1
- "use strict";
2
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
- return new (P || (P = Promise))(function (resolve, reject) {
5
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
- step((generator = generator.apply(thisArg, _arguments || [])).next());
9
- });
10
- };
11
- Object.defineProperty(exports, "__esModule", { value: true });
12
- const client_cloudwatch_logs_1 = require("@aws-sdk/client-cloudwatch-logs");
13
- const client_iam_1 = require("@aws-sdk/client-iam");
14
- const client_sfn_1 = require("@aws-sdk/client-sfn");
15
- const aws_sdk_client_mock_1 = require("aws-sdk-client-mock");
16
- const fixtures_1 = require("../../../helpers/__tests__/fixtures");
17
- const awsCommands_1 = require("../awsCommands");
18
- const helpers_1 = require("../helpers");
19
- describe('awsCommands test', () => {
20
- const expectedResp = { fakeKey: 'fakeValue' };
21
- const fakeForwarderArn = 'fakeForwarderArn';
22
- const fakeFilterName = 'fakeFilterName';
23
- const fakeLogGroupName = 'fakeLogGroupName';
24
- const fakeLogGroupArn = 'fakeLogGroupArn';
25
- const fakeStepFunctionArn = 'arn:aws:states:sa-east-1:1234567890:stateMachine:UnitTestStateMachineName';
26
- const fakeStateMachineName = 'UnitTestStateMachineName';
27
- const fakeAccountId = '123456789012';
28
- const fakeRoleArn = `arn:aws:iam::${fakeAccountId}:role/unit-test-fake-role-name`;
29
- const mockedCloudWatchLogsClient = (0, aws_sdk_client_mock_1.mockClient)(client_cloudwatch_logs_1.CloudWatchLogsClient);
30
- const mockedIamClient = (0, aws_sdk_client_mock_1.mockClient)(client_iam_1.IAMClient);
31
- const mockedStepFunctionsClient = (0, aws_sdk_client_mock_1.mockClient)(client_sfn_1.SFNClient);
32
- let describeStateMachineCommandOutput;
33
- let mockedContext;
34
- beforeEach(() => {
35
- mockedStepFunctionsClient.reset();
36
- mockedCloudWatchLogsClient.reset();
37
- mockedIamClient.reset();
38
- jest.resetModules();
39
- process.env = {};
40
- mockedContext = (0, fixtures_1.createMockContext)();
41
- describeStateMachineCommandOutput = {
42
- $metadata: {},
43
- creationDate: undefined,
44
- definition: undefined,
45
- roleArn: undefined,
46
- type: undefined,
47
- stateMachineArn: fakeStepFunctionArn,
48
- name: fakeStateMachineName,
49
- };
50
- });
51
- test('listTagsForResource test', () => __awaiter(void 0, void 0, void 0, function* () {
52
- mockedStepFunctionsClient.on(client_sfn_1.ListTagsForResourceCommand, { resourceArn: fakeStepFunctionArn }).resolves(expectedResp);
53
- const actual = yield (0, awsCommands_1.listTagsForResource)(new client_sfn_1.SFNClient({}), fakeStepFunctionArn);
54
- expect(actual).toEqual(expectedResp);
55
- }));
56
- test('putSubscriptionFilter test', () => __awaiter(void 0, void 0, void 0, function* () {
57
- const input = {
58
- destinationArn: fakeForwarderArn,
59
- filterName: fakeFilterName,
60
- filterPattern: '',
61
- logGroupName: fakeLogGroupName,
62
- };
63
- mockedCloudWatchLogsClient.on(client_cloudwatch_logs_1.PutSubscriptionFilterCommand, input).resolves(expectedResp);
64
- const actual = yield (0, awsCommands_1.putSubscriptionFilter)(new client_cloudwatch_logs_1.CloudWatchLogsClient({}), fakeForwarderArn, fakeFilterName, fakeLogGroupName, fakeStepFunctionArn, mockedContext, false);
65
- expect(actual).toEqual(expectedResp);
66
- }));
67
- test('tagResource test', () => __awaiter(void 0, void 0, void 0, function* () {
68
- const fakeTags = [{ key: 'key1', val: 'val1' }];
69
- const input = {
70
- resourceArn: fakeStepFunctionArn,
71
- tags: fakeTags,
72
- };
73
- mockedStepFunctionsClient.on(client_sfn_1.TagResourceCommand, input).resolves(expectedResp);
74
- const actual = yield (0, awsCommands_1.tagResource)(new client_sfn_1.SFNClient({}), fakeStepFunctionArn, fakeTags, mockedContext, false);
75
- expect(actual).toEqual(expectedResp);
76
- }));
77
- test('createLogGroup test', () => __awaiter(void 0, void 0, void 0, function* () {
78
- const input = { logGroupName: fakeLogGroupName };
79
- mockedCloudWatchLogsClient.on(client_cloudwatch_logs_1.CreateLogGroupCommand, input).resolves(expectedResp);
80
- const actual = yield (0, awsCommands_1.createLogGroup)(new client_cloudwatch_logs_1.CloudWatchLogsClient({}), fakeLogGroupName, fakeStepFunctionArn, mockedContext, false);
81
- expect(actual).toEqual(expectedResp);
82
- }));
83
- test('deleteSubscriptionFilter test', () => __awaiter(void 0, void 0, void 0, function* () {
84
- const input = {
85
- filterName: fakeFilterName,
86
- logGroupName: fakeLogGroupName,
87
- };
88
- mockedCloudWatchLogsClient.on(client_cloudwatch_logs_1.DeleteSubscriptionFilterCommand, input).resolves(expectedResp);
89
- const actual = yield (0, awsCommands_1.deleteSubscriptionFilter)(new client_cloudwatch_logs_1.CloudWatchLogsClient({}), fakeFilterName, fakeLogGroupName, fakeStepFunctionArn, mockedContext, false);
90
- expect(actual).toEqual(expectedResp);
91
- }));
92
- test('createLogsAccessPolicy test', () => __awaiter(void 0, void 0, void 0, function* () {
93
- describeStateMachineCommandOutput = {
94
- $metadata: {},
95
- creationDate: undefined,
96
- definition: undefined,
97
- roleArn: undefined,
98
- type: undefined,
99
- stateMachineArn: fakeStepFunctionArn,
100
- name: fakeStateMachineName,
101
- };
102
- const logsAccessPolicy = {
103
- Version: '2012-10-17',
104
- Statement: [
105
- {
106
- Effect: 'Allow',
107
- Action: [
108
- 'logs:CreateLogDelivery',
109
- 'logs:CreateLogStream',
110
- 'logs:GetLogDelivery',
111
- 'logs:UpdateLogDelivery',
112
- 'logs:DeleteLogDelivery',
113
- 'logs:ListLogDeliveries',
114
- 'logs:PutLogEvents',
115
- 'logs:PutResourcePolicy',
116
- 'logs:DescribeResourcePolicies',
117
- 'logs:DescribeLogGroups',
118
- ],
119
- Resource: '*',
120
- },
121
- ],
122
- };
123
- const input = {
124
- PolicyDocument: JSON.stringify(logsAccessPolicy),
125
- PolicyName: (0, helpers_1.buildLogAccessPolicyName)(describeStateMachineCommandOutput),
126
- };
127
- mockedIamClient.on(client_iam_1.CreatePolicyCommand, input).resolves(expectedResp);
128
- const actual = yield (0, awsCommands_1.createLogsAccessPolicy)(new client_iam_1.IAMClient({}), describeStateMachineCommandOutput, fakeStepFunctionArn, mockedContext, false);
129
- expect(actual).toEqual(expectedResp);
130
- }));
131
- test('attachPolicyToStateMachineIamRole test', () => __awaiter(void 0, void 0, void 0, function* () {
132
- describeStateMachineCommandOutput = {
133
- $metadata: {},
134
- creationDate: undefined,
135
- definition: undefined,
136
- roleArn: fakeRoleArn,
137
- type: undefined,
138
- stateMachineArn: fakeStepFunctionArn,
139
- name: fakeStateMachineName,
140
- };
141
- const input = {
142
- PolicyArn: `arn:aws:iam::${fakeAccountId}:policy/LogsDeliveryAccessPolicy-${fakeStateMachineName}`,
143
- RoleName: 'unit-test-fake-role-name',
144
- };
145
- mockedIamClient.on(client_iam_1.AttachRolePolicyCommand, input).resolves(expectedResp);
146
- const actual = yield (0, awsCommands_1.attachPolicyToStateMachineIamRole)(new client_iam_1.IAMClient({}), describeStateMachineCommandOutput, fakeAccountId, fakeStepFunctionArn, mockedContext, false);
147
- expect(actual).toEqual(expectedResp);
148
- }));
149
- test('enableStepFunctionLogs test', () => __awaiter(void 0, void 0, void 0, function* () {
150
- const input = {
151
- stateMachineArn: fakeStepFunctionArn,
152
- loggingConfiguration: {
153
- destinations: [{ cloudWatchLogsLogGroup: { logGroupArn: fakeLogGroupArn } }],
154
- level: client_sfn_1.LogLevel.ALL,
155
- includeExecutionData: true,
156
- },
157
- };
158
- mockedStepFunctionsClient.on(client_sfn_1.UpdateStateMachineCommand, input).resolves(expectedResp);
159
- const actual = yield (0, awsCommands_1.enableStepFunctionLogs)(new client_sfn_1.SFNClient({}), describeStateMachineCommandOutput, fakeLogGroupArn, fakeStepFunctionArn, mockedContext, false);
160
- expect(actual).toEqual(expectedResp);
161
- }));
162
- test('updateStateMachineDefinition test', () => __awaiter(void 0, void 0, void 0, function* () {
163
- const definitionObj = {
164
- Comment: 'no comment',
165
- States: {},
166
- };
167
- const input = {
168
- stateMachineArn: fakeStepFunctionArn,
169
- definition: JSON.stringify(definitionObj),
170
- };
171
- mockedStepFunctionsClient.on(client_sfn_1.UpdateStateMachineCommand, input).resolves(expectedResp);
172
- const actual = yield (0, awsCommands_1.updateStateMachineDefinition)(new client_sfn_1.SFNClient({}), describeStateMachineCommandOutput, definitionObj, mockedContext, false);
173
- expect(actual).toEqual(expectedResp);
174
- }));
175
- test('describeStateMachine test', () => __awaiter(void 0, void 0, void 0, function* () {
176
- const input = { stateMachineArn: fakeStepFunctionArn };
177
- mockedStepFunctionsClient.on(client_sfn_1.DescribeStateMachineCommand, input).resolves(expectedResp);
178
- const actual = yield (0, awsCommands_1.describeStateMachine)(new client_sfn_1.SFNClient({}), fakeStepFunctionArn);
179
- expect(actual).toEqual(expectedResp);
180
- }));
181
- test('untagResource test', () => __awaiter(void 0, void 0, void 0, function* () {
182
- const fakeTagKeys = ['tagKey1', 'tagKey2'];
183
- const input = {
184
- resourceArn: fakeStepFunctionArn,
185
- tagKeys: fakeTagKeys,
186
- };
187
- mockedStepFunctionsClient.on(client_sfn_1.UntagResourceCommand, input).resolves(expectedResp);
188
- const actual = yield (0, awsCommands_1.untagResource)(new client_sfn_1.SFNClient({}), fakeTagKeys, fakeStepFunctionArn, mockedContext, false);
189
- expect(actual).toEqual(expectedResp);
190
- }));
191
- });
192
- //# sourceMappingURL=awsCommands.test.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"awsCommands.test.js","sourceRoot":"","sources":["../../../../src/commands/stepfunctions/__tests__/awsCommands.test.ts"],"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AY,CAAC,CAAA;QAEhF,MAAM,MAAM,GAAG,MAAM,IAAA,2BAAa,EAAC,IAAI,sBAAS,CAAC,EAAE,CAAC,EAAE,WAAW,EAAE,mBAAmB,EAAE,aAAa,EAAE,KAAK,CAAC,CAAA;QAE7G,MAAM,CAAC,MAAM,CAAC,CAAC,OAAO,CAAC,YAAY,CAAC,CAAA;IACtC,CAAC,CAAA,CAAC,CAAA;AACJ,CAAC,CAAC,CAAA"}
@@ -1,6 +0,0 @@
1
- import { SubscriptionFilter } from '@aws-sdk/client-cloudwatch-logs/dist-types/models/models_0';
2
- import { DescribeStateMachineCommandOutput } from '@aws-sdk/client-sfn';
3
- import { Tag } from '@aws-sdk/client-sfn/dist-types/ts3.4/models/models_0';
4
- export declare const describeStateMachineFixture: (props?: Partial<DescribeStateMachineCommandOutput>) => DescribeStateMachineCommandOutput;
5
- export declare const stepFunctionTagListFixture: (props?: Tag[]) => Tag[];
6
- export declare const subscriptionFilterFixture: (props?: Partial<SubscriptionFilter>) => SubscriptionFilter;
@@ -1,45 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.subscriptionFilterFixture = exports.stepFunctionTagListFixture = exports.describeStateMachineFixture = void 0;
4
- const client_sfn_1 = require("@aws-sdk/client-sfn");
5
- const describeStateMachineFixture = (props = {}) => {
6
- const defaults = {
7
- $metadata: {},
8
- stateMachineArn: 'arn:aws:states:us-east-1:000000000000:stateMachine:ExampleStepFunction',
9
- name: 'ExampleStepFunction',
10
- definition: '',
11
- loggingConfiguration: {
12
- level: client_sfn_1.LogLevel.ALL,
13
- includeExecutionData: true,
14
- destinations: [
15
- {
16
- cloudWatchLogsLogGroup: {
17
- logGroupArn: 'arn:aws:logs:us-east-1:000000000000:log-group:/aws/vendedlogs/states/ExampleStepFunction-Logs-test:*',
18
- },
19
- },
20
- ],
21
- },
22
- roleArn: `arn:aws:iam::000000000000:role/ExampleStepFunctionRole`,
23
- type: 'STANDARD',
24
- creationDate: new Date('2023-03-08T00:00:00Z'),
25
- };
26
- return Object.assign(Object.assign({}, defaults), props);
27
- };
28
- exports.describeStateMachineFixture = describeStateMachineFixture;
29
- const stepFunctionTagListFixture = (props = []) => {
30
- const defaults = [{ key: 'env', value: 'test' }];
31
- defaults.push(...props);
32
- return defaults;
33
- };
34
- exports.stepFunctionTagListFixture = stepFunctionTagListFixture;
35
- const subscriptionFilterFixture = (props = {}) => {
36
- const defaults = {
37
- destinationArn: 'arn:aws:lambda:us-east-1:000000000000:function:DatadogForwarder',
38
- filterName: 'ExampleStepFunction-DdCiLogGroupSubscription',
39
- filterPattern: '',
40
- logGroupName: '/aws/vendedlogs/states/ExampleStepFunction-Logs-test',
41
- };
42
- return Object.assign(Object.assign({}, defaults), props);
43
- };
44
- exports.subscriptionFilterFixture = subscriptionFilterFixture;
45
- //# sourceMappingURL=aws-resources.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"aws-resources.js","sourceRoot":"","sources":["../../../../../src/commands/stepfunctions/__tests__/fixtures/aws-resources.ts"],"names":[],"mappings":";;;AACA,oDAA+E;AAGxE,MAAM,2BAA2B,GAAG,CACzC,QAAoD,EAAE,EACnB,EAAE;IACrC,MAAM,QAAQ,GAAsC;QAClD,SAAS,EAAE,EAAE;QACb,eAAe,EAAE,wEAAwE;QACzF,IAAI,EAAE,qBAAqB;QAC3B,UAAU,EAAE,EAAE;QACd,oBAAoB,EAAE;YACpB,KAAK,EAAE,qBAAQ,CAAC,GAAG;YACnB,oBAAoB,EAAE,IAAI;YAC1B,YAAY,EAAE;gBACZ;oBACE,sBAAsB,EAAE;wBACtB,WAAW,EACT,sGAAsG;qBACzG;iBACF;aACF;SACF;QACD,OAAO,EAAE,wDAAwD;QACjE,IAAI,EAAE,UAAU;QAChB,YAAY,EAAE,IAAI,IAAI,CAAC,sBAAsB,CAAC;KAC/C,CAAA;IAED,uCAAW,QAAQ,GAAK,KAAK,EAAC;AAChC,CAAC,CAAA;AA1BY,QAAA,2BAA2B,+BA0BvC;AAEM,MAAM,0BAA0B,GAAG,CAAC,QAAe,EAAE,EAAS,EAAE;IACrE,MAAM,QAAQ,GAAU,CAAC,EAAC,GAAG,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,EAAC,CAAC,CAAA;IACrD,QAAQ,CAAC,IAAI,CAAC,GAAG,KAAK,CAAC,CAAA;IAEvB,OAAO,QAAQ,CAAA;AACjB,CAAC,CAAA;AALY,QAAA,0BAA0B,8BAKtC;AAEM,MAAM,yBAAyB,GAAG,CAAC,QAAqC,EAAE,EAAsB,EAAE;IACvG,MAAM,QAAQ,GAAuB;QACnC,cAAc,EAAE,iEAAiE;QACjF,UAAU,EAAE,8CAA8C;QAC1D,aAAa,EAAE,EAAE;QACjB,YAAY,EAAE,sDAAsD;KACrE,CAAA;IAED,uCAAW,QAAQ,GAAK,KAAK,EAAC;AAChC,CAAC,CAAA;AATY,QAAA,yBAAyB,6BASrC"}
@@ -1,5 +0,0 @@
1
- import type { CommandContext } from '../../../../helpers/interfaces';
2
- export interface ContextFixture extends CommandContext {
3
- toString: () => string;
4
- }
5
- export declare const contextFixture: () => ContextFixture;
@@ -1,19 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.contextFixture = void 0;
4
- const stream_1 = require("stream");
5
- const contextFixture = () => {
6
- let data = '';
7
- return {
8
- stdout: new stream_1.Writable({
9
- write: (chunk, encoding, next) => {
10
- data += chunk.toString();
11
- next();
12
- },
13
- }),
14
- stderr: jest.fn(),
15
- toString: () => data,
16
- };
17
- };
18
- exports.contextFixture = contextFixture;
19
- //# sourceMappingURL=cli.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"cli.js","sourceRoot":"","sources":["../../../../../src/commands/stepfunctions/__tests__/fixtures/cli.ts"],"names":[],"mappings":";;;AAAA,mCAA+B;AAQxB,MAAM,cAAc,GAAG,GAAmB,EAAE;IACjD,IAAI,IAAI,GAAG,EAAE,CAAA;IAEb,OAAO;QACL,MAAM,EAAE,IAAI,iBAAQ,CAAC;YACnB,KAAK,EAAE,CAAC,KAAK,EAAE,QAAQ,EAAE,IAAI,EAAE,EAAE;gBAC/B,IAAI,IAAI,KAAK,CAAC,QAAQ,EAAE,CAAA;gBACxB,IAAI,EAAE,CAAA;YACR,CAAC;SACF,CAAC;QACF,MAAM,EAAE,IAAI,CAAC,EAAE,EAAS;QACxB,QAAQ,EAAE,GAAG,EAAE,CAAC,IAAI;KACrB,CAAA;AACH,CAAC,CAAA;AAbY,QAAA,cAAc,kBAa1B"}