gemi 0.4.85 → 0.4.87
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/app/App.d.ts +1 -1
- package/dist/app/App.d.ts.map +1 -1
- package/dist/app/index.js +1 -141
- package/dist/app/prismaExtension.d.ts +1 -5
- package/dist/app/prismaExtension.d.ts.map +1 -1
- package/dist/bin/index.js +124 -69
- package/dist/chunk-28694e5e949df0ff.js +2 -0
- package/dist/chunk-332553172e3ab961.js +2 -0
- package/dist/chunk-43b1a27bc037bc09.js +2 -0
- package/dist/chunk-519593bc19f7cb9f.js +18 -0
- package/dist/chunk-5806220e55ac164c.js +1 -0
- package/dist/chunk-5f01223b8fbe1ed8.js +2 -0
- package/dist/chunk-6434d2c5758f4125.js +2 -0
- package/dist/chunk-69b5648fcd0f0a18.js +3 -0
- package/dist/{chunk-b99af11a56fdd395.js → chunk-6b18189b2aabf6b7.js} +1 -1
- package/dist/chunk-8e55cff6329b67a9.js +2 -0
- package/dist/chunk-8ee09f1f74206a04.js +1 -1
- package/dist/chunk-8f2c54f2cd43402a.js +2 -0
- package/dist/chunk-9383d727762ecba1.js +2 -0
- package/dist/chunk-b38c0c4618d0dd89.js +2 -0
- package/dist/chunk-b3eca9338a13f510.js +2 -0
- package/dist/chunk-b4cbb4706a35f5d5.js +2 -0
- package/dist/chunk-c160211e5cc4c447.js +2 -0
- package/dist/chunk-c4b0f134a6b82c51.js +2 -0
- package/dist/chunk-cc7158438e52b9ab.js +9 -0
- package/dist/chunk-d0b9873261cd82b7.js +6 -0
- package/dist/{chunk-63e9bc71922dbe80.js → chunk-fa61561237819f16.js} +1 -1
- package/dist/client/index.js +10 -10
- package/dist/facades/index.js +1 -1
- package/dist/kernel/index.js +1 -1
- package/dist/server/index.js +1 -1
- package/dist/services/index.js +1 -10
- package/dist/vite/{index-BDp-rm3S.mjs → index-CePL3kqT.mjs} +15 -11
- package/dist/vite/index.mjs +1 -1
- package/dist/vite/{typescript-x31i_8Ji.mjs → typescript-CaGEH4-o.mjs} +45 -23
- package/package.json +7 -1
- package/dist/app/createFlatApiRoutes.d.ts +0 -12
- package/dist/app/createFlatApiRoutes.d.ts.map +0 -1
- package/dist/chunk-0ddb821fe8124f54.js +0 -9
- package/dist/chunk-2335866508ec8b1b.js +0 -2
- package/dist/chunk-25ee58bc6072bd58.js +0 -2
- package/dist/chunk-2786cd9024d0d164.js +0 -2
- package/dist/chunk-3043d333fa68d342.js +0 -2
- package/dist/chunk-309e27a19cd3a645.js +0 -18
- package/dist/chunk-38315b1e3dd78ca7.js +0 -2
- package/dist/chunk-63c98893e07b1644.js +0 -2
- package/dist/chunk-8b950df276d04054.js +0 -2
- package/dist/chunk-9007899b37535873.js +0 -2
- package/dist/chunk-958e406572d457ca.js +0 -2
- package/dist/chunk-c27a654eada9167e.js +0 -2
- package/dist/chunk-c6ab6f8e07a028ac.js +0 -6
- package/dist/chunk-d16ef78d852a6856.js +0 -1
- package/dist/chunk-da07ce723d8218db.js +0 -3
- package/dist/chunk-f6a80fc55311e0c8.js +0 -2
- package/dist/chunk-f9f264ce0c8e9699.js +0 -2
- package/dist/chunk-ff8cd8fd047cfee5.js +0 -2
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import{B as N,C as $} from"./chunk-24a86f8f5ddc0cbd.js";import{Cb as z} from"./chunk-6b18189b2aabf6b7.js";var ot=$((Ys,Dt)=>{var{defineProperty:W,getOwnPropertyDescriptor:Cr,getOwnPropertyNames:$r}=Object,Sr=Object.prototype.hasOwnProperty,C=(t,n)=>W(t,"name",{value:n,configurable:!0}),Ir=(t,n)=>{for(var r in n)W(t,r,{get:n[r],enumerable:!0})},Fr=(t,n,r,e)=>{if(n&&typeof n==="object"||typeof n==="function"){for(let s of $r(n))if(!Sr.call(t,s)&&s!==r)W(t,s,{get:()=>n[s],enumerable:!(e=Cr(n,s))||e.enumerable})}return t},Ur=(t)=>Fr(W({},"__esModule",{value:!0}),t),Lt={};Ir(Lt,{constructStack:()=>st});Dt.exports=Ur(Lt);var D=C((t,n)=>{const r=[];if(t)r.push(t);if(n)for(let e of n)r.push(e);return r},"getAllAliases"),A=C((t,n)=>{return`${t||"anonymous"}${n&&n.length>0?` (a.k.a. ${n.join(",")})`:""}`},"getMiddlewareNameWithAliases"),st=C(()=>{let t=[],n=[],r=!1;const e=new Set,s=C((f)=>f.sort((g,h)=>At[h.step]-At[g.step]||Nt[h.priority||"normal"]-Nt[g.priority||"normal"]),"sort"),o=C((f)=>{let g=!1;const h=C((p)=>{const l=D(p.name,p.aliases);if(l.includes(f)){g=!0;for(let w of l)e.delete(w);return!1}return!0},"filterCb");return t=t.filter(h),n=n.filter(h),g},"removeByName"),c=C((f)=>{let g=!1;const h=C((p)=>{if(p.middleware===f){g=!0;for(let l of D(p.name,p.aliases))e.delete(l);return!1}return!0},"filterCb");return t=t.filter(h),n=n.filter(h),g},"removeByReference"),i=C((f)=>{var g;return t.forEach((h)=>{f.add(h.middleware,{...h})}),n.forEach((h)=>{f.addRelativeTo(h.middleware,{...h})}),(g=f.identifyOnResolve)==null||g.call(f,x.identifyOnResolve()),f},"cloneTo"),d=C((f)=>{const g=[];return f.before.forEach((h)=>{if(h.before.length===0&&h.after.length===0)g.push(h);else g.push(...d(h))}),g.push(f),f.after.reverse().forEach((h)=>{if(h.before.length===0&&h.after.length===0)g.push(h);else g.push(...d(h))}),g},"expandRelativeMiddlewareList"),y=C((f=!1)=>{const g=[],h=[],p={};return t.forEach((w)=>{const T={...w,before:[],after:[]};for(let u of D(T.name,T.aliases))p[u]=T;g.push(T)}),n.forEach((w)=>{const T={...w,before:[],after:[]};for(let u of D(T.name,T.aliases))p[u]=T;h.push(T)}),h.forEach((w)=>{if(w.toMiddleware){const T=p[w.toMiddleware];if(T===void 0){if(f)return;throw new Error(`${w.toMiddleware} is not found when adding ${A(w.name,w.aliases)} middleware ${w.relation} ${w.toMiddleware}`)}if(w.relation==="after")T.after.push(w);if(w.relation==="before")T.before.push(w)}}),s(g).map(d).reduce((w,T)=>{return w.push(...T),w},[])},"getMiddlewareList"),x={add:(f,g={})=>{const{name:h,override:p,aliases:l}=g,w={step:"initialize",priority:"normal",middleware:f,...g},T=D(h,l);if(T.length>0){if(T.some((u)=>e.has(u))){if(!p)throw new Error(`Duplicate middleware name '${A(h,l)}'`);for(let u of T){const E=t.findIndex((b)=>{var S;return b.name===u||((S=b.aliases)==null?void 0:S.some((et)=>et===u))});if(E===-1)continue;const a=t[E];if(a.step!==w.step||w.priority!==a.priority)throw new Error(`"${A(a.name,a.aliases)}" middleware with ${a.priority} priority in ${a.step} step cannot be overridden by "${A(h,l)}" middleware with ${w.priority} priority in ${w.step} step.`);t.splice(E,1)}}for(let u of T)e.add(u)}t.push(w)},addRelativeTo:(f,g)=>{const{name:h,override:p,aliases:l}=g,w={middleware:f,...g},T=D(h,l);if(T.length>0){if(T.some((u)=>e.has(u))){if(!p)throw new Error(`Duplicate middleware name '${A(h,l)}'`);for(let u of T){const E=n.findIndex((b)=>{var S;return b.name===u||((S=b.aliases)==null?void 0:S.some((et)=>et===u))});if(E===-1)continue;const a=n[E];if(a.toMiddleware!==w.toMiddleware||a.relation!==w.relation)throw new Error(`"${A(a.name,a.aliases)}" middleware ${a.relation} "${a.toMiddleware}" middleware cannot be overridden by "${A(h,l)}" middleware ${w.relation} "${w.toMiddleware}" middleware.`);n.splice(E,1)}}for(let u of T)e.add(u)}n.push(w)},clone:()=>i(st()),use:(f)=>{f.applyToStack(x)},remove:(f)=>{if(typeof f==="string")return o(f);else return c(f)},removeByTag:(f)=>{let g=!1;const h=C((p)=>{const{tags:l,name:w,aliases:T}=p;if(l&&l.includes(f)){const u=D(w,T);for(let E of u)e.delete(E);return g=!0,!1}return!0},"filterCb");return t=t.filter(h),n=n.filter(h),g},concat:(f)=>{var g;const h=i(st());return h.use(f),h.identifyOnResolve(r||h.identifyOnResolve()||(((g=f.identifyOnResolve)==null?void 0:g.call(f))??!1)),h},applyToStack:i,identify:()=>{return y(!0).map((f)=>{const g=f.step??f.relation+" "+f.toMiddleware;return A(f.name,f.aliases)+" - "+g})},identifyOnResolve(f){if(typeof f==="boolean")r=f;return r},resolve:(f,g)=>{for(let h of y().map((p)=>p.middleware).reverse())f=h(f,g);if(r)console.log(x.identify());return f}};return x},"constructStack"),At={initialize:5,serialize:4,build:3,finalizeRequest:2,deserialize:1},Nt={high:3,normal:2,low:1}});var ft=$((co,Wt)=>{var{defineProperty:G,getOwnPropertyDescriptor:Dr,getOwnPropertyNames:Mr}=Object,Rr=Object.prototype.hasOwnProperty,ct=(t,n)=>G(t,"name",{value:n,configurable:!0}),Br=(t,n)=>{for(var r in n)G(t,r,{get:n[r],enumerable:!0})},mr=(t,n,r,e)=>{if(n&&typeof n==="object"||typeof n==="function"){for(let s of Mr(n))if(!Rr.call(t,s)&&s!==r)G(t,s,{get:()=>n[s],enumerable:!(e=Dr(n,s))||e.enumerable})}return t},jr=(t)=>mr(G({},"__esModule",{value:!0}),t),Vt={};Br(Vt,{escapeUri:()=>Yt,escapeUriPath:()=>Yr});Wt.exports=jr(Vt);var Yt=ct((t)=>encodeURIComponent(t).replace(/[!'()*]/g,Vr),"escapeUri"),Vr=ct((t)=>`%${t.charCodeAt(0).toString(16).toUpperCase()}`,"hexEncode"),Yr=ct((t)=>t.split("/").map(Yt).join("/"),"escapeUriPath")});var un=$((Di,hn)=>{var on=function(t){return Object.keys(t).reduce((n,r)=>{const e=t[r];return{...n,[r]:Array.isArray(e)?[...e]:e}},{})},fn=function(t){return/^[a-z0-9][a-z0-9\.\-]*[a-z0-9]$/.test(t)},k=Object.defineProperty,Pr=Object.getOwnPropertyDescriptor,Or=Object.getOwnPropertyNames,qr=Object.prototype.hasOwnProperty,L=(t,n)=>k(t,"name",{value:n,configurable:!0}),vr=(t,n)=>{for(var r in n)k(t,r,{get:n[r],enumerable:!0})},_r=(t,n,r,e)=>{if(n&&typeof n==="object"||typeof n==="function"){for(let s of Or(n))if(!qr.call(t,s)&&s!==r)k(t,s,{get:()=>n[s],enumerable:!(e=Pr(n,s))||e.enumerable})}return t},te=(t)=>_r(k({},"__esModule",{value:!0}),t),tn={};vr(tn,{Field:()=>ee,Fields:()=>se,HttpRequest:()=>oe,HttpResponse:()=>ie,IHttpRequest:()=>nn.HttpRequest,getHttpHandlerExtensionConfiguration:()=>ne,isValidHostname:()=>fn,resolveHttpHandlerRuntimeConfig:()=>re});hn.exports=te(tn);var ne=L((t)=>{let n=t.httpHandler;return{setHttpHandler(r){n=r},httpHandler(){return n},updateHttpClientConfig(r,e){n.updateHttpClientConfig(r,e)},httpHandlerConfigs(){return n.httpHandlerConfigs()}}},"getHttpHandlerExtensionConfiguration"),re=L((t)=>{return{httpHandler:t.httpHandler()}},"resolveHttpHandlerRuntimeConfig"),nn=z(),rn=class t{constructor({name:n,kind:r=nn.FieldPosition.HEADER,values:e=[]}){this.name=n,this.kind=r,this.values=e}add(n){this.values.push(n)}set(n){this.values=n}remove(n){this.values=this.values.filter((r)=>r!==n)}toString(){return this.values.map((n)=>n.includes(",")||n.includes(" ")?`"${n}"`:n).join(", ")}get(){return this.values}};L(rn,"Field");var ee=rn,en=class t{constructor({fields:n=[],encoding:r="utf-8"}){this.entries={},n.forEach(this.setField.bind(this)),this.encoding=r}setField(n){this.entries[n.name.toLowerCase()]=n}getField(n){return this.entries[n.toLowerCase()]}removeField(n){delete this.entries[n.toLowerCase()]}getByType(n){return Object.values(this.entries).filter((r)=>r.kind===n)}};L(en,"Fields");var se=en,sn=class t{constructor(n){this.method=n.method||"GET",this.hostname=n.hostname||"localhost",this.port=n.port,this.query=n.query||{},this.headers=n.headers||{},this.body=n.body,this.protocol=n.protocol?n.protocol.slice(-1)!==":"?`${n.protocol}:`:n.protocol:"https:",this.path=n.path?n.path.charAt(0)!=="/"?`/${n.path}`:n.path:"/",this.username=n.username,this.password=n.password,this.fragment=n.fragment}static clone(n){const r=new t({...n,headers:{...n.headers}});if(r.query)r.query=on(r.query);return r}static isInstance(n){if(!n)return!1;const r=n;return"method"in r&&"protocol"in r&&"hostname"in r&&"path"in r&&typeof r.query==="object"&&typeof r.headers==="object"}clone(){return t.clone(this)}};L(sn,"HttpRequest");var oe=sn;L(on,"cloneQuery");var cn=class t{constructor(n){this.statusCode=n.statusCode,this.reason=n.reason,this.headers=n.headers||{},this.body=n.body}static isInstance(n){if(!n)return!1;const r=n;return typeof r.statusCode==="number"&&typeof r.headers==="object"}};L(cn,"HttpResponse");var ie=cn;L(fn,"isValidHostname")});var wn=$((Mi,yn)=>{var gn=function(t){const n=[];for(let r of Object.keys(t).sort()){const e=t[r];if(r=Tt.escapeUri(r),Array.isArray(e))for(let s=0,o=e.length;s<o;s++)n.push(`${r}=${Tt.escapeUri(e[s])}`);else{let s=r;if(e||typeof e==="string")s+=`=${Tt.escapeUri(e)}`;n.push(s)}}return n.join("&")},J=Object.defineProperty,ce=Object.getOwnPropertyDescriptor,fe=Object.getOwnPropertyNames,he=Object.prototype.hasOwnProperty,ue=(t,n)=>J(t,"name",{value:n,configurable:!0}),de=(t,n)=>{for(var r in n)J(t,r,{get:n[r],enumerable:!0})},ge=(t,n,r,e)=>{if(n&&typeof n==="object"||typeof n==="function"){for(let s of fe(n))if(!he.call(t,s)&&s!==r)J(t,s,{get:()=>n[s],enumerable:!(e=ce(n,s))||e.enumerable})}return t},ye=(t)=>ge(J({},"__esModule",{value:!0}),t),dn={};de(dn,{buildQueryString:()=>gn});yn.exports=ye(dn);var Tt=ft();ue(gn,"buildQueryString")});var En=$((Ri,pn)=>{var{defineProperty:P,getOwnPropertyDescriptor:we,getOwnPropertyNames:Te}=Object,pe=Object.prototype.hasOwnProperty,Ee=(t,n)=>P(t,"name",{value:n,configurable:!0}),xe=(t,n)=>{for(var r in n)P(t,r,{get:n[r],enumerable:!0})},le=(t,n,r,e)=>{if(n&&typeof n==="object"||typeof n==="function"){for(let s of Te(n))if(!pe.call(t,s)&&s!==r)P(t,s,{get:()=>n[s],enumerable:!(e=we(n,s))||e.enumerable})}return t},ae=(t)=>le(P({},"__esModule",{value:!0}),t),Tn={};xe(Tn,{isArrayBuffer:()=>be});pn.exports=ae(Tn);var be=Ee((t)=>typeof ArrayBuffer==="function"&&t instanceof ArrayBuffer||Object.prototype.toString.call(t)==="[object ArrayBuffer]","isArrayBuffer")});var q=$((Bi,an)=>{var{defineProperty:O,getOwnPropertyDescriptor:Ce,getOwnPropertyNames:$e}=Object,Se=Object.prototype.hasOwnProperty,xn=(t,n)=>O(t,"name",{value:n,configurable:!0}),Ie=(t,n)=>{for(var r in n)O(t,r,{get:n[r],enumerable:!0})},Fe=(t,n,r,e)=>{if(n&&typeof n==="object"||typeof n==="function"){for(let s of $e(n))if(!Se.call(t,s)&&s!==r)O(t,s,{get:()=>n[s],enumerable:!(e=Ce(n,s))||e.enumerable})}return t},Ue=(t)=>Fe(O({},"__esModule",{value:!0}),t),ln={};Ie(ln,{fromArrayBuffer:()=>Ne,fromString:()=>Le});an.exports=Ue(ln);var Ae=En(),pt=import.meta.require("buffer"),Ne=xn((t,n=0,r=t.byteLength-n)=>{if(!Ae.isArrayBuffer(t))throw new TypeError(`The "input" argument must be ArrayBuffer. Received type ${typeof t} (${t})`);return pt.Buffer.from(t,n,r)},"fromArrayBuffer"),Le=xn((t,n)=>{if(typeof t!=="string")throw new TypeError(`The "input" argument must be of type string. Received type ${typeof t} (${t})`);return n?pt.Buffer.from(t,n):pt.Buffer.from(t)},"fromString")});var $n=$((bn)=>{Object.defineProperty(bn,"__esModule",{value:!0});bn.fromBase64=void 0;var De=q(),Me=/^[A-Za-z0-9+/]*={0,2}$/,Re=(t)=>{if(t.length*3%4!==0)throw new TypeError("Incorrect padding on base64 string.");if(!Me.exec(t))throw new TypeError("Invalid base64 string.");const n=De.fromString(t,"base64");return new Uint8Array(n.buffer,n.byteOffset,n.byteLength)};bn.fromBase64=Re});var An=$((ji,Un)=>{var{defineProperty:v,getOwnPropertyDescriptor:Be,getOwnPropertyNames:me}=Object,je=Object.prototype.hasOwnProperty,Et=(t,n)=>v(t,"name",{value:n,configurable:!0}),Ve=(t,n)=>{for(var r in n)v(t,r,{get:n[r],enumerable:!0})},Ye=(t,n,r,e)=>{if(n&&typeof n==="object"||typeof n==="function"){for(let s of me(n))if(!je.call(t,s)&&s!==r)v(t,s,{get:()=>n[s],enumerable:!(e=Be(n,s))||e.enumerable})}return t},We=(t)=>Ye(v({},"__esModule",{value:!0}),t),Sn={};Ve(Sn,{fromUtf8:()=>Fn,toUint8Array:()=>ze,toUtf8:()=>Ze});Un.exports=We(Sn);var In=q(),Fn=Et((t)=>{const n=In.fromString(t,"utf8");return new Uint8Array(n.buffer,n.byteOffset,n.byteLength/Uint8Array.BYTES_PER_ELEMENT)},"fromUtf8"),ze=Et((t)=>{if(typeof t==="string")return Fn(t);if(ArrayBuffer.isView(t))return new Uint8Array(t.buffer,t.byteOffset,t.byteLength/Uint8Array.BYTES_PER_ELEMENT);return new Uint8Array(t)},"toUint8Array"),Ze=Et((t)=>{if(typeof t==="string")return t;if(typeof t!=="object"||typeof t.byteOffset!=="number"||typeof t.byteLength!=="number")throw new Error("@smithy/util-utf8: toUtf8 encoder function only accepts string | Uint8Array.");return In.fromArrayBuffer(t.buffer,t.byteOffset,t.byteLength).toString("utf8")},"toUtf8")});var Dn=$((Nn)=>{Object.defineProperty(Nn,"__esModule",{value:!0});Nn.toBase64=void 0;var Ge=q(),He=An(),Ke=(t)=>{let n;if(typeof t==="string")n=He.fromUtf8(t);else n=t;if(typeof n!=="object"||typeof n.byteOffset!=="number"||typeof n.byteLength!=="number")throw new Error("@smithy/util-base64: toBase64 encoder function only accepts string | Uint8Array.");return Ge.fromArrayBuffer(n.buffer,n.byteOffset,n.byteLength).toString("base64")};Nn.toBase64=Ke});var Bn=$((Yi,_)=>{var{defineProperty:Mn,getOwnPropertyDescriptor:Qe,getOwnPropertyNames:Xe}=Object,ke=Object.prototype.hasOwnProperty,xt=(t,n,r,e)=>{if(n&&typeof n==="object"||typeof n==="function"){for(let s of Xe(n))if(!ke.call(t,s)&&s!==r)Mn(t,s,{get:()=>n[s],enumerable:!(e=Qe(n,s))||e.enumerable})}return t},Rn=(t,n,r)=>(xt(t,n,"default"),r&&xt(r,n,"default")),Je=(t)=>xt(Mn({},"__esModule",{value:!0}),t),lt={};_.exports=Je(lt);Rn(lt,$n(),_.exports);Rn(lt,Dn(),_.exports)});var Hn=$((Wi,Gn)=>{var Vn=function(t=0){return new Promise((n,r)=>{if(t)setTimeout(()=>{const e=new Error(`Request did not complete within ${t} ms`);e.name="TimeoutError",r(e)},t)})};async function Wn(t){const n=await Zn(t),r=es.fromBase64(n);return new Uint8Array(r)}async function zn(t){const n=[],r=t.getReader();let e=!1,s=0;while(!e){const{done:i,value:d}=await r.read();if(d)n.push(d),s+=d.length;e=i}const o=new Uint8Array(s);let c=0;for(let i of n)o.set(i,c),c+=i.length;return o}var Zn=function(t){return new Promise((n,r)=>{const e=new FileReader;e.onloadend=()=>{if(e.readyState!==2)return r(new Error("Reader aborted too early"));const s=e.result??"",o=s.indexOf(","),c=o>-1?o+1:s.length;n(s.substring(c))},e.onabort=()=>r(new Error("Read aborted")),e.onerror=()=>r(e.error),e.readAsDataURL(t)})},nt=Object.defineProperty,Pe=Object.getOwnPropertyDescriptor,Oe=Object.getOwnPropertyNames,qe=Object.prototype.hasOwnProperty,U=(t,n)=>nt(t,"name",{value:n,configurable:!0}),ve=(t,n)=>{for(var r in n)nt(t,r,{get:n[r],enumerable:!0})},_e=(t,n,r,e)=>{if(n&&typeof n==="object"||typeof n==="function"){for(let s of Oe(n))if(!qe.call(t,s)&&s!==r)nt(t,s,{get:()=>n[s],enumerable:!(e=Pe(n,s))||e.enumerable})}return t},ts=(t)=>_e(nt({},"__esModule",{value:!0}),t),jn={};ve(jn,{FetchHttpHandler:()=>rs,keepAliveSupport:()=>tt,streamCollector:()=>ss});Gn.exports=ts(jn);var mn=un(),ns=wn();U(Vn,"requestTimeout");var tt={supported:void 0},Yn=class t{static create(n){if(typeof(n==null?void 0:n.handle)==="function")return n;return new t(n)}constructor(n){if(typeof n==="function")this.configProvider=n().then((r)=>r||{});else this.config=n??{},this.configProvider=Promise.resolve(this.config);if(tt.supported===void 0)tt.supported=Boolean(typeof Request!=="undefined"&&"keepalive"in new Request("https://[::1]"))}destroy(){}async handle(n,{abortSignal:r}={}){var e;if(!this.config)this.config=await this.configProvider;const s=this.config.requestTimeout,o=this.config.keepAlive===!0,c=this.config.credentials;if(r==null?void 0:r.aborted){const u=new Error("Request aborted");return u.name="AbortError",Promise.reject(u)}let i=n.path;const d=ns.buildQueryString(n.query||{});if(d)i+=`?${d}`;if(n.fragment)i+=`#${n.fragment}`;let y="";if(n.username!=null||n.password!=null){const u=n.username??"",E=n.password??"";y=`${u}:${E}@`}const{port:x,method:f}=n,g=`${n.protocol}//${y}${n.hostname}${x?`:${x}`:""}${i}`,h=f==="GET"||f==="HEAD"?void 0:n.body,p={body:h,headers:new Headers(n.headers),method:f,credentials:c};if((e=this.config)==null?void 0:e.cache)p.cache=this.config.cache;if(h)p.duplex="half";if(typeof AbortController!=="undefined")p.signal=r;if(tt.supported)p.keepalive=o;if(typeof this.config.requestInit==="function")Object.assign(p,this.config.requestInit(n));let l=U(()=>{},"removeSignalEventListener");const w=new Request(g,p),T=[fetch(w).then((u)=>{const E=u.headers,a={};for(let S of E.entries())a[S[0]]=S[1];if(u.body==null)return u.blob().then((S)=>({response:new mn.HttpResponse({headers:a,reason:u.statusText,statusCode:u.status,body:S})}));return{response:new mn.HttpResponse({headers:a,reason:u.statusText,statusCode:u.status,body:u.body})}}),Vn(s)];if(r)T.push(new Promise((u,E)=>{const a=U(()=>{const b=new Error("Request aborted");b.name="AbortError",E(b)},"onAbort");if(typeof r.addEventListener==="function"){const b=r;b.addEventListener("abort",a,{once:!0}),l=U(()=>b.removeEventListener("abort",a),"removeSignalEventListener")}else r.onabort=a}));return Promise.race(T).finally(l)}updateHttpClientConfig(n,r){this.config=void 0,this.configProvider=this.configProvider.then((e)=>{return e[n]=r,e})}httpHandlerConfigs(){return this.config??{}}};U(Yn,"FetchHttpHandler");var rs=Yn,es=Bn(),ss=U((t)=>{if(typeof Blob==="function"&&t instanceof Blob)return Wn(t);return zn(t)},"streamCollector");U(Wn,"collectBlob");U(zn,"collectStream");U(Zn,"readToBase64")});var On=$((zi,Pn)=>{var kn=function(t){if(t.length%2!==0)throw new Error("Hex encoded strings must have an even number length");const n=new Uint8Array(t.length/2);for(let r=0;r<t.length;r+=2){const e=t.slice(r,r+2).toLowerCase();if(e in at)n[r/2]=at[e];else throw new Error(`Cannot decode unrecognized sequence ${e} as hexadecimal`)}return n},Jn=function(t){let n="";for(let r=0;r<t.byteLength;r++)n+=Xn[t[r]];return n},rt=Object.defineProperty,os=Object.getOwnPropertyDescriptor,is=Object.getOwnPropertyNames,cs=Object.prototype.hasOwnProperty,Kn=(t,n)=>rt(t,"name",{value:n,configurable:!0}),fs=(t,n)=>{for(var r in n)rt(t,r,{get:n[r],enumerable:!0})},hs=(t,n,r,e)=>{if(n&&typeof n==="object"||typeof n==="function"){for(let s of is(n))if(!cs.call(t,s)&&s!==r)rt(t,s,{get:()=>n[s],enumerable:!(e=os(n,s))||e.enumerable})}return t},us=(t)=>hs(rt({},"__esModule",{value:!0}),t),Qn={};fs(Qn,{fromHex:()=>kn,toHex:()=>Jn});Pn.exports=us(Qn);var Xn={},at={};for(let t=0;t<256;t++){let n=t.toString(16).toLowerCase();if(n.length===1)n=`0${n}`;Xn[t]=n,at[n]=t}Kn(kn,"fromHex");Kn(Jn,"toHex")});var Mt=N(ot(),1);class Ar{constructor(t){this.config=t,this.middlewareStack=Mt.constructStack()}send(t,n,r){const e=typeof n!=="function"?n:void 0,s=typeof n==="function"?n:r,o=e===void 0&&this.config.cacheMiddleware===!0;let c;if(o){if(!this.handlers)this.handlers=new WeakMap;const i=this.handlers;if(i.has(t.constructor))c=i.get(t.constructor);else c=t.resolveMiddleware(this.middlewareStack,this.config,e),i.set(t.constructor,c)}else delete this.handlers,c=t.resolveMiddleware(this.middlewareStack,this.config,e);if(s)c(t).then((i)=>s(null,i.output),(i)=>s(i)).catch(()=>{});else return c(t).then((i)=>i.output)}destroy(){this.config?.requestHandler?.destroy?.(),delete this.handlers}}var Rt=N(ot(),1),Bt=N(z(),1);class mt{constructor(){this.middlewareStack=Rt.constructStack()}static classBuilder(){return new jt}resolveMiddlewareWithContext(t,n,r,{middlewareFn:e,clientName:s,commandName:o,inputFilterSensitiveLog:c,outputFilterSensitiveLog:i,smithyContext:d,additionalContext:y,CommandCtor:x}){for(let l of e.bind(this)(x,t,n,r))this.middlewareStack.use(l);const f=t.concat(this.middlewareStack),{logger:g}=n,h={logger:g,clientName:s,commandName:o,inputFilterSensitiveLog:c,outputFilterSensitiveLog:i,[Bt.SMITHY_CONTEXT_KEY]:{commandInstance:this,...d},...y},{requestHandler:p}=n;return f.resolve((l)=>p.handle(l.request,r||{}),h)}}class jt{constructor(){this._init=()=>{},this._ep={},this._middlewareFn=()=>[],this._commandName="",this._clientName="",this._additionalContext={},this._smithyContext={},this._inputFilterSensitiveLog=(t)=>t,this._outputFilterSensitiveLog=(t)=>t,this._serializer=null,this._deserializer=null}init(t){this._init=t}ep(t){return this._ep=t,this}m(t){return this._middlewareFn=t,this}s(t,n,r={}){return this._smithyContext={service:t,operation:n,...r},this}c(t={}){return this._additionalContext=t,this}n(t,n){return this._clientName=t,this._commandName=n,this}f(t=(r)=>r,n=(r)=>r){return this._inputFilterSensitiveLog=t,this._outputFilterSensitiveLog=n,this}ser(t){return this._serializer=t,this}de(t){return this._deserializer=t,this}build(){const t=this;let n;return n=class extends mt{static getEndpointParameterInstructions(){return t._ep}constructor(...[r]){super();this.serialize=t._serializer,this.deserialize=t._deserializer,this.input=r??{},t._init(this)}resolveMiddleware(r,e,s){return this.resolveMiddlewareWithContext(r,e,s,{CommandCtor:n,middlewareFn:t._middlewareFn,clientName:t._clientName,commandName:t._commandName,inputFilterSensitiveLog:t._inputFilterSensitiveLog,outputFilterSensitiveLog:t._outputFilterSensitiveLog,smithyContext:t._smithyContext,additionalContext:t._additionalContext})}}}}var Gs=(t)=>{let n=t.httpHandler;return{setHttpHandler(r){n=r},httpHandler(){return n},updateHttpClientConfig(r,e){n.updateHttpClientConfig(r,e)},httpHandlerConfigs(){return n.httpHandlerConfigs()}}},Hs=(t)=>{return{httpHandler:t.httpHandler()}};var Nr=N(z(),1);var Lr=function(t){return Object.keys(t).reduce((n,r)=>{const e=t[r];return{...n,[r]:Array.isArray(e)?[...e]:e}},{})};class it{constructor(t){this.method=t.method||"GET",this.hostname=t.hostname||"localhost",this.port=t.port,this.query=t.query||{},this.headers=t.headers||{},this.body=t.body,this.protocol=t.protocol?t.protocol.slice(-1)!==":"?`${t.protocol}:`:t.protocol:"https:",this.path=t.path?t.path.charAt(0)!=="/"?`/${t.path}`:t.path:"/",this.username=t.username,this.password=t.password,this.fragment=t.fragment}static clone(t){const n=new it({...t,headers:{...t.headers}});if(n.query)n.query=Lr(n.query);return n}static isInstance(t){if(!t)return!1;const n=t;return"method"in n&&"protocol"in n&&"hostname"in n&&"path"in n&&typeof n.query==="object"&&typeof n.headers==="object"}clone(){return it.clone(this)}}class Z{constructor(t){this.statusCode=t.statusCode,this.reason=t.reason,this.headers=t.headers||{},this.body=t.body}static isInstance(t){if(!t)return!1;const n=t;return typeof n.statusCode==="number"&&typeof n.headers==="object"}}var H=N(ft(),1);function ht(t){const n=[];for(let r of Object.keys(t).sort()){const e=t[r];if(r=H.escapeUri(r),Array.isArray(e))for(let s=0,o=e.length;s<o;s++)n.push(`${r}=${H.escapeUri(e[s])}`);else{let s=r;if(e||typeof e==="string")s+=`=${H.escapeUri(e)}`;n.push(s)}}return n.join("&")}import{Agent as Qt,request as Zr} from"http";import{Agent as Xt,request as Gr} from"https";var zt=["ECONNRESET","EPIPE","ETIMEDOUT"];var ut=(t)=>{const n={};for(let r of Object.keys(t)){const e=t[r];n[r]=Array.isArray(e)?e.join(","):e}return n};var Zt=(t,n,r=0)=>{if(!r)return-1;const e=(s)=>{const o=setTimeout(()=>{t.destroy(),n(Object.assign(new Error(`Socket timed out without establishing a connection within ${r} ms`),{name:"TimeoutError"}))},r-s),c=(i)=>{if(i?.connecting)i.on("connect",()=>{clearTimeout(o)});else clearTimeout(o)};if(t.socket)c(t.socket);else t.on("socket",c)};if(r<2000)return e(0),0;return setTimeout(e.bind(null,1000),1000)};var Gt=(t,{keepAlive:n,keepAliveMsecs:r},e=3000)=>{if(n!==!0)return-1;const s=()=>{if(t.socket)t.socket.setKeepAlive(n,r||0);else t.on("socket",(o)=>{o.setKeepAlive(n,r||0)})};if(e===0)return s(),0;return setTimeout(s,e)};var Ht=(t,n,r=0)=>{const e=(s)=>{t.setTimeout(r-s,()=>{t.destroy(),n(Object.assign(new Error(`Connection timed out after ${r} ms`),{name:"TimeoutError"}))})};if(0<r&&r<6000)return e(0),0;return setTimeout(e.bind(null,r===0?0:3000),3000)};import{Readable as Wr} from"stream";async function dt(t,n,r=Kt){const e=n.headers??{},s=e.Expect||e.expect;let o=-1,c=!1;if(s==="100-continue")await Promise.race([new Promise((i)=>{o=Number(setTimeout(i,Math.max(Kt,r)))}),new Promise((i)=>{t.on("continue",()=>{clearTimeout(o),i()}),t.on("error",()=>{c=!0,clearTimeout(o),i()})})]);if(!c)zr(t,n.body)}var zr=function(t,n){if(n instanceof Wr){n.pipe(t);return}if(n){if(Buffer.isBuffer(n)||typeof n==="string"){t.end(n);return}const r=n;if(typeof r==="object"&&r.buffer&&typeof r.byteOffset==="number"&&typeof r.byteLength==="number"){t.end(Buffer.from(r.buffer,r.byteOffset,r.byteLength));return}t.end(Buffer.from(n));return}t.end()},Kt=1000;class gt{static create(t){if(typeof t?.handle==="function")return t;return new gt(t)}static checkSocketUsage(t,n,r=console){const{sockets:e,requests:s,maxSockets:o}=t;if(typeof o!=="number"||o===Infinity)return n;const c=15000;if(Date.now()-c<n)return n;if(e&&s)for(let i in e){const d=e[i]?.length??0,y=s[i]?.length??0;if(d>=o&&y>=2*o)return r?.warn?.(`@smithy/node-http-handler:WARN - socket usage at capacity=${d} and ${y} additional requests are enqueued.
|
|
2
|
+
See https://docs.aws.amazon.com/sdk-for-javascript/v3/developer-guide/node-configuring-maxsockets.html
|
|
3
|
+
or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler config.`),Date.now()}return n}constructor(t){this.socketWarningTimestamp=0,this.metadata={handlerProtocol:"http/1.1"},this.configProvider=new Promise((n,r)=>{if(typeof t==="function")t().then((e)=>{n(this.resolveDefaultConfig(e))}).catch(r);else n(this.resolveDefaultConfig(t))})}resolveDefaultConfig(t){const{requestTimeout:n,connectionTimeout:r,socketTimeout:e,httpAgent:s,httpsAgent:o}=t||{};return{connectionTimeout:r,requestTimeout:n??e,httpAgent:(()=>{if(s instanceof Qt||typeof s?.destroy==="function")return s;return new Qt({keepAlive:!0,maxSockets:50,...s})})(),httpsAgent:(()=>{if(o instanceof Xt||typeof o?.destroy==="function")return o;return new Xt({keepAlive:!0,maxSockets:50,...o})})(),logger:console}}destroy(){this.config?.httpAgent?.destroy(),this.config?.httpsAgent?.destroy()}async handle(t,{abortSignal:n}={}){if(!this.config)this.config=await this.configProvider;return new Promise((r,e)=>{let s=void 0;const o=[],c=async(u)=>{await s,o.forEach(clearTimeout),r(u)},i=async(u)=>{await s,o.forEach(clearTimeout),e(u)};if(!this.config)throw new Error("Node HTTP request handler config is not resolved");if(n?.aborted){const u=new Error("Request aborted");u.name="AbortError",i(u);return}const d=t.protocol==="https:",y=d?this.config.httpsAgent:this.config.httpAgent;o.push(setTimeout(()=>{this.socketWarningTimestamp=gt.checkSocketUsage(y,this.socketWarningTimestamp,this.config.logger)},this.config.socketAcquisitionWarningTimeout??(this.config.requestTimeout??2000)+(this.config.connectionTimeout??1000)));const x=ht(t.query||{});let f=void 0;if(t.username!=null||t.password!=null){const u=t.username??"",E=t.password??"";f=`${u}:${E}`}let g=t.path;if(x)g+=`?${x}`;if(t.fragment)g+=`#${t.fragment}`;let h=t.hostname??"";if(h[0]==="["&&h.endsWith("]"))h=t.hostname.slice(1,-1);else h=t.hostname;const p={headers:t.headers,host:h,method:t.method,path:g,port:t.port,agent:y,auth:f},w=(d?Gr:Zr)(p,(u)=>{const E=new Z({statusCode:u.statusCode||-1,reason:u.statusMessage,headers:ut(u.headers),body:u});c({response:E})});if(w.on("error",(u)=>{if(zt.includes(u.code))i(Object.assign(u,{name:"TimeoutError"}));else i(u)}),n){const u=()=>{w.destroy();const E=new Error("Request aborted");E.name="AbortError",i(E)};if(typeof n.addEventListener==="function"){const E=n;E.addEventListener("abort",u,{once:!0}),w.once("close",()=>E.removeEventListener("abort",u))}else n.onabort=u}o.push(Zt(w,i,this.config.connectionTimeout)),o.push(Ht(w,i,this.config.requestTimeout));const T=p.agent;if(typeof T==="object"&&"keepAlive"in T)o.push(Gt(w,{keepAlive:T.keepAlive,keepAliveMsecs:T.keepAliveMsecs}));s=dt(w,t,this.config.requestTimeout).catch((u)=>{return o.forEach(clearTimeout),e(u)})})}updateHttpClientConfig(t,n){this.config=void 0,this.configProvider=this.configProvider.then((r)=>{return{...r,[t]:n}})}httpHandlerConfigs(){return this.config??{}}}import{Writable as Hr} from"stream";class yt extends Hr{constructor(){super(...arguments);this.bufferedBytes=[]}_write(t,n,r){this.bufferedBytes.push(t),r()}}async function Qr(t){const n=[],r=t.getReader();let e=!1,s=0;while(!e){const{done:i,value:d}=await r.read();if(d)n.push(d),s+=d.length;e=i}const o=new Uint8Array(s);let c=0;for(let i of n)o.set(i,c),c+=i.length;return o}var kt=(t)=>{if(Kr(t))return Qr(t);return new Promise((n,r)=>{const e=new yt;t.pipe(e),t.on("error",(s)=>{e.end(),r(s)}),e.on("error",r),e.on("finish",function(){const s=new Uint8Array(Buffer.concat(this.bufferedBytes));n(s)})})},Kr=(t)=>typeof ReadableStream==="function"&&t instanceof ReadableStream;var ko="***SensitiveInformation***";var Po=(t,n)=>{for(let r of Object.keys(t)){const e=t[r],s=async function(c,i,d){const y=new e(c);if(typeof i==="function")this.send(y,i);else if(typeof d==="function"){if(typeof i!=="object")throw new Error(`Expected http options but got ${typeof i}`);this.send(y,i||{},d)}else return this.send(y,i)},o=(r[0].toLowerCase()+r.slice(1)).replace(/Command$/,"");n.prototype[o]=s}};class Jt extends Error{constructor(t){super(t.message);Object.setPrototypeOf(this,Jt.prototype),this.name=t.name,this.$fault=t.$fault,this.$metadata=t.$metadata}}var Pt=(t,n={})=>{Object.entries(n).filter(([,e])=>e!==void 0).forEach(([e,s])=>{if(t[e]==null||t[e]==="")t[e]=s});const r=t.message||t.Message||"UnknownError";return t.message=r,delete t.Message,t};class Xr{trace(){}debug(){}info(){}warn(){}error(){}}var Ot=(t)=>typeof ArrayBuffer==="function"&&t instanceof ArrayBuffer||Object.prototype.toString.call(t)==="[object ArrayBuffer]";import{Buffer as wt} from"buffer";var R=(t,n=0,r=t.byteLength-n)=>{if(!Ot(t))throw new TypeError(`The "input" argument must be ArrayBuffer. Received type ${typeof t} (${t})`);return wt.from(t,n,r)},K=(t,n)=>{if(typeof t!=="string")throw new TypeError(`The "input" argument must be of type string. Received type ${typeof t} (${t})`);return n?wt.from(t,n):wt.from(t)};var kr=/^[A-Za-z0-9+/]*={0,2}$/,qt=(t)=>{if(t.length*3%4!==0)throw new TypeError("Incorrect padding on base64 string.");if(!kr.exec(t))throw new TypeError("Invalid base64 string.");const n=K(t,"base64");return new Uint8Array(n.buffer,n.byteOffset,n.byteLength)};var B=(t)=>{const n=K(t,"utf8");return new Uint8Array(n.buffer,n.byteOffset,n.byteLength/Uint8Array.BYTES_PER_ELEMENT)};var fi=(t)=>{if(typeof t==="string")return B(t);if(ArrayBuffer.isView(t))return new Uint8Array(t.buffer,t.byteOffset,t.byteLength/Uint8Array.BYTES_PER_ELEMENT);return new Uint8Array(t)};var Q=(t)=>{if(typeof t==="string")return t;if(typeof t!=="object"||typeof t.byteOffset!=="number"||typeof t.byteLength!=="number")throw new Error("@smithy/util-utf8: toUtf8 encoder function only accepts string | Uint8Array.");return R(t.buffer,t.byteOffset,t.byteLength).toString("utf8")};var X=(t)=>{let n;if(typeof t==="string")n=B(t);else n=t;if(typeof n!=="object"||typeof n.byteOffset!=="number"||typeof n.byteLength!=="number")throw new Error("@smithy/util-base64: toBase64 encoder function only accepts string | Uint8Array.");return R(n.buffer,n.byteOffset,n.byteLength).toString("base64")};function vt(t,n="utf-8"){if(n==="base64")return X(t);return Q(t)}function _t(t,n){if(n==="base64")return F.mutate(qt(t));return F.mutate(B(t))}class F extends Uint8Array{static fromString(t,n="utf-8"){switch(typeof t){case"string":return _t(t,n);default:throw new Error(`Unsupported conversion from ${typeof t} to Uint8ArrayBlobAdapter.`)}}static mutate(t){return Object.setPrototypeOf(t,F.prototype),t}transformToString(t="utf-8"){return vt(this,t)}}import{Readable as Jr} from"stream";var Ni=(t,n)=>{const{base64Encoder:r,bodyLengthChecker:e,checksumAlgorithmFn:s,checksumLocationName:o,streamHasher:c}=n,i=r!==void 0&&s!==void 0&&o!==void 0&&c!==void 0,d=i?c(s,t):void 0,y=new Jr({read:()=>{}});return t.on("data",(x)=>{const f=e(x)||0;y.push(`${f.toString(16)}\r\n`),y.push(x),y.push("\r\n")}),t.on("end",async()=>{if(y.push("0\r\n"),i){const x=r(await d);y.push(`${o}:${x}\r\n`),y.push("\r\n")}y.push(null)}),y};import{Readable as bt} from"stream";import{TextDecoder as ds} from"util";var _n=N(Hn(),1);var tr=N(On(),1);var M=(t)=>typeof ReadableStream==="function"&&(t?.constructor?.name===ReadableStream.name||t instanceof ReadableStream);var qn="The stream has already been transformed.",nr=(t)=>{if(!vn(t)&&!M(t)){const s=t?.__proto__?.constructor?.name||t;throw new Error(`Unexpected stream implementation, expect Blob or ReadableStream, got ${s}`)}let n=!1;const r=async()=>{if(n)throw new Error(qn);return n=!0,await _n.streamCollector(t)},e=(s)=>{if(typeof s.stream!=="function")throw new Error("Cannot transform payload Blob to web stream. Please make sure the Blob.stream() is polyfilled.\nIf you are using React Native, this API is not yet supported, see: https://react-native.canny.io/feature-requests/p/fetch-streaming-body");return s.stream()};return Object.assign(t,{transformToByteArray:r,transformToString:async(s)=>{const o=await r();if(s==="base64")return X(o);else if(s==="hex")return tr.toHex(o);else if(s===void 0||s==="utf8"||s==="utf-8")return Q(o);else if(typeof TextDecoder==="function")return new TextDecoder(s).decode(o);else throw new Error("TextDecoder is not available, please make sure polyfill is provided.")},transformToWebStream:()=>{if(n)throw new Error(qn);if(n=!0,vn(t))return e(t);else if(M(t))return t;else throw new Error(`Cannot transform payload to web stream, got ${t}`)}})},vn=(t)=>typeof Blob==="function"&&t instanceof Blob;var rr="The stream has already been transformed.",qi=(t)=>{if(!(t instanceof bt))try{return nr(t)}catch(e){const s=t?.__proto__?.constructor?.name||t;throw new Error(`Unexpected stream implementation, expect Stream.Readable instance, got ${s}`)}let n=!1;const r=async()=>{if(n)throw new Error(rr);return n=!0,await kt(t)};return Object.assign(t,{transformToByteArray:r,transformToString:async(e)=>{const s=await r();if(e===void 0||Buffer.isEncoding(e))return R(s.buffer,s.byteOffset,s.byteLength).toString(e);else return new ds(e).decode(s)},transformToWebStream:()=>{if(n)throw new Error(rr);if(t.readableFlowing!==null)throw new Error("The stream has been consumed by other callbacks.");if(typeof bt.toWeb!=="function")throw new Error("Readable.toWeb() is not supported. Please make sure you are using Node.js >= 17.0.0, or polyfill is available.");return n=!0,bt.toWeb(t)}})};import{PassThrough as sr} from"stream";async function er(t){if(typeof t.stream==="function")t=t.stream();return t.tee()}async function ec(t){if(M(t))return er(t);const n=new sr,r=new sr;return t.pipe(n),t.pipe(r),[n,r]}import{Writable as gs} from"stream";async function or(t,n){let r=0;const e=[],s=t.getReader();let o=!1;while(!o){const{done:d,value:y}=await s.read();if(y)e.push(y),r+=y?.byteLength??0;if(r>=n)break;o=d}s.releaseLock();const c=new Uint8Array(Math.min(n,r));let i=0;for(let d of e){if(d.byteLength>c.byteLength-i){c.set(d.subarray(0,c.byteLength-i),i);break}else c.set(d,i);i+=d.length}return c}var hc=(t,n)=>{if(M(t))return or(t,n);return new Promise((r,e)=>{const s=new ir;s.limit=n,t.pipe(s),t.on("error",(o)=>{s.end(),e(o)}),s.on("error",e),s.on("finish",function(){const o=new Uint8Array(Buffer.concat(this.buffers));r(o)})})};class ir extends gs{constructor(){super(...arguments);this.buffers=[],this.limit=Infinity,this.bytesBuffered=0}_write(t,n,r){if(this.buffers.push(t),this.bytesBuffered+=t.byteLength??0,this.bytesBuffered>=this.limit){const e=this.bytesBuffered-this.limit,s=this.buffers[this.buffers.length-1];this.buffers[this.buffers.length-1]=s.subarray(0,s.byteLength-e),this.emit("finish")}r()}}var lc=async(t=new Uint8Array,n)=>{if(t instanceof Uint8Array)return F.mutate(t);if(!t)return F.mutate(new Uint8Array);const r=n.streamCollector(t);return F.mutate(await r)};var bc=(t)=>{switch(t){case"true":return!0;case"false":return!1;default:throw new Error(`Unable to parse boolean value "${t}"`)}};var ys=(t)=>{if(t===null||t===void 0)return;if(typeof t==="string"){const n=parseFloat(t);if(!Number.isNaN(n)){if(String(n)!==String(t))wr.warn(yr(`Expected number but observed string: ${t}`));return n}}if(typeof t==="number")return t;throw new TypeError(`Expected number, got ${typeof t}: ${t}`)},ws=Math.ceil(340282346638528860000000000000000000000),cr=(t)=>{const n=ys(t);if(n!==void 0&&!Number.isNaN(n)&&n!==Infinity&&n!==(-Infinity)){if(Math.abs(n)>ws)throw new TypeError(`Expected 32-bit float, got ${t}`)}return n},Ct=(t)=>{if(t===null||t===void 0)return;if(Number.isInteger(t)&&!Number.isNaN(t))return t;throw new TypeError(`Expected integer, got ${typeof t}: ${t}`)};var fr=(t)=>$t(t,32),hr=(t)=>$t(t,16),ur=(t)=>$t(t,8),$t=(t,n)=>{const r=Ct(t);if(r!==void 0&&Ts(r,n)!==r)throw new TypeError(`Expected ${n}-bit integer, got ${t}`);return r},Ts=(t,n)=>{switch(n){case 32:return Int32Array.of(t)[0];case 16:return Int16Array.of(t)[0];case 8:return Int8Array.of(t)[0]}},Cc=(t,n)=>{if(t===null||t===void 0){if(n)throw new TypeError(`Expected a non-null value for ${n}`);throw new TypeError("Expected a non-null value")}return t},$c=(t)=>{if(t===null||t===void 0)return;if(typeof t==="object"&&!Array.isArray(t))return t;const n=Array.isArray(t)?"array":typeof t;throw new TypeError(`Expected object, got ${n}: ${t}`)},Sc=(t)=>{if(t===null||t===void 0)return;if(typeof t==="string")return t;if(["boolean","number","bigint"].includes(typeof t))return wr.warn(yr(`Expected string, got ${typeof t}: ${t}`)),String(t);throw new TypeError(`Expected string, got ${typeof t}: ${t}`)};var dr=(t)=>{if(typeof t=="string")return cr(V(t));return cr(t)},ps=/(-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?)|(-?Infinity)|(NaN)/g,V=(t)=>{const n=t.match(ps);if(n===null||n[0].length!==t.length)throw new TypeError("Expected real number, got implicit NaN");return parseFloat(t)};var Ic=(t)=>{if(typeof t==="string")return Ct(V(t));return Ct(t)};var Fc=(t)=>{if(typeof t==="string")return fr(V(t));return fr(t)},m=(t)=>{if(typeof t==="string")return hr(V(t));return hr(t)},gr=(t)=>{if(typeof t==="string")return ur(V(t));return ur(t)},yr=(t)=>{return String(new TypeError(t).stack||t).split("\n").slice(0,5).filter((n)=>!n.includes("stackTraceWarning")).join("\n")},wr={warn:console.warn};function Lc(t){const n=t.getUTCFullYear(),r=t.getUTCMonth(),e=t.getUTCDay(),s=t.getUTCDate(),o=t.getUTCHours(),c=t.getUTCMinutes(),i=t.getUTCSeconds(),d=s<10?`0${s}`:`${s}`,y=o<10?`0${o}`:`${o}`,x=c<10?`0${c}`:`${c}`,f=i<10?`0${i}`:`${i}`;return`${Es[e]}, ${d} ${It[r]} ${n} ${y}:${x}:${f} GMT`}var Es=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],It=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],xs=new RegExp(/^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?[zZ]$/),Dc=(t)=>{if(t===null||t===void 0)return;if(typeof t!=="string")throw new TypeError("RFC-3339 date-times must be expressed as strings");const n=xs.exec(t);if(!n)throw new TypeError("Invalid RFC-3339 date-time value");const[r,e,s,o,c,i,d,y]=n,x=m(j(e)),f=I(s,"month",1,12),g=I(o,"day",1,31);return Y(x,f,g,{hours:c,minutes:i,seconds:d,fractionalMilliseconds:y})},ls=new RegExp(/^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?(([-+]\d{2}\:\d{2})|[zZ])$/),Mc=(t)=>{if(t===null||t===void 0)return;if(typeof t!=="string")throw new TypeError("RFC-3339 date-times must be expressed as strings");const n=ls.exec(t);if(!n)throw new TypeError("Invalid RFC-3339 date-time value");const[r,e,s,o,c,i,d,y,x]=n,f=m(j(e)),g=I(s,"month",1,12),h=I(o,"day",1,31),p=Y(f,g,h,{hours:c,minutes:i,seconds:d,fractionalMilliseconds:y});if(x.toUpperCase()!="Z")p.setTime(p.getTime()-Ls(x));return p},as=new RegExp(/^(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\d{2}) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\d{4}) (\d{1,2}):(\d{2}):(\d{2})(?:\.(\d+))? GMT$/),bs=new RegExp(/^(?:Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday), (\d{2})-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\d{2}) (\d{1,2}):(\d{2}):(\d{2})(?:\.(\d+))? GMT$/),Cs=new RegExp(/^(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( [1-9]|\d{2}) (\d{1,2}):(\d{2}):(\d{2})(?:\.(\d+))? (\d{4})$/),Rc=(t)=>{if(t===null||t===void 0)return;if(typeof t!=="string")throw new TypeError("RFC-7231 date-times must be expressed as strings");let n=as.exec(t);if(n){const[r,e,s,o,c,i,d,y]=n;return Y(m(j(o)),St(s),I(e,"day",1,31),{hours:c,minutes:i,seconds:d,fractionalMilliseconds:y})}if(n=bs.exec(t),n){const[r,e,s,o,c,i,d,y]=n;return Is(Y($s(o),St(s),I(e,"day",1,31),{hours:c,minutes:i,seconds:d,fractionalMilliseconds:y}))}if(n=Cs.exec(t),n){const[r,e,s,o,c,i,d,y]=n;return Y(m(j(y)),St(e),I(s.trimLeft(),"day",1,31),{hours:o,minutes:c,seconds:i,fractionalMilliseconds:d})}throw new TypeError("Invalid RFC-7231 date-time value")};var Y=(t,n,r,e)=>{const s=n-1;return Us(t,s,r),new Date(Date.UTC(t,s,r,I(e.hours,"hour",0,23),I(e.minutes,"minute",0,59),I(e.seconds,"seconds",0,60),Ns(e.fractionalMilliseconds)))},$s=(t)=>{const n=(new Date()).getUTCFullYear(),r=Math.floor(n/100)*100+m(j(t));if(r<n)return r+100;return r},Ss=1576800000000,Is=(t)=>{if(t.getTime()-(new Date()).getTime()>Ss)return new Date(Date.UTC(t.getUTCFullYear()-100,t.getUTCMonth(),t.getUTCDate(),t.getUTCHours(),t.getUTCMinutes(),t.getUTCSeconds(),t.getUTCMilliseconds()));return t},St=(t)=>{const n=It.indexOf(t);if(n<0)throw new TypeError(`Invalid month: ${t}`);return n+1},Fs=[31,28,31,30,31,30,31,31,30,31,30,31],Us=(t,n,r)=>{let e=Fs[n];if(n===1&&As(t))e=29;if(r>e)throw new TypeError(`Invalid day for ${It[n]} in ${t}: ${r}`)},As=(t)=>{return t%4===0&&(t%100!==0||t%400===0)},I=(t,n,r,e)=>{const s=gr(j(t));if(s<r||s>e)throw new TypeError(`${n} must be between ${r} and ${e}, inclusive`);return s},Ns=(t)=>{if(t===null||t===void 0)return 0;return dr("0."+t)*1000},Ls=(t)=>{const n=t[0];let r=1;if(n=="+")r=1;else if(n=="-")r=-1;else throw new TypeError(`Offset direction, ${n}, must be "+" or "-"`);const e=Number(t.substring(1,3)),s=Number(t.substring(4,6));return r*(e*60+s)*60*1000},j=(t)=>{let n=0;while(n<t.length-1&&t.charAt(n)==="0")n++;if(n===0)return t;return t.slice(n)};var Ds=({output:t,parsedBody:n,exceptionCtor:r,errorCode:e})=>{const s=Ms(t),o=s.httpStatusCode?s.httpStatusCode+"":void 0,c=new r({name:n?.code||n?.Code||e||o||"UnknownError",$fault:"client",$metadata:s});throw Pt(c,n)},jc=(t)=>{return({output:n,parsedBody:r,errorCode:e})=>{Ds({output:n,parsedBody:r,exceptionCtor:t,errorCode:e})}},Ms=(t)=>({httpStatusCode:t.statusCode,requestId:t.headers["x-amzn-requestid"]??t.headers["x-amzn-request-id"]??t.headers["x-amz-request-id"],extendedRequestId:t.headers["x-amz-id-2"],cfId:t.headers["x-amz-cf-id"]});var Yc=(t)=>{switch(t){case"standard":return{retryMode:"standard",connectionTimeout:3100};case"in-region":return{retryMode:"standard",connectionTimeout:1100};case"cross-region":return{retryMode:"standard",connectionTimeout:3100};case"mobile":return{retryMode:"standard",connectionTimeout:30000};default:return{}}};var Tr=!1,zc=(t)=>{if(t&&!Tr&&parseInt(t.substring(1,t.indexOf(".")))<16)Tr=!0};var Ft=N(z(),1);var pr=(t)=>{const n=[];for(let r in Ft.AlgorithmId){const e=Ft.AlgorithmId[r];if(t[e]===void 0)continue;n.push({algorithmId:()=>e,checksumConstructor:()=>t[e]})}return{_checksumAlgorithms:n,addChecksumAlgorithm(r){this._checksumAlgorithms.push(r)},checksumAlgorithms(){return this._checksumAlgorithms}}},Er=(t)=>{const n={};return t.checksumAlgorithms().forEach((r)=>{n[r.algorithmId()]=r.checksumConstructor()}),n};var xr=(t)=>{let n=t.retryStrategy;return{setRetryStrategy(r){n=r},retryStrategy(){return n}}},lr=(t)=>{const n={};return n.retryStrategy=t.retryStrategy(),n};var Xc=(t)=>{return{...pr(t),...xr(t)}};var kc=(t)=>{return{...Er(t),...lr(t)}};function Rs(t){return encodeURIComponent(t).replace(/[!'()*]/g,function(n){return"%"+n.charCodeAt(0).toString(16).toUpperCase()})}var Ut=function(){const t=Object.getPrototypeOf(this).constructor,r=new(Function.bind.apply(String,[null,...arguments]));return Object.setPrototypeOf(r,t.prototype),r};Ut.prototype=Object.create(String.prototype,{constructor:{value:Ut,enumerable:!1,writable:!0,configurable:!0}});Object.setPrototypeOf(Ut,String);function Bs(t,n,r){let e,s,o;if(typeof n==="undefined"&&typeof r==="undefined")e={},o=t;else if(e=t,typeof n==="function")return s=n,o=r,ms(e,s,o);else o=n;for(let c of Object.keys(o)){if(!Array.isArray(o[c])){e[c]=o[c];continue}ar(e,null,o,c)}return e}var nf=(t,n)=>{const r={};for(let e in n)ar(r,t,n,e);return r},ms=(t,n,r)=>{return Bs(t,Object.entries(r).reduce((e,[s,o])=>{if(Array.isArray(o))e[s]=o;else if(typeof o==="function")e[s]=[n,o()];else e[s]=[n,o];return e},{}))},ar=(t,n,r,e)=>{if(n!==null){let c=r[e];if(typeof c==="function")c=[,c];const[i=js,d=Vs,y=e]=c;if(typeof i==="function"&&i(n[y])||typeof i!=="function"&&!!i)t[e]=d(n[y]);return}let[s,o]=r[e];if(typeof o==="function"){let c;const i=s===void 0&&(c=o())!=null,d=typeof s==="function"&&!!s(void 0)||typeof s!=="function"&&!!s;if(i)t[e]=c;else if(d)t[e]=o()}else{const c=s===void 0&&o!=null,i=typeof s==="function"&&!!s(o)||typeof s!=="function"&&!!s;if(c||i)t[e]=o}},js=(t)=>t!=null,Vs=(t)=>t;var of=(t)=>t.toISOString().replace(".000Z","Z");var br=(t)=>{if(t==null)return{};if(Array.isArray(t))return t.filter((n)=>n!=null).map(br);if(typeof t==="object"){const n={};for(let r of Object.keys(t)){if(t[r]==null)continue;n[r]=br(t[r])}return n}return t};export{Gs as ya,Hs as za,it as Aa,Z as Ba,Ot as Ca,R as Da,K as Ea,B as Fa,fi as Ga,Q as Ha,Xr as Ia,ot as Ja,Ar as Ka,qt as La,X as Ma,Ni as Na,ft as Oa,gt as Pa,kt as Qa,un as Ra,wn as Sa,En as Ta,q as Ua,An as Va,Bn as Wa,Hn as Xa,On as Ya,qi as Za,ec as _a,hc as $a,lc as ab,mt as bb,ko as cb,Po as db,bc as eb,Ct as fb,fr as gb,Cc as hb,$c as ib,Sc as jb,Ic as kb,Fc as lb,Lc as mb,Dc as nb,Mc as ob,Rc as pb,Jt as qb,Pt as rb,jc as sb,Yc as tb,zc as ub,Xc as vb,kc as wb,Rs as xb,Bs as yb,nf as zb,of as Ab,br as Bb};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import{C as D} from"./chunk-24a86f8f5ddc0cbd.js";var S=D((y,w)=>{var{defineProperty:G,getOwnPropertyDescriptor:v,getOwnPropertyNames:O}=Object,x=Object.prototype.hasOwnProperty,Q=(b,j)=>G(b,"name",{value:j,configurable:!0}),U=(b,j)=>{for(var z in j)G(b,z,{get:j[z],enumerable:!0})},K=(b,j,z,V)=>{if(j&&typeof j==="object"||typeof j==="function"){for(let B of O(j))if(!x.call(b,B)&&B!==z)G(b,B,{get:()=>j[B],enumerable:!(V=v(j,B))||V.enumerable})}return b},q=(b)=>K(G({},"__esModule",{value:!0}),b),W={};U(W,{AlgorithmId:()=>J,EndpointURLScheme:()=>X,FieldPosition:()=>M,HttpApiKeyAuthLocation:()=>$,HttpAuthLocation:()=>Z,IniSectionType:()=>N,RequestHandlerProtocol:()=>Y,SMITHY_CONTEXT_KEY:()=>R,getDefaultClientConfiguration:()=>T,resolveDefaultRuntimeConfig:()=>k});w.exports=q(W);var Z=((b)=>{return b.HEADER="header",b.QUERY="query",b})(Z||{}),$=((b)=>{return b.HEADER="header",b.QUERY="query",b})($||{}),X=((b)=>{return b.HTTP="http",b.HTTPS="https",b})(X||{}),J=((b)=>{return b.MD5="md5",b.CRC32="crc32",b.CRC32C="crc32c",b.SHA1="sha1",b.SHA256="sha256",b})(J||{}),E=Q((b)=>{const j=[];if(b.sha256!==void 0)j.push({algorithmId:()=>"sha256",checksumConstructor:()=>b.sha256});if(b.md5!=null)j.push({algorithmId:()=>"md5",checksumConstructor:()=>b.md5});return{_checksumAlgorithms:j,addChecksumAlgorithm(z){this._checksumAlgorithms.push(z)},checksumAlgorithms(){return this._checksumAlgorithms}}},"getChecksumConfiguration"),F=Q((b)=>{const j={};return b.checksumAlgorithms().forEach((z)=>{j[z.algorithmId()]=z.checksumConstructor()}),j},"resolveChecksumRuntimeConfig"),T=Q((b)=>{return{...E(b)}},"getDefaultClientConfiguration"),k=Q((b)=>{return{...F(b)}},"resolveDefaultRuntimeConfig"),M=((b)=>{return b[b.HEADER=0]="HEADER",b[b.TRAILER=1]="TRAILER",b})(M||{}),R="__smithy_context",N=((b)=>{return b.PROFILE="profile",b.SSO_SESSION="sso-session",b.SERVICES="services",b})(N||{}),Y=((b)=>{return b.HTTP_0_9="http/0.9",b.HTTP_1_0="http/1.0",b.TDS_8_0="tds/8.0",b})(Y||{})});
|
|
2
|
-
export{S as
|
|
2
|
+
export{S as Cb};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import"./chunk-5f01223b8fbe1ed8.js";import{B as m} from"./chunk-24a86f8f5ddc0cbd.js";import"./chunk-28694e5e949df0ff.js";import{$ as Re,O as ee,P as re,Q as or,R as dr,S as cr,T as yr,X as Y,Y as H,Z as ar,_ as Ie,aa as Pe,ba as Te,ca as mr,da as Ke,ea as Me,fa as Be,ga as Le,ha as wr,ia as kr,ka as S,la as vr,ma as Qe,na as Xe,oa as Er,pa as Ye,qa as Sr,ra as D,sa as Ze,ta as He,ua as Ne,va as _e,wa as lr,xa as hr} from"./chunk-519593bc19f7cb9f.js";import{Bb as $,Fa as je,Ha as Fe,Ia as De,Ka as tr,La as Ue,Ma as qe,Pa as Ve,Qa as We,bb as E,cb as t,db as Mr,fb as _,gb as T,hb as b,ib as j,jb as h,qb as $r,rb as a,sb as Fr,tb as fe,ub as Ae,vb as sr,wb as ir,ya as er,yb as d,za as rr,zb as o} from"./chunk-69b5648fcd0f0a18.js";import"./chunk-6b18189b2aabf6b7.js";import{Db as _r,Eb as I} from"./chunk-5806220e55ac164c.js";import"./chunk-b4cbb4706a35f5d5.js";import{Gb as ge} from"./chunk-cc7158438e52b9ab.js";import"./chunk-fa61561237819f16.js";var R=m(H(),1);var se=m(D(),1);var Yr=function(e){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"sso-oauth",region:e.region},propertiesExtractor:(s,r)=>({signingProperties:{config:s,context:r}})}},Z=function(e){return{schemeId:"smithy.api#noAuth"}},ie=async(e,s,r)=>{return{operation:ee(s).operation,region:await re(e.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()}},le=(e)=>{const s=[];switch(e.operation){case"CreateToken":{s.push(Z(e));break}case"RegisterClient":{s.push(Z(e));break}case"StartDeviceAuthorization":{s.push(Z(e));break}default:s.push(Yr(e))}return s},he=(e)=>{return{...se.resolveAwsSdkSigV4Config(e)}};var ne=(e)=>{return{...e,useDualstackEndpoint:e.useDualstackEndpoint??!1,useFipsEndpoint:e.useFipsEndpoint??!1,defaultSigningName:"sso-oauth"}},v={UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}};var oe={name:"@aws-sdk/client-sso-oidc",description:"AWS SDK for JavaScript Sso Oidc Client for Node.js, Browser and React Native",version:"3.654.0",scripts:{build:"concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'","build:cjs":"node ../../scripts/compilation/inline client-sso-oidc","build:es":"tsc -p tsconfig.es.json","build:include:deps":"lerna run --scope $npm_package_name --include-dependencies build","build:types":"tsc -p tsconfig.types.json","build:types:downlevel":"downlevel-dts dist-types dist-types/ts3.4",clean:"rimraf ./dist-* && rimraf *.tsbuildinfo","extract:docs":"api-extractor run --local","generate:client":"node ../../scripts/generate-clients/single-service --solo sso-oidc"},main:"./dist-cjs/index.js",types:"./dist-types/index.d.ts",module:"./dist-es/index.js",sideEffects:!1,dependencies:{"@aws-crypto/sha256-browser":"5.2.0","@aws-crypto/sha256-js":"5.2.0","@aws-sdk/core":"3.654.0","@aws-sdk/credential-provider-node":"3.654.0","@aws-sdk/middleware-host-header":"3.654.0","@aws-sdk/middleware-logger":"3.654.0","@aws-sdk/middleware-recursion-detection":"3.654.0","@aws-sdk/middleware-user-agent":"3.654.0","@aws-sdk/region-config-resolver":"3.654.0","@aws-sdk/types":"3.654.0","@aws-sdk/util-endpoints":"3.654.0","@aws-sdk/util-user-agent-browser":"3.654.0","@aws-sdk/util-user-agent-node":"3.654.0","@smithy/config-resolver":"^3.0.8","@smithy/core":"^2.4.3","@smithy/fetch-http-handler":"^3.2.7","@smithy/hash-node":"^3.0.6","@smithy/invalid-dependency":"^3.0.6","@smithy/middleware-content-length":"^3.0.8","@smithy/middleware-endpoint":"^3.1.3","@smithy/middleware-retry":"^3.0.18","@smithy/middleware-serde":"^3.0.6","@smithy/middleware-stack":"^3.0.6","@smithy/node-config-provider":"^3.1.7","@smithy/node-http-handler":"^3.2.2","@smithy/protocol-http":"^4.1.3","@smithy/smithy-client":"^3.3.2","@smithy/types":"^3.4.2","@smithy/url-parser":"^3.0.6","@smithy/util-base64":"^3.0.0","@smithy/util-body-length-browser":"^3.0.0","@smithy/util-body-length-node":"^3.0.0","@smithy/util-defaults-mode-browser":"^3.0.18","@smithy/util-defaults-mode-node":"^3.0.18","@smithy/util-endpoints":"^2.1.2","@smithy/util-middleware":"^3.0.6","@smithy/util-retry":"^3.0.6","@smithy/util-utf8":"^3.0.0",tslib:"^2.6.2"},devDependencies:{"@tsconfig/node16":"16.1.3","@types/node":"^16.18.96",concurrently:"7.0.0","downlevel-dts":"0.10.1",rimraf:"3.0.2",typescript:"~4.9.5"},engines:{node:">=16.0.0"},typesVersions:{"<4.0":{"dist-types/*":["dist-types/ts3.4/*"]}},files:["dist-*/**"],author:{name:"AWS SDK for JavaScript Team",url:"https://aws.amazon.com/javascript/"},license:"Apache-2.0",peerDependencies:{"@aws-sdk/client-sts":"^3.654.0"},browser:{"./dist-es/runtimeConfig":"./dist-es/runtimeConfig.browser"},"react-native":{"./dist-es/runtimeConfig":"./dist-es/runtimeConfig.native"},homepage:"https://github.com/aws/aws-sdk-js-v3/tree/main/clients/client-sso-oidc",repository:{type:"git",url:"https://github.com/aws/aws-sdk-js-v3.git",directory:"clients/client-sso-oidc"}};var pe=m(D(),1);var xe=m(D(),1),ze=m(H(),1);var Ge=m(_r(),1);var de={["required"]:!1,type:"String"},ce={["required"]:!0,default:!1,type:"Boolean"},ye={["ref"]:"Endpoint"},ve={["fn"]:"booleanEquals",["argv"]:[{["ref"]:"UseFIPS"},!0]},Ee={["fn"]:"booleanEquals",["argv"]:[{["ref"]:"UseDualStack"},!0]},w={},te={["fn"]:"getAttr",["argv"]:[{["ref"]:"PartitionResult"},"supportsFIPS"]},Se={["ref"]:"PartitionResult"},ae={["fn"]:"booleanEquals",["argv"]:[!0,{["fn"]:"getAttr",["argv"]:[Se,"supportsDualStack"]}]},me=[ve],we=[Ee],ke=[{["ref"]:"Region"}],Hr={version:"1.0",parameters:{Region:de,UseDualStack:ce,UseFIPS:ce,Endpoint:de},rules:[{conditions:[{["fn"]:"isSet",["argv"]:[ye]}],rules:[{conditions:me,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:"error"},{conditions:we,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:"error"},{endpoint:{url:ye,properties:w,headers:w},type:"endpoint"}],type:"tree"},{conditions:[{["fn"]:"isSet",["argv"]:ke}],rules:[{conditions:[{["fn"]:"aws.partition",["argv"]:ke,assign:"PartitionResult"}],rules:[{conditions:[ve,Ee],rules:[{conditions:[{["fn"]:"booleanEquals",["argv"]:[!0,te]},ae],rules:[{endpoint:{url:"https://oidc-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:w,headers:w},type:"endpoint"}],type:"tree"},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:"error"}],type:"tree"},{conditions:me,rules:[{conditions:[{["fn"]:"booleanEquals",["argv"]:[te,!0]}],rules:[{conditions:[{["fn"]:"stringEquals",["argv"]:[{["fn"]:"getAttr",["argv"]:[Se,"name"]},"aws-us-gov"]}],endpoint:{url:"https://oidc.{Region}.amazonaws.com",properties:w,headers:w},type:"endpoint"},{endpoint:{url:"https://oidc-fips.{Region}.{PartitionResult#dnsSuffix}",properties:w,headers:w},type:"endpoint"}],type:"tree"},{error:"FIPS is enabled but this partition does not support FIPS",type:"error"}],type:"tree"},{conditions:we,rules:[{conditions:[ae],rules:[{endpoint:{url:"https://oidc.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:w,headers:w},type:"endpoint"}],type:"tree"},{error:"DualStack is enabled but this partition does not support DualStack",type:"error"}],type:"tree"},{endpoint:{url:"https://oidc.{Region}.{PartitionResult#dnsSuffix}",properties:w,headers:w},type:"endpoint"}],type:"tree"}],type:"tree"},{error:"Invalid Configuration: Missing Region",type:"error"}]},$e=Hr;var Nr=new Ie({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS"]}),be=(e,s={})=>{return Nr.get(e,()=>Pe($e,{endpointParams:e,logger:s.logger}))};Re.aws=Te;var Je=(e)=>{return{apiVersion:"2019-06-10",base64Decoder:e?.base64Decoder??Ue,base64Encoder:e?.base64Encoder??qe,disableHostPrefix:e?.disableHostPrefix??!1,endpointProvider:e?.endpointProvider??be,extensions:e?.extensions??[],httpAuthSchemeProvider:e?.httpAuthSchemeProvider??le,httpAuthSchemes:e?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:(s)=>s.getIdentityProvider("aws.auth#sigv4"),signer:new xe.AwsSdkSigV4Signer},{schemeId:"smithy.api#noAuth",identityProvider:(s)=>s.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new ze.NoAuthSigner}],logger:e?.logger??new De,serviceId:e?.serviceId??"SSO OIDC",urlParser:e?.urlParser??Ge.parseUrl,utf8Decoder:e?.utf8Decoder??je,utf8Encoder:e?.utf8Encoder??Fe}};var Ce=(e)=>{Ae(process.version);const s=_e(e),r=()=>s().then(fe),i=Je(e);return pe.emitWarningIfUnsupportedVersion(process.version),{...i,...e,runtime:"node",defaultsMode:s,bodyLengthChecker:e?.bodyLengthChecker??Ne,credentialDefaultProvider:e?.credentialDefaultProvider??ge,defaultUserAgentProvider:e?.defaultUserAgentProvider??Ze({serviceId:i.serviceId,clientVersion:oe.version}),maxAttempts:e?.maxAttempts??I(Xe),region:e?.region??I(Be,Le),requestHandler:Ve.create(e?.requestHandler??r),retryMode:e?.retryMode??I({...Ye,default:async()=>(await r()).retryMode||Qe}),sha256:e?.sha256??He.bind(null,"sha256"),streamCollector:e?.streamCollector??We,useDualstackEndpoint:e?.useDualstackEndpoint??I(Ke),useFipsEndpoint:e?.useFipsEndpoint??I(Me)}};var Oe=(e)=>{const s=e.httpAuthSchemes;let{httpAuthSchemeProvider:r,credentials:i}=e;return{setHttpAuthScheme(l){const n=s.findIndex((P)=>P.schemeId===l.schemeId);if(n===-1)s.push(l);else s.splice(n,1,l)},httpAuthSchemes(){return s},setHttpAuthSchemeProvider(l){r=l},httpAuthSchemeProvider(){return r},setCredentials(l){i=l},credentials(){return i}}},ue=(e)=>{return{httpAuthSchemes:e.httpAuthSchemes(),httpAuthSchemeProvider:e.httpAuthSchemeProvider(),credentials:e.credentials()}};var U=(e)=>e,nr=(e,s)=>{const r={...U(lr(e)),...U(sr(e)),...U(er(e)),...U(Oe(e))};return s.forEach((i)=>i.configure(r)),{...e,...hr(r),...ir(r),...rr(r),...ue(r)}};class N extends tr{constructor(...[e]){const s=Ce(e||{}),r=ne(s),i=ar(r),l=Er(i),n=wr(l),P=or(n),Lr=vr(P),Qr=he(Lr),u=nr(Qr,e?.extensions||[]);super(u);this.config=u,this.middlewareStack.use(mr(this.config)),this.middlewareStack.use(Sr(this.config)),this.middlewareStack.use(kr(this.config)),this.middlewareStack.use(dr(this.config)),this.middlewareStack.use(cr(this.config)),this.middlewareStack.use(yr(this.config)),this.middlewareStack.use(R.getHttpAuthSchemeEndpointRuleSetPlugin(this.config,{httpAuthSchemeParametersProvider:ie,identityProviderConfigProvider:async(Xr)=>new R.DefaultIdentityProviderConfig({"aws.auth#sigv4":Xr.credentials})})),this.middlewareStack.use(R.getHttpSigningPlugin(this.config))}destroy(){super.destroy()}}var Wr=m(Y(),1);class c extends $r{constructor(e){super(e);Object.setPrototypeOf(this,c.prototype)}}class q extends c{constructor(e){super({name:"AccessDeniedException",$fault:"client",...e});this.name="AccessDeniedException",this.$fault="client",Object.setPrototypeOf(this,q.prototype),this.error=e.error,this.error_description=e.error_description}}class x extends c{constructor(e){super({name:"AuthorizationPendingException",$fault:"client",...e});this.name="AuthorizationPendingException",this.$fault="client",Object.setPrototypeOf(this,x.prototype),this.error=e.error,this.error_description=e.error_description}}class z extends c{constructor(e){super({name:"ExpiredTokenException",$fault:"client",...e});this.name="ExpiredTokenException",this.$fault="client",Object.setPrototypeOf(this,z.prototype),this.error=e.error,this.error_description=e.error_description}}class G extends c{constructor(e){super({name:"InternalServerException",$fault:"server",...e});this.name="InternalServerException",this.$fault="server",Object.setPrototypeOf(this,G.prototype),this.error=e.error,this.error_description=e.error_description}}class J extends c{constructor(e){super({name:"InvalidClientException",$fault:"client",...e});this.name="InvalidClientException",this.$fault="client",Object.setPrototypeOf(this,J.prototype),this.error=e.error,this.error_description=e.error_description}}class V extends c{constructor(e){super({name:"InvalidGrantException",$fault:"client",...e});this.name="InvalidGrantException",this.$fault="client",Object.setPrototypeOf(this,V.prototype),this.error=e.error,this.error_description=e.error_description}}class W extends c{constructor(e){super({name:"InvalidRequestException",$fault:"client",...e});this.name="InvalidRequestException",this.$fault="client",Object.setPrototypeOf(this,W.prototype),this.error=e.error,this.error_description=e.error_description}}class f extends c{constructor(e){super({name:"InvalidScopeException",$fault:"client",...e});this.name="InvalidScopeException",this.$fault="client",Object.setPrototypeOf(this,f.prototype),this.error=e.error,this.error_description=e.error_description}}class A extends c{constructor(e){super({name:"SlowDownException",$fault:"client",...e});this.name="SlowDownException",this.$fault="client",Object.setPrototypeOf(this,A.prototype),this.error=e.error,this.error_description=e.error_description}}class K extends c{constructor(e){super({name:"UnauthorizedClientException",$fault:"client",...e});this.name="UnauthorizedClientException",this.$fault="client",Object.setPrototypeOf(this,K.prototype),this.error=e.error,this.error_description=e.error_description}}class M extends c{constructor(e){super({name:"UnsupportedGrantTypeException",$fault:"client",...e});this.name="UnsupportedGrantTypeException",this.$fault="client",Object.setPrototypeOf(this,M.prototype),this.error=e.error,this.error_description=e.error_description}}class B extends c{constructor(e){super({name:"InvalidRequestRegionException",$fault:"client",...e});this.name="InvalidRequestRegionException",this.$fault="client",Object.setPrototypeOf(this,B.prototype),this.error=e.error,this.error_description=e.error_description,this.endpoint=e.endpoint,this.region=e.region}}class L extends c{constructor(e){super({name:"InvalidClientMetadataException",$fault:"client",...e});this.name="InvalidClientMetadataException",this.$fault="client",Object.setPrototypeOf(this,L.prototype),this.error=e.error,this.error_description=e.error_description}}class Q extends c{constructor(e){super({name:"InvalidRedirectUriException",$fault:"client",...e});this.name="InvalidRedirectUriException",this.$fault="client",Object.setPrototypeOf(this,Q.prototype),this.error=e.error,this.error_description=e.error_description}}var Ir=(e)=>({...e,...e.clientSecret&&{clientSecret:t},...e.refreshToken&&{refreshToken:t},...e.codeVerifier&&{codeVerifier:t}}),Rr=(e)=>({...e,...e.accessToken&&{accessToken:t},...e.refreshToken&&{refreshToken:t},...e.idToken&&{idToken:t}}),Pr=(e)=>({...e,...e.refreshToken&&{refreshToken:t},...e.assertion&&{assertion:t},...e.subjectToken&&{subjectToken:t},...e.codeVerifier&&{codeVerifier:t}}),Tr=(e)=>({...e,...e.accessToken&&{accessToken:t},...e.refreshToken&&{refreshToken:t},...e.idToken&&{idToken:t}}),br=(e)=>({...e,...e.clientSecret&&{clientSecret:t}}),jr=(e)=>({...e,...e.clientSecret&&{clientSecret:t}});var k=m(D(),1),F=m(H(),1);var Dr=async(e,s)=>{const r=F.requestBuilder(e,s),i={"content-type":"application/json"};r.bp("/token");let l;return l=JSON.stringify(o(e,{clientId:[],clientSecret:[],code:[],codeVerifier:[],deviceCode:[],grantType:[],redirectUri:[],refreshToken:[],scope:(n)=>$(n)})),r.m("POST").h(i).b(l),r.build()},Ur=async(e,s)=>{const r=F.requestBuilder(e,s),i={"content-type":"application/json"};r.bp("/token");const l=d({[ys]:[,"t"]});let n;return n=JSON.stringify(o(e,{assertion:[],clientId:[],code:[],codeVerifier:[],grantType:[],redirectUri:[],refreshToken:[],requestedTokenType:[],scope:(P)=>$(P),subjectToken:[],subjectTokenType:[]})),r.m("POST").h(i).q(l).b(n),r.build()},qr=async(e,s)=>{const r=F.requestBuilder(e,s),i={"content-type":"application/json"};r.bp("/client/register");let l;return l=JSON.stringify(o(e,{clientName:[],clientType:[],entitledApplicationArn:[],grantTypes:(n)=>$(n),issuerUrl:[],redirectUris:(n)=>$(n),scopes:(n)=>$(n)})),r.m("POST").h(i).b(l),r.build()},xr=async(e,s)=>{const r=F.requestBuilder(e,s),i={"content-type":"application/json"};r.bp("/device_authorization");let l;return l=JSON.stringify(o(e,{clientId:[],clientSecret:[],startUrl:[]})),r.m("POST").h(i).b(l),r.build()},zr=async(e,s)=>{if(e.statusCode!==200&&e.statusCode>=300)return X(e,s);const r=d({$metadata:y(e)}),i=b(j(await k.parseJsonBody(e.body,s)),"body"),l=o(i,{accessToken:h,expiresIn:T,idToken:h,refreshToken:h,tokenType:h});return Object.assign(r,l),r},Gr=async(e,s)=>{if(e.statusCode!==200&&e.statusCode>=300)return X(e,s);const r=d({$metadata:y(e)}),i=b(j(await k.parseJsonBody(e.body,s)),"body"),l=o(i,{accessToken:h,expiresIn:T,idToken:h,issuedTokenType:h,refreshToken:h,scope:$,tokenType:h});return Object.assign(r,l),r},Jr=async(e,s)=>{if(e.statusCode!==200&&e.statusCode>=300)return X(e,s);const r=d({$metadata:y(e)}),i=b(j(await k.parseJsonBody(e.body,s)),"body"),l=o(i,{authorizationEndpoint:h,clientId:h,clientIdIssuedAt:_,clientSecret:h,clientSecretExpiresAt:_,tokenEndpoint:h});return Object.assign(r,l),r},Vr=async(e,s)=>{if(e.statusCode!==200&&e.statusCode>=300)return X(e,s);const r=d({$metadata:y(e)}),i=b(j(await k.parseJsonBody(e.body,s)),"body"),l=o(i,{deviceCode:h,expiresIn:T,interval:T,userCode:h,verificationUri:h,verificationUriComplete:h});return Object.assign(r,l),r},X=async(e,s)=>{const r={...e,body:await k.parseJsonErrorBody(e.body,s)},i=k.loadRestJsonErrorCode(e,r.body);switch(i){case"AccessDeniedException":case"com.amazonaws.ssooidc#AccessDeniedException":throw await Cr(r,s);case"AuthorizationPendingException":case"com.amazonaws.ssooidc#AuthorizationPendingException":throw await gr(r,s);case"ExpiredTokenException":case"com.amazonaws.ssooidc#ExpiredTokenException":throw await Or(r,s);case"InternalServerException":case"com.amazonaws.ssooidc#InternalServerException":throw await ur(r,s);case"InvalidClientException":case"com.amazonaws.ssooidc#InvalidClientException":throw await es(r,s);case"InvalidGrantException":case"com.amazonaws.ssooidc#InvalidGrantException":throw await ss(r,s);case"InvalidRequestException":case"com.amazonaws.ssooidc#InvalidRequestException":throw await ls(r,s);case"InvalidScopeException":case"com.amazonaws.ssooidc#InvalidScopeException":throw await ns(r,s);case"SlowDownException":case"com.amazonaws.ssooidc#SlowDownException":throw await os(r,s);case"UnauthorizedClientException":case"com.amazonaws.ssooidc#UnauthorizedClientException":throw await ds(r,s);case"UnsupportedGrantTypeException":case"com.amazonaws.ssooidc#UnsupportedGrantTypeException":throw await cs(r,s);case"InvalidRequestRegionException":case"com.amazonaws.ssooidc#InvalidRequestRegionException":throw await hs(r,s);case"InvalidClientMetadataException":case"com.amazonaws.ssooidc#InvalidClientMetadataException":throw await rs(r,s);case"InvalidRedirectUriException":case"com.amazonaws.ssooidc#InvalidRedirectUriException":throw await is(r,s);default:const l=r.body;return pr({output:e,parsedBody:l,errorCode:i})}},pr=Fr(c),Cr=async(e,s)=>{const r=d({}),i=e.body,l=o(i,{error:h,error_description:h});Object.assign(r,l);const n=new q({$metadata:y(e),...r});return a(n,e.body)},gr=async(e,s)=>{const r=d({}),i=e.body,l=o(i,{error:h,error_description:h});Object.assign(r,l);const n=new x({$metadata:y(e),...r});return a(n,e.body)},Or=async(e,s)=>{const r=d({}),i=e.body,l=o(i,{error:h,error_description:h});Object.assign(r,l);const n=new z({$metadata:y(e),...r});return a(n,e.body)},ur=async(e,s)=>{const r=d({}),i=e.body,l=o(i,{error:h,error_description:h});Object.assign(r,l);const n=new G({$metadata:y(e),...r});return a(n,e.body)},es=async(e,s)=>{const r=d({}),i=e.body,l=o(i,{error:h,error_description:h});Object.assign(r,l);const n=new J({$metadata:y(e),...r});return a(n,e.body)},rs=async(e,s)=>{const r=d({}),i=e.body,l=o(i,{error:h,error_description:h});Object.assign(r,l);const n=new L({$metadata:y(e),...r});return a(n,e.body)},ss=async(e,s)=>{const r=d({}),i=e.body,l=o(i,{error:h,error_description:h});Object.assign(r,l);const n=new V({$metadata:y(e),...r});return a(n,e.body)},is=async(e,s)=>{const r=d({}),i=e.body,l=o(i,{error:h,error_description:h});Object.assign(r,l);const n=new Q({$metadata:y(e),...r});return a(n,e.body)},ls=async(e,s)=>{const r=d({}),i=e.body,l=o(i,{error:h,error_description:h});Object.assign(r,l);const n=new W({$metadata:y(e),...r});return a(n,e.body)},hs=async(e,s)=>{const r=d({}),i=e.body,l=o(i,{endpoint:h,error:h,error_description:h,region:h});Object.assign(r,l);const n=new B({$metadata:y(e),...r});return a(n,e.body)},ns=async(e,s)=>{const r=d({}),i=e.body,l=o(i,{error:h,error_description:h});Object.assign(r,l);const n=new f({$metadata:y(e),...r});return a(n,e.body)},os=async(e,s)=>{const r=d({}),i=e.body,l=o(i,{error:h,error_description:h});Object.assign(r,l);const n=new A({$metadata:y(e),...r});return a(n,e.body)},ds=async(e,s)=>{const r=d({}),i=e.body,l=o(i,{error:h,error_description:h});Object.assign(r,l);const n=new K({$metadata:y(e),...r});return a(n,e.body)},cs=async(e,s)=>{const r=d({}),i=e.body,l=o(i,{error:h,error_description:h});Object.assign(r,l);const n=new M({$metadata:y(e),...r});return a(n,e.body)},y=(e)=>({httpStatusCode:e.statusCode,requestId:e.headers["x-amzn-requestid"]??e.headers["x-amzn-request-id"]??e.headers["x-amz-request-id"],extendedRequestId:e.headers["x-amz-id-2"],cfId:e.headers["x-amz-cf-id"]});var ys="aws_iam";class p extends E.classBuilder().ep(v).m(function(e,s,r,i){return[Wr.getSerdePlugin(r,this.serialize,this.deserialize),S(r,e.getEndpointParameterInstructions())]}).s("AWSSSOOIDCService","CreateToken",{}).n("SSOOIDCClient","CreateTokenCommand").f(Ir,Rr).ser(Dr).de(zr).build(){}var fr=m(Y(),1);class C extends E.classBuilder().ep(v).m(function(e,s,r,i){return[fr.getSerdePlugin(r,this.serialize,this.deserialize),S(r,e.getEndpointParameterInstructions())]}).s("AWSSSOOIDCService","CreateTokenWithIAM",{}).n("SSOOIDCClient","CreateTokenWithIAMCommand").f(Pr,Tr).ser(Ur).de(Gr).build(){}var Ar=m(Y(),1);class g extends E.classBuilder().ep(v).m(function(e,s,r,i){return[Ar.getSerdePlugin(r,this.serialize,this.deserialize),S(r,e.getEndpointParameterInstructions())]}).s("AWSSSOOIDCService","RegisterClient",{}).n("SSOOIDCClient","RegisterClientCommand").f(void 0,br).ser(qr).de(Jr).build(){}var Kr=m(Y(),1);class O extends E.classBuilder().ep(v).m(function(e,s,r,i){return[Kr.getSerdePlugin(r,this.serialize,this.deserialize),S(r,e.getEndpointParameterInstructions())]}).s("AWSSSOOIDCService","StartDeviceAuthorization",{}).n("SSOOIDCClient","StartDeviceAuthorizationCommand").f(jr,void 0).ser(xr).de(Vr).build(){}var ts={CreateTokenCommand:p,CreateTokenWithIAMCommand:C,RegisterClientCommand:g,StartDeviceAuthorizationCommand:O};class Br extends N{}Mr(ts,Br);export{tr as __Client,M as UnsupportedGrantTypeException,K as UnauthorizedClientException,jr as StartDeviceAuthorizationRequestFilterSensitiveLog,O as StartDeviceAuthorizationCommand,A as SlowDownException,c as SSOOIDCServiceException,N as SSOOIDCClient,Br as SSOOIDC,br as RegisterClientResponseFilterSensitiveLog,g as RegisterClientCommand,f as InvalidScopeException,B as InvalidRequestRegionException,W as InvalidRequestException,Q as InvalidRedirectUriException,V as InvalidGrantException,L as InvalidClientMetadataException,J as InvalidClientException,G as InternalServerException,z as ExpiredTokenException,Tr as CreateTokenWithIAMResponseFilterSensitiveLog,Pr as CreateTokenWithIAMRequestFilterSensitiveLog,C as CreateTokenWithIAMCommand,Rr as CreateTokenResponseFilterSensitiveLog,Ir as CreateTokenRequestFilterSensitiveLog,p as CreateTokenCommand,x as AuthorizationPendingException,q as AccessDeniedException,E as $Command};
|