create-typescript-app 2.15.7 → 2.16.1

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.
@@ -103,7 +103,7 @@ Please do ping the maintainer who merged your PR if that doesn't happen within 2
103
103
  ## Emojis & Appreciation
104
104
 
105
105
  If you made it all the way to the end, bravo dear user, we love you.
106
- Please include your favorite emoji in the bottom of your issues and PRs to signal to us that you did in fact read this file and are trying to conform to it as best as possible.
106
+ Please include an emoji in the bottom of your issues and PRs to signal to us that you did in fact read this file and are trying to conform to it as best as possible.
107
107
  ${options.emoji} is a good starter if you're not sure which to use.
108
108
  `
109
109
  }
@@ -0,0 +1,66 @@
1
+ import * as bingo_stratum from 'bingo-stratum';
2
+
3
+ declare const blockMain: bingo_stratum.BlockWithAddons<{
4
+ runArgs: string[];
5
+ filePath?: string | undefined;
6
+ }, {
7
+ access: "public" | "restricted";
8
+ description: string;
9
+ directory: string;
10
+ email: {
11
+ github: string;
12
+ npm: string;
13
+ };
14
+ title: string;
15
+ owner: string;
16
+ repository: string;
17
+ author?: string | undefined;
18
+ bin?: string | Record<string, string> | undefined;
19
+ contributors?: {
20
+ avatar_url: string;
21
+ contributions: string[];
22
+ login: string;
23
+ name: string;
24
+ profile: string;
25
+ }[] | undefined;
26
+ documentation?: string | undefined;
27
+ emoji?: string | undefined;
28
+ existingLabels?: {
29
+ name: string;
30
+ description: string;
31
+ color: string;
32
+ }[] | undefined;
33
+ explainer?: string[] | undefined;
34
+ funding?: string | undefined;
35
+ guide?: {
36
+ href: string;
37
+ title: string;
38
+ } | undefined;
39
+ keywords?: string[] | undefined;
40
+ logo?: {
41
+ alt: string;
42
+ src: string;
43
+ height?: number | undefined;
44
+ width?: number | undefined;
45
+ } | undefined;
46
+ node?: {
47
+ minimum: string;
48
+ pinned?: string | undefined;
49
+ } | undefined;
50
+ packageData?: {
51
+ dependencies?: Record<string, string> | undefined;
52
+ devDependencies?: Record<string, string> | undefined;
53
+ scripts?: Record<string, string> | undefined;
54
+ } | undefined;
55
+ pnpm?: string | undefined;
56
+ rulesetId?: string | undefined;
57
+ usage?: string | undefined;
58
+ version?: string | undefined;
59
+ words?: string[] | undefined;
60
+ workflowsVersions?: Record<string, Record<string, {
61
+ pinned?: boolean | undefined;
62
+ hash?: string | undefined;
63
+ }>> | undefined;
64
+ }>;
65
+
66
+ export { blockMain };
@@ -0,0 +1,33 @@
1
+ import { z } from "zod";
2
+ import { base } from "../base.js";
3
+ import { blockPackageJson } from "./blockPackageJson.js";
4
+ import { blockTSup } from "./blockTSup.js";
5
+ const blockMain = base.createBlock({
6
+ about: {
7
+ name: "Main"
8
+ },
9
+ addons: {
10
+ filePath: z.string().optional(),
11
+ runArgs: z.array(z.string()).default([])
12
+ },
13
+ produce({ addons }) {
14
+ const { filePath = "lib/index.js", runArgs } = addons;
15
+ return {
16
+ addons: [
17
+ blockPackageJson({
18
+ properties: {
19
+ main: filePath
20
+ }
21
+ }),
22
+ blockTSup({
23
+ runInCI: [
24
+ `node ${filePath}${runArgs.map((arg) => ` ${arg}`).join("")}`
25
+ ]
26
+ })
27
+ ]
28
+ };
29
+ }
30
+ });
31
+ export {
32
+ blockMain
33
+ };
@@ -1,4 +1,3 @@
1
- import * as htmlToText from "html-to-text";
2
1
  import removeUndefinedObjects from "remove-undefined-objects";
3
2
  import semver from "semver";
4
3
  import sortPackageJson from "sort-package-json";
@@ -6,6 +5,7 @@ import { z } from "zod";
6
5
  import { PackageJson } from "zod-package-json";
7
6
  import { base } from "../base.js";
8
7
  import { blockRemoveFiles } from "./blockRemoveFiles.js";
8
+ import { htmlToTextSafe } from "./html/htmlToTextSafe.js";
9
9
  import { CommandPhase } from "./phases.js";
10
10
  const PackageJsonWithNullableScripts = PackageJson.partial().extend({
11
11
  scripts: z.record(z.string(), z.union([z.string(), z.undefined()])).optional()
@@ -30,9 +30,7 @@ const blockPackageJson = base.createBlock({
30
30
  ...addons.properties.devDependencies
31
31
  }
32
32
  );
33
- const description = htmlToText.convert(options.description, {
34
- wordwrap: false
35
- });
33
+ const description = htmlToTextSafe(options.description);
36
34
  return {
37
35
  files: {
38
36
  "package.json": sortPackageJson(
@@ -62,7 +60,6 @@ const blockPackageJson = base.createBlock({
62
60
  (keyword) => keyword.split(/ /)
63
61
  ),
64
62
  license: "MIT",
65
- main: "lib/index.js",
66
63
  name: options.repository,
67
64
  repository: {
68
65
  type: "git",
@@ -1,11 +1,11 @@
1
- import * as htmlToText from "html-to-text";
2
1
  import { base } from "../base.js";
2
+ import { htmlToTextSafe } from "./html/htmlToTextSafe.js";
3
3
  const blockRepositorySettings = base.createBlock({
4
4
  about: {
5
5
  name: "Repository Settings"
6
6
  },
7
7
  produce({ options }) {
8
- const description = htmlToText.convert(options.description);
8
+ const description = htmlToTextSafe(options.description);
9
9
  return {
10
10
  requests: [
11
11
  {
@@ -2,7 +2,7 @@ import * as bingo_stratum from 'bingo-stratum';
2
2
 
3
3
  declare const blockTSup: bingo_stratum.BlockWithAddons<{
4
4
  entry: string[];
5
- runArgs: string[];
5
+ runInCI: string[];
6
6
  }, {
7
7
  access: "public" | "restricted";
8
8
  description: string;
@@ -15,7 +15,7 @@ const blockTSup = base.createBlock({
15
15
  },
16
16
  addons: {
17
17
  entry: z.array(z.string()).default([]),
18
- runArgs: z.array(z.string()).default([])
18
+ runInCI: z.array(z.string()).default([])
19
19
  },
20
20
  produce({ addons, options }) {
21
21
  const { entry } = addons;
@@ -49,9 +49,7 @@ pnpm build --watch
49
49
  name: "Build",
50
50
  steps: [
51
51
  { run: "pnpm build" },
52
- {
53
- run: `node lib/index.js${addons.runArgs.map((arg) => ` ${arg}`).join("")}`
54
- }
52
+ ...addons.runInCI.map((run) => ({ run }))
55
53
  ]
56
54
  }
57
55
  ]
@@ -79,7 +79,6 @@ export * from "./types.js";
79
79
  properties: {
80
80
  devDependencies: getPackageDependencies("typescript"),
81
81
  files: ["lib/"],
82
- main: "lib/index.js",
83
82
  scripts: {
84
83
  tsc: "tsc"
85
84
  }
@@ -0,0 +1,3 @@
1
+ declare function htmlToTextSafe(raw: string): string;
2
+
3
+ export { htmlToTextSafe };
@@ -0,0 +1,7 @@
1
+ import { convert } from "html-to-text";
2
+ function htmlToTextSafe(raw) {
3
+ return convert(raw, { wordwrap: false });
4
+ }
5
+ export {
6
+ htmlToTextSafe
7
+ };
@@ -24,6 +24,7 @@ export { blockGitHubIssueTemplates } from './blockGitHubIssueTemplates.js';
24
24
  export { blockGitHubPRTemplate } from './blockGitHubPRTemplate.js';
25
25
  export { blockGitignore } from './blockGitignore.js';
26
26
  export { blockKnip } from './blockKnip.js';
27
+ export { blockMain } from './blockMain.js';
27
28
  export { blockMarkdownlint } from './blockMarkdownlint.js';
28
29
  export { blockMITLicense } from './blockMITLicense.js';
29
30
  export { blockNcc } from './blockNcc.js';
@@ -1527,6 +1528,68 @@ declare const blocks: {
1527
1528
  hash?: string | undefined;
1528
1529
  }>> | undefined;
1529
1530
  }>;
1531
+ blockMain: bingo_stratum.BlockWithAddons<{
1532
+ runArgs: string[];
1533
+ filePath?: string | undefined;
1534
+ }, {
1535
+ access: "public" | "restricted";
1536
+ description: string;
1537
+ directory: string;
1538
+ email: {
1539
+ github: string;
1540
+ npm: string;
1541
+ };
1542
+ title: string;
1543
+ owner: string;
1544
+ repository: string;
1545
+ author?: string | undefined;
1546
+ bin?: string | Record<string, string> | undefined;
1547
+ contributors?: {
1548
+ avatar_url: string;
1549
+ contributions: string[];
1550
+ login: string;
1551
+ name: string;
1552
+ profile: string;
1553
+ }[] | undefined;
1554
+ documentation?: string | undefined;
1555
+ emoji?: string | undefined;
1556
+ existingLabels?: {
1557
+ name: string;
1558
+ description: string;
1559
+ color: string;
1560
+ }[] | undefined;
1561
+ explainer?: string[] | undefined;
1562
+ funding?: string | undefined;
1563
+ guide?: {
1564
+ href: string;
1565
+ title: string;
1566
+ } | undefined;
1567
+ keywords?: string[] | undefined;
1568
+ logo?: {
1569
+ alt: string;
1570
+ src: string;
1571
+ height?: number | undefined;
1572
+ width?: number | undefined;
1573
+ } | undefined;
1574
+ node?: {
1575
+ minimum: string;
1576
+ pinned?: string | undefined;
1577
+ } | undefined;
1578
+ packageData?: {
1579
+ dependencies?: Record<string, string> | undefined;
1580
+ devDependencies?: Record<string, string> | undefined;
1581
+ scripts?: Record<string, string> | undefined;
1582
+ } | undefined;
1583
+ pnpm?: string | undefined;
1584
+ rulesetId?: string | undefined;
1585
+ usage?: string | undefined;
1586
+ version?: string | undefined;
1587
+ words?: string[] | undefined;
1588
+ workflowsVersions?: Record<string, Record<string, {
1589
+ pinned?: boolean | undefined;
1590
+ hash?: string | undefined;
1591
+ }>> | undefined;
1592
+ }>;
1530
1593
  blockMarkdownlint: bingo_stratum.BlockWithAddons<{
1531
1594
  ignores: string[];
1532
1595
  }, {
@@ -2573,7 +2636,7 @@ declare const blocks: {
2573
2636
  }>;
2574
2637
  blockTSup: bingo_stratum.BlockWithAddons<{
2575
2638
  entry: string[];
2576
- runArgs: string[];
2639
+ runInCI: string[];
2577
2640
  }, {
2578
2641
  access: "public" | "restricted";
2579
2642
  description: string;
@@ -22,6 +22,7 @@ import { blockGitHubIssueTemplates } from "./blockGitHubIssueTemplates.js";
22
22
  import { blockGitHubPRTemplate } from "./blockGitHubPRTemplate.js";
23
23
  import { blockGitignore } from "./blockGitignore.js";
24
24
  import { blockKnip } from "./blockKnip.js";
25
+ import { blockMain } from "./blockMain.js";
25
26
  import { blockMarkdownlint } from "./blockMarkdownlint.js";
26
27
  import { blockMITLicense } from "./blockMITLicense.js";
27
28
  import { blockNcc } from "./blockNcc.js";
@@ -67,6 +68,7 @@ const blocks = {
67
68
  blockGitHubPRTemplate,
68
69
  blockGitignore,
69
70
  blockKnip,
71
+ blockMain,
70
72
  blockMarkdownlint,
71
73
  blockMITLicense,
72
74
  blockNcc,
@@ -113,6 +115,7 @@ import { blockGitHubIssueTemplates as blockGitHubIssueTemplates2 } from "./block
113
115
  import { blockGitHubPRTemplate as blockGitHubPRTemplate2 } from "./blockGitHubPRTemplate.js";
114
116
  import { blockGitignore as blockGitignore2 } from "./blockGitignore.js";
115
117
  import { blockKnip as blockKnip2 } from "./blockKnip.js";
118
+ import { blockMain as blockMain2 } from "./blockMain.js";
116
119
  import { blockMarkdownlint as blockMarkdownlint2 } from "./blockMarkdownlint.js";
117
120
  import { blockMITLicense as blockMITLicense2 } from "./blockMITLicense.js";
118
121
  import { blockNcc as blockNcc2 } from "./blockNcc.js";
@@ -160,6 +163,7 @@ export {
160
163
  blockGitignore2 as blockGitignore,
161
164
  blockKnip2 as blockKnip,
162
165
  blockMITLicense2 as blockMITLicense,
166
+ blockMain2 as blockMain,
163
167
  blockMarkdownlint2 as blockMarkdownlint,
164
168
  blockNcc2 as blockNcc,
165
169
  blockNvmrc2 as blockNvmrc,
@@ -1,5 +1,5 @@
1
1
  var name = "create-typescript-app";
2
- var version = "2.15.6";
2
+ var version = "2.16.0";
3
3
  var description = "Quickstart-friendly TypeScript template with comprehensive, configurable, opinionated tooling. 🎁";
4
4
  var repository = {
5
5
  type: "git",
package/lib/index.d.ts CHANGED
@@ -31,6 +31,7 @@ export { blockGitHubIssueTemplates } from './blocks/blockGitHubIssueTemplates.js
31
31
  export { blockGitHubPRTemplate } from './blocks/blockGitHubPRTemplate.js';
32
32
  export { blockGitignore } from './blocks/blockGitignore.js';
33
33
  export { blockKnip } from './blocks/blockKnip.js';
34
+ export { blockMain } from './blocks/blockMain.js';
34
35
  export { blockMarkdownlint } from './blocks/blockMarkdownlint.js';
35
36
  export { blockMITLicense } from './blocks/blockMITLicense.js';
36
37
  export { blockNcc } from './blocks/blockNcc.js';
@@ -9,6 +9,7 @@ import { blockGitHubApps } from "../blocks/blockGitHubApps.js";
9
9
  import { blockGitHubIssueTemplates } from "../blocks/blockGitHubIssueTemplates.js";
10
10
  import { blockGitHubPRTemplate } from "../blocks/blockGitHubPRTemplate.js";
11
11
  import { blockGitignore } from "../blocks/blockGitignore.js";
12
+ import { blockMain } from "../blocks/blockMain.js";
12
13
  import { blockMITLicense } from "../blocks/blockMITLicense.js";
13
14
  import { blockPackageJson } from "../blocks/blockPackageJson.js";
14
15
  import { blockPrettier } from "../blocks/blockPrettier.js";
@@ -40,6 +41,7 @@ const presetMinimal = base.createPreset({
40
41
  blockGitHubIssueTemplates,
41
42
  blockGitHubPRTemplate,
42
43
  blockGitignore,
44
+ blockMain,
43
45
  blockMITLicense,
44
46
  blockPackageJson,
45
47
  blockPrettier,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-typescript-app",
3
- "version": "2.15.7",
3
+ "version": "2.16.1",
4
4
  "description": "Quickstart-friendly TypeScript template with comprehensive, configurable, opinionated tooling. 🎁",
5
5
  "repository": {
6
6
  "type": "git",