create-typescript-app 1.31.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 (144) hide show
  1. package/README.md +35 -32
  2. package/lib/bin/index.js +4 -4
  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 +10 -4
  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 +14 -17
  18. package/lib/create/index.js.map +1 -1
  19. package/lib/initialize/index.d.ts +1 -2
  20. package/lib/initialize/index.js +5 -5
  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 +6 -3
  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 +21 -5
  41. package/lib/shared/options/args.js +7 -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 +4 -4
  45. package/lib/shared/options/augmentOptionsWithExcludes.js.map +1 -1
  46. package/lib/shared/options/{readOptionDefaults → createOptionDefaults}/index.d.ts +6 -2
  47. package/lib/shared/options/{readOptionDefaults → createOptionDefaults}/index.js +3 -3
  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/ensureRepositoryExists.d.ts +3 -1
  53. package/lib/shared/options/ensureRepositoryExists.js +2 -1
  54. package/lib/shared/options/ensureRepositoryExists.js.map +1 -1
  55. package/lib/shared/options/getPrefillOrPromptedOption.d.ts +1 -1
  56. package/lib/shared/options/getPrefillOrPromptedOption.js +1 -4
  57. package/lib/shared/options/getPrefillOrPromptedOption.js.map +1 -1
  58. package/lib/shared/options/optionsSchema.d.ts +28 -8
  59. package/lib/shared/options/optionsSchema.js +7 -2
  60. package/lib/shared/options/optionsSchema.js.map +1 -1
  61. package/lib/shared/options/readOptions.d.ts +3 -2
  62. package/lib/shared/options/readOptions.js +15 -15
  63. package/lib/shared/options/readOptions.js.map +1 -1
  64. package/lib/shared/packages.d.ts +2 -0
  65. package/lib/shared/runOrRestore.d.ts +1 -1
  66. package/lib/shared/types.d.ts +41 -9
  67. package/lib/steps/addOwnerAsAllContributor.d.ts +5 -1
  68. package/lib/steps/addOwnerAsAllContributor.js +8 -3
  69. package/lib/steps/addOwnerAsAllContributor.js.map +1 -1
  70. package/lib/steps/addToolAllContributors.d.ts +5 -1
  71. package/lib/steps/addToolAllContributors.js +2 -2
  72. package/lib/steps/addToolAllContributors.js.map +1 -1
  73. package/lib/steps/detectExistingContributors.d.ts +2 -0
  74. package/lib/steps/finalizeDependencies.d.ts +2 -0
  75. package/lib/steps/finalizeDependencies.js +8 -4
  76. package/lib/steps/finalizeDependencies.js.map +1 -1
  77. package/lib/steps/initializeGitHubRepository/index.d.ts +2 -0
  78. package/lib/steps/initializeGitHubRepository/initializeBranchProtectionSettings.d.ts +2 -0
  79. package/lib/steps/initializeGitHubRepository/labels/outcomeLabels.js +5 -0
  80. package/lib/steps/initializeGitHubRepository/labels/outcomeLabels.js.map +1 -1
  81. package/lib/steps/initializeGitRemote.d.ts +2 -0
  82. package/lib/steps/initializeRepositorySettings.d.ts +2 -0
  83. package/lib/steps/uninstallPackages.d.ts +1 -1
  84. package/lib/steps/uninstallPackages.js +2 -2
  85. package/lib/steps/uninstallPackages.js.map +1 -1
  86. package/lib/steps/updateAllContributorsTable.d.ts +2 -0
  87. package/lib/steps/updateLocalFiles.d.ts +1 -2
  88. package/lib/steps/updateLocalFiles.js +3 -3
  89. package/lib/steps/updateLocalFiles.js.map +1 -1
  90. package/lib/steps/writeReadme/findIntroSectionClose.js +1 -1
  91. package/lib/steps/writeReadme/findIntroSectionClose.js.map +1 -1
  92. package/lib/steps/writeReadme/generateTopContent.d.ts +2 -0
  93. package/lib/steps/writeReadme/generateTopContent.js +17 -2
  94. package/lib/steps/writeReadme/generateTopContent.js.map +1 -1
  95. package/lib/steps/writeReadme/index.d.ts +2 -0
  96. package/lib/steps/writeReadme/index.js +1 -1
  97. package/lib/steps/writeReadme/index.js.map +1 -1
  98. package/lib/steps/writing/creation/createESLintRC.d.ts +2 -0
  99. package/lib/steps/writing/creation/createESLintRC.js +10 -1
  100. package/lib/steps/writing/creation/createESLintRC.js.map +1 -1
  101. package/lib/steps/writing/creation/dotGitHub/createDevelopment.d.ts +2 -0
  102. package/lib/steps/writing/creation/dotGitHub/createDevelopment.js +1 -1
  103. package/lib/steps/writing/creation/dotGitHub/createDevelopment.js.map +1 -1
  104. package/lib/steps/writing/creation/dotGitHub/createDotGitHubFiles.d.ts +2 -0
  105. package/lib/steps/writing/creation/dotGitHub/createDotGitHubFiles.js +7 -7
  106. package/lib/steps/writing/creation/dotGitHub/createDotGitHubFiles.js.map +1 -1
  107. package/lib/steps/writing/creation/dotGitHub/{workflows.d.ts → createWorkflows.d.ts} +2 -0
  108. package/lib/steps/writing/creation/dotGitHub/{workflows.js → createWorkflows.js} +9 -86
  109. package/lib/steps/writing/creation/dotGitHub/createWorkflows.js.map +1 -0
  110. package/lib/steps/writing/creation/dotGitHub/index.d.ts +2 -0
  111. package/lib/steps/writing/creation/dotGitHub/index.js +1 -1
  112. package/lib/steps/writing/creation/dotGitHub/index.js.map +1 -1
  113. package/lib/steps/writing/creation/dotGitHub/issueTemplate.d.ts +2 -0
  114. package/lib/steps/writing/creation/dotVSCode.d.ts +2 -0
  115. package/lib/steps/writing/creation/index.d.ts +1 -2
  116. package/lib/steps/writing/creation/index.js +2 -2
  117. package/lib/steps/writing/creation/index.js.map +1 -1
  118. package/lib/steps/writing/creation/rootFiles.d.ts +2 -0
  119. package/lib/steps/writing/creation/rootFiles.js +3 -2
  120. package/lib/steps/writing/creation/rootFiles.js.map +1 -1
  121. package/lib/steps/writing/creation/src.d.ts +2 -0
  122. package/lib/steps/writing/creation/writeAllContributorsRC.d.ts +2 -0
  123. package/lib/steps/writing/creation/writeAllContributorsRC.js +1 -1
  124. package/lib/steps/writing/creation/writeAllContributorsRC.js.map +1 -1
  125. package/lib/steps/writing/creation/writePackageJson.d.ts +2 -0
  126. package/lib/steps/writing/creation/writePackageJson.js +2 -1
  127. package/lib/steps/writing/creation/writePackageJson.js.map +1 -1
  128. package/lib/steps/writing/writeStructure.d.ts +1 -2
  129. package/lib/steps/writing/writeStructure.js +2 -2
  130. package/lib/steps/writing/writeStructure.js.map +1 -1
  131. package/package.json +5 -6
  132. package/lib/bin/mode.d.ts +0 -14
  133. package/lib/bin/mode.js +0 -50
  134. package/lib/bin/mode.js.map +0 -1
  135. package/lib/create/createAndEnterRepository.d.ts +0 -3
  136. package/lib/create/createAndEnterRepository.js +0 -15
  137. package/lib/create/createAndEnterRepository.js.map +0 -1
  138. package/lib/shared/options/readOptionDefaults/index.js.map +0 -1
  139. package/lib/shared/options/readOptionDefaults/parsePackageAuthor.js.map +0 -1
  140. package/lib/shared/options/readOptionDefaults/readDefaultsFromReadme.js.map +0 -1
  141. package/lib/steps/writing/creation/dotGitHub/workflows.js.map +0 -1
  142. /package/lib/shared/options/{readOptionDefaults → createOptionDefaults}/parsePackageAuthor.js +0 -0
  143. /package/lib/shared/options/{readOptionDefaults → createOptionDefaults}/readDefaultsFromReadme.d.ts +0 -0
  144. /package/lib/shared/options/{readOptionDefaults → createOptionDefaults}/readDefaultsFromReadme.js +0 -0
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/create/index.ts"],"sourcesContent":["import * as prompts from \"@clack/prompts\";\nimport chalk from \"chalk\";\n\nimport { ModeResult } from \"../bin/mode.js\";\nimport { outro } from \"../shared/cli/outro.js\";\nimport { StatusCodes } from \"../shared/codes.js\";\nimport { readOptions } from \"../shared/options/readOptions.js\";\nimport { runOrRestore } from \"../shared/runOrRestore.js\";\nimport { createAndEnterRepository } from \"./createAndEnterRepository.js\";\nimport { createRerunSuggestion } from \"./createRerunSuggestion.js\";\nimport { createWithOptions } from \"./createWithOptions.js\";\n\nexport async function create(args: string[]): Promise<ModeResult> {\n\tconst inputs = await readOptions(args);\n\tif (inputs.cancelled) {\n\t\treturn {\n\t\t\tcode: StatusCodes.Cancelled,\n\t\t\terror: inputs.error,\n\t\t\toptions: inputs.options,\n\t\t};\n\t}\n\n\tconst wat = await createAndEnterRepository(inputs.options.repository);\n\tif (!wat) {\n\t\tprompts.outro(\n\t\t\tchalk.red(\n\t\t\t\t`The ${inputs.options.repository} directory already exists. Please remove the directory or try a different name.`,\n\t\t\t),\n\t\t);\n\t\treturn { code: StatusCodes.Failure, options: inputs.options };\n\t}\n\n\treturn {\n\t\tcode: await runOrRestore({\n\t\t\trun: async () => {\n\t\t\t\tconst { sentToGitHub } = await createWithOptions(inputs);\n\n\t\t\t\toutro(\n\t\t\t\t\tsentToGitHub\n\t\t\t\t\t\t? [\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tlabel:\n\t\t\t\t\t\t\t\t\t\t\"Now all you have to do is populate the repository's ACCESS_TOKEN and NPM_TOKEN secrets, and enable the Codecov and Renovate GitHub apps.\",\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t ]\n\t\t\t\t\t\t: [\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tlabel:\n\t\t\t\t\t\t\t\t\t\t\"Consider creating a GitHub repository from the new directory:\",\n\t\t\t\t\t\t\t\t\tlines: [\n\t\t\t\t\t\t\t\t\t\t`cd ${inputs.options.repository}`,\n\t\t\t\t\t\t\t\t\t\tcreateRerunSuggestion(\"initialize\", {\n\t\t\t\t\t\t\t\t\t\t\t...inputs.options,\n\t\t\t\t\t\t\t\t\t\t\tskipGitHubApi: false,\n\t\t\t\t\t\t\t\t\t\t\tskipInstall: false,\n\t\t\t\t\t\t\t\t\t\t}),\n\t\t\t\t\t\t\t\t\t\t`git add -A`,\n\t\t\t\t\t\t\t\t\t\t`git commit -m \"feat: initial commit ✨\"`,\n\t\t\t\t\t\t\t\t\t\t`git push -u origin main`,\n\t\t\t\t\t\t\t\t\t],\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tlabel:\n\t\t\t\t\t\t\t\t\t\t\"If you do, be sure to populate its ACCESS_TOKEN and NPM_TOKEN secrets, and enable the Codecov and Renovate GitHub apps.\",\n\t\t\t\t\t\t\t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AA,MACD;AAAA,MACA,aAAa,OAAO,QAAQ;AAAA,IAC7B,CAAC;AAAA,IACD,SAAS,OAAO;AAAA,EACjB;AACD;","names":[]}
1
+ {"version":3,"sources":["../../src/create/index.ts"],"sourcesContent":["import * as prompts from \"@clack/prompts\";\nimport chalk from \"chalk\";\n\nimport { outro } from \"../shared/cli/outro.js\";\nimport { StatusCodes } from \"../shared/codes.js\";\nimport { generateNextSteps } from \"../shared/generateNextSteps.js\";\nimport { readOptions } from \"../shared/options/readOptions.js\";\nimport { runOrRestore } from \"../shared/runOrRestore.js\";\nimport { ModeRunner } from \"../shared/types.js\";\nimport { createAndEnterGitDirectory } from \"./createAndEnterGitDirectory.js\";\nimport { createRerunSuggestion } from \"./createRerunSuggestion.js\";\nimport { createWithOptions } from \"./createWithOptions.js\";\n\nexport const create: ModeRunner = async (args, promptedOptions) => {\n\tconst inputs = await readOptions(args, \"create\", promptedOptions);\n\tif (inputs.cancelled) {\n\t\treturn {\n\t\t\tcode: StatusCodes.Cancelled,\n\t\t\terror: inputs.error,\n\t\t\toptions: inputs.options,\n\t\t};\n\t}\n\n\tif (!(await createAndEnterGitDirectory(inputs.options.directory))) {\n\t\tprompts.outro(\n\t\t\tchalk.red(\n\t\t\t\t`The ${inputs.options.directory} directory already exists and is not empty. Please clear the directory, run with --mode initialize, or try a different directory.`,\n\t\t\t),\n\t\t);\n\t\treturn { code: StatusCodes.Failure, options: inputs.options };\n\t}\n\n\treturn {\n\t\tcode: await runOrRestore({\n\t\t\trun: async () => {\n\t\t\t\tconst { sentToGitHub } = await createWithOptions(inputs);\n\t\t\t\tconst nextSteps = generateNextSteps(inputs.options);\n\n\t\t\t\toutro(\n\t\t\t\t\tsentToGitHub\n\t\t\t\t\t\t? nextSteps\n\t\t\t\t\t\t: [\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tlabel:\n\t\t\t\t\t\t\t\t\t\t\"Consider creating a GitHub repository from the new directory:\",\n\t\t\t\t\t\t\t\t\tlines: [\n\t\t\t\t\t\t\t\t\t\t`cd ${inputs.options.repository}`,\n\t\t\t\t\t\t\t\t\t\tcreateRerunSuggestion({\n\t\t\t\t\t\t\t\t\t\t\t...inputs.options,\n\t\t\t\t\t\t\t\t\t\t\tmode: \"initialize\",\n\t\t\t\t\t\t\t\t\t\t\tskipGitHubApi: false,\n\t\t\t\t\t\t\t\t\t\t\tskipInstall: false,\n\t\t\t\t\t\t\t\t\t\t}),\n\t\t\t\t\t\t\t\t\t\t`git add -A`,\n\t\t\t\t\t\t\t\t\t\t`git commit -m \"feat: initial commit ✨\"`,\n\t\t\t\t\t\t\t\t\t\t`git push -u origin main`,\n\t\t\t\t\t\t\t\t\t],\n\t\t\t\t\t\t\t\t\tvariant: \"code\",\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t...nextSteps,\n\t\t\t\t\t\t ],\n\t\t\t\t);\n\t\t\t},\n\t\t\tskipRestore: inputs.options.skipRestore,\n\t\t}),\n\t\toptions: inputs.options,\n\t};\n};\n"],"mappings":"AAAA,YAAY,aAAa;AACzB,OAAO,WAAW;AAElB,SAAS,aAAa;AACtB,SAAS,mBAAmB;AAC5B,SAAS,yBAAyB;AAClC,SAAS,mBAAmB;AAC5B,SAAS,oBAAoB;AAE7B,SAAS,kCAAkC;AAC3C,SAAS,6BAA6B;AACtC,SAAS,yBAAyB;AAE3B,MAAM,SAAqB,OAAO,MAAM,oBAAoB;AAClE,QAAM,SAAS,MAAM,YAAY,MAAM,UAAU,eAAe;AAChE,MAAI,OAAO,WAAW;AACrB,WAAO;AAAA,MACN,MAAM,YAAY;AAAA,MAClB,OAAO,OAAO;AAAA,MACd,SAAS,OAAO;AAAA,IACjB;AAAA,EACD;AAEA,MAAI,CAAE,MAAM,2BAA2B,OAAO,QAAQ,SAAS,GAAI;AAClE,YAAQ;AAAA,MACP,MAAM;AAAA,QACL,OAAO,OAAO,QAAQ,SAAS;AAAA,MAChC;AAAA,IACD;AACA,WAAO,EAAE,MAAM,YAAY,SAAS,SAAS,OAAO,QAAQ;AAAA,EAC7D;AAEA,SAAO;AAAA,IACN,MAAM,MAAM,aAAa;AAAA,MACxB,KAAK,YAAY;AAChB,cAAM,EAAE,aAAa,IAAI,MAAM,kBAAkB,MAAM;AACvD,cAAM,YAAY,kBAAkB,OAAO,OAAO;AAElD;AAAA,UACC,eACG,YACA;AAAA,YACA;AAAA,cACC,OACC;AAAA,cACD,OAAO;AAAA,gBACN,MAAM,OAAO,QAAQ,UAAU;AAAA,gBAC/B,sBAAsB;AAAA,kBACrB,GAAG,OAAO;AAAA,kBACV,MAAM;AAAA,kBACN,eAAe;AAAA,kBACf,aAAa;AAAA,gBACd,CAAC;AAAA,gBACD;AAAA,gBACA;AAAA,gBACA;AAAA,cACD;AAAA,cACA,SAAS;AAAA,YACV;AAAA,YACA,GAAG;AAAA,UACH;AAAA,QACJ;AAAA,MACD;AAAA,MACA,aAAa,OAAO,QAAQ;AAAA,IAC7B,CAAC;AAAA,IACD,SAAS,OAAO;AAAA,EACjB;AACD;","names":[]}
@@ -1,7 +1,6 @@
1
- import { ModeRunner } from '../bin/mode.js';
1
+ import { ModeRunner } from '../shared/types.js';
2
2
  import 'zod';
