create-typescript-app 2.45.0 → 2.46.1

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 (549) hide show
  1. package/lib/base.d.ts +170 -167
  2. package/lib/base.d.ts.map +1 -0
  3. package/lib/base.js +132 -204
  4. package/lib/base.js.map +1 -0
  5. package/lib/blocks/actions/resolveUses.d.ts +5 -2
  6. package/lib/blocks/actions/resolveUses.d.ts.map +1 -0
  7. package/lib/blocks/actions/resolveUses.js +13 -20
  8. package/lib/blocks/actions/resolveUses.js.map +1 -0
  9. package/lib/blocks/actions/steps.d.ts +25 -21
  10. package/lib/blocks/actions/steps.d.ts.map +1 -0
  11. package/lib/blocks/actions/steps.js +18 -23
  12. package/lib/blocks/actions/steps.js.map +1 -0
  13. package/lib/blocks/bin/getPrimaryBin.d.ts +4 -0
  14. package/lib/blocks/bin/getPrimaryBin.d.ts.map +1 -0
  15. package/lib/blocks/bin/getPrimaryBin.js +6 -4
  16. package/lib/blocks/bin/getPrimaryBin.js.map +1 -0
  17. package/lib/blocks/blockAllContributors.d.ts +70 -67
  18. package/lib/blocks/blockAllContributors.d.ts.map +1 -0
  19. package/lib/blocks/blockAllContributors.js +122 -170
  20. package/lib/blocks/blockAllContributors.js.map +1 -0
  21. package/lib/blocks/blockAreTheTypesWrong.d.ts +70 -67
  22. package/lib/blocks/blockAreTheTypesWrong.d.ts.map +1 -0
  23. package/lib/blocks/blockAreTheTypesWrong.js +13 -25
  24. package/lib/blocks/blockAreTheTypesWrong.js.map +1 -0
  25. package/lib/blocks/blockCSpell.d.ts +72 -69
  26. package/lib/blocks/blockCSpell.d.ts.map +1 -0
  27. package/lib/blocks/blockCSpell.js +68 -105
  28. package/lib/blocks/blockCSpell.js.map +1 -0
  29. package/lib/blocks/blockCTATransitions.d.ts +70 -67
  30. package/lib/blocks/blockCTATransitions.d.ts.map +1 -0
  31. package/lib/blocks/blockCTATransitions.js +108 -158
  32. package/lib/blocks/blockCTATransitions.js.map +1 -0
  33. package/lib/blocks/blockCodecov.d.ts +71 -68
  34. package/lib/blocks/blockCodecov.d.ts.map +1 -0
  35. package/lib/blocks/blockCodecov.js +48 -75
  36. package/lib/blocks/blockCodecov.js.map +1 -0
  37. package/lib/blocks/blockContributingDocs.d.ts +70 -67
  38. package/lib/blocks/blockContributingDocs.d.ts.map +1 -0
  39. package/lib/blocks/blockContributingDocs.js +14 -21
  40. package/lib/blocks/blockContributingDocs.js.map +1 -0
  41. package/lib/blocks/blockContributorCovenant.d.ts +70 -67
  42. package/lib/blocks/blockContributorCovenant.d.ts.map +1 -0
  43. package/lib/blocks/blockContributorCovenant.js +23 -37
  44. package/lib/blocks/blockContributorCovenant.js.map +1 -0
  45. package/lib/blocks/blockDevelopmentDocs.d.ts +83 -80
  46. package/lib/blocks/blockDevelopmentDocs.d.ts.map +1 -0
  47. package/lib/blocks/blockDevelopmentDocs.js +64 -74
  48. package/lib/blocks/blockDevelopmentDocs.js.map +1 -0
  49. package/lib/blocks/blockESLint.d.ts +95 -92
  50. package/lib/blocks/blockESLint.d.ts.map +1 -0
  51. package/lib/blocks/blockESLint.js +169 -263
  52. package/lib/blocks/blockESLint.js.map +1 -0
  53. package/lib/blocks/blockESLintComments.d.ts +70 -67
  54. package/lib/blocks/blockESLintComments.d.ts.map +1 -0
  55. package/lib/blocks/blockESLintComments.js +16 -21
  56. package/lib/blocks/blockESLintComments.js.map +1 -0
  57. package/lib/blocks/blockESLintJSDoc.d.ts +70 -67
  58. package/lib/blocks/blockESLintJSDoc.d.ts.map +1 -0
  59. package/lib/blocks/blockESLintJSDoc.js +20 -20
  60. package/lib/blocks/blockESLintJSDoc.js.map +1 -0
  61. package/lib/blocks/blockESLintJSONC.d.ts +70 -67
  62. package/lib/blocks/blockESLintJSONC.d.ts.map +1 -0
  63. package/lib/blocks/blockESLintJSONC.js +16 -16
  64. package/lib/blocks/blockESLintJSONC.js.map +1 -0
  65. package/lib/blocks/blockESLintMarkdown.d.ts +70 -67
  66. package/lib/blocks/blockESLintMarkdown.d.ts.map +1 -0
  67. package/lib/blocks/blockESLintMarkdown.js +17 -22
  68. package/lib/blocks/blockESLintMarkdown.js.map +1 -0
  69. package/lib/blocks/blockESLintMoreStyling.d.ts +70 -67
  70. package/lib/blocks/blockESLintMoreStyling.d.ts.map +1 -0
  71. package/lib/blocks/blockESLintMoreStyling.js +22 -30
  72. package/lib/blocks/blockESLintMoreStyling.js.map +1 -0
  73. package/lib/blocks/blockESLintNode.d.ts +70 -67
  74. package/lib/blocks/blockESLintNode.d.ts.map +1 -0
  75. package/lib/blocks/blockESLintNode.js +20 -23
  76. package/lib/blocks/blockESLintNode.js.map +1 -0
  77. package/lib/blocks/blockESLintPackageJson.d.ts +70 -67
  78. package/lib/blocks/blockESLintPackageJson.d.ts.map +1 -0
  79. package/lib/blocks/blockESLintPackageJson.js +26 -49
  80. package/lib/blocks/blockESLintPackageJson.js.map +1 -0
  81. package/lib/blocks/blockESLintPerfectionist.d.ts +70 -67
  82. package/lib/blocks/blockESLintPerfectionist.d.ts.map +1 -0
  83. package/lib/blocks/blockESLintPerfectionist.js +20 -27
  84. package/lib/blocks/blockESLintPerfectionist.js.map +1 -0
  85. package/lib/blocks/blockESLintPlugin.d.ts +71 -68
  86. package/lib/blocks/blockESLintPlugin.d.ts.map +1 -0
  87. package/lib/blocks/blockESLintPlugin.js +89 -137
  88. package/lib/blocks/blockESLintPlugin.js.map +1 -0
  89. package/lib/blocks/blockESLintRegexp.d.ts +70 -67
  90. package/lib/blocks/blockESLintRegexp.d.ts.map +1 -0
  91. package/lib/blocks/blockESLintRegexp.js +16 -18
  92. package/lib/blocks/blockESLintRegexp.js.map +1 -0
  93. package/lib/blocks/blockESLintYML.d.ts +70 -67
  94. package/lib/blocks/blockESLintYML.d.ts.map +1 -0
  95. package/lib/blocks/blockESLintYML.js +30 -41
  96. package/lib/blocks/blockESLintYML.js.map +1 -0
  97. package/lib/blocks/blockExampleFiles.d.ts +72 -69
  98. package/lib/blocks/blockExampleFiles.d.ts.map +1 -0
  99. package/lib/blocks/blockExampleFiles.js +22 -29
  100. package/lib/blocks/blockExampleFiles.js.map +1 -0
  101. package/lib/blocks/blockFunding.d.ts +70 -67
  102. package/lib/blocks/blockFunding.d.ts.map +1 -0
  103. package/lib/blocks/blockFunding.js +10 -15
  104. package/lib/blocks/blockFunding.js.map +1 -0
  105. package/lib/blocks/blockGitHubActionsCI.d.ts +85 -82
  106. package/lib/blocks/blockGitHubActionsCI.d.ts.map +1 -0
  107. package/lib/blocks/blockGitHubActionsCI.js +83 -134
  108. package/lib/blocks/blockGitHubActionsCI.js.map +1 -0
  109. package/lib/blocks/blockGitHubApps.d.ts +74 -71
  110. package/lib/blocks/blockGitHubApps.d.ts.map +1 -0
  111. package/lib/blocks/blockGitHubApps.js +15 -24
  112. package/lib/blocks/blockGitHubApps.js.map +1 -0
  113. package/lib/blocks/blockGitHubIssueTemplates.d.ts +70 -67
  114. package/lib/blocks/blockGitHubIssueTemplates.d.ts.map +1 -0
  115. package/lib/blocks/blockGitHubIssueTemplates.js +185 -204
  116. package/lib/blocks/blockGitHubIssueTemplates.js.map +1 -0
  117. package/lib/blocks/blockGitHubPRTemplate.d.ts +70 -67
  118. package/lib/blocks/blockGitHubPRTemplate.d.ts.map +1 -0
  119. package/lib/blocks/blockGitHubPRTemplate.js +11 -16
  120. package/lib/blocks/blockGitHubPRTemplate.js.map +1 -0
  121. package/lib/blocks/blockGitignore.d.ts +71 -68
  122. package/lib/blocks/blockGitignore.d.ts.map +1 -0
  123. package/lib/blocks/blockGitignore.js +13 -18
  124. package/lib/blocks/blockGitignore.js.map +1 -0
  125. package/lib/blocks/blockKnip.d.ts +73 -70
  126. package/lib/blocks/blockKnip.d.ts.map +1 -0
  127. package/lib/blocks/blockKnip.js +60 -88
  128. package/lib/blocks/blockKnip.js.map +1 -0
  129. package/lib/blocks/blockMITLicense.d.ts +70 -67
  130. package/lib/blocks/blockMITLicense.d.ts.map +1 -0
  131. package/lib/blocks/blockMITLicense.js +21 -31
  132. package/lib/blocks/blockMITLicense.js.map +1 -0
  133. package/lib/blocks/blockMain.d.ts +72 -69
  134. package/lib/blocks/blockMain.d.ts.map +1 -0
  135. package/lib/blocks/blockMain.js +17 -29
  136. package/lib/blocks/blockMain.js.map +1 -0
  137. package/lib/blocks/blockMarkdownlint.d.ts +71 -68
  138. package/lib/blocks/blockMarkdownlint.d.ts.map +1 -0
  139. package/lib/blocks/blockMarkdownlint.js +55 -94
  140. package/lib/blocks/blockMarkdownlint.js.map +1 -0
  141. package/lib/blocks/blockNcc.d.ts +71 -68
  142. package/lib/blocks/blockNcc.d.ts.map +1 -0
  143. package/lib/blocks/blockNcc.js +44 -72
  144. package/lib/blocks/blockNcc.js.map +1 -0
  145. package/lib/blocks/blockNvmrc.d.ts +70 -67
  146. package/lib/blocks/blockNvmrc.d.ts.map +1 -0
  147. package/lib/blocks/blockNvmrc.js +16 -21
  148. package/lib/blocks/blockNvmrc.js.map +1 -0
  149. package/lib/blocks/blockOctoGuide.d.ts +71 -68
  150. package/lib/blocks/blockOctoGuide.d.ts.map +1 -0
  151. package/lib/blocks/blockOctoGuide.js +65 -93
  152. package/lib/blocks/blockOctoGuide.js.map +1 -0
  153. package/lib/blocks/blockOctoGuideStrict.d.ts +70 -67
  154. package/lib/blocks/blockOctoGuideStrict.d.ts.map +1 -0
  155. package/lib/blocks/blockOctoGuideStrict.js +10 -15
  156. package/lib/blocks/blockOctoGuideStrict.js.map +1 -0
  157. package/lib/blocks/blockPackageJson.d.ts +144 -141
  158. package/lib/blocks/blockPackageJson.d.ts.map +1 -0
  159. package/lib/blocks/blockPackageJson.js +82 -113
  160. package/lib/blocks/blockPackageJson.js.map +1 -0
  161. package/lib/blocks/blockPnpmDedupe.d.ts +70 -67
  162. package/lib/blocks/blockPnpmDedupe.d.ts.map +1 -0
  163. package/lib/blocks/blockPnpmDedupe.js +24 -49
  164. package/lib/blocks/blockPnpmDedupe.js.map +1 -0
  165. package/lib/blocks/blockPrettier.d.ts +79 -76
  166. package/lib/blocks/blockPrettier.d.ts.map +1 -0
  167. package/lib/blocks/blockPrettier.js +82 -116
  168. package/lib/blocks/blockPrettier.js.map +1 -0
  169. package/lib/blocks/blockPrettierPluginCurly.d.ts +70 -67
  170. package/lib/blocks/blockPrettierPluginCurly.d.ts.map +1 -0
  171. package/lib/blocks/blockPrettierPluginCurly.js +10 -15
  172. package/lib/blocks/blockPrettierPluginCurly.js.map +1 -0
  173. package/lib/blocks/blockPrettierPluginPackageJson.d.ts +70 -67
  174. package/lib/blocks/blockPrettierPluginPackageJson.d.ts.map +1 -0
  175. package/lib/blocks/blockPrettierPluginPackageJson.js +10 -15
  176. package/lib/blocks/blockPrettierPluginPackageJson.js.map +1 -0
  177. package/lib/blocks/blockPrettierPluginSh.d.ts +70 -67
  178. package/lib/blocks/blockPrettierPluginSh.d.ts.map +1 -0
  179. package/lib/blocks/blockPrettierPluginSh.js +10 -15
  180. package/lib/blocks/blockPrettierPluginSh.js.map +1 -0
  181. package/lib/blocks/blockREADME.d.ts +82 -79
  182. package/lib/blocks/blockREADME.d.ts.map +1 -0
  183. package/lib/blocks/blockREADME.js +46 -60
  184. package/lib/blocks/blockREADME.js.map +1 -0
  185. package/lib/blocks/blockReleaseIt.d.ts +74 -71
  186. package/lib/blocks/blockReleaseIt.d.ts.map +1 -0
  187. package/lib/blocks/blockReleaseIt.js +152 -181
  188. package/lib/blocks/blockReleaseIt.js.map +1 -0
  189. package/lib/blocks/blockRemoveDependencies.d.ts +71 -68
  190. package/lib/blocks/blockRemoveDependencies.d.ts.map +1 -0
  191. package/lib/blocks/blockRemoveDependencies.js +18 -27
  192. package/lib/blocks/blockRemoveDependencies.js.map +1 -0
  193. package/lib/blocks/blockRemoveFiles.d.ts +71 -68
  194. package/lib/blocks/blockRemoveFiles.d.ts.map +1 -0
  195. package/lib/blocks/blockRemoveFiles.js +19 -28
  196. package/lib/blocks/blockRemoveFiles.js.map +1 -0
  197. package/lib/blocks/blockRemoveWorkflows.d.ts +71 -68
  198. package/lib/blocks/blockRemoveWorkflows.d.ts.map +1 -0
  199. package/lib/blocks/blockRemoveWorkflows.js +16 -27
  200. package/lib/blocks/blockRemoveWorkflows.js.map +1 -0
  201. package/lib/blocks/blockRenovate.d.ts +71 -68
  202. package/lib/blocks/blockRenovate.d.ts.map +1 -0
  203. package/lib/blocks/blockRenovate.js +37 -52
  204. package/lib/blocks/blockRenovate.js.map +1 -0
  205. package/lib/blocks/blockRepositoryBranchRuleset.d.ts +71 -68
  206. package/lib/blocks/blockRepositoryBranchRuleset.d.ts.map +1 -0
  207. package/lib/blocks/blockRepositoryBranchRuleset.js +77 -107
  208. package/lib/blocks/blockRepositoryBranchRuleset.js.map +1 -0
  209. package/lib/blocks/blockRepositoryLabels.d.ts +70 -67
  210. package/lib/blocks/blockRepositoryLabels.d.ts.map +1 -0
  211. package/lib/blocks/blockRepositoryLabels.js +51 -58
  212. package/lib/blocks/blockRepositoryLabels.js.map +1 -0
  213. package/lib/blocks/blockRepositorySecrets.d.ts +74 -71
  214. package/lib/blocks/blockRepositorySecrets.d.ts.map +1 -0
  215. package/lib/blocks/blockRepositorySecrets.js +15 -26
  216. package/lib/blocks/blockRepositorySecrets.js.map +1 -0
  217. package/lib/blocks/blockRepositorySettings.d.ts +70 -67
  218. package/lib/blocks/blockRepositorySettings.d.ts.map +1 -0
  219. package/lib/blocks/blockRepositorySettings.js +32 -39
  220. package/lib/blocks/blockRepositorySettings.js.map +1 -0
  221. package/lib/blocks/blockSecurityDocs.d.ts +70 -67
  222. package/lib/blocks/blockSecurityDocs.d.ts.map +1 -0
  223. package/lib/blocks/blockSecurityDocs.js +11 -16
  224. package/lib/blocks/blockSecurityDocs.js.map +1 -0
  225. package/lib/blocks/blockTSDown.d.ts +79 -0
  226. package/lib/blocks/blockTSDown.d.ts.map +1 -0
  227. package/lib/blocks/blockTSDown.js +111 -0
  228. package/lib/blocks/blockTSDown.js.map +1 -0
  229. package/lib/blocks/blockTemplatedWith.d.ts +70 -67
  230. package/lib/blocks/blockTemplatedWith.d.ts.map +1 -0
  231. package/lib/blocks/blockTemplatedWith.js +12 -20
  232. package/lib/blocks/blockTemplatedWith.js.map +1 -0
  233. package/lib/blocks/blockTypeScript.d.ts +181 -178
  234. package/lib/blocks/blockTypeScript.d.ts.map +1 -0
  235. package/lib/blocks/blockTypeScript.js +94 -127
  236. package/lib/blocks/blockTypeScript.js.map +1 -0
  237. package/lib/blocks/blockVSCode.d.ts +78 -75
  238. package/lib/blocks/blockVSCode.d.ts.map +1 -0
  239. package/lib/blocks/blockVSCode.js +51 -81
  240. package/lib/blocks/blockVSCode.js.map +1 -0
  241. package/lib/blocks/blockVitest.d.ts +86 -83
  242. package/lib/blocks/blockVitest.d.ts.map +1 -0
  243. package/lib/blocks/blockVitest.js +115 -168
  244. package/lib/blocks/blockVitest.js.map +1 -0
  245. package/lib/blocks/blockWebExt.d.ts +70 -67
  246. package/lib/blocks/blockWebExt.d.ts.map +1 -0
  247. package/lib/blocks/blockWebExt.js +59 -83
  248. package/lib/blocks/blockWebExt.js.map +1 -0
  249. package/lib/blocks/eslint/blockESLintIntake.d.ts +9 -6
  250. package/lib/blocks/eslint/blockESLintIntake.d.ts.map +1 -0
  251. package/lib/blocks/eslint/blockESLintIntake.js +84 -111
  252. package/lib/blocks/eslint/blockESLintIntake.js.map +1 -0
  253. package/lib/blocks/eslint/blockESLintPluginIntake.d.ts +5 -2
  254. package/lib/blocks/eslint/blockESLintPluginIntake.d.ts.map +1 -0
  255. package/lib/blocks/eslint/blockESLintPluginIntake.js +26 -44
  256. package/lib/blocks/eslint/blockESLintPluginIntake.js.map +1 -0
  257. package/lib/blocks/eslint/schemas.d.ts +77 -73
  258. package/lib/blocks/eslint/schemas.d.ts.map +1 -0
  259. package/lib/blocks/eslint/schemas.js +31 -36
  260. package/lib/blocks/eslint/schemas.js.map +1 -0
  261. package/lib/blocks/files/createJobName.d.ts +4 -0
  262. package/lib/blocks/files/createJobName.d.ts.map +1 -0
  263. package/lib/blocks/files/createJobName.js +6 -4
  264. package/lib/blocks/files/createJobName.js.map +1 -0
  265. package/lib/blocks/files/createMultiWorkflowFile.d.ts +21 -14
  266. package/lib/blocks/files/createMultiWorkflowFile.d.ts.map +1 -0
  267. package/lib/blocks/files/createMultiWorkflowFile.js +27 -35
  268. package/lib/blocks/files/createMultiWorkflowFile.js.map +1 -0
  269. package/lib/blocks/files/createSoloWorkflowFile.d.ts +61 -52
  270. package/lib/blocks/files/createSoloWorkflowFile.d.ts.map +1 -0
  271. package/lib/blocks/files/createSoloWorkflowFile.js +19 -25
  272. package/lib/blocks/files/createSoloWorkflowFile.js.map +1 -0
  273. package/lib/blocks/files/formatIgnoreFile.d.ts +4 -0
  274. package/lib/blocks/files/formatIgnoreFile.d.ts.map +1 -0
  275. package/lib/blocks/files/formatIgnoreFile.js +6 -4
  276. package/lib/blocks/files/formatIgnoreFile.js.map +1 -0
  277. package/lib/blocks/files/formatWorkflowYaml.d.ts +4 -0
  278. package/lib/blocks/files/formatWorkflowYaml.d.ts.map +1 -0
  279. package/lib/blocks/files/formatWorkflowYaml.js +7 -4
  280. package/lib/blocks/files/formatWorkflowYaml.js.map +1 -0
  281. package/lib/blocks/files/formatYaml.d.ts +4 -0
  282. package/lib/blocks/files/formatYaml.d.ts.map +1 -0
  283. package/lib/blocks/files/formatYaml.js +16 -21
  284. package/lib/blocks/files/formatYaml.js.map +1 -0
  285. package/lib/blocks/files/removeUsesQuotes.d.ts +4 -0
  286. package/lib/blocks/files/removeUsesQuotes.d.ts.map +1 -0
  287. package/lib/blocks/files/removeUsesQuotes.js +6 -7
  288. package/lib/blocks/files/removeUsesQuotes.js.map +1 -0
  289. package/lib/blocks/getInstallationSuggestions.d.ts +4 -0
  290. package/lib/blocks/getInstallationSuggestions.d.ts.map +1 -0
  291. package/lib/blocks/getInstallationSuggestions.js +11 -12
  292. package/lib/blocks/getInstallationSuggestions.js.map +1 -0
  293. package/lib/blocks/index.d.ts +3646 -3644
  294. package/lib/blocks/index.d.ts.map +1 -0
  295. package/lib/blocks/index.js +83 -177
  296. package/lib/blocks/index.js.map +1 -0
  297. package/lib/blocks/intake/intakeFile.d.ts +5 -1
  298. package/lib/blocks/intake/intakeFile.d.ts.map +1 -0
  299. package/lib/blocks/intake/intakeFile.js +12 -18
  300. package/lib/blocks/intake/intakeFile.js.map +1 -0
  301. package/lib/blocks/intake/intakeFileAsJson.d.ts +5 -1
  302. package/lib/blocks/intake/intakeFileAsJson.d.ts.map +1 -0
  303. package/lib/blocks/intake/intakeFileAsJson.js +13 -10
  304. package/lib/blocks/intake/intakeFileAsJson.js.map +1 -0
  305. package/lib/blocks/intake/intakeFileAsYaml.d.ts +5 -1
  306. package/lib/blocks/intake/intakeFileAsYaml.d.ts.map +1 -0
  307. package/lib/blocks/intake/intakeFileAsYaml.js +13 -10
  308. package/lib/blocks/intake/intakeFileAsYaml.js.map +1 -0
  309. package/lib/blocks/intake/intakeFileDefineConfig.d.ts +5 -1
  310. package/lib/blocks/intake/intakeFileDefineConfig.d.ts.map +1 -0
  311. package/lib/blocks/intake/intakeFileDefineConfig.js +20 -23
  312. package/lib/blocks/intake/intakeFileDefineConfig.js.map +1 -0
  313. package/lib/blocks/options.fakes.d.ts +23 -20
  314. package/lib/blocks/options.fakes.d.ts.map +1 -0
  315. package/lib/blocks/options.fakes.js +19 -23
  316. package/lib/blocks/options.fakes.js.map +1 -0
  317. package/lib/blocks/outcomeLabels.d.ts +12 -9
  318. package/lib/blocks/outcomeLabels.d.ts.map +1 -0
  319. package/lib/blocks/outcomeLabels.js +93 -92
  320. package/lib/blocks/outcomeLabels.js.map +1 -0
  321. package/lib/blocks/phases.d.ts +9 -6
  322. package/lib/blocks/phases.d.ts.map +1 -0
  323. package/lib/blocks/phases.js +10 -8
  324. package/lib/blocks/phases.js.map +1 -0
  325. package/lib/constants.d.ts +8 -5
  326. package/lib/constants.d.ts.map +1 -0
  327. package/lib/constants.js +9 -9
  328. package/lib/constants.js.map +1 -0
  329. package/lib/data/contributions.d.ts +4 -0
  330. package/lib/data/contributions.d.ts.map +1 -0
  331. package/lib/data/contributions.js +13 -11
  332. package/lib/data/contributions.js.map +1 -0
  333. package/lib/data/packageData.d.ts +7 -166
  334. package/lib/data/packageData.d.ts.map +1 -0
  335. package/lib/data/packageData.js +16 -24
  336. package/lib/data/packageData.js.map +1 -0
  337. package/lib/index.d.ts +290 -288
  338. package/lib/index.d.ts.map +1 -0
  339. package/lib/index.js +61 -7
  340. package/lib/index.js.map +1 -0
  341. package/lib/inputs/inputFromDirectory.d.ts +8 -4
  342. package/lib/inputs/inputFromDirectory.d.ts.map +1 -0
  343. package/lib/inputs/inputFromDirectory.js +11 -10
  344. package/lib/inputs/inputFromDirectory.js.map +1 -0
  345. package/lib/inputs/inputFromOctokit.d.ts +9 -5
  346. package/lib/inputs/inputFromOctokit.d.ts.map +1 -0
  347. package/lib/inputs/inputFromOctokit.js +23 -24
  348. package/lib/inputs/inputFromOctokit.js.map +1 -0
  349. package/lib/options/readAccess.d.ts +5 -1
  350. package/lib/options/readAccess.d.ts.map +1 -0
  351. package/lib/options/readAccess.js +6 -4
  352. package/lib/options/readAccess.js.map +1 -0
  353. package/lib/options/readAllContributors.d.ts +6 -2
  354. package/lib/options/readAllContributors.d.ts.map +1 -0
  355. package/lib/options/readAllContributors.js +17 -22
  356. package/lib/options/readAllContributors.js.map +1 -0
  357. package/lib/options/readAuthor.d.ts +6 -3
  358. package/lib/options/readAuthor.d.ts.map +1 -0
  359. package/lib/options/readAuthor.js +6 -4
  360. package/lib/options/readAuthor.js.map +1 -0
  361. package/lib/options/readBin.d.ts +5 -1
  362. package/lib/options/readBin.d.ts.map +1 -0
  363. package/lib/options/readBin.js +8 -10
  364. package/lib/options/readBin.js.map +1 -0
  365. package/lib/options/readDescription.d.ts +5 -1
  366. package/lib/options/readDescription.d.ts.map +1 -0
  367. package/lib/options/readDescription.js +16 -23
  368. package/lib/options/readDescription.js.map +1 -0
  369. package/lib/options/readDescriptionFromReadme.d.ts +4 -0
  370. package/lib/options/readDescriptionFromReadme.d.ts.map +1 -0
  371. package/lib/options/readDescriptionFromReadme.js +11 -13
  372. package/lib/options/readDescriptionFromReadme.js.map +1 -0
  373. package/lib/options/readDevelopmentDocumentation.d.ts +5 -1
  374. package/lib/options/readDevelopmentDocumentation.d.ts.map +1 -0
  375. package/lib/options/readDevelopmentDocumentation.js +18 -21
  376. package/lib/options/readDevelopmentDocumentation.js.map +1 -0
  377. package/lib/options/readDocumentation.d.ts +5 -2
  378. package/lib/options/readDocumentation.d.ts.map +1 -0
  379. package/lib/options/readDocumentation.js +21 -19
  380. package/lib/options/readDocumentation.js.map +1 -0
  381. package/lib/options/readEmailFromCodeOfConduct.d.ts +5 -1
  382. package/lib/options/readEmailFromCodeOfConduct.d.ts.map +1 -0
  383. package/lib/options/readEmailFromCodeOfConduct.js +8 -7
  384. package/lib/options/readEmailFromCodeOfConduct.js.map +1 -0
  385. package/lib/options/readEmailFromGit.d.ts +5 -1
  386. package/lib/options/readEmailFromGit.d.ts.map +1 -0
  387. package/lib/options/readEmailFromGit.js +7 -4
  388. package/lib/options/readEmailFromGit.js.map +1 -0
  389. package/lib/options/readEmailFromNpm.d.ts +6 -3
  390. package/lib/options/readEmailFromNpm.d.ts.map +1 -0
  391. package/lib/options/readEmailFromNpm.js +6 -4
  392. package/lib/options/readEmailFromNpm.js.map +1 -0
  393. package/lib/options/readEmails.d.ts +7 -4
  394. package/lib/options/readEmails.d.ts.map +1 -0
  395. package/lib/options/readEmails.js +11 -6
  396. package/lib/options/readEmails.js.map +1 -0
  397. package/lib/options/readEmoji.d.ts +4 -0
  398. package/lib/options/readEmoji.d.ts.map +1 -0
  399. package/lib/options/readEmoji.js +6 -4
  400. package/lib/options/readEmoji.js.map +1 -0
  401. package/lib/options/readExistingLabels.d.ts +8 -4
  402. package/lib/options/readExistingLabels.d.ts.map +1 -0
  403. package/lib/options/readExistingLabels.js +21 -20
  404. package/lib/options/readExistingLabels.js.map +1 -0
  405. package/lib/options/readFileAsJson.d.ts +4 -0
  406. package/lib/options/readFileAsJson.d.ts.map +1 -0
  407. package/lib/options/readFileAsJson.js +11 -11
  408. package/lib/options/readFileAsJson.js.map +1 -0
  409. package/lib/options/readFileSafe.d.ts +4 -0
  410. package/lib/options/readFileSafe.d.ts.map +1 -0
  411. package/lib/options/readFileSafe.js +11 -8
  412. package/lib/options/readFileSafe.js.map +1 -0
  413. package/lib/options/readFunding.d.ts +5 -1
  414. package/lib/options/readFunding.d.ts.map +1 -0
  415. package/lib/options/readFunding.js +8 -7
  416. package/lib/options/readFunding.js.map +1 -0
  417. package/lib/options/readGitDefaults.d.ts +6 -2
  418. package/lib/options/readGitDefaults.d.ts.map +1 -0
  419. package/lib/options/readGitDefaults.js +9 -8
  420. package/lib/options/readGitDefaults.js.map +1 -0
  421. package/lib/options/readGuide.d.ts +7 -3
  422. package/lib/options/readGuide.d.ts.map +1 -0
  423. package/lib/options/readGuide.js +14 -19
  424. package/lib/options/readGuide.js.map +1 -0
  425. package/lib/options/readKeywords.d.ts +5 -1
  426. package/lib/options/readKeywords.d.ts.map +1 -0
  427. package/lib/options/readKeywords.js +7 -5
  428. package/lib/options/readKeywords.js.map +1 -0
  429. package/lib/options/readLogo.d.ts +8 -4
  430. package/lib/options/readLogo.d.ts.map +1 -0
  431. package/lib/options/readLogo.js +19 -22
  432. package/lib/options/readLogo.js.map +1 -0
  433. package/lib/options/readLogoSizing.d.ts +7 -3
  434. package/lib/options/readLogoSizing.d.ts.map +1 -0
  435. package/lib/options/readLogoSizing.js +26 -22
  436. package/lib/options/readLogoSizing.js.map +1 -0
  437. package/lib/options/readNode.d.ts +7 -3
  438. package/lib/options/readNode.d.ts.map +1 -0
  439. package/lib/options/readNode.js +12 -9
  440. package/lib/options/readNode.js.map +1 -0
  441. package/lib/options/readNpmDefaults.d.ts +7 -3
  442. package/lib/options/readNpmDefaults.d.ts.map +1 -0
  443. package/lib/options/readNpmDefaults.js +9 -6
  444. package/lib/options/readNpmDefaults.js.map +1 -0
  445. package/lib/options/readOwner.d.ts +7 -4
  446. package/lib/options/readOwner.d.ts.map +1 -0
  447. package/lib/options/readOwner.js +7 -6
  448. package/lib/options/readOwner.js.map +1 -0
  449. package/lib/options/readPackageAuthor.d.ts +8 -4
  450. package/lib/options/readPackageAuthor.d.ts.map +1 -0
  451. package/lib/options/readPackageAuthor.js +12 -12
  452. package/lib/options/readPackageAuthor.js.map +1 -0
  453. package/lib/options/readPackageData.d.ts +6 -2
  454. package/lib/options/readPackageData.d.ts.map +1 -0
  455. package/lib/options/readPackageData.js +8 -9
  456. package/lib/options/readPackageData.js.map +1 -0
  457. package/lib/options/readPnpm.d.ts +5 -1
  458. package/lib/options/readPnpm.d.ts.map +1 -0
  459. package/lib/options/readPnpm.js +7 -5
  460. package/lib/options/readPnpm.js.map +1 -0
  461. package/lib/options/readReadmeAdditional.d.ts +4 -0
  462. package/lib/options/readReadmeAdditional.d.ts.map +1 -0
  463. package/lib/options/readReadmeAdditional.js +15 -22
  464. package/lib/options/readReadmeAdditional.js.map +1 -0
  465. package/lib/options/readReadmeExplainer.d.ts +4 -0
  466. package/lib/options/readReadmeExplainer.d.ts.map +1 -0
  467. package/lib/options/readReadmeExplainer.js +24 -25
  468. package/lib/options/readReadmeExplainer.js.map +1 -0
  469. package/lib/options/readReadmeFootnotes.d.ts +4 -0
  470. package/lib/options/readReadmeFootnotes.d.ts.map +1 -0
  471. package/lib/options/readReadmeFootnotes.js +15 -24
  472. package/lib/options/readReadmeFootnotes.js.map +1 -0
  473. package/lib/options/readReadmeUsage.d.ts +4 -0
  474. package/lib/options/readReadmeUsage.d.ts.map +1 -0
  475. package/lib/options/readReadmeUsage.js +13 -15
  476. package/lib/options/readReadmeUsage.js.map +1 -0
  477. package/lib/options/readRepository.d.ts +8 -4
  478. package/lib/options/readRepository.d.ts.map +1 -0
  479. package/lib/options/readRepository.js +6 -4
  480. package/lib/options/readRepository.js.map +1 -0
  481. package/lib/options/readRulesetId.d.ts +5 -1
  482. package/lib/options/readRulesetId.d.ts.map +1 -0
  483. package/lib/options/readRulesetId.js +14 -13
  484. package/lib/options/readRulesetId.js.map +1 -0
  485. package/lib/options/readTitle.d.ts +4 -0
  486. package/lib/options/readTitle.d.ts.map +1 -0
  487. package/lib/options/readTitle.js +11 -10
  488. package/lib/options/readTitle.js.map +1 -0
  489. package/lib/options/readWords.d.ts +5 -1
  490. package/lib/options/readWords.d.ts.map +1 -0
  491. package/lib/options/readWords.js +9 -10
  492. package/lib/options/readWords.js.map +1 -0
  493. package/lib/options/readWorkflowsVersions.d.ts +6 -3
  494. package/lib/options/readWorkflowsVersions.d.ts.map +1 -0
  495. package/lib/options/readWorkflowsVersions.js +45 -63
  496. package/lib/options/readWorkflowsVersions.js.map +1 -0
  497. package/lib/presets/common.d.ts +169 -166
  498. package/lib/presets/common.d.ts.map +1 -0
  499. package/lib/presets/common.js +21 -18
  500. package/lib/presets/common.js.map +1 -0
  501. package/lib/presets/everything.d.ts +169 -166
  502. package/lib/presets/everything.d.ts.map +1 -0
  503. package/lib/presets/everything.js +39 -36
  504. package/lib/presets/everything.js.map +1 -0
  505. package/lib/presets/index.d.ts +504 -502
  506. package/lib/presets/index.d.ts.map +1 -0
  507. package/lib/presets/index.js +10 -13
  508. package/lib/presets/index.js.map +1 -0
  509. package/lib/presets/minimal.d.ts +169 -166
  510. package/lib/presets/minimal.d.ts.map +1 -0
  511. package/lib/presets/minimal.js +51 -48
  512. package/lib/presets/minimal.js.map +1 -0
  513. package/lib/schemas.d.ts +75 -71
  514. package/lib/schemas.d.ts.map +1 -0
  515. package/lib/schemas.js +19 -21
  516. package/lib/schemas.js.map +1 -0
  517. package/lib/template.d.ts +169 -166
  518. package/lib/template.d.ts.map +1 -0
  519. package/lib/template.js +31 -24
  520. package/lib/template.js.map +1 -0
  521. package/lib/types.d.ts +32 -30
  522. package/lib/types.d.ts.map +1 -0
  523. package/lib/utils/htmlToTextSafe.d.ts +4 -0
  524. package/lib/utils/htmlToTextSafe.d.ts.map +1 -0
  525. package/lib/utils/htmlToTextSafe.js +13 -12
  526. package/lib/utils/htmlToTextSafe.js.map +1 -0
  527. package/lib/utils/resolveBin.d.ts +4 -0
  528. package/lib/utils/resolveBin.d.ts.map +1 -0
  529. package/lib/utils/resolveBin.js +7 -4
  530. package/lib/utils/resolveBin.js.map +1 -0
  531. package/lib/utils/swallowError.d.ts +4 -0
  532. package/lib/utils/swallowError.d.ts.map +1 -0
  533. package/lib/utils/swallowError.js +6 -4
  534. package/lib/utils/swallowError.js.map +1 -0
  535. package/lib/utils/swallowErrorAsync.d.ts +4 -0
  536. package/lib/utils/swallowErrorAsync.d.ts.map +1 -0
  537. package/lib/utils/swallowErrorAsync.js +10 -8
  538. package/lib/utils/swallowErrorAsync.js.map +1 -0
  539. package/lib/utils/trimPrecedingSlash.d.ts +4 -0
  540. package/lib/utils/trimPrecedingSlash.d.ts.map +1 -0
  541. package/lib/utils/trimPrecedingSlash.js +6 -4
  542. package/lib/utils/trimPrecedingSlash.js.map +1 -0
  543. package/lib/utils/tryCatch.d.ts +4 -0
  544. package/lib/utils/tryCatch.d.ts.map +1 -0
  545. package/lib/utils/tryCatch.js +10 -8
  546. package/lib/utils/tryCatch.js.map +1 -0
  547. package/package.json +3 -3
  548. package/lib/blocks/blockTSup.d.ts +0 -76
  549. package/lib/blocks/blockTSup.js +0 -139
