create-typescript-app 1.33.2 → 1.35.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.
@@ -102,6 +102,9 @@ declare const allArgOptions: {
102
102
  readonly owner: {
103
103
  readonly type: "string";
104
104
  };
105
+ readonly "preserve-generated-from": {
106
+ readonly type: "boolean";
107
+ };
105
108
  readonly repository: {
106
109
  readonly type: "string";
107
110
  };
@@ -33,6 +33,7 @@ const allArgOptions = {
33
33
  mode: { type: "string" },
34
34
  offline: { type: "boolean" },
35
35
  owner: { type: "string" },
36
+ "preserve-generated-from": { type: "boolean" },
36
37
  repository: { type: "string" },
37
38
  "skip-all-contributors-api": { type: "boolean" },
38
39
  "skip-github-api": { type: "boolean" },
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/shared/options/args.ts"],"sourcesContent":["import { ParseArgsConfig } from \"node:util\";\n\nexport const allArgOptions = {\n\taccess: { type: \"string\" },\n\tauthor: { type: \"string\" },\n\tbase: { type: \"string\" },\n\tdescription: { type: \"string\" },\n\tdirectory: { type: \"string\" },\n\temail: { type: \"string\" },\n\t\"email-github\": { type: \"string\" },\n\t\"email-npm\": { type: \"string\" },\n\t\"exclude-all-contributors\": { type: \"boolean\" },\n\t\"exclude-compliance\": { type: \"boolean\" },\n\t\"exclude-lint-deprecation\": { type: \"boolean\" },\n\t\"exclude-lint-eslint\": { type: \"boolean\" },\n\t\"exclude-lint-jsdoc\": { type: \"boolean\" },\n\t\"exclude-lint-json\": { type: \"boolean\" },\n\t\"exclude-lint-knip\": { type: \"boolean\" },\n\t\"exclude-lint-md\": { type: \"boolean\" },\n\t\"exclude-lint-package-json\": { type: \"boolean\" },\n\t\"exclude-lint-packages\": { type: \"boolean\" },\n\t\"exclude-lint-perfectionist\": { type: \"boolean\" },\n\t\"exclude-lint-regex\": { type: \"boolean\" },\n\t\"exclude-lint-spelling\": { type: \"boolean\" },\n\t\"exclude-lint-strict\": { type: \"boolean\" },\n\t\"exclude-lint-stylistic\": { type: \"boolean\" },\n\t\"exclude-lint-yml\": { type: \"boolean\" },\n\t\"exclude-releases\": { type: \"boolean\" },\n\t\"exclude-renovate\": { type: \"boolean\" },\n\t\"exclude-tests\": { type: \"boolean\" },\n\tfunding: { type: \"string\" },\n\tkeywords: { multiple: true, type: \"string\" },\n\tlogo: { type: \"string\" },\n\t\"logo-alt\": { type: \"string\" },\n\tmode: { type: \"string\" },\n\toffline: { type: \"boolean\" },\n\towner: { type: \"string\" },\n\trepository: { type: \"string\" },\n\t\"skip-all-contributors-api\": { type: \"boolean\" },\n\t\"skip-github-api\": { type: \"boolean\" },\n\t\"skip-install\": { type: \"boolean\" },\n\t\"skip-removal\": { type: \"boolean\" },\n\t\"skip-restore\": { type: \"boolean\" },\n\t\"skip-uninstall\": { type: \"boolean\" },\n\ttitle: { type: \"string\" },\n} as const satisfies ParseArgsConfig[\"options\"];\n"],"mappings":"AAEO,MAAM,gBAAgB;AAAA,EAC5B,QAAQ,EAAE,MAAM,SAAS;AAAA,EACzB,QAAQ,EAAE,MAAM,SAAS;AAAA,EACzB,MAAM,EAAE,MAAM,SAAS;AAAA,EACvB,aAAa,EAAE,MAAM,SAAS;AAAA,EAC9B,WAAW,EAAE,MAAM,SAAS;AAAA,EAC5B,OAAO,EAAE,MAAM,SAAS;AAAA,EACxB,gBAAgB,EAAE,MAAM,SAAS;AAAA,EACjC,aAAa,EAAE,MAAM,SAAS;AAAA,EAC9B,4BAA4B,EAAE,MAAM,UAAU;AAAA,EAC9C,sBAAsB,EAAE,MAAM,UAAU;AAAA,EACxC,4BAA4B,EAAE,MAAM,UAAU;AAAA,EAC9C,uBAAuB,EAAE,MAAM,UAAU;AAAA,EACzC,sBAAsB,EAAE,MAAM,UAAU;AAAA,EACxC,qBAAqB,EAAE,MAAM,UAAU;AAAA,EACvC,qBAAqB,EAAE,MAAM,UAAU;AAAA,EACvC,mBAAmB,EAAE,MAAM,UAAU;AAAA,EACrC,6BAA6B,EAAE,MAAM,UAAU;AAAA,EAC/C,yBAAyB,EAAE,MAAM,UAAU;AAAA,EAC3C,8BAA8B,EAAE,MAAM,UAAU;AAAA,EAChD,sBAAsB,EAAE,MAAM,UAAU;AAAA,EACxC,yBAAyB,EAAE,MAAM,UAAU;AAAA,EAC3C,uBAAuB,EAAE,MAAM,UAAU;AAAA,EACzC,0BAA0B,EAAE,MAAM,UAAU;AAAA,EAC5C,oBAAoB,EAAE,MAAM,UAAU;AAAA,EACtC,oBAAoB,EAAE,MAAM,UAAU;AAAA,EACtC,oBAAoB,EAAE,MAAM,UAAU;AAAA,EACtC,iBAAiB,EAAE,MAAM,UAAU;AAAA,EACnC,SAAS,EAAE,MAAM,SAAS;AAAA,EAC1B,UAAU,EAAE,UAAU,MAAM,MAAM,SAAS;AAAA,EAC3C,MAAM,EAAE,MAAM,SAAS;AAAA,EACvB,YAAY,EAAE,MAAM,SAAS;AAAA,EAC7B,MAAM,EAAE,MAAM,SAAS;AAAA,EACvB,SAAS,EAAE,MAAM,UAAU;AAAA,EAC3B,OAAO,EAAE,MAAM,SAAS;AAAA,EACxB,YAAY,EAAE,MAAM,SAAS;AAAA,EAC7B,6BAA6B,EAAE,MAAM,UAAU;AAAA,EAC/C,mBAAmB,EAAE,MAAM,UAAU;AAAA,EACrC,gBAAgB,EAAE,MAAM,UAAU;AAAA,EAClC,gBAAgB,EAAE,MAAM,UAAU;AAAA,EAClC,gBAAgB,EAAE,MAAM,UAAU;AAAA,EAClC,kBAAkB,EAAE,MAAM,UAAU;AAAA,EACpC,OAAO,EAAE,MAAM,SAAS;AACzB;","names":[]}
1
+ {"version":3,"sources":["../../../src/shared/options/args.ts"],"sourcesContent":["import { ParseArgsConfig } from \"node:util\";\n\nexport const allArgOptions = {\n\taccess: { type: \"string\" },\n\tauthor: { type: \"string\" },\n\tbase: { type: \"string\" },\n\tdescription: { type: \"string\" },\n\tdirectory: { type: \"string\" },\n\temail: { type: \"string\" },\n\t\"email-github\": { type: \"string\" },\n\t\"email-npm\": { type: \"string\" },\n\t\"exclude-all-contributors\": { type: \"boolean\" },\n\t\"exclude-compliance\": { type: \"boolean\" },\n\t\"exclude-lint-deprecation\": { type: \"boolean\" },\n\t\"exclude-lint-eslint\": { type: \"boolean\" },\n\t\"exclude-lint-jsdoc\": { type: \"boolean\" },\n\t\"exclude-lint-json\": { type: \"boolean\" },\n\t\"exclude-lint-knip\": { type: \"boolean\" },\n\t\"exclude-lint-md\": { type: \"boolean\" },\n\t\"exclude-lint-package-json\": { type: \"boolean\" },\n\t\"exclude-lint-packages\": { type: \"boolean\" },\n\t\"exclude-lint-perfectionist\": { type: \"boolean\" },\n\t\"exclude-lint-regex\": { type: \"boolean\" },\n\t\"exclude-lint-spelling\": { type: \"boolean\" },\n\t\"exclude-lint-strict\": { type: \"boolean\" },\n\t\"exclude-lint-stylistic\": { type: \"boolean\" },\n\t\"exclude-lint-yml\": { type: \"boolean\" },\n\t\"exclude-releases\": { type: \"boolean\" },\n\t\"exclude-renovate\": { type: \"boolean\" },\n\t\"exclude-tests\": { type: \"boolean\" },\n\tfunding: { type: \"string\" },\n\tkeywords: { multiple: true, type: \"string\" },\n\tlogo: { type: \"string\" },\n\t\"logo-alt\": { type: \"string\" },\n\tmode: { type: \"string\" },\n\toffline: { type: \"boolean\" },\n\towner: { type: \"string\" },\n\t\"preserve-generated-from\": { type: \"boolean\" },\n\trepository: { type: \"string\" },\n\t\"skip-all-contributors-api\": { type: \"boolean\" },\n\t\"skip-github-api\": { type: \"boolean\" },\n\t\"skip-install\": { type: \"boolean\" },\n\t\"skip-removal\": { type: \"boolean\" },\n\t\"skip-restore\": { type: \"boolean\" },\n\t\"skip-uninstall\": { type: \"boolean\" },\n\ttitle: { type: \"string\" },\n} as const satisfies ParseArgsConfig[\"options\"];\n"],"mappings":"AAEO,MAAM,gBAAgB;AAAA,EAC5B,QAAQ,EAAE,MAAM,SAAS;AAAA,EACzB,QAAQ,EAAE,MAAM,SAAS;AAAA,EACzB,MAAM,EAAE,MAAM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M,UAAU;AAAA,EAC7C,YAAY,EAAE,MAAM,SAAS;AAAA,EAC7B,6BAA6B,EAAE,MAAM,UAAU;AAAA,EAC/C,mBAAmB,EAAE,MAAM,UAAU;AAAA,EACrC,gBAAgB,EAAE,MAAM,UAAU;AAAA,EAClC,gBAAgB,EAAE,MAAM,UAAU;AAAA,EAClC,gBAAgB,EAAE,MAAM,UAAU;AAAA,EAClC,kBAAkB,EAAE,MAAM,UAAU;AAAA,EACpC,OAAO,EAAE,MAAM,SAAS;AACzB;","names":[]}
@@ -0,0 +1,10 @@
1
+ import { Octokit } from 'octokit';
2
+
3
+ interface CreateRepositoryWithApiOptions {
4
+ owner: string;
5
+ preserveGeneratedFrom?: boolean;
6
+ repository: string;
7
+ }
8
+ declare function createRepositoryWithApi(octokit: Octokit, options: CreateRepositoryWithApiOptions): Promise<void>;
9
+
10
+ export { CreateRepositoryWithApiOptions, createRepositoryWithApi };
@@ -0,0 +1,26 @@
1
+ async function createRepositoryWithApi(octokit, options) {
2
+ if (options.preserveGeneratedFrom) {
3
+ await octokit.rest.repos.createUsingTemplate({
4
+ name: options.repository,
5
+ owner: options.owner,
6
+ template_owner: "JoshuaKGoldberg",
7
+ template_repo: "create-typescript-app"
8
+ });
9
+ return;
10
+ }
11
+ const currentUser = await octokit.rest.users.getAuthenticated();
12
+ if (currentUser.data.login === options.owner) {
13
+ await octokit.rest.repos.createForAuthenticatedUser({
14
+ name: options.repository
15
+ });
16
+ } else {
17
+ await octokit.rest.repos.createInOrg({
18
+ name: options.repository,
19
+ org: options.owner
20
+ });
21
+ }
22
+ }
23
+ export {
24
+ createRepositoryWithApi
25
+ };
26
+ //# sourceMappingURL=createRepositoryWithApi.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/shared/options/createRepositoryWithApi.ts"],"sourcesContent":["import { Octokit } from \"octokit\";\n\nexport interface CreateRepositoryWithApiOptions {\n\towner: string;\n\tpreserveGeneratedFrom?: boolean;\n\trepository: string;\n}\n\nexport async function createRepositoryWithApi(\n\toctokit: Octokit,\n\toptions: CreateRepositoryWithApiOptions,\n) {\n\tif (options.preserveGeneratedFrom) {\n\t\tawait octokit.rest.repos.createUsingTemplate({\n\t\t\tname: options.repository,\n\t\t\towner: options.owner,\n\t\t\ttemplate_owner: \"JoshuaKGoldberg\",\n\t\t\ttemplate_repo: \"create-typescript-app\",\n\t\t});\n\t\treturn;\n\t}\n\n\tconst currentUser = await octokit.rest.users.getAuthenticated();\n\n\tif (currentUser.data.login === options.owner) {\n\t\tawait octokit.rest.repos.createForAuthenticatedUser({\n\t\t\tname: options.repository,\n\t\t});\n\t} else {\n\t\tawait octokit.rest.repos.createInOrg({\n\t\t\tname: options.repository,\n\t\t\torg: options.owner,\n\t\t});\n\t}\n}\n"],"mappings":"AAQA,eAAsB,wBACrB,SACA,SACC;AACD,MAAI,QAAQ,uBAAuB;AAClC,UAAM,QAAQ,KAAK,MAAM,oBAAoB;AAAA,MAC5C,MAAM,QAAQ;AAAA,MACd,OAAO,QAAQ;AAAA,MACf,gBAAgB;AAAA,MAChB,eAAe;AAAA,IAChB,CAAC;AACD;AAAA,EACD;AAEA,QAAM,cAAc,MAAM,QAAQ,KAAK,MAAM,iBAAiB;AAE9D,MAAI,YAAY,KAAK,UAAU,QAAQ,OAAO;AAC7C,UAAM,QAAQ,KAAK,MAAM,2BAA2B;AAAA,MACnD,MAAM,QAAQ;AAAA,IACf,CAAC;AAAA,EACF,OAAO;AACN,UAAM,QAAQ,KAAK,MAAM,YAAY;AAAA,MACpC,MAAM,QAAQ;AAAA,MACd,KAAK,QAAQ;AAAA,IACd,CAAC;AAAA,EACF;AACD;","names":[]}
@@ -4,7 +4,7 @@ import 'zod';
4
4
  import '../codes.js';
