@finsemble/finsemble-electron-adapter 9.10.0 → 9.10.1-beta.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/477.js +1 -1
- package/dist/521.js +1 -1
- package/dist/563.js +1 -1
- package/dist/app.js +1 -1
- package/dist/exports.js +1 -1
- package/package.json +3 -3
package/dist/477.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";exports.id=477,exports.ids=[477],exports.modules={39955:e=>{e.exports={rE:"3.925.0"}},45536:(e,t,n)=>{n.d(t,{m:()=>s});class s{async sign(e,t,n){return e}}},70477:(e,t,n)=>{n.d(t,{getDefaultRoleAssumer:()=>Un,getDefaultRoleAssumerWithWebIdentity:()=>Fn});var s=n(40244),o=n(54836),r=n(94013);const i=!1;var a=n(3445),c=n(31698),l=n(64957);const d={UseGlobalEndpoint:{type:"builtInParams",name:"useGlobalEndpoint"},UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}};var u=n(22809),p=n(94384);class h extends p.T{constructor(e){super(e),Object.setPrototypeOf(this,h.prototype)}}const m=e=>({...e,...e.SecretAccessKey&&{SecretAccessKey:u.$}}),g=e=>({...e,...e.Credentials&&{Credentials:m(e.Credentials)}});class f extends h{name="ExpiredTokenException";$fault="client";constructor(e){super({name:"ExpiredTokenException",$fault:"client",...e}),Object.setPrototypeOf(this,f.prototype)}}class y extends h{name="MalformedPolicyDocumentException";$fault="client";constructor(e){super({name:"MalformedPolicyDocumentException",$fault:"client",...e}),Object.setPrototypeOf(this,y.prototype)}}class S extends h{name="PackedPolicyTooLargeException";$fault="client";constructor(e){super({name:"PackedPolicyTooLargeException",$fault:"client",...e}),Object.setPrototypeOf(this,S.prototype)}}class P extends h{name="RegionDisabledException";$fault="client";constructor(e){super({name:"RegionDisabledException",$fault:"client",...e}),Object.setPrototypeOf(this,P.prototype)}}class E extends h{name="IDPRejectedClaimException";$fault="client";constructor(e){super({name:"IDPRejectedClaimException",$fault:"client",...e}),Object.setPrototypeOf(this,E.prototype)}}class w extends h{name="InvalidIdentityTokenException";$fault="client";constructor(e){super({name:"InvalidIdentityTokenException",$fault:"client",...e}),Object.setPrototypeOf(this,w.prototype)}}const A=e=>({...e,...e.WebIdentityToken&&{WebIdentityToken:u.$}}),I=e=>({...e,...e.Credentials&&{Credentials:m(e.Credentials)}});class b extends h{name="IDPCommunicationErrorException";$fault="client";constructor(e){super({name:"IDPCommunicationErrorException",$fault:"client",...e}),Object.setPrototypeOf(this,b.prototype)}}var v=n(25904),x=n(67324),C=n(76460),R=n(71871),k=n(22967),T=n(27916);const D=async(e,t)=>{const n=pe;let s;return s=Ye({...H(e,t),[me]:fe,[Ne]:he}),ue(t,n,"/",void 0,s)},$=async(e,t)=>{const n=pe;let s;return s=Ye({...L(e,t),[me]:Pe,[Ne]:he}),ue(t,n,"/",void 0,s)},K=async(e,t)=>{if(e.statusCode>=300)return j(e,t);const n=await(0,v.t_)(e.body,t);let s={};return s=X(n.AssumeRoleResult,t),{$metadata:le(e),...s}},O=async(e,t)=>{if(e.statusCode>=300)return j(e,t);const n=await(0,v.t_)(e.body,t);let s={};return s=ee(n.AssumeRoleWithWebIdentityResult,t),{$metadata:le(e),...s}},j=async(e,t)=>{const n={...e,body:await(0,v.FI)(e.body,t)},s=Je(e,n.body);switch(s){case"ExpiredTokenException":case"com.amazonaws.sts#ExpiredTokenException":throw await W(n,t);case"MalformedPolicyDocument":case"com.amazonaws.sts#MalformedPolicyDocumentException":throw await F(n,t);case"PackedPolicyTooLarge":case"com.amazonaws.sts#PackedPolicyTooLargeException":throw await q(n,t);case"RegionDisabledException":case"com.amazonaws.sts#RegionDisabledException":throw await _(n,t);case"IDPCommunicationError":case"com.amazonaws.sts#IDPCommunicationErrorException":throw await z(n,t);case"IDPRejectedClaim":case"com.amazonaws.sts#IDPRejectedClaimException":throw await M(n,t);case"InvalidIdentityToken":case"com.amazonaws.sts#InvalidIdentityTokenException":throw await U(n,t);default:const o=n.body;return de({output:e,parsedBody:o.Error,errorCode:s})}},W=async(e,t)=>{const n=e.body,s=ne(n.Error,t),o=new f({$metadata:le(e),...s});return(0,p.M)(o,n)},z=async(e,t)=>{const n=e.body,s=se(n.Error,t),o=new b({$metadata:le(e),...s});return(0,p.M)(o,n)},M=async(e,t)=>{const n=e.body,s=oe(n.Error,t),o=new E({$metadata:le(e),...s});return(0,p.M)(o,n)},U=async(e,t)=>{const n=e.body,s=re(n.Error,t),o=new w({$metadata:le(e),...s});return(0,p.M)(o,n)},F=async(e,t)=>{const n=e.body,s=ie(n.Error,t),o=new y({$metadata:le(e),...s});return(0,p.M)(o,n)},q=async(e,t)=>{const n=e.body,s=ae(n.Error,t),o=new S({$metadata:le(e),...s});return(0,p.M)(o,n)},_=async(e,t)=>{const n=e.body,s=ce(n.Error,t),o=new P({$metadata:le(e),...s});return(0,p.M)(o,n)},H=(e,t)=>{const n={};if(null!=e[je]&&(n[je]=e[je]),null!=e[We]&&(n[We]=e[We]),null!=e[ke]){const s=N(e[ke],t);0===e[ke]?.length&&(n.PolicyArns=[]),Object.entries(s).forEach(([e,t])=>{n[`PolicyArns.${e}`]=t})}if(null!=e[Re]&&(n[Re]=e[Re]),null!=e[be]&&(n[be]=e[be]),null!=e[_e]){const s=J(e[_e],t);0===e[_e]?.length&&(n.Tags=[]),Object.entries(s).forEach(([e,t])=>{n[`Tags.${e}`]=t})}if(null!=e[Le]){const s=Y(e[Le],t);0===e[Le]?.length&&(n.TransitiveTagKeys=[]),Object.entries(s).forEach(([e,t])=>{n[`TransitiveTagKeys.${e}`]=t})}if(null!=e[xe]&&(n[xe]=e[xe]),null!=e[Fe]&&(n[Fe]=e[Fe]),null!=e[He]&&(n[He]=e[He]),null!=e[Ue]&&(n[Ue]=e[Ue]),null!=e[De]){const s=Z(e[De],t);0===e[De]?.length&&(n.ProvidedContexts=[]),Object.entries(s).forEach(([e,t])=>{n[`ProvidedContexts.${e}`]=t})}return n},L=(e,t)=>{const n={};if(null!=e[je]&&(n[je]=e[je]),null!=e[We]&&(n[We]=e[We]),null!=e[Ve]&&(n[Ve]=e[Ve]),null!=e[$e]&&(n[$e]=e[$e]),null!=e[ke]){const s=N(e[ke],t);0===e[ke]?.length&&(n.PolicyArns=[]),Object.entries(s).forEach(([e,t])=>{n[`PolicyArns.${e}`]=t})}return null!=e[Re]&&(n[Re]=e[Re]),null!=e[be]&&(n[be]=e[be]),n},N=(e,t)=>{const n={};let s=1;for(const o of e){if(null===o)continue;const e=G(o,t);Object.entries(e).forEach(([e,t])=>{n[`member.${s}.${e}`]=t}),s++}return n},G=(e,t)=>{const n={};return null!=e[Ze]&&(n[Ze]=e[Ze]),n},V=(e,t)=>{const n={};return null!=e[Te]&&(n[Te]=e[Te]),null!=e[Ie]&&(n[Ie]=e[Ie]),n},Z=(e,t)=>{const n={};let s=1;for(const t of e){if(null===t)continue;const e=V(t);Object.entries(e).forEach(([e,t])=>{n[`member.${s}.${e}`]=t}),s++}return n},B=(e,t)=>{const n={};return null!=e[Ce]&&(n[Ce]=e[Ce]),null!=e[Ge]&&(n[Ge]=e[Ge]),n},Y=(e,t)=>{const n={};let s=1;for(const t of e)null!==t&&(n[`member.${s}`]=t,s++);return n},J=(e,t)=>{const n={};let s=1;for(const t of e){if(null===t)continue;const e=B(t);Object.entries(e).forEach(([e,t])=>{n[`member.${s}.${e}`]=t}),s++}return n},Q=(e,t)=>{const n={};return null!=e[ye]&&(n[ye]=(0,C.lK)(e[ye])),null!=e[Ee]&&(n[Ee]=(0,C.lK)(e[Ee])),n},X=(e,t)=>{const n={};return null!=e[Ae]&&(n[Ae]=te(e[Ae],t)),null!=e[Se]&&(n[Se]=Q(e[Se])),null!=e[Ke]&&(n[Ke]=(0,C.xW)(e[Ke])),null!=e[Ue]&&(n[Ue]=(0,C.lK)(e[Ue])),n},ee=(e,t)=>{const n={};return null!=e[Ae]&&(n[Ae]=te(e[Ae],t)),null!=e[Me]&&(n[Me]=(0,C.lK)(e[Me])),null!=e[Se]&&(n[Se]=Q(e[Se])),null!=e[Ke]&&(n[Ke]=(0,C.xW)(e[Ke])),null!=e[Oe]&&(n[Oe]=(0,C.lK)(e[Oe])),null!=e[we]&&(n[we]=(0,C.lK)(e[we])),null!=e[Ue]&&(n[Ue]=(0,C.lK)(e[Ue])),n},te=(e,t)=>{const n={};return null!=e[ge]&&(n[ge]=(0,C.lK)(e[ge])),null!=e[ze]&&(n[ze]=(0,C.lK)(e[ze])),null!=e[qe]&&(n[qe]=(0,C.lK)(e[qe])),null!=e[ve]&&(n[ve]=(0,C.Y0)((0,R.t_)(e[ve]))),n},ne=(e,t)=>{const n={};return null!=e[Be]&&(n[Be]=(0,C.lK)(e[Be])),n},se=(e,t)=>{const n={};return null!=e[Be]&&(n[Be]=(0,C.lK)(e[Be])),n},oe=(e,t)=>{const n={};return null!=e[Be]&&(n[Be]=(0,C.lK)(e[Be])),n},re=(e,t)=>{const n={};return null!=e[Be]&&(n[Be]=(0,C.lK)(e[Be])),n},ie=(e,t)=>{const n={};return null!=e[Be]&&(n[Be]=(0,C.lK)(e[Be])),n},ae=(e,t)=>{const n={};return null!=e[Be]&&(n[Be]=(0,C.lK)(e[Be])),n},ce=(e,t)=>{const n={};return null!=e[Be]&&(n[Be]=(0,C.lK)(e[Be])),n},le=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"]}),de=(0,k.j)(h),ue=async(e,t,n,s,o)=>{const{hostname:r,protocol:i="https",port:a,path:c}=await e.endpoint(),l={protocol:i,hostname:r,port:a,method:"POST",path:c.endsWith("/")?c.slice(0,-1)+n:c+n,headers:t};return void 0!==s&&(l.hostname=s),void 0!==o&&(l.body=o),new x.K(l)},pe={"content-type":"application/x-www-form-urlencoded"},he="2011-06-15",me="Action",ge="AccessKeyId",fe="AssumeRole",ye="AssumedRoleId",Se="AssumedRoleUser",Pe="AssumeRoleWithWebIdentity",Ee="Arn",we="Audience",Ae="Credentials",Ie="ContextAssertion",be="DurationSeconds",ve="Expiration",xe="ExternalId",Ce="Key",Re="Policy",ke="PolicyArns",Te="ProviderArn",De="ProvidedContexts",$e="ProviderId",Ke="PackedPolicySize",Oe="Provider",je="RoleArn",We="RoleSessionName",ze="SecretAccessKey",Me="SubjectFromWebIdentityToken",Ue="SourceIdentity",Fe="SerialNumber",qe="SessionToken",_e="Tags",He="TokenCode",Le="TransitiveTagKeys",Ne="Version",Ge="Value",Ve="WebIdentityToken",Ze="arn",Be="message",Ye=e=>Object.entries(e).map(([e,t])=>(0,T.$)(e)+"="+(0,T.$)(t)).join("&"),Je=(e,t)=>void 0!==t.Error?.Code?t.Error.Code:404==e.statusCode?"NotFound":void 0;class Qe extends(l.u.classBuilder().ep(d).m(function(e,t,n,s){return[(0,c.TM)(n,this.serialize,this.deserialize),(0,a.r)(n,e.getEndpointParameterInstructions())]}).s("AWSSecurityTokenServiceV20110615","AssumeRole",{}).n("STSClient","AssumeRoleCommand").f(void 0,g).ser(D).de(K).build()){}class Xe extends(l.u.classBuilder().ep(d).m(function(e,t,n,s){return[(0,c.TM)(n,this.serialize,this.deserialize),(0,a.r)(n,e.getEndpointParameterInstructions())]}).s("AWSSecurityTokenServiceV20110615","AssumeRoleWithWebIdentity",{}).n("STSClient","AssumeRoleWithWebIdentityCommand").f(A,I).ser($).de(O).build()){}const et=e=>{if("string"==typeof e?.Arn){const t=e.Arn.split(":");if(t.length>4&&""!==t[4])return t[4]}},tt=async(e,t,n,s={})=>{const a="function"==typeof e?await e():e,c="function"==typeof t?await t():t,l=await function(e={}){return(0,r.Z)({...o.GG,default:async()=>(i||console.warn("@aws-sdk - WARN - default STS region of us-east-1 used. See @aws-sdk/credential-providers README and set a region explicitly."),"us-east-1")},{...o.zH,...e})}(s)();return n?.debug?.("@aws-sdk/client-sts::resolveRegion","accepting first of:",`${a} (credential provider clientConfig)`,`${c} (contextual client)`,`${l} (STS default: AWS_REGION, profile region, or us-east-1)`),a??c??l},nt=e=>"h2"===e?.metadata?.handlerProtocol;var st=n(81095),ot=n(77813),rt=n(55112),it=n(97287),at=n(20498),ct=n(34014),lt=n(22404),dt=n(30612),ut=n(42791),pt=n(70649),ht=n(42795),mt=n(5963),gt=n(39774),ft=n(67821),yt=n(46951),St=n(26116),Pt=n(28947);const Et=async(e,t,n)=>({operation:(0,St.u)(t).operation,region:await(0,Pt.t)(e.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()}),wt=e=>{const t=[];return"AssumeRoleWithWebIdentity"===e.operation?t.push({schemeId:"smithy.api#noAuth"}):t.push(function(e){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"sts",region:e.region},propertiesExtractor:(e,t)=>({signingProperties:{config:e,context:t}})}}(e)),t};var At=n(39955),It=n(85122),bt=n(44472),vt=n(12906),xt=n(17093),Ct=n(29915),Rt=n(22184),kt=n(24570),Tt=n(45536),Dt=n(91701),$t=n(49522),Kt=n(95178),Ot=n(42291),jt=n(17355),Wt=n(4098),zt=n(82641),Mt=n(81395),Ut=n(49718),Ft=n(7459),qt=n(7638),_t=n(40643),Ht=n(97461),Lt=n(13062),Nt=n(70468);const Gt="required",Vt="type",Zt="fn",Bt="argv",Yt="ref",Jt=!1,Qt=!0,Xt="booleanEquals",en="stringEquals",tn="sigv4",nn="us-east-1",sn="endpoint",on="https://sts.{Region}.{PartitionResult#dnsSuffix}",rn="tree",an="error",cn="getAttr",ln={[Gt]:!1,[Vt]:"string"},dn={[Gt]:!0,default:!1,[Vt]:"boolean"},un={[Yt]:"Endpoint"},pn={[Zt]:"isSet",[Bt]:[{[Yt]:"Region"}]},hn={[Yt]:"Region"},mn={[Zt]:"aws.partition",[Bt]:[hn],assign:"PartitionResult"},gn={[Yt]:"UseFIPS"},fn={[Yt]:"UseDualStack"},yn={url:"https://sts.amazonaws.com",properties:{authSchemes:[{name:tn,signingName:"sts",signingRegion:nn}]},headers:{}},Sn={},Pn={conditions:[{[Zt]:en,[Bt]:[hn,"aws-global"]}],[sn]:yn,[Vt]:sn},En={[Zt]:Xt,[Bt]:[gn,!0]},wn={[Zt]:Xt,[Bt]:[fn,!0]},An={[Zt]:cn,[Bt]:[{[Yt]:"PartitionResult"},"supportsFIPS"]},In={[Yt]:"PartitionResult"},bn={[Zt]:Xt,[Bt]:[!0,{[Zt]:cn,[Bt]:[In,"supportsDualStack"]}]},vn=[{[Zt]:"isSet",[Bt]:[un]}],xn=[En],Cn=[wn],Rn={version:"1.0",parameters:{Region:ln,UseDualStack:dn,UseFIPS:dn,Endpoint:ln,UseGlobalEndpoint:dn},rules:[{conditions:[{[Zt]:Xt,[Bt]:[{[Yt]:"UseGlobalEndpoint"},Qt]},{[Zt]:"not",[Bt]:vn},pn,mn,{[Zt]:Xt,[Bt]:[gn,Jt]},{[Zt]:Xt,[Bt]:[fn,Jt]}],rules:[{conditions:[{[Zt]:en,[Bt]:[hn,"ap-northeast-1"]}],endpoint:yn,[Vt]:sn},{conditions:[{[Zt]:en,[Bt]:[hn,"ap-south-1"]}],endpoint:yn,[Vt]:sn},{conditions:[{[Zt]:en,[Bt]:[hn,"ap-southeast-1"]}],endpoint:yn,[Vt]:sn},{conditions:[{[Zt]:en,[Bt]:[hn,"ap-southeast-2"]}],endpoint:yn,[Vt]:sn},Pn,{conditions:[{[Zt]:en,[Bt]:[hn,"ca-central-1"]}],endpoint:yn,[Vt]:sn},{conditions:[{[Zt]:en,[Bt]:[hn,"eu-central-1"]}],endpoint:yn,[Vt]:sn},{conditions:[{[Zt]:en,[Bt]:[hn,"eu-north-1"]}],endpoint:yn,[Vt]:sn},{conditions:[{[Zt]:en,[Bt]:[hn,"eu-west-1"]}],endpoint:yn,[Vt]:sn},{conditions:[{[Zt]:en,[Bt]:[hn,"eu-west-2"]}],endpoint:yn,[Vt]:sn},{conditions:[{[Zt]:en,[Bt]:[hn,"eu-west-3"]}],endpoint:yn,[Vt]:sn},{conditions:[{[Zt]:en,[Bt]:[hn,"sa-east-1"]}],endpoint:yn,[Vt]:sn},{conditions:[{[Zt]:en,[Bt]:[hn,nn]}],endpoint:yn,[Vt]:sn},{conditions:[{[Zt]:en,[Bt]:[hn,"us-east-2"]}],endpoint:yn,[Vt]:sn},{conditions:[{[Zt]:en,[Bt]:[hn,"us-west-1"]}],endpoint:yn,[Vt]:sn},{conditions:[{[Zt]:en,[Bt]:[hn,"us-west-2"]}],endpoint:yn,[Vt]:sn},{endpoint:{url:on,properties:{authSchemes:[{name:tn,signingName:"sts",signingRegion:"{Region}"}]},headers:Sn},[Vt]:sn}],[Vt]:rn},{conditions:vn,rules:[{conditions:xn,error:"Invalid Configuration: FIPS and custom endpoint are not supported",[Vt]:an},{conditions:Cn,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",[Vt]:an},{endpoint:{url:un,properties:Sn,headers:Sn},[Vt]:sn}],[Vt]:rn},{conditions:[pn],rules:[{conditions:[mn],rules:[{conditions:[En,wn],rules:[{conditions:[{[Zt]:Xt,[Bt]:[Qt,An]},bn],rules:[{endpoint:{url:"https://sts-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:Sn,headers:Sn},[Vt]:sn}],[Vt]:rn},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",[Vt]:an}],[Vt]:rn},{conditions:xn,rules:[{conditions:[{[Zt]:Xt,[Bt]:[An,Qt]}],rules:[{conditions:[{[Zt]:en,[Bt]:[{[Zt]:cn,[Bt]:[In,"name"]},"aws-us-gov"]}],endpoint:{url:"https://sts.{Region}.amazonaws.com",properties:Sn,headers:Sn},[Vt]:sn},{endpoint:{url:"https://sts-fips.{Region}.{PartitionResult#dnsSuffix}",properties:Sn,headers:Sn},[Vt]:sn}],[Vt]:rn},{error:"FIPS is enabled but this partition does not support FIPS",[Vt]:an}],[Vt]:rn},{conditions:Cn,rules:[{conditions:[bn],rules:[{endpoint:{url:"https://sts.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:Sn,headers:Sn},[Vt]:sn}],[Vt]:rn},{error:"DualStack is enabled but this partition does not support DualStack",[Vt]:an}],[Vt]:rn},Pn,{endpoint:{url:on,properties:Sn,headers:Sn},[Vt]:sn}],[Vt]:rn}],[Vt]:rn},{error:"Invalid Configuration: Missing Region",[Vt]:an}]},kn=new Ht.k({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS","UseGlobalEndpoint"]}),Tn=(e,t={})=>kn.get(e,()=>(0,Lt.s)(Rn,{endpointParams:e,logger:t.logger}));Nt.m.aws=_t.UF;var Dn=n(60666),$n=n(21620),Kn=n(52339);var On=n(24163),jn=n(22927),Wn=n(9984);class zn extends ft.K{config;constructor(...[e]){const t=(e=>{(0,Kn.I)(process.version);const t=(0,$n.I)(e),n=()=>t().then(Dn.l),s=(e=>({apiVersion:"2011-06-15",base64Decoder:e?.base64Decoder??Mt.E,base64Encoder:e?.base64Encoder??Ut.n,disableHostPrefix:e?.disableHostPrefix??!1,endpointProvider:e?.endpointProvider??Tn,extensions:e?.extensions??[],httpAuthSchemeProvider:e?.httpAuthSchemeProvider??wt,httpAuthSchemes:e?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:e=>e.getIdentityProvider("aws.auth#sigv4"),signer:new vt.f2},{schemeId:"smithy.api#noAuth",identityProvider:e=>e.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new Tt.m}],logger:e?.logger??new Wt.N,serviceId:e?.serviceId??"STS",urlParser:e?.urlParser??zt.D,utf8Decoder:e?.utf8Decoder??Ft.a,utf8Encoder:e?.utf8Encoder??qt.P}))(e);(0,It.I)(process.version);const i={profile:e?.profile,logger:s.logger};return{...s,...e,runtime:"node",defaultsMode:t,authSchemePreference:e?.authSchemePreference??(0,r.Z)(bt.$,i),bodyLengthChecker:e?.bodyLengthChecker??Ot.n,defaultUserAgentProvider:e?.defaultUserAgentProvider??(0,xt.pf)({serviceId:s.serviceId,clientVersion:At.rE}),httpAuthSchemes:e?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:t=>t.getIdentityProvider("aws.auth#sigv4")||(async t=>await e.credentialDefaultProvider(t?.__config||{})()),signer:new vt.f2},{schemeId:"smithy.api#noAuth",identityProvider:e=>e.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new Tt.m}],maxAttempts:e?.maxAttempts??(0,r.Z)(mt.qs,e),region:e?.region??(0,r.Z)(o.GG,{...o.zH,...i}),requestHandler:$t.$.create(e?.requestHandler??n),retryMode:e?.retryMode??(0,r.Z)({...mt.kN,default:async()=>(await n()).retryMode||jt.L0},e),sha256:e?.sha256??Dt.V.bind(null,"sha256"),streamCollector:e?.streamCollector??Kt.k,useDualstackEndpoint:e?.useDualstackEndpoint??(0,r.Z)(Rt.e$,i),useFipsEndpoint:e?.useFipsEndpoint??(0,r.Z)(kt.Ko,i),userAgentAppId:e?.userAgentAppId??(0,r.Z)(Ct.hV,i)}})(e||{});super(t),this.initConfig=t;const n=(s=t,Object.assign(s,{useDualstackEndpoint:s.useDualstackEndpoint??!1,useFipsEndpoint:s.useFipsEndpoint??!1,useGlobalEndpoint:s.useGlobalEndpoint??!1,defaultSigningName:"sts"}));var s;const i=(0,it.D)(n),a=(0,mt.$z)(i),c=(0,ct.T)(a),l=(0,st.OV)(c),d=((e,t)=>{const n=Object.assign((0,On.R)(e),(0,Wn.xA)(e),(0,jn.e)(e),(e=>{const t=e.httpAuthSchemes;let n=e.httpAuthSchemeProvider,s=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){s=e},credentials:()=>s}})(e));return t.forEach(e=>e.configure(n)),Object.assign(e,(0,On.$)(n),(0,Wn.uv)(n),(0,jn.j)(n),{httpAuthSchemes:(s=n).httpAuthSchemes(),httpAuthSchemeProvider:s.httpAuthSchemeProvider(),credentials:s.credentials()});var s})((e=>{const t=(n=e,Object.assign(n,{stsClientCtor:zn}));var n;const s=(0,yt.h)(t);return Object.assign(s,{authSchemePreference:(0,Pt.t)(e.authSchemePreference??[])})})((0,ht.C)(l)),e?.extensions||[]);this.config=d,this.middlewareStack.use((0,at.sM)(this.config)),this.middlewareStack.use((0,gt.ey)(this.config)),this.middlewareStack.use((0,pt.vK)(this.config)),this.middlewareStack.use((0,st.TC)(this.config)),this.middlewareStack.use((0,ot.Y7)(this.config)),this.middlewareStack.use((0,rt.n)(this.config)),this.middlewareStack.use((0,lt.w)(this.config,{httpAuthSchemeParametersProvider:Et,identityProviderConfigProvider:async e=>new dt.h({"aws.auth#sigv4":e.credentials})})),this.middlewareStack.use((0,ut.l)(this.config))}destroy(){super.destroy()}}const Mn=(e,t)=>t?class extends e{constructor(e){super(e);for(const e of t)this.middlewareStack.use(e)}}:e,Un=(e={},t)=>((e,t)=>{let n,o;return async(r,i)=>{if(o=r,!n){const{logger:s=e?.parentClientConfig?.logger,profile:r=e?.parentClientConfig?.profile,region:i,requestHandler:a=e?.parentClientConfig?.requestHandler,credentialProviderLogger:c,userAgentAppId:l=e?.parentClientConfig?.userAgentAppId}=e,d=await tt(i,e?.parentClientConfig?.region,c,{logger:s,profile:r}),u=!nt(a);n=new t({...e,userAgentAppId:l,profile:r,credentialDefaultProvider:()=>async()=>o,region:d,requestHandler:u?a:void 0,logger:s})}const{Credentials:a,AssumedRoleUser:c}=await n.send(new Qe(i));if(!a||!a.AccessKeyId||!a.SecretAccessKey)throw new Error(`Invalid response from STS.assumeRole call with role ${i.RoleArn}`);const l=et(c),d={accessKeyId:a.AccessKeyId,secretAccessKey:a.SecretAccessKey,sessionToken:a.SessionToken,expiration:a.Expiration,...a.CredentialScope&&{credentialScope:a.CredentialScope},...l&&{accountId:l}};return(0,s.g)(d,"CREDENTIALS_STS_ASSUME_ROLE","i"),d}})(e,Mn(zn,t)),Fn=(e={},t)=>((e,t)=>{let n;return async o=>{if(!n){const{logger:s=e?.parentClientConfig?.logger,profile:o=e?.parentClientConfig?.profile,region:r,requestHandler:i=e?.parentClientConfig?.requestHandler,credentialProviderLogger:a,userAgentAppId:c=e?.parentClientConfig?.userAgentAppId}=e,l=await tt(r,e?.parentClientConfig?.region,a,{logger:s,profile:o}),d=!nt(i);n=new t({...e,userAgentAppId:c,profile:o,region:l,requestHandler:d?i:void 0,logger:s})}const{Credentials:r,AssumedRoleUser:i}=await n.send(new Xe(o));if(!r||!r.AccessKeyId||!r.SecretAccessKey)throw new Error(`Invalid response from STS.assumeRoleWithWebIdentity call with role ${o.RoleArn}`);const a=et(i),c={accessKeyId:r.AccessKeyId,secretAccessKey:r.SecretAccessKey,sessionToken:r.SessionToken,expiration:r.Expiration,...r.CredentialScope&&{credentialScope:r.CredentialScope},...a&&{accountId:a}};return a&&(0,s.g)(c,"RESOLVED_ACCOUNT_ID","T"),(0,s.g)(c,"CREDENTIALS_STS_ASSUME_ROLE_WEB_ID","k"),c}})(e,Mn(zn,t))}};
|
|
1
|
+
"use strict";exports.id=477,exports.ids=[477],exports.modules={39955:e=>{e.exports={rE:"3.927.0"}},45536:(e,t,n)=>{n.d(t,{m:()=>s});class s{async sign(e,t,n){return e}}},70477:(e,t,n)=>{n.d(t,{getDefaultRoleAssumer:()=>Un,getDefaultRoleAssumerWithWebIdentity:()=>Fn});var s=n(40244),o=n(54836),r=n(94013);const i=!1;var a=n(3445),c=n(31698),l=n(64957);const d={UseGlobalEndpoint:{type:"builtInParams",name:"useGlobalEndpoint"},UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}};var u=n(22809),p=n(94384);class h extends p.T{constructor(e){super(e),Object.setPrototypeOf(this,h.prototype)}}const m=e=>({...e,...e.SecretAccessKey&&{SecretAccessKey:u.$}}),g=e=>({...e,...e.Credentials&&{Credentials:m(e.Credentials)}});class f extends h{name="ExpiredTokenException";$fault="client";constructor(e){super({name:"ExpiredTokenException",$fault:"client",...e}),Object.setPrototypeOf(this,f.prototype)}}class y extends h{name="MalformedPolicyDocumentException";$fault="client";constructor(e){super({name:"MalformedPolicyDocumentException",$fault:"client",...e}),Object.setPrototypeOf(this,y.prototype)}}class S extends h{name="PackedPolicyTooLargeException";$fault="client";constructor(e){super({name:"PackedPolicyTooLargeException",$fault:"client",...e}),Object.setPrototypeOf(this,S.prototype)}}class P extends h{name="RegionDisabledException";$fault="client";constructor(e){super({name:"RegionDisabledException",$fault:"client",...e}),Object.setPrototypeOf(this,P.prototype)}}class E extends h{name="IDPRejectedClaimException";$fault="client";constructor(e){super({name:"IDPRejectedClaimException",$fault:"client",...e}),Object.setPrototypeOf(this,E.prototype)}}class w extends h{name="InvalidIdentityTokenException";$fault="client";constructor(e){super({name:"InvalidIdentityTokenException",$fault:"client",...e}),Object.setPrototypeOf(this,w.prototype)}}const A=e=>({...e,...e.WebIdentityToken&&{WebIdentityToken:u.$}}),I=e=>({...e,...e.Credentials&&{Credentials:m(e.Credentials)}});class b extends h{name="IDPCommunicationErrorException";$fault="client";constructor(e){super({name:"IDPCommunicationErrorException",$fault:"client",...e}),Object.setPrototypeOf(this,b.prototype)}}var v=n(25904),x=n(67324),C=n(76460),R=n(71871),k=n(22967),T=n(27916);const D=async(e,t)=>{const n=pe;let s;return s=Ye({...H(e,t),[me]:fe,[Ne]:he}),ue(t,n,"/",void 0,s)},$=async(e,t)=>{const n=pe;let s;return s=Ye({...L(e,t),[me]:Pe,[Ne]:he}),ue(t,n,"/",void 0,s)},K=async(e,t)=>{if(e.statusCode>=300)return j(e,t);const n=await(0,v.t_)(e.body,t);let s={};return s=X(n.AssumeRoleResult,t),{$metadata:le(e),...s}},O=async(e,t)=>{if(e.statusCode>=300)return j(e,t);const n=await(0,v.t_)(e.body,t);let s={};return s=ee(n.AssumeRoleWithWebIdentityResult,t),{$metadata:le(e),...s}},j=async(e,t)=>{const n={...e,body:await(0,v.FI)(e.body,t)},s=Je(e,n.body);switch(s){case"ExpiredTokenException":case"com.amazonaws.sts#ExpiredTokenException":throw await W(n,t);case"MalformedPolicyDocument":case"com.amazonaws.sts#MalformedPolicyDocumentException":throw await F(n,t);case"PackedPolicyTooLarge":case"com.amazonaws.sts#PackedPolicyTooLargeException":throw await q(n,t);case"RegionDisabledException":case"com.amazonaws.sts#RegionDisabledException":throw await _(n,t);case"IDPCommunicationError":case"com.amazonaws.sts#IDPCommunicationErrorException":throw await z(n,t);case"IDPRejectedClaim":case"com.amazonaws.sts#IDPRejectedClaimException":throw await M(n,t);case"InvalidIdentityToken":case"com.amazonaws.sts#InvalidIdentityTokenException":throw await U(n,t);default:const o=n.body;return de({output:e,parsedBody:o.Error,errorCode:s})}},W=async(e,t)=>{const n=e.body,s=ne(n.Error,t),o=new f({$metadata:le(e),...s});return(0,p.M)(o,n)},z=async(e,t)=>{const n=e.body,s=se(n.Error,t),o=new b({$metadata:le(e),...s});return(0,p.M)(o,n)},M=async(e,t)=>{const n=e.body,s=oe(n.Error,t),o=new E({$metadata:le(e),...s});return(0,p.M)(o,n)},U=async(e,t)=>{const n=e.body,s=re(n.Error,t),o=new w({$metadata:le(e),...s});return(0,p.M)(o,n)},F=async(e,t)=>{const n=e.body,s=ie(n.Error,t),o=new y({$metadata:le(e),...s});return(0,p.M)(o,n)},q=async(e,t)=>{const n=e.body,s=ae(n.Error,t),o=new S({$metadata:le(e),...s});return(0,p.M)(o,n)},_=async(e,t)=>{const n=e.body,s=ce(n.Error,t),o=new P({$metadata:le(e),...s});return(0,p.M)(o,n)},H=(e,t)=>{const n={};if(null!=e[je]&&(n[je]=e[je]),null!=e[We]&&(n[We]=e[We]),null!=e[ke]){const s=N(e[ke],t);0===e[ke]?.length&&(n.PolicyArns=[]),Object.entries(s).forEach(([e,t])=>{n[`PolicyArns.${e}`]=t})}if(null!=e[Re]&&(n[Re]=e[Re]),null!=e[be]&&(n[be]=e[be]),null!=e[_e]){const s=J(e[_e],t);0===e[_e]?.length&&(n.Tags=[]),Object.entries(s).forEach(([e,t])=>{n[`Tags.${e}`]=t})}if(null!=e[Le]){const s=Y(e[Le],t);0===e[Le]?.length&&(n.TransitiveTagKeys=[]),Object.entries(s).forEach(([e,t])=>{n[`TransitiveTagKeys.${e}`]=t})}if(null!=e[xe]&&(n[xe]=e[xe]),null!=e[Fe]&&(n[Fe]=e[Fe]),null!=e[He]&&(n[He]=e[He]),null!=e[Ue]&&(n[Ue]=e[Ue]),null!=e[De]){const s=Z(e[De],t);0===e[De]?.length&&(n.ProvidedContexts=[]),Object.entries(s).forEach(([e,t])=>{n[`ProvidedContexts.${e}`]=t})}return n},L=(e,t)=>{const n={};if(null!=e[je]&&(n[je]=e[je]),null!=e[We]&&(n[We]=e[We]),null!=e[Ve]&&(n[Ve]=e[Ve]),null!=e[$e]&&(n[$e]=e[$e]),null!=e[ke]){const s=N(e[ke],t);0===e[ke]?.length&&(n.PolicyArns=[]),Object.entries(s).forEach(([e,t])=>{n[`PolicyArns.${e}`]=t})}return null!=e[Re]&&(n[Re]=e[Re]),null!=e[be]&&(n[be]=e[be]),n},N=(e,t)=>{const n={};let s=1;for(const o of e){if(null===o)continue;const e=G(o,t);Object.entries(e).forEach(([e,t])=>{n[`member.${s}.${e}`]=t}),s++}return n},G=(e,t)=>{const n={};return null!=e[Ze]&&(n[Ze]=e[Ze]),n},V=(e,t)=>{const n={};return null!=e[Te]&&(n[Te]=e[Te]),null!=e[Ie]&&(n[Ie]=e[Ie]),n},Z=(e,t)=>{const n={};let s=1;for(const t of e){if(null===t)continue;const e=V(t);Object.entries(e).forEach(([e,t])=>{n[`member.${s}.${e}`]=t}),s++}return n},B=(e,t)=>{const n={};return null!=e[Ce]&&(n[Ce]=e[Ce]),null!=e[Ge]&&(n[Ge]=e[Ge]),n},Y=(e,t)=>{const n={};let s=1;for(const t of e)null!==t&&(n[`member.${s}`]=t,s++);return n},J=(e,t)=>{const n={};let s=1;for(const t of e){if(null===t)continue;const e=B(t);Object.entries(e).forEach(([e,t])=>{n[`member.${s}.${e}`]=t}),s++}return n},Q=(e,t)=>{const n={};return null!=e[ye]&&(n[ye]=(0,C.lK)(e[ye])),null!=e[Ee]&&(n[Ee]=(0,C.lK)(e[Ee])),n},X=(e,t)=>{const n={};return null!=e[Ae]&&(n[Ae]=te(e[Ae],t)),null!=e[Se]&&(n[Se]=Q(e[Se])),null!=e[Ke]&&(n[Ke]=(0,C.xW)(e[Ke])),null!=e[Ue]&&(n[Ue]=(0,C.lK)(e[Ue])),n},ee=(e,t)=>{const n={};return null!=e[Ae]&&(n[Ae]=te(e[Ae],t)),null!=e[Me]&&(n[Me]=(0,C.lK)(e[Me])),null!=e[Se]&&(n[Se]=Q(e[Se])),null!=e[Ke]&&(n[Ke]=(0,C.xW)(e[Ke])),null!=e[Oe]&&(n[Oe]=(0,C.lK)(e[Oe])),null!=e[we]&&(n[we]=(0,C.lK)(e[we])),null!=e[Ue]&&(n[Ue]=(0,C.lK)(e[Ue])),n},te=(e,t)=>{const n={};return null!=e[ge]&&(n[ge]=(0,C.lK)(e[ge])),null!=e[ze]&&(n[ze]=(0,C.lK)(e[ze])),null!=e[qe]&&(n[qe]=(0,C.lK)(e[qe])),null!=e[ve]&&(n[ve]=(0,C.Y0)((0,R.t_)(e[ve]))),n},ne=(e,t)=>{const n={};return null!=e[Be]&&(n[Be]=(0,C.lK)(e[Be])),n},se=(e,t)=>{const n={};return null!=e[Be]&&(n[Be]=(0,C.lK)(e[Be])),n},oe=(e,t)=>{const n={};return null!=e[Be]&&(n[Be]=(0,C.lK)(e[Be])),n},re=(e,t)=>{const n={};return null!=e[Be]&&(n[Be]=(0,C.lK)(e[Be])),n},ie=(e,t)=>{const n={};return null!=e[Be]&&(n[Be]=(0,C.lK)(e[Be])),n},ae=(e,t)=>{const n={};return null!=e[Be]&&(n[Be]=(0,C.lK)(e[Be])),n},ce=(e,t)=>{const n={};return null!=e[Be]&&(n[Be]=(0,C.lK)(e[Be])),n},le=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"]}),de=(0,k.j)(h),ue=async(e,t,n,s,o)=>{const{hostname:r,protocol:i="https",port:a,path:c}=await e.endpoint(),l={protocol:i,hostname:r,port:a,method:"POST",path:c.endsWith("/")?c.slice(0,-1)+n:c+n,headers:t};return void 0!==s&&(l.hostname=s),void 0!==o&&(l.body=o),new x.K(l)},pe={"content-type":"application/x-www-form-urlencoded"},he="2011-06-15",me="Action",ge="AccessKeyId",fe="AssumeRole",ye="AssumedRoleId",Se="AssumedRoleUser",Pe="AssumeRoleWithWebIdentity",Ee="Arn",we="Audience",Ae="Credentials",Ie="ContextAssertion",be="DurationSeconds",ve="Expiration",xe="ExternalId",Ce="Key",Re="Policy",ke="PolicyArns",Te="ProviderArn",De="ProvidedContexts",$e="ProviderId",Ke="PackedPolicySize",Oe="Provider",je="RoleArn",We="RoleSessionName",ze="SecretAccessKey",Me="SubjectFromWebIdentityToken",Ue="SourceIdentity",Fe="SerialNumber",qe="SessionToken",_e="Tags",He="TokenCode",Le="TransitiveTagKeys",Ne="Version",Ge="Value",Ve="WebIdentityToken",Ze="arn",Be="message",Ye=e=>Object.entries(e).map(([e,t])=>(0,T.$)(e)+"="+(0,T.$)(t)).join("&"),Je=(e,t)=>void 0!==t.Error?.Code?t.Error.Code:404==e.statusCode?"NotFound":void 0;class Qe extends(l.u.classBuilder().ep(d).m(function(e,t,n,s){return[(0,c.TM)(n,this.serialize,this.deserialize),(0,a.r)(n,e.getEndpointParameterInstructions())]}).s("AWSSecurityTokenServiceV20110615","AssumeRole",{}).n("STSClient","AssumeRoleCommand").f(void 0,g).ser(D).de(K).build()){}class Xe extends(l.u.classBuilder().ep(d).m(function(e,t,n,s){return[(0,c.TM)(n,this.serialize,this.deserialize),(0,a.r)(n,e.getEndpointParameterInstructions())]}).s("AWSSecurityTokenServiceV20110615","AssumeRoleWithWebIdentity",{}).n("STSClient","AssumeRoleWithWebIdentityCommand").f(A,I).ser($).de(O).build()){}const et=e=>{if("string"==typeof e?.Arn){const t=e.Arn.split(":");if(t.length>4&&""!==t[4])return t[4]}},tt=async(e,t,n,s={})=>{const a="function"==typeof e?await e():e,c="function"==typeof t?await t():t,l=await function(e={}){return(0,r.Z)({...o.GG,default:async()=>(i||console.warn("@aws-sdk - WARN - default STS region of us-east-1 used. See @aws-sdk/credential-providers README and set a region explicitly."),"us-east-1")},{...o.zH,...e})}(s)();return n?.debug?.("@aws-sdk/client-sts::resolveRegion","accepting first of:",`${a} (credential provider clientConfig)`,`${c} (contextual client)`,`${l} (STS default: AWS_REGION, profile region, or us-east-1)`),a??c??l},nt=e=>"h2"===e?.metadata?.handlerProtocol;var st=n(81095),ot=n(77813),rt=n(55112),it=n(97287),at=n(20498),ct=n(34014),lt=n(22404),dt=n(30612),ut=n(42791),pt=n(70649),ht=n(42795),mt=n(5963),gt=n(39774),ft=n(67821),yt=n(46951),St=n(26116),Pt=n(28947);const Et=async(e,t,n)=>({operation:(0,St.u)(t).operation,region:await(0,Pt.t)(e.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()}),wt=e=>{const t=[];return"AssumeRoleWithWebIdentity"===e.operation?t.push({schemeId:"smithy.api#noAuth"}):t.push(function(e){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"sts",region:e.region},propertiesExtractor:(e,t)=>({signingProperties:{config:e,context:t}})}}(e)),t};var At=n(39955),It=n(85122),bt=n(44472),vt=n(12906),xt=n(17093),Ct=n(29915),Rt=n(22184),kt=n(24570),Tt=n(45536),Dt=n(91701),$t=n(49522),Kt=n(95178),Ot=n(42291),jt=n(17355),Wt=n(4098),zt=n(82641),Mt=n(81395),Ut=n(49718),Ft=n(7459),qt=n(7638),_t=n(40643),Ht=n(97461),Lt=n(13062),Nt=n(70468);const Gt="required",Vt="type",Zt="fn",Bt="argv",Yt="ref",Jt=!1,Qt=!0,Xt="booleanEquals",en="stringEquals",tn="sigv4",nn="us-east-1",sn="endpoint",on="https://sts.{Region}.{PartitionResult#dnsSuffix}",rn="tree",an="error",cn="getAttr",ln={[Gt]:!1,[Vt]:"string"},dn={[Gt]:!0,default:!1,[Vt]:"boolean"},un={[Yt]:"Endpoint"},pn={[Zt]:"isSet",[Bt]:[{[Yt]:"Region"}]},hn={[Yt]:"Region"},mn={[Zt]:"aws.partition",[Bt]:[hn],assign:"PartitionResult"},gn={[Yt]:"UseFIPS"},fn={[Yt]:"UseDualStack"},yn={url:"https://sts.amazonaws.com",properties:{authSchemes:[{name:tn,signingName:"sts",signingRegion:nn}]},headers:{}},Sn={},Pn={conditions:[{[Zt]:en,[Bt]:[hn,"aws-global"]}],[sn]:yn,[Vt]:sn},En={[Zt]:Xt,[Bt]:[gn,!0]},wn={[Zt]:Xt,[Bt]:[fn,!0]},An={[Zt]:cn,[Bt]:[{[Yt]:"PartitionResult"},"supportsFIPS"]},In={[Yt]:"PartitionResult"},bn={[Zt]:Xt,[Bt]:[!0,{[Zt]:cn,[Bt]:[In,"supportsDualStack"]}]},vn=[{[Zt]:"isSet",[Bt]:[un]}],xn=[En],Cn=[wn],Rn={version:"1.0",parameters:{Region:ln,UseDualStack:dn,UseFIPS:dn,Endpoint:ln,UseGlobalEndpoint:dn},rules:[{conditions:[{[Zt]:Xt,[Bt]:[{[Yt]:"UseGlobalEndpoint"},Qt]},{[Zt]:"not",[Bt]:vn},pn,mn,{[Zt]:Xt,[Bt]:[gn,Jt]},{[Zt]:Xt,[Bt]:[fn,Jt]}],rules:[{conditions:[{[Zt]:en,[Bt]:[hn,"ap-northeast-1"]}],endpoint:yn,[Vt]:sn},{conditions:[{[Zt]:en,[Bt]:[hn,"ap-south-1"]}],endpoint:yn,[Vt]:sn},{conditions:[{[Zt]:en,[Bt]:[hn,"ap-southeast-1"]}],endpoint:yn,[Vt]:sn},{conditions:[{[Zt]:en,[Bt]:[hn,"ap-southeast-2"]}],endpoint:yn,[Vt]:sn},Pn,{conditions:[{[Zt]:en,[Bt]:[hn,"ca-central-1"]}],endpoint:yn,[Vt]:sn},{conditions:[{[Zt]:en,[Bt]:[hn,"eu-central-1"]}],endpoint:yn,[Vt]:sn},{conditions:[{[Zt]:en,[Bt]:[hn,"eu-north-1"]}],endpoint:yn,[Vt]:sn},{conditions:[{[Zt]:en,[Bt]:[hn,"eu-west-1"]}],endpoint:yn,[Vt]:sn},{conditions:[{[Zt]:en,[Bt]:[hn,"eu-west-2"]}],endpoint:yn,[Vt]:sn},{conditions:[{[Zt]:en,[Bt]:[hn,"eu-west-3"]}],endpoint:yn,[Vt]:sn},{conditions:[{[Zt]:en,[Bt]:[hn,"sa-east-1"]}],endpoint:yn,[Vt]:sn},{conditions:[{[Zt]:en,[Bt]:[hn,nn]}],endpoint:yn,[Vt]:sn},{conditions:[{[Zt]:en,[Bt]:[hn,"us-east-2"]}],endpoint:yn,[Vt]:sn},{conditions:[{[Zt]:en,[Bt]:[hn,"us-west-1"]}],endpoint:yn,[Vt]:sn},{conditions:[{[Zt]:en,[Bt]:[hn,"us-west-2"]}],endpoint:yn,[Vt]:sn},{endpoint:{url:on,properties:{authSchemes:[{name:tn,signingName:"sts",signingRegion:"{Region}"}]},headers:Sn},[Vt]:sn}],[Vt]:rn},{conditions:vn,rules:[{conditions:xn,error:"Invalid Configuration: FIPS and custom endpoint are not supported",[Vt]:an},{conditions:Cn,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",[Vt]:an},{endpoint:{url:un,properties:Sn,headers:Sn},[Vt]:sn}],[Vt]:rn},{conditions:[pn],rules:[{conditions:[mn],rules:[{conditions:[En,wn],rules:[{conditions:[{[Zt]:Xt,[Bt]:[Qt,An]},bn],rules:[{endpoint:{url:"https://sts-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:Sn,headers:Sn},[Vt]:sn}],[Vt]:rn},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",[Vt]:an}],[Vt]:rn},{conditions:xn,rules:[{conditions:[{[Zt]:Xt,[Bt]:[An,Qt]}],rules:[{conditions:[{[Zt]:en,[Bt]:[{[Zt]:cn,[Bt]:[In,"name"]},"aws-us-gov"]}],endpoint:{url:"https://sts.{Region}.amazonaws.com",properties:Sn,headers:Sn},[Vt]:sn},{endpoint:{url:"https://sts-fips.{Region}.{PartitionResult#dnsSuffix}",properties:Sn,headers:Sn},[Vt]:sn}],[Vt]:rn},{error:"FIPS is enabled but this partition does not support FIPS",[Vt]:an}],[Vt]:rn},{conditions:Cn,rules:[{conditions:[bn],rules:[{endpoint:{url:"https://sts.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:Sn,headers:Sn},[Vt]:sn}],[Vt]:rn},{error:"DualStack is enabled but this partition does not support DualStack",[Vt]:an}],[Vt]:rn},Pn,{endpoint:{url:on,properties:Sn,headers:Sn},[Vt]:sn}],[Vt]:rn}],[Vt]:rn},{error:"Invalid Configuration: Missing Region",[Vt]:an}]},kn=new Ht.k({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS","UseGlobalEndpoint"]}),Tn=(e,t={})=>kn.get(e,()=>(0,Lt.s)(Rn,{endpointParams:e,logger:t.logger}));Nt.m.aws=_t.UF;var Dn=n(60666),$n=n(21620),Kn=n(52339);var On=n(24163),jn=n(22927),Wn=n(9984);class zn extends ft.K{config;constructor(...[e]){const t=(e=>{(0,Kn.I)(process.version);const t=(0,$n.I)(e),n=()=>t().then(Dn.l),s=(e=>({apiVersion:"2011-06-15",base64Decoder:e?.base64Decoder??Mt.E,base64Encoder:e?.base64Encoder??Ut.n,disableHostPrefix:e?.disableHostPrefix??!1,endpointProvider:e?.endpointProvider??Tn,extensions:e?.extensions??[],httpAuthSchemeProvider:e?.httpAuthSchemeProvider??wt,httpAuthSchemes:e?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:e=>e.getIdentityProvider("aws.auth#sigv4"),signer:new vt.f2},{schemeId:"smithy.api#noAuth",identityProvider:e=>e.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new Tt.m}],logger:e?.logger??new Wt.N,serviceId:e?.serviceId??"STS",urlParser:e?.urlParser??zt.D,utf8Decoder:e?.utf8Decoder??Ft.a,utf8Encoder:e?.utf8Encoder??qt.P}))(e);(0,It.I)(process.version);const i={profile:e?.profile,logger:s.logger};return{...s,...e,runtime:"node",defaultsMode:t,authSchemePreference:e?.authSchemePreference??(0,r.Z)(bt.$,i),bodyLengthChecker:e?.bodyLengthChecker??Ot.n,defaultUserAgentProvider:e?.defaultUserAgentProvider??(0,xt.pf)({serviceId:s.serviceId,clientVersion:At.rE}),httpAuthSchemes:e?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:t=>t.getIdentityProvider("aws.auth#sigv4")||(async t=>await e.credentialDefaultProvider(t?.__config||{})()),signer:new vt.f2},{schemeId:"smithy.api#noAuth",identityProvider:e=>e.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new Tt.m}],maxAttempts:e?.maxAttempts??(0,r.Z)(mt.qs,e),region:e?.region??(0,r.Z)(o.GG,{...o.zH,...i}),requestHandler:$t.$.create(e?.requestHandler??n),retryMode:e?.retryMode??(0,r.Z)({...mt.kN,default:async()=>(await n()).retryMode||jt.L0},e),sha256:e?.sha256??Dt.V.bind(null,"sha256"),streamCollector:e?.streamCollector??Kt.k,useDualstackEndpoint:e?.useDualstackEndpoint??(0,r.Z)(Rt.e$,i),useFipsEndpoint:e?.useFipsEndpoint??(0,r.Z)(kt.Ko,i),userAgentAppId:e?.userAgentAppId??(0,r.Z)(Ct.hV,i)}})(e||{});super(t),this.initConfig=t;const n=(s=t,Object.assign(s,{useDualstackEndpoint:s.useDualstackEndpoint??!1,useFipsEndpoint:s.useFipsEndpoint??!1,useGlobalEndpoint:s.useGlobalEndpoint??!1,defaultSigningName:"sts"}));var s;const i=(0,it.D)(n),a=(0,mt.$z)(i),c=(0,ct.T)(a),l=(0,st.OV)(c),d=((e,t)=>{const n=Object.assign((0,On.R)(e),(0,Wn.xA)(e),(0,jn.e)(e),(e=>{const t=e.httpAuthSchemes;let n=e.httpAuthSchemeProvider,s=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){s=e},credentials:()=>s}})(e));return t.forEach(e=>e.configure(n)),Object.assign(e,(0,On.$)(n),(0,Wn.uv)(n),(0,jn.j)(n),{httpAuthSchemes:(s=n).httpAuthSchemes(),httpAuthSchemeProvider:s.httpAuthSchemeProvider(),credentials:s.credentials()});var s})((e=>{const t=(n=e,Object.assign(n,{stsClientCtor:zn}));var n;const s=(0,yt.h)(t);return Object.assign(s,{authSchemePreference:(0,Pt.t)(e.authSchemePreference??[])})})((0,ht.C)(l)),e?.extensions||[]);this.config=d,this.middlewareStack.use((0,at.sM)(this.config)),this.middlewareStack.use((0,gt.ey)(this.config)),this.middlewareStack.use((0,pt.vK)(this.config)),this.middlewareStack.use((0,st.TC)(this.config)),this.middlewareStack.use((0,ot.Y7)(this.config)),this.middlewareStack.use((0,rt.n)(this.config)),this.middlewareStack.use((0,lt.w)(this.config,{httpAuthSchemeParametersProvider:Et,identityProviderConfigProvider:async e=>new dt.h({"aws.auth#sigv4":e.credentials})})),this.middlewareStack.use((0,ut.l)(this.config))}destroy(){super.destroy()}}const Mn=(e,t)=>t?class extends e{constructor(e){super(e);for(const e of t)this.middlewareStack.use(e)}}:e,Un=(e={},t)=>((e,t)=>{let n,o;return async(r,i)=>{if(o=r,!n){const{logger:s=e?.parentClientConfig?.logger,profile:r=e?.parentClientConfig?.profile,region:i,requestHandler:a=e?.parentClientConfig?.requestHandler,credentialProviderLogger:c,userAgentAppId:l=e?.parentClientConfig?.userAgentAppId}=e,d=await tt(i,e?.parentClientConfig?.region,c,{logger:s,profile:r}),u=!nt(a);n=new t({...e,userAgentAppId:l,profile:r,credentialDefaultProvider:()=>async()=>o,region:d,requestHandler:u?a:void 0,logger:s})}const{Credentials:a,AssumedRoleUser:c}=await n.send(new Qe(i));if(!a||!a.AccessKeyId||!a.SecretAccessKey)throw new Error(`Invalid response from STS.assumeRole call with role ${i.RoleArn}`);const l=et(c),d={accessKeyId:a.AccessKeyId,secretAccessKey:a.SecretAccessKey,sessionToken:a.SessionToken,expiration:a.Expiration,...a.CredentialScope&&{credentialScope:a.CredentialScope},...l&&{accountId:l}};return(0,s.g)(d,"CREDENTIALS_STS_ASSUME_ROLE","i"),d}})(e,Mn(zn,t)),Fn=(e={},t)=>((e,t)=>{let n;return async o=>{if(!n){const{logger:s=e?.parentClientConfig?.logger,profile:o=e?.parentClientConfig?.profile,region:r,requestHandler:i=e?.parentClientConfig?.requestHandler,credentialProviderLogger:a,userAgentAppId:c=e?.parentClientConfig?.userAgentAppId}=e,l=await tt(r,e?.parentClientConfig?.region,a,{logger:s,profile:o}),d=!nt(i);n=new t({...e,userAgentAppId:c,profile:o,region:l,requestHandler:d?i:void 0,logger:s})}const{Credentials:r,AssumedRoleUser:i}=await n.send(new Xe(o));if(!r||!r.AccessKeyId||!r.SecretAccessKey)throw new Error(`Invalid response from STS.assumeRoleWithWebIdentity call with role ${o.RoleArn}`);const a=et(i),c={accessKeyId:r.AccessKeyId,secretAccessKey:r.SecretAccessKey,sessionToken:r.SessionToken,expiration:r.Expiration,...r.CredentialScope&&{credentialScope:r.CredentialScope},...a&&{accountId:a}};return a&&(0,s.g)(c,"RESOLVED_ACCOUNT_ID","T"),(0,s.g)(c,"CREDENTIALS_STS_ASSUME_ROLE_WEB_ID","k"),c}})(e,Mn(zn,t))}};
|
|
2
2
|
//# sourceMappingURL=477.js.map
|
package/dist/521.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";exports.id=521,exports.ids=[521],exports.modules={21919:(e,t,r)=>{r.d(t,{CG:()=>n,Y2:()=>s,cJ:()=>i});var o=r(68218);const s=(e,t)=>(0,o.w)(e,t).then(e=>{if(e.length)try{return JSON.parse(e)}catch(t){throw"SyntaxError"===t?.name&&Object.defineProperty(t,"$responseBodyText",{value:e}),t}return{}}),n=async(e,t)=>{const r=await s(e,t);return r.message=r.message??r.Message,r},i=(e,t)=>{const r=(e,t)=>Object.keys(e).find(e=>e.toLowerCase()===t.toLowerCase()),o=e=>{let t=e;return"number"==typeof t&&(t=t.toString()),t.indexOf(",")>=0&&(t=t.split(",")[0]),t.indexOf(":")>=0&&(t=t.split(":")[0]),t.indexOf("#")>=0&&(t=t.split("#")[1]),t},s=r(e.headers,"x-amzn-errortype");if(void 0!==s)return o(e.headers[s]);if(t&&"object"==typeof t){const e=r(t,"code");if(e&&void 0!==t[e])return o(t[e]);if(void 0!==t.__type)return o(t.__type)}}},39955:e=>{e.exports={rE:"3.925.0"}},45536:(e,t,r)=>{r.d(t,{m:()=>o});class o{async sign(e,t,r){return e}}},75521:(e,t,r)=>{r.d(t,{CreateTokenCommand:()=>ft,SSOOIDCClient:()=>je});var o=r(81095),s=r(77813),n=r(55112),i=r(97287),a=r(20498),c=r(34014),d=r(22404),p=r(30612),u=r(42791),l=r(70649),h=r(42795),m=r(5963),y=r(39774),f=r(67821),g=r(46951),x=r(26116),b=r(28947);const w=async(e,t,r)=>({operation:(0,x.u)(t).operation,region:await(0,b.t)(e.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()}),S=e=>{const t=[];return"CreateToken"===e.operation?t.push({schemeId:"smithy.api#noAuth"}):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)),t},E={UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}};var v=r(39955),P=r(85122),I=r(44472),O=r(17093),k=r(29915),j=r(54836),_=r(22184),$=r(24570),T=r(91701),C=r(94013),A=r(49522),D=r(95178),z=r(42291),K=r(17355),R=r(12906),U=r(45536),M=r(4098),q=r(82641),F=r(81395),G=r(49718),V=r(7459),H=r(7638),Z=r(40643),L=r(97461),N=r(13062),J=r(70468);const Y="required",B="fn",W="argv",X="ref",Q=!0,ee="isSet",te="booleanEquals",re="error",oe="endpoint",se="tree",ne="PartitionResult",ie="getAttr",ae={[Y]:!1,type:"string"},ce={[Y]:!0,default:!1,type:"boolean"},de={[X]:"Endpoint"},pe={[B]:te,[W]:[{[X]:"UseFIPS"},!0]},ue={[B]:te,[W]:[{[X]:"UseDualStack"},!0]},le={},he={[B]:ie,[W]:[{[X]:ne},"supportsFIPS"]},me={[X]:ne},ye={[B]:te,[W]:[!0,{[B]:ie,[W]:[me,"supportsDualStack"]}]},fe=[pe],ge=[ue],xe=[{[X]:"Region"}],be={version:"1.0",parameters:{Region:ae,UseDualStack:ce,UseFIPS:ce,Endpoint:ae},rules:[{conditions:[{[B]:ee,[W]:[de]}],rules:[{conditions:fe,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:re},{conditions:ge,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:re},{endpoint:{url:de,properties:le,headers:le},type:oe}],type:se},{conditions:[{[B]:ee,[W]:xe}],rules:[{conditions:[{[B]:"aws.partition",[W]:xe,assign:ne}],rules:[{conditions:[pe,ue],rules:[{conditions:[{[B]:te,[W]:[Q,he]},ye],rules:[{endpoint:{url:"https://oidc-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:le,headers:le},type:oe}],type:se},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:re}],type:se},{conditions:fe,rules:[{conditions:[{[B]:te,[W]:[he,Q]}],rules:[{conditions:[{[B]:"stringEquals",[W]:[{[B]:ie,[W]:[me,"name"]},"aws-us-gov"]}],endpoint:{url:"https://oidc.{Region}.amazonaws.com",properties:le,headers:le},type:oe},{endpoint:{url:"https://oidc-fips.{Region}.{PartitionResult#dnsSuffix}",properties:le,headers:le},type:oe}],type:se},{error:"FIPS is enabled but this partition does not support FIPS",type:re}],type:se},{conditions:ge,rules:[{conditions:[ye],rules:[{endpoint:{url:"https://oidc.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:le,headers:le},type:oe}],type:se},{error:"DualStack is enabled but this partition does not support DualStack",type:re}],type:se},{endpoint:{url:"https://oidc.{Region}.{PartitionResult#dnsSuffix}",properties:le,headers:le},type:oe}],type:se}],type:se},{error:"Invalid Configuration: Missing Region",type:re}]},we=new L.k({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS"]}),Se=(e,t={})=>we.get(e,()=>(0,N.s)(be,{endpointParams:e,logger:t.logger}));J.m.aws=Z.UF;var Ee=r(60666),ve=r(21620),Pe=r(52339);var Ie=r(24163),Oe=r(22927),ke=r(9984);class je extends f.K{config;constructor(...[e]){const t=(e=>{(0,Pe.I)(process.version);const t=(0,ve.I)(e),r=()=>t().then(Ee.l),o=(e=>({apiVersion:"2019-06-10",base64Decoder:e?.base64Decoder??F.E,base64Encoder:e?.base64Encoder??G.n,disableHostPrefix:e?.disableHostPrefix??!1,endpointProvider:e?.endpointProvider??Se,extensions:e?.extensions??[],httpAuthSchemeProvider:e?.httpAuthSchemeProvider??S,httpAuthSchemes:e?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:e=>e.getIdentityProvider("aws.auth#sigv4"),signer:new R.f2},{schemeId:"smithy.api#noAuth",identityProvider:e=>e.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new U.m}],logger:e?.logger??new M.N,serviceId:e?.serviceId??"SSO OIDC",urlParser:e?.urlParser??q.D,utf8Decoder:e?.utf8Decoder??V.a,utf8Encoder:e?.utf8Encoder??H.P}))(e);(0,P.I)(process.version);const s={profile:e?.profile,logger:o.logger};return{...o,...e,runtime:"node",defaultsMode:t,authSchemePreference:e?.authSchemePreference??(0,C.Z)(I.$,s),bodyLengthChecker:e?.bodyLengthChecker??z.n,defaultUserAgentProvider:e?.defaultUserAgentProvider??(0,O.pf)({serviceId:o.serviceId,clientVersion:v.rE}),maxAttempts:e?.maxAttempts??(0,C.Z)(m.qs,e),region:e?.region??(0,C.Z)(j.GG,{...j.zH,...s}),requestHandler:A.$.create(e?.requestHandler??r),retryMode:e?.retryMode??(0,C.Z)({...m.kN,default:async()=>(await r()).retryMode||K.L0},e),sha256:e?.sha256??T.V.bind(null,"sha256"),streamCollector:e?.streamCollector??D.k,useDualstackEndpoint:e?.useDualstackEndpoint??(0,C.Z)(_.e$,s),useFipsEndpoint:e?.useFipsEndpoint??(0,C.Z)($.Ko,s),userAgentAppId:e?.userAgentAppId??(0,C.Z)(k.hV,s)}})(e||{});super(t),this.initConfig=t;const r=(f=t,Object.assign(f,{useDualstackEndpoint:f.useDualstackEndpoint??!1,useFipsEndpoint:f.useFipsEndpoint??!1,defaultSigningName:"sso-oauth"}));var f;const x=(0,i.D)(r),E=(0,m.$z)(x),Z=(0,c.T)(E),L=(0,o.OV)(Z),N=((e,t)=>{const r=Object.assign((0,Ie.R)(e),(0,ke.xA)(e),(0,Oe.e)(e),(e=>{const t=e.httpAuthSchemes;let r=e.httpAuthSchemeProvider,o=e.credentials;return{setHttpAuthScheme(e){const r=t.findIndex(t=>t.schemeId===e.schemeId);-1===r?t.push(e):t.splice(r,1,e)},httpAuthSchemes:()=>t,setHttpAuthSchemeProvider(e){r=e},httpAuthSchemeProvider:()=>r,setCredentials(e){o=e},credentials:()=>o}})(e));return t.forEach(e=>e.configure(r)),Object.assign(e,(0,Ie.$)(r),(0,ke.uv)(r),(0,Oe.j)(r),{httpAuthSchemes:(o=r).httpAuthSchemes(),httpAuthSchemeProvider:o.httpAuthSchemeProvider(),credentials:o.credentials()});var o})((e=>{const t=(0,g.h)(e);return Object.assign(t,{authSchemePreference:(0,b.t)(e.authSchemePreference??[])})})((0,h.C)(L)),e?.extensions||[]);this.config=N,this.middlewareStack.use((0,a.sM)(this.config)),this.middlewareStack.use((0,y.ey)(this.config)),this.middlewareStack.use((0,l.vK)(this.config)),this.middlewareStack.use((0,o.TC)(this.config)),this.middlewareStack.use((0,s.Y7)(this.config)),this.middlewareStack.use((0,n.n)(this.config)),this.middlewareStack.use((0,d.w)(this.config,{httpAuthSchemeParametersProvider:w,identityProviderConfigProvider:async e=>new p.h({"aws.auth#sigv4":e.credentials})})),this.middlewareStack.use((0,u.l)(this.config))}destroy(){super.destroy()}}var _e=r(3445),$e=r(31698),Te=r(64957),Ce=r(22809),Ae=r(94384);class De extends Ae.T{constructor(e){super(e),Object.setPrototypeOf(this,De.prototype)}}class ze extends De{name="AccessDeniedException";$fault="client";error;reason;error_description;constructor(e){super({name:"AccessDeniedException",$fault:"client",...e}),Object.setPrototypeOf(this,ze.prototype),this.error=e.error,this.reason=e.reason,this.error_description=e.error_description}}class Ke extends De{name="AuthorizationPendingException";$fault="client";error;error_description;constructor(e){super({name:"AuthorizationPendingException",$fault:"client",...e}),Object.setPrototypeOf(this,Ke.prototype),this.error=e.error,this.error_description=e.error_description}}const Re=e=>({...e,...e.clientSecret&&{clientSecret:Ce.$},...e.refreshToken&&{refreshToken:Ce.$},...e.codeVerifier&&{codeVerifier:Ce.$}}),Ue=e=>({...e,...e.accessToken&&{accessToken:Ce.$},...e.refreshToken&&{refreshToken:Ce.$},...e.idToken&&{idToken:Ce.$}});class Me extends De{name="ExpiredTokenException";$fault="client";error;error_description;constructor(e){super({name:"ExpiredTokenException",$fault:"client",...e}),Object.setPrototypeOf(this,Me.prototype),this.error=e.error,this.error_description=e.error_description}}class qe extends De{name="InternalServerException";$fault="server";error;error_description;constructor(e){super({name:"InternalServerException",$fault:"server",...e}),Object.setPrototypeOf(this,qe.prototype),this.error=e.error,this.error_description=e.error_description}}class Fe extends De{name="InvalidClientException";$fault="client";error;error_description;constructor(e){super({name:"InvalidClientException",$fault:"client",...e}),Object.setPrototypeOf(this,Fe.prototype),this.error=e.error,this.error_description=e.error_description}}class Ge extends De{name="InvalidGrantException";$fault="client";error;error_description;constructor(e){super({name:"InvalidGrantException",$fault:"client",...e}),Object.setPrototypeOf(this,Ge.prototype),this.error=e.error,this.error_description=e.error_description}}class Ve extends De{name="InvalidRequestException";$fault="client";error;reason;error_description;constructor(e){super({name:"InvalidRequestException",$fault:"client",...e}),Object.setPrototypeOf(this,Ve.prototype),this.error=e.error,this.reason=e.reason,this.error_description=e.error_description}}class He extends De{name="InvalidScopeException";$fault="client";error;error_description;constructor(e){super({name:"InvalidScopeException",$fault:"client",...e}),Object.setPrototypeOf(this,He.prototype),this.error=e.error,this.error_description=e.error_description}}class Ze extends De{name="SlowDownException";$fault="client";error;error_description;constructor(e){super({name:"SlowDownException",$fault:"client",...e}),Object.setPrototypeOf(this,Ze.prototype),this.error=e.error,this.error_description=e.error_description}}class Le extends De{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 Ne extends De{name="UnsupportedGrantTypeException";$fault="client";error;error_description;constructor(e){super({name:"UnsupportedGrantTypeException",$fault:"client",...e}),Object.setPrototypeOf(this,Ne.prototype),this.error=e.error,this.error_description=e.error_description}}var Je=r(21919),Ye=r(89212),Be=r(41226),We=r(87268),Xe=r(76460),Qe=r(22967);const et=async(e,t)=>{const r=(0,Ye.l)(e,t);let o;return r.bp("/token"),o=JSON.stringify((0,Be.s)(e,{clientId:[],clientSecret:[],code:[],codeVerifier:[],deviceCode:[],grantType:[],redirectUri:[],refreshToken:[],scope:e=>(0,We.S)(e)})),r.m("POST").h({"content-type":"application/json"}).b(o),r.build()},tt=async(e,t)=>{if(200!==e.statusCode&&e.statusCode>=300)return rt(e,t);const r=(0,Be.Tj)({$metadata:yt(e)}),o=(0,Xe.Y0)((0,Xe.Xk)(await(0,Je.Y2)(e.body,t)),"body"),s=(0,Be.s)(o,{accessToken:Xe.lK,expiresIn:Xe.ET,idToken:Xe.lK,refreshToken:Xe.lK,tokenType:Xe.lK});return Object.assign(r,s),r},rt=async(e,t)=>{const r={...e,body:await(0,Je.CG)(e.body,t)},o=(0,Je.cJ)(e,r.body);switch(o){case"AccessDeniedException":case"com.amazonaws.ssooidc#AccessDeniedException":throw await st(r,t);case"AuthorizationPendingException":case"com.amazonaws.ssooidc#AuthorizationPendingException":throw await nt(r,t);case"ExpiredTokenException":case"com.amazonaws.ssooidc#ExpiredTokenException":throw await it(r,t);case"InternalServerException":case"com.amazonaws.ssooidc#InternalServerException":throw await at(r,t);case"InvalidClientException":case"com.amazonaws.ssooidc#InvalidClientException":throw await ct(r,t);case"InvalidGrantException":case"com.amazonaws.ssooidc#InvalidGrantException":throw await dt(r,t);case"InvalidRequestException":case"com.amazonaws.ssooidc#InvalidRequestException":throw await pt(r,t);case"InvalidScopeException":case"com.amazonaws.ssooidc#InvalidScopeException":throw await ut(r,t);case"SlowDownException":case"com.amazonaws.ssooidc#SlowDownException":throw await lt(r,t);case"UnauthorizedClientException":case"com.amazonaws.ssooidc#UnauthorizedClientException":throw await ht(r,t);case"UnsupportedGrantTypeException":case"com.amazonaws.ssooidc#UnsupportedGrantTypeException":throw await mt(r,t);default:const s=r.body;return ot({output:e,parsedBody:s,errorCode:o})}},ot=(0,Qe.j)(De),st=async(e,t)=>{const r=(0,Be.Tj)({}),o=e.body,s=(0,Be.s)(o,{error:Xe.lK,error_description:Xe.lK,reason:Xe.lK});Object.assign(r,s);const n=new ze({$metadata:yt(e),...r});return(0,Ae.M)(n,e.body)},nt=async(e,t)=>{const r=(0,Be.Tj)({}),o=e.body,s=(0,Be.s)(o,{error:Xe.lK,error_description:Xe.lK});Object.assign(r,s);const n=new Ke({$metadata:yt(e),...r});return(0,Ae.M)(n,e.body)},it=async(e,t)=>{const r=(0,Be.Tj)({}),o=e.body,s=(0,Be.s)(o,{error:Xe.lK,error_description:Xe.lK});Object.assign(r,s);const n=new Me({$metadata:yt(e),...r});return(0,Ae.M)(n,e.body)},at=async(e,t)=>{const r=(0,Be.Tj)({}),o=e.body,s=(0,Be.s)(o,{error:Xe.lK,error_description:Xe.lK});Object.assign(r,s);const n=new qe({$metadata:yt(e),...r});return(0,Ae.M)(n,e.body)},ct=async(e,t)=>{const r=(0,Be.Tj)({}),o=e.body,s=(0,Be.s)(o,{error:Xe.lK,error_description:Xe.lK});Object.assign(r,s);const n=new Fe({$metadata:yt(e),...r});return(0,Ae.M)(n,e.body)},dt=async(e,t)=>{const r=(0,Be.Tj)({}),o=e.body,s=(0,Be.s)(o,{error:Xe.lK,error_description:Xe.lK});Object.assign(r,s);const n=new Ge({$metadata:yt(e),...r});return(0,Ae.M)(n,e.body)},pt=async(e,t)=>{const r=(0,Be.Tj)({}),o=e.body,s=(0,Be.s)(o,{error:Xe.lK,error_description:Xe.lK,reason:Xe.lK});Object.assign(r,s);const n=new Ve({$metadata:yt(e),...r});return(0,Ae.M)(n,e.body)},ut=async(e,t)=>{const r=(0,Be.Tj)({}),o=e.body,s=(0,Be.s)(o,{error:Xe.lK,error_description:Xe.lK});Object.assign(r,s);const n=new He({$metadata:yt(e),...r});return(0,Ae.M)(n,e.body)},lt=async(e,t)=>{const r=(0,Be.Tj)({}),o=e.body,s=(0,Be.s)(o,{error:Xe.lK,error_description:Xe.lK});Object.assign(r,s);const n=new Ze({$metadata:yt(e),...r});return(0,Ae.M)(n,e.body)},ht=async(e,t)=>{const r=(0,Be.Tj)({}),o=e.body,s=(0,Be.s)(o,{error:Xe.lK,error_description:Xe.lK});Object.assign(r,s);const n=new Le({$metadata:yt(e),...r});return(0,Ae.M)(n,e.body)},mt=async(e,t)=>{const r=(0,Be.Tj)({}),o=e.body,s=(0,Be.s)(o,{error:Xe.lK,error_description:Xe.lK});Object.assign(r,s);const n=new Ne({$metadata:yt(e),...r});return(0,Ae.M)(n,e.body)},yt=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(E).m(function(e,t,r,o){return[(0,$e.TM)(r,this.serialize,this.deserialize),(0,_e.r)(r,e.getEndpointParameterInstructions())]}).s("AWSSSOOIDCService","CreateToken",{}).n("SSOOIDCClient","CreateTokenCommand").f(Re,Ue).ser(et).de(tt).build()){}},87268:(e,t,r)=>{r.d(t,{S:()=>o});const o=e=>{if(null==e)return{};if(Array.isArray(e))return e.filter(e=>null!=e).map(o);if("object"==typeof e){const t={};for(const r of Object.keys(e))null!=e[r]&&(t[r]=o(e[r]));return t}return e}}};
|
|
1
|
+
"use strict";exports.id=521,exports.ids=[521],exports.modules={21919:(e,t,r)=>{r.d(t,{CG:()=>n,Y2:()=>s,cJ:()=>i});var o=r(68218);const s=(e,t)=>(0,o.w)(e,t).then(e=>{if(e.length)try{return JSON.parse(e)}catch(t){throw"SyntaxError"===t?.name&&Object.defineProperty(t,"$responseBodyText",{value:e}),t}return{}}),n=async(e,t)=>{const r=await s(e,t);return r.message=r.message??r.Message,r},i=(e,t)=>{const r=(e,t)=>Object.keys(e).find(e=>e.toLowerCase()===t.toLowerCase()),o=e=>{let t=e;return"number"==typeof t&&(t=t.toString()),t.indexOf(",")>=0&&(t=t.split(",")[0]),t.indexOf(":")>=0&&(t=t.split(":")[0]),t.indexOf("#")>=0&&(t=t.split("#")[1]),t},s=r(e.headers,"x-amzn-errortype");if(void 0!==s)return o(e.headers[s]);if(t&&"object"==typeof t){const e=r(t,"code");if(e&&void 0!==t[e])return o(t[e]);if(void 0!==t.__type)return o(t.__type)}}},39955:e=>{e.exports={rE:"3.927.0"}},45536:(e,t,r)=>{r.d(t,{m:()=>o});class o{async sign(e,t,r){return e}}},75521:(e,t,r)=>{r.d(t,{CreateTokenCommand:()=>ft,SSOOIDCClient:()=>je});var o=r(81095),s=r(77813),n=r(55112),i=r(97287),a=r(20498),c=r(34014),d=r(22404),p=r(30612),u=r(42791),l=r(70649),h=r(42795),m=r(5963),y=r(39774),f=r(67821),g=r(46951),x=r(26116),b=r(28947);const w=async(e,t,r)=>({operation:(0,x.u)(t).operation,region:await(0,b.t)(e.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()}),S=e=>{const t=[];return"CreateToken"===e.operation?t.push({schemeId:"smithy.api#noAuth"}):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)),t},E={UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}};var v=r(39955),P=r(85122),I=r(44472),O=r(17093),k=r(29915),j=r(54836),_=r(22184),$=r(24570),T=r(91701),C=r(94013),A=r(49522),D=r(95178),z=r(42291),K=r(17355),R=r(12906),U=r(45536),M=r(4098),q=r(82641),F=r(81395),G=r(49718),V=r(7459),H=r(7638),Z=r(40643),L=r(97461),N=r(13062),J=r(70468);const Y="required",B="fn",W="argv",X="ref",Q=!0,ee="isSet",te="booleanEquals",re="error",oe="endpoint",se="tree",ne="PartitionResult",ie="getAttr",ae={[Y]:!1,type:"string"},ce={[Y]:!0,default:!1,type:"boolean"},de={[X]:"Endpoint"},pe={[B]:te,[W]:[{[X]:"UseFIPS"},!0]},ue={[B]:te,[W]:[{[X]:"UseDualStack"},!0]},le={},he={[B]:ie,[W]:[{[X]:ne},"supportsFIPS"]},me={[X]:ne},ye={[B]:te,[W]:[!0,{[B]:ie,[W]:[me,"supportsDualStack"]}]},fe=[pe],ge=[ue],xe=[{[X]:"Region"}],be={version:"1.0",parameters:{Region:ae,UseDualStack:ce,UseFIPS:ce,Endpoint:ae},rules:[{conditions:[{[B]:ee,[W]:[de]}],rules:[{conditions:fe,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:re},{conditions:ge,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:re},{endpoint:{url:de,properties:le,headers:le},type:oe}],type:se},{conditions:[{[B]:ee,[W]:xe}],rules:[{conditions:[{[B]:"aws.partition",[W]:xe,assign:ne}],rules:[{conditions:[pe,ue],rules:[{conditions:[{[B]:te,[W]:[Q,he]},ye],rules:[{endpoint:{url:"https://oidc-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:le,headers:le},type:oe}],type:se},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:re}],type:se},{conditions:fe,rules:[{conditions:[{[B]:te,[W]:[he,Q]}],rules:[{conditions:[{[B]:"stringEquals",[W]:[{[B]:ie,[W]:[me,"name"]},"aws-us-gov"]}],endpoint:{url:"https://oidc.{Region}.amazonaws.com",properties:le,headers:le},type:oe},{endpoint:{url:"https://oidc-fips.{Region}.{PartitionResult#dnsSuffix}",properties:le,headers:le},type:oe}],type:se},{error:"FIPS is enabled but this partition does not support FIPS",type:re}],type:se},{conditions:ge,rules:[{conditions:[ye],rules:[{endpoint:{url:"https://oidc.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:le,headers:le},type:oe}],type:se},{error:"DualStack is enabled but this partition does not support DualStack",type:re}],type:se},{endpoint:{url:"https://oidc.{Region}.{PartitionResult#dnsSuffix}",properties:le,headers:le},type:oe}],type:se}],type:se},{error:"Invalid Configuration: Missing Region",type:re}]},we=new L.k({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS"]}),Se=(e,t={})=>we.get(e,()=>(0,N.s)(be,{endpointParams:e,logger:t.logger}));J.m.aws=Z.UF;var Ee=r(60666),ve=r(21620),Pe=r(52339);var Ie=r(24163),Oe=r(22927),ke=r(9984);class je extends f.K{config;constructor(...[e]){const t=(e=>{(0,Pe.I)(process.version);const t=(0,ve.I)(e),r=()=>t().then(Ee.l),o=(e=>({apiVersion:"2019-06-10",base64Decoder:e?.base64Decoder??F.E,base64Encoder:e?.base64Encoder??G.n,disableHostPrefix:e?.disableHostPrefix??!1,endpointProvider:e?.endpointProvider??Se,extensions:e?.extensions??[],httpAuthSchemeProvider:e?.httpAuthSchemeProvider??S,httpAuthSchemes:e?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:e=>e.getIdentityProvider("aws.auth#sigv4"),signer:new R.f2},{schemeId:"smithy.api#noAuth",identityProvider:e=>e.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new U.m}],logger:e?.logger??new M.N,serviceId:e?.serviceId??"SSO OIDC",urlParser:e?.urlParser??q.D,utf8Decoder:e?.utf8Decoder??V.a,utf8Encoder:e?.utf8Encoder??H.P}))(e);(0,P.I)(process.version);const s={profile:e?.profile,logger:o.logger};return{...o,...e,runtime:"node",defaultsMode:t,authSchemePreference:e?.authSchemePreference??(0,C.Z)(I.$,s),bodyLengthChecker:e?.bodyLengthChecker??z.n,defaultUserAgentProvider:e?.defaultUserAgentProvider??(0,O.pf)({serviceId:o.serviceId,clientVersion:v.rE}),maxAttempts:e?.maxAttempts??(0,C.Z)(m.qs,e),region:e?.region??(0,C.Z)(j.GG,{...j.zH,...s}),requestHandler:A.$.create(e?.requestHandler??r),retryMode:e?.retryMode??(0,C.Z)({...m.kN,default:async()=>(await r()).retryMode||K.L0},e),sha256:e?.sha256??T.V.bind(null,"sha256"),streamCollector:e?.streamCollector??D.k,useDualstackEndpoint:e?.useDualstackEndpoint??(0,C.Z)(_.e$,s),useFipsEndpoint:e?.useFipsEndpoint??(0,C.Z)($.Ko,s),userAgentAppId:e?.userAgentAppId??(0,C.Z)(k.hV,s)}})(e||{});super(t),this.initConfig=t;const r=(f=t,Object.assign(f,{useDualstackEndpoint:f.useDualstackEndpoint??!1,useFipsEndpoint:f.useFipsEndpoint??!1,defaultSigningName:"sso-oauth"}));var f;const x=(0,i.D)(r),E=(0,m.$z)(x),Z=(0,c.T)(E),L=(0,o.OV)(Z),N=((e,t)=>{const r=Object.assign((0,Ie.R)(e),(0,ke.xA)(e),(0,Oe.e)(e),(e=>{const t=e.httpAuthSchemes;let r=e.httpAuthSchemeProvider,o=e.credentials;return{setHttpAuthScheme(e){const r=t.findIndex(t=>t.schemeId===e.schemeId);-1===r?t.push(e):t.splice(r,1,e)},httpAuthSchemes:()=>t,setHttpAuthSchemeProvider(e){r=e},httpAuthSchemeProvider:()=>r,setCredentials(e){o=e},credentials:()=>o}})(e));return t.forEach(e=>e.configure(r)),Object.assign(e,(0,Ie.$)(r),(0,ke.uv)(r),(0,Oe.j)(r),{httpAuthSchemes:(o=r).httpAuthSchemes(),httpAuthSchemeProvider:o.httpAuthSchemeProvider(),credentials:o.credentials()});var o})((e=>{const t=(0,g.h)(e);return Object.assign(t,{authSchemePreference:(0,b.t)(e.authSchemePreference??[])})})((0,h.C)(L)),e?.extensions||[]);this.config=N,this.middlewareStack.use((0,a.sM)(this.config)),this.middlewareStack.use((0,y.ey)(this.config)),this.middlewareStack.use((0,l.vK)(this.config)),this.middlewareStack.use((0,o.TC)(this.config)),this.middlewareStack.use((0,s.Y7)(this.config)),this.middlewareStack.use((0,n.n)(this.config)),this.middlewareStack.use((0,d.w)(this.config,{httpAuthSchemeParametersProvider:w,identityProviderConfigProvider:async e=>new p.h({"aws.auth#sigv4":e.credentials})})),this.middlewareStack.use((0,u.l)(this.config))}destroy(){super.destroy()}}var _e=r(3445),$e=r(31698),Te=r(64957),Ce=r(22809),Ae=r(94384);class De extends Ae.T{constructor(e){super(e),Object.setPrototypeOf(this,De.prototype)}}class ze extends De{name="AccessDeniedException";$fault="client";error;reason;error_description;constructor(e){super({name:"AccessDeniedException",$fault:"client",...e}),Object.setPrototypeOf(this,ze.prototype),this.error=e.error,this.reason=e.reason,this.error_description=e.error_description}}class Ke extends De{name="AuthorizationPendingException";$fault="client";error;error_description;constructor(e){super({name:"AuthorizationPendingException",$fault:"client",...e}),Object.setPrototypeOf(this,Ke.prototype),this.error=e.error,this.error_description=e.error_description}}const Re=e=>({...e,...e.clientSecret&&{clientSecret:Ce.$},...e.refreshToken&&{refreshToken:Ce.$},...e.codeVerifier&&{codeVerifier:Ce.$}}),Ue=e=>({...e,...e.accessToken&&{accessToken:Ce.$},...e.refreshToken&&{refreshToken:Ce.$},...e.idToken&&{idToken:Ce.$}});class Me extends De{name="ExpiredTokenException";$fault="client";error;error_description;constructor(e){super({name:"ExpiredTokenException",$fault:"client",...e}),Object.setPrototypeOf(this,Me.prototype),this.error=e.error,this.error_description=e.error_description}}class qe extends De{name="InternalServerException";$fault="server";error;error_description;constructor(e){super({name:"InternalServerException",$fault:"server",...e}),Object.setPrototypeOf(this,qe.prototype),this.error=e.error,this.error_description=e.error_description}}class Fe extends De{name="InvalidClientException";$fault="client";error;error_description;constructor(e){super({name:"InvalidClientException",$fault:"client",...e}),Object.setPrototypeOf(this,Fe.prototype),this.error=e.error,this.error_description=e.error_description}}class Ge extends De{name="InvalidGrantException";$fault="client";error;error_description;constructor(e){super({name:"InvalidGrantException",$fault:"client",...e}),Object.setPrototypeOf(this,Ge.prototype),this.error=e.error,this.error_description=e.error_description}}class Ve extends De{name="InvalidRequestException";$fault="client";error;reason;error_description;constructor(e){super({name:"InvalidRequestException",$fault:"client",...e}),Object.setPrototypeOf(this,Ve.prototype),this.error=e.error,this.reason=e.reason,this.error_description=e.error_description}}class He extends De{name="InvalidScopeException";$fault="client";error;error_description;constructor(e){super({name:"InvalidScopeException",$fault:"client",...e}),Object.setPrototypeOf(this,He.prototype),this.error=e.error,this.error_description=e.error_description}}class Ze extends De{name="SlowDownException";$fault="client";error;error_description;constructor(e){super({name:"SlowDownException",$fault:"client",...e}),Object.setPrototypeOf(this,Ze.prototype),this.error=e.error,this.error_description=e.error_description}}class Le extends De{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 Ne extends De{name="UnsupportedGrantTypeException";$fault="client";error;error_description;constructor(e){super({name:"UnsupportedGrantTypeException",$fault:"client",...e}),Object.setPrototypeOf(this,Ne.prototype),this.error=e.error,this.error_description=e.error_description}}var Je=r(21919),Ye=r(89212),Be=r(41226),We=r(87268),Xe=r(76460),Qe=r(22967);const et=async(e,t)=>{const r=(0,Ye.l)(e,t);let o;return r.bp("/token"),o=JSON.stringify((0,Be.s)(e,{clientId:[],clientSecret:[],code:[],codeVerifier:[],deviceCode:[],grantType:[],redirectUri:[],refreshToken:[],scope:e=>(0,We.S)(e)})),r.m("POST").h({"content-type":"application/json"}).b(o),r.build()},tt=async(e,t)=>{if(200!==e.statusCode&&e.statusCode>=300)return rt(e,t);const r=(0,Be.Tj)({$metadata:yt(e)}),o=(0,Xe.Y0)((0,Xe.Xk)(await(0,Je.Y2)(e.body,t)),"body"),s=(0,Be.s)(o,{accessToken:Xe.lK,expiresIn:Xe.ET,idToken:Xe.lK,refreshToken:Xe.lK,tokenType:Xe.lK});return Object.assign(r,s),r},rt=async(e,t)=>{const r={...e,body:await(0,Je.CG)(e.body,t)},o=(0,Je.cJ)(e,r.body);switch(o){case"AccessDeniedException":case"com.amazonaws.ssooidc#AccessDeniedException":throw await st(r,t);case"AuthorizationPendingException":case"com.amazonaws.ssooidc#AuthorizationPendingException":throw await nt(r,t);case"ExpiredTokenException":case"com.amazonaws.ssooidc#ExpiredTokenException":throw await it(r,t);case"InternalServerException":case"com.amazonaws.ssooidc#InternalServerException":throw await at(r,t);case"InvalidClientException":case"com.amazonaws.ssooidc#InvalidClientException":throw await ct(r,t);case"InvalidGrantException":case"com.amazonaws.ssooidc#InvalidGrantException":throw await dt(r,t);case"InvalidRequestException":case"com.amazonaws.ssooidc#InvalidRequestException":throw await pt(r,t);case"InvalidScopeException":case"com.amazonaws.ssooidc#InvalidScopeException":throw await ut(r,t);case"SlowDownException":case"com.amazonaws.ssooidc#SlowDownException":throw await lt(r,t);case"UnauthorizedClientException":case"com.amazonaws.ssooidc#UnauthorizedClientException":throw await ht(r,t);case"UnsupportedGrantTypeException":case"com.amazonaws.ssooidc#UnsupportedGrantTypeException":throw await mt(r,t);default:const s=r.body;return ot({output:e,parsedBody:s,errorCode:o})}},ot=(0,Qe.j)(De),st=async(e,t)=>{const r=(0,Be.Tj)({}),o=e.body,s=(0,Be.s)(o,{error:Xe.lK,error_description:Xe.lK,reason:Xe.lK});Object.assign(r,s);const n=new ze({$metadata:yt(e),...r});return(0,Ae.M)(n,e.body)},nt=async(e,t)=>{const r=(0,Be.Tj)({}),o=e.body,s=(0,Be.s)(o,{error:Xe.lK,error_description:Xe.lK});Object.assign(r,s);const n=new Ke({$metadata:yt(e),...r});return(0,Ae.M)(n,e.body)},it=async(e,t)=>{const r=(0,Be.Tj)({}),o=e.body,s=(0,Be.s)(o,{error:Xe.lK,error_description:Xe.lK});Object.assign(r,s);const n=new Me({$metadata:yt(e),...r});return(0,Ae.M)(n,e.body)},at=async(e,t)=>{const r=(0,Be.Tj)({}),o=e.body,s=(0,Be.s)(o,{error:Xe.lK,error_description:Xe.lK});Object.assign(r,s);const n=new qe({$metadata:yt(e),...r});return(0,Ae.M)(n,e.body)},ct=async(e,t)=>{const r=(0,Be.Tj)({}),o=e.body,s=(0,Be.s)(o,{error:Xe.lK,error_description:Xe.lK});Object.assign(r,s);const n=new Fe({$metadata:yt(e),...r});return(0,Ae.M)(n,e.body)},dt=async(e,t)=>{const r=(0,Be.Tj)({}),o=e.body,s=(0,Be.s)(o,{error:Xe.lK,error_description:Xe.lK});Object.assign(r,s);const n=new Ge({$metadata:yt(e),...r});return(0,Ae.M)(n,e.body)},pt=async(e,t)=>{const r=(0,Be.Tj)({}),o=e.body,s=(0,Be.s)(o,{error:Xe.lK,error_description:Xe.lK,reason:Xe.lK});Object.assign(r,s);const n=new Ve({$metadata:yt(e),...r});return(0,Ae.M)(n,e.body)},ut=async(e,t)=>{const r=(0,Be.Tj)({}),o=e.body,s=(0,Be.s)(o,{error:Xe.lK,error_description:Xe.lK});Object.assign(r,s);const n=new He({$metadata:yt(e),...r});return(0,Ae.M)(n,e.body)},lt=async(e,t)=>{const r=(0,Be.Tj)({}),o=e.body,s=(0,Be.s)(o,{error:Xe.lK,error_description:Xe.lK});Object.assign(r,s);const n=new Ze({$metadata:yt(e),...r});return(0,Ae.M)(n,e.body)},ht=async(e,t)=>{const r=(0,Be.Tj)({}),o=e.body,s=(0,Be.s)(o,{error:Xe.lK,error_description:Xe.lK});Object.assign(r,s);const n=new Le({$metadata:yt(e),...r});return(0,Ae.M)(n,e.body)},mt=async(e,t)=>{const r=(0,Be.Tj)({}),o=e.body,s=(0,Be.s)(o,{error:Xe.lK,error_description:Xe.lK});Object.assign(r,s);const n=new Ne({$metadata:yt(e),...r});return(0,Ae.M)(n,e.body)},yt=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(E).m(function(e,t,r,o){return[(0,$e.TM)(r,this.serialize,this.deserialize),(0,_e.r)(r,e.getEndpointParameterInstructions())]}).s("AWSSSOOIDCService","CreateToken",{}).n("SSOOIDCClient","CreateTokenCommand").f(Re,Ue).ser(et).de(tt).build()){}},87268:(e,t,r)=>{r.d(t,{S:()=>o});const o=e=>{if(null==e)return{};if(Array.isArray(e))return e.filter(e=>null!=e).map(o);if("object"==typeof e){const t={};for(const r of Object.keys(e))null!=e[r]&&(t[r]=o(e[r]));return t}return e}}};
|
|
2
2
|
//# sourceMappingURL=521.js.map
|
package/dist/563.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";exports.id=563,exports.ids=[563],exports.modules={21919:(e,t,s)=>{s.d(t,{CG:()=>r,Y2:()=>o,cJ:()=>i});var n=s(68218);const o=(e,t)=>(0,n.w)(e,t).then(e=>{if(e.length)try{return JSON.parse(e)}catch(t){throw"SyntaxError"===t?.name&&Object.defineProperty(t,"$responseBodyText",{value:e}),t}return{}}),r=async(e,t)=>{const s=await o(e,t);return s.message=s.message??s.Message,s},i=(e,t)=>{const s=(e,t)=>Object.keys(e).find(e=>e.toLowerCase()===t.toLowerCase()),n=e=>{let t=e;return"number"==typeof t&&(t=t.toString()),t.indexOf(",")>=0&&(t=t.split(",")[0]),t.indexOf(":")>=0&&(t=t.split(":")[0]),t.indexOf("#")>=0&&(t=t.split("#")[1]),t},o=s(e.headers,"x-amzn-errortype");if(void 0!==o)return n(e.headers[o]);if(t&&"object"==typeof t){const e=s(t,"code");if(e&&void 0!==t[e])return n(t[e]);if(void 0!==t.__type)return n(t.__type)}}},45536:(e,t,s)=>{s.d(t,{m:()=>n});class n{async sign(e,t,s){return e}}},62563:(e,t,s)=>{s.d(t,{GetRoleCredentialsCommand:()=>U,SSOClient:()=>dt});var n=s(3445),o=s(31698),r=s(64957);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(22809),c=s(94384);class d extends c.T{constructor(e){super(e),Object.setPrototypeOf(this,d.prototype)}}class u extends d{name="InvalidRequestException";$fault="client";constructor(e){super({name:"InvalidRequestException",$fault:"client",...e}),Object.setPrototypeOf(this,u.prototype)}}class p extends d{name="ResourceNotFoundException";$fault="client";constructor(e){super({name:"ResourceNotFoundException",$fault:"client",...e}),Object.setPrototypeOf(this,p.prototype)}}class l extends d{name="TooManyRequestsException";$fault="client";constructor(e){super({name:"TooManyRequestsException",$fault:"client",...e}),Object.setPrototypeOf(this,l.prototype)}}class h extends d{name="UnauthorizedException";$fault="client";constructor(e){super({name:"UnauthorizedException",$fault:"client",...e}),Object.setPrototypeOf(this,h.prototype)}}const m=e=>({...e,...e.accessToken&&{accessToken:a.$}}),y=e=>({...e,...e.secretAccessKey&&{secretAccessKey:a.$},...e.sessionToken&&{sessionToken:a.$}}),g=e=>({...e,...e.roleCredentials&&{roleCredentials:y(e.roleCredentials)}});var f=s(21919),S=s(89212),b=s(41226),v=s(10212),P=s(76460),x=s(87268),w=s(22967);const I=async(e,t)=>{const s=(0,S.l)(e,t),n=(0,b.Tj)({},v.e,{[M]:e[$]});s.bp("/federation/credentials");const o=(0,b.Tj)({[F]:[,(0,P.Y0)(e[q],"roleName")],[z]:[,(0,P.Y0)(e[T],"accountId")]});return s.m("GET").h(n).q(o).b(void 0),s.build()},E=async(e,t)=>{if(200!==e.statusCode&&e.statusCode>=300)return k(e,t);const s=(0,b.Tj)({$metadata:D(e)}),n=(0,P.Y0)((0,P.Xk)(await(0,f.Y2)(e.body,t)),"body"),o=(0,b.s)(n,{roleCredentials:x.S});return Object.assign(s,o),s},k=async(e,t)=>{const s={...e,body:await(0,f.CG)(e.body,t)},n=(0,f.cJ)(e,s.body);switch(n){case"InvalidRequestException":case"com.amazonaws.sso#InvalidRequestException":throw await R(s,t);case"ResourceNotFoundException":case"com.amazonaws.sso#ResourceNotFoundException":throw await C(s,t);case"TooManyRequestsException":case"com.amazonaws.sso#TooManyRequestsException":throw await O(s,t);case"UnauthorizedException":case"com.amazonaws.sso#UnauthorizedException":throw await j(s,t);default:const o=s.body;return A({output:e,parsedBody:o,errorCode:n})}},A=(0,w.j)(d),R=async(e,t)=>{const s=(0,b.Tj)({}),n=e.body,o=(0,b.s)(n,{message:P.lK});Object.assign(s,o);const r=new u({$metadata:D(e),...s});return(0,c.M)(r,e.body)},C=async(e,t)=>{const s=(0,b.Tj)({}),n=e.body,o=(0,b.s)(n,{message:P.lK});Object.assign(s,o);const r=new p({$metadata:D(e),...s});return(0,c.M)(r,e.body)},O=async(e,t)=>{const s=(0,b.Tj)({}),n=e.body,o=(0,b.s)(n,{message:P.lK});Object.assign(s,o);const r=new l({$metadata:D(e),...s});return(0,c.M)(r,e.body)},j=async(e,t)=>{const s=(0,b.Tj)({}),n=e.body,o=(0,b.s)(n,{message:P.lK});Object.assign(s,o);const r=new h({$metadata:D(e),...s});return(0,c.M)(r,e.body)},D=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"]}),T="accountId",$="accessToken",z="account_id",q="roleName",F="role_name",M="x-amz-sso_bearer_token";class U extends(r.u.classBuilder().ep(i).m(function(e,t,s,r){return[(0,o.TM)(s,this.serialize,this.deserialize),(0,n.r)(s,e.getEndpointParameterInstructions())]}).s("SWBPortalService","GetRoleCredentials",{}).n("SSOClient","GetRoleCredentialsCommand").f(m,g).ser(I).de(E).build()){}var N=s(81095),G=s(77813),K=s(55112),L=s(97287),_=s(20498),H=s(34014),Z=s(22404),Y=s(30612),V=s(42791),B=s(70649),J=s(42795),W=s(5963),X=s(39774),Q=s(67821),ee=s(46951),te=s(26116),se=s(28947);const ne=async(e,t,s)=>({operation:(0,te.u)(t).operation,region:await(0,se.t)(e.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()}),oe=e=>{const t=[];switch(e.operation){case"GetRoleCredentials":case"ListAccountRoles":case"ListAccounts":case"Logout":t.push({schemeId:"smithy.api#noAuth"});break;default:t.push(function(e){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"awsssoportal",region:e.region},propertiesExtractor:(e,t)=>({signingProperties:{config:e,context:t}})}}(e))}return t};var re=s(85122),ie=s(44472),ae=s(17093),ce=s(29915),de=s(54836),ue=s(22184),pe=s(24570),le=s(91701),he=s(94013),me=s(49522),ye=s(95178),ge=s(42291),fe=s(17355),Se=s(12906),be=s(45536),ve=s(4098),Pe=s(82641),xe=s(81395),we=s(49718),Ie=s(7459),Ee=s(7638),ke=s(40643),Ae=s(97461),Re=s(13062),Ce=s(70468);const Oe="required",je="fn",De="argv",Te="ref",$e=!0,ze="isSet",qe="booleanEquals",Fe="error",Me="endpoint",Ue="tree",Ne="PartitionResult",Ge="getAttr",Ke={[Oe]:!1,type:"string"},Le={[Oe]:!0,default:!1,type:"boolean"},_e={[Te]:"Endpoint"},He={[je]:qe,[De]:[{[Te]:"UseFIPS"},!0]},Ze={[je]:qe,[De]:[{[Te]:"UseDualStack"},!0]},Ye={},Ve={[je]:Ge,[De]:[{[Te]:Ne},"supportsFIPS"]},Be={[Te]:Ne},Je={[je]:qe,[De]:[!0,{[je]:Ge,[De]:[Be,"supportsDualStack"]}]},We=[He],Xe=[Ze],Qe=[{[Te]:"Region"}],et={version:"1.0",parameters:{Region:Ke,UseDualStack:Le,UseFIPS:Le,Endpoint:Ke},rules:[{conditions:[{[je]:ze,[De]:[_e]}],rules:[{conditions:We,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:Fe},{conditions:Xe,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:Fe},{endpoint:{url:_e,properties:Ye,headers:Ye},type:Me}],type:Ue},{conditions:[{[je]:ze,[De]:Qe}],rules:[{conditions:[{[je]:"aws.partition",[De]:Qe,assign:Ne}],rules:[{conditions:[He,Ze],rules:[{conditions:[{[je]:qe,[De]:[$e,Ve]},Je],rules:[{endpoint:{url:"https://portal.sso-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:Ye,headers:Ye},type:Me}],type:Ue},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:Fe}],type:Ue},{conditions:We,rules:[{conditions:[{[je]:qe,[De]:[Ve,$e]}],rules:[{conditions:[{[je]:"stringEquals",[De]:[{[je]:Ge,[De]:[Be,"name"]},"aws-us-gov"]}],endpoint:{url:"https://portal.sso.{Region}.amazonaws.com",properties:Ye,headers:Ye},type:Me},{endpoint:{url:"https://portal.sso-fips.{Region}.{PartitionResult#dnsSuffix}",properties:Ye,headers:Ye},type:Me}],type:Ue},{error:"FIPS is enabled but this partition does not support FIPS",type:Fe}],type:Ue},{conditions:Xe,rules:[{conditions:[Je],rules:[{endpoint:{url:"https://portal.sso.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:Ye,headers:Ye},type:Me}],type:Ue},{error:"DualStack is enabled but this partition does not support DualStack",type:Fe}],type:Ue},{endpoint:{url:"https://portal.sso.{Region}.{PartitionResult#dnsSuffix}",properties:Ye,headers:Ye},type:Me}],type:Ue}],type:Ue},{error:"Invalid Configuration: Missing Region",type:Fe}]},tt=new Ae.k({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS"]}),st=(e,t={})=>tt.get(e,()=>(0,Re.s)(et,{endpointParams:e,logger:t.logger}));Ce.m.aws=ke.UF;var nt=s(60666),ot=s(21620),rt=s(52339);var it=s(24163),at=s(22927),ct=s(9984);class dt extends Q.K{config;constructor(...[e]){const t=(e=>{(0,rt.I)(process.version);const t=(0,ot.I)(e),s=()=>t().then(nt.l),n=(e=>({apiVersion:"2019-06-10",base64Decoder:e?.base64Decoder??xe.E,base64Encoder:e?.base64Encoder??we.n,disableHostPrefix:e?.disableHostPrefix??!1,endpointProvider:e?.endpointProvider??st,extensions:e?.extensions??[],httpAuthSchemeProvider:e?.httpAuthSchemeProvider??oe,httpAuthSchemes:e?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:e=>e.getIdentityProvider("aws.auth#sigv4"),signer:new Se.f2},{schemeId:"smithy.api#noAuth",identityProvider:e=>e.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new be.m}],logger:e?.logger??new ve.N,serviceId:e?.serviceId??"SSO",urlParser:e?.urlParser??Pe.D,utf8Decoder:e?.utf8Decoder??Ie.a,utf8Encoder:e?.utf8Encoder??Ee.P}))(e);(0,re.I)(process.version);const o={profile:e?.profile,logger:n.logger};return{...n,...e,runtime:"node",defaultsMode:t,authSchemePreference:e?.authSchemePreference??(0,he.Z)(ie.$,o),bodyLengthChecker:e?.bodyLengthChecker??ge.n,defaultUserAgentProvider:e?.defaultUserAgentProvider??(0,ae.pf)({serviceId:n.serviceId,clientVersion:"3.925.0"}),maxAttempts:e?.maxAttempts??(0,he.Z)(W.qs,e),region:e?.region??(0,he.Z)(de.GG,{...de.zH,...o}),requestHandler:me.$.create(e?.requestHandler??s),retryMode:e?.retryMode??(0,he.Z)({...W.kN,default:async()=>(await s()).retryMode||fe.L0},e),sha256:e?.sha256??le.V.bind(null,"sha256"),streamCollector:e?.streamCollector??ye.k,useDualstackEndpoint:e?.useDualstackEndpoint??(0,he.Z)(ue.e$,o),useFipsEndpoint:e?.useFipsEndpoint??(0,he.Z)(pe.Ko,o),userAgentAppId:e?.userAgentAppId??(0,he.Z)(ce.hV,o)}})(e||{});super(t),this.initConfig=t;const s=(n=t,Object.assign(n,{useDualstackEndpoint:n.useDualstackEndpoint??!1,useFipsEndpoint:n.useFipsEndpoint??!1,defaultSigningName:"awsssoportal"}));var n;const o=(0,L.D)(s),r=(0,W.$z)(o),i=(0,H.T)(r),a=(0,N.OV)(i),c=((e,t)=>{const s=Object.assign((0,it.R)(e),(0,ct.xA)(e),(0,at.e)(e),(e=>{const t=e.httpAuthSchemes;let s=e.httpAuthSchemeProvider,n=e.credentials;return{setHttpAuthScheme(e){const s=t.findIndex(t=>t.schemeId===e.schemeId);-1===s?t.push(e):t.splice(s,1,e)},httpAuthSchemes:()=>t,setHttpAuthSchemeProvider(e){s=e},httpAuthSchemeProvider:()=>s,setCredentials(e){n=e},credentials:()=>n}})(e));return t.forEach(e=>e.configure(s)),Object.assign(e,(0,it.$)(s),(0,ct.uv)(s),(0,at.j)(s),{httpAuthSchemes:(n=s).httpAuthSchemes(),httpAuthSchemeProvider:n.httpAuthSchemeProvider(),credentials:n.credentials()});var n})((e=>{const t=(0,ee.h)(e);return Object.assign(t,{authSchemePreference:(0,se.t)(e.authSchemePreference??[])})})((0,J.C)(a)),e?.extensions||[]);this.config=c,this.middlewareStack.use((0,_.sM)(this.config)),this.middlewareStack.use((0,X.ey)(this.config)),this.middlewareStack.use((0,B.vK)(this.config)),this.middlewareStack.use((0,N.TC)(this.config)),this.middlewareStack.use((0,G.Y7)(this.config)),this.middlewareStack.use((0,K.n)(this.config)),this.middlewareStack.use((0,Z.w)(this.config,{httpAuthSchemeParametersProvider:ne,identityProviderConfigProvider:async e=>new Y.h({"aws.auth#sigv4":e.credentials})})),this.middlewareStack.use((0,V.l)(this.config))}destroy(){super.destroy()}}},87268:(e,t,s)=>{s.d(t,{S:()=>n});const n=e=>{if(null==e)return{};if(Array.isArray(e))return e.filter(e=>null!=e).map(n);if("object"==typeof e){const t={};for(const s of Object.keys(e))null!=e[s]&&(t[s]=n(e[s]));return t}return e}}};
|
|
1
|
+
"use strict";exports.id=563,exports.ids=[563],exports.modules={21919:(e,t,s)=>{s.d(t,{CG:()=>r,Y2:()=>o,cJ:()=>i});var n=s(68218);const o=(e,t)=>(0,n.w)(e,t).then(e=>{if(e.length)try{return JSON.parse(e)}catch(t){throw"SyntaxError"===t?.name&&Object.defineProperty(t,"$responseBodyText",{value:e}),t}return{}}),r=async(e,t)=>{const s=await o(e,t);return s.message=s.message??s.Message,s},i=(e,t)=>{const s=(e,t)=>Object.keys(e).find(e=>e.toLowerCase()===t.toLowerCase()),n=e=>{let t=e;return"number"==typeof t&&(t=t.toString()),t.indexOf(",")>=0&&(t=t.split(",")[0]),t.indexOf(":")>=0&&(t=t.split(":")[0]),t.indexOf("#")>=0&&(t=t.split("#")[1]),t},o=s(e.headers,"x-amzn-errortype");if(void 0!==o)return n(e.headers[o]);if(t&&"object"==typeof t){const e=s(t,"code");if(e&&void 0!==t[e])return n(t[e]);if(void 0!==t.__type)return n(t.__type)}}},45536:(e,t,s)=>{s.d(t,{m:()=>n});class n{async sign(e,t,s){return e}}},62563:(e,t,s)=>{s.d(t,{GetRoleCredentialsCommand:()=>U,SSOClient:()=>dt});var n=s(3445),o=s(31698),r=s(64957);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(22809),c=s(94384);class d extends c.T{constructor(e){super(e),Object.setPrototypeOf(this,d.prototype)}}class u extends d{name="InvalidRequestException";$fault="client";constructor(e){super({name:"InvalidRequestException",$fault:"client",...e}),Object.setPrototypeOf(this,u.prototype)}}class p extends d{name="ResourceNotFoundException";$fault="client";constructor(e){super({name:"ResourceNotFoundException",$fault:"client",...e}),Object.setPrototypeOf(this,p.prototype)}}class l extends d{name="TooManyRequestsException";$fault="client";constructor(e){super({name:"TooManyRequestsException",$fault:"client",...e}),Object.setPrototypeOf(this,l.prototype)}}class h extends d{name="UnauthorizedException";$fault="client";constructor(e){super({name:"UnauthorizedException",$fault:"client",...e}),Object.setPrototypeOf(this,h.prototype)}}const m=e=>({...e,...e.accessToken&&{accessToken:a.$}}),y=e=>({...e,...e.secretAccessKey&&{secretAccessKey:a.$},...e.sessionToken&&{sessionToken:a.$}}),g=e=>({...e,...e.roleCredentials&&{roleCredentials:y(e.roleCredentials)}});var f=s(21919),S=s(89212),b=s(41226),v=s(10212),P=s(76460),x=s(87268),w=s(22967);const I=async(e,t)=>{const s=(0,S.l)(e,t),n=(0,b.Tj)({},v.e,{[M]:e[$]});s.bp("/federation/credentials");const o=(0,b.Tj)({[F]:[,(0,P.Y0)(e[q],"roleName")],[z]:[,(0,P.Y0)(e[T],"accountId")]});return s.m("GET").h(n).q(o).b(void 0),s.build()},E=async(e,t)=>{if(200!==e.statusCode&&e.statusCode>=300)return k(e,t);const s=(0,b.Tj)({$metadata:D(e)}),n=(0,P.Y0)((0,P.Xk)(await(0,f.Y2)(e.body,t)),"body"),o=(0,b.s)(n,{roleCredentials:x.S});return Object.assign(s,o),s},k=async(e,t)=>{const s={...e,body:await(0,f.CG)(e.body,t)},n=(0,f.cJ)(e,s.body);switch(n){case"InvalidRequestException":case"com.amazonaws.sso#InvalidRequestException":throw await R(s,t);case"ResourceNotFoundException":case"com.amazonaws.sso#ResourceNotFoundException":throw await C(s,t);case"TooManyRequestsException":case"com.amazonaws.sso#TooManyRequestsException":throw await O(s,t);case"UnauthorizedException":case"com.amazonaws.sso#UnauthorizedException":throw await j(s,t);default:const o=s.body;return A({output:e,parsedBody:o,errorCode:n})}},A=(0,w.j)(d),R=async(e,t)=>{const s=(0,b.Tj)({}),n=e.body,o=(0,b.s)(n,{message:P.lK});Object.assign(s,o);const r=new u({$metadata:D(e),...s});return(0,c.M)(r,e.body)},C=async(e,t)=>{const s=(0,b.Tj)({}),n=e.body,o=(0,b.s)(n,{message:P.lK});Object.assign(s,o);const r=new p({$metadata:D(e),...s});return(0,c.M)(r,e.body)},O=async(e,t)=>{const s=(0,b.Tj)({}),n=e.body,o=(0,b.s)(n,{message:P.lK});Object.assign(s,o);const r=new l({$metadata:D(e),...s});return(0,c.M)(r,e.body)},j=async(e,t)=>{const s=(0,b.Tj)({}),n=e.body,o=(0,b.s)(n,{message:P.lK});Object.assign(s,o);const r=new h({$metadata:D(e),...s});return(0,c.M)(r,e.body)},D=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"]}),T="accountId",$="accessToken",z="account_id",q="roleName",F="role_name",M="x-amz-sso_bearer_token";class U extends(r.u.classBuilder().ep(i).m(function(e,t,s,r){return[(0,o.TM)(s,this.serialize,this.deserialize),(0,n.r)(s,e.getEndpointParameterInstructions())]}).s("SWBPortalService","GetRoleCredentials",{}).n("SSOClient","GetRoleCredentialsCommand").f(m,g).ser(I).de(E).build()){}var N=s(81095),G=s(77813),K=s(55112),L=s(97287),_=s(20498),H=s(34014),Z=s(22404),Y=s(30612),V=s(42791),B=s(70649),J=s(42795),W=s(5963),X=s(39774),Q=s(67821),ee=s(46951),te=s(26116),se=s(28947);const ne=async(e,t,s)=>({operation:(0,te.u)(t).operation,region:await(0,se.t)(e.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()}),oe=e=>{const t=[];switch(e.operation){case"GetRoleCredentials":case"ListAccountRoles":case"ListAccounts":case"Logout":t.push({schemeId:"smithy.api#noAuth"});break;default:t.push(function(e){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"awsssoportal",region:e.region},propertiesExtractor:(e,t)=>({signingProperties:{config:e,context:t}})}}(e))}return t};var re=s(85122),ie=s(44472),ae=s(17093),ce=s(29915),de=s(54836),ue=s(22184),pe=s(24570),le=s(91701),he=s(94013),me=s(49522),ye=s(95178),ge=s(42291),fe=s(17355),Se=s(12906),be=s(45536),ve=s(4098),Pe=s(82641),xe=s(81395),we=s(49718),Ie=s(7459),Ee=s(7638),ke=s(40643),Ae=s(97461),Re=s(13062),Ce=s(70468);const Oe="required",je="fn",De="argv",Te="ref",$e=!0,ze="isSet",qe="booleanEquals",Fe="error",Me="endpoint",Ue="tree",Ne="PartitionResult",Ge="getAttr",Ke={[Oe]:!1,type:"string"},Le={[Oe]:!0,default:!1,type:"boolean"},_e={[Te]:"Endpoint"},He={[je]:qe,[De]:[{[Te]:"UseFIPS"},!0]},Ze={[je]:qe,[De]:[{[Te]:"UseDualStack"},!0]},Ye={},Ve={[je]:Ge,[De]:[{[Te]:Ne},"supportsFIPS"]},Be={[Te]:Ne},Je={[je]:qe,[De]:[!0,{[je]:Ge,[De]:[Be,"supportsDualStack"]}]},We=[He],Xe=[Ze],Qe=[{[Te]:"Region"}],et={version:"1.0",parameters:{Region:Ke,UseDualStack:Le,UseFIPS:Le,Endpoint:Ke},rules:[{conditions:[{[je]:ze,[De]:[_e]}],rules:[{conditions:We,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:Fe},{conditions:Xe,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:Fe},{endpoint:{url:_e,properties:Ye,headers:Ye},type:Me}],type:Ue},{conditions:[{[je]:ze,[De]:Qe}],rules:[{conditions:[{[je]:"aws.partition",[De]:Qe,assign:Ne}],rules:[{conditions:[He,Ze],rules:[{conditions:[{[je]:qe,[De]:[$e,Ve]},Je],rules:[{endpoint:{url:"https://portal.sso-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:Ye,headers:Ye},type:Me}],type:Ue},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:Fe}],type:Ue},{conditions:We,rules:[{conditions:[{[je]:qe,[De]:[Ve,$e]}],rules:[{conditions:[{[je]:"stringEquals",[De]:[{[je]:Ge,[De]:[Be,"name"]},"aws-us-gov"]}],endpoint:{url:"https://portal.sso.{Region}.amazonaws.com",properties:Ye,headers:Ye},type:Me},{endpoint:{url:"https://portal.sso-fips.{Region}.{PartitionResult#dnsSuffix}",properties:Ye,headers:Ye},type:Me}],type:Ue},{error:"FIPS is enabled but this partition does not support FIPS",type:Fe}],type:Ue},{conditions:Xe,rules:[{conditions:[Je],rules:[{endpoint:{url:"https://portal.sso.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:Ye,headers:Ye},type:Me}],type:Ue},{error:"DualStack is enabled but this partition does not support DualStack",type:Fe}],type:Ue},{endpoint:{url:"https://portal.sso.{Region}.{PartitionResult#dnsSuffix}",properties:Ye,headers:Ye},type:Me}],type:Ue}],type:Ue},{error:"Invalid Configuration: Missing Region",type:Fe}]},tt=new Ae.k({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS"]}),st=(e,t={})=>tt.get(e,()=>(0,Re.s)(et,{endpointParams:e,logger:t.logger}));Ce.m.aws=ke.UF;var nt=s(60666),ot=s(21620),rt=s(52339);var it=s(24163),at=s(22927),ct=s(9984);class dt extends Q.K{config;constructor(...[e]){const t=(e=>{(0,rt.I)(process.version);const t=(0,ot.I)(e),s=()=>t().then(nt.l),n=(e=>({apiVersion:"2019-06-10",base64Decoder:e?.base64Decoder??xe.E,base64Encoder:e?.base64Encoder??we.n,disableHostPrefix:e?.disableHostPrefix??!1,endpointProvider:e?.endpointProvider??st,extensions:e?.extensions??[],httpAuthSchemeProvider:e?.httpAuthSchemeProvider??oe,httpAuthSchemes:e?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:e=>e.getIdentityProvider("aws.auth#sigv4"),signer:new Se.f2},{schemeId:"smithy.api#noAuth",identityProvider:e=>e.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new be.m}],logger:e?.logger??new ve.N,serviceId:e?.serviceId??"SSO",urlParser:e?.urlParser??Pe.D,utf8Decoder:e?.utf8Decoder??Ie.a,utf8Encoder:e?.utf8Encoder??Ee.P}))(e);(0,re.I)(process.version);const o={profile:e?.profile,logger:n.logger};return{...n,...e,runtime:"node",defaultsMode:t,authSchemePreference:e?.authSchemePreference??(0,he.Z)(ie.$,o),bodyLengthChecker:e?.bodyLengthChecker??ge.n,defaultUserAgentProvider:e?.defaultUserAgentProvider??(0,ae.pf)({serviceId:n.serviceId,clientVersion:"3.927.0"}),maxAttempts:e?.maxAttempts??(0,he.Z)(W.qs,e),region:e?.region??(0,he.Z)(de.GG,{...de.zH,...o}),requestHandler:me.$.create(e?.requestHandler??s),retryMode:e?.retryMode??(0,he.Z)({...W.kN,default:async()=>(await s()).retryMode||fe.L0},e),sha256:e?.sha256??le.V.bind(null,"sha256"),streamCollector:e?.streamCollector??ye.k,useDualstackEndpoint:e?.useDualstackEndpoint??(0,he.Z)(ue.e$,o),useFipsEndpoint:e?.useFipsEndpoint??(0,he.Z)(pe.Ko,o),userAgentAppId:e?.userAgentAppId??(0,he.Z)(ce.hV,o)}})(e||{});super(t),this.initConfig=t;const s=(n=t,Object.assign(n,{useDualstackEndpoint:n.useDualstackEndpoint??!1,useFipsEndpoint:n.useFipsEndpoint??!1,defaultSigningName:"awsssoportal"}));var n;const o=(0,L.D)(s),r=(0,W.$z)(o),i=(0,H.T)(r),a=(0,N.OV)(i),c=((e,t)=>{const s=Object.assign((0,it.R)(e),(0,ct.xA)(e),(0,at.e)(e),(e=>{const t=e.httpAuthSchemes;let s=e.httpAuthSchemeProvider,n=e.credentials;return{setHttpAuthScheme(e){const s=t.findIndex(t=>t.schemeId===e.schemeId);-1===s?t.push(e):t.splice(s,1,e)},httpAuthSchemes:()=>t,setHttpAuthSchemeProvider(e){s=e},httpAuthSchemeProvider:()=>s,setCredentials(e){n=e},credentials:()=>n}})(e));return t.forEach(e=>e.configure(s)),Object.assign(e,(0,it.$)(s),(0,ct.uv)(s),(0,at.j)(s),{httpAuthSchemes:(n=s).httpAuthSchemes(),httpAuthSchemeProvider:n.httpAuthSchemeProvider(),credentials:n.credentials()});var n})((e=>{const t=(0,ee.h)(e);return Object.assign(t,{authSchemePreference:(0,se.t)(e.authSchemePreference??[])})})((0,J.C)(a)),e?.extensions||[]);this.config=c,this.middlewareStack.use((0,_.sM)(this.config)),this.middlewareStack.use((0,X.ey)(this.config)),this.middlewareStack.use((0,B.vK)(this.config)),this.middlewareStack.use((0,N.TC)(this.config)),this.middlewareStack.use((0,G.Y7)(this.config)),this.middlewareStack.use((0,K.n)(this.config)),this.middlewareStack.use((0,Z.w)(this.config,{httpAuthSchemeParametersProvider:ne,identityProviderConfigProvider:async e=>new Y.h({"aws.auth#sigv4":e.credentials})})),this.middlewareStack.use((0,V.l)(this.config))}destroy(){super.destroy()}}},87268:(e,t,s)=>{s.d(t,{S:()=>n});const n=e=>{if(null==e)return{};if(Array.isArray(e))return e.filter(e=>null!=e).map(n);if("object"==typeof e){const t={};for(const s of Object.keys(e))null!=e[s]&&(t[s]=n(e[s]));return t}return e}}};
|
|
2
2
|
//# sourceMappingURL=563.js.map
|