create-typescript-app 1.30.0 → 1.32.0

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 (149) hide show
  1. package/README.md +35 -32
  2. package/lib/bin/index.js +8 -7
  3. package/lib/bin/index.js.map +1 -1
  4. package/lib/bin/promptForMode.d.ts +11 -0
  5. package/lib/bin/promptForMode.js +102 -0
  6. package/lib/bin/promptForMode.js.map +1 -0
  7. package/lib/create/createAndEnterGitDirectory.d.ts +3 -0
  8. package/lib/create/createAndEnterGitDirectory.js +19 -0
  9. package/lib/create/createAndEnterGitDirectory.js.map +1 -0
  10. package/lib/create/createRerunSuggestion.d.ts +1 -2
  11. package/lib/create/createRerunSuggestion.js +18 -5
  12. package/lib/create/createRerunSuggestion.js.map +1 -1
  13. package/lib/create/createWithOptions.d.ts +1 -0
  14. package/lib/create/createWithOptions.js +6 -9
  15. package/lib/create/createWithOptions.js.map +1 -1
  16. package/lib/create/index.d.ts +2 -3
  17. package/lib/create/index.js +16 -19
  18. package/lib/create/index.js.map +1 -1
  19. package/lib/initialize/index.d.ts +1 -2
  20. package/lib/initialize/index.js +7 -7
  21. package/lib/initialize/index.js.map +1 -1
  22. package/lib/initialize/initializeWithOptions.d.ts +1 -0
  23. package/lib/initialize/initializeWithOptions.js +4 -4
  24. package/lib/initialize/initializeWithOptions.js.map +1 -1
  25. package/lib/migrate/index.d.ts +1 -2
  26. package/lib/migrate/index.js +8 -5
  27. package/lib/migrate/index.js.map +1 -1
  28. package/lib/migrate/migrateWithOptions.d.ts +1 -0
  29. package/lib/migrate/migrateWithOptions.js +3 -3
  30. package/lib/migrate/migrateWithOptions.js.map +1 -1
  31. package/lib/shared/cli/outro.d.ts +4 -3
  32. package/lib/shared/cli/outro.js +2 -2
  33. package/lib/shared/cli/outro.js.map +1 -1
  34. package/lib/shared/generateNextSteps.d.ts +8 -0
  35. package/lib/shared/generateNextSteps.js +60 -0
  36. package/lib/shared/generateNextSteps.js.map +1 -0
  37. package/lib/shared/getGitHubUserAsAllContributor.d.ts +5 -1
  38. package/lib/shared/getGitHubUserAsAllContributor.js +11 -3
  39. package/lib/shared/getGitHubUserAsAllContributor.js.map +1 -1
  40. package/lib/shared/options/args.d.ts +44 -4
  41. package/lib/shared/options/args.js +15 -2
  42. package/lib/shared/options/args.js.map +1 -1
  43. package/lib/shared/options/augmentOptionsWithExcludes.d.ts +2 -0
  44. package/lib/shared/options/augmentOptionsWithExcludes.js +33 -3
  45. package/lib/shared/options/augmentOptionsWithExcludes.js.map +1 -1
  46. package/lib/shared/options/{readOptionDefaults → createOptionDefaults}/index.d.ts +10 -3
  47. package/lib/shared/options/{readOptionDefaults → createOptionDefaults}/index.js +14 -9
  48. package/lib/shared/options/createOptionDefaults/index.js.map +1 -0
  49. package/lib/shared/options/{readOptionDefaults → createOptionDefaults}/parsePackageAuthor.d.ts +2 -0
  50. package/lib/shared/options/createOptionDefaults/parsePackageAuthor.js.map +1 -0
  51. package/lib/shared/options/createOptionDefaults/readDefaultsFromReadme.js.map +1 -0
  52. package/lib/shared/options/detectEmailRedundancy.d.ts +8 -0
  53. package/lib/shared/options/detectEmailRedundancy.js +16 -0
  54. package/lib/shared/options/detectEmailRedundancy.js.map +1 -0
  55. package/lib/shared/options/ensureRepositoryExists.d.ts +3 -1
  56. package/lib/shared/options/ensureRepositoryExists.js +2 -1
  57. package/lib/shared/options/ensureRepositoryExists.js.map +1 -1
  58. package/lib/shared/options/getPrefillOrPromptedOption.d.ts +1 -1
  59. package/lib/shared/options/getPrefillOrPromptedOption.js +1 -4
  60. package/lib/shared/options/getPrefillOrPromptedOption.js.map +1 -1
  61. package/lib/shared/options/optionsSchema.d.ts +194 -0
  62. package/lib/shared/options/optionsSchema.js +57 -0
  63. package/lib/shared/options/optionsSchema.js.map +1 -0
  64. package/lib/shared/options/readOptions.d.ts +4 -3
  65. package/lib/shared/options/readOptions.js +46 -58
  66. package/lib/shared/options/readOptions.js.map +1 -1
  67. package/lib/shared/packages.d.ts +2 -0
  68. package/lib/shared/runOrRestore.d.ts +1 -1
  69. package/lib/shared/types.d.ts +49 -7
  70. package/lib/steps/addOwnerAsAllContributor.d.ts +5 -1
  71. package/lib/steps/addOwnerAsAllContributor.js +8 -3
  72. package/lib/steps/addOwnerAsAllContributor.js.map +1 -1
  73. package/lib/steps/addToolAllContributors.d.ts +5 -1
  74. package/lib/steps/addToolAllContributors.js +2 -2
  75. package/lib/steps/addToolAllContributors.js.map +1 -1
  76. package/lib/steps/detectExistingContributors.d.ts +2 -0
  77. package/lib/steps/finalizeDependencies.d.ts +2 -0
  78. package/lib/steps/finalizeDependencies.js +8 -6
  79. package/lib/steps/finalizeDependencies.js.map +1 -1
  80. package/lib/steps/initializeGitHubRepository/index.d.ts +2 -0
  81. package/lib/steps/initializeGitHubRepository/initializeBranchProtectionSettings.d.ts +2 -0
  82. package/lib/steps/initializeGitHubRepository/labels/outcomeLabels.js +5 -0
  83. package/lib/steps/initializeGitHubRepository/labels/outcomeLabels.js.map +1 -1
  84. package/lib/steps/initializeGitRemote.d.ts +2 -0
  85. package/lib/steps/initializeRepositorySettings.d.ts +2 -0
  86. package/lib/steps/uninstallPackages.d.ts +1 -1
  87. package/lib/steps/uninstallPackages.js +3 -2
  88. package/lib/steps/uninstallPackages.js.map +1 -1
  89. package/lib/steps/updateAllContributorsTable.d.ts +2 -0
  90. package/lib/steps/updateLocalFiles.d.ts +1 -2
  91. package/lib/steps/updateLocalFiles.js +4 -7
  92. package/lib/steps/updateLocalFiles.js.map +1 -1
  93. package/lib/steps/writeReadme/findIntroSectionClose.js +1 -1
  94. package/lib/steps/writeReadme/findIntroSectionClose.js.map +1 -1
  95. package/lib/steps/writeReadme/generateTopContent.d.ts +2 -0
  96. package/lib/steps/writeReadme/generateTopContent.js +17 -2
  97. package/lib/steps/writeReadme/generateTopContent.js.map +1 -1
  98. package/lib/steps/writeReadme/index.d.ts +2 -0
  99. package/lib/steps/writeReadme/index.js +1 -1
  100. package/lib/steps/writeReadme/index.js.map +1 -1
  101. package/lib/steps/writing/creation/createESLintRC.d.ts +2 -0
  102. package/lib/steps/writing/creation/createESLintRC.js +35 -42
  103. package/lib/steps/writing/creation/createESLintRC.js.map +1 -1
  104. package/lib/steps/writing/creation/dotGitHub/createDevelopment.d.ts +2 -0
  105. package/lib/steps/writing/creation/dotGitHub/createDevelopment.js +1 -1
  106. package/lib/steps/writing/creation/dotGitHub/createDevelopment.js.map +1 -1
  107. package/lib/steps/writing/creation/dotGitHub/createDotGitHubFiles.d.ts +2 -0
  108. package/lib/steps/writing/creation/dotGitHub/createDotGitHubFiles.js +9 -9
  109. package/lib/steps/writing/creation/dotGitHub/createDotGitHubFiles.js.map +1 -1
  110. package/lib/steps/writing/creation/dotGitHub/createWorkflowFile.d.ts +1 -1
  111. package/lib/steps/writing/creation/dotGitHub/createWorkflowFile.js.map +1 -1
  112. package/lib/steps/writing/creation/dotGitHub/{workflows.d.ts → createWorkflows.d.ts} +2 -0
  113. package/lib/steps/writing/creation/dotGitHub/{workflows.js → createWorkflows.js} +11 -89
  114. package/lib/steps/writing/creation/dotGitHub/createWorkflows.js.map +1 -0
  115. package/lib/steps/writing/creation/dotGitHub/index.d.ts +2 -0
  116. package/lib/steps/writing/creation/dotGitHub/index.js +1 -1
  117. package/lib/steps/writing/creation/dotGitHub/index.js.map +1 -1
  118. package/lib/steps/writing/creation/dotGitHub/issueTemplate.d.ts +2 -0
  119. package/lib/steps/writing/creation/dotVSCode.d.ts +2 -0
  120. package/lib/steps/writing/creation/index.d.ts +1 -2
  121. package/lib/steps/writing/creation/index.js +2 -2
  122. package/lib/steps/writing/creation/index.js.map +1 -1
  123. package/lib/steps/writing/creation/rootFiles.d.ts +2 -0
  124. package/lib/steps/writing/creation/rootFiles.js +4 -3
  125. package/lib/steps/writing/creation/rootFiles.js.map +1 -1
  126. package/lib/steps/writing/creation/src.d.ts +2 -0
  127. package/lib/steps/writing/creation/writeAllContributorsRC.d.ts +2 -0
  128. package/lib/steps/writing/creation/writeAllContributorsRC.js +1 -1
  129. package/lib/steps/writing/creation/writeAllContributorsRC.js.map +1 -1
  130. package/lib/steps/writing/creation/writePackageJson.d.ts +2 -0
  131. package/lib/steps/writing/creation/writePackageJson.js +3 -3
  132. package/lib/steps/writing/creation/writePackageJson.js.map +1 -1
  133. package/lib/steps/writing/writeStructure.d.ts +1 -2
  134. package/lib/steps/writing/writeStructure.js +2 -2
  135. package/lib/steps/writing/writeStructure.js.map +1 -1
  136. package/package.json +5 -8
  137. package/lib/bin/mode.d.ts +0 -14
  138. package/lib/bin/mode.js +0 -50
  139. package/lib/bin/mode.js.map +0 -1
  140. package/lib/create/createAndEnterRepository.d.ts +0 -3
  141. package/lib/create/createAndEnterRepository.js +0 -15
  142. package/lib/create/createAndEnterRepository.js.map +0 -1
  143. package/lib/shared/options/readOptionDefaults/index.js.map +0 -1
  144. package/lib/shared/options/readOptionDefaults/parsePackageAuthor.js.map +0 -1
  145. package/lib/shared/options/readOptionDefaults/readDefaultsFromReadme.js.map +0 -1
  146. package/lib/steps/writing/creation/dotGitHub/workflows.js.map +0 -1
  147. /package/lib/shared/options/{readOptionDefaults → createOptionDefaults}/parsePackageAuthor.js +0 -0
  148. /package/lib/shared/options/{readOptionDefaults → createOptionDefaults}/readDefaultsFromReadme.d.ts +0 -0
  149. /package/lib/shared/options/{readOptionDefaults → createOptionDefaults}/readDefaultsFromReadme.js +0 -0
