gemi 0.5.2 → 0.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/app/App.d.ts +1 -0
- package/dist/app/App.d.ts.map +1 -1
- package/dist/app/index.js +2 -2
- package/dist/app/index.js.map +3 -3
- package/dist/bin/index.js +16 -66
- package/dist/chunk-0q2mxfke.js +5 -0
- package/dist/chunk-0q2mxfke.js.map +64 -0
- package/dist/chunk-1qr49psp.js +4 -0
- package/dist/{chunk-0643qpn8.js.map → chunk-1qr49psp.js.map} +2 -2
- package/dist/chunk-2xa4pbxq.js +4 -0
- package/dist/{chunk-zqcc4jxj.js.map → chunk-2xa4pbxq.js.map} +2 -2
- package/dist/chunk-59v5dnya.js +20 -0
- package/dist/{chunk-259kgv1j.js.map → chunk-59v5dnya.js.map} +34 -19
- package/dist/chunk-74c59y5c.js +11 -0
- package/dist/{chunk-n76mw527.js.map → chunk-74c59y5c.js.map} +5 -5
- package/dist/{chunk-54v7tmfv.js → chunk-79cfd363.js} +2 -2
- package/dist/{chunk-54v7tmfv.js.map → chunk-79cfd363.js.map} +1 -1
- package/dist/chunk-7jhdg3q5.js +4 -0
- package/dist/chunk-7jhdg3q5.js.map +10 -0
- package/dist/chunk-7pwzsfq2.js +3 -0
- package/dist/chunk-7pwzsfq2.js.map +15 -0
- package/dist/{chunk-39ynan33.js → chunk-ampttx61.js} +2 -2
- package/dist/{chunk-39ynan33.js.map → chunk-ampttx61.js.map} +1 -1
- package/dist/chunk-bpqd0d4g.js +4 -0
- package/dist/{chunk-b5ke2zpg.js.map → chunk-bpqd0d4g.js.map} +2 -2
- package/dist/chunk-d7s659wd.js +4 -0
- package/dist/{chunk-sywb9k1q.js.map → chunk-d7s659wd.js.map} +5 -5
- package/dist/{chunk-0rvh1r84.js → chunk-gpx46fk2.js} +2 -2
- package/dist/{chunk-0rvh1r84.js.map → chunk-gpx46fk2.js.map} +1 -1
- package/dist/chunk-h65yyskz.js +4 -0
- package/dist/{chunk-ee0c21b5.js.map → chunk-h65yyskz.js.map} +5 -5
- package/dist/chunk-jjkvret2.js +4 -0
- package/dist/{chunk-e0yxdcan.js.map → chunk-jjkvret2.js.map} +4 -4
- package/dist/{chunk-5kh25wbv.js → chunk-ns0xv46h.js} +2 -2
- package/dist/{chunk-5kh25wbv.js.map → chunk-ns0xv46h.js.map} +1 -1
- package/dist/chunk-q30kam3c.js +8 -0
- package/dist/{chunk-zq31anzs.js.map → chunk-q30kam3c.js.map} +2 -2
- package/dist/chunk-qe8pzmx4.js +4 -0
- package/dist/{chunk-99tdk5x5.js.map → chunk-qe8pzmx4.js.map} +4 -4
- package/dist/{chunk-5jvxqe5r.js → chunk-qsj2vhhs.js} +2 -2
- package/dist/{chunk-5jvxqe5r.js.map → chunk-qsj2vhhs.js.map} +1 -1
- package/dist/chunk-rvge2dbd.js +3 -0
- package/dist/{chunk-6twxqxj0.js.map → chunk-rvge2dbd.js.map} +6 -6
- package/dist/chunk-s6redhaf.js +3 -0
- package/dist/{chunk-8pghf7ne.js.map → chunk-s6redhaf.js.map} +4 -4
- package/dist/{chunk-9877dbvm.js → chunk-x1ry5x7k.js} +2 -2
- package/dist/{chunk-9877dbvm.js.map → chunk-x1ry5x7k.js.map} +1 -1
- package/dist/chunk-ye2x38qd.js +4 -0
- package/dist/{chunk-nwqqr50x.js.map → chunk-ye2x38qd.js.map} +6 -6
- package/dist/chunk-zg1wzdnw.js +4 -0
- package/dist/{chunk-fskmyztg.js.map → chunk-zg1wzdnw.js.map} +4 -4
- package/dist/client/ClientRouterContext.d.ts.map +1 -1
- package/dist/client/HttpClientContext.d.ts +12 -0
- package/dist/client/HttpClientContext.d.ts.map +1 -0
- package/dist/client/QueryManagerContext.d.ts.map +1 -1
- package/dist/client/QueryResource.d.ts +3 -1
- package/dist/client/QueryResource.d.ts.map +1 -1
- package/dist/client/i18n/I18nContext.d.ts.map +1 -1
- package/dist/client/i18n/useLocale.d.ts.map +1 -1
- package/dist/client/index.d.ts +2 -1
- package/dist/client/index.d.ts.map +1 -1
- package/dist/client/index.js +202 -151
- package/dist/client/index.js.map +1 -1
- package/dist/client/init.d.ts +1 -0
- package/dist/client/init.d.ts.map +1 -1
- package/dist/client/useMutation.d.ts.map +1 -1
- package/dist/client/useNavigate.d.ts.map +1 -1
- package/dist/email/index.js +2 -2
- package/dist/email/index.js.map +1 -1
- package/dist/facades/index.js +2 -2
- package/dist/facades/index.js.map +5 -4
- package/dist/http/index.js +2 -2
- package/dist/http/index.js.map +1 -1
- package/dist/kernel/Kernel.d.ts +2 -0
- package/dist/kernel/Kernel.d.ts.map +1 -1
- package/dist/kernel/index.js +2 -2
- package/dist/kernel/index.js.map +3 -3
- package/dist/server/index.js +5 -5
- package/dist/server/index.js.map +5 -6
- package/dist/services/image-optimization/ImageOptimizationServiceContainer.d.ts +14 -0
- package/dist/services/image-optimization/ImageOptimizationServiceContainer.d.ts.map +1 -0
- package/dist/services/image-optimization/ImageOptimizationServiceProvider.d.ts +7 -0
- package/dist/services/image-optimization/ImageOptimizationServiceProvider.d.ts.map +1 -0
- package/dist/services/image-optimization/drivers/ImageOptimizationDriver.d.ts +5 -0
- package/dist/services/image-optimization/drivers/ImageOptimizationDriver.d.ts.map +1 -0
- package/dist/services/image-optimization/drivers/SharpDriver.d.ts +6 -0
- package/dist/services/image-optimization/drivers/SharpDriver.d.ts.map +1 -0
- package/dist/services/image-optimization/drivers/types.d.ts +14 -0
- package/dist/services/image-optimization/drivers/types.d.ts.map +1 -0
- package/dist/services/index.d.ts +4 -0
- package/dist/services/index.d.ts.map +1 -1
- package/dist/services/index.js +12 -3
- package/dist/services/index.js.map +23 -8
- package/dist/services/router/ApiRouterServiceContainer.d.ts.map +1 -1
- package/package.json +1 -1
- package/dist/chunk-0643qpn8.js +0 -4
- package/dist/chunk-0970v4jx.js +0 -4
- package/dist/chunk-0970v4jx.js.map +0 -10
- package/dist/chunk-259kgv1j.js +0 -18
- package/dist/chunk-6twxqxj0.js +0 -3
- package/dist/chunk-8pghf7ne.js +0 -3
- package/dist/chunk-99tdk5x5.js +0 -4
- package/dist/chunk-b5ke2zpg.js +0 -4
- package/dist/chunk-bxwnddma.js +0 -3
- package/dist/chunk-bxwnddma.js.map +0 -17
- package/dist/chunk-e0yxdcan.js +0 -4
- package/dist/chunk-ee0c21b5.js +0 -4
- package/dist/chunk-fskmyztg.js +0 -4
- package/dist/chunk-n76mw527.js +0 -11
- package/dist/chunk-nwqqr50x.js +0 -4
- package/dist/chunk-setbnv6k.js +0 -7
- package/dist/chunk-setbnv6k.js.map +0 -66
- package/dist/chunk-sywb9k1q.js +0 -4
- package/dist/chunk-zq31anzs.js +0 -8
- package/dist/chunk-zqcc4jxj.js +0 -4
package/dist/chunk-e0yxdcan.js
DELETED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{N as Xh}from"./chunk-n76mw527.js";import{$ as Q0,Aa as l0,Ba as D0,Ca as E0,O as Al,Q as Ll,R as Gl,S as Il,T as K0,U as F0,V as B0,W as U0,_ as Qh,aa as Ml,ba as zl,ca as Nl,da as Wl,ea as X0,fa as Ol,ga as gl,ha as xl,ia as il,ja as Y0,ka as Z0,ma as F,na as B,oa as $0,pa as cl,qa as el,ra as V0,sa as pl,ta as P0,ua as Gh,va as ul,wa as tl,xa as h0,ya as jl,za as al}from"./chunk-259kgv1j.js";import{Da as Uw,Ea as f}from"./chunk-6twxqxj0.js";import{Fa as S0,Ga as H0,Ha as L0,Ka as Rl,Ma as y0,Ua as K,Va as Sh,Wa as hw,_a as R0,ab as H,cb as u,fb as j0,hb as q0,ib as T,jb as a0,kb as fl,lb as Cl,mb as m0,nb as J0,ob as eh,ub as nl,vb as ol}from"./chunk-setbnv6k.js";import"./chunk-8pghf7ne.js";import"./chunk-bxwnddma.js";import"./chunk-b5ke2zpg.js";import"./chunk-0970v4jx.js";import"./chunk-54v7tmfv.js";import"./chunk-djfe1w23.js";import{Tb as A}from"./chunk-exvtvmb6.js";var C=A(Qh(),1);var dl=A(Gh(),1);var Sl=async(h,w,l)=>{return{operation:Gl(w).operation,region:await Il(h.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()}};function Ew(h){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"sts",region:h.region},propertiesExtractor:(w,l)=>({signingProperties:{config:w,context:l}})}}function wl(h){return{schemeId:"smithy.api#noAuth"}}var Hl=(h)=>{let w=[];switch(h.operation){case"AssumeRoleWithSAML":{w.push(wl(h));break}case"AssumeRoleWithWebIdentity":{w.push(wl(h));break}default:w.push(Ew(h))}return w},kw=(h)=>({...h,stsClientCtor:L}),ml=(h)=>{let w=kw(h);return{...dl.resolveAwsSdkSigV4Config(w)}};var Jl=(h)=>{return{...h,useDualstackEndpoint:h.useDualstackEndpoint??!1,useFipsEndpoint:h.useFipsEndpoint??!1,useGlobalEndpoint:h.useGlobalEndpoint??!1,defaultSigningName:"sts"}},D={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 Ih=A(Gh(),1);var w0=A(Qh(),1);var sl=A(Gh(),1),rl=A(Qh(),1);var _l=A(Uw(),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"},E={url:"https://sts.amazonaws.com",properties:{authSchemes:[{name:"sigv4",signingName:"sts",signingRegion:"us-east-1"}]},headers:{}},Y={},Fl={conditions:[{["fn"]:"stringEquals",["argv"]:[J,"aws-global"]}],["endpoint"]:E,["type"]:"endpoint"},Vl={["fn"]:"booleanEquals",["argv"]:[Zl,!0]},Pl={["fn"]:"booleanEquals",["argv"]:[$l,!0]},Bl={["fn"]:"getAttr",["argv"]:[{["ref"]:"PartitionResult"},"supportsFIPS"]},ql={["ref"]:"PartitionResult"},Ul={["fn"]:"booleanEquals",["argv"]:[!0,{["fn"]:"getAttr",["argv"]:[ql,"supportsDualStack"]}]},yl=[{["fn"]:"isSet",["argv"]:[Yl]}],Ql=[Vl],Xl=[Pl],Fw={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:E,["type"]:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[J,"ap-south-1"]}],endpoint:E,["type"]:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[J,"ap-southeast-1"]}],endpoint:E,["type"]:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[J,"ap-southeast-2"]}],endpoint:E,["type"]:"endpoint"},Fl,{conditions:[{["fn"]:"stringEquals",["argv"]:[J,"ca-central-1"]}],endpoint:E,["type"]:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[J,"eu-central-1"]}],endpoint:E,["type"]:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[J,"eu-north-1"]}],endpoint:E,["type"]:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[J,"eu-west-1"]}],endpoint:E,["type"]:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[J,"eu-west-2"]}],endpoint:E,["type"]:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[J,"eu-west-3"]}],endpoint:E,["type"]:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[J,"sa-east-1"]}],endpoint:E,["type"]:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[J,"us-east-1"]}],endpoint:E,["type"]:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[J,"us-east-2"]}],endpoint:E,["type"]:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[J,"us-west-1"]}],endpoint:E,["type"]:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[J,"us-west-2"]}],endpoint:E,["type"]:"endpoint"},{endpoint:{url:"https://sts.{Region}.{PartitionResult#dnsSuffix}",properties:{authSchemes:[{name:"sigv4",signingName:"sts",signingRegion:"{Region}"}]},headers:Y},["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:Y,headers:Y},["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:Y,headers:Y},["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"]:[ql,"name"]},"aws-us-gov"]}],endpoint:{url:"https://sts.{Region}.amazonaws.com",properties:Y,headers:Y},["type"]:"endpoint"},{endpoint:{url:"https://sts-fips.{Region}.{PartitionResult#dnsSuffix}",properties:Y,headers:Y},["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:Y,headers:Y},["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:Y,headers:Y},["type"]:"endpoint"}],["type"]:"tree"}],["type"]:"tree"},{error:"Invalid Configuration: Missing Region",["type"]:"error"}]},vl=Fw;var Bw=new Ml({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS","UseGlobalEndpoint"]}),Tl=(h,w={})=>{return Bw.get(h,()=>Nl(vl,{endpointParams:h,logger:w.logger}))};zl.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)=>{Cl(process.version);let w=l0(h),l=()=>w().then(fl),G=bl(h);return Ih.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:(I)=>I.getIdentityProvider("aws.auth#sigv4")||(async(S)=>await Xh(S?.__config||{})()),signer:new Ih.AwsSdkSigV4Signer},{schemeId:"smithy.api#noAuth",identityProvider:(I)=>I.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new w0.NoAuthSigner}],maxAttempts:h?.maxAttempts??f(el),region:h?.region??f(xl,il),requestHandler:nl.create(h?.requestHandler??l),retryMode:h?.retryMode??f({...pl,default:async()=>(await l()).retryMode||cl}),sha256:h?.sha256??tl.bind(null,"sha256"),streamCollector:h?.streamCollector??ol,useDualstackEndpoint:h?.useDualstackEndpoint??f(Ol),useFipsEndpoint:h?.useFipsEndpoint??f(gl)}};var I0=(h)=>{let{httpAuthSchemes:w,httpAuthSchemeProvider:l,credentials:G}=h;return{setHttpAuthScheme(I){let S=w.findIndex((d)=>d.schemeId===I.schemeId);if(S===-1)w.push(I);else w.splice(S,1,I)},httpAuthSchemes(){return w},setHttpAuthSchemeProvider(I){l=I},httpAuthSchemeProvider(){return l},setCredentials(I){G=I},credentials(){return G}}},d0=(h)=>{return{httpAuthSchemes:h.httpAuthSchemes(),httpAuthSchemeProvider:h.httpAuthSchemeProvider(),credentials:h.credentials()}};var dh=(h)=>h,k0=(h,w)=>{let l={...dh(D0(h)),...dh(m0(h)),...dh(S0(h)),...dh(I0(h))};return w.forEach((G)=>G.configure(l)),{...h,...E0(l),...J0(l),...H0(l),...d0(l)}};class L extends y0{constructor(...[h]){let w=G0(h||{}),l=Jl(w),G=Q0(l),I=V0(G),S=Y0(I),d=K0(S),X=$0(d),M=ml(X),q=k0(M,h?.extensions||[]);super(q);this.config=q,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()}}class Q extends q0{constructor(h){super(h);Object.setPrototypeOf(this,Q.prototype)}}class Hh extends Q{constructor(h){super({name:"ExpiredTokenException",$fault:"client",...h});this.name="ExpiredTokenException",this.$fault="client",Object.setPrototypeOf(this,Hh.prototype)}}class mh extends Q{constructor(h){super({name:"MalformedPolicyDocumentException",$fault:"client",...h});this.name="MalformedPolicyDocumentException",this.$fault="client",Object.setPrototypeOf(this,mh.prototype)}}class Jh extends Q{constructor(h){super({name:"PackedPolicyTooLargeException",$fault:"client",...h});this.name="PackedPolicyTooLargeException",this.$fault="client",Object.setPrototypeOf(this,Jh.prototype)}}class Dh extends Q{constructor(h){super({name:"RegionDisabledException",$fault:"client",...h});this.name="RegionDisabledException",this.$fault="client",Object.setPrototypeOf(this,Dh.prototype)}}class Eh extends Q{constructor(h){super({name:"IDPRejectedClaimException",$fault:"client",...h});this.name="IDPRejectedClaimException",this.$fault="client",Object.setPrototypeOf(this,Eh.prototype)}}class kh extends Q{constructor(h){super({name:"InvalidIdentityTokenException",$fault:"client",...h});this.name="InvalidIdentityTokenException",this.$fault="client",Object.setPrototypeOf(this,kh.prototype)}}class Kh extends Q{constructor(h){super({name:"IDPCommunicationErrorException",$fault:"client",...h});this.name="IDPCommunicationErrorException",this.$fault="client",Object.setPrototypeOf(this,Kh.prototype)}}class Fh extends Q{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}}),v0=(h)=>({...h,...h.Credentials&&{Credentials:o(h.Credentials)}}),M0=(h)=>({...h,...h.SAMLAssertion&&{SAMLAssertion:Sh}}),z0=(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 v=A(Gh(),1);var s0=async(h,w)=>{let l=a,G;return G=b({...qw(h,w),[r]:wG,[_]:s}),j(w,l,"/",void 0,G)},r0=async(h,w)=>{let l=a,G;return G=b({...vw(h,w),[r]:GG,[_]:s}),j(w,l,"/",void 0,G)},_0=async(h,w)=>{let l=a,G;return G=b({...Mw(h,w),[r]:IG,[_]:s}),j(w,l,"/",void 0,G)},b0=async(h,w)=>{let l=a,G;return G=b({...zw(h,w),[r]:dG,[_]:s}),j(w,l,"/",void 0,G)},f0=async(h,w)=>{let l=a,G;return G=b({...Nw(h,w),[r]:SG,[_]:s}),j(w,l,"/",void 0,G)},C0=async(h,w)=>{let l=a,G;return G=b({...Ww(h,w),[r]:HG,[_]:s}),j(w,l,"/",void 0,G)},O0=async(h,w)=>{let l=a,G;return G=b({...Tw(h,w),[r]:mG,[_]:s}),j(w,l,"/",void 0,G)},g0=async(h,w)=>{let l=a,G;return G=b({...Aw(h,w),[r]:JG,[_]:s}),j(w,l,"/",void 0,G)},x0=async(h,w)=>{if(h.statusCode>=300)return R(h,w);let l=await v.parseXmlBody(h.body,w),G={};return G=rw(l.AssumeRoleResult,w),{$metadata:k(h),...G}},i0=async(h,w)=>{if(h.statusCode>=300)return R(h,w);let l=await v.parseXmlBody(h.body,w),G={};return G=_w(l.AssumeRoleWithSAMLResult,w),{$metadata:k(h),...G}},c0=async(h,w)=>{if(h.statusCode>=300)return R(h,w);let l=await v.parseXmlBody(h.body,w),G={};return G=bw(l.AssumeRoleWithWebIdentityResult,w),{$metadata:k(h),...G}},e0=async(h,w)=>{if(h.statusCode>=300)return R(h,w);let l=await v.parseXmlBody(h.body,w),G={};return G=fw(l.DecodeAuthorizationMessageResult,w),{$metadata:k(h),...G}},p0=async(h,w)=>{if(h.statusCode>=300)return R(h,w);let l=await v.parseXmlBody(h.body,w),G={};return G=gw(l.GetAccessKeyInfoResult,w),{$metadata:k(h),...G}},n0=async(h,w)=>{if(h.statusCode>=300)return R(h,w);let l=await v.parseXmlBody(h.body,w),G={};return G=xw(l.GetCallerIdentityResult,w),{$metadata:k(h),...G}},o0=async(h,w)=>{if(h.statusCode>=300)return R(h,w);let l=await v.parseXmlBody(h.body,w),G={};return G=iw(l.GetFederationTokenResult,w),{$metadata:k(h),...G}},u0=async(h,w)=>{if(h.statusCode>=300)return R(h,w);let l=await v.parseXmlBody(h.body,w),G={};return G=cw(l.GetSessionTokenResult,w),{$metadata:k(h),...G}},R=async(h,w)=>{let l={...h,body:await v.parseXmlErrorBody(h.body,w)},G=DG(h,l.body);switch(G){case"ExpiredTokenException":case"com.amazonaws.sts#ExpiredTokenException":throw await yw(l,w);case"MalformedPolicyDocument":case"com.amazonaws.sts#MalformedPolicyDocumentException":throw await $w(l,w);case"PackedPolicyTooLarge":case"com.amazonaws.sts#PackedPolicyTooLargeException":throw await Vw(l,w);case"RegionDisabledException":case"com.amazonaws.sts#RegionDisabledException":throw await Pw(l,w);case"IDPRejectedClaim":case"com.amazonaws.sts#IDPRejectedClaimException":throw await Xw(l,w);case"InvalidIdentityToken":case"com.amazonaws.sts#InvalidIdentityTokenException":throw await Zw(l,w);case"IDPCommunicationError":case"com.amazonaws.sts#IDPCommunicationErrorException":throw await Qw(l,w);case"InvalidAuthorizationMessageException":case"com.amazonaws.sts#InvalidAuthorizationMessageException":throw await Yw(l,w);default:let I=l.body;return lG({output:h,parsedBody:I.Error,errorCode:G})}},yw=async(h,w)=>{let l=h.body,G=Cw(l.Error,w),I=new Hh({$metadata:k(h),...G});return T(I,l)},Qw=async(h,w)=>{let l=h.body,G=ew(l.Error,w),I=new Kh({$metadata:k(h),...G});return T(I,l)},Xw=async(h,w)=>{let l=h.body,G=pw(l.Error,w),I=new Eh({$metadata:k(h),...G});return T(I,l)},Yw=async(h,w)=>{let l=h.body,G=nw(l.Error,w),I=new Fh({$metadata:k(h),...G});return T(I,l)},Zw=async(h,w)=>{let l=h.body,G=ow(l.Error,w),I=new kh({$metadata:k(h),...G});return T(I,l)},$w=async(h,w)=>{let l=h.body,G=uw(l.Error,w),I=new mh({$metadata:k(h),...G});return T(I,l)},Vw=async(h,w)=>{let l=h.body,G=tw(l.Error,w),I=new Jh({$metadata:k(h),...G});return T(I,l)},Pw=async(h,w)=>{let l=h.body,G=hG(l.Error,w),I=new Dh({$metadata:k(h),...G});return T(I,l)},qw=(h,w)=>{let l={};if(h[W]!=null)l[W]=h[W];if(h[i]!=null)l[i]=h[i];if(h[$]!=null){let G=Bh(h[$],w);if(h[$]?.length===0)l.PolicyArns=[];Object.entries(G).forEach(([I,S])=>{let d=`PolicyArns.${I}`;l[d]=S})}if(h[Z]!=null)l[Z]=h[Z];if(h[y]!=null)l[y]=h[y];if(h[e]!=null){let G=t0(h[e],w);if(h[e]?.length===0)l.Tags=[];Object.entries(G).forEach(([I,S])=>{let d=`Tags.${I}`;l[d]=S})}if(h[Oh]!=null){let G=sw(h[Oh],w);if(h[Oh]?.length===0)l.TransitiveTagKeys=[];Object.entries(G).forEach(([I,S])=>{let d=`TransitiveTagKeys.${I}`;l[d]=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){let G=jw(h[Rh],w);if(h[Rh]?.length===0)l.ProvidedContexts=[];Object.entries(G).forEach(([I,S])=>{let d=`ProvidedContexts.${I}`;l[d]=S})}return l},vw=(h,w)=>{let 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){let G=Bh(h[$],w);if(h[$]?.length===0)l.PolicyArns=[];Object.entries(G).forEach(([I,S])=>{let d=`PolicyArns.${I}`;l[d]=S})}if(h[Z]!=null)l[Z]=h[Z];if(h[y]!=null)l[y]=h[y];return l},Mw=(h,w)=>{let 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){let G=Bh(h[$],w);if(h[$]?.length===0)l.PolicyArns=[];Object.entries(G).forEach(([I,S])=>{let d=`PolicyArns.${I}`;l[d]=S})}if(h[Z]!=null)l[Z]=h[Z];if(h[y]!=null)l[y]=h[y];return l},zw=(h,w)=>{let l={};if(h[qh]!=null)l[qh]=h[qh];return l},Nw=(h,w)=>{let l={};if(h[O]!=null)l[O]=h[O];return l},Ww=(h,w)=>{return{}},Tw=(h,w)=>{let l={};if(h[Wh]!=null)l[Wh]=h[Wh];if(h[Z]!=null)l[Z]=h[Z];if(h[$]!=null){let G=Bh(h[$],w);if(h[$]?.length===0)l.PolicyArns=[];Object.entries(G).forEach(([I,S])=>{let d=`PolicyArns.${I}`;l[d]=S})}if(h[y]!=null)l[y]=h[y];if(h[e]!=null){let G=t0(h[e],w);if(h[e]?.length===0)l.Tags=[];Object.entries(G).forEach(([I,S])=>{let d=`Tags.${I}`;l[d]=S})}return l},Aw=(h,w)=>{let 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)=>{let l={},G=1;for(let I of h){if(I===null)continue;let S=Lw(I,w);Object.entries(S).forEach(([d,X])=>{l[`member.${G}.${d}`]=X}),G++}return l},Lw=(h,w)=>{let l={};if(h[ch]!=null)l[ch]=h[ch];return l},Rw=(h,w)=>{let l={};if(h[Lh]!=null)l[Lh]=h[Lh];if(h[Zh]!=null)l[Zh]=h[Zh];return l},jw=(h,w)=>{let l={},G=1;for(let I of h){if(I===null)continue;let S=Rw(I,w);Object.entries(S).forEach(([d,X])=>{l[`member.${G}.${d}`]=X}),G++}return l},aw=(h,w)=>{let l={};if(h[Nh]!=null)l[Nh]=h[Nh];if(h[xh]!=null)l[xh]=h[xh];return l},sw=(h,w)=>{let l={},G=1;for(let I of h){if(I===null)continue;l[`member.${G}`]=I,G++}return l},t0=(h,w)=>{let l={},G=1;for(let I of h){if(I===null)continue;let S=aw(I,w);Object.entries(S).forEach(([d,X])=>{l[`member.${G}.${d}`]=X}),G++}return l},ph=(h,w)=>{let l={};if(h[Yh]!=null)l[Yh]=H(h[Yh]);if(h[N]!=null)l[N]=H(h[N]);return l},rw=(h,w)=>{let l={};if(h[U]!=null)l[U]=t(h[U],w);if(h[z]!=null)l[z]=ph(h[z],w);if(h[V]!=null)l[V]=u(h[V]);if(h[P]!=null)l[P]=H(h[P]);return l},_w=(h,w)=>{let l={};if(h[U]!=null)l[U]=t(h[U],w);if(h[z]!=null)l[z]=ph(h[z],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[zh]!=null)l[zh]=H(h[zh]);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},bw=(h,w)=>{let l={};if(h[U]!=null)l[U]=t(h[U],w);if(h[bh]!=null)l[bh]=H(h[bh]);if(h[z]!=null)l[z]=ph(h[z],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)=>{let 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},fw=(h,w)=>{let l={};if(h[$h]!=null)l[$h]=H(h[$h]);return l},Cw=(h,w)=>{let l={};if(h[m]!=null)l[m]=H(h[m]);return l},Ow=(h,w)=>{let l={};if(h[Mh]!=null)l[Mh]=H(h[Mh]);if(h[N]!=null)l[N]=H(h[N]);return l},gw=(h,w)=>{let l={};if(h[g]!=null)l[g]=H(h[g]);return l},xw=(h,w)=>{let 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},iw=(h,w)=>{let l={};if(h[U]!=null)l[U]=t(h[U],w);if(h[vh]!=null)l[vh]=Ow(h[vh],w);if(h[V]!=null)l[V]=u(h[V]);return l},cw=(h,w)=>{let l={};if(h[U]!=null)l[U]=t(h[U],w);return l},ew=(h,w)=>{let l={};if(h[m]!=null)l[m]=H(h[m]);return l},pw=(h,w)=>{let l={};if(h[m]!=null)l[m]=H(h[m]);return l},nw=(h,w)=>{let l={};if(h[m]!=null)l[m]=H(h[m]);return l},ow=(h,w)=>{let l={};if(h[m]!=null)l[m]=H(h[m]);return l},uw=(h,w)=>{let l={};if(h[m]!=null)l[m]=H(h[m]);return l},tw=(h,w)=>{let l={};if(h[m]!=null)l[m]=H(h[m]);return l},hG=(h,w)=>{let 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 lG=a0(Q),j=async(h,w,l,G,I)=>{let{hostname:S,protocol:d="https",port:X,path:M}=await h.endpoint(),q={protocol:d,hostname:S,port:X,method:"POST",path:M.endsWith("/")?M.slice(0,-1)+l:M+l,headers:w};if(G!==void 0)q.hostname=G;if(I!==void 0)q.body=I;return new L0(q)},a={"content-type":"application/x-www-form-urlencoded"},s="2011-06-15",r="Action",O="AccessKeyId",wG="AssumeRole",Yh="AssumedRoleId",z="AssumedRoleUser",GG="AssumeRoleWithSAML",IG="AssumeRoleWithWebIdentity",g="Account",N="Arn",x="Audience",U="Credentials",Zh="ContextAssertion",dG="DecodeAuthorizationMessage",$h="DecodedMessage",y="DurationSeconds",Vh="Expiration",Ph="ExternalId",qh="EncodedMessage",vh="FederatedUser",Mh="FederatedUserId",SG="GetAccessKeyInfo",HG="GetCallerIdentity",mG="GetFederationToken",JG="GetSessionToken",zh="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",_="Version",xh="Value",ih="WebIdentityToken",ch="arn",m="message",b=(h)=>Object.entries(h).map(([w,l])=>eh(w)+"="+eh(l)).join("&"),DG=(h,w)=>{if(w.Error?.Code!==void 0)return w.Error.Code;if(h.statusCode==404)return"NotFound"};class hh extends K.classBuilder().ep(D).m(function(h,w,l,G){return[F(l,this.serialize,this.deserialize),B(l,h.getEndpointParameterInstructions())]}).s("AWSSecurityTokenServiceV20110615","AssumeRole",{}).n("STSClient","AssumeRoleCommand").f(void 0,v0).ser(s0).de(x0).build(){}class nh extends K.classBuilder().ep(D).m(function(h,w,l,G){return[F(l,this.serialize,this.deserialize),B(l,h.getEndpointParameterInstructions())]}).s("AWSSecurityTokenServiceV20110615","AssumeRoleWithSAML",{}).n("STSClient","AssumeRoleWithSAMLCommand").f(M0,z0).ser(r0).de(i0).build(){}class lh extends K.classBuilder().ep(D).m(function(h,w,l,G){return[F(l,this.serialize,this.deserialize),B(l,h.getEndpointParameterInstructions())]}).s("AWSSecurityTokenServiceV20110615","AssumeRoleWithWebIdentity",{}).n("STSClient","AssumeRoleWithWebIdentityCommand").f(N0,W0).ser(_0).de(c0).build(){}class oh extends K.classBuilder().ep(D).m(function(h,w,l,G){return[F(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(){}class uh extends K.classBuilder().ep(D).m(function(h,w,l,G){return[F(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(){}class th extends K.classBuilder().ep(D).m(function(h,w,l,G){return[F(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(){}class hl extends K.classBuilder().ep(D).m(function(h,w,l,G){return[F(l,this.serialize,this.deserialize),B(l,h.getEndpointParameterInstructions())]}).s("AWSSecurityTokenServiceV20110615","GetFederationToken",{}).n("STSClient","GetFederationTokenCommand").f(void 0,T0).ser(O0).de(o0).build(){}class ll extends K.classBuilder().ep(D).m(function(h,w,l,G){return[F(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 EG={AssumeRoleCommand:hh,AssumeRoleWithSAMLCommand:nh,AssumeRoleWithWebIdentityCommand:lh,DecodeAuthorizationMessageCommand:oh,GetAccessKeyInfoCommand:uh,GetCallerIdentityCommand:th,GetFederationTokenCommand:hl,GetSessionTokenCommand:ll};class lw extends L{}hw(EG,lw);var ww="us-east-1",Gw=(h)=>{if(typeof h?.Arn==="string"){let w=h.Arn.split(":");if(w.length>4&&w[4]!=="")return w[4]}return},Iw=async(h,w,l)=>{let G=typeof h==="function"?await h():h,I=typeof w==="function"?await w():w;return l?.debug?.("@aws-sdk/client-sts::resolveRegion","accepting first of:",`${G} (provider)`,`${I} (parent client)`,`${ww} (STS default)`),G??I??ww},dw=(h,w)=>{let l,G;return async(I,S)=>{if(G=I,!l){let{logger:q=h?.parentClientConfig?.logger,region:n,requestHandler:wh=h?.parentClientConfig?.requestHandler,credentialProviderLogger:Uh}=h,Jw=await Iw(n,h?.parentClientConfig?.region,Uh),Dw=!Hw(wh);l=new w({credentialDefaultProvider:()=>async()=>G,region:Jw,requestHandler:Dw?wh:void 0,logger:q})}let{Credentials:d,AssumedRoleUser:X}=await l.send(new hh(S));if(!d||!d.AccessKeyId||!d.SecretAccessKey)throw new Error(`Invalid response from STS.assumeRole call with role ${S.RoleArn}`);let M=Gw(X);return{accessKeyId:d.AccessKeyId,secretAccessKey:d.SecretAccessKey,sessionToken:d.SessionToken,expiration:d.Expiration,...d.CredentialScope&&{credentialScope:d.CredentialScope},...M&&{accountId:M}}}},Sw=(h,w)=>{let l;return async(G)=>{if(!l){let{logger:X=h?.parentClientConfig?.logger,region:M,requestHandler:q=h?.parentClientConfig?.requestHandler,credentialProviderLogger:n}=h,wh=await Iw(M,h?.parentClientConfig?.region,n),Uh=!Hw(q);l=new w({region:wh,requestHandler:Uh?q:void 0,logger:X})}let{Credentials:I,AssumedRoleUser:S}=await l.send(new lh(G));if(!I||!I.AccessKeyId||!I.SecretAccessKey)throw new Error(`Invalid response from STS.assumeRoleWithWebIdentity call with role ${G.RoleArn}`);let d=Gw(S);return{accessKeyId:I.AccessKeyId,secretAccessKey:I.SecretAccessKey,sessionToken:I.SessionToken,expiration:I.Expiration,...I.CredentialScope&&{credentialScope:I.CredentialScope},...d&&{accountId:d}}}};var Hw=(h)=>{return h?.metadata?.handlerProtocol==="h2"};var mw=(h,w)=>{if(!w)return h;else return class l extends h{constructor(G){super(G);for(let I of w)this.middlewareStack.use(I)}}},kG=(h={},w)=>dw(h,mw(L,w)),KG=(h={},w)=>Sw(h,mw(L,w)),sd=(h)=>(w)=>h({roleAssumer:kG(w),roleAssumerWithWebIdentity:KG(w),...w});export{KG as getDefaultRoleAssumerWithWebIdentity,kG as getDefaultRoleAssumer,sd as decorateDefaultCredentialProvider,y0 as __Client,Q as STSServiceException,L as STSClient,lw 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,z0 as AssumeRoleWithSAMLResponseFilterSensitiveLog,M0 as AssumeRoleWithSAMLRequestFilterSensitiveLog,nh as AssumeRoleWithSAMLCommand,v0 as AssumeRoleResponseFilterSensitiveLog,hh as AssumeRoleCommand,K as $Command};
|
|
3
|
-
|
|
4
|
-
//# debugId=E958C9E4870E86B364756E2164756E21
|
package/dist/chunk-ee0c21b5.js
DELETED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{Db as E,xb as j}from"./chunk-8pghf7ne.js";import"./chunk-bxwnddma.js";import{Lb as D}from"./chunk-0970v4jx.js";import{Tb as I}from"./chunk-exvtvmb6.js";var Z=I(D(),1);var $=I(D(),1);var K=I(D(),1),A=(y,c,_)=>{let b={EcsContainer:async(x)=>{let{fromHttp:w}=await import("./chunk-zq31anzs.js"),{fromContainerMetadata:C}=await import("./chunk-sywb9k1q.js");return _?.debug("@aws-sdk/credential-provider-ini - credential_source is EcsContainer"),K.chain(w(x??{}),C(x))},Ec2InstanceMetadata:async(x)=>{_?.debug("@aws-sdk/credential-provider-ini - credential_source is Ec2InstanceMetadata");let{fromInstanceMetadata:w}=await import("./chunk-sywb9k1q.js");return w(x)},Environment:async(x)=>{_?.debug("@aws-sdk/credential-provider-ini - credential_source is Environment");let{fromEnv:w}=await import("./chunk-b5ke2zpg.js");return w(x)}};if(y in b)return b[y];else throw new K.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:_})=>{let 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:_})=>{let 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)");let x=c[y];if(!_.roleAssumer){let{getDefaultRoleAssumer:k}=await import("./chunk-e0yxdcan.js");_.roleAssumer=k({..._.clientConfig,credentialProviderLogger:_.logger,parentClientConfig:_?.parentClientConfig},_.clientPlugins)}let{source_profile:w}=x;if(w&&w in b)throw new $.CredentialsProviderError(`Detected a cycle attempting to resolve credentials for profile ${j(_)}. 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}]`}`);let C=w?O(w,c,_,{...b,[w]:!0},G(c[w]??{})):(await A(x.credential_source,y,_.logger)(_))();if(G(x))return C;else{let k={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:B}=x;if(B){if(!_.mfaCodeProvider)throw new $.CredentialsProviderError(`Profile ${y} requires multi-factor authentication, but no MFA code callback was provided.`,{logger:_.logger,tryNextLink:!1});k.SerialNumber=B,k.TokenCode=await _.mfaCodeProvider(B)}let F=await C;return _.roleAssumer(F,k)}},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-zqcc4jxj.js").then(({fromProcess:_})=>_({...y,profile:c})());var V=async(y,c={})=>{let{fromSSO:_}=await import("./chunk-nwqqr50x.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-0643qpn8.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 O=async(y,c,_,b={},x=!1)=>{let 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");let c=await E(y);return O(j(y),c,y)};export{a as fromIni};
|
|
3
|
-
|
|
4
|
-
//# debugId=8B00C93F5C0F78BE64756E2164756E21
|
package/dist/chunk-fskmyztg.js
DELETED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{N as ge}from"./chunk-n76mw527.js";import{$ as ar,Aa as _e,Ba as lr,Ca as hr,O as je,Q as Fe,R as ee,S as re,T as or,U as dr,V as cr,W as yr,_ as H,aa as Ie,ba as Re,ca as Pe,da as Te,ea as mr,fa as fe,ga as Ae,ha as Ke,ia as Me,ja as wr,ka as kr,ma as S,na as $,oa as vr,pa as Be,qa as Le,ra as Er,sa as Qe,ta as Sr,ua as U,va as Ze,wa as He,xa as Ne,ya as Ue,za as qe}from"./chunk-259kgv1j.js";import{Da as Yr,Ea as R}from"./chunk-6twxqxj0.js";import{$a as F,Fa as er,Ga as rr,Ka as De,Ma as tr,Ua as E,Va as t,Wa as Wr,Ya as _,Za as b,_a as j,ab as h,hb as $r,ib as a,jb as Fr,kb as Ve,lb as We,mb as sr,nb as ir,qb as c,rb as o,tb as I,ub as Xe,vb as Ye}from"./chunk-setbnv6k.js";import"./chunk-8pghf7ne.js";import"./chunk-bxwnddma.js";import"./chunk-b5ke2zpg.js";import"./chunk-0970v4jx.js";import"./chunk-54v7tmfv.js";import"./chunk-djfe1w23.js";import{Tb as k}from"./chunk-exvtvmb6.js";var P=k(H(),1);var se=k(U(),1);var 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`")})()}};function Br(e){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"sso-oauth",region:e.region},propertiesExtractor:(s,r)=>({signingProperties:{config:s,context:r}})}}function Z(e){return{schemeId:"smithy.api#noAuth"}}var le=(e)=>{let 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(Br(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=k(U(),1);var xe=k(U(),1),ze=k(H(),1);var Ge=k(Yr(),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]},m={},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"}],Qr={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:m,headers:m},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:m,headers:m},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:m,headers:m},type:"endpoint"},{endpoint:{url:"https://oidc-fips.{Region}.{PartitionResult#dnsSuffix}",properties:m,headers:m},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:m,headers:m},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:m,headers:m},type:"endpoint"}],type:"tree"}],type:"tree"},{error:"Invalid Configuration: Missing Region",type:"error"}]},$e=Qr;var Xr=new Ie({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS"]}),be=(e,s={})=>{return Xr.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)=>{We(process.version);let s=_e(e),r=()=>s().then(Ve),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??R(Le),region:e?.region??R(Ke,Me),requestHandler:Xe.create(e?.requestHandler??r),retryMode:e?.retryMode??R({...Qe,default:async()=>(await r()).retryMode||Be}),sha256:e?.sha256??He.bind(null,"sha256"),streamCollector:e?.streamCollector??Ye,useDualstackEndpoint:e?.useDualstackEndpoint??R(fe),useFipsEndpoint:e?.useFipsEndpoint??R(Ae)}};var Oe=(e)=>{let{httpAuthSchemes:s,httpAuthSchemeProvider:r,credentials:i}=e;return{setHttpAuthScheme(l){let n=s.findIndex((T)=>T.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 q=(e)=>e,nr=(e,s)=>{let r={...q(lr(e)),...q(sr(e)),...q(er(e)),...q(Oe(e))};return s.forEach((i)=>i.configure(r)),{...e,...hr(r),...ir(r),...rr(r),...ue(r)}};class N extends tr{constructor(...[e]){let s=Ce(e||{}),r=ne(s),i=ar(r),l=Er(i),n=wr(l),T=or(n),Ar=vr(T),Kr=he(Ar),u=nr(Kr,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(P.getHttpAuthSchemeEndpointRuleSetPlugin(this.config,{httpAuthSchemeParametersProvider:ie,identityProviderConfigProvider:async(Mr)=>new P.DefaultIdentityProviderConfig({"aws.auth#sigv4":Mr.credentials})})),this.middlewareStack.use(P.getHttpSigningPlugin(this.config))}destroy(){super.destroy()}}class d extends $r{constructor(e){super(e);Object.setPrototypeOf(this,d.prototype)}}class x extends d{constructor(e){super({name:"AccessDeniedException",$fault:"client",...e});this.name="AccessDeniedException",this.$fault="client",Object.setPrototypeOf(this,x.prototype),this.error=e.error,this.error_description=e.error_description}}class z extends d{constructor(e){super({name:"AuthorizationPendingException",$fault:"client",...e});this.name="AuthorizationPendingException",this.$fault="client",Object.setPrototypeOf(this,z.prototype),this.error=e.error,this.error_description=e.error_description}}class G extends d{constructor(e){super({name:"ExpiredTokenException",$fault:"client",...e});this.name="ExpiredTokenException",this.$fault="client",Object.setPrototypeOf(this,G.prototype),this.error=e.error,this.error_description=e.error_description}}class J extends d{constructor(e){super({name:"InternalServerException",$fault:"server",...e});this.name="InternalServerException",this.$fault="server",Object.setPrototypeOf(this,J.prototype),this.error=e.error,this.error_description=e.error_description}}class V extends d{constructor(e){super({name:"InvalidClientException",$fault:"client",...e});this.name="InvalidClientException",this.$fault="client",Object.setPrototypeOf(this,V.prototype),this.error=e.error,this.error_description=e.error_description}}class W extends d{constructor(e){super({name:"InvalidGrantException",$fault:"client",...e});this.name="InvalidGrantException",this.$fault="client",Object.setPrototypeOf(this,W.prototype),this.error=e.error,this.error_description=e.error_description}}class f extends d{constructor(e){super({name:"InvalidRequestException",$fault:"client",...e});this.name="InvalidRequestException",this.$fault="client",Object.setPrototypeOf(this,f.prototype),this.error=e.error,this.error_description=e.error_description}}class A extends d{constructor(e){super({name:"InvalidScopeException",$fault:"client",...e});this.name="InvalidScopeException",this.$fault="client",Object.setPrototypeOf(this,A.prototype),this.error=e.error,this.error_description=e.error_description}}class K extends d{constructor(e){super({name:"SlowDownException",$fault:"client",...e});this.name="SlowDownException",this.$fault="client",Object.setPrototypeOf(this,K.prototype),this.error=e.error,this.error_description=e.error_description}}class M extends d{constructor(e){super({name:"UnauthorizedClientException",$fault:"client",...e});this.name="UnauthorizedClientException",this.$fault="client",Object.setPrototypeOf(this,M.prototype),this.error=e.error,this.error_description=e.error_description}}class B extends d{constructor(e){super({name:"UnsupportedGrantTypeException",$fault:"client",...e});this.name="UnsupportedGrantTypeException",this.$fault="client",Object.setPrototypeOf(this,B.prototype),this.error=e.error,this.error_description=e.error_description}}class L extends d{constructor(e){super({name:"InvalidRequestRegionException",$fault:"client",...e});this.name="InvalidRequestRegionException",this.$fault="client",Object.setPrototypeOf(this,L.prototype),this.error=e.error,this.error_description=e.error_description,this.endpoint=e.endpoint,this.region=e.region}}class Q extends d{constructor(e){super({name:"InvalidClientMetadataException",$fault:"client",...e});this.name="InvalidClientMetadataException",this.$fault="client",Object.setPrototypeOf(this,Q.prototype),this.error=e.error,this.error_description=e.error_description}}class X extends d{constructor(e){super({name:"InvalidRedirectUriException",$fault:"client",...e});this.name="InvalidRedirectUriException",this.$fault="client",Object.setPrototypeOf(this,X.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 w=k(U(),1),D=k(H(),1);var Dr=async(e,s)=>{let r=D.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)=>I(n)})),r.m("POST").h(i).b(l),r.build()},Ur=async(e,s)=>{let r=D.requestBuilder(e,s),i={"content-type":"application/json"};r.bp("/token");let l=c({[ns]:[,"t"]}),n;return n=JSON.stringify(o(e,{assertion:[],clientId:[],code:[],codeVerifier:[],grantType:[],redirectUri:[],refreshToken:[],requestedTokenType:[],scope:(T)=>I(T),subjectToken:[],subjectTokenType:[]})),r.m("POST").h(i).q(l).b(n),r.build()},qr=async(e,s)=>{let r=D.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)=>I(n),issuerUrl:[],redirectUris:(n)=>I(n),scopes:(n)=>I(n)})),r.m("POST").h(i).b(l),r.build()},xr=async(e,s)=>{let r=D.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 Y(e,s);let r=c({$metadata:y(e)}),i=j(F(await w.parseJsonBody(e.body,s)),"body"),l=o(i,{accessToken:h,expiresIn:b,idToken:h,refreshToken:h,tokenType:h});return Object.assign(r,l),r},Gr=async(e,s)=>{if(e.statusCode!==200&&e.statusCode>=300)return Y(e,s);let r=c({$metadata:y(e)}),i=j(F(await w.parseJsonBody(e.body,s)),"body"),l=o(i,{accessToken:h,expiresIn:b,idToken:h,issuedTokenType:h,refreshToken:h,scope:I,tokenType:h});return Object.assign(r,l),r},Jr=async(e,s)=>{if(e.statusCode!==200&&e.statusCode>=300)return Y(e,s);let r=c({$metadata:y(e)}),i=j(F(await w.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 Y(e,s);let r=c({$metadata:y(e)}),i=j(F(await w.parseJsonBody(e.body,s)),"body"),l=o(i,{deviceCode:h,expiresIn:b,interval:b,userCode:h,verificationUri:h,verificationUriComplete:h});return Object.assign(r,l),r},Y=async(e,s)=>{let r={...e,body:await w.parseJsonErrorBody(e.body,s)},i=w.loadRestJsonErrorCode(e,r.body);switch(i){case"AccessDeniedException":case"com.amazonaws.ssooidc#AccessDeniedException":throw await Hr(r,s);case"AuthorizationPendingException":case"com.amazonaws.ssooidc#AuthorizationPendingException":throw await Nr(r,s);case"ExpiredTokenException":case"com.amazonaws.ssooidc#ExpiredTokenException":throw await _r(r,s);case"InternalServerException":case"com.amazonaws.ssooidc#InternalServerException":throw await pr(r,s);case"InvalidClientException":case"com.amazonaws.ssooidc#InvalidClientException":throw await Cr(r,s);case"InvalidGrantException":case"com.amazonaws.ssooidc#InvalidGrantException":throw await Or(r,s);case"InvalidRequestException":case"com.amazonaws.ssooidc#InvalidRequestException":throw await es(r,s);case"InvalidScopeException":case"com.amazonaws.ssooidc#InvalidScopeException":throw await ss(r,s);case"SlowDownException":case"com.amazonaws.ssooidc#SlowDownException":throw await is(r,s);case"UnauthorizedClientException":case"com.amazonaws.ssooidc#UnauthorizedClientException":throw await ls(r,s);case"UnsupportedGrantTypeException":case"com.amazonaws.ssooidc#UnsupportedGrantTypeException":throw await hs(r,s);case"InvalidRequestRegionException":case"com.amazonaws.ssooidc#InvalidRequestRegionException":throw await rs(r,s);case"InvalidClientMetadataException":case"com.amazonaws.ssooidc#InvalidClientMetadataException":throw await gr(r,s);case"InvalidRedirectUriException":case"com.amazonaws.ssooidc#InvalidRedirectUriException":throw await ur(r,s);default:let l=r.body;return Zr({output:e,parsedBody:l,errorCode:i})}},Zr=Fr(d),Hr=async(e,s)=>{let r=c({}),i=e.body,l=o(i,{error:h,error_description:h});Object.assign(r,l);let n=new x({$metadata:y(e),...r});return a(n,e.body)},Nr=async(e,s)=>{let r=c({}),i=e.body,l=o(i,{error:h,error_description:h});Object.assign(r,l);let n=new z({$metadata:y(e),...r});return a(n,e.body)},_r=async(e,s)=>{let r=c({}),i=e.body,l=o(i,{error:h,error_description:h});Object.assign(r,l);let n=new G({$metadata:y(e),...r});return a(n,e.body)},pr=async(e,s)=>{let r=c({}),i=e.body,l=o(i,{error:h,error_description:h});Object.assign(r,l);let n=new J({$metadata:y(e),...r});return a(n,e.body)},Cr=async(e,s)=>{let r=c({}),i=e.body,l=o(i,{error:h,error_description:h});Object.assign(r,l);let n=new V({$metadata:y(e),...r});return a(n,e.body)},gr=async(e,s)=>{let r=c({}),i=e.body,l=o(i,{error:h,error_description:h});Object.assign(r,l);let n=new Q({$metadata:y(e),...r});return a(n,e.body)},Or=async(e,s)=>{let r=c({}),i=e.body,l=o(i,{error:h,error_description:h});Object.assign(r,l);let n=new W({$metadata:y(e),...r});return a(n,e.body)},ur=async(e,s)=>{let r=c({}),i=e.body,l=o(i,{error:h,error_description:h});Object.assign(r,l);let n=new X({$metadata:y(e),...r});return a(n,e.body)},es=async(e,s)=>{let r=c({}),i=e.body,l=o(i,{error:h,error_description:h});Object.assign(r,l);let n=new f({$metadata:y(e),...r});return a(n,e.body)},rs=async(e,s)=>{let r=c({}),i=e.body,l=o(i,{endpoint:h,error:h,error_description:h,region:h});Object.assign(r,l);let n=new L({$metadata:y(e),...r});return a(n,e.body)},ss=async(e,s)=>{let r=c({}),i=e.body,l=o(i,{error:h,error_description:h});Object.assign(r,l);let n=new A({$metadata:y(e),...r});return a(n,e.body)},is=async(e,s)=>{let r=c({}),i=e.body,l=o(i,{error:h,error_description:h});Object.assign(r,l);let n=new K({$metadata:y(e),...r});return a(n,e.body)},ls=async(e,s)=>{let r=c({}),i=e.body,l=o(i,{error:h,error_description:h});Object.assign(r,l);let n=new M({$metadata:y(e),...r});return a(n,e.body)},hs=async(e,s)=>{let r=c({}),i=e.body,l=o(i,{error:h,error_description:h});Object.assign(r,l);let n=new B({$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 ns="aws_iam";class p extends E.classBuilder().ep(v).m(function(e,s,r,i){return[S(r,this.serialize,this.deserialize),$(r,e.getEndpointParameterInstructions())]}).s("AWSSSOOIDCService","CreateToken",{}).n("SSOOIDCClient","CreateTokenCommand").f(Ir,Rr).ser(Dr).de(zr).build(){}class C extends E.classBuilder().ep(v).m(function(e,s,r,i){return[S(r,this.serialize,this.deserialize),$(r,e.getEndpointParameterInstructions())]}).s("AWSSSOOIDCService","CreateTokenWithIAM",{}).n("SSOOIDCClient","CreateTokenWithIAMCommand").f(Pr,Tr).ser(Ur).de(Gr).build(){}class g extends E.classBuilder().ep(v).m(function(e,s,r,i){return[S(r,this.serialize,this.deserialize),$(r,e.getEndpointParameterInstructions())]}).s("AWSSSOOIDCService","RegisterClient",{}).n("SSOOIDCClient","RegisterClientCommand").f(void 0,br).ser(qr).de(Jr).build(){}class O extends E.classBuilder().ep(v).m(function(e,s,r,i){return[S(r,this.serialize,this.deserialize),$(r,e.getEndpointParameterInstructions())]}).s("AWSSSOOIDCService","StartDeviceAuthorization",{}).n("SSOOIDCClient","StartDeviceAuthorizationCommand").f(jr,void 0).ser(xr).de(Vr).build(){}var os={CreateTokenCommand:p,CreateTokenWithIAMCommand:C,RegisterClientCommand:g,StartDeviceAuthorizationCommand:O};class fr extends N{}Wr(os,fr);export{tr as __Client,B as UnsupportedGrantTypeException,M as UnauthorizedClientException,jr as StartDeviceAuthorizationRequestFilterSensitiveLog,O as StartDeviceAuthorizationCommand,K as SlowDownException,d as SSOOIDCServiceException,N as SSOOIDCClient,fr as SSOOIDC,br as RegisterClientResponseFilterSensitiveLog,g as RegisterClientCommand,A as InvalidScopeException,L as InvalidRequestRegionException,f as InvalidRequestException,X as InvalidRedirectUriException,W as InvalidGrantException,Q as InvalidClientMetadataException,V as InvalidClientException,J as InternalServerException,G as ExpiredTokenException,Tr as CreateTokenWithIAMResponseFilterSensitiveLog,Pr as CreateTokenWithIAMRequestFilterSensitiveLog,C as CreateTokenWithIAMCommand,Rr as CreateTokenResponseFilterSensitiveLog,Ir as CreateTokenRequestFilterSensitiveLog,p as CreateTokenCommand,z as AuthorizationPendingException,x as AccessDeniedException,E as $Command};
|
|
3
|
-
|
|
4
|
-
//# debugId=3B40A1AE18443DDF64756E2164756E21
|
package/dist/chunk-n76mw527.js
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import{wb as $}from"./chunk-8pghf7ne.js";import{Ib as w,Jb as z,Kb as B}from"./chunk-b5ke2zpg.js";import{Lb as X}from"./chunk-0970v4jx.js";import{Tb as q}from"./chunk-exvtvmb6.js";var x=q(X(),1);var J=q(X(),1),k="AWS_EC2_METADATA_DISABLED",Y=async(b)=>{let{ENV_CMDS_FULL_URI:j,ENV_CMDS_RELATIVE_URI:y,fromContainerMetadata:G,fromInstanceMetadata:K}=await import("./chunk-sywb9k1q.js");if(process.env[y]||process.env[j]){b.logger?.debug("@aws-sdk/credential-provider-node - remoteProvider::fromHttp/fromContainerMetadata");let{fromHttp:Q}=await import("./chunk-zq31anzs.js");return J.chain(Q(b),G(b))}if(process.env[k])return async()=>{throw new J.CredentialsProviderError("EC2 Instance Metadata Service access disabled",{logger:b.logger})};return b.logger?.debug("@aws-sdk/credential-provider-node - remoteProvider::fromInstanceMetadata"),K(b)};var Z=!1,T=(b={})=>x.memoize(x.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 x.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");let{ssoStartUrl:j,ssoAccountId:y,ssoRegion:G,ssoRoleName:K,ssoSession:Q}=b;if(!j&&!y&&!G&&!K&&!Q)throw new x.CredentialsProviderError("Skipping SSO provider in default chain (inputs do not include SSO fields).",{logger:b.logger});let{fromSSO:H}=await import("./chunk-nwqqr50x.js");return H(b)()},async()=>{b.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromIni");let{fromIni:j}=await import("./chunk-ee0c21b5.js");return j(b)()},async()=>{b.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromProcess");let{fromProcess:j}=await import("./chunk-zqcc4jxj.js");return j(b)()},async()=>{b.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromTokenFile");let{fromTokenFile:j}=await import("./chunk-0643qpn8.js");return j(b)()},async()=>{return b.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::remoteProvider"),(await Y(b))()},async()=>{throw new x.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 N};
|
|
10
|
-
|
|
11
|
-
//# debugId=F854C9E457438E9F64756E2164756E21
|
package/dist/chunk-nwqqr50x.js
DELETED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{Cb as v,Db as P,xb as N,yb as W,zb as I}from"./chunk-8pghf7ne.js";import"./chunk-bxwnddma.js";import{Lb as _}from"./chunk-0970v4jx.js";import{Tb as f}from"./chunk-exvtvmb6.js";var T=f(_(),1);var H=(e)=>e&&(typeof e.sso_start_url==="string"||typeof e.sso_account_id==="string"||typeof e.sso_session==="string"||typeof e.sso_region==="string"||typeof e.sso_role_name==="string");var u=f(_(),1);var K=300000,h="To refresh this SSO session run 'aws sso login' with the corresponding profile.";var R={},b=async(e)=>{let{SSOOIDCClient:r}=await import("./chunk-fskmyztg.js");if(R[e])return R[e];let s=new r({region:e});return R[e]=s,s};var G=async(e,r)=>{let{CreateTokenCommand:s}=await import("./chunk-fskmyztg.js");return(await b(r)).send(new s({clientId:e.clientId,clientSecret:e.clientSecret,refreshToken:e.refreshToken,grantType:"refresh_token"}))};var U=f(_(),1);var D=(e)=>{if(e.expiration&&e.expiration.getTime()<Date.now())throw new U.TokenProviderError(`Token is expired. ${h}`,!1)};var q=f(_(),1);var S=(e,r,s=!1)=>{if(typeof r==="undefined")throw new q.TokenProviderError(`Value not present for '${e}' in SSO Token${s?". Cannot refresh":""}. ${h}`,!1)};import{promises as B}from"fs";var{writeFile:Q}=B,j=(e,r)=>{let s=W(e),t=JSON.stringify(r,null,2);return Q(s,t)};var X=new Date(0),z=(e={})=>async()=>{e.logger?.debug("@aws-sdk/token-providers - fromSso");let r=await P(e),s=N(e),t=r[s];if(!t)throw new u.TokenProviderError(`Profile '${s}' could not be found in shared credentials file.`,!1);else if(!t.sso_session)throw new u.TokenProviderError(`Profile '${s}' is missing required property 'sso_session'.`);let i=t.sso_session,a=(await v(e))[i];if(!a)throw new u.TokenProviderError(`Sso session '${i}' could not be found in shared credentials file.`,!1);for(let n of["sso_start_url","sso_region"])if(!a[n])throw new u.TokenProviderError(`Sso session '${i}' is missing required property '${n}'.`,!1);let{sso_start_url:l,sso_region:p}=a,o;try{o=await I(i)}catch(n){throw new u.TokenProviderError(`The SSO session token associated with profile=${s} was not found or is invalid. ${h}`,!1)}S("accessToken",o.accessToken),S("expiresAt",o.expiresAt);let{accessToken:E,expiresAt:x}=o,c={token:E,expiration:new Date(x)};if(c.expiration.getTime()-Date.now()>K)return c;if(Date.now()-X.getTime()<30000)return D(c),c;S("clientId",o.clientId,!0),S("clientSecret",o.clientSecret,!0),S("refreshToken",o.refreshToken,!0);try{X.setTime(Date.now());let n=await G(o,p);S("accessToken",n.accessToken),S("expiresIn",n.expiresIn);let g=new Date(Date.now()+n.expiresIn*1000);try{await j(i,{...o,accessToken:n.accessToken,expiresAt:g.toISOString(),refreshToken:n.refreshToken})}catch(C){}return{token:n.accessToken,expiration:g}}catch(n){return D(c),c}};var k=f(_(),1);var y=!1,A=async({ssoStartUrl:e,ssoSession:r,ssoAccountId:s,ssoRegion:t,ssoRoleName:i,ssoClient:m,clientConfig:a,profile:l,logger:p})=>{let o,E="To refresh this SSO session run aws sso login with the corresponding profile.";if(r)try{let w=await z({profile:l})();o={accessToken:w.token,expiresAt:new Date(w.expiration).toISOString()}}catch(w){throw new k.CredentialsProviderError(w.message,{tryNextLink:y,logger:p})}else try{o=await I(e)}catch(w){throw new k.CredentialsProviderError("The SSO session associated with this profile is invalid. To refresh this SSO session run aws sso login with the corresponding profile.",{tryNextLink:y,logger:p})}if(new Date(o.expiresAt).getTime()-Date.now()<=0)throw new k.CredentialsProviderError("The SSO session associated with this profile has expired. To refresh this SSO session run aws sso login with the corresponding profile.",{tryNextLink:y,logger:p});let{accessToken:x}=o,{SSOClient:c,GetRoleCredentialsCommand:n}=await import("./chunk-99tdk5x5.js"),g=m||new c(Object.assign({},a??{},{region:a?.region??t})),C;try{C=await g.send(new n({accountId:s,roleName:i,accessToken:x}))}catch(w){throw new k.CredentialsProviderError(w,{tryNextLink:y,logger:p})}let{roleCredentials:{accessKeyId:d,secretAccessKey:O,sessionToken:$,expiration:F,credentialScope:L,accountId:M}={}}=C;if(!d||!O||!$||!F)throw new k.CredentialsProviderError("SSO returns an invalid temporary credential.",{tryNextLink:y,logger:p});return{accessKeyId:d,secretAccessKey:O,sessionToken:$,expiration:new Date(F),...L&&{credentialScope:L},...M&&{accountId:M}}};var J=f(_(),1),V=(e,r)=>{let{sso_start_url:s,sso_account_id:t,sso_region:i,sso_role_name:m}=e;if(!s||!t||!i||!m)throw new J.CredentialsProviderError(`Profile is configured with invalid SSO credentials. Required parameters "sso_account_id", "sso_region", "sso_role_name", "sso_start_url". Got ${Object.keys(e).join(", ")}\nReference: https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-sso.html`,{tryNextLink:!1,logger:r});return e};var Ee=(e={})=>async()=>{e.logger?.debug("@aws-sdk/credential-provider-sso - fromSSO");let{ssoStartUrl:r,ssoAccountId:s,ssoRegion:t,ssoRoleName:i,ssoSession:m}=e,{ssoClient:a}=e,l=N(e);if(!r&&!s&&!t&&!i&&!m){let o=(await P(e))[l];if(!o)throw new T.CredentialsProviderError(`Profile ${l} was not found.`,{logger:e.logger});if(!H(o))throw new T.CredentialsProviderError(`Profile ${l} is not configured with SSO credentials.`,{logger:e.logger});if(o?.sso_session){let d=(await v(e))[o.sso_session],O=` configurations in profile ${l} and sso-session ${o.sso_session}`;if(t&&t!==d.sso_region)throw new T.CredentialsProviderError("Conflicting SSO region"+O,{tryNextLink:!1,logger:e.logger});if(r&&r!==d.sso_start_url)throw new T.CredentialsProviderError("Conflicting SSO start_url"+O,{tryNextLink:!1,logger:e.logger});o.sso_region=d.sso_region,o.sso_start_url=d.sso_start_url}let{sso_start_url:E,sso_account_id:x,sso_region:c,sso_role_name:n,sso_session:g}=V(o,e.logger);return A({ssoStartUrl:E,ssoSession:g,ssoAccountId:x,ssoRegion:c,ssoRoleName:n,ssoClient:a,clientConfig:e.clientConfig,profile:l})}else if(!r||!s||!t||!i)throw new T.CredentialsProviderError('Incomplete configuration. The fromSSO() argument hash must include "ssoStartUrl", "ssoAccountId", "ssoRegion", "ssoRoleName"',{tryNextLink:!1,logger:e.logger});else return A({ssoStartUrl:r,ssoSession:m,ssoAccountId:s,ssoRegion:t,ssoRoleName:i,ssoClient:a,clientConfig:e.clientConfig,profile:l})};export{V as validateSsoProfile,H as isSsoProfile,Ee as fromSSO};
|
|
3
|
-
|
|
4
|
-
//# debugId=B6FC88E1E716D55A64756E2164756E21
|
package/dist/chunk-setbnv6k.js
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import{Fb as Bn,Gb as pn}from"./chunk-bxwnddma.js";import{Tb as v,Ub as I}from"./chunk-exvtvmb6.js";var En=I((v0,vn)=>{var{defineProperty:l,getOwnPropertyDescriptor:Xt,getOwnPropertyNames:bt}=Object,Kt=Object.prototype.hasOwnProperty,L=(n,c)=>l(n,"name",{value:c,configurable:!0}),St=(n,c)=>{for(var f in c)l(n,f,{get:c[f],enumerable:!0})},Wt=(n,c,f,t)=>{if(c&&typeof c==="object"||typeof c==="function"){for(let h of bt(c))if(!Kt.call(n,h)&&h!==f)l(n,h,{get:()=>c[h],enumerable:!(t=Xt(c,h))||t.enumerable})}return n},Jt=(n)=>Wt(l({},"__esModule",{value:!0}),n),ln={};St(ln,{constructStack:()=>xn});vn.exports=Jt(ln);var J=L((n,c)=>{let f=[];if(n)f.push(n);if(c)for(let t of c)f.push(t);return f},"getAllAliases"),K=L((n,c)=>{return`${n||"anonymous"}${c&&c.length>0?` (a.k.a. ${c.join(",")})`:""}`},"getMiddlewareNameWithAliases"),xn=L(()=>{let n=[],c=[],f=!1,t=new Set,h=L((u)=>u.sort((E,$)=>On[$.step]-On[E.step]||kn[$.priority||"normal"]-kn[E.priority||"normal"]),"sort"),i=L((u)=>{let E=!1,$=L((N)=>{let y=J(N.name,N.aliases);if(y.includes(u)){E=!0;for(let C of y)t.delete(C);return!1}return!0},"filterCb");return n=n.filter($),c=c.filter($),E},"removeByName"),r=L((u)=>{let E=!1,$=L((N)=>{if(N.middleware===u){E=!0;for(let y of J(N.name,N.aliases))t.delete(y);return!1}return!0},"filterCb");return n=n.filter($),c=c.filter($),E},"removeByReference"),s=L((u)=>{var E;return n.forEach(($)=>{u.add($.middleware,{...$})}),c.forEach(($)=>{u.addRelativeTo($.middleware,{...$})}),(E=u.identifyOnResolve)==null||E.call(u,D.identifyOnResolve()),u},"cloneTo"),w=L((u)=>{let E=[];return u.before.forEach(($)=>{if($.before.length===0&&$.after.length===0)E.push($);else E.push(...w($))}),E.push(u),u.after.reverse().forEach(($)=>{if($.before.length===0&&$.after.length===0)E.push($);else E.push(...w($))}),E},"expandRelativeMiddlewareList"),x=L((u=!1)=>{let E=[],$=[],N={};return n.forEach((C)=>{let U={...C,before:[],after:[]};for(let T of J(U.name,U.aliases))N[T]=U;E.push(U)}),c.forEach((C)=>{let U={...C,before:[],after:[]};for(let T of J(U.name,U.aliases))N[T]=U;$.push(U)}),$.forEach((C)=>{if(C.toMiddleware){let U=N[C.toMiddleware];if(U===void 0){if(u)return;throw new Error(`${C.toMiddleware} is not found when adding ${K(C.name,C.aliases)} middleware ${C.relation} ${C.toMiddleware}`)}if(C.relation==="after")U.after.push(C);if(C.relation==="before")U.before.push(C)}}),h(E).map(w).reduce((C,U)=>{return C.push(...U),C},[])},"getMiddlewareList"),D={add:(u,E={})=>{let{name:$,override:N,aliases:y}=E,C={step:"initialize",priority:"normal",middleware:u,...E},U=J($,y);if(U.length>0){if(U.some((T)=>t.has(T))){if(!N)throw new Error(`Duplicate middleware name '${K($,y)}'`);for(let T of U){let F=n.findIndex((V)=>{var Z;return V.name===T||((Z=V.aliases)==null?void 0:Z.some((W)=>W===T))});if(F===-1)continue;let d=n[F];if(d.step!==C.step||C.priority!==d.priority)throw new Error(`"${K(d.name,d.aliases)}" middleware with ${d.priority} priority in ${d.step} step cannot be overridden by "${K($,y)}" middleware with ${C.priority} priority in ${C.step} step.`);n.splice(F,1)}}for(let T of U)t.add(T)}n.push(C)},addRelativeTo:(u,E)=>{let{name:$,override:N,aliases:y}=E,C={middleware:u,...E},U=J($,y);if(U.length>0){if(U.some((T)=>t.has(T))){if(!N)throw new Error(`Duplicate middleware name '${K($,y)}'`);for(let T of U){let F=c.findIndex((V)=>{var Z;return V.name===T||((Z=V.aliases)==null?void 0:Z.some((W)=>W===T))});if(F===-1)continue;let d=c[F];if(d.toMiddleware!==C.toMiddleware||d.relation!==C.relation)throw new Error(`"${K(d.name,d.aliases)}" middleware ${d.relation} "${d.toMiddleware}" middleware cannot be overridden by "${K($,y)}" middleware ${C.relation} "${C.toMiddleware}" middleware.`);c.splice(F,1)}}for(let T of U)t.add(T)}c.push(C)},clone:()=>s(xn()),use:(u)=>{u.applyToStack(D)},remove:(u)=>{if(typeof u==="string")return i(u);else return r(u)},removeByTag:(u)=>{let E=!1,$=L((N)=>{let{tags:y,name:C,aliases:U}=N;if(y&&y.includes(u)){let T=J(C,U);for(let F of T)t.delete(F);return E=!0,!1}return!0},"filterCb");return n=n.filter($),c=c.filter($),E},concat:(u)=>{var E;let $=s(xn());return $.use(u),$.identifyOnResolve(f||$.identifyOnResolve()||(((E=u.identifyOnResolve)==null?void 0:E.call(u))??!1)),$},applyToStack:s,identify:()=>{return x(!0).map((u)=>{let E=u.step??u.relation+" "+u.toMiddleware;return K(u.name,u.aliases)+" - "+E})},identifyOnResolve(u){if(typeof u==="boolean")f=u;return f},resolve:(u,E)=>{for(let $ of x().map((N)=>N.middleware).reverse())u=$(u,E);if(f)console.log(D.identify());return u}};return D},"constructStack"),On={initialize:5,serialize:4,build:3,finalizeRequest:2,deserialize:1},kn={high:3,normal:2,low:1}});var fc=I((tr,cc)=>{var{defineProperty:o,getOwnPropertyDescriptor:Mt,getOwnPropertyNames:Rt}=Object,gt=Object.prototype.hasOwnProperty,At=(n,c)=>o(n,"name",{value:c,configurable:!0}),Ht=(n,c)=>{for(var f in c)o(n,f,{get:c[f],enumerable:!0})},Pt=(n,c,f,t)=>{if(c&&typeof c==="object"||typeof c==="function"){for(let h of Rt(c))if(!gt.call(n,h)&&h!==f)o(n,h,{get:()=>c[h],enumerable:!(t=Mt(c,h))||t.enumerable})}return n},Ot=(n)=>Pt(o({},"__esModule",{value:!0}),n),nc={};Ht(nc,{isArrayBuffer:()=>kt});cc.exports=Ot(nc);var kt=At((n)=>typeof ArrayBuffer==="function"&&n instanceof ArrayBuffer||Object.prototype.toString.call(n)==="[object ArrayBuffer]","isArrayBuffer")});var g=I((hr,ic)=>{var{defineProperty:p,getOwnPropertyDescriptor:lt,getOwnPropertyNames:vt}=Object,ot=Object.prototype.hasOwnProperty,tc=(n,c)=>p(n,"name",{value:c,configurable:!0}),pt=(n,c)=>{for(var f in c)p(n,f,{get:c[f],enumerable:!0})},qt=(n,c,f,t)=>{if(c&&typeof c==="object"||typeof c==="function"){for(let h of vt(c))if(!ot.call(n,h)&&h!==f)p(n,h,{get:()=>c[h],enumerable:!(t=lt(c,h))||t.enumerable})}return n},et=(n)=>qt(p({},"__esModule",{value:!0}),n),hc={};pt(hc,{fromArrayBuffer:()=>mt,fromString:()=>_t});ic.exports=et(hc);var at=fc(),Fn=import.meta.require("buffer"),mt=tc((n,c=0,f=n.byteLength-c)=>{if(!at.isArrayBuffer(n))throw new TypeError(`The "input" argument must be ArrayBuffer. Received type ${typeof n} (${n})`);return Fn.Buffer.from(n,c,f)},"fromArrayBuffer"),_t=tc((n,c)=>{if(typeof n!=="string")throw new TypeError(`The "input" argument must be of type string. Received type ${typeof n} (${n})`);return c?Fn.Buffer.from(n,c):Fn.Buffer.from(n)},"fromString")});var wc=I((rc)=>{Object.defineProperty(rc,"__esModule",{value:!0});rc.fromBase64=void 0;var nh=g(),ch=/^[A-Za-z0-9+/]*={0,2}$/,fh=(n)=>{if(n.length*3%4!==0)throw new TypeError("Incorrect padding on base64 string.");if(!ch.exec(n))throw new TypeError("Invalid base64 string.");let c=nh.fromString(n,"base64");return new Uint8Array(c.buffer,c.byteOffset,c.byteLength)};rc.fromBase64=fh});var e=I((rr,xc)=>{var{defineProperty:q,getOwnPropertyDescriptor:th,getOwnPropertyNames:hh}=Object,ih=Object.prototype.hasOwnProperty,Cn=(n,c)=>q(n,"name",{value:c,configurable:!0}),rh=(n,c)=>{for(var f in c)q(n,f,{get:c[f],enumerable:!0})},sh=(n,c,f,t)=>{if(c&&typeof c==="object"||typeof c==="function"){for(let h of hh(c))if(!ih.call(n,h)&&h!==f)q(n,h,{get:()=>c[h],enumerable:!(t=th(c,h))||t.enumerable})}return n},wh=(n)=>sh(q({},"__esModule",{value:!0}),n),uc={};rh(uc,{fromUtf8:()=>Tc,toUint8Array:()=>uh,toUtf8:()=>$h});xc.exports=wh(uc);var $c=g(),Tc=Cn((n)=>{let c=$c.fromString(n,"utf8");return new Uint8Array(c.buffer,c.byteOffset,c.byteLength/Uint8Array.BYTES_PER_ELEMENT)},"fromUtf8"),uh=Cn((n)=>{if(typeof n==="string")return Tc(n);if(ArrayBuffer.isView(n))return new Uint8Array(n.buffer,n.byteOffset,n.byteLength/Uint8Array.BYTES_PER_ELEMENT);return new Uint8Array(n)},"toUint8Array"),$h=Cn((n)=>{if(typeof n==="string")return n;if(typeof n!=="object"||typeof n.byteOffset!=="number"||typeof n.byteLength!=="number")throw new Error("@smithy/util-utf8: toUtf8 encoder function only accepts string | Uint8Array.");return $c.fromArrayBuffer(n.buffer,n.byteOffset,n.byteLength).toString("utf8")},"toUtf8")});var Cc=I((Ec)=>{Object.defineProperty(Ec,"__esModule",{value:!0});Ec.toBase64=void 0;var Th=g(),xh=e(),Eh=(n)=>{let c;if(typeof n==="string")c=xh.fromUtf8(n);else c=n;if(typeof c!=="object"||typeof c.byteOffset!=="number"||typeof c.byteLength!=="number")throw new Error("@smithy/util-base64: toBase64 encoder function only accepts string | Uint8Array.");return Th.fromArrayBuffer(c.buffer,c.byteOffset,c.byteLength).toString("base64")};Ec.toBase64=Eh});var m=I((wr,a)=>{var{defineProperty:Uc,getOwnPropertyDescriptor:Fh,getOwnPropertyNames:Ch}=Object,Uh=Object.prototype.hasOwnProperty,Un=(n,c,f,t)=>{if(c&&typeof c==="object"||typeof c==="function"){for(let h of Ch(c))if(!Uh.call(n,h)&&h!==f)Uc(n,h,{get:()=>c[h],enumerable:!(t=Fh(c,h))||t.enumerable})}return n},Nc=(n,c,f)=>(Un(n,c,"default"),f&&Un(f,c,"default")),Nh=(n)=>Un(Uc({},"__esModule",{value:!0}),n),Nn={};a.exports=Nh(Nn);Nc(Nn,wc(),a.exports);Nc(Nn,Cc(),a.exports)});var yc=I((dc)=>{Object.defineProperty(dc,"__esModule",{value:!0});dc.getAwsChunkedEncodingStream=void 0;var dh=import.meta.require("stream"),Dh=(n,c)=>{let{base64Encoder:f,bodyLengthChecker:t,checksumAlgorithmFn:h,checksumLocationName:i,streamHasher:r}=c,s=f!==void 0&&h!==void 0&&i!==void 0&&r!==void 0,w=s?r(h,n):void 0,x=new dh.Readable({read:()=>{}});return n.on("data",(D)=>{let u=t(D)||0;x.push(`${u.toString(16)}\r\n`),x.push(D),x.push("\r\n")}),n.on("end",async()=>{if(x.push("0\r\n"),s){let D=f(await w);x.push(`${i}:${D}\r\n`),x.push("\r\n")}x.push(null)}),x};dc.getAwsChunkedEncodingStream=Dh});var bc=I(($r,Xc)=>{var{defineProperty:_,getOwnPropertyDescriptor:yh,getOwnPropertyNames:Yh}=Object,Ih=Object.prototype.hasOwnProperty,nn=(n,c)=>_(n,"name",{value:c,configurable:!0}),zh=(n,c)=>{for(var f in c)_(n,f,{get:c[f],enumerable:!0})},Vh=(n,c,f,t)=>{if(c&&typeof c==="object"||typeof c==="function"){for(let h of Yh(c))if(!Ih.call(n,h)&&h!==f)_(n,h,{get:()=>c[h],enumerable:!(t=yh(c,h))||t.enumerable})}return n},Zh=(n)=>Vh(_({},"__esModule",{value:!0}),n),Yc={};zh(Yc,{AlgorithmId:()=>Zc,EndpointURLScheme:()=>Vc,FieldPosition:()=>Gc,HttpApiKeyAuthLocation:()=>zc,HttpAuthLocation:()=>Ic,IniSectionType:()=>Lc,RequestHandlerProtocol:()=>Qc,SMITHY_CONTEXT_KEY:()=>bh,getDefaultClientConfiguration:()=>Qh,resolveDefaultRuntimeConfig:()=>Xh});Xc.exports=Zh(Yc);var Ic=((n)=>{return n.HEADER="header",n.QUERY="query",n})(Ic||{}),zc=((n)=>{return n.HEADER="header",n.QUERY="query",n})(zc||{}),Vc=((n)=>{return n.HTTP="http",n.HTTPS="https",n})(Vc||{}),Zc=((n)=>{return n.MD5="md5",n.CRC32="crc32",n.CRC32C="crc32c",n.SHA1="sha1",n.SHA256="sha256",n})(Zc||{}),Gh=nn((n)=>{let c=[];if(n.sha256!==void 0)c.push({algorithmId:()=>"sha256",checksumConstructor:()=>n.sha256});if(n.md5!=null)c.push({algorithmId:()=>"md5",checksumConstructor:()=>n.md5});return{_checksumAlgorithms:c,addChecksumAlgorithm(f){this._checksumAlgorithms.push(f)},checksumAlgorithms(){return this._checksumAlgorithms}}},"getChecksumConfiguration"),Lh=nn((n)=>{let c={};return n.checksumAlgorithms().forEach((f)=>{c[f.algorithmId()]=f.checksumConstructor()}),c},"resolveChecksumRuntimeConfig"),Qh=nn((n)=>{return{...Gh(n)}},"getDefaultClientConfiguration"),Xh=nn((n)=>{return{...Lh(n)}},"resolveDefaultRuntimeConfig"),Gc=((n)=>{return n[n.HEADER=0]="HEADER",n[n.TRAILER=1]="TRAILER",n})(Gc||{}),bh="__smithy_context",Lc=((n)=>{return n.PROFILE="profile",n.SSO_SESSION="sso-session",n.SERVICES="services",n})(Lc||{}),Qc=((n)=>{return n.HTTP_0_9="http/0.9",n.HTTP_1_0="http/1.0",n.TDS_8_0="tds/8.0",n})(Qc||{})});var dn=I((Tr,gc)=>{var{defineProperty:cn,getOwnPropertyDescriptor:Kh,getOwnPropertyNames:Sh}=Object,Wh=Object.prototype.hasOwnProperty,S=(n,c)=>cn(n,"name",{value:c,configurable:!0}),Jh=(n,c)=>{for(var f in c)cn(n,f,{get:c[f],enumerable:!0})},Bh=(n,c,f,t)=>{if(c&&typeof c==="object"||typeof c==="function"){for(let h of Sh(c))if(!Wh.call(n,h)&&h!==f)cn(n,h,{get:()=>c[h],enumerable:!(t=Kh(c,h))||t.enumerable})}return n},jh=(n)=>Bh(cn({},"__esModule",{value:!0}),n),Kc={};Jh(Kc,{Field:()=>gh,Fields:()=>Ah,HttpRequest:()=>Hh,HttpResponse:()=>Ph,IHttpRequest:()=>Sc.HttpRequest,getHttpHandlerExtensionConfiguration:()=>Mh,isValidHostname:()=>Rc,resolveHttpHandlerRuntimeConfig:()=>Rh});gc.exports=jh(Kc);var Mh=S((n)=>{let c=n.httpHandler;return{setHttpHandler(f){c=f},httpHandler(){return c},updateHttpClientConfig(f,t){c.updateHttpClientConfig(f,t)},httpHandlerConfigs(){return c.httpHandlerConfigs()}}},"getHttpHandlerExtensionConfiguration"),Rh=S((n)=>{return{httpHandler:n.httpHandler()}},"resolveHttpHandlerRuntimeConfig"),Sc=bc(),Wc=class n{constructor({name:c,kind:f=Sc.FieldPosition.HEADER,values:t=[]}){this.name=c,this.kind=f,this.values=t}add(c){this.values.push(c)}set(c){this.values=c}remove(c){this.values=this.values.filter((f)=>f!==c)}toString(){return this.values.map((c)=>c.includes(",")||c.includes(" ")?`"${c}"`:c).join(", ")}get(){return this.values}};S(Wc,"Field");var gh=Wc,Jc=class n{constructor({fields:c=[],encoding:f="utf-8"}){this.entries={},c.forEach(this.setField.bind(this)),this.encoding=f}setField(c){this.entries[c.name.toLowerCase()]=c}getField(c){return this.entries[c.toLowerCase()]}removeField(c){delete this.entries[c.toLowerCase()]}getByType(c){return Object.values(this.entries).filter((f)=>f.kind===c)}};S(Jc,"Fields");var Ah=Jc,Bc=class n{constructor(c){this.method=c.method||"GET",this.hostname=c.hostname||"localhost",this.port=c.port,this.query=c.query||{},this.headers=c.headers||{},this.body=c.body,this.protocol=c.protocol?c.protocol.slice(-1)!==":"?`${c.protocol}:`:c.protocol:"https:",this.path=c.path?c.path.charAt(0)!=="/"?`/${c.path}`:c.path:"/",this.username=c.username,this.password=c.password,this.fragment=c.fragment}static clone(c){let f=new n({...c,headers:{...c.headers}});if(f.query)f.query=jc(f.query);return f}static isInstance(c){if(!c)return!1;let f=c;return"method"in f&&"protocol"in f&&"hostname"in f&&"path"in f&&typeof f.query==="object"&&typeof f.headers==="object"}clone(){return n.clone(this)}};S(Bc,"HttpRequest");var Hh=Bc;function jc(n){return Object.keys(n).reduce((c,f)=>{let t=n[f];return{...c,[f]:Array.isArray(t)?[...t]:t}},{})}S(jc,"cloneQuery");var Mc=class n{constructor(c){this.statusCode=c.statusCode,this.reason=c.reason,this.headers=c.headers||{},this.body=c.body}static isInstance(c){if(!c)return!1;let f=c;return typeof f.statusCode==="number"&&typeof f.headers==="object"}};S(Mc,"HttpResponse");var Ph=Mc;function Rc(n){return/^[a-z0-9][a-z0-9\.\-]*[a-z0-9]$/.test(n)}S(Rc,"isValidHostname")});var yn=I((xr,Pc)=>{var{defineProperty:fn,getOwnPropertyDescriptor:Oh,getOwnPropertyNames:kh}=Object,lh=Object.prototype.hasOwnProperty,Dn=(n,c)=>fn(n,"name",{value:c,configurable:!0}),vh=(n,c)=>{for(var f in c)fn(n,f,{get:c[f],enumerable:!0})},oh=(n,c,f,t)=>{if(c&&typeof c==="object"||typeof c==="function"){for(let h of kh(c))if(!lh.call(n,h)&&h!==f)fn(n,h,{get:()=>c[h],enumerable:!(t=Oh(c,h))||t.enumerable})}return n},ph=(n)=>oh(fn({},"__esModule",{value:!0}),n),Ac={};vh(Ac,{escapeUri:()=>Hc,escapeUriPath:()=>eh});Pc.exports=ph(Ac);var Hc=Dn((n)=>encodeURIComponent(n).replace(/[!'()*]/g,qh),"escapeUri"),qh=Dn((n)=>`%${n.charCodeAt(0).toString(16).toUpperCase()}`,"hexEncode"),eh=Dn((n)=>n.split("/").map(Hc).join("/"),"escapeUriPath")});var In=I((Er,lc)=>{var{defineProperty:tn,getOwnPropertyDescriptor:ah,getOwnPropertyNames:mh}=Object,_h=Object.prototype.hasOwnProperty,ni=(n,c)=>tn(n,"name",{value:c,configurable:!0}),ci=(n,c)=>{for(var f in c)tn(n,f,{get:c[f],enumerable:!0})},fi=(n,c,f,t)=>{if(c&&typeof c==="object"||typeof c==="function"){for(let h of mh(c))if(!_h.call(n,h)&&h!==f)tn(n,h,{get:()=>c[h],enumerable:!(t=ah(c,h))||t.enumerable})}return n},ti=(n)=>fi(tn({},"__esModule",{value:!0}),n),Oc={};ci(Oc,{buildQueryString:()=>kc});lc.exports=ti(Oc);var Yn=yn();function kc(n){let c=[];for(let f of Object.keys(n).sort()){let t=n[f];if(f=Yn.escapeUri(f),Array.isArray(t))for(let h=0,i=t.length;h<i;h++)c.push(`${f}=${Yn.escapeUri(t[h])}`);else{let h=f;if(t||typeof t==="string")h+=`=${Yn.escapeUri(t)}`;c.push(h)}}return c.join("&")}ni(kc,"buildQueryString")});var Tf=I((Fr,$f)=>{var{create:hi,defineProperty:A,getOwnPropertyDescriptor:ii,getOwnPropertyNames:ri,getPrototypeOf:si}=Object,wi=Object.prototype.hasOwnProperty,Y=(n,c)=>A(n,"name",{value:c,configurable:!0}),ui=(n,c)=>{for(var f in c)A(n,f,{get:c[f],enumerable:!0})},ec=(n,c,f,t)=>{if(c&&typeof c==="object"||typeof c==="function"){for(let h of ri(c))if(!wi.call(n,h)&&h!==f)A(n,h,{get:()=>c[h],enumerable:!(t=ii(c,h))||t.enumerable})}return n},$i=(n,c,f)=>(f=n!=null?hi(si(n)):{},ec(c||!n||!n.__esModule?A(f,"default",{value:n,enumerable:!0}):f,n)),Ti=(n)=>ec(A({},"__esModule",{value:!0}),n),ac={};ui(ac,{DEFAULT_REQUEST_TIMEOUT:()=>Ni,NodeHttp2Handler:()=>Ii,NodeHttpHandler:()=>di,streamCollector:()=>Vi});$f.exports=Ti(ac);var mc=dn(),_c=In(),zn=import.meta.require("http"),Vn=import.meta.require("https"),xi=["ECONNRESET","EPIPE","ETIMEDOUT"],nf=Y((n)=>{let c={};for(let f of Object.keys(n)){let t=n[f];c[f]=Array.isArray(t)?t.join(","):t}return c},"getTransformedHeaders"),vc=1000,Ei=Y((n,c,f=0)=>{if(!f)return-1;let t=Y((h)=>{let i=setTimeout(()=>{n.destroy(),c(Object.assign(new Error(`Socket timed out without establishing a connection within ${f} ms`),{name:"TimeoutError"}))},f-h),r=Y((s)=>{if(s==null?void 0:s.connecting)s.on("connect",()=>{clearTimeout(i)});else clearTimeout(i)},"doWithSocket");if(n.socket)r(n.socket);else n.on("socket",r)},"registerTimeout");if(f<2000)return t(0),0;return setTimeout(t.bind(null,vc),vc)},"setConnectionTimeout"),Fi=3000,Ci=Y((n,{keepAlive:c,keepAliveMsecs:f},t=Fi)=>{if(c!==!0)return-1;let h=Y(()=>{if(n.socket)n.socket.setKeepAlive(c,f||0);else n.on("socket",(i)=>{i.setKeepAlive(c,f||0)})},"registerListener");if(t===0)return h(),0;return setTimeout(h,t)},"setSocketKeepAlive"),oc=3000,Ui=Y((n,c,f=0)=>{let t=Y((h)=>{n.setTimeout(f-h,()=>{n.destroy(),c(Object.assign(new Error(`Connection timed out after ${f} ms`),{name:"TimeoutError"}))})},"registerTimeout");if(0<f&&f<6000)return t(0),0;return setTimeout(t.bind(null,f===0?0:oc),oc)},"setSocketTimeout"),cf=import.meta.require("stream"),pc=1000;async function Zn(n,c,f=pc){let t=c.headers??{},h=t.Expect||t.expect,i=-1,r=!1;if(h==="100-continue")await Promise.race([new Promise((s)=>{i=Number(setTimeout(s,Math.max(pc,f)))}),new Promise((s)=>{n.on("continue",()=>{clearTimeout(i),s()}),n.on("error",()=>{r=!0,clearTimeout(i),s()})})]);if(!r)ff(n,c.body)}Y(Zn,"writeRequestBody");function ff(n,c){if(c instanceof cf.Readable){c.pipe(n);return}if(c){if(Buffer.isBuffer(c)||typeof c==="string"){n.end(c);return}let f=c;if(typeof f==="object"&&f.buffer&&typeof f.byteOffset==="number"&&typeof f.byteLength==="number"){n.end(Buffer.from(f.buffer,f.byteOffset,f.byteLength));return}n.end(Buffer.from(c));return}n.end()}Y(ff,"writeBody");var Ni=0,tf=class n{constructor(c){this.socketWarningTimestamp=0,this.metadata={handlerProtocol:"http/1.1"},this.configProvider=new Promise((f,t)=>{if(typeof c==="function")c().then((h)=>{f(this.resolveDefaultConfig(h))}).catch(t);else f(this.resolveDefaultConfig(c))})}static create(c){if(typeof(c==null?void 0:c.handle)==="function")return c;return new n(c)}static checkSocketUsage(c,f,t=console){var h,i,r;let{sockets:s,requests:w,maxSockets:x}=c;if(typeof x!=="number"||x===1/0)return f;let D=15000;if(Date.now()-D<f)return f;if(s&&w)for(let u in s){let E=((h=s[u])==null?void 0:h.length)??0,$=((i=w[u])==null?void 0:i.length)??0;if(E>=x&&$>=2*x)return(r=t==null?void 0:t.warn)==null||r.call(t,`@smithy/node-http-handler:WARN - socket usage at capacity=${E} and ${$} 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 f}resolveDefaultConfig(c){let{requestTimeout:f,connectionTimeout:t,socketTimeout:h,httpAgent:i,httpsAgent:r}=c||{},s=!0,w=50;return{connectionTimeout:t,requestTimeout:f??h,httpAgent:(()=>{if(i instanceof zn.Agent||typeof(i==null?void 0:i.destroy)==="function")return i;return new zn.Agent({keepAlive:!0,maxSockets:50,...i})})(),httpsAgent:(()=>{if(r instanceof Vn.Agent||typeof(r==null?void 0:r.destroy)==="function")return r;return new Vn.Agent({keepAlive:!0,maxSockets:50,...r})})(),logger:console}}destroy(){var c,f,t,h;(f=(c=this.config)==null?void 0:c.httpAgent)==null||f.destroy(),(h=(t=this.config)==null?void 0:t.httpsAgent)==null||h.destroy()}async handle(c,{abortSignal:f}={}){if(!this.config)this.config=await this.configProvider;return new Promise((t,h)=>{let i=void 0,r=[],s=Y(async(F)=>{await i,r.forEach(clearTimeout),t(F)},"resolve"),w=Y(async(F)=>{await i,r.forEach(clearTimeout),h(F)},"reject");if(!this.config)throw new Error("Node HTTP request handler config is not resolved");if(f==null?void 0:f.aborted){let F=new Error("Request aborted");F.name="AbortError",w(F);return}let x=c.protocol==="https:",D=x?this.config.httpsAgent:this.config.httpAgent;r.push(setTimeout(()=>{this.socketWarningTimestamp=n.checkSocketUsage(D,this.socketWarningTimestamp,this.config.logger)},this.config.socketAcquisitionWarningTimeout??(this.config.requestTimeout??2000)+(this.config.connectionTimeout??1000)));let u=_c.buildQueryString(c.query||{}),E=void 0;if(c.username!=null||c.password!=null){let F=c.username??"",d=c.password??"";E=`${F}:${d}`}let $=c.path;if(u)$+=`?${u}`;if(c.fragment)$+=`#${c.fragment}`;let N=c.hostname??"";if(N[0]==="["&&N.endsWith("]"))N=c.hostname.slice(1,-1);else N=c.hostname;let y={headers:c.headers,host:N,method:c.method,path:$,port:c.port,agent:D,auth:E},U=(x?Vn.request:zn.request)(y,(F)=>{let d=new mc.HttpResponse({statusCode:F.statusCode||-1,reason:F.statusMessage,headers:nf(F.headers),body:F});s({response:d})});if(U.on("error",(F)=>{if(xi.includes(F.code))w(Object.assign(F,{name:"TimeoutError"}));else w(F)}),f){let F=Y(()=>{U.destroy();let d=new Error("Request aborted");d.name="AbortError",w(d)},"onAbort");if(typeof f.addEventListener==="function"){let d=f;d.addEventListener("abort",F,{once:!0}),U.once("close",()=>d.removeEventListener("abort",F))}else f.onabort=F}r.push(Ei(U,w,this.config.connectionTimeout)),r.push(Ui(U,w,this.config.requestTimeout));let T=y.agent;if(typeof T==="object"&&"keepAlive"in T)r.push(Ci(U,{keepAlive:T.keepAlive,keepAliveMsecs:T.keepAliveMsecs}));i=Zn(U,c,this.config.requestTimeout).catch((F)=>{return r.forEach(clearTimeout),h(F)})})}updateHttpClientConfig(c,f){this.config=void 0,this.configProvider=this.configProvider.then((t)=>{return{...t,[c]:f}})}httpHandlerConfigs(){return this.config??{}}};Y(tf,"NodeHttpHandler");var di=tf,qc=import.meta.require("http2"),Di=$i(import.meta.require("http2")),hf=class n{constructor(c){this.sessions=[],this.sessions=c??[]}poll(){if(this.sessions.length>0)return this.sessions.shift()}offerLast(c){this.sessions.push(c)}contains(c){return this.sessions.includes(c)}remove(c){this.sessions=this.sessions.filter((f)=>f!==c)}[Symbol.iterator](){return this.sessions[Symbol.iterator]()}destroy(c){for(let f of this.sessions)if(f===c){if(!f.destroyed)f.destroy()}}};Y(hf,"NodeHttp2ConnectionPool");var yi=hf,rf=class n{constructor(c){if(this.sessionCache=new Map,this.config=c,this.config.maxConcurrency&&this.config.maxConcurrency<=0)throw new RangeError("maxConcurrency must be greater than zero.")}lease(c,f){let t=this.getUrlString(c),h=this.sessionCache.get(t);if(h){let w=h.poll();if(w&&!this.config.disableConcurrency)return w}let i=Di.default.connect(t);if(this.config.maxConcurrency)i.settings({maxConcurrentStreams:this.config.maxConcurrency},(w)=>{if(w)throw new Error("Fail to set maxConcurrentStreams to "+this.config.maxConcurrency+"when creating new session for "+c.destination.toString())});i.unref();let r=Y(()=>{i.destroy(),this.deleteSession(t,i)},"destroySessionCb");if(i.on("goaway",r),i.on("error",r),i.on("frameError",r),i.on("close",()=>this.deleteSession(t,i)),f.requestTimeout)i.setTimeout(f.requestTimeout,r);let s=this.sessionCache.get(t)||new yi;return s.offerLast(i),this.sessionCache.set(t,s),i}deleteSession(c,f){let t=this.sessionCache.get(c);if(!t)return;if(!t.contains(f))return;t.remove(f),this.sessionCache.set(c,t)}release(c,f){var t;let h=this.getUrlString(c);(t=this.sessionCache.get(h))==null||t.offerLast(f)}destroy(){for(let[c,f]of this.sessionCache){for(let t of f){if(!t.destroyed)t.destroy();f.remove(t)}this.sessionCache.delete(c)}}setMaxConcurrentStreams(c){if(this.config.maxConcurrency&&this.config.maxConcurrency<=0)throw new RangeError("maxConcurrentStreams must be greater than zero.");this.config.maxConcurrency=c}setDisableConcurrentStreams(c){this.config.disableConcurrency=c}getUrlString(c){return c.destination.toString()}};Y(rf,"NodeHttp2ConnectionManager");var Yi=rf,sf=class n{constructor(c){this.metadata={handlerProtocol:"h2"},this.connectionManager=new Yi({}),this.configProvider=new Promise((f,t)=>{if(typeof c==="function")c().then((h)=>{f(h||{})}).catch(t);else f(c||{})})}static create(c){if(typeof(c==null?void 0:c.handle)==="function")return c;return new n(c)}destroy(){this.connectionManager.destroy()}async handle(c,{abortSignal:f}={}){if(!this.config){if(this.config=await this.configProvider,this.connectionManager.setDisableConcurrentStreams(this.config.disableConcurrentStreams||!1),this.config.maxConcurrentStreams)this.connectionManager.setMaxConcurrentStreams(this.config.maxConcurrentStreams)}let{requestTimeout:t,disableConcurrentStreams:h}=this.config;return new Promise((i,r)=>{var s;let w=!1,x=void 0,D=Y(async(z)=>{await x,i(z)},"resolve"),u=Y(async(z)=>{await x,r(z)},"reject");if(f==null?void 0:f.aborted){w=!0;let z=new Error("Request aborted");z.name="AbortError",u(z);return}let{hostname:E,method:$,port:N,protocol:y,query:C}=c,U="";if(c.username!=null||c.password!=null){let z=c.username??"",Q=c.password??"";U=`${z}:${Q}@`}let T=`${y}//${U}${E}${N?`:${N}`:""}`,F={destination:new URL(T)},d=this.connectionManager.lease(F,{requestTimeout:(s=this.config)==null?void 0:s.sessionTimeout,disableConcurrentStreams:h||!1}),V=Y((z)=>{if(h)this.destroySession(d);w=!0,u(z)},"rejectWithDestroy"),Z=_c.buildQueryString(C||{}),W=c.path;if(Z)W+=`?${Z}`;if(c.fragment)W+=`#${c.fragment}`;let G=d.request({...c.headers,[qc.constants.HTTP2_HEADER_PATH]:W,[qc.constants.HTTP2_HEADER_METHOD]:$});if(d.ref(),G.on("response",(z)=>{let Q=new mc.HttpResponse({statusCode:z[":status"]||-1,headers:nf(z),body:G});if(w=!0,D({response:Q}),h)d.close(),this.connectionManager.deleteSession(T,d)}),t)G.setTimeout(t,()=>{G.close();let z=new Error(`Stream timed out because of no activity for ${t} ms`);z.name="TimeoutError",V(z)});if(f){let z=Y(()=>{G.close();let Q=new Error("Request aborted");Q.name="AbortError",V(Q)},"onAbort");if(typeof f.addEventListener==="function"){let Q=f;Q.addEventListener("abort",z,{once:!0}),G.once("close",()=>Q.removeEventListener("abort",z))}else f.onabort=z}G.on("frameError",(z,Q,Qt)=>{V(new Error(`Frame type id ${z} in stream id ${Qt} has failed with code ${Q}.`))}),G.on("error",V),G.on("aborted",()=>{V(new Error(`HTTP/2 stream is abnormally aborted in mid-communication with result code ${G.rstCode}.`))}),G.on("close",()=>{if(d.unref(),h)d.destroy();if(!w)V(new Error("Unexpected error: http2 request did not get a response"))}),x=Zn(G,c,t)})}updateHttpClientConfig(c,f){this.config=void 0,this.configProvider=this.configProvider.then((t)=>{return{...t,[c]:f}})}httpHandlerConfigs(){return this.config??{}}destroySession(c){if(!c.destroyed)c.destroy()}};Y(sf,"NodeHttp2Handler");var Ii=sf,wf=class n extends cf.Writable{constructor(){super(...arguments);this.bufferedBytes=[]}_write(c,f,t){this.bufferedBytes.push(c),t()}};Y(wf,"Collector");var zi=wf,Vi=Y((n)=>{if(Zi(n))return uf(n);return new Promise((c,f)=>{let t=new zi;n.pipe(t),n.on("error",(h)=>{t.end(),f(h)}),t.on("error",f),t.on("finish",function(){let h=new Uint8Array(Buffer.concat(this.bufferedBytes));c(h)})})},"streamCollector"),Zi=Y((n)=>typeof ReadableStream==="function"&&n instanceof ReadableStream,"isReadableStreamInstance");async function uf(n){let c=[],f=n.getReader(),t=!1,h=0;while(!t){let{done:s,value:w}=await f.read();if(w)c.push(w),h+=w.length;t=s}let i=new Uint8Array(h),r=0;for(let s of c)i.set(s,r),r+=s.length;return i}Y(uf,"collectReadableStream")});var yf=I((Cr,Df)=>{var{defineProperty:rn,getOwnPropertyDescriptor:Gi,getOwnPropertyNames:Li}=Object,Qi=Object.prototype.hasOwnProperty,b=(n,c)=>rn(n,"name",{value:c,configurable:!0}),Xi=(n,c)=>{for(var f in c)rn(n,f,{get:c[f],enumerable:!0})},bi=(n,c,f,t)=>{if(c&&typeof c==="object"||typeof c==="function"){for(let h of Li(c))if(!Qi.call(n,h)&&h!==f)rn(n,h,{get:()=>c[h],enumerable:!(t=Gi(c,h))||t.enumerable})}return n},Ki=(n)=>bi(rn({},"__esModule",{value:!0}),n),Ef={};Xi(Ef,{FetchHttpHandler:()=>Wi,keepAliveSupport:()=>hn,streamCollector:()=>Bi});Df.exports=Ki(Ef);var xf=dn(),Si=In();function Ff(n=0){return new Promise((c,f)=>{if(n)setTimeout(()=>{let t=new Error(`Request did not complete within ${n} ms`);t.name="TimeoutError",f(t)},n)})}b(Ff,"requestTimeout");var hn={supported:void 0},Cf=class n{static create(c){if(typeof(c==null?void 0:c.handle)==="function")return c;return new n(c)}constructor(c){if(typeof c==="function")this.configProvider=c().then((f)=>f||{});else this.config=c??{},this.configProvider=Promise.resolve(this.config);if(hn.supported===void 0)hn.supported=Boolean(typeof Request!=="undefined"&&"keepalive"in new Request("https://[::1]"))}destroy(){}async handle(c,{abortSignal:f}={}){var t;if(!this.config)this.config=await this.configProvider;let h=this.config.requestTimeout,i=this.config.keepAlive===!0,r=this.config.credentials;if(f==null?void 0:f.aborted){let T=new Error("Request aborted");return T.name="AbortError",Promise.reject(T)}let s=c.path,w=Si.buildQueryString(c.query||{});if(w)s+=`?${w}`;if(c.fragment)s+=`#${c.fragment}`;let x="";if(c.username!=null||c.password!=null){let T=c.username??"",F=c.password??"";x=`${T}:${F}@`}let{port:D,method:u}=c,E=`${c.protocol}//${x}${c.hostname}${D?`:${D}`:""}${s}`,$=u==="GET"||u==="HEAD"?void 0:c.body,N={body:$,headers:new Headers(c.headers),method:u,credentials:r};if((t=this.config)==null?void 0:t.cache)N.cache=this.config.cache;if($)N.duplex="half";if(typeof AbortController!=="undefined")N.signal=f;if(hn.supported)N.keepalive=i;if(typeof this.config.requestInit==="function")Object.assign(N,this.config.requestInit(c));let y=b(()=>{},"removeSignalEventListener"),C=new Request(E,N),U=[fetch(C).then((T)=>{let F=T.headers,d={};for(let Z of F.entries())d[Z[0]]=Z[1];if(T.body==null)return T.blob().then((Z)=>({response:new xf.HttpResponse({headers:d,reason:T.statusText,statusCode:T.status,body:Z})}));return{response:new xf.HttpResponse({headers:d,reason:T.statusText,statusCode:T.status,body:T.body})}}),Ff(h)];if(f)U.push(new Promise((T,F)=>{let d=b(()=>{let V=new Error("Request aborted");V.name="AbortError",F(V)},"onAbort");if(typeof f.addEventListener==="function"){let V=f;V.addEventListener("abort",d,{once:!0}),y=b(()=>V.removeEventListener("abort",d),"removeSignalEventListener")}else f.onabort=d}));return Promise.race(U).finally(y)}updateHttpClientConfig(c,f){this.config=void 0,this.configProvider=this.configProvider.then((t)=>{return t[c]=f,t})}httpHandlerConfigs(){return this.config??{}}};b(Cf,"FetchHttpHandler");var Wi=Cf,Ji=m(),Bi=b((n)=>{if(typeof Blob==="function"&&n instanceof Blob)return Uf(n);return Nf(n)},"streamCollector");async function Uf(n){let c=await df(n),f=Ji.fromBase64(c);return new Uint8Array(f)}b(Uf,"collectBlob");async function Nf(n){let c=[],f=n.getReader(),t=!1,h=0;while(!t){let{done:s,value:w}=await f.read();if(w)c.push(w),h+=w.length;t=s}let i=new Uint8Array(h),r=0;for(let s of c)i.set(s,r),r+=s.length;return i}b(Nf,"collectStream");function df(n){return new Promise((c,f)=>{let t=new FileReader;t.onloadend=()=>{if(t.readyState!==2)return f(new Error("Reader aborted too early"));let h=t.result??"",i=h.indexOf(","),r=i>-1?i+1:h.length;c(h.substring(r))},t.onabort=()=>f(new Error("Read aborted")),t.onerror=()=>f(t.error),t.readAsDataURL(n)})}b(df,"readToBase64")});var Lf=I((Ur,Gf)=>{var{defineProperty:sn,getOwnPropertyDescriptor:ji,getOwnPropertyNames:Mi}=Object,Ri=Object.prototype.hasOwnProperty,Yf=(n,c)=>sn(n,"name",{value:c,configurable:!0}),gi=(n,c)=>{for(var f in c)sn(n,f,{get:c[f],enumerable:!0})},Ai=(n,c,f,t)=>{if(c&&typeof c==="object"||typeof c==="function"){for(let h of Mi(c))if(!Ri.call(n,h)&&h!==f)sn(n,h,{get:()=>c[h],enumerable:!(t=ji(c,h))||t.enumerable})}return n},Hi=(n)=>Ai(sn({},"__esModule",{value:!0}),n),If={};gi(If,{fromHex:()=>Vf,toHex:()=>Zf});Gf.exports=Hi(If);var zf={},Gn={};for(let n=0;n<256;n++){let c=n.toString(16).toLowerCase();if(c.length===1)c=`0${c}`;zf[n]=c,Gn[c]=n}function Vf(n){if(n.length%2!==0)throw new Error("Hex encoded strings must have an even number length");let c=new Uint8Array(n.length/2);for(let f=0;f<n.length;f+=2){let t=n.slice(f,f+2).toLowerCase();if(t in Gn)c[f/2]=Gn[t];else throw new Error(`Cannot decode unrecognized sequence ${t} as hexadecimal`)}return c}Yf(Vf,"fromHex");function Zf(n){let c="";for(let f=0;f<n.byteLength;f++)c+=zf[n[f]];return c}Yf(Zf,"toHex")});var H=I((Qf)=>{Object.defineProperty(Qf,"__esModule",{value:!0});Qf.isReadableStream=void 0;var Pi=(n)=>{var c;return typeof ReadableStream==="function"&&(((c=n===null||n===void 0?void 0:n.constructor)===null||c===void 0?void 0:c.name)===ReadableStream.name||n instanceof ReadableStream)};Qf.isReadableStream=Pi});var Bf=I((Wf)=>{Object.defineProperty(Wf,"__esModule",{value:!0});Wf.sdkStreamMixin=void 0;var Oi=yf(),ki=m(),li=Lf(),vi=e(),bf=H(),Kf="The stream has already been transformed.",oi=(n)=>{var c,f;if(!Sf(n)&&!bf.isReadableStream(n)){let r=((f=(c=n===null||n===void 0?void 0:n.__proto__)===null||c===void 0?void 0:c.constructor)===null||f===void 0?void 0:f.name)||n;throw new Error(`Unexpected stream implementation, expect Blob or ReadableStream, got ${r}`)}let t=!1,h=async()=>{if(t)throw new Error(Kf);return t=!0,await Oi.streamCollector(n)},i=(r)=>{if(typeof r.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 r.stream()};return Object.assign(n,{transformToByteArray:h,transformToString:async(r)=>{let s=await h();if(r==="base64")return ki.toBase64(s);else if(r==="hex")return li.toHex(s);else if(r===void 0||r==="utf8"||r==="utf-8")return vi.toUtf8(s);else if(typeof TextDecoder==="function")return new TextDecoder(r).decode(s);else throw new Error("TextDecoder is not available, please make sure polyfill is provided.")},transformToWebStream:()=>{if(t)throw new Error(Kf);if(t=!0,Sf(n))return i(n);else if(bf.isReadableStream(n))return n;else throw new Error(`Cannot transform payload to web stream, got ${n}`)}})};Wf.sdkStreamMixin=oi;var Sf=(n)=>typeof Blob==="function"&&n instanceof Blob});var gf=I((Mf)=>{Object.defineProperty(Mf,"__esModule",{value:!0});Mf.sdkStreamMixin=void 0;var pi=Tf(),qi=g(),Ln=import.meta.require("stream"),ei=import.meta.require("util"),ai=Bf(),jf="The stream has already been transformed.",mi=(n)=>{var c,f;if(!(n instanceof Ln.Readable))try{return ai.sdkStreamMixin(n)}catch(i){let r=((f=(c=n===null||n===void 0?void 0:n.__proto__)===null||c===void 0?void 0:c.constructor)===null||f===void 0?void 0:f.name)||n;throw new Error(`Unexpected stream implementation, expect Stream.Readable instance, got ${r}`)}let t=!1,h=async()=>{if(t)throw new Error(jf);return t=!0,await pi.streamCollector(n)};return Object.assign(n,{transformToByteArray:h,transformToString:async(i)=>{let r=await h();if(i===void 0||Buffer.isEncoding(i))return qi.fromArrayBuffer(r.buffer,r.byteOffset,r.byteLength).toString(i);else return new ei.TextDecoder(i).decode(r)},transformToWebStream:()=>{if(t)throw new Error(jf);if(n.readableFlowing!==null)throw new Error("The stream has been consumed by other callbacks.");if(typeof Ln.Readable.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 t=!0,Ln.Readable.toWeb(n)}})};Mf.sdkStreamMixin=mi});var Pf=I((Af)=>{Object.defineProperty(Af,"__esModule",{value:!0});Af.splitStream=void 0;async function _i(n){if(typeof n.stream==="function")n=n.stream();return n.tee()}Af.splitStream=_i});var vf=I((kf)=>{Object.defineProperty(kf,"__esModule",{value:!0});kf.splitStream=void 0;var Of=import.meta.require("stream"),n0=Pf(),c0=H();async function f0(n){if(c0.isReadableStream(n))return n0.splitStream(n);let c=new Of.PassThrough,f=new Of.PassThrough;return n.pipe(c),n.pipe(f),[c,f]}kf.splitStream=f0});var qf=I((of)=>{Object.defineProperty(of,"__esModule",{value:!0});of.headStream=void 0;async function t0(n,c){var f;let t=0,h=[],i=n.getReader(),r=!1;while(!r){let{done:x,value:D}=await i.read();if(D)h.push(D),t+=(f=D===null||D===void 0?void 0:D.byteLength)!==null&&f!==void 0?f:0;if(t>=c)break;r=x}i.releaseLock();let s=new Uint8Array(Math.min(c,t)),w=0;for(let x of h){if(x.byteLength>s.byteLength-w){s.set(x.subarray(0,s.byteLength-w),w);break}else s.set(x,w);w+=x.length}return s}of.headStream=t0});var _f=I((af)=>{Object.defineProperty(af,"__esModule",{value:!0});af.headStream=void 0;var h0=import.meta.require("stream"),i0=qf(),r0=H(),s0=(n,c)=>{if(r0.isReadableStream(n))return i0.headStream(n,c);return new Promise((f,t)=>{let h=new ef;h.limit=c,n.pipe(h),n.on("error",(i)=>{h.end(),t(i)}),h.on("error",t),h.on("finish",function(){let i=new Uint8Array(Buffer.concat(this.buffers));f(i)})})};af.headStream=s0;class ef extends h0.Writable{constructor(){super(...arguments);this.buffers=[],this.limit=1/0,this.bytesBuffered=0}_write(n,c,f){var t;if(this.buffers.push(n),this.bytesBuffered+=(t=n.byteLength)!==null&&t!==void 0?t:0,this.bytesBuffered>=this.limit){let h=this.bytesBuffered-this.limit,i=this.buffers[this.buffers.length-1];this.buffers[this.buffers.length-1]=i.subarray(0,i.byteLength-h),this.emit("finish")}f()}}});var it=I((Vr,j)=>{var{defineProperty:wn,getOwnPropertyDescriptor:w0,getOwnPropertyNames:u0}=Object,$0=Object.prototype.hasOwnProperty,bn=(n,c)=>wn(n,"name",{value:c,configurable:!0}),T0=(n,c)=>{for(var f in c)wn(n,f,{get:c[f],enumerable:!0})},Qn=(n,c,f,t)=>{if(c&&typeof c==="object"||typeof c==="function"){for(let h of u0(c))if(!$0.call(n,h)&&h!==f)wn(n,h,{get:()=>c[h],enumerable:!(t=w0(c,h))||t.enumerable})}return n},P=(n,c,f)=>(Qn(n,c,"default"),f&&Qn(f,c,"default")),x0=(n)=>Qn(wn({},"__esModule",{value:!0}),n),B={};T0(B,{Uint8ArrayBlobAdapter:()=>Xn});j.exports=x0(B);var nt=m(),ct=e();function ft(n,c="utf-8"){if(c==="base64")return nt.toBase64(n);return ct.toUtf8(n)}bn(ft,"transformToString");function tt(n,c){if(c==="base64")return Xn.mutate(nt.fromBase64(n));return Xn.mutate(ct.fromUtf8(n))}bn(tt,"transformFromString");var ht=class n extends Uint8Array{static fromString(c,f="utf-8"){switch(typeof c){case"string":return tt(c,f);default:throw new Error(`Unsupported conversion from ${typeof c} to Uint8ArrayBlobAdapter.`)}}static mutate(c){return Object.setPrototypeOf(c,n.prototype),c}transformToString(c="utf-8"){return ft(this,c)}};bn(ht,"Uint8ArrayBlobAdapter");var Xn=ht;P(B,yc(),j.exports);P(B,gf(),j.exports);P(B,vf(),j.exports);P(B,_f(),j.exports);P(B,H(),j.exports)});var on=v(En(),1);class Bt{constructor(n){this.config=n,this.middlewareStack=on.constructStack()}send(n,c,f){let t=typeof c!=="function"?c:void 0,h=typeof c==="function"?c:f,i=t===void 0&&this.config.cacheMiddleware===!0,r;if(i){if(!this.handlers)this.handlers=new WeakMap;let s=this.handlers;if(s.has(n.constructor))r=s.get(n.constructor);else r=n.resolveMiddleware(this.middlewareStack,this.config,t),s.set(n.constructor,r)}else delete this.handlers,r=n.resolveMiddleware(this.middlewareStack,this.config,t);if(h)r(n).then((s)=>h(null,s.output),(s)=>h(s)).catch(()=>{});else return r(n).then((s)=>s.output)}destroy(){this.config?.requestHandler?.destroy?.(),delete this.handlers}}var qn=v(En(),1);class en{constructor(){this.middlewareStack=qn.constructStack()}static classBuilder(){return new an}resolveMiddlewareWithContext(n,c,f,{middlewareFn:t,clientName:h,commandName:i,inputFilterSensitiveLog:r,outputFilterSensitiveLog:s,smithyContext:w,additionalContext:x,CommandCtor:D}){for(let y of t.bind(this)(D,n,c,f))this.middlewareStack.use(y);let u=n.concat(this.middlewareStack),{logger:E}=c,$={logger:E,clientName:h,commandName:i,inputFilterSensitiveLog:r,outputFilterSensitiveLog:s,[pn]:{commandInstance:this,...w},...x},{requestHandler:N}=c;return u.resolve((y)=>N.handle(y.request,f||{}),$)}}class an{constructor(){this._init=()=>{},this._ep={},this._middlewareFn=()=>[],this._commandName="",this._clientName="",this._additionalContext={},this._smithyContext={},this._inputFilterSensitiveLog=(n)=>n,this._outputFilterSensitiveLog=(n)=>n,this._serializer=null,this._deserializer=null}init(n){this._init=n}ep(n){return this._ep=n,this}m(n){return this._middlewareFn=n,this}s(n,c,f={}){return this._smithyContext={service:n,operation:c,...f},this}c(n={}){return this._additionalContext=n,this}n(n,c){return this._clientName=n,this._commandName=c,this}f(n=(f)=>f,c=(f)=>f){return this._inputFilterSensitiveLog=n,this._outputFilterSensitiveLog=c,this}ser(n){return this._serializer=n,this}de(n){return this._deserializer=n,this}build(){let n=this,c;return c=class extends en{static getEndpointParameterInstructions(){return n._ep}constructor(...[f]){super();this.serialize=n._serializer,this.deserialize=n._deserializer,this.input=f??{},n._init(this)}resolveMiddleware(f,t,h){return this.resolveMiddlewareWithContext(f,t,h,{CommandCtor:c,middlewareFn:n._middlewareFn,clientName:n._clientName,commandName:n._commandName,inputFilterSensitiveLog:n._inputFilterSensitiveLog,outputFilterSensitiveLog:n._outputFilterSensitiveLog,smithyContext:n._smithyContext,additionalContext:n._additionalContext})}}}}var a0="***SensitiveInformation***";var _0=(n,c)=>{for(let f of Object.keys(n)){let t=n[f],h=async function(r,s,w){let x=new t(r);if(typeof s==="function")this.send(x,s);else if(typeof w==="function"){if(typeof s!=="object")throw new Error(`Expected http options but got ${typeof s}`);this.send(x,s||{},w)}else return this.send(x,s)},i=(f[0].toLowerCase()+f.slice(1)).replace(/Command$/,"");c.prototype[i]=h}};class mn extends Error{constructor(n){super(n.message);Object.setPrototypeOf(this,mn.prototype),this.name=n.name,this.$fault=n.$fault,this.$metadata=n.$metadata}}var _n=(n,c={})=>{Object.entries(c).filter(([,t])=>t!==void 0).forEach(([t,h])=>{if(n[t]==null||n[t]==="")n[t]=h});let f=n.message||n.Message||"UnknownError";return n.message=f,delete n.Message,n};class jt{trace(){}debug(){}info(){}warn(){}error(){}}var un=v(it(),1),Zr=async(n=new Uint8Array,c)=>{if(n instanceof Uint8Array)return un.Uint8ArrayBlobAdapter.mutate(n);if(!n)return un.Uint8ArrayBlobAdapter.mutate(new Uint8Array);let f=c.streamCollector(n);return un.Uint8ArrayBlobAdapter.mutate(await f)};var Lr=(n)=>{switch(n){case"true":return!0;case"false":return!1;default:throw new Error(`Unable to parse boolean value "${n}"`)}};var E0=(n)=>{if(n===null||n===void 0)return;if(typeof n==="string"){let c=parseFloat(n);if(!Number.isNaN(c)){if(String(c)!==String(n))Et.warn(xt(`Expected number but observed string: ${n}`));return c}}if(typeof n==="number")return n;throw new TypeError(`Expected number, got ${typeof n}: ${n}`)},F0=Math.ceil(340282346638528860000000000000000000000),rt=(n)=>{let c=E0(n);if(c!==void 0&&!Number.isNaN(c)&&c!==1/0&&c!==-1/0){if(Math.abs(c)>F0)throw new TypeError(`Expected 32-bit float, got ${n}`)}return c},Kn=(n)=>{if(n===null||n===void 0)return;if(Number.isInteger(n)&&!Number.isNaN(n))return n;throw new TypeError(`Expected integer, got ${typeof n}: ${n}`)};var st=(n)=>Sn(n,32),wt=(n)=>Sn(n,16),ut=(n)=>Sn(n,8),Sn=(n,c)=>{let f=Kn(n);if(f!==void 0&&C0(f,c)!==f)throw new TypeError(`Expected ${c}-bit integer, got ${n}`);return f},C0=(n,c)=>{switch(c){case 32:return Int32Array.of(n)[0];case 16:return Int16Array.of(n)[0];case 8:return Int8Array.of(n)[0]}},Qr=(n,c)=>{if(n===null||n===void 0){if(c)throw new TypeError(`Expected a non-null value for ${c}`);throw new TypeError("Expected a non-null value")}return n},Xr=(n)=>{if(n===null||n===void 0)return;if(typeof n==="object"&&!Array.isArray(n))return n;let c=Array.isArray(n)?"array":typeof n;throw new TypeError(`Expected object, got ${c}: ${n}`)},br=(n)=>{if(n===null||n===void 0)return;if(typeof n==="string")return n;if(["boolean","number","bigint"].includes(typeof n))return Et.warn(xt(`Expected string, got ${typeof n}: ${n}`)),String(n);throw new TypeError(`Expected string, got ${typeof n}: ${n}`)};var $t=(n)=>{if(typeof n=="string")return rt(O(n));return rt(n)},U0=/(-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?)|(-?Infinity)|(NaN)/g,O=(n)=>{let c=n.match(U0);if(c===null||c[0].length!==n.length)throw new TypeError("Expected real number, got implicit NaN");return parseFloat(n)};var Kr=(n)=>{if(typeof n==="string")return Kn(O(n));return Kn(n)};var Sr=(n)=>{if(typeof n==="string")return st(O(n));return st(n)},M=(n)=>{if(typeof n==="string")return wt(O(n));return wt(n)},Tt=(n)=>{if(typeof n==="string")return ut(O(n));return ut(n)},xt=(n)=>{return String(new TypeError(n).stack||n).split("\n").slice(0,5).filter((c)=>!c.includes("stackTraceWarning")).join("\n")},Et={warn:console.warn};var N0=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],Jn=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function jr(n){let c=n.getUTCFullYear(),f=n.getUTCMonth(),t=n.getUTCDay(),h=n.getUTCDate(),i=n.getUTCHours(),r=n.getUTCMinutes(),s=n.getUTCSeconds(),w=h<10?`0${h}`:`${h}`,x=i<10?`0${i}`:`${i}`,D=r<10?`0${r}`:`${r}`,u=s<10?`0${s}`:`${s}`;return`${N0[t]}, ${w} ${Jn[f]} ${c} ${x}:${D}:${u} GMT`}var d0=new RegExp(/^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?[zZ]$/),Mr=(n)=>{if(n===null||n===void 0)return;if(typeof n!=="string")throw new TypeError("RFC-3339 date-times must be expressed as strings");let c=d0.exec(n);if(!c)throw new TypeError("Invalid RFC-3339 date-time value");let[f,t,h,i,r,s,w,x]=c,D=M(R(t)),u=X(h,"month",1,12),E=X(i,"day",1,31);return k(D,u,E,{hours:r,minutes:s,seconds:w,fractionalMilliseconds:x})},D0=new RegExp(/^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?(([-+]\d{2}\:\d{2})|[zZ])$/),Rr=(n)=>{if(n===null||n===void 0)return;if(typeof n!=="string")throw new TypeError("RFC-3339 date-times must be expressed as strings");let c=D0.exec(n);if(!c)throw new TypeError("Invalid RFC-3339 date-time value");let[f,t,h,i,r,s,w,x,D]=c,u=M(R(t)),E=X(h,"month",1,12),$=X(i,"day",1,31),N=k(u,E,$,{hours:r,minutes:s,seconds:w,fractionalMilliseconds:x});if(D.toUpperCase()!="Z")N.setTime(N.getTime()-b0(D));return N},y0=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$/),Y0=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$/),I0=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})$/),gr=(n)=>{if(n===null||n===void 0)return;if(typeof n!=="string")throw new TypeError("RFC-7231 date-times must be expressed as strings");let c=y0.exec(n);if(c){let[f,t,h,i,r,s,w,x]=c;return k(M(R(i)),Wn(h),X(t,"day",1,31),{hours:r,minutes:s,seconds:w,fractionalMilliseconds:x})}if(c=Y0.exec(n),c){let[f,t,h,i,r,s,w,x]=c;return Z0(k(z0(i),Wn(h),X(t,"day",1,31),{hours:r,minutes:s,seconds:w,fractionalMilliseconds:x}))}if(c=I0.exec(n),c){let[f,t,h,i,r,s,w,x]=c;return k(M(R(x)),Wn(t),X(h.trimLeft(),"day",1,31),{hours:i,minutes:r,seconds:s,fractionalMilliseconds:w})}throw new TypeError("Invalid RFC-7231 date-time value")};var k=(n,c,f,t)=>{let h=c-1;return L0(n,h,f),new Date(Date.UTC(n,h,f,X(t.hours,"hour",0,23),X(t.minutes,"minute",0,59),X(t.seconds,"seconds",0,60),X0(t.fractionalMilliseconds)))},z0=(n)=>{let c=new Date().getUTCFullYear(),f=Math.floor(c/100)*100+M(R(n));if(f<c)return f+100;return f},V0=1576800000000,Z0=(n)=>{if(n.getTime()-new Date().getTime()>V0)return new Date(Date.UTC(n.getUTCFullYear()-100,n.getUTCMonth(),n.getUTCDate(),n.getUTCHours(),n.getUTCMinutes(),n.getUTCSeconds(),n.getUTCMilliseconds()));return n},Wn=(n)=>{let c=Jn.indexOf(n);if(c<0)throw new TypeError(`Invalid month: ${n}`);return c+1},G0=[31,28,31,30,31,30,31,31,30,31,30,31],L0=(n,c,f)=>{let t=G0[c];if(c===1&&Q0(n))t=29;if(f>t)throw new TypeError(`Invalid day for ${Jn[c]} in ${n}: ${f}`)},Q0=(n)=>{return n%4===0&&(n%100!==0||n%400===0)},X=(n,c,f,t)=>{let h=Tt(R(n));if(h<f||h>t)throw new TypeError(`${c} must be between ${f} and ${t}, inclusive`);return h},X0=(n)=>{if(n===null||n===void 0)return 0;return $t("0."+n)*1000},b0=(n)=>{let c=n[0],f=1;if(c=="+")f=1;else if(c=="-")f=-1;else throw new TypeError(`Offset direction, ${c}, must be "+" or "-"`);let t=Number(n.substring(1,3)),h=Number(n.substring(4,6));return f*(t*60+h)*60*1000},R=(n)=>{let c=0;while(c<n.length-1&&n.charAt(c)==="0")c++;if(c===0)return n;return n.slice(c)};var K0=({output:n,parsedBody:c,exceptionCtor:f,errorCode:t})=>{let h=S0(n),i=h.httpStatusCode?h.httpStatusCode+"":void 0,r=new f({name:c?.code||c?.Code||t||i||"UnknownError",$fault:"client",$metadata:h});throw _n(r,c)},Pr=(n)=>{return({output:c,parsedBody:f,errorCode:t})=>{K0({output:c,parsedBody:f,exceptionCtor:n,errorCode:t})}},S0=(n)=>({httpStatusCode:n.statusCode,requestId:n.headers["x-amzn-requestid"]??n.headers["x-amzn-request-id"]??n.headers["x-amz-request-id"],extendedRequestId:n.headers["x-amz-id-2"],cfId:n.headers["x-amz-cf-id"]});var kr=(n)=>{switch(n){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 Ft=!1,vr=(n)=>{if(n&&!Ft&&parseInt(n.substring(1,n.indexOf(".")))<16)Ft=!0};var Ct=(n)=>{let c=[];for(let f in Bn){let t=Bn[f];if(n[t]===void 0)continue;c.push({algorithmId:()=>t,checksumConstructor:()=>n[t]})}return{_checksumAlgorithms:c,addChecksumAlgorithm(f){this._checksumAlgorithms.push(f)},checksumAlgorithms(){return this._checksumAlgorithms}}},Ut=(n)=>{let c={};return n.checksumAlgorithms().forEach((f)=>{c[f.algorithmId()]=f.checksumConstructor()}),c};var Nt=(n)=>{let c=n.retryStrategy;return{setRetryStrategy(f){c=f},retryStrategy(){return c}}},dt=(n)=>{let c={};return c.retryStrategy=n.retryStrategy(),c};var _r=(n)=>{return{...Ct(n),...Nt(n)}};var ns=(n)=>{return{...Ut(n),...dt(n)}};function W0(n){return encodeURIComponent(n).replace(/[!'()*]/g,function(c){return"%"+c.charCodeAt(0).toString(16).toUpperCase()})}var is=(n)=>Array.isArray(n)?n:[n];var jn=function(){let n=Object.getPrototypeOf(this).constructor,f=new(Function.bind.apply(String,[null,...arguments]));return Object.setPrototypeOf(f,n.prototype),f};jn.prototype=Object.create(String.prototype,{constructor:{value:jn,enumerable:!1,writable:!0,configurable:!0}});Object.setPrototypeOf(jn,String);function J0(n,c,f){let t,h,i;if(typeof c==="undefined"&&typeof f==="undefined")t={},i=n;else if(t=n,typeof c==="function")return h=c,i=f,B0(t,h,i);else i=c;for(let r of Object.keys(i)){if(!Array.isArray(i[r])){t[r]=i[r];continue}Dt(t,null,i,r)}return t}var us=(n,c)=>{let f={};for(let t in c)Dt(f,n,c,t);return f},B0=(n,c,f)=>{return J0(n,Object.entries(f).reduce((t,[h,i])=>{if(Array.isArray(i))t[h]=i;else if(typeof i==="function")t[h]=[c,i()];else t[h]=[c,i];return t},{}))},Dt=(n,c,f,t)=>{if(c!==null){let r=f[t];if(typeof r==="function")r=[,r];let[s=j0,w=M0,x=t]=r;if(typeof s==="function"&&s(c[x])||typeof s!=="function"&&!!s)n[t]=w(c[x]);return}let[h,i]=f[t];if(typeof i==="function"){let r,s=h===void 0&&(r=i())!=null,w=typeof h==="function"&&!!h(void 0)||typeof h!=="function"&&!!h;if(s)n[t]=r;else if(w)n[t]=i()}else{let r=h===void 0&&i!=null,s=typeof h==="function"&&!!h(i)||typeof h!=="function"&&!!h;if(r||s)n[t]=i}},j0=(n)=>n!=null,M0=(n)=>n;var Es=(n)=>n.toISOString().replace(".000Z","Z");var yt=(n)=>{if(n==null)return{};if(Array.isArray(n))return n.filter((c)=>c!=null).map(yt);if(typeof n==="object"){let c={};for(let f of Object.keys(n)){if(n[f]==null)continue;c[f]=yt(n[f])}return c}return n};var As=(n)=>{let c=n.httpHandler;return{setHttpHandler(f){c=f},httpHandler(){return c},updateHttpClientConfig(f,t){c.updateHttpClientConfig(f,t)},httpHandlerConfigs(){return c.httpHandlerConfigs()}}},Hs=(n)=>{return{httpHandler:n.httpHandler()}};class Mn{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){let c=new Mn({...n,headers:{...n.headers}});if(c.query)c.query=R0(c.query);return c}static isInstance(n){if(!n)return!1;let c=n;return"method"in c&&"protocol"in c&&"hostname"in c&&"path"in c&&typeof c.query==="object"&&typeof c.headers==="object"}clone(){return Mn.clone(this)}}function R0(n){return Object.keys(n).reduce((c,f)=>{let t=n[f];return{...c,[f]:Array.isArray(t)?[...t]:t}},{})}class $n{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;let c=n;return typeof c.statusCode==="number"&&typeof c.headers==="object"}}var Tn=v(yn(),1);function Rn(n){let c=[];for(let f of Object.keys(n).sort()){let t=n[f];if(f=Tn.escapeUri(f),Array.isArray(t))for(let h=0,i=t.length;h<i;h++)c.push(`${f}=${Tn.escapeUri(t[h])}`);else{let h=f;if(t||typeof t==="string")h+=`=${Tn.escapeUri(t)}`;c.push(h)}}return c.join("&")}import{Agent as Gt,request as H0}from"http";import{Agent as Lt,request as P0}from"https";var Yt=["ECONNRESET","EPIPE","ETIMEDOUT"];var gn=(n)=>{let c={};for(let f of Object.keys(n)){let t=n[f];c[f]=Array.isArray(t)?t.join(","):t}return c};var It=(n,c,f=0)=>{if(!f)return-1;let t=(h)=>{let i=setTimeout(()=>{n.destroy(),c(Object.assign(new Error(`Socket timed out without establishing a connection within ${f} ms`),{name:"TimeoutError"}))},f-h),r=(s)=>{if(s?.connecting)s.on("connect",()=>{clearTimeout(i)});else clearTimeout(i)};if(n.socket)r(n.socket);else n.on("socket",r)};if(f<2000)return t(0),0;return setTimeout(t.bind(null,1000),1000)};var zt=(n,{keepAlive:c,keepAliveMsecs:f},t=3000)=>{if(c!==!0)return-1;let h=()=>{if(n.socket)n.socket.setKeepAlive(c,f||0);else n.on("socket",(i)=>{i.setKeepAlive(c,f||0)})};if(t===0)return h(),0;return setTimeout(h,t)};var Vt=(n,c,f=0)=>{let t=(h)=>{n.setTimeout(f-h,()=>{n.destroy(),c(Object.assign(new Error(`Connection timed out after ${f} ms`),{name:"TimeoutError"}))})};if(0<f&&f<6000)return t(0),0;return setTimeout(t.bind(null,f===0?0:3000),3000)};import{Readable as g0}from"stream";var Zt=1000;async function An(n,c,f=Zt){let t=c.headers??{},h=t.Expect||t.expect,i=-1,r=!1;if(h==="100-continue")await Promise.race([new Promise((s)=>{i=Number(setTimeout(s,Math.max(Zt,f)))}),new Promise((s)=>{n.on("continue",()=>{clearTimeout(i),s()}),n.on("error",()=>{r=!0,clearTimeout(i),s()})})]);if(!r)A0(n,c.body)}function A0(n,c){if(c instanceof g0){c.pipe(n);return}if(c){if(Buffer.isBuffer(c)||typeof c==="string"){n.end(c);return}let f=c;if(typeof f==="object"&&f.buffer&&typeof f.byteOffset==="number"&&typeof f.byteLength==="number"){n.end(Buffer.from(f.buffer,f.byteOffset,f.byteLength));return}n.end(Buffer.from(c));return}n.end()}class Hn{static create(n){if(typeof n?.handle==="function")return n;return new Hn(n)}static checkSocketUsage(n,c,f=console){let{sockets:t,requests:h,maxSockets:i}=n;if(typeof i!=="number"||i===1/0)return c;let r=15000;if(Date.now()-r<c)return c;if(t&&h)for(let s in t){let w=t[s]?.length??0,x=h[s]?.length??0;if(w>=i&&x>=2*i)return f?.warn?.(`@smithy/node-http-handler:WARN - socket usage at capacity=${w} and ${x} additional requests are enqueued.
|
|
4
|
-
See https://docs.aws.amazon.com/sdk-for-javascript/v3/developer-guide/node-configuring-maxsockets.html
|
|
5
|
-
or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler config.`),Date.now()}return c}constructor(n){this.socketWarningTimestamp=0,this.metadata={handlerProtocol:"http/1.1"},this.configProvider=new Promise((c,f)=>{if(typeof n==="function")n().then((t)=>{c(this.resolveDefaultConfig(t))}).catch(f);else c(this.resolveDefaultConfig(n))})}resolveDefaultConfig(n){let{requestTimeout:c,connectionTimeout:f,socketTimeout:t,httpAgent:h,httpsAgent:i}=n||{},r=!0,s=50;return{connectionTimeout:f,requestTimeout:c??t,httpAgent:(()=>{if(h instanceof Gt||typeof h?.destroy==="function")return h;return new Gt({keepAlive:!0,maxSockets:50,...h})})(),httpsAgent:(()=>{if(i instanceof Lt||typeof i?.destroy==="function")return i;return new Lt({keepAlive:!0,maxSockets:50,...i})})(),logger:console}}destroy(){this.config?.httpAgent?.destroy(),this.config?.httpsAgent?.destroy()}async handle(n,{abortSignal:c}={}){if(!this.config)this.config=await this.configProvider;return new Promise((f,t)=>{let h=void 0,i=[],r=async(T)=>{await h,i.forEach(clearTimeout),f(T)},s=async(T)=>{await h,i.forEach(clearTimeout),t(T)};if(!this.config)throw new Error("Node HTTP request handler config is not resolved");if(c?.aborted){let T=new Error("Request aborted");T.name="AbortError",s(T);return}let w=n.protocol==="https:",x=w?this.config.httpsAgent:this.config.httpAgent;i.push(setTimeout(()=>{this.socketWarningTimestamp=Hn.checkSocketUsage(x,this.socketWarningTimestamp,this.config.logger)},this.config.socketAcquisitionWarningTimeout??(this.config.requestTimeout??2000)+(this.config.connectionTimeout??1000)));let D=Rn(n.query||{}),u=void 0;if(n.username!=null||n.password!=null){let T=n.username??"",F=n.password??"";u=`${T}:${F}`}let E=n.path;if(D)E+=`?${D}`;if(n.fragment)E+=`#${n.fragment}`;let $=n.hostname??"";if($[0]==="["&&$.endsWith("]"))$=n.hostname.slice(1,-1);else $=n.hostname;let N={headers:n.headers,host:$,method:n.method,path:E,port:n.port,agent:x,auth:u},C=(w?P0:H0)(N,(T)=>{let F=new $n({statusCode:T.statusCode||-1,reason:T.statusMessage,headers:gn(T.headers),body:T});r({response:F})});if(C.on("error",(T)=>{if(Yt.includes(T.code))s(Object.assign(T,{name:"TimeoutError"}));else s(T)}),c){let T=()=>{C.destroy();let F=new Error("Request aborted");F.name="AbortError",s(F)};if(typeof c.addEventListener==="function"){let F=c;F.addEventListener("abort",T,{once:!0}),C.once("close",()=>F.removeEventListener("abort",T))}else c.onabort=T}i.push(It(C,s,this.config.connectionTimeout)),i.push(Vt(C,s,this.config.requestTimeout));let U=N.agent;if(typeof U==="object"&&"keepAlive"in U)i.push(zt(C,{keepAlive:U.keepAlive,keepAliveMsecs:U.keepAliveMsecs}));h=An(C,n,this.config.requestTimeout).catch((T)=>{return i.forEach(clearTimeout),t(T)})})}updateHttpClientConfig(n,c){this.config=void 0,this.configProvider=this.configProvider.then((f)=>{return{...f,[n]:c}})}httpHandlerConfigs(){return this.config??{}}}import{Writable as O0}from"stream";class Pn extends O0{constructor(){super(...arguments);this.bufferedBytes=[]}_write(n,c,f){this.bufferedBytes.push(n),f()}}var Aw=(n)=>{if(k0(n))return l0(n);return new Promise((c,f)=>{let t=new Pn;n.pipe(t),n.on("error",(h)=>{t.end(),f(h)}),t.on("error",f),t.on("finish",function(){let h=new Uint8Array(Buffer.concat(this.bufferedBytes));c(h)})})},k0=(n)=>typeof ReadableStream==="function"&&n instanceof ReadableStream;async function l0(n){let c=[],f=n.getReader(),t=!1,h=0;while(!t){let{done:s,value:w}=await f.read();if(w)c.push(w),h+=w.length;t=s}let i=new Uint8Array(h),r=0;for(let s of c)i.set(s,r),r+=s.length;return i}export{As as Fa,Hs as Ga,Mn as Ha,$n as Ia,fc as Ja,jt as Ka,En as La,Bt as Ma,e as Na,bc as Oa,dn as Pa,yn as Qa,Lf as Ra,it as Sa,Zr as Ta,en as Ua,a0 as Va,_0 as Wa,Lr as Xa,Kn as Ya,st as Za,Qr as _a,Xr as $a,br as ab,Kr as bb,Sr as cb,jr as db,Mr as eb,Rr as fb,gr as gb,mn as hb,_n as ib,Pr as jb,kr as kb,vr as lb,_r as mb,ns as nb,W0 as ob,is as pb,J0 as qb,us as rb,Es as sb,yt as tb,Hn as ub,Aw as vb};
|
|
6
|
-
|
|
7
|
-
//# debugId=CEBB75FF315A287864756E2164756E21
|