create-typescript-app 1.78.0 → 1.80.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.
- package/README.md +49 -49
- package/lib/create/createAndEnterGitDirectory.d.ts +1 -1
- package/lib/create/createAndEnterGitDirectory.js +4 -3
- package/lib/create/createAndEnterGitDirectory.js.map +1 -1
- package/lib/create/createRerunDirectorySuggestion.d.ts +7 -0
- package/lib/create/createRerunDirectorySuggestion.js +8 -0
- package/lib/create/createRerunDirectorySuggestion.js.map +1 -0
- package/lib/create/createRerunSuggestion.js +3 -1
- package/lib/create/createRerunSuggestion.js.map +1 -1
- package/lib/create/createWithOptions.d.ts +1 -1
- package/lib/create/createWithOptions.js +7 -8
- package/lib/create/createWithOptions.js.map +1 -1
- package/lib/create/index.js +8 -2
- package/lib/create/index.js.map +1 -1
- package/lib/index.d.ts +3 -0
- package/lib/index.js +1 -0
- package/lib/index.js.map +1 -1
- package/lib/next/base.d.ts +7 -2
- package/lib/next/base.js +42 -29
- package/lib/next/base.js.map +1 -1
- package/lib/next/blocks/blockAllContributors.d.ts +3 -2
- package/lib/next/blocks/blockAllContributors.js +11 -2
- package/lib/next/blocks/blockAllContributors.js.map +1 -1
- package/lib/next/blocks/blockAreTheTypesWrong.d.ts +3 -2
- package/lib/next/blocks/blockCSpell.d.ts +3 -2
- package/lib/next/blocks/blockCSpell.js +16 -0
- package/lib/next/blocks/blockCSpell.js.map +1 -1
- package/lib/next/blocks/blockContributingDocs.d.ts +3 -2
- package/lib/next/blocks/blockContributorCovenant.d.ts +3 -2
- package/lib/next/blocks/blockDevelopmentDocs.d.ts +3 -2
- package/lib/next/blocks/blockESLint.d.ts +3 -2
- package/lib/next/blocks/blockESLintComments.d.ts +3 -2
- package/lib/next/blocks/blockESLintJSDoc.d.ts +3 -2
- package/lib/next/blocks/blockESLintJSONC.d.ts +3 -2
- package/lib/next/blocks/blockESLintMarkdown.d.ts +3 -2
- package/lib/next/blocks/blockESLintMoreStyling.d.ts +3 -2
- package/lib/next/blocks/blockESLintNode.d.ts +3 -2
- package/lib/next/blocks/blockESLintPackageJson.d.ts +3 -2
- package/lib/next/blocks/blockESLintPerfectionist.d.ts +3 -2
- package/lib/next/blocks/blockESLintRegexp.d.ts +3 -2
- package/lib/next/blocks/blockESLintYML.d.ts +3 -2
- package/lib/next/blocks/blockExampleFiles.d.ts +3 -2
- package/lib/next/blocks/blockFunding.d.ts +3 -2
- package/lib/next/blocks/blockGitHubActionsCI.d.ts +3 -2
- package/lib/next/blocks/blockGitHubApps.d.ts +54 -0
- package/lib/next/blocks/blockGitHubApps.js +34 -0
- package/lib/next/blocks/blockGitHubApps.js.map +1 -0
- package/lib/next/blocks/blockGitHubIssueTemplates.d.ts +3 -2
- package/lib/next/blocks/blockGitHubPRTemplate.d.ts +3 -2
- package/lib/next/blocks/blockGitignore.d.ts +3 -2
- package/lib/next/blocks/blockKnip.d.ts +3 -2
- package/lib/next/blocks/blockKnip.js +2 -2
- package/lib/next/blocks/blockKnip.js.map +1 -1
- package/lib/next/blocks/blockMITLicense.d.ts +3 -2
- package/lib/next/blocks/blockMarkdownlint.d.ts +3 -2
- package/lib/next/blocks/blockNvmrc.d.ts +3 -2
- package/lib/next/blocks/blockPRCompliance.d.ts +3 -2
- package/lib/next/blocks/blockPackageJson.d.ts +3 -2
- package/lib/next/blocks/blockPackageJson.js +46 -41
- package/lib/next/blocks/blockPackageJson.js.map +1 -1
- package/lib/next/blocks/blockPnpmDedupe.d.ts +3 -2
- package/lib/next/blocks/blockPrettier.d.ts +3 -2
- package/lib/next/blocks/blockPrettierPluginCurly.d.ts +3 -2
- package/lib/next/blocks/blockPrettierPluginPackageJson.d.ts +3 -2
- package/lib/next/blocks/blockPrettierPluginSh.d.ts +3 -2
- package/lib/next/blocks/blockREADME.d.ts +3 -2
- package/lib/next/blocks/blockREADME.js +5 -1
- package/lib/next/blocks/blockREADME.js.map +1 -1
- package/lib/next/blocks/blockReleaseIt.d.ts +3 -2
- package/lib/next/blocks/blockReleaseIt.js +13 -0
- package/lib/next/blocks/blockReleaseIt.js.map +1 -1
- package/lib/next/blocks/blockRenovate.d.ts +3 -2
- package/lib/next/blocks/blockRenovate.js +9 -0
- package/lib/next/blocks/blockRenovate.js.map +1 -1
- package/lib/next/blocks/blockRepositoryBranchRuleset.d.ts +3 -2
- package/lib/next/blocks/blockRepositoryBranchRuleset.js +9 -0
- package/lib/next/blocks/blockRepositoryBranchRuleset.js.map +1 -1
- package/lib/next/blocks/blockRepositoryLabels.d.ts +3 -2
- package/lib/next/blocks/blockRepositoryLabels.js +12 -2
- package/lib/next/blocks/blockRepositoryLabels.js.map +1 -1
- package/lib/next/blocks/blockRepositorySecrets.d.ts +54 -0
- package/lib/next/blocks/blockRepositorySecrets.js +34 -0
- package/lib/next/blocks/blockRepositorySecrets.js.map +1 -0
- package/lib/next/blocks/blockRepositorySettings.d.ts +3 -2
- package/lib/next/blocks/blockRepositorySettings.js +1 -1
- package/lib/next/blocks/blockRepositorySettings.js.map +1 -1
- package/lib/next/blocks/blockSecurityDocs.d.ts +3 -2
- package/lib/next/blocks/blockTSup.d.ts +3 -2
- package/lib/next/blocks/blockTemplatedBy.d.ts +3 -2
- package/lib/next/blocks/blockTypeScript.d.ts +3 -2
- package/lib/next/blocks/blockVSCode.d.ts +3 -2
- package/lib/next/blocks/blockVitest.d.ts +3 -2
- package/lib/next/blocks/blockVitest.js +26 -17
- package/lib/next/blocks/blockVitest.js.map +1 -1
- package/lib/next/blocks/options.fakes.d.ts +1 -0
- package/lib/next/blocks/options.fakes.js +1 -0
- package/lib/next/blocks/options.fakes.js.map +1 -1
- package/lib/next/blocks/packageData.d.ts +3 -2
- package/lib/next/blocks/packageData.js +22 -21
- package/lib/next/blocks/packageData.js.map +1 -1
- package/lib/next/blocks/sourcePackageJson.d.ts +162 -0
- package/lib/next/blocks/sourcePackageJson.js +10 -0
- package/lib/next/blocks/sourcePackageJson.js.map +1 -0
- package/lib/next/presets/index.d.ts +5 -0
- package/lib/next/presets/index.js +4 -0
- package/lib/next/presets/index.js.map +1 -0
- package/lib/next/{presetCommon.d.ts → presets/presetCommon.d.ts} +7 -2
- package/lib/next/{presetCommon.js → presets/presetCommon.js} +4 -4
- package/lib/next/presets/presetCommon.js.map +1 -0
- package/lib/next/{presetEverything.d.ts → presets/presetEverything.d.ts} +7 -2
- package/lib/next/presets/presetEverything.js +59 -0
- package/lib/next/presets/presetEverything.js.map +1 -0
- package/lib/next/{presetMinimal.d.ts → presets/presetMinimal.d.ts} +7 -2
- package/lib/next/presets/presetMinimal.js +57 -0
- package/lib/next/presets/presetMinimal.js.map +1 -0
- package/lib/next/readDescription.d.ts +7 -0
- package/lib/next/readDescription.js +10 -0
- package/lib/next/readDescription.js.map +1 -0
- package/lib/next/readDocumentation.d.ts +5 -0
- package/lib/next/readDocumentation.js +28 -0
- package/lib/next/readDocumentation.js.map +1 -0
- package/lib/next/runCreateEnginePreset.js +3 -3
- package/lib/next/runCreateEnginePreset.js.map +1 -1
- package/lib/next/template.d.ts +8 -3
- package/lib/next/template.js +5 -9
- package/lib/next/template.js.map +1 -1
- package/lib/next/utils/resolveBin.d.ts +3 -0
- package/lib/next/utils/resolveBin.js +7 -0
- package/lib/next/utils/resolveBin.js.map +1 -0
- package/lib/shared/getGitHubUserAsAllContributor.js +1 -1
- package/lib/shared/getGitHubUserAsAllContributor.js.map +1 -1
- package/lib/shared/options/args.d.ts +14 -2
- package/lib/shared/options/args.js +18 -2
- package/lib/shared/options/args.js.map +1 -1
- package/lib/shared/options/createOptionDefaults/index.d.ts +2 -0
- package/lib/shared/options/createOptionDefaults/index.js +2 -1
- package/lib/shared/options/createOptionDefaults/index.js.map +1 -1
- package/lib/shared/options/createOptionDefaults/readDefaultsFromReadme.d.ts +2 -0
- package/lib/shared/options/createOptionDefaults/readDefaultsFromReadme.js +3 -1
- package/lib/shared/options/createOptionDefaults/readDefaultsFromReadme.js.map +1 -1
- package/lib/shared/options/exclusionKeys.js +3 -3
- package/lib/shared/options/exclusionKeys.js.map +1 -1
- package/lib/shared/options/logInferredOptions.js +6 -0
- package/lib/shared/options/logInferredOptions.js.map +1 -1
- package/lib/shared/options/optionsSchema.d.ts +4 -4
- package/lib/shared/options/optionsSchema.js +1 -1
- package/lib/shared/options/optionsSchema.js.map +1 -1
- package/lib/shared/options/readLogoSizing.d.ts +7 -0
- package/lib/shared/options/readLogoSizing.js +29 -0
- package/lib/shared/options/readLogoSizing.js.map +1 -0
- package/lib/shared/options/readOptions.js +4 -2
- package/lib/shared/options/readOptions.js.map +1 -1
- package/lib/shared/packages.js +1 -3
- package/lib/shared/packages.js.map +1 -1
- package/lib/shared/types.d.ts +3 -1
- package/lib/steps/addToolAllContributors.js +1 -1
- package/lib/steps/addToolAllContributors.js.map +1 -1
- package/lib/steps/finalizeDependencies.js +1 -1
- package/lib/steps/finalizeDependencies.js.map +1 -1
- package/lib/steps/initializeGitHubRepository/initializeBranchProtectionSettings.js +9 -0
- package/lib/steps/initializeGitHubRepository/initializeBranchProtectionSettings.js.map +1 -1
- package/lib/steps/uninstallPackages.js +5 -0
- package/lib/steps/uninstallPackages.js.map +1 -1
- package/lib/steps/updateAllContributorsTable.js +1 -1
- package/lib/steps/updateAllContributorsTable.js.map +1 -1
- package/lib/steps/updateReadme.js +1 -1
- package/lib/steps/updateReadme.js.map +1 -1
- package/lib/steps/writing/creation/createESLintConfig.js +2 -2
- package/lib/steps/writing/creation/createESLintConfig.js.map +1 -1
- package/lib/steps/writing/creation/createKnipConfig.d.ts +3 -0
- package/lib/steps/writing/creation/createKnipConfig.js +20 -0
- package/lib/steps/writing/creation/createKnipConfig.js.map +1 -0
- package/lib/steps/writing/creation/index.d.ts +2 -1
- package/lib/steps/writing/creation/index.js +24 -11
- package/lib/steps/writing/creation/index.js.map +1 -1
- package/lib/steps/writing/creation/rootFiles.js +2 -9
- package/lib/steps/writing/creation/rootFiles.js.map +1 -1
- package/package.json +18 -13
- package/lib/next/presetCommon.js.map +0 -1
- package/lib/next/presetEverything.js +0 -59
- package/lib/next/presetEverything.js.map +0 -1
- package/lib/next/presetMinimal.js +0 -53
- package/lib/next/presetMinimal.js.map +0 -1
package/lib/shared/types.d.ts
CHANGED
|
@@ -23,7 +23,9 @@ interface OptionsGuide {
|
|
|
23
23
|
}
|
|
24
24
|
interface OptionsLogo {
|
|
25
25
|
alt: string;
|
|
26
|
+
height?: number;
|
|
26
27
|
src: string;
|
|
28
|
+
width?: number;
|
|
27
29
|
}
|
|
28
30
|
interface PartialPackageData {
|
|
29
31
|
author?: string | {
|
|
@@ -68,7 +70,7 @@ interface Options {
|
|
|
68
70
|
excludeLintPackageJson?: boolean;
|
|
69
71
|
excludeLintPackages?: boolean;
|
|
70
72
|
excludeLintPerfectionist?: boolean;
|
|
71
|
-
|
|
73
|
+
excludeLintRegexp?: boolean;
|
|
72
74
|
excludeLintSpelling?: boolean;
|
|
73
75
|
excludeLintStrict?: boolean;
|
|
74
76
|
excludeLintStylistic?: boolean;
|
|
@@ -3,7 +3,7 @@ import { getGitHubUserAsAllContributor } from "../shared/getGitHubUserAsAllContr
|
|
|
3
3
|
async function addToolAllContributors(octokit, options) {
|
|
4
4
|
const login = await getGitHubUserAsAllContributor(octokit, options);
|
|
5
5
|
if (login !== "JoshuaKGoldberg") {
|
|
6
|
-
await $`
|
|
6
|
+
await $`pnpx all-contributors-cli add JoshuaKGoldberg tool`;
|
|
7
7
|
}
|
|
8
8
|
}
|
|
9
9
|
export {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/steps/addToolAllContributors.ts"],"sourcesContent":["import { $ } from \"execa\";\nimport { Octokit } from \"octokit\";\n\nimport { getGitHubUserAsAllContributor } from \"../shared/getGitHubUserAsAllContributor.js\";\nimport { Options } from \"../shared/types.js\";\n\nexport async function addToolAllContributors(\n\toctokit: Octokit | undefined,\n\toptions: Pick<Options, \"offline\" | \"owner\">,\n) {\n\tconst login = await getGitHubUserAsAllContributor(octokit, options);\n\n\tif (login !== \"JoshuaKGoldberg\") {\n\t\tawait $`
|
|
1
|
+
{"version":3,"sources":["../../src/steps/addToolAllContributors.ts"],"sourcesContent":["import { $ } from \"execa\";\nimport { Octokit } from \"octokit\";\n\nimport { getGitHubUserAsAllContributor } from \"../shared/getGitHubUserAsAllContributor.js\";\nimport { Options } from \"../shared/types.js\";\n\nexport async function addToolAllContributors(\n\toctokit: Octokit | undefined,\n\toptions: Pick<Options, \"offline\" | \"owner\">,\n) {\n\tconst login = await getGitHubUserAsAllContributor(octokit, options);\n\n\tif (login !== \"JoshuaKGoldberg\") {\n\t\tawait $`pnpx all-contributors-cli add JoshuaKGoldberg tool`;\n\t}\n}\n"],"mappings":"AAAA,SAAS,SAAS;AAGlB,SAAS,qCAAqC;AAG9C,eAAsB,uBACrB,SACA,SACC;AACD,QAAM,QAAQ,MAAM,8BAA8B,SAAS,OAAO;AAElE,MAAI,UAAU,mBAAmB;AAChC,UAAM;AAAA,EACP;AACD;","names":[]}
|
|
@@ -29,7 +29,7 @@ async function finalizeDependencies(options) {
|
|
|
29
29
|
],
|
|
30
30
|
...options.excludeLintPackageJson ? [] : ["eslint-plugin-package-json"],
|
|
31
31
|
...options.excludeLintPerfectionist ? [] : ["eslint-plugin-perfectionist"],
|
|
32
|
-
...options.
|
|
32
|
+
...options.excludeLintRegexp ? [] : ["eslint-plugin-regexp"],
|
|
33
33
|
...options.excludeLintSpelling ? [] : ["cspell"],
|
|
34
34
|
...options.excludeLintYml ? [] : ["eslint-plugin-yml"],
|
|
35
35
|
...options.excludeReleases ? [] : ["@release-it/conventional-changelog", "release-it"],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/steps/finalizeDependencies.ts"],"sourcesContent":["import { execaCommand } from \"execa\";\n\nimport { readPackageData, removeDependencies } from \"../shared/packages.js\";\nimport { Options } from \"../shared/types.js\";\n\nexport async function finalizeDependencies(options: Options) {\n\tconst devDependencies = [\n\t\t\"@eslint/js\",\n\t\t\"@types/node\",\n\t\t\"eslint-plugin-n\",\n\t\t\"eslint\",\n\t\t\"husky\",\n\t\t\"lint-staged\",\n\t\t\"prettier-plugin-curly\",\n\t\t\"prettier-plugin-packagejson\",\n\t\t\"prettier-plugin-sh\",\n\t\t\"prettier\",\n\t\t\"tsup\",\n\t\t\"typescript-eslint\",\n\t\t\"typescript\",\n\t\t...(options.excludeAllContributors ? [] : [\"all-contributors-cli\"]),\n\t\t...(options.excludeLintESLint\n\t\t\t? []\n\t\t\t: [\"@eslint-community/eslint-plugin-eslint-comments\"]),\n\t\t...(options.excludeLintJSDoc ? [] : [\"eslint-plugin-jsdoc\"]),\n\t\t...(options.excludeLintJson ? [] : [\"eslint-plugin-jsonc\"]),\n\t\t...(options.excludeLintKnip ? [] : [\"knip\"]),\n\t\t...(options.excludeLintMd\n\t\t\t? []\n\t\t\t: [\n\t\t\t\t\t\"@types/eslint-plugin-markdown\",\n\t\t\t\t\t\"eslint-plugin-markdown\",\n\t\t\t\t\t\"markdownlint\",\n\t\t\t\t\t\"markdownlint-cli\",\n\t\t\t\t\t\"sentences-per-line\",\n\t\t\t\t]),\n\t\t...(options.excludeLintPackageJson ? [] : [\"eslint-plugin-package-json\"]),\n\t\t...(options.excludeLintPerfectionist\n\t\t\t? []\n\t\t\t: [\"eslint-plugin-perfectionist\"]),\n\t\t...(options.
|
|
1
|
+
{"version":3,"sources":["../../src/steps/finalizeDependencies.ts"],"sourcesContent":["import { execaCommand } from \"execa\";\n\nimport { readPackageData, removeDependencies } from \"../shared/packages.js\";\nimport { Options } from \"../shared/types.js\";\n\nexport async function finalizeDependencies(options: Options) {\n\tconst devDependencies = [\n\t\t\"@eslint/js\",\n\t\t\"@types/node\",\n\t\t\"eslint-plugin-n\",\n\t\t\"eslint\",\n\t\t\"husky\",\n\t\t\"lint-staged\",\n\t\t\"prettier-plugin-curly\",\n\t\t\"prettier-plugin-packagejson\",\n\t\t\"prettier-plugin-sh\",\n\t\t\"prettier\",\n\t\t\"tsup\",\n\t\t\"typescript-eslint\",\n\t\t\"typescript\",\n\t\t...(options.excludeAllContributors ? [] : [\"all-contributors-cli\"]),\n\t\t...(options.excludeLintESLint\n\t\t\t? []\n\t\t\t: [\"@eslint-community/eslint-plugin-eslint-comments\"]),\n\t\t...(options.excludeLintJSDoc ? [] : [\"eslint-plugin-jsdoc\"]),\n\t\t...(options.excludeLintJson ? [] : [\"eslint-plugin-jsonc\"]),\n\t\t...(options.excludeLintKnip ? [] : [\"knip\"]),\n\t\t...(options.excludeLintMd\n\t\t\t? []\n\t\t\t: [\n\t\t\t\t\t\"@types/eslint-plugin-markdown\",\n\t\t\t\t\t\"eslint-plugin-markdown\",\n\t\t\t\t\t\"markdownlint\",\n\t\t\t\t\t\"markdownlint-cli\",\n\t\t\t\t\t\"sentences-per-line\",\n\t\t\t\t]),\n\t\t...(options.excludeLintPackageJson ? [] : [\"eslint-plugin-package-json\"]),\n\t\t...(options.excludeLintPerfectionist\n\t\t\t? []\n\t\t\t: [\"eslint-plugin-perfectionist\"]),\n\t\t...(options.excludeLintRegexp ? [] : [\"eslint-plugin-regexp\"]),\n\t\t...(options.excludeLintSpelling ? [] : [\"cspell\"]),\n\t\t...(options.excludeLintYml ? [] : [\"eslint-plugin-yml\"]),\n\t\t...(options.excludeReleases\n\t\t\t? []\n\t\t\t: [\"@release-it/conventional-changelog\", \"release-it\"]),\n\t\t...(options.excludeTests\n\t\t\t? []\n\t\t\t: [\n\t\t\t\t\t\"@vitest/coverage-v8\",\n\t\t\t\t\t\"@vitest/eslint-plugin\",\n\t\t\t\t\t\"console-fail-test\",\n\t\t\t\t\t\"vitest\",\n\t\t\t\t]),\n\t]\n\t\t.filter(Boolean)\n\t\t.sort()\n\t\t.map((packageName) => `${packageName}@latest`)\n\t\t.join(\" \");\n\n\tawait execaCommand(\n\t\t`pnpm add ${devDependencies} -D${options.offline ? \" --offline\" : \"\"}`,\n\t);\n\n\tif (!options.excludeAllContributors) {\n\t\tawait execaCommand(`npx all-contributors-cli generate`);\n\t\tawait removeDependencies(\n\t\t\t[\"all-contributors-cli\"],\n\t\t\t(await readPackageData()).devDependencies,\n\t\t\t\"-D\",\n\t\t);\n\t}\n\n\tawait execaCommand(`pnpm dedupe --offline`);\n}\n"],"mappings":"AAAA,SAAS,oBAAoB;AAE7B,SAAS,iBAAiB,0BAA0B;AAGpD,eAAsB,qBAAqB,SAAkB;AAC5D,QAAM,kBAAkB;AAAA,IACvB;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA,GAAI,QAAQ,yBAAyB,CAAC,IAAI,CAAC,sBAAsB;AAAA,IACjE,GAAI,QAAQ,oBACT,CAAC,IACD,CAAC,iDAAiD;AAAA,IACrD,GAAI,QAAQ,mBAAmB,CAAC,IAAI,CAAC,qBAAqB;AAAA,IAC1D,GAAI,QAAQ,kBAAkB,CAAC,IAAI,CAAC,qBAAqB;AAAA,IACzD,GAAI,QAAQ,kBAAkB,CAAC,IAAI,CAAC,MAAM;AAAA,IAC1C,GAAI,QAAQ,gBACT,CAAC,IACD;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACD;AAAA,IACF,GAAI,QAAQ,yBAAyB,CAAC,IAAI,CAAC,4BAA4B;AAAA,IACvE,GAAI,QAAQ,2BACT,CAAC,IACD,CAAC,6BAA6B;AAAA,IACjC,GAAI,QAAQ,oBAAoB,CAAC,IAAI,CAAC,sBAAsB;AAAA,IAC5D,GAAI,QAAQ,sBAAsB,CAAC,IAAI,CAAC,QAAQ;AAAA,IAChD,GAAI,QAAQ,iBAAiB,CAAC,IAAI,CAAC,mBAAmB;AAAA,IACtD,GAAI,QAAQ,kBACT,CAAC,IACD,CAAC,sCAAsC,YAAY;AAAA,IACtD,GAAI,QAAQ,eACT,CAAC,IACD;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACD;AAAA,EACH,EACE,OAAO,OAAO,EACd,KAAK,EACL,IAAI,CAAC,gBAAgB,GAAG,WAAW,SAAS,EAC5C,KAAK,GAAG;AAEV,QAAM;AAAA,IACL,YAAY,eAAe,MAAM,QAAQ,UAAU,eAAe,EAAE;AAAA,EACrE;AAEA,MAAI,CAAC,QAAQ,wBAAwB;AACpC,UAAM,aAAa,mCAAmC;AACtD,UAAM;AAAA,MACL,CAAC,sBAAsB;AAAA,OACtB,MAAM,gBAAgB,GAAG;AAAA,MAC1B;AAAA,IACD;AAAA,EACD;AAEA,QAAM,aAAa,uBAAuB;AAC3C;","names":[]}
|
|
@@ -1,6 +1,15 @@
|
|
|
1
1
|
async function initializeBranchProtectionSettings(octokit, options) {
|
|
2
2
|
try {
|
|
3
3
|
await octokit.request("POST /repos/{owner}/{repo}/rulesets", {
|
|
4
|
+
bypass_actors: [
|
|
5
|
+
{
|
|
6
|
+
// This *seems* to be the Repository Admin role always?
|
|
7
|
+
// https://github.com/github/rest-api-description/issues/4406
|
|
8
|
+
actor_id: 5,
|
|
9
|
+
actor_type: "RepositoryRole",
|
|
10
|
+
bypass_mode: "always"
|
|
11
|
+
}
|
|
12
|
+
],
|
|
4
13
|
conditions: {
|
|
5
14
|
ref_name: {
|
|
6
15
|
exclude: [],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/steps/initializeGitHubRepository/initializeBranchProtectionSettings.ts"],"sourcesContent":["import { RequestError } from \"@octokit/request-error\";\nimport { Octokit } from \"octokit\";\n\nimport { Options } from \"../../shared/types.js\";\n\nexport async function initializeBranchProtectionSettings(\n\toctokit: Octokit,\n\toptions: Options,\n) {\n\ttry {\n\t\tawait octokit.request(\"POST /repos/{owner}/{repo}/rulesets\", {\n\t\t\tconditions: {\n\t\t\t\tref_name: {\n\t\t\t\t\texclude: [],\n\t\t\t\t\tinclude: [\"refs/heads/main\"],\n\t\t\t\t},\n\t\t\t},\n\t\t\tenforcement: \"active\",\n\t\t\tname: \"Branch protection for main\",\n\t\t\towner: options.owner,\n\t\t\trepo: options.repository,\n\t\t\trules: [\n\t\t\t\t{ type: \"deletion\" },\n\t\t\t\t{\n\t\t\t\t\tparameters: {\n\t\t\t\t\t\t// @ts-expect-error -- https://github.com/github/rest-api-description/issues/4405\n\t\t\t\t\t\tallowed_merge_methods: [\"squash\"],\n\t\t\t\t\t\tdismiss_stale_reviews_on_push: false,\n\t\t\t\t\t\trequire_code_owner_review: false,\n\t\t\t\t\t\trequire_last_push_approval: false,\n\t\t\t\t\t\trequired_approving_review_count: 0,\n\t\t\t\t\t\trequired_review_thread_resolution: false,\n\t\t\t\t\t},\n\t\t\t\t\ttype: \"pull_request\",\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tparameters: {\n\t\t\t\t\t\trequired_status_checks: [\n\t\t\t\t\t\t\t{ context: \"Build\" },\n\t\t\t\t\t\t\t...(options.excludeCompliance ? [] : [{ context: \"Compliance\" }]),\n\t\t\t\t\t\t\t{ context: \"Lint\" },\n\t\t\t\t\t\t\t...(options.excludeLintKnip ? [] : [{ context: \"Lint Knip\" }]),\n\t\t\t\t\t\t\t...(options.excludeLintMd ? [] : [{ context: \"Lint Markdown\" }]),\n\t\t\t\t\t\t\t...(options.excludeLintPackages\n\t\t\t\t\t\t\t\t? []\n\t\t\t\t\t\t\t\t: [{ context: \"Lint Packages\" }]),\n\t\t\t\t\t\t\t...(options.excludeLintSpelling\n\t\t\t\t\t\t\t\t? []\n\t\t\t\t\t\t\t\t: [{ context: \"Lint Spelling\" }]),\n\t\t\t\t\t\t\t{ context: \"Prettier\" },\n\t\t\t\t\t\t\t...(options.excludeTests ? [] : [{ context: \"Test\" }]),\n\t\t\t\t\t\t],\n\t\t\t\t\t\tstrict_required_status_checks_policy: false,\n\t\t\t\t\t},\n\t\t\t\t\ttype: \"required_status_checks\",\n\t\t\t\t},\n\t\t\t],\n\t\t\ttarget: \"branch\",\n\t\t});\n\t} catch (error) {\n\t\tif ((error as RequestError).status === 403) {\n\t\t\treturn false;\n\t\t}\n\n\t\tthrow error;\n\t}\n}\n"],"mappings":"AAKA,eAAsB,mCACrB,SACA,SACC;AACD,MAAI;AACH,UAAM,QAAQ,QAAQ,uCAAuC;AAAA,MAC5D,YAAY;AAAA,QACX,UAAU;AAAA,UACT,SAAS,CAAC;AAAA,UACV,SAAS,CAAC,iBAAiB;AAAA,QAC5B;AAAA,MACD;AAAA,MACA,aAAa;AAAA,MACb,MAAM;AAAA,MACN,OAAO,QAAQ;AAAA,MACf,MAAM,QAAQ;AAAA,MACd,OAAO;AAAA,QACN,EAAE,MAAM,WAAW;AAAA,QACnB;AAAA,UACC,YAAY;AAAA;AAAA,YAEX,uBAAuB,CAAC,QAAQ;AAAA,YAChC,+BAA+B;AAAA,YAC/B,2BAA2B;AAAA,YAC3B,4BAA4B;AAAA,YAC5B,iCAAiC;AAAA,YACjC,mCAAmC;AAAA,UACpC;AAAA,UACA,MAAM;AAAA,QACP;AAAA,QACA;AAAA,UACC,YAAY;AAAA,YACX,wBAAwB;AAAA,cACvB,EAAE,SAAS,QAAQ;AAAA,cACnB,GAAI,QAAQ,oBAAoB,CAAC,IAAI,CAAC,EAAE,SAAS,aAAa,CAAC;AAAA,cAC/D,EAAE,SAAS,OAAO;AAAA,cAClB,GAAI,QAAQ,kBAAkB,CAAC,IAAI,CAAC,EAAE,SAAS,YAAY,CAAC;AAAA,cAC5D,GAAI,QAAQ,gBAAgB,CAAC,IAAI,CAAC,EAAE,SAAS,gBAAgB,CAAC;AAAA,cAC9D,GAAI,QAAQ,sBACT,CAAC,IACD,CAAC,EAAE,SAAS,gBAAgB,CAAC;AAAA,cAChC,GAAI,QAAQ,sBACT,CAAC,IACD,CAAC,EAAE,SAAS,gBAAgB,CAAC;AAAA,cAChC,EAAE,SAAS,WAAW;AAAA,cACtB,GAAI,QAAQ,eAAe,CAAC,IAAI,CAAC,EAAE,SAAS,OAAO,CAAC;AAAA,YACrD;AAAA,YACA,sCAAsC;AAAA,UACvC;AAAA,UACA,MAAM;AAAA,QACP;AAAA,MACD;AAAA,MACA,QAAQ;AAAA,IACT,CAAC;AAAA,EACF,SAAS,OAAO;AACf,QAAK,MAAuB,WAAW,KAAK;AAC3C,aAAO;AAAA,IACR;AAEA,UAAM;AAAA,EACP;AACD;","names":[]}
|
|
1
|
+
{"version":3,"sources":["../../../src/steps/initializeGitHubRepository/initializeBranchProtectionSettings.ts"],"sourcesContent":["import { RequestError } from \"@octokit/request-error\";\nimport { Octokit } from \"octokit\";\n\nimport { Options } from \"../../shared/types.js\";\n\nexport async function initializeBranchProtectionSettings(\n\toctokit: Octokit,\n\toptions: Options,\n) {\n\ttry {\n\t\tawait octokit.request(\"POST /repos/{owner}/{repo}/rulesets\", {\n\t\t\tbypass_actors: [\n\t\t\t\t{\n\t\t\t\t\t// This *seems* to be the Repository Admin role always?\n\t\t\t\t\t// https://github.com/github/rest-api-description/issues/4406\n\t\t\t\t\tactor_id: 5,\n\t\t\t\t\tactor_type: \"RepositoryRole\",\n\t\t\t\t\tbypass_mode: \"always\",\n\t\t\t\t},\n\t\t\t],\n\t\t\tconditions: {\n\t\t\t\tref_name: {\n\t\t\t\t\texclude: [],\n\t\t\t\t\tinclude: [\"refs/heads/main\"],\n\t\t\t\t},\n\t\t\t},\n\t\t\tenforcement: \"active\",\n\t\t\tname: \"Branch protection for main\",\n\t\t\towner: options.owner,\n\t\t\trepo: options.repository,\n\t\t\trules: [\n\t\t\t\t{ type: \"deletion\" },\n\t\t\t\t{\n\t\t\t\t\tparameters: {\n\t\t\t\t\t\t// @ts-expect-error -- https://github.com/github/rest-api-description/issues/4405\n\t\t\t\t\t\tallowed_merge_methods: [\"squash\"],\n\t\t\t\t\t\tdismiss_stale_reviews_on_push: false,\n\t\t\t\t\t\trequire_code_owner_review: false,\n\t\t\t\t\t\trequire_last_push_approval: false,\n\t\t\t\t\t\trequired_approving_review_count: 0,\n\t\t\t\t\t\trequired_review_thread_resolution: false,\n\t\t\t\t\t},\n\t\t\t\t\ttype: \"pull_request\",\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tparameters: {\n\t\t\t\t\t\trequired_status_checks: [\n\t\t\t\t\t\t\t{ context: \"Build\" },\n\t\t\t\t\t\t\t...(options.excludeCompliance ? [] : [{ context: \"Compliance\" }]),\n\t\t\t\t\t\t\t{ context: \"Lint\" },\n\t\t\t\t\t\t\t...(options.excludeLintKnip ? [] : [{ context: \"Lint Knip\" }]),\n\t\t\t\t\t\t\t...(options.excludeLintMd ? [] : [{ context: \"Lint Markdown\" }]),\n\t\t\t\t\t\t\t...(options.excludeLintPackages\n\t\t\t\t\t\t\t\t? []\n\t\t\t\t\t\t\t\t: [{ context: \"Lint Packages\" }]),\n\t\t\t\t\t\t\t...(options.excludeLintSpelling\n\t\t\t\t\t\t\t\t? []\n\t\t\t\t\t\t\t\t: [{ context: \"Lint Spelling\" }]),\n\t\t\t\t\t\t\t{ context: \"Prettier\" },\n\t\t\t\t\t\t\t...(options.excludeTests ? [] : [{ context: \"Test\" }]),\n\t\t\t\t\t\t],\n\t\t\t\t\t\tstrict_required_status_checks_policy: false,\n\t\t\t\t\t},\n\t\t\t\t\ttype: \"required_status_checks\",\n\t\t\t\t},\n\t\t\t],\n\t\t\ttarget: \"branch\",\n\t\t});\n\t} catch (error) {\n\t\tif ((error as RequestError).status === 403) {\n\t\t\treturn false;\n\t\t}\n\n\t\tthrow error;\n\t}\n}\n"],"mappings":"AAKA,eAAsB,mCACrB,SACA,SACC;AACD,MAAI;AACH,UAAM,QAAQ,QAAQ,uCAAuC;AAAA,MAC5D,eAAe;AAAA,QACd;AAAA;AAAA;AAAA,UAGC,UAAU;AAAA,UACV,YAAY;AAAA,UACZ,aAAa;AAAA,QACd;AAAA,MACD;AAAA,MACA,YAAY;AAAA,QACX,UAAU;AAAA,UACT,SAAS,CAAC;AAAA,UACV,SAAS,CAAC,iBAAiB;AAAA,QAC5B;AAAA,MACD;AAAA,MACA,aAAa;AAAA,MACb,MAAM;AAAA,MACN,OAAO,QAAQ;AAAA,MACf,MAAM,QAAQ;AAAA,MACd,OAAO;AAAA,QACN,EAAE,MAAM,WAAW;AAAA,QACnB;AAAA,UACC,YAAY;AAAA;AAAA,YAEX,uBAAuB,CAAC,QAAQ;AAAA,YAChC,+BAA+B;AAAA,YAC/B,2BAA2B;AAAA,YAC3B,4BAA4B;AAAA,YAC5B,iCAAiC;AAAA,YACjC,mCAAmC;AAAA,UACpC;AAAA,UACA,MAAM;AAAA,QACP;AAAA,QACA;AAAA,UACC,YAAY;AAAA,YACX,wBAAwB;AAAA,cACvB,EAAE,SAAS,QAAQ;AAAA,cACnB,GAAI,QAAQ,oBAAoB,CAAC,IAAI,CAAC,EAAE,SAAS,aAAa,CAAC;AAAA,cAC/D,EAAE,SAAS,OAAO;AAAA,cAClB,GAAI,QAAQ,kBAAkB,CAAC,IAAI,CAAC,EAAE,SAAS,YAAY,CAAC;AAAA,cAC5D,GAAI,QAAQ,gBAAgB,CAAC,IAAI,CAAC,EAAE,SAAS,gBAAgB,CAAC;AAAA,cAC9D,GAAI,QAAQ,sBACT,CAAC,IACD,CAAC,EAAE,SAAS,gBAAgB,CAAC;AAAA,cAChC,GAAI,QAAQ,sBACT,CAAC,IACD,CAAC,EAAE,SAAS,gBAAgB,CAAC;AAAA,cAChC,EAAE,SAAS,WAAW;AAAA,cACtB,GAAI,QAAQ,eAAe,CAAC,IAAI,CAAC,EAAE,SAAS,OAAO,CAAC;AAAA,YACrD;AAAA,YACA,sCAAsC;AAAA,UACvC;AAAA,UACA,MAAM;AAAA,QACP;AAAA,MACD;AAAA,MACA,QAAQ;AAAA,IACT,CAAC;AAAA,EACF,SAAS,OAAO;AACf,QAAK,MAAuB,WAAW,KAAK;AAC3C,aAAO;AAAA,IACR;AAEA,UAAM;AAAA,EACP;AACD;","names":[]}
|
|
@@ -9,20 +9,25 @@ async function uninstallPackages(offline) {
|
|
|
9
9
|
"all-contributors-cli",
|
|
10
10
|
"chalk",
|
|
11
11
|
"create",
|
|
12
|
+
"cspell-populate-words",
|
|
12
13
|
"execa",
|
|
13
14
|
"git-remote-origin-url",
|
|
14
15
|
"git-url-parse",
|
|
16
|
+
"image-size",
|
|
15
17
|
"input-from-file",
|
|
16
18
|
"input-from-file-json",
|
|
19
|
+
"input-from-script",
|
|
17
20
|
"js-yaml",
|
|
18
21
|
"lazy-value",
|
|
19
22
|
"npm-user",
|
|
23
|
+
"object-strings-deep",
|
|
20
24
|
"octokit",
|
|
21
25
|
"octokit-from-auth",
|
|
22
26
|
"parse-author",
|
|
23
27
|
"parse-package-name",
|
|
24
28
|
"populate-all-contributors-for-repository",
|
|
25
29
|
"prettier",
|
|
30
|
+
"remove-undefined-objects",
|
|
26
31
|
"replace-in-file",
|
|
27
32
|
"rimraf",
|
|
28
33
|
"set-github-repository-labels",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/steps/uninstallPackages.ts"],"sourcesContent":["import { $ } from \"execa\";\n\nimport { readPackageData, removeDependencies } from \"../shared/packages.js\";\n\nexport async function uninstallPackages(offline: boolean | undefined) {\n\tconst packageData = await readPackageData();\n\n\tawait removeDependencies(\n\t\t[\n\t\t\t\"@clack/prompts\",\n\t\t\t\"@prettier/sync\",\n\t\t\t\"all-contributors-cli\",\n\t\t\t\"chalk\",\n\t\t\t\"create\",\n\t\t\t\"execa\",\n\t\t\t\"git-remote-origin-url\",\n\t\t\t\"git-url-parse\",\n\t\t\t\"input-from-file\",\n\t\t\t\"input-from-file-json\",\n\t\t\t\"js-yaml\",\n\t\t\t\"lazy-value\",\n\t\t\t\"npm-user\",\n\t\t\t\"octokit\",\n\t\t\t\"octokit-from-auth\",\n\t\t\t\"parse-author\",\n\t\t\t\"parse-package-name\",\n\t\t\t\"populate-all-contributors-for-repository\",\n\t\t\t\"prettier\",\n\t\t\t\"replace-in-file\",\n\t\t\t\"rimraf\",\n\t\t\t\"set-github-repository-labels\",\n\t\t\t\"sort-package-json\",\n\t\t\t\"title-case\",\n\t\t\t\"zod\",\n\t\t\t\"zod-validation-error\",\n\t\t],\n\t\tpackageData.dependencies,\n\t);\n\n\tawait removeDependencies(\n\t\t[\n\t\t\t\"@octokit/request-error\",\n\t\t\t\"@types/git-url-parse\",\n\t\t\t\"@types/js-yaml\",\n\t\t\t\"@types/parse-author\",\n\t\t\t\"all-contributors-cli\",\n\t\t\t\"c8\",\n\t\t\t\"create-testers\",\n\t\t\t\"eslint-config-prettier\",\n\t\t\t\"globby\",\n\t\t\t\"tsx\",\n\t\t],\n\t\tpackageData.devDependencies,\n\t\t\"-D\",\n\t);\n\n\tawait $`pnpm add prettier -D${offline ? \" --offline\" : \"\"}`;\n}\n"],"mappings":"AAAA,SAAS,SAAS;AAElB,SAAS,iBAAiB,0BAA0B;AAEpD,eAAsB,kBAAkB,SAA8B;AACrE,QAAM,cAAc,MAAM,gBAAgB;AAE1C,QAAM;AAAA,IACL;AAAA,MACC;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACD;AAAA,IACA,YAAY;AAAA,EACb;AAEA,QAAM;AAAA,IACL;AAAA,MACC;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACD;AAAA,IACA,YAAY;AAAA,IACZ;AAAA,EACD;AAEA,QAAM,wBAAwB,UAAU,eAAe,EAAE;AAC1D;","names":[]}
|
|
1
|
+
{"version":3,"sources":["../../src/steps/uninstallPackages.ts"],"sourcesContent":["import { $ } from \"execa\";\n\nimport { readPackageData, removeDependencies } from \"../shared/packages.js\";\n\nexport async function uninstallPackages(offline: boolean | undefined) {\n\tconst packageData = await readPackageData();\n\n\tawait removeDependencies(\n\t\t[\n\t\t\t\"@clack/prompts\",\n\t\t\t\"@prettier/sync\",\n\t\t\t\"all-contributors-cli\",\n\t\t\t\"chalk\",\n\t\t\t\"create\",\n\t\t\t\"cspell-populate-words\",\n\t\t\t\"execa\",\n\t\t\t\"git-remote-origin-url\",\n\t\t\t\"git-url-parse\",\n\t\t\t\"image-size\",\n\t\t\t\"input-from-file\",\n\t\t\t\"input-from-file-json\",\n\t\t\t\"input-from-script\",\n\t\t\t\"js-yaml\",\n\t\t\t\"lazy-value\",\n\t\t\t\"npm-user\",\n\t\t\t\"object-strings-deep\",\n\t\t\t\"octokit\",\n\t\t\t\"octokit-from-auth\",\n\t\t\t\"parse-author\",\n\t\t\t\"parse-package-name\",\n\t\t\t\"populate-all-contributors-for-repository\",\n\t\t\t\"prettier\",\n\t\t\t\"remove-undefined-objects\",\n\t\t\t\"replace-in-file\",\n\t\t\t\"rimraf\",\n\t\t\t\"set-github-repository-labels\",\n\t\t\t\"sort-package-json\",\n\t\t\t\"title-case\",\n\t\t\t\"zod\",\n\t\t\t\"zod-validation-error\",\n\t\t],\n\t\tpackageData.dependencies,\n\t);\n\n\tawait removeDependencies(\n\t\t[\n\t\t\t\"@octokit/request-error\",\n\t\t\t\"@types/git-url-parse\",\n\t\t\t\"@types/js-yaml\",\n\t\t\t\"@types/parse-author\",\n\t\t\t\"all-contributors-cli\",\n\t\t\t\"c8\",\n\t\t\t\"create-testers\",\n\t\t\t\"eslint-config-prettier\",\n\t\t\t\"globby\",\n\t\t\t\"tsx\",\n\t\t],\n\t\tpackageData.devDependencies,\n\t\t\"-D\",\n\t);\n\n\tawait $`pnpm add prettier -D${offline ? \" --offline\" : \"\"}`;\n}\n"],"mappings":"AAAA,SAAS,SAAS;AAElB,SAAS,iBAAiB,0BAA0B;AAEpD,eAAsB,kBAAkB,SAA8B;AACrE,QAAM,cAAc,MAAM,gBAAgB;AAE1C,QAAM;AAAA,IACL;AAAA,MACC;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACD;AAAA,IACA,YAAY;AAAA,EACb;AAEA,QAAM;AAAA,IACL;AAAA,MACC;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACD;AAAA,IACA,YAAY;AAAA,IACZ;AAAA,EACD;AAEA,QAAM,wBAAwB,UAAU,eAAe,EAAE;AAC1D;","names":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/steps/updateAllContributorsTable.ts"],"sourcesContent":["import { $ } from \"execa\";\nimport * as fs from \"node:fs/promises\";\n\nimport { readFileSafeAsJson } from \"../shared/readFileSafeAsJson.js\";\nimport { AllContributorsData, Options } from \"../shared/types.js\";\nimport { formatJson } from \"./writing/creation/formatters/formatJson.js\";\n\nexport async function updateAllContributorsTable({\n\towner,\n\trepository,\n}: Pick<Options, \"owner\" | \"repository\">) {\n\tawait fs.writeFile(\n\t\t\".all-contributorsrc\",\n\t\tawait formatJson({\n\t\t\t...((await readFileSafeAsJson(\n\t\t\t\t\".all-contributorsrc\",\n\t\t\t)) as AllContributorsData),\n\t\t\tprojectName: repository,\n\t\t\tprojectOwner: owner,\n\t\t}),\n\t);\n\n\tawait $`
|
|
1
|
+
{"version":3,"sources":["../../src/steps/updateAllContributorsTable.ts"],"sourcesContent":["import { $ } from \"execa\";\nimport * as fs from \"node:fs/promises\";\n\nimport { readFileSafeAsJson } from \"../shared/readFileSafeAsJson.js\";\nimport { AllContributorsData, Options } from \"../shared/types.js\";\nimport { formatJson } from \"./writing/creation/formatters/formatJson.js\";\n\nexport async function updateAllContributorsTable({\n\towner,\n\trepository,\n}: Pick<Options, \"owner\" | \"repository\">) {\n\tawait fs.writeFile(\n\t\t\".all-contributorsrc\",\n\t\tawait formatJson({\n\t\t\t...((await readFileSafeAsJson(\n\t\t\t\t\".all-contributorsrc\",\n\t\t\t)) as AllContributorsData),\n\t\t\tprojectName: repository,\n\t\t\tprojectOwner: owner,\n\t\t}),\n\t);\n\n\tawait $`pnpx all-contributors-cli generate`;\n}\n"],"mappings":"AAAA,SAAS,SAAS;AAClB,YAAY,QAAQ;AAEpB,SAAS,0BAA0B;AAEnC,SAAS,kBAAkB;AAE3B,eAAsB,2BAA2B;AAAA,EAChD;AAAA,EACA;AACD,GAA0C;AACzC,QAAM,GAAG;AAAA,IACR;AAAA,IACA,MAAM,WAAW;AAAA,MAChB,GAAK,MAAM;AAAA,QACV;AAAA,MACD;AAAA,MACA,aAAa;AAAA,MACb,cAAc;AAAA,IACf,CAAC;AAAA,EACF;AAEA,QAAM;AACP;","names":[]}
|
|
@@ -12,7 +12,7 @@ const endOfReadmeNotice = [
|
|
|
12
12
|
const endOfReadmeMatcher = /💙.+(?:based|built|templated).+(?:from|using|on|with).+create-typescript-app/;
|
|
13
13
|
async function updateReadme(options) {
|
|
14
14
|
let contents = await readFileSafe("./README.md", "");
|
|
15
|
-
contents = contents.replaceAll("JoshuaKGoldberg", options.owner);
|
|
15
|
+
contents = contents.replaceAll("JoshuaKGoldberg", options.owner).replace(/\n<img .+ alt="Project logo.+>\n/gs, "");
|
|
16
16
|
if (!options.excludeTemplatedBy && !endOfReadmeMatcher.test(contents)) {
|
|
17
17
|
contents += endOfReadmeNotice;
|
|
18
18
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/steps/updateReadme.ts"],"sourcesContent":["import * as fs from \"node:fs/promises\";\nimport { EOL } from \"node:os\";\n\nimport { readFileSafe } from \"../shared/readFileSafe.js\";\nimport { Options } from \"../shared/types.js\";\n\nexport const endOfReadmeTemplateLine = `> 💙 This package was templated with [\\`create-typescript-app\\`](https://github.com/JoshuaKGoldberg/create-typescript-app).`;\n\nexport const endOfReadmeNotice = [\n\t``,\n\t`<!-- You can remove this notice if you don't want it 🙂 no worries! -->`,\n\t``,\n\tendOfReadmeTemplateLine,\n\t``,\n].join(EOL);\n\nexport const endOfReadmeMatcher =\n\t/💙.+(?:based|built|templated).+(?:from|using|on|with).+create-typescript-app/;\n\nexport async function updateReadme(\n\toptions: Pick<Options, \"excludeTemplatedBy\" | \"owner\">,\n) {\n\tlet contents = await readFileSafe(\"./README.md\", \"\");\n\n\tcontents = contents.replaceAll(\"JoshuaKGoldberg\", options.owner);\n\n\tif (!options.excludeTemplatedBy && !endOfReadmeMatcher.test(contents)) {\n\t\tcontents += endOfReadmeNotice;\n\t}\n\n\tawait fs.writeFile(\"./README.md\", contents);\n}\n"],"mappings":"AAAA,YAAY,QAAQ;AACpB,SAAS,WAAW;AAEpB,SAAS,oBAAoB;AAGtB,MAAM,0BAA0B;AAEhC,MAAM,oBAAoB;AAAA,EAChC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACD,EAAE,KAAK,GAAG;AAEH,MAAM,qBACZ;AAED,eAAsB,aACrB,SACC;AACD,MAAI,WAAW,MAAM,aAAa,eAAe,EAAE;AAEnD,aAAW,
|
|
1
|
+
{"version":3,"sources":["../../src/steps/updateReadme.ts"],"sourcesContent":["import * as fs from \"node:fs/promises\";\nimport { EOL } from \"node:os\";\n\nimport { readFileSafe } from \"../shared/readFileSafe.js\";\nimport { Options } from \"../shared/types.js\";\n\nexport const endOfReadmeTemplateLine = `> 💙 This package was templated with [\\`create-typescript-app\\`](https://github.com/JoshuaKGoldberg/create-typescript-app).`;\n\nexport const endOfReadmeNotice = [\n\t``,\n\t`<!-- You can remove this notice if you don't want it 🙂 no worries! -->`,\n\t``,\n\tendOfReadmeTemplateLine,\n\t``,\n].join(EOL);\n\nexport const endOfReadmeMatcher =\n\t/💙.+(?:based|built|templated).+(?:from|using|on|with).+create-typescript-app/;\n\nexport async function updateReadme(\n\toptions: Pick<Options, \"excludeTemplatedBy\" | \"owner\">,\n) {\n\tlet contents = await readFileSafe(\"./README.md\", \"\");\n\n\tcontents = contents\n\t\t.replaceAll(\"JoshuaKGoldberg\", options.owner)\n\t\t.replace(/\\n<img .+ alt=\"Project logo.+>\\n/gs, \"\");\n\n\tif (!options.excludeTemplatedBy && !endOfReadmeMatcher.test(contents)) {\n\t\tcontents += endOfReadmeNotice;\n\t}\n\n\tawait fs.writeFile(\"./README.md\", contents);\n}\n"],"mappings":"AAAA,YAAY,QAAQ;AACpB,SAAS,WAAW;AAEpB,SAAS,oBAAoB;AAGtB,MAAM,0BAA0B;AAEhC,MAAM,oBAAoB;AAAA,EAChC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACD,EAAE,KAAK,GAAG;AAEH,MAAM,qBACZ;AAED,eAAsB,aACrB,SACC;AACD,MAAI,WAAW,MAAM,aAAa,eAAe,EAAE;AAEnD,aAAW,SACT,WAAW,mBAAmB,QAAQ,KAAK,EAC3C,QAAQ,sCAAsC,EAAE;AAElD,MAAI,CAAC,QAAQ,sBAAsB,CAAC,mBAAmB,KAAK,QAAQ,GAAG;AACtE,gBAAY;AAAA,EACb;AAEA,QAAM,GAAG,UAAU,eAAe,QAAQ;AAC3C;","names":[]}
|
|
@@ -11,7 +11,7 @@ async function createESLintConfig(options) {
|
|
|
11
11
|
`import n from "eslint-plugin-n";`,
|
|
12
12
|
!options.excludeLintPackageJson && `import packageJson from "eslint-plugin-package-json/configs/recommended";`,
|
|
13
13
|
!options.excludeLintPerfectionist && `import perfectionist from "eslint-plugin-perfectionist";`,
|
|
14
|
-
!options.
|
|
14
|
+
!options.excludeLintRegexp && `import * as regexp from "eslint-plugin-regexp";`,
|
|
15
15
|
!options.excludeLintYml && `import yml from "eslint-plugin-yml";`,
|
|
16
16
|
`import tseslint from "typescript-eslint";`
|
|
17
17
|
].filter(Boolean);
|
|
@@ -26,7 +26,7 @@ async function createESLintConfig(options) {
|
|
|
26
26
|
` n.configs["flat/recommended"],`,
|
|
27
27
|
!options.excludeLintPackageJson && ` packageJson,`,
|
|
28
28
|
!options.excludeLintPerfectionist && ` perfectionist.configs["recommended-natural"],`,
|
|
29
|
-
!options.
|
|
29
|
+
!options.excludeLintRegexp && ` regexp.configs["flat/recommended"],`
|
|
30
30
|
].filter(Boolean);
|
|
31
31
|
const ignores = [
|
|
32
32
|
...options.excludeTests ? [] : ["**/*.snap", "coverage"],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/steps/writing/creation/createESLintConfig.ts"],"sourcesContent":["import { Options } from \"../../../shared/types.js\";\nimport { formatTypeScript } from \"./formatters/formatTypeScript.js\";\n\nexport async function createESLintConfig(options: Options) {\n\tconst tseslintBase = options.excludeLintStrict ? \"recommended\" : \"strict\";\n\n\tconst imports = [\n\t\t!options.excludeLintESLint &&\n\t\t\t`import comments from \"@eslint-community/eslint-plugin-eslint-comments/configs\";`,\n\t\t`import eslint from \"@eslint/js\";`,\n\t\t!options.excludeTests && `import vitest from \"@vitest/eslint-plugin\";`,\n\t\t!options.excludeLintJSDoc && `import jsdoc from \"eslint-plugin-jsdoc\";`,\n\t\t!options.excludeLintJson && `import jsonc from \"eslint-plugin-jsonc\";`,\n\t\t!options.excludeLintMd && `import markdown from \"eslint-plugin-markdown\";`,\n\t\t`import n from \"eslint-plugin-n\";`,\n\t\t!options.excludeLintPackageJson &&\n\t\t\t`import packageJson from \"eslint-plugin-package-json/configs/recommended\";`,\n\t\t!options.excludeLintPerfectionist &&\n\t\t\t`import perfectionist from \"eslint-plugin-perfectionist\";`,\n\t\t!options.
|
|
1
|
+
{"version":3,"sources":["../../../../src/steps/writing/creation/createESLintConfig.ts"],"sourcesContent":["import { Options } from \"../../../shared/types.js\";\nimport { formatTypeScript } from \"./formatters/formatTypeScript.js\";\n\nexport async function createESLintConfig(options: Options) {\n\tconst tseslintBase = options.excludeLintStrict ? \"recommended\" : \"strict\";\n\n\tconst imports = [\n\t\t!options.excludeLintESLint &&\n\t\t\t`import comments from \"@eslint-community/eslint-plugin-eslint-comments/configs\";`,\n\t\t`import eslint from \"@eslint/js\";`,\n\t\t!options.excludeTests && `import vitest from \"@vitest/eslint-plugin\";`,\n\t\t!options.excludeLintJSDoc && `import jsdoc from \"eslint-plugin-jsdoc\";`,\n\t\t!options.excludeLintJson && `import jsonc from \"eslint-plugin-jsonc\";`,\n\t\t!options.excludeLintMd && `import markdown from \"eslint-plugin-markdown\";`,\n\t\t`import n from \"eslint-plugin-n\";`,\n\t\t!options.excludeLintPackageJson &&\n\t\t\t`import packageJson from \"eslint-plugin-package-json/configs/recommended\";`,\n\t\t!options.excludeLintPerfectionist &&\n\t\t\t`import perfectionist from \"eslint-plugin-perfectionist\";`,\n\t\t!options.excludeLintRegexp &&\n\t\t\t`import * as regexp from \"eslint-plugin-regexp\";`,\n\t\t!options.excludeLintYml && `import yml from \"eslint-plugin-yml\";`,\n\t\t`import tseslint from \"typescript-eslint\";`,\n\t].filter(Boolean);\n\n\tconst elements = [\n\t\t`eslint.configs.recommended,`,\n\t\t!options.excludeLintESLint && `\tcomments.recommended,`,\n\t\t!options.excludeLintJSDoc &&\n\t\t\t`\tjsdoc.configs[\"flat/contents-typescript-error\"],\n\t\tjsdoc.configs[\"flat/logical-typescript-error\"],\n\t\tjsdoc.configs[\"flat/stylistic-typescript-error\"],`,\n\t\t!options.excludeLintJson && `\tjsonc.configs[\"flat/recommended-with-json\"],`,\n\t\t!options.excludeLintMd && `\tmarkdown.configs.recommended,`,\n\t\t`\tn.configs[\"flat/recommended\"],`,\n\t\t!options.excludeLintPackageJson && `\tpackageJson,`,\n\t\t!options.excludeLintPerfectionist &&\n\t\t\t`\tperfectionist.configs[\"recommended-natural\"],`,\n\t\t!options.excludeLintRegexp && `\tregexp.configs[\"flat/recommended\"],`,\n\t].filter(Boolean);\n\n\tconst ignores = [\n\t\t...(options.excludeTests ? [] : [\"**/*.snap\", \"coverage\"]),\n\t\t\"lib\",\n\t\t\"node_modules\",\n\t\t\"pnpm-lock.yaml\",\n\t]\n\t\t.map((ignore) => JSON.stringify(ignore))\n\t\t.sort();\n\n\tconst rules =\n\t\t!options.excludeLintStylistic &&\n\t\t`{\n\t\t\t// Stylistic concerns that don't interfere with Prettier\n\t\t\t\"logical-assignment-operators\": [\n\t\t\t\t\"error\",\n\t\t\t\t\"always\",\n\t\t\t\t{ enforceForIfStatements: true },\n\t\t\t],\n\t\t\t\"no-useless-rename\": \"error\",\n\t\t\t\"object-shorthand\": \"error\",\n\t\t\t\"operator-assignment\": \"error\",\n\t\t}`;\n\n\treturn await formatTypeScript(`${imports.join(\"\\n\")}\n\nexport default tseslint.config(\n\t{ ignores: [${ignores.join(\", \")}], },\n\t{ linterOptions: { reportUnusedDisableDirectives: \"error\" } },\n\t${elements.join(\"\\n\")}\n\t{\n\t\textends: ${\n\t\t\toptions.excludeLintStylistic\n\t\t\t\t? `tseslint.configs.${tseslintBase}TypeChecked`\n\t\t\t\t: `[\n\t\t\ttseslint.configs.${tseslintBase}TypeChecked,\n\t\t\ttseslint.configs.stylisticTypeChecked,\n\t\t]`\n\t\t},\n\t\tfiles: [\"**/*.js\", \"**/*.ts\"],\n\t\tlanguageOptions: {\n\t\t\tparserOptions: {\n\t\t\t\tprojectService: { allowDefaultProject: [\"*.config.*s\"] },\n\t\t\t\ttsconfigRootDir: import.meta.dirname\n\t\t\t},\n\t\t},${\n\t\t\trules\n\t\t\t\t? `\n\t\trules: ${rules},`\n\t\t\t\t: \"\"\n\t\t}${\n\t\t\toptions.excludeLintPerfectionist\n\t\t\t\t? \"\"\n\t\t\t\t: `\n\t\tsettings: { perfectionist: { partitionByComment: true, type: \"natural\" } },`\n\t\t}\n\t},\n\t{\n\t\textends: [tseslint.configs.disableTypeChecked],\n\t\tfiles: [\"**/*.md/*.ts\"],\n\t\trules: {\n\t\t\t\"n/no-missing-import\": [\n\t\t\t\t\"error\",\n\t\t\t\t{ allowModules: [\"${options.repository}\"] },\n\t\t\t],\n\t\t},\n\t},${\n\t\toptions.excludeTests\n\t\t\t? \"\"\n\t\t\t: `\n\t{\n\t\textends: [vitest.configs.recommended],\n\t\tfiles: [\"**/*.test.*\"],\n\t\trules: { \"@typescript-eslint/no-unsafe-assignment\": \"off\" },\n\t},`\n\t}${\n\t\toptions.excludeLintYml\n\t\t\t? \"\"\n\t\t\t: `\n\t{\n\t\textends: [yml.configs[\"flat/recommended\"], yml.configs[\"flat/prettier\"]],\n\t\tfiles: [\"**/*.{yml,yaml}\"],\n\t\trules: {\n\t\t\t\"yml/file-extension\": [\"error\", { extension: \"yml\" }],\n\t\t\t\"yml/sort-keys\": [\n\t\t\t\t\"error\",\n\t\t\t\t{ order: { type: \"asc\" }, pathPattern: \"^.*$\" },\n\t\t\t],\n\t\t\t\"yml/sort-sequence-values\": [\n\t\t\t\t\"error\",\n\t\t\t\t{ order: { type: \"asc\" }, pathPattern: \"^.*$\" },\n\t\t\t],\n\t\t},\n\t},`\n\t}\n);\n`);\n}\n"],"mappings":"AACA,SAAS,wBAAwB;AAEjC,eAAsB,mBAAmB,SAAkB;AAC1D,QAAM,eAAe,QAAQ,oBAAoB,gBAAgB;AAEjE,QAAM,UAAU;AAAA,IACf,CAAC,QAAQ,qBACR;AAAA,IACD;AAAA,IACA,CAAC,QAAQ,gBAAgB;AAAA,IACzB,CAAC,QAAQ,oBAAoB;AAAA,IAC7B,CAAC,QAAQ,mBAAmB;AAAA,IAC5B,CAAC,QAAQ,iBAAiB;AAAA,IAC1B;AAAA,IACA,CAAC,QAAQ,0BACR;AAAA,IACD,CAAC,QAAQ,4BACR;AAAA,IACD,CAAC,QAAQ,qBACR;AAAA,IACD,CAAC,QAAQ,kBAAkB;AAAA,IAC3B;AAAA,EACD,EAAE,OAAO,OAAO;AAEhB,QAAM,WAAW;AAAA,IAChB;AAAA,IACA,CAAC,QAAQ,qBAAqB;AAAA,IAC9B,CAAC,QAAQ,oBACR;AAAA;AAAA;AAAA,IAGD,CAAC,QAAQ,mBAAmB;AAAA,IAC5B,CAAC,QAAQ,iBAAiB;AAAA,IAC1B;AAAA,IACA,CAAC,QAAQ,0BAA0B;AAAA,IACnC,CAAC,QAAQ,4BACR;AAAA,IACD,CAAC,QAAQ,qBAAqB;AAAA,EAC/B,EAAE,OAAO,OAAO;AAEhB,QAAM,UAAU;AAAA,IACf,GAAI,QAAQ,eAAe,CAAC,IAAI,CAAC,aAAa,UAAU;AAAA,IACxD;AAAA,IACA;AAAA,IACA;AAAA,EACD,EACE,IAAI,CAAC,WAAW,KAAK,UAAU,MAAM,CAAC,EACtC,KAAK;AAEP,QAAM,QACL,CAAC,QAAQ,wBACT;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAYD,SAAO,MAAM,iBAAiB,GAAG,QAAQ,KAAK,IAAI,CAAC;AAAA;AAAA;AAAA,eAGrC,QAAQ,KAAK,IAAI,CAAC;AAAA;AAAA,GAE9B,SAAS,KAAK,IAAI,CAAC;AAAA;AAAA,aAGnB,QAAQ,uBACL,oBAAoB,YAAY,gBAChC;AAAA,sBACgB,YAAY;AAAA;AAAA,IAGhC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,MAQC,QACG;AAAA,WACK,KAAK,MACV,EACJ,GACC,QAAQ,2BACL,KACA;AAAA,8EAEJ;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,wBAQsB,QAAQ,UAAU;AAAA;AAAA;AAAA,KAIxC,QAAQ,eACL,KACA;AAAA;AAAA;AAAA;AAAA;AAAA,IAMJ,GACC,QAAQ,iBACL,KACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAgBJ;AAAA;AAAA,CAEA;AACD;","names":[]}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { readFileSafeAsJson } from "../../../shared/readFileSafeAsJson.js";
|
|
2
|
+
import { formatJson } from "./formatters/formatJson.js";
|
|
3
|
+
async function createKnipConfig() {
|
|
4
|
+
const existingPackageJson = await readFileSafeAsJson(
|
|
5
|
+
"./package.json"
|
|
6
|
+
);
|
|
7
|
+
return await formatJson({
|
|
8
|
+
$schema: `https://unpkg.com/knip@${existingPackageJson?.devDependencies?.knip ?? "latest"}/schema.json`,
|
|
9
|
+
entry: ["src/index.ts!"],
|
|
10
|
+
ignoreExportsUsedInFile: {
|
|
11
|
+
interface: true,
|
|
12
|
+
type: true
|
|
13
|
+
},
|
|
14
|
+
project: ["src/**/*.ts!"]
|
|
15
|
+
});
|
|
16
|
+
}
|
|
17
|
+
export {
|
|
18
|
+
createKnipConfig
|
|
19
|
+
};
|
|
20
|
+
//# sourceMappingURL=createKnipConfig.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/steps/writing/creation/createKnipConfig.ts"],"sourcesContent":["import { readFileSafeAsJson } from \"../../../shared/readFileSafeAsJson.js\";\nimport { PartialPackageData } from \"../../../shared/types.js\";\nimport { formatJson } from \"./formatters/formatJson.js\";\n\nexport async function createKnipConfig() {\n\tconst existingPackageJson = (await readFileSafeAsJson(\n\t\t\"./package.json\",\n\t)) as null | PartialPackageData;\n\n\treturn await formatJson({\n\t\t$schema: `https://unpkg.com/knip@${existingPackageJson?.devDependencies?.knip ?? \"latest\"}/schema.json`,\n\t\tentry: [\"src/index.ts!\"],\n\t\tignoreExportsUsedInFile: {\n\t\t\tinterface: true,\n\t\t\ttype: true,\n\t\t},\n\t\tproject: [\"src/**/*.ts!\"],\n\t});\n}\n"],"mappings":"AAAA,SAAS,0BAA0B;AAEnC,SAAS,kBAAkB;AAE3B,eAAsB,mBAAmB;AACxC,QAAM,sBAAuB,MAAM;AAAA,IAClC;AAAA,EACD;AAEA,SAAO,MAAM,WAAW;AAAA,IACvB,SAAS,0BAA0B,qBAAqB,iBAAiB,QAAQ,QAAQ;AAAA,IACzF,OAAO,CAAC,eAAe;AAAA,IACvB,yBAAyB;AAAA,MACxB,WAAW;AAAA,MACX,MAAM;AAAA,IACP;AAAA,IACA,SAAS,CAAC,cAAc;AAAA,EACzB,CAAC;AACF;","names":[]}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
+
import { SystemFetchers } from 'create';
|
|
1
2
|
import { Options } from '../../../shared/types.js';
|
|
2
3
|
import { Structure } from '../types.js';
|
|
3
4
|
import 'zod';
|
|
4
5
|
import '../../../shared/codes.js';
|
|
5
6
|
|
|
6
|
-
declare function createStructure(
|
|
7
|
+
declare function createStructure(providedOptions: Options, useNextEngine: boolean, fetchers?: SystemFetchers): Promise<Structure>;
|
|
7
8
|
|
|
8
9
|
export { createStructure };
|
|
@@ -1,8 +1,11 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {
|
|
2
|
+
produceBase,
|
|
3
|
+
producePreset
|
|
4
|
+
} from "create";
|
|
2
5
|
import prettier from "prettier";
|
|
3
|
-
import { presetCommon } from "../../../next/presetCommon.js";
|
|
4
|
-
import { presetEverything } from "../../../next/presetEverything.js";
|
|
5
|
-
import { presetMinimal } from "../../../next/presetMinimal.js";
|
|
6
|
+
import { presetCommon } from "../../../next/presets/presetCommon.js";
|
|
7
|
+
import { presetEverything } from "../../../next/presets/presetEverything.js";
|
|
8
|
+
import { presetMinimal } from "../../../next/presets/presetMinimal.js";
|
|
6
9
|
import { createDotGitHub } from "./dotGitHub/index.js";
|
|
7
10
|
import { createDotHusky } from "./dotHusky.js";
|
|
8
11
|
import { createDotVSCode } from "./dotVSCode.js";
|
|
@@ -13,21 +16,31 @@ const presets = {
|
|
|
13
16
|
everything: presetEverything,
|
|
14
17
|
minimal: presetMinimal
|
|
15
18
|
};
|
|
16
|
-
async function createStructure(
|
|
17
|
-
const preset = useNextEngine &&
|
|
19
|
+
async function createStructure(providedOptions, useNextEngine, fetchers) {
|
|
20
|
+
const preset = useNextEngine && providedOptions.base && providedOptions.base !== "prompt" && presets[providedOptions.base];
|
|
18
21
|
if (preset) {
|
|
19
|
-
const
|
|
22
|
+
const options = {
|
|
23
|
+
...await produceBase(preset.base, {
|
|
24
|
+
fetchers,
|
|
25
|
+
options: providedOptions
|
|
26
|
+
}),
|
|
27
|
+
...providedOptions
|
|
28
|
+
};
|
|
29
|
+
const creation = await producePreset(preset, {
|
|
30
|
+
fetchers,
|
|
20
31
|
mode: "initialize",
|
|
21
32
|
options
|
|
22
33
|
});
|
|
23
34
|
return await recursivelyFormat(creation.files);
|
|
24
35
|
}
|
|
25
36
|
return {
|
|
26
|
-
".github": await createDotGitHub(
|
|
37
|
+
".github": await createDotGitHub(providedOptions),
|
|
27
38
|
".husky": createDotHusky(),
|
|
28
|
-
".vscode": await createDotVSCode(
|
|
29
|
-
...
|
|
30
|
-
|
|
39
|
+
".vscode": await createDotVSCode(providedOptions),
|
|
40
|
+
...providedOptions.mode !== "migrate" && {
|
|
41
|
+
src: await createSrc(providedOptions)
|
|
42
|
+
},
|
|
43
|
+
...await createRootFiles(providedOptions)
|
|
31
44
|
};
|
|
32
45
|
}
|
|
33
46
|
async function recursivelyFormat(files) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/steps/writing/creation/index.ts"],"sourcesContent":["import {
|
|
1
|
+
{"version":3,"sources":["../../../../src/steps/writing/creation/index.ts"],"sourcesContent":["import {\n\tCreatedFiles,\n\tproduceBase,\n\tproducePreset,\n\tSystemFetchers,\n} from \"create\";\nimport prettier from \"prettier\";\n\nimport { presetCommon } from \"../../../next/presets/presetCommon.js\";\nimport { presetEverything } from \"../../../next/presets/presetEverything.js\";\nimport { presetMinimal } from \"../../../next/presets/presetMinimal.js\";\nimport { Options } from \"../../../shared/types.js\";\nimport { Structure } from \"../types.js\";\nimport { createDotGitHub } from \"./dotGitHub/index.js\";\nimport { createDotHusky } from \"./dotHusky.js\";\nimport { createDotVSCode } from \"./dotVSCode.js\";\nimport { createRootFiles } from \"./rootFiles.js\";\nimport { createSrc } from \"./src.js\";\n\nconst presets = {\n\tcommon: presetCommon,\n\teverything: presetEverything,\n\tminimal: presetMinimal,\n};\n\nexport async function createStructure(\n\tprovidedOptions: Options,\n\tuseNextEngine: boolean,\n\tfetchers?: SystemFetchers,\n): Promise<Structure> {\n\tconst preset =\n\t\tuseNextEngine &&\n\t\tprovidedOptions.base &&\n\t\tprovidedOptions.base !== \"prompt\" &&\n\t\tpresets[providedOptions.base];\n\n\tif (preset) {\n\t\tconst options = {\n\t\t\t...(await produceBase(preset.base, {\n\t\t\t\tfetchers,\n\t\t\t\toptions: providedOptions,\n\t\t\t})),\n\t\t\t...providedOptions,\n\t\t};\n\t\tconst creation = await producePreset(preset, {\n\t\t\tfetchers,\n\t\t\tmode: \"initialize\",\n\t\t\toptions,\n\t\t});\n\n\t\treturn await recursivelyFormat(creation.files);\n\t}\n\n\treturn {\n\t\t\".github\": await createDotGitHub(providedOptions),\n\t\t\".husky\": createDotHusky(),\n\t\t\".vscode\": await createDotVSCode(providedOptions),\n\t\t...(providedOptions.mode !== \"migrate\" && {\n\t\t\tsrc: await createSrc(providedOptions),\n\t\t}),\n\t\t...(await createRootFiles(providedOptions)),\n\t};\n}\n\nasync function recursivelyFormat(files: CreatedFiles): Promise<Structure> {\n\tconst result: Structure = {};\n\n\tfor (const [key, value] of Object.entries(files)) {\n\t\tif (Array.isArray(value)) {\n\t\t\tresult[key] = await formatCreatedFile(key, value[0]);\n\t\t} else if (typeof value === \"string\") {\n\t\t\tresult[key] = await formatCreatedFile(key, value);\n\t\t} else if (typeof value === \"object\") {\n\t\t\tresult[key] = await recursivelyFormat(value);\n\t\t}\n\t}\n\n\treturn result;\n}\n\nconst asYaml = new Set([\n\t\".gitignore\",\n\t\".markdownlintignore\",\n\t\".nvmrc\",\n\t\".prettierignore\",\n\t\"pre-commit\",\n]);\n\nasync function formatCreatedFile(filepath: string, entry: string) {\n\t// For now, explicit yml files internally already have formatting applied\n\tif (filepath.endsWith(\".yml\")) {\n\t\treturn entry;\n\t}\n\n\treturn await prettier.format(entry, {\n\t\tuseTabs: true,\n\t\t...(asYaml.has(filepath) ? { parser: \"yaml\" } : { filepath }),\n\t});\n}\n"],"mappings":"AAAA;AAAA,EAEC;AAAA,EACA;AAAA,OAEM;AACP,OAAO,cAAc;AAErB,SAAS,oBAAoB;AAC7B,SAAS,wBAAwB;AACjC,SAAS,qBAAqB;AAG9B,SAAS,uBAAuB;AAChC,SAAS,sBAAsB;AAC/B,SAAS,uBAAuB;AAChC,SAAS,uBAAuB;AAChC,SAAS,iBAAiB;AAE1B,MAAM,UAAU;AAAA,EACf,QAAQ;AAAA,EACR,YAAY;AAAA,EACZ,SAAS;AACV;AAEA,eAAsB,gBACrB,iBACA,eACA,UACqB;AACrB,QAAM,SACL,iBACA,gBAAgB,QAChB,gBAAgB,SAAS,YACzB,QAAQ,gBAAgB,IAAI;AAE7B,MAAI,QAAQ;AACX,UAAM,UAAU;AAAA,MACf,GAAI,MAAM,YAAY,OAAO,MAAM;AAAA,QAClC;AAAA,QACA,SAAS;AAAA,MACV,CAAC;AAAA,MACD,GAAG;AAAA,IACJ;AACA,UAAM,WAAW,MAAM,cAAc,QAAQ;AAAA,MAC5C;AAAA,MACA,MAAM;AAAA,MACN;AAAA,IACD,CAAC;AAED,WAAO,MAAM,kBAAkB,SAAS,KAAK;AAAA,EAC9C;AAEA,SAAO;AAAA,IACN,WAAW,MAAM,gBAAgB,eAAe;AAAA,IAChD,UAAU,eAAe;AAAA,IACzB,WAAW,MAAM,gBAAgB,eAAe;AAAA,IAChD,GAAI,gBAAgB,SAAS,aAAa;AAAA,MACzC,KAAK,MAAM,UAAU,eAAe;AAAA,IACrC;AAAA,IACA,GAAI,MAAM,gBAAgB,eAAe;AAAA,EAC1C;AACD;AAEA,eAAe,kBAAkB,OAAyC;AACzE,QAAM,SAAoB,CAAC;AAE3B,aAAW,CAAC,KAAK,KAAK,KAAK,OAAO,QAAQ,KAAK,GAAG;AACjD,QAAI,MAAM,QAAQ,KAAK,GAAG;AACzB,aAAO,GAAG,IAAI,MAAM,kBAAkB,KAAK,MAAM,CAAC,CAAC;AAAA,IACpD,WAAW,OAAO,UAAU,UAAU;AACrC,aAAO,GAAG,IAAI,MAAM,kBAAkB,KAAK,KAAK;AAAA,IACjD,WAAW,OAAO,UAAU,UAAU;AACrC,aAAO,GAAG,IAAI,MAAM,kBAAkB,KAAK;AAAA,IAC5C;AAAA,EACD;AAEA,SAAO;AACR;AAEA,MAAM,SAAS,oBAAI,IAAI;AAAA,EACtB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACD,CAAC;AAED,eAAe,kBAAkB,UAAkB,OAAe;AAEjE,MAAI,SAAS,SAAS,MAAM,GAAG;AAC9B,WAAO;AAAA,EACR;AAEA,SAAO,MAAM,SAAS,OAAO,OAAO;AAAA,IACnC,SAAS;AAAA,IACT,GAAI,OAAO,IAAI,QAAQ,IAAI,EAAE,QAAQ,OAAO,IAAI,EAAE,SAAS;AAAA,EAC5D,CAAC;AACF;","names":[]}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { createCSpellConfig } from "./createCSpellConfig.js";
|
|
2
2
|
import { createDotGitignore } from "./createDotGitignore.js";
|
|
3
3
|
import { createESLintConfig } from "./createESLintConfig.js";
|
|
4
|
+
import { createKnipConfig } from "./createKnipConfig.js";
|
|
4
5
|
import { createTsupConfig } from "./createTsupConfig.js";
|
|
5
6
|
import { formatIgnoreFile } from "./formatters/formatIgnoreFile.js";
|
|
6
7
|
import { formatJson } from "./formatters/formatJson.js";
|
|
@@ -95,15 +96,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
|
95
96
|
"cspell.json": await createCSpellConfig(options)
|
|
96
97
|
},
|
|
97
98
|
...!options.excludeLintKnip && {
|
|
98
|
-
"knip.json": await
|
|
99
|
-
$schema: "https://unpkg.com/knip@latest/schema.json",
|
|
100
|
-
entry: ["src/index.ts!"],
|
|
101
|
-
ignoreExportsUsedInFile: {
|
|
102
|
-
interface: true,
|
|
103
|
-
type: true
|
|
104
|
-
},
|
|
105
|
-
project: ["src/**/*.ts!"]
|
|
106
|
-
})
|
|
99
|
+
"knip.json": await createKnipConfig()
|
|
107
100
|
},
|
|
108
101
|
"package.json": await writePackageJson(options),
|
|
109
102
|
"tsconfig.json": await formatJson({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/steps/writing/creation/rootFiles.ts"],"sourcesContent":["import { Options } from \"../../../shared/types.js\";\nimport { createCSpellConfig } from \"./createCSpellConfig.js\";\nimport { createDotGitignore } from \"./createDotGitignore.js\";\nimport { createESLintConfig } from \"./createESLintConfig.js\";\nimport { createTsupConfig } from \"./createTsupConfig.js\";\nimport { formatIgnoreFile } from \"./formatters/formatIgnoreFile.js\";\nimport { formatJson } from \"./formatters/formatJson.js\";\nimport { writeAllContributorsRC } from \"./writeAllContributorsRC.js\";\nimport { writePackageJson } from \"./writePackageJson.js\";\n\nexport async function createRootFiles(options: Options) {\n\treturn {\n\t\t\".all-contributorsrc\": await writeAllContributorsRC(options),\n\t\t\".gitignore\": createDotGitignore(options),\n\t\t\"eslint.config.js\": await createESLintConfig(options),\n\t\t...(!options.excludeLintMd && {\n\t\t\t\".markdownlint.json\": await formatJson({\n\t\t\t\textends: \"markdownlint/style/prettier\",\n\t\t\t\t\"first-line-h1\": false,\n\t\t\t\t\"no-inline-html\": false,\n\t\t\t}),\n\t\t\t\".markdownlintignore\": formatIgnoreFile([\n\t\t\t\t\".github/CODE_OF_CONDUCT.md\",\n\t\t\t\t\"CHANGELOG.md\",\n\t\t\t\t\"lib/\",\n\t\t\t\t\"node_modules/\",\n\t\t\t]),\n\t\t}),\n\t\t\".nvmrc\": `20.18.0\\n`,\n\t\t\".prettierignore\": formatIgnoreFile([\n\t\t\t...(options.excludeAllContributors ? [] : [\"/.all-contributorsrc\"]),\n\t\t\t\"/.husky\",\n\t\t\t...(options.excludeTests ? [] : [\"/coverage\"]),\n\t\t\t\"/lib\",\n\t\t\t\"/pnpm-lock.yaml\",\n\t\t]),\n\t\t\".prettierrc.json\": await formatJson({\n\t\t\t$schema: \"http://json.schemastore.org/prettierrc\",\n\t\t\toverrides: [\n\t\t\t\t{\n\t\t\t\t\tfiles: \".nvmrc\",\n\t\t\t\t\toptions: { parser: \"yaml\" },\n\t\t\t\t},\n\t\t\t],\n\t\t\tplugins: [\n\t\t\t\t\"prettier-plugin-curly\",\n\t\t\t\t\"prettier-plugin-packagejson\",\n\t\t\t\t\"prettier-plugin-sh\",\n\t\t\t],\n\t\t\tuseTabs: true,\n\t\t}),\n\t\t...(!options.excludeReleases && {\n\t\t\t\".release-it.json\": await formatJson({\n\t\t\t\tgit: {\n\t\t\t\t\tcommitMessage: \"chore: release v${version}\",\n\t\t\t\t\trequireCommits: true,\n\t\t\t\t},\n\t\t\t\tgithub: {\n\t\t\t\t\tautoGenerate: true,\n\t\t\t\t\trelease: true,\n\t\t\t\t\treleaseName: \"v${version}\",\n\t\t\t\t},\n\t\t\t\tnpm: {\n\t\t\t\t\tpublishArgs: [`--access ${options.access}`, \"--provenance\"],\n\t\t\t\t},\n\t\t\t\tplugins: {\n\t\t\t\t\t\"@release-it/conventional-changelog\": {\n\t\t\t\t\t\tinfile: \"CHANGELOG.md\",\n\t\t\t\t\t\tpreset: \"angular\",\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t}),\n\t\t}),\n\t\t\"LICENSE.md\": `# MIT License\n\nPermission is hereby granted, free of charge, to any person obtaining\na copy of this software and associated documentation files (the\n'Software'), to deal in the Software without restriction, including\nwithout limitation the rights to use, copy, modify, merge, publish,\ndistribute, sublicense, and/or sell copies of the Software, and to\npermit persons to whom the Software is furnished to do so, subject to\nthe following conditions:\n\nThe above copyright notice and this permission notice shall be\nincluded in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\nIN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\nCLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\nTORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\nSOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n`,\n\t\t...(!options.excludeLintSpelling && {\n\t\t\t\"cspell.json\": await createCSpellConfig(options),\n\t\t}),\n\t\t...(!options.excludeLintKnip && {\n\t\t\t\"knip.json\": await
|
|
1
|
+
{"version":3,"sources":["../../../../src/steps/writing/creation/rootFiles.ts"],"sourcesContent":["import { Options } from \"../../../shared/types.js\";\nimport { createCSpellConfig } from \"./createCSpellConfig.js\";\nimport { createDotGitignore } from \"./createDotGitignore.js\";\nimport { createESLintConfig } from \"./createESLintConfig.js\";\nimport { createKnipConfig } from \"./createKnipConfig.js\";\nimport { createTsupConfig } from \"./createTsupConfig.js\";\nimport { formatIgnoreFile } from \"./formatters/formatIgnoreFile.js\";\nimport { formatJson } from \"./formatters/formatJson.js\";\nimport { writeAllContributorsRC } from \"./writeAllContributorsRC.js\";\nimport { writePackageJson } from \"./writePackageJson.js\";\n\nexport async function createRootFiles(options: Options) {\n\treturn {\n\t\t\".all-contributorsrc\": await writeAllContributorsRC(options),\n\t\t\".gitignore\": createDotGitignore(options),\n\t\t\"eslint.config.js\": await createESLintConfig(options),\n\t\t...(!options.excludeLintMd && {\n\t\t\t\".markdownlint.json\": await formatJson({\n\t\t\t\textends: \"markdownlint/style/prettier\",\n\t\t\t\t\"first-line-h1\": false,\n\t\t\t\t\"no-inline-html\": false,\n\t\t\t}),\n\t\t\t\".markdownlintignore\": formatIgnoreFile([\n\t\t\t\t\".github/CODE_OF_CONDUCT.md\",\n\t\t\t\t\"CHANGELOG.md\",\n\t\t\t\t\"lib/\",\n\t\t\t\t\"node_modules/\",\n\t\t\t]),\n\t\t}),\n\t\t\".nvmrc\": `20.18.0\\n`,\n\t\t\".prettierignore\": formatIgnoreFile([\n\t\t\t...(options.excludeAllContributors ? [] : [\"/.all-contributorsrc\"]),\n\t\t\t\"/.husky\",\n\t\t\t...(options.excludeTests ? [] : [\"/coverage\"]),\n\t\t\t\"/lib\",\n\t\t\t\"/pnpm-lock.yaml\",\n\t\t]),\n\t\t\".prettierrc.json\": await formatJson({\n\t\t\t$schema: \"http://json.schemastore.org/prettierrc\",\n\t\t\toverrides: [\n\t\t\t\t{\n\t\t\t\t\tfiles: \".nvmrc\",\n\t\t\t\t\toptions: { parser: \"yaml\" },\n\t\t\t\t},\n\t\t\t],\n\t\t\tplugins: [\n\t\t\t\t\"prettier-plugin-curly\",\n\t\t\t\t\"prettier-plugin-packagejson\",\n\t\t\t\t\"prettier-plugin-sh\",\n\t\t\t],\n\t\t\tuseTabs: true,\n\t\t}),\n\t\t...(!options.excludeReleases && {\n\t\t\t\".release-it.json\": await formatJson({\n\t\t\t\tgit: {\n\t\t\t\t\tcommitMessage: \"chore: release v${version}\",\n\t\t\t\t\trequireCommits: true,\n\t\t\t\t},\n\t\t\t\tgithub: {\n\t\t\t\t\tautoGenerate: true,\n\t\t\t\t\trelease: true,\n\t\t\t\t\treleaseName: \"v${version}\",\n\t\t\t\t},\n\t\t\t\tnpm: {\n\t\t\t\t\tpublishArgs: [`--access ${options.access}`, \"--provenance\"],\n\t\t\t\t},\n\t\t\t\tplugins: {\n\t\t\t\t\t\"@release-it/conventional-changelog\": {\n\t\t\t\t\t\tinfile: \"CHANGELOG.md\",\n\t\t\t\t\t\tpreset: \"angular\",\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t}),\n\t\t}),\n\t\t\"LICENSE.md\": `# MIT License\n\nPermission is hereby granted, free of charge, to any person obtaining\na copy of this software and associated documentation files (the\n'Software'), to deal in the Software without restriction, including\nwithout limitation the rights to use, copy, modify, merge, publish,\ndistribute, sublicense, and/or sell copies of the Software, and to\npermit persons to whom the Software is furnished to do so, subject to\nthe following conditions:\n\nThe above copyright notice and this permission notice shall be\nincluded in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\nIN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\nCLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\nTORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\nSOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n`,\n\t\t...(!options.excludeLintSpelling && {\n\t\t\t\"cspell.json\": await createCSpellConfig(options),\n\t\t}),\n\t\t...(!options.excludeLintKnip && {\n\t\t\t\"knip.json\": await createKnipConfig(),\n\t\t}),\n\t\t\"package.json\": await writePackageJson(options),\n\t\t\"tsconfig.json\": await formatJson({\n\t\t\tcompilerOptions: {\n\t\t\t\tdeclaration: true,\n\t\t\t\tdeclarationMap: true,\n\t\t\t\tesModuleInterop: true,\n\t\t\t\tmodule: \"NodeNext\",\n\t\t\t\tmoduleResolution: \"NodeNext\",\n\t\t\t\tnoEmit: true,\n\t\t\t\tresolveJsonModule: true,\n\t\t\t\tskipLibCheck: true,\n\t\t\t\tsourceMap: true,\n\t\t\t\tstrict: true,\n\t\t\t\ttarget: \"ES2022\",\n\t\t\t},\n\t\t\tinclude: [\"src\"],\n\t\t}),\n\t\t\"tsup.config.ts\": await createTsupConfig(options),\n\t\t...(!options.excludeTests && {\n\t\t\t\"vitest.config.ts\": `import { defineConfig } from \"vitest/config\";\n\nexport default defineConfig({\n\ttest: {\n\t\tclearMocks: true,\n\t\tcoverage: {\n\t\t\tall: true,\n\t\t\texclude: [\"lib\"],\n\t\t\tinclude: [\"src\"],\n\t\t\treporter: [\"html\", \"lcov\"],\n\t\t},\n\t\texclude: [\"lib\", \"node_modules\"],\n\t\tsetupFiles: [\"console-fail-test/setup\"],\n\t},\n});\n`,\n\t\t}),\n\t};\n}\n"],"mappings":"AACA,SAAS,0BAA0B;AACnC,SAAS,0BAA0B;AACnC,SAAS,0BAA0B;AACnC,SAAS,wBAAwB;AACjC,SAAS,wBAAwB;AACjC,SAAS,wBAAwB;AACjC,SAAS,kBAAkB;AAC3B,SAAS,8BAA8B;AACvC,SAAS,wBAAwB;AAEjC,eAAsB,gBAAgB,SAAkB;AACvD,SAAO;AAAA,IACN,uBAAuB,MAAM,uBAAuB,OAAO;AAAA,IAC3D,cAAc,mBAAmB,OAAO;AAAA,IACxC,oBAAoB,MAAM,mBAAmB,OAAO;AAAA,IACpD,GAAI,CAAC,QAAQ,iBAAiB;AAAA,MAC7B,sBAAsB,MAAM,WAAW;AAAA,QACtC,SAAS;AAAA,QACT,iBAAiB;AAAA,QACjB,kBAAkB;AAAA,MACnB,CAAC;AAAA,MACD,uBAAuB,iBAAiB;AAAA,QACvC;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,MACD,CAAC;AAAA,IACF;AAAA,IACA,UAAU;AAAA;AAAA,IACV,mBAAmB,iBAAiB;AAAA,MACnC,GAAI,QAAQ,yBAAyB,CAAC,IAAI,CAAC,sBAAsB;AAAA,MACjE;AAAA,MACA,GAAI,QAAQ,eAAe,CAAC,IAAI,CAAC,WAAW;AAAA,MAC5C;AAAA,MACA;AAAA,IACD,CAAC;AAAA,IACD,oBAAoB,MAAM,WAAW;AAAA,MACpC,SAAS;AAAA,MACT,WAAW;AAAA,QACV;AAAA,UACC,OAAO;AAAA,UACP,SAAS,EAAE,QAAQ,OAAO;AAAA,QAC3B;AAAA,MACD;AAAA,MACA,SAAS;AAAA,QACR;AAAA,QACA;AAAA,QACA;AAAA,MACD;AAAA,MACA,SAAS;AAAA,IACV,CAAC;AAAA,IACD,GAAI,CAAC,QAAQ,mBAAmB;AAAA,MAC/B,oBAAoB,MAAM,WAAW;AAAA,QACpC,KAAK;AAAA,UACJ,eAAe;AAAA,UACf,gBAAgB;AAAA,QACjB;AAAA,QACA,QAAQ;AAAA,UACP,cAAc;AAAA,UACd,SAAS;AAAA,UACT,aAAa;AAAA,QACd;AAAA,QACA,KAAK;AAAA,UACJ,aAAa,CAAC,YAAY,QAAQ,MAAM,IAAI,cAAc;AAAA,QAC3D;AAAA,QACA,SAAS;AAAA,UACR,sCAAsC;AAAA,YACrC,QAAQ;AAAA,YACR,QAAQ;AAAA,UACT;AAAA,QACD;AAAA,MACD,CAAC;AAAA,IACF;AAAA,IACA,cAAc;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAqBd,GAAI,CAAC,QAAQ,uBAAuB;AAAA,MACnC,eAAe,MAAM,mBAAmB,OAAO;AAAA,IAChD;AAAA,IACA,GAAI,CAAC,QAAQ,mBAAmB;AAAA,MAC/B,aAAa,MAAM,iBAAiB;AAAA,IACrC;AAAA,IACA,gBAAgB,MAAM,iBAAiB,OAAO;AAAA,IAC9C,iBAAiB,MAAM,WAAW;AAAA,MACjC,iBAAiB;AAAA,QAChB,aAAa;AAAA,QACb,gBAAgB;AAAA,QAChB,iBAAiB;AAAA,QACjB,QAAQ;AAAA,QACR,kBAAkB;AAAA,QAClB,QAAQ;AAAA,QACR,mBAAmB;AAAA,QACnB,cAAc;AAAA,QACd,WAAW;AAAA,QACX,QAAQ;AAAA,QACR,QAAQ;AAAA,MACT;AAAA,MACA,SAAS,CAAC,KAAK;AAAA,IAChB,CAAC;AAAA,IACD,kBAAkB,MAAM,iBAAiB,OAAO;AAAA,IAChD,GAAI,CAAC,QAAQ,gBAAgB;AAAA,MAC5B,oBAAoB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAgBrB;AAAA,EACD;AACD;","names":[]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-typescript-app",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.80.0",
|
|
4
4
|
"description": "Quickstart-friendly TypeScript template with comprehensive, configurable, opinionated tooling. ❤️🔥",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
"scripts": {
|
|
25
25
|
"build": "tsup",
|
|
26
26
|
"format": "prettier .",
|
|
27
|
-
"initialize": "tsx ./bin/index.js --mode initialize",
|
|
27
|
+
"initialize": "pnpm build --no-dts && tsx ./bin/index.js --mode initialize",
|
|
28
28
|
"lint": "eslint . --max-warnings 0",
|
|
29
29
|
"lint:knip": "knip",
|
|
30
30
|
"lint:md": "markdownlint \"**/*.md\" \".github/**/*.md\" --rules sentences-per-line",
|
|
@@ -41,24 +41,29 @@
|
|
|
41
41
|
"*": "prettier --ignore-unknown --write"
|
|
42
42
|
},
|
|
43
43
|
"dependencies": {
|
|
44
|
-
"@clack/prompts": "^0.
|
|
44
|
+
"@clack/prompts": "^0.9.0",
|
|
45
45
|
"@prettier/sync": "^0.5.2",
|
|
46
|
-
"chalk": "^5.
|
|
47
|
-
"create": "0.1.0-alpha.
|
|
46
|
+
"chalk": "^5.4.1",
|
|
47
|
+
"create": "0.1.0-alpha.8",
|
|
48
|
+
"cspell-populate-words": "^0.3.0",
|
|
48
49
|
"execa": "^9.5.2",
|
|
49
50
|
"git-remote-origin-url": "^4.0.0",
|
|
50
51
|
"git-url-parse": "^16.0.0",
|
|
51
|
-
"
|
|
52
|
-
"input-from-file
|
|
52
|
+
"image-size": "^1.2.0",
|
|
53
|
+
"input-from-file": "0.1.0-alpha.4",
|
|
54
|
+
"input-from-file-json": "0.1.0-alpha.4",
|
|
55
|
+
"input-from-script": "0.1.0-alpha.4",
|
|
53
56
|
"js-yaml": "^4.1.0",
|
|
54
57
|
"lazy-value": "^3.0.0",
|
|
55
58
|
"npm-user": "^6.1.1",
|
|
59
|
+
"object-strings-deep": "^0.1.1",
|
|
56
60
|
"octokit": "^4.0.2",
|
|
57
61
|
"octokit-from-auth": "^0.3.0",
|
|
58
62
|
"parse-author": "^2.0.0",
|
|
59
63
|
"parse-package-name": "^1.0.0",
|
|
60
64
|
"populate-all-contributors-for-repository": "^0.1.2",
|
|
61
65
|
"prettier": "^3.4.2",
|
|
66
|
+
"remove-undefined-objects": "^5.0.0",
|
|
62
67
|
"replace-in-file": "^8.3.0",
|
|
63
68
|
"rimraf": "^6.0.1",
|
|
64
69
|
"set-github-repository-labels": "^0.1.0",
|
|
@@ -78,26 +83,26 @@
|
|
|
78
83
|
"@types/node": "22.10.2",
|
|
79
84
|
"@types/parse-author": "2.0.3",
|
|
80
85
|
"@vitest/coverage-v8": "2.1.8",
|
|
81
|
-
"@vitest/eslint-plugin": "1.1.
|
|
86
|
+
"@vitest/eslint-plugin": "1.1.20",
|
|
82
87
|
"all-contributors-cli": "6.26.1",
|
|
83
88
|
"c8": "10.1.3",
|
|
84
89
|
"console-fail-test": "0.5.0",
|
|
85
|
-
"create-testers": "0.1.0-alpha.
|
|
90
|
+
"create-testers": "0.1.0-alpha.8",
|
|
86
91
|
"cspell": "8.17.1",
|
|
87
92
|
"eslint": "9.17.0",
|
|
88
93
|
"eslint-plugin-jsdoc": "50.6.1",
|
|
89
94
|
"eslint-plugin-jsonc": "2.18.2",
|
|
90
95
|
"eslint-plugin-markdown": "5.1.0",
|
|
91
|
-
"eslint-plugin-n": "17.15.
|
|
96
|
+
"eslint-plugin-n": "17.15.1",
|
|
92
97
|
"eslint-plugin-package-json": "0.18.0",
|
|
93
|
-
"eslint-plugin-perfectionist": "4.
|
|
98
|
+
"eslint-plugin-perfectionist": "4.4.0",
|
|
94
99
|
"eslint-plugin-regexp": "2.7.0",
|
|
95
100
|
"eslint-plugin-yml": "1.16.0",
|
|
96
101
|
"globby": "14.0.2",
|
|
97
102
|
"husky": "9.1.7",
|
|
98
|
-
"knip": "5.41.
|
|
103
|
+
"knip": "5.41.1",
|
|
99
104
|
"lint-staged": "15.2.11",
|
|
100
|
-
"markdownlint": "0.37.
|
|
105
|
+
"markdownlint": "0.37.2",
|
|
101
106
|
"markdownlint-cli": "0.43.0",
|
|
102
107
|
"prettier-plugin-curly": "0.3.1",
|
|
103
108
|
"prettier-plugin-packagejson": "2.5.6",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/next/presetCommon.ts"],"sourcesContent":["import { base } from \"./base.js\";\nimport { blockAllContributors } from \"./blocks/blockAllContributors.js\";\nimport { blockReleaseIt } from \"./blocks/blockReleaseIt.js\";\nimport { blockVitest } from \"./blocks/blockVitest.js\";\nimport { presetMinimal } from \"./presetMinimal.js\";\n\nexport const presetCommon = base.createPreset({\n\tabout: {\n\t\tdescription:\n\t\t\t\"Bare starters plus testing and automation for all-contributors and releases.\",\n\t\tname: \"Common\",\n\t},\n\tblocks: [\n\t\t...presetMinimal.blocks,\n\t\tblockAllContributors,\n\t\tblockReleaseIt,\n\t\tblockVitest,\n\t],\n});\n"],"mappings":"AAAA,SAAS,YAAY;AACrB,SAAS,4BAA4B;AACrC,SAAS,sBAAsB;AAC/B,SAAS,mBAAmB;AAC5B,SAAS,qBAAqB;AAEvB,MAAM,eAAe,KAAK,aAAa;AAAA,EAC7C,OAAO;AAAA,IACN,aACC;AAAA,IACD,MAAM;AAAA,EACP;AAAA,EACA,QAAQ;AAAA,IACP,GAAG,cAAc;AAAA,IACjB;AAAA,IACA;AAAA,IACA;AAAA,EACD;AACD,CAAC;","names":[]}
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
import { base } from "./base.js";
|
|
2
|
-
import { blockCSpell } from "./blocks/blockCSpell.js";
|
|
3
|
-
import { blockESLintComments } from "./blocks/blockESLintComments.js";
|
|
4
|
-
import { blockESLintJSDoc } from "./blocks/blockESLintJSDoc.js";
|
|
5
|
-
import { blockESLintJSONC } from "./blocks/blockESLintJSONC.js";
|
|
6
|
-
import { blockESLintMarkdown } from "./blocks/blockESLintMarkdown.js";
|
|
7
|
-
import { blockESLintMoreStyling } from "./blocks/blockESLintMoreStyling.js";
|
|
8
|
-
import { blockESLintNode } from "./blocks/blockESLintNode.js";
|
|
9
|
-
import { blockESLintPackageJson } from "./blocks/blockESLintPackageJson.js";
|
|
10
|
-
import { blockESLintPerfectionist } from "./blocks/blockESLintPerfectionist.js";
|
|
11
|
-
import { blockESLintRegexp } from "./blocks/blockESLintRegexp.js";
|
|
12
|
-
import { blockESLintYML } from "./blocks/blockESLintYML.js";
|
|
13
|
-
import { blockKnip } from "./blocks/blockKnip.js";
|
|
14
|
-
import { blockMarkdownlint } from "./blocks/blockMarkdownlint.js";
|
|
15
|
-
import { blockNvmrc } from "./blocks/blockNvmrc.js";
|
|
16
|
-
import { blockPnpmDedupe } from "./blocks/blockPnpmDedupe.js";
|
|
17
|
-
import { blockPRCompliance } from "./blocks/blockPRCompliance.js";
|
|
18
|
-
import { blockPrettierPluginCurly } from "./blocks/blockPrettierPluginCurly.js";
|
|
19
|
-
import { blockPrettierPluginPackageJson } from "./blocks/blockPrettierPluginPackageJson.js";
|
|
20
|
-
import { blockPrettierPluginSh } from "./blocks/blockPrettierPluginSh.js";
|
|
21
|
-
import { blockRenovate } from "./blocks/blockRenovate.js";
|
|
22
|
-
import { blockSecurityDocs } from "./blocks/blockSecurityDocs.js";
|
|
23
|
-
import { blockVSCode } from "./blocks/blockVSCode.js";
|
|
24
|
-
import { presetCommon } from "./presetCommon.js";
|
|
25
|
-
const presetEverything = base.createPreset({
|
|
26
|
-
about: {
|
|
27
|
-
description: "The most comprehensive tooling imaginable: sorting, spellchecking, and more!",
|
|
28
|
-
name: "Everything"
|
|
29
|
-
},
|
|
30
|
-
blocks: [
|
|
31
|
-
...presetCommon.blocks,
|
|
32
|
-
blockCSpell,
|
|
33
|
-
blockESLintComments,
|
|
34
|
-
blockESLintJSDoc,
|
|
35
|
-
blockESLintJSONC,
|
|
36
|
-
blockESLintMarkdown,
|
|
37
|
-
blockESLintMoreStyling,
|
|
38
|
-
blockESLintNode,
|
|
39
|
-
blockESLintPackageJson,
|
|
40
|
-
blockESLintPerfectionist,
|
|
41
|
-
blockESLintRegexp,
|
|
42
|
-
blockESLintYML,
|
|
43
|
-
blockKnip,
|
|
44
|
-
blockMarkdownlint,
|
|
45
|
-
blockNvmrc,
|
|
46
|
-
blockPnpmDedupe,
|
|
47
|
-
blockPRCompliance,
|
|
48
|
-
blockPrettierPluginCurly,
|
|
49
|
-
blockPrettierPluginPackageJson,
|
|
50
|
-
blockPrettierPluginSh,
|
|
51
|
-
blockRenovate,
|
|
52
|
-
blockSecurityDocs,
|
|
53
|
-
blockVSCode
|
|
54
|
-
]
|
|
55
|
-
});
|
|
56
|
-
export {
|
|
57
|
-
presetEverything
|
|
58
|
-
};
|
|
59
|
-
//# sourceMappingURL=presetEverything.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/next/presetEverything.ts"],"sourcesContent":["import { base } from \"./base.js\";\nimport { blockCSpell } from \"./blocks/blockCSpell.js\";\nimport { blockESLintComments } from \"./blocks/blockESLintComments.js\";\nimport { blockESLintJSDoc } from \"./blocks/blockESLintJSDoc.js\";\nimport { blockESLintJSONC } from \"./blocks/blockESLintJSONC.js\";\nimport { blockESLintMarkdown } from \"./blocks/blockESLintMarkdown.js\";\nimport { blockESLintMoreStyling } from \"./blocks/blockESLintMoreStyling.js\";\nimport { blockESLintNode } from \"./blocks/blockESLintNode.js\";\nimport { blockESLintPackageJson } from \"./blocks/blockESLintPackageJson.js\";\nimport { blockESLintPerfectionist } from \"./blocks/blockESLintPerfectionist.js\";\nimport { blockESLintRegexp } from \"./blocks/blockESLintRegexp.js\";\nimport { blockESLintYML } from \"./blocks/blockESLintYML.js\";\nimport { blockKnip } from \"./blocks/blockKnip.js\";\nimport { blockMarkdownlint } from \"./blocks/blockMarkdownlint.js\";\nimport { blockNvmrc } from \"./blocks/blockNvmrc.js\";\nimport { blockPnpmDedupe } from \"./blocks/blockPnpmDedupe.js\";\nimport { blockPRCompliance } from \"./blocks/blockPRCompliance.js\";\nimport { blockPrettierPluginCurly } from \"./blocks/blockPrettierPluginCurly.js\";\nimport { blockPrettierPluginPackageJson } from \"./blocks/blockPrettierPluginPackageJson.js\";\nimport { blockPrettierPluginSh } from \"./blocks/blockPrettierPluginSh.js\";\nimport { blockRenovate } from \"./blocks/blockRenovate.js\";\nimport { blockSecurityDocs } from \"./blocks/blockSecurityDocs.js\";\nimport { blockVSCode } from \"./blocks/blockVSCode.js\";\nimport { presetCommon } from \"./presetCommon.js\";\n\nexport const presetEverything = base.createPreset({\n\tabout: {\n\t\tdescription:\n\t\t\t\"The most comprehensive tooling imaginable: sorting, spellchecking, and more!\",\n\t\tname: \"Everything\",\n\t},\n\tblocks: [\n\t\t...presetCommon.blocks,\n\t\tblockCSpell,\n\t\tblockESLintComments,\n\t\tblockESLintJSDoc,\n\t\tblockESLintJSONC,\n\t\tblockESLintMarkdown,\n\t\tblockESLintMoreStyling,\n\t\tblockESLintNode,\n\t\tblockESLintPackageJson,\n\t\tblockESLintPerfectionist,\n\t\tblockESLintRegexp,\n\t\tblockESLintYML,\n\t\tblockKnip,\n\t\tblockMarkdownlint,\n\t\tblockNvmrc,\n\t\tblockPnpmDedupe,\n\t\tblockPRCompliance,\n\t\tblockPrettierPluginCurly,\n\t\tblockPrettierPluginPackageJson,\n\t\tblockPrettierPluginSh,\n\t\tblockRenovate,\n\t\tblockSecurityDocs,\n\t\tblockVSCode,\n\t],\n});\n"],"mappings":"AAAA,SAAS,YAAY;AACrB,SAAS,mBAAmB;AAC5B,SAAS,2BAA2B;AACpC,SAAS,wBAAwB;AACjC,SAAS,wBAAwB;AACjC,SAAS,2BAA2B;AACpC,SAAS,8BAA8B;AACvC,SAAS,uBAAuB;AAChC,SAAS,8BAA8B;AACvC,SAAS,gCAAgC;AACzC,SAAS,yBAAyB;AAClC,SAAS,sBAAsB;AAC/B,SAAS,iBAAiB;AAC1B,SAAS,yBAAyB;AAClC,SAAS,kBAAkB;AAC3B,SAAS,uBAAuB;AAChC,SAAS,yBAAyB;AAClC,SAAS,gCAAgC;AACzC,SAAS,sCAAsC;AAC/C,SAAS,6BAA6B;AACtC,SAAS,qBAAqB;AAC9B,SAAS,yBAAyB;AAClC,SAAS,mBAAmB;AAC5B,SAAS,oBAAoB;AAEtB,MAAM,mBAAmB,KAAK,aAAa;AAAA,EACjD,OAAO;AAAA,IACN,aACC;AAAA,IACD,MAAM;AAAA,EACP;AAAA,EACA,QAAQ;AAAA,IACP,GAAG,aAAa;AAAA,IAChB;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACD;AACD,CAAC;","names":[]}
|