skuba 14.0.0-replace-global-vars-20251121010036 → 14.0.0-test-private-templates-20260103062459

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 (411) hide show
  1. package/config/eslint.js +1 -1
  2. package/config/jest.js +1 -0
  3. package/config/prettier.d.ts +4 -8
  4. package/config/prettier.js +2 -10
  5. package/jest/moduleNameMapper.js +64 -0
  6. package/jest/transform.js +62 -0
  7. package/jest/tsConfig.js +26 -0
  8. package/jest-preset.js +37 -0
  9. package/lib/api/jest/index.d.ts +15 -0
  10. package/lib/api/jest/index.js +59 -0
  11. package/lib/api/jest/index.js.map +7 -0
  12. package/lib/cli/adapter/eslint.js +45 -11
  13. package/lib/cli/adapter/eslint.js.map +2 -2
  14. package/lib/cli/adapter/prettier.js +67 -39
  15. package/lib/cli/adapter/prettier.js.map +2 -2
  16. package/lib/cli/build/args.js +42 -8
  17. package/lib/cli/build/args.js.map +2 -2
  18. package/lib/cli/build/assets.js +60 -28
  19. package/lib/cli/build/assets.js.map +2 -2
  20. package/lib/cli/build/esbuild.js +45 -21
  21. package/lib/cli/build/esbuild.js.map +2 -2
  22. package/lib/cli/build/index.js +45 -21
  23. package/lib/cli/build/index.js.map +1 -1
  24. package/lib/cli/build/tsc.js +59 -22
  25. package/lib/cli/build/tsc.js.map +2 -2
  26. package/lib/cli/buildPackage/index.js +32 -8
  27. package/lib/cli/buildPackage/index.js.map +1 -1
  28. package/lib/cli/configure/analyseConfiguration.js +50 -16
  29. package/lib/cli/configure/analyseConfiguration.js.map +2 -2
  30. package/lib/cli/configure/analyseDependencies.d.ts +1 -1
  31. package/lib/cli/configure/analyseDependencies.js +59 -25
  32. package/lib/cli/configure/analyseDependencies.js.map +3 -3
  33. package/lib/cli/configure/analysis/diff.js +29 -5
  34. package/lib/cli/configure/analysis/diff.js.map +1 -1
  35. package/lib/cli/configure/analysis/files.js +42 -8
  36. package/lib/cli/configure/analysis/files.js.map +2 -2
  37. package/lib/cli/configure/analysis/git.js +46 -12
  38. package/lib/cli/configure/analysis/git.js.map +2 -2
  39. package/lib/cli/configure/analysis/package.d.ts +3 -2
  40. package/lib/cli/configure/analysis/package.js +45 -10
  41. package/lib/cli/configure/analysis/package.js.map +3 -3
  42. package/lib/cli/configure/analysis/project.js +50 -18
  43. package/lib/cli/configure/analysis/project.js.map +2 -2
  44. package/lib/cli/configure/dependencies/index.js +35 -7
  45. package/lib/cli/configure/dependencies/index.js.map +1 -1
  46. package/lib/cli/configure/dependencies/seekDatadogCustomMetrics.js +28 -4
  47. package/lib/cli/configure/dependencies/seekDatadogCustomMetrics.js.map +1 -1
  48. package/lib/cli/configure/dependencies/seekKoala.js +28 -4
  49. package/lib/cli/configure/dependencies/seekKoala.js.map +1 -1
  50. package/lib/cli/configure/dependencies/skuba.js +28 -4
  51. package/lib/cli/configure/dependencies/skuba.js.map +1 -1
  52. package/lib/cli/configure/dependencies/skubaDeps.js +26 -2
  53. package/lib/cli/configure/dependencies/skubaDeps.js.map +1 -1
  54. package/lib/cli/configure/dependencies/skubaDive.js +29 -4
  55. package/lib/cli/configure/dependencies/skubaDive.js.map +1 -1
  56. package/lib/cli/configure/ensureTemplateCompletion.d.ts +1 -1
  57. package/lib/cli/configure/ensureTemplateCompletion.js +61 -33
  58. package/lib/cli/configure/ensureTemplateCompletion.js.map +3 -3
  59. package/lib/cli/configure/getEntryPoint.d.ts +1 -1
  60. package/lib/cli/configure/getEntryPoint.js +48 -14
  61. package/lib/cli/configure/getEntryPoint.js.map +3 -3
  62. package/lib/cli/configure/getProjectType.d.ts +1 -1
  63. package/lib/cli/configure/getProjectType.js +35 -14
  64. package/lib/cli/configure/getProjectType.js.map +2 -2
  65. package/lib/cli/configure/index.js +84 -50
  66. package/lib/cli/configure/index.js.map +2 -2
  67. package/lib/cli/configure/modules/eslint.js +34 -10
  68. package/lib/cli/configure/modules/eslint.js.map +1 -1
  69. package/lib/cli/configure/modules/ignore.js +32 -8
  70. package/lib/cli/configure/modules/ignore.js.map +1 -1
  71. package/lib/cli/configure/modules/index.js +44 -18
  72. package/lib/cli/configure/modules/index.js.map +2 -2
  73. package/lib/cli/configure/modules/jest.d.ts +2 -0
  74. package/lib/cli/configure/modules/jest.js +86 -0
  75. package/lib/cli/configure/modules/jest.js.map +7 -0
  76. package/lib/cli/configure/modules/nodemon.js +28 -4
  77. package/lib/cli/configure/modules/nodemon.js.map +1 -1
  78. package/lib/cli/configure/modules/package.js +34 -10
  79. package/lib/cli/configure/modules/package.js.map +1 -1
  80. package/lib/cli/configure/modules/prettier.js +35 -11
  81. package/lib/cli/configure/modules/prettier.js.map +1 -1
  82. package/lib/cli/configure/modules/renovate.js +40 -17
  83. package/lib/cli/configure/modules/renovate.js.map +2 -2
  84. package/lib/cli/configure/modules/serverless.js +26 -2
  85. package/lib/cli/configure/modules/serverless.js.map +1 -1
  86. package/lib/cli/configure/modules/tslint.js +28 -4
  87. package/lib/cli/configure/modules/tslint.js.map +1 -1
  88. package/lib/cli/configure/processing/configFile.js +39 -3
  89. package/lib/cli/configure/processing/configFile.js.map +1 -1
  90. package/lib/cli/configure/processing/deleteFiles.js +26 -2
  91. package/lib/cli/configure/processing/deleteFiles.js.map +1 -1
  92. package/lib/cli/configure/processing/javascript.js +27 -2
  93. package/lib/cli/configure/processing/javascript.js.map +1 -1
  94. package/lib/cli/configure/processing/json.js +31 -6
  95. package/lib/cli/configure/processing/json.js.map +1 -1
  96. package/lib/cli/configure/processing/loadFiles.js +26 -2
  97. package/lib/cli/configure/processing/loadFiles.js.map +1 -1
  98. package/lib/cli/configure/processing/module.js +28 -4
  99. package/lib/cli/configure/processing/module.js.map +1 -1
  100. package/lib/cli/configure/processing/package.d.ts +67 -1
  101. package/lib/cli/configure/processing/package.js +45 -8
  102. package/lib/cli/configure/processing/package.js.map +3 -3
  103. package/lib/cli/configure/processing/prettier.js +38 -4
  104. package/lib/cli/configure/processing/prettier.js.map +2 -2
  105. package/lib/cli/configure/processing/record.js +41 -5
  106. package/lib/cli/configure/processing/record.js.map +2 -2
  107. package/lib/cli/configure/processing/typescript.js +63 -26
  108. package/lib/cli/configure/processing/typescript.js.map +2 -2
  109. package/lib/cli/configure/types.d.ts +4 -15
  110. package/lib/cli/configure/types.js +16 -0
  111. package/lib/cli/configure/types.js.map +3 -3
  112. package/lib/cli/format/index.js +44 -20
  113. package/lib/cli/format/index.js.map +1 -1
  114. package/lib/cli/help/index.js +30 -6
  115. package/lib/cli/help/index.js.map +1 -1
  116. package/lib/cli/init/getConfig.d.ts +1 -1
  117. package/lib/cli/init/getConfig.js +111 -76
  118. package/lib/cli/init/getConfig.js.map +3 -3
  119. package/lib/cli/init/git.d.ts +1 -0
  120. package/lib/cli/init/git.js +88 -16
  121. package/lib/cli/init/git.js.map +3 -3
  122. package/lib/cli/init/index.js +98 -67
  123. package/lib/cli/init/index.js.map +2 -2
  124. package/lib/cli/init/prompts.d.ts +6 -5
  125. package/lib/cli/init/prompts.js +54 -27
  126. package/lib/cli/init/prompts.js.map +2 -2
  127. package/lib/cli/init/types.js +41 -7
  128. package/lib/cli/init/types.js.map +1 -1
  129. package/lib/cli/init/validation.js +30 -2
  130. package/lib/cli/init/validation.js.map +1 -1
  131. package/lib/cli/init/writePackageJson.js +42 -8
  132. package/lib/cli/init/writePackageJson.js.map +2 -2
  133. package/lib/cli/lint/annotate/buildkite/eslint.js +37 -3
  134. package/lib/cli/lint/annotate/buildkite/eslint.js.map +1 -1
  135. package/lib/cli/lint/annotate/buildkite/index.js +45 -11
  136. package/lib/cli/lint/annotate/buildkite/index.js.map +1 -1
  137. package/lib/cli/lint/annotate/buildkite/internal.js +37 -3
  138. package/lib/cli/lint/annotate/buildkite/internal.js.map +1 -1
  139. package/lib/cli/lint/annotate/buildkite/prettier.js +37 -3
  140. package/lib/cli/lint/annotate/buildkite/prettier.js.map +1 -1
  141. package/lib/cli/lint/annotate/buildkite/tsc.js +37 -3
  142. package/lib/cli/lint/annotate/buildkite/tsc.js.map +1 -1
  143. package/lib/cli/lint/annotate/github/eslint.js +26 -2
  144. package/lib/cli/lint/annotate/github/eslint.js.map +1 -1
  145. package/lib/cli/lint/annotate/github/index.js +45 -11
  146. package/lib/cli/lint/annotate/github/index.js.map +1 -1
  147. package/lib/cli/lint/annotate/github/internal.js +26 -2
  148. package/lib/cli/lint/annotate/github/internal.js.map +1 -1
  149. package/lib/cli/lint/annotate/github/prettier.js +26 -2
  150. package/lib/cli/lint/annotate/github/prettier.js.map +1 -1
  151. package/lib/cli/lint/annotate/github/tsc.js +28 -4
  152. package/lib/cli/lint/annotate/github/tsc.js.map +2 -2
  153. package/lib/cli/lint/annotate/index.js +30 -6
  154. package/lib/cli/lint/annotate/index.js.map +1 -1
  155. package/lib/cli/lint/autofix.js +73 -37
  156. package/lib/cli/lint/autofix.js.map +1 -1
  157. package/lib/cli/lint/eslint.js +51 -16
  158. package/lib/cli/lint/eslint.js.map +3 -3
  159. package/lib/cli/lint/external.js +51 -19
  160. package/lib/cli/lint/external.js.map +2 -2
  161. package/lib/cli/lint/index.js +49 -25
  162. package/lib/cli/lint/index.js.map +1 -1
  163. package/lib/cli/lint/internal.js +42 -18
  164. package/lib/cli/lint/internal.js.map +1 -1
  165. package/lib/cli/lint/internalLints/detectBadCodeowners.js +33 -8
  166. package/lib/cli/lint/internalLints/detectBadCodeowners.js.map +1 -1
  167. package/lib/cli/lint/internalLints/noSkubaTemplateJs.js +45 -11
  168. package/lib/cli/lint/internalLints/noSkubaTemplateJs.js.map +2 -2
  169. package/lib/cli/lint/internalLints/patchRenovateConfig.js +55 -21
  170. package/lib/cli/lint/internalLints/patchRenovateConfig.js.map +2 -2
  171. package/lib/cli/lint/internalLints/refreshConfigFiles.js +63 -32
  172. package/lib/cli/lint/internalLints/refreshConfigFiles.js.map +2 -2
  173. package/lib/cli/lint/internalLints/upgrade/index.d.ts +1 -1
  174. package/lib/cli/lint/internalLints/upgrade/index.js +53 -22
  175. package/lib/cli/lint/internalLints/upgrade/index.js.map +3 -3
  176. package/lib/cli/lint/internalLints/upgrade/patches/10.0.4/index.js +28 -4
  177. package/lib/cli/lint/internalLints/upgrade/patches/10.0.4/index.js.map +1 -1
  178. package/lib/cli/lint/internalLints/upgrade/patches/10.0.4/removeYarnIgnoreOptionalFlags.js +45 -11
  179. package/lib/cli/lint/internalLints/upgrade/patches/10.0.4/removeYarnIgnoreOptionalFlags.js.map +2 -2
  180. package/lib/cli/lint/internalLints/upgrade/patches/10.1.0/index.js +30 -6
  181. package/lib/cli/lint/internalLints/upgrade/patches/10.1.0/index.js.map +1 -1
  182. package/lib/cli/lint/internalLints/upgrade/patches/10.1.0/migrateNpmrcToPnpmWorkspace.js +65 -34
  183. package/lib/cli/lint/internalLints/upgrade/patches/10.1.0/migrateNpmrcToPnpmWorkspace.js.map +2 -2
  184. package/lib/cli/lint/internalLints/upgrade/patches/10.1.0/stopBundlingInCDKTests.js +46 -11
  185. package/lib/cli/lint/internalLints/upgrade/patches/10.1.0/stopBundlingInCDKTests.js.map +2 -2
  186. package/lib/cli/lint/internalLints/upgrade/patches/12.0.2/index.js +28 -4
  187. package/lib/cli/lint/internalLints/upgrade/patches/12.0.2/index.js.map +1 -1
  188. package/lib/cli/lint/internalLints/upgrade/patches/12.0.2/unhandledRejections.js +59 -23
  189. package/lib/cli/lint/internalLints/upgrade/patches/12.0.2/unhandledRejections.js.map +2 -2
  190. package/lib/cli/lint/internalLints/upgrade/patches/12.1.1/index.js +28 -4
  191. package/lib/cli/lint/internalLints/upgrade/patches/12.1.1/index.js.map +1 -1
  192. package/lib/cli/lint/internalLints/upgrade/patches/12.1.1/patchJestSnapshots.js +46 -11
  193. package/lib/cli/lint/internalLints/upgrade/patches/12.1.1/patchJestSnapshots.js.map +2 -2
  194. package/lib/cli/lint/internalLints/upgrade/patches/12.3.0/index.js +30 -6
  195. package/lib/cli/lint/internalLints/upgrade/patches/12.3.0/index.js.map +1 -1
  196. package/lib/cli/lint/internalLints/upgrade/patches/12.3.0/patchApiTokenFromEnvironment.js +46 -11
  197. package/lib/cli/lint/internalLints/upgrade/patches/12.3.0/patchApiTokenFromEnvironment.js.map +2 -2
  198. package/lib/cli/lint/internalLints/upgrade/patches/12.3.0/patchDockerfileSyntaxDirective.js +46 -11
  199. package/lib/cli/lint/internalLints/upgrade/patches/12.3.0/patchDockerfileSyntaxDirective.js.map +2 -2
  200. package/lib/cli/lint/internalLints/upgrade/patches/12.4.0/index.js +28 -4
  201. package/lib/cli/lint/internalLints/upgrade/patches/12.4.0/index.js.map +1 -1
  202. package/lib/cli/lint/internalLints/upgrade/patches/12.4.0/patchDockerfileCIVariable.js +46 -11
  203. package/lib/cli/lint/internalLints/upgrade/patches/12.4.0/patchDockerfileCIVariable.js.map +2 -2
  204. package/lib/cli/lint/internalLints/upgrade/patches/12.4.1/configureTsConfigForESM.js +67 -29
  205. package/lib/cli/lint/internalLints/upgrade/patches/12.4.1/configureTsConfigForESM.js.map +2 -2
  206. package/lib/cli/lint/internalLints/upgrade/patches/12.4.1/index.js +34 -10
  207. package/lib/cli/lint/internalLints/upgrade/patches/12.4.1/index.js.map +1 -1
  208. package/lib/cli/lint/internalLints/upgrade/patches/12.4.1/patchApiDockerfiles.js +45 -11
  209. package/lib/cli/lint/internalLints/upgrade/patches/12.4.1/patchApiDockerfiles.js.map +2 -2
  210. package/lib/cli/lint/internalLints/upgrade/patches/12.4.1/rewriteSrcImports.d.ts +0 -4
  211. package/lib/cli/lint/internalLints/upgrade/patches/12.4.1/rewriteSrcImports.js +63 -18
  212. package/lib/cli/lint/internalLints/upgrade/patches/12.4.1/rewriteSrcImports.js.map +3 -3
  213. package/lib/cli/lint/internalLints/upgrade/patches/12.4.1/updateLambdaConfigs.js +50 -15
  214. package/lib/cli/lint/internalLints/upgrade/patches/12.4.1/updateLambdaConfigs.js.map +2 -2
  215. package/lib/cli/lint/internalLints/upgrade/patches/13.1.1/index.js +40 -0
  216. package/lib/cli/lint/internalLints/upgrade/patches/13.1.1/index.js.map +7 -0
  217. package/lib/cli/lint/internalLints/upgrade/patches/13.1.1/patchRootTsconfig.d.ts +3 -0
  218. package/lib/cli/lint/internalLints/upgrade/patches/13.1.1/patchRootTsconfig.js +133 -0
  219. package/lib/cli/lint/internalLints/upgrade/patches/13.1.1/patchRootTsconfig.js.map +7 -0
  220. package/lib/cli/lint/internalLints/upgrade/patches/13.1.1/upgradeNode.js +55 -0
  221. package/lib/cli/lint/internalLints/upgrade/patches/13.1.1/upgradeNode.js.map +7 -0
  222. package/lib/cli/lint/internalLints/upgrade/patches/7.3.1/addEmptyExports.js +51 -17
  223. package/lib/cli/lint/internalLints/upgrade/patches/7.3.1/addEmptyExports.js.map +2 -2
  224. package/lib/cli/lint/internalLints/upgrade/patches/7.3.1/index.js +34 -10
  225. package/lib/cli/lint/internalLints/upgrade/patches/7.3.1/index.js.map +1 -1
  226. package/lib/cli/lint/internalLints/upgrade/patches/7.3.1/patchDockerfile.js +44 -10
  227. package/lib/cli/lint/internalLints/upgrade/patches/7.3.1/patchDockerfile.js.map +2 -2
  228. package/lib/cli/lint/internalLints/upgrade/patches/7.3.1/patchServerListener.js +46 -12
  229. package/lib/cli/lint/internalLints/upgrade/patches/7.3.1/patchServerListener.js.map +2 -2
  230. package/lib/cli/lint/internalLints/upgrade/patches/8.0.0/index.js +28 -4
  231. package/lib/cli/lint/internalLints/upgrade/patches/8.0.0/index.js.map +1 -1
  232. package/lib/cli/lint/internalLints/upgrade/patches/8.0.0/patchPnpmPackageManager.js +49 -15
  233. package/lib/cli/lint/internalLints/upgrade/patches/8.0.0/patchPnpmPackageManager.js.map +2 -2
  234. package/lib/cli/lint/internalLints/upgrade/patches/8.2.1/collapseDuplicateMergeKeys.js +45 -11
  235. package/lib/cli/lint/internalLints/upgrade/patches/8.2.1/collapseDuplicateMergeKeys.js.map +2 -2
  236. package/lib/cli/lint/internalLints/upgrade/patches/8.2.1/index.js +34 -10
  237. package/lib/cli/lint/internalLints/upgrade/patches/8.2.1/index.js.map +1 -1
  238. package/lib/cli/lint/internalLints/upgrade/patches/8.2.1/moveNpmrcMounts.js +45 -11
  239. package/lib/cli/lint/internalLints/upgrade/patches/8.2.1/moveNpmrcMounts.js.map +2 -2
  240. package/lib/cli/lint/internalLints/upgrade/patches/8.2.1/patchDockerCompose.js +45 -11
  241. package/lib/cli/lint/internalLints/upgrade/patches/8.2.1/patchDockerCompose.js.map +2 -2
  242. package/lib/cli/lint/internalLints/upgrade/patches/8.2.1/patchDockerImages.js +47 -13
  243. package/lib/cli/lint/internalLints/upgrade/patches/8.2.1/patchDockerImages.js.map +2 -2
  244. package/lib/cli/lint/internalLints/upgrade/patches/9.0.1/index.js +28 -4
  245. package/lib/cli/lint/internalLints/upgrade/patches/9.0.1/index.js.map +1 -1
  246. package/lib/cli/lint/internalLints/upgrade/patches/9.0.1/patchPnpmDockerImages.js +45 -11
  247. package/lib/cli/lint/internalLints/upgrade/patches/9.0.1/patchPnpmDockerImages.js.map +2 -2
  248. package/lib/cli/lint/prettier.js +50 -15
  249. package/lib/cli/lint/prettier.js.map +3 -3
  250. package/lib/cli/lint/tsc.js +28 -4
  251. package/lib/cli/lint/tsc.js.map +1 -1
  252. package/lib/cli/lint/types.js +16 -0
  253. package/lib/cli/lint/types.js.map +3 -3
  254. package/lib/cli/migrate/index.d.ts +5 -0
  255. package/lib/cli/migrate/index.js +79 -15
  256. package/lib/cli/migrate/index.js.map +2 -2
  257. package/lib/cli/migrate/nodeVersion/checks.d.ts +1 -14
  258. package/lib/cli/migrate/nodeVersion/checks.js +51 -120
  259. package/lib/cli/migrate/nodeVersion/checks.js.map +2 -2
  260. package/lib/cli/migrate/nodeVersion/index.d.ts +8 -2
  261. package/lib/cli/migrate/nodeVersion/index.js +239 -65
  262. package/lib/cli/migrate/nodeVersion/index.js.map +3 -3
  263. package/lib/cli/migrate/nodeVersion/upgrade.d.ts +8 -0
  264. package/lib/cli/migrate/nodeVersion/upgrade.js +179 -0
  265. package/lib/cli/migrate/nodeVersion/upgrade.js.map +7 -0
  266. package/lib/cli/node/index.js +57 -20
  267. package/lib/cli/node/index.js.map +3 -3
  268. package/lib/cli/release/index.js +28 -4
  269. package/lib/cli/release/index.js.map +1 -1
  270. package/lib/cli/start/index.js +50 -16
  271. package/lib/cli/start/index.js.map +3 -3
  272. package/lib/cli/test/index.js +44 -4
  273. package/lib/cli/test/index.js.map +2 -2
  274. package/lib/cli/test/reporters/github/annotations.d.ts +9 -0
  275. package/lib/cli/test/reporters/github/annotations.js +102 -0
  276. package/lib/cli/test/reporters/github/annotations.js.map +7 -0
  277. package/lib/cli/test/reporters/github/index.d.ts +5 -0
  278. package/lib/cli/test/reporters/github/index.js +74 -0
  279. package/lib/cli/test/reporters/github/index.js.map +7 -0
  280. package/lib/cli/version/index.js +30 -6
  281. package/lib/cli/version/index.js.map +1 -1
  282. package/lib/index.d.ts +1 -0
  283. package/lib/index.js +46 -6
  284. package/lib/index.js.map +2 -2
  285. package/lib/skuba.js +45 -26
  286. package/lib/skuba.js.map +3 -3
  287. package/lib/utils/args.js +43 -6
  288. package/lib/utils/args.js.map +2 -2
  289. package/lib/utils/command.js +42 -4
  290. package/lib/utils/command.js.map +3 -3
  291. package/lib/utils/copy.js +57 -20
  292. package/lib/utils/copy.js.map +2 -2
  293. package/lib/utils/dir.js +72 -32
  294. package/lib/utils/dir.js.map +2 -2
  295. package/lib/utils/env.js +26 -2
  296. package/lib/utils/env.js.map +1 -1
  297. package/lib/utils/error.js +47 -10
  298. package/lib/utils/error.js.map +1 -1
  299. package/lib/utils/exec.js +61 -23
  300. package/lib/utils/exec.js.map +3 -3
  301. package/lib/utils/fs.js +40 -6
  302. package/lib/utils/fs.js.map +2 -2
  303. package/lib/utils/help.js +30 -6
  304. package/lib/utils/help.js.map +1 -1
  305. package/lib/utils/logging.js +38 -11
  306. package/lib/utils/logging.js.map +1 -1
  307. package/lib/utils/logo.js +48 -24
  308. package/lib/utils/logo.js.map +1 -1
  309. package/lib/utils/manifest.d.ts +2 -3
  310. package/lib/utils/manifest.js +48 -8
  311. package/lib/utils/manifest.js.map +3 -3
  312. package/lib/utils/npmrc.js +26 -2
  313. package/lib/utils/npmrc.js.map +1 -1
  314. package/lib/utils/packageManager.js +49 -12
  315. package/lib/utils/packageManager.js.map +2 -2
  316. package/lib/utils/port.js +39 -4
  317. package/lib/utils/port.js.map +2 -2
  318. package/lib/utils/sleep.js +26 -2
  319. package/lib/utils/sleep.js.map +1 -1
  320. package/lib/utils/template.d.ts +1 -1
  321. package/lib/utils/template.js +60 -19
  322. package/lib/utils/template.js.map +3 -3
  323. package/lib/utils/validation.js +31 -2
  324. package/lib/utils/validation.js.map +1 -1
  325. package/lib/utils/version.js +46 -9
  326. package/lib/utils/version.js.map +2 -2
  327. package/lib/utils/wait.js +32 -7
  328. package/lib/utils/wait.js.map +1 -1
  329. package/lib/utils/worker.js +35 -10
  330. package/lib/utils/worker.js.map +1 -1
  331. package/lib/wrapper/function-arguments.d.js +1 -0
  332. package/lib/wrapper/functionHandler.js +49 -18
  333. package/lib/wrapper/functionHandler.js.map +2 -2
  334. package/lib/wrapper/http.js +43 -8
  335. package/lib/wrapper/http.js.map +2 -2
  336. package/lib/wrapper/index.js +7 -6
  337. package/lib/wrapper/index.js.map +1 -1
  338. package/lib/wrapper/main.js +42 -8
  339. package/lib/wrapper/main.js.map +3 -3
  340. package/lib/wrapper/requestListener.js +47 -13
  341. package/lib/wrapper/requestListener.js.map +2 -2
  342. package/lib/wrapper/server.js +28 -4
  343. package/lib/wrapper/server.js.map +1 -1
  344. package/package.json +42 -43
  345. package/template/base/_.prettierrc.js +1 -1
  346. package/template/base/_eslint.config.js +1 -1
  347. package/template/base/_pnpm-workspace.yaml +4 -3
  348. package/template/base/jest.config.ts +19 -0
  349. package/template/base/jest.setup.ts +3 -0
  350. package/template/express-rest-api/.buildkite/pipeline.yml +1 -1
  351. package/template/express-rest-api/.nvmrc +1 -1
  352. package/template/express-rest-api/package.json +8 -9
  353. package/template/express-rest-api/skuba.template.js +1 -1
  354. package/template/express-rest-api/src/app.test.ts +0 -1
  355. package/template/greeter/.buildkite/pipeline.yml +1 -1
  356. package/template/greeter/.nvmrc +1 -1
  357. package/template/greeter/package.json +4 -5
  358. package/template/greeter/skuba.template.js +1 -1
  359. package/template/greeter/src/app.test.ts +1 -3
  360. package/template/koa-rest-api/.buildkite/pipeline.yml +1 -1
  361. package/template/koa-rest-api/.nvmrc +1 -1
  362. package/template/koa-rest-api/package.json +9 -11
  363. package/template/koa-rest-api/skuba.template.js +1 -1
  364. package/template/koa-rest-api/src/api/jobs/getJobs.test.ts +0 -2
  365. package/template/koa-rest-api/src/api/jobs/postJob.test.ts +0 -2
  366. package/template/koa-rest-api/src/app.test.ts +0 -2
  367. package/template/koa-rest-api/src/framework/server.test.ts +2 -2
  368. package/template/koa-rest-api/src/framework/validation.test.ts +0 -2
  369. package/template/koa-rest-api/src/testing/metrics.ts +0 -2
  370. package/template/lambda-sqs-worker-cdk/.buildkite/pipeline.yml +2 -2
  371. package/template/lambda-sqs-worker-cdk/.nvmrc +1 -1
  372. package/template/lambda-sqs-worker-cdk/infra/__snapshots__/appStack.test.ts.snap +7 -19
  373. package/template/lambda-sqs-worker-cdk/infra/appStack.test.ts +9 -11
  374. package/template/lambda-sqs-worker-cdk/infra/appStack.ts +3 -3
  375. package/template/lambda-sqs-worker-cdk/infra/config.ts +2 -4
  376. package/template/lambda-sqs-worker-cdk/package.json +9 -9
  377. package/template/lambda-sqs-worker-cdk/skuba.template.js +13 -1
  378. package/template/lambda-sqs-worker-cdk/src/app.test.ts +13 -22
  379. package/template/lambda-sqs-worker-cdk/src/framework/handler.test.ts +0 -1
  380. package/template/lambda-sqs-worker-cdk/src/framework/validation.test.ts +31 -33
  381. package/template/lambda-sqs-worker-cdk/src/services/jobScorer.test.ts +2 -8
  382. package/template/lambda-sqs-worker-cdk/src/services/pipelineEventSender.test.ts +2 -3
  383. package/template/lambda-sqs-worker-cdk/src/testing/services.ts +3 -4
  384. package/template/oss-npm-package/.github/workflows/release.yml +1 -1
  385. package/template/oss-npm-package/.github/workflows/validate.yml +1 -1
  386. package/template/oss-npm-package/.nvmrc +1 -1
  387. package/template/oss-npm-package/_package.json +0 -1
  388. package/template/oss-npm-package/skuba.template.js +1 -1
  389. package/template/oss-npm-package/src/index.test.ts +0 -2
  390. package/template/private-npm-package/.nvmrc +1 -1
  391. package/template/private-npm-package/_package.json +1 -2
  392. package/template/private-npm-package/skuba.template.js +2 -2
  393. package/template/private-npm-package/src/index.test.ts +0 -2
  394. package/lib/cli/lint/internalLints/upgrade/patches/12.5.0/addTypeModuleToPackageJson.d.ts +0 -6
  395. package/lib/cli/lint/internalLints/upgrade/patches/12.5.0/addTypeModuleToPackageJson.js +0 -86
  396. package/lib/cli/lint/internalLints/upgrade/patches/12.5.0/addTypeModuleToPackageJson.js.map +0 -7
  397. package/lib/cli/lint/internalLints/upgrade/patches/12.5.0/index.js +0 -16
  398. package/lib/cli/lint/internalLints/upgrade/patches/12.5.0/index.js.map +0 -7
  399. package/lib/cli/lint/internalLints/upgrade/patches/12.5.0/rewriteGlobalVars.d.ts +0 -7
  400. package/lib/cli/lint/internalLints/upgrade/patches/12.5.0/rewriteGlobalVars.js +0 -76
  401. package/lib/cli/lint/internalLints/upgrade/patches/12.5.0/rewriteGlobalVars.js.map +0 -7
  402. package/lib/cli/lint/internalLints/upgrade/patches/9.1.0/index.d.ts +0 -2
  403. package/lib/cli/lint/internalLints/upgrade/patches/9.1.0/index.js +0 -11
  404. package/lib/cli/lint/internalLints/upgrade/patches/9.1.0/index.js.map +0 -7
  405. package/lib/cli/lint/internalLints/upgrade/patches/9.1.0/upgradeNode.js +0 -34
  406. package/lib/cli/lint/internalLints/upgrade/patches/9.1.0/upgradeNode.js.map +0 -7
  407. package/lib/eslint.d.js +0 -1
  408. package/lib/eslint.d.js.map +0 -7
  409. package/template/base/vitest.config.ts +0 -25
  410. /package/lib/cli/lint/internalLints/upgrade/patches/{12.5.0 → 13.1.1}/index.d.ts +0 -0
  411. /package/lib/cli/lint/internalLints/upgrade/patches/{9.1.0 → 13.1.1}/upgradeNode.d.ts +0 -0
