@griddo/cx 10.1.50 → 10.1.51

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.
@@ -27,7 +27,7 @@ GFS4: `),console.error(e)});U[X]||(Qo=global[X]||[],ea(U,Qo),U.close=function(e)
27
27
  - ${t.toUpperCase()} ${n}
28
28
  - BODY: ${JSON.stringify(i)}
29
29
  - HEADERS: ${JSON.stringify(a)}
30
- - RESPONSE: ${f.response?.status,JSON.stringify(f.response?.data)}`),process.exit(1)),f.response||(console.log("Unknown error occurred"),console.log(JSON.stringify(f,null,2)),process.exit(1)),lp(f,{callInfo:{endpoint:n,body:i}}),console.warn(`Waiting for retry: ${t}`,n),await Jc(parseInt(cp)*1e3),hi({endpoint:n,body:i,cacheKey:s,attempt:o+1},t,r))}}async function Te(e){return await hi(e,"get")}async function di(e){let{endpoint:t,body:r,headers:n}=e,i=t.endsWith("/distributor")&&`# Distributor body: ${JSON.stringify(r)} lang: ${JSON.stringify(n?.lang)}`;return await hi(e,"post",i||"")}function lp(e,t){let{response:r,message:n,stack:i}=e,{callInfo:s}=t,{status:o,statusText:a,data:u}=r||{},d=[];for(let m of Object.keys(s))d.push(`${m}: ${typeof s[m]=="object"?JSON.stringify(s[m]):s[m]}`);let f=d.join(`
30
+ - RESPONSE: ${f.response?.status,JSON.stringify(f.response?.data)}`),process.exit(1)),f.response||(console.log("Unknown error occurred"),console.log(JSON.stringify(f,null,2)),process.exit(1)),lp(f,{callInfo:{endpoint:n,body:i}}),console.warn(`Waiting for retry: ${t}`,n),await Jc(parseInt(cp)*1e3),hi({endpoint:n,body:i,headers:a,cacheKey:s,attempt:o+1},t,r))}}async function Te(e){return await hi(e,"get")}async function di(e){let{endpoint:t,body:r,headers:n}=e,i=t.endsWith("/distributor")&&`# Distributor body: ${JSON.stringify(r)} lang: ${JSON.stringify(n?.lang)}`;return await hi(e,"post",i||"")}function lp(e,t){let{response:r,message:n,stack:i}=e,{callInfo:s}=t,{status:o,statusText:a,data:u}=r||{},d=[];for(let m of Object.keys(s))d.push(`${m}: ${typeof s[m]=="object"?JSON.stringify(s[m]):s[m]}`);let f=d.join(`
31
31
  `),p=r?`Code: ${o} - ${a}
32
32
  Response: ${JSON.stringify(u)}`:"",y=`${n}
33
33
  ${i}`;console.warn(Yc.default.bold.red(`
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.1.50";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.1.51";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
@@ -47,7 +47,7 @@ GFS4: `),console.error(e)});z[Z]||(ws=global[Z]||[],xs(z,ws),z.close=function(e)
47
47
  - ${t.toUpperCase()} ${n}
48
48
  - BODY: ${JSON.stringify(i)}
49
49
  - HEADERS: ${JSON.stringify(a)}
50
- - RESPONSE: ${f.response?.status,JSON.stringify(f.response?.data)}`),process.exit(1)),f.response||(console.log("Unknown error occurred"),console.log(JSON.stringify(f,null,2)),process.exit(1)),wp(f,{callInfo:{endpoint:n,body:i}}),console.warn(`Waiting for retry: ${t}`,n),await Xu(parseInt(bp)*1e3),nl({endpoint:n,body:i,cacheKey:s,attempt:o+1},t,r))}}async function il(e){return await nl(e,"get")}function wp(e,t){let{response:r,message:n,stack:i}=e,{callInfo:s}=t,{status:o,statusText:a,data:c}=r||{},d=[];for(let m of Object.keys(s))d.push(`${m}: ${typeof s[m]=="object"?JSON.stringify(s[m]):s[m]}`);let f=d.join(`
50
+ - RESPONSE: ${f.response?.status,JSON.stringify(f.response?.data)}`),process.exit(1)),f.response||(console.log("Unknown error occurred"),console.log(JSON.stringify(f,null,2)),process.exit(1)),wp(f,{callInfo:{endpoint:n,body:i}}),console.warn(`Waiting for retry: ${t}`,n),await Xu(parseInt(bp)*1e3),nl({endpoint:n,body:i,headers:a,cacheKey:s,attempt:o+1},t,r))}}async function il(e){return await nl(e,"get")}function wp(e,t){let{response:r,message:n,stack:i}=e,{callInfo:s}=t,{status:o,statusText:a,data:c}=r||{},d=[];for(let m of Object.keys(s))d.push(`${m}: ${typeof s[m]=="object"?JSON.stringify(s[m]):s[m]}`);let f=d.join(`
51
51
  `),p=r?`Code: ${o} - ${a}
52
52
  Response: ${JSON.stringify(c)}`:"",y=`${n}
53
53
  ${i}`;console.warn(tl.default.bold.red(`
@@ -27,7 +27,7 @@ GFS4: `),console.error(e)});H[K]||(ho=global[K]||[],mo(H,ho),H.close=function(e)
27
27
  - ${t.toUpperCase()} ${n}
28
28
  - BODY: ${JSON.stringify(i)}
29
29
  - HEADERS: ${JSON.stringify(a)}
30
- - RESPONSE: ${h.response?.status,JSON.stringify(h.response?.data)}`),process.exit(1)),h.response||(console.log("Unknown error occurred"),console.log(JSON.stringify(h,null,2)),process.exit(1)),hd(h,{callInfo:{endpoint:n,body:i}}),console.warn(`Waiting for retry: ${t}`,n),await ac(parseInt(fd)*1e3),Vn({endpoint:n,body:i,cacheKey:s,attempt:o+1},t,r))}}async function hc(e){return await Vn(e,"get")}async function dc(e){let{endpoint:t,body:r,headers:n}=e,i=t.endsWith("/distributor")&&`# Distributor body: ${JSON.stringify(r)} lang: ${JSON.stringify(n?.lang)}`;return await Vn(e,"post",i||"")}function hd(e,t){let{response:r,message:n,stack:i}=e,{callInfo:s}=t,{status:o,statusText:a,data:u}=r||{},d=[];for(let m of Object.keys(s))d.push(`${m}: ${typeof s[m]=="object"?JSON.stringify(s[m]):s[m]}`);let h=d.join(`
30
+ - RESPONSE: ${h.response?.status,JSON.stringify(h.response?.data)}`),process.exit(1)),h.response||(console.log("Unknown error occurred"),console.log(JSON.stringify(h,null,2)),process.exit(1)),hd(h,{callInfo:{endpoint:n,body:i}}),console.warn(`Waiting for retry: ${t}`,n),await ac(parseInt(fd)*1e3),Vn({endpoint:n,body:i,headers:a,cacheKey:s,attempt:o+1},t,r))}}async function hc(e){return await Vn(e,"get")}async function dc(e){let{endpoint:t,body:r,headers:n}=e,i=t.endsWith("/distributor")&&`# Distributor body: ${JSON.stringify(r)} lang: ${JSON.stringify(n?.lang)}`;return await Vn(e,"post",i||"")}function hd(e,t){let{response:r,message:n,stack:i}=e,{callInfo:s}=t,{status:o,statusText:a,data:u}=r||{},d=[];for(let m of Object.keys(s))d.push(`${m}: ${typeof s[m]=="object"?JSON.stringify(s[m]):s[m]}`);let h=d.join(`
31
31
  `),p=r?`Code: ${o} - ${a}
32
32
  Response: ${JSON.stringify(u)}`:"",y=`${n}
33
33
  ${i}`;console.warn(lc.default.bold.red(`
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.1.50",
4
+ "version": "10.1.51",
5
5
  "authors": [
6
6
  "Álvaro Sánchez' <alvaro.sanches@secuoyas.com>",
7
7
  "Diego M. Béjar <diego.bejar@secuoyas.com>",
@@ -68,7 +68,7 @@
68
68
  "react-helmet": "^6.0.0"
69
69
  },
70
70
  "devDependencies": {
71
- "@griddo/eslint-config-back": "^10.1.50",
71
+ "@griddo/eslint-config-back": "^10.1.51",
72
72
  "@types/babel__core": "^7.20.0",
73
73
  "@types/babel__preset-env": "^7.9.2",
74
74
  "@types/csvtojson": "^2.0.0",
@@ -116,5 +116,5 @@
116
116
  "publishConfig": {
117
117
  "access": "public"
118
118
  },
119
- "gitHead": "c3727dabbb6cefcfc1f7fc655c2458b3a1e003a3"
119
+ "gitHead": "2e597c20e74f524b4288de4ef99a77759bb93ca1"
120
120
  }
package/src/utils/api.ts CHANGED
@@ -115,6 +115,7 @@ async function requestAPI<T extends APIResponses>(
115
115
  {
116
116
  endpoint,
117
117
  body,
118
+ headers,
118
119
  cacheKey,
119
120
  attempt: attempt + 1,
120
121
  },