@shumai-one/shumai-agent 0.4.5 → 0.4.7
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/bin/{chunk-04dp95m5.js → chunk-20pn5n81.js} +1 -1
- package/bin/{chunk-m8jmvj7p.js → chunk-2vqhhfx4.js} +2 -2
- package/bin/{chunk-8z8y35z1.js → chunk-3dpcsfxc.js} +4 -4
- package/bin/{chunk-a9ka4a7g.js → chunk-3gh31dx8.js} +1 -1
- package/bin/{chunk-tajj8sey.js → chunk-4wvvkn02.js} +1 -1
- package/bin/{chunk-80f02wmy.js → chunk-576ez5ra.js} +1 -1
- package/bin/{chunk-9bpp5v13.js → chunk-5sb2pty7.js} +47 -4
- package/bin/chunk-6swxj1gy.js +2 -0
- package/bin/{chunk-x8w09thr.js → chunk-7kgf69zn.js} +1 -1
- package/bin/{chunk-zdkpvcak.js → chunk-970g1609.js} +3 -3
- package/bin/{chunk-pf9fjhe9.js → chunk-a4kmccn5.js} +2 -2
- package/bin/{chunk-vnn8sej7.js → chunk-atats4tw.js} +2 -2
- package/bin/{chunk-g8svcz2s.js → chunk-bvxhhdpx.js} +1 -1
- package/bin/{chunk-aeh1zkya.js → chunk-bybp3keq.js} +1 -1
- package/bin/{chunk-wdvv14a7.js → chunk-c92ybjd9.js} +1 -1
- package/bin/{chunk-d2508eez.js → chunk-cw3fd9az.js} +1 -1
- package/bin/{chunk-wg6xrc3y.js → chunk-dsa7hrkt.js} +2 -2
- package/bin/{chunk-tvjbvjq0.js → chunk-dsfgxrd0.js} +1 -1
- package/bin/{chunk-g5m0z3zf.js → chunk-fptcf2h9.js} +1 -1
- package/bin/{chunk-y2adfzyt.js → chunk-h47f6dyy.js} +1 -1
- package/bin/{chunk-b2205272.js → chunk-hede4f0t.js} +2 -2
- package/bin/{chunk-wd3dr97j.js → chunk-j5z7aa4x.js} +1 -1
- package/bin/{chunk-zh24dybv.js → chunk-n4x0rmv9.js} +7 -7
- package/bin/{chunk-rh25zhgg.js → chunk-nxcm1pjj.js} +3 -3
- package/bin/chunk-nz714xvr.js +5 -0
- package/bin/{chunk-tdah647g.js → chunk-p8x6v2rf.js} +8 -8
- package/bin/chunk-pwsf7xgb.js +2 -0
- package/bin/{chunk-sjc0zazt.js → chunk-pzfx9fte.js} +1 -1
- package/bin/{chunk-hbmbvjjq.js → chunk-r1w7s1s4.js} +1 -1
- package/bin/{chunk-bxw7ewk9.js → chunk-rfgs7csx.js} +2 -2
- package/bin/{chunk-6avzdxd7.js → chunk-s659vncx.js} +1 -1
- package/bin/{chunk-75cz1qfr.js → chunk-vp8fc4n7.js} +1 -1
- package/bin/{chunk-5917esy3.js → chunk-w045p4q1.js} +7 -7
- package/bin/{chunk-s984p2eq.js → chunk-wf3t99en.js} +3 -3
- package/bin/{chunk-95f70ycm.js → chunk-xd5kxme3.js} +1 -1
- package/bin/{chunk-fe563z5g.js → chunk-xmvjjnf0.js} +2 -2
- package/bin/{chunk-e7m6nsvr.js → chunk-y7mfmet4.js} +1 -1
- package/bin/shumai-agent-app.js +434 -412
- package/package.json +7 -7
- package/prisma/migrations/20260914024424_add_asset_comment_reactions/migration.sql +22 -0
- package/prisma/migrations/20260914064432_limit_reaction_code_length/migration.sql +8 -0
- package/prisma/migrations/20260914092940_add_jpeg_preview_flags/migration.sql +5 -0
- package/prisma/schema.prisma +21 -0
- package/bin/chunk-ayfenbhf.js +0 -2
- package/bin/chunk-s1e2nv5w.js +0 -5
- package/bin/chunk-vvvkt1vd.js +0 -2
- /package/bin/{chunk-taj1dwc9.js → chunk-0wkg9709.js} +0 -0
- /package/bin/{chunk-xrcqtsyv.js → chunk-cv87czb9.js} +0 -0
- /package/bin/{chunk-4nfp86vv.js → chunk-h7a89cyq.js} +0 -0
- /package/bin/{chunk-nwr6pvww.js → chunk-m0nz3s8v.js} +0 -0
- /package/bin/{chunk-6whe5vwd.js → chunk-n6635jsz.js} +0 -0
- /package/bin/{chunk-bmw7mc1p.js → chunk-td3v9xkb.js} +0 -0
- /package/bin/{chunk-pqn438ma.js → chunk-v72k0y9g.js} +0 -0
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{G,E,m,N,b,V,h,q,H,f,we,pe,K,ee}from"./shumai-agent-app.js";var{awsEndpointFunctions:At,emitWarningIfUnsupportedVersion:Et,createDefaultUserAgentProvider:vt,NODE_APP_ID_CONFIG_OPTIONS:yt,getAwsRegionExtensionConfiguration:It,resolveAwsRegionExtensionConfiguration:Rt,resolveUserAgentConfig:_t,resolveHostHeaderConfig:Ct,getUserAgentPlugin:xt,getHostHeaderPlugin:wt,getLoggerPlugin:Tt,getRecursionDetectionPlugin:Dt,setCredentialFeature:ie,stsRegionDefaultResolver:bt}=f(),{NoAuthSigner:Re,getHttpAuthSchemeEndpointRuleSetPlugin:$t,DefaultIdentityProviderConfig:kt,getHttpSigningPlugin:Ot}=H(),{normalizeProvider:_e,getSmithyContext:Ce,ServiceException:Nt,NoOpLogger:Wt,emitWarningIfUnsupportedVersion:Ht,loadConfigsForDefaultMode:Ut,getDefaultExtensionConfiguration:qt,resolveDefaultRuntimeConfig:Ft,Client:xe,makeBuilder:Lt,createAggregatedClient:Kt}=E(),{Command:Mt}=E();var jn=Mt,Gn=xe;var{resolveDefaultsModeConfig:jt,loadConfig:I,NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS:Gt,NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS:Vt,NODE_REGION_CONFIG_OPTIONS:zt,NODE_REGION_CONFIG_FILE_OPTIONS:Bt,resolveRegionConfig:Qt}=m(),{BinaryDecisionDiagram:Yt,EndpointCache:Xt,decideEndpoint:Jt,customEndpointFunctions:Zt,resolveParams:es,resolveEndpointConfig:ts,getEndpointPlugin:ss}=N(),{parseUrl:ns,getHttpHandlerExtensionConfiguration:os,resolveHttpHandlerRuntimeConfig:rs,getContentLengthPlugin:is}=h(),{DEFAULT_RETRY_MODE:as,NODE_RETRY_MODE_CONFIG_OPTIONS:cs,NODE_MAX_ATTEMPT_CONFIG_OPTIONS:us,resolveRetryConfig:ds,getRetryPlugin:ls}=q(),{TypeRegistry:Te,getSchemaSerdePlugin:ps}=G(),{resolveAwsSdkSigV4Config:gs,resolveAwsSdkSigV4AConfig:hs,AwsSdkSigV4Signer:De,AwsSdkSigV4ASigner:be,NODE_SIGV4A_CONFIG_OPTIONS:ms,NODE_AUTH_SCHEME_PREFERENCE_OPTIONS:Ps}=K(),{SignatureV4MultiRegion:$e}=we(),{toUtf8:fs,fromUtf8:Ss,toBase64:As,fromBase64:Es,calculateBodyLength:vs}=b(),{streamCollector:ys,NodeHttpHandler:Is}=ee(),{AwsQueryProtocol:Rs}=pe(),{Sha256:_s}=V(),U="ref",C=-1,F=!0,Pe="isSet",ke="PartitionResult",L="booleanEquals",u="stringEquals",oe="getAttr",fe="us-east-1",Se="sigv4",Ae="sts",Ee="https://sts.{Region}.{PartitionResult#dnsSuffix}",ve={[U]:"Endpoint"},d={[U]:"Region"},re={[U]:ke},W={},ye=[d],Ie={conditions:[[Pe,[ve]],[Pe,ye],["aws.partition",ye,ke],[L,[{[U]:"UseFIPS"},F]],[L,[{[U]:"UseDualStack"},F]],[u,[d,"aws-global"]],[L,[{[U]:"UseGlobalEndpoint"},F]],[u,[d,"eu-central-1"]],[L,[{fn:oe,argv:[re,"supportsDualStack"]},F]],[L,[{fn:oe,argv:[re,"supportsFIPS"]},F]],[u,[d,"ap-south-1"]],[u,[d,"eu-north-1"]],[u,[d,"eu-west-1"]],[u,[d,"eu-west-2"]],[u,[d,"eu-west-3"]],[u,[d,"sa-east-1"]],[u,[d,fe]],[u,[d,"us-east-2"]],[u,[d,"us-west-2"]],[u,[d,"us-west-1"]],[u,[d,"ca-central-1"]],[u,[d,"ap-southeast-1"]],[u,[d,"ap-northeast-1"]],[u,[d,"ap-southeast-2"]],[u,[{fn:oe,argv:[re,"name"]},"aws-us-gov"]]],results:[[C],["https://sts.amazonaws.com",{authSchemes:[{name:Se,signingName:Ae,signingRegion:fe}]}],[Ee,{authSchemes:[{name:Se,signingName:Ae,signingRegion:"{Region}"}]}],[C,"Invalid Configuration: FIPS and custom endpoint are not supported"],[C,"Invalid Configuration: Dualstack and custom endpoint are not supported"],[ve,W],["https://sts-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",W],[C,"FIPS and DualStack are enabled, but this partition does not support one or both"],["https://sts.{Region}.amazonaws.com",W],["https://sts-fips.{Region}.{PartitionResult#dnsSuffix}",W],[C,"FIPS is enabled but this partition does not support FIPS"],["https://sts.{Region}.{PartitionResult#dualStackDnsSuffix}",W],[C,"DualStack is enabled but this partition does not support DualStack"],[Ee,W],[C,"Invalid Configuration: Missing Region"]]},Cs=2,o=1e8,xs=new Int32Array([-1,1,-1,0,30,3,1,4,o+14,2,5,o+14,3,25,6,4,24,7,5,o+1,8,6,9,o+13,7,o+1,10,10,o+1,11,11,o+1,12,12,o+1,13,13,o+1,14,14,o+1,15,15,o+1,16,16,o+1,17,17,o+1,18,18,o+1,19,19,o+1,20,20,o+1,21,21,o+1,22,22,o+1,23,23,o+1,o+2,8,o+11,o+12,4,28,26,9,27,o+10,24,o+8,o+9,8,29,o+7,9,o+6,o+7,3,o+3,31,4,o+4,o+5]),ws=Yt.from(xs,Cs,Ie.conditions,Ie.results),Ts=new Xt({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS","UseGlobalEndpoint"]}),Oe=(e,t={})=>Ts.get(e,()=>Jt(ws,{endpointParams:e,logger:t.logger}));Zt.aws=At;var Ds=(e)=>async(t,s,i)=>{if(!i)throw Error("Could not find `input` for `defaultEndpointRuleSetHttpAuthSchemeParametersProvider`");let n=await e(t,s,i),c=Ce(s)?.commandInstance?.constructor?.getEndpointParameterInstructions;if(!c)throw Error(`getEndpointParameterInstructions() is not defined on '${s.commandName}'`);let r=await es(i,{getEndpointParameterInstructions:c},t);return Object.assign(n,r)},bs=async(e,t,s)=>({operation:Ce(t).operation,region:await _e(e.region)()||(()=>{throw Error("expected `region` to be configured for `aws.auth#sigv4`")})()}),$s=Ds(bs);function Ne(e){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"sts",region:e.region},propertiesExtractor:(t,s)=>({signingProperties:{config:t,context:s}})}}function ae(e){return{schemeId:"aws.auth#sigv4a",signingProperties:{name:"sts",region:e.region},propertiesExtractor:(t,s)=>({signingProperties:{config:t,context:s}})}}function We(e){return{schemeId:"smithy.api#noAuth"}}var ks=(e,t,s)=>(n)=>{let r=e(n).properties?.authSchemes;if(!r)return t(n);let l=[];for(let S of r){let{name:p,properties:A={},..._}=S,v=p.toLowerCase();if(p!==v)console.warn(`HttpAuthScheme has been normalized with lowercasing: '${p}' to '${v}'`);let P;if(v==="sigv4a"){P="aws.auth#sigv4a";let se=r.find((ne)=>{let me=ne.name.toLowerCase();return me!=="sigv4a"&&me.startsWith("sigv4")});if($e.sigv4aDependency()==="none"&&se)continue}else if(v.startsWith("sigv4"))P="aws.auth#sigv4";else throw Error(`Unknown HttpAuthScheme found in '@smithy.rules#endpointRuleSet': '${v}'`);let O=s[P];if(!O)throw Error(`Could not find HttpAuthOption create function for '${P}'`);let y=O(n);y.schemeId=P,y.signingProperties={...y.signingProperties||{},..._,...A},l.push(y)}return l},Os=(e)=>{let t=[];switch(e.operation){case"AssumeRoleWithWebIdentity":{t.push(We()),t.push(ae(e));break}default:t.push(Ne(e)),t.push(ae(e))}return t},Ns=ks(Oe,Os,{"aws.auth#sigv4":Ne,"aws.auth#sigv4a":ae,"smithy.api#noAuth":We}),Ws=(e)=>{let t=gs(e),s=hs(t);return Object.assign(s,{authSchemePreference:_e(e.authSchemePreference??[])})},Hs=(e)=>Object.assign(e,{useDualstackEndpoint:e.useDualstackEndpoint??!1,useFipsEndpoint:e.useFipsEndpoint??!1,useGlobalEndpoint:e.useGlobalEndpoint??!1,defaultSigningName:"sts"}),Us={UseGlobalEndpoint:{type:"builtInParams",name:"useGlobalEndpoint"},UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}},qs="3.997.43",Fs={version:qs};class g extends Nt{constructor(e){super(e);Object.setPrototypeOf(this,g.prototype)}}class j extends g{name="ExpiredTokenException";$fault="client";constructor(e){super({name:"ExpiredTokenException",$fault:"client",...e});Object.setPrototypeOf(this,j.prototype)}}class z extends g{name="MalformedPolicyDocumentException";$fault="client";constructor(e){super({name:"MalformedPolicyDocumentException",$fault:"client",...e});Object.setPrototypeOf(this,z.prototype)}}class B extends g{name="PackedPolicyTooLargeException";$fault="client";constructor(e){super({name:"PackedPolicyTooLargeException",$fault:"client",...e});Object.setPrototypeOf(this,B.prototype)}}class Q extends g{name="RegionDisabledException";$fault="client";constructor(e){super({name:"RegionDisabledException",$fault:"client",...e});Object.setPrototypeOf(this,Q.prototype)}}class Y extends g{name="IDPRejectedClaimException";$fault="client";constructor(e){super({name:"IDPRejectedClaimException",$fault:"client",...e});Object.setPrototypeOf(this,Y.prototype)}}class X extends g{name="InvalidIdentityTokenException";$fault="client";constructor(e){super({name:"InvalidIdentityTokenException",$fault:"client",...e});Object.setPrototypeOf(this,X.prototype)}}class J extends g{name="IDPCommunicationErrorException";$fault="client";$retryable={};constructor(e){super({name:"IDPCommunicationErrorException",$fault:"client",...e});Object.setPrototypeOf(this,J.prototype)}}var Ls="Arn",Ks="AccessKeyId",Ms="AssumeRole",js="AssumedRoleId",Gs="AssumeRoleRequest",Vs="AssumeRoleResponse",ce="AssumedRoleUser",zs="AssumeRoleWithWebIdentity",Bs="AssumeRoleWithWebIdentityRequest",Qs="AssumeRoleWithWebIdentityResponse",Ys="Audience",ue="Credentials",Xs="ContextAssertion",He="DurationSeconds",Js="Expiration",Zs="ExternalId",en="ExpiredTokenException",tn="IDPCommunicationErrorException",sn="IDPRejectedClaimException",nn="InvalidIdentityTokenException",on="Key",rn="MalformedPolicyDocumentException",Ue="Policy",qe="PolicyArns",an="ProviderArn",cn="ProvidedContexts",un="ProvidedContextsListType",dn="ProvidedContext",ln="PolicyDescriptorType",pn="ProviderId",Fe="PackedPolicySize",gn="PackedPolicyTooLargeException",hn="Provider",Le="RoleArn",mn="RegionDisabledException",Ke="RoleSessionName",Pn="SecretAccessKey",fn="SubjectFromWebIdentityToken",de="SourceIdentity",Sn="SerialNumber",An="SessionToken",En="Tags",vn="TokenCode",yn="TransitiveTagKeys",In="Tag",Rn="Value",_n="WebIdentityToken",Cn="arn",xn="accessKeySecretType",x="awsQueryError",w="client",wn="clientTokenType",T="error",D="httpError",k="message",Tn="policyDescriptorListType",Me="smithy.ts.sdk.synthetic.com.amazonaws.sts",Dn="tagListType",a="com.amazonaws.sts",je=Te.for(Me),Ge=[-3,Me,"STSServiceException",0,[],[]];je.registerError(Ge,g);var R=Te.for(a),Ve=[-3,a,en,{[x]:["ExpiredTokenException",400],[T]:w,[D]:400},[k],[0]];R.registerError(Ve,j);var ze=[-3,a,tn,{[x]:["IDPCommunicationError",400],[T]:w,[D]:400},[k],[0]];R.registerError(ze,J);var Be=[-3,a,sn,{[x]:["IDPRejectedClaim",403],[T]:w,[D]:403},[k],[0]];R.registerError(Be,Y);var Qe=[-3,a,nn,{[x]:["InvalidIdentityToken",400],[T]:w,[D]:400},[k],[0]];R.registerError(Qe,X);var Ye=[-3,a,rn,{[x]:["MalformedPolicyDocument",400],[T]:w,[D]:400},[k],[0]];R.registerError(Ye,z);var Xe=[-3,a,gn,{[x]:["PackedPolicyTooLarge",400],[T]:w,[D]:400},[k],[0]];R.registerError(Xe,B);var Je=[-3,a,mn,{[x]:["RegionDisabledException",403],[T]:w,[D]:403},[k],[0]];R.registerError(Je,Q);var Ze=[je,R],bn=[0,a,xn,8,0],$n=[0,a,wn,8,0],le=[3,a,ce,0,[js,Ls],[0,0],2],et=[3,a,Gs,0,[Le,Ke,qe,Ue,He,En,yn,Zs,Sn,vn,de,cn],[0,0,()=>at,0,1,()=>On,64,0,0,0,0,()=>kn],2],tt=[3,a,Vs,0,[ue,ce,Fe,de],[[()=>ge,0],()=>le,1,0]],st=[3,a,Bs,0,[Le,Ke,_n,pn,qe,Ue,He],[0,0,[()=>$n,0],0,()=>at,0,1],3],nt=[3,a,Qs,0,[ue,fn,ce,Fe,hn,Ys,de],[[()=>ge,0],0,()=>le,1,0,0,0]],ge=[3,a,ue,0,[Ks,Pn,An,Js],[0,[()=>bn,0],0,4],4],ot=[3,a,ln,0,[Cn],[0]],rt=[3,a,dn,0,[an,Xs],[0,0]],it=[3,a,In,0,[on,Rn],[0,0],2],at=[1,a,Tn,0,()=>ot],kn=[1,a,un,0,()=>rt],On=[1,a,Dn,0,()=>it],ct=[9,a,Ms,0,()=>et,()=>tt],ut=[9,a,zs,0,()=>st,()=>nt],Nn=(e)=>({apiVersion:"2011-06-15",base64Decoder:e?.base64Decoder??Es,base64Encoder:e?.base64Encoder??As,disableHostPrefix:e?.disableHostPrefix??!1,endpointProvider:e?.endpointProvider??Oe,extensions:e?.extensions??[],httpAuthSchemeProvider:e?.httpAuthSchemeProvider??Ns,httpAuthSchemes:e?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:(t)=>t.getIdentityProvider("aws.auth#sigv4"),signer:new De},{schemeId:"aws.auth#sigv4a",identityProvider:(t)=>t.getIdentityProvider("aws.auth#sigv4a"),signer:new be},{schemeId:"smithy.api#noAuth",identityProvider:(t)=>t.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new Re}],logger:e?.logger??new Wt,protocol:e?.protocol??Rs,protocolSettings:e?.protocolSettings??{defaultNamespace:"com.amazonaws.sts",errorTypeRegistries:Ze,xmlNamespace:"https://sts.amazonaws.com/doc/2011-06-15/",version:"2011-06-15",serviceTarget:"AWSSecurityTokenServiceV20110615"},serviceId:e?.serviceId??"STS",sha256:e?.sha256??_s,signerConstructor:e?.signerConstructor??$e,urlParser:e?.urlParser??ns,utf8Decoder:e?.utf8Decoder??Ss,utf8Encoder:e?.utf8Encoder??fs}),Wn=(e)=>{Ht(process.version);let t=jt(e),s=()=>t().then(Ut),i=Nn(e);Et(process.version);let n={profile:e?.profile,logger:i.logger};return{...i,...e,runtime:"node",defaultsMode:t,authSchemePreference:e?.authSchemePreference??I(Ps,n),bodyLengthChecker:e?.bodyLengthChecker??vs,defaultUserAgentProvider:e?.defaultUserAgentProvider??vt({serviceId:i.serviceId,clientVersion:Fs.version}),httpAuthSchemes:e?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:(c)=>c.getIdentityProvider("aws.auth#sigv4")||(async(r)=>await e.credentialDefaultProvider(r?.__config||{})()),signer:new De},{schemeId:"aws.auth#sigv4a",identityProvider:(c)=>c.getIdentityProvider("aws.auth#sigv4a"),signer:new be},{schemeId:"smithy.api#noAuth",identityProvider:(c)=>c.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new Re}],maxAttempts:e?.maxAttempts??I(us,e),region:e?.region??I(zt,{...Bt,...n}),requestHandler:Is.create(e?.requestHandler??s),retryMode:e?.retryMode??I({...cs,default:async()=>(await s()).retryMode||as},e),sigv4aSigningRegionSet:e?.sigv4aSigningRegionSet??I(ms,n),streamCollector:e?.streamCollector??ys,useDualstackEndpoint:e?.useDualstackEndpoint??I(Vt,n),useFipsEndpoint:e?.useFipsEndpoint??I(Gt,n),userAgentAppId:e?.userAgentAppId??I(yt,n)}},Hn=(e)=>{let{httpAuthSchemes:t,httpAuthSchemeProvider:s,credentials:i}=e;return{setHttpAuthScheme(n){let c=t.findIndex((r)=>r.schemeId===n.schemeId);if(c===-1)t.push(n);else t.splice(c,1,n)},httpAuthSchemes(){return t},setHttpAuthSchemeProvider(n){s=n},httpAuthSchemeProvider(){return s},setCredentials(n){i=n},credentials(){return i}}},Un=(e)=>({httpAuthSchemes:e.httpAuthSchemes(),httpAuthSchemeProvider:e.httpAuthSchemeProvider(),credentials:e.credentials()}),qn=(e,t)=>{let s=Object.assign(It(e),qt(e),os(e),Hn(e));return t.forEach((i)=>i.configure(s)),Object.assign(e,Rt(s),Ft(s),rs(s),Un(s))};class M extends xe{config;constructor(...[e]){let t=Wn(e||{});super(t);this.initConfig=t;let s=Hs(t),i=_t(s),n=ds(i),c=Qt(n),r=Ct(c),l=ts(r),S=Ws(l),p=qn(S,e?.extensions||[]);this.config=p,this.middlewareStack.use(ps(this.config)),this.middlewareStack.use(xt(this.config)),this.middlewareStack.use(ls(this.config)),this.middlewareStack.use(is(this.config)),this.middlewareStack.use(wt(this.config)),this.middlewareStack.use(Tt(this.config)),this.middlewareStack.use(Dt(this.config)),this.middlewareStack.use($t(this.config,{httpAuthSchemeParametersProvider:$s,identityProviderConfigProvider:async(A)=>new kt({"aws.auth#sigv4":A.credentials,"aws.auth#sigv4a":A.credentials})})),this.middlewareStack.use(Ot(this.config))}destroy(){super.destroy()}}var dt=Lt(Us,"AWSSecurityTokenServiceV20110615","STSClient",ss),lt={},pt=(e,t,s,i)=>[];class Z extends dt(lt,pt,"AssumeRole",ct){}class te extends dt(lt,pt,"AssumeRoleWithWebIdentity",ut){}var Fn={AssumeRoleCommand:Z,AssumeRoleWithWebIdentityCommand:te};class he extends M{}Kt(Fn,he);var gt=(e)=>{if(typeof e?.Arn==="string"){let t=e.Arn.split(":");if(t.length>4&&t[4]!=="")return t[4]}return},ht=async(e,t,s,i={})=>{let n=typeof e==="function"?await e():e,c=typeof t==="function"?await t():t,r="",l=n??c??(r=await bt(i)());return s?.debug?.("@aws-sdk/client-sts::resolveRegion","accepting first of:",`${n} (credential provider clientConfig)`,`${c} (contextual client)`,`${r} (STS default: AWS_REGION, profile region, or us-east-1)`),l},Ln=(e,t)=>{let s,i;return async(n,c)=>{if(i=n,!s){let{logger:A=e?.parentClientConfig?.logger,profile:_=e?.parentClientConfig?.profile,region:v,requestHandler:P=e?.parentClientConfig?.requestHandler,credentialProviderLogger:O,userAgentAppId:y=e?.parentClientConfig?.userAgentAppId}=e,se=await ht(v,e?.parentClientConfig?.region,O,{logger:A,profile:_}),ne=!mt(P);s=new t({...e,userAgentAppId:y,profile:_,credentialDefaultProvider:()=>async()=>i,region:se,requestHandler:ne?P:void 0,logger:A})}let{Credentials:r,AssumedRoleUser:l}=await s.send(new Z(c));if(!r||!r.AccessKeyId||!r.SecretAccessKey)throw Error(`Invalid response from STS.assumeRole call with role ${c.RoleArn}`);let S=gt(l),p={accessKeyId:r.AccessKeyId,secretAccessKey:r.SecretAccessKey,sessionToken:r.SessionToken,expiration:r.Expiration,...r.CredentialScope&&{credentialScope:r.CredentialScope},...S&&{accountId:S}};return ie(p,"CREDENTIALS_STS_ASSUME_ROLE","i"),p}},Kn=(e,t)=>{let s;return async(i)=>{if(!s){let{logger:S=e?.parentClientConfig?.logger,profile:p=e?.parentClientConfig?.profile,region:A,requestHandler:_=e?.parentClientConfig?.requestHandler,credentialProviderLogger:v,userAgentAppId:P=e?.parentClientConfig?.userAgentAppId}=e,O=await ht(A,e?.parentClientConfig?.region,v,{logger:S,profile:p}),y=!mt(_);s=new t({...e,userAgentAppId:P,profile:p,region:O,requestHandler:y?_:void 0,logger:S})}let{Credentials:n,AssumedRoleUser:c}=await s.send(new te(i));if(!n||!n.AccessKeyId||!n.SecretAccessKey)throw Error(`Invalid response from STS.assumeRoleWithWebIdentity call with role ${i.RoleArn}`);let r=gt(c),l={accessKeyId:n.AccessKeyId,secretAccessKey:n.SecretAccessKey,sessionToken:n.SessionToken,expiration:n.Expiration,...n.CredentialScope&&{credentialScope:n.CredentialScope},...r&&{accountId:r}};if(r)ie(l,"RESOLVED_ACCOUNT_ID","T");return ie(l,"CREDENTIALS_STS_ASSUME_ROLE_WEB_ID","k"),l}},mt=(e)=>e?.metadata?.handlerProtocol==="h2",Pt=(e,t)=>{if(!t)return e;else return class extends e{constructor(i){super(i);for(let n of t)this.middlewareStack.use(n)}}},ft=(e={},t)=>Ln(e,Pt(M,t)),St=(e={},t)=>Kn(e,Pt(M,t)),Mn=(e)=>(t)=>e({roleAssumer:ft(t),roleAssumerWithWebIdentity:St(t),...t});var Vn=ct,zn=Z,Bn=et,Qn=tt,Yn=ut,Xn=te,Jn=st,Zn=nt,eo=le,to=ge,so=j,no=Ve,oo=J,ro=ze,io=Y,ao=Be,co=X,uo=Qe,lo=z,po=Ye,go=B,ho=Xe,mo=ot,Po=rt,fo=Q,So=Je,Ao=he,Eo=M,vo=g,yo=Ge,Io=it,Ro=Mn,_o=Ze,Co=ft,xo=St;export{jn as $Command,Gn as __Client,Vn as AssumeRole$,zn as AssumeRoleCommand,Bn as AssumeRoleRequest$,Qn as AssumeRoleResponse$,Yn as AssumeRoleWithWebIdentity$,Xn as AssumeRoleWithWebIdentityCommand,Jn as AssumeRoleWithWebIdentityRequest$,Zn as AssumeRoleWithWebIdentityResponse$,eo as AssumedRoleUser$,to as Credentials$,so as ExpiredTokenException,no as ExpiredTokenException$,oo as IDPCommunicationErrorException,ro as IDPCommunicationErrorException$,io as IDPRejectedClaimException,ao as IDPRejectedClaimException$,co as InvalidIdentityTokenException,uo as InvalidIdentityTokenException$,lo as MalformedPolicyDocumentException,po as MalformedPolicyDocumentException$,go as PackedPolicyTooLargeException,ho as PackedPolicyTooLargeException$,mo as PolicyDescriptorType$,Po as ProvidedContext$,fo as RegionDisabledException,So as RegionDisabledException$,Ao as STS,Eo as STSClient,vo as STSServiceException,yo as STSServiceException$,Io as Tag$,Ro as decorateDefaultCredentialProvider,_o as errorTypeRegistries,Co as getDefaultRoleAssumer,xo as getDefaultRoleAssumerWithWebIdentity};
|
|
2
|
+
import{G,E,m,N,C,V,h,q,H,f,we,pe,K,ee}from"./shumai-agent-app.js";var{awsEndpointFunctions:At,emitWarningIfUnsupportedVersion:Et,createDefaultUserAgentProvider:vt,NODE_APP_ID_CONFIG_OPTIONS:yt,getAwsRegionExtensionConfiguration:It,resolveAwsRegionExtensionConfiguration:Rt,resolveUserAgentConfig:_t,resolveHostHeaderConfig:Ct,getUserAgentPlugin:xt,getHostHeaderPlugin:wt,getLoggerPlugin:Tt,getRecursionDetectionPlugin:Dt,setCredentialFeature:ie,stsRegionDefaultResolver:bt}=f(),{NoAuthSigner:Re,getHttpAuthSchemeEndpointRuleSetPlugin:$t,DefaultIdentityProviderConfig:kt,getHttpSigningPlugin:Ot}=H(),{normalizeProvider:_e,getSmithyContext:Ce,ServiceException:Nt,NoOpLogger:Wt,emitWarningIfUnsupportedVersion:Ht,loadConfigsForDefaultMode:Ut,getDefaultExtensionConfiguration:qt,resolveDefaultRuntimeConfig:Ft,Client:xe,makeBuilder:Lt,createAggregatedClient:Kt}=E(),{Command:Mt}=E();var jn=Mt,Gn=xe;var{resolveDefaultsModeConfig:jt,loadConfig:I,NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS:Gt,NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS:Vt,NODE_REGION_CONFIG_OPTIONS:zt,NODE_REGION_CONFIG_FILE_OPTIONS:Bt,resolveRegionConfig:Qt}=m(),{BinaryDecisionDiagram:Yt,EndpointCache:Xt,decideEndpoint:Jt,customEndpointFunctions:Zt,resolveParams:es,resolveEndpointConfig:ts,getEndpointPlugin:ss}=N(),{parseUrl:ns,getHttpHandlerExtensionConfiguration:os,resolveHttpHandlerRuntimeConfig:rs,getContentLengthPlugin:is}=h(),{DEFAULT_RETRY_MODE:as,NODE_RETRY_MODE_CONFIG_OPTIONS:cs,NODE_MAX_ATTEMPT_CONFIG_OPTIONS:us,resolveRetryConfig:ds,getRetryPlugin:ls}=q(),{TypeRegistry:Te,getSchemaSerdePlugin:ps}=G(),{resolveAwsSdkSigV4Config:gs,resolveAwsSdkSigV4AConfig:hs,AwsSdkSigV4Signer:De,AwsSdkSigV4ASigner:be,NODE_SIGV4A_CONFIG_OPTIONS:ms,NODE_AUTH_SCHEME_PREFERENCE_OPTIONS:Ps}=K(),{SignatureV4MultiRegion:$e}=we(),{toUtf8:fs,fromUtf8:Ss,toBase64:As,fromBase64:Es,calculateBodyLength:vs}=C(),{streamCollector:ys,NodeHttpHandler:Is}=ee(),{AwsQueryProtocol:Rs}=pe(),{Sha256:_s}=V(),U="ref",x=-1,F=!0,Pe="isSet",ke="PartitionResult",L="booleanEquals",u="stringEquals",oe="getAttr",fe="us-east-1",Se="sigv4",Ae="sts",Ee="https://sts.{Region}.{PartitionResult#dnsSuffix}",ve={[U]:"Endpoint"},d={[U]:"Region"},re={[U]:ke},W={},ye=[d],Ie={conditions:[[Pe,[ve]],[Pe,ye],["aws.partition",ye,ke],[L,[{[U]:"UseFIPS"},F]],[L,[{[U]:"UseDualStack"},F]],[u,[d,"aws-global"]],[L,[{[U]:"UseGlobalEndpoint"},F]],[u,[d,"eu-central-1"]],[L,[{fn:oe,argv:[re,"supportsDualStack"]},F]],[L,[{fn:oe,argv:[re,"supportsFIPS"]},F]],[u,[d,"ap-south-1"]],[u,[d,"eu-north-1"]],[u,[d,"eu-west-1"]],[u,[d,"eu-west-2"]],[u,[d,"eu-west-3"]],[u,[d,"sa-east-1"]],[u,[d,fe]],[u,[d,"us-east-2"]],[u,[d,"us-west-2"]],[u,[d,"us-west-1"]],[u,[d,"ca-central-1"]],[u,[d,"ap-southeast-1"]],[u,[d,"ap-northeast-1"]],[u,[d,"ap-southeast-2"]],[u,[{fn:oe,argv:[re,"name"]},"aws-us-gov"]]],results:[[x],["https://sts.amazonaws.com",{authSchemes:[{name:Se,signingName:Ae,signingRegion:fe}]}],[Ee,{authSchemes:[{name:Se,signingName:Ae,signingRegion:"{Region}"}]}],[x,"Invalid Configuration: FIPS and custom endpoint are not supported"],[x,"Invalid Configuration: Dualstack and custom endpoint are not supported"],[ve,W],["https://sts-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",W],[x,"FIPS and DualStack are enabled, but this partition does not support one or both"],["https://sts.{Region}.amazonaws.com",W],["https://sts-fips.{Region}.{PartitionResult#dnsSuffix}",W],[x,"FIPS is enabled but this partition does not support FIPS"],["https://sts.{Region}.{PartitionResult#dualStackDnsSuffix}",W],[x,"DualStack is enabled but this partition does not support DualStack"],[Ee,W],[x,"Invalid Configuration: Missing Region"]]},Cs=2,o=1e8,xs=new Int32Array([-1,1,-1,0,30,3,1,4,o+14,2,5,o+14,3,25,6,4,24,7,5,o+1,8,6,9,o+13,7,o+1,10,10,o+1,11,11,o+1,12,12,o+1,13,13,o+1,14,14,o+1,15,15,o+1,16,16,o+1,17,17,o+1,18,18,o+1,19,19,o+1,20,20,o+1,21,21,o+1,22,22,o+1,23,23,o+1,o+2,8,o+11,o+12,4,28,26,9,27,o+10,24,o+8,o+9,8,29,o+7,9,o+6,o+7,3,o+3,31,4,o+4,o+5]),ws=Yt.from(xs,Cs,Ie.conditions,Ie.results),Ts=new Xt({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS","UseGlobalEndpoint"]}),Oe=(e,t={})=>Ts.get(e,()=>Jt(ws,{endpointParams:e,logger:t.logger}));Zt.aws=At;var Ds=(e)=>async(t,s,i)=>{if(!i)throw Error("Could not find `input` for `defaultEndpointRuleSetHttpAuthSchemeParametersProvider`");let n=await e(t,s,i),c=Ce(s)?.commandInstance?.constructor?.getEndpointParameterInstructions;if(!c)throw Error(`getEndpointParameterInstructions() is not defined on '${s.commandName}'`);let r=await es(i,{getEndpointParameterInstructions:c},t);return Object.assign(n,r)},bs=async(e,t,s)=>({operation:Ce(t).operation,region:await _e(e.region)()||(()=>{throw Error("expected `region` to be configured for `aws.auth#sigv4`")})()}),$s=Ds(bs);function Ne(e){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"sts",region:e.region},propertiesExtractor:(t,s)=>({signingProperties:{config:t,context:s}})}}function ae(e){return{schemeId:"aws.auth#sigv4a",signingProperties:{name:"sts",region:e.region},propertiesExtractor:(t,s)=>({signingProperties:{config:t,context:s}})}}function We(e){return{schemeId:"smithy.api#noAuth"}}var ks=(e,t,s)=>(n)=>{let r=e(n).properties?.authSchemes;if(!r)return t(n);let l=[];for(let S of r){let{name:p,properties:A={},..._}=S,v=p.toLowerCase();if(p!==v)console.warn(`HttpAuthScheme has been normalized with lowercasing: '${p}' to '${v}'`);let P;if(v==="sigv4a"){P="aws.auth#sigv4a";let se=r.find((ne)=>{let me=ne.name.toLowerCase();return me!=="sigv4a"&&me.startsWith("sigv4")});if($e.sigv4aDependency()==="none"&&se)continue}else if(v.startsWith("sigv4"))P="aws.auth#sigv4";else throw Error(`Unknown HttpAuthScheme found in '@smithy.rules#endpointRuleSet': '${v}'`);let O=s[P];if(!O)throw Error(`Could not find HttpAuthOption create function for '${P}'`);let y=O(n);y.schemeId=P,y.signingProperties={...y.signingProperties||{},..._,...A},l.push(y)}return l},Os=(e)=>{let t=[];switch(e.operation){case"AssumeRoleWithWebIdentity":{t.push(We()),t.push(ae(e));break}default:t.push(Ne(e)),t.push(ae(e))}return t},Ns=ks(Oe,Os,{"aws.auth#sigv4":Ne,"aws.auth#sigv4a":ae,"smithy.api#noAuth":We}),Ws=(e)=>{let t=gs(e),s=hs(t);return Object.assign(s,{authSchemePreference:_e(e.authSchemePreference??[])})},Hs=(e)=>Object.assign(e,{useDualstackEndpoint:e.useDualstackEndpoint??!1,useFipsEndpoint:e.useFipsEndpoint??!1,useGlobalEndpoint:e.useGlobalEndpoint??!1,defaultSigningName:"sts"}),Us={UseGlobalEndpoint:{type:"builtInParams",name:"useGlobalEndpoint"},UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}},qs="3.997.43",Fs={version:qs};class g extends Nt{constructor(e){super(e);Object.setPrototypeOf(this,g.prototype)}}class j extends g{name="ExpiredTokenException";$fault="client";constructor(e){super({name:"ExpiredTokenException",$fault:"client",...e});Object.setPrototypeOf(this,j.prototype)}}class z extends g{name="MalformedPolicyDocumentException";$fault="client";constructor(e){super({name:"MalformedPolicyDocumentException",$fault:"client",...e});Object.setPrototypeOf(this,z.prototype)}}class B extends g{name="PackedPolicyTooLargeException";$fault="client";constructor(e){super({name:"PackedPolicyTooLargeException",$fault:"client",...e});Object.setPrototypeOf(this,B.prototype)}}class Q extends g{name="RegionDisabledException";$fault="client";constructor(e){super({name:"RegionDisabledException",$fault:"client",...e});Object.setPrototypeOf(this,Q.prototype)}}class Y extends g{name="IDPRejectedClaimException";$fault="client";constructor(e){super({name:"IDPRejectedClaimException",$fault:"client",...e});Object.setPrototypeOf(this,Y.prototype)}}class X extends g{name="InvalidIdentityTokenException";$fault="client";constructor(e){super({name:"InvalidIdentityTokenException",$fault:"client",...e});Object.setPrototypeOf(this,X.prototype)}}class J extends g{name="IDPCommunicationErrorException";$fault="client";$retryable={};constructor(e){super({name:"IDPCommunicationErrorException",$fault:"client",...e});Object.setPrototypeOf(this,J.prototype)}}var Ls="Arn",Ks="AccessKeyId",Ms="AssumeRole",js="AssumedRoleId",Gs="AssumeRoleRequest",Vs="AssumeRoleResponse",ce="AssumedRoleUser",zs="AssumeRoleWithWebIdentity",Bs="AssumeRoleWithWebIdentityRequest",Qs="AssumeRoleWithWebIdentityResponse",Ys="Audience",ue="Credentials",Xs="ContextAssertion",He="DurationSeconds",Js="Expiration",Zs="ExternalId",en="ExpiredTokenException",tn="IDPCommunicationErrorException",sn="IDPRejectedClaimException",nn="InvalidIdentityTokenException",on="Key",rn="MalformedPolicyDocumentException",Ue="Policy",qe="PolicyArns",an="ProviderArn",cn="ProvidedContexts",un="ProvidedContextsListType",dn="ProvidedContext",ln="PolicyDescriptorType",pn="ProviderId",Fe="PackedPolicySize",gn="PackedPolicyTooLargeException",hn="Provider",Le="RoleArn",mn="RegionDisabledException",Ke="RoleSessionName",Pn="SecretAccessKey",fn="SubjectFromWebIdentityToken",de="SourceIdentity",Sn="SerialNumber",An="SessionToken",En="Tags",vn="TokenCode",yn="TransitiveTagKeys",In="Tag",Rn="Value",_n="WebIdentityToken",Cn="arn",xn="accessKeySecretType",w="awsQueryError",T="client",wn="clientTokenType",D="error",b="httpError",k="message",Tn="policyDescriptorListType",Me="smithy.ts.sdk.synthetic.com.amazonaws.sts",Dn="tagListType",a="com.amazonaws.sts",je=Te.for(Me),Ge=[-3,Me,"STSServiceException",0,[],[]];je.registerError(Ge,g);var R=Te.for(a),Ve=[-3,a,en,{[w]:["ExpiredTokenException",400],[D]:T,[b]:400},[k],[0]];R.registerError(Ve,j);var ze=[-3,a,tn,{[w]:["IDPCommunicationError",400],[D]:T,[b]:400},[k],[0]];R.registerError(ze,J);var Be=[-3,a,sn,{[w]:["IDPRejectedClaim",403],[D]:T,[b]:403},[k],[0]];R.registerError(Be,Y);var Qe=[-3,a,nn,{[w]:["InvalidIdentityToken",400],[D]:T,[b]:400},[k],[0]];R.registerError(Qe,X);var Ye=[-3,a,rn,{[w]:["MalformedPolicyDocument",400],[D]:T,[b]:400},[k],[0]];R.registerError(Ye,z);var Xe=[-3,a,gn,{[w]:["PackedPolicyTooLarge",400],[D]:T,[b]:400},[k],[0]];R.registerError(Xe,B);var Je=[-3,a,mn,{[w]:["RegionDisabledException",403],[D]:T,[b]:403},[k],[0]];R.registerError(Je,Q);var Ze=[je,R],bn=[0,a,xn,8,0],$n=[0,a,wn,8,0],le=[3,a,ce,0,[js,Ls],[0,0],2],et=[3,a,Gs,0,[Le,Ke,qe,Ue,He,En,yn,Zs,Sn,vn,de,cn],[0,0,()=>at,0,1,()=>On,64,0,0,0,0,()=>kn],2],tt=[3,a,Vs,0,[ue,ce,Fe,de],[[()=>ge,0],()=>le,1,0]],st=[3,a,Bs,0,[Le,Ke,_n,pn,qe,Ue,He],[0,0,[()=>$n,0],0,()=>at,0,1],3],nt=[3,a,Qs,0,[ue,fn,ce,Fe,hn,Ys,de],[[()=>ge,0],0,()=>le,1,0,0,0]],ge=[3,a,ue,0,[Ks,Pn,An,Js],[0,[()=>bn,0],0,4],4],ot=[3,a,ln,0,[Cn],[0]],rt=[3,a,dn,0,[an,Xs],[0,0]],it=[3,a,In,0,[on,Rn],[0,0],2],at=[1,a,Tn,0,()=>ot],kn=[1,a,un,0,()=>rt],On=[1,a,Dn,0,()=>it],ct=[9,a,Ms,0,()=>et,()=>tt],ut=[9,a,zs,0,()=>st,()=>nt],Nn=(e)=>({apiVersion:"2011-06-15",base64Decoder:e?.base64Decoder??Es,base64Encoder:e?.base64Encoder??As,disableHostPrefix:e?.disableHostPrefix??!1,endpointProvider:e?.endpointProvider??Oe,extensions:e?.extensions??[],httpAuthSchemeProvider:e?.httpAuthSchemeProvider??Ns,httpAuthSchemes:e?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:(t)=>t.getIdentityProvider("aws.auth#sigv4"),signer:new De},{schemeId:"aws.auth#sigv4a",identityProvider:(t)=>t.getIdentityProvider("aws.auth#sigv4a"),signer:new be},{schemeId:"smithy.api#noAuth",identityProvider:(t)=>t.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new Re}],logger:e?.logger??new Wt,protocol:e?.protocol??Rs,protocolSettings:e?.protocolSettings??{defaultNamespace:"com.amazonaws.sts",errorTypeRegistries:Ze,xmlNamespace:"https://sts.amazonaws.com/doc/2011-06-15/",version:"2011-06-15",serviceTarget:"AWSSecurityTokenServiceV20110615"},serviceId:e?.serviceId??"STS",sha256:e?.sha256??_s,signerConstructor:e?.signerConstructor??$e,urlParser:e?.urlParser??ns,utf8Decoder:e?.utf8Decoder??Ss,utf8Encoder:e?.utf8Encoder??fs}),Wn=(e)=>{Ht(process.version);let t=jt(e),s=()=>t().then(Ut),i=Nn(e);Et(process.version);let n={profile:e?.profile,logger:i.logger};return{...i,...e,runtime:"node",defaultsMode:t,authSchemePreference:e?.authSchemePreference??I(Ps,n),bodyLengthChecker:e?.bodyLengthChecker??vs,defaultUserAgentProvider:e?.defaultUserAgentProvider??vt({serviceId:i.serviceId,clientVersion:Fs.version}),httpAuthSchemes:e?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:(c)=>c.getIdentityProvider("aws.auth#sigv4")||(async(r)=>await e.credentialDefaultProvider(r?.__config||{})()),signer:new De},{schemeId:"aws.auth#sigv4a",identityProvider:(c)=>c.getIdentityProvider("aws.auth#sigv4a"),signer:new be},{schemeId:"smithy.api#noAuth",identityProvider:(c)=>c.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new Re}],maxAttempts:e?.maxAttempts??I(us,e),region:e?.region??I(zt,{...Bt,...n}),requestHandler:Is.create(e?.requestHandler??s),retryMode:e?.retryMode??I({...cs,default:async()=>(await s()).retryMode||as},e),sigv4aSigningRegionSet:e?.sigv4aSigningRegionSet??I(ms,n),streamCollector:e?.streamCollector??ys,useDualstackEndpoint:e?.useDualstackEndpoint??I(Vt,n),useFipsEndpoint:e?.useFipsEndpoint??I(Gt,n),userAgentAppId:e?.userAgentAppId??I(yt,n)}},Hn=(e)=>{let{httpAuthSchemes:t,httpAuthSchemeProvider:s,credentials:i}=e;return{setHttpAuthScheme(n){let c=t.findIndex((r)=>r.schemeId===n.schemeId);if(c===-1)t.push(n);else t.splice(c,1,n)},httpAuthSchemes(){return t},setHttpAuthSchemeProvider(n){s=n},httpAuthSchemeProvider(){return s},setCredentials(n){i=n},credentials(){return i}}},Un=(e)=>({httpAuthSchemes:e.httpAuthSchemes(),httpAuthSchemeProvider:e.httpAuthSchemeProvider(),credentials:e.credentials()}),qn=(e,t)=>{let s=Object.assign(It(e),qt(e),os(e),Hn(e));return t.forEach((i)=>i.configure(s)),Object.assign(e,Rt(s),Ft(s),rs(s),Un(s))};class M extends xe{config;constructor(...[e]){let t=Wn(e||{});super(t);this.initConfig=t;let s=Hs(t),i=_t(s),n=ds(i),c=Qt(n),r=Ct(c),l=ts(r),S=Ws(l),p=qn(S,e?.extensions||[]);this.config=p,this.middlewareStack.use(ps(this.config)),this.middlewareStack.use(xt(this.config)),this.middlewareStack.use(ls(this.config)),this.middlewareStack.use(is(this.config)),this.middlewareStack.use(wt(this.config)),this.middlewareStack.use(Tt(this.config)),this.middlewareStack.use(Dt(this.config)),this.middlewareStack.use($t(this.config,{httpAuthSchemeParametersProvider:$s,identityProviderConfigProvider:async(A)=>new kt({"aws.auth#sigv4":A.credentials,"aws.auth#sigv4a":A.credentials})})),this.middlewareStack.use(Ot(this.config))}destroy(){super.destroy()}}var dt=Lt(Us,"AWSSecurityTokenServiceV20110615","STSClient",ss),lt={},pt=(e,t,s,i)=>[];class Z extends dt(lt,pt,"AssumeRole",ct){}class te extends dt(lt,pt,"AssumeRoleWithWebIdentity",ut){}var Fn={AssumeRoleCommand:Z,AssumeRoleWithWebIdentityCommand:te};class he extends M{}Kt(Fn,he);var gt=(e)=>{if(typeof e?.Arn==="string"){let t=e.Arn.split(":");if(t.length>4&&t[4]!=="")return t[4]}return},ht=async(e,t,s,i={})=>{let n=typeof e==="function"?await e():e,c=typeof t==="function"?await t():t,r="",l=n??c??(r=await bt(i)());return s?.debug?.("@aws-sdk/client-sts::resolveRegion","accepting first of:",`${n} (credential provider clientConfig)`,`${c} (contextual client)`,`${r} (STS default: AWS_REGION, profile region, or us-east-1)`),l},Ln=(e,t)=>{let s,i;return async(n,c)=>{if(i=n,!s){let{logger:A=e?.parentClientConfig?.logger,profile:_=e?.parentClientConfig?.profile,region:v,requestHandler:P=e?.parentClientConfig?.requestHandler,credentialProviderLogger:O,userAgentAppId:y=e?.parentClientConfig?.userAgentAppId}=e,se=await ht(v,e?.parentClientConfig?.region,O,{logger:A,profile:_}),ne=!mt(P);s=new t({...e,userAgentAppId:y,profile:_,credentialDefaultProvider:()=>async()=>i,region:se,requestHandler:ne?P:void 0,logger:A})}let{Credentials:r,AssumedRoleUser:l}=await s.send(new Z(c));if(!r||!r.AccessKeyId||!r.SecretAccessKey)throw Error(`Invalid response from STS.assumeRole call with role ${c.RoleArn}`);let S=gt(l),p={accessKeyId:r.AccessKeyId,secretAccessKey:r.SecretAccessKey,sessionToken:r.SessionToken,expiration:r.Expiration,...r.CredentialScope&&{credentialScope:r.CredentialScope},...S&&{accountId:S}};return ie(p,"CREDENTIALS_STS_ASSUME_ROLE","i"),p}},Kn=(e,t)=>{let s;return async(i)=>{if(!s){let{logger:S=e?.parentClientConfig?.logger,profile:p=e?.parentClientConfig?.profile,region:A,requestHandler:_=e?.parentClientConfig?.requestHandler,credentialProviderLogger:v,userAgentAppId:P=e?.parentClientConfig?.userAgentAppId}=e,O=await ht(A,e?.parentClientConfig?.region,v,{logger:S,profile:p}),y=!mt(_);s=new t({...e,userAgentAppId:P,profile:p,region:O,requestHandler:y?_:void 0,logger:S})}let{Credentials:n,AssumedRoleUser:c}=await s.send(new te(i));if(!n||!n.AccessKeyId||!n.SecretAccessKey)throw Error(`Invalid response from STS.assumeRoleWithWebIdentity call with role ${i.RoleArn}`);let r=gt(c),l={accessKeyId:n.AccessKeyId,secretAccessKey:n.SecretAccessKey,sessionToken:n.SessionToken,expiration:n.Expiration,...n.CredentialScope&&{credentialScope:n.CredentialScope},...r&&{accountId:r}};if(r)ie(l,"RESOLVED_ACCOUNT_ID","T");return ie(l,"CREDENTIALS_STS_ASSUME_ROLE_WEB_ID","k"),l}},mt=(e)=>e?.metadata?.handlerProtocol==="h2",Pt=(e,t)=>{if(!t)return e;else return class extends e{constructor(i){super(i);for(let n of t)this.middlewareStack.use(n)}}},ft=(e={},t)=>Ln(e,Pt(M,t)),St=(e={},t)=>Kn(e,Pt(M,t)),Mn=(e)=>(t)=>e({roleAssumer:ft(t),roleAssumerWithWebIdentity:St(t),...t});var Vn=ct,zn=Z,Bn=et,Qn=tt,Yn=ut,Xn=te,Jn=st,Zn=nt,eo=le,to=ge,so=j,no=Ve,oo=J,ro=ze,io=Y,ao=Be,co=X,uo=Qe,lo=z,po=Ye,go=B,ho=Xe,mo=ot,Po=rt,fo=Q,So=Je,Ao=he,Eo=M,vo=g,yo=Ge,Io=it,Ro=Mn,_o=Ze,Co=ft,xo=St;export{jn as $Command,Gn as __Client,Vn as AssumeRole$,zn as AssumeRoleCommand,Bn as AssumeRoleRequest$,Qn as AssumeRoleResponse$,Yn as AssumeRoleWithWebIdentity$,Xn as AssumeRoleWithWebIdentityCommand,Jn as AssumeRoleWithWebIdentityRequest$,Zn as AssumeRoleWithWebIdentityResponse$,eo as AssumedRoleUser$,to as Credentials$,so as ExpiredTokenException,no as ExpiredTokenException$,oo as IDPCommunicationErrorException,ro as IDPCommunicationErrorException$,io as IDPRejectedClaimException,ao as IDPRejectedClaimException$,co as InvalidIdentityTokenException,uo as InvalidIdentityTokenException$,lo as MalformedPolicyDocumentException,po as MalformedPolicyDocumentException$,go as PackedPolicyTooLargeException,ho as PackedPolicyTooLargeException$,mo as PolicyDescriptorType$,Po as ProvidedContext$,fo as RegionDisabledException,So as RegionDisabledException$,Ao as STS,Eo as STSClient,vo as STSServiceException,yo as STSServiceException$,Io as Tag$,Ro as decorateDefaultCredentialProvider,_o as errorTypeRegistries,Co as getDefaultRoleAssumer,xo as getDefaultRoleAssumerWithWebIdentity};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
function U(n){let e={};for(let[t,r]of n.entries())e[t]=r;return e}function
|
|
3
|
-
export{U,
|
|
2
|
+
function U(n){let e={};for(let[t,r]of n.entries())e[t]=r;return e}function Ce(n){if(!n)return;let e={};for(let[t,r]of Object.entries(n))if(r!==null)e[t]=r;return Object.keys(e).length>0?e:void 0}
|
|
3
|
+
export{U,Ce};
|