create-typescript-app 2.0.0-beta.9 → 2.0.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 +4 -3
- package/lib/base.js +25 -15
- package/lib/base.js.map +1 -1
- package/lib/blocks/blockAllContributors.d.ts +5 -4
- package/lib/blocks/blockAllContributors.js +3 -2
- package/lib/blocks/blockAllContributors.js.map +1 -1
- package/lib/blocks/blockAreTheTypesWrong.d.ts +5 -4
- package/lib/blocks/blockCSpell.d.ts +5 -4
- package/lib/blocks/blockCSpell.js +13 -13
- package/lib/blocks/blockCSpell.js.map +1 -1
- package/lib/blocks/blockCodecov.d.ts +5 -4
- package/lib/blocks/blockCodecov.js +11 -11
- package/lib/blocks/blockCodecov.js.map +1 -1
- package/lib/blocks/blockContributingDocs.d.ts +5 -4
- package/lib/blocks/blockContributingDocs.js +11 -11
- package/lib/blocks/blockContributingDocs.js.map +1 -1
- package/lib/blocks/blockContributorCovenant.d.ts +5 -4
- package/lib/blocks/blockContributorCovenant.js +11 -11
- package/lib/blocks/blockContributorCovenant.js.map +1 -1
- package/lib/blocks/blockDevelopmentDocs.d.ts +5 -4
- package/lib/blocks/blockDevelopmentDocs.js +11 -11
- package/lib/blocks/blockDevelopmentDocs.js.map +1 -1
- package/lib/blocks/blockESLint.d.ts +5 -4
- package/lib/blocks/blockESLint.js +11 -11
- package/lib/blocks/blockESLint.js.map +1 -1
- package/lib/blocks/blockESLintComments.d.ts +5 -4
- package/lib/blocks/blockESLintJSDoc.d.ts +5 -4
- package/lib/blocks/blockESLintJSONC.d.ts +5 -4
- package/lib/blocks/blockESLintMarkdown.d.ts +5 -4
- package/lib/blocks/blockESLintMoreStyling.d.ts +5 -4
- package/lib/blocks/blockESLintNode.d.ts +5 -4
- package/lib/blocks/blockESLintPackageJson.d.ts +5 -4
- package/lib/blocks/blockESLintPerfectionist.d.ts +5 -4
- package/lib/blocks/blockESLintRegexp.d.ts +5 -4
- package/lib/blocks/blockESLintYML.d.ts +5 -4
- package/lib/blocks/blockExampleFiles.d.ts +5 -4
- package/lib/blocks/blockExampleFiles.js +3 -2
- package/lib/blocks/blockExampleFiles.js.map +1 -1
- package/lib/blocks/blockFunding.d.ts +5 -4
- package/lib/blocks/blockGitHubActionsCI.d.ts +5 -4
- package/lib/blocks/blockGitHubActionsCI.js +11 -11
- package/lib/blocks/blockGitHubActionsCI.js.map +1 -1
- package/lib/blocks/blockGitHubApps.d.ts +5 -4
- package/lib/blocks/blockGitHubIssueTemplates.d.ts +5 -4
- package/lib/blocks/blockGitHubPRTemplate.d.ts +5 -4
- package/lib/blocks/blockGitignore.d.ts +5 -4
- package/lib/blocks/blockKnip.d.ts +5 -4
- package/lib/blocks/blockKnip.js +11 -11
- package/lib/blocks/blockKnip.js.map +1 -1
- package/lib/blocks/blockMITLicense.d.ts +5 -4
- package/lib/blocks/blockMarkdownlint.d.ts +5 -4
- package/lib/blocks/blockNvmrc.d.ts +5 -4
- package/lib/blocks/blockPRCompliance.d.ts +5 -4
- package/lib/blocks/blockPackageJson.d.ts +5 -4
- package/lib/blocks/blockPackageJson.js +11 -11
- package/lib/blocks/blockPackageJson.js.map +1 -1
- package/lib/blocks/blockPnpmDedupe.d.ts +5 -4
- package/lib/blocks/blockPrettier.d.ts +5 -4
- package/lib/blocks/blockPrettier.js +11 -10
- package/lib/blocks/blockPrettier.js.map +1 -1
- package/lib/blocks/blockPrettierPluginCurly.d.ts +5 -4
- package/lib/blocks/blockPrettierPluginPackageJson.d.ts +5 -4
- package/lib/blocks/blockPrettierPluginSh.d.ts +5 -4
- package/lib/blocks/blockREADME.d.ts +5 -4
- package/lib/blocks/blockReleaseIt.d.ts +5 -4
- package/lib/blocks/blockReleaseIt.js +0 -1
- package/lib/blocks/blockReleaseIt.js.map +1 -1
- package/lib/blocks/blockRenovate.d.ts +5 -4
- package/lib/blocks/blockRepositoryBranchRuleset.d.ts +5 -4
- package/lib/blocks/blockRepositoryBranchRuleset.js +78 -54
- package/lib/blocks/blockRepositoryBranchRuleset.js.map +1 -1
- package/lib/blocks/blockRepositoryLabels.d.ts +5 -4
- package/lib/blocks/blockRepositorySecrets.d.ts +6 -5
- package/lib/blocks/blockRepositorySettings.d.ts +5 -4
- package/lib/blocks/blockSecurityDocs.d.ts +5 -4
- package/lib/blocks/blockTSup.d.ts +5 -4
- package/lib/blocks/blockTSup.js +18 -18
- package/lib/blocks/blockTSup.js.map +1 -1
- package/lib/blocks/blockTemplatedWith.d.ts +5 -4
- package/lib/blocks/blockTemplatedWith.js +2 -2
- package/lib/blocks/blockTemplatedWith.js.map +1 -1
- package/lib/blocks/blockTypeScript.d.ts +5 -4
- package/lib/blocks/blockVSCode.d.ts +5 -4
- package/lib/blocks/blockVitest.d.ts +5 -4
- package/lib/blocks/blockVitest.js +17 -17
- package/lib/blocks/blockVitest.js.map +1 -1
- package/lib/blocks/index.d.ts +173 -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 +39 -43
- package/lib/index.d.ts +155 -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/presets/common.d.ts +5 -4
- package/lib/presets/everything.d.ts +5 -4
- package/lib/presets/index.d.ts +13 -10
- package/lib/presets/minimal.d.ts +5 -4
- package/lib/template.d.ts +6 -5
- package/lib/template.js +6 -4
- package/lib/template.js.map +1 -1
- package/package.json +37 -39
|
@@ -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.0.0
|
|
2
|
+
var version = "2.0.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,60 +55,58 @@ 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
|
};
|
|
106
107
|
var engines = {
|
|
107
108
|
node: ">=18.3.0"
|
|
108
109
|
};
|
|
109
|
-
var publishConfig = {
|
|
110
|
-
provenance: true
|
|
111
|
-
};
|
|
112
110
|
var _package = {
|
|
113
111
|
name: name,
|
|
114
112
|
version: version,
|
|
@@ -126,8 +124,7 @@ var _package = {
|
|
|
126
124
|
},
|
|
127
125
|
dependencies: dependencies,
|
|
128
126
|
devDependencies: devDependencies,
|
|
129
|
-
engines: engines
|
|
130
|
-
publishConfig: publishConfig
|
|
127
|
+
engines: engines
|
|
131
128
|
};
|
|
132
129
|
|
|
133
130
|
declare const ______package_json_author: typeof author;
|
|
@@ -140,13 +137,12 @@ declare const ______package_json_files: typeof files;
|
|
|
140
137
|
declare const ______package_json_license: typeof license;
|
|
141
138
|
declare const ______package_json_main: typeof main;
|
|
142
139
|
declare const ______package_json_name: typeof name;
|
|
143
|
-
declare const ______package_json_publishConfig: typeof publishConfig;
|
|
144
140
|
declare const ______package_json_repository: typeof repository;
|
|
145
141
|
declare const ______package_json_scripts: typeof scripts;
|
|
146
142
|
declare const ______package_json_type: typeof type;
|
|
147
143
|
declare const ______package_json_version: typeof version;
|
|
148
144
|
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,
|
|
145
|
+
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_repository as repository, ______package_json_scripts as scripts, ______package_json_type as type, ______package_json_version as version };
|
|
150
146
|
}
|
|
151
147
|
|
|
152
148
|
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,153 @@ 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
|
+
repository: zod.ZodString;
|
|
152
|
+
rulesetId: zod.ZodOptional<zod.ZodString>;
|
|
153
|
+
title: zod.ZodString;
|
|
154
|
+
usage: zod.ZodOptional<zod.ZodString>;
|
|
155
|
+
version: zod.ZodOptional<zod.ZodString>;
|
|
156
|
+
} & bingo_stratum_lib_types_templates_js.StratumTemplateOptionsShape, bingo_stratum.StratumRefinements<{
|
|
157
|
+
access: "public" | "restricted";
|
|
158
|
+
description: string;
|
|
159
|
+
directory: string;
|
|
160
|
+
email: {
|
|
161
|
+
github: string;
|
|
162
|
+
npm: string;
|
|
163
|
+
};
|
|
164
|
+
title: string;
|
|
165
|
+
owner: string;
|
|
166
|
+
repository: string;
|
|
167
|
+
author?: string | undefined;
|
|
168
|
+
bin?: string | undefined;
|
|
169
|
+
contributors?: {
|
|
170
|
+
avatar_url: string;
|
|
171
|
+
contributions: string[];
|
|
172
|
+
login: string;
|
|
173
|
+
name: string;
|
|
174
|
+
profile: string;
|
|
175
|
+
}[] | undefined;
|
|
176
|
+
documentation?: string | undefined;
|
|
177
|
+
explainer?: string[] | undefined;
|
|
178
|
+
funding?: string | undefined;
|
|
179
|
+
guide?: {
|
|
180
|
+
href: string;
|
|
181
|
+
title: string;
|
|
182
|
+
} | undefined;
|
|
183
|
+
keywords?: string[] | undefined;
|
|
184
|
+
logo?: {
|
|
185
|
+
alt: string;
|
|
186
|
+
src: string;
|
|
187
|
+
height?: number | undefined;
|
|
188
|
+
width?: number | undefined;
|
|
189
|
+
} | undefined;
|
|
190
|
+
node?: {
|
|
191
|
+
minimum: string;
|
|
192
|
+
pinned?: string | undefined;
|
|
193
|
+
} | undefined;
|
|
194
|
+
packageData?: {
|
|
195
|
+
dependencies?: Record<string, string> | undefined;
|
|
196
|
+
devDependencies?: Record<string, string> | undefined;
|
|
197
|
+
scripts?: Record<string, string> | undefined;
|
|
198
|
+
} | undefined;
|
|
199
|
+
rulesetId?: string | undefined;
|
|
200
|
+
usage?: string | undefined;
|
|
201
|
+
version?: string | undefined;
|
|
202
|
+
}>>;
|
|
203
|
+
|
|
204
|
+
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":[]}
|
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>;
|
|
@@ -97,6 +97,7 @@ declare const presetCommon: create.Preset<{
|
|
|
97
97
|
scripts?: Record<string, string> | undefined;
|
|
98
98
|
}>>;
|
|
99
99
|
repository: zod.ZodString;
|
|
100
|
+
rulesetId: zod.ZodOptional<zod.ZodString>;
|
|
100
101
|
title: zod.ZodString;
|
|
101
102
|
usage: zod.ZodOptional<zod.ZodString>;
|
|
102
103
|
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>;
|
|
@@ -97,6 +97,7 @@ declare const presetEverything: create.Preset<{
|
|
|
97
97
|
scripts?: Record<string, string> | undefined;
|
|
98
98
|
}>>;
|
|
99
99
|
repository: zod.ZodString;
|
|
100
|
+
rulesetId: zod.ZodOptional<zod.ZodString>;
|
|
100
101
|
title: zod.ZodString;
|
|
101
102
|
usage: zod.ZodOptional<zod.ZodString>;
|
|
102
103
|
version: zod.ZodOptional<zod.ZodString>;
|
package/lib/presets/index.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as bingo_stratum from 'bingo-stratum';
|
|
2
2
|
import * as zod from 'zod';
|
|
3
3
|
export { presetCommon } from './common.js';
|
|
4
4
|
export { presetEverything } from './everything.js';
|
|
5
5
|
export { presetMinimal } from './minimal.js';
|
|
6
6
|
|
|
7
7
|
declare const presets: {
|
|
8
|
-
common:
|
|
8
|
+
common: bingo_stratum.Preset<{
|
|
9
9
|
access: zod.ZodUnion<[zod.ZodLiteral<"public">, zod.ZodLiteral<"restricted">]>;
|
|
10
10
|
author: zod.ZodOptional<zod.ZodString>;
|
|
11
11
|
bin: zod.ZodOptional<zod.ZodString>;
|
|
@@ -16,16 +16,16 @@ declare const presets: {
|
|
|
16
16
|
name: zod.ZodString;
|
|
17
17
|
profile: zod.ZodString;
|
|
18
18
|
}, "strip", zod.ZodTypeAny, {
|
|
19
|
-
name: string;
|
|
20
19
|
avatar_url: string;
|
|
21
20
|
contributions: string[];
|
|
22
21
|
login: string;
|
|
22
|
+
name: string;
|
|
23
23
|
profile: string;
|
|
24
24
|
}, {
|
|
25
|
-
name: string;
|
|
26
25
|
avatar_url: string;
|
|
27
26
|
contributions: string[];
|
|
28
27
|
login: string;
|
|
28
|
+
name: string;
|
|
29
29
|
profile: string;
|
|
30
30
|
}>, "many">>;
|
|
31
31
|
description: zod.ZodDefault<zod.ZodString>;
|
|
@@ -101,11 +101,12 @@ declare const presets: {
|
|
|
101
101
|
scripts?: Record<string, string> | undefined;
|
|
102
102
|
}>>;
|
|
103
103
|
repository: zod.ZodString;
|
|
104
|
+
rulesetId: zod.ZodOptional<zod.ZodString>;
|
|
104
105
|
title: zod.ZodString;
|
|
105
106
|
usage: zod.ZodOptional<zod.ZodString>;
|
|
106
107
|
version: zod.ZodOptional<zod.ZodString>;
|
|
107
108
|
}>;
|
|
108
|
-
everything:
|
|
109
|
+
everything: bingo_stratum.Preset<{
|
|
109
110
|
access: zod.ZodUnion<[zod.ZodLiteral<"public">, zod.ZodLiteral<"restricted">]>;
|
|
110
111
|
author: zod.ZodOptional<zod.ZodString>;
|
|
111
112
|
bin: zod.ZodOptional<zod.ZodString>;
|
|
@@ -116,16 +117,16 @@ declare const presets: {
|
|
|
116
117
|
name: zod.ZodString;
|
|
117
118
|
profile: zod.ZodString;
|
|
118
119
|
}, "strip", zod.ZodTypeAny, {
|
|
119
|
-
name: string;
|
|
120
120
|
avatar_url: string;
|
|
121
121
|
contributions: string[];
|
|
122
122
|
login: string;
|
|
123
|
+
name: string;
|
|
123
124
|
profile: string;
|
|
124
125
|
}, {
|
|
125
|
-
name: string;
|
|
126
126
|
avatar_url: string;
|
|
127
127
|
contributions: string[];
|
|
128
128
|
login: string;
|
|
129
|
+
name: string;
|
|
129
130
|
profile: string;
|
|
130
131
|
}>, "many">>;
|
|
131
132
|
description: zod.ZodDefault<zod.ZodString>;
|
|
@@ -201,11 +202,12 @@ declare const presets: {
|
|
|
201
202
|
scripts?: Record<string, string> | undefined;
|
|
202
203
|
}>>;
|
|
203
204
|
repository: zod.ZodString;
|
|
205
|
+
rulesetId: zod.ZodOptional<zod.ZodString>;
|
|
204
206
|
title: zod.ZodString;
|
|
205
207
|
usage: zod.ZodOptional<zod.ZodString>;
|
|
206
208
|
version: zod.ZodOptional<zod.ZodString>;
|
|
207
209
|
}>;
|
|
208
|
-
minimal:
|
|
210
|
+
minimal: bingo_stratum.Preset<{
|
|
209
211
|
access: zod.ZodUnion<[zod.ZodLiteral<"public">, zod.ZodLiteral<"restricted">]>;
|
|
210
212
|
author: zod.ZodOptional<zod.ZodString>;
|
|
211
213
|
bin: zod.ZodOptional<zod.ZodString>;
|
|
@@ -216,16 +218,16 @@ declare const presets: {
|
|
|
216
218
|
name: zod.ZodString;
|
|
217
219
|
profile: zod.ZodString;
|
|
218
220
|
}, "strip", zod.ZodTypeAny, {
|
|
219
|
-
name: string;
|
|
220
221
|
avatar_url: string;
|
|
221
222
|
contributions: string[];
|
|
222
223
|
login: string;
|
|
224
|
+
name: string;
|
|
223
225
|
profile: string;
|
|
224
226
|
}, {
|
|
225
|
-
name: string;
|
|
226
227
|
avatar_url: string;
|
|
227
228
|
contributions: string[];
|
|
228
229
|
login: string;
|
|
230
|
+
name: string;
|
|
229
231
|
profile: string;
|
|
230
232
|
}>, "many">>;
|
|
231
233
|
description: zod.ZodDefault<zod.ZodString>;
|
|
@@ -301,6 +303,7 @@ declare const presets: {
|
|
|
301
303
|
scripts?: Record<string, string> | undefined;
|
|
302
304
|
}>>;
|
|
303
305
|
repository: zod.ZodString;
|
|
306
|
+
rulesetId: zod.ZodOptional<zod.ZodString>;
|
|
304
307
|
title: zod.ZodString;
|
|
305
308
|
usage: zod.ZodOptional<zod.ZodString>;
|
|
306
309
|
version: zod.ZodOptional<zod.ZodString>;
|