create-typescript-app 1.67.3 → 1.67.4

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.
@@ -3,6 +3,7 @@ import { withSpinner, withSpinners } from "../shared/cli/spinners.js";
3
3
  import { createCleanupCommands } from "../shared/createCleanupCommands.js";
4
4
  import { doesRepositoryExist } from "../shared/doesRepositoryExist.js";
5
5
  import { addToolAllContributors } from "../steps/addToolAllContributors.js";
6
+ import { clearLocalGitTags } from "../steps/clearLocalGitTags.js";
6
7
  import { finalizeDependencies } from "../steps/finalizeDependencies.js";
7
8
  import { initializeGitHubRepository } from "../steps/initializeGitHubRepository/index.js";
8
9
  import { populateCSpellDictionary } from "../steps/populateCSpellDictionary.js";
@@ -40,8 +41,9 @@ async function createWithOptions({ github, options }) {
40
41
  populateCSpellDictionary
41
42
  );
42
43
  }
43
- await runCleanup(createCleanupCommands(options), options.mode);
44
+ await runCleanup(createCleanupCommands(options.bin), options.mode);
44
45
  }
46
+ await withSpinner("Clearing any local Git tags", clearLocalGitTags);
45
47
  const sendToGitHub = github && await doesRepositoryExist(github.octokit, options);