@@ -1,13 +1,34 @@
1
- import { input, select } from "@inquirer/prompts";
2
- import { pathExists } from "../../utils/fs.js";
3
- import { TEMPLATE_NAMES_WITH_BYO } from "../../utils/template.js";
4
- import {
5
- PLATFORM_OPTIONS,
6
- isGitHubOrg,
7
- isGitHubRepo,
8
- isGitHubTeam,
9
- isPlatform
10
- } from "./validation.js";
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+ var prompts_exports = {};
20
+ __export(prompts_exports, {
21
+ BASE_PROMPT_PROPS: () => BASE_PROMPT_PROPS,
22
+ getGitPath: () => getGitPath,
23
+ getPrivateTemplateName: () => getPrivateTemplateName,
24
+ getTemplateName: () => getTemplateName,
25
+ shouldContinue: () => shouldContinue
26
+ });
27
+ module.exports = __toCommonJS(prompts_exports);
28
+ var import_prompts = require("@inquirer/prompts");
29
+ var import_fs = require("../../utils/fs.js");
30
+ var import_template = require("../../utils/template.js");
31
+ var import_validation = require("./validation.js");
11
32
  const BASE_CHOICES = [
12
33
  {
13
34
  name: "ownerName",
@@ -15,13 +36,13 @@ const BASE_CHOICES = [
15
36
  initial: "SEEK-Jobs/my-team",
16
37
  validate: (value) => {
17
38
  if (typeof value !== "string") {
18
- return "required";
39
+ return "Required";
19
40
  }
20
41
  const [org, team] = value.split("/");
21
- if (!org || !isGitHubOrg(org)) {
22
- return "fails GitHub validation";
42
+ if (!org || !(0, import_validation.isGitHubOrg)(org)) {
43
+ return "Must contain a valid GitHub org name";
23
44
  }
24
- return team === void 0 || isGitHubTeam(team) || "fails GitHub validation";
45
+ return team === void 0 || (0, import_validation.isGitHubTeam)(team) || "Must contain a valid GitHub team name";
25
46
  }
26
47
  },
27
48
  {
@@ -30,12 +51,12 @@ const BASE_CHOICES = [
30
51
  initial: "my-repo",
31
52
  validate: async (value) => {
32
53
  if (typeof value !== "string") {
33
- return "required";
54
+ return "Required";
34
55
  }
35
- if (!isGitHubRepo(value)) {
36
- return "fails GitHub validation";
56
+ if (!(0, import_validation.isGitHubRepo)(value)) {
57
+ return "Must be a valid GitHub repo name";
37
58
  }
38
- const exists = await pathExists(value);
59
+ const exists = await (0, import_fs.pathExists)(value);
39
60
  return !exists || `'${value}' is an existing directory`;
40
61
  }
41
62
  },
@@ -44,14 +65,14 @@ const BASE_CHOICES = [
44
65
  message: "Platform",
45
66
  initial: "arm64",
46
67
  allowInitial: true,
47
- validate: (value) => isPlatform(value) || `must be ${PLATFORM_OPTIONS}`
68
+ validate: (value) => (0, import_validation.isPlatform)(value) || `Must be ${import_validation.PLATFORM_OPTIONS}`
48
69
  },
49
70
  {
50
71
  name: "defaultBranch",
51
72
  message: "Default Branch",
52
73
  initial: "main",
53
74
  allowInitial: true,
54
- validate: (value) => typeof value === "string" && value.length > 0 ? true : "required"
75
+ validate: (value) => typeof value === "string" && value.length > 0 ? true : "Required"
55
76
  }
56
77
  ];
57
78
  const BASE_PROMPT_PROPS = {
@@ -59,26 +80,32 @@ const BASE_PROMPT_PROPS = {
59
80
  message: "For starters, some project details:",
60
81
  name: "baseAnswers"
61
82
  };
62
- const shouldContinue = async () => select({
83
+ const shouldContinue = async () => (0, import_prompts.select)({
63
84
  message: "Fill this in now?",
64
85
  choices: [
65
86
  { name: "Yes", value: "yes" },
66
87
  { name: "No", value: "no" }
67
88
  ]
68
89
  });
69
- const getGitPath = async () => input({
90
+ const getGitPath = async () => (0, import_prompts.input)({
70
91
  message: "Git path",
71
92
  default: "seek-oss/skuba",
72
- validate: (value) => /[^/]+\/[^/]+/.test(value) || "Path is not valid"
93
+ validate: (value) => /[^/]+\/[^/]+/.test(value) || "Must be a valid path"
73
94
  });
74
- const getTemplateName = async () => select({
95
+ const getTemplateName = async () => (0, import_prompts.select)({
75
96
  message: "Select a template:",
76
- choices: TEMPLATE_NAMES_WITH_BYO.map((name) => ({ name, value: name }))
97
+ choices: import_template.TEMPLATE_NAMES_WITH_BYO.map((name) => ({ name, value: name }))
77
98
  });
78
- export {
99
+ const getPrivateTemplateName = async () => (0, import_prompts.input)({
100
+ message: "Private SEEK template name",
101
+ validate: (value) => value.length > 0 || "Must be a valid template name"
102
+ });
103
+ // Annotate the CommonJS export names for ESM import in node:
104
+ 0 && (module.exports = {
79
105
  BASE_PROMPT_PROPS,
80
106
  getGitPath,
107
+ getPrivateTemplateName,
81
108
  getTemplateName,
82
109
  shouldContinue
83
- };
110
+ });
84
111
  //# sourceMappingURL=prompts.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/cli/init/prompts.ts"],
4
- "sourcesContent": ["import { input, select } from '@inquirer/prompts';\n\nimport { pathExists } from '../../utils/fs.js';\nimport { TEMPLATE_NAMES_WITH_BYO } from '../../utils/template.js';\n\nimport {\n PLATFORM_OPTIONS,\n type Platform,\n isGitHubOrg,\n isGitHubRepo,\n isGitHubTeam,\n isPlatform,\n} from './validation.js';\n\nexport interface Choice {\n name: string;\n message: string;\n initial?: string;\n validate?: (value: string) => boolean | string | Promise<boolean | string>;\n /**\n * Whether the user is allowed to skip field entry and use the initial value.\n *\n * Defaults to `false`.\n */\n allowInitial?: boolean;\n}\n\nexport type BaseFields = Record<\n (typeof BASE_CHOICES)[number]['name'],\n string\n> & {\n platformName: Platform;\n};\n\nconst BASE_CHOICES = [\n {\n name: 'ownerName',\n message: 'Owner',\n initial: 'SEEK-Jobs/my-team',\n validate: (value: unknown) => {\n if (typeof value !== 'string') {\n return 'required';\n }\n\n const [org, team] = value.split('/');\n\n if (!org || !isGitHubOrg(org)) {\n return 'fails GitHub validation';\n }\n\n return (\n team === undefined || isGitHubTeam(team) || 'fails GitHub validation'\n );\n },\n },\n {\n name: 'repoName',\n message: 'Repo',\n initial: 'my-repo',\n validate: async (value: unknown) => {\n if (typeof value !== 'string') {\n return 'required';\n }\n\n if (!isGitHubRepo(value)) {\n return 'fails GitHub validation';\n }\n\n const exists = await pathExists(value);\n\n return !exists || `'${value}' is an existing directory`;\n },\n },\n {\n name: 'platformName',\n message: 'Platform',\n initial: 'arm64',\n allowInitial: true,\n validate: (value: unknown) =>\n isPlatform(value) || `must be ${PLATFORM_OPTIONS}`,\n },\n {\n name: 'defaultBranch',\n message: 'Default Branch',\n initial: 'main',\n allowInitial: true,\n validate: (value: unknown) =>\n typeof value === 'string' && value.length > 0 ? true : 'required',\n },\n] as const;\n\nexport const BASE_PROMPT_PROPS = {\n choices: BASE_CHOICES,\n message: 'For starters, some project details:',\n name: 'baseAnswers',\n};\n\nexport const shouldContinue = async () =>\n select({\n message: 'Fill this in now?',\n choices: [\n { name: 'Yes', value: 'yes' },\n { name: 'No', value: 'no' },\n ],\n });\n\nexport const getGitPath = async () =>\n input({\n message: 'Git path',\n default: 'seek-oss/skuba',\n validate: (value: string) =>\n /[^/]+\\/[^/]+/.test(value) || 'Path is not valid',\n });\n\nexport const getTemplateName = async () =>\n select({\n message: 'Select a template:',\n choices: TEMPLATE_NAMES_WITH_BYO.map((name) => ({ name, value: name })),\n });\n"],
5
- "mappings": "AAAA,SAAS,OAAO,cAAc;AAE9B,SAAS,kBAAkB;AAC3B,SAAS,+BAA+B;AAExC;AAAA,EACE;AAAA,EAEA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAsBP,MAAM,eAAe;AAAA,EACnB;AAAA,IACE,MAAM;AAAA,IACN,SAAS;AAAA,IACT,SAAS;AAAA,IACT,UAAU,CAAC,UAAmB;AAC5B,UAAI,OAAO,UAAU,UAAU;AAC7B,eAAO;AAAA,MACT;AAEA,YAAM,CAAC,KAAK,IAAI,IAAI,MAAM,MAAM,GAAG;AAEnC,UAAI,CAAC,OAAO,CAAC,YAAY,GAAG,GAAG;AAC7B,eAAO;AAAA,MACT;AAEA,aACE,SAAS,UAAa,aAAa,IAAI,KAAK;AAAA,IAEhD;AAAA,EACF;AAAA,EACA;AAAA,IACE,MAAM;AAAA,IACN,SAAS;AAAA,IACT,SAAS;AAAA,IACT,UAAU,OAAO,UAAmB;AAClC,UAAI,OAAO,UAAU,UAAU;AAC7B,eAAO;AAAA,MACT;AAEA,UAAI,CAAC,aAAa,KAAK,GAAG;AACxB,eAAO;AAAA,MACT;AAEA,YAAM,SAAS,MAAM,WAAW,KAAK;AAErC,aAAO,CAAC,UAAU,IAAI,KAAK;AAAA,IAC7B;AAAA,EACF;AAAA,EACA;AAAA,IACE,MAAM;AAAA,IACN,SAAS;AAAA,IACT,SAAS;AAAA,IACT,cAAc;AAAA,IACd,UAAU,CAAC,UACT,WAAW,KAAK,KAAK,WAAW,gBAAgB;AAAA,EACpD;AAAA,EACA;AAAA,IACE,MAAM;AAAA,IACN,SAAS;AAAA,IACT,SAAS;AAAA,IACT,cAAc;AAAA,IACd,UAAU,CAAC,UACT,OAAO,UAAU,YAAY,MAAM,SAAS,IAAI,OAAO;AAAA,EAC3D;AACF;AAEO,MAAM,oBAAoB;AAAA,EAC/B,SAAS;AAAA,EACT,SAAS;AAAA,EACT,MAAM;AACR;AAEO,MAAM,iBAAiB,YAC5B,OAAO;AAAA,EACL,SAAS;AAAA,EACT,SAAS;AAAA,IACP,EAAE,MAAM,OAAO,OAAO,MAAM;AAAA,IAC5B,EAAE,MAAM,MAAM,OAAO,KAAK;AAAA,EAC5B;AACF,CAAC;AAEI,MAAM,aAAa,YACxB,MAAM;AAAA,EACJ,SAAS;AAAA,EACT,SAAS;AAAA,EACT,UAAU,CAAC,UACT,eAAe,KAAK,KAAK,KAAK;AAClC,CAAC;AAEI,MAAM,kBAAkB,YAC7B,OAAO;AAAA,EACL,SAAS;AAAA,EACT,SAAS,wBAAwB,IAAI,CAAC,UAAU,EAAE,MAAM,OAAO,KAAK,EAAE;AACxE,CAAC;",
4
+ "sourcesContent": ["import { input, select } from '@inquirer/prompts';\n\nimport { pathExists } from '../../utils/fs.js';\nimport { TEMPLATE_NAMES_WITH_BYO } from '../../utils/template.js';\n\nimport {\n PLATFORM_OPTIONS,\n type Platform,\n isGitHubOrg,\n isGitHubRepo,\n isGitHubTeam,\n isPlatform,\n} from './validation.js';\n\nexport interface Choice {\n name: string;\n message: string;\n initial?: string;\n validate?: (value: string) => boolean | string | Promise<boolean | string>;\n /**\n * Whether the user is allowed to skip field entry and use the initial value.\n *\n * Defaults to `false`.\n */\n allowInitial?: boolean;\n}\n\nexport type BaseFields = Record<\n (typeof BASE_CHOICES)[number]['name'],\n string\n> & {\n platformName: Platform;\n};\n\nconst BASE_CHOICES = [\n {\n name: 'ownerName',\n message: 'Owner',\n initial: 'SEEK-Jobs/my-team',\n validate: (value: unknown) => {\n if (typeof value !== 'string') {\n return 'Required';\n }\n\n const [org, team] = value.split('/');\n\n if (!org || !isGitHubOrg(org)) {\n return 'Must contain a valid GitHub org name';\n }\n\n return (\n team === undefined ||\n isGitHubTeam(team) ||\n 'Must contain a valid GitHub team name'\n );\n },\n },\n {\n name: 'repoName',\n message: 'Repo',\n initial: 'my-repo',\n validate: async (value: unknown) => {\n if (typeof value !== 'string') {\n return 'Required';\n }\n\n if (!isGitHubRepo(value)) {\n return 'Must be a valid GitHub repo name';\n }\n\n const exists = await pathExists(value);\n\n return !exists || `'${value}' is an existing directory`;\n },\n },\n {\n name: 'platformName',\n message: 'Platform',\n initial: 'arm64',\n allowInitial: true,\n validate: (value: unknown) =>\n isPlatform(value) || `Must be ${PLATFORM_OPTIONS}`,\n },\n {\n name: 'defaultBranch',\n message: 'Default Branch',\n initial: 'main',\n allowInitial: true,\n validate: (value: unknown) =>\n typeof value === 'string' && value.length > 0 ? true : 'Required',\n },\n] as const;\n\nexport const BASE_PROMPT_PROPS = {\n choices: BASE_CHOICES,\n message: 'For starters, some project details:',\n name: 'baseAnswers',\n};\n\nexport const shouldContinue = async () =>\n select({\n message: 'Fill this in now?',\n choices: [\n { name: 'Yes', value: 'yes' },\n { name: 'No', value: 'no' },\n ],\n });\n\nexport const getGitPath = async () =>\n input({\n message: 'Git path',\n default: 'seek-oss/skuba',\n validate: (value: string) =>\n /[^/]+\\/[^/]+/.test(value) || 'Must be a valid path',\n });\n\nexport const getTemplateName = async () =>\n select({\n message: 'Select a template:',\n choices: TEMPLATE_NAMES_WITH_BYO.map((name) => ({ name, value: name })),\n });\n\nexport const getPrivateTemplateName = async () =>\n input({\n message: 'Private SEEK template name',\n validate: (value: string) =>\n value.length > 0 || 'Must be a valid template name',\n });\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,qBAA8B;AAE9B,gBAA2B;AAC3B,sBAAwC;AAExC,wBAOO;AAsBP,MAAM,eAAe;AAAA,EACnB;AAAA,IACE,MAAM;AAAA,IACN,SAAS;AAAA,IACT,SAAS;AAAA,IACT,UAAU,CAAC,UAAmB;AAC5B,UAAI,OAAO,UAAU,UAAU;AAC7B,eAAO;AAAA,MACT;AAEA,YAAM,CAAC,KAAK,IAAI,IAAI,MAAM,MAAM,GAAG;AAEnC,UAAI,CAAC,OAAO,KAAC,+BAAY,GAAG,GAAG;AAC7B,eAAO;AAAA,MACT;AAEA,aACE,SAAS,cACT,gCAAa,IAAI,KACjB;AAAA,IAEJ;AAAA,EACF;AAAA,EACA;AAAA,IACE,MAAM;AAAA,IACN,SAAS;AAAA,IACT,SAAS;AAAA,IACT,UAAU,OAAO,UAAmB;AAClC,UAAI,OAAO,UAAU,UAAU;AAC7B,eAAO;AAAA,MACT;AAEA,UAAI,KAAC,gCAAa,KAAK,GAAG;AACxB,eAAO;AAAA,MACT;AAEA,YAAM,SAAS,UAAM,sBAAW,KAAK;AAErC,aAAO,CAAC,UAAU,IAAI,KAAK;AAAA,IAC7B;AAAA,EACF;AAAA,EACA;AAAA,IACE,MAAM;AAAA,IACN,SAAS;AAAA,IACT,SAAS;AAAA,IACT,cAAc;AAAA,IACd,UAAU,CAAC,cACT,8BAAW,KAAK,KAAK,WAAW,kCAAgB;AAAA,EACpD;AAAA,EACA;AAAA,IACE,MAAM;AAAA,IACN,SAAS;AAAA,IACT,SAAS;AAAA,IACT,cAAc;AAAA,IACd,UAAU,CAAC,UACT,OAAO,UAAU,YAAY,MAAM,SAAS,IAAI,OAAO;AAAA,EAC3D;AACF;AAEO,MAAM,oBAAoB;AAAA,EAC/B,SAAS;AAAA,EACT,SAAS;AAAA,EACT,MAAM;AACR;AAEO,MAAM,iBAAiB,gBAC5B,uBAAO;AAAA,EACL,SAAS;AAAA,EACT,SAAS;AAAA,IACP,EAAE,MAAM,OAAO,OAAO,MAAM;AAAA,IAC5B,EAAE,MAAM,MAAM,OAAO,KAAK;AAAA,EAC5B;AACF,CAAC;AAEI,MAAM,aAAa,gBACxB,sBAAM;AAAA,EACJ,SAAS;AAAA,EACT,SAAS;AAAA,EACT,UAAU,CAAC,UACT,eAAe,KAAK,KAAK,KAAK;AAClC,CAAC;AAEI,MAAM,kBAAkB,gBAC7B,uBAAO;AAAA,EACL,SAAS;AAAA,EACT,SAAS,wCAAwB,IAAI,CAAC,UAAU,EAAE,MAAM,OAAO,KAAK,EAAE;AACxE,CAAC;AAEI,MAAM,yBAAyB,gBACpC,sBAAM;AAAA,EACJ,SAAS;AAAA,EACT,UAAU,CAAC,UACT,MAAM,SAAS,KAAK;AACxB,CAAC;",
6
6
  "names": []
7
7
  }
@@ -1,6 +1,39 @@
1
- import * as z from "zod/v4";
2
- import { projectTypeSchema } from "../../utils/manifest.js";
3
- import { packageManagerSchema } from "../../utils/packageManager.js";
1
+ "use strict";
2
+ var __create = Object.create;
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __export = (target, all) => {
9
+ for (var name in all)
10
+ __defProp(target, name, { get: all[name], enumerable: true });
11
+ };
12
+ var __copyProps = (to, from, except, desc) => {
13
+ if (from && typeof from === "object" || typeof from === "function") {
14
+ for (let key of __getOwnPropNames(from))
15
+ if (!__hasOwnProp.call(to, key) && key !== except)
16
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
+ }
18
+ return to;
19
+ };
20
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
25
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
+ mod
27
+ ));
28
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
+ var types_exports = {};
30
+ __export(types_exports, {
31
+ initConfigInputSchema: () => initConfigInputSchema
32
+ });
33
+ module.exports = __toCommonJS(types_exports);
34
+ var z = __toESM(require("zod/v4"));
35
+ var import_manifest = require("../../utils/manifest.js");
36
+ var import_packageManager = require("../../utils/packageManager.js");
4
37
  const initConfigInputSchema = z.object({
5
38
  destinationDir: z.string(),
6
39
  templateComplete: z.boolean(),
@@ -27,10 +60,11 @@ const initConfigSchema = initConfigInputSchema.omit({
27
60
  port: z.string()
28
61
  }).catchall(z.string()),
29
62
  entryPoint: z.string().optional(),
30
- packageManager: packageManagerSchema,
31
- type: projectTypeSchema.optional()
63
+ packageManager: import_packageManager.packageManagerSchema,
64
+ type: import_manifest.projectTypeSchema.optional()
32
65
  });
33
- export {
66
+ // Annotate the CommonJS export names for ESM import in node:
67
+ 0 && (module.exports = {
34
68
  initConfigInputSchema
35
- };
69
+ });
36
70
  //# sourceMappingURL=types.js.map
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../../src/cli/init/types.ts"],
4
4
  "sourcesContent": ["import * as z from 'zod/v4';\n\nimport { projectTypeSchema } from '../../utils/manifest.js';\nimport { packageManagerSchema } from '../../utils/packageManager.js';\n\nexport interface Input {\n /**\n * Whether to enable verbose debug logging.\n *\n * Defaults to `false`.\n */\n debug: boolean;\n}\n\nexport type InitConfigInput = z.infer<typeof initConfigInputSchema>;\n\nexport const initConfigInputSchema = z.object({\n destinationDir: z.string(),\n templateComplete: z.boolean(),\n templateData: z\n .object({\n ownerName: z.string(),\n repoName: z.string(),\n platformName: z.union([z.literal('amd64'), z.literal('arm64')]),\n defaultBranch: z.string(),\n })\n .catchall(z.string()),\n templateName: z.string(),\n});\n\nexport type InitConfig = z.infer<typeof initConfigSchema>;\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nconst initConfigSchema = initConfigInputSchema\n .omit({\n templateData: true,\n })\n .extend({\n templateData: z\n .object({\n ownerName: z.string(),\n repoName: z.string(),\n defaultBranch: z.string(),\n\n // Derived from ownerName\n // TODO: use zod to transform `InitConfigInput` -> `InitConfig`?\n orgName: z.string(),\n teamName: z.string(),\n\n // Generated by init command\n port: z.string(),\n })\n .catchall(z.string()),\n\n entryPoint: z.string().optional(),\n packageManager: packageManagerSchema,\n type: projectTypeSchema.optional(),\n });\n"],
5
- "mappings": "AAAA,YAAY,OAAO;AAEnB,SAAS,yBAAyB;AAClC,SAAS,4BAA4B;AAa9B,MAAM,wBAAwB,EAAE,OAAO;AAAA,EAC5C,gBAAgB,EAAE,OAAO;AAAA,EACzB,kBAAkB,EAAE,QAAQ;AAAA,EAC5B,cAAc,EACX,OAAO;AAAA,IACN,WAAW,EAAE,OAAO;AAAA,IACpB,UAAU,EAAE,OAAO;AAAA,IACnB,cAAc,EAAE,MAAM,CAAC,EAAE,QAAQ,OAAO,GAAG,EAAE,QAAQ,OAAO,CAAC,CAAC;AAAA,IAC9D,eAAe,EAAE,OAAO;AAAA,EAC1B,CAAC,EACA,SAAS,EAAE,OAAO,CAAC;AAAA,EACtB,cAAc,EAAE,OAAO;AACzB,CAAC;AAKD,MAAM,mBAAmB,sBACtB,KAAK;AAAA,EACJ,cAAc;AAChB,CAAC,EACA,OAAO;AAAA,EACN,cAAc,EACX,OAAO;AAAA,IACN,WAAW,EAAE,OAAO;AAAA,IACpB,UAAU,EAAE,OAAO;AAAA,IACnB,eAAe,EAAE,OAAO;AAAA;AAAA;AAAA,IAIxB,SAAS,EAAE,OAAO;AAAA,IAClB,UAAU,EAAE,OAAO;AAAA;AAAA,IAGnB,MAAM,EAAE,OAAO;AAAA,EACjB,CAAC,EACA,SAAS,EAAE,OAAO,CAAC;AAAA,EAEtB,YAAY,EAAE,OAAO,EAAE,SAAS;AAAA,EAChC,gBAAgB;AAAA,EAChB,MAAM,kBAAkB,SAAS;AACnC,CAAC;",
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,QAAmB;AAEnB,sBAAkC;AAClC,4BAAqC;AAa9B,MAAM,wBAAwB,EAAE,OAAO;AAAA,EAC5C,gBAAgB,EAAE,OAAO;AAAA,EACzB,kBAAkB,EAAE,QAAQ;AAAA,EAC5B,cAAc,EACX,OAAO;AAAA,IACN,WAAW,EAAE,OAAO;AAAA,IACpB,UAAU,EAAE,OAAO;AAAA,IACnB,cAAc,EAAE,MAAM,CAAC,EAAE,QAAQ,OAAO,GAAG,EAAE,QAAQ,OAAO,CAAC,CAAC;AAAA,IAC9D,eAAe,EAAE,OAAO;AAAA,EAC1B,CAAC,EACA,SAAS,EAAE,OAAO,CAAC;AAAA,EACtB,cAAc,EAAE,OAAO;AACzB,CAAC;AAKD,MAAM,mBAAmB,sBACtB,KAAK;AAAA,EACJ,cAAc;AAChB,CAAC,EACA,OAAO;AAAA,EACN,cAAc,EACX,OAAO;AAAA,IACN,WAAW,EAAE,OAAO;AAAA,IACpB,UAAU,EAAE,OAAO;AAAA,IACnB,eAAe,EAAE,OAAO;AAAA;AAAA;AAAA,IAIxB,SAAS,EAAE,OAAO;AAAA,IAClB,UAAU,EAAE,OAAO;AAAA;AAAA,IAGnB,MAAM,EAAE,OAAO;AAAA,EACjB,CAAC,EACA,SAAS,EAAE,OAAO,CAAC;AAAA,EAEtB,YAAY,EAAE,OAAO,EAAE,SAAS;AAAA,EAChC,gBAAgB;AAAA,EAChB,MAAM,kCAAkB,SAAS;AACnC,CAAC;",
6
6
  "names": []
7
7
  }
@@ -1,3 +1,30 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+ var validation_exports = {};
20
+ __export(validation_exports, {
21
+ PLATFORM_OPTIONS: () => PLATFORM_OPTIONS,
22
+ isGitHubOrg: () => isGitHubOrg,
23
+ isGitHubRepo: () => isGitHubRepo,
24
+ isGitHubTeam: () => isGitHubTeam,
25
+ isPlatform: () => isPlatform
26
+ });
27
+ module.exports = __toCommonJS(validation_exports);
1
28
  const isGitHubOrg = (value) => /^[A-Za-z0-9](?:[A-Za-z0-9-]*[A-Za-z0-9])?$/.test(value) && !value.includes("--");
2
29
  const isGitHubRepo = (value) => /^[A-Za-z0-9_.-]+$/.test(value) && value !== "." && value !== "..";
3
30
  const isGitHubTeam = (value) => /^[A-Za-z0-9_](?:[A-Za-z0-9_-]*[A-Za-z0-9_])?$/.test(value) && !value.endsWith("-") && !value.includes("--");
@@ -5,11 +32,12 @@ const PLATFORMS = ["amd64", "arm64"];
5
32
  const PLATFORM_OPTIONS = PLATFORMS.join(" | ");
6
33
  const platformSet = new Set(PLATFORMS);
7
34
  const isPlatform = (value) => platformSet.has(value);
8
- export {
35
+ // Annotate the CommonJS export names for ESM import in node:
36
+ 0 && (module.exports = {
9
37
  PLATFORM_OPTIONS,
10
38
  isGitHubOrg,
11
39
  isGitHubRepo,
12
40
  isGitHubTeam,
13
41
  isPlatform
14
- };
42
+ });
15
43
  //# sourceMappingURL=validation.js.map
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../../src/cli/init/validation.ts"],
4
4
  "sourcesContent": ["export const isGitHubOrg = (value: string) =>\n /^[A-Za-z0-9](?:[A-Za-z0-9-]*[A-Za-z0-9])?$/.test(value) &&\n !value.includes('--');\n\nexport const isGitHubRepo = (value: string) =>\n /^[A-Za-z0-9_.-]+$/.test(value) && value !== '.' && value !== '..';\n\nexport const isGitHubTeam = (value: string) =>\n /^[A-Za-z0-9_](?:[A-Za-z0-9_-]*[A-Za-z0-9_])?$/.test(value) &&\n !value.endsWith('-') &&\n !value.includes('--');\n\nconst PLATFORMS = ['amd64', 'arm64'] as const;\n\nexport type Platform = (typeof PLATFORMS)[number];\n\nexport const PLATFORM_OPTIONS = PLATFORMS.join(' | ');\n\nconst platformSet = new Set<unknown>(PLATFORMS);\n\nexport const isPlatform = (value: unknown) => platformSet.has(value);\n"],
5
- "mappings": "AAAO,MAAM,cAAc,CAAC,UAC1B,6CAA6C,KAAK,KAAK,KACvD,CAAC,MAAM,SAAS,IAAI;AAEf,MAAM,eAAe,CAAC,UAC3B,oBAAoB,KAAK,KAAK,KAAK,UAAU,OAAO,UAAU;AAEzD,MAAM,eAAe,CAAC,UAC3B,gDAAgD,KAAK,KAAK,KAC1D,CAAC,MAAM,SAAS,GAAG,KACnB,CAAC,MAAM,SAAS,IAAI;AAEtB,MAAM,YAAY,CAAC,SAAS,OAAO;AAI5B,MAAM,mBAAmB,UAAU,KAAK,KAAK;AAEpD,MAAM,cAAc,IAAI,IAAa,SAAS;AAEvC,MAAM,aAAa,CAAC,UAAmB,YAAY,IAAI,KAAK;",
5
+ "mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAO,MAAM,cAAc,CAAC,UAC1B,6CAA6C,KAAK,KAAK,KACvD,CAAC,MAAM,SAAS,IAAI;AAEf,MAAM,eAAe,CAAC,UAC3B,oBAAoB,KAAK,KAAK,KAAK,UAAU,OAAO,UAAU;AAEzD,MAAM,eAAe,CAAC,UAC3B,gDAAgD,KAAK,KAAK,KAC1D,CAAC,MAAM,SAAS,GAAG,KACnB,CAAC,MAAM,SAAS,IAAI;AAEtB,MAAM,YAAY,CAAC,SAAS,OAAO;AAI5B,MAAM,mBAAmB,UAAU,KAAK,KAAK;AAEpD,MAAM,cAAc,IAAI,IAAa,SAAS;AAEvC,MAAM,aAAa,CAAC,UAAmB,YAAY,IAAI,KAAK;",
6
6
  "names": []
7
7
  }
@@ -1,6 +1,39 @@
1
- import fs from "fs-extra";
2
- import { getDestinationManifest } from "../configure/analysis/package.js";
3
- import { formatPackage } from "../configure/processing/package.js";
1
+ "use strict";
2
+ var __create = Object.create;
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __export = (target, all) => {
9
+ for (var name in all)
10
+ __defProp(target, name, { get: all[name], enumerable: true });
11
+ };
12
+ var __copyProps = (to, from, except, desc) => {
13
+ if (from && typeof from === "object" || typeof from === "function") {
14
+ for (let key of __getOwnPropNames(from))
15
+ if (!__hasOwnProp.call(to, key) && key !== except)
16
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
+ }
18
+ return to;
19
+ };
20
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
25
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
+ mod
27
+ ));
28
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
+ var writePackageJson_exports = {};
30
+ __export(writePackageJson_exports, {
31
+ writePackageJson: () => writePackageJson
32
+ });
33
+ module.exports = __toCommonJS(writePackageJson_exports);
34
+ var import_fs_extra = __toESM(require("fs-extra"));
35
+ var import_package = require("../configure/analysis/package.js");
36
+ var import_package2 = require("../configure/processing/package.js");
4
37
  const writePackageJson = async ({
5
38
  cwd,
6
39
  entryPoint,
@@ -8,17 +41,18 @@ const writePackageJson = async ({
8
41
  type,
9
42
  version
10
43
  }) => {
11
- const manifest = await getDestinationManifest({ cwd });
44
+ const manifest = await (0, import_package.getDestinationManifest)({ cwd });
12
45
  manifest.packageJson.skuba = {
13
46
  entryPoint: entryPoint ?? null,
14
47
  template,
15
48
  type,
16
49
  version
17
50
  };
18
- const updatedPackageJson = await formatPackage(manifest.packageJson);
19
- await fs.promises.writeFile(manifest.path, updatedPackageJson);
51
+ const updatedPackageJson = await (0, import_package2.formatPackage)(manifest.packageJson);
52
+ await import_fs_extra.default.promises.writeFile(manifest.path, updatedPackageJson);
20
53
  };
21
- export {
54
+ // Annotate the CommonJS export names for ESM import in node:
55
+ 0 && (module.exports = {
22
56
  writePackageJson
23
- };
57
+ });
24
58
  //# sourceMappingURL=writePackageJson.js.map
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../../src/cli/init/writePackageJson.ts"],
4
4
  "sourcesContent": ["import fs from 'fs-extra';\n\nimport type { ProjectType } from '../../utils/manifest.js';\nimport { getDestinationManifest } from '../configure/analysis/package.js';\nimport { formatPackage } from '../configure/processing/package.js';\n\ninterface WritePackageJsonProps {\n cwd: string;\n entryPoint?: string;\n template: string;\n type?: ProjectType;\n version: string;\n}\n\nexport interface SkubaPackageJson {\n entryPoint: string | null;\n template: string;\n type?: string;\n version: string;\n}\n\n/**\n * Write a `skuba` section into the destination `package.json`.\n */\nexport const writePackageJson = async ({\n cwd,\n entryPoint,\n template,\n type,\n version,\n}: WritePackageJsonProps) => {\n const manifest = await getDestinationManifest({ cwd });\n\n manifest.packageJson.skuba = {\n entryPoint: entryPoint ?? null,\n template,\n type,\n version,\n } satisfies SkubaPackageJson;\n\n const updatedPackageJson = await formatPackage(manifest.packageJson);\n\n await fs.promises.writeFile(manifest.path, updatedPackageJson);\n};\n"],
5
- "mappings": "AAAA,OAAO,QAAQ;AAGf,SAAS,8BAA8B;AACvC,SAAS,qBAAqB;AAoBvB,MAAM,mBAAmB,OAAO;AAAA,EACrC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,MAA6B;AAC3B,QAAM,WAAW,MAAM,uBAAuB,EAAE,IAAI,CAAC;AAErD,WAAS,YAAY,QAAQ;AAAA,IAC3B,YAAY,cAAc;AAAA,IAC1B;AAAA,IACA;AAAA,IACA;AAAA,EACF;AAEA,QAAM,qBAAqB,MAAM,cAAc,SAAS,WAAW;AAEnE,QAAM,GAAG,SAAS,UAAU,SAAS,MAAM,kBAAkB;AAC/D;",
6
- "names": []
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,sBAAe;AAGf,qBAAuC;AACvC,IAAAA,kBAA8B;AAoBvB,MAAM,mBAAmB,OAAO;AAAA,EACrC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,MAA6B;AAC3B,QAAM,WAAW,UAAM,uCAAuB,EAAE,IAAI,CAAC;AAErD,WAAS,YAAY,QAAQ;AAAA,IAC3B,YAAY,cAAc;AAAA,IAC1B;AAAA,IACA;AAAA,IACA;AAAA,EACF;AAEA,QAAM,qBAAqB,UAAM,+BAAc,SAAS,WAAW;AAEnE,QAAM,gBAAAC,QAAG,SAAS,UAAU,SAAS,MAAM,kBAAkB;AAC/D;",
6
+ "names": ["import_package", "fs"]
7
7
  }
@@ -1,6 +1,40 @@
1
- import * as Buildkite from "@skuba-lib/api/buildkite";
1
+ "use strict";
2
+ var __create = Object.create;
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __export = (target, all) => {
9
+ for (var name in all)
10
+ __defProp(target, name, { get: all[name], enumerable: true });
11
+ };
12
+ var __copyProps = (to, from, except, desc) => {
13
+ if (from && typeof from === "object" || typeof from === "function") {
14
+ for (let key of __getOwnPropNames(from))
15
+ if (!__hasOwnProp.call(to, key) && key !== except)
16
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
+ }
18
+ return to;
19
+ };
20
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
25
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
+ mod
27
+ ));
28
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
+ var eslint_exports = {};
30
+ __export(eslint_exports, {
31
+ createEslintAnnotations: () => createEslintAnnotations
32
+ });
33
+ module.exports = __toCommonJS(eslint_exports);
34
+ var Buildkite = __toESM(require("@skuba-lib/api/buildkite"));
2
35
  const createEslintAnnotations = (eslint) => !eslint.ok ? ["**ESLint**", Buildkite.md.terminal(eslint.output.trim())] : [];
3
- export {
36
+ // Annotate the CommonJS export names for ESM import in node:
37
+ 0 && (module.exports = {
4
38
  createEslintAnnotations
5
- };
39
+ });
6
40
  //# sourceMappingURL=eslint.js.map
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../../../../src/cli/lint/annotate/buildkite/eslint.ts"],
4
4
  "sourcesContent": ["import type { ESLintOutput } from '../../../adapter/eslint.js';\n\nimport * as Buildkite from '@skuba-lib/api/buildkite';\n\nexport const createEslintAnnotations = (eslint: ESLintOutput): string[] =>\n !eslint.ok ? ['**ESLint**', Buildkite.md.terminal(eslint.output.trim())] : [];\n"],
5
- "mappings": "AAEA,YAAY,eAAe;AAEpB,MAAM,0BAA0B,CAAC,WACtC,CAAC,OAAO,KAAK,CAAC,cAAc,UAAU,GAAG,SAAS,OAAO,OAAO,KAAK,CAAC,CAAC,IAAI,CAAC;",
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAEA,gBAA2B;AAEpB,MAAM,0BAA0B,CAAC,WACtC,CAAC,OAAO,KAAK,CAAC,cAAc,UAAU,GAAG,SAAS,OAAO,OAAO,KAAK,CAAC,CAAC,IAAI,CAAC;",
6
6
  "names": []
7
7
  }
@@ -1,18 +1,51 @@
1
- import { createEslintAnnotations } from "./eslint.js";
2
- import { createInternalAnnotations } from "./internal.js";
3
- import { createPrettierAnnotations } from "./prettier.js";
4
- import { createTscAnnotations } from "./tsc.js";
5
- import * as Buildkite from "@skuba-lib/api/buildkite";
1
+ "use strict";
2
+ var __create = Object.create;
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __export = (target, all) => {
9
+ for (var name in all)
10
+ __defProp(target, name, { get: all[name], enumerable: true });
11
+ };
12
+ var __copyProps = (to, from, except, desc) => {
13
+ if (from && typeof from === "object" || typeof from === "function") {
14
+ for (let key of __getOwnPropNames(from))
15
+ if (!__hasOwnProp.call(to, key) && key !== except)
16
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
+ }
18
+ return to;
19
+ };
20
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
25
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
+ mod
27
+ ));
28
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
+ var buildkite_exports = {};
30
+ __export(buildkite_exports, {
31
+ createBuildkiteAnnotations: () => createBuildkiteAnnotations
32
+ });
33
+ module.exports = __toCommonJS(buildkite_exports);
34
+ var import_eslint = require("./eslint.js");
35
+ var import_internal = require("./internal.js");
36
+ var import_prettier = require("./prettier.js");
37
+ var import_tsc = require("./tsc.js");
38
+ var Buildkite = __toESM(require("@skuba-lib/api/buildkite"));
6
39
  const createBuildkiteAnnotations = async (internal, eslint, prettier, tscOk, tscOutputStream) => {
7
40
  if (internal.ok && eslint.ok && prettier.ok && tscOk) {
8
41
  return;
9
42
  }
10
43
  const buildkiteOutput = [
11
44
  "`skuba lint` found issues that require triage:",
12
- ...createInternalAnnotations(internal),
13
- ...createEslintAnnotations(eslint),
14
- ...createPrettierAnnotations(prettier),
15
- ...createTscAnnotations(tscOk, tscOutputStream)
45
+ ...(0, import_internal.createInternalAnnotations)(internal),
46
+ ...(0, import_eslint.createEslintAnnotations)(eslint),
47
+ ...(0, import_prettier.createPrettierAnnotations)(prettier),
48
+ ...(0, import_tsc.createTscAnnotations)(tscOk, tscOutputStream)
16
49
  ].join("\n\n");
17
50
  await Buildkite.annotate(buildkiteOutput, {
18
51
  context: "skuba-lint",
@@ -20,7 +53,8 @@ const createBuildkiteAnnotations = async (internal, eslint, prettier, tscOk, tsc
20
53
  style: "error"
21
54
  });
22
55
  };
23
- export {
56
+ // Annotate the CommonJS export names for ESM import in node:
57
+ 0 && (module.exports = {
24
58
  createBuildkiteAnnotations
25
- };
59
+ });
26
60
  //# sourceMappingURL=index.js.map
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../../../../src/cli/lint/annotate/buildkite/index.ts"],
4
4
  "sourcesContent": ["import type { ESLintOutput } from '../../../adapter/eslint.js';\nimport type { PrettierOutput } from '../../../adapter/prettier.js';\nimport type { StreamInterceptor } from '../../../lint/external.js';\nimport type { InternalLintResult } from '../../internal.js';\n\nimport { createEslintAnnotations } from './eslint.js';\nimport { createInternalAnnotations } from './internal.js';\nimport { createPrettierAnnotations } from './prettier.js';\nimport { createTscAnnotations } from './tsc.js';\n\nimport * as Buildkite from '@skuba-lib/api/buildkite';\nexport const createBuildkiteAnnotations = async (\n internal: InternalLintResult,\n eslint: ESLintOutput,\n prettier: PrettierOutput,\n tscOk: boolean,\n tscOutputStream: StreamInterceptor,\n): Promise<void> => {\n if (internal.ok && eslint.ok && prettier.ok && tscOk) {\n return;\n }\n\n const buildkiteOutput = [\n '`skuba lint` found issues that require triage:',\n ...createInternalAnnotations(internal),\n ...createEslintAnnotations(eslint),\n ...createPrettierAnnotations(prettier),\n ...createTscAnnotations(tscOk, tscOutputStream),\n ].join('\\n\\n');\n\n await Buildkite.annotate(buildkiteOutput, {\n context: 'skuba-lint',\n scopeContextToStep: true,\n style: 'error',\n });\n};\n"],
5
- "mappings": "AAKA,SAAS,+BAA+B;AACxC,SAAS,iCAAiC;AAC1C,SAAS,iCAAiC;AAC1C,SAAS,4BAA4B;AAErC,YAAY,eAAe;AACpB,MAAM,6BAA6B,OACxC,UACA,QACA,UACA,OACA,oBACkB;AAClB,MAAI,SAAS,MAAM,OAAO,MAAM,SAAS,MAAM,OAAO;AACpD;AAAA,EACF;AAEA,QAAM,kBAAkB;AAAA,IACtB;AAAA,IACA,GAAG,0BAA0B,QAAQ;AAAA,IACrC,GAAG,wBAAwB,MAAM;AAAA,IACjC,GAAG,0BAA0B,QAAQ;AAAA,IACrC,GAAG,qBAAqB,OAAO,eAAe;AAAA,EAChD,EAAE,KAAK,MAAM;AAEb,QAAM,UAAU,SAAS,iBAAiB;AAAA,IACxC,SAAS;AAAA,IACT,oBAAoB;AAAA,IACpB,OAAO;AAAA,EACT,CAAC;AACH;",
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAKA,oBAAwC;AACxC,sBAA0C;AAC1C,sBAA0C;AAC1C,iBAAqC;AAErC,gBAA2B;AACpB,MAAM,6BAA6B,OACxC,UACA,QACA,UACA,OACA,oBACkB;AAClB,MAAI,SAAS,MAAM,OAAO,MAAM,SAAS,MAAM,OAAO;AACpD;AAAA,EACF;AAEA,QAAM,kBAAkB;AAAA,IACtB;AAAA,IACA,OAAG,2CAA0B,QAAQ;AAAA,IACrC,OAAG,uCAAwB,MAAM;AAAA,IACjC,OAAG,2CAA0B,QAAQ;AAAA,IACrC,OAAG,iCAAqB,OAAO,eAAe;AAAA,EAChD,EAAE,KAAK,MAAM;AAEb,QAAM,UAAU,SAAS,iBAAiB;AAAA,IACxC,SAAS;AAAA,IACT,oBAAoB;AAAA,IACpB,OAAO;AAAA,EACT,CAAC;AACH;",
6
6
  "names": []
7
7
  }
@@ -1,11 +1,45 @@
1
- import * as Buildkite from "@skuba-lib/api/buildkite";
1
+ "use strict";
2
+ var __create = Object.create;
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __export = (target, all) => {
9
+ for (var name in all)
10
+ __defProp(target, name, { get: all[name], enumerable: true });
11
+ };
12
+ var __copyProps = (to, from, except, desc) => {
13
+ if (from && typeof from === "object" || typeof from === "function") {
14
+ for (let key of __getOwnPropNames(from))
15
+ if (!__hasOwnProp.call(to, key) && key !== except)
16
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
+ }
18
+ return to;
19
+ };
20
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
25
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
+ mod
27
+ ));
28
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
+ var internal_exports = {};
30
+ __export(internal_exports, {
31
+ createInternalAnnotations: () => createInternalAnnotations
32
+ });
33
+ module.exports = __toCommonJS(internal_exports);
34
+ var Buildkite = __toESM(require("@skuba-lib/api/buildkite"));
2
35
  const createInternalAnnotations = (internal) => !internal.ok && internal.annotations?.length ? [
3
36
  "**skuba**",
4
37
  Buildkite.md.terminal(
5
38
  internal.annotations.map(({ message, path }) => `${path} ${message}`).join("\n")
6
39
  )
7
40
  ] : [];
