@tinacms/schema-tools 0.0.0-00d7b85-20251222014449
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/LICENSE +176 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.js +2789 -0
- package/dist/schema/TinaSchema.d.ts +101 -0
- package/dist/schema/addNamespaceToSchema.d.ts +8 -0
- package/dist/schema/index.d.ts +7 -0
- package/dist/schema/resolveField.d.ts +14 -0
- package/dist/schema/resolveForm.d.ts +26 -0
- package/dist/types/index.d.ts +971 -0
- package/dist/util/hasDuplicates.d.ts +10 -0
- package/dist/util/index.d.ts +9 -0
- package/dist/util/lastItem.d.ts +4 -0
- package/dist/util/namer.d.ts +19 -0
- package/dist/util/normalizePath.d.ts +9 -0
- package/dist/util/parseURL.d.ts +10 -0
- package/dist/util/parseZodErrors.d.ts +7 -0
- package/dist/util/sequential.d.ts +14 -0
- package/dist/util/validate.d.ts +6 -0
- package/dist/validate/fields.d.ts +3 -0
- package/dist/validate/index.d.ts +8 -0
- package/dist/validate/properties.d.ts +5 -0
- package/dist/validate/schema.d.ts +552 -0
- package/dist/validate/tinaCloudSchemaConfig.d.ts +230 -0
- package/dist/validate/util.d.ts +3 -0
- package/package.json +52 -0
|
@@ -0,0 +1,230 @@
|
|
|
1
|
+
/**
|
|
2
|
+
|
|
3
|
+
*/
|
|
4
|
+
import { Config } from '../types/index';
|
|
5
|
+
import z from 'zod';
|
|
6
|
+
export declare const tinaConfigZod: z.ZodObject<{
|
|
7
|
+
client: z.ZodOptional<z.ZodObject<{
|
|
8
|
+
referenceDepth: z.ZodOptional<z.ZodNumber>;
|
|
9
|
+
}, "strip", z.ZodTypeAny, {
|
|
10
|
+
referenceDepth?: number;
|
|
11
|
+
}, {
|
|
12
|
+
referenceDepth?: number;
|
|
13
|
+
}>>;
|
|
14
|
+
media: z.ZodOptional<z.ZodObject<{
|
|
15
|
+
tina: z.ZodOptional<z.ZodObject<{
|
|
16
|
+
publicFolder: z.ZodString;
|
|
17
|
+
mediaRoot: z.ZodString;
|
|
18
|
+
static: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
19
|
+
}, "strict", z.ZodTypeAny, {
|
|
20
|
+
publicFolder?: string;
|
|
21
|
+
mediaRoot?: string;
|
|
22
|
+
static?: boolean;
|
|
23
|
+
}, {
|
|
24
|
+
publicFolder?: string;
|
|
25
|
+
mediaRoot?: string;
|
|
26
|
+
static?: boolean;
|
|
27
|
+
}>>;
|
|
28
|
+
loadCustomStore: z.ZodOptional<z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodUnknown>>;
|
|
29
|
+
}, "strip", z.ZodTypeAny, {
|
|
30
|
+
tina?: {
|
|
31
|
+
publicFolder?: string;
|
|
32
|
+
mediaRoot?: string;
|
|
33
|
+
static?: boolean;
|
|
34
|
+
};
|
|
35
|
+
loadCustomStore?: (...args: unknown[]) => unknown;
|
|
36
|
+
}, {
|
|
37
|
+
tina?: {
|
|
38
|
+
publicFolder?: string;
|
|
39
|
+
mediaRoot?: string;
|
|
40
|
+
static?: boolean;
|
|
41
|
+
};
|
|
42
|
+
loadCustomStore?: (...args: unknown[]) => unknown;
|
|
43
|
+
}>>;
|
|
44
|
+
search: z.ZodOptional<z.ZodObject<{
|
|
45
|
+
tina: z.ZodOptional<z.ZodObject<{
|
|
46
|
+
indexerToken: z.ZodOptional<z.ZodString>;
|
|
47
|
+
stopwordLanguages: z.ZodOptional<z.ZodArray<z.ZodString, "atleastone">>;
|
|
48
|
+
tokenSplitRegex: z.ZodOptional<z.ZodString>;
|
|
49
|
+
fuzzyEnabled: z.ZodOptional<z.ZodBoolean>;
|
|
50
|
+
fuzzyOptions: z.ZodOptional<z.ZodObject<{
|
|
51
|
+
maxDistance: z.ZodOptional<z.ZodNumber>;
|
|
52
|
+
minSimilarity: z.ZodOptional<z.ZodNumber>;
|
|
53
|
+
maxResults: z.ZodOptional<z.ZodNumber>;
|
|
54
|
+
useTranspositions: z.ZodOptional<z.ZodBoolean>;
|
|
55
|
+
caseSensitive: z.ZodOptional<z.ZodBoolean>;
|
|
56
|
+
}, "strict", z.ZodTypeAny, {
|
|
57
|
+
maxDistance?: number;
|
|
58
|
+
minSimilarity?: number;
|
|
59
|
+
maxResults?: number;
|
|
60
|
+
useTranspositions?: boolean;
|
|
61
|
+
caseSensitive?: boolean;
|
|
62
|
+
}, {
|
|
63
|
+
maxDistance?: number;
|
|
64
|
+
minSimilarity?: number;
|
|
65
|
+
maxResults?: number;
|
|
66
|
+
useTranspositions?: boolean;
|
|
67
|
+
caseSensitive?: boolean;
|
|
68
|
+
}>>;
|
|
69
|
+
}, "strict", z.ZodTypeAny, {
|
|
70
|
+
indexerToken?: string;
|
|
71
|
+
stopwordLanguages?: [string, ...string[]];
|
|
72
|
+
tokenSplitRegex?: string;
|
|
73
|
+
fuzzyEnabled?: boolean;
|
|
74
|
+
fuzzyOptions?: {
|
|
75
|
+
maxDistance?: number;
|
|
76
|
+
minSimilarity?: number;
|
|
77
|
+
maxResults?: number;
|
|
78
|
+
useTranspositions?: boolean;
|
|
79
|
+
caseSensitive?: boolean;
|
|
80
|
+
};
|
|
81
|
+
}, {
|
|
82
|
+
indexerToken?: string;
|
|
83
|
+
stopwordLanguages?: [string, ...string[]];
|
|
84
|
+
tokenSplitRegex?: string;
|
|
85
|
+
fuzzyEnabled?: boolean;
|
|
86
|
+
fuzzyOptions?: {
|
|
87
|
+
maxDistance?: number;
|
|
88
|
+
minSimilarity?: number;
|
|
89
|
+
maxResults?: number;
|
|
90
|
+
useTranspositions?: boolean;
|
|
91
|
+
caseSensitive?: boolean;
|
|
92
|
+
};
|
|
93
|
+
}>>;
|
|
94
|
+
searchClient: z.ZodOptional<z.ZodAny>;
|
|
95
|
+
indexBatchSize: z.ZodOptional<z.ZodNumber>;
|
|
96
|
+
maxSearchIndexFieldLength: z.ZodOptional<z.ZodNumber>;
|
|
97
|
+
}, "strip", z.ZodTypeAny, {
|
|
98
|
+
maxSearchIndexFieldLength?: number;
|
|
99
|
+
tina?: {
|
|
100
|
+
indexerToken?: string;
|
|
101
|
+
stopwordLanguages?: [string, ...string[]];
|
|
102
|
+
tokenSplitRegex?: string;
|
|
103
|
+
fuzzyEnabled?: boolean;
|
|
104
|
+
fuzzyOptions?: {
|
|
105
|
+
maxDistance?: number;
|
|
106
|
+
minSimilarity?: number;
|
|
107
|
+
maxResults?: number;
|
|
108
|
+
useTranspositions?: boolean;
|
|
109
|
+
caseSensitive?: boolean;
|
|
110
|
+
};
|
|
111
|
+
};
|
|
112
|
+
searchClient?: any;
|
|
113
|
+
indexBatchSize?: number;
|
|
114
|
+
}, {
|
|
115
|
+
maxSearchIndexFieldLength?: number;
|
|
116
|
+
tina?: {
|
|
117
|
+
indexerToken?: string;
|
|
118
|
+
stopwordLanguages?: [string, ...string[]];
|
|
119
|
+
tokenSplitRegex?: string;
|
|
120
|
+
fuzzyEnabled?: boolean;
|
|
121
|
+
fuzzyOptions?: {
|
|
122
|
+
maxDistance?: number;
|
|
123
|
+
minSimilarity?: number;
|
|
124
|
+
maxResults?: number;
|
|
125
|
+
useTranspositions?: boolean;
|
|
126
|
+
caseSensitive?: boolean;
|
|
127
|
+
};
|
|
128
|
+
};
|
|
129
|
+
searchClient?: any;
|
|
130
|
+
indexBatchSize?: number;
|
|
131
|
+
}>>;
|
|
132
|
+
ui: z.ZodOptional<z.ZodObject<{
|
|
133
|
+
previewUrl: z.ZodOptional<z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodUnknown>>;
|
|
134
|
+
optOutOfUpdateCheck: z.ZodOptional<z.ZodBoolean>;
|
|
135
|
+
regexValidation: z.ZodOptional<z.ZodObject<{
|
|
136
|
+
folderNameRegex: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
|
|
137
|
+
}, "strip", z.ZodTypeAny, {
|
|
138
|
+
folderNameRegex?: string;
|
|
139
|
+
}, {
|
|
140
|
+
folderNameRegex?: string;
|
|
141
|
+
}>>;
|
|
142
|
+
}, "strip", z.ZodTypeAny, {
|
|
143
|
+
previewUrl?: (...args: unknown[]) => unknown;
|
|
144
|
+
optOutOfUpdateCheck?: boolean;
|
|
145
|
+
regexValidation?: {
|
|
146
|
+
folderNameRegex?: string;
|
|
147
|
+
};
|
|
148
|
+
}, {
|
|
149
|
+
previewUrl?: (...args: unknown[]) => unknown;
|
|
150
|
+
optOutOfUpdateCheck?: boolean;
|
|
151
|
+
regexValidation?: {
|
|
152
|
+
folderNameRegex?: string;
|
|
153
|
+
};
|
|
154
|
+
}>>;
|
|
155
|
+
}, "strip", z.ZodTypeAny, {
|
|
156
|
+
search?: {
|
|
157
|
+
maxSearchIndexFieldLength?: number;
|
|
158
|
+
tina?: {
|
|
159
|
+
indexerToken?: string;
|
|
160
|
+
stopwordLanguages?: [string, ...string[]];
|
|
161
|
+
tokenSplitRegex?: string;
|
|
162
|
+
fuzzyEnabled?: boolean;
|
|
163
|
+
fuzzyOptions?: {
|
|
164
|
+
maxDistance?: number;
|
|
165
|
+
minSimilarity?: number;
|
|
166
|
+
maxResults?: number;
|
|
167
|
+
useTranspositions?: boolean;
|
|
168
|
+
caseSensitive?: boolean;
|
|
169
|
+
};
|
|
170
|
+
};
|
|
171
|
+
searchClient?: any;
|
|
172
|
+
indexBatchSize?: number;
|
|
173
|
+
};
|
|
174
|
+
ui?: {
|
|
175
|
+
previewUrl?: (...args: unknown[]) => unknown;
|
|
176
|
+
optOutOfUpdateCheck?: boolean;
|
|
177
|
+
regexValidation?: {
|
|
178
|
+
folderNameRegex?: string;
|
|
179
|
+
};
|
|
180
|
+
};
|
|
181
|
+
client?: {
|
|
182
|
+
referenceDepth?: number;
|
|
183
|
+
};
|
|
184
|
+
media?: {
|
|
185
|
+
tina?: {
|
|
186
|
+
publicFolder?: string;
|
|
187
|
+
mediaRoot?: string;
|
|
188
|
+
static?: boolean;
|
|
189
|
+
};
|
|
190
|
+
loadCustomStore?: (...args: unknown[]) => unknown;
|
|
191
|
+
};
|
|
192
|
+
}, {
|
|
193
|
+
search?: {
|
|
194
|
+
maxSearchIndexFieldLength?: number;
|
|
195
|
+
tina?: {
|
|
196
|
+
indexerToken?: string;
|
|
197
|
+
stopwordLanguages?: [string, ...string[]];
|
|
198
|
+
tokenSplitRegex?: string;
|
|
199
|
+
fuzzyEnabled?: boolean;
|
|
200
|
+
fuzzyOptions?: {
|
|
201
|
+
maxDistance?: number;
|
|
202
|
+
minSimilarity?: number;
|
|
203
|
+
maxResults?: number;
|
|
204
|
+
useTranspositions?: boolean;
|
|
205
|
+
caseSensitive?: boolean;
|
|
206
|
+
};
|
|
207
|
+
};
|
|
208
|
+
searchClient?: any;
|
|
209
|
+
indexBatchSize?: number;
|
|
210
|
+
};
|
|
211
|
+
ui?: {
|
|
212
|
+
previewUrl?: (...args: unknown[]) => unknown;
|
|
213
|
+
optOutOfUpdateCheck?: boolean;
|
|
214
|
+
regexValidation?: {
|
|
215
|
+
folderNameRegex?: string;
|
|
216
|
+
};
|
|
217
|
+
};
|
|
218
|
+
client?: {
|
|
219
|
+
referenceDepth?: number;
|
|
220
|
+
};
|
|
221
|
+
media?: {
|
|
222
|
+
tina?: {
|
|
223
|
+
publicFolder?: string;
|
|
224
|
+
mediaRoot?: string;
|
|
225
|
+
static?: boolean;
|
|
226
|
+
};
|
|
227
|
+
loadCustomStore?: (...args: unknown[]) => unknown;
|
|
228
|
+
};
|
|
229
|
+
}>;
|
|
230
|
+
export declare const validateTinaCloudSchemaConfig: (config: unknown) => Config;
|
package/package.json
ADDED
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@tinacms/schema-tools",
|
|
3
|
+
"type": "module",
|
|
4
|
+
"version": "0.0.0-00d7b85-20251222014449",
|
|
5
|
+
"main": "dist/index.js",
|
|
6
|
+
"types": "dist/index.d.ts",
|
|
7
|
+
"files": [
|
|
8
|
+
"dist"
|
|
9
|
+
],
|
|
10
|
+
"license": "Apache-2.0",
|
|
11
|
+
"buildConfig": {
|
|
12
|
+
"entryPoints": [
|
|
13
|
+
{
|
|
14
|
+
"name": "src/index.ts"
|
|
15
|
+
}
|
|
16
|
+
]
|
|
17
|
+
},
|
|
18
|
+
"devDependencies": {
|
|
19
|
+
"@types/jest": "^29.5.14",
|
|
20
|
+
"@types/micromatch": "^4.0.9",
|
|
21
|
+
"@types/react": "^18.3.18",
|
|
22
|
+
"jest": "^29.7.0",
|
|
23
|
+
"react": "^18.3.1",
|
|
24
|
+
"ts-jest": "^29.2.5",
|
|
25
|
+
"typescript": "^5.7.3",
|
|
26
|
+
"yup": "^1.6.1",
|
|
27
|
+
"@tinacms/scripts": "1.4.2"
|
|
28
|
+
},
|
|
29
|
+
"peerDependencies": {
|
|
30
|
+
"react": ">=16.14.0",
|
|
31
|
+
"yup": "^1.0.0"
|
|
32
|
+
},
|
|
33
|
+
"publishConfig": {
|
|
34
|
+
"registry": "https://registry.npmjs.org"
|
|
35
|
+
},
|
|
36
|
+
"repository": {
|
|
37
|
+
"url": "https://github.com/tinacms/tinacms.git",
|
|
38
|
+
"directory": "packages/@tinacms/cli"
|
|
39
|
+
},
|
|
40
|
+
"dependencies": {
|
|
41
|
+
"picomatch-browser": "2.2.6",
|
|
42
|
+
"url-pattern": "^1.0.3",
|
|
43
|
+
"zod": "^3.24.2"
|
|
44
|
+
},
|
|
45
|
+
"scripts": {
|
|
46
|
+
"build": "tinacms-scripts build",
|
|
47
|
+
"test": "jest --config jest.config.js",
|
|
48
|
+
"types": "pnpm tsc",
|
|
49
|
+
"test-watch": "jest --passWithNoTests --watch",
|
|
50
|
+
"generate:schema": "pnpm node scripts/generateSchema.js"
|
|
51
|
+
}
|
|
52
|
+
}
|