@ez4/gateway 0.31.0 → 0.31.1

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/dist/utils.cjs CHANGED
@@ -31,7 +31,7 @@ return(0,y.transform)(e,t,n)},"getResponseBody"),E=s(e=>(0,M.isAnyString)(e)?{js
31
31
  body:e}:{body:JSON.stringify(e),json:!0},"prepareBodyRequest");var W=s((e,t,r)=>{let{parameters:o,query:n}=r,i=o?q(t,o):t,c=n&&R(n),p=[e];return i&&
32
32
  p.push(i),c&&p.push("?",c),p.join("")},"getClientRequestUrl"),X=s(async(e,t,r)=>{
33
33
  let{headers:o,body:n,responseSchema:i,namingStyle:c,timeout:p=20}=r,m=n?E(n):void 0,
34
- v=new AbortController,I=setTimeout(()=>v?.abort("Request timed out"),p),h=await fetch(
34
+ v=new AbortController,I=setTimeout(()=>v?.abort("Request timed out"),p*1e3),h=await fetch(
35
35
  e,{signal:v?.signal,body:m?.body,method:t,headers:{...o,...m?.json&&{"content-ty\
36
36
  pe":"application/json"}}});if(clearTimeout(I),!h.ok){let P=await h.json();throw C(
37
37
  h.status,P.message,P.details)}let b=await h.text();return{status:h.status,...b&&
package/dist/utils.mjs CHANGED
@@ -27,7 +27,7 @@ seBody"),S=n(e=>_(e)?{json:!1,body:e}:{body:JSON.stringify(e),json:!0},"prepareB
27
27
  odyRequest");var Nt=n((e,t,r)=>{let{parameters:o,query:s}=r,a=o?l(t,o):t,p=s&&g(s),i=[e];return a&&
28
28
  i.push(a),p&&i.push("?",p),i.join("")},"getClientRequestUrl"),Qt=n(async(e,t,r)=>{
29
29
  let{headers:o,body:s,responseSchema:a,namingStyle:p,timeout:i=20}=r,c=s?S(s):void 0,
30
- f=new AbortController,w=setTimeout(()=>f?.abort("Request timed out"),i),m=await fetch(
30
+ f=new AbortController,w=setTimeout(()=>f?.abort("Request timed out"),i*1e3),m=await fetch(
31
31
  e,{signal:f?.signal,body:c?.body,method:t,headers:{...o,...c?.json&&{"content-ty\
32
32
  pe":"application/json"}}});if(clearTimeout(w),!m.ok){let y=await m.json();throw d(
33
33
  m.status,y.message,y.details)}let u=await m.text();return{status:m.status,...u&&
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@ez4/gateway",
3
3
  "description": "EZ4: Components to build gateway services",
4
- "version": "0.31.0",
4
+ "version": "0.31.1",
5
5
  "author": "Silas B.",
6
6
  "license": "MIT",
7
7
  "type": "module",