8
- export {
41
+ // Annotate the CommonJS export names for ESM import in node:
42
+ 0 && (module.exports = {
9
43
  createInternalAnnotations
10
- };
44
+ });
11
45
  //# sourceMappingURL=internal.js.map
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../../../../src/cli/lint/annotate/buildkite/internal.ts"],
4
4
  "sourcesContent": ["import type { InternalLintResult } from '../../internal.js';\n\nimport * as Buildkite from '@skuba-lib/api/buildkite';\nexport const createInternalAnnotations = (\n internal: InternalLintResult,\n): string[] =>\n !internal.ok && internal.annotations?.length\n ? [\n '**skuba**',\n Buildkite.md.terminal(\n internal.annotations\n .map(({ message, path }) => `${path} ${message}`)\n .join('\\n'),\n ),\n ]\n : [];\n"],
5
- "mappings": "AAEA,YAAY,eAAe;AACpB,MAAM,4BAA4B,CACvC,aAEA,CAAC,SAAS,MAAM,SAAS,aAAa,SAClC;AAAA,EACE;AAAA,EACA,UAAU,GAAG;AAAA,IACX,SAAS,YACN,IAAI,CAAC,EAAE,SAAS,KAAK,MAAM,GAAG,IAAI,IAAI,OAAO,EAAE,EAC/C,KAAK,IAAI;AAAA,EACd;AACF,IACA,CAAC;",
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAEA,gBAA2B;AACpB,MAAM,4BAA4B,CACvC,aAEA,CAAC,SAAS,MAAM,SAAS,aAAa,SAClC;AAAA,EACE;AAAA,EACA,UAAU,GAAG;AAAA,IACX,SAAS,YACN,IAAI,CAAC,EAAE,SAAS,KAAK,MAAM,GAAG,IAAI,IAAI,OAAO,EAAE,EAC/C,KAAK,IAAI;AAAA,EACd;AACF,IACA,CAAC;",
6
6
  "names": []