@@ -1,25 +1,22 @@
1
- import * as fs from "node:fs/promises";
2
1
  import { readLogoSizing } from "./readLogoSizing.js";
2
+ import * as fs from "node:fs/promises";
3
+
4
+ //#region src/options/readLogo.ts
3
5
  async function readLogo(getReadme) {
4
- const tag = /\n<img.+src=.+>/.exec(await getReadme())?.[0];
5
- if (!tag) {
6
- return void 0;
7
- }
8
- const alt = /alt=['"](.+)['"]\s*src=/.exec(tag)?.[1].split(/['"]?\s*\w+=/)[0] ?? "Project logo";
9
- if (/All Contributors: \d+/.test(alt)) {
10
- return void 0;
11
- }
12
- const src = /src\s*=(.+)['"/]>/.exec(tag)?.[1]?.split(/\s*\w+=/)[0].replaceAll(/^['"]|['"]$/g, "");
13
- if (!src || src.includes("//img.shields.io")) {
14
- return void 0;
15
- }
16
- const bufferData = await fs.readFile(src);
17
- return {
18
- alt,
19
- src,
20
- ...readLogoSizing(bufferData)
21
- };
6
+ const tag = /\n<img.+src=.+>/.exec(await getReadme())?.[0];
7
+ if (!tag) return void 0;
8
+ const alt = /alt=['"](.+)['"]\s*src=/.exec(tag)?.[1].split(/['"]?\s*\w+=/)[0] ?? "Project logo";
9
+ if (/All Contributors: \d+/.test(alt)) return void 0;
10
+ const src = /src\s*=(.+)['"/]>/.exec(tag)?.[1]?.split(/\s*\w+=/)[0].replaceAll(/^['"]|['"]$/g, "");
11
+ if (!src || src.includes("//img.shields.io")) return void 0;
12
+ const bufferData = await fs.readFile(src);
13
+ return {
14
+ alt,
15
+ src,
16
+ ...readLogoSizing(bufferData)
17
+ };
22
18
  }