@@ -1,27 +1,40 @@
1
1
  const allArgOptions = {
2
+ access: { type: "string" },
2
3
  author: { type: "string" },
3
4
  base: { type: "string" },
4
- "create-repository": { type: "boolean" },
5
5
  description: { type: "string" },
6
+ directory: { type: "string" },
6
7
  email: { type: "string" },
8
+ "email-github": { type: "string" },
9
+ "email-npm": { type: "string" },
10
+ "exclude-all-contributors": { type: "boolean" },
7
11
  "exclude-compliance": { type: "boolean" },
8
- "exclude-contributors": { type: "boolean" },
12
+ "exclude-lint-deprecation": { type: "boolean" },
13
+ "exclude-lint-eslint": { type: "boolean" },
14
+ "exclude-lint-jsdoc": { type: "boolean" },
9
15
  "exclude-lint-json": { type: "boolean" },
10
16
  "exclude-lint-knip": { type: "boolean" },
11
17
  "exclude-lint-md": { type: "boolean" },
12
18
  "exclude-lint-package-json": { type: "boolean" },
13
19
  "exclude-lint-packages": { type: "boolean" },
14
20
  "exclude-lint-perfectionist": { type: "boolean" },
21
+ "exclude-lint-regex": { type: "boolean" },
15
22
  "exclude-lint-spelling": { type: "boolean" },
23
+ "exclude-lint-strict": { type: "boolean" },
24
+ "exclude-lint-stylistic": { type: "boolean" },
16
25
  "exclude-lint-yml": { type: "boolean" },
17
26
  "exclude-releases": { type: "boolean" },
18
27
  "exclude-renovate": { type: "boolean" },
19
28
  "exclude-tests": { type: "boolean" },
20
29
  funding: { type: "string" },
30
+ keywords: { multiple: true, type: "string" },
21
31
  logo: { type: "string" },
22
32
  "logo-alt": { type: "string" },
33
+ mode: { type: "string" },
34
+ offline: { type: "boolean" },
23
35
  owner: { type: "string" },
24
36
  repository: { type: "string" },
37
+ "skip-all-contributors-api": { type: "boolean" },
25
38
  "skip-github-api": { type: "boolean" },
26
39
  "skip-install": { type: "boolean" },
27
40
  "skip-removal": { type: "boolean" },
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/shared/options/args.ts"],"sourcesContent":["export const allArgOptions = {\n\tauthor: { type: \"string\" },\n\tbase: { type: \"string\" },\n\t\"create-repository\": { type: \"boolean\" },\n\tdescription: { type: \"string\" },\n\temail: { type: \"string\" },\n\t\"exclude-compliance\": { type: \"boolean\" },\n\t\"exclude-contributors\": { type: \"boolean\" },\n\t\"exclude-lint-json\": { type: \"boolean\" },\n\t\"exclude-lint-knip\": { type: \"boolean\" },\n\t\"exclude-lint-md\": { type: \"boolean\" },\n\t\"exclude-lint-package-json\": { type: \"boolean\" },\n\t\"exclude-lint-packages\": { type: \"boolean\" },\n\t\"exclude-lint-perfectionist\": { type: \"boolean\" },\n\t\"exclude-lint-spelling\": { type: \"boolean\" },\n\t\"exclude-lint-yml\": { type: \"boolean\" },\n\t\"exclude-releases\": { type: \"boolean\" },\n\t\"exclude-renovate\": { type: \"boolean\" },\n\t\"exclude-tests\": { type: \"boolean\" },\n\tfunding: { type: \"string\" },\n\tlogo: { type: \"string\" },\n\t\"logo-alt\": { type: \"string\" },\n\towner: { type: \"string\" },\n\trepository: { type: \"string\" },\n\t\"skip-github-api\": { type: \"boolean\" },\n\t\"skip-install\": { type: \"boolean\" },\n\t\"skip-removal\": { type: \"boolean\" },\n\t\"skip-restore\": { type: \"boolean\" },\n\t\"skip-uninstall\": { type: \"boolean\" },\n\ttitle: { type: \"string\" },\n} as const;\n"],"mappings":"AAAO,MAAM,gBAAgB;AAAA,EAC5B,QAAQ,EAAE,MAAM,SAAS;AAAA,EACzB,MAAM,EAAE,MAAM,SAAS;AAAA,EACvB,qBAAqB,EAAE,MAAM,UAAU;AAAA,EACvC,aAAa,EAAE,MAAM,SAAS;AAAA,EAC9B,OAAO,EAAE,MAAM,SAAS;AAAA,EACxB,sBAAsB,EAAE,MAAM,UAAU;AAAA,EACxC,wBAAwB,EAAE,MAAM,UAAU;AAAA,EAC1C,qBAAqB,EAAE,MAAM,UAAU;AAAA,EACvC,qBAAqB,EAAE,MAAM,UAAU;AAAA,EACvC,mBAAmB,EAAE,MAAM,UAAU;AAAA,EACrC,6BAA6B,EAAE,MAAM,UAAU;AAAA,EAC/C,yBAAyB,EAAE,MAAM,UAAU;AAAA,EAC3C,8BAA8B,EAAE,MAAM,UAAU;AAAA,EAChD,yBAAyB,EAAE,MAAM,UAAU;AAAA,EAC3C,oBAAoB,EAAE,MAAM,UAAU;AAAA,EACtC,oBAAoB,EAAE,MAAM,UAAU;AAAA,EACtC,oBAAoB,EAAE,MAAM,UAAU;AAAA,EACtC,iBAAiB,EAAE,MAAM,UAAU;AAAA,EACnC,SAAS,EAAE,MAAM,SAAS;AAAA,EAC1B,MAAM,EAAE,MAAM,SAAS;AAAA,EACvB,YAAY,EAAE,MAAM,SAAS;AAAA,EAC7B,OAAO,EAAE,MAAM,SAAS;AAAA,EACxB,YAAY,EAAE,MAAM,SAAS;AAAA,EAC7B,mBAAmB,EAAE,MAAM,UAAU;AAAA,EACrC,gBAAgB,EAAE,MAAM,UAAU;AAAA,EAClC,gBAAgB,EAAE,MAAM,UAAU;AAAA,EAClC,gBAAgB,EAAE,MAAM,UAAU;AAAA,EAClC,kBAAkB,EAAE,MAAM,UAAU;AAAA,EACpC,OAAO,EAAE,MAAM,SAAS;AACzB;","names":[]}
1
+ {"version":3,"sources":["../../../src/shared/options/args.ts"],"sourcesContent":["import { ParseArgsConfig } from \"node:util\";\n\nexport const allArgOptions = {\n\taccess: { type: \"string\" },\n\tauthor: { type: \"string\" },\n\tbase: { type: \"string\" },\n\tdescription: { type: \"string\" },\n\tdirectory: { type: \"string\" },\n\temail: { type: \"string\" },\n\t\"email-github\": { type: \"string\" },\n\t\"email-npm\": { type: \"string\" },\n\t\"exclude-all-contributors\": { type: \"boolean\" },\n\t\"exclude-compliance\": { type: \"boolean\" },\n\t\"exclude-lint-deprecation\": { type: \"boolean\" },\n\t\"exclude-lint-eslint\": { type: \"boolean\" },\n\t\"exclude-lint-jsdoc\": { type: \"boolean\" },\n\t\"exclude-lint-json\": { type: \"boolean\" },\n\t\"exclude-lint-knip\": { type: \"boolean\" },\n\t\"exclude-lint-md\": { type: \"boolean\" },\n\t\"exclude-lint-package-json\": { type: \"boolean\" },\n\t\"exclude-lint-packages\": { type: \"boolean\" },\n\t\"exclude-lint-perfectionist\": { type: \"boolean\" },\n\t\"exclude-lint-regex\": { type: \"boolean\" },\n\t\"exclude-lint-spelling\": { type: \"boolean\" },\n\t\"exclude-lint-strict\": { type: \"boolean\" },\n\t\"exclude-lint-stylistic\": { type: \"boolean\" },\n\t\"exclude-lint-yml\": { type: \"boolean\" },\n\t\"exclude-releases\": { type: \"boolean\" },\n\t\"exclude-renovate\": { type: \"boolean\" },\n\t\"exclude-tests\": { type: \"boolean\" },\n\tfunding: { type: \"string\" },\n\tkeywords: { multiple: true, type: \"string\" },\n\tlogo: { type: \"string\" },\n\t\"logo-alt\": { type: \"string\" },\n\tmode: { type: \"string\" },\n\toffline: { type: \"boolean\" },\n\towner: { type: \"string\" },\n\trepository: { type: \"string\" },\n\t\"skip-all-contributors-api\": { type: \"boolean\" },\n\t\"skip-github-api\": { type: \"boolean\" },\n\t\"skip-install\": { type: \"boolean\" },\n\t\"skip-removal\": { type: \"boolean\" },\n\t\"skip-restore\": { type: \"boolean\" },\n\t\"skip-uninstall\": { type: \"boolean\" },\n\ttitle: { type: \"string\" },\n} as const satisfies ParseArgsConfig[\"options\"];\n"],"mappings":"AAEO,MAAM,gBAAgB;AAAA,EAC5B,QAAQ,EAAE,MAAM,SAAS;AAAA,EACzB,QAAQ,EAAE,MAAM,SAAS;AAAA,EACzB,MAAM,EAAE,MAAM,SAAS;AAAA,EACvB,aAAa,EAAE,MAAM,SAAS;AAAA,EAC9B,WAAW,EAAE,MAAM,SAAS;AAAA,EAC5B,OAAO,EAAE,MAAM,SAAS;AAAA,EACxB,gBAAgB,EAAE,MAAM,SAAS;AAAA,EACjC,aAAa,EAAE,MAAM,SAAS;AAAA,EAC9B,4BAA4B,EAAE,MAAM,UAAU;AAAA,EAC9C,sBAAsB,EAAE,MAAM,UAAU;AAAA,EACxC,4BAA4B,EAAE,MAAM,UAAU;AAAA,EAC9C,uBAAuB,EAAE,MAAM,UAAU;AAAA,EACzC,sBAAsB,EAAE,MAAM,UAAU;AAAA,EACxC,qBAAqB,EAAE,MAAM,UAAU;AAAA,EACvC,qBAAqB,EAAE,MAAM,UAAU;AAAA,EACvC,mBAAmB,EAAE,MAAM,UAAU;AAAA,EACrC,6BAA6B,EAAE,MAAM,UAAU;AAAA,EAC/C,yBAAyB,EAAE,MAAM,UAAU;AAAA,EAC3C,8BAA8B,EAAE,MAAM,UAAU;AAAA,EAChD,sBAAsB,EAAE,MAAM,UAAU;AAAA,EACxC,yBAAyB,EAAE,MAAM,UAAU;AAAA,EAC3C,uBAAuB,EAAE,MAAM,UAAU;AAAA,EACzC,0BAA0B,EAAE,MAAM,UAAU;AAAA,EAC5C,oBAAoB,EAAE,MAAM,UAAU;AAAA,EACtC,oBAAoB,EAAE,MAAM,UAAU;AAAA,EACtC,oBAAoB,EAAE,MAAM,UAAU;AAAA,EACtC,iBAAiB,EAAE,MAAM,UAAU;AAAA,EACnC,SAAS,EAAE,MAAM,SAAS;AAAA,EAC1B,UAAU,EAAE,UAAU,MAAM,MAAM,SAAS;AAAA,EAC3C,MAAM,EAAE,MAAM,SAAS;AAAA,EACvB,YAAY,EAAE,MAAM,SAAS;AAAA,EAC7B,MAAM,EAAE,MAAM,SAAS;AAAA,EACvB,SAAS,EAAE,MAAM,UAAU;AAAA,EAC3B,OAAO,EAAE,MAAM,SAAS;AAAA,EACxB,YAAY,EAAE,MAAM,SAAS;AAAA,EAC7B,6BAA6B,EAAE,MAAM,UAAU;AAAA,EAC/C,mBAAmB,EAAE,MAAM,UAAU;AAAA,EACrC,gBAAgB,EAAE,MAAM,UAAU;AAAA,EAClC,gBAAgB,EAAE,MAAM,UAAU;AAAA,EAClC,gBAAgB,EAAE,MAAM,UAAU;AAAA,EAClC,kBAAkB,EAAE,MAAM,UAAU;AAAA,EACpC,OAAO,EAAE,MAAM,SAAS;AACzB;","names":[]}
@@ -1,4 +1,6 @@
1
1
  import { Options } from '../types.js';
2
+ import 'zod';
3
+ import '../codes.js';
2
4
 
3
5
  declare function augmentOptionsWithExcludes(options: Options): Promise<Options | undefined>;
4
6
 
@@ -2,14 +2,29 @@ import * as prompts from "@clack/prompts";
2
2
  import chalk from "chalk";
3
3
  import { filterPromptCancel } from "../prompts.js";
4
4
  const exclusionDescriptions = {
5
+ excludeAllContributors: {
6
+ hint: "--exclude-all-contributors",
7
+ label: "Add all-contributors to track contributions and display them in a README.md table."
8
+ },
5
9
  excludeCompliance: {
6
10
  hint: "--exclude-compliance",
7
11
  label: "Add a GitHub Actions workflow to verify that PRs match an expected format.",
8
12
  uncommon: true
9
13
  },
10
- excludeContributors: {
11
- hint: "--exclude-contributors",
12
- label: "Add all-contributors to track contributions and display them in a README.md table."
14
+ excludeLintDeprecation: {
15
+ hint: "--exclude-lint-deprecation",
16
+ label: "Include an eslint-plugin-deprecation to reports on usage of code marked as @deprecated.",
17
+ uncommon: true
18
+ },
19
+ excludeLintESLint: {
20
+ hint: "--exclude-lint-eslint",
21
+ label: "Include eslint-plugin-eslint-comment to enforce good practices around ESLint comment directives.",
22
+ uncommon: true
23
+ },
24
+ excludeLintJSDoc: {
25
+ hint: "--exclude-lint-jsdoc",
26
+ label: "Include eslint-plugin-jsdoc to enforce good practices around JSDoc comments.",
27
+ uncommon: true
13
28
  },
14
29
  excludeLintJson: {
15
30
  hint: "--exclude-lint-json",
@@ -40,11 +55,26 @@ const exclusionDescriptions = {
40
55
  label: "Apply eslint-plugin-perfectionist to ensure imports, keys, and so on are in sorted order.",
41
56
  uncommon: true
42
57
  },
58
+ excludeLintRegex: {
59
+ hint: "--exclude-lint-regex",
60
+ label: "Include eslint-plugin-regex to enforce good practices around regular expressions.",
61
+ uncommon: true
62
+ },
43
63
  excludeLintSpelling: {
44
64
  hint: "--exclude-lint-spelling",
45
65
  label: "Add cspell to spell check against dictionaries of known words.",
46
66
  uncommon: true
47
67
  },
68
+ excludeLintStrict: {
69
+ hint: "--exclude-lint-strict",
70
+ label: "Include strict logical lint rules such as typescript-eslint's strict config. ",
71
+ uncommon: true
72
+ },
73
+ excludeLintStylistic: {
74
+ hint: "--exclude-lint-stylistic",
75
+ label: "Include stylistic lint rules such as typescript-eslint's stylistic config.",
76
+ uncommon: true
77
+ },
48
78
  excludeLintYml: {
49
79
  hint: "--exclude-lint-yml",
50
80
  label: "Apply linting and sorting to *.yaml and *.yml files.",
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/shared/options/augmentOptionsWithExcludes.ts"],"sourcesContent":["import * as prompts from \"@clack/prompts\";\nimport chalk from \"chalk\";\n\nimport { filterPromptCancel } from \"../prompts.js\";\nimport { InputBase, Options } from \"../types.js\";\n\ninterface ExclusionDescription {\n\thint: string;\n\tlabel: string;\n\tuncommon?: true;\n}\n\ntype ExclusionKey = keyof Options & `exclude${string}`;\n\nconst exclusionDescriptions: Record<ExclusionKey, ExclusionDescription> = {\n\texcludeCompliance: {\n\t\thint: \"--exclude-compliance\",\n\t\tlabel:\n\t\t\t\"Add a GitHub Actions workflow to verify that PRs match an expected format.\",\n\t\tuncommon: true,\n\t},\n\texcludeContributors: {\n\t\thint: \"--exclude-contributors\",\n\t\tlabel:\n\t\t\t\"Add all-contributors to track contributions and display them in a README.md table.\",\n\t},\n\texcludeLintJson: {\n\t\thint: \"--exclude-lint-json\",\n\t\tlabel: \"Apply linting and sorting to *.json and *.jsonc files.\",\n\t\tuncommon: true,\n\t},\n\texcludeLintKnip: {\n\t\thint: \"--exclude-lint-knip\",\n\t\tlabel: \"Add Knip to detect unused files, dependencies, and code exports.\",\n\t},\n\texcludeLintMd: {\n\t\thint: \"--exclude-lint-md\",\n\t\tlabel: \"Apply linting to *.md files.\",\n\t\tuncommon: true,\n\t},\n\texcludeLintPackageJson: {\n\t\thint: \"--exclude-lint-package-json\",\n\t\tlabel: \"Add npm-package-json-lint to lint for package.json correctness.\",\n\t\tuncommon: true,\n\t},\n\texcludeLintPackages: {\n\t\thint: \"--exclude-lint-packages\",\n\t\tlabel:\n\t\t\t\"Add a pnpm dedupe workflow to ensure packages aren't duplicated unnecessarily.\",\n\t\tuncommon: true,\n\t},\n\texcludeLintPerfectionist: {\n\t\thint: \"--exclude-lint-perfectionist\",\n\t\tlabel:\n\t\t\t\"Apply eslint-plugin-perfectionist to ensure imports, keys, and so on are in sorted order.\",\n\t\tuncommon: true,\n\t},\n\texcludeLintSpelling: {\n\t\thint: \"--exclude-lint-spelling\",\n\t\tlabel: \"Add cspell to spell check against dictionaries of known words.\",\n\t\tuncommon: true,\n\t},\n\texcludeLintYml: {\n\t\thint: \"--exclude-lint-yml\",\n\t\tlabel: \"Apply linting and sorting to *.yaml and *.yml files.\",\n\t\tuncommon: true,\n\t},\n\texcludeReleases: {\n\t\thint: \"--exclude-releases\",\n\t\tlabel:\n\t\t\t\"Add release-it to generate changelogs, package bumps, and publishes based on conventional commits.\",\n\t},\n\texcludeRenovate: {\n\t\thint: \"--exclude-renovate\",\n\t\tlabel: \"Add a Renovate config to keep dependencies up-to-date with PRs.\",\n\t},\n\texcludeTests: {\n\t\thint: \"--exclude-tests\",\n\t\tlabel:\n\t\t\t\"Add Vitest tooling for fast unit tests, configured with coverage tracking.\",\n\t},\n};\n\nconst exclusionKeys = Object.keys(exclusionDescriptions) as ExclusionKey[];\n\nexport async function augmentOptionsWithExcludes(\n\toptions: Options,\n): Promise<Options | undefined> {\n\tif (\n\t\tObject.keys(options).some(\n\t\t\t(key) =>\n\t\t\t\tkey in exclusionDescriptions &&\n\t\t\t\toptions[key as keyof typeof options] !== undefined,\n\t\t)\n\t) {\n\t\treturn options;\n\t}\n\n\tconst base =\n\t\toptions.base ??\n\t\tfilterPromptCancel<InputBase | symbol>(\n\t\t\tawait prompts.select({\n\t\t\t\tinitialValue: \"common\" as InputBase,\n\t\t\t\tmessage: `How much tooling would you like the template to set up for you?`,\n\t\t\t\toptions: [\n\t\t\t\t\t{\n\t\t\t\t\t\tlabel: makeLabel(\n\t\t\t\t\t\t\t\"everything\",\n\t\t\t\t\t\t\t\"The most comprehensive tooling imaginable: sorting, spellchecking, and more!\",\n\t\t\t\t\t\t),\n\t\t\t\t\t\tvalue: \"everything\",\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\thint: \"recommended\",\n\t\t\t\t\t\tlabel: makeLabel(\n\t\t\t\t\t\t\t\"common\",\n\t\t\t\t\t\t\t\"Bare starters plus testing and automation for all-contributors and releases.\",\n\t\t\t\t\t\t),\n\t\t\t\t\t\tvalue: \"common\",\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tlabel: makeLabel(\n\t\t\t\t\t\t\t\"minimum\",\n\t\t\t\t\t\t\t\"Just bare starter tooling: building, formatting, linting, and type checking.\",\n\t\t\t\t\t\t),\n\t\t\t\t\t\tvalue: \"minimum\",\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tlabel: makeLabel(\"prompt\", \"(allow me to customize)\"),\n\t\t\t\t\t\tvalue: \"prompt\",\n\t\t\t\t\t},\n\t\t\t\t],\n\t\t\t}),\n\t\t);\n\n\tswitch (base) {\n\t\tcase undefined:\n\t\t\treturn undefined;\n\n\t\tcase \"common\":\n\t\t\treturn {\n\t\t\t\t...options,\n\t\t\t\t...Object.fromEntries(\n\t\t\t\t\texclusionKeys\n\t\t\t\t\t\t.filter((exclusion) => exclusionDescriptions[exclusion].uncommon)\n\t\t\t\t\t\t.map((exclusion) => [exclusion, options[exclusion] ?? true]),\n\t\t\t\t),\n\t\t\t};\n\n\t\tcase \"everything\":\n\t\t\treturn options;\n\n\t\tcase \"minimum\":\n\t\t\treturn {\n\t\t\t\t...options,\n\t\t\t\t...Object.fromEntries(\n\t\t\t\t\texclusionKeys.map((exclusion) => [\n\t\t\t\t\t\texclusion,\n\t\t\t\t\t\toptions[exclusion] ?? true,\n\t\t\t\t\t]),\n\t\t\t\t),\n\t\t\t};\n\n\t\tcase \"prompt\":\n\t\t\tconst exclusionsNotEnabled = new Set(\n\t\t\t\tfilterPromptCancel(\n\t\t\t\t\tawait prompts.multiselect({\n\t\t\t\t\t\tinitialValues: exclusionKeys,\n\t\t\t\t\t\tmessage:\n\t\t\t\t\t\t\t\"Select the tooling portions you'd like to remove. All are enabled by default.\",\n\t\t\t\t\t\toptions: Object.entries(exclusionDescriptions).map(\n\t\t\t\t\t\t\t([value, { hint, label }]) => ({\n\t\t\t\t\t\t\t\thint,\n\t\t\t\t\t\t\t\tlabel,\n\t\t\t\t\t\t\t\tvalue: value as ExclusionKey,\n\t\t\t\t\t\t\t}),\n\t\t\t\t\t\t),\n\t\t\t\t\t}),\n\t\t\t\t),\n\t\t\t);\n\n\t\t\treturn {\n\t\t\t\t...options,\n\t\t\t\t...Object.fromEntries(\n\t\t\t\t\texclusionKeys.map(\n\t\t\t\t\t\t(exclusionKey) =>\n\t\t\t\t\t\t\t[exclusionKey, !exclusionsNotEnabled.has(exclusionKey)] as const,\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t};\n\t}\n}\n\nfunction makeLabel(label: string, message: string) {\n\treturn [chalk.bold(label), message].join(\"\\t \");\n}\n"],"mappings":"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","names":[]}
1
+ {"version":3,"sources":["../../../src/shared/options/augmentOptionsWithExcludes.ts"],"sourcesContent":["import * as prompts from \"@clack/prompts\";\nimport chalk from \"chalk\";\n\nimport { filterPromptCancel } from \"../prompts.js\";\nimport { Options, OptionsBase } from \"../types.js\";\n\ninterface ExclusionDescription {\n\thint: string;\n\tlabel: string;\n\tuncommon?: true;\n}\n\ntype ExclusionKey = keyof Options & `exclude${string}`;\n\nconst exclusionDescriptions: Record<ExclusionKey, ExclusionDescription> = {\n\texcludeAllContributors: {\n\t\thint: \"--exclude-all-contributors\",\n\t\tlabel:\n\t\t\t\"Add all-contributors to track contributions and display them in a README.md table.\",\n\t},\n\texcludeCompliance: {\n\t\thint: \"--exclude-compliance\",\n\t\tlabel:\n\t\t\t\"Add a GitHub Actions workflow to verify that PRs match an expected format.\",\n\t\tuncommon: true,\n\t},\n\texcludeLintDeprecation: {\n\t\thint: \"--exclude-lint-deprecation\",\n\t\tlabel:\n\t\t\t\"Include an eslint-plugin-deprecation to reports on usage of code marked as @deprecated.\",\n\t\tuncommon: true,\n\t},\n\texcludeLintESLint: {\n\t\thint: \"--exclude-lint-eslint\",\n\t\tlabel:\n\t\t\t\"Include eslint-plugin-eslint-comment to enforce good practices around ESLint comment directives.\",\n\t\tuncommon: true,\n\t},\n\texcludeLintJSDoc: {\n\t\thint: \"--exclude-lint-jsdoc\",\n\t\tlabel:\n\t\t\t\"Include eslint-plugin-jsdoc to enforce good practices around JSDoc comments.\",\n\t\tuncommon: true,\n\t},\n\texcludeLintJson: {\n\t\thint: \"--exclude-lint-json\",\n\t\tlabel: \"Apply linting and sorting to *.json and *.jsonc files.\",\n\t\tuncommon: true,\n\t},\n\texcludeLintKnip: {\n\t\thint: \"--exclude-lint-knip\",\n\t\tlabel: \"Add Knip to detect unused files, dependencies, and code exports.\",\n\t},\n\texcludeLintMd: {\n\t\thint: \"--exclude-lint-md\",\n\t\tlabel: \"Apply linting to *.md files.\",\n\t\tuncommon: true,\n\t},\n\texcludeLintPackageJson: {\n\t\thint: \"--exclude-lint-package-json\",\n\t\tlabel: \"Add npm-package-json-lint to lint for package.json correctness.\",\n\t\tuncommon: true,\n\t},\n\texcludeLintPackages: {\n\t\thint: \"--exclude-lint-packages\",\n\t\tlabel:\n\t\t\t\"Add a pnpm dedupe workflow to ensure packages aren't duplicated unnecessarily.\",\n\t\tuncommon: true,\n\t},\n\texcludeLintPerfectionist: {\n\t\thint: \"--exclude-lint-perfectionist\",\n\t\tlabel:\n\t\t\t\"Apply eslint-plugin-perfectionist to ensure imports, keys, and so on are in sorted order.\",\n\t\tuncommon: true,\n\t},\n\texcludeLintRegex: {\n\t\thint: \"--exclude-lint-regex\",\n\t\tlabel:\n\t\t\t\"Include eslint-plugin-regex to enforce good practices around regular expressions.\",\n\t\tuncommon: true,\n\t},\n\texcludeLintSpelling: {\n\t\thint: \"--exclude-lint-spelling\",\n\t\tlabel: \"Add cspell to spell check against dictionaries of known words.\",\n\t\tuncommon: true,\n\t},\n\texcludeLintStrict: {\n\t\thint: \"--exclude-lint-strict\",\n\t\tlabel:\n\t\t\t\"Include strict logical lint rules such as typescript-eslint's strict config. \",\n\t\tuncommon: true,\n\t},\n\texcludeLintStylistic: {\n\t\thint: \"--exclude-lint-stylistic\",\n\t\tlabel:\n\t\t\t\"Include stylistic lint rules such as typescript-eslint's stylistic config.\",\n\t\tuncommon: true,\n\t},\n\texcludeLintYml: {\n\t\thint: \"--exclude-lint-yml\",\n\t\tlabel: \"Apply linting and sorting to *.yaml and *.yml files.\",\n\t\tuncommon: true,\n\t},\n\texcludeReleases: {\n\t\thint: \"--exclude-releases\",\n\t\tlabel:\n\t\t\t\"Add release-it to generate changelogs, package bumps, and publishes based on conventional commits.\",\n\t},\n\texcludeRenovate: {\n\t\thint: \"--exclude-renovate\",\n\t\tlabel: \"Add a Renovate config to keep dependencies up-to-date with PRs.\",\n\t},\n\texcludeTests: {\n\t\thint: \"--exclude-tests\",\n\t\tlabel:\n\t\t\t\"Add Vitest tooling for fast unit tests, configured with coverage tracking.\",\n\t},\n};\n\nconst exclusionKeys = Object.keys(exclusionDescriptions) as ExclusionKey[];\n\nexport async function augmentOptionsWithExcludes(\n\toptions: Options,\n): Promise<Options | undefined> {\n\tif (\n\t\tObject.keys(options).some(\n\t\t\t(key) =>\n\t\t\t\tkey in exclusionDescriptions &&\n\t\t\t\toptions[key as keyof typeof options] !== undefined,\n\t\t)\n\t) {\n\t\treturn options;\n\t}\n\n\tconst base =\n\t\toptions.base ??\n\t\tfilterPromptCancel<OptionsBase | symbol>(\n\t\t\tawait prompts.select({\n\t\t\t\tinitialValue: \"common\" as OptionsBase,\n\t\t\t\tmessage: `How much tooling would you like the template to set up for you?`,\n\t\t\t\toptions: [\n\t\t\t\t\t{\n\t\t\t\t\t\tlabel: makeLabel(\n\t\t\t\t\t\t\t\"everything\",\n\t\t\t\t\t\t\t\"The most comprehensive tooling imaginable: sorting, spellchecking, and more!\",\n\t\t\t\t\t\t),\n\t\t\t\t\t\tvalue: \"everything\",\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\thint: \"recommended\",\n\t\t\t\t\t\tlabel: makeLabel(\n\t\t\t\t\t\t\t\"common\",\n\t\t\t\t\t\t\t\"Bare starters plus testing and automation for all-contributors and releases.\",\n\t\t\t\t\t\t),\n\t\t\t\t\t\tvalue: \"common\",\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tlabel: makeLabel(\n\t\t\t\t\t\t\t\"minimum\",\n\t\t\t\t\t\t\t\"Just bare starter tooling: building, formatting, linting, and type checking.\",\n\t\t\t\t\t\t),\n\t\t\t\t\t\tvalue: \"minimum\",\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tlabel: makeLabel(\"prompt\", \"(allow me to customize)\"),\n\t\t\t\t\t\tvalue: \"prompt\",\n\t\t\t\t\t},\n\t\t\t\t],\n\t\t\t}),\n\t\t);\n\n\tswitch (base) {\n\t\tcase undefined:\n\t\t\treturn undefined;\n\n\t\tcase \"common\":\n\t\t\treturn {\n\t\t\t\t...options,\n\t\t\t\t...Object.fromEntries(\n\t\t\t\t\texclusionKeys\n\t\t\t\t\t\t.filter((exclusion) => exclusionDescriptions[exclusion].uncommon)\n\t\t\t\t\t\t.map((exclusion) => [exclusion, options[exclusion] ?? true]),\n\t\t\t\t),\n\t\t\t};\n\n\t\tcase \"everything\":\n\t\t\treturn options;\n\n\t\tcase \"minimum\":\n\t\t\treturn {\n\t\t\t\t...options,\n\t\t\t\t...Object.fromEntries(\n\t\t\t\t\texclusionKeys.map((exclusion) => [\n\t\t\t\t\t\texclusion,\n\t\t\t\t\t\toptions[exclusion] ?? true,\n\t\t\t\t\t]),\n\t\t\t\t),\n\t\t\t};\n\n\t\tcase \"prompt\":\n\t\t\tconst exclusionsNotEnabled = new Set(\n\t\t\t\tfilterPromptCancel(\n\t\t\t\t\tawait prompts.multiselect({\n\t\t\t\t\t\tinitialValues: exclusionKeys,\n\t\t\t\t\t\tmessage:\n\t\t\t\t\t\t\t\"Select the tooling portions you'd like to remove. All are enabled by default.\",\n\t\t\t\t\t\toptions: Object.entries(exclusionDescriptions).map(\n\t\t\t\t\t\t\t([value, { hint, label }]) => ({\n\t\t\t\t\t\t\t\thint,\n\t\t\t\t\t\t\t\tlabel,\n\t\t\t\t\t\t\t\tvalue: value as ExclusionKey,\n\t\t\t\t\t\t\t}),\n\t\t\t\t\t\t),\n\t\t\t\t\t}),\n\t\t\t\t),\n\t\t\t);\n\n\t\t\treturn {\n\t\t\t\t...options,\n\t\t\t\t...Object.fromEntries(\n\t\t\t\t\texclusionKeys.map(\n\t\t\t\t\t\t(exclusionKey) =>\n\t\t\t\t\t\t\t[exclusionKey, !exclusionsNotEnabled.has(exclusionKey)] as const,\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t};\n\t}\n}\n\nfunction makeLabel(label: string, message: string) {\n\treturn [chalk.bold(label), message].join(\"\\t \");\n}\n"],"mappings":"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","names":[]}
@@ -1,12 +1,19 @@
1
- declare function getGitAndNpmDefaults(): {
1
+ import { PromptedOptions } from '../../types.js';
2
+ import 'zod';
3
+ import '../../codes.js';
4
+
5
+ declare function createOptionDefaults(promptedOptions?: PromptedOptions): {
2
6
  logo: () => Promise<string | undefined>;
3
7
  title: () => Promise<string | undefined>;
4
8
  author: () => Promise<string>;
5
9
  description: () => Promise<string | undefined>;
6
- email: () => Promise<string | undefined>;
10
+ email: () => Promise<{
11
+ github: string;
12
+ npm: string;
13
+ } | undefined>;
7
14
  funding: () => Promise<string | undefined>;
8
15
  owner: () => Promise<string | undefined>;
9
16
  repository: () => Promise<string | undefined>;
10
17
  };
11
18
 
12
- export { getGitAndNpmDefaults };
19
+ export { createOptionDefaults };
@@ -9,13 +9,14 @@ import { tryCatchAsync } from "../../tryCatchAsync.js";
9
9
  import { tryCatchLazyValueAsync } from "../../tryCatchLazyValueAsync.js";
10
10
  import { parsePackageAuthor } from "./parsePackageAuthor.js";
11
11
  import { readDefaultsFromReadme } from "./readDefaultsFromReadme.js";
12
- function getGitAndNpmDefaults() {
12
+ function createOptionDefaults(promptedOptions) {
13
13
  const gitDefaults = tryCatchLazyValueAsync(
14
14
  async () => gitUrlParse(await gitRemoteOriginUrl())
15
15
  );
16
- const npmDefaults = tryCatchLazyValueAsync(
17
- async () => await npmUser((await $`npm whoami`).stdout)
18
- );
16
+ const npmDefaults = tryCatchLazyValueAsync(async () => {
17
+ const whoami = (await $`npm whoami`).stdout;
18
+ return whoami ? await npmUser(whoami) : void 0;
19
+ });
19
20
  const packageData = lazyValue(readPackageData);
20
21
  const packageAuthor = lazyValue(
21
22
  async () => parsePackageAuthor(await packageData())
@@ -23,18 +24,22 @@ function getGitAndNpmDefaults() {
23
24
  return {
24
25
  author: async () => (await packageAuthor()).author ?? npmDefaults.name,
25
26
  description: async () => (await packageData()).description,
26
- email: async () => (await npmDefaults())?.email ?? (await packageAuthor()).email ?? await tryCatchAsync(
27
- async () => (await $`git config --get user.email`).stdout
28
- ),
27
+ email: async () => {
28
+ const gitEmail = await tryCatchAsync(
29
+ async () => (await $`git config --get user.email`).stdout
30
+ );
31
+ const npmEmail = (await npmDefaults())?.email ?? (await packageAuthor()).email;
32
+ return gitEmail || npmEmail ? { github: gitEmail || npmEmail, npm: npmEmail || gitEmail } : void 0;
33
+ },
29
34
  funding: async () => await tryCatchAsync(
30
35
  async () => (await fs.readFile(".github/FUNDING.yml")).toString().split(":")[1]?.trim()
31
36
  ),
32
37
  owner: async () => (await gitDefaults())?.organization ?? (await packageAuthor()).author,
33
- repository: async () => (await gitDefaults())?.name ?? (await packageData()).name,
38
+ repository: async () => promptedOptions?.repository ?? (await gitDefaults())?.name ?? (await packageData()).name,
34
39
  ...readDefaultsFromReadme()
35
40
  };
36
41
  }
37
42
  export {
38
- getGitAndNpmDefaults
43
+ createOptionDefaults
39
44
  };
40
45
  //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../src/shared/options/createOptionDefaults/index.ts"],"sourcesContent":["import { $ } from \"execa\";\nimport gitRemoteOriginUrl from \"git-remote-origin-url\";\nimport gitUrlParse from \"git-url-parse\";\nimport lazyValue from \"lazy-value\";\nimport fs from \"node:fs/promises\";\nimport npmUser from \"npm-user\";\n\nimport { readPackageData } from \"../../packages.js\";\nimport { tryCatchAsync } from \"../../tryCatchAsync.js\";\nimport { tryCatchLazyValueAsync } from \"../../tryCatchLazyValueAsync.js\";\nimport { PromptedOptions } from \"../../types.js\";\nimport { parsePackageAuthor } from \"./parsePackageAuthor.js\";\nimport { readDefaultsFromReadme } from \"./readDefaultsFromReadme.js\";\n\nexport function createOptionDefaults(promptedOptions?: PromptedOptions) {\n\tconst gitDefaults = tryCatchLazyValueAsync(async () =>\n\t\tgitUrlParse(await gitRemoteOriginUrl()),\n\t);\n\n\tconst npmDefaults = tryCatchLazyValueAsync(async () => {\n\t\tconst whoami = (await $`npm whoami`).stdout;\n\t\treturn whoami ? await npmUser(whoami) : undefined;\n\t});\n\n\tconst packageData = lazyValue(readPackageData);\n\tconst packageAuthor = lazyValue(async () =>\n\t\tparsePackageAuthor(await packageData()),\n\t);\n\n\treturn {\n\t\tauthor: async () => (await packageAuthor()).author ?? npmDefaults.name,\n\t\tdescription: async () => (await packageData()).description,\n\t\temail: async () => {\n\t\t\tconst gitEmail = await tryCatchAsync(\n\t\t\t\tasync () => (await $`git config --get user.email`).stdout,\n\t\t\t);\n\t\t\tconst npmEmail =\n\t\t\t\t(await npmDefaults())?.email ?? (await packageAuthor()).email;\n\n\t\t\t/* eslint-disable @typescript-eslint/no-non-null-assertion */\n\t\t\treturn gitEmail || npmEmail\n\t\t\t\t? { github: (gitEmail || npmEmail)!, npm: (npmEmail || gitEmail)! }\n\t\t\t\t: undefined;\n\t\t\t/* eslint-enable @typescript-eslint/no-non-null-assertion */\n\t\t},\n\t\tfunding: async () =>\n\t\t\tawait tryCatchAsync(\n\t\t\t\tasync () =>\n\t\t\t\t\t(await fs.readFile(\".github/FUNDING.yml\"))\n\t\t\t\t\t\t.toString()\n\t\t\t\t\t\t.split(\":\")[1]\n\t\t\t\t\t\t?.trim(),\n\t\t\t),\n\t\towner: async () =>\n\t\t\t(await gitDefaults())?.organization ?? (await packageAuthor()).author,\n\t\trepository: async () =>\n\t\t\tpromptedOptions?.repository ??\n\t\t\t(await gitDefaults())?.name ??\n\t\t\t(await packageData()).name,\n\t\t...readDefaultsFromReadme(),\n\t};\n}\n"],"mappings":"AAAA,SAAS,SAAS;AAClB,OAAO,wBAAwB;AAC/B,OAAO,iBAAiB;AACxB,OAAO,eAAe;AACtB,OAAO,QAAQ;AACf,OAAO,aAAa;AAEpB,SAAS,uBAAuB;AAChC,SAAS,qBAAqB;AAC9B,SAAS,8BAA8B;AAEvC,SAAS,0BAA0B;AACnC,SAAS,8BAA8B;AAEhC,SAAS,qBAAqB,iBAAmC;AACvE,QAAM,cAAc;AAAA,IAAuB,YAC1C,YAAY,MAAM,mBAAmB,CAAC;AAAA,EACvC;AAEA,QAAM,cAAc,uBAAuB,YAAY;AACtD,UAAM,UAAU,MAAM,eAAe;AACrC,WAAO,SAAS,MAAM,QAAQ,MAAM,IAAI;AAAA,EACzC,CAAC;AAED,QAAM,cAAc,UAAU,eAAe;AAC7C,QAAM,gBAAgB;AAAA,IAAU,YAC/B,mBAAmB,MAAM,YAAY,CAAC;AAAA,EACvC;AAEA,SAAO;AAAA,IACN,QAAQ,aAAa,MAAM,cAAc,GAAG,UAAU,YAAY;AAAA,IAClE,aAAa,aAAa,MAAM,YAAY,GAAG;AAAA,IAC/C,OAAO,YAAY;AAClB,YAAM,WAAW,MAAM;AAAA,QACtB,aAAa,MAAM,gCAAgC;AAAA,MACpD;AACA,YAAM,YACJ,MAAM,YAAY,IAAI,UAAU,MAAM,cAAc,GAAG;AAGzD,aAAO,YAAY,WAChB,EAAE,QAAS,YAAY,UAAY,KAAM,YAAY,SAAW,IAChE;AAAA,IAEJ;AAAA,IACA,SAAS,YACR,MAAM;AAAA,MACL,aACE,MAAM,GAAG,SAAS,qBAAqB,GACtC,SAAS,EACT,MAAM,GAAG,EAAE,CAAC,GACX,KAAK;AAAA,IACV;AAAA,IACD,OAAO,aACL,MAAM,YAAY,IAAI,iBAAiB,MAAM,cAAc,GAAG;AAAA,IAChE,YAAY,YACX,iBAAiB,eAChB,MAAM,YAAY,IAAI,SACtB,MAAM,YAAY,GAAG;AAAA,IACvB,GAAG,uBAAuB;AAAA,EAC3B;AACD;","names":[]}
@@ -1,4 +1,6 @@
1
1
  import { PartialPackageData } from '../../types.js';
2
+ import 'zod';
3
+ import '../../codes.js';
2
4
 
3
5
  declare function parsePackageAuthor(packageData: PartialPackageData): {
4
6
  author: string | undefined;
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../src/shared/options/createOptionDefaults/parsePackageAuthor.ts"],"sourcesContent":["import { PartialPackageData } from \"../../types.js\";\n\nexport function parsePackageAuthor(packageData: PartialPackageData) {\n\tconst [packageAuthor, packageEmail] =\n\t\ttypeof packageData.author === \"string\"\n\t\t\t? [\n\t\t\t\t\tpackageData.author.split(\"<\")[0].trim(),\n\t\t\t\t\tpackageData.author.split(/<|>/)[1]?.trim(),\n\t\t\t ]\n\t\t\t: [packageData.author?.name, packageData.author?.email];\n\n\treturn {\n\t\tauthor: packageAuthor,\n\t\temail: packageEmail,\n\t};\n}\n"],"mappings":"AAEO,SAAS,mBAAmB,aAAiC;AACnE,QAAM,CAAC,eAAe,YAAY,IACjC,OAAO,YAAY,WAAW,WAC3B;AAAA,IACA,YAAY,OAAO,MAAM,GAAG,EAAE,CAAC,EAAE,KAAK;AAAA,IACtC,YAAY,OAAO,MAAM,KAAK,EAAE,CAAC,GAAG,KAAK;AAAA,EACzC,IACA,CAAC,YAAY,QAAQ,MAAM,YAAY,QAAQ,KAAK;AAExD,SAAO;AAAA,IACN,QAAQ;AAAA,IACR,OAAO;AAAA,EACR;AACD;","names":[]}
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../src/shared/options/createOptionDefaults/readDefaultsFromReadme.ts"],"sourcesContent":["import lazyValue from \"lazy-value\";\n\nimport { readFileSafe } from \"../../readFileSafe.js\";\n\nexport function readDefaultsFromReadme() {\n\tconst readme = lazyValue(async () => await readFileSafe(\"README.md\", \"\"));\n\n\tconst imageTag = lazyValue(\n\t\tasync () => (await readme()).match(/<img.+src.+\\/>/)?.[0],\n\t);\n\n\treturn {\n\t\tlogo: async () =>\n\t\t\t(await imageTag())\n\t\t\t\t?.match(/src\\s*=(.+)?\\/>/)?.[1]\n\t\t\t\t?.replaceAll(/^['\"]|['\"]$/g, \"\"),\n\t\ttitle: async () =>\n\t\t\t(await readme())\n\t\t\t\t.match(/^(?:# |<h1\\s+align=\"center\">)(.*?)(?:<\\/h1>)?$/i)?.[1]\n\t\t\t\t?.trim()\n\t\t\t\t?.replace(/<[^>]+(?:>|$)/g, \"\"),\n\t};\n}\n"],"mappings":"AAAA,OAAO,eAAe;AAEtB,SAAS,oBAAoB;AAEtB,SAAS,yBAAyB;AACxC,QAAM,SAAS,UAAU,YAAY,MAAM,aAAa,aAAa,EAAE,CAAC;AAExE,QAAM,WAAW;AAAA,IAChB,aAAa,MAAM,OAAO,GAAG,MAAM,gBAAgB,IAAI,CAAC;AAAA,EACzD;AAEA,SAAO;AAAA,IACN,MAAM,aACJ,MAAM,SAAS,IACb,MAAM,iBAAiB,IAAI,CAAC,GAC5B,WAAW,gBAAgB,EAAE;AAAA,IACjC,OAAO,aACL,MAAM,OAAO,GACZ,MAAM,iDAAiD,IAAI,CAAC,GAC3D,KAAK,GACL,QAAQ,kBAAkB,EAAE;AAAA,EACjC;AACD;","names":[]}
@@ -0,0 +1,8 @@
1
+ interface EmailValues {
2
+ email?: boolean | string;
3
+ "email-github"?: boolean | string;
4
+ "email-npm"?: boolean | string;
5
+ }
6
+ declare function detectEmailRedundancy(values: EmailValues): "--email should not be specified if both --email-github and --email-npm are specified." | "If --email-github is specified, either --email or --email-npm should be." | "If --email-npm is specified, either --email or --email-github should be." | undefined;
7
+
8
+ export { EmailValues, detectEmailRedundancy };
@@ -0,0 +1,16 @@
1
+ function detectEmailRedundancy(values) {
2
+ if (values.email) {
3
+ return values["email-github"] && values["email-npm"] ? "--email should not be specified if both --email-github and --email-npm are specified." : void 0;
4
+ }
5
+ if (values["email-github"] && !values["email-npm"]) {
6
+ return "If --email-github is specified, either --email or --email-npm should be.";
7
+ }
8
+ if (values["email-npm"] && !values["email-github"]) {
9
+ return "If --email-npm is specified, either --email or --email-github should be.";
10
+ }
11
+ return void 0;
12
+ }
13
+ export {
14
+ detectEmailRedundancy
15
+ };
16
+ //# sourceMappingURL=detectEmailRedundancy.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/shared/options/detectEmailRedundancy.ts"],"sourcesContent":["export interface EmailValues {\n\temail?: boolean | string;\n\t\"email-github\"?: boolean | string;\n\t\"email-npm\"?: boolean | string;\n}\n\nexport function detectEmailRedundancy(values: EmailValues) {\n\tif (values.email) {\n\t\treturn values[\"email-github\"] && values[\"email-npm\"]\n\t\t\t? \"--email should not be specified if both --email-github and --email-npm are specified.\"\n\t\t\t: undefined;\n\t}\n\n\tif (values[\"email-github\"] && !values[\"email-npm\"]) {\n\t\treturn \"If --email-github is specified, either --email or --email-npm should be.\";\n\t}\n\n\tif (values[\"email-npm\"] && !values[\"email-github\"]) {\n\t\treturn \"If --email-npm is specified, either --email or --email-github should be.\";\n\t}\n\n\treturn undefined;\n}\n"],"mappings":"AAMO,SAAS,sBAAsB,QAAqB;AAC1D,MAAI,OAAO,OAAO;AACjB,WAAO,OAAO,cAAc,KAAK,OAAO,WAAW,IAChD,0FACA;AAAA,EACJ;AAEA,MAAI,OAAO,cAAc,KAAK,CAAC,OAAO,WAAW,GAAG;AACnD,WAAO;AAAA,EACR;AAEA,MAAI,OAAO,WAAW,KAAK,CAAC,OAAO,cAAc,GAAG;AACnD,WAAO;AAAA,EACR;AAEA,SAAO;AACR;","names":[]}
@@ -1,8 +1,10 @@
1
1
  import { Options } from '../types.js';
2
2
  import { GitHub } from './getGitHub.js';
3
+ import 'zod';
4
+ import '../codes.js';
3
5
  import 'octokit';
4
6
 
5
- type EnsureRepositoryExistsOptions = Pick<Options, "createRepository" | "owner" | "repository">;
7
+ type EnsureRepositoryExistsOptions = Pick<Options, "mode" | "owner" | "repository">;
6
8
  interface RepositoryExistsResult {
7
9
  github: GitHub | undefined;
8
10
  repository: string;
@@ -2,7 +2,8 @@ import * as prompts from "@clack/prompts";
2
2
  import { doesRepositoryExist } from "../doesRepositoryExist.js";
3
3
  import { filterPromptCancel } from "../prompts.js";
4
4
  async function ensureRepositoryExists(github, options) {
5
- let { createRepository, repository } = options;
5
+ let { repository } = options;
6
+ let createRepository = options.mode === "create";
6
7
  while (github) {
7
8
  if (await doesRepositoryExist(github.octokit, options)) {
8
9
  return { github, repository };
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/shared/options/ensureRepositoryExists.ts"],"sourcesContent":["import * as prompts from \"@clack/prompts\";\n\nimport { doesRepositoryExist } from \"../doesRepositoryExist.js\";\nimport { filterPromptCancel } from \"../prompts.js\";\nimport { Options } from \"../types.js\";\nimport { GitHub } from \"./getGitHub.js\";\n\nexport type EnsureRepositoryExistsOptions = Pick<\n\tOptions,\n\t\"createRepository\" | \"owner\" | \"repository\"\n>;\n\nexport interface RepositoryExistsResult {\n\tgithub: GitHub | undefined;\n\trepository: string;\n}\n\nexport async function ensureRepositoryExists(\n\tgithub: GitHub | undefined,\n\toptions: EnsureRepositoryExistsOptions,\n): Promise<Partial<RepositoryExistsResult>> {\n\t// We'll only respect input options once before prompting for them\n\tlet { createRepository, repository } = options;\n\n\t// We'll continuously pester the user for a repository\n\t// until they bail, create a new one, or it exists.\n\twhile (github) {\n\t\tif (await doesRepositoryExist(github.octokit, options)) {\n\t\t\treturn { github, repository };\n\t\t}\n\n\t\tconst selection = createRepository\n\t\t\t? \"create\"\n\t\t\t: filterPromptCancel(\n\t\t\t\t\t(await prompts.select({\n\t\t\t\t\t\tmessage: `Repository ${options.repository} doesn't seem to exist under ${options.owner}. What would you like to do?`,\n\t\t\t\t\t\toptions: [\n\t\t\t\t\t\t\t{ label: \"Create a new repository\", value: \"create\" },\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tlabel: \"Switch to a different repository name\",\n\t\t\t\t\t\t\t\tvalue: \"different\",\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tlabel: \"Keep changes local\",\n\t\t\t\t\t\t\t\tvalue: \"local\",\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t{ label: \"Bail out and maybe try again later\", value: \"bail\" },\n\t\t\t\t\t\t],\n\t\t\t\t\t})) as \"bail\" | \"create\" | \"different\" | \"local\",\n\t\t\t );\n\n\t\tcreateRepository = false;\n\n\t\tswitch (selection) {\n\t\t\tcase undefined:\n\t\t\tcase \"bail\":\n\t\t\t\treturn {};\n\n\t\t\tcase \"create\":\n\t\t\t\tawait github.octokit.rest.repos.createUsingTemplate({\n\t\t\t\t\tname: repository,\n\t\t\t\t\towner: options.owner,\n\t\t\t\t\ttemplate_owner: \"JoshuaKGoldberg\",\n\t\t\t\t\ttemplate_repo: \"create-typescript-app\",\n\t\t\t\t});\n\t\t\t\treturn { github: github, repository };\n\n\t\t\tcase \"different\":\n\t\t\t\tconst newRepository = filterPromptCancel(\n\t\t\t\t\tawait prompts.text({\n\t\t\t\t\t\tmessage: `What would you like to call the repository?`,\n\t\t\t\t\t}),\n\t\t\t\t);\n\n\t\t\t\tif (!newRepository) {\n\t\t\t\t\treturn {};\n\t\t\t\t}\n\n\t\t\t\trepository = newRepository;\n\t\t\t\tbreak;\n\n\t\t\tcase \"local\":\n\t\t\t\tgithub = undefined;\n\t\t\t\tbreak;\n\t\t}\n\t}\n\n\treturn { github: github, repository };\n}\n"],"mappings":"AAAA,YAAY,aAAa;AAEzB,SAAS,2BAA2B;AACpC,SAAS,0BAA0B;AAcnC,eAAsB,uBACrB,QACA,SAC2C;AAE3C,MAAI,EAAE,kBAAkB,WAAW,IAAI;AAIvC,SAAO,QAAQ;AACd,QAAI,MAAM,oBAAoB,OAAO,SAAS,OAAO,GAAG;AACvD,aAAO,EAAE,QAAQ,WAAW;AAAA,IAC7B;AAEA,UAAM,YAAY,mBACf,WACA;AAAA,MACC,MAAM,QAAQ,OAAO;AAAA,QACrB,SAAS,cAAc,QAAQ,UAAU,gCAAgC,QAAQ,KAAK;AAAA,QACtF,SAAS;AAAA,UACR,EAAE,OAAO,2BAA2B,OAAO,SAAS;AAAA,UACpD;AAAA,YACC,OAAO;AAAA,YACP,OAAO;AAAA,UACR;AAAA,UACA;AAAA,YACC,OAAO;AAAA,YACP,OAAO;AAAA,UACR;AAAA,UACA,EAAE,OAAO,sCAAsC,OAAO,OAAO;AAAA,QAC9D;AAAA,MACD,CAAC;AAAA,IACD;AAEH,uBAAmB;AAEnB,YAAQ,WAAW;AAAA,MAClB,KAAK;AAAA,MACL,KAAK;AACJ,eAAO,CAAC;AAAA,MAET,KAAK;AACJ,cAAM,OAAO,QAAQ,KAAK,MAAM,oBAAoB;AAAA,UACnD,MAAM;AAAA,UACN,OAAO,QAAQ;AAAA,UACf,gBAAgB;AAAA,UAChB,eAAe;AAAA,QAChB,CAAC;AACD,eAAO,EAAE,QAAgB,WAAW;AAAA,MAErC,KAAK;AACJ,cAAM,gBAAgB;AAAA,UACrB,MAAM,QAAQ,KAAK;AAAA,YAClB,SAAS;AAAA,UACV,CAAC;AAAA,QACF;AAEA,YAAI,CAAC,eAAe;AACnB,iBAAO,CAAC;AAAA,QACT;AAEA,qBAAa;AACb;AAAA,MAED,KAAK;AACJ,iBAAS;AACT;AAAA,IACF;AAAA,EACD;AAEA,SAAO,EAAE,QAAgB,WAAW;AACrC;","names":[]}
1
+ {"version":3,"sources":["../../../src/shared/options/ensureRepositoryExists.ts"],"sourcesContent":["import * as prompts from \"@clack/prompts\";\n\nimport { doesRepositoryExist } from \"../doesRepositoryExist.js\";\nimport { filterPromptCancel } from \"../prompts.js\";\nimport { Options } from \"../types.js\";\nimport { GitHub } from \"./getGitHub.js\";\n\nexport type EnsureRepositoryExistsOptions = Pick<\n\tOptions,\n\t\"mode\" | \"owner\" | \"repository\"\n>;\n\nexport interface RepositoryExistsResult {\n\tgithub: GitHub | undefined;\n\trepository: string;\n}\n\nexport async function ensureRepositoryExists(\n\tgithub: GitHub | undefined,\n\toptions: EnsureRepositoryExistsOptions,\n): Promise<Partial<RepositoryExistsResult>> {\n\t// We'll only respect input options once before prompting for them\n\tlet { repository } = options;\n\tlet createRepository = options.mode === \"create\";\n\n\t// We'll continuously pester the user for a repository\n\t// until they bail, create a new one, or it exists.\n\twhile (github) {\n\t\tif (await doesRepositoryExist(github.octokit, options)) {\n\t\t\treturn { github, repository };\n\t\t}\n\n\t\tconst selection = createRepository\n\t\t\t? \"create\"\n\t\t\t: filterPromptCancel(\n\t\t\t\t\t(await prompts.select({\n\t\t\t\t\t\tmessage: `Repository ${options.repository} doesn't seem to exist under ${options.owner}. What would you like to do?`,\n\t\t\t\t\t\toptions: [\n\t\t\t\t\t\t\t{ label: \"Create a new repository\", value: \"create\" },\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tlabel: \"Switch to a different repository name\",\n\t\t\t\t\t\t\t\tvalue: \"different\",\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tlabel: \"Keep changes local\",\n\t\t\t\t\t\t\t\tvalue: \"local\",\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t{ label: \"Bail out and maybe try again later\", value: \"bail\" },\n\t\t\t\t\t\t],\n\t\t\t\t\t})) as \"bail\" | \"create\" | \"different\" | \"local\",\n\t\t\t );\n\n\t\tcreateRepository = false;\n\n\t\tswitch (selection) {\n\t\t\tcase undefined:\n\t\t\tcase \"bail\":\n\t\t\t\treturn {};\n\n\t\t\tcase \"create\":\n\t\t\t\tawait github.octokit.rest.repos.createUsingTemplate({\n\t\t\t\t\tname: repository,\n\t\t\t\t\towner: options.owner,\n\t\t\t\t\ttemplate_owner: \"JoshuaKGoldberg\",\n\t\t\t\t\ttemplate_repo: \"create-typescript-app\",\n\t\t\t\t});\n\t\t\t\treturn { github: github, repository };\n\n\t\t\tcase \"different\":\n\t\t\t\tconst newRepository = filterPromptCancel(\n\t\t\t\t\tawait prompts.text({\n\t\t\t\t\t\tmessage: `What would you like to call the repository?`,\n\t\t\t\t\t}),\n\t\t\t\t);\n\n\t\t\t\tif (!newRepository) {\n\t\t\t\t\treturn {};\n\t\t\t\t}\n\n\t\t\t\trepository = newRepository;\n\t\t\t\tbreak;\n\n\t\t\tcase \"local\":\n\t\t\t\tgithub = undefined;\n\t\t\t\tbreak;\n\t\t}\n\t}\n\n\treturn { github: github, repository };\n}\n"],"mappings":"AAAA,YAAY,aAAa;AAEzB,SAAS,2BAA2B;AACpC,SAAS,0BAA0B;AAcnC,eAAsB,uBACrB,QACA,SAC2C;AAE3C,MAAI,EAAE,WAAW,IAAI;AACrB,MAAI,mBAAmB,QAAQ,SAAS;AAIxC,SAAO,QAAQ;AACd,QAAI,MAAM,oBAAoB,OAAO,SAAS,OAAO,GAAG;AACvD,aAAO,EAAE,QAAQ,WAAW;AAAA,IAC7B;AAEA,UAAM,YAAY,mBACf,WACA;AAAA,MACC,MAAM,QAAQ,OAAO;AAAA,QACrB,SAAS,cAAc,QAAQ,UAAU,gCAAgC,QAAQ,KAAK;AAAA,QACtF,SAAS;AAAA,UACR,EAAE,OAAO,2BAA2B,OAAO,SAAS;AAAA,UACpD;AAAA,YACC,OAAO;AAAA,YACP,OAAO;AAAA,UACR;AAAA,UACA;AAAA,YACC,OAAO;AAAA,YACP,OAAO;AAAA,UACR;AAAA,UACA,EAAE,OAAO,sCAAsC,OAAO,OAAO;AAAA,QAC9D;AAAA,MACD,CAAC;AAAA,IACD;AAEH,uBAAmB;AAEnB,YAAQ,WAAW;AAAA,MAClB,KAAK;AAAA,MACL,KAAK;AACJ,eAAO,CAAC;AAAA,MAET,KAAK;AACJ,cAAM,OAAO,QAAQ,KAAK,MAAM,oBAAoB;AAAA,UACnD,MAAM;AAAA,UACN,OAAO,QAAQ;AAAA,UACf,gBAAgB;AAAA,UAChB,eAAe;AAAA,QAChB,CAAC;AACD,eAAO,EAAE,QAAgB,WAAW;AAAA,MAErC,KAAK;AACJ,cAAM,gBAAgB;AAAA,UACrB,MAAM,QAAQ,KAAK;AAAA,YAClB,SAAS;AAAA,UACV,CAAC;AAAA,QACF;AAEA,YAAI,CAAC,eAAe;AACnB,iBAAO,CAAC;AAAA,QACT;AAEA,qBAAa;AACb;AAAA,MAED,KAAK;AACJ,iBAAS;AACT;AAAA,IACF;AAAA,EACD;AAEA,SAAO,EAAE,QAAgB,WAAW;AACrC;","names":[]}
@@ -1,3 +1,3 @@
1
- declare function getPrefillOrPromptedOption(existingValue: string | undefined, message: string, getPlaceholder?: () => Promise<string | undefined>): Promise<string | undefined>;
1
+ declare function getPrefillOrPromptedOption(message: string, getPlaceholder?: () => Promise<string | undefined>): Promise<string | undefined>;
2
2
 
3
3
  export { getPrefillOrPromptedOption };
@@ -1,9 +1,6 @@
1
1
  import * as prompts from "@clack/prompts";
2
2
  import { filterPromptCancel } from "../prompts.js";
3
- async function getPrefillOrPromptedOption(existingValue, message, getPlaceholder) {
4
- if (existingValue) {
5
- return existingValue;
6
- }
3
+ async function getPrefillOrPromptedOption(message, getPlaceholder) {
7
4
  return filterPromptCancel(
8
5
  await prompts.text({
9
6
  message,
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/shared/options/getPrefillOrPromptedOption.ts"],"sourcesContent":["import * as prompts from \"@clack/prompts\";\n\nimport { filterPromptCancel } from \"../prompts.js\";\n\nexport async function getPrefillOrPromptedOption(\n\texistingValue: string | undefined,\n\tmessage: string,\n\tgetPlaceholder?: () => Promise<string | undefined>,\n) {\n\tif (existingValue) {\n\t\treturn existingValue;\n\t}\n\n\treturn filterPromptCancel(\n\t\tawait prompts.text({\n\t\t\tmessage,\n\t\t\tplaceholder: await getPlaceholder?.(),\n\t\t\tvalidate: (val) => {\n\t\t\t\tif (val.length === 0) {\n\t\t\t\t\treturn \"Please enter a value.\";\n\t\t\t\t}\n\t\t\t},\n\t\t}),\n\t);\n}\n"],"mappings":"AAAA,YAAY,aAAa;AAEzB,SAAS,0BAA0B;AAEnC,eAAsB,2BACrB,eACA,SACA,gBACC;AACD,MAAI,eAAe;AAClB,WAAO;AAAA,EACR;AAEA,SAAO;AAAA,IACN,MAAM,QAAQ,KAAK;AAAA,MAClB;AAAA,MACA,aAAa,MAAM,iBAAiB;AAAA,MACpC,UAAU,CAAC,QAAQ;AAClB,YAAI,IAAI,WAAW,GAAG;AACrB,iBAAO;AAAA,QACR;AAAA,MACD;AAAA,IACD,CAAC;AAAA,EACF;AACD;","names":[]}
1
+ {"version":3,"sources":["../../../src/shared/options/getPrefillOrPromptedOption.ts"],"sourcesContent":["import * as prompts from \"@clack/prompts\";\n\nimport { filterPromptCancel } from \"../prompts.js\";\n\nexport async function getPrefillOrPromptedOption(\n\tmessage: string,\n\tgetPlaceholder?: () => Promise<string | undefined>,\n) {\n\treturn filterPromptCancel(\n\t\tawait prompts.text({\n\t\t\tmessage,\n\t\t\tplaceholder: await getPlaceholder?.(),\n\t\t\tvalidate: (val) => {\n\t\t\t\tif (val.length === 0) {\n\t\t\t\t\treturn \"Please enter a value.\";\n\t\t\t\t}\n\t\t\t},\n\t\t}),\n\t);\n}\n"],"mappings":"AAAA,YAAY,aAAa;AAEzB,SAAS,0BAA0B;AAEnC,eAAsB,2BACrB,SACA,gBACC;AACD,SAAO;AAAA,IACN,MAAM,QAAQ,KAAK;AAAA,MAClB;AAAA,MACA,aAAa,MAAM,iBAAiB;AAAA,MACpC,UAAU,CAAC,QAAQ;AAClB,YAAI,IAAI,WAAW,GAAG;AACrB,iBAAO;AAAA,QACR;AAAA,MACD;AAAA,IACD,CAAC;AAAA,EACF;AACD;","names":[]}
@@ -0,0 +1,194 @@
1
+ import { z } from 'zod';
2
+
3
+ declare const optionsSchemaShape: {
4
+ access: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<"public">, z.ZodLiteral<"restricted">]>>;
5
+ author: z.ZodOptional<z.ZodString>;
6
+ base: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<"common">, z.ZodLiteral<"everything">, z.ZodLiteral<"minimum">, z.ZodLiteral<"prompt">]>>;
7
+ description: z.ZodOptional<z.ZodString>;
8
+ directory: z.ZodOptional<z.ZodString>;
9
+ email: z.ZodOptional<z.ZodObject<{
10
+ github: z.ZodString;
11
+ npm: z.ZodString;
12
+ }, "strip", z.ZodTypeAny, {
13
+ github: string;
14
+ npm: string;
15
+ }, {
16
+ github: string;
17
+ npm: string;
18
+ }>>;
19
+ excludeAllContributors: z.ZodOptional<z.ZodBoolean>;
20
+ excludeCompliance: z.ZodOptional<z.ZodBoolean>;
21
+ excludeLintDeprecation: z.ZodOptional<z.ZodBoolean>;
22
+ excludeLintESLint: z.ZodOptional<z.ZodBoolean>;
23
+ excludeLintJSDoc: z.ZodOptional<z.ZodBoolean>;
24
+ excludeLintJson: z.ZodOptional<z.ZodBoolean>;
25
+ excludeLintKnip: z.ZodOptional<z.ZodBoolean>;
26
+ excludeLintMd: z.ZodOptional<z.ZodBoolean>;
27
+ excludeLintPackageJson: z.ZodOptional<z.ZodBoolean>;
28
+ excludeLintPackages: z.ZodOptional<z.ZodBoolean>;
29
+ excludeLintPerfectionist: z.ZodOptional<z.ZodBoolean>;
30
+ excludeLintRegex: z.ZodOptional<z.ZodBoolean>;
31
+ excludeLintSpelling: z.ZodOptional<z.ZodBoolean>;
32
+ excludeLintStrict: z.ZodOptional<z.ZodBoolean>;
33
+ excludeLintStylistic: z.ZodOptional<z.ZodBoolean>;
34
+ excludeLintYml: z.ZodOptional<z.ZodBoolean>;
35
+ excludeReleases: z.ZodOptional<z.ZodBoolean>;
36
+ excludeRenovate: z.ZodOptional<z.ZodBoolean>;
37
+ excludeTests: z.ZodOptional<z.ZodBoolean>;
38
+ funding: z.ZodOptional<z.ZodString>;
39
+ keywords: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
40
+ logo: z.ZodOptional<z.ZodString>;
41
+ logoAlt: z.ZodOptional<z.ZodString>;
42
+ mode: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<"create">, z.ZodLiteral<"initialize">, z.ZodLiteral<"migrate">]>>;
43
+ offline: z.ZodOptional<z.ZodBoolean>;
44
+ owner: z.ZodOptional<z.ZodString>;
45
+ repository: z.ZodOptional<z.ZodString>;
46
+ skipAllContributorsApi: z.ZodOptional<z.ZodBoolean>;
47
+ skipGitHubApi: z.ZodOptional<z.ZodBoolean>;
48
+ skipInstall: z.ZodOptional<z.ZodBoolean>;
49
+ skipRemoval: z.ZodOptional<z.ZodBoolean>;
50
+ skipRestore: z.ZodOptional<z.ZodBoolean>;
51
+ skipUninstall: z.ZodOptional<z.ZodBoolean>;
52
+ title: z.ZodOptional<z.ZodString>;
53
+ };
54
+ declare const optionsSchema: z.ZodObject<{
55
+ access: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<"public">, z.ZodLiteral<"restricted">]>>;
56
+ author: z.ZodOptional<z.ZodString>;
57
+ base: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<"common">, z.ZodLiteral<"everything">, z.ZodLiteral<"minimum">, z.ZodLiteral<"prompt">]>>;
58
+ description: z.ZodOptional<z.ZodString>;
59
+ directory: z.ZodOptional<z.ZodString>;
60
+ email: z.ZodOptional<z.ZodObject<{
61
+ github: z.ZodString;
62
+ npm: z.ZodString;
63
+ }, "strip", z.ZodTypeAny, {
64
+ github: string;
65
+ npm: string;
66
+ }, {
67
+ github: string;
68
+ npm: string;
69
+ }>>;
70
+ excludeAllContributors: z.ZodOptional<z.ZodBoolean>;
71
+ excludeCompliance: z.ZodOptional<z.ZodBoolean>;
72
+ excludeLintDeprecation: z.ZodOptional<z.ZodBoolean>;
73
+ excludeLintESLint: z.ZodOptional<z.ZodBoolean>;
74
+ excludeLintJSDoc: z.ZodOptional<z.ZodBoolean>;
75
+ excludeLintJson: z.ZodOptional<z.ZodBoolean>;
76
+ excludeLintKnip: z.ZodOptional<z.ZodBoolean>;
77
+ excludeLintMd: z.ZodOptional<z.ZodBoolean>;
78
+ excludeLintPackageJson: z.ZodOptional<z.ZodBoolean>;
79
+ excludeLintPackages: z.ZodOptional<z.ZodBoolean>;
80
+ excludeLintPerfectionist: z.ZodOptional<z.ZodBoolean>;
81
+ excludeLintRegex: z.ZodOptional<z.ZodBoolean>;
82
+ excludeLintSpelling: z.ZodOptional<z.ZodBoolean>;
83
+ excludeLintStrict: z.ZodOptional<z.ZodBoolean>;
84
+ excludeLintStylistic: z.ZodOptional<z.ZodBoolean>;
85
+ excludeLintYml: z.ZodOptional<z.ZodBoolean>;
86
+ excludeReleases: z.ZodOptional<z.ZodBoolean>;
87
+ excludeRenovate: z.ZodOptional<z.ZodBoolean>;
88
+ excludeTests: z.ZodOptional<z.ZodBoolean>;
89
+ funding: z.ZodOptional<z.ZodString>;
90
+ keywords: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
91
+ logo: z.ZodOptional<z.ZodString>;
92
+ logoAlt: z.ZodOptional<z.ZodString>;
93
+ mode: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<"create">, z.ZodLiteral<"initialize">, z.ZodLiteral<"migrate">]>>;
94
+ offline: z.ZodOptional<z.ZodBoolean>;
95
+ owner: z.ZodOptional<z.ZodString>;
96
+ repository: z.ZodOptional<z.ZodString>;
97
+ skipAllContributorsApi: z.ZodOptional<z.ZodBoolean>;
98
+ skipGitHubApi: z.ZodOptional<z.ZodBoolean>;
99
+ skipInstall: z.ZodOptional<z.ZodBoolean>;
100
+ skipRemoval: z.ZodOptional<z.ZodBoolean>;
101
+ skipRestore: z.ZodOptional<z.ZodBoolean>;
102
+ skipUninstall: z.ZodOptional<z.ZodBoolean>;
103
+ title: z.ZodOptional<z.ZodString>;
104
+ }, "strip", z.ZodTypeAny, {
105
+ access?: "public" | "restricted" | undefined;
106
+ author?: string | undefined;
107
+ base?: "common" | "everything" | "minimum" | "prompt" | undefined;
108
+ description?: string | undefined;
109
+ directory?: string | undefined;
110
+ email?: {
111
+ github: string;
112
+ npm: string;
113
+ } | undefined;
114
+ excludeAllContributors?: boolean | undefined;
115
+ excludeCompliance?: boolean | undefined;
116
+ excludeLintDeprecation?: boolean | undefined;
117
+ excludeLintESLint?: boolean | undefined;
118
+ excludeLintJSDoc?: boolean | undefined;
119
+ excludeLintJson?: boolean | undefined;
120
+ excludeLintKnip?: boolean | undefined;
121
+ excludeLintMd?: boolean | undefined;
122
+ excludeLintPackageJson?: boolean | undefined;
123
+ excludeLintPackages?: boolean | undefined;
124
+ excludeLintPerfectionist?: boolean | undefined;
125
+ excludeLintRegex?: boolean | undefined;
126
+ excludeLintSpelling?: boolean | undefined;
127
+ excludeLintStrict?: boolean | undefined;
128
+ excludeLintStylistic?: boolean | undefined;
129
+ excludeLintYml?: boolean | undefined;
130
+ excludeReleases?: boolean | undefined;
131
+ excludeRenovate?: boolean | undefined;
132
+ excludeTests?: boolean | undefined;
133
+ funding?: string | undefined;
134
+ keywords?: string[] | undefined;
135
+ logo?: string | undefined;
136
+ logoAlt?: string | undefined;
137
+ mode?: "create" | "initialize" | "migrate" | undefined;
138
+ offline?: boolean | undefined;
139
+ owner?: string | undefined;
140
+ repository?: string | undefined;
141
+ skipAllContributorsApi?: boolean | undefined;
142
+ skipGitHubApi?: boolean | undefined;
143
+ skipInstall?: boolean | undefined;
144
+ skipRemoval?: boolean | undefined;
145
+ skipRestore?: boolean | undefined;
146
+ skipUninstall?: boolean | undefined;
147
+ title?: string | undefined;
148
+ }, {
149
+ access?: "public" | "restricted" | undefined;
150
+ author?: string | undefined;
151
+ base?: "common" | "everything" | "minimum" | "prompt" | undefined;
152
+ description?: string | undefined;
153
+ directory?: string | undefined;
154
+ email?: {
155
+ github: string;
156
+ npm: string;
157
+ } | undefined;
158
+ excludeAllContributors?: boolean | undefined;
159
+ excludeCompliance?: boolean | undefined;
160
+ excludeLintDeprecation?: boolean | undefined;
161
+ excludeLintESLint?: boolean | undefined;
162
+ excludeLintJSDoc?: boolean | undefined;
163
+ excludeLintJson?: boolean | undefined;
164
+ excludeLintKnip?: boolean | undefined;
165
+ excludeLintMd?: boolean | undefined;
166
+ excludeLintPackageJson?: boolean | undefined;
167
+ excludeLintPackages?: boolean | undefined;
168
+ excludeLintPerfectionist?: boolean | undefined;
169
+ excludeLintRegex?: boolean | undefined;
170
+ excludeLintSpelling?: boolean | undefined;
171
+ excludeLintStrict?: boolean | undefined;
172
+ excludeLintStylistic?: boolean | undefined;
173
+ excludeLintYml?: boolean | undefined;
174
+ excludeReleases?: boolean | undefined;
175
+ excludeRenovate?: boolean | undefined;
176
+ excludeTests?: boolean | undefined;
177
+ funding?: string | undefined;
178
+ keywords?: string[] | undefined;
179
+ logo?: string | undefined;
180
+ logoAlt?: string | undefined;
181
+ mode?: "create" | "initialize" | "migrate" | undefined;
182
+ offline?: boolean | undefined;
183
+ owner?: string | undefined;
184
+ repository?: string | undefined;
185
+ skipAllContributorsApi?: boolean | undefined;
186
+ skipGitHubApi?: boolean | undefined;
187
+ skipInstall?: boolean | undefined;
188
+ skipRemoval?: boolean | undefined;
189
+ skipRestore?: boolean | undefined;
190
+ skipUninstall?: boolean | undefined;
191
+ title?: string | undefined;
192
+ }>;
193
+
194
+ export { optionsSchema, optionsSchemaShape };