@tinacms/graphql 1.5.11 → 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 +32 -1
- package/dist/index.mjs +32 -1
- package/package.json +1 -1
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",
|
|
@@ -7151,10 +7151,41 @@ var _indexContent = async (database, level, documentPaths, enqueueOps, collectio
|
|
|
7151
7151
|
await hashPasswordValues(aliasedData, passwordFields);
|
|
7152
7152
|
}
|
|
7153
7153
|
const normalizedPath = (0, import_schema_tools4.normalizePath)(filepath);
|
|
7154
|
+
const rootSublevel = level.sublevel(
|
|
7155
|
+
CONTENT_ROOT_PREFIX,
|
|
7156
|
+
SUBLEVEL_OPTIONS
|
|
7157
|
+
);
|
|
7154
7158
|
const folderKey = folderTreeBuilder.update(
|
|
7155
7159
|
normalizedPath,
|
|
7156
7160
|
collectionPath || ""
|
|
7157
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
|
+
}
|
|
7158
7189
|
if (!isGitKeep(filepath, collection)) {
|
|
7159
7190
|
await enqueueOps([
|
|
7160
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",
|
|
@@ -7067,10 +7067,41 @@ var _indexContent = async (database, level, documentPaths, enqueueOps, collectio
|
|
|
7067
7067
|
await hashPasswordValues(aliasedData, passwordFields);
|
|
7068
7068
|
}
|
|
7069
7069
|
const normalizedPath = normalizePath(filepath);
|
|
7070
|
+
const rootSublevel = level.sublevel(
|
|
7071
|
+
CONTENT_ROOT_PREFIX,
|
|
7072
|
+
SUBLEVEL_OPTIONS
|
|
7073
|
+
);
|
|
7070
7074
|
const folderKey = folderTreeBuilder.update(
|
|
7071
7075
|
normalizedPath,
|
|
7072
7076
|
collectionPath || ""
|
|
7073
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
|
+
}
|
|
7074
7105
|
if (!isGitKeep(filepath, collection)) {
|
|
7075
7106
|
await enqueueOps([
|
|
7076
7107
|
...makeIndexOpsForDocument(
|