23
- export {
24
- readLogo
25
- };
19
+
20
+ //#endregion
21
+ export { readLogo };
22
+ //# sourceMappingURL=readLogo.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"readLogo.js","names":["getReadme: () => Promise<string>"],"sources":["../../src/options/readLogo.ts"],"sourcesContent":["import * as fs from \"node:fs/promises\";\n\nimport { readLogoSizing } from \"./readLogoSizing.js\";\n\nexport async function readLogo(getReadme: () => Promise<string>) {\n\tconst tag = /\\n<img.+src=.+>/.exec(await getReadme())?.[0];\n\n\tif (!tag) {\n\t\treturn undefined;\n\t}\n\n\tconst alt =\n\t\t/alt=['\"](.+)['\"]\\s*src=/.exec(tag)?.[1].split(/['\"]?\\s*\\w+=/)[0] ??\n\t\t\"Project logo\";\n\n\tif (/All Contributors: \\d+/.test(alt)) {\n\t\treturn undefined;\n\t}\n\n\tconst src = /src\\s*=(.+)['\"/]>/\n\t\t.exec(tag)?.[1]\n\t\t?.split(/\\s*\\w+=/)[0]\n\t\t.replaceAll(/^['\"]|['\"]$/g, \"\");\n\n\tif (!src || src.includes(\"//img.shields.io\")) {\n\t\treturn undefined;\n\t}\n\n\t// TODO: imageSize does not go through take(input*), making it harder to test.\n\t// It takes either a string (fs access) or buffer data (not in bingo-fs).\n\t// https://github.com/JoshuaKGoldberg/create-typescript-app/issues/1993\n\tconst bufferData = await fs.readFile(src);\n\n\treturn {\n\t\talt,\n\t\tsrc,\n\t\t...readLogoSizing(bufferData),\n\t};\n}\n"],"mappings":";;;;AAIA,eAAsB,SAASA,WAAkC;CAChE,MAAM,MAAM,kBAAkB,KAAK,MAAM,WAAW,CAAC,GAAG;AAExD,MAAK,IACJ;CAGD,MAAM,MACL,0BAA0B,KAAK,IAAI,GAAG,GAAG,MAAM,eAAe,CAAC,MAC/D;AAED,KAAI,wBAAwB,KAAK,IAAI,CACpC;CAGD,MAAM,MAAM,oBACV,KAAK,IAAI,GAAG,IACX,MAAM,UAAU,CAAC,GAClB,WAAW,gBAAgB,GAAG;AAEhC,MAAK,OAAO,IAAI,SAAS,mBAAmB,CAC3C;CAMD,MAAM,aAAa,MAAM,GAAG,SAAS,IAAI;AAEzC,QAAO;EACN;EACA;EACA,GAAG,eAAe,WAAW;CAC7B;AACD"}
@@ -1,7 +1,11 @@
1
+ //#region src/options/readLogoSizing.d.ts
1
2
  interface OptionsLogoSizing {
2
- height?: number;
3
- width?: number;
3
+ height?: number;
4
+ width?: number;
4
5
  }
