gemi 0.4.87 → 0.4.88

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.
Files changed (35) hide show
  1. package/dist/app/App.d.ts.map +1 -1
  2. package/dist/app/index.js +1 -1
  3. package/dist/bin/index.js +8 -8
  4. package/dist/chunk-0441dc8e5b215b75.js +2 -0
  5. package/dist/chunk-08bf87c7e29141d3.js +9 -0
  6. package/dist/chunk-23b1faa7791ca31d.js +2 -0
  7. package/dist/chunk-36d595d02662f2fa.js +2 -0
  8. package/dist/chunk-3d4e6fdf131bae97.js +2 -0
  9. package/dist/chunk-6e20f463543eec5f.js +2 -0
  10. package/dist/chunk-75aa5e5e2f565737.js +18 -0
  11. package/dist/{chunk-6b18189b2aabf6b7.js → chunk-79f9130d266efc8b.js} +1 -1
  12. package/dist/{chunk-d0b9873261cd82b7.js → chunk-82b3f93a5aac2b2e.js} +1 -1
  13. package/dist/{chunk-5f01223b8fbe1ed8.js → chunk-8f575468b4e4754d.js} +1 -1
  14. package/dist/chunk-92b7f08b6396b0fc.js +2 -0
  15. package/dist/chunk-a4330a47c3806ff1.js +3 -0
  16. package/dist/{chunk-8f2c54f2cd43402a.js → chunk-b35e7bc78a8a613f.js} +1 -1
  17. package/dist/{chunk-b4cbb4706a35f5d5.js → chunk-bd0308763754bf7b.js} +1 -1
  18. package/dist/chunk-d5d491184ec17042.js +2 -0
  19. package/dist/chunk-dc3eae4932658400.js +2 -0
  20. package/dist/chunk-e5db92db378843ab.js +2 -0
  21. package/dist/kernel/index.js +1 -1
  22. package/dist/services/index.js +10 -1
  23. package/package.json +1 -7
  24. package/dist/chunk-519593bc19f7cb9f.js +0 -18
  25. package/dist/chunk-5806220e55ac164c.js +0 -1
  26. package/dist/chunk-6434d2c5758f4125.js +0 -2
  27. package/dist/chunk-69b5648fcd0f0a18.js +0 -3
  28. package/dist/chunk-8e55cff6329b67a9.js +0 -2
  29. package/dist/chunk-9383d727762ecba1.js +0 -2
  30. package/dist/chunk-b38c0c4618d0dd89.js +0 -2
  31. package/dist/chunk-b3eca9338a13f510.js +0 -2
  32. package/dist/chunk-c160211e5cc4c447.js +0 -2
  33. package/dist/chunk-c4b0f134a6b82c51.js +0 -2
  34. package/dist/chunk-cc7158438e52b9ab.js +0 -9
  35. package/dist/chunk-fa61561237819f16.js +0 -1
