create-typescript-app 2.63.1 → 2.64.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/lib/base.d.ts +2 -2
- package/lib/blocks/actions/steps.d.ts +2 -2
- package/lib/blocks/blockAllContributors.d.ts +1 -1
- package/lib/blocks/blockAreTheTypesWrong.d.ts +1 -1
- package/lib/blocks/blockCSpell.d.ts +1 -1
- package/lib/blocks/blockCTATransitions.d.ts +1 -1
- package/lib/blocks/blockCodecov.d.ts +1 -1
- package/lib/blocks/blockContributingDocs.d.ts +1 -1
- package/lib/blocks/blockContributorCovenant.d.ts +1 -1
- package/lib/blocks/blockDevelopmentDocs.d.ts +2 -2
- package/lib/blocks/blockESLint.d.ts +2 -2
- package/lib/blocks/blockESLintComments.d.ts +1 -1
- package/lib/blocks/blockESLintJSDoc.d.ts +1 -1
- package/lib/blocks/blockESLintJSONC.d.ts +1 -1
- package/lib/blocks/blockESLintMarkdown.d.ts +1 -1
- package/lib/blocks/blockESLintMoreStyling.d.ts +1 -1
- package/lib/blocks/blockESLintNode.d.ts +1 -1
- package/lib/blocks/blockESLintPackageJson.d.ts +1 -1
- package/lib/blocks/blockESLintPerfectionist.d.ts +1 -1
- package/lib/blocks/blockESLintPlugin.d.ts +1 -1
- package/lib/blocks/blockESLintRegexp.d.ts +1 -1
- package/lib/blocks/blockESLintYML.d.ts +1 -1
- package/lib/blocks/blockExampleFiles.d.ts +1 -1
- package/lib/blocks/blockExports.d.ts +1 -1
- package/lib/blocks/blockFunding.d.ts +1 -1
- package/lib/blocks/blockGitHubActionsCI.d.ts +2 -2
- package/lib/blocks/blockGitHubApps.d.ts +1 -1
- package/lib/blocks/blockGitHubIssueTemplates.d.ts +1 -1
- package/lib/blocks/blockGitHubPRTemplate.d.ts +1 -1
- package/lib/blocks/blockGitignore.d.ts +1 -1
- package/lib/blocks/blockKnip.d.ts +1 -1
- package/lib/blocks/blockMITLicense.d.ts +1 -1
- package/lib/blocks/blockNcc.d.ts +1 -1
- package/lib/blocks/blockNvmrc.d.ts +1 -1
- package/lib/blocks/blockOctoGuide.d.ts +1 -1
- package/lib/blocks/blockOctoGuideStrict.d.ts +1 -1
- package/lib/blocks/blockPackageJson.d.ts +4 -4
- package/lib/blocks/blockPnpmDedupe.d.ts +1 -1
- package/lib/blocks/blockPrettier.d.ts +1 -1
- package/lib/blocks/blockPrettierPluginCurly.d.ts +1 -1
- package/lib/blocks/blockPrettierPluginPackageJson.d.ts +1 -1
- package/lib/blocks/blockPrettierPluginSentencesPerLine.d.ts +1 -1
- package/lib/blocks/blockPrettierPluginSh.d.ts +1 -1
- package/lib/blocks/blockREADME.d.ts +2 -2
- package/lib/blocks/blockReleaseIt.d.ts +2 -2
- package/lib/blocks/blockRemoveDependencies.d.ts +1 -1
- package/lib/blocks/blockRemoveFiles.d.ts +1 -1
- package/lib/blocks/blockRemoveWorkflows.d.ts +1 -1
- package/lib/blocks/blockRenovate.d.ts +1 -1
- package/lib/blocks/blockRepositoryBranchRuleset.d.ts +1 -1
- package/lib/blocks/blockRepositoryLabels.d.ts +1 -1
- package/lib/blocks/blockRepositorySecrets.d.ts +1 -1
- package/lib/blocks/blockRepositorySettings.d.ts +1 -1
- package/lib/blocks/blockRepositorySettings.js +1 -0
- package/lib/blocks/blockRepositorySettings.js.map +1 -1
- package/lib/blocks/blockSecurityDocs.d.ts +1 -1
- package/lib/blocks/blockSideEffects.d.ts +1 -1
- package/lib/blocks/blockTSDown.d.ts +1 -1
- package/lib/blocks/blockTemplatedWith.d.ts +1 -1
- package/lib/blocks/blockTypeScript.d.ts +1 -1
- package/lib/blocks/blockTypeScript.js +1 -1
- package/lib/blocks/blockTypeScript.js.map +1 -1
- package/lib/blocks/blockVSCode.d.ts +1 -1
- package/lib/blocks/blockVitest.d.ts +2 -2
- package/lib/blocks/blockWebExt.d.ts +1 -1
- package/lib/blocks/eslint/mergeAllExtensions.d.ts +1 -1
- package/lib/blocks/eslint/schemas.d.ts +2 -2
- package/lib/blocks/index.d.ts +58 -58
- package/lib/index.d.ts +3 -3
- package/lib/presets/common.d.ts +2 -2
- package/lib/presets/everything.d.ts +2 -2
- package/lib/presets/index.d.ts +6 -6
- package/lib/presets/minimal.d.ts +2 -2
- package/lib/schemas.d.ts +6 -6
- package/lib/template.d.ts +2 -2
- package/package.json +2 -2
|
@@ -65,8 +65,8 @@ declare const blockRepositoryBranchRuleset: import("bingo-stratum").BlockWithAdd
|
|
|
65
65
|
version?: string | undefined;
|
|
66
66
|
words?: string[] | undefined;
|
|
67
67
|
workflowsVersions?: Record<string, Record<string, {
|
|
68
|
-
hash?: string | undefined;
|
|
69
68
|
pinned?: boolean | undefined;
|
|
69
|
+
hash?: string | undefined;
|
|
70
70
|
}>> | undefined;
|
|
71
71
|
}>;
|
|
72
72
|
//#endregion
|
|
@@ -63,8 +63,8 @@ declare const blockRepositoryLabels: import("bingo-stratum").BlockWithoutAddons<
|
|
|
63
63
|
version?: string | undefined;
|
|
64
64
|
words?: string[] | undefined;
|
|
65
65
|
workflowsVersions?: Record<string, Record<string, {
|
|
66
|
-
hash?: string | undefined;
|
|
67
66
|
pinned?: boolean | undefined;
|
|
67
|
+
hash?: string | undefined;
|
|
68
68
|
}>> | undefined;
|
|
69
69
|
}>;
|
|
70
70
|
//#endregion
|
|
@@ -68,8 +68,8 @@ declare const blockRepositorySecrets: import("bingo-stratum").BlockWithAddons<{
|
|
|
68
68
|
version?: string | undefined;
|
|
69
69
|
words?: string[] | undefined;
|
|
70
70
|
workflowsVersions?: Record<string, Record<string, {
|
|
71
|
-
hash?: string | undefined;
|
|
72
71
|
pinned?: boolean | undefined;
|
|
72
|
+
hash?: string | undefined;
|
|
73
73
|
}>> | undefined;
|
|
74
74
|
}>;
|
|
75
75
|
//#endregion
|
|
@@ -63,8 +63,8 @@ declare const blockRepositorySettings: import("bingo-stratum").BlockWithoutAddon
|
|
|
63
63
|
version?: string | undefined;
|
|
64
64
|
words?: string[] | undefined;
|
|
65
65
|
workflowsVersions?: Record<string, Record<string, {
|
|
66
|
-
hash?: string | undefined;
|
|
67
66
|
pinned?: boolean | undefined;
|
|
67
|
+
hash?: string | undefined;
|
|
68
68
|
}>> | undefined;
|
|
69
69
|
}>;
|
|
70
70
|
//#endregion
|
|
@@ -13,6 +13,7 @@ const blockRepositorySettings = base.createBlock({
|
|
|
13
13
|
allow_squash_merge: true,
|
|
14
14
|
delete_branch_on_merge: true,
|
|
15
15
|
description: htmlToTextSafe(options.description),
|
|
16
|
+
has_projects: false,
|
|
16
17
|
has_wiki: false,
|
|
17
18
|
owner: options.owner,
|
|
18
19
|
repo: options.repository,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"blockRepositorySettings.js","names":[],"sources":["../../src/blocks/blockRepositorySettings.ts"],"sourcesContent":["import { base } from \"../base.js\";\nimport { htmlToTextSafe } from \"../utils/htmlToTextSafe.js\";\n\nexport const blockRepositorySettings = base.createBlock({\n\tabout: {\n\t\tname: \"Repository Settings\",\n\t},\n\tproduce({ options }) {\n\t\tconst description = htmlToTextSafe(options.description);\n\n\t\treturn {\n\t\t\trequests: [\n\t\t\t\t{\n\t\t\t\t\tendpoint: \"PATCH /repos/{owner}/{repo}\",\n\t\t\t\t\tparameters: {\n\t\t\t\t\t\tallow_auto_merge: true,\n\t\t\t\t\t\tallow_merge_commit: false,\n\t\t\t\t\t\tallow_rebase_merge: false,\n\t\t\t\t\t\tallow_squash_merge: true,\n\t\t\t\t\t\tdelete_branch_on_merge: true,\n\t\t\t\t\t\tdescription,\n\t\t\t\t\t\thas_wiki: false,\n\t\t\t\t\t\towner: options.owner,\n\t\t\t\t\t\trepo: options.repository,\n\t\t\t\t\t\tsecurity_and_analysis: {\n\t\t\t\t\t\t\tsecret_scanning: {\n\t\t\t\t\t\t\t\tstatus: \"enabled\",\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tsecret_scanning_push_protection: {\n\t\t\t\t\t\t\t\tstatus: \"enabled\",\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t\tsquash_merge_commit_message: \"PR_BODY\",\n\t\t\t\t\t\tsquash_merge_commit_title: \"PR_TITLE\",\n\t\t\t\t\t},\n\t\t\t\t\ttype: \"octokit\",\n\t\t\t\t},\n\t\t\t],\n\t\t};\n\t},\n});\n"],"mappings":";;;AAGA,MAAa,0BAA0B,KAAK,YAAY;CACvD,OAAO,EACN,MAAM,sBACP;CACA,QAAQ,EAAE,WAAW;EAGpB,OAAO,EACN,UAAU,CACT;GACC,UAAU;GACV,YAAY;IACX,kBAAkB;IAClB,oBAAoB;IACpB,oBAAoB;IACpB,oBAAoB;IACpB,wBAAwB;IACxB,aAZgB,eAAe,QAAQ,WAY7B;IACV,UAAU;IACV,OAAO,QAAQ;IACf,MAAM,QAAQ;IACd,uBAAuB;KACtB,iBAAiB,EAChB,QAAQ,UACT;KACA,iCAAiC,EAChC,QAAQ,UACT;IACD;IACA,6BAA6B;IAC7B,2BAA2B;GAC5B;GACA,MAAM;EACP,CACD,EACD;CACD;AACD,CAAC"}
|
|
1
|
+
{"version":3,"file":"blockRepositorySettings.js","names":[],"sources":["../../src/blocks/blockRepositorySettings.ts"],"sourcesContent":["import { base } from \"../base.js\";\nimport { htmlToTextSafe } from \"../utils/htmlToTextSafe.js\";\n\nexport const blockRepositorySettings = base.createBlock({\n\tabout: {\n\t\tname: \"Repository Settings\",\n\t},\n\tproduce({ options }) {\n\t\tconst description = htmlToTextSafe(options.description);\n\n\t\treturn {\n\t\t\trequests: [\n\t\t\t\t{\n\t\t\t\t\tendpoint: \"PATCH /repos/{owner}/{repo}\",\n\t\t\t\t\tparameters: {\n\t\t\t\t\t\tallow_auto_merge: true,\n\t\t\t\t\t\tallow_merge_commit: false,\n\t\t\t\t\t\tallow_rebase_merge: false,\n\t\t\t\t\t\tallow_squash_merge: true,\n\t\t\t\t\t\tdelete_branch_on_merge: true,\n\t\t\t\t\t\tdescription,\n\t\t\t\t\t\thas_projects: false,\n\t\t\t\t\t\thas_wiki: false,\n\t\t\t\t\t\towner: options.owner,\n\t\t\t\t\t\trepo: options.repository,\n\t\t\t\t\t\tsecurity_and_analysis: {\n\t\t\t\t\t\t\tsecret_scanning: {\n\t\t\t\t\t\t\t\tstatus: \"enabled\",\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tsecret_scanning_push_protection: {\n\t\t\t\t\t\t\t\tstatus: \"enabled\",\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t\tsquash_merge_commit_message: \"PR_BODY\",\n\t\t\t\t\t\tsquash_merge_commit_title: \"PR_TITLE\",\n\t\t\t\t\t},\n\t\t\t\t\ttype: \"octokit\",\n\t\t\t\t},\n\t\t\t],\n\t\t};\n\t},\n});\n"],"mappings":";;;AAGA,MAAa,0BAA0B,KAAK,YAAY;CACvD,OAAO,EACN,MAAM,sBACP;CACA,QAAQ,EAAE,WAAW;EAGpB,OAAO,EACN,UAAU,CACT;GACC,UAAU;GACV,YAAY;IACX,kBAAkB;IAClB,oBAAoB;IACpB,oBAAoB;IACpB,oBAAoB;IACpB,wBAAwB;IACxB,aAZgB,eAAe,QAAQ,WAY7B;IACV,cAAc;IACd,UAAU;IACV,OAAO,QAAQ;IACf,MAAM,QAAQ;IACd,uBAAuB;KACtB,iBAAiB,EAChB,QAAQ,UACT;KACA,iCAAiC,EAChC,QAAQ,UACT;IACD;IACA,6BAA6B;IAC7B,2BAA2B;GAC5B;GACA,MAAM;EACP,CACD,EACD;CACD;AACD,CAAC"}
|
|
@@ -63,8 +63,8 @@ declare const blockSecurityDocs: import("bingo-stratum").BlockWithoutAddons<{
|
|
|
63
63
|
version?: string | undefined;
|
|
64
64
|
words?: string[] | undefined;
|
|
65
65
|
workflowsVersions?: Record<string, Record<string, {
|
|
66
|
-
hash?: string | undefined;
|
|
67
66
|
pinned?: boolean | undefined;
|
|
67
|
+
hash?: string | undefined;
|
|
68
68
|
}>> | undefined;
|
|
69
69
|
}>;
|
|
70
70
|
//#endregion
|
|
@@ -65,8 +65,8 @@ declare const blockSideEffects: import("bingo-stratum").BlockWithAddons<{
|
|
|
65
65
|
version?: string | undefined;
|
|
66
66
|
words?: string[] | undefined;
|
|
67
67
|
workflowsVersions?: Record<string, Record<string, {
|
|
68
|
-
hash?: string | undefined;
|
|
69
68
|
pinned?: boolean | undefined;
|
|
69
|
+
hash?: string | undefined;
|
|
70
70
|
}>> | undefined;
|
|
71
71
|
}>;
|
|
72
72
|
//#endregion
|
|
@@ -67,8 +67,8 @@ declare const blockTSDown: import("bingo-stratum").BlockWithAddons<{
|
|
|
67
67
|
version?: string | undefined;
|
|
68
68
|
words?: string[] | undefined;
|
|
69
69
|
workflowsVersions?: Record<string, Record<string, {
|
|
70
|
-
hash?: string | undefined;
|
|
71
70
|
pinned?: boolean | undefined;
|
|
71
|
+
hash?: string | undefined;
|
|
72
72
|
}>> | undefined;
|
|
73
73
|
}>;
|
|
74
74
|
//#endregion
|
|
@@ -63,8 +63,8 @@ declare const blockTemplatedWith: import("bingo-stratum").BlockWithoutAddons<{
|
|
|
63
63
|
version?: string | undefined;
|
|
64
64
|
words?: string[] | undefined;
|
|
65
65
|
workflowsVersions?: Record<string, Record<string, {
|
|
66
|
-
hash?: string | undefined;
|
|
67
66
|
pinned?: boolean | undefined;
|
|
67
|
+
hash?: string | undefined;
|
|
68
68
|
}>> | undefined;
|
|
69
69
|
}>;
|
|
70
70
|
//#endregion
|
|
@@ -175,8 +175,8 @@ declare const blockTypeScript: import("bingo-stratum").BlockWithAddons<{
|
|
|
175
175
|
version?: string | undefined;
|
|
176
176
|
words?: string[] | undefined;
|
|
177
177
|
workflowsVersions?: Record<string, Record<string, {
|
|
178
|
-
hash?: string | undefined;
|
|
179
178
|
pinned?: boolean | undefined;
|
|
179
|
+
hash?: string | undefined;
|
|
180
180
|
}>> | undefined;
|
|
181
181
|
}>;
|
|
182
182
|
//#endregion
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"blockTypeScript.js","names":[],"sources":["../../src/blocks/blockTypeScript.ts"],"sourcesContent":["import sortKeys from \"sort-keys\";\nimport { CompilerOptionsSchema } from \"zod-tsconfig\";\n\nimport { base } from \"../base.js\";\nimport { getPackageDependencies } from \"../data/packageData.js\";\nimport { getPrimaryBin } from \"./bin/getPrimaryBin.js\";\nimport { blockDevelopmentDocs } from \"./blockDevelopmentDocs.js\";\nimport { blockExampleFiles } from \"./blockExampleFiles.js\";\nimport { blockGitHubActionsCI } from \"./blockGitHubActionsCI.js\";\nimport { blockGitignore } from \"./blockGitignore.js\";\nimport { blockKnip } from \"./blockKnip.js\";\nimport { blockPackageJson } from \"./blockPackageJson.js\";\nimport { blockRemoveWorkflows } from \"./blockRemoveWorkflows.js\";\nimport { blockVitest } from \"./blockVitest.js\";\nimport { blockVSCode } from \"./blockVSCode.js\";\nimport { intakeFileAsJson } from \"./intake/intakeFileAsJson.js\";\n\nexport const blockTypeScript = base.createBlock({\n\tabout: {\n\t\tname: \"TypeScript\",\n\t},\n\taddons: {\n\t\tcompilerOptions: CompilerOptionsSchema.optional(),\n\t},\n\tintake({ files }) {\n\t\tconst raw = intakeFileAsJson(files, [\"tsconfig.json\"]);\n\t\tconst { data } = CompilerOptionsSchema.safeParse(raw?.compilerOptions);\n\t\tif (!data) {\n\t\t\treturn undefined;\n\t\t}\n\n\t\treturn {\n\t\t\tcompilerOptions: data,\n\t\t};\n\t},\n\tproduce({ addons, options }) {\n\t\tconst { compilerOptions } = addons;\n\t\tconst primaryBin = getPrimaryBin(options.bin, options.repository);\n\n\t\treturn {\n\t\t\taddons: [\n\t\t\t\tblockDevelopmentDocs({\n\t\t\t\t\tsections: {\n\t\t\t\t\t\t\"Type Checking\": {\n\t\t\t\t\t\t\tcontents: `\nYou should be able to see suggestions from [TypeScript](https://typescriptlang.org) in your editor for all open files.\n\nHowever, it can be useful to run the TypeScript command-line (\\`tsc\\`) to type check all files in \\`src/\\`:\n\n\\`\\`\\`shell\npnpm tsc\n\\`\\`\\`\n\nAdd \\`--watch\\` to keep the type checker running in a watch mode that updates the display as you save files:\n\n\\`\\`\\`shell\npnpm tsc --watch\n\\`\\`\\`\n`,\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t}),\n\t\t\t\tblockExampleFiles({\n\t\t\t\t\tfiles: {\n\t\t\t\t\t\t\"greet.ts\": `import { GreetOptions } from \"./types.js\";\n\n\texport function greet(options: GreetOptions | string) {\n\t\tconst {\n\t\t\tlogger = console.log.bind(console),\n\t\t\tmessage,\n\t\t\ttimes = 1,\n\t\t} = typeof options === \"string\" ? { message: options } : options;\n\n\t\tfor (let i = 0; i < times; i += 1) {\n\t\t\tlogger(message);\n\t\t}\n\t}\n\t`,\n\t\t\t\t\t\t\"index.ts\": `export * from \"./greet.js\";\nexport * from \"./types.js\";\n`,\n\t\t\t\t\t\t\"types.ts\": `export interface GreetOptions {\n\t\tlogger?: (message: string) => void;\n\t\tmessage: string;\n\t\ttimes?: number;\n\t}\n\t`,\n\t\t\t\t\t},\n\t\t\t\t\tusage: [\n\t\t\t\t\t\t`\\`\\`\\`shell\nnpm i ${options.repository}\n\\`\\`\\`\n\\`\\`\\`ts\nimport { greet } from \"${options.repository}\";\n\ngreet(\"Hello, world! ${options.emoji}\");\n\\`\\`\\``,\n\t\t\t\t\t],\n\t\t\t\t}),\n\t\t\t\tblockGitignore({\n\t\t\t\t\tignores: [\"/lib\"],\n\t\t\t\t}),\n\t\t\t\tblockGitHubActionsCI({\n\t\t\t\t\tjobs: [{ name: \"Type Check\", steps: [{ run: \"pnpm tsc\" }] }],\n\t\t\t\t}),\n\t\t\t\tblockKnip({\n\t\t\t\t\tproject: [\"src/**/*.ts\"],\n\t\t\t\t}),\n\t\t\t\tblockPackageJson({\n\t\t\t\t\tproperties: {\n\t\t\t\t\t\tdevDependencies: getPackageDependencies(\"typescript\"),\n\t\t\t\t\t\tfiles: [\"lib/\"],\n\t\t\t\t\t},\n\t\t\t\t}),\n\t\t\t\tblockVitest({ coverage: { include: [\"src\"] }, exclude: [\"lib\"] }),\n\t\t\t\tblockVSCode({\n\t\t\t\t\tdebuggers: primaryBin\n\t\t\t\t\t\t? [\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tname: \"Debug Program\",\n\t\t\t\t\t\t\t\t\tpreLaunchTask: \"build\",\n\t\t\t\t\t\t\t\t\tprogram: primaryBin,\n\t\t\t\t\t\t\t\t\trequest: \"launch\",\n\t\t\t\t\t\t\t\t\tskipFiles: [\"<node_internals>/**\"],\n\t\t\t\t\t\t\t\t\ttype: \"node\",\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t]\n\t\t\t\t\t\t: [],\n\t\t\t\t\tsettings: {\n\t\t\t\t\t\t\"typescript.tsdk\": \"node_modules/typescript/lib\",\n\t\t\t\t\t},\n\t\t\t\t\ttasks: [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tdetail: \"Build the project\",\n\t\t\t\t\t\t\tlabel: \"build\",\n\t\t\t\t\t\t\tscript: \"build\",\n\t\t\t\t\t\t\ttype: \"npm\",\n\t\t\t\t\t\t},\n\t\t\t\t\t],\n\t\t\t\t}),\n\t\t\t],\n\t\t\tfiles: {\n\t\t\t\t\"tsconfig.json\": JSON.stringify({\n\t\t\t\t\tcompilerOptions: sortKeys({\n\t\t\t\t\t\tdeclaration: true,\n\t\t\t\t\t\tdeclarationMap: true,\n\t\t\t\t\t\tesModuleInterop: true,\n\t\t\t\t\t\tmodule: \"NodeNext\",\n\t\t\t\t\t\tmoduleResolution: \"NodeNext\",\n\t\t\t\t\t\tnoEmit: true,\n\t\t\t\t\t\tresolveJsonModule: true,\n\t\t\t\t\t\tskipLibCheck: true,\n\t\t\t\t\t\tstrict: true,\n\t\t\t\t\t\ttarget: \"
|
|
1
|
+
{"version":3,"file":"blockTypeScript.js","names":[],"sources":["../../src/blocks/blockTypeScript.ts"],"sourcesContent":["import sortKeys from \"sort-keys\";\nimport { CompilerOptionsSchema } from \"zod-tsconfig\";\n\nimport { base } from \"../base.js\";\nimport { getPackageDependencies } from \"../data/packageData.js\";\nimport { getPrimaryBin } from \"./bin/getPrimaryBin.js\";\nimport { blockDevelopmentDocs } from \"./blockDevelopmentDocs.js\";\nimport { blockExampleFiles } from \"./blockExampleFiles.js\";\nimport { blockGitHubActionsCI } from \"./blockGitHubActionsCI.js\";\nimport { blockGitignore } from \"./blockGitignore.js\";\nimport { blockKnip } from \"./blockKnip.js\";\nimport { blockPackageJson } from \"./blockPackageJson.js\";\nimport { blockRemoveWorkflows } from \"./blockRemoveWorkflows.js\";\nimport { blockVitest } from \"./blockVitest.js\";\nimport { blockVSCode } from \"./blockVSCode.js\";\nimport { intakeFileAsJson } from \"./intake/intakeFileAsJson.js\";\n\nexport const blockTypeScript = base.createBlock({\n\tabout: {\n\t\tname: \"TypeScript\",\n\t},\n\taddons: {\n\t\tcompilerOptions: CompilerOptionsSchema.optional(),\n\t},\n\tintake({ files }) {\n\t\tconst raw = intakeFileAsJson(files, [\"tsconfig.json\"]);\n\t\tconst { data } = CompilerOptionsSchema.safeParse(raw?.compilerOptions);\n\t\tif (!data) {\n\t\t\treturn undefined;\n\t\t}\n\n\t\treturn {\n\t\t\tcompilerOptions: data,\n\t\t};\n\t},\n\tproduce({ addons, options }) {\n\t\tconst { compilerOptions } = addons;\n\t\tconst primaryBin = getPrimaryBin(options.bin, options.repository);\n\n\t\treturn {\n\t\t\taddons: [\n\t\t\t\tblockDevelopmentDocs({\n\t\t\t\t\tsections: {\n\t\t\t\t\t\t\"Type Checking\": {\n\t\t\t\t\t\t\tcontents: `\nYou should be able to see suggestions from [TypeScript](https://typescriptlang.org) in your editor for all open files.\n\nHowever, it can be useful to run the TypeScript command-line (\\`tsc\\`) to type check all files in \\`src/\\`:\n\n\\`\\`\\`shell\npnpm tsc\n\\`\\`\\`\n\nAdd \\`--watch\\` to keep the type checker running in a watch mode that updates the display as you save files:\n\n\\`\\`\\`shell\npnpm tsc --watch\n\\`\\`\\`\n`,\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t}),\n\t\t\t\tblockExampleFiles({\n\t\t\t\t\tfiles: {\n\t\t\t\t\t\t\"greet.ts\": `import { GreetOptions } from \"./types.js\";\n\n\texport function greet(options: GreetOptions | string) {\n\t\tconst {\n\t\t\tlogger = console.log.bind(console),\n\t\t\tmessage,\n\t\t\ttimes = 1,\n\t\t} = typeof options === \"string\" ? { message: options } : options;\n\n\t\tfor (let i = 0; i < times; i += 1) {\n\t\t\tlogger(message);\n\t\t}\n\t}\n\t`,\n\t\t\t\t\t\t\"index.ts\": `export * from \"./greet.js\";\nexport * from \"./types.js\";\n`,\n\t\t\t\t\t\t\"types.ts\": `export interface GreetOptions {\n\t\tlogger?: (message: string) => void;\n\t\tmessage: string;\n\t\ttimes?: number;\n\t}\n\t`,\n\t\t\t\t\t},\n\t\t\t\t\tusage: [\n\t\t\t\t\t\t`\\`\\`\\`shell\nnpm i ${options.repository}\n\\`\\`\\`\n\\`\\`\\`ts\nimport { greet } from \"${options.repository}\";\n\ngreet(\"Hello, world! ${options.emoji}\");\n\\`\\`\\``,\n\t\t\t\t\t],\n\t\t\t\t}),\n\t\t\t\tblockGitignore({\n\t\t\t\t\tignores: [\"/lib\"],\n\t\t\t\t}),\n\t\t\t\tblockGitHubActionsCI({\n\t\t\t\t\tjobs: [{ name: \"Type Check\", steps: [{ run: \"pnpm tsc\" }] }],\n\t\t\t\t}),\n\t\t\t\tblockKnip({\n\t\t\t\t\tproject: [\"src/**/*.ts\"],\n\t\t\t\t}),\n\t\t\t\tblockPackageJson({\n\t\t\t\t\tproperties: {\n\t\t\t\t\t\tdevDependencies: getPackageDependencies(\"typescript\"),\n\t\t\t\t\t\tfiles: [\"lib/\"],\n\t\t\t\t\t},\n\t\t\t\t}),\n\t\t\t\tblockVitest({ coverage: { include: [\"src\"] }, exclude: [\"lib\"] }),\n\t\t\t\tblockVSCode({\n\t\t\t\t\tdebuggers: primaryBin\n\t\t\t\t\t\t? [\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tname: \"Debug Program\",\n\t\t\t\t\t\t\t\t\tpreLaunchTask: \"build\",\n\t\t\t\t\t\t\t\t\tprogram: primaryBin,\n\t\t\t\t\t\t\t\t\trequest: \"launch\",\n\t\t\t\t\t\t\t\t\tskipFiles: [\"<node_internals>/**\"],\n\t\t\t\t\t\t\t\t\ttype: \"node\",\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t]\n\t\t\t\t\t\t: [],\n\t\t\t\t\tsettings: {\n\t\t\t\t\t\t\"typescript.tsdk\": \"node_modules/typescript/lib\",\n\t\t\t\t\t},\n\t\t\t\t\ttasks: [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tdetail: \"Build the project\",\n\t\t\t\t\t\t\tlabel: \"build\",\n\t\t\t\t\t\t\tscript: \"build\",\n\t\t\t\t\t\t\ttype: \"npm\",\n\t\t\t\t\t\t},\n\t\t\t\t\t],\n\t\t\t\t}),\n\t\t\t],\n\t\t\tfiles: {\n\t\t\t\t\"tsconfig.json\": JSON.stringify({\n\t\t\t\t\tcompilerOptions: sortKeys({\n\t\t\t\t\t\tdeclaration: true,\n\t\t\t\t\t\tdeclarationMap: true,\n\t\t\t\t\t\tesModuleInterop: true,\n\t\t\t\t\t\tmodule: \"NodeNext\",\n\t\t\t\t\t\tmoduleResolution: \"NodeNext\",\n\t\t\t\t\t\tnoEmit: true,\n\t\t\t\t\t\tresolveJsonModule: true,\n\t\t\t\t\t\tskipLibCheck: true,\n\t\t\t\t\t\tstrict: true,\n\t\t\t\t\t\ttarget: \"ES2023\",\n\t\t\t\t\t\t...compilerOptions,\n\t\t\t\t\t}),\n\t\t\t\t\tinclude: [\"src\"],\n\t\t\t\t}),\n\t\t\t},\n\t\t};\n\t},\n\ttransition() {\n\t\treturn {\n\t\t\taddons: [\n\t\t\t\tblockRemoveWorkflows({\n\t\t\t\t\tworkflows: [\"tsc\"],\n\t\t\t\t}),\n\t\t\t],\n\t\t};\n\t},\n});\n"],"mappings":";;;;;;;;;;;;;;;;AAiBA,MAAa,kBAAkB,KAAK,YAAY;CAC/C,OAAO,EACN,MAAM,aACP;CACA,QAAQ,EACP,iBAAiB,sBAAsB,SAAS,EACjD;CACA,OAAO,EAAE,SAAS;EACjB,MAAM,MAAM,iBAAiB,OAAO,CAAC,eAAe,CAAC;EACrD,MAAM,EAAE,SAAS,sBAAsB,UAAU,KAAK,eAAe;EACrE,IAAI,CAAC,MACJ;EAGD,OAAO,EACN,iBAAiB,KAClB;CACD;CACA,QAAQ,EAAE,QAAQ,WAAW;EAC5B,MAAM,EAAE,oBAAoB;EAC5B,MAAM,aAAa,cAAc,QAAQ,KAAK,QAAQ,UAAU;EAEhE,OAAO;GACN,QAAQ;IACP,qBAAqB,EACpB,UAAU,EACT,iBAAiB,EAChB,UAAU;;;;;;;;;;;;;;EAeX,EACD,EACD,CAAC;IACD,kBAAkB;KACjB,OAAO;MACN,YAAY;;;;;;;;;;;;;;MAcZ,YAAY;;;MAGZ,YAAY;;;;;;KAMb;KACA,OAAO,CACN;QACE,QAAQ,WAAW;;;yBAGF,QAAQ,WAAW;;uBAErB,QAAQ,MAAM;OAEhC;IACD,CAAC;IACD,eAAe,EACd,SAAS,CAAC,MAAM,EACjB,CAAC;IACD,qBAAqB,EACpB,MAAM,CAAC;KAAE,MAAM;KAAc,OAAO,CAAC,EAAE,KAAK,WAAW,CAAC;IAAE,CAAC,EAC5D,CAAC;IACD,UAAU,EACT,SAAS,CAAC,aAAa,EACxB,CAAC;IACD,iBAAiB,EAChB,YAAY;KACX,iBAAiB,uBAAuB,YAAY;KACpD,OAAO,CAAC,MAAM;IACf,EACD,CAAC;IACD,YAAY;KAAE,UAAU,EAAE,SAAS,CAAC,KAAK,EAAE;KAAG,SAAS,CAAC,KAAK;IAAE,CAAC;IAChE,YAAY;KACX,WAAW,aACR,CACA;MACC,MAAM;MACN,eAAe;MACf,SAAS;MACT,SAAS;MACT,WAAW,CAAC,qBAAqB;MACjC,MAAM;KACP,CACD,IACC,CAAC;KACJ,UAAU,EACT,mBAAmB,8BACpB;KACA,OAAO,CACN;MACC,QAAQ;MACR,OAAO;MACP,QAAQ;MACR,MAAM;KACP,CACD;IACD,CAAC;GACF;GACA,OAAO,EACN,iBAAiB,KAAK,UAAU;IAC/B,iBAAiB,SAAS;KACzB,aAAa;KACb,gBAAgB;KAChB,iBAAiB;KACjB,QAAQ;KACR,kBAAkB;KAClB,QAAQ;KACR,mBAAmB;KACnB,cAAc;KACd,QAAQ;KACR,QAAQ;KACR,GAAG;IACJ,CAAC;IACD,SAAS,CAAC,KAAK;GAChB,CAAC,EACF;EACD;CACD;CACA,aAAa;EACZ,OAAO,EACN,QAAQ,CACP,qBAAqB,EACpB,WAAW,CAAC,KAAK,EAClB,CAAC,CACF,EACD;CACD;AACD,CAAC"}
|
|
@@ -72,8 +72,8 @@ declare const blockVSCode: import("bingo-stratum").BlockWithAddons<{
|
|
|
72
72
|
version?: string | undefined;
|
|
73
73
|
words?: string[] | undefined;
|
|
74
74
|
workflowsVersions?: Record<string, Record<string, {
|
|
75
|
-
hash?: string | undefined;
|
|
76
75
|
pinned?: boolean | undefined;
|
|
76
|
+
hash?: string | undefined;
|
|
77
77
|
}>> | undefined;
|
|
78
78
|
}>;
|
|
79
79
|
//#endregion
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
declare const blockVitest: import("bingo-stratum").BlockWithAddons<{
|
|
3
3
|
exclude: string[];
|
|
4
4
|
actionSteps: ({
|
|
5
|
+
with?: Record<string, string> | undefined;
|
|
5
6
|
env?: Record<string, string> | undefined;
|
|
6
7
|
if?: string | undefined;
|
|
7
|
-
with?: Record<string, string> | undefined;
|
|
8
8
|
} & ({
|
|
9
9
|
run: string;
|
|
10
10
|
} | {
|
|
@@ -80,8 +80,8 @@ declare const blockVitest: import("bingo-stratum").BlockWithAddons<{
|
|
|
80
80
|
version?: string | undefined;
|
|
81
81
|
words?: string[] | undefined;
|
|
82
82
|
workflowsVersions?: Record<string, Record<string, {
|
|
83
|
-
hash?: string | undefined;
|
|
84
83
|
pinned?: boolean | undefined;
|
|
84
|
+
hash?: string | undefined;
|
|
85
85
|
}>> | undefined;
|
|
86
86
|
}>;
|
|
87
87
|
//#endregion
|
|
@@ -63,8 +63,8 @@ declare const blockWebExt: import("bingo-stratum").BlockWithoutAddons<{
|
|
|
63
63
|
version?: string | undefined;
|
|
64
64
|
words?: string[] | undefined;
|
|
65
65
|
workflowsVersions?: Record<string, Record<string, {
|
|
66
|
-
hash?: string | undefined;
|
|
67
66
|
pinned?: boolean | undefined;
|
|
67
|
+
hash?: string | undefined;
|
|
68
68
|
}>> | undefined;
|
|
69
69
|
}>;
|
|
70
70
|
//#endregion
|
|
@@ -6,11 +6,11 @@ declare function mergeAllExtensions(...extensions: Extension[]): {
|
|
|
6
6
|
entries: Record<string, "off" | "error" | "warn" | ["error" | "warn", unknown] | ["error" | "warn", unknown, unknown]>;
|
|
7
7
|
comment?: string | undefined;
|
|
8
8
|
}[] | undefined;
|
|
9
|
+
plugins?: Record<string, string> | undefined;
|
|
9
10
|
settings?: Record<string, unknown> | undefined;
|
|
10
11
|
extends?: string[] | undefined;
|
|
11
12
|
languageOptions?: unknown;
|
|
12
13
|
linterOptions?: unknown;
|
|
13
|
-
plugins?: Record<string, string> | undefined;
|
|
14
14
|
}[];
|
|
15
15
|
//#endregion
|
|
16
16
|
export { mergeAllExtensions };
|
|
@@ -61,22 +61,22 @@ declare const zExtension: z.ZodObject<{
|
|
|
61
61
|
entries: Record<string, "off" | "error" | "warn" | ["error" | "warn", unknown] | ["error" | "warn", unknown, unknown]>;
|
|
62
62
|
comment?: string | undefined;
|
|
63
63
|
}[] | undefined;
|
|
64
|
+
plugins?: Record<string, string> | undefined;
|
|
64
65
|
settings?: Record<string, unknown> | undefined;
|
|
65
66
|
extends?: string[] | undefined;
|
|
66
67
|
languageOptions?: unknown;
|
|
67
68
|
linterOptions?: unknown;
|
|
68
|
-
plugins?: Record<string, string> | undefined;
|
|
69
69
|
}, {
|
|
70
70
|
files: string[];
|
|
71
71
|
rules?: Record<string, "off" | "error" | "warn" | ["error" | "warn", unknown] | ["error" | "warn", unknown, unknown]> | {
|
|
72
72
|
entries: Record<string, "off" | "error" | "warn" | ["error" | "warn", unknown] | ["error" | "warn", unknown, unknown]>;
|
|
73
73
|
comment?: string | undefined;
|
|
74
74
|
}[] | undefined;
|
|
75
|
+
plugins?: Record<string, string> | undefined;
|
|
75
76
|
settings?: Record<string, unknown> | undefined;
|
|
76
77
|
extends?: string[] | undefined;
|
|
77
78
|
languageOptions?: unknown;
|
|
78
79
|
linterOptions?: unknown;
|
|
79
|
-
plugins?: Record<string, string> | undefined;
|
|
80
80
|
}>;
|
|
81
81
|
type Extension = z.infer<typeof zExtension>;
|
|
82
82
|
declare const zPackageImport: z.ZodObject<{
|