@thunderclient/cli 1.26.1 → 1.26.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/224.index.js +1 -1
- package/dist/365.index.js +1 -1
- package/dist/372.index.js +1 -1
- package/dist/780.index.js +1 -1
- package/dist/782.index.js +1 -1
- package/dist/827.index.js +1 -1
- package/dist/index.js +3 -3
- package/package.json +1 -1
package/dist/224.index.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
"use strict";exports.id=224,exports.ids=[224],exports.modules={848(e,t,i){i.d(t,{CreateTokenCommand:()=>It,SSOOIDCClient:()=>Re});var s=i(32),o=i(34),n=i(35),r=i(36),a=i(38),c=i(42),u=i(44),p=i(43),d=i(47),l=i(48),h=i(50),S=i(51),g=i(69),f=i(73),m=i(76),w=i(78),x=i(45),v=i(52);const E=async(e,t,i)=>({operation:(0,x.u)(t).operation,region:await(0,v.t)(e.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()});const b=e=>{const t=[];if("CreateToken"===e.operation)t.push({schemeId:"smithy.api#noAuth"});else t.push(function(e){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"sso-oauth",region:e.region},propertiesExtractor:(e,t)=>({signingProperties:{config:e,context:t}})}}(e));return t},I={UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}};var P=i(849),k=i(86),y=i(87),A=i(89),C=i(91),D=i(92),O=i(93),R=i(96),U=i(97),T=i(54),$=i(98),F=i(99),j=i(101),z=i(100),G=i(102),W=i(104),_=i(70),M=i(105),q=i(843),H=i(847),N=i(74),V=i(68),B=i(111),J=i(112),L=i(82),Z=i(113),K=i(850),Q=i(127),X=i(128),Y=i(39);const ee="required",te="fn",ie="argv",se="ref",oe=!0,ne="isSet",re="booleanEquals",ae="error",ce="endpoint",ue="tree",pe="PartitionResult",de="getAttr",le={[ee]:!1,type:"string"},he={[ee]:!0,default:!1,type:"boolean"},Se={[se]:"Endpoint"},ge={[te]:re,[ie]:[{[se]:"UseFIPS"},!0]},fe={[te]:re,[ie]:[{[se]:"UseDualStack"},!0]},me={},we={[te]:de,[ie]:[{[se]:pe},"supportsFIPS"]},xe={[se]:pe},ve={[te]:re,[ie]:[!0,{[te]:de,[ie]:[xe,"supportsDualStack"]}]},Ee=[ge],be=[fe],Ie=[{[se]:"Region"}],Pe={version:"1.0",parameters:{Region:le,UseDualStack:he,UseFIPS:he,Endpoint:le},rules:[{conditions:[{[te]:ne,[ie]:[Se]}],rules:[{conditions:Ee,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:ae},{conditions:be,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:ae},{endpoint:{url:Se,properties:me,headers:me},type:ce}],type:ue},{conditions:[{[te]:ne,[ie]:Ie}],rules:[{conditions:[{[te]:"aws.partition",[ie]:Ie,assign:pe}],rules:[{conditions:[ge,fe],rules:[{conditions:[{[te]:re,[ie]:[oe,we]},ve],rules:[{endpoint:{url:"https://oidc-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:me,headers:me},type:ce}],type:ue},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:ae}],type:ue},{conditions:Ee,rules:[{conditions:[{[te]:re,[ie]:[we,oe]}],rules:[{conditions:[{[te]:"stringEquals",[ie]:[{[te]:de,[ie]:[xe,"name"]},"aws-us-gov"]}],endpoint:{url:"https://oidc.{Region}.amazonaws.com",properties:me,headers:me},type:ce},{endpoint:{url:"https://oidc-fips.{Region}.{PartitionResult#dnsSuffix}",properties:me,headers:me},type:ce}],type:ue},{error:"FIPS is enabled but this partition does not support FIPS",type:ae}],type:ue},{conditions:be,rules:[{conditions:[ve],rules:[{endpoint:{url:"https://oidc.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:me,headers:me},type:ce}],type:ue},{error:"DualStack is enabled but this partition does not support DualStack",type:ae}],type:ue},{endpoint:{url:"https://oidc.{Region}.{PartitionResult#dnsSuffix}",properties:me,headers:me},type:ce}],type:ue}],type:ue},{error:"Invalid Configuration: Missing Region",type:ae}]},ke=new Q.k({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS"]}),ye=(e,t={})=>ke.get(e,()=>(0,X.s)(Pe,{endpointParams:e,logger:t.logger}));Y.m.aws=K.UF;const Ae=e=>{(0,j.I)(process.version);const t=(0,W.I)(e),i=()=>t().then(z.l),s=(e=>({apiVersion:"2019-06-10",base64Decoder:e?.base64Decoder??B.E,base64Encoder:e?.base64Encoder??J.n,disableHostPrefix:e?.disableHostPrefix??!1,endpointProvider:e?.endpointProvider??ye,extensions:e?.extensions??[],httpAuthSchemeProvider:e?.httpAuthSchemeProvider??b,httpAuthSchemes:e?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:e=>e.getIdentityProvider("aws.auth#sigv4"),signer:new M.f2},{schemeId:"smithy.api#noAuth",identityProvider:e=>e.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new H.m}],logger:e?.logger??new N.N,protocol:e?.protocol??q.Y,protocolSettings:e?.protocolSettings??{defaultNamespace:"com.amazonaws.ssooidc",version:"2019-06-10",serviceTarget:"AWSSSOOIDCService"},serviceId:e?.serviceId??"SSO OIDC",urlParser:e?.urlParser??V.D,utf8Decoder:e?.utf8Decoder??L.a,utf8Encoder:e?.utf8Encoder??Z.P}))(e);(0,k.I)(process.version);const o={profile:e?.profile,logger:s.logger};return{...s,...e,runtime:"node",defaultsMode:t,authSchemePreference:e?.authSchemePreference??(0,T.Z)(y.$,o),bodyLengthChecker:e?.bodyLengthChecker??G.n,defaultUserAgentProvider:e?.defaultUserAgentProvider??(0,A.pf)({serviceId:s.serviceId,clientVersion:P.rE}),maxAttempts:e?.maxAttempts??(0,T.Z)(g.qs,e),region:e?.region??(0,T.Z)(D.GG,{...D.zH,...o}),requestHandler:$.$.create(e?.requestHandler??i),retryMode:e?.retryMode??(0,T.Z)({...g.kN,default:async()=>(await i()).retryMode||_.L0},e),sha256:e?.sha256??U.V.bind(null,"sha256"),streamCollector:e?.streamCollector??F.k,useDualstackEndpoint:e?.useDualstackEndpoint??(0,T.Z)(O.e$,o),useFipsEndpoint:e?.useFipsEndpoint??(0,T.Z)(R.Ko,o),userAgentAppId:e?.userAgentAppId??(0,T.Z)(C.hV,o)}};var Ce=i(129),De=i(130),Oe=i(131);class Re extends m.K{config;constructor(...[e]){const t=Ae(e||{});super(t),this.initConfig=t;const i=(m=t,Object.assign(m,{useDualstackEndpoint:m.useDualstackEndpoint??!1,useFipsEndpoint:m.useFipsEndpoint??!1,defaultSigningName:"sso-oauth"}));var m;const x=(0,r.D)(i),b=(0,g.$z)(x),I=(0,c.T)(b),P=(0,s.OV)(I),k=((e,t)=>{const i=Object.assign((0,Ce.R)(e),(0,Oe.xA)(e),(0,De.e)(e),(e=>{const t=e.httpAuthSchemes;let i=e.httpAuthSchemeProvider,s=e.credentials;return{setHttpAuthScheme(e){const i=t.findIndex(t=>t.schemeId===e.schemeId);-1===i?t.push(e):t.splice(i,1,e)},httpAuthSchemes:()=>t,setHttpAuthSchemeProvider(e){i=e},httpAuthSchemeProvider:()=>i,setCredentials(e){s=e},credentials:()=>s}})(e));return t.forEach(e=>e.configure(i)),Object.assign(e,(0,Ce.$)(i),(0,Oe.uv)(i),(0,De.j)(i),{httpAuthSchemes:(s=i).httpAuthSchemes(),httpAuthSchemeProvider:s.httpAuthSchemeProvider(),credentials:s.credentials()});var s})((e=>{const t=(0,w.h)(e);return Object.assign(t,{authSchemePreference:(0,v.t)(e.authSchemePreference??[])})})((0,S.C)(P)),e?.extensions||[]);this.config=k,this.middlewareStack.use((0,l.wq)(this.config)),this.middlewareStack.use((0,a.sM)(this.config)),this.middlewareStack.use((0,f.ey)(this.config)),this.middlewareStack.use((0,h.vK)(this.config)),this.middlewareStack.use((0,s.TC)(this.config)),this.middlewareStack.use((0,o.Y7)(this.config)),this.middlewareStack.use((0,n.n)(this.config)),this.middlewareStack.use((0,u.w)(this.config,{httpAuthSchemeParametersProvider:E,identityProviderConfigProvider:async e=>new p.h({"aws.auth#sigv4":e.credentials})})),this.middlewareStack.use((0,d.l)(this.config))}destroy(){super.destroy()}}var Ue=i(132),Te=i(133),$e=i(115),Fe=i(118);class je extends Fe.T{constructor(e){super(e),Object.setPrototypeOf(this,je.prototype)}}class ze extends je{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 Ge extends je{name="AuthorizationPendingException";$fault="client";error;error_description;constructor(e){super({name:"AuthorizationPendingException",$fault:"client",...e}),Object.setPrototypeOf(this,Ge.prototype),this.error=e.error,this.error_description=e.error_description}}class We extends je{name="ExpiredTokenException";$fault="client";error;error_description;constructor(e){super({name:"ExpiredTokenException",$fault:"client",...e}),Object.setPrototypeOf(this,We.prototype),this.error=e.error,this.error_description=e.error_description}}class _e extends je{name="InternalServerException";$fault="server";error;error_description;constructor(e){super({name:"InternalServerException",$fault:"server",...e}),Object.setPrototypeOf(this,_e.prototype),this.error=e.error,this.error_description=e.error_description}}class Me extends je{name="InvalidClientException";$fault="client";error;error_description;constructor(e){super({name:"InvalidClientException",$fault:"client",...e}),Object.setPrototypeOf(this,Me.prototype),this.error=e.error,this.error_description=e.error_description}}class qe extends je{name="InvalidGrantException";$fault="client";error;error_description;constructor(e){super({name:"InvalidGrantException",$fault:"client",...e}),Object.setPrototypeOf(this,qe.prototype),this.error=e.error,this.error_description=e.error_description}}class He extends je{name="InvalidRequestException";$fault="client";error;reason;error_description;constructor(e){super({name:"InvalidRequestException",$fault:"client",...e}),Object.setPrototypeOf(this,He.prototype),this.error=e.error,this.reason=e.reason,this.error_description=e.error_description}}class Ne extends je{name="InvalidScopeException";$fault="client";error;error_description;constructor(e){super({name:"InvalidScopeException",$fault:"client",...e}),Object.setPrototypeOf(this,Ne.prototype),this.error=e.error,this.error_description=e.error_description}}class Ve extends je{name="SlowDownException";$fault="client";error;error_description;constructor(e){super({name:"SlowDownException",$fault:"client",...e}),Object.setPrototypeOf(this,Ve.prototype),this.error=e.error,this.error_description=e.error_description}}class Be extends je{name="UnauthorizedClientException";$fault="client";error;error_description;constructor(e){super({name:"UnauthorizedClientException",$fault:"client",...e}),Object.setPrototypeOf(this,Be.prototype),this.error=e.error,this.error_description=e.error_description}}class Je extends je{name="UnsupportedGrantTypeException";$fault="client";error;error_description;constructor(e){super({name:"UnsupportedGrantTypeException",$fault:"client",...e}),Object.setPrototypeOf(this,Je.prototype),this.error=e.error,this.error_description=e.error_description}}const Le="client",Ze="error",Ke="error_description",Qe="http",Xe="httpError",Ye="reason",et="refreshToken",tt="smithy.ts.sdk.synthetic.com.amazonaws.ssooidc",it="com.amazonaws.ssooidc";var st=[0,it,"AccessToken",8,0],ot=[0,it,"ClientSecret",8,0],nt=[0,it,"CodeVerifier",8,0],rt=[0,it,"IdToken",8,0],at=[0,it,"RefreshToken",8,0],ct=[-3,it,"AccessDeniedException",{[Ze]:Le,[Xe]:400},[Ze,Ye,Ke],[0,0,0]];$e.O.for(it).registerError(ct,ze);var ut=[-3,it,"AuthorizationPendingException",{[Ze]:Le,[Xe]:400},[Ze,Ke],[0,0]];$e.O.for(it).registerError(ut,Ge);var pt=[3,it,"CreateTokenRequest",0,["clientId","clientSecret","grantType","deviceCode","code",et,"scope","redirectUri","codeVerifier"],[0,[()=>ot,0],0,0,0,[()=>at,0],64,0,[()=>nt,0]],3],dt=[3,it,"CreateTokenResponse",0,["accessToken","tokenType","expiresIn",et,"idToken"],[[()=>st,0],0,1,[()=>at,0],[()=>rt,0]]],lt=[-3,it,"ExpiredTokenException",{[Ze]:Le,[Xe]:400},[Ze,Ke],[0,0]];$e.O.for(it).registerError(lt,We);var ht=[-3,it,"InternalServerException",{[Ze]:"server",[Xe]:500},[Ze,Ke],[0,0]];$e.O.for(it).registerError(ht,_e);var St=[-3,it,"InvalidClientException",{[Ze]:Le,[Xe]:401},[Ze,Ke],[0,0]];$e.O.for(it).registerError(St,Me);var gt=[-3,it,"InvalidGrantException",{[Ze]:Le,[Xe]:400},[Ze,Ke],[0,0]];$e.O.for(it).registerError(gt,qe);var ft=[-3,it,"InvalidRequestException",{[Ze]:Le,[Xe]:400},[Ze,Ye,Ke],[0,0,0]];$e.O.for(it).registerError(ft,He);var mt=[-3,it,"InvalidScopeException",{[Ze]:Le,[Xe]:400},[Ze,Ke],[0,0]];$e.O.for(it).registerError(mt,Ne);var wt=[-3,it,"SlowDownException",{[Ze]:Le,[Xe]:400},[Ze,Ke],[0,0]];$e.O.for(it).registerError(wt,Ve);var xt=[-3,it,"UnauthorizedClientException",{[Ze]:Le,[Xe]:400},[Ze,Ke],[0,0]];$e.O.for(it).registerError(xt,Be);var vt=[-3,it,"UnsupportedGrantTypeException",{[Ze]:Le,[Xe]:400},[Ze,Ke],[0,0]];$e.O.for(it).registerError(vt,Je);var Et=[-3,tt,"SSOOIDCServiceException",0,[],[]];$e.O.for(tt).registerError(Et,je);var bt=[9,it,"CreateToken",{[Qe]:["POST","/token",200]},()=>pt,()=>dt];class It extends(Te.u.classBuilder().ep(I).m(function(e,t,i,s){return[(0,Ue.r)(i,e.getEndpointParameterInstructions())]}).s("AWSSSOOIDCService","CreateToken",{}).n("SSOOIDCClient","CreateTokenCommand").sc(bt).build()){}},850(e,t,i){i.d(t,{UF:()=>c});var s=i(39),o=i(40),n=i(41);const r=(e,t=!1)=>{if(t){for(const t of e.split("."))if(!r(t))return!1;return!0}return!!(0,o.X)(e)&&(!(e.length<3||e.length>63)&&(e===e.toLowerCase()&&!(0,n.o)(e)))};let a=JSON.parse('{"partitions":[{"id":"aws","outputs":{"dnsSuffix":"amazonaws.com","dualStackDnsSuffix":"api.aws","implicitGlobalRegion":"us-east-1","name":"aws","supportsDualStack":true,"supportsFIPS":true},"regionRegex":"^(us|eu|ap|sa|ca|me|af|il|mx)\\\\-\\\\w+\\\\-\\\\d+$","regions":{"af-south-1":{"description":"Africa (Cape Town)"},"ap-east-1":{"description":"Asia Pacific (Hong Kong)"},"ap-east-2":{"description":"Asia Pacific (Taipei)"},"ap-northeast-1":{"description":"Asia Pacific (Tokyo)"},"ap-northeast-2":{"description":"Asia Pacific (Seoul)"},"ap-northeast-3":{"description":"Asia Pacific (Osaka)"},"ap-south-1":{"description":"Asia Pacific (Mumbai)"},"ap-south-2":{"description":"Asia Pacific (Hyderabad)"},"ap-southeast-1":{"description":"Asia Pacific (Singapore)"},"ap-southeast-2":{"description":"Asia Pacific (Sydney)"},"ap-southeast-3":{"description":"Asia Pacific (Jakarta)"},"ap-southeast-4":{"description":"Asia Pacific (Melbourne)"},"ap-southeast-5":{"description":"Asia Pacific (Malaysia)"},"ap-southeast-6":{"description":"Asia Pacific (New Zealand)"},"ap-southeast-7":{"description":"Asia Pacific (Thailand)"},"aws-global":{"description":"aws global region"},"ca-central-1":{"description":"Canada (Central)"},"ca-west-1":{"description":"Canada West (Calgary)"},"eu-central-1":{"description":"Europe (Frankfurt)"},"eu-central-2":{"description":"Europe (Zurich)"},"eu-north-1":{"description":"Europe (Stockholm)"},"eu-south-1":{"description":"Europe (Milan)"},"eu-south-2":{"description":"Europe (Spain)"},"eu-west-1":{"description":"Europe (Ireland)"},"eu-west-2":{"description":"Europe (London)"},"eu-west-3":{"description":"Europe (Paris)"},"il-central-1":{"description":"Israel (Tel Aviv)"},"me-central-1":{"description":"Middle East (UAE)"},"me-south-1":{"description":"Middle East (Bahrain)"},"mx-central-1":{"description":"Mexico (Central)"},"sa-east-1":{"description":"South America (Sao Paulo)"},"us-east-1":{"description":"US East (N. Virginia)"},"us-east-2":{"description":"US East (Ohio)"},"us-west-1":{"description":"US West (N. California)"},"us-west-2":{"description":"US West (Oregon)"}}},{"id":"aws-cn","outputs":{"dnsSuffix":"amazonaws.com.cn","dualStackDnsSuffix":"api.amazonwebservices.com.cn","implicitGlobalRegion":"cn-northwest-1","name":"aws-cn","supportsDualStack":true,"supportsFIPS":true},"regionRegex":"^cn\\\\-\\\\w+\\\\-\\\\d+$","regions":{"aws-cn-global":{"description":"aws-cn global region"},"cn-north-1":{"description":"China (Beijing)"},"cn-northwest-1":{"description":"China (Ningxia)"}}},{"id":"aws-eusc","outputs":{"dnsSuffix":"amazonaws.eu","dualStackDnsSuffix":"api.amazonwebservices.eu","implicitGlobalRegion":"eusc-de-east-1","name":"aws-eusc","supportsDualStack":true,"supportsFIPS":true},"regionRegex":"^eusc\\\\-(de)\\\\-\\\\w+\\\\-\\\\d+$","regions":{"eusc-de-east-1":{"description":"AWS European Sovereign Cloud (Germany)"}}},{"id":"aws-iso","outputs":{"dnsSuffix":"c2s.ic.gov","dualStackDnsSuffix":"api.aws.ic.gov","implicitGlobalRegion":"us-iso-east-1","name":"aws-iso","supportsDualStack":true,"supportsFIPS":true},"regionRegex":"^us\\\\-iso\\\\-\\\\w+\\\\-\\\\d+$","regions":{"aws-iso-global":{"description":"aws-iso global region"},"us-iso-east-1":{"description":"US ISO East"},"us-iso-west-1":{"description":"US ISO WEST"}}},{"id":"aws-iso-b","outputs":{"dnsSuffix":"sc2s.sgov.gov","dualStackDnsSuffix":"api.aws.scloud","implicitGlobalRegion":"us-isob-east-1","name":"aws-iso-b","supportsDualStack":true,"supportsFIPS":true},"regionRegex":"^us\\\\-isob\\\\-\\\\w+\\\\-\\\\d+$","regions":{"aws-iso-b-global":{"description":"aws-iso-b global region"},"us-isob-east-1":{"description":"US ISOB East (Ohio)"},"us-isob-west-1":{"description":"US ISOB West"}}},{"id":"aws-iso-e","outputs":{"dnsSuffix":"cloud.adc-e.uk","dualStackDnsSuffix":"api.cloud-aws.adc-e.uk","implicitGlobalRegion":"eu-isoe-west-1","name":"aws-iso-e","supportsDualStack":true,"supportsFIPS":true},"regionRegex":"^eu\\\\-isoe\\\\-\\\\w+\\\\-\\\\d+$","regions":{"aws-iso-e-global":{"description":"aws-iso-e global region"},"eu-isoe-west-1":{"description":"EU ISOE West"}}},{"id":"aws-iso-f","outputs":{"dnsSuffix":"csp.hci.ic.gov","dualStackDnsSuffix":"api.aws.hci.ic.gov","implicitGlobalRegion":"us-isof-south-1","name":"aws-iso-f","supportsDualStack":true,"supportsFIPS":true},"regionRegex":"^us\\\\-isof\\\\-\\\\w+\\\\-\\\\d+$","regions":{"aws-iso-f-global":{"description":"aws-iso-f global region"},"us-isof-east-1":{"description":"US ISOF EAST"},"us-isof-south-1":{"description":"US ISOF SOUTH"}}},{"id":"aws-us-gov","outputs":{"dnsSuffix":"amazonaws.com","dualStackDnsSuffix":"api.aws","implicitGlobalRegion":"us-gov-west-1","name":"aws-us-gov","supportsDualStack":true,"supportsFIPS":true},"regionRegex":"^us\\\\-gov\\\\-\\\\w+\\\\-\\\\d+$","regions":{"aws-us-gov-global":{"description":"aws-us-gov global region"},"us-gov-east-1":{"description":"AWS GovCloud (US-East)"},"us-gov-west-1":{"description":"AWS GovCloud (US-West)"}}}],"version":"1.1"}');const c={isVirtualHostableS3Bucket:r,parseArn:e=>{const t=e.split(":");if(t.length<6)return null;const[i,s,o,n,r,...a]=t;if("arn"!==i||""===s||""===o||""===a.join(":"))return null;return{partition:s,service:o,region:n,accountId:r,resourceId:a.map(e=>e.split("/")).flat()}},partition:e=>{const{partitions:t}=a;for(const i of t){const{regions:t,outputs:s}=i;for(const[i,o]of Object.entries(t))if(i===e)return{...s,...o}}for(const i of t){const{regionRegex:t,outputs:s}=i;if(new RegExp(t).test(e))return{...s}}const i=t.find(e=>"aws"===e.id);if(!i)throw new Error("Provided region was not found in the partition array or regex, and default partition with id 'aws' doesn't exist.");return{...i.outputs}}};s.m.aws=c},849(e){e.exports={rE:"3.985.0"}}};
|
|
2
|
+
"use strict";exports.id=224,exports.ids=[224],exports.modules={848(e,t,s){s.d(t,{CreateTokenCommand:()=>yt,SSOOIDCClient:()=>It});var i=s(32),o=s(34),n=s(35),r=s(36),a=s(38),c=s(42),u=s(44),p=s(43),d=s(47),l=s(48),h=s(50),g=s(51),S=s(69),f=s(73),m=s(76),w=s(78),x=s(45),v=s(52);const E=async(e,t,s)=>({operation:(0,x.u)(t).operation,region:await(0,v.t)(e.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()});const b=e=>{const t=[];if("CreateToken"===e.operation)t.push({schemeId:"smithy.api#noAuth"});else t.push(function(e){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"sso-oauth",region:e.region},propertiesExtractor:(e,t)=>({signingProperties:{config:e,context:t}})}}(e));return t},I={UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}};var P=s(849),k=s(86),y=s(87),A=s(89),C=s(91),D=s(92),O=s(93),R=s(96),T=s(97),U=s(54),$=s(98),F=s(99),j=s(101),z=s(100),G=s(102),W=s(104),_=s(70),M=s(105),q=s(843),H=s(847),N=s(74),V=s(68),B=s(111),J=s(112),L=s(82),Z=s(113),K=s(850),Q=s(127),X=s(128),Y=s(39);const ee="required",te="fn",se="argv",ie="ref",oe=!0,ne="isSet",re="booleanEquals",ae="error",ce="endpoint",ue="tree",pe="PartitionResult",de="getAttr",le={[ee]:!1,type:"string"},he={[ee]:!0,default:!1,type:"boolean"},ge={[ie]:"Endpoint"},Se={[te]:re,[se]:[{[ie]:"UseFIPS"},!0]},fe={[te]:re,[se]:[{[ie]:"UseDualStack"},!0]},me={},we={[te]:de,[se]:[{[ie]:pe},"supportsFIPS"]},xe={[ie]:pe},ve={[te]:re,[se]:[!0,{[te]:de,[se]:[xe,"supportsDualStack"]}]},Ee=[Se],be=[fe],Ie=[{[ie]:"Region"}],Pe={version:"1.0",parameters:{Region:le,UseDualStack:he,UseFIPS:he,Endpoint:le},rules:[{conditions:[{[te]:ne,[se]:[ge]}],rules:[{conditions:Ee,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:ae},{conditions:be,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:ae},{endpoint:{url:ge,properties:me,headers:me},type:ce}],type:ue},{conditions:[{[te]:ne,[se]:Ie}],rules:[{conditions:[{[te]:"aws.partition",[se]:Ie,assign:pe}],rules:[{conditions:[Se,fe],rules:[{conditions:[{[te]:re,[se]:[oe,we]},ve],rules:[{endpoint:{url:"https://oidc-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:me,headers:me},type:ce}],type:ue},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:ae}],type:ue},{conditions:Ee,rules:[{conditions:[{[te]:re,[se]:[we,oe]}],rules:[{conditions:[{[te]:"stringEquals",[se]:[{[te]:de,[se]:[xe,"name"]},"aws-us-gov"]}],endpoint:{url:"https://oidc.{Region}.amazonaws.com",properties:me,headers:me},type:ce},{endpoint:{url:"https://oidc-fips.{Region}.{PartitionResult#dnsSuffix}",properties:me,headers:me},type:ce}],type:ue},{error:"FIPS is enabled but this partition does not support FIPS",type:ae}],type:ue},{conditions:be,rules:[{conditions:[ve],rules:[{endpoint:{url:"https://oidc.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:me,headers:me},type:ce}],type:ue},{error:"DualStack is enabled but this partition does not support DualStack",type:ae}],type:ue},{endpoint:{url:"https://oidc.{Region}.{PartitionResult#dnsSuffix}",properties:me,headers:me},type:ce}],type:ue}],type:ue},{error:"Invalid Configuration: Missing Region",type:ae}]},ke=new Q.k({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS"]}),ye=(e,t={})=>ke.get(e,()=>(0,X.s)(Pe,{endpointParams:e,logger:t.logger}));Y.m.aws=K.UF;var Ae=s(115),Ce=s(118);class De extends Ce.T{constructor(e){super(e),Object.setPrototypeOf(this,De.prototype)}}class Oe extends De{name="AccessDeniedException";$fault="client";error;reason;error_description;constructor(e){super({name:"AccessDeniedException",$fault:"client",...e}),Object.setPrototypeOf(this,Oe.prototype),this.error=e.error,this.reason=e.reason,this.error_description=e.error_description}}class Re extends De{name="AuthorizationPendingException";$fault="client";error;error_description;constructor(e){super({name:"AuthorizationPendingException",$fault:"client",...e}),Object.setPrototypeOf(this,Re.prototype),this.error=e.error,this.error_description=e.error_description}}class Te extends De{name="ExpiredTokenException";$fault="client";error;error_description;constructor(e){super({name:"ExpiredTokenException",$fault:"client",...e}),Object.setPrototypeOf(this,Te.prototype),this.error=e.error,this.error_description=e.error_description}}class Ue extends De{name="InternalServerException";$fault="server";error;error_description;constructor(e){super({name:"InternalServerException",$fault:"server",...e}),Object.setPrototypeOf(this,Ue.prototype),this.error=e.error,this.error_description=e.error_description}}class $e extends De{name="InvalidClientException";$fault="client";error;error_description;constructor(e){super({name:"InvalidClientException",$fault:"client",...e}),Object.setPrototypeOf(this,$e.prototype),this.error=e.error,this.error_description=e.error_description}}class Fe extends De{name="InvalidGrantException";$fault="client";error;error_description;constructor(e){super({name:"InvalidGrantException",$fault:"client",...e}),Object.setPrototypeOf(this,Fe.prototype),this.error=e.error,this.error_description=e.error_description}}class je extends De{name="InvalidRequestException";$fault="client";error;reason;error_description;constructor(e){super({name:"InvalidRequestException",$fault:"client",...e}),Object.setPrototypeOf(this,je.prototype),this.error=e.error,this.reason=e.reason,this.error_description=e.error_description}}class ze extends De{name="InvalidScopeException";$fault="client";error;error_description;constructor(e){super({name:"InvalidScopeException",$fault:"client",...e}),Object.setPrototypeOf(this,ze.prototype),this.error=e.error,this.error_description=e.error_description}}class Ge extends De{name="SlowDownException";$fault="client";error;error_description;constructor(e){super({name:"SlowDownException",$fault:"client",...e}),Object.setPrototypeOf(this,Ge.prototype),this.error=e.error,this.error_description=e.error_description}}class We extends De{name="UnauthorizedClientException";$fault="client";error;error_description;constructor(e){super({name:"UnauthorizedClientException",$fault:"client",...e}),Object.setPrototypeOf(this,We.prototype),this.error=e.error,this.error_description=e.error_description}}class _e extends De{name="UnsupportedGrantTypeException";$fault="client";error;error_description;constructor(e){super({name:"UnsupportedGrantTypeException",$fault:"client",...e}),Object.setPrototypeOf(this,_e.prototype),this.error=e.error,this.error_description=e.error_description}}const Me="client",qe="error",He="error_description",Ne="http",Ve="httpError",Be="reason",Je="refreshToken",Le="smithy.ts.sdk.synthetic.com.amazonaws.ssooidc",Ze="com.amazonaws.ssooidc",Ke=Ae.O.for(Le);var Qe=[-3,Le,"SSOOIDCServiceException",0,[],[]];Ke.registerError(Qe,De);const Xe=Ae.O.for(Ze);var Ye=[-3,Ze,"AccessDeniedException",{[qe]:Me,[Ve]:400},[qe,Be,He],[0,0,0]];Xe.registerError(Ye,Oe);var et=[-3,Ze,"AuthorizationPendingException",{[qe]:Me,[Ve]:400},[qe,He],[0,0]];Xe.registerError(et,Re);var tt=[-3,Ze,"ExpiredTokenException",{[qe]:Me,[Ve]:400},[qe,He],[0,0]];Xe.registerError(tt,Te);var st=[-3,Ze,"InternalServerException",{[qe]:"server",[Ve]:500},[qe,He],[0,0]];Xe.registerError(st,Ue);var it=[-3,Ze,"InvalidClientException",{[qe]:Me,[Ve]:401},[qe,He],[0,0]];Xe.registerError(it,$e);var ot=[-3,Ze,"InvalidGrantException",{[qe]:Me,[Ve]:400},[qe,He],[0,0]];Xe.registerError(ot,Fe);var nt=[-3,Ze,"InvalidRequestException",{[qe]:Me,[Ve]:400},[qe,Be,He],[0,0,0]];Xe.registerError(nt,je);var rt=[-3,Ze,"InvalidScopeException",{[qe]:Me,[Ve]:400},[qe,He],[0,0]];Xe.registerError(rt,ze);var at=[-3,Ze,"SlowDownException",{[qe]:Me,[Ve]:400},[qe,He],[0,0]];Xe.registerError(at,Ge);var ct=[-3,Ze,"UnauthorizedClientException",{[qe]:Me,[Ve]:400},[qe,He],[0,0]];Xe.registerError(ct,We);var ut=[-3,Ze,"UnsupportedGrantTypeException",{[qe]:Me,[Ve]:400},[qe,He],[0,0]];Xe.registerError(ut,_e);const pt=[Ke,Xe];var dt=[0,Ze,"AccessToken",8,0],lt=[0,Ze,"ClientSecret",8,0],ht=[0,Ze,"CodeVerifier",8,0],gt=[0,Ze,"IdToken",8,0],St=[0,Ze,"RefreshToken",8,0],ft=[3,Ze,"CreateTokenRequest",0,["clientId","clientSecret","grantType","deviceCode","code",Je,"scope","redirectUri","codeVerifier"],[0,[()=>lt,0],0,0,0,[()=>St,0],64,0,[()=>ht,0]],3],mt=[3,Ze,"CreateTokenResponse",0,["accessToken","tokenType","expiresIn",Je,"idToken"],[[()=>dt,0],0,1,[()=>St,0],[()=>gt,0]]],wt=[9,Ze,"CreateToken",{[Ne]:["POST","/token",200]},()=>ft,()=>mt];const xt=e=>{(0,j.I)(process.version);const t=(0,W.I)(e),s=()=>t().then(z.l),i=(e=>({apiVersion:"2019-06-10",base64Decoder:e?.base64Decoder??B.E,base64Encoder:e?.base64Encoder??J.n,disableHostPrefix:e?.disableHostPrefix??!1,endpointProvider:e?.endpointProvider??ye,extensions:e?.extensions??[],httpAuthSchemeProvider:e?.httpAuthSchemeProvider??b,httpAuthSchemes:e?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:e=>e.getIdentityProvider("aws.auth#sigv4"),signer:new M.f2},{schemeId:"smithy.api#noAuth",identityProvider:e=>e.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new H.m}],logger:e?.logger??new N.N,protocol:e?.protocol??q.Y,protocolSettings:e?.protocolSettings??{defaultNamespace:"com.amazonaws.ssooidc",errorTypeRegistries:pt,version:"2019-06-10",serviceTarget:"AWSSSOOIDCService"},serviceId:e?.serviceId??"SSO OIDC",urlParser:e?.urlParser??V.D,utf8Decoder:e?.utf8Decoder??L.a,utf8Encoder:e?.utf8Encoder??Z.P}))(e);(0,k.I)(process.version);const o={profile:e?.profile,logger:i.logger};return{...i,...e,runtime:"node",defaultsMode:t,authSchemePreference:e?.authSchemePreference??(0,U.Z)(y.$,o),bodyLengthChecker:e?.bodyLengthChecker??G.n,defaultUserAgentProvider:e?.defaultUserAgentProvider??(0,A.pf)({serviceId:i.serviceId,clientVersion:P.rE}),maxAttempts:e?.maxAttempts??(0,U.Z)(S.qs,e),region:e?.region??(0,U.Z)(D.GG,{...D.zH,...o}),requestHandler:$.$.create(e?.requestHandler??s),retryMode:e?.retryMode??(0,U.Z)({...S.kN,default:async()=>(await s()).retryMode||_.L0},e),sha256:e?.sha256??T.V.bind(null,"sha256"),streamCollector:e?.streamCollector??F.k,useDualstackEndpoint:e?.useDualstackEndpoint??(0,U.Z)(O.e$,o),useFipsEndpoint:e?.useFipsEndpoint??(0,U.Z)(R.Ko,o),userAgentAppId:e?.userAgentAppId??(0,U.Z)(C.hV,o)}};var vt=s(129),Et=s(130),bt=s(131);class It extends m.K{config;constructor(...[e]){const t=xt(e||{});super(t),this.initConfig=t;const s=(m=t,Object.assign(m,{useDualstackEndpoint:m.useDualstackEndpoint??!1,useFipsEndpoint:m.useFipsEndpoint??!1,defaultSigningName:"sso-oauth"}));var m;const x=(0,r.D)(s),b=(0,S.$z)(x),I=(0,c.T)(b),P=(0,i.OV)(I),k=((e,t)=>{const s=Object.assign((0,vt.R)(e),(0,bt.xA)(e),(0,Et.e)(e),(e=>{const t=e.httpAuthSchemes;let s=e.httpAuthSchemeProvider,i=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){i=e},credentials:()=>i}})(e));return t.forEach(e=>e.configure(s)),Object.assign(e,(0,vt.$)(s),(0,bt.uv)(s),(0,Et.j)(s),{httpAuthSchemes:(i=s).httpAuthSchemes(),httpAuthSchemeProvider:i.httpAuthSchemeProvider(),credentials:i.credentials()});var i})((e=>{const t=(0,w.h)(e);return Object.assign(t,{authSchemePreference:(0,v.t)(e.authSchemePreference??[])})})((0,g.C)(P)),e?.extensions||[]);this.config=k,this.middlewareStack.use((0,l.wq)(this.config)),this.middlewareStack.use((0,a.sM)(this.config)),this.middlewareStack.use((0,f.ey)(this.config)),this.middlewareStack.use((0,h.vK)(this.config)),this.middlewareStack.use((0,i.TC)(this.config)),this.middlewareStack.use((0,o.Y7)(this.config)),this.middlewareStack.use((0,n.n)(this.config)),this.middlewareStack.use((0,u.w)(this.config,{httpAuthSchemeParametersProvider:E,identityProviderConfigProvider:async e=>new p.h({"aws.auth#sigv4":e.credentials})})),this.middlewareStack.use((0,d.l)(this.config))}destroy(){super.destroy()}}var Pt=s(132),kt=s(133);class yt extends(kt.u.classBuilder().ep(I).m(function(e,t,s,i){return[(0,Pt.r)(s,e.getEndpointParameterInstructions())]}).s("AWSSSOOIDCService","CreateToken",{}).n("SSOOIDCClient","CreateTokenCommand").sc(wt).build()){}},850(e,t,s){s.d(t,{UF:()=>c});var i=s(39),o=s(40),n=s(41);const r=(e,t=!1)=>{if(t){for(const t of e.split("."))if(!r(t))return!1;return!0}return!!(0,o.X)(e)&&(!(e.length<3||e.length>63)&&(e===e.toLowerCase()&&!(0,n.o)(e)))};let a=JSON.parse('{"partitions":[{"id":"aws","outputs":{"dnsSuffix":"amazonaws.com","dualStackDnsSuffix":"api.aws","implicitGlobalRegion":"us-east-1","name":"aws","supportsDualStack":true,"supportsFIPS":true},"regionRegex":"^(us|eu|ap|sa|ca|me|af|il|mx)\\\\-\\\\w+\\\\-\\\\d+$","regions":{"af-south-1":{"description":"Africa (Cape Town)"},"ap-east-1":{"description":"Asia Pacific (Hong Kong)"},"ap-east-2":{"description":"Asia Pacific (Taipei)"},"ap-northeast-1":{"description":"Asia Pacific (Tokyo)"},"ap-northeast-2":{"description":"Asia Pacific (Seoul)"},"ap-northeast-3":{"description":"Asia Pacific (Osaka)"},"ap-south-1":{"description":"Asia Pacific (Mumbai)"},"ap-south-2":{"description":"Asia Pacific (Hyderabad)"},"ap-southeast-1":{"description":"Asia Pacific (Singapore)"},"ap-southeast-2":{"description":"Asia Pacific (Sydney)"},"ap-southeast-3":{"description":"Asia Pacific (Jakarta)"},"ap-southeast-4":{"description":"Asia Pacific (Melbourne)"},"ap-southeast-5":{"description":"Asia Pacific (Malaysia)"},"ap-southeast-6":{"description":"Asia Pacific (New Zealand)"},"ap-southeast-7":{"description":"Asia Pacific (Thailand)"},"aws-global":{"description":"aws global region"},"ca-central-1":{"description":"Canada (Central)"},"ca-west-1":{"description":"Canada West (Calgary)"},"eu-central-1":{"description":"Europe (Frankfurt)"},"eu-central-2":{"description":"Europe (Zurich)"},"eu-north-1":{"description":"Europe (Stockholm)"},"eu-south-1":{"description":"Europe (Milan)"},"eu-south-2":{"description":"Europe (Spain)"},"eu-west-1":{"description":"Europe (Ireland)"},"eu-west-2":{"description":"Europe (London)"},"eu-west-3":{"description":"Europe (Paris)"},"il-central-1":{"description":"Israel (Tel Aviv)"},"me-central-1":{"description":"Middle East (UAE)"},"me-south-1":{"description":"Middle East (Bahrain)"},"mx-central-1":{"description":"Mexico (Central)"},"sa-east-1":{"description":"South America (Sao Paulo)"},"us-east-1":{"description":"US East (N. Virginia)"},"us-east-2":{"description":"US East (Ohio)"},"us-west-1":{"description":"US West (N. California)"},"us-west-2":{"description":"US West (Oregon)"}}},{"id":"aws-cn","outputs":{"dnsSuffix":"amazonaws.com.cn","dualStackDnsSuffix":"api.amazonwebservices.com.cn","implicitGlobalRegion":"cn-northwest-1","name":"aws-cn","supportsDualStack":true,"supportsFIPS":true},"regionRegex":"^cn\\\\-\\\\w+\\\\-\\\\d+$","regions":{"aws-cn-global":{"description":"aws-cn global region"},"cn-north-1":{"description":"China (Beijing)"},"cn-northwest-1":{"description":"China (Ningxia)"}}},{"id":"aws-eusc","outputs":{"dnsSuffix":"amazonaws.eu","dualStackDnsSuffix":"api.amazonwebservices.eu","implicitGlobalRegion":"eusc-de-east-1","name":"aws-eusc","supportsDualStack":true,"supportsFIPS":true},"regionRegex":"^eusc\\\\-(de)\\\\-\\\\w+\\\\-\\\\d+$","regions":{"eusc-de-east-1":{"description":"AWS European Sovereign Cloud (Germany)"}}},{"id":"aws-iso","outputs":{"dnsSuffix":"c2s.ic.gov","dualStackDnsSuffix":"api.aws.ic.gov","implicitGlobalRegion":"us-iso-east-1","name":"aws-iso","supportsDualStack":true,"supportsFIPS":true},"regionRegex":"^us\\\\-iso\\\\-\\\\w+\\\\-\\\\d+$","regions":{"aws-iso-global":{"description":"aws-iso global region"},"us-iso-east-1":{"description":"US ISO East"},"us-iso-west-1":{"description":"US ISO WEST"}}},{"id":"aws-iso-b","outputs":{"dnsSuffix":"sc2s.sgov.gov","dualStackDnsSuffix":"api.aws.scloud","implicitGlobalRegion":"us-isob-east-1","name":"aws-iso-b","supportsDualStack":true,"supportsFIPS":true},"regionRegex":"^us\\\\-isob\\\\-\\\\w+\\\\-\\\\d+$","regions":{"aws-iso-b-global":{"description":"aws-iso-b global region"},"us-isob-east-1":{"description":"US ISOB East (Ohio)"},"us-isob-west-1":{"description":"US ISOB West"}}},{"id":"aws-iso-e","outputs":{"dnsSuffix":"cloud.adc-e.uk","dualStackDnsSuffix":"api.cloud-aws.adc-e.uk","implicitGlobalRegion":"eu-isoe-west-1","name":"aws-iso-e","supportsDualStack":true,"supportsFIPS":true},"regionRegex":"^eu\\\\-isoe\\\\-\\\\w+\\\\-\\\\d+$","regions":{"aws-iso-e-global":{"description":"aws-iso-e global region"},"eu-isoe-west-1":{"description":"EU ISOE West"}}},{"id":"aws-iso-f","outputs":{"dnsSuffix":"csp.hci.ic.gov","dualStackDnsSuffix":"api.aws.hci.ic.gov","implicitGlobalRegion":"us-isof-south-1","name":"aws-iso-f","supportsDualStack":true,"supportsFIPS":true},"regionRegex":"^us\\\\-isof\\\\-\\\\w+\\\\-\\\\d+$","regions":{"aws-iso-f-global":{"description":"aws-iso-f global region"},"us-isof-east-1":{"description":"US ISOF EAST"},"us-isof-south-1":{"description":"US ISOF SOUTH"}}},{"id":"aws-us-gov","outputs":{"dnsSuffix":"amazonaws.com","dualStackDnsSuffix":"api.aws","implicitGlobalRegion":"us-gov-west-1","name":"aws-us-gov","supportsDualStack":true,"supportsFIPS":true},"regionRegex":"^us\\\\-gov\\\\-\\\\w+\\\\-\\\\d+$","regions":{"aws-us-gov-global":{"description":"aws-us-gov global region"},"us-gov-east-1":{"description":"AWS GovCloud (US-East)"},"us-gov-west-1":{"description":"AWS GovCloud (US-West)"}}}],"version":"1.1"}');const c={isVirtualHostableS3Bucket:r,parseArn:e=>{const t=e.split(":");if(t.length<6)return null;const[s,i,o,n,r,...a]=t;if("arn"!==s||""===i||""===o||""===a.join(":"))return null;return{partition:i,service:o,region:n,accountId:r,resourceId:a.map(e=>e.split("/")).flat()}},partition:e=>{const{partitions:t}=a;for(const s of t){const{regions:t,outputs:i}=s;for(const[s,o]of Object.entries(t))if(s===e)return{...i,...o}}for(const s of t){const{regionRegex:t,outputs:i}=s;if(new RegExp(t).test(e))return{...i}}const s=t.find(e=>"aws"===e.id);if(!s)throw new Error("Provided region was not found in the partition array or regex, and default partition with id 'aws' doesn't exist.");return{...s.outputs}}};i.m.aws=c},849(e){e.exports={rE:"3.990.0"}}};
|
|
3
3
|
//# sourceMappingURL=224.index.js.map
|
package/dist/365.index.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
"use strict";exports.id=365,exports.ids=[365],exports.modules={842(e,t,s){s.d(t,{GetRoleCredentialsCommand:()=>W,SSOClient:()=>mt});var i=s(132),o=s(133);const a={UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}};var n=s(115),r=s(118);class c extends r.T{constructor(e){super(e),Object.setPrototypeOf(this,c.prototype)}}class u extends c{name="InvalidRequestException";$fault="client";constructor(e){super({name:"InvalidRequestException",$fault:"client",...e}),Object.setPrototypeOf(this,u.prototype)}}class p extends c{name="ResourceNotFoundException";$fault="client";constructor(e){super({name:"ResourceNotFoundException",$fault:"client",...e}),Object.setPrototypeOf(this,p.prototype)}}class d extends c{name="TooManyRequestsException";$fault="client";constructor(e){super({name:"TooManyRequestsException",$fault:"client",...e}),Object.setPrototypeOf(this,d.prototype)}}class l extends c{name="UnauthorizedException";$fault="client";constructor(e){super({name:"UnauthorizedException",$fault:"client",...e}),Object.setPrototypeOf(this,l.prototype)}}const g="accountId",h="accessToken",S="account_id",f="client",m="error",w="http",v="httpError",x="httpHeader",b="httpQuery",P="message",y="roleName",E="smithy.ts.sdk.synthetic.com.amazonaws.sso",R="x-amz-sso_bearer_token",I="com.amazonaws.sso";var k=[0,I,"AccessTokenType",8,0],A=[0,I,"SecretAccessKeyType",8,0],C=[0,I,"SessionTokenType",8,0],D=[3,I,"GetRoleCredentialsRequest",0,[y,g,h],[[0,{[b]:"role_name"}],[0,{[b]:S}],[()=>k,{[x]:R}]],3],O=[3,I,"GetRoleCredentialsResponse",0,["roleCredentials"],[[()=>T,0]]],U=[-3,I,"InvalidRequestException",{[m]:f,[v]:400},[P],[0]];n.O.for(I).registerError(U,u);var F=[-3,I,"ResourceNotFoundException",{[m]:f,[v]:404},[P],[0]];n.O.for(I).registerError(F,p);var T=[3,I,"RoleCredentials",0,["accessKeyId","secretAccessKey","sessionToken","expiration"],[0,[()=>A,0],[()=>C,0],1]],G=[-3,I,"TooManyRequestsException",{[m]:f,[v]:429},[P],[0]];n.O.for(I).registerError(G,d);var $=[-3,I,"UnauthorizedException",{[m]:f,[v]:401},[P],[0]];n.O.for(I).registerError($,l);var z=[-3,E,"SSOServiceException",0,[],[]];n.O.for(E).registerError(z,c);var M=[9,I,"GetRoleCredentials",{[w]:["GET","/federation/credentials",200]},()=>D,()=>O];class W extends(o.u.classBuilder().ep(a).m(function(e,t,s,o){return[(0,i.r)(s,e.getEndpointParameterInstructions())]}).s("SWBPortalService","GetRoleCredentials",{}).n("SSOClient","GetRoleCredentialsCommand").sc(M).build()){}var j=s(32),q=s(34),N=s(35),H=s(36),B=s(38),L=s(42),K=s(44),V=s(43),_=s(47),J=s(48),Z=s(50),Q=s(51),X=s(69),Y=s(73),ee=s(76),te=s(78),se=s(45),ie=s(52);const oe=async(e,t,s)=>({operation:(0,se.u)(t).operation,region:await(0,ie.t)(e.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()});const ae=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},ne="3.985.0";var re=s(86),ce=s(87),ue=s(89),pe=s(91),de=s(92),le=s(93),ge=s(96),he=s(97),Se=s(54),fe=s(98),me=s(99),we=s(101),ve=s(100),xe=s(102),be=s(104),Pe=s(70),ye=s(105),Ee=s(843),Re=s(847),Ie=s(74),ke=s(68),Ae=s(111),Ce=s(112),De=s(82),Oe=s(113),Ue=s(39),Fe=s(40),Te=s(41);const Ge=(e,t=!1)=>{if(t){for(const t of e.split("."))if(!Ge(t))return!1;return!0}return!!(0,Fe.X)(e)&&(!(e.length<3||e.length>63)&&(e===e.toLowerCase()&&!(0,Te.o)(e)))};let $e=JSON.parse('{"partitions":[{"id":"aws","outputs":{"dnsSuffix":"amazonaws.com","dualStackDnsSuffix":"api.aws","implicitGlobalRegion":"us-east-1","name":"aws","supportsDualStack":true,"supportsFIPS":true},"regionRegex":"^(us|eu|ap|sa|ca|me|af|il|mx)\\\\-\\\\w+\\\\-\\\\d+$","regions":{"af-south-1":{"description":"Africa (Cape Town)"},"ap-east-1":{"description":"Asia Pacific (Hong Kong)"},"ap-east-2":{"description":"Asia Pacific (Taipei)"},"ap-northeast-1":{"description":"Asia Pacific (Tokyo)"},"ap-northeast-2":{"description":"Asia Pacific (Seoul)"},"ap-northeast-3":{"description":"Asia Pacific (Osaka)"},"ap-south-1":{"description":"Asia Pacific (Mumbai)"},"ap-south-2":{"description":"Asia Pacific (Hyderabad)"},"ap-southeast-1":{"description":"Asia Pacific (Singapore)"},"ap-southeast-2":{"description":"Asia Pacific (Sydney)"},"ap-southeast-3":{"description":"Asia Pacific (Jakarta)"},"ap-southeast-4":{"description":"Asia Pacific (Melbourne)"},"ap-southeast-5":{"description":"Asia Pacific (Malaysia)"},"ap-southeast-6":{"description":"Asia Pacific (New Zealand)"},"ap-southeast-7":{"description":"Asia Pacific (Thailand)"},"aws-global":{"description":"aws global region"},"ca-central-1":{"description":"Canada (Central)"},"ca-west-1":{"description":"Canada West (Calgary)"},"eu-central-1":{"description":"Europe (Frankfurt)"},"eu-central-2":{"description":"Europe (Zurich)"},"eu-north-1":{"description":"Europe (Stockholm)"},"eu-south-1":{"description":"Europe (Milan)"},"eu-south-2":{"description":"Europe (Spain)"},"eu-west-1":{"description":"Europe (Ireland)"},"eu-west-2":{"description":"Europe (London)"},"eu-west-3":{"description":"Europe (Paris)"},"il-central-1":{"description":"Israel (Tel Aviv)"},"me-central-1":{"description":"Middle East (UAE)"},"me-south-1":{"description":"Middle East (Bahrain)"},"mx-central-1":{"description":"Mexico (Central)"},"sa-east-1":{"description":"South America (Sao Paulo)"},"us-east-1":{"description":"US East (N. Virginia)"},"us-east-2":{"description":"US East (Ohio)"},"us-west-1":{"description":"US West (N. California)"},"us-west-2":{"description":"US West (Oregon)"}}},{"id":"aws-cn","outputs":{"dnsSuffix":"amazonaws.com.cn","dualStackDnsSuffix":"api.amazonwebservices.com.cn","implicitGlobalRegion":"cn-northwest-1","name":"aws-cn","supportsDualStack":true,"supportsFIPS":true},"regionRegex":"^cn\\\\-\\\\w+\\\\-\\\\d+$","regions":{"aws-cn-global":{"description":"aws-cn global region"},"cn-north-1":{"description":"China (Beijing)"},"cn-northwest-1":{"description":"China (Ningxia)"}}},{"id":"aws-eusc","outputs":{"dnsSuffix":"amazonaws.eu","dualStackDnsSuffix":"api.amazonwebservices.eu","implicitGlobalRegion":"eusc-de-east-1","name":"aws-eusc","supportsDualStack":true,"supportsFIPS":true},"regionRegex":"^eusc\\\\-(de)\\\\-\\\\w+\\\\-\\\\d+$","regions":{"eusc-de-east-1":{"description":"AWS European Sovereign Cloud (Germany)"}}},{"id":"aws-iso","outputs":{"dnsSuffix":"c2s.ic.gov","dualStackDnsSuffix":"api.aws.ic.gov","implicitGlobalRegion":"us-iso-east-1","name":"aws-iso","supportsDualStack":true,"supportsFIPS":true},"regionRegex":"^us\\\\-iso\\\\-\\\\w+\\\\-\\\\d+$","regions":{"aws-iso-global":{"description":"aws-iso global region"},"us-iso-east-1":{"description":"US ISO East"},"us-iso-west-1":{"description":"US ISO WEST"}}},{"id":"aws-iso-b","outputs":{"dnsSuffix":"sc2s.sgov.gov","dualStackDnsSuffix":"api.aws.scloud","implicitGlobalRegion":"us-isob-east-1","name":"aws-iso-b","supportsDualStack":true,"supportsFIPS":true},"regionRegex":"^us\\\\-isob\\\\-\\\\w+\\\\-\\\\d+$","regions":{"aws-iso-b-global":{"description":"aws-iso-b global region"},"us-isob-east-1":{"description":"US ISOB East (Ohio)"},"us-isob-west-1":{"description":"US ISOB West"}}},{"id":"aws-iso-e","outputs":{"dnsSuffix":"cloud.adc-e.uk","dualStackDnsSuffix":"api.cloud-aws.adc-e.uk","implicitGlobalRegion":"eu-isoe-west-1","name":"aws-iso-e","supportsDualStack":true,"supportsFIPS":true},"regionRegex":"^eu\\\\-isoe\\\\-\\\\w+\\\\-\\\\d+$","regions":{"aws-iso-e-global":{"description":"aws-iso-e global region"},"eu-isoe-west-1":{"description":"EU ISOE West"}}},{"id":"aws-iso-f","outputs":{"dnsSuffix":"csp.hci.ic.gov","dualStackDnsSuffix":"api.aws.hci.ic.gov","implicitGlobalRegion":"us-isof-south-1","name":"aws-iso-f","supportsDualStack":true,"supportsFIPS":true},"regionRegex":"^us\\\\-isof\\\\-\\\\w+\\\\-\\\\d+$","regions":{"aws-iso-f-global":{"description":"aws-iso-f global region"},"us-isof-east-1":{"description":"US ISOF EAST"},"us-isof-south-1":{"description":"US ISOF SOUTH"}}},{"id":"aws-us-gov","outputs":{"dnsSuffix":"amazonaws.com","dualStackDnsSuffix":"api.aws","implicitGlobalRegion":"us-gov-west-1","name":"aws-us-gov","supportsDualStack":true,"supportsFIPS":true},"regionRegex":"^us\\\\-gov\\\\-\\\\w+\\\\-\\\\d+$","regions":{"aws-us-gov-global":{"description":"aws-us-gov global region"},"us-gov-east-1":{"description":"AWS GovCloud (US-East)"},"us-gov-west-1":{"description":"AWS GovCloud (US-West)"}}}],"version":"1.1"}');const ze={isVirtualHostableS3Bucket:Ge,parseArn:e=>{const t=e.split(":");if(t.length<6)return null;const[s,i,o,a,n,...r]=t;if("arn"!==s||""===i||""===o||""===r.join(":"))return null;return{partition:i,service:o,region:a,accountId:n,resourceId:r.map(e=>e.split("/")).flat()}},partition:e=>{const{partitions:t}=$e;for(const s of t){const{regions:t,outputs:i}=s;for(const[s,o]of Object.entries(t))if(s===e)return{...i,...o}}for(const s of t){const{regionRegex:t,outputs:i}=s;if(new RegExp(t).test(e))return{...i}}const s=t.find(e=>"aws"===e.id);if(!s)throw new Error("Provided region was not found in the partition array or regex, and default partition with id 'aws' doesn't exist.");return{...s.outputs}}};Ue.m.aws=ze;var Me=s(127),We=s(128);const je="required",qe="fn",Ne="argv",He="ref",Be=!0,Le="isSet",Ke="booleanEquals",Ve="error",_e="endpoint",Je="tree",Ze="PartitionResult",Qe="getAttr",Xe={[je]:!1,type:"string"},Ye={[je]:!0,default:!1,type:"boolean"},et={[He]:"Endpoint"},tt={[qe]:Ke,[Ne]:[{[He]:"UseFIPS"},!0]},st={[qe]:Ke,[Ne]:[{[He]:"UseDualStack"},!0]},it={},ot={[qe]:Qe,[Ne]:[{[He]:Ze},"supportsFIPS"]},at={[He]:Ze},nt={[qe]:Ke,[Ne]:[!0,{[qe]:Qe,[Ne]:[at,"supportsDualStack"]}]},rt=[tt],ct=[st],ut=[{[He]:"Region"}],pt={version:"1.0",parameters:{Region:Xe,UseDualStack:Ye,UseFIPS:Ye,Endpoint:Xe},rules:[{conditions:[{[qe]:Le,[Ne]:[et]}],rules:[{conditions:rt,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:Ve},{conditions:ct,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:Ve},{endpoint:{url:et,properties:it,headers:it},type:_e}],type:Je},{conditions:[{[qe]:Le,[Ne]:ut}],rules:[{conditions:[{[qe]:"aws.partition",[Ne]:ut,assign:Ze}],rules:[{conditions:[tt,st],rules:[{conditions:[{[qe]:Ke,[Ne]:[Be,ot]},nt],rules:[{endpoint:{url:"https://portal.sso-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:it,headers:it},type:_e}],type:Je},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:Ve}],type:Je},{conditions:rt,rules:[{conditions:[{[qe]:Ke,[Ne]:[ot,Be]}],rules:[{conditions:[{[qe]:"stringEquals",[Ne]:[{[qe]:Qe,[Ne]:[at,"name"]},"aws-us-gov"]}],endpoint:{url:"https://portal.sso.{Region}.amazonaws.com",properties:it,headers:it},type:_e},{endpoint:{url:"https://portal.sso-fips.{Region}.{PartitionResult#dnsSuffix}",properties:it,headers:it},type:_e}],type:Je},{error:"FIPS is enabled but this partition does not support FIPS",type:Ve}],type:Je},{conditions:ct,rules:[{conditions:[nt],rules:[{endpoint:{url:"https://portal.sso.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:it,headers:it},type:_e}],type:Je},{error:"DualStack is enabled but this partition does not support DualStack",type:Ve}],type:Je},{endpoint:{url:"https://portal.sso.{Region}.{PartitionResult#dnsSuffix}",properties:it,headers:it},type:_e}],type:Je}],type:Je},{error:"Invalid Configuration: Missing Region",type:Ve}]},dt=new Me.k({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS"]}),lt=(e,t={})=>dt.get(e,()=>(0,We.s)(pt,{endpointParams:e,logger:t.logger}));Ue.m.aws=ze;const gt=e=>{(0,we.I)(process.version);const t=(0,be.I)(e),s=()=>t().then(ve.l),i=(e=>({apiVersion:"2019-06-10",base64Decoder:e?.base64Decoder??Ae.E,base64Encoder:e?.base64Encoder??Ce.n,disableHostPrefix:e?.disableHostPrefix??!1,endpointProvider:e?.endpointProvider??lt,extensions:e?.extensions??[],httpAuthSchemeProvider:e?.httpAuthSchemeProvider??ae,httpAuthSchemes:e?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:e=>e.getIdentityProvider("aws.auth#sigv4"),signer:new ye.f2},{schemeId:"smithy.api#noAuth",identityProvider:e=>e.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new Re.m}],logger:e?.logger??new Ie.N,protocol:e?.protocol??Ee.Y,protocolSettings:e?.protocolSettings??{defaultNamespace:"com.amazonaws.sso",version:"2019-06-10",serviceTarget:"SWBPortalService"},serviceId:e?.serviceId??"SSO",urlParser:e?.urlParser??ke.D,utf8Decoder:e?.utf8Decoder??De.a,utf8Encoder:e?.utf8Encoder??Oe.P}))(e);(0,re.I)(process.version);const o={profile:e?.profile,logger:i.logger};return{...i,...e,runtime:"node",defaultsMode:t,authSchemePreference:e?.authSchemePreference??(0,Se.Z)(ce.$,o),bodyLengthChecker:e?.bodyLengthChecker??xe.n,defaultUserAgentProvider:e?.defaultUserAgentProvider??(0,ue.pf)({serviceId:i.serviceId,clientVersion:ne}),maxAttempts:e?.maxAttempts??(0,Se.Z)(X.qs,e),region:e?.region??(0,Se.Z)(de.GG,{...de.zH,...o}),requestHandler:fe.$.create(e?.requestHandler??s),retryMode:e?.retryMode??(0,Se.Z)({...X.kN,default:async()=>(await s()).retryMode||Pe.L0},e),sha256:e?.sha256??he.V.bind(null,"sha256"),streamCollector:e?.streamCollector??me.k,useDualstackEndpoint:e?.useDualstackEndpoint??(0,Se.Z)(le.e$,o),useFipsEndpoint:e?.useFipsEndpoint??(0,Se.Z)(ge.Ko,o),userAgentAppId:e?.userAgentAppId??(0,Se.Z)(pe.hV,o)}};var ht=s(129),St=s(130),ft=s(131);class mt extends ee.K{config;constructor(...[e]){const t=gt(e||{});super(t),this.initConfig=t;const s=(i=t,Object.assign(i,{useDualstackEndpoint:i.useDualstackEndpoint??!1,useFipsEndpoint:i.useFipsEndpoint??!1,defaultSigningName:"awsssoportal"}));var i;const o=(0,H.D)(s),a=(0,X.$z)(o),n=(0,L.T)(a),r=(0,j.OV)(n),c=((e,t)=>{const s=Object.assign((0,ht.R)(e),(0,ft.xA)(e),(0,St.e)(e),(e=>{const t=e.httpAuthSchemes;let s=e.httpAuthSchemeProvider,i=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){i=e},credentials:()=>i}})(e));return t.forEach(e=>e.configure(s)),Object.assign(e,(0,ht.$)(s),(0,ft.uv)(s),(0,St.j)(s),{httpAuthSchemes:(i=s).httpAuthSchemes(),httpAuthSchemeProvider:i.httpAuthSchemeProvider(),credentials:i.credentials()});var i})((e=>{const t=(0,te.h)(e);return Object.assign(t,{authSchemePreference:(0,ie.t)(e.authSchemePreference??[])})})((0,Q.C)(r)),e?.extensions||[]);this.config=c,this.middlewareStack.use((0,J.wq)(this.config)),this.middlewareStack.use((0,B.sM)(this.config)),this.middlewareStack.use((0,Y.ey)(this.config)),this.middlewareStack.use((0,Z.vK)(this.config)),this.middlewareStack.use((0,j.TC)(this.config)),this.middlewareStack.use((0,q.Y7)(this.config)),this.middlewareStack.use((0,N.n)(this.config)),this.middlewareStack.use((0,K.w)(this.config,{httpAuthSchemeParametersProvider:oe,identityProviderConfigProvider:async e=>new V.h({"aws.auth#sigv4":e.credentials})})),this.middlewareStack.use((0,_.l)(this.config))}destroy(){super.destroy()}}}};
|
|
2
|
+
"use strict";exports.id=365,exports.ids=[365],exports.modules={842(e,s,t){t.d(s,{GetRoleCredentialsCommand:()=>N,SSOClient:()=>xs});var i=t(132),o=t(133);const n={UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}};var a=t(115),r=t(118);class c extends r.T{constructor(e){super(e),Object.setPrototypeOf(this,c.prototype)}}class u extends c{name="InvalidRequestException";$fault="client";constructor(e){super({name:"InvalidRequestException",$fault:"client",...e}),Object.setPrototypeOf(this,u.prototype)}}class p extends c{name="ResourceNotFoundException";$fault="client";constructor(e){super({name:"ResourceNotFoundException",$fault:"client",...e}),Object.setPrototypeOf(this,p.prototype)}}class d extends c{name="TooManyRequestsException";$fault="client";constructor(e){super({name:"TooManyRequestsException",$fault:"client",...e}),Object.setPrototypeOf(this,d.prototype)}}class l extends c{name="UnauthorizedException";$fault="client";constructor(e){super({name:"UnauthorizedException",$fault:"client",...e}),Object.setPrototypeOf(this,l.prototype)}}const g="accountId",h="accessToken",S="account_id",f="client",m="error",w="http",v="httpError",x="httpHeader",b="httpQuery",P="message",y="roleName",E="smithy.ts.sdk.synthetic.com.amazonaws.sso",R="x-amz-sso_bearer_token",I="com.amazonaws.sso",k=a.O.for(E);var A=[-3,E,"SSOServiceException",0,[],[]];k.registerError(A,c);const C=a.O.for(I);var D=[-3,I,"InvalidRequestException",{[m]:f,[v]:400},[P],[0]];C.registerError(D,u);var O=[-3,I,"ResourceNotFoundException",{[m]:f,[v]:404},[P],[0]];C.registerError(O,p);var U=[-3,I,"TooManyRequestsException",{[m]:f,[v]:429},[P],[0]];C.registerError(U,d);var F=[-3,I,"UnauthorizedException",{[m]:f,[v]:401},[P],[0]];C.registerError(F,l);const T=[k,C];var G=[0,I,"AccessTokenType",8,0],$=[0,I,"SecretAccessKeyType",8,0],z=[0,I,"SessionTokenType",8,0],M=[3,I,"GetRoleCredentialsRequest",0,[y,g,h],[[0,{[b]:"role_name"}],[0,{[b]:S}],[()=>G,{[x]:R}]],3],W=[3,I,"GetRoleCredentialsResponse",0,["roleCredentials"],[[()=>j,0]]],j=[3,I,"RoleCredentials",0,["accessKeyId","secretAccessKey","sessionToken","expiration"],[0,[()=>$,0],[()=>z,0],1]],q=[9,I,"GetRoleCredentials",{[w]:["GET","/federation/credentials",200]},()=>M,()=>W];class N extends(o.u.classBuilder().ep(n).m(function(e,s,t,o){return[(0,i.r)(t,e.getEndpointParameterInstructions())]}).s("SWBPortalService","GetRoleCredentials",{}).n("SSOClient","GetRoleCredentialsCommand").sc(q).build()){}var H=t(32),B=t(34),L=t(35),K=t(36),V=t(38),_=t(42),J=t(44),Z=t(43),Q=t(47),X=t(48),Y=t(50),ee=t(51),se=t(69),te=t(73),ie=t(76),oe=t(78),ne=t(45),ae=t(52);const re=async(e,s,t)=>({operation:(0,ne.u)(s).operation,region:await(0,ae.t)(e.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()});const ce=e=>{const s=[];switch(e.operation){case"GetRoleCredentials":case"ListAccountRoles":case"ListAccounts":case"Logout":s.push({schemeId:"smithy.api#noAuth"});break;default:s.push(function(e){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"awsssoportal",region:e.region},propertiesExtractor:(e,s)=>({signingProperties:{config:e,context:s}})}}(e))}return s},ue="3.990.0";var pe=t(86),de=t(87),le=t(89),ge=t(91),he=t(92),Se=t(93),fe=t(96),me=t(97),we=t(54),ve=t(98),xe=t(99),be=t(101),Pe=t(100),ye=t(102),Ee=t(104),Re=t(70),Ie=t(105),ke=t(843),Ae=t(847),Ce=t(74),De=t(68),Oe=t(111),Ue=t(112),Fe=t(82),Te=t(113),Ge=t(39),$e=t(40),ze=t(41);const Me=(e,s=!1)=>{if(s){for(const s of e.split("."))if(!Me(s))return!1;return!0}return!!(0,$e.X)(e)&&(!(e.length<3||e.length>63)&&(e===e.toLowerCase()&&!(0,ze.o)(e)))};let We=JSON.parse('{"partitions":[{"id":"aws","outputs":{"dnsSuffix":"amazonaws.com","dualStackDnsSuffix":"api.aws","implicitGlobalRegion":"us-east-1","name":"aws","supportsDualStack":true,"supportsFIPS":true},"regionRegex":"^(us|eu|ap|sa|ca|me|af|il|mx)\\\\-\\\\w+\\\\-\\\\d+$","regions":{"af-south-1":{"description":"Africa (Cape Town)"},"ap-east-1":{"description":"Asia Pacific (Hong Kong)"},"ap-east-2":{"description":"Asia Pacific (Taipei)"},"ap-northeast-1":{"description":"Asia Pacific (Tokyo)"},"ap-northeast-2":{"description":"Asia Pacific (Seoul)"},"ap-northeast-3":{"description":"Asia Pacific (Osaka)"},"ap-south-1":{"description":"Asia Pacific (Mumbai)"},"ap-south-2":{"description":"Asia Pacific (Hyderabad)"},"ap-southeast-1":{"description":"Asia Pacific (Singapore)"},"ap-southeast-2":{"description":"Asia Pacific (Sydney)"},"ap-southeast-3":{"description":"Asia Pacific (Jakarta)"},"ap-southeast-4":{"description":"Asia Pacific (Melbourne)"},"ap-southeast-5":{"description":"Asia Pacific (Malaysia)"},"ap-southeast-6":{"description":"Asia Pacific (New Zealand)"},"ap-southeast-7":{"description":"Asia Pacific (Thailand)"},"aws-global":{"description":"aws global region"},"ca-central-1":{"description":"Canada (Central)"},"ca-west-1":{"description":"Canada West (Calgary)"},"eu-central-1":{"description":"Europe (Frankfurt)"},"eu-central-2":{"description":"Europe (Zurich)"},"eu-north-1":{"description":"Europe (Stockholm)"},"eu-south-1":{"description":"Europe (Milan)"},"eu-south-2":{"description":"Europe (Spain)"},"eu-west-1":{"description":"Europe (Ireland)"},"eu-west-2":{"description":"Europe (London)"},"eu-west-3":{"description":"Europe (Paris)"},"il-central-1":{"description":"Israel (Tel Aviv)"},"me-central-1":{"description":"Middle East (UAE)"},"me-south-1":{"description":"Middle East (Bahrain)"},"mx-central-1":{"description":"Mexico (Central)"},"sa-east-1":{"description":"South America (Sao Paulo)"},"us-east-1":{"description":"US East (N. Virginia)"},"us-east-2":{"description":"US East (Ohio)"},"us-west-1":{"description":"US West (N. California)"},"us-west-2":{"description":"US West (Oregon)"}}},{"id":"aws-cn","outputs":{"dnsSuffix":"amazonaws.com.cn","dualStackDnsSuffix":"api.amazonwebservices.com.cn","implicitGlobalRegion":"cn-northwest-1","name":"aws-cn","supportsDualStack":true,"supportsFIPS":true},"regionRegex":"^cn\\\\-\\\\w+\\\\-\\\\d+$","regions":{"aws-cn-global":{"description":"aws-cn global region"},"cn-north-1":{"description":"China (Beijing)"},"cn-northwest-1":{"description":"China (Ningxia)"}}},{"id":"aws-eusc","outputs":{"dnsSuffix":"amazonaws.eu","dualStackDnsSuffix":"api.amazonwebservices.eu","implicitGlobalRegion":"eusc-de-east-1","name":"aws-eusc","supportsDualStack":true,"supportsFIPS":true},"regionRegex":"^eusc\\\\-(de)\\\\-\\\\w+\\\\-\\\\d+$","regions":{"eusc-de-east-1":{"description":"AWS European Sovereign Cloud (Germany)"}}},{"id":"aws-iso","outputs":{"dnsSuffix":"c2s.ic.gov","dualStackDnsSuffix":"api.aws.ic.gov","implicitGlobalRegion":"us-iso-east-1","name":"aws-iso","supportsDualStack":true,"supportsFIPS":true},"regionRegex":"^us\\\\-iso\\\\-\\\\w+\\\\-\\\\d+$","regions":{"aws-iso-global":{"description":"aws-iso global region"},"us-iso-east-1":{"description":"US ISO East"},"us-iso-west-1":{"description":"US ISO WEST"}}},{"id":"aws-iso-b","outputs":{"dnsSuffix":"sc2s.sgov.gov","dualStackDnsSuffix":"api.aws.scloud","implicitGlobalRegion":"us-isob-east-1","name":"aws-iso-b","supportsDualStack":true,"supportsFIPS":true},"regionRegex":"^us\\\\-isob\\\\-\\\\w+\\\\-\\\\d+$","regions":{"aws-iso-b-global":{"description":"aws-iso-b global region"},"us-isob-east-1":{"description":"US ISOB East (Ohio)"},"us-isob-west-1":{"description":"US ISOB West"}}},{"id":"aws-iso-e","outputs":{"dnsSuffix":"cloud.adc-e.uk","dualStackDnsSuffix":"api.cloud-aws.adc-e.uk","implicitGlobalRegion":"eu-isoe-west-1","name":"aws-iso-e","supportsDualStack":true,"supportsFIPS":true},"regionRegex":"^eu\\\\-isoe\\\\-\\\\w+\\\\-\\\\d+$","regions":{"aws-iso-e-global":{"description":"aws-iso-e global region"},"eu-isoe-west-1":{"description":"EU ISOE West"}}},{"id":"aws-iso-f","outputs":{"dnsSuffix":"csp.hci.ic.gov","dualStackDnsSuffix":"api.aws.hci.ic.gov","implicitGlobalRegion":"us-isof-south-1","name":"aws-iso-f","supportsDualStack":true,"supportsFIPS":true},"regionRegex":"^us\\\\-isof\\\\-\\\\w+\\\\-\\\\d+$","regions":{"aws-iso-f-global":{"description":"aws-iso-f global region"},"us-isof-east-1":{"description":"US ISOF EAST"},"us-isof-south-1":{"description":"US ISOF SOUTH"}}},{"id":"aws-us-gov","outputs":{"dnsSuffix":"amazonaws.com","dualStackDnsSuffix":"api.aws","implicitGlobalRegion":"us-gov-west-1","name":"aws-us-gov","supportsDualStack":true,"supportsFIPS":true},"regionRegex":"^us\\\\-gov\\\\-\\\\w+\\\\-\\\\d+$","regions":{"aws-us-gov-global":{"description":"aws-us-gov global region"},"us-gov-east-1":{"description":"AWS GovCloud (US-East)"},"us-gov-west-1":{"description":"AWS GovCloud (US-West)"}}}],"version":"1.1"}');const je={isVirtualHostableS3Bucket:Me,parseArn:e=>{const s=e.split(":");if(s.length<6)return null;const[t,i,o,n,a,...r]=s;if("arn"!==t||""===i||""===o||""===r.join(":"))return null;return{partition:i,service:o,region:n,accountId:a,resourceId:r.map(e=>e.split("/")).flat()}},partition:e=>{const{partitions:s}=We;for(const t of s){const{regions:s,outputs:i}=t;for(const[t,o]of Object.entries(s))if(t===e)return{...i,...o}}for(const t of s){const{regionRegex:s,outputs:i}=t;if(new RegExp(s).test(e))return{...i}}const t=s.find(e=>"aws"===e.id);if(!t)throw new Error("Provided region was not found in the partition array or regex, and default partition with id 'aws' doesn't exist.");return{...t.outputs}}};Ge.m.aws=je;var qe=t(127),Ne=t(128);const He="required",Be="fn",Le="argv",Ke="ref",Ve=!0,_e="isSet",Je="booleanEquals",Ze="error",Qe="endpoint",Xe="tree",Ye="PartitionResult",es="getAttr",ss={[He]:!1,type:"string"},ts={[He]:!0,default:!1,type:"boolean"},is={[Ke]:"Endpoint"},os={[Be]:Je,[Le]:[{[Ke]:"UseFIPS"},!0]},ns={[Be]:Je,[Le]:[{[Ke]:"UseDualStack"},!0]},as={},rs={[Be]:es,[Le]:[{[Ke]:Ye},"supportsFIPS"]},cs={[Ke]:Ye},us={[Be]:Je,[Le]:[!0,{[Be]:es,[Le]:[cs,"supportsDualStack"]}]},ps=[os],ds=[ns],ls=[{[Ke]:"Region"}],gs={version:"1.0",parameters:{Region:ss,UseDualStack:ts,UseFIPS:ts,Endpoint:ss},rules:[{conditions:[{[Be]:_e,[Le]:[is]}],rules:[{conditions:ps,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:Ze},{conditions:ds,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:Ze},{endpoint:{url:is,properties:as,headers:as},type:Qe}],type:Xe},{conditions:[{[Be]:_e,[Le]:ls}],rules:[{conditions:[{[Be]:"aws.partition",[Le]:ls,assign:Ye}],rules:[{conditions:[os,ns],rules:[{conditions:[{[Be]:Je,[Le]:[Ve,rs]},us],rules:[{endpoint:{url:"https://portal.sso-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:as,headers:as},type:Qe}],type:Xe},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:Ze}],type:Xe},{conditions:ps,rules:[{conditions:[{[Be]:Je,[Le]:[rs,Ve]}],rules:[{conditions:[{[Be]:"stringEquals",[Le]:[{[Be]:es,[Le]:[cs,"name"]},"aws-us-gov"]}],endpoint:{url:"https://portal.sso.{Region}.amazonaws.com",properties:as,headers:as},type:Qe},{endpoint:{url:"https://portal.sso-fips.{Region}.{PartitionResult#dnsSuffix}",properties:as,headers:as},type:Qe}],type:Xe},{error:"FIPS is enabled but this partition does not support FIPS",type:Ze}],type:Xe},{conditions:ds,rules:[{conditions:[us],rules:[{endpoint:{url:"https://portal.sso.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:as,headers:as},type:Qe}],type:Xe},{error:"DualStack is enabled but this partition does not support DualStack",type:Ze}],type:Xe},{endpoint:{url:"https://portal.sso.{Region}.{PartitionResult#dnsSuffix}",properties:as,headers:as},type:Qe}],type:Xe}],type:Xe},{error:"Invalid Configuration: Missing Region",type:Ze}]},hs=new qe.k({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS"]}),Ss=(e,s={})=>hs.get(e,()=>(0,Ne.s)(gs,{endpointParams:e,logger:s.logger}));Ge.m.aws=je;const fs=e=>{(0,be.I)(process.version);const s=(0,Ee.I)(e),t=()=>s().then(Pe.l),i=(e=>({apiVersion:"2019-06-10",base64Decoder:e?.base64Decoder??Oe.E,base64Encoder:e?.base64Encoder??Ue.n,disableHostPrefix:e?.disableHostPrefix??!1,endpointProvider:e?.endpointProvider??Ss,extensions:e?.extensions??[],httpAuthSchemeProvider:e?.httpAuthSchemeProvider??ce,httpAuthSchemes:e?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:e=>e.getIdentityProvider("aws.auth#sigv4"),signer:new Ie.f2},{schemeId:"smithy.api#noAuth",identityProvider:e=>e.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new Ae.m}],logger:e?.logger??new Ce.N,protocol:e?.protocol??ke.Y,protocolSettings:e?.protocolSettings??{defaultNamespace:"com.amazonaws.sso",errorTypeRegistries:T,version:"2019-06-10",serviceTarget:"SWBPortalService"},serviceId:e?.serviceId??"SSO",urlParser:e?.urlParser??De.D,utf8Decoder:e?.utf8Decoder??Fe.a,utf8Encoder:e?.utf8Encoder??Te.P}))(e);(0,pe.I)(process.version);const o={profile:e?.profile,logger:i.logger};return{...i,...e,runtime:"node",defaultsMode:s,authSchemePreference:e?.authSchemePreference??(0,we.Z)(de.$,o),bodyLengthChecker:e?.bodyLengthChecker??ye.n,defaultUserAgentProvider:e?.defaultUserAgentProvider??(0,le.pf)({serviceId:i.serviceId,clientVersion:ue}),maxAttempts:e?.maxAttempts??(0,we.Z)(se.qs,e),region:e?.region??(0,we.Z)(he.GG,{...he.zH,...o}),requestHandler:ve.$.create(e?.requestHandler??t),retryMode:e?.retryMode??(0,we.Z)({...se.kN,default:async()=>(await t()).retryMode||Re.L0},e),sha256:e?.sha256??me.V.bind(null,"sha256"),streamCollector:e?.streamCollector??xe.k,useDualstackEndpoint:e?.useDualstackEndpoint??(0,we.Z)(Se.e$,o),useFipsEndpoint:e?.useFipsEndpoint??(0,we.Z)(fe.Ko,o),userAgentAppId:e?.userAgentAppId??(0,we.Z)(ge.hV,o)}};var ms=t(129),ws=t(130),vs=t(131);class xs extends ie.K{config;constructor(...[e]){const s=fs(e||{});super(s),this.initConfig=s;const t=(i=s,Object.assign(i,{useDualstackEndpoint:i.useDualstackEndpoint??!1,useFipsEndpoint:i.useFipsEndpoint??!1,defaultSigningName:"awsssoportal"}));var i;const o=(0,K.D)(t),n=(0,se.$z)(o),a=(0,_.T)(n),r=(0,H.OV)(a),c=((e,s)=>{const t=Object.assign((0,ms.R)(e),(0,vs.xA)(e),(0,ws.e)(e),(e=>{const s=e.httpAuthSchemes;let t=e.httpAuthSchemeProvider,i=e.credentials;return{setHttpAuthScheme(e){const t=s.findIndex(s=>s.schemeId===e.schemeId);-1===t?s.push(e):s.splice(t,1,e)},httpAuthSchemes:()=>s,setHttpAuthSchemeProvider(e){t=e},httpAuthSchemeProvider:()=>t,setCredentials(e){i=e},credentials:()=>i}})(e));return s.forEach(e=>e.configure(t)),Object.assign(e,(0,ms.$)(t),(0,vs.uv)(t),(0,ws.j)(t),{httpAuthSchemes:(i=t).httpAuthSchemes(),httpAuthSchemeProvider:i.httpAuthSchemeProvider(),credentials:i.credentials()});var i})((e=>{const s=(0,oe.h)(e);return Object.assign(s,{authSchemePreference:(0,ae.t)(e.authSchemePreference??[])})})((0,ee.C)(r)),e?.extensions||[]);this.config=c,this.middlewareStack.use((0,X.wq)(this.config)),this.middlewareStack.use((0,V.sM)(this.config)),this.middlewareStack.use((0,te.ey)(this.config)),this.middlewareStack.use((0,Y.vK)(this.config)),this.middlewareStack.use((0,H.TC)(this.config)),this.middlewareStack.use((0,B.Y7)(this.config)),this.middlewareStack.use((0,L.n)(this.config)),this.middlewareStack.use((0,J.w)(this.config,{httpAuthSchemeParametersProvider:re,identityProviderConfigProvider:async e=>new Z.h({"aws.auth#sigv4":e.credentials})})),this.middlewareStack.use((0,Q.l)(this.config))}destroy(){super.destroy()}}}};
|
|
3
3
|
//# sourceMappingURL=365.index.js.map
|
package/dist/372.index.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
"use strict";exports.id=372,exports.ids=[372],exports.modules={843(e,t,r){r.d(t,{Y:()=>B});var n=r(107),s=r(109);function o(e,t,r){if(r<=0||!Number.isInteger(r))throw new Error("Invalid number of delimiters ("+r+") for splitEvery.");const n=e.split(t);if(1===r)return n;const s=[];let o="";for(let e=0;e<n.length;e++)""===o?o=n[e]:o+=t+n[e],(e+1)%r===0&&(s.push(o),o="");return""!==o&&s.push(o),s}var i=r(844),a=r(33),c=r(840),u=r(110),f=r(845),l=r(114);class h extends l.t{async serializeRequest(e,t,r){const o={...t??{}},i=this.serializer,c={},u={},l=await r.endpoint(),h=n.l.of(e?.input),d=h.getSchema();let w,m=!1;const p=new a.K({protocol:"",hostname:"",port:void 0,path:"",fragment:void 0,query:c,headers:u,body:void 0});if(l){this.updateServiceEndpoint(p,l),this.setHostPrefix(p,e,o);const t=(0,s.c)(e.traits);if(t.http){p.method=t.http[0];const[e,r]=t.http[1].split("?");"/"==p.path?p.path=e:p.path+=e;const n=new URLSearchParams(r??"");Object.assign(c,Object.fromEntries(n))}}for(const[e,t]of h.structIterator()){const r=t.getMergedTraits()??{},n=o[e];if(null!=n||t.isIdempotencyToken())if(r.httpPayload){if(t.isStreaming()){t.isStructSchema()?o[e]&&(w=await this.serializeEventStream({eventStream:o[e],requestSchema:h})):w=n}else i.write(t,n),w=i.flush();delete o[e]}else if(r.httpLabel){i.write(t,n);const r=i.flush();p.path.includes(`{${e}+}`)?p.path=p.path.replace(`{${e}+}`,r.split("/").map(f.$).join("/")):p.path.includes(`{${e}}`)&&(p.path=p.path.replace(`{${e}}`,(0,f.$)(r))),delete o[e]}else if(r.httpHeader)i.write(t,n),u[r.httpHeader.toLowerCase()]=String(i.flush()),delete o[e];else if("string"==typeof r.httpPrefixHeaders){for(const[e,s]of Object.entries(n)){const n=r.httpPrefixHeaders+e;i.write([t.getValueSchema(),{httpHeader:n}],s),u[n.toLowerCase()]=i.flush()}delete o[e]}else r.httpQuery||r.httpQueryParams?(this.serializeQuery(t,n,c),delete o[e]):m=!0;else if(r.httpLabel&&(p.path.includes(`{${e}+}`)||p.path.includes(`{${e}}`)))throw new Error(`No value provided for input HTTP label: ${e}.`)}return m&&o&&(i.write(d,o),w=i.flush()),p.headers=u,p.query=c,p.body=w,p}serializeQuery(e,t,r){const n=this.serializer,s=e.getMergedTraits();if(s.httpQueryParams){for(const[n,o]of Object.entries(t))if(!(n in r)){const t=e.getValueSchema();Object.assign(t.getMergedTraits(),{...s,httpQuery:n,httpQueryParams:void 0}),this.serializeQuery(t,o,r)}}else if(e.isListSchema()){const o=!!e.getMergedTraits().sparse,i=[];for(const r of t){n.write([e.getValueSchema(),s],r);const t=n.flush();(o||void 0!==t)&&i.push(t)}r[s.httpQuery]=i}else n.write([e,s],t),r[s.httpQuery]=n.flush()}async deserializeResponse(e,t,r){const s=this.deserializer,o=n.l.of(e.output),i={};if(r.statusCode>=300){const n=await(0,u.P)(r.body,t);throw n.byteLength>0&&Object.assign(i,await s.read(15,n)),await this.handleError(e,t,r,i,this.deserializeMetadata(r)),new Error("@smithy/core/protocols - HTTP Protocol error handler failed to throw.")}for(const e in r.headers){const t=r.headers[e];delete r.headers[e],r.headers[e.toLowerCase()]=t}const a=await this.deserializeHttpMessage(o,t,r,i);if(a.length){const e=await(0,u.P)(r.body,t);if(e.byteLength>0){const t=await s.read(o,e);for(const e of a)i[e]=t[e]}}else a.discardResponseBody&&await(0,u.P)(r.body,t);return i.$metadata=this.deserializeMetadata(r),i}async deserializeHttpMessage(e,t,r,s,a){let f;f=s instanceof Set?a:s;let l=!0;const h=this.deserializer,d=n.l.of(e),w=[];for(const[e,n]of d.structIterator()){const s=n.getMemberTraits();if(s.httpPayload){l=!1;if(n.isStreaming()){const t=n.isStructSchema();f[e]=t?await this.deserializeEventStream({response:r,responseSchema:d}):(0,c.c)(r.body)}else if(r.body){const s=await(0,u.P)(r.body,t);s.byteLength>0&&(f[e]=await h.read(n,s))}}else if(s.httpHeader){const t=String(s.httpHeader).toLowerCase(),a=r.headers[t];if(null!=a)if(n.isListSchema()){const r=n.getValueSchema();let s;r.getMergedTraits().httpHeader=t,s=r.isTimestampSchema()&&4===r.getSchema()?o(a,",",2):(0,i.G)(a);const c=[];for(const e of s)c.push(await h.read(r,e.trim()));f[e]=c}else f[e]=await h.read(n,a)}else if(void 0!==s.httpPrefixHeaders){f[e]={};for(const[t,o]of Object.entries(r.headers))if(t.startsWith(s.httpPrefixHeaders)){const r=n.getValueSchema();r.getMergedTraits().httpHeader=t,f[e][t.slice(s.httpPrefixHeaders.length)]=await h.read(r,o)}}else s.httpResponseCode?f[e]=r.statusCode:w.push(e)}return w.discardResponseBody=l,w}}var d=r(122);function w(e){return(e.includes(",")||e.includes('"'))&&(e=`"${e.replace(/"/g,'\\"')}"`),e}var m=r(123),p=r(75),b=r(112),y=r(116),g=r(121);class v extends y.f{settings;stringBuffer="";constructor(e){super(),this.settings=e}write(e,t){const r=n.l.of(e);switch(typeof t){case"object":if(null===t)return void(this.stringBuffer="null");if(r.isTimestampSchema()){if(!(t instanceof Date))throw new Error(`@smithy/core/protocols - received non-Date value ${t} when schema expected Date in ${r.getName(!0)}`);switch((0,g.V)(r,this.settings)){case 5:this.stringBuffer=t.toISOString().replace(".000Z","Z");break;case 6:this.stringBuffer=(0,d.JV)(t);break;case 7:this.stringBuffer=String(t.getTime()/1e3);break;default:console.warn("Missing timestamp format, using epoch seconds",t),this.stringBuffer=String(t.getTime()/1e3)}return}if(r.isBlobSchema()&&"byteLength"in t)return void(this.stringBuffer=(this.serdeContext?.base64Encoder??b.n)(t));if(r.isListSchema()&&Array.isArray(t)){let e="";for(const n of t){this.write([r.getValueSchema(),r.getMergedTraits()],n);const t=this.flush();""!==e&&(e+=", "),e+=r.getValueSchema().isTimestampSchema()?t:w(t)}return void(this.stringBuffer=e)}this.stringBuffer=JSON.stringify(t,null,2);break;case"string":const e=r.getMergedTraits().mediaType;let n=t;if(e){if(("application/json"===e||e.endsWith("+json"))&&(n=m.A.from(n)),r.getMergedTraits().httpHeader)return void(this.stringBuffer=(this.serdeContext?.base64Encoder??b.n)(n.toString()))}this.stringBuffer=t;break;default:r.isIdempotencyToken()?this.stringBuffer=(0,p.v4)():this.stringBuffer=String(t)}}flush(){const e=this.stringBuffer;return this.stringBuffer="",e}}class ${codecSerializer;stringSerializer;buffer;constructor(e,t,r=new v(t)){this.codecSerializer=e,this.stringSerializer=r}setSerdeContext(e){this.codecSerializer.setSerdeContext(e),this.stringSerializer.setSerdeContext(e)}write(e,t){const r=n.l.of(e),s=r.getMergedTraits();return s.httpHeader||s.httpLabel||s.httpQuery?(this.stringSerializer.write(r,t),void(this.buffer=this.stringSerializer.flush())):this.codecSerializer.write(r,t)}flush(){if(void 0!==this.buffer){const e=this.buffer;return this.buffer=void 0,e}return this.codecSerializer.flush()}}var E=r(113),N=r(82),S=r(846);class T extends y.f{codecDeserializer;stringDeserializer;constructor(e,t){super(),this.codecDeserializer=e,this.stringDeserializer=new S.k(t)}setSerdeContext(e){this.stringDeserializer.setSerdeContext(e),this.codecDeserializer.setSerdeContext(e),this.serdeContext=e}read(e,t){const r=n.l.of(e),s=r.getMergedTraits(),o=this.serdeContext?.utf8Encoder??E.P;if(s.httpHeader||s.httpResponseCode)return this.stringDeserializer.read(r,o(t));if(s.httpPayload){if(r.isBlobSchema()){const e=this.serdeContext?.utf8Decoder??N.a;return"string"==typeof t?e(t):t}if(r.isStringSchema())return"byteLength"in t?o(t):t}return this.codecDeserializer.read(r,t)}}var x=r(115),R=r(117),D=r(119),j=r(126);class B extends h{serializer;deserializer;codec;mixin=new R.U;constructor({defaultNamespace:e}){super({defaultNamespace:e});const t={timestampFormat:{useTrait:!0,default:7},httpBindings:!0,jsonName:!0};this.codec=new D.V(t),this.serializer=new $(this.codec.createSerializer(),t),this.deserializer=new T(this.codec.createDeserializer(),t)}getShapeId(){return"aws.protocols#restJson1"}getPayloadCodec(){return this.codec}setSerdeContext(e){this.codec.setSerdeContext(e),super.setSerdeContext(e)}async serializeRequest(e,t,r){const s=await super.serializeRequest(e,t,r),o=n.l.of(e.input);if(!s.headers["content-type"]){const e=this.mixin.resolveRestContentType(this.getDefaultContentType(),o);e&&(s.headers["content-type"]=e)}return null==s.body&&s.headers["content-type"]===this.getDefaultContentType()&&(s.body="{}"),s}async deserializeResponse(e,t,r){const s=await super.deserializeResponse(e,t,r),o=n.l.of(e.output);for(const[e,t]of o.structIterator())t.getMemberTraits().httpPayload&&!(e in s)&&(s[e]=null);return s}async handleError(e,t,r,s,o){const i=(0,j.cJ)(r,s)??"Unknown",{errorSchema:a,errorMetadata:c}=await this.mixin.getErrorSchemaOrThrowBaseException(i,this.options.defaultNamespace,r,s,o),u=n.l.of(a),f=s.message??s.Message??"Unknown",l=new(x.O.for(a[1]).getErrorCtor(a)??Error)(f);await this.deserializeHttpMessage(a,t,r,s);const h={};for(const[e,t]of u.structIterator()){const r=t.getMergedTraits().jsonName??e;h[e]=this.codec.createDeserializer().readObject(t,s[r])}throw this.mixin.decorateServiceException(Object.assign(l,c,{$fault:u.getMergedTraits().error,message:f},h),s)}getDefaultContentType(){return"application/json"}}},845(e,t,r){function n(e){return encodeURIComponent(e).replace(/[!'()*]/g,function(e){return"%"+e.charCodeAt(0).toString(16).toUpperCase()})}r.d(t,{$:()=>n})},846(e,t,r){r.d(t,{k:()=>E});var n=r(107),s=r(844);const o="(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun)(?:[ne|u?r]?s?day)?",i="(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)",a="(\\d?\\d):(\\d{2}):(\\d{2})(?:\\.(\\d+))?",c="(\\d?\\d)",u="(\\d{4})",f=new RegExp(/^(\d{4})-(\d\d)-(\d\d)[tT](\d\d):(\d\d):(\d\d)(\.(\d+))?(([-+]\d\d:\d\d)|[zZ])$/),l=new RegExp(`^${o}, ${c} ${i} ${u} ${a} GMT$`),h=new RegExp(`^${o}, ${c}-${i}-(\\d\\d) ${a} GMT$`),d=new RegExp(`^${o} ${i} ( [1-9]|\\d\\d) ${a} ${u}$`),w=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function m(e,t,r){const n=Number(e);if(n<t||n>r)throw new Error(`Value ${n} out of range [${t}, ${r}]`)}var p=r(123),b=r(124),y=r(111),g=r(113),v=r(116),$=r(121);class E extends v.f{settings;constructor(e){super(),this.settings=e}read(e,t){const r=n.l.of(e);if(r.isListSchema())return(0,s.G)(t).map(e=>this.read(r.getValueSchema(),e));if(r.isBlobSchema())return(this.serdeContext?.base64Decoder??y.E)(t);if(r.isTimestampSchema()){switch((0,$.V)(r,this.settings)){case 5:return(e=>{if(null==e)return;if("string"!=typeof e)throw new TypeError("RFC3339 timestamps must be strings");const t=f.exec(e);if(!t)throw new TypeError(`Invalid RFC3339 timestamp format ${e}`);const[,r,n,s,o,i,a,,c,u]=t;m(n,1,12),m(s,1,31),m(o,0,23),m(i,0,59),m(a,0,60);const l=new Date(Date.UTC(Number(r),Number(n)-1,Number(s),Number(o),Number(i),Number(a),Number(c)?Math.round(1e3*parseFloat(`0.${c}`)):0));if(l.setUTCFullYear(Number(r)),"Z"!=u.toUpperCase()){const[,e,t,r]=/([+-])(\d\d):(\d\d)/.exec(u)||[void 0,"+",0,0],n="-"===e?1:-1;l.setTime(l.getTime()+n*(60*Number(t)*60*1e3+60*Number(r)*1e3))}return l})(t);case 6:return(e=>{if(null==e)return;if("string"!=typeof e)throw new TypeError("RFC7231 timestamps must be strings.");let t,r,n,s,o,i,a,c;if((c=l.exec(e))?[,t,r,n,s,o,i,a]=c:(c=h.exec(e))?([,t,r,n,s,o,i,a]=c,n=(Number(n)+1900).toString()):(c=d.exec(e))&&([,r,t,s,o,i,a,n]=c),n&&i){const e=Date.UTC(Number(n),w.indexOf(r),Number(t),Number(s),Number(o),Number(i),a?Math.round(1e3*parseFloat(`0.${a}`)):0);m(t,1,31),m(s,0,23),m(o,0,59),m(i,0,60);const c=new Date(e);return c.setUTCFullYear(Number(n)),c}throw new TypeError(`Invalid RFC7231 date-time value ${e}.`)})(t);case 7:return(e=>{if(null==e)return;let t=NaN;if("number"==typeof e)t=e;else if("string"==typeof e){if(!/^-?\d*\.?\d+$/.test(e))throw new TypeError("parseEpochTimestamp - numeric string invalid.");t=Number.parseFloat(e)}else"object"==typeof e&&1===e.tag&&(t=e.value);if(isNaN(t)||Math.abs(t)===1/0)throw new TypeError("Epoch timestamps must be valid finite numbers.");return new Date(Math.round(1e3*t))})(t);default:return console.warn("Missing timestamp format, parsing value with Date constructor:",t),new Date(t)}}if(r.isStringSchema()){const e=r.getMergedTraits().mediaType;let n=t;if(e){r.getMergedTraits().httpHeader&&(n=this.base64ToUtf8(n));return("application/json"===e||e.endsWith("+json"))&&(n=p.A.from(n)),n}}return r.isNumericSchema()?Number(t):r.isBigIntegerSchema()?BigInt(t):r.isBigDecimalSchema()?new b.D(t,"bigDecimal"):r.isBooleanSchema()?"true"===String(t).toLowerCase():t}base64ToUtf8(e){return(this.serdeContext?.utf8Encoder??g.P)((this.serdeContext?.base64Decoder??y.E)(e))}}},844(e,t,r){r.d(t,{G:()=>n});const n=e=>{const t=e.length,r=[];let n,s=!1,o=0;for(let i=0;i<t;++i){const t=e[i];switch(t){case'"':"\\"!==n&&(s=!s);break;case",":s||(r.push(e.slice(o,i)),o=i+1)}n=t}return r.push(e.slice(o)),r.map(e=>{const t=(e=e.trim()).length;return t<2?e:('"'===e[0]&&'"'===e[t-1]&&(e=e.slice(1,t-1)),e.replace(/\\"/g,'"'))})}},847(e,t,r){r.d(t,{m:()=>n});class n{async sign(e,t,r){return e}}},840(e,t,r){r.d(t,{c:()=>p});var n=r(99),s=r(83),o=r(8),i=r(111);const a=async e=>"function"==typeof Blob&&e instanceof Blob||"Blob"===e.constructor?.name?void 0!==Blob.prototype.arrayBuffer?new Uint8Array(await e.arrayBuffer()):async function(e){const t=await function(e){return new Promise((t,r)=>{const n=new FileReader;n.onloadend=()=>{if(2!==n.readyState)return r(new Error("Reader aborted too early"));const e=n.result??"",s=e.indexOf(","),o=s>-1?s+1:e.length;t(e.substring(o))},n.onabort=()=>r(new Error("Read aborted")),n.onerror=()=>r(n.error),n.readAsDataURL(e)})}(e),r=(0,i.E)(t);return new Uint8Array(r)}(e):async function(e){const t=[],r=e.getReader();let n=!1,s=0;for(;!n;){const{done:e,value:o}=await r.read();o&&(t.push(o),s+=o.length),n=e}const o=new Uint8Array(s);let i=0;for(const e of t)o.set(e,i),i+=e.length;return o}(e);var c=r(112),u=r(80),f=r(113);const l=e=>"function"==typeof ReadableStream&&(e?.constructor?.name===ReadableStream.name||e instanceof ReadableStream),h="The stream has already been transformed.",d=e=>{if(!w(e)&&!l(e)){throw new Error(`Unexpected stream implementation, expect Blob or ReadableStream, got ${e?.__proto__?.constructor?.name||e}`)}let t=!1;const r=async()=>{if(t)throw new Error(h);return t=!0,await a(e)};return Object.assign(e,{transformToByteArray:r,transformToString:async e=>{const t=await r();if("base64"===e)return(0,c.n)(t);if("hex"===e)return(0,u.n)(t);if(void 0===e||"utf8"===e||"utf-8"===e)return(0,f.P)(t);if("function"==typeof TextDecoder)return new TextDecoder(e).decode(t);throw new Error("TextDecoder is not available, please make sure polyfill is provided.")},transformToWebStream:()=>{if(t)throw new Error(h);if(t=!0,w(e))return(e=>{if("function"!=typeof e.stream)throw new Error("Cannot transform payload Blob to web stream. Please make sure the Blob.stream() is polyfilled.\nIf you are using React Native, this API is not yet supported, see: https://react-native.canny.io/feature-requests/p/fetch-streaming-body");return e.stream()})(e);if(l(e))return e;throw new Error(`Cannot transform payload to web stream, got ${e}`)}})},w=e=>"function"==typeof Blob&&e instanceof Blob,m="The stream has already been transformed.",p=e=>{if(!(e instanceof o.Readable))try{return d(e)}catch(t){throw new Error(`Unexpected stream implementation, expect Stream.Readable instance, got ${e?.__proto__?.constructor?.name||e}`)}let t=!1;const r=async()=>{if(t)throw new Error(m);return t=!0,await(0,n.k)(e)};return Object.assign(e,{transformToByteArray:r,transformToString:async e=>{const t=await r();if(void 0===e||Buffer.isEncoding(e))return(0,s.Q)(t.buffer,t.byteOffset,t.byteLength).toString(e);return new TextDecoder(e).decode(t)},transformToWebStream:()=>{if(t)throw new Error(m);if(null!==e.readableFlowing)throw new Error("The stream has been consumed by other callbacks.");if("function"!=typeof o.Readable.toWeb)throw new Error("Readable.toWeb() is not supported. Please ensure a polyfill is available.");return t=!0,o.Readable.toWeb(e)}})}}};
|
|
2
|
+
"use strict";exports.id=372,exports.ids=[372],exports.modules={843(e,t,r){r.d(t,{Y:()=>B});var n=r(107),s=r(109);function o(e,t,r){if(r<=0||!Number.isInteger(r))throw new Error("Invalid number of delimiters ("+r+") for splitEvery.");const n=e.split(t);if(1===r)return n;const s=[];let o="";for(let e=0;e<n.length;e++)""===o?o=n[e]:o+=t+n[e],(e+1)%r===0&&(s.push(o),o="");return""!==o&&s.push(o),s}var i=r(844),a=r(33),c=r(840),u=r(110),f=r(845),l=r(114);class h extends l.t{async serializeRequest(e,t,r){const o={...t??{}},i=this.serializer,c={},u={},l=await r.endpoint(),h=n.l.of(e?.input),d=h.getSchema();let w,m=!1;const p=new a.K({protocol:"",hostname:"",port:void 0,path:"",fragment:void 0,query:c,headers:u,body:void 0});if(l){this.updateServiceEndpoint(p,l),this.setHostPrefix(p,e,o);const t=(0,s.c)(e.traits);if(t.http){p.method=t.http[0];const[e,r]=t.http[1].split("?");"/"==p.path?p.path=e:p.path+=e;const n=new URLSearchParams(r??"");Object.assign(c,Object.fromEntries(n))}}for(const[e,t]of h.structIterator()){const r=t.getMergedTraits()??{},n=o[e];if(null!=n||t.isIdempotencyToken())if(r.httpPayload){if(t.isStreaming()){t.isStructSchema()?o[e]&&(w=await this.serializeEventStream({eventStream:o[e],requestSchema:h})):w=n}else i.write(t,n),w=i.flush();delete o[e]}else if(r.httpLabel){i.write(t,n);const r=i.flush();p.path.includes(`{${e}+}`)?p.path=p.path.replace(`{${e}+}`,r.split("/").map(f.$).join("/")):p.path.includes(`{${e}}`)&&(p.path=p.path.replace(`{${e}}`,(0,f.$)(r))),delete o[e]}else if(r.httpHeader)i.write(t,n),u[r.httpHeader.toLowerCase()]=String(i.flush()),delete o[e];else if("string"==typeof r.httpPrefixHeaders){for(const[e,s]of Object.entries(n)){const n=r.httpPrefixHeaders+e;i.write([t.getValueSchema(),{httpHeader:n}],s),u[n.toLowerCase()]=i.flush()}delete o[e]}else r.httpQuery||r.httpQueryParams?(this.serializeQuery(t,n,c),delete o[e]):m=!0;else if(r.httpLabel&&(p.path.includes(`{${e}+}`)||p.path.includes(`{${e}}`)))throw new Error(`No value provided for input HTTP label: ${e}.`)}return m&&o&&(i.write(d,o),w=i.flush()),p.headers=u,p.query=c,p.body=w,p}serializeQuery(e,t,r){const n=this.serializer,s=e.getMergedTraits();if(s.httpQueryParams){for(const[n,o]of Object.entries(t))if(!(n in r)){const t=e.getValueSchema();Object.assign(t.getMergedTraits(),{...s,httpQuery:n,httpQueryParams:void 0}),this.serializeQuery(t,o,r)}}else if(e.isListSchema()){const o=!!e.getMergedTraits().sparse,i=[];for(const r of t){n.write([e.getValueSchema(),s],r);const t=n.flush();(o||void 0!==t)&&i.push(t)}r[s.httpQuery]=i}else n.write([e,s],t),r[s.httpQuery]=n.flush()}async deserializeResponse(e,t,r){const s=this.deserializer,o=n.l.of(e.output),i={};if(r.statusCode>=300){const n=await(0,u.P)(r.body,t);throw n.byteLength>0&&Object.assign(i,await s.read(15,n)),await this.handleError(e,t,r,i,this.deserializeMetadata(r)),new Error("@smithy/core/protocols - HTTP Protocol error handler failed to throw.")}for(const e in r.headers){const t=r.headers[e];delete r.headers[e],r.headers[e.toLowerCase()]=t}const a=await this.deserializeHttpMessage(o,t,r,i);if(a.length){const e=await(0,u.P)(r.body,t);if(e.byteLength>0){const t=await s.read(o,e);for(const e of a)null!=t[e]&&(i[e]=t[e])}}else a.discardResponseBody&&await(0,u.P)(r.body,t);return i.$metadata=this.deserializeMetadata(r),i}async deserializeHttpMessage(e,t,r,s,a){let f;f=s instanceof Set?a:s;let l=!0;const h=this.deserializer,d=n.l.of(e),w=[];for(const[e,n]of d.structIterator()){const s=n.getMemberTraits();if(s.httpPayload){l=!1;if(n.isStreaming()){const t=n.isStructSchema();f[e]=t?await this.deserializeEventStream({response:r,responseSchema:d}):(0,c.c)(r.body)}else if(r.body){const s=await(0,u.P)(r.body,t);s.byteLength>0&&(f[e]=await h.read(n,s))}}else if(s.httpHeader){const t=String(s.httpHeader).toLowerCase(),a=r.headers[t];if(null!=a)if(n.isListSchema()){const r=n.getValueSchema();let s;r.getMergedTraits().httpHeader=t,s=r.isTimestampSchema()&&4===r.getSchema()?o(a,",",2):(0,i.G)(a);const c=[];for(const e of s)c.push(await h.read(r,e.trim()));f[e]=c}else f[e]=await h.read(n,a)}else if(void 0!==s.httpPrefixHeaders){f[e]={};for(const[t,o]of Object.entries(r.headers))if(t.startsWith(s.httpPrefixHeaders)){const r=n.getValueSchema();r.getMergedTraits().httpHeader=t,f[e][t.slice(s.httpPrefixHeaders.length)]=await h.read(r,o)}}else s.httpResponseCode?f[e]=r.statusCode:w.push(e)}return w.discardResponseBody=l,w}}var d=r(122);function w(e){return(e.includes(",")||e.includes('"'))&&(e=`"${e.replace(/"/g,'\\"')}"`),e}var m=r(123),p=r(75),b=r(112),y=r(116),g=r(121);class v extends y.f{settings;stringBuffer="";constructor(e){super(),this.settings=e}write(e,t){const r=n.l.of(e);switch(typeof t){case"object":if(null===t)return void(this.stringBuffer="null");if(r.isTimestampSchema()){if(!(t instanceof Date))throw new Error(`@smithy/core/protocols - received non-Date value ${t} when schema expected Date in ${r.getName(!0)}`);switch((0,g.V)(r,this.settings)){case 5:this.stringBuffer=t.toISOString().replace(".000Z","Z");break;case 6:this.stringBuffer=(0,d.JV)(t);break;case 7:this.stringBuffer=String(t.getTime()/1e3);break;default:console.warn("Missing timestamp format, using epoch seconds",t),this.stringBuffer=String(t.getTime()/1e3)}return}if(r.isBlobSchema()&&"byteLength"in t)return void(this.stringBuffer=(this.serdeContext?.base64Encoder??b.n)(t));if(r.isListSchema()&&Array.isArray(t)){let e="";for(const n of t){this.write([r.getValueSchema(),r.getMergedTraits()],n);const t=this.flush();""!==e&&(e+=", "),e+=r.getValueSchema().isTimestampSchema()?t:w(t)}return void(this.stringBuffer=e)}this.stringBuffer=JSON.stringify(t,null,2);break;case"string":const e=r.getMergedTraits().mediaType;let n=t;if(e){if(("application/json"===e||e.endsWith("+json"))&&(n=m.A.from(n)),r.getMergedTraits().httpHeader)return void(this.stringBuffer=(this.serdeContext?.base64Encoder??b.n)(n.toString()))}this.stringBuffer=t;break;default:r.isIdempotencyToken()?this.stringBuffer=(0,p.v4)():this.stringBuffer=String(t)}}flush(){const e=this.stringBuffer;return this.stringBuffer="",e}}class ${codecSerializer;stringSerializer;buffer;constructor(e,t,r=new v(t)){this.codecSerializer=e,this.stringSerializer=r}setSerdeContext(e){this.codecSerializer.setSerdeContext(e),this.stringSerializer.setSerdeContext(e)}write(e,t){const r=n.l.of(e),s=r.getMergedTraits();return s.httpHeader||s.httpLabel||s.httpQuery?(this.stringSerializer.write(r,t),void(this.buffer=this.stringSerializer.flush())):this.codecSerializer.write(r,t)}flush(){if(void 0!==this.buffer){const e=this.buffer;return this.buffer=void 0,e}return this.codecSerializer.flush()}}var E=r(113),N=r(82),S=r(846);class T extends y.f{codecDeserializer;stringDeserializer;constructor(e,t){super(),this.codecDeserializer=e,this.stringDeserializer=new S.k(t)}setSerdeContext(e){this.stringDeserializer.setSerdeContext(e),this.codecDeserializer.setSerdeContext(e),this.serdeContext=e}read(e,t){const r=n.l.of(e),s=r.getMergedTraits(),o=this.serdeContext?.utf8Encoder??E.P;if(s.httpHeader||s.httpResponseCode)return this.stringDeserializer.read(r,o(t));if(s.httpPayload){if(r.isBlobSchema()){const e=this.serdeContext?.utf8Decoder??N.a;return"string"==typeof t?e(t):t}if(r.isStringSchema())return"byteLength"in t?o(t):t}return this.codecDeserializer.read(r,t)}}var x=r(115),R=r(117),D=r(119),j=r(126);class B extends h{serializer;deserializer;codec;mixin=new R.U;constructor({defaultNamespace:e}){super({defaultNamespace:e});const t={timestampFormat:{useTrait:!0,default:7},httpBindings:!0,jsonName:!0};this.codec=new D.V(t),this.serializer=new $(this.codec.createSerializer(),t),this.deserializer=new T(this.codec.createDeserializer(),t)}getShapeId(){return"aws.protocols#restJson1"}getPayloadCodec(){return this.codec}setSerdeContext(e){this.codec.setSerdeContext(e),super.setSerdeContext(e)}async serializeRequest(e,t,r){const s=await super.serializeRequest(e,t,r),o=n.l.of(e.input);if(!s.headers["content-type"]){const e=this.mixin.resolveRestContentType(this.getDefaultContentType(),o);e&&(s.headers["content-type"]=e)}return null==s.body&&s.headers["content-type"]===this.getDefaultContentType()&&(s.body="{}"),s}async deserializeResponse(e,t,r){const s=await super.deserializeResponse(e,t,r),o=n.l.of(e.output);for(const[e,t]of o.structIterator())t.getMemberTraits().httpPayload&&!(e in s)&&(s[e]=null);return s}async handleError(e,t,r,s,o){const i=(0,j.cJ)(r,s)??"Unknown",{errorSchema:a,errorMetadata:c}=await this.mixin.getErrorSchemaOrThrowBaseException(i,this.options.defaultNamespace,r,s,o),u=n.l.of(a),f=s.message??s.Message??"Unknown",l=new(x.O.for(a[1]).getErrorCtor(a)??Error)(f);await this.deserializeHttpMessage(a,t,r,s);const h={};for(const[e,t]of u.structIterator()){const r=t.getMergedTraits().jsonName??e;h[e]=this.codec.createDeserializer().readObject(t,s[r])}throw this.mixin.decorateServiceException(Object.assign(l,c,{$fault:u.getMergedTraits().error,message:f},h),s)}getDefaultContentType(){return"application/json"}}},845(e,t,r){function n(e){return encodeURIComponent(e).replace(/[!'()*]/g,function(e){return"%"+e.charCodeAt(0).toString(16).toUpperCase()})}r.d(t,{$:()=>n})},846(e,t,r){r.d(t,{k:()=>E});var n=r(107),s=r(844);const o="(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun)(?:[ne|u?r]?s?day)?",i="(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)",a="(\\d?\\d):(\\d{2}):(\\d{2})(?:\\.(\\d+))?",c="(\\d?\\d)",u="(\\d{4})",f=new RegExp(/^(\d{4})-(\d\d)-(\d\d)[tT](\d\d):(\d\d):(\d\d)(\.(\d+))?(([-+]\d\d:\d\d)|[zZ])$/),l=new RegExp(`^${o}, ${c} ${i} ${u} ${a} GMT$`),h=new RegExp(`^${o}, ${c}-${i}-(\\d\\d) ${a} GMT$`),d=new RegExp(`^${o} ${i} ( [1-9]|\\d\\d) ${a} ${u}$`),w=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function m(e,t,r){const n=Number(e);if(n<t||n>r)throw new Error(`Value ${n} out of range [${t}, ${r}]`)}var p=r(123),b=r(124),y=r(111),g=r(113),v=r(116),$=r(121);class E extends v.f{settings;constructor(e){super(),this.settings=e}read(e,t){const r=n.l.of(e);if(r.isListSchema())return(0,s.G)(t).map(e=>this.read(r.getValueSchema(),e));if(r.isBlobSchema())return(this.serdeContext?.base64Decoder??y.E)(t);if(r.isTimestampSchema()){switch((0,$.V)(r,this.settings)){case 5:return(e=>{if(null==e)return;if("string"!=typeof e)throw new TypeError("RFC3339 timestamps must be strings");const t=f.exec(e);if(!t)throw new TypeError(`Invalid RFC3339 timestamp format ${e}`);const[,r,n,s,o,i,a,,c,u]=t;m(n,1,12),m(s,1,31),m(o,0,23),m(i,0,59),m(a,0,60);const l=new Date(Date.UTC(Number(r),Number(n)-1,Number(s),Number(o),Number(i),Number(a),Number(c)?Math.round(1e3*parseFloat(`0.${c}`)):0));if(l.setUTCFullYear(Number(r)),"Z"!=u.toUpperCase()){const[,e,t,r]=/([+-])(\d\d):(\d\d)/.exec(u)||[void 0,"+",0,0],n="-"===e?1:-1;l.setTime(l.getTime()+n*(60*Number(t)*60*1e3+60*Number(r)*1e3))}return l})(t);case 6:return(e=>{if(null==e)return;if("string"!=typeof e)throw new TypeError("RFC7231 timestamps must be strings.");let t,r,n,s,o,i,a,c;if((c=l.exec(e))?[,t,r,n,s,o,i,a]=c:(c=h.exec(e))?([,t,r,n,s,o,i,a]=c,n=(Number(n)+1900).toString()):(c=d.exec(e))&&([,r,t,s,o,i,a,n]=c),n&&i){const e=Date.UTC(Number(n),w.indexOf(r),Number(t),Number(s),Number(o),Number(i),a?Math.round(1e3*parseFloat(`0.${a}`)):0);m(t,1,31),m(s,0,23),m(o,0,59),m(i,0,60);const c=new Date(e);return c.setUTCFullYear(Number(n)),c}throw new TypeError(`Invalid RFC7231 date-time value ${e}.`)})(t);case 7:return(e=>{if(null==e)return;let t=NaN;if("number"==typeof e)t=e;else if("string"==typeof e){if(!/^-?\d*\.?\d+$/.test(e))throw new TypeError("parseEpochTimestamp - numeric string invalid.");t=Number.parseFloat(e)}else"object"==typeof e&&1===e.tag&&(t=e.value);if(isNaN(t)||Math.abs(t)===1/0)throw new TypeError("Epoch timestamps must be valid finite numbers.");return new Date(Math.round(1e3*t))})(t);default:return console.warn("Missing timestamp format, parsing value with Date constructor:",t),new Date(t)}}if(r.isStringSchema()){const e=r.getMergedTraits().mediaType;let n=t;if(e){r.getMergedTraits().httpHeader&&(n=this.base64ToUtf8(n));return("application/json"===e||e.endsWith("+json"))&&(n=p.A.from(n)),n}}return r.isNumericSchema()?Number(t):r.isBigIntegerSchema()?BigInt(t):r.isBigDecimalSchema()?new b.D(t,"bigDecimal"):r.isBooleanSchema()?"true"===String(t).toLowerCase():t}base64ToUtf8(e){return(this.serdeContext?.utf8Encoder??g.P)((this.serdeContext?.base64Decoder??y.E)(e))}}},844(e,t,r){r.d(t,{G:()=>n});const n=e=>{const t=e.length,r=[];let n,s=!1,o=0;for(let i=0;i<t;++i){const t=e[i];switch(t){case'"':"\\"!==n&&(s=!s);break;case",":s||(r.push(e.slice(o,i)),o=i+1)}n=t}return r.push(e.slice(o)),r.map(e=>{const t=(e=e.trim()).length;return t<2?e:('"'===e[0]&&'"'===e[t-1]&&(e=e.slice(1,t-1)),e.replace(/\\"/g,'"'))})}},847(e,t,r){r.d(t,{m:()=>n});class n{async sign(e,t,r){return e}}},840(e,t,r){r.d(t,{c:()=>p});var n=r(99),s=r(83),o=r(8),i=r(111);const a=async e=>"function"==typeof Blob&&e instanceof Blob||"Blob"===e.constructor?.name?void 0!==Blob.prototype.arrayBuffer?new Uint8Array(await e.arrayBuffer()):async function(e){const t=await function(e){return new Promise((t,r)=>{const n=new FileReader;n.onloadend=()=>{if(2!==n.readyState)return r(new Error("Reader aborted too early"));const e=n.result??"",s=e.indexOf(","),o=s>-1?s+1:e.length;t(e.substring(o))},n.onabort=()=>r(new Error("Read aborted")),n.onerror=()=>r(n.error),n.readAsDataURL(e)})}(e),r=(0,i.E)(t);return new Uint8Array(r)}(e):async function(e){const t=[],r=e.getReader();let n=!1,s=0;for(;!n;){const{done:e,value:o}=await r.read();o&&(t.push(o),s+=o.length),n=e}const o=new Uint8Array(s);let i=0;for(const e of t)o.set(e,i),i+=e.length;return o}(e);var c=r(112),u=r(80),f=r(113);const l=e=>"function"==typeof ReadableStream&&(e?.constructor?.name===ReadableStream.name||e instanceof ReadableStream),h="The stream has already been transformed.",d=e=>{if(!w(e)&&!l(e)){throw new Error(`Unexpected stream implementation, expect Blob or ReadableStream, got ${e?.__proto__?.constructor?.name||e}`)}let t=!1;const r=async()=>{if(t)throw new Error(h);return t=!0,await a(e)};return Object.assign(e,{transformToByteArray:r,transformToString:async e=>{const t=await r();if("base64"===e)return(0,c.n)(t);if("hex"===e)return(0,u.n)(t);if(void 0===e||"utf8"===e||"utf-8"===e)return(0,f.P)(t);if("function"==typeof TextDecoder)return new TextDecoder(e).decode(t);throw new Error("TextDecoder is not available, please make sure polyfill is provided.")},transformToWebStream:()=>{if(t)throw new Error(h);if(t=!0,w(e))return(e=>{if("function"!=typeof e.stream)throw new Error("Cannot transform payload Blob to web stream. Please make sure the Blob.stream() is polyfilled.\nIf you are using React Native, this API is not yet supported, see: https://react-native.canny.io/feature-requests/p/fetch-streaming-body");return e.stream()})(e);if(l(e))return e;throw new Error(`Cannot transform payload to web stream, got ${e}`)}})},w=e=>"function"==typeof Blob&&e instanceof Blob,m="The stream has already been transformed.",p=e=>{if(!(e instanceof o.Readable))try{return d(e)}catch(t){throw new Error(`Unexpected stream implementation, expect Stream.Readable instance, got ${e?.__proto__?.constructor?.name||e}`)}let t=!1;const r=async()=>{if(t)throw new Error(m);return t=!0,await(0,n.k)(e)};return Object.assign(e,{transformToByteArray:r,transformToString:async e=>{const t=await r();if(void 0===e||Buffer.isEncoding(e))return(0,s.Q)(t.buffer,t.byteOffset,t.byteLength).toString(e);return new TextDecoder(e).decode(t)},transformToWebStream:()=>{if(t)throw new Error(m);if(null!==e.readableFlowing)throw new Error("The stream has been consumed by other callbacks.");if("function"!=typeof o.Readable.toWeb)throw new Error("Readable.toWeb() is not supported. Please ensure a polyfill is available.");return t=!0,o.Readable.toWeb(e)}})}}};
|
|
3
3
|
//# sourceMappingURL=372.index.js.map
|
package/dist/780.index.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
"use strict";exports.id=780,exports.ids=[780],exports.modules={853(e,t,s){s.d(t,{CreateOAuth2TokenCommand:()=>vt,SigninClient:()=>Ce});var i=s(32),o=s(34),n=s(35),r=s(36),a=s(38),u=s(42),c=s(44),p=s(43),d=s(47),l=s(48),g=s(50),h=s(51),S=s(69),f=s(73),m=s(76),w=s(78),v=s(45),b=s(52);const P=async(e,t,s)=>({operation:(0,v.u)(t).operation,region:await(0,b.t)(e.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()});const x=e=>{const t=[];if("CreateOAuth2Token"===e.operation)t.push({schemeId:"smithy.api#noAuth"});else t.push(function(e){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"signin",region:e.region},propertiesExtractor:(e,t)=>({signingProperties:{config:e,context:t}})}}(e));return t},y={UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}};var k=s(849),A=s(86),E=s(87),I=s(89),R=s(91),D=s(92),O=s(93),C=s(96),T=s(97),U=s(54),F=s(98),$=s(99),z=s(101),M=s(100),j=s(102),G=s(104),W=s(70),q=s(105),H=s(843),N=s(847),V=s(74),B=s(68),K=s(111),J=s(112),L=s(82),Z=s(113),Q=s(850),X=s(127),Y=s(128),_=s(39);const ee="required",te="fn",se="argv",ie="ref",oe=!0,ne="isSet",re="booleanEquals",ae="error",ue="endpoint",ce="tree",pe="PartitionResult",de="stringEquals",le={[ee]:!0,default:!1,type:"boolean"},ge={[ee]:!1,type:"string"},he={[ie]:"Endpoint"},Se={[te]:re,[se]:[{[ie]:"UseFIPS"},!0]},fe={[te]:re,[se]:[{[ie]:"UseDualStack"},!0]},me={},we={[te]:"getAttr",[se]:[{[ie]:pe},"name"]},ve={[te]:re,[se]:[{[ie]:"UseFIPS"},!1]},be={[te]:re,[se]:[{[ie]:"UseDualStack"},!1]},Pe={[te]:"getAttr",[se]:[{[ie]:pe},"supportsFIPS"]},xe={[te]:re,[se]:[!0,{[te]:"getAttr",[se]:[{[ie]:pe},"supportsDualStack"]}]},ye=[{[ie]:"Region"}],ke={version:"1.0",parameters:{UseDualStack:le,UseFIPS:le,Endpoint:ge,Region:ge},rules:[{conditions:[{[te]:ne,[se]:[he]}],rules:[{conditions:[Se],error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:ae},{rules:[{conditions:[fe],error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:ae},{endpoint:{url:he,properties:me,headers:me},type:ue}],type:ce}],type:ce},{rules:[{conditions:[{[te]:ne,[se]:ye}],rules:[{conditions:[{[te]:"aws.partition",[se]:ye,assign:pe}],rules:[{conditions:[{[te]:de,[se]:[we,"aws"]},ve,be],endpoint:{url:"https://{Region}.signin.aws.amazon.com",properties:me,headers:me},type:ue},{conditions:[{[te]:de,[se]:[we,"aws-cn"]},ve,be],endpoint:{url:"https://{Region}.signin.amazonaws.cn",properties:me,headers:me},type:ue},{conditions:[{[te]:de,[se]:[we,"aws-us-gov"]},ve,be],endpoint:{url:"https://{Region}.signin.amazonaws-us-gov.com",properties:me,headers:me},type:ue},{conditions:[Se,fe],rules:[{conditions:[{[te]:re,[se]:[oe,Pe]},xe],rules:[{endpoint:{url:"https://signin-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:me,headers:me},type:ue}],type:ce},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:ae}],type:ce},{conditions:[Se,be],rules:[{conditions:[{[te]:re,[se]:[Pe,oe]}],rules:[{endpoint:{url:"https://signin-fips.{Region}.{PartitionResult#dnsSuffix}",properties:me,headers:me},type:ue}],type:ce},{error:"FIPS is enabled but this partition does not support FIPS",type:ae}],type:ce},{conditions:[ve,fe],rules:[{conditions:[xe],rules:[{endpoint:{url:"https://signin.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:me,headers:me},type:ue}],type:ce},{error:"DualStack is enabled but this partition does not support DualStack",type:ae}],type:ce},{endpoint:{url:"https://signin.{Region}.{PartitionResult#dnsSuffix}",properties:me,headers:me},type:ue}],type:ce}],type:ce},{error:"Invalid Configuration: Missing Region",type:ae}],type:ce}]},Ae=new X.k({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS"]}),Ee=(e,t={})=>Ae.get(e,()=>(0,Y.s)(ke,{endpointParams:e,logger:t.logger}));_.m.aws=Q.UF;const Ie=e=>{(0,z.I)(process.version);const t=(0,G.I)(e),s=()=>t().then(M.l),i=(e=>({apiVersion:"2023-01-01",base64Decoder:e?.base64Decoder??K.E,base64Encoder:e?.base64Encoder??J.n,disableHostPrefix:e?.disableHostPrefix??!1,endpointProvider:e?.endpointProvider??Ee,extensions:e?.extensions??[],httpAuthSchemeProvider:e?.httpAuthSchemeProvider??x,httpAuthSchemes:e?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:e=>e.getIdentityProvider("aws.auth#sigv4"),signer:new q.f2},{schemeId:"smithy.api#noAuth",identityProvider:e=>e.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new N.m}],logger:e?.logger??new V.N,protocol:e?.protocol??H.Y,protocolSettings:e?.protocolSettings??{defaultNamespace:"com.amazonaws.signin",version:"2023-01-01",serviceTarget:"Signin"},serviceId:e?.serviceId??"Signin",urlParser:e?.urlParser??B.D,utf8Decoder:e?.utf8Decoder??L.a,utf8Encoder:e?.utf8Encoder??Z.P}))(e);(0,A.I)(process.version);const o={profile:e?.profile,logger:i.logger};return{...i,...e,runtime:"node",defaultsMode:t,authSchemePreference:e?.authSchemePreference??(0,U.Z)(E.$,o),bodyLengthChecker:e?.bodyLengthChecker??j.n,defaultUserAgentProvider:e?.defaultUserAgentProvider??(0,I.pf)({serviceId:i.serviceId,clientVersion:k.rE}),maxAttempts:e?.maxAttempts??(0,U.Z)(S.qs,e),region:e?.region??(0,U.Z)(D.GG,{...D.zH,...o}),requestHandler:F.$.create(e?.requestHandler??s),retryMode:e?.retryMode??(0,U.Z)({...S.kN,default:async()=>(await s()).retryMode||W.L0},e),sha256:e?.sha256??T.V.bind(null,"sha256"),streamCollector:e?.streamCollector??$.k,useDualstackEndpoint:e?.useDualstackEndpoint??(0,U.Z)(O.e$,o),useFipsEndpoint:e?.useFipsEndpoint??(0,U.Z)(C.Ko,o),userAgentAppId:e?.userAgentAppId??(0,U.Z)(R.hV,o)}};var Re=s(129),De=s(130),Oe=s(131);class Ce extends m.K{config;constructor(...[e]){const t=Ie(e||{});super(t),this.initConfig=t;const s=(m=t,Object.assign(m,{useDualstackEndpoint:m.useDualstackEndpoint??!1,useFipsEndpoint:m.useFipsEndpoint??!1,defaultSigningName:"signin"}));var m;const v=(0,r.D)(s),x=(0,S.$z)(v),y=(0,u.T)(x),k=(0,i.OV)(y),A=((e,t)=>{const s=Object.assign((0,Re.R)(e),(0,Oe.xA)(e),(0,De.e)(e),(e=>{const t=e.httpAuthSchemes;let s=e.httpAuthSchemeProvider,i=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){i=e},credentials:()=>i}})(e));return t.forEach(e=>e.configure(s)),Object.assign(e,(0,Re.$)(s),(0,Oe.uv)(s),(0,De.j)(s),{httpAuthSchemes:(i=s).httpAuthSchemes(),httpAuthSchemeProvider:i.httpAuthSchemeProvider(),credentials:i.credentials()});var i})((e=>{const t=(0,w.h)(e);return Object.assign(t,{authSchemePreference:(0,b.t)(e.authSchemePreference??[])})})((0,h.C)(k)),e?.extensions||[]);this.config=A,this.middlewareStack.use((0,l.wq)(this.config)),this.middlewareStack.use((0,a.sM)(this.config)),this.middlewareStack.use((0,f.ey)(this.config)),this.middlewareStack.use((0,g.vK)(this.config)),this.middlewareStack.use((0,i.TC)(this.config)),this.middlewareStack.use((0,o.Y7)(this.config)),this.middlewareStack.use((0,n.n)(this.config)),this.middlewareStack.use((0,c.w)(this.config,{httpAuthSchemeParametersProvider:P,identityProviderConfigProvider:async e=>new p.h({"aws.auth#sigv4":e.credentials})})),this.middlewareStack.use((0,d.l)(this.config))}destroy(){super.destroy()}}var Te=s(132),Ue=s(133),Fe=s(115),$e=s(118);class ze extends $e.T{constructor(e){super(e),Object.setPrototypeOf(this,ze.prototype)}}class Me extends ze{name="AccessDeniedException";$fault="client";error;constructor(e){super({name:"AccessDeniedException",$fault:"client",...e}),Object.setPrototypeOf(this,Me.prototype),this.error=e.error}}class je extends ze{name="InternalServerException";$fault="server";error;constructor(e){super({name:"InternalServerException",$fault:"server",...e}),Object.setPrototypeOf(this,je.prototype),this.error=e.error}}class Ge extends ze{name="TooManyRequestsError";$fault="client";error;constructor(e){super({name:"TooManyRequestsError",$fault:"client",...e}),Object.setPrototypeOf(this,Ge.prototype),this.error=e.error}}class We extends ze{name="ValidationException";$fault="client";error;constructor(e){super({name:"ValidationException",$fault:"client",...e}),Object.setPrototypeOf(this,We.prototype),this.error=e.error}}const qe="accessKeyId",He="accessToken",Ne="client",Ve="clientId",Be="codeVerifier",Ke="error",Je="expiresIn",Le="grantType",Ze="http",Qe="httpError",Xe="idToken",Ye="jsonName",_e="message",et="refreshToken",tt="redirectUri",st="secretAccessKey",it="sessionToken",ot="smithy.ts.sdk.synthetic.com.amazonaws.signin",nt="tokenType",rt="com.amazonaws.signin";var at=[0,rt,"RefreshToken",8,0],ut=[-3,rt,"AccessDeniedException",{[Ke]:Ne},[Ke,_e],[0,0],2];Fe.O.for(rt).registerError(ut,Me);var ct=[3,rt,"AccessToken",8,[qe,st,it],[[0,{[Ye]:qe}],[0,{[Ye]:st}],[0,{[Ye]:it}]],3],pt=[3,rt,"CreateOAuth2TokenRequest",0,["tokenInput"],[[()=>dt,16]],1],dt=[3,rt,"CreateOAuth2TokenRequestBody",0,[Ve,Le,"code",tt,Be,et],[[0,{[Ye]:Ve}],[0,{[Ye]:Le}],0,[0,{[Ye]:tt}],[0,{[Ye]:Be}],[()=>at,{[Ye]:et}]],2],lt=[3,rt,"CreateOAuth2TokenResponse",0,["tokenOutput"],[[()=>gt,16]],1],gt=[3,rt,"CreateOAuth2TokenResponseBody",0,[He,nt,Je,et,Xe],[[()=>ct,{[Ye]:He}],[0,{[Ye]:nt}],[1,{[Ye]:Je}],[()=>at,{[Ye]:et}],[0,{[Ye]:Xe}]],4],ht=[-3,rt,"InternalServerException",{[Ke]:"server",[Qe]:500},[Ke,_e],[0,0],2];Fe.O.for(rt).registerError(ht,je);var St=[-3,rt,"TooManyRequestsError",{[Ke]:Ne,[Qe]:429},[Ke,_e],[0,0],2];Fe.O.for(rt).registerError(St,Ge);var ft=[-3,rt,"ValidationException",{[Ke]:Ne,[Qe]:400},[Ke,_e],[0,0],2];Fe.O.for(rt).registerError(ft,We);var mt=[-3,ot,"SigninServiceException",0,[],[]];Fe.O.for(ot).registerError(mt,ze);var wt=[9,rt,"CreateOAuth2Token",{[Ze]:["POST","/v1/token",200]},()=>pt,()=>lt];class vt extends(Ue.u.classBuilder().ep(y).m(function(e,t,s,i){return[(0,Te.r)(s,e.getEndpointParameterInstructions())]}).s("Signin","CreateOAuth2Token",{}).n("SigninClient","CreateOAuth2TokenCommand").sc(wt).build()){}},850(e,t,s){s.d(t,{UF:()=>u});var i=s(39),o=s(40),n=s(41);const r=(e,t=!1)=>{if(t){for(const t of e.split("."))if(!r(t))return!1;return!0}return!!(0,o.X)(e)&&(!(e.length<3||e.length>63)&&(e===e.toLowerCase()&&!(0,n.o)(e)))};let a=JSON.parse('{"partitions":[{"id":"aws","outputs":{"dnsSuffix":"amazonaws.com","dualStackDnsSuffix":"api.aws","implicitGlobalRegion":"us-east-1","name":"aws","supportsDualStack":true,"supportsFIPS":true},"regionRegex":"^(us|eu|ap|sa|ca|me|af|il|mx)\\\\-\\\\w+\\\\-\\\\d+$","regions":{"af-south-1":{"description":"Africa (Cape Town)"},"ap-east-1":{"description":"Asia Pacific (Hong Kong)"},"ap-east-2":{"description":"Asia Pacific (Taipei)"},"ap-northeast-1":{"description":"Asia Pacific (Tokyo)"},"ap-northeast-2":{"description":"Asia Pacific (Seoul)"},"ap-northeast-3":{"description":"Asia Pacific (Osaka)"},"ap-south-1":{"description":"Asia Pacific (Mumbai)"},"ap-south-2":{"description":"Asia Pacific (Hyderabad)"},"ap-southeast-1":{"description":"Asia Pacific (Singapore)"},"ap-southeast-2":{"description":"Asia Pacific (Sydney)"},"ap-southeast-3":{"description":"Asia Pacific (Jakarta)"},"ap-southeast-4":{"description":"Asia Pacific (Melbourne)"},"ap-southeast-5":{"description":"Asia Pacific (Malaysia)"},"ap-southeast-6":{"description":"Asia Pacific (New Zealand)"},"ap-southeast-7":{"description":"Asia Pacific (Thailand)"},"aws-global":{"description":"aws global region"},"ca-central-1":{"description":"Canada (Central)"},"ca-west-1":{"description":"Canada West (Calgary)"},"eu-central-1":{"description":"Europe (Frankfurt)"},"eu-central-2":{"description":"Europe (Zurich)"},"eu-north-1":{"description":"Europe (Stockholm)"},"eu-south-1":{"description":"Europe (Milan)"},"eu-south-2":{"description":"Europe (Spain)"},"eu-west-1":{"description":"Europe (Ireland)"},"eu-west-2":{"description":"Europe (London)"},"eu-west-3":{"description":"Europe (Paris)"},"il-central-1":{"description":"Israel (Tel Aviv)"},"me-central-1":{"description":"Middle East (UAE)"},"me-south-1":{"description":"Middle East (Bahrain)"},"mx-central-1":{"description":"Mexico (Central)"},"sa-east-1":{"description":"South America (Sao Paulo)"},"us-east-1":{"description":"US East (N. Virginia)"},"us-east-2":{"description":"US East (Ohio)"},"us-west-1":{"description":"US West (N. California)"},"us-west-2":{"description":"US West (Oregon)"}}},{"id":"aws-cn","outputs":{"dnsSuffix":"amazonaws.com.cn","dualStackDnsSuffix":"api.amazonwebservices.com.cn","implicitGlobalRegion":"cn-northwest-1","name":"aws-cn","supportsDualStack":true,"supportsFIPS":true},"regionRegex":"^cn\\\\-\\\\w+\\\\-\\\\d+$","regions":{"aws-cn-global":{"description":"aws-cn global region"},"cn-north-1":{"description":"China (Beijing)"},"cn-northwest-1":{"description":"China (Ningxia)"}}},{"id":"aws-eusc","outputs":{"dnsSuffix":"amazonaws.eu","dualStackDnsSuffix":"api.amazonwebservices.eu","implicitGlobalRegion":"eusc-de-east-1","name":"aws-eusc","supportsDualStack":true,"supportsFIPS":true},"regionRegex":"^eusc\\\\-(de)\\\\-\\\\w+\\\\-\\\\d+$","regions":{"eusc-de-east-1":{"description":"AWS European Sovereign Cloud (Germany)"}}},{"id":"aws-iso","outputs":{"dnsSuffix":"c2s.ic.gov","dualStackDnsSuffix":"api.aws.ic.gov","implicitGlobalRegion":"us-iso-east-1","name":"aws-iso","supportsDualStack":true,"supportsFIPS":true},"regionRegex":"^us\\\\-iso\\\\-\\\\w+\\\\-\\\\d+$","regions":{"aws-iso-global":{"description":"aws-iso global region"},"us-iso-east-1":{"description":"US ISO East"},"us-iso-west-1":{"description":"US ISO WEST"}}},{"id":"aws-iso-b","outputs":{"dnsSuffix":"sc2s.sgov.gov","dualStackDnsSuffix":"api.aws.scloud","implicitGlobalRegion":"us-isob-east-1","name":"aws-iso-b","supportsDualStack":true,"supportsFIPS":true},"regionRegex":"^us\\\\-isob\\\\-\\\\w+\\\\-\\\\d+$","regions":{"aws-iso-b-global":{"description":"aws-iso-b global region"},"us-isob-east-1":{"description":"US ISOB East (Ohio)"},"us-isob-west-1":{"description":"US ISOB West"}}},{"id":"aws-iso-e","outputs":{"dnsSuffix":"cloud.adc-e.uk","dualStackDnsSuffix":"api.cloud-aws.adc-e.uk","implicitGlobalRegion":"eu-isoe-west-1","name":"aws-iso-e","supportsDualStack":true,"supportsFIPS":true},"regionRegex":"^eu\\\\-isoe\\\\-\\\\w+\\\\-\\\\d+$","regions":{"aws-iso-e-global":{"description":"aws-iso-e global region"},"eu-isoe-west-1":{"description":"EU ISOE West"}}},{"id":"aws-iso-f","outputs":{"dnsSuffix":"csp.hci.ic.gov","dualStackDnsSuffix":"api.aws.hci.ic.gov","implicitGlobalRegion":"us-isof-south-1","name":"aws-iso-f","supportsDualStack":true,"supportsFIPS":true},"regionRegex":"^us\\\\-isof\\\\-\\\\w+\\\\-\\\\d+$","regions":{"aws-iso-f-global":{"description":"aws-iso-f global region"},"us-isof-east-1":{"description":"US ISOF EAST"},"us-isof-south-1":{"description":"US ISOF SOUTH"}}},{"id":"aws-us-gov","outputs":{"dnsSuffix":"amazonaws.com","dualStackDnsSuffix":"api.aws","implicitGlobalRegion":"us-gov-west-1","name":"aws-us-gov","supportsDualStack":true,"supportsFIPS":true},"regionRegex":"^us\\\\-gov\\\\-\\\\w+\\\\-\\\\d+$","regions":{"aws-us-gov-global":{"description":"aws-us-gov global region"},"us-gov-east-1":{"description":"AWS GovCloud (US-East)"},"us-gov-west-1":{"description":"AWS GovCloud (US-West)"}}}],"version":"1.1"}');const u={isVirtualHostableS3Bucket:r,parseArn:e=>{const t=e.split(":");if(t.length<6)return null;const[s,i,o,n,r,...a]=t;if("arn"!==s||""===i||""===o||""===a.join(":"))return null;return{partition:i,service:o,region:n,accountId:r,resourceId:a.map(e=>e.split("/")).flat()}},partition:e=>{const{partitions:t}=a;for(const s of t){const{regions:t,outputs:i}=s;for(const[s,o]of Object.entries(t))if(s===e)return{...i,...o}}for(const s of t){const{regionRegex:t,outputs:i}=s;if(new RegExp(t).test(e))return{...i}}const s=t.find(e=>"aws"===e.id);if(!s)throw new Error("Provided region was not found in the partition array or regex, and default partition with id 'aws' doesn't exist.");return{...s.outputs}}};i.m.aws=u},849(e){e.exports={rE:"3.985.0"}}};
|
|
2
|
+
"use strict";exports.id=780,exports.ids=[780],exports.modules={853(e,t,s){s.d(t,{CreateOAuth2TokenCommand:()=>Pt,SigninClient:()=>vt});var i=s(32),o=s(34),n=s(35),r=s(36),a=s(38),c=s(42),u=s(44),p=s(43),d=s(47),l=s(48),g=s(50),h=s(51),S=s(69),f=s(73),m=s(76),w=s(78),v=s(45),b=s(52);const y=async(e,t,s)=>({operation:(0,v.u)(t).operation,region:await(0,b.t)(e.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()});const P=e=>{const t=[];if("CreateOAuth2Token"===e.operation)t.push({schemeId:"smithy.api#noAuth"});else t.push(function(e){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"signin",region:e.region},propertiesExtractor:(e,t)=>({signingProperties:{config:e,context:t}})}}(e));return t},x={UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}};var k=s(849),A=s(86),E=s(87),I=s(89),R=s(91),D=s(92),O=s(93),C=s(96),T=s(97),U=s(54),F=s(98),$=s(99),z=s(101),M=s(100),j=s(102),G=s(104),W=s(70),q=s(105),H=s(843),N=s(847),V=s(74),B=s(68),K=s(111),J=s(112),L=s(82),Z=s(113),Q=s(850),X=s(127),Y=s(128),_=s(39);const ee="required",te="fn",se="argv",ie="ref",oe=!0,ne="isSet",re="booleanEquals",ae="error",ce="endpoint",ue="tree",pe="PartitionResult",de="stringEquals",le={[ee]:!0,default:!1,type:"boolean"},ge={[ee]:!1,type:"string"},he={[ie]:"Endpoint"},Se={[te]:re,[se]:[{[ie]:"UseFIPS"},!0]},fe={[te]:re,[se]:[{[ie]:"UseDualStack"},!0]},me={},we={[te]:"getAttr",[se]:[{[ie]:pe},"name"]},ve={[te]:re,[se]:[{[ie]:"UseFIPS"},!1]},be={[te]:re,[se]:[{[ie]:"UseDualStack"},!1]},ye={[te]:"getAttr",[se]:[{[ie]:pe},"supportsFIPS"]},Pe={[te]:re,[se]:[!0,{[te]:"getAttr",[se]:[{[ie]:pe},"supportsDualStack"]}]},xe=[{[ie]:"Region"}],ke={version:"1.0",parameters:{UseDualStack:le,UseFIPS:le,Endpoint:ge,Region:ge},rules:[{conditions:[{[te]:ne,[se]:[he]}],rules:[{conditions:[Se],error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:ae},{rules:[{conditions:[fe],error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:ae},{endpoint:{url:he,properties:me,headers:me},type:ce}],type:ue}],type:ue},{rules:[{conditions:[{[te]:ne,[se]:xe}],rules:[{conditions:[{[te]:"aws.partition",[se]:xe,assign:pe}],rules:[{conditions:[{[te]:de,[se]:[we,"aws"]},ve,be],endpoint:{url:"https://{Region}.signin.aws.amazon.com",properties:me,headers:me},type:ce},{conditions:[{[te]:de,[se]:[we,"aws-cn"]},ve,be],endpoint:{url:"https://{Region}.signin.amazonaws.cn",properties:me,headers:me},type:ce},{conditions:[{[te]:de,[se]:[we,"aws-us-gov"]},ve,be],endpoint:{url:"https://{Region}.signin.amazonaws-us-gov.com",properties:me,headers:me},type:ce},{conditions:[Se,fe],rules:[{conditions:[{[te]:re,[se]:[oe,ye]},Pe],rules:[{endpoint:{url:"https://signin-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:me,headers:me},type:ce}],type:ue},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:ae}],type:ue},{conditions:[Se,be],rules:[{conditions:[{[te]:re,[se]:[ye,oe]}],rules:[{endpoint:{url:"https://signin-fips.{Region}.{PartitionResult#dnsSuffix}",properties:me,headers:me},type:ce}],type:ue},{error:"FIPS is enabled but this partition does not support FIPS",type:ae}],type:ue},{conditions:[ve,fe],rules:[{conditions:[Pe],rules:[{endpoint:{url:"https://signin.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:me,headers:me},type:ce}],type:ue},{error:"DualStack is enabled but this partition does not support DualStack",type:ae}],type:ue},{endpoint:{url:"https://signin.{Region}.{PartitionResult#dnsSuffix}",properties:me,headers:me},type:ce}],type:ue}],type:ue},{error:"Invalid Configuration: Missing Region",type:ae}],type:ue}]},Ae=new X.k({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS"]}),Ee=(e,t={})=>Ae.get(e,()=>(0,Y.s)(ke,{endpointParams:e,logger:t.logger}));_.m.aws=Q.UF;var Ie=s(115),Re=s(118);class De extends Re.T{constructor(e){super(e),Object.setPrototypeOf(this,De.prototype)}}class Oe extends De{name="AccessDeniedException";$fault="client";error;constructor(e){super({name:"AccessDeniedException",$fault:"client",...e}),Object.setPrototypeOf(this,Oe.prototype),this.error=e.error}}class Ce extends De{name="InternalServerException";$fault="server";error;constructor(e){super({name:"InternalServerException",$fault:"server",...e}),Object.setPrototypeOf(this,Ce.prototype),this.error=e.error}}class Te extends De{name="TooManyRequestsError";$fault="client";error;constructor(e){super({name:"TooManyRequestsError",$fault:"client",...e}),Object.setPrototypeOf(this,Te.prototype),this.error=e.error}}class Ue extends De{name="ValidationException";$fault="client";error;constructor(e){super({name:"ValidationException",$fault:"client",...e}),Object.setPrototypeOf(this,Ue.prototype),this.error=e.error}}const Fe="accessKeyId",$e="accessToken",ze="client",Me="clientId",je="codeVerifier",Ge="error",We="expiresIn",qe="grantType",He="http",Ne="httpError",Ve="idToken",Be="jsonName",Ke="message",Je="refreshToken",Le="redirectUri",Ze="smithy.ts.sdk.synthetic.com.amazonaws.signin",Qe="secretAccessKey",Xe="sessionToken",Ye="tokenType",_e="com.amazonaws.signin",et=Ie.O.for(Ze);var tt=[-3,Ze,"SigninServiceException",0,[],[]];et.registerError(tt,De);const st=Ie.O.for(_e);var it=[-3,_e,"AccessDeniedException",{[Ge]:ze},[Ge,Ke],[0,0],2];st.registerError(it,Oe);var ot=[-3,_e,"InternalServerException",{[Ge]:"server",[Ne]:500},[Ge,Ke],[0,0],2];st.registerError(ot,Ce);var nt=[-3,_e,"TooManyRequestsError",{[Ge]:ze,[Ne]:429},[Ge,Ke],[0,0],2];st.registerError(nt,Te);var rt=[-3,_e,"ValidationException",{[Ge]:ze,[Ne]:400},[Ge,Ke],[0,0],2];st.registerError(rt,Ue);const at=[et,st];var ct=[0,_e,"RefreshToken",8,0],ut=[3,_e,"AccessToken",8,[Fe,Qe,Xe],[[0,{[Be]:Fe}],[0,{[Be]:Qe}],[0,{[Be]:Xe}]],3],pt=[3,_e,"CreateOAuth2TokenRequest",0,["tokenInput"],[[()=>dt,16]],1],dt=[3,_e,"CreateOAuth2TokenRequestBody",0,[Me,qe,"code",Le,je,Je],[[0,{[Be]:Me}],[0,{[Be]:qe}],0,[0,{[Be]:Le}],[0,{[Be]:je}],[()=>ct,{[Be]:Je}]],2],lt=[3,_e,"CreateOAuth2TokenResponse",0,["tokenOutput"],[[()=>gt,16]],1],gt=[3,_e,"CreateOAuth2TokenResponseBody",0,[$e,Ye,We,Je,Ve],[[()=>ut,{[Be]:$e}],[0,{[Be]:Ye}],[1,{[Be]:We}],[()=>ct,{[Be]:Je}],[0,{[Be]:Ve}]],4],ht=[9,_e,"CreateOAuth2Token",{[He]:["POST","/v1/token",200]},()=>pt,()=>lt];const St=e=>{(0,z.I)(process.version);const t=(0,G.I)(e),s=()=>t().then(M.l),i=(e=>({apiVersion:"2023-01-01",base64Decoder:e?.base64Decoder??K.E,base64Encoder:e?.base64Encoder??J.n,disableHostPrefix:e?.disableHostPrefix??!1,endpointProvider:e?.endpointProvider??Ee,extensions:e?.extensions??[],httpAuthSchemeProvider:e?.httpAuthSchemeProvider??P,httpAuthSchemes:e?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:e=>e.getIdentityProvider("aws.auth#sigv4"),signer:new q.f2},{schemeId:"smithy.api#noAuth",identityProvider:e=>e.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new N.m}],logger:e?.logger??new V.N,protocol:e?.protocol??H.Y,protocolSettings:e?.protocolSettings??{defaultNamespace:"com.amazonaws.signin",errorTypeRegistries:at,version:"2023-01-01",serviceTarget:"Signin"},serviceId:e?.serviceId??"Signin",urlParser:e?.urlParser??B.D,utf8Decoder:e?.utf8Decoder??L.a,utf8Encoder:e?.utf8Encoder??Z.P}))(e);(0,A.I)(process.version);const o={profile:e?.profile,logger:i.logger};return{...i,...e,runtime:"node",defaultsMode:t,authSchemePreference:e?.authSchemePreference??(0,U.Z)(E.$,o),bodyLengthChecker:e?.bodyLengthChecker??j.n,defaultUserAgentProvider:e?.defaultUserAgentProvider??(0,I.pf)({serviceId:i.serviceId,clientVersion:k.rE}),maxAttempts:e?.maxAttempts??(0,U.Z)(S.qs,e),region:e?.region??(0,U.Z)(D.GG,{...D.zH,...o}),requestHandler:F.$.create(e?.requestHandler??s),retryMode:e?.retryMode??(0,U.Z)({...S.kN,default:async()=>(await s()).retryMode||W.L0},e),sha256:e?.sha256??T.V.bind(null,"sha256"),streamCollector:e?.streamCollector??$.k,useDualstackEndpoint:e?.useDualstackEndpoint??(0,U.Z)(O.e$,o),useFipsEndpoint:e?.useFipsEndpoint??(0,U.Z)(C.Ko,o),userAgentAppId:e?.userAgentAppId??(0,U.Z)(R.hV,o)}};var ft=s(129),mt=s(130),wt=s(131);class vt extends m.K{config;constructor(...[e]){const t=St(e||{});super(t),this.initConfig=t;const s=(m=t,Object.assign(m,{useDualstackEndpoint:m.useDualstackEndpoint??!1,useFipsEndpoint:m.useFipsEndpoint??!1,defaultSigningName:"signin"}));var m;const v=(0,r.D)(s),P=(0,S.$z)(v),x=(0,c.T)(P),k=(0,i.OV)(x),A=((e,t)=>{const s=Object.assign((0,ft.R)(e),(0,wt.xA)(e),(0,mt.e)(e),(e=>{const t=e.httpAuthSchemes;let s=e.httpAuthSchemeProvider,i=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){i=e},credentials:()=>i}})(e));return t.forEach(e=>e.configure(s)),Object.assign(e,(0,ft.$)(s),(0,wt.uv)(s),(0,mt.j)(s),{httpAuthSchemes:(i=s).httpAuthSchemes(),httpAuthSchemeProvider:i.httpAuthSchemeProvider(),credentials:i.credentials()});var i})((e=>{const t=(0,w.h)(e);return Object.assign(t,{authSchemePreference:(0,b.t)(e.authSchemePreference??[])})})((0,h.C)(k)),e?.extensions||[]);this.config=A,this.middlewareStack.use((0,l.wq)(this.config)),this.middlewareStack.use((0,a.sM)(this.config)),this.middlewareStack.use((0,f.ey)(this.config)),this.middlewareStack.use((0,g.vK)(this.config)),this.middlewareStack.use((0,i.TC)(this.config)),this.middlewareStack.use((0,o.Y7)(this.config)),this.middlewareStack.use((0,n.n)(this.config)),this.middlewareStack.use((0,u.w)(this.config,{httpAuthSchemeParametersProvider:y,identityProviderConfigProvider:async e=>new p.h({"aws.auth#sigv4":e.credentials})})),this.middlewareStack.use((0,d.l)(this.config))}destroy(){super.destroy()}}var bt=s(132),yt=s(133);class Pt extends(yt.u.classBuilder().ep(x).m(function(e,t,s,i){return[(0,bt.r)(s,e.getEndpointParameterInstructions())]}).s("Signin","CreateOAuth2Token",{}).n("SigninClient","CreateOAuth2TokenCommand").sc(ht).build()){}},850(e,t,s){s.d(t,{UF:()=>c});var i=s(39),o=s(40),n=s(41);const r=(e,t=!1)=>{if(t){for(const t of e.split("."))if(!r(t))return!1;return!0}return!!(0,o.X)(e)&&(!(e.length<3||e.length>63)&&(e===e.toLowerCase()&&!(0,n.o)(e)))};let a=JSON.parse('{"partitions":[{"id":"aws","outputs":{"dnsSuffix":"amazonaws.com","dualStackDnsSuffix":"api.aws","implicitGlobalRegion":"us-east-1","name":"aws","supportsDualStack":true,"supportsFIPS":true},"regionRegex":"^(us|eu|ap|sa|ca|me|af|il|mx)\\\\-\\\\w+\\\\-\\\\d+$","regions":{"af-south-1":{"description":"Africa (Cape Town)"},"ap-east-1":{"description":"Asia Pacific (Hong Kong)"},"ap-east-2":{"description":"Asia Pacific (Taipei)"},"ap-northeast-1":{"description":"Asia Pacific (Tokyo)"},"ap-northeast-2":{"description":"Asia Pacific (Seoul)"},"ap-northeast-3":{"description":"Asia Pacific (Osaka)"},"ap-south-1":{"description":"Asia Pacific (Mumbai)"},"ap-south-2":{"description":"Asia Pacific (Hyderabad)"},"ap-southeast-1":{"description":"Asia Pacific (Singapore)"},"ap-southeast-2":{"description":"Asia Pacific (Sydney)"},"ap-southeast-3":{"description":"Asia Pacific (Jakarta)"},"ap-southeast-4":{"description":"Asia Pacific (Melbourne)"},"ap-southeast-5":{"description":"Asia Pacific (Malaysia)"},"ap-southeast-6":{"description":"Asia Pacific (New Zealand)"},"ap-southeast-7":{"description":"Asia Pacific (Thailand)"},"aws-global":{"description":"aws global region"},"ca-central-1":{"description":"Canada (Central)"},"ca-west-1":{"description":"Canada West (Calgary)"},"eu-central-1":{"description":"Europe (Frankfurt)"},"eu-central-2":{"description":"Europe (Zurich)"},"eu-north-1":{"description":"Europe (Stockholm)"},"eu-south-1":{"description":"Europe (Milan)"},"eu-south-2":{"description":"Europe (Spain)"},"eu-west-1":{"description":"Europe (Ireland)"},"eu-west-2":{"description":"Europe (London)"},"eu-west-3":{"description":"Europe (Paris)"},"il-central-1":{"description":"Israel (Tel Aviv)"},"me-central-1":{"description":"Middle East (UAE)"},"me-south-1":{"description":"Middle East (Bahrain)"},"mx-central-1":{"description":"Mexico (Central)"},"sa-east-1":{"description":"South America (Sao Paulo)"},"us-east-1":{"description":"US East (N. Virginia)"},"us-east-2":{"description":"US East (Ohio)"},"us-west-1":{"description":"US West (N. California)"},"us-west-2":{"description":"US West (Oregon)"}}},{"id":"aws-cn","outputs":{"dnsSuffix":"amazonaws.com.cn","dualStackDnsSuffix":"api.amazonwebservices.com.cn","implicitGlobalRegion":"cn-northwest-1","name":"aws-cn","supportsDualStack":true,"supportsFIPS":true},"regionRegex":"^cn\\\\-\\\\w+\\\\-\\\\d+$","regions":{"aws-cn-global":{"description":"aws-cn global region"},"cn-north-1":{"description":"China (Beijing)"},"cn-northwest-1":{"description":"China (Ningxia)"}}},{"id":"aws-eusc","outputs":{"dnsSuffix":"amazonaws.eu","dualStackDnsSuffix":"api.amazonwebservices.eu","implicitGlobalRegion":"eusc-de-east-1","name":"aws-eusc","supportsDualStack":true,"supportsFIPS":true},"regionRegex":"^eusc\\\\-(de)\\\\-\\\\w+\\\\-\\\\d+$","regions":{"eusc-de-east-1":{"description":"AWS European Sovereign Cloud (Germany)"}}},{"id":"aws-iso","outputs":{"dnsSuffix":"c2s.ic.gov","dualStackDnsSuffix":"api.aws.ic.gov","implicitGlobalRegion":"us-iso-east-1","name":"aws-iso","supportsDualStack":true,"supportsFIPS":true},"regionRegex":"^us\\\\-iso\\\\-\\\\w+\\\\-\\\\d+$","regions":{"aws-iso-global":{"description":"aws-iso global region"},"us-iso-east-1":{"description":"US ISO East"},"us-iso-west-1":{"description":"US ISO WEST"}}},{"id":"aws-iso-b","outputs":{"dnsSuffix":"sc2s.sgov.gov","dualStackDnsSuffix":"api.aws.scloud","implicitGlobalRegion":"us-isob-east-1","name":"aws-iso-b","supportsDualStack":true,"supportsFIPS":true},"regionRegex":"^us\\\\-isob\\\\-\\\\w+\\\\-\\\\d+$","regions":{"aws-iso-b-global":{"description":"aws-iso-b global region"},"us-isob-east-1":{"description":"US ISOB East (Ohio)"},"us-isob-west-1":{"description":"US ISOB West"}}},{"id":"aws-iso-e","outputs":{"dnsSuffix":"cloud.adc-e.uk","dualStackDnsSuffix":"api.cloud-aws.adc-e.uk","implicitGlobalRegion":"eu-isoe-west-1","name":"aws-iso-e","supportsDualStack":true,"supportsFIPS":true},"regionRegex":"^eu\\\\-isoe\\\\-\\\\w+\\\\-\\\\d+$","regions":{"aws-iso-e-global":{"description":"aws-iso-e global region"},"eu-isoe-west-1":{"description":"EU ISOE West"}}},{"id":"aws-iso-f","outputs":{"dnsSuffix":"csp.hci.ic.gov","dualStackDnsSuffix":"api.aws.hci.ic.gov","implicitGlobalRegion":"us-isof-south-1","name":"aws-iso-f","supportsDualStack":true,"supportsFIPS":true},"regionRegex":"^us\\\\-isof\\\\-\\\\w+\\\\-\\\\d+$","regions":{"aws-iso-f-global":{"description":"aws-iso-f global region"},"us-isof-east-1":{"description":"US ISOF EAST"},"us-isof-south-1":{"description":"US ISOF SOUTH"}}},{"id":"aws-us-gov","outputs":{"dnsSuffix":"amazonaws.com","dualStackDnsSuffix":"api.aws","implicitGlobalRegion":"us-gov-west-1","name":"aws-us-gov","supportsDualStack":true,"supportsFIPS":true},"regionRegex":"^us\\\\-gov\\\\-\\\\w+\\\\-\\\\d+$","regions":{"aws-us-gov-global":{"description":"aws-us-gov global region"},"us-gov-east-1":{"description":"AWS GovCloud (US-East)"},"us-gov-west-1":{"description":"AWS GovCloud (US-West)"}}}],"version":"1.1"}');const c={isVirtualHostableS3Bucket:r,parseArn:e=>{const t=e.split(":");if(t.length<6)return null;const[s,i,o,n,r,...a]=t;if("arn"!==s||""===i||""===o||""===a.join(":"))return null;return{partition:i,service:o,region:n,accountId:r,resourceId:a.map(e=>e.split("/")).flat()}},partition:e=>{const{partitions:t}=a;for(const s of t){const{regions:t,outputs:i}=s;for(const[s,o]of Object.entries(t))if(s===e)return{...i,...o}}for(const s of t){const{regionRegex:t,outputs:i}=s;if(new RegExp(t).test(e))return{...i}}const s=t.find(e=>"aws"===e.id);if(!s)throw new Error("Provided region was not found in the partition array or regex, and default partition with id 'aws' doesn't exist.");return{...s.outputs}}};i.m.aws=c},849(e){e.exports={rE:"3.990.0"}}};
|
|
3
3
|
//# sourceMappingURL=780.index.js.map
|
package/dist/782.index.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
"use strict";exports.id=782,exports.ids=[782],exports.modules={841(e,t,n){n.d(t,{EventStreamSerde:()=>r});var s=n(113),i=n(82);class r{marshaller;serializer;deserializer;serdeContext;defaultContentType;constructor({marshaller:e,serializer:t,deserializer:n,serdeContext:s,defaultContentType:i}){this.marshaller=e,this.serializer=t,this.deserializer=n,this.serdeContext=s,this.defaultContentType=i}async serializeEventStream({eventStream:e,requestSchema:t,initialRequest:n}){const s=this.marshaller,i=t.getEventStreamMember(),r=t.getMemberSchema(i),o=this.serializer,a=this.defaultContentType,l=Symbol("initialRequestMarker"),c={async*[Symbol.asyncIterator](){if(n){const e={":event-type":{type:"string",value:"initial-request"},":message-type":{type:"string",value:"event"},":content-type":{type:"string",value:a}};o.write(t,n);const s=o.flush();yield{[l]:!0,headers:e,body:s}}for await(const t of e)yield t}};return s.serialize(c,e=>{if(e[l])return{headers:e.headers,body:e.body};const t=Object.keys(e).find(e=>"__type"!==e)??"",{additionalHeaders:n,body:s,eventType:i,explicitPayloadContentType:o}=this.writeEventBody(t,r,e);return{headers:{":event-type":{type:"string",value:i},":message-type":{type:"string",value:"event"},":content-type":{type:"string",value:o??a},...n},body:s}})}async deserializeEventStream({response:e,responseSchema:t,initialResponseContainer:n}){const i=this.marshaller,r=t.getEventStreamMember(),o=t.getMemberSchema(r).getMemberSchemas(),a=Symbol("initialResponseMarker"),l=i.deserialize(e.body,async e=>{const n=Object.keys(e).find(e=>"__type"!==e)??"",i=e[n].body;if("initial-response"===n){const e=await this.deserializer.read(t,i);return delete e[r],{[a]:!0,...e}}if(n in o){const t=o[n];if(t.isStructSchema()){const r={};let o=!1;for(const[a,l]of t.structIterator()){const{eventHeader:t,eventPayload:c}=l.getMergedTraits();if(o=o||Boolean(t||c),c)l.isBlobSchema()?r[a]=i:l.isStringSchema()?r[a]=(this.serdeContext?.utf8Encoder??s.P)(i):l.isStructSchema()&&(r[a]=await this.deserializer.read(l,i));else if(t){const t=e[n].headers[a]?.value;null!=t&&(l.isNumericSchema()?r[a]=t&&"object"==typeof t&&"bytes"in t?BigInt(t.toString()):Number(t):r[a]=t)}}if(o)return{[n]:r};if(0===i.byteLength)return{[n]:{}}}return{[n]:await this.deserializer.read(t,i)}}return{$unknown:e}}),c=l[Symbol.asyncIterator](),y=await c.next();if(y.done)return l;if(y.value?.[a]){if(!t)throw new Error("@smithy::core/protocols - initial-response event encountered in event stream but no response schema given.");for(const[e,t]of Object.entries(y.value))n[e]=t}return{async*[Symbol.asyncIterator](){for(y?.value?.[a]||(yield y.value);;){const{done:e,value:t}=await c.next();if(e)break;yield t}}}}writeEventBody(e,t,n){const s=this.serializer;let r,o=e,a=null;const l={};if(t.getSchema()[4].includes(e)){const i=t.getMemberSchema(e);if(
|
|
2
|
+
"use strict";exports.id=782,exports.ids=[782],exports.modules={841(e,t,n){n.d(t,{EventStreamSerde:()=>r});var s=n(113),i=n(82);class r{marshaller;serializer;deserializer;serdeContext;defaultContentType;constructor({marshaller:e,serializer:t,deserializer:n,serdeContext:s,defaultContentType:i}){this.marshaller=e,this.serializer=t,this.deserializer=n,this.serdeContext=s,this.defaultContentType=i}async serializeEventStream({eventStream:e,requestSchema:t,initialRequest:n}){const s=this.marshaller,i=t.getEventStreamMember(),r=t.getMemberSchema(i),o=this.serializer,a=this.defaultContentType,l=Symbol("initialRequestMarker"),c={async*[Symbol.asyncIterator](){if(n){const e={":event-type":{type:"string",value:"initial-request"},":message-type":{type:"string",value:"event"},":content-type":{type:"string",value:a}};o.write(t,n);const s=o.flush();yield{[l]:!0,headers:e,body:s}}for await(const t of e)yield t}};return s.serialize(c,e=>{if(e[l])return{headers:e.headers,body:e.body};const t=Object.keys(e).find(e=>"__type"!==e)??"",{additionalHeaders:n,body:s,eventType:i,explicitPayloadContentType:o}=this.writeEventBody(t,r,e);return{headers:{":event-type":{type:"string",value:i},":message-type":{type:"string",value:"event"},":content-type":{type:"string",value:o??a},...n},body:s}})}async deserializeEventStream({response:e,responseSchema:t,initialResponseContainer:n}){const i=this.marshaller,r=t.getEventStreamMember(),o=t.getMemberSchema(r).getMemberSchemas(),a=Symbol("initialResponseMarker"),l=i.deserialize(e.body,async e=>{const n=Object.keys(e).find(e=>"__type"!==e)??"",i=e[n].body;if("initial-response"===n){const e=await this.deserializer.read(t,i);return delete e[r],{[a]:!0,...e}}if(n in o){const t=o[n];if(t.isStructSchema()){const r={};let o=!1;for(const[a,l]of t.structIterator()){const{eventHeader:t,eventPayload:c}=l.getMergedTraits();if(o=o||Boolean(t||c),c)l.isBlobSchema()?r[a]=i:l.isStringSchema()?r[a]=(this.serdeContext?.utf8Encoder??s.P)(i):l.isStructSchema()&&(r[a]=await this.deserializer.read(l,i));else if(t){const t=e[n].headers[a]?.value;null!=t&&(l.isNumericSchema()?r[a]=t&&"object"==typeof t&&"bytes"in t?BigInt(t.toString()):Number(t):r[a]=t)}}if(o)return{[n]:r};if(0===i.byteLength)return{[n]:{}}}return{[n]:await this.deserializer.read(t,i)}}return{$unknown:e}}),c=l[Symbol.asyncIterator](),y=await c.next();if(y.done)return l;if(y.value?.[a]){if(!t)throw new Error("@smithy::core/protocols - initial-response event encountered in event stream but no response schema given.");for(const[e,t]of Object.entries(y.value))n[e]=t}return{async*[Symbol.asyncIterator](){for(y?.value?.[a]||(yield y.value);;){const{done:e,value:t}=await c.next();if(e)break;yield t}}}}writeEventBody(e,t,n){const s=this.serializer;let r,o=e,a=null;const l={};if(t.getSchema()[4].includes(e)){const i=t.getMemberSchema(e);if(i.isStructSchema()){for(const[t,s]of i.structIterator()){const{eventHeader:i,eventPayload:r}=s.getMergedTraits();if(r)a=t;else if(i){const i=n[e][t];let r="binary";s.isNumericSchema()?r=(-2)**31<=i&&i<=2**31-1?"integer":"long":s.isTimestampSchema()?r="timestamp":s.isStringSchema()?r="string":s.isBooleanSchema()&&(r="boolean"),null!=i&&(l[t]={type:r,value:i},delete n[e][t])}}if(null!==a){const t=i.getMemberSchema(a);t.isBlobSchema()?r="application/octet-stream":t.isStringSchema()&&(r="text/plain"),s.write(t,n[e][a])}else s.write(i,n[e])}else{if(!i.isUnitSchema())throw new Error("@smithy/core/event-streams - non-struct member not supported in event stream union.");s.write(i,{})}}else{const[t,i]=n[e];o=t,s.write(15,i)}const c=s.flush();return{body:"string"==typeof c?(this.serdeContext?.utf8Decoder??i.a)(c):c,eventType:o,explicitPayloadContentType:r,additionalHeaders:l}}}}};
|
|
3
3
|
//# sourceMappingURL=782.index.js.map
|