create-typescript-app 2.0.0-beta.9 → 2.2.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 +14 -15
- package/bin/index.js +3 -13
- package/lib/base.d.ts +5 -3
- package/lib/base.js +29 -15
- package/lib/base.js.map +1 -1
- package/lib/blocks/blockAllContributors.d.ts +6 -4
- package/lib/blocks/blockAllContributors.js +3 -2
- package/lib/blocks/blockAllContributors.js.map +1 -1
- package/lib/blocks/blockAreTheTypesWrong.d.ts +6 -4
- package/lib/blocks/blockCSpell.d.ts +6 -4
- package/lib/blocks/blockCSpell.js +13 -13
- package/lib/blocks/blockCSpell.js.map +1 -1
- package/lib/blocks/blockCodecov.d.ts +6 -4
- package/lib/blocks/blockCodecov.js +11 -11
- package/lib/blocks/blockCodecov.js.map +1 -1
- package/lib/blocks/blockContributingDocs.d.ts +6 -4
- package/lib/blocks/blockContributingDocs.js +11 -11
- package/lib/blocks/blockContributingDocs.js.map +1 -1
- package/lib/blocks/blockContributorCovenant.d.ts +6 -4
- package/lib/blocks/blockContributorCovenant.js +11 -11
- package/lib/blocks/blockContributorCovenant.js.map +1 -1
- package/lib/blocks/blockDevelopmentDocs.d.ts +6 -4
- package/lib/blocks/blockDevelopmentDocs.js +11 -11
- package/lib/blocks/blockDevelopmentDocs.js.map +1 -1
- package/lib/blocks/blockESLint.d.ts +6 -4
- package/lib/blocks/blockESLint.js +13 -12
- package/lib/blocks/blockESLint.js.map +1 -1
- package/lib/blocks/blockESLintComments.d.ts +6 -4
- package/lib/blocks/blockESLintJSDoc.d.ts +6 -4
- package/lib/blocks/blockESLintJSONC.d.ts +6 -4
- package/lib/blocks/blockESLintMarkdown.d.ts +6 -4
- package/lib/blocks/blockESLintMoreStyling.d.ts +6 -4
- package/lib/blocks/blockESLintNode.d.ts +6 -4
- package/lib/blocks/blockESLintPackageJson.d.ts +6 -4
- package/lib/blocks/blockESLintPerfectionist.d.ts +6 -4
- package/lib/blocks/blockESLintRegexp.d.ts +6 -4
- package/lib/blocks/blockESLintYML.d.ts +6 -4
- package/lib/blocks/blockExampleFiles.d.ts +6 -4
- package/lib/blocks/blockExampleFiles.js +3 -2
- package/lib/blocks/blockExampleFiles.js.map +1 -1
- package/lib/blocks/blockFunding.d.ts +6 -4
- package/lib/blocks/blockGitHubActionsCI.d.ts +6 -4
- package/lib/blocks/blockGitHubActionsCI.js +12 -13
- package/lib/blocks/blockGitHubActionsCI.js.map +1 -1
- package/lib/blocks/blockGitHubApps.d.ts +6 -4
- package/lib/blocks/blockGitHubIssueTemplates.d.ts +6 -4
- package/lib/blocks/blockGitHubPRTemplate.d.ts +6 -4
- package/lib/blocks/blockGitignore.d.ts +6 -4
- package/lib/blocks/blockKnip.d.ts +6 -4
- package/lib/blocks/blockKnip.js +11 -11
- package/lib/blocks/blockKnip.js.map +1 -1
- package/lib/blocks/blockMITLicense.d.ts +6 -4
- package/lib/blocks/blockMarkdownlint.d.ts +6 -4
- package/lib/blocks/blockNvmrc.d.ts +6 -4
- package/lib/blocks/blockPRCompliance.d.ts +6 -4
- package/lib/blocks/blockPackageJson.d.ts +6 -4
- package/lib/blocks/blockPackageJson.js +14 -11
- package/lib/blocks/blockPackageJson.js.map +1 -1
- package/lib/blocks/blockPnpmDedupe.d.ts +6 -4
- package/lib/blocks/blockPrettier.d.ts +6 -4
- package/lib/blocks/blockPrettier.js +11 -10
- package/lib/blocks/blockPrettier.js.map +1 -1
- package/lib/blocks/blockPrettierPluginCurly.d.ts +6 -4
- package/lib/blocks/blockPrettierPluginPackageJson.d.ts +6 -4
- package/lib/blocks/blockPrettierPluginSh.d.ts +6 -4
- package/lib/blocks/blockREADME.d.ts +6 -4
- package/lib/blocks/blockReleaseIt.d.ts +6 -4
- package/lib/blocks/blockReleaseIt.js +0 -1
- package/lib/blocks/blockReleaseIt.js.map +1 -1
- package/lib/blocks/blockRenovate.d.ts +6 -4
- package/lib/blocks/blockRepositoryBranchRuleset.d.ts +6 -4
- package/lib/blocks/blockRepositoryBranchRuleset.js +78 -54
- package/lib/blocks/blockRepositoryBranchRuleset.js.map +1 -1
- package/lib/blocks/blockRepositoryLabels.d.ts +6 -4
- package/lib/blocks/blockRepositorySecrets.d.ts +7 -5
- package/lib/blocks/blockRepositorySettings.d.ts +6 -4
- package/lib/blocks/blockSecurityDocs.d.ts +6 -4
- package/lib/blocks/blockTSup.d.ts +6 -4
- package/lib/blocks/blockTSup.js +18 -18
- package/lib/blocks/blockTSup.js.map +1 -1
- package/lib/blocks/blockTemplatedWith.d.ts +6 -4
- package/lib/blocks/blockTemplatedWith.js +2 -2
- package/lib/blocks/blockTemplatedWith.js.map +1 -1
- package/lib/blocks/blockTypeScript.d.ts +6 -4
- package/lib/blocks/blockVSCode.d.ts +6 -4
- package/lib/blocks/blockVitest.d.ts +6 -4
- package/lib/blocks/blockVitest.js +22 -19
- package/lib/blocks/blockVitest.js.map +1 -1
- package/lib/blocks/index.d.ts +216 -130
- package/lib/data/contributions.d.ts +3 -0
- package/lib/data/contributions.js +14 -0
- package/lib/data/contributions.js.map +1 -0
- package/lib/data/packageData.d.ts +41 -37
- package/lib/index.d.ts +157 -3
- package/lib/index.js +4 -2
- package/lib/index.js.map +1 -1
- package/lib/inputs/inputFromOctokit.d.ts +9 -0
- package/lib/inputs/inputFromOctokit.js +28 -0
- package/lib/inputs/inputFromOctokit.js.map +1 -0
- package/lib/options/readAllContributors.d.ts +6 -0
- package/lib/options/readAllContributors.js +27 -0
- package/lib/options/readAllContributors.js.map +1 -0
- package/lib/options/readDocumentation.d.ts +1 -1
- package/lib/options/readDocumentation.js.map +1 -1
- package/lib/options/readPnpm.d.ts +5 -0
- package/lib/options/readPnpm.js +8 -0
- package/lib/options/readPnpm.js.map +1 -0
- package/lib/presets/common.d.ts +6 -4
- package/lib/presets/everything.d.ts +6 -4
- package/lib/presets/index.d.ts +16 -10
- package/lib/presets/minimal.d.ts +6 -4
- package/lib/template.d.ts +7 -5
- package/lib/template.js +6 -4
- package/lib/template.js.map +1 -1
- package/lib/types.d.ts +1 -0
- package/package.json +38 -36
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/data/contributions.ts"],"sourcesContent":["export const ownerContributions = [\n\t\"code\",\n\t\"content\",\n\t\"doc\",\n\t\"ideas\",\n\t\"infra\",\n\t\"maintenance\",\n\t\"projectManagement\",\n\t\"tool\",\n];\n"],"mappings":"AAAO,MAAM,qBAAqB;AAAA,EACjC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACD;","names":[]}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
var name = "create-typescript-app";
|
|
2
|
-
var version = "2.
|
|
2
|
+
var version = "2.1.0";
|
|
3
3
|
var description = "Quickstart-friendly TypeScript template with comprehensive, configurable, opinionated tooling. 🎁";
|
|
4
4
|
var repository = {
|
|
5
5
|
type: "git",
|
|
@@ -33,18 +33,18 @@ var scripts = {
|
|
|
33
33
|
tsc: "tsc"
|
|
34
34
|
};
|
|
35
35
|
var dependencies = {
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
"
|
|
36
|
+
bingo: "^0.5.4",
|
|
37
|
+
"bingo-fs": "^0.5.4",
|
|
38
|
+
"bingo-stratum": "^0.5.4",
|
|
39
39
|
"cspell-populate-words": "^0.3.0",
|
|
40
40
|
execa: "^9.5.2",
|
|
41
41
|
"git-remote-origin-url": "^4.0.0",
|
|
42
|
-
"git-url-parse": "^16.0.
|
|
42
|
+
"git-url-parse": "^16.0.1",
|
|
43
43
|
"html-to-text": "^9.0.5",
|
|
44
44
|
"image-size": "^1.2.0",
|
|
45
|
-
"input-from-file": "^0.
|
|
46
|
-
"input-from-file-json": "^0.
|
|
47
|
-
"input-from-script": "^0.
|
|
45
|
+
"input-from-file": "^0.5.4",
|
|
46
|
+
"input-from-file-json": "^0.5.4",
|
|
47
|
+
"input-from-script": "^0.5.4",
|
|
48
48
|
"js-yaml": "^4.1.0",
|
|
49
49
|
"lazy-value": "^3.0.0",
|
|
50
50
|
lodash: "^4.17.21",
|
|
@@ -55,54 +55,56 @@ var dependencies = {
|
|
|
55
55
|
"remove-dependencies": "^0.1.0",
|
|
56
56
|
"remove-undefined-objects": "^6.0.0",
|
|
57
57
|
"set-github-repository-labels": "^0.1.0",
|
|
58
|
-
"sort-package-json": "^
|
|
58
|
+
"sort-package-json": "^3.0.0",
|
|
59
59
|
"title-case": "^4.3.2",
|
|
60
|
-
zod: "^3.24.
|
|
60
|
+
zod: "^3.24.2"
|
|
61
61
|
};
|
|
62
62
|
var devDependencies = {
|
|
63
63
|
"@eslint-community/eslint-plugin-eslint-comments": "4.4.1",
|
|
64
|
-
"@eslint/js": "9.
|
|
64
|
+
"@eslint/js": "9.21.0",
|
|
65
65
|
"@prettier/sync": "^0.5.2",
|
|
66
66
|
"@release-it/conventional-changelog": "10.0.0",
|
|
67
67
|
"@types/eslint-plugin-markdown": "2.0.2",
|
|
68
68
|
"@types/git-url-parse": "9.0.3",
|
|
69
69
|
"@types/html-to-text": "9.0.4",
|
|
70
70
|
"@types/js-yaml": "4.0.9",
|
|
71
|
-
"@types/lodash": "4.17.
|
|
72
|
-
"@types/node": "22.
|
|
71
|
+
"@types/lodash": "4.17.16",
|
|
72
|
+
"@types/node": "22.13.9",
|
|
73
73
|
"@types/parse-author": "2.0.3",
|
|
74
|
-
"@vitest/coverage-v8": "
|
|
75
|
-
"@vitest/eslint-plugin": "1.1.
|
|
74
|
+
"@vitest/coverage-v8": "3.0.7",
|
|
75
|
+
"@vitest/eslint-plugin": "1.1.36",
|
|
76
76
|
"all-contributors-cli": "6.26.1",
|
|
77
|
+
"bingo-stratum-testers": "0.5.4",
|
|
78
|
+
"bingo-testers": "0.5.4",
|
|
77
79
|
"console-fail-test": "0.5.0",
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
eslint: "
|
|
81
|
-
"eslint-plugin-
|
|
82
|
-
"eslint-plugin-jsonc": "2.18.2",
|
|
80
|
+
cspell: "8.17.5",
|
|
81
|
+
eslint: "9.21.0",
|
|
82
|
+
"eslint-plugin-jsdoc": "50.6.3",
|
|
83
|
+
"eslint-plugin-jsonc": "2.19.1",
|
|
83
84
|
"eslint-plugin-markdown": "5.1.0",
|
|
84
|
-
"eslint-plugin-n": "17.
|
|
85
|
-
"eslint-plugin-package-json": "0.
|
|
86
|
-
"eslint-plugin-perfectionist": "4.
|
|
85
|
+
"eslint-plugin-n": "17.16.2",
|
|
86
|
+
"eslint-plugin-package-json": "0.26.2",
|
|
87
|
+
"eslint-plugin-perfectionist": "4.9.0",
|
|
87
88
|
"eslint-plugin-regexp": "2.7.0",
|
|
88
|
-
"eslint-plugin-yml": "1.
|
|
89
|
+
"eslint-plugin-yml": "1.17.0",
|
|
89
90
|
husky: "9.1.7",
|
|
90
|
-
knip: "5.
|
|
91
|
-
"lint-staged": "15.3
|
|
91
|
+
knip: "5.45.0",
|
|
92
|
+
"lint-staged": "15.4.3",
|
|
92
93
|
lodash: "^4.17.21",
|
|
93
|
-
markdownlint: "0.37.
|
|
94
|
-
"markdownlint-cli": "0.
|
|
95
|
-
prettier: "^3.
|
|
94
|
+
markdownlint: "0.37.4",
|
|
95
|
+
"markdownlint-cli": "0.44.0",
|
|
96
|
+
prettier: "^3.5.3",
|
|
96
97
|
"prettier-plugin-curly": "0.3.1",
|
|
97
|
-
"prettier-plugin-packagejson": "2.5.
|
|
98
|
-
"prettier-plugin-sh": "0.
|
|
99
|
-
"release-it": "
|
|
98
|
+
"prettier-plugin-packagejson": "2.5.10",
|
|
99
|
+
"prettier-plugin-sh": "0.15.0",
|
|
100
|
+
"release-it": "18.1.2",
|
|
100
101
|
"sentences-per-line": "0.3.0",
|
|
101
|
-
tsup: "8.
|
|
102
|
-
typescript: "5.
|
|
103
|
-
"typescript-eslint": "8.
|
|
104
|
-
vitest: "
|
|
102
|
+
tsup: "8.4.0",
|
|
103
|
+
typescript: "5.8.2",
|
|
104
|
+
"typescript-eslint": "8.26.0",
|
|
105
|
+
vitest: "3.0.7"
|
|
105
106
|
};
|
|
107
|
+
var packageManager = "pnpm@10.4.0";
|
|
106
108
|
var engines = {
|
|
107
109
|
node: ">=18.3.0"
|
|
108
110
|
};
|
|
@@ -126,6 +128,7 @@ var _package = {
|
|
|
126
128
|
},
|
|
127
129
|
dependencies: dependencies,
|
|
128
130
|
devDependencies: devDependencies,
|
|
131
|
+
packageManager: packageManager,
|
|
129
132
|
engines: engines,
|
|
130
133
|
publishConfig: publishConfig
|
|
131
134
|
};
|
|
@@ -140,13 +143,14 @@ declare const ______package_json_files: typeof files;
|
|
|
140
143
|
declare const ______package_json_license: typeof license;
|
|
141
144
|
declare const ______package_json_main: typeof main;
|
|
142
145
|
declare const ______package_json_name: typeof name;
|
|
146
|
+
declare const ______package_json_packageManager: typeof packageManager;
|
|
143
147
|
declare const ______package_json_publishConfig: typeof publishConfig;
|
|
144
148
|
declare const ______package_json_repository: typeof repository;
|
|
145
149
|
declare const ______package_json_scripts: typeof scripts;
|
|
146
150
|
declare const ______package_json_type: typeof type;
|
|
147
151
|
declare const ______package_json_version: typeof version;
|
|
148
152
|
declare namespace ______package_json {
|
|
149
|
-
export { ______package_json_author as author, ______package_json_bin as bin, _package as default, ______package_json_dependencies as dependencies, ______package_json_description as description, ______package_json_devDependencies as devDependencies, ______package_json_engines as engines, ______package_json_files as files, ______package_json_license as license, ______package_json_main as main, ______package_json_name as name, ______package_json_publishConfig as publishConfig, ______package_json_repository as repository, ______package_json_scripts as scripts, ______package_json_type as type, ______package_json_version as version };
|
|
153
|
+
export { ______package_json_author as author, ______package_json_bin as bin, _package as default, ______package_json_dependencies as dependencies, ______package_json_description as description, ______package_json_devDependencies as devDependencies, ______package_json_engines as engines, ______package_json_files as files, ______package_json_license as license, ______package_json_main as main, ______package_json_name as name, ______package_json_packageManager as packageManager, ______package_json_publishConfig as publishConfig, ______package_json_repository as repository, ______package_json_scripts as scripts, ______package_json_type as type, ______package_json_version as version };
|
|
150
154
|
}
|
|
151
155
|
|
|
152
156
|
declare const packageData: typeof ______package_json;
|
package/lib/index.d.ts
CHANGED
|
@@ -1,7 +1,11 @@
|
|
|
1
|
+
import * as bingo from 'bingo';
|
|
2
|
+
import * as bingo_stratum from 'bingo-stratum';
|
|
3
|
+
import * as bingo_stratum_lib_types_templates_js from 'bingo-stratum/lib/types/templates.js';
|
|
4
|
+
import * as zod from 'zod';
|
|
5
|
+
export { template } from './template.js';
|
|
1
6
|
export { BaseOptions, Contributor, base } from './base.js';
|
|
2
7
|
export { blocks } from './blocks/index.js';
|
|
3
8
|
export { presets } from './presets/index.js';
|
|
4
|
-
export { default } from './template.js';
|
|
5
9
|
export { blockAllContributors } from './blocks/blockAllContributors.js';
|
|
6
10
|
export { blockAreTheTypesWrong } from './blocks/blockAreTheTypesWrong.js';
|
|
7
11
|
export { blockCodecov } from './blocks/blockCodecov.js';
|
|
@@ -48,5 +52,155 @@ export { blockVSCode } from './blocks/blockVSCode.js';
|
|
|
48
52
|
export { presetCommon } from './presets/common.js';
|
|
49
53
|
export { presetEverything } from './presets/everything.js';
|
|
50
54
|
export { presetMinimal } from './presets/minimal.js';
|
|
51
|
-
|
|
52
|
-
|
|
55
|
+
|
|
56
|
+
declare const createConfig: bingo.CreateTemplateConfig<{
|
|
57
|
+
access: zod.ZodUnion<[zod.ZodLiteral<"public">, zod.ZodLiteral<"restricted">]>;
|
|
58
|
+
author: zod.ZodOptional<zod.ZodString>;
|
|
59
|
+
bin: zod.ZodOptional<zod.ZodString>;
|
|
60
|
+
contributors: zod.ZodOptional<zod.ZodArray<zod.ZodObject<{
|
|
61
|
+
avatar_url: zod.ZodString;
|
|
62
|
+
contributions: zod.ZodArray<zod.ZodString, "many">;
|
|
63
|
+
login: zod.ZodString;
|
|
64
|
+
name: zod.ZodString;
|
|
65
|
+
profile: zod.ZodString;
|
|
66
|
+
}, "strip", zod.ZodTypeAny, {
|
|
67
|
+
avatar_url: string;
|
|
68
|
+
contributions: string[];
|
|
69
|
+
login: string;
|
|
70
|
+
name: string;
|
|
71
|
+
profile: string;
|
|
72
|
+
}, {
|
|
73
|
+
avatar_url: string;
|
|
74
|
+
contributions: string[];
|
|
75
|
+
login: string;
|
|
76
|
+
name: string;
|
|
77
|
+
profile: string;
|
|
78
|
+
}>, "many">>;
|
|
79
|
+
description: zod.ZodDefault<zod.ZodString>;
|
|
80
|
+
directory: zod.ZodString;
|
|
81
|
+
documentation: zod.ZodOptional<zod.ZodString>;
|
|
82
|
+
email: zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodObject<{
|
|
83
|
+
github: zod.ZodString;
|
|
84
|
+
npm: zod.ZodString;
|
|
85
|
+
}, "strip", zod.ZodTypeAny, {
|
|
86
|
+
github: string;
|
|
87
|
+
npm: string;
|
|
88
|
+
}, {
|
|
89
|
+
github: string;
|
|
90
|
+
npm: string;
|
|
91
|
+
}>]>, {
|
|
92
|
+
github: string;
|
|
93
|
+
npm: string;
|
|
94
|
+
}, string | {
|
|
95
|
+
github: string;
|
|
96
|
+
npm: string;
|
|
97
|
+
}>;
|
|
98
|
+
explainer: zod.ZodOptional<zod.ZodArray<zod.ZodString, "many">>;
|
|
99
|
+
funding: zod.ZodOptional<zod.ZodString>;
|
|
100
|
+
guide: zod.ZodOptional<zod.ZodObject<{
|
|
101
|
+
href: zod.ZodString;
|
|
102
|
+
title: zod.ZodString;
|
|
103
|
+
}, "strip", zod.ZodTypeAny, {
|
|
104
|
+
href: string;
|
|
105
|
+
title: string;
|
|
106
|
+
}, {
|
|
107
|
+
href: string;
|
|
108
|
+
title: string;
|
|
109
|
+
}>>;
|
|
110
|
+
keywords: zod.ZodOptional<zod.ZodArray<zod.ZodString, "many">>;
|
|
111
|
+
logo: zod.ZodOptional<zod.ZodObject<{
|
|
112
|
+
alt: zod.ZodString;
|
|
113
|
+
height: zod.ZodOptional<zod.ZodNumber>;
|
|
114
|
+
src: zod.ZodString;
|
|
115
|
+
width: zod.ZodOptional<zod.ZodNumber>;
|
|
116
|
+
}, "strip", zod.ZodTypeAny, {
|
|
117
|
+
alt: string;
|
|
118
|
+
src: string;
|
|
119
|
+
height?: number | undefined;
|
|
120
|
+
width?: number | undefined;
|
|
121
|
+
}, {
|
|
122
|
+
alt: string;
|
|
123
|
+
src: string;
|
|
124
|
+
height?: number | undefined;
|
|
125
|
+
width?: number | undefined;
|
|
126
|
+
}>>;
|
|
127
|
+
node: zod.ZodOptional<zod.ZodObject<{
|
|
128
|
+
minimum: zod.ZodString;
|
|
129
|
+
pinned: zod.ZodOptional<zod.ZodString>;
|
|
130
|
+
}, "strip", zod.ZodTypeAny, {
|
|
131
|
+
minimum: string;
|
|
132
|
+
pinned?: string | undefined;
|
|
133
|
+
}, {
|
|
134
|
+
minimum: string;
|
|
135
|
+
pinned?: string | undefined;
|
|
136
|
+
}>>;
|
|
137
|
+
owner: zod.ZodString;
|
|
138
|
+
packageData: zod.ZodOptional<zod.ZodObject<{
|
|
139
|
+
dependencies: zod.ZodOptional<zod.ZodRecord<zod.ZodString, zod.ZodString>>;
|
|
140
|
+
devDependencies: zod.ZodOptional<zod.ZodRecord<zod.ZodString, zod.ZodString>>;
|
|
141
|
+
scripts: zod.ZodOptional<zod.ZodRecord<zod.ZodString, zod.ZodString>>;
|
|
142
|
+
}, "strip", zod.ZodTypeAny, {
|
|
143
|
+
dependencies?: Record<string, string> | undefined;
|
|
144
|
+
devDependencies?: Record<string, string> | undefined;
|
|
145
|
+
scripts?: Record<string, string> | undefined;
|
|
146
|
+
}, {
|
|
147
|
+
dependencies?: Record<string, string> | undefined;
|
|
148
|
+
devDependencies?: Record<string, string> | undefined;
|
|
149
|
+
scripts?: Record<string, string> | undefined;
|
|
150
|
+
}>>;
|
|
151
|
+
pnpm: zod.ZodOptional<zod.ZodString>;
|
|
152
|
+
repository: zod.ZodString;
|
|
153
|
+
rulesetId: zod.ZodOptional<zod.ZodString>;
|
|
154
|
+
title: zod.ZodString;
|
|
155
|
+
usage: zod.ZodOptional<zod.ZodString>;
|
|
156
|
+
version: zod.ZodOptional<zod.ZodString>;
|
|
157
|
+
} & bingo_stratum_lib_types_templates_js.StratumTemplateOptionsShape, bingo_stratum.StratumRefinements<{
|
|
158
|
+
access: "public" | "restricted";
|
|
159
|
+
description: string;
|
|
160
|
+
directory: string;
|
|
161
|
+
email: {
|
|
162
|
+
github: string;
|
|
163
|
+
npm: string;
|
|
164
|
+
};
|
|
165
|
+
title: string;
|
|
166
|
+
owner: string;
|
|
167
|
+
repository: string;
|
|
168
|
+
author?: string | undefined;
|
|
169
|
+
bin?: string | undefined;
|
|
170
|
+
contributors?: {
|
|
171
|
+
avatar_url: string;
|
|
172
|
+
contributions: string[];
|
|
173
|
+
login: string;
|
|
174
|
+
name: string;
|
|
175
|
+
profile: string;
|
|
176
|
+
}[] | undefined;
|
|
177
|
+
documentation?: string | undefined;
|
|
178
|
+
explainer?: string[] | undefined;
|
|
179
|
+
funding?: string | undefined;
|
|
180
|
+
guide?: {
|
|
181
|
+
href: string;
|
|
182
|
+
title: string;
|
|
183
|
+
} | undefined;
|
|
184
|
+
keywords?: string[] | undefined;
|
|
185
|
+
logo?: {
|
|
186
|
+
alt: string;
|
|
187
|
+
src: string;
|
|
188
|
+
height?: number | undefined;
|
|
189
|
+
width?: number | undefined;
|
|
190
|
+
} | undefined;
|
|
191
|
+
node?: {
|
|
192
|
+
minimum: string;
|
|
193
|
+
pinned?: string | undefined;
|
|
194
|
+
} | undefined;
|
|
195
|
+
packageData?: {
|
|
196
|
+
dependencies?: Record<string, string> | undefined;
|
|
197
|
+
devDependencies?: Record<string, string> | undefined;
|
|
198
|
+
scripts?: Record<string, string> | undefined;
|
|
199
|
+
} | undefined;
|
|
200
|
+
pnpm?: string | undefined;
|
|
201
|
+
rulesetId?: string | undefined;
|
|
202
|
+
usage?: string | undefined;
|
|
203
|
+
version?: string | undefined;
|
|
204
|
+
}>>;
|
|
205
|
+
|
|
206
|
+
export { createConfig };
|
package/lib/index.js
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
|
+
import { template } from "./template.js";
|
|
2
|
+
const { createConfig } = template;
|
|
1
3
|
export * from "./base.js";
|
|
2
4
|
export * from "./blocks/index.js";
|
|
3
5
|
export * from "./presets/index.js";
|
|
4
|
-
import { default as default2 } from "./template.js";
|
|
5
6
|
export {
|
|
6
|
-
|
|
7
|
+
createConfig,
|
|
8
|
+
template
|
|
7
9
|
};
|
|
8
10
|
//# sourceMappingURL=index.js.map
|
package/lib/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/index.ts"],"sourcesContent":["
|
|
1
|
+
{"version":3,"sources":["../src/index.ts"],"sourcesContent":["import { template } from \"./template.js\";\n\nexport { template };\n\nexport const { createConfig } = template;\n\nexport * from \"./base.js\";\nexport * from \"./blocks/index.js\";\nexport * from \"./presets/index.js\";\n"],"mappings":"AAAA,SAAS,gBAAgB;AAIlB,MAAM,EAAE,aAAa,IAAI;AAEhC,cAAc;AACd,cAAc;AACd,cAAc;","names":[]}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import * as bingo from 'bingo';
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
|
|
4
|
+
declare const inputFromOctokit: bingo.InputWithArgs<Promise<unknown>, {
|
|
5
|
+
endpoint: z.ZodString;
|
|
6
|
+
options: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
7
|
+
}>;
|
|
8
|
+
|
|
9
|
+
export { inputFromOctokit };
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { createInput } from "bingo";
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
const inputFromOctokit = createInput({
|
|
4
|
+
args: {
|
|
5
|
+
endpoint: z.string(),
|
|
6
|
+
options: z.record(z.string(), z.unknown()).optional()
|
|
7
|
+
},
|
|
8
|
+
// TODO: Strongly type this, then push it upstream to Bingo
|
|
9
|
+
// This will require smart types around GitHub endpoints, similar to:
|
|
10
|
+
// https://github.com/JoshuaKGoldberg/bingo/issues/65
|
|
11
|
+
async produce({ args, fetchers }) {
|
|
12
|
+
try {
|
|
13
|
+
const response = await fetchers.octokit.request(args.endpoint, {
|
|
14
|
+
headers: {
|
|
15
|
+
"X-GitHub-Api-Version": "2022-11-28"
|
|
16
|
+
},
|
|
17
|
+
...args.options
|
|
18
|
+
});
|
|
19
|
+
return response.data;
|
|
20
|
+
} catch {
|
|
21
|
+
return void 0;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
});
|
|
25
|
+
export {
|
|
26
|
+
inputFromOctokit
|
|
27
|
+
};
|
|
28
|
+
//# sourceMappingURL=inputFromOctokit.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/inputs/inputFromOctokit.ts"],"sourcesContent":["import { createInput } from \"bingo\";\nimport { z } from \"zod\";\n\nexport const inputFromOctokit = createInput({\n\targs: {\n\t\tendpoint: z.string(),\n\t\toptions: z.record(z.string(), z.unknown()).optional(),\n\t},\n\t// TODO: Strongly type this, then push it upstream to Bingo\n\t// This will require smart types around GitHub endpoints, similar to:\n\t// https://github.com/JoshuaKGoldberg/bingo/issues/65\n\tasync produce({ args, fetchers }): Promise<unknown> {\n\t\ttry {\n\t\t\tconst response = await fetchers.octokit.request(args.endpoint, {\n\t\t\t\theaders: {\n\t\t\t\t\t\"X-GitHub-Api-Version\": \"2022-11-28\",\n\t\t\t\t},\n\t\t\t\t...args.options,\n\t\t\t});\n\n\t\t\treturn response.data;\n\t\t} catch {\n\t\t\treturn undefined;\n\t\t}\n\t},\n});\n"],"mappings":"AAAA,SAAS,mBAAmB;AAC5B,SAAS,SAAS;AAEX,MAAM,mBAAmB,YAAY;AAAA,EAC3C,MAAM;AAAA,IACL,UAAU,EAAE,OAAO;AAAA,IACnB,SAAS,EAAE,OAAO,EAAE,OAAO,GAAG,EAAE,QAAQ,CAAC,EAAE,SAAS;AAAA,EACrD;AAAA;AAAA;AAAA;AAAA,EAIA,MAAM,QAAQ,EAAE,MAAM,SAAS,GAAqB;AACnD,QAAI;AACH,YAAM,WAAW,MAAM,SAAS,QAAQ,QAAQ,KAAK,UAAU;AAAA,QAC9D,SAAS;AAAA,UACR,wBAAwB;AAAA,QACzB;AAAA,QACA,GAAG,KAAK;AAAA,MACT,CAAC;AAED,aAAO,SAAS;AAAA,IACjB,QAAQ;AACP,aAAO;AAAA,IACR;AAAA,EACD;AACD,CAAC;","names":[]}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { inputFromFileJSON } from "input-from-file-json";
|
|
2
|
+
import { ownerContributions } from "../data/contributions.js";
|
|
3
|
+
import { inputFromOctokit } from "../inputs/inputFromOctokit.js";
|
|
4
|
+
async function readAllContributors(take) {
|
|
5
|
+
const contributions = await take(inputFromFileJSON, {
|
|
6
|
+
filePath: ".all-contributorsrc"
|
|
7
|
+
});
|
|
8
|
+
if (!(contributions instanceof Error)) {
|
|
9
|
+
return contributions.contributors;
|
|
10
|
+
}
|
|
11
|
+
const user = await take(inputFromOctokit, {
|
|
12
|
+
endpoint: "GET /user"
|
|
13
|
+
});
|
|
14
|
+
return [
|
|
15
|
+
{
|
|
16
|
+
avatar_url: user.avatar_url,
|
|
17
|
+
contributions: ownerContributions,
|
|
18
|
+
login: user.login,
|
|
19
|
+
name: user.name,
|
|
20
|
+
profile: user.blog
|
|
21
|
+
}
|
|
22
|
+
];
|
|
23
|
+
}
|
|
24
|
+
export {
|
|
25
|
+
readAllContributors
|
|
26
|
+
};
|
|
27
|
+
//# sourceMappingURL=readAllContributors.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/options/readAllContributors.ts"],"sourcesContent":["import { TakeInput } from \"bingo\";\nimport { inputFromFileJSON } from \"input-from-file-json\";\n\nimport { ownerContributions } from \"../data/contributions.js\";\nimport { inputFromOctokit } from \"../inputs/inputFromOctokit.js\";\nimport { AllContributorsData } from \"../types.js\";\n\nexport async function readAllContributors(take: TakeInput) {\n\tconst contributions = (await take(inputFromFileJSON, {\n\t\tfilePath: \".all-contributorsrc\",\n\t})) as AllContributorsData | Error;\n\n\tif (!(contributions instanceof Error)) {\n\t\treturn contributions.contributors;\n\t}\n\n\tconst user = (await take(inputFromOctokit, {\n\t\tendpoint: \"GET /user\",\n\t})) as { avatar_url: string; blog: string; login: string; name: string };\n\n\treturn [\n\t\t{\n\t\t\tavatar_url: user.avatar_url,\n\t\t\tcontributions: ownerContributions,\n\t\t\tlogin: user.login,\n\t\t\tname: user.name,\n\t\t\tprofile: user.blog,\n\t\t},\n\t];\n}\n"],"mappings":"AACA,SAAS,yBAAyB;AAElC,SAAS,0BAA0B;AACnC,SAAS,wBAAwB;AAGjC,eAAsB,oBAAoB,MAAiB;AAC1D,QAAM,gBAAiB,MAAM,KAAK,mBAAmB;AAAA,IACpD,UAAU;AAAA,EACX,CAAC;AAED,MAAI,EAAE,yBAAyB,QAAQ;AACtC,WAAO,cAAc;AAAA,EACtB;AAEA,QAAM,OAAQ,MAAM,KAAK,kBAAkB;AAAA,IAC1C,UAAU;AAAA,EACX,CAAC;AAED,SAAO;AAAA,IACN;AAAA,MACC,YAAY,KAAK;AAAA,MACjB,eAAe;AAAA,MACf,OAAO,KAAK;AAAA,MACZ,MAAM,KAAK;AAAA,MACX,SAAS,KAAK;AAAA,IACf;AAAA,EACD;AACD;","names":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/options/readDocumentation.ts"],"sourcesContent":["import { TakeInput } from \"
|
|
1
|
+
{"version":3,"sources":["../../src/options/readDocumentation.ts"],"sourcesContent":["import { TakeInput } from \"bingo\";\nimport { inputFromFile } from \"input-from-file\";\n\nimport { swallowError } from \"../utils/swallowError.js\";\n\nconst knownHeadings = new Set([\n\t\"building\",\n\t\"development\",\n\t\"formatting\",\n\t\"linting\",\n\t\"testing\",\n\t\"type checking\",\n]);\n\nexport async function readDocumentation(take: TakeInput) {\n\tconst existing = swallowError(\n\t\tawait take(inputFromFile, {\n\t\t\tfilePath: \".github/DEVELOPMENT.md\",\n\t\t}),\n\t);\n\tif (!existing) {\n\t\treturn undefined;\n\t}\n\n\treturn existing\n\t\t.split(/\\n\\n(?=##\\s)/)\n\t\t.filter((section) => !knownHeadings.has(parseHeading(section)))\n\t\t.join(\"\\n\\n\");\n}\n\nfunction parseHeading(section: string) {\n\treturn section\n\t\t.split(\"\\n\")[0]\n\t\t.replace(/^#+\\s+/, \"\")\n\t\t.trim()\n\t\t.toLowerCase();\n}\n"],"mappings":"AACA,SAAS,qBAAqB;AAE9B,SAAS,oBAAoB;AAE7B,MAAM,gBAAgB,oBAAI,IAAI;AAAA,EAC7B;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACD,CAAC;AAED,eAAsB,kBAAkB,MAAiB;AACxD,QAAM,WAAW;AAAA,IAChB,MAAM,KAAK,eAAe;AAAA,MACzB,UAAU;AAAA,IACX,CAAC;AAAA,EACF;AACA,MAAI,CAAC,UAAU;AACd,WAAO;AAAA,EACR;AAEA,SAAO,SACL,MAAM,cAAc,EACpB,OAAO,CAAC,YAAY,CAAC,cAAc,IAAI,aAAa,OAAO,CAAC,CAAC,EAC7D,KAAK,MAAM;AACd;AAEA,SAAS,aAAa,SAAiB;AACtC,SAAO,QACL,MAAM,IAAI,EAAE,CAAC,EACb,QAAQ,UAAU,EAAE,EACpB,KAAK,EACL,YAAY;AACf;","names":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/options/readPnpm.ts"],"sourcesContent":["import { PartialPackageData } from \"../types.js\";\n\nexport async function readPnpm(packageData: () => Promise<PartialPackageData>) {\n\tconst { packageManager } = await packageData();\n\n\treturn packageManager?.startsWith(\"pnpm@\")\n\t\t? packageManager.slice(\"pnpm@\".length)\n\t\t: \"10.4.0\";\n}\n"],"mappings":"AAEA,eAAsB,SAAS,aAAgD;AAC9E,QAAM,EAAE,eAAe,IAAI,MAAM,YAAY;AAE7C,SAAO,gBAAgB,WAAW,OAAO,IACtC,eAAe,MAAM,QAAQ,MAAM,IACnC;AACJ;","names":[]}
|
package/lib/presets/common.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as bingo_stratum from 'bingo-stratum';
|
|
2
2
|
import * as zod from 'zod';
|
|
3
3
|
|
|
4
|
-
declare const presetCommon:
|
|
4
|
+
declare const presetCommon: bingo_stratum.Preset<{
|
|
5
5
|
access: zod.ZodUnion<[zod.ZodLiteral<"public">, zod.ZodLiteral<"restricted">]>;
|
|
6
6
|
author: zod.ZodOptional<zod.ZodString>;
|
|
7
7
|
bin: zod.ZodOptional<zod.ZodString>;
|
|
@@ -12,16 +12,16 @@ declare const presetCommon: create.Preset<{
|
|
|
12
12
|
name: zod.ZodString;
|
|
13
13
|
profile: zod.ZodString;
|
|
14
14
|
}, "strip", zod.ZodTypeAny, {
|
|
15
|
-
name: string;
|
|
16
15
|
avatar_url: string;
|
|
17
16
|
contributions: string[];
|
|
18
17
|
login: string;
|
|
18
|
+
name: string;
|
|
19
19
|
profile: string;
|
|
20
20
|
}, {
|
|
21
|
-
name: string;
|
|
22
21
|
avatar_url: string;
|
|
23
22
|
contributions: string[];
|
|
24
23
|
login: string;
|
|
24
|
+
name: string;
|
|
25
25
|
profile: string;
|
|
26
26
|
}>, "many">>;
|
|
27
27
|
description: zod.ZodDefault<zod.ZodString>;
|
|
@@ -96,7 +96,9 @@ declare const presetCommon: create.Preset<{
|
|
|
96
96
|
devDependencies?: Record<string, string> | undefined;
|
|
97
97
|
scripts?: Record<string, string> | undefined;
|
|
98
98
|
}>>;
|
|
99
|
+
pnpm: zod.ZodOptional<zod.ZodString>;
|
|
99
100
|
repository: zod.ZodString;
|
|
101
|
+
rulesetId: zod.ZodOptional<zod.ZodString>;
|
|
100
102
|
title: zod.ZodString;
|
|
101
103
|
usage: zod.ZodOptional<zod.ZodString>;
|
|
102
104
|
version: zod.ZodOptional<zod.ZodString>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as bingo_stratum from 'bingo-stratum';
|
|
2
2
|
import * as zod from 'zod';
|
|
3
3
|
|
|
4
|
-
declare const presetEverything:
|
|
4
|
+
declare const presetEverything: bingo_stratum.Preset<{
|
|
5
5
|
access: zod.ZodUnion<[zod.ZodLiteral<"public">, zod.ZodLiteral<"restricted">]>;
|
|
6
6
|
author: zod.ZodOptional<zod.ZodString>;
|
|
7
7
|
bin: zod.ZodOptional<zod.ZodString>;
|
|
@@ -12,16 +12,16 @@ declare const presetEverything: create.Preset<{
|
|
|
12
12
|
name: zod.ZodString;
|
|
13
13
|
profile: zod.ZodString;
|
|
14
14
|
}, "strip", zod.ZodTypeAny, {
|
|
15
|
-
name: string;
|
|
16
15
|
avatar_url: string;
|
|
17
16
|
contributions: string[];
|
|
18
17
|
login: string;
|
|
18
|
+
name: string;
|
|
19
19
|
profile: string;
|
|
20
20
|
}, {
|
|
21
|
-
name: string;
|
|
22
21
|
avatar_url: string;
|
|
23
22
|
contributions: string[];
|
|
24
23
|
login: string;
|
|
24
|
+
name: string;
|
|
25
25
|
profile: string;
|
|
26
26
|
}>, "many">>;
|
|
27
27
|
description: zod.ZodDefault<zod.ZodString>;
|
|
@@ -96,7 +96,9 @@ declare const presetEverything: create.Preset<{
|
|
|
96
96
|
devDependencies?: Record<string, string> | undefined;
|
|
97
97
|
scripts?: Record<string, string> | undefined;
|
|
98
98
|
}>>;
|
|
99
|
+
pnpm: zod.ZodOptional<zod.ZodString>;
|
|
99
100
|
repository: zod.ZodString;
|
|
101
|
+
rulesetId: zod.ZodOptional<zod.ZodString>;
|
|
100
102
|
title: zod.ZodString;
|
|
101
103
|
usage: zod.ZodOptional<zod.ZodString>;
|
|
102
104
|
version: zod.ZodOptional<zod.ZodString>;
|