skuba 14.0.0-replace-global-vars-20251117052457 → 14.0.0-rfc-upgrade-on-test-20251217012156

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 (406) 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 +100 -74
  118. package/lib/cli/init/getConfig.js.map +3 -3
  119. package/lib/cli/init/git.js +51 -16
  120. package/lib/cli/init/git.js.map +2 -2
  121. package/lib/cli/init/index.js +98 -67
  122. package/lib/cli/init/index.js.map +2 -2
  123. package/lib/cli/init/prompts.d.ts +4 -4
  124. package/lib/cli/init/prompts.js +48 -27
  125. package/lib/cli/init/prompts.js.map +2 -2
  126. package/lib/cli/init/types.js +41 -7
  127. package/lib/cli/init/types.js.map +1 -1
  128. package/lib/cli/init/validation.js +30 -2
  129. package/lib/cli/init/validation.js.map +1 -1
  130. package/lib/cli/init/writePackageJson.js +42 -8
  131. package/lib/cli/init/writePackageJson.js.map +2 -2
  132. package/lib/cli/lint/annotate/buildkite/eslint.js +37 -3
  133. package/lib/cli/lint/annotate/buildkite/eslint.js.map +1 -1
  134. package/lib/cli/lint/annotate/buildkite/index.js +45 -11
  135. package/lib/cli/lint/annotate/buildkite/index.js.map +1 -1
  136. package/lib/cli/lint/annotate/buildkite/internal.js +37 -3
  137. package/lib/cli/lint/annotate/buildkite/internal.js.map +1 -1
  138. package/lib/cli/lint/annotate/buildkite/prettier.js +37 -3
  139. package/lib/cli/lint/annotate/buildkite/prettier.js.map +1 -1
  140. package/lib/cli/lint/annotate/buildkite/tsc.js +37 -3
  141. package/lib/cli/lint/annotate/buildkite/tsc.js.map +1 -1
  142. package/lib/cli/lint/annotate/github/eslint.js +26 -2
  143. package/lib/cli/lint/annotate/github/eslint.js.map +1 -1
  144. package/lib/cli/lint/annotate/github/index.js +45 -11
  145. package/lib/cli/lint/annotate/github/index.js.map +1 -1
  146. package/lib/cli/lint/annotate/github/internal.js +26 -2
  147. package/lib/cli/lint/annotate/github/internal.js.map +1 -1
  148. package/lib/cli/lint/annotate/github/prettier.js +26 -2
  149. package/lib/cli/lint/annotate/github/prettier.js.map +1 -1
  150. package/lib/cli/lint/annotate/github/tsc.js +28 -4
  151. package/lib/cli/lint/annotate/github/tsc.js.map +2 -2
  152. package/lib/cli/lint/annotate/index.js +30 -6
  153. package/lib/cli/lint/annotate/index.js.map +1 -1
  154. package/lib/cli/lint/autofix.js +73 -37
  155. package/lib/cli/lint/autofix.js.map +1 -1
  156. package/lib/cli/lint/eslint.js +51 -16
  157. package/lib/cli/lint/eslint.js.map +3 -3
  158. package/lib/cli/lint/external.js +51 -19
  159. package/lib/cli/lint/external.js.map +2 -2
  160. package/lib/cli/lint/index.js +49 -25
  161. package/lib/cli/lint/index.js.map +1 -1
  162. package/lib/cli/lint/internal.js +42 -18
  163. package/lib/cli/lint/internal.js.map +1 -1
  164. package/lib/cli/lint/internalLints/detectBadCodeowners.js +33 -8
  165. package/lib/cli/lint/internalLints/detectBadCodeowners.js.map +1 -1
  166. package/lib/cli/lint/internalLints/noSkubaTemplateJs.js +45 -11
  167. package/lib/cli/lint/internalLints/noSkubaTemplateJs.js.map +2 -2
  168. package/lib/cli/lint/internalLints/patchRenovateConfig.js +55 -21
  169. package/lib/cli/lint/internalLints/patchRenovateConfig.js.map +2 -2
  170. package/lib/cli/lint/internalLints/refreshConfigFiles.js +63 -32
  171. package/lib/cli/lint/internalLints/refreshConfigFiles.js.map +2 -2
  172. package/lib/cli/lint/internalLints/upgrade/index.d.ts +6 -2
  173. package/lib/cli/lint/internalLints/upgrade/index.js +55 -23
  174. package/lib/cli/lint/internalLints/upgrade/index.js.map +3 -3
  175. package/lib/cli/lint/internalLints/upgrade/patches/10.0.4/index.js +28 -4
  176. package/lib/cli/lint/internalLints/upgrade/patches/10.0.4/index.js.map +1 -1
  177. package/lib/cli/lint/internalLints/upgrade/patches/10.0.4/removeYarnIgnoreOptionalFlags.js +45 -11
  178. package/lib/cli/lint/internalLints/upgrade/patches/10.0.4/removeYarnIgnoreOptionalFlags.js.map +2 -2
  179. package/lib/cli/lint/internalLints/upgrade/patches/10.1.0/index.js +30 -6
  180. package/lib/cli/lint/internalLints/upgrade/patches/10.1.0/index.js.map +1 -1
  181. package/lib/cli/lint/internalLints/upgrade/patches/10.1.0/migrateNpmrcToPnpmWorkspace.js +65 -34
  182. package/lib/cli/lint/internalLints/upgrade/patches/10.1.0/migrateNpmrcToPnpmWorkspace.js.map +2 -2
  183. package/lib/cli/lint/internalLints/upgrade/patches/10.1.0/stopBundlingInCDKTests.js +46 -11
  184. package/lib/cli/lint/internalLints/upgrade/patches/10.1.0/stopBundlingInCDKTests.js.map +2 -2
  185. package/lib/cli/lint/internalLints/upgrade/patches/12.0.2/index.js +28 -4
  186. package/lib/cli/lint/internalLints/upgrade/patches/12.0.2/index.js.map +1 -1
  187. package/lib/cli/lint/internalLints/upgrade/patches/12.0.2/unhandledRejections.js +59 -23
  188. package/lib/cli/lint/internalLints/upgrade/patches/12.0.2/unhandledRejections.js.map +2 -2
  189. package/lib/cli/lint/internalLints/upgrade/patches/12.1.1/index.js +28 -4
  190. package/lib/cli/lint/internalLints/upgrade/patches/12.1.1/index.js.map +1 -1
  191. package/lib/cli/lint/internalLints/upgrade/patches/12.1.1/patchJestSnapshots.js +46 -11
  192. package/lib/cli/lint/internalLints/upgrade/patches/12.1.1/patchJestSnapshots.js.map +2 -2
  193. package/lib/cli/lint/internalLints/upgrade/patches/12.3.0/index.js +30 -6
  194. package/lib/cli/lint/internalLints/upgrade/patches/12.3.0/index.js.map +1 -1
  195. package/lib/cli/lint/internalLints/upgrade/patches/12.3.0/patchApiTokenFromEnvironment.js +46 -11
  196. package/lib/cli/lint/internalLints/upgrade/patches/12.3.0/patchApiTokenFromEnvironment.js.map +2 -2
  197. package/lib/cli/lint/internalLints/upgrade/patches/12.3.0/patchDockerfileSyntaxDirective.js +46 -11
  198. package/lib/cli/lint/internalLints/upgrade/patches/12.3.0/patchDockerfileSyntaxDirective.js.map +2 -2
  199. package/lib/cli/lint/internalLints/upgrade/patches/12.4.0/index.js +28 -4
  200. package/lib/cli/lint/internalLints/upgrade/patches/12.4.0/index.js.map +1 -1
  201. package/lib/cli/lint/internalLints/upgrade/patches/12.4.0/patchDockerfileCIVariable.js +46 -11
  202. package/lib/cli/lint/internalLints/upgrade/patches/12.4.0/patchDockerfileCIVariable.js.map +2 -2
  203. package/lib/cli/lint/internalLints/upgrade/patches/12.4.1/configureTsConfigForESM.js +67 -29
  204. package/lib/cli/lint/internalLints/upgrade/patches/12.4.1/configureTsConfigForESM.js.map +2 -2
  205. package/lib/cli/lint/internalLints/upgrade/patches/12.4.1/index.js +34 -10
  206. package/lib/cli/lint/internalLints/upgrade/patches/12.4.1/index.js.map +1 -1
  207. package/lib/cli/lint/internalLints/upgrade/patches/12.4.1/patchApiDockerfiles.js +45 -11
  208. package/lib/cli/lint/internalLints/upgrade/patches/12.4.1/patchApiDockerfiles.js.map +2 -2
  209. package/lib/cli/lint/internalLints/upgrade/patches/12.4.1/rewriteSrcImports.d.ts +0 -4
  210. package/lib/cli/lint/internalLints/upgrade/patches/12.4.1/rewriteSrcImports.js +63 -18
  211. package/lib/cli/lint/internalLints/upgrade/patches/12.4.1/rewriteSrcImports.js.map +3 -3
  212. package/lib/cli/lint/internalLints/upgrade/patches/12.4.1/updateLambdaConfigs.js +50 -15
  213. package/lib/cli/lint/internalLints/upgrade/patches/12.4.1/updateLambdaConfigs.js.map +2 -2
  214. package/lib/cli/lint/internalLints/upgrade/patches/13.1.1/index.js +40 -0
  215. package/lib/cli/lint/internalLints/upgrade/patches/13.1.1/index.js.map +7 -0
  216. package/lib/cli/lint/internalLints/upgrade/patches/13.1.1/patchRootTsconfig.d.ts +3 -0
  217. package/lib/cli/lint/internalLints/upgrade/patches/13.1.1/patchRootTsconfig.js +133 -0
  218. package/lib/cli/lint/internalLints/upgrade/patches/13.1.1/patchRootTsconfig.js.map +7 -0
  219. package/lib/cli/lint/internalLints/upgrade/patches/13.1.1/upgradeNode.js +55 -0
  220. package/lib/cli/lint/internalLints/upgrade/patches/13.1.1/upgradeNode.js.map +7 -0
  221. package/lib/cli/lint/internalLints/upgrade/patches/7.3.1/addEmptyExports.js +51 -17
  222. package/lib/cli/lint/internalLints/upgrade/patches/7.3.1/addEmptyExports.js.map +2 -2
  223. package/lib/cli/lint/internalLints/upgrade/patches/7.3.1/index.js +34 -10
  224. package/lib/cli/lint/internalLints/upgrade/patches/7.3.1/index.js.map +1 -1
  225. package/lib/cli/lint/internalLints/upgrade/patches/7.3.1/patchDockerfile.js +44 -10
  226. package/lib/cli/lint/internalLints/upgrade/patches/7.3.1/patchDockerfile.js.map +2 -2
  227. package/lib/cli/lint/internalLints/upgrade/patches/7.3.1/patchServerListener.js +46 -12
  228. package/lib/cli/lint/internalLints/upgrade/patches/7.3.1/patchServerListener.js.map +2 -2
  229. package/lib/cli/lint/internalLints/upgrade/patches/8.0.0/index.js +28 -4
  230. package/lib/cli/lint/internalLints/upgrade/patches/8.0.0/index.js.map +1 -1
  231. package/lib/cli/lint/internalLints/upgrade/patches/8.0.0/patchPnpmPackageManager.js +49 -15
  232. package/lib/cli/lint/internalLints/upgrade/patches/8.0.0/patchPnpmPackageManager.js.map +2 -2
  233. package/lib/cli/lint/internalLints/upgrade/patches/8.2.1/collapseDuplicateMergeKeys.js +45 -11
  234. package/lib/cli/lint/internalLints/upgrade/patches/8.2.1/collapseDuplicateMergeKeys.js.map +2 -2
  235. package/lib/cli/lint/internalLints/upgrade/patches/8.2.1/index.js +34 -10
  236. package/lib/cli/lint/internalLints/upgrade/patches/8.2.1/index.js.map +1 -1
  237. package/lib/cli/lint/internalLints/upgrade/patches/8.2.1/moveNpmrcMounts.js +45 -11
  238. package/lib/cli/lint/internalLints/upgrade/patches/8.2.1/moveNpmrcMounts.js.map +2 -2
  239. package/lib/cli/lint/internalLints/upgrade/patches/8.2.1/patchDockerCompose.js +45 -11
  240. package/lib/cli/lint/internalLints/upgrade/patches/8.2.1/patchDockerCompose.js.map +2 -2
  241. package/lib/cli/lint/internalLints/upgrade/patches/8.2.1/patchDockerImages.js +47 -13
  242. package/lib/cli/lint/internalLints/upgrade/patches/8.2.1/patchDockerImages.js.map +2 -2
  243. package/lib/cli/lint/internalLints/upgrade/patches/9.0.1/index.js +28 -4
  244. package/lib/cli/lint/internalLints/upgrade/patches/9.0.1/index.js.map +1 -1
  245. package/lib/cli/lint/internalLints/upgrade/patches/9.0.1/patchPnpmDockerImages.js +45 -11
  246. package/lib/cli/lint/internalLints/upgrade/patches/9.0.1/patchPnpmDockerImages.js.map +2 -2
  247. package/lib/cli/lint/prettier.js +50 -15
  248. package/lib/cli/lint/prettier.js.map +3 -3
  249. package/lib/cli/lint/tsc.js +28 -4
  250. package/lib/cli/lint/tsc.js.map +1 -1
  251. package/lib/cli/lint/types.js +16 -0
  252. package/lib/cli/lint/types.js.map +3 -3
  253. package/lib/cli/migrate/index.d.ts +5 -0
  254. package/lib/cli/migrate/index.js +79 -15
  255. package/lib/cli/migrate/index.js.map +2 -2
  256. package/lib/cli/migrate/nodeVersion/checks.d.ts +1 -14
  257. package/lib/cli/migrate/nodeVersion/checks.js +51 -120
  258. package/lib/cli/migrate/nodeVersion/checks.js.map +2 -2
  259. package/lib/cli/migrate/nodeVersion/index.d.ts +8 -2
  260. package/lib/cli/migrate/nodeVersion/index.js +239 -65
  261. package/lib/cli/migrate/nodeVersion/index.js.map +3 -3
  262. package/lib/cli/migrate/nodeVersion/upgrade.d.ts +8 -0
  263. package/lib/cli/migrate/nodeVersion/upgrade.js +179 -0
  264. package/lib/cli/migrate/nodeVersion/upgrade.js.map +7 -0
  265. package/lib/cli/node/index.js +57 -20
  266. package/lib/cli/node/index.js.map +3 -3
  267. package/lib/cli/release/index.js +28 -4
  268. package/lib/cli/release/index.js.map +1 -1
  269. package/lib/cli/start/index.js +50 -16
  270. package/lib/cli/start/index.js.map +3 -3
  271. package/lib/cli/test/index.js +65 -4
  272. package/lib/cli/test/index.js.map +2 -2
  273. package/lib/cli/test/reporters/github/annotations.d.ts +9 -0
  274. package/lib/cli/test/reporters/github/annotations.js +102 -0
  275. package/lib/cli/test/reporters/github/annotations.js.map +7 -0
  276. package/lib/cli/test/reporters/github/index.d.ts +5 -0
  277. package/lib/cli/test/reporters/github/index.js +74 -0
  278. package/lib/cli/test/reporters/github/index.js.map +7 -0
  279. package/lib/cli/version/index.js +30 -6
  280. package/lib/cli/version/index.js.map +1 -1
  281. package/lib/index.d.ts +1 -0
  282. package/lib/index.js +46 -6
  283. package/lib/index.js.map +2 -2
  284. package/lib/skuba.js +45 -26
  285. package/lib/skuba.js.map +3 -3
  286. package/lib/utils/args.js +43 -6
  287. package/lib/utils/args.js.map +2 -2
  288. package/lib/utils/command.js +42 -4
  289. package/lib/utils/command.js.map +3 -3
  290. package/lib/utils/copy.js +57 -20
  291. package/lib/utils/copy.js.map +2 -2
  292. package/lib/utils/dir.js +72 -32
  293. package/lib/utils/dir.js.map +2 -2
  294. package/lib/utils/env.js +26 -2
  295. package/lib/utils/env.js.map +1 -1
  296. package/lib/utils/error.js +47 -10
  297. package/lib/utils/error.js.map +1 -1
  298. package/lib/utils/exec.js +61 -23
  299. package/lib/utils/exec.js.map +3 -3
  300. package/lib/utils/fs.js +40 -6
  301. package/lib/utils/fs.js.map +2 -2
  302. package/lib/utils/help.js +30 -6
  303. package/lib/utils/help.js.map +1 -1
  304. package/lib/utils/logging.js +38 -11
  305. package/lib/utils/logging.js.map +1 -1
  306. package/lib/utils/logo.js +48 -24
  307. package/lib/utils/logo.js.map +1 -1
  308. package/lib/utils/manifest.d.ts +2 -3
  309. package/lib/utils/manifest.js +48 -8
  310. package/lib/utils/manifest.js.map +3 -3
  311. package/lib/utils/npmrc.js +26 -2
  312. package/lib/utils/npmrc.js.map +1 -1
  313. package/lib/utils/packageManager.js +49 -12
  314. package/lib/utils/packageManager.js.map +2 -2
  315. package/lib/utils/port.js +39 -4
  316. package/lib/utils/port.js.map +2 -2
  317. package/lib/utils/sleep.js +26 -2
  318. package/lib/utils/sleep.js.map +1 -1
  319. package/lib/utils/template.js +55 -18
  320. package/lib/utils/template.js.map +3 -3
  321. package/lib/utils/validation.js +31 -2
  322. package/lib/utils/validation.js.map +1 -1
  323. package/lib/utils/version.js +46 -9
  324. package/lib/utils/version.js.map +2 -2
  325. package/lib/utils/wait.js +32 -7
  326. package/lib/utils/wait.js.map +1 -1
  327. package/lib/utils/worker.js +35 -10
  328. package/lib/utils/worker.js.map +1 -1
  329. package/lib/wrapper/function-arguments.d.js +1 -0
  330. package/lib/wrapper/functionHandler.js +49 -18
  331. package/lib/wrapper/functionHandler.js.map +2 -2
  332. package/lib/wrapper/http.js +43 -8
  333. package/lib/wrapper/http.js.map +2 -2
  334. package/lib/wrapper/index.js +7 -6
  335. package/lib/wrapper/index.js.map +1 -1
  336. package/lib/wrapper/main.js +42 -8
  337. package/lib/wrapper/main.js.map +3 -3
  338. package/lib/wrapper/requestListener.js +47 -13
  339. package/lib/wrapper/requestListener.js.map +2 -2
  340. package/lib/wrapper/server.js +28 -4
  341. package/lib/wrapper/server.js.map +1 -1
  342. package/package.json +42 -43
  343. package/template/base/_.prettierrc.js +1 -1
  344. package/template/base/_eslint.config.js +1 -1
  345. package/template/base/_pnpm-workspace.yaml +4 -3
  346. package/template/base/jest.config.ts +19 -0
  347. package/template/base/jest.setup.ts +3 -0
  348. package/template/express-rest-api/.buildkite/pipeline.yml +1 -1
  349. package/template/express-rest-api/.nvmrc +1 -1
  350. package/template/express-rest-api/package.json +7 -8
  351. package/template/express-rest-api/skuba.template.js +1 -1
  352. package/template/express-rest-api/src/app.test.ts +0 -1
  353. package/template/greeter/.buildkite/pipeline.yml +1 -1
  354. package/template/greeter/.nvmrc +1 -1
  355. package/template/greeter/package.json +4 -5
  356. package/template/greeter/skuba.template.js +1 -1
  357. package/template/greeter/src/app.test.ts +1 -3
  358. package/template/koa-rest-api/.buildkite/pipeline.yml +1 -1
  359. package/template/koa-rest-api/.nvmrc +1 -1
  360. package/template/koa-rest-api/package.json +8 -10
  361. package/template/koa-rest-api/skuba.template.js +1 -1
  362. package/template/koa-rest-api/src/api/jobs/getJobs.test.ts +0 -2
  363. package/template/koa-rest-api/src/api/jobs/postJob.test.ts +0 -2
  364. package/template/koa-rest-api/src/app.test.ts +0 -2
  365. package/template/koa-rest-api/src/framework/server.test.ts +2 -2
  366. package/template/koa-rest-api/src/framework/validation.test.ts +0 -2
  367. package/template/koa-rest-api/src/testing/metrics.ts +0 -2
  368. package/template/lambda-sqs-worker-cdk/.buildkite/pipeline.yml +2 -2
  369. package/template/lambda-sqs-worker-cdk/.nvmrc +1 -1
  370. package/template/lambda-sqs-worker-cdk/infra/__snapshots__/appStack.test.ts.snap +7 -21
  371. package/template/lambda-sqs-worker-cdk/infra/appStack.test.ts +9 -11
  372. package/template/lambda-sqs-worker-cdk/infra/appStack.ts +3 -3
  373. package/template/lambda-sqs-worker-cdk/infra/config.ts +2 -4
  374. package/template/lambda-sqs-worker-cdk/package.json +9 -9
  375. package/template/lambda-sqs-worker-cdk/skuba.template.js +13 -1
  376. package/template/lambda-sqs-worker-cdk/src/app.test.ts +13 -22
  377. package/template/lambda-sqs-worker-cdk/src/framework/handler.test.ts +0 -1
  378. package/template/lambda-sqs-worker-cdk/src/framework/validation.test.ts +31 -33
  379. package/template/lambda-sqs-worker-cdk/src/services/jobScorer.test.ts +2 -8
  380. package/template/lambda-sqs-worker-cdk/src/services/pipelineEventSender.test.ts +2 -3
  381. package/template/lambda-sqs-worker-cdk/src/testing/services.ts +3 -4
  382. package/template/oss-npm-package/.github/workflows/release.yml +1 -1
  383. package/template/oss-npm-package/.github/workflows/validate.yml +1 -1
  384. package/template/oss-npm-package/.nvmrc +1 -1
  385. package/template/oss-npm-package/_package.json +0 -1
  386. package/template/oss-npm-package/skuba.template.js +1 -1
  387. package/template/oss-npm-package/src/index.test.ts +0 -2
  388. package/template/private-npm-package/.nvmrc +1 -1
  389. package/template/private-npm-package/_package.json +1 -2
  390. package/template/private-npm-package/skuba.template.js +2 -2
  391. package/template/private-npm-package/src/index.test.ts +0 -2
  392. package/lib/cli/lint/internalLints/upgrade/patches/12.5.0/index.js +0 -11
  393. package/lib/cli/lint/internalLints/upgrade/patches/12.5.0/index.js.map +0 -7
  394. package/lib/cli/lint/internalLints/upgrade/patches/12.5.0/rewriteGlobalVars.d.ts +0 -5
  395. package/lib/cli/lint/internalLints/upgrade/patches/12.5.0/rewriteGlobalVars.js +0 -72
  396. package/lib/cli/lint/internalLints/upgrade/patches/12.5.0/rewriteGlobalVars.js.map +0 -7
  397. package/lib/cli/lint/internalLints/upgrade/patches/9.1.0/index.d.ts +0 -2
  398. package/lib/cli/lint/internalLints/upgrade/patches/9.1.0/index.js +0 -11
  399. package/lib/cli/lint/internalLints/upgrade/patches/9.1.0/index.js.map +0 -7
  400. package/lib/cli/lint/internalLints/upgrade/patches/9.1.0/upgradeNode.js +0 -34
  401. package/lib/cli/lint/internalLints/upgrade/patches/9.1.0/upgradeNode.js.map +0 -7
  402. package/lib/eslint.d.js +0 -1
  403. package/lib/eslint.d.js.map +0 -7
  404. package/template/base/vitest.config.ts +0 -25
  405. /package/lib/cli/lint/internalLints/upgrade/patches/{12.5.0 → 13.1.1}/index.d.ts +0 -0
  406. /package/lib/cli/lint/internalLints/upgrade/patches/{9.1.0 → 13.1.1}/upgradeNode.d.ts +0 -0
