@stacksjs/buddy 0.64.1 → 0.64.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunk-0bcq9pbj.js +5 -0
- package/dist/{chunk-h3ygxbt8.js.map → chunk-0bcq9pbj.js.map} +2 -2
- package/dist/{chunk-wrrrgt8g.js → chunk-1mphypxn.js} +3 -3
- package/dist/{chunk-wrrrgt8g.js.map → chunk-1mphypxn.js.map} +1 -1
- package/dist/{chunk-8enz17vb.js → chunk-59vbpar7.js} +3 -3
- package/dist/{chunk-8enz17vb.js.map → chunk-59vbpar7.js.map} +1 -1
- package/dist/{chunk-m4ha2b7x.js → chunk-5bf9sq7t.js} +3 -3
- package/dist/{chunk-m4ha2b7x.js.map → chunk-5bf9sq7t.js.map} +1 -1
- package/dist/chunk-a1sxtbv1.js +5 -0
- package/dist/{chunk-57yy5xcz.js.map → chunk-a1sxtbv1.js.map} +2 -2
- package/dist/chunk-a6jhzhht.js +6 -0
- package/dist/{chunk-vv8b2cgh.js.map → chunk-a6jhzhht.js.map} +13 -4
- package/dist/{chunk-1b3vtfck.js → chunk-ac1gbd0g.js} +4 -4
- package/dist/{chunk-1b3vtfck.js.map → chunk-ac1gbd0g.js.map} +1 -1
- package/dist/{chunk-9ttt4yty.js → chunk-agapayce.js} +3 -3
- package/dist/{chunk-9ttt4yty.js.map → chunk-agapayce.js.map} +1 -1
- package/dist/{chunk-akm90kc0.js → chunk-cpn7yy6s.js} +3 -3
- package/dist/{chunk-akm90kc0.js.map → chunk-cpn7yy6s.js.map} +1 -1
- package/dist/{chunk-zw6qgfz1.js → chunk-gqfh2x89.js} +3 -3
- package/dist/{chunk-zw6qgfz1.js.map → chunk-gqfh2x89.js.map} +1 -1
- package/dist/{chunk-f0y6y2pa.js → chunk-nnneyqej.js} +3 -3
- package/dist/{chunk-f0y6y2pa.js.map → chunk-nnneyqej.js.map} +1 -1
- package/dist/chunk-nw65c3yh.js +5 -0
- package/dist/{chunk-agv26t9k.js.map → chunk-nw65c3yh.js.map} +2 -2
- package/dist/chunk-pf356ggx.js +7 -0
- package/dist/{chunk-q5cwemad.js.map → chunk-pf356ggx.js.map} +2 -2
- package/dist/{chunk-ahjtrjx9.js → chunk-pj6d7hvk.js} +3 -3
- package/dist/{chunk-ahjtrjx9.js.map → chunk-pj6d7hvk.js.map} +1 -1
- package/dist/{chunk-zj93wgdp.js → chunk-t49ytmk0.js} +3 -3
- package/dist/{chunk-zj93wgdp.js.map → chunk-t49ytmk0.js.map} +1 -1
- package/dist/chunk-v1w6bgfy.js +21 -0
- package/dist/{chunk-jj0rek44.js.map → chunk-v1w6bgfy.js.map} +6 -16
- package/dist/{chunk-h26ck86r.js → chunk-vc4pnt6y.js} +4 -4
- package/dist/{chunk-h26ck86r.js.map → chunk-vc4pnt6y.js.map} +1 -1
- package/dist/{chunk-qzys4y28.js → chunk-zpm61fm8.js} +3 -3
- package/dist/{chunk-qzys4y28.js.map → chunk-zpm61fm8.js.map} +1 -1
- package/dist/cli.js +1 -1
- package/dist/index.js +1 -1
- package/dist/stacks +0 -0
- package/package.json +1 -1
- package/dist/chunk-57yy5xcz.js +0 -5
- package/dist/chunk-agv26t9k.js +0 -5
- package/dist/chunk-h3ygxbt8.js +0 -5
- package/dist/chunk-jj0rek44.js +0 -21
- package/dist/chunk-q5cwemad.js +0 -7
- package/dist/chunk-vv8b2cgh.js +0 -6
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as $,b as w,c as z}from"./chunk-
|
|
1
|
+
import{a as $,b as w,c as z}from"./chunk-t49ytmk0.js";import{sb as q,ub as G,wb as Y}from"./chunk-agapayce.js";import{yb as Z}from"./chunk-59vbpar7.js";var H="AWS_EC2_METADATA_DISABLED",Q=async(b)=>{const{ENV_CMDS_FULL_URI:j,ENV_CMDS_RELATIVE_URI:x,fromContainerMetadata:y,fromInstanceMetadata:J}=await import("./chunk-zpm61fm8.js");if(process.env[x]||process.env[j]){b.logger?.debug("@aws-sdk/credential-provider-node - remoteProvider::fromHttp/fromContainerMetadata");const{fromHttp:K}=await import("./chunk-1mphypxn.js");return G(K(b),y(b))}if(process.env[H])return async()=>{throw new q("EC2 Instance Metadata Service access disabled",{logger:b.logger})};return b.logger?.debug("@aws-sdk/credential-provider-node - remoteProvider::fromInstanceMetadata"),J(b)};var X=!1,W=(b={})=>Y(G(async()=>{if(b.profile??process.env[Z]){if(process.env[$]&&process.env[w]){if(!X)(b.logger?.warn&&b.logger?.constructor?.name!=="NoOpLogger"?b.logger.warn:console.warn)(`@aws-sdk/credential-provider-node - defaultProvider::fromEnv WARNING:
|
|
2
2
|
Multiple credential sources detected:
|
|
3
3
|
Both AWS_PROFILE and the pair AWS_ACCESS_KEY_ID/AWS_SECRET_ACCESS_KEY static credentials are set.
|
|
4
4
|
This SDK will proceed with the AWS_PROFILE value.
|
|
@@ -6,7 +6,7 @@ import{a as $,b as w,c as z}from"./chunk-zj93wgdp.js";import{kb as q,mb as G,ob
|
|
|
6
6
|
However, a future version may change this behavior to prefer the ENV static credentials.
|
|
7
7
|
Please ensure that your environment only sets either the AWS_PROFILE or the
|
|
8
8
|
AWS_ACCESS_KEY_ID/AWS_SECRET_ACCESS_KEY pair.
|
|
9
|
-
`),X=!0}throw new q("AWS_PROFILE is set, skipping fromEnv provider.",{logger:b.logger,tryNextLink:!0})}return b.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromEnv"),z(b)()},async()=>{b.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromSSO");const{ssoStartUrl:j,ssoAccountId:x,ssoRegion:y,ssoRoleName:J,ssoSession:K}=b;if(!j&&!x&&!y&&!J&&!K)throw new q("Skipping SSO provider in default chain (inputs do not include SSO fields).",{logger:b.logger});const{fromSSO:B}=await import("./chunk-
|
|
9
|
+
`),X=!0}throw new q("AWS_PROFILE is set, skipping fromEnv provider.",{logger:b.logger,tryNextLink:!0})}return b.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromEnv"),z(b)()},async()=>{b.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromSSO");const{ssoStartUrl:j,ssoAccountId:x,ssoRegion:y,ssoRoleName:J,ssoSession:K}=b;if(!j&&!x&&!y&&!J&&!K)throw new q("Skipping SSO provider in default chain (inputs do not include SSO fields).",{logger:b.logger});const{fromSSO:B}=await import("./chunk-nnneyqej.js");return B(b)()},async()=>{b.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromIni");const{fromIni:j}=await import("./chunk-pj6d7hvk.js");return j(b)()},async()=>{b.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromProcess");const{fromProcess:j}=await import("./chunk-gqfh2x89.js");return j(b)()},async()=>{b.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromTokenFile");const{fromTokenFile:j}=await import("./chunk-cpn7yy6s.js");return j(b)()},async()=>{return b.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::remoteProvider"),(await Q(b))()},async()=>{throw new q("Could not load credentials from any providers",{tryNextLink:!1,logger:b.logger})}),v,k),k=(b)=>b?.expiration!==void 0,v=(b)=>b?.expiration!==void 0&&b.expiration.getTime()-Date.now()<300000;export{W as xb};
|
|
10
10
|
|
|
11
|
-
//# debugId=
|
|
12
|
-
//# sourceMappingURL=chunk-
|
|
11
|
+
//# debugId=306C2219024B958364756E2164756E21
|
|
12
|
+
//# sourceMappingURL=chunk-vc4pnt6y.js.map
|
|
@@ -6,6 +6,6 @@
|
|
|
6
6
|
"import { ENV_KEY, ENV_SECRET, fromEnv } from \"@aws-sdk/credential-provider-env\";\nimport { chain, CredentialsProviderError, memoize } from \"@smithy/property-provider\";\nimport { ENV_PROFILE } from \"@smithy/shared-ini-file-loader\";\nimport { remoteProvider } from \"./remoteProvider\";\nlet multipleCredentialSourceWarningEmitted = false;\nexport const defaultProvider = (init = {}) => memoize(chain(async () => {\n const profile = init.profile ?? process.env[ENV_PROFILE];\n if (profile) {\n const envStaticCredentialsAreSet = process.env[ENV_KEY] && process.env[ENV_SECRET];\n if (envStaticCredentialsAreSet) {\n if (!multipleCredentialSourceWarningEmitted) {\n const warnFn = init.logger?.warn && init.logger?.constructor?.name !== \"NoOpLogger\" ? init.logger.warn : console.warn;\n warnFn(`@aws-sdk/credential-provider-node - defaultProvider::fromEnv WARNING:\n Multiple credential sources detected: \n Both AWS_PROFILE and the pair AWS_ACCESS_KEY_ID/AWS_SECRET_ACCESS_KEY static credentials are set.\n This SDK will proceed with the AWS_PROFILE value.\n \n However, a future version may change this behavior to prefer the ENV static credentials.\n Please ensure that your environment only sets either the AWS_PROFILE or the\n AWS_ACCESS_KEY_ID/AWS_SECRET_ACCESS_KEY pair.\n`);\n multipleCredentialSourceWarningEmitted = true;\n }\n }\n throw new CredentialsProviderError(\"AWS_PROFILE is set, skipping fromEnv provider.\", {\n logger: init.logger,\n tryNextLink: true,\n });\n }\n init.logger?.debug(\"@aws-sdk/credential-provider-node - defaultProvider::fromEnv\");\n return fromEnv(init)();\n}, async () => {\n init.logger?.debug(\"@aws-sdk/credential-provider-node - defaultProvider::fromSSO\");\n const { ssoStartUrl, ssoAccountId, ssoRegion, ssoRoleName, ssoSession } = init;\n if (!ssoStartUrl && !ssoAccountId && !ssoRegion && !ssoRoleName && !ssoSession) {\n throw new CredentialsProviderError(\"Skipping SSO provider in default chain (inputs do not include SSO fields).\", { logger: init.logger });\n }\n const { fromSSO } = await import(\"@aws-sdk/credential-provider-sso\");\n return fromSSO(init)();\n}, async () => {\n init.logger?.debug(\"@aws-sdk/credential-provider-node - defaultProvider::fromIni\");\n const { fromIni } = await import(\"@aws-sdk/credential-provider-ini\");\n return fromIni(init)();\n}, async () => {\n init.logger?.debug(\"@aws-sdk/credential-provider-node - defaultProvider::fromProcess\");\n const { fromProcess } = await import(\"@aws-sdk/credential-provider-process\");\n return fromProcess(init)();\n}, async () => {\n init.logger?.debug(\"@aws-sdk/credential-provider-node - defaultProvider::fromTokenFile\");\n const { fromTokenFile } = await import(\"@aws-sdk/credential-provider-web-identity\");\n return fromTokenFile(init)();\n}, async () => {\n init.logger?.debug(\"@aws-sdk/credential-provider-node - defaultProvider::remoteProvider\");\n return (await remoteProvider(init))();\n}, async () => {\n throw new CredentialsProviderError(\"Could not load credentials from any providers\", {\n tryNextLink: false,\n logger: init.logger,\n });\n}), credentialsTreatedAsExpired, credentialsWillNeedRefresh);\nexport const credentialsWillNeedRefresh = (credentials) => credentials?.expiration !== undefined;\nexport const credentialsTreatedAsExpired = (credentials) => credentials?.expiration !== undefined && credentials.expiration.getTime() - Date.now() < 300000;\n"
|
|
7
7
|
],
|
|
8
8
|
"mappings": "oKACO,FAAM,JAAoB,4BACpB,EAAiB,MAAO,IAAS,CAC1C,MAAQ,oBAAmB,wBAAuB,wBAAuB,wBAAyB,KAAa,+BAC/G,GAAI,QAAQ,IAAI,IAA0B,QAAQ,IAAI,GAAoB,CACtE,EAAK,QAAQ,MAAM,oFAAoF,EACvG,MAAQ,YAAa,KAAa,+BAClC,OAAO,EAAM,EAAS,CAAI,EAAG,EAAsB,CAAI,CAAC,EAE5D,GAAI,QAAQ,IAAI,GACZ,MAAO,UAAY,CACf,MAAM,IAAI,EAAyB,gDAAiD,CAAE,OAAQ,EAAK,MAAO,CAAC,GAInH,OADA,EAAK,QAAQ,MAAM,0EAA0E,EACtF,EAAqB,CAAI,GCXpC,IAAI,EAAyC,GAChC,EAAkB,CAAC,EAAO,CAAC,IAAM,EAAQ,EAAM,SAAY,CAEpE,GADgB,EAAK,SAAW,QAAQ,IAAI,GAC/B,CAET,GADmC,QAAQ,IAAI,IAAY,QAAQ,IAAI,IAEnE,IAAK,EAED,CADe,EAAK,QAAQ,MAAQ,EAAK,QAAQ,aAAa,OAAS,aAAe,EAAK,OAAO,KAAO,QAAQ,MAC1G;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,CAQtB,EACe,EAAyC,GAGjD,MAAM,IAAI,EAAyB,iDAAkD,CACjF,OAAQ,EAAK,OACb,YAAa,EACjB,CAAC,EAGL,OADA,EAAK,QAAQ,MAAM,8DAA8D,EAC1E,EAAQ,CAAI,EAAE,GACtB,SAAY,CACX,EAAK,QAAQ,MAAM,8DAA8D,EACjF,MAAQ,cAAa,eAAc,YAAW,cAAa,cAAe,EAC1E,IAAK,IAAgB,IAAiB,IAAc,IAAgB,EAChE,MAAM,IAAI,EAAyB,6EAA8E,CAAE,OAAQ,EAAK,MAAO,CAAC,EAE5I,MAAQ,WAAY,KAAa,+BACjC,OAAO,EAAQ,CAAI,EAAE,GACtB,SAAY,CACX,EAAK,QAAQ,MAAM,8DAA8D,EACjF,MAAQ,WAAY,KAAa,+BACjC,OAAO,EAAQ,CAAI,EAAE,GACtB,SAAY,CACX,EAAK,QAAQ,MAAM,kEAAkE,EACrF,MAAQ,eAAgB,KAAa,+BACrC,OAAO,EAAY,CAAI,EAAE,GAC1B,SAAY,CACX,EAAK,QAAQ,MAAM,oEAAoE,EACvF,MAAQ,iBAAkB,KAAa,+BACvC,OAAO,EAAc,CAAI,EAAE,GAC5B,SAAY,CAEX,OADA,EAAK,QAAQ,MAAM,qEAAqE,GAChF,MAAM,EAAe,CAAI,GAAG,GACrC,SAAY,CACX,MAAM,IAAI,EAAyB,gDAAiD,CAChF,YAAa,GACb,OAAQ,EAAK,MACjB,CAAC,EACJ,EAAG,EAA6B,CAA0B,EAC9C,EAA6B,CAAC,IAAgB,GAAa,aAAe,OAC1E,EAA8B,CAAC,IAAgB,GAAa,aAAe,QAAa,EAAY,WAAW,QAAQ,EAAI,KAAK,IAAI,EAAI",
|
|
9
|
-
"debugId": "
|
|
9
|
+
"debugId": "306C2219024B958364756E2164756E21",
|
|
10
10
|
"names": []
|
|
11
11
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import"./chunk-wmfxrbxe.js";import"./chunk-
|
|
2
|
+
import"./chunk-wmfxrbxe.js";import"./chunk-5bf9sq7t.js";import{pb as z,qb as B}from"./chunk-ac1gbd0g.js";import{rb as K,sb as y}from"./chunk-agapayce.js";import"./chunk-59vbpar7.js";import{parse as p}from"url";import{Buffer as M}from"buffer";import{request as k}from"http";function E(c){return new Promise((I,x)=>{const T=k({method:"GET",...c,hostname:c.hostname?.replace(/^\[(.+)\]$/,"$1")});T.on("error",(N)=>{x(Object.assign(new K("Unable to connect to instance metadata service"),N)),T.destroy()}),T.on("timeout",()=>{x(new K("TimeoutError from instance metadata service")),T.destroy()}),T.on("response",(N)=>{const{statusCode:O=400}=N;if(O<200||300<=O)x(Object.assign(new K("Error response received from instance metadata service"),{statusCode:O})),T.destroy();const $=[];N.on("data",(w)=>{$.push(w)}),N.on("end",()=>{I(M.concat($)),T.destroy()})}),T.end()})}var _=(c)=>Boolean(c)&&typeof c==="object"&&typeof c.AccessKeyId==="string"&&typeof c.SecretAccessKey==="string"&&typeof c.Token==="string"&&typeof c.Expiration==="string",D=(c)=>({accessKeyId:c.AccessKeyId,secretAccessKey:c.SecretAccessKey,sessionToken:c.Token,expiration:new Date(c.Expiration),...c.AccountId&&{accountId:c.AccountId}});var hc=1000,Yc=0,G=({maxRetries:c=0,timeout:I=1000})=>({maxRetries:c,timeout:I});var m=(c,I)=>{let x=c();for(let T=0;T<I;T++)x=x.catch(c);return x};var X="AWS_CONTAINER_CREDENTIALS_FULL_URI",Z="AWS_CONTAINER_CREDENTIALS_RELATIVE_URI",b="AWS_CONTAINER_AUTHORIZATION_TOKEN",mc=(c={})=>{const{timeout:I,maxRetries:x}=G(c);return()=>m(async()=>{const T=await s({logger:c.logger}),N=JSON.parse(await C(I,T));if(!_(N))throw new y("Invalid response received from instance metadata service.",{logger:c.logger});return D(N)},x)},C=async(c,I)=>{if(process.env[b])I.headers={...I.headers,Authorization:process.env[b]};return(await E({...I,timeout:c})).toString()},a="169.254.170.2",n={localhost:!0,"127.0.0.1":!0},o={"http:":!0,"https:":!0},s=async({logger:c})=>{if(process.env[Z])return{hostname:a,path:process.env[Z]};if(process.env[X]){const I=p(process.env[X]);if(!I.hostname||!(I.hostname in n))throw new y(`${I.hostname} is not a valid container metadata service hostname`,{tryNextLink:!1,logger:c});if(!I.protocol||!(I.protocol in o))throw new y(`${I.protocol} is not a valid container metadata service protocol`,{tryNextLink:!1,logger:c});return{...I,port:I.port?parseInt(I.port,10):void 0}}throw new y(`The container metadata credential provider cannot be used unless the ${Z} or ${X} environment variable is set`,{tryNextLink:!1,logger:c})};class Q extends y{constructor(c,I=!0){super(c,I);this.tryNextLink=I,this.name="InstanceMetadataV1FallbackError",Object.setPrototypeOf(this,Q.prototype)}}var J;(function(c){c.IPv4="http://169.254.169.254",c.IPv6="http://[fd00:ec2::254]"})(J||(J={}));var H={environmentVariableSelector:(c)=>c.AWS_EC2_METADATA_SERVICE_ENDPOINT,configFileSelector:(c)=>c.ec2_metadata_service_endpoint,default:void 0};var u;(function(c){c.IPv4="IPv4",c.IPv6="IPv6"})(u||(u={}));var g="AWS_EC2_METADATA_SERVICE_ENDPOINT_MODE",l="ec2_metadata_service_endpoint_mode",q={environmentVariableSelector:(c)=>c[g],configFileSelector:(c)=>c[l],default:u.IPv4};var v=async()=>B(await r()||await d()),r=async()=>z(H)(),d=async()=>{const c=await z(q)();switch(c){case u.IPv4:return J.IPv4;case u.IPv6:return J.IPv6;default:throw new Error(`Unsupported endpoint mode: ${c}. Select from ${Object.values(u)}`)}};var L=(c,I)=>{const x=300+Math.floor(Math.random()*300),T=new Date(Date.now()+x*1000);I.warn(`Attempting credential expiration extension due to a credential service availability issue. A refresh of these credentials will be attempted after ${new Date(T)}.\nFor more information, please visit: https://docs.aws.amazon.com/sdkref/latest/guide/feature-static-credentials.html`);const N=c.originalExpiration??c.expiration;return{...c,...N?{originalExpiration:N}:{},expiration:T}};var U=(c,I={})=>{const x=I?.logger||console;let T;return async()=>{let N;try{if(N=await c(),N.expiration&&N.expiration.getTime()<Date.now())N=L(N,x)}catch(O){if(T)x.warn("Credential renew failed: ",O),N=L(T,x);else throw O}return T=N,N}};var P="/latest/meta-data/iam/security-credentials/",e="/latest/api/token",W="AWS_EC2_METADATA_V1_DISABLED",t="ec2_metadata_v1_disabled",F="x-aws-ec2-metadata-token",oc=(c={})=>U(i(c),{logger:c.logger}),i=(c={})=>{let I=!1;const{logger:x,profile:T}=c,{timeout:N,maxRetries:O}=G(c),$=async(w,j)=>{if(I||j.headers?.[F]==null){let h=!1,Y=!1;const R=await z({environmentVariableSelector:(S)=>{const A=S[W];if(Y=!!A&&A!=="false",A===void 0)throw new y(`${W} not set in env, checking config file next.`,{logger:c.logger});return Y},configFileSelector:(S)=>{const A=S[t];return h=!!A&&A!=="false",h},default:!1},{profile:T})();if(c.ec2MetadataV1Disabled||R){const S=[];if(c.ec2MetadataV1Disabled)S.push("credential provider initialization (runtime option ec2MetadataV1Disabled)");if(h)S.push(`config file profile (${t})`);if(Y)S.push(`process environment variable (${W})`);throw new Q(`AWS EC2 Metadata v1 fallback has been blocked by AWS SDK configuration in the following: [${S.join(", ")}].`)}}const V=(await m(async()=>{let h;try{h=await Ic(j)}catch(Y){if(Y.statusCode===401)I=!1;throw Y}return h},w)).trim();return m(async()=>{let h;try{h=await Tc(V,j,c)}catch(Y){if(Y.statusCode===401)I=!1;throw Y}return h},w)};return async()=>{const w=await v();if(I)return x?.debug("AWS SDK Instance Metadata","using v1 fallback (no token fetch)"),$(O,{...w,timeout:N});else{let j;try{j=(await cc({...w,timeout:N})).toString()}catch(f){if(f?.statusCode===400)throw Object.assign(f,{message:"EC2 Metadata token request returned error"});else if(f.message==="TimeoutError"||[403,404,405].includes(f.statusCode))I=!0;return x?.debug("AWS SDK Instance Metadata","using v1 fallback (initial)"),$(O,{...w,timeout:N})}return $(O,{...w,headers:{[F]:j},timeout:N})}}},cc=async(c)=>E({...c,path:e,method:"PUT",headers:{"x-aws-ec2-metadata-token-ttl-seconds":"21600"}}),Ic=async(c)=>(await E({...c,path:P})).toString(),Tc=async(c,I,x)=>{const T=JSON.parse((await E({...I,path:P+c})).toString());if(!_(T))throw new y("Invalid response received from instance metadata service.",{logger:x.logger});return D(T)};export{G as providerConfigFromInit,E as httpRequest,v as getInstanceMetadataEndpoint,oc as fromInstanceMetadata,mc as fromContainerMetadata,J as Endpoint,Z as ENV_CMDS_RELATIVE_URI,X as ENV_CMDS_FULL_URI,b as ENV_CMDS_AUTH_TOKEN,hc as DEFAULT_TIMEOUT,Yc as DEFAULT_MAX_RETRIES};
|
|
3
3
|
|
|
4
|
-
//# debugId=
|
|
5
|
-
//# sourceMappingURL=chunk-
|
|
4
|
+
//# debugId=7D8D1113576B131264756E2164756E21
|
|
5
|
+
//# sourceMappingURL=chunk-zpm61fm8.js.map
|
|
@@ -18,6 +18,6 @@
|
|
|
18
18
|
"import { loadConfig } from \"@smithy/node-config-provider\";\nimport { CredentialsProviderError } from \"@smithy/property-provider\";\nimport { InstanceMetadataV1FallbackError } from \"./error/InstanceMetadataV1FallbackError\";\nimport { httpRequest } from \"./remoteProvider/httpRequest\";\nimport { fromImdsCredentials, isImdsCredentials } from \"./remoteProvider/ImdsCredentials\";\nimport { providerConfigFromInit } from \"./remoteProvider/RemoteProviderInit\";\nimport { retry } from \"./remoteProvider/retry\";\nimport { getInstanceMetadataEndpoint } from \"./utils/getInstanceMetadataEndpoint\";\nimport { staticStabilityProvider } from \"./utils/staticStabilityProvider\";\nconst IMDS_PATH = \"/latest/meta-data/iam/security-credentials/\";\nconst IMDS_TOKEN_PATH = \"/latest/api/token\";\nconst AWS_EC2_METADATA_V1_DISABLED = \"AWS_EC2_METADATA_V1_DISABLED\";\nconst PROFILE_AWS_EC2_METADATA_V1_DISABLED = \"ec2_metadata_v1_disabled\";\nconst X_AWS_EC2_METADATA_TOKEN = \"x-aws-ec2-metadata-token\";\nexport const fromInstanceMetadata = (init = {}) => staticStabilityProvider(getInstanceMetadataProvider(init), { logger: init.logger });\nconst getInstanceMetadataProvider = (init = {}) => {\n let disableFetchToken = false;\n const { logger, profile } = init;\n const { timeout, maxRetries } = providerConfigFromInit(init);\n const getCredentials = async (maxRetries, options) => {\n const isImdsV1Fallback = disableFetchToken || options.headers?.[X_AWS_EC2_METADATA_TOKEN] == null;\n if (isImdsV1Fallback) {\n let fallbackBlockedFromProfile = false;\n let fallbackBlockedFromProcessEnv = false;\n const configValue = await loadConfig({\n environmentVariableSelector: (env) => {\n const envValue = env[AWS_EC2_METADATA_V1_DISABLED];\n fallbackBlockedFromProcessEnv = !!envValue && envValue !== \"false\";\n if (envValue === undefined) {\n throw new CredentialsProviderError(`${AWS_EC2_METADATA_V1_DISABLED} not set in env, checking config file next.`, { logger: init.logger });\n }\n return fallbackBlockedFromProcessEnv;\n },\n configFileSelector: (profile) => {\n const profileValue = profile[PROFILE_AWS_EC2_METADATA_V1_DISABLED];\n fallbackBlockedFromProfile = !!profileValue && profileValue !== \"false\";\n return fallbackBlockedFromProfile;\n },\n default: false,\n }, {\n profile,\n })();\n if (init.ec2MetadataV1Disabled || configValue) {\n const causes = [];\n if (init.ec2MetadataV1Disabled)\n causes.push(\"credential provider initialization (runtime option ec2MetadataV1Disabled)\");\n if (fallbackBlockedFromProfile)\n causes.push(`config file profile (${PROFILE_AWS_EC2_METADATA_V1_DISABLED})`);\n if (fallbackBlockedFromProcessEnv)\n causes.push(`process environment variable (${AWS_EC2_METADATA_V1_DISABLED})`);\n throw new InstanceMetadataV1FallbackError(`AWS EC2 Metadata v1 fallback has been blocked by AWS SDK configuration in the following: [${causes.join(\", \")}].`);\n }\n }\n const imdsProfile = (await retry(async () => {\n let profile;\n try {\n profile = await getProfile(options);\n }\n catch (err) {\n if (err.statusCode === 401) {\n disableFetchToken = false;\n }\n throw err;\n }\n return profile;\n }, maxRetries)).trim();\n return retry(async () => {\n let creds;\n try {\n creds = await getCredentialsFromProfile(imdsProfile, options, init);\n }\n catch (err) {\n if (err.statusCode === 401) {\n disableFetchToken = false;\n }\n throw err;\n }\n return creds;\n }, maxRetries);\n };\n return async () => {\n const endpoint = await getInstanceMetadataEndpoint();\n if (disableFetchToken) {\n logger?.debug(\"AWS SDK Instance Metadata\", \"using v1 fallback (no token fetch)\");\n return getCredentials(maxRetries, { ...endpoint, timeout });\n }\n else {\n let token;\n try {\n token = (await getMetadataToken({ ...endpoint, timeout })).toString();\n }\n catch (error) {\n if (error?.statusCode === 400) {\n throw Object.assign(error, {\n message: \"EC2 Metadata token request returned error\",\n });\n }\n else if (error.message === \"TimeoutError\" || [403, 404, 405].includes(error.statusCode)) {\n disableFetchToken = true;\n }\n logger?.debug(\"AWS SDK Instance Metadata\", \"using v1 fallback (initial)\");\n return getCredentials(maxRetries, { ...endpoint, timeout });\n }\n return getCredentials(maxRetries, {\n ...endpoint,\n headers: {\n [X_AWS_EC2_METADATA_TOKEN]: token,\n },\n timeout,\n });\n }\n };\n};\nconst getMetadataToken = async (options) => httpRequest({\n ...options,\n path: IMDS_TOKEN_PATH,\n method: \"PUT\",\n headers: {\n \"x-aws-ec2-metadata-token-ttl-seconds\": \"21600\",\n },\n});\nconst getProfile = async (options) => (await httpRequest({ ...options, path: IMDS_PATH })).toString();\nconst getCredentialsFromProfile = async (profile, options, init) => {\n const credentialsResponse = JSON.parse((await httpRequest({\n ...options,\n path: IMDS_PATH + profile,\n })).toString());\n if (!isImdsCredentials(credentialsResponse)) {\n throw new CredentialsProviderError(\"Invalid response received from instance metadata service.\", {\n logger: init.logger,\n });\n }\n return fromImdsCredentials(credentialsResponse);\n};\n"
|
|
19
19
|
],
|
|
20
20
|
"mappings": "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",
|
|
21
|
-
"debugId": "
|
|
21
|
+
"debugId": "7D8D1113576B131264756E2164756E21",
|
|
22
22
|
"names": []
|
|
23
23
|
}
|
package/dist/cli.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import"./chunk-
|
|
2
|
+
import"./chunk-t49ytmk0.js";import{A,B as D,C as k,D as f,E as j,F as J,I,J as g,L as p,M as a,d as M,e as N,f as O,g as Q,h as R,i as S,k as T,l as U,n as V,o as W,p as X,q as Y,r as Z,s as _,t as $,u as x,v as z,w as C,x as F,y as P,z as h}from"./chunk-pf356ggx.js";import"./chunk-wmfxrbxe.js";import"./chunk-a6jhzhht.js";import"./chunk-v1w6bgfy.js";import"./chunk-5bf9sq7t.js";import"./chunk-ac1gbd0g.js";import"./chunk-agapayce.js";import"./chunk-vc4pnt6y.js";import"./chunk-59vbpar7.js";import w from"process";import{runAction as m}from"@stacksjs/actions";import{cli as n,log as v}from"@stacksjs/cli";import{Action as l}from"@stacksjs/enums";import{path as L}from"@stacksjs/path";import{fs as i}from"@stacksjs/storage";import{ensureProjectIsInitialized as c}from"@stacksjs/utils";async function t(){const q=n("buddy");if(J(q),z(q),await c())v.debug("Project is initialized");else{v.info("Your `APP_KEY` is not yet set"),v.info("Generating application key...");const B=await m(l.KeyGenerate);if(B.isErr())v.error("Failed to set random application key.",B.error),w.exit()}M(q),N(q),O(q),Q(q),R(q),S(q),U(q),V(q),T(q),W(q),h(q),D(q),X(q),Y(q),Z(q),x(q),_(q),$(q),C(q),F(q),P(q),k(q),f(q),j(q),J(q),I(q),g(q),a(q),A(q),p(q),await e(q),q.help(),q.parse()}async function e(q){const G=L.appPath("Commands"),B=i.readdirSync(G).filter((E)=>E.endsWith(".ts"));for(let E of B){const H=await import(`${G}/${E}`);if(typeof H.default==="function")H.default(q);else console.error(`Expected a default export function in ${E}, but got:`,H.default)}const K=await import(L.listenersPath("Console.ts"));if(typeof K.default==="function")K.default(q)}w.on("uncaughtException",(q)=>{v.debug("uncaughtException"),v.error(q),w.exit(1)});w.on("unhandledRejection",(q)=>{v.debug("unhandledRejection",q),v.error(q),w.exit(1)});await t();
|
|
3
3
|
|
|
4
4
|
//# debugId=98CD31F4F04EAB8C64756E2164756E21
|
|
5
5
|
//# sourceMappingURL=cli.js.map
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import"./chunk-
|
|
2
|
+
import"./chunk-t49ytmk0.js";import{A as z,B as A,C as B,D as C,E as D,F as E,G as F,H as G,I as H,J as I,K as J,L as K,M as L,d as e,e as f,f as m,g as p,h as t,i as x,j as a,k as b,l as c,m as d,n as g,o as h,p as i,q as j,r as k,s as l,t as n,u as q,v as s,w as u,x as v,y as w,z as y}from"./chunk-pf356ggx.js";import"./chunk-wmfxrbxe.js";import"./chunk-a6jhzhht.js";import"./chunk-v1w6bgfy.js";import"./chunk-5bf9sq7t.js";import"./chunk-ac1gbd0g.js";import"./chunk-agapayce.js";import"./chunk-vc4pnt6y.js";import"./chunk-59vbpar7.js";export{L as version,K as upgrade,J as types,I as tinker,H as test,d as startDevelopmentServer,E as setup,D as seed,C as route,B as release,A as projects,z as prepublish,y as ports,w as outdated,F as optimizePkgxDeps,v as migrate,u as make,n as list,l as lint,s as key,q as install,k as http,j as generate,i as fresh,G as ensureEnvIsSet,g as domains,h as dns,c as dev,b as deploy,a as create,x as configure,t as commit,p as cloud,m as clean,f as changelog,e as build};
|
|
3
3
|
|
|
4
4
|
//# debugId=5D1A1157F85CB69864756E2164756E21
|
|
5
5
|
//# sourceMappingURL=index.js.map
|
package/dist/stacks
CHANGED
|
Binary file
|
package/package.json
CHANGED
package/dist/chunk-57yy5xcz.js
DELETED
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import"./chunk-zj93wgdp.js";import{N as $}from"./chunk-wmfxrbxe.js";import{$ as qe,Aa as I,P as ue,Q as er,U as je,V as vr,Y as Fe,Z as De,aa as Ue,ba as Be,ca as Le,ea as S,fa as t,ga as Vr,ha as _,ia as b,ja as j,ka as F,la as h,pa as Sr,qa as a,ra as jr,sa as Qe,ta as Xe,ua as rr,va as sr,ya as y,za as o}from"./chunk-vv8b2cgh.js";import{$a as q,Ba as nr,Ca as or,Da as dr,Ea as yr,Fa as cr,Ga as Ie,Ha as Re,Ia as Pe,Ja as tr,Ka as Je,La as Ve,Ma as ee,Na as re,Oa as We,Pa as fe,Qa as ar,Ra as H,Sa as mr,Ta as v,Ua as E,Va as wr,Wa as Ae,Xa as Ke,Ya as kr,Za as Me,_a as Er,ab as Ye,bb as Ze,cb as He,db as Ne,eb as ir,fb as lr}from"./chunk-jj0rek44.js";import"./chunk-m4ha2b7x.js";import{hb as R,ib as be}from"./chunk-1b3vtfck.js";import"./chunk-9ttt4yty.js";import{pb as Ce}from"./chunk-h26ck86r.js";import"./chunk-8enz17vb.js";var P=$(H(),1);var se=$(q(),1);function Mr(e){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"sso-oauth",region:e.region},propertiesExtractor:(s,r)=>({signingProperties:{config:s,context:r}})}}function Z(e){return{schemeId:"smithy.api#noAuth"}}var ie=async(e,s,r)=>{return{operation:ee(s).operation,region:await re(e.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()}},le=(e)=>{const s=[];switch(e.operation){case"CreateToken":{s.push(Z(e));break}case"RegisterClient":{s.push(Z(e));break}case"StartDeviceAuthorization":{s.push(Z(e));break}default:s.push(Mr(e))}return s},he=(e)=>{return{...se.resolveAwsSdkSigV4Config(e)}};var ne=(e)=>{return{...e,useDualstackEndpoint:e.useDualstackEndpoint??!1,useFipsEndpoint:e.useFipsEndpoint??!1,defaultSigningName:"sso-oauth"}},k={UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}};var oe={name:"@aws-sdk/client-sso-oidc",description:"AWS SDK for JavaScript Sso Oidc Client for Node.js, Browser and React Native",version:"3.637.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.635.0","@aws-sdk/credential-provider-node":"3.637.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.637.0","@aws-sdk/region-config-resolver":"3.614.0","@aws-sdk/types":"3.609.0","@aws-sdk/util-endpoints":"3.637.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.4.0","@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.15","@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.2.0","@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.15","@smithy/util-defaults-mode-node":"^3.0.15","@smithy/util-endpoints":"^2.0.5","@smithy/util-middleware":"^3.0.3","@smithy/util-retry":"^3.0.3","@smithy/util-utf8":"^3.0.0",tslib:"^2.6.2"},devDependencies:{"@tsconfig/node16":"16.1.3","@types/node":"^16.18.96",concurrently:"7.0.0","downlevel-dts":"0.10.1",rimraf:"3.0.2",typescript:"~4.9.5"},engines:{node:">=16.0.0"},typesVersions:{"<4.0":{"dist-types/*":["dist-types/ts3.4/*"]}},files:["dist-*/**"],author:{name:"AWS SDK for JavaScript Team",url:"https://aws.amazon.com/javascript/"},license:"Apache-2.0",peerDependencies:{"@aws-sdk/client-sts":"^3.637.0"},browser:{"./dist-es/runtimeConfig":"./dist-es/runtimeConfig.browser"},"react-native":{"./dist-es/runtimeConfig":"./dist-es/runtimeConfig.native"},homepage:"https://github.com/aws/aws-sdk-js-v3/tree/main/clients/client-sso-oidc",repository:{type:"git",url:"https://github.com/aws/aws-sdk-js-v3.git",directory:"clients/client-sso-oidc"}};var _e=$(q(),1);var xe=$(q(),1),ze=$(H(),1);var de={["required"]:!1,type:"String"},ye={["required"]:!0,default:!1,type:"Boolean"},ce={["ref"]:"Endpoint"},ve={["fn"]:"booleanEquals",["argv"]:[{["ref"]:"UseFIPS"},!0]},Ee={["fn"]:"booleanEquals",["argv"]:[{["ref"]:"UseDualStack"},!0]},m={},te={["fn"]:"getAttr",["argv"]:[{["ref"]:"PartitionResult"},"supportsFIPS"]},Se={["ref"]:"PartitionResult"},ae={["fn"]:"booleanEquals",["argv"]:[!0,{["fn"]:"getAttr",["argv"]:[Se,"supportsDualStack"]}]},me=[ve],we=[Ee],ke=[{["ref"]:"Region"}],Lr={version:"1.0",parameters:{Region:de,UseDualStack:ye,UseFIPS:ye,Endpoint:de},rules:[{conditions:[{["fn"]:"isSet",["argv"]:[ce]}],rules:[{conditions:me,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:"error"},{conditions:we,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:"error"},{endpoint:{url:ce,properties:m,headers:m},type:"endpoint"}],type:"tree"},{conditions:[{["fn"]:"isSet",["argv"]:ke}],rules:[{conditions:[{["fn"]:"aws.partition",["argv"]:ke,assign:"PartitionResult"}],rules:[{conditions:[ve,Ee],rules:[{conditions:[{["fn"]:"booleanEquals",["argv"]:[!0,te]},ae],rules:[{endpoint:{url:"https://oidc-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:m,headers:m},type:"endpoint"}],type:"tree"},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:"error"}],type:"tree"},{conditions:me,rules:[{conditions:[{["fn"]:"booleanEquals",["argv"]:[te,!0]}],rules:[{conditions:[{["fn"]:"stringEquals",["argv"]:[{["fn"]:"getAttr",["argv"]:[Se,"name"]},"aws-us-gov"]}],endpoint:{url:"https://oidc.{Region}.amazonaws.com",properties:m,headers:m},type:"endpoint"},{endpoint:{url:"https://oidc-fips.{Region}.{PartitionResult#dnsSuffix}",properties:m,headers:m},type:"endpoint"}],type:"tree"},{error:"FIPS is enabled but this partition does not support FIPS",type:"error"}],type:"tree"},{conditions:we,rules:[{conditions:[ae],rules:[{endpoint:{url:"https://oidc.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:m,headers:m},type:"endpoint"}],type:"tree"},{error:"DualStack is enabled but this partition does not support DualStack",type:"error"}],type:"tree"},{endpoint:{url:"https://oidc.{Region}.{PartitionResult#dnsSuffix}",properties:m,headers:m},type:"endpoint"}],type:"tree"}],type:"tree"},{error:"Invalid Configuration: Missing Region",type:"error"}]},$e=Lr;var Te=(e,s={})=>{return Re($e,{endpointParams:e,logger:s.logger})};Ie.aws=Pe;var Ge=(e)=>{return{apiVersion:"2019-06-10",base64Decoder:e?.base64Decoder??Fe,base64Encoder:e?.base64Encoder??Ue,disableHostPrefix:e?.disableHostPrefix??!1,endpointProvider:e?.endpointProvider??Te,extensions:e?.extensions??[],httpAuthSchemeProvider:e?.httpAuthSchemeProvider??le,httpAuthSchemes:e?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:(s)=>s.getIdentityProvider("aws.auth#sigv4"),signer:new xe.AwsSdkSigV4Signer},{schemeId:"smithy.api#noAuth",identityProvider:(s)=>s.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new ze.NoAuthSigner}],logger:e?.logger??new je,serviceId:e?.serviceId??"SSO OIDC",urlParser:e?.urlParser??be,utf8Decoder:e?.utf8Decoder??De,utf8Encoder:e?.utf8Encoder??qe}};var pe=(e)=>{Xe(process.version);const s=Ne(e),r=()=>s().then(Qe),i=Ge(e);return _e.emitWarningIfUnsupportedVersion(process.version),{...i,...e,runtime:"node",defaultsMode:s,bodyLengthChecker:e?.bodyLengthChecker??He,credentialDefaultProvider:e?.credentialDefaultProvider??Ce,defaultUserAgentProvider:e?.defaultUserAgentProvider??Ye({serviceId:i.serviceId,clientVersion:oe.version}),maxAttempts:e?.maxAttempts??R(Ke),region:e?.region??R(We,fe),requestHandler:Be.create(e?.requestHandler??r),retryMode:e?.retryMode??R({...Me,default:async()=>(await r()).retryMode||Ae}),sha256:e?.sha256??Ze.bind(null,"sha256"),streamCollector:e?.streamCollector??Le,useDualstackEndpoint:e?.useDualstackEndpoint??R(Je),useFipsEndpoint:e?.useFipsEndpoint??R(Ve)}};var ge=(e)=>{const s=e.httpAuthSchemes;let{httpAuthSchemeProvider:r,credentials:i}=e;return{setHttpAuthScheme(l){const n=s.findIndex((T)=>T.schemeId===l.schemeId);if(n===-1)s.push(l);else s.splice(n,1,l)},httpAuthSchemes(){return s},setHttpAuthSchemeProvider(l){r=l},httpAuthSchemeProvider(){return r},setCredentials(l){i=l},credentials(){return i}}},Oe=(e)=>{return{httpAuthSchemes:e.httpAuthSchemes(),httpAuthSchemeProvider:e.httpAuthSchemeProvider(),credentials:e.credentials()}};var U=(e)=>e,hr=(e,s)=>{const r={...U(ir(e)),...U(rr(e)),...U(ue(e)),...U(ge(e))};return s.forEach((i)=>i.configure(r)),{...e,...lr(r),...sr(r),...er(r),...Oe(r)}};class N extends vr{constructor(...[e]){const s=pe(e||{}),r=ne(s),i=cr(r),l=kr(i),n=ar(l),T=nr(n),fr=wr(T),Ar=he(fr),u=hr(Ar,e?.extensions||[]);super(u);this.config=u,this.middlewareStack.use(tr(this.config)),this.middlewareStack.use(Er(this.config)),this.middlewareStack.use(mr(this.config)),this.middlewareStack.use(or(this.config)),this.middlewareStack.use(dr(this.config)),this.middlewareStack.use(yr(this.config)),this.middlewareStack.use(P.getHttpAuthSchemeEndpointRuleSetPlugin(this.config,{httpAuthSchemeParametersProvider:ie,identityProviderConfigProvider:async(Kr)=>new P.DefaultIdentityProviderConfig({"aws.auth#sigv4":Kr.credentials})})),this.middlewareStack.use(P.getHttpSigningPlugin(this.config))}destroy(){super.destroy()}}class d extends Sr{constructor(e){super(e);Object.setPrototypeOf(this,d.prototype)}}class x extends d{constructor(e){super({name:"AccessDeniedException",$fault:"client",...e});this.name="AccessDeniedException",this.$fault="client",Object.setPrototypeOf(this,x.prototype),this.error=e.error,this.error_description=e.error_description}}class z extends d{constructor(e){super({name:"AuthorizationPendingException",$fault:"client",...e});this.name="AuthorizationPendingException",this.$fault="client",Object.setPrototypeOf(this,z.prototype),this.error=e.error,this.error_description=e.error_description}}class G extends d{constructor(e){super({name:"ExpiredTokenException",$fault:"client",...e});this.name="ExpiredTokenException",this.$fault="client",Object.setPrototypeOf(this,G.prototype),this.error=e.error,this.error_description=e.error_description}}class J extends d{constructor(e){super({name:"InternalServerException",$fault:"server",...e});this.name="InternalServerException",this.$fault="server",Object.setPrototypeOf(this,J.prototype),this.error=e.error,this.error_description=e.error_description}}class V extends d{constructor(e){super({name:"InvalidClientException",$fault:"client",...e});this.name="InvalidClientException",this.$fault="client",Object.setPrototypeOf(this,V.prototype),this.error=e.error,this.error_description=e.error_description}}class W extends d{constructor(e){super({name:"InvalidGrantException",$fault:"client",...e});this.name="InvalidGrantException",this.$fault="client",Object.setPrototypeOf(this,W.prototype),this.error=e.error,this.error_description=e.error_description}}class f extends d{constructor(e){super({name:"InvalidRequestException",$fault:"client",...e});this.name="InvalidRequestException",this.$fault="client",Object.setPrototypeOf(this,f.prototype),this.error=e.error,this.error_description=e.error_description}}class A extends d{constructor(e){super({name:"InvalidScopeException",$fault:"client",...e});this.name="InvalidScopeException",this.$fault="client",Object.setPrototypeOf(this,A.prototype),this.error=e.error,this.error_description=e.error_description}}class K extends d{constructor(e){super({name:"SlowDownException",$fault:"client",...e});this.name="SlowDownException",this.$fault="client",Object.setPrototypeOf(this,K.prototype),this.error=e.error,this.error_description=e.error_description}}class M extends d{constructor(e){super({name:"UnauthorizedClientException",$fault:"client",...e});this.name="UnauthorizedClientException",this.$fault="client",Object.setPrototypeOf(this,M.prototype),this.error=e.error,this.error_description=e.error_description}}class B extends d{constructor(e){super({name:"UnsupportedGrantTypeException",$fault:"client",...e});this.name="UnsupportedGrantTypeException",this.$fault="client",Object.setPrototypeOf(this,B.prototype),this.error=e.error,this.error_description=e.error_description}}class L extends d{constructor(e){super({name:"InvalidRequestRegionException",$fault:"client",...e});this.name="InvalidRequestRegionException",this.$fault="client",Object.setPrototypeOf(this,L.prototype),this.error=e.error,this.error_description=e.error_description,this.endpoint=e.endpoint,this.region=e.region}}class Q extends d{constructor(e){super({name:"InvalidClientMetadataException",$fault:"client",...e});this.name="InvalidClientMetadataException",this.$fault="client",Object.setPrototypeOf(this,Q.prototype),this.error=e.error,this.error_description=e.error_description}}class X extends d{constructor(e){super({name:"InvalidRedirectUriException",$fault:"client",...e});this.name="InvalidRedirectUriException",this.$fault="client",Object.setPrototypeOf(this,X.prototype),this.error=e.error,this.error_description=e.error_description}}var $r=(e)=>({...e,...e.clientSecret&&{clientSecret:t},...e.refreshToken&&{refreshToken:t},...e.codeVerifier&&{codeVerifier:t}}),Ir=(e)=>({...e,...e.accessToken&&{accessToken:t},...e.refreshToken&&{refreshToken:t},...e.idToken&&{idToken:t}}),Rr=(e)=>({...e,...e.refreshToken&&{refreshToken:t},...e.assertion&&{assertion:t},...e.subjectToken&&{subjectToken:t},...e.codeVerifier&&{codeVerifier:t}}),Pr=(e)=>({...e,...e.accessToken&&{accessToken:t},...e.refreshToken&&{refreshToken:t},...e.idToken&&{idToken:t}}),Tr=(e)=>({...e,...e.clientSecret&&{clientSecret:t}}),br=(e)=>({...e,...e.clientSecret&&{clientSecret:t}});var w=$(q(),1),D=$(H(),1);var Fr=async(e,s)=>{const r=D.requestBuilder(e,s),i={"content-type":"application/json"};r.bp("/token");let l;return l=JSON.stringify(o(e,{clientId:[],clientSecret:[],code:[],codeVerifier:[],deviceCode:[],grantType:[],redirectUri:[],refreshToken:[],scope:(n)=>I(n)})),r.m("POST").h(i).b(l),r.build()},Dr=async(e,s)=>{const r=D.requestBuilder(e,s),i={"content-type":"application/json"};r.bp("/token");const l=y({[is]:[,"t"]});let n;return n=JSON.stringify(o(e,{assertion:[],clientId:[],code:[],codeVerifier:[],grantType:[],redirectUri:[],refreshToken:[],requestedTokenType:[],scope:(T)=>I(T),subjectToken:[],subjectTokenType:[]})),r.m("POST").h(i).q(l).b(n),r.build()},qr=async(e,s)=>{const r=D.requestBuilder(e,s),i={"content-type":"application/json"};r.bp("/client/register");let l;return l=JSON.stringify(o(e,{clientName:[],clientType:[],entitledApplicationArn:[],grantTypes:(n)=>I(n),issuerUrl:[],redirectUris:(n)=>I(n),scopes:(n)=>I(n)})),r.m("POST").h(i).b(l),r.build()},Ur=async(e,s)=>{const r=D.requestBuilder(e,s),i={"content-type":"application/json"};r.bp("/device_authorization");let l;return l=JSON.stringify(o(e,{clientId:[],clientSecret:[],startUrl:[]})),r.m("POST").h(i).b(l),r.build()},xr=async(e,s)=>{if(e.statusCode!==200&&e.statusCode>=300)return Y(e,s);const r=y({$metadata:c(e)}),i=j(F(await w.parseJsonBody(e.body,s)),"body"),l=o(i,{accessToken:h,expiresIn:b,idToken:h,refreshToken:h,tokenType:h});return Object.assign(r,l),r},zr=async(e,s)=>{if(e.statusCode!==200&&e.statusCode>=300)return Y(e,s);const r=y({$metadata:c(e)}),i=j(F(await w.parseJsonBody(e.body,s)),"body"),l=o(i,{accessToken:h,expiresIn:b,idToken:h,issuedTokenType:h,refreshToken:h,scope:I,tokenType:h});return Object.assign(r,l),r},Gr=async(e,s)=>{if(e.statusCode!==200&&e.statusCode>=300)return Y(e,s);const r=y({$metadata:c(e)}),i=j(F(await w.parseJsonBody(e.body,s)),"body"),l=o(i,{authorizationEndpoint:h,clientId:h,clientIdIssuedAt:_,clientSecret:h,clientSecretExpiresAt:_,tokenEndpoint:h});return Object.assign(r,l),r},Jr=async(e,s)=>{if(e.statusCode!==200&&e.statusCode>=300)return Y(e,s);const r=y({$metadata:c(e)}),i=j(F(await w.parseJsonBody(e.body,s)),"body"),l=o(i,{deviceCode:h,expiresIn:b,interval:b,userCode:h,verificationUri:h,verificationUriComplete:h});return Object.assign(r,l),r},Y=async(e,s)=>{const r={...e,body:await w.parseJsonErrorBody(e.body,s)},i=w.loadRestJsonErrorCode(e,r.body);switch(i){case"AccessDeniedException":case"com.amazonaws.ssooidc#AccessDeniedException":throw await Xr(r,s);case"AuthorizationPendingException":case"com.amazonaws.ssooidc#AuthorizationPendingException":throw await Yr(r,s);case"ExpiredTokenException":case"com.amazonaws.ssooidc#ExpiredTokenException":throw await Zr(r,s);case"InternalServerException":case"com.amazonaws.ssooidc#InternalServerException":throw await Hr(r,s);case"InvalidClientException":case"com.amazonaws.ssooidc#InvalidClientException":throw await Nr(r,s);case"InvalidGrantException":case"com.amazonaws.ssooidc#InvalidGrantException":throw await pr(r,s);case"InvalidRequestException":case"com.amazonaws.ssooidc#InvalidRequestException":throw await gr(r,s);case"InvalidScopeException":case"com.amazonaws.ssooidc#InvalidScopeException":throw await ur(r,s);case"SlowDownException":case"com.amazonaws.ssooidc#SlowDownException":throw await es(r,s);case"UnauthorizedClientException":case"com.amazonaws.ssooidc#UnauthorizedClientException":throw await rs(r,s);case"UnsupportedGrantTypeException":case"com.amazonaws.ssooidc#UnsupportedGrantTypeException":throw await ss(r,s);case"InvalidRequestRegionException":case"com.amazonaws.ssooidc#InvalidRequestRegionException":throw await Or(r,s);case"InvalidClientMetadataException":case"com.amazonaws.ssooidc#InvalidClientMetadataException":throw await _r(r,s);case"InvalidRedirectUriException":case"com.amazonaws.ssooidc#InvalidRedirectUriException":throw await Cr(r,s);default:const l=r.body;return Qr({output:e,parsedBody:l,errorCode:i})}},Qr=jr(d),Xr=async(e,s)=>{const r=y({}),i=e.body,l=o(i,{error:h,error_description:h});Object.assign(r,l);const n=new x({$metadata:c(e),...r});return a(n,e.body)},Yr=async(e,s)=>{const r=y({}),i=e.body,l=o(i,{error:h,error_description:h});Object.assign(r,l);const n=new z({$metadata:c(e),...r});return a(n,e.body)},Zr=async(e,s)=>{const r=y({}),i=e.body,l=o(i,{error:h,error_description:h});Object.assign(r,l);const n=new G({$metadata:c(e),...r});return a(n,e.body)},Hr=async(e,s)=>{const r=y({}),i=e.body,l=o(i,{error:h,error_description:h});Object.assign(r,l);const n=new J({$metadata:c(e),...r});return a(n,e.body)},Nr=async(e,s)=>{const r=y({}),i=e.body,l=o(i,{error:h,error_description:h});Object.assign(r,l);const n=new V({$metadata:c(e),...r});return a(n,e.body)},_r=async(e,s)=>{const r=y({}),i=e.body,l=o(i,{error:h,error_description:h});Object.assign(r,l);const n=new Q({$metadata:c(e),...r});return a(n,e.body)},pr=async(e,s)=>{const r=y({}),i=e.body,l=o(i,{error:h,error_description:h});Object.assign(r,l);const n=new W({$metadata:c(e),...r});return a(n,e.body)},Cr=async(e,s)=>{const r=y({}),i=e.body,l=o(i,{error:h,error_description:h});Object.assign(r,l);const n=new X({$metadata:c(e),...r});return a(n,e.body)},gr=async(e,s)=>{const r=y({}),i=e.body,l=o(i,{error:h,error_description:h});Object.assign(r,l);const n=new f({$metadata:c(e),...r});return a(n,e.body)},Or=async(e,s)=>{const r=y({}),i=e.body,l=o(i,{endpoint:h,error:h,error_description:h,region:h});Object.assign(r,l);const n=new L({$metadata:c(e),...r});return a(n,e.body)},ur=async(e,s)=>{const r=y({}),i=e.body,l=o(i,{error:h,error_description:h});Object.assign(r,l);const n=new A({$metadata:c(e),...r});return a(n,e.body)},es=async(e,s)=>{const r=y({}),i=e.body,l=o(i,{error:h,error_description:h});Object.assign(r,l);const n=new K({$metadata:c(e),...r});return a(n,e.body)},rs=async(e,s)=>{const r=y({}),i=e.body,l=o(i,{error:h,error_description:h});Object.assign(r,l);const n=new M({$metadata:c(e),...r});return a(n,e.body)},ss=async(e,s)=>{const r=y({}),i=e.body,l=o(i,{error:h,error_description:h});Object.assign(r,l);const n=new B({$metadata:c(e),...r});return a(n,e.body)},c=(e)=>({httpStatusCode:e.statusCode,requestId:e.headers["x-amzn-requestid"]??e.headers["x-amzn-request-id"]??e.headers["x-amz-request-id"],extendedRequestId:e.headers["x-amz-id-2"],cfId:e.headers["x-amz-cf-id"]});var is="aws_iam";class p extends S.classBuilder().ep({...k}).m(function(e,s,r,i){return[v(r,this.serialize,this.deserialize),E(r,e.getEndpointParameterInstructions())]}).s("AWSSSOOIDCService","CreateToken",{}).n("SSOOIDCClient","CreateTokenCommand").f($r,Ir).ser(Fr).de(xr).build(){}class C extends S.classBuilder().ep({...k}).m(function(e,s,r,i){return[v(r,this.serialize,this.deserialize),E(r,e.getEndpointParameterInstructions())]}).s("AWSSSOOIDCService","CreateTokenWithIAM",{}).n("SSOOIDCClient","CreateTokenWithIAMCommand").f(Rr,Pr).ser(Dr).de(zr).build(){}class g extends S.classBuilder().ep({...k}).m(function(e,s,r,i){return[v(r,this.serialize,this.deserialize),E(r,e.getEndpointParameterInstructions())]}).s("AWSSSOOIDCService","RegisterClient",{}).n("SSOOIDCClient","RegisterClientCommand").f(void 0,Tr).ser(qr).de(Gr).build(){}class O extends S.classBuilder().ep({...k}).m(function(e,s,r,i){return[v(r,this.serialize,this.deserialize),E(r,e.getEndpointParameterInstructions())]}).s("AWSSSOOIDCService","StartDeviceAuthorization",{}).n("SSOOIDCClient","StartDeviceAuthorizationCommand").f(br,void 0).ser(Ur).de(Jr).build(){}var ls={CreateTokenCommand:p,CreateTokenWithIAMCommand:C,RegisterClientCommand:g,StartDeviceAuthorizationCommand:O};class Wr extends N{}Vr(ls,Wr);export{vr as __Client,B as UnsupportedGrantTypeException,M as UnauthorizedClientException,br as StartDeviceAuthorizationRequestFilterSensitiveLog,O as StartDeviceAuthorizationCommand,K as SlowDownException,d as SSOOIDCServiceException,N as SSOOIDCClient,Wr as SSOOIDC,Tr as RegisterClientResponseFilterSensitiveLog,g as RegisterClientCommand,A as InvalidScopeException,L as InvalidRequestRegionException,f as InvalidRequestException,X as InvalidRedirectUriException,W as InvalidGrantException,Q as InvalidClientMetadataException,V as InvalidClientException,J as InternalServerException,G as ExpiredTokenException,Pr as CreateTokenWithIAMResponseFilterSensitiveLog,Rr as CreateTokenWithIAMRequestFilterSensitiveLog,C as CreateTokenWithIAMCommand,Ir as CreateTokenResponseFilterSensitiveLog,$r as CreateTokenRequestFilterSensitiveLog,p as CreateTokenCommand,z as AuthorizationPendingException,x as AccessDeniedException,S as $Command};
|
|
3
|
-
|
|
4
|
-
//# debugId=37AB07A7CA8FD02764756E2164756E21
|
|
5
|
-
//# sourceMappingURL=chunk-57yy5xcz.js.map
|
package/dist/chunk-agv26t9k.js
DELETED
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{N as i}from"./chunk-wmfxrbxe.js";import{$ as ae,Aa as ge,P as Fe,Q as _e,U as se,V as je,Y as te,Z as re,aa as ne,ba as we,ca as be,ea as ns,fa as k,ja as z,ka as Ne,la as h,pa as Oe,qa as u,ra as fe,sa as xe,ta as ve,ua as $e,va as Pe,ya as c,za as y}from"./chunk-vv8b2cgh.js";import{$a as x,Ba as Le,Ca as Ce,Da as Me,Ea as We,Fa as Ae,Ga as V,Ha as N,Ia as f,Ja as Ke,Ka as ie,La as le,Ma as _,Na as $,Oa as pe,Pa as ye,Qa as Qe,Ra as B,Sa as Xe,Ta as rs,Ua as as,Va as Ye,Wa as me,Xa as he,Ya as Ze,Za as ue,_a as Te,ab as ke,bb as Re,cb as qe,db as Ee,eb as Je,fb as Ue}from"./chunk-jj0rek44.js";import"./chunk-m4ha2b7x.js";import{hb as l,ib as ee}from"./chunk-1b3vtfck.js";import"./chunk-9ttt4yty.js";import"./chunk-8enz17vb.js";var p=i(B(),1);var P=i(x(),1);function ls(e){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"awsssoportal",region:e.region},propertiesExtractor:(s,t)=>({signingProperties:{config:s,context:t}})}}function b(e){return{schemeId:"smithy.api#noAuth"}}var J=async(e,s,t)=>{return{operation:_(s).operation,region:await $(e.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()}},U=(e)=>{const s=[];switch(e.operation){case"GetRoleCredentials":{s.push(b(e));break}case"ListAccountRoles":{s.push(b(e));break}case"ListAccounts":{s.push(b(e));break}case"Logout":{s.push(b(e));break}default:s.push(ls(e))}return s},I=(e)=>{return{...P.resolveAwsSdkSigV4Config(e)}};var L=(e)=>{return{...e,useDualstackEndpoint:e.useDualstackEndpoint??!1,useFipsEndpoint:e.useFipsEndpoint??!1,defaultSigningName:"awsssoportal"}},C={UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}};var M={name:"@aws-sdk/client-sso",description:"AWS SDK for JavaScript Sso Client for Node.js, Browser and React Native",version:"3.637.0",scripts:{build:"concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'","build:cjs":"node ../../scripts/compilation/inline client-sso","build:es":"tsc -p tsconfig.es.json","build:include:deps":"lerna run --scope $npm_package_name --include-dependencies build","build:types":"tsc -p tsconfig.types.json","build:types:downlevel":"downlevel-dts dist-types dist-types/ts3.4",clean:"rimraf ./dist-* && rimraf *.tsbuildinfo","extract:docs":"api-extractor run --local","generate:client":"node ../../scripts/generate-clients/single-service --solo sso"},main:"./dist-cjs/index.js",types:"./dist-types/index.d.ts",module:"./dist-es/index.js",sideEffects:!1,dependencies:{"@aws-crypto/sha256-browser":"5.2.0","@aws-crypto/sha256-js":"5.2.0","@aws-sdk/core":"3.635.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.637.0","@aws-sdk/region-config-resolver":"3.614.0","@aws-sdk/types":"3.609.0","@aws-sdk/util-endpoints":"3.637.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.4.0","@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.15","@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.2.0","@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.15","@smithy/util-defaults-mode-node":"^3.0.15","@smithy/util-endpoints":"^2.0.5","@smithy/util-middleware":"^3.0.3","@smithy/util-retry":"^3.0.3","@smithy/util-utf8":"^3.0.0",tslib:"^2.6.2"},devDependencies:{"@tsconfig/node16":"16.1.3","@types/node":"^16.18.96",concurrently:"7.0.0","downlevel-dts":"0.10.1",rimraf:"3.0.2",typescript:"~4.9.5"},engines:{node:">=16.0.0"},typesVersions:{"<4.0":{"dist-types/*":["dist-types/ts3.4/*"]}},files:["dist-*/**"],author:{name:"AWS SDK for JavaScript Team",url:"https://aws.amazon.com/javascript/"},license:"Apache-2.0",browser:{"./dist-es/runtimeConfig":"./dist-es/runtimeConfig.browser"},"react-native":{"./dist-es/runtimeConfig":"./dist-es/runtimeConfig.native"},homepage:"https://github.com/aws/aws-sdk-js-v3/tree/main/clients/client-sso",repository:{type:"git",url:"https://github.com/aws/aws-sdk-js-v3.git",directory:"clients/client-sso"}};var Se=i(x(),1);var de=i(x(),1),oe=i(B(),1);var W={["required"]:!1,type:"String"},A={["required"]:!0,default:!1,type:"Boolean"},K={["ref"]:"Endpoint"},T={["fn"]:"booleanEquals",["argv"]:[{["ref"]:"UseFIPS"},!0]},H={["fn"]:"booleanEquals",["argv"]:[{["ref"]:"UseDualStack"},!0]},d={},Q={["fn"]:"getAttr",["argv"]:[{["ref"]:"PartitionResult"},"supportsFIPS"]},O={["ref"]:"PartitionResult"},X={["fn"]:"booleanEquals",["argv"]:[!0,{["fn"]:"getAttr",["argv"]:[O,"supportsDualStack"]}]},Y=[T],Z=[H],j=[{["ref"]:"Region"}],ys={version:"1.0",parameters:{Region:W,UseDualStack:A,UseFIPS:A,Endpoint:W},rules:[{conditions:[{["fn"]:"isSet",["argv"]:[K]}],rules:[{conditions:Y,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:"error"},{conditions:Z,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:"error"},{endpoint:{url:K,properties:d,headers:d},type:"endpoint"}],type:"tree"},{conditions:[{["fn"]:"isSet",["argv"]:j}],rules:[{conditions:[{["fn"]:"aws.partition",["argv"]:j,assign:"PartitionResult"}],rules:[{conditions:[T,H],rules:[{conditions:[{["fn"]:"booleanEquals",["argv"]:[!0,Q]},X],rules:[{endpoint:{url:"https://portal.sso-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:d,headers:d},type:"endpoint"}],type:"tree"},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:"error"}],type:"tree"},{conditions:Y,rules:[{conditions:[{["fn"]:"booleanEquals",["argv"]:[Q,!0]}],rules:[{conditions:[{["fn"]:"stringEquals",["argv"]:[{["fn"]:"getAttr",["argv"]:[O,"name"]},"aws-us-gov"]}],endpoint:{url:"https://portal.sso.{Region}.amazonaws.com",properties:d,headers:d},type:"endpoint"},{endpoint:{url:"https://portal.sso-fips.{Region}.{PartitionResult#dnsSuffix}",properties:d,headers:d},type:"endpoint"}],type:"tree"},{error:"FIPS is enabled but this partition does not support FIPS",type:"error"}],type:"tree"},{conditions:Z,rules:[{conditions:[X],rules:[{endpoint:{url:"https://portal.sso.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:d,headers:d},type:"endpoint"}],type:"tree"},{error:"DualStack is enabled but this partition does not support DualStack",type:"error"}],type:"tree"},{endpoint:{url:"https://portal.sso.{Region}.{PartitionResult#dnsSuffix}",properties:d,headers:d},type:"endpoint"}],type:"tree"}],type:"tree"},{error:"Invalid Configuration: Missing Region",type:"error"}]},G=ys;var g=(e,s={})=>{return N(G,{endpointParams:e,logger:s.logger})};V.aws=f;var ce=(e)=>{return{apiVersion:"2019-06-10",base64Decoder:e?.base64Decoder??te,base64Encoder:e?.base64Encoder??ne,disableHostPrefix:e?.disableHostPrefix??!1,endpointProvider:e?.endpointProvider??g,extensions:e?.extensions??[],httpAuthSchemeProvider:e?.httpAuthSchemeProvider??U,httpAuthSchemes:e?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:(s)=>s.getIdentityProvider("aws.auth#sigv4"),signer:new de.AwsSdkSigV4Signer},{schemeId:"smithy.api#noAuth",identityProvider:(s)=>s.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new oe.NoAuthSigner}],logger:e?.logger??new se,serviceId:e?.serviceId??"SSO",urlParser:e?.urlParser??ee,utf8Decoder:e?.utf8Decoder??re,utf8Encoder:e?.utf8Encoder??ae}};var ze=(e)=>{ve(process.version);const s=Ee(e),t=()=>s().then(xe),r=ce(e);return Se.emitWarningIfUnsupportedVersion(process.version),{...r,...e,runtime:"node",defaultsMode:s,bodyLengthChecker:e?.bodyLengthChecker??qe,defaultUserAgentProvider:e?.defaultUserAgentProvider??ke({serviceId:r.serviceId,clientVersion:M.version}),maxAttempts:e?.maxAttempts??l(he),region:e?.region??l(pe,ye),requestHandler:we.create(e?.requestHandler??t),retryMode:e?.retryMode??l({...ue,default:async()=>(await t()).retryMode||me}),sha256:e?.sha256??Re.bind(null,"sha256"),streamCollector:e?.streamCollector??be,useDualstackEndpoint:e?.useDualstackEndpoint??l(ie),useFipsEndpoint:e?.useFipsEndpoint??l(le)}};var De=(e)=>{const s=e.httpAuthSchemes;let{httpAuthSchemeProvider:t,credentials:r}=e;return{setHttpAuthScheme(a){const n=s.findIndex((D)=>D.schemeId===a.schemeId);if(n===-1)s.push(a);else s.splice(n,1,a)},httpAuthSchemes(){return s},setHttpAuthSchemeProvider(a){t=a},httpAuthSchemeProvider(){return t},setCredentials(a){r=a},credentials(){return r}}},Be=(e)=>{return{httpAuthSchemes:e.httpAuthSchemes(),httpAuthSchemeProvider:e.httpAuthSchemeProvider(),credentials:e.credentials()}};var v=(e)=>e,Ie=(e,s)=>{const t={...v(Je(e)),...v($e(e)),...v(Fe(e)),...v(De(e))};return s.forEach((r)=>r.configure(t)),{...e,...Ue(t),...Pe(t),..._e(t),...Be(t)}};class He extends je{constructor(...[e]){const s=ze(e||{}),t=L(s),r=Ae(t),a=Ze(r),n=Qe(a),D=Le(n),os=Ye(D),cs=I(os),F=Ie(cs,e?.extensions||[]);super(F);this.config=F,this.middlewareStack.use(Ke(this.config)),this.middlewareStack.use(Te(this.config)),this.middlewareStack.use(Xe(this.config)),this.middlewareStack.use(Ce(this.config)),this.middlewareStack.use(Me(this.config)),this.middlewareStack.use(We(this.config)),this.middlewareStack.use(p.getHttpAuthSchemeEndpointRuleSetPlugin(this.config,{httpAuthSchemeParametersProvider:J,identityProviderConfigProvider:async(is)=>new p.DefaultIdentityProviderConfig({"aws.auth#sigv4":is.credentials})})),this.middlewareStack.use(p.getHttpSigningPlugin(this.config))}destroy(){super.destroy()}}class o extends Oe{constructor(e){super(e);Object.setPrototypeOf(this,o.prototype)}}class R extends o{constructor(e){super({name:"InvalidRequestException",$fault:"client",...e});this.name="InvalidRequestException",this.$fault="client",Object.setPrototypeOf(this,R.prototype)}}class q extends o{constructor(e){super({name:"ResourceNotFoundException",$fault:"client",...e});this.name="ResourceNotFoundException",this.$fault="client",Object.setPrototypeOf(this,q.prototype)}}class E extends o{constructor(e){super({name:"TooManyRequestsException",$fault:"client",...e});this.name="TooManyRequestsException",this.$fault="client",Object.setPrototypeOf(this,E.prototype)}}class S extends o{constructor(e){super({name:"UnauthorizedException",$fault:"client",...e});this.name="UnauthorizedException",this.$fault="client",Object.setPrototypeOf(this,S.prototype)}}var Ge=(e)=>({...e,...e.accessToken&&{accessToken:k}}),ms=(e)=>({...e,...e.secretAccessKey&&{secretAccessKey:k},...e.sessionToken&&{sessionToken:k}}),Ve=(e)=>({...e,...e.roleCredentials&&{roleCredentials:ms(e.roleCredentials)}});var m=i(x(),1),es=i(B(),1);var ss=async(e,s)=>{const t=es.requestBuilder(e,s),r=c({},ks,{[Ds]:e[qs]});t.bp("/federation/credentials");const a=c({[zs]:[,z(e[Ss],"roleName")],[Es]:[,z(e[Rs],"accountId")]});let n;return t.m("GET").h(r).q(a).b(n),t.build()};var ts=async(e,s)=>{if(e.statusCode!==200&&e.statusCode>=300)return hs(e,s);const t=c({$metadata:w(e)}),r=z(Ne(await m.parseJsonBody(e.body,s)),"body"),a=y(r,{roleCredentials:ge});return Object.assign(t,a),t};var hs=async(e,s)=>{const t={...e,body:await m.parseJsonErrorBody(e.body,s)},r=m.loadRestJsonErrorCode(e,t.body);switch(r){case"InvalidRequestException":case"com.amazonaws.sso#InvalidRequestException":throw await ws(t,s);case"ResourceNotFoundException":case"com.amazonaws.sso#ResourceNotFoundException":throw await bs(t,s);case"TooManyRequestsException":case"com.amazonaws.sso#TooManyRequestsException":throw await xs(t,s);case"UnauthorizedException":case"com.amazonaws.sso#UnauthorizedException":throw await vs(t,s);default:const a=t.body;return us({output:e,parsedBody:a,errorCode:r})}},us=fe(o),ws=async(e,s)=>{const t=c({}),r=e.body,a=y(r,{message:h});Object.assign(t,a);const n=new R({$metadata:w(e),...t});return u(n,e.body)},bs=async(e,s)=>{const t=c({}),r=e.body,a=y(r,{message:h});Object.assign(t,a);const n=new q({$metadata:w(e),...t});return u(n,e.body)},xs=async(e,s)=>{const t=c({}),r=e.body,a=y(r,{message:h});Object.assign(t,a);const n=new E({$metadata:w(e),...t});return u(n,e.body)},vs=async(e,s)=>{const t=c({}),r=e.body,a=y(r,{message:h});Object.assign(t,a);const n=new S({$metadata:w(e),...t});return u(n,e.body)},w=(e)=>({httpStatusCode:e.statusCode,requestId:e.headers["x-amzn-requestid"]??e.headers["x-amzn-request-id"]??e.headers["x-amz-request-id"],extendedRequestId:e.headers["x-amz-id-2"],cfId:e.headers["x-amz-cf-id"]});var ks=(e)=>e!==void 0&&e!==null&&e!==""&&(!Object.getOwnPropertyNames(e).includes("length")||e.length!=0)&&(!Object.getOwnPropertyNames(e).includes("size")||e.size!=0),Rs="accountId",qs="accessToken",Es="account_id";var Ss="roleName",zs="role_name",Ds="x-amz-sso_bearer_token";class ds extends ns.classBuilder().ep({...C}).m(function(e,s,t,r){return[rs(t,this.serialize,this.deserialize),as(t,e.getEndpointParameterInstructions())]}).s("SWBPortalService","GetRoleCredentials",{}).n("SSOClient","GetRoleCredentialsCommand").f(Ge,Ve).ser(ss).de(ts).build(){}export{He as SSOClient,ds as GetRoleCredentialsCommand};
|
|
3
|
-
|
|
4
|
-
//# debugId=A36F435129BDA1C364756E2164756E21
|
|
5
|
-
//# sourceMappingURL=chunk-agv26t9k.js.map
|
package/dist/chunk-h3ygxbt8.js
DELETED
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import"./chunk-zj93wgdp.js";import{N as b}from"./chunk-wmfxrbxe.js";import{$ as jl,P as d0,Q as H0,R as A0,U as Al,V as U0,Y as Ll,Z as Rl,aa as al,ba as cl,ca as el,ea as B,fa as Hh,ga as t0,ja as L0,la as S,ma as u,oa as R0,pa as P0,qa as T,ra as j0,sa as pl,ta as nl,ua as S0,va as m0,wa as eh}from"./chunk-vv8b2cgh.js";import{$a as Gh,Ba as k0,Ca as K0,Da as F0,Ea as B0,Fa as y0,Ga as Ml,Ha as zl,Ia as Nl,Ja as Q0,Ka as bl,La as fl,Ma as Gl,Na as Il,Oa as Cl,Pa as Ol,Qa as X0,Ra as Xh,Sa as Y0,Ta as K,Ua as F,Va as Z0,Wa as gl,Xa as xl,Ya as $0,Za as il,_a as V0,ab as ol,bb as ul,cb as tl,db as h0,eb as J0,fb as D0}from"./chunk-jj0rek44.js";import"./chunk-m4ha2b7x.js";import{hb as f,ib as Tl}from"./chunk-1b3vtfck.js";import"./chunk-9ttt4yty.js";import{pb as Yh}from"./chunk-h26ck86r.js";import"./chunk-8enz17vb.js";var C=b(Xh(),1);var dl=b(Gh(),1);function D3(h){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"sts",region:h.region},propertiesExtractor:(w,l)=>({signingProperties:{config:w,context:l}})}}function wl(h){return{schemeId:"smithy.api#noAuth"}}var Hl=async(h,w,l)=>{return{operation:Gl(w).operation,region:await Il(h.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()}},Sl=(h)=>{const w=[];switch(h.operation){case"AssumeRoleWithSAML":{w.push(wl(h));break}case"AssumeRoleWithWebIdentity":{w.push(wl(h));break}default:w.push(D3(h))}return w},E3=(h)=>({...h,stsClientCtor:A}),ml=(h)=>{const w=E3(h);return{...dl.resolveAwsSdkSigV4Config(w)}};var Jl=(h)=>{return{...h,useDualstackEndpoint:h.useDualstackEndpoint??!1,useFipsEndpoint:h.useFipsEndpoint??!1,useGlobalEndpoint:h.useGlobalEndpoint??!1,defaultSigningName:"sts"}},D={UseGlobalEndpoint:{type:"builtInParams",name:"useGlobalEndpoint"},UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}};var Dl={name:"@aws-sdk/client-sts",description:"AWS SDK for JavaScript Sts Client for Node.js, Browser and React Native",version:"3.637.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.637.0","@aws-sdk/core":"3.635.0","@aws-sdk/credential-provider-node":"3.637.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.637.0","@aws-sdk/region-config-resolver":"3.614.0","@aws-sdk/types":"3.609.0","@aws-sdk/util-endpoints":"3.637.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.4.0","@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.15","@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.2.0","@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.15","@smithy/util-defaults-mode-node":"^3.0.15","@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 Ih=b(Gh(),1);var l0=b(Xh(),1);var rl=b(Gh(),1),sl=b(Xh(),1);var El={["required"]:!1,["type"]:"String"},Qh={["required"]:!0,default:!1,["type"]:"Boolean"},Zl={["ref"]:"Endpoint"},kl={["fn"]:"isSet",["argv"]:[{["ref"]:"Region"}]},J={["ref"]:"Region"},Kl={["fn"]:"aws.partition",["argv"]:[J],assign:"PartitionResult"},$l={["ref"]:"UseFIPS"},Ul={["ref"]:"UseDualStack"},E={url:"https://sts.amazonaws.com",properties:{authSchemes:[{name:"sigv4",signingName:"sts",signingRegion:"us-east-1"}]},headers:{}},Z={},Fl={conditions:[{["fn"]:"stringEquals",["argv"]:[J,"aws-global"]}],["endpoint"]:E,["type"]:"endpoint"},Vl={["fn"]:"booleanEquals",["argv"]:[$l,!0]},Pl={["fn"]:"booleanEquals",["argv"]:[Ul,!0]},Bl={["fn"]:"getAttr",["argv"]:[{["ref"]:"PartitionResult"},"supportsFIPS"]},vl={["ref"]:"PartitionResult"},yl={["fn"]:"booleanEquals",["argv"]:[!0,{["fn"]:"getAttr",["argv"]:[vl,"supportsDualStack"]}]},Ql=[{["fn"]:"isSet",["argv"]:[Zl]}],Xl=[Vl],Yl=[Pl],K3={version:"1.0",parameters:{Region:El,UseDualStack:Qh,UseFIPS:Qh,Endpoint:El,UseGlobalEndpoint:Qh},rules:[{conditions:[{["fn"]:"booleanEquals",["argv"]:[{["ref"]:"UseGlobalEndpoint"},!0]},{["fn"]:"not",["argv"]:Ql},kl,Kl,{["fn"]:"booleanEquals",["argv"]:[$l,!1]},{["fn"]:"booleanEquals",["argv"]:[Ul,!1]}],rules:[{conditions:[{["fn"]:"stringEquals",["argv"]:[J,"ap-northeast-1"]}],endpoint:E,["type"]:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[J,"ap-south-1"]}],endpoint:E,["type"]:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[J,"ap-southeast-1"]}],endpoint:E,["type"]:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[J,"ap-southeast-2"]}],endpoint:E,["type"]:"endpoint"},Fl,{conditions:[{["fn"]:"stringEquals",["argv"]:[J,"ca-central-1"]}],endpoint:E,["type"]:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[J,"eu-central-1"]}],endpoint:E,["type"]:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[J,"eu-north-1"]}],endpoint:E,["type"]:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[J,"eu-west-1"]}],endpoint:E,["type"]:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[J,"eu-west-2"]}],endpoint:E,["type"]:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[J,"eu-west-3"]}],endpoint:E,["type"]:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[J,"sa-east-1"]}],endpoint:E,["type"]:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[J,"us-east-1"]}],endpoint:E,["type"]:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[J,"us-east-2"]}],endpoint:E,["type"]:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[J,"us-west-1"]}],endpoint:E,["type"]:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[J,"us-west-2"]}],endpoint:E,["type"]:"endpoint"},{endpoint:{url:"https://sts.{Region}.{PartitionResult#dnsSuffix}",properties:{authSchemes:[{name:"sigv4",signingName:"sts",signingRegion:"{Region}"}]},headers:Z},["type"]:"endpoint"}],["type"]:"tree"},{conditions:Ql,rules:[{conditions:Xl,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:Zl,properties:Z,headers:Z},["type"]:"endpoint"}],["type"]:"tree"},{conditions:[kl],rules:[{conditions:[Kl],rules:[{conditions:[Vl,Pl],rules:[{conditions:[{["fn"]:"booleanEquals",["argv"]:[!0,Bl]},yl],rules:[{endpoint:{url:"https://sts-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:Z,headers:Z},["type"]:"endpoint"}],["type"]:"tree"},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",["type"]:"error"}],["type"]:"tree"},{conditions:Xl,rules:[{conditions:[{["fn"]:"booleanEquals",["argv"]:[Bl,!0]}],rules:[{conditions:[{["fn"]:"stringEquals",["argv"]:[{["fn"]:"getAttr",["argv"]:[vl,"name"]},"aws-us-gov"]}],endpoint:{url:"https://sts.{Region}.amazonaws.com",properties:Z,headers:Z},["type"]:"endpoint"},{endpoint:{url:"https://sts-fips.{Region}.{PartitionResult#dnsSuffix}",properties:Z,headers:Z},["type"]:"endpoint"}],["type"]:"tree"},{error:"FIPS is enabled but this partition does not support FIPS",["type"]:"error"}],["type"]:"tree"},{conditions:Yl,rules:[{conditions:[yl],rules:[{endpoint:{url:"https://sts.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:Z,headers:Z},["type"]:"endpoint"}],["type"]:"tree"},{error:"DualStack is enabled but this partition does not support DualStack",["type"]:"error"}],["type"]:"tree"},Fl,{endpoint:{url:"https://sts.{Region}.{PartitionResult#dnsSuffix}",properties:Z,headers:Z},["type"]:"endpoint"}],["type"]:"tree"}],["type"]:"tree"},{error:"Invalid Configuration: Missing Region",["type"]:"error"}]},ql=K3;var Wl=(h,w={})=>{return zl(ql,{endpointParams:h,logger:w.logger})};Ml.aws=Nl;var _l=(h)=>{return{apiVersion:"2011-06-15",base64Decoder:h?.base64Decoder??Ll,base64Encoder:h?.base64Encoder??al,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 rl.AwsSdkSigV4Signer},{schemeId:"smithy.api#noAuth",identityProvider:(w)=>w.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new sl.NoAuthSigner}],logger:h?.logger??new Al,serviceId:h?.serviceId??"STS",urlParser:h?.urlParser??Tl,utf8Decoder:h?.utf8Decoder??Rl,utf8Encoder:h?.utf8Encoder??jl}};var w0=(h)=>{nl(process.version);const w=h0(h),l=()=>w().then(pl),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:Dl.version}),httpAuthSchemes:h?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:(I)=>I.getIdentityProvider("aws.auth#sigv4")||(async(H)=>await Yh(H?.__config||{})()),signer:new Ih.AwsSdkSigV4Signer},{schemeId:"smithy.api#noAuth",identityProvider:(I)=>I.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new l0.NoAuthSigner}],maxAttempts:h?.maxAttempts??f(xl),region:h?.region??f(Cl,Ol),requestHandler:cl.create(h?.requestHandler??l),retryMode:h?.retryMode??f({...il,default:async()=>(await l()).retryMode||gl}),sha256:h?.sha256??ul.bind(null,"sha256"),streamCollector:h?.streamCollector??el,useDualstackEndpoint:h?.useDualstackEndpoint??f(bl),useFipsEndpoint:h?.useFipsEndpoint??f(fl)}};var G0=(h)=>{const w=h.httpAuthSchemes;let{httpAuthSchemeProvider:l,credentials:G}=h;return{setHttpAuthScheme(I){const H=w.findIndex((d)=>d.schemeId===I.schemeId);if(H===-1)w.push(I);else w.splice(H,1,I)},httpAuthSchemes(){return w},setHttpAuthSchemeProvider(I){l=I},httpAuthSchemeProvider(){return l},setCredentials(I){G=I},credentials(){return G}}},I0=(h)=>{return{httpAuthSchemes:h.httpAuthSchemes(),httpAuthSchemeProvider:h.httpAuthSchemeProvider(),credentials:h.credentials()}};var dh=(h)=>h,E0=(h,w)=>{const l={...dh(J0(h)),...dh(S0(h)),...dh(d0(h)),...dh(G0(h))};return w.forEach((G)=>G.configure(l)),{...h,...D0(l),...m0(l),...H0(l),...I0(l)}};class A extends U0{constructor(...[h]){const w=w0(h||{}),l=Jl(w),G=y0(l),I=$0(G),H=X0(I),d=k0(H),Y=Z0(d),M=ml(Y),v=E0(M,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:Hl,identityProviderConfigProvider:async(n)=>new C.DefaultIdentityProviderConfig({"aws.auth#sigv4":n.credentials})})),this.middlewareStack.use(C.getHttpSigningPlugin(this.config))}destroy(){super.destroy()}}class X extends P0{constructor(h){super(h);Object.setPrototypeOf(this,X.prototype)}}class Sh extends X{constructor(h){super({name:"ExpiredTokenException",$fault:"client",...h});this.name="ExpiredTokenException",this.$fault="client",Object.setPrototypeOf(this,Sh.prototype)}}class mh extends X{constructor(h){super({name:"MalformedPolicyDocumentException",$fault:"client",...h});this.name="MalformedPolicyDocumentException",this.$fault="client",Object.setPrototypeOf(this,mh.prototype)}}class Jh extends X{constructor(h){super({name:"PackedPolicyTooLargeException",$fault:"client",...h});this.name="PackedPolicyTooLargeException",this.$fault="client",Object.setPrototypeOf(this,Jh.prototype)}}class Dh extends X{constructor(h){super({name:"RegionDisabledException",$fault:"client",...h});this.name="RegionDisabledException",this.$fault="client",Object.setPrototypeOf(this,Dh.prototype)}}class Eh extends X{constructor(h){super({name:"IDPRejectedClaimException",$fault:"client",...h});this.name="IDPRejectedClaimException",this.$fault="client",Object.setPrototypeOf(this,Eh.prototype)}}class kh extends X{constructor(h){super({name:"InvalidIdentityTokenException",$fault:"client",...h});this.name="InvalidIdentityTokenException",this.$fault="client",Object.setPrototypeOf(this,kh.prototype)}}class Kh extends X{constructor(h){super({name:"IDPCommunicationErrorException",$fault:"client",...h});this.name="IDPCommunicationErrorException",this.$fault="client",Object.setPrototypeOf(this,Kh.prototype)}}class Fh extends X{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}}),v0=(h)=>({...h,...h.Credentials&&{Credentials:o(h.Credentials)}}),q0=(h)=>({...h,...h.SAMLAssertion&&{SAMLAssertion:Hh}}),M0=(h)=>({...h,...h.Credentials&&{Credentials:o(h.Credentials)}}),z0=(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=b(Gh(),1);var a0=async(h,w)=>{const l=j;let G;return G=_({...U3(h,w),[r]:t3,[s]:a}),R(w,l,"/",void 0,G)},r0=async(h,w)=>{const l=j;let G;return G=_({...V3(h,w),[r]:hw,[s]:a}),R(w,l,"/",void 0,G)},s0=async(h,w)=>{const l=j;let G;return G=_({...P3(h,w),[r]:lw,[s]:a}),R(w,l,"/",void 0,G)},_0=async(h,w)=>{const l=j;let G;return G=_({...v3(h,w),[r]:ww,[s]:a}),R(w,l,"/",void 0,G)},b0=async(h,w)=>{const l=j;let G;return G=_({...q3(h,w),[r]:Gw,[s]:a}),R(w,l,"/",void 0,G)},f0=async(h,w)=>{const l=j;let G;return G=_({...M3(h,w),[r]:Iw,[s]:a}),R(w,l,"/",void 0,G)},C0=async(h,w)=>{const l=j;let G;return G=_({...z3(h,w),[r]:dw,[s]:a}),R(w,l,"/",void 0,G)},O0=async(h,w)=>{const l=j;let G;return G=_({...N3(h,w),[r]:Hw,[s]:a}),R(w,l,"/",void 0,G)},g0=async(h,w)=>{if(h.statusCode>=300)return L(h,w);const l=await q.parseXmlBody(h.body,w);let G={};return G=j3(l.AssumeRoleResult,w),{$metadata:k(h),...G}},x0=async(h,w)=>{if(h.statusCode>=300)return L(h,w);const l=await q.parseXmlBody(h.body,w);let G={};return G=a3(l.AssumeRoleWithSAMLResult,w),{$metadata:k(h),...G}},i0=async(h,w)=>{if(h.statusCode>=300)return L(h,w);const l=await q.parseXmlBody(h.body,w);let G={};return G=r3(l.AssumeRoleWithWebIdentityResult,w),{$metadata:k(h),...G}},c0=async(h,w)=>{if(h.statusCode>=300)return L(h,w);const l=await q.parseXmlBody(h.body,w);let G={};return G=s3(l.DecodeAuthorizationMessageResult,w),{$metadata:k(h),...G}},e0=async(h,w)=>{if(h.statusCode>=300)return L(h,w);const l=await q.parseXmlBody(h.body,w);let G={};return G=f3(l.GetAccessKeyInfoResult,w),{$metadata:k(h),...G}},p0=async(h,w)=>{if(h.statusCode>=300)return L(h,w);const l=await q.parseXmlBody(h.body,w);let G={};return G=C3(l.GetCallerIdentityResult,w),{$metadata:k(h),...G}},n0=async(h,w)=>{if(h.statusCode>=300)return L(h,w);const l=await q.parseXmlBody(h.body,w);let G={};return G=O3(l.GetFederationTokenResult,w),{$metadata:k(h),...G}},o0=async(h,w)=>{if(h.statusCode>=300)return L(h,w);const l=await q.parseXmlBody(h.body,w);let G={};return G=g3(l.GetSessionTokenResult,w),{$metadata:k(h),...G}},L=async(h,w)=>{const l={...h,body:await q.parseXmlErrorBody(h.body,w)},G=Sw(h,l.body);switch(G){case"ExpiredTokenException":case"com.amazonaws.sts#ExpiredTokenException":throw await F3(l,w);case"MalformedPolicyDocument":case"com.amazonaws.sts#MalformedPolicyDocumentException":throw await Y3(l,w);case"PackedPolicyTooLarge":case"com.amazonaws.sts#PackedPolicyTooLargeException":throw await Z3(l,w);case"RegionDisabledException":case"com.amazonaws.sts#RegionDisabledException":throw await $3(l,w);case"IDPRejectedClaim":case"com.amazonaws.sts#IDPRejectedClaimException":throw await y3(l,w);case"InvalidIdentityToken":case"com.amazonaws.sts#InvalidIdentityTokenException":throw await X3(l,w);case"IDPCommunicationError":case"com.amazonaws.sts#IDPCommunicationErrorException":throw await B3(l,w);case"InvalidAuthorizationMessageException":case"com.amazonaws.sts#InvalidAuthorizationMessageException":throw await Q3(l,w);default:const I=l.body;return u3({output:h,parsedBody:I.Error,errorCode:G})}},F3=async(h,w)=>{const l=h.body,G=_3(l.Error,w),I=new Sh({$metadata:k(h),...G});return T(I,l)},B3=async(h,w)=>{const l=h.body,G=x3(l.Error,w),I=new Kh({$metadata:k(h),...G});return T(I,l)},y3=async(h,w)=>{const l=h.body,G=i3(l.Error,w),I=new Eh({$metadata:k(h),...G});return T(I,l)},Q3=async(h,w)=>{const l=h.body,G=c3(l.Error,w),I=new Fh({$metadata:k(h),...G});return T(I,l)},X3=async(h,w)=>{const l=h.body,G=e3(l.Error,w),I=new kh({$metadata:k(h),...G});return T(I,l)},Y3=async(h,w)=>{const l=h.body,G=p3(l.Error,w),I=new mh({$metadata:k(h),...G});return T(I,l)},Z3=async(h,w)=>{const l=h.body,G=n3(l.Error,w),I=new Jh({$metadata:k(h),...G});return T(I,l)},$3=async(h,w)=>{const l=h.body,G=o3(l.Error,w),I=new Dh({$metadata:k(h),...G});return T(I,l)},U3=(h,w)=>{const l={};if(h[W]!=null)l[W]=h[W];if(h[i]!=null)l[i]=h[i];if(h[U]!=null){const G=Bh(h[U],w);if(h[U]?.length===0)l.PolicyArns=[];Object.entries(G).forEach(([I,H])=>{const d=`PolicyArns.${I}`;l[d]=H})}if(h[$]!=null)l[$]=h[$];if(h[Q]!=null)l[Q]=h[Q];if(h[e]!=null){const G=u0(h[e],w);if(h[e]?.length===0)l.Tags=[];Object.entries(G).forEach(([I,H])=>{const d=`Tags.${I}`;l[d]=H})}if(h[Oh]!=null){const G=R3(h[Oh],w);if(h[Oh]?.length===0)l.TransitiveTagKeys=[];Object.entries(G).forEach(([I,H])=>{const d=`TransitiveTagKeys.${I}`;l[d]=H})}if(h[Ph]!=null)l[Ph]=h[Ph];if(h[c]!=null)l[c]=h[c];if(h[p]!=null)l[p]=h[p];if(h[P]!=null)l[P]=h[P];if(h[Rh]!=null){const G=A3(h[Rh],w);if(h[Rh]?.length===0)l.ProvidedContexts=[];Object.entries(G).forEach(([I,H])=>{const d=`ProvidedContexts.${I}`;l[d]=H})}return l},V3=(h,w)=>{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[U]!=null){const G=Bh(h[U],w);if(h[U]?.length===0)l.PolicyArns=[];Object.entries(G).forEach(([I,H])=>{const d=`PolicyArns.${I}`;l[d]=H})}if(h[$]!=null)l[$]=h[$];if(h[Q]!=null)l[Q]=h[Q];return l},P3=(h,w)=>{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[U]!=null){const G=Bh(h[U],w);if(h[U]?.length===0)l.PolicyArns=[];Object.entries(G).forEach(([I,H])=>{const d=`PolicyArns.${I}`;l[d]=H})}if(h[$]!=null)l[$]=h[$];if(h[Q]!=null)l[Q]=h[Q];return l},v3=(h,w)=>{const l={};if(h[vh]!=null)l[vh]=h[vh];return l},q3=(h,w)=>{const l={};if(h[O]!=null)l[O]=h[O];return l},M3=(h,w)=>{return{}},z3=(h,w)=>{const l={};if(h[Wh]!=null)l[Wh]=h[Wh];if(h[$]!=null)l[$]=h[$];if(h[U]!=null){const G=Bh(h[U],w);if(h[U]?.length===0)l.PolicyArns=[];Object.entries(G).forEach(([I,H])=>{const d=`PolicyArns.${I}`;l[d]=H})}if(h[Q]!=null)l[Q]=h[Q];if(h[e]!=null){const G=u0(h[e],w);if(h[e]?.length===0)l.Tags=[];Object.entries(G).forEach(([I,H])=>{const d=`Tags.${I}`;l[d]=H})}return l},N3=(h,w)=>{const l={};if(h[Q]!=null)l[Q]=h[Q];if(h[c]!=null)l[c]=h[c];if(h[p]!=null)l[p]=h[p];return l},Bh=(h,w)=>{const l={};let G=1;for(let I of h){if(I===null)continue;const H=W3(I,w);Object.entries(H).forEach(([d,Y])=>{l[`member.${G}.${d}`]=Y}),G++}return l},W3=(h,w)=>{const l={};if(h[ch]!=null)l[ch]=h[ch];return l},T3=(h,w)=>{const l={};if(h[Lh]!=null)l[Lh]=h[Lh];if(h[$h]!=null)l[$h]=h[$h];return l},A3=(h,w)=>{const l={};let G=1;for(let I of h){if(I===null)continue;const H=T3(I,w);Object.entries(H).forEach(([d,Y])=>{l[`member.${G}.${d}`]=Y}),G++}return l},L3=(h,w)=>{const l={};if(h[Nh]!=null)l[Nh]=h[Nh];if(h[xh]!=null)l[xh]=h[xh];return l},R3=(h,w)=>{const l={};let G=1;for(let I of h){if(I===null)continue;l[`member.${G}`]=I,G++}return l},u0=(h,w)=>{const l={};let G=1;for(let I of h){if(I===null)continue;const H=L3(I,w);Object.entries(H).forEach(([d,Y])=>{l[`member.${G}.${d}`]=Y}),G++}return l},ph=(h,w)=>{const l={};if(h[Zh]!=null)l[Zh]=S(h[Zh]);if(h[N]!=null)l[N]=S(h[N]);return l},j3=(h,w)=>{const l={};if(h[y]!=null)l[y]=t(h[y],w);if(h[z]!=null)l[z]=ph(h[z],w);if(h[V]!=null)l[V]=u(h[V]);if(h[P]!=null)l[P]=S(h[P]);return l},a3=(h,w)=>{const l={};if(h[y]!=null)l[y]=t(h[y],w);if(h[z]!=null)l[z]=ph(h[z],w);if(h[V]!=null)l[V]=u(h[V]);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[P]!=null)l[P]=S(h[P]);return l},r3=(h,w)=>{const l={};if(h[y]!=null)l[y]=t(h[y],w);if(h[bh]!=null)l[bh]=S(h[bh]);if(h[z]!=null)l[z]=ph(h[z],w);if(h[V]!=null)l[V]=u(h[V]);if(h[ah]!=null)l[ah]=S(h[ah]);if(h[x]!=null)l[x]=S(h[x]);if(h[P]!=null)l[P]=S(h[P]);return l},t=(h,w)=>{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[Vh]!=null)l[Vh]=L0(R0(h[Vh]));return l},s3=(h,w)=>{const l={};if(h[Uh]!=null)l[Uh]=S(h[Uh]);return l},_3=(h,w)=>{const l={};if(h[m]!=null)l[m]=S(h[m]);return l},b3=(h,w)=>{const l={};if(h[Mh]!=null)l[Mh]=S(h[Mh]);if(h[N]!=null)l[N]=S(h[N]);return l},f3=(h,w)=>{const l={};if(h[g]!=null)l[g]=S(h[g]);return l},C3=(h,w)=>{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},O3=(h,w)=>{const l={};if(h[y]!=null)l[y]=t(h[y],w);if(h[qh]!=null)l[qh]=b3(h[qh],w);if(h[V]!=null)l[V]=u(h[V]);return l},g3=(h,w)=>{const l={};if(h[y]!=null)l[y]=t(h[y],w);return l},x3=(h,w)=>{const l={};if(h[m]!=null)l[m]=S(h[m]);return l},i3=(h,w)=>{const l={};if(h[m]!=null)l[m]=S(h[m]);return l},c3=(h,w)=>{const l={};if(h[m]!=null)l[m]=S(h[m]);return l},e3=(h,w)=>{const l={};if(h[m]!=null)l[m]=S(h[m]);return l},p3=(h,w)=>{const l={};if(h[m]!=null)l[m]=S(h[m]);return l},n3=(h,w)=>{const l={};if(h[m]!=null)l[m]=S(h[m]);return l},o3=(h,w)=>{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 u3=j0(X),R=async(h,w,l,G,I)=>{const{hostname:H,protocol:d="https",port:Y,path:M}=await h.endpoint(),v={protocol:d,hostname:H,port:Y,method:"POST",path:M.endsWith("/")?M.slice(0,-1)+l:M+l,headers:w};if(G!==void 0)v.hostname=G;if(I!==void 0)v.body=I;return new A0(v)},j={"content-type":"application/x-www-form-urlencoded"},a="2011-06-15",r="Action",O="AccessKeyId",t3="AssumeRole",Zh="AssumedRoleId",z="AssumedRoleUser",hw="AssumeRoleWithSAML",lw="AssumeRoleWithWebIdentity",g="Account",N="Arn",x="Audience",y="Credentials",$h="ContextAssertion",ww="DecodeAuthorizationMessage",Uh="DecodedMessage",Q="DurationSeconds",Vh="Expiration",Ph="ExternalId",vh="EncodedMessage",qh="FederatedUser",Mh="FederatedUserId",Gw="GetAccessKeyInfo",Iw="GetCallerIdentity",dw="GetFederationToken",Hw="GetSessionToken",zh="Issuer",Nh="Key",Wh="Name",Th="NameQualifier",$="Policy",U="PolicyArns",Ah="PrincipalArn",Lh="ProviderArn",Rh="ProvidedContexts",jh="ProviderId",V="PackedPolicySize",ah="Provider",W="RoleArn",i="RoleSessionName",rh="Subject",sh="SecretAccessKey",_h="SAMLAssertion",bh="SubjectFromWebIdentityToken",P="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(([w,l])=>eh(w)+"="+eh(l)).join("&"),Sw=(h,w)=>{if(w.Error?.Code!==void 0)return w.Error.Code;if(h.statusCode==404)return"NotFound"};class hh extends B.classBuilder().ep({...D}).m(function(h,w,l,G){return[K(l,this.serialize,this.deserialize),F(l,h.getEndpointParameterInstructions())]}).s("AWSSecurityTokenServiceV20110615","AssumeRole",{}).n("STSClient","AssumeRoleCommand").f(void 0,v0).ser(a0).de(g0).build(){}class nh extends B.classBuilder().ep({...D}).m(function(h,w,l,G){return[K(l,this.serialize,this.deserialize),F(l,h.getEndpointParameterInstructions())]}).s("AWSSecurityTokenServiceV20110615","AssumeRoleWithSAML",{}).n("STSClient","AssumeRoleWithSAMLCommand").f(q0,M0).ser(r0).de(x0).build(){}class lh extends B.classBuilder().ep({...D}).m(function(h,w,l,G){return[K(l,this.serialize,this.deserialize),F(l,h.getEndpointParameterInstructions())]}).s("AWSSecurityTokenServiceV20110615","AssumeRoleWithWebIdentity",{}).n("STSClient","AssumeRoleWithWebIdentityCommand").f(z0,N0).ser(s0).de(i0).build(){}class oh extends B.classBuilder().ep({...D}).m(function(h,w,l,G){return[K(l,this.serialize,this.deserialize),F(l,h.getEndpointParameterInstructions())]}).s("AWSSecurityTokenServiceV20110615","DecodeAuthorizationMessage",{}).n("STSClient","DecodeAuthorizationMessageCommand").f(void 0,void 0).ser(_0).de(c0).build(){}class uh extends B.classBuilder().ep({...D}).m(function(h,w,l,G){return[K(l,this.serialize,this.deserialize),F(l,h.getEndpointParameterInstructions())]}).s("AWSSecurityTokenServiceV20110615","GetAccessKeyInfo",{}).n("STSClient","GetAccessKeyInfoCommand").f(void 0,void 0).ser(b0).de(e0).build(){}class th extends B.classBuilder().ep({...D}).m(function(h,w,l,G){return[K(l,this.serialize,this.deserialize),F(l,h.getEndpointParameterInstructions())]}).s("AWSSecurityTokenServiceV20110615","GetCallerIdentity",{}).n("STSClient","GetCallerIdentityCommand").f(void 0,void 0).ser(f0).de(p0).build(){}class hl extends B.classBuilder().ep({...D}).m(function(h,w,l,G){return[K(l,this.serialize,this.deserialize),F(l,h.getEndpointParameterInstructions())]}).s("AWSSecurityTokenServiceV20110615","GetFederationToken",{}).n("STSClient","GetFederationTokenCommand").f(void 0,W0).ser(C0).de(n0).build(){}class ll extends B.classBuilder().ep({...D}).m(function(h,w,l,G){return[K(l,this.serialize,this.deserialize),F(l,h.getEndpointParameterInstructions())]}).s("AWSSecurityTokenServiceV20110615","GetSessionToken",{}).n("STSClient","GetSessionTokenCommand").f(void 0,T0).ser(O0).de(o0).build(){}var mw={AssumeRoleCommand:hh,AssumeRoleWithSAMLCommand:nh,AssumeRoleWithWebIdentityCommand:lh,DecodeAuthorizationMessageCommand:oh,GetAccessKeyInfoCommand:uh,GetCallerIdentityCommand:th,GetFederationTokenCommand:hl,GetSessionTokenCommand:ll};class h3 extends A{}t0(mw,h3);var l3="us-east-1",w3=(h)=>{if(typeof h?.Arn==="string"){const w=h.Arn.split(":");if(w.length>4&&w[4]!=="")return w[4]}return},G3=async(h,w,l)=>{const G=typeof h==="function"?await h():h,I=typeof w==="function"?await w():w;return l?.debug?.("@aws-sdk/client-sts::resolveRegion","accepting first of:",`${G} (provider)`,`${I} (parent client)`,`${l3} (STS default)`),G??I??l3},I3=(h,w)=>{let l,G;return async(I,H)=>{if(G=I,!l){const{logger:v=h?.parentClientConfig?.logger,region:n,requestHandler:wh=h?.parentClientConfig?.requestHandler,credentialProviderLogger:yh}=h,m3=await G3(n,h?.parentClientConfig?.region,yh),J3=!H3(wh);l=new w({credentialDefaultProvider:()=>async()=>G,region:m3,requestHandler:J3?wh:void 0,logger:v})}const{Credentials:d,AssumedRoleUser:Y}=await l.send(new hh(H));if(!d||!d.AccessKeyId||!d.SecretAccessKey)throw new Error(`Invalid response from STS.assumeRole call with role ${H.RoleArn}`);const M=w3(Y);return{accessKeyId:d.AccessKeyId,secretAccessKey:d.SecretAccessKey,sessionToken:d.SessionToken,expiration:d.Expiration,...d.CredentialScope&&{credentialScope:d.CredentialScope},...M&&{accountId:M}}}},d3=(h,w)=>{let l;return async(G)=>{if(!l){const{logger:Y=h?.parentClientConfig?.logger,region:M,requestHandler:v=h?.parentClientConfig?.requestHandler,credentialProviderLogger:n}=h,wh=await G3(M,h?.parentClientConfig?.region,n),yh=!H3(v);l=new w({region:wh,requestHandler:yh?v:void 0,logger:Y})}const{Credentials:I,AssumedRoleUser:H}=await l.send(new lh(G));if(!I||!I.AccessKeyId||!I.SecretAccessKey)throw new Error(`Invalid response from STS.assumeRoleWithWebIdentity call with role ${G.RoleArn}`);const d=w3(H);return{accessKeyId:I.AccessKeyId,secretAccessKey:I.SecretAccessKey,sessionToken:I.SessionToken,expiration:I.Expiration,...I.CredentialScope&&{credentialScope:I.CredentialScope},...d&&{accountId:d}}}};var H3=(h)=>{return h?.metadata?.handlerProtocol==="h2"};var S3=(h,w)=>{if(!w)return h;else return class l extends h{constructor(G){super(G);for(let I of w)this.middlewareStack.use(I)}}},Jw=(h={},w)=>I3(h,S3(A,w)),Dw=(h={},w)=>d3(h,S3(A,w)),jI=(h)=>(w)=>h({roleAssumer:Jw(w),roleAssumerWithWebIdentity:Dw(w),...w});export{Dw as getDefaultRoleAssumerWithWebIdentity,Jw as getDefaultRoleAssumer,jI as decorateDefaultCredentialProvider,U0 as __Client,X as STSServiceException,A as STSClient,h3 as STS,Dh as RegionDisabledException,Jh as PackedPolicyTooLargeException,mh as MalformedPolicyDocumentException,kh as InvalidIdentityTokenException,Fh as InvalidAuthorizationMessageException,Eh as IDPRejectedClaimException,Kh as IDPCommunicationErrorException,T0 as GetSessionTokenResponseFilterSensitiveLog,ll as GetSessionTokenCommand,W0 as GetFederationTokenResponseFilterSensitiveLog,hl as GetFederationTokenCommand,th as GetCallerIdentityCommand,uh as GetAccessKeyInfoCommand,Sh as ExpiredTokenException,oh as DecodeAuthorizationMessageCommand,o as CredentialsFilterSensitiveLog,N0 as AssumeRoleWithWebIdentityResponseFilterSensitiveLog,z0 as AssumeRoleWithWebIdentityRequestFilterSensitiveLog,lh as AssumeRoleWithWebIdentityCommand,M0 as AssumeRoleWithSAMLResponseFilterSensitiveLog,q0 as AssumeRoleWithSAMLRequestFilterSensitiveLog,nh as AssumeRoleWithSAMLCommand,v0 as AssumeRoleResponseFilterSensitiveLog,hh as AssumeRoleCommand,B as $Command};
|
|
3
|
-
|
|
4
|
-
//# debugId=8D3D89065671BB3864756E2164756E21
|
|
5
|
-
//# sourceMappingURL=chunk-h3ygxbt8.js.map
|