46
48
  if (sendToGitHub) {
47
49
  await withSpinner("Initializing GitHub repository", async () => {
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/create/createWithOptions.ts"],"sourcesContent":["import { $ } from \"execa\";\n\nimport { withSpinner, withSpinners } from \"../shared/cli/spinners.js\";\nimport { createCleanupCommands } from \"../shared/createCleanupCommands.js\";\nimport { doesRepositoryExist } from \"../shared/doesRepositoryExist.js\";\nimport { GitHubAndOptions } from \"../shared/options/readOptions.js\";\nimport { addToolAllContributors } from \"../steps/addToolAllContributors.js\";\nimport { finalizeDependencies } from \"../steps/finalizeDependencies.js\";\nimport { initializeGitHubRepository } from \"../steps/initializeGitHubRepository/index.js\";\nimport { populateCSpellDictionary } from \"../steps/populateCSpellDictionary.js\";\nimport { runCleanup } from \"../steps/runCleanup.js\";\nimport { writeReadme } from \"../steps/writeReadme/index.js\";\nimport { writeStructure } from \"../steps/writing/writeStructure.js\";\n\nexport async function createWithOptions({ github, options }: GitHubAndOptions) {\n\tawait withSpinners(\"Creating repository structure\", [\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]);\n\n\tif (!options.excludeAllContributors && !options.skipAllContributorsApi) {\n\t\tawait withSpinner(\"Adding contributors to table\", async () => {\n\t\t\tawait addToolAllContributors(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\n\t\tif (!options.excludeLintSpelling) {\n\t\t\tawait withSpinner(\n\t\t\t\t\"Populating CSpell dictionary\",\n\t\t\t\tpopulateCSpellDictionary,\n\t\t\t);\n\t\t}\n\n\t\tawait runCleanup(createCleanupCommands(options), options.mode);\n\t}\n\n\tconst sendToGitHub =\n\t\tgithub && (await doesRepositoryExist(github.octokit, options));\n\n\tif (sendToGitHub) {\n\t\tawait withSpinner(\"Initializing GitHub repository\", async () => {\n\t\t\tawait $`git remote add origin https://github.com/${options.owner}/${options.repository}`;\n\t\t\tawait $`git add -A`;\n\t\t\tawait $`git commit --message ${\"feat: initialized repo ✨\"}`;\n\t\t\tawait $`git push -u origin main --force`;\n\t\t\tawait initializeGitHubRepository(github.octokit, options);\n\t\t});\n\t}\n\n\treturn { sentToGitHub: sendToGitHub };\n}\n"],"mappings":"AAAA,SAAS,SAAS;AAElB,SAAS,aAAa,oBAAoB;AAC1C,SAAS,6BAA6B;AACtC,SAAS,2BAA2B;AAEpC,SAAS,8BAA8B;AACvC,SAAS,4BAA4B;AACrC,SAAS,kCAAkC;AAC3C,SAAS,gCAAgC;AACzC,SAAS,kBAAkB;AAC3B,SAAS,mBAAmB;AAC5B,SAAS,sBAAsB;AAE/B,eAAsB,kBAAkB,EAAE,QAAQ,QAAQ,GAAqB;AAC9E,QAAM,aAAa,iCAAiC;AAAA,IACnD;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,EACD,CAAC;AAED,MAAI,CAAC,QAAQ,0BAA0B,CAAC,QAAQ,wBAAwB;AACvE,UAAM,YAAY,gCAAgC,YAAY;AAC7D,YAAM,uBAAuB,OAAO;AAAA,IACrC,CAAC;AAAA,EACF;AAEA,MAAI,CAAC,QAAQ,aAAa;AACzB,UAAM;AAAA,MAAY;AAAA,MAAuB,YACxC,qBAAqB,OAAO;AAAA,IAC7B;AAEA,QAAI,CAAC,QAAQ,qBAAqB;AACjC,YAAM;AAAA,QACL;AAAA,QACA;AAAA,MACD;AAAA,IACD;AAEA,UAAM,WAAW,sBAAsB,OAAO,GAAG,QAAQ,IAAI;AAAA,EAC9D;AAEA,QAAM,eACL,UAAW,MAAM,oBAAoB,OAAO,SAAS,OAAO;AAE7D,MAAI,cAAc;AACjB,UAAM,YAAY,kCAAkC,YAAY;AAC/D,YAAM,6CAA6C,QAAQ,KAAK,IAAI,QAAQ,UAAU;AACtF,YAAM;AACN,YAAM,yBAAyB,+BAA0B;AACzD,YAAM;AACN,YAAM,2BAA2B,OAAO,SAAS,OAAO;AAAA,IACzD,CAAC;AAAA,EACF;AAEA,SAAO,EAAE,cAAc,aAAa;AACrC;","names":[]}
1
+ {"version":3,"sources":["../../src/create/createWithOptions.ts"],"sourcesContent":["import { $ } from \"execa\";\n\nimport { withSpinner, withSpinners } from \"../shared/cli/spinners.js\";\nimport { createCleanupCommands } from \"../shared/createCleanupCommands.js\";\nimport { doesRepositoryExist } from \"../shared/doesRepositoryExist.js\";\nimport { GitHubAndOptions } from \"../shared/options/readOptions.js\";\nimport { addToolAllContributors } from \"../steps/addToolAllContributors.js\";\nimport { clearLocalGitTags } from \"../steps/clearLocalGitTags.js\";\nimport { finalizeDependencies } from \"../steps/finalizeDependencies.js\";\nimport { initializeGitHubRepository } from \"../steps/initializeGitHubRepository/index.js\";\nimport { populateCSpellDictionary } from \"../steps/populateCSpellDictionary.js\";\nimport { runCleanup } from \"../steps/runCleanup.js\";\nimport { writeReadme } from \"../steps/writeReadme/index.js\";\nimport { writeStructure } from \"../steps/writing/writeStructure.js\";\n\nexport async function createWithOptions({ github, options }: GitHubAndOptions) {\n\tawait withSpinners(\"Creating repository structure\", [\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]);\n\n\tif (!options.excludeAllContributors && !options.skipAllContributorsApi) {\n\t\tawait withSpinner(\"Adding contributors to table\", async () => {\n\t\t\tawait addToolAllContributors(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\n\t\tif (!options.excludeLintSpelling) {\n\t\t\tawait withSpinner(\n\t\t\t\t\"Populating CSpell dictionary\",\n\t\t\t\tpopulateCSpellDictionary,\n\t\t\t);\n\t\t}\n\n\t\tawait runCleanup(createCleanupCommands(options.bin), options.mode);\n\t}\n\n\tawait withSpinner(\"Clearing any local Git tags\", clearLocalGitTags);\n\n\tconst sendToGitHub =\n\t\tgithub && (await doesRepositoryExist(github.octokit, options));\n\n\tif (sendToGitHub) {\n\t\tawait withSpinner(\"Initializing GitHub repository\", async () => {\n\t\t\tawait $`git remote add origin https://github.com/${options.owner}/${options.repository}`;\n\t\t\tawait $`git add -A`;\n\t\t\tawait $`git commit --message ${\"feat: initialized repo ✨\"}`;\n\t\t\tawait $`git push -u origin main --force`;\n\t\t\tawait initializeGitHubRepository(github.octokit, options);\n\t\t});\n\t}\n\n\treturn { sentToGitHub: sendToGitHub };\n}\n"],"mappings":"AAAA,SAAS,SAAS;AAElB,SAAS,aAAa,oBAAoB;AAC1C,SAAS,6BAA6B;AACtC,SAAS,2BAA2B;AAEpC,SAAS,8BAA8B;AACvC,SAAS,yBAAyB;AAClC,SAAS,4BAA4B;AACrC,SAAS,kCAAkC;AAC3C,SAAS,gCAAgC;AACzC,SAAS,kBAAkB;AAC3B,SAAS,mBAAmB;AAC5B,SAAS,sBAAsB;AAE/B,eAAsB,kBAAkB,EAAE,QAAQ,QAAQ,GAAqB;AAC9E,QAAM,aAAa,iCAAiC;AAAA,IACnD;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,EACD,CAAC;AAED,MAAI,CAAC,QAAQ,0BAA0B,CAAC,QAAQ,wBAAwB;AACvE,UAAM,YAAY,gCAAgC,YAAY;AAC7D,YAAM,uBAAuB,OAAO;AAAA,IACrC,CAAC;AAAA,EACF;AAEA,MAAI,CAAC,QAAQ,aAAa;AACzB,UAAM;AAAA,MAAY;AAAA,MAAuB,YACxC,qBAAqB,OAAO;AAAA,IAC7B;AAEA,QAAI,CAAC,QAAQ,qBAAqB;AACjC,YAAM;AAAA,QACL;AAAA,QACA;AAAA,MACD;AAAA,IACD;AAEA,UAAM,WAAW,sBAAsB,QAAQ,GAAG,GAAG,QAAQ,IAAI;AAAA,EAClE;AAEA,QAAM,YAAY,+BAA+B,iBAAiB;AAElE,QAAM,eACL,UAAW,MAAM,oBAAoB,OAAO,SAAS,OAAO;AAE7D,MAAI,cAAc;AACjB,UAAM,YAAY,kCAAkC,YAAY;AAC/D,YAAM,6CAA6C,QAAQ,KAAK,IAAI,QAAQ,UAAU;AACtF,YAAM;AACN,YAAM,yBAAyB,+BAA0B;AACzD,YAAM;AACN,YAAM,2BAA2B,OAAO,SAAS,OAAO;AAAA,IACzD,CAAC;AAAA,EACF;AAEA,SAAO,EAAE,cAAc,aAAa;AACrC;","names":[]}
@@ -55,7 +55,10 @@ async function initializeWithOptions({
55
55
  async () => uninstallPackages(options.offline)
56
56
  );
57
57
  }
58
- await runCleanup(createCleanupCommands(options), options.mode);
58
+ await runCleanup(
59
+ createCleanupCommands(options.bin, "pnpm dedupe --offline"),
60
+ options.mode
61
+ );
59
62
  }
