gemi 0.4.49 → 0.4.51

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.
@@ -1 +1 @@
1
- {"version":3,"file":"prisma.d.ts","sourceRoot":"","sources":["../../../auth/adapters/prisma.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,IAAI,EACJ,iBAAiB,EACjB,iBAAiB,EACjB,eAAe,EACf,cAAc,EACd,eAAe,EACf,iBAAiB,EACjB,sBAAsB,EACtB,4BAA4B,EAC5B,kBAAkB,EAClB,0BAA0B,EAC1B,4BAA4B,EAC7B,MAAM,SAAS,CAAC;AAEjB,qBAAa,2BAA4B,YAAW,sBAAsB;IAC5D,OAAO,CAAC,MAAM;gBAAN,MAAM,EAAE,GAAG;IAEzB,aAAa,CAAC,IAAI,EAAE,iBAAiB,GAAG,OAAO,CAAC,eAAe,CAAC;IAOhE,UAAU,CAAC,IAAI,EAAE,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC;IAI/C,aAAa,CAAC,IAAI,EAAE,iBAAiB,GAAG,OAAO,CAAC,IAAI,CAAC;IAMrD,sBAAsB,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAKpD,WAAW,CAAC,IAAI,EAAE,eAAe,GAAG,OAAO,CAAC,eAAe,GAAG,IAAI,CAAC;IAiCnE,aAAa,CACjB,IAAI,EAAE,iBAAiB,GACtB,OAAO,CAAC,eAAe,GAAG,IAAI,CAAC;IAmB5B,kBAAkB,CAAC,IAAI,EAAE;QAC7B,EAAE,EAAE,MAAM,CAAC;QACX,QAAQ,EAAE,MAAM,CAAC;KAClB,GAAG,OAAO,CAAC,IAAI,CAAC;IAOX,wBAAwB,CAAC,IAAI,EAAE,4BAA4B;IAS3D,sBAAsB,CAC1B,IAAI,EAAE,0BAA0B,GAC/B,OAAO,CAAC,kBAAkB,GAAG,IAAI,CAAC;IAQ/B,qBAAqB,CAAC,MAAM,EAAE,MAAM;IAIpC,wBAAwB,CAAC,IAAI,EAAE,4BAA4B;CAIlE"}
1
+ {"version":3,"file":"prisma.d.ts","sourceRoot":"","sources":["../../../auth/adapters/prisma.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,IAAI,EACJ,iBAAiB,EACjB,iBAAiB,EACjB,eAAe,EACf,cAAc,EACd,eAAe,EACf,iBAAiB,EACjB,sBAAsB,EACtB,4BAA4B,EAC5B,kBAAkB,EAClB,0BAA0B,EAC1B,4BAA4B,EAC7B,MAAM,SAAS,CAAC;AAEjB,qBAAa,2BAA4B,YAAW,sBAAsB;IAC5D,OAAO,CAAC,MAAM;gBAAN,MAAM,EAAE,GAAG;IAEzB,aAAa,CAAC,IAAI,EAAE,iBAAiB,GAAG,OAAO,CAAC,eAAe,CAAC;IAOhE,UAAU,CAAC,IAAI,EAAE,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC;IAI/C,aAAa,CAAC,IAAI,EAAE,iBAAiB,GAAG,OAAO,CAAC,IAAI,CAAC;IAMrD,sBAAsB,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAKpD,WAAW,CAAC,IAAI,EAAE,eAAe,GAAG,OAAO,CAAC,eAAe,GAAG,IAAI,CAAC;IAqCnE,aAAa,CACjB,IAAI,EAAE,iBAAiB,GACtB,OAAO,CAAC,eAAe,GAAG,IAAI,CAAC;IAmB5B,kBAAkB,CAAC,IAAI,EAAE;QAC7B,EAAE,EAAE,MAAM,CAAC;QACX,QAAQ,EAAE,MAAM,CAAC;KAClB,GAAG,OAAO,CAAC,IAAI,CAAC;IAOX,wBAAwB,CAAC,IAAI,EAAE,4BAA4B;IAS3D,sBAAsB,CAC1B,IAAI,EAAE,0BAA0B,GAC/B,OAAO,CAAC,kBAAkB,GAAG,IAAI,CAAC;IAQ/B,qBAAqB,CAAC,MAAM,EAAE,MAAM;IAIpC,wBAAwB,CAAC,IAAI,EAAE,4BAA4B;CAIlE"}
package/dist/bin/index.js CHANGED
@@ -10006,6 +10006,7 @@ async function startProdServer() {
10006
10006
  },
10007
10007
  port: process.env.PORT || 5173
10008
10008
  });
10009
+ console.log("Production server running on", server.url);
10009
10010
  return server;
10010
10011
  }
