@griddo/cx 1.75.65 → 1.75.68
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/gatsby-node.js +14 -2
- package/package.json +4 -3
- package/static/robots.txt +1 -3
package/gatsby-node.js
CHANGED
|
@@ -24,6 +24,7 @@ const publicBaseUrl = process.env.PUBLIC_API_URL;
|
|
|
24
24
|
const instance = process.env.REACT_APP_INSTANCE;
|
|
25
25
|
const IS_SERVE = !!process.env.IS_SERVE && JSON.parse(process.env.IS_SERVE);
|
|
26
26
|
const BUILD_MODE = process.env.CXBRANCH;
|
|
27
|
+
const GATSBY_THREADS = process.env.GATSBY_THREADS;
|
|
27
28
|
|
|
28
29
|
// Share info between actions (createPages and onPostBuild)
|
|
29
30
|
let updatedSites;
|
|
@@ -178,7 +179,7 @@ exports.createPages = async ({ actions }) => {
|
|
|
178
179
|
|
|
179
180
|
helpers.log('info', 'VALID PAGES -->', validPagesIds);
|
|
180
181
|
|
|
181
|
-
|
|
182
|
+
const renderPageProcess = async pageId => {
|
|
182
183
|
createdPages.push(pageId);
|
|
183
184
|
|
|
184
185
|
// Get page data
|
|
@@ -231,7 +232,18 @@ exports.createPages = async ({ actions }) => {
|
|
|
231
232
|
);
|
|
232
233
|
|
|
233
234
|
buildProcessData[siteId].publishHashes.push(page.hash);
|
|
234
|
-
}
|
|
235
|
+
};
|
|
236
|
+
|
|
237
|
+
const gatsbyThreads = GATSBY_THREADS && parseInt(GATSBY_THREADS) || 10;
|
|
238
|
+
helpers.log('info', `Processing createPages with ${gatsbyThreads} threads`);
|
|
239
|
+
|
|
240
|
+
await import('p-limit').then(async pLimit => {
|
|
241
|
+
const limit = pLimit.default(gatsbyThreads);
|
|
242
|
+
const pagesToRender = validPagesIds.map(id =>
|
|
243
|
+
limit(() => renderPageProcess(id))
|
|
244
|
+
);
|
|
245
|
+
await Promise.all(pagesToRender);
|
|
246
|
+
});
|
|
235
247
|
}
|
|
236
248
|
};
|
|
237
249
|
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@griddo/cx",
|
|
3
3
|
"description": "Griddo SSG based on Gatsby",
|
|
4
|
-
"version": "1.75.
|
|
4
|
+
"version": "1.75.68",
|
|
5
5
|
"authors": [
|
|
6
6
|
"Álvaro Sánchez' <alvaro.sanches@secuoyas.com>",
|
|
7
7
|
"Carlos Torres <carlos.torres@secuoyas.com>",
|
|
@@ -59,13 +59,14 @@
|
|
|
59
59
|
"js2xmlparser": "^4.0.1",
|
|
60
60
|
"node-sass": "^6.0.0",
|
|
61
61
|
"opn": "^6.0.0",
|
|
62
|
+
"p-limit": "^4.0.0",
|
|
62
63
|
"path-browserify": "^1.0.1",
|
|
63
64
|
"pkg-dir": "^5.0.0",
|
|
64
65
|
"process": "^0.11.10",
|
|
65
66
|
"react-helmet": "^6.0.0"
|
|
66
67
|
},
|
|
67
68
|
"devDependencies": {
|
|
68
|
-
"@griddo/eslint-config-back": "^1.75.
|
|
69
|
+
"@griddo/eslint-config-back": "^1.75.68",
|
|
69
70
|
"eslint": "^7.5.0",
|
|
70
71
|
"eslint-plugin-node": "^11.1.0",
|
|
71
72
|
"eslint-plugin-react": "7.14.3",
|
|
@@ -97,5 +98,5 @@
|
|
|
97
98
|
"publishConfig": {
|
|
98
99
|
"access": "public"
|
|
99
100
|
},
|
|
100
|
-
"gitHead": "
|
|
101
|
+
"gitHead": "e016318dbfb512cacc95888e4b134f363361c00e"
|
|
101
102
|
}
|
package/static/robots.txt
CHANGED