@tinacms/schema-tools 1.3.2 → 1.3.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.
@@ -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("..").TinaFieldInner<false>, z.ZodTypeDef, import("..").TinaFieldInner<false>>, "many">>, import("..").TinaFieldInner<false>[], import("..").TinaFieldInner<false>[]>, import("..").TinaFieldInner<false>[], import("..").TinaFieldInner<false>[]>;
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("..").TinaFieldInner<false>, z.ZodTypeDef, import("..").TinaFieldInner<false>>, "many">;
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("..").TinaFieldInner<false>[];
35
+ fields?: import("..").TinaField<false>[];
19
36
  label?: string;
20
37
  }, {
21
38
  name?: string;
22
- fields?: import("..").TinaFieldInner<false>[];
39
+ fields?: import("..").TinaField<false>[];
23
40
  label?: string;
24
41
  }>, {
25
42
  name?: string;
26
- fields?: import("..").TinaFieldInner<false>[];
43
+ fields?: import("..").TinaField<false>[];
27
44
  label?: string;
28
45
  }, {
29
46
  name?: string;
30
- fields?: import("..").TinaFieldInner<false>[];
47
+ fields?: import("..").TinaField<false>[];
31
48
  label?: string;
32
49
  }>, "many">>, {
33
50
  name?: string;
34
- fields?: import("..").TinaFieldInner<false>[];
51
+ fields?: import("..").TinaField<false>[];
35
52
  label?: string;
36
53
  }[], {
37
54
  name?: string;
38
- fields?: import("..").TinaFieldInner<false>[];
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("..").TinaFieldInner<false>[];
62
+ fields?: import("..").TinaField<false>[];
47
63
  label?: string;
48
64
  }[];
49
- format?: "markdown" | "mdx" | "json" | "md" | "yaml" | "yml" | "toml";
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("..").TinaFieldInner<false>[];
73
+ fields?: import("..").TinaField<false>[];
57
74
  label?: string;
58
75
  }[];
59
- format?: "markdown" | "mdx" | "json" | "md" | "yaml" | "yml" | "toml";
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("..").TinaFieldInner<false>[];
84
+ fields?: import("..").TinaField<false>[];
67
85
  label?: string;
68
86
  }[];
69
- format?: "markdown" | "mdx" | "json" | "md" | "yaml" | "yml" | "toml";
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("..").TinaFieldInner<false>[];
95
+ fields?: import("..").TinaField<false>[];
77
96
  label?: string;
78
97
  }[];
79
- format?: "markdown" | "mdx" | "json" | "md" | "yaml" | "yml" | "toml";
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("..").TinaFieldInner<false>[];
164
+ fields?: import("..").TinaField<false>[];
145
165
  label?: string;
146
166
  }[];
147
- format?: "markdown" | "mdx" | "json" | "md" | "yaml" | "yml" | "toml";
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("..").TinaFieldInner<false>[];
189
+ fields?: import("..").TinaField<false>[];
169
190
  label?: string;
170
191
  }[];
171
- format?: "markdown" | "mdx" | "json" | "md" | "yaml" | "yml" | "toml";
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("..").TinaFieldInner<false>[];
214
+ fields?: import("..").TinaField<false>[];
193
215
  label?: string;
194
216
  }[];
195
- format?: "markdown" | "mdx" | "json" | "md" | "yaml" | "yml" | "toml";
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("..").TinaFieldInner<false>[];
239
+ fields?: import("..").TinaField<false>[];
217
240
  label?: string;
218
241
  }[];
219
- format?: "markdown" | "mdx" | "json" | "md" | "yaml" | "yml" | "toml";
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 { TinaCloudSchemaConfig } from '../types/index';
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) => TinaCloudSchemaConfig;
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.2",
3
+ "version": "1.3.3",
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.2",
26
+ "@tinacms/scripts": "1.0.3",
35
27
  "@types/yup": "^0.29.10",
36
28
  "jest": "^27.0.6",
37
29
  "react": "17.0.2",