@@ -1,13 +1,46 @@
1
- import { inspect } from "util";
2
- import fg from "fast-glob";
3
- import fs from "fs-extra";
4
- import { log } from "../../../../../../utils/logging.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 patchPnpmDockerImages_exports = {};
30
+ __export(patchPnpmDockerImages_exports, {
31
+ tryPatchPnpmDockerImages: () => tryPatchPnpmDockerImages
32
+ });
33
+ module.exports = __toCommonJS(patchPnpmDockerImages_exports);
34
+ var import_util = require("util");
35
+ var import_fast_glob = __toESM(require("fast-glob"));
36
+ var import_fs_extra = __toESM(require("fs-extra"));
37
+ var import_logging = require("../../../../../../utils/logging.js");
5
38
  const DOCKER_IMAGE_CONFIG_REGEX = /^(RUN --mount=type=bind,source=package.json,target=package.json \\\n(\s+)corepack enable pnpm && corepack install(?:.|\n)+?RUN )(pnpm config set store-dir \/root\/.pnpm-store)/gm;
6
39
  const DOCKER_IMAGE_FETCH_REGEX = /^(RUN --mount=type=bind,source=.npmrc,target=.npmrc \\\n)((?:(?!--mount=type=bind,source=package\.json,target=package\.json)[\s\S])+?\n(\s+)pnpm (fetch|install))/gm;
