create-typescript-app 1.57.2 → 1.57.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -5,7 +5,7 @@
5
5
  <p align="center">
6
6
  <!-- prettier-ignore-start -->
7
7
  <!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section -->
8
- <a href="#contributors" target="_blank"><img alt="👪 All Contributors: 44" src="https://img.shields.io/badge/%F0%9F%91%AA_all_contributors-44-21bb42.svg" /></a>
8
+ <a href="#contributors" target="_blank"><img alt="👪 All Contributors: 45" src="https://img.shields.io/badge/%F0%9F%91%AA_all_contributors-45-21bb42.svg" /></a>
9
9
  <!-- ALL-CONTRIBUTORS-BADGE:END -->
10
10
  <!-- prettier-ignore-end -->
11
11
  <a href="https://github.com/JoshuaKGoldberg/create-typescript-app/blob/main/.github/CODE_OF_CONDUCT.md" target="_blank"><img alt="🤝 Code of Conduct: Kept" src="https://img.shields.io/badge/%F0%9F%A4%9D_code_of_conduct-kept-21bb42" /></a>
@@ -83,45 +83,46 @@ Thanks! 💖
83
83
  <td align="center" valign="top" width="14.28%"><a href="https://github.com/emday4prez"><img src="https://avatars.githubusercontent.com/u/35363144?v=4?s=100" width="100px;" alt="Emerson"/><br /><sub><b>Emerson</b></sub></a><br /><a href="https://github.com/JoshuaKGoldberg/create-typescript-app/commits?author=emday4prez" title="Code">💻</a></td>
84
84
  <td align="center" valign="top" width="14.28%"><a href="https://gvasquez.dev"><img src="https://avatars.githubusercontent.com/u/7041175?v=4?s=100" width="100px;" alt="Graham Vasquez"/><br /><sub><b>Graham Vasquez</b></sub></a><br /><a href="https://github.com/JoshuaKGoldberg/create-typescript-app/commits?author=gv14982" title="Code">💻</a></td>
85
85
  <td align="center" valign="top" width="14.28%"><a href="https://jamiemagee.co.uk"><img src="https://avatars.githubusercontent.com/u/1358764?v=4?s=100" width="100px;" alt="Jamie Magee"/><br /><sub><b>Jamie Magee</b></sub></a><br /><a href="#ideas-jamiemagee" title="Ideas, Planning, & Feedback">🤔</a></td>
86
- <td align="center" valign="top" width="14.28%"><a href="https://sinchang.me"><img src="https://avatars.githubusercontent.com/u/3297859?v=4?s=100" width="100px;" alt="Jeff Wen"/><br /><sub><b>Jeff Wen</b></sub></a><br /><a href="https://github.com/JoshuaKGoldberg/create-typescript-app/commits?author=sinchang" title="Code">💻</a></td>
86
+ <td align="center" valign="top" width="14.28%"><a href="https://niklas-wortmann.com"><img src="https://avatars.githubusercontent.com/u/6104311?v=4?s=100" width="100px;" alt="Jan-Niklas W."/><br /><sub><b>Jan-Niklas W.</b></sub></a><br /><a href="https://github.com/JoshuaKGoldberg/create-typescript-app/commits?author=niklas-wortmann" title="Code">💻</a></td>
87
87
  </tr>
88
88
  <tr>
89
+ <td align="center" valign="top" width="14.28%"><a href="https://sinchang.me"><img src="https://avatars.githubusercontent.com/u/3297859?v=4?s=100" width="100px;" alt="Jeff Wen"/><br /><sub><b>Jeff Wen</b></sub></a><br /><a href="https://github.com/JoshuaKGoldberg/create-typescript-app/commits?author=sinchang" title="Code">💻</a></td>
89
90
  <td align="center" valign="top" width="14.28%"><a href="https://jessicawilkins.dev/"><img src="https://avatars.githubusercontent.com/u/67210629?v=4?s=100" width="100px;" alt="Jessica Wilkins "/><br /><sub><b>Jessica Wilkins </b></sub></a><br /><a href="https://github.com/JoshuaKGoldberg/create-typescript-app/commits?author=jdwilkin4" title="Code">💻</a></td>
90
91
  <td align="center" valign="top" width="14.28%"><a href="https://typescriptcourse.com/tutorials"><img src="https://avatars.githubusercontent.com/u/3806031?v=4?s=100" width="100px;" alt="Joe Previte"/><br /><sub><b>Joe Previte</b></sub></a><br /><a href="https://github.com/JoshuaKGoldberg/create-typescript-app/issues?q=author%3Ajsjoeio" title="Bug reports">🐛</a> <a href="https://github.com/JoshuaKGoldberg/create-typescript-app/commits?author=jsjoeio" title="Code">💻</a></td>
91
92
  <td align="center" valign="top" width="14.28%"><a href="https://blog.johnnyreilly.com/"><img src="https://avatars.githubusercontent.com/u/1010525?v=4?s=100" width="100px;" alt="John Reilly"/><br /><sub><b>John Reilly</b></sub></a><br /><a href="https://github.com/JoshuaKGoldberg/create-typescript-app/commits?author=johnnyreilly" title="Code">💻</a> <a href="#ideas-johnnyreilly" title="Ideas, Planning, & Feedback">🤔</a> <a href="https://github.com/JoshuaKGoldberg/create-typescript-app/issues?q=author%3Ajohnnyreilly" title="Bug reports">🐛</a> <a href="#maintenance-johnnyreilly" title="Maintenance">🚧</a> <a href="https://github.com/JoshuaKGoldberg/create-typescript-app/commits?author=johnnyreilly" title="Documentation">📖</a></td>
92
93
  <td align="center" valign="top" width="14.28%"><a href="http://www.joshuakgoldberg.com"><img src="https://avatars.githubusercontent.com/u/3335181?v=4?s=100" width="100px;" alt="Josh Goldberg"/><br /><sub><b>Josh Goldberg</b></sub></a><br /><a href="https://github.com/JoshuaKGoldberg/create-typescript-app/issues?q=author%3AJoshuaKGoldberg" title="Bug reports">🐛</a> <a href="https://github.com/JoshuaKGoldberg/create-typescript-app/commits?author=JoshuaKGoldberg" title="Code">💻</a> <a href="#maintenance-JoshuaKGoldberg" title="Maintenance">🚧</a> <a href="https://github.com/JoshuaKGoldberg/create-typescript-app/pulls?q=is%3Apr+reviewed-by%3AJoshuaKGoldberg" title="Reviewed Pull Requests">👀</a> <a href="#tool-JoshuaKGoldberg" title="Tools">🔧</a> <a href="https://github.com/JoshuaKGoldberg/create-typescript-app/commits?author=JoshuaKGoldberg" title="Documentation">📖</a> <a href="#infra-JoshuaKGoldberg" title="Infrastructure (Hosting, Build-Tools, etc)">🚇</a> <a href="https://github.com/JoshuaKGoldberg/create-typescript-app/commits?author=JoshuaKGoldberg" title="Tests">⚠️</a> <a href="#ideas-JoshuaKGoldberg" title="Ideas, Planning, & Feedback">🤔</a></td>
93
94
  <td align="center" valign="top" width="14.28%"><a href="https://twitter.com/Jolg42"><img src="https://avatars.githubusercontent.com/u/1328733?v=4?s=100" width="100px;" alt="Joël Galeran"/><br /><sub><b>Joël Galeran</b></sub></a><br /><a href="https://github.com/JoshuaKGoldberg/create-typescript-app/commits?author=jolg42" title="Code">💻</a></td>
