skuba 14.0.0-migrate-to-inquirer-20251031060542 → 14.0.0-replace-global-vars-20251121010036

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 (387) hide show
  1. package/config/eslint.js +1 -1
  2. package/config/prettier.d.ts +8 -4
  3. package/config/prettier.js +10 -2
  4. package/lib/cli/adapter/eslint.js +11 -45
  5. package/lib/cli/adapter/eslint.js.map +3 -3
  6. package/lib/cli/adapter/prettier.js +39 -67
  7. package/lib/cli/adapter/prettier.js.map +2 -2
  8. package/lib/cli/build/args.js +8 -42
  9. package/lib/cli/build/args.js.map +2 -2
  10. package/lib/cli/build/assets.d.ts +3 -2
  11. package/lib/cli/build/assets.js +28 -60
  12. package/lib/cli/build/assets.js.map +3 -3
  13. package/lib/cli/build/esbuild.js +21 -45
  14. package/lib/cli/build/esbuild.js.map +2 -2
  15. package/lib/cli/build/index.js +21 -55
  16. package/lib/cli/build/index.js.map +3 -3
  17. package/lib/cli/build/tsc.js +23 -61
  18. package/lib/cli/build/tsc.js.map +3 -3
  19. package/lib/cli/buildPackage/index.js +8 -32
  20. package/lib/cli/buildPackage/index.js.map +1 -1
  21. package/lib/cli/configure/analyseConfiguration.js +16 -50
  22. package/lib/cli/configure/analyseConfiguration.js.map +2 -2
  23. package/lib/cli/configure/analyseDependencies.d.ts +1 -1
  24. package/lib/cli/configure/analyseDependencies.js +25 -59
  25. package/lib/cli/configure/analyseDependencies.js.map +3 -3
  26. package/lib/cli/configure/analysis/diff.js +5 -39
  27. package/lib/cli/configure/analysis/diff.js.map +3 -3
  28. package/lib/cli/configure/analysis/files.js +8 -42
  29. package/lib/cli/configure/analysis/files.js.map +2 -2
  30. package/lib/cli/configure/analysis/git.js +12 -46
  31. package/lib/cli/configure/analysis/git.js.map +2 -2
  32. package/lib/cli/configure/analysis/package.d.ts +2 -3
  33. package/lib/cli/configure/analysis/package.js +10 -45
  34. package/lib/cli/configure/analysis/package.js.map +3 -3
  35. package/lib/cli/configure/analysis/project.js +18 -50
  36. package/lib/cli/configure/analysis/project.js.map +2 -2
  37. package/lib/cli/configure/dependencies/index.js +7 -35
  38. package/lib/cli/configure/dependencies/index.js.map +1 -1
  39. package/lib/cli/configure/dependencies/seekDatadogCustomMetrics.js +4 -28
  40. package/lib/cli/configure/dependencies/seekDatadogCustomMetrics.js.map +1 -1
  41. package/lib/cli/configure/dependencies/seekKoala.js +4 -28
  42. package/lib/cli/configure/dependencies/seekKoala.js.map +1 -1
  43. package/lib/cli/configure/dependencies/skuba.js +4 -28
  44. package/lib/cli/configure/dependencies/skuba.js.map +1 -1
  45. package/lib/cli/configure/dependencies/skubaDeps.js +2 -26
  46. package/lib/cli/configure/dependencies/skubaDeps.js.map +1 -1
  47. package/lib/cli/configure/dependencies/skubaDive.js +4 -29
  48. package/lib/cli/configure/dependencies/skubaDive.js.map +1 -1
  49. package/lib/cli/configure/ensureTemplateCompletion.d.ts +1 -1
  50. package/lib/cli/configure/ensureTemplateCompletion.js +35 -60
  51. package/lib/cli/configure/ensureTemplateCompletion.js.map +3 -3
  52. package/lib/cli/configure/getEntryPoint.d.ts +1 -1
  53. package/lib/cli/configure/getEntryPoint.js +14 -48
  54. package/lib/cli/configure/getEntryPoint.js.map +3 -3
  55. package/lib/cli/configure/getProjectType.d.ts +1 -1
  56. package/lib/cli/configure/getProjectType.js +14 -35
  57. package/lib/cli/configure/getProjectType.js.map +2 -2
  58. package/lib/cli/configure/index.js +50 -84
  59. package/lib/cli/configure/index.js.map +3 -3
  60. package/lib/cli/configure/modules/eslint.js +10 -34
  61. package/lib/cli/configure/modules/eslint.js.map +1 -1
  62. package/lib/cli/configure/modules/ignore.js +8 -32
  63. package/lib/cli/configure/modules/ignore.js.map +1 -1
  64. package/lib/cli/configure/modules/index.js +18 -44
  65. package/lib/cli/configure/modules/index.js.map +2 -2
  66. package/lib/cli/configure/modules/nodemon.js +4 -28
  67. package/lib/cli/configure/modules/nodemon.js.map +1 -1
  68. package/lib/cli/configure/modules/package.js +10 -34
  69. package/lib/cli/configure/modules/package.js.map +1 -1
  70. package/lib/cli/configure/modules/prettier.js +11 -35
  71. package/lib/cli/configure/modules/prettier.js.map +1 -1
  72. package/lib/cli/configure/modules/renovate.js +17 -40
  73. package/lib/cli/configure/modules/renovate.js.map +2 -2
  74. package/lib/cli/configure/modules/serverless.js +2 -26
  75. package/lib/cli/configure/modules/serverless.js.map +1 -1
  76. package/lib/cli/configure/modules/tslint.js +4 -28
  77. package/lib/cli/configure/modules/tslint.js.map +1 -1
  78. package/lib/cli/configure/processing/configFile.js +3 -39
  79. package/lib/cli/configure/processing/configFile.js.map +1 -1
  80. package/lib/cli/configure/processing/deleteFiles.js +2 -26
  81. package/lib/cli/configure/processing/deleteFiles.js.map +1 -1
  82. package/lib/cli/configure/processing/javascript.js +2 -27
  83. package/lib/cli/configure/processing/javascript.js.map +1 -1
  84. package/lib/cli/configure/processing/json.js +6 -31
  85. package/lib/cli/configure/processing/json.js.map +1 -1
  86. package/lib/cli/configure/processing/loadFiles.js +2 -26
  87. package/lib/cli/configure/processing/loadFiles.js.map +1 -1
  88. package/lib/cli/configure/processing/module.js +4 -28
  89. package/lib/cli/configure/processing/module.js.map +1 -1
  90. package/lib/cli/configure/processing/package.d.ts +1 -67
  91. package/lib/cli/configure/processing/package.js +8 -45
  92. package/lib/cli/configure/processing/package.js.map +3 -3
  93. package/lib/cli/configure/processing/prettier.js +4 -38
  94. package/lib/cli/configure/processing/prettier.js.map +2 -2
  95. package/lib/cli/configure/processing/record.js +5 -41
  96. package/lib/cli/configure/processing/record.js.map +2 -2
  97. package/lib/cli/configure/processing/typescript.js +26 -63
  98. package/lib/cli/configure/processing/typescript.js.map +2 -2
  99. package/lib/cli/configure/types.d.ts +15 -4
  100. package/lib/cli/configure/types.js +0 -16
  101. package/lib/cli/configure/types.js.map +3 -3
  102. package/lib/cli/format/index.js +20 -54
  103. package/lib/cli/format/index.js.map +3 -3
  104. package/lib/cli/help/index.js +6 -30
  105. package/lib/cli/help/index.js.map +1 -1
  106. package/lib/cli/init/getConfig.d.ts +1 -1
  107. package/lib/cli/init/getConfig.js +76 -104
  108. package/lib/cli/init/getConfig.js.map +3 -3
  109. package/lib/cli/init/git.js +16 -51
  110. package/lib/cli/init/git.js.map +2 -2
  111. package/lib/cli/init/index.js +67 -98
  112. package/lib/cli/init/index.js.map +2 -2
  113. package/lib/cli/init/prompts.js +21 -42
  114. package/lib/cli/init/prompts.js.map +1 -1
  115. package/lib/cli/init/types.js +7 -41
  116. package/lib/cli/init/types.js.map +1 -1
  117. package/lib/cli/init/validation.js +2 -30
  118. package/lib/cli/init/validation.js.map +1 -1
  119. package/lib/cli/init/writePackageJson.js +8 -42
  120. package/lib/cli/init/writePackageJson.js.map +2 -2
  121. package/lib/cli/lint/annotate/buildkite/eslint.js +3 -37
  122. package/lib/cli/lint/annotate/buildkite/eslint.js.map +1 -1
  123. package/lib/cli/lint/annotate/buildkite/index.js +11 -45
  124. package/lib/cli/lint/annotate/buildkite/index.js.map +1 -1
  125. package/lib/cli/lint/annotate/buildkite/internal.js +3 -37
  126. package/lib/cli/lint/annotate/buildkite/internal.js.map +1 -1
  127. package/lib/cli/lint/annotate/buildkite/prettier.js +3 -37
  128. package/lib/cli/lint/annotate/buildkite/prettier.js.map +1 -1
  129. package/lib/cli/lint/annotate/buildkite/tsc.js +3 -37
  130. package/lib/cli/lint/annotate/buildkite/tsc.js.map +1 -1
  131. package/lib/cli/lint/annotate/github/eslint.js +2 -26
  132. package/lib/cli/lint/annotate/github/eslint.js.map +1 -1
  133. package/lib/cli/lint/annotate/github/index.js +11 -45
  134. package/lib/cli/lint/annotate/github/index.js.map +1 -1
  135. package/lib/cli/lint/annotate/github/internal.js +2 -26
  136. package/lib/cli/lint/annotate/github/internal.js.map +1 -1
  137. package/lib/cli/lint/annotate/github/prettier.js +2 -26
  138. package/lib/cli/lint/annotate/github/prettier.js.map +1 -1
  139. package/lib/cli/lint/annotate/github/tsc.js +4 -28
  140. package/lib/cli/lint/annotate/github/tsc.js.map +2 -2
  141. package/lib/cli/lint/annotate/index.js +6 -30
  142. package/lib/cli/lint/annotate/index.js.map +1 -1
  143. package/lib/cli/lint/autofix.js +37 -73
  144. package/lib/cli/lint/autofix.js.map +1 -1
  145. package/lib/cli/lint/eslint.js +16 -51
  146. package/lib/cli/lint/eslint.js.map +3 -3
  147. package/lib/cli/lint/external.js +19 -51
  148. package/lib/cli/lint/external.js.map +2 -2
  149. package/lib/cli/lint/index.js +26 -52
  150. package/lib/cli/lint/index.js.map +2 -2
  151. package/lib/cli/lint/internal.js +20 -52
  152. package/lib/cli/lint/internal.js.map +3 -3
  153. package/lib/cli/lint/internalLints/detectBadCodeowners.js +8 -33
  154. package/lib/cli/lint/internalLints/detectBadCodeowners.js.map +1 -1
  155. package/lib/cli/lint/internalLints/noSkubaTemplateJs.js +12 -48
  156. package/lib/cli/lint/internalLints/noSkubaTemplateJs.js.map +3 -3
  157. package/lib/cli/lint/internalLints/patchRenovateConfig.js +21 -55
  158. package/lib/cli/lint/internalLints/patchRenovateConfig.js.map +2 -2
  159. package/lib/cli/lint/internalLints/refreshConfigFiles.js +33 -66
  160. package/lib/cli/lint/internalLints/refreshConfigFiles.js.map +3 -3
  161. package/lib/cli/lint/internalLints/upgrade/index.d.ts +1 -1
  162. package/lib/cli/lint/internalLints/upgrade/index.js +23 -56
  163. package/lib/cli/lint/internalLints/upgrade/index.js.map +3 -3
  164. package/lib/cli/lint/internalLints/upgrade/patches/10.0.4/index.js +4 -28
  165. package/lib/cli/lint/internalLints/upgrade/patches/10.0.4/index.js.map +1 -1
  166. package/lib/cli/lint/internalLints/upgrade/patches/10.0.4/removeYarnIgnoreOptionalFlags.js +11 -45
  167. package/lib/cli/lint/internalLints/upgrade/patches/10.0.4/removeYarnIgnoreOptionalFlags.js.map +2 -2
  168. package/lib/cli/lint/internalLints/upgrade/patches/10.1.0/index.js +6 -30
  169. package/lib/cli/lint/internalLints/upgrade/patches/10.1.0/index.js.map +1 -1
  170. package/lib/cli/lint/internalLints/upgrade/patches/10.1.0/migrateNpmrcToPnpmWorkspace.js +37 -65
  171. package/lib/cli/lint/internalLints/upgrade/patches/10.1.0/migrateNpmrcToPnpmWorkspace.js.map +3 -3
  172. package/lib/cli/lint/internalLints/upgrade/patches/10.1.0/stopBundlingInCDKTests.js +11 -46
  173. package/lib/cli/lint/internalLints/upgrade/patches/10.1.0/stopBundlingInCDKTests.js.map +2 -2
  174. package/lib/cli/lint/internalLints/upgrade/patches/12.0.2/index.js +4 -28
  175. package/lib/cli/lint/internalLints/upgrade/patches/12.0.2/index.js.map +1 -1
  176. package/lib/cli/lint/internalLints/upgrade/patches/12.0.2/unhandledRejections.js +23 -59
  177. package/lib/cli/lint/internalLints/upgrade/patches/12.0.2/unhandledRejections.js.map +2 -2
  178. package/lib/cli/lint/internalLints/upgrade/patches/12.1.1/index.js +4 -28
  179. package/lib/cli/lint/internalLints/upgrade/patches/12.1.1/index.js.map +1 -1
  180. package/lib/cli/lint/internalLints/upgrade/patches/12.1.1/patchJestSnapshots.js +11 -46
  181. package/lib/cli/lint/internalLints/upgrade/patches/12.1.1/patchJestSnapshots.js.map +2 -2
  182. package/lib/cli/lint/internalLints/upgrade/patches/12.3.0/index.js +6 -30
  183. package/lib/cli/lint/internalLints/upgrade/patches/12.3.0/index.js.map +1 -1
  184. package/lib/cli/lint/internalLints/upgrade/patches/12.3.0/patchApiTokenFromEnvironment.js +11 -46
  185. package/lib/cli/lint/internalLints/upgrade/patches/12.3.0/patchApiTokenFromEnvironment.js.map +2 -2
  186. package/lib/cli/lint/internalLints/upgrade/patches/12.3.0/patchDockerfileSyntaxDirective.js +11 -46
  187. package/lib/cli/lint/internalLints/upgrade/patches/12.3.0/patchDockerfileSyntaxDirective.js.map +2 -2
  188. package/lib/cli/lint/internalLints/upgrade/patches/12.4.0/index.js +4 -28
  189. package/lib/cli/lint/internalLints/upgrade/patches/12.4.0/index.js.map +1 -1
  190. package/lib/cli/lint/internalLints/upgrade/patches/12.4.0/patchDockerfileCIVariable.js +11 -46
  191. package/lib/cli/lint/internalLints/upgrade/patches/12.4.0/patchDockerfileCIVariable.js.map +2 -2
  192. package/lib/cli/lint/internalLints/upgrade/patches/12.4.1/configureTsConfigForESM.js +29 -67
  193. package/lib/cli/lint/internalLints/upgrade/patches/12.4.1/configureTsConfigForESM.js.map +2 -2
  194. package/lib/cli/lint/internalLints/upgrade/patches/12.4.1/index.js +10 -34
  195. package/lib/cli/lint/internalLints/upgrade/patches/12.4.1/index.js.map +1 -1
  196. package/lib/cli/lint/internalLints/upgrade/patches/12.4.1/patchApiDockerfiles.js +11 -45
  197. package/lib/cli/lint/internalLints/upgrade/patches/12.4.1/patchApiDockerfiles.js.map +2 -2
  198. package/lib/cli/lint/internalLints/upgrade/patches/12.4.1/rewriteSrcImports.d.ts +4 -0
  199. package/lib/cli/lint/internalLints/upgrade/patches/12.4.1/rewriteSrcImports.js +18 -63
  200. package/lib/cli/lint/internalLints/upgrade/patches/12.4.1/rewriteSrcImports.js.map +3 -3
  201. package/lib/cli/lint/internalLints/upgrade/patches/12.4.1/updateLambdaConfigs.js +15 -50
  202. package/lib/cli/lint/internalLints/upgrade/patches/12.4.1/updateLambdaConfigs.js.map +2 -2
  203. package/lib/cli/lint/internalLints/upgrade/patches/12.5.0/addTypeModuleToPackageJson.d.ts +6 -0
  204. package/lib/cli/lint/internalLints/upgrade/patches/12.5.0/addTypeModuleToPackageJson.js +86 -0
  205. package/lib/cli/lint/internalLints/upgrade/patches/12.5.0/addTypeModuleToPackageJson.js.map +7 -0
  206. package/lib/cli/lint/internalLints/upgrade/patches/12.5.0/index.d.ts +2 -0
  207. package/lib/cli/lint/internalLints/upgrade/patches/12.5.0/index.js +16 -0
  208. package/lib/cli/lint/internalLints/upgrade/patches/12.5.0/index.js.map +7 -0
  209. package/lib/cli/lint/internalLints/upgrade/patches/12.5.0/rewriteGlobalVars.d.ts +7 -0
  210. package/lib/cli/lint/internalLints/upgrade/patches/12.5.0/rewriteGlobalVars.js +76 -0
  211. package/lib/cli/lint/internalLints/upgrade/patches/12.5.0/rewriteGlobalVars.js.map +7 -0
  212. package/lib/cli/lint/internalLints/upgrade/patches/7.3.1/addEmptyExports.js +17 -51
  213. package/lib/cli/lint/internalLints/upgrade/patches/7.3.1/addEmptyExports.js.map +2 -2
  214. package/lib/cli/lint/internalLints/upgrade/patches/7.3.1/index.js +10 -34
  215. package/lib/cli/lint/internalLints/upgrade/patches/7.3.1/index.js.map +1 -1
  216. package/lib/cli/lint/internalLints/upgrade/patches/7.3.1/patchDockerfile.js +10 -44
  217. package/lib/cli/lint/internalLints/upgrade/patches/7.3.1/patchDockerfile.js.map +2 -2
  218. package/lib/cli/lint/internalLints/upgrade/patches/7.3.1/patchServerListener.js +12 -46
  219. package/lib/cli/lint/internalLints/upgrade/patches/7.3.1/patchServerListener.js.map +2 -2
  220. package/lib/cli/lint/internalLints/upgrade/patches/8.0.0/index.js +4 -28
  221. package/lib/cli/lint/internalLints/upgrade/patches/8.0.0/index.js.map +1 -1
  222. package/lib/cli/lint/internalLints/upgrade/patches/8.0.0/patchPnpmPackageManager.js +15 -49
  223. package/lib/cli/lint/internalLints/upgrade/patches/8.0.0/patchPnpmPackageManager.js.map +2 -2
  224. package/lib/cli/lint/internalLints/upgrade/patches/8.2.1/collapseDuplicateMergeKeys.js +11 -45
  225. package/lib/cli/lint/internalLints/upgrade/patches/8.2.1/collapseDuplicateMergeKeys.js.map +2 -2
  226. package/lib/cli/lint/internalLints/upgrade/patches/8.2.1/index.js +10 -39
  227. package/lib/cli/lint/internalLints/upgrade/patches/8.2.1/index.js.map +2 -2
  228. package/lib/cli/lint/internalLints/upgrade/patches/8.2.1/moveNpmrcMounts.js +11 -45
  229. package/lib/cli/lint/internalLints/upgrade/patches/8.2.1/moveNpmrcMounts.js.map +2 -2
  230. package/lib/cli/lint/internalLints/upgrade/patches/8.2.1/patchDockerCompose.js +11 -45
  231. package/lib/cli/lint/internalLints/upgrade/patches/8.2.1/patchDockerCompose.js.map +2 -2
  232. package/lib/cli/lint/internalLints/upgrade/patches/8.2.1/patchDockerImages.js +13 -47
  233. package/lib/cli/lint/internalLints/upgrade/patches/8.2.1/patchDockerImages.js.map +2 -2
  234. package/lib/cli/lint/internalLints/upgrade/patches/9.0.1/index.js +4 -28
  235. package/lib/cli/lint/internalLints/upgrade/patches/9.0.1/index.js.map +1 -1
  236. package/lib/cli/lint/internalLints/upgrade/patches/9.0.1/patchPnpmDockerImages.js +11 -45
  237. package/lib/cli/lint/internalLints/upgrade/patches/9.0.1/patchPnpmDockerImages.js.map +2 -2
  238. package/lib/cli/lint/internalLints/upgrade/patches/9.1.0/index.js +4 -28
  239. package/lib/cli/lint/internalLints/upgrade/patches/9.1.0/index.js.map +1 -1
  240. package/lib/cli/lint/internalLints/upgrade/patches/9.1.0/upgradeNode.js +8 -32
  241. package/lib/cli/lint/internalLints/upgrade/patches/9.1.0/upgradeNode.js.map +1 -1
  242. package/lib/cli/lint/prettier.js +15 -50
  243. package/lib/cli/lint/prettier.js.map +3 -3
  244. package/lib/cli/lint/tsc.js +4 -28
  245. package/lib/cli/lint/tsc.js.map +1 -1
  246. package/lib/cli/lint/types.js +0 -16
  247. package/lib/cli/lint/types.js.map +3 -3
  248. package/lib/cli/migrate/index.js +10 -34
  249. package/lib/cli/migrate/index.js.map +1 -1
  250. package/lib/cli/migrate/nodeVersion/checks.js +24 -61
  251. package/lib/cli/migrate/nodeVersion/checks.js.map +2 -2
  252. package/lib/cli/migrate/nodeVersion/index.js +25 -55
  253. package/lib/cli/migrate/nodeVersion/index.js.map +2 -2
  254. package/lib/cli/node/index.js +20 -57
  255. package/lib/cli/node/index.js.map +3 -3
  256. package/lib/cli/release/index.js +4 -28
  257. package/lib/cli/release/index.js.map +1 -1
  258. package/lib/cli/start/index.js +16 -50
  259. package/lib/cli/start/index.js.map +3 -3
  260. package/lib/cli/test/index.js +4 -44
  261. package/lib/cli/test/index.js.map +2 -2
  262. package/lib/cli/version/index.js +6 -30
  263. package/lib/cli/version/index.js.map +1 -1
  264. package/lib/eslint.d.js +0 -1
  265. package/lib/index.d.ts +0 -1
  266. package/lib/index.js +6 -46
  267. package/lib/index.js.map +2 -2
  268. package/lib/skuba.js +26 -45
  269. package/lib/skuba.js.map +3 -3
  270. package/lib/utils/args.js +6 -43
  271. package/lib/utils/args.js.map +2 -2
  272. package/lib/utils/command.js +4 -42
  273. package/lib/utils/command.js.map +3 -3
  274. package/lib/utils/copy.js +20 -57
  275. package/lib/utils/copy.js.map +2 -2
  276. package/lib/utils/dir.js +32 -72
  277. package/lib/utils/dir.js.map +2 -2
  278. package/lib/utils/env.js +2 -26
  279. package/lib/utils/env.js.map +1 -1
  280. package/lib/utils/error.js +10 -47
  281. package/lib/utils/error.js.map +1 -1
  282. package/lib/utils/exec.d.ts +3 -2
  283. package/lib/utils/exec.js +24 -62
  284. package/lib/utils/exec.js.map +3 -3
  285. package/lib/utils/fs.js +6 -40
  286. package/lib/utils/fs.js.map +3 -3
  287. package/lib/utils/help.js +6 -30
  288. package/lib/utils/help.js.map +1 -1
  289. package/lib/utils/logging.d.ts +9 -10
  290. package/lib/utils/logging.js +11 -48
  291. package/lib/utils/logging.js.map +3 -3
  292. package/lib/utils/logo.js +28 -59
  293. package/lib/utils/logo.js.map +3 -3
  294. package/lib/utils/manifest.d.ts +3 -2
  295. package/lib/utils/manifest.js +8 -48
  296. package/lib/utils/manifest.js.map +3 -3
  297. package/lib/utils/npmrc.js +2 -26
  298. package/lib/utils/npmrc.js.map +1 -1
  299. package/lib/utils/packageManager.js +12 -49
  300. package/lib/utils/packageManager.js.map +2 -2
  301. package/lib/utils/port.js +4 -39
  302. package/lib/utils/port.js.map +2 -2
  303. package/lib/utils/sleep.js +2 -26
  304. package/lib/utils/sleep.js.map +1 -1
  305. package/lib/utils/template.js +18 -55
  306. package/lib/utils/template.js.map +3 -3
  307. package/lib/utils/validation.js +2 -31
  308. package/lib/utils/validation.js.map +1 -1
  309. package/lib/utils/version.js +9 -46
  310. package/lib/utils/version.js.map +2 -2
  311. package/lib/utils/wait.js +7 -32
  312. package/lib/utils/wait.js.map +1 -1
  313. package/lib/utils/worker.d.ts +3 -3
  314. package/lib/utils/worker.js +10 -35
  315. package/lib/utils/worker.js.map +1 -1
  316. package/lib/wrapper/function-arguments.d.js +0 -1
  317. package/lib/wrapper/functionHandler.js +18 -49
  318. package/lib/wrapper/functionHandler.js.map +2 -2
  319. package/lib/wrapper/http.d.ts +0 -6
  320. package/lib/wrapper/http.js +8 -51
  321. package/lib/wrapper/http.js.map +3 -3
  322. package/lib/wrapper/index.js +6 -7
  323. package/lib/wrapper/index.js.map +1 -1
  324. package/lib/wrapper/main.js +8 -42
  325. package/lib/wrapper/main.js.map +3 -3
  326. package/lib/wrapper/requestListener.js +13 -46
  327. package/lib/wrapper/requestListener.js.map +3 -3
  328. package/lib/wrapper/server.d.ts +7 -0
  329. package/lib/wrapper/server.js +11 -0
  330. package/lib/wrapper/server.js.map +7 -0
  331. package/package.json +17 -24
  332. package/template/base/_.prettierrc.js +1 -1
  333. package/template/base/_eslint.config.js +1 -1
  334. package/template/base/_pnpm-workspace.yaml +3 -2
  335. package/template/base/vitest.config.ts +25 -0
  336. package/template/express-rest-api/package.json +2 -1
  337. package/template/express-rest-api/skuba.template.js +1 -1
  338. package/template/express-rest-api/src/app.test.ts +1 -0
  339. package/template/greeter/package.json +4 -3
  340. package/template/greeter/skuba.template.js +1 -1
  341. package/template/greeter/src/app.test.ts +3 -1
  342. package/template/koa-rest-api/package.json +2 -1
  343. package/template/koa-rest-api/skuba.template.js +1 -1
  344. package/template/koa-rest-api/src/api/jobs/getJobs.test.ts +2 -0
  345. package/template/koa-rest-api/src/api/jobs/postJob.test.ts +2 -0
  346. package/template/koa-rest-api/src/app.test.ts +2 -0
  347. package/template/koa-rest-api/src/framework/server.test.ts +2 -2
  348. package/template/koa-rest-api/src/framework/validation.test.ts +2 -0
  349. package/template/koa-rest-api/src/testing/metrics.ts +2 -0
  350. package/template/lambda-sqs-worker-cdk/infra/__snapshots__/appStack.test.ts.snap +15 -5
  351. package/template/lambda-sqs-worker-cdk/infra/appStack.test.ts +11 -9
  352. package/template/lambda-sqs-worker-cdk/package.json +6 -5
  353. package/template/lambda-sqs-worker-cdk/skuba.template.js +1 -1
  354. package/template/lambda-sqs-worker-cdk/src/app.test.ts +22 -13
  355. package/template/lambda-sqs-worker-cdk/src/framework/handler.test.ts +1 -0
  356. package/template/lambda-sqs-worker-cdk/src/framework/validation.test.ts +33 -31
  357. package/template/lambda-sqs-worker-cdk/src/services/jobScorer.test.ts +8 -2
  358. package/template/lambda-sqs-worker-cdk/src/services/pipelineEventSender.test.ts +3 -2
  359. package/template/lambda-sqs-worker-cdk/src/testing/services.ts +4 -3
  360. package/template/oss-npm-package/_package.json +1 -0
  361. package/template/oss-npm-package/skuba.template.js +1 -1
  362. package/template/oss-npm-package/src/index.test.ts +2 -0
  363. package/template/private-npm-package/_package.json +1 -0
  364. package/template/private-npm-package/skuba.template.js +1 -1
  365. package/template/private-npm-package/src/index.test.ts +2 -0
  366. package/config/jest.js +0 -1
  367. package/jest/moduleNameMapper.js +0 -64
  368. package/jest/transform.js +0 -62
  369. package/jest/tsConfig.js +0 -26
  370. package/jest-preset.js +0 -37
  371. package/lib/api/jest/index.d.ts +0 -15
  372. package/lib/api/jest/index.js +0 -59
  373. package/lib/api/jest/index.js.map +0 -7
  374. package/lib/cli/configure/modules/jest.d.ts +0 -2
  375. package/lib/cli/configure/modules/jest.js +0 -86
  376. package/lib/cli/configure/modules/jest.js.map +0 -7
  377. package/lib/cli/lint/internalLints/upgrade/patches/8.2.1/upgradeESLint.d.ts +0 -2
  378. package/lib/cli/lint/internalLints/upgrade/patches/8.2.1/upgradeESLint.js +0 -144
  379. package/lib/cli/lint/internalLints/upgrade/patches/8.2.1/upgradeESLint.js.map +0 -7
  380. package/lib/cli/test/reporters/github/annotations.d.ts +0 -9
  381. package/lib/cli/test/reporters/github/annotations.js +0 -102
  382. package/lib/cli/test/reporters/github/annotations.js.map +0 -7
  383. package/lib/cli/test/reporters/github/index.d.ts +0 -5
  384. package/lib/cli/test/reporters/github/index.js +0 -74
  385. package/lib/cli/test/reporters/github/index.js.map +0 -7
  386. package/template/base/jest.config.ts +0 -19
  387. package/template/base/jest.setup.ts +0 -3
