gemi 0.4.94 → 0.4.95
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/app/index.js +2 -0
- package/dist/app/index.js.map +13 -0
- package/dist/bin/index.js +3 -0
- package/dist/broadcasting/index.js +2 -0
- package/dist/broadcasting/index.js.map +10 -0
- package/dist/chunk-07f44e411ae4ea5e.js +4 -0
- package/dist/chunk-07f44e411ae4ea5e.js.map +11 -0
- package/dist/chunk-0d97333b6af9fc45.js +2 -0
- package/dist/chunk-0d97333b6af9fc45.js.map +9 -0
- package/dist/chunk-11de5b0adccef35c.js +4 -0
- package/dist/chunk-11de5b0adccef35c.js.map +17 -0
- package/dist/chunk-18a59fffad60f059.js +4 -0
- package/dist/chunk-18a59fffad60f059.js.map +12 -0
- package/dist/chunk-201c5005a90452fa.js +11 -0
- package/dist/chunk-201c5005a90452fa.js.map +11 -0
- package/dist/chunk-23d3df5f8342ecc6.js +2 -0
- package/dist/chunk-23d3df5f8342ecc6.js.map +54 -0
- package/dist/chunk-278677330e53423b.js +4 -0
- package/dist/chunk-278677330e53423b.js.map +26 -0
- package/dist/chunk-28ec4c2b20e69deb.js +2 -0
- package/dist/chunk-28ec4c2b20e69deb.js.map +10 -0
- package/dist/chunk-2f8cf8372320b622.js +2 -0
- package/dist/chunk-2f8cf8372320b622.js.map +11 -0
- package/dist/chunk-53b0fab00d83f47e.js +2 -0
- package/dist/chunk-53b0fab00d83f47e.js.map +13 -0
- package/dist/chunk-57ba59dd008d6e0e.js +4 -0
- package/dist/chunk-57ba59dd008d6e0e.js.map +32 -0
- package/dist/chunk-642b04056dab5d64.js +2 -0
- package/dist/chunk-642b04056dab5d64.js.map +11 -0
- package/dist/chunk-643529c2ad120db7.js +2 -0
- package/dist/chunk-643529c2ad120db7.js.map +50 -0
- package/dist/chunk-683905a55f8da1ad.js +5 -0
- package/dist/chunk-683905a55f8da1ad.js.map +64 -0
- package/dist/chunk-90436b32a64fc784.js +2 -0
- package/dist/chunk-90436b32a64fc784.js.map +53 -0
- package/dist/chunk-99c32e4d937131e0.js +2 -0
- package/dist/chunk-99c32e4d937131e0.js.map +10 -0
- package/dist/chunk-9be25fac5f76b2f7.js +8 -0
- package/dist/chunk-9be25fac5f76b2f7.js.map +13 -0
- package/dist/{chunk-eee44b06ba2a6e36.js → chunk-9f9e21f9fd0d6af1.js} +3 -1
- package/dist/chunk-9f9e21f9fd0d6af1.js.map +10 -0
- package/dist/chunk-9ff3d7096b6de8eb.js +4 -0
- package/dist/chunk-9ff3d7096b6de8eb.js.map +22 -0
- package/dist/chunk-a7d87b5d6d789781.js +4 -0
- package/dist/chunk-a7d87b5d6d789781.js.map +23 -0
- package/dist/chunk-b84d011a2972c7d1.js +2 -0
- package/dist/chunk-b84d011a2972c7d1.js.map +10 -0
- package/dist/{chunk-96e59b185e2d1612.js → chunk-bace428bfab523c4.js} +3 -1
- package/dist/chunk-bace428bfab523c4.js.map +23 -0
- package/dist/chunk-bd708d3c982948aa.js +4 -0
- package/dist/chunk-bd708d3c982948aa.js.map +16 -0
- package/dist/chunk-c8c4a1285a266c51.js +20 -0
- package/dist/chunk-c8c4a1285a266c51.js.map +169 -0
- package/dist/chunk-cd4bfdd46ec4cbb8.js +4 -0
- package/dist/chunk-cd4bfdd46ec4cbb8.js.map +10 -0
- package/dist/chunk-cd9c5e8a6c80384f.js +4 -0
- package/dist/chunk-cd9c5e8a6c80384f.js.map +20 -0
- package/dist/chunk-d5b8023c223e3a60.js +4 -0
- package/dist/chunk-d5b8023c223e3a60.js.map +10 -0
- package/dist/chunk-e4961d79807acd3d.js +2 -0
- package/dist/chunk-e4961d79807acd3d.js.map +33 -0
- package/dist/email/index.js +2 -0
- package/dist/email/index.js.map +11 -0
- package/dist/facades/index.js +2 -0
- package/dist/facades/index.js.map +28 -0
- package/dist/http/index.js +2 -0
- package/dist/http/index.js.map +29 -0
- package/dist/kernel/Kernel.d.ts.map +1 -1
- package/dist/kernel/index.js +3 -1
- package/dist/kernel/index.js.map +11 -0
- package/dist/server/index.js +2 -0
- package/dist/server/index.js.map +17 -0
- package/dist/services/index.js +6 -4
- package/dist/services/index.js.map +121 -0
- package/package.json +2 -2
- package/dist/chunk-2b9b6009ebe271d3.js +0 -2
- package/dist/chunk-3a6838d9e6866471.js +0 -2
- package/dist/chunk-3affaf143f242e08.js +0 -2
- package/dist/chunk-57352645a8e7e7cb.js +0 -2
- package/dist/chunk-6ac923265710cdd6.js +0 -18
- package/dist/chunk-809308720fc22418.js +0 -2
- package/dist/chunk-869ca3630adc189b.js +0 -2
- package/dist/chunk-931a005d4bb28ffe.js +0 -2
- package/dist/chunk-aa5366c3d468f9d7.js +0 -6
- package/dist/chunk-b94896500a1345bf.js +0 -2
- package/dist/chunk-bdac4694bbb37064.js +0 -1
- package/dist/chunk-c3c17a7115770391.js +0 -2
- package/dist/chunk-cadbc5f981d3a029.js +0 -2
- package/dist/chunk-cf9df3002593e357.js +0 -9
- package/dist/chunk-efd43c1cf8f87db4.js +0 -3
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "gemi",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.95",
|
|
4
4
|
"devDependencies": {
|
|
5
5
|
"@babel/parser": "^7.25.4",
|
|
6
6
|
"@repo/eslint-config": "*",
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
"lint": "eslint . --max-warnings 0",
|
|
40
40
|
"build": "bun run build:core && bun run build:bin && bun run build:types && bun run build:client && bun run build:plugin && bun run build:client-types",
|
|
41
41
|
"build:core": "bun ./scripts/build.ts",
|
|
42
|
-
"build:bin": "bun build ./bin/gemi.ts --target bun --external vite --external react-dom --external react/jsx-runtime --external bun --outfile ./dist/bin/index.js && bun ./scripts/prepare-bin.ts",
|
|
42
|
+
"build:bin": "bun build ./bin/gemi.ts --target bun --external vite --external react-dom --external react/jsx-runtime --external bun --sourcemap --outfile ./dist/bin/index.js && bun ./scripts/prepare-bin.ts",
|
|
43
43
|
"build:client": "vite build",
|
|
44
44
|
"build:plugin": "vite build -c vite.plugin.config.mts",
|
|
45
45
|
"build:types": "tsc",
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import"./chunk-0d97333b6af9fc45.js";import{Fb as E} from"./chunk-bdac4694bbb37064.js";import{readFileSync as l} from"fs";var t=(e)=>async()=>{e.logger?.debug("@aws-sdk/credential-provider-web-identity - fromWebToken");const{roleArn:o,roleSessionName:r,webIdentityToken:n,providerId:c,policyArns:i,policy:_,durationSeconds:N}=e;let{roleAssumerWithWebIdentity:s}=e;if(!s){const{getDefaultRoleAssumerWithWebIdentity:d}=await import("./chunk-57352645a8e7e7cb.js");s=d({...e.clientConfig,credentialProviderLogger:e.logger,parentClientConfig:e.parentClientConfig},e.clientPlugins)}return s({RoleArn:o,RoleSessionName:r??`aws-sdk-js-session-${Date.now()}`,WebIdentityToken:n,ProviderId:c,PolicyArns:i,Policy:_,DurationSeconds:N})};var m="AWS_WEB_IDENTITY_TOKEN_FILE",S="AWS_ROLE_ARN",p="AWS_ROLE_SESSION_NAME",A=(e={})=>async()=>{e.logger?.debug("@aws-sdk/credential-provider-web-identity - fromTokenFile");const o=e?.webIdentityTokenFile??process.env[m],r=e?.roleArn??process.env[S],n=e?.roleSessionName??process.env[p];if(!o||!r)throw new E("Web identity configuration not specified",{logger:e.logger});return t({...e,webIdentityToken:l(o,{encoding:"ascii"}),roleArn:r,roleSessionName:n})()};export{t as fromWebToken,A as fromTokenFile};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import"./chunk-0d97333b6af9fc45.js";import"./chunk-eee44b06ba2a6e36.js";import{Fb as i,Gb as f} from"./chunk-bdac4694bbb37064.js";import{Mb as y,Nb as K,Ob as E,Rb as C,Sb as N} from"./chunk-96e59b185e2d1612.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-3affaf143f242e08.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-3affaf143f242e08.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-cadbc5f981d3a029.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};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import"./chunk-869ca3630adc189b.js";import{J as k} from"./chunk-0d97333b6af9fc45.js";import"./chunk-28ec4c2b20e69deb.js";import{$ as cr,Aa as Ze,Ba as He,Ca as Ne,Da as ir,Ea as lr,X as Mr,Y as nr,Z as or,_ as dr,ca as N,da as tr,ea as $e,fa as Ie,ga as Re,ha as Pe,ia as ar,ja as Ae,ka as Ke,la as Me,ma as Be,na as mr,oa as wr,qa as S,ra as $,sa as kr,ta as Le,ua as Qe,va as vr,wa as Xe,xa as Er,ya as U,za as Ye} from"./chunk-6ac923265710cdd6.js";import{Ab as I,Fa as ue,Ga as er,Ma as be,Oa as je,Pa as Fe,Qa as yr,Ra as De,Sa as Ue,Va as Je,Wa as Ve,ab as E,bb as t,cb as Vr,eb as p,fb as b,gb as j,hb as F,ib as h,pb as Sr,qb as a,rb as jr,sb as We,tb as fe,ub as rr,vb as sr,xb as d,yb as o} from"./chunk-efd43c1cf8f87db4.js";import"./chunk-eee44b06ba2a6e36.js";import{Cb as R,Db as qe} from"./chunk-931a005d4bb28ffe.js";import"./chunk-bdac4694bbb37064.js";import{Kb as Ce} from"./chunk-cf9df3002593e357.js";import"./chunk-96e59b185e2d1612.js";var P=k(N(),1);var re=k(U(),1),q=k(Mr(),1),Br=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:q.getSmithyContext(s).operation,region:await q.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(Br(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.654.0",scripts:{build:"concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'","build:cjs":"node ../../scripts/compilation/inline client-sso-oidc","build:es":"tsc -p tsconfig.es.json","build:include:deps":"lerna run --scope $npm_package_name --include-dependencies build","build:types":"tsc -p tsconfig.types.json","build:types:downlevel":"downlevel-dts dist-types dist-types/ts3.4",clean:"rimraf ./dist-* && rimraf *.tsbuildinfo","extract:docs":"api-extractor run --local","generate:client":"node ../../scripts/generate-clients/single-service --solo sso-oidc"},main:"./dist-cjs/index.js",types:"./dist-types/index.d.ts",module:"./dist-es/index.js",sideEffects:!1,dependencies:{"@aws-crypto/sha256-browser":"5.2.0","@aws-crypto/sha256-js":"5.2.0","@aws-sdk/core":"3.654.0","@aws-sdk/credential-provider-node":"3.654.0","@aws-sdk/middleware-host-header":"3.654.0","@aws-sdk/middleware-logger":"3.654.0","@aws-sdk/middleware-recursion-detection":"3.654.0","@aws-sdk/middleware-user-agent":"3.654.0","@aws-sdk/region-config-resolver":"3.654.0","@aws-sdk/types":"3.654.0","@aws-sdk/util-endpoints":"3.654.0","@aws-sdk/util-user-agent-browser":"3.654.0","@aws-sdk/util-user-agent-node":"3.654.0","@smithy/config-resolver":"^3.0.8","@smithy/core":"^2.4.3","@smithy/fetch-http-handler":"^3.2.7","@smithy/hash-node":"^3.0.6","@smithy/invalid-dependency":"^3.0.6","@smithy/middleware-content-length":"^3.0.8","@smithy/middleware-endpoint":"^3.1.3","@smithy/middleware-retry":"^3.0.18","@smithy/middleware-serde":"^3.0.6","@smithy/middleware-stack":"^3.0.6","@smithy/node-config-provider":"^3.1.7","@smithy/node-http-handler":"^3.2.2","@smithy/protocol-http":"^4.1.3","@smithy/smithy-client":"^3.3.2","@smithy/types":"^3.4.2","@smithy/url-parser":"^3.0.6","@smithy/util-base64":"^3.0.0","@smithy/util-body-length-browser":"^3.0.0","@smithy/util-body-length-node":"^3.0.0","@smithy/util-defaults-mode-browser":"^3.0.18","@smithy/util-defaults-mode-node":"^3.0.18","@smithy/util-endpoints":"^2.1.2","@smithy/util-middleware":"^3.0.6","@smithy/util-retry":"^3.0.6","@smithy/util-utf8":"^3.0.0",tslib:"^2.6.2"},devDependencies:{"@tsconfig/node16":"16.1.3","@types/node":"^16.18.96",concurrently:"7.0.0","downlevel-dts":"0.10.1",rimraf:"3.0.2",typescript:"~4.9.5"},engines:{node:">=16.0.0"},typesVersions:{"<4.0":{"dist-types/*":["dist-types/ts3.4/*"]}},files:["dist-*/**"],author:{name:"AWS SDK for JavaScript Team",url:"https://aws.amazon.com/javascript/"},license:"Apache-2.0",peerDependencies:{"@aws-sdk/client-sts":"^3.654.0"},browser:{"./dist-es/runtimeConfig":"./dist-es/runtimeConfig.browser"},"react-native":{"./dist-es/runtimeConfig":"./dist-es/runtimeConfig.native"},homepage:"https://github.com/aws/aws-sdk-js-v3/tree/main/clients/client-sso-oidc",repository:{type:"git",url:"https://github.com/aws/aws-sdk-js-v3.git",directory:"clients/client-sso-oidc"}};var _e=k(U(),1);var xe=k(U(),1),ze=k(N(),1);var oe={["required"]:!1,type:"String"},de={["required"]:!0,default:!1,type:"Boolean"},ce={["ref"]:"Endpoint"},ke={["fn"]:"booleanEquals",["argv"]:[{["ref"]:"UseFIPS"},!0]},ve={["fn"]:"booleanEquals",["argv"]:[{["ref"]:"UseDualStack"},!0]},m={},ye={["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"}],Qr={version:"1.0",parameters:{Region:oe,UseDualStack:de,UseFIPS:de,Endpoint:oe},rules:[{conditions:[{["fn"]:"isSet",["argv"]:[ce]}],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:ce,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,ye]},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"]:[ye,!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=Qr;var Xr=new $e({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS"]}),Te=(e,s={})=>{return Xr.get(e,()=>Re(Se,{endpointParams:e,logger:s.logger}))};Ie.aws=Pe;var Ge=(e)=>{return{apiVersion:"2019-06-10",base64Decoder:e?.base64Decoder??De,base64Encoder:e?.base64Encoder??Ue,disableHostPrefix:e?.disableHostPrefix??!1,endpointProvider:e?.endpointProvider??Te,extensions:e?.extensions??[],httpAuthSchemeProvider:e?.httpAuthSchemeProvider??ie,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 Fe,serviceId:e?.serviceId??"SSO OIDC",urlParser:e?.urlParser??qe,utf8Decoder:e?.utf8Decoder??be,utf8Encoder:e?.utf8Encoder??je}};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:ne.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 x=(e)=>e,hr=(e,s)=>{const r={...x(ir(e)),...x(rr(e)),...x(ue(e)),...x(ge(e))};return s.forEach((i)=>i.configure(r)),{...e,...lr(r),...sr(r),...er(r),...Oe(r)}};class _ extends yr{constructor(...[e]){const s=pe(e||{}),r=he(s),i=tr(r),l=vr(i),n=mr(l),T=nr(n),fr=kr(T),Ar=le(fr),ee=hr(Ar,e?.extensions||[]);super(ee);this.config=ee,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(cr(this.config)),this.middlewareStack.use(P.getHttpAuthSchemeEndpointRuleSetPlugin(this.config,{httpAuthSchemeParametersProvider:se,identityProviderConfigProvider:async(Kr)=>new P.DefaultIdentityProviderConfig({"aws.auth#sigv4":Kr.credentials})})),this.middlewareStack.use(P.getHttpSigningPlugin(this.config))}destroy(){super.destroy()}}class c extends Sr{constructor(e){super(e);Object.setPrototypeOf(this,c.prototype)}}class z extends c{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 c{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 c{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 c{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 c{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 c{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 c{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 c{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 c{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 c{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 c{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 c{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 c{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 c{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 $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=k(U(),1),D=k(N(),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({[hs]:[,"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()},Ur=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()},xr=async(e,s)=>{if(e.statusCode!==200&&e.statusCode>=300)return Z(e,s);const r=d({$metadata:y(e)}),i=j(F(await w.parseJsonBody(e.body,s)),"body"),l=o(i,{accessToken:h,expiresIn:b,idToken:h,refreshToken:h,tokenType:h});return Object.assign(r,l),r},zr=async(e,s)=>{if(e.statusCode!==200&&e.statusCode>=300)return Z(e,s);const r=d({$metadata:y(e)}),i=j(F(await w.parseJsonBody(e.body,s)),"body"),l=o(i,{accessToken:h,expiresIn:b,idToken:h,issuedTokenType:h,refreshToken:h,scope:I,tokenType:h});return Object.assign(r,l),r},Gr=async(e,s)=>{if(e.statusCode!==200&&e.statusCode>=300)return Z(e,s);const r=d({$metadata:y(e)}),i=j(F(await w.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},Jr=async(e,s)=>{if(e.statusCode!==200&&e.statusCode>=300)return Z(e,s);const r=d({$metadata:y(e)}),i=j(F(await w.parseJsonBody(e.body,s)),"body"),l=o(i,{deviceCode:h,expiresIn:b,interval:b,userCode:h,verificationUri:h,verificationUriComplete:h});return Object.assign(r,l),r},Z=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 Zr(r,s);case"AuthorizationPendingException":case"com.amazonaws.ssooidc#AuthorizationPendingException":throw await Hr(r,s);case"ExpiredTokenException":case"com.amazonaws.ssooidc#ExpiredTokenException":throw await Nr(r,s);case"InternalServerException":case"com.amazonaws.ssooidc#InternalServerException":throw await _r(r,s);case"InvalidClientException":case"com.amazonaws.ssooidc#InvalidClientException":throw await pr(r,s);case"InvalidGrantException":case"com.amazonaws.ssooidc#InvalidGrantException":throw await gr(r,s);case"InvalidRequestException":case"com.amazonaws.ssooidc#InvalidRequestException":throw await ur(r,s);case"InvalidScopeException":case"com.amazonaws.ssooidc#InvalidScopeException":throw await rs(r,s);case"SlowDownException":case"com.amazonaws.ssooidc#SlowDownException":throw await ss(r,s);case"UnauthorizedClientException":case"com.amazonaws.ssooidc#UnauthorizedClientException":throw await is(r,s);case"UnsupportedGrantTypeException":case"com.amazonaws.ssooidc#UnsupportedGrantTypeException":throw await ls(r,s);case"InvalidRequestRegionException":case"com.amazonaws.ssooidc#InvalidRequestRegionException":throw await es(r,s);case"InvalidClientMetadataException":case"com.amazonaws.ssooidc#InvalidClientMetadataException":throw await Cr(r,s);case"InvalidRedirectUriException":case"com.amazonaws.ssooidc#InvalidRedirectUriException":throw await Or(r,s);default:const l=r.body;return Yr({output:e,parsedBody:l,errorCode:i})}},Yr=jr(c),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 z({$metadata:y(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 G({$metadata:y(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 J({$metadata:y(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 V({$metadata:y(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:y(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:y(e),...r});return a(n,e.body)},gr=async(e,s)=>{const r=d({}),i=e.body,l=o(i,{error:h,error_description:h});Object.assign(r,l);const n=new f({$metadata:y(e),...r});return a(n,e.body)},Or=async(e,s)=>{const r=d({}),i=e.body,l=o(i,{error:h,error_description:h});Object.assign(r,l);const n=new Y({$metadata:y(e),...r});return a(n,e.body)},ur=async(e,s)=>{const r=d({}),i=e.body,l=o(i,{error:h,error_description:h});Object.assign(r,l);const n=new A({$metadata:y(e),...r});return a(n,e.body)},es=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:y(e),...r});return a(n,e.body)},rs=async(e,s)=>{const r=d({}),i=e.body,l=o(i,{error:h,error_description:h});Object.assign(r,l);const n=new K({$metadata:y(e),...r});return a(n,e.body)},ss=async(e,s)=>{const r=d({}),i=e.body,l=o(i,{error:h,error_description:h});Object.assign(r,l);const n=new M({$metadata:y(e),...r});return a(n,e.body)},is=async(e,s)=>{const r=d({}),i=e.body,l=o(i,{error:h,error_description:h});Object.assign(r,l);const n=new B({$metadata:y(e),...r});return a(n,e.body)},ls=async(e,s)=>{const r=d({}),i=e.body,l=o(i,{error:h,error_description:h});Object.assign(r,l);const n=new L({$metadata:y(e),...r});return a(n,e.body)},y=(e)=>({httpStatusCode:e.statusCode,requestId:e.headers["x-amzn-requestid"]??e.headers["x-amzn-request-id"]??e.headers["x-amz-request-id"],extendedRequestId:e.headers["x-amz-id-2"],cfId:e.headers["x-amz-cf-id"]});var hs="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($r,Ir).ser(Fr).de(xr).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(Rr,Pr).ser(Dr).de(zr).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,Tr).ser(Ur).de(Gr).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(br,void 0).ser(qr).de(Jr).build(){}var ns={CreateTokenCommand:C,CreateTokenWithIAMCommand:g,RegisterClientCommand:O,StartDeviceAuthorizationCommand:u};class Wr extends _{}Vr(ns,Wr);export{yr as __Client,L as UnsupportedGrantTypeException,B as UnauthorizedClientException,br as StartDeviceAuthorizationRequestFilterSensitiveLog,u as StartDeviceAuthorizationCommand,M as SlowDownException,c as SSOOIDCServiceException,_ as SSOOIDCClient,Wr as SSOOIDC,Tr 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,Pr as CreateTokenWithIAMResponseFilterSensitiveLog,Rr as CreateTokenWithIAMRequestFilterSensitiveLog,g as CreateTokenWithIAMCommand,Ir as CreateTokenResponseFilterSensitiveLog,$r as CreateTokenRequestFilterSensitiveLog,C as CreateTokenCommand,G as AuthorizationPendingException,z as AccessDeniedException,E as $Command};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import"./chunk-869ca3630adc189b.js";import{J as A} from"./chunk-0d97333b6af9fc45.js";import"./chunk-28ec4c2b20e69deb.js";import{$ as B0,Aa as ul,Ba as tl,Ca as h0,Da as J0,Ea as D0,X as Dw,Y as k0,Z as K0,_ as F0,ca as Xh,da as y0,ea as ql,fa as zl,ga as Ml,ha as Nl,ia as Q0,ja as gl,ka as xl,la as il,ma as cl,na as X0,oa as Y0,qa as F,ra as B,sa as Z0,ta as el,ua as pl,va as $0,wa as nl,xa as V0,ya as Gh,za as ol} from"./chunk-6ac923265710cdd6.js";import{Fa as I0,Ga as S0,Ha as A0,Ma as Tl,Oa as Al,Pa as Ll,Qa as U0,Ra as Rl,Sa as jl,Va as bl,Wa as fl,ab as K,bb as Hh,cb as t0,gb as L0,ib as H,kb as u,nb as R0,pb as P0,qb as T,rb as j0,sb as Cl,tb as Ol,ub as H0,vb as m0,wb as ph} from"./chunk-efd43c1cf8f87db4.js";import"./chunk-eee44b06ba2a6e36.js";import{Cb as f,Db as al} from"./chunk-931a005d4bb28ffe.js";import"./chunk-bdac4694bbb37064.js";import{Kb as Yh} from"./chunk-cf9df3002593e357.js";import"./chunk-96e59b185e2d1612.js";var C=A(Xh(),1);var dl=A(Gh(),1),dh=A(Dw(),1);var Ew=function(h){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"sts",region:h.region},propertiesExtractor:(w,l)=>({signingProperties:{config:w,context:l}})}},Gl=function(h){return{schemeId:"smithy.api#noAuth"}},Il=async(h,w,l)=>{return{operation:dh.getSmithyContext(w).operation,region:await dh.normalizeProvider(h.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()}},Sl=(h)=>{const w=[];switch(h.operation){case"AssumeRoleWithSAML":{w.push(Gl(h));break}case"AssumeRoleWithWebIdentity":{w.push(Gl(h));break}default:w.push(Ew(h))}return w},kw=(h)=>({...h,stsClientCtor:L}),Hl=(h)=>{const w=kw(h);return{...dl.resolveAwsSdkSigV4Config(w)}};var ml=(h)=>{return{...h,useDualstackEndpoint:h.useDualstackEndpoint??!1,useFipsEndpoint:h.useFipsEndpoint??!1,useGlobalEndpoint:h.useGlobalEndpoint??!1,defaultSigningName:"sts"}},D={UseGlobalEndpoint:{type:"builtInParams",name:"useGlobalEndpoint"},UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}};var Jl={name:"@aws-sdk/client-sts",description:"AWS SDK for JavaScript Sts Client for Node.js, Browser and React Native",version:"3.654.0",scripts:{build:"concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'","build:cjs":"node ../../scripts/compilation/inline client-sts","build:es":"tsc -p tsconfig.es.json","build:include:deps":"lerna run --scope $npm_package_name --include-dependencies build","build:types":"rimraf ./dist-types tsconfig.types.tsbuildinfo && tsc -p tsconfig.types.json","build:types:downlevel":"downlevel-dts dist-types dist-types/ts3.4",clean:"rimraf ./dist-* && rimraf *.tsbuildinfo","extract:docs":"api-extractor run --local","generate:client":"node ../../scripts/generate-clients/single-service --solo sts",test:"yarn test:unit","test:unit":"jest"},main:"./dist-cjs/index.js",types:"./dist-types/index.d.ts",module:"./dist-es/index.js",sideEffects:!1,dependencies:{"@aws-crypto/sha256-browser":"5.2.0","@aws-crypto/sha256-js":"5.2.0","@aws-sdk/client-sso-oidc":"3.654.0","@aws-sdk/core":"3.654.0","@aws-sdk/credential-provider-node":"3.654.0","@aws-sdk/middleware-host-header":"3.654.0","@aws-sdk/middleware-logger":"3.654.0","@aws-sdk/middleware-recursion-detection":"3.654.0","@aws-sdk/middleware-user-agent":"3.654.0","@aws-sdk/region-config-resolver":"3.654.0","@aws-sdk/types":"3.654.0","@aws-sdk/util-endpoints":"3.654.0","@aws-sdk/util-user-agent-browser":"3.654.0","@aws-sdk/util-user-agent-node":"3.654.0","@smithy/config-resolver":"^3.0.8","@smithy/core":"^2.4.3","@smithy/fetch-http-handler":"^3.2.7","@smithy/hash-node":"^3.0.6","@smithy/invalid-dependency":"^3.0.6","@smithy/middleware-content-length":"^3.0.8","@smithy/middleware-endpoint":"^3.1.3","@smithy/middleware-retry":"^3.0.18","@smithy/middleware-serde":"^3.0.6","@smithy/middleware-stack":"^3.0.6","@smithy/node-config-provider":"^3.1.7","@smithy/node-http-handler":"^3.2.2","@smithy/protocol-http":"^4.1.3","@smithy/smithy-client":"^3.3.2","@smithy/types":"^3.4.2","@smithy/url-parser":"^3.0.6","@smithy/util-base64":"^3.0.0","@smithy/util-body-length-browser":"^3.0.0","@smithy/util-body-length-node":"^3.0.0","@smithy/util-defaults-mode-browser":"^3.0.18","@smithy/util-defaults-mode-node":"^3.0.18","@smithy/util-endpoints":"^2.1.2","@smithy/util-middleware":"^3.0.6","@smithy/util-retry":"^3.0.6","@smithy/util-utf8":"^3.0.0",tslib:"^2.6.2"},devDependencies:{"@tsconfig/node16":"16.1.3","@types/node":"^16.18.96",concurrently:"7.0.0","downlevel-dts":"0.10.1",rimraf:"3.0.2",typescript:"~4.9.5"},engines:{node:">=16.0.0"},typesVersions:{"<4.0":{"dist-types/*":["dist-types/ts3.4/*"]}},files:["dist-*/**"],author:{name:"AWS SDK for JavaScript Team",url:"https://aws.amazon.com/javascript/"},license:"Apache-2.0",browser:{"./dist-es/runtimeConfig":"./dist-es/runtimeConfig.browser"},"react-native":{"./dist-es/runtimeConfig":"./dist-es/runtimeConfig.native"},homepage:"https://github.com/aws/aws-sdk-js-v3/tree/main/clients/client-sts",repository:{type:"git",url:"https://github.com/aws/aws-sdk-js-v3.git",directory:"clients/client-sts"}};var Ih=A(Gh(),1);var l0=A(Xh(),1);var sl=A(Gh(),1),rl=A(Xh(),1);var Dl={["required"]:!1,["type"]:"String"},Qh={["required"]:!0,default:!1,["type"]:"Boolean"},Xl={["ref"]:"Endpoint"},El={["fn"]:"isSet",["argv"]:[{["ref"]:"Region"}]},J={["ref"]:"Region"},kl={["fn"]:"aws.partition",["argv"]:[J],assign:"PartitionResult"},Yl={["ref"]:"UseFIPS"},Zl={["ref"]:"UseDualStack"},E={url:"https://sts.amazonaws.com",properties:{authSchemes:[{name:"sigv4",signingName:"sts",signingRegion:"us-east-1"}]},headers:{}},X={},Kl={conditions:[{["fn"]:"stringEquals",["argv"]:[J,"aws-global"]}],["endpoint"]:E,["type"]:"endpoint"},$l={["fn"]:"booleanEquals",["argv"]:[Yl,!0]},Vl={["fn"]:"booleanEquals",["argv"]:[Zl,!0]},Fl={["fn"]:"getAttr",["argv"]:[{["ref"]:"PartitionResult"},"supportsFIPS"]},Pl={["ref"]:"PartitionResult"},Bl={["fn"]:"booleanEquals",["argv"]:[!0,{["fn"]:"getAttr",["argv"]:[Pl,"supportsDualStack"]}]},Ul=[{["fn"]:"isSet",["argv"]:[Xl]}],yl=[$l],Ql=[Vl],Fw={version:"1.0",parameters:{Region:Dl,UseDualStack:Qh,UseFIPS:Qh,Endpoint:Dl,UseGlobalEndpoint:Qh},rules:[{conditions:[{["fn"]:"booleanEquals",["argv"]:[{["ref"]:"UseGlobalEndpoint"},!0]},{["fn"]:"not",["argv"]:Ul},El,kl,{["fn"]:"booleanEquals",["argv"]:[Yl,!1]},{["fn"]:"booleanEquals",["argv"]:[Zl,!1]}],rules:[{conditions:[{["fn"]:"stringEquals",["argv"]:[J,"ap-northeast-1"]}],endpoint:E,["type"]:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[J,"ap-south-1"]}],endpoint:E,["type"]:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[J,"ap-southeast-1"]}],endpoint:E,["type"]:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[J,"ap-southeast-2"]}],endpoint:E,["type"]:"endpoint"},Kl,{conditions:[{["fn"]:"stringEquals",["argv"]:[J,"ca-central-1"]}],endpoint:E,["type"]:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[J,"eu-central-1"]}],endpoint:E,["type"]:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[J,"eu-north-1"]}],endpoint:E,["type"]:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[J,"eu-west-1"]}],endpoint:E,["type"]:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[J,"eu-west-2"]}],endpoint:E,["type"]:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[J,"eu-west-3"]}],endpoint:E,["type"]:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[J,"sa-east-1"]}],endpoint:E,["type"]:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[J,"us-east-1"]}],endpoint:E,["type"]:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[J,"us-east-2"]}],endpoint:E,["type"]:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[J,"us-west-1"]}],endpoint:E,["type"]:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[J,"us-west-2"]}],endpoint:E,["type"]:"endpoint"},{endpoint:{url:"https://sts.{Region}.{PartitionResult#dnsSuffix}",properties:{authSchemes:[{name:"sigv4",signingName:"sts",signingRegion:"{Region}"}]},headers:X},["type"]:"endpoint"}],["type"]:"tree"},{conditions:Ul,rules:[{conditions:yl,error:"Invalid Configuration: FIPS and custom endpoint are not supported",["type"]:"error"},{conditions:Ql,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",["type"]:"error"},{endpoint:{url:Xl,properties:X,headers:X},["type"]:"endpoint"}],["type"]:"tree"},{conditions:[El],rules:[{conditions:[kl],rules:[{conditions:[$l,Vl],rules:[{conditions:[{["fn"]:"booleanEquals",["argv"]:[!0,Fl]},Bl],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:yl,rules:[{conditions:[{["fn"]:"booleanEquals",["argv"]:[Fl,!0]}],rules:[{conditions:[{["fn"]:"stringEquals",["argv"]:[{["fn"]:"getAttr",["argv"]:[Pl,"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:Ql,rules:[{conditions:[Bl],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=Fw;var Bw=new ql({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS","UseGlobalEndpoint"]}),Wl=(h,w={})=>{return Bw.get(h,()=>Ml(vl,{endpointParams:h,logger:w.logger}))};zl.aws=Nl;var _l=(h)=>{return{apiVersion:"2011-06-15",base64Decoder:h?.base64Decoder??Rl,base64Encoder:h?.base64Encoder??jl,disableHostPrefix:h?.disableHostPrefix??!1,endpointProvider:h?.endpointProvider??Wl,extensions:h?.extensions??[],httpAuthSchemeProvider:h?.httpAuthSchemeProvider??Sl,httpAuthSchemes:h?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:(w)=>w.getIdentityProvider("aws.auth#sigv4"),signer:new sl.AwsSdkSigV4Signer},{schemeId:"smithy.api#noAuth",identityProvider:(w)=>w.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new rl.NoAuthSigner}],logger:h?.logger??new Ll,serviceId:h?.serviceId??"STS",urlParser:h?.urlParser??al,utf8Decoder:h?.utf8Decoder??Tl,utf8Encoder:h?.utf8Encoder??Al}};var w0=(h)=>{Ol(process.version);const w=h0(h),l=()=>w().then(Cl),G=_l(h);return Ih.emitWarningIfUnsupportedVersion(process.version),{...G,...h,runtime:"node",defaultsMode:w,bodyLengthChecker:h?.bodyLengthChecker??tl,credentialDefaultProvider:h?.credentialDefaultProvider??Yh,defaultUserAgentProvider:h?.defaultUserAgentProvider??ol({serviceId:G.serviceId,clientVersion:Jl.version}),httpAuthSchemes:h?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:(d)=>d.getIdentityProvider("aws.auth#sigv4")||(async(S)=>await Yh(S?.__config||{})()),signer:new Ih.AwsSdkSigV4Signer},{schemeId:"smithy.api#noAuth",identityProvider:(d)=>d.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new l0.NoAuthSigner}],maxAttempts:h?.maxAttempts??f(pl),region:h?.region??f(il,cl),requestHandler:bl.create(h?.requestHandler??l),retryMode:h?.retryMode??f({...nl,default:async()=>(await l()).retryMode||el}),sha256:h?.sha256??ul.bind(null,"sha256"),streamCollector:h?.streamCollector??fl,useDualstackEndpoint:h?.useDualstackEndpoint??f(gl),useFipsEndpoint:h?.useFipsEndpoint??f(xl)}};var G0=(h)=>{const w=h.httpAuthSchemes;let{httpAuthSchemeProvider:l,credentials:G}=h;return{setHttpAuthScheme(d){const S=w.findIndex((I)=>I.schemeId===d.schemeId);if(S===-1)w.push(d);else w.splice(S,1,d)},httpAuthSchemes(){return w},setHttpAuthSchemeProvider(d){l=d},httpAuthSchemeProvider(){return l},setCredentials(d){G=d},credentials(){return G}}},d0=(h)=>{return{httpAuthSchemes:h.httpAuthSchemes(),httpAuthSchemeProvider:h.httpAuthSchemeProvider(),credentials:h.credentials()}};var Sh=(h)=>h,E0=(h,w)=>{const l={...Sh(J0(h)),...Sh(H0(h)),...Sh(I0(h)),...Sh(G0(h))};return w.forEach((G)=>G.configure(l)),{...h,...D0(l),...m0(l),...S0(l),...d0(l)}};class L extends U0{constructor(...[h]){const w=w0(h||{}),l=ml(w),G=y0(l),d=$0(G),S=X0(d),I=k0(S),Q=Z0(I),z=Hl(Q),v=E0(z,h?.extensions||[]);super(v);this.config=v,this.middlewareStack.use(Q0(this.config)),this.middlewareStack.use(V0(this.config)),this.middlewareStack.use(Y0(this.config)),this.middlewareStack.use(K0(this.config)),this.middlewareStack.use(F0(this.config)),this.middlewareStack.use(B0(this.config)),this.middlewareStack.use(C.getHttpAuthSchemeEndpointRuleSetPlugin(this.config,{httpAuthSchemeParametersProvider:Il,identityProviderConfigProvider:async(n)=>new C.DefaultIdentityProviderConfig({"aws.auth#sigv4":n.credentials})})),this.middlewareStack.use(C.getHttpSigningPlugin(this.config))}destroy(){super.destroy()}}class Y extends P0{constructor(h){super(h);Object.setPrototypeOf(this,Y.prototype)}}class mh extends Y{constructor(h){super({name:"ExpiredTokenException",$fault:"client",...h});this.name="ExpiredTokenException",this.$fault="client",Object.setPrototypeOf(this,mh.prototype)}}class Jh extends Y{constructor(h){super({name:"MalformedPolicyDocumentException",$fault:"client",...h});this.name="MalformedPolicyDocumentException",this.$fault="client",Object.setPrototypeOf(this,Jh.prototype)}}class Dh extends Y{constructor(h){super({name:"PackedPolicyTooLargeException",$fault:"client",...h});this.name="PackedPolicyTooLargeException",this.$fault="client",Object.setPrototypeOf(this,Dh.prototype)}}class Eh extends Y{constructor(h){super({name:"RegionDisabledException",$fault:"client",...h});this.name="RegionDisabledException",this.$fault="client",Object.setPrototypeOf(this,Eh.prototype)}}class kh extends Y{constructor(h){super({name:"IDPRejectedClaimException",$fault:"client",...h});this.name="IDPRejectedClaimException",this.$fault="client",Object.setPrototypeOf(this,kh.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 Fh extends Y{constructor(h){super({name:"IDPCommunicationErrorException",$fault:"client",...h});this.name="IDPCommunicationErrorException",this.$fault="client",Object.setPrototypeOf(this,Fh.prototype)}}class Bh extends Y{constructor(h){super({name:"InvalidAuthorizationMessageException",$fault:"client",...h});this.name="InvalidAuthorizationMessageException",this.$fault="client",Object.setPrototypeOf(this,Bh.prototype)}}var o=(h)=>({...h,...h.SecretAccessKey&&{SecretAccessKey:Hh}}),v0=(h)=>({...h,...h.Credentials&&{Credentials:o(h.Credentials)}}),q0=(h)=>({...h,...h.SAMLAssertion&&{SAMLAssertion:Hh}}),z0=(h)=>({...h,...h.Credentials&&{Credentials:o(h.Credentials)}}),M0=(h)=>({...h,...h.WebIdentityToken&&{WebIdentityToken:Hh}}),N0=(h)=>({...h,...h.Credentials&&{Credentials:o(h.Credentials)}}),W0=(h)=>({...h,...h.Credentials&&{Credentials:o(h.Credentials)}}),T0=(h)=>({...h,...h.Credentials&&{Credentials:o(h.Credentials)}});var q=A(Gh(),1);var a0=async(h,w)=>{const l=a;let G;return G=b({...Pw(h,w),[r]:lG,[_]:s}),j(w,l,"/",void 0,G)},s0=async(h,w)=>{const l=a;let G;return G=b({...vw(h,w),[r]:wG,[_]:s}),j(w,l,"/",void 0,G)},r0=async(h,w)=>{const l=a;let G;return G=b({...qw(h,w),[r]:GG,[_]:s}),j(w,l,"/",void 0,G)},_0=async(h,w)=>{const l=a;let G;return G=b({...zw(h,w),[r]:dG,[_]:s}),j(w,l,"/",void 0,G)},b0=async(h,w)=>{const l=a;let G;return G=b({...Mw(h,w),[r]:IG,[_]:s}),j(w,l,"/",void 0,G)},f0=async(h,w)=>{const l=a;let G;return G=b({...Nw(h,w),[r]:SG,[_]:s}),j(w,l,"/",void 0,G)},C0=async(h,w)=>{const l=a;let G;return G=b({...Ww(h,w),[r]:HG,[_]:s}),j(w,l,"/",void 0,G)},O0=async(h,w)=>{const l=a;let G;return G=b({...Tw(h,w),[r]:mG,[_]:s}),j(w,l,"/",void 0,G)},g0=async(h,w)=>{if(h.statusCode>=300)return R(h,w);const l=await q.parseXmlBody(h.body,w);let G={};return G=sw(l.AssumeRoleResult,w),{$metadata:k(h),...G}},x0=async(h,w)=>{if(h.statusCode>=300)return R(h,w);const l=await q.parseXmlBody(h.body,w);let G={};return G=rw(l.AssumeRoleWithSAMLResult,w),{$metadata:k(h),...G}},i0=async(h,w)=>{if(h.statusCode>=300)return R(h,w);const l=await q.parseXmlBody(h.body,w);let G={};return G=_w(l.AssumeRoleWithWebIdentityResult,w),{$metadata:k(h),...G}},c0=async(h,w)=>{if(h.statusCode>=300)return R(h,w);const l=await q.parseXmlBody(h.body,w);let G={};return G=bw(l.DecodeAuthorizationMessageResult,w),{$metadata:k(h),...G}},e0=async(h,w)=>{if(h.statusCode>=300)return R(h,w);const l=await q.parseXmlBody(h.body,w);let G={};return G=Ow(l.GetAccessKeyInfoResult,w),{$metadata:k(h),...G}},p0=async(h,w)=>{if(h.statusCode>=300)return R(h,w);const l=await q.parseXmlBody(h.body,w);let G={};return G=gw(l.GetCallerIdentityResult,w),{$metadata:k(h),...G}},n0=async(h,w)=>{if(h.statusCode>=300)return R(h,w);const l=await q.parseXmlBody(h.body,w);let G={};return G=xw(l.GetFederationTokenResult,w),{$metadata:k(h),...G}},o0=async(h,w)=>{if(h.statusCode>=300)return R(h,w);const l=await q.parseXmlBody(h.body,w);let G={};return G=iw(l.GetSessionTokenResult,w),{$metadata:k(h),...G}},R=async(h,w)=>{const l={...h,body:await q.parseXmlErrorBody(h.body,w)},G=JG(h,l.body);switch(G){case"ExpiredTokenException":case"com.amazonaws.sts#ExpiredTokenException":throw await Uw(l,w);case"MalformedPolicyDocument":case"com.amazonaws.sts#MalformedPolicyDocumentException":throw await Zw(l,w);case"PackedPolicyTooLarge":case"com.amazonaws.sts#PackedPolicyTooLargeException":throw await $w(l,w);case"RegionDisabledException":case"com.amazonaws.sts#RegionDisabledException":throw await Vw(l,w);case"IDPRejectedClaim":case"com.amazonaws.sts#IDPRejectedClaimException":throw await Qw(l,w);case"InvalidIdentityToken":case"com.amazonaws.sts#InvalidIdentityTokenException":throw await Yw(l,w);case"IDPCommunicationError":case"com.amazonaws.sts#IDPCommunicationErrorException":throw await yw(l,w);case"InvalidAuthorizationMessageException":case"com.amazonaws.sts#InvalidAuthorizationMessageException":throw await Xw(l,w);default:const d=l.body;return hG({output:h,parsedBody:d.Error,errorCode:G})}},Uw=async(h,w)=>{const l=h.body,G=fw(l.Error,w),d=new mh({$metadata:k(h),...G});return T(d,l)},yw=async(h,w)=>{const l=h.body,G=cw(l.Error,w),d=new Fh({$metadata:k(h),...G});return T(d,l)},Qw=async(h,w)=>{const l=h.body,G=ew(l.Error,w),d=new kh({$metadata:k(h),...G});return T(d,l)},Xw=async(h,w)=>{const l=h.body,G=pw(l.Error,w),d=new Bh({$metadata:k(h),...G});return T(d,l)},Yw=async(h,w)=>{const l=h.body,G=nw(l.Error,w),d=new Kh({$metadata:k(h),...G});return T(d,l)},Zw=async(h,w)=>{const l=h.body,G=ow(l.Error,w),d=new Jh({$metadata:k(h),...G});return T(d,l)},$w=async(h,w)=>{const l=h.body,G=uw(l.Error,w),d=new Dh({$metadata:k(h),...G});return T(d,l)},Vw=async(h,w)=>{const l=h.body,G=tw(l.Error,w),d=new Eh({$metadata:k(h),...G});return T(d,l)},Pw=(h,w)=>{const l={};if(h[W]!=null)l[W]=h[W];if(h[i]!=null)l[i]=h[i];if(h[$]!=null){const G=Uh(h[$],w);if(h[$]?.length===0)l.PolicyArns=[];Object.entries(G).forEach(([d,S])=>{const I=`PolicyArns.${d}`;l[I]=S})}if(h[Z]!=null)l[Z]=h[Z];if(h[y]!=null)l[y]=h[y];if(h[e]!=null){const G=u0(h[e],w);if(h[e]?.length===0)l.Tags=[];Object.entries(G).forEach(([d,S])=>{const I=`Tags.${d}`;l[I]=S})}if(h[gh]!=null){const G=aw(h[gh],w);if(h[gh]?.length===0)l.TransitiveTagKeys=[];Object.entries(G).forEach(([d,S])=>{const I=`TransitiveTagKeys.${d}`;l[I]=S})}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[P]!=null)l[P]=h[P];if(h[jh]!=null){const G=Rw(h[jh],w);if(h[jh]?.length===0)l.ProvidedContexts=[];Object.entries(G).forEach(([d,S])=>{const I=`ProvidedContexts.${d}`;l[I]=S})}return l},vw=(h,w)=>{const l={};if(h[W]!=null)l[W]=h[W];if(h[Lh]!=null)l[Lh]=h[Lh];if(h[bh]!=null)l[bh]=h[bh];if(h[$]!=null){const G=Uh(h[$],w);if(h[$]?.length===0)l.PolicyArns=[];Object.entries(G).forEach(([d,S])=>{const I=`PolicyArns.${d}`;l[I]=S})}if(h[Z]!=null)l[Z]=h[Z];if(h[y]!=null)l[y]=h[y];return l},qw=(h,w)=>{const l={};if(h[W]!=null)l[W]=h[W];if(h[i]!=null)l[i]=h[i];if(h[ch]!=null)l[ch]=h[ch];if(h[ah]!=null)l[ah]=h[ah];if(h[$]!=null){const G=Uh(h[$],w);if(h[$]?.length===0)l.PolicyArns=[];Object.entries(G).forEach(([d,S])=>{const I=`PolicyArns.${d}`;l[I]=S})}if(h[Z]!=null)l[Z]=h[Z];if(h[y]!=null)l[y]=h[y];return l},zw=(h,w)=>{const l={};if(h[qh]!=null)l[qh]=h[qh];return l},Mw=(h,w)=>{const l={};if(h[O]!=null)l[O]=h[O];return l},Nw=(h,w)=>{return{}},Ww=(h,w)=>{const l={};if(h[Th]!=null)l[Th]=h[Th];if(h[Z]!=null)l[Z]=h[Z];if(h[$]!=null){const G=Uh(h[$],w);if(h[$]?.length===0)l.PolicyArns=[];Object.entries(G).forEach(([d,S])=>{const I=`PolicyArns.${d}`;l[I]=S})}if(h[y]!=null)l[y]=h[y];if(h[e]!=null){const G=u0(h[e],w);if(h[e]?.length===0)l.Tags=[];Object.entries(G).forEach(([d,S])=>{const I=`Tags.${d}`;l[I]=S})}return l},Tw=(h,w)=>{const l={};if(h[y]!=null)l[y]=h[y];if(h[c]!=null)l[c]=h[c];if(h[p]!=null)l[p]=h[p];return l},Uh=(h,w)=>{const l={};let G=1;for(let d of h){if(d===null)continue;const S=Aw(d,w);Object.entries(S).forEach(([I,Q])=>{l[`member.${G}.${I}`]=Q}),G++}return l},Aw=(h,w)=>{const l={};if(h[eh]!=null)l[eh]=h[eh];return l},Lw=(h,w)=>{const l={};if(h[Rh]!=null)l[Rh]=h[Rh];if(h[$h]!=null)l[$h]=h[$h];return l},Rw=(h,w)=>{const l={};let G=1;for(let d of h){if(d===null)continue;const S=Lw(d,w);Object.entries(S).forEach(([I,Q])=>{l[`member.${G}.${I}`]=Q}),G++}return l},jw=(h,w)=>{const l={};if(h[Wh]!=null)l[Wh]=h[Wh];if(h[ih]!=null)l[ih]=h[ih];return l},aw=(h,w)=>{const l={};let G=1;for(let d of h){if(d===null)continue;l[`member.${G}`]=d,G++}return l},u0=(h,w)=>{const l={};let G=1;for(let d of h){if(d===null)continue;const S=jw(d,w);Object.entries(S).forEach(([I,Q])=>{l[`member.${G}.${I}`]=Q}),G++}return l},nh=(h,w)=>{const l={};if(h[Zh]!=null)l[Zh]=H(h[Zh]);if(h[N]!=null)l[N]=H(h[N]);return l},sw=(h,w)=>{const l={};if(h[U]!=null)l[U]=t(h[U],w);if(h[M]!=null)l[M]=nh(h[M],w);if(h[V]!=null)l[V]=u(h[V]);if(h[P]!=null)l[P]=H(h[P]);return l},rw=(h,w)=>{const l={};if(h[U]!=null)l[U]=t(h[U],w);if(h[M]!=null)l[M]=nh(h[M],w);if(h[V]!=null)l[V]=u(h[V]);if(h[rh]!=null)l[rh]=H(h[rh]);if(h[Ch]!=null)l[Ch]=H(h[Ch]);if(h[Nh]!=null)l[Nh]=H(h[Nh]);if(h[x]!=null)l[x]=H(h[x]);if(h[Ah]!=null)l[Ah]=H(h[Ah]);if(h[P]!=null)l[P]=H(h[P]);return l},_w=(h,w)=>{const l={};if(h[U]!=null)l[U]=t(h[U],w);if(h[fh]!=null)l[fh]=H(h[fh]);if(h[M]!=null)l[M]=nh(h[M],w);if(h[V]!=null)l[V]=u(h[V]);if(h[sh]!=null)l[sh]=H(h[sh]);if(h[x]!=null)l[x]=H(h[x]);if(h[P]!=null)l[P]=H(h[P]);return l},t=(h,w)=>{const l={};if(h[O]!=null)l[O]=H(h[O]);if(h[_h]!=null)l[_h]=H(h[_h]);if(h[Oh]!=null)l[Oh]=H(h[Oh]);if(h[Ph]!=null)l[Ph]=L0(R0(h[Ph]));return l},bw=(h,w)=>{const l={};if(h[Vh]!=null)l[Vh]=H(h[Vh]);return l},fw=(h,w)=>{const l={};if(h[m]!=null)l[m]=H(h[m]);return l},Cw=(h,w)=>{const l={};if(h[Mh]!=null)l[Mh]=H(h[Mh]);if(h[N]!=null)l[N]=H(h[N]);return l},Ow=(h,w)=>{const l={};if(h[g]!=null)l[g]=H(h[g]);return l},gw=(h,w)=>{const l={};if(h[xh]!=null)l[xh]=H(h[xh]);if(h[g]!=null)l[g]=H(h[g]);if(h[N]!=null)l[N]=H(h[N]);return l},xw=(h,w)=>{const l={};if(h[U]!=null)l[U]=t(h[U],w);if(h[zh]!=null)l[zh]=Cw(h[zh],w);if(h[V]!=null)l[V]=u(h[V]);return l},iw=(h,w)=>{const l={};if(h[U]!=null)l[U]=t(h[U],w);return l},cw=(h,w)=>{const l={};if(h[m]!=null)l[m]=H(h[m]);return l},ew=(h,w)=>{const l={};if(h[m]!=null)l[m]=H(h[m]);return l},pw=(h,w)=>{const l={};if(h[m]!=null)l[m]=H(h[m]);return l},nw=(h,w)=>{const l={};if(h[m]!=null)l[m]=H(h[m]);return l},ow=(h,w)=>{const l={};if(h[m]!=null)l[m]=H(h[m]);return l},uw=(h,w)=>{const l={};if(h[m]!=null)l[m]=H(h[m]);return l},tw=(h,w)=>{const l={};if(h[m]!=null)l[m]=H(h[m]);return l},k=(h)=>({httpStatusCode:h.statusCode,requestId:h.headers["x-amzn-requestid"]??h.headers["x-amzn-request-id"]??h.headers["x-amz-request-id"],extendedRequestId:h.headers["x-amz-id-2"],cfId:h.headers["x-amz-cf-id"]});var hG=j0(Y),j=async(h,w,l,G,d)=>{const{hostname:S,protocol:I="https",port:Q,path:z}=await h.endpoint(),v={protocol:I,hostname:S,port:Q,method:"POST",path:z.endsWith("/")?z.slice(0,-1)+l:z+l,headers:w};if(G!==void 0)v.hostname=G;if(d!==void 0)v.body=d;return new A0(v)},a={"content-type":"application/x-www-form-urlencoded"},s="2011-06-15",r="Action",O="AccessKeyId",lG="AssumeRole",Zh="AssumedRoleId",M="AssumedRoleUser",wG="AssumeRoleWithSAML",GG="AssumeRoleWithWebIdentity",g="Account",N="Arn",x="Audience",U="Credentials",$h="ContextAssertion",dG="DecodeAuthorizationMessage",Vh="DecodedMessage",y="DurationSeconds",Ph="Expiration",vh="ExternalId",qh="EncodedMessage",zh="FederatedUser",Mh="FederatedUserId",IG="GetAccessKeyInfo",SG="GetCallerIdentity",HG="GetFederationToken",mG="GetSessionToken",Nh="Issuer",Wh="Key",Th="Name",Ah="NameQualifier",Z="Policy",$="PolicyArns",Lh="PrincipalArn",Rh="ProviderArn",jh="ProvidedContexts",ah="ProviderId",V="PackedPolicySize",sh="Provider",W="RoleArn",i="RoleSessionName",rh="Subject",_h="SecretAccessKey",bh="SAMLAssertion",fh="SubjectFromWebIdentityToken",P="SourceIdentity",c="SerialNumber",Ch="SubjectType",Oh="SessionToken",e="Tags",p="TokenCode",gh="TransitiveTagKeys",xh="UserId",_="Version",ih="Value",ch="WebIdentityToken",eh="arn",m="message",b=(h)=>Object.entries(h).map(([w,l])=>ph(w)+"="+ph(l)).join("&"),JG=(h,w)=>{if(w.Error?.Code!==void 0)return w.Error.Code;if(h.statusCode==404)return"NotFound"};class hh extends K.classBuilder().ep(D).m(function(h,w,l,G){return[F(l,this.serialize,this.deserialize),B(l,h.getEndpointParameterInstructions())]}).s("AWSSecurityTokenServiceV20110615","AssumeRole",{}).n("STSClient","AssumeRoleCommand").f(void 0,v0).ser(a0).de(g0).build(){}class oh extends K.classBuilder().ep(D).m(function(h,w,l,G){return[F(l,this.serialize,this.deserialize),B(l,h.getEndpointParameterInstructions())]}).s("AWSSecurityTokenServiceV20110615","AssumeRoleWithSAML",{}).n("STSClient","AssumeRoleWithSAMLCommand").f(q0,z0).ser(s0).de(x0).build(){}class lh extends K.classBuilder().ep(D).m(function(h,w,l,G){return[F(l,this.serialize,this.deserialize),B(l,h.getEndpointParameterInstructions())]}).s("AWSSecurityTokenServiceV20110615","AssumeRoleWithWebIdentity",{}).n("STSClient","AssumeRoleWithWebIdentityCommand").f(M0,N0).ser(r0).de(i0).build(){}class uh extends K.classBuilder().ep(D).m(function(h,w,l,G){return[F(l,this.serialize,this.deserialize),B(l,h.getEndpointParameterInstructions())]}).s("AWSSecurityTokenServiceV20110615","DecodeAuthorizationMessage",{}).n("STSClient","DecodeAuthorizationMessageCommand").f(void 0,void 0).ser(_0).de(c0).build(){}class th extends K.classBuilder().ep(D).m(function(h,w,l,G){return[F(l,this.serialize,this.deserialize),B(l,h.getEndpointParameterInstructions())]}).s("AWSSecurityTokenServiceV20110615","GetAccessKeyInfo",{}).n("STSClient","GetAccessKeyInfoCommand").f(void 0,void 0).ser(b0).de(e0).build(){}class hl extends K.classBuilder().ep(D).m(function(h,w,l,G){return[F(l,this.serialize,this.deserialize),B(l,h.getEndpointParameterInstructions())]}).s("AWSSecurityTokenServiceV20110615","GetCallerIdentity",{}).n("STSClient","GetCallerIdentityCommand").f(void 0,void 0).ser(f0).de(p0).build(){}class ll extends K.classBuilder().ep(D).m(function(h,w,l,G){return[F(l,this.serialize,this.deserialize),B(l,h.getEndpointParameterInstructions())]}).s("AWSSecurityTokenServiceV20110615","GetFederationToken",{}).n("STSClient","GetFederationTokenCommand").f(void 0,W0).ser(C0).de(n0).build(){}class wl extends K.classBuilder().ep(D).m(function(h,w,l,G){return[F(l,this.serialize,this.deserialize),B(l,h.getEndpointParameterInstructions())]}).s("AWSSecurityTokenServiceV20110615","GetSessionToken",{}).n("STSClient","GetSessionTokenCommand").f(void 0,T0).ser(O0).de(o0).build(){}var DG={AssumeRoleCommand:hh,AssumeRoleWithSAMLCommand:oh,AssumeRoleWithWebIdentityCommand:lh,DecodeAuthorizationMessageCommand:uh,GetAccessKeyInfoCommand:th,GetCallerIdentityCommand:hl,GetFederationTokenCommand:ll,GetSessionTokenCommand:wl};class hw extends L{}t0(DG,hw);var lw="us-east-1",ww=(h)=>{if(typeof h?.Arn==="string"){const w=h.Arn.split(":");if(w.length>4&&w[4]!=="")return w[4]}return},Gw=async(h,w,l)=>{const G=typeof h==="function"?await h():h,d=typeof w==="function"?await w():w;return l?.debug?.("@aws-sdk/client-sts::resolveRegion","accepting first of:",`${G} (provider)`,`${d} (parent client)`,`${lw} (STS default)`),G??d??lw},dw=(h,w)=>{let l,G;return async(d,S)=>{if(G=d,!l){const{logger:v=h?.parentClientConfig?.logger,region:n,requestHandler:wh=h?.parentClientConfig?.requestHandler,credentialProviderLogger:yh}=h,mw=await Gw(n,h?.parentClientConfig?.region,yh),Jw=!Sw(wh);l=new w({credentialDefaultProvider:()=>async()=>G,region:mw,requestHandler:Jw?wh:void 0,logger:v})}const{Credentials:I,AssumedRoleUser:Q}=await l.send(new hh(S));if(!I||!I.AccessKeyId||!I.SecretAccessKey)throw new Error(`Invalid response from STS.assumeRole call with role ${S.RoleArn}`);const z=ww(Q);return{accessKeyId:I.AccessKeyId,secretAccessKey:I.SecretAccessKey,sessionToken:I.SessionToken,expiration:I.Expiration,...I.CredentialScope&&{credentialScope:I.CredentialScope},...z&&{accountId:z}}}},Iw=(h,w)=>{let l;return async(G)=>{if(!l){const{logger:Q=h?.parentClientConfig?.logger,region:z,requestHandler:v=h?.parentClientConfig?.requestHandler,credentialProviderLogger:n}=h,wh=await Gw(z,h?.parentClientConfig?.region,n),yh=!Sw(v);l=new w({region:wh,requestHandler:yh?v:void 0,logger:Q})}const{Credentials:d,AssumedRoleUser:S}=await l.send(new lh(G));if(!d||!d.AccessKeyId||!d.SecretAccessKey)throw new Error(`Invalid response from STS.assumeRoleWithWebIdentity call with role ${G.RoleArn}`);const I=ww(S);return{accessKeyId:d.AccessKeyId,secretAccessKey:d.SecretAccessKey,sessionToken:d.SessionToken,expiration:d.Expiration,...d.CredentialScope&&{credentialScope:d.CredentialScope},...I&&{accountId:I}}}};var Sw=(h)=>{return h?.metadata?.handlerProtocol==="h2"};var Hw=(h,w)=>{if(!w)return h;else return class l extends h{constructor(G){super(G);for(let d of w)this.middlewareStack.use(d)}}},EG=(h={},w)=>dw(h,Hw(L,w)),kG=(h={},w)=>Iw(h,Hw(L,w)),aI=(h)=>(w)=>h({roleAssumer:EG(w),roleAssumerWithWebIdentity:kG(w),...w});export{kG as getDefaultRoleAssumerWithWebIdentity,EG as getDefaultRoleAssumer,aI as decorateDefaultCredentialProvider,U0 as __Client,Y as STSServiceException,L as STSClient,hw as STS,Eh as RegionDisabledException,Dh as PackedPolicyTooLargeException,Jh as MalformedPolicyDocumentException,Kh as InvalidIdentityTokenException,Bh as InvalidAuthorizationMessageException,kh as IDPRejectedClaimException,Fh as IDPCommunicationErrorException,T0 as GetSessionTokenResponseFilterSensitiveLog,wl as GetSessionTokenCommand,W0 as GetFederationTokenResponseFilterSensitiveLog,ll as GetFederationTokenCommand,hl as GetCallerIdentityCommand,th as GetAccessKeyInfoCommand,mh as ExpiredTokenException,uh as DecodeAuthorizationMessageCommand,o as CredentialsFilterSensitiveLog,N0 as AssumeRoleWithWebIdentityResponseFilterSensitiveLog,M0 as AssumeRoleWithWebIdentityRequestFilterSensitiveLog,lh as AssumeRoleWithWebIdentityCommand,z0 as AssumeRoleWithSAMLResponseFilterSensitiveLog,q0 as AssumeRoleWithSAMLRequestFilterSensitiveLog,oh as AssumeRoleWithSAMLCommand,v0 as AssumeRoleResponseFilterSensitiveLog,hh as AssumeRoleCommand,K as $Command};
|