94
95
  <td align="center" valign="top" width="14.28%"><a href="https://github.com/jaas666"><img src="https://avatars.githubusercontent.com/u/30204147?v=4?s=100" width="100px;" alt="Juan A."/><br /><sub><b>Juan A.</b></sub></a><br /><a href="https://github.com/JoshuaKGoldberg/create-typescript-app/commits?author=jaas666" title="Code">💻</a> <a href="https://github.com/JoshuaKGoldberg/create-typescript-app/commits?author=jaas666" title="Documentation">📖</a></td>
95
- <td align="center" valign="top" width="14.28%"><a href="https://kristo-baricevic.github.io/"><img src="https://avatars.githubusercontent.com/u/108290619?v=4?s=100" width="100px;" alt="Kristo Baricevic"/><br /><sub><b>Kristo Baricevic</b></sub></a><br /><a href="https://github.com/JoshuaKGoldberg/create-typescript-app/commits?author=kristo-baricevic" title="Code">💻</a></td>
96
96
  </tr>
97
97
  <tr>
98
+ <td align="center" valign="top" width="14.28%"><a href="https://kristo-baricevic.github.io/"><img src="https://avatars.githubusercontent.com/u/108290619?v=4?s=100" width="100px;" alt="Kristo Baricevic"/><br /><sub><b>Kristo Baricevic</b></sub></a><br /><a href="https://github.com/JoshuaKGoldberg/create-typescript-app/commits?author=kristo-baricevic" title="Code">💻</a></td>
98
99
  <td align="center" valign="top" width="14.28%"><a href="https://webpro.nl"><img src="https://avatars.githubusercontent.com/u/456426?v=4?s=100" width="100px;" alt="Lars Kappert"/><br /><sub><b>Lars Kappert</b></sub></a><br /><a href="https://github.com/JoshuaKGoldberg/create-typescript-app/commits?author=webpro" title="Code">💻</a></td>
99
100
  <td align="center" valign="top" width="14.28%"><a href="https://github.com/Aslemammad"><img src="https://avatars.githubusercontent.com/u/37929992?v=4?s=100" width="100px;" alt="Mohammad Bagher Abiyat"/><br /><sub><b>Mohammad Bagher Abiyat</b></sub></a><br /><a href="https://github.com/JoshuaKGoldberg/create-typescript-app/commits?author=aslemammad" title="Code">💻</a></td>
100
101
  <td align="center" valign="top" width="14.28%"><a href="https://navinmoorthy.me/"><img src="https://avatars.githubusercontent.com/u/39694575?v=4?s=100" width="100px;" alt="Navin Moorthy"/><br /><sub><b>Navin Moorthy</b></sub></a><br /><a href="https://github.com/JoshuaKGoldberg/create-typescript-app/issues?q=author%3Anavin-moorthy" title="Bug reports">🐛</a> <a href="https://github.com/JoshuaKGoldberg/create-typescript-app/commits?author=navin-moorthy" title="Code">💻</a> <a href="#ideas-navin-moorthy" title="Ideas, Planning, & Feedback">🤔</a></td>
101
102
  <td align="center" valign="top" width="14.28%"><a href="https://github.com/NazCodeland"><img src="https://avatars.githubusercontent.com/u/113494366?v=4?s=100" width="100px;" alt="NazCodeland"/><br /><sub><b>NazCodeland</b></sub></a><br /><a href="https://github.com/JoshuaKGoldberg/create-typescript-app/commits?author=NazCodeland" title="Code">💻</a></td>
102
103
  <td align="center" valign="top" width="14.28%"><a href="https://orta.io"><img src="https://avatars.githubusercontent.com/u/49038?v=4?s=100" width="100px;" alt="Orta Therox"/><br /><sub><b>Orta Therox</b></sub></a><br /><a href="https://github.com/JoshuaKGoldberg/create-typescript-app/commits?author=orta" title="Code">💻</a></td>
103
104
  <td align="center" valign="top" width="14.28%"><a href="https://paulisaweso.me/"><img src="https://avatars.githubusercontent.com/u/6335792?v=4?s=100" width="100px;" alt="Paul Esch-Laurent"/><br /><sub><b>Paul Esch-Laurent</b></sub></a><br /><a href="https://github.com/JoshuaKGoldberg/create-typescript-app/commits?author=Pinjasaur" title="Code">💻</a></td>
104
- <td align="center" valign="top" width="14.28%"><a href="https://praveenshinde.vercel.app/"><img src="https://avatars.githubusercontent.com/u/107350270?v=4?s=100" width="100px;" alt="Praveen Shinde"/><br /><sub><b>Praveen Shinde</b></sub></a><br /><a href="https://github.com/JoshuaKGoldberg/create-typescript-app/commits?author=praveenshinde3" title="Code">💻</a></td>
105
105
  </tr>
106
106
  <tr>
107
+ <td align="center" valign="top" width="14.28%"><a href="https://praveenshinde.vercel.app/"><img src="https://avatars.githubusercontent.com/u/107350270?v=4?s=100" width="100px;" alt="Praveen Shinde"/><br /><sub><b>Praveen Shinde</b></sub></a><br /><a href="https://github.com/JoshuaKGoldberg/create-typescript-app/commits?author=praveenshinde3" title="Code">💻</a></td>
107
108
  <td align="center" valign="top" width="14.28%"><a href="https://github.com/promise-dash"><img src="https://avatars.githubusercontent.com/u/86062880?v=4?s=100" width="100px;" alt="Promise Dash"/><br /><sub><b>Promise Dash</b></sub></a><br /><a href="https://github.com/JoshuaKGoldberg/create-typescript-app/commits?author=promise-dash" title="Code">💻</a></td>
108
109
  <td align="center" valign="top" width="14.28%"><a href="https://github.com/RebeccaStevens"><img src="https://avatars.githubusercontent.com/u/7224206?v=4?s=100" width="100px;" alt="Rebecca Stevens"/><br /><sub><b>Rebecca Stevens</b></sub></a><br /><a href="https://github.com/JoshuaKGoldberg/create-typescript-app/commits?author=RebeccaStevens" title="Code">💻</a> <a href="#infra-RebeccaStevens" title="Infrastructure (Hosting, Build-Tools, etc)">🚇</a></td>
109
110
  <td align="center" valign="top" width="14.28%"><a href="https://linktr.ee/ronbraha"><img src="https://avatars.githubusercontent.com/u/45559220?v=4?s=100" width="100px;" alt="Ron Braha"/><br /><sub><b>Ron Braha</b></sub></a><br /><a href="https://github.com/JoshuaKGoldberg/create-typescript-app/commits?author=RNR1" title="Code">💻</a> <a href="#design-RNR1" title="Design">🎨</a> <a href="https://github.com/JoshuaKGoldberg/create-typescript-app/commits?author=RNR1" title="Tests">⚠️</a></td>
110
111
  <td align="center" valign="top" width="14.28%"><a href="http://ronjeanfrancois.com"><img src="https://avatars.githubusercontent.com/u/105710107?v=4?s=100" width="100px;" alt="Ron Jean-Francois"/><br /><sub><b>Ron Jean-Francois</b></sub></a><br /><a href="https://github.com/JoshuaKGoldberg/create-typescript-app/commits?author=ronthetech" title="Code">💻</a> <a href="#infra-ronthetech" title="Infrastructure (Hosting, Build-Tools, etc)">🚇</a></td>