3
3
  import '../shared/codes.js';
4
- import '../shared/types.js';
5
4
 
6
5
  declare const initialize: ModeRunner;
7
6
 
@@ -1,11 +1,12 @@
1
1
  import { outro } from "../shared/cli/outro.js";
2
2
  import { StatusCodes } from "../shared/codes.js";
3
3
  import { ensureGitRepository } from "../shared/ensureGitRepository.js";
4
+ import { generateNextSteps } from "../shared/generateNextSteps.js";
4
5
  import { readOptions } from "../shared/options/readOptions.js";
5
6
  import { runOrRestore } from "../shared/runOrRestore.js";
6
7
  import { initializeWithOptions } from "./initializeWithOptions.js";
7
8
  const initialize = async (args) => {
8
- const inputs = await readOptions(args);
9
+ const inputs = await readOptions(args, "initialize");
9
10
  if (inputs.cancelled) {
10
11
  return {
11
12
  code: StatusCodes.Cancelled,
@@ -25,11 +26,10 @@ const initialize = async (args) => {
25
26
  `git add -A`,
26
27
  `git commit -m "feat: initialized repo \u2728`,
27
28
  `git push`
28
- ]
29
+ ],
30
+ variant: "code"
29
31
  },
30
- {
31
- label: "Otherwise, all you have to do is populate the repository's ACCESS_TOKEN and NPM_TOKEN secrets, and enable the Codecov and Renovate GitHub apps."
32
- }
32
+ ...generateNextSteps(inputs.options)
33
33
  ]);
34
34
  },