5
6
  declare function readLogoSizing(src: Uint8Array): OptionsLogoSizing | undefined;
7
+ //# sourceMappingURL=readLogoSizing.d.ts.map
6
8
 
7
- export { type OptionsLogoSizing, readLogoSizing };
9
+ //#endregion
10
+ export { OptionsLogoSizing, readLogoSizing };
11
+ //# sourceMappingURL=readLogoSizing.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"readLogoSizing.d.ts","names":[],"sources":["../../src/options/readLogoSizing.ts"],"sourcesContent":[],"mappings":";UAIiB,iBAAA;EAAA,MAAA,CAAA,EAAA,MAAA;EAKD,KAAA,CAAA,EAAA,MAAA;;AAAoB,iBAApB,cAAA,CAAoB,GAAA,EAAA,UAAA,CAAA,EAAa,iBAAb,GAAA,SAAA"}
@@ -1,28 +1,32 @@
1
1
  import { imageSize } from "image-size";
2
+
3
+ //#region src/options/readLogoSizing.ts
2
4
  const maximum = 128;
3
5
  function readLogoSizing(src) {
4
- const size = imageSizeSafe(src);
5
- if (!size) {
6
- return void 0;
7
- }
8
- if (!size.height) {
9
- return size.width ? { width: Math.min(size.width, maximum) } : void 0;
10
- }
11
- if (!size.width) {
12
- return { height: Math.min(size.height, maximum) };
13
- }
14
- if (size.height <= maximum && size.width <= maximum) {
15
- return { height: size.height, width: size.width };
16
- }
17
- return size.height > size.width ? { height: maximum, width: size.width / size.height * maximum } : { height: size.height / size.width * maximum, width: maximum };
6
+ const size = imageSizeSafe(src);
7
+ if (!size) return void 0;
8
+ if (!size.height) return size.width ? { width: Math.min(size.width, maximum) } : void 0;
9
+ if (!size.width) return { height: Math.min(size.height, maximum) };
10
+ if (size.height <= maximum && size.width <= maximum) return {
11
+ height: size.height,
12
+ width: size.width
13
+ };
14
+ return size.height > size.width ? {
15
+ height: maximum,
16
+ width: size.width / size.height * maximum
17
+ } : {
18
+ height: size.height / size.width * maximum,
19
+ width: maximum
20
+ };
18
21
  }