111
112
  <td align="center" valign="top" width="14.28%"><a href="https://github.com/RuthwikReddy09"><img src="https://avatars.githubusercontent.com/u/126862059?v=4?s=100" width="100px;" alt="Ruthwik"/><br /><sub><b>Ruthwik</b></sub></a><br /><a href="https://github.com/JoshuaKGoldberg/create-typescript-app/commits?author=ruthwikreddy09" title="Code">💻</a></td>
112
113
  <td align="center" valign="top" width="14.28%"><a href="https://ryota-murakami.github.io/"><img src="https://avatars.githubusercontent.com/u/5501268?v=4?s=100" width="100px;" alt="Ryota Murakami"/><br /><sub><b>Ryota Murakami</b></sub></a><br /><a href="https://github.com/JoshuaKGoldberg/create-typescript-app/commits?author=ryota-murakami" title="Code">💻</a> <a href="https://github.com/JoshuaKGoldberg/create-typescript-app/issues?q=author%3Aryota-murakami" title="Bug reports">🐛</a></td>
113
- <td align="center" valign="top" width="14.28%"><a href="https://www.shraddha.tech"><img src="https://avatars.githubusercontent.com/u/27571141?v=4?s=100" width="100px;" alt="Shraddha"/><br /><sub><b>Shraddha</b></sub></a><br /><a href="https://github.com/JoshuaKGoldberg/create-typescript-app/commits?author=5hraddha" title="Code">💻</a></td>
114
114
  </tr>
115
115
  <tr>
116
+ <td align="center" valign="top" width="14.28%"><a href="https://www.shraddha.tech"><img src="https://avatars.githubusercontent.com/u/27571141?v=4?s=100" width="100px;" alt="Shraddha"/><br /><sub><b>Shraddha</b></sub></a><br /><a href="https://github.com/JoshuaKGoldberg/create-typescript-app/commits?author=5hraddha" title="Code">💻</a></td>
116
117
  <td align="center" valign="top" width="14.28%"><a href="https://github.com/the-lazy-learner"><img src="https://avatars.githubusercontent.com/u/13695177?v=4?s=100" width="100px;" alt="Sudhansu"/><br /><sub><b>Sudhansu</b></sub></a><br /><a href="https://github.com/JoshuaKGoldberg/create-typescript-app/commits?author=the-lazy-learner" title="Code">💻</a></td>
117
118
  <td align="center" valign="top" width="14.28%"><a href="https://github.com/mrswastik-robot"><img src="https://avatars.githubusercontent.com/u/107865087?v=4?s=100" width="100px;" alt="Swastik Patel"/><br /><sub><b>Swastik Patel</b></sub></a><br /><a href="https://github.com/JoshuaKGoldberg/create-typescript-app/commits?author=mrswastik-robot" title="Documentation">📖</a></td>
118
119
  <td align="center" valign="top" width="14.28%"><a href="https://www.linkedin.com/in/timonjurschitsch/"><img src="https://avatars.githubusercontent.com/u/103483059?v=4?s=100" width="100px;" alt="Timon Jurschitsch"/><br /><sub><b>Timon Jurschitsch</b></sub></a><br /><a href="https://github.com/JoshuaKGoldberg/create-typescript-app/commits?author=dertimonius" title="Code">💻</a></td>
119
120
  <td align="center" valign="top" width="14.28%"><a href="https://github.com/tungbq"><img src="https://avatars.githubusercontent.com/u/85242618?v=4?s=100" width="100px;" alt="Tung Bui (Leo)"/><br /><sub><b>Tung Bui (Leo)</b></sub></a><br /><a href="https://github.com/JoshuaKGoldberg/create-typescript-app/commits?author=tungbq" title="Code">💻</a></td>
120
121
  <td align="center" valign="top" width="14.28%"><a href="https://github.com/vasanth9"><img src="https://avatars.githubusercontent.com/u/42891954?v=4?s=100" width="100px;" alt="Vasanth Kumar Cheepurupalli"/><br /><sub><b>Vasanth Kumar Cheepurupalli</b></sub></a><br /><a href="https://github.com/JoshuaKGoldberg/create-typescript-app/commits?author=vasanth9" title="Code">💻</a></td>
121
122
  <td align="center" valign="top" width="14.28%"><a href="https://github.com/xl4624"><img src="https://avatars.githubusercontent.com/u/116298054?v=4?s=100" width="100px;" alt="Xiaomin Liu"/><br /><sub><b>Xiaomin Liu</b></sub></a><br /><a href="https://github.com/JoshuaKGoldberg/create-typescript-app/commits?author=xl4624" title="Code">💻</a></td>
122
- <td align="center" valign="top" width="14.28%"><a href="https://github.com/lcforbes"><img src="https://avatars.githubusercontent.com/u/42080532?v=4?s=100" width="100px;" alt="lcforbes"/><br /><sub><b>lcforbes</b></sub></a><br /><a href="https://github.com/JoshuaKGoldberg/create-typescript-app/issues?q=author%3Alcforbes" title="Bug reports">🐛</a></td>
123
123
  </tr>
124
124
  <tr>
125
+ <td align="center" valign="top" width="14.28%"><a href="https://github.com/lcforbes"><img src="https://avatars.githubusercontent.com/u/42080532?v=4?s=100" width="100px;" alt="lcforbes"/><br /><sub><b>lcforbes</b></sub></a><br /><a href="https://github.com/JoshuaKGoldberg/create-typescript-app/issues?q=author%3Alcforbes" title="Bug reports">🐛</a></td>
125
126
  <td align="center" valign="top" width="14.28%"><a href="http://nandertga.ddns.net"><img src="https://avatars.githubusercontent.com/u/65074195?v=4?s=100" width="100px;" alt="nandertga"/><br /><sub><b>nandertga</b></sub></a><br /><a href="https://github.com/JoshuaKGoldberg/create-typescript-app/commits?author=nandertga" title="Code">💻</a></td>
126
127
  <td align="center" valign="top" width="14.28%"><a href="https://github.com/TAKANOME-DEV"><img src="https://avatars.githubusercontent.com/u/79809121?v=4?s=100" width="100px;" alt="takanomedev"/><br /><sub><b>takanomedev</b></sub></a><br /><a href="https://github.com/JoshuaKGoldberg/create-typescript-app/commits?author=TAKANOME-DEV" title="Code">💻</a></td>
127
128
  </tr>
@@ -1,7 +1,7 @@
1
1
  import { allArgOptions } from "../shared/options/args.js";