@@ -1,34 +1,11 @@
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 eslint_exports = {};
20
- __export(eslint_exports, {
21
- eslintModule: () => eslintModule
22
- });
23
- module.exports = __toCommonJS(eslint_exports);
24
- var import_template = require("../../../utils/template.js");
25
- var import_deleteFiles = require("../processing/deleteFiles.js");
26
- var import_package = require("../processing/package.js");
27
- var import_prettier = require("../processing/prettier.js");
1
+ import { readBaseTemplateFile } from "../../../utils/template.js";
2
+ import { deleteFiles } from "../processing/deleteFiles.js";
3
+ import { withPackage } from "../processing/package.js";
4
+ import { formatPrettier } from "../processing/prettier.js";
28
5
  const eslintModule = async () => {
29
- const configFile = await (0, import_template.readBaseTemplateFile)("_eslint.config.js");
6
+ const configFile = await readBaseTemplateFile("_eslint.config.js");
30
7
  return {
31
- ...(0, import_deleteFiles.deleteFiles)(
8
+ ...deleteFiles(
32
9
  ".eslintrc.cjs",
33
10
  ".eslintrc.yaml",
34
11
  ".eslintrc.yml",
@@ -43,15 +20,14 @@ const eslintModule = async () => {
43
20
  /require.resolve\(['"](@seek\/)?skuba\/config\/eslint['"]\)/,
44
21
  "'skuba'"
45
22
  );
46
- return (0, import_prettier.formatPrettier)(processedFile, { parser: "typescript" });
23
+ return formatPrettier(processedFile, { parser: "typescript" });
47
24
  }
48
25
  return configFile;
49
26
  },
50
- "package.json": (0, import_package.withPackage)(({ eslintConfig, ...data }) => data)
27
+ "package.json": withPackage(({ eslintConfig, ...data }) => data)
51
28
  };
52
29
  };
53
- // Annotate the CommonJS export names for ESM import in node:
54
- 0 && (module.exports = {
30
+ export {
55
31
  eslintModule
56
- });
32
+ };
57
33
  //# sourceMappingURL=eslint.js.map
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/cli/configure/modules/eslint.ts"],
4
4
  "sourcesContent": ["import { readBaseTemplateFile } from '../../../utils/template.js';\nimport { deleteFiles } from '../processing/deleteFiles.js';\nimport { withPackage } from '../processing/package.js';\nimport { formatPrettier } from '../processing/prettier.js';\nimport type { Module } from '../types.js';\n\nexport const eslintModule = async (): Promise<Module> => {\n const configFile = await readBaseTemplateFile('_eslint.config.js');\n\n return {\n ...deleteFiles(\n '.eslintrc.cjs',\n '.eslintrc.yaml',\n '.eslintrc.yml',\n '.eslintrc.json',\n '.eslintrc',\n '.eslintignore',\n ),\n\n // allow customised ESLint configs that extend skuba\n 'eslint.config.js': (inputFile) => {\n if (inputFile?.includes('skuba')) {\n const processedFile = inputFile.replace(\n /require.resolve\\(['\"](@seek\\/)?skuba\\/config\\/eslint['\"]\\)/,\n \"'skuba'\",\n );\n\n return formatPrettier(processedFile, { parser: 'typescript' });\n }\n\n return configFile;\n },\n\n 'package.json': withPackage(({ eslintConfig, ...data }) => data),\n };\n};\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,sBAAqC;AACrC,yBAA4B;AAC5B,qBAA4B;AAC5B,sBAA+B;AAGxB,MAAM,eAAe,YAA6B;AACvD,QAAM,aAAa,UAAM,sCAAqB,mBAAmB;AAEjE,SAAO;AAAA,IACL,OAAG;AAAA,MACD;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACF;AAAA;AAAA,IAGA,oBAAoB,CAAC,cAAc;AACjC,UAAI,WAAW,SAAS,OAAO,GAAG;AAChC,cAAM,gBAAgB,UAAU;AAAA,UAC9B;AAAA,UACA;AAAA,QACF;AAEA,mBAAO,gCAAe,eAAe,EAAE,QAAQ,aAAa,CAAC;AAAA,MAC/D;AAEA,aAAO;AAAA,IACT;AAAA,IAEA,oBAAgB,4BAAY,CAAC,EAAE,cAAc,GAAG,KAAK,MAAM,IAAI;AAAA,EACjE;AACF;",
5
+ "mappings": "AAAA,SAAS,4BAA4B;AACrC,SAAS,mBAAmB;AAC5B,SAAS,mBAAmB;AAC5B,SAAS,sBAAsB;AAGxB,MAAM,eAAe,YAA6B;AACvD,QAAM,aAAa,MAAM,qBAAqB,mBAAmB;AAEjE,SAAO;AAAA,IACL,GAAG;AAAA,MACD;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACF;AAAA;AAAA,IAGA,oBAAoB,CAAC,cAAc;AACjC,UAAI,WAAW,SAAS,OAAO,GAAG;AAChC,cAAM,gBAAgB,UAAU;AAAA,UAC9B;AAAA,UACA;AAAA,QACF;AAEA,eAAO,eAAe,eAAe,EAAE,QAAQ,aAAa,CAAC;AAAA,MAC/D;AAEA,aAAO;AAAA,IACT;AAAA,IAEA,gBAAgB,YAAY,CAAC,EAAE,cAAc,GAAG,KAAK,MAAM,IAAI;AAAA,EACjE;AACF;",
6
6
  "names": []
7
7
  }
@@ -1,40 +1,16 @@
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 ignore_exports = {};
20
- __export(ignore_exports, {
21
- ignoreModule: () => ignoreModule
22
- });
23
- module.exports = __toCommonJS(ignore_exports);
24
- var import_template = require("../../../utils/template.js");
25
- var import_configFile = require("../processing/configFile.js");
1
+ import { readBaseTemplateFile } from "../../../utils/template.js";
2
+ import { mergeWithConfigFile } from "../processing/configFile.js";
26
3
  const ignoreModule = async () => {
27
4
  const [dockerFile, gitFile] = await Promise.all([
28
- (0, import_template.readBaseTemplateFile)("_.dockerignore"),
29
- (0, import_template.readBaseTemplateFile)("_.gitignore")
5
+ readBaseTemplateFile("_.dockerignore"),
6
+ readBaseTemplateFile("_.gitignore")
30
7
  ]);
31
8
  return {
32
- ".dockerignore": (0, import_configFile.mergeWithConfigFile)(dockerFile),
33
- ".gitignore": (0, import_configFile.mergeWithConfigFile)(gitFile)
9
+ ".dockerignore": mergeWithConfigFile(dockerFile),
10
+ ".gitignore": mergeWithConfigFile(gitFile)
34
11
  };
35
12
  };
36
- // Annotate the CommonJS export names for ESM import in node:
37
- 0 && (module.exports = {
13
+ export {
38
14
  ignoreModule
39
- });
15
+ };
40
16
  //# sourceMappingURL=ignore.js.map
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/cli/configure/modules/ignore.ts"],
4
4
  "sourcesContent": ["import { readBaseTemplateFile } from '../../../utils/template.js';\nimport { mergeWithConfigFile } from '../processing/configFile.js';\nimport type { Module } from '../types.js';\n\nexport const ignoreModule = async (): Promise<Module> => {\n const [dockerFile, gitFile] = await Promise.all([\n readBaseTemplateFile('_.dockerignore'),\n readBaseTemplateFile('_.gitignore'),\n ]);\n\n return {\n '.dockerignore': mergeWithConfigFile(dockerFile),\n\n '.gitignore': mergeWithConfigFile(gitFile),\n };\n};\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,sBAAqC;AACrC,wBAAoC;AAG7B,MAAM,eAAe,YAA6B;AACvD,QAAM,CAAC,YAAY,OAAO,IAAI,MAAM,QAAQ,IAAI;AAAA,QAC9C,sCAAqB,gBAAgB;AAAA,QACrC,sCAAqB,aAAa;AAAA,EACpC,CAAC;AAED,SAAO;AAAA,IACL,qBAAiB,uCAAoB,UAAU;AAAA,IAE/C,kBAAc,uCAAoB,OAAO;AAAA,EAC3C;AACF;",
5
+ "mappings": "AAAA,SAAS,4BAA4B;AACrC,SAAS,2BAA2B;AAG7B,MAAM,eAAe,YAA6B;AACvD,QAAM,CAAC,YAAY,OAAO,IAAI,MAAM,QAAQ,IAAI;AAAA,IAC9C,qBAAqB,gBAAgB;AAAA,IACrC,qBAAqB,aAAa;AAAA,EACpC,CAAC;AAED,SAAO;AAAA,IACL,iBAAiB,oBAAoB,UAAU;AAAA,IAE/C,cAAc,oBAAoB,OAAO;AAAA,EAC3C;AACF;",
6
6
  "names": []
7
7
  }
@@ -1,50 +1,24 @@
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 modules_exports = {};
20
- __export(modules_exports, {
21
- loadModules: () => loadModules
22
- });
23
- module.exports = __toCommonJS(modules_exports);
24
- var import_eslint = require("./eslint.js");
25
- var import_ignore = require("./ignore.js");
26
- var import_jest = require("./jest.js");
27
- var import_nodemon = require("./nodemon.js");
28
- var import_package = require("./package.js");
29
- var import_prettier = require("./prettier.js");
30
- var import_renovate = require("./renovate.js");
31
- var import_serverless = require("./serverless.js");
32
- var import_tslint = require("./tslint.js");
1
+ import { eslintModule } from "./eslint.js";
2
+ import { ignoreModule } from "./ignore.js";
3
+ import { nodemonModule } from "./nodemon.js";
4
+ import { packageModule } from "./package.js";
5
+ import { prettierModule } from "./prettier.js";
6
+ import { renovateModule } from "./renovate.js";
7
+ import { serverlessModule } from "./serverless.js";
8
+ import { tslintModule } from "./tslint.js";
33
9
  const loadModules = (opts) => Promise.all(
34
10
  [
35
- import_eslint.eslintModule,
36
- import_ignore.ignoreModule,
37
- import_jest.jestModule,
38
- import_nodemon.nodemonModule,
39
- import_package.packageModule,
40
- import_prettier.prettierModule,
41
- import_renovate.renovateModule,
42
- import_serverless.serverlessModule,
43
- import_tslint.tslintModule
11
+ eslintModule,
12
+ ignoreModule,
13
+ nodemonModule,
14
+ packageModule,
15
+ prettierModule,
16
+ renovateModule,
17
+ serverlessModule,
18
+ tslintModule
44
19
  ].map(async (createModule) => createModule(opts))
45
20
  );
46
- // Annotate the CommonJS export names for ESM import in node:
47
- 0 && (module.exports = {
21
+ export {
48
22
  loadModules
49
- });
23
+ };
50
24
  //# sourceMappingURL=index.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/cli/configure/modules/index.ts"],
4
- "sourcesContent": ["import type { Module, Options } from '../types.js';\n\nimport { eslintModule } from './eslint.js';\nimport { ignoreModule } from './ignore.js';\nimport { jestModule } from './jest.js';\nimport { nodemonModule } from './nodemon.js';\nimport { packageModule } from './package.js';\nimport { prettierModule } from './prettier.js';\nimport { renovateModule } from './renovate.js';\nimport { serverlessModule } from './serverless.js';\nimport { tslintModule } from './tslint.js';\n\nexport const loadModules = (opts: Options): Promise<Module[]> =>\n Promise.all(\n [\n eslintModule,\n ignoreModule,\n jestModule,\n nodemonModule,\n packageModule,\n prettierModule,\n renovateModule,\n serverlessModule,\n tslintModule,\n ].map(async (createModule) => createModule(opts)),\n );\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAEA,oBAA6B;AAC7B,oBAA6B;AAC7B,kBAA2B;AAC3B,qBAA8B;AAC9B,qBAA8B;AAC9B,sBAA+B;AAC/B,sBAA+B;AAC/B,wBAAiC;AACjC,oBAA6B;AAEtB,MAAM,cAAc,CAAC,SAC1B,QAAQ;AAAA,EACN;AAAA,IACE;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF,EAAE,IAAI,OAAO,iBAAiB,aAAa,IAAI,CAAC;AAClD;",
4
+ "sourcesContent": ["import type { Module, Options } from '../types.js';\n\nimport { eslintModule } from './eslint.js';\nimport { ignoreModule } from './ignore.js';\nimport { nodemonModule } from './nodemon.js';\nimport { packageModule } from './package.js';\nimport { prettierModule } from './prettier.js';\nimport { renovateModule } from './renovate.js';\nimport { serverlessModule } from './serverless.js';\nimport { tslintModule } from './tslint.js';\n\nexport const loadModules = (opts: Options): Promise<Module[]> =>\n Promise.all(\n [\n eslintModule,\n ignoreModule,\n nodemonModule,\n packageModule,\n prettierModule,\n renovateModule,\n serverlessModule,\n tslintModule,\n ].map(async (createModule) => createModule(opts)),\n );\n"],
5
+ "mappings": "AAEA,SAAS,oBAAoB;AAC7B,SAAS,oBAAoB;AAC7B,SAAS,qBAAqB;AAC9B,SAAS,qBAAqB;AAC9B,SAAS,sBAAsB;AAC/B,SAAS,sBAAsB;AAC/B,SAAS,wBAAwB;AACjC,SAAS,oBAAoB;AAEtB,MAAM,cAAc,CAAC,SAC1B,QAAQ;AAAA,EACN;AAAA,IACE;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF,EAAE,IAAI,OAAO,iBAAiB,aAAa,IAAI,CAAC;AAClD;",
6
6
  "names": []
7
7
  }
@@ -1,30 +1,6 @@
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 nodemon_exports = {};
20
- __export(nodemon_exports, {
21
- nodemonModule: () => nodemonModule
22
- });
23
- module.exports = __toCommonJS(nodemon_exports);
24
- var import_deleteFiles = require("../processing/deleteFiles.js");
25
- const nodemonModule = () => (0, import_deleteFiles.deleteFiles)("nodemon.json");
26
- // Annotate the CommonJS export names for ESM import in node:
27
- 0 && (module.exports = {
1
+ import { deleteFiles } from "../processing/deleteFiles.js";
2
+ const nodemonModule = () => deleteFiles("nodemon.json");
3
+ export {
28
4
  nodemonModule
29
- });
5
+ };
30
6
  //# sourceMappingURL=nodemon.js.map
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/cli/configure/modules/nodemon.ts"],
4
4
  "sourcesContent": ["import { deleteFiles } from '../processing/deleteFiles.js';\nimport type { Module } from '../types.js';\n\nexport const nodemonModule = (): Module => deleteFiles('nodemon.json');\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,yBAA4B;AAGrB,MAAM,gBAAgB,UAAc,gCAAY,cAAc;",
5
+ "mappings": "AAAA,SAAS,mBAAmB;AAGrB,MAAM,gBAAgB,MAAc,YAAY,cAAc;",
6
6
  "names": []
7
7
  }
@@ -1,30 +1,7 @@
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 package_exports = {};
20
- __export(package_exports, {
21
- packageModule: () => packageModule
22
- });
23
- module.exports = __toCommonJS(package_exports);
24
- var import_version = require("../../../utils/version.js");
25
- var import_deleteFiles = require("../processing/deleteFiles.js");
26
- var import_package = require("../processing/package.js");
27
- var import_record = require("../processing/record.js");
1
+ import { getSkubaVersion } from "../../../utils/version.js";
2
+ import { deleteFiles } from "../processing/deleteFiles.js";
3
+ import { withPackage } from "../processing/package.js";
4
+ import { merge } from "../processing/record.js";
28
5
  const DEFAULT_PACKAGE_FILES = [
29
6
  "lib*/**/*.d.ts",
30
7
  "lib*/**/*.js",
@@ -36,7 +13,7 @@ const packageModule = async ({
36
13
  packageManager,
37
14
  type
38
15
  }) => {
39
- const version = await (0, import_version.getSkubaVersion)();
16
+ const version = await getSkubaVersion();
40
17
  const initialData = {
41
18
  private: type !== "package",
42
19
  scripts: {
@@ -62,9 +39,9 @@ const packageModule = async ({
62
39
  }
63
40
  };
64
41
  return {
65
- ...(0, import_deleteFiles.deleteFiles)(".npmignore", "package-lock.json"),
66
- "package.json": (inputFile) => (0, import_package.withPackage)((inputData) => {
67
- const outputData = (0, import_record.merge)(
42
+ ...deleteFiles(".npmignore", "package-lock.json"),
43
+ "package.json": (inputFile) => withPackage((inputData) => {
44
+ const outputData = merge(
68
45
  inputData,
69
46
  "skuba" in inputData ? recurringData : initialData
70
47
  );
@@ -114,8 +91,7 @@ const packageModule = async ({
114
91
  })(inputFile)
115
92
  };
116
93
  };
117
- // Annotate the CommonJS export names for ESM import in node:
118
- 0 && (module.exports = {
94
+ export {
119
95
  packageModule
120
- });
96
+ };
121
97
  //# sourceMappingURL=package.js.map
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/cli/configure/modules/package.ts"],
4
4
  "sourcesContent": ["import { getSkubaVersion } from '../../../utils/version.js';\nimport { deleteFiles } from '../processing/deleteFiles.js';\nimport { withPackage } from '../processing/package.js';\nimport { merge } from '../processing/record.js';\nimport type { Module, Options } from '../types.js';\n\nconst DEFAULT_PACKAGE_FILES = [\n 'lib*/**/*.d.ts',\n 'lib*/**/*.js',\n 'lib*/**/*.js.map',\n 'lib*/**/*.json',\n];\n\nexport const packageModule = async ({\n entryPoint,\n packageManager,\n type,\n}: Options): Promise<Module> => {\n const version = await getSkubaVersion();\n\n const initialData = {\n private: type !== 'package',\n\n scripts: {\n build: type === 'package' ? 'skuba build-package' : 'skuba build',\n format: 'skuba format',\n lint: 'skuba lint',\n ...(type === 'package' ? {} : { start: 'skuba start' }),\n test: 'skuba test --coverage',\n 'test:watch': 'skuba test --watch',\n },\n skuba: {\n entryPoint,\n template: null,\n type,\n version,\n },\n };\n\n const recurringData = {\n skuba: {\n entryPoint,\n type,\n version,\n },\n };\n\n return {\n ...deleteFiles('.npmignore', 'package-lock.json'),\n\n 'package.json': (inputFile) =>\n withPackage((inputData) => {\n const outputData = merge(\n inputData,\n 'skuba' in inputData ? recurringData : initialData,\n );\n\n outputData.license ??= 'UNLICENSED';\n outputData.scripts ??= {};\n\n // Workspaces can only be enabled in private projects\n if (outputData.workspaces && !outputData.private) {\n outputData.private = true;\n }\n\n delete outputData.scripts.commit;\n delete outputData.scripts['format:check'];\n delete outputData.scripts['lint:build'];\n delete outputData.scripts['lint:compile'];\n delete outputData.scripts['lint:eslint'];\n delete outputData.scripts['lint:prettier'];\n delete outputData.scripts['lint:tslint'];\n delete outputData.scripts['test:build'];\n delete outputData.scripts['test:jest'];\n delete outputData.typings;\n\n if (type === 'package') {\n outputData.files = (\n outputData.files ?? DEFAULT_PACKAGE_FILES\n ).flatMap((filePattern) =>\n filePattern === 'lib' ? DEFAULT_PACKAGE_FILES : [filePattern],\n );\n\n outputData.version ??= '0.0.0-semantically-released';\n\n // User-defined pre- and post-scripts are confusing and dropped by e.g.\n // Yarn 2.\n outputData.scripts.release = [\n outputData.scripts.prepublish,\n outputData.scripts.prerelease,\n outputData.scripts.release ?? 'skuba release',\n ]\n .filter((script): script is string => typeof script === 'string')\n .map((script) =>\n script\n .replace(\n /^smt build$/,\n `${packageManager.print.runSilent} build`,\n )\n .replace(/^smt /, 'skuba ')\n .trim(),\n )\n .filter(Boolean)\n .join(' && ');\n\n // Align with the required syntax for package.json#/paths\n if (outputData.scripts.build === 'skuba build-package') {\n outputData.main = './lib-commonjs/index.js';\n outputData.module = './lib-es2015/index.js';\n outputData.types = './lib-types/index.d.ts';\n } else {\n outputData.main = './lib/index.js';\n outputData.module = './lib/index.js';\n outputData.types = './lib/index.d.ts';\n }\n\n delete outputData.scripts.prepublish;\n delete outputData.scripts.prerelease;\n }\n\n return outputData;\n })(inputFile),\n };\n};\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,qBAAgC;AAChC,yBAA4B;AAC5B,qBAA4B;AAC5B,oBAAsB;AAGtB,MAAM,wBAAwB;AAAA,EAC5B;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;AAEO,MAAM,gBAAgB,OAAO;AAAA,EAClC;AAAA,EACA;AAAA,EACA;AACF,MAAgC;AAC9B,QAAM,UAAU,UAAM,gCAAgB;AAEtC,QAAM,cAAc;AAAA,IAClB,SAAS,SAAS;AAAA,IAElB,SAAS;AAAA,MACP,OAAO,SAAS,YAAY,wBAAwB;AAAA,MACpD,QAAQ;AAAA,MACR,MAAM;AAAA,MACN,GAAI,SAAS,YAAY,CAAC,IAAI,EAAE,OAAO,cAAc;AAAA,MACrD,MAAM;AAAA,MACN,cAAc;AAAA,IAChB;AAAA,IACA,OAAO;AAAA,MACL;AAAA,MACA,UAAU;AAAA,MACV;AAAA,MACA;AAAA,IACF;AAAA,EACF;AAEA,QAAM,gBAAgB;AAAA,IACpB,OAAO;AAAA,MACL;AAAA,MACA;AAAA,MACA;AAAA,IACF;AAAA,EACF;AAEA,SAAO;AAAA,IACL,OAAG,gCAAY,cAAc,mBAAmB;AAAA,IAEhD,gBAAgB,CAAC,kBACf,4BAAY,CAAC,cAAc;AACzB,YAAM,iBAAa;AAAA,QACjB;AAAA,QACA,WAAW,YAAY,gBAAgB;AAAA,MACzC;AAEA,iBAAW,YAAY;AACvB,iBAAW,YAAY,CAAC;AAGxB,UAAI,WAAW,cAAc,CAAC,WAAW,SAAS;AAChD,mBAAW,UAAU;AAAA,MACvB;AAEA,aAAO,WAAW,QAAQ;AAC1B,aAAO,WAAW,QAAQ,cAAc;AACxC,aAAO,WAAW,QAAQ,YAAY;AACtC,aAAO,WAAW,QAAQ,cAAc;AACxC,aAAO,WAAW,QAAQ,aAAa;AACvC,aAAO,WAAW,QAAQ,eAAe;AACzC,aAAO,WAAW,QAAQ,aAAa;AACvC,aAAO,WAAW,QAAQ,YAAY;AACtC,aAAO,WAAW,QAAQ,WAAW;AACrC,aAAO,WAAW;AAElB,UAAI,SAAS,WAAW;AACtB,mBAAW,SACT,WAAW,SAAS,uBACpB;AAAA,UAAQ,CAAC,gBACT,gBAAgB,QAAQ,wBAAwB,CAAC,WAAW;AAAA,QAC9D;AAEA,mBAAW,YAAY;AAIvB,mBAAW,QAAQ,UAAU;AAAA,UAC3B,WAAW,QAAQ;AAAA,UACnB,WAAW,QAAQ;AAAA,UACnB,WAAW,QAAQ,WAAW;AAAA,QAChC,EACG,OAAO,CAAC,WAA6B,OAAO,WAAW,QAAQ,EAC/D;AAAA,UAAI,CAAC,WACJ,OACG;AAAA,YACC;AAAA,YACA,GAAG,eAAe,MAAM,SAAS;AAAA,UACnC,EACC,QAAQ,SAAS,QAAQ,EACzB,KAAK;AAAA,QACV,EACC,OAAO,OAAO,EACd,KAAK,MAAM;AAGd,YAAI,WAAW,QAAQ,UAAU,uBAAuB;AACtD,qBAAW,OAAO;AAClB,qBAAW,SAAS;AACpB,qBAAW,QAAQ;AAAA,QACrB,OAAO;AACL,qBAAW,OAAO;AAClB,qBAAW,SAAS;AACpB,qBAAW,QAAQ;AAAA,QACrB;AAEA,eAAO,WAAW,QAAQ;AAC1B,eAAO,WAAW,QAAQ;AAAA,MAC5B;AAEA,aAAO;AAAA,IACT,CAAC,EAAE,SAAS;AAAA,EAChB;AACF;",
5
+ "mappings": "AAAA,SAAS,uBAAuB;AAChC,SAAS,mBAAmB;AAC5B,SAAS,mBAAmB;AAC5B,SAAS,aAAa;AAGtB,MAAM,wBAAwB;AAAA,EAC5B;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;AAEO,MAAM,gBAAgB,OAAO;AAAA,EAClC;AAAA,EACA;AAAA,EACA;AACF,MAAgC;AAC9B,QAAM,UAAU,MAAM,gBAAgB;AAEtC,QAAM,cAAc;AAAA,IAClB,SAAS,SAAS;AAAA,IAElB,SAAS;AAAA,MACP,OAAO,SAAS,YAAY,wBAAwB;AAAA,MACpD,QAAQ;AAAA,MACR,MAAM;AAAA,MACN,GAAI,SAAS,YAAY,CAAC,IAAI,EAAE,OAAO,cAAc;AAAA,MACrD,MAAM;AAAA,MACN,cAAc;AAAA,IAChB;AAAA,IACA,OAAO;AAAA,MACL;AAAA,MACA,UAAU;AAAA,MACV;AAAA,MACA;AAAA,IACF;AAAA,EACF;AAEA,QAAM,gBAAgB;AAAA,IACpB,OAAO;AAAA,MACL;AAAA,MACA;AAAA,MACA;AAAA,IACF;AAAA,EACF;AAEA,SAAO;AAAA,IACL,GAAG,YAAY,cAAc,mBAAmB;AAAA,IAEhD,gBAAgB,CAAC,cACf,YAAY,CAAC,cAAc;AACzB,YAAM,aAAa;AAAA,QACjB;AAAA,QACA,WAAW,YAAY,gBAAgB;AAAA,MACzC;AAEA,iBAAW,YAAY;AACvB,iBAAW,YAAY,CAAC;AAGxB,UAAI,WAAW,cAAc,CAAC,WAAW,SAAS;AAChD,mBAAW,UAAU;AAAA,MACvB;AAEA,aAAO,WAAW,QAAQ;AAC1B,aAAO,WAAW,QAAQ,cAAc;AACxC,aAAO,WAAW,QAAQ,YAAY;AACtC,aAAO,WAAW,QAAQ,cAAc;AACxC,aAAO,WAAW,QAAQ,aAAa;AACvC,aAAO,WAAW,QAAQ,eAAe;AACzC,aAAO,WAAW,QAAQ,aAAa;AACvC,aAAO,WAAW,QAAQ,YAAY;AACtC,aAAO,WAAW,QAAQ,WAAW;AACrC,aAAO,WAAW;AAElB,UAAI,SAAS,WAAW;AACtB,mBAAW,SACT,WAAW,SAAS,uBACpB;AAAA,UAAQ,CAAC,gBACT,gBAAgB,QAAQ,wBAAwB,CAAC,WAAW;AAAA,QAC9D;AAEA,mBAAW,YAAY;AAIvB,mBAAW,QAAQ,UAAU;AAAA,UAC3B,WAAW,QAAQ;AAAA,UACnB,WAAW,QAAQ;AAAA,UACnB,WAAW,QAAQ,WAAW;AAAA,QAChC,EACG,OAAO,CAAC,WAA6B,OAAO,WAAW,QAAQ,EAC/D;AAAA,UAAI,CAAC,WACJ,OACG;AAAA,YACC;AAAA,YACA,GAAG,eAAe,MAAM,SAAS;AAAA,UACnC,EACC,QAAQ,SAAS,QAAQ,EACzB,KAAK;AAAA,QACV,EACC,OAAO,OAAO,EACd,KAAK,MAAM;AAGd,YAAI,WAAW,QAAQ,UAAU,uBAAuB;AACtD,qBAAW,OAAO;AAClB,qBAAW,SAAS;AACpB,qBAAW,QAAQ;AAAA,QACrB,OAAO;AACL,qBAAW,OAAO;AAClB,qBAAW,SAAS;AACpB,qBAAW,QAAQ;AAAA,QACrB;AAEA,eAAO,WAAW,QAAQ;AAC1B,eAAO,WAAW,QAAQ;AAAA,MAC5B;AAEA,aAAO;AAAA,IACT,CAAC,EAAE,SAAS;AAAA,EAChB;AACF;",
6
6
  "names": []
7
7
  }
@@ -1,37 +1,14 @@
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 prettier_exports = {};
20
- __export(prettier_exports, {
21
- prettierModule: () => prettierModule
22
- });
23
- module.exports = __toCommonJS(prettier_exports);
24
- var import_template = require("../../../utils/template.js");
25
- var import_configFile = require("../processing/configFile.js");
26
- var import_deleteFiles = require("../processing/deleteFiles.js");
27
- var import_package = require("../processing/package.js");
1
+ import { readBaseTemplateFile } from "../../../utils/template.js";
2
+ import { mergeWithConfigFile } from "../processing/configFile.js";
3
+ import { deleteFiles } from "../processing/deleteFiles.js";
4
+ import { withPackage } from "../processing/package.js";
28
5
  const prettierModule = async () => {
29
6
  const [configFile, ignoreFile] = await Promise.all([
30
- (0, import_template.readBaseTemplateFile)("_.prettierrc.js"),
31
- (0, import_template.readBaseTemplateFile)("_.prettierignore")
7
+ readBaseTemplateFile("_.prettierrc.js"),
8
+ readBaseTemplateFile("_.prettierignore")
32
9
  ]);
33
10
  return {
34
- ...(0, import_deleteFiles.deleteFiles)(
11
+ ...deleteFiles(
35
12
  ".prettierrc",
36
13
  ".prettierrc.json",
37
14
  ".prettierrc.toml",
@@ -39,14 +16,13 @@ const prettierModule = async () => {
39
16
  ".prettierrc.yml",
40
17
  "prettier.config.js"
41
18
  ),
42
- ".prettierignore": (0, import_configFile.mergeWithConfigFile)(ignoreFile),
19
+ ".prettierignore": mergeWithConfigFile(ignoreFile),
43
20
  // enforce skuba opinions as there's no value in customising Prettier configs
44
21
  ".prettierrc.js": () => configFile,
45
- "package.json": (0, import_package.withPackage)(({ prettier, ...data }) => data)
22
+ "package.json": withPackage(({ prettier, ...data }) => data)
46
23
  };
47
24
  };
48
- // Annotate the CommonJS export names for ESM import in node:
49
- 0 && (module.exports = {
25
+ export {
50
26
  prettierModule
51
- });
27
+ };
52
28
  //# sourceMappingURL=prettier.js.map
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/cli/configure/modules/prettier.ts"],
4
4
  "sourcesContent": ["import { readBaseTemplateFile } from '../../../utils/template.js';\nimport { mergeWithConfigFile } from '../processing/configFile.js';\nimport { deleteFiles } from '../processing/deleteFiles.js';\nimport { withPackage } from '../processing/package.js';\nimport type { Module } from '../types.js';\n\nexport const prettierModule = async (): Promise<Module> => {\n const [configFile, ignoreFile] = await Promise.all([\n readBaseTemplateFile('_.prettierrc.js'),\n readBaseTemplateFile('_.prettierignore'),\n ]);\n\n return {\n ...deleteFiles(\n '.prettierrc',\n '.prettierrc.json',\n '.prettierrc.toml',\n '.prettierrc.yaml',\n '.prettierrc.yml',\n 'prettier.config.js',\n ),\n\n '.prettierignore': mergeWithConfigFile(ignoreFile),\n\n // enforce skuba opinions as there's no value in customising Prettier configs\n '.prettierrc.js': () => configFile,\n\n 'package.json': withPackage(({ prettier, ...data }) => data),\n };\n};\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,sBAAqC;AACrC,wBAAoC;AACpC,yBAA4B;AAC5B,qBAA4B;AAGrB,MAAM,iBAAiB,YAA6B;AACzD,QAAM,CAAC,YAAY,UAAU,IAAI,MAAM,QAAQ,IAAI;AAAA,QACjD,sCAAqB,iBAAiB;AAAA,QACtC,sCAAqB,kBAAkB;AAAA,EACzC,CAAC;AAED,SAAO;AAAA,IACL,OAAG;AAAA,MACD;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACF;AAAA,IAEA,uBAAmB,uCAAoB,UAAU;AAAA;AAAA,IAGjD,kBAAkB,MAAM;AAAA,IAExB,oBAAgB,4BAAY,CAAC,EAAE,UAAU,GAAG,KAAK,MAAM,IAAI;AAAA,EAC7D;AACF;",
5
+ "mappings": "AAAA,SAAS,4BAA4B;AACrC,SAAS,2BAA2B;AACpC,SAAS,mBAAmB;AAC5B,SAAS,mBAAmB;AAGrB,MAAM,iBAAiB,YAA6B;AACzD,QAAM,CAAC,YAAY,UAAU,IAAI,MAAM,QAAQ,IAAI;AAAA,IACjD,qBAAqB,iBAAiB;AAAA,IACtC,qBAAqB,kBAAkB;AAAA,EACzC,CAAC;AAED,SAAO;AAAA,IACL,GAAG;AAAA,MACD;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACF;AAAA,IAEA,mBAAmB,oBAAoB,UAAU;AAAA;AAAA,IAGjD,kBAAkB,MAAM;AAAA,IAExB,gBAAgB,YAAY,CAAC,EAAE,UAAU,GAAG,KAAK,MAAM,IAAI;AAAA,EAC7D;AACF;",
6
6
  "names": []
7
7
  }
@@ -1,32 +1,8 @@
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 renovate_exports = {};
20
- __export(renovate_exports, {
21
- RENOVATE_CONFIG_FILENAMES: () => RENOVATE_CONFIG_FILENAMES,
22
- renovateModule: () => renovateModule
23
- });
24
- module.exports = __toCommonJS(renovate_exports);
25
- var import_template = require("../../../utils/template.js");
26
- var import_deleteFiles = require("../processing/deleteFiles.js");
27
- var import_package = require("../processing/package.js");
28
- var import_prettier = require("../processing/prettier.js");
29
- var import_record = require("../processing/record.js");
1
+ import { readBaseTemplateFile } from "../../../utils/template.js";
2
+ import { deleteFiles } from "../processing/deleteFiles.js";
3
+ import { withPackage } from "../processing/package.js";
4
+ import { formatPrettier } from "../processing/prettier.js";
5
+ import { getFirstDefined } from "../processing/record.js";
30
6
  const OTHER_CONFIG_FILENAMES = [
31
7
  ".github/renovate.json",
32
8
  ".renovaterc",
@@ -39,15 +15,15 @@ const RENOVATE_CONFIG_FILENAMES = [
39
15
  ...OTHER_CONFIG_FILENAMES
40
16
  ];
41
17
  const renovateModule = async ({ type }) => {
42
- const configFile = await (0, import_template.readBaseTemplateFile)(".github/renovate.json5");
18
+ const configFile = await readBaseTemplateFile(".github/renovate.json5");
43
19
  return {
44
- ...(0, import_deleteFiles.deleteFiles)(...OTHER_CONFIG_FILENAMES),
20
+ ...deleteFiles(...OTHER_CONFIG_FILENAMES),
45
21
  ".github/renovate.json5": (_inputFile, _files, initialFiles) => {
46
- const inputFile = (0, import_record.getFirstDefined)(initialFiles, [
22
+ const inputFile = getFirstDefined(initialFiles, [
47
23
  ".github/renovate.json5",
48
24
  ...OTHER_CONFIG_FILENAMES
49
25
  ]);
50
- return inputFile?.includes("seek") ? (0, import_prettier.formatPrettier)(inputFile, { parser: "json5" }) : configFile;
26
+ return inputFile?.includes("seek") ? formatPrettier(inputFile, { parser: "json5" }) : configFile;
51
27
  },
52
28
  /**
53
29
  * Ensure Renovate correctly detects the project as an application/library.
@@ -55,15 +31,16 @@ const renovateModule = async ({ type }) => {
55
31
  * @see {@link https://docs.renovatebot.com/configuration-options/#rangestrategy }
56
32
  * @see {@link https://github.com/renovatebot/renovate/blob/8c361082842bb157d85ca39ecf4f6075730e74bb/lib/manager/npm/extract/type.ts#L3 }
57
33
  */
58
- "package.json": (0, import_package.withPackage)(({ private: _, renovate, ...data }) => ({
59
- ...data,
60
- private: type !== "package"
61
- }))
34
+ "package.json": withPackage(
35
+ ({ private: _, renovate, ...data }) => ({
36
+ ...data,
37
+ private: type !== "package"
38
+ })
39
+ )
62
40
  };
63
41
  };
64
- // Annotate the CommonJS export names for ESM import in node:
65
- 0 && (module.exports = {
42
+ export {
66
43
  RENOVATE_CONFIG_FILENAMES,
67
44
  renovateModule
68
- });
45
+ };
69
46
  //# sourceMappingURL=renovate.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/cli/configure/modules/renovate.ts"],
4
- "sourcesContent": ["import { readBaseTemplateFile } from '../../../utils/template.js';\nimport { deleteFiles } from '../processing/deleteFiles.js';\nimport { withPackage } from '../processing/package.js';\nimport { formatPrettier } from '../processing/prettier.js';\nimport { getFirstDefined } from '../processing/record.js';\nimport type { Module, Options } from '../types.js';\n\nconst OTHER_CONFIG_FILENAMES = [\n '.github/renovate.json',\n '.renovaterc',\n '.renovaterc.json',\n 'renovate.json',\n 'renovate.json5',\n];\n\nexport const RENOVATE_CONFIG_FILENAMES = [\n '.github/renovate.json5',\n ...OTHER_CONFIG_FILENAMES,\n];\n\nexport const renovateModule = async ({ type }: Options): Promise<Module> => {\n const configFile = await readBaseTemplateFile('.github/renovate.json5');\n\n return {\n ...deleteFiles(...OTHER_CONFIG_FILENAMES),\n\n '.github/renovate.json5': (_inputFile, _files, initialFiles) => {\n // allow migration from other Renovate config files\n const inputFile = getFirstDefined(initialFiles, [\n '.github/renovate.json5',\n ...OTHER_CONFIG_FILENAMES,\n ]);\n\n // allow customised Renovate configs that extend a SEEK configuration\n return inputFile?.includes('seek')\n ? formatPrettier(inputFile, { parser: 'json5' })\n : configFile;\n },\n\n /**\n * Ensure Renovate correctly detects the project as an application/library.\n *\n * @see {@link https://docs.renovatebot.com/configuration-options/#rangestrategy }\n * @see {@link https://github.com/renovatebot/renovate/blob/8c361082842bb157d85ca39ecf4f6075730e74bb/lib/manager/npm/extract/type.ts#L3 }\n */\n 'package.json': withPackage(({ private: _, renovate, ...data }) => ({\n ...data,\n private: type !== 'package',\n })),\n };\n};\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,sBAAqC;AACrC,yBAA4B;AAC5B,qBAA4B;AAC5B,sBAA+B;AAC/B,oBAAgC;AAGhC,MAAM,yBAAyB;AAAA,EAC7B;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;AAEO,MAAM,4BAA4B;AAAA,EACvC;AAAA,EACA,GAAG;AACL;AAEO,MAAM,iBAAiB,OAAO,EAAE,KAAK,MAAgC;AAC1E,QAAM,aAAa,UAAM,sCAAqB,wBAAwB;AAEtE,SAAO;AAAA,IACL,OAAG,gCAAY,GAAG,sBAAsB;AAAA,IAExC,0BAA0B,CAAC,YAAY,QAAQ,iBAAiB;AAE9D,YAAM,gBAAY,+BAAgB,cAAc;AAAA,QAC9C;AAAA,QACA,GAAG;AAAA,MACL,CAAC;AAGD,aAAO,WAAW,SAAS,MAAM,QAC7B,gCAAe,WAAW,EAAE,QAAQ,QAAQ,CAAC,IAC7C;AAAA,IACN;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAQA,oBAAgB,4BAAY,CAAC,EAAE,SAAS,GAAG,UAAU,GAAG,KAAK,OAAO;AAAA,MAClE,GAAG;AAAA,MACH,SAAS,SAAS;AAAA,IACpB,EAAE;AAAA,EACJ;AACF;",
4
+ "sourcesContent": ["import { readBaseTemplateFile } from '../../../utils/template.js';\nimport { deleteFiles } from '../processing/deleteFiles.js';\nimport { withPackage } from '../processing/package.js';\nimport { formatPrettier } from '../processing/prettier.js';\nimport { getFirstDefined } from '../processing/record.js';\nimport type { Module, Options, PackageJson } from '../types.js';\n\nconst OTHER_CONFIG_FILENAMES = [\n '.github/renovate.json',\n '.renovaterc',\n '.renovaterc.json',\n 'renovate.json',\n 'renovate.json5',\n];\n\nexport const RENOVATE_CONFIG_FILENAMES = [\n '.github/renovate.json5',\n ...OTHER_CONFIG_FILENAMES,\n];\n\nexport const renovateModule = async ({ type }: Options): Promise<Module> => {\n const configFile = await readBaseTemplateFile('.github/renovate.json5');\n\n return {\n ...deleteFiles(...OTHER_CONFIG_FILENAMES),\n\n '.github/renovate.json5': (_inputFile, _files, initialFiles) => {\n // allow migration from other Renovate config files\n const inputFile = getFirstDefined(initialFiles, [\n '.github/renovate.json5',\n ...OTHER_CONFIG_FILENAMES,\n ]);\n\n // allow customised Renovate configs that extend a SEEK configuration\n return inputFile?.includes('seek')\n ? formatPrettier(inputFile, { parser: 'json5' })\n : configFile;\n },\n\n /**\n * Ensure Renovate correctly detects the project as an application/library.\n *\n * @see {@link https://docs.renovatebot.com/configuration-options/#rangestrategy }\n * @see {@link https://github.com/renovatebot/renovate/blob/8c361082842bb157d85ca39ecf4f6075730e74bb/lib/manager/npm/extract/type.ts#L3 }\n */\n 'package.json': withPackage(\n ({ private: _, renovate, ...data }) =>\n ({\n ...data,\n private: type !== 'package',\n }) as PackageJson,\n ),\n };\n};\n"],
5
+ "mappings": "AAAA,SAAS,4BAA4B;AACrC,SAAS,mBAAmB;AAC5B,SAAS,mBAAmB;AAC5B,SAAS,sBAAsB;AAC/B,SAAS,uBAAuB;AAGhC,MAAM,yBAAyB;AAAA,EAC7B;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;AAEO,MAAM,4BAA4B;AAAA,EACvC;AAAA,EACA,GAAG;AACL;AAEO,MAAM,iBAAiB,OAAO,EAAE,KAAK,MAAgC;AAC1E,QAAM,aAAa,MAAM,qBAAqB,wBAAwB;AAEtE,SAAO;AAAA,IACL,GAAG,YAAY,GAAG,sBAAsB;AAAA,IAExC,0BAA0B,CAAC,YAAY,QAAQ,iBAAiB;AAE9D,YAAM,YAAY,gBAAgB,cAAc;AAAA,QAC9C;AAAA,QACA,GAAG;AAAA,MACL,CAAC;AAGD,aAAO,WAAW,SAAS,MAAM,IAC7B,eAAe,WAAW,EAAE,QAAQ,QAAQ,CAAC,IAC7C;AAAA,IACN;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAQA,gBAAgB;AAAA,MACd,CAAC,EAAE,SAAS,GAAG,UAAU,GAAG,KAAK,OAC9B;AAAA,QACC,GAAG;AAAA,QACH,SAAS,SAAS;AAAA,MACpB;AAAA,IACJ;AAAA,EACF;AACF;",
6
6
  "names": []
7
7
  }
@@ -1,26 +1,3 @@
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 serverless_exports = {};
20
- __export(serverless_exports, {
21
- serverlessModule: () => serverlessModule
22
- });
23
- module.exports = __toCommonJS(serverless_exports);
24
1
  const serverlessModule = ({}) => ({
25
2
  "**/serverless*.yml": (inputFile, _files, _initialFiles) => {
26
3
  if (!inputFile) {
@@ -29,8 +6,7 @@ const serverlessModule = ({}) => ({
29
6
  return inputFile.replace(/- (\.?\/)?dist\//g, "- lib/").replace(/handler: (\.?\/)?dist\//g, "handler: lib/");
30
7
  }
31
8
  });
32
- // Annotate the CommonJS export names for ESM import in node:
33
- 0 && (module.exports = {
9
+ export {
34
10
  serverlessModule
35
- });
11
+ };
36
12
  //# sourceMappingURL=serverless.js.map
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/cli/configure/modules/serverless.ts"],
4
4
  "sourcesContent": ["import type { Module, Options } from '../types.js';\n\nexport const serverlessModule = ({}: Options): Module => ({\n '**/serverless*.yml': (inputFile, _files, _initialFiles) => {\n if (!inputFile) {\n // Only configure files that exist.\n return;\n }\n\n return (\n inputFile\n // Rewire packaging patterns.\n .replace(/- (\\.?\\/)?dist\\//g, '- lib/')\n // Rewire handler paths.\n .replace(/handler: (\\.?\\/)?dist\\//g, 'handler: lib/')\n );\n },\n});\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAEO,MAAM,mBAAmB,CAAC,CAAC,OAAwB;AAAA,EACxD,sBAAsB,CAAC,WAAW,QAAQ,kBAAkB;AAC1D,QAAI,CAAC,WAAW;AAEd;AAAA,IACF;AAEA,WACE,UAEG,QAAQ,qBAAqB,QAAQ,EAErC,QAAQ,4BAA4B,eAAe;AAAA,EAE1D;AACF;",
5
+ "mappings": "AAEO,MAAM,mBAAmB,CAAC,CAAC,OAAwB;AAAA,EACxD,sBAAsB,CAAC,WAAW,QAAQ,kBAAkB;AAC1D,QAAI,CAAC,WAAW;AAEd;AAAA,IACF;AAEA,WACE,UAEG,QAAQ,qBAAqB,QAAQ,EAErC,QAAQ,4BAA4B,eAAe;AAAA,EAE1D;AACF;",
6
6
  "names": []
7
7
  }
@@ -1,30 +1,6 @@
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 tslint_exports = {};
20
- __export(tslint_exports, {
21
- tslintModule: () => tslintModule
22
- });
23
- module.exports = __toCommonJS(tslint_exports);
24
- var import_deleteFiles = require("../processing/deleteFiles.js");
25
- const tslintModule = () => (0, import_deleteFiles.deleteFiles)("tslint.json", "tslint.yaml");
26
- // Annotate the CommonJS export names for ESM import in node:
27
- 0 && (module.exports = {
1
+ import { deleteFiles } from "../processing/deleteFiles.js";
2
+ const tslintModule = () => deleteFiles("tslint.json", "tslint.yaml");
3
+ export {
28
4
  tslintModule
29
- });
5
+ };
30
6
  //# sourceMappingURL=tslint.js.map