19
22
  function imageSizeSafe(src) {
20
- try {
21
- return imageSize(src);
22
- } catch {
23
- return void 0;
24
- }
23
+ try {
24
+ return imageSize(src);
25
+ } catch {
26
+ return void 0;
27
+ }
25
28
  }
26
- export {
27
- readLogoSizing
28
- };
29
+
30
+ //#endregion
31
+ export { readLogoSizing };
32
+ //# sourceMappingURL=readLogoSizing.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"readLogoSizing.js","names":["src: Uint8Array"],"sources":["../../src/options/readLogoSizing.ts"],"sourcesContent":["import { imageSize } from \"image-size\";\n\nconst maximum = 128;\n\nexport interface OptionsLogoSizing {\n\theight?: number;\n\twidth?: number;\n}\n\nexport function readLogoSizing(src: Uint8Array): OptionsLogoSizing | undefined {\n\tconst size = imageSizeSafe(src);\n\tif (!size) {\n\t\treturn undefined;\n\t}\n\n\tif (!size.height) {\n\t\treturn size.width ? { width: Math.min(size.width, maximum) } : undefined;\n\t}\n\n\tif (!size.width) {\n\t\treturn { height: Math.min(size.height, maximum) };\n\t}\n\n\tif (size.height <= maximum && size.width <= maximum) {\n\t\treturn { height: size.height, width: size.width };\n\t}\n\n\treturn size.height > size.width\n\t\t? { height: maximum, width: (size.width / size.height) * maximum }\n\t\t: { height: (size.height / size.width) * maximum, width: maximum };\n}\n\nfunction imageSizeSafe(src: Uint8Array) {\n\ttry {\n\t\t// TODO: imageSize does not go through take(input*), making it harder to test.\n\t\t// It takes either a string (fs access) or buffer data (not in bingo-fs).\n\t\t// https://github.com/JoshuaKGoldberg/create-typescript-app/issues/1993\n\t\treturn imageSize(src);\n\t} catch {\n\t\treturn undefined;\n\t}\n}\n"],"mappings":";;;AAEA,MAAM,UAAU;AAOhB,SAAgB,eAAeA,KAAgD;CAC9E,MAAM,OAAO,cAAc,IAAI;AAC/B,MAAK,KACJ;AAGD,MAAK,KAAK,OACT,QAAO,KAAK,QAAQ,EAAE,OAAO,KAAK,IAAI,KAAK,OAAO,QAAQ,CAAE;AAG7D,MAAK,KAAK,MACT,QAAO,EAAE,QAAQ,KAAK,IAAI,KAAK,QAAQ,QAAQ,CAAE;AAGlD,KAAI,KAAK,UAAU,WAAW,KAAK,SAAS,QAC3C,QAAO;EAAE,QAAQ,KAAK;EAAQ,OAAO,KAAK;CAAO;AAGlD,QAAO,KAAK,SAAS,KAAK,QACvB;EAAE,QAAQ;EAAS,OAAQ,KAAK,QAAQ,KAAK,SAAU;CAAS,IAChE;EAAE,QAAS,KAAK,SAAS,KAAK,QAAS;EAAS,OAAO;CAAS;AACnE;AAED,SAAS,cAAcA,KAAiB;AACvC,KAAI;AAIH,SAAO,UAAU,IAAI;CACrB,QAAO;AACP;CACA;AACD"}
@@ -1,8 +1,12 @@
1
- import { PartialPackageData } from '../types.js';
1
+ import { PartialPackageData } from "../types.js";
2
2
 
3
+ //#region src/options/readNode.d.ts
3
4
  declare function readNode(getNvmrc: () => Promise<Error | string>, getPackageDataFull: () => Promise<PartialPackageData>): Promise<{
4
- minimum: string;
5
- pinned: string;
5
+ minimum: string;
6
+ pinned: string;
6
7
  }>;
8
+ //# sourceMappingURL=readNode.d.ts.map
7
9
 
10
+ //#endregion
8
11
  export { readNode };
12
+ //# sourceMappingURL=readNode.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"readNode.d.ts","names":[],"sources":["../../src/options/readNode.ts"],"sourcesContent":[],"mappings":";;;iBAIsB,QAAA,iBACL,QAAQ,2CACE,QAAQ,sBAAmB;;EAFhC,MAAA,EAAA,MAAQ;CAAA,CAAA"}
@@ -1,12 +1,15 @@
1
- import { defaults } from "../constants.js";
2
1
  import { swallowError } from "../utils/swallowError.js";
2
+ import { defaults } from "../constants.js";
3
+
4
+ //#region src/options/readNode.ts
3
5
  async function readNode(getNvmrc, getPackageDataFull) {
4
- const { engines } = await getPackageDataFull();
5
- return {
6
- minimum: (engines?.node && /[\d+.]+/.exec(engines.node))?.[0] ?? defaults.node.minimum,
7
- pinned: swallowError(await getNvmrc())?.trim() || defaults.node.pinned
8
- };
6
+ const { engines } = await getPackageDataFull();
7
+ return {
8
+ minimum: (engines?.node && /[\d+.]+/.exec(engines.node))?.[0] ?? defaults.node.minimum,
9
+ pinned: swallowError(await getNvmrc())?.trim() || defaults.node.pinned
10
+ };
9
11
  }
10
- export {
11
- readNode
12
- };
12
+
13
+ //#endregion
14
+ export { readNode };
15
+ //# sourceMappingURL=readNode.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"readNode.js","names":["getNvmrc: () => Promise<Error | string>","getPackageDataFull: () => Promise<PartialPackageData>"],"sources":["../../src/options/readNode.ts"],"sourcesContent":["import { defaults } from \"../constants.js\";\nimport { PartialPackageData } from \"../types.js\";\nimport { swallowError } from \"../utils/swallowError.js\";\n\nexport async function readNode(\n\tgetNvmrc: () => Promise<Error | string>,\n\tgetPackageDataFull: () => Promise<PartialPackageData>,\n) {\n\tconst { engines } = await getPackageDataFull();\n\n\treturn {\n\t\tminimum:\n\t\t\t(engines?.node && /[\\d+.]+/.exec(engines.node))?.[0] ??\n\t\t\tdefaults.node.minimum,\n\t\tpinned: swallowError(await getNvmrc())?.trim() || defaults.node.pinned,\n\t};\n}\n"],"mappings":";;;;AAIA,eAAsB,SACrBA,UACAC,oBACC;CACD,MAAM,EAAE,SAAS,GAAG,MAAM,oBAAoB;AAE9C,QAAO;EACN,UACE,SAAS,QAAQ,UAAU,KAAK,QAAQ,KAAK,IAAI,MAClD,SAAS,KAAK;EACf,QAAQ,aAAa,MAAM,UAAU,CAAC,EAAE,MAAM,IAAI,SAAS,KAAK;CAChE;AACD"}
@@ -1,6 +1,10 @@
1
- import * as npm_user from 'npm-user';
2
- import { ExecaError, Result } from 'execa';
1
+ import * as npm_user319 from "npm-user";
2
+ import { ExecaError, Result } from "execa";
3
3
 
