skuba 13.0.3 → 14.0.0-esmify-skuba-20251031140551

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 (516) hide show
  1. package/config/eslint.js +1 -1
  2. package/config/prettier.js +10 -2
  3. package/lib/cli/adapter/eslint.js +10 -46
  4. package/lib/cli/adapter/eslint.js.map +2 -2
  5. package/lib/cli/adapter/prettier.js +40 -72
  6. package/lib/cli/adapter/prettier.js.map +2 -2
  7. package/lib/cli/build/args.js +7 -43
  8. package/lib/cli/build/args.js.map +2 -2
  9. package/lib/cli/build/assets.js +27 -62
  10. package/lib/cli/build/assets.js.map +2 -2
  11. package/lib/cli/build/esbuild.js +20 -55
  12. package/lib/cli/build/esbuild.js.map +3 -3
  13. package/lib/cli/build/index.js +20 -56
  14. package/lib/cli/build/index.js.map +2 -2
  15. package/lib/cli/build/tsc.js +24 -66
  16. package/lib/cli/build/tsc.js.map +2 -2
  17. package/lib/cli/buildPackage/index.js +7 -33
  18. package/lib/cli/buildPackage/index.js.map +1 -1
  19. package/lib/cli/configure/analyseConfiguration.js +15 -51
  20. package/lib/cli/configure/analyseConfiguration.js.map +2 -2
  21. package/lib/cli/configure/analyseDependencies.js +24 -60
  22. package/lib/cli/configure/analyseDependencies.js.map +3 -3
  23. package/lib/cli/configure/analysis/diff.js +4 -40
  24. package/lib/cli/configure/analysis/diff.js.map +2 -2
  25. package/lib/cli/configure/analysis/files.js +7 -43
  26. package/lib/cli/configure/analysis/files.js.map +2 -2
  27. package/lib/cli/configure/analysis/git.js +11 -47
  28. package/lib/cli/configure/analysis/git.js.map +2 -2
  29. package/lib/cli/configure/analysis/package.js +10 -48
  30. package/lib/cli/configure/analysis/package.js.map +3 -3
  31. package/lib/cli/configure/analysis/project.js +18 -53
  32. package/lib/cli/configure/analysis/project.js.map +2 -2
  33. package/lib/cli/configure/dependencies/index.js +5 -39
  34. package/lib/cli/configure/dependencies/index.js.map +1 -1
  35. package/lib/cli/configure/dependencies/seekDatadogCustomMetrics.js +3 -29
  36. package/lib/cli/configure/dependencies/seekDatadogCustomMetrics.js.map +1 -1
  37. package/lib/cli/configure/dependencies/seekKoala.js +3 -29
  38. package/lib/cli/configure/dependencies/seekKoala.js.map +1 -1
  39. package/lib/cli/configure/dependencies/skuba.js +3 -29
  40. package/lib/cli/configure/dependencies/skuba.js.map +1 -1
  41. package/lib/cli/configure/dependencies/skubaDeps.js +1 -27
  42. package/lib/cli/configure/dependencies/skubaDeps.js.map +1 -1
  43. package/lib/cli/configure/dependencies/skubaDive.js +4 -32
  44. package/lib/cli/configure/dependencies/skubaDive.js.map +1 -1
  45. package/lib/cli/configure/ensureTemplateCompletion.js +31 -61
  46. package/lib/cli/configure/ensureTemplateCompletion.js.map +3 -3
  47. package/lib/cli/configure/getEntryPoint.js +13 -49
  48. package/lib/cli/configure/getEntryPoint.js.map +3 -3
  49. package/lib/cli/configure/getProjectType.js +13 -36
  50. package/lib/cli/configure/getProjectType.js.map +2 -2
  51. package/lib/cli/configure/index.js +49 -85
  52. package/lib/cli/configure/index.js.map +3 -3
  53. package/lib/cli/configure/modules/eslint.js +9 -35
  54. package/lib/cli/configure/modules/eslint.js.map +1 -1
  55. package/lib/cli/configure/modules/ignore.js +7 -33
  56. package/lib/cli/configure/modules/ignore.js.map +1 -1
  57. package/lib/cli/configure/modules/index.js +17 -45
  58. package/lib/cli/configure/modules/index.js.map +2 -2
  59. package/lib/cli/configure/modules/nodemon.js +2 -28
  60. package/lib/cli/configure/modules/nodemon.js.map +1 -1
  61. package/lib/cli/configure/modules/package.js +9 -35
  62. package/lib/cli/configure/modules/package.js.map +1 -1
  63. package/lib/cli/configure/modules/prettier.js +10 -36
  64. package/lib/cli/configure/modules/prettier.js.map +1 -1
  65. package/lib/cli/configure/modules/renovate.js +17 -43
  66. package/lib/cli/configure/modules/renovate.js.map +2 -2
  67. package/lib/cli/configure/modules/serverless.js +1 -27
  68. package/lib/cli/configure/modules/serverless.js.map +1 -1
  69. package/lib/cli/configure/modules/tslint.js +2 -28
  70. package/lib/cli/configure/modules/tslint.js.map +1 -1
  71. package/lib/cli/configure/processing/configFile.js +4 -44
  72. package/lib/cli/configure/processing/configFile.js.map +1 -1
  73. package/lib/cli/configure/processing/deleteFiles.js +1 -27
  74. package/lib/cli/configure/processing/deleteFiles.js.map +1 -1
  75. package/lib/cli/configure/processing/javascript.js +2 -30
  76. package/lib/cli/configure/processing/javascript.js.map +1 -1
  77. package/lib/cli/configure/processing/json.js +6 -34
  78. package/lib/cli/configure/processing/json.js.map +1 -1
  79. package/lib/cli/configure/processing/loadFiles.js +1 -27
  80. package/lib/cli/configure/processing/loadFiles.js.map +1 -1
  81. package/lib/cli/configure/processing/module.js +2 -28
  82. package/lib/cli/configure/processing/module.js.map +1 -1
  83. package/lib/cli/configure/processing/package.js +10 -52
  84. package/lib/cli/configure/processing/package.js.map +3 -3
  85. package/lib/cli/configure/processing/prettier.js +3 -39
  86. package/lib/cli/configure/processing/prettier.js.map +2 -2
  87. package/lib/cli/configure/processing/record.js +4 -44
  88. package/lib/cli/configure/processing/record.js.map +2 -2
  89. package/lib/cli/configure/processing/typescript.js +28 -70
  90. package/lib/cli/configure/processing/typescript.js.map +2 -2
  91. package/lib/cli/configure/types.js +0 -15
  92. package/lib/cli/configure/types.js.map +3 -3
  93. package/lib/cli/format/index.js +19 -55
  94. package/lib/cli/format/index.js.map +2 -2
  95. package/lib/cli/help/index.js +5 -31
  96. package/lib/cli/help/index.js.map +1 -1
  97. package/lib/cli/init/getConfig.js +75 -107
  98. package/lib/cli/init/getConfig.js.map +3 -3
  99. package/lib/cli/init/git.js +16 -54
  100. package/lib/cli/init/git.js.map +3 -3
  101. package/lib/cli/init/index.js +66 -99
  102. package/lib/cli/init/index.js.map +2 -2
  103. package/lib/cli/init/prompts.js +20 -56
  104. package/lib/cli/init/prompts.js.map +3 -3
  105. package/lib/cli/init/types.js +6 -42
  106. package/lib/cli/init/types.js.map +1 -1
  107. package/lib/cli/init/validation.js +5 -39
  108. package/lib/cli/init/validation.js.map +1 -1
  109. package/lib/cli/init/writePackageJson.js +7 -43
  110. package/lib/cli/init/writePackageJson.js.map +2 -2
  111. package/lib/cli/lint/annotate/buildkite/eslint.js +2 -38
  112. package/lib/cli/lint/annotate/buildkite/eslint.js.map +1 -1
  113. package/lib/cli/lint/annotate/buildkite/index.js +10 -46
  114. package/lib/cli/lint/annotate/buildkite/index.js.map +1 -1
  115. package/lib/cli/lint/annotate/buildkite/internal.js +2 -38
  116. package/lib/cli/lint/annotate/buildkite/internal.js.map +1 -1
  117. package/lib/cli/lint/annotate/buildkite/prettier.js +2 -38
  118. package/lib/cli/lint/annotate/buildkite/prettier.js.map +1 -1
  119. package/lib/cli/lint/annotate/buildkite/tsc.js +2 -38
  120. package/lib/cli/lint/annotate/buildkite/tsc.js.map +1 -1
  121. package/lib/cli/lint/annotate/github/eslint.js +1 -27
  122. package/lib/cli/lint/annotate/github/eslint.js.map +1 -1
  123. package/lib/cli/lint/annotate/github/index.js +10 -46
  124. package/lib/cli/lint/annotate/github/index.js.map +1 -1
  125. package/lib/cli/lint/annotate/github/internal.js +1 -27
  126. package/lib/cli/lint/annotate/github/internal.js.map +1 -1
  127. package/lib/cli/lint/annotate/github/prettier.js +1 -27
  128. package/lib/cli/lint/annotate/github/prettier.js.map +1 -1
  129. package/lib/cli/lint/annotate/github/tsc.js +3 -29
  130. package/lib/cli/lint/annotate/github/tsc.js.map +2 -2
  131. package/lib/cli/lint/annotate/index.js +5 -31
  132. package/lib/cli/lint/annotate/index.js.map +1 -1
  133. package/lib/cli/lint/autofix.js +38 -78
  134. package/lib/cli/lint/autofix.js.map +3 -3
  135. package/lib/cli/lint/eslint.js +14 -52
  136. package/lib/cli/lint/eslint.js.map +3 -3
  137. package/lib/cli/lint/external.js +18 -53
  138. package/lib/cli/lint/external.js.map +2 -2
  139. package/lib/cli/lint/index.js +24 -50
  140. package/lib/cli/lint/index.js.map +1 -1
  141. package/lib/cli/lint/internal.js +17 -53
  142. package/lib/cli/lint/internal.js.map +2 -2
  143. package/lib/cli/lint/internalLints/detectBadCodeowners.js +8 -36
  144. package/lib/cli/lint/internalLints/detectBadCodeowners.js.map +1 -1
  145. package/lib/cli/lint/internalLints/noSkubaTemplateJs.js +10 -46
  146. package/lib/cli/lint/internalLints/noSkubaTemplateJs.js.map +3 -3
  147. package/lib/cli/lint/internalLints/patchRenovateConfig.js +20 -56
  148. package/lib/cli/lint/internalLints/patchRenovateConfig.js.map +2 -2
  149. package/lib/cli/lint/internalLints/refreshConfigFiles.js +33 -68
  150. package/lib/cli/lint/internalLints/refreshConfigFiles.js.map +2 -2
  151. package/lib/cli/lint/internalLints/upgrade/index.js +21 -54
  152. package/lib/cli/lint/internalLints/upgrade/index.js.map +3 -3
  153. package/lib/cli/lint/internalLints/upgrade/patches/10.0.4/index.js +3 -29
  154. package/lib/cli/lint/internalLints/upgrade/patches/10.0.4/index.js.map +1 -1
  155. package/lib/cli/lint/internalLints/upgrade/patches/10.0.4/removeYarnIgnoreOptionalFlags.js +10 -46
  156. package/lib/cli/lint/internalLints/upgrade/patches/10.0.4/removeYarnIgnoreOptionalFlags.js.map +2 -2
  157. package/lib/cli/lint/internalLints/upgrade/patches/10.1.0/index.js +5 -31
  158. package/lib/cli/lint/internalLints/upgrade/patches/10.1.0/index.js.map +1 -1
  159. package/lib/cli/lint/internalLints/upgrade/patches/10.1.0/migrateNpmrcToPnpmWorkspace.js +36 -73
  160. package/lib/cli/lint/internalLints/upgrade/patches/10.1.0/migrateNpmrcToPnpmWorkspace.js.map +3 -3
  161. package/lib/cli/lint/internalLints/upgrade/patches/10.1.0/stopBundlingInCDKTests.js +11 -49
  162. package/lib/cli/lint/internalLints/upgrade/patches/10.1.0/stopBundlingInCDKTests.js.map +2 -2
  163. package/lib/cli/lint/internalLints/upgrade/patches/12.0.2/index.js +3 -29
  164. package/lib/cli/lint/internalLints/upgrade/patches/12.0.2/index.js.map +1 -1
  165. package/lib/cli/lint/internalLints/upgrade/patches/12.0.2/unhandledRejections.js +24 -64
  166. package/lib/cli/lint/internalLints/upgrade/patches/12.0.2/unhandledRejections.js.map +2 -2
  167. package/lib/cli/lint/internalLints/upgrade/patches/12.1.1/index.js +3 -29
  168. package/lib/cli/lint/internalLints/upgrade/patches/12.1.1/index.js.map +1 -1
  169. package/lib/cli/lint/internalLints/upgrade/patches/12.1.1/patchJestSnapshots.js +11 -49
  170. package/lib/cli/lint/internalLints/upgrade/patches/12.1.1/patchJestSnapshots.js.map +2 -2
  171. package/lib/cli/lint/internalLints/upgrade/patches/12.3.0/index.js +5 -31
  172. package/lib/cli/lint/internalLints/upgrade/patches/12.3.0/index.js.map +1 -1
  173. package/lib/cli/lint/internalLints/upgrade/patches/12.3.0/patchApiTokenFromEnvironment.js +11 -49
  174. package/lib/cli/lint/internalLints/upgrade/patches/12.3.0/patchApiTokenFromEnvironment.js.map +2 -2
  175. package/lib/cli/lint/internalLints/upgrade/patches/12.3.0/patchDockerfileSyntaxDirective.js +11 -49
  176. package/lib/cli/lint/internalLints/upgrade/patches/12.3.0/patchDockerfileSyntaxDirective.js.map +2 -2
  177. package/lib/cli/lint/internalLints/upgrade/patches/12.4.0/index.js +3 -29
  178. package/lib/cli/lint/internalLints/upgrade/patches/12.4.0/index.js.map +1 -1
  179. package/lib/cli/lint/internalLints/upgrade/patches/12.4.0/patchDockerfileCIVariable.js +11 -49
  180. package/lib/cli/lint/internalLints/upgrade/patches/12.4.0/patchDockerfileCIVariable.js.map +2 -2
  181. package/lib/cli/lint/internalLints/upgrade/patches/12.4.1/configureTsConfigForESM.js +32 -76
  182. package/lib/cli/lint/internalLints/upgrade/patches/12.4.1/configureTsConfigForESM.js.map +2 -2
  183. package/lib/cli/lint/internalLints/upgrade/patches/12.4.1/index.js +9 -35
  184. package/lib/cli/lint/internalLints/upgrade/patches/12.4.1/index.js.map +1 -1
  185. package/lib/cli/lint/internalLints/upgrade/patches/12.4.1/patchApiDockerfiles.js +10 -46
  186. package/lib/cli/lint/internalLints/upgrade/patches/12.4.1/patchApiDockerfiles.js.map +2 -2
  187. package/lib/cli/lint/internalLints/upgrade/patches/12.4.1/rewriteSrcImports.js +28 -88
  188. package/lib/cli/lint/internalLints/upgrade/patches/12.4.1/rewriteSrcImports.js.map +2 -2
  189. package/lib/cli/lint/internalLints/upgrade/patches/12.4.1/updateLambdaConfigs.js +15 -53
  190. package/lib/cli/lint/internalLints/upgrade/patches/12.4.1/updateLambdaConfigs.js.map +2 -2
  191. package/lib/cli/lint/internalLints/upgrade/patches/7.3.1/addEmptyExports.js +16 -52
  192. package/lib/cli/lint/internalLints/upgrade/patches/7.3.1/addEmptyExports.js.map +2 -2
  193. package/lib/cli/lint/internalLints/upgrade/patches/7.3.1/index.js +9 -35
  194. package/lib/cli/lint/internalLints/upgrade/patches/7.3.1/index.js.map +1 -1
  195. package/lib/cli/lint/internalLints/upgrade/patches/7.3.1/patchDockerfile.js +9 -45
  196. package/lib/cli/lint/internalLints/upgrade/patches/7.3.1/patchDockerfile.js.map +2 -2
  197. package/lib/cli/lint/internalLints/upgrade/patches/7.3.1/patchServerListener.js +11 -47
  198. package/lib/cli/lint/internalLints/upgrade/patches/7.3.1/patchServerListener.js.map +2 -2
  199. package/lib/cli/lint/internalLints/upgrade/patches/8.0.0/index.js +3 -29
  200. package/lib/cli/lint/internalLints/upgrade/patches/8.0.0/index.js.map +1 -1
  201. package/lib/cli/lint/internalLints/upgrade/patches/8.0.0/patchPnpmPackageManager.js +14 -50
  202. package/lib/cli/lint/internalLints/upgrade/patches/8.0.0/patchPnpmPackageManager.js.map +2 -2
  203. package/lib/cli/lint/internalLints/upgrade/patches/8.2.1/collapseDuplicateMergeKeys.js +10 -46
  204. package/lib/cli/lint/internalLints/upgrade/patches/8.2.1/collapseDuplicateMergeKeys.js.map +2 -2
  205. package/lib/cli/lint/internalLints/upgrade/patches/8.2.1/index.js +9 -40
  206. package/lib/cli/lint/internalLints/upgrade/patches/8.2.1/index.js.map +2 -2
  207. package/lib/cli/lint/internalLints/upgrade/patches/8.2.1/moveNpmrcMounts.js +10 -46
  208. package/lib/cli/lint/internalLints/upgrade/patches/8.2.1/moveNpmrcMounts.js.map +2 -2
  209. package/lib/cli/lint/internalLints/upgrade/patches/8.2.1/patchDockerCompose.js +10 -46
  210. package/lib/cli/lint/internalLints/upgrade/patches/8.2.1/patchDockerCompose.js.map +2 -2
  211. package/lib/cli/lint/internalLints/upgrade/patches/8.2.1/patchDockerImages.js +12 -48
  212. package/lib/cli/lint/internalLints/upgrade/patches/8.2.1/patchDockerImages.js.map +2 -2
  213. package/lib/cli/lint/internalLints/upgrade/patches/9.0.1/index.js +3 -29
  214. package/lib/cli/lint/internalLints/upgrade/patches/9.0.1/index.js.map +1 -1
  215. package/lib/cli/lint/internalLints/upgrade/patches/9.0.1/patchPnpmDockerImages.js +10 -46
  216. package/lib/cli/lint/internalLints/upgrade/patches/9.0.1/patchPnpmDockerImages.js.map +2 -2
  217. package/lib/cli/lint/internalLints/upgrade/patches/9.1.0/index.js +3 -29
  218. package/lib/cli/lint/internalLints/upgrade/patches/9.1.0/index.js.map +1 -1
  219. package/lib/cli/lint/internalLints/upgrade/patches/9.1.0/upgradeNode.js +7 -33
  220. package/lib/cli/lint/internalLints/upgrade/patches/9.1.0/upgradeNode.js.map +1 -1
  221. package/lib/cli/lint/prettier.js +13 -51
  222. package/lib/cli/lint/prettier.js.map +3 -3
  223. package/lib/cli/lint/tsc.js +3 -29
  224. package/lib/cli/lint/tsc.js.map +1 -1
  225. package/lib/cli/lint/types.js +0 -15
  226. package/lib/cli/lint/types.js.map +3 -3
  227. package/lib/cli/migrate/index.js +9 -35
  228. package/lib/cli/migrate/index.js.map +1 -1
  229. package/lib/cli/migrate/nodeVersion/checks.js +26 -68
  230. package/lib/cli/migrate/nodeVersion/checks.js.map +2 -2
  231. package/lib/cli/migrate/nodeVersion/index.js +24 -56
  232. package/lib/cli/migrate/nodeVersion/index.js.map +2 -2
  233. package/lib/cli/node/index.js +20 -60
  234. package/lib/cli/node/index.js.map +3 -3
  235. package/lib/cli/release/index.js +3 -29
  236. package/lib/cli/release/index.js.map +1 -1
  237. package/lib/cli/start/index.js +15 -51
  238. package/lib/cli/start/index.js.map +3 -3
  239. package/lib/cli/test/index.js +3 -45
  240. package/lib/cli/test/index.js.map +2 -2
  241. package/lib/cli/version/index.js +5 -31
  242. package/lib/cli/version/index.js.map +1 -1
  243. package/lib/config/prettier.d.ts +7 -0
  244. package/lib/index.js +4 -49
  245. package/lib/index.js.map +2 -2
  246. package/lib/skuba.js +26 -44
  247. package/lib/skuba.js.map +3 -3
  248. package/lib/{cli → src/cli}/configure/analyseDependencies.d.ts +1 -1
  249. package/lib/{cli → src/cli}/configure/analysis/package.d.ts +2 -3
  250. package/lib/{cli → src/cli}/configure/ensureTemplateCompletion.d.ts +1 -1
  251. package/lib/{cli → src/cli}/configure/getEntryPoint.d.ts +1 -1
  252. package/lib/{cli → src/cli}/configure/getProjectType.d.ts +1 -1
  253. package/lib/src/cli/configure/processing/package.d.ts +5 -0
  254. package/lib/{cli → src/cli}/configure/types.d.ts +15 -4
  255. package/lib/{cli → src/cli}/init/getConfig.d.ts +1 -1
  256. package/lib/{cli → src/cli}/init/prompts.d.ts +4 -4
  257. package/lib/{cli → src/cli}/lint/internalLints/upgrade/index.d.ts +1 -1
  258. package/lib/{index.d.ts → src/index.d.ts} +0 -1
  259. package/lib/src/utils/fs.d.ts +1 -0
  260. package/lib/{utils → src/utils}/manifest.d.ts +3 -2
  261. package/lib/src/utils/sleep.d.ts +5 -0
  262. package/lib/{utils → src/utils}/wait.d.ts +0 -4
  263. package/lib/{wrapper → src/wrapper}/http.d.ts +0 -6
  264. package/lib/src/wrapper/server.d.ts +7 -0
  265. package/lib/utils/args.js +8 -50
  266. package/lib/utils/args.js.map +2 -2
  267. package/lib/utils/command.js +6 -50
  268. package/lib/utils/command.js.map +3 -3
  269. package/lib/utils/copy.js +22 -64
  270. package/lib/utils/copy.js.map +2 -2
  271. package/lib/utils/dir.js +37 -84
  272. package/lib/utils/dir.js.map +3 -3
  273. package/lib/utils/env.js +1 -27
  274. package/lib/utils/env.js.map +1 -1
  275. package/lib/utils/error.js +11 -53
  276. package/lib/utils/error.js.map +1 -1
  277. package/lib/utils/exec.js +26 -70
  278. package/lib/utils/exec.js.map +3 -3
  279. package/lib/utils/fs.js +15 -0
  280. package/lib/utils/fs.js.map +7 -0
  281. package/lib/utils/help.js +5 -31
  282. package/lib/utils/help.js.map +1 -1
  283. package/lib/utils/logging.js +13 -55
  284. package/lib/utils/logging.js.map +2 -2
  285. package/lib/utils/logo.js +23 -59
  286. package/lib/utils/logo.js.map +2 -2
  287. package/lib/utils/manifest.js +12 -60
  288. package/lib/utils/manifest.js.map +3 -3
  289. package/lib/utils/npmrc.js +1 -27
  290. package/lib/utils/npmrc.js.map +1 -1
  291. package/lib/utils/packageManager.js +14 -56
  292. package/lib/utils/packageManager.js.map +2 -2
  293. package/lib/utils/port.js +4 -42
  294. package/lib/utils/port.js.map +2 -2
  295. package/lib/utils/sleep.js +9 -0
  296. package/lib/utils/sleep.js.map +7 -0
  297. package/lib/utils/template.js +21 -68
  298. package/lib/utils/template.js.map +3 -3
  299. package/lib/utils/validation.js +6 -42
  300. package/lib/utils/validation.js.map +1 -1
  301. package/lib/utils/version.js +11 -53
  302. package/lib/utils/version.js.map +2 -2
  303. package/lib/utils/wait.js +6 -42
  304. package/lib/utils/wait.js.map +2 -2
  305. package/lib/utils/worker.js +9 -37
  306. package/lib/utils/worker.js.map +1 -1
  307. package/lib/wrapper/functionHandler.js +17 -50
  308. package/lib/wrapper/functionHandler.js.map +2 -2
  309. package/lib/wrapper/http.js +7 -53
  310. package/lib/wrapper/http.js.map +3 -3
  311. package/lib/wrapper/index.js +6 -6
  312. package/lib/wrapper/index.js.map +1 -1
  313. package/lib/wrapper/main.js +7 -43
  314. package/lib/wrapper/main.js.map +3 -3
  315. package/lib/wrapper/requestListener.js +12 -47
  316. package/lib/wrapper/requestListener.js.map +3 -3
  317. package/lib/wrapper/server.js +9 -0
  318. package/lib/wrapper/server.js.map +7 -0
  319. package/package.json +20 -26
  320. package/template/base/_.prettierrc.js +1 -1
  321. package/template/base/_eslint.config.js +1 -1
  322. package/template/base/_pnpm-workspace.yaml +3 -2
  323. package/template/base/vitest.config.ts +25 -0
  324. package/template/express-rest-api/.gantry/dev.yml +2 -2
  325. package/template/express-rest-api/.gantry/prod.yml +2 -2
  326. package/template/express-rest-api/package.json +6 -5
  327. package/template/express-rest-api/skuba.template.js +1 -1
  328. package/template/express-rest-api/src/app.test.ts +1 -0
  329. package/template/greeter/package.json +4 -3
  330. package/template/greeter/skuba.template.js +1 -1
  331. package/template/greeter/src/app.test.ts +3 -1
  332. package/template/koa-rest-api/.gantry/dev.yml +2 -2
  333. package/template/koa-rest-api/.gantry/prod.yml +2 -2
  334. package/template/koa-rest-api/package.json +6 -5
  335. package/template/koa-rest-api/skuba.template.js +1 -1
  336. package/template/koa-rest-api/src/api/jobs/getJobs.test.ts +2 -0
  337. package/template/koa-rest-api/src/api/jobs/postJob.test.ts +2 -0
  338. package/template/koa-rest-api/src/app.test.ts +2 -0
  339. package/template/koa-rest-api/src/framework/server.test.ts +2 -2
  340. package/template/koa-rest-api/src/framework/validation.test.ts +2 -0
  341. package/template/koa-rest-api/src/testing/metrics.ts +2 -0
  342. package/template/lambda-sqs-worker-cdk/infra/__snapshots__/appStack.test.ts.snap +15 -3
  343. package/template/lambda-sqs-worker-cdk/infra/appStack.test.ts +11 -9
  344. package/template/lambda-sqs-worker-cdk/infra/appStack.ts +1 -1
  345. package/template/lambda-sqs-worker-cdk/package.json +6 -5
  346. package/template/lambda-sqs-worker-cdk/skuba.template.js +1 -1
  347. package/template/lambda-sqs-worker-cdk/src/app.test.ts +22 -13
  348. package/template/lambda-sqs-worker-cdk/src/framework/handler.test.ts +1 -0
  349. package/template/lambda-sqs-worker-cdk/src/framework/validation.test.ts +33 -31
  350. package/template/lambda-sqs-worker-cdk/src/services/jobScorer.test.ts +8 -2
  351. package/template/lambda-sqs-worker-cdk/src/services/pipelineEventSender.test.ts +3 -2
  352. package/template/lambda-sqs-worker-cdk/src/testing/services.ts +4 -3
  353. package/template/oss-npm-package/.github/workflows/release.yml +1 -1
  354. package/template/oss-npm-package/.github/workflows/validate.yml +1 -1
  355. package/template/oss-npm-package/_package.json +1 -0
  356. package/template/oss-npm-package/skuba.template.js +1 -1
  357. package/template/oss-npm-package/src/index.test.ts +2 -0
  358. package/template/private-npm-package/_package.json +1 -0
  359. package/template/private-npm-package/skuba.template.js +1 -1
  360. package/template/private-npm-package/src/index.test.ts +2 -0
  361. package/config/jest.js +0 -1
  362. package/config/prettier.d.ts +0 -4
  363. package/jest/moduleNameMapper.js +0 -64
  364. package/jest/transform.js +0 -62
  365. package/jest/tsConfig.js +0 -26
  366. package/jest-preset.js +0 -37
  367. package/lib/api/jest/index.d.ts +0 -15
  368. package/lib/api/jest/index.js +0 -59
  369. package/lib/api/jest/index.js.map +0 -7
  370. package/lib/cli/configure/modules/jest.d.ts +0 -2
  371. package/lib/cli/configure/modules/jest.js +0 -86
  372. package/lib/cli/configure/modules/jest.js.map +0 -7
  373. package/lib/cli/configure/processing/package.d.ts +0 -71
  374. package/lib/cli/lint/internalLints/upgrade/patches/8.2.1/upgradeESLint.d.ts +0 -2
  375. package/lib/cli/lint/internalLints/upgrade/patches/8.2.1/upgradeESLint.js +0 -144
  376. package/lib/cli/lint/internalLints/upgrade/patches/8.2.1/upgradeESLint.js.map +0 -7
  377. package/lib/cli/test/reporters/github/annotations.d.ts +0 -9
  378. package/lib/cli/test/reporters/github/annotations.js +0 -102
  379. package/lib/cli/test/reporters/github/annotations.js.map +0 -7
  380. package/lib/cli/test/reporters/github/index.d.ts +0 -5
  381. package/lib/cli/test/reporters/github/index.js +0 -74
  382. package/lib/cli/test/reporters/github/index.js.map +0 -7
  383. package/template/base/jest.config.ts +0 -19
  384. package/template/base/jest.setup.ts +0 -3
  385. /package/lib/{cli → src/cli}/adapter/eslint.d.ts +0 -0
  386. /package/lib/{cli → src/cli}/adapter/prettier.d.ts +0 -0
  387. /package/lib/{cli → src/cli}/build/args.d.ts +0 -0
  388. /package/lib/{cli → src/cli}/build/assets.d.ts +0 -0
  389. /package/lib/{cli → src/cli}/build/esbuild.d.ts +0 -0
  390. /package/lib/{cli → src/cli}/build/index.d.ts +0 -0
  391. /package/lib/{cli → src/cli}/build/tsc.d.ts +0 -0
  392. /package/lib/{cli → src/cli}/buildPackage/index.d.ts +0 -0
  393. /package/lib/{cli → src/cli}/configure/analyseConfiguration.d.ts +0 -0
  394. /package/lib/{cli → src/cli}/configure/analysis/diff.d.ts +0 -0
  395. /package/lib/{cli → src/cli}/configure/analysis/files.d.ts +0 -0
  396. /package/lib/{cli → src/cli}/configure/analysis/git.d.ts +0 -0
  397. /package/lib/{cli → src/cli}/configure/analysis/project.d.ts +0 -0
  398. /package/lib/{cli → src/cli}/configure/dependencies/index.d.ts +0 -0
  399. /package/lib/{cli → src/cli}/configure/dependencies/seekDatadogCustomMetrics.d.ts +0 -0
  400. /package/lib/{cli → src/cli}/configure/dependencies/seekKoala.d.ts +0 -0
  401. /package/lib/{cli → src/cli}/configure/dependencies/skuba.d.ts +0 -0
  402. /package/lib/{cli → src/cli}/configure/dependencies/skubaDeps.d.ts +0 -0
  403. /package/lib/{cli → src/cli}/configure/dependencies/skubaDive.d.ts +0 -0
  404. /package/lib/{cli → src/cli}/configure/index.d.ts +0 -0
  405. /package/lib/{cli → src/cli}/configure/modules/eslint.d.ts +0 -0
  406. /package/lib/{cli → src/cli}/configure/modules/ignore.d.ts +0 -0
  407. /package/lib/{cli → src/cli}/configure/modules/index.d.ts +0 -0
  408. /package/lib/{cli → src/cli}/configure/modules/nodemon.d.ts +0 -0
  409. /package/lib/{cli → src/cli}/configure/modules/package.d.ts +0 -0
  410. /package/lib/{cli → src/cli}/configure/modules/prettier.d.ts +0 -0
  411. /package/lib/{cli → src/cli}/configure/modules/renovate.d.ts +0 -0
  412. /package/lib/{cli → src/cli}/configure/modules/serverless.d.ts +0 -0
  413. /package/lib/{cli → src/cli}/configure/modules/tslint.d.ts +0 -0
  414. /package/lib/{cli → src/cli}/configure/processing/configFile.d.ts +0 -0
  415. /package/lib/{cli → src/cli}/configure/processing/deleteFiles.d.ts +0 -0
  416. /package/lib/{cli → src/cli}/configure/processing/javascript.d.ts +0 -0
  417. /package/lib/{cli → src/cli}/configure/processing/json.d.ts +0 -0
  418. /package/lib/{cli → src/cli}/configure/processing/loadFiles.d.ts +0 -0
  419. /package/lib/{cli → src/cli}/configure/processing/module.d.ts +0 -0
  420. /package/lib/{cli → src/cli}/configure/processing/prettier.d.ts +0 -0
  421. /package/lib/{cli → src/cli}/configure/processing/record.d.ts +0 -0
  422. /package/lib/{cli → src/cli}/configure/processing/typescript.d.ts +0 -0
  423. /package/lib/{cli → src/cli}/format/index.d.ts +0 -0
  424. /package/lib/{cli → src/cli}/help/index.d.ts +0 -0
  425. /package/lib/{cli → src/cli}/init/git.d.ts +0 -0
  426. /package/lib/{cli → src/cli}/init/index.d.ts +0 -0
  427. /package/lib/{cli → src/cli}/init/types.d.ts +0 -0
  428. /package/lib/{cli → src/cli}/init/validation.d.ts +0 -0
  429. /package/lib/{cli → src/cli}/init/writePackageJson.d.ts +0 -0
  430. /package/lib/{cli → src/cli}/lint/annotate/buildkite/eslint.d.ts +0 -0
  431. /package/lib/{cli → src/cli}/lint/annotate/buildkite/index.d.ts +0 -0
  432. /package/lib/{cli → src/cli}/lint/annotate/buildkite/internal.d.ts +0 -0
  433. /package/lib/{cli → src/cli}/lint/annotate/buildkite/prettier.d.ts +0 -0
  434. /package/lib/{cli → src/cli}/lint/annotate/buildkite/tsc.d.ts +0 -0
  435. /package/lib/{cli → src/cli}/lint/annotate/github/eslint.d.ts +0 -0
  436. /package/lib/{cli → src/cli}/lint/annotate/github/index.d.ts +0 -0
  437. /package/lib/{cli → src/cli}/lint/annotate/github/internal.d.ts +0 -0
  438. /package/lib/{cli → src/cli}/lint/annotate/github/prettier.d.ts +0 -0
  439. /package/lib/{cli → src/cli}/lint/annotate/github/tsc.d.ts +0 -0
  440. /package/lib/{cli → src/cli}/lint/annotate/index.d.ts +0 -0
  441. /package/lib/{cli → src/cli}/lint/autofix.d.ts +0 -0
  442. /package/lib/{cli → src/cli}/lint/eslint.d.ts +0 -0
  443. /package/lib/{cli → src/cli}/lint/external.d.ts +0 -0
  444. /package/lib/{cli → src/cli}/lint/index.d.ts +0 -0
  445. /package/lib/{cli → src/cli}/lint/internal.d.ts +0 -0
  446. /package/lib/{cli → src/cli}/lint/internalLints/detectBadCodeowners.d.ts +0 -0
  447. /package/lib/{cli → src/cli}/lint/internalLints/noSkubaTemplateJs.d.ts +0 -0
  448. /package/lib/{cli → src/cli}/lint/internalLints/patchRenovateConfig.d.ts +0 -0
  449. /package/lib/{cli → src/cli}/lint/internalLints/refreshConfigFiles.d.ts +0 -0
  450. /package/lib/{cli → src/cli}/lint/internalLints/upgrade/patches/10.0.4/index.d.ts +0 -0
  451. /package/lib/{cli → src/cli}/lint/internalLints/upgrade/patches/10.0.4/removeYarnIgnoreOptionalFlags.d.ts +0 -0
  452. /package/lib/{cli → src/cli}/lint/internalLints/upgrade/patches/10.1.0/index.d.ts +0 -0
  453. /package/lib/{cli → src/cli}/lint/internalLints/upgrade/patches/10.1.0/migrateNpmrcToPnpmWorkspace.d.ts +0 -0
  454. /package/lib/{cli → src/cli}/lint/internalLints/upgrade/patches/10.1.0/stopBundlingInCDKTests.d.ts +0 -0
  455. /package/lib/{cli → src/cli}/lint/internalLints/upgrade/patches/12.0.2/index.d.ts +0 -0
  456. /package/lib/{cli → src/cli}/lint/internalLints/upgrade/patches/12.0.2/unhandledRejections.d.ts +0 -0
  457. /package/lib/{cli → src/cli}/lint/internalLints/upgrade/patches/12.1.1/index.d.ts +0 -0
  458. /package/lib/{cli → src/cli}/lint/internalLints/upgrade/patches/12.1.1/patchJestSnapshots.d.ts +0 -0
  459. /package/lib/{cli → src/cli}/lint/internalLints/upgrade/patches/12.3.0/index.d.ts +0 -0
  460. /package/lib/{cli → src/cli}/lint/internalLints/upgrade/patches/12.3.0/patchApiTokenFromEnvironment.d.ts +0 -0
  461. /package/lib/{cli → src/cli}/lint/internalLints/upgrade/patches/12.3.0/patchDockerfileSyntaxDirective.d.ts +0 -0
  462. /package/lib/{cli → src/cli}/lint/internalLints/upgrade/patches/12.4.0/index.d.ts +0 -0
  463. /package/lib/{cli → src/cli}/lint/internalLints/upgrade/patches/12.4.0/patchDockerfileCIVariable.d.ts +0 -0
  464. /package/lib/{cli → src/cli}/lint/internalLints/upgrade/patches/12.4.1/configureTsConfigForESM.d.ts +0 -0
  465. /package/lib/{cli → src/cli}/lint/internalLints/upgrade/patches/12.4.1/index.d.ts +0 -0
  466. /package/lib/{cli → src/cli}/lint/internalLints/upgrade/patches/12.4.1/patchApiDockerfiles.d.ts +0 -0
  467. /package/lib/{cli → src/cli}/lint/internalLints/upgrade/patches/12.4.1/rewriteSrcImports.d.ts +0 -0
  468. /package/lib/{cli → src/cli}/lint/internalLints/upgrade/patches/12.4.1/updateLambdaConfigs.d.ts +0 -0
  469. /package/lib/{cli → src/cli}/lint/internalLints/upgrade/patches/7.3.1/addEmptyExports.d.ts +0 -0
  470. /package/lib/{cli → src/cli}/lint/internalLints/upgrade/patches/7.3.1/index.d.ts +0 -0
  471. /package/lib/{cli → src/cli}/lint/internalLints/upgrade/patches/7.3.1/patchDockerfile.d.ts +0 -0
  472. /package/lib/{cli → src/cli}/lint/internalLints/upgrade/patches/7.3.1/patchServerListener.d.ts +0 -0
  473. /package/lib/{cli → src/cli}/lint/internalLints/upgrade/patches/8.0.0/index.d.ts +0 -0
  474. /package/lib/{cli → src/cli}/lint/internalLints/upgrade/patches/8.0.0/patchPnpmPackageManager.d.ts +0 -0
  475. /package/lib/{cli → src/cli}/lint/internalLints/upgrade/patches/8.2.1/collapseDuplicateMergeKeys.d.ts +0 -0
  476. /package/lib/{cli → src/cli}/lint/internalLints/upgrade/patches/8.2.1/index.d.ts +0 -0
  477. /package/lib/{cli → src/cli}/lint/internalLints/upgrade/patches/8.2.1/moveNpmrcMounts.d.ts +0 -0
  478. /package/lib/{cli → src/cli}/lint/internalLints/upgrade/patches/8.2.1/patchDockerCompose.d.ts +0 -0
  479. /package/lib/{cli → src/cli}/lint/internalLints/upgrade/patches/8.2.1/patchDockerImages.d.ts +0 -0
  480. /package/lib/{cli → src/cli}/lint/internalLints/upgrade/patches/9.0.1/index.d.ts +0 -0
  481. /package/lib/{cli → src/cli}/lint/internalLints/upgrade/patches/9.0.1/patchPnpmDockerImages.d.ts +0 -0
  482. /package/lib/{cli → src/cli}/lint/internalLints/upgrade/patches/9.1.0/index.d.ts +0 -0
  483. /package/lib/{cli → src/cli}/lint/internalLints/upgrade/patches/9.1.0/upgradeNode.d.ts +0 -0
  484. /package/lib/{cli → src/cli}/lint/prettier.d.ts +0 -0
  485. /package/lib/{cli → src/cli}/lint/tsc.d.ts +0 -0
  486. /package/lib/{cli → src/cli}/lint/types.d.ts +0 -0
  487. /package/lib/{cli → src/cli}/migrate/index.d.ts +0 -0
  488. /package/lib/{cli → src/cli}/migrate/nodeVersion/checks.d.ts +0 -0
  489. /package/lib/{cli → src/cli}/migrate/nodeVersion/index.d.ts +0 -0
  490. /package/lib/{cli → src/cli}/node/index.d.ts +0 -0
  491. /package/lib/{cli → src/cli}/release/index.d.ts +0 -0
  492. /package/lib/{cli → src/cli}/start/index.d.ts +0 -0
  493. /package/lib/{cli → src/cli}/test/index.d.ts +0 -0
  494. /package/lib/{cli → src/cli}/version/index.d.ts +0 -0
  495. /package/lib/{skuba.d.ts → src/skuba.d.ts} +0 -0
  496. /package/lib/{utils → src/utils}/args.d.ts +0 -0
  497. /package/lib/{utils → src/utils}/command.d.ts +0 -0
  498. /package/lib/{utils → src/utils}/copy.d.ts +0 -0
  499. /package/lib/{utils → src/utils}/dir.d.ts +0 -0
  500. /package/lib/{utils → src/utils}/env.d.ts +0 -0
  501. /package/lib/{utils → src/utils}/error.d.ts +0 -0
  502. /package/lib/{utils → src/utils}/exec.d.ts +0 -0
  503. /package/lib/{utils → src/utils}/help.d.ts +0 -0
  504. /package/lib/{utils → src/utils}/logging.d.ts +0 -0
  505. /package/lib/{utils → src/utils}/logo.d.ts +0 -0
  506. /package/lib/{utils → src/utils}/npmrc.d.ts +0 -0
  507. /package/lib/{utils → src/utils}/packageManager.d.ts +0 -0
  508. /package/lib/{utils → src/utils}/port.d.ts +0 -0
  509. /package/lib/{utils → src/utils}/template.d.ts +0 -0
  510. /package/lib/{utils → src/utils}/validation.d.ts +0 -0
  511. /package/lib/{utils → src/utils}/version.d.ts +0 -0
  512. /package/lib/{utils → src/utils}/worker.d.ts +0 -0
  513. /package/lib/{wrapper → src/wrapper}/functionHandler.d.ts +0 -0
  514. /package/lib/{wrapper → src/wrapper}/index.d.ts +0 -0
  515. /package/lib/{wrapper → src/wrapper}/main.d.ts +0 -0
  516. /package/lib/{wrapper → src/wrapper}/requestListener.d.ts +0 -0