35
35
  skipRestore: inputs.options.skipRestore
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/initialize/index.ts"],"sourcesContent":["import { ModeRunner } from \"../bin/mode.js\";\nimport { outro } from \"../shared/cli/outro.js\";\nimport { StatusCodes } from \"../shared/codes.js\";\nimport { ensureGitRepository } from \"../shared/ensureGitRepository.js\";\nimport { readOptions } from \"../shared/options/readOptions.js\";\nimport { runOrRestore } from \"../shared/runOrRestore.js\";\nimport { initializeWithOptions } from \"./initializeWithOptions.js\";\n\nexport const initialize: ModeRunner = async (args) => {\n\tconst inputs = await readOptions(args);\n\tif (inputs.cancelled) {\n\t\treturn {\n\t\t\tcode: StatusCodes.Cancelled,\n\t\t\terror: inputs.error,\n\t\t\toptions: inputs.options,\n\t\t};\n\t}\n\n\tawait ensureGitRepository();\n\n\treturn {\n\t\tcode: await runOrRestore({\n\t\t\trun: async () => {\n\t\t\t\tawait initializeWithOptions(inputs);\n\n\t\t\t\toutro([\n\t\t\t\t\t{\n\t\t\t\t\t\tlabel: \"You may consider committing these changes:\",\n\t\t\t\t\t\tlines: [\n\t\t\t\t\t\t\t`git add -A`,\n\t\t\t\t\t\t\t`git commit -m \"feat: initialized repo ✨`,\n\t\t\t\t\t\t\t`git push`,\n\t\t\t\t\t\t],\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tlabel:\n\t\t\t\t\t\t\t\"Otherwise, all you have to do is populate the repository's ACCESS_TOKEN and NPM_TOKEN secrets, and enable the Codecov and Renovate GitHub apps.\",\n\t\t\t\t\t},\n\t\t\t\t]);\n\t\t\t},\n\t\t\tskipRestore: inputs.options.skipRestore,\n\t\t}),\n\t\toptions: inputs.options,\n\t};\n};\n"],"mappings":"AACA,SAAS,aAAa;AACtB,SAAS,mBAAmB;AAC5B,SAAS,2BAA2B;AACpC,SAAS,mBAAmB;AAC5B,SAAS,oBAAoB;AAC7B,SAAS,6BAA6B;AAE/B,MAAM,aAAyB,OAAO,SAAS;AACrD,QAAM,SAAS,MAAM,YAAY,IAAI;AACrC,MAAI,OAAO,WAAW;AACrB,WAAO;AAAA,MACN,MAAM,YAAY;AAAA,MAClB,OAAO,OAAO;AAAA,MACd,SAAS,OAAO;AAAA,IACjB;AAAA,EACD;AAEA,QAAM,oBAAoB;AAE1B,SAAO;AAAA,IACN,MAAM,MAAM,aAAa;AAAA,MACxB,KAAK,YAAY;AAChB,cAAM,sBAAsB,MAAM;AAElC,cAAM;AAAA,UACL;AAAA,YACC,OAAO;AAAA,YACP,OAAO;AAAA,cACN;AAAA,cACA;AAAA,cACA;AAAA,YACD;AAAA,UACD;AAAA,UACA;AAAA,YACC,OACC;AAAA,UACF;AAAA,QACD,CAAC;AAAA,MACF;AAAA,MACA,aAAa,OAAO,QAAQ;AAAA,IAC7B,CAAC;AAAA,IACD,SAAS,OAAO;AAAA,EACjB;AACD;","names":[]}
1
+ {"version":3,"sources":["../../src/initialize/index.ts"],"sourcesContent":["import { outro } from \"../shared/cli/outro.js\";\nimport { StatusCodes } from \"../shared/codes.js\";\nimport { ensureGitRepository } from \"../shared/ensureGitRepository.js\";\nimport { generateNextSteps } from \"../shared/generateNextSteps.js\";\nimport { readOptions } from \"../shared/options/readOptions.js\";\nimport { runOrRestore } from \"../shared/runOrRestore.js\";\nimport { ModeRunner } from \"../shared/types.js\";\nimport { initializeWithOptions } from \"./initializeWithOptions.js\";\n\nexport const initialize: ModeRunner = async (args) => {\n\tconst inputs = await readOptions(args, \"initialize\");\n\tif (inputs.cancelled) {\n\t\treturn {\n\t\t\tcode: StatusCodes.Cancelled,\n\t\t\terror: inputs.error,\n\t\t\toptions: inputs.options,\n\t\t};\n\t}\n\n\tawait ensureGitRepository();\n\n\treturn {\n\t\tcode: await runOrRestore({\n\t\t\trun: async () => {\n\t\t\t\tawait initializeWithOptions(inputs);\n\n\t\t\t\toutro([\n\t\t\t\t\t{\n\t\t\t\t\t\tlabel: \"You may consider committing these changes:\",\n\t\t\t\t\t\tlines: [\n\t\t\t\t\t\t\t`git add -A`,\n\t\t\t\t\t\t\t`git commit -m \"feat: initialized repo ✨`,\n\t\t\t\t\t\t\t`git push`,\n\t\t\t\t\t\t],\n\t\t\t\t\t\tvariant: \"code\",\n\t\t\t\t\t},\n\t\t\t\t\t...generateNextSteps(inputs.options),\n\t\t\t\t]);\n\t\t\t},\n\t\t\tskipRestore: inputs.options.skipRestore,\n\t\t}),\n\t\toptions: inputs.options,\n\t};\n};\n"],"mappings":"AAAA,SAAS,aAAa;AACtB,SAAS,mBAAmB;AAC5B,SAAS,2BAA2B;AACpC,SAAS,yBAAyB;AAClC,SAAS,mBAAmB;AAC5B,SAAS,oBAAoB;AAE7B,SAAS,6BAA6B;AAE/B,MAAM,aAAyB,OAAO,SAAS;AACrD,QAAM,SAAS,MAAM,YAAY,MAAM,YAAY;AACnD,MAAI,OAAO,WAAW;AACrB,WAAO;AAAA,MACN,MAAM,YAAY;AAAA,MAClB,OAAO,OAAO;AAAA,MACd,SAAS,OAAO;AAAA,IACjB;AAAA,EACD;AAEA,QAAM,oBAAoB;AAE1B,SAAO;AAAA,IACN,MAAM,MAAM,aAAa;AAAA,MACxB,KAAK,YAAY;AAChB,cAAM,sBAAsB,MAAM;AAElC,cAAM;AAAA,UACL;AAAA,YACC,OAAO;AAAA,YACP,OAAO;AAAA,cACN;AAAA,cACA;AAAA,cACA;AAAA,YACD;AAAA,YACA,SAAS;AAAA,UACV;AAAA,UACA,GAAG,kBAAkB,OAAO,OAAO;AAAA,QACpC,CAAC;AAAA,MACF;AAAA,MACA,aAAa,OAAO,QAAQ;AAAA,IAC7B,CAAC;AAAA,IACD,SAAS,OAAO;AAAA,EACjB;AACD;","names":[]}
@@ -1,6 +1,7 @@
1
1
  import { GitHubAndOptions } from '../shared/options/readOptions.js';
2
2
  import 'zod';
3
3
  import '../shared/types.js';
4
+ import '../shared/codes.js';
4
5
  import '../shared/options/getGitHub.js';
5
6
  import 'octokit';
6
7
 
