@griddo/cx 1.64.3 → 1.64.4

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/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.64.3",
4
+ "version": "1.64.4",
5
5
  "authors": [
6
6
  "Álvaro Sánchez' <alvaro.sanches@secuoyas.com>",
7
7
  "Carlos Torres <carlos.torres@secuoyas.com>",
@@ -64,7 +64,7 @@
64
64
  "react-helmet": "^6.0.0"
65
65
  },
66
66
  "devDependencies": {
67
- "@griddo/eslint-config-back": "^1.64.3",
67
+ "@griddo/eslint-config-back": "^1.64.4",
68
68
  "eslint": "^7.5.0",
69
69
  "eslint-plugin-node": "^11.1.0",
70
70
  "eslint-plugin-react": "7.14.3",
@@ -96,5 +96,5 @@
96
96
  "publishConfig": {
97
97
  "access": "public"
98
98
  },
99
- "gitHead": "994ccbcebae872939bd955db70601a828bc0ca1d"
99
+ "gitHead": "a045d43ac19e438d34409cc45cd60dbbe5429578"
100
100
  }
@@ -3,7 +3,16 @@ const SitesService = require('./sites').default;
3
3
 
4
4
  class DistributorService {
5
5
  static getBody(data) {
6
- const { order, source, quantity, mode, fixed, filter } = data;
6
+ const {
7
+ order,
8
+ source,
9
+ quantity,
10
+ mode,
11
+ fixed,
12
+ filter,
13
+ fullRelations = false
14
+ } = data;
15
+
7
16
  return mode === 'auto'
8
17
  ? {
9
18
  mode,
@@ -11,10 +20,12 @@ class DistributorService {
11
20
  source,
12
21
  quantity,
13
22
  filter,
23
+ fullRelations,
14
24
  }
15
25
  : {
16
26
  mode,
17
27
  fixed,
28
+ fullRelations,
18
29
  };
19
30
  }
20
31
 
@@ -10,6 +10,7 @@ const folders = require('./folders');
10
10
  const baseUrl = process.env.API_URL;
11
11
  const testSite = process.env.testSite && parseInt(process.env.testSite);
12
12
  const BYPASSRENDER = JSON.parse(process.env.BYPASSRENDER);
13
+ const updateAllSitesAlways = process.env.updateAllSites === 'on';
13
14
 
14
15
  const checkSites = async () => {
15
16
  await AuthService.login();
@@ -18,10 +19,13 @@ const checkSites = async () => {
18
19
 
19
20
  const sites = await SitesService.getAll();
20
21
 
21
- const updatedSites = sites.filter(site =>
22
- testSite ? site.id === testSite : !!site.shouldBeUpdated
23
- );
24
- if (!!updatedSites.length) {
22
+ const updatedSites = updateAllSitesAlways
23
+ ?
24
+ sites.filter(site => !testSite || site.id === testSite)
25
+ :
26
+ sites.filter(site => testSite ? site.id === testSite : !!site.shouldBeUpdated);
27
+
28
+ if (updatedSites.length) {
25
29
  for (const updatedSite of updatedSites) {
26
30
  const langResponse = await SitesService.getLanguages(updatedSite.id);
27
31
  const domains = langResponse.items.map(item => {