gemi 0.4.33 → 0.4.35
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-073f5b81e98d91fe.js +3 -0
- package/dist/chunk-0a6614fbd65524af.js +2 -0
- package/dist/chunk-100b76ab0ca3e14d.js +1 -0
- package/dist/chunk-1109657ed53fbdc9.js +2 -0
- package/dist/chunk-12ca7224eb6ccf72.js +9 -0
- package/dist/chunk-16a63b2fee0ce9e2.js +2 -0
- package/dist/chunk-1cc0d1072ee4a92b.js +1 -1
- package/dist/chunk-29bc27c5e126c304.js +18 -0
- package/dist/chunk-328c98321c6ba3d6.js +2 -0
- package/dist/chunk-32f06f9ad00aaabd.js +2 -0
- package/dist/chunk-35ab4be8ca6c67ee.js +2 -0
- package/dist/chunk-370389a68668658a.js +2 -0
- package/dist/chunk-3728fa21e6931333.js +2 -0
- package/dist/chunk-382a513747a9aa52.js +6 -0
- package/dist/chunk-3ab807ceccde81f3.js +3 -0
- package/dist/chunk-3bd48fb5397a155b.js +5 -0
- package/dist/chunk-4e023976eb557258.js +1 -1
- package/dist/chunk-51c21d2a3c45fbe1.js +2 -0
- package/dist/chunk-57a61e580c4adf80.js +2 -0
- package/dist/chunk-589f4b330dd6d32e.js +2 -0
- package/dist/chunk-5a9fa677066f72ac.js +2 -0
- package/dist/chunk-5b836c769c5dad2a.js +2 -0
- package/dist/chunk-5cd0a98345a5d57a.js +2 -0
- package/dist/chunk-6766e66417809e1a.js +2 -0
- package/dist/chunk-70bb003c03f21dad.js +2 -0
- package/dist/chunk-77d5bbc7a9117c21.js +2 -0
- package/dist/chunk-7c62e9d6edc4b418.js +2 -0
- package/dist/chunk-7d7b2c1f2a8dd018.js +6 -0
- package/dist/chunk-8295e42bcfc910ff.js +16 -0
- package/dist/chunk-860f5fcef7074193.js +1 -1
- package/dist/chunk-8c3e0f5d4a0d6e53.js +2 -0
- package/dist/chunk-8f24cd33e07d02f3.js +2 -0
- package/dist/chunk-9d069ba29a122630.js +1 -0
- package/dist/chunk-9ee2118bd4eb34ae.js +9 -0
- package/dist/chunk-a3526e321ac9d173.js +1 -0
- package/dist/chunk-a57ecc74c0fb9045.js +2 -0
- package/dist/chunk-bcd70a6fc2fd359c.js +1 -0
- package/dist/chunk-c675395110f371b1.js +6 -0
- package/dist/chunk-c8b00b645df96ed5.js +2 -0
- package/dist/chunk-cfa9a65fae5ddaf4.js +2 -0
- package/dist/chunk-d3765f96a689a0c1.js +2 -0
- package/dist/chunk-db65c75cda396f98.js +1 -1
- package/dist/chunk-e0e0f2ee626a6fb3.js +18 -0
- package/dist/chunk-e16b252158474b8c.js +1 -0
- package/dist/chunk-e4f28182cf5f6e1d.js +2 -0
- package/dist/client/index.js +6 -3
- package/dist/client/init.d.ts.map +1 -1
- package/dist/storage/index.js +4 -4
- 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,3 @@
|
|
|
1
|
+
import{x as F,y as $} from"./chunk-a5c18c07abe8fd9c.js";import{ob as V} from"./chunk-5a9fa677066f72ac.js";var ot=$((zs,Dt)=>{var{defineProperty:W,getOwnPropertyDescriptor:$r,getOwnPropertyNames:Er}=Object,Sr=Object.prototype.hasOwnProperty,C=(t,n)=>W(t,"name",{value:n,configurable:!0}),Ir=(t,n)=>{for(var r in n)W(t,r,{get:n[r],enumerable:!0})},Ur=(t,n,r,e)=>{if(n&&typeof n==="object"||typeof n==="function"){for(let s of Er(n))if(!Sr.call(t,s)&&s!==r)W(t,s,{get:()=>n[s],enumerable:!(e=$r(n,s))||e.enumerable})}return t},Ar=(t)=>Ur(W({},"__esModule",{value:!0}),t),Lt={};Ir(Lt,{constructStack:()=>st});Dt.exports=Ar(Lt);var L=C((t,n)=>{const r=[];if(t)r.push(t);if(n)for(let e of n)r.push(e);return r},"getAllAliases"),A=C((t,n)=>{return`${t||"anonymous"}${n&&n.length>0?` (a.k.a. ${n.join(",")})`:""}`},"getMiddlewareNameWithAliases"),st=C(()=>{let t=[],n=[],r=!1;const e=new Set,s=C((h)=>h.sort((g,u)=>Ft[u.step]-Ft[g.step]||Nt[u.priority||"normal"]-Nt[g.priority||"normal"]),"sort"),o=C((h)=>{let g=!1;const u=C((T)=>{const x=L(T.name,T.aliases);if(x.includes(h)){g=!0;for(let w of x)e.delete(w);return!1}return!0},"filterCb");return t=t.filter(u),n=n.filter(u),g},"removeByName"),c=C((h)=>{let g=!1;const u=C((T)=>{if(T.middleware===h){g=!0;for(let x of L(T.name,T.aliases))e.delete(x);return!1}return!0},"filterCb");return t=t.filter(u),n=n.filter(u),g},"removeByReference"),i=C((h)=>{var g;return t.forEach((u)=>{h.add(u.middleware,{...u})}),n.forEach((u)=>{h.addRelativeTo(u.middleware,{...u})}),(g=h.identifyOnResolve)==null||g.call(h,l.identifyOnResolve()),h},"cloneTo"),d=C((h)=>{const g=[];return h.before.forEach((u)=>{if(u.before.length===0&&u.after.length===0)g.push(u);else g.push(...d(u))}),g.push(h),h.after.reverse().forEach((u)=>{if(u.before.length===0&&u.after.length===0)g.push(u);else g.push(...d(u))}),g},"expandRelativeMiddlewareList"),y=C((h=!1)=>{const g=[],u=[],T={};return t.forEach((w)=>{const f={...w,before:[],after:[]};for(let p of L(f.name,f.aliases))T[p]=f;g.push(f)}),n.forEach((w)=>{const f={...w,before:[],after:[]};for(let p of L(f.name,f.aliases))T[p]=f;u.push(f)}),u.forEach((w)=>{if(w.toMiddleware){const f=T[w.toMiddleware];if(f===void 0){if(h)return;throw new Error(`${w.toMiddleware} is not found when adding ${A(w.name,w.aliases)} middleware ${w.relation} ${w.toMiddleware}`)}if(w.relation==="after")f.after.push(w);if(w.relation==="before")f.before.push(w)}}),s(g).map(d).reduce((w,f)=>{return w.push(...f),w},[])},"getMiddlewareList"),l={add:(h,g={})=>{const{name:u,override:T,aliases:x}=g,w={step:"initialize",priority:"normal",middleware:h,...g},f=L(u,x);if(f.length>0){if(f.some((p)=>e.has(p))){if(!T)throw new Error(`Duplicate middleware name '${A(u,x)}'`);for(let p of f){const a=t.findIndex((E)=>{var Y;return E.name===p||((Y=E.aliases)==null?void 0:Y.some((et)=>et===p))});if(a===-1)continue;const b=t[a];if(b.step!==w.step||w.priority!==b.priority)throw new Error(`"${A(b.name,b.aliases)}" middleware with ${b.priority} priority in ${b.step} step cannot be overridden by "${A(u,x)}" middleware with ${w.priority} priority in ${w.step} step.`);t.splice(a,1)}}for(let p of f)e.add(p)}t.push(w)},addRelativeTo:(h,g)=>{const{name:u,override:T,aliases:x}=g,w={middleware:h,...g},f=L(u,x);if(f.length>0){if(f.some((p)=>e.has(p))){if(!T)throw new Error(`Duplicate middleware name '${A(u,x)}'`);for(let p of f){const a=n.findIndex((E)=>{var Y;return E.name===p||((Y=E.aliases)==null?void 0:Y.some((et)=>et===p))});if(a===-1)continue;const b=n[a];if(b.toMiddleware!==w.toMiddleware||b.relation!==w.relation)throw new Error(`"${A(b.name,b.aliases)}" middleware ${b.relation} "${b.toMiddleware}" middleware cannot be overridden by "${A(u,x)}" middleware ${w.relation} "${w.toMiddleware}" middleware.`);n.splice(a,1)}}for(let p of f)e.add(p)}n.push(w)},clone:()=>i(st()),use:(h)=>{h.applyToStack(l)},remove:(h)=>{if(typeof h==="string")return o(h);else return c(h)},removeByTag:(h)=>{let g=!1;const u=C((T)=>{const{tags:x,name:w,aliases:f}=T;if(x&&x.includes(h)){const p=L(w,f);for(let a of p)e.delete(a);return g=!0,!1}return!0},"filterCb");return t=t.filter(u),n=n.filter(u),g},concat:(h)=>{var g;const u=i(st());return u.use(h),u.identifyOnResolve(r||u.identifyOnResolve()||(((g=h.identifyOnResolve)==null?void 0:g.call(h))??!1)),u},applyToStack:i,identify:()=>{return y(!0).map((h)=>{const g=h.step??h.relation+" "+h.toMiddleware;return A(h.name,h.aliases)+" - "+g})},identifyOnResolve(h){if(typeof h==="boolean")r=h;return r},resolve:(h,g)=>{for(let u of y().map((T)=>T.middleware).reverse())h=u(h,g);if(r)console.log(l.identify());return h}};return l},"constructStack"),Ft={initialize:5,serialize:4,build:3,finalizeRequest:2,deserialize:1},Nt={high:3,normal:2,low:1}});var ft=$((co,Wt)=>{var{defineProperty:G,getOwnPropertyDescriptor:Dr,getOwnPropertyNames:mr}=Object,Br=Object.prototype.hasOwnProperty,ct=(t,n)=>G(t,"name",{value:n,configurable:!0}),Mr=(t,n)=>{for(var r in n)G(t,r,{get:n[r],enumerable:!0})},jr=(t,n,r,e)=>{if(n&&typeof n==="object"||typeof n==="function"){for(let s of mr(n))if(!Br.call(t,s)&&s!==r)G(t,s,{get:()=>n[s],enumerable:!(e=Dr(n,s))||e.enumerable})}return t},Yr=(t)=>jr(G({},"__esModule",{value:!0}),t),Rt={};Mr(Rt,{escapeUri:()=>zt,escapeUriPath:()=>zr});Wt.exports=Yr(Rt);var zt=ct((t)=>encodeURIComponent(t).replace(/[!'()*]/g,Rr),"escapeUri"),Rr=ct((t)=>`%${t.charCodeAt(0).toString(16).toUpperCase()}`,"hexEncode"),zr=ct((t)=>t.split("/").map(zt).join("/"),"escapeUriPath")});var un=$((Di,hn)=>{var on=function(t){return Object.keys(t).reduce((n,r)=>{const e=t[r];return{...n,[r]:Array.isArray(e)?[...e]:e}},{})},fn=function(t){return/^[a-z0-9][a-z0-9\.\-]*[a-z0-9]$/.test(t)},J=Object.defineProperty,Pr=Object.getOwnPropertyDescriptor,Or=Object.getOwnPropertyNames,qr=Object.prototype.hasOwnProperty,N=(t,n)=>J(t,"name",{value:n,configurable:!0}),vr=(t,n)=>{for(var r in n)J(t,r,{get:n[r],enumerable:!0})},_r=(t,n,r,e)=>{if(n&&typeof n==="object"||typeof n==="function"){for(let s of Or(n))if(!qr.call(t,s)&&s!==r)J(t,s,{get:()=>n[s],enumerable:!(e=Pr(n,s))||e.enumerable})}return t},te=(t)=>_r(J({},"__esModule",{value:!0}),t),tn={};vr(tn,{Field:()=>ee,Fields:()=>se,HttpRequest:()=>oe,HttpResponse:()=>ie,IHttpRequest:()=>nn.HttpRequest,getHttpHandlerExtensionConfiguration:()=>ne,isValidHostname:()=>fn,resolveHttpHandlerRuntimeConfig:()=>re});hn.exports=te(tn);var ne=N((t)=>{let n=t.httpHandler;return{setHttpHandler(r){n=r},httpHandler(){return n},updateHttpClientConfig(r,e){n.updateHttpClientConfig(r,e)},httpHandlerConfigs(){return n.httpHandlerConfigs()}}},"getHttpHandlerExtensionConfiguration"),re=N((t)=>{return{httpHandler:t.httpHandler()}},"resolveHttpHandlerRuntimeConfig"),nn=V(),rn=class t{constructor({name:n,kind:r=nn.FieldPosition.HEADER,values:e=[]}){this.name=n,this.kind=r,this.values=e}add(n){this.values.push(n)}set(n){this.values=n}remove(n){this.values=this.values.filter((r)=>r!==n)}toString(){return this.values.map((n)=>n.includes(",")||n.includes(" ")?`"${n}"`:n).join(", ")}get(){return this.values}};N(rn,"Field");var ee=rn,en=class t{constructor({fields:n=[],encoding:r="utf-8"}){this.entries={},n.forEach(this.setField.bind(this)),this.encoding=r}setField(n){this.entries[n.name.toLowerCase()]=n}getField(n){return this.entries[n.toLowerCase()]}removeField(n){delete this.entries[n.toLowerCase()]}getByType(n){return Object.values(this.entries).filter((r)=>r.kind===n)}};N(en,"Fields");var se=en,sn=class t{constructor(n){this.method=n.method||"GET",this.hostname=n.hostname||"localhost",this.port=n.port,this.query=n.query||{},this.headers=n.headers||{},this.body=n.body,this.protocol=n.protocol?n.protocol.slice(-1)!==":"?`${n.protocol}:`:n.protocol:"https:",this.path=n.path?n.path.charAt(0)!=="/"?`/${n.path}`:n.path:"/",this.username=n.username,this.password=n.password,this.fragment=n.fragment}static clone(n){const r=new t({...n,headers:{...n.headers}});if(r.query)r.query=on(r.query);return r}static isInstance(n){if(!n)return!1;const r=n;return"method"in r&&"protocol"in r&&"hostname"in r&&"path"in r&&typeof r.query==="object"&&typeof r.headers==="object"}clone(){return t.clone(this)}};N(sn,"HttpRequest");var oe=sn;N(on,"cloneQuery");var cn=class t{constructor(n){this.statusCode=n.statusCode,this.reason=n.reason,this.headers=n.headers||{},this.body=n.body}static isInstance(n){if(!n)return!1;const r=n;return typeof r.statusCode==="number"&&typeof r.headers==="object"}};N(cn,"HttpResponse");var ie=cn;N(fn,"isValidHostname")});var wn=$((mi,yn)=>{var gn=function(t){const n=[];for(let r of Object.keys(t).sort()){const e=t[r];if(r=pt.escapeUri(r),Array.isArray(e))for(let s=0,o=e.length;s<o;s++)n.push(`${r}=${pt.escapeUri(e[s])}`);else{let s=r;if(e||typeof e==="string")s+=`=${pt.escapeUri(e)}`;n.push(s)}}return n.join("&")},k=Object.defineProperty,ce=Object.getOwnPropertyDescriptor,fe=Object.getOwnPropertyNames,he=Object.prototype.hasOwnProperty,ue=(t,n)=>k(t,"name",{value:n,configurable:!0}),de=(t,n)=>{for(var r in n)k(t,r,{get:n[r],enumerable:!0})},ge=(t,n,r,e)=>{if(n&&typeof n==="object"||typeof n==="function"){for(let s of fe(n))if(!he.call(t,s)&&s!==r)k(t,s,{get:()=>n[s],enumerable:!(e=ce(n,s))||e.enumerable})}return t},ye=(t)=>ge(k({},"__esModule",{value:!0}),t),dn={};de(dn,{buildQueryString:()=>gn});yn.exports=ye(dn);var pt=ft();ue(gn,"buildQueryString")});var Tn=$((Bi,xn)=>{var{defineProperty:P,getOwnPropertyDescriptor:we,getOwnPropertyNames:pe}=Object,xe=Object.prototype.hasOwnProperty,Te=(t,n)=>P(t,"name",{value:n,configurable:!0}),le=(t,n)=>{for(var r in n)P(t,r,{get:n[r],enumerable:!0})},be=(t,n,r,e)=>{if(n&&typeof n==="object"||typeof n==="function"){for(let s of pe(n))if(!xe.call(t,s)&&s!==r)P(t,s,{get:()=>n[s],enumerable:!(e=we(n,s))||e.enumerable})}return t},ae=(t)=>be(P({},"__esModule",{value:!0}),t),pn={};le(pn,{isArrayBuffer:()=>Ce});xn.exports=ae(pn);var Ce=Te((t)=>typeof ArrayBuffer==="function"&&t instanceof ArrayBuffer||Object.prototype.toString.call(t)==="[object ArrayBuffer]","isArrayBuffer")});var q=$((Mi,an)=>{var{defineProperty:O,getOwnPropertyDescriptor:$e,getOwnPropertyNames:Ee}=Object,Se=Object.prototype.hasOwnProperty,ln=(t,n)=>O(t,"name",{value:n,configurable:!0}),Ie=(t,n)=>{for(var r in n)O(t,r,{get:n[r],enumerable:!0})},Ue=(t,n,r,e)=>{if(n&&typeof n==="object"||typeof n==="function"){for(let s of Ee(n))if(!Se.call(t,s)&&s!==r)O(t,s,{get:()=>n[s],enumerable:!(e=$e(n,s))||e.enumerable})}return t},Ae=(t)=>Ue(O({},"__esModule",{value:!0}),t),bn={};Ie(bn,{fromArrayBuffer:()=>Ne,fromString:()=>Le});an.exports=Ae(bn);var Fe=Tn(),xt=import.meta.require("buffer"),Ne=ln((t,n=0,r=t.byteLength-n)=>{if(!Fe.isArrayBuffer(t))throw new TypeError(`The "input" argument must be ArrayBuffer. Received type ${typeof t} (${t})`);return xt.Buffer.from(t,n,r)},"fromArrayBuffer"),Le=ln((t,n)=>{if(typeof t!=="string")throw new TypeError(`The "input" argument must be of type string. Received type ${typeof t} (${t})`);return n?xt.Buffer.from(t,n):xt.Buffer.from(t)},"fromString")});var En=$((Cn)=>{Object.defineProperty(Cn,"__esModule",{value:!0});Cn.fromBase64=void 0;var De=q(),me=/^[A-Za-z0-9+/]*={0,2}$/,Be=(t)=>{if(t.length*3%4!==0)throw new TypeError("Incorrect padding on base64 string.");if(!me.exec(t))throw new TypeError("Invalid base64 string.");const n=De.fromString(t,"base64");return new Uint8Array(n.buffer,n.byteOffset,n.byteLength)};Cn.fromBase64=Be});var Fn=$((Yi,An)=>{var{defineProperty:v,getOwnPropertyDescriptor:Me,getOwnPropertyNames:je}=Object,Ye=Object.prototype.hasOwnProperty,Tt=(t,n)=>v(t,"name",{value:n,configurable:!0}),Re=(t,n)=>{for(var r in n)v(t,r,{get:n[r],enumerable:!0})},ze=(t,n,r,e)=>{if(n&&typeof n==="object"||typeof n==="function"){for(let s of je(n))if(!Ye.call(t,s)&&s!==r)v(t,s,{get:()=>n[s],enumerable:!(e=Me(n,s))||e.enumerable})}return t},We=(t)=>ze(v({},"__esModule",{value:!0}),t),Sn={};Re(Sn,{fromUtf8:()=>Un,toUint8Array:()=>Ve,toUtf8:()=>Ze});An.exports=We(Sn);var In=q(),Un=Tt((t)=>{const n=In.fromString(t,"utf8");return new Uint8Array(n.buffer,n.byteOffset,n.byteLength/Uint8Array.BYTES_PER_ELEMENT)},"fromUtf8"),Ve=Tt((t)=>{if(typeof t==="string")return Un(t);if(ArrayBuffer.isView(t))return new Uint8Array(t.buffer,t.byteOffset,t.byteLength/Uint8Array.BYTES_PER_ELEMENT);return new Uint8Array(t)},"toUint8Array"),Ze=Tt((t)=>{if(typeof t==="string")return t;if(typeof t!=="object"||typeof t.byteOffset!=="number"||typeof t.byteLength!=="number")throw new Error("@smithy/util-utf8: toUtf8 encoder function only accepts string | Uint8Array.");return In.fromArrayBuffer(t.buffer,t.byteOffset,t.byteLength).toString("utf8")},"toUtf8")});var Dn=$((Nn)=>{Object.defineProperty(Nn,"__esModule",{value:!0});Nn.toBase64=void 0;var Ge=q(),He=Fn(),Qe=(t)=>{let n;if(typeof t==="string")n=He.fromUtf8(t);else n=t;if(typeof n!=="object"||typeof n.byteOffset!=="number"||typeof n.byteLength!=="number")throw new Error("@smithy/util-base64: toBase64 encoder function only accepts string | Uint8Array.");return Ge.fromArrayBuffer(n.buffer,n.byteOffset,n.byteLength).toString("base64")};Nn.toBase64=Qe});var Mn=$((zi,_)=>{var{defineProperty:mn,getOwnPropertyDescriptor:Ke,getOwnPropertyNames:Xe}=Object,Je=Object.prototype.hasOwnProperty,lt=(t,n,r,e)=>{if(n&&typeof n==="object"||typeof n==="function"){for(let s of Xe(n))if(!Je.call(t,s)&&s!==r)mn(t,s,{get:()=>n[s],enumerable:!(e=Ke(n,s))||e.enumerable})}return t},Bn=(t,n,r)=>(lt(t,n,"default"),r&<(r,n,"default")),ke=(t)=>lt(mn({},"__esModule",{value:!0}),t),bt={};_.exports=ke(bt);Bn(bt,En(),_.exports);Bn(bt,Dn(),_.exports)});var Hn=$((Wi,Gn)=>{var Rn=function(t=0){return new Promise((n,r)=>{if(t)setTimeout(()=>{const e=new Error(`Request did not complete within ${t} ms`);e.name="TimeoutError",r(e)},t)})};async function Wn(t){const n=await Zn(t),r=es.fromBase64(n);return new Uint8Array(r)}async function Vn(t){const n=[],r=t.getReader();let e=!1,s=0;while(!e){const{done:i,value:d}=await r.read();if(d)n.push(d),s+=d.length;e=i}const o=new Uint8Array(s);let c=0;for(let i of n)o.set(i,c),c+=i.length;return o}var Zn=function(t){return new Promise((n,r)=>{const e=new FileReader;e.onloadend=()=>{if(e.readyState!==2)return r(new Error("Reader aborted too early"));const s=e.result??"",o=s.indexOf(","),c=o>-1?o+1:s.length;n(s.substring(c))},e.onabort=()=>r(new Error("Read aborted")),e.onerror=()=>r(e.error),e.readAsDataURL(t)})},nt=Object.defineProperty,Pe=Object.getOwnPropertyDescriptor,Oe=Object.getOwnPropertyNames,qe=Object.prototype.hasOwnProperty,U=(t,n)=>nt(t,"name",{value:n,configurable:!0}),ve=(t,n)=>{for(var r in n)nt(t,r,{get:n[r],enumerable:!0})},_e=(t,n,r,e)=>{if(n&&typeof n==="object"||typeof n==="function"){for(let s of Oe(n))if(!qe.call(t,s)&&s!==r)nt(t,s,{get:()=>n[s],enumerable:!(e=Pe(n,s))||e.enumerable})}return t},ts=(t)=>_e(nt({},"__esModule",{value:!0}),t),Yn={};ve(Yn,{FetchHttpHandler:()=>rs,keepAliveSupport:()=>tt,streamCollector:()=>ss});Gn.exports=ts(Yn);var jn=un(),ns=wn();U(Rn,"requestTimeout");var tt={supported:void 0},zn=class t{static create(n){if(typeof(n==null?void 0:n.handle)==="function")return n;return new t(n)}constructor(n){if(typeof n==="function")this.configProvider=n().then((r)=>r||{});else this.config=n??{},this.configProvider=Promise.resolve(this.config);if(tt.supported===void 0)tt.supported=Boolean(typeof Request!=="undefined"&&"keepalive"in new Request("https://[::1]"))}destroy(){}async handle(n,{abortSignal:r}={}){if(!this.config)this.config=await this.configProvider;const e=this.config.requestTimeout,s=this.config.keepAlive===!0,o=this.config.credentials;if(r==null?void 0:r.aborted){const f=new Error("Request aborted");return f.name="AbortError",Promise.reject(f)}let c=n.path;const i=ns.buildQueryString(n.query||{});if(i)c+=`?${i}`;if(n.fragment)c+=`#${n.fragment}`;let d="";if(n.username!=null||n.password!=null){const f=n.username??"",p=n.password??"";d=`${f}:${p}@`}const{port:y,method:l}=n,h=`${n.protocol}//${d}${n.hostname}${y?`:${y}`:""}${c}`,g=l==="GET"||l==="HEAD"?void 0:n.body,u={body:g,headers:new Headers(n.headers),method:l,credentials:o};if(g)u.duplex="half";if(typeof AbortController!=="undefined")u.signal=r;if(tt.supported)u.keepalive=s;let T=U(()=>{},"removeSignalEventListener");const x=new Request(h,u),w=[fetch(x).then((f)=>{const p=f.headers,a={};for(let E of p.entries())a[E[0]]=E[1];if(f.body==null)return f.blob().then((E)=>({response:new jn.HttpResponse({headers:a,reason:f.statusText,statusCode:f.status,body:E})}));return{response:new jn.HttpResponse({headers:a,reason:f.statusText,statusCode:f.status,body:f.body})}}),Rn(e)];if(r)w.push(new Promise((f,p)=>{const a=U(()=>{const b=new Error("Request aborted");b.name="AbortError",p(b)},"onAbort");if(typeof r.addEventListener==="function"){const b=r;b.addEventListener("abort",a,{once:!0}),T=U(()=>b.removeEventListener("abort",a),"removeSignalEventListener")}else r.onabort=a}));return Promise.race(w).finally(T)}updateHttpClientConfig(n,r){this.config=void 0,this.configProvider=this.configProvider.then((e)=>{return e[n]=r,e})}httpHandlerConfigs(){return this.config??{}}};U(zn,"FetchHttpHandler");var rs=zn,es=Mn(),ss=U((t)=>{if(typeof Blob==="function"&&t instanceof Blob)return Wn(t);return Vn(t)},"streamCollector");U(Wn,"collectBlob");U(Vn,"collectStream");U(Zn,"readToBase64")});var On=$((Vi,Pn)=>{var Jn=function(t){if(t.length%2!==0)throw new Error("Hex encoded strings must have an even number length");const n=new Uint8Array(t.length/2);for(let r=0;r<t.length;r+=2){const e=t.slice(r,r+2).toLowerCase();if(e in at)n[r/2]=at[e];else throw new Error(`Cannot decode unrecognized sequence ${e} as hexadecimal`)}return n},kn=function(t){let n="";for(let r=0;r<t.byteLength;r++)n+=Xn[t[r]];return n},rt=Object.defineProperty,os=Object.getOwnPropertyDescriptor,is=Object.getOwnPropertyNames,cs=Object.prototype.hasOwnProperty,Qn=(t,n)=>rt(t,"name",{value:n,configurable:!0}),fs=(t,n)=>{for(var r in n)rt(t,r,{get:n[r],enumerable:!0})},hs=(t,n,r,e)=>{if(n&&typeof n==="object"||typeof n==="function"){for(let s of is(n))if(!cs.call(t,s)&&s!==r)rt(t,s,{get:()=>n[s],enumerable:!(e=os(n,s))||e.enumerable})}return t},us=(t)=>hs(rt({},"__esModule",{value:!0}),t),Kn={};fs(Kn,{fromHex:()=>Jn,toHex:()=>kn});Pn.exports=us(Kn);var Xn={},at={};for(let t=0;t<256;t++){let n=t.toString(16).toLowerCase();if(n.length===1)n=`0${n}`;Xn[t]=n,at[n]=t}Qn(Jn,"fromHex");Qn(kn,"toHex")});var mt=F(ot(),1);class Fr{constructor(t){this.middlewareStack=mt.constructStack(),this.config=t}send(t,n,r){const e=typeof n!=="function"?n:void 0,s=typeof n==="function"?n:r,o=t.resolveMiddleware(this.middlewareStack,this.config,e);if(s)o(t).then((c)=>s(null,c.output),(c)=>s(c)).catch(()=>{});else return o(t).then((c)=>c.output)}destroy(){if(this.config.requestHandler.destroy)this.config.requestHandler.destroy()}}var Bt=F(ot(),1),Mt=F(V(),1);class jt{constructor(){this.middlewareStack=Bt.constructStack()}static classBuilder(){return new Yt}resolveMiddlewareWithContext(t,n,r,{middlewareFn:e,clientName:s,commandName:o,inputFilterSensitiveLog:c,outputFilterSensitiveLog:i,smithyContext:d,additionalContext:y,CommandCtor:l}){for(let x of e.bind(this)(l,t,n,r))this.middlewareStack.use(x);const h=t.concat(this.middlewareStack),{logger:g}=n,u={logger:g,clientName:s,commandName:o,inputFilterSensitiveLog:c,outputFilterSensitiveLog:i,[Mt.SMITHY_CONTEXT_KEY]:{commandInstance:this,...d},...y},{requestHandler:T}=n;return h.resolve((x)=>T.handle(x.request,r||{}),u)}}class Yt{constructor(){this._init=()=>{},this._ep={},this._middlewareFn=()=>[],this._commandName="",this._clientName="",this._additionalContext={},this._smithyContext={},this._inputFilterSensitiveLog=(t)=>t,this._outputFilterSensitiveLog=(t)=>t,this._serializer=null,this._deserializer=null}init(t){this._init=t}ep(t){return this._ep=t,this}m(t){return this._middlewareFn=t,this}s(t,n,r={}){return this._smithyContext={service:t,operation:n,...r},this}c(t={}){return this._additionalContext=t,this}n(t,n){return this._clientName=t,this._commandName=n,this}f(t=(r)=>r,n=(r)=>r){return this._inputFilterSensitiveLog=t,this._outputFilterSensitiveLog=n,this}ser(t){return this._serializer=t,this}de(t){return this._deserializer=t,this}build(){const t=this;let n;return n=class extends jt{static getEndpointParameterInstructions(){return t._ep}constructor(...[r]){super();this.serialize=t._serializer,this.deserialize=t._deserializer,this.input=r??{},t._init(this)}resolveMiddleware(r,e,s){return this.resolveMiddlewareWithContext(r,e,s,{CommandCtor:n,middlewareFn:t._middlewareFn,clientName:t._clientName,commandName:t._commandName,inputFilterSensitiveLog:t._inputFilterSensitiveLog,outputFilterSensitiveLog:t._outputFilterSensitiveLog,smithyContext:t._smithyContext,additionalContext:t._additionalContext})}}}}var Gs=(t)=>{let n=t.httpHandler;return{setHttpHandler(r){n=r},httpHandler(){return n},updateHttpClientConfig(r,e){n.updateHttpClientConfig(r,e)},httpHandlerConfigs(){return n.httpHandlerConfigs()}}},Hs=(t)=>{return{httpHandler:t.httpHandler()}};var Nr=F(V(),1);var Lr=function(t){return Object.keys(t).reduce((n,r)=>{const e=t[r];return{...n,[r]:Array.isArray(e)?[...e]:e}},{})};class it{constructor(t){this.method=t.method||"GET",this.hostname=t.hostname||"localhost",this.port=t.port,this.query=t.query||{},this.headers=t.headers||{},this.body=t.body,this.protocol=t.protocol?t.protocol.slice(-1)!==":"?`${t.protocol}:`:t.protocol:"https:",this.path=t.path?t.path.charAt(0)!=="/"?`/${t.path}`:t.path:"/",this.username=t.username,this.password=t.password,this.fragment=t.fragment}static clone(t){const n=new it({...t,headers:{...t.headers}});if(n.query)n.query=Lr(n.query);return n}static isInstance(t){if(!t)return!1;const n=t;return"method"in n&&"protocol"in n&&"hostname"in n&&"path"in n&&typeof n.query==="object"&&typeof n.headers==="object"}clone(){return it.clone(this)}}class Z{constructor(t){this.statusCode=t.statusCode,this.reason=t.reason,this.headers=t.headers||{},this.body=t.body}static isInstance(t){if(!t)return!1;const n=t;return typeof n.statusCode==="number"&&typeof n.headers==="object"}}var H=F(ft(),1);function ht(t){const n=[];for(let r of Object.keys(t).sort()){const e=t[r];if(r=H.escapeUri(r),Array.isArray(e))for(let s=0,o=e.length;s<o;s++)n.push(`${r}=${H.escapeUri(e[s])}`);else{let s=r;if(e||typeof e==="string")s+=`=${H.escapeUri(e)}`;n.push(s)}}return n.join("&")}import{Agent as Kt,request as Zr} from"http";import{Agent as Xt,request as Gr} from"https";var Vt=["ECONNRESET","EPIPE","ETIMEDOUT"];var ut=(t)=>{const n={};for(let r of Object.keys(t)){const e=t[r];n[r]=Array.isArray(e)?e.join(","):e}return n};var Zt=(t,n,r=0)=>{if(!r)return;const e=setTimeout(()=>{t.destroy(),n(Object.assign(new Error(`Socket timed out without establishing a connection within ${r} ms`),{name:"TimeoutError"}))},r);t.on("socket",(s)=>{if(s.connecting)s.on("connect",()=>{clearTimeout(e)});else clearTimeout(e)})};var Gt=(t,{keepAlive:n,keepAliveMsecs:r})=>{if(n!==!0)return;t.on("socket",(e)=>{e.setKeepAlive(n,r||0)})};var Ht=(t,n,r=0)=>{t.setTimeout(r,()=>{t.destroy(),n(Object.assign(new Error(`Connection timed out after ${r} ms`),{name:"TimeoutError"}))})};import{Readable as Wr} from"stream";async function dt(t,n,r=Qt){const e=n.headers??{},s=e.Expect||e.expect;let o=-1,c=!1;if(s==="100-continue")await Promise.race([new Promise((i)=>{o=Number(setTimeout(i,Math.max(Qt,r)))}),new Promise((i)=>{t.on("continue",()=>{clearTimeout(o),i()}),t.on("error",()=>{c=!0,clearTimeout(o),i()})})]);if(!c)Vr(t,n.body)}var Vr=function(t,n){if(n instanceof Wr){n.pipe(t);return}if(n){if(Buffer.isBuffer(n)||typeof n==="string"){t.end(n);return}const r=n;if(typeof r==="object"&&r.buffer&&typeof r.byteOffset==="number"&&typeof r.byteLength==="number"){t.end(Buffer.from(r.buffer,r.byteOffset,r.byteLength));return}t.end(Buffer.from(n));return}t.end()},Qt=1000;class gt{static create(t){if(typeof t?.handle==="function")return t;return new gt(t)}static checkSocketUsage(t,n,r=console){const{sockets:e,requests:s,maxSockets:o}=t;if(typeof o!=="number"||o===Infinity)return n;const c=15000;if(Date.now()-c<n)return n;if(e&&s)for(let i in e){const d=e[i]?.length??0,y=s[i]?.length??0;if(d>=o&&y>=2*o)return r?.warn?.(`@smithy/node-http-handler:WARN - socket usage at capacity=${d} and ${y} additional requests are enqueued.
|
|
2
|
+
See https://docs.aws.amazon.com/sdk-for-javascript/v3/developer-guide/node-configuring-maxsockets.html
|
|
3
|
+
or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler config.`),Date.now()}return n}constructor(t){this.socketWarningTimestamp=0,this.metadata={handlerProtocol:"http/1.1"},this.configProvider=new Promise((n,r)=>{if(typeof t==="function")t().then((e)=>{n(this.resolveDefaultConfig(e))}).catch(r);else n(this.resolveDefaultConfig(t))})}resolveDefaultConfig(t){const{requestTimeout:n,connectionTimeout:r,socketTimeout:e,httpAgent:s,httpsAgent:o}=t||{};return{connectionTimeout:r,requestTimeout:n??e,httpAgent:(()=>{if(s instanceof Kt||typeof s?.destroy==="function")return s;return new Kt({keepAlive:!0,maxSockets:50,...s})})(),httpsAgent:(()=>{if(o instanceof Xt||typeof o?.destroy==="function")return o;return new Xt({keepAlive:!0,maxSockets:50,...o})})(),logger:console}}destroy(){this.config?.httpAgent?.destroy(),this.config?.httpsAgent?.destroy()}async handle(t,{abortSignal:n}={}){if(!this.config)this.config=await this.configProvider;let r;return new Promise((e,s)=>{let o=void 0;const c=async(f)=>{await o,clearTimeout(r),e(f)},i=async(f)=>{await o,clearTimeout(r),s(f)};if(!this.config)throw new Error("Node HTTP request handler config is not resolved");if(n?.aborted){const f=new Error("Request aborted");f.name="AbortError",i(f);return}const d=t.protocol==="https:",y=d?this.config.httpsAgent:this.config.httpAgent;r=setTimeout(()=>{this.socketWarningTimestamp=gt.checkSocketUsage(y,this.socketWarningTimestamp,this.config.logger)},this.config.socketAcquisitionWarningTimeout??(this.config.requestTimeout??2000)+(this.config.connectionTimeout??1000));const l=ht(t.query||{});let h=void 0;if(t.username!=null||t.password!=null){const f=t.username??"",p=t.password??"";h=`${f}:${p}`}let g=t.path;if(l)g+=`?${l}`;if(t.fragment)g+=`#${t.fragment}`;const u={headers:t.headers,host:t.hostname,method:t.method,path:g,port:t.port,agent:y,auth:h},x=(d?Gr:Zr)(u,(f)=>{const p=new Z({statusCode:f.statusCode||-1,reason:f.statusMessage,headers:ut(f.headers),body:f});c({response:p})});if(x.on("error",(f)=>{if(Vt.includes(f.code))i(Object.assign(f,{name:"TimeoutError"}));else i(f)}),Zt(x,i,this.config.connectionTimeout),Ht(x,i,this.config.requestTimeout),n){const f=()=>{x.destroy();const p=new Error("Request aborted");p.name="AbortError",i(p)};if(typeof n.addEventListener==="function"){const p=n;p.addEventListener("abort",f,{once:!0}),x.once("close",()=>p.removeEventListener("abort",f))}else n.onabort=f}const w=u.agent;if(typeof w==="object"&&"keepAlive"in w)Gt(x,{keepAlive:w.keepAlive,keepAliveMsecs:w.keepAliveMsecs});o=dt(x,t,this.config.requestTimeout).catch((f)=>{return clearTimeout(r),s(f)})})}updateHttpClientConfig(t,n){this.config=void 0,this.configProvider=this.configProvider.then((r)=>{return{...r,[t]:n}})}httpHandlerConfigs(){return this.config??{}}}import{Writable as Hr} from"stream";class yt extends Hr{constructor(){super(...arguments);this.bufferedBytes=[]}_write(t,n,r){this.bufferedBytes.push(t),r()}}async function Kr(t){const n=[],r=t.getReader();let e=!1,s=0;while(!e){const{done:i,value:d}=await r.read();if(d)n.push(d),s+=d.length;e=i}const o=new Uint8Array(s);let c=0;for(let i of n)o.set(i,c),c+=i.length;return o}var Jt=(t)=>{if(Qr(t))return Kr(t);return new Promise((n,r)=>{const e=new yt;t.pipe(e),t.on("error",(s)=>{e.end(),r(s)}),e.on("error",r),e.on("finish",function(){const s=new Uint8Array(Buffer.concat(this.bufferedBytes));n(s)})})},Qr=(t)=>typeof ReadableStream==="function"&&t instanceof ReadableStream;var Jo="***SensitiveInformation***";var Po=(t,n)=>{for(let r of Object.keys(t)){const e=t[r],s=async function(c,i,d){const y=new e(c);if(typeof i==="function")this.send(y,i);else if(typeof d==="function"){if(typeof i!=="object")throw new Error(`Expected http options but got ${typeof i}`);this.send(y,i||{},d)}else return this.send(y,i)},o=(r[0].toLowerCase()+r.slice(1)).replace(/Command$/,"");n.prototype[o]=s}};class kt extends Error{constructor(t){super(t.message);Object.setPrototypeOf(this,kt.prototype),this.name=t.name,this.$fault=t.$fault,this.$metadata=t.$metadata}}var Pt=(t,n={})=>{Object.entries(n).filter(([,e])=>e!==void 0).forEach(([e,s])=>{if(t[e]==null||t[e]==="")t[e]=s});const r=t.message||t.Message||"UnknownError";return t.message=r,delete t.Message,t};class Xr{trace(){}debug(){}info(){}warn(){}error(){}}var Ot=(t)=>typeof ArrayBuffer==="function"&&t instanceof ArrayBuffer||Object.prototype.toString.call(t)==="[object ArrayBuffer]";import{Buffer as wt} from"buffer";var m=(t,n=0,r=t.byteLength-n)=>{if(!Ot(t))throw new TypeError(`The "input" argument must be ArrayBuffer. Received type ${typeof t} (${t})`);return wt.from(t,n,r)},Q=(t,n)=>{if(typeof t!=="string")throw new TypeError(`The "input" argument must be of type string. Received type ${typeof t} (${t})`);return n?wt.from(t,n):wt.from(t)};var Jr=/^[A-Za-z0-9+/]*={0,2}$/,qt=(t)=>{if(t.length*3%4!==0)throw new TypeError("Incorrect padding on base64 string.");if(!Jr.exec(t))throw new TypeError("Invalid base64 string.");const n=Q(t,"base64");return new Uint8Array(n.buffer,n.byteOffset,n.byteLength)};var B=(t)=>{const n=Q(t,"utf8");return new Uint8Array(n.buffer,n.byteOffset,n.byteLength/Uint8Array.BYTES_PER_ELEMENT)};var fi=(t)=>{if(typeof t==="string")return B(t);if(ArrayBuffer.isView(t))return new Uint8Array(t.buffer,t.byteOffset,t.byteLength/Uint8Array.BYTES_PER_ELEMENT);return new Uint8Array(t)};var K=(t)=>{if(typeof t==="string")return t;if(typeof t!=="object"||typeof t.byteOffset!=="number"||typeof t.byteLength!=="number")throw new Error("@smithy/util-utf8: toUtf8 encoder function only accepts string | Uint8Array.");return m(t.buffer,t.byteOffset,t.byteLength).toString("utf8")};var X=(t)=>{let n;if(typeof t==="string")n=B(t);else n=t;if(typeof n!=="object"||typeof n.byteOffset!=="number"||typeof n.byteLength!=="number")throw new Error("@smithy/util-base64: toBase64 encoder function only accepts string | Uint8Array.");return m(n.buffer,n.byteOffset,n.byteLength).toString("base64")};function vt(t,n="utf-8"){if(n==="base64")return X(t);return K(t)}function _t(t,n){if(n==="base64")return I.mutate(qt(t));return I.mutate(B(t))}class I extends Uint8Array{static fromString(t,n="utf-8"){switch(typeof t){case"string":return _t(t,n);default:throw new Error(`Unsupported conversion from ${typeof t} to Uint8ArrayBlobAdapter.`)}}static mutate(t){return Object.setPrototypeOf(t,I.prototype),t}transformToString(t="utf-8"){return vt(this,t)}}import{Readable as kr} from"stream";var Ni=(t,n)=>{const{base64Encoder:r,bodyLengthChecker:e,checksumAlgorithmFn:s,checksumLocationName:o,streamHasher:c}=n,i=r!==void 0&&s!==void 0&&o!==void 0&&c!==void 0,d=i?c(s,t):void 0,y=new kr({read:()=>{}});return t.on("data",(l)=>{const h=e(l)||0;y.push(`${h.toString(16)}\r\n`),y.push(l),y.push("\r\n")}),t.on("end",async()=>{if(y.push("0\r\n"),i){const l=r(await d);y.push(`${o}:${l}\r\n`),y.push("\r\n")}y.push(null)}),y};import{Readable as Ct} from"stream";import{TextDecoder as ds} from"util";var _n=F(Hn(),1);var tr=F(On(),1);var D=(t)=>typeof ReadableStream==="function"&&(t?.constructor?.name===ReadableStream.name||t instanceof ReadableStream);var qn="The stream has already been transformed.",nr=(t)=>{if(!vn(t)&&!D(t)){const s=t?.__proto__?.constructor?.name||t;throw new Error(`Unexpected stream implementation, expect Blob or ReadableStream, got ${s}`)}let n=!1;const r=async()=>{if(n)throw new Error(qn);return n=!0,await _n.streamCollector(t)},e=(s)=>{if(typeof s.stream!=="function")throw new Error("Cannot transform payload Blob to web stream. Please make sure the Blob.stream() is polyfilled.\nIf you are using React Native, this API is not yet supported, see: https://react-native.canny.io/feature-requests/p/fetch-streaming-body");return s.stream()};return Object.assign(t,{transformToByteArray:r,transformToString:async(s)=>{const o=await r();if(s==="base64")return X(o);else if(s==="hex")return tr.toHex(o);else if(s===void 0||s==="utf8"||s==="utf-8")return K(o);else if(typeof TextDecoder==="function")return new TextDecoder(s).decode(o);else throw new Error("TextDecoder is not available, please make sure polyfill is provided.")},transformToWebStream:()=>{if(n)throw new Error(qn);if(n=!0,vn(t))return e(t);else if(D(t))return t;else throw new Error(`Cannot transform payload to web stream, got ${t}`)}})},vn=(t)=>typeof Blob==="function"&&t instanceof Blob;var rr="The stream has already been transformed.",qi=(t)=>{if(!(t instanceof Ct))try{return nr(t)}catch(e){const s=t?.__proto__?.constructor?.name||t;throw new Error(`Unexpected stream implementation, expect Stream.Readable instance, got ${s}`)}let n=!1;const r=async()=>{if(n)throw new Error(rr);return n=!0,await Jt(t)};return Object.assign(t,{transformToByteArray:r,transformToString:async(e)=>{const s=await r();if(e===void 0||Buffer.isEncoding(e))return m(s.buffer,s.byteOffset,s.byteLength).toString(e);else return new ds(e).decode(s)},transformToWebStream:()=>{if(n)throw new Error(rr);if(t.readableFlowing!==null)throw new Error("The stream has been consumed by other callbacks.");if(typeof Ct.toWeb!=="function")throw new Error("Readable.toWeb() is not supported. Please make sure you are using Node.js >= 17.0.0, or polyfill is available.");return n=!0,Ct.toWeb(t)}})};import{PassThrough as sr} from"stream";async function er(t){if(typeof t.stream==="function")t=t.stream();return t.tee()}async function ec(t){if(D(t))return er(t);const n=new sr,r=new sr;return t.pipe(n),t.pipe(r),[n,r]}import{Writable as gs} from"stream";async function or(t,n){let r=0;const e=[],s=t.getReader();let o=!1;while(!o){const{done:d,value:y}=await s.read();if(y)e.push(y),r+=y?.byteLength??0;if(r>=n)break;o=d}s.releaseLock();const c=new Uint8Array(Math.min(n,r));let i=0;for(let d of e){if(d.byteLength>c.byteLength-i){c.set(d.subarray(0,c.byteLength-i),i);break}else c.set(d,i);i+=d.length}return c}var hc=(t,n)=>{if(D(t))return or(t,n);return new Promise((r,e)=>{const s=new ir;s.limit=n,t.pipe(s),t.on("error",(o)=>{s.end(),e(o)}),s.on("error",e),s.on("finish",function(){const o=new Uint8Array(Buffer.concat(this.buffers));r(o)})})};class ir extends gs{constructor(){super(...arguments);this.buffers=[],this.limit=Infinity,this.bytesBuffered=0}_write(t,n,r){if(this.buffers.push(t),this.bytesBuffered+=t.byteLength??0,this.bytesBuffered>=this.limit){const e=this.bytesBuffered-this.limit,s=this.buffers[this.buffers.length-1];this.buffers[this.buffers.length-1]=s.subarray(0,s.byteLength-e),this.emit("finish")}r()}}var bc=async(t=new Uint8Array,n)=>{if(t instanceof Uint8Array)return I.mutate(t);if(!t)return I.mutate(new Uint8Array);const r=n.streamCollector(t);return I.mutate(await r)};var Cc=(t)=>{switch(t){case"true":return!0;case"false":return!1;default:throw new Error(`Unable to parse boolean value "${t}"`)}};var ys=(t)=>{if(t===null||t===void 0)return;if(typeof t==="string"){const n=parseFloat(t);if(!Number.isNaN(n)){if(String(n)!==String(t))wr.warn(yr(`Expected number but observed string: ${t}`));return n}}if(typeof t==="number")return t;throw new TypeError(`Expected number, got ${typeof t}: ${t}`)},ws=Math.ceil(340282346638528860000000000000000000000),cr=(t)=>{const n=ys(t);if(n!==void 0&&!Number.isNaN(n)&&n!==Infinity&&n!==(-Infinity)){if(Math.abs(n)>ws)throw new TypeError(`Expected 32-bit float, got ${t}`)}return n},$t=(t)=>{if(t===null||t===void 0)return;if(Number.isInteger(t)&&!Number.isNaN(t))return t;throw new TypeError(`Expected integer, got ${typeof t}: ${t}`)};var fr=(t)=>Et(t,32),hr=(t)=>Et(t,16),ur=(t)=>Et(t,8),Et=(t,n)=>{const r=$t(t);if(r!==void 0&&ps(r,n)!==r)throw new TypeError(`Expected ${n}-bit integer, got ${t}`);return r},ps=(t,n)=>{switch(n){case 32:return Int32Array.of(t)[0];case 16:return Int16Array.of(t)[0];case 8:return Int8Array.of(t)[0]}},$c=(t,n)=>{if(t===null||t===void 0){if(n)throw new TypeError(`Expected a non-null value for ${n}`);throw new TypeError("Expected a non-null value")}return t},Ec=(t)=>{if(t===null||t===void 0)return;if(typeof t==="object"&&!Array.isArray(t))return t;const n=Array.isArray(t)?"array":typeof t;throw new TypeError(`Expected object, got ${n}: ${t}`)},Sc=(t)=>{if(t===null||t===void 0)return;if(typeof t==="string")return t;if(["boolean","number","bigint"].includes(typeof t))return wr.warn(yr(`Expected string, got ${typeof t}: ${t}`)),String(t);throw new TypeError(`Expected string, got ${typeof t}: ${t}`)};var dr=(t)=>{if(typeof t=="string")return cr(R(t));return cr(t)},xs=/(-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?)|(-?Infinity)|(NaN)/g,R=(t)=>{const n=t.match(xs);if(n===null||n[0].length!==t.length)throw new TypeError("Expected real number, got implicit NaN");return parseFloat(t)};var Ic=(t)=>{if(typeof t==="string")return $t(R(t));return $t(t)};var Uc=(t)=>{if(typeof t==="string")return fr(R(t));return fr(t)},M=(t)=>{if(typeof t==="string")return hr(R(t));return hr(t)},gr=(t)=>{if(typeof t==="string")return ur(R(t));return ur(t)},yr=(t)=>{return String(new TypeError(t).stack||t).split("\n").slice(0,5).filter((n)=>!n.includes("stackTraceWarning")).join("\n")},wr={warn:console.warn};function Lc(t){const n=t.getUTCFullYear(),r=t.getUTCMonth(),e=t.getUTCDay(),s=t.getUTCDate(),o=t.getUTCHours(),c=t.getUTCMinutes(),i=t.getUTCSeconds(),d=s<10?`0${s}`:`${s}`,y=o<10?`0${o}`:`${o}`,l=c<10?`0${c}`:`${c}`,h=i<10?`0${i}`:`${i}`;return`${Ts[e]}, ${d} ${It[r]} ${n} ${y}:${l}:${h} GMT`}var Ts=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],It=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],ls=new RegExp(/^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?[zZ]$/),Dc=(t)=>{if(t===null||t===void 0)return;if(typeof t!=="string")throw new TypeError("RFC-3339 date-times must be expressed as strings");const n=ls.exec(t);if(!n)throw new TypeError("Invalid RFC-3339 date-time value");const[r,e,s,o,c,i,d,y]=n,l=M(j(e)),h=S(s,"month",1,12),g=S(o,"day",1,31);return z(l,h,g,{hours:c,minutes:i,seconds:d,fractionalMilliseconds:y})},bs=new RegExp(/^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?(([-+]\d{2}\:\d{2})|[zZ])$/),mc=(t)=>{if(t===null||t===void 0)return;if(typeof t!=="string")throw new TypeError("RFC-3339 date-times must be expressed as strings");const n=bs.exec(t);if(!n)throw new TypeError("Invalid RFC-3339 date-time value");const[r,e,s,o,c,i,d,y,l]=n,h=M(j(e)),g=S(s,"month",1,12),u=S(o,"day",1,31),T=z(h,g,u,{hours:c,minutes:i,seconds:d,fractionalMilliseconds:y});if(l.toUpperCase()!="Z")T.setTime(T.getTime()-Ls(l));return T},as=new RegExp(/^(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\d{2}) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\d{4}) (\d{1,2}):(\d{2}):(\d{2})(?:\.(\d+))? GMT$/),Cs=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$/),$s=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})$/),Bc=(t)=>{if(t===null||t===void 0)return;if(typeof t!=="string")throw new TypeError("RFC-7231 date-times must be expressed as strings");let n=as.exec(t);if(n){const[r,e,s,o,c,i,d,y]=n;return z(M(j(o)),St(s),S(e,"day",1,31),{hours:c,minutes:i,seconds:d,fractionalMilliseconds:y})}if(n=Cs.exec(t),n){const[r,e,s,o,c,i,d,y]=n;return Is(z(Es(o),St(s),S(e,"day",1,31),{hours:c,minutes:i,seconds:d,fractionalMilliseconds:y}))}if(n=$s.exec(t),n){const[r,e,s,o,c,i,d,y]=n;return z(M(j(y)),St(e),S(s.trimLeft(),"day",1,31),{hours:o,minutes:c,seconds:i,fractionalMilliseconds:d})}throw new TypeError("Invalid RFC-7231 date-time value")};var z=(t,n,r,e)=>{const s=n-1;return As(t,s,r),new Date(Date.UTC(t,s,r,S(e.hours,"hour",0,23),S(e.minutes,"minute",0,59),S(e.seconds,"seconds",0,60),Ns(e.fractionalMilliseconds)))},Es=(t)=>{const n=(new Date()).getUTCFullYear(),r=Math.floor(n/100)*100+M(j(t));if(r<n)return r+100;return r},Ss=1576800000000,Is=(t)=>{if(t.getTime()-(new Date()).getTime()>Ss)return new Date(Date.UTC(t.getUTCFullYear()-100,t.getUTCMonth(),t.getUTCDate(),t.getUTCHours(),t.getUTCMinutes(),t.getUTCSeconds(),t.getUTCMilliseconds()));return t},St=(t)=>{const n=It.indexOf(t);if(n<0)throw new TypeError(`Invalid month: ${t}`);return n+1},Us=[31,28,31,30,31,30,31,31,30,31,30,31],As=(t,n,r)=>{let e=Us[n];if(n===1&&Fs(t))e=29;if(r>e)throw new TypeError(`Invalid day for ${It[n]} in ${t}: ${r}`)},Fs=(t)=>{return t%4===0&&(t%100!==0||t%400===0)},S=(t,n,r,e)=>{const s=gr(j(t));if(s<r||s>e)throw new TypeError(`${n} must be between ${r} and ${e}, inclusive`);return s},Ns=(t)=>{if(t===null||t===void 0)return 0;return dr("0."+t)*1000},Ls=(t)=>{const n=t[0];let r=1;if(n=="+")r=1;else if(n=="-")r=-1;else throw new TypeError(`Offset direction, ${n}, must be "+" or "-"`);const e=Number(t.substring(1,3)),s=Number(t.substring(4,6));return r*(e*60+s)*60*1000},j=(t)=>{let n=0;while(n<t.length-1&&t.charAt(n)==="0")n++;if(n===0)return t;return t.slice(n)};var Ds=({output:t,parsedBody:n,exceptionCtor:r,errorCode:e})=>{const s=ms(t),o=s.httpStatusCode?s.httpStatusCode+"":void 0,c=new r({name:n?.code||n?.Code||e||o||"UnknownError",$fault:"client",$metadata:s});throw Pt(c,n)},Yc=(t)=>{return({output:n,parsedBody:r,errorCode:e})=>{Ds({output:n,parsedBody:r,exceptionCtor:t,errorCode:e})}},ms=(t)=>({httpStatusCode:t.statusCode,requestId:t.headers["x-amzn-requestid"]??t.headers["x-amzn-request-id"]??t.headers["x-amz-request-id"],extendedRequestId:t.headers["x-amz-id-2"],cfId:t.headers["x-amz-cf-id"]});var zc=(t)=>{switch(t){case"standard":return{retryMode:"standard",connectionTimeout:3100};case"in-region":return{retryMode:"standard",connectionTimeout:1100};case"cross-region":return{retryMode:"standard",connectionTimeout:3100};case"mobile":return{retryMode:"standard",connectionTimeout:30000};default:return{}}};var pr=!1,Vc=(t)=>{if(t&&!pr&&parseInt(t.substring(1,t.indexOf(".")))<16)pr=!0};var Ut=F(V(),1);var xr=(t)=>{const n=[];for(let r in Ut.AlgorithmId){const e=Ut.AlgorithmId[r];if(t[e]===void 0)continue;n.push({algorithmId:()=>e,checksumConstructor:()=>t[e]})}return{_checksumAlgorithms:n,addChecksumAlgorithm(r){this._checksumAlgorithms.push(r)},checksumAlgorithms(){return this._checksumAlgorithms}}},Tr=(t)=>{const n={};return t.checksumAlgorithms().forEach((r)=>{n[r.algorithmId()]=r.checksumConstructor()}),n};var lr=(t)=>{let n=t.retryStrategy;return{setRetryStrategy(r){n=r},retryStrategy(){return n}}},br=(t)=>{const n={};return n.retryStrategy=t.retryStrategy(),n};var Xc=(t)=>{return{...xr(t),...lr(t)}};var Jc=(t)=>{return{...Tr(t),...br(t)}};function Bs(t){return encodeURIComponent(t).replace(/[!'()*]/g,function(n){return"%"+n.charCodeAt(0).toString(16).toUpperCase()})}var At=function(){const t=Object.getPrototypeOf(this).constructor,r=new(Function.bind.apply(String,[null,...arguments]));return Object.setPrototypeOf(r,t.prototype),r};At.prototype=Object.create(String.prototype,{constructor:{value:At,enumerable:!1,writable:!0,configurable:!0}});Object.setPrototypeOf(At,String);function Ms(t,n,r){let e,s,o;if(typeof n==="undefined"&&typeof r==="undefined")e={},o=t;else if(e=t,typeof n==="function")return s=n,o=r,js(e,s,o);else o=n;for(let c of Object.keys(o)){if(!Array.isArray(o[c])){e[c]=o[c];continue}ar(e,null,o,c)}return e}var nf=(t,n)=>{const r={};for(let e in n)ar(r,t,n,e);return r},js=(t,n,r)=>{return Ms(t,Object.entries(r).reduce((e,[s,o])=>{if(Array.isArray(o))e[s]=o;else if(typeof o==="function")e[s]=[n,o()];else e[s]=[n,o];return e},{}))},ar=(t,n,r,e)=>{if(n!==null){let c=r[e];if(typeof c==="function")c=[,c];const[i=Ys,d=Rs,y=e]=c;if(typeof i==="function"&&i(n[y])||typeof i!=="function"&&!!i)t[e]=d(n[y]);return}let[s,o]=r[e];if(typeof o==="function"){let c;const i=s===void 0&&(c=o())!=null,d=typeof s==="function"&&!!s(void 0)||typeof s!=="function"&&!!s;if(i)t[e]=c;else if(d)t[e]=o()}else{const c=s===void 0&&o!=null,i=typeof s==="function"&&!!s(o)||typeof s!=="function"&&!!s;if(c||i)t[e]=o}},Ys=(t)=>t!=null,Rs=(t)=>t;var of=(t)=>t.toISOString().replace(".000Z","Z");var Cr=(t)=>{if(t==null)return{};if(Array.isArray(t))return t.filter((n)=>n!=null).map(Cr);if(typeof t==="object"){const n={};for(let r of Object.keys(t)){if(t[r]==null)continue;n[r]=Cr(t[r])}return n}return t};export{Gs as z,Hs as A,it as B,Z as C,Xr as D,ot as E,Fr as F,Ot as G,m as H,Q as I,qt as J,B as K,fi as L,K as M,X as N,Ni as O,ft as P,gt as Q,Jt as R,un as S,wn as T,Tn as U,q as V,Fn as W,Mn as X,Hn as Y,On as Z,qi as _,ec as $,hc as aa,bc as ba,jt as ca,Jo as da,Po as ea,Cc as fa,$t as ga,fr as ha,$c as ia,Ec as ja,Sc as ka,Ic as la,Uc as ma,Lc as na,Dc as oa,mc as pa,Bc as qa,kt as ra,Pt as sa,Yc as ta,zc as ua,Vc as va,Xc as wa,Jc as xa,Bs as ya,Ms as za,nf as Aa,of as Ba,Cr as Ca};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{x as h} from"./chunk-a5c18c07abe8fd9c.js";import"./chunk-a57ecc74c0fb9045.js";import{hb as _} from"./chunk-1109657ed53fbdc9.js";import{kb as N,lb as W,mb as I,pb as v,qb as P} from"./chunk-a3526e321ac9d173.js";var T=h(_(),1);var H=(e)=>e&&(typeof e.sso_start_url==="string"||typeof e.sso_account_id==="string"||typeof e.sso_session==="string"||typeof e.sso_region==="string"||typeof e.sso_role_name==="string");var u=h(_(),1);var K=300000,g="To refresh this SSO session run 'aws sso login' with the corresponding profile.";var R={},b=async(e)=>{const{SSOOIDCClient:r}=await import("./chunk-cfa9a65fae5ddaf4.js");if(R[e])return R[e];const s=new r({region:e});return R[e]=s,s};var G=async(e,r)=>{const{CreateTokenCommand:s}=await import("./chunk-cfa9a65fae5ddaf4.js");return(await b(r)).send(new s({clientId:e.clientId,clientSecret:e.clientSecret,refreshToken:e.refreshToken,grantType:"refresh_token"}))};var U=h(_(),1);var D=(e)=>{if(e.expiration&&e.expiration.getTime()<Date.now())throw new U.TokenProviderError(`Token is expired. ${g}`,!1)};var q=h(_(),1);var p=(e,r,s=!1)=>{if(typeof r==="undefined")throw new q.TokenProviderError(`Value not present for '${e}' in SSO Token${s?". Cannot refresh":""}. ${g}`,!1)};import{promises as B} from"fs";var{writeFile:Q}=B,j=(e,r)=>{const s=W(e),t=JSON.stringify(r,null,2);return Q(s,t)};var X=new Date(0),z=(e={})=>async()=>{e.logger?.debug("@aws-sdk/token-providers - fromSso");const r=await P(e),s=N(e),t=r[s];if(!t)throw new u.TokenProviderError(`Profile '${s}' could not be found in shared credentials file.`,!1);else if(!t.sso_session)throw new u.TokenProviderError(`Profile '${s}' is missing required property 'sso_session'.`);const i=t.sso_session,a=(await v(e))[i];if(!a)throw new u.TokenProviderError(`Sso session '${i}' could not be found in shared credentials file.`,!1);for(let n of["sso_start_url","sso_region"])if(!a[n])throw new u.TokenProviderError(`Sso session '${i}' is missing required property '${n}'.`,!1);const{sso_start_url:l,sso_region:f}=a;let o;try{o=await I(i)}catch(n){throw new u.TokenProviderError(`The SSO session token associated with profile=${s} was not found or is invalid. ${g}`,!1)}p("accessToken",o.accessToken),p("expiresAt",o.expiresAt);const{accessToken:E,expiresAt:x}=o,c={token:E,expiration:new Date(x)};if(c.expiration.getTime()-Date.now()>K)return c;if(Date.now()-X.getTime()<30000)return D(c),c;p("clientId",o.clientId,!0),p("clientSecret",o.clientSecret,!0),p("refreshToken",o.refreshToken,!0);try{X.setTime(Date.now());const n=await G(o,f);p("accessToken",n.accessToken),p("expiresIn",n.expiresIn);const w=new Date(Date.now()+n.expiresIn*1000);try{await j(i,{...o,accessToken:n.accessToken,expiresAt:w.toISOString(),refreshToken:n.refreshToken})}catch(C){}return{token:n.accessToken,expiration:w}}catch(n){return D(c),c}};var k=h(_(),1);var y=!1,A=async({ssoStartUrl:e,ssoSession:r,ssoAccountId:s,ssoRegion:t,ssoRoleName:i,ssoClient:S,clientConfig:a,profile:l,logger:f})=>{let o;const E="To refresh this SSO session run aws sso login with the corresponding profile.";if(r)try{const d=await z({profile:l})();o={accessToken:d.token,expiresAt:new Date(d.expiration).toISOString()}}catch(d){throw new k.CredentialsProviderError(d.message,{tryNextLink:y,logger:f})}else try{o=await I(e)}catch(d){throw new k.CredentialsProviderError("The SSO session associated with this profile is invalid. To refresh this SSO session run aws sso login with the corresponding profile.",{tryNextLink:y,logger:f})}if(new Date(o.expiresAt).getTime()-Date.now()<=0)throw new k.CredentialsProviderError("The SSO session associated with this profile has expired. To refresh this SSO session run aws sso login with the corresponding profile.",{tryNextLink:y,logger:f});const{accessToken:x}=o,{SSOClient:c,GetRoleCredentialsCommand:n}=await import("./chunk-328c98321c6ba3d6.js"),w=S||new c(Object.assign({},a??{},{region:a?.region??t}));let C;try{C=await w.send(new n({accountId:s,roleName:i,accessToken:x}))}catch(d){throw new k.CredentialsProviderError(d,{tryNextLink:y,logger:f})}const{roleCredentials:{accessKeyId:m,secretAccessKey:O,sessionToken:$,expiration:F,credentialScope:L,accountId:M}={}}=C;if(!m||!O||!$||!F)throw new k.CredentialsProviderError("SSO returns an invalid temporary credential.",{tryNextLink:y,logger:f});return{accessKeyId:m,secretAccessKey:O,sessionToken:$,expiration:new Date(F),...L&&{credentialScope:L},...M&&{accountId:M}}};var J=h(_(),1),V=(e,r)=>{const{sso_start_url:s,sso_account_id:t,sso_region:i,sso_role_name:S}=e;if(!s||!t||!i||!S)throw new J.CredentialsProviderError('Profile is configured with invalid SSO credentials. Required parameters "sso_account_id", '+`"sso_region", "sso_role_name", "sso_start_url". Got ${Object.keys(e).join(", ")}\nReference: https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-sso.html`,{tryNextLink:!1,logger:r});return e};var Ee=(e={})=>async()=>{e.logger?.debug("@aws-sdk/credential-provider-sso - fromSSO");const{ssoStartUrl:r,ssoAccountId:s,ssoRegion:t,ssoRoleName:i,ssoSession:S}=e,{ssoClient:a}=e,l=N(e);if(!r&&!s&&!t&&!i&&!S){const o=(await P(e))[l];if(!o)throw new T.CredentialsProviderError(`Profile ${l} was not found.`,{logger:e.logger});if(!H(o))throw new T.CredentialsProviderError(`Profile ${l} is not configured with SSO credentials.`,{logger:e.logger});if(o?.sso_session){const m=(await v(e))[o.sso_session],O=` configurations in profile ${l} and sso-session ${o.sso_session}`;if(t&&t!==m.sso_region)throw new T.CredentialsProviderError("Conflicting SSO region"+O,{tryNextLink:!1,logger:e.logger});if(r&&r!==m.sso_start_url)throw new T.CredentialsProviderError("Conflicting SSO start_url"+O,{tryNextLink:!1,logger:e.logger});o.sso_region=m.sso_region,o.sso_start_url=m.sso_start_url}const{sso_start_url:E,sso_account_id:x,sso_region:c,sso_role_name:n,sso_session:w}=V(o,e.logger);return A({ssoStartUrl:E,ssoSession:w,ssoAccountId:x,ssoRegion:c,ssoRoleName:n,ssoClient:a,clientConfig:e.clientConfig,profile:l})}else if(!r||!s||!t||!i)throw new T.CredentialsProviderError('Incomplete configuration. The fromSSO() argument hash must include "ssoStartUrl", "ssoAccountId", "ssoRegion", "ssoRoleName"',{tryNextLink:!1,logger:e.logger});else return A({ssoStartUrl:r,ssoSession:S,ssoAccountId:s,ssoRegion:t,ssoRoleName:i,ssoClient:a,clientConfig:e.clientConfig,profile:l})};export{V as validateSsoProfile,H as isSsoProfile,Ee as fromSSO};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
class n extends Error{constructor(t,e=!0){let o,r=!0;if(typeof e==="boolean")o=void 0,r=e;else if(e!=null&&typeof e==="object")o=e.logger,r=e.tryNextLink??!0;super(t);this.name="ProviderError",this.tryNextLink=r,Object.setPrototypeOf(this,n.prototype),o?.debug?.(`@smithy/property-provider ${r?"->":"(!)"} ${t}`)}static from(t,e=!0){return Object.assign(new this(t.message,e),t)}}class u extends n{constructor(t,e=!0){super(t,e);this.name="CredentialsProviderError",Object.setPrototypeOf(this,u.prototype)}}class l extends n{constructor(t,e=!0){super(t,e);this.name="TokenProviderError",Object.setPrototypeOf(this,l.prototype)}}var v=(...t)=>async()=>{if(t.length===0)throw new n("No providers in chain");let e;for(let o of t)try{return await o()}catch(r){if(e=r,r?.tryNextLink)continue;throw r}throw e};var w=(t)=>()=>Promise.resolve(t);var b=(t,e,o)=>{let r,i,s,f=!1;const a=async()=>{if(!i)i=t();try{r=await i,s=!0,f=!1}finally{i=void 0}return r};if(e===void 0)return async(c)=>{if(!s||c?.forceRefresh)r=await a();return r};return async(c)=>{if(!s||c?.forceRefresh)r=await a();if(f)return r;if(o&&!o(r))return f=!0,r;if(e(r))return await a(),r;return r}};export{n as rb,u as sb,l as tb,v as ub,w as vb,b as wb};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{y as D} from"./chunk-a5c18c07abe8fd9c.js";var C=D((h,A)=>{var{defineProperty:Q,getOwnPropertyDescriptor:M,getOwnPropertyNames:J}=Object,V=Object.prototype.hasOwnProperty,I=(j,b)=>Q(j,"name",{value:b,configurable:!0}),w=(j,b)=>{for(var F in b)Q(j,F,{get:b[F],enumerable:!0})},O=(j,b,F,B)=>{if(b&&typeof b==="object"||typeof b==="function"){for(let G of J(b))if(!V.call(j,G)&&G!==F)Q(j,G,{get:()=>b[G],enumerable:!(B=M(b,G))||B.enumerable})}return j},q=(j)=>O(Q({},"__esModule",{value:!0}),j),Y={};w(Y,{CredentialsProviderError:()=>L,ProviderError:()=>U,TokenProviderError:()=>S,chain:()=>T,fromStatic:()=>N,memoize:()=>R});A.exports=q(Y);var Z=class j extends Error{constructor(b,F=!0){var B;let G,H=!0;if(typeof F==="boolean")G=void 0,H=F;else if(F!=null&&typeof F==="object")G=F.logger,H=F.tryNextLink??!0;super(b);this.name="ProviderError",this.tryNextLink=H,Object.setPrototypeOf(this,j.prototype),(B=G==null?void 0:G.debug)==null||B.call(G,`@smithy/property-provider ${H?"->":"(!)"} ${b}`)}static from(b,F=!0){return Object.assign(new this(b.message,F),b)}};I(Z,"ProviderError");var U=Z,$=class j extends U{constructor(b,F=!0){super(b,F);this.name="CredentialsProviderError",Object.setPrototypeOf(this,j.prototype)}};I($,"CredentialsProviderError");var L=$,z=class j extends U{constructor(b,F=!0){super(b,F);this.name="TokenProviderError",Object.setPrototypeOf(this,j.prototype)}};I(z,"TokenProviderError");var S=z,T=I((...j)=>async()=>{if(j.length===0)throw new U("No providers in chain");let b;for(let F of j)try{return await F()}catch(B){if(b=B,B==null?void 0:B.tryNextLink)continue;throw B}throw b},"chain"),N=I((j)=>()=>Promise.resolve(j),"fromStatic"),R=I((j,b,F)=>{let B,G,H,W=!1;const X=I(async()=>{if(!G)G=j();try{B=await G,H=!0,W=!1}finally{G=void 0}return B},"coalesceProvider");if(b===void 0)return async(K)=>{if(!H||(K==null?void 0:K.forceRefresh))B=await X();return B};return async(K)=>{if(!H||(K==null?void 0:K.forceRefresh))B=await X();if(W)return B;if(F&&!F(B))return W=!0,B;if(b(B))return await X(),B;return B}},"memoize")});
|
|
2
|
+
export{C as hb};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import{s as w,t as z,u as B} from"./chunk-3728fa21e6931333.js";import{x as Q} from"./chunk-a5c18c07abe8fd9c.js";import{hb as X} from"./chunk-1109657ed53fbdc9.js";import{jb as $} from"./chunk-a3526e321ac9d173.js";var q=Q(X(),1);var G=Q(X(),1),k="AWS_EC2_METADATA_DISABLED",Y=async(b)=>{const{ENV_CMDS_FULL_URI:j,ENV_CMDS_RELATIVE_URI:x,fromContainerMetadata:y,fromInstanceMetadata:J}=await import("./chunk-77d5bbc7a9117c21.js");if(process.env[x]||process.env[j]){b.logger?.debug("@aws-sdk/credential-provider-node - remoteProvider::fromHttp/fromContainerMetadata");const{fromHttp:K}=await import("./chunk-382a513747a9aa52.js");return G.chain(K(b),y(b))}if(process.env[k])return async()=>{throw new G.CredentialsProviderError("EC2 Instance Metadata Service access disabled",{logger:b.logger})};return b.logger?.debug("@aws-sdk/credential-provider-node - remoteProvider::fromInstanceMetadata"),J(b)};var Z=!1,T=(b={})=>q.memoize(q.chain(async()=>{if(b.profile??process.env[$]){if(process.env[w]&&process.env[z]){if(!Z)(b.logger?.warn&&b.logger?.constructor?.name!=="NoOpLogger"?b.logger.warn:console.warn)(`@aws-sdk/credential-provider-node - defaultProvider::fromEnv WARNING:
|
|
2
|
+
Multiple credential sources detected:
|
|
3
|
+
Both AWS_PROFILE and the pair AWS_ACCESS_KEY_ID/AWS_SECRET_ACCESS_KEY static credentials are set.
|
|
4
|
+
This SDK will proceed with the AWS_PROFILE value.
|
|
5
|
+
|
|
6
|
+
However, a future version may change this behavior to prefer the ENV static credentials.
|
|
7
|
+
Please ensure that your environment only sets either the AWS_PROFILE or the
|
|
8
|
+
AWS_ACCESS_KEY_ID/AWS_SECRET_ACCESS_KEY pair.
|
|
9
|
+
`),Z=!0}throw new q.CredentialsProviderError("AWS_PROFILE is set, skipping fromEnv provider.",{logger:b.logger,tryNextLink:!0})}return b.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromEnv"),B(b)()},async()=>{b.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromSSO");const{ssoStartUrl:j,ssoAccountId:x,ssoRegion:y,ssoRoleName:J,ssoSession:K}=b;if(!j&&!x&&!y&&!J&&!K)throw new q.CredentialsProviderError("Skipping SSO provider in default chain (inputs do not include SSO fields).",{logger:b.logger});const{fromSSO:H}=await import("./chunk-0a6614fbd65524af.js");return H(b)()},async()=>{b.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromIni");const{fromIni:j}=await import("./chunk-d3765f96a689a0c1.js");return j(b)()},async()=>{b.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromProcess");const{fromProcess:j}=await import("./chunk-51c21d2a3c45fbe1.js");return j(b)()},async()=>{b.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromTokenFile");const{fromTokenFile:j}=await import("./chunk-5b836c769c5dad2a.js");return j(b)()},async()=>{return b.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::remoteProvider"),(await Y(b))()},async()=>{throw new q.CredentialsProviderError("Could not load credentials from any providers",{tryNextLink:!1,logger:b.logger})}),O,v),v=(b)=>b?.expiration!==void 0,O=(b)=>b?.expiration!==void 0&&b.expiration.getTime()-Date.now()<300000;export{T as ib};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import"./chunk-70bb003c03f21dad.js";import{x as $} from"./chunk-a5c18c07abe8fd9c.js";import{A as er,Aa as o,Ca as I,D as be,F as cr,J as je,K as Fe,M as De,N as qe,Q as Je,R as Ve,ca as v,da as t,ea as Vr,ga as _,ha as b,ia as j,ja as F,ka as h,ra as Sr,sa as a,ta as jr,ua as We,va as fe,wa as rr,xa as sr,z as ue,za as d} from"./chunk-073f5b81e98d91fe.js";import{$a as kr,Da as nr,Ea as or,Fa as dr,Ga as yr,Ka as H,La as ee,Ma as re,Na as tr,Oa as Ie,Pa as Re,Qa as Pe,Ra as ar,Sa as Ae,Ta as Ke,Ua as Me,Va as Be,Wa as mr,Xa as wr,Za as E,_a as S,ab as Le,cb as Qe,db as vr,eb as Xe,fb as Er,hb as q,ib as Ye,jb as Ze,kb as He,lb as Ne,mb as ir,nb as lr} from"./chunk-e0e0f2ee626a6fb3.js";import"./chunk-5a9fa677066f72ac.js";import{pb as R,qb as Ue} from"./chunk-57a61e580c4adf80.js";import"./chunk-100b76ab0ca3e14d.js";import{xb as Ce} from"./chunk-9ee2118bd4eb34ae.js";import"./chunk-e16b252158474b8c.js";var P=$(H(),1);var se=$(q(),1);var Mr=function(e){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"sso-oauth",region:e.region},propertiesExtractor:(s,r)=>({signingProperties:{config:s,context:r}})}},Z=function(e){return{schemeId:"smithy.api#noAuth"}},ie=async(e,s,r)=>{return{operation:ee(s).operation,region:await re(e.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()}},le=(e)=>{const s=[];switch(e.operation){case"CreateToken":{s.push(Z(e));break}case"RegisterClient":{s.push(Z(e));break}case"StartDeviceAuthorization":{s.push(Z(e));break}default:s.push(Mr(e))}return s},he=(e)=>{return{...se.resolveAwsSdkSigV4Config(e)}};var ne=(e)=>{return{...e,useDualstackEndpoint:e.useDualstackEndpoint??!1,useFipsEndpoint:e.useFipsEndpoint??!1,defaultSigningName:"sso-oauth"}},k={UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}};var oe={name:"@aws-sdk/client-sso-oidc",description:"AWS SDK for JavaScript Sso Oidc Client for Node.js, Browser and React Native",version:"3.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 _e=$(q(),1);var xe=$(q(),1),ze=$(H(),1);var de={["required"]:!1,type:"String"},ye={["required"]:!0,default:!1,type:"Boolean"},ce={["ref"]:"Endpoint"},ve={["fn"]:"booleanEquals",["argv"]:[{["ref"]:"UseFIPS"},!0]},Ee={["fn"]:"booleanEquals",["argv"]:[{["ref"]:"UseDualStack"},!0]},m={},te={["fn"]:"getAttr",["argv"]:[{["ref"]:"PartitionResult"},"supportsFIPS"]},Se={["ref"]:"PartitionResult"},ae={["fn"]:"booleanEquals",["argv"]:[!0,{["fn"]:"getAttr",["argv"]:[Se,"supportsDualStack"]}]},me=[ve],we=[Ee],ke=[{["ref"]:"Region"}],Lr={version:"1.0",parameters:{Region:de,UseDualStack:ye,UseFIPS:ye,Endpoint:de},rules:[{conditions:[{["fn"]:"isSet",["argv"]:[ce]}],rules:[{conditions:me,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:"error"},{conditions:we,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:"error"},{endpoint:{url:ce,properties:m,headers:m},type:"endpoint"}],type:"tree"},{conditions:[{["fn"]:"isSet",["argv"]:ke}],rules:[{conditions:[{["fn"]:"aws.partition",["argv"]:ke,assign:"PartitionResult"}],rules:[{conditions:[ve,Ee],rules:[{conditions:[{["fn"]:"booleanEquals",["argv"]:[!0,te]},ae],rules:[{endpoint:{url:"https://oidc-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:m,headers:m},type:"endpoint"}],type:"tree"},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:"error"}],type:"tree"},{conditions:me,rules:[{conditions:[{["fn"]:"booleanEquals",["argv"]:[te,!0]}],rules:[{conditions:[{["fn"]:"stringEquals",["argv"]:[{["fn"]:"getAttr",["argv"]:[Se,"name"]},"aws-us-gov"]}],endpoint:{url:"https://oidc.{Region}.amazonaws.com",properties:m,headers:m},type:"endpoint"},{endpoint:{url:"https://oidc-fips.{Region}.{PartitionResult#dnsSuffix}",properties:m,headers:m},type:"endpoint"}],type:"tree"},{error:"FIPS is enabled but this partition does not support FIPS",type:"error"}],type:"tree"},{conditions:we,rules:[{conditions:[ae],rules:[{endpoint:{url:"https://oidc.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:m,headers:m},type:"endpoint"}],type:"tree"},{error:"DualStack is enabled but this partition does not support DualStack",type:"error"}],type:"tree"},{endpoint:{url:"https://oidc.{Region}.{PartitionResult#dnsSuffix}",properties:m,headers:m},type:"endpoint"}],type:"tree"}],type:"tree"},{error:"Invalid Configuration: Missing Region",type:"error"}]},$e=Lr;var Te=(e,s={})=>{return Re($e,{endpointParams:e,logger:s.logger})};Ie.aws=Pe;var Ge=(e)=>{return{apiVersion:"2019-06-10",base64Decoder:e?.base64Decoder??je,base64Encoder:e?.base64Encoder??qe,disableHostPrefix:e?.disableHostPrefix??!1,endpointProvider:e?.endpointProvider??Te,extensions:e?.extensions??[],httpAuthSchemeProvider:e?.httpAuthSchemeProvider??le,httpAuthSchemes:e?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:(s)=>s.getIdentityProvider("aws.auth#sigv4"),signer:new xe.AwsSdkSigV4Signer},{schemeId:"smithy.api#noAuth",identityProvider:(s)=>s.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new ze.NoAuthSigner}],logger:e?.logger??new be,serviceId:e?.serviceId??"SSO OIDC",urlParser:e?.urlParser??Ue,utf8Decoder:e?.utf8Decoder??Fe,utf8Encoder:e?.utf8Encoder??De}};var pe=(e)=>{fe(process.version);const s=Ne(e),r=()=>s().then(We),i=Ge(e);return _e.emitWarningIfUnsupportedVersion(process.version),{...i,...e,runtime:"node",defaultsMode:s,bodyLengthChecker:e?.bodyLengthChecker??He,credentialDefaultProvider:e?.credentialDefaultProvider??Ce,defaultUserAgentProvider:e?.defaultUserAgentProvider??Ye({serviceId:i.serviceId,clientVersion:oe.version}),maxAttempts:e?.maxAttempts??R(Qe),region:e?.region??R(Me,Be),requestHandler:Je.create(e?.requestHandler??r),retryMode:e?.retryMode??R({...Xe,default:async()=>(await r()).retryMode||Le}),sha256:e?.sha256??Ze.bind(null,"sha256"),streamCollector:e?.streamCollector??Ve,useDualstackEndpoint:e?.useDualstackEndpoint??R(Ae),useFipsEndpoint:e?.useFipsEndpoint??R(Ke)}};var ge=(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}}},Oe=(e)=>{return{httpAuthSchemes:e.httpAuthSchemes(),httpAuthSchemeProvider:e.httpAuthSchemeProvider(),credentials:e.credentials()}};var U=(e)=>e,hr=(e,s)=>{const r={...U(ir(e)),...U(rr(e)),...U(ue(e)),...U(ge(e))};return s.forEach((i)=>i.configure(r)),{...e,...lr(r),...sr(r),...er(r),...Oe(r)}};class N extends cr{constructor(...[e]){const s=pe(e||{}),r=ne(s),i=tr(r),l=vr(i),n=mr(l),T=nr(n),fr=kr(T),Ar=he(fr),u=hr(Ar,e?.extensions||[]);super(u);this.config=u,this.middlewareStack.use(ar(this.config)),this.middlewareStack.use(Er(this.config)),this.middlewareStack.use(wr(this.config)),this.middlewareStack.use(or(this.config)),this.middlewareStack.use(dr(this.config)),this.middlewareStack.use(yr(this.config)),this.middlewareStack.use(P.getHttpAuthSchemeEndpointRuleSetPlugin(this.config,{httpAuthSchemeParametersProvider:ie,identityProviderConfigProvider:async(Kr)=>new P.DefaultIdentityProviderConfig({"aws.auth#sigv4":Kr.credentials})})),this.middlewareStack.use(P.getHttpSigningPlugin(this.config))}destroy(){super.destroy()}}class y extends Sr{constructor(e){super(e);Object.setPrototypeOf(this,y.prototype)}}class x extends y{constructor(e){super({name:"AccessDeniedException",$fault:"client",...e});this.name="AccessDeniedException",this.$fault="client",Object.setPrototypeOf(this,x.prototype),this.error=e.error,this.error_description=e.error_description}}class z extends y{constructor(e){super({name:"AuthorizationPendingException",$fault:"client",...e});this.name="AuthorizationPendingException",this.$fault="client",Object.setPrototypeOf(this,z.prototype),this.error=e.error,this.error_description=e.error_description}}class G extends y{constructor(e){super({name:"ExpiredTokenException",$fault:"client",...e});this.name="ExpiredTokenException",this.$fault="client",Object.setPrototypeOf(this,G.prototype),this.error=e.error,this.error_description=e.error_description}}class J extends y{constructor(e){super({name:"InternalServerException",$fault:"server",...e});this.name="InternalServerException",this.$fault="server",Object.setPrototypeOf(this,J.prototype),this.error=e.error,this.error_description=e.error_description}}class V extends y{constructor(e){super({name:"InvalidClientException",$fault:"client",...e});this.name="InvalidClientException",this.$fault="client",Object.setPrototypeOf(this,V.prototype),this.error=e.error,this.error_description=e.error_description}}class W extends y{constructor(e){super({name:"InvalidGrantException",$fault:"client",...e});this.name="InvalidGrantException",this.$fault="client",Object.setPrototypeOf(this,W.prototype),this.error=e.error,this.error_description=e.error_description}}class f extends y{constructor(e){super({name:"InvalidRequestException",$fault:"client",...e});this.name="InvalidRequestException",this.$fault="client",Object.setPrototypeOf(this,f.prototype),this.error=e.error,this.error_description=e.error_description}}class A extends y{constructor(e){super({name:"InvalidScopeException",$fault:"client",...e});this.name="InvalidScopeException",this.$fault="client",Object.setPrototypeOf(this,A.prototype),this.error=e.error,this.error_description=e.error_description}}class K extends y{constructor(e){super({name:"SlowDownException",$fault:"client",...e});this.name="SlowDownException",this.$fault="client",Object.setPrototypeOf(this,K.prototype),this.error=e.error,this.error_description=e.error_description}}class M extends y{constructor(e){super({name:"UnauthorizedClientException",$fault:"client",...e});this.name="UnauthorizedClientException",this.$fault="client",Object.setPrototypeOf(this,M.prototype),this.error=e.error,this.error_description=e.error_description}}class B extends y{constructor(e){super({name:"UnsupportedGrantTypeException",$fault:"client",...e});this.name="UnsupportedGrantTypeException",this.$fault="client",Object.setPrototypeOf(this,B.prototype),this.error=e.error,this.error_description=e.error_description}}class L extends y{constructor(e){super({name:"InvalidRequestRegionException",$fault:"client",...e});this.name="InvalidRequestRegionException",this.$fault="client",Object.setPrototypeOf(this,L.prototype),this.error=e.error,this.error_description=e.error_description,this.endpoint=e.endpoint,this.region=e.region}}class Q extends y{constructor(e){super({name:"InvalidClientMetadataException",$fault:"client",...e});this.name="InvalidClientMetadataException",this.$fault="client",Object.setPrototypeOf(this,Q.prototype),this.error=e.error,this.error_description=e.error_description}}class X extends y{constructor(e){super({name:"InvalidRedirectUriException",$fault:"client",...e});this.name="InvalidRedirectUriException",this.$fault="client",Object.setPrototypeOf(this,X.prototype),this.error=e.error,this.error_description=e.error_description}}var $r=(e)=>({...e,...e.clientSecret&&{clientSecret:t},...e.refreshToken&&{refreshToken:t},...e.codeVerifier&&{codeVerifier:t}}),Ir=(e)=>({...e,...e.accessToken&&{accessToken:t},...e.refreshToken&&{refreshToken:t},...e.idToken&&{idToken:t}}),Rr=(e)=>({...e,...e.refreshToken&&{refreshToken:t},...e.assertion&&{assertion:t},...e.subjectToken&&{subjectToken:t},...e.codeVerifier&&{codeVerifier:t}}),Pr=(e)=>({...e,...e.accessToken&&{accessToken:t},...e.refreshToken&&{refreshToken:t},...e.idToken&&{idToken:t}}),Tr=(e)=>({...e,...e.clientSecret&&{clientSecret:t}}),br=(e)=>({...e,...e.clientSecret&&{clientSecret:t}});var w=$(q(),1),D=$(H(),1);var Fr=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()},Dr=async(e,s)=>{const r=D.requestBuilder(e,s),i={"content-type":"application/json"};r.bp("/token");const l=d({[is]:[,"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()},qr=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()},Ur=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()},xr=async(e,s)=>{if(e.statusCode!==200&&e.statusCode>=300)return Y(e,s);const r=d({$metadata:c(e)}),i=j(F(await w.parseJsonBody(e.body,s)),"body"),l=o(i,{accessToken:h,expiresIn:b,idToken:h,refreshToken:h,tokenType:h});return Object.assign(r,l),r},zr=async(e,s)=>{if(e.statusCode!==200&&e.statusCode>=300)return Y(e,s);const r=d({$metadata:c(e)}),i=j(F(await w.parseJsonBody(e.body,s)),"body"),l=o(i,{accessToken:h,expiresIn:b,idToken:h,issuedTokenType:h,refreshToken:h,scope:I,tokenType:h});return Object.assign(r,l),r},Gr=async(e,s)=>{if(e.statusCode!==200&&e.statusCode>=300)return Y(e,s);const r=d({$metadata:c(e)}),i=j(F(await w.parseJsonBody(e.body,s)),"body"),l=o(i,{authorizationEndpoint:h,clientId:h,clientIdIssuedAt:_,clientSecret:h,clientSecretExpiresAt:_,tokenEndpoint:h});return Object.assign(r,l),r},Jr=async(e,s)=>{if(e.statusCode!==200&&e.statusCode>=300)return Y(e,s);const r=d({$metadata:c(e)}),i=j(F(await w.parseJsonBody(e.body,s)),"body"),l=o(i,{deviceCode:h,expiresIn:b,interval:b,userCode:h,verificationUri:h,verificationUriComplete:h});return Object.assign(r,l),r},Y=async(e,s)=>{const r={...e,body:await w.parseJsonErrorBody(e.body,s)},i=w.loadRestJsonErrorCode(e,r.body);switch(i){case"AccessDeniedException":case"com.amazonaws.ssooidc#AccessDeniedException":throw await Xr(r,s);case"AuthorizationPendingException":case"com.amazonaws.ssooidc#AuthorizationPendingException":throw await Yr(r,s);case"ExpiredTokenException":case"com.amazonaws.ssooidc#ExpiredTokenException":throw await Zr(r,s);case"InternalServerException":case"com.amazonaws.ssooidc#InternalServerException":throw await Hr(r,s);case"InvalidClientException":case"com.amazonaws.ssooidc#InvalidClientException":throw await Nr(r,s);case"InvalidGrantException":case"com.amazonaws.ssooidc#InvalidGrantException":throw await pr(r,s);case"InvalidRequestException":case"com.amazonaws.ssooidc#InvalidRequestException":throw await gr(r,s);case"InvalidScopeException":case"com.amazonaws.ssooidc#InvalidScopeException":throw await ur(r,s);case"SlowDownException":case"com.amazonaws.ssooidc#SlowDownException":throw await es(r,s);case"UnauthorizedClientException":case"com.amazonaws.ssooidc#UnauthorizedClientException":throw await rs(r,s);case"UnsupportedGrantTypeException":case"com.amazonaws.ssooidc#UnsupportedGrantTypeException":throw await ss(r,s);case"InvalidRequestRegionException":case"com.amazonaws.ssooidc#InvalidRequestRegionException":throw await Or(r,s);case"InvalidClientMetadataException":case"com.amazonaws.ssooidc#InvalidClientMetadataException":throw await _r(r,s);case"InvalidRedirectUriException":case"com.amazonaws.ssooidc#InvalidRedirectUriException":throw await Cr(r,s);default:const l=r.body;return Qr({output:e,parsedBody:l,errorCode:i})}},Qr=jr(y),Xr=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)},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 Q({$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 W({$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 X({$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 f({$metadata:c(e),...r});return a(n,e.body)},Or=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 L({$metadata:c(e),...r});return a(n,e.body)},ur=async(e,s)=>{const r=d({}),i=e.body,l=o(i,{error:h,error_description:h});Object.assign(r,l);const n=new A({$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)},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 is="aws_iam";class p extends v.classBuilder().ep({...k}).m(function(e,s,r,i){return[E(r,this.serialize,this.deserialize),S(r,e.getEndpointParameterInstructions())]}).s("AWSSSOOIDCService","CreateToken",{}).n("SSOOIDCClient","CreateTokenCommand").f($r,Ir).ser(Fr).de(xr).build(){}class C extends v.classBuilder().ep({...k}).m(function(e,s,r,i){return[E(r,this.serialize,this.deserialize),S(r,e.getEndpointParameterInstructions())]}).s("AWSSSOOIDCService","CreateTokenWithIAM",{}).n("SSOOIDCClient","CreateTokenWithIAMCommand").f(Rr,Pr).ser(Dr).de(zr).build(){}class g extends v.classBuilder().ep({...k}).m(function(e,s,r,i){return[E(r,this.serialize,this.deserialize),S(r,e.getEndpointParameterInstructions())]}).s("AWSSSOOIDCService","RegisterClient",{}).n("SSOOIDCClient","RegisterClientCommand").f(void 0,Tr).ser(qr).de(Gr).build(){}class O extends v.classBuilder().ep({...k}).m(function(e,s,r,i){return[E(r,this.serialize,this.deserialize),S(r,e.getEndpointParameterInstructions())]}).s("AWSSSOOIDCService","StartDeviceAuthorization",{}).n("SSOOIDCClient","StartDeviceAuthorizationCommand").f(br,void 0).ser(Ur).de(Jr).build(){}var ls={CreateTokenCommand:p,CreateTokenWithIAMCommand:C,RegisterClientCommand:g,StartDeviceAuthorizationCommand:O};class Wr extends N{}Vr(ls,Wr);export{cr as __Client,B as UnsupportedGrantTypeException,M as UnauthorizedClientException,br as StartDeviceAuthorizationRequestFilterSensitiveLog,O as StartDeviceAuthorizationCommand,K as SlowDownException,y as SSOOIDCServiceException,N as SSOOIDCClient,Wr as SSOOIDC,Tr as RegisterClientResponseFilterSensitiveLog,g as RegisterClientCommand,A as InvalidScopeException,L as InvalidRequestRegionException,f as InvalidRequestException,X as InvalidRedirectUriException,W as InvalidGrantException,Q as InvalidClientMetadataException,V as InvalidClientException,J as InternalServerException,G as ExpiredTokenException,Pr as CreateTokenWithIAMResponseFilterSensitiveLog,Rr as CreateTokenWithIAMRequestFilterSensitiveLog,C as CreateTokenWithIAMCommand,Ir as CreateTokenResponseFilterSensitiveLog,$r as CreateTokenRequestFilterSensitiveLog,p as CreateTokenCommand,z as AuthorizationPendingException,x as AccessDeniedException,v as $Command};
|
|
@@ -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};
|