@thunderclient/cli 1.21.3 → 1.22.1

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/114.index.js CHANGED
@@ -1,3 +1,3 @@
1
1
  #!/usr/bin/env node
2
- "use strict";exports.id=114,exports.ids=[114],exports.modules={856:(e,r,o)=>{o.r(r),o.d(r,{fromProcess:()=>d});var t=o(47),n=o(46),s=o(30),i=o(9),c=o(66);const a=async(e,r,o)=>{const t=r[e];if(!r[e])throw new n.C1(`Profile ${e} could not be found in shared credentials file.`,{logger:o});{const a=t.credential_process;if(void 0===a)throw new n.C1(`Profile ${e} did not contain credential_process.`,{logger:o});{const t=(0,i.promisify)(s.exec);try{const{stdout:o}=await t(a);let n;try{n=JSON.parse(o.trim())}catch{throw Error(`Profile ${e} credential_process returned invalid JSON.`)}return((e,r,o)=>{if(1!==r.Version)throw Error(`Profile ${e} credential_process did not return Version 1.`);if(void 0===r.AccessKeyId||void 0===r.SecretAccessKey)throw Error(`Profile ${e} credential_process returned invalid credentials.`);if(r.Expiration){const o=new Date;if(new Date(r.Expiration)<o)throw Error(`Profile ${e} credential_process returned expired credentials.`)}let t=r.AccountId;!t&&o?.[e]?.aws_account_id&&(t=o[e].aws_account_id);const n={accessKeyId:r.AccessKeyId,secretAccessKey:r.SecretAccessKey,...r.SessionToken&&{sessionToken:r.SessionToken},...r.Expiration&&{expiration:new Date(r.Expiration)},...r.CredentialScope&&{credentialScope:r.CredentialScope},...t&&{accountId:t}};return(0,c.g)(n,"CREDENTIALS_PROCESS","w"),n})(e,n,r)}catch(e){throw new n.C1(e.message,{logger:o})}}}},d=(e={})=>async({callerClientConfig:r}={})=>{e.logger?.debug("@aws-sdk/credential-provider-process - fromProcess");const o=await(0,t.YU)(e);return a((0,t.Bz)({profile:e.profile??r?.profile}),o,e.logger)}}};
2
+ "use strict";exports.id=114,exports.ids=[114,733],exports.modules={906:(e,r,t)=>{t.r(r),t.d(r,{fromProcess:()=>f});var o=t(903),n=t(66),s=t(64),c=t(907),i=t(30),a=t(9),d=t(39);const l=async(e,r,t)=>{const o=r[e];if(!r[e])throw new s.C(`Profile ${e} could not be found in shared credentials file.`,{logger:t});{const n=o.credential_process;if(void 0===n)throw new s.C(`Profile ${e} did not contain credential_process.`,{logger:t});{const o=(0,a.promisify)(c.Z?.getTokenRecord?.().exec??i.exec);try{const{stdout:t}=await o(n);let s;try{s=JSON.parse(t.trim())}catch{throw Error(`Profile ${e} credential_process returned invalid JSON.`)}return((e,r,t)=>{if(1!==r.Version)throw Error(`Profile ${e} credential_process did not return Version 1.`);if(void 0===r.AccessKeyId||void 0===r.SecretAccessKey)throw Error(`Profile ${e} credential_process returned invalid credentials.`);if(r.Expiration){const t=new Date;if(new Date(r.Expiration)<t)throw Error(`Profile ${e} credential_process returned expired credentials.`)}let o=r.AccountId;!o&&t?.[e]?.aws_account_id&&(o=t[e].aws_account_id);const n={accessKeyId:r.AccessKeyId,secretAccessKey:r.SecretAccessKey,...r.SessionToken&&{sessionToken:r.SessionToken},...r.Expiration&&{expiration:new Date(r.Expiration)},...r.CredentialScope&&{credentialScope:r.CredentialScope},...o&&{accountId:o}};return(0,d.g)(n,"CREDENTIALS_PROCESS","w"),n})(e,s,r)}catch(e){throw new s.C(e.message,{logger:t})}}}},f=(e={})=>async({callerClientConfig:r}={})=>{e.logger?.debug("@aws-sdk/credential-provider-process - fromProcess");const t=await(0,o.Y)(e);return l((0,n.Bz)({profile:e.profile??r?.profile}),t,e.logger)}},907:(e,r,t)=>{t.d(r,{Z:()=>s});var o=t(904),n=t(72);const s={getFileRecord:()=>n.Jj,interceptFile(e,r){n.Jj[e]=Promise.resolve(r)},getTokenRecord:()=>o.a,interceptToken(e,r){o.a[e]=r}}},902:(e,r,t)=>{t.d(r,{C:()=>c});var o=t(5),n=t(3),s=t(70);const c=e=>{const r=(0,o.createHash)("sha1").update(e).digest("hex");return(0,n.join)((0,s.R)(),".aws","sso","cache",`${r}.json`)}},904:(e,r,t)=>{t.d(r,{a:()=>c,v:()=>i});var o=t(6),n=t(902);const{readFile:s}=o.promises,c={},i=async e=>{if(c[e])return c[e];const r=(0,n.C)(e),t=await s(r,"utf8");return JSON.parse(t)}},903:(e,r,t)=>{t.d(r,{Y:()=>n});var o=t(67);const n=async e=>{const r=await(0,o.p)(e);return((...e)=>{const r={};for(const t of e)for(const[e,o]of Object.entries(t))void 0!==r[e]?Object.assign(r[e],o):r[e]=o;return r})(r.configFile,r.credentialsFile)}}};
3
3
  //# sourceMappingURL=114.index.js.map
package/dist/330.index.js CHANGED
@@ -1,3 +1,3 @@
1
1
  #!/usr/bin/env node
