@tinacms/graphql 0.0.0-d9487bf-20251119052214 → 0.0.0-d9ccf29-20251222052725
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/ast-builder/index.d.ts +2 -2
- package/dist/build.d.ts +2 -4
- package/dist/database/alias-utils.d.ts +1 -1
- package/dist/index.d.ts +1 -4
- package/dist/index.js +3798 -3526
- package/dist/resolve.d.ts +0 -3
- package/dist/resolver/error.d.ts +0 -6
- package/dist/resolver/index.d.ts +193 -4
- package/package.json +13 -17
- package/dist/index.mjs +0 -8117
package/dist/resolve.d.ts
CHANGED
package/dist/resolver/error.d.ts
CHANGED
|
@@ -30,15 +30,9 @@ export declare class TinaFetchError extends Error {
|
|
|
30
30
|
}
|
|
31
31
|
export declare class TinaQueryError extends TinaFetchError {
|
|
32
32
|
stack?: string;
|
|
33
|
-
collection?: string;
|
|
34
|
-
file?: string;
|
|
35
|
-
originalError: Error;
|
|
36
33
|
constructor(args: TypeFetchErrorArgs);
|
|
37
34
|
}
|
|
38
35
|
export declare class TinaParseDocumentError extends TinaFetchError {
|
|
39
|
-
collection?: string;
|
|
40
|
-
file?: string;
|
|
41
|
-
originalError: Error;
|
|
42
36
|
constructor(args: TypeFetchErrorArgs);
|
|
43
37
|
toString(): string;
|
|
44
38
|
}
|
package/dist/resolver/index.d.ts
CHANGED
|
@@ -62,7 +62,7 @@ export declare class Resolver {
|
|
|
62
62
|
tinaSchema: TinaSchema;
|
|
63
63
|
isAudit: boolean;
|
|
64
64
|
constructor(init: ResolverConfig);
|
|
65
|
-
resolveCollection: (
|
|
65
|
+
resolveCollection: (_args: any, collectionName: string, hasDocuments?: boolean) => Promise<{
|
|
66
66
|
fields: TinaField<true>[];
|
|
67
67
|
templates?: undefined;
|
|
68
68
|
label?: string;
|
|
@@ -190,6 +190,194 @@ export declare class Resolver {
|
|
|
190
190
|
}[] | {
|
|
191
191
|
_template: string;
|
|
192
192
|
}[]>;
|
|
193
|
+
resolveAddPendingDocument: ({ collectionName, relativePath, templateName, }: {
|
|
194
|
+
collectionName: string;
|
|
195
|
+
relativePath: string;
|
|
196
|
+
templateName: string;
|
|
197
|
+
}) => Promise<{
|
|
198
|
+
_sys: {
|
|
199
|
+
title: any;
|
|
200
|
+
basename: string;
|
|
201
|
+
filename: string;
|
|
202
|
+
extension: string;
|
|
203
|
+
hasReferences: boolean;
|
|
204
|
+
path: string;
|
|
205
|
+
relativePath: string;
|
|
206
|
+
breadcrumbs: string[];
|
|
207
|
+
collection: Collection<true>;
|
|
208
|
+
template: string | number;
|
|
209
|
+
};
|
|
210
|
+
_values: {
|
|
211
|
+
_collection: any;
|
|
212
|
+
_template: any;
|
|
213
|
+
};
|
|
214
|
+
_rawData: {
|
|
215
|
+
_collection: any;
|
|
216
|
+
_template: any;
|
|
217
|
+
};
|
|
218
|
+
_collection: any;
|
|
219
|
+
_template: any;
|
|
220
|
+
__typename: string;
|
|
221
|
+
id: string;
|
|
222
|
+
}>;
|
|
223
|
+
/**
|
|
224
|
+
* Returns top-level fields which are not defined in the collection, so their
|
|
225
|
+
* values are not eliminated from Tina when new values are saved
|
|
226
|
+
*/
|
|
227
|
+
resolveLegacyValues: (oldDoc: any, collection: Collection<true>) => {};
|
|
228
|
+
private getCollectionWithName;
|
|
229
|
+
resolveRetrievedDocument: ({ collectionName, relativePath, }: {
|
|
230
|
+
collectionName: string;
|
|
231
|
+
relativePath: string;
|
|
232
|
+
}) => Promise<{
|
|
233
|
+
_sys: {
|
|
234
|
+
title: any;
|
|
235
|
+
basename: string;
|
|
236
|
+
filename: string;
|
|
237
|
+
extension: string;
|
|
238
|
+
hasReferences: boolean;
|
|
239
|
+
path: string;
|
|
240
|
+
relativePath: string;
|
|
241
|
+
breadcrumbs: string[];
|
|
242
|
+
collection: Collection<true>;
|
|
243
|
+
template: string | number;
|
|
244
|
+
};
|
|
245
|
+
_values: {
|
|
246
|
+
_collection: any;
|
|
247
|
+
_template: any;
|
|
248
|
+
};
|
|
249
|
+
_rawData: {
|
|
250
|
+
_collection: any;
|
|
251
|
+
_template: any;
|
|
252
|
+
};
|
|
253
|
+
_collection: any;
|
|
254
|
+
_template: any;
|
|
255
|
+
__typename: string;
|
|
256
|
+
id: string;
|
|
257
|
+
}>;
|
|
258
|
+
resolveCreateFolder: ({ collectionName, relativePath, }: {
|
|
259
|
+
collectionName: string;
|
|
260
|
+
relativePath: string;
|
|
261
|
+
}) => Promise<{
|
|
262
|
+
_sys: {
|
|
263
|
+
title: any;
|
|
264
|
+
basename: string;
|
|
265
|
+
filename: string;
|
|
266
|
+
extension: string;
|
|
267
|
+
hasReferences: boolean;
|
|
268
|
+
path: string;
|
|
269
|
+
relativePath: string;
|
|
270
|
+
breadcrumbs: string[];
|
|
271
|
+
collection: Collection<true>;
|
|
272
|
+
template: string | number;
|
|
273
|
+
};
|
|
274
|
+
_values: {
|
|
275
|
+
_collection: any;
|
|
276
|
+
_template: any;
|
|
277
|
+
};
|
|
278
|
+
_rawData: {
|
|
279
|
+
_collection: any;
|
|
280
|
+
_template: any;
|
|
281
|
+
};
|
|
282
|
+
_collection: any;
|
|
283
|
+
_template: any;
|
|
284
|
+
__typename: string;
|
|
285
|
+
id: string;
|
|
286
|
+
}>;
|
|
287
|
+
resolveCreateDocument: ({ collectionName, relativePath, body, }: {
|
|
288
|
+
collectionName: string;
|
|
289
|
+
relativePath: string;
|
|
290
|
+
body: Record<string, unknown>;
|
|
291
|
+
}) => Promise<{
|
|
292
|
+
_sys: {
|
|
293
|
+
title: any;
|
|
294
|
+
basename: string;
|
|
295
|
+
filename: string;
|
|
296
|
+
extension: string;
|
|
297
|
+
hasReferences: boolean;
|
|
298
|
+
path: string;
|
|
299
|
+
relativePath: string;
|
|
300
|
+
breadcrumbs: string[];
|
|
301
|
+
collection: Collection<true>;
|
|
302
|
+
template: string | number;
|
|
303
|
+
};
|
|
304
|
+
_values: {
|
|
305
|
+
_collection: any;
|
|
306
|
+
_template: any;
|
|
307
|
+
};
|
|
308
|
+
_rawData: {
|
|
309
|
+
_collection: any;
|
|
310
|
+
_template: any;
|
|
311
|
+
};
|
|
312
|
+
_collection: any;
|
|
313
|
+
_template: any;
|
|
314
|
+
__typename: string;
|
|
315
|
+
id: string;
|
|
316
|
+
}>;
|
|
317
|
+
resolveUpdateDocument: ({ collectionName, relativePath, newRelativePath, newBody, }: {
|
|
318
|
+
collectionName: string;
|
|
319
|
+
relativePath: string;
|
|
320
|
+
newRelativePath?: string;
|
|
321
|
+
newBody?: Record<string, unknown>;
|
|
322
|
+
}) => Promise<{
|
|
323
|
+
_sys: {
|
|
324
|
+
title: any;
|
|
325
|
+
basename: string;
|
|
326
|
+
filename: string;
|
|
327
|
+
extension: string;
|
|
328
|
+
hasReferences: boolean;
|
|
329
|
+
path: string;
|
|
330
|
+
relativePath: string;
|
|
331
|
+
breadcrumbs: string[];
|
|
332
|
+
collection: Collection<true>;
|
|
333
|
+
template: string | number;
|
|
334
|
+
};
|
|
335
|
+
_values: {
|
|
336
|
+
_collection: any;
|
|
337
|
+
_template: any;
|
|
338
|
+
};
|
|
339
|
+
_rawData: {
|
|
340
|
+
_collection: any;
|
|
341
|
+
_template: any;
|
|
342
|
+
};
|
|
343
|
+
_collection: any;
|
|
344
|
+
_template: any;
|
|
345
|
+
__typename: string;
|
|
346
|
+
id: string;
|
|
347
|
+
}>;
|
|
348
|
+
resolveDeleteDocument: ({ collectionName, relativePath, }: {
|
|
349
|
+
collectionName: string;
|
|
350
|
+
relativePath: string;
|
|
351
|
+
}) => Promise<{
|
|
352
|
+
_sys: {
|
|
353
|
+
title: any;
|
|
354
|
+
basename: string;
|
|
355
|
+
filename: string;
|
|
356
|
+
extension: string;
|
|
357
|
+
hasReferences: boolean;
|
|
358
|
+
path: string;
|
|
359
|
+
relativePath: string;
|
|
360
|
+
breadcrumbs: string[];
|
|
361
|
+
collection: Collection<true>;
|
|
362
|
+
template: string | number;
|
|
363
|
+
};
|
|
364
|
+
_values: {
|
|
365
|
+
_collection: any;
|
|
366
|
+
_template: any;
|
|
367
|
+
};
|
|
368
|
+
_rawData: {
|
|
369
|
+
_collection: any;
|
|
370
|
+
_template: any;
|
|
371
|
+
};
|
|
372
|
+
_collection: any;
|
|
373
|
+
_template: any;
|
|
374
|
+
__typename: string;
|
|
375
|
+
id: string;
|
|
376
|
+
}>;
|
|
377
|
+
private resolveAndValidateCollection;
|
|
378
|
+
/**
|
|
379
|
+
* @deprecated - To be removed in next major version.
|
|
380
|
+
*/
|
|
193
381
|
createResolveDocument: ({ collection, realPath, args, isAddPendingDocument, }: {
|
|
194
382
|
collection: Collection<true>;
|
|
195
383
|
realPath: string;
|
|
@@ -221,6 +409,9 @@ export declare class Resolver {
|
|
|
221
409
|
__typename: string;
|
|
222
410
|
id: string;
|
|
223
411
|
}>;
|
|
412
|
+
/**
|
|
413
|
+
* @deprecated - To be removed in next major version.
|
|
414
|
+
*/
|
|
224
415
|
updateResolveDocument: ({ collection, realPath, args, isAddPendingDocument, isCollectionSpecific, }: {
|
|
225
416
|
collection: Collection<true>;
|
|
226
417
|
realPath: string;
|
|
@@ -254,10 +445,8 @@ export declare class Resolver {
|
|
|
254
445
|
id: string;
|
|
255
446
|
}>;
|
|
256
447
|
/**
|
|
257
|
-
*
|
|
258
|
-
* values are not eliminated from Tina when new values are saved
|
|
448
|
+
* @deprecated
|
|
259
449
|
*/
|
|
260
|
-
resolveLegacyValues: (oldDoc: any, collection: Collection<true>) => {};
|
|
261
450
|
resolveDocument: ({ args, collection: collectionName, isMutation, isCreation, isDeletion, isFolderCreation, isAddPendingDocument, isCollectionSpecific, isUpdateName, }: {
|
|
262
451
|
args: unknown;
|
|
263
452
|
collection?: string;
|
package/package.json
CHANGED
|
@@ -1,16 +1,18 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tinacms/graphql",
|
|
3
|
-
"
|
|
3
|
+
"type": "module",
|
|
4
|
+
"version": "0.0.0-d9ccf29-20251222052725",
|
|
4
5
|
"main": "dist/index.js",
|
|
5
|
-
"module": "dist/index.
|
|
6
|
-
"typings": "dist/index.d.ts",
|
|
6
|
+
"module": "./dist/index.js",
|
|
7
7
|
"files": [
|
|
8
8
|
"package.json",
|
|
9
9
|
"dist"
|
|
10
10
|
],
|
|
11
11
|
"exports": {
|
|
12
|
-
"
|
|
13
|
-
|
|
12
|
+
".": {
|
|
13
|
+
"types": "./dist/index.d.ts",
|
|
14
|
+
"import": "./dist/index.js"
|
|
15
|
+
}
|
|
14
16
|
},
|
|
15
17
|
"license": "SEE LICENSE IN LICENSE",
|
|
16
18
|
"buildConfig": {
|
|
@@ -26,6 +28,7 @@
|
|
|
26
28
|
"@iarna/toml": "^2.2.5",
|
|
27
29
|
"abstract-level": "^1.0.4",
|
|
28
30
|
"date-fns": "^2.30.0",
|
|
31
|
+
"es-toolkit": "^1.42.0",
|
|
29
32
|
"fast-glob": "^3.3.3",
|
|
30
33
|
"fs-extra": "^11.3.0",
|
|
31
34
|
"glob-parent": "^6.0.2",
|
|
@@ -35,17 +38,13 @@
|
|
|
35
38
|
"js-sha1": "^0.6.0",
|
|
36
39
|
"js-yaml": "^3.14.1",
|
|
37
40
|
"jsonpath-plus": "10.1.0",
|
|
38
|
-
"lodash.clonedeep": "^4.5.0",
|
|
39
|
-
"lodash.set": "^4.3.2",
|
|
40
|
-
"lodash.uniqby": "^4.7.0",
|
|
41
41
|
"many-level": "^2.0.0",
|
|
42
42
|
"micromatch": "4.0.8",
|
|
43
43
|
"normalize-path": "^3.0.0",
|
|
44
44
|
"readable-stream": "^4.7.0",
|
|
45
|
-
"
|
|
46
|
-
"
|
|
47
|
-
"@tinacms/
|
|
48
|
-
"@tinacms/mdx": "0.0.0-d9487bf-20251119052214"
|
|
45
|
+
"yup": "^1.6.1",
|
|
46
|
+
"@tinacms/schema-tools": "2.1.0",
|
|
47
|
+
"@tinacms/mdx": "2.0.1"
|
|
49
48
|
},
|
|
50
49
|
"publishConfig": {
|
|
51
50
|
"registry": "https://registry.npmjs.org"
|
|
@@ -60,23 +59,20 @@
|
|
|
60
59
|
"@types/express": "^4.17.21",
|
|
61
60
|
"@types/fs-extra": "^9.0.13",
|
|
62
61
|
"@types/js-yaml": "^3.12.10",
|
|
63
|
-
"@types/lodash.camelcase": "^4.3.9",
|
|
64
|
-
"@types/lodash.upperfirst": "^4.3.9",
|
|
65
62
|
"@types/lru-cache": "^5.1.1",
|
|
66
63
|
"@types/mdast": "^3.0.15",
|
|
67
64
|
"@types/micromatch": "^4.0.9",
|
|
68
65
|
"@types/node": "^22.13.1",
|
|
69
66
|
"@types/normalize-path": "^3.0.2",
|
|
70
67
|
"@types/ws": "^7.4.7",
|
|
71
|
-
"@types/yup": "^0.29.14",
|
|
72
68
|
"jest-file-snapshot": "^0.5.0",
|
|
73
69
|
"memory-level": "^1.0.0",
|
|
74
70
|
"typescript": "^5.7.3",
|
|
75
71
|
"vite": "^4.5.9",
|
|
76
72
|
"vitest": "^0.32.4",
|
|
77
73
|
"zod": "^3.24.2",
|
|
78
|
-
"@tinacms/schema-tools": "
|
|
79
|
-
"@tinacms/scripts": "
|
|
74
|
+
"@tinacms/schema-tools": "2.1.0",
|
|
75
|
+
"@tinacms/scripts": "1.4.2"
|
|
80
76
|
},
|
|
81
77
|
"scripts": {
|
|
82
78
|
"types": "pnpm tsc",
|