2
2
  import {
3
3
  getExclusions
4
- } from "../shared/options/augmentOptionsWithExcludes.js";
4
+ } from "../shared/options/exclusionKeys.js";
5
5
  function getFirstMatchingArg(key) {
6
6
  return Object.keys(allArgOptions).find(
7
7
  (arg) => arg.replaceAll("-", "") === key.toLowerCase()
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/create/createRerunSuggestion.ts"],"sourcesContent":["import { allArgOptions } from \"../shared/options/args.js\";\nimport {\n\tExclusionKey,\n\tgetExclusions,\n} from \"../shared/options/augmentOptionsWithExcludes.js\";\nimport { Options } from \"../shared/types.js\";\n\nfunction getFirstMatchingArg(key: string) {\n\treturn Object.keys(allArgOptions).find(\n\t\t(arg) => arg.replaceAll(\"-\", \"\") === key.toLowerCase(),\n\t);\n}\n\nexport function createRerunSuggestion(options: Partial<Options>): string {\n\tconst optionsNormalized = {\n\t\t...options,\n\t\temail: undefined,\n\t\t...(options.email && {\n\t\t\temailGitHub: options.email.github,\n\t\t\temailNpm: options.email.npm,\n\t\t}),\n\t\t...(options.guide\n\t\t\t? {\n\t\t\t\t\tguide: options.guide.href,\n\t\t\t\t\tguideTitle: options.guide.title,\n\t\t\t }\n\t\t\t: { guide: undefined }),\n\t\t...(options.logo\n\t\t\t? {\n\t\t\t\t\tlogo: options.logo.src,\n\t\t\t\t\tlogoAlt: options.logo.alt,\n\t\t\t }\n\t\t\t: { logo: undefined }),\n\t};\n\n\tconst args = Object.entries(optionsNormalized)\n\t\t// Sort so the base is first, then the rest are sorted alphabetically\n\t\t.sort(([a], [b]) =>\n\t\t\ta === \"base\" ? -1 : b === \"base\" ? 1 : a.localeCompare(b),\n\t\t)\n\t\t// Filter out all entries that have a key in the excluded object or have a falsy value\n\t\t.filter(\n\t\t\t([key, value]) =>\n\t\t\t\tgetExclusions(options, optionsNormalized.base)[key as ExclusionKey] ==\n\t\t\t\t\tundefined && !!value,\n\t\t)\n\t\t.map(([key, value]) => {\n\t\t\treturn `--${getFirstMatchingArg(key)}${stringifyValue(value)}`;\n\t\t})\n\t\t.join(\" \");\n\n\treturn `npx create-typescript-app --mode ${options.mode} ${args}`;\n}\n\nfunction stringifyValue(\n\tvalue: boolean | string | string[] | undefined,\n): string {\n\tif (Array.isArray(value)) {\n\t\treturn stringifyValue(value.join(\" \"));\n\t}\n\n\tif (typeof value === \"boolean\" && value) {\n\t\treturn \"\";\n\t}\n\n\tconst valueStringified = `${value}`;\n\n\treturn valueStringified.includes(\" \")\n\t\t? ` \"${valueStringified}\"`\n\t\t: ` ${valueStringified}`;\n}\n"],"mappings":"AAAA,SAAS,qBAAqB;AAC9B;AAAA,EAEC;AAAA,OACM;AAGP,SAAS,oBAAoB,KAAa;AACzC,SAAO,OAAO,KAAK,aAAa,EAAE;AAAA,IACjC,CAAC,QAAQ,IAAI,WAAW,KAAK,EAAE,MAAM,IAAI,YAAY;AAAA,EACtD;AACD;AAEO,SAAS,sBAAsB,SAAmC;AACxE,QAAM,oBAAoB;AAAA,IACzB,GAAG;AAAA,IACH,OAAO;AAAA,IACP,GAAI,QAAQ,SAAS;AAAA,MACpB,aAAa,QAAQ,MAAM;AAAA,MAC3B,UAAU,QAAQ,MAAM;AAAA,IACzB;AAAA,IACA,GAAI,QAAQ,QACT;AAAA,MACA,OAAO,QAAQ,MAAM;AAAA,MACrB,YAAY,QAAQ,MAAM;AAAA,IAC1B,IACA,EAAE,OAAO,OAAU;AAAA,IACtB,GAAI,QAAQ,OACT;AAAA,MACA,MAAM,QAAQ,KAAK;AAAA,MACnB,SAAS,QAAQ,KAAK;AAAA,IACtB,IACA,EAAE,MAAM,OAAU;AAAA,EACtB;AAEA,QAAM,OAAO,OAAO,QAAQ,iBAAiB,EAE3C;AAAA,IAAK,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,MACb,MAAM,SAAS,KAAK,MAAM,SAAS,IAAI,EAAE,cAAc,CAAC;AAAA,EACzD,EAEC;AAAA,IACA,CAAC,CAAC,KAAK,KAAK,MACX,cAAc,SAAS,kBAAkB,IAAI,EAAE,GAAmB,KACjE,UAAa,CAAC,CAAC;AAAA,EAClB,EACC,IAAI,CAAC,CAAC,KAAK,KAAK,MAAM;AACtB,WAAO,KAAK,oBAAoB,GAAG,CAAC,GAAG,eAAe,KAAK,CAAC;AAAA,EAC7D,CAAC,EACA,KAAK,GAAG;AAEV,SAAO,oCAAoC,QAAQ,IAAI,IAAI,IAAI;AAChE;AAEA,SAAS,eACR,OACS;AACT,MAAI,MAAM,QAAQ,KAAK,GAAG;AACzB,WAAO,eAAe,MAAM,KAAK,GAAG,CAAC;AAAA,EACtC;AAEA,MAAI,OAAO,UAAU,aAAa,OAAO;AACxC,WAAO;AAAA,EACR;AAEA,QAAM,mBAAmB,GAAG,KAAK;AAEjC,SAAO,iBAAiB,SAAS,GAAG,IACjC,KAAK,gBAAgB,MACrB,IAAI,gBAAgB;AACxB;","names":[]}
1
+ {"version":3,"sources":["../../src/create/createRerunSuggestion.ts"],"sourcesContent":["import { allArgOptions } from \"../shared/options/args.js\";\nimport {\n\tExclusionKey,\n\tgetExclusions,\n} from \"../shared/options/exclusionKeys.js\";\nimport { Options } from \"../shared/types.js\";\n\nfunction getFirstMatchingArg(key: string) {\n\treturn Object.keys(allArgOptions).find(\n\t\t(arg) => arg.replaceAll(\"-\", \"\") === key.toLowerCase(),\n\t);\n}\n\nexport function createRerunSuggestion(options: Partial<Options>): string {\n\tconst optionsNormalized = {\n\t\t...options,\n\t\temail: undefined,\n\t\t...(options.email && {\n\t\t\temailGitHub: options.email.github,\n\t\t\temailNpm: options.email.npm,\n\t\t}),\n\t\t...(options.guide\n\t\t\t? {\n\t\t\t\t\tguide: options.guide.href,\n\t\t\t\t\tguideTitle: options.guide.title,\n\t\t\t }\n\t\t\t: { guide: undefined }),\n\t\t...(options.logo\n\t\t\t? {\n\t\t\t\t\tlogo: options.logo.src,\n\t\t\t\t\tlogoAlt: options.logo.alt,\n\t\t\t }\n\t\t\t: { logo: undefined }),\n\t};\n\n\tconst args = Object.entries(optionsNormalized)\n\t\t// Sort so the base is first, then the rest are sorted alphabetically\n\t\t.sort(([a], [b]) =>\n\t\t\ta === \"base\" ? -1 : b === \"base\" ? 1 : a.localeCompare(b),\n\t\t)\n\t\t// Filter out all entries that have a key in the excluded object or have a falsy value\n\t\t.filter(\n\t\t\t([key, value]) =>\n\t\t\t\tgetExclusions(options, optionsNormalized.base)[key as ExclusionKey] ==\n\t\t\t\t\tundefined && !!value,\n\t\t)\n\t\t.map(([key, value]) => {\n\t\t\treturn `--${getFirstMatchingArg(key)}${stringifyValue(value)}`;\n\t\t})\n\t\t.join(\" \");\n\n\treturn `npx create-typescript-app --mode ${options.mode} ${args}`;\n}\n\nfunction stringifyValue(\n\tvalue: boolean | string | string[] | undefined,\n): string {\n\tif (Array.isArray(value)) {\n\t\treturn stringifyValue(value.join(\" \"));\n\t}\n\n\tif (typeof value === \"boolean\" && value) {\n\t\treturn \"\";\n\t}\n\n\tconst valueStringified = `${value}`;\n\n\treturn valueStringified.includes(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AAM,QAAQ,KAAK,GAAG;AACzB,WAAO,eAAe,MAAM,KAAK,GAAG,CAAC;AAAA,EACtC;AAEA,MAAI,OAAO,UAAU,aAAa,OAAO;AACxC,WAAO;AAAA,EACR;AAEA,QAAM,mBAAmB,GAAG,KAAK;AAEjC,SAAO,iBAAiB,SAAS,GAAG,IACjC,KAAK,gBAAgB,MACrB,IAAI,gBAAgB;AACxB;","names":[]}
@@ -1,9 +1,7 @@
1
- import { Options, OptionsBase } from '../types.js';
1
+ import { Options } from '../types.js';
2
2
  import 'zod';
3
3
  import '../codes.js';
4
4
 
5
- type ExclusionKey = keyof Options & `exclude${string}`;
6
- declare function getExclusions(options: Partial<Options>, base?: OptionsBase): Partial<Options>;
7
5
  declare function augmentOptionsWithExcludes(options: Options): Promise<Options | undefined>;
8
6
 
9
- export { type ExclusionKey, augmentOptionsWithExcludes, getExclusions };
7
+ export { augmentOptionsWithExcludes };
@@ -1,120 +1,11 @@
1
1
  import * as prompts from "@clack/prompts";
2
2
  import chalk from "chalk";
3
3
  import { filterPromptCancel } from "../prompts.js";
4
- const exclusionDescriptions = {
5
- excludeAllContributors: {
6
- hint: "--exclude-all-contributors",
7
- label: "Add all-contributors to track contributions and display them in a README.md table."
8
- },
9
- excludeCompliance: {
10
- hint: "--exclude-compliance",
11
- label: "Add a GitHub Actions workflow to verify that PRs match an expected format.",
12
- uncommon: true
13
- },
14
- excludeLintDeprecation: {
15
- hint: "--exclude-lint-deprecation",
16
- label: "Include an eslint-plugin-deprecation to reports on usage of code marked as @deprecated.",
17
- uncommon: true
18
- },
19
- excludeLintESLint: {
20
- hint: "--exclude-lint-eslint",
21
- label: "Include eslint-plugin-eslint-comment to enforce good practices around ESLint comment directives.",
22
- uncommon: true
23
- },
24
- excludeLintJSDoc: {
25
- hint: "--exclude-lint-jsdoc",
26
- label: "Include eslint-plugin-jsdoc to enforce good practices around JSDoc comments.",
27
- uncommon: true
28
- },
29
- excludeLintJson: {
30
- hint: "--exclude-lint-json",
31
- label: "Apply linting and sorting to *.json and *.jsonc files.",
32
- uncommon: true
33
- },
34
- excludeLintKnip: {
35
- hint: "--exclude-lint-knip",
36
- label: "Add Knip to detect unused files, dependencies, and code exports."
37
- },
38
- excludeLintMd: {
39
- hint: "--exclude-lint-md",
40
- label: "Apply linting to *.md files.",
41
- uncommon: true
42
- },
43
- excludeLintPackageJson: {
44
- hint: "--exclude-lint-package-json",
45
- label: "Add eslint-plugin-package-json to lint for package.json correctness.",
46
- uncommon: true
47
- },
48
- excludeLintPackages: {
49
- hint: "--exclude-lint-packages",
50
- label: "Add a pnpm dedupe workflow to ensure packages aren't duplicated unnecessarily.",
51
- uncommon: true
52
- },
53
- excludeLintPerfectionist: {
54
- hint: "--exclude-lint-perfectionist",
55
- label: "Apply eslint-plugin-perfectionist to ensure imports, keys, and so on are in sorted order.",
56
- uncommon: true
57
- },
58
- excludeLintRegex: {
59
- hint: "--exclude-lint-regex",
60
- label: "Include eslint-plugin-regex to enforce good practices around regular expressions.",
61
- uncommon: true
62
- },
63
- excludeLintSpelling: {
64
- hint: "--exclude-lint-spelling",
65
- label: "Add cspell to spell check against dictionaries of known words.",
66
- uncommon: true
67
- },
68
- excludeLintStrict: {
69
- hint: "--exclude-lint-strict",
70
- label: "Include strict logical lint rules such as typescript-eslint's strict config. ",
71
- uncommon: true
72
- },
73
- excludeLintStylistic: {
74
- hint: "--exclude-lint-stylistic",
75
- label: "Include stylistic lint rules such as typescript-eslint's stylistic config.",
76
- uncommon: true
77
- },
78
- excludeLintYml: {
79
- hint: "--exclude-lint-yml",
80
- label: "Apply linting and sorting to *.yaml and *.yml files.",
81
- uncommon: true
82
- },
83
- excludeReleases: {
84
- hint: "--exclude-releases",
85
- label: "Add release-it to generate changelogs, package bumps, and publishes based on conventional commits."
86
- },
87
- excludeRenovate: {
88
- hint: "--exclude-renovate",
89
- label: "Add a Renovate config to keep dependencies up-to-date with PRs."
90
- },
91
- excludeTests: {
92
- hint: "--exclude-tests",
93
- label: "Add Vitest tooling for fast unit tests, configured with coverage tracking."
94
- }
95
- };
96
- const exclusionKeys = Object.keys(exclusionDescriptions);
97
- function getExclusions(options, base) {
98
- switch (base) {
99
- case "common":
100
- return {
101
- ...Object.fromEntries(
102
- exclusionKeys.filter((exclusion) => exclusionDescriptions[exclusion].uncommon).map((exclusion) => [exclusion, options[exclusion] ?? true])
103
- )
104
- };
105
- case "minimum":
106
- return {
107
- ...Object.fromEntries(
108
- exclusionKeys.map((exclusion) => [
109
- exclusion,
110
- options[exclusion] ?? true
111
- ])
112
- )
113
- };
114
- default:
115
- return {};
116
- }
117
- }
4
+ import {
5
+ exclusionDescriptions,
6
+ exclusionKeys,
7
+ getExclusions
8
+ } from "./exclusionKeys.js";
118
9
  async function augmentOptionsWithExcludes(options) {
119
10
  if (Object.keys(options).some(
120
11
  (key) => key in exclusionDescriptions && options[key] !== void 0
@@ -163,6 +54,7 @@ async function augmentOptionsWithExcludes(options) {
163
54
  case "everything":
164
55
  return {
165
56
  ...options,
57
+ base,
166
58
  ...getExclusions(options, base)
167
59
  };
168
60
  case "prompt":
@@ -183,6 +75,7 @@ async function augmentOptionsWithExcludes(options) {
183
75
  );
184
76
  return {
185
77
  ...options,
78
+ base,
186
79
  ...Object.fromEntries(
187
80
  exclusionKeys.map(
188
81
  (exclusionKey) => [exclusionKey, !exclusionsNotEnabled.has(exclusionKey)]
@@ -195,7 +88,6 @@ function makeLabel(label, message) {
195
88
  return [chalk.bold(label), message].join(" ");
196
89
  }
197
90
  export {
198
- augmentOptionsWithExcludes,
199
- getExclusions
91
+ augmentOptionsWithExcludes
200
92
  };
201
93
  //# sourceMappingURL=augmentOptionsWithExcludes.js.map
@@ -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\";\n\ninterface ExclusionDescription {\n\thint: string;\n\tlabel: string;\n\tuncommon?: true;\n}\n\nexport type ExclusionKey = keyof Options & `exclude${string}`;\n\nconst exclusionDescriptions: Record<ExclusionKey, ExclusionDescription> = {\n\texcludeAllContributors: {\n\t\thint: \"--exclude-all-contributors\",\n\t\tlabel:\n\t\t\t\"Add all-contributors to track contributions and display them in a README.md table.\",\n\t},\n\texcludeCompliance: {\n\t\thint: \"--exclude-compliance\",\n\t\tlabel:\n\t\t\t\"Add a GitHub Actions workflow to verify that PRs match an expected format.\",\n\t\tuncommon: true,\n\t},\n\texcludeLintDeprecation: {\n\t\thint: \"--exclude-lint-deprecation\",\n\t\tlabel:\n\t\t\t\"Include an eslint-plugin-deprecation to reports on usage of code marked as @deprecated.\",\n\t\tuncommon: true,\n\t},\n\texcludeLintESLint: {\n\t\thint: \"--exclude-lint-eslint\",\n\t\tlabel:\n\t\t\t\"Include eslint-plugin-eslint-comment to enforce good practices around ESLint comment directives.\",\n\t\tuncommon: true,\n\t},\n\texcludeLintJSDoc: {\n\t\thint: \"--exclude-lint-jsdoc\",\n\t\tlabel:\n\t\t\t\"Include eslint-plugin-jsdoc to enforce good practices around JSDoc comments.\",\n\t\tuncommon: true,\n\t},\n\texcludeLintJson: {\n\t\thint: \"--exclude-lint-json\",\n\t\tlabel: \"Apply linting and sorting to *.json and *.jsonc files.\",\n\t\tuncommon: true,\n\t},\n\texcludeLintKnip: {\n\t\thint: \"--exclude-lint-knip\",\n\t\tlabel: \"Add Knip to detect unused files, dependencies, and code exports.\",\n\t},\n\texcludeLintMd: {\n\t\thint: \"--exclude-lint-md\",\n\t\tlabel: \"Apply linting to *.md files.\",\n\t\tuncommon: true,\n\t},\n\texcludeLintPackageJson: {\n\t\thint: \"--exclude-lint-package-json\",\n\t\tlabel:\n\t\t\t\"Add eslint-plugin-package-json to lint for package.json correctness.\",\n\t\tuncommon: true,\n\t},\n\texcludeLintPackages: {\n\t\thint: \"--exclude-lint-packages\",\n\t\tlabel:\n\t\t\t\"Add a pnpm dedupe workflow to ensure packages aren't duplicated unnecessarily.\",\n\t\tuncommon: true,\n\t},\n\texcludeLintPerfectionist: {\n\t\thint: \"--exclude-lint-perfectionist\",\n\t\tlabel:\n\t\t\t\"Apply eslint-plugin-perfectionist to ensure imports, keys, and so on are in sorted order.\",\n\t\tuncommon: true,\n\t},\n\texcludeLintRegex: {\n\t\thint: \"--exclude-lint-regex\",\n\t\tlabel:\n\t\t\t\"Include eslint-plugin-regex to enforce good practices around regular expressions.\",\n\t\tuncommon: true,\n\t},\n\texcludeLintSpelling: {\n\t\thint: \"--exclude-lint-spelling\",\n\t\tlabel: \"Add cspell to spell check against dictionaries of known words.\",\n\t\tuncommon: true,\n\t},\n\texcludeLintStrict: {\n\t\thint: \"--exclude-lint-strict\",\n\t\tlabel:\n\t\t\t\"Include strict logical lint rules such as typescript-eslint's strict config. \",\n\t\tuncommon: true,\n\t},\n\texcludeLintStylistic: {\n\t\thint: \"--exclude-lint-stylistic\",\n\t\tlabel:\n\t\t\t\"Include stylistic lint rules such as typescript-eslint's stylistic config.\",\n\t\tuncommon: true,\n\t},\n\texcludeLintYml: {\n\t\thint: \"--exclude-lint-yml\",\n\t\tlabel: \"Apply linting and sorting to *.yaml and *.yml files.\",\n\t\tuncommon: true,\n\t},\n\texcludeReleases: {\n\t\thint: \"--exclude-releases\",\n\t\tlabel:\n\t\t\t\"Add release-it to generate changelogs, package bumps, and publishes based on conventional commits.\",\n\t},\n\texcludeRenovate: {\n\t\thint: \"--exclude-renovate\",\n\t\tlabel: \"Add a Renovate config to keep dependencies up-to-date with PRs.\",\n\t},\n\texcludeTests: {\n\t\thint: \"--exclude-tests\",\n\t\tlabel:\n\t\t\t\"Add Vitest tooling for fast unit tests, configured with coverage tracking.\",\n\t},\n};\n\nconst exclusionKeys = Object.keys(exclusionDescriptions) 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((exclusion) => exclusionDescriptions[exclusion].uncommon)\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 \"minimum\":\n\t\t\treturn {\n\t\t\t\t...Object.fromEntries(\n\t\t\t\t\texclusionKeys.map((exclusion) => [\n\t\t\t\t\t\texclusion,\n\t\t\t\t\t\toptions[exclusion] ?? true,\n\t\t\t\t\t]),\n\t\t\t\t),\n\t\t\t};\n\t\t// We only really care about exclusions on the common and minimum bases\n\t\tdefault:\n\t\t\treturn {};\n\t}\n}\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\"minimum\",\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: \"minimum\",\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 undefined:\n\t\t\treturn undefined;\n\t\tcase \"common\":\n\t\tcase \"minimum\":\n\t\tcase \"everything\":\n\t\t\treturn {\n\t\t\t\t...options,\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\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}\n}\n\nfunction makeLabel(label: string, message: string) {\n\treturn [chalk.bold(label), message].join(\"\\t \");\n}\n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,YACA;AAAA,UACD;AAAA,UACA,OAAO;AAAA,QACR;AAAA,QACA;AAAA,UACC,OAAO;AAAA,YACN;AAAA,YACA;AAAA,UACD;AAAA,UACA,OAAO;AAAA,QACR;AAAA,QACA;AAAA,UACC,OAAO,UAAU,UAAU,yBAAyB;AAAA,UACpD,OAAO;AAAA,QACR;AAAA,MACD;AAAA,IACD,CAAC;AAAA,EACF;AAED,UAAQ,MAAM;AAAA,IACb,KAAK;AACJ,aAAO;AAAA,IACR,KAAK;AAAA,IACL,KAAK;AAAA,IACL,KAAK;AACJ,aAAO;AAAA,QACN,GAAG;AAAA,QACH,GAAG,cAAc,SAAS,IAAI;AAAA,MAC/B;AAAA,IACD,KAAK;AACJ,YAAM,uBAAuB,IAAI;AAAA,QAChC;AAAA,UACC,MAAM,QAAQ,YAAY;AAAA,YACzB,eAAe;AAAA,YACf,SACC;AAAA,YACD,SAAS,OAAO,QAAQ,qBAAqB,EAAE;AAAA,cAC9C,CAAC,CAAC,OAAO,EAAE,MAAM,MAAM,CAAC,OAAO;AAAA,gBAC9B;AAAA,gBACA;AAAA,gBACA;AAAA,cACD;AAAA,YACD;AAAA,UACD,CAAC;AAAA,QACF;AAAA,MACD;AAEA,aAAO;AAAA,QACN,GAAG;AAAA,QACH,GAAG,OAAO;AAAA,UACT,cAAc;AAAA,YACb,CAAC,iBACA,CAAC,cAAc,CAAC,qBAAqB,IAAI,YAAY,CAAC;AAAA,UACxD;AAAA,QACD;AAAA,MACD;AAAA,EACF;AACD;AAEA,SAAS,UAAU,OAAe,SAAiB;AAClD,SAAO,CAAC,MAAM,KAAK,KAAK,GAAG,OAAO,EAAE,KAAK,IAAK;AAC/C;","names":[]}
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\tExclusionKey,\n\texclusionDescriptions,\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\"minimum\",\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: \"minimum\",\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 undefined:\n\t\t\treturn undefined;\n\t\tcase \"common\":\n\t\tcase \"minimum\":\n\t\tcase \"everything\":\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}\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,EAEC;AAAA,EACA;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,WAAO;AAAA,EACR;AAEA,QAAM,OACL,QAAQ,QACR;AAAA,IACC,MAAM,QAAQ,OAAO;AA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AE,KAAK,IAAK;AAC/C;","names":[]}
@@ -0,0 +1,15 @@
1
+ import { Options, OptionsBase } from '../types.js';
2
+ import 'zod';
3
+ import '../codes.js';
4
+
5
+ type ExclusionKey = keyof Options & `exclude${string}`;
6
+ interface ExclusionDescription {
7
+ hint: string;
8
+ label: string;
9
+ uncommon?: true;
10
+ }
11
+ declare const exclusionDescriptions: Record<ExclusionKey, ExclusionDescription>;
12
+ declare const exclusionKeys: ExclusionKey[];
13
+ declare function getExclusions(options: Partial<Options>, base?: OptionsBase): Partial<Options>;
14
+
15
+ export { type ExclusionDescription, type ExclusionKey, exclusionDescriptions, exclusionKeys, getExclusions };
@@ -0,0 +1,122 @@
1
+ const exclusionDescriptions = {
2
+ excludeAllContributors: {
3
+ hint: "--exclude-all-contributors",
4
+ label: "Add all-contributors to track contributions and display them in a README.md table."
5
+ },
6
+ excludeCompliance: {
7
+ hint: "--exclude-compliance",
8
+ label: "Add a GitHub Actions workflow to verify that PRs match an expected format.",
9
+ uncommon: true
10
+ },
11
+ excludeLintDeprecation: {
12
+ hint: "--exclude-lint-deprecation",
13
+ label: "Include an eslint-plugin-deprecation to reports on usage of code marked as @deprecated.",
14
+ uncommon: true
15
+ },
16
+ excludeLintESLint: {
17
+ hint: "--exclude-lint-eslint",
18
+ label: "Include eslint-plugin-eslint-comment to enforce good practices around ESLint comment directives.",
19
+ uncommon: true
20
+ },
21
+ excludeLintJSDoc: {
22
+ hint: "--exclude-lint-jsdoc",
23
+ label: "Include eslint-plugin-jsdoc to enforce good practices around JSDoc comments.",
24
+ uncommon: true
25
+ },
26
+ excludeLintJson: {
27
+ hint: "--exclude-lint-json",
28
+ label: "Apply linting and sorting to *.json and *.jsonc files.",
29
+ uncommon: true
30
+ },
31
+ excludeLintKnip: {
32
+ hint: "--exclude-lint-knip",
33
+ label: "Add Knip to detect unused files, dependencies, and code exports."
34
+ },
35
+ excludeLintMd: {
36
+ hint: "--exclude-lint-md",
37
+ label: "Apply linting to *.md files.",
38
+ uncommon: true
39
+ },
40
+ excludeLintPackageJson: {
41
+ hint: "--exclude-lint-package-json",
42
+ label: "Add eslint-plugin-package-json to lint for package.json correctness.",
43
+ uncommon: true
44
+ },
45
+ excludeLintPackages: {
46
+ hint: "--exclude-lint-packages",
47
+ label: "Add a pnpm dedupe workflow to ensure packages aren't duplicated unnecessarily.",
48
+ uncommon: true
49
+ },
50
+ excludeLintPerfectionist: {
51
+ hint: "--exclude-lint-perfectionist",
52
+ label: "Apply eslint-plugin-perfectionist to ensure imports, keys, and so on are in sorted order.",
53
+ uncommon: true
54
+ },
55
+ excludeLintRegex: {
56
+ hint: "--exclude-lint-regex",
57
+ label: "Include eslint-plugin-regex to enforce good practices around regular expressions.",
58
+ uncommon: true
59
+ },
60
+ excludeLintSpelling: {
61
+ hint: "--exclude-lint-spelling",
62
+ label: "Add cspell to spell check against dictionaries of known words.",
63
+ uncommon: true
64
+ },
65
+ excludeLintStrict: {
66
+ hint: "--exclude-lint-strict",
67
+ label: "Include strict logical lint rules such as typescript-eslint's strict config. ",
68
+ uncommon: true
69
+ },
70
+ excludeLintStylistic: {
71
+ hint: "--exclude-lint-stylistic",
72
+ label: "Include stylistic lint rules such as typescript-eslint's stylistic config.",
73
+ uncommon: true
74
+ },
75
+ excludeLintYml: {
76
+ hint: "--exclude-lint-yml",
77
+ label: "Apply linting and sorting to *.yaml and *.yml files.",
78
+ uncommon: true
79
+ },
80
+ excludeReleases: {
81
+ hint: "--exclude-releases",
82
+ label: "Add release-it to generate changelogs, package bumps, and publishes based on conventional commits."
83
+ },
84
+ excludeRenovate: {
85
+ hint: "--exclude-renovate",
86
+ label: "Add a Renovate config to keep dependencies up-to-date with PRs."
87
+ },
88
+ excludeTests: {
89
+ hint: "--exclude-tests",
90
+ label: "Add Vitest tooling for fast unit tests, configured with coverage tracking."
91
+ }
92
+ };
93
+ const exclusionKeys = Object.keys(
94
+ exclusionDescriptions
95
+ );
96
+ function getExclusions(options, base) {
97
+ switch (base) {
98
+ case "common":
99
+ return {
100
+ ...Object.fromEntries(
101
+ exclusionKeys.filter((exclusion) => exclusionDescriptions[exclusion].uncommon).map((exclusion) => [exclusion, options[exclusion] ?? true])
102
+ )
103
+ };
104
+ case "minimum":
105
+ return {
106
+ ...Object.fromEntries(
107
+ exclusionKeys.map((exclusion) => [
108
+ exclusion,
109
+ options[exclusion] ?? true
110
+ ])
111
+ )
112
+ };
113
+ default:
114
+ return {};
115
+ }
116
+ }
117
+ export {
118
+ exclusionDescriptions,
119
+ exclusionKeys,
120
+ getExclusions
121
+ };
122
+ //# sourceMappingURL=exclusionKeys.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/shared/options/exclusionKeys.ts"],"sourcesContent":["import { Options, OptionsBase } from \"../types.js\";\n\nexport type ExclusionKey = keyof Options & `exclude${string}`;\n\nexport interface ExclusionDescription {\n\thint: string;\n\tlabel: string;\n\tuncommon?: true;\n}\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\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\tuncommon: true,\n\t\t},\n\t\texcludeLintDeprecation: {\n\t\t\thint: \"--exclude-lint-deprecation\",\n\t\t\tlabel:\n\t\t\t\t\"Include an eslint-plugin-deprecation to reports on usage of code marked as @deprecated.\",\n\t\t\tuncommon: true,\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\tuncommon: true,\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\tuncommon: true,\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\tuncommon: true,\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\tuncommon: true,\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\tuncommon: true,\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\tuncommon: true,\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\tuncommon: true,\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\tuncommon: true,\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\tuncommon: true,\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\tuncommon: true,\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\tuncommon: true,\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\tuncommon: true,\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\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((exclusion) => exclusionDescriptions[exclusion].uncommon)\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 \"minimum\":\n\t\t\treturn {\n\t\t\t\t...Object.fromEntries(\n\t\t\t\t\texclusionKeys.map((exclusion) => [\n\t\t\t\t\t\texclusion,\n\t\t\t\t\t\toptions[exclusion] ?? true,\n\t\t\t\t\t]),\n\t\t\t\t),\n\t\t\t};\n\t\t// We only really care about exclusions on the common and minimum bases\n\t\tdefault:\n\t\t\treturn {};\n\t}\n}\n"],"mappings":"AAUO,MAAM,wBACZ;AAAA,EACC,w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U;AAAA,EACX;AAAA,EACA,iBAAiB;AAAA,IAChB,MAAM;AAAA,IACN,OACC;AAAA,EACF;AAAA,EACA,iBAAiB;AAAA,IAChB,MAAM;AAAA,IACN,OAAO;AAAA,EACR;AAAA,EACA,cAAc;AAAA,IACb,MAAM;AAAA,IACN,OACC;AAAA,EACF;AACD;AAEM,MAAM,gBAAgB,OAAO;AAAA,EACnC;AACD;AAEO,SAAS,cACf,SACA,MACmB;AACnB,UAAQ,MAAM;AAAA,IACb,KAAK;AACJ,aAAO;AAAA,QACN,GAAG,OAAO;AAAA,UACT,cACE,OAAO,CAAC,cAAc,sBAAsB,SAAS,EAAE,QAAQ,EAC/D,IAAI,CAAC,cAAc,CAAC,WAAW,QAAQ,SAAS,KAAK,IAAI,CAAC;AAAA,QAC7D;AAAA,MACD;AAAA,IACD,KAAK;AACJ,aAAO;AAAA,QACN,GAAG,OAAO;AAAA,UACT,cAAc,IAAI,CAAC,cAAc;AAAA,YAChC;AAAA,YACA,QAAQ,SAAS,KAAK;AAAA,UACvB,CAAC;AAAA,QACF;AAAA,MACD;AAAA,IAED;AACC,aAAO,CAAC;AAAA,EACV;AACD;","names":[]}
@@ -212,7 +212,7 @@ echo "See https://github.com/actions-ecosystem/action-remove-labels/issues/221."
212
212
  { run: "pnpm run test --coverage" },
213
213
  {
214
214
  name: "Codecov",
215
- uses: "codecov/codecov-action@v4"
215
+ uses: "codecov/codecov-action@v3"
216
216
  }
217
217
  ]
218
218
  })
@@ -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.4.3`,\n\t\t\t\t\t},\n\t\t\t\t],\n\t\t\t}),\n\t\t}),\n\t\t\"accessibility-alt-text-bot.yml\": createWorkflowFile({\n\t\t\tname: \"Accessibility Alt Text Bot\",\n\t\t\ton: {\n\t\t\t\tissue_comment: {\n\t\t\t\t\ttypes: [\"created\", \"edited\"],\n\t\t\t\t},\n\t\t\t\tissues: {\n\t\t\t\t\ttypes: [\"edited\", \"opened\"],\n\t\t\t\t},\n\t\t\t\tpull_request: {\n\t\t\t\t\ttypes: [\"edited\", \"opened\"],\n\t\t\t\t},\n\t\t\t},\n\t\t\tpermissions: {\n\t\t\t\tissues: \"write\",\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: \"github/accessibility-alt-text-bot@v1.4.0\",\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: [...(options.bin ? [\"pnpm build --no-dts\"] : []), \"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.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\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\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@v4\",\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,MAAM;AAAA,MACN,MAAM,CAAC,UAAU;AAAA,IAClB,CAAC;AAAA,IACD,GAAI,CAAC,QAAQ,qBAAqB;AAAA,MACjC,kBAAkB,mBAAmB;AAAA,QACpC,MAAM;AAAA,QAC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;AAAA,gDAKqB,QAAQ,KAAK,IAAI,QAAQ,UAAU;AAAA,0EACT,QAAQ,UAAU;AAAA;AAAA;AAAA;AAAA,YAItF;AAAA,UACD;AAAA,QACD;AAAA,MACD,CAAC;AAAA,MACD,eAAe,mBAAmB;AAAA,QACjC,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":[]}
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.4.3`,\n\t\t\t\t\t},\n\t\t\t\t],\n\t\t\t}),\n\t\t}),\n\t\t\"accessibility-alt-text-bot.yml\": createWorkflowFile({\n\t\t\tname: \"Accessibility Alt Text Bot\",\n\t\t\ton: {\n\t\t\t\tissue_comment: {\n\t\t\t\t\ttypes: [\"created\", \"edited\"],\n\t\t\t\t},\n\t\t\t\tissues: {\n\t\t\t\t\ttypes: [\"edited\", \"opened\"],\n\t\t\t\t},\n\t\t\t\tpull_request: {\n\t\t\t\t\ttypes: [\"edited\", \"opened\"],\n\t\t\t\t},\n\t\t\t},\n\t\t\tpermissions: {\n\t\t\t\tissues: \"write\",\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: \"github/accessibility-alt-text-bot@v1.4.0\",\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: [...(options.bin ? [\"pnpm build --no-dts\"] : []), \"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.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\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\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,MAAM;AAAA,MACN,MAAM,CAAC,UAAU;AAAA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ACN;AAAA,UACA;AAAA,YACC,MAAM;AAAA,YACN,MAAM;AAAA,cACL,cAAc;AAAA,cACd,oBAAoB;AAAA;AAAA;AAAA;AAAA;AAAA,gDAKqB,QAAQ,KAAK,IAAI,QAAQ,UAAU;AAAA,0EACT,QAAQ,UAAU;AAAA;AAAA;AAAA;AAAA,YAItF;AAAA,UACD;AAAA,QACD;AAAA,MACD,CAAC;AAAA,MACD,eAAe,mBAAmB;AAAA,QACjC,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.57.2",
3
+ "version": "1.57.4",
4
4
  "description": "Quickstart-friendly TypeScript template with comprehensive, configurable, opinionated tooling. 💝",
5
5
  "repository": "JoshuaKGoldberg/create-typescript-app",
6
6
  "license": "MIT",