4
- declare function readNpmDefaults(getNpmWhoami: () => Promise<ExecaError | Result | undefined>): Promise<npm_user.UserInfo | undefined>;
4
+ //#region src/options/readNpmDefaults.d.ts
5
+ declare function readNpmDefaults(getNpmWhoami: () => Promise<ExecaError | Result | undefined>): Promise<npm_user319.UserInfo | undefined>;
6
+ //# sourceMappingURL=readNpmDefaults.d.ts.map
5
7
 
8
+ //#endregion
6
9
  export { readNpmDefaults };
10
+ //# sourceMappingURL=readNpmDefaults.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"readNpmDefaults.d.ts","names":[],"sources":["../../src/options/readNpmDefaults.ts"],"sourcesContent":[],"mappings":";;;;iBAOsB,eAAA,qBACD,QAAQ,aAAa,sBAAmB,QAAjC,WAAA,CAAiC,QAAA"}
@@ -1,9 +1,12 @@
1
- import npmUser from "npm-user";
2
1
  import { swallowErrorAsync } from "../utils/swallowErrorAsync.js";
2
+ import npmUser from "npm-user";
3
+
4
+ //#region src/options/readNpmDefaults.ts
3
5
  async function readNpmDefaults(getNpmWhoami) {
4
- const whoami = await getNpmWhoami();
5
- return typeof whoami?.stdout === "string" ? await swallowErrorAsync(npmUser(whoami.stdout)) : void 0;
6
+ const whoami = await getNpmWhoami();
7
+ return typeof whoami?.stdout === "string" ? await swallowErrorAsync(npmUser(whoami.stdout)) : void 0;
6
8
  }
7
- export {
8
- readNpmDefaults
9
- };
9
+
10
+ //#endregion
11
+ export { readNpmDefaults };
12
+ //# sourceMappingURL=readNpmDefaults.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"readNpmDefaults.js","names":["getNpmWhoami: () => Promise<ExecaError | Result | undefined>"],"sources":["../../src/options/readNpmDefaults.ts"],"sourcesContent":["import { ExecaError, Result } from \"execa\";\nimport npmUser from \"npm-user\";\n\nimport { swallowErrorAsync } from \"../utils/swallowErrorAsync.js\";\n\n// TODO: npmUser does not go through take(input*), making it harder to test.\n// https://github.com/JoshuaKGoldberg/create-typescript-app/issues/1990\nexport async function readNpmDefaults(\n\tgetNpmWhoami: () => Promise<ExecaError | Result | undefined>,\n) {\n\tconst whoami = await getNpmWhoami();\n\treturn typeof whoami?.stdout === \"string\"\n\t\t? await swallowErrorAsync(npmUser(whoami.stdout))\n\t\t: undefined;\n}\n"],"mappings":";;;;AAOA,eAAsB,gBACrBA,cACC;CACD,MAAM,SAAS,MAAM,cAAc;AACnC,eAAc,QAAQ,WAAW,WAC9B,MAAM,kBAAkB,QAAQ,OAAO,OAAO,CAAC;AAElD"}
@@ -1,8 +1,11 @@
1
- import { TakeInput } from 'bingo';
2
- import { GitUrl } from 'git-url-parse';
3
- import { PackageAuthor } from './readPackageAuthor.js';
4
- import '../types.js';
1
+ import { PackageAuthor } from "./readPackageAuthor.js";
2
+ import { TakeInput } from "bingo";
3
+ import { GitUrl } from "git-url-parse";
5
4
 
5
+ //#region src/options/readOwner.d.ts
6
6
  declare function readOwner(take: TakeInput, getGitDefaults: () => Promise<GitUrl | undefined>, getPackageAuthor: () => Promise<PackageAuthor>): Promise<string | undefined>;
7
+ //# sourceMappingURL=readOwner.d.ts.map
7
8
 
9
+ //#endregion
8
10
  export { readOwner };
11
+ //# sourceMappingURL=readOwner.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"readOwner.d.ts","names":[],"sources":["../../src/options/readOwner.ts"],"sourcesContent":[],"mappings":";;;;;iBAMsB,SAAA,OACf,iCACgB,QAAQ,6CACN,QAAQ,iBAAc"}
@@ -1,9 +1,10 @@
1
1
  import { inputFromScript } from "input-from-script";
2
+
3
+ //#region src/options/readOwner.ts
2
4
  async function readOwner(take, getGitDefaults, getPackageAuthor) {
3
- return (await getGitDefaults())?.organization ?? (await getPackageAuthor()).name ?? (await take(inputFromScript, {
4
- command: "gh config get user -h github.com"
5
- })).stdout?.toString();
5
+ return (await getGitDefaults())?.organization ?? (await getPackageAuthor()).name ?? (await take(inputFromScript, { command: "gh config get user -h github.com" })).stdout?.toString();
6
6
  }
7
- export {
8
- readOwner
9
- };
7
+
8
+ //#endregion
9
+ export { readOwner };
10
+ //# sourceMappingURL=readOwner.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"readOwner.js","names":["take: TakeInput","getGitDefaults: () => Promise<GitUrl | undefined>","getPackageAuthor: () => Promise<PackageAuthor>"],"sources":["../../src/options/readOwner.ts"],"sourcesContent":["import { TakeInput } from \"bingo\";\nimport { GitUrl } from \"git-url-parse\";\nimport { inputFromScript } from \"input-from-script\";\n\nimport { PackageAuthor } from \"./readPackageAuthor.js\";\n\nexport async function readOwner(\n\ttake: TakeInput,\n\tgetGitDefaults: () => Promise<GitUrl | undefined>,\n\tgetPackageAuthor: () => Promise<PackageAuthor>,\n) {\n\treturn (\n\t\t(await getGitDefaults())?.organization ??\n\t\t(await getPackageAuthor()).name ??\n\t\t(\n\t\t\tawait take(inputFromScript, {\n\t\t\t\tcommand: \"gh config get user -h github.com\",\n\t\t\t})\n\t\t).stdout?.toString()\n\t);\n}\n"],"mappings":";;;AAMA,eAAsB,UACrBA,MACAC,gBACAC,kBACC;AACD,SACE,MAAM,gBAAgB,GAAG,iBACzB,MAAM,kBAAkB,EAAE,QAC3B,CACC,MAAM,KAAK,iBAAiB,EAC3B,SAAS,mCACT,EAAC,EACD,QAAQ,UAAU;AAErB"}
@@ -1,9 +1,13 @@
1
- import { PartialPackageData } from '../types.js';
1
+ import { PartialPackageData } from "../types.js";
2
2
 
3
+ //#region src/options/readPackageAuthor.d.ts
3
4
  interface PackageAuthor {
4
- email?: string | undefined;
5
- name?: string | undefined;
5
+ email?: string | undefined;
6
+ name?: string | undefined;
6
7
  }
7
8
  declare function readPackageAuthor(getPackageDataFull: () => Promise<PartialPackageData>): Promise<PackageAuthor>;
9
+ //# sourceMappingURL=readPackageAuthor.d.ts.map
8
10
 
9
- export { type PackageAuthor, readPackageAuthor };
11
+ //#endregion
12
+ export { PackageAuthor, readPackageAuthor };
13
+ //# sourceMappingURL=readPackageAuthor.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"readPackageAuthor.d.ts","names":[],"sources":["../../src/options/readPackageAuthor.ts"],"sourcesContent":[],"mappings":";;;UAIiB,aAAA;;EAAA,IAAA,CAAA,EAAA,MAAA,GAAa,SAAA;AAK9B;AAAuC,iBAAjB,iBAAA,CAAiB,kBAAA,EAAA,GAAA,GACZ,OADY,CACJ,kBADI,CAAA,CAAA,EAEpC,OAFoC,CAE5B,aAF4B,CAAA"}
@@ -1,15 +1,15 @@
1
1
  import parse from "parse-author";
2
+
3
+ //#region src/options/readPackageAuthor.ts
2
4
  async function readPackageAuthor(getPackageDataFull) {
3
- const packageData = await getPackageDataFull();
4
- switch (typeof packageData.author) {
5
- case "object":
6
- return packageData.author;
7
- case "string":
8
- return parse(packageData.author);
9
- default:
10
- return {};
11
- }
5
+ const packageData = await getPackageDataFull();
6
+ switch (typeof packageData.author) {
7
+ case "object": return packageData.author;
8
+ case "string": return parse(packageData.author);
9
+ default: return {};
10
+ }
12
11
  }
13
- export {
14
- readPackageAuthor
15
- };
12
+
13
+ //#endregion
14
+ export { readPackageAuthor };
15
+ //# sourceMappingURL=readPackageAuthor.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"readPackageAuthor.js","names":["getPackageDataFull: () => Promise<PartialPackageData>"],"sources":["../../src/options/readPackageAuthor.ts"],"sourcesContent":["import parse from \"parse-author\";\n\nimport { PartialPackageData } from \"../types.js\";\n\nexport interface PackageAuthor {\n\temail?: string | undefined;\n\tname?: string | undefined;\n}\n\nexport async function readPackageAuthor(\n\tgetPackageDataFull: () => Promise<PartialPackageData>,\n): Promise<PackageAuthor> {\n\tconst packageData = await getPackageDataFull();\n\n\tswitch (typeof packageData.author) {\n\t\tcase \"object\":\n\t\t\treturn packageData.author;\n\n\t\tcase \"string\":\n\t\t\treturn parse(packageData.author);\n\n\t\tdefault:\n\t\t\treturn {};\n\t}\n}\n"],"mappings":";;;AASA,eAAsB,kBACrBA,oBACyB;CACzB,MAAM,cAAc,MAAM,oBAAoB;AAE9C,gBAAe,YAAY,QAA3B;EACC,KAAK,SACJ,QAAO,YAAY;EAEpB,KAAK,SACJ,QAAO,MAAM,YAAY,OAAO;EAEjC,QACC,QAAO,CAAE;CACV;AACD"}
@@ -1,6 +1,10 @@
1
- import { TakeInput } from 'bingo';
2
- import { PartialPackageData } from '../types.js';
1
+ import { PartialPackageData } from "../types.js";
2
+ import { TakeInput } from "bingo";
3
3
 
4
+ //#region src/options/readPackageData.d.ts
4
5
  declare function readPackageData(take: TakeInput): Promise<PartialPackageData>;
6
+ //# sourceMappingURL=readPackageData.d.ts.map
5
7
 
8
+ //#endregion
6
9
  export { readPackageData };
