@tinacms/graphql 0.0.0-c852462-20250131014229 → 0.0.0-cacbd0e-20250306051805
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/database/datalayer.d.ts +5 -1
- package/dist/database/index.d.ts +2 -0
- package/dist/index.js +436 -203
- package/dist/index.mjs +427 -197
- package/dist/resolver/index.d.ts +16 -14
- package/package.json +14 -14
package/dist/resolver/index.d.ts
CHANGED
|
@@ -11,18 +11,10 @@ interface ResolverConfig {
|
|
|
11
11
|
isAudit: boolean;
|
|
12
12
|
}
|
|
13
13
|
export declare const createResolver: (args: ResolverConfig) => Resolver;
|
|
14
|
-
export declare const transformDocumentIntoPayload: (
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
_template: any;
|
|
19
|
-
};
|
|
20
|
-
tinaSchema: TinaSchema;
|
|
21
|
-
config?: GraphQLConfig;
|
|
22
|
-
isAudit?: boolean;
|
|
23
|
-
hasReferences?: boolean;
|
|
24
|
-
context: Record<string, unknown>;
|
|
25
|
-
}) => Promise<{
|
|
14
|
+
export declare const transformDocumentIntoPayload: (fullPath: string, rawData: {
|
|
15
|
+
_collection: any;
|
|
16
|
+
_template: any;
|
|
17
|
+
}, tinaSchema: TinaSchema, config?: GraphQLConfig, isAudit?: boolean, hasReferences?: boolean) => Promise<{
|
|
26
18
|
_sys: {
|
|
27
19
|
title: any;
|
|
28
20
|
basename: string;
|
|
@@ -48,6 +40,17 @@ export declare const transformDocumentIntoPayload: (args: {
|
|
|
48
40
|
__typename: string;
|
|
49
41
|
id: string;
|
|
50
42
|
}>;
|
|
43
|
+
/**
|
|
44
|
+
* Updates a property in an object using a JSONPath.
|
|
45
|
+
* @param obj - The object to update.
|
|
46
|
+
* @param path - The JSONPath string.
|
|
47
|
+
* @param newValue - The new value to set at the specified path.
|
|
48
|
+
* @returns the updated object.
|
|
49
|
+
*/
|
|
50
|
+
export declare const updateObjectWithJsonPath: (obj: any, path: string, oldValue: any, newValue: any) => {
|
|
51
|
+
object: any;
|
|
52
|
+
updated: boolean;
|
|
53
|
+
};
|
|
51
54
|
/**
|
|
52
55
|
* The resolver provides functions for all possible types of lookup
|
|
53
56
|
* values and retrieves them from the database
|
|
@@ -58,7 +61,6 @@ export declare class Resolver {
|
|
|
58
61
|
database: Database;
|
|
59
62
|
tinaSchema: TinaSchema;
|
|
60
63
|
isAudit: boolean;
|
|
61
|
-
context: Record<string, unknown>;
|
|
62
64
|
constructor(init: ResolverConfig);
|
|
63
65
|
resolveCollection: (args: any, collectionName: string, hasDocuments?: boolean) => Promise<{
|
|
64
66
|
fields: TinaField<true>[];
|
|
@@ -355,7 +357,7 @@ export declare class Resolver {
|
|
|
355
357
|
* Finds references to a document
|
|
356
358
|
* @param id the id of the document to find references to
|
|
357
359
|
* @param c the collection to find references in
|
|
358
|
-
* @returns
|
|
360
|
+
* @returns a map of references to the document
|
|
359
361
|
*/
|
|
360
362
|
private findReferences;
|
|
361
363
|
private buildFieldMutations;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tinacms/graphql",
|
|
3
|
-
"version": "0.0.0-
|
|
3
|
+
"version": "0.0.0-cacbd0e-20250306051805",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"module": "dist/index.mjs",
|
|
6
6
|
"typings": "dist/index.d.ts",
|
|
@@ -26,12 +26,12 @@
|
|
|
26
26
|
"@iarna/toml": "^2.2.5",
|
|
27
27
|
"abstract-level": "^1.0.4",
|
|
28
28
|
"date-fns": "^2.30.0",
|
|
29
|
-
"fast-glob": "^3.3.
|
|
30
|
-
"fs-extra": "^11.
|
|
29
|
+
"fast-glob": "^3.3.3",
|
|
30
|
+
"fs-extra": "^11.3.0",
|
|
31
31
|
"glob-parent": "^6.0.2",
|
|
32
32
|
"graphql": "15.8.0",
|
|
33
33
|
"gray-matter": "^4.0.3",
|
|
34
|
-
"isomorphic-git": "^1.
|
|
34
|
+
"isomorphic-git": "^1.29.0",
|
|
35
35
|
"js-sha1": "^0.6.0",
|
|
36
36
|
"js-yaml": "^3.14.1",
|
|
37
37
|
"jsonpath-plus": "10.1.0",
|
|
@@ -41,11 +41,11 @@
|
|
|
41
41
|
"many-level": "^2.0.0",
|
|
42
42
|
"micromatch": "4.0.8",
|
|
43
43
|
"normalize-path": "^3.0.0",
|
|
44
|
-
"readable-stream": "^4.
|
|
44
|
+
"readable-stream": "^4.7.0",
|
|
45
45
|
"scmp": "^2.1.0",
|
|
46
46
|
"yup": "^0.32.11",
|
|
47
|
-
"@tinacms/mdx": "
|
|
48
|
-
"@tinacms/schema-tools": "1.7.
|
|
47
|
+
"@tinacms/mdx": "1.6.1",
|
|
48
|
+
"@tinacms/schema-tools": "1.7.2"
|
|
49
49
|
},
|
|
50
50
|
"publishConfig": {
|
|
51
51
|
"registry": "https://registry.npmjs.org"
|
|
@@ -65,19 +65,19 @@
|
|
|
65
65
|
"@types/lru-cache": "^5.1.1",
|
|
66
66
|
"@types/mdast": "^3.0.15",
|
|
67
67
|
"@types/micromatch": "^4.0.9",
|
|
68
|
-
"@types/node": "^22.
|
|
68
|
+
"@types/node": "^22.13.1",
|
|
69
69
|
"@types/normalize-path": "^3.0.2",
|
|
70
70
|
"@types/ws": "^7.4.7",
|
|
71
71
|
"@types/yup": "^0.29.14",
|
|
72
72
|
"jest-file-snapshot": "^0.5.0",
|
|
73
73
|
"memory-level": "^1.0.0",
|
|
74
74
|
"nodemon": "3.1.4",
|
|
75
|
-
"typescript": "^5.
|
|
76
|
-
"vite": "^4.
|
|
77
|
-
"vitest": "^0.32.
|
|
78
|
-
"zod": "^3.
|
|
79
|
-
"@tinacms/
|
|
80
|
-
"@tinacms/
|
|
75
|
+
"typescript": "^5.7.3",
|
|
76
|
+
"vite": "^4.5.9",
|
|
77
|
+
"vitest": "^0.32.4",
|
|
78
|
+
"zod": "^3.24.2",
|
|
79
|
+
"@tinacms/schema-tools": "1.7.2",
|
|
80
|
+
"@tinacms/scripts": "1.3.3"
|
|
81
81
|
},
|
|
82
82
|
"scripts": {
|
|
83
83
|
"types": "pnpm tsc",
|