@griddo/cx 10.3.12 → 10.3.14

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/build/index.js CHANGED
@@ -25,7 +25,7 @@ GFS4: `),console.error(e)});z[Z]||(ws=global[Z]||[],xs(z,ws),z.close=function(e)
25
25
  \u2502 Access credentials failure \u2502
26
26
  \u2502 Check that the login details are correct in your .env file \u2502
27
27
  \u2570\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256F
28
- `)),process.exit(1)}}},Ar=new Kn;var el=K(Yn()),tl=K(gt()),rl=K(Gt());var yp=K(gt()),Vu=K(Gt()),gp=K(gn()),Yu=K(Wu());var Ju="10.3.12";Vu.default.config();var vp=!!process.env.GRIDDO_BUILD_LOGS&&!!JSON.parse(process.env.GRIDDO_BUILD_LOGS)||!!process.env.LOGS&&!!JSON.parse(process.env.LOGS);function Ku(e){let t=e.length,r=e.length+2,n=" ".repeat(Math.floor((r-t)/2)),i=`\u256D${"\u2500".repeat(r)}\u256E
28
+ `)),process.exit(1)}}},Ar=new Kn;var el=K(Yn()),tl=K(gt()),rl=K(Gt());var yp=K(gt()),Vu=K(Gt()),gp=K(gn()),Yu=K(Wu());var Ju="10.3.14";Vu.default.config();var vp=!!process.env.GRIDDO_BUILD_LOGS&&!!JSON.parse(process.env.GRIDDO_BUILD_LOGS)||!!process.env.LOGS&&!!JSON.parse(process.env.LOGS);function Ku(e){let t=e.length,r=e.length+2,n=" ".repeat(Math.floor((r-t)/2)),i=`\u256D${"\u2500".repeat(r)}\u256E
29
29
  `,s=`
30
30
  \u2570${"\u2500".repeat(r)}\u256F`,o=`\u2502${n}${e}${n}\u2502`;console.log(`${i}${o}${s}`)}function fi(e){vp&&console.info(e.replace(/(\s)\s+/g,"$1"))}function Xu(e){return new Promise(t=>setTimeout(t,e))}function Dr(e,t=3){return(e/1e3).toFixed(t)}function hi(e){return"site"in e&&e.site?e?.site:void 0}function di(...e){let t=performance.now();return e.forEach(r=>r()),Dr(performance.now()-t)}function Qu(){let e=`
31
31
  \xB7\xB7
package/gatsby-config.ts CHANGED
@@ -23,7 +23,18 @@ const config: GatsbyConfig = {
23
23
  ...plugins,
24
24
 
25
25
  // Defaults plugins
26
- "gatsby-plugin-react-svg",
26
+ {
27
+ resolve: "gatsby-plugin-svgr-loader",
28
+ options: {
29
+ rule: {
30
+ options: {
31
+ titleProp: true,
32
+ descProp: true,
33
+ ref: true,
34
+ },
35
+ },
36
+ },
37
+ },
27
38
  "gatsby-plugin-react-helmet", // TODO: Remove with Gatsby@5.5.0
28
39
  ],
29
40
  };
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": "10.3.12",
4
+ "version": "10.3.14",
5
5
  "authors": [
6
6
  "Álvaro Sánchez' <alvaro.sanches@secuoyas.com>",
7
7
  "Diego M. Béjar <diego.bejar@secuoyas.com>",
@@ -53,9 +53,9 @@
53
53
  "gatsby": "^4.8.0",
54
54
  "gatsby-plugin-polyfill-io": "^1.1.0",
55
55
  "gatsby-plugin-react-helmet": "^5.8.0",
56
- "gatsby-plugin-react-svg": "^3.1.0",
57
56
  "gatsby-plugin-sass": "^5.21.0",
58
57
  "gatsby-plugin-styled-components": "^5.8.0",
58
+ "gatsby-plugin-svgr-loader": "^0.1.0",
59
59
  "gradient-string": "^2.0.2",
60
60
  "html-react-parser": "^1.4.10",
61
61
  "js2xmlparser": "^4.0.1",
@@ -67,7 +67,7 @@
67
67
  "react-helmet": "^6.0.0"
68
68
  },
69
69
  "devDependencies": {
70
- "@griddo/eslint-config-back": "^10.3.12",
70
+ "@griddo/eslint-config-back": "^10.3.14",
71
71
  "@types/babel__core": "^7.20.0",
72
72
  "@types/babel__preset-env": "^7.9.2",
73
73
  "@types/csvtojson": "^2.0.0",
@@ -114,5 +114,5 @@
114
114
  "publishConfig": {
115
115
  "access": "public"
116
116
  },
117
- "gitHead": "155bbf95546aff2816751d26cdbf7ba39893f80f"
117
+ "gitHead": "d9d0cd327717be48374506340e8ed0c533ea34d4"
118
118
  }
@@ -95,6 +95,15 @@ class DistributorService {
95
95
  return [];
96
96
  }
97
97
 
98
+ // Avoid fetch distributors with empty `data.sources`
99
+ if (Array.isArray(data.sources) && data.sources.length < 1) {
100
+ logBox(
101
+ `Warning: Page with id: ${page.id} has a ReferenceField with empty \`data.sources\``
102
+ );
103
+
104
+ return [];
105
+ }
106
+
98
107
  const { site, lang } = data;
99
108
  const body = this.getBody(data, page);
100
109
  const response = await SitesService.getDistributorData(