@@ -1,42 +1,20 @@
1
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");
2
+ import { getSkubaVersion } from "../../../utils/version.js";
3
+ import { deleteFiles } from "../processing/deleteFiles.js";
4
+ import { withPackage } from "../processing/package.js";
5
+ import { merge } from "../processing/record.js";
28
6
  const DEFAULT_PACKAGE_FILES = [
29
7
  "lib*/**/*.d.ts",
30
8
  "lib*/**/*.js",
31
9
  "lib*/**/*.js.map",
32
10
  "lib*/**/*.json"
33
11
  ];
34
- const packageModule = async ({
12
+ export const packageModule = async ({
35
13
  entryPoint,
36
14
  packageManager,
37
15
  type
38
16
  }) => {
39
- const version = await (0, import_version.getSkubaVersion)();
17
+ const version = await getSkubaVersion();
40
18
  const initialData = {
41
19
  private: type !== "package",
42
20
  scripts: {
@@ -62,9 +40,9 @@ const packageModule = async ({
62
40
  }
63
41
  };
64
42
  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)(
43
+ ...deleteFiles(".npmignore", "package-lock.json"),
44
+ "package.json": (inputFile) => withPackage((inputData) => {
45
+ const outputData = merge(
68
46
  inputData,
69
47
  "skuba" in inputData ? recurringData : initialData
70
48
  );
@@ -114,8 +92,4 @@ const packageModule = async ({
114
92
  })(inputFile)
115
93
  };
116
94
  };
117
- // Annotate the CommonJS export names for ESM import in node:
118
- 0 && (module.exports = {
119
- packageModule
120
- });
121
95
  //# 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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AO,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,15 @@
1
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");
28
- const prettierModule = async () => {
2
+ import { readBaseTemplateFile } from "../../../utils/template.js";
3
+ import { mergeWithConfigFile } from "../processing/configFile.js";
4
+ import { deleteFiles } from "../processing/deleteFiles.js";
5
+ import { withPackage } from "../processing/package.js";
6
+ export const prettierModule = async () => {
29
7
  const [configFile, ignoreFile] = await Promise.all([
30
- (0, import_template.readBaseTemplateFile)("_.prettierrc.js"),
31
- (0, import_template.readBaseTemplateFile)("_.prettierignore")
8
+ readBaseTemplateFile("_.prettierrc.js"),
9
+ readBaseTemplateFile("_.prettierignore")
32
10
  ]);
33
11
  return {
34
- ...(0, import_deleteFiles.deleteFiles)(
12
+ ...deleteFiles(
35
13
  ".prettierrc",
36
14
  ".prettierrc.json",
37
15
  ".prettierrc.toml",
@@ -39,14 +17,10 @@ const prettierModule = async () => {
39
17
  ".prettierrc.yml",
40
18
  "prettier.config.js"
41
19
  ),
42
- ".prettierignore": (0, import_configFile.mergeWithConfigFile)(ignoreFile),
20
+ ".prettierignore": mergeWithConfigFile(ignoreFile),
43
21
  // enforce skuba opinions as there's no value in customising Prettier configs
44
22
  ".prettierrc.js": () => configFile,
45
- "package.json": (0, import_package.withPackage)(({ prettier, ...data }) => data)
23
+ "package.json": withPackage(({ prettier, ...data }) => data)
46
24
  };
47
25
  };
48
- // Annotate the CommonJS export names for ESM import in node:
49
- 0 && (module.exports = {
50
- prettierModule
51
- });
52
26
  //# 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,aAAM,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,9 @@
1
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");
2
+ import { readBaseTemplateFile } from "../../../utils/template.js";
3
+ import { deleteFiles } from "../processing/deleteFiles.js";
4
+ import { withPackage } from "../processing/package.js";
5
+ import { formatPrettier } from "../processing/prettier.js";
6
+ import { getFirstDefined } from "../processing/record.js";
30
7
  const OTHER_CONFIG_FILENAMES = [
31
8
  ".github/renovate.json",
32
9
  ".renovaterc",
@@ -34,20 +11,20 @@ const OTHER_CONFIG_FILENAMES = [
34
11
  "renovate.json",
35
12
  "renovate.json5"
36
13
  ];
37
- const RENOVATE_CONFIG_FILENAMES = [
14
+ export const RENOVATE_CONFIG_FILENAMES = [
38
15
  ".github/renovate.json5",
39
16
  ...OTHER_CONFIG_FILENAMES
40
17
  ];
41
- const renovateModule = async ({ type }) => {
42
- const configFile = await (0, import_template.readBaseTemplateFile)(".github/renovate.json5");
18
+ export const renovateModule = async ({ type }) => {
19
+ const configFile = await readBaseTemplateFile(".github/renovate.json5");
43
20
  return {
44
- ...(0, import_deleteFiles.deleteFiles)(...OTHER_CONFIG_FILENAMES),
21
+ ...deleteFiles(...OTHER_CONFIG_FILENAMES),
45
22
  ".github/renovate.json5": (_inputFile, _files, initialFiles) => {
46
- const inputFile = (0, import_record.getFirstDefined)(initialFiles, [
23
+ const inputFile = getFirstDefined(initialFiles, [
47
24
  ".github/renovate.json5",
48
25
  ...OTHER_CONFIG_FILENAMES
49
26
  ]);
50
- return inputFile?.includes("seek") ? (0, import_prettier.formatPrettier)(inputFile, { parser: "json5" }) : configFile;
27
+ return inputFile?.includes("seek") ? formatPrettier(inputFile, { parser: "json5" }) : configFile;
51
28
  },
52
29
  /**
53
30
  * Ensure Renovate correctly detects the project as an application/library.
@@ -55,15 +32,12 @@ const renovateModule = async ({ type }) => {
55
32
  * @see {@link https://docs.renovatebot.com/configuration-options/#rangestrategy }
56
33
  * @see {@link https://github.com/renovatebot/renovate/blob/8c361082842bb157d85ca39ecf4f6075730e74bb/lib/manager/npm/extract/type.ts#L3 }
57
34
  */
58
- "package.json": (0, import_package.withPackage)(({ private: _, renovate, ...data }) => ({
59
- ...data,
60
- private: type !== "package"
61
- }))
35
+ "package.json": withPackage(
36
+ ({ private: _, renovate, ...data }) => ({
37
+ ...data,
38
+ private: type !== "package"
39
+ })
40
+ )
62
41
  };
63
42
  };
64
- // Annotate the CommonJS export names for ESM import in node:
65
- 0 && (module.exports = {
66
- RENOVATE_CONFIG_FILENAMES,
67
- renovateModule
68
- });
69
43
  //# 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,aAAM,4BAA4B;AAAA,EACvC;AAAA,EACA,GAAG;AACL;AAEO,aAAM,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,27 +1,5 @@
1
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
- const serverlessModule = ({}) => ({
2
+ export const serverlessModule = ({}) => ({
25
3
  "**/serverless*.yml": (inputFile, _files, _initialFiles) => {
26
4
  if (!inputFile) {
27
5
  return;
@@ -29,8 +7,4 @@ const serverlessModule = ({}) => ({
29
7
  return inputFile.replace(/- (\.?\/)?dist\//g, "- lib/").replace(/handler: (\.?\/)?dist\//g, "handler: lib/");
30
8
  }
31
9
  });
32
- // Annotate the CommonJS export names for ESM import in node:
33
- 0 && (module.exports = {
34
- serverlessModule
35
- });
36
10
  //# 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,aAAM,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,4 @@
1
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 = {
28
- tslintModule
29
- });
2
+ import { deleteFiles } from "../processing/deleteFiles.js";
3
+ export const tslintModule = () => deleteFiles("tslint.json", "tslint.yaml");
30
4
  //# sourceMappingURL=tslint.js.map
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/cli/configure/modules/tslint.ts"],
4
4
  "sourcesContent": ["import { deleteFiles } from '../processing/deleteFiles.js';\nimport type { Module } from '../types.js';\n\nexport const tslintModule = (): Module =>\n deleteFiles('tslint.json', 'tslint.yaml');\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,yBAA4B;AAGrB,MAAM,eAAe,UAC1B,gCAAY,eAAe,aAAa;",
5
+ "mappings": ";AAAA,SAAS,mBAAmB;AAGrB,aAAM,eAAe,MAC1B,YAAY,eAAe,aAAa;",
6
6
  "names": []
7
7
  }
@@ -1,44 +1,10 @@
1
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 configFile_exports = {};
30
- __export(configFile_exports, {
31
- generateIgnoreFileSimpleVariants: () => generateIgnoreFileSimpleVariants,
32
- mergeWithConfigFile: () => mergeWithConfigFile,
33
- replaceManagedSection: () => replaceManagedSection
34
- });
35
- module.exports = __toCommonJS(configFile_exports);
36
- var z = __toESM(require("zod"));
2
+ import * as z from "zod";
37
3
  const OUTDATED_PATTERNS = ["node_modules_bak/", "tmp-*/"];
38
4
  const ASTERISKS = /\*/g;
39
5
  const LEADING_SLASH = /^\//;
40
6
  const TRAILING_SLASH = /\/$/;
41
- const generateIgnoreFileSimpleVariants = (patterns) => {
7
+ export const generateIgnoreFileSimpleVariants = (patterns) => {
42
8
  const set = /* @__PURE__ */ new Set();
43
9
  for (const pattern of patterns) {
44
10
  const deAsterisked = pattern.replace(ASTERISKS, "");
@@ -85,8 +51,8 @@ const amendPnpmWorkspaceTemplate = (templateFile, packageJson) => {
85
51
  return `${beforeKey + targetKey}
86
52
  ${excludeLines}${afterKey}`;
87
53
  };
88
- const replaceManagedSection = (input, template) => input.replace(/# managed by skuba[\s\S]*# end managed by skuba/, template);
89
- const mergeWithConfigFile = (rawTemplateFile, fileType = "ignore", packageJson) => {
54
+ export const replaceManagedSection = (input, template) => input.replace(/# managed by skuba[\s\S]*# end managed by skuba/, template);
55
+ export const mergeWithConfigFile = (rawTemplateFile, fileType = "ignore", packageJson) => {
90
56
  const templateFile = fileType === "pnpm-workspace" ? amendPnpmWorkspaceTemplate(rawTemplateFile.trim(), packageJson) : rawTemplateFile.trim();
91
57
  let generator;
92
58
  switch (fileType) {
@@ -122,10 +88,4 @@ const mergeWithConfigFile = (rawTemplateFile, fileType = "ignore", packageJson)
122
88
  `;
123
89
  };
124
90
  };
125
- // Annotate the CommonJS export names for ESM import in node:
126
- 0 && (module.exports = {
127
- generateIgnoreFileSimpleVariants,
128
- mergeWithConfigFile,
129
- replaceManagedSection
130
- });
131
91
  //# sourceMappingURL=configFile.js.map
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/cli/configure/processing/configFile.ts"],
4
4
  "sourcesContent": ["import * as z from 'zod';\n\n/**\n * Patterns that are superseded by skuba's bundled ignore file patterns and are\n * non-trivial to derive using e.g. `generateSimpleVariants`.\n */\nconst OUTDATED_PATTERNS = ['node_modules_bak/', 'tmp-*/'];\n\nconst ASTERISKS = /\\*/g;\nconst LEADING_SLASH = /^\\//;\nconst TRAILING_SLASH = /\\/$/;\n\n/**\n * Generate simple variants of an ignore pattern for exact matching purposes.\n *\n * Note that these patterns are not actually equivalent (e.g. `lib` matches more\n * than `lib/`) but they generally represent the same _intent_.\n */\nexport const generateIgnoreFileSimpleVariants = (patterns: string[]) => {\n const set = new Set<string>();\n\n for (const pattern of patterns) {\n const deAsterisked = pattern.replace(ASTERISKS, '');\n const stripped = deAsterisked\n .replace(LEADING_SLASH, '')\n .replace(TRAILING_SLASH, '');\n\n set.add(pattern);\n set.add(deAsterisked);\n set.add(deAsterisked.replace(LEADING_SLASH, ''));\n set.add(deAsterisked.replace(TRAILING_SLASH, ''));\n set.add(stripped);\n\n if (stripped !== '') {\n set.add(`/${stripped}`);\n set.add(`${stripped}/`);\n set.add(`/${stripped}/`);\n }\n }\n\n set.delete('');\n\n return set;\n};\n\nconst amendPnpmWorkspaceTemplate = (\n templateFile: string,\n packageJson?: string,\n) => {\n if (!packageJson) {\n return templateFile;\n }\n let rawJSON;\n try {\n rawJSON = JSON.parse(packageJson) as unknown;\n } catch {\n throw new Error('package.json is not valid JSON');\n }\n const parsed = z\n .object({\n minimumReleaseAgeExcludeOverload: z.array(z.string()).optional(),\n })\n .safeParse(rawJSON);\n\n const excludes = parsed.data?.minimumReleaseAgeExcludeOverload;\n if (\n !excludes ||\n Array.isArray(excludes) === false ||\n excludes.some((e) => typeof e !== 'string')\n ) {\n return templateFile;\n }\n\n const targetKey = 'minimumReleaseAgeExclude:';\n const index = templateFile.indexOf(targetKey);\n\n if (index === -1) {\n return templateFile;\n }\n\n const beforeKey = templateFile.substring(0, index);\n const afterKey = templateFile.substring(index + targetKey.length);\n const excludeLines = excludes.map((exclude) => ` - '${exclude}'`).join('\\n');\n\n return `${beforeKey + targetKey}\\n${excludeLines}${afterKey}`;\n};\n\nexport const replaceManagedSection = (input: string, template: string) =>\n input.replace(/# managed by skuba[\\s\\S]*# end managed by skuba/, template);\n\nexport const mergeWithConfigFile = (\n rawTemplateFile: string,\n fileType: 'ignore' | 'pnpm-workspace' = 'ignore',\n packageJson?: string,\n) => {\n const templateFile =\n fileType === 'pnpm-workspace'\n ? amendPnpmWorkspaceTemplate(rawTemplateFile.trim(), packageJson)\n : rawTemplateFile.trim();\n\n let generator: (s: string[], packageJson?: string) => Set<string>;\n\n switch (fileType) {\n case 'ignore':\n generator = generateIgnoreFileSimpleVariants;\n break;\n case 'pnpm-workspace':\n generator = () => new Set<string>();\n break;\n }\n\n const templatePatterns = generator(\n [\n ...OUTDATED_PATTERNS,\n ...templateFile.split('\\n').map((line) => line.trim()),\n ],\n packageJson,\n );\n\n return (rawInputFile?: string) => {\n if (rawInputFile === undefined) {\n return `${templateFile}\\n`;\n }\n\n const replacedFile = replaceManagedSection(\n rawInputFile.replace(/\\r?\\n/g, '\\n'),\n templateFile,\n );\n\n if (replacedFile.includes(templateFile)) {\n return replacedFile;\n }\n\n // Crunch the existing lines of a non-skuba config.\n const migratedFile = replacedFile\n .split('\\n')\n .filter((line) => !templatePatterns.has(line))\n .join('\\n')\n .replace(/\\n{3,}/g, '\\n\\n')\n .trim();\n\n const outputFile = [templateFile, migratedFile].join('\\n\\n').trim();\n\n return `${outputFile}\\n`;\n };\n};\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,QAAmB;AAMnB,MAAM,oBAAoB,CAAC,qBAAqB,QAAQ;AAExD,MAAM,YAAY;AAClB,MAAM,gBAAgB;AACtB,MAAM,iBAAiB;AAQhB,MAAM,mCAAmC,CAAC,aAAuB;AACtE,QAAM,MAAM,oBAAI,IAAY;AAE5B,aAAW,WAAW,UAAU;AAC9B,UAAM,eAAe,QAAQ,QAAQ,WAAW,EAAE;AAClD,UAAM,WAAW,aACd,QAAQ,eAAe,EAAE,EACzB,QAAQ,gBAAgB,EAAE;AAE7B,QAAI,IAAI,OAAO;AACf,QAAI,IAAI,YAAY;AACpB,QAAI,IAAI,aAAa,QAAQ,eAAe,EAAE,CAAC;AAC/C,QAAI,IAAI,aAAa,QAAQ,gBAAgB,EAAE,CAAC;AAChD,QAAI,IAAI,QAAQ;AAEhB,QAAI,aAAa,IAAI;AACnB,UAAI,IAAI,IAAI,QAAQ,EAAE;AACtB,UAAI,IAAI,GAAG,QAAQ,GAAG;AACtB,UAAI,IAAI,IAAI,QAAQ,GAAG;AAAA,IACzB;AAAA,EACF;AAEA,MAAI,OAAO,EAAE;AAEb,SAAO;AACT;AAEA,MAAM,6BAA6B,CACjC,cACA,gBACG;AACH,MAAI,CAAC,aAAa;AAChB,WAAO;AAAA,EACT;AACA,MAAI;AACJ,MAAI;AACF,cAAU,KAAK,MAAM,WAAW;AAAA,EAClC,QAAQ;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AAA,IACA;AAAA,EACF;AAEA,SAAO,CAAC,iBAA0B;AAChC,QAAI,iBAAiB,QAAW;AAC9B,aAAO,GAAG,YAAY;AAAA;AAAA,IACxB;AAEA,UAAM,eAAe;AAAA,MACnB,aAAa,QAAQ,UAAU,IAAI;AAAA,MACnC;AAAA,IACF;AAEA,QAAI,aAAa,SAAS,YAAY,GAAG;AACvC,aAAO;AAAA,IACT;AAGA,UAAM,eAAe,aAClB,MAAM,IAAI,EACV,OAAO,CAAC,SAAS,CAAC,iBAAiB,IAAI,IAAI,CAAC,EAC5C,KAAK,IAAI,EACT,QAAQ,WAAW,MAAM,EACzB,KAAK;AAER,UAAM,aAAa,CAAC,cAAc,YAAY,EAAE,KAAK,MAAM,EAAE,KAAK;AAElE,WAAO,GAAG,UAAU;AAAA;AAAA,EACtB;AACF;",
6
6
  "names": []
7
7
  }
@@ -1,31 +1,5 @@
1
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 deleteFiles_exports = {};
20
- __export(deleteFiles_exports, {
21
- deleteFiles: () => deleteFiles
22
- });
23
- module.exports = __toCommonJS(deleteFiles_exports);
24
- const deleteFiles = (...filenames) => Object.fromEntries(
2
+ export const deleteFiles = (...filenames) => Object.fromEntries(
25
3
  filenames.map((filename) => [filename, () => void 0])
26
4
  );
27
- // Annotate the CommonJS export names for ESM import in node:
28
- 0 && (module.exports = {
29
- deleteFiles
30
- });
31
5
  //# sourceMappingURL=deleteFiles.js.map
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/cli/configure/processing/deleteFiles.ts"],
4
4
  "sourcesContent": ["import type { Module } from '../types.js';\n\n/**\n * Load files into cache and schedule them for deletion.\n */\nexport const deleteFiles = (...filenames: string[]): Module =>\n Object.fromEntries(\n filenames.map((filename) => [filename, () => undefined] as const),\n );\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAKO,MAAM,cAAc,IAAI,cAC7B,OAAO;AAAA,EACL,UAAU,IAAI,CAAC,aAAa,CAAC,UAAU,MAAM,MAAS,CAAU;AAClE;",
5
+ "mappings": ";AAKO,aAAM,cAAc,IAAI,cAC7B,OAAO;AAAA,EACL,UAAU,IAAI,CAAC,aAAa,CAAC,UAAU,MAAM,MAAS,CAAU;AAClE;",
6
6
  "names": []
7
7
  }
@@ -1,38 +1,10 @@
1
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 javascript_exports = {};
20
- __export(javascript_exports, {
21
- prependImport: () => prependImport,
22
- stripImports: () => stripImports
23
- });
24
- module.exports = __toCommonJS(javascript_exports);
25
- const prependImport = (name, file) => [`import '${name}';
2
+ export const prependImport = (name, file) => [`import '${name}';
26
3
  `, file].filter((value) => value !== void 0).join("\n");
27
- const stripImports = (names, inputFile) => {
4
+ export const stripImports = (names, inputFile) => {
28
5
  const searchStrings = names.flatMap((name) => [`'${name}'`, `"${name}"`]);
29
6
  const outputFile = inputFile.split(/\r?\n/).filter((line) => !searchStrings.some((str) => line.includes(str))).join("\n").trim();
30
7
  return `${outputFile}
31
8
  `;
32
9
  };
33
- // Annotate the CommonJS export names for ESM import in node:
34
- 0 && (module.exports = {
35
- prependImport,
36
- stripImports
37
- });
38
10
  //# sourceMappingURL=javascript.js.map
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/cli/configure/processing/javascript.ts"],
4
4
  "sourcesContent": ["export const prependImport = (name: string, file?: string) =>\n [`import '${name}';\\n`, file]\n .filter((value) => value !== undefined)\n .join('\\n');\n\nexport const stripImports = (names: readonly string[], inputFile: string) => {\n const searchStrings = names.flatMap((name) => [`'${name}'`, `\"${name}\"`]);\n\n const outputFile = inputFile\n .split(/\\r?\\n/)\n .filter((line) => !searchStrings.some((str) => line.includes(str)))\n .join('\\n')\n .trim();\n\n return `${outputFile}\\n`;\n};\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAO,MAAM,gBAAgB,CAAC,MAAc,SAC1C,CAAC,WAAW,IAAI;AAAA,GAAQ,IAAI,EACzB,OAAO,CAAC,UAAU,UAAU,MAAS,EACrC,KAAK,IAAI;AAEP,MAAM,eAAe,CAAC,OAA0B,cAAsB;AAC3E,QAAM,gBAAgB,MAAM,QAAQ,CAAC,SAAS,CAAC,IAAI,IAAI,KAAK,IAAI,IAAI,GAAG,CAAC;AAExE,QAAM,aAAa,UAChB,MAAM,OAAO,EACb,OAAO,CAAC,SAAS,CAAC,cAAc,KAAK,CAAC,QAAQ,KAAK,SAAS,GAAG,CAAC,CAAC,EACjE,KAAK,IAAI,EACT,KAAK;AAER,SAAO,GAAG,UAAU;AAAA;AACtB;",
5
+ "mappings": ";AAAO,aAAM,gBAAgB,CAAC,MAAc,SAC1C,CAAC,WAAW,IAAI;AAAA,GAAQ,IAAI,EACzB,OAAO,CAAC,UAAU,UAAU,MAAS,EACrC,KAAK,IAAI;AAEP,aAAM,eAAe,CAAC,OAA0B,cAAsB;AAC3E,QAAM,gBAAgB,MAAM,QAAQ,CAAC,SAAS,CAAC,IAAI,IAAI,KAAK,IAAI,IAAI,GAAG,CAAC;AAExE,QAAM,aAAa,UAChB,MAAM,OAAO,EACb,OAAO,CAAC,SAAS,CAAC,cAAc,KAAK,CAAC,QAAQ,KAAK,SAAS,GAAG,CAAC,CAAC,EACjE,KAAK,IAAI,EACT,KAAK;AAER,SAAO,GAAG,UAAU;AAAA;AACtB;",
6
6
  "names": []
7
7
  }
@@ -1,57 +1,29 @@
1
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 json_exports = {};
20
- __export(json_exports, {
21
- formatObject: () => formatObject,
22
- parseObject: () => parseObject
23
- });
24
- module.exports = __toCommonJS(json_exports);
25
- var import_validation = require("../../../utils/validation.js");
26
- var import_prettier = require("./prettier.js");
27
- const formatObject = (data, filepath) => {
2
+ import { isObject } from "../../../utils/validation.js";
3
+ import { formatPrettier } from "./prettier.js";
4
+ export const formatObject = (data, filepath) => {
28
5
  const sortedData = Object.fromEntries(
29
6
  Object.entries(data).sort(
30
7
  ([keyA], [keyB]) => String(keyA).localeCompare(String(keyB))
31
8
  )
32
9
  );
33
10
  const output = JSON.stringify(sortedData, null, 2);
34
- return (0, import_prettier.formatPrettier)(
11
+ return formatPrettier(
35
12
  output,
36
13
  filepath === void 0 ? { parser: "json" } : { filepath }
37
14
  );
38
15
  };
39
- const parseObject = (input) => {
16
+ export const parseObject = (input) => {
40
17
  if (input === void 0) {
41
18
  return;
42
19
  }
43
20
  try {
44
21
  const data = JSON.parse(input);
45
- if ((0, import_validation.isObject)(data)) {
22
+ if (isObject(data)) {
46
23
  return data;
47
24
  }
48
25
  } catch {
49
26
  }
50
27
  return;
51
28
  };
52
- // Annotate the CommonJS export names for ESM import in node:
53
- 0 && (module.exports = {
54
- formatObject,
55
- parseObject
56
- });
57
29
  //# sourceMappingURL=json.js.map