create-typescript-app 2.15.1 โ†’ 2.15.3

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.
Files changed (78) hide show
  1. package/README.md +2 -2
  2. package/lib/base.d.ts +1 -1
  3. package/lib/base.js +1 -1
  4. package/lib/blocks/bin/getPrimaryBin.d.ts +3 -0
  5. package/lib/blocks/bin/getPrimaryBin.js +6 -0
  6. package/lib/blocks/blockAllContributors.d.ts +1 -1
  7. package/lib/blocks/blockAllContributors.js +12 -4
  8. package/lib/blocks/blockAreTheTypesWrong.d.ts +1 -1
  9. package/lib/blocks/blockCSpell.d.ts +1 -1
  10. package/lib/blocks/blockCTATransitions.d.ts +1 -1
  11. package/lib/blocks/blockCodecov.d.ts +1 -1
  12. package/lib/blocks/blockCodecov.js +10 -0
  13. package/lib/blocks/blockContributingDocs.d.ts +1 -1
  14. package/lib/blocks/blockContributorCovenant.d.ts +1 -1
  15. package/lib/blocks/blockContributorCovenant.js +12 -0
  16. package/lib/blocks/blockDevelopmentDocs.d.ts +1 -1
  17. package/lib/blocks/blockESLint.d.ts +1 -1
  18. package/lib/blocks/blockESLintComments.d.ts +1 -1
  19. package/lib/blocks/blockESLintJSDoc.d.ts +1 -1
  20. package/lib/blocks/blockESLintJSONC.d.ts +1 -1
  21. package/lib/blocks/blockESLintMarkdown.d.ts +1 -1
  22. package/lib/blocks/blockESLintMoreStyling.d.ts +1 -1
  23. package/lib/blocks/blockESLintNode.d.ts +1 -1
  24. package/lib/blocks/blockESLintPackageJson.d.ts +1 -1
  25. package/lib/blocks/blockESLintPerfectionist.d.ts +1 -1
  26. package/lib/blocks/blockESLintRegexp.d.ts +1 -1
  27. package/lib/blocks/blockESLintYML.d.ts +1 -1
  28. package/lib/blocks/blockExampleFiles.d.ts +1 -1
  29. package/lib/blocks/blockFunding.d.ts +1 -1
  30. package/lib/blocks/blockGitHubActionsCI.d.ts +1 -1
  31. package/lib/blocks/blockGitHubApps.d.ts +1 -1
  32. package/lib/blocks/blockGitHubIssueTemplates.d.ts +1 -1
  33. package/lib/blocks/blockGitHubPRTemplate.d.ts +1 -1
  34. package/lib/blocks/blockGitignore.d.ts +1 -1
  35. package/lib/blocks/blockKnip.d.ts +1 -1
  36. package/lib/blocks/blockMITLicense.d.ts +1 -1
  37. package/lib/blocks/blockMITLicense.js +11 -1
  38. package/lib/blocks/blockMarkdownlint.d.ts +1 -1
  39. package/lib/blocks/blockNcc.d.ts +1 -1
  40. package/lib/blocks/blockNvmrc.d.ts +1 -1
  41. package/lib/blocks/blockPRCompliance.d.ts +1 -1
  42. package/lib/blocks/blockPackageJson.d.ts +1 -1
  43. package/lib/blocks/blockPackageJson.js +8 -1
  44. package/lib/blocks/blockPnpmDedupe.d.ts +1 -1
  45. package/lib/blocks/blockPrettier.d.ts +1 -1
  46. package/lib/blocks/blockPrettierPluginCurly.d.ts +1 -1
  47. package/lib/blocks/blockPrettierPluginPackageJson.d.ts +1 -1
  48. package/lib/blocks/blockPrettierPluginSh.d.ts +1 -1
  49. package/lib/blocks/blockREADME.d.ts +10 -2
  50. package/lib/blocks/blockREADME.js +36 -11
  51. package/lib/blocks/blockReleaseIt.d.ts +1 -1
  52. package/lib/blocks/blockReleaseIt.js +10 -0
  53. package/lib/blocks/blockRemoveDependencies.d.ts +1 -1
  54. package/lib/blocks/blockRemoveFiles.d.ts +1 -1
  55. package/lib/blocks/blockRemoveWorkflows.d.ts +1 -1
  56. package/lib/blocks/blockRenovate.d.ts +1 -1
  57. package/lib/blocks/blockRepositoryBranchRuleset.d.ts +1 -1
  58. package/lib/blocks/blockRepositoryLabels.d.ts +1 -1
  59. package/lib/blocks/blockRepositorySecrets.d.ts +1 -1
  60. package/lib/blocks/blockRepositorySettings.d.ts +1 -1
  61. package/lib/blocks/blockSecurityDocs.d.ts +1 -1
  62. package/lib/blocks/blockTSup.d.ts +1 -1
  63. package/lib/blocks/blockTemplatedWith.d.ts +1 -1
  64. package/lib/blocks/blockTypeScript.d.ts +1 -1
  65. package/lib/blocks/blockTypeScript.js +4 -2
  66. package/lib/blocks/blockVSCode.d.ts +1 -1
  67. package/lib/blocks/blockVSCode.js +4 -2
  68. package/lib/blocks/blockVitest.d.ts +1 -1
  69. package/lib/blocks/index.d.ts +53 -45
  70. package/lib/data/packageData.d.ts +1 -1
  71. package/lib/index.d.ts +2 -2
  72. package/lib/presets/common.d.ts +1 -1
  73. package/lib/presets/everything.d.ts +1 -1
  74. package/lib/presets/index.d.ts +3 -3
  75. package/lib/presets/minimal.d.ts +1 -1
  76. package/lib/template.d.ts +1 -1
  77. package/lib/types.d.ts +1 -1
  78. package/package.json +1 -1
