@nascentdigital/funnel-cms 6.1.0 → 6.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.
|
@@ -92,16 +92,17 @@ class ContentfulPageClient {
|
|
|
92
92
|
// fetch items (bail if there are no instances
|
|
93
93
|
const { language, region, version } = args, queryArgs = __rest(args, ["language", "region", "version"]);
|
|
94
94
|
const { cms } = this;
|
|
95
|
-
|
|
95
|
+
console.debug('[ContentfulPageClient/getGroup] query group entries for', JSON.stringify(queryArgs, undefined, ' '));
|
|
96
|
+
const { entries } = await cms.getEntries(Object.assign({ content_type: models_1.ContentfulPageData.contentType, version, select: getPageSelect(funnel_core_1.Schema.Page.Data.Props.id) }, getPageQueryParams(queryArgs)));
|
|
96
97
|
// bail if no items
|
|
97
98
|
if (entries.length === 0) {
|
|
98
|
-
console.debug('[ContentfulPageClient/getGroup] no items in group', args);
|
|
99
|
+
console.debug('[ContentfulPageClient/getGroup] no items in group', JSON.stringify(args, undefined, ' '));
|
|
99
100
|
const { brand, groupId: possibleGroupId, type, slug } = queryArgs;
|
|
100
101
|
return {
|
|
101
102
|
group: { groupId: possibleGroupId !== null && possibleGroupId !== void 0 ? possibleGroupId : funnel_core_1.Schema.Page.GroupId.empty, brand, type, slug, instances: [] }
|
|
102
103
|
};
|
|
103
104
|
}
|
|
104
|
-
console.debug('[ContentfulPageClient/getGroup] processing group items', args);
|
|
105
|
+
console.debug('[ContentfulPageClient/getGroup] processing group items', JSON.stringify(args, undefined, ' '));
|
|
105
106
|
// collate the group ids into summaries (fetches full page if region/language match exists
|
|
106
107
|
const instances = entries.map(entry => models_1.ContentfulPageData.deserialize(entry, funnel_core_1.Schema.Page.Data.AsGroup.Instance.props));
|
|
107
108
|
// bind page (if it exists)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nascentdigital/funnel-cms",
|
|
3
|
-
"version": "6.1.
|
|
3
|
+
"version": "6.1.2",
|
|
4
4
|
"repository": {
|
|
5
5
|
"url": "git+https://github.com/nascentdigital/funnel.git",
|
|
6
6
|
"directory": "libs/cms"
|
|
@@ -48,5 +48,5 @@
|
|
|
48
48
|
"ts-jest": "^29",
|
|
49
49
|
"type-fest": "^4"
|
|
50
50
|
},
|
|
51
|
-
"gitHead": "
|
|
51
|
+
"gitHead": "d72a93d505884f030d595ecf66c64351ebfc8ed1"
|
|
52
52
|
}
|