@@ -17,7 +17,7 @@ async function initializeWithOptions({
17
17
  [
18
18
  "Updating local files",
19
19
  async () => {
20
- await updateLocalFiles(options, "initialize");
20
+ await updateLocalFiles(options);
21
21
  }
22
22
  ],
23
23
  ["Updating README.md", updateReadme],
@@ -30,9 +30,9 @@ async function initializeWithOptions({
30
30
  ],
31
31
  ["Resetting Git tags", resetGitTags]
32
32
  ]);
33
- if (!options.excludeContributors) {
33
+ if (!options.excludeAllContributors) {
34
34
  await withSpinner("Updating existing contributor details", async () => {
35
- await addOwnerAsAllContributor(options.owner);
35
+ await addOwnerAsAllContributor(options);
36
36
  });
37
37
  }
38
38
  if (github) {
@@ -46,7 +46,7 @@ async function initializeWithOptions({
46
46
  if (!options.skipUninstall) {
47
47
  await withSpinner(
48
48
  "Uninstalling initialization-only packages",
49
- uninstallPackages
49
+ async () => uninstallPackages(options.offline)
50
50
  );
51
51
  }
52
52
  await runCommands("Cleaning up files", [
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/initialize/initializeWithOptions.ts"],"sourcesContent":["import { withSpinner, withSpinners } from \"../shared/cli/spinners.js\";\nimport { GitHubAndOptions } from \"../shared/options/readOptions.js\";\nimport { addOwnerAsAllContributor } from \"../steps/addOwnerAsAllContributor.js\";\nimport { clearChangelog } from \"../steps/clearChangelog.js\";\nimport { initializeGitHubRepository } from \"../steps/initializeGitHubRepository/index.js\";\nimport { removeSetupScripts } from \"../steps/removeSetupScripts.js\";\nimport { resetGitTags } from \"../steps/resetGitTags.js\";\nimport { runCommands } from \"../steps/runCommands.js\";\nimport { uninstallPackages } from \"../steps/uninstallPackages.js\";\nimport { updateAllContributorsTable } from \"../steps/updateAllContributorsTable.js\";\nimport { updateLocalFiles } from \"../steps/updateLocalFiles.js\";\nimport { updateReadme } from \"../steps/updateReadme.js\";\n\nexport async function initializeWithOptions({\n\tgithub,\n\toptions,\n}: GitHubAndOptions) {\n\tawait withSpinners(\"Initializing local files\", [\n\t\t[\n\t\t\t\"Updating local files\",\n\t\t\tasync () => {\n\t\t\t\tawait updateLocalFiles(options, \"initialize\");\n\t\t\t},\n\t\t],\n\t\t[\"Updating README.md\", updateReadme],\n\t\t[\"Clearing changelog\", clearChangelog],\n\t\t[\n\t\t\t\"Updating all-contributors table\",\n\t\t\tasync () => {\n\t\t\t\tawait updateAllContributorsTable(options);\n\t\t\t},\n\t\t],\n\t\t[\"Resetting Git tags\", resetGitTags],\n\t]);\n\n\tif (!options.excludeContributors) {\n\t\tawait withSpinner(\"Updating existing contributor details\", async () => {\n\t\t\tawait addOwnerAsAllContributor(options.owner);\n\t\t});\n\t}\n\n\tif (github) {\n\t\tawait withSpinner(\"Initializing GitHub repository\", async () => {\n\t\t\tawait initializeGitHubRepository(github.octokit, options);\n\t\t});\n\t}\n\n\tif (!options.skipRemoval) {\n\t\tawait withSpinner(\"Removing setup scripts\", removeSetupScripts);\n\t}\n\n\tif (!options.skipUninstall) {\n\t\tawait withSpinner(\n\t\t\t\"Uninstalling initialization-only packages\",\n\t\t\tuninstallPackages,\n\t\t);\n\t}\n\n\tawait runCommands(\"Cleaning up files\", [\n\t\t\"pnpm lint --fix\",\n\t\t\"pnpm format --write\",\n\t]);\n}\n"],"mappings":"AAAA,SAAS,aAAa,oBAAoB;AAE1C,SAAS,gCAAgC;AACzC,SAAS,sBAAsB;AAC/B,SAAS,kCAAkC;AAC3C,SAAS,0BAA0B;AACnC,SAAS,oBAAoB;AAC7B,SAAS,mBAAmB;AAC5B,SAAS,yBAAyB;AAClC,SAAS,kCAAkC;AAC3C,SAAS,wBAAwB;AACjC,SAAS,oBAAoB;AAE7B,eAAsB,sBAAsB;AAAA,EAC3C;AAAA,EACA;AACD,GAAqB;AACpB,QAAM,aAAa,4BAA4B;AAAA,IAC9C;AAAA,MACC;AAAA,MACA,YAAY;AACX,cAAM,iBAAiB,SAAS,YAAY;AAAA,MAC7C;AAAA,IACD;AAAA,IACA,CAAC,sBAAsB,YAAY;AAAA,IACnC,CAAC,sBAAsB,cAAc;AAAA,IACrC;AAAA,MACC;AAAA,MACA,YAAY;AACX,cAAM,2BAA2B,OAAO;AAAA,MACzC;AAAA,IACD;AAAA,IACA,CAAC,sBAAsB,YAAY;AAAA,EACpC,CAAC;AAED,MAAI,CAAC,QAAQ,qBAAqB;AACjC,UAAM,YAAY,yCAAyC,YAAY;AACtE,YAAM,yBAAyB,QAAQ,KAAK;AAAA,IAC7C,CAAC;AAAA,EACF;AAEA,MAAI,QAAQ;AACX,UAAM,YAAY,kCAAkC,YAAY;AAC/D,YAAM,2BAA2B,OAAO,SAAS,OAAO;AAAA,IACzD,CAAC;AAAA,EACF;AAEA,MAAI,CAAC,QAAQ,aAAa;AACzB,UAAM,YAAY,0BAA0B,kBAAkB;AAAA,EAC/D;AAEA,MAAI,CAAC,QAAQ,eAAe;AAC3B,UAAM;AAAA,MACL;AAAA,MACA;AAAA,IACD;AAAA,EACD;AAEA,QAAM,YAAY,qBAAqB;AAAA,IACtC;AAAA,IACA;AAAA,EACD,CAAC;AACF;","names":[]}
1
+ {"version":3,"sources":["../../src/initialize/initializeWithOptions.ts"],"sourcesContent":["import { withSpinner, withSpinners } from \"../shared/cli/spinners.js\";\nimport { GitHubAndOptions } from \"../shared/options/readOptions.js\";\nimport { addOwnerAsAllContributor } from \"../steps/addOwnerAsAllContributor.js\";\nimport { clearChangelog } from \"../steps/clearChangelog.js\";\nimport { initializeGitHubRepository } from \"../steps/initializeGitHubRepository/index.js\";\nimport { removeSetupScripts } from \"../steps/removeSetupScripts.js\";\nimport { resetGitTags } from \"../steps/resetGitTags.js\";\nimport { runCommands } from \"../steps/runCommands.js\";\nimport { uninstallPackages } from \"../steps/uninstallPackages.js\";\nimport { updateAllContributorsTable } from \"../steps/updateAllContributorsTable.js\";\nimport { updateLocalFiles } from \"../steps/updateLocalFiles.js\";\nimport { updateReadme } from \"../steps/updateReadme.js\";\n\nexport async function initializeWithOptions({\n\tgithub,\n\toptions,\n}: GitHubAndOptions) {\n\tawait withSpinners(\"Initializing local files\", [\n\t\t[\n\t\t\t\"Updating local files\",\n\t\t\tasync () => {\n\t\t\t\tawait updateLocalFiles(options);\n\t\t\t},\n\t\t],\n\t\t[\"Updating README.md\", updateReadme],\n\t\t[\"Clearing changelog\", clearChangelog],\n\t\t[\n\t\t\t\"Updating all-contributors table\",\n\t\t\tasync () => {\n\t\t\t\tawait updateAllContributorsTable(options);\n\t\t\t},\n\t\t],\n\t\t[\"Resetting Git tags\", resetGitTags],\n\t]);\n\n\tif (!options.excludeAllContributors) {\n\t\tawait withSpinner(\"Updating existing contributor details\", async () => {\n\t\t\tawait addOwnerAsAllContributor(options);\n\t\t});\n\t}\n\n\tif (github) {\n\t\tawait withSpinner(\"Initializing GitHub repository\", async () => {\n\t\t\tawait initializeGitHubRepository(github.octokit, options);\n\t\t});\n\t}\n\n\tif (!options.skipRemoval) {\n\t\tawait withSpinner(\"Removing setup scripts\", removeSetupScripts);\n\t}\n\n\tif (!options.skipUninstall) {\n\t\tawait withSpinner(\"Uninstalling initialization-only packages\", async () =>\n\t\t\tuninstallPackages(options.offline),\n\t\t);\n\t}\n\n\tawait runCommands(\"Cleaning up files\", [\n\t\t\"pnpm lint --fix\",\n\t\t\"pnpm format --write\",\n\t]);\n}\n"],"mappings":"AAAA,SAAS,aAAa,oBAAoB;AAE1C,SAAS,gCAAgC;AACzC,SAAS,sBAAsB;AAC/B,SAAS,kCAAkC;AAC3C,SAAS,0BAA0B;AACnC,SAAS,oBAAoB;AAC7B,SAAS,mBAAmB;AAC5B,SAAS,yBAAyB;AAClC,SAAS,kCAAkC;AAC3C,SAAS,wBAAwB;AACjC,SAAS,oBAAoB;AAE7B,eAAsB,sBAAsB;AAAA,EAC3C;AAAA,EACA;AACD,GAAqB;AACpB,QAAM,aAAa,4BAA4B;AAAA,IAC9C;AAAA,MACC;AAAA,MACA,YAAY;AACX,cAAM,iBAAiB,OAAO;AAAA,MAC/B;AAAA,IACD;AAAA,IACA,CAAC,sBAAsB,YAAY;AAAA,IACnC,CAAC,sBAAsB,cAAc;AAAA,IACrC;AAAA,MACC;AAAA,MACA,YAAY;AACX,cAAM,2BAA2B,OAAO;AAAA,MACzC;AAAA,IACD;AAAA,IACA,CAAC,sBAAsB,YAAY;AAAA,EACpC,CAAC;AAED,MAAI,CAAC,QAAQ,wBAAwB;AACpC,UAAM,YAAY,yCAAyC,YAAY;AACtE,YAAM,yBAAyB,OAAO;AAAA,IACvC,CAAC;AAAA,EACF;AAEA,MAAI,QAAQ;AACX,UAAM,YAAY,kCAAkC,YAAY;AAC/D,YAAM,2BAA2B,OAAO,SAAS,OAAO;AAAA,IACzD,CAAC;AAAA,EACF;AAEA,MAAI,CAAC,QAAQ,aAAa;AACzB,UAAM,YAAY,0BAA0B,kBAAkB;AAAA,EAC/D;AAEA,MAAI,CAAC,QAAQ,eAAe;AAC3B,UAAM;AAAA,MAAY;AAAA,MAA6C,YAC9D,kBAAkB,QAAQ,OAAO;AAAA,IAClC;AAAA,EACD;AAEA,QAAM,YAAY,qBAAqB;AAAA,IACtC;AAAA,IACA;AAAA,EACD,CAAC;AACF;","names":[]}
@@ -1,7 +1,6 @@
1
- import { ModeRunner } from '../bin/mode.js';
1
+ import { ModeRunner } from '../shared/types.js';
2
2
  import 'zod';
3
3
  import '../shared/codes.js';
4
- import '../shared/types.js';
5
4
 
6
5
  declare const migrate: ModeRunner;
7
6
 
@@ -1,11 +1,12 @@
1
1
  import { outro } from "../shared/cli/outro.js";
2
2
  import { StatusCodes } from "../shared/codes.js";
3
3
  import { ensureGitRepository } from "../shared/ensureGitRepository.js";
4
+ import { generateNextSteps } from "../shared/generateNextSteps.js";
4
5
  import { readOptions } from "../shared/options/readOptions.js";
5
6
  import { runOrRestore } from "../shared/runOrRestore.js";
6
7
  import { migrateWithOptions } from "./migrateWithOptions.js";
7
8
  const migrate = async (args) => {
8
- const inputs = await readOptions(args);
9
+ const inputs = await readOptions(args, "migrate");
9
10
  if (inputs.cancelled) {
10
11
  return {
11
12
  code: StatusCodes.Cancelled,
@@ -25,8 +26,10 @@ const migrate = async (args) => {
25
26
  `git add -A`,
26
27
  `git commit -m "migrated repo to create-typescript-app \u2728`,
27
28
  `git push`
28
- ]
29
- }
29
+ ],
30
+ variant: "code"
31
+ },
32
+ ...generateNextSteps(inputs.options)
30
33
  ]);
31
34
  },
32
35
  skipRestore: inputs.options.skipRestore
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/migrate/index.ts"],"sourcesContent":["import { ModeRunner } from \"../bin/mode.js\";\nimport { outro } from \"../shared/cli/outro.js\";\nimport { StatusCodes } from \"../shared/codes.js\";\nimport { ensureGitRepository } from \"../shared/ensureGitRepository.js\";\nimport { readOptions } from \"../shared/options/readOptions.js\";\nimport { runOrRestore } from \"../shared/runOrRestore.js\";\nimport { migrateWithOptions } from \"./migrateWithOptions.js\";\n\nexport const migrate: ModeRunner = async (args) => {\n\tconst inputs = await readOptions(args);\n\tif (inputs.cancelled) {\n\t\treturn {\n\t\t\tcode: StatusCodes.Cancelled,\n\t\t\terror: inputs.error,\n\t\t\toptions: inputs.options,\n\t\t};\n\t}\n\n\tawait ensureGitRepository();\n\n\treturn {\n\t\tcode: await runOrRestore({\n\t\t\trun: async () => {\n\t\t\t\tawait migrateWithOptions(inputs);\n\n\t\t\t\toutro([\n\t\t\t\t\t{\n\t\t\t\t\t\tlabel: \"You may consider committing these changes:\",\n\t\t\t\t\t\tlines: [\n\t\t\t\t\t\t\t`git add -A`,\n\t\t\t\t\t\t\t`git commit -m \"migrated repo to create-typescript-app ✨`,\n\t\t\t\t\t\t\t`git push`,\n\t\t\t\t\t\t],\n\t\t\t\t\t},\n\t\t\t\t]);\n\t\t\t},\n\t\t\tskipRestore: inputs.options.skipRestore,\n\t\t}),\n\t\toptions: inputs.options,\n\t};\n};\n"],"mappings":"AACA,SAAS,aAAa;AACtB,SAAS,mBAAmB;AAC5B,SAAS,2BAA2B;AACpC,SAAS,mBAAmB;AAC5B,SAAS,oBAAoB;AAC7B,SAAS,0BAA0B;AAE5B,MAAM,UAAsB,OAAO,SAAS;AAClD,QAAM,SAAS,MAAM,YAAY,IAAI;AACrC,MAAI,OAAO,WAAW;AACrB,WAAO;AAAA,MACN,MAAM,YAAY;AAAA,MAClB,OAAO,OAAO;AAAA,MACd,SAAS,OAAO;AAAA,IACjB;AAAA,EACD;AAEA,QAAM,oBAAoB;AAE1B,SAAO;AAAA,IACN,MAAM,MAAM,aAAa;AAAA,MACxB,KAAK,YAAY;AAChB,cAAM,mBAAmB,MAAM;AAE/B,cAAM;AAAA,UACL;AAAA,YACC,OAAO;AAAA,YACP,OAAO;AAAA,cACN;AAAA,cACA;AAAA,cACA;AAAA,YACD;AAAA,UACD;AAAA,QACD,CAAC;AAAA,MACF;AAAA,MACA,aAAa,OAAO,QAAQ;AAAA,IAC7B,CAAC;AAAA,IACD,SAAS,OAAO;AAAA,EACjB;AACD;","names":[]}
1
+ {"version":3,"sources":["../../src/migrate/index.ts"],"sourcesContent":["import { outro } from \"../shared/cli/outro.js\";\nimport { StatusCodes } from \"../shared/codes.js\";\nimport { ensureGitRepository } from \"../shared/ensureGitRepository.js\";\nimport { generateNextSteps } from \"../shared/generateNextSteps.js\";\nimport { readOptions } from \"../shared/options/readOptions.js\";\nimport { runOrRestore } from \"../shared/runOrRestore.js\";\nimport { ModeRunner } from \"../shared/types.js\";\nimport { migrateWithOptions } from \"./migrateWithOptions.js\";\n\nexport const migrate: ModeRunner = async (args) => {\n\tconst inputs = await readOptions(args, \"migrate\");\n\tif (inputs.cancelled) {\n\t\treturn {\n\t\t\tcode: StatusCodes.Cancelled,\n\t\t\terror: inputs.error,\n\t\t\toptions: inputs.options,\n\t\t};\n\t}\n\n\tawait ensureGitRepository();\n\n\treturn {\n\t\tcode: await runOrRestore({\n\t\t\trun: async () => {\n\t\t\t\tawait migrateWithOptions(inputs);\n\n\t\t\t\toutro([\n\t\t\t\t\t{\n\t\t\t\t\t\tlabel: \"You may consider committing these changes:\",\n\t\t\t\t\t\tlines: [\n\t\t\t\t\t\t\t`git add -A`,\n\t\t\t\t\t\t\t`git commit -m \"migrated repo to create-typescript-app ✨`,\n\t\t\t\t\t\t\t`git push`,\n\t\t\t\t\t\t],\n\t\t\t\t\t\tvariant: \"code\",\n\t\t\t\t\t},\n\t\t\t\t\t...generateNextSteps(inputs.options),\n\t\t\t\t]);\n\t\t\t},\n\t\t\tskipRestore: inputs.options.skipRestore,\n\t\t}),\n\t\toptions: inputs.options,\n\t};\n};\n"],"mappings":"AAAA,SAAS,aAAa;AACtB,SAAS,mBAAmB;AAC5B,SAAS,2BAA2B;AACpC,SAAS,yBAAyB;AAClC,SAAS,mBAAmB;AAC5B,SAAS,oBAAoB;AAE7B,SAAS,0BAA0B;AAE5B,MAAM,UAAsB,OAAO,SAAS;AAClD,QAAM,SAAS,MAAM,YAAY,MAAM,SAAS;AAChD,MAAI,OAAO,WAAW;AACrB,WAAO;AAAA,MACN,MAAM,YAAY;AAAA,MAClB,OAAO,OAAO;AAAA,MACd,SAAS,OAAO;AAAA,IACjB;AAAA,EACD;AAEA,QAAM,oBAAoB;AAE1B,SAAO;AAAA,IACN,MAAM,MAAM,aAAa;AAAA,MACxB,KAAK,YAAY;AAChB,cAAM,mBAAmB,MAAM;AAE/B,cAAM;AAAA,UACL;AAAA,YACC,OAAO;AAAA,YACP,OAAO;AAAA,cACN;AAAA,cACA;AAAA,cACA;AAAA,YACD;AAAA,YACA,SAAS;AAAA,UACV;AAAA,UACA,GAAG,kBAAkB,OAAO,OAAO;AAAA,QACpC,CAAC;AAAA,MACF;AAAA,MACA,aAAa,OAAO,QAAQ;AAAA,IAC7B,CAAC;AAAA,IACD,SAAS,OAAO;AAAA,EACjB;AACD;","names":[]}
@@ -1,6 +1,7 @@
1
1
  import { GitHubAndOptions } from '../shared/options/readOptions.js';
