@tinacms/graphql 1.5.10 → 1.5.12
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 +38 -8
- package/dist/index.mjs +38 -8
- package/package.json +6 -7
package/dist/index.js
CHANGED
|
@@ -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.12",
|
|
3094
3094
|
main: "dist/index.js",
|
|
3095
3095
|
module: "dist/index.mjs",
|
|
3096
3096
|
typings: "dist/index.d.ts",
|
|
@@ -3117,8 +3117,8 @@ var package_default = {
|
|
|
3117
3117
|
build: "tinacms-scripts build",
|
|
3118
3118
|
docs: "pnpm typedoc",
|
|
3119
3119
|
serve: "pnpm nodemon dist/server.js",
|
|
3120
|
-
test: "
|
|
3121
|
-
"test-watch": "
|
|
3120
|
+
test: "vitest run",
|
|
3121
|
+
"test-watch": "vitest"
|
|
3122
3122
|
},
|
|
3123
3123
|
dependencies: {
|
|
3124
3124
|
"@iarna/toml": "^2.2.5",
|
|
@@ -3159,7 +3159,6 @@ var package_default = {
|
|
|
3159
3159
|
"@types/estree": "^0.0.50",
|
|
3160
3160
|
"@types/express": "^4.17.21",
|
|
3161
3161
|
"@types/fs-extra": "^9.0.13",
|
|
3162
|
-
"@types/jest": "^26.0.24",
|
|
3163
3162
|
"@types/js-yaml": "^3.12.10",
|
|
3164
3163
|
"@types/lodash.camelcase": "^4.3.9",
|
|
3165
3164
|
"@types/lodash.upperfirst": "^4.3.9",
|
|
@@ -3170,13 +3169,13 @@ var package_default = {
|
|
|
3170
3169
|
"@types/normalize-path": "^3.0.2",
|
|
3171
3170
|
"@types/ws": "^7.4.7",
|
|
3172
3171
|
"@types/yup": "^0.29.14",
|
|
3173
|
-
jest: "^29.7.0",
|
|
3174
|
-
"jest-diff": "^29.7.0",
|
|
3175
3172
|
"jest-file-snapshot": "^0.5.0",
|
|
3176
|
-
"jest-matcher-utils": "^29.7.0",
|
|
3177
3173
|
"memory-level": "^1.0.0",
|
|
3178
3174
|
nodemon: "3.1.4",
|
|
3179
|
-
typescript: "^5.6.3"
|
|
3175
|
+
typescript: "^5.6.3",
|
|
3176
|
+
vite: "^4.3.9",
|
|
3177
|
+
vitest: "^0.32.2",
|
|
3178
|
+
zod: "^3.23.8"
|
|
3180
3179
|
}
|
|
3181
3180
|
};
|
|
3182
3181
|
|
|
@@ -7152,10 +7151,41 @@ var _indexContent = async (database, level, documentPaths, enqueueOps, collectio
|
|
|
7152
7151
|
await hashPasswordValues(aliasedData, passwordFields);
|
|
7153
7152
|
}
|
|
7154
7153
|
const normalizedPath = (0, import_schema_tools4.normalizePath)(filepath);
|
|
7154
|
+
const rootSublevel = level.sublevel(
|
|
7155
|
+
CONTENT_ROOT_PREFIX,
|
|
7156
|
+
SUBLEVEL_OPTIONS
|
|
7157
|
+
);
|
|
7155
7158
|
const folderKey = folderTreeBuilder.update(
|
|
7156
7159
|
normalizedPath,
|
|
7157
7160
|
collectionPath || ""
|
|
7158
7161
|
);
|
|
7162
|
+
const item = await rootSublevel.get(normalizedPath);
|
|
7163
|
+
if (item) {
|
|
7164
|
+
await database.contentLevel.batch([
|
|
7165
|
+
...makeIndexOpsForDocument(
|
|
7166
|
+
normalizedPath,
|
|
7167
|
+
collection.name,
|
|
7168
|
+
collectionIndexDefinitions,
|
|
7169
|
+
item,
|
|
7170
|
+
"del",
|
|
7171
|
+
level
|
|
7172
|
+
),
|
|
7173
|
+
// folder indices
|
|
7174
|
+
...makeIndexOpsForDocument(
|
|
7175
|
+
normalizedPath,
|
|
7176
|
+
`${collection.name}_${folderKey}`,
|
|
7177
|
+
collectionIndexDefinitions,
|
|
7178
|
+
item,
|
|
7179
|
+
"del",
|
|
7180
|
+
level
|
|
7181
|
+
),
|
|
7182
|
+
{
|
|
7183
|
+
type: "del",
|
|
7184
|
+
key: normalizedPath,
|
|
7185
|
+
sublevel: rootSublevel
|
|
7186
|
+
}
|
|
7187
|
+
]);
|
|
7188
|
+
}
|
|
7159
7189
|
if (!isGitKeep(filepath, collection)) {
|
|
7160
7190
|
await enqueueOps([
|
|
7161
7191
|
...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.12",
|
|
3023
3023
|
main: "dist/index.js",
|
|
3024
3024
|
module: "dist/index.mjs",
|
|
3025
3025
|
typings: "dist/index.d.ts",
|
|
@@ -3046,8 +3046,8 @@ var package_default = {
|
|
|
3046
3046
|
build: "tinacms-scripts build",
|
|
3047
3047
|
docs: "pnpm typedoc",
|
|
3048
3048
|
serve: "pnpm nodemon dist/server.js",
|
|
3049
|
-
test: "
|
|
3050
|
-
"test-watch": "
|
|
3049
|
+
test: "vitest run",
|
|
3050
|
+
"test-watch": "vitest"
|
|
3051
3051
|
},
|
|
3052
3052
|
dependencies: {
|
|
3053
3053
|
"@iarna/toml": "^2.2.5",
|
|
@@ -3088,7 +3088,6 @@ var package_default = {
|
|
|
3088
3088
|
"@types/estree": "^0.0.50",
|
|
3089
3089
|
"@types/express": "^4.17.21",
|
|
3090
3090
|
"@types/fs-extra": "^9.0.13",
|
|
3091
|
-
"@types/jest": "^26.0.24",
|
|
3092
3091
|
"@types/js-yaml": "^3.12.10",
|
|
3093
3092
|
"@types/lodash.camelcase": "^4.3.9",
|
|
3094
3093
|
"@types/lodash.upperfirst": "^4.3.9",
|
|
@@ -3099,13 +3098,13 @@ var package_default = {
|
|
|
3099
3098
|
"@types/normalize-path": "^3.0.2",
|
|
3100
3099
|
"@types/ws": "^7.4.7",
|
|
3101
3100
|
"@types/yup": "^0.29.14",
|
|
3102
|
-
jest: "^29.7.0",
|
|
3103
|
-
"jest-diff": "^29.7.0",
|
|
3104
3101
|
"jest-file-snapshot": "^0.5.0",
|
|
3105
|
-
"jest-matcher-utils": "^29.7.0",
|
|
3106
3102
|
"memory-level": "^1.0.0",
|
|
3107
3103
|
nodemon: "3.1.4",
|
|
3108
|
-
typescript: "^5.6.3"
|
|
3104
|
+
typescript: "^5.6.3",
|
|
3105
|
+
vite: "^4.3.9",
|
|
3106
|
+
vitest: "^0.32.2",
|
|
3107
|
+
zod: "^3.23.8"
|
|
3109
3108
|
}
|
|
3110
3109
|
};
|
|
3111
3110
|
|
|
@@ -7068,10 +7067,41 @@ var _indexContent = async (database, level, documentPaths, enqueueOps, collectio
|
|
|
7068
7067
|
await hashPasswordValues(aliasedData, passwordFields);
|
|
7069
7068
|
}
|
|
7070
7069
|
const normalizedPath = normalizePath(filepath);
|
|
7070
|
+
const rootSublevel = level.sublevel(
|
|
7071
|
+
CONTENT_ROOT_PREFIX,
|
|
7072
|
+
SUBLEVEL_OPTIONS
|
|
7073
|
+
);
|
|
7071
7074
|
const folderKey = folderTreeBuilder.update(
|
|
7072
7075
|
normalizedPath,
|
|
7073
7076
|
collectionPath || ""
|
|
7074
7077
|
);
|
|
7078
|
+
const item = await rootSublevel.get(normalizedPath);
|
|
7079
|
+
if (item) {
|
|
7080
|
+
await database.contentLevel.batch([
|
|
7081
|
+
...makeIndexOpsForDocument(
|
|
7082
|
+
normalizedPath,
|
|
7083
|
+
collection.name,
|
|
7084
|
+
collectionIndexDefinitions,
|
|
7085
|
+
item,
|
|
7086
|
+
"del",
|
|
7087
|
+
level
|
|
7088
|
+
),
|
|
7089
|
+
// folder indices
|
|
7090
|
+
...makeIndexOpsForDocument(
|
|
7091
|
+
normalizedPath,
|
|
7092
|
+
`${collection.name}_${folderKey}`,
|
|
7093
|
+
collectionIndexDefinitions,
|
|
7094
|
+
item,
|
|
7095
|
+
"del",
|
|
7096
|
+
level
|
|
7097
|
+
),
|
|
7098
|
+
{
|
|
7099
|
+
type: "del",
|
|
7100
|
+
key: normalizedPath,
|
|
7101
|
+
sublevel: rootSublevel
|
|
7102
|
+
}
|
|
7103
|
+
]);
|
|
7104
|
+
}
|
|
7075
7105
|
if (!isGitKeep(filepath, collection)) {
|
|
7076
7106
|
await enqueueOps([
|
|
7077
7107
|
...makeIndexOpsForDocument(
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tinacms/graphql",
|
|
3
|
-
"version": "1.5.
|
|
3
|
+
"version": "1.5.12",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"module": "dist/index.mjs",
|
|
6
6
|
"typings": "dist/index.d.ts",
|
|
@@ -59,7 +59,6 @@
|
|
|
59
59
|
"@types/estree": "^0.0.50",
|
|
60
60
|
"@types/express": "^4.17.21",
|
|
61
61
|
"@types/fs-extra": "^9.0.13",
|
|
62
|
-
"@types/jest": "^26.0.24",
|
|
63
62
|
"@types/js-yaml": "^3.12.10",
|
|
64
63
|
"@types/lodash.camelcase": "^4.3.9",
|
|
65
64
|
"@types/lodash.upperfirst": "^4.3.9",
|
|
@@ -70,13 +69,13 @@
|
|
|
70
69
|
"@types/normalize-path": "^3.0.2",
|
|
71
70
|
"@types/ws": "^7.4.7",
|
|
72
71
|
"@types/yup": "^0.29.14",
|
|
73
|
-
"jest": "^29.7.0",
|
|
74
|
-
"jest-diff": "^29.7.0",
|
|
75
72
|
"jest-file-snapshot": "^0.5.0",
|
|
76
|
-
"jest-matcher-utils": "^29.7.0",
|
|
77
73
|
"memory-level": "^1.0.0",
|
|
78
74
|
"nodemon": "3.1.4",
|
|
79
75
|
"typescript": "^5.6.3",
|
|
76
|
+
"vite": "^4.3.9",
|
|
77
|
+
"vitest": "^0.32.2",
|
|
78
|
+
"zod": "^3.23.8",
|
|
80
79
|
"@tinacms/schema-tools": "1.7.0",
|
|
81
80
|
"@tinacms/scripts": "1.3.1"
|
|
82
81
|
},
|
|
@@ -85,7 +84,7 @@
|
|
|
85
84
|
"build": "tinacms-scripts build",
|
|
86
85
|
"docs": "pnpm typedoc",
|
|
87
86
|
"serve": "pnpm nodemon dist/server.js",
|
|
88
|
-
"test": "
|
|
89
|
-
"test-watch": "
|
|
87
|
+
"test": "vitest run",
|
|
88
|
+
"test-watch": "vitest"
|
|
90
89
|
}
|
|
91
90
|
}
|