@tinacms/graphql 1.5.11 → 1.5.13
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.js +47 -13
- package/dist/index.mjs +44 -10
- package/package.json +14 -14
package/dist/index.js
CHANGED
|
@@ -27,8 +27,8 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
27
27
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
28
28
|
|
|
29
29
|
// src/index.ts
|
|
30
|
-
var
|
|
31
|
-
__export(
|
|
30
|
+
var index_exports = {};
|
|
31
|
+
__export(index_exports, {
|
|
32
32
|
AuditFileSystemBridge: () => AuditFileSystemBridge,
|
|
33
33
|
Database: () => Database,
|
|
34
34
|
FilesystemBridge: () => FilesystemBridge,
|
|
@@ -62,7 +62,7 @@ __export(src_exports, {
|
|
|
62
62
|
transformDocument: () => transformDocument,
|
|
63
63
|
transformDocumentIntoPayload: () => transformDocumentIntoPayload
|
|
64
64
|
});
|
|
65
|
-
module.exports = __toCommonJS(
|
|
65
|
+
module.exports = __toCommonJS(index_exports);
|
|
66
66
|
|
|
67
67
|
// src/build.ts
|
|
68
68
|
var import_graphql2 = require("graphql");
|
|
@@ -3090,7 +3090,7 @@ var validateField = async (field) => {
|
|
|
3090
3090
|
// package.json
|
|
3091
3091
|
var package_default = {
|
|
3092
3092
|
name: "@tinacms/graphql",
|
|
3093
|
-
version: "1.5.
|
|
3093
|
+
version: "1.5.13",
|
|
3094
3094
|
main: "dist/index.js",
|
|
3095
3095
|
module: "dist/index.mjs",
|
|
3096
3096
|
typings: "dist/index.d.ts",
|
|
@@ -3126,12 +3126,12 @@ var package_default = {
|
|
|
3126
3126
|
"@tinacms/schema-tools": "workspace:*",
|
|
3127
3127
|
"abstract-level": "^1.0.4",
|
|
3128
3128
|
"date-fns": "^2.30.0",
|
|
3129
|
-
"fast-glob": "^3.3.
|
|
3130
|
-
"fs-extra": "^11.
|
|
3129
|
+
"fast-glob": "^3.3.3",
|
|
3130
|
+
"fs-extra": "^11.3.0",
|
|
3131
3131
|
"glob-parent": "^6.0.2",
|
|
3132
3132
|
graphql: "15.8.0",
|
|
3133
3133
|
"gray-matter": "^4.0.3",
|
|
3134
|
-
"isomorphic-git": "^1.
|
|
3134
|
+
"isomorphic-git": "^1.29.0",
|
|
3135
3135
|
"js-sha1": "^0.6.0",
|
|
3136
3136
|
"js-yaml": "^3.14.1",
|
|
3137
3137
|
"jsonpath-plus": "10.1.0",
|
|
@@ -3141,7 +3141,7 @@ var package_default = {
|
|
|
3141
3141
|
"many-level": "^2.0.0",
|
|
3142
3142
|
micromatch: "4.0.8",
|
|
3143
3143
|
"normalize-path": "^3.0.0",
|
|
3144
|
-
"readable-stream": "^4.
|
|
3144
|
+
"readable-stream": "^4.7.0",
|
|
3145
3145
|
scmp: "^2.1.0",
|
|
3146
3146
|
yup: "^0.32.11"
|
|
3147
3147
|
},
|
|
@@ -3165,17 +3165,17 @@ var package_default = {
|
|
|
3165
3165
|
"@types/lru-cache": "^5.1.1",
|
|
3166
3166
|
"@types/mdast": "^3.0.15",
|
|
3167
3167
|
"@types/micromatch": "^4.0.9",
|
|
3168
|
-
"@types/node": "^22.
|
|
3168
|
+
"@types/node": "^22.13.1",
|
|
3169
3169
|
"@types/normalize-path": "^3.0.2",
|
|
3170
3170
|
"@types/ws": "^7.4.7",
|
|
3171
3171
|
"@types/yup": "^0.29.14",
|
|
3172
3172
|
"jest-file-snapshot": "^0.5.0",
|
|
3173
3173
|
"memory-level": "^1.0.0",
|
|
3174
3174
|
nodemon: "3.1.4",
|
|
3175
|
-
typescript: "^5.
|
|
3176
|
-
vite: "^4.
|
|
3177
|
-
vitest: "^0.32.
|
|
3178
|
-
zod: "^3.
|
|
3175
|
+
typescript: "^5.7.3",
|
|
3176
|
+
vite: "^4.5.9",
|
|
3177
|
+
vitest: "^0.32.4",
|
|
3178
|
+
zod: "^3.24.2"
|
|
3179
3179
|
}
|
|
3180
3180
|
};
|
|
3181
3181
|
|
|
@@ -5255,6 +5255,9 @@ var Resolver = class {
|
|
|
5255
5255
|
collection == null ? void 0 : collection.path,
|
|
5256
5256
|
args.params.relativePath
|
|
5257
5257
|
);
|
|
5258
|
+
if (newRealPath === realPath) {
|
|
5259
|
+
return doc;
|
|
5260
|
+
}
|
|
5258
5261
|
await this.database.put(newRealPath, doc._rawData, collection.name);
|
|
5259
5262
|
await this.deleteDocument(realPath);
|
|
5260
5263
|
const collRefs = await this.findReferences(realPath, collection);
|
|
@@ -7151,10 +7154,41 @@ var _indexContent = async (database, level, documentPaths, enqueueOps, collectio
|
|
|
7151
7154
|
await hashPasswordValues(aliasedData, passwordFields);
|
|
7152
7155
|
}
|
|
7153
7156
|
const normalizedPath = (0, import_schema_tools4.normalizePath)(filepath);
|
|
7157
|
+
const rootSublevel = level.sublevel(
|
|
7158
|
+
CONTENT_ROOT_PREFIX,
|
|
7159
|
+
SUBLEVEL_OPTIONS
|
|
7160
|
+
);
|
|
7154
7161
|
const folderKey = folderTreeBuilder.update(
|
|
7155
7162
|
normalizedPath,
|
|
7156
7163
|
collectionPath || ""
|
|
7157
7164
|
);
|
|
7165
|
+
const item = await rootSublevel.get(normalizedPath);
|
|
7166
|
+
if (item) {
|
|
7167
|
+
await database.contentLevel.batch([
|
|
7168
|
+
...makeIndexOpsForDocument(
|
|
7169
|
+
normalizedPath,
|
|
7170
|
+
collection.name,
|
|
7171
|
+
collectionIndexDefinitions,
|
|
7172
|
+
item,
|
|
7173
|
+
"del",
|
|
7174
|
+
level
|
|
7175
|
+
),
|
|
7176
|
+
// folder indices
|
|
7177
|
+
...makeIndexOpsForDocument(
|
|
7178
|
+
normalizedPath,
|
|
7179
|
+
`${collection.name}_${folderKey}`,
|
|
7180
|
+
collectionIndexDefinitions,
|
|
7181
|
+
item,
|
|
7182
|
+
"del",
|
|
7183
|
+
level
|
|
7184
|
+
),
|
|
7185
|
+
{
|
|
7186
|
+
type: "del",
|
|
7187
|
+
key: normalizedPath,
|
|
7188
|
+
sublevel: rootSublevel
|
|
7189
|
+
}
|
|
7190
|
+
]);
|
|
7191
|
+
}
|
|
7158
7192
|
if (!isGitKeep(filepath, collection)) {
|
|
7159
7193
|
await enqueueOps([
|
|
7160
7194
|
...makeIndexOpsForDocument(
|
package/dist/index.mjs
CHANGED
|
@@ -3019,7 +3019,7 @@ var validateField = async (field) => {
|
|
|
3019
3019
|
// package.json
|
|
3020
3020
|
var package_default = {
|
|
3021
3021
|
name: "@tinacms/graphql",
|
|
3022
|
-
version: "1.5.
|
|
3022
|
+
version: "1.5.13",
|
|
3023
3023
|
main: "dist/index.js",
|
|
3024
3024
|
module: "dist/index.mjs",
|
|
3025
3025
|
typings: "dist/index.d.ts",
|
|
@@ -3055,12 +3055,12 @@ var package_default = {
|
|
|
3055
3055
|
"@tinacms/schema-tools": "workspace:*",
|
|
3056
3056
|
"abstract-level": "^1.0.4",
|
|
3057
3057
|
"date-fns": "^2.30.0",
|
|
3058
|
-
"fast-glob": "^3.3.
|
|
3059
|
-
"fs-extra": "^11.
|
|
3058
|
+
"fast-glob": "^3.3.3",
|
|
3059
|
+
"fs-extra": "^11.3.0",
|
|
3060
3060
|
"glob-parent": "^6.0.2",
|
|
3061
3061
|
graphql: "15.8.0",
|
|
3062
3062
|
"gray-matter": "^4.0.3",
|
|
3063
|
-
"isomorphic-git": "^1.
|
|
3063
|
+
"isomorphic-git": "^1.29.0",
|
|
3064
3064
|
"js-sha1": "^0.6.0",
|
|
3065
3065
|
"js-yaml": "^3.14.1",
|
|
3066
3066
|
"jsonpath-plus": "10.1.0",
|
|
@@ -3070,7 +3070,7 @@ var package_default = {
|
|
|
3070
3070
|
"many-level": "^2.0.0",
|
|
3071
3071
|
micromatch: "4.0.8",
|
|
3072
3072
|
"normalize-path": "^3.0.0",
|
|
3073
|
-
"readable-stream": "^4.
|
|
3073
|
+
"readable-stream": "^4.7.0",
|
|
3074
3074
|
scmp: "^2.1.0",
|
|
3075
3075
|
yup: "^0.32.11"
|
|
3076
3076
|
},
|
|
@@ -3094,17 +3094,17 @@ var package_default = {
|
|
|
3094
3094
|
"@types/lru-cache": "^5.1.1",
|
|
3095
3095
|
"@types/mdast": "^3.0.15",
|
|
3096
3096
|
"@types/micromatch": "^4.0.9",
|
|
3097
|
-
"@types/node": "^22.
|
|
3097
|
+
"@types/node": "^22.13.1",
|
|
3098
3098
|
"@types/normalize-path": "^3.0.2",
|
|
3099
3099
|
"@types/ws": "^7.4.7",
|
|
3100
3100
|
"@types/yup": "^0.29.14",
|
|
3101
3101
|
"jest-file-snapshot": "^0.5.0",
|
|
3102
3102
|
"memory-level": "^1.0.0",
|
|
3103
3103
|
nodemon: "3.1.4",
|
|
3104
|
-
typescript: "^5.
|
|
3105
|
-
vite: "^4.
|
|
3106
|
-
vitest: "^0.32.
|
|
3107
|
-
zod: "^3.
|
|
3104
|
+
typescript: "^5.7.3",
|
|
3105
|
+
vite: "^4.5.9",
|
|
3106
|
+
vitest: "^0.32.4",
|
|
3107
|
+
zod: "^3.24.2"
|
|
3108
3108
|
}
|
|
3109
3109
|
};
|
|
3110
3110
|
|
|
@@ -5178,6 +5178,9 @@ var Resolver = class {
|
|
|
5178
5178
|
collection?.path,
|
|
5179
5179
|
args.params.relativePath
|
|
5180
5180
|
);
|
|
5181
|
+
if (newRealPath === realPath) {
|
|
5182
|
+
return doc;
|
|
5183
|
+
}
|
|
5181
5184
|
await this.database.put(newRealPath, doc._rawData, collection.name);
|
|
5182
5185
|
await this.deleteDocument(realPath);
|
|
5183
5186
|
const collRefs = await this.findReferences(realPath, collection);
|
|
@@ -7067,10 +7070,41 @@ var _indexContent = async (database, level, documentPaths, enqueueOps, collectio
|
|
|
7067
7070
|
await hashPasswordValues(aliasedData, passwordFields);
|
|
7068
7071
|
}
|
|
7069
7072
|
const normalizedPath = normalizePath(filepath);
|
|
7073
|
+
const rootSublevel = level.sublevel(
|
|
7074
|
+
CONTENT_ROOT_PREFIX,
|
|
7075
|
+
SUBLEVEL_OPTIONS
|
|
7076
|
+
);
|
|
7070
7077
|
const folderKey = folderTreeBuilder.update(
|
|
7071
7078
|
normalizedPath,
|
|
7072
7079
|
collectionPath || ""
|
|
7073
7080
|
);
|
|
7081
|
+
const item = await rootSublevel.get(normalizedPath);
|
|
7082
|
+
if (item) {
|
|
7083
|
+
await database.contentLevel.batch([
|
|
7084
|
+
...makeIndexOpsForDocument(
|
|
7085
|
+
normalizedPath,
|
|
7086
|
+
collection.name,
|
|
7087
|
+
collectionIndexDefinitions,
|
|
7088
|
+
item,
|
|
7089
|
+
"del",
|
|
7090
|
+
level
|
|
7091
|
+
),
|
|
7092
|
+
// folder indices
|
|
7093
|
+
...makeIndexOpsForDocument(
|
|
7094
|
+
normalizedPath,
|
|
7095
|
+
`${collection.name}_${folderKey}`,
|
|
7096
|
+
collectionIndexDefinitions,
|
|
7097
|
+
item,
|
|
7098
|
+
"del",
|
|
7099
|
+
level
|
|
7100
|
+
),
|
|
7101
|
+
{
|
|
7102
|
+
type: "del",
|
|
7103
|
+
key: normalizedPath,
|
|
7104
|
+
sublevel: rootSublevel
|
|
7105
|
+
}
|
|
7106
|
+
]);
|
|
7107
|
+
}
|
|
7074
7108
|
if (!isGitKeep(filepath, collection)) {
|
|
7075
7109
|
await enqueueOps([
|
|
7076
7110
|
...makeIndexOpsForDocument(
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tinacms/graphql",
|
|
3
|
-
"version": "1.5.
|
|
3
|
+
"version": "1.5.13",
|
|
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": "1.
|
|
48
|
-
"@tinacms/schema-tools": "1.7.
|
|
47
|
+
"@tinacms/mdx": "1.6.0",
|
|
48
|
+
"@tinacms/schema-tools": "1.7.1"
|
|
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/schema-tools": "1.7.
|
|
80
|
-
"@tinacms/scripts": "1.3.
|
|
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.1",
|
|
80
|
+
"@tinacms/scripts": "1.3.2"
|
|
81
81
|
},
|
|
82
82
|
"scripts": {
|
|
83
83
|
"types": "pnpm tsc",
|