@quintype/framework 7.0.3-new-branch.0 → 7.1.0
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/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,15 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
|
|
4
4
|
|
|
5
|
+
## [7.1.0](https://github.com/quintype/quintype-node-framework/compare/v7.0.3...v7.1.0) (2022-02-11)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Features
|
|
9
|
+
|
|
10
|
+
* **Custom Layout:** support custom storylimit and custom nestedCollectionLimit ([#288](https://github.com/quintype/quintype-node-framework/issues/288)) ([1e3e8ae](https://github.com/quintype/quintype-node-framework/commit/1e3e8ae7c7da2e336260911cf41f56c5419e9480))
|
|
11
|
+
|
|
12
|
+
### [7.0.3](https://github.com/quintype/quintype-node-framework/compare/v7.0.2...v7.0.3) (2022-02-01)
|
|
13
|
+
|
|
5
14
|
### [7.0.2](https://github.com/quintype/quintype-node-framework/compare/v7.0.1...v7.0.2) (2022-01-05)
|
|
6
15
|
|
|
7
16
|
### [7.0.1](https://github.com/quintype/quintype-node-framework/compare/v6.3.0...v7.0.1) (2021-12-15)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@quintype/framework",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.1.0",
|
|
4
4
|
"description": "Libraries to help build Quintype Node.js apps",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -27,8 +27,8 @@
|
|
|
27
27
|
"homepage": "https://github.com/quintype/quintype-node-framework#readme",
|
|
28
28
|
"dependencies": {
|
|
29
29
|
"@ampproject/toolbox-optimizer": "2.8.3",
|
|
30
|
-
"@quintype/amp": "^2.4.
|
|
31
|
-
"@quintype/backend": "^2.
|
|
30
|
+
"@quintype/amp": "^2.4.19",
|
|
31
|
+
"@quintype/backend": "^2.2.0",
|
|
32
32
|
"@quintype/components": "^3.0.0",
|
|
33
33
|
"@quintype/prerender-node": "^3.2.24",
|
|
34
34
|
"@quintype/seo": "^1.38.1",
|
|
@@ -19,13 +19,21 @@ exports.homeCollectionOrStories = function homeCollectionOrStories(
|
|
|
19
19
|
depth = 1,
|
|
20
20
|
getStoryLimits,
|
|
21
21
|
params = {},
|
|
22
|
-
collectionOfCollectionsIndexes = []
|
|
22
|
+
collectionOfCollectionsIndexes = [],
|
|
23
|
+
customLayouts = [],
|
|
24
|
+
defaultNestedLimit = null
|
|
23
25
|
) {
|
|
24
26
|
return Collection.getCollectionBySlug(
|
|
25
27
|
client,
|
|
26
28
|
"home",
|
|
27
29
|
{ "item-type": "collection", ...params },
|
|
28
|
-
{
|
|
30
|
+
{
|
|
31
|
+
depth,
|
|
32
|
+
...(getStoryLimits && { storyLimits: getStoryLimits() }),
|
|
33
|
+
collectionOfCollectionsIndexes,
|
|
34
|
+
customLayouts,
|
|
35
|
+
defaultNestedLimit,
|
|
36
|
+
}
|
|
29
37
|
).then((collection) => {
|
|
30
38
|
if (collection) return collection;
|
|
31
39
|
return Story.getStories(client).then((stories) =>
|
|
@@ -26,7 +26,7 @@ function loadDataForIsomorphicRoute(
|
|
|
26
26
|
loadErrorData,
|
|
27
27
|
url,
|
|
28
28
|
routes,
|
|
29
|
-
{ otherParams, config, client, host, logError, domainSlug, redirectToLowercaseSlugs, cookies }
|
|
29
|
+
{ otherParams, config, client, host, logError, domainSlug, redirectToLowercaseSlugs, cookies, mobileApiEnabled }
|
|
30
30
|
) {
|
|
31
31
|
return loadDataForEachRoute().catch((error) => {
|
|
32
32
|
logError(error);
|
|
@@ -61,6 +61,7 @@ function loadDataForIsomorphicRoute(
|
|
|
61
61
|
next: abortHandler,
|
|
62
62
|
domainSlug,
|
|
63
63
|
cookies,
|
|
64
|
+
mobileApiEnabled,
|
|
64
65
|
});
|
|
65
66
|
|
|
66
67
|
if (result && result[ABORT_HANDLER]) continue;
|
|
@@ -253,6 +254,7 @@ exports.handleIsomorphicDataLoad = function handleIsomorphicDataLoad(
|
|
|
253
254
|
logError,
|
|
254
255
|
host: req.hostname,
|
|
255
256
|
domainSlug,
|
|
257
|
+
mobileApiEnabled,
|
|
256
258
|
}).then((result) => Object.assign({ pageType, disableIsomorphicComponent: true }, result));
|
|
257
259
|
}
|
|
258
260
|
}
|
|
@@ -275,6 +277,7 @@ exports.handleIsomorphicDataLoad = function handleIsomorphicDataLoad(
|
|
|
275
277
|
domainSlug,
|
|
276
278
|
redirectToLowercaseSlugs,
|
|
277
279
|
cookies: req.cookies,
|
|
280
|
+
mobileApiEnabled,
|
|
278
281
|
}).catch((e) => {
|
|
279
282
|
logError(e);
|
|
280
283
|
return { httpStatusCode: 500, pageType: "error" };
|