create-typescript-app 1.75.1 → 1.76.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/bin/help.js +35 -35
- package/lib/bin/help.js.map +1 -1
- package/lib/bin/promptForMode.js +6 -6
- package/lib/bin/promptForMode.js.map +1 -1
- package/lib/shared/cli/spinners.d.ts +1 -1
- package/lib/shared/cli/spinners.js.map +1 -1
- package/lib/shared/options/args.d.ts +39 -13
- package/lib/shared/options/args.js +5 -0
- package/lib/shared/options/args.js.map +1 -1
- package/lib/shared/options/augmentOptionsWithExcludes.js +2 -2
- package/lib/shared/options/augmentOptionsWithExcludes.js.map +1 -1
- package/lib/shared/options/ensureRepositoryExists.js +1 -1
- package/lib/shared/options/ensureRepositoryExists.js.map +1 -1
- package/lib/shared/options/exclusionKeys.d.ts +1 -1
- package/lib/shared/options/exclusionKeys.js +6 -0
- package/lib/shared/options/exclusionKeys.js.map +1 -1
- package/lib/shared/options/optionsSchema.d.ts +6 -2
- package/lib/shared/options/optionsSchema.js +1 -0
- package/lib/shared/options/optionsSchema.js.map +1 -1
- package/lib/shared/options/readOptions.d.ts +1 -1
- package/lib/shared/options/readOptions.js +1 -0
- package/lib/shared/options/readOptions.js.map +1 -1
- package/lib/shared/types.d.ts +25 -24
- package/lib/steps/addOwnerAsAllContributor.js +2 -2
- package/lib/steps/addOwnerAsAllContributor.js.map +1 -1
- package/lib/steps/clearUnnecessaryFiles.js +3 -3
- package/lib/steps/clearUnnecessaryFiles.js.map +1 -1
- package/lib/steps/populateCSpellDictionary.js +7 -7
- package/lib/steps/populateCSpellDictionary.js.map +1 -1
- package/lib/steps/updateReadme.d.ts +1 -1
- package/lib/steps/updateReadme.js +1 -1
- package/lib/steps/updateReadme.js.map +1 -1
- package/lib/steps/writeReadme/index.js +19 -19
- package/lib/steps/writeReadme/index.js.map +1 -1
- package/lib/steps/writing/creation/createESLintConfig.js +21 -43
- package/lib/steps/writing/creation/createESLintConfig.js.map +1 -1
- package/lib/steps/writing/creation/dotGitHub/createDevelopment/index.js +27 -26
- package/lib/steps/writing/creation/dotGitHub/createDevelopment/index.js.map +1 -1
- package/lib/steps/writing/creation/dotGitHub/createMultiWorkflowFile.d.ts +8 -8
- package/lib/steps/writing/creation/dotGitHub/createMultiWorkflowFile.js.map +1 -1
- package/lib/steps/writing/creation/dotGitHub/createSoloWorkflowFile.d.ts +16 -16
- package/lib/steps/writing/creation/dotGitHub/createSoloWorkflowFile.js.map +1 -1
- package/lib/steps/writing/creation/rootFiles.js +1 -1
- package/lib/steps/writing/creation/rootFiles.js.map +1 -1
- package/package.json +48 -48
package/lib/bin/help.js
CHANGED
|
@@ -1,23 +1,22 @@
|
|
|
1
1
|
import chalk from "chalk";
|
|
2
2
|
import { allArgOptions } from "../shared/options/args.js";
|
|
3
|
-
function
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
}
|
|
3
|
+
function logHelpText(introLogs) {
|
|
4
|
+
const helpTextSections = createHelpTextSections();
|
|
5
|
+
for (const log of introLogs) {
|
|
6
|
+
console.log(log);
|
|
7
|
+
console.log(" ");
|
|
8
|
+
}
|
|
9
|
+
console.log(
|
|
10
|
+
chalk.cyan(
|
|
11
|
+
`
|
|
12
|
+
A quickstart-friendly TypeScript template with comprehensive formatting,
|
|
13
|
+
linting, releases, testing, and other great tooling built-in.
|
|
14
|
+
`
|
|
15
|
+
)
|
|
16
|
+
);
|
|
17
|
+
for (const section of helpTextSections) {
|
|
18
|
+
logHelpTextSection(section);
|
|
19
|
+
console.log();
|
|
21
20
|
}
|
|
22
21
|
}
|
|
23
22
|
function createHelpTextSections() {
|
|
@@ -92,23 +91,24 @@ using any or all of the following CLI flags:`
|
|
|
92
91
|
}
|
|
93
92
|
return [core, optional, optOut, offline];
|
|
94
93
|
}
|
|
95
|
-
function
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
94
|
+
function logHelpTextSection(section) {
|
|
95
|
+
console.log(" ");
|
|
96
|
+
console.log(chalk.black.bgGreenBright(section.sectionHeading));
|
|
97
|
+
for (const subsection of section.subsections) {
|
|
98
|
+
if (subsection.warning) {
|
|
99
|
+
console.log(chalk.yellow(subsection.warning));
|
|
100
|
+
}
|
|
101
|
+
if (subsection.subheading) {
|
|
102
|
+
console.log(chalk.green(subsection.subheading));
|
|
103
|
+
}
|
|
104
|
+
for (const { description, flag, type } of subsection.flags) {
|
|
105
|
+
console.log(
|
|
106
|
+
chalk.cyan(
|
|
107
|
+
`
|
|
108
|
+
--${flag}${type !== "boolean" ? ` (${chalk.cyanBright(type)})` : ""}: ${description}`
|
|
109
|
+
)
|
|
110
|
+
);
|
|
111
|
+
}
|
|
112
112
|
}
|
|
113
113
|
}
|
|
114
114
|
export {
|
package/lib/bin/help.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/bin/help.ts"],"sourcesContent":["import chalk from \"chalk\";\n\nimport { allArgOptions } from \"../shared/options/args.js\";\n\ninterface HelpTextSection {\n\tsectionHeading: string;\n\tsubsections: {\n\t\tflags: SubsectionFlag[];\n\t\tsubheading?: string;\n\t\twarning?: string;\n\t}[];\n}\n\ninterface SubsectionFlag {\n\tdescription: string;\n\tflag: string;\n\ttype: string;\n}\n\
|
|
1
|
+
{"version":3,"sources":["../../src/bin/help.ts"],"sourcesContent":["import chalk from \"chalk\";\n\nimport { allArgOptions } from \"../shared/options/args.js\";\n\ninterface HelpTextSection {\n\tsectionHeading: string;\n\tsubsections: {\n\t\tflags: SubsectionFlag[];\n\t\tsubheading?: string;\n\t\twarning?: string;\n\t}[];\n}\n\ninterface SubsectionFlag {\n\tdescription: string;\n\tflag: string;\n\ttype: string;\n}\n\nexport function logHelpText(introLogs: string[]): void {\n\tconst helpTextSections = createHelpTextSections();\n\n\tfor (const log of introLogs) {\n\t\tconsole.log(log);\n\t\tconsole.log(\" \");\n\t}\n\n\tconsole.log(\n\t\tchalk.cyan(\n\t\t\t`\nA quickstart-friendly TypeScript template with comprehensive formatting, \nlinting, releases, testing, and other great tooling built-in.\n `,\n\t\t),\n\t);\n\n\tfor (const section of helpTextSections) {\n\t\tlogHelpTextSection(section);\n\n\t\tconsole.log();\n\t}\n}\n\nfunction createHelpTextSections(): HelpTextSection[] {\n\tconst core: HelpTextSection = {\n\t\tsectionHeading: \"Core options:\",\n\t\tsubsections: [\n\t\t\t{\n\t\t\t\tflags: [],\n\t\t\t},\n\t\t],\n\t};\n\n\tconst optional: HelpTextSection = {\n\t\tsectionHeading: \"Optional options:\",\n\t\tsubsections: [\n\t\t\t{\n\t\t\t\tflags: [],\n\t\t\t},\n\t\t],\n\t};\n\n\tconst optOut: HelpTextSection = {\n\t\tsectionHeading: \"Opt-outs:\",\n\t\tsubsections: [\n\t\t\t{\n\t\t\t\tflags: [],\n\t\t\t\twarning: `\n ⚠️ Warning: Specifying any --exclude-* flag on the command-line will \n cause the setup script to skip prompting for more excludes. ⚠️`,\n\t\t\t},\n\t\t\t{\n\t\t\t\tflags: [\n\t\t\t\t\t{\n\t\t\t\t\t\tdescription: `Skips network calls that fetch all-contributors\n data from GitHub`,\n\t\t\t\t\t\tflag: \"exclude-contributors\",\n\t\t\t\t\t\ttype: \"boolean\",\n\t\t\t\t\t},\n\t\t\t\t],\n\t\t\t\tsubheading: `\nYou can prevent the migration script from making some network-based \nchanges using any or all of the following CLI flags:`,\n\t\t\t},\n\t\t\t{\n\t\t\t\tflags: [],\n\t\t\t\tsubheading: `\nYou can prevent the migration script from making some changes on disk \nusing any or all of the following CLI flags:`,\n\t\t\t},\n\t\t],\n\t};\n\n\tconst offline: HelpTextSection = {\n\t\tsectionHeading: \"Offline Mode:\",\n\t\tsubsections: [\n\t\t\t{\n\t\t\t\tflags: [],\n\t\t\t},\n\t\t],\n\t};\n\n\tconst subsections = {\n\t\tcore: core.subsections[0],\n\t\toffline: offline.subsections[0],\n\t\t\"opt-out\": optOut.subsections[0],\n\t\toptional: optional.subsections[0],\n\t\t\"skip-disk\": optOut.subsections[2],\n\t\t\"skip-net\": optOut.subsections[1],\n\t};\n\n\tfor (const [option, data] of Object.entries(allArgOptions)) {\n\t\tsubsections[data.docsSection].flags.push({\n\t\t\tdescription: data.description,\n\t\t\tflag: option,\n\t\t\ttype: data.type,\n\t\t});\n\t}\n\n\treturn [core, optional, optOut, offline];\n}\n\nfunction logHelpTextSection(section: HelpTextSection): void {\n\tconsole.log(\" \");\n\n\tconsole.log(chalk.black.bgGreenBright(section.sectionHeading));\n\n\tfor (const subsection of section.subsections) {\n\t\tif (subsection.warning) {\n\t\t\tconsole.log(chalk.yellow(subsection.warning));\n\t\t}\n\n\t\tif (subsection.subheading) {\n\t\t\tconsole.log(chalk.green(subsection.subheading));\n\t\t}\n\n\t\tfor (const { description, flag, type } of subsection.flags) {\n\t\t\tconsole.log(\n\t\t\t\tchalk.cyan(\n\t\t\t\t\t`\n --${flag}${\n\t\ttype !== \"boolean\" ? ` (${chalk.cyanBright(type)})` : \"\"\n\t}: ${description}`,\n\t\t\t\t),\n\t\t\t);\n\t\t}\n\t}\n}\n"],"mappings":"AAAA,OAAO,WAAW;AAElB,SAAS,qBAAqB;AAiBvB,SAAS,YAAY,WAA2B;AACtD,QAAM,mBAAmB,uBAAuB;AAEhD,aAAW,OAAO,WAAW;AAC5B,YAAQ,IAAI,GAAG;AACf,YAAQ,IAAI,GAAG;AAAA,EAChB;AAEA,UAAQ;AAAA,IACP,MAAM;AAAA,MACL;AAAA;AAAA;AAAA;AAAA,I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AM,KAAK;AAAA,MACxC,aAAa,KAAK;AAAA,MAClB,MAAM;AAAA,MACN,MAAM,KAAK;AAAA,IACZ,CAAC;AAAA,EACF;AAEA,SAAO,CAAC,MAAM,UAAU,QAAQ,OAAO;AACxC;AAEA,SAAS,mBAAmB,SAAgC;AAC3D,UAAQ,IAAI,GAAG;AAEf,UAAQ,IAAI,MAAM,MAAM,cAAc,QAAQ,cAAc,CAAC;AAE7D,aAAW,cAAc,QAAQ,aAAa;AAC7C,QAAI,WAAW,SAAS;AACvB,cAAQ,IAAI,MAAM,OAAO,WAAW,OAAO,CAAC;AAAA,IAC7C;AAEA,QAAI,WAAW,YAAY;AAC1B,cAAQ,IAAI,MAAM,MAAM,WAAW,UAAU,CAAC;AAAA,IAC/C;AAEA,eAAW,EAAE,aAAa,MAAM,KAAK,KAAK,WAAW,OAAO;AAC3D,cAAQ;AAAA,QACP,MAAM;AAAA,UACL;AAAA,MACC,IAAI,GACR,SAAS,YAAY,KAAK,MAAM,WAAW,IAAI,CAAC,MAAM,EACvD,KAAK,WAAW;AAAA,QACb;AAAA,MACD;AAAA,IACD;AAAA,EACD;AACD;","names":[]}
|
package/lib/bin/promptForMode.js
CHANGED
|
@@ -6,12 +6,6 @@ import * as process from "node:process";
|
|
|
6
6
|
import { logLine } from "../shared/cli/lines.js";
|
|
7
7
|
import { filterPromptCancel } from "../shared/prompts.js";
|
|
8
8
|
const allowedModes = ["create", "initialize", "migrate"];
|
|
9
|
-
function isMode(input) {
|
|
10
|
-
return allowedModes.includes(input);
|
|
11
|
-
}
|
|
12
|
-
function label(base, text) {
|
|
13
|
-
return `${chalk.bold(base)} ${text}`;
|
|
14
|
-
}
|
|
15
9
|
async function promptForMode(auto, input) {
|
|
16
10
|
if (auto && input !== "migrate") {
|
|
17
11
|
return {
|
|
@@ -101,6 +95,12 @@ async function promptForMode(auto, input) {
|
|
|
101
95
|
mode: "create"
|
|
102
96
|
};
|
|
103
97
|
}
|
|
98
|
+
function isMode(input) {
|
|
99
|
+
return allowedModes.includes(input);
|
|
100
|
+
}
|
|
101
|
+
function label(base, text) {
|
|
102
|
+
return `${chalk.bold(base)} ${text}`;
|
|
103
|
+
}
|
|
104
104
|
export {
|
|
105
105
|
promptForMode
|
|
106
106
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/bin/promptForMode.ts"],"sourcesContent":["import * as prompts from \"@clack/prompts\";\nimport chalk from \"chalk\";\nimport * as fs from \"fs/promises\";\nimport path from \"node:path\";\nimport * as process from \"node:process\";\n\nimport { logLine } from \"../shared/cli/lines.js\";\nimport { filterPromptCancel } from \"../shared/prompts.js\";\nimport { Mode, PromptedOptions } from \"../shared/types.js\";\n\nconst allowedModes = [\"create\", \"initialize\", \"migrate\"] satisfies Mode[];\n\
|
|
1
|
+
{"version":3,"sources":["../../src/bin/promptForMode.ts"],"sourcesContent":["import * as prompts from \"@clack/prompts\";\nimport chalk from \"chalk\";\nimport * as fs from \"fs/promises\";\nimport path from \"node:path\";\nimport * as process from \"node:process\";\n\nimport { logLine } from \"../shared/cli/lines.js\";\nimport { filterPromptCancel } from \"../shared/prompts.js\";\nimport { Mode, PromptedOptions } from \"../shared/types.js\";\n\nconst allowedModes = [\"create\", \"initialize\", \"migrate\"] satisfies Mode[];\n\nexport interface PromptedMode {\n\tmode: Error | Mode | undefined;\n\toptions?: PromptedOptions;\n}\n\nexport async function promptForMode(\n\tauto: boolean,\n\tinput: boolean | string | undefined,\n): Promise<PromptedMode> {\n\tif (auto && input !== \"migrate\") {\n\t\treturn {\n\t\t\tmode: new Error(\"--auto can only be used with --mode migrate.\"),\n\t\t};\n\t}\n\n\tif (input) {\n\t\tif (!isMode(input)) {\n\t\t\treturn {\n\t\t\t\tmode: new Error(\n\t\t\t\t\t`Unknown --mode: ${input}. Allowed modes are: ${allowedModes.join(\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}\n\n\t\treturn { mode: input };\n\t}\n\n\tconst dir = await fs.readdir(\".\");\n\n\tif (dir.length === 0) {\n\t\tconst mode = filterPromptCancel(\n\t\t\t(await prompts.select({\n\t\t\t\tmessage: chalk.blue(\"How would you like to use the template?\"),\n\t\t\t\toptions: [\n\t\t\t\t\t{\n\t\t\t\t\t\tlabel: label(\n\t\t\t\t\t\t\t\"create\",\n\t\t\t\t\t\t\t\"a new repository in the current empty directory\",\n\t\t\t\t\t\t),\n\t\t\t\t\t\tvalue: \"create-current\",\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tlabel: label(\"create\", \"a new repository in a new child directory\"),\n\t\t\t\t\t\tvalue: \"create-child\",\n\t\t\t\t\t},\n\t\t\t\t],\n\t\t\t})) as string,\n\t\t);\n\n\t\tconst directory = path.basename(process.cwd());\n\n\t\treturn {\n\t\t\tmode: \"create\",\n\t\t\t...(mode === \"create-current\" && {\n\t\t\t\toptions: {\n\t\t\t\t\tdirectory: \".\",\n\t\t\t\t\trepository: directory,\n\t\t\t\t},\n\t\t\t}),\n\t\t};\n\t}\n\n\tif (dir.includes(\".git\")) {\n\t\treturn {\n\t\t\tmode: filterPromptCancel(\n\t\t\t\t(await prompts.select({\n\t\t\t\t\tinitialValue: \"migrate\" as Mode,\n\t\t\t\t\tmessage: chalk.blue(\"How would you like to use the template?\"),\n\t\t\t\t\toptions: [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tlabel: label(\"create\", \"a new repository in a child directory\"),\n\t\t\t\t\t\t\tvalue: \"create\",\n\t\t\t\t\t\t},\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tlabel: label(\n\t\t\t\t\t\t\t\t\"initialize\",\n\t\t\t\t\t\t\t\t\"a freshly cloned repository in the current directory\",\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\tvalue: \"initialize\",\n\t\t\t\t\t\t},\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tlabel: label(\n\t\t\t\t\t\t\t\t\"migrate\",\n\t\t\t\t\t\t\t\t\"the existing repository in the current directory\",\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\tvalue: \"migrate\",\n\t\t\t\t\t\t},\n\t\t\t\t\t],\n\t\t\t\t})) as Mode | symbol,\n\t\t\t),\n\t\t};\n\t}\n\n\tlogLine();\n\tlogLine(\n\t\tchalk.gray(\n\t\t\t\"Defaulting to --mode create because the directory contains children and isn't a Git repository.\",\n\t\t),\n\t);\n\n\treturn {\n\t\tmode: \"create\",\n\t};\n}\n\nfunction isMode(input: boolean | string): input is Mode {\n\treturn allowedModes.includes(input as Mode);\n}\n\nfunction label(base: string, text: string) {\n\treturn `${chalk.bold(base)} ${text}`;\n}\n"],"mappings":"AAAA,YAAY,aAAa;AACzB,OAAO,WAAW;AAClB,YAAY,QAAQ;AACpB,OAAO,UAAU;AACjB,YAAY,aAAa;AAEzB,SAAS,eAAe;AACxB,SAAS,0BAA0B;AAGnC,MAAM,eAAe,CAAC,UAAU,cAAc,SAAS;AAOvD,eAAsB,cACrB,MACA,OACwB;AACxB,MAAI,QAAQ,UAAU,WAAW;AAChC,WAAO;AAAA,MACN,MAAM,IAAI,MAAM,8CAA8C;AAAA,IAC/D;AAAA,EACD;AAEA,MAAI,OAAO;AACV,QAAI,CAAC,OAAO,KAAK,GAAG;AACnB,aAAO;AAAA,QACN,MAAM,IAAI;AAAA,UACT,mBAAmB,KAAK,wBAAwB,aAAa;AAAA,YAC5D;AAAA,UACD,CAAC;AAAA,QACF;AAAA,MACD;AAAA,IACD;AAEA,WAAO,EAAE,MAAM,MAAM;AAAA,EACtB;AAEA,QAAM,MAAM,MAAM,GAAG,QAAQ,GAAG;AAEhC,MAAI,IAAI,WAAW,GAAG;AACrB,UAAM,OAAO;AAAA,MACX,MAAM,QAAQ,OAAO;AAAA,QACrB,SAAS,MAAM,KAAK,yCAAyC;AAAA,QAC7D,SAAS;AAAA,UACR;AAAA,YACC,OAAO;AAAA,cACN;AAAA,cACA;AAAA,YACD;AAAA,YACA,OAAO;AAAA,UACR;AAAA,UACA;AAAA,YACC,OAAO,MAAM,UAAU,2CAA2C;AAAA,YAClE,OAAO;AAAA,UACR;AAAA,QACD;AAAA,MACD,CAAC;AAAA,IACF;AAEA,UAAM,YAAY,KAAK,SAAS,QAAQ,IAAI,CAAC;AAE7C,WAAO;AAAA,MACN,MAAM;AAAA,MACN,GAAI,SAAS,oBAAoB;AAAA,QAChC,SAAS;AAAA,UACR,WAAW;AAAA,UACX,YAAY;AAAA,QACb;AAAA,MACD;AAAA,IACD;AAAA,EACD;AAEA,MAAI,IAAI,SAAS,MAAM,GAAG;AACzB,WAAO;AAAA,MACN,MAAM;AAAA,QACJ,MAAM,QAAQ,OAAO;AAAA,UACrB,cAAc;AAAA,UACd,SAAS,MAAM,KAAK,yCAAyC;AAAA,UAC7D,SAAS;AAAA,YACR;AAAA,cACC,OAAO,MAAM,UAAU,uCAAuC;AAAA,cAC9D,OAAO;AAAA,YACR;AAAA,YACA;AAAA,cACC,OAAO;AAAA,gBACN;AAAA,gBACA;AAAA,cACD;AAAA,cACA,OAAO;AAAA,YACR;AAAA,YACA;AAAA,cACC,OAAO;AAAA,gBACN;AAAA,gBACA;AAAA,cACD;AAAA,cACA,OAAO;AAAA,YACR;AAAA,UACD;AAAA,QACD,CAAC;AAAA,MACF;AAAA,IACD;AAAA,EACD;AAEA,UAAQ;AACR;AAAA,IACC,MAAM;AAAA,MACL;AAAA,IACD;AAAA,EACD;AAEA,SAAO;AAAA,IACN,MAAM;AAAA,EACP;AACD;AAEA,SAAS,OAAO,OAAwC;AACvD,SAAO,aAAa,SAAS,KAAa;AAC3C;AAEA,SAAS,MAAM,MAAc,MAAc;AAC1C,SAAO,GAAG,MAAM,KAAK,IAAI,CAAC,IAAI,IAAI;AACnC;","names":[]}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
type SpinnerTask<Return> = () => Promise<Return>;
|
|
2
1
|
type LabeledSpinnerTask<Return> = [string, SpinnerTask<Return>];
|
|
2
|
+
type SpinnerTask<Return> = () => Promise<Return>;
|
|
3
3
|
declare function withSpinner<Return>(label: string, task: SpinnerTask<Return>): Promise<Return>;
|
|
4
4
|
declare function withSpinners(label: string, tasks: LabeledSpinnerTask<void>[]): Promise<void>;
|
|
5
5
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/shared/cli/spinners.ts"],"sourcesContent":["import * as prompts from \"@clack/prompts\";\nimport chalk from \"chalk\";\nimport readline from \"readline\";\n\nimport { logLine, logNewSection, makeLine } from \"./lines.js\";\nimport { lowerFirst } from \"./lowerFirst.js\";\nimport { startLineWithDots } from \"./startLineWithDots.js\";\n\nconst s = prompts.spinner();\n\nexport type
|
|
1
|
+
{"version":3,"sources":["../../../src/shared/cli/spinners.ts"],"sourcesContent":["import * as prompts from \"@clack/prompts\";\nimport chalk from \"chalk\";\nimport readline from \"readline\";\n\nimport { logLine, logNewSection, makeLine } from \"./lines.js\";\nimport { lowerFirst } from \"./lowerFirst.js\";\nimport { startLineWithDots } from \"./startLineWithDots.js\";\n\nconst s = prompts.spinner();\n\nexport type LabeledSpinnerTask<Return> = [string, SpinnerTask<Return>];\n\nexport type SpinnerTask<Return> = () => Promise<Return>;\n\nexport async function withSpinner<Return>(\n\tlabel: string,\n\ttask: SpinnerTask<Return>,\n) {\n\ts.start(`${label}...`);\n\n\ttry {\n\t\tconst result = await task();\n\n\t\ts.stop(chalk.green(`✅ Passed ${lowerFirst(label)}.`));\n\n\t\treturn result;\n\t} catch (error) {\n\t\ts.stop(chalk.red(`❌ Error ${lowerFirst(label)}.`));\n\n\t\tthrow new Error(`Failed ${lowerFirst(label)}`, { cause: error });\n\t}\n}\n\nexport async function withSpinners(\n\tlabel: string,\n\ttasks: LabeledSpinnerTask<void>[],\n) {\n\tlogNewSection(`${label}...`);\n\n\tlet currentLabel!: string;\n\tlet lastLogged!: string;\n\n\tfor (const [label, run] of tasks) {\n\t\tcurrentLabel = label;\n\n\t\tconst line = makeLine(chalk.gray(` - ${label}`));\n\t\tconst stopWriting = startLineWithDots(line);\n\n\t\ttry {\n\t\t\tawait run();\n\t\t} catch (error) {\n\t\t\tconst descriptor = `${lowerFirst(label)} > ${lowerFirst(currentLabel)}`;\n\n\t\t\tlogLine(chalk.red(`❌ Error ${descriptor}.`));\n\n\t\t\tthrow new Error(`Failed ${descriptor}`, { cause: error });\n\t\t} finally {\n\t\t\tconst lineLength = stopWriting();\n\t\t\treadline.clearLine(process.stdout, -1);\n\t\t\treadline.moveCursor(process.stdout, -lineLength, 0);\n\t\t}\n\n\t\tlastLogged = chalk.gray(`${line} ✔️\\n`);\n\n\t\tprocess.stdout.write(lastLogged);\n\t}\n\n\treadline.moveCursor(process.stdout, -lastLogged.length, -tasks.length - 2);\n\treadline.clearScreenDown(process.stdout);\n\n\tlogNewSection(chalk.green(`✅ Passed ${lowerFirst(label)}.`));\n}\n"],"mappings":"AAAA,YAAY,aAAa;AACzB,OAAO,WAAW;AAClB,OAAO,cAAc;AAErB,SAAS,SAAS,eAAe,gBAAgB;AACjD,SAAS,kBAAkB;AAC3B,SAAS,yBAAyB;AAElC,MAAM,IAAI,QAAQ,QAAQ;AAM1B,eAAsB,YACrB,OACA,MACC;AACD,IAAE,MAAM,GAAG,KAAK,KAAK;AAErB,MAAI;AACH,UAAM,SAAS,MAAM,KAAK;AAE1B,MAAE,KAAK,MAAM,MAAM,iBAAY,WAAW,KAAK,CAAC,GAAG,CAAC;AAEpD,WAAO;AAAA,EACR,SAAS,OAAO;AACf,MAAE,KAAK,MAAM,IAAI,gBAAW,WAAW,KAAK,CAAC,GAAG,CAAC;AAEjD,UAAM,IAAI,MAAM,UAAU,WAAW,KAAK,CAAC,IAAI,EAAE,OAAO,MAAM,CAAC;AAAA,EAChE;AACD;AAEA,eAAsB,aACrB,OACA,OACC;AACD,gBAAc,GAAG,KAAK,KAAK;AAE3B,MAAI;AACJ,MAAI;AAEJ,aAAW,CAACA,QAAO,GAAG,KAAK,OAAO;AACjC,mBAAeA;AAEf,UAAM,OAAO,SAAS,MAAM,KAAK,MAAMA,MAAK,EAAE,CAAC;AAC/C,UAAM,cAAc,kBAAkB,IAAI;AAE1C,QAAI;AACH,YAAM,IAAI;AAAA,IACX,SAAS,OAAO;AACf,YAAM,aAAa,GAAG,WAAWA,MAAK,CAAC,MAAM,WAAW,YAAY,CAAC;AAErE,cAAQ,MAAM,IAAI,gBAAW,UAAU,GAAG,CAAC;AAE3C,YAAM,IAAI,MAAM,UAAU,UAAU,IAAI,EAAE,OAAO,MAAM,CAAC;AAAA,IACzD,UAAE;AACD,YAAM,aAAa,YAAY;AAC/B,eAAS,UAAU,QAAQ,QAAQ,EAAE;AACrC,eAAS,WAAW,QAAQ,QAAQ,CAAC,YAAY,CAAC;AAAA,IACnD;AAEA,iBAAa,MAAM,KAAK,GAAG,IAAI;AAAA,CAAO;AAEtC,YAAQ,OAAO,MAAM,UAAU;AAAA,EAChC;AAEA,WAAS,WAAW,QAAQ,QAAQ,CAAC,WAAW,QAAQ,CAAC,MAAM,SAAS,CAAC;AACzE,WAAS,gBAAgB,QAAQ,MAAM;AAEvC,gBAAc,MAAM,MAAM,iBAAY,WAAW,KAAK,CAAC,GAAG,CAAC;AAC5D;","names":["label"]}
|
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
declare const allArgOptions: {
|
|
2
2
|
readonly access: {
|
|
3
|
-
readonly description: `(${string}): Which ${string} to
|
|
3
|
+
readonly description: `(${string}): Which ${string} to
|
|
4
|
+
release npm packages with (by default, "public")`;
|
|
4
5
|
readonly docsSection: "optional";
|
|
5
6
|
readonly type: "string";
|
|
6
7
|
};
|
|
7
8
|
readonly author: {
|
|
8
|
-
readonly description: `Username on npm to publish packages under (by
|
|
9
|
+
readonly description: `Username on npm to publish packages under (by
|
|
10
|
+
default, an existing npm author, or the currently logged in npm user, or
|
|
11
|
+
${string})`;
|
|
9
12
|
readonly docsSection: "optional";
|
|
10
13
|
readonly type: "string";
|
|
11
14
|
};
|
|
@@ -15,7 +18,11 @@ declare const allArgOptions: {
|
|
|
15
18
|
readonly type: "boolean";
|
|
16
19
|
};
|
|
17
20
|
readonly base: {
|
|
18
|
-
readonly description: `Whether to scaffold the repository with
|
|
21
|
+
readonly description: `Whether to scaffold the repository with:
|
|
22
|
+
\u2022 everything: that comes with the template (${string})
|
|
23
|
+
\u2022 common: additions to the minimal starters such as releases and tests
|
|
24
|
+
\u2022 minimal: amounts of tooling, essentially opting out of everything
|
|
25
|
+
\u2022 prompt: for which portions to exclude`;
|
|
19
26
|
readonly docsSection: "core";
|
|
20
27
|
readonly type: "string";
|
|
21
28
|
};
|
|
@@ -45,12 +52,14 @@ declare const allArgOptions: {
|
|
|
45
52
|
readonly type: "string";
|
|
46
53
|
};
|
|
47
54
|
readonly "email-github": {
|
|
48
|
-
readonly description: `Optionally, may be provided to use different emails in ${string}
|
|
55
|
+
readonly description: `Optionally, may be provided to use different emails in ${string}
|
|
56
|
+
files`;
|
|
49
57
|
readonly docsSection: "optional";
|
|
50
58
|
readonly type: "string";
|
|
51
59
|
};
|
|
52
60
|
readonly "email-npm": {
|
|
53
|
-
readonly description: `Optionally, may be provided to use different emails in
|
|
61
|
+
readonly description: `Optionally, may be provided to use different emails in
|
|
62
|
+
${string}`;
|
|
54
63
|
readonly docsSection: "optional";
|
|
55
64
|
readonly type: "string";
|
|
56
65
|
};
|
|
@@ -70,7 +79,8 @@ declare const allArgOptions: {
|
|
|
70
79
|
readonly type: "boolean";
|
|
71
80
|
};
|
|
72
81
|
readonly "exclude-lint-json": {
|
|
73
|
-
readonly description: `Don't apply linting and sorting to ${string}, and
|
|
82
|
+
readonly description: `Don't apply linting and sorting to ${string}, and
|
|
83
|
+
${string} files.`;
|
|
74
84
|
readonly docsSection: "opt-out";
|
|
75
85
|
readonly type: "boolean";
|
|
76
86
|
};
|
|
@@ -134,13 +144,19 @@ declare const allArgOptions: {
|
|
|
134
144
|
readonly docsSection: "opt-out";
|
|
135
145
|
readonly type: "boolean";
|
|
136
146
|
};
|
|
147
|
+
readonly "exclude-templated-by": {
|
|
148
|
+
readonly description: "Don't add a _\"This package was templated with create-typescript-app\"_ notice at the end of the README.md.";
|
|
149
|
+
readonly docsSection: "opt-out";
|
|
150
|
+
readonly type: "boolean";
|
|
151
|
+
};
|
|
137
152
|
readonly "exclude-tests": {
|
|
138
153
|
readonly description: "Don't add Vitest tooling for fast unit tests, configured \n with coverage tracking.";
|
|
139
154
|
readonly docsSection: "opt-out";
|
|
140
155
|
readonly type: "boolean";
|
|
141
156
|
};
|
|
142
157
|
readonly funding: {
|
|
143
|
-
readonly description: `GitHub organization or username to mention in ${string}
|
|
158
|
+
readonly description: `GitHub organization or username to mention in ${string}
|
|
159
|
+
(by default, owner)`;
|
|
144
160
|
readonly docsSection: "optional";
|
|
145
161
|
readonly type: "string";
|
|
146
162
|
};
|
|
@@ -150,12 +166,15 @@ declare const allArgOptions: {
|
|
|
150
166
|
readonly type: "string";
|
|
151
167
|
};
|
|
152
168
|
readonly "guide-title": {
|
|
153
|
-
readonly description: `If ${string} is provided or detected from an existing
|
|
169
|
+
readonly description: `If ${string} is provided or detected from an existing
|
|
170
|
+
DEVELOPMENT.md, the text title to place in the guide link`;
|
|
154
171
|
readonly docsSection: "optional";
|
|
155
172
|
readonly type: "string";
|
|
156
173
|
};
|
|
157
174
|
readonly keywords: {
|
|
158
|
-
readonly description: `Any number of keywords to include in ${string} (by default,
|
|
175
|
+
readonly description: `Any number of keywords to include in ${string} (by default,
|
|
176
|
+
none). This can be specified any number of times, like
|
|
177
|
+
${string}`;
|
|
159
178
|
readonly docsSection: "optional";
|
|
160
179
|
readonly multiple: true;
|
|
161
180
|
readonly type: "string";
|
|
@@ -166,7 +185,8 @@ declare const allArgOptions: {
|
|
|
166
185
|
readonly type: "string";
|
|
167
186
|
};
|
|
168
187
|
readonly "logo-alt": {
|
|
169
|
-
readonly description: `If ${string} is provided or detected from an existing README.md,
|
|
188
|
+
readonly description: `If ${string} is provided or detected from an existing README.md,
|
|
189
|
+
alt text that describes the image will be prompted for if not provided`;
|
|
170
190
|
readonly docsSection: "optional";
|
|
171
191
|
readonly type: "string";
|
|
172
192
|
};
|
|
@@ -176,7 +196,11 @@ declare const allArgOptions: {
|
|
|
176
196
|
readonly type: "string";
|
|
177
197
|
};
|
|
178
198
|
readonly offline: {
|
|
179
|
-
readonly description: `You can run ${string} in an "offline" mode.
|
|
199
|
+
readonly description: `You can run ${string} in an "offline" mode.
|
|
200
|
+
Doing so will:
|
|
201
|
+
\u2022 Enable ${string} and ${string}
|
|
202
|
+
\u2022 Skip network calls when setting up contributors
|
|
203
|
+
\u2022 Run pnpm commands with pnpm's ${string} mode`;
|
|
180
204
|
readonly docsSection: "offline";
|
|
181
205
|
readonly type: "boolean";
|
|
182
206
|
};
|
|
@@ -196,7 +220,8 @@ declare const allArgOptions: {
|
|
|
196
220
|
readonly type: "string";
|
|
197
221
|
};
|
|
198
222
|
readonly "skip-all-contributors-api": {
|
|
199
|
-
readonly description: `Skips network calls that fetch all-contributors data from
|
|
223
|
+
readonly description: `Skips network calls that fetch all-contributors data from
|
|
224
|
+
GitHub. This flag does nothing if ${string} was specified.`;
|
|
200
225
|
readonly docsSection: "skip-net";
|
|
201
226
|
readonly type: "boolean";
|
|
202
227
|
};
|
|
@@ -211,7 +236,8 @@ declare const allArgOptions: {
|
|
|
211
236
|
readonly type: "boolean";
|
|
212
237
|
};
|
|
213
238
|
readonly "skip-removal": {
|
|
214
|
-
readonly description: `Skips removing setup docs and scripts, including this ${string}
|
|
239
|
+
readonly description: `Skips removing setup docs and scripts, including this ${string}
|
|
240
|
+
directory`;
|
|
215
241
|
readonly docsSection: "skip-disk";
|
|
216
242
|
readonly type: "boolean";
|
|
217
243
|
};
|
|
@@ -173,6 +173,11 @@ const allArgOptions = {
|
|
|
173
173
|
docsSection: "opt-out",
|
|
174
174
|
type: "boolean"
|
|
175
175
|
},
|
|
176
|
+
"exclude-templated-by": {
|
|
177
|
+
description: `Don't add a _"This package was templated with create-typescript-app"_ notice at the end of the README.md.`,
|
|
178
|
+
docsSection: "opt-out",
|
|
179
|
+
type: "boolean"
|
|
180
|
+
},
|
|
176
181
|
"exclude-tests": {
|
|
177
182
|
description: `Don't add Vitest tooling for fast unit tests, configured
|
|
178
183
|
with coverage tracking.`,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/shared/options/args.ts"],"sourcesContent":["import chalk from \"chalk\";\n\nexport const allArgOptions = {\n\taccess: {\n\t\tdescription: `(${chalk.cyanBright(\n\t\t\t'\"public\" | \"restricted\"',\n\t\t)}): Which ${chalk.cyanBright(\"npm publish --access\")} to \n release npm packages with (by default, \"public\")`,\n\t\tdocsSection: \"optional\",\n\t\ttype: \"string\",\n\t},\n\tauthor: {\n\t\tdescription: `Username on npm to publish packages under (by \n default, an existing npm author, or the currently logged in npm user, or \n ${chalk.cyanBright(\"owner.toLowerCase()\")})`,\n\t\tdocsSection: \"optional\",\n\t\ttype: \"string\",\n\t},\n\tauto: {\n\t\tdescription: `Whether to infer all options from files on disk.`,\n\t\tdocsSection: \"optional\",\n\t\ttype: \"boolean\",\n\t},\n\tbase: {\n\t\tdescription: `Whether to scaffold the repository with:\n • everything: that comes with the template (${chalk.cyanBright.bold(\n\t\t\"recommended\",\n\t)})\n • common: additions to the minimal starters such as releases and tests\n • minimal: amounts of tooling, essentially opting out of everything\n • prompt: for which portions to exclude`,\n\t\tdocsSection: \"core\",\n\t\ttype: \"string\",\n\t},\n\tbin: {\n\t\tdescription: `package.json bin value to include for npx-style running.`,\n\t\tdocsSection: \"optional\",\n\t\ttype: \"string\",\n\t},\n\t\"create-repository\": {\n\t\tdescription: `Whether to create a corresponding repository on github.com \n (if it doesn't yet exist)`,\n\t\tdocsSection: \"core\",\n\t\ttype: \"boolean\",\n\t},\n\tdescription: {\n\t\tdescription: `Sentence case description of the repository \n (e.g. A quickstart-friendly TypeScript package with lots of great \n repository tooling. ✨)`,\n\t\tdocsSection: \"core\",\n\t\ttype: \"string\",\n\t},\n\tdirectory: {\n\t\tdescription: `Directory to create the repository in (by default, the same \n name as the repository)`,\n\t\tdocsSection: \"optional\",\n\t\ttype: \"string\",\n\t},\n\temail: {\n\t\tdescription: `Email address to be listed as the point of contact in docs \n and packages (e.g. example@joshuakgoldberg.com)`,\n\t\tdocsSection: \"optional\",\n\t\ttype: \"string\",\n\t},\n\t\"email-github\": {\n\t\tdescription: `Optionally, may be provided to use different emails in ${chalk.cyanBright(\n\t\t\t\".md\",\n\t\t)} \n files`,\n\t\tdocsSection: \"optional\",\n\t\ttype: \"string\",\n\t},\n\t\"email-npm\": {\n\t\tdescription: `Optionally, may be provided to use different emails in \n ${chalk.cyanBright(\"package.json\")}`,\n\t\tdocsSection: \"optional\",\n\t\ttype: \"string\",\n\t},\n\t\"exclude-all-contributors\": {\n\t\tdescription: `Don't add all-contributors to track contributions \n and display them in a README.md table.`,\n\t\tdocsSection: \"opt-out\",\n\t\ttype: \"boolean\",\n\t},\n\t\"exclude-compliance\": {\n\t\tdescription: `Don't add a GitHub Actions workflow to verify that PRs match \n an expected format.`,\n\t\tdocsSection: \"opt-out\",\n\t\ttype: \"boolean\",\n\t},\n\t\"exclude-lint-jsdoc\": {\n\t\tdescription: `Don't use eslint-plugin-jsdoc to enforce good practices around \n JSDoc comments.`,\n\t\tdocsSection: \"opt-out\",\n\t\ttype: \"boolean\",\n\t},\n\t\"exclude-lint-json\": {\n\t\tdescription: `Don't apply linting and sorting to ${chalk.cyanBright(\n\t\t\t\"*.json\",\n\t\t)}, and \n ${chalk.cyanBright(\"*.jsonc\")} files.`,\n\t\tdocsSection: \"opt-out\",\n\t\ttype: \"boolean\",\n\t},\n\t\"exclude-lint-knip\": {\n\t\tdescription: `Don't add Knip to detect unused files, dependencies, and code \n exports.`,\n\t\tdocsSection: \"opt-out\",\n\t\ttype: \"boolean\",\n\t},\n\t\"exclude-lint-md\": {\n\t\tdescription: `Don't apply linting to ${chalk.cyanBright(\"*.md\")} files.`,\n\t\tdocsSection: \"opt-out\",\n\t\ttype: \"boolean\",\n\t},\n\t\"exclude-lint-package-json\": {\n\t\tdescription: `Don't add eslint-plugin-package-json to lint for \n package.json correctness.`,\n\t\tdocsSection: \"opt-out\",\n\t\ttype: \"boolean\",\n\t},\n\t\"exclude-lint-packages\": {\n\t\tdescription: `Don't add a pnpm dedupe workflow to ensure packages \n aren't duplicated unnecessarily.`,\n\t\tdocsSection: \"opt-out\",\n\t\ttype: \"boolean\",\n\t},\n\t\"exclude-lint-perfectionist\": {\n\t\tdescription: `Don't apply eslint-plugin-perfectionist to ensure \n imports, keys, and so on are in sorted order.`,\n\t\tdocsSection: \"opt-out\",\n\t\ttype: \"boolean\",\n\t},\n\t\"exclude-lint-regex\": {\n\t\tdescription: `Don't add eslint-plugin-regex to enforce good practices around \n regular expressions.`,\n\t\tdocsSection: \"opt-out\",\n\t\ttype: \"boolean\",\n\t},\n\t\"exclude-lint-spelling\": {\n\t\tdescription: `Don't add cspell to spell check against dictionaries \n of known words.`,\n\t\tdocsSection: \"opt-out\",\n\t\ttype: \"boolean\",\n\t},\n\t\"exclude-lint-strict\": {\n\t\tdescription: `Don't augment the recommended logical lint rules with \n typescript-eslint's strict config.`,\n\t\tdocsSection: \"opt-out\",\n\t\ttype: \"boolean\",\n\t},\n\t\"exclude-lint-stylistic\": {\n\t\tdescription: `Don't add stylistic rules such as typescript-eslint's \n stylistic config.`,\n\t\tdocsSection: \"opt-out\",\n\t\ttype: \"boolean\",\n\t},\n\t\"exclude-lint-yml\": {\n\t\tdescription: `Don't apply linting and sorting to ${chalk.cyanBright(\n\t\t\t\"*.yaml\",\n\t\t)} and ${chalk.cyanBright(\"*.yml\")} files.`,\n\t\tdocsSection: \"opt-out\",\n\t\ttype: \"boolean\",\n\t},\n\t\"exclude-releases\": {\n\t\tdescription: `Don't add release-it to generate changelogs, package bumps, \n and publishes based on conventional commits.`,\n\t\tdocsSection: \"opt-out\",\n\t\ttype: \"boolean\",\n\t},\n\t\"exclude-renovate\": {\n\t\tdescription: `Don't add a Renovate config to dependencies up-to-date with \n PRs.`,\n\t\tdocsSection: \"opt-out\",\n\t\ttype: \"boolean\",\n\t},\n\t\"exclude-tests\": {\n\t\tdescription: `Don't add Vitest tooling for fast unit tests, configured \n with coverage tracking.`,\n\t\tdocsSection: \"opt-out\",\n\t\ttype: \"boolean\",\n\t},\n\tfunding: {\n\t\tdescription: `GitHub organization or username to mention in ${chalk.cyanBright(\n\t\t\t\"funding.yml\",\n\t\t)} \n (by default, owner)`,\n\t\tdocsSection: \"optional\",\n\t\ttype: \"string\",\n\t},\n\tguide: {\n\t\tdescription: `Link to a contribution guide to place at the top of the \n development docs`,\n\t\tdocsSection: \"optional\",\n\t\ttype: \"string\",\n\t},\n\t\"guide-title\": {\n\t\tdescription: `If ${chalk.cyanBright(\n\t\t\t\"--guide\",\n\t\t)} is provided or detected from an existing \n DEVELOPMENT.md, the text title to place in the guide link`,\n\t\tdocsSection: \"optional\",\n\t\ttype: \"string\",\n\t},\n\tkeywords: {\n\t\tdescription: `Any number of keywords to include in ${chalk.cyanBright(\n\t\t\t\"package.json\",\n\t\t)} (by default, \n none). This can be specified any number of times, like \n ${chalk.cyanBright('--keywords apple --keywords \"banana cherry\"')}`,\n\t\tdocsSection: \"optional\",\n\t\tmultiple: true,\n\t\ttype: \"string\",\n\t},\n\tlogo: {\n\t\tdescription: `Local image file in the repository to display near the top of \n the README.md as a logo`,\n\t\tdocsSection: \"optional\",\n\t\ttype: \"string\",\n\t},\n\t\"logo-alt\": {\n\t\tdescription: `If ${chalk.cyanBright(\n\t\t\t\"--logo\",\n\t\t)} is provided or detected from an existing README.md, \n alt text that describes the image will be prompted for if not provided`,\n\t\tdocsSection: \"optional\",\n\t\ttype: \"string\",\n\t},\n\tmode: {\n\t\tdescription: `Whether to:\n • create: a new repository in a child directory\n • initialize: a freshly repository in the current directory\n • migrate: an existing repository in the current directory`,\n\t\tdocsSection: \"core\",\n\t\ttype: \"string\",\n\t},\n\toffline: {\n\t\tdescription: `You can run ${chalk.cyanBright(\n\t\t\t\"create-typescript-app\",\n\t\t)} in an \"offline\" mode. \n Doing so will:\n • Enable ${chalk.cyanBright(\n\t\t\"--exclude-all-contributors-api\",\n\t)} and ${chalk.cyanBright(\"--skip-github-api\")}\n • Skip network calls when setting up contributors\n • Run pnpm commands with pnpm's ${chalk.cyanBright(\"--offline\")} mode`,\n\t\tdocsSection: \"offline\",\n\t\ttype: \"boolean\",\n\t},\n\towner: {\n\t\tdescription: `GitHub organization or user the repository is underneath \n (e.g. JoshuaKGoldberg)`,\n\t\tdocsSection: \"core\",\n\t\ttype: \"string\",\n\t},\n\t\"preserve-generated-from\": {\n\t\tdescription: `Whether to keep the GitHub repository generated from \n notice (by default, false)`,\n\t\tdocsSection: \"optional\",\n\t\ttype: \"boolean\",\n\t},\n\trepository: {\n\t\tdescription: `The kebab-case name of the repository \n (e.g. create-typescript-app)`,\n\t\tdocsSection: \"core\",\n\t\ttype: \"string\",\n\t},\n\t\"skip-all-contributors-api\": {\n\t\tdescription: `Skips network calls that fetch all-contributors data from\n GitHub. This flag does nothing if ${chalk.cyanBright(\n\t\t\"--exclude-all-contributors\",\n\t)} was specified.`,\n\t\tdocsSection: \"skip-net\",\n\t\ttype: \"boolean\",\n\t},\n\t\"skip-github-api\": {\n\t\tdescription: `Skips calling to GitHub APIs.`,\n\t\tdocsSection: \"skip-net\",\n\t\ttype: \"boolean\",\n\t},\n\t\"skip-install\": {\n\t\tdescription: `Skips installing all the new template packages with pnpm.`,\n\t\tdocsSection: \"skip-net\",\n\t\ttype: \"boolean\",\n\t},\n\t\"skip-removal\": {\n\t\tdescription: `Skips removing setup docs and scripts, including this ${chalk.cyanBright(\n\t\t\t\"docs/\",\n\t\t)} \n directory`,\n\t\tdocsSection: \"skip-disk\",\n\t\ttype: \"boolean\",\n\t},\n\t\"skip-restore\": {\n\t\tdescription: `Skips the prompt offering to restore the repository if an \n error occurs during setup`,\n\t\tdocsSection: \"skip-disk\",\n\t\ttype: \"boolean\",\n\t},\n\t\"skip-uninstall\": {\n\t\tdescription: `Skips uninstalling packages only used for setup scripts`,\n\t\tdocsSection: \"skip-disk\",\n\t\ttype: \"boolean\",\n\t},\n\ttitle: {\n\t\tdescription: `Title Case title for the repository to be used in \n documentation (e.g. Create TypeScript App)`,\n\t\tdocsSection: \"core\",\n\t\ttype: \"string\",\n\t},\n} as const;\n"],"mappings":"AAAA,OAAO,WAAW;AAEX,MAAM,gBAAgB;AAAA,EAC5B,QAAQ;AAAA,IACP,aAAa,IAAI,MAAM;AAAA,MACtB;AAAA,IACD,CAAC,YAAY,MAAM,WAAW,sBAAsB,CAAC;AAAA;AAAA,IAErD,aAAa;AAAA,IACb,MAAM;AAAA,EACP;AAAA,EACA,QAAQ;AAAA,IACP,aAAa;AAAA;AAAA,IAEX,MAAM,WAAW,qBAAqB,CAAC;AAAA,IACzC,aAAa;AAAA,IACb,MAAM;AAAA,EACP;AAAA,EACA,MAAM;AAAA,IACL,aAAa;AAAA,IACb,aAAa;AAAA,IACb,MAAM;AAAA,EACP;AAAA,EACA,MAAM;AAAA,IACL,aAAa;AAAA,qDACiC,MAAM,WAAW;AAAA,MAC/D;AAAA,IACD,CAAC;AAAA;AAAA;AAAA;AAAA,IAIA,aAAa;AAAA,IACb,MAAM;AAAA,EACP;AAAA,EACA,KAAK;AAAA,IACJ,aAAa;AAAA,IACb,aAAa;AAAA,IACb,MAAM;AAAA,EACP;AAAA,EACA,qBAAqB;AAAA,IACpB,aAAa;AAAA;AAAA,IAEb,aAAa;AAAA,IACb,MAAM;AAAA,EACP;AAAA,EACA,aAAa;AAAA,IACZ,aAAa;AAAA;AAAA;AAAA,IAGb,aAAa;AAAA,IACb,MAAM;AAAA,EACP;AAAA,EACA,WAAW;AAAA,IACV,aAAa;AAAA;AAAA,IAEb,aAAa;AAAA,IACb,MAAM;AAAA,EACP;AAAA,EACA,OAAO;AAAA,IACN,aAAa;AAAA;AAAA,IAEb,aAAa;AAAA,IACb,MAAM;AAAA,EACP;AAAA,EACA,gBAAgB;AAA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AgB;AAAA,IACf,aAAa;AAAA;AAAA,IAEb,aAAa;AAAA,IACb,MAAM;AAAA,EACP;AAAA,EACA,kBAAkB;AAAA,IACjB,aAAa;AAAA,IACb,aAAa;AAAA,IACb,MAAM;AAAA,EACP;AAAA,EACA,OAAO;AAAA,IACN,aAAa;AAAA;AAAA,IAEb,aAAa;AAAA,IACb,MAAM;AAAA,EACP;AACD;","names":[]}
|
|
1
|
+
{"version":3,"sources":["../../../src/shared/options/args.ts"],"sourcesContent":["import chalk from \"chalk\";\n\nexport const allArgOptions = {\n\taccess: {\n\t\tdescription: `(${chalk.cyanBright(\n\t\t\t'\"public\" | \"restricted\"',\n\t\t)}): Which ${chalk.cyanBright(\"npm publish --access\")} to \n release npm packages with (by default, \"public\")`,\n\t\tdocsSection: \"optional\",\n\t\ttype: \"string\",\n\t},\n\tauthor: {\n\t\tdescription: `Username on npm to publish packages under (by \n default, an existing npm author, or the currently logged in npm user, or \n ${chalk.cyanBright(\"owner.toLowerCase()\")})`,\n\t\tdocsSection: \"optional\",\n\t\ttype: \"string\",\n\t},\n\tauto: {\n\t\tdescription: `Whether to infer all options from files on disk.`,\n\t\tdocsSection: \"optional\",\n\t\ttype: \"boolean\",\n\t},\n\tbase: {\n\t\tdescription: `Whether to scaffold the repository with:\n • everything: that comes with the template (${chalk.cyanBright.bold(\n\t\t\"recommended\",\n\t)})\n • common: additions to the minimal starters such as releases and tests\n • minimal: amounts of tooling, essentially opting out of everything\n • prompt: for which portions to exclude`,\n\t\tdocsSection: \"core\",\n\t\ttype: \"string\",\n\t},\n\tbin: {\n\t\tdescription: `package.json bin value to include for npx-style running.`,\n\t\tdocsSection: \"optional\",\n\t\ttype: \"string\",\n\t},\n\t\"create-repository\": {\n\t\tdescription: `Whether to create a corresponding repository on github.com \n (if it doesn't yet exist)`,\n\t\tdocsSection: \"core\",\n\t\ttype: \"boolean\",\n\t},\n\tdescription: {\n\t\tdescription: `Sentence case description of the repository \n (e.g. A quickstart-friendly TypeScript package with lots of great \n repository tooling. ✨)`,\n\t\tdocsSection: \"core\",\n\t\ttype: \"string\",\n\t},\n\tdirectory: {\n\t\tdescription: `Directory to create the repository in (by default, the same \n name as the repository)`,\n\t\tdocsSection: \"optional\",\n\t\ttype: \"string\",\n\t},\n\temail: {\n\t\tdescription: `Email address to be listed as the point of contact in docs \n and packages (e.g. example@joshuakgoldberg.com)`,\n\t\tdocsSection: \"optional\",\n\t\ttype: \"string\",\n\t},\n\t\"email-github\": {\n\t\tdescription: `Optionally, may be provided to use different emails in ${chalk.cyanBright(\n\t\t\t\".md\",\n\t\t)} \n files`,\n\t\tdocsSection: \"optional\",\n\t\ttype: \"string\",\n\t},\n\t\"email-npm\": {\n\t\tdescription: `Optionally, may be provided to use different emails in \n ${chalk.cyanBright(\"package.json\")}`,\n\t\tdocsSection: \"optional\",\n\t\ttype: \"string\",\n\t},\n\t\"exclude-all-contributors\": {\n\t\tdescription: `Don't add all-contributors to track contributions \n and display them in a README.md table.`,\n\t\tdocsSection: \"opt-out\",\n\t\ttype: \"boolean\",\n\t},\n\t\"exclude-compliance\": {\n\t\tdescription: `Don't add a GitHub Actions workflow to verify that PRs match \n an expected format.`,\n\t\tdocsSection: \"opt-out\",\n\t\ttype: \"boolean\",\n\t},\n\t\"exclude-lint-jsdoc\": {\n\t\tdescription: `Don't use eslint-plugin-jsdoc to enforce good practices around \n JSDoc comments.`,\n\t\tdocsSection: \"opt-out\",\n\t\ttype: \"boolean\",\n\t},\n\t\"exclude-lint-json\": {\n\t\tdescription: `Don't apply linting and sorting to ${chalk.cyanBright(\n\t\t\t\"*.json\",\n\t\t)}, and \n ${chalk.cyanBright(\"*.jsonc\")} files.`,\n\t\tdocsSection: \"opt-out\",\n\t\ttype: \"boolean\",\n\t},\n\t\"exclude-lint-knip\": {\n\t\tdescription: `Don't add Knip to detect unused files, dependencies, and code \n exports.`,\n\t\tdocsSection: \"opt-out\",\n\t\ttype: \"boolean\",\n\t},\n\t\"exclude-lint-md\": {\n\t\tdescription: `Don't apply linting to ${chalk.cyanBright(\"*.md\")} files.`,\n\t\tdocsSection: \"opt-out\",\n\t\ttype: \"boolean\",\n\t},\n\t\"exclude-lint-package-json\": {\n\t\tdescription: `Don't add eslint-plugin-package-json to lint for \n package.json correctness.`,\n\t\tdocsSection: \"opt-out\",\n\t\ttype: \"boolean\",\n\t},\n\t\"exclude-lint-packages\": {\n\t\tdescription: `Don't add a pnpm dedupe workflow to ensure packages \n aren't duplicated unnecessarily.`,\n\t\tdocsSection: \"opt-out\",\n\t\ttype: \"boolean\",\n\t},\n\t\"exclude-lint-perfectionist\": {\n\t\tdescription: `Don't apply eslint-plugin-perfectionist to ensure \n imports, keys, and so on are in sorted order.`,\n\t\tdocsSection: \"opt-out\",\n\t\ttype: \"boolean\",\n\t},\n\t\"exclude-lint-regex\": {\n\t\tdescription: `Don't add eslint-plugin-regex to enforce good practices around \n regular expressions.`,\n\t\tdocsSection: \"opt-out\",\n\t\ttype: \"boolean\",\n\t},\n\t\"exclude-lint-spelling\": {\n\t\tdescription: `Don't add cspell to spell check against dictionaries \n of known words.`,\n\t\tdocsSection: \"opt-out\",\n\t\ttype: \"boolean\",\n\t},\n\t\"exclude-lint-strict\": {\n\t\tdescription: `Don't augment the recommended logical lint rules with \n typescript-eslint's strict config.`,\n\t\tdocsSection: \"opt-out\",\n\t\ttype: \"boolean\",\n\t},\n\t\"exclude-lint-stylistic\": {\n\t\tdescription: `Don't add stylistic rules such as typescript-eslint's \n stylistic config.`,\n\t\tdocsSection: \"opt-out\",\n\t\ttype: \"boolean\",\n\t},\n\t\"exclude-lint-yml\": {\n\t\tdescription: `Don't apply linting and sorting to ${chalk.cyanBright(\n\t\t\t\"*.yaml\",\n\t\t)} and ${chalk.cyanBright(\"*.yml\")} files.`,\n\t\tdocsSection: \"opt-out\",\n\t\ttype: \"boolean\",\n\t},\n\t\"exclude-releases\": {\n\t\tdescription: `Don't add release-it to generate changelogs, package bumps, \n and publishes based on conventional commits.`,\n\t\tdocsSection: \"opt-out\",\n\t\ttype: \"boolean\",\n\t},\n\t\"exclude-renovate\": {\n\t\tdescription: `Don't add a Renovate config to dependencies up-to-date with \n PRs.`,\n\t\tdocsSection: \"opt-out\",\n\t\ttype: \"boolean\",\n\t},\n\t\"exclude-templated-by\": {\n\t\tdescription: `Don't add a _\"This package was templated with create-typescript-app\"_ notice at the end of the README.md.`,\n\t\tdocsSection: \"opt-out\",\n\t\ttype: \"boolean\",\n\t},\n\t\"exclude-tests\": {\n\t\tdescription: `Don't add Vitest tooling for fast unit tests, configured \n with coverage tracking.`,\n\t\tdocsSection: \"opt-out\",\n\t\ttype: \"boolean\",\n\t},\n\tfunding: {\n\t\tdescription: `GitHub organization or username to mention in ${chalk.cyanBright(\n\t\t\t\"funding.yml\",\n\t\t)} \n (by default, owner)`,\n\t\tdocsSection: \"optional\",\n\t\ttype: \"string\",\n\t},\n\tguide: {\n\t\tdescription: `Link to a contribution guide to place at the top of the \n development docs`,\n\t\tdocsSection: \"optional\",\n\t\ttype: \"string\",\n\t},\n\t\"guide-title\": {\n\t\tdescription: `If ${chalk.cyanBright(\n\t\t\t\"--guide\",\n\t\t)} is provided or detected from an existing \n DEVELOPMENT.md, the text title to place in the guide link`,\n\t\tdocsSection: \"optional\",\n\t\ttype: \"string\",\n\t},\n\tkeywords: {\n\t\tdescription: `Any number of keywords to include in ${chalk.cyanBright(\n\t\t\t\"package.json\",\n\t\t)} (by default, \n none). This can be specified any number of times, like \n ${chalk.cyanBright('--keywords apple --keywords \"banana cherry\"')}`,\n\t\tdocsSection: \"optional\",\n\t\tmultiple: true,\n\t\ttype: \"string\",\n\t},\n\tlogo: {\n\t\tdescription: `Local image file in the repository to display near the top of \n the README.md as a logo`,\n\t\tdocsSection: \"optional\",\n\t\ttype: \"string\",\n\t},\n\t\"logo-alt\": {\n\t\tdescription: `If ${chalk.cyanBright(\n\t\t\t\"--logo\",\n\t\t)} is provided or detected from an existing README.md, \n alt text that describes the image will be prompted for if not provided`,\n\t\tdocsSection: \"optional\",\n\t\ttype: \"string\",\n\t},\n\tmode: {\n\t\tdescription: `Whether to:\n • create: a new repository in a child directory\n • initialize: a freshly repository in the current directory\n • migrate: an existing repository in the current directory`,\n\t\tdocsSection: \"core\",\n\t\ttype: \"string\",\n\t},\n\toffline: {\n\t\tdescription: `You can run ${chalk.cyanBright(\n\t\t\t\"create-typescript-app\",\n\t\t)} in an \"offline\" mode. \n Doing so will:\n • Enable ${chalk.cyanBright(\n\t\t\"--exclude-all-contributors-api\",\n\t)} and ${chalk.cyanBright(\"--skip-github-api\")}\n • Skip network calls when setting up contributors\n • Run pnpm commands with pnpm's ${chalk.cyanBright(\"--offline\")} mode`,\n\t\tdocsSection: \"offline\",\n\t\ttype: \"boolean\",\n\t},\n\towner: {\n\t\tdescription: `GitHub organization or user the repository is underneath \n (e.g. JoshuaKGoldberg)`,\n\t\tdocsSection: \"core\",\n\t\ttype: \"string\",\n\t},\n\t\"preserve-generated-from\": {\n\t\tdescription: `Whether to keep the GitHub repository generated from \n notice (by default, false)`,\n\t\tdocsSection: \"optional\",\n\t\ttype: \"boolean\",\n\t},\n\trepository: {\n\t\tdescription: `The kebab-case name of the repository \n (e.g. create-typescript-app)`,\n\t\tdocsSection: \"core\",\n\t\ttype: \"string\",\n\t},\n\t\"skip-all-contributors-api\": {\n\t\tdescription: `Skips network calls that fetch all-contributors data from\n GitHub. This flag does nothing if ${chalk.cyanBright(\n\t\t\"--exclude-all-contributors\",\n\t)} was specified.`,\n\t\tdocsSection: \"skip-net\",\n\t\ttype: \"boolean\",\n\t},\n\t\"skip-github-api\": {\n\t\tdescription: `Skips calling to GitHub APIs.`,\n\t\tdocsSection: \"skip-net\",\n\t\ttype: \"boolean\",\n\t},\n\t\"skip-install\": {\n\t\tdescription: `Skips installing all the new template packages with pnpm.`,\n\t\tdocsSection: \"skip-net\",\n\t\ttype: \"boolean\",\n\t},\n\t\"skip-removal\": {\n\t\tdescription: `Skips removing setup docs and scripts, including this ${chalk.cyanBright(\n\t\t\t\"docs/\",\n\t\t)} \n directory`,\n\t\tdocsSection: \"skip-disk\",\n\t\ttype: \"boolean\",\n\t},\n\t\"skip-restore\": {\n\t\tdescription: `Skips the prompt offering to restore the repository if an \n error occurs during setup`,\n\t\tdocsSection: \"skip-disk\",\n\t\ttype: \"boolean\",\n\t},\n\t\"skip-uninstall\": {\n\t\tdescription: `Skips uninstalling packages only used for setup scripts`,\n\t\tdocsSection: \"skip-disk\",\n\t\ttype: \"boolean\",\n\t},\n\ttitle: {\n\t\tdescription: `Title Case title for the repository to be used in \n documentation (e.g. Create TypeScript App)`,\n\t\tdocsSection: \"core\",\n\t\ttype: \"string\",\n\t},\n} as const;\n"],"mappings":"AAAA,OAAO,WAAW;AAEX,MAAM,gBAAgB;AAAA,EAC5B,QAAQ;AAAA,IACP,aAAa,IAAI,MAAM;AAAA,MACtB;AAAA,IACD,CAAC,YAAY,MAAM,WAAW,sBAAsB,CAAC;AAAA;AAAA,IAErD,aAAa;AAAA,IACb,MAAM;AAAA,EACP;AAAA,EACA,QAAQ;AAAA,IACP,aAAa;AAAA;AAAA,IAEX,MAAM,WAAW,qBAAqB,CAAC;AAAA,IACzC,aAAa;AAAA,IACb,MAAM;AAAA,EACP;AAAA,EACA,MAAM;AAAA,IACL,aAAa;AAAA,IACb,aAAa;AAAA,IACb,MAAM;AAAA,EACP;AAAA,EACA,MAAM;AAAA,IACL,aAAa;AAAA,qDACiC,MAAM,WAAW;AAAA,MAC/D;AAAA,IACD,CAAC;AAAA;AAAA;AAAA;AAAA,IAIA,aAAa;AAAA,IACb,MAAM;AAAA,EACP;AAAA,EACA,KAAK;AAAA,IACJ,aAAa;AAAA,IACb,aAAa;AAAA,IACb,MAAM;AAAA,EACP;AAAA,EACA,qBAAqB;AAAA,IACpB,aAAa;AAAA;AAAA,IAEb,aAAa;AAAA,IACb,MAAM;AAAA,EACP;AAAA,EACA,aAAa;AAAA,IACZ,aAAa;AAAA;AAAA;AAAA,IAGb,aAAa;AAAA,IACb,MA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;AAAA,IAClB,aAAa;AAAA,IACb,aAAa;AAAA,IACb,MAAM;AAAA,EACP;AAAA,EACA,gBAAgB;AAAA,IACf,aAAa;AAAA,IACb,aAAa;AAAA,IACb,MAAM;AAAA,EACP;AAAA,EACA,gBAAgB;AAAA,IACf,aAAa,yDAAyD,MAAM;AAAA,MAC3E;AAAA,IACD,CAAC;AAAA;AAAA,IAED,aAAa;AAAA,IACb,MAAM;AAAA,EACP;AAAA,EACA,gBAAgB;AAAA,IACf,aAAa;AAAA;AAAA,IAEb,aAAa;AAAA,IACb,MAAM;AAAA,EACP;AAAA,EACA,kBAAkB;AAAA,IACjB,aAAa;AAAA,IACb,aAAa;AAAA,IACb,MAAM;AAAA,EACP;AAAA,EACA,OAAO;AAAA,IACN,aAAa;AAAA;AAAA,IAEb,aAAa;AAAA,IACb,MAAM;AAAA,EACP;AACD;","names":[]}
|
|
@@ -47,8 +47,6 @@ async function augmentOptionsWithExcludes(options) {
|
|
|
47
47
|
})
|
|
48
48
|
);
|
|
49
49
|
switch (base) {
|
|
50
|
-
case void 0:
|
|
51
|
-
return void 0;
|
|
52
50
|
case "common":
|
|
53
51
|
case "everything":
|
|
54
52
|
case "minimal":
|
|
@@ -83,6 +81,8 @@ async function augmentOptionsWithExcludes(options) {
|
|
|
83
81
|
)
|
|
84
82
|
};
|
|
85
83
|
}
|
|
84
|
+
case void 0:
|
|
85
|
+
return void 0;
|
|
86
86
|
}
|
|
87
87
|
}
|
|
88
88
|
function makeLabel(label, message) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/shared/options/augmentOptionsWithExcludes.ts"],"sourcesContent":["import * as prompts from \"@clack/prompts\";\nimport chalk from \"chalk\";\n\nimport { filterPromptCancel } from \"../prompts.js\";\nimport { Options, OptionsBase } from \"../types.js\";\nimport {\n\texclusionDescriptions,\n\tExclusionKey,\n\texclusionKeys,\n\tgetExclusions,\n} from \"./exclusionKeys.js\";\n\nexport async function augmentOptionsWithExcludes(\n\toptions: Options,\n): Promise<Options | undefined> {\n\tif (\n\t\tObject.keys(options).some(\n\t\t\t(key) =>\n\t\t\t\tkey in exclusionDescriptions &&\n\t\t\t\toptions[key as keyof typeof options] !== undefined,\n\t\t)\n\t) {\n\t\treturn options;\n\t}\n\n\tconst base =\n\t\toptions.base ??\n\t\tfilterPromptCancel<OptionsBase | symbol>(\n\t\t\tawait prompts.select({\n\t\t\t\tinitialValue: \"common\" as OptionsBase,\n\t\t\t\tmessage: `How much tooling would you like the template to set up for you?`,\n\t\t\t\toptions: [\n\t\t\t\t\t{\n\t\t\t\t\t\tlabel: makeLabel(\n\t\t\t\t\t\t\t\"everything\",\n\t\t\t\t\t\t\t\"The most comprehensive tooling imaginable: sorting, spellchecking, and more!\",\n\t\t\t\t\t\t),\n\t\t\t\t\t\tvalue: \"everything\",\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\thint: \"recommended\",\n\t\t\t\t\t\tlabel: makeLabel(\n\t\t\t\t\t\t\t\"common\",\n\t\t\t\t\t\t\t\"Bare starters plus testing and automation for all-contributors and releases.\",\n\t\t\t\t\t\t),\n\t\t\t\t\t\tvalue: \"common\",\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tlabel: makeLabel(\n\t\t\t\t\t\t\t\"minimal\",\n\t\t\t\t\t\t\t\"Just bare starter tooling: building, formatting, linting, and type checking.\",\n\t\t\t\t\t\t),\n\t\t\t\t\t\tvalue: \"minimal\",\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tlabel: makeLabel(\"prompt\", \"(allow me to customize)\"),\n\t\t\t\t\t\tvalue: \"prompt\",\n\t\t\t\t\t},\n\t\t\t\t],\n\t\t\t}),\n\t\t);\n\n\tswitch (base) {\n\t\tcase
|
|
1
|
+
{"version":3,"sources":["../../../src/shared/options/augmentOptionsWithExcludes.ts"],"sourcesContent":["import * as prompts from \"@clack/prompts\";\nimport chalk from \"chalk\";\n\nimport { filterPromptCancel } from \"../prompts.js\";\nimport { Options, OptionsBase } from \"../types.js\";\nimport {\n\texclusionDescriptions,\n\tExclusionKey,\n\texclusionKeys,\n\tgetExclusions,\n} from \"./exclusionKeys.js\";\n\nexport async function augmentOptionsWithExcludes(\n\toptions: Options,\n): Promise<Options | undefined> {\n\tif (\n\t\tObject.keys(options).some(\n\t\t\t(key) =>\n\t\t\t\tkey in exclusionDescriptions &&\n\t\t\t\toptions[key as keyof typeof options] !== undefined,\n\t\t)\n\t) {\n\t\treturn options;\n\t}\n\n\tconst base =\n\t\toptions.base ??\n\t\tfilterPromptCancel<OptionsBase | symbol>(\n\t\t\tawait prompts.select({\n\t\t\t\tinitialValue: \"common\" as OptionsBase,\n\t\t\t\tmessage: `How much tooling would you like the template to set up for you?`,\n\t\t\t\toptions: [\n\t\t\t\t\t{\n\t\t\t\t\t\tlabel: makeLabel(\n\t\t\t\t\t\t\t\"everything\",\n\t\t\t\t\t\t\t\"The most comprehensive tooling imaginable: sorting, spellchecking, and more!\",\n\t\t\t\t\t\t),\n\t\t\t\t\t\tvalue: \"everything\",\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\thint: \"recommended\",\n\t\t\t\t\t\tlabel: makeLabel(\n\t\t\t\t\t\t\t\"common\",\n\t\t\t\t\t\t\t\"Bare starters plus testing and automation for all-contributors and releases.\",\n\t\t\t\t\t\t),\n\t\t\t\t\t\tvalue: \"common\",\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tlabel: makeLabel(\n\t\t\t\t\t\t\t\"minimal\",\n\t\t\t\t\t\t\t\"Just bare starter tooling: building, formatting, linting, and type checking.\",\n\t\t\t\t\t\t),\n\t\t\t\t\t\tvalue: \"minimal\",\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tlabel: makeLabel(\"prompt\", \"(allow me to customize)\"),\n\t\t\t\t\t\tvalue: \"prompt\",\n\t\t\t\t\t},\n\t\t\t\t],\n\t\t\t}),\n\t\t);\n\n\tswitch (base) {\n\t\tcase \"common\":\n\t\tcase \"everything\":\n\t\tcase \"minimal\":\n\t\t\treturn {\n\t\t\t\t...options,\n\t\t\t\tbase,\n\t\t\t\t...getExclusions(options, base),\n\t\t\t};\n\t\tcase \"prompt\": {\n\t\t\tconst exclusionsNotEnabled = new Set(\n\t\t\t\tfilterPromptCancel(\n\t\t\t\t\tawait prompts.multiselect({\n\t\t\t\t\t\tinitialValues: exclusionKeys,\n\t\t\t\t\t\tmessage:\n\t\t\t\t\t\t\t\"Select the tooling portions you'd like to remove. All are enabled by default. Press ↑ or ↓ to change the selected item, then space to select.\",\n\t\t\t\t\t\toptions: Object.entries(exclusionDescriptions).map(\n\t\t\t\t\t\t\t([value, { hint, label }]) => ({\n\t\t\t\t\t\t\t\thint,\n\t\t\t\t\t\t\t\tlabel,\n\t\t\t\t\t\t\t\tvalue: value as ExclusionKey,\n\t\t\t\t\t\t\t}),\n\t\t\t\t\t\t),\n\t\t\t\t\t}),\n\t\t\t\t),\n\t\t\t);\n\n\t\t\treturn {\n\t\t\t\t...options,\n\t\t\t\tbase,\n\t\t\t\t...Object.fromEntries(\n\t\t\t\t\texclusionKeys.map(\n\t\t\t\t\t\t(exclusionKey) =>\n\t\t\t\t\t\t\t[exclusionKey, !exclusionsNotEnabled.has(exclusionKey)] as const,\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t};\n\t\t}\n\t\tcase undefined:\n\t\t\treturn undefined;\n\t}\n}\n\nfunction makeLabel(label: string, message: string) {\n\treturn [chalk.bold(label), message].join(\"\\t \");\n}\n"],"mappings":"AAAA,YAAY,aAAa;AACzB,OAAO,WAAW;AAElB,SAAS,0BAA0B;AAEnC;AAAA,EACC;AAAA,EAEA;AAAA,EACA;AAAA,OACM;AAEP,eAAsB,2BACrB,SAC+B;AAC/B,MACC,OAAO,KAAK,OAAO,EAAE;AAAA,IACpB,CAAC,QACA,OAAO,yBACP,QAAQ,GAA2B,MAAM;AAAA,EAC3C,GACC;AACD,WA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EACT;AACD;AAEA,SAAS,UAAU,OAAe,SAAiB;AAClD,SAAO,CAAC,MAAM,KAAK,KAAK,GAAG,OAAO,EAAE,KAAK,IAAK;AAC/C;","names":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/shared/options/ensureRepositoryExists.ts"],"sourcesContent":["import * as prompts from \"@clack/prompts\";\n\nimport { doesRepositoryExist } from \"../doesRepositoryExist.js\";\nimport { filterPromptCancel } from \"../prompts.js\";\nimport { Options } from \"../types.js\";\nimport { createRepositoryWithApi } from \"./createRepositoryWithApi.js\";\nimport { GitHub } from \"./getGitHub.js\";\n\nexport type EnsureRepositoryExistsOptions = Pick<\n\tOptions,\n\t\"mode\" | \"owner\" | \"preserveGeneratedFrom\" | \"repository\"\n>;\n\nexport interface RepositoryExistsResult {\n\tgithub: GitHub | undefined;\n\trepository: string;\n}\n\nexport async function ensureRepositoryExists(\n\tgithub: GitHub | undefined,\n\toptions: EnsureRepositoryExistsOptions,\n): Promise<Partial<RepositoryExistsResult>> {\n\t// We'll only respect input options once before prompting for them\n\tlet { repository } = options;\n\tlet createRepository = options.mode === \"create\";\n\n\t// We'll continuously pester the user for a repository\n\t// until they bail, create a new one, or it exists.\n\twhile (github) {\n\t\tif (await doesRepositoryExist(github.octokit, options)) {\n\t\t\treturn { github, repository };\n\t\t}\n\n\t\tconst selection = createRepository\n\t\t\t? \"create\"\n\t\t\t: filterPromptCancel(\n\t\t\t\t\t(await prompts.select({\n\t\t\t\t\t\tmessage: `Repository ${options.repository} doesn't seem to exist under ${options.owner}. What would you like to do?`,\n\t\t\t\t\t\toptions: [\n\t\t\t\t\t\t\t{ label: \"Create a new repository\", value: \"create\" },\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tlabel: \"Switch to a different repository name\",\n\t\t\t\t\t\t\t\tvalue: \"different\",\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tlabel: \"Keep changes local\",\n\t\t\t\t\t\t\t\tvalue: \"local\",\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t{ label: \"Bail out and maybe try again later\", value: \"bail\" },\n\t\t\t\t\t\t],\n\t\t\t\t\t})) as \"bail\" | \"create\" | \"different\" | \"local\",\n\t\t\t\t);\n\n\t\tcreateRepository = false;\n\n\t\tswitch (selection) {\n\t\t\tcase
|
|
1
|
+
{"version":3,"sources":["../../../src/shared/options/ensureRepositoryExists.ts"],"sourcesContent":["import * as prompts from \"@clack/prompts\";\n\nimport { doesRepositoryExist } from \"../doesRepositoryExist.js\";\nimport { filterPromptCancel } from \"../prompts.js\";\nimport { Options } from \"../types.js\";\nimport { createRepositoryWithApi } from \"./createRepositoryWithApi.js\";\nimport { GitHub } from \"./getGitHub.js\";\n\nexport type EnsureRepositoryExistsOptions = Pick<\n\tOptions,\n\t\"mode\" | \"owner\" | \"preserveGeneratedFrom\" | \"repository\"\n>;\n\nexport interface RepositoryExistsResult {\n\tgithub: GitHub | undefined;\n\trepository: string;\n}\n\nexport async function ensureRepositoryExists(\n\tgithub: GitHub | undefined,\n\toptions: EnsureRepositoryExistsOptions,\n): Promise<Partial<RepositoryExistsResult>> {\n\t// We'll only respect input options once before prompting for them\n\tlet { repository } = options;\n\tlet createRepository = options.mode === \"create\";\n\n\t// We'll continuously pester the user for a repository\n\t// until they bail, create a new one, or it exists.\n\twhile (github) {\n\t\tif (await doesRepositoryExist(github.octokit, options)) {\n\t\t\treturn { github, repository };\n\t\t}\n\n\t\tconst selection = createRepository\n\t\t\t? \"create\"\n\t\t\t: filterPromptCancel(\n\t\t\t\t\t(await prompts.select({\n\t\t\t\t\t\tmessage: `Repository ${options.repository} doesn't seem to exist under ${options.owner}. What would you like to do?`,\n\t\t\t\t\t\toptions: [\n\t\t\t\t\t\t\t{ label: \"Create a new repository\", value: \"create\" },\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tlabel: \"Switch to a different repository name\",\n\t\t\t\t\t\t\t\tvalue: \"different\",\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tlabel: \"Keep changes local\",\n\t\t\t\t\t\t\t\tvalue: \"local\",\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t{ label: \"Bail out and maybe try again later\", value: \"bail\" },\n\t\t\t\t\t\t],\n\t\t\t\t\t})) as \"bail\" | \"create\" | \"different\" | \"local\",\n\t\t\t\t);\n\n\t\tcreateRepository = false;\n\n\t\tswitch (selection) {\n\t\t\tcase \"bail\":\n\t\t\tcase undefined:\n\t\t\t\treturn {};\n\n\t\t\tcase \"create\":\n\t\t\t\tawait createRepositoryWithApi(github.octokit, {\n\t\t\t\t\towner: options.owner,\n\t\t\t\t\tpreserveGeneratedFrom: options.preserveGeneratedFrom,\n\t\t\t\t\trepository,\n\t\t\t\t});\n\t\t\t\treturn { github, repository };\n\n\t\t\tcase \"different\": {\n\t\t\t\tconst newRepository = filterPromptCancel(\n\t\t\t\t\tawait prompts.text({\n\t\t\t\t\t\tmessage: `What would you like to call the repository?`,\n\t\t\t\t\t}),\n\t\t\t\t);\n\n\t\t\t\tif (!newRepository) {\n\t\t\t\t\treturn {};\n\t\t\t\t}\n\n\t\t\t\trepository = newRepository;\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tcase \"local\":\n\t\t\t\tgithub = undefined;\n\t\t\t\tbreak;\n\t\t}\n\t}\n\n\treturn { github, repository };\n}\n"],"mappings":"AAAA,YAAY,aAAa;AAEzB,SAAS,2BAA2B;AACpC,SAAS,0BAA0B;AAEnC,SAAS,+BAA+B;AAaxC,eAAsB,uBACrB,QACA,SAC2C;AAE3C,MAAI,EAAE,WAAW,IAAI;AACrB,MAAI,mBAAmB,QAAQ,SAAS;AAIxC,SAAO,QAAQ;AACd,QAAI,MAAM,oBAAoB,OAAO,SAAS,OAAO,GAAG;AACvD,aAAO,EAAE,QAAQ,WAAW;AAAA,IAC7B;AAEA,UAAM,YAAY,mBACf,WACA;AAAA,MACC,MAAM,QAAQ,OAAO;AAAA,QACrB,SAAS,cAAc,QAAQ,UAAU,gCAAgC,QAAQ,KAAK;AAAA,QACtF,SAAS;AAAA,UACR,EAAE,OAAO,2BAA2B,OAAO,SAAS;AAAA,UACpD;AAAA,YACC,OAAO;AAAA,YACP,OAAO;AAAA,UACR;AAAA,UACA;AAAA,YACC,OAAO;AAAA,YACP,OAAO;AAAA,UACR;AAAA,UACA,EAAE,OAAO,sCAAsC,OAAO,OAAO;AAAA,QAC9D;AAAA,MACD,CAAC;AAAA,IACF;AAEF,uBAAmB;AAEnB,YAAQ,WAAW;AAAA,MAClB,KAAK;AAAA,MACL,KAAK;AACJ,eAAO,CAAC;AAAA,MAET,KAAK;AACJ,cAAM,wBAAwB,OAAO,SAAS;AAAA,UAC7C,OAAO,QAAQ;AAAA,UACf,uBAAuB,QAAQ;AAAA,UAC/B;AAAA,QACD,CAAC;AACD,eAAO,EAAE,QAAQ,WAAW;AAAA,MAE7B,KAAK,aAAa;AACjB,cAAM,gBAAgB;AAAA,UACrB,MAAM,QAAQ,KAAK;AAAA,YAClB,SAAS;AAAA,UACV,CAAC;AAAA,QACF;AAEA,YAAI,CAAC,eAAe;AACnB,iBAAO,CAAC;AAAA,QACT;AAEA,qBAAa;AACb;AAAA,MACD;AAAA,MAEA,KAAK;AACJ,iBAAS;AACT;AAAA,IACF;AAAA,EACD;AAEA,SAAO,EAAE,QAAQ,WAAW;AAC7B;","names":[]}
|
|
@@ -2,12 +2,12 @@ import { Options, OptionsBase } from '../types.js';
|
|
|
2
2
|
import 'zod';
|
|
3
3
|
import '../codes.js';
|
|
4
4
|
|
|
5
|
-
type ExclusionKey = `exclude${string}` & keyof Options;
|
|
6
5
|
interface ExclusionDescription {
|
|
7
6
|
hint: string;
|
|
8
7
|
label: string;
|
|
9
8
|
level?: "common" | "minimal";
|
|
10
9
|
}
|
|
10
|
+
type ExclusionKey = `exclude${string}` & keyof Options;
|
|
11
11
|
declare const exclusionDescriptions: Record<ExclusionKey, ExclusionDescription>;
|
|
12
12
|
declare const exclusionKeys: ExclusionKey[];
|
|
13
13
|
declare function getExclusions(options: Partial<Options>, base?: OptionsBase): Partial<Options>;
|
|
@@ -85,6 +85,11 @@ const exclusionDescriptions = {
|
|
|
85
85
|
hint: "--exclude-renovate",
|
|
86
86
|
label: "Add a Renovate config to keep dependencies up-to-date with PRs."
|
|
87
87
|
},
|
|
88
|
+
excludeTemplatedBy: {
|
|
89
|
+
hint: "--exclude-templated-by",
|
|
90
|
+
label: 'Add a _"This package was templated with create-typescript-app"_ notice at the end of the README.md.',
|
|
91
|
+
level: "minimal"
|
|
92
|
+
},
|
|
88
93
|
excludeTests: {
|
|
89
94
|
hint: "--exclude-tests",
|
|
90
95
|
label: "Add Vitest tooling for fast unit tests, configured with coverage tracking."
|
|
@@ -111,6 +116,7 @@ function getExclusions(options, base) {
|
|
|
111
116
|
).map((exclusion) => [exclusion, options[exclusion] ?? true])
|
|
112
117
|
)
|
|
113
118
|
};
|
|
119
|
+
// We only really care about exclusions on the common and minimal bases
|
|
114
120
|
default:
|
|
115
121
|
return {};
|
|
116
122
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/shared/options/exclusionKeys.ts"],"sourcesContent":["import { Options, OptionsBase } from \"../types.js\";\n\nexport
|
|
1
|
+
{"version":3,"sources":["../../../src/shared/options/exclusionKeys.ts"],"sourcesContent":["import { Options, OptionsBase } from \"../types.js\";\n\nexport interface ExclusionDescription {\n\thint: string;\n\tlabel: string;\n\tlevel?: \"common\" | \"minimal\";\n}\n\nexport type ExclusionKey = `exclude${string}` & keyof Options;\n\nexport const exclusionDescriptions: Record<ExclusionKey, ExclusionDescription> =\n\t{\n\t\texcludeAllContributors: {\n\t\t\thint: \"--exclude-all-contributors\",\n\t\t\tlabel:\n\t\t\t\t\"Add all-contributors to track contributions and display them in a README.md table.\",\n\t\t},\n\t\texcludeBuild: {\n\t\t\thint: \"--exclude-build\",\n\t\t\tlabel: \"Add a tsup build step to generate built output files.\",\n\t\t\tlevel: \"minimal\",\n\t\t},\n\t\texcludeCompliance: {\n\t\t\thint: \"--exclude-compliance\",\n\t\t\tlabel:\n\t\t\t\t\"Add a GitHub Actions workflow to verify that PRs match an expected format.\",\n\t\t\tlevel: \"common\",\n\t\t},\n\t\texcludeLintESLint: {\n\t\t\thint: \"--exclude-lint-eslint\",\n\t\t\tlabel:\n\t\t\t\t\"Include eslint-plugin-eslint-comment to enforce good practices around ESLint comment directives.\",\n\t\t\tlevel: \"common\",\n\t\t},\n\t\texcludeLintJSDoc: {\n\t\t\thint: \"--exclude-lint-jsdoc\",\n\t\t\tlabel:\n\t\t\t\t\"Include eslint-plugin-jsdoc to enforce good practices around JSDoc comments.\",\n\t\t\tlevel: \"common\",\n\t\t},\n\t\texcludeLintJson: {\n\t\t\thint: \"--exclude-lint-json\",\n\t\t\tlabel: \"Apply linting and sorting to *.json and *.jsonc files.\",\n\t\t\tlevel: \"common\",\n\t\t},\n\t\texcludeLintKnip: {\n\t\t\thint: \"--exclude-lint-knip\",\n\t\t\tlabel: \"Add Knip to detect unused files, dependencies, and code exports.\",\n\t\t},\n\t\texcludeLintMd: {\n\t\t\thint: \"--exclude-lint-md\",\n\t\t\tlabel: \"Apply linting to *.md files.\",\n\t\t\tlevel: \"common\",\n\t\t},\n\t\texcludeLintPackageJson: {\n\t\t\thint: \"--exclude-lint-package-json\",\n\t\t\tlabel:\n\t\t\t\t\"Add eslint-plugin-package-json to lint for package.json correctness.\",\n\t\t\tlevel: \"common\",\n\t\t},\n\t\texcludeLintPackages: {\n\t\t\thint: \"--exclude-lint-packages\",\n\t\t\tlabel:\n\t\t\t\t\"Add a pnpm dedupe workflow to ensure packages aren't duplicated unnecessarily.\",\n\t\t\tlevel: \"common\",\n\t\t},\n\t\texcludeLintPerfectionist: {\n\t\t\thint: \"--exclude-lint-perfectionist\",\n\t\t\tlabel:\n\t\t\t\t\"Apply eslint-plugin-perfectionist to ensure imports, keys, and so on are in sorted order.\",\n\t\t\tlevel: \"common\",\n\t\t},\n\t\texcludeLintRegex: {\n\t\t\thint: \"--exclude-lint-regex\",\n\t\t\tlabel:\n\t\t\t\t\"Include eslint-plugin-regex to enforce good practices around regular expressions.\",\n\t\t\tlevel: \"common\",\n\t\t},\n\t\texcludeLintSpelling: {\n\t\t\thint: \"--exclude-lint-spelling\",\n\t\t\tlabel: \"Add cspell to spell check against dictionaries of known words.\",\n\t\t\tlevel: \"common\",\n\t\t},\n\t\texcludeLintStrict: {\n\t\t\thint: \"--exclude-lint-strict\",\n\t\t\tlabel:\n\t\t\t\t\"Include strict logical lint rules such as typescript-eslint's strict config. \",\n\t\t\tlevel: \"common\",\n\t\t},\n\t\texcludeLintStylistic: {\n\t\t\thint: \"--exclude-lint-stylistic\",\n\t\t\tlabel:\n\t\t\t\t\"Include stylistic lint rules such as typescript-eslint's stylistic config.\",\n\t\t\tlevel: \"common\",\n\t\t},\n\t\texcludeLintYml: {\n\t\t\thint: \"--exclude-lint-yml\",\n\t\t\tlabel: \"Apply linting and sorting to *.yaml and *.yml files.\",\n\t\t\tlevel: \"common\",\n\t\t},\n\t\texcludeReleases: {\n\t\t\thint: \"--exclude-releases\",\n\t\t\tlabel:\n\t\t\t\t\"Add release-it to generate changelogs, package bumps, and publishes based on conventional commits.\",\n\t\t},\n\t\texcludeRenovate: {\n\t\t\thint: \"--exclude-renovate\",\n\t\t\tlabel: \"Add a Renovate config to keep dependencies up-to-date with PRs.\",\n\t\t},\n\t\texcludeTemplatedBy: {\n\t\t\thint: \"--exclude-templated-by\",\n\t\t\tlabel:\n\t\t\t\t'Add a _\"This package was templated with create-typescript-app\"_ notice at the end of the README.md.',\n\t\t\tlevel: \"minimal\",\n\t\t},\n\t\texcludeTests: {\n\t\t\thint: \"--exclude-tests\",\n\t\t\tlabel:\n\t\t\t\t\"Add Vitest tooling for fast unit tests, configured with coverage tracking.\",\n\t\t},\n\t};\n\nexport const exclusionKeys = Object.keys(\n\texclusionDescriptions,\n) as ExclusionKey[];\n\nexport function getExclusions(\n\toptions: Partial<Options>,\n\tbase?: OptionsBase,\n): Partial<Options> {\n\tswitch (base) {\n\t\tcase \"common\":\n\t\t\treturn {\n\t\t\t\t...Object.fromEntries(\n\t\t\t\t\texclusionKeys\n\t\t\t\t\t\t.filter(\n\t\t\t\t\t\t\t(exclusion) =>\n\t\t\t\t\t\t\t\texclusionDescriptions[exclusion].level === \"common\",\n\t\t\t\t\t\t)\n\t\t\t\t\t\t.map((exclusion) => [exclusion, options[exclusion] ?? true]),\n\t\t\t\t),\n\t\t\t};\n\t\tcase \"minimal\":\n\t\t\treturn {\n\t\t\t\t...Object.fromEntries(\n\t\t\t\t\texclusionKeys\n\t\t\t\t\t\t.filter(\n\t\t\t\t\t\t\t(exclusion) =>\n\t\t\t\t\t\t\t\texclusionDescriptions[exclusion].level !== \"minimal\",\n\t\t\t\t\t\t)\n\t\t\t\t\t\t.map((exclusion) => [exclusion, options[exclusion] ?? true]),\n\t\t\t\t),\n\t\t\t};\n\t\t// We only really care about exclusions on the common and minimal bases\n\t\tdefault:\n\t\t\treturn {};\n\t}\n}\n"],"mappings":"AAUO,MAAM,wBACZ;AAAA,EACC,wBAAwB;AAAA,IACvB,MAAM;AAAA,IACN,OACC;AAAA,EACF;AAAA,EACA,cAAc;AAAA,IACb,MAAM;AAAA,IACN,OAAO;AAAA,IACP,OAAO;AAAA,EACR;AAAA,EACA,mBAAmB;AAAA,IAClB,MAAM;AAAA,IACN,OACC;AAAA,IACD,OAAO;AAAA,EACR;AAAA,EACA,mBAAmB;AAAA,IAClB,MAAM;AAAA,IACN,OACC;AAAA,IACD,OAAO;AAAA,EACR;AAAA,EACA,kBAAkB;AAAA,IACjB,MAAM;AAAA,IACN,OACC;AAAA,IACD,OAAO;AAAA,EACR;AAAA,EACA,iBAAiB;AAAA,IAChB,MAAM;AAAA,IACN,OAAO;AAAA,IACP,OAAO;AAAA,EACR;AAAA,EACA,iBAAiB;AAAA,IAChB,MAAM;AAAA,IACN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