prismic-ts-codegen 0.1.29-pr.80.577ac11 → 0.1.29-pr.80.9c2a1bb
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/package.json +1 -2
- package/dist/cli/configSchema.d.mts +0 -39
- package/dist/cli/configSchema.d.mts.map +0 -1
- package/dist/cli/constants.d.mts +0 -5
- package/dist/cli/constants.d.mts.map +0 -1
- package/dist/cli.d.mts +0 -1
- package/dist/detectTypesProvider.d.mts +0 -17
- package/dist/detectTypesProvider.d.mts.map +0 -1
- package/dist/generateTypes.d.mts +0 -21
- package/dist/generateTypes.d.mts.map +0 -1
- package/dist/index.d.mts +0 -5
- package/dist/types.d.mts +0 -14
- package/dist/types.d.mts.map +0 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "prismic-ts-codegen",
|
|
3
|
-
"version": "0.1.29-pr.80.
|
|
3
|
+
"version": "0.1.29-pr.80.9c2a1bb",
|
|
4
4
|
"description": "An experimental Prismic model-to-TypeScript-type generator",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"prismic",
|
|
@@ -21,7 +21,6 @@
|
|
|
21
21
|
"bin"
|
|
22
22
|
],
|
|
23
23
|
"type": "module",
|
|
24
|
-
"types": "./dist/index.d.cts",
|
|
25
24
|
"exports": {
|
|
26
25
|
".": "./dist/index.mjs",
|
|
27
26
|
"./package.json": "./package.json"
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import { z } from "zod";
|
|
2
|
-
|
|
3
|
-
//#region src/cli/configSchema.d.ts
|
|
4
|
-
/** Configuration to control the generated types. */
|
|
5
|
-
declare const configSchema: z.ZodObject<{
|
|
6
|
-
repositoryName: z.ZodOptional<z.ZodString>;
|
|
7
|
-
accessToken: z.ZodOptional<z.ZodString>;
|
|
8
|
-
customTypesAPIToken: z.ZodOptional<z.ZodString>;
|
|
9
|
-
output: z.ZodOptional<z.ZodString>;
|
|
10
|
-
typesProvider: z.ZodOptional<z.ZodEnum<{
|
|
11
|
-
"@prismicio/client": "@prismicio/client";
|
|
12
|
-
"@prismicio/types": "@prismicio/types";
|
|
13
|
-
}>>;
|
|
14
|
-
clientIntegration: z.ZodOptional<z.ZodObject<{
|
|
15
|
-
includeCreateClientInterface: z.ZodOptional<z.ZodBoolean>;
|
|
16
|
-
includeContentNamespace: z.ZodOptional<z.ZodBoolean>;
|
|
17
|
-
}, z.core.$strip>>;
|
|
18
|
-
locales: z.ZodOptional<z.ZodUnion<readonly [z.ZodArray<z.ZodString>, z.ZodObject<{
|
|
19
|
-
ids: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
20
|
-
fetchFromRepository: z.ZodOptional<z.ZodBoolean>;
|
|
21
|
-
}, z.core.$strip>]>>;
|
|
22
|
-
models: z.ZodOptional<z.ZodUnion<readonly [z.ZodArray<z.ZodString>, z.ZodObject<{
|
|
23
|
-
files: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
24
|
-
fetchFromRepository: z.ZodOptional<z.ZodBoolean>;
|
|
25
|
-
}, z.core.$strip>]>>;
|
|
26
|
-
fields: z.ZodOptional<z.ZodObject<{
|
|
27
|
-
embed: z.ZodOptional<z.ZodObject<{
|
|
28
|
-
providerTypes: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
29
|
-
}, z.core.$strip>>;
|
|
30
|
-
integrationFields: z.ZodOptional<z.ZodObject<{
|
|
31
|
-
catalogTypes: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
32
|
-
}, z.core.$strip>>;
|
|
33
|
-
}, z.core.$strip>>;
|
|
34
|
-
}, z.core.$strip>;
|
|
35
|
-
/** Configuration to control the generated types. */
|
|
36
|
-
type Config = z.infer<typeof configSchema>;
|
|
37
|
-
//#endregion
|
|
38
|
-
export { Config };
|
|
39
|
-
//# sourceMappingURL=configSchema.d.mts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"configSchema.d.mts","names":[],"sources":["../../src/cli/configSchema.ts"],"mappings":";;;;cAGa,YAAA,EAAY,CAAA,CAAA,SAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAqLb,MAAA,GAAS,CAAA,CAAE,KAAA,QAAa,YAAA"}
|
package/dist/cli/constants.d.mts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"constants.d.mts","names":[],"sources":["../../src/cli/constants.ts"],"mappings":";cAAa,wBAAA"}
|
package/dist/cli.d.mts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { };
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { TypesProvider } from "./generateTypes.mjs";
|
|
2
|
-
|
|
3
|
-
//#region src/detectTypesProvider.d.ts
|
|
4
|
-
type DetectTypesProviderConfig = {
|
|
5
|
-
cwd?: string;
|
|
6
|
-
};
|
|
7
|
-
/**
|
|
8
|
-
* Detects which types provider should be used for a project.
|
|
9
|
-
*
|
|
10
|
-
* @param config - Configures the detection.
|
|
11
|
-
* @returns The types provider identifier to use, or `undefined` if on cannot be
|
|
12
|
-
* determined.
|
|
13
|
-
*/
|
|
14
|
-
declare const detectTypesProvider: (config?: DetectTypesProviderConfig) => Promise<TypesProvider | undefined>;
|
|
15
|
-
//#endregion
|
|
16
|
-
export { DetectTypesProviderConfig, detectTypesProvider };
|
|
17
|
-
//# sourceMappingURL=detectTypesProvider.d.mts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"detectTypesProvider.d.mts","names":[],"sources":["../src/detectTypesProvider.ts"],"mappings":";;;KAIY,yBAAA;EACX,GAAA;AAAA;;;;;AAUD;;;cAAa,mBAAA,GACZ,MAAA,GAAQ,yBAAA,KACN,OAAA,CAAQ,aAAA"}
|
package/dist/generateTypes.d.mts
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { FieldConfigs } from "./types.mjs";
|
|
2
|
-
import { CustomTypeModel, SharedSliceModel } from "@prismicio/client";
|
|
3
|
-
|
|
4
|
-
//#region src/generateTypes.d.ts
|
|
5
|
-
type TypesProvider = "@prismicio/client" | "@prismicio/types";
|
|
6
|
-
type GenerateTypesConfig = {
|
|
7
|
-
customTypeModels?: CustomTypeModel[];
|
|
8
|
-
sharedSliceModels?: SharedSliceModel[];
|
|
9
|
-
localeIDs?: string[];
|
|
10
|
-
fieldConfigs?: FieldConfigs;
|
|
11
|
-
typesProvider?: TypesProvider;
|
|
12
|
-
clientIntegration?: {
|
|
13
|
-
includeCreateClientInterface?: boolean;
|
|
14
|
-
includeContentNamespace?: boolean;
|
|
15
|
-
};
|
|
16
|
-
cache?: boolean;
|
|
17
|
-
};
|
|
18
|
-
declare function generateTypes(config?: GenerateTypesConfig): string;
|
|
19
|
-
//#endregion
|
|
20
|
-
export { GenerateTypesConfig, TypesProvider, generateTypes };
|
|
21
|
-
//# sourceMappingURL=generateTypes.d.mts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"generateTypes.d.mts","names":[],"sources":["../src/generateTypes.ts"],"mappings":";;;;KAWY,aAAA;AAAA,KAIA,mBAAA;EACX,gBAAA,GAAmB,eAAA;EACnB,iBAAA,GAAoB,gBAAA;EACpB,SAAA;EACA,YAAA,GAAe,YAAA;EACf,aAAA,GAAgB,aAAA;EAChB,iBAAA;IACC,4BAAA;IACA,uBAAA;EAAA;EAED,KAAA;AAAA;AAAA,iBAGe,aAAA,CAAc,MAAA,GAAQ,mBAAA"}
|
package/dist/index.d.mts
DELETED
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { GenerateTypesConfig, TypesProvider, generateTypes } from "./generateTypes.mjs";
|
|
2
|
-
import { DetectTypesProviderConfig, detectTypesProvider } from "./detectTypesProvider.mjs";
|
|
3
|
-
import { Config } from "./cli/configSchema.mjs";
|
|
4
|
-
import { NON_EDITABLE_FILE_HEADER } from "./cli/constants.mjs";
|
|
5
|
-
export { type Config, type DetectTypesProviderConfig, type GenerateTypesConfig, NON_EDITABLE_FILE_HEADER, type TypesProvider, detectTypesProvider, generateTypes };
|
package/dist/types.d.mts
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { CustomTypeModel, SharedSliceModel } from "@prismicio/client";
|
|
2
|
-
|
|
3
|
-
//#region src/types.d.ts
|
|
4
|
-
type FieldConfigs = {
|
|
5
|
-
embed?: {
|
|
6
|
-
providerTypes?: Record<string, string>;
|
|
7
|
-
};
|
|
8
|
-
integrationFields?: {
|
|
9
|
-
catalogTypes?: Record<string, string>;
|
|
10
|
-
};
|
|
11
|
-
};
|
|
12
|
-
//#endregion
|
|
13
|
-
export { FieldConfigs };
|
|
14
|
-
//# sourceMappingURL=types.d.mts.map
|
package/dist/types.d.mts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.mts","names":[],"sources":["../src/types.ts"],"mappings":";;;KAyBY,YAAA;EACX,KAAA;IACC,aAAA,GAAgB,MAAA;EAAA;EAEjB,iBAAA;IACC,YAAA,GAAe,MAAA;EAAA;AAAA"}
|