@griddo/cx 10.1.47 → 10.1.49

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.1.47";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.49";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
@@ -46,7 +46,8 @@ GFS4: `),console.error(e)});z[Z]||(ws=global[Z]||[],xs(z,ws),z.close=function(e)
46
46
  `;console.log(Yu.default.cristal(e))}rl.default.config();var{env:{RETRY_WAIT_SECONDS:bp="4",RETRY_ATTEMPTS:Zu="4"}}=process;async function nl(e,t,r=""){let{endpoint:n,body:i,cacheKey:s="",attempt:o=1,headers:a}=e,c={endpoint:n,body:i,headers:a,cacheKey:s};if(s){let d=new Date,f=Ca(c);if(f){let p=hi(f),y=p?`site: ${p}`:"",m=Dr(new Date().getTime()-d.getTime());return fi(`${t} (cache) ${y} ${n} - ${m}s ${r}`),f}}try{let d=new Date,{data:f}=await(0,el.default)({url:n,method:t,headers:Object.assign({},a,Ar.headers),data:i}),p=hi(f),y=p?`site: ${p}`:"",m=Dr(new Date().getTime()-d.getTime());return fi(`${t} (fetch) ${y} ${n} - ${m}s ${r}`),ka(c,f),f}catch(d){let f=d;return f.response?.status===404?null:(o>parseInt(Zu)&&(console.log(`Max attempts ${Zu} reached
47
47
  - ${t.toUpperCase()} ${n}
48
48
  - BODY: ${JSON.stringify(i)}
49
- - HEADERS: ${JSON.stringify(a)})`),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(`
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
51
  `),p=r?`Code: ${o} - ${a}
51
52
  Response: ${JSON.stringify(c)}`:"",y=`${n}
52
53
  ${i}`;console.warn(tl.default.bold.red(`