create-typescript-app 1.67.3 → 1.67.5
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.
- package/lib/create/createWithOptions.js +4 -2
- package/lib/create/createWithOptions.js.map +1 -1
- package/lib/initialize/initializeWithOptions.js +4 -1
- package/lib/initialize/initializeWithOptions.js.map +1 -1
- package/lib/migrate/migrateWithOptions.js +1 -1
- package/lib/migrate/migrateWithOptions.js.map +1 -1
- package/lib/shared/createCleanupCommands.d.ts +1 -5
- package/lib/shared/createCleanupCommands.js +2 -6
- package/lib/shared/createCleanupCommands.js.map +1 -1
- package/lib/steps/clearLocalGitTags.d.ts +3 -0
- package/lib/steps/clearLocalGitTags.js +9 -0
- package/lib/steps/clearLocalGitTags.js.map +1 -0
- package/package.json +1 -1
|
@@ -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,14 +41,15 @@ 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 () => {
|
|
48
50
|
await $`git remote add origin https://github.com/${options.owner}/${options.repository}`;
|
|
49
51
|
await $`git add -A`;
|
|
50
|
-
await $`git commit --message ${"feat: initialized repo \u2728"}`;
|
|
52
|
+
await $`git commit --message ${"feat: initialized repo \u2728"} --no-gpg-sign`;
|
|
51
53
|
await $`git push -u origin main --force`;
|
|
52
54
|
await initializeGitHubRepository(github.octokit, options);
|
|
53
55
|
});
|
|
@@ -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,
|
|
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 ✨\"} --no-gpg-sign`;\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(
|
|
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(
|
|
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,
|
|
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
|
-
|
|
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
|
-
|
|
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":["
|
|
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":[]}
|
|
@@ -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":[]}
|