gemi 0.4.34 → 0.4.36
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/chunk-01e07763e3e32710.js +2 -0
- package/dist/chunk-088ed28ebed2b009.js +5 -0
- package/dist/chunk-1334ee957ff9058c.js +2 -0
- package/dist/chunk-1cc0d1072ee4a92b.js +1 -1
- package/dist/chunk-29bc27c5e126c304.js +18 -0
- package/dist/chunk-2a48e0098ccd4249.js +2 -0
- package/dist/chunk-2b2764983015552e.js +2 -0
- package/dist/chunk-32f06f9ad00aaabd.js +2 -0
- package/dist/chunk-3ab807ceccde81f3.js +3 -0
- package/dist/chunk-464cce477d8a56e0.js +2 -0
- package/dist/chunk-4e023976eb557258.js +1 -1
- package/dist/chunk-552bdaee8c03e091.js +9 -0
- package/dist/chunk-589f4b330dd6d32e.js +2 -0
- package/dist/chunk-5c3681fb029d7588.js +1 -0
- package/dist/chunk-682b01231754a121.js +2 -0
- package/dist/chunk-6943b50bd0a3ac84.js +1 -0
- package/dist/chunk-7d7b2c1f2a8dd018.js +6 -0
- package/dist/chunk-860f5fcef7074193.js +1 -1
- package/dist/chunk-9d069ba29a122630.js +1 -0
- package/dist/chunk-9d2af1a704b857ee.js +2 -0
- package/dist/chunk-b07249c949a284d2.js +16 -0
- package/dist/chunk-c8b00b645df96ed5.js +1 -1
- package/dist/chunk-db65c75cda396f98.js +1 -1
- package/dist/chunk-e3ef81776c8f2d28.js +2 -0
- package/dist/chunk-e4f28182cf5f6e1d.js +2 -0
- package/dist/chunk-ef1ebd10affe5726.js +2 -0
- package/dist/chunk-fc165cee61f6efe8.js +6 -0
- package/dist/client/index.js +5 -2
- package/dist/client/init.d.ts.map +1 -1
- package/dist/server/index.js +5 -5
- package/dist/storage/File.d.ts +4 -0
- package/dist/storage/File.d.ts.map +1 -1
- package/dist/storage/index.js +10 -1
- package/dist/utils/type.d.ts +3 -0
- package/dist/utils/type.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import"./chunk-94578320d28e33ad.js";import{x as w} from"./chunk-a5c18c07abe8fd9c.js";import{$ as p,A as ue,D as Te,F as yr,J as be,K as je,M as Fe,N as De,Q as Ge,R as Je,X as E,Y as t,Z as Jr,aa as b,ba as j,ca as F,da as h,ka as Er,la as a,ma as br,na as Ve,oa as We,pa as er,qa as rr,sa as d,ta as o,va as I,z as Oe} from"./chunk-3ab807ceccde81f3.js";import{$a as Xe,Aa as Kr,Da as N,Ea as cr,Fa as $e,Ga as Ie,Ha as Re,Ia as tr,Ja as fe,Ka as Ae,La as Ke,Ma as Me,Na as ar,Oa as mr,Qa as S,Ra as $,Sa as wr,Ta as Be,Va as Le,Wa as kr,Xa as Qe,Ya as vr,_a as q,ab as Ye,bb as Ze,cb as He,db as sr,eb as ir,wa as hr,xa as nr,ya as or,za as dr} from"./chunk-29bc27c5e126c304.js";import"./chunk-bbd36ce62b950ee5.js";import{gb as Qr,hb as R} from"./chunk-9d069ba29a122630.js";import"./chunk-0ffc38ed09847e35.js";import{jb as pe} from"./chunk-860f5fcef7074193.js";import"./chunk-a816613f5321b9db.js";var P=w(N(),1);var re=w(q(),1),U=w(Kr(),1),Mr=function(e){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"sso-oauth",region:e.region},propertiesExtractor:(s,r)=>({signingProperties:{config:s,context:r}})}},H=function(e){return{schemeId:"smithy.api#noAuth"}},se=async(e,s,r)=>{return{operation:U.getSmithyContext(s).operation,region:await U.normalizeProvider(e.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()}},ie=(e)=>{const s=[];switch(e.operation){case"CreateToken":{s.push(H(e));break}case"RegisterClient":{s.push(H(e));break}case"StartDeviceAuthorization":{s.push(H(e));break}default:s.push(Mr(e))}return s},le=(e)=>{return{...re.resolveAwsSdkSigV4Config(e)}};var he=(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 ne={name:"@aws-sdk/client-sso-oidc",description:"AWS SDK for JavaScript Sso Oidc Client for Node.js, Browser and React Native",version:"3.629.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.629.0","@aws-sdk/credential-provider-node":"3.629.0","@aws-sdk/middleware-host-header":"3.620.0","@aws-sdk/middleware-logger":"3.609.0","@aws-sdk/middleware-recursion-detection":"3.620.0","@aws-sdk/middleware-user-agent":"3.620.0","@aws-sdk/region-config-resolver":"3.614.0","@aws-sdk/types":"3.609.0","@aws-sdk/util-endpoints":"3.614.0","@aws-sdk/util-user-agent-browser":"3.609.0","@aws-sdk/util-user-agent-node":"3.614.0","@smithy/config-resolver":"^3.0.5","@smithy/core":"^2.3.2","@smithy/fetch-http-handler":"^3.2.4","@smithy/hash-node":"^3.0.3","@smithy/invalid-dependency":"^3.0.3","@smithy/middleware-content-length":"^3.0.5","@smithy/middleware-endpoint":"^3.1.0","@smithy/middleware-retry":"^3.0.14","@smithy/middleware-serde":"^3.0.3","@smithy/middleware-stack":"^3.0.3","@smithy/node-config-provider":"^3.1.4","@smithy/node-http-handler":"^3.1.4","@smithy/protocol-http":"^4.1.0","@smithy/smithy-client":"^3.1.12","@smithy/types":"^3.3.0","@smithy/url-parser":"^3.0.3","@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.14","@smithy/util-defaults-mode-node":"^3.0.14","@smithy/util-endpoints":"^2.0.5","@smithy/util-middleware":"^3.0.3","@smithy/util-retry":"^3.0.3","@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.629.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 Ne=w(q(),1);var qe=w(q(),1),Ue=w(N(),1);var xe=w(Qr(),1);var oe={["required"]:!1,type:"String"},de={["required"]:!0,default:!1,type:"Boolean"},ye={["ref"]:"Endpoint"},ke={["fn"]:"booleanEquals",["argv"]:[{["ref"]:"UseFIPS"},!0]},ve={["fn"]:"booleanEquals",["argv"]:[{["ref"]:"UseDualStack"},!0]},m={},ce={["fn"]:"getAttr",["argv"]:[{["ref"]:"PartitionResult"},"supportsFIPS"]},Ee={["ref"]:"PartitionResult"},te={["fn"]:"booleanEquals",["argv"]:[!0,{["fn"]:"getAttr",["argv"]:[Ee,"supportsDualStack"]}]},ae=[ke],me=[ve],we=[{["ref"]:"Region"}],Lr={version:"1.0",parameters:{Region:oe,UseDualStack:de,UseFIPS:de,Endpoint:oe},rules:[{conditions:[{["fn"]:"isSet",["argv"]:[ye]}],rules:[{conditions:ae,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:"error"},{conditions:me,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"]:we}],rules:[{conditions:[{["fn"]:"aws.partition",["argv"]:we,assign:"PartitionResult"}],rules:[{conditions:[ke,ve],rules:[{conditions:[{["fn"]:"booleanEquals",["argv"]:[!0,ce]},te],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:ae,rules:[{conditions:[{["fn"]:"booleanEquals",["argv"]:[ce,!0]}],rules:[{conditions:[{["fn"]:"stringEquals",["argv"]:[{["fn"]:"getAttr",["argv"]:[Ee,"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:me,rules:[{conditions:[te],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"}]},Se=Lr;var Pe=(e,s={})=>{return Ie(Se,{endpointParams:e,logger:s.logger})};$e.aws=Re;var ze=(e)=>{return{apiVersion:"2019-06-10",base64Decoder:e?.base64Decoder??be,base64Encoder:e?.base64Encoder??De,disableHostPrefix:e?.disableHostPrefix??!1,endpointProvider:e?.endpointProvider??Pe,extensions:e?.extensions??[],httpAuthSchemeProvider:e?.httpAuthSchemeProvider??ie,httpAuthSchemes:e?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:(s)=>s.getIdentityProvider("aws.auth#sigv4"),signer:new qe.AwsSdkSigV4Signer},{schemeId:"smithy.api#noAuth",identityProvider:(s)=>s.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new Ue.NoAuthSigner}],logger:e?.logger??new Te,serviceId:e?.serviceId??"SSO OIDC",urlParser:e?.urlParser??xe.parseUrl,utf8Decoder:e?.utf8Decoder??je,utf8Encoder:e?.utf8Encoder??Fe}};var _e=(e)=>{We(process.version);const s=He(e),r=()=>s().then(Ve),i=ze(e);return Ne.emitWarningIfUnsupportedVersion(process.version),{...i,...e,runtime:"node",defaultsMode:s,bodyLengthChecker:e?.bodyLengthChecker??Ze,credentialDefaultProvider:e?.credentialDefaultProvider??pe,defaultUserAgentProvider:e?.defaultUserAgentProvider??Xe({serviceId:i.serviceId,clientVersion:ne.version}),maxAttempts:e?.maxAttempts??R(Le),region:e?.region??R(Ke,Me),requestHandler:Ge.create(e?.requestHandler??r),retryMode:e?.retryMode??R({...Qe,default:async()=>(await r()).retryMode||Be}),sha256:e?.sha256??Ye.bind(null,"sha256"),streamCollector:e?.streamCollector??Je,useDualstackEndpoint:e?.useDualstackEndpoint??R(fe),useFipsEndpoint:e?.useFipsEndpoint??R(Ae)}};var Ce=(e)=>{const s=e.httpAuthSchemes;let{httpAuthSchemeProvider:r,credentials:i}=e;return{setHttpAuthScheme(l){const 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}}},ge=(e)=>{return{httpAuthSchemes:e.httpAuthSchemes(),httpAuthSchemeProvider:e.httpAuthSchemeProvider(),credentials:e.credentials()}};var x=(e)=>e,lr=(e,s)=>{const r={...x(sr(e)),...x(er(e)),...x(Oe(e)),...x(Ce(e))};return s.forEach((i)=>i.configure(r)),{...e,...ir(r),...rr(r),...ue(r),...ge(r)}};class _ extends yr{constructor(...[e]){const s=_e(e||{}),r=he(s),i=cr(r),l=kr(i),n=ar(l),T=hr(n),Wr=wr(T),fr=le(Wr),ee=lr(fr,e?.extensions||[]);super(ee);this.config=ee,this.middlewareStack.use(tr(this.config)),this.middlewareStack.use(vr(this.config)),this.middlewareStack.use(mr(this.config)),this.middlewareStack.use(nr(this.config)),this.middlewareStack.use(or(this.config)),this.middlewareStack.use(dr(this.config)),this.middlewareStack.use(P.getHttpAuthSchemeEndpointRuleSetPlugin(this.config,{httpAuthSchemeParametersProvider:se,identityProviderConfigProvider:async(Ar)=>new P.DefaultIdentityProviderConfig({"aws.auth#sigv4":Ar.credentials})})),this.middlewareStack.use(P.getHttpSigningPlugin(this.config))}destroy(){super.destroy()}}class y extends Er{constructor(e){super(e);Object.setPrototypeOf(this,y.prototype)}}class z extends y{constructor(e){super({name:"AccessDeniedException",$fault:"client",...e});this.name="AccessDeniedException",this.$fault="client",Object.setPrototypeOf(this,z.prototype),this.error=e.error,this.error_description=e.error_description}}class G extends y{constructor(e){super({name:"AuthorizationPendingException",$fault:"client",...e});this.name="AuthorizationPendingException",this.$fault="client",Object.setPrototypeOf(this,G.prototype),this.error=e.error,this.error_description=e.error_description}}class J extends y{constructor(e){super({name:"ExpiredTokenException",$fault:"client",...e});this.name="ExpiredTokenException",this.$fault="client",Object.setPrototypeOf(this,J.prototype),this.error=e.error,this.error_description=e.error_description}}class V extends y{constructor(e){super({name:"InternalServerException",$fault:"server",...e});this.name="InternalServerException",this.$fault="server",Object.setPrototypeOf(this,V.prototype),this.error=e.error,this.error_description=e.error_description}}class W extends y{constructor(e){super({name:"InvalidClientException",$fault:"client",...e});this.name="InvalidClientException",this.$fault="client",Object.setPrototypeOf(this,W.prototype),this.error=e.error,this.error_description=e.error_description}}class f extends y{constructor(e){super({name:"InvalidGrantException",$fault:"client",...e});this.name="InvalidGrantException",this.$fault="client",Object.setPrototypeOf(this,f.prototype),this.error=e.error,this.error_description=e.error_description}}class A extends y{constructor(e){super({name:"InvalidRequestException",$fault:"client",...e});this.name="InvalidRequestException",this.$fault="client",Object.setPrototypeOf(this,A.prototype),this.error=e.error,this.error_description=e.error_description}}class K extends y{constructor(e){super({name:"InvalidScopeException",$fault:"client",...e});this.name="InvalidScopeException",this.$fault="client",Object.setPrototypeOf(this,K.prototype),this.error=e.error,this.error_description=e.error_description}}class M extends y{constructor(e){super({name:"SlowDownException",$fault:"client",...e});this.name="SlowDownException",this.$fault="client",Object.setPrototypeOf(this,M.prototype),this.error=e.error,this.error_description=e.error_description}}class B extends y{constructor(e){super({name:"UnauthorizedClientException",$fault:"client",...e});this.name="UnauthorizedClientException",this.$fault="client",Object.setPrototypeOf(this,B.prototype),this.error=e.error,this.error_description=e.error_description}}class L extends y{constructor(e){super({name:"UnsupportedGrantTypeException",$fault:"client",...e});this.name="UnsupportedGrantTypeException",this.$fault="client",Object.setPrototypeOf(this,L.prototype),this.error=e.error,this.error_description=e.error_description}}class Q extends y{constructor(e){super({name:"InvalidRequestRegionException",$fault:"client",...e});this.name="InvalidRequestRegionException",this.$fault="client",Object.setPrototypeOf(this,Q.prototype),this.error=e.error,this.error_description=e.error_description,this.endpoint=e.endpoint,this.region=e.region}}class X extends y{constructor(e){super({name:"InvalidClientMetadataException",$fault:"client",...e});this.name="InvalidClientMetadataException",this.$fault="client",Object.setPrototypeOf(this,X.prototype),this.error=e.error,this.error_description=e.error_description}}class Y extends y{constructor(e){super({name:"InvalidRedirectUriException",$fault:"client",...e});this.name="InvalidRedirectUriException",this.$fault="client",Object.setPrototypeOf(this,Y.prototype),this.error=e.error,this.error_description=e.error_description}}var Sr=(e)=>({...e,...e.clientSecret&&{clientSecret:t},...e.refreshToken&&{refreshToken:t},...e.codeVerifier&&{codeVerifier:t}}),$r=(e)=>({...e,...e.accessToken&&{accessToken:t},...e.refreshToken&&{refreshToken:t},...e.idToken&&{idToken:t}}),Ir=(e)=>({...e,...e.refreshToken&&{refreshToken:t},...e.assertion&&{assertion:t},...e.subjectToken&&{subjectToken:t},...e.codeVerifier&&{codeVerifier:t}}),Rr=(e)=>({...e,...e.accessToken&&{accessToken:t},...e.refreshToken&&{refreshToken:t},...e.idToken&&{idToken:t}}),Pr=(e)=>({...e,...e.clientSecret&&{clientSecret:t}}),Tr=(e)=>({...e,...e.clientSecret&&{clientSecret:t}});var k=w(q(),1),D=w(N(),1);var jr=async(e,s)=>{const 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()},Fr=async(e,s)=>{const r=D.requestBuilder(e,s),i={"content-type":"application/json"};r.bp("/token");const l=d({[ls]:[,"t"]});let 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()},Dr=async(e,s)=>{const 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()},qr=async(e,s)=>{const 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()},Ur=async(e,s)=>{if(e.statusCode!==200&&e.statusCode>=300)return Z(e,s);const r=d({$metadata:c(e)}),i=j(F(await k.parseJsonBody(e.body,s)),"body"),l=o(i,{accessToken:h,expiresIn:b,idToken:h,refreshToken:h,tokenType:h});return Object.assign(r,l),r},xr=async(e,s)=>{if(e.statusCode!==200&&e.statusCode>=300)return Z(e,s);const r=d({$metadata:c(e)}),i=j(F(await k.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},zr=async(e,s)=>{if(e.statusCode!==200&&e.statusCode>=300)return Z(e,s);const r=d({$metadata:c(e)}),i=j(F(await k.parseJsonBody(e.body,s)),"body"),l=o(i,{authorizationEndpoint:h,clientId:h,clientIdIssuedAt:p,clientSecret:h,clientSecretExpiresAt:p,tokenEndpoint:h});return Object.assign(r,l),r},Gr=async(e,s)=>{if(e.statusCode!==200&&e.statusCode>=300)return Z(e,s);const r=d({$metadata:c(e)}),i=j(F(await k.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},Z=async(e,s)=>{const r={...e,body:await k.parseJsonErrorBody(e.body,s)},i=k.loadRestJsonErrorCode(e,r.body);switch(i){case"AccessDeniedException":case"com.amazonaws.ssooidc#AccessDeniedException":throw await Yr(r,s);case"AuthorizationPendingException":case"com.amazonaws.ssooidc#AuthorizationPendingException":throw await Zr(r,s);case"ExpiredTokenException":case"com.amazonaws.ssooidc#ExpiredTokenException":throw await Hr(r,s);case"InternalServerException":case"com.amazonaws.ssooidc#InternalServerException":throw await Nr(r,s);case"InvalidClientException":case"com.amazonaws.ssooidc#InvalidClientException":throw await _r(r,s);case"InvalidGrantException":case"com.amazonaws.ssooidc#InvalidGrantException":throw await Cr(r,s);case"InvalidRequestException":case"com.amazonaws.ssooidc#InvalidRequestException":throw await Or(r,s);case"InvalidScopeException":case"com.amazonaws.ssooidc#InvalidScopeException":throw await es(r,s);case"SlowDownException":case"com.amazonaws.ssooidc#SlowDownException":throw await rs(r,s);case"UnauthorizedClientException":case"com.amazonaws.ssooidc#UnauthorizedClientException":throw await ss(r,s);case"UnsupportedGrantTypeException":case"com.amazonaws.ssooidc#UnsupportedGrantTypeException":throw await is(r,s);case"InvalidRequestRegionException":case"com.amazonaws.ssooidc#InvalidRequestRegionException":throw await ur(r,s);case"InvalidClientMetadataException":case"com.amazonaws.ssooidc#InvalidClientMetadataException":throw await pr(r,s);case"InvalidRedirectUriException":case"com.amazonaws.ssooidc#InvalidRedirectUriException":throw await gr(r,s);default:const l=r.body;return Xr({output:e,parsedBody:l,errorCode:i})}},Xr=br(y),Yr=async(e,s)=>{const r=d({}),i=e.body,l=o(i,{error:h,error_description:h});Object.assign(r,l);const n=new z({$metadata:c(e),...r});return a(n,e.body)},Zr=async(e,s)=>{const r=d({}),i=e.body,l=o(i,{error:h,error_description:h});Object.assign(r,l);const n=new G({$metadata:c(e),...r});return a(n,e.body)},Hr=async(e,s)=>{const r=d({}),i=e.body,l=o(i,{error:h,error_description:h});Object.assign(r,l);const n=new J({$metadata:c(e),...r});return a(n,e.body)},Nr=async(e,s)=>{const r=d({}),i=e.body,l=o(i,{error:h,error_description:h});Object.assign(r,l);const n=new V({$metadata:c(e),...r});return a(n,e.body)},_r=async(e,s)=>{const r=d({}),i=e.body,l=o(i,{error:h,error_description:h});Object.assign(r,l);const n=new W({$metadata:c(e),...r});return a(n,e.body)},pr=async(e,s)=>{const r=d({}),i=e.body,l=o(i,{error:h,error_description:h});Object.assign(r,l);const n=new X({$metadata:c(e),...r});return a(n,e.body)},Cr=async(e,s)=>{const r=d({}),i=e.body,l=o(i,{error:h,error_description:h});Object.assign(r,l);const n=new f({$metadata:c(e),...r});return a(n,e.body)},gr=async(e,s)=>{const r=d({}),i=e.body,l=o(i,{error:h,error_description:h});Object.assign(r,l);const n=new Y({$metadata:c(e),...r});return a(n,e.body)},Or=async(e,s)=>{const r=d({}),i=e.body,l=o(i,{error:h,error_description:h});Object.assign(r,l);const n=new A({$metadata:c(e),...r});return a(n,e.body)},ur=async(e,s)=>{const r=d({}),i=e.body,l=o(i,{endpoint:h,error:h,error_description:h,region:h});Object.assign(r,l);const n=new Q({$metadata:c(e),...r});return a(n,e.body)},es=async(e,s)=>{const r=d({}),i=e.body,l=o(i,{error:h,error_description:h});Object.assign(r,l);const n=new K({$metadata:c(e),...r});return a(n,e.body)},rs=async(e,s)=>{const r=d({}),i=e.body,l=o(i,{error:h,error_description:h});Object.assign(r,l);const n=new M({$metadata:c(e),...r});return a(n,e.body)},ss=async(e,s)=>{const r=d({}),i=e.body,l=o(i,{error:h,error_description:h});Object.assign(r,l);const n=new B({$metadata:c(e),...r});return a(n,e.body)},is=async(e,s)=>{const r=d({}),i=e.body,l=o(i,{error:h,error_description:h});Object.assign(r,l);const n=new L({$metadata:c(e),...r});return a(n,e.body)},c=(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 ls="aws_iam";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","CreateToken",{}).n("SSOOIDCClient","CreateTokenCommand").f(Sr,$r).ser(jr).de(Ur).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","CreateTokenWithIAM",{}).n("SSOOIDCClient","CreateTokenWithIAMCommand").f(Ir,Rr).ser(Fr).de(xr).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","RegisterClient",{}).n("SSOOIDCClient","RegisterClientCommand").f(void 0,Pr).ser(Dr).de(zr).build(){}class u 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(Tr,void 0).ser(qr).de(Gr).build(){}var hs={CreateTokenCommand:C,CreateTokenWithIAMCommand:g,RegisterClientCommand:O,StartDeviceAuthorizationCommand:u};class Vr extends _{}Jr(hs,Vr);export{yr as __Client,L as UnsupportedGrantTypeException,B as UnauthorizedClientException,Tr as StartDeviceAuthorizationRequestFilterSensitiveLog,u as StartDeviceAuthorizationCommand,M as SlowDownException,y as SSOOIDCServiceException,_ as SSOOIDCClient,Vr as SSOOIDC,Pr as RegisterClientResponseFilterSensitiveLog,O as RegisterClientCommand,K as InvalidScopeException,Q as InvalidRequestRegionException,A as InvalidRequestException,Y as InvalidRedirectUriException,f as InvalidGrantException,X as InvalidClientMetadataException,W as InvalidClientException,V as InternalServerException,J as ExpiredTokenException,Rr as CreateTokenWithIAMResponseFilterSensitiveLog,Ir as CreateTokenWithIAMRequestFilterSensitiveLog,g as CreateTokenWithIAMCommand,$r as CreateTokenResponseFilterSensitiveLog,Sr as CreateTokenRequestFilterSensitiveLog,C as CreateTokenCommand,G as AuthorizationPendingException,z as AccessDeniedException,E as $Command};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import{x as J,y as L} from"./chunk-a5c18c07abe8fd9c.js";import{fb as p} from"./chunk-bbd36ce62b950ee5.js";var xn=L((Dr,Pn)=>{var{defineProperty:l,getOwnPropertyDescriptor:Fi,getOwnPropertyNames:Ci}=Object,Ui=Object.prototype.hasOwnProperty,Y=(n,t)=>l(n,"name",{value:t,configurable:!0}),Ei=(n,t)=>{for(var c in t)l(n,c,{get:t[c],enumerable:!0})},Ii=(n,t,c,i)=>{if(t&&typeof t==="object"||typeof t==="function"){for(let f of Ci(t))if(!Ui.call(n,f)&&f!==c)l(n,f,{get:()=>t[f],enumerable:!(i=Fi(t,f))||i.enumerable})}return n},yi=(n)=>Ii(l({},"__esModule",{value:!0}),n),Hn={};Ei(Hn,{constructStack:()=>Tn});Pn.exports=yi(Hn);var A=Y((n,t)=>{const c=[];if(n)c.push(n);if(t)for(let i of t)c.push(i);return c},"getAllAliases"),G=Y((n,t)=>{return`${n||"anonymous"}${t&&t.length>0?` (a.k.a. ${t.join(",")})`:""}`},"getMiddlewareNameWithAliases"),Tn=Y(()=>{let n=[],t=[],c=!1;const i=new Set,f=Y(($)=>$.sort((o,T)=>jn[T.step]-jn[o.step]||Rn[T.priority||"normal"]-Rn[o.priority||"normal"]),"sort"),h=Y(($)=>{let o=!1;const T=Y((U)=>{const E=A(U.name,U.aliases);if(E.includes($)){o=!0;for(let F of E)i.delete(F);return!1}return!0},"filterCb");return n=n.filter(T),t=t.filter(T),o},"removeByName"),r=Y(($)=>{let o=!1;const T=Y((U)=>{if(U.middleware===$){o=!0;for(let E of A(U.name,U.aliases))i.delete(E);return!1}return!0},"filterCb");return n=n.filter(T),t=t.filter(T),o},"removeByReference"),s=Y(($)=>{var o;return n.forEach((T)=>{$.add(T.middleware,{...T})}),t.forEach((T)=>{$.addRelativeTo(T.middleware,{...T})}),(o=$.identifyOnResolve)==null||o.call($,C.identifyOnResolve()),$},"cloneTo"),u=Y(($)=>{const o=[];return $.before.forEach((T)=>{if(T.before.length===0&&T.after.length===0)o.push(T);else o.push(...u(T))}),o.push($),$.after.reverse().forEach((T)=>{if(T.before.length===0&&T.after.length===0)o.push(T);else o.push(...u(T))}),o},"expandRelativeMiddlewareList"),d=Y(($=!1)=>{const o=[],T=[],U={};return n.forEach((F)=>{const w={...F,before:[],after:[]};for(let x of A(w.name,w.aliases))U[x]=w;o.push(w)}),t.forEach((F)=>{const w={...F,before:[],after:[]};for(let x of A(w.name,w.aliases))U[x]=w;T.push(w)}),T.forEach((F)=>{if(F.toMiddleware){const w=U[F.toMiddleware];if(w===void 0){if($)return;throw new Error(`${F.toMiddleware} is not found when adding ${G(F.name,F.aliases)} middleware ${F.relation} ${F.toMiddleware}`)}if(F.relation==="after")w.after.push(F);if(F.relation==="before")w.before.push(F)}}),f(o).map(u).reduce((F,w)=>{return F.push(...w),F},[])},"getMiddlewareList"),C={add:($,o={})=>{const{name:T,override:U,aliases:E}=o,F={step:"initialize",priority:"normal",middleware:$,...o},w=A(T,E);if(w.length>0){if(w.some((x)=>i.has(x))){if(!U)throw new Error(`Duplicate middleware name '${G(T,E)}'`);for(let x of w){const I=n.findIndex((g)=>{var V;return g.name===x||((V=g.aliases)==null?void 0:V.some((M)=>M===x))});if(I===-1)continue;const y=n[I];if(y.step!==F.step||F.priority!==y.priority)throw new Error(`"${G(y.name,y.aliases)}" middleware with ${y.priority} priority in ${y.step} step cannot be overridden by "${G(T,E)}" middleware with ${F.priority} priority in ${F.step} step.`);n.splice(I,1)}}for(let x of w)i.add(x)}n.push(F)},addRelativeTo:($,o)=>{const{name:T,override:U,aliases:E}=o,F={middleware:$,...o},w=A(T,E);if(w.length>0){if(w.some((x)=>i.has(x))){if(!U)throw new Error(`Duplicate middleware name '${G(T,E)}'`);for(let x of w){const I=t.findIndex((g)=>{var V;return g.name===x||((V=g.aliases)==null?void 0:V.some((M)=>M===x))});if(I===-1)continue;const y=t[I];if(y.toMiddleware!==F.toMiddleware||y.relation!==F.relation)throw new Error(`"${G(y.name,y.aliases)}" middleware ${y.relation} "${y.toMiddleware}" middleware cannot be overridden by "${G(T,E)}" middleware ${F.relation} "${F.toMiddleware}" middleware.`);t.splice(I,1)}}for(let x of w)i.add(x)}t.push(F)},clone:()=>s(Tn()),use:($)=>{$.applyToStack(C)},remove:($)=>{if(typeof $==="string")return h($);else return r($)},removeByTag:($)=>{let o=!1;const T=Y((U)=>{const{tags:E,name:F,aliases:w}=U;if(E&&E.includes($)){const x=A(F,w);for(let I of x)i.delete(I);return o=!0,!1}return!0},"filterCb");return n=n.filter(T),t=t.filter(T),o},concat:($)=>{var o;const T=s(Tn());return T.use($),T.identifyOnResolve(c||T.identifyOnResolve()||(((o=$.identifyOnResolve)==null?void 0:o.call($))??!1)),T},applyToStack:s,identify:()=>{return d(!0).map(($)=>{const o=$.step??$.relation+" "+$.toMiddleware;return G($.name,$.aliases)+" - "+o})},identifyOnResolve($){if(typeof $==="boolean")c=$;return c},resolve:($,o)=>{for(let T of d().map((U)=>U.middleware).reverse())$=T($,o);if(c)console.log(C.identify());return $}};return C},"constructStack"),jn={initialize:5,serialize:4,build:3,finalizeRequest:2,deserialize:1},Rn={high:3,normal:2,low:1}});var nt=L((Mr,_n)=>{var{defineProperty:v,getOwnPropertyDescriptor:Di,getOwnPropertyNames:gi}=Object,Ni=Object.prototype.hasOwnProperty,Yi=(n,t)=>v(n,"name",{value:t,configurable:!0}),Si=(n,t)=>{for(var c in t)v(n,c,{get:t[c],enumerable:!0})},zi=(n,t,c,i)=>{if(t&&typeof t==="object"||typeof t==="function"){for(let f of gi(t))if(!Ni.call(n,f)&&f!==c)v(n,f,{get:()=>t[f],enumerable:!(i=Di(t,f))||i.enumerable})}return n},Zi=(n)=>zi(v({},"__esModule",{value:!0}),n),mn={};Si(mn,{isArrayBuffer:()=>Vi});_n.exports=Zi(mn);var Vi=Yi((n)=>typeof ArrayBuffer==="function"&&n instanceof ArrayBuffer||Object.prototype.toString.call(n)==="[object ArrayBuffer]","isArrayBuffer")});var B=L((Ar,it)=>{var{defineProperty:q,getOwnPropertyDescriptor:Gi,getOwnPropertyNames:Qi}=Object,Mi=Object.prototype.hasOwnProperty,tt=(n,t)=>q(n,"name",{value:t,configurable:!0}),Ai=(n,t)=>{for(var c in t)q(n,c,{get:t[c],enumerable:!0})},Ki=(n,t,c,i)=>{if(t&&typeof t==="object"||typeof t==="function"){for(let f of Qi(t))if(!Mi.call(n,f)&&f!==c)q(n,f,{get:()=>t[f],enumerable:!(i=Gi(t,f))||i.enumerable})}return n},Xi=(n)=>Ki(q({},"__esModule",{value:!0}),n),ct={};Ai(ct,{fromArrayBuffer:()=>Wi,fromString:()=>bi});it.exports=Xi(ct);var Ji=nt(),dn=import.meta.require("buffer"),Wi=tt((n,t=0,c=n.byteLength-t)=>{if(!Ji.isArrayBuffer(n))throw new TypeError(`The "input" argument must be ArrayBuffer. Received type ${typeof n} (${n})`);return dn.Buffer.from(n,t,c)},"fromArrayBuffer"),bi=tt((n,t)=>{if(typeof n!=="string")throw new TypeError(`The "input" argument must be of type string. Received type ${typeof n} (${n})`);return t?dn.Buffer.from(n,t):dn.Buffer.from(n)},"fromString")});var rt=L((ft)=>{Object.defineProperty(ft,"__esModule",{value:!0});ft.fromBase64=void 0;var Bi=B(),ji=/^[A-Za-z0-9+/]*={0,2}$/,Ri=(n)=>{if(n.length*3%4!==0)throw new TypeError("Incorrect padding on base64 string.");if(!ji.exec(n))throw new TypeError("Invalid base64 string.");const t=Bi.fromString(n,"base64");return new Uint8Array(t.buffer,t.byteOffset,t.byteLength)};ft.fromBase64=Ri});var m=L((Xr,$t)=>{var{defineProperty:a,getOwnPropertyDescriptor:Hi,getOwnPropertyNames:Pi}=Object,ki=Object.prototype.hasOwnProperty,on=(n,t)=>a(n,"name",{value:t,configurable:!0}),Oi=(n,t)=>{for(var c in t)a(n,c,{get:t[c],enumerable:!0})},li=(n,t,c,i)=>{if(t&&typeof t==="object"||typeof t==="function"){for(let f of Pi(t))if(!ki.call(n,f)&&f!==c)a(n,f,{get:()=>t[f],enumerable:!(i=Hi(t,f))||i.enumerable})}return n},pi=(n)=>li(a({},"__esModule",{value:!0}),n),st={};Oi(st,{fromUtf8:()=>wt,toUint8Array:()=>vi,toUtf8:()=>qi});$t.exports=pi(st);var ut=B(),wt=on((n)=>{const t=ut.fromString(n,"utf8");return new Uint8Array(t.buffer,t.byteOffset,t.byteLength/Uint8Array.BYTES_PER_ELEMENT)},"fromUtf8"),vi=on((n)=>{if(typeof n==="string")return wt(n);if(ArrayBuffer.isView(n))return new Uint8Array(n.buffer,n.byteOffset,n.byteLength/Uint8Array.BYTES_PER_ELEMENT);return new Uint8Array(n)},"toUint8Array"),qi=on((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 ut.fromArrayBuffer(n.buffer,n.byteOffset,n.byteLength).toString("utf8")},"toUtf8")});var dt=L((Tt)=>{Object.defineProperty(Tt,"__esModule",{value:!0});Tt.toBase64=void 0;var ai=B(),mi=m(),_i=(n)=>{let t;if(typeof n==="string")t=mi.fromUtf8(n);else t=n;if(typeof t!=="object"||typeof t.byteOffset!=="number"||typeof t.byteLength!=="number")throw new Error("@smithy/util-base64: toBase64 encoder function only accepts string | Uint8Array.");return ai.fromArrayBuffer(t.buffer,t.byteOffset,t.byteLength).toString("base64")};Tt.toBase64=_i});var nn=L((Wr,_)=>{var{defineProperty:ot,getOwnPropertyDescriptor:nf,getOwnPropertyNames:tf}=Object,cf=Object.prototype.hasOwnProperty,Fn=(n,t,c,i)=>{if(t&&typeof t==="object"||typeof t==="function"){for(let f of tf(t))if(!cf.call(n,f)&&f!==c)ot(n,f,{get:()=>t[f],enumerable:!(i=nf(t,f))||i.enumerable})}return n},Ft=(n,t,c)=>(Fn(n,t,"default"),c&&Fn(c,t,"default")),ff=(n)=>Fn(ot({},"__esModule",{value:!0}),n),Cn={};_.exports=ff(Cn);Ft(Cn,rt(),_.exports);Ft(Cn,dt(),_.exports)});var Et=L((Ct)=>{Object.defineProperty(Ct,"__esModule",{value:!0});Ct.getAwsChunkedEncodingStream=void 0;var hf=import.meta.require("stream"),rf=(n,t)=>{const{base64Encoder:c,bodyLengthChecker:i,checksumAlgorithmFn:f,checksumLocationName:h,streamHasher:r}=t,s=c!==void 0&&f!==void 0&&h!==void 0&&r!==void 0,u=s?r(f,n):void 0,d=new hf.Readable({read:()=>{}});return n.on("data",(C)=>{const $=i(C)||0;d.push(`${$.toString(16)}\r\n`),d.push(C),d.push("\r\n")}),n.on("end",async()=>{if(d.push("0\r\n"),s){const C=c(await u);d.push(`${h}:${C}\r\n`),d.push("\r\n")}d.push(null)}),d};Ct.getAwsChunkedEncodingStream=rf});var Un=L((Br,St)=>{var gt=function(n){return Object.keys(n).reduce((t,c)=>{const i=n[c];return{...t,[c]:Array.isArray(i)?[...i]:i}},{})},Yt=function(n){return/^[a-z0-9][a-z0-9\.\-]*[a-z0-9]$/.test(n)},tn=Object.defineProperty,sf=Object.getOwnPropertyDescriptor,uf=Object.getOwnPropertyNames,wf=Object.prototype.hasOwnProperty,Q=(n,t)=>tn(n,"name",{value:t,configurable:!0}),$f=(n,t)=>{for(var c in t)tn(n,c,{get:t[c],enumerable:!0})},Tf=(n,t,c,i)=>{if(t&&typeof t==="object"||typeof t==="function"){for(let f of uf(t))if(!wf.call(n,f)&&f!==c)tn(n,f,{get:()=>t[f],enumerable:!(i=sf(t,f))||i.enumerable})}return n},xf=(n)=>Tf(tn({},"__esModule",{value:!0}),n),It={};$f(It,{Field:()=>Ff,Fields:()=>Cf,HttpRequest:()=>Uf,HttpResponse:()=>Ef,IHttpRequest:()=>yt.HttpRequest,getHttpHandlerExtensionConfiguration:()=>df,isValidHostname:()=>Yt,resolveHttpHandlerRuntimeConfig:()=>of});St.exports=xf(It);var df=Q((n)=>{let t=n.httpHandler;return{setHttpHandler(c){t=c},httpHandler(){return t},updateHttpClientConfig(c,i){t.updateHttpClientConfig(c,i)},httpHandlerConfigs(){return t.httpHandlerConfigs()}}},"getHttpHandlerExtensionConfiguration"),of=Q((n)=>{return{httpHandler:n.httpHandler()}},"resolveHttpHandlerRuntimeConfig"),yt=p(),et=class n{constructor({name:t,kind:c=yt.FieldPosition.HEADER,values:i=[]}){this.name=t,this.kind=c,this.values=i}add(t){this.values.push(t)}set(t){this.values=t}remove(t){this.values=this.values.filter((c)=>c!==t)}toString(){return this.values.map((t)=>t.includes(",")||t.includes(" ")?`"${t}"`:t).join(", ")}get(){return this.values}};Q(et,"Field");var Ff=et,Lt=class n{constructor({fields:t=[],encoding:c="utf-8"}){this.entries={},t.forEach(this.setField.bind(this)),this.encoding=c}setField(t){this.entries[t.name.toLowerCase()]=t}getField(t){return this.entries[t.toLowerCase()]}removeField(t){delete this.entries[t.toLowerCase()]}getByType(t){return Object.values(this.entries).filter((c)=>c.kind===t)}};Q(Lt,"Fields");var Cf=Lt,Dt=class n{constructor(t){this.method=t.method||"GET",this.hostname=t.hostname||"localhost",this.port=t.port,this.query=t.query||{},this.headers=t.headers||{},this.body=t.body,this.protocol=t.protocol?t.protocol.slice(-1)!==":"?`${t.protocol}:`:t.protocol:"https:",this.path=t.path?t.path.charAt(0)!=="/"?`/${t.path}`:t.path:"/",this.username=t.username,this.password=t.password,this.fragment=t.fragment}static clone(t){const c=new n({...t,headers:{...t.headers}});if(c.query)c.query=gt(c.query);return c}static isInstance(t){if(!t)return!1;const c=t;return"method"in c&&"protocol"in c&&"hostname"in c&&"path"in c&&typeof c.query==="object"&&typeof c.headers==="object"}clone(){return n.clone(this)}};Q(Dt,"HttpRequest");var Uf=Dt;Q(gt,"cloneQuery");var Nt=class n{constructor(t){this.statusCode=t.statusCode,this.reason=t.reason,this.headers=t.headers||{},this.body=t.body}static isInstance(t){if(!t)return!1;const c=t;return typeof c.statusCode==="number"&&typeof c.headers==="object"}};Q(Nt,"HttpResponse");var Ef=Nt;Q(Yt,"isValidHostname")});var Gt=L((jr,Vt)=>{var{defineProperty:cn,getOwnPropertyDescriptor:If,getOwnPropertyNames:yf}=Object,ef=Object.prototype.hasOwnProperty,En=(n,t)=>cn(n,"name",{value:t,configurable:!0}),Lf=(n,t)=>{for(var c in t)cn(n,c,{get:t[c],enumerable:!0})},Df=(n,t,c,i)=>{if(t&&typeof t==="object"||typeof t==="function"){for(let f of yf(t))if(!ef.call(n,f)&&f!==c)cn(n,f,{get:()=>t[f],enumerable:!(i=If(t,f))||i.enumerable})}return n},gf=(n)=>Df(cn({},"__esModule",{value:!0}),n),zt={};Lf(zt,{escapeUri:()=>Zt,escapeUriPath:()=>Yf});Vt.exports=gf(zt);var Zt=En((n)=>encodeURIComponent(n).replace(/[!'()*]/g,Nf),"escapeUri"),Nf=En((n)=>`%${n.charCodeAt(0).toString(16).toUpperCase()}`,"hexEncode"),Yf=En((n)=>n.split("/").map(Zt).join("/"),"escapeUriPath")});var yn=L((Rr,At)=>{var Mt=function(n){const t=[];for(let c of Object.keys(n).sort()){const i=n[c];if(c=In.escapeUri(c),Array.isArray(i))for(let f=0,h=i.length;f<h;f++)t.push(`${c}=${In.escapeUri(i[f])}`);else{let f=c;if(i||typeof i==="string")f+=`=${In.escapeUri(i)}`;t.push(f)}}return t.join("&")},fn=Object.defineProperty,Sf=Object.getOwnPropertyDescriptor,zf=Object.getOwnPropertyNames,Zf=Object.prototype.hasOwnProperty,Vf=(n,t)=>fn(n,"name",{value:t,configurable:!0}),Gf=(n,t)=>{for(var c in t)fn(n,c,{get:t[c],enumerable:!0})},Qf=(n,t,c,i)=>{if(t&&typeof t==="object"||typeof t==="function"){for(let f of zf(t))if(!Zf.call(n,f)&&f!==c)fn(n,f,{get:()=>t[f],enumerable:!(i=Sf(t,f))||i.enumerable})}return n},Mf=(n)=>Qf(fn({},"__esModule",{value:!0}),n),Qt={};Gf(Qt,{buildQueryString:()=>Mt});At.exports=Mf(Qt);var In=Gt();Vf(Mt,"buildQueryString")});var at=L((Hr,qt)=>{async function Dn(n,t,c=Kt){const i=t.headers??{},f=i.Expect||i.expect;let h=-1,r=!1;if(f==="100-continue")await Promise.race([new Promise((s)=>{h=Number(setTimeout(s,Math.max(Kt,c)))}),new Promise((s)=>{n.on("continue",()=>{clearTimeout(h),s()}),n.on("error",()=>{r=!0,clearTimeout(h),s()})})]);if(!r)Ht(n,t.body)}var Ht=function(n,t){if(t instanceof Rt.Readable){t.pipe(n);return}if(t){if(Buffer.isBuffer(t)||typeof t==="string"){n.end(t);return}const c=t;if(typeof c==="object"&&c.buffer&&typeof c.byteOffset==="number"&&typeof c.byteLength==="number"){n.end(Buffer.from(c.buffer,c.byteOffset,c.byteLength));return}n.end(Buffer.from(t));return}n.end()};async function vt(n){const t=[],c=n.getReader();let i=!1,f=0;while(!i){const{done:s,value:u}=await c.read();if(u)t.push(u),f+=u.length;i=s}const h=new Uint8Array(f);let r=0;for(let s of t)h.set(s,r),r+=s.length;return h}var{create:Af,defineProperty:j,getOwnPropertyDescriptor:Kf,getOwnPropertyNames:Xf,getPrototypeOf:Jf}=Object,Wf=Object.prototype.hasOwnProperty,D=(n,t)=>j(n,"name",{value:t,configurable:!0}),bf=(n,t)=>{for(var c in t)j(n,c,{get:t[c],enumerable:!0})},Jt=(n,t,c,i)=>{if(t&&typeof t==="object"||typeof t==="function"){for(let f of Xf(t))if(!Wf.call(n,f)&&f!==c)j(n,f,{get:()=>t[f],enumerable:!(i=Kf(t,f))||i.enumerable})}return n},Bf=(n,t,c)=>(c=n!=null?Af(Jf(n)):{},Jt(t||!n||!n.__esModule?j(c,"default",{value:n,enumerable:!0}):c,n)),jf=(n)=>Jt(j({},"__esModule",{value:!0}),n),Wt={};bf(Wt,{DEFAULT_REQUEST_TIMEOUT:()=>Of,NodeHttp2Handler:()=>af,NodeHttpHandler:()=>lf,streamCollector:()=>_f});qt.exports=jf(Wt);var bt=Un(),Bt=yn(),en=import.meta.require("http"),Ln=import.meta.require("https"),Rf=["ECONNRESET","EPIPE","ETIMEDOUT"],jt=D((n)=>{const t={};for(let c of Object.keys(n)){const i=n[c];t[c]=Array.isArray(i)?i.join(","):i}return t},"getTransformedHeaders"),Hf=D((n,t,c=0)=>{if(!c)return;const i=setTimeout(()=>{n.destroy(),t(Object.assign(new Error(`Socket timed out without establishing a connection within ${c} ms`),{name:"TimeoutError"}))},c);n.on("socket",(f)=>{if(f.connecting)f.on("connect",()=>{clearTimeout(i)});else clearTimeout(i)})},"setConnectionTimeout"),Pf=D((n,{keepAlive:t,keepAliveMsecs:c})=>{if(t!==!0)return;n.on("socket",(i)=>{i.setKeepAlive(t,c||0)})},"setSocketKeepAlive"),kf=D((n,t,c=0)=>{n.setTimeout(c,()=>{n.destroy(),t(Object.assign(new Error(`Connection timed out after ${c} ms`),{name:"TimeoutError"}))})},"setSocketTimeout"),Rt=import.meta.require("stream"),Kt=1000;D(Dn,"writeRequestBody");D(Ht,"writeBody");var Of=0,Pt=class n{constructor(t){this.socketWarningTimestamp=0,this.metadata={handlerProtocol:"http/1.1"},this.configProvider=new Promise((c,i)=>{if(typeof t==="function")t().then((f)=>{c(this.resolveDefaultConfig(f))}).catch(i);else c(this.resolveDefaultConfig(t))})}static create(t){if(typeof(t==null?void 0:t.handle)==="function")return t;return new n(t)}static checkSocketUsage(t,c,i=console){var f,h,r;const{sockets:s,requests:u,maxSockets:d}=t;if(typeof d!=="number"||d===Infinity)return c;const C=15000;if(Date.now()-C<c)return c;if(s&&u)for(let $ in s){const o=((f=s[$])==null?void 0:f.length)??0,T=((h=u[$])==null?void 0:h.length)??0;if(o>=d&&T>=2*d)return(r=i==null?void 0:i.warn)==null||r.call(i,`@smithy/node-http-handler:WARN - socket usage at capacity=${o} and ${T} 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 c}resolveDefaultConfig(t){const{requestTimeout:c,connectionTimeout:i,socketTimeout:f,httpAgent:h,httpsAgent:r}=t||{};return{connectionTimeout:i,requestTimeout:c??f,httpAgent:(()=>{if(h instanceof en.Agent||typeof(h==null?void 0:h.destroy)==="function")return h;return new en.Agent({keepAlive:!0,maxSockets:50,...h})})(),httpsAgent:(()=>{if(r instanceof Ln.Agent||typeof(r==null?void 0:r.destroy)==="function")return r;return new Ln.Agent({keepAlive:!0,maxSockets:50,...r})})(),logger:console}}destroy(){var t,c,i,f;(c=(t=this.config)==null?void 0:t.httpAgent)==null||c.destroy(),(f=(i=this.config)==null?void 0:i.httpsAgent)==null||f.destroy()}async handle(t,{abortSignal:c}={}){if(!this.config)this.config=await this.configProvider;let i;return new Promise((f,h)=>{let r=void 0;const s=D(async(x)=>{await r,clearTimeout(i),f(x)},"resolve"),u=D(async(x)=>{await r,clearTimeout(i),h(x)},"reject");if(!this.config)throw new Error("Node HTTP request handler config is not resolved");if(c==null?void 0:c.aborted){const x=new Error("Request aborted");x.name="AbortError",u(x);return}const d=t.protocol==="https:",C=d?this.config.httpsAgent:this.config.httpAgent;i=setTimeout(()=>{this.socketWarningTimestamp=n.checkSocketUsage(C,this.socketWarningTimestamp,this.config.logger)},this.config.socketAcquisitionWarningTimeout??(this.config.requestTimeout??2000)+(this.config.connectionTimeout??1000));const $=Bt.buildQueryString(t.query||{});let o=void 0;if(t.username!=null||t.password!=null){const x=t.username??"",I=t.password??"";o=`${x}:${I}`}let T=t.path;if($)T+=`?${$}`;if(t.fragment)T+=`#${t.fragment}`;const U={headers:t.headers,host:t.hostname,method:t.method,path:T,port:t.port,agent:C,auth:o},F=(d?Ln.request:en.request)(U,(x)=>{const I=new bt.HttpResponse({statusCode:x.statusCode||-1,reason:x.statusMessage,headers:jt(x.headers),body:x});s({response:I})});if(F.on("error",(x)=>{if(Rf.includes(x.code))u(Object.assign(x,{name:"TimeoutError"}));else u(x)}),Hf(F,u,this.config.connectionTimeout),kf(F,u,this.config.requestTimeout),c){const x=D(()=>{F.destroy();const I=new Error("Request aborted");I.name="AbortError",u(I)},"onAbort");if(typeof c.addEventListener==="function"){const I=c;I.addEventListener("abort",x,{once:!0}),F.once("close",()=>I.removeEventListener("abort",x))}else c.onabort=x}const w=U.agent;if(typeof w==="object"&&"keepAlive"in w)Pf(F,{keepAlive:w.keepAlive,keepAliveMsecs:w.keepAliveMsecs});r=Dn(F,t,this.config.requestTimeout).catch((x)=>{return clearTimeout(i),h(x)})})}updateHttpClientConfig(t,c){this.config=void 0,this.configProvider=this.configProvider.then((i)=>{return{...i,[t]:c}})}httpHandlerConfigs(){return this.config??{}}};D(Pt,"NodeHttpHandler");var lf=Pt,Xt=import.meta.require("http2"),pf=Bf(import.meta.require("http2")),kt=class n{constructor(t){this.sessions=[],this.sessions=t??[]}poll(){if(this.sessions.length>0)return this.sessions.shift()}offerLast(t){this.sessions.push(t)}contains(t){return this.sessions.includes(t)}remove(t){this.sessions=this.sessions.filter((c)=>c!==t)}[Symbol.iterator](){return this.sessions[Symbol.iterator]()}destroy(t){for(let c of this.sessions)if(c===t){if(!c.destroyed)c.destroy()}}};D(kt,"NodeHttp2ConnectionPool");var vf=kt,Ot=class n{constructor(t){if(this.sessionCache=new Map,this.config=t,this.config.maxConcurrency&&this.config.maxConcurrency<=0)throw new RangeError("maxConcurrency must be greater than zero.")}lease(t,c){const i=this.getUrlString(t),f=this.sessionCache.get(i);if(f){const u=f.poll();if(u&&!this.config.disableConcurrency)return u}const h=pf.default.connect(i);if(this.config.maxConcurrency)h.settings({maxConcurrentStreams:this.config.maxConcurrency},(u)=>{if(u)throw new Error("Fail to set maxConcurrentStreams to "+this.config.maxConcurrency+"when creating new session for "+t.destination.toString())});h.unref();const r=D(()=>{h.destroy(),this.deleteSession(i,h)},"destroySessionCb");if(h.on("goaway",r),h.on("error",r),h.on("frameError",r),h.on("close",()=>this.deleteSession(i,h)),c.requestTimeout)h.setTimeout(c.requestTimeout,r);const s=this.sessionCache.get(i)||new vf;return s.offerLast(h),this.sessionCache.set(i,s),h}deleteSession(t,c){const i=this.sessionCache.get(t);if(!i)return;if(!i.contains(c))return;i.remove(c),this.sessionCache.set(t,i)}release(t,c){var i;const f=this.getUrlString(t);(i=this.sessionCache.get(f))==null||i.offerLast(c)}destroy(){for(let[t,c]of this.sessionCache){for(let i of c){if(!i.destroyed)i.destroy();c.remove(i)}this.sessionCache.delete(t)}}setMaxConcurrentStreams(t){if(this.config.maxConcurrency&&this.config.maxConcurrency<=0)throw new RangeError("maxConcurrentStreams must be greater than zero.");this.config.maxConcurrency=t}setDisableConcurrentStreams(t){this.config.disableConcurrency=t}getUrlString(t){return t.destination.toString()}};D(Ot,"NodeHttp2ConnectionManager");var qf=Ot,lt=class n{constructor(t){this.metadata={handlerProtocol:"h2"},this.connectionManager=new qf({}),this.configProvider=new Promise((c,i)=>{if(typeof t==="function")t().then((f)=>{c(f||{})}).catch(i);else c(t||{})})}static create(t){if(typeof(t==null?void 0:t.handle)==="function")return t;return new n(t)}destroy(){this.connectionManager.destroy()}async handle(t,{abortSignal:c}={}){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)}const{requestTimeout:i,disableConcurrentStreams:f}=this.config;return new Promise((h,r)=>{var s;let u=!1,d=void 0;const C=D(async(e)=>{await d,h(e)},"resolve"),$=D(async(e)=>{await d,r(e)},"reject");if(c==null?void 0:c.aborted){u=!0;const e=new Error("Request aborted");e.name="AbortError",$(e);return}const{hostname:o,method:T,port:U,protocol:E,query:F}=t;let w="";if(t.username!=null||t.password!=null){const e=t.username??"",S=t.password??"";w=`${e}:${S}@`}const x=`${E}//${w}${o}${U?`:${U}`:""}`,I={destination:new URL(x)},y=this.connectionManager.lease(I,{requestTimeout:(s=this.config)==null?void 0:s.sessionTimeout,disableConcurrentStreams:f||!1}),g=D((e)=>{if(f)this.destroySession(y);u=!0,$(e)},"rejectWithDestroy"),V=Bt.buildQueryString(F||{});let M=t.path;if(V)M+=`?${V}`;if(t.fragment)M+=`#${t.fragment}`;const N=y.request({...t.headers,[Xt.constants.HTTP2_HEADER_PATH]:M,[Xt.constants.HTTP2_HEADER_METHOD]:T});if(y.ref(),N.on("response",(e)=>{const S=new bt.HttpResponse({statusCode:e[":status"]||-1,headers:jt(e),body:N});if(u=!0,C({response:S}),f)y.close(),this.connectionManager.deleteSession(x,y)}),i)N.setTimeout(i,()=>{N.close();const e=new Error(`Stream timed out because of no activity for ${i} ms`);e.name="TimeoutError",g(e)});if(c){const e=D(()=>{N.close();const S=new Error("Request aborted");S.name="AbortError",g(S)},"onAbort");if(typeof c.addEventListener==="function"){const S=c;S.addEventListener("abort",e,{once:!0}),N.once("close",()=>S.removeEventListener("abort",e))}else c.onabort=e}N.on("frameError",(e,S,oi)=>{g(new Error(`Frame type id ${e} in stream id ${oi} has failed with code ${S}.`))}),N.on("error",g),N.on("aborted",()=>{g(new Error(`HTTP/2 stream is abnormally aborted in mid-communication with result code ${N.rstCode}.`))}),N.on("close",()=>{if(y.unref(),f)y.destroy();if(!u)g(new Error("Unexpected error: http2 request did not get a response"))}),d=Dn(N,t,i)})}updateHttpClientConfig(t,c){this.config=void 0,this.configProvider=this.configProvider.then((i)=>{return{...i,[t]:c}})}httpHandlerConfigs(){return this.config??{}}destroySession(t){if(!t.destroyed)t.destroy()}};D(lt,"NodeHttp2Handler");var af=lt,pt=class n extends Rt.Writable{constructor(){super(...arguments);this.bufferedBytes=[]}_write(t,c,i){this.bufferedBytes.push(t),i()}};D(pt,"Collector");var mf=pt,_f=D((n)=>{if(nh(n))return vt(n);return new Promise((t,c)=>{const i=new mf;n.pipe(i),n.on("error",(f)=>{i.end(),c(f)}),i.on("error",c),i.on("finish",function(){const f=new Uint8Array(Buffer.concat(this.bufferedBytes));t(f)})})},"streamCollector"),nh=D((n)=>typeof ReadableStream==="function"&&n instanceof ReadableStream,"isReadableStreamInstance");D(vt,"collectReadableStream")});var rc=L((Pr,hc)=>{var nc=function(n=0){return new Promise((t,c)=>{if(n)setTimeout(()=>{const i=new Error(`Request did not complete within ${n} ms`);i.name="TimeoutError",c(i)},n)})};async function cc(n){const t=await fc(n),c=wh.fromBase64(t);return new Uint8Array(c)}async function ic(n){const t=[],c=n.getReader();let i=!1,f=0;while(!i){const{done:s,value:u}=await c.read();if(u)t.push(u),f+=u.length;i=s}const h=new Uint8Array(f);let r=0;for(let s of t)h.set(s,r),r+=s.length;return h}var fc=function(n){return new Promise((t,c)=>{const i=new FileReader;i.onloadend=()=>{if(i.readyState!==2)return c(new Error("Reader aborted too early"));const f=i.result??"",h=f.indexOf(","),r=h>-1?h+1:f.length;t(f.substring(r))},i.onabort=()=>c(new Error("Read aborted")),i.onerror=()=>c(i.error),i.readAsDataURL(n)})},rn=Object.defineProperty,th=Object.getOwnPropertyDescriptor,ch=Object.getOwnPropertyNames,ih=Object.prototype.hasOwnProperty,Z=(n,t)=>rn(n,"name",{value:t,configurable:!0}),fh=(n,t)=>{for(var c in t)rn(n,c,{get:t[c],enumerable:!0})},hh=(n,t,c,i)=>{if(t&&typeof t==="object"||typeof t==="function"){for(let f of ch(t))if(!ih.call(n,f)&&f!==c)rn(n,f,{get:()=>t[f],enumerable:!(i=th(t,f))||i.enumerable})}return n},rh=(n)=>hh(rn({},"__esModule",{value:!0}),n),_t={};fh(_t,{FetchHttpHandler:()=>uh,keepAliveSupport:()=>hn,streamCollector:()=>$h});hc.exports=rh(_t);var mt=Un(),sh=yn();Z(nc,"requestTimeout");var hn={supported:void 0},tc=class n{static create(t){if(typeof(t==null?void 0:t.handle)==="function")return t;return new n(t)}constructor(t){if(typeof t==="function")this.configProvider=t().then((c)=>c||{});else this.config=t??{},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(t,{abortSignal:c}={}){if(!this.config)this.config=await this.configProvider;const i=this.config.requestTimeout,f=this.config.keepAlive===!0,h=this.config.credentials;if(c==null?void 0:c.aborted){const w=new Error("Request aborted");return w.name="AbortError",Promise.reject(w)}let r=t.path;const s=sh.buildQueryString(t.query||{});if(s)r+=`?${s}`;if(t.fragment)r+=`#${t.fragment}`;let u="";if(t.username!=null||t.password!=null){const w=t.username??"",x=t.password??"";u=`${w}:${x}@`}const{port:d,method:C}=t,$=`${t.protocol}//${u}${t.hostname}${d?`:${d}`:""}${r}`,o=C==="GET"||C==="HEAD"?void 0:t.body,T={body:o,headers:new Headers(t.headers),method:C,credentials:h};if(o)T.duplex="half";if(typeof AbortController!=="undefined")T.signal=c;if(hn.supported)T.keepalive=f;let U=Z(()=>{},"removeSignalEventListener");const E=new Request($,T),F=[fetch(E).then((w)=>{const x=w.headers,I={};for(let g of x.entries())I[g[0]]=g[1];if(w.body==null)return w.blob().then((g)=>({response:new mt.HttpResponse({headers:I,reason:w.statusText,statusCode:w.status,body:g})}));return{response:new mt.HttpResponse({headers:I,reason:w.statusText,statusCode:w.status,body:w.body})}}),nc(i)];if(c)F.push(new Promise((w,x)=>{const I=Z(()=>{const y=new Error("Request aborted");y.name="AbortError",x(y)},"onAbort");if(typeof c.addEventListener==="function"){const y=c;y.addEventListener("abort",I,{once:!0}),U=Z(()=>y.removeEventListener("abort",I),"removeSignalEventListener")}else c.onabort=I}));return Promise.race(F).finally(U)}updateHttpClientConfig(t,c){this.config=void 0,this.configProvider=this.configProvider.then((i)=>{return i[t]=c,i})}httpHandlerConfigs(){return this.config??{}}};Z(tc,"FetchHttpHandler");var uh=tc,wh=nn(),$h=Z((n)=>{if(typeof Blob==="function"&&n instanceof Blob)return cc(n);return ic(n)},"streamCollector");Z(cc,"collectBlob");Z(ic,"collectStream");Z(fc,"readToBase64")});var dc=L((kr,xc)=>{var $c=function(n){if(n.length%2!==0)throw new Error("Hex encoded strings must have an even number length");const t=new Uint8Array(n.length/2);for(let c=0;c<n.length;c+=2){const i=n.slice(c,c+2).toLowerCase();if(i in gn)t[c/2]=gn[i];else throw new Error(`Cannot decode unrecognized sequence ${i} as hexadecimal`)}return t},Tc=function(n){let t="";for(let c=0;c<n.byteLength;c++)t+=wc[n[c]];return t},sn=Object.defineProperty,Th=Object.getOwnPropertyDescriptor,xh=Object.getOwnPropertyNames,dh=Object.prototype.hasOwnProperty,sc=(n,t)=>sn(n,"name",{value:t,configurable:!0}),oh=(n,t)=>{for(var c in t)sn(n,c,{get:t[c],enumerable:!0})},Fh=(n,t,c,i)=>{if(t&&typeof t==="object"||typeof t==="function"){for(let f of xh(t))if(!dh.call(n,f)&&f!==c)sn(n,f,{get:()=>t[f],enumerable:!(i=Th(t,f))||i.enumerable})}return n},Ch=(n)=>Fh(sn({},"__esModule",{value:!0}),n),uc={};oh(uc,{fromHex:()=>$c,toHex:()=>Tc});xc.exports=Ch(uc);var wc={},gn={};for(let n=0;n<256;n++){let t=n.toString(16).toLowerCase();if(t.length===1)t=`0${t}`;wc[n]=t,gn[t]=n}sc($c,"fromHex");sc(Tc,"toHex")});var R=L((oc)=>{Object.defineProperty(oc,"__esModule",{value:!0});oc.isReadableStream=void 0;var Uh=(n)=>{var t;return typeof ReadableStream==="function"&&(((t=n===null||n===void 0?void 0:n.constructor)===null||t===void 0?void 0:t.name)===ReadableStream.name||n instanceof ReadableStream)};oc.isReadableStream=Uh});var ec=L((Ic)=>{Object.defineProperty(Ic,"__esModule",{value:!0});Ic.sdkStreamMixin=void 0;var Eh=rc(),Ih=nn(),yh=dc(),eh=m(),Cc=R(),Uc="The stream has already been transformed.",Lh=(n)=>{var t,c;if(!Ec(n)&&!Cc.isReadableStream(n)){const r=((c=(t=n===null||n===void 0?void 0:n.__proto__)===null||t===void 0?void 0:t.constructor)===null||c===void 0?void 0:c.name)||n;throw new Error(`Unexpected stream implementation, expect Blob or ReadableStream, got ${r}`)}let i=!1;const f=async()=>{if(i)throw new Error(Uc);return i=!0,await Eh.streamCollector(n)},h=(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:f,transformToString:async(r)=>{const s=await f();if(r==="base64")return Ih.toBase64(s);else if(r==="hex")return yh.toHex(s);else if(r===void 0||r==="utf8"||r==="utf-8")return eh.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(i)throw new Error(Uc);if(i=!0,Ec(n))return h(n);else if(Cc.isReadableStream(n))return n;else throw new Error(`Cannot transform payload to web stream, got ${n}`)}})};Ic.sdkStreamMixin=Lh;var Ec=(n)=>typeof Blob==="function"&&n instanceof Blob});var Nc=L((Dc)=>{Object.defineProperty(Dc,"__esModule",{value:!0});Dc.sdkStreamMixin=void 0;var Dh=at(),gh=B(),Nn=import.meta.require("stream"),Nh=import.meta.require("util"),Yh=ec(),Lc="The stream has already been transformed.",Sh=(n)=>{var t,c;if(!(n instanceof Nn.Readable))try{return Yh.sdkStreamMixin(n)}catch(h){const r=((c=(t=n===null||n===void 0?void 0:n.__proto__)===null||t===void 0?void 0:t.constructor)===null||c===void 0?void 0:c.name)||n;throw new Error(`Unexpected stream implementation, expect Stream.Readable instance, got ${r}`)}let i=!1;const f=async()=>{if(i)throw new Error(Lc);return i=!0,await Dh.streamCollector(n)};return Object.assign(n,{transformToByteArray:f,transformToString:async(h)=>{const r=await f();if(h===void 0||Buffer.isEncoding(h))return gh.fromArrayBuffer(r.buffer,r.byteOffset,r.byteLength).toString(h);else return new Nh.TextDecoder(h).decode(r)},transformToWebStream:()=>{if(i)throw new Error(Lc);if(n.readableFlowing!==null)throw new Error("The stream has been consumed by other callbacks.");if(typeof Nn.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 i=!0,Nn.Readable.toWeb(n)}})};Dc.sdkStreamMixin=Sh});var zc=L((Yc)=>{async function zh(n){if(typeof n.stream==="function")n=n.stream();return n.tee()}Object.defineProperty(Yc,"__esModule",{value:!0});Yc.splitStream=void 0;Yc.splitStream=zh});var Qc=L((Vc)=>{async function Gh(n){if(Vh.isReadableStream(n))return Zh.splitStream(n);const t=new Zc.PassThrough,c=new Zc.PassThrough;return n.pipe(t),n.pipe(c),[t,c]}Object.defineProperty(Vc,"__esModule",{value:!0});Vc.splitStream=void 0;var Zc=import.meta.require("stream"),Zh=zc(),Vh=R();Vc.splitStream=Gh});var Kc=L((Mc)=>{async function Qh(n,t){var c;let i=0;const f=[],h=n.getReader();let r=!1;while(!r){const{done:d,value:C}=await h.read();if(C)f.push(C),i+=(c=C===null||C===void 0?void 0:C.byteLength)!==null&&c!==void 0?c:0;if(i>=t)break;r=d}h.releaseLock();const s=new Uint8Array(Math.min(t,i));let u=0;for(let d of f){if(d.byteLength>s.byteLength-u){s.set(d.subarray(0,s.byteLength-u),u);break}else s.set(d,u);u+=d.length}return s}Object.defineProperty(Mc,"__esModule",{value:!0});Mc.headStream=void 0;Mc.headStream=Qh});var bc=L((Jc)=>{Object.defineProperty(Jc,"__esModule",{value:!0});Jc.headStream=void 0;var Mh=import.meta.require("stream"),Ah=Kc(),Kh=R(),Xh=(n,t)=>{if(Kh.isReadableStream(n))return Ah.headStream(n,t);return new Promise((c,i)=>{const f=new Xc;f.limit=t,n.pipe(f),n.on("error",(h)=>{f.end(),i(h)}),f.on("error",i),f.on("finish",function(){const h=new Uint8Array(Buffer.concat(this.buffers));c(h)})})};Jc.headStream=Xh;class Xc extends Mh.Writable{constructor(){super(...arguments);this.buffers=[],this.limit=Infinity,this.bytesBuffered=0}_write(n,t,c){var i;if(this.buffers.push(n),this.bytesBuffered+=(i=n.byteLength)!==null&&i!==void 0?i:0,this.bytesBuffered>=this.limit){const f=this.bytesBuffered-this.limit,h=this.buffers[this.buffers.length-1];this.buffers[this.buffers.length-1]=h.subarray(0,h.byteLength-f),this.emit("finish")}c()}}});var kc=L((_r,X)=>{var Rc=function(n,t="utf-8"){if(t==="base64")return Bc.toBase64(n);return jc.toUtf8(n)},Hc=function(n,t){if(t==="base64")return Sn.mutate(Bc.fromBase64(n));return Sn.mutate(jc.fromUtf8(n))},un=Object.defineProperty,Jh=Object.getOwnPropertyDescriptor,Wh=Object.getOwnPropertyNames,bh=Object.prototype.hasOwnProperty,zn=(n,t)=>un(n,"name",{value:t,configurable:!0}),Bh=(n,t)=>{for(var c in t)un(n,c,{get:t[c],enumerable:!0})},Yn=(n,t,c,i)=>{if(t&&typeof t==="object"||typeof t==="function"){for(let f of Wh(t))if(!bh.call(n,f)&&f!==c)un(n,f,{get:()=>t[f],enumerable:!(i=Jh(t,f))||i.enumerable})}return n},H=(n,t,c)=>(Yn(n,t,"default"),c&&Yn(c,t,"default")),jh=(n)=>Yn(un({},"__esModule",{value:!0}),n),K={};Bh(K,{Uint8ArrayBlobAdapter:()=>Sn});X.exports=jh(K);var Bc=nn(),jc=m();zn(Rc,"transformToString");zn(Hc,"transformFromString");var Pc=class n extends Uint8Array{static fromString(t,c="utf-8"){switch(typeof t){case"string":return Hc(t,c);default:throw new Error(`Unsupported conversion from ${typeof t} to Uint8ArrayBlobAdapter.`)}}static mutate(t){return Object.setPrototypeOf(t,n.prototype),t}transformToString(t="utf-8"){return Rc(this,t)}};zn(Pc,"Uint8ArrayBlobAdapter");var Sn=Pc;H(K,Et(),X.exports);H(K,Nc(),X.exports);H(K,Qc(),X.exports);H(K,bc(),X.exports);H(K,R(),X.exports)});var kn=J(xn(),1);class ei{constructor(n){this.middlewareStack=kn.constructStack(),this.config=n}send(n,t,c){const i=typeof t!=="function"?t:void 0,f=typeof t==="function"?t:c,h=n.resolveMiddleware(this.middlewareStack,this.config,i);if(f)h(n).then((r)=>f(null,r.output),(r)=>f(r)).catch(()=>{});else return h(n).then((r)=>r.output)}destroy(){if(this.config.requestHandler.destroy)this.config.requestHandler.destroy()}}var On=J(xn(),1),ln=J(p(),1);class pn{constructor(){this.middlewareStack=On.constructStack()}static classBuilder(){return new vn}resolveMiddlewareWithContext(n,t,c,{middlewareFn:i,clientName:f,commandName:h,inputFilterSensitiveLog:r,outputFilterSensitiveLog:s,smithyContext:u,additionalContext:d,CommandCtor:C}){for(let E of i.bind(this)(C,n,t,c))this.middlewareStack.use(E);const $=n.concat(this.middlewareStack),{logger:o}=t,T={logger:o,clientName:f,commandName:h,inputFilterSensitiveLog:r,outputFilterSensitiveLog:s,[ln.SMITHY_CONTEXT_KEY]:{commandInstance:this,...u},...d},{requestHandler:U}=t;return $.resolve((E)=>U.handle(E.request,c||{}),T)}}class vn{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,t,c={}){return this._smithyContext={service:n,operation:t,...c},this}c(n={}){return this._additionalContext=n,this}n(n,t){return this._clientName=n,this._commandName=t,this}f(n=(c)=>c,t=(c)=>c){return this._inputFilterSensitiveLog=n,this._outputFilterSensitiveLog=t,this}ser(n){return this._serializer=n,this}de(n){return this._deserializer=n,this}build(){const n=this;let t;return t=class extends pn{static getEndpointParameterInstructions(){return n._ep}constructor(...[c]){super();this.serialize=n._serializer,this.deserialize=n._deserializer,this.input=c??{},n._init(this)}resolveMiddleware(c,i,f){return this.resolveMiddlewareWithContext(c,i,f,{CommandCtor:t,middlewareFn:n._middlewareFn,clientName:n._clientName,commandName:n._commandName,inputFilterSensitiveLog:n._inputFilterSensitiveLog,outputFilterSensitiveLog:n._outputFilterSensitiveLog,smithyContext:n._smithyContext,additionalContext:n._additionalContext})}}}}var Sr="***SensitiveInformation***";var Zr=(n,t)=>{for(let c of Object.keys(n)){const i=n[c],f=async function(r,s,u){const d=new i(r);if(typeof s==="function")this.send(d,s);else if(typeof u==="function"){if(typeof s!=="object")throw new Error(`Expected http options but got ${typeof s}`);this.send(d,s||{},u)}else return this.send(d,s)},h=(c[0].toLowerCase()+c.slice(1)).replace(/Command$/,"");t.prototype[h]=f}};class qn extends Error{constructor(n){super(n.message);Object.setPrototypeOf(this,qn.prototype),this.name=n.name,this.$fault=n.$fault,this.$metadata=n.$metadata}}var an=(n,t={})=>{Object.entries(t).filter(([,i])=>i!==void 0).forEach(([i,f])=>{if(n[i]==null||n[i]==="")n[i]=f});const c=n.message||n.Message||"UnknownError";return n.message=c,delete n.Message,n};class Li{trace(){}debug(){}info(){}warn(){}error(){}}var wn=J(kc(),1),ns=async(n=new Uint8Array,t)=>{if(n instanceof Uint8Array)return wn.Uint8ArrayBlobAdapter.mutate(n);if(!n)return wn.Uint8ArrayBlobAdapter.mutate(new Uint8Array);const c=t.streamCollector(n);return wn.Uint8ArrayBlobAdapter.mutate(await c)};var cs=(n)=>{switch(n){case"true":return!0;case"false":return!1;default:throw new Error(`Unable to parse boolean value "${n}"`)}};var Rh=(n)=>{if(n===null||n===void 0)return;if(typeof n==="string"){const t=parseFloat(n);if(!Number.isNaN(t)){if(String(t)!==String(n))_c.warn(mc(`Expected number but observed string: ${n}`));return t}}if(typeof n==="number")return n;throw new TypeError(`Expected number, got ${typeof n}: ${n}`)},Hh=Math.ceil(340282346638528860000000000000000000000),Oc=(n)=>{const t=Rh(n);if(t!==void 0&&!Number.isNaN(t)&&t!==Infinity&&t!==(-Infinity)){if(Math.abs(t)>Hh)throw new TypeError(`Expected 32-bit float, got ${n}`)}return t},Zn=(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 lc=(n)=>Vn(n,32),pc=(n)=>Vn(n,16),vc=(n)=>Vn(n,8),Vn=(n,t)=>{const c=Zn(n);if(c!==void 0&&Ph(c,t)!==c)throw new TypeError(`Expected ${t}-bit integer, got ${n}`);return c},Ph=(n,t)=>{switch(t){case 32:return Int32Array.of(n)[0];case 16:return Int16Array.of(n)[0];case 8:return Int8Array.of(n)[0]}},is=(n,t)=>{if(n===null||n===void 0){if(t)throw new TypeError(`Expected a non-null value for ${t}`);throw new TypeError("Expected a non-null value")}return n},fs=(n)=>{if(n===null||n===void 0)return;if(typeof n==="object"&&!Array.isArray(n))return n;const t=Array.isArray(n)?"array":typeof n;throw new TypeError(`Expected object, got ${t}: ${n}`)},hs=(n)=>{if(n===null||n===void 0)return;if(typeof n==="string")return n;if(["boolean","number","bigint"].includes(typeof n))return _c.warn(mc(`Expected string, got ${typeof n}: ${n}`)),String(n);throw new TypeError(`Expected string, got ${typeof n}: ${n}`)};var qc=(n)=>{if(typeof n=="string")return Oc(P(n));return Oc(n)},kh=/(-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?)|(-?Infinity)|(NaN)/g,P=(n)=>{const t=n.match(kh);if(t===null||t[0].length!==n.length)throw new TypeError("Expected real number, got implicit NaN");return parseFloat(n)};var rs=(n)=>{if(typeof n==="string")return Zn(P(n));return Zn(n)};var ss=(n)=>{if(typeof n==="string")return lc(P(n));return lc(n)},W=(n)=>{if(typeof n==="string")return pc(P(n));return pc(n)},ac=(n)=>{if(typeof n==="string")return vc(P(n));return vc(n)},mc=(n)=>{return String(new TypeError(n).stack||n).split("\n").slice(0,5).filter((t)=>!t.includes("stackTraceWarning")).join("\n")},_c={warn:console.warn};function Ts(n){const t=n.getUTCFullYear(),c=n.getUTCMonth(),i=n.getUTCDay(),f=n.getUTCDate(),h=n.getUTCHours(),r=n.getUTCMinutes(),s=n.getUTCSeconds(),u=f<10?`0${f}`:`${f}`,d=h<10?`0${h}`:`${h}`,C=r<10?`0${r}`:`${r}`,$=s<10?`0${s}`:`${s}`;return`${Oh[i]}, ${u} ${Qn[c]} ${t} ${d}:${C}:${$} GMT`}var Oh=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],Qn=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],lh=new RegExp(/^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?[zZ]$/),xs=(n)=>{if(n===null||n===void 0)return;if(typeof n!=="string")throw new TypeError("RFC-3339 date-times must be expressed as strings");const t=lh.exec(n);if(!t)throw new TypeError("Invalid RFC-3339 date-time value");const[c,i,f,h,r,s,u,d]=t,C=W(b(i)),$=z(f,"month",1,12),o=z(h,"day",1,31);return k(C,$,o,{hours:r,minutes:s,seconds:u,fractionalMilliseconds:d})},ph=new RegExp(/^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?(([-+]\d{2}\:\d{2})|[zZ])$/),ds=(n)=>{if(n===null||n===void 0)return;if(typeof n!=="string")throw new TypeError("RFC-3339 date-times must be expressed as strings");const t=ph.exec(n);if(!t)throw new TypeError("Invalid RFC-3339 date-time value");const[c,i,f,h,r,s,u,d,C]=t,$=W(b(i)),o=z(f,"month",1,12),T=z(h,"day",1,31),U=k($,o,T,{hours:r,minutes:s,seconds:u,fractionalMilliseconds:d});if(C.toUpperCase()!="Z")U.setTime(U.getTime()-hr(C));return U},vh=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$/),qh=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$/),ah=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})$/),os=(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 t=vh.exec(n);if(t){const[c,i,f,h,r,s,u,d]=t;return k(W(b(h)),Gn(f),z(i,"day",1,31),{hours:r,minutes:s,seconds:u,fractionalMilliseconds:d})}if(t=qh.exec(n),t){const[c,i,f,h,r,s,u,d]=t;return nr(k(mh(h),Gn(f),z(i,"day",1,31),{hours:r,minutes:s,seconds:u,fractionalMilliseconds:d}))}if(t=ah.exec(n),t){const[c,i,f,h,r,s,u,d]=t;return k(W(b(d)),Gn(i),z(f.trimLeft(),"day",1,31),{hours:h,minutes:r,seconds:s,fractionalMilliseconds:u})}throw new TypeError("Invalid RFC-7231 date-time value")};var k=(n,t,c,i)=>{const f=t-1;return cr(n,f,c),new Date(Date.UTC(n,f,c,z(i.hours,"hour",0,23),z(i.minutes,"minute",0,59),z(i.seconds,"seconds",0,60),fr(i.fractionalMilliseconds)))},mh=(n)=>{const t=(new Date()).getUTCFullYear(),c=Math.floor(t/100)*100+W(b(n));if(c<t)return c+100;return c},_h=1576800000000,nr=(n)=>{if(n.getTime()-(new Date()).getTime()>_h)return new Date(Date.UTC(n.getUTCFullYear()-100,n.getUTCMonth(),n.getUTCDate(),n.getUTCHours(),n.getUTCMinutes(),n.getUTCSeconds(),n.getUTCMilliseconds()));return n},Gn=(n)=>{const t=Qn.indexOf(n);if(t<0)throw new TypeError(`Invalid month: ${n}`);return t+1},tr=[31,28,31,30,31,30,31,31,30,31,30,31],cr=(n,t,c)=>{let i=tr[t];if(t===1&&ir(n))i=29;if(c>i)throw new TypeError(`Invalid day for ${Qn[t]} in ${n}: ${c}`)},ir=(n)=>{return n%4===0&&(n%100!==0||n%400===0)},z=(n,t,c,i)=>{const f=ac(b(n));if(f<c||f>i)throw new TypeError(`${t} must be between ${c} and ${i}, inclusive`);return f},fr=(n)=>{if(n===null||n===void 0)return 0;return qc("0."+n)*1000},hr=(n)=>{const t=n[0];let c=1;if(t=="+")c=1;else if(t=="-")c=-1;else throw new TypeError(`Offset direction, ${t}, must be "+" or "-"`);const i=Number(n.substring(1,3)),f=Number(n.substring(4,6));return c*(i*60+f)*60*1000},b=(n)=>{let t=0;while(t<n.length-1&&n.charAt(t)==="0")t++;if(t===0)return n;return n.slice(t)};var rr=({output:n,parsedBody:t,exceptionCtor:c,errorCode:i})=>{const f=sr(n),h=f.httpStatusCode?f.httpStatusCode+"":void 0,r=new c({name:t?.code||t?.Code||i||h||"UnknownError",$fault:"client",$metadata:f});throw an(r,t)},Us=(n)=>{return({output:t,parsedBody:c,errorCode:i})=>{rr({output:t,parsedBody:c,exceptionCtor:n,errorCode:i})}},sr=(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 Is=(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 ni=!1,es=(n)=>{if(n&&!ni&&parseInt(n.substring(1,n.indexOf(".")))<16)ni=!0};var Mn=J(p(),1);var ti=(n)=>{const t=[];for(let c in Mn.AlgorithmId){const i=Mn.AlgorithmId[c];if(n[i]===void 0)continue;t.push({algorithmId:()=>i,checksumConstructor:()=>n[i]})}return{_checksumAlgorithms:t,addChecksumAlgorithm(c){this._checksumAlgorithms.push(c)},checksumAlgorithms(){return this._checksumAlgorithms}}},ci=(n)=>{const t={};return n.checksumAlgorithms().forEach((c)=>{t[c.algorithmId()]=c.checksumConstructor()}),t};var ii=(n)=>{let t=n.retryStrategy;return{setRetryStrategy(c){t=c},retryStrategy(){return t}}},fi=(n)=>{const t={};return t.retryStrategy=n.retryStrategy(),t};var Ss=(n)=>{return{...ti(n),...ii(n)}};var zs=(n)=>{return{...ci(n),...fi(n)}};function ur(n){return encodeURIComponent(n).replace(/[!'()*]/g,function(t){return"%"+t.charCodeAt(0).toString(16).toUpperCase()})}var An=function(){const n=Object.getPrototypeOf(this).constructor,c=new(Function.bind.apply(String,[null,...arguments]));return Object.setPrototypeOf(c,n.prototype),c};An.prototype=Object.create(String.prototype,{constructor:{value:An,enumerable:!1,writable:!0,configurable:!0}});Object.setPrototypeOf(An,String);function wr(n,t,c){let i,f,h;if(typeof t==="undefined"&&typeof c==="undefined")i={},h=n;else if(i=n,typeof t==="function")return f=t,h=c,$r(i,f,h);else h=t;for(let r of Object.keys(h)){if(!Array.isArray(h[r])){i[r]=h[r];continue}hi(i,null,h,r)}return i}var Xs=(n,t)=>{const c={};for(let i in t)hi(c,n,t,i);return c},$r=(n,t,c)=>{return wr(n,Object.entries(c).reduce((i,[f,h])=>{if(Array.isArray(h))i[f]=h;else if(typeof h==="function")i[f]=[t,h()];else i[f]=[t,h];return i},{}))},hi=(n,t,c,i)=>{if(t!==null){let r=c[i];if(typeof r==="function")r=[,r];const[s=Tr,u=xr,d=i]=r;if(typeof s==="function"&&s(t[d])||typeof s!=="function"&&!!s)n[i]=u(t[d]);return}let[f,h]=c[i];if(typeof h==="function"){let r;const s=f===void 0&&(r=h())!=null,u=typeof f==="function"&&!!f(void 0)||typeof f!=="function"&&!!f;if(s)n[i]=r;else if(u)n[i]=h()}else{const r=f===void 0&&h!=null,s=typeof f==="function"&&!!f(h)||typeof f!=="function"&&!!f;if(r||s)n[i]=h}},Tr=(n)=>n!=null,xr=(n)=>n;var Bs=(n)=>n.toISOString().replace(".000Z","Z");var ri=(n)=>{if(n==null)return{};if(Array.isArray(n))return n.filter((t)=>t!=null).map(ri);if(typeof n==="object"){const t={};for(let c of Object.keys(n)){if(n[c]==null)continue;t[c]=ri(n[c])}return t}return n};var du=(n)=>{let t=n.httpHandler;return{setHttpHandler(c){t=c},httpHandler(){return t},updateHttpClientConfig(c,i){t.updateHttpClientConfig(c,i)},httpHandlerConfigs(){return t.httpHandlerConfigs()}}},ou=(n)=>{return{httpHandler:n.httpHandler()}};var dr=J(p(),1);var or=function(n){return Object.keys(n).reduce((t,c)=>{const i=n[c];return{...t,[c]:Array.isArray(i)?[...i]:i}},{})};class Kn{constructor(n){this.method=n.method||"GET",this.hostname=n.hostname||"localhost",this.port=n.port,this.query=n.query||{},this.headers=n.headers||{},this.body=n.body,this.protocol=n.protocol?n.protocol.slice(-1)!==":"?`${n.protocol}:`:n.protocol:"https:",this.path=n.path?n.path.charAt(0)!=="/"?`/${n.path}`:n.path:"/",this.username=n.username,this.password=n.password,this.fragment=n.fragment}static clone(n){const t=new Kn({...n,headers:{...n.headers}});if(t.query)t.query=or(t.query);return t}static isInstance(n){if(!n)return!1;const t=n;return"method"in t&&"protocol"in t&&"hostname"in t&&"path"in t&&typeof t.query==="object"&&typeof t.headers==="object"}clone(){return Kn.clone(this)}}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;const t=n;return typeof t.statusCode==="number"&&typeof t.headers==="object"}}var O=(n)=>encodeURIComponent(n).replace(/[!'()*]/g,Fr),Fr=(n)=>`%${n.charCodeAt(0).toString(16).toUpperCase()}`;function Xn(n){const t=[];for(let c of Object.keys(n).sort()){const i=n[c];if(c=O(c),Array.isArray(i))for(let f=0,h=i.length;f<h;f++)t.push(`${c}=${O(i[f])}`);else{let f=c;if(i||typeof i==="string")f+=`=${O(i)}`;t.push(f)}}return t.join("&")}import{Agent as xi,request as Er} from"http";import{Agent as di,request as Ir} from"https";var si=["ECONNRESET","EPIPE","ETIMEDOUT"];var Jn=(n)=>{const t={};for(let c of Object.keys(n)){const i=n[c];t[c]=Array.isArray(i)?i.join(","):i}return t};var ui=(n,t,c=0)=>{if(!c)return;const i=setTimeout(()=>{n.destroy(),t(Object.assign(new Error(`Socket timed out without establishing a connection within ${c} ms`),{name:"TimeoutError"}))},c);n.on("socket",(f)=>{if(f.connecting)f.on("connect",()=>{clearTimeout(i)});else clearTimeout(i)})};var wi=(n,{keepAlive:t,keepAliveMsecs:c})=>{if(t!==!0)return;n.on("socket",(i)=>{i.setKeepAlive(t,c||0)})};var $i=(n,t,c=0)=>{n.setTimeout(c,()=>{n.destroy(),t(Object.assign(new Error(`Connection timed out after ${c} ms`),{name:"TimeoutError"}))})};import{Readable as Cr} from"stream";async function Wn(n,t,c=Ti){const i=t.headers??{},f=i.Expect||i.expect;let h=-1,r=!1;if(f==="100-continue")await Promise.race([new Promise((s)=>{h=Number(setTimeout(s,Math.max(Ti,c)))}),new Promise((s)=>{n.on("continue",()=>{clearTimeout(h),s()}),n.on("error",()=>{r=!0,clearTimeout(h),s()})})]);if(!r)Ur(n,t.body)}var Ur=function(n,t){if(t instanceof Cr){t.pipe(n);return}if(t){if(Buffer.isBuffer(t)||typeof t==="string"){n.end(t);return}const c=t;if(typeof c==="object"&&c.buffer&&typeof c.byteOffset==="number"&&typeof c.byteLength==="number"){n.end(Buffer.from(c.buffer,c.byteOffset,c.byteLength));return}n.end(Buffer.from(t));return}n.end()},Ti=1000;class bn{static create(n){if(typeof n?.handle==="function")return n;return new bn(n)}static checkSocketUsage(n,t,c=console){const{sockets:i,requests:f,maxSockets:h}=n;if(typeof h!=="number"||h===Infinity)return t;const r=15000;if(Date.now()-r<t)return t;if(i&&f)for(let s in i){const u=i[s]?.length??0,d=f[s]?.length??0;if(u>=h&&d>=2*h)return c?.warn?.(`@smithy/node-http-handler:WARN - socket usage at capacity=${u} and ${d} 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 t}constructor(n){this.socketWarningTimestamp=0,this.metadata={handlerProtocol:"http/1.1"},this.configProvider=new Promise((t,c)=>{if(typeof n==="function")n().then((i)=>{t(this.resolveDefaultConfig(i))}).catch(c);else t(this.resolveDefaultConfig(n))})}resolveDefaultConfig(n){const{requestTimeout:t,connectionTimeout:c,socketTimeout:i,httpAgent:f,httpsAgent:h}=n||{};return{connectionTimeout:c,requestTimeout:t??i,httpAgent:(()=>{if(f instanceof xi||typeof f?.destroy==="function")return f;return new xi({keepAlive:!0,maxSockets:50,...f})})(),httpsAgent:(()=>{if(h instanceof di||typeof h?.destroy==="function")return h;return new di({keepAlive:!0,maxSockets:50,...h})})(),logger:console}}destroy(){this.config?.httpAgent?.destroy(),this.config?.httpsAgent?.destroy()}async handle(n,{abortSignal:t}={}){if(!this.config)this.config=await this.configProvider;let c;return new Promise((i,f)=>{let h=void 0;const r=async(w)=>{await h,clearTimeout(c),i(w)},s=async(w)=>{await h,clearTimeout(c),f(w)};if(!this.config)throw new Error("Node HTTP request handler config is not resolved");if(t?.aborted){const w=new Error("Request aborted");w.name="AbortError",s(w);return}const u=n.protocol==="https:",d=u?this.config.httpsAgent:this.config.httpAgent;c=setTimeout(()=>{this.socketWarningTimestamp=bn.checkSocketUsage(d,this.socketWarningTimestamp,this.config.logger)},this.config.socketAcquisitionWarningTimeout??(this.config.requestTimeout??2000)+(this.config.connectionTimeout??1000));const C=Xn(n.query||{});let $=void 0;if(n.username!=null||n.password!=null){const w=n.username??"",x=n.password??"";$=`${w}:${x}`}let o=n.path;if(C)o+=`?${C}`;if(n.fragment)o+=`#${n.fragment}`;const T={headers:n.headers,host:n.hostname,method:n.method,path:o,port:n.port,agent:d,auth:$},E=(u?Ir:Er)(T,(w)=>{const x=new $n({statusCode:w.statusCode||-1,reason:w.statusMessage,headers:Jn(w.headers),body:w});r({response:x})});if(E.on("error",(w)=>{if(si.includes(w.code))s(Object.assign(w,{name:"TimeoutError"}));else s(w)}),ui(E,s,this.config.connectionTimeout),$i(E,s,this.config.requestTimeout),t){const w=()=>{E.destroy();const x=new Error("Request aborted");x.name="AbortError",s(x)};if(typeof t.addEventListener==="function"){const x=t;x.addEventListener("abort",w,{once:!0}),E.once("close",()=>x.removeEventListener("abort",w))}else t.onabort=w}const F=T.agent;if(typeof F==="object"&&"keepAlive"in F)wi(E,{keepAlive:F.keepAlive,keepAliveMsecs:F.keepAliveMsecs});h=Wn(E,n,this.config.requestTimeout).catch((w)=>{return clearTimeout(c),f(w)})})}updateHttpClientConfig(n,t){this.config=void 0,this.configProvider=this.configProvider.then((c)=>{return{...c,[n]:t}})}httpHandlerConfigs(){return this.config??{}}}import{Writable as yr} from"stream";class Bn extends yr{constructor(){super(...arguments);this.bufferedBytes=[]}_write(n,t,c){this.bufferedBytes.push(n),c()}}async function Lr(n){const t=[],c=n.getReader();let i=!1,f=0;while(!i){const{done:s,value:u}=await c.read();if(u)t.push(u),f+=u.length;i=s}const h=new Uint8Array(f);let r=0;for(let s of t)h.set(s,r),r+=s.length;return h}var E0=(n)=>{if(er(n))return Lr(n);return new Promise((t,c)=>{const i=new Bn;n.pipe(i),n.on("error",(f)=>{i.end(),c(f)}),i.on("error",c),i.on("finish",function(){const f=new Uint8Array(Buffer.concat(this.bufferedBytes));t(f)})})},er=(n)=>typeof ReadableStream==="function"&&n instanceof ReadableStream;export{du as z,ou as A,Kn as B,$n as C,Li as D,xn as E,ei as F,nt as G,m as H,Un as I,Gt as J,dc as K,kc as L,ns as M,pn as N,Sr as O,Zr as P,cs as Q,Zn as R,lc as S,is as T,fs as U,hs as V,rs as W,ss as X,Ts as Y,xs as Z,ds as _,os as $,qn as aa,an as ba,Us as ca,Is as da,es as ea,Ss as fa,zs as ga,ur as ha,wr as ia,Xs as ja,Bs as ka,ri as la,O as ma,bn as na,E0 as oa};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{x as o} from"./chunk-a5c18c07abe8fd9c.js";import{A as Fe,D as g,F as We,N as ss,O as R,T as D,U as Ge,V as h,aa as Te,ba as u,ca as Ve,da as ce,ea as ie,fa as _e,ga as $e,ia as i,ja as y,la as Ne,na as be,oa as xe,z as Be} from"./chunk-088ed28ebed2b009.js";import{$a as Re,Ba as F,Ca as Ae,Da as G,Ea as V,Fa as N,Ga as Ke,Ha as le,Ia as pe,Ja as ye,Ka as me,La as Qe,Ma as Xe,Oa as ts,Pa as rs,Qa as Ye,Ra as he,Ta as ue,Ua as Ze,Va as we,Wa as je,Ya as x,Za as ve,_a as ke,ab as te,bb as re,cb as qe,db as Pe,eb as Je,qa as Ie,ra as Le,sa as Ce,ta as Me,ua as os,wa as ee,ya as se} from"./chunk-b07249c949a284d2.js";import"./chunk-bbd36ce62b950ee5.js";import{gb as ps,hb as l} from"./chunk-5c3681fb029d7588.js";import"./chunk-6943b50bd0a3ac84.js";import"./chunk-100b76ab0ca3e14d.js";var p=o(F(),1);var $=o(x(),1),v=o(os(),1),cs=function(e){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"awsssoportal",region:e.region},propertiesExtractor:(s,t)=>({signingProperties:{config:s,context:t}})}},b=function(e){return{schemeId:"smithy.api#noAuth"}},P=async(e,s,t)=>{return{operation:v.getSmithyContext(s).operation,region:await v.normalizeProvider(e.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()}},J=(e)=>{const s=[];switch(e.operation){case"GetRoleCredentials":{s.push(b(e));break}case"ListAccountRoles":{s.push(b(e));break}case"ListAccounts":{s.push(b(e));break}case"Logout":{s.push(b(e));break}default:s.push(cs(e))}return s},U=(e)=>{return{...$.resolveAwsSdkSigV4Config(e)}};var I=(e)=>{return{...e,useDualstackEndpoint:e.useDualstackEndpoint??!1,useFipsEndpoint:e.useFipsEndpoint??!1,defaultSigningName:"awsssoportal"}},L={UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}};var C={name:"@aws-sdk/client-sso",description:"AWS SDK for JavaScript Sso Client for Node.js, Browser and React Native",version:"3.629.0",scripts:{build:"concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'","build:cjs":"node ../../scripts/compilation/inline client-sso","build:es":"tsc -p tsconfig.es.json","build:include:deps":"lerna run --scope $npm_package_name --include-dependencies build","build:types":"tsc -p tsconfig.types.json","build:types:downlevel":"downlevel-dts dist-types dist-types/ts3.4",clean:"rimraf ./dist-* && rimraf *.tsbuildinfo","extract:docs":"api-extractor run --local","generate:client":"node ../../scripts/generate-clients/single-service --solo sso"},main:"./dist-cjs/index.js",types:"./dist-types/index.d.ts",module:"./dist-es/index.js",sideEffects:!1,dependencies:{"@aws-crypto/sha256-browser":"5.2.0","@aws-crypto/sha256-js":"5.2.0","@aws-sdk/core":"3.629.0","@aws-sdk/middleware-host-header":"3.620.0","@aws-sdk/middleware-logger":"3.609.0","@aws-sdk/middleware-recursion-detection":"3.620.0","@aws-sdk/middleware-user-agent":"3.620.0","@aws-sdk/region-config-resolver":"3.614.0","@aws-sdk/types":"3.609.0","@aws-sdk/util-endpoints":"3.614.0","@aws-sdk/util-user-agent-browser":"3.609.0","@aws-sdk/util-user-agent-node":"3.614.0","@smithy/config-resolver":"^3.0.5","@smithy/core":"^2.3.2","@smithy/fetch-http-handler":"^3.2.4","@smithy/hash-node":"^3.0.3","@smithy/invalid-dependency":"^3.0.3","@smithy/middleware-content-length":"^3.0.5","@smithy/middleware-endpoint":"^3.1.0","@smithy/middleware-retry":"^3.0.14","@smithy/middleware-serde":"^3.0.3","@smithy/middleware-stack":"^3.0.3","@smithy/node-config-provider":"^3.1.4","@smithy/node-http-handler":"^3.1.4","@smithy/protocol-http":"^4.1.0","@smithy/smithy-client":"^3.1.12","@smithy/types":"^3.3.0","@smithy/url-parser":"^3.0.3","@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.14","@smithy/util-defaults-mode-node":"^3.0.14","@smithy/util-endpoints":"^2.0.5","@smithy/util-middleware":"^3.0.3","@smithy/util-retry":"^3.0.3","@smithy/util-utf8":"^3.0.0",tslib:"^2.6.2"},devDependencies:{"@tsconfig/node16":"16.1.3","@types/node":"^16.18.96",concurrently:"7.0.0","downlevel-dts":"0.10.1",rimraf:"3.0.2",typescript:"~4.9.5"},engines:{node:">=16.0.0"},typesVersions:{"<4.0":{"dist-types/*":["dist-types/ts3.4/*"]}},files:["dist-*/**"],author:{name:"AWS SDK for JavaScript Team",url:"https://aws.amazon.com/javascript/"},license:"Apache-2.0",browser:{"./dist-es/runtimeConfig":"./dist-es/runtimeConfig.browser"},"react-native":{"./dist-es/runtimeConfig":"./dist-es/runtimeConfig.native"},homepage:"https://github.com/aws/aws-sdk-js-v3/tree/main/clients/client-sso",repository:{type:"git",url:"https://github.com/aws/aws-sdk-js-v3.git",directory:"clients/client-sso"}};var Ee=o(x(),1);var ae=o(x(),1),ne=o(F(),1);var de=o(ps(),1);var M={["required"]:!1,type:"String"},W={["required"]:!0,default:!1,type:"Boolean"},A={["ref"]:"Endpoint"},j={["fn"]:"booleanEquals",["argv"]:[{["ref"]:"UseFIPS"},!0]},T={["fn"]:"booleanEquals",["argv"]:[{["ref"]:"UseDualStack"},!0]},d={},K={["fn"]:"getAttr",["argv"]:[{["ref"]:"PartitionResult"},"supportsFIPS"]},H={["ref"]:"PartitionResult"},Q={["fn"]:"booleanEquals",["argv"]:[!0,{["fn"]:"getAttr",["argv"]:[H,"supportsDualStack"]}]},X=[j],Y=[T],Z=[{["ref"]:"Region"}],ls={version:"1.0",parameters:{Region:M,UseDualStack:W,UseFIPS:W,Endpoint:M},rules:[{conditions:[{["fn"]:"isSet",["argv"]:[A]}],rules:[{conditions:X,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:"error"},{conditions:Y,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:"error"},{endpoint:{url:A,properties:d,headers:d},type:"endpoint"}],type:"tree"},{conditions:[{["fn"]:"isSet",["argv"]:Z}],rules:[{conditions:[{["fn"]:"aws.partition",["argv"]:Z,assign:"PartitionResult"}],rules:[{conditions:[j,T],rules:[{conditions:[{["fn"]:"booleanEquals",["argv"]:[!0,K]},Q],rules:[{endpoint:{url:"https://portal.sso-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:d,headers:d},type:"endpoint"}],type:"tree"},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:"error"}],type:"tree"},{conditions:X,rules:[{conditions:[{["fn"]:"booleanEquals",["argv"]:[K,!0]}],rules:[{conditions:[{["fn"]:"stringEquals",["argv"]:[{["fn"]:"getAttr",["argv"]:[H,"name"]},"aws-us-gov"]}],endpoint:{url:"https://portal.sso.{Region}.amazonaws.com",properties:d,headers:d},type:"endpoint"},{endpoint:{url:"https://portal.sso-fips.{Region}.{PartitionResult#dnsSuffix}",properties:d,headers:d},type:"endpoint"}],type:"tree"},{error:"FIPS is enabled but this partition does not support FIPS",type:"error"}],type:"tree"},{conditions:Y,rules:[{conditions:[Q],rules:[{endpoint:{url:"https://portal.sso.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:d,headers:d},type:"endpoint"}],type:"tree"},{error:"DualStack is enabled but this partition does not support DualStack",type:"error"}],type:"tree"},{endpoint:{url:"https://portal.sso.{Region}.{PartitionResult#dnsSuffix}",properties:d,headers:d},type:"endpoint"}],type:"tree"}],type:"tree"},{error:"Invalid Configuration: Missing Region",type:"error"}]},O=ls;var f=(e,s={})=>{return V(O,{endpointParams:e,logger:s.logger})};G.aws=N;var oe=(e)=>{return{apiVersion:"2019-06-10",base64Decoder:e?.base64Decoder??te,base64Encoder:e?.base64Encoder??re,disableHostPrefix:e?.disableHostPrefix??!1,endpointProvider:e?.endpointProvider??f,extensions:e?.extensions??[],httpAuthSchemeProvider:e?.httpAuthSchemeProvider??J,httpAuthSchemes:e?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:(s)=>s.getIdentityProvider("aws.auth#sigv4"),signer:new ae.AwsSdkSigV4Signer},{schemeId:"smithy.api#noAuth",identityProvider:(s)=>s.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new ne.NoAuthSigner}],logger:e?.logger??new g,serviceId:e?.serviceId??"SSO",urlParser:e?.urlParser??de.parseUrl,utf8Decoder:e?.utf8Decoder??ee,utf8Encoder:e?.utf8Encoder??se}};var Se=(e)=>{ie(process.version);const s=qe(e),t=()=>s().then(ce),r=oe(e);return Ee.emitWarningIfUnsupportedVersion(process.version),{...r,...e,runtime:"node",defaultsMode:s,bodyLengthChecker:e?.bodyLengthChecker??Re,defaultUserAgentProvider:e?.defaultUserAgentProvider??ve({serviceId:r.serviceId,clientVersion:C.version}),maxAttempts:e?.maxAttempts??l(ue),region:e?.region??l(ye,me),requestHandler:be.create(e?.requestHandler??t),retryMode:e?.retryMode??l({...we,default:async()=>(await t()).retryMode||he}),sha256:e?.sha256??ke.bind(null,"sha256"),streamCollector:e?.streamCollector??xe,useDualstackEndpoint:e?.useDualstackEndpoint??l(le),useFipsEndpoint:e?.useFipsEndpoint??l(pe)}};var ze=(e)=>{const s=e.httpAuthSchemes;let{httpAuthSchemeProvider:t,credentials:r}=e;return{setHttpAuthScheme(a){const n=s.findIndex((B)=>B.schemeId===a.schemeId);if(n===-1)s.push(a);else s.splice(n,1,a)},httpAuthSchemes(){return s},setHttpAuthSchemeProvider(a){t=a},httpAuthSchemeProvider(){return t},setCredentials(a){r=a},credentials(){return r}}},De=(e)=>{return{httpAuthSchemes:e.httpAuthSchemes(),httpAuthSchemeProvider:e.httpAuthSchemeProvider(),credentials:e.credentials()}};var k=(e)=>e,Ue=(e,s)=>{const t={...k(Pe(e)),...k(_e(e)),...k(Be(e)),...k(ze(e))};return s.forEach((r)=>r.configure(t)),{...e,...Je(t),...$e(t),...Fe(t),...De(t)}};class ys extends We{constructor(...[e]){const s=Se(e||{}),t=I(s),r=Ae(t),a=Ze(r),n=Qe(a),B=Ie(n),as=Ye(B),ns=U(as),_=Ue(ns,e?.extensions||[]);super(_);this.config=_,this.middlewareStack.use(Ke(this.config)),this.middlewareStack.use(je(this.config)),this.middlewareStack.use(Xe(this.config)),this.middlewareStack.use(Le(this.config)),this.middlewareStack.use(Ce(this.config)),this.middlewareStack.use(Me(this.config)),this.middlewareStack.use(p.getHttpAuthSchemeEndpointRuleSetPlugin(this.config,{httpAuthSchemeParametersProvider:P,identityProviderConfigProvider:async(ds)=>new p.DefaultIdentityProviderConfig({"aws.auth#sigv4":ds.credentials})})),this.middlewareStack.use(p.getHttpSigningPlugin(this.config))}destroy(){super.destroy()}}class c extends Te{constructor(e){super(e);Object.setPrototypeOf(this,c.prototype)}}class q extends c{constructor(e){super({name:"InvalidRequestException",$fault:"client",...e});this.name="InvalidRequestException",this.$fault="client",Object.setPrototypeOf(this,q.prototype)}}class E extends c{constructor(e){super({name:"ResourceNotFoundException",$fault:"client",...e});this.name="ResourceNotFoundException",this.$fault="client",Object.setPrototypeOf(this,E.prototype)}}class S extends c{constructor(e){super({name:"TooManyRequestsException",$fault:"client",...e});this.name="TooManyRequestsException",this.$fault="client",Object.setPrototypeOf(this,S.prototype)}}class z extends c{constructor(e){super({name:"UnauthorizedException",$fault:"client",...e});this.name="UnauthorizedException",this.$fault="client",Object.setPrototypeOf(this,z.prototype)}}var He=(e)=>({...e,...e.accessToken&&{accessToken:R}}),ms=(e)=>({...e,...e.secretAccessKey&&{secretAccessKey:R},...e.sessionToken&&{sessionToken:R}}),Oe=(e)=>({...e,...e.roleCredentials&&{roleCredentials:ms(e.roleCredentials)}});var m=o(x(),1),fe=o(F(),1);var ge=async(e,s)=>{const t=fe.requestBuilder(e,s),r=i({},ks,{[Ds]:e[qs]});t.bp("/federation/credentials");const a=i({[zs]:[,D(e[Ss],"roleName")],[Es]:[,D(e[Rs],"accountId")]});let n;return t.m("GET").h(r).q(a).b(n),t.build()};var es=async(e,s)=>{if(e.statusCode!==200&&e.statusCode>=300)return hs(e,s);const t=i({$metadata:w(e)}),r=D(Ge(await m.parseJsonBody(e.body,s)),"body"),a=y(r,{roleCredentials:Ne});return Object.assign(t,a),t};var hs=async(e,s)=>{const t={...e,body:await m.parseJsonErrorBody(e.body,s)},r=m.loadRestJsonErrorCode(e,t.body);switch(r){case"InvalidRequestException":case"com.amazonaws.sso#InvalidRequestException":throw await ws(t,s);case"ResourceNotFoundException":case"com.amazonaws.sso#ResourceNotFoundException":throw await bs(t,s);case"TooManyRequestsException":case"com.amazonaws.sso#TooManyRequestsException":throw await xs(t,s);case"UnauthorizedException":case"com.amazonaws.sso#UnauthorizedException":throw await vs(t,s);default:const a=t.body;return us({output:e,parsedBody:a,errorCode:r})}},us=Ve(c),ws=async(e,s)=>{const t=i({}),r=e.body,a=y(r,{message:h});Object.assign(t,a);const n=new q({$metadata:w(e),...t});return u(n,e.body)},bs=async(e,s)=>{const t=i({}),r=e.body,a=y(r,{message:h});Object.assign(t,a);const n=new E({$metadata:w(e),...t});return u(n,e.body)},xs=async(e,s)=>{const t=i({}),r=e.body,a=y(r,{message:h});Object.assign(t,a);const n=new S({$metadata:w(e),...t});return u(n,e.body)},vs=async(e,s)=>{const t=i({}),r=e.body,a=y(r,{message:h});Object.assign(t,a);const n=new z({$metadata:w(e),...t});return u(n,e.body)},w=(e)=>({httpStatusCode:e.statusCode,requestId:e.headers["x-amzn-requestid"]??e.headers["x-amzn-request-id"]??e.headers["x-amz-request-id"],extendedRequestId:e.headers["x-amz-id-2"],cfId:e.headers["x-amz-cf-id"]});var ks=(e)=>e!==void 0&&e!==null&&e!==""&&(!Object.getOwnPropertyNames(e).includes("length")||e.length!=0)&&(!Object.getOwnPropertyNames(e).includes("size")||e.size!=0),Rs="accountId",qs="accessToken",Es="account_id";var Ss="roleName",zs="role_name",Ds="x-amz-sso_bearer_token";class Bs extends ss.classBuilder().ep({...L}).m(function(e,s,t,r){return[ts(t,this.serialize,this.deserialize),rs(t,e.getEndpointParameterInstructions())]}).s("SWBPortalService","GetRoleCredentials",{}).n("SSOClient","GetRoleCredentialsCommand").f(He,Oe).ser(ge).de(es).build(){}export{ys as SSOClient,Bs as GetRoleCredentialsCommand};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{x as _} from"./chunk-a5c18c07abe8fd9c.js";import"./chunk-bbd36ce62b950ee5.js";import{ib as a} from"./chunk-0ffc38ed09847e35.js";import{lb as l,rb as h} from"./chunk-a816613f5321b9db.js";var R=_(a(),1);var m=_(a(),1);var c=_(a(),1),C=(e,s,r)=>{const i={EcsContainer:async(t)=>{const{fromHttp:n}=await import("./chunk-
|
|
2
|
+
import{x as _} from"./chunk-a5c18c07abe8fd9c.js";import"./chunk-bbd36ce62b950ee5.js";import{ib as a} from"./chunk-0ffc38ed09847e35.js";import{lb as l,rb as h} from"./chunk-a816613f5321b9db.js";var R=_(a(),1);var m=_(a(),1);var c=_(a(),1),C=(e,s,r)=>{const i={EcsContainer:async(t)=>{const{fromHttp:n}=await import("./chunk-7d7b2c1f2a8dd018.js"),{fromContainerMetadata:d}=await import("./chunk-32f06f9ad00aaabd.js");return r?.debug("@aws-sdk/credential-provider-ini - credential_source is EcsContainer"),c.chain(n(t??{}),d(t))},Ec2InstanceMetadata:async(t)=>{r?.debug("@aws-sdk/credential-provider-ini - credential_source is Ec2InstanceMetadata");const{fromInstanceMetadata:n}=await import("./chunk-32f06f9ad00aaabd.js");return n(t)},Environment:async(t)=>{r?.debug("@aws-sdk/credential-provider-ini - credential_source is Environment");const{fromEnv:n}=await import("./chunk-94578320d28e33ad.js");return n(t)}};if(e in i)return i[e];else throw new c.CredentialsProviderError(`Unsupported credential source in profile ${s}. Got ${e}, `+"expected EcsContainer or Ec2InstanceMetadata or Environment.",{logger:r})};var P=(e,{profile:s="default",logger:r}={})=>{return Boolean(e)&&typeof e==="object"&&typeof e.role_arn==="string"&&["undefined","string"].indexOf(typeof e.role_session_name)>-1&&["undefined","string"].indexOf(typeof e.external_id)>-1&&["undefined","string"].indexOf(typeof e.mfa_serial)>-1&&(j(e,{profile:s,logger:r})||O(e,{profile:s,logger:r}))},j=(e,{profile:s,logger:r})=>{const i=typeof e.source_profile==="string"&&typeof e.credential_source==="undefined";if(i)r?.debug?.(` ${s} isAssumeRoleWithSourceProfile source_profile=${e.source_profile}`);return i},O=(e,{profile:s,logger:r})=>{const i=typeof e.credential_source==="string"&&typeof e.source_profile==="undefined";if(i)r?.debug?.(` ${s} isCredentialSourceProfile credential_source=${e.credential_source}`);return i},v=async(e,s,r,i={})=>{r.logger?.debug("@aws-sdk/credential-provider-ini - resolveAssumeRoleCredentials (STS)");const t=s[e];if(!r.roleAssumer){const{getDefaultRoleAssumer:I}=await import("./chunk-e4f28182cf5f6e1d.js");r.roleAssumer=I({...r.clientConfig,credentialProviderLogger:r.logger,parentClientConfig:r?.parentClientConfig},r.clientPlugins)}const{source_profile:n}=t;if(n&&n in i)throw new m.CredentialsProviderError("Detected a cycle attempting to resolve credentials for profile"+` ${l(r)}. Profiles visited: `+Object.keys(i).join(", "),{logger:r.logger});r.logger?.debug(`@aws-sdk/credential-provider-ini - finding credential resolver using ${n?`source_profile=[${n}]`:`profile=[${e}]`}`);const d=n?o(n,{...s,[n]:{...s[n],role_arn:t.role_arn??s[n].role_arn}},r,{...i,[n]:!0}):(await C(t.credential_source,e,r.logger)(r))(),u={RoleArn:t.role_arn,RoleSessionName:t.role_session_name||`aws-sdk-js-${Date.now()}`,ExternalId:t.external_id,DurationSeconds:parseInt(t.duration_seconds||"3600",10)},{mfa_serial:f}=t;if(f){if(!r.mfaCodeProvider)throw new m.CredentialsProviderError(`Profile ${e} requires multi-factor authentication, but no MFA code callback was provided.`,{logger:r.logger,tryNextLink:!1});u.SerialNumber=f,u.TokenCode=await r.mfaCodeProvider(f)}const D=await d;return r.roleAssumer(D,u)};var x=(e)=>Boolean(e)&&typeof e==="object"&&typeof e.credential_process==="string",b=async(e,s)=>import("./chunk-4b201cccdf6d290f.js").then(({fromProcess:r})=>r({...e,profile:s})());var A=async(e,s={})=>{const{fromSSO:r}=await import("./chunk-db65c75cda396f98.js");return r({profile:e,logger:s.logger})()},k=(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 w=(e)=>Boolean(e)&&typeof e==="object"&&typeof e.aws_access_key_id==="string"&&typeof e.aws_secret_access_key==="string"&&["undefined","string"].indexOf(typeof e.aws_session_token)>-1&&["undefined","string"].indexOf(typeof e.aws_account_id)>-1,y=(e,s)=>{return s?.logger?.debug("@aws-sdk/credential-provider-ini - resolveStaticCredentials"),Promise.resolve({accessKeyId:e.aws_access_key_id,secretAccessKey:e.aws_secret_access_key,sessionToken:e.aws_session_token,...e.aws_credential_scope&&{credentialScope:e.aws_credential_scope},...e.aws_account_id&&{accountId:e.aws_account_id}})};var S=(e)=>Boolean(e)&&typeof e==="object"&&typeof e.web_identity_token_file==="string"&&typeof e.role_arn==="string"&&["undefined","string"].indexOf(typeof e.role_session_name)>-1,$=async(e,s)=>import("./chunk-4e023976eb557258.js").then(({fromTokenFile:r})=>r({webIdentityTokenFile:e.web_identity_token_file,roleArn:e.role_arn,roleSessionName:e.role_session_name,roleAssumerWithWebIdentity:s.roleAssumerWithWebIdentity,logger:s.logger,parentClientConfig:s.parentClientConfig})());var o=async(e,s,r,i={})=>{const t=s[e];if(Object.keys(i).length>0&&w(t))return y(t,r);if(P(t,{profile:e,logger:r.logger}))return v(e,s,r,i);if(w(t))return y(t,r);if(S(t))return $(t,r);if(x(t))return b(r,e);if(k(t))return await A(e,r);throw new R.CredentialsProviderError(`Could not resolve credentials using profile: [${e}] in configuration/credentials file(s).`,{logger:r.logger})};var H=(e={})=>async()=>{e.logger?.debug("@aws-sdk/credential-provider-ini - fromIni");const s=await h(e);return o(l(e),s,e)};export{H as fromIni};
|