7
40
  const PACKAGE_JSON_MOUNT = "--mount=type=bind,source=package.json,target=package.json \\\n";
8
41
  const fetchFiles = async (files) => Promise.all(
9
42
  files.map(async (file) => {
10
- const contents = await fs.readFile(file, "utf8");
43
+ const contents = await import_fs_extra.default.readFile(file, "utf8");
11
44
  return {
12
45
  file,
13
46
  contents
@@ -17,7 +50,7 @@ const fetchFiles = async (files) => Promise.all(
17
50
  const patchPnpmDockerImages = async ({
18
51
  mode
19
52
  }) => {
20
- const maybeDockerFilesPaths = await fg(["Dockerfile*"]);
53
+ const maybeDockerFilesPaths = await (0, import_fast_glob.default)(["Dockerfile*"]);
21
54
  if (!maybeDockerFilesPaths.length) {
22
55
  return {
23
56
  result: "skip",
@@ -48,7 +81,7 @@ const patchPnpmDockerImages = async ({
48
81
  DOCKER_IMAGE_FETCH_REGEX,
49
82
  (_, npmrcLine, rest, whitespace) => `${npmrcLine}${whitespace}${PACKAGE_JSON_MOUNT}${rest}`
50
83
  );
51
- await fs.writeFile(file, patchedContents);
84
+ await import_fs_extra.default.writeFile(file, patchedContents);
52
85
  })
53
86
  );
54
87
  return { result: "apply" };
@@ -57,12 +90,13 @@ const tryPatchPnpmDockerImages = async (config) => {
57
90
  try {
58
91
  return await patchPnpmDockerImages(config);
59
92
  } catch (err) {
60
- log.warn("Failed to patch Docker images");
61
- log.subtle(inspect(err));
93
+ import_logging.log.warn("Failed to patch Docker images");
94
+ import_logging.log.subtle((0, import_util.inspect)(err));
62
95
  return { result: "skip", reason: "due to an error" };
63
96
  }
64
97
  };
65
- export {
98
+ // Annotate the CommonJS export names for ESM import in node:
99
+ 0 && (module.exports = {
66
100
  tryPatchPnpmDockerImages
67
- };
101
+ });
68
102
  //# sourceMappingURL=patchPnpmDockerImages.js.map
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../../../../../../src/cli/lint/internalLints/upgrade/patches/9.0.1/patchPnpmDockerImages.ts"],
4
4
  "sourcesContent": ["import { inspect } from 'util';\n\nimport fg from 'fast-glob';\nimport fs from 'fs-extra';\n\nimport { log } from '../../../../../../utils/logging.js';\nimport type { PatchFunction, PatchReturnType } from '../../index.js';\n\nconst DOCKER_IMAGE_CONFIG_REGEX =\n /^(RUN --mount=type=bind,source=package.json,target=package.json \\\\\\n(\\s+)corepack enable pnpm && corepack install(?:.|\\n)+?RUN )(pnpm config set store-dir \\/root\\/.pnpm-store)/gm;\nconst DOCKER_IMAGE_FETCH_REGEX =\n /^(RUN --mount=type=bind,source=.npmrc,target=.npmrc \\\\\\n)((?:(?!--mount=type=bind,source=package\\.json,target=package\\.json)[\\s\\S])+?\\n(\\s+)pnpm (fetch|install))/gm;\n\nconst PACKAGE_JSON_MOUNT =\n '--mount=type=bind,source=package.json,target=package.json \\\\\\n';\n\nconst fetchFiles = async (files: string[]) =>\n Promise.all(\n files.map(async (file) => {\n const contents = await fs.readFile(file, 'utf8');\n\n return {\n file,\n contents,\n };\n }),\n );\n\nconst patchPnpmDockerImages: PatchFunction = async ({\n mode,\n}): Promise<PatchReturnType> => {\n const maybeDockerFilesPaths = await fg(['Dockerfile*']);\n\n if (!maybeDockerFilesPaths.length) {\n return {\n result: 'skip',\n reason: 'no Dockerfiles found',\n };\n }\n\n const dockerFiles = await fetchFiles(maybeDockerFilesPaths);\n\n const dockerFilesToPatch = dockerFiles.filter(\n ({ contents }) =>\n DOCKER_IMAGE_CONFIG_REGEX.exec(contents) ??\n DOCKER_IMAGE_FETCH_REGEX.exec(contents),\n );\n\n if (!dockerFilesToPatch.length) {\n return {\n result: 'skip',\n reason: 'no Dockerfiles to patch',\n };\n }\n\n if (mode === 'lint') {\n return {\n result: 'apply',\n };\n }\n\n await Promise.all(\n dockerFilesToPatch.map(async ({ file, contents }) => {\n const patchedContents = contents\n .replace(\n DOCKER_IMAGE_CONFIG_REGEX,\n (_, earlyCommands, whitespace, pnpmSetConfigLine) =>\n `${earlyCommands}${PACKAGE_JSON_MOUNT}${whitespace}${pnpmSetConfigLine}`,\n )\n .replace(\n DOCKER_IMAGE_FETCH_REGEX,\n (_, npmrcLine, rest, whitespace) =>\n `${npmrcLine}${whitespace}${PACKAGE_JSON_MOUNT}${rest}`,\n );\n\n await fs.writeFile(file, patchedContents);\n }),\n );\n\n return { result: 'apply' };\n};\n\nexport const tryPatchPnpmDockerImages: PatchFunction = async (config) => {\n try {\n return await patchPnpmDockerImages(config);\n } catch (err) {\n log.warn('Failed to patch Docker images');\n log.subtle(inspect(err));\n return { result: 'skip', reason: 'due to an error' };\n }\n};\n"],
5
- "mappings": "AAAA,SAAS,eAAe;AAExB,OAAO,QAAQ;AACf,OAAO,QAAQ;AAEf,SAAS,WAAW;AAGpB,MAAM,4BACJ;AACF,MAAM,2BACJ;AAEF,MAAM,qBACJ;AAEF,MAAM,aAAa,OAAO,UACxB,QAAQ;AAAA,EACN,MAAM,IAAI,OAAO,SAAS;AACxB,UAAM,WAAW,MAAM,GAAG,SAAS,MAAM,MAAM;AAE/C,WAAO;AAAA,MACL;AAAA,MACA;AAAA,IACF;AAAA,EACF,CAAC;AACH;AAEF,MAAM,wBAAuC,OAAO;AAAA,EAClD;AACF,MAAgC;AAC9B,QAAM,wBAAwB,MAAM,GAAG,CAAC,aAAa,CAAC;AAEtD,MAAI,CAAC,sBAAsB,QAAQ;AACjC,WAAO;AAAA,MACL,QAAQ;AAAA,MACR,QAAQ;AAAA,IACV;AAAA,EACF;AAEA,QAAM,cAAc,MAAM,WAAW,qBAAqB;AAE1D,QAAM,qBAAqB,YAAY;AAAA,IACrC,CAAC,EAAE,SAAS,MACV,0BAA0B,KAAK,QAAQ,KACvC,yBAAyB,KAAK,QAAQ;AAAA,EAC1C;AAEA,MAAI,CAAC,mBAAmB,QAAQ;AAC9B,WAAO;AAAA,MACL,QAAQ;AAAA,MACR,QAAQ;AAAA,IACV;AAAA,EACF;AAEA,MAAI,SAAS,QAAQ;AACnB,WAAO;AAAA,MACL,QAAQ;AAAA,IACV;AAAA,EACF;AAEA,QAAM,QAAQ;AAAA,IACZ,mBAAmB,IAAI,OAAO,EAAE,MAAM,SAAS,MAAM;AACnD,YAAM,kBAAkB,SACrB;AAAA,QACC;AAAA,QACA,CAAC,GAAG,eAAe,YAAY,sBAC7B,GAAG,aAAa,GAAG,kBAAkB,GAAG,UAAU,GAAG,iBAAiB;AAAA,MAC1E,EACC;AAAA,QACC;AAAA,QACA,CAAC,GAAG,WAAW,MAAM,eACnB,GAAG,SAAS,GAAG,UAAU,GAAG,kBAAkB,GAAG,IAAI;AAAA,MACzD;AAEF,YAAM,GAAG,UAAU,MAAM,eAAe;AAAA,IAC1C,CAAC;AAAA,EACH;AAEA,SAAO,EAAE,QAAQ,QAAQ;AAC3B;AAEO,MAAM,2BAA0C,OAAO,WAAW;AACvE,MAAI;AACF,WAAO,MAAM,sBAAsB,MAAM;AAAA,EAC3C,SAAS,KAAK;AACZ,QAAI,KAAK,+BAA+B;AACxC,QAAI,OAAO,QAAQ,GAAG,CAAC;AACvB,WAAO,EAAE,QAAQ,QAAQ,QAAQ,kBAAkB;AAAA,EACrD;AACF;",
6
- "names": []
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kBAAwB;AAExB,uBAAe;AACf,sBAAe;AAEf,qBAAoB;AAGpB,MAAM,4BACJ;AACF,MAAM,2BACJ;AAEF,MAAM,qBACJ;AAEF,MAAM,aAAa,OAAO,UACxB,QAAQ;AAAA,EACN,MAAM,IAAI,OAAO,SAAS;AACxB,UAAM,WAAW,MAAM,gBAAAA,QAAG,SAAS,MAAM,MAAM;AAE/C,WAAO;AAAA,MACL;AAAA,MACA;AAAA,IACF;AAAA,EACF,CAAC;AACH;AAEF,MAAM,wBAAuC,OAAO;AAAA,EAClD;AACF,MAAgC;AAC9B,QAAM,wBAAwB,UAAM,iBAAAC,SAAG,CAAC,aAAa,CAAC;AAEtD,MAAI,CAAC,sBAAsB,QAAQ;AACjC,WAAO;AAAA,MACL,QAAQ;AAAA,MACR,QAAQ;AAAA,IACV;AAAA,EACF;AAEA,QAAM,cAAc,MAAM,WAAW,qBAAqB;AAE1D,QAAM,qBAAqB,YAAY;AAAA,IACrC,CAAC,EAAE,SAAS,MACV,0BAA0B,KAAK,QAAQ,KACvC,yBAAyB,KAAK,QAAQ;AAAA,EAC1C;AAEA,MAAI,CAAC,mBAAmB,QAAQ;AAC9B,WAAO;AAAA,MACL,QAAQ;AAAA,MACR,QAAQ;AAAA,IACV;AAAA,EACF;AAEA,MAAI,SAAS,QAAQ;AACnB,WAAO;AAAA,MACL,QAAQ;AAAA,IACV;AAAA,EACF;AAEA,QAAM,QAAQ;AAAA,IACZ,mBAAmB,IAAI,OAAO,EAAE,MAAM,SAAS,MAAM;AACnD,YAAM,kBAAkB,SACrB;AAAA,QACC;AAAA,QACA,CAAC,GAAG,eAAe,YAAY,sBAC7B,GAAG,aAAa,GAAG,kBAAkB,GAAG,UAAU,GAAG,iBAAiB;AAAA,MAC1E,EACC;AAAA,QACC;AAAA,QACA,CAAC,GAAG,WAAW,MAAM,eACnB,GAAG,SAAS,GAAG,UAAU,GAAG,kBAAkB,GAAG,IAAI;AAAA,MACzD;AAEF,YAAM,gBAAAD,QAAG,UAAU,MAAM,eAAe;AAAA,IAC1C,CAAC;AAAA,EACH;AAEA,SAAO,EAAE,QAAQ,QAAQ;AAC3B;AAEO,MAAM,2BAA0C,OAAO,WAAW;AACvE,MAAI;AACF,WAAO,MAAM,sBAAsB,MAAM;AAAA,EAC3C,SAAS,KAAK;AACZ,uBAAI,KAAK,+BAA+B;AACxC,uBAAI,WAAO,qBAAQ,GAAG,CAAC;AACvB,WAAO,EAAE,QAAQ,QAAQ,QAAQ,kBAAkB;AAAA,EACrD;AACF;",
6
+ "names": ["fs", "fg"]
7
7
  }
@@ -1,23 +1,58 @@
1
- import { styleText } from "node:util";
2
- import path from "path";
3
- import { isMainThread } from "worker_threads";
4
- import { createLogger } from "../../utils/logging.js";
5
- import { execWorkerThread, postWorkerOutput } from "../../utils/worker.js";
6
- import { runPrettier } from "../adapter/prettier.js";
7
- const LOG_PREFIX = styleText("cyan", "Prettier \u2502");
8
- const runPrettierInCurrentThread = ({ debug }) => runPrettier("lint", createLogger({ debug, prefixes: [LOG_PREFIX] }));
9
- const runPrettierInWorkerThread = (input) => execWorkerThread(
10
- path.posix.join(import.meta.dirname, "prettier.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 prettier_exports = {};
30
+ __export(prettier_exports, {
31
+ runPrettierInCurrentThread: () => runPrettierInCurrentThread,
32
+ runPrettierInWorkerThread: () => runPrettierInWorkerThread
33
+ });
34
+ module.exports = __toCommonJS(prettier_exports);
35
+ var import_node_util = require("node:util");
36
+ var import_path = __toESM(require("path"));
37
+ var import_worker_threads = require("worker_threads");
38
+ var import_logging = require("../../utils/logging.js");
39
+ var import_worker = require("../../utils/worker.js");
40
+ var import_prettier = require("../adapter/prettier.js");
41
+ const LOG_PREFIX = (0, import_node_util.styleText)("cyan", "Prettier \u2502");
42
+ const runPrettierInCurrentThread = ({ debug }) => (0, import_prettier.runPrettier)("lint", (0, import_logging.createLogger)({ debug, prefixes: [LOG_PREFIX] }));
43
+ const runPrettierInWorkerThread = (input) => (0, import_worker.execWorkerThread)(
44
+ import_path.default.posix.join(__dirname, "prettier.js"),
11
45
  input
12
46
  );
13
- if (!isMainThread) {
14
- postWorkerOutput(
47
+ if (!import_worker_threads.isMainThread) {
48
+ (0, import_worker.postWorkerOutput)(
15
49
  runPrettierInCurrentThread,
16
- createLogger({ debug: false, prefixes: [LOG_PREFIX] })
50
+ (0, import_logging.createLogger)({ debug: false, prefixes: [LOG_PREFIX] })
17
51
  );
18
52
  }
19
- export {
53
+ // Annotate the CommonJS export names for ESM import in node:
54
+ 0 && (module.exports = {
20
55
  runPrettierInCurrentThread,
21
56
  runPrettierInWorkerThread
22
- };
57
+ });
23
58
  //# sourceMappingURL=prettier.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/cli/lint/prettier.ts"],
4
- "sourcesContent": ["import { styleText } from 'node:util';\nimport path from 'path';\nimport { isMainThread } from 'worker_threads';\n\nimport { createLogger } from '../../utils/logging.js';\nimport { execWorkerThread, postWorkerOutput } from '../../utils/worker.js';\nimport { type PrettierOutput, runPrettier } from '../adapter/prettier.js';\n\nimport type { Input } from './types.js';\n\nconst LOG_PREFIX = styleText('cyan', 'Prettier \u2502');\n\nexport const runPrettierInCurrentThread = ({ debug }: Input) =>\n runPrettier('lint', createLogger({ debug, prefixes: [LOG_PREFIX] }));\n\nexport const runPrettierInWorkerThread = (input: Input) =>\n execWorkerThread<Input, PrettierOutput>(\n path.posix.join(import.meta.dirname, 'prettier.js'),\n input,\n );\n\nif (!isMainThread) {\n postWorkerOutput(\n runPrettierInCurrentThread,\n createLogger({ debug: false, prefixes: [LOG_PREFIX] }),\n );\n}\n"],
5
- "mappings": "AAAA,SAAS,iBAAiB;AAC1B,OAAO,UAAU;AACjB,SAAS,oBAAoB;AAE7B,SAAS,oBAAoB;AAC7B,SAAS,kBAAkB,wBAAwB;AACnD,SAA8B,mBAAmB;AAIjD,MAAM,aAAa,UAAU,QAAQ,iBAAY;AAE1C,MAAM,6BAA6B,CAAC,EAAE,MAAM,MACjD,YAAY,QAAQ,aAAa,EAAE,OAAO,UAAU,CAAC,UAAU,EAAE,CAAC,CAAC;AAE9D,MAAM,4BAA4B,CAAC,UACxC;AAAA,EACE,KAAK,MAAM,KAAK,YAAY,SAAS,aAAa;AAAA,EAClD;AACF;AAEF,IAAI,CAAC,cAAc;AACjB;AAAA,IACE;AAAA,IACA,aAAa,EAAE,OAAO,OAAO,UAAU,CAAC,UAAU,EAAE,CAAC;AAAA,EACvD;AACF;",
6
- "names": []
4
+ "sourcesContent": ["import { styleText } from 'node:util';\nimport path from 'path';\nimport { isMainThread } from 'worker_threads';\n\nimport { createLogger } from '../../utils/logging.js';\nimport { execWorkerThread, postWorkerOutput } from '../../utils/worker.js';\nimport { type PrettierOutput, runPrettier } from '../adapter/prettier.js';\n\nimport type { Input } from './types.js';\n\nconst LOG_PREFIX = styleText('cyan', 'Prettier \u2502');\n\nexport const runPrettierInCurrentThread = ({ debug }: Input) =>\n runPrettier('lint', createLogger({ debug, prefixes: [LOG_PREFIX] }));\n\nexport const runPrettierInWorkerThread = (input: Input) =>\n execWorkerThread<Input, PrettierOutput>(\n path.posix.join(__dirname, 'prettier.js'),\n input,\n );\n\nif (!isMainThread) {\n postWorkerOutput(\n runPrettierInCurrentThread,\n createLogger({ debug: false, prefixes: [LOG_PREFIX] }),\n );\n}\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,uBAA0B;AAC1B,kBAAiB;AACjB,4BAA6B;AAE7B,qBAA6B;AAC7B,oBAAmD;AACnD,sBAAiD;AAIjD,MAAM,iBAAa,4BAAU,QAAQ,iBAAY;AAE1C,MAAM,6BAA6B,CAAC,EAAE,MAAM,UACjD,6BAAY,YAAQ,6BAAa,EAAE,OAAO,UAAU,CAAC,UAAU,EAAE,CAAC,CAAC;AAE9D,MAAM,4BAA4B,CAAC,cACxC;AAAA,EACE,YAAAA,QAAK,MAAM,KAAK,WAAW,aAAa;AAAA,EACxC;AACF;AAEF,IAAI,CAAC,oCAAc;AACjB;AAAA,IACE;AAAA,QACA,6BAAa,EAAE,OAAO,OAAO,UAAU,CAAC,UAAU,EAAE,CAAC;AAAA,EACvD;AACF;",
6
+ "names": ["path"]
7
7
  }
@@ -1,4 +1,27 @@
1
- import { execConcurrently } from "../../utils/exec.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 tsc_exports = {};
20
+ __export(tsc_exports, {
21
+ runTscInNewProcess: () => runTscInNewProcess
22
+ });
23
+ module.exports = __toCommonJS(tsc_exports);
24
+ var import_exec = require("../../utils/exec.js");
2
25
  const runTscInNewProcess = async ({
3
26
  debug,
4
27
  tscOutputStream
@@ -9,7 +32,7 @@ const runTscInNewProcess = async ({
9
32
  "--noEmit"
10
33
  ].join(" ");
11
34
  try {
12
- await execConcurrently(
35
+ await (0, import_exec.execConcurrently)(
13
36
  [
14
37
  {
15
38
  command,
@@ -28,7 +51,8 @@ const runTscInNewProcess = async ({
28
51
  return false;
29
52
  }
30
53
  };
31
- export {
54
+ // Annotate the CommonJS export names for ESM import in node:
55
+ 0 && (module.exports = {
32
56
  runTscInNewProcess
33
- };
57
+ });
34
58
  //# sourceMappingURL=tsc.js.map
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../../src/cli/lint/tsc.ts"],
4
4
  "sourcesContent": ["import { execConcurrently } from '../../utils/exec.js';\n\nimport type { Input } from './types.js';\n\nexport const runTscInNewProcess = async ({\n debug,\n tscOutputStream,\n}: Input): Promise<boolean> => {\n const command = [\n 'tsc',\n ...(debug ? ['--extendedDiagnostics'] : []),\n '--noEmit',\n ].join(' ');\n\n try {\n // Misappropriate `concurrently` as a stdio prefixer.\n // We can use our regular console logger once we decide on an approach for\n // compiling in-process, whether by interacting with the TypeScript Compiler\n // API directly or using a higher-level tool like esbuild.\n await execConcurrently(\n [\n {\n command,\n name: 'tsc',\n prefixColor: 'blue',\n },\n ],\n {\n maxProcesses: 1,\n nameLength: 'Prettier'.length,\n outputStream: tscOutputStream,\n },\n );\n\n return true;\n } catch {\n return false;\n }\n};\n"],
5
- "mappings": "AAAA,SAAS,wBAAwB;AAI1B,MAAM,qBAAqB,OAAO;AAAA,EACvC;AAAA,EACA;AACF,MAA+B;AAC7B,QAAM,UAAU;AAAA,IACd;AAAA,IACA,GAAI,QAAQ,CAAC,uBAAuB,IAAI,CAAC;AAAA,IACzC;AAAA,EACF,EAAE,KAAK,GAAG;AAEV,MAAI;AAKF,UAAM;AAAA,MACJ;AAAA,QACE;AAAA,UACE;AAAA,UACA,MAAM;AAAA,UACN,aAAa;AAAA,QACf;AAAA,MACF;AAAA,MACA;AAAA,QACE,cAAc;AAAA,QACd,YAAY,WAAW;AAAA,QACvB,cAAc;AAAA,MAChB;AAAA,IACF;AAEA,WAAO;AAAA,EACT,QAAQ;AACN,WAAO;AAAA,EACT;AACF;",
5
+ "mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kBAAiC;AAI1B,MAAM,qBAAqB,OAAO;AAAA,EACvC;AAAA,EACA;AACF,MAA+B;AAC7B,QAAM,UAAU;AAAA,IACd;AAAA,IACA,GAAI,QAAQ,CAAC,uBAAuB,IAAI,CAAC;AAAA,IACzC;AAAA,EACF,EAAE,KAAK,GAAG;AAEV,MAAI;AAKF,cAAM;AAAA,MACJ;AAAA,QACE;AAAA,UACE;AAAA,UACA,MAAM;AAAA,UACN,aAAa;AAAA,QACf;AAAA,MACF;AAAA,MACA;AAAA,QACE,cAAc;AAAA,QACd,YAAY,WAAW;AAAA,QACvB,cAAc;AAAA,MAChB;AAAA,IACF;AAEA,WAAO;AAAA,EACT,QAAQ;AACN,WAAO;AAAA,EACT;AACF;",
6
6
  "names": []
7
7
  }
@@ -1 +1,17 @@
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 __copyProps = (to, from, except, desc) => {
7
+ if (from && typeof from === "object" || typeof from === "function") {
8
+ for (let key of __getOwnPropNames(from))
9
+ if (!__hasOwnProp.call(to, key) && key !== except)
10
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
11
+ }
12
+ return to;
13
+ };
14
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
15
+ var types_exports = {};
16
+ module.exports = __toCommonJS(types_exports);
1
17
  //# sourceMappingURL=types.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
- "sources": [],
4
- "sourcesContent": [],
5
- "mappings": "",
3
+ "sources": ["../../../src/cli/lint/types.ts"],
4
+ "sourcesContent": ["import type { Writable } from 'stream';\n\nexport interface Input {\n /**\n * Whether to enable verbose debug logging.\n *\n * Defaults to `false`.\n */\n debug: boolean;\n\n /**\n * Whether to disable parallelism to run linting operations serially.\n *\n * This can be useful for executing in resource-constrained environments and\n * snapshotting deterministic output in tests.\n *\n * Defaults to `false`.\n */\n serial: boolean;\n\n /**\n * An override output stream that can be supplied to test `tsc` logging.\n *\n * Defaults to `process.stdout`.\n */\n tscOutputStream?: Writable;\n\n /**\n * Whether to allow usage of Node.js worker threads.\n *\n * This may be set to `false` when there is a worker thread incompatibility,\n * such as calling in from a TypeScript context in our Jest tests.\n *\n * Defaults to `true`.\n */\n workerThreads?: boolean;\n\n /**\n * An override to point to a specific ESLint config file.\n */\n eslintConfigFile?: string;\n\n /**\n * Additional CLI flags that are used for skuba's internal lints.\n */\n additionalFlags?: string[];\n}\n"],
5
+ "mappings": ";;;;;;;;;;;;;;AAAA;AAAA;",
6
6
  "names": []
7
7
  }
@@ -1 +1,6 @@
1
+ export declare const migrations: {
2
+ node20: () => Promise<void>;
3
+ node22: () => Promise<void>;
4
+ node24: () => Promise<void>;
5
+ };
1
6
  export declare const migrate: (args?: string[]) => Promise<void>;
@@ -1,24 +1,86 @@
1
- import { log } from "../../utils/logging.js";
2
- import { nodeVersionMigration } from "./nodeVersion/index.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 migrate_exports = {};
20
+ __export(migrate_exports, {
21
+ migrate: () => migrate,
22
+ migrations: () => migrations
23
+ });
24
+ module.exports = __toCommonJS(migrate_exports);
25
+ var import_logging = require("../../utils/logging.js");
26
+ var import_nodeVersion = require("./nodeVersion/index.js");
3
27
  const migrations = {
4
- node20: () => nodeVersionMigration({
5
- nodeVersion: 20,
6
- ECMAScriptVersion: "ES2023"
28
+ node20: () => (0, import_nodeVersion.nodeVersionMigration)({
29
+ nodeVersion: "20",
30
+ ECMAScriptVersion: "ES2023",
31
+ packageNodeVersion: "16",
32
+ packageECMAScriptVersion: "ES2021",
33
+ infraPackages: []
7
34
  }),
8
- node22: () => nodeVersionMigration({
9
- nodeVersion: 22,
10
- ECMAScriptVersion: "ES2024"
35
+ node22: () => (0, import_nodeVersion.nodeVersionMigration)({
36
+ nodeVersion: "22",
37
+ ECMAScriptVersion: "ES2024",
38
+ packageNodeVersion: "18",
39
+ packageECMAScriptVersion: "ES2022",
40
+ infraPackages: []
41
+ }),
42
+ node24: () => (0, import_nodeVersion.nodeVersionMigration)({
43
+ nodeVersion: "24",
44
+ ECMAScriptVersion: "ES2024",
45
+ packageNodeVersion: "20",
46
+ packageECMAScriptVersion: "ES2023",
47
+ infraPackages: [
48
+ {
49
+ name: "aws-cdk-lib",
50
+ version: "2.224.0"
51
+ },
52
+ {
53
+ name: "datadog-cdk-constructs-v2",
54
+ version: "3.4.0"
55
+ },
56
+ {
57
+ name: "osls",
58
+ version: "3.61.0"
59
+ },
60
+ {
61
+ name: "serverless",
62
+ version: "4.25.0"
63
+ },
64
+ {
65
+ name: "serverless-plugin-datadog",
66
+ version: "5.114.0"
67
+ },
68
+ {
69
+ name: "@types/node",
70
+ version: "24.10.1"
71
+ }
72
+ ]
11
73
  })
12
74
  };
13
75
  const logAvailableMigrations = () => {
14
- log.ok("Available migrations:");
76
+ import_logging.log.ok("Available migrations:");
15
77
  Object.keys(migrations).forEach((migration) => {
16
- log.ok(`- ${migration}`);
78
+ import_logging.log.ok(`- ${migration}`);
17
79
  });
18
80
  };
19
81
  const migrate = async (args = process.argv.slice(2)) => {
20
82
  if (!args[0]) {
21
- log.err("Provide a migration to run.");
83
+ import_logging.log.err("Provide a migration to run.");
22
84
  logAvailableMigrations();
23
85
  process.exitCode = 1;
24
86
  return;
@@ -29,14 +91,16 @@ const migrate = async (args = process.argv.slice(2)) => {
29
91
  }
30
92
  const migration = migrations[args[0]];
31
93
  if (!migration) {
32
- log.err(`Migration "${args[0]}" is not a valid option.`);
94
+ import_logging.log.err(`Migration "${args[0]}" is not a valid option.`);
33
95
  logAvailableMigrations();
34
96
  process.exitCode = 1;
35
97
  return;
36
98
  }
37
99
  await migration();
38
100
  };
39
- export {
40
- migrate
41
- };
101
+ // Annotate the CommonJS export names for ESM import in node:
102
+ 0 && (module.exports = {
103
+ migrate,
104
+ migrations
105
+ });
42
106
  //# sourceMappingURL=index.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/cli/migrate/index.ts"],
4
- "sourcesContent": ["import { log } from '../../utils/logging.js';\n\nimport { nodeVersionMigration } from './nodeVersion/index.js';\n\nconst migrations: Record<string, () => Promise<void>> = {\n node20: () =>\n nodeVersionMigration({\n nodeVersion: 20,\n ECMAScriptVersion: 'ES2023',\n }),\n node22: () =>\n nodeVersionMigration({\n nodeVersion: 22,\n ECMAScriptVersion: 'ES2024',\n }),\n};\n\nconst logAvailableMigrations = () => {\n log.ok('Available migrations:');\n Object.keys(migrations).forEach((migration) => {\n log.ok(`- ${migration}`);\n });\n};\n\nexport const migrate = async (args = process.argv.slice(2)) => {\n if (!args[0]) {\n log.err('Provide a migration to run.');\n logAvailableMigrations();\n process.exitCode = 1;\n return;\n }\n\n if (args.includes('--help') || args.includes('-h') || args[0] === 'help') {\n logAvailableMigrations();\n return;\n }\n\n const migration = migrations[args[0]];\n\n if (!migration) {\n log.err(`Migration \"${args[0]}\" is not a valid option.`);\n logAvailableMigrations();\n process.exitCode = 1;\n return;\n }\n\n await migration();\n};\n"],
5
- "mappings": "AAAA,SAAS,WAAW;AAEpB,SAAS,4BAA4B;AAErC,MAAM,aAAkD;AAAA,EACtD,QAAQ,MACN,qBAAqB;AAAA,IACnB,aAAa;AAAA,IACb,mBAAmB;AAAA,EACrB,CAAC;AAAA,EACH,QAAQ,MACN,qBAAqB;AAAA,IACnB,aAAa;AAAA,IACb,mBAAmB;AAAA,EACrB,CAAC;AACL;AAEA,MAAM,yBAAyB,MAAM;AACnC,MAAI,GAAG,uBAAuB;AAC9B,SAAO,KAAK,UAAU,EAAE,QAAQ,CAAC,cAAc;AAC7C,QAAI,GAAG,KAAK,SAAS,EAAE;AAAA,EACzB,CAAC;AACH;AAEO,MAAM,UAAU,OAAO,OAAO,QAAQ,KAAK,MAAM,CAAC,MAAM;AAC7D,MAAI,CAAC,KAAK,CAAC,GAAG;AACZ,QAAI,IAAI,6BAA6B;AACrC,2BAAuB;AACvB,YAAQ,WAAW;AACnB;AAAA,EACF;AAEA,MAAI,KAAK,SAAS,QAAQ,KAAK,KAAK,SAAS,IAAI,KAAK,KAAK,CAAC,MAAM,QAAQ;AACxE,2BAAuB;AACvB;AAAA,EACF;AAEA,QAAM,YAAY,WAAW,KAAK,CAAC,CAAC;AAEpC,MAAI,CAAC,WAAW;AACd,QAAI,IAAI,cAAc,KAAK,CAAC,CAAC,0BAA0B;AACvD,2BAAuB;AACvB,YAAQ,WAAW;AACnB;AAAA,EACF;AAEA,QAAM,UAAU;AAClB;",
4
+ "sourcesContent": ["import { log } from '../../utils/logging.js';\n\nimport { nodeVersionMigration } from './nodeVersion/index.js';\n\nexport const migrations = {\n node20: () =>\n nodeVersionMigration({\n nodeVersion: '20',\n ECMAScriptVersion: 'ES2023',\n packageNodeVersion: '16',\n packageECMAScriptVersion: 'ES2021',\n infraPackages: [],\n }),\n node22: () =>\n nodeVersionMigration({\n nodeVersion: '22',\n ECMAScriptVersion: 'ES2024',\n packageNodeVersion: '18',\n packageECMAScriptVersion: 'ES2022',\n infraPackages: [],\n }),\n node24: () =>\n nodeVersionMigration({\n nodeVersion: '24',\n ECMAScriptVersion: 'ES2024',\n packageNodeVersion: '20',\n packageECMAScriptVersion: 'ES2023',\n infraPackages: [\n {\n name: 'aws-cdk-lib',\n version: '2.224.0',\n },\n {\n name: 'datadog-cdk-constructs-v2',\n version: '3.4.0',\n },\n {\n name: 'osls',\n version: '3.61.0',\n },\n {\n name: 'serverless',\n version: '4.25.0',\n },\n {\n name: 'serverless-plugin-datadog',\n version: '5.114.0',\n },\n {\n name: '@types/node',\n version: '24.10.1',\n },\n ],\n }),\n} satisfies Record<string, () => Promise<void>>;\n\nconst logAvailableMigrations = () => {\n log.ok('Available migrations:');\n Object.keys(migrations).forEach((migration) => {\n log.ok(`- ${migration}`);\n });\n};\n\nexport const migrate = async (args = process.argv.slice(2)) => {\n if (!args[0]) {\n log.err('Provide a migration to run.');\n logAvailableMigrations();\n process.exitCode = 1;\n return;\n }\n\n if (args.includes('--help') || args.includes('-h') || args[0] === 'help') {\n logAvailableMigrations();\n return;\n }\n\n const migration = migrations[args[0] as keyof typeof migrations];\n\n if (!migration) {\n log.err(`Migration \"${args[0]}\" is not a valid option.`);\n logAvailableMigrations();\n process.exitCode = 1;\n return;\n }\n\n await migration();\n};\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,qBAAoB;AAEpB,yBAAqC;AAE9B,MAAM,aAAa;AAAA,EACxB,QAAQ,UACN,yCAAqB;AAAA,IACnB,aAAa;AAAA,IACb,mBAAmB;AAAA,IACnB,oBAAoB;AAAA,IACpB,0BAA0B;AAAA,IAC1B,eAAe,CAAC;AAAA,EAClB,CAAC;AAAA,EACH,QAAQ,UACN,yCAAqB;AAAA,IACnB,aAAa;AAAA,IACb,mBAAmB;AAAA,IACnB,oBAAoB;AAAA,IACpB,0BAA0B;AAAA,IAC1B,eAAe,CAAC;AAAA,EAClB,CAAC;AAAA,EACH,QAAQ,UACN,yCAAqB;AAAA,IACnB,aAAa;AAAA,IACb,mBAAmB;AAAA,IACnB,oBAAoB;AAAA,IACpB,0BAA0B;AAAA,IAC1B,eAAe;AAAA,MACb;AAAA,QACE,MAAM;AAAA,QACN,SAAS;AAAA,MACX;AAAA,MACA;AAAA,QACE,MAAM;AAAA,QACN,SAAS;AAAA,MACX;AAAA,MACA;AAAA,QACE,MAAM;AAAA,QACN,SAAS;AAAA,MACX;AAAA,MACA;AAAA,QACE,MAAM;AAAA,QACN,SAAS;AAAA,MACX;AAAA,MACA;AAAA,QACE,MAAM;AAAA,QACN,SAAS;AAAA,MACX;AAAA,MACA;AAAA,QACE,MAAM;AAAA,QACN,SAAS;AAAA,MACX;AAAA,IACF;AAAA,EACF,CAAC;AACL;AAEA,MAAM,yBAAyB,MAAM;AACnC,qBAAI,GAAG,uBAAuB;AAC9B,SAAO,KAAK,UAAU,EAAE,QAAQ,CAAC,cAAc;AAC7C,uBAAI,GAAG,KAAK,SAAS,EAAE;AAAA,EACzB,CAAC;AACH;AAEO,MAAM,UAAU,OAAO,OAAO,QAAQ,KAAK,MAAM,CAAC,MAAM;AAC7D,MAAI,CAAC,KAAK,CAAC,GAAG;AACZ,uBAAI,IAAI,6BAA6B;AACrC,2BAAuB;AACvB,YAAQ,WAAW;AACnB;AAAA,EACF;AAEA,MAAI,KAAK,SAAS,QAAQ,KAAK,KAAK,SAAS,IAAI,KAAK,KAAK,CAAC,MAAM,QAAQ;AACxE,2BAAuB;AACvB;AAAA,EACF;AAEA,QAAM,YAAY,WAAW,KAAK,CAAC,CAA4B;AAE/D,MAAI,CAAC,WAAW;AACd,uBAAI,IAAI,cAAc,KAAK,CAAC,CAAC,0BAA0B;AACvD,2BAAuB;AACvB,YAAQ,WAAW;AACnB;AAAA,EACF;AAEA,QAAM,UAAU;AAClB;",
6
6
  "names": []
7
7
  }
@@ -1,14 +1 @@
1
- import * as z from 'zod/v4';
2
- export declare const extractFromParentPackageJson: <T extends z.ZodRawShape>(schema: z.ZodObject<T>, currentPath: string) => Promise<{
3
- packageJson: undefined;
4
- packageJsonRelativePath: undefined;
5
- } | {
6
- packageJson: undefined;
7
- packageJsonRelativePath: string;
8
- } | {
9
- packageJson: z.core.$InferObjectOutput<T, {}>;
10
- packageJsonRelativePath: string;
11
- }>;
12
- export declare const isPatchableServerlessVersion: (currentPath: string) => Promise<boolean>;
13
- export declare const isPatchableSkubaType: (currentPath: string) => Promise<boolean>;
14
- export declare const isPatchableNodeVersion: (targetNodeVersion: number, currentPath: string) => Promise<boolean>;
1
+ export declare const isLikelyPackage: (currentPath: string) => Promise<boolean>;