5
5
  import 'octokit';
6
6
 
7
- type EnsureRepositoryExistsOptions = Pick<Options, "mode" | "owner" | "repository">;
7
+ type EnsureRepositoryExistsOptions = Pick<Options, "mode" | "owner" | "preserveGeneratedFrom" | "repository">;
8
8
  interface RepositoryExistsResult {
9
9
  github: GitHub | undefined;
10
10
  repository: string;
@@ -1,6 +1,7 @@
1
1
  import * as prompts from "@clack/prompts";
2
2
  import { doesRepositoryExist } from "../doesRepositoryExist.js";
3
3
  import { filterPromptCancel } from "../prompts.js";
4
+ import { createRepositoryWithApi } from "./createRepositoryWithApi.js";
4
5
  async function ensureRepositoryExists(github, options) {
5
6
  let { repository } = options;
6
7
  let createRepository = options.mode === "create";
@@ -31,11 +32,10 @@ async function ensureRepositoryExists(github, options) {
31
32
  case "bail":
32
33
  return {};
33
34
  case "create":
34
- await github.octokit.rest.repos.createUsingTemplate({
35
- name: repository,
35
+ await createRepositoryWithApi(github.octokit, {
36
36
  owner: options.owner,
37
- template_owner: "JoshuaKGoldberg",
38
- template_repo: "create-typescript-app"
37
+ preserveGeneratedFrom: options.preserveGeneratedFrom,
38
+ repository
39
39
  });
40
40
  return { github, repository };
41
41
  case "different":
@@ -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 { GitHub } from \"./getGitHub.js\";\n\nexport type EnsureRepositoryExistsOptions = Pick<\n\tOptions,\n\t\"mode\" | \"owner\" | \"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 );\n\n\t\tcreateRepository = false;\n\n\t\tswitch (selection) {\n\t\t\tcase undefined:\n\t\t\tcase \"bail\":\n\t\t\t\treturn {};\n\n\t\t\tcase \"create\":\n\t\t\t\tawait github.octokit.rest.repos.createUsingTemplate({\n\t\t\t\t\tname: repository,\n\t\t\t\t\towner: options.owner,\n\t\t\t\t\ttemplate_owner: \"JoshuaKGoldberg\",\n\t\t\t\t\ttemplate_repo: \"create-typescript-app\",\n\t\t\t\t});\n\t\t\t\treturn { github: 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\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: github, repository };\n}\n"],"mappings":"AAAA,YAAY,aAAa;AAEzB,SAAS,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],"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 );\n\n\t\tcreateRepository = false;\n\n\t\tswitch (selection) {\n\t\t\tcase undefined:\n\t\t\tcase \"bail\":\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\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: 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,IACD;AAEH,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;AACJ,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,MAED,KAAK;AACJ,iBAAS;AACT;AAAA,IACF;AAAA,EACD;AAEA,SAAO,EAAE,QAAgB,WAAW;AACrC;","names":[]}
@@ -42,6 +42,7 @@ declare const optionsSchemaShape: {
42
42
  mode: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<"create">, z.ZodLiteral<"initialize">, z.ZodLiteral<"migrate">]>>;
43
43
  offline: z.ZodOptional<z.ZodBoolean>;
44
44
  owner: z.ZodOptional<z.ZodString>;
45
+ preserveGeneratedFrom: z.ZodOptional<z.ZodBoolean>;
45
46
  repository: z.ZodOptional<z.ZodString>;
46
47
  skipAllContributorsApi: z.ZodOptional<z.ZodBoolean>;
47
48
  skipGitHubApi: z.ZodOptional<z.ZodBoolean>;
@@ -93,6 +94,7 @@ declare const optionsSchema: z.ZodObject<{
93
94
  mode: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<"create">, z.ZodLiteral<"initialize">, z.ZodLiteral<"migrate">]>>;
94
95
  offline: z.ZodOptional<z.ZodBoolean>;
95
96
  owner: z.ZodOptional<z.ZodString>;
97
+ preserveGeneratedFrom: z.ZodOptional<z.ZodBoolean>;
96
98
  repository: z.ZodOptional<z.ZodString>;
97
99
  skipAllContributorsApi: z.ZodOptional<z.ZodBoolean>;
98
100
  skipGitHubApi: z.ZodOptional<z.ZodBoolean>;
@@ -137,6 +139,7 @@ declare const optionsSchema: z.ZodObject<{
137
139
  mode?: "create" | "initialize" | "migrate" | undefined;
138
140
  offline?: boolean | undefined;
139
141
  owner?: string | undefined;
142
+ preserveGeneratedFrom?: boolean | undefined;
140
143
  repository?: string | undefined;
141
144
  skipAllContributorsApi?: boolean | undefined;
142
145
  skipGitHubApi?: boolean | undefined;
@@ -181,6 +184,7 @@ declare const optionsSchema: z.ZodObject<{
181
184
  mode?: "create" | "initialize" | "migrate" | undefined;
182
185
  offline?: boolean | undefined;
183
186
  owner?: string | undefined;
187
+ preserveGeneratedFrom?: boolean | undefined;
184
188
  repository?: string | undefined;
185
189
  skipAllContributorsApi?: boolean | undefined;
186
190
  skipGitHubApi?: boolean | undefined;
@@ -40,6 +40,7 @@ const optionsSchemaShape = {
40
40
  mode: z.union([z.literal("create"), z.literal("initialize"), z.literal("migrate")]).optional(),
41
41
  offline: z.boolean().optional(),
42
42
  owner: z.string().optional(),
43
+ preserveGeneratedFrom: z.boolean().optional(),
43
44
  repository: z.string().optional(),
44
45
  skipAllContributorsApi: z.boolean().optional(),
45
46
  skipGitHubApi: z.boolean().optional(),
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/shared/options/optionsSchema.ts"],"sourcesContent":["import { z } from \"zod\";\n\nexport const optionsSchemaShape = {\n\taccess: z.union([z.literal(\"public\"), z.literal(\"restricted\")]).optional(),\n\tauthor: z.string().optional(),\n\tbase: z\n\t\t.union([\n\t\t\tz.literal(\"common\"),\n\t\t\tz.literal(\"everything\"),\n\t\t\tz.literal(\"minimum\"),\n\t\t\tz.literal(\"prompt\"),\n\t\t])\n\t\t.optional(),\n\tdescription: z.string().optional(),\n\tdirectory: z.string().optional(),\n\temail: z\n\t\t.object({\n\t\t\tgithub: z.string().email(),\n\t\t\tnpm: z.string().email(),\n\t\t})\n\t\t.optional(),\n\texcludeAllContributors: z.boolean().optional(),\n\texcludeCompliance: z.boolean().optional(),\n\texcludeLintDeprecation: z.boolean().optional(),\n\texcludeLintESLint: z.boolean().optional(),\n\texcludeLintJSDoc: z.boolean().optional(),\n\texcludeLintJson: z.boolean().optional(),\n\texcludeLintKnip: z.boolean().optional(),\n\texcludeLintMd: z.boolean().optional(),\n\texcludeLintPackageJson: z.boolean().optional(),\n\texcludeLintPackages: z.boolean().optional(),\n\texcludeLintPerfectionist: z.boolean().optional(),\n\texcludeLintRegex: z.boolean().optional(),\n\texcludeLintSpelling: z.boolean().optional(),\n\texcludeLintStrict: z.boolean().optional(),\n\texcludeLintStylistic: z.boolean().optional(),\n\texcludeLintYml: z.boolean().optional(),\n\texcludeReleases: z.boolean().optional(),\n\texcludeRenovate: z.boolean().optional(),\n\texcludeTests: z.boolean().optional(),\n\tfunding: z.string().optional(),\n\tkeywords: z.array(z.string()).optional(),\n\tlogo: z.string().optional(),\n\tlogoAlt: z.string().optional(),\n\tmode: z\n\t\t.union([z.literal(\"create\"), z.literal(\"initialize\"), z.literal(\"migrate\")])\n\t\t.optional(),\n\toffline: z.boolean().optional(),\n\towner: z.string().optional(),\n\trepository: z.string().optional(),\n\tskipAllContributorsApi: z.boolean().optional(),\n\tskipGitHubApi: z.boolean().optional(),\n\tskipInstall: z.boolean().optional(),\n\tskipRemoval: z.boolean().optional(),\n\tskipRestore: z.boolean().optional(),\n\tskipUninstall: z.boolean().optional(),\n\ttitle: z.string().optional(),\n};\n\nexport const optionsSchema = z.object(optionsSchemaShape);\n"],"mappings":"AAAA,SAAS,SAAS;AAEX,MAAM,qBAAqB;AAAA,EACjC,QAAQ,EAAE,MAAM,CAAC,EAAE,QAAQ,QAAQ,GAAG,EAAE,QAAQ,YAAY,CAAC,CAAC,EAAE,SAAS;AAAA,EACzE,QAAQ,EAAE,OAAO,EAAE,SAAS;AAAA,EAC5B,MAAM,EACJ,MAAM;AAAA,IACN,EAAE,QAAQ,QAAQ;AAAA,IAClB,EAAE,QAAQ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E,SAAS;AAAA,EAC7B,UAAU,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,SAAS;AAAA,EACvC,MAAM,EAAE,OAAO,EAAE,SAAS;AAAA,EAC1B,SAAS,EAAE,OAAO,EAAE,SAAS;AAAA,EAC7B,MAAM,EACJ,MAAM,CAAC,EAAE,QAAQ,QAAQ,GAAG,EAAE,QAAQ,YAAY,GAAG,EAAE,QAAQ,SAAS,CAAC,CAAC,EAC1E,SAAS;AAAA,EACX,SAAS,EAAE,QAAQ,EAAE,SAAS;AAAA,EAC9B,OAAO,EAAE,OAAO,EAAE,SAAS;AAAA,EAC3B,YAAY,EAAE,OAAO,EAAE,SAAS;AAAA,EAChC,wBAAwB,EAAE,QAAQ,EAAE,SAAS;AAAA,EAC7C,eAAe,EAAE,QAAQ,EAAE,SAAS;AAAA,EACpC,aAAa,EAAE,QAAQ,EAAE,SAAS;AAAA,EAClC,aAAa,EAAE,QAAQ,EAAE,SAAS;AAAA,EAClC,aAAa,EAAE,QAAQ,EAAE,SAAS;AAAA,EAClC,eAAe,EAAE,QAAQ,EAAE,SAAS;AAAA,EACpC,OAAO,EAAE,OAAO,EAAE,SAAS;AAC5B;AAEO,MAAM,gBAAgB,EAAE,OAAO,kBAAkB;","names":[]}
1
+ {"version":3,"sources":["../../../src/shared/options/optionsSchema.ts"],"sourcesContent":["import { z } from \"zod\";\n\nexport const optionsSchemaShape = {\n\taccess: z.union([z.literal(\"public\"), z.literal(\"restricted\")]).optional(),\n\tauthor: z.string().optional(),\n\tbase: z\n\t\t.union([\n\t\t\tz.literal(\"common\"),\n\t\t\tz.literal(\"everything\"),\n\t\t\tz.literal(\"minimum\"),\n\t\t\tz.literal(\"prompt\"),\n\t\t])\n\t\t.optional(),\n\tdescription: z.string().optional(),\n\tdirectory: z.string().optional(),\n\temail: z\n\t\t.object({\n\t\t\tgithub: z.string().email(),\n\t\t\tnpm: z.string().email(),\n\t\t})\n\t\t.optional(),\n\texcludeAllContributors: z.boolean().optional(),\n\texcludeCompliance: z.boolean().optional(),\n\texcludeLintDeprecation: z.boolean().optional(),\n\texcludeLintESLint: z.boolean().optional(),\n\texcludeLintJSDoc: z.boolean().optional(),\n\texcludeLintJson: z.boolean().optional(),\n\texcludeLintKnip: z.boolean().optional(),\n\texcludeLintMd: z.boolean().optional(),\n\texcludeLintPackageJson: z.boolean().optional(),\n\texcludeLintPackages: z.boolean().optional(),\n\texcludeLintPerfectionist: z.boolean().optional(),\n\texcludeLintRegex: z.boolean().optional(),\n\texcludeLintSpelling: z.boolean().optional(),\n\texcludeLintStrict: z.boolean().optional(),\n\texcludeLintStylistic: z.boolean().optional(),\n\texcludeLintYml: z.boolean().optional(),\n\texcludeReleases: z.boolean().optional(),\n\texcludeRenovate: z.boolean().optional(),\n\texcludeTests: z.boolean().optional(),\n\tfunding: z.string().optional(),\n\tkeywords: z.array(z.string()).optional(),\n\tlogo: z.string().optional(),\n\tlogoAlt: z.string().optional(),\n\tmode: z\n\t\t.union([z.literal(\"create\"), z.literal(\"initialize\"), z.literal(\"migrate\")])\n\t\t.optional(),\n\toffline: z.boolean().optional(),\n\towner: z.string().optional(),\n\tpreserveGeneratedFrom: z.boolean().optional(),\n\trepository: z.string().optional(),\n\tskipAllContributorsApi: z.boolean().optional(),\n\tskipGitHubApi: z.boolean().optional(),\n\tskipInstall: z.boolean().optional(),\n\tskipRemoval: z.boolean().optional(),\n\tskipRestore: z.boolean().optional(),\n\tskipUninstall: z.boolean().optional(),\n\ttitle: z.string().optional(),\n};\n\nexport const optionsSchema = z.object(optionsSchemaShape);\n"],"mappings":"AAAA,SAAS,SAAS;AAEX,MAAM,qBAAqB;AAAA,EACjC,QAAQ,EAAE,MAAM,CAAC,EAAE,QAAQ,QAAQ,GAAG,EAAE,QAAQ,YAAY,CAAC,CAAC,EAAE,SAAS;AAAA,EACzE,QAAQ,EAAE,OAAO,EAAE,SAAS;AAAA,EAC5B,MAAM,EACJ,MAAM;AAAA,IACN,EAAE,QAAQ,QAAQ;AAAA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S,EAAE,OAAO,EAAE,SAAS;AAAA,EAC7B,UAAU,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,SAAS;AAAA,EACvC,MAAM,EAAE,OAAO,EAAE,SAAS;AAAA,EAC1B,SAAS,EAAE,OAAO,EAAE,SAAS;AAAA,EAC7B,MAAM,EACJ,MAAM,CAAC,EAAE,QAAQ,QAAQ,GAAG,EAAE,QAAQ,YAAY,GAAG,EAAE,QAAQ,SAAS,CAAC,CAAC,EAC1E,SAAS;AAAA,EACX,SAAS,EAAE,QAAQ,EAAE,SAAS;AAAA,EAC9B,OAAO,EAAE,OAAO,EAAE,SAAS;AAAA,EAC3B,uBAAuB,EAAE,QAAQ,EAAE,SAAS;AAAA,EAC5C,YAAY,EAAE,OAAO,EAAE,SAAS;AAAA,EAChC,wBAAwB,EAAE,QAAQ,EAAE,SAAS;AAAA,EAC7C,eAAe,EAAE,QAAQ,EAAE,SAAS;AAAA,EACpC,aAAa,EAAE,QAAQ,EAAE,SAAS;AAAA,EAClC,aAAa,EAAE,QAAQ,EAAE,SAAS;AAAA,EAClC,aAAa,EAAE,QAAQ,EAAE,SAAS;AAAA,EAClC,eAAe,EAAE,QAAQ,EAAE,SAAS;AAAA,EACpC,OAAO,EAAE,OAAO,EAAE,SAAS;AAC5B;AAEO,MAAM,gBAAgB,EAAE,OAAO,kBAAkB;","names":[]}
@@ -48,6 +48,7 @@ async function readOptions(args, mode, promptedOptions = {}) {
48
48
  funding: values.funding,
49
49
  offline: values.offline,
50
50
  owner: values.owner,
51
+ preserveGeneratedFrom: values["preserve-generated-from"] ?? values.owner === "JoshuaKGoldberg",
51
52
  repository: values.repository,
52
53
  skipAllContributorsApi: values["skip-all-contributors-api"] ?? values.offline,
53
54
  skipGitHubApi: values["skip-github-api"] ?? values.offline,
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/shared/options/readOptions.ts"],"sourcesContent":["import { parseArgs } from \"node:util\";\nimport { titleCase } from \"title-case\";\nimport { z } from \"zod\";\n\nimport { withSpinner } from \"../cli/spinners.js\";\nimport { Mode, PromptedOptions } from \"../types.js\";\nimport { Options, OptionsLogo } from \"../types.js\";\nimport { allArgOptions } from \"./args.js\";\nimport { augmentOptionsWithExcludes } from \"./augmentOptionsWithExcludes.js\";\nimport { createOptionDefaults } from \"./createOptionDefaults/index.js\";\nimport { detectEmailRedundancy } from \"./detectEmailRedundancy.js\";\nimport { ensureRepositoryExists } from \"./ensureRepositoryExists.js\";\nimport { GitHub, getGitHub } from \"./getGitHub.js\";\nimport { getPrefillOrPromptedOption } from \"./getPrefillOrPromptedOption.js\";\nimport { optionsSchema } from \"./optionsSchema.js\";\n\nexport interface GitHubAndOptions {\n\tgithub: GitHub | undefined;\n\toptions: Options;\n}\n\nexport interface OptionsParseCancelled {\n\tcancelled: true;\n\terror?: string | z.ZodError<object>;\n\toptions: object;\n}\n\nexport interface OptionsParseSuccess extends GitHubAndOptions {\n\tcancelled: false;\n}\n\nexport type OptionsParseResult = OptionsParseCancelled | OptionsParseSuccess;\n\nexport async function readOptions(\n\targs: string[],\n\tmode: Mode,\n\tpromptedOptions: PromptedOptions = {},\n): Promise<OptionsParseResult> {\n\tconst defaults = createOptionDefaults(promptedOptions);\n\tconst { values } = parseArgs({\n\t\targs,\n\t\toptions: allArgOptions,\n\t\tstrict: false,\n\t\ttokens: true,\n\t});\n\n\tconst mappedOptions = {\n\t\taccess: values.access,\n\t\tauthor: values.author,\n\t\tbase: values.base,\n\t\tdescription: values.description,\n\t\tdirectory: values.directory,\n\t\temail:\n\t\t\tvalues.email ?? values[\"email-github\"] ?? values[\"email-npm\"]\n\t\t\t\t? {\n\t\t\t\t\t\tgithub: values.email ?? values[\"email-github\"],\n\t\t\t\t\t\tnpm: values.email ?? values[\"email-npm\"],\n\t\t\t\t }\n\t\t\t\t: undefined,\n\t\texcludeAllContributors: values[\"exclude-all-contributors\"],\n\t\texcludeCompliance: values[\"exclude-compliance\"],\n\t\texcludeLintDeprecation: values[\"exclude-lint-deprecation\"],\n\t\texcludeLintESLint: values[\"exclude-lint-eslint\"],\n\t\texcludeLintJSDoc: values[\"exclude-lint-jsdoc\"],\n\t\texcludeLintJson: values[\"exclude-lint-json\"],\n\t\texcludeLintKnip: values[\"exclude-lint-knip\"],\n\t\texcludeLintMd: values[\"exclude-lint-md\"],\n\t\texcludeLintPackageJson: values[\"exclude-lint-package-json\"],\n\t\texcludeLintPackages: values[\"exclude-lint-packages\"],\n\t\texcludeLintPerfectionist: values[\"exclude-lint-perfectionist\"],\n\t\texcludeLintRegex: values[\"exclude-lint-regex\"],\n\t\texcludeLintSpelling: values[\"exclude-lint-spelling\"],\n\t\texcludeLintStrict: values[\"exclude-lint-strict\"],\n\t\texcludeLintYml: values[\"exclude-lint-yml\"],\n\t\texcludeReleases: values[\"exclude-releases\"],\n\t\texcludeRenovate: values[\"exclude-renovate\"],\n\t\texcludeTests: values[\"unit-tests\"],\n\t\tfunding: values.funding,\n\t\toffline: values.offline,\n\t\towner: values.owner,\n\t\trepository: values.repository,\n\t\tskipAllContributorsApi:\n\t\t\tvalues[\"skip-all-contributors-api\"] ?? values.offline,\n\t\tskipGitHubApi: values[\"skip-github-api\"] ?? values.offline,\n\t\tskipInstall: values[\"skip-install\"],\n\t\tskipRemoval: values[\"skip-removal\"],\n\t\tskipRestore: values[\"skip-restore\"],\n\t\tskipUninstall: values[\"skip-uninstall\"],\n\t\ttitle: values.title,\n\t};\n\n\tconst emailError = detectEmailRedundancy(values);\n\tif (emailError) {\n\t\treturn {\n\t\t\tcancelled: true,\n\t\t\terror: emailError,\n\t\t\toptions: mappedOptions,\n\t\t};\n\t}\n\n\tconst optionsParseResult = optionsSchema.safeParse(mappedOptions);\n\n\tif (!optionsParseResult.success) {\n\t\treturn {\n\t\t\tcancelled: true,\n\t\t\terror: optionsParseResult.error,\n\t\t\toptions: mappedOptions,\n\t\t};\n\t}\n\n\tconst options = optionsParseResult.data;\n\n\toptions.owner ??= await getPrefillOrPromptedOption(\n\t\t\"What organization or user will the repository be under?\",\n\t\tdefaults.owner,\n\t);\n\tif (!options.owner) {\n\t\treturn {\n\t\t\tcancelled: true,\n\t\t\toptions,\n\t\t};\n\t}\n\n\toptions.repository ??= await getPrefillOrPromptedOption(\n\t\t\"What will the kebab-case name of the repository be?\",\n\t\tdefaults.repository,\n\t);\n\tif (!options.repository) {\n\t\treturn {\n\t\t\tcancelled: true,\n\t\t\toptions,\n\t\t};\n\t}\n\n\tconst { github, repository } = await ensureRepositoryExists(\n\t\toptions.skipGitHubApi\n\t\t\t? undefined\n\t\t\t: await withSpinner(\"Checking GitHub authentication\", getGitHub),\n\t\t{\n\t\t\tmode,\n\t\t\towner: options.owner,\n\t\t\trepository: options.repository,\n\t\t},\n\t);\n\tif (!repository) {\n\t\treturn { cancelled: true, options };\n\t}\n\n\toptions.description ??= await getPrefillOrPromptedOption(\n\t\t\"How would you describe the new package?\",\n\t\tasync () =>\n\t\t\t(await defaults.description()) ?? \"A very lovely package. Hooray!\",\n\t);\n\tif (!options.description) {\n\t\treturn { cancelled: true, options };\n\t}\n\n\toptions.title ??= await getPrefillOrPromptedOption(\n\t\t\"What will the Title Case title of the repository be?\",\n\t\tasync () =>\n\t\t\t(await defaults.title()) ?? titleCase(repository).replaceAll(\"-\", \" \"),\n\t);\n\tif (!options.title) {\n\t\treturn { cancelled: true, options };\n\t}\n\n\tlet logo: OptionsLogo | undefined;\n\n\tif (options.logo) {\n\t\tconst alt =\n\t\t\toptions.logoAlt ??\n\t\t\t(await getPrefillOrPromptedOption(\n\t\t\t\t\"What is the alt text (non-visual description) of the logo?\",\n\t\t\t));\n\t\tif (!alt) {\n\t\t\treturn { cancelled: true, options };\n\t\t}\n\n\t\tlogo = { alt, src: options.logo };\n\t}\n\n\tconst email =\n\t\toptions.email ??\n\t\t(await defaults.email()) ??\n\t\t(await getPrefillOrPromptedOption(\n\t\t\t\"What email should be used in package.json and .md files?\",\n\t\t));\n\tif (!email) {\n\t\treturn { cancelled: true, options };\n\t}\n\n\tconst augmentedOptions = await augmentOptionsWithExcludes({\n\t\t...options,\n\t\taccess: options.access ?? \"public\",\n\t\tauthor: options.author ?? (await defaults.owner()),\n\t\tdescription: options.description,\n\t\tdirectory:\n\t\t\toptions.directory ?? promptedOptions.directory ?? options.repository,\n\t\temail: typeof email === \"string\" ? { github: email, npm: email } : email,\n\t\tfunding: options.funding ?? (await defaults.funding()),\n\t\tlogo,\n\t\tmode,\n\t\towner: options.owner,\n\t\trepository,\n\t\ttitle: options.title,\n\t});\n\n\tif (!augmentedOptions) {\n\t\treturn {\n\t\t\tcancelled: true,\n\t\t\toptions,\n\t\t};\n\t}\n\n\treturn {\n\t\tcancelled: false,\n\t\tgithub,\n\t\toptions: augmentedOptions,\n\t};\n}\n"],"mappings":"AAAA,SAAS,iBAAiB;AAC1B,SAAS,iBAAiB;AAG1B,SAAS,mBAAmB;AAG5B,SAAS,qBAAqB;AAC9B,SAAS,kCAAkC;AAC3C,SAAS,4BAA4B;AACrC,SAAS,6BAA6B;AACtC,SAAS,8BAA8B;AACvC,SAAiB,iBAAiB;AAClC,SAAS,kCAAkC;AAC3C,SAAS,qBAAqB;AAmB9B,eAAsB,YACrB,MACA,MACA,kBAAmC,CAAC,GACN;AAC9B,QAAM,WAAW,qBAAqB,eAAe;AACrD,QAAM,EAAE,OAAO,IAAI,UAAU;AAAA,IAC5B;AAAA,IACA,SAAS;AAAA,IACT,QAAQ;AAAA,IACR,QAAQ;AAAA,EACT,CAAC;AAED,QAAM,gBAAgB;AAAA,IACrB,QAAQ,OAAO;AAAA,IACf,QAAQ,OAAO;AAAA,IACf,MAAM,OAAO;AAAA,IACb,aAAa,OAAO;AAAA,IACpB,WAAW,OAAO;AAAA,IAClB,OACC,OAAO,SAAS,OAAO,cAAc,KAAK,OAAO,WAAW,IACzD;AAAA,MACA,QAAQ,OAAO,SAAS,OAAO,cAAc;AAAA,MAC7C,KAAK,OAAO,SAAS,OAAO,WAAW;AAAA,IACvC,IACA;AAAA,IACJ,wBAAwB,OAAO,0B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AM,QACL,QAAQ,SACP,MAAM,SAAS,MAAM,KACrB,MAAM;AAAA,IACN;AAAA,EACD;AACD,MAAI,CAAC,OAAO;AACX,WAAO,EAAE,WAAW,MAAM,QAAQ;AAAA,EACnC;AAEA,QAAM,mBAAmB,MAAM,2BAA2B;AAAA,IACzD,GAAG;AAAA,IACH,QAAQ,QAAQ,UAAU;AAAA,IAC1B,QAAQ,QAAQ,UAAW,MAAM,SAAS,MAAM;AAAA,IAChD,aAAa,QAAQ;AAAA,IACrB,WACC,QAAQ,aAAa,gBAAgB,aAAa,QAAQ;AAAA,IAC3D,OAAO,OAAO,UAAU,WAAW,EAAE,QAAQ,OAAO,KAAK,MAAM,IAAI;AAAA,IACnE,SAAS,QAAQ,WAAY,MAAM,SAAS,QAAQ;AAAA,IACpD;AAAA,IACA;AAAA,IACA,OAAO,QAAQ;AAAA,IACf;AAAA,IACA,OAAO,QAAQ;AAAA,EAChB,CAAC;AAED,MAAI,CAAC,kBAAkB;AACtB,WAAO;AAAA,MACN,WAAW;AAAA,MACX;AAAA,IACD;AAAA,EACD;AAEA,SAAO;AAAA,IACN,WAAW;AAAA,IACX;AAAA,IACA,SAAS;AAAA,EACV;AACD;","names":[]}
1
+ {"version":3,"sources":["../../../src/shared/options/readOptions.ts"],"sourcesContent":["import { parseArgs } from \"node:util\";\nimport { titleCase } from \"title-case\";\nimport { z } from \"zod\";\n\nimport { withSpinner } from \"../cli/spinners.js\";\nimport { Mode, PromptedOptions } from \"../types.js\";\nimport { Options, OptionsLogo } from \"../types.js\";\nimport { allArgOptions } from \"./args.js\";\nimport { augmentOptionsWithExcludes } from \"./augmentOptionsWithExcludes.js\";\nimport { createOptionDefaults } from \"./createOptionDefaults/index.js\";\nimport { detectEmailRedundancy } from \"./detectEmailRedundancy.js\";\nimport { ensureRepositoryExists } from \"./ensureRepositoryExists.js\";\nimport { GitHub, getGitHub } from \"./getGitHub.js\";\nimport { getPrefillOrPromptedOption } from \"./getPrefillOrPromptedOption.js\";\nimport { optionsSchema } from \"./optionsSchema.js\";\n\nexport interface GitHubAndOptions {\n\tgithub: GitHub | undefined;\n\toptions: Options;\n}\n\nexport interface OptionsParseCancelled {\n\tcancelled: true;\n\terror?: string | z.ZodError<object>;\n\toptions: object;\n}\n\nexport interface OptionsParseSuccess extends GitHubAndOptions {\n\tcancelled: false;\n}\n\nexport type OptionsParseResult = OptionsParseCancelled | OptionsParseSuccess;\n\nexport async function readOptions(\n\targs: string[],\n\tmode: Mode,\n\tpromptedOptions: PromptedOptions = {},\n): Promise<OptionsParseResult> {\n\tconst defaults = createOptionDefaults(promptedOptions);\n\tconst { values } = parseArgs({\n\t\targs,\n\t\toptions: allArgOptions,\n\t\tstrict: false,\n\t\ttokens: true,\n\t});\n\n\tconst mappedOptions = {\n\t\taccess: values.access,\n\t\tauthor: values.author,\n\t\tbase: values.base,\n\t\tdescription: values.description,\n\t\tdirectory: values.directory,\n\t\temail:\n\t\t\tvalues.email ?? values[\"email-github\"] ?? values[\"email-npm\"]\n\t\t\t\t? {\n\t\t\t\t\t\tgithub: values.email ?? values[\"email-github\"],\n\t\t\t\t\t\tnpm: values.email ?? values[\"email-npm\"],\n\t\t\t\t }\n\t\t\t\t: undefined,\n\t\texcludeAllContributors: values[\"exclude-all-contributors\"],\n\t\texcludeCompliance: values[\"exclude-compliance\"],\n\t\texcludeLintDeprecation: values[\"exclude-lint-deprecation\"],\n\t\texcludeLintESLint: values[\"exclude-lint-eslint\"],\n\t\texcludeLintJSDoc: values[\"exclude-lint-jsdoc\"],\n\t\texcludeLintJson: values[\"exclude-lint-json\"],\n\t\texcludeLintKnip: values[\"exclude-lint-knip\"],\n\t\texcludeLintMd: values[\"exclude-lint-md\"],\n\t\texcludeLintPackageJson: values[\"exclude-lint-package-json\"],\n\t\texcludeLintPackages: values[\"exclude-lint-packages\"],\n\t\texcludeLintPerfectionist: values[\"exclude-lint-perfectionist\"],\n\t\texcludeLintRegex: values[\"exclude-lint-regex\"],\n\t\texcludeLintSpelling: values[\"exclude-lint-spelling\"],\n\t\texcludeLintStrict: values[\"exclude-lint-strict\"],\n\t\texcludeLintYml: values[\"exclude-lint-yml\"],\n\t\texcludeReleases: values[\"exclude-releases\"],\n\t\texcludeRenovate: values[\"exclude-renovate\"],\n\t\texcludeTests: values[\"unit-tests\"],\n\t\tfunding: values.funding,\n\t\toffline: values.offline,\n\t\towner: values.owner,\n\t\tpreserveGeneratedFrom:\n\t\t\tvalues[\"preserve-generated-from\"] ?? values.owner === \"JoshuaKGoldberg\",\n\t\trepository: values.repository,\n\t\tskipAllContributorsApi:\n\t\t\tvalues[\"skip-all-contributors-api\"] ?? values.offline,\n\t\tskipGitHubApi: values[\"skip-github-api\"] ?? values.offline,\n\t\tskipInstall: values[\"skip-install\"],\n\t\tskipRemoval: values[\"skip-removal\"],\n\t\tskipRestore: values[\"skip-restore\"],\n\t\tskipUninstall: values[\"skip-uninstall\"],\n\t\ttitle: values.title,\n\t};\n\n\tconst emailError = detectEmailRedundancy(values);\n\tif (emailError) {\n\t\treturn {\n\t\t\tcancelled: true,\n\t\t\terror: emailError,\n\t\t\toptions: mappedOptions,\n\t\t};\n\t}\n\n\tconst optionsParseResult = optionsSchema.safeParse(mappedOptions);\n\n\tif (!optionsParseResult.success) {\n\t\treturn {\n\t\t\tcancelled: true,\n\t\t\terror: optionsParseResult.error,\n\t\t\toptions: mappedOptions,\n\t\t};\n\t}\n\n\tconst options = optionsParseResult.data;\n\n\toptions.owner ??= await getPrefillOrPromptedOption(\n\t\t\"What organization or user will the repository be under?\",\n\t\tdefaults.owner,\n\t);\n\tif (!options.owner) {\n\t\treturn {\n\t\t\tcancelled: true,\n\t\t\toptions,\n\t\t};\n\t}\n\n\toptions.repository ??= await getPrefillOrPromptedOption(\n\t\t\"What will the kebab-case name of the repository be?\",\n\t\tdefaults.repository,\n\t);\n\tif (!options.repository) {\n\t\treturn {\n\t\t\tcancelled: true,\n\t\t\toptions,\n\t\t};\n\t}\n\n\tconst { github, repository } = await ensureRepositoryExists(\n\t\toptions.skipGitHubApi\n\t\t\t? undefined\n\t\t\t: await withSpinner(\"Checking GitHub authentication\", getGitHub),\n\t\t{\n\t\t\tmode,\n\t\t\towner: options.owner,\n\t\t\trepository: options.repository,\n\t\t},\n\t);\n\tif (!repository) {\n\t\treturn { cancelled: true, options };\n\t}\n\n\toptions.description ??= await getPrefillOrPromptedOption(\n\t\t\"How would you describe the new package?\",\n\t\tasync () =>\n\t\t\t(await defaults.description()) ?? \"A very lovely package. Hooray!\",\n\t);\n\tif (!options.description) {\n\t\treturn { cancelled: true, options };\n\t}\n\n\toptions.title ??= await getPrefillOrPromptedOption(\n\t\t\"What will the Title Case title of the repository be?\",\n\t\tasync () =>\n\t\t\t(await defaults.title()) ?? titleCase(repository).replaceAll(\"-\", \" \"),\n\t);\n\tif (!options.title) {\n\t\treturn { cancelled: true, options };\n\t}\n\n\tlet logo: OptionsLogo | undefined;\n\n\tif (options.logo) {\n\t\tconst alt =\n\t\t\toptions.logoAlt ??\n\t\t\t(await getPrefillOrPromptedOption(\n\t\t\t\t\"What is the alt text (non-visual description) of the logo?\",\n\t\t\t));\n\t\tif (!alt) {\n\t\t\treturn { cancelled: true, options };\n\t\t}\n\n\t\tlogo = { alt, src: options.logo };\n\t}\n\n\tconst email =\n\t\toptions.email ??\n\t\t(await defaults.email()) ??\n\t\t(await getPrefillOrPromptedOption(\n\t\t\t\"What email should be used in package.json and .md files?\",\n\t\t));\n\tif (!email) {\n\t\treturn { cancelled: true, options };\n\t}\n\n\tconst augmentedOptions = await augmentOptionsWithExcludes({\n\t\t...options,\n\t\taccess: options.access ?? \"public\",\n\t\tauthor: options.author ?? (await defaults.owner()),\n\t\tdescription: options.description,\n\t\tdirectory:\n\t\t\toptions.directory ?? promptedOptions.directory ?? options.repository,\n\t\temail: typeof email === \"string\" ? { github: email, npm: email } : email,\n\t\tfunding: options.funding ?? (await defaults.funding()),\n\t\tlogo,\n\t\tmode,\n\t\towner: options.owner,\n\t\trepository,\n\t\ttitle: options.title,\n\t});\n\n\tif (!augmentedOptions) {\n\t\treturn {\n\t\t\tcancelled: true,\n\t\t\toptions,\n\t\t};\n\t}\n\n\treturn {\n\t\tcancelled: false,\n\t\tgithub,\n\t\toptions: augmentedOptions,\n\t};\n}\n"],"mappings":"AAAA,SAAS,iBAAiB;AAC1B,SAAS,iBAAiB;AAG1B,SAAS,mBAAmB;AAG5B,SAAS,qBAAqB;AAC9B,SAAS,kCAAkC;AAC3C,SAAS,4BAA4B;AACrC,SAAS,6BAA6B;AACtC,SAAS,8BAA8B;AACvC,SAAiB,iBAAiB;AAClC,SAAS,kCAAkC;AAC3C,SAAS,qBAAqB;AAmB9B,eAAsB,YACrB,MACA,MACA,kBAAmC,CAAC,GACN;AAC9B,QAAM,WAAW,qBAAqB,eAAe;AACrD,QAAM,EAAE,OAAO,IAAI,UAAU;AAAA,IAC5B;AAAA,IACA,SAAS;AAAA,IACT,QAAQ;AAAA,IACR,QAAQ;AAAA,EACT,CAAC;AAED,QAAM,gBAAgB;AAAA,IACrB,QAAQ,OAAO;AAAA,IACf,QAAQ,OAAO;AAAA,IACf,MAAM,OAAO;AAAA,IACb,aAAa,OAAO;AAAA,IACpB,WAAW,OAAO;AAAA,IAClB,OACC,OAAO,SAAS,OAAO,cAAc,KAAK,OAAO,WAAW,IACzD;AAAA,MACA,QAAQ,OAAO,SAAS,OAAO,cAAc;AAAA,MAC7C,KAAK,OAAO,SAAS,OAAO,WAAW;AAAA,IACvC,IACA;AAAA,IACJ,wBAAwB,OAAO,0BAA0B;AAAA,IACzD,mBAAmB,OAAO,oBAAoB;AAAA,IAC9C,wBAAwB,OAAO,0BAA0B;AAAA,IACzD,mBAAmB,OAAO,qBAAqB;AAAA,IAC/C,kBAAkB,OAAO,oBAAoB;AAAA,IAC7C,iBAAiB,OAAO,mBAAmB;AAAA,IAC3C,iBAAiB,OAAO,mBAAmB;AAAA,IAC3C,eAAe,OAAO,iBAAiB;AAAA,IACvC,wBAAwB,OAAO,2BAA2B;AA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QAAQ,QAAQ,UAAW,MAAM,SAAS,MAAM;AAAA,IAChD,aAAa,QAAQ;AAAA,IACrB,WACC,QAAQ,aAAa,gBAAgB,aAAa,QAAQ;AAAA,IAC3D,OAAO,OAAO,UAAU,WAAW,EAAE,QAAQ,OAAO,KAAK,MAAM,IAAI;AAAA,IACnE,SAAS,QAAQ,WAAY,MAAM,SAAS,QAAQ;AAAA,IACpD;AAAA,IACA;AAAA,IACA,OAAO,QAAQ;AAAA,IACf;AAAA,IACA,OAAO,QAAQ;AAAA,EAChB,CAAC;AAED,MAAI,CAAC,kBAAkB;AACtB,WAAO;AAAA,MACN,WAAW;AAAA,MACX;AAAA,IACD;AAAA,EACD;AAEA,SAAO;AAAA,IACN,WAAW;AAAA,IACX;AAAA,IACA,SAAS;AAAA,EACV;AACD;","names":[]}
@@ -68,6 +68,7 @@ interface Options {
68
68
  mode: Mode;
69
69
  offline?: boolean;
70
70
  owner: string;
71
+ preserveGeneratedFrom?: boolean;
71
72
  repository: string;
72
73
  skipAllContributorsApi?: boolean;
73
74
  skipGitHubApi?: boolean;
@@ -1,4 +1,5 @@
1
1
  declare const endOfReadmeNotice: string;
2
+ declare const endOfReadmeMatcher: RegExp;
2
3
  declare function updateReadme(): Promise<void>;
3
4
 
4
- export { endOfReadmeNotice, updateReadme };
5
+ export { endOfReadmeMatcher, endOfReadmeNotice, updateReadme };
@@ -1,21 +1,22 @@
1
1
  import fs from "node:fs/promises";
2
2
  import { EOL } from "node:os";
3
3
  import { readFileSafe } from "../shared/readFileSafe.js";
4
- const detectionLine = `<!-- You can remove this notice if you don't want it \u{1F642} no worries! -->`;
5
4
  const endOfReadmeNotice = [
6
5
  ``,
7
- detectionLine,
6
+ `<!-- You can remove this notice if you don't want it \u{1F642} no worries! -->`,
8
7
  ``,
9
- `> \u{1F499} This package is based on [@JoshuaKGoldberg](https://github.com/JoshuaKGoldberg)'s [create-typescript-app](https://github.com/JoshuaKGoldberg/create-typescript-app).`,
8
+ `> \u{1F499} This package was templated with [create-typescript-app](https://github.com/JoshuaKGoldberg/create-typescript-app).`,
10
9
  ``
11
10
  ].join(EOL);
11
+ const endOfReadmeMatcher = /💙.+(?:based|built|templated).+(?:from|using|on|with).+create-typescript-app/;
12
12
  async function updateReadme() {
13
13
  const contents = await readFileSafe("./README.md", "");
14
- if (!contents.includes(detectionLine)) {
14
+ if (!endOfReadmeMatcher.test(contents)) {
15
15
  await fs.appendFile("./README.md", endOfReadmeNotice);
16
16
  }
17
17
  }
18
18
  export {
19
+ endOfReadmeMatcher,
19
20
  endOfReadmeNotice,
20
21
  updateReadme
21
22
  };
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/steps/updateReadme.ts"],"sourcesContent":["import fs from \"node:fs/promises\";\nimport { EOL } from \"node:os\";\n\nimport { readFileSafe } from \"../shared/readFileSafe.js\";\n\nconst detectionLine = `<!-- You can remove this notice if you don't want it 🙂 no worries! -->`;\n\nexport const endOfReadmeNotice = [\n\t``,\n\tdetectionLine,\n\t``,\n\t`> 💙 This package is based on [@JoshuaKGoldberg](https://github.com/JoshuaKGoldberg)'s [create-typescript-app](https://github.com/JoshuaKGoldberg/create-typescript-app).`,\n\t``,\n].join(EOL);\n\nexport async function updateReadme() {\n\tconst contents = await readFileSafe(\"./README.md\", \"\");\n\n\tif (!contents.includes(detectionLine)) {\n\t\tawait fs.appendFile(\"./README.md\", endOfReadmeNotice);\n\t}\n}\n"],"mappings":"AAAA,OAAO,QAAQ;AACf,SAAS,WAAW;AAEpB,SAAS,oBAAoB;AAE7B,MAAM,gBAAgB;AAEf,MAAM,oBAAoB;AAAA,EAChC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACD,EAAE,KAAK,GAAG;AAEV,eAAsB,eAAe;AACpC,QAAM,WAAW,MAAM,aAAa,eAAe,EAAE;AAErD,MAAI,CAAC,SAAS,SAAS,aAAa,GAAG;AACtC,UAAM,GAAG,WAAW,eAAe,iBAAiB;AAAA,EACrD;AACD;","names":[]}
1
+ {"version":3,"sources":["../../src/steps/updateReadme.ts"],"sourcesContent":["import fs from \"node:fs/promises\";\nimport { EOL } from \"node:os\";\n\nimport { readFileSafe } from \"../shared/readFileSafe.js\";\n\nexport const endOfReadmeNotice = [\n\t``,\n\t`<!-- You can remove this notice if you don't want it 🙂 no worries! -->`,\n\t``,\n\t`> 💙 This package was templated with [create-typescript-app](https://github.com/JoshuaKGoldberg/create-typescript-app).`,\n\t``,\n].join(EOL);\n\nexport const endOfReadmeMatcher =\n\t/💙.+(?:based|built|templated).+(?:from|using|on|with).+create-typescript-app/;\n\nexport async function updateReadme() {\n\tconst contents = await readFileSafe(\"./README.md\", \"\");\n\n\tif (!endOfReadmeMatcher.test(contents)) {\n\t\tawait fs.appendFile(\"./README.md\", endOfReadmeNotice);\n\t}\n}\n"],"mappings":"AAAA,OAAO,QAAQ;AACf,SAAS,WAAW;AAEpB,SAAS,oBAAoB;AAEtB,MAAM,oBAAoB;AAAA,EAChC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACD,EAAE,KAAK,GAAG;AAEH,MAAM,qBACZ;AAED,eAAsB,eAAe;AACpC,QAAM,WAAW,MAAM,aAAa,eAAe,EAAE;AAErD,MAAI,CAAC,mBAAmB,KAAK,QAAQ,GAAG;AACvC,UAAM,GAAG,WAAW,eAAe,iBAAiB;AAAA,EACrD;AACD;","names":[]}
@@ -1,6 +1,6 @@
1
1
  import fs from "node:fs/promises";
2
2
  import { readFileSafe } from "../../shared/readFileSafe.js";
3
- import { endOfReadmeNotice } from "../updateReadme.js";
3
+ import { endOfReadmeMatcher, endOfReadmeNotice } from "../updateReadme.js";
4
4
  import { findExistingBadges } from "./findExistingBadges.js";
5
5
  import { findIntroSectionClose } from "./findIntroSectionClose.js";
6
6
  import { generateTopContent } from "./generateTopContent.js";
@@ -33,7 +33,7 @@ async function writeReadme(options) {
33
33
  [
34
34
  generateTopContent(options, []),
35
35
  allContributorsContent,
36
- endOfReadmeNotice
36
+ endOfReadmeNotice.slice(1)
37
37
  ].filter(Boolean).join("\n\n")
38
38
  );
39
39
  return;
@@ -46,8 +46,8 @@ async function writeReadme(options) {
46
46
  if (allContributorsContent && !contents.includes(contributorsIndicator)) {
47
47
  contents = [contents, allContributorsContent].join("\n\n");
48
48
  }
49
- if (!contents.includes(endOfReadmeNotice)) {
50
- contents = [contents, endOfReadmeNotice].join("\n\n");
49
+ if (!endOfReadmeMatcher.test(contents)) {
50
+ contents = [contents, endOfReadmeNotice].join("\n");
51
51
  }
52
52
  await fs.writeFile("README.md", contents);
53
53
  }
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/steps/writeReadme/index.ts"],"sourcesContent":["import fs from \"node:fs/promises\";\n\nimport { readFileSafe } from \"../../shared/readFileSafe.js\";\nimport { Options } from \"../../shared/types.js\";\nimport { endOfReadmeNotice } from \"../updateReadme.js\";\nimport { findExistingBadges } from \"./findExistingBadges.js\";\nimport { findIntroSectionClose } from \"./findIntroSectionClose.js\";\nimport { generateTopContent } from \"./generateTopContent.js\";\n\nconst contributorsIndicator = `<!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section -->`;\n\nfunction generateAllContributorsContent(options: Options) {\n\treturn [\n\t\t`## Contributors`,\n\t\t``,\n\t\t`<!-- spellchecker: disable -->`,\n\t\tcontributorsIndicator,\n\t\t`<!-- prettier-ignore-start -->`,\n\t\t!options.excludeLintMd && `<!-- markdownlint-disable -->`,\n\t\t`<table>`,\n\t\t`<!-- (this will be filled in by all-contributors) -->`,\n\t\t`</table>`,\n\t\t``,\n\t\t!options.excludeLintMd && `<!-- markdownlint-restore -->`,\n\t\t`<!-- prettier-ignore-end -->`,\n\t\t``,\n\t\t`<!-- ALL-CONTRIBUTORS-LIST:END -->`,\n\t\t`<!-- spellchecker: enable -->`,\n\t]\n\t\t.filter(Boolean)\n\t\t.join(\"\\n\");\n}\n\nexport async function writeReadme(options: Options) {\n\tconst allContributorsContent =\n\t\t!options.excludeAllContributors && generateAllContributorsContent(options);\n\tlet contents = await readFileSafe(\"README.md\", \"\");\n\tif (!contents) {\n\t\tawait fs.writeFile(\n\t\t\t\"README.md\",\n\t\t\t[\n\t\t\t\tgenerateTopContent(options, []),\n\t\t\t\tallContributorsContent,\n\t\t\t\tendOfReadmeNotice,\n\t\t\t]\n\t\t\t\t.filter(Boolean)\n\t\t\t\t.join(\"\\n\\n\"),\n\t\t);\n\t\treturn;\n\t}\n\n\tconst endOfIntroSection = findIntroSectionClose(contents);\n\n\tcontents = [\n\t\tgenerateTopContent(options, findExistingBadges(contents)),\n\t\tcontents.slice(endOfIntroSection),\n\t]\n\t\t.join(\"\")\n\t\t.replace(/\\[!\\[.+\\]\\(.+\\)\\]\\(.+\\)/g, \"\")\n\t\t.replace(/!\\[.+\\]\\(.+\\)/g, \"\")\n\t\t.replaceAll(\"\\r\", \"\")\n\t\t.replaceAll(\"\\n\\n\\n\", \"\\n\\n\");\n\n\tif (allContributorsContent && !contents.includes(contributorsIndicator)) {\n\t\tcontents = [contents, allContributorsContent].join(\"\\n\\n\");\n\t}\n\n\tif (!contents.includes(endOfReadmeNotice)) {\n\t\tcontents = [contents, endOfReadmeNotice].join(\"\\n\\n\");\n\t}\n\n\tawait fs.writeFile(\"README.md\", contents);\n}\n"],"mappings":"AAAA,OAAO,QAAQ;AAEf,SAAS,oBAAoB;AAE7B,SAAS,yBAAyB;AAClC,SAAS,0BAA0B;AACnC,SAAS,6BAA6B;AACtC,SAAS,0BAA0B;AAEnC,MAAM,wBAAwB;AAE9B,SAAS,+BAA+B,SAAkB;AACzD,SAAO;AAAA,IACN;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA,CAAC,QAAQ,iBAAiB;AAAA,IAC1B;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA,CAAC,QAAQ,iBAAiB;AAAA,IAC1B;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACD,EACE,OAAO,OAAO,EACd,KAAK,IAAI;AACZ;AAEA,eAAsB,YAAY,SAAkB;AACnD,QAAM,yBACL,CAAC,QAAQ,0BAA0B,+BAA+B,OAAO;AAC1E,MAAI,WAAW,MAAM,aAAa,aAAa,EAAE;AACjD,MAAI,CAAC,UAAU;AACd,UAAM,GAAG;AAAA,MACR;AAAA,MACA;AAAA,QACC,mBAAmB,SAAS,CAAC,CAAC;AAAA,QAC9B;AAAA,QACA;AAAA,MACD,EACE,OAAO,OAAO,EACd,KAAK,MAAM;AAAA,IACd;AACA;AAAA,EACD;AAEA,QAAM,oBAAoB,sBAAsB,QAAQ;AAExD,aAAW;AAAA,IACV,mBAAmB,SAAS,mBAAmB,QAAQ,CAAC;AAAA,IACxD,SAAS,MAAM,iBAAiB;AAAA,EACjC,EACE,KAAK,EAAE,EACP,QAAQ,4BAA4B,EAAE,EACtC,QAAQ,kBAAkB,EAAE,EAC5B,WAAW,MAAM,EAAE,EACnB,WAAW,UAAU,MAAM;AAE7B,MAAI,0BAA0B,CAAC,SAAS,SAAS,qBAAqB,GAAG;AACxE,eAAW,CAAC,UAAU,sBAAsB,EAAE,KAAK,MAAM;AAAA,EAC1D;AAEA,MAAI,CAAC,SAAS,SAAS,iBAAiB,GAAG;AAC1C,eAAW,CAAC,UAAU,iBAAiB,EAAE,KAAK,MAAM;AAAA,EACrD;AAEA,QAAM,GAAG,UAAU,aAAa,QAAQ;AACzC;","names":[]}
1
+ {"version":3,"sources":["../../../src/steps/writeReadme/index.ts"],"sourcesContent":["import fs from \"node:fs/promises\";\n\nimport { readFileSafe } from \"../../shared/readFileSafe.js\";\nimport { Options } from \"../../shared/types.js\";\nimport { endOfReadmeMatcher, endOfReadmeNotice } from \"../updateReadme.js\";\nimport { findExistingBadges } from \"./findExistingBadges.js\";\nimport { findIntroSectionClose } from \"./findIntroSectionClose.js\";\nimport { generateTopContent } from \"./generateTopContent.js\";\n\nconst contributorsIndicator = `<!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section -->`;\n\nfunction generateAllContributorsContent(options: Options) {\n\treturn [\n\t\t`## Contributors`,\n\t\t``,\n\t\t`<!-- spellchecker: disable -->`,\n\t\tcontributorsIndicator,\n\t\t`<!-- prettier-ignore-start -->`,\n\t\t!options.excludeLintMd && `<!-- markdownlint-disable -->`,\n\t\t`<table>`,\n\t\t`<!-- (this will be filled in by all-contributors) -->`,\n\t\t`</table>`,\n\t\t``,\n\t\t!options.excludeLintMd && `<!-- markdownlint-restore -->`,\n\t\t`<!-- prettier-ignore-end -->`,\n\t\t``,\n\t\t`<!-- ALL-CONTRIBUTORS-LIST:END -->`,\n\t\t`<!-- spellchecker: enable -->`,\n\t]\n\t\t.filter(Boolean)\n\t\t.join(\"\\n\");\n}\n\nexport async function writeReadme(options: Options) {\n\tconst allContributorsContent =\n\t\t!options.excludeAllContributors && generateAllContributorsContent(options);\n\tlet contents = await readFileSafe(\"README.md\", \"\");\n\tif (!contents) {\n\t\tawait fs.writeFile(\n\t\t\t\"README.md\",\n\t\t\t[\n\t\t\t\tgenerateTopContent(options, []),\n\t\t\t\tallContributorsContent,\n\t\t\t\tendOfReadmeNotice.slice(1),\n\t\t\t]\n\t\t\t\t.filter(Boolean)\n\t\t\t\t.join(\"\\n\\n\"),\n\t\t);\n\t\treturn;\n\t}\n\n\tconst endOfIntroSection = findIntroSectionClose(contents);\n\n\tcontents = [\n\t\tgenerateTopContent(options, findExistingBadges(contents)),\n\t\tcontents.slice(endOfIntroSection),\n\t]\n\t\t.join(\"\")\n\t\t.replace(/\\[!\\[.+\\]\\(.+\\)\\]\\(.+\\)/g, \"\")\n\t\t.replace(/!\\[.+\\]\\(.+\\)/g, \"\")\n\t\t.replaceAll(\"\\r\", \"\")\n\t\t.replaceAll(\"\\n\\n\\n\", \"\\n\\n\");\n\n\tif (allContributorsContent && !contents.includes(contributorsIndicator)) {\n\t\tcontents = [contents, allContributorsContent].join(\"\\n\\n\");\n\t}\n\n\tif (!endOfReadmeMatcher.test(contents)) {\n\t\tcontents = [contents, endOfReadmeNotice].join(\"\\n\");\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MAAI,CAAC,mBAAmB,KAAK,QAAQ,GAAG;AACvC,eAAW,CAAC,UAAU,iBAAiB,EAAE,KAAK,IAAI;AAAA,EACnD;AAEA,QAAM,GAAG,UAAU,aAAa,QAAQ;AACzC;","names":[]}
@@ -69,6 +69,8 @@ ESLint can be run with \`--fix\` to auto-fix some lint rule complaints:`}
69
69
  pnpm run lint --fix
70
70
  \`\`\`
71
71
 
72
+ Note that you'll likely need to run \`pnpm build\` before \`pnpm lint\` so that lint rules which check the file system can pick up on any built files.
73
+
72
74
  ${!options.excludeTests && `## Testing
73
75
 
74
76
  [Vitest](https://vitest.dev) is used for tests.
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../src/steps/writing/creation/dotGitHub/createDevelopment.ts"],"sourcesContent":["import { Options } from \"../../../../shared/types.js\";\n\nexport function createDevelopment(options: Options) {\n\tconst lintLines = [\n\t\t!options.excludeLintKnip &&\n\t\t\t`- \\`pnpm lint:knip\\` ([knip](https://github.com/webpro/knip)): Detects unused files, dependencies, and code exports`,\n\t\t!options.excludeLintMd &&\n\t\t\t`- \\`pnpm lint:md\\` ([Markdownlint](https://github.com/DavidAnson/markdownlint)): Checks Markdown source files`,\n\t\t!options.excludeLintPackageJson &&\n\t\t\t`- \\`pnpm lint:package-json\\` ([npm-package-json-lint](https://npmpackagejsonlint.org/)): Lints the \\`package.json\\` file`,\n\t\t!options.excludeLintPackages &&\n\t\t\t`- \\`pnpm lint:packages\\` ([pnpm dedupe --check](https://pnpm.io/cli/dedupe)): Checks for unnecessarily duplicated packages in the \\`pnpm-lock.yml\\` file`,\n\t\t!options.excludeLintSpelling &&\n\t\t\t`- \\`pnpm lint:spelling\\` ([cspell](https://cspell.org)): Spell checks across all source files`,\n\t].filter(Boolean);\n\n\treturn `# Development\n\nAfter [forking the repo from GitHub](https://help.github.com/articles/fork-a-repo) and [installing pnpm](https://pnpm.io/installation):\n\n\\`\\`\\`shell\ngit clone https://github.com/<your-name-here>/${options.repository}\ncd ${options.repository}\npnpm install\n\\`\\`\\`\n\n> This repository includes a list of suggested VS Code extensions.\n> It's a good idea to use [VS Code](https://code.visualstudio.com) and accept its suggestion to install them, as they'll help with development.\n\n## Building\n\nRun [**tsup**](https://tsup.egoist.dev) locally to build source files from \\`src/\\` into output files in \\`lib/\\`:\n\n\\`\\`\\`shell\npnpm build\n\\`\\`\\`\n\nAdd \\`--watch\\` to run the builder in a watch mode that continuously cleans and recreates \\`lib/\\` as you save files:\n\n\\`\\`\\`shell\npnpm build --watch\n\\`\\`\\`\n\n## Formatting\n\n[Prettier](https://prettier.io) is used to format code.\nIt should be applied automatically when you save files in VS Code or make a Git commit.\n\nTo manually reformat all files, you can run:\n\n\\`\\`\\`shell\npnpm format --write\n\\`\\`\\`\n\n## Linting\n\n${\n\tlintLines.length\n\t\t? [\n\t\t\t\t`This package includes several forms of linting to enforce consistent code quality and styling.`,\n\t\t\t\t`Each should be shown in VS Code, and can be run manually on the command-line:`,\n\t\t\t\t``,\n\t\t\t\t`- \\`pnpm lint\\` ([ESLint](https://eslint.org) with [typescript-eslint](https://typescript-eslint.io)): Lints JavaScript and TypeScript source files`,\n\t\t\t\t...lintLines,\n\t\t\t\t``,\n\t\t\t\t`Read the individual documentation for each linter to understand how it can be configured and used best.`,\n\t\t\t\t``,\n\t\t\t\t`For example, ESLint can be run with \\`--fix\\` to auto-fix some lint rule complaints:`,\n\t\t ].join(\"\\n\")\n\t\t: `[ESLint](https://eslint.org) is used with with [typescript-eslint](https://typescript-eslint.io)) to lint JavaScript and TypeScript source files.\nYou can run it locally on the command-line:\n\n\\`\\`\\`shell\npnpm run lint\n\\`\\`\\`\n\nESLint can be run with \\`--fix\\` to auto-fix some lint rule complaints:`\n}\n\n\\`\\`\\`shell\npnpm run lint --fix\n\\`\\`\\`\n\n${\n\t!options.excludeTests &&\n\t`## Testing\n\n[Vitest](https://vitest.dev) is used for tests.\nYou can run it locally on the command-line:\n\n\\`\\`\\`shell\npnpm run test\n\\`\\`\\`\n\nAdd the \\`--coverage\\` flag to compute test coverage and place reports in the \\`coverage/\\` directory:\n\n\\`\\`\\`shell\npnpm run test --coverage\n\\`\\`\\`\n\nNote that [console-fail-test](https://github.com/JoshuaKGoldberg/console-fail-test) is enabled for all test runs.\nCalls to \\`console.log\\`, \\`console.warn\\`, and other console methods will cause a test to fail.\n\n### Debugging Tests\n\nThis repository includes a [VS Code launch configuration](https://code.visualstudio.com/docs/editor/debugging) for debugging unit tests.\nTo launch it, open a test file, then run _Debug Current Test File_ from the VS Code Debug panel (or press F5).\n`\n}\n## Type Checking\n\nYou should be able to see suggestions from [TypeScript](https://typescriptlang.org) in your editor for all open files.\n\nHowever, it can be useful to run the TypeScript command-line (\\`tsc\\`) to type check all files in \\`src/\\`:\n\n\\`\\`\\`shell\npnpm tsc\n\\`\\`\\`\n\nAdd \\`--watch\\` to keep the type checker running in a watch mode that updates the display as you save files:\n\n\\`\\`\\`shell\npnpm tsc --watch\n\\`\\`\\`\n`;\n}\n"],"mappings":"AAEO,SAAS,kBAAkB,SAAkB;AACnD,QAAM,YAAY;AAAA,IACjB,CAAC,QAAQ,mBACR;AAAA,IACD,CAAC,QAAQ,iBACR;AAAA,IACD,CAAC,QAAQ,0BACR;AAAA,IACD,CAAC,QAAQ,uBACR;AAAA,IACD,CAAC,QAAQ,uBACR;AAAA,EACF,EAAE,OAAO,OAAO;AAEhB,SAAO;AAAA;AAAA;AAAA;AAAA;AAAA,gDAKwC,QAAQ,UAAU;AAAA,KAC7D,QAAQ,UAAU;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAmCtB,UAAU,SACP;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA,GAAG;AAAA,IACH;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACA,EAAE,KAAK,IAAI,IACX;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,wEAQJ;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAOC,CAAC,QAAQ,gBACT;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,CAuBD;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAiBA;","names":[]}
1
+ {"version":3,"sources":["../../../../../src/steps/writing/creation/dotGitHub/createDevelopment.ts"],"sourcesContent":["import { Options } from \"../../../../shared/types.js\";\n\nexport function createDevelopment(options: Options) {\n\tconst lintLines = [\n\t\t!options.excludeLintKnip &&\n\t\t\t`- \\`pnpm lint:knip\\` ([knip](https://github.com/webpro/knip)): Detects unused files, dependencies, and code exports`,\n\t\t!options.excludeLintMd &&\n\t\t\t`- \\`pnpm lint:md\\` ([Markdownlint](https://github.com/DavidAnson/markdownlint)): Checks Markdown source files`,\n\t\t!options.excludeLintPackageJson &&\n\t\t\t`- \\`pnpm lint:package-json\\` ([npm-package-json-lint](https://npmpackagejsonlint.org/)): Lints the \\`package.json\\` file`,\n\t\t!options.excludeLintPackages &&\n\t\t\t`- \\`pnpm lint:packages\\` ([pnpm dedupe --check](https://pnpm.io/cli/dedupe)): Checks for unnecessarily duplicated packages in the \\`pnpm-lock.yml\\` file`,\n\t\t!options.excludeLintSpelling &&\n\t\t\t`- \\`pnpm lint:spelling\\` ([cspell](https://cspell.org)): Spell checks across all source files`,\n\t].filter(Boolean);\n\n\treturn `# Development\n\nAfter [forking the repo from GitHub](https://help.github.com/articles/fork-a-repo) and [installing pnpm](https://pnpm.io/installation):\n\n\\`\\`\\`shell\ngit clone https://github.com/<your-name-here>/${options.repository}\ncd ${options.repository}\npnpm install\n\\`\\`\\`\n\n> This repository includes a list of suggested VS Code extensions.\n> It's a good idea to use [VS Code](https://code.visualstudio.com) and accept its suggestion to install them, as they'll help with development.\n\n## Building\n\nRun [**tsup**](https://tsup.egoist.dev) locally to build source files from \\`src/\\` into output files in \\`lib/\\`:\n\n\\`\\`\\`shell\npnpm build\n\\`\\`\\`\n\nAdd \\`--watch\\` to run the builder in a watch mode that continuously cleans and recreates \\`lib/\\` as you save files:\n\n\\`\\`\\`shell\npnpm build --watch\n\\`\\`\\`\n\n## Formatting\n\n[Prettier](https://prettier.io) is used to format code.\nIt should be applied automatically when you save files in VS Code or make a Git commit.\n\nTo manually reformat all files, you can run:\n\n\\`\\`\\`shell\npnpm format --write\n\\`\\`\\`\n\n## Linting\n\n${\n\tlintLines.length\n\t\t? [\n\t\t\t\t`This package includes several forms of linting to enforce consistent code quality and styling.`,\n\t\t\t\t`Each should be shown in VS Code, and can be run manually on the command-line:`,\n\t\t\t\t``,\n\t\t\t\t`- \\`pnpm lint\\` ([ESLint](https://eslint.org) with [typescript-eslint](https://typescript-eslint.io)): Lints JavaScript and TypeScript source files`,\n\t\t\t\t...lintLines,\n\t\t\t\t``,\n\t\t\t\t`Read the individual documentation for each linter to understand how it can be configured and used best.`,\n\t\t\t\t``,\n\t\t\t\t`For example, ESLint can be run with \\`--fix\\` to auto-fix some lint rule complaints:`,\n\t\t ].join(\"\\n\")\n\t\t: `[ESLint](https://eslint.org) is used with with [typescript-eslint](https://typescript-eslint.io)) to lint JavaScript and TypeScript source files.\nYou can run it locally on the command-line:\n\n\\`\\`\\`shell\npnpm run lint\n\\`\\`\\`\n\nESLint can be run with \\`--fix\\` to auto-fix some lint rule complaints:`\n}\n\n\\`\\`\\`shell\npnpm run lint --fix\n\\`\\`\\`\n\nNote that you'll likely need to run \\`pnpm build\\` before \\`pnpm lint\\` so that lint rules which check the file system can pick up on any built files.\n\n${\n\t!options.excludeTests &&\n\t`## Testing\n\n[Vitest](https://vitest.dev) is used for tests.\nYou can run it locally on the command-line:\n\n\\`\\`\\`shell\npnpm run test\n\\`\\`\\`\n\nAdd the \\`--coverage\\` flag to compute test coverage and place reports in the \\`coverage/\\` directory:\n\n\\`\\`\\`shell\npnpm run test --coverage\n\\`\\`\\`\n\nNote that [console-fail-test](https://github.com/JoshuaKGoldberg/console-fail-test) is enabled for all test runs.\nCalls to \\`console.log\\`, \\`console.warn\\`, and other console methods will cause a test to fail.\n\n### Debugging Tests\n\nThis repository includes a [VS Code launch configuration](https://code.visualstudio.com/docs/editor/debugging) for debugging unit tests.\nTo launch it, open a test file, then run _Debug Current Test File_ from the VS Code Debug panel (or press F5).\n`\n}\n## Type Checking\n\nYou should be able to see suggestions from [TypeScript](https://typescriptlang.org) in your editor for all open files.\n\nHowever, it can be useful to run the TypeScript command-line (\\`tsc\\`) to type check all files in \\`src/\\`:\n\n\\`\\`\\`shell\npnpm tsc\n\\`\\`\\`\n\nAdd \\`--watch\\` to keep the type checker running in a watch mode that updates the display as you save files:\n\n\\`\\`\\`shell\npnpm tsc --watch\n\\`\\`\\`\n`;\n}\n"],"mappings":"AAEO,SAAS,kBAAkB,SAAkB;AACnD,QAAM,YAAY;AAAA,IACjB,CAAC,QAAQ,mBACR;AAAA,IACD,CAAC,QAAQ,iBACR;AAAA,IACD,CAAC,QAAQ,0BACR;AAAA,IACD,CAAC,QAAQ,uBACR;AAAA,IACD,CAAC,QAAQ,uBACR;AAAA,EACF,EAAE,OAAO,OAAO;AAEhB,SAAO;AAAA;AAAA;AAAA;AAAA;AAAA,gDAKwC,QAAQ,UAAU;AAAA,KAC7D,QAAQ,UAAU;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAmCtB,UAAU,SACP;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA,GAAG;AAAA,IACH;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACA,EAAE,KAAK,IAAI,IACX;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,wEAQJ;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EASC,CAAC,QAAQ,gBACT;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,CAuBD;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAiBA;","names":[]}
@@ -85,7 +85,7 @@ echo "See https://github.com/actions-ecosystem/action-remove-labels/issues/221."
85
85
  },