60
63
  export {
61
64
  initializeWithOptions
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/initialize/initializeWithOptions.ts"],"sourcesContent":["import { withSpinner, withSpinners } from \"../shared/cli/spinners.js\";\nimport { createCleanupCommands } from \"../shared/createCleanupCommands.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 { runCleanup } from \"../steps/runCleanup.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[\n\t\t\t\"Updating README.md\",\n\t\t\tasync () => {\n\t\t\t\tawait updateReadme(options);\n\t\t\t},\n\t\t],\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 runCleanup(createCleanupCommands(options), options.mode);\n}\n"],"mappings":"AAAA,SAAS,aAAa,oBAAoB;AAC1C,SAAS,6BAA6B;AAEtC,SAAS,gCAAgC;AACzC,SAAS,sBAAsB;AAC/B,SAAS,kCAAkC;AAC3C,SAAS,0BAA0B;AACnC,SAAS,oBAAoB;AAC7B,SAAS,kBAAkB;AAC3B,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;AAAA,MACC;AAAA,MACA,YAAY;AACX,cAAM,aAAa,OAAO;AAAA,MAC3B;AAAA,IACD;AAAA,IACA,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,WAAW,sBAAsB,OAAO,GAAG,QAAQ,IAAI;AAC9D;","names":[]}
1
+ {"version":3,"sources":["../../src/initialize/initializeWithOptions.ts"],"sourcesContent":["import { withSpinner, withSpinners } from \"../shared/cli/spinners.js\";\nimport { createCleanupCommands } from \"../shared/createCleanupCommands.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 { runCleanup } from \"../steps/runCleanup.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[\n\t\t\t\"Updating README.md\",\n\t\t\tasync () => {\n\t\t\t\tawait updateReadme(options);\n\t\t\t},\n\t\t],\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 runCleanup(\n\t\tcreateCleanupCommands(options.bin, \"pnpm dedupe --offline\"),\n\t\toptions.mode,\n\t);\n}\n"],"mappings":"AAAA,SAAS,aAAa,oBAAoB;AAC1C,SAAS,6BAA6B;AAEtC,SAAS,gCAAgC;AACzC,SAAS,sBAAsB;AAC/B,SAAS,kCAAkC;AAC3C,SAAS,0BAA0B;AACnC,SAAS,oBAAoB;AAC7B,SAAS,kBAAkB;AAC3B,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;AAAA,MACC;AAAA,MACA,YAAY;AACX,cAAM,aAAa,OAAO;AAAA,MAC3B;AAAA,IACD;AAAA,IACA,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;AAAA,IACL,sBAAsB,QAAQ,KAAK,uBAAuB;AAAA,IAC1D,QAAQ;AAAA,EACT;AACD;","names":[]}
@@ -61,7 +61,7 @@ async function migrateWithOptions({
61
61
  if (!options.excludeLintSpelling) {
62
62
  await withSpinner("Populating CSpell dictionary", populateCSpellDictionary);
63
63
  }
64
- await runCleanup(createCleanupCommands(options), options.mode);
64
+ await runCleanup(createCleanupCommands(options.bin), options.mode);
65
65
  }
66
66
  export {
67
67
  migrateWithOptions
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/migrate/migrateWithOptions.ts"],"sourcesContent":["import { withSpinner, withSpinners } from \"../shared/cli/spinners.js\";\nimport { createCleanupCommands } from \"../shared/createCleanupCommands.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 { populateCSpellDictionary } from \"../steps/populateCSpellDictionary.js\";\nimport { runCleanup } from \"../steps/runCleanup.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\tif (!options.excludeLintSpelling) {\n\t\tawait withSpinner(\"Populating CSpell dictionary\", populateCSpellDictionary);\n\t}\n\n\tawait runCleanup(createCleanupCommands(options), options.mode);\n}\n"],"mappings":"AAAA,SAAS,aAAa,oBAAoB;AAC1C,SAAS,6BAA6B;AAEtC,SAAS,6BAA6B;AACtC,SAAS,kCAAkC;AAC3C,SAAS,4BAA4B;AACrC,SAAS,kCAAkC;AAC3C,SAAS,gCAAgC;AACzC,SAAS,kBAAkB;AAC3B,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,MAAI,CAAC,QAAQ,qBAAqB;AACjC,UAAM,YAAY,gCAAgC,wBAAwB;AAAA,EAC3E;AAEA,QAAM,WAAW,sBAAsB,OAAO,GAAG,QAAQ,IAAI;AAC9D;","names":[]}
1
+ {"version":3,"sources":["../../src/migrate/migrateWithOptions.ts"],"sourcesContent":["import { withSpinner, withSpinners } from \"../shared/cli/spinners.js\";\nimport { createCleanupCommands } from \"../shared/createCleanupCommands.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 { populateCSpellDictionary } from \"../steps/populateCSpellDictionary.js\";\nimport { runCleanup } from \"../steps/runCleanup.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\tif (!options.excludeLintSpelling) {\n\t\tawait withSpinner(\"Populating CSpell dictionary\", populateCSpellDictionary);\n\t}\n\n\tawait runCleanup(createCleanupCommands(options.bin), options.mode);\n}\n"],"mappings":"AAAA,SAAS,aAAa,oBAAoB;AAC1C,SAAS,6BAA6B;AAEtC,SAAS,6BAA6B;AACtC,SAAS,kCAAkC;AAC3C,SAAS,4BAA4B;AACrC,SAAS,kCAAkC;AAC3C,SAAS,gCAAgC;AACzC,SAAS,kBAAkB;AAC3B,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,MAAI,CAAC,QAAQ,qBAAqB;AACjC,UAAM,YAAY,gCAAgC,wBAAwB;AAAA,EAC3E;AAEA,QAAM,WAAW,sBAAsB,QAAQ,GAAG,GAAG,QAAQ,IAAI;AAClE;","names":[]}
@@ -1,7 +1,3 @@
1
- import { Options } from './types.js';
2
- import 'zod';
3
- import './codes.js';
4
-
5
- declare function createCleanupCommands({ bin, mode, }: Pick<Options, "bin" | "mode">): string[];
1
+ declare function createCleanupCommands(bin: string | undefined, ...prependedCommands: string[]): string[];
6
2
 
