create-typescript-app 2.6.1 → 2.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/base.d.ts CHANGED
@@ -9,16 +9,16 @@ declare const zContributor: z.ZodObject<{
9
9
  name: z.ZodString;
10
10
  profile: z.ZodString;
11
11
  }, "strip", z.ZodTypeAny, {
12
- name: string;
13
12
  avatar_url: string;
14
13
  contributions: string[];
15
14
  login: string;
15
+ name: string;
16
16
  profile: string;
17
17
  }, {
18
- name: string;
19
18
  avatar_url: string;
20
19
  contributions: string[];
21
20
  login: string;
21
+ name: string;
22
22
  profile: string;
23
23
  }>;
24
24
  type Contributor = z.infer<typeof zContributor>;
@@ -33,16 +33,16 @@ declare const base: bingo_stratum.Base<{
33
33
  name: z.ZodString;
34
34
  profile: z.ZodString;
35
35
  }, "strip", z.ZodTypeAny, {
36
- name: string;
37
36
  avatar_url: string;
38
37
  contributions: string[];
39
38
  login: string;
39
+ name: string;
40
40
  profile: string;
41
41
  }, {
42
- name: string;
43
42
  avatar_url: string;
44
43
  contributions: string[];
45
44
  login: string;
45
+ name: string;
46
46
  profile: string;
47
47
  }>, "many">>;
48
48
  description: z.ZodDefault<z.ZodString>;
@@ -84,11 +84,11 @@ declare const base: bingo_stratum.Base<{
84
84
  href: z.ZodString;
85
85
  title: z.ZodString;
86
86
  }, "strip", z.ZodTypeAny, {
87
- title: string;
88
87
  href: string;
89
- }, {
90
88
  title: string;
89
+ }, {
91
90
  href: string;
91
+ title: string;
92
92
  }>>;
93
93
  keywords: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
94
94
  logo: z.ZodOptional<z.ZodObject<{
package/lib/base.js CHANGED
@@ -3,6 +3,7 @@ import { inputFromFile } from "input-from-file";
3
3
  import { inputFromScript } from "input-from-script";
4
4
  import lazyValue from "lazy-value";
5
5
  import { z } from "zod";
6
+ import { readAccess } from "./options/readAccess.js";
6
7
  import { readAllContributors } from "./options/readAllContributors.js";
7
8
  import { readAuthor } from "./options/readAuthor.js";
8
9
  import { readDescription } from "./options/readDescription.js";
@@ -100,6 +101,9 @@ const base = createBase({
100
101
  version: z.string().optional().describe("package version to publish as and store in `package.json`")
101
102
  },
102
103
  prepare({ options, take }) {
104
+ const getAccess = lazyValue(
105
+ async () => await readAccess(getPackageDataFull)
106
+ );
103
107
  const getAllContributors = lazyValue(
104
108
  async () => await readAllContributors(take)
105
109
  );
@@ -182,7 +186,7 @@ const base = createBase({
182
186
  async () => (await getPackageDataFull()).version
183
187
  );
184
188
  return {
185
- access: "public",
189
+ access: getAccess,
186
190
  author: getAuthor,
187
191
  bin: getBin,
188
192
  contributors: getAllContributors,
@@ -1,5 +1,5 @@
1
1
  var name = "create-typescript-app";
2
- var version = "2.6.0";
2
+ var version = "2.6.1";
3
3
  var description = "Quickstart-friendly TypeScript template with comprehensive, configurable, opinionated tooling. 🎁";
4
4
  var repository = {
5
5
  type: "git",
@@ -0,0 +1,5 @@
1
+ import { PartialPackageData } from '../types.js';
2
+
3
+ declare function readAccess(getPackageDataFull: () => Promise<PartialPackageData | undefined>): Promise<"public" | "restricted">;
4
+
5
+ export { readAccess };
@@ -0,0 +1,6 @@
1
+ async function readAccess(getPackageDataFull) {
2
+ return (await getPackageDataFull())?.publishConfig?.access ?? "public";
3
+ }
4
+ export {
5
+ readAccess
6
+ };
package/lib/types.d.ts CHANGED
@@ -23,6 +23,7 @@ interface PartialPackageData {
23
23
  };
24
24
  name?: string;
25
25
  packageManager?: string;
26
+ publishConfig?: PartialPublishConfig;
26
27
  repository?: string | {
27
28
  type: string;
28
29
  url: string;
@@ -30,5 +31,8 @@ interface PartialPackageData {
30
31
  scripts?: Record<string, string>;
31
32
  version?: string;
32
33
  }
34
+ interface PartialPublishConfig {
35
+ access?: "public" | "restricted";
36
+ }
33
37
 
34
38
  export type { AllContributorContributor, AllContributorsData, PartialPackageData };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-typescript-app",
3
- "version": "2.6.1",
3
+ "version": "2.7.0",
4
4
  "description": "Quickstart-friendly TypeScript template with comprehensive, configurable, opinionated tooling. 🎁",
5
5
  "repository": {
6
6
  "type": "git",