86
86
  "lint.yml": createWorkflowFile({
87
87
  name: "Lint",
88
- runs: ["pnpm lint"]
88
+ runs: ["pnpm build || true", "pnpm lint"]
89
89
  }),
90
90
  ...!options.excludeLintKnip && {
91
91
  "lint-knip.yml": createWorkflowFile({
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../src/steps/writing/creation/dotGitHub/createWorkflows.ts"],"sourcesContent":["/* spellchecker: disable */\nimport { Options } from \"../../../../shared/types.js\";\nimport { createWorkflowFile } from \"./createWorkflowFile.js\";\n\nexport function createWorkflows(options: Options) {\n\treturn {\n\t\t\"build.yml\": createWorkflowFile({\n\t\t\tname: \"Build\",\n\t\t\truns: [\"pnpm build\", \"node ./lib/index.js\"],\n\t\t}),\n\t\t\"pr-review-requested.yml\": createWorkflowFile({\n\t\t\tname: \"PR Review Requested\",\n\t\t\ton: {\n\t\t\t\tpull_request_target: {\n\t\t\t\t\ttypes: [\"review_requested\"],\n\t\t\t\t},\n\t\t\t},\n\t\t\tpermissions: {\n\t\t\t\t\"pull-requests\": \"write\",\n\t\t\t},\n\t\t\tsteps: [\n\t\t\t\t{\n\t\t\t\t\tuses: \"actions-ecosystem/action-remove-labels@v1\",\n\t\t\t\t\twith: {\n\t\t\t\t\t\tlabels: \"status: waiting for author\",\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tif: \"failure()\",\n\t\t\t\t\trun: 'echo \"Don\\'t worry if the previous step failed.\"\\necho \"See https://github.com/actions-ecosystem/action-remove-labels/issues/221.\"\\n',\n\t\t\t\t},\n\t\t\t],\n\t\t}),\n\t\t\"prettier.yml\": createWorkflowFile({\n\t\t\tname: \"Prettier\",\n\t\t\truns: [\"pnpm format --list-different\"],\n\t\t}),\n\t\t\"tsc.yml\": createWorkflowFile({\n\t\t\tname: \"Type Check\",\n\t\t\truns: [\"pnpm tsc\"],\n\t\t}),\n\t\t...(!options.excludeCompliance && {\n\t\t\t\"compliance.yml\": createWorkflowFile({\n\t\t\t\tname: \"Compliance\",\n\t\t\t\ton: {\n\t\t\t\t\tpull_request: {\n\t\t\t\t\t\tbranches: [\"main\"],\n\t\t\t\t\t\ttypes: [\"edited\", \"opened\", \"reopened\", \"synchronize\"],\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\tpermissions: {\n\t\t\t\t\t\"pull-requests\": \"write\",\n\t\t\t\t},\n\t\t\t\tsteps: [\n\t\t\t\t\t{\n\t\t\t\t\t\tuses: \"mtfoley/pr-compliance-action@main\",\n\t\t\t\t\t\twith: {\n\t\t\t\t\t\t\t\"body-auto-close\": false,\n\t\t\t\t\t\t\t\"ignore-authors\":\n\t\t\t\t\t\t\t\t[\n\t\t\t\t\t\t\t\t\t...(options.excludeAllContributors\n\t\t\t\t\t\t\t\t\t\t? []\n\t\t\t\t\t\t\t\t\t\t: [\"allcontributors\", \"allcontributors[bot]\"]),\n\t\t\t\t\t\t\t\t\t...(options.excludeRenovate\n\t\t\t\t\t\t\t\t\t\t? []\n\t\t\t\t\t\t\t\t\t\t: [\"renovate\", \"renovate[bot]\"]),\n\t\t\t\t\t\t\t\t].join(\"\\n\") || undefined,\n\t\t\t\t\t\t\t\"ignore-team-members\": false,\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\t\t...(!options.excludeAllContributors && {\n\t\t\t\"contributors.yml\": createWorkflowFile({\n\t\t\t\tname: \"Contributors\",\n\t\t\t\ton: {\n\t\t\t\t\tpush: {\n\t\t\t\t\t\tbranches: [\"main\"],\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\tsteps: [\n\t\t\t\t\t{ uses: \"actions/checkout@v4\", with: { \"fetch-depth\": 0 } },\n\t\t\t\t\t{ uses: \"./.github/actions/prepare\" },\n\t\t\t\t\t{\n\t\t\t\t\t\tenv: { GITHUB_TOKEN: \"${{ secrets.ACCESS_TOKEN }}\" },\n\t\t\t\t\t\tuses: `JoshuaKGoldberg/all-contributors-auto-action@v0.3.2`,\n\t\t\t\t\t},\n\t\t\t\t],\n\t\t\t}),\n\t\t}),\n\t\t\"lint.yml\": createWorkflowFile({\n\t\t\tname: \"Lint\",\n\t\t\truns: [\"pnpm lint\"],\n\t\t}),\n\t\t...(!options.excludeLintKnip && {\n\t\t\t\"lint-knip.yml\": createWorkflowFile({\n\t\t\t\tname: \"Lint Knip\",\n\t\t\t\truns: [\"pnpm lint:knip\"],\n\t\t\t}),\n\t\t}),\n\t\t...(!options.excludeLintMd && {\n\t\t\t\"lint-markdown.yml\": createWorkflowFile({\n\t\t\t\tname: \"Lint Markdown\",\n\t\t\t\truns: [\"pnpm lint:md\"],\n\t\t\t}),\n\t\t}),\n\t\t...(!options.excludeLintPackageJson && {\n\t\t\t\"lint-package-json.yml\": createWorkflowFile({\n\t\t\t\tname: \"Lint Package JSON\",\n\t\t\t\truns: [\"pnpm lint:package-json\"],\n\t\t\t}),\n\t\t}),\n\t\t...(!options.excludeLintPackages && {\n\t\t\t\"lint-packages.yml\": createWorkflowFile({\n\t\t\t\tname: \"Lint Packages\",\n\t\t\t\truns: [\"pnpm lint:packages\"],\n\t\t\t}),\n\t\t}),\n\t\t...(!options.excludeLintSpelling && {\n\t\t\t\"lint-spelling.yml\": createWorkflowFile({\n\t\t\t\tname: \"Lint spelling\",\n\t\t\t\truns: [\"pnpm lint:spelling\"],\n\t\t\t}),\n\t\t}),\n\t\t...(!options.excludeReleases && {\n\t\t\t\"post-release.yml\": createWorkflowFile({\n\t\t\t\tname: \"Post Release\",\n\t\t\t\ton: {\n\t\t\t\t\trelease: {\n\t\t\t\t\t\ttypes: [\"published\"],\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\tsteps: [\n\t\t\t\t\t{ uses: \"actions/checkout@v4\", with: { \"fetch-depth\": 0 } },\n\t\t\t\t\t{\n\t\t\t\t\t\trun: `echo \"npm_version=$(npm pkg get version | tr -d '\"')\" >> \"$GITHUB_ENV\"`,\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tuses: \"apexskier/github-release-commenter@v1\",\n\t\t\t\t\t\twith: {\n\t\t\t\t\t\t\tGITHUB_TOKEN: \"${{ secrets.GITHUB_TOKEN }}\",\n\t\t\t\t\t\t\t\"comment-template\": `\n\t\t\t\t\t\t\t:tada: This is included in version {release_link} :tada:\n\n\t\t\t\t\t\t\tThe release is available on:\n\t\t\t\t\n\t\t\t\t\t\t\t* [GitHub releases](https://github.com/${options.owner}/${options.repository}/releases/tag/{release_tag})\n\t\t\t\t\t\t\t* [npm package (@latest dist-tag)](https://www.npmjs.com/package/${options.repository}/v/\\${{ env.npm_version }})\n\t\t\t\t\n\t\t\t\t\t\t\tCheers! 📦🚀\n\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\t\t\t\"release.yml\": createWorkflowFile({\n\t\t\t\tconcurrency: {\n\t\t\t\t\tgroup: \"${{ github.workflow }}\",\n\t\t\t\t},\n\t\t\t\tname: \"Release\",\n\t\t\t\ton: {\n\t\t\t\t\tpush: {\n\t\t\t\t\t\tbranches: [\"main\"],\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\tpermissions: {\n\t\t\t\t\tcontents: \"write\",\n\t\t\t\t\t\"id-token\": \"write\",\n\t\t\t\t},\n\t\t\t\tsteps: [\n\t\t\t\t\t{\n\t\t\t\t\t\tuses: \"actions/checkout@v4\",\n\t\t\t\t\t\twith: {\n\t\t\t\t\t\t\t\"fetch-depth\": 0,\n\t\t\t\t\t\t\tref: \"main\",\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tuses: \"./.github/actions/prepare\",\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\trun: \"pnpm build\",\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tenv: {\n\t\t\t\t\t\t\tGITHUB_TOKEN: \"${{ secrets.ACCESS_TOKEN }}\",\n\t\t\t\t\t\t\tNPM_TOKEN: \"${{ secrets.NPM_TOKEN }}\",\n\t\t\t\t\t\t},\n\t\t\t\t\t\tuses: \"JoshuaKGoldberg/release-it-action@v0.2.2\",\n\t\t\t\t\t},\n\t\t\t\t],\n\t\t\t}),\n\t\t}),\n\t\t...(!options.excludeTests && {\n\t\t\t\"test.yml\": createWorkflowFile({\n\t\t\t\tname: \"Test\",\n\t\t\t\tsteps: [\n\t\t\t\t\t{ uses: \"actions/checkout@v4\" },\n\t\t\t\t\t{ uses: \"./.github/actions/prepare\" },\n\t\t\t\t\t{ run: \"pnpm run test --coverage\" },\n\t\t\t\t\t{\n\t\t\t\t\t\tname: \"Codecov\",\n\t\t\t\t\t\tuses: \"codecov/codecov-action@v3\",\n\t\t\t\t\t},\n\t\t\t\t],\n\t\t\t}),\n\t\t}),\n\t};\n}\n"],"mappings":"AAEA,SAAS,0BAA0B;AAE5B,SAAS,gBAAgB,SAAkB;AACjD,SAAO;AAAA,IACN,aAAa,mBAAmB;AAAA,MAC/B,MAAM;AAAA,MACN,MAAM,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AC9B,EAAE,MAAM,4BAA4B;AAAA,UACpC,EAAE,KAAK,2BAA2B;AAAA,UAClC;AAAA,YACC,MAAM;AAAA,YACN,MAAM;AAAA,UACP;AAAA,QACD;AAAA,MACD,CAAC;AAAA,IACF;AAAA,EACD;AACD;","names":[]}
1
+ {"version":3,"sources":["../../../../../src/steps/writing/creation/dotGitHub/createWorkflows.ts"],"sourcesContent":["/* spellchecker: disable */\nimport { Options } from \"../../../../shared/types.js\";\nimport { createWorkflowFile } from \"./createWorkflowFile.js\";\n\nexport function createWorkflows(options: Options) {\n\treturn {\n\t\t\"build.yml\": createWorkflowFile({\n\t\t\tname: \"Build\",\n\t\t\truns: [\"pnpm build\", \"node ./lib/index.js\"],\n\t\t}),\n\t\t\"pr-review-requested.yml\": createWorkflowFile({\n\t\t\tname: \"PR Review Requested\",\n\t\t\ton: {\n\t\t\t\tpull_request_target: {\n\t\t\t\t\ttypes: [\"review_requested\"],\n\t\t\t\t},\n\t\t\t},\n\t\t\tpermissions: {\n\t\t\t\t\"pull-requests\": \"write\",\n\t\t\t},\n\t\t\tsteps: [\n\t\t\t\t{\n\t\t\t\t\tuses: \"actions-ecosystem/action-remove-labels@v1\",\n\t\t\t\t\twith: {\n\t\t\t\t\t\tlabels: \"status: waiting for author\",\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tif: \"failure()\",\n\t\t\t\t\trun: 'echo \"Don\\'t worry if the previous step failed.\"\\necho \"See https://github.com/actions-ecosystem/action-remove-labels/issues/221.\"\\n',\n\t\t\t\t},\n\t\t\t],\n\t\t}),\n\t\t\"prettier.yml\": createWorkflowFile({\n\t\t\tname: \"Prettier\",\n\t\t\truns: [\"pnpm format --list-different\"],\n\t\t}),\n\t\t\"tsc.yml\": createWorkflowFile({\n\t\t\tname: \"Type Check\",\n\t\t\truns: [\"pnpm tsc\"],\n\t\t}),\n\t\t...(!options.excludeCompliance && {\n\t\t\t\"compliance.yml\": createWorkflowFile({\n\t\t\t\tname: \"Compliance\",\n\t\t\t\ton: {\n\t\t\t\t\tpull_request: {\n\t\t\t\t\t\tbranches: [\"main\"],\n\t\t\t\t\t\ttypes: [\"edited\", \"opened\", \"reopened\", \"synchronize\"],\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\tpermissions: {\n\t\t\t\t\t\"pull-requests\": \"write\",\n\t\t\t\t},\n\t\t\t\tsteps: [\n\t\t\t\t\t{\n\t\t\t\t\t\tuses: \"mtfoley/pr-compliance-action@main\",\n\t\t\t\t\t\twith: {\n\t\t\t\t\t\t\t\"body-auto-close\": false,\n\t\t\t\t\t\t\t\"ignore-authors\":\n\t\t\t\t\t\t\t\t[\n\t\t\t\t\t\t\t\t\t...(options.excludeAllContributors\n\t\t\t\t\t\t\t\t\t\t? []\n\t\t\t\t\t\t\t\t\t\t: [\"allcontributors\", \"allcontributors[bot]\"]),\n\t\t\t\t\t\t\t\t\t...(options.excludeRenovate\n\t\t\t\t\t\t\t\t\t\t? []\n\t\t\t\t\t\t\t\t\t\t: [\"renovate\", \"renovate[bot]\"]),\n\t\t\t\t\t\t\t\t].join(\"\\n\") || undefined,\n\t\t\t\t\t\t\t\"ignore-team-members\": false,\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\t\t...(!options.excludeAllContributors && {\n\t\t\t\"contributors.yml\": createWorkflowFile({\n\t\t\t\tname: \"Contributors\",\n\t\t\t\ton: {\n\t\t\t\t\tpush: {\n\t\t\t\t\t\tbranches: [\"main\"],\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\tsteps: [\n\t\t\t\t\t{ uses: \"actions/checkout@v4\", with: { \"fetch-depth\": 0 } },\n\t\t\t\t\t{ uses: \"./.github/actions/prepare\" },\n\t\t\t\t\t{\n\t\t\t\t\t\tenv: { GITHUB_TOKEN: \"${{ secrets.ACCESS_TOKEN }}\" },\n\t\t\t\t\t\tuses: `JoshuaKGoldberg/all-contributors-auto-action@v0.3.2`,\n\t\t\t\t\t},\n\t\t\t\t],\n\t\t\t}),\n\t\t}),\n\t\t\"lint.yml\": createWorkflowFile({\n\t\t\tname: \"Lint\",\n\t\t\truns: [\"pnpm build || true\", \"pnpm lint\"],\n\t\t}),\n\t\t...(!options.excludeLintKnip && {\n\t\t\t\"lint-knip.yml\": createWorkflowFile({\n\t\t\t\tname: \"Lint Knip\",\n\t\t\t\truns: [\"pnpm lint:knip\"],\n\t\t\t}),\n\t\t}),\n\t\t...(!options.excludeLintMd && {\n\t\t\t\"lint-markdown.yml\": createWorkflowFile({\n\t\t\t\tname: \"Lint Markdown\",\n\t\t\t\truns: [\"pnpm lint:md\"],\n\t\t\t}),\n\t\t}),\n\t\t...(!options.excludeLintPackageJson && {\n\t\t\t\"lint-package-json.yml\": createWorkflowFile({\n\t\t\t\tname: \"Lint Package JSON\",\n\t\t\t\truns: [\"pnpm lint:package-json\"],\n\t\t\t}),\n\t\t}),\n\t\t...(!options.excludeLintPackages && {\n\t\t\t\"lint-packages.yml\": createWorkflowFile({\n\t\t\t\tname: \"Lint Packages\",\n\t\t\t\truns: [\"pnpm lint:packages\"],\n\t\t\t}),\n\t\t}),\n\t\t...(!options.excludeLintSpelling && {\n\t\t\t\"lint-spelling.yml\": createWorkflowFile({\n\t\t\t\tname: \"Lint spelling\",\n\t\t\t\truns: [\"pnpm lint:spelling\"],\n\t\t\t}),\n\t\t}),\n\t\t...(!options.excludeReleases && {\n\t\t\t\"post-release.yml\": createWorkflowFile({\n\t\t\t\tname: \"Post Release\",\n\t\t\t\ton: {\n\t\t\t\t\trelease: {\n\t\t\t\t\t\ttypes: [\"published\"],\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\tsteps: [\n\t\t\t\t\t{ uses: \"actions/checkout@v4\", with: { \"fetch-depth\": 0 } },\n\t\t\t\t\t{\n\t\t\t\t\t\trun: `echo \"npm_version=$(npm pkg get version | tr -d '\"')\" >> \"$GITHUB_ENV\"`,\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tuses: \"apexskier/github-release-commenter@v1\",\n\t\t\t\t\t\twith: {\n\t\t\t\t\t\t\tGITHUB_TOKEN: \"${{ secrets.GITHUB_TOKEN }}\",\n\t\t\t\t\t\t\t\"comment-template\": `\n\t\t\t\t\t\t\t:tada: This is included in version {release_link} :tada:\n\n\t\t\t\t\t\t\tThe release is available on:\n\t\t\t\t\n\t\t\t\t\t\t\t* [GitHub releases](https://github.com/${options.owner}/${options.repository}/releases/tag/{release_tag})\n\t\t\t\t\t\t\t* [npm package (@latest dist-tag)](https://www.npmjs.com/package/${options.repository}/v/\\${{ env.npm_version }})\n\t\t\t\t\n\t\t\t\t\t\t\tCheers! 📦🚀\n\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\t\t\t\"release.yml\": createWorkflowFile({\n\t\t\t\tconcurrency: {\n\t\t\t\t\tgroup: \"${{ github.workflow }}\",\n\t\t\t\t},\n\t\t\t\tname: \"Release\",\n\t\t\t\ton: {\n\t\t\t\t\tpush: {\n\t\t\t\t\t\tbranches: [\"main\"],\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\tpermissions: {\n\t\t\t\t\tcontents: \"write\",\n\t\t\t\t\t\"id-token\": \"write\",\n\t\t\t\t},\n\t\t\t\tsteps: [\n\t\t\t\t\t{\n\t\t\t\t\t\tuses: \"actions/checkout@v4\",\n\t\t\t\t\t\twith: {\n\t\t\t\t\t\t\t\"fetch-depth\": 0,\n\t\t\t\t\t\t\tref: \"main\",\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tuses: \"./.github/actions/prepare\",\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\trun: \"pnpm build\",\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tenv: {\n\t\t\t\t\t\t\tGITHUB_TOKEN: \"${{ secrets.ACCESS_TOKEN }}\",\n\t\t\t\t\t\t\tNPM_TOKEN: \"${{ secrets.NPM_TOKEN }}\",\n\t\t\t\t\t\t},\n\t\t\t\t\t\tuses: \"JoshuaKGoldberg/release-it-action@v0.2.2\",\n\t\t\t\t\t},\n\t\t\t\t],\n\t\t\t}),\n\t\t}),\n\t\t...(!options.excludeTests && {\n\t\t\t\"test.yml\": createWorkflowFile({\n\t\t\t\tname: \"Test\",\n\t\t\t\tsteps: [\n\t\t\t\t\t{ uses: \"actions/checkout@v4\" },\n\t\t\t\t\t{ uses: \"./.github/actions/prepare\" },\n\t\t\t\t\t{ run: \"pnpm run test --coverage\" },\n\t\t\t\t\t{\n\t\t\t\t\t\tname: \"Codecov\",\n\t\t\t\t\t\tuses: \"codecov/codecov-action@v3\",\n\t\t\t\t\t},\n\t\t\t\t],\n\t\t\t}),\n\t\t}),\n\t};\n}\n"],"mappings":"AAEA,SAAS,0BAA0B;AAE5B,SAAS,gBAAgB,SAAkB;AACjD,SAAO;AAAA,IACN,aAAa,mBAAmB;AAAA,MAC/B,MAAM;AAAA,MACN,MAAM,CAAC,cAAc,qBAAqB;AAAA,IAC3C,CAAC;AAAA,IACD,2BAA2B,mBAAmB;AAAA,MAC7C,MAAM;AAAA,MACN,IAAI;AAAA,QACH,qBAAqB;AAAA,UACpB,OAAO,CAAC,kBAAkB;AAAA,QAC3B;AAAA,MACD;AAAA,MACA,aAAa;AAAA,QACZ,iBAAiB;AAAA,MAClB;AAAA,MACA,OAAO;AAAA,QACN;AAAA,UACC,MAAM;AAAA,UACN,MAAM;AAAA,YACL,QAAQ;AAAA,UACT;AAAA,QACD;AAAA,QACA;AAAA,UACC,IAAI;AAAA,UACJ,KAAK;AAAA;AAAA;AAAA,QACN;AAAA,MACD;AAAA,IACD,CAAC;AAAA,IACD,gBAAgB,mBAAmB;AAAA,MAClC,MAAM;AAAA,MACN,MAAM,CAAC,8BAA8B;AAAA,IACtC,CAAC;AAAA,IACD,WAAW,mBAAmB;AAAA,MAC7B,MAA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C,aAAa;AAAA,UACZ,OAAO;AAAA,QACR;AAAA,QACA,MAAM;AAAA,QACN,IAAI;AAAA,UACH,MAAM;AAAA,YACL,UAAU,CAAC,MAAM;AAAA,UAClB;AAAA,QACD;AAAA,QACA,aAAa;AAAA,UACZ,UAAU;AAAA,UACV,YAAY;AAAA,QACb;AAAA,QACA,OAAO;AAAA,UACN;AAAA,YACC,MAAM;AAAA,YACN,MAAM;AAAA,cACL,eAAe;AAAA,cACf,KAAK;AAAA,YACN;AAAA,UACD;AAAA,UACA;AAAA,YACC,MAAM;AAAA,UACP;AAAA,UACA;AAAA,YACC,KAAK;AAAA,UACN;AAAA,UACA;AAAA,YACC,KAAK;AAAA,cACJ,cAAc;AAAA,cACd,WAAW;AAAA,YACZ;AAAA,YACA,MAAM;AAAA,UACP;AAAA,QACD;AAAA,MACD,CAAC;AAAA,IACF;AAAA,IACA,GAAI,CAAC,QAAQ,gBAAgB;AAAA,MAC5B,YAAY,mBAAmB;AAAA,QAC9B,MAAM;AAAA,QACN,OAAO;AAAA,UACN,EAAE,MAAM,sBAAsB;AAAA,UAC9B,EAAE,MAAM,4BAA4B;AAAA,UACpC,EAAE,KAAK,2BAA2B;AAAA,UAClC;AAAA,YACC,MAAM;AAAA,YACN,MAAM;AAAA,UACP;AAAA,QACD;AAAA,MACD,CAAC;AAAA,IACF;AAAA,EACD;AACD;","names":[]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-typescript-app",
3
- "version": "1.33.2",
3
+ "version": "1.35.0",
4
4
  "description": "Quickstart-friendly TypeScript template with comprehensive, configurable, opinionated tooling. 💝",
5
5
  "repository": {
6
6
  "type": "git",
@@ -55,7 +55,7 @@
55
55
  "octokit": "^3.1.0",
56
56
  "prettier": "^3.0.2",
57
57
  "replace-in-file": "^7.0.1",
58
- "title-case": "^3.0.3",
58
+ "title-case": "^4.0.0",
59
59
  "zod": "^3.22.2",
60
60
  "zod-validation-error": "^1.5.0"
61
61
  },