7
3
  export { createCleanupCommands };
@@ -1,10 +1,6 @@
1
- function createCleanupCommands({
2
- bin,
3
- mode
4
- }) {
1
+ function createCleanupCommands(bin, ...prependedCommands) {
5
2
  return [
6
- // There's no need to dedupe when initializing from the fixed template
7
- ...mode === "initialize" ? [] : ["pnpm dedupe --offline"],
3
+ ...prependedCommands,
8
4
  // n/no-missing-import rightfully reports on a missing the bin .js file
9
5
  ...bin ? ["pnpm build"] : [],
10
6
  "pnpm lint --fix",
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/shared/createCleanupCommands.ts"],"sourcesContent":["import { Options } from \"./types.js\";\n\nexport function createCleanupCommands({\n\tbin,\n\tmode,\n}: Pick<Options, \"bin\" | \"mode\">) {\n\treturn [\n\t\t// There's no need to dedupe when initializing from the fixed template\n\t\t...(mode === \"initialize\" ? [] : [\"pnpm dedupe --offline\"]),\n\t\t// n/no-missing-import rightfully reports on a missing the bin .js file\n\t\t...(bin ? [\"pnpm build\"] : []),\n\t\t\"pnpm lint --fix\",\n\t\t\"pnpm format --write\",\n\t];\n}\n"],"mappings":"AAEO,SAAS,sBAAsB;AAAA,EACrC;AAAA,EACA;AACD,GAAkC;AACjC,SAAO;AAAA;AAAA,IAEN,GAAI,SAAS,eAAe,CAAC,IAAI,CAAC,uBAAuB;AAAA;AAAA,IAEzD,GAAI,MAAM,CAAC,YAAY,IAAI,CAAC;AAAA,IAC5B;AAAA,IACA;AAAA,EACD;AACD;","names":[]}
1
+ {"version":3,"sources":["../../src/shared/createCleanupCommands.ts"],"sourcesContent":["export function createCleanupCommands(\n\tbin: string | undefined,\n\t...prependedCommands: string[]\n) {\n\treturn [\n\t\t...prependedCommands,\n\t\t// n/no-missing-import rightfully reports on a missing the bin .js file\n\t\t...(bin ? [\"pnpm build\"] : []),\n\t\t\"pnpm lint --fix\",\n\t\t\"pnpm format --write\",\n\t];\n}\n"],"mappings":"AAAO,SAAS,sBACf,QACG,mBACF;AACD,SAAO;AAAA,IACN,GAAG;AAAA;AAAA,IAEH,GAAI,MAAM,CAAC,YAAY,IAAI,CAAC;AAAA,IAC5B;AAAA,IACA;AAAA,EACD;AACD;","names":[]}
@@ -112,26 +112,17 @@ declare const optionsSchema: z.ZodObject<{
112
112
  skipUninstall: z.ZodOptional<z.ZodBoolean>;
113
113
  title: z.ZodOptional<z.ZodString>;
114
114
  }, "strip", z.ZodTypeAny, {
115
- description?: string | undefined;
116
115
  offline?: boolean | undefined;
117
116
  access?: "public" | "restricted" | undefined;
118
117
  author?: string | undefined;
119
- auto?: boolean | undefined;
120
118
  base?: "common" | "everything" | "minimal" | "prompt" | undefined;
121
119
  bin?: string | undefined;
120
+ description?: string | undefined;
122
121
  directory?: string | undefined;
123
122
  email?: {
124
123
  github: string;
125
124
  npm: string;
126
125
  } | undefined;
127
- funding?: string | undefined;
128
- guide?: string | undefined;
129
- keywords?: string[] | undefined;
130
- logo?: string | undefined;
131
- mode?: "create" | "initialize" | "migrate" | undefined;
132
- owner?: string | undefined;
133
- repository?: string | undefined;
134
- title?: string | undefined;
135
126
  excludeAllContributors?: boolean | undefined;
136
127
  excludeBuild?: boolean | undefined;
137
128
  excludeCompliance?: boolean | undefined;
@@ -151,36 +142,36 @@ declare const optionsSchema: z.ZodObject<{
151
142
  excludeReleases?: boolean | undefined;
152
143
  excludeRenovate?: boolean | undefined;
153
144
  excludeTests?: boolean | undefined;
145
+ funding?: string | undefined;
146
+ guide?: string | undefined;
147
+ keywords?: string[] | undefined;
148
+ logo?: string | undefined;
149
+ mode?: "create" | "initialize" | "migrate" | undefined;
150
+ owner?: string | undefined;
154
151
  preserveGeneratedFrom?: boolean | undefined;
152
+ repository?: string | undefined;
155
153
  skipAllContributorsApi?: boolean | undefined;
156
154
  skipGitHubApi?: boolean | undefined;
157
155
  skipInstall?: boolean | undefined;
158
156
  skipRemoval?: boolean | undefined;
159
157
  skipRestore?: boolean | undefined;
160
158
  skipUninstall?: boolean | undefined;
159
+ title?: string | undefined;
161
160
  guideTitle?: string | undefined;
162
161
  logoAlt?: string | undefined;
162
+ auto?: boolean | undefined;
163
163
  }, {
164
- description?: string | undefined;
165
164
  offline?: boolean | undefined;
166
165
  access?: "public" | "restricted" | undefined;
167
166
  author?: string | undefined;
168
- auto?: boolean | undefined;
169
167
  base?: "common" | "everything" | "minimal" | "prompt" | undefined;
170
168
  bin?: string | undefined;
169
+ description?: string | undefined;
171
170
  directory?: string | undefined;
172
171
  email?: {
173
172
  github: string;
174
173
  npm: string;
175
174
  } | undefined;
176
- funding?: string | undefined;
177
- guide?: string | undefined;
178
- keywords?: string[] | undefined;
179
- logo?: string | undefined;
180
- mode?: "create" | "initialize" | "migrate" | undefined;
181
- owner?: string | undefined;
182
- repository?: string | undefined;
183
- title?: string | undefined;
184
175
  excludeAllContributors?: boolean | undefined;
185
176
  excludeBuild?: boolean | undefined;
186
177
  excludeCompliance?: boolean | undefined;
@@ -200,15 +191,24 @@ declare const optionsSchema: z.ZodObject<{
200
191
  excludeReleases?: boolean | undefined;
201
192
  excludeRenovate?: boolean | undefined;
202
193
  excludeTests?: boolean | undefined;
194
+ funding?: string | undefined;
195
+ guide?: string | undefined;
196
+ keywords?: string[] | undefined;
197
+ logo?: string | undefined;
198
+ mode?: "create" | "initialize" | "migrate" | undefined;
199
+ owner?: string | undefined;
203
200
  preserveGeneratedFrom?: boolean | undefined;
201
+ repository?: string | undefined;
204
202
  skipAllContributorsApi?: boolean | undefined;
205
203
  skipGitHubApi?: boolean | undefined;
206
204
  skipInstall?: boolean | undefined;
207
205
  skipRemoval?: boolean | undefined;
208
206
  skipRestore?: boolean | undefined;
209
207
  skipUninstall?: boolean | undefined;
208
+ title?: string | undefined;
210
209
  guideTitle?: string | undefined;
211
210
  logoAlt?: string | undefined;
211
+ auto?: boolean | undefined;
212
212
  }>;
213
213
 
214
214
  export { optionsSchema, optionsSchemaShape };
@@ -2,6 +2,6 @@ interface RunOrRestoreOptions {
2
2
  run: () => Promise<void>;
3
3
  skipRestore: boolean | undefined;
4
4
  }
5
- declare function runOrRestore({ run, skipRestore }: RunOrRestoreOptions): Promise<0 | 2>;
5
+ declare function runOrRestore({ run, skipRestore }: RunOrRestoreOptions): Promise<2 | 0>;
6
6
 
7
7
  export { type RunOrRestoreOptions, runOrRestore };
@@ -0,0 +1,3 @@
1
+ declare function clearLocalGitTags(): Promise<void>;
2
+
3
+ export { clearLocalGitTags };
@@ -0,0 +1,9 @@
1
+ import { execaCommand } from "execa";
2
+ async function clearLocalGitTags() {
3
+ const tags = await execaCommand("git tag -l");
4
+ await execaCommand(`git tag -d ${tags.stdout.replaceAll("\n", " ")}`);
5
+ }
6
+ export {
7
+ clearLocalGitTags
8
+ };
9
+ //# sourceMappingURL=clearLocalGitTags.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/steps/clearLocalGitTags.ts"],"sourcesContent":["import { execaCommand } from \"execa\";\n\nexport async function clearLocalGitTags() {\n\tconst tags = await execaCommand(\"git tag -l\");\n\n\tawait execaCommand(`git tag -d ${tags.stdout.replaceAll(\"\\n\", \" \")}`);\n}\n"],"mappings":"AAAA,SAAS,oBAAoB;AAE7B,eAAsB,oBAAoB;AACzC,QAAM,OAAO,MAAM,aAAa,YAAY;AAE5C,QAAM,aAAa,cAAc,KAAK,OAAO,WAAW,MAAM,GAAG,CAAC,EAAE;AACrE;","names":[]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-typescript-app",
3
- "version": "1.67.3",
3
+ "version": "1.67.4",
4
4
  "description": "Quickstart-friendly TypeScript template with comprehensive, configurable, opinionated tooling. 💝",
5
5
  "repository": {
6
6
  "type": "git",