package/README.md CHANGED
@@ -13,8 +13,8 @@
13
13
  <!-- prettier-ignore-end -->
14
14
  <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>
15
15
  <a href="https://codecov.io/gh/JoshuaKGoldberg/create-typescript-app" target="_blank"><img alt="๐Ÿงช Coverage" src="https://img.shields.io/codecov/c/github/JoshuaKGoldberg/create-typescript-app?label=%F0%9F%A7%AA%20coverage" /></a>
16
- <a href="https://github.com/JoshuaKGoldberg/create-typescript-app/blob/main/LICENSE.md" target="_blank"><img alt="๐Ÿ“ License: MIT" src="https://img.shields.io/badge/%F0%9F%93%9D_license-MIT-21bb42.svg"></a>
17
- <a href="http://npmjs.com/package/create-typescript-app"><img alt="๐Ÿ“ฆ npm version" src="https://img.shields.io/npm/v/create-typescript-app?color=21bb42&label=%F0%9F%93%A6%20npm" /></a>
16
+ <a href="https://github.com/JoshuaKGoldberg/create-typescript-app/blob/main/LICENSE.md" target="_blank"><img alt="๐Ÿ“ License: MIT" src="https://img.shields.io/badge/%F0%9F%93%9D_license-MIT-21bb42.svg" /></a>
17
+ <a href="http://npmjs.com/package/create-typescript-app" target="_blank"><img alt="๐Ÿ“ฆ npm version" src="https://img.shields.io/npm/v/create-typescript-app?color=21bb42&label=%F0%9F%93%A6%20npm" /></a>
18
18
  <img alt="๐Ÿ’ช TypeScript: Strict" src="https://img.shields.io/badge/%F0%9F%92%AA_typescript-strict-21bb42.svg" />
19
19
  </p>
20
20
 