2
2
  import 'zod';
3
3
  import '../shared/types.js';
4
+ import '../shared/codes.js';
4
5
  import '../shared/options/getGitHub.js';
5
6
  import 'octokit';
6
7
 
@@ -17,7 +17,7 @@ async function migrateWithOptions({
17
17
  [
18
18
  "Writing structure",
19
19
  async () => {
20
- await writeStructure(options, "migrate");
20
+ await writeStructure(options);
21
21
  }
22
22
  ],
23
23
  [
@@ -29,7 +29,7 @@ async function migrateWithOptions({
29
29
  [
30
30
  "Updating local files",
31
31
  async () => {
32
- await updateLocalFiles(options, "migrate");
32
+ await updateLocalFiles(options);
33
33
  }
34
34
  ],
35
35
  [
@@ -44,7 +44,7 @@ async function migrateWithOptions({
44
44
  await initializeGitHubRepository(github.octokit, options);
45
45
  });
46
46
  }
47
- if (!options.excludeContributors) {
47
+ if (!options.excludeAllContributors && !options.skipAllContributorsApi) {
48
48
  await withSpinner(
49
49
  "Detecting existing contributors",
50
50
  async () => detectExistingContributors(github?.auth, options)
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/migrate/migrateWithOptions.ts"],"sourcesContent":["import { withSpinner, withSpinners } from \"../shared/cli/spinners.js\";\nimport { GitHubAndOptions } from \"../shared/options/readOptions.js\";\nimport { clearUnnecessaryFiles } from \"../steps/clearUnnecessaryFiles.js\";\nimport { detectExistingContributors } from \"../steps/detectExistingContributors.js\";\nimport { finalizeDependencies } from \"../steps/finalizeDependencies.js\";\nimport { initializeGitHubRepository } from \"../steps/initializeGitHubRepository/index.js\";\nimport { runCommands } from \"../steps/runCommands.js\";\nimport { updateAllContributorsTable } from \"../steps/updateAllContributorsTable.js\";\nimport { updateLocalFiles } from \"../steps/updateLocalFiles.js\";\nimport { writeReadme } from \"../steps/writeReadme/index.js\";\nimport { writeStructure } from \"../steps/writing/writeStructure.js\";\n\nexport async function migrateWithOptions({\n\tgithub,\n\toptions,\n}: GitHubAndOptions) {\n\tawait withSpinners(\"Migrating repository structure\", [\n\t\t[\"Clearing unnecessary files\", clearUnnecessaryFiles],\n\t\t[\n\t\t\t\"Writing structure\",\n\t\t\tasync () => {\n\t\t\t\tawait writeStructure(options, \"migrate\");\n\t\t\t},\n\t\t],\n\t\t[\n\t\t\t\"Writing README.md\",\n\t\t\tasync () => {\n\t\t\t\tawait writeReadme(options);\n\t\t\t},\n\t\t],\n\t\t[\n\t\t\t\"Updating local files\",\n\t\t\tasync () => {\n\t\t\t\tawait updateLocalFiles(options, \"migrate\");\n\t\t\t},\n\t\t],\n\t\t[\n\t\t\t\"Updating all-contributors table\",\n\t\t\tasync () => {\n\t\t\t\tawait updateAllContributorsTable(options);\n\t\t\t},\n\t\t],\n\t]);\n\n\tif (github) {\n\t\tawait withSpinner(\"Initializing GitHub repository\", async () => {\n\t\t\tawait initializeGitHubRepository(github.octokit, options);\n\t\t});\n\t}\n\n\tif (!options.excludeContributors) {\n\t\tawait withSpinner(\"Detecting existing contributors\", async () =>\n\t\t\tdetectExistingContributors(github?.auth, options),\n\t\t);\n\t}\n\n\tif (!options.skipInstall) {\n\t\tawait withSpinner(\"Installing packages\", async () =>\n\t\t\tfinalizeDependencies(options),\n\t\t);\n\t}\n\n\tawait runCommands(\"Cleaning up files\", [\n\t\t\"pnpm lint --fix\",\n\t\t\"pnpm format --write\",\n\t]);\n}\n"],"mappings":"AAAA,SAAS,aAAa,oBAAoB;AAE1C,SAAS,6BAA6B;AACtC,SAAS,kCAAkC;AAC3C,SAAS,4BAA4B;AACrC,SAAS,kCAAkC;AAC3C,SAAS,mBAAmB;AAC5B,SAAS,kCAAkC;AAC3C,SAAS,wBAAwB;AACjC,SAAS,mBAAmB;AAC5B,SAAS,sBAAsB;AAE/B,eAAsB,mBAAmB;AAAA,EACxC;AAAA,EACA;AACD,GAAqB;AACpB,QAAM,aAAa,kCAAkC;AAAA,IACpD,CAAC,8BAA8B,qBAAqB;AAAA,IACpD;AAAA,MACC;AAAA,MACA,YAAY;AACX,cAAM,eAAe,SAAS,SAAS;AAAA,MACxC;AAAA,IACD;AAAA,IACA;AAAA,MACC;AAAA,MACA,YAAY;AACX,cAAM,YAAY,OAAO;AAAA,MAC1B;AAAA,IACD;AAAA,IACA;AAAA,MACC;AAAA,MACA,YAAY;AACX,cAAM,iBAAiB,SAAS,SAAS;AAAA,MAC1C;AAAA,IACD;AAAA,IACA;AAAA,MACC;AAAA,MACA,YAAY;AACX,cAAM,2BAA2B,OAAO;AAAA,MACzC;AAAA,IACD;AAAA,EACD,CAAC;AAED,MAAI,QAAQ;AACX,UAAM,YAAY,kCAAkC,YAAY;AAC/D,YAAM,2BAA2B,OAAO,SAAS,OAAO;AAAA,IACzD,CAAC;AAAA,EACF;AAEA,MAAI,CAAC,QAAQ,qBAAqB;AACjC,UAAM;AAAA,MAAY;AAAA,MAAmC,YACpD,2BAA2B,QAAQ,MAAM,OAAO;AAAA,IACjD;AAAA,EACD;AAEA,MAAI,CAAC,QAAQ,aAAa;AACzB,UAAM;AAAA,MAAY;AAAA,MAAuB,YACxC,qBAAqB,OAAO;AAAA,IAC7B;AAAA,EACD;AAEA,QAAM,YAAY,qBAAqB;AAAA,IACtC;AAAA,IACA;AAAA,EACD,CAAC;AACF;","names":[]}
1
+ {"version":3,"sources":["../../src/migrate/migrateWithOptions.ts"],"sourcesContent":["import { withSpinner, withSpinners } from \"../shared/cli/spinners.js\";\nimport { GitHubAndOptions } from \"../shared/options/readOptions.js\";\nimport { clearUnnecessaryFiles } from \"../steps/clearUnnecessaryFiles.js\";\nimport { detectExistingContributors } from \"../steps/detectExistingContributors.js\";\nimport { finalizeDependencies } from \"../steps/finalizeDependencies.js\";\nimport { initializeGitHubRepository } from \"../steps/initializeGitHubRepository/index.js\";\nimport { runCommands } from \"../steps/runCommands.js\";\nimport { updateAllContributorsTable } from \"../steps/updateAllContributorsTable.js\";\nimport { updateLocalFiles } from \"../steps/updateLocalFiles.js\";\nimport { writeReadme } from \"../steps/writeReadme/index.js\";\nimport { writeStructure } from \"../steps/writing/writeStructure.js\";\n\nexport async function migrateWithOptions({\n\tgithub,\n\toptions,\n}: GitHubAndOptions) {\n\tawait withSpinners(\"Migrating repository structure\", [\n\t\t[\"Clearing unnecessary files\", clearUnnecessaryFiles],\n\t\t[\n\t\t\t\"Writing structure\",\n\t\t\tasync () => {\n\t\t\t\tawait writeStructure(options);\n\t\t\t},\n\t\t],\n\t\t[\n\t\t\t\"Writing README.md\",\n\t\t\tasync () => {\n\t\t\t\tawait writeReadme(options);\n\t\t\t},\n\t\t],\n\t\t[\n\t\t\t\"Updating local files\",\n\t\t\tasync () => {\n\t\t\t\tawait updateLocalFiles(options);\n\t\t\t},\n\t\t],\n\t\t[\n\t\t\t\"Updating all-contributors table\",\n\t\t\tasync () => {\n\t\t\t\tawait updateAllContributorsTable(options);\n\t\t\t},\n\t\t],\n\t]);\n\n\tif (github) {\n\t\tawait withSpinner(\"Initializing GitHub repository\", async () => {\n\t\t\tawait initializeGitHubRepository(github.octokit, options);\n\t\t});\n\t}\n\n\tif (!options.excludeAllContributors && !options.skipAllContributorsApi) {\n\t\tawait withSpinner(\"Detecting existing contributors\", async () =>\n\t\t\tdetectExistingContributors(github?.auth, options),\n\t\t);\n\t}\n\n\tif (!options.skipInstall) {\n\t\tawait withSpinner(\"Installing packages\", async () =>\n\t\t\tfinalizeDependencies(options),\n\t\t);\n\t}\n\n\tawait runCommands(\"Cleaning up files\", [\n\t\t\"pnpm lint --fix\",\n\t\t\"pnpm format --write\",\n\t]);\n}\n"],"mappings":"AAAA,SAAS,aAAa,oBAAoB;AAE1C,SAAS,6BAA6B;AACtC,SAAS,kCAAkC;AAC3C,SAAS,4BAA4B;AACrC,SAAS,kCAAkC;AAC3C,SAAS,mBAAmB;AAC5B,SAAS,kCAAkC;AAC3C,SAAS,wBAAwB;AACjC,SAAS,mBAAmB;AAC5B,SAAS,sBAAsB;AAE/B,eAAsB,mBAAmB;AAAA,EACxC;AAAA,EACA;AACD,GAAqB;AACpB,QAAM,aAAa,kCAAkC;AAAA,IACpD,CAAC,8BAA8B,qBAAqB;AAAA,IACpD;AAAA,MACC;AAAA,MACA,YAAY;AACX,cAAM,eAAe,OAAO;AAAA,MAC7B;AAAA,IACD;AAAA,IACA;AAAA,MACC;AAAA,MACA,YAAY;AACX,cAAM,YAAY,OAAO;AAAA,MAC1B;AAAA,IACD;AAAA,IACA;AAAA,MACC;AAAA,MACA,YAAY;AACX,cAAM,iBAAiB,OAAO;AAAA,MAC/B;AAAA,IACD;AAAA,IACA;AAAA,MACC;AAAA,MACA,YAAY;AACX,cAAM,2BAA2B,OAAO;AAAA,MACzC;AAAA,IACD;AAAA,EACD,CAAC;AAED,MAAI,QAAQ;AACX,UAAM,YAAY,kCAAkC,YAAY;AAC/D,YAAM,2BAA2B,OAAO,SAAS,OAAO;AAAA,IACzD,CAAC;AAAA,EACF;AAEA,MAAI,CAAC,QAAQ,0BAA0B,CAAC,QAAQ,wBAAwB;AACvE,UAAM;AAAA,MAAY;AAAA,MAAmC,YACpD,2BAA2B,QAAQ,MAAM,OAAO;AAAA,IACjD;AAAA,EACD;AAEA,MAAI,CAAC,QAAQ,aAAa;AACzB,UAAM;AAAA,MAAY;AAAA,MAAuB,YACxC,qBAAqB,OAAO;AAAA,IAC7B;AAAA,EACD;AAEA,QAAM,YAAY,qBAAqB;AAAA,IACtC;AAAA,IACA;AAAA,EACD,CAAC;AACF;","names":[]}
@@ -1,7 +1,8 @@
1
- interface outroGroup {
1
+ interface OutroGroup {
2
2
  label: string;
3
3
  lines?: string[];
4
+ variant?: "code";
4
5
  }
5
- declare function outro(groups: outroGroup[]): void;
6
+ declare function outro(groups: OutroGroup[]): void;
6
7
 
7
- export { outro, outroGroup };
8
+ export { OutroGroup, outro };
@@ -2,12 +2,12 @@ import * as prompts from "@clack/prompts";
2
2
  import chalk from "chalk";
3
3
  function outro(groups) {
4
4
  prompts.outro(chalk.blue(`Great, looks like the script finished! \u{1F389}`));
5
- for (const { label, lines } of groups) {
5
+ for (const { label, lines, variant } of groups) {
6
6
  console.log(chalk.blue(label));
7
7
  console.log();
8
8
  if (lines) {
9
9
  for (const line of lines) {
10
- console.log(chalk.gray(line));
10
+ console.log(variant === "code" ? chalk.gray(line) : line);
11
11
  }
12
12
  console.log();
13
13
  }
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/shared/cli/outro.ts"],"sourcesContent":["import * as prompts from \"@clack/prompts\";\nimport chalk from \"chalk\";\n\nexport interface outroGroup {\n\tlabel: string;\n\tlines?: string[];\n}\n\nexport function outro(groups: outroGroup[]) {\n\tprompts.outro(chalk.blue(`Great, looks like the script finished! 🎉`));\n\n\tfor (const { label, lines } of groups) {\n\t\tconsole.log(chalk.blue(label));\n\t\tconsole.log();\n\n\t\tif (lines) {\n\t\t\tfor (const line of lines) {\n\t\t\t\tconsole.log(chalk.gray(line));\n\t\t\t}\n\n\t\t\tconsole.log();\n\t\t}\n\t}\n\n\tconsole.log(chalk.greenBright(`See ya! 👋`));\n\tconsole.log();\n}\n"],"mappings":"AAAA,YAAY,aAAa;AACzB,OAAO,WAAW;AAOX,SAAS,MAAM,QAAsB;AAC3C,UAAQ,MAAM,MAAM,KAAK,kDAA2C,CAAC;AAErE,aAAW,EAAE,OAAO,MAAM,KAAK,QAAQ;AACtC,YAAQ,IAAI,MAAM,KAAK,KAAK,CAAC;AAC7B,YAAQ,IAAI;AAEZ,QAAI,OAAO;AACV,iBAAW,QAAQ,OAAO;AACzB,gBAAQ,IAAI,MAAM,KAAK,IAAI,CAAC;AAAA,MAC7B;AAEA,cAAQ,IAAI;AAAA,IACb;AAAA,EACD;AAEA,UAAQ,IAAI,MAAM,YAAY,mBAAY,CAAC;AAC3C,UAAQ,IAAI;AACb;","names":[]}
1
+ {"version":3,"sources":["../../../src/shared/cli/outro.ts"],"sourcesContent":["import * as prompts from \"@clack/prompts\";\nimport chalk from \"chalk\";\n\nexport interface OutroGroup {\n\tlabel: string;\n\tlines?: string[];\n\tvariant?: \"code\";\n}\n\nexport function outro(groups: OutroGroup[]) {\n\tprompts.outro(chalk.blue(`Great, looks like the script finished! 🎉`));\n\n\tfor (const { label, lines, variant } of groups) {\n\t\tconsole.log(chalk.blue(label));\n\t\tconsole.log();\n\n\t\tif (lines) {\n\t\t\tfor (const line of lines) {\n\t\t\t\tconsole.log(variant === \"code\" ? chalk.gray(line) : line);\n\t\t\t}\n\n\t\t\tconsole.log();\n\t\t}\n\t}\n\n\tconsole.log(chalk.greenBright(`See ya! 👋`));\n\tconsole.log();\n}\n"],"mappings":"AAAA,YAAY,aAAa;AACzB,OAAO,WAAW;AAQX,SAAS,MAAM,QAAsB;AAC3C,UAAQ,MAAM,MAAM,KAAK,kDAA2C,CAAC;AAErE,aAAW,EAAE,OAAO,OAAO,QAAQ,KAAK,QAAQ;AAC/C,YAAQ,IAAI,MAAM,KAAK,KAAK,CAAC;AAC7B,YAAQ,IAAI;AAEZ,QAAI,OAAO;AACV,iBAAW,QAAQ,OAAO;AACzB,gBAAQ,IAAI,YAAY,SAAS,MAAM,KAAK,IAAI,IAAI,IAAI;AAAA,MACzD;AAEA,cAAQ,IAAI;AAAA,IACb;AAAA,EACD;AAEA,UAAQ,IAAI,MAAM,YAAY,mBAAY,CAAC;AAC3C,UAAQ,IAAI;AACb;","names":[]}
@@ -0,0 +1,8 @@
1
+ import { OutroGroup } from './cli/outro.js';
2
+ import { Options } from './types.js';
3
+ import 'zod';
4
+ import './codes.js';
5
+
6
+ declare function generateNextSteps(options: Options): OutroGroup[];
7
+
8
+ export { generateNextSteps };
@@ -0,0 +1,60 @@
1
+ function generateNextSteps(options) {
2
+ const lines = [
3
+ joinedMessage(
4
+ "enable the",
5
+ [
6
+ options.excludeTests || ["Codecov", "https://github.com/apps/codecov"],
7
+ options.excludeRenovate || [
8
+ "Renovate",
9
+ "https://github.com/apps/renovate"
10
+ ]
11
+ ],
12
+ "GitHub app"
13
+ ),
14
+ joinedMessage(
15
+ "populate the",
16
+ [
17
+ options.excludeAllContributors && options.excludeReleases || [
18
+ "ACCESS_TOKEN",
19
+ "a GitHub PAT with repo and workflow permissions"
20
+ ],
21
+ options.excludeReleases || [
22
+ "NPM_TOKEN",
23
+ "an npm access token with automation permissions"
24
+ ]
25
+ ],
26
+ "secret"
27
+ )
28
+ ].filter((line) => !!line);
29
+ switch (lines.length) {
30
+ case 0:
31
+ return [];
32
+ case 1:
33
+ return [{ label: `Be sure to ${lines[0]}` }];
34
+ default:
35
+ return [
36
+ {
37
+ label: "Be sure to:",
38
+ lines: lines.map((line) => `- ${line}`)
39
+ }
40
+ ];
41
+ }
42
+ }
43
+ const itemBreak = "\n - ";
44
+ function joinedMessage(prefix, entries, suffix) {
45
+ const realEntries = entries.filter(
46
+ (entry) => entry !== true
47
+ );
48
+ switch (realEntries.length) {
49
+ case 0:
50
+ return void 0;
51
+ case 1:
52
+ return `${prefix} ${realEntries[0][0]} ${suffix} (${realEntries[0][1]}).`;
53
+ default:
54
+ return `${prefix} ${suffix}s: ${itemBreak}${realEntries.map((entry) => `${entry[0]} (${entry[1]})`).join(itemBreak)}`;
55
+ }
56
+ }
57
+ export {
58
+ generateNextSteps
59
+ };
60
+ //# sourceMappingURL=generateNextSteps.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/shared/generateNextSteps.ts"],"sourcesContent":["import { OutroGroup } from \"./cli/outro.js\";\nimport { Options } from \"./types.js\";\n\nexport function generateNextSteps(options: Options): OutroGroup[] {\n\tconst lines = [\n\t\tjoinedMessage(\n\t\t\t\"enable the\",\n\t\t\t[\n\t\t\t\toptions.excludeTests || [\"Codecov\", \"https://github.com/apps/codecov\"],\n\t\t\t\toptions.excludeRenovate || [\n\t\t\t\t\t\"Renovate\",\n\t\t\t\t\t\"https://github.com/apps/renovate\",\n\t\t\t\t],\n\t\t\t],\n\t\t\t\"GitHub app\",\n\t\t),\n\t\tjoinedMessage(\n\t\t\t\"populate the\",\n\t\t\t[\n\t\t\t\t(options.excludeAllContributors && options.excludeReleases) || [\n\t\t\t\t\t\"ACCESS_TOKEN\",\n\t\t\t\t\t\"a GitHub PAT with repo and workflow permissions\",\n\t\t\t\t],\n\t\t\t\toptions.excludeReleases || [\n\t\t\t\t\t\"NPM_TOKEN\",\n\t\t\t\t\t\"an npm access token with automation permissions\",\n\t\t\t\t],\n\t\t\t],\n\t\t\t\"secret\",\n\t\t),\n\t].filter((line): line is string => !!line);\n\n\tswitch (lines.length) {\n\t\tcase 0:\n\t\t\treturn [];\n\t\tcase 1:\n\t\t\treturn [{ label: `Be sure to ${lines[0]}` }];\n\t\tdefault:\n\t\t\treturn [\n\t\t\t\t{\n\t\t\t\t\tlabel: \"Be sure to:\",\n\t\t\t\t\tlines: lines.map((line) => `- ${line}`),\n\t\t\t\t},\n\t\t\t];\n\t}\n}\n\nconst itemBreak = \"\\n - \";\n\nfunction joinedMessage(\n\tprefix: string,\n\tentries: ([string, string] | true)[],\n\tsuffix: string,\n) {\n\tconst realEntries = entries.filter(\n\t\t(entry): entry is [string, string] => entry !== true,\n\t);\n\n\tswitch (realEntries.length) {\n\t\tcase 0:\n\t\t\treturn undefined;\n\t\tcase 1:\n\t\t\treturn `${prefix} ${realEntries[0][0]} ${suffix} (${realEntries[0][1]}).`;\n\t\tdefault:\n\t\t\treturn `${prefix} ${suffix}s: ${itemBreak}${realEntries\n\t\t\t\t.map((entry) => `${entry[0]} (${entry[1]})`)\n\t\t\t\t.join(itemBreak)}`;\n\t}\n}\n"],"mappings":"AAGO,SAAS,kBAAkB,SAAgC;AACjE,QAAM,QAAQ;AAAA,IACb;AAAA,MACC;AAAA,MACA;AAAA,QACC,QAAQ,gBAAgB,CAAC,WAAW,iCAAiC;AAAA,QACrE,QAAQ,mBAAmB;AAAA,UAC1B;AAAA,UACA;AAAA,QACD;AAAA,MACD;AAAA,MACA;AAAA,IACD;AAAA,IACA;AAAA,MACC;AAAA,MACA;AAAA,QACE,QAAQ,0BAA0B,QAAQ,mBAAoB;AAAA,UAC9D;AAAA,UACA;AAAA,QACD;AAAA,QACA,QAAQ,mBAAmB;AAAA,UAC1B;AAAA,UACA;AAAA,QACD;AAAA,MACD;AAAA,MACA;AAAA,IACD;AAAA,EACD,EAAE,OAAO,CAAC,SAAyB,CAAC,CAAC,IAAI;AAEzC,UAAQ,MAAM,QAAQ;AAAA,IACrB,KAAK;AACJ,aAAO,CAAC;AAAA,IACT,KAAK;AACJ,aAAO,CAAC,EAAE,OAAO,cAAc,MAAM,CAAC,CAAC,GAAG,CAAC;AAAA,IAC5C;AACC,aAAO;AAAA,QACN;AAAA,UACC,OAAO;AAAA,UACP,OAAO,MAAM,IAAI,CAAC,SAAS,KAAK,IAAI,EAAE;AAAA,QACvC;AAAA,MACD;AAAA,EACF;AACD;AAEA,MAAM,YAAY;AAElB,SAAS,cACR,QACA,SACA,QACC;AACD,QAAM,cAAc,QAAQ;AAAA,IAC3B,CAAC,UAAqC,UAAU;AAAA,EACjD;AAEA,UAAQ,YAAY,QAAQ;AAAA,IAC3B,KAAK;AACJ,aAAO;AAAA,IACR,KAAK;AACJ,aAAO,GAAG,MAAM,IAAI,YAAY,CAAC,EAAE,CAAC,CAAC,IAAI,MAAM,KAAK,YAAY,CAAC,EAAE,CAAC,CAAC;AAAA,IACtE;AACC,aAAO,GAAG,MAAM,IAAI,MAAM,MAAM,SAAS,GAAG,YAC1C,IAAI,CAAC,UAAU,GAAG,MAAM,CAAC,CAAC,KAAK,MAAM,CAAC,CAAC,GAAG,EAC1C,KAAK,SAAS,CAAC;AAAA,EACnB;AACD;","names":[]}
@@ -1,3 +1,7 @@
1
- declare function getGitHubUserAsAllContributor(owner: string): Promise<string>;
1
+ import { Options } from './types.js';
2
+ import 'zod';
3
+ import './codes.js';
4
+
5
+ declare function getGitHubUserAsAllContributor(options: Pick<Options, "offline" | "owner">): Promise<string>;
2
6
 
3
7
  export { getGitHubUserAsAllContributor };
@@ -1,16 +1,24 @@
1
1
  import chalk from "chalk";
2
2
  import { $ } from "execa";
3
- async function getGitHubUserAsAllContributor(owner) {
3
+ async function getGitHubUserAsAllContributor(options) {
4
+ if (options.offline) {
5
+ console.warn(
6
+ chalk.gray(
7
+ `Skipping populating all-contributors contributions for ${options.owner} because in --offline mode.`
8
+ )
9
+ );
10
+ return options.owner;
11
+ }
4
12
  let user;
5
13
  try {
6
14
  user = JSON.parse((await $`gh api user`).stdout).login;
7
15
  } catch {
8
16
  console.warn(
9
17
  chalk.gray(
10
- `Couldn't authenticate GitHub user, falling back to the provided owner name '${owner}'.`
18
+ `Couldn't authenticate GitHub user, falling back to the provided owner name '${options.owner}'.`
11
19
  )
12
20
  );
13
- user = owner;
21
+ user = options.owner;
14
22
  }
15
23
  const contributions = [
16
24
  "code",
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/shared/getGitHubUserAsAllContributor.ts"],"sourcesContent":["import chalk from \"chalk\";\nimport { $ } from \"execa\";\n\ninterface GhUserOutput {\n\tlogin: string;\n}\n\nexport async function getGitHubUserAsAllContributor(owner: string) {\n\tlet user: string;\n\ttry {\n\t\tuser = (JSON.parse((await $`gh api user`).stdout) as GhUserOutput).login;\n\t} catch {\n\t\tconsole.warn(\n\t\t\tchalk.gray(\n\t\t\t\t`Couldn't authenticate GitHub user, falling back to the provided owner name '${owner}'.`,\n\t\t\t),\n\t\t);\n\t\tuser = owner;\n\t}\n\n\tconst contributions = [\n\t\t\"code\",\n\t\t\"content\",\n\t\t\"doc\",\n\t\t\"ideas\",\n\t\t\"infra\",\n\t\t\"maintenance\",\n\t\t\"projectManagement\",\n\t\t\"tool\",\n\t].join(\",\");\n\tawait $`npx -y all-contributors-cli@6.25 add ${user} ${contributions}`;\n\n\treturn user;\n}\n"],"mappings":"AAAA,OAAO,WAAW;AAClB,SAAS,SAAS;AAMlB,eAAsB,8BAA8B,OAAe;AAClE,MAAI;AACJ,MAAI;AACH,WAAQ,KAAK,OAAO,MAAM,gBAAgB,MAAM,EAAmB;AAAA,EACpE,QAAQ;AACP,YAAQ;AAAA,MACP,MAAM;AAAA,QACL,+EAA+E,KAAK;AAAA,MACrF;AAAA,IACD;AACA,WAAO;AAAA,EACR;AAEA,QAAM,gBAAgB;AAAA,IACrB;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACD,EAAE,KAAK,GAAG;AACV,QAAM,yCAAyC,IAAI,IAAI,aAAa;AAEpE,SAAO;AACR;","names":[]}
1
+ {"version":3,"sources":["../../src/shared/getGitHubUserAsAllContributor.ts"],"sourcesContent":["import chalk from \"chalk\";\nimport { $ } from \"execa\";\n\nimport { Options } from \"./types.js\";\n\ninterface GhUserOutput {\n\tlogin: string;\n}\n\nexport async function getGitHubUserAsAllContributor(\n\toptions: Pick<Options, \"offline\" | \"owner\">,\n) {\n\tif (options.offline) {\n\t\tconsole.warn(\n\t\t\tchalk.gray(\n\t\t\t\t`Skipping populating all-contributors contributions for ${options.owner} because in --offline mode.`,\n\t\t\t),\n\t\t);\n\t\treturn options.owner;\n\t}\n\n\tlet user: string;\n\n\ttry {\n\t\tuser = (JSON.parse((await $`gh api user`).stdout) as GhUserOutput).login;\n\t} catch {\n\t\tconsole.warn(\n\t\t\tchalk.gray(\n\t\t\t\t`Couldn't authenticate GitHub user, falling back to the provided owner name '${options.owner}'.`,\n\t\t\t),\n\t\t);\n\t\tuser = options.owner;\n\t}\n\n\tconst contributions = [\n\t\t\"code\",\n\t\t\"content\",\n\t\t\"doc\",\n\t\t\"ideas\",\n\t\t\"infra\",\n\t\t\"maintenance\",\n\t\t\"projectManagement\",\n\t\t\"tool\",\n\t].join(\",\");\n\tawait $`npx -y all-contributors-cli@6.25 add ${user} ${contributions}`;\n\n\treturn user;\n}\n"],"mappings":"AAAA,OAAO,WAAW;AAClB,SAAS,SAAS;AAQlB,eAAsB,8BACrB,SACC;AACD,MAAI,QAAQ,SAAS;AACpB,YAAQ;AAAA,MACP,MAAM;AAAA,QACL,0DAA0D,QAAQ,KAAK;AAAA,MACxE;AAAA,IACD;AACA,WAAO,QAAQ;AAAA,EAChB;AAEA,MAAI;AAEJ,MAAI;AACH,WAAQ,KAAK,OAAO,MAAM,gBAAgB,MAAM,EAAmB;AAAA,EACpE,QAAQ;AACP,YAAQ;AAAA,MACP,MAAM;AAAA,QACL,+EAA+E,QAAQ,KAAK;AAAA,MAC7F;AAAA,IACD;AACA,WAAO,QAAQ;AAAA,EAChB;AAEA,QAAM,gBAAgB;AAAA,IACrB;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACD,EAAE,KAAK,GAAG;AACV,QAAM,yCAAyC,IAAI,IAAI,aAAa;AAEpE,SAAO;AACR;","names":[]}
@@ -1,16 +1,19 @@
1
1
  declare const allArgOptions: {
2
+ readonly access: {
3
+ readonly type: "string";
4
+ };
2
5
  readonly author: {
3
6
  readonly type: "string";
4
7
  };
5
8
  readonly base: {
6
9
  readonly type: "string";
7
10
  };
8
- readonly "create-repository": {
9
- readonly type: "boolean";
10
- };
11
11
  readonly description: {
12
12
  readonly type: "string";
13
13
  };
14
+ readonly directory: {
15
+ readonly type: "string";
16
+ };
14
17
  readonly email: {
15
18
  readonly type: "string";
16
19
  };
@@ -20,10 +23,10 @@ declare const allArgOptions: {
20
23
  readonly "email-npm": {
21
24
  readonly type: "string";
22
25
  };
23
- readonly "exclude-compliance": {
26
+ readonly "exclude-all-contributors": {
24
27
  readonly type: "boolean";
25
28
  };
26
- readonly "exclude-contributors": {
29
+ readonly "exclude-compliance": {
27
30
  readonly type: "boolean";
28
31
  };
29
32
  readonly "exclude-lint-deprecation": {
@@ -80,18 +83,31 @@ declare const allArgOptions: {
80
83
  readonly funding: {
81
84
  readonly type: "string";
82
85
  };
86
+ readonly keywords: {
87
+ readonly multiple: true;
88
+ readonly type: "string";
89
+ };
83
90
  readonly logo: {
84
91
  readonly type: "string";
85
92
  };
86
93
  readonly "logo-alt": {
87
94
  readonly type: "string";
88
95
  };
96
+ readonly mode: {
97
+ readonly type: "string";
98
+ };
99
+ readonly offline: {
100
+ readonly type: "boolean";
101
+ };
89
102
  readonly owner: {
90
103
  readonly type: "string";
91
104
  };
92
105
  readonly repository: {
93
106
  readonly type: "string";
94
107
  };
108
+ readonly "skip-all-contributors-api": {
109
+ readonly type: "boolean";
110
+ };
95
111
  readonly "skip-github-api": {
96
112
  readonly type: "boolean";
97
113
  };
@@ -1,13 +1,14 @@
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" },
7
8
  "email-github": { type: "string" },
8
9
  "email-npm": { type: "string" },
10
+ "exclude-all-contributors": { type: "boolean" },
9
11
  "exclude-compliance": { type: "boolean" },
10
- "exclude-contributors": { type: "boolean" },
11
12
  "exclude-lint-deprecation": { type: "boolean" },
12
13
  "exclude-lint-eslint": { type: "boolean" },
13
14
  "exclude-lint-jsdoc": { type: "boolean" },
@@ -26,10 +27,14 @@ const allArgOptions = {
26
27
  "exclude-renovate": { type: "boolean" },
27
28
  "exclude-tests": { type: "boolean" },
28
29
  funding: { type: "string" },
30
+ keywords: { multiple: true, type: "string" },
29
31
  logo: { type: "string" },
30
32
  "logo-alt": { type: "string" },
33
+ mode: { type: "string" },
34
+ offline: { type: "boolean" },
31
35
  owner: { type: "string" },
32
36
  repository: { type: "string" },
37
+ "skip-all-contributors-api": { type: "boolean" },
33
38
  "skip-github-api": { type: "boolean" },
34
39
  "skip-install": { type: "boolean" },
35
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\"email-github\": { type: \"string\" },\n\t\"email-npm\": { type: \"string\" },\n\t\"exclude-compliance\": { type: \"boolean\" },\n\t\"exclude-contributors\": { 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\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,gBAAgB,EAAE,MAAM,SAAS;AAAA,EACjC,aAAa,EAAE,MAAM,SAAS;AAAA,EAC9B,sBAAsB,EAAE,MAAM,UAAU;AAAA,EACxC,wBAAwB,EAAE,MAAM,UAAU;AAAA,EAC1C,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,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,QAA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S,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,15 +2,15 @@ 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."
13
- },
14
14
  excludeLintDeprecation: {
15
15
  hint: "--exclude-lint-deprecation",
16
16
  label: "Include an eslint-plugin-deprecation to reports on usage of code marked as @deprecated.",
@@ -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\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<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":"AAAA,YAAY,aAAa;AACzB,OAAO,WAAW;AAElB,SAAS,0BAA0B;AAWnC,MAAM,wBAAoE;AAAA,EACzE,mBAAmB;AAAA,IAClB,MAAM;AAAA,IACN,OACC;AAAA,IACD,UAAU;AAAA,EACX;AAAA,EACA,qBAAqB;AAAA,IACpB,MAAM;AAAA,IACN,OACC;AAAA,EACF;AAAA,EACA,wBAAwB;AAAA,IACvB,MAAM;AAAA,IAC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KAAK;AACJ,YAAM,uBAAuB,IAAI;AAAA,QAChC;AAAA,UACC,MAAM,QAAQ,YAAY;AAAA,YACzB,eAAe;AAAA,YACf,SACC;AAAA,YACD,SAAS,OAAO,QAAQ,qBAAqB,EAAE;AAAA,cAC9C,CAAC,CAAC,OAAO,EAAE,MAAM,MAAM,CAAC,OAAO;AAAA,gBAC9B;AAAA,gBACA;AAAA,gBACA;AAAA,cACD;AAAA,YACD;AAAA,UACD,CAAC;AAAA,QACF;AAAA,MACD;AAEA,aAAO;AAAA,QACN,GAAG;AAAA,QACH,GAAG,OAAO;AAAA,UACT,cAAc;AAAA,YACb,CAAC,iBACA,CAAC,cAAc,CAAC,qBAAqB,IAAI,YAAY,CAAC;AAAA,UACxD;AAAA,QACD;AAAA,MACD;AAAA,EACF;AACD;AAEA,SAAS,UAAU,OAAe,SAAiB;AAClD,SAAO,CAAC,MAAM,KAAK,KAAK,GAAG,OAAO,EAAE,KAAK,IAAK;AAC/C;","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":"AAAA,YAAY,aAAa;AACzB,OAAO,WAAW;AAElB,SAAS,0BAA0B;AAWnC,MAAM,wBAAoE;AAAA,EACzE,wBAAwB;AAAA,IACvB,MAAM;AAAA,IACN,OACC;AAAA,EACF;AAAA,EACA,mBAAmB;AAAA,IAClB,MAAM;AAAA,IACN,OACC;AAAA,IACD,UAAU;AAAA,EACX;AAAA,EACA,wBAAwB;AAAA,IACvB,MAAM;AAAA,IACN,OACC;AAAA,IACD,UAAU;AAAA,EACX;AAAA,EACA,mBAAmB;AAAA,IAClB,MAAM;AAAA,IACN,OACC;AAAA,IACD,UAAU;AAAA,EACX;AAAA,EACA,kBAAkB;AAAA,IACjB,MAAM;AAAA,IACN,OACC;AAAA,IACD,UAAU;AAAA,EACX;AAAA,EACA,iBAAiB;AAAA,IAChB,MAAM;AAAA,IACN,OAAO;AAAA,IACP,UAAU;AAAA,EACX;AAAA,EACA,iBAAiB;AAAA,IAChB,MAAM;AAAA,IACN,OAAO;AAAA,EACR;AAAA,EACA,eAAe;AAAA,IACd,MAAM;AAA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