10011
10012
  var rootDir2 = process.cwd();
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import"./chunk-7ce930fe69575c87.js";import"./chunk-09dd89e1046786a5.js";import{nb as y,ob as K,pb as E,sb as C,tb as N} from"./chunk-92f6095a3be7f459.js";import{vb as i,wb as f} from"./chunk-73eed146ee78f681.js";var F=(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 L=300000,_="To refresh this SSO session run 'aws sso login' with the corresponding profile.";var I={},M=async(e)=>{const{SSOOIDCClient:r}=await import("./chunk-8e72aa06d4e47eca.js");if(I[e])return I[e];const s=new r({region:e});return I[e]=s,s};var H=async(e,r)=>{const{CreateTokenCommand:s}=await import("./chunk-8e72aa06d4e47eca.js");return(await M(r)).send(new s({clientId:e.clientId,clientSecret:e.clientSecret,refreshToken:e.refreshToken,grantType:"refresh_token"}))};var v=(e)=>{if(e.expiration&&e.expiration.getTime()<Date.now())throw new f(`Token is expired. ${_}`,!1)};var m=(e,r,s=!1)=>{if(typeof r==="undefined")throw new f(`Value not present for '${e}' in SSO Token${s?". Cannot refresh":""}. ${_}`,!1)};import{promises as W} from"fs";var{writeFile:j}=W,b=(e,r)=>{const s=K(e),t=JSON.stringify(r,null,2);return j(s,t)};var G=new Date(0),U=(e={})=>async()=>{e.logger?.debug("@aws-sdk/token-providers - fromSso");const r=await N(e),s=y(e),t=r[s];if(!t)throw new f(`Profile '${s}' could not be found in shared credentials file.`,!1);else if(!t.sso_session)throw new f(`Profile '${s}' is missing required property 'sso_session'.`);const a=t.sso_session,c=(await C(e))[a];if(!c)throw new f(`Sso session '${a}' could not be found in shared credentials file.`,!1);for(let n of["sso_start_url","sso_region"])if(!c[n])throw new f(`Sso session '${a}' is missing required property '${n}'.`,!1);const{sso_start_url:p,sso_region:S}=c;let o;try{o=await E(a)}catch(n){throw new f(`The SSO session token associated with profile=${s} was not found or is invalid. ${_}`,!1)}m("accessToken",o.accessToken),m("expiresAt",o.expiresAt);const{accessToken:x,expiresAt:u}=o,l={token:x,expiration:new Date(u)};if(l.expiration.getTime()-Date.now()>L)return l;if(Date.now()-G.getTime()<30000)return v(l),l;m("clientId",o.clientId,!0),m("clientSecret",o.clientSecret,!0),m("refreshToken",o.refreshToken,!0);try{G.setTime(Date.now());const n=await H(o,S);m("accessToken",n.accessToken),m("expiresIn",n.expiresIn);const h=new Date(Date.now()+n.expiresIn*1000);try{await b(a,{...o,accessToken:n.accessToken,expiresAt:h.toISOString(),refreshToken:n.refreshToken})}catch(O){}return{token:n.accessToken,expiration:h}}catch(n){return v(l),l}};var T=!1,P=async({ssoStartUrl:e,ssoSession:r,ssoAccountId:s,ssoRegion:t,ssoRoleName:a,ssoClient:d,clientConfig:c,profile:p,logger:S})=>{let o;const x="To refresh this SSO session run aws sso login with the corresponding profile.";if(r)try{const g=await U({profile:p})();o={accessToken:g.token,expiresAt:new Date(g.expiration).toISOString()}}catch(g){throw new i(g.message,{tryNextLink:T,logger:S})}else try{o=await E(e)}catch(g){throw new i("The SSO session associated with this profile is invalid. To refresh this SSO session run aws sso login with the corresponding profile.",{tryNextLink:T,logger:S})}if(new Date(o.expiresAt).getTime()-Date.now()<=0)throw new i("The SSO session associated with this profile has expired. To refresh this SSO session run aws sso login with the corresponding profile.",{tryNextLink:T,logger:S});const{accessToken:u}=o,{SSOClient:l,GetRoleCredentialsCommand:n}=await import("./chunk-81938d68b172446d.js"),h=d||new l(Object.assign({},c??{},{region:c?.region??t}));let O;try{O=await h.send(new n({accountId:s,roleName:a,accessToken:u}))}catch(g){throw new i(g,{tryNextLink:T,logger:S})}const{roleCredentials:{accessKeyId:w,secretAccessKey:k,sessionToken:R,expiration:D,credentialScope:A,accountId:$}={}}=O;if(!w||!k||!R||!D)throw new i("SSO returns an invalid temporary credential.",{tryNextLink:T,logger:S});return{accessKeyId:w,secretAccessKey:k,sessionToken:R,expiration:new Date(D),...A&&{credentialScope:A},...$&&{accountId:$}}};var q=(e,r)=>{const{sso_start_url:s,sso_account_id:t,sso_region:a,sso_role_name:d}=e;if(!s||!t||!a||!d)throw new i('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:a,ssoSession:d}=e,{ssoClient:c}=e,p=y(e);if(!r&&!s&&!t&&!a&&!d){const o=(await N(e))[p];if(!o)throw new i(`Profile ${p} was not found.`,{logger:e.logger});if(!F(o))throw new i(`Profile ${p} is not configured with SSO credentials.`,{logger:e.logger});if(o?.sso_session){const w=(await C(e))[o.sso_session],k=` configurations in profile ${p} and sso-session ${o.sso_session}`;if(t&&t!==w.sso_region)throw new i("Conflicting SSO region"+k,{tryNextLink:!1,logger:e.logger});if(r&&r!==w.sso_start_url)throw new i("Conflicting SSO start_url"+k,{tryNextLink:!1,logger:e.logger});o.sso_region=w.sso_region,o.sso_start_url=w.sso_start_url}const{sso_start_url:x,sso_account_id:u,sso_region:l,sso_role_name:n,sso_session:h}=q(o,e.logger);return P({ssoStartUrl:x,ssoSession:h,ssoAccountId:u,ssoRegion:l,ssoRoleName:n,ssoClient:c,clientConfig:e.clientConfig,profile:p})}else if(!r||!s||!t||!a)throw new i('Incomplete configuration. The fromSSO() argument hash must include "ssoStartUrl", "ssoAccountId", "ssoRegion", "ssoRoleName"',{tryNextLink:!1,logger:e.logger});else return P({ssoStartUrl:r,ssoSession:d,ssoAccountId:s,ssoRegion:t,ssoRoleName:a,ssoClient:c,clientConfig:e.clientConfig,profile:p})};export{q as validateSsoProfile,F as isSsoProfile,Ee as fromSSO};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import"./chunk-7ce930fe69575c87.js";import"./chunk-09dd89e1046786a5.js";import{nb as K,tb as S} from"./chunk-92f6095a3be7f459.js";import{vb as o} from"./chunk-73eed146ee78f681.js";import{exec as _} from"child_process";import{promisify as y} from"util";var i=(c,n,s)=>{if(n.Version!==1)throw Error(`Profile ${c} credential_process did not return Version 1.`);if(n.AccessKeyId===void 0||n.SecretAccessKey===void 0)throw Error(`Profile ${c} credential_process returned invalid credentials.`);if(n.Expiration){const t=new Date;if(new Date(n.Expiration)<t)throw Error(`Profile ${c} credential_process returned expired credentials.`)}let e=n.AccountId;if(!e&&s?.[c]?.aws_account_id)e=s[c].aws_account_id;return{accessKeyId:n.AccessKeyId,secretAccessKey:n.SecretAccessKey,...n.SessionToken&&{sessionToken:n.SessionToken},...n.Expiration&&{expiration:new Date(n.Expiration)},...n.CredentialScope&&{credentialScope:n.CredentialScope},...e&&{accountId:e}}};var x=async(c,n,s)=>{const e=n[c];if(n[c]){const t=e.credential_process;if(t!==void 0){const u=y(_);try{const{stdout:r}=await u(t);let w;try{w=JSON.parse(r.trim())}catch{throw Error(`Profile ${c} credential_process returned invalid JSON.`)}return i(c,w,n)}catch(r){throw new o(r.message,{logger:s})}}else throw new o(`Profile ${c} did not contain credential_process.`,{logger:s})}else throw new o(`Profile ${c} could not be found in shared credentials file.`,{logger:s})};var $=(c={})=>async()=>{c.logger?.debug("@aws-sdk/credential-provider-process - fromProcess");const n=await S(c);return x(K(c),n,c.logger)};export{$ as fromProcess};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import"./chunk-b0f453845cad4e6e.js";import{y as J} from"./chunk-7ce930fe69575c87.js";import{$ as Id,A as w0,B as G0,C as W0,E as Nl,G as F0,K as Wl,L as Tl,N as Al,O as Rl,R as sl,S as _l,Z as F,_ as Hh,da as T0,fa as S,ha as u,ka as A0,ma as $0,na as T,oa as R0,pa as bl,qa as fl,ra as I0,sa as H0,ta as eh} from"./chunk-f2428c56f532e719.js";import{$a as Z0,Aa as E0,Ba as k0,Ca as K0,Da as Bd,Ga as b,Ha as Qh,Ia as B0,Ja as Pl,Ka as vl,La as Ml,Ma as q0,Na as Cl,Oa as Ol,Pa as gl,Qa as xl,Ra as y0,Sa as Q0,Ua as B,Va as X0,Wa as il,Ya as cl,Za as Y0,_a as el,bb as dh,cb as pl,db as nl,eb as ol,fb as ul,gb as S0,hb as m0,za as D0} from"./chunk-5a66922d5981afc8.js";import"./chunk-09dd89e1046786a5.js";import{jb as Yd,kb as f} from"./chunk-6d04c1ccb3ca8c74.js";import{lb as Xh} from"./chunk-a13ab30c392c3563.js";import"./chunk-92f6095a3be7f459.js";import"./chunk-73eed146ee78f681.js";var C=J(Qh(),1);var wl=J(dh(),1),wh=J(Bd(),1);var qd=function(h){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"sts",region:h.region},propertiesExtractor:(d,l)=>({signingProperties:{config:d,context:l}})}},dl=function(h){return{schemeId:"smithy.api#noAuth"}},Gl=async(h,d,l)=>{return{operation:wh.getSmithyContext(d).operation,region:await wh.normalizeProvider(h.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()}},Il=(h)=>{const d=[];switch(h.operation){case"AssumeRoleWithSAML":{d.push(dl(h));break}case"AssumeRoleWithWebIdentity":{d.push(dl(h));break}default:d.push(qd(h))}return d},yd=(h)=>({...h,stsClientCtor:A}),Hl=(h)=>{const d=yd(h);return{...wl.resolveAwsSdkSigV4Config(d)}};var Sl=(h)=>{return{...h,useDualstackEndpoint:h.useDualstackEndpoint??!1,useFipsEndpoint:h.useFipsEndpoint??!1,useGlobalEndpoint:h.useGlobalEndpoint??!1,defaultSigningName:"sts"}},E={UseGlobalEndpoint:{type:"builtInParams",name:"useGlobalEndpoint"},UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}};var ml={name:"@aws-sdk/client-sts",description:"AWS SDK for JavaScript Sts 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-sts","build:es":"tsc -p tsconfig.es.json","build:include:deps":"lerna run --scope $npm_package_name --include-dependencies build","build:types":"rimraf ./dist-types tsconfig.types.tsbuildinfo && tsc -p tsconfig.types.json","build:types:downlevel":"downlevel-dts dist-types dist-types/ts3.4",clean:"rimraf ./dist-* && rimraf *.tsbuildinfo","extract:docs":"api-extractor run --local","generate:client":"node ../../scripts/generate-clients/single-service --solo sts",test:"yarn test:unit","test:unit":"jest"},main:"./dist-cjs/index.js",types:"./dist-types/index.d.ts",module:"./dist-es/index.js",sideEffects:!1,dependencies:{"@aws-crypto/sha256-browser":"5.2.0","@aws-crypto/sha256-js":"5.2.0","@aws-sdk/client-sso-oidc":"3.629.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",browser:{"./dist-es/runtimeConfig":"./dist-es/runtimeConfig.browser"},"react-native":{"./dist-es/runtimeConfig":"./dist-es/runtimeConfig.native"},homepage:"https://github.com/aws/aws-sdk-js-v3/tree/main/clients/client-sts",repository:{type:"git",url:"https://github.com/aws/aws-sdk-js-v3.git",directory:"clients/client-sts"}};var Gh=J(dh(),1);var tl=J(Qh(),1);var Ll=J(dh(),1),jl=J(Qh(),1);var al=J(Yd(),1);var Jl={["required"]:!1,["type"]:"String"},yh={["required"]:!0,default:!1,["type"]:"Boolean"},Ql={["ref"]:"Endpoint"},Dl={["fn"]:"isSet",["argv"]:[{["ref"]:"Region"}]},D={["ref"]:"Region"},El={["fn"]:"aws.partition",["argv"]:[D],assign:"PartitionResult"},Xl={["ref"]:"UseFIPS"},Yl={["ref"]:"UseDualStack"},k={url:"https://sts.amazonaws.com",properties:{authSchemes:[{name:"sigv4",signingName:"sts",signingRegion:"us-east-1"}]},headers:{}},X={},kl={conditions:[{["fn"]:"stringEquals",["argv"]:[D,"aws-global"]}],["endpoint"]:k,["type"]:"endpoint"},Zl={["fn"]:"booleanEquals",["argv"]:[Xl,!0]},$l={["fn"]:"booleanEquals",["argv"]:[Yl,!0]},Kl={["fn"]:"getAttr",["argv"]:[{["ref"]:"PartitionResult"},"supportsFIPS"]},Ul={["ref"]:"PartitionResult"},Fl={["fn"]:"booleanEquals",["argv"]:[!0,{["fn"]:"getAttr",["argv"]:[Ul,"supportsDualStack"]}]},Bl=[{["fn"]:"isSet",["argv"]:[Ql]}],ql=[Zl],yl=[$l],Xd={version:"1.0",parameters:{Region:Jl,UseDualStack:yh,UseFIPS:yh,Endpoint:Jl,UseGlobalEndpoint:yh},rules:[{conditions:[{["fn"]:"booleanEquals",["argv"]:[{["ref"]:"UseGlobalEndpoint"},!0]},{["fn"]:"not",["argv"]:Bl},Dl,El,{["fn"]:"booleanEquals",["argv"]:[Xl,!1]},{["fn"]:"booleanEquals",["argv"]:[Yl,!1]}],rules:[{conditions:[{["fn"]:"stringEquals",["argv"]:[D,"ap-northeast-1"]}],endpoint:k,["type"]:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[D,"ap-south-1"]}],endpoint:k,["type"]:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[D,"ap-southeast-1"]}],endpoint:k,["type"]:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[D,"ap-southeast-2"]}],endpoint:k,["type"]:"endpoint"},kl,{conditions:[{["fn"]:"stringEquals",["argv"]:[D,"ca-central-1"]}],endpoint:k,["type"]:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[D,"eu-central-1"]}],endpoint:k,["type"]:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[D,"eu-north-1"]}],endpoint:k,["type"]:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[D,"eu-west-1"]}],endpoint:k,["type"]:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[D,"eu-west-2"]}],endpoint:k,["type"]:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[D,"eu-west-3"]}],endpoint:k,["type"]:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[D,"sa-east-1"]}],endpoint:k,["type"]:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[D,"us-east-1"]}],endpoint:k,["type"]:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[D,"us-east-2"]}],endpoint:k,["type"]:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[D,"us-west-1"]}],endpoint:k,["type"]:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[D,"us-west-2"]}],endpoint:k,["type"]:"endpoint"},{endpoint:{url:"https://sts.{Region}.{PartitionResult#dnsSuffix}",properties:{authSchemes:[{name:"sigv4",signingName:"sts",signingRegion:"{Region}"}]},headers:X},["type"]:"endpoint"}],["type"]:"tree"},{conditions:Bl,rules:[{conditions:ql,error:"Invalid Configuration: FIPS and custom endpoint are not supported",["type"]:"error"},{conditions:yl,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",["type"]:"error"},{endpoint:{url:Ql,properties:X,headers:X},["type"]:"endpoint"}],["type"]:"tree"},{conditions:[Dl],rules:[{conditions:[El],rules:[{conditions:[Zl,$l],rules:[{conditions:[{["fn"]:"booleanEquals",["argv"]:[!0,Kl]},Fl],rules:[{endpoint:{url:"https://sts-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:X,headers:X},["type"]:"endpoint"}],["type"]:"tree"},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",["type"]:"error"}],["type"]:"tree"},{conditions:ql,rules:[{conditions:[{["fn"]:"booleanEquals",["argv"]:[Kl,!0]}],rules:[{conditions:[{["fn"]:"stringEquals",["argv"]:[{["fn"]:"getAttr",["argv"]:[Ul,"name"]},"aws-us-gov"]}],endpoint:{url:"https://sts.{Region}.amazonaws.com",properties:X,headers:X},["type"]:"endpoint"},{endpoint:{url:"https://sts-fips.{Region}.{PartitionResult#dnsSuffix}",properties:X,headers:X},["type"]:"endpoint"}],["type"]:"tree"},{error:"FIPS is enabled but this partition does not support FIPS",["type"]:"error"}],["type"]:"tree"},{conditions:yl,rules:[{conditions:[Fl],rules:[{endpoint:{url:"https://sts.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:X,headers:X},["type"]:"endpoint"}],["type"]:"tree"},{error:"DualStack is enabled but this partition does not support DualStack",["type"]:"error"}],["type"]:"tree"},kl,{endpoint:{url:"https://sts.{Region}.{PartitionResult#dnsSuffix}",properties:X,headers:X},["type"]:"endpoint"}],["type"]:"tree"}],["type"]:"tree"},{error:"Invalid Configuration: Missing Region",["type"]:"error"}]},Vl=Xd;var zl=(h,d={})=>{return vl(Vl,{endpointParams:h,logger:d.logger})};Pl.aws=Ml;var rl=(h)=>{return{apiVersion:"2011-06-15",base64Decoder:h?.base64Decoder??Wl,base64Encoder:h?.base64Encoder??Rl,disableHostPrefix:h?.disableHostPrefix??!1,endpointProvider:h?.endpointProvider??zl,extensions:h?.extensions??[],httpAuthSchemeProvider:h?.httpAuthSchemeProvider??Il,httpAuthSchemes:h?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:(d)=>d.getIdentityProvider("aws.auth#sigv4"),signer:new Ll.AwsSdkSigV4Signer},{schemeId:"smithy.api#noAuth",identityProvider:(d)=>d.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new jl.NoAuthSigner}],logger:h?.logger??new Nl,serviceId:h?.serviceId??"STS",urlParser:h?.urlParser??al.parseUrl,utf8Decoder:h?.utf8Decoder??Tl,utf8Encoder:h?.utf8Encoder??Al}};var h0=(h)=>{fl(process.version);const d=ul(h),l=()=>d().then(bl),w=rl(h);return Gh.emitWarningIfUnsupportedVersion(process.version),{...w,...h,runtime:"node",defaultsMode:d,bodyLengthChecker:h?.bodyLengthChecker??ol,credentialDefaultProvider:h?.credentialDefaultProvider??Xh,defaultUserAgentProvider:h?.defaultUserAgentProvider??pl({serviceId:w.serviceId,clientVersion:ml.version}),httpAuthSchemes:h?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:(G)=>G.getIdentityProvider("aws.auth#sigv4")||(async(H)=>await Xh(H?.__config||{})()),signer:new Gh.AwsSdkSigV4Signer},{schemeId:"smithy.api#noAuth",identityProvider:(G)=>G.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new tl.NoAuthSigner}],maxAttempts:h?.maxAttempts??f(cl),region:h?.region??f(gl,xl),requestHandler:sl.create(h?.requestHandler??l),retryMode:h?.retryMode??f({...el,default:async()=>(await l()).retryMode||il}),sha256:h?.sha256??nl.bind(null,"sha256"),streamCollector:h?.streamCollector??_l,useDualstackEndpoint:h?.useDualstackEndpoint??f(Cl),useFipsEndpoint:h?.useFipsEndpoint??f(Ol)}};var l0=(h)=>{const d=h.httpAuthSchemes;let{httpAuthSchemeProvider:l,credentials:w}=h;return{setHttpAuthScheme(G){const H=d.findIndex((I)=>I.schemeId===G.schemeId);if(H===-1)d.push(G);else d.splice(H,1,G)},httpAuthSchemes(){return d},setHttpAuthSchemeProvider(G){l=G},httpAuthSchemeProvider(){return l},setCredentials(G){w=G},credentials(){return w}}},d0=(h)=>{return{httpAuthSchemes:h.httpAuthSchemes(),httpAuthSchemeProvider:h.httpAuthSchemeProvider(),credentials:h.credentials()}};var Ih=(h)=>h,J0=(h,d)=>{const l={...Ih(S0(h)),...Ih(I0(h)),...Ih(w0(h)),...Ih(l0(h))};return d.forEach((w)=>w.configure(l)),{...h,...m0(l),...H0(l),...G0(l),...d0(l)}};class A extends F0{constructor(...[h]){const d=h0(h||{}),l=Sl(d),w=B0(l),G=Y0(w),H=y0(G),I=D0(H),Q=X0(I),v=Hl(Q),M=J0(v,h?.extensions||[]);super(M);this.config=M,this.middlewareStack.use(q0(this.config)),this.middlewareStack.use(Z0(this.config)),this.middlewareStack.use(Q0(this.config)),this.middlewareStack.use(E0(this.config)),this.middlewareStack.use(k0(this.config)),this.middlewareStack.use(K0(this.config)),this.middlewareStack.use(C.getHttpAuthSchemeEndpointRuleSetPlugin(this.config,{httpAuthSchemeParametersProvider:Gl,identityProviderConfigProvider:async(n)=>new C.DefaultIdentityProviderConfig({"aws.auth#sigv4":n.credentials})})),this.middlewareStack.use(C.getHttpSigningPlugin(this.config))}destroy(){super.destroy()}}var o0=J(b(),1);class Y extends $0{constructor(h){super(h);Object.setPrototypeOf(this,Y.prototype)}}class Sh extends Y{constructor(h){super({name:"ExpiredTokenException",$fault:"client",...h});this.name="ExpiredTokenException",this.$fault="client",Object.setPrototypeOf(this,Sh.prototype)}}class mh extends Y{constructor(h){super({name:"MalformedPolicyDocumentException",$fault:"client",...h});this.name="MalformedPolicyDocumentException",this.$fault="client",Object.setPrototypeOf(this,mh.prototype)}}class Jh extends Y{constructor(h){super({name:"PackedPolicyTooLargeException",$fault:"client",...h});this.name="PackedPolicyTooLargeException",this.$fault="client",Object.setPrototypeOf(this,Jh.prototype)}}class Dh extends Y{constructor(h){super({name:"RegionDisabledException",$fault:"client",...h});this.name="RegionDisabledException",this.$fault="client",Object.setPrototypeOf(this,Dh.prototype)}}class Eh extends Y{constructor(h){super({name:"IDPRejectedClaimException",$fault:"client",...h});this.name="IDPRejectedClaimException",this.$fault="client",Object.setPrototypeOf(this,Eh.prototype)}}class kh extends Y{constructor(h){super({name:"InvalidIdentityTokenException",$fault:"client",...h});this.name="InvalidIdentityTokenException",this.$fault="client",Object.setPrototypeOf(this,kh.prototype)}}class Kh extends Y{constructor(h){super({name:"IDPCommunicationErrorException",$fault:"client",...h});this.name="IDPCommunicationErrorException",this.$fault="client",Object.setPrototypeOf(this,Kh.prototype)}}class Fh extends Y{constructor(h){super({name:"InvalidAuthorizationMessageException",$fault:"client",...h});this.name="InvalidAuthorizationMessageException",this.$fault="client",Object.setPrototypeOf(this,Fh.prototype)}}var o=(h)=>({...h,...h.SecretAccessKey&&{SecretAccessKey:Hh}}),U0=(h)=>({...h,...h.Credentials&&{Credentials:o(h.Credentials)}}),V0=(h)=>({...h,...h.SAMLAssertion&&{SAMLAssertion:Hh}}),P0=(h)=>({...h,...h.Credentials&&{Credentials:o(h.Credentials)}}),v0=(h)=>({...h,...h.WebIdentityToken&&{WebIdentityToken:Hh}}),M0=(h)=>({...h,...h.Credentials&&{Credentials:o(h.Credentials)}}),z0=(h)=>({...h,...h.Credentials&&{Credentials:o(h.Credentials)}}),N0=(h)=>({...h,...h.Credentials&&{Credentials:o(h.Credentials)}});var P=J(dh(),1);var L0=async(h,d)=>{const l=j;let w;return w=_({...Nd(h,d),[r]:Hw,[s]:a}),L(d,l,"/",void 0,w)},j0=async(h,d)=>{const l=j;let w;return w=_({...Wd(h,d),[r]:Sw,[s]:a}),L(d,l,"/",void 0,w)},a0=async(h,d)=>{const l=j;let w;return w=_({...Td(h,d),[r]:mw,[s]:a}),L(d,l,"/",void 0,w)},r0=async(h,d)=>{const l=j;let w;return w=_({...Ad(h,d),[r]:Jw,[s]:a}),L(d,l,"/",void 0,w)},s0=async(h,d)=>{const l=j;let w;return w=_({...Rd(h,d),[r]:Dw,[s]:a}),L(d,l,"/",void 0,w)},_0=async(h,d)=>{const l=j;let w;return w=_({...Ld(h,d),[r]:Ew,[s]:a}),L(d,l,"/",void 0,w)},b0=async(h,d)=>{const l=j;let w;return w=_({...jd(h,d),[r]:kw,[s]:a}),L(d,l,"/",void 0,w)},f0=async(h,d)=>{const l=j;let w;return w=_({...ad(h,d),[r]:Kw,[s]:a}),L(d,l,"/",void 0,w)},C0=async(h,d)=>{if(h.statusCode>=300)return R(h,d);const l=await P.parseXmlBody(h.body,d);let w={};return w=Cd(l.AssumeRoleResult,d),{$metadata:K(h),...w}},O0=async(h,d)=>{if(h.statusCode>=300)return R(h,d);const l=await P.parseXmlBody(h.body,d);let w={};return w=Od(l.AssumeRoleWithSAMLResult,d),{$metadata:K(h),...w}},g0=async(h,d)=>{if(h.statusCode>=300)return R(h,d);const l=await P.parseXmlBody(h.body,d);let w={};return w=gd(l.AssumeRoleWithWebIdentityResult,d),{$metadata:K(h),...w}},x0=async(h,d)=>{if(h.statusCode>=300)return R(h,d);const l=await P.parseXmlBody(h.body,d);let w={};return w=xd(l.DecodeAuthorizationMessageResult,d),{$metadata:K(h),...w}},i0=async(h,d)=>{if(h.statusCode>=300)return R(h,d);const l=await P.parseXmlBody(h.body,d);let w={};return w=ed(l.GetAccessKeyInfoResult,d),{$metadata:K(h),...w}},c0=async(h,d)=>{if(h.statusCode>=300)return R(h,d);const l=await P.parseXmlBody(h.body,d);let w={};return w=pd(l.GetCallerIdentityResult,d),{$metadata:K(h),...w}},e0=async(h,d)=>{if(h.statusCode>=300)return R(h,d);const l=await P.parseXmlBody(h.body,d);let w={};return w=nd(l.GetFederationTokenResult,d),{$metadata:K(h),...w}},p0=async(h,d)=>{if(h.statusCode>=300)return R(h,d);const l=await P.parseXmlBody(h.body,d);let w={};return w=od(l.GetSessionTokenResult,d),{$metadata:K(h),...w}},R=async(h,d)=>{const l={...h,body:await P.parseXmlErrorBody(h.body,d)},w=Fw(h,l.body);switch(w){case"ExpiredTokenException":case"com.amazonaws.sts#ExpiredTokenException":throw await Zd(l,d);case"MalformedPolicyDocument":case"com.amazonaws.sts#MalformedPolicyDocumentException":throw await vd(l,d);case"PackedPolicyTooLarge":case"com.amazonaws.sts#PackedPolicyTooLargeException":throw await Md(l,d);case"RegionDisabledException":case"com.amazonaws.sts#RegionDisabledException":throw await zd(l,d);case"IDPRejectedClaim":case"com.amazonaws.sts#IDPRejectedClaimException":throw await Ud(l,d);case"InvalidIdentityToken":case"com.amazonaws.sts#InvalidIdentityTokenException":throw await Pd(l,d);case"IDPCommunicationError":case"com.amazonaws.sts#IDPCommunicationErrorException":throw await $d(l,d);case"InvalidAuthorizationMessageException":case"com.amazonaws.sts#InvalidAuthorizationMessageException":throw await Vd(l,d);default:const G=l.body;return Iw({output:h,parsedBody:G.Error,errorCode:w})}},Zd=async(h,d)=>{const l=h.body,w=id(l.Error,d),G=new Sh({$metadata:K(h),...w});return T(G,l)},$d=async(h,d)=>{const l=h.body,w=ud(l.Error,d),G=new Kh({$metadata:K(h),...w});return T(G,l)},Ud=async(h,d)=>{const l=h.body,w=td(l.Error,d),G=new Eh({$metadata:K(h),...w});return T(G,l)},Vd=async(h,d)=>{const l=h.body,w=hw(l.Error,d),G=new Fh({$metadata:K(h),...w});return T(G,l)},Pd=async(h,d)=>{const l=h.body,w=lw(l.Error,d),G=new kh({$metadata:K(h),...w});return T(G,l)},vd=async(h,d)=>{const l=h.body,w=dw(l.Error,d),G=new mh({$metadata:K(h),...w});return T(G,l)},Md=async(h,d)=>{const l=h.body,w=ww(l.Error,d),G=new Jh({$metadata:K(h),...w});return T(G,l)},zd=async(h,d)=>{const l=h.body,w=Gw(l.Error,d),G=new Dh({$metadata:K(h),...w});return T(G,l)},Nd=(h,d)=>{const l={};if(h[W]!=null)l[W]=h[W];if(h[i]!=null)l[i]=h[i];if(h[$]!=null){const w=Bh(h[$],d);if(h[$]?.length===0)l.PolicyArns=[];Object.entries(w).forEach(([G,H])=>{const I=`PolicyArns.${G}`;l[I]=H})}if(h[Z]!=null)l[Z]=h[Z];if(h[y]!=null)l[y]=h[y];if(h[e]!=null){const w=n0(h[e],d);if(h[e]?.length===0)l.Tags=[];Object.entries(w).forEach(([G,H])=>{const I=`Tags.${G}`;l[I]=H})}if(h[Oh]!=null){const w=fd(h[Oh],d);if(h[Oh]?.length===0)l.TransitiveTagKeys=[];Object.entries(w).forEach(([G,H])=>{const I=`TransitiveTagKeys.${G}`;l[I]=H})}if(h[Vh]!=null)l[Vh]=h[Vh];if(h[c]!=null)l[c]=h[c];if(h[p]!=null)l[p]=h[p];if(h[V]!=null)l[V]=h[V];if(h[Lh]!=null){const w=_d(h[Lh],d);if(h[Lh]?.length===0)l.ProvidedContexts=[];Object.entries(w).forEach(([G,H])=>{const I=`ProvidedContexts.${G}`;l[I]=H})}return l},Wd=(h,d)=>{const l={};if(h[W]!=null)l[W]=h[W];if(h[Ah]!=null)l[Ah]=h[Ah];if(h[_h]!=null)l[_h]=h[_h];if(h[$]!=null){const w=Bh(h[$],d);if(h[$]?.length===0)l.PolicyArns=[];Object.entries(w).forEach(([G,H])=>{const I=`PolicyArns.${G}`;l[I]=H})}if(h[Z]!=null)l[Z]=h[Z];if(h[y]!=null)l[y]=h[y];return l},Td=(h,d)=>{const l={};if(h[W]!=null)l[W]=h[W];if(h[i]!=null)l[i]=h[i];if(h[ih]!=null)l[ih]=h[ih];if(h[jh]!=null)l[jh]=h[jh];if(h[$]!=null){const w=Bh(h[$],d);if(h[$]?.length===0)l.PolicyArns=[];Object.entries(w).forEach(([G,H])=>{const I=`PolicyArns.${G}`;l[I]=H})}if(h[Z]!=null)l[Z]=h[Z];if(h[y]!=null)l[y]=h[y];return l},Ad=(h,d)=>{const l={};if(h[Ph]!=null)l[Ph]=h[Ph];return l},Rd=(h,d)=>{const l={};if(h[O]!=null)l[O]=h[O];return l},Ld=(h,d)=>{return{}},jd=(h,d)=>{const l={};if(h[Wh]!=null)l[Wh]=h[Wh];if(h[Z]!=null)l[Z]=h[Z];if(h[$]!=null){const w=Bh(h[$],d);if(h[$]?.length===0)l.PolicyArns=[];Object.entries(w).forEach(([G,H])=>{const I=`PolicyArns.${G}`;l[I]=H})}if(h[y]!=null)l[y]=h[y];if(h[e]!=null){const w=n0(h[e],d);if(h[e]?.length===0)l.Tags=[];Object.entries(w).forEach(([G,H])=>{const I=`Tags.${G}`;l[I]=H})}return l},ad=(h,d)=>{const l={};if(h[y]!=null)l[y]=h[y];if(h[c]!=null)l[c]=h[c];if(h[p]!=null)l[p]=h[p];return l},Bh=(h,d)=>{const l={};let w=1;for(let G of h){if(G===null)continue;const H=rd(G,d);Object.entries(H).forEach(([I,Q])=>{l[`member.${w}.${I}`]=Q}),w++}return l},rd=(h,d)=>{const l={};if(h[ch]!=null)l[ch]=h[ch];return l},sd=(h,d)=>{const l={};if(h[Rh]!=null)l[Rh]=h[Rh];if(h[Zh]!=null)l[Zh]=h[Zh];return l},_d=(h,d)=>{const l={};let w=1;for(let G of h){if(G===null)continue;const H=sd(G,d);Object.entries(H).forEach(([I,Q])=>{l[`member.${w}.${I}`]=Q}),w++}return l},bd=(h,d)=>{const l={};if(h[Nh]!=null)l[Nh]=h[Nh];if(h[xh]!=null)l[xh]=h[xh];return l},fd=(h,d)=>{const l={};let w=1;for(let G of h){if(G===null)continue;l[`member.${w}`]=G,w++}return l},n0=(h,d)=>{const l={};let w=1;for(let G of h){if(G===null)continue;const H=bd(G,d);Object.entries(H).forEach(([I,Q])=>{l[`member.${w}.${I}`]=Q}),w++}return l},ph=(h,d)=>{const l={};if(h[Yh]!=null)l[Yh]=S(h[Yh]);if(h[N]!=null)l[N]=S(h[N]);return l},Cd=(h,d)=>{const l={};if(h[q]!=null)l[q]=t(h[q],d);if(h[z]!=null)l[z]=ph(h[z],d);if(h[U]!=null)l[U]=u(h[U]);if(h[V]!=null)l[V]=S(h[V]);return l},Od=(h,d)=>{const l={};if(h[q]!=null)l[q]=t(h[q],d);if(h[z]!=null)l[z]=ph(h[z],d);if(h[U]!=null)l[U]=u(h[U]);if(h[rh]!=null)l[rh]=S(h[rh]);if(h[fh]!=null)l[fh]=S(h[fh]);if(h[zh]!=null)l[zh]=S(h[zh]);if(h[x]!=null)l[x]=S(h[x]);if(h[Th]!=null)l[Th]=S(h[Th]);if(h[V]!=null)l[V]=S(h[V]);return l},gd=(h,d)=>{const l={};if(h[q]!=null)l[q]=t(h[q],d);if(h[bh]!=null)l[bh]=S(h[bh]);if(h[z]!=null)l[z]=ph(h[z],d);if(h[U]!=null)l[U]=u(h[U]);if(h[ah]!=null)l[ah]=S(h[ah]);if(h[x]!=null)l[x]=S(h[x]);if(h[V]!=null)l[V]=S(h[V]);return l},t=(h,d)=>{const l={};if(h[O]!=null)l[O]=S(h[O]);if(h[sh]!=null)l[sh]=S(h[sh]);if(h[Ch]!=null)l[Ch]=S(h[Ch]);if(h[Uh]!=null)l[Uh]=T0(A0(h[Uh]));return l},xd=(h,d)=>{const l={};if(h[$h]!=null)l[$h]=S(h[$h]);return l},id=(h,d)=>{const l={};if(h[m]!=null)l[m]=S(h[m]);return l},cd=(h,d)=>{const l={};if(h[Mh]!=null)l[Mh]=S(h[Mh]);if(h[N]!=null)l[N]=S(h[N]);return l},ed=(h,d)=>{const l={};if(h[g]!=null)l[g]=S(h[g]);return l},pd=(h,d)=>{const l={};if(h[gh]!=null)l[gh]=S(h[gh]);if(h[g]!=null)l[g]=S(h[g]);if(h[N]!=null)l[N]=S(h[N]);return l},nd=(h,d)=>{const l={};if(h[q]!=null)l[q]=t(h[q],d);if(h[vh]!=null)l[vh]=cd(h[vh],d);if(h[U]!=null)l[U]=u(h[U]);return l},od=(h,d)=>{const l={};if(h[q]!=null)l[q]=t(h[q],d);return l},ud=(h,d)=>{const l={};if(h[m]!=null)l[m]=S(h[m]);return l},td=(h,d)=>{const l={};if(h[m]!=null)l[m]=S(h[m]);return l},hw=(h,d)=>{const l={};if(h[m]!=null)l[m]=S(h[m]);return l},lw=(h,d)=>{const l={};if(h[m]!=null)l[m]=S(h[m]);return l},dw=(h,d)=>{const l={};if(h[m]!=null)l[m]=S(h[m]);return l},ww=(h,d)=>{const l={};if(h[m]!=null)l[m]=S(h[m]);return l},Gw=(h,d)=>{const l={};if(h[m]!=null)l[m]=S(h[m]);return l},K=(h)=>({httpStatusCode:h.statusCode,requestId:h.headers["x-amzn-requestid"]??h.headers["x-amzn-request-id"]??h.headers["x-amz-request-id"],extendedRequestId:h.headers["x-amz-id-2"],cfId:h.headers["x-amz-cf-id"]});var Iw=R0(Y),L=async(h,d,l,w,G)=>{const{hostname:H,protocol:I="https",port:Q,path:v}=await h.endpoint(),M={protocol:I,hostname:H,port:Q,method:"POST",path:v.endsWith("/")?v.slice(0,-1)+l:v+l,headers:d};if(w!==void 0)M.hostname=w;if(G!==void 0)M.body=G;return new W0(M)},j={"content-type":"application/x-www-form-urlencoded"},a="2011-06-15",r="Action",O="AccessKeyId",Hw="AssumeRole",Yh="AssumedRoleId",z="AssumedRoleUser",Sw="AssumeRoleWithSAML",mw="AssumeRoleWithWebIdentity",g="Account",N="Arn",x="Audience",q="Credentials",Zh="ContextAssertion",Jw="DecodeAuthorizationMessage",$h="DecodedMessage",y="DurationSeconds",Uh="Expiration",Vh="ExternalId",Ph="EncodedMessage",vh="FederatedUser",Mh="FederatedUserId",Dw="GetAccessKeyInfo",Ew="GetCallerIdentity",kw="GetFederationToken",Kw="GetSessionToken",zh="Issuer",Nh="Key",Wh="Name",Th="NameQualifier",Z="Policy",$="PolicyArns",Ah="PrincipalArn",Rh="ProviderArn",Lh="ProvidedContexts",jh="ProviderId",U="PackedPolicySize",ah="Provider",W="RoleArn",i="RoleSessionName",rh="Subject",sh="SecretAccessKey",_h="SAMLAssertion",bh="SubjectFromWebIdentityToken",V="SourceIdentity",c="SerialNumber",fh="SubjectType",Ch="SessionToken",e="Tags",p="TokenCode",Oh="TransitiveTagKeys",gh="UserId",s="Version",xh="Value",ih="WebIdentityToken",ch="arn",m="message",_=(h)=>Object.entries(h).map(([d,l])=>eh(d)+"="+eh(l)).join("&"),Fw=(h,d)=>{if(d.Error?.Code!==void 0)return d.Error.Code;if(h.statusCode==404)return"NotFound"};class hh extends F.classBuilder().ep({...E}).m(function(h,d,l,w){return[o0.getSerdePlugin(l,this.serialize,this.deserialize),B(l,h.getEndpointParameterInstructions())]}).s("AWSSecurityTokenServiceV20110615","AssumeRole",{}).n("STSClient","AssumeRoleCommand").f(void 0,U0).ser(L0).de(C0).build(){}var u0=J(b(),1);class nh extends F.classBuilder().ep({...E}).m(function(h,d,l,w){return[u0.getSerdePlugin(l,this.serialize,this.deserialize),B(l,h.getEndpointParameterInstructions())]}).s("AWSSecurityTokenServiceV20110615","AssumeRoleWithSAML",{}).n("STSClient","AssumeRoleWithSAMLCommand").f(V0,P0).ser(j0).de(O0).build(){}var t0=J(b(),1);class lh extends F.classBuilder().ep({...E}).m(function(h,d,l,w){return[t0.getSerdePlugin(l,this.serialize,this.deserialize),B(l,h.getEndpointParameterInstructions())]}).s("AWSSecurityTokenServiceV20110615","AssumeRoleWithWebIdentity",{}).n("STSClient","AssumeRoleWithWebIdentityCommand").f(v0,M0).ser(a0).de(g0).build(){}var hd=J(b(),1);class oh extends F.classBuilder().ep({...E}).m(function(h,d,l,w){return[hd.getSerdePlugin(l,this.serialize,this.deserialize),B(l,h.getEndpointParameterInstructions())]}).s("AWSSecurityTokenServiceV20110615","DecodeAuthorizationMessage",{}).n("STSClient","DecodeAuthorizationMessageCommand").f(void 0,void 0).ser(r0).de(x0).build(){}var ld=J(b(),1);class uh extends F.classBuilder().ep({...E}).m(function(h,d,l,w){return[ld.getSerdePlugin(l,this.serialize,this.deserialize),B(l,h.getEndpointParameterInstructions())]}).s("AWSSecurityTokenServiceV20110615","GetAccessKeyInfo",{}).n("STSClient","GetAccessKeyInfoCommand").f(void 0,void 0).ser(s0).de(i0).build(){}var dd=J(b(),1);class th extends F.classBuilder().ep({...E}).m(function(h,d,l,w){return[dd.getSerdePlugin(l,this.serialize,this.deserialize),B(l,h.getEndpointParameterInstructions())]}).s("AWSSecurityTokenServiceV20110615","GetCallerIdentity",{}).n("STSClient","GetCallerIdentityCommand").f(void 0,void 0).ser(_0).de(c0).build(){}var wd=J(b(),1);class hl extends F.classBuilder().ep({...E}).m(function(h,d,l,w){return[wd.getSerdePlugin(l,this.serialize,this.deserialize),B(l,h.getEndpointParameterInstructions())]}).s("AWSSecurityTokenServiceV20110615","GetFederationToken",{}).n("STSClient","GetFederationTokenCommand").f(void 0,z0).ser(b0).de(e0).build(){}var Gd=J(b(),1);class ll extends F.classBuilder().ep({...E}).m(function(h,d,l,w){return[Gd.getSerdePlugin(l,this.serialize,this.deserialize),B(l,h.getEndpointParameterInstructions())]}).s("AWSSecurityTokenServiceV20110615","GetSessionToken",{}).n("STSClient","GetSessionTokenCommand").f(void 0,N0).ser(f0).de(p0).build(){}var Bw={AssumeRoleCommand:hh,AssumeRoleWithSAMLCommand:nh,AssumeRoleWithWebIdentityCommand:lh,DecodeAuthorizationMessageCommand:oh,GetAccessKeyInfoCommand:uh,GetCallerIdentityCommand:th,GetFederationTokenCommand:hl,GetSessionTokenCommand:ll};class Hd extends A{}Id(Bw,Hd);var Sd="us-east-1",md=(h)=>{if(typeof h?.Arn==="string"){const d=h.Arn.split(":");if(d.length>4&&d[4]!=="")return d[4]}return},Jd=async(h,d,l)=>{const w=typeof h==="function"?await h():h,G=typeof d==="function"?await d():d;return l?.debug?.("@aws-sdk/client-sts::resolveRegion","accepting first of:",`${w} (provider)`,`${G} (parent client)`,`${Sd} (STS default)`),w??G??Sd},Dd=(h,d)=>{let l,w;return async(G,H)=>{if(w=G,!l){const{logger:M=h?.parentClientConfig?.logger,region:n,requestHandler:qh=h?.parentClientConfig?.requestHandler,credentialProviderLogger:Kd}=h,Fd=await Jd(n,h?.parentClientConfig?.region,Kd);l=new d({credentialDefaultProvider:()=>async()=>w,region:Fd,requestHandler:qh,logger:M})}const{Credentials:I,AssumedRoleUser:Q}=await l.send(new hh(H));if(!I||!I.AccessKeyId||!I.SecretAccessKey)throw new Error(`Invalid response from STS.assumeRole call with role ${H.RoleArn}`);const v=md(Q);return{accessKeyId:I.AccessKeyId,secretAccessKey:I.SecretAccessKey,sessionToken:I.SessionToken,expiration:I.Expiration,...I.CredentialScope&&{credentialScope:I.CredentialScope},...v&&{accountId:v}}}},Ed=(h,d)=>{let l;return async(w)=>{if(!l){const{logger:Q=h?.parentClientConfig?.logger,region:v,requestHandler:M=h?.parentClientConfig?.requestHandler,credentialProviderLogger:n}=h,qh=await Jd(v,h?.parentClientConfig?.region,n);l=new d({region:qh,requestHandler:M,logger:Q})}const{Credentials:G,AssumedRoleUser:H}=await l.send(new lh(w));if(!G||!G.AccessKeyId||!G.SecretAccessKey)throw new Error(`Invalid response from STS.assumeRoleWithWebIdentity call with role ${w.RoleArn}`);const I=md(H);return{accessKeyId:G.AccessKeyId,secretAccessKey:G.SecretAccessKey,sessionToken:G.SessionToken,expiration:G.Expiration,...G.CredentialScope&&{credentialScope:G.CredentialScope},...I&&{accountId:I}}}};var kd=(h,d)=>{if(!d)return h;else return class l extends h{constructor(w){super(w);for(let G of d)this.middlewareStack.use(G)}}},qw=(h={},d)=>Dd(h,kd(A,d)),yw=(h={},d)=>Ed(h,kd(A,d)),AG=(h)=>(d)=>h({roleAssumer:qw(d),roleAssumerWithWebIdentity:yw(d),...d});export{yw as getDefaultRoleAssumerWithWebIdentity,qw as getDefaultRoleAssumer,AG as decorateDefaultCredentialProvider,F0 as __Client,Y as STSServiceException,A as STSClient,Hd as STS,Dh as RegionDisabledException,Jh as PackedPolicyTooLargeException,mh as MalformedPolicyDocumentException,kh as InvalidIdentityTokenException,Fh as InvalidAuthorizationMessageException,Eh as IDPRejectedClaimException,Kh as IDPCommunicationErrorException,N0 as GetSessionTokenResponseFilterSensitiveLog,ll as GetSessionTokenCommand,z0 as GetFederationTokenResponseFilterSensitiveLog,hl as GetFederationTokenCommand,th as GetCallerIdentityCommand,uh as GetAccessKeyInfoCommand,Sh as ExpiredTokenException,oh as DecodeAuthorizationMessageCommand,o as CredentialsFilterSensitiveLog,M0 as AssumeRoleWithWebIdentityResponseFilterSensitiveLog,v0 as AssumeRoleWithWebIdentityRequestFilterSensitiveLog,lh as AssumeRoleWithWebIdentityCommand,P0 as AssumeRoleWithSAMLResponseFilterSensitiveLog,V0 as AssumeRoleWithSAMLRequestFilterSensitiveLog,nh as AssumeRoleWithSAMLCommand,U0 as AssumeRoleResponseFilterSensitiveLog,hh as AssumeRoleCommand,F as $Command};
@@ -0,0 +1,6 @@
1
+ // @bun
2
+ import"./chunk-7ce930fe69575c87.js";import{C as i,R as I,V as y,ja as C} from"./chunk-f2428c56f532e719.js";import"./chunk-09dd89e1046786a5.js";import{vb as n} from"./chunk-73eed146ee78f681.js";import u from"fs/promises";var T="169.254.170.2",x="169.254.170.23",P="[fd00:ec2::23]",d=(e,c)=>{if(e.protocol==="https:")return;if(e.hostname===T||e.hostname===x||e.hostname===P)return;if(e.hostname.includes("[")){if(e.hostname==="[::1]"||e.hostname==="[0000:0000:0000:0000:0000:0000:0000:0001]")return}else{if(e.hostname==="localhost")return;const a=e.hostname.split("."),r=(t)=>{const s=parseInt(t,10);return 0<=s&&s<=255};if(a[0]==="127"&&r(a[1])&&r(a[2])&&r(a[3])&&a.length===4)return}throw new n(`URL not accepted. It must either be HTTPS or match one of the following:
3
+ - loopback CIDR 127.0.0.0/8 or [::1/128]
4
+ - ECS container host 169.254.170.2
5
+ - EKS container host 169.254.170.23 or [fd00:ec2::23]`,{logger:c})};function S(e){return new i({protocol:e.protocol,hostname:e.hostname,port:Number(e.port),path:e.pathname,query:Array.from(e.searchParams.entries()).reduce((c,[a,r])=>{return c[a]=r,c},{}),fragment:e.hash})}async function g(e,c){const r=await y(e.body).transformToString();if(e.statusCode===200){const t=JSON.parse(r);if(typeof t.AccessKeyId!=="string"||typeof t.SecretAccessKey!=="string"||typeof t.Token!=="string"||typeof t.Expiration!=="string")throw new n("HTTP credential provider response not of the required format, an object matching: { AccessKeyId: string, SecretAccessKey: string, Token: string, Expiration: string(rfc3339) }",{logger:c});return{accessKeyId:t.AccessKeyId,secretAccessKey:t.SecretAccessKey,sessionToken:t.Token,expiration:C(t.Expiration)}}if(e.statusCode>=400&&e.statusCode<500){let t={};try{t=JSON.parse(r)}catch(s){}throw Object.assign(new n(`Server responded with status: ${e.statusCode}`,{logger:c}),{Code:t.Code,Message:t.Message})}throw new n(`Server responded with status: ${e.statusCode}`,{logger:c})}var w=(e,c,a)=>{return async()=>{for(let r=0;r<c;++r)try{return await e()}catch(t){await new Promise((s)=>setTimeout(s,a))}return await e()}};var E="AWS_CONTAINER_CREDENTIALS_RELATIVE_URI",R="http://169.254.170.2",p="AWS_CONTAINER_CREDENTIALS_FULL_URI",A="AWS_CONTAINER_AUTHORIZATION_TOKEN_FILE",O="AWS_CONTAINER_AUTHORIZATION_TOKEN",b=(e={})=>{e.logger?.debug("@aws-sdk/credential-provider-http - fromHttp");let c;const a=e.awsContainerCredentialsRelativeUri??process.env[E],r=e.awsContainerCredentialsFullUri??process.env[p],t=e.awsContainerAuthorizationToken??process.env[O],s=e.awsContainerAuthorizationTokenFile??process.env[A],m=e.logger?.constructor?.name==="NoOpLogger"||!e.logger?console.warn:e.logger.warn;if(a&&r)m("@aws-sdk/credential-provider-http: you have set both awsContainerCredentialsRelativeUri and awsContainerCredentialsFullUri."),m("awsContainerCredentialsFullUri will take precedence.");if(t&&s)m("@aws-sdk/credential-provider-http: you have set both awsContainerAuthorizationToken and awsContainerAuthorizationTokenFile."),m("awsContainerAuthorizationToken will take precedence.");if(r)c=r;else if(a)c=`${R}${a}`;else throw new n(`No HTTP credential provider host provided.
6
+ Set AWS_CONTAINER_CREDENTIALS_FULL_URI or AWS_CONTAINER_CREDENTIALS_RELATIVE_URI.`,{logger:e.logger});const h=new URL(c);d(h,e.logger);const K=new I({requestTimeout:e.timeout??1000,connectionTimeout:e.timeout??1000});return w(async()=>{const o=S(h);if(t)o.headers.Authorization=t;else if(s)o.headers.Authorization=(await u.readFile(s)).toString();try{const f=await K.handle(o);return g(f.response)}catch(f){throw new n(String(f),{logger:e.logger})}},e.maxRetries??3,e.timeout??1000)};export{b as fromHttp};