7
7
  }
@@ -1,4 +1,37 @@
1
- import * as Buildkite from "@skuba-lib/api/buildkite";
1
+ "use strict";
2
+ var __create = Object.create;
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __export = (target, all) => {
9
+ for (var name in all)
10
+ __defProp(target, name, { get: all[name], enumerable: true });
11
+ };
12
+ var __copyProps = (to, from, except, desc) => {
13
+ if (from && typeof from === "object" || typeof from === "function") {
14
+ for (let key of __getOwnPropNames(from))
15
+ if (!__hasOwnProp.call(to, key) && key !== except)
16
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
+ }
18
+ return to;
19
+ };
20
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
25
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
+ mod
27
+ ));
28
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
+ var prettier_exports = {};
30
+ __export(prettier_exports, {
31
+ createPrettierAnnotations: () => createPrettierAnnotations
32
+ });
33
+ module.exports = __toCommonJS(prettier_exports);
34
+ var Buildkite = __toESM(require("@skuba-lib/api/buildkite"));
2
35
  const createPrettierAnnotations = (prettier) => !prettier.ok ? [
3
36
  "**Prettier**",
4
37
  Buildkite.md.terminal(
@@ -10,7 +43,8 @@ const createPrettierAnnotations = (prettier) => !prettier.ok ? [
10
43
  ).join("\n")
11
44
  )
12
45
  ] : [];
13
- export {
46
+ // Annotate the CommonJS export names for ESM import in node:
47
+ 0 && (module.exports = {
14
48
  createPrettierAnnotations
15
- };
49
+ });
16
50
  //# sourceMappingURL=prettier.js.map