10
+ //# sourceMappingURL=readPackageData.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"readPackageData.d.ts","names":[],"sources":["../../src/options/readPackageData.ts"],"sourcesContent":[],"mappings":";;;;iBAMsB,eAAA,OACf,YACJ,QAAQ"}
@@ -1,12 +1,11 @@
1
- import { inputFromFileJSON } from "input-from-file-json";
2
1
  import { swallowError } from "../utils/swallowError.js";
2
+ import { inputFromFileJSON } from "input-from-file-json";
3
+
4
+ //#region src/options/readPackageData.ts
3
5
  async function readPackageData(take) {
4
- return swallowError(
5
- await take(inputFromFileJSON, {
6
- filePath: "./package.json"
7
- })
8
- ) || {};
6
+ return swallowError(await take(inputFromFileJSON, { filePath: "./package.json" })) || {};
9
7
  }
10
- export {
11
- readPackageData
12
- };
8
+
9
+ //#endregion
10
+ export { readPackageData };
11
+ //# sourceMappingURL=readPackageData.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"readPackageData.js","names":["take: TakeInput"],"sources":["../../src/options/readPackageData.ts"],"sourcesContent":["import { TakeInput } from \"bingo\";\nimport { inputFromFileJSON } from \"input-from-file-json\";\n\nimport { PartialPackageData } from \"../types.js\";\nimport { swallowError } from \"../utils/swallowError.js\";\n\nexport async function readPackageData(\n\ttake: TakeInput,\n): Promise<PartialPackageData> {\n\treturn (\n\t\tswallowError(\n\t\t\tawait take(inputFromFileJSON, {\n\t\t\t\tfilePath: \"./package.json\",\n\t\t\t}),\n\t\t) || {}\n\t);\n}\n"],"mappings":";;;;AAMA,eAAsB,gBACrBA,MAC8B;AAC9B,QACC,aACC,MAAM,KAAK,mBAAmB,EAC7B,UAAU,iBACV,EAAC,CACF,IAAI,CAAE;AAER"}
@@ -1,5 +1,9 @@
1
- import { PartialPackageData } from '../types.js';
1
+ import { PartialPackageData } from "../types.js";
2
2
 
3
+ //#region src/options/readPnpm.d.ts
3
4
  declare function readPnpm(packageData: () => Promise<PartialPackageData>): Promise<string>;
5
+ //# sourceMappingURL=readPnpm.d.ts.map
4
6
 
7
+ //#endregion
5
8
  export { readPnpm };
9
+ //# sourceMappingURL=readPnpm.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"readPnpm.d.ts","names":[],"sources":["../../src/options/readPnpm.ts"],"sourcesContent":[],"mappings":";;;iBAEsB,QAAA,oBAA4B,QAAQ,sBAAmB"}
@@ -1,7 +1,9 @@
1
+ //#region src/options/readPnpm.ts
1
2
  async function readPnpm(packageData) {
2
- const { packageManager } = await packageData();
3
- return packageManager?.startsWith("pnpm@") ? packageManager.slice("pnpm@".length) : "10.4.0";
3
+ const { packageManager } = await packageData();
4
+ return packageManager?.startsWith("pnpm@") ? packageManager.slice(5) : "10.4.0";
4
5
  }
5
- export {
6
- readPnpm
7
- };
6
+
7
+ //#endregion
8
+ export { readPnpm };
9
+ //# sourceMappingURL=readPnpm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"readPnpm.js","names":["packageData: () => Promise<PartialPackageData>"],"sources":["../../src/options/readPnpm.ts"],"sourcesContent":["import { PartialPackageData } from \"../types.js\";\n\nexport async function readPnpm(packageData: () => Promise<PartialPackageData>) {\n\tconst { packageManager } = await packageData();\n\n\treturn packageManager?.startsWith(\"pnpm@\")\n\t\t? packageManager.slice(\"pnpm@\".length)\n\t\t: \"10.4.0\";\n}\n"],"mappings":";AAEA,eAAsB,SAASA,aAAgD;CAC9E,MAAM,EAAE,gBAAgB,GAAG,MAAM,aAAa;AAE9C,QAAO,gBAAgB,WAAW,QAAQ,GACvC,eAAe,MAAM,EAAe,GACpC;AACH"}
@@ -1,3 +1,7 @@
1
+ //#region src/options/readReadmeAdditional.d.ts
1
2
  declare function readReadmeAdditional(getReadme: () => Promise<string>): Promise<string | undefined>;
3
+ //# sourceMappingURL=readReadmeAdditional.d.ts.map
2
4
 
5
+ //#endregion
3
6
  export { readReadmeAdditional };
7
+ //# sourceMappingURL=readReadmeAdditional.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"readReadmeAdditional.d.ts","names":[],"sources":["../../src/options/readReadmeAdditional.ts"],"sourcesContent":[],"mappings":";iBAMsB,oBAAA,kBAAsC,kBAAe;AAA3E"}
@@ -1,27 +1,20 @@
1
1
  import { indicatorsTemplatedBy } from "./readReadmeFootnotes.js";
2
+
3
+ //#region src/options/readReadmeAdditional.ts
2
4
  const indicatorAfterAllContributors = /<!--\s*ALL-CONTRIBUTORS-LIST:END\s*-->/;
3
5
  const indicatorAfterAllContributorsSpellCheck = /<!--\s*spellchecker:\s*enable\s*-->/;
4
6
  async function readReadmeAdditional(getReadme) {
5
- const readme = await getReadme();
6
- if (!readme) {
7
- return void 0;
8
- }
9
- const indexAfterContributors = indicatorAfterAllContributorsSpellCheck.exec(readme) ?? indicatorAfterAllContributors.exec(readme);
10
- if (!indexAfterContributors) {
11
- return void 0;
12
- }
13
- const indexOfFirstTemplatedBy = indicatorsTemplatedBy.reduce(
14
- (smallest, indicator) => {
15
- const indexOf = indicator.exec(readme)?.index;
16
- return indexOf ? Math.min(smallest, indexOf) : smallest;
17
- },
18
- readme.length
19
- );
20
- return readme.slice(
21
- indexAfterContributors.index + indexAfterContributors[0].length,
22
- indexOfFirstTemplatedBy
23
- ).trim();
7
+ const readme = await getReadme();
8
+ if (!readme) return void 0;
9
+ const indexAfterContributors = indicatorAfterAllContributorsSpellCheck.exec(readme) ?? indicatorAfterAllContributors.exec(readme);
10
+ if (!indexAfterContributors) return void 0;
11
+ const indexOfFirstTemplatedBy = indicatorsTemplatedBy.reduce((smallest, indicator) => {
12
+ const indexOf = indicator.exec(readme)?.index;
13
+ return indexOf ? Math.min(smallest, indexOf) : smallest;
14
+ }, readme.length);
15
+ return readme.slice(indexAfterContributors.index + indexAfterContributors[0].length, indexOfFirstTemplatedBy).trim();
24
16
  }
25
- export {
26
- readReadmeAdditional
27
- };
17
+
18
+ //#endregion
19
+ export { readReadmeAdditional };
20
+ //# sourceMappingURL=readReadmeAdditional.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"readReadmeAdditional.js","names":["getReadme: () => Promise<string>"],"sources":["../../src/options/readReadmeAdditional.ts"],"sourcesContent":["import { indicatorsTemplatedBy } from \"./readReadmeFootnotes.js\";\n\nconst indicatorAfterAllContributors = /<!--\\s*ALL-CONTRIBUTORS-LIST:END\\s*-->/;\nconst indicatorAfterAllContributorsSpellCheck =\n\t/<!--\\s*spellchecker:\\s*enable\\s*-->/;\n\nexport async function readReadmeAdditional(getReadme: () => Promise<string>) {\n\tconst readme = await getReadme();\n\tif (!readme) {\n\t\treturn undefined;\n\t}\n\n\tconst indexAfterContributors =\n\t\tindicatorAfterAllContributorsSpellCheck.exec(readme) ??\n\t\tindicatorAfterAllContributors.exec(readme);\n\tif (!indexAfterContributors) {\n\t\treturn undefined;\n\t}\n\n\tconst indexOfFirstTemplatedBy = indicatorsTemplatedBy.reduce(\n\t\t(smallest, indicator) => {\n\t\t\tconst indexOf = indicator.exec(readme)?.index;\n\t\t\treturn indexOf ? Math.min(smallest, indexOf) : smallest;\n\t\t},\n\t\treadme.length,\n\t);\n\n\treturn readme\n\t\t.slice(\n\t\t\tindexAfterContributors.index + indexAfterContributors[0].length,\n\t\t\tindexOfFirstTemplatedBy,\n\t\t)\n\t\t.trim();\n}\n"],"mappings":";;;AAEA,MAAM,gCAAgC;AACtC,MAAM,0CACL;AAED,eAAsB,qBAAqBA,WAAkC;CAC5E,MAAM,SAAS,MAAM,WAAW;AAChC,MAAK,OACJ;CAGD,MAAM,yBACL,wCAAwC,KAAK,OAAO,IACpD,8BAA8B,KAAK,OAAO;AAC3C,MAAK,uBACJ;CAGD,MAAM,0BAA0B,sBAAsB,OACrD,CAAC,UAAU,cAAc;EACxB,MAAM,UAAU,UAAU,KAAK,OAAO,EAAE;AACxC,SAAO,UAAU,KAAK,IAAI,UAAU,QAAQ,GAAG;CAC/C,GACD,OAAO,OACP;AAED,QAAO,OACL,MACA,uBAAuB,QAAQ,uBAAuB,GAAG,QACzD,wBACA,CACA,MAAM;AACR"}
@@ -1,3 +1,7 @@
1
+ //#region src/options/readReadmeExplainer.d.ts
1
2
  declare function readReadmeExplainer(getReadme: () => Promise<string>): Promise<string | undefined>;
3
+ //# sourceMappingURL=readReadmeExplainer.d.ts.map
2
4
 
5
+ //#endregion
3
6
  export { readReadmeExplainer };