package/lib/base.d.ts CHANGED
@@ -5,7 +5,7 @@ import { z } from 'zod';
5
5
  declare const base: bingo_stratum.Base<{
6
6
  access: z.ZodUnion<[z.ZodLiteral<"public">, z.ZodLiteral<"restricted">]>;
7
7
  author: z.ZodOptional<z.ZodString>;
8
- bin: z.ZodOptional<z.ZodString>;
8
+ bin: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodRecord<z.ZodString, z.ZodString>]>>;
9
9
  contributors: z.ZodOptional<z.ZodArray<z.ZodObject<{
10
10
  avatar_url: z.ZodString;
11
11
  contributions: z.ZodArray<z.ZodString, "many">;
package/lib/base.js CHANGED
@@ -37,7 +37,7 @@ const base = createBase({
37
37
  options: {
38
38
  access: z.union([z.literal("public"), z.literal("restricted")]).describe("which `npm publish --access` to release npm packages with"),
39
39
  author: z.string().optional().describe("username on npm to publish packages under"),
40
- bin: z.string().optional().describe('value to set in `package.json`\'s `"bin"` property'),
40
+ bin: z.union([z.string(), z.record(z.string())]).optional().describe('value to set in `package.json`\'s `"bin"` property'),
41
41
  contributors: z.array(zContributor).optional().describe("AllContributors contributors to store in .all-contributorsrc"),
42
42
  description: z.string().default("A very lovely package. Hooray!").describe("'Sentence case.' description of the repository"),
43
43
  directory: z.string().describe("Directory to create the repository in"),
@@ -0,0 +1,3 @@
1
+ declare function getPrimaryBin(bin: Record<string, string | undefined> | string | undefined, repository: string): string | undefined;
2
+
3
+ export { getPrimaryBin };
@@ -0,0 +1,6 @@
1
+ function getPrimaryBin(bin, repository) {
2
+ return typeof bin === "object" ? bin[repository] : bin;
3
+ }
4
+ export {
5
+ getPrimaryBin
6
+ };
@@ -12,7 +12,7 @@ declare const blockAllContributors: bingo_stratum.BlockWithoutAddons<{
12
12
  owner: string;
13
13
  repository: string;
14
14
  author?: string | undefined;
15
- bin?: string | undefined;
15
+ bin?: string | Record<string, string> | undefined;
16
16
  contributors?: {
17
17
  avatar_url: string;
18
18
  contributions: string[];
@@ -20,11 +20,19 @@ const blockAllContributors = base.createBlock({
20
20
  }),
21
21
  blockREADME({
22
22
  badges: [
23
- `<!-- prettier-ignore-start -->
24
- <!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section -->
25
- <a href="#contributors" target="_blank"><img alt="\u{1F46A} All Contributors: ${contributions}" src="https://img.shields.io/badge/%F0%9F%91%AA_all_contributors-${contributions}-21bb42.svg" /></a>
23
+ {
24
+ alt: `\u{1F46A} All Contributors: ${contributions}`,
25
+ comments: {
26
+ after: `
26
27
  <!-- ALL-CONTRIBUTORS-BADGE:END -->
27
- <!-- prettier-ignore-end -->`
28
+ <!-- prettier-ignore-end -->`,
29
+ before: `<!-- prettier-ignore-start -->
30
+ <!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section -->
31
+ `
32
+ },
33
+ href: "#contributors",
34
+ src: `https://img.shields.io/badge/%F0%9F%91%AA_all_contributors-${contributions}-21bb42.svg`
35
+ }
28
36
  ],
29
37
  sections: options.contributors ? [printAllContributorsTable(options.contributors)] : void 0
30
38
  }),
@@ -12,7 +12,7 @@ declare const blockAreTheTypesWrong: bingo_stratum.BlockWithoutAddons<{
12
12
  owner: string;
13
13
  repository: string;
14
14
  author?: string | undefined;
15
- bin?: string | undefined;
15
+ bin?: string | Record<string, string> | undefined;
16
16
  contributors?: {
17
17
  avatar_url: string;
18
18
  contributions: string[];
@@ -15,7 +15,7 @@ declare const blockCSpell: bingo_stratum.BlockWithAddons<{
15
15
  owner: string;
16
16
  repository: string;
17
17
  author?: string | undefined;
18
- bin?: string | undefined;
18
+ bin?: string | Record<string, string> | undefined;
19
19
  contributors?: {
20
20
  avatar_url: string;
21
21
  contributions: string[];
@@ -12,7 +12,7 @@ declare const blockCTATransitions: bingo_stratum.BlockWithoutAddons<{
12
12
  owner: string;
13
13
  repository: string;
14
14
  author?: string | undefined;
15
- bin?: string | undefined;
15
+ bin?: string | Record<string, string> | undefined;
16
16
  contributors?: {
17
17
  avatar_url: string;
18
18
  contributions: string[];
@@ -14,7 +14,7 @@ declare const blockCodecov: bingo_stratum.BlockWithAddons<{
14
14
  owner: string;
15
15
  repository: string;
16
16
  author?: string | undefined;
17
- bin?: string | undefined;
17
+ bin?: string | Record<string, string> | undefined;
18
18
  contributors?: {
19
19
  avatar_url: string;
20
20
  contributions: string[];
@@ -2,6 +2,7 @@ import { z } from "zod";
2
2
  import { base } from "../base.js";
3
3
  import { resolveUses } from "./actions/resolveUses.js";
4
4
  import { blockGitHubApps } from "./blockGitHubApps.js";
5
+ import { blockREADME } from "./blockREADME.js";
5
6
  import { blockRemoveFiles } from "./blockRemoveFiles.js";
6
7
  import { blockVitest } from "./blockVitest.js";
7
8
  const blockCodecov = base.createBlock({
@@ -21,6 +22,15 @@ const blockCodecov = base.createBlock({
21
22
  }
22
23
  ]
23
24
  }),
25
+ blockREADME({
26
+ badges: [
27
+ {
28
+ alt: "\u{1F9EA} Coverage",
29
+ href: `https://codecov.io/gh/${options.owner}/${options.repository}`,
30
+ src: `https://img.shields.io/codecov/c/github/${options.owner}/${options.repository}?label=%F0%9F%A7%AA%20coverage`
31
+ }
32
+ ]
33
+ }),
24
34
  blockVitest({
25
35
  actionSteps: [
26
36
  {
@@ -12,7 +12,7 @@ declare const blockContributingDocs: bingo_stratum.BlockWithoutAddons<{
12
12
  owner: string;
13
13
  repository: string;
14
14
  author?: string | undefined;
15
- bin?: string | undefined;
15
+ bin?: string | Record<string, string> | undefined;
16
16
  contributors?: {
17
17
  avatar_url: string;
18
18
  contributions: string[];
@@ -12,7 +12,7 @@ declare const blockContributorCovenant: bingo_stratum.BlockWithoutAddons<{
12
12
  owner: string;
13
13
  repository: string;
14
14
  author?: string | undefined;
15
- bin?: string | undefined;
15
+ bin?: string | Record<string, string> | undefined;
16
16
  contributors?: {
17
17
  avatar_url: string;
18
18
  contributions: string[];
@@ -1,4 +1,5 @@
1
1
  import { base } from "../base.js";
2
+ import { blockREADME } from "./blockREADME.js";
2
3
  import { blockRemoveFiles } from "./blockRemoveFiles.js";
3
4
  const blockContributorCovenant = base.createBlock({
4
5
  about: {
@@ -6,6 +7,17 @@ const blockContributorCovenant = base.createBlock({
6
7
  },
7
8
  produce({ options }) {
8
9
  return {
10
+ addons: [
11
+ blockREADME({
12
+ badges: [
13
+ {
14
+ alt: "\u{1F91D} Code of Conduct: Kept",
15
+ href: `https://github.com/${options.owner}/${options.repository}/blob/main/.github/CODE_OF_CONDUCT.md`,
16
+ src: "https://img.shields.io/badge/%F0%9F%A4%9D_code_of_conduct-kept-21bb42"
17
+ }
18
+ ]
19
+ })
20
+ ],
9
21
  files: {
10
22
  ".github": {
11
23
  "CODE_OF_CONDUCT.md": `# Contributor Covenant Code of Conduct
@@ -26,7 +26,7 @@ declare const blockDevelopmentDocs: bingo_stratum.BlockWithAddons<{
26
26
  owner: string;
27
27
  repository: string;
28
28
  author?: string | undefined;
29
- bin?: string | undefined;
29
+ bin?: string | Record<string, string> | undefined;
30
30
  contributors?: {
31
31
  avatar_url: string;
32
32
  contributions: string[];
@@ -38,7 +38,7 @@ declare const blockESLint: bingo_stratum.BlockWithAddons<{
38
38
  owner: string;
39
39
  repository: string;
40
40
  author?: string | undefined;
41
- bin?: string | undefined;
41
+ bin?: string | Record<string, string> | undefined;
42
42
  contributors?: {
43
43
  avatar_url: string;
44
44
  contributions: string[];
@@ -12,7 +12,7 @@ declare const blockESLintComments: bingo_stratum.BlockWithoutAddons<{
12
12
  owner: string;
13
13
  repository: string;
14
14
  author?: string | undefined;
15
- bin?: string | undefined;
15
+ bin?: string | Record<string, string> | undefined;
16
16
  contributors?: {
17
17
  avatar_url: string;
18
18
  contributions: string[];
@@ -12,7 +12,7 @@ declare const blockESLintJSDoc: bingo_stratum.BlockWithoutAddons<{
12
12
  owner: string;
13
13
  repository: string;
14
14
  author?: string | undefined;
15
- bin?: string | undefined;
15
+ bin?: string | Record<string, string> | undefined;
16
16
  contributors?: {
17
17
  avatar_url: string;
18
18
  contributions: string[];
@@ -12,7 +12,7 @@ declare const blockESLintJSONC: bingo_stratum.BlockWithoutAddons<{
12
12
  owner: string;
13
13
  repository: string;
14
14
  author?: string | undefined;
15
- bin?: string | undefined;
15
+ bin?: string | Record<string, string> | undefined;
16
16
  contributors?: {
17
17
  avatar_url: string;
18
18
  contributions: string[];
@@ -12,7 +12,7 @@ declare const blockESLintMarkdown: bingo_stratum.BlockWithoutAddons<{
12
12
  owner: string;
13
13
  repository: string;
14
14
  author?: string | undefined;
15
- bin?: string | undefined;
15
+ bin?: string | Record<string, string> | undefined;
16
16
  contributors?: {
17
17
  avatar_url: string;
18
18
  contributions: string[];
@@ -12,7 +12,7 @@ declare const blockESLintMoreStyling: bingo_stratum.BlockWithoutAddons<{
12
12
  owner: string;
13
13
  repository: string;
14
14
  author?: string | undefined;
15
- bin?: string | undefined;
15
+ bin?: string | Record<string, string> | undefined;
16
16
  contributors?: {
17
17
  avatar_url: string;
18
18
  contributions: string[];
@@ -12,7 +12,7 @@ declare const blockESLintNode: bingo_stratum.BlockWithoutAddons<{
12
12
  owner: string;
13
13
  repository: string;
14
14
  author?: string | undefined;
15
- bin?: string | undefined;
15
+ bin?: string | Record<string, string> | undefined;
16
16
  contributors?: {
17
17
  avatar_url: string;
18
18
  contributions: string[];
@@ -12,7 +12,7 @@ declare const blockESLintPackageJson: bingo_stratum.BlockWithoutAddons<{
12
12
  owner: string;
13
13
  repository: string;
14
14
  author?: string | undefined;
15
- bin?: string | undefined;
15
+ bin?: string | Record<string, string> | undefined;
16
16
  contributors?: {
17
17
  avatar_url: string;
18
18
  contributions: string[];
@@ -12,7 +12,7 @@ declare const blockESLintPerfectionist: bingo_stratum.BlockWithoutAddons<{
12
12
  owner: string;
13
13
  repository: string;
14
14
  author?: string | undefined;
15
- bin?: string | undefined;
15
+ bin?: string | Record<string, string> | undefined;
16
16
  contributors?: {
17
17
  avatar_url: string;
18
18
  contributions: string[];
@@ -12,7 +12,7 @@ declare const blockESLintRegexp: bingo_stratum.BlockWithoutAddons<{
12
12
  owner: string;
13
13
  repository: string;
14
14
  author?: string | undefined;
15
- bin?: string | undefined;
15
+ bin?: string | Record<string, string> | undefined;
16
16
  contributors?: {
17
17
  avatar_url: string;
18
18
  contributions: string[];
@@ -12,7 +12,7 @@ declare const blockESLintYML: bingo_stratum.BlockWithoutAddons<{
12
12
  owner: string;
13
13
  repository: string;
14
14
  author?: string | undefined;
15
- bin?: string | undefined;
15
+ bin?: string | Record<string, string> | undefined;
16
16
  contributors?: {
17
17
  avatar_url: string;
18
18
  contributions: string[];
@@ -14,7 +14,7 @@ declare const blockExampleFiles: bingo_stratum.BlockWithAddons<{
14
14
  owner: string;
15
15
  repository: string;
16
16
  author?: string | undefined;
17
- bin?: string | undefined;
17
+ bin?: string | Record<string, string> | undefined;
18
18
  contributors?: {
19
19
  avatar_url: string;
20
20
  contributions: string[];
@@ -12,7 +12,7 @@ declare const blockFunding: bingo_stratum.BlockWithoutAddons<{
12
12
  owner: string;
13
13
  repository: string;
14
14
  author?: string | undefined;
15
- bin?: string | undefined;
15
+ bin?: string | Record<string, string> | undefined;
16
16
  contributors?: {
17
17
  avatar_url: string;
18
18
  contributions: string[];
@@ -53,7 +53,7 @@ declare const blockGitHubActionsCI: bingo_stratum.BlockWithAddons<{
53
53
  owner: string;
54
54
  repository: string;
55
55
  author?: string | undefined;
56
- bin?: string | undefined;
56
+ bin?: string | Record<string, string> | undefined;
57
57
  contributors?: {
58
58
  avatar_url: string;
59
59
  contributions: string[];
@@ -17,7 +17,7 @@ declare const blockGitHubApps: bingo_stratum.BlockWithAddons<{
17
17
  owner: string;
18
18
  repository: string;
19
19
  author?: string | undefined;
20
- bin?: string | undefined;
20
+ bin?: string | Record<string, string> | undefined;
21
21
  contributors?: {
22
22
  avatar_url: string;
23
23
  contributions: string[];
@@ -12,7 +12,7 @@ declare const blockGitHubIssueTemplates: bingo_stratum.BlockWithoutAddons<{
12
12
  owner: string;
13
13
  repository: string;
14
14
  author?: string | undefined;
15
- bin?: string | undefined;
15
+ bin?: string | Record<string, string> | undefined;
16
16
  contributors?: {
17
17
  avatar_url: string;
18
18
  contributions: string[];
@@ -12,7 +12,7 @@ declare const blockGitHubPRTemplate: bingo_stratum.BlockWithoutAddons<{
12
12
  owner: string;
13
13
  repository: string;
14
14
  author?: string | undefined;
15
- bin?: string | undefined;
15
+ bin?: string | Record<string, string> | undefined;
16
16
  contributors?: {
17
17
  avatar_url: string;
18
18
  contributions: string[];
@@ -14,7 +14,7 @@ declare const blockGitignore: bingo_stratum.BlockWithAddons<{
14
14
  owner: string;
15
15
  repository: string;
16
16
  author?: string | undefined;
17
- bin?: string | undefined;
17
+ bin?: string | Record<string, string> | undefined;
18
18
  contributors?: {
19
19
  avatar_url: string;
20
20
  contributions: string[];
@@ -14,7 +14,7 @@ declare const blockKnip: bingo_stratum.BlockWithAddons<{
14
14
  owner: string;
15
15
  repository: string;
16
16
  author?: string | undefined;
17
- bin?: string | undefined;
17
+ bin?: string | Record<string, string> | undefined;
18
18
  contributors?: {
19
19
  avatar_url: string;
20
20
  contributions: string[];
@@ -12,7 +12,7 @@ declare const blockMITLicense: bingo_stratum.BlockWithoutAddons<{
12
12
  owner: string;
13
13
  repository: string;
14
14
  author?: string | undefined;
15
- bin?: string | undefined;
15
+ bin?: string | Record<string, string> | undefined;
16
16
  contributors?: {
17
17
  avatar_url: string;
18
18
  contributions: string[];
@@ -1,12 +1,22 @@
1
1
  import { base } from "../base.js";
2
2
  import { blockPackageJson } from "./blockPackageJson.js";
3
+ import { blockREADME } from "./blockREADME.js";
3
4
  const blockMITLicense = base.createBlock({
4
5
  about: {
5
6
  name: "MIT License"
6
7
  },
7
- produce() {
8
+ produce({ options }) {
8
9
  return {
9
10
  addons: [
11
+ blockREADME({
12
+ badges: [
13
+ {
14
+ alt: "\u{1F4DD} License: MIT",
15
+ href: `https://github.com/${options.owner}/${options.repository}/blob/main/LICENSE.md`,
16
+ src: "https://img.shields.io/badge/%F0%9F%93%9D_license-MIT-21bb42.svg"
17
+ }
18
+ ]
19
+ }),
10
20
  blockPackageJson({
11
21
  properties: {
12
22
  files: ["LICENSE.md"],
@@ -14,7 +14,7 @@ declare const blockMarkdownlint: bingo_stratum.BlockWithAddons<{
14
14
  owner: string;
15
15
  repository: string;
16
16
  author?: string | undefined;
17
- bin?: string | undefined;
17
+ bin?: string | Record<string, string> | undefined;
18
18
  contributors?: {
19
19
  avatar_url: string;
20
20
  contributions: string[];
@@ -12,7 +12,7 @@ declare const blockNcc: bingo_stratum.BlockWithoutAddons<{
12
12
  owner: string;
13
13
  repository: string;
14
14
  author?: string | undefined;
15
- bin?: string | undefined;
15
+ bin?: string | Record<string, string> | undefined;
16
16
  contributors?: {
17
17
  avatar_url: string;
18
18
  contributions: string[];
@@ -12,7 +12,7 @@ declare const blockNvmrc: bingo_stratum.BlockWithoutAddons<{
12
12
  owner: string;
13
13
  repository: string;
14
14
  author?: string | undefined;
15
- bin?: string | undefined;
15
+ bin?: string | Record<string, string> | undefined;
16
16
  contributors?: {
17
17
  avatar_url: string;
18
18
  contributions: string[];
@@ -12,7 +12,7 @@ declare const blockPRCompliance: bingo_stratum.BlockWithoutAddons<{
12
12
  owner: string;
13
13
  repository: string;
14
14
  author?: string | undefined;
15
- bin?: string | undefined;
15
+ bin?: string | Record<string, string> | undefined;
16
16
  contributors?: {
17
17
  avatar_url: string;
18
18
  contributions: string[];
@@ -89,7 +89,7 @@ declare const blockPackageJson: bingo_stratum.BlockWithAddons<{
89
89
  owner: string;
90
90
  repository: string;
91
91
  author?: string | undefined;
92
- bin?: string | undefined;
92
+ bin?: string | Record<string, string> | undefined;
93
93
  contributors?: {
94
94
  avatar_url: string;
95
95
  contributions: string[];
@@ -53,7 +53,7 @@ const blockPackageJson = base.createBlock({
53
53
  packageManager: `pnpm@${options.pnpm}`
54
54
  },
55
55
  files: [
56
- options.bin?.replace(/^\.\//, ""),
56
+ ...collectBinFiles(options.bin),
57
57
  ...addons.properties.files ?? [],
58
58
  "package.json",
59
59
  "README.md"
@@ -95,6 +95,13 @@ const blockPackageJson = base.createBlock({
95
95
  };
96
96
  }
97
97
  });
98
+ function collectBinFiles(bin) {
99
+ if (!bin) {
100
+ return [];
101
+ }
102
+ const files = typeof bin === "object" ? Object.values(bin) : [bin];
103
+ return files.map((file) => file.replace(/^\.\//, ""));
104
+ }
98
105
  function removeRangePrefix(version) {
99
106
  return version.replaceAll(/[\^~><=]/gu, "").split(" ")[0];
100
107
  }
@@ -12,7 +12,7 @@ declare const blockPnpmDedupe: bingo_stratum.BlockWithoutAddons<{
12
12
  owner: string;
13
13
  repository: string;
14
14
  author?: string | undefined;
15
- bin?: string | undefined;
15
+ bin?: string | Record<string, string> | undefined;
16
16
  contributors?: {
17
17
  avatar_url: string;
18
18
  contributions: string[];
@@ -21,7 +21,7 @@ declare const blockPrettier: bingo_stratum.BlockWithAddons<{
21
21
  owner: string;
22
22
  repository: string;
23
23
  author?: string | undefined;
24
- bin?: string | undefined;
24
+ bin?: string | Record<string, string> | undefined;
25
25
  contributors?: {
26
26
  avatar_url: string;
27
27
  contributions: string[];
@@ -12,7 +12,7 @@ declare const blockPrettierPluginCurly: bingo_stratum.BlockWithoutAddons<{
12
12
  owner: string;
13
13
  repository: string;
14
14
  author?: string | undefined;
15
- bin?: string | undefined;
15
+ bin?: string | Record<string, string> | undefined;
16
16
  contributors?: {
17
17
  avatar_url: string;
18
18
  contributions: string[];
@@ -12,7 +12,7 @@ declare const blockPrettierPluginPackageJson: bingo_stratum.BlockWithoutAddons<{
12
12
  owner: string;
13
13
  repository: string;
14
14
  author?: string | undefined;
15
- bin?: string | undefined;
15
+ bin?: string | Record<string, string> | undefined;
16
16
  contributors?: {
17
17
  avatar_url: string;
18
18
  contributions: string[];
@@ -12,7 +12,7 @@ declare const blockPrettierPluginSh: bingo_stratum.BlockWithoutAddons<{
12
12
  owner: string;
13
13
  repository: string;
14
14
  author?: string | undefined;
15
- bin?: string | undefined;
15
+ bin?: string | Record<string, string> | undefined;
16
16
  contributors?: {
17
17
  avatar_url: string;
18
18
  contributions: string[];
@@ -2,7 +2,15 @@ import * as bingo_stratum from 'bingo-stratum';
2
2
 
3
3
  declare const blockREADME: bingo_stratum.BlockWithAddons<{
4
4
  sections: string[];
5
- badges: string[];
5
+ badges: {
6
+ alt: string;
7
+ src: string;
8
+ href?: string | undefined;
9
+ comments?: {
10
+ before: string;
11
+ after: string;
12
+ } | undefined;
13
+ }[];
6
14
  notices: string[];
7
15
  }, {
8
16
  access: "public" | "restricted";
@@ -16,7 +24,7 @@ declare const blockREADME: bingo_stratum.BlockWithAddons<{
16
24
  owner: string;
17
25
  repository: string;
18
26
  author?: string | undefined;
19
- bin?: string | undefined;
27
+ bin?: string | Record<string, string> | undefined;
20
28
  contributors?: {
21
29
  avatar_url: string;
22
30
  contributions: string[];