@fourlights/strapi-plugin-deep-populate 1.1.1 → 1.1.2
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/server/index.js +7 -0
- package/dist/server/index.mjs +7 -0
- package/package.json +1 -1
package/dist/server/index.js
CHANGED
|
@@ -25078,6 +25078,7 @@ async function _populateComponent({
|
|
|
25078
25078
|
populate: populate2 = {},
|
|
25079
25079
|
lookup,
|
|
25080
25080
|
inDynamicZone = false,
|
|
25081
|
+
resolvedRelations,
|
|
25081
25082
|
omitEmpty
|
|
25082
25083
|
}) {
|
|
25083
25084
|
const attrName = lookup.pop();
|
|
@@ -25090,6 +25091,7 @@ async function _populateComponent({
|
|
|
25090
25091
|
schema: schema2,
|
|
25091
25092
|
populate: componentPopulate,
|
|
25092
25093
|
lookup: componentLookup,
|
|
25094
|
+
resolvedRelations,
|
|
25093
25095
|
omitEmpty
|
|
25094
25096
|
});
|
|
25095
25097
|
return isEmpty(nestedPopulate) ? true : { populate: nestedPopulate };
|
|
@@ -25100,6 +25102,7 @@ async function _populateDynamicZone({
|
|
|
25100
25102
|
components,
|
|
25101
25103
|
populate: populate2,
|
|
25102
25104
|
lookup,
|
|
25105
|
+
resolvedRelations,
|
|
25103
25106
|
omitEmpty
|
|
25104
25107
|
}) {
|
|
25105
25108
|
const resolvedPopulate = await components.reduce(async (prev, cur) => {
|
|
@@ -25110,6 +25113,7 @@ async function _populateDynamicZone({
|
|
|
25110
25113
|
populate: populate2,
|
|
25111
25114
|
lookup: [...lookup, cur],
|
|
25112
25115
|
inDynamicZone: true,
|
|
25116
|
+
resolvedRelations,
|
|
25113
25117
|
omitEmpty
|
|
25114
25118
|
});
|
|
25115
25119
|
const newPop = await prev;
|
|
@@ -25219,11 +25223,13 @@ async function _populate({
|
|
|
25219
25223
|
mainDocumentId,
|
|
25220
25224
|
components: relComponents,
|
|
25221
25225
|
lookup: [...lookup, attrName],
|
|
25226
|
+
resolvedRelations,
|
|
25222
25227
|
omitEmpty
|
|
25223
25228
|
});
|
|
25224
25229
|
}
|
|
25225
25230
|
if (contentTypes.isRelationalAttribute(attr)) {
|
|
25226
25231
|
const { target: relContentType } = attr;
|
|
25232
|
+
resolvedRelations.set(mainDocumentId, true);
|
|
25227
25233
|
newPopulate[attrName] = await _populateRelation({
|
|
25228
25234
|
contentType: relContentType,
|
|
25229
25235
|
relation: value,
|
|
@@ -25237,6 +25243,7 @@ async function _populate({
|
|
|
25237
25243
|
mainDocumentId,
|
|
25238
25244
|
schema: attr.component,
|
|
25239
25245
|
lookup: [...lookup, attrName],
|
|
25246
|
+
resolvedRelations,
|
|
25240
25247
|
omitEmpty
|
|
25241
25248
|
});
|
|
25242
25249
|
}
|
package/dist/server/index.mjs
CHANGED
|
@@ -25064,6 +25064,7 @@ async function _populateComponent({
|
|
|
25064
25064
|
populate: populate2 = {},
|
|
25065
25065
|
lookup,
|
|
25066
25066
|
inDynamicZone = false,
|
|
25067
|
+
resolvedRelations,
|
|
25067
25068
|
omitEmpty
|
|
25068
25069
|
}) {
|
|
25069
25070
|
const attrName = lookup.pop();
|
|
@@ -25076,6 +25077,7 @@ async function _populateComponent({
|
|
|
25076
25077
|
schema: schema2,
|
|
25077
25078
|
populate: componentPopulate,
|
|
25078
25079
|
lookup: componentLookup,
|
|
25080
|
+
resolvedRelations,
|
|
25079
25081
|
omitEmpty
|
|
25080
25082
|
});
|
|
25081
25083
|
return isEmpty(nestedPopulate) ? true : { populate: nestedPopulate };
|
|
@@ -25086,6 +25088,7 @@ async function _populateDynamicZone({
|
|
|
25086
25088
|
components,
|
|
25087
25089
|
populate: populate2,
|
|
25088
25090
|
lookup,
|
|
25091
|
+
resolvedRelations,
|
|
25089
25092
|
omitEmpty
|
|
25090
25093
|
}) {
|
|
25091
25094
|
const resolvedPopulate = await components.reduce(async (prev, cur) => {
|
|
@@ -25096,6 +25099,7 @@ async function _populateDynamicZone({
|
|
|
25096
25099
|
populate: populate2,
|
|
25097
25100
|
lookup: [...lookup, cur],
|
|
25098
25101
|
inDynamicZone: true,
|
|
25102
|
+
resolvedRelations,
|
|
25099
25103
|
omitEmpty
|
|
25100
25104
|
});
|
|
25101
25105
|
const newPop = await prev;
|
|
@@ -25205,11 +25209,13 @@ async function _populate({
|
|
|
25205
25209
|
mainDocumentId,
|
|
25206
25210
|
components: relComponents,
|
|
25207
25211
|
lookup: [...lookup, attrName],
|
|
25212
|
+
resolvedRelations,
|
|
25208
25213
|
omitEmpty
|
|
25209
25214
|
});
|
|
25210
25215
|
}
|
|
25211
25216
|
if (contentTypes.isRelationalAttribute(attr)) {
|
|
25212
25217
|
const { target: relContentType } = attr;
|
|
25218
|
+
resolvedRelations.set(mainDocumentId, true);
|
|
25213
25219
|
newPopulate[attrName] = await _populateRelation({
|
|
25214
25220
|
contentType: relContentType,
|
|
25215
25221
|
relation: value,
|
|
@@ -25223,6 +25229,7 @@ async function _populate({
|
|
|
25223
25229
|
mainDocumentId,
|
|
25224
25230
|
schema: attr.component,
|
|
25225
25231
|
lookup: [...lookup, attrName],
|
|
25232
|
+
resolvedRelations,
|
|
25226
25233
|
omitEmpty
|
|
25227
25234
|
});
|
|
25228
25235
|
}
|
package/package.json
CHANGED