@@ -1,3 +0,0 @@
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 +0,0 @@
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};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{B as J} from"./chunk-24a86f8f5ddc0cbd.js";import"./chunk-6b18189b2aabf6b7.js";import{Db as cc,Eb as z} from"./chunk-5806220e55ac164c.js";import{Fb as _} from"./chunk-b4cbb4706a35f5d5.js";import"./chunk-fa61561237819f16.js";var v=J(_(),1);import{parse as o} from"url";var K=J(_(),1);import{Buffer as a} from"buffer";import{request as n} from"http";function f(c){return new Promise((I,x)=>{const T=n({method:"GET",...c,hostname:c.hostname?.replace(/^\[(.+)\]$/,"$1")});T.on("error",(N)=>{x(Object.assign(new K.ProviderError("Unable to connect to instance metadata service"),N)),T.destroy()}),T.on("timeout",()=>{x(new K.ProviderError("TimeoutError from instance metadata service")),T.destroy()}),T.on("response",(N)=>{const{statusCode:O=400}=N;if(O<200||300<=O)x(Object.assign(new K.ProviderError("Error response received from instance metadata service"),{statusCode:O})),T.destroy();const u=[];N.on("data",(y)=>{u.push(y)}),N.on("end",()=>{I(a.concat(u)),T.destroy()})}),T.end()})}var D=(c)=>Boolean(c)&&typeof c==="object"&&typeof c.AccessKeyId==="string"&&typeof c.SecretAccessKey==="string"&&typeof c.Token==="string"&&typeof c.Expiration==="string",G=(c)=>({accessKeyId:c.AccessKeyId,secretAccessKey:c.SecretAccessKey,sessionToken:c.Token,expiration:new Date(c.Expiration),...c.AccountId&&{accountId:c.AccountId}});var uc=1000,Ec=0,Q=({maxRetries:c=0,timeout:I=1000})=>({maxRetries:c,timeout:I});var m=(c,I)=>{let x=c();for(let T=0;T<I;T++)x=x.catch(c);return x};var Z="AWS_CONTAINER_CREDENTIALS_FULL_URI",L="AWS_CONTAINER_CREDENTIALS_RELATIVE_URI",B="AWS_CONTAINER_AUTHORIZATION_TOKEN",Kc=(c={})=>{const{timeout:I,maxRetries:x}=Q(c);return()=>m(async()=>{const T=await d({logger:c.logger}),N=JSON.parse(await s(I,T));if(!D(N))throw new v.CredentialsProviderError("Invalid response received from instance metadata service.",{logger:c.logger});return G(N)},x)},s=async(c,I)=>{if(process.env[B])I.headers={...I.headers,Authorization:process.env[B]};return(await f({...I,timeout:c})).toString()},g="169.254.170.2",l={localhost:!0,"127.0.0.1":!0},r={"http:":!0,"https:":!0},d=async({logger:c})=>{if(process.env[L])return{hostname:g,path:process.env[L]};if(process.env[Z]){const I=o(process.env[Z]);if(!I.hostname||!(I.hostname in l))throw new v.CredentialsProviderError(`${I.hostname} is not a valid container metadata service hostname`,{tryNextLink:!1,logger:c});if(!I.protocol||!(I.protocol in r))throw new v.CredentialsProviderError(`${I.protocol} is not a valid container metadata service protocol`,{tryNextLink:!1,logger:c});return{...I,port:I.port?parseInt(I.port,10):void 0}}throw new v.CredentialsProviderError("The container metadata credential provider cannot be used unless"+` the ${L} or ${Z} environment`+" variable is set",{tryNextLink:!1,logger:c})};var q=J(_(),1);var U=J(_(),1);class X extends U.CredentialsProviderError{constructor(c,I=!0){super(c,I);this.tryNextLink=I,this.name="InstanceMetadataV1FallbackError",Object.setPrototypeOf(this,X.prototype)}}var P=J(cc(),1);var j;(function(c){c.IPv4="http://169.254.169.254",c.IPv6="http://[fd00:ec2::254]"})(j||(j={}));var t={environmentVariableSelector:(c)=>c["AWS_EC2_METADATA_SERVICE_ENDPOINT"],configFileSelector:(c)=>c["ec2_metadata_service_endpoint"],default:void 0};var S;(function(c){c.IPv4="IPv4",c.IPv6="IPv6"})(S||(S={}));var e="AWS_EC2_METADATA_SERVICE_ENDPOINT_MODE",i="ec2_metadata_service_endpoint_mode",F={environmentVariableSelector:(c)=>c[e],configFileSelector:(c)=>c[i],default:S.IPv4};var W=async()=>P.parseUrl(await Ic()||await Tc()),Ic=async()=>z(t)(),Tc=async()=>{const c=await z(F)();switch(c){case S.IPv4:return j.IPv4;case S.IPv6:return j.IPv6;default:throw new Error(`Unsupported endpoint mode: ${c}.`+` Select from ${Object.values(S)}`)}};var b=(c,I)=>{const x=300+Math.floor(Math.random()*300),T=new Date(Date.now()+x*1000);I.warn("Attempting credential expiration extension due to a credential service availability issue. A refresh of these "+`credentials will be attempted after ${new Date(T)}.\nFor more information, please visit: `+"https://docs.aws.amazon.com/sdkref/latest/guide/feature-static-credentials.html");const N=c.originalExpiration??c.expiration;return{...c,...N?{originalExpiration:N}:{},expiration:T}};var V=(c,I={})=>{const x=I?.logger||console;let T;return async()=>{let N;try{if(N=await c(),N.expiration&&N.expiration.getTime()<Date.now())N=b(N,x)}catch(O){if(T)x.warn("Credential renew failed: ",O),N=b(T,x);else throw O}return T=N,N}};var k="/latest/meta-data/iam/security-credentials/",Nc="/latest/api/token",H="AWS_EC2_METADATA_V1_DISABLED",R="ec2_metadata_v1_disabled",M="x-aws-ec2-metadata-token",oc=(c={})=>V(xc(c),{logger:c.logger}),xc=(c={})=>{let I=!1;const{logger:x,profile:T}=c,{timeout:N,maxRetries:O}=Q(c),u=async(y,E)=>{if(I||E.headers?.[M]==null){let w=!1,h=!1;const C=await z({environmentVariableSelector:(Y)=>{const $=Y[H];if(h=!!$&&$!=="false",$===void 0)throw new q.CredentialsProviderError(`${H} not set in env, checking config file next.`,{logger:c.logger});return h},configFileSelector:(Y)=>{const $=Y[R];return w=!!$&&$!=="false",w},default:!1},{profile:T})();if(c.ec2MetadataV1Disabled||C){const Y=[];if(c.ec2MetadataV1Disabled)Y.push("credential provider initialization (runtime option ec2MetadataV1Disabled)");if(w)Y.push(`config file profile (${R})`);if(h)Y.push(`process environment variable (${H})`);throw new X(`AWS EC2 Metadata v1 fallback has been blocked by AWS SDK configuration in the following: [${Y.join(", ")}].`)}}const p=(await m(async()=>{let w;try{w=await yc(E)}catch(h){if(h.statusCode===401)I=!1;throw h}return w},y)).trim();return m(async()=>{let w;try{w=await wc(p,E,c)}catch(h){if(h.statusCode===401)I=!1;throw h}return w},y)};return async()=>{const y=await W();if(I)return x?.debug("AWS SDK Instance Metadata","using v1 fallback (no token fetch)"),u(O,{...y,timeout:N});else{let E;try{E=(await Oc({...y,timeout:N})).toString()}catch(A){if(A?.statusCode===400)throw Object.assign(A,{message:"EC2 Metadata token request returned error"});else if(A.message==="TimeoutError"||[403,404,405].includes(A.statusCode))I=!0;return x?.debug("AWS SDK Instance Metadata","using v1 fallback (initial)"),u(O,{...y,timeout:N})}return u(O,{...y,headers:{[M]:E},timeout:N})}}},Oc=async(c)=>f({...c,path:Nc,method:"PUT",headers:{"x-aws-ec2-metadata-token-ttl-seconds":"21600"}}),yc=async(c)=>(await f({...c,path:k})).toString(),wc=async(c,I,x)=>{const T=JSON.parse((await f({...I,path:k+c})).toString());if(!D(T))throw new q.CredentialsProviderError("Invalid response received from instance metadata service.",{logger:x.logger});return G(T)};export{Q as providerConfigFromInit,f as httpRequest,W as getInstanceMetadataEndpoint,oc as fromInstanceMetadata,Kc as fromContainerMetadata,j as Endpoint,L as ENV_CMDS_RELATIVE_URI,Z as ENV_CMDS_FULL_URI,B as ENV_CMDS_AUTH_TOKEN,uc as DEFAULT_TIMEOUT,Ec as DEFAULT_MAX_RETRIES};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{B as o} from"./chunk-24a86f8f5ddc0cbd.js";import"./chunk-28694e5e949df0ff.js";import{$ as N,O as U,P as _,Q as Le,R as Me,S as We,T as Ae,X as Us,Y as B,Z as Qe,_ as V,aa as f,ba as g,ca as Xe,da as he,ea as ue,fa as we,ga as be,ha as Ye,ia as Ze,ka as as,la as je,ma as xe,na as ve,oa as Te,pa as ke,qa as He,ra as x,sa as Re,ta as Ee,ua as qe,va as Se,wa as Je,xa as Ie} from"./chunk-519593bc19f7cb9f.js";import{Bb as ge,Fa as se,Ha as te,Ia as re,Ka as Ke,La as ae,Ma as ne,Pa as le,Qa as pe,bb as rs,cb as k,hb as z,ib as Ne,jb as h,qb as Oe,rb as u,sb as fe,tb as ye,ub as me,vb as $e,wb as Pe,ya as Ue,yb as i,za as _e,zb as y} from"./chunk-69b5648fcd0f0a18.js";import"./chunk-6b18189b2aabf6b7.js";import{Db as ms,Eb as l} from"./chunk-5806220e55ac164c.js";import"./chunk-b4cbb4706a35f5d5.js";import"./chunk-fa61561237819f16.js";var p=o(B(),1);var $=o(x(),1);var is=function(e){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"awsssoportal",region:e.region},propertiesExtractor:(s,t)=>({signingProperties:{config:s,context:t}})}},b=function(e){return{schemeId:"smithy.api#noAuth"}},P=async(e,s,t)=>{return{operation:U(s).operation,region:await _(e.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()}},J=(e)=>{const s=[];switch(e.operation){case"GetRoleCredentials":{s.push(b(e));break}case"ListAccountRoles":{s.push(b(e));break}case"ListAccounts":{s.push(b(e));break}case"Logout":{s.push(b(e));break}default:s.push(is(e))}return s},I=(e)=>{return{...$.resolveAwsSdkSigV4Config(e)}};var C=(e)=>{return{...e,useDualstackEndpoint:e.useDualstackEndpoint??!1,useFipsEndpoint:e.useFipsEndpoint??!1,defaultSigningName:"awsssoportal"}},L={UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}};var M={name:"@aws-sdk/client-sso",description:"AWS SDK for JavaScript Sso 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","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"},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/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",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",repository:{type:"git",url:"https://github.com/aws/aws-sdk-js-v3.git",directory:"clients/client-sso"}};var ze=o(x(),1);var de=o(x(),1),oe=o(B(),1);var ce=o(ms(),1);var W={["required"]:!1,type:"String"},A={["required"]:!0,default:!1,type:"Boolean"},K={["ref"]:"Endpoint"},T={["fn"]:"booleanEquals",["argv"]:[{["ref"]:"UseFIPS"},!0]},H={["fn"]:"booleanEquals",["argv"]:[{["ref"]:"UseDualStack"},!0]},d={},Q={["fn"]:"getAttr",["argv"]:[{["ref"]:"PartitionResult"},"supportsFIPS"]},O={["ref"]:"PartitionResult"},X={["fn"]:"booleanEquals",["argv"]:[!0,{["fn"]:"getAttr",["argv"]:[O,"supportsDualStack"]}]},Y=[T],Z=[H],j=[{["ref"]:"Region"}],ps={version:"1.0",parameters:{Region:W,UseDualStack:A,UseFIPS:A,Endpoint:W},rules:[{conditions:[{["fn"]:"isSet",["argv"]:[K]}],rules:[{conditions:Y,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:"error"},{conditions:Z,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:"error"},{endpoint:{url:K,properties:d,headers:d},type:"endpoint"}],type:"tree"},{conditions:[{["fn"]:"isSet",["argv"]:j}],rules:[{conditions:[{["fn"]:"aws.partition",["argv"]:j,assign:"PartitionResult"}],rules:[{conditions:[T,H],rules:[{conditions:[{["fn"]:"booleanEquals",["argv"]:[!0,Q]},X],rules:[{endpoint:{url:"https://portal.sso-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:d,headers:d},type:"endpoint"}],type:"tree"},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:"error"}],type:"tree"},{conditions:Y,rules:[{conditions:[{["fn"]:"booleanEquals",["argv"]:[Q,!0]}],rules:[{conditions:[{["fn"]:"stringEquals",["argv"]:[{["fn"]:"getAttr",["argv"]:[O,"name"]},"aws-us-gov"]}],endpoint:{url:"https://portal.sso.{Region}.amazonaws.com",properties:d,headers:d},type:"endpoint"},{endpoint:{url:"https://portal.sso-fips.{Region}.{PartitionResult#dnsSuffix}",properties:d,headers:d},type:"endpoint"}],type:"tree"},{error:"FIPS is enabled but this partition does not support FIPS",type:"error"}],type:"tree"},{conditions:Z,rules:[{conditions:[X],rules:[{endpoint:{url:"https://portal.sso.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:d,headers:d},type:"endpoint"}],type:"tree"},{error:"DualStack is enabled but this partition does not support DualStack",type:"error"}],type:"tree"},{endpoint:{url:"https://portal.sso.{Region}.{PartitionResult#dnsSuffix}",properties:d,headers:d},type:"endpoint"}],type:"tree"}],type:"tree"},{error:"Invalid Configuration: Missing Region",type:"error"}]},G=ps;var ys=new V({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS"]}),ee=(e,s={})=>{return ys.get(e,()=>f(G,{endpointParams:e,logger:s.logger}))};N.aws=g;var ie=(e)=>{return{apiVersion:"2019-06-10",base64Decoder:e?.base64Decoder??ae,base64Encoder:e?.base64Encoder??ne,disableHostPrefix:e?.disableHostPrefix??!1,endpointProvider:e?.endpointProvider??ee,extensions:e?.extensions??[],httpAuthSchemeProvider:e?.httpAuthSchemeProvider??J,httpAuthSchemes:e?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:(s)=>s.getIdentityProvider("aws.auth#sigv4"),signer:new de.AwsSdkSigV4Signer},{schemeId:"smithy.api#noAuth",identityProvider:(s)=>s.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new oe.NoAuthSigner}],logger:e?.logger??new re,serviceId:e?.serviceId??"SSO",urlParser:e?.urlParser??ce.parseUrl,utf8Decoder:e?.utf8Decoder??se,utf8Encoder:e?.utf8Encoder??te}};var De=(e)=>{me(process.version);const s=Se(e),t=()=>s().then(ye),r=ie(e);return ze.emitWarningIfUnsupportedVersion(process.version),{...r,...e,runtime:"node",defaultsMode:s,bodyLengthChecker:e?.bodyLengthChecker??qe,defaultUserAgentProvider:e?.defaultUserAgentProvider??Re({serviceId:r.serviceId,clientVersion:M.version}),maxAttempts:e?.maxAttempts??l(ve),region:e?.region??l(we,be),requestHandler:le.create(e?.requestHandler??t),retryMode:e?.retryMode??l({...ke,default:async()=>(await t()).retryMode||xe}),sha256:e?.sha256??Ee.bind(null,"sha256"),streamCollector:e?.streamCollector??pe,useDualstackEndpoint:e?.useDualstackEndpoint??l(he),useFipsEndpoint:e?.useFipsEndpoint??l(ue)}};var Be=(e)=>{const s=e.httpAuthSchemes;let{httpAuthSchemeProvider:t,credentials:r}=e;return{setHttpAuthScheme(a){const n=s.findIndex((D)=>D.schemeId===a.schemeId);if(n===-1)s.push(a);else s.splice(n,1,a)},httpAuthSchemes(){return s},setHttpAuthSchemeProvider(a){t=a},httpAuthSchemeProvider(){return t},setCredentials(a){r=a},credentials(){return r}}},Fe=(e)=>{return{httpAuthSchemes:e.httpAuthSchemes(),httpAuthSchemeProvider:e.httpAuthSchemeProvider(),credentials:e.credentials()}};var v=(e)=>e,Ce=(e,s)=>{const t={...v(Je(e)),...v($e(e)),...v(Ue(e)),...v(Be(e))};return s.forEach((r)=>r.configure(t)),{...e,...Ie(t),...Pe(t),..._e(t),...Fe(t)}};class hs extends Ke{constructor(...[e]){const s=De(e||{}),t=C(s),r=Qe(t),a=Te(r),n=Ye(a),D=Le(n),ds=je(D),os=I(ds),F=Ce(os,e?.extensions||[]);super(F);this.config=F,this.middlewareStack.use(Xe(this.config)),this.middlewareStack.use(He(this.config)),this.middlewareStack.use(Ze(this.config)),this.middlewareStack.use(Me(this.config)),this.middlewareStack.use(We(this.config)),this.middlewareStack.use(Ae(this.config)),this.middlewareStack.use(p.getHttpAuthSchemeEndpointRuleSetPlugin(this.config,{httpAuthSchemeParametersProvider:P,identityProviderConfigProvider:async(cs)=>new p.DefaultIdentityProviderConfig({"aws.auth#sigv4":cs.credentials})})),this.middlewareStack.use(p.getHttpSigningPlugin(this.config))}destroy(){super.destroy()}}var ns=o(Us(),1);class c extends Oe{constructor(e){super(e);Object.setPrototypeOf(this,c.prototype)}}class R extends c{constructor(e){super({name:"InvalidRequestException",$fault:"client",...e});this.name="InvalidRequestException",this.$fault="client",Object.setPrototypeOf(this,R.prototype)}}class E extends c{constructor(e){super({name:"ResourceNotFoundException",$fault:"client",...e});this.name="ResourceNotFoundException",this.$fault="client",Object.setPrototypeOf(this,E.prototype)}}class q extends c{constructor(e){super({name:"TooManyRequestsException",$fault:"client",...e});this.name="TooManyRequestsException",this.$fault="client",Object.setPrototypeOf(this,q.prototype)}}class S extends c{constructor(e){super({name:"UnauthorizedException",$fault:"client",...e});this.name="UnauthorizedException",this.$fault="client",Object.setPrototypeOf(this,S.prototype)}}var Ge=(e)=>({...e,...e.accessToken&&{accessToken:k}}),us=(e)=>({...e,...e.secretAccessKey&&{secretAccessKey:k},...e.sessionToken&&{sessionToken:k}}),Ve=(e)=>({...e,...e.roleCredentials&&{roleCredentials:us(e.roleCredentials)}});var m=o(x(),1),es=o(B(),1);var ss=async(e,s)=>{const t=es.requestBuilder(e,s),r=i({},Es,{[Fs]:e[Ss]});t.bp("/federation/credentials");const a=i({[Bs]:[,z(e[Ds],"roleName")],[zs]:[,z(e[qs],"accountId")]});let n;return t.m("GET").h(r).q(a).b(n),t.build()};var ts=async(e,s)=>{if(e.statusCode!==200&&e.statusCode>=300)return ws(e,s);const t=i({$metadata:w(e)}),r=z(Ne(await m.parseJsonBody(e.body,s)),"body"),a=y(r,{roleCredentials:ge});return Object.assign(t,a),t};var ws=async(e,s)=>{const t={...e,body:await m.parseJsonErrorBody(e.body,s)},r=m.loadRestJsonErrorCode(e,t.body);switch(r){case"InvalidRequestException":case"com.amazonaws.sso#InvalidRequestException":throw await xs(t,s);case"ResourceNotFoundException":case"com.amazonaws.sso#ResourceNotFoundException":throw await vs(t,s);case"TooManyRequestsException":case"com.amazonaws.sso#TooManyRequestsException":throw await ks(t,s);case"UnauthorizedException":case"com.amazonaws.sso#UnauthorizedException":throw await Rs(t,s);default:const a=t.body;return bs({output:e,parsedBody:a,errorCode:r})}},bs=fe(c),xs=async(e,s)=>{const t=i({}),r=e.body,a=y(r,{message:h});Object.assign(t,a);const n=new R({$metadata:w(e),...t});return u(n,e.body)},vs=async(e,s)=>{const t=i({}),r=e.body,a=y(r,{message:h});Object.assign(t,a);const n=new E({$metadata:w(e),...t});return u(n,e.body)},ks=async(e,s)=>{const t=i({}),r=e.body,a=y(r,{message:h});Object.assign(t,a);const n=new q({$metadata:w(e),...t});return u(n,e.body)},Rs=async(e,s)=>{const t=i({}),r=e.body,a=y(r,{message:h});Object.assign(t,a);const n=new S({$metadata:w(e),...t});return u(n,e.body)},w=(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 Es=(e)=>e!==void 0&&e!==null&&e!==""&&(!Object.getOwnPropertyNames(e).includes("length")||e.length!=0)&&(!Object.getOwnPropertyNames(e).includes("size")||e.size!=0),qs="accountId",Ss="accessToken",zs="account_id";var Ds="roleName",Bs="role_name",Fs="x-amz-sso_bearer_token";class _s extends rs.classBuilder().ep(L).m(function(e,s,t,r){return[ns.getSerdePlugin(t,this.serialize,this.deserialize),as(t,e.getEndpointParameterInstructions())]}).s("SWBPortalService","GetRoleCredentials",{}).n("SSOClient","GetRoleCredentialsCommand").f(Ge,Ve).ser(ss).de(ts).build(){}export{hs as SSOClient,_s as GetRoleCredentialsCommand};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{B as _} from"./chunk-24a86f8f5ddc0cbd.js";import"./chunk-6b18189b2aabf6b7.js";import{Fb as y} from"./chunk-b4cbb4706a35f5d5.js";import{Ib as K,Ob as S} from"./chunk-fa61561237819f16.js";var o=_(y(),1);import{exec as A} from"child_process";import{promisify as T} from"util";var i=(c,n,s)=>{if(n.Version!==1)throw Error(`Profile ${c} credential_process did not return Version 1.`);if(n.AccessKeyId===void 0||n.SecretAccessKey===void 0)throw Error(`Profile ${c} credential_process returned invalid credentials.`);if(n.Expiration){const t=new Date;if(new Date(n.Expiration)<t)throw Error(`Profile ${c} credential_process returned expired credentials.`)}let e=n.AccountId;if(!e&&s?.[c]?.aws_account_id)e=s[c].aws_account_id;return{accessKeyId:n.AccessKeyId,secretAccessKey:n.SecretAccessKey,...n.SessionToken&&{sessionToken:n.SessionToken},...n.Expiration&&{expiration:new Date(n.Expiration)},...n.CredentialScope&&{credentialScope:n.CredentialScope},...e&&{accountId:e}}};var x=async(c,n,s)=>{const e=n[c];if(n[c]){const t=e.credential_process;if(t!==void 0){const u=T(A);try{const{stdout:r}=await u(t);let w;try{w=JSON.parse(r.trim())}catch{throw Error(`Profile ${c} credential_process returned invalid JSON.`)}return i(c,w,n)}catch(r){throw new o.CredentialsProviderError(r.message,{logger:s})}}else throw new o.CredentialsProviderError(`Profile ${c} did not contain credential_process.`,{logger:s})}else throw new o.CredentialsProviderError(`Profile ${c} could not be found in shared credentials file.`,{logger:s})};var b=(c={})=>async()=>{c.logger?.debug("@aws-sdk/credential-provider-process - fromProcess");const n=await S(c);return x(K(c),n,c.logger)};export{b as fromProcess};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{B} from"./chunk-24a86f8f5ddc0cbd.js";import"./chunk-6b18189b2aabf6b7.js";import{Fb as D} from"./chunk-b4cbb4706a35f5d5.js";import{Ib as K,Ob as E} from"./chunk-fa61561237819f16.js";var Z=B(D(),1);var $=B(D(),1);var C=B(D(),1),A=(y,c,_)=>{const b={EcsContainer:async(x)=>{const{fromHttp:w}=await import("./chunk-d0b9873261cd82b7.js"),{fromContainerMetadata:k}=await import("./chunk-9383d727762ecba1.js");return _?.debug("@aws-sdk/credential-provider-ini - credential_source is EcsContainer"),C.chain(w(x??{}),k(x))},Ec2InstanceMetadata:async(x)=>{_?.debug("@aws-sdk/credential-provider-ini - credential_source is Ec2InstanceMetadata");const{fromInstanceMetadata:w}=await import("./chunk-9383d727762ecba1.js");return w(x)},Environment:async(x)=>{_?.debug("@aws-sdk/credential-provider-ini - credential_source is Environment");const{fromEnv:w}=await import("./chunk-5f01223b8fbe1ed8.js");return w(x)}};if(y in b)return b[y];else throw new C.CredentialsProviderError(`Unsupported credential source in profile ${c}. Got ${y}, `+"expected EcsContainer or Ec2InstanceMetadata or Environment.",{logger:_})};var J=(y,{profile:c="default",logger:_}={})=>{return Boolean(y)&&typeof y==="object"&&typeof y.role_arn==="string"&&["undefined","string"].indexOf(typeof y.role_session_name)>-1&&["undefined","string"].indexOf(typeof y.external_id)>-1&&["undefined","string"].indexOf(typeof y.mfa_serial)>-1&&(H(y,{profile:c,logger:_})||R(y,{profile:c,logger:_}))},H=(y,{profile:c,logger:_})=>{const b=typeof y.source_profile==="string"&&typeof y.credential_source==="undefined";if(b)_?.debug?.(` ${c} isAssumeRoleWithSourceProfile source_profile=${y.source_profile}`);return b},R=(y,{profile:c,logger:_})=>{const b=typeof y.credential_source==="string"&&typeof y.source_profile==="undefined";if(b)_?.debug?.(` ${c} isCredentialSourceProfile credential_source=${y.credential_source}`);return b},L=async(y,c,_,b={})=>{_.logger?.debug("@aws-sdk/credential-provider-ini - resolveAssumeRoleCredentials (STS)");const x=c[y];if(!_.roleAssumer){const{getDefaultRoleAssumer:I}=await import("./chunk-c4b0f134a6b82c51.js");_.roleAssumer=I({..._.clientConfig,credentialProviderLogger:_.logger,parentClientConfig:_?.parentClientConfig},_.clientPlugins)}const{source_profile:w}=x;if(w&&w in b)throw new $.CredentialsProviderError("Detected a cycle attempting to resolve credentials for profile"+` ${K(_)}. Profiles visited: `+Object.keys(b).join(", "),{logger:_.logger});_.logger?.debug(`@aws-sdk/credential-provider-ini - finding credential resolver using ${w?`source_profile=[${w}]`:`profile=[${y}]`}`);const k=w?j(w,c,_,{...b,[w]:!0},G(c[w]??{})):(await A(x.credential_source,y,_.logger)(_))();if(G(x))return k;else{const I={RoleArn:x.role_arn,RoleSessionName:x.role_session_name||`aws-sdk-js-${Date.now()}`,ExternalId:x.external_id,DurationSeconds:parseInt(x.duration_seconds||"3600",10)},{mfa_serial:O}=x;if(O){if(!_.mfaCodeProvider)throw new $.CredentialsProviderError(`Profile ${y} requires multi-factor authentication, but no MFA code callback was provided.`,{logger:_.logger,tryNextLink:!1});I.SerialNumber=O,I.TokenCode=await _.mfaCodeProvider(O)}const F=await k;return _.roleAssumer(F,I)}},G=(y)=>{return!y.role_arn&&!!y.credential_source};var Q=(y)=>Boolean(y)&&typeof y==="object"&&typeof y.credential_process==="string",U=async(y,c)=>import("./chunk-b3eca9338a13f510.js").then(({fromProcess:_})=>_({...y,profile:c})());var V=async(y,c={})=>{const{fromSSO:_}=await import("./chunk-6434d2c5758f4125.js");return _({profile:y,logger:c.logger})()},W=(y)=>y&&(typeof y.sso_start_url==="string"||typeof y.sso_account_id==="string"||typeof y.sso_session==="string"||typeof y.sso_region==="string"||typeof y.sso_role_name==="string");var q=(y)=>Boolean(y)&&typeof y==="object"&&typeof y.aws_access_key_id==="string"&&typeof y.aws_secret_access_key==="string"&&["undefined","string"].indexOf(typeof y.aws_session_token)>-1&&["undefined","string"].indexOf(typeof y.aws_account_id)>-1,z=(y,c)=>{return c?.logger?.debug("@aws-sdk/credential-provider-ini - resolveStaticCredentials"),Promise.resolve({accessKeyId:y.aws_access_key_id,secretAccessKey:y.aws_secret_access_key,sessionToken:y.aws_session_token,...y.aws_credential_scope&&{credentialScope:y.aws_credential_scope},...y.aws_account_id&&{accountId:y.aws_account_id}})};var X=(y)=>Boolean(y)&&typeof y==="object"&&typeof y.web_identity_token_file==="string"&&typeof y.role_arn==="string"&&["undefined","string"].indexOf(typeof y.role_session_name)>-1,Y=async(y,c)=>import("./chunk-8f2c54f2cd43402a.js").then(({fromTokenFile:_})=>_({webIdentityTokenFile:y.web_identity_token_file,roleArn:y.role_arn,roleSessionName:y.role_session_name,roleAssumerWithWebIdentity:c.roleAssumerWithWebIdentity,logger:c.logger,parentClientConfig:c.parentClientConfig})());var j=async(y,c,_,b={},x=!1)=>{const w=c[y];if(Object.keys(b).length>0&&q(w))return z(w,_);if(x||J(w,{profile:y,logger:_.logger}))return L(y,c,_,b);if(q(w))return z(w,_);if(X(w))return Y(w,_);if(Q(w))return U(_,y);if(W(w))return await V(y,_);throw new Z.CredentialsProviderError(`Could not resolve credentials using profile: [${y}] in configuration/credentials file(s).`,{logger:_.logger})};var a=(y={})=>async()=>{y.logger?.debug("@aws-sdk/credential-provider-ini - fromIni");const c=await E(y);return j(K(y),c,y)};export{a as fromIni};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import"./chunk-5f01223b8fbe1ed8.js";import{B as D} from"./chunk-24a86f8f5ddc0cbd.js";import"./chunk-28694e5e949df0ff.js";import{$ as Ml,O as Gl,P as dl,Q as K0,R as F0,S as B0,T as U0,X as b,Y as Qh,Z as Q0,_ as zl,aa as Nl,ba as Wl,ca as X0,da as xl,ea as il,fa as cl,ga as el,ha as Y0,ia as Z0,ka as B,la as $0,ma as pl,na as nl,oa as V0,pa as ol,qa as P0,ra as Gh,sa as ul,ta as tl,ua as h0,va as l0,wa as D0,xa as E0} from"./chunk-519593bc19f7cb9f.js";import{Aa as L0,Fa as Al,Ha as Ll,Ia as Rl,Ka as y0,La as jl,Ma as al,Pa as fl,Qa as Cl,bb as F,cb as Sh,db as mw,hb as R0,jb as H,lb as u,ob as j0,qb as v0,rb as T,sb as a0,tb as Ol,ub as gl,vb as m0,wb as J0,xb as eh,ya as S0,za as H0} from"./chunk-69b5648fcd0f0a18.js";import"./chunk-6b18189b2aabf6b7.js";import{Db as Pw,Eb as f} from"./chunk-5806220e55ac164c.js";import"./chunk-b4cbb4706a35f5d5.js";import{Gb as Xh} from"./chunk-cc7158438e52b9ab.js";import"./chunk-fa61561237819f16.js";var C=D(Qh(),1);var Il=D(Gh(),1);var Xw=function(h){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"sts",region:h.region},propertiesExtractor:(w,l)=>({signingProperties:{config:w,context:l}})}},wl=function(h){return{schemeId:"smithy.api#noAuth"}},Sl=async(h,w,l)=>{return{operation:Gl(w).operation,region:await dl(h.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()}},Hl=(h)=>{const w=[];switch(h.operation){case"AssumeRoleWithSAML":{w.push(wl(h));break}case"AssumeRoleWithWebIdentity":{w.push(wl(h));break}default:w.push(Xw(h))}return w},Yw=(h)=>({...h,stsClientCtor:A}),ml=(h)=>{const w=Yw(h);return{...Il.resolveAwsSdkSigV4Config(w)}};var Jl=(h)=>{return{...h,useDualstackEndpoint:h.useDualstackEndpoint??!1,useFipsEndpoint:h.useFipsEndpoint??!1,useGlobalEndpoint:h.useGlobalEndpoint??!1,defaultSigningName:"sts"}},E={UseGlobalEndpoint:{type:"builtInParams",name:"useGlobalEndpoint"},UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}};var Dl={name:"@aws-sdk/client-sts",description:"AWS SDK for JavaScript Sts 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-sts","build:es":"tsc -p tsconfig.es.json","build:include:deps":"lerna run --scope $npm_package_name --include-dependencies build","build:types":"rimraf ./dist-types tsconfig.types.tsbuildinfo && 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 sts",test:"yarn test:unit","test:unit":"jest"},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/client-sso-oidc":"3.654.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",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-sts",repository:{type:"git",url:"https://github.com/aws/aws-sdk-js-v3.git",directory:"clients/client-sts"}};var dh=D(Gh(),1);var w0=D(Qh(),1);var sl=D(Gh(),1),rl=D(Qh(),1);var _l=D(Pw(),1);var El={["required"]:!1,["type"]:"String"},yh={["required"]:!0,default:!1,["type"]:"Boolean"},Yl={["ref"]:"Endpoint"},kl={["fn"]:"isSet",["argv"]:[{["ref"]:"Region"}]},J={["ref"]:"Region"},Kl={["fn"]:"aws.partition",["argv"]:[J],assign:"PartitionResult"},Zl={["ref"]:"UseFIPS"},$l={["ref"]:"UseDualStack"},k={url:"https://sts.amazonaws.com",properties:{authSchemes:[{name:"sigv4",signingName:"sts",signingRegion:"us-east-1"}]},headers:{}},X={},Fl={conditions:[{["fn"]:"stringEquals",["argv"]:[J,"aws-global"]}],["endpoint"]:k,["type"]:"endpoint"},Vl={["fn"]:"booleanEquals",["argv"]:[Zl,!0]},Pl={["fn"]:"booleanEquals",["argv"]:[$l,!0]},Bl={["fn"]:"getAttr",["argv"]:[{["ref"]:"PartitionResult"},"supportsFIPS"]},vl={["ref"]:"PartitionResult"},Ul={["fn"]:"booleanEquals",["argv"]:[!0,{["fn"]:"getAttr",["argv"]:[vl,"supportsDualStack"]}]},yl=[{["fn"]:"isSet",["argv"]:[Yl]}],Ql=[Vl],Xl=[Pl],$w={version:"1.0",parameters:{Region:El,UseDualStack:yh,UseFIPS:yh,Endpoint:El,UseGlobalEndpoint:yh},rules:[{conditions:[{["fn"]:"booleanEquals",["argv"]:[{["ref"]:"UseGlobalEndpoint"},!0]},{["fn"]:"not",["argv"]:yl},kl,Kl,{["fn"]:"booleanEquals",["argv"]:[Zl,!1]},{["fn"]:"booleanEquals",["argv"]:[$l,!1]}],rules:[{conditions:[{["fn"]:"stringEquals",["argv"]:[J,"ap-northeast-1"]}],endpoint:k,["type"]:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[J,"ap-south-1"]}],endpoint:k,["type"]:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[J,"ap-southeast-1"]}],endpoint:k,["type"]:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[J,"ap-southeast-2"]}],endpoint:k,["type"]:"endpoint"},Fl,{conditions:[{["fn"]:"stringEquals",["argv"]:[J,"ca-central-1"]}],endpoint:k,["type"]:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[J,"eu-central-1"]}],endpoint:k,["type"]:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[J,"eu-north-1"]}],endpoint:k,["type"]:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[J,"eu-west-1"]}],endpoint:k,["type"]:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[J,"eu-west-2"]}],endpoint:k,["type"]:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[J,"eu-west-3"]}],endpoint:k,["type"]:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[J,"sa-east-1"]}],endpoint:k,["type"]:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[J,"us-east-1"]}],endpoint:k,["type"]:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[J,"us-east-2"]}],endpoint:k,["type"]:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[J,"us-west-1"]}],endpoint:k,["type"]:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[J,"us-west-2"]}],endpoint:k,["type"]:"endpoint"},{endpoint:{url:"https://sts.{Region}.{PartitionResult#dnsSuffix}",properties:{authSchemes:[{name:"sigv4",signingName:"sts",signingRegion:"{Region}"}]},headers:X},["type"]:"endpoint"}],["type"]:"tree"},{conditions:yl,rules:[{conditions:Ql,error:"Invalid Configuration: FIPS and custom endpoint are not supported",["type"]:"error"},{conditions:Xl,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",["type"]:"error"},{endpoint:{url:Yl,properties:X,headers:X},["type"]:"endpoint"}],["type"]:"tree"},{conditions:[kl],rules:[{conditions:[Kl],rules:[{conditions:[Vl,Pl],rules:[{conditions:[{["fn"]:"booleanEquals",["argv"]:[!0,Bl]},Ul],rules:[{endpoint:{url:"https://sts-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:X,headers:X},["type"]:"endpoint"}],["type"]:"tree"},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",["type"]:"error"}],["type"]:"tree"},{conditions:Ql,rules:[{conditions:[{["fn"]:"booleanEquals",["argv"]:[Bl,!0]}],rules:[{conditions:[{["fn"]:"stringEquals",["argv"]:[{["fn"]:"getAttr",["argv"]:[vl,"name"]},"aws-us-gov"]}],endpoint:{url:"https://sts.{Region}.amazonaws.com",properties:X,headers:X},["type"]:"endpoint"},{endpoint:{url:"https://sts-fips.{Region}.{PartitionResult#dnsSuffix}",properties:X,headers:X},["type"]:"endpoint"}],["type"]:"tree"},{error:"FIPS is enabled but this partition does not support FIPS",["type"]:"error"}],["type"]:"tree"},{conditions:Xl,rules:[{conditions:[Ul],rules:[{endpoint:{url:"https://sts.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:X,headers:X},["type"]:"endpoint"}],["type"]:"tree"},{error:"DualStack is enabled but this partition does not support DualStack",["type"]:"error"}],["type"]:"tree"},Fl,{endpoint:{url:"https://sts.{Region}.{PartitionResult#dnsSuffix}",properties:X,headers:X},["type"]:"endpoint"}],["type"]:"tree"}],["type"]:"tree"},{error:"Invalid Configuration: Missing Region",["type"]:"error"}]},ql=$w;var Vw=new zl({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS","UseGlobalEndpoint"]}),Tl=(h,w={})=>{return Vw.get(h,()=>Nl(ql,{endpointParams:h,logger:w.logger}))};Ml.aws=Wl;var bl=(h)=>{return{apiVersion:"2011-06-15",base64Decoder:h?.base64Decoder??jl,base64Encoder:h?.base64Encoder??al,disableHostPrefix:h?.disableHostPrefix??!1,endpointProvider:h?.endpointProvider??Tl,extensions:h?.extensions??[],httpAuthSchemeProvider:h?.httpAuthSchemeProvider??Hl,httpAuthSchemes:h?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:(w)=>w.getIdentityProvider("aws.auth#sigv4"),signer:new sl.AwsSdkSigV4Signer},{schemeId:"smithy.api#noAuth",identityProvider:(w)=>w.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new rl.NoAuthSigner}],logger:h?.logger??new Rl,serviceId:h?.serviceId??"STS",urlParser:h?.urlParser??_l.parseUrl,utf8Decoder:h?.utf8Decoder??Al,utf8Encoder:h?.utf8Encoder??Ll}};var G0=(h)=>{gl(process.version);const w=l0(h),l=()=>w().then(Ol),G=bl(h);return dh.emitWarningIfUnsupportedVersion(process.version),{...G,...h,runtime:"node",defaultsMode:w,bodyLengthChecker:h?.bodyLengthChecker??h0,credentialDefaultProvider:h?.credentialDefaultProvider??Xh,defaultUserAgentProvider:h?.defaultUserAgentProvider??ul({serviceId:G.serviceId,clientVersion:Dl.version}),httpAuthSchemes:h?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:(d)=>d.getIdentityProvider("aws.auth#sigv4")||(async(S)=>await Xh(S?.__config||{})()),signer:new dh.AwsSdkSigV4Signer},{schemeId:"smithy.api#noAuth",identityProvider:(d)=>d.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new w0.NoAuthSigner}],maxAttempts:h?.maxAttempts??f(nl),region:h?.region??f(cl,el),requestHandler:fl.create(h?.requestHandler??l),retryMode:h?.retryMode??f({...ol,default:async()=>(await l()).retryMode||pl}),sha256:h?.sha256??tl.bind(null,"sha256"),streamCollector:h?.streamCollector??Cl,useDualstackEndpoint:h?.useDualstackEndpoint??f(xl),useFipsEndpoint:h?.useFipsEndpoint??f(il)}};var d0=(h)=>{const w=h.httpAuthSchemes;let{httpAuthSchemeProvider:l,credentials:G}=h;return{setHttpAuthScheme(d){const S=w.findIndex((I)=>I.schemeId===d.schemeId);if(S===-1)w.push(d);else w.splice(S,1,d)},httpAuthSchemes(){return w},setHttpAuthSchemeProvider(d){l=d},httpAuthSchemeProvider(){return l},setCredentials(d){G=d},credentials(){return G}}},I0=(h)=>{return{httpAuthSchemes:h.httpAuthSchemes(),httpAuthSchemeProvider:h.httpAuthSchemeProvider(),credentials:h.credentials()}};var Ih=(h)=>h,k0=(h,w)=>{const l={...Ih(D0(h)),...Ih(m0(h)),...Ih(S0(h)),...Ih(d0(h))};return w.forEach((G)=>G.configure(l)),{...h,...E0(l),...J0(l),...H0(l),...I0(l)}};class A extends y0{constructor(...[h]){const w=G0(h||{}),l=Jl(w),G=Q0(l),d=V0(G),S=Y0(d),I=K0(S),Q=$0(I),z=ml(Q),v=k0(z,h?.extensions||[]);super(v);this.config=v,this.middlewareStack.use(X0(this.config)),this.middlewareStack.use(P0(this.config)),this.middlewareStack.use(Z0(this.config)),this.middlewareStack.use(F0(this.config)),this.middlewareStack.use(B0(this.config)),this.middlewareStack.use(U0(this.config)),this.middlewareStack.use(C.getHttpAuthSchemeEndpointRuleSetPlugin(this.config,{httpAuthSchemeParametersProvider:Sl,identityProviderConfigProvider:async(n)=>new C.DefaultIdentityProviderConfig({"aws.auth#sigv4":n.credentials})})),this.middlewareStack.use(C.getHttpSigningPlugin(this.config))}destroy(){super.destroy()}}var hw=D(b(),1);class Y extends v0{constructor(h){super(h);Object.setPrototypeOf(this,Y.prototype)}}class Hh extends Y{constructor(h){super({name:"ExpiredTokenException",$fault:"client",...h});this.name="ExpiredTokenException",this.$fault="client",Object.setPrototypeOf(this,Hh.prototype)}}class mh extends Y{constructor(h){super({name:"MalformedPolicyDocumentException",$fault:"client",...h});this.name="MalformedPolicyDocumentException",this.$fault="client",Object.setPrototypeOf(this,mh.prototype)}}class Jh extends Y{constructor(h){super({name:"PackedPolicyTooLargeException",$fault:"client",...h});this.name="PackedPolicyTooLargeException",this.$fault="client",Object.setPrototypeOf(this,Jh.prototype)}}class Dh extends Y{constructor(h){super({name:"RegionDisabledException",$fault:"client",...h});this.name="RegionDisabledException",this.$fault="client",Object.setPrototypeOf(this,Dh.prototype)}}class Eh extends Y{constructor(h){super({name:"IDPRejectedClaimException",$fault:"client",...h});this.name="IDPRejectedClaimException",this.$fault="client",Object.setPrototypeOf(this,Eh.prototype)}}class kh extends Y{constructor(h){super({name:"InvalidIdentityTokenException",$fault:"client",...h});this.name="InvalidIdentityTokenException",this.$fault="client",Object.setPrototypeOf(this,kh.prototype)}}class Kh extends Y{constructor(h){super({name:"IDPCommunicationErrorException",$fault:"client",...h});this.name="IDPCommunicationErrorException",this.$fault="client",Object.setPrototypeOf(this,Kh.prototype)}}class Fh extends Y{constructor(h){super({name:"InvalidAuthorizationMessageException",$fault:"client",...h});this.name="InvalidAuthorizationMessageException",this.$fault="client",Object.setPrototypeOf(this,Fh.prototype)}}var o=(h)=>({...h,...h.SecretAccessKey&&{SecretAccessKey:Sh}}),q0=(h)=>({...h,...h.Credentials&&{Credentials:o(h.Credentials)}}),z0=(h)=>({...h,...h.SAMLAssertion&&{SAMLAssertion:Sh}}),M0=(h)=>({...h,...h.Credentials&&{Credentials:o(h.Credentials)}}),N0=(h)=>({...h,...h.WebIdentityToken&&{WebIdentityToken:Sh}}),W0=(h)=>({...h,...h.Credentials&&{Credentials:o(h.Credentials)}}),T0=(h)=>({...h,...h.Credentials&&{Credentials:o(h.Credentials)}}),A0=(h)=>({...h,...h.Credentials&&{Credentials:o(h.Credentials)}});var q=D(Gh(),1);var s0=async(h,w)=>{const l=j;let G;return G=_({...Lw(h,w),[s]:DG,[r]:a}),R(w,l,"/",void 0,G)},r0=async(h,w)=>{const l=j;let G;return G=_({...Rw(h,w),[s]:EG,[r]:a}),R(w,l,"/",void 0,G)},_0=async(h,w)=>{const l=j;let G;return G=_({...jw(h,w),[s]:kG,[r]:a}),R(w,l,"/",void 0,G)},b0=async(h,w)=>{const l=j;let G;return G=_({...aw(h,w),[s]:KG,[r]:a}),R(w,l,"/",void 0,G)},f0=async(h,w)=>{const l=j;let G;return G=_({...sw(h,w),[s]:FG,[r]:a}),R(w,l,"/",void 0,G)},C0=async(h,w)=>{const l=j;let G;return G=_({...rw(h,w),[s]:BG,[r]:a}),R(w,l,"/",void 0,G)},O0=async(h,w)=>{const l=j;let G;return G=_({..._w(h,w),[s]:UG,[r]:a}),R(w,l,"/",void 0,G)},g0=async(h,w)=>{const l=j;let G;return G=_({...bw(h,w),[s]:yG,[r]:a}),R(w,l,"/",void 0,G)},x0=async(h,w)=>{if(h.statusCode>=300)return L(h,w);const l=await q.parseXmlBody(h.body,w);let G={};return G=iw(l.AssumeRoleResult,w),{$metadata:K(h),...G}},i0=async(h,w)=>{if(h.statusCode>=300)return L(h,w);const l=await q.parseXmlBody(h.body,w);let G={};return G=cw(l.AssumeRoleWithSAMLResult,w),{$metadata:K(h),...G}},c0=async(h,w)=>{if(h.statusCode>=300)return L(h,w);const l=await q.parseXmlBody(h.body,w);let G={};return G=ew(l.AssumeRoleWithWebIdentityResult,w),{$metadata:K(h),...G}},e0=async(h,w)=>{if(h.statusCode>=300)return L(h,w);const l=await q.parseXmlBody(h.body,w);let G={};return G=pw(l.DecodeAuthorizationMessageResult,w),{$metadata:K(h),...G}},p0=async(h,w)=>{if(h.statusCode>=300)return L(h,w);const l=await q.parseXmlBody(h.body,w);let G={};return G=uw(l.GetAccessKeyInfoResult,w),{$metadata:K(h),...G}},n0=async(h,w)=>{if(h.statusCode>=300)return L(h,w);const l=await q.parseXmlBody(h.body,w);let G={};return G=tw(l.GetCallerIdentityResult,w),{$metadata:K(h),...G}},o0=async(h,w)=>{if(h.statusCode>=300)return L(h,w);const l=await q.parseXmlBody(h.body,w);let G={};return G=hG(l.GetFederationTokenResult,w),{$metadata:K(h),...G}},u0=async(h,w)=>{if(h.statusCode>=300)return L(h,w);const l=await q.parseXmlBody(h.body,w);let G={};return G=lG(l.GetSessionTokenResult,w),{$metadata:K(h),...G}},L=async(h,w)=>{const l={...h,body:await q.parseXmlErrorBody(h.body,w)},G=QG(h,l.body);switch(G){case"ExpiredTokenException":case"com.amazonaws.sts#ExpiredTokenException":throw await vw(l,w);case"MalformedPolicyDocument":case"com.amazonaws.sts#MalformedPolicyDocumentException":throw await Ww(l,w);case"PackedPolicyTooLarge":case"com.amazonaws.sts#PackedPolicyTooLargeException":throw await Tw(l,w);case"RegionDisabledException":case"com.amazonaws.sts#RegionDisabledException":throw await Aw(l,w);case"IDPRejectedClaim":case"com.amazonaws.sts#IDPRejectedClaimException":throw await zw(l,w);case"InvalidIdentityToken":case"com.amazonaws.sts#InvalidIdentityTokenException":throw await Nw(l,w);case"IDPCommunicationError":case"com.amazonaws.sts#IDPCommunicationErrorException":throw await qw(l,w);case"InvalidAuthorizationMessageException":case"com.amazonaws.sts#InvalidAuthorizationMessageException":throw await Mw(l,w);default:const d=l.body;return JG({output:h,parsedBody:d.Error,errorCode:G})}},vw=async(h,w)=>{const l=h.body,G=nw(l.Error,w),d=new Hh({$metadata:K(h),...G});return T(d,l)},qw=async(h,w)=>{const l=h.body,G=wG(l.Error,w),d=new Kh({$metadata:K(h),...G});return T(d,l)},zw=async(h,w)=>{const l=h.body,G=GG(l.Error,w),d=new Eh({$metadata:K(h),...G});return T(d,l)},Mw=async(h,w)=>{const l=h.body,G=dG(l.Error,w),d=new Fh({$metadata:K(h),...G});return T(d,l)},Nw=async(h,w)=>{const l=h.body,G=IG(l.Error,w),d=new kh({$metadata:K(h),...G});return T(d,l)},Ww=async(h,w)=>{const l=h.body,G=SG(l.Error,w),d=new mh({$metadata:K(h),...G});return T(d,l)},Tw=async(h,w)=>{const l=h.body,G=HG(l.Error,w),d=new Jh({$metadata:K(h),...G});return T(d,l)},Aw=async(h,w)=>{const l=h.body,G=mG(l.Error,w),d=new Dh({$metadata:K(h),...G});return T(d,l)},Lw=(h,w)=>{const l={};if(h[W]!=null)l[W]=h[W];if(h[i]!=null)l[i]=h[i];if(h[$]!=null){const G=Bh(h[$],w);if(h[$]?.length===0)l.PolicyArns=[];Object.entries(G).forEach(([d,S])=>{const I=`PolicyArns.${d}`;l[I]=S})}if(h[Z]!=null)l[Z]=h[Z];if(h[y]!=null)l[y]=h[y];if(h[e]!=null){const G=t0(h[e],w);if(h[e]?.length===0)l.Tags=[];Object.entries(G).forEach(([d,S])=>{const I=`Tags.${d}`;l[I]=S})}if(h[Oh]!=null){const G=xw(h[Oh],w);if(h[Oh]?.length===0)l.TransitiveTagKeys=[];Object.entries(G).forEach(([d,S])=>{const I=`TransitiveTagKeys.${d}`;l[I]=S})}if(h[Ph]!=null)l[Ph]=h[Ph];if(h[c]!=null)l[c]=h[c];if(h[p]!=null)l[p]=h[p];if(h[P]!=null)l[P]=h[P];if(h[Rh]!=null){const G=Ow(h[Rh],w);if(h[Rh]?.length===0)l.ProvidedContexts=[];Object.entries(G).forEach(([d,S])=>{const I=`ProvidedContexts.${d}`;l[I]=S})}return l},Rw=(h,w)=>{const l={};if(h[W]!=null)l[W]=h[W];if(h[Ah]!=null)l[Ah]=h[Ah];if(h[_h]!=null)l[_h]=h[_h];if(h[$]!=null){const G=Bh(h[$],w);if(h[$]?.length===0)l.PolicyArns=[];Object.entries(G).forEach(([d,S])=>{const I=`PolicyArns.${d}`;l[I]=S})}if(h[Z]!=null)l[Z]=h[Z];if(h[y]!=null)l[y]=h[y];return l},jw=(h,w)=>{const l={};if(h[W]!=null)l[W]=h[W];if(h[i]!=null)l[i]=h[i];if(h[ih]!=null)l[ih]=h[ih];if(h[jh]!=null)l[jh]=h[jh];if(h[$]!=null){const G=Bh(h[$],w);if(h[$]?.length===0)l.PolicyArns=[];Object.entries(G).forEach(([d,S])=>{const I=`PolicyArns.${d}`;l[I]=S})}if(h[Z]!=null)l[Z]=h[Z];if(h[y]!=null)l[y]=h[y];return l},aw=(h,w)=>{const l={};if(h[vh]!=null)l[vh]=h[vh];return l},sw=(h,w)=>{const l={};if(h[O]!=null)l[O]=h[O];return l},rw=(h,w)=>{return{}},_w=(h,w)=>{const l={};if(h[Wh]!=null)l[Wh]=h[Wh];if(h[Z]!=null)l[Z]=h[Z];if(h[$]!=null){const G=Bh(h[$],w);if(h[$]?.length===0)l.PolicyArns=[];Object.entries(G).forEach(([d,S])=>{const I=`PolicyArns.${d}`;l[I]=S})}if(h[y]!=null)l[y]=h[y];if(h[e]!=null){const G=t0(h[e],w);if(h[e]?.length===0)l.Tags=[];Object.entries(G).forEach(([d,S])=>{const I=`Tags.${d}`;l[I]=S})}return l},bw=(h,w)=>{const l={};if(h[y]!=null)l[y]=h[y];if(h[c]!=null)l[c]=h[c];if(h[p]!=null)l[p]=h[p];return l},Bh=(h,w)=>{const l={};let G=1;for(let d of h){if(d===null)continue;const S=fw(d,w);Object.entries(S).forEach(([I,Q])=>{l[`member.${G}.${I}`]=Q}),G++}return l},fw=(h,w)=>{const l={};if(h[ch]!=null)l[ch]=h[ch];return l},Cw=(h,w)=>{const l={};if(h[Lh]!=null)l[Lh]=h[Lh];if(h[Zh]!=null)l[Zh]=h[Zh];return l},Ow=(h,w)=>{const l={};let G=1;for(let d of h){if(d===null)continue;const S=Cw(d,w);Object.entries(S).forEach(([I,Q])=>{l[`member.${G}.${I}`]=Q}),G++}return l},gw=(h,w)=>{const l={};if(h[Nh]!=null)l[Nh]=h[Nh];if(h[xh]!=null)l[xh]=h[xh];return l},xw=(h,w)=>{const l={};let G=1;for(let d of h){if(d===null)continue;l[`member.${G}`]=d,G++}return l},t0=(h,w)=>{const l={};let G=1;for(let d of h){if(d===null)continue;const S=gw(d,w);Object.entries(S).forEach(([I,Q])=>{l[`member.${G}.${I}`]=Q}),G++}return l},ph=(h,w)=>{const l={};if(h[Yh]!=null)l[Yh]=H(h[Yh]);if(h[N]!=null)l[N]=H(h[N]);return l},iw=(h,w)=>{const l={};if(h[U]!=null)l[U]=t(h[U],w);if(h[M]!=null)l[M]=ph(h[M],w);if(h[V]!=null)l[V]=u(h[V]);if(h[P]!=null)l[P]=H(h[P]);return l},cw=(h,w)=>{const l={};if(h[U]!=null)l[U]=t(h[U],w);if(h[M]!=null)l[M]=ph(h[M],w);if(h[V]!=null)l[V]=u(h[V]);if(h[sh]!=null)l[sh]=H(h[sh]);if(h[fh]!=null)l[fh]=H(h[fh]);if(h[Mh]!=null)l[Mh]=H(h[Mh]);if(h[x]!=null)l[x]=H(h[x]);if(h[Th]!=null)l[Th]=H(h[Th]);if(h[P]!=null)l[P]=H(h[P]);return l},ew=(h,w)=>{const l={};if(h[U]!=null)l[U]=t(h[U],w);if(h[bh]!=null)l[bh]=H(h[bh]);if(h[M]!=null)l[M]=ph(h[M],w);if(h[V]!=null)l[V]=u(h[V]);if(h[ah]!=null)l[ah]=H(h[ah]);if(h[x]!=null)l[x]=H(h[x]);if(h[P]!=null)l[P]=H(h[P]);return l},t=(h,w)=>{const l={};if(h[O]!=null)l[O]=H(h[O]);if(h[rh]!=null)l[rh]=H(h[rh]);if(h[Ch]!=null)l[Ch]=H(h[Ch]);if(h[Vh]!=null)l[Vh]=R0(j0(h[Vh]));return l},pw=(h,w)=>{const l={};if(h[$h]!=null)l[$h]=H(h[$h]);return l},nw=(h,w)=>{const l={};if(h[m]!=null)l[m]=H(h[m]);return l},ow=(h,w)=>{const l={};if(h[zh]!=null)l[zh]=H(h[zh]);if(h[N]!=null)l[N]=H(h[N]);return l},uw=(h,w)=>{const l={};if(h[g]!=null)l[g]=H(h[g]);return l},tw=(h,w)=>{const l={};if(h[gh]!=null)l[gh]=H(h[gh]);if(h[g]!=null)l[g]=H(h[g]);if(h[N]!=null)l[N]=H(h[N]);return l},hG=(h,w)=>{const l={};if(h[U]!=null)l[U]=t(h[U],w);if(h[qh]!=null)l[qh]=ow(h[qh],w);if(h[V]!=null)l[V]=u(h[V]);return l},lG=(h,w)=>{const l={};if(h[U]!=null)l[U]=t(h[U],w);return l},wG=(h,w)=>{const l={};if(h[m]!=null)l[m]=H(h[m]);return l},GG=(h,w)=>{const l={};if(h[m]!=null)l[m]=H(h[m]);return l},dG=(h,w)=>{const l={};if(h[m]!=null)l[m]=H(h[m]);return l},IG=(h,w)=>{const l={};if(h[m]!=null)l[m]=H(h[m]);return l},SG=(h,w)=>{const l={};if(h[m]!=null)l[m]=H(h[m]);return l},HG=(h,w)=>{const l={};if(h[m]!=null)l[m]=H(h[m]);return l},mG=(h,w)=>{const l={};if(h[m]!=null)l[m]=H(h[m]);return l},K=(h)=>({httpStatusCode:h.statusCode,requestId:h.headers["x-amzn-requestid"]??h.headers["x-amzn-request-id"]??h.headers["x-amz-request-id"],extendedRequestId:h.headers["x-amz-id-2"],cfId:h.headers["x-amz-cf-id"]});var JG=a0(Y),R=async(h,w,l,G,d)=>{const{hostname:S,protocol:I="https",port:Q,path:z}=await h.endpoint(),v={protocol:I,hostname:S,port:Q,method:"POST",path:z.endsWith("/")?z.slice(0,-1)+l:z+l,headers:w};if(G!==void 0)v.hostname=G;if(d!==void 0)v.body=d;return new L0(v)},j={"content-type":"application/x-www-form-urlencoded"},a="2011-06-15",s="Action",O="AccessKeyId",DG="AssumeRole",Yh="AssumedRoleId",M="AssumedRoleUser",EG="AssumeRoleWithSAML",kG="AssumeRoleWithWebIdentity",g="Account",N="Arn",x="Audience",U="Credentials",Zh="ContextAssertion",KG="DecodeAuthorizationMessage",$h="DecodedMessage",y="DurationSeconds",Vh="Expiration",Ph="ExternalId",vh="EncodedMessage",qh="FederatedUser",zh="FederatedUserId",FG="GetAccessKeyInfo",BG="GetCallerIdentity",UG="GetFederationToken",yG="GetSessionToken",Mh="Issuer",Nh="Key",Wh="Name",Th="NameQualifier",Z="Policy",$="PolicyArns",Ah="PrincipalArn",Lh="ProviderArn",Rh="ProvidedContexts",jh="ProviderId",V="PackedPolicySize",ah="Provider",W="RoleArn",i="RoleSessionName",sh="Subject",rh="SecretAccessKey",_h="SAMLAssertion",bh="SubjectFromWebIdentityToken",P="SourceIdentity",c="SerialNumber",fh="SubjectType",Ch="SessionToken",e="Tags",p="TokenCode",Oh="TransitiveTagKeys",gh="UserId",r="Version",xh="Value",ih="WebIdentityToken",ch="arn",m="message",_=(h)=>Object.entries(h).map(([w,l])=>eh(w)+"="+eh(l)).join("&"),QG=(h,w)=>{if(w.Error?.Code!==void 0)return w.Error.Code;if(h.statusCode==404)return"NotFound"};class hh extends F.classBuilder().ep(E).m(function(h,w,l,G){return[hw.getSerdePlugin(l,this.serialize,this.deserialize),B(l,h.getEndpointParameterInstructions())]}).s("AWSSecurityTokenServiceV20110615","AssumeRole",{}).n("STSClient","AssumeRoleCommand").f(void 0,q0).ser(s0).de(x0).build(){}var lw=D(b(),1);class nh extends F.classBuilder().ep(E).m(function(h,w,l,G){return[lw.getSerdePlugin(l,this.serialize,this.deserialize),B(l,h.getEndpointParameterInstructions())]}).s("AWSSecurityTokenServiceV20110615","AssumeRoleWithSAML",{}).n("STSClient","AssumeRoleWithSAMLCommand").f(z0,M0).ser(r0).de(i0).build(){}var ww=D(b(),1);class lh extends F.classBuilder().ep(E).m(function(h,w,l,G){return[ww.getSerdePlugin(l,this.serialize,this.deserialize),B(l,h.getEndpointParameterInstructions())]}).s("AWSSecurityTokenServiceV20110615","AssumeRoleWithWebIdentity",{}).n("STSClient","AssumeRoleWithWebIdentityCommand").f(N0,W0).ser(_0).de(c0).build(){}var Gw=D(b(),1);class oh extends F.classBuilder().ep(E).m(function(h,w,l,G){return[Gw.getSerdePlugin(l,this.serialize,this.deserialize),B(l,h.getEndpointParameterInstructions())]}).s("AWSSecurityTokenServiceV20110615","DecodeAuthorizationMessage",{}).n("STSClient","DecodeAuthorizationMessageCommand").f(void 0,void 0).ser(b0).de(e0).build(){}var dw=D(b(),1);class uh extends F.classBuilder().ep(E).m(function(h,w,l,G){return[dw.getSerdePlugin(l,this.serialize,this.deserialize),B(l,h.getEndpointParameterInstructions())]}).s("AWSSecurityTokenServiceV20110615","GetAccessKeyInfo",{}).n("STSClient","GetAccessKeyInfoCommand").f(void 0,void 0).ser(f0).de(p0).build(){}var Iw=D(b(),1);class th extends F.classBuilder().ep(E).m(function(h,w,l,G){return[Iw.getSerdePlugin(l,this.serialize,this.deserialize),B(l,h.getEndpointParameterInstructions())]}).s("AWSSecurityTokenServiceV20110615","GetCallerIdentity",{}).n("STSClient","GetCallerIdentityCommand").f(void 0,void 0).ser(C0).de(n0).build(){}var Sw=D(b(),1);class hl extends F.classBuilder().ep(E).m(function(h,w,l,G){return[Sw.getSerdePlugin(l,this.serialize,this.deserialize),B(l,h.getEndpointParameterInstructions())]}).s("AWSSecurityTokenServiceV20110615","GetFederationToken",{}).n("STSClient","GetFederationTokenCommand").f(void 0,T0).ser(O0).de(o0).build(){}var Hw=D(b(),1);class ll extends F.classBuilder().ep(E).m(function(h,w,l,G){return[Hw.getSerdePlugin(l,this.serialize,this.deserialize),B(l,h.getEndpointParameterInstructions())]}).s("AWSSecurityTokenServiceV20110615","GetSessionToken",{}).n("STSClient","GetSessionTokenCommand").f(void 0,A0).ser(g0).de(u0).build(){}var XG={AssumeRoleCommand:hh,AssumeRoleWithSAMLCommand:nh,AssumeRoleWithWebIdentityCommand:lh,DecodeAuthorizationMessageCommand:oh,GetAccessKeyInfoCommand:uh,GetCallerIdentityCommand:th,GetFederationTokenCommand:hl,GetSessionTokenCommand:ll};class Jw extends A{}mw(XG,Jw);var Dw="us-east-1",Ew=(h)=>{if(typeof h?.Arn==="string"){const w=h.Arn.split(":");if(w.length>4&&w[4]!=="")return w[4]}return},kw=async(h,w,l)=>{const G=typeof h==="function"?await h():h,d=typeof w==="function"?await w():w;return l?.debug?.("@aws-sdk/client-sts::resolveRegion","accepting first of:",`${G} (provider)`,`${d} (parent client)`,`${Dw} (STS default)`),G??d??Dw},Kw=(h,w)=>{let l,G;return async(d,S)=>{if(G=d,!l){const{logger:v=h?.parentClientConfig?.logger,region:n,requestHandler:wh=h?.parentClientConfig?.requestHandler,credentialProviderLogger:Uh}=h,yw=await kw(n,h?.parentClientConfig?.region,Uh),Qw=!Bw(wh);l=new w({credentialDefaultProvider:()=>async()=>G,region:yw,requestHandler:Qw?wh:void 0,logger:v})}const{Credentials:I,AssumedRoleUser:Q}=await l.send(new hh(S));if(!I||!I.AccessKeyId||!I.SecretAccessKey)throw new Error(`Invalid response from STS.assumeRole call with role ${S.RoleArn}`);const z=Ew(Q);return{accessKeyId:I.AccessKeyId,secretAccessKey:I.SecretAccessKey,sessionToken:I.SessionToken,expiration:I.Expiration,...I.CredentialScope&&{credentialScope:I.CredentialScope},...z&&{accountId:z}}}},Fw=(h,w)=>{let l;return async(G)=>{if(!l){const{logger:Q=h?.parentClientConfig?.logger,region:z,requestHandler:v=h?.parentClientConfig?.requestHandler,credentialProviderLogger:n}=h,wh=await kw(z,h?.parentClientConfig?.region,n),Uh=!Bw(v);l=new w({region:wh,requestHandler:Uh?v:void 0,logger:Q})}const{Credentials:d,AssumedRoleUser:S}=await l.send(new lh(G));if(!d||!d.AccessKeyId||!d.SecretAccessKey)throw new Error(`Invalid response from STS.assumeRoleWithWebIdentity call with role ${G.RoleArn}`);const I=Ew(S);return{accessKeyId:d.AccessKeyId,secretAccessKey:d.SecretAccessKey,sessionToken:d.SessionToken,expiration:d.Expiration,...d.CredentialScope&&{credentialScope:d.CredentialScope},...I&&{accountId:I}}}};var Bw=(h)=>{return h?.metadata?.handlerProtocol==="h2"};var Uw=(h,w)=>{if(!w)return h;else return class l extends h{constructor(G){super(G);for(let d of w)this.middlewareStack.use(d)}}},YG=(h={},w)=>Kw(h,Uw(A,w)),ZG=(h={},w)=>Fw(h,Uw(A,w)),sI=(h)=>(w)=>h({roleAssumer:YG(w),roleAssumerWithWebIdentity:ZG(w),...w});export{ZG as getDefaultRoleAssumerWithWebIdentity,YG as getDefaultRoleAssumer,sI as decorateDefaultCredentialProvider,y0 as __Client,Y as STSServiceException,A as STSClient,Jw as STS,Dh as RegionDisabledException,Jh as PackedPolicyTooLargeException,mh as MalformedPolicyDocumentException,kh as InvalidIdentityTokenException,Fh as InvalidAuthorizationMessageException,Eh as IDPRejectedClaimException,Kh as IDPCommunicationErrorException,A0 as GetSessionTokenResponseFilterSensitiveLog,ll as GetSessionTokenCommand,T0 as GetFederationTokenResponseFilterSensitiveLog,hl as GetFederationTokenCommand,th as GetCallerIdentityCommand,uh as GetAccessKeyInfoCommand,Hh as ExpiredTokenException,oh as DecodeAuthorizationMessageCommand,o as CredentialsFilterSensitiveLog,W0 as AssumeRoleWithWebIdentityResponseFilterSensitiveLog,N0 as AssumeRoleWithWebIdentityRequestFilterSensitiveLog,lh as AssumeRoleWithWebIdentityCommand,M0 as AssumeRoleWithSAMLResponseFilterSensitiveLog,z0 as AssumeRoleWithSAMLRequestFilterSensitiveLog,nh as AssumeRoleWithSAMLCommand,q0 as AssumeRoleResponseFilterSensitiveLog,hh as AssumeRoleCommand,F as $Command};
@@ -1,9 +0,0 @@
1
- import{u as w,v as z,w as B} from"./chunk-5f01223b8fbe1ed8.js";import{B as Q} from"./chunk-24a86f8f5ddc0cbd.js";import{Fb as X} from"./chunk-b4cbb4706a35f5d5.js";import{Hb as $} from"./chunk-fa61561237819f16.js";var q=Q(X(),1);var G=Q(X(),1),k="AWS_EC2_METADATA_DISABLED",Y=async(b)=>{const{ENV_CMDS_FULL_URI:j,ENV_CMDS_RELATIVE_URI:x,fromContainerMetadata:y,fromInstanceMetadata:J}=await import("./chunk-9383d727762ecba1.js");if(process.env[x]||process.env[j]){b.logger?.debug("@aws-sdk/credential-provider-node - remoteProvider::fromHttp/fromContainerMetadata");const{fromHttp:K}=await import("./chunk-d0b9873261cd82b7.js");return G.chain(K(b),y(b))}if(process.env[k])return async()=>{throw new G.CredentialsProviderError("EC2 Instance Metadata Service access disabled",{logger:b.logger})};return b.logger?.debug("@aws-sdk/credential-provider-node - remoteProvider::fromInstanceMetadata"),J(b)};var Z=!1,T=(b={})=>q.memoize(q.chain(async()=>{if(b.profile??process.env[$]){if(process.env[w]&&process.env[z]){if(!Z)(b.logger?.warn&&b.logger?.constructor?.name!=="NoOpLogger"?b.logger.warn:console.warn)(`@aws-sdk/credential-provider-node - defaultProvider::fromEnv WARNING:
2
- Multiple credential sources detected:
3
- Both AWS_PROFILE and the pair AWS_ACCESS_KEY_ID/AWS_SECRET_ACCESS_KEY static credentials are set.
4
- This SDK will proceed with the AWS_PROFILE value.
5
-
6
- However, a future version may change this behavior to prefer the ENV static credentials.
7
- Please ensure that your environment only sets either the AWS_PROFILE or the
8
- AWS_ACCESS_KEY_ID/AWS_SECRET_ACCESS_KEY pair.
9
- `),Z=!0}throw new q.CredentialsProviderError("AWS_PROFILE is set, skipping fromEnv provider.",{logger:b.logger,tryNextLink:!0})}return b.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromEnv"),B(b)()},async()=>{b.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromSSO");const{ssoStartUrl:j,ssoAccountId:x,ssoRegion:y,ssoRoleName:J,ssoSession:K}=b;if(!j&&!x&&!y&&!J&&!K)throw new q.CredentialsProviderError("Skipping SSO provider in default chain (inputs do not include SSO fields).",{logger:b.logger});const{fromSSO:H}=await import("./chunk-6434d2c5758f4125.js");return H(b)()},async()=>{b.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromIni");const{fromIni:j}=await import("./chunk-c160211e5cc4c447.js");return j(b)()},async()=>{b.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromProcess");const{fromProcess:j}=await import("./chunk-b3eca9338a13f510.js");return j(b)()},async()=>{b.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromTokenFile");const{fromTokenFile:j}=await import("./chunk-8f2c54f2cd43402a.js");return j(b)()},async()=>{return b.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::remoteProvider"),(await Y(b))()},async()=>{throw new q.CredentialsProviderError("Could not load credentials from any providers",{tryNextLink:!1,logger:b.logger})}),O,v),v=(b)=>b?.expiration!==void 0,O=(b)=>b?.expiration!==void 0&&b.expiration.getTime()-Date.now()<300000;export{T as Gb};
@@ -1 +0,0 @@
1
- import{B as x} from"./chunk-24a86f8f5ddc0cbd.js";import{Cb as S} from"./chunk-6b18189b2aabf6b7.js";var q="AWS_PROFILE";var B=(o)=>o.profile||process.env["AWS_PROFILE"]||"default";import{join as b} from"path";import{homedir as N} from"os";import{sep as L} from"path";var d={},w=()=>{if(process&&process.geteuid)return`${process.geteuid()}`;return"DEFAULT"},f=()=>{const{HOME:o,USERPROFILE:e,HOMEPATH:t,HOMEDRIVE:r=`C:${L}`}=process.env;if(o)return o;if(e)return e;if(t)return`${r}${t}`;const i=w();if(!d[i])d[i]=N();return d[i]};var v="AWS_CONFIG_FILE",g=()=>process.env[v]||b(f(),".aws","config");var D=x(S(),1);import{join as I} from"path";var h=x(S(),1);var O=(o)=>Object.entries(o).filter(([e])=>{const t=e.indexOf(c);if(t===-1)return!1;return Object.values(h.IniSectionType).includes(e.substring(0,t))}).reduce((e,[t,r])=>{const i=t.indexOf(c),s=t.substring(0,i)===h.IniSectionType.PROFILE?t.substring(i+1):t;return e[s]=r,e},{...o.default&&{default:o.default}});import{join as j} from"path";var y="AWS_SHARED_CREDENTIALS_FILE",_=()=>process.env[y]||j(f(),".aws","credentials");var C=x(S(),1);var $=/^([\w-]+)\s(["'])?([\w-@\+\.%:/]+)\2$/,G=["__proto__","profile __proto__"],a=(o)=>{const e={};let t,r;for(let i of o.split(/\r?\n/)){const s=i.split(/(^|\s)[;#]/)[0].trim();if(s[0]==="["&&s[s.length-1]==="]"){t=void 0,r=void 0;const n=s.substring(1,s.length-1),m=$.exec(n);if(m){const[,p,,F]=m;if(Object.values(C.IniSectionType).includes(p))t=[p,F].join(c)}else t=n;if(G.includes(n))throw new Error(`Found invalid profile name "${n}"`)}else if(t){const n=s.indexOf("=");if(![0,-1].includes(n)){const[m,p]=[s.substring(0,n).trim(),s.substring(n+1).trim()];if(p==="")r=m;else{if(r&&i.trimStart()===i)r=void 0;e[t]=e[t]||{};const F=r?[r,m].join(c):m;e[t][F]=p}}}}return e};import{promises as W} from"fs";var{readFile:K}=W,E={},l=(o,e)=>{if(!E[o]||e?.ignoreCache)E[o]=K(o,"utf8");return E[o]};var P=()=>({}),c=".",R=async(o={})=>{const{filepath:e=_(),configFilepath:t=g()}=o,r=f();let s=e;if(e.startsWith("~/"))s=I(r,e.slice(2));let u=t;if(t.startsWith("~/"))u=I(r,t.slice(2));const n=await Promise.all([l(u,{ignoreCache:o.ignoreCache}).then(a).then(O).catch(P),l(s,{ignoreCache:o.ignoreCache}).then(a).catch(P)]);return{configFile:n[0],credentialsFile:n[1]}};var T=(o)=>Object.entries(o).filter(([e])=>e.startsWith(D.IniSectionType.SSO_SESSION+c)).reduce((e,[t,r])=>({...e,[t.substring(t.indexOf(c)+1)]:r}),{});var V=()=>({}),Pe=async(o={})=>l(o.configFilepath??g()).then(a).then(T).catch(V);var A=(...o)=>{const e={};for(let t of o)for(let[r,i]of Object.entries(t))if(e[r]!==void 0)Object.assign(e[r],i);else e[r]=i;return e};var He=async(o)=>{const e=await R(o);return A(e.configFile,e.credentialsFile)};import{createHash as U} from"crypto";import{join as X} from"path";var H=(o)=>{const t=U("sha1").update(o).digest("hex");return X(f(),".aws","sso","cache",`${t}.json`)};import{promises as k} from"fs";var{readFile:M}=k,$e=async(o)=>{const e=H(o),t=await M(e,"utf8");return JSON.parse(t)};export{q as Hb,B as Ib,H as Jb,$e as Kb,c as Lb,R as Mb,Pe as Nb,He as Ob};