7
+ //# sourceMappingURL=readReadmeExplainer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"readReadmeExplainer.d.ts","names":[],"sources":["../../src/options/readReadmeExplainer.ts"],"sourcesContent":[],"mappings":";iBAEsB,mBAAA,kBAAqC,kBAAe;AAA1E"}
@@ -1,29 +1,28 @@
1
- const lastTagMatchers = [`">`, "/p>", "/>"];
1
+ //#region src/options/readReadmeExplainer.ts
2
+ const lastTagMatchers = [
3
+ `">`,
4
+ "/p>",
5
+ "/>"
6
+ ];
2
7
  async function readReadmeExplainer(getReadme) {
3
- const readme = await getReadme();
4
- const indexOfFirstH2 = readme.indexOf("##");
5
- const indexOfUsageH2 = /## Usage/.exec(readme)?.index;
6
- const beforeH2s = readme.slice(0, indexOfUsageH2 ?? indexOfFirstH2);
7
- const [indexOfLastTag, lastTagMatcher] = lastLastIndexOf(
8
- beforeH2s,
9
- lastTagMatchers
10
- );
11
- if (!lastTagMatcher) {
12
- return void 0;
13
- }
14
- const endingIndex = indexOfUsageH2 ?? /## (?:Contrib|Develop)/.exec(readme)?.index;
15
- return readme.slice(indexOfLastTag + lastTagMatcher.length, endingIndex).trim();
8
+ const readme = await getReadme();
9
+ const indexOfFirstH2 = readme.indexOf("##");
10
+ const indexOfUsageH2 = /## Usage/.exec(readme)?.index;
11
+ const beforeH2s = readme.slice(0, indexOfUsageH2 ?? indexOfFirstH2);
12
+ const [indexOfLastTag, lastTagMatcher] = lastLastIndexOf(beforeH2s, lastTagMatchers);
13
+ if (!lastTagMatcher) return void 0;
14
+ const endingIndex = indexOfUsageH2 ?? /## (?:Contrib|Develop)/.exec(readme)?.index;
15
+ return readme.slice(indexOfLastTag + lastTagMatcher.length, endingIndex).trim();
16
16
  }
17
17
  function lastLastIndexOf(text, matchers) {
18
- let pair = [-1, void 0];
19
- for (const matcher of matchers) {
20
- const indexOf = text.lastIndexOf(matcher);
21
- if (indexOf > pair[0]) {
22
- pair = [indexOf, matcher];
23
- }
24
- }
25
- return pair;
18
+ let pair = [-1, void 0];
19
+ for (const matcher of matchers) {
20
+ const indexOf = text.lastIndexOf(matcher);
21
+ if (indexOf > pair[0]) pair = [indexOf, matcher];
22
+ }
23
+ return pair;
26
24
  }
27
- export {
28
- readReadmeExplainer
29
- };
25
+
26
+ //#endregion
27
+ export { readReadmeExplainer };
28
+ //# sourceMappingURL=readReadmeExplainer.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"readReadmeExplainer.js","names":["getReadme: () => Promise<string>","text: string","matchers: string[]","pair: [number, string | undefined]"],"sources":["../../src/options/readReadmeExplainer.ts"],"sourcesContent":["const lastTagMatchers = [`\">`, \"/p>\", \"/>\"];\n\nexport async function readReadmeExplainer(getReadme: () => Promise<string>) {\n\tconst readme = await getReadme();\n\n\tconst indexOfFirstH2 = readme.indexOf(\"##\");\n\tconst indexOfUsageH2 = /## Usage/.exec(readme)?.index;\n\tconst beforeH2s = readme.slice(0, indexOfUsageH2 ?? indexOfFirstH2);\n\tconst [indexOfLastTag, lastTagMatcher] = lastLastIndexOf(\n\t\tbeforeH2s,\n\t\tlastTagMatchers,\n\t);\n\tif (!lastTagMatcher) {\n\t\treturn undefined;\n\t}\n\n\tconst endingIndex =\n\t\tindexOfUsageH2 ?? /## (?:Contrib|Develop)/.exec(readme)?.index;\n\n\treturn readme\n\t\t.slice(indexOfLastTag + lastTagMatcher.length, endingIndex)\n\t\t.trim();\n}\n\nfunction lastLastIndexOf(text: string, matchers: string[]) {\n\tlet pair: [number, string | undefined] = [-1, undefined];\n\n\tfor (const matcher of matchers) {\n\t\tconst indexOf = text.lastIndexOf(matcher);\n\t\tif (indexOf > pair[0]) {\n\t\t\tpair = [indexOf, matcher];\n\t\t}\n\t}\n\n\treturn pair;\n}\n"],"mappings":";AAAA,MAAM,kBAAkB;EAAE;CAAK;CAAO;AAAK;AAE3C,eAAsB,oBAAoBA,WAAkC;CAC3E,MAAM,SAAS,MAAM,WAAW;CAEhC,MAAM,iBAAiB,OAAO,QAAQ,KAAK;CAC3C,MAAM,iBAAiB,WAAW,KAAK,OAAO,EAAE;CAChD,MAAM,YAAY,OAAO,MAAM,GAAG,kBAAkB,eAAe;CACnE,MAAM,CAAC,gBAAgB,eAAe,GAAG,gBACxC,WACA,gBACA;AACD,MAAK,eACJ;CAGD,MAAM,cACL,kBAAkB,yBAAyB,KAAK,OAAO,EAAE;AAE1D,QAAO,OACL,MAAM,iBAAiB,eAAe,QAAQ,YAAY,CAC1D,MAAM;AACR;AAED,SAAS,gBAAgBC,MAAcC,UAAoB;CAC1D,IAAIC,OAAqC,CAAC,UAAc;AAExD,MAAK,MAAM,WAAW,UAAU;EAC/B,MAAM,UAAU,KAAK,YAAY,QAAQ;AACzC,MAAI,UAAU,KAAK,GAClB,QAAO,CAAC,SAAS,OAAQ;CAE1B;AAED,QAAO;AACP"}
@@ -1,4 +1,8 @@
1
+ //#region src/options/readReadmeFootnotes.d.ts
1
2
  declare const indicatorsTemplatedBy: RegExp[];
2
3
  declare function readReadmeFootnotes(getReadme: () => Promise<string>): Promise<string | undefined>;
4
+ //# sourceMappingURL=readReadmeFootnotes.d.ts.map
3
5
 
6
+ //#endregion
4
7
  export { indicatorsTemplatedBy, readReadmeFootnotes };
8
+ //# sourceMappingURL=readReadmeFootnotes.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"readReadmeFootnotes.d.ts","names":[],"sources":["../../src/options/readReadmeFootnotes.ts"],"sourcesContent":[],"mappings":";cAAa,uBAAqB;AAArB,iBAKS,mBAAA,CALY,SAAA,EAAA,GAAA,GAKyB,OALzB,CAAA,MAAA,CAAA,CAAA,EAKwC,OALxC,CAAA,MAAA,GAAA,SAAA,CAAA;AAKlC"}
@@ -1,26 +1,17 @@
1
- const indicatorsTemplatedBy = [
2
- /> .* This package (?:is|was) (?:based|build|templated) (?:on|with)/,
3
- /<!-- You can remove this notice/
4
- ];
1
+ //#region src/options/readReadmeFootnotes.ts
2
+ const indicatorsTemplatedBy = [/> .* This package (?:is|was) (?:based|build|templated) (?:on|with)/, /<!-- You can remove this notice/];
5
3
  async function readReadmeFootnotes(getReadme) {
6
- const readme = await getReadme();
7
- if (!readme) {
8
- return void 0;
9
- }
10
- const indexOfLastTemplatedBy = indicatorsTemplatedBy.reduce(
11
- (largest, indicator) => {
12
- const indexOf = indicator.exec(readme)?.index;
13
- return indexOf ? Math.max(largest, indexOf) : largest;
14
- },
15
- 0
16
- );
17
- if (!indexOfLastTemplatedBy) {
18
- return void 0;
19
- }
20
- const indexOfNextLine = readme.indexOf("\n", indexOfLastTemplatedBy);
21
- return readme.slice(indexOfNextLine).trim() || void 0;
4
+ const readme = await getReadme();
5
+ if (!readme) return void 0;
6
+ const indexOfLastTemplatedBy = indicatorsTemplatedBy.reduce((largest, indicator) => {
7
+ const indexOf = indicator.exec(readme)?.index;
8
+ return indexOf ? Math.max(largest, indexOf) : largest;
9
+ }, 0);
10
+ if (!indexOfLastTemplatedBy) return void 0;
11
+ const indexOfNextLine = readme.indexOf("\n", indexOfLastTemplatedBy);
12
+ return readme.slice(indexOfNextLine).trim() || void 0;
22
13
  }
23
- export {
24
- indicatorsTemplatedBy,
25
- readReadmeFootnotes
26
- };
14
+
15
+ //#endregion
16
+ export { indicatorsTemplatedBy, readReadmeFootnotes };
17
+ //# sourceMappingURL=readReadmeFootnotes.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"readReadmeFootnotes.js","names":["getReadme: () => Promise<string>"],"sources":["../../src/options/readReadmeFootnotes.ts"],"sourcesContent":["export const indicatorsTemplatedBy = [\n\t/> .* This package (?:is|was) (?:based|build|templated) (?:on|with)/,\n\t/<!-- You can remove this notice/,\n];\n\nexport async function readReadmeFootnotes(getReadme: () => Promise<string>) {\n\tconst readme = await getReadme();\n\tif (!readme) {\n\t\treturn undefined;\n\t}\n\n\tconst indexOfLastTemplatedBy = indicatorsTemplatedBy.reduce(\n\t\t(largest, indicator) => {\n\t\t\tconst indexOf = indicator.exec(readme)?.index;\n\t\t\treturn indexOf ? Math.max(largest, indexOf) : largest;\n\t\t},\n\t\t0,\n\t);\n\tif (!indexOfLastTemplatedBy) {\n\t\treturn undefined;\n\t}\n\n\tconst indexOfNextLine = readme.indexOf(\"\\n\", indexOfLastTemplatedBy);\n\n\treturn readme.slice(indexOfNextLine).trim() || undefined;\n}\n"],"mappings":";AAAA,MAAa,wBAAwB,CACpC,sEACA,iCACA;AAED,eAAsB,oBAAoBA,WAAkC;CAC3E,MAAM,SAAS,MAAM,WAAW;AAChC,MAAK,OACJ;CAGD,MAAM,yBAAyB,sBAAsB,OACpD,CAAC,SAAS,cAAc;EACvB,MAAM,UAAU,UAAU,KAAK,OAAO,EAAE;AACxC,SAAO,UAAU,KAAK,IAAI,SAAS,QAAQ,GAAG;CAC9C,GACD,EACA;AACD,MAAK,uBACJ;CAGD,MAAM,kBAAkB,OAAO,QAAQ,MAAM,uBAAuB;AAEpE,QAAO,OAAO,MAAM,gBAAgB,CAAC,MAAM;AAC3C"}
@@ -1,3 +1,7 @@
1
+ //#region src/options/readReadmeUsage.d.ts
1
2
  declare function readReadmeUsage(getReadme: () => Promise<string>): Promise<string | undefined>;
3
+ //# sourceMappingURL=readReadmeUsage.d.ts.map
2
4
 
5
+ //#endregion
3
6
  export { readReadmeUsage };
7
+ //# sourceMappingURL=readReadmeUsage.d.ts.map