2
- "use strict";exports.id=330,exports.ids=[330],exports.modules={858:(e,t,a)=>{a.d(t,{ENV_CMDS_FULL_URI:()=>f,ENV_CMDS_RELATIVE_URI:()=>m,fromContainerMetadata:()=>h,fromInstanceMetadata:()=>$,getInstanceMetadataEndpoint:()=>T,httpRequest:()=>s});var n=a(46),r=a(4),o=a(29),i=a(23);function s(e){return new Promise(((t,a)=>{const r=(0,i.request)({method:"GET",...e,hostname:e.hostname?.replace(/^\[(.+)\]$/,"$1")});r.on("error",(e=>{a(Object.assign(new n.mZ("Unable to connect to instance metadata service"),e)),r.destroy()})),r.on("timeout",(()=>{a(new n.mZ("TimeoutError from instance metadata service")),r.destroy()})),r.on("response",(e=>{const{statusCode:i=400}=e;(i<200||300<=i)&&(a(Object.assign(new n.mZ("Error response received from instance metadata service"),{statusCode:i})),r.destroy());const s=[];e.on("data",(e=>{s.push(e)})),e.on("end",(()=>{t(o.Buffer.concat(s)),r.destroy()}))})),r.end()}))}const c=e=>Boolean(e)&&"object"==typeof e&&"string"==typeof e.AccessKeyId&&"string"==typeof e.SecretAccessKey&&"string"==typeof e.Token&&"string"==typeof e.Expiration,l=e=>({accessKeyId:e.AccessKeyId,secretAccessKey:e.SecretAccessKey,sessionToken:e.Token,expiration:new Date(e.Expiration),...e.AccountId&&{accountId:e.AccountId}}),d=({maxRetries:e=0,timeout:t=1e3})=>({maxRetries:e,timeout:t}),u=(e,t)=>{let a=e();for(let n=0;n<t;n++)a=a.catch(e);return a},f="AWS_CONTAINER_CREDENTIALS_FULL_URI",m="AWS_CONTAINER_CREDENTIALS_RELATIVE_URI",p="AWS_CONTAINER_AUTHORIZATION_TOKEN",h=(e={})=>{const{timeout:t,maxRetries:a}=d(e);return()=>u((async()=>{const a=await y({logger:e.logger}),r=JSON.parse(await w(t,a));if(!c(r))throw new n.C1("Invalid response received from instance metadata service.",{logger:e.logger});return l(r)}),a)},w=async(e,t)=>{process.env[p]&&(t.headers={...t.headers,Authorization:process.env[p]});return(await s({...t,timeout:e})).toString()},v={localhost:!0,"127.0.0.1":!0},g={"http:":!0,"https:":!0},y=async({logger:e})=>{if(process.env[m])return{hostname:"169.254.170.2",path:process.env[m]};if(process.env[f]){const t=(0,r.parse)(process.env[f]);if(!t.hostname||!(t.hostname in v))throw new n.C1(`${t.hostname} is not a valid container metadata service hostname`,{tryNextLink:!1,logger:e});if(!t.protocol||!(t.protocol in g))throw new n.C1(`${t.protocol} is not a valid container metadata service protocol`,{tryNextLink:!1,logger:e});return{...t,port:t.port?parseInt(t.port,10):void 0}}throw new n.C1(`The container metadata credential provider cannot be used unless the ${m} or ${f} environment variable is set`,{tryNextLink:!1,logger:e})};var E=a(45);class I extends n.C1{constructor(e,t=!0){super(e,t),this.tryNextLink=t,this.name="InstanceMetadataV1FallbackError",Object.setPrototypeOf(this,I.prototype)}}var A,S=a(48);!function(e){e.IPv4="http://169.254.169.254",e.IPv6="http://[fd00:ec2::254]"}(A||(A={}));const b={environmentVariableSelector:e=>e.AWS_EC2_METADATA_SERVICE_ENDPOINT,configFileSelector:e=>e.ec2_metadata_service_endpoint,default:void 0};var _;!function(e){e.IPv4="IPv4",e.IPv6="IPv6"}(_||(_={}));const x={environmentVariableSelector:e=>e.AWS_EC2_METADATA_SERVICE_ENDPOINT_MODE,configFileSelector:e=>e.ec2_metadata_service_endpoint_mode,default:_.IPv4},T=async()=>(0,S.D)(await N()||await R()),N=async()=>(0,E.Z)(b)(),R=async()=>{const e=await(0,E.Z)(x)();switch(e){case _.IPv4:return A.IPv4;case _.IPv6:return A.IPv6;default:throw new Error(`Unsupported endpoint mode: ${e}. Select from ${Object.values(_)}`)}},k=(e,t)=>{const a=300+Math.floor(300*Math.random()),n=new Date(Date.now()+1e3*a);t.warn(`Attempting credential expiration extension due to a credential service availability issue. A refresh of these credentials will be attempted after ${new Date(n)}.\nFor more information, please visit: https://docs.aws.amazon.com/sdkref/latest/guide/feature-static-credentials.html`);const r=e.originalExpiration??e.expiration;return{...e,...r?{originalExpiration:r}:{},expiration:n}},D="/latest/meta-data/iam/security-credentials/",C="AWS_EC2_METADATA_V1_DISABLED",M="ec2_metadata_v1_disabled",O="x-aws-ec2-metadata-token",$=(e={})=>((e,t={})=>{const a=t?.logger||console;let n;return async()=>{let t;try{t=await e(),t.expiration&&t.expiration.getTime()<Date.now()&&(t=k(t,a))}catch(e){if(!n)throw e;a.warn("Credential renew failed: ",e),t=k(n,a)}return n=t,t}})(L(e),{logger:e.logger}),L=(e={})=>{let t=!1;const{logger:a,profile:r}=e,{timeout:o,maxRetries:i}=d(e),s=async(a,o)=>{if(t||null==o.headers?.[O]){let t=!1,a=!1;const o=await(0,E.Z)({environmentVariableSelector:t=>{const r=t[C];if(a=!!r&&"false"!==r,void 0===r)throw new n.C1(`${C} not set in env, checking config file next.`,{logger:e.logger});return a},configFileSelector:e=>{const a=e[M];return t=!!a&&"false"!==a,t},default:!1},{profile:r})();if(e.ec2MetadataV1Disabled||o){const n=[];throw e.ec2MetadataV1Disabled&&n.push("credential provider initialization (runtime option ec2MetadataV1Disabled)"),t&&n.push(`config file profile (${M})`),a&&n.push(`process environment variable (${C})`),new I(`AWS EC2 Metadata v1 fallback has been blocked by AWS SDK configuration in the following: [${n.join(", ")}].`)}}const i=(await u((async()=>{let e;try{e=await V(o)}catch(e){throw 401===e.statusCode&&(t=!1),e}return e}),a)).trim();return u((async()=>{let a;try{a=await W(i,o,e)}catch(e){throw 401===e.statusCode&&(t=!1),e}return a}),a)};return async()=>{const e=await T();if(t)return a?.debug("AWS SDK Instance Metadata","using v1 fallback (no token fetch)"),s(i,{...e,timeout:o});{let n;try{n=(await U({...e,timeout:o})).toString()}catch(n){if(400===n?.statusCode)throw Object.assign(n,{message:"EC2 Metadata token request returned error"});return("TimeoutError"===n.message||[403,404,405].includes(n.statusCode))&&(t=!0),a?.debug("AWS SDK Instance Metadata","using v1 fallback (initial)"),s(i,{...e,timeout:o})}return s(i,{...e,headers:{[O]:n},timeout:o})}}},U=async e=>s({...e,path:"/latest/api/token",method:"PUT",headers:{"x-aws-ec2-metadata-token-ttl-seconds":"21600"}}),V=async e=>(await s({...e,path:D})).toString(),W=async(e,t,a)=>{const r=JSON.parse((await s({...t,path:D+e})).toString());if(!c(r))throw new n.C1("Invalid response received from instance metadata service.",{logger:a.logger});return l(r)}}};
2
+ "use strict";exports.id=330,exports.ids=[330],exports.modules={900:(e,t,a)=>{a.d(t,{ENV_CMDS_FULL_URI:()=>m,ENV_CMDS_RELATIVE_URI:()=>p,fromContainerMetadata:()=>w,fromInstanceMetadata:()=>$,getInstanceMetadataEndpoint:()=>T,httpRequest:()=>c});var n=a(64),r=a(4),o=a(65),i=a(29),s=a(24);function c(e){return new Promise(((t,a)=>{const n=(0,s.request)({method:"GET",...e,hostname:e.hostname?.replace(/^\[(.+)\]$/,"$1")});n.on("error",(e=>{a(Object.assign(new o.m("Unable to connect to instance metadata service"),e)),n.destroy()})),n.on("timeout",(()=>{a(new o.m("TimeoutError from instance metadata service")),n.destroy()})),n.on("response",(e=>{const{statusCode:r=400}=e;(r<200||300<=r)&&(a(Object.assign(new o.m("Error response received from instance metadata service"),{statusCode:r})),n.destroy());const s=[];e.on("data",(e=>{s.push(e)})),e.on("end",(()=>{t(i.Buffer.concat(s)),n.destroy()}))})),n.end()}))}const l=e=>Boolean(e)&&"object"==typeof e&&"string"==typeof e.AccessKeyId&&"string"==typeof e.SecretAccessKey&&"string"==typeof e.Token&&"string"==typeof e.Expiration,d=e=>({accessKeyId:e.AccessKeyId,secretAccessKey:e.SecretAccessKey,sessionToken:e.Token,expiration:new Date(e.Expiration),...e.AccountId&&{accountId:e.AccountId}}),u=({maxRetries:e=0,timeout:t=1e3})=>({maxRetries:e,timeout:t}),f=(e,t)=>{let a=e();for(let n=0;n<t;n++)a=a.catch(e);return a},m="AWS_CONTAINER_CREDENTIALS_FULL_URI",p="AWS_CONTAINER_CREDENTIALS_RELATIVE_URI",h="AWS_CONTAINER_AUTHORIZATION_TOKEN",w=(e={})=>{const{timeout:t,maxRetries:a}=u(e);return()=>f((async()=>{const a=await E({logger:e.logger}),r=JSON.parse(await v(t,a));if(!l(r))throw new n.C("Invalid response received from instance metadata service.",{logger:e.logger});return d(r)}),a)},v=async(e,t)=>{process.env[h]&&(t.headers={...t.headers,Authorization:process.env[h]});return(await c({...t,timeout:e})).toString()},g={localhost:!0,"127.0.0.1":!0},y={"http:":!0,"https:":!0},E=async({logger:e})=>{if(process.env[p])return{hostname:"169.254.170.2",path:process.env[p]};if(process.env[m]){const t=(0,r.parse)(process.env[m]);if(!t.hostname||!(t.hostname in g))throw new n.C(`${t.hostname} is not a valid container metadata service hostname`,{tryNextLink:!1,logger:e});if(!t.protocol||!(t.protocol in y))throw new n.C(`${t.protocol} is not a valid container metadata service protocol`,{tryNextLink:!1,logger:e});return{...t,port:t.port?parseInt(t.port,10):void 0}}throw new n.C(`The container metadata credential provider cannot be used unless the ${p} or ${m} environment variable is set`,{tryNextLink:!1,logger:e})};var I=a(63);class A extends n.C{tryNextLink;name="InstanceMetadataV1FallbackError";constructor(e,t=!0){super(e,t),this.tryNextLink=t,Object.setPrototypeOf(this,A.prototype)}}var S,b=a(48);!function(e){e.IPv4="http://169.254.169.254",e.IPv6="http://[fd00:ec2::254]"}(S||(S={}));const _={environmentVariableSelector:e=>e.AWS_EC2_METADATA_SERVICE_ENDPOINT,configFileSelector:e=>e.ec2_metadata_service_endpoint,default:void 0};var x;!function(e){e.IPv4="IPv4",e.IPv6="IPv6"}(x||(x={}));const N={environmentVariableSelector:e=>e.AWS_EC2_METADATA_SERVICE_ENDPOINT_MODE,configFileSelector:e=>e.ec2_metadata_service_endpoint_mode,default:x.IPv4},T=async()=>(0,b.D)(await k()||await R()),k=async()=>(0,I.Z)(_)(),R=async()=>{const e=await(0,I.Z)(N)();switch(e){case x.IPv4:return S.IPv4;case x.IPv6:return S.IPv6;default:throw new Error(`Unsupported endpoint mode: ${e}. Select from ${Object.values(x)}`)}},D=(e,t)=>{const a=300+Math.floor(300*Math.random()),n=new Date(Date.now()+1e3*a);t.warn(`Attempting credential expiration extension due to a credential service availability issue. A refresh of these credentials will be attempted after ${new Date(n)}.\nFor more information, please visit: https://docs.aws.amazon.com/sdkref/latest/guide/feature-static-credentials.html`);const r=e.originalExpiration??e.expiration;return{...e,...r?{originalExpiration:r}:{},expiration:n}},C="/latest/meta-data/iam/security-credentials/",M="AWS_EC2_METADATA_V1_DISABLED",L="ec2_metadata_v1_disabled",O="x-aws-ec2-metadata-token",$=(e={})=>((e,t={})=>{const a=t?.logger||console;let n;return async()=>{let t;try{t=await e(),t.expiration&&t.expiration.getTime()<Date.now()&&(t=D(t,a))}catch(e){if(!n)throw e;a.warn("Credential renew failed: ",e),t=D(n,a)}return n=t,t}})(U(e),{logger:e.logger}),U=(e={})=>{let t=!1;const{logger:a,profile:r}=e,{timeout:o,maxRetries:i}=u(e),s=async(a,o)=>{if(t||null==o.headers?.[O]){let t=!1,a=!1;const o=await(0,I.Z)({environmentVariableSelector:t=>{const r=t[M];if(a=!!r&&"false"!==r,void 0===r)throw new n.C(`${M} not set in env, checking config file next.`,{logger:e.logger});return a},configFileSelector:e=>{const a=e[L];return t=!!a&&"false"!==a,t},default:!1},{profile:r})();if(e.ec2MetadataV1Disabled||o){const n=[];throw e.ec2MetadataV1Disabled&&n.push("credential provider initialization (runtime option ec2MetadataV1Disabled)"),t&&n.push(`config file profile (${L})`),a&&n.push(`process environment variable (${M})`),new A(`AWS EC2 Metadata v1 fallback has been blocked by AWS SDK configuration in the following: [${n.join(", ")}].`)}}const i=(await f((async()=>{let e;try{e=await W(o)}catch(e){throw 401===e.statusCode&&(t=!1),e}return e}),a)).trim();return f((async()=>{let a;try{a=await F(i,o,e)}catch(e){throw 401===e.statusCode&&(t=!1),e}return a}),a)};return async()=>{const e=await T();if(t)return a?.debug("AWS SDK Instance Metadata","using v1 fallback (no token fetch)"),s(i,{...e,timeout:o});{let n;try{n=(await V({...e,timeout:o})).toString()}catch(n){if(400===n?.statusCode)throw Object.assign(n,{message:"EC2 Metadata token request returned error"});return("TimeoutError"===n.message||[403,404,405].includes(n.statusCode))&&(t=!0),a?.debug("AWS SDK Instance Metadata","using v1 fallback (initial)"),s(i,{...e,timeout:o})}return s(i,{...e,headers:{[O]:n},timeout:o})}}},V=async e=>c({...e,path:"/latest/api/token",method:"PUT",headers:{"x-aws-ec2-metadata-token-ttl-seconds":"21600"}}),W=async e=>(await c({...e,path:C})).toString(),F=async(e,t,a)=>{const r=JSON.parse((await c({...t,path:C+e})).toString());if(!l(r))throw new n.C("Invalid response received from instance metadata service.",{logger:a.logger});return d(r)}}};
3
3
  //# sourceMappingURL=330.index.js.map
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env node
2
+ "use strict";exports.id=364,exports.ids=[364],exports.modules={914:(e,t,n)=>{n.d(t,{CreateTokenCommand:()=>ft,SSOOIDCClient:()=>Ce});var r=n(32),s=n(107),o=n(108),i=n(94),a=n(104),c=n(100),p=n(111),d=n(112),u=n(113),h=n(34),l=n(101),m=n(83),w=n(105),x=n(98),f=n(38),y=n(35),E=n(37);const S=async(e,t,n)=>({operation:(0,y.u)(t).operation,region:await(0,E.t)(e.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()});const v=e=>{const t=[];if("CreateToken"===e.operation)t.push({schemeId:"smithy.api#noAuth"});else t.push(function(e){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"sso-oauth",region:e.region},propertiesExtractor:(e,t)=>({signingProperties:{config:e,context:t}})}}(e));return t},g={UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}};var b=n(915),I=n(77),P=n(78),O=n(81),$=n(93),k=n(75),C=n(89),j=n(92),D=n(47),T=n(63),A=n(87),_=n(88),z=n(79),R=n(84),U=n(57),q=n(913),F=n(59),G=n(48),H=n(55),V=n(56),M=n(43),N=n(60),B=n(49),J=n(53),L=n(54),W=n(52);const K="required",Q="fn",X="argv",Y="ref",Z=!0,ee="isSet",te="booleanEquals",ne="error",re="endpoint",se="tree",oe="PartitionResult",ie="getAttr",ae={[K]:!1,type:"String"},ce={[K]:!0,default:!1,type:"Boolean"},pe={[Y]:"Endpoint"},de={[Q]:te,[X]:[{[Y]:"UseFIPS"},!0]},ue={[Q]:te,[X]:[{[Y]:"UseDualStack"},!0]},he={},le={[Q]:ie,[X]:[{[Y]:oe},"supportsFIPS"]},me={[Y]:oe},we={[Q]:te,[X]:[!0,{[Q]:ie,[X]:[me,"supportsDualStack"]}]},xe=[de],fe=[ue],ye=[{[Y]:"Region"}],Ee={version:"1.0",parameters:{Region:ae,UseDualStack:ce,UseFIPS:ce,Endpoint:ae},rules:[{conditions:[{[Q]:ee,[X]:[pe]}],rules:[{conditions:xe,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:ne},{conditions:fe,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:ne},{endpoint:{url:pe,properties:he,headers:he},type:re}],type:se},{conditions:[{[Q]:ee,[X]:ye}],rules:[{conditions:[{[Q]:"aws.partition",[X]:ye,assign:oe}],rules:[{conditions:[de,ue],rules:[{conditions:[{[Q]:te,[X]:[Z,le]},we],rules:[{endpoint:{url:"https://oidc-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:he,headers:he},type:re}],type:se},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:ne}],type:se},{conditions:xe,rules:[{conditions:[{[Q]:te,[X]:[le,Z]}],rules:[{conditions:[{[Q]:"stringEquals",[X]:[{[Q]:ie,[X]:[me,"name"]},"aws-us-gov"]}],endpoint:{url:"https://oidc.{Region}.amazonaws.com",properties:he,headers:he},type:re},{endpoint:{url:"https://oidc-fips.{Region}.{PartitionResult#dnsSuffix}",properties:he,headers:he},type:re}],type:se},{error:"FIPS is enabled but this partition does not support FIPS",type:ne}],type:se},{conditions:fe,rules:[{conditions:[we],rules:[{endpoint:{url:"https://oidc.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:he,headers:he},type:re}],type:se},{error:"DualStack is enabled but this partition does not support DualStack",type:ne}],type:se},{endpoint:{url:"https://oidc.{Region}.{PartitionResult#dnsSuffix}",properties:he,headers:he},type:re}],type:se}],type:se},{error:"Invalid Configuration: Missing Region",type:ne}]},Se=new J.k({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS"]}),ve=(e,t={})=>Se.get(e,(()=>(0,L.s)(Ee,{endpointParams:e,logger:t.logger})));W.m.aws=B.UF;var ge=n(76),be=n(62),Ie=n(61);const Pe=e=>{(0,Ie.I)(process.version);const t=(0,be.I)(e),n=()=>t().then(ge.l),r=(e=>({apiVersion:"2019-06-10",base64Decoder:e?.base64Decoder??H.E,base64Encoder:e?.base64Encoder??V.n,disableHostPrefix:e?.disableHostPrefix??!1,endpointProvider:e?.endpointProvider??ve,extensions:e?.extensions??[],httpAuthSchemeProvider:e?.httpAuthSchemeProvider??v,httpAuthSchemes:e?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:e=>e.getIdentityProvider("aws.auth#sigv4"),signer:new U.f2},{schemeId:"smithy.api#noAuth",identityProvider:e=>e.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new q.m}],logger:e?.logger??new F.N,serviceId:e?.serviceId??"SSO OIDC",urlParser:e?.urlParser??G.D,utf8Decoder:e?.utf8Decoder??M.a,utf8Encoder:e?.utf8Encoder??N.P}))(e);(0,I.I)(process.version);const s={profile:e?.profile,logger:r.logger};return{...r,...e,runtime:"node",defaultsMode:t,authSchemePreference:e?.authSchemePreference??(0,T.Z)(P.$,s),bodyLengthChecker:e?.bodyLengthChecker??z.n,defaultUserAgentProvider:e?.defaultUserAgentProvider??(0,O.pf)({serviceId:r.serviceId,clientVersion:b.rE}),maxAttempts:e?.maxAttempts??(0,T.Z)(m.qs,e),region:e?.region??(0,T.Z)(k.GG,{...k.zH,...s}),requestHandler:A.$.create(e?.requestHandler??n),retryMode:e?.retryMode??(0,T.Z)({...m.kN,default:async()=>(await n()).retryMode||R.L0},e),sha256:e?.sha256??D.V.bind(null,"sha256"),streamCollector:e?.streamCollector??_.k,useDualstackEndpoint:e?.useDualstackEndpoint??(0,T.Z)(C.e$,s),useFipsEndpoint:e?.useFipsEndpoint??(0,T.Z)(j.Ko,s),userAgentAppId:e?.userAgentAppId??(0,T.Z)($.hV,s)}};var Oe=n(95),$e=n(97),ke=n(96);class Ce extends x.K{config;constructor(...[e]){const t=Pe(e||{});super(t),this.initConfig=t;const n=(x=t,Object.assign(x,{useDualstackEndpoint:x.useDualstackEndpoint??!1,useFipsEndpoint:x.useFipsEndpoint??!1,defaultSigningName:"sso-oauth"}));var x;const y=(0,i.D)(n),v=(0,m.$z)(y),g=(0,c.T)(v),b=(0,r.OV)(g),I=((e,t)=>{const n=Object.assign((0,Oe.R)(e),(0,ke.xA)(e),(0,$e.e)(e),(e=>{const t=e.httpAuthSchemes;let n=e.httpAuthSchemeProvider,r=e.credentials;return{setHttpAuthScheme(e){const n=t.findIndex((t=>t.schemeId===e.schemeId));-1===n?t.push(e):t.splice(n,1,e)},httpAuthSchemes:()=>t,setHttpAuthSchemeProvider(e){n=e},httpAuthSchemeProvider:()=>n,setCredentials(e){r=e},credentials:()=>r}})(e));return t.forEach((e=>e.configure(n))),Object.assign(e,(0,Oe.$)(n),(0,ke.uv)(n),(0,$e.j)(n),{httpAuthSchemes:(r=n).httpAuthSchemes(),httpAuthSchemeProvider:r.httpAuthSchemeProvider(),credentials:r.credentials()});var r})((e=>{const t=(0,f.h)(e);return Object.assign(t,{authSchemePreference:(0,E.t)(e.authSchemePreference??[])})})((0,l.C)(b)),e?.extensions||[]);this.config=I,this.middlewareStack.use((0,a.sM)(this.config)),this.middlewareStack.use((0,w.ey)(this.config)),this.middlewareStack.use((0,h.vK)(this.config)),this.middlewareStack.use((0,r.TC)(this.config)),this.middlewareStack.use((0,s.Y7)(this.config)),this.middlewareStack.use((0,o.n)(this.config)),this.middlewareStack.use((0,p.w)(this.config,{httpAuthSchemeParametersProvider:S,identityProviderConfigProvider:async e=>new d.h({"aws.auth#sigv4":e.credentials})})),this.middlewareStack.use((0,u.l)(this.config))}destroy(){super.destroy()}}var je=n(126),De=n(125),Te=n(124),Ae=n(115),_e=n(114);class ze extends _e.T{constructor(e){super(e),Object.setPrototypeOf(this,ze.prototype)}}class Re extends ze{name="AccessDeniedException";$fault="client";error;reason;error_description;constructor(e){super({name:"AccessDeniedException",$fault:"client",...e}),Object.setPrototypeOf(this,Re.prototype),this.error=e.error,this.reason=e.reason,this.error_description=e.error_description}}class Ue extends ze{name="AuthorizationPendingException";$fault="client";error;error_description;constructor(e){super({name:"AuthorizationPendingException",$fault:"client",...e}),Object.setPrototypeOf(this,Ue.prototype),this.error=e.error,this.error_description=e.error_description}}const qe=e=>({...e,...e.clientSecret&&{clientSecret:Ae.$},...e.refreshToken&&{refreshToken:Ae.$},...e.codeVerifier&&{codeVerifier:Ae.$}}),Fe=e=>({...e,...e.accessToken&&{accessToken:Ae.$},...e.refreshToken&&{refreshToken:Ae.$},...e.idToken&&{idToken:Ae.$}});class Ge extends ze{name="ExpiredTokenException";$fault="client";error;error_description;constructor(e){super({name:"ExpiredTokenException",$fault:"client",...e}),Object.setPrototypeOf(this,Ge.prototype),this.error=e.error,this.error_description=e.error_description}}class He extends ze{name="InternalServerException";$fault="server";error;error_description;constructor(e){super({name:"InternalServerException",$fault:"server",...e}),Object.setPrototypeOf(this,He.prototype),this.error=e.error,this.error_description=e.error_description}}class Ve extends ze{name="InvalidClientException";$fault="client";error;error_description;constructor(e){super({name:"InvalidClientException",$fault:"client",...e}),Object.setPrototypeOf(this,Ve.prototype),this.error=e.error,this.error_description=e.error_description}}class Me extends ze{name="InvalidGrantException";$fault="client";error;error_description;constructor(e){super({name:"InvalidGrantException",$fault:"client",...e}),Object.setPrototypeOf(this,Me.prototype),this.error=e.error,this.error_description=e.error_description}}class Ne extends ze{name="InvalidRequestException";$fault="client";error;reason;error_description;constructor(e){super({name:"InvalidRequestException",$fault:"client",...e}),Object.setPrototypeOf(this,Ne.prototype),this.error=e.error,this.reason=e.reason,this.error_description=e.error_description}}class Be extends ze{name="InvalidScopeException";$fault="client";error;error_description;constructor(e){super({name:"InvalidScopeException",$fault:"client",...e}),Object.setPrototypeOf(this,Be.prototype),this.error=e.error,this.error_description=e.error_description}}class Je extends ze{name="SlowDownException";$fault="client";error;error_description;constructor(e){super({name:"SlowDownException",$fault:"client",...e}),Object.setPrototypeOf(this,Je.prototype),this.error=e.error,this.error_description=e.error_description}}class Le extends ze{name="UnauthorizedClientException";$fault="client";error;error_description;constructor(e){super({name:"UnauthorizedClientException",$fault:"client",...e}),Object.setPrototypeOf(this,Le.prototype),this.error=e.error,this.error_description=e.error_description}}class We extends ze{name="UnsupportedGrantTypeException";$fault="client";error;error_description;constructor(e){super({name:"UnsupportedGrantTypeException",$fault:"client",...e}),Object.setPrototypeOf(this,We.prototype),this.error=e.error,this.error_description=e.error_description}}var Ke=n(117),Qe=n(911),Xe=n(120),Ye=n(116),Ze=n(121),et=n(123);const tt=async(e,t)=>{const n=(0,Qe.l)(e,t);let r;return n.bp("/token"),r=JSON.stringify((0,Xe.s)(e,{clientId:[],clientSecret:[],code:[],codeVerifier:[],deviceCode:[],grantType:[],redirectUri:[],refreshToken:[],scope:e=>(0,Ye.S)(e)})),n.m("POST").h({"content-type":"application/json"}).b(r),n.build()},nt=async(e,t)=>{if(200!==e.statusCode&&e.statusCode>=300)return rt(e,t);const n=(0,Xe.Tj)({$metadata:xt(e)}),r=(0,Ze.Y0)((0,Ze.Xk)(await(0,Ke.Y2)(e.body,t)),"body"),s=(0,Xe.s)(r,{accessToken:Ze.lK,expiresIn:Ze.ET,idToken:Ze.lK,refreshToken:Ze.lK,tokenType:Ze.lK});return Object.assign(n,s),n},rt=async(e,t)=>{const n={...e,body:await(0,Ke.CG)(e.body,t)},r=(0,Ke.cJ)(e,n.body);switch(r){case"AccessDeniedException":case"com.amazonaws.ssooidc#AccessDeniedException":throw await ot(n,t);case"AuthorizationPendingException":case"com.amazonaws.ssooidc#AuthorizationPendingException":throw await it(n,t);case"ExpiredTokenException":case"com.amazonaws.ssooidc#ExpiredTokenException":throw await at(n,t);case"InternalServerException":case"com.amazonaws.ssooidc#InternalServerException":throw await ct(n,t);case"InvalidClientException":case"com.amazonaws.ssooidc#InvalidClientException":throw await pt(n,t);case"InvalidGrantException":case"com.amazonaws.ssooidc#InvalidGrantException":throw await dt(n,t);case"InvalidRequestException":case"com.amazonaws.ssooidc#InvalidRequestException":throw await ut(n,t);case"InvalidScopeException":case"com.amazonaws.ssooidc#InvalidScopeException":throw await ht(n,t);case"SlowDownException":case"com.amazonaws.ssooidc#SlowDownException":throw await lt(n,t);case"UnauthorizedClientException":case"com.amazonaws.ssooidc#UnauthorizedClientException":throw await mt(n,t);case"UnsupportedGrantTypeException":case"com.amazonaws.ssooidc#UnsupportedGrantTypeException":throw await wt(n,t);default:const s=n.body;return st({output:e,parsedBody:s,errorCode:r})}},st=(0,et.j)(ze),ot=async(e,t)=>{const n=(0,Xe.Tj)({}),r=e.body,s=(0,Xe.s)(r,{error:Ze.lK,error_description:Ze.lK,reason:Ze.lK});Object.assign(n,s);const o=new Re({$metadata:xt(e),...n});return(0,_e.M)(o,e.body)},it=async(e,t)=>{const n=(0,Xe.Tj)({}),r=e.body,s=(0,Xe.s)(r,{error:Ze.lK,error_description:Ze.lK});Object.assign(n,s);const o=new Ue({$metadata:xt(e),...n});return(0,_e.M)(o,e.body)},at=async(e,t)=>{const n=(0,Xe.Tj)({}),r=e.body,s=(0,Xe.s)(r,{error:Ze.lK,error_description:Ze.lK});Object.assign(n,s);const o=new Ge({$metadata:xt(e),...n});return(0,_e.M)(o,e.body)},ct=async(e,t)=>{const n=(0,Xe.Tj)({}),r=e.body,s=(0,Xe.s)(r,{error:Ze.lK,error_description:Ze.lK});Object.assign(n,s);const o=new He({$metadata:xt(e),...n});return(0,_e.M)(o,e.body)},pt=async(e,t)=>{const n=(0,Xe.Tj)({}),r=e.body,s=(0,Xe.s)(r,{error:Ze.lK,error_description:Ze.lK});Object.assign(n,s);const o=new Ve({$metadata:xt(e),...n});return(0,_e.M)(o,e.body)},dt=async(e,t)=>{const n=(0,Xe.Tj)({}),r=e.body,s=(0,Xe.s)(r,{error:Ze.lK,error_description:Ze.lK});Object.assign(n,s);const o=new Me({$metadata:xt(e),...n});return(0,_e.M)(o,e.body)},ut=async(e,t)=>{const n=(0,Xe.Tj)({}),r=e.body,s=(0,Xe.s)(r,{error:Ze.lK,error_description:Ze.lK,reason:Ze.lK});Object.assign(n,s);const o=new Ne({$metadata:xt(e),...n});return(0,_e.M)(o,e.body)},ht=async(e,t)=>{const n=(0,Xe.Tj)({}),r=e.body,s=(0,Xe.s)(r,{error:Ze.lK,error_description:Ze.lK});Object.assign(n,s);const o=new Be({$metadata:xt(e),...n});return(0,_e.M)(o,e.body)},lt=async(e,t)=>{const n=(0,Xe.Tj)({}),r=e.body,s=(0,Xe.s)(r,{error:Ze.lK,error_description:Ze.lK});Object.assign(n,s);const o=new Je({$metadata:xt(e),...n});return(0,_e.M)(o,e.body)},mt=async(e,t)=>{const n=(0,Xe.Tj)({}),r=e.body,s=(0,Xe.s)(r,{error:Ze.lK,error_description:Ze.lK});Object.assign(n,s);const o=new Le({$metadata:xt(e),...n});return(0,_e.M)(o,e.body)},wt=async(e,t)=>{const n=(0,Xe.Tj)({}),r=e.body,s=(0,Xe.s)(r,{error:Ze.lK,error_description:Ze.lK});Object.assign(n,s);const o=new We({$metadata:xt(e),...n});return(0,_e.M)(o,e.body)},xt=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"]});class ft extends(Te.u.classBuilder().ep(g).m((function(e,t,n,r){return[(0,De.TM)(n,this.serialize,this.deserialize),(0,je.r)(n,e.getEndpointParameterInstructions())]})).s("AWSSSOOIDCService","CreateToken",{}).n("SSOOIDCClient","CreateTokenCommand").f(qe,Fe).ser(tt).de(nt).build()){}},912:(e,t,n)=>{function r(e){return encodeURIComponent(e).replace(/[!'()*]/g,(function(e){return"%"+e.charCodeAt(0).toString(16).toUpperCase()}))}n.d(t,{$:()=>r})},911:(e,t,n)=>{n.d(t,{l:()=>o});var r=n(33),s=n(912);function o(e,t){return new i(e,t)}class i{input;context;query={};method="";headers={};path="";body=null;hostname="";resolvePathStack=[];constructor(e,t){this.input=e,this.context=t}async build(){const{hostname:e,protocol:t="https",port:n,path:s}=await this.context.endpoint();this.path=s;for(const e of this.resolvePathStack)e(this.path);return new r.K({protocol:t,hostname:this.hostname||e,port:n,method:this.method,path:this.path,query:this.query,body:this.body,headers:this.headers})}hn(e){return this.hostname=e,this}bp(e){return this.resolvePathStack.push((t=>{this.path=`${t?.endsWith("/")?t.slice(0,-1):t||""}`+e})),this}p(e,t,n,r){return this.resolvePathStack.push((o=>{this.path=((e,t,n,r,o,i)=>{if(null==t||void 0===t[n])throw new Error("No value provided for input HTTP label: "+n+".");{const t=r();if(t.length<=0)throw new Error("Empty value provided for input HTTP label: "+n+".");e=e.replace(o,i?t.split("/").map((e=>(0,s.$)(e))).join("/"):(0,s.$)(t))}return e})(o,this.input,e,t,n,r)})),this}h(e){return this.headers=e,this}q(e){return this.query=e,this}b(e){return this.body=e,this}m(e){return this.method=e,this}}},913:(e,t,n)=>{n.d(t,{m:()=>r});class r{async sign(e,t,n){return e}}},915:e=>{e.exports={rE:"3.901.0"}}};
3
+ //# sourceMappingURL=364.index.js.map
package/dist/522.index.js CHANGED
@@ -1,3 +1,3 @@
1
1
  #!/usr/bin/env node
2
- "use strict";exports.id=522,exports.ids=[522],exports.modules={857:(e,o,n)=>{n.r(o),n.d(o,{fromTokenFile:()=>c,fromWebToken:()=>t});var r=n(66),i=n(46),s=n(6);const t=e=>async o=>{e.logger?.debug("@aws-sdk/credential-provider-web-identity - fromWebToken");const{roleArn:r,roleSessionName:i,webIdentityToken:s,providerId:t,policyArns:d,policy:c,durationSeconds:a}=e;let{roleAssumerWithWebIdentity:l}=e;if(!l){const{getDefaultRoleAssumerWithWebIdentity:r}=await n.e(697).then(n.bind(n,865));l=r({...e.clientConfig,credentialProviderLogger:e.logger,parentClientConfig:{...o?.callerClientConfig,...e.parentClientConfig}},e.clientPlugins)}return l({RoleArn:r,RoleSessionName:i??`aws-sdk-js-session-${Date.now()}`,WebIdentityToken:s,ProviderId:t,PolicyArns:d,Policy:c,DurationSeconds:a})},d="AWS_WEB_IDENTITY_TOKEN_FILE",c=(e={})=>async()=>{e.logger?.debug("@aws-sdk/credential-provider-web-identity - fromTokenFile");const o=e?.webIdentityTokenFile??process.env[d],n=e?.roleArn??process.env.AWS_ROLE_ARN,c=e?.roleSessionName??process.env.AWS_ROLE_SESSION_NAME;if(!o||!n)throw new i.C1("Web identity configuration not specified",{logger:e.logger});const a=await t({...e,webIdentityToken:(0,s.readFileSync)(o,{encoding:"ascii"}),roleArn:n,roleSessionName:c})();return o===process.env[d]&&(0,r.g)(a,"CREDENTIALS_ENV_VARS_STS_WEB_ID_TOKEN","h"),a}}};
2
+ "use strict";exports.id=522,exports.ids=[522],exports.modules={908:(e,o,r)=>{r.r(o),r.d(o,{fromTokenFile:()=>d,fromWebToken:()=>c});var n=r(39),t=r(64),s=r(907),i=r(6);const c=e=>async o=>{e.logger?.debug("@aws-sdk/credential-provider-web-identity - fromWebToken");const{roleArn:n,roleSessionName:t,webIdentityToken:s,providerId:i,policyArns:c,policy:a,durationSeconds:d}=e;let{roleAssumerWithWebIdentity:l}=e;if(!l){const{getDefaultRoleAssumerWithWebIdentity:n}=await r.e(717).then(r.bind(r,916));l=n({...e.clientConfig,credentialProviderLogger:e.logger,parentClientConfig:{...o?.callerClientConfig,...e.parentClientConfig}},e.clientPlugins)}return l({RoleArn:n,RoleSessionName:t??`aws-sdk-js-session-${Date.now()}`,WebIdentityToken:s,ProviderId:i,PolicyArns:c,Policy:a,DurationSeconds:d})},a="AWS_WEB_IDENTITY_TOKEN_FILE",d=(e={})=>async()=>{e.logger?.debug("@aws-sdk/credential-provider-web-identity - fromTokenFile");const o=e?.webIdentityTokenFile??process.env[a],r=e?.roleArn??process.env.AWS_ROLE_ARN,d=e?.roleSessionName??process.env.AWS_ROLE_SESSION_NAME;if(!o||!r)throw new t.C("Web identity configuration not specified",{logger:e.logger});const l=await c({...e,webIdentityToken:s.Z?.getTokenRecord?.()[o]??(0,i.readFileSync)(o,{encoding:"ascii"}),roleArn:r,roleSessionName:d})();return o===process.env[a]&&(0,n.g)(l,"CREDENTIALS_ENV_VARS_STS_WEB_ID_TOKEN","h"),l}},907:(e,o,r)=>{r.d(o,{Z:()=>s});var n=r(904),t=r(72);const s={getFileRecord:()=>t.Jj,interceptFile(e,o){t.Jj[e]=Promise.resolve(o)},getTokenRecord:()=>n.a,interceptToken(e,o){n.a[e]=o}}},902:(e,o,r)=>{r.d(o,{C:()=>i});var n=r(5),t=r(3),s=r(70);const i=e=>{const o=(0,n.createHash)("sha1").update(e).digest("hex");return(0,t.join)((0,s.R)(),".aws","sso","cache",`${o}.json`)}},904:(e,o,r)=>{r.d(o,{a:()=>i,v:()=>c});var n=r(6),t=r(902);const{readFile:s}=n.promises,i={},c=async e=>{if(i[e])return i[e];const o=(0,t.C)(e),r=await s(o,"utf8");return JSON.parse(r)}}};
3
3
  //# sourceMappingURL=522.index.js.map
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env node
2
+ "use strict";exports.id=593,exports.ids=[593],exports.modules={901:(e,s,o)=>{o.d(s,{fromSSO:()=>I});var t=o(64),n=o(66),r=o(903),i=o(69),a=o(68),c=o(67);const l=e=>Object.entries(e).filter((([e])=>e.startsWith(a.I.SSO_SESSION+c.Q))).reduce(((e,[s,o])=>({...e,[s.substring(s.indexOf(c.Q)+1)]:o})),{});var f=o(71),g=o(72);const w=()=>({}),h=async(e={})=>(0,g.$H)(e.configFilepath??(0,i.g)()).then(f.A).then(l).catch(w);var d=o(39),p=o(65);class u extends p.m{name="TokenProviderError";constructor(e,s=!0){super(e,s),Object.setPrototypeOf(this,u.prototype)}}var S=o(904);const C="To refresh this SSO session run 'aws sso login' with the corresponding profile.",y=async(e,s,t={})=>{const{CreateTokenCommand:n}=await o.e(364).then(o.bind(o,914)),r=await(async(e,s={})=>{const{SSOOIDCClient:t}=await o.e(364).then(o.bind(o,914));return new t(Object.assign({},s.clientConfig??{},{region:e??s.clientConfig?.region,logger:s.clientConfig?.logger??s.parentClientConfig?.logger}))})(s,t);return r.send(new n({clientId:e.clientId,clientSecret:e.clientSecret,refreshToken:e.refreshToken,grantType:"refresh_token"}))},k=e=>{if(e.expiration&&e.expiration.getTime()<Date.now())throw new u(`Token is expired. ${C}`,!1)},_=(e,s,o=!1)=>{if(void 0===s)throw new u(`Value not present for '${e}' in SSO Token${o?". Cannot refresh":""}. ${C}`,!1)};var m=o(902),O=o(6);const{writeFile:x}=O.promises,T=new Date(0),N=(e={})=>async({callerClientConfig:s}={})=>{const o={...e,parentClientConfig:{...s,...e.parentClientConfig}};o.logger?.debug("@aws-sdk/token-providers - fromSso");const t=await(0,r.Y)(o),i=(0,n.Bz)({profile:o.profile??s?.profile}),a=t[i];if(!a)throw new u(`Profile '${i}' could not be found in shared credentials file.`,!1);if(!a.sso_session)throw new u(`Profile '${i}' is missing required property 'sso_session'.`);const c=a.sso_session,l=(await h(o))[c];if(!l)throw new u(`Sso session '${c}' could not be found in shared credentials file.`,!1);for(const e of["sso_start_url","sso_region"])if(!l[e])throw new u(`Sso session '${c}' is missing required property '${e}'.`,!1);l.sso_start_url;const f=l.sso_region;let g;try{g=await(0,S.v)(c)}catch(e){throw new u(`The SSO session token associated with profile=${i} was not found or is invalid. ${C}`,!1)}_("accessToken",g.accessToken),_("expiresAt",g.expiresAt);const{accessToken:w,expiresAt:d}=g,p={token:w,expiration:new Date(d)};if(p.expiration.getTime()-Date.now()>3e5)return p;if(Date.now()-T.getTime()<3e4)return k(p),p;_("clientId",g.clientId,!0),_("clientSecret",g.clientSecret,!0),_("refreshToken",g.refreshToken,!0);try{T.setTime(Date.now());const e=await y(g,f,o);_("accessToken",e.accessToken),_("expiresIn",e.expiresIn);const s=new Date(Date.now()+1e3*e.expiresIn);try{await((e,s)=>{const o=(0,m.C)(e),t=JSON.stringify(s,null,2);return x(o,t)})(c,{...g,accessToken:e.accessToken,expiresAt:s.toISOString(),refreshToken:e.refreshToken})}catch(e){}return{token:e.accessToken,expiration:s}}catch(e){return k(p),p}},$=!1,v=async({ssoStartUrl:e,ssoSession:s,ssoAccountId:n,ssoRegion:r,ssoRoleName:i,ssoClient:a,clientConfig:c,parentClientConfig:l,profile:f,filepath:g,configFilepath:w,ignoreCache:h,logger:p})=>{let u;const C="To refresh this SSO session run aws sso login with the corresponding profile.";if(s)try{const e=await N({profile:f,filepath:g,configFilepath:w,ignoreCache:h})();u={accessToken:e.token,expiresAt:new Date(e.expiration).toISOString()}}catch(e){throw new t.C(e.message,{tryNextLink:$,logger:p})}else try{u=await(0,S.v)(e)}catch(e){throw new t.C(`The SSO session associated with this profile is invalid. ${C}`,{tryNextLink:$,logger:p})}if(new Date(u.expiresAt).getTime()-Date.now()<=0)throw new t.C(`The SSO session associated with this profile has expired. ${C}`,{tryNextLink:$,logger:p});const{accessToken:y}=u,{SSOClient:k,GetRoleCredentialsCommand:_}=await o.e(616).then(o.bind(o,910)),m=a||new k(Object.assign({},c??{},{logger:c?.logger??l?.logger,region:c?.region??r}));let O;try{O=await m.send(new _({accountId:n,roleName:i,accessToken:y}))}catch(e){throw new t.C(e,{tryNextLink:$,logger:p})}const{roleCredentials:{accessKeyId:x,secretAccessKey:T,sessionToken:v,expiration:I,credentialScope:D,accountId:R}={}}=O;if(!(x&&T&&v&&I))throw new t.C("SSO returns an invalid temporary credential.",{tryNextLink:$,logger:p});const A={accessKeyId:x,secretAccessKey:T,sessionToken:v,expiration:new Date(I),...D&&{credentialScope:D},...R&&{accountId:R}};return s?(0,d.g)(A,"CREDENTIALS_SSO","s"):(0,d.g)(A,"CREDENTIALS_SSO_LEGACY","u"),A},I=(e={})=>async({callerClientConfig:s}={})=>{e.logger?.debug("@aws-sdk/credential-provider-sso - fromSSO");const{ssoStartUrl:o,ssoAccountId:i,ssoRegion:a,ssoRoleName:c,ssoSession:l}=e,{ssoClient:f}=e,g=(0,n.Bz)({profile:e.profile??s?.profile});if(o||i||a||c||l){if(o&&i&&a&&c)return v({ssoStartUrl:o,ssoSession:l,ssoAccountId:i,ssoRegion:a,ssoRoleName:c,ssoClient:f,clientConfig:e.clientConfig,parentClientConfig:e.parentClientConfig,profile:g,filepath:e.filepath,configFilepath:e.configFilepath,ignoreCache:e.ignoreCache,logger:e.logger});throw new t.C('Incomplete configuration. The fromSSO() argument hash must include "ssoStartUrl", "ssoAccountId", "ssoRegion", "ssoRoleName"',{tryNextLink:!1,logger:e.logger})}{const s=(await(0,r.Y)(e))[g];if(!s)throw new t.C(`Profile ${g} was not found.`,{logger:e.logger});if(!(w=s)||"string"!=typeof w.sso_start_url&&"string"!=typeof w.sso_account_id&&"string"!=typeof w.sso_session&&"string"!=typeof w.sso_region&&"string"!=typeof w.sso_role_name)throw new t.C(`Profile ${g} is not configured with SSO credentials.`,{logger:e.logger});if(s?.sso_session){const n=(await h(e))[s.sso_session],r=` configurations in profile ${g} and sso-session ${s.sso_session}`;if(a&&a!==n.sso_region)throw new t.C("Conflicting SSO region"+r,{tryNextLink:!1,logger:e.logger});if(o&&o!==n.sso_start_url)throw new t.C("Conflicting SSO start_url"+r,{tryNextLink:!1,logger:e.logger});s.sso_region=n.sso_region,s.sso_start_url=n.sso_start_url}const{sso_start_url:n,sso_account_id:i,sso_region:c,sso_role_name:l,sso_session:d}=((e,s)=>{const{sso_start_url:o,sso_account_id:n,sso_region:r,sso_role_name:i}=e;if(!(o&&n&&r&&i))throw new t.C(`Profile is configured with invalid SSO credentials. Required parameters "sso_account_id", "sso_region", "sso_role_name", "sso_start_url". Got ${Object.keys(e).join(", ")}\nReference: https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-sso.html`,{tryNextLink:!1,logger:s});return e})(s,e.logger);return v({ssoStartUrl:n,ssoSession:d,ssoAccountId:i,ssoRegion:c,ssoRoleName:l,ssoClient:f,clientConfig:e.clientConfig,parentClientConfig:e.parentClientConfig,profile:g,filepath:e.filepath,configFilepath:e.configFilepath,ignoreCache:e.ignoreCache,logger:e.logger})}var w}},902:(e,s,o)=>{o.d(s,{C:()=>i});var t=o(5),n=o(3),r=o(70);const i=e=>{const s=(0,t.createHash)("sha1").update(e).digest("hex");return(0,n.join)((0,r.R)(),".aws","sso","cache",`${s}.json`)}},904:(e,s,o)=>{o.d(s,{a:()=>i,v:()=>a});var t=o(6),n=o(902);const{readFile:r}=t.promises,i={},a=async e=>{if(i[e])return i[e];const s=(0,n.C)(e),o=await r(s,"utf8");return JSON.parse(o)}}};
3
+ //# sourceMappingURL=593.index.js.map
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env node
2
+ "use strict";exports.id=616,exports.ids=[616],exports.modules={910:(t,e,s)=>{s.d(e,{GetRoleCredentialsCommand:()=>N,SSOClient:()=>de});var n=s(126),o=s(125),r=s(124);const i={UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}};var a=s(115),c=s(114);class u extends c.T{constructor(t){super(t),Object.setPrototypeOf(this,u.prototype)}}class p extends u{name="InvalidRequestException";$fault="client";constructor(t){super({name:"InvalidRequestException",$fault:"client",...t}),Object.setPrototypeOf(this,p.prototype)}}class d extends u{name="ResourceNotFoundException";$fault="client";constructor(t){super({name:"ResourceNotFoundException",$fault:"client",...t}),Object.setPrototypeOf(this,d.prototype)}}class h extends u{name="TooManyRequestsException";$fault="client";constructor(t){super({name:"TooManyRequestsException",$fault:"client",...t}),Object.setPrototypeOf(this,h.prototype)}}class l extends u{name="UnauthorizedException";$fault="client";constructor(t){super({name:"UnauthorizedException",$fault:"client",...t}),Object.setPrototypeOf(this,l.prototype)}}const m=t=>({...t,...t.accessToken&&{accessToken:a.$}}),y=t=>({...t,...t.secretAccessKey&&{secretAccessKey:a.$},...t.sessionToken&&{sessionToken:a.$}}),g=t=>({...t,...t.roleCredentials&&{roleCredentials:y(t.roleCredentials)}});var f=s(117),S=s(911),v=s(120);const w=t=>null!=t;var b=s(121),P=s(116),x=s(123);const E=async(t,e)=>{const s=(0,S.l)(t,e),n=(0,v.Tj)({},w,{[z]:t[$]});s.bp("/federation/credentials");const o=(0,v.Tj)({[T]:[,(0,b.Y0)(t[U],"roleName")],[j]:[,(0,b.Y0)(t[F],"accountId")]});return s.m("GET").h(n).q(o).b(undefined),s.build()},R=async(t,e)=>{if(200!==t.statusCode&&t.statusCode>=300)return I(t,e);const s=(0,v.Tj)({$metadata:D(t)}),n=(0,b.Y0)((0,b.Xk)(await(0,f.Y2)(t.body,e)),"body"),o=(0,v.s)(n,{roleCredentials:P.S});return Object.assign(s,o),s},I=async(t,e)=>{const s={...t,body:await(0,f.CG)(t.body,e)},n=(0,f.cJ)(t,s.body);switch(n){case"InvalidRequestException":case"com.amazonaws.sso#InvalidRequestException":throw await A(s,e);case"ResourceNotFoundException":case"com.amazonaws.sso#ResourceNotFoundException":throw await C(s,e);case"TooManyRequestsException":case"com.amazonaws.sso#TooManyRequestsException":throw await q(s,e);case"UnauthorizedException":case"com.amazonaws.sso#UnauthorizedException":throw await O(s,e);default:const o=s.body;return k({output:t,parsedBody:o,errorCode:n})}},k=(0,x.j)(u),A=async(t,e)=>{const s=(0,v.Tj)({}),n=t.body,o=(0,v.s)(n,{message:b.lK});Object.assign(s,o);const r=new p({$metadata:D(t),...s});return(0,c.M)(r,t.body)},C=async(t,e)=>{const s=(0,v.Tj)({}),n=t.body,o=(0,v.s)(n,{message:b.lK});Object.assign(s,o);const r=new d({$metadata:D(t),...s});return(0,c.M)(r,t.body)},q=async(t,e)=>{const s=(0,v.Tj)({}),n=t.body,o=(0,v.s)(n,{message:b.lK});Object.assign(s,o);const r=new h({$metadata:D(t),...s});return(0,c.M)(r,t.body)},O=async(t,e)=>{const s=(0,v.Tj)({}),n=t.body,o=(0,v.s)(n,{message:b.lK});Object.assign(s,o);const r=new l({$metadata:D(t),...s});return(0,c.M)(r,t.body)},D=t=>({httpStatusCode:t.statusCode,requestId:t.headers["x-amzn-requestid"]??t.headers["x-amzn-request-id"]??t.headers["x-amz-request-id"],extendedRequestId:t.headers["x-amz-id-2"],cfId:t.headers["x-amz-cf-id"]}),F="accountId",$="accessToken",j="account_id",U="roleName",T="role_name",z="x-amz-sso_bearer_token";class N extends(r.u.classBuilder().ep(i).m((function(t,e,s,r){return[(0,o.TM)(s,this.serialize,this.deserialize),(0,n.r)(s,t.getEndpointParameterInstructions())]})).s("SWBPortalService","GetRoleCredentials",{}).n("SSOClient","GetRoleCredentialsCommand").f(m,g).ser(E).de(R).build()){}var M=s(32),H=s(107),G=s(108),L=s(94),_=s(104),B=s(100),V=s(111),K=s(112),W=s(113),J=s(34),Q=s(101),X=s(83),Y=s(105),Z=s(98),tt=s(38),et=s(35),st=s(37);const nt=async(t,e,s)=>({operation:(0,et.u)(e).operation,region:await(0,st.t)(t.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()});const ot=t=>{const e=[];switch(t.operation){case"GetRoleCredentials":case"ListAccountRoles":case"ListAccounts":case"Logout":e.push({schemeId:"smithy.api#noAuth"});break;default:e.push(function(t){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"awsssoportal",region:t.region},propertiesExtractor:(t,e)=>({signingProperties:{config:t,context:e}})}}(t))}return e},rt="3.901.0";var it=s(77),at=s(78),ct=s(81),ut=s(93),pt=s(75),dt=s(89),ht=s(92),lt=s(47),mt=s(63),yt=s(87),gt=s(88),ft=s(79),St=s(84),vt=s(57),wt=s(913),bt=s(59),Pt=s(48),xt=s(55),Et=s(56),Rt=s(43),It=s(60),kt=s(49),At=s(53),Ct=s(54),qt=s(52);const Ot="required",Dt="fn",Ft="argv",$t="ref",jt=!0,Ut="isSet",Tt="booleanEquals",zt="error",Nt="endpoint",Mt="tree",Ht="PartitionResult",Gt="getAttr",Lt={[Ot]:!1,type:"String"},_t={[Ot]:!0,default:!1,type:"Boolean"},Bt={[$t]:"Endpoint"},Vt={[Dt]:Tt,[Ft]:[{[$t]:"UseFIPS"},!0]},Kt={[Dt]:Tt,[Ft]:[{[$t]:"UseDualStack"},!0]},Wt={},Jt={[Dt]:Gt,[Ft]:[{[$t]:Ht},"supportsFIPS"]},Qt={[$t]:Ht},Xt={[Dt]:Tt,[Ft]:[!0,{[Dt]:Gt,[Ft]:[Qt,"supportsDualStack"]}]},Yt=[Vt],Zt=[Kt],te=[{[$t]:"Region"}],ee={version:"1.0",parameters:{Region:Lt,UseDualStack:_t,UseFIPS:_t,Endpoint:Lt},rules:[{conditions:[{[Dt]:Ut,[Ft]:[Bt]}],rules:[{conditions:Yt,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:zt},{conditions:Zt,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:zt},{endpoint:{url:Bt,properties:Wt,headers:Wt},type:Nt}],type:Mt},{conditions:[{[Dt]:Ut,[Ft]:te}],rules:[{conditions:[{[Dt]:"aws.partition",[Ft]:te,assign:Ht}],rules:[{conditions:[Vt,Kt],rules:[{conditions:[{[Dt]:Tt,[Ft]:[jt,Jt]},Xt],rules:[{endpoint:{url:"https://portal.sso-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:Wt,headers:Wt},type:Nt}],type:Mt},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:zt}],type:Mt},{conditions:Yt,rules:[{conditions:[{[Dt]:Tt,[Ft]:[Jt,jt]}],rules:[{conditions:[{[Dt]:"stringEquals",[Ft]:[{[Dt]:Gt,[Ft]:[Qt,"name"]},"aws-us-gov"]}],endpoint:{url:"https://portal.sso.{Region}.amazonaws.com",properties:Wt,headers:Wt},type:Nt},{endpoint:{url:"https://portal.sso-fips.{Region}.{PartitionResult#dnsSuffix}",properties:Wt,headers:Wt},type:Nt}],type:Mt},{error:"FIPS is enabled but this partition does not support FIPS",type:zt}],type:Mt},{conditions:Zt,rules:[{conditions:[Xt],rules:[{endpoint:{url:"https://portal.sso.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:Wt,headers:Wt},type:Nt}],type:Mt},{error:"DualStack is enabled but this partition does not support DualStack",type:zt}],type:Mt},{endpoint:{url:"https://portal.sso.{Region}.{PartitionResult#dnsSuffix}",properties:Wt,headers:Wt},type:Nt}],type:Mt}],type:Mt},{error:"Invalid Configuration: Missing Region",type:zt}]},se=new At.k({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS"]}),ne=(t,e={})=>se.get(t,(()=>(0,Ct.s)(ee,{endpointParams:t,logger:e.logger})));qt.m.aws=kt.UF;var oe=s(76),re=s(62),ie=s(61);const ae=t=>{(0,ie.I)(process.version);const e=(0,re.I)(t),s=()=>e().then(oe.l),n=(t=>({apiVersion:"2019-06-10",base64Decoder:t?.base64Decoder??xt.E,base64Encoder:t?.base64Encoder??Et.n,disableHostPrefix:t?.disableHostPrefix??!1,endpointProvider:t?.endpointProvider??ne,extensions:t?.extensions??[],httpAuthSchemeProvider:t?.httpAuthSchemeProvider??ot,httpAuthSchemes:t?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:t=>t.getIdentityProvider("aws.auth#sigv4"),signer:new vt.f2},{schemeId:"smithy.api#noAuth",identityProvider:t=>t.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new wt.m}],logger:t?.logger??new bt.N,serviceId:t?.serviceId??"SSO",urlParser:t?.urlParser??Pt.D,utf8Decoder:t?.utf8Decoder??Rt.a,utf8Encoder:t?.utf8Encoder??It.P}))(t);(0,it.I)(process.version);const o={profile:t?.profile,logger:n.logger};return{...n,...t,runtime:"node",defaultsMode:e,authSchemePreference:t?.authSchemePreference??(0,mt.Z)(at.$,o),bodyLengthChecker:t?.bodyLengthChecker??ft.n,defaultUserAgentProvider:t?.defaultUserAgentProvider??(0,ct.pf)({serviceId:n.serviceId,clientVersion:rt}),maxAttempts:t?.maxAttempts??(0,mt.Z)(X.qs,t),region:t?.region??(0,mt.Z)(pt.GG,{...pt.zH,...o}),requestHandler:yt.$.create(t?.requestHandler??s),retryMode:t?.retryMode??(0,mt.Z)({...X.kN,default:async()=>(await s()).retryMode||St.L0},t),sha256:t?.sha256??lt.V.bind(null,"sha256"),streamCollector:t?.streamCollector??gt.k,useDualstackEndpoint:t?.useDualstackEndpoint??(0,mt.Z)(dt.e$,o),useFipsEndpoint:t?.useFipsEndpoint??(0,mt.Z)(ht.Ko,o),userAgentAppId:t?.userAgentAppId??(0,mt.Z)(ut.hV,o)}};var ce=s(95),ue=s(97),pe=s(96);class de extends Z.K{config;constructor(...[t]){const e=ae(t||{});super(e),this.initConfig=e;const s=(n=e,Object.assign(n,{useDualstackEndpoint:n.useDualstackEndpoint??!1,useFipsEndpoint:n.useFipsEndpoint??!1,defaultSigningName:"awsssoportal"}));var n;const o=(0,L.D)(s),r=(0,X.$z)(o),i=(0,B.T)(r),a=(0,M.OV)(i),c=((t,e)=>{const s=Object.assign((0,ce.R)(t),(0,pe.xA)(t),(0,ue.e)(t),(t=>{const e=t.httpAuthSchemes;let s=t.httpAuthSchemeProvider,n=t.credentials;return{setHttpAuthScheme(t){const s=e.findIndex((e=>e.schemeId===t.schemeId));-1===s?e.push(t):e.splice(s,1,t)},httpAuthSchemes:()=>e,setHttpAuthSchemeProvider(t){s=t},httpAuthSchemeProvider:()=>s,setCredentials(t){n=t},credentials:()=>n}})(t));return e.forEach((t=>t.configure(s))),Object.assign(t,(0,ce.$)(s),(0,pe.uv)(s),(0,ue.j)(s),{httpAuthSchemes:(n=s).httpAuthSchemes(),httpAuthSchemeProvider:n.httpAuthSchemeProvider(),credentials:n.credentials()});var n})((t=>{const e=(0,tt.h)(t);return Object.assign(e,{authSchemePreference:(0,st.t)(t.authSchemePreference??[])})})((0,Q.C)(a)),t?.extensions||[]);this.config=c,this.middlewareStack.use((0,_.sM)(this.config)),this.middlewareStack.use((0,Y.ey)(this.config)),this.middlewareStack.use((0,J.vK)(this.config)),this.middlewareStack.use((0,M.TC)(this.config)),this.middlewareStack.use((0,H.Y7)(this.config)),this.middlewareStack.use((0,G.n)(this.config)),this.middlewareStack.use((0,V.w)(this.config,{httpAuthSchemeParametersProvider:nt,identityProviderConfigProvider:async t=>new K.h({"aws.auth#sigv4":t.credentials})})),this.middlewareStack.use((0,W.l)(this.config))}destroy(){super.destroy()}}},912:(t,e,s)=>{function n(t){return encodeURIComponent(t).replace(/[!'()*]/g,(function(t){return"%"+t.charCodeAt(0).toString(16).toUpperCase()}))}s.d(e,{$:()=>n})},911:(t,e,s)=>{s.d(e,{l:()=>r});var n=s(33),o=s(912);function r(t,e){return new i(t,e)}class i{input;context;query={};method="";headers={};path="";body=null;hostname="";resolvePathStack=[];constructor(t,e){this.input=t,this.context=e}async build(){const{hostname:t,protocol:e="https",port:s,path:o}=await this.context.endpoint();this.path=o;for(const t of this.resolvePathStack)t(this.path);return new n.K({protocol:e,hostname:this.hostname||t,port:s,method:this.method,path:this.path,query:this.query,body:this.body,headers:this.headers})}hn(t){return this.hostname=t,this}bp(t){return this.resolvePathStack.push((e=>{this.path=`${e?.endsWith("/")?e.slice(0,-1):e||""}`+t})),this}p(t,e,s,n){return this.resolvePathStack.push((r=>{this.path=((t,e,s,n,r,i)=>{if(null==e||void 0===e[s])throw new Error("No value provided for input HTTP label: "+s+".");{const e=n();if(e.length<=0)throw new Error("Empty value provided for input HTTP label: "+s+".");t=t.replace(r,i?e.split("/").map((t=>(0,o.$)(t))).join("/"):(0,o.$)(e))}return t})(r,this.input,t,e,s,n)})),this}h(t){return this.headers=t,this}q(t){return this.query=t,this}b(t){return this.body=t,this}m(t){return this.method=t,this}}},913:(t,e,s)=>{s.d(e,{m:()=>n});class n{async sign(t,e,s){return t}}}};
3
+ //# sourceMappingURL=616.index.js.map
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env node
2
+ "use strict";exports.id=717,exports.ids=[717],exports.modules={916:(t,e,n)=>{n.d(e,{getDefaultRoleAssumer:()=>Hi,getDefaultRoleAssumerWithWebIdentity:()=>Xi});var i=n(39),o=n(126),r=n(125),s=n(124);const a={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 c=n(115),u=n(114);class l extends u.T{constructor(t){super(t),Object.setPrototypeOf(this,l.prototype)}}const d=t=>({...t,...t.SecretAccessKey&&{SecretAccessKey:c.$}}),f=t=>({...t,...t.Credentials&&{Credentials:d(t.Credentials)}});class h extends l{name="ExpiredTokenException";$fault="client";constructor(t){super({name:"ExpiredTokenException",$fault:"client",...t}),Object.setPrototypeOf(this,h.prototype)}}class p extends l{name="MalformedPolicyDocumentException";$fault="client";constructor(t){super({name:"MalformedPolicyDocumentException",$fault:"client",...t}),Object.setPrototypeOf(this,p.prototype)}}class m extends l{name="PackedPolicyTooLargeException";$fault="client";constructor(t){super({name:"PackedPolicyTooLargeException",$fault:"client",...t}),Object.setPrototypeOf(this,m.prototype)}}class g extends l{name="RegionDisabledException";$fault="client";constructor(t){super({name:"RegionDisabledException",$fault:"client",...t}),Object.setPrototypeOf(this,g.prototype)}}class w extends l{name="IDPRejectedClaimException";$fault="client";constructor(t){super({name:"IDPRejectedClaimException",$fault:"client",...t}),Object.setPrototypeOf(this,w.prototype)}}class v extends l{name="InvalidIdentityTokenException";$fault="client";constructor(t){super({name:"InvalidIdentityTokenException",$fault:"client",...t}),Object.setPrototypeOf(this,v.prototype)}}const x=t=>({...t,...t.WebIdentityToken&&{WebIdentityToken:c.$}}),E=t=>({...t,...t.Credentials&&{Credentials:d(t.Credentials)}});class y extends l{name="IDPCommunicationErrorException";$fault="client";constructor(t){super({name:"IDPCommunicationErrorException",$fault:"client",...t}),Object.setPrototypeOf(this,y.prototype)}}const b={preserveOrder:!1,attributeNamePrefix:"@_",attributesGroupName:!1,textNodeName:"#text",ignoreAttributes:!0,removeNSPrefix:!1,allowBooleanAttributes:!1,parseTagValue:!0,parseAttributeValue:!1,trimValues:!0,cdataPropName:!1,numberParseOptions:{hex:!0,leadingZeros:!0,eNotation:!0},tagValueProcessor:function(t,e){return e},attributeValueProcessor:function(t,e){return e},stopNodes:[],alwaysCreateTextNode:!1,isArray:()=>!1,commentPropName:!1,unpairedTags:[],processEntities:!0,htmlEntities:!1,ignoreDeclaration:!1,ignorePiTags:!1,transformTagName:!1,transformAttributeName:!1,updateTag:function(t,e,n){return t},captureMetaData:!1},I=":A-Za-z_\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD",S=new RegExp("^"+("["+I+"]["+(I+"\\-.\\d\\u00B7\\u0300-\\u036F\\u203F-\\u2040")+"]*")+"$");function P(t,e){const n=[];let i=e.exec(t);for(;i;){const o=[];o.startIndex=e.lastIndex-i[0].length;const r=i.length;for(let t=0;t<r;t++)o.push(i[t]);n.push(o),i=e.exec(t)}return n}const A=function(t){const e=S.exec(t);return!(null==e)};let T;T="function"!=typeof Symbol?"@@xmlMetadata":Symbol("XML Node Metadata");class D{constructor(t){this.tagname=t,this.child=[],this[":@"]={}}add(t,e){"__proto__"===t&&(t="#__proto__"),this.child.push({[t]:e})}addChild(t,e){"__proto__"===t.tagname&&(t.tagname="#__proto__"),t[":@"]&&Object.keys(t[":@"]).length>0?this.child.push({[t.tagname]:t.child,":@":t[":@"]}):this.child.push({[t.tagname]:t.child}),void 0!==e&&(this.child[this.child.length-1][T]={startIndex:e})}static getMetaDataSymbol(){return T}}function C(t,e){const n={};if("O"!==t[e+3]||"C"!==t[e+4]||"T"!==t[e+5]||"Y"!==t[e+6]||"P"!==t[e+7]||"E"!==t[e+8])throw new Error("Invalid Tag instead of DOCTYPE");{e+=9;let i=1,o=!1,r=!1,s="";for(;e<t.length;e++)if("<"!==t[e]||r)if(">"===t[e]){if(r?"-"===t[e-1]&&"-"===t[e-2]&&(r=!1,i--):i--,0===i)break}else"["===t[e]?o=!0:s+=t[e];else{if(o&&j(t,"!ENTITY",e)){let i,o;e+=7,[i,o,e]=R(t,e+1),-1===o.indexOf("&")&&(n[i]={regx:RegExp(`&${i};`,"g"),val:o})}else if(o&&j(t,"!ELEMENT",e)){e+=8;const{index:n}=N(t,e+1);e=n}else if(o&&j(t,"!ATTLIST",e))e+=8;else if(o&&j(t,"!NOTATION",e)){e+=9;const{index:n}=O(t,e+1);e=n}else{if(!j(t,"!--",e))throw new Error("Invalid DOCTYPE");r=!0}i++,s=""}if(0!==i)throw new Error("Unclosed DOCTYPE")}return{entities:n,i:e}}const $=(t,e)=>{for(;e<t.length&&/\s/.test(t[e]);)e++;return e};function R(t,e){e=$(t,e);let n="";for(;e<t.length&&!/\s/.test(t[e])&&'"'!==t[e]&&"'"!==t[e];)n+=t[e],e++;if(F(n),e=$(t,e),"SYSTEM"===t.substring(e,e+6).toUpperCase())throw new Error("External entities are not supported");if("%"===t[e])throw new Error("Parameter entities are not supported");let i="";return[e,i]=k(t,e,"entity"),[n,i,--e]}function O(t,e){e=$(t,e);let n="";for(;e<t.length&&!/\s/.test(t[e]);)n+=t[e],e++;F(n),e=$(t,e);const i=t.substring(e,e+6).toUpperCase();if("SYSTEM"!==i&&"PUBLIC"!==i)throw new Error(`Expected SYSTEM or PUBLIC, found "${i}"`);e+=i.length,e=$(t,e);let o=null,r=null;if("PUBLIC"===i)[e,o]=k(t,e,"publicIdentifier"),'"'!==t[e=$(t,e)]&&"'"!==t[e]||([e,r]=k(t,e,"systemIdentifier"));else if("SYSTEM"===i&&([e,r]=k(t,e,"systemIdentifier"),!r))throw new Error("Missing mandatory system identifier for SYSTEM notation");return{notationName:n,publicIdentifier:o,systemIdentifier:r,index:--e}}function k(t,e,n){let i="";const o=t[e];if('"'!==o&&"'"!==o)throw new Error(`Expected quoted string, found "${o}"`);for(e++;e<t.length&&t[e]!==o;)i+=t[e],e++;if(t[e]!==o)throw new Error(`Unterminated ${n} value`);return[++e,i]}function N(t,e){e=$(t,e);let n="";for(;e<t.length&&!/\s/.test(t[e]);)n+=t[e],e++;if(!F(n))throw new Error(`Invalid element name: "${n}"`);let i="";if("E"===t[e=$(t,e)]&&j(t,"MPTY",e))e+=4;else if("A"===t[e]&&j(t,"NY",e))e+=2;else{if("("!==t[e])throw new Error(`Invalid Element Expression, found "${t[e]}"`);for(e++;e<t.length&&")"!==t[e];)i+=t[e],e++;if(")"!==t[e])throw new Error("Unterminated content model")}return{elementName:n,contentModel:i.trim(),index:e}}function j(t,e,n){for(let i=0;i<e.length;i++)if(e[i]!==t[n+i+1])return!1;return!0}function F(t){if(A(t))return t;throw new Error(`Invalid entity name ${t}`)}const _=/^[-+]?0x[a-fA-F0-9]+$/,U=/^([\-\+])?(0*)([0-9]*(\.[0-9]*)?)$/,M={hex:!0,leadingZeros:!0,decimalPoint:".",eNotation:!0};function L(t,e={}){if(e=Object.assign({},M,e),!t||"string"!=typeof t)return t;let n=t.trim();if(void 0!==e.skipLike&&e.skipLike.test(n))return t;if("0"===t)return 0;if(e.hex&&_.test(n))return function(t,e){if(parseInt)return parseInt(t,e);if(Number.parseInt)return Number.parseInt(t,e);if(window&&window.parseInt)return window.parseInt(t,e);throw new Error("parseInt, Number.parseInt, window.parseInt are not supported")}(n,16);if(-1!==n.search(/.+[eE].+/))return function(t,e,n){if(!n.eNotation)return t;const i=e.match(W);if(i){let o=i[1]||"";const r=-1===i[3].indexOf("e")?"E":"e",s=i[2],a=o?t[s.length+1]===r:t[s.length]===r;return s.length>1&&a?t:1!==s.length||!i[3].startsWith(`.${r}`)&&i[3][0]!==r?n.leadingZeros&&!a?(e=(i[1]||"")+i[3],Number(e)):t:Number(e)}return t}(t,n,e);{const i=U.exec(n);if(i){const o=i[1]||"",r=i[2];let s=function(t){if(t&&-1!==t.indexOf("."))return"."===(t=t.replace(/0+$/,""))?t="0":"."===t[0]?t="0"+t:"."===t[t.length-1]&&(t=t.substring(0,t.length-1)),t;return t}(i[3]);const a=o?"."===t[r.length+1]:"."===t[r.length];if(!e.leadingZeros&&(r.length>1||1===r.length&&!a))return t;{const i=Number(n),a=String(i);if(0===i)return i;if(-1!==a.search(/[eE]/))return e.eNotation?i:t;if(-1!==n.indexOf("."))return"0"===a||a===s||a===`${o}${s}`?i:t;let c=r?s:n;return r?c===a||o+c===a?i:t:c===a||c===o+a?i:t}}return t}}const W=/^([-+])?(0*)(\d*(\.\d*)?[eE][-\+]?\d+)$/;class V{constructor(t){var e;this.options=t,this.currentNode=null,this.tagsNodeStack=[],this.docTypeEntities={},this.lastEntities={apos:{regex:/&(apos|#39|#x27);/g,val:"'"},gt:{regex:/&(gt|#62|#x3E);/g,val:">"},lt:{regex:/&(lt|#60|#x3C);/g,val:"<"},quot:{regex:/&(quot|#34|#x22);/g,val:'"'}},this.ampEntity={regex:/&(amp|#38|#x26);/g,val:"&"},this.htmlEntities={space:{regex:/&(nbsp|#160);/g,val:" "},cent:{regex:/&(cent|#162);/g,val:"¢"},pound:{regex:/&(pound|#163);/g,val:"£"},yen:{regex:/&(yen|#165);/g,val:"¥"},euro:{regex:/&(euro|#8364);/g,val:"€"},copyright:{regex:/&(copy|#169);/g,val:"©"},reg:{regex:/&(reg|#174);/g,val:"®"},inr:{regex:/&(inr|#8377);/g,val:"₹"},num_dec:{regex:/&#([0-9]{1,7});/g,val:(t,e)=>String.fromCodePoint(Number.parseInt(e,10))},num_hex:{regex:/&#x([0-9a-fA-F]{1,6});/g,val:(t,e)=>String.fromCodePoint(Number.parseInt(e,16))}},this.addExternalEntities=q,this.parseXml=H,this.parseTextData=Y,this.resolveNameSpace=z,this.buildAttributesMap=K,this.isItStopNode=J,this.replaceEntitiesValue=G,this.readStopNodeData=et,this.saveTextToParentTag=Z,this.addChild=X,this.ignoreAttributesFn="function"==typeof(e=this.options.ignoreAttributes)?e:Array.isArray(e)?t=>{for(const n of e){if("string"==typeof n&&t===n)return!0;if(n instanceof RegExp&&n.test(t))return!0}}:()=>!1}}function q(t){const e=Object.keys(t);for(let n=0;n<e.length;n++){const i=e[n];this.lastEntities[i]={regex:new RegExp("&"+i+";","g"),val:t[i]}}}function Y(t,e,n,i,o,r,s){if(void 0!==t&&(this.options.trimValues&&!i&&(t=t.trim()),t.length>0)){s||(t=this.replaceEntitiesValue(t));const i=this.options.tagValueProcessor(e,t,n,o,r);if(null==i)return t;if(typeof i!=typeof t||i!==t)return i;if(this.options.trimValues)return nt(t,this.options.parseTagValue,this.options.numberParseOptions);return t.trim()===t?nt(t,this.options.parseTagValue,this.options.numberParseOptions):t}}function z(t){if(this.options.removeNSPrefix){const e=t.split(":"),n="/"===t.charAt(0)?"/":"";if("xmlns"===e[0])return"";2===e.length&&(t=n+e[1])}return t}const B=new RegExp("([^\\s=]+)\\s*(=\\s*(['\"])([\\s\\S]*?)\\3)?","gm");function K(t,e,n){if(!0!==this.options.ignoreAttributes&&"string"==typeof t){const n=P(t,B),i=n.length,o={};for(let t=0;t<i;t++){const i=this.resolveNameSpace(n[t][1]);if(this.ignoreAttributesFn(i,e))continue;let r=n[t][4],s=this.options.attributeNamePrefix+i;if(i.length)if(this.options.transformAttributeName&&(s=this.options.transformAttributeName(s)),"__proto__"===s&&(s="#__proto__"),void 0!==r){this.options.trimValues&&(r=r.trim()),r=this.replaceEntitiesValue(r);const t=this.options.attributeValueProcessor(i,r,e);o[s]=null==t?r:typeof t!=typeof r||t!==r?t:nt(r,this.options.parseAttributeValue,this.options.numberParseOptions)}else this.options.allowBooleanAttributes&&(o[s]=!0)}if(!Object.keys(o).length)return;if(this.options.attributesGroupName){const t={};return t[this.options.attributesGroupName]=o,t}return o}}const H=function(t){t=t.replace(/\r\n?/g,"\n");const e=new D("!xml");let n=e,i="",o="";for(let r=0;r<t.length;r++){if("<"===t[r])if("/"===t[r+1]){const e=Q(t,">",r,"Closing Tag is not closed.");let s=t.substring(r+2,e).trim();if(this.options.removeNSPrefix){const t=s.indexOf(":");-1!==t&&(s=s.substr(t+1))}this.options.transformTagName&&(s=this.options.transformTagName(s)),n&&(i=this.saveTextToParentTag(i,n,o));const a=o.substring(o.lastIndexOf(".")+1);if(s&&-1!==this.options.unpairedTags.indexOf(s))throw new Error(`Unpaired tag can not be used as closing tag: </${s}>`);let c=0;a&&-1!==this.options.unpairedTags.indexOf(a)?(c=o.lastIndexOf(".",o.lastIndexOf(".")-1),this.tagsNodeStack.pop()):c=o.lastIndexOf("."),o=o.substring(0,c),n=this.tagsNodeStack.pop(),i="",r=e}else if("?"===t[r+1]){let e=tt(t,r,!1,"?>");if(!e)throw new Error("Pi Tag is not closed.");if(i=this.saveTextToParentTag(i,n,o),this.options.ignoreDeclaration&&"?xml"===e.tagName||this.options.ignorePiTags);else{const t=new D(e.tagName);t.add(this.options.textNodeName,""),e.tagName!==e.tagExp&&e.attrExpPresent&&(t[":@"]=this.buildAttributesMap(e.tagExp,o,e.tagName)),this.addChild(n,t,o,r)}r=e.closeIndex+1}else if("!--"===t.substr(r+1,3)){const e=Q(t,"--\x3e",r+4,"Comment is not closed.");if(this.options.commentPropName){const s=t.substring(r+4,e-2);i=this.saveTextToParentTag(i,n,o),n.add(this.options.commentPropName,[{[this.options.textNodeName]:s}])}r=e}else if("!D"===t.substr(r+1,2)){const e=C(t,r);this.docTypeEntities=e.entities,r=e.i}else if("!["===t.substr(r+1,2)){const e=Q(t,"]]>",r,"CDATA is not closed.")-2,s=t.substring(r+9,e);i=this.saveTextToParentTag(i,n,o);let a=this.parseTextData(s,n.tagname,o,!0,!1,!0,!0);null==a&&(a=""),this.options.cdataPropName?n.add(this.options.cdataPropName,[{[this.options.textNodeName]:s}]):n.add(this.options.textNodeName,a),r=e+2}else{let s=tt(t,r,this.options.removeNSPrefix),a=s.tagName;const c=s.rawTagName;let u=s.tagExp,l=s.attrExpPresent,d=s.closeIndex;this.options.transformTagName&&(a=this.options.transformTagName(a)),n&&i&&"!xml"!==n.tagname&&(i=this.saveTextToParentTag(i,n,o,!1));const f=n;f&&-1!==this.options.unpairedTags.indexOf(f.tagname)&&(n=this.tagsNodeStack.pop(),o=o.substring(0,o.lastIndexOf("."))),a!==e.tagname&&(o+=o?"."+a:a);const h=r;if(this.isItStopNode(this.options.stopNodes,o,a)){let e="";if(u.length>0&&u.lastIndexOf("/")===u.length-1)"/"===a[a.length-1]?(a=a.substr(0,a.length-1),o=o.substr(0,o.length-1),u=a):u=u.substr(0,u.length-1),r=s.closeIndex;else if(-1!==this.options.unpairedTags.indexOf(a))r=s.closeIndex;else{const n=this.readStopNodeData(t,c,d+1);if(!n)throw new Error(`Unexpected end of ${c}`);r=n.i,e=n.tagContent}const i=new D(a);a!==u&&l&&(i[":@"]=this.buildAttributesMap(u,o,a)),e&&(e=this.parseTextData(e,a,o,!0,l,!0,!0)),o=o.substr(0,o.lastIndexOf(".")),i.add(this.options.textNodeName,e),this.addChild(n,i,o,h)}else{if(u.length>0&&u.lastIndexOf("/")===u.length-1){"/"===a[a.length-1]?(a=a.substr(0,a.length-1),o=o.substr(0,o.length-1),u=a):u=u.substr(0,u.length-1),this.options.transformTagName&&(a=this.options.transformTagName(a));const t=new D(a);a!==u&&l&&(t[":@"]=this.buildAttributesMap(u,o,a)),this.addChild(n,t,o,h),o=o.substr(0,o.lastIndexOf("."))}else{const t=new D(a);this.tagsNodeStack.push(n),a!==u&&l&&(t[":@"]=this.buildAttributesMap(u,o,a)),this.addChild(n,t,o,h),n=t}i="",r=d}}else i+=t[r]}return e.child};function X(t,e,n,i){this.options.captureMetaData||(i=void 0);const o=this.options.updateTag(e.tagname,n,e[":@"]);!1===o||("string"==typeof o?(e.tagname=o,t.addChild(e,i)):t.addChild(e,i))}const G=function(t){if(this.options.processEntities){for(let e in this.docTypeEntities){const n=this.docTypeEntities[e];t=t.replace(n.regx,n.val)}for(let e in this.lastEntities){const n=this.lastEntities[e];t=t.replace(n.regex,n.val)}if(this.options.htmlEntities)for(let e in this.htmlEntities){const n=this.htmlEntities[e];t=t.replace(n.regex,n.val)}t=t.replace(this.ampEntity.regex,this.ampEntity.val)}return t};function Z(t,e,n,i){return t&&(void 0===i&&(i=0===e.child.length),void 0!==(t=this.parseTextData(t,e.tagname,n,!1,!!e[":@"]&&0!==Object.keys(e[":@"]).length,i))&&""!==t&&e.add(this.options.textNodeName,t),t=""),t}function J(t,e,n){const i="*."+n;for(const n in t){const o=t[n];if(i===o||e===o)return!0}return!1}function Q(t,e,n,i){const o=t.indexOf(e,n);if(-1===o)throw new Error(i);return o+e.length-1}function tt(t,e,n,i=">"){const o=function(t,e,n=">"){let i,o="";for(let r=e;r<t.length;r++){let e=t[r];if(i)e===i&&(i="");else if('"'===e||"'"===e)i=e;else if(e===n[0]){if(!n[1])return{data:o,index:r};if(t[r+1]===n[1])return{data:o,index:r}}else"\t"===e&&(e=" ");o+=e}}(t,e+1,i);if(!o)return;let r=o.data;const s=o.index,a=r.search(/\s/);let c=r,u=!0;-1!==a&&(c=r.substring(0,a),r=r.substring(a+1).trimStart());const l=c;if(n){const t=c.indexOf(":");-1!==t&&(c=c.substr(t+1),u=c!==o.data.substr(t+1))}return{tagName:c,tagExp:r,closeIndex:s,attrExpPresent:u,rawTagName:l}}function et(t,e,n){const i=n;let o=1;for(;n<t.length;n++)if("<"===t[n])if("/"===t[n+1]){const r=Q(t,">",n,`${e} is not closed`);if(t.substring(n+2,r).trim()===e&&(o--,0===o))return{tagContent:t.substring(i,n),i:r};n=r}else if("?"===t[n+1]){n=Q(t,"?>",n+1,"StopNode is not closed.")}else if("!--"===t.substr(n+1,3)){n=Q(t,"--\x3e",n+3,"StopNode is not closed.")}else if("!["===t.substr(n+1,2)){n=Q(t,"]]>",n,"StopNode is not closed.")-2}else{const i=tt(t,n,">");if(i){(i&&i.tagName)===e&&"/"!==i.tagExp[i.tagExp.length-1]&&o++,n=i.closeIndex}}}function nt(t,e,n){if(e&&"string"==typeof t){const e=t.trim();return"true"===e||"false"!==e&&L(t,n)}return function(t){return void 0!==t}(t)?t:""}const it=D.getMetaDataSymbol();function ot(t,e){return rt(t,e)}function rt(t,e,n){let i;const o={};for(let r=0;r<t.length;r++){const s=t[r],a=st(s);let c="";if(c=void 0===n?a:n+"."+a,a===e.textNodeName)void 0===i?i=s[a]:i+=""+s[a];else{if(void 0===a)continue;if(s[a]){let t=rt(s[a],e,c);const n=ct(t,e);void 0!==s[it]&&(t[it]=s[it]),s[":@"]?at(t,s[":@"],c,e):1!==Object.keys(t).length||void 0===t[e.textNodeName]||e.alwaysCreateTextNode?0===Object.keys(t).length&&(e.alwaysCreateTextNode?t[e.textNodeName]="":t=""):t=t[e.textNodeName],void 0!==o[a]&&o.hasOwnProperty(a)?(Array.isArray(o[a])||(o[a]=[o[a]]),o[a].push(t)):e.isArray(a,c,n)?o[a]=[t]:o[a]=t}}}return"string"==typeof i?i.length>0&&(o[e.textNodeName]=i):void 0!==i&&(o[e.textNodeName]=i),o}function st(t){const e=Object.keys(t);for(let t=0;t<e.length;t++){const n=e[t];if(":@"!==n)return n}}function at(t,e,n,i){if(e){const o=Object.keys(e),r=o.length;for(let s=0;s<r;s++){const r=o[s];i.isArray(r,n+"."+r,!0,!0)?t[r]=[e[r]]:t[r]=e[r]}}}function ct(t,e){const{textNodeName:n}=e,i=Object.keys(t).length;return 0===i||!(1!==i||!t[n]&&"boolean"!=typeof t[n]&&0!==t[n])}const ut={allowBooleanAttributes:!1,unpairedTags:[]};function lt(t){return" "===t||"\t"===t||"\n"===t||"\r"===t}function dt(t,e){const n=e;for(;e<t.length;e++)if("?"!=t[e]&&" "!=t[e]);else{const i=t.substr(n,e-n);if(e>5&&"xml"===i)return xt("InvalidXml","XML declaration allowed only at the start of the document.",yt(t,e));if("?"==t[e]&&">"==t[e+1]){e++;break}}return e}function ft(t,e){if(t.length>e+5&&"-"===t[e+1]&&"-"===t[e+2]){for(e+=3;e<t.length;e++)if("-"===t[e]&&"-"===t[e+1]&&">"===t[e+2]){e+=2;break}}else if(t.length>e+8&&"D"===t[e+1]&&"O"===t[e+2]&&"C"===t[e+3]&&"T"===t[e+4]&&"Y"===t[e+5]&&"P"===t[e+6]&&"E"===t[e+7]){let n=1;for(e+=8;e<t.length;e++)if("<"===t[e])n++;else if(">"===t[e]&&(n--,0===n))break}else if(t.length>e+9&&"["===t[e+1]&&"C"===t[e+2]&&"D"===t[e+3]&&"A"===t[e+4]&&"T"===t[e+5]&&"A"===t[e+6]&&"["===t[e+7])for(e+=8;e<t.length;e++)if("]"===t[e]&&"]"===t[e+1]&&">"===t[e+2]){e+=2;break}return e}const ht='"',pt="'";function mt(t,e){let n="",i="",o=!1;for(;e<t.length;e++){if(t[e]===ht||t[e]===pt)""===i?i=t[e]:i!==t[e]||(i="");else if(">"===t[e]&&""===i){o=!0;break}n+=t[e]}return""===i&&{value:n,index:e,tagClosed:o}}const gt=new RegExp("(\\s*)([^\\s=]+)(\\s*=)?(\\s*(['\"])(([\\s\\S])*?)\\5)?","g");function wt(t,e){const n=P(t,gt),i={};for(let t=0;t<n.length;t++){if(0===n[t][1].length)return xt("InvalidAttr","Attribute '"+n[t][2]+"' has no space in starting.",bt(n[t]));if(void 0!==n[t][3]&&void 0===n[t][4])return xt("InvalidAttr","Attribute '"+n[t][2]+"' is without value.",bt(n[t]));if(void 0===n[t][3]&&!e.allowBooleanAttributes)return xt("InvalidAttr","boolean attribute '"+n[t][2]+"' is not allowed.",bt(n[t]));const o=n[t][2];if(!Et(o))return xt("InvalidAttr","Attribute '"+o+"' is an invalid name.",bt(n[t]));if(i.hasOwnProperty(o))return xt("InvalidAttr","Attribute '"+o+"' is repeated.",bt(n[t]));i[o]=1}return!0}function vt(t,e){if(";"===t[++e])return-1;if("#"===t[e])return function(t,e){let n=/\d/;for("x"===t[e]&&(e++,n=/[\da-fA-F]/);e<t.length;e++){if(";"===t[e])return e;if(!t[e].match(n))break}return-1}(t,++e);let n=0;for(;e<t.length;e++,n++)if(!(t[e].match(/\w/)&&n<20)){if(";"===t[e])break;return-1}return e}function xt(t,e,n){return{err:{code:t,msg:e,line:n.line||n,col:n.col}}}function Et(t){return A(t)}function yt(t,e){const n=t.substring(0,e).split(/\r?\n/);return{line:n.length,col:n[n.length-1].length+1}}function bt(t){return t.startIndex+t[1].length}const It=new class{constructor(t){this.externalEntities={},this.options=function(t){return Object.assign({},b,t)}(t)}parse(t,e){if("string"==typeof t);else{if(!t.toString)throw new Error("XML data is accepted in String or Bytes[] form.");t=t.toString()}if(e){!0===e&&(e={});const n=function(t,e){e=Object.assign({},ut,e);const n=[];let i=!1,o=!1;"\ufeff"===t[0]&&(t=t.substr(1));for(let r=0;r<t.length;r++)if("<"===t[r]&&"?"===t[r+1]){if(r+=2,r=dt(t,r),r.err)return r}else{if("<"!==t[r]){if(lt(t[r]))continue;return xt("InvalidChar","char '"+t[r]+"' is not expected.",yt(t,r))}{let s=r;if(r++,"!"===t[r]){r=ft(t,r);continue}{let a=!1;"/"===t[r]&&(a=!0,r++);let c="";for(;r<t.length&&">"!==t[r]&&" "!==t[r]&&"\t"!==t[r]&&"\n"!==t[r]&&"\r"!==t[r];r++)c+=t[r];if(c=c.trim(),"/"===c[c.length-1]&&(c=c.substring(0,c.length-1),r--),!A(c)){let e;return e=0===c.trim().length?"Invalid space after '<'.":"Tag '"+c+"' is an invalid name.",xt("InvalidTag",e,yt(t,r))}const u=mt(t,r);if(!1===u)return xt("InvalidAttr","Attributes for '"+c+"' have open quote.",yt(t,r));let l=u.value;if(r=u.index,"/"===l[l.length-1]){const n=r-l.length;l=l.substring(0,l.length-1);const o=wt(l,e);if(!0!==o)return xt(o.err.code,o.err.msg,yt(t,n+o.err.line));i=!0}else if(a){if(!u.tagClosed)return xt("InvalidTag","Closing tag '"+c+"' doesn't have proper closing.",yt(t,r));if(l.trim().length>0)return xt("InvalidTag","Closing tag '"+c+"' can't have attributes or invalid starting.",yt(t,s));if(0===n.length)return xt("InvalidTag","Closing tag '"+c+"' has not been opened.",yt(t,s));{const e=n.pop();if(c!==e.tagName){let n=yt(t,e.tagStartPos);return xt("InvalidTag","Expected closing tag '"+e.tagName+"' (opened in line "+n.line+", col "+n.col+") instead of closing tag '"+c+"'.",yt(t,s))}0==n.length&&(o=!0)}}else{const a=wt(l,e);if(!0!==a)return xt(a.err.code,a.err.msg,yt(t,r-l.length+a.err.line));if(!0===o)return xt("InvalidXml","Multiple possible root nodes found.",yt(t,r));-1!==e.unpairedTags.indexOf(c)||n.push({tagName:c,tagStartPos:s}),i=!0}for(r++;r<t.length;r++)if("<"===t[r]){if("!"===t[r+1]){r++,r=ft(t,r);continue}if("?"!==t[r+1])break;if(r=dt(t,++r),r.err)return r}else if("&"===t[r]){const e=vt(t,r);if(-1==e)return xt("InvalidChar","char '&' is not expected.",yt(t,r));r=e}else if(!0===o&&!lt(t[r]))return xt("InvalidXml","Extra text at the end",yt(t,r));"<"===t[r]&&r--}}}return i?1==n.length?xt("InvalidTag","Unclosed tag '"+n[0].tagName+"'.",yt(t,n[0].tagStartPos)):!(n.length>0)||xt("InvalidXml","Invalid '"+JSON.stringify(n.map((t=>t.tagName)),null,4).replace(/\r?\n/g,"")+"' found.",{line:1,col:1}):xt("InvalidXml","Start tag expected.",1)}(t,e);if(!0!==n)throw Error(`${n.err.msg}:${n.err.line}:${n.err.col}`)}const n=new V(this.options);n.addExternalEntities(this.externalEntities);const i=n.parseXml(t);return this.options.preserveOrder||void 0===i?i:ot(i,this.options)}addEntity(t,e){if(-1!==e.indexOf("&"))throw new Error("Entity value can't have '&'");if(-1!==t.indexOf("&")||-1!==t.indexOf(";"))throw new Error("An entity must be set without '&' and ';'. Eg. use '#xD' for '&#xD;'");if("&"===e)throw new Error("An entity with value '&' is not permitted");this.externalEntities[t]=e}static getMetaDataSymbol(){return D.getMetaDataSymbol()}}({attributeNamePrefix:"",htmlEntities:!0,ignoreAttributes:!1,ignoreDeclaration:!0,parseTagValue:!1,trimValues:!1,tagValueProcessor:(t,e)=>""===e.trim()&&e.includes("\n")?"":void 0});It.addEntity("#xD","\r"),It.addEntity("#10","\n");const St=t=>{const e="#text";for(const n in t)t.hasOwnProperty(n)&&void 0!==t[n][e]?t[n]=t[n][e]:"object"==typeof t[n]&&null!==t[n]&&(t[n]=St(t[n]));return t};var Pt=n(118);const At=(t,e)=>(0,Pt.w)(t,e).then((t=>{if(t.length){let n;try{e=t,n=It.parse(e,!0)}catch(e){throw e&&"object"==typeof e&&Object.defineProperty(e,"$responseBodyText",{value:t}),e}const i="#text",o=Object.keys(n)[0],r=n[o];return r[i]&&(r[o]=r[i],delete r[i]),St(r)}var e;return{}})),Tt=async(t,e)=>{const n=await At(t,e);return n.Error&&(n.Error.message=n.Error.message??n.Error.Message),n};var Dt=n(33),Ct=n(121),$t=n(122),Rt=n(123),Ot=n(912);const kt=async(t,e)=>{const n=pe;let i;return i=Je({...zt(t,e),[ge]:ve,[Ke]:me}),he(e,n,"/",void 0,i)},Nt=async(t,e)=>{const n=pe;let i;return i=Je({...Bt(t,e),[ge]:ye,[Ke]:me}),he(e,n,"/",void 0,i)},jt=async(t,e)=>{if(t.statusCode>=300)return _t(t,e);const n=await At(t.body,e);let i={};i=ee(n.AssumeRoleResult,e);return{$metadata:de(t),...i}},Ft=async(t,e)=>{if(t.statusCode>=300)return _t(t,e);const n=await At(t.body,e);let i={};i=ne(n.AssumeRoleWithWebIdentityResult,e);return{$metadata:de(t),...i}},_t=async(t,e)=>{const n={...t,body:await Tt(t.body,e)},i=Qe(t,n.body);switch(i){case"ExpiredTokenException":case"com.amazonaws.sts#ExpiredTokenException":throw await Ut(n,e);case"MalformedPolicyDocument":case"com.amazonaws.sts#MalformedPolicyDocumentException":throw await Vt(n,e);case"PackedPolicyTooLarge":case"com.amazonaws.sts#PackedPolicyTooLargeException":throw await qt(n,e);case"RegionDisabledException":case"com.amazonaws.sts#RegionDisabledException":throw await Yt(n,e);case"IDPCommunicationError":case"com.amazonaws.sts#IDPCommunicationErrorException":throw await Mt(n,e);case"IDPRejectedClaim":case"com.amazonaws.sts#IDPRejectedClaimException":throw await Lt(n,e);case"InvalidIdentityToken":case"com.amazonaws.sts#InvalidIdentityTokenException":throw await Wt(n,e);default:const o=n.body;return fe({output:t,parsedBody:o.Error,errorCode:i})}},Ut=async(t,e)=>{const n=t.body,i=oe(n.Error,e),o=new h({$metadata:de(t),...i});return(0,u.M)(o,n)},Mt=async(t,e)=>{const n=t.body,i=re(n.Error,e),o=new y({$metadata:de(t),...i});return(0,u.M)(o,n)},Lt=async(t,e)=>{const n=t.body,i=se(n.Error,e),o=new w({$metadata:de(t),...i});return(0,u.M)(o,n)},Wt=async(t,e)=>{const n=t.body,i=ae(n.Error,e),o=new v({$metadata:de(t),...i});return(0,u.M)(o,n)},Vt=async(t,e)=>{const n=t.body,i=ce(n.Error,e),o=new p({$metadata:de(t),...i});return(0,u.M)(o,n)},qt=async(t,e)=>{const n=t.body,i=ue(n.Error,e),o=new m({$metadata:de(t),...i});return(0,u.M)(o,n)},Yt=async(t,e)=>{const n=t.body,i=le(n.Error,e),o=new g({$metadata:de(t),...i});return(0,u.M)(o,n)},zt=(t,e)=>{const n={};if(null!=t[_e]&&(n[_e]=t[_e]),null!=t[Ue]&&(n[Ue]=t[Ue]),null!=t[Re]){const i=Kt(t[Re],e);0===t[Re]?.length&&(n.PolicyArns=[]),Object.entries(i).forEach((([t,e])=>{n[`PolicyArns.${t}`]=e}))}if(null!=t[$e]&&(n[$e]=t[$e]),null!=t[Ae]&&(n[Ae]=t[Ae]),null!=t[Ye]){const i=Qt(t[Ye],e);0===t[Ye]?.length&&(n.Tags=[]),Object.entries(i).forEach((([t,e])=>{n[`Tags.${t}`]=e}))}if(null!=t[Be]){const i=Jt(t[Be],e);0===t[Be]?.length&&(n.TransitiveTagKeys=[]),Object.entries(i).forEach((([t,e])=>{n[`TransitiveTagKeys.${t}`]=e}))}if(null!=t[De]&&(n[De]=t[De]),null!=t[Ve]&&(n[Ve]=t[Ve]),null!=t[ze]&&(n[ze]=t[ze]),null!=t[We]&&(n[We]=t[We]),null!=t[ke]){const i=Gt(t[ke],e);0===t[ke]?.length&&(n.ProvidedContexts=[]),Object.entries(i).forEach((([t,e])=>{n[`ProvidedContexts.${t}`]=e}))}return n},Bt=(t,e)=>{const n={};if(null!=t[_e]&&(n[_e]=t[_e]),null!=t[Ue]&&(n[Ue]=t[Ue]),null!=t[Xe]&&(n[Xe]=t[Xe]),null!=t[Ne]&&(n[Ne]=t[Ne]),null!=t[Re]){const i=Kt(t[Re],e);0===t[Re]?.length&&(n.PolicyArns=[]),Object.entries(i).forEach((([t,e])=>{n[`PolicyArns.${t}`]=e}))}return null!=t[$e]&&(n[$e]=t[$e]),null!=t[Ae]&&(n[Ae]=t[Ae]),n},Kt=(t,e)=>{const n={};let i=1;for(const o of t){if(null===o)continue;const t=Ht(o,e);Object.entries(t).forEach((([t,e])=>{n[`member.${i}.${t}`]=e})),i++}return n},Ht=(t,e)=>{const n={};return null!=t[Ge]&&(n[Ge]=t[Ge]),n},Xt=(t,e)=>{const n={};return null!=t[Oe]&&(n[Oe]=t[Oe]),null!=t[Pe]&&(n[Pe]=t[Pe]),n},Gt=(t,e)=>{const n={};let i=1;for(const e of t){if(null===e)continue;const t=Xt(e);Object.entries(t).forEach((([t,e])=>{n[`member.${i}.${t}`]=e})),i++}return n},Zt=(t,e)=>{const n={};return null!=t[Ce]&&(n[Ce]=t[Ce]),null!=t[He]&&(n[He]=t[He]),n},Jt=(t,e)=>{const n={};let i=1;for(const e of t)null!==e&&(n[`member.${i}`]=e,i++);return n},Qt=(t,e)=>{const n={};let i=1;for(const e of t){if(null===e)continue;const t=Zt(e);Object.entries(t).forEach((([t,e])=>{n[`member.${i}.${t}`]=e})),i++}return n},te=(t,e)=>{const n={};return null!=t[xe]&&(n[xe]=(0,Ct.lK)(t[xe])),null!=t[be]&&(n[be]=(0,Ct.lK)(t[be])),n},ee=(t,e)=>{const n={};return null!=t[Se]&&(n[Se]=ie(t[Se],e)),null!=t[Ee]&&(n[Ee]=te(t[Ee])),null!=t[je]&&(n[je]=(0,Ct.xW)(t[je])),null!=t[We]&&(n[We]=(0,Ct.lK)(t[We])),n},ne=(t,e)=>{const n={};return null!=t[Se]&&(n[Se]=ie(t[Se],e)),null!=t[Le]&&(n[Le]=(0,Ct.lK)(t[Le])),null!=t[Ee]&&(n[Ee]=te(t[Ee])),null!=t[je]&&(n[je]=(0,Ct.xW)(t[je])),null!=t[Fe]&&(n[Fe]=(0,Ct.lK)(t[Fe])),null!=t[Ie]&&(n[Ie]=(0,Ct.lK)(t[Ie])),null!=t[We]&&(n[We]=(0,Ct.lK)(t[We])),n},ie=(t,e)=>{const n={};return null!=t[we]&&(n[we]=(0,Ct.lK)(t[we])),null!=t[Me]&&(n[Me]=(0,Ct.lK)(t[Me])),null!=t[qe]&&(n[qe]=(0,Ct.lK)(t[qe])),null!=t[Te]&&(n[Te]=(0,Ct.Y0)((0,$t.t_)(t[Te]))),n},oe=(t,e)=>{const n={};return null!=t[Ze]&&(n[Ze]=(0,Ct.lK)(t[Ze])),n},re=(t,e)=>{const n={};return null!=t[Ze]&&(n[Ze]=(0,Ct.lK)(t[Ze])),n},se=(t,e)=>{const n={};return null!=t[Ze]&&(n[Ze]=(0,Ct.lK)(t[Ze])),n},ae=(t,e)=>{const n={};return null!=t[Ze]&&(n[Ze]=(0,Ct.lK)(t[Ze])),n},ce=(t,e)=>{const n={};return null!=t[Ze]&&(n[Ze]=(0,Ct.lK)(t[Ze])),n},ue=(t,e)=>{const n={};return null!=t[Ze]&&(n[Ze]=(0,Ct.lK)(t[Ze])),n},le=(t,e)=>{const n={};return null!=t[Ze]&&(n[Ze]=(0,Ct.lK)(t[Ze])),n},de=t=>({httpStatusCode:t.statusCode,requestId:t.headers["x-amzn-requestid"]??t.headers["x-amzn-request-id"]??t.headers["x-amz-request-id"],extendedRequestId:t.headers["x-amz-id-2"],cfId:t.headers["x-amz-cf-id"]}),fe=(0,Rt.j)(l),he=async(t,e,n,i,o)=>{const{hostname:r,protocol:s="https",port:a,path:c}=await t.endpoint(),u={protocol:s,hostname:r,port:a,method:"POST",path:c.endsWith("/")?c.slice(0,-1)+n:c+n,headers:e};return void 0!==i&&(u.hostname=i),void 0!==o&&(u.body=o),new Dt.K(u)},pe={"content-type":"application/x-www-form-urlencoded"},me="2011-06-15",ge="Action",we="AccessKeyId",ve="AssumeRole",xe="AssumedRoleId",Ee="AssumedRoleUser",ye="AssumeRoleWithWebIdentity",be="Arn",Ie="Audience",Se="Credentials",Pe="ContextAssertion",Ae="DurationSeconds",Te="Expiration",De="ExternalId",Ce="Key",$e="Policy",Re="PolicyArns",Oe="ProviderArn",ke="ProvidedContexts",Ne="ProviderId",je="PackedPolicySize",Fe="Provider",_e="RoleArn",Ue="RoleSessionName",Me="SecretAccessKey",Le="SubjectFromWebIdentityToken",We="SourceIdentity",Ve="SerialNumber",qe="SessionToken",Ye="Tags",ze="TokenCode",Be="TransitiveTagKeys",Ke="Version",He="Value",Xe="WebIdentityToken",Ge="arn",Ze="message",Je=t=>Object.entries(t).map((([t,e])=>(0,Ot.$)(t)+"="+(0,Ot.$)(e))).join("&"),Qe=(t,e)=>void 0!==e.Error?.Code?e.Error.Code:404==t.statusCode?"NotFound":void 0;class tn extends(s.u.classBuilder().ep(a).m((function(t,e,n,i){return[(0,r.TM)(n,this.serialize,this.deserialize),(0,o.r)(n,t.getEndpointParameterInstructions())]})).s("AWSSecurityTokenServiceV20110615","AssumeRole",{}).n("STSClient","AssumeRoleCommand").f(void 0,f).ser(kt).de(jt).build()){}class en extends(s.u.classBuilder().ep(a).m((function(t,e,n,i){return[(0,r.TM)(n,this.serialize,this.deserialize),(0,o.r)(n,t.getEndpointParameterInstructions())]})).s("AWSSecurityTokenServiceV20110615","AssumeRoleWithWebIdentity",{}).n("STSClient","AssumeRoleWithWebIdentityCommand").f(x,E).ser(Nt).de(Ft).build()){}const nn="us-east-1",on=t=>{if("string"==typeof t?.Arn){const e=t.Arn.split(":");if(e.length>4&&""!==e[4])return e[4]}},rn=async(t,e,n)=>{const i="function"==typeof t?await t():t,o="function"==typeof e?await e():e;return n?.debug?.("@aws-sdk/client-sts::resolveRegion","accepting first of:",`${i} (provider)`,`${o} (parent client)`,`${nn} (STS default)`),i??o??nn},sn=(t,e)=>{let n,o;return async(r,s)=>{if(o=r,!n){const{logger:i=t?.parentClientConfig?.logger,region:r,requestHandler:s=t?.parentClientConfig?.requestHandler,credentialProviderLogger:a}=t,c=await rn(r,t?.parentClientConfig?.region,a),u=!cn(s);n=new e({profile:t?.parentClientConfig?.profile,credentialDefaultProvider:()=>async()=>o,region:c,requestHandler:u?s:void 0,logger:i})}const{Credentials:a,AssumedRoleUser:c}=await n.send(new tn(s));if(!a||!a.AccessKeyId||!a.SecretAccessKey)throw new Error(`Invalid response from STS.assumeRole call with role ${s.RoleArn}`);const u=on(c),l={accessKeyId:a.AccessKeyId,secretAccessKey:a.SecretAccessKey,sessionToken:a.SessionToken,expiration:a.Expiration,...a.CredentialScope&&{credentialScope:a.CredentialScope},...u&&{accountId:u}};return(0,i.g)(l,"CREDENTIALS_STS_ASSUME_ROLE","i"),l}},an=(t,e)=>{let n;return async o=>{if(!n){const{logger:i=t?.parentClientConfig?.logger,region:o,requestHandler:r=t?.parentClientConfig?.requestHandler,credentialProviderLogger:s}=t,a=await rn(o,t?.parentClientConfig?.region,s),c=!cn(r);n=new e({profile:t?.parentClientConfig?.profile,region:a,requestHandler:c?r:void 0,logger:i})}const{Credentials:r,AssumedRoleUser:s}=await n.send(new en(o));if(!r||!r.AccessKeyId||!r.SecretAccessKey)throw new Error(`Invalid response from STS.assumeRoleWithWebIdentity call with role ${o.RoleArn}`);const a=on(s),c={accessKeyId:r.AccessKeyId,secretAccessKey:r.SecretAccessKey,sessionToken:r.SessionToken,expiration:r.Expiration,...r.CredentialScope&&{credentialScope:r.CredentialScope},...a&&{accountId:a}};return a&&(0,i.g)(c,"RESOLVED_ACCOUNT_ID","T"),(0,i.g)(c,"CREDENTIALS_STS_ASSUME_ROLE_WEB_ID","k"),c}},cn=t=>"h2"===t?.metadata?.handlerProtocol;var un=n(32),ln=n(107),dn=n(108),fn=n(94),hn=n(104),pn=n(100),mn=n(111),gn=n(112),wn=n(113),vn=n(34),xn=n(101),En=n(83),yn=n(105),bn=n(98),In=n(38),Sn=n(35),Pn=n(37);const An=async(t,e,n)=>({operation:(0,Sn.u)(e).operation,region:await(0,Pn.t)(t.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()});const Tn=t=>{const e=[];if("AssumeRoleWithWebIdentity"===t.operation)e.push({schemeId:"smithy.api#noAuth"});else e.push(function(t){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"sts",region:t.region},propertiesExtractor:(t,e)=>({signingProperties:{config:t,context:e}})}}(t));return e},Dn=t=>{const e=(n=t,Object.assign(n,{stsClientCtor:Bi}));var n;const i=(0,In.h)(e);return Object.assign(i,{authSchemePreference:(0,Pn.t)(t.authSchemePreference??[])})};var Cn=n(915),$n=n(77),Rn=n(78),On=n(57),kn=n(81),Nn=n(93),jn=n(75),Fn=n(89),_n=n(92),Un=n(913),Mn=n(47),Ln=n(63),Wn=n(87),Vn=n(88),qn=n(79),Yn=n(84),zn=n(59),Bn=n(48),Kn=n(55),Hn=n(56),Xn=n(43),Gn=n(60),Zn=n(49),Jn=n(53),Qn=n(54),ti=n(52);const ei="required",ni="type",ii="fn",oi="argv",ri="ref",si=!1,ai=!0,ci="booleanEquals",ui="stringEquals",li="sigv4",di="us-east-1",fi="endpoint",hi="https://sts.{Region}.{PartitionResult#dnsSuffix}",pi="tree",mi="error",gi="getAttr",wi={[ei]:!1,[ni]:"String"},vi={[ei]:!0,default:!1,[ni]:"Boolean"},xi={[ri]:"Endpoint"},Ei={[ii]:"isSet",[oi]:[{[ri]:"Region"}]},yi={[ri]:"Region"},bi={[ii]:"aws.partition",[oi]:[yi],assign:"PartitionResult"},Ii={[ri]:"UseFIPS"},Si={[ri]:"UseDualStack"},Pi={url:"https://sts.amazonaws.com",properties:{authSchemes:[{name:li,signingName:"sts",signingRegion:di}]},headers:{}},Ai={},Ti={conditions:[{[ii]:ui,[oi]:[yi,"aws-global"]}],[fi]:Pi,[ni]:fi},Di={[ii]:ci,[oi]:[Ii,!0]},Ci={[ii]:ci,[oi]:[Si,!0]},$i={[ii]:gi,[oi]:[{[ri]:"PartitionResult"},"supportsFIPS"]},Ri={[ri]:"PartitionResult"},Oi={[ii]:ci,[oi]:[!0,{[ii]:gi,[oi]:[Ri,"supportsDualStack"]}]},ki=[{[ii]:"isSet",[oi]:[xi]}],Ni=[Di],ji=[Ci],Fi={version:"1.0",parameters:{Region:wi,UseDualStack:vi,UseFIPS:vi,Endpoint:wi,UseGlobalEndpoint:vi},rules:[{conditions:[{[ii]:ci,[oi]:[{[ri]:"UseGlobalEndpoint"},ai]},{[ii]:"not",[oi]:ki},Ei,bi,{[ii]:ci,[oi]:[Ii,si]},{[ii]:ci,[oi]:[Si,si]}],rules:[{conditions:[{[ii]:ui,[oi]:[yi,"ap-northeast-1"]}],endpoint:Pi,[ni]:fi},{conditions:[{[ii]:ui,[oi]:[yi,"ap-south-1"]}],endpoint:Pi,[ni]:fi},{conditions:[{[ii]:ui,[oi]:[yi,"ap-southeast-1"]}],endpoint:Pi,[ni]:fi},{conditions:[{[ii]:ui,[oi]:[yi,"ap-southeast-2"]}],endpoint:Pi,[ni]:fi},Ti,{conditions:[{[ii]:ui,[oi]:[yi,"ca-central-1"]}],endpoint:Pi,[ni]:fi},{conditions:[{[ii]:ui,[oi]:[yi,"eu-central-1"]}],endpoint:Pi,[ni]:fi},{conditions:[{[ii]:ui,[oi]:[yi,"eu-north-1"]}],endpoint:Pi,[ni]:fi},{conditions:[{[ii]:ui,[oi]:[yi,"eu-west-1"]}],endpoint:Pi,[ni]:fi},{conditions:[{[ii]:ui,[oi]:[yi,"eu-west-2"]}],endpoint:Pi,[ni]:fi},{conditions:[{[ii]:ui,[oi]:[yi,"eu-west-3"]}],endpoint:Pi,[ni]:fi},{conditions:[{[ii]:ui,[oi]:[yi,"sa-east-1"]}],endpoint:Pi,[ni]:fi},{conditions:[{[ii]:ui,[oi]:[yi,di]}],endpoint:Pi,[ni]:fi},{conditions:[{[ii]:ui,[oi]:[yi,"us-east-2"]}],endpoint:Pi,[ni]:fi},{conditions:[{[ii]:ui,[oi]:[yi,"us-west-1"]}],endpoint:Pi,[ni]:fi},{conditions:[{[ii]:ui,[oi]:[yi,"us-west-2"]}],endpoint:Pi,[ni]:fi},{endpoint:{url:hi,properties:{authSchemes:[{name:li,signingName:"sts",signingRegion:"{Region}"}]},headers:Ai},[ni]:fi}],[ni]:pi},{conditions:ki,rules:[{conditions:Ni,error:"Invalid Configuration: FIPS and custom endpoint are not supported",[ni]:mi},{conditions:ji,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",[ni]:mi},{endpoint:{url:xi,properties:Ai,headers:Ai},[ni]:fi}],[ni]:pi},{conditions:[Ei],rules:[{conditions:[bi],rules:[{conditions:[Di,Ci],rules:[{conditions:[{[ii]:ci,[oi]:[ai,$i]},Oi],rules:[{endpoint:{url:"https://sts-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:Ai,headers:Ai},[ni]:fi}],[ni]:pi},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",[ni]:mi}],[ni]:pi},{conditions:Ni,rules:[{conditions:[{[ii]:ci,[oi]:[$i,ai]}],rules:[{conditions:[{[ii]:ui,[oi]:[{[ii]:gi,[oi]:[Ri,"name"]},"aws-us-gov"]}],endpoint:{url:"https://sts.{Region}.amazonaws.com",properties:Ai,headers:Ai},[ni]:fi},{endpoint:{url:"https://sts-fips.{Region}.{PartitionResult#dnsSuffix}",properties:Ai,headers:Ai},[ni]:fi}],[ni]:pi},{error:"FIPS is enabled but this partition does not support FIPS",[ni]:mi}],[ni]:pi},{conditions:ji,rules:[{conditions:[Oi],rules:[{endpoint:{url:"https://sts.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:Ai,headers:Ai},[ni]:fi}],[ni]:pi},{error:"DualStack is enabled but this partition does not support DualStack",[ni]:mi}],[ni]:pi},Ti,{endpoint:{url:hi,properties:Ai,headers:Ai},[ni]:fi}],[ni]:pi}],[ni]:pi},{error:"Invalid Configuration: Missing Region",[ni]:mi}]},_i=new Jn.k({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS","UseGlobalEndpoint"]}),Ui=(t,e={})=>_i.get(t,(()=>(0,Qn.s)(Fi,{endpointParams:t,logger:e.logger})));ti.m.aws=Zn.UF;var Mi=n(76),Li=n(62),Wi=n(61);const Vi=t=>{(0,Wi.I)(process.version);const e=(0,Li.I)(t),n=()=>e().then(Mi.l),i=(t=>({apiVersion:"2011-06-15",base64Decoder:t?.base64Decoder??Kn.E,base64Encoder:t?.base64Encoder??Hn.n,disableHostPrefix:t?.disableHostPrefix??!1,endpointProvider:t?.endpointProvider??Ui,extensions:t?.extensions??[],httpAuthSchemeProvider:t?.httpAuthSchemeProvider??Tn,httpAuthSchemes:t?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:t=>t.getIdentityProvider("aws.auth#sigv4"),signer:new On.f2},{schemeId:"smithy.api#noAuth",identityProvider:t=>t.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new Un.m}],logger:t?.logger??new zn.N,serviceId:t?.serviceId??"STS",urlParser:t?.urlParser??Bn.D,utf8Decoder:t?.utf8Decoder??Xn.a,utf8Encoder:t?.utf8Encoder??Gn.P}))(t);(0,$n.I)(process.version);const o={profile:t?.profile,logger:i.logger};return{...i,...t,runtime:"node",defaultsMode:e,authSchemePreference:t?.authSchemePreference??(0,Ln.Z)(Rn.$,o),bodyLengthChecker:t?.bodyLengthChecker??qn.n,defaultUserAgentProvider:t?.defaultUserAgentProvider??(0,kn.pf)({serviceId:i.serviceId,clientVersion:Cn.rE}),httpAuthSchemes:t?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:e=>e.getIdentityProvider("aws.auth#sigv4")||(async e=>await t.credentialDefaultProvider(e?.o||{})()),signer:new On.f2},{schemeId:"smithy.api#noAuth",identityProvider:t=>t.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new Un.m}],maxAttempts:t?.maxAttempts??(0,Ln.Z)(En.qs,t),region:t?.region??(0,Ln.Z)(jn.GG,{...jn.zH,...o}),requestHandler:Wn.$.create(t?.requestHandler??n),retryMode:t?.retryMode??(0,Ln.Z)({...En.kN,default:async()=>(await n()).retryMode||Yn.L0},t),sha256:t?.sha256??Mn.V.bind(null,"sha256"),streamCollector:t?.streamCollector??Vn.k,useDualstackEndpoint:t?.useDualstackEndpoint??(0,Ln.Z)(Fn.e$,o),useFipsEndpoint:t?.useFipsEndpoint??(0,Ln.Z)(_n.Ko,o),userAgentAppId:t?.userAgentAppId??(0,Ln.Z)(Nn.hV,o)}};var qi=n(95),Yi=n(97),zi=n(96);class Bi extends bn.K{config;constructor(...[t]){const e=Vi(t||{});super(e),this.initConfig=e;const n=(i=e,Object.assign(i,{useDualstackEndpoint:i.useDualstackEndpoint??!1,useFipsEndpoint:i.useFipsEndpoint??!1,useGlobalEndpoint:i.useGlobalEndpoint??!1,defaultSigningName:"sts"}));var i;const o=(0,fn.D)(n),r=(0,En.$z)(o),s=(0,pn.T)(r),a=(0,un.OV)(s),c=(0,xn.C)(a),u=((t,e)=>{const n=Object.assign((0,qi.R)(t),(0,zi.xA)(t),(0,Yi.e)(t),(t=>{const e=t.httpAuthSchemes;let n=t.httpAuthSchemeProvider,i=t.credentials;return{setHttpAuthScheme(t){const n=e.findIndex((e=>e.schemeId===t.schemeId));-1===n?e.push(t):e.splice(n,1,t)},httpAuthSchemes:()=>e,setHttpAuthSchemeProvider(t){n=t},httpAuthSchemeProvider:()=>n,setCredentials(t){i=t},credentials:()=>i}})(t));return e.forEach((t=>t.configure(n))),Object.assign(t,(0,qi.$)(n),(0,zi.uv)(n),(0,Yi.j)(n),{httpAuthSchemes:(i=n).httpAuthSchemes(),httpAuthSchemeProvider:i.httpAuthSchemeProvider(),credentials:i.credentials()});var i})(Dn(c),t?.extensions||[]);this.config=u,this.middlewareStack.use((0,hn.sM)(this.config)),this.middlewareStack.use((0,yn.ey)(this.config)),this.middlewareStack.use((0,vn.vK)(this.config)),this.middlewareStack.use((0,un.TC)(this.config)),this.middlewareStack.use((0,ln.Y7)(this.config)),this.middlewareStack.use((0,dn.n)(this.config)),this.middlewareStack.use((0,mn.w)(this.config,{httpAuthSchemeParametersProvider:An,identityProviderConfigProvider:async t=>new gn.h({"aws.auth#sigv4":t.credentials})})),this.middlewareStack.use((0,wn.l)(this.config))}destroy(){super.destroy()}}const Ki=(t,e)=>e?class extends t{constructor(t){super(t);for(const t of e)this.middlewareStack.use(t)}}:t,Hi=(t={},e)=>sn(t,Ki(Bi,e)),Xi=(t={},e)=>an(t,Ki(Bi,e))},912:(t,e,n)=>{function i(t){return encodeURIComponent(t).replace(/[!'()*]/g,(function(t){return"%"+t.charCodeAt(0).toString(16).toUpperCase()}))}n.d(e,{$:()=>i})},913:(t,e,n)=>{n.d(e,{m:()=>i});class i{async sign(t,e,n){return t}}},915:t=>{t.exports={rE:"3.901.0"}}};
3
+ //# sourceMappingURL=717.index.js.map
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env node
2
+ "use strict";exports.id=733,exports.ids=[733],exports.modules={906:(e,r,t)=>{t.r(r),t.d(r,{fromProcess:()=>f});var o=t(903),n=t(66),s=t(64),c=t(907),i=t(30),a=t(9),d=t(39);const l=async(e,r,t)=>{const o=r[e];if(!r[e])throw new s.C(`Profile ${e} could not be found in shared credentials file.`,{logger:t});{const n=o.credential_process;if(void 0===n)throw new s.C(`Profile ${e} did not contain credential_process.`,{logger:t});{const o=(0,a.promisify)(c.Z?.getTokenRecord?.().exec??i.exec);try{const{stdout:t}=await o(n);let s;try{s=JSON.parse(t.trim())}catch{throw Error(`Profile ${e} credential_process returned invalid JSON.`)}return((e,r,t)=>{if(1!==r.Version)throw Error(`Profile ${e} credential_process did not return Version 1.`);if(void 0===r.AccessKeyId||void 0===r.SecretAccessKey)throw Error(`Profile ${e} credential_process returned invalid credentials.`);if(r.Expiration){const t=new Date;if(new Date(r.Expiration)<t)throw Error(`Profile ${e} credential_process returned expired credentials.`)}let o=r.AccountId;!o&&t?.[e]?.aws_account_id&&(o=t[e].aws_account_id);const n={accessKeyId:r.AccessKeyId,secretAccessKey:r.SecretAccessKey,...r.SessionToken&&{sessionToken:r.SessionToken},...r.Expiration&&{expiration:new Date(r.Expiration)},...r.CredentialScope&&{credentialScope:r.CredentialScope},...o&&{accountId:o}};return(0,d.g)(n,"CREDENTIALS_PROCESS","w"),n})(e,s,r)}catch(e){throw new s.C(e.message,{logger:t})}}}},f=(e={})=>async({callerClientConfig:r}={})=>{e.logger?.debug("@aws-sdk/credential-provider-process - fromProcess");const t=await(0,o.Y)(e);return l((0,n.Bz)({profile:e.profile??r?.profile}),t,e.logger)}},907:(e,r,t)=>{t.d(r,{Z:()=>s});var o=t(904),n=t(72);const s={getFileRecord:()=>n.Jj,interceptFile(e,r){n.Jj[e]=Promise.resolve(r)},getTokenRecord:()=>o.a,interceptToken(e,r){o.a[e]=r}}},902:(e,r,t)=>{t.d(r,{C:()=>c});var o=t(5),n=t(3),s=t(70);const c=e=>{const r=(0,o.createHash)("sha1").update(e).digest("hex");return(0,n.join)((0,s.R)(),".aws","sso","cache",`${r}.json`)}},904:(e,r,t)=>{t.d(r,{a:()=>c,v:()=>i});var o=t(6),n=t(902);const{readFile:s}=o.promises,c={},i=async e=>{if(c[e])return c[e];const r=(0,n.C)(e),t=await s(r,"utf8");return JSON.parse(t)}}};
3
+ //# sourceMappingURL=733.index.js.map
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env node
2
+ "use strict";exports.id=750,exports.ids=[750],exports.modules={909:(e,t,r)=>{r.d(t,{fromHttp:()=>R});var o=r(39),n=r(87),a=r(64),s=r(27),i=r.n(s);var c=r(33),f=r(122),l=r(88),w=r(44),u=r(8),d=r(55);const p=async e=>"function"==typeof Blob&&e instanceof Blob||"Blob"===e.constructor?.name?void 0!==Blob.prototype.arrayBuffer?new Uint8Array(await e.arrayBuffer()):async function(e){const t=await function(e){return new Promise(((t,r)=>{const o=new FileReader;o.onloadend=()=>{if(2!==o.readyState)return r(new Error("Reader aborted too early"));const e=o.result??"",n=e.indexOf(","),a=n>-1?n+1:e.length;t(e.substring(a))},o.onabort=()=>r(new Error("Read aborted")),o.onerror=()=>r(o.error),o.readAsDataURL(e)}))}(e),r=(0,d.E)(t);return new Uint8Array(r)}(e):async function(e){const t=[],r=e.getReader();let o=!1,n=0;for(;!o;){const{done:e,value:a}=await r.read();a&&(t.push(a),n+=a.length),o=e}const a=new Uint8Array(n);let s=0;for(const e of t)a.set(e,s),s+=e.length;return a}(e);var h=r(56),y=r(41),m=r(60);const b=e=>"function"==typeof ReadableStream&&(e?.constructor?.name===ReadableStream.name||e instanceof ReadableStream),T="The stream has already been transformed.",g=e=>{if(!E(e)&&!b(e)){throw new Error(`Unexpected stream implementation, expect Blob or ReadableStream, got ${e?.__proto__?.constructor?.name||e}`)}let t=!1;const r=async()=>{if(t)throw new Error(T);return t=!0,await p(e)};return Object.assign(e,{transformToByteArray:r,transformToString:async e=>{const t=await r();if("base64"===e)return(0,h.n)(t);if("hex"===e)return(0,y.n)(t);if(void 0===e||"utf8"===e||"utf-8"===e)return(0,m.P)(t);if("function"==typeof TextDecoder)return new TextDecoder(e).decode(t);throw new Error("TextDecoder is not available, please make sure polyfill is provided.")},transformToWebStream:()=>{if(t)throw new Error(T);if(t=!0,E(e))return(e=>{if("function"!=typeof e.stream)throw new Error("Cannot transform payload Blob to web stream. Please make sure the Blob.stream() is polyfilled.\nIf you are using React Native, this API is not yet supported, see: https://react-native.canny.io/feature-requests/p/fetch-streaming-body");return e.stream()})(e);if(b(e))return e;throw new Error(`Cannot transform payload to web stream, got ${e}`)}})},E=e=>"function"==typeof Blob&&e instanceof Blob,v="The stream has already been transformed.";async function S(e,t){const r=(e=>{if(!(e instanceof u.Readable))try{return g(e)}catch(t){throw new Error(`Unexpected stream implementation, expect Stream.Readable instance, got ${e?.__proto__?.constructor?.name||e}`)}let t=!1;const r=async()=>{if(t)throw new Error(v);return t=!0,await(0,l.k)(e)};return Object.assign(e,{transformToByteArray:r,transformToString:async e=>{const t=await r();return void 0===e||Buffer.isEncoding(e)?(0,w.Q)(t.buffer,t.byteOffset,t.byteLength).toString(e):new TextDecoder(e).decode(t)},transformToWebStream:()=>{if(t)throw new Error(v);if(null!==e.readableFlowing)throw new Error("The stream has been consumed by other callbacks.");if("function"!=typeof u.Readable.toWeb)throw new Error("Readable.toWeb() is not supported. Please ensure a polyfill is available.");return t=!0,u.Readable.toWeb(e)}})})(e.body),o=await r.transformToString();if(200===e.statusCode){const e=JSON.parse(o);if("string"!=typeof e.AccessKeyId||"string"!=typeof e.SecretAccessKey||"string"!=typeof e.Token||"string"!=typeof e.Expiration)throw new a.C("HTTP credential provider response not of the required format, an object matching: { AccessKeyId: string, SecretAccessKey: string, Token: string, Expiration: string(rfc3339) }",{logger:t});return{accessKeyId:e.AccessKeyId,secretAccessKey:e.SecretAccessKey,sessionToken:e.Token,expiration:(0,f.EI)(e.Expiration)}}if(e.statusCode>=400&&e.statusCode<500){let r={};try{r=JSON.parse(o)}catch(e){}throw Object.assign(new a.C(`Server responded with status: ${e.statusCode}`,{logger:t}),{Code:r.Code,Message:r.Message})}throw new a.C(`Server responded with status: ${e.statusCode}`,{logger:t})}const R=(e={})=>{let t;e.logger?.debug("@aws-sdk/credential-provider-http - fromHttp");const r=e.awsContainerCredentialsRelativeUri??process.env.AWS_CONTAINER_CREDENTIALS_RELATIVE_URI,s=e.awsContainerCredentialsFullUri??process.env.AWS_CONTAINER_CREDENTIALS_FULL_URI,f=e.awsContainerAuthorizationToken??process.env.AWS_CONTAINER_AUTHORIZATION_TOKEN,l=e.awsContainerAuthorizationTokenFile??process.env.AWS_CONTAINER_AUTHORIZATION_TOKEN_FILE,w="NoOpLogger"!==e.logger?.constructor?.name&&e.logger?.warn?e.logger.warn.bind(e.logger):console.warn;if(r&&s&&(w("@aws-sdk/credential-provider-http: you have set both awsContainerCredentialsRelativeUri and awsContainerCredentialsFullUri."),w("awsContainerCredentialsFullUri will take precedence.")),f&&l&&(w("@aws-sdk/credential-provider-http: you have set both awsContainerAuthorizationToken and awsContainerAuthorizationTokenFile."),w("awsContainerAuthorizationToken will take precedence.")),s)t=s;else{if(!r)throw new a.C("No HTTP credential provider host provided.\nSet AWS_CONTAINER_CREDENTIALS_FULL_URI or AWS_CONTAINER_CREDENTIALS_RELATIVE_URI.",{logger:e.logger});t=`http://169.254.170.2${r}`}const u=new URL(t);((e,t)=>{if("https:"!==e.protocol&&"169.254.170.2"!==e.hostname&&"169.254.170.23"!==e.hostname&&"[fd00:ec2::23]"!==e.hostname){if(e.hostname.includes("[")){if("[::1]"===e.hostname||"[0000:0000:0000:0000:0000:0000:0000:0001]"===e.hostname)return}else{if("localhost"===e.hostname)return;const t=e.hostname.split("."),r=e=>{const t=parseInt(e,10);return 0<=t&&t<=255};if("127"===t[0]&&r(t[1])&&r(t[2])&&r(t[3])&&4===t.length)return}throw new a.C("URL not accepted. It must either be HTTPS or match one of the following:\n - loopback CIDR 127.0.0.0/8 or [::1/128]\n - ECS container host 169.254.170.2\n - EKS container host 169.254.170.23 or [fd00:ec2::23]",{logger:t})}})(u,e.logger);const d=n.$.create({requestTimeout:e.timeout??1e3,connectionTimeout:e.timeout??1e3});return p=async()=>{const t=function(e){return new c.K({protocol:e.protocol,hostname:e.hostname,port:Number(e.port),path:e.pathname,query:Array.from(e.searchParams.entries()).reduce(((e,[t,r])=>(e[t]=r,e)),{}),fragment:e.hash})}(u);f?t.headers.Authorization=f:l&&(t.headers.Authorization=(await i().readFile(l)).toString());try{return S((await d.handle(t)).response).then((e=>(0,o.g)(e,"CREDENTIALS_HTTP","z")))}catch(t){throw new a.C(String(t),{logger:e.logger})}},h=e.maxRetries??3,y=e.timeout??1e3,async()=>{for(let e=0;e<h;++e)try{return await p()}catch(e){await new Promise((e=>setTimeout(e,y)))}return await p()};var p,h,y}}};
3
+ //# sourceMappingURL=750.index.js.map
package/dist/770.index.js CHANGED
@@ -1,3 +1,3 @@
1
1
  #!/usr/bin/env node
2
- "use strict";exports.id=770,exports.ids=[770],exports.modules={855:(e,r,t)=>{t.d(r,{fromIni:()=>u});var n=t(47),o=t(46),i=t(66);const s=e=>(0,i.g)(e,"CREDENTIALS_PROFILE_NAMED_PROVIDER","p"),a=(e,{profile:r,logger:t})=>{const n="string"==typeof e.source_profile&&void 0===e.credential_source;return n&&t?.debug?.(` ${r} isAssumeRoleWithSourceProfile source_profile=${e.source_profile}`),n},c=(e,{profile:r,logger:t})=>{const n="string"==typeof e.credential_source&&void 0===e.source_profile;return n&&t?.debug?.(` ${r} isCredentialSourceProfile credential_source=${e.credential_source}`),n},l=async(e,r,a,c={})=>{a.logger?.debug("@aws-sdk/credential-provider-ini - resolveAssumeRoleCredentials (STS)");const l=r[e],{source_profile:d,region:p}=l;if(!a.roleAssumer){const{getDefaultRoleAssumer:e}=await t.e(697).then(t.bind(t,865));a.roleAssumer=e({...a.clientConfig,credentialProviderLogger:a.logger,parentClientConfig:{...a?.parentClientConfig,region:p??a?.parentClientConfig?.region}},a.clientPlugins)}if(d&&d in c)throw new o.C1(`Detected a cycle attempting to resolve credentials for profile ${(0,n.Bz)(a)}. Profiles visited: `+Object.keys(c).join(", "),{logger:a.logger});a.logger?.debug("@aws-sdk/credential-provider-ini - finding credential resolver using "+(d?`source_profile=[${d}]`:`profile=[${e}]`));const u=d?g(d,r,a,{...c,[d]:!0},f(r[d]??{})):(await((e,r,n)=>{const i={EcsContainer:async e=>{const{fromHttp:r}=await t.e(963).then(t.bind(t,859)),{fromContainerMetadata:i}=await t.e(330).then(t.bind(t,858));return n?.debug("@aws-sdk/credential-provider-ini - credential_source is EcsContainer"),async()=>(0,o.cy)(r(e??{}),i(e))().then(s)},Ec2InstanceMetadata:async e=>{n?.debug("@aws-sdk/credential-provider-ini - credential_source is Ec2InstanceMetadata");const{fromInstanceMetadata:r}=await t.e(330).then(t.bind(t,858));return async()=>r(e)().then(s)},Environment:async e=>{n?.debug("@aws-sdk/credential-provider-ini - credential_source is Environment");const{fromEnv:r}=await Promise.resolve().then(t.bind(t,67));return async()=>r(e)().then(s)}};if(e in i)return i[e];throw new o.C1(`Unsupported credential source in profile ${r}. Got ${e}, expected EcsContainer or Ec2InstanceMetadata or Environment.`,{logger:n})})(l.credential_source,e,a.logger)(a))();if(f(l))return u.then((e=>(0,i.g)(e,"CREDENTIALS_PROFILE_SOURCE_PROFILE","o")));{const r={RoleArn:l.role_arn,RoleSessionName:l.role_session_name||`aws-sdk-js-${Date.now()}`,ExternalId:l.external_id,DurationSeconds:parseInt(l.duration_seconds||"3600",10)},{mfa_serial:t}=l;if(t){if(!a.mfaCodeProvider)throw new o.C1(`Profile ${e} requires multi-factor authentication, but no MFA code callback was provided.`,{logger:a.logger,tryNextLink:!1});r.SerialNumber=t,r.TokenCode=await a.mfaCodeProvider(t)}const n=await u;return a.roleAssumer(n,r).then((e=>(0,i.g)(e,"CREDENTIALS_PROFILE_SOURCE_PROFILE","o")))}},f=e=>!e.role_arn&&!!e.credential_source,d=e=>Boolean(e)&&"object"==typeof e&&"string"==typeof e.aws_access_key_id&&"string"==typeof e.aws_secret_access_key&&["undefined","string"].indexOf(typeof e.aws_session_token)>-1&&["undefined","string"].indexOf(typeof e.aws_account_id)>-1,p=async(e,r)=>{r?.logger?.debug("@aws-sdk/credential-provider-ini - resolveStaticCredentials");const t={accessKeyId:e.aws_access_key_id,secretAccessKey:e.aws_secret_access_key,sessionToken:e.aws_session_token,...e.aws_credential_scope&&{credentialScope:e.aws_credential_scope},...e.aws_account_id&&{accountId:e.aws_account_id}};return(0,i.g)(t,"CREDENTIALS_PROFILE","n")},g=async(e,r,n,s={},f=!1)=>{const g=r[e];if(Object.keys(s).length>0&&d(g))return p(g,n);if(f||((e,{profile:r="default",logger:t}={})=>Boolean(e)&&"object"==typeof e&&"string"==typeof e.role_arn&&["undefined","string"].indexOf(typeof e.role_session_name)>-1&&["undefined","string"].indexOf(typeof e.external_id)>-1&&["undefined","string"].indexOf(typeof e.mfa_serial)>-1&&(a(e,{profile:r,logger:t})||c(e,{profile:r,logger:t})))(g,{profile:e,logger:n.logger}))return l(e,r,n,s);if(d(g))return p(g,n);if(u=g,Boolean(u)&&"object"==typeof u&&"string"==typeof u.web_identity_token_file&&"string"==typeof u.role_arn&&["undefined","string"].indexOf(typeof u.role_session_name)>-1)return(async(e,r)=>t.e(522).then(t.bind(t,857)).then((({fromTokenFile:t})=>t({webIdentityTokenFile:e.web_identity_token_file,roleArn:e.role_arn,roleSessionName:e.role_session_name,roleAssumerWithWebIdentity:r.roleAssumerWithWebIdentity,logger:r.logger,parentClientConfig:r.parentClientConfig})().then((e=>(0,i.g)(e,"CREDENTIALS_PROFILE_STS_WEB_ID_TOKEN","q"))))))(g,n);var u;if((e=>Boolean(e)&&"object"==typeof e&&"string"==typeof e.credential_process)(g))return(async(e,r)=>t.e(114).then(t.bind(t,856)).then((({fromProcess:t})=>t({...e,profile:r})().then((e=>(0,i.g)(e,"CREDENTIALS_PROFILE_PROCESS","v"))))))(n,e);if((e=>e&&("string"==typeof e.sso_start_url||"string"==typeof e.sso_account_id||"string"==typeof e.sso_session||"string"==typeof e.sso_region||"string"==typeof e.sso_role_name))(g))return await(async(e,r,n={})=>{const{fromSSO:o}=await t.e(476).then(t.bind(t,854));return o({profile:e,logger:n.logger,parentClientConfig:n.parentClientConfig,clientConfig:n.clientConfig})().then((e=>r.sso_session?(0,i.g)(e,"CREDENTIALS_PROFILE_SSO","r"):(0,i.g)(e,"CREDENTIALS_PROFILE_SSO_LEGACY","t")))})(e,g,n);throw new o.C1(`Could not resolve credentials using profile: [${e}] in configuration/credentials file(s).`,{logger:n.logger})},u=(e={})=>async({callerClientConfig:r}={})=>{const t={...e,parentClientConfig:{...r,...e.parentClientConfig}};t.logger?.debug("@aws-sdk/credential-provider-ini - fromIni");const o=await(0,n.YU)(t);return g((0,n.Bz)({profile:e.profile??r?.profile}),o,t)}}};
2
+ "use strict";exports.id=770,exports.ids=[770],exports.modules={905:(e,t,r)=>{r.d(t,{fromIni:()=>y});var n=r(903),o=r(66),i=r(64),s=r(39),a=r(74);const c=e=>(0,s.g)(e,"CREDENTIALS_PROFILE_NAMED_PROVIDER","p"),l=(e,{profile:t,logger:r})=>{const n="string"==typeof e.source_profile&&void 0===e.credential_source;return n&&r?.debug?.(` ${t} isAssumeRoleWithSourceProfile source_profile=${e.source_profile}`),n},f=(e,{profile:t,logger:r})=>{const n="string"==typeof e.credential_source&&void 0===e.source_profile;return n&&r?.debug?.(` ${t} isCredentialSourceProfile credential_source=${e.credential_source}`),n},d=async(e,t,n,l={})=>{n.logger?.debug("@aws-sdk/credential-provider-ini - resolveAssumeRoleCredentials (STS)");const f=t[e],{source_profile:d,region:g}=f;if(!n.roleAssumer){const{getDefaultRoleAssumer:e}=await r.e(717).then(r.bind(r,916));n.roleAssumer=e({...n.clientConfig,credentialProviderLogger:n.logger,parentClientConfig:{...n?.parentClientConfig,region:g??n?.parentClientConfig?.region}},n.clientPlugins)}if(d&&d in l)throw new i.C(`Detected a cycle attempting to resolve credentials for profile ${(0,o.Bz)(n)}. Profiles visited: `+Object.keys(l).join(", "),{logger:n.logger});n.logger?.debug("@aws-sdk/credential-provider-ini - finding credential resolver using "+(d?`source_profile=[${d}]`:`profile=[${e}]`));const u=d?E(d,t,n,{...l,[d]:!0},p(t[d]??{})):(await((e,t,n)=>{const o={EcsContainer:async e=>{const{fromHttp:t}=await r.e(750).then(r.bind(r,909)),{fromContainerMetadata:o}=await r.e(330).then(r.bind(r,900));return n?.debug("@aws-sdk/credential-provider-ini - credential_source is EcsContainer"),async()=>(0,a.c)(t(e??{}),o(e))().then(c)},Ec2InstanceMetadata:async e=>{n?.debug("@aws-sdk/credential-provider-ini - credential_source is Ec2InstanceMetadata");const{fromInstanceMetadata:t}=await r.e(330).then(r.bind(r,900));return async()=>t(e)().then(c)},Environment:async e=>{n?.debug("@aws-sdk/credential-provider-ini - credential_source is Environment");const{fromEnv:t}=await r.e(960).then(r.bind(r,917));return async()=>t(e)().then(c)}};if(e in o)return o[e];throw new i.C(`Unsupported credential source in profile ${t}. Got ${e}, expected EcsContainer or Ec2InstanceMetadata or Environment.`,{logger:n})})(f.credential_source,e,n.logger)(n))();if(p(f))return u.then((e=>(0,s.g)(e,"CREDENTIALS_PROFILE_SOURCE_PROFILE","o")));{const t={RoleArn:f.role_arn,RoleSessionName:f.role_session_name||`aws-sdk-js-${Date.now()}`,ExternalId:f.external_id,DurationSeconds:parseInt(f.duration_seconds||"3600",10)},{mfa_serial:r}=f;if(r){if(!n.mfaCodeProvider)throw new i.C(`Profile ${e} requires multi-factor authentication, but no MFA code callback was provided.`,{logger:n.logger,tryNextLink:!1});t.SerialNumber=r,t.TokenCode=await n.mfaCodeProvider(r)}const o=await u;return n.roleAssumer(o,t).then((e=>(0,s.g)(e,"CREDENTIALS_PROFILE_SOURCE_PROFILE","o")))}},p=e=>!e.role_arn&&!!e.credential_source,g=e=>Boolean(e)&&"object"==typeof e&&"string"==typeof e.aws_access_key_id&&"string"==typeof e.aws_secret_access_key&&["undefined","string"].indexOf(typeof e.aws_session_token)>-1&&["undefined","string"].indexOf(typeof e.aws_account_id)>-1,u=async(e,t)=>{t?.logger?.debug("@aws-sdk/credential-provider-ini - resolveStaticCredentials");const r={accessKeyId:e.aws_access_key_id,secretAccessKey:e.aws_secret_access_key,sessionToken:e.aws_session_token,...e.aws_credential_scope&&{credentialScope:e.aws_credential_scope},...e.aws_account_id&&{accountId:e.aws_account_id}};return(0,s.g)(r,"CREDENTIALS_PROFILE","n")},E=async(e,t,n,o={},a=!1)=>{const c=t[e];if(Object.keys(o).length>0&&g(c))return u(c,n);if(a||((e,{profile:t="default",logger:r}={})=>Boolean(e)&&"object"==typeof e&&"string"==typeof e.role_arn&&["undefined","string"].indexOf(typeof e.role_session_name)>-1&&["undefined","string"].indexOf(typeof e.external_id)>-1&&["undefined","string"].indexOf(typeof e.mfa_serial)>-1&&(l(e,{profile:t,logger:r})||f(e,{profile:t,logger:r})))(c,{profile:e,logger:n.logger}))return d(e,t,n,o);if(g(c))return u(c,n);if(p=c,Boolean(p)&&"object"==typeof p&&"string"==typeof p.web_identity_token_file&&"string"==typeof p.role_arn&&["undefined","string"].indexOf(typeof p.role_session_name)>-1)return(async(e,t)=>r.e(522).then(r.bind(r,908)).then((({fromTokenFile:r})=>r({webIdentityTokenFile:e.web_identity_token_file,roleArn:e.role_arn,roleSessionName:e.role_session_name,roleAssumerWithWebIdentity:t.roleAssumerWithWebIdentity,logger:t.logger,parentClientConfig:t.parentClientConfig})().then((e=>(0,s.g)(e,"CREDENTIALS_PROFILE_STS_WEB_ID_TOKEN","q"))))))(c,n);var p;if((e=>Boolean(e)&&"object"==typeof e&&"string"==typeof e.credential_process)(c))return(async(e,t)=>r.e(733).then(r.bind(r,906)).then((({fromProcess:r})=>r({...e,profile:t})().then((e=>(0,s.g)(e,"CREDENTIALS_PROFILE_PROCESS","v"))))))(n,e);if((e=>e&&("string"==typeof e.sso_start_url||"string"==typeof e.sso_account_id||"string"==typeof e.sso_session||"string"==typeof e.sso_region||"string"==typeof e.sso_role_name))(c))return await(async(e,t,n={})=>{const{fromSSO:o}=await r.e(593).then(r.bind(r,901));return o({profile:e,logger:n.logger,parentClientConfig:n.parentClientConfig,clientConfig:n.clientConfig})().then((e=>t.sso_session?(0,s.g)(e,"CREDENTIALS_PROFILE_SSO","r"):(0,s.g)(e,"CREDENTIALS_PROFILE_SSO_LEGACY","t")))})(e,c,n);throw new i.C(`Could not resolve credentials using profile: [${e}] in configuration/credentials file(s).`,{logger:n.logger})},y=(e={})=>async({callerClientConfig:t}={})=>{const r={...e,parentClientConfig:{...t,...e.parentClientConfig}};r.logger?.debug("@aws-sdk/credential-provider-ini - fromIni");const i=await(0,n.Y)(r);return E((0,o.Bz)({profile:e.profile??t?.profile}),i,r)}},903:(e,t,r)=>{r.d(t,{Y:()=>o});var n=r(67);const o=async e=>{const t=await(0,n.p)(e);return((...e)=>{const t={};for(const r of e)for(const[e,n]of Object.entries(r))void 0!==t[e]?Object.assign(t[e],n):t[e]=n;return t})(t.configFile,t.credentialsFile)}}};
3
3
  //# sourceMappingURL=770.index.js.map
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env node
2
+ "use strict";exports.id=960,exports.ids=[960],exports.modules={917:(r,s,t)=>{t.d(s,{fromEnv:()=>e.sF});var e=t(80)}};
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env node
2
+ "use strict";exports.id=974,exports.ids=[593,974],exports.modules={901:(e,o,s)=>{s.d(o,{fromSSO:()=>I});var t=s(64),n=s(66),r=s(903),i=s(69),a=s(68),c=s(67);const l=e=>Object.entries(e).filter((([e])=>e.startsWith(a.I.SSO_SESSION+c.Q))).reduce(((e,[o,s])=>({...e,[o.substring(o.indexOf(c.Q)+1)]:s})),{});var f=s(71),g=s(72);const w=()=>({}),h=async(e={})=>(0,g.$H)(e.configFilepath??(0,i.g)()).then(f.A).then(l).catch(w);var d=s(39),u=s(65);class p extends u.m{name="TokenProviderError";constructor(e,o=!0){super(e,o),Object.setPrototypeOf(this,p.prototype)}}var S=s(904);const C="To refresh this SSO session run 'aws sso login' with the corresponding profile.",y=async(e,o,t={})=>{const{CreateTokenCommand:n}=await s.e(364).then(s.bind(s,914)),r=await(async(e,o={})=>{const{SSOOIDCClient:t}=await s.e(364).then(s.bind(s,914));return new t(Object.assign({},o.clientConfig??{},{region:e??o.clientConfig?.region,logger:o.clientConfig?.logger??o.parentClientConfig?.logger}))})(o,t);return r.send(new n({clientId:e.clientId,clientSecret:e.clientSecret,refreshToken:e.refreshToken,grantType:"refresh_token"}))},k=e=>{if(e.expiration&&e.expiration.getTime()<Date.now())throw new p(`Token is expired. ${C}`,!1)},_=(e,o,s=!1)=>{if(void 0===o)throw new p(`Value not present for '${e}' in SSO Token${s?". Cannot refresh":""}. ${C}`,!1)};var m=s(902),O=s(6);const{writeFile:x}=O.promises,T=new Date(0),v=(e={})=>async({callerClientConfig:o}={})=>{const s={...e,parentClientConfig:{...o,...e.parentClientConfig}};s.logger?.debug("@aws-sdk/token-providers - fromSso");const t=await(0,r.Y)(s),i=(0,n.Bz)({profile:s.profile??o?.profile}),a=t[i];if(!a)throw new p(`Profile '${i}' could not be found in shared credentials file.`,!1);if(!a.sso_session)throw new p(`Profile '${i}' is missing required property 'sso_session'.`);const c=a.sso_session,l=(await h(s))[c];if(!l)throw new p(`Sso session '${c}' could not be found in shared credentials file.`,!1);for(const e of["sso_start_url","sso_region"])if(!l[e])throw new p(`Sso session '${c}' is missing required property '${e}'.`,!1);l.sso_start_url;const f=l.sso_region;let g;try{g=await(0,S.v)(c)}catch(e){throw new p(`The SSO session token associated with profile=${i} was not found or is invalid. ${C}`,!1)}_("accessToken",g.accessToken),_("expiresAt",g.expiresAt);const{accessToken:w,expiresAt:d}=g,u={token:w,expiration:new Date(d)};if(u.expiration.getTime()-Date.now()>3e5)return u;if(Date.now()-T.getTime()<3e4)return k(u),u;_("clientId",g.clientId,!0),_("clientSecret",g.clientSecret,!0),_("refreshToken",g.refreshToken,!0);try{T.setTime(Date.now());const e=await y(g,f,s);_("accessToken",e.accessToken),_("expiresIn",e.expiresIn);const o=new Date(Date.now()+1e3*e.expiresIn);try{await((e,o)=>{const s=(0,m.C)(e),t=JSON.stringify(o,null,2);return x(s,t)})(c,{...g,accessToken:e.accessToken,expiresAt:o.toISOString(),refreshToken:e.refreshToken})}catch(e){}return{token:e.accessToken,expiration:o}}catch(e){return k(u),u}},N=!1,$=async({ssoStartUrl:e,ssoSession:o,ssoAccountId:n,ssoRegion:r,ssoRoleName:i,ssoClient:a,clientConfig:c,parentClientConfig:l,profile:f,filepath:g,configFilepath:w,ignoreCache:h,logger:u})=>{let p;const C="To refresh this SSO session run aws sso login with the corresponding profile.";if(o)try{const e=await v({profile:f,filepath:g,configFilepath:w,ignoreCache:h})();p={accessToken:e.token,expiresAt:new Date(e.expiration).toISOString()}}catch(e){throw new t.C(e.message,{tryNextLink:N,logger:u})}else try{p=await(0,S.v)(e)}catch(e){throw new t.C(`The SSO session associated with this profile is invalid. ${C}`,{tryNextLink:N,logger:u})}if(new Date(p.expiresAt).getTime()-Date.now()<=0)throw new t.C(`The SSO session associated with this profile has expired. ${C}`,{tryNextLink:N,logger:u});const{accessToken:y}=p,{SSOClient:k,GetRoleCredentialsCommand:_}=await s.e(616).then(s.bind(s,910)),m=a||new k(Object.assign({},c??{},{logger:c?.logger??l?.logger,region:c?.region??r}));let O;try{O=await m.send(new _({accountId:n,roleName:i,accessToken:y}))}catch(e){throw new t.C(e,{tryNextLink:N,logger:u})}const{roleCredentials:{accessKeyId:x,secretAccessKey:T,sessionToken:$,expiration:I,credentialScope:D,accountId:R}={}}=O;if(!(x&&T&&$&&I))throw new t.C("SSO returns an invalid temporary credential.",{tryNextLink:N,logger:u});const A={accessKeyId:x,secretAccessKey:T,sessionToken:$,expiration:new Date(I),...D&&{credentialScope:D},...R&&{accountId:R}};return o?(0,d.g)(A,"CREDENTIALS_SSO","s"):(0,d.g)(A,"CREDENTIALS_SSO_LEGACY","u"),A},I=(e={})=>async({callerClientConfig:o}={})=>{e.logger?.debug("@aws-sdk/credential-provider-sso - fromSSO");const{ssoStartUrl:s,ssoAccountId:i,ssoRegion:a,ssoRoleName:c,ssoSession:l}=e,{ssoClient:f}=e,g=(0,n.Bz)({profile:e.profile??o?.profile});if(s||i||a||c||l){if(s&&i&&a&&c)return $({ssoStartUrl:s,ssoSession:l,ssoAccountId:i,ssoRegion:a,ssoRoleName:c,ssoClient:f,clientConfig:e.clientConfig,parentClientConfig:e.parentClientConfig,profile:g,filepath:e.filepath,configFilepath:e.configFilepath,ignoreCache:e.ignoreCache,logger:e.logger});throw new t.C('Incomplete configuration. The fromSSO() argument hash must include "ssoStartUrl", "ssoAccountId", "ssoRegion", "ssoRoleName"',{tryNextLink:!1,logger:e.logger})}{const o=(await(0,r.Y)(e))[g];if(!o)throw new t.C(`Profile ${g} was not found.`,{logger:e.logger});if(!(w=o)||"string"!=typeof w.sso_start_url&&"string"!=typeof w.sso_account_id&&"string"!=typeof w.sso_session&&"string"!=typeof w.sso_region&&"string"!=typeof w.sso_role_name)throw new t.C(`Profile ${g} is not configured with SSO credentials.`,{logger:e.logger});if(o?.sso_session){const n=(await h(e))[o.sso_session],r=` configurations in profile ${g} and sso-session ${o.sso_session}`;if(a&&a!==n.sso_region)throw new t.C("Conflicting SSO region"+r,{tryNextLink:!1,logger:e.logger});if(s&&s!==n.sso_start_url)throw new t.C("Conflicting SSO start_url"+r,{tryNextLink:!1,logger:e.logger});o.sso_region=n.sso_region,o.sso_start_url=n.sso_start_url}const{sso_start_url:n,sso_account_id:i,sso_region:c,sso_role_name:l,sso_session:d}=((e,o)=>{const{sso_start_url:s,sso_account_id:n,sso_region:r,sso_role_name:i}=e;if(!(s&&n&&r&&i))throw new t.C(`Profile is configured with invalid SSO credentials. Required parameters "sso_account_id", "sso_region", "sso_role_name", "sso_start_url". Got ${Object.keys(e).join(", ")}\nReference: https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-sso.html`,{tryNextLink:!1,logger:o});return e})(o,e.logger);return $({ssoStartUrl:n,ssoSession:d,ssoAccountId:i,ssoRegion:c,ssoRoleName:l,ssoClient:f,clientConfig:e.clientConfig,parentClientConfig:e.parentClientConfig,profile:g,filepath:e.filepath,configFilepath:e.configFilepath,ignoreCache:e.ignoreCache,logger:e.logger})}var w}},902:(e,o,s)=>{s.d(o,{C:()=>i});var t=s(5),n=s(3),r=s(70);const i=e=>{const o=(0,t.createHash)("sha1").update(e).digest("hex");return(0,n.join)((0,r.R)(),".aws","sso","cache",`${o}.json`)}},904:(e,o,s)=>{s.d(o,{a:()=>i,v:()=>a});var t=s(6),n=s(902);const{readFile:r}=t.promises,i={},a=async e=>{if(i[e])return i[e];const o=(0,n.C)(e),s=await r(o,"utf8");return JSON.parse(s)}},903:(e,o,s)=>{s.d(o,{Y:()=>n});var t=s(67);const n=async e=>{const o=await(0,t.p)(e);return((...e)=>{const o={};for(const s of e)for(const[e,t]of Object.entries(s))void 0!==o[e]?Object.assign(o[e],t):o[e]=t;return o})(o.configFile,o.credentialsFile)}}};
3
+ //# sourceMappingURL=974.index.js.map