@tinacms/schema-tools 1.3.2 → 1.3.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/dist/index.es.js +36 -35
- package/dist/index.js +36 -35
- package/dist/schema/TinaSchema.d.ts +11 -21
- package/dist/schema/resolveField.d.ts +3 -9
- package/dist/schema/resolveForm.d.ts +152 -2
- package/dist/types/index.d.ts +666 -5
- package/dist/validate/fields.d.ts +2 -2
- package/dist/validate/index.d.ts +3 -7
- package/dist/validate/schema.d.ts +57 -32
- package/dist/validate/tinaCloudSchemaConfig.d.ts +2 -2
- package/package.json +2 -10
- package/dist/types/SchemaTypes.d.ts +0 -475
- package/dist/types/config.d.ts +0 -40
- package/dist/types/schema2.d.ts +0 -127
- package/dist/types/types2.d.ts +0 -445
- package/dist/types.d.ts +0 -556
- package/dist/types.es.js +0 -1
- package/dist/types.js +0 -5
|
@@ -2,82 +2,103 @@
|
|
|
2
2
|
|
|
3
3
|
*/
|
|
4
4
|
import { z } from 'zod';
|
|
5
|
+
export declare const CollectionBaseSchema: z.ZodObject<{
|
|
6
|
+
label: z.ZodOptional<z.ZodString>;
|
|
7
|
+
name: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
|
|
8
|
+
path: z.ZodEffects<z.ZodString, string, string>;
|
|
9
|
+
format: z.ZodOptional<z.ZodEnum<["json", "md", "markdown", "mdx", "toml", "yaml", "yml"]>>;
|
|
10
|
+
}, "strip", z.ZodTypeAny, {
|
|
11
|
+
name?: string;
|
|
12
|
+
label?: string;
|
|
13
|
+
path?: string;
|
|
14
|
+
format?: "markdown" | "mdx" | "json" | "md" | "yaml" | "yml" | "toml";
|
|
15
|
+
}, {
|
|
16
|
+
name?: string;
|
|
17
|
+
label?: string;
|
|
18
|
+
path?: string;
|
|
19
|
+
format?: "markdown" | "mdx" | "json" | "md" | "yaml" | "yml" | "toml";
|
|
20
|
+
}>;
|
|
5
21
|
export declare const TinaCloudSchemaZod: z.ZodEffects<z.ZodObject<{
|
|
6
22
|
collections: z.ZodArray<z.ZodEffects<z.ZodObject<z.extendShape<{
|
|
7
23
|
label: z.ZodOptional<z.ZodString>;
|
|
8
24
|
name: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
|
|
25
|
+
path: z.ZodEffects<z.ZodString, string, string>;
|
|
9
26
|
format: z.ZodOptional<z.ZodEnum<["json", "md", "markdown", "mdx", "toml", "yaml", "yml"]>>;
|
|
10
27
|
}, {
|
|
11
|
-
fields: z.ZodEffects<z.ZodEffects<z.ZodOptional<z.ZodArray<z.ZodType<import("..").
|
|
28
|
+
fields: z.ZodEffects<z.ZodEffects<z.ZodOptional<z.ZodArray<z.ZodType<import("..").TinaField<false>, z.ZodTypeDef, import("..").TinaField<false>>, "many">>, import("..").TinaField<false>[], import("..").TinaField<false>[]>, import("..").TinaField<false>[], import("..").TinaField<false>[]>;
|
|
12
29
|
templates: z.ZodEffects<z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodObject<{
|
|
13
30
|
label: z.ZodString;
|
|
14
31
|
name: z.ZodEffects<z.ZodString, string, string>;
|
|
15
|
-
fields: z.ZodArray<z.ZodType<import("..").
|
|
32
|
+
fields: z.ZodArray<z.ZodType<import("..").TinaField<false>, z.ZodTypeDef, import("..").TinaField<false>>, "many">;
|
|
16
33
|
}, "strip", z.ZodTypeAny, {
|
|
17
34
|
name?: string;
|
|
18
|
-
fields?: import("..").
|
|
35
|
+
fields?: import("..").TinaField<false>[];
|
|
19
36
|
label?: string;
|
|
20
37
|
}, {
|
|
21
38
|
name?: string;
|
|
22
|
-
fields?: import("..").
|
|
39
|
+
fields?: import("..").TinaField<false>[];
|
|
23
40
|
label?: string;
|
|
24
41
|
}>, {
|
|
25
42
|
name?: string;
|
|
26
|
-
fields?: import("..").
|
|
43
|
+
fields?: import("..").TinaField<false>[];
|
|
27
44
|
label?: string;
|
|
28
45
|
}, {
|
|
29
46
|
name?: string;
|
|
30
|
-
fields?: import("..").
|
|
47
|
+
fields?: import("..").TinaField<false>[];
|
|
31
48
|
label?: string;
|
|
32
49
|
}>, "many">>, {
|
|
33
50
|
name?: string;
|
|
34
|
-
fields?: import("..").
|
|
51
|
+
fields?: import("..").TinaField<false>[];
|
|
35
52
|
label?: string;
|
|
36
53
|
}[], {
|
|
37
54
|
name?: string;
|
|
38
|
-
fields?: import("..").
|
|
55
|
+
fields?: import("..").TinaField<false>[];
|
|
39
56
|
label?: string;
|
|
40
57
|
}[]>;
|
|
41
58
|
}>, "strip", z.ZodTypeAny, {
|
|
42
59
|
name?: string;
|
|
43
|
-
fields?: import("..").TinaFieldInner<false>[];
|
|
44
60
|
templates?: {
|
|
45
61
|
name?: string;
|
|
46
|
-
fields?: import("..").
|
|
62
|
+
fields?: import("..").TinaField<false>[];
|
|
47
63
|
label?: string;
|
|
48
64
|
}[];
|
|
49
|
-
|
|
65
|
+
fields?: import("..").TinaField<false>[];
|
|
50
66
|
label?: string;
|
|
67
|
+
path?: string;
|
|
68
|
+
format?: "markdown" | "mdx" | "json" | "md" | "yaml" | "yml" | "toml";
|
|
51
69
|
}, {
|
|
52
70
|
name?: string;
|
|
53
|
-
fields?: import("..").TinaFieldInner<false>[];
|
|
54
71
|
templates?: {
|
|
55
72
|
name?: string;
|
|
56
|
-
fields?: import("..").
|
|
73
|
+
fields?: import("..").TinaField<false>[];
|
|
57
74
|
label?: string;
|
|
58
75
|
}[];
|
|
59
|
-
|
|
76
|
+
fields?: import("..").TinaField<false>[];
|
|
60
77
|
label?: string;
|
|
78
|
+
path?: string;
|
|
79
|
+
format?: "markdown" | "mdx" | "json" | "md" | "yaml" | "yml" | "toml";
|
|
61
80
|
}>, {
|
|
62
81
|
name?: string;
|
|
63
|
-
fields?: import("..").TinaFieldInner<false>[];
|
|
64
82
|
templates?: {
|
|
65
83
|
name?: string;
|
|
66
|
-
fields?: import("..").
|
|
84
|
+
fields?: import("..").TinaField<false>[];
|
|
67
85
|
label?: string;
|
|
68
86
|
}[];
|
|
69
|
-
|
|
87
|
+
fields?: import("..").TinaField<false>[];
|
|
70
88
|
label?: string;
|
|
89
|
+
path?: string;
|
|
90
|
+
format?: "markdown" | "mdx" | "json" | "md" | "yaml" | "yml" | "toml";
|
|
71
91
|
}, {
|
|
72
92
|
name?: string;
|
|
73
|
-
fields?: import("..").TinaFieldInner<false>[];
|
|
74
93
|
templates?: {
|
|
75
94
|
name?: string;
|
|
76
|
-
fields?: import("..").
|
|
95
|
+
fields?: import("..").TinaField<false>[];
|
|
77
96
|
label?: string;
|
|
78
97
|
}[];
|
|
79
|
-
|
|
98
|
+
fields?: import("..").TinaField<false>[];
|
|
80
99
|
label?: string;
|
|
100
|
+
path?: string;
|
|
101
|
+
format?: "markdown" | "mdx" | "json" | "md" | "yaml" | "yml" | "toml";
|
|
81
102
|
}>, "many">;
|
|
82
103
|
config: z.ZodOptional<z.ZodObject<{
|
|
83
104
|
client: z.ZodOptional<z.ZodObject<{
|
|
@@ -138,14 +159,15 @@ export declare const TinaCloudSchemaZod: z.ZodEffects<z.ZodObject<{
|
|
|
138
159
|
}, "strip", z.ZodTypeAny, {
|
|
139
160
|
collections?: {
|
|
140
161
|
name?: string;
|
|
141
|
-
fields?: import("..").TinaFieldInner<false>[];
|
|
142
162
|
templates?: {
|
|
143
163
|
name?: string;
|
|
144
|
-
fields?: import("..").
|
|
164
|
+
fields?: import("..").TinaField<false>[];
|
|
145
165
|
label?: string;
|
|
146
166
|
}[];
|
|
147
|
-
|
|
167
|
+
fields?: import("..").TinaField<false>[];
|
|
148
168
|
label?: string;
|
|
169
|
+
path?: string;
|
|
170
|
+
format?: "markdown" | "mdx" | "json" | "md" | "yaml" | "yml" | "toml";
|
|
149
171
|
}[];
|
|
150
172
|
config?: {
|
|
151
173
|
client?: {
|
|
@@ -162,14 +184,15 @@ export declare const TinaCloudSchemaZod: z.ZodEffects<z.ZodObject<{
|
|
|
162
184
|
}, {
|
|
163
185
|
collections?: {
|
|
164
186
|
name?: string;
|
|
165
|
-
fields?: import("..").TinaFieldInner<false>[];
|
|
166
187
|
templates?: {
|
|
167
188
|
name?: string;
|
|
168
|
-
fields?: import("..").
|
|
189
|
+
fields?: import("..").TinaField<false>[];
|
|
169
190
|
label?: string;
|
|
170
191
|
}[];
|
|
171
|
-
|
|
192
|
+
fields?: import("..").TinaField<false>[];
|
|
172
193
|
label?: string;
|
|
194
|
+
path?: string;
|
|
195
|
+
format?: "markdown" | "mdx" | "json" | "md" | "yaml" | "yml" | "toml";
|
|
173
196
|
}[];
|
|
174
197
|
config?: {
|
|
175
198
|
client?: {
|
|
@@ -186,14 +209,15 @@ export declare const TinaCloudSchemaZod: z.ZodEffects<z.ZodObject<{
|
|
|
186
209
|
}>, {
|
|
187
210
|
collections?: {
|
|
188
211
|
name?: string;
|
|
189
|
-
fields?: import("..").TinaFieldInner<false>[];
|
|
190
212
|
templates?: {
|
|
191
213
|
name?: string;
|
|
192
|
-
fields?: import("..").
|
|
214
|
+
fields?: import("..").TinaField<false>[];
|
|
193
215
|
label?: string;
|
|
194
216
|
}[];
|
|
195
|
-
|
|
217
|
+
fields?: import("..").TinaField<false>[];
|
|
196
218
|
label?: string;
|
|
219
|
+
path?: string;
|
|
220
|
+
format?: "markdown" | "mdx" | "json" | "md" | "yaml" | "yml" | "toml";
|
|
197
221
|
}[];
|
|
198
222
|
config?: {
|
|
199
223
|
client?: {
|
|
@@ -210,14 +234,15 @@ export declare const TinaCloudSchemaZod: z.ZodEffects<z.ZodObject<{
|
|
|
210
234
|
}, {
|
|
211
235
|
collections?: {
|
|
212
236
|
name?: string;
|
|
213
|
-
fields?: import("..").TinaFieldInner<false>[];
|
|
214
237
|
templates?: {
|
|
215
238
|
name?: string;
|
|
216
|
-
fields?: import("..").
|
|
239
|
+
fields?: import("..").TinaField<false>[];
|
|
217
240
|
label?: string;
|
|
218
241
|
}[];
|
|
219
|
-
|
|
242
|
+
fields?: import("..").TinaField<false>[];
|
|
220
243
|
label?: string;
|
|
244
|
+
path?: string;
|
|
245
|
+
format?: "markdown" | "mdx" | "json" | "md" | "yaml" | "yml" | "toml";
|
|
221
246
|
}[];
|
|
222
247
|
config?: {
|
|
223
248
|
client?: {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
|
|
3
3
|
*/
|
|
4
|
-
import {
|
|
4
|
+
import { Config } from '../types/index';
|
|
5
5
|
import z from 'zod';
|
|
6
6
|
export declare const tinaConfigZod: z.ZodObject<{
|
|
7
7
|
client: z.ZodOptional<z.ZodObject<{
|
|
@@ -59,4 +59,4 @@ export declare const tinaConfigZod: z.ZodObject<{
|
|
|
59
59
|
loadCustomStore?: (...args: unknown[]) => unknown;
|
|
60
60
|
};
|
|
61
61
|
}>;
|
|
62
|
-
export declare const validateTinaCloudSchemaConfig: (config: unknown) =>
|
|
62
|
+
export declare const validateTinaCloudSchemaConfig: (config: unknown) => Config;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tinacms/schema-tools",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.4",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"module": "./dist/index.es.js",
|
|
6
6
|
"exports": {
|
|
@@ -8,11 +8,6 @@
|
|
|
8
8
|
"types": "./dist/index.d.ts",
|
|
9
9
|
"import": "./dist/index.es.js",
|
|
10
10
|
"require": "./dist/index.js"
|
|
11
|
-
},
|
|
12
|
-
"./dist/types": {
|
|
13
|
-
"types": "./dist/types.d.ts",
|
|
14
|
-
"import": "./dist/types.es.js",
|
|
15
|
-
"require": "./dist/types.js"
|
|
16
11
|
}
|
|
17
12
|
},
|
|
18
13
|
"typings": "dist/index.d.ts",
|
|
@@ -24,14 +19,11 @@
|
|
|
24
19
|
"entryPoints": [
|
|
25
20
|
{
|
|
26
21
|
"name": "src/index.ts"
|
|
27
|
-
},
|
|
28
|
-
{
|
|
29
|
-
"name": "src/types.ts"
|
|
30
22
|
}
|
|
31
23
|
]
|
|
32
24
|
},
|
|
33
25
|
"devDependencies": {
|
|
34
|
-
"@tinacms/scripts": "1.0.
|
|
26
|
+
"@tinacms/scripts": "1.0.4",
|
|
35
27
|
"@types/yup": "^0.29.10",
|
|
36
28
|
"jest": "^27.0.6",
|
|
37
29
|
"react": "17.0.2",
|