gemi 0.54.3 → 0.55.0
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/app/index.js +2 -2
- package/dist/app/index.js.map +1 -1
- package/dist/broadcasting/index.js +1 -1
- package/dist/bun/plugin.js +2 -2
- package/dist/bun/plugin.js.map +1 -1
- package/dist/bun/preload.js +2 -2
- package/dist/bun/preload.js.map +2 -2
- package/dist/{chunk-0weeq0ke.js → chunk-01am9k5v.js} +2 -2
- package/dist/{chunk-0weeq0ke.js.map → chunk-01am9k5v.js.map} +1 -1
- package/dist/chunk-02gdzs5t.js +4 -0
- package/dist/{chunk-4qkzdyj7.js.map → chunk-02gdzs5t.js.map} +1 -1
- package/dist/{chunk-71m47kad.js → chunk-1pwwrpa3.js} +2 -2
- package/dist/{chunk-71m47kad.js.map → chunk-1pwwrpa3.js.map} +2 -2
- package/dist/{chunk-h7mcwfg5.js → chunk-1zfsgffv.js} +4 -4
- package/dist/{chunk-h7mcwfg5.js.map → chunk-1zfsgffv.js.map} +2 -2
- package/dist/{chunk-kz39hphm.js → chunk-31kcf7dq.js} +3 -3
- package/dist/{chunk-kz39hphm.js.map → chunk-31kcf7dq.js.map} +1 -1
- package/dist/chunk-33wjsw4r.js +66 -0
- package/dist/{chunk-tpyhhdq5.js.map → chunk-33wjsw4r.js.map} +4 -54
- package/dist/{chunk-50vm7x98.js → chunk-3e88tyee.js} +3 -3
- package/dist/{chunk-50vm7x98.js.map → chunk-3e88tyee.js.map} +1 -1
- package/dist/{chunk-xxw0gz4q.js → chunk-3y75q5a2.js} +2 -2
- package/dist/{chunk-xxw0gz4q.js.map → chunk-3y75q5a2.js.map} +1 -1
- package/dist/chunk-4qwwy968.js +4 -0
- package/dist/{chunk-1snh7yc4.js.map → chunk-4qwwy968.js.map} +2 -2
- package/dist/{chunk-1sh6kqjn.js → chunk-4t80js0n.js} +3 -3
- package/dist/{chunk-1sh6kqjn.js.map → chunk-4t80js0n.js.map} +1 -1
- package/dist/chunk-4xx78ba9.js +4 -0
- package/dist/{chunk-r9z5rrk0.js.map → chunk-4xx78ba9.js.map} +2 -2
- package/dist/{chunk-g5tj10p8.js → chunk-4yafsffx.js} +2 -2
- package/dist/{chunk-g5tj10p8.js.map → chunk-4yafsffx.js.map} +1 -1
- package/dist/{chunk-gn9zjgep.js → chunk-5ad8era8.js} +2 -2
- package/dist/{chunk-gn9zjgep.js.map → chunk-5ad8era8.js.map} +1 -1
- package/dist/{chunk-3bw1jk21.js → chunk-62723jyy.js} +1 -1
- package/dist/chunk-62ke19q4.js +13 -0
- package/dist/chunk-62ke19q4.js.map +222 -0
- package/dist/{chunk-004bcmsa.js → chunk-64s1pzz1.js} +2 -2
- package/dist/{chunk-004bcmsa.js.map → chunk-64s1pzz1.js.map} +1 -1
- package/dist/{chunk-dwx2y7br.js → chunk-699z6d8y.js} +4 -4
- package/dist/{chunk-dwx2y7br.js.map → chunk-699z6d8y.js.map} +2 -2
- package/dist/{chunk-4zmcbmf9.js → chunk-77xj0dgc.js} +2 -2
- package/dist/{chunk-4zmcbmf9.js.map → chunk-77xj0dgc.js.map} +1 -1
- package/dist/{chunk-bb3zvxsf.js → chunk-8k1zqrvh.js} +3 -3
- package/dist/{chunk-bb3zvxsf.js.map → chunk-8k1zqrvh.js.map} +1 -1
- package/dist/{chunk-9nskvzpv.js → chunk-98a576s9.js} +3 -3
- package/dist/{chunk-9nskvzpv.js.map → chunk-98a576s9.js.map} +1 -1
- package/dist/{chunk-cz3szqhq.js → chunk-9c89q2mz.js} +3 -3
- package/dist/{chunk-cz3szqhq.js.map → chunk-9c89q2mz.js.map} +1 -1
- package/dist/chunk-9r0sb4zn.js +5 -0
- package/dist/{chunk-efsk1wy0.js.map → chunk-9r0sb4zn.js.map} +2 -2
- package/dist/chunk-9r1atj8w.js +6 -0
- package/dist/{chunk-p8fm3tjy.js.map → chunk-9r1atj8w.js.map} +2 -2
- package/dist/chunk-b50zmz3t.js +5 -0
- package/dist/{chunk-113khwbw.js.map → chunk-b50zmz3t.js.map} +1 -1
- package/dist/chunk-cn2r5jfj.js +5 -0
- package/dist/{chunk-dxw8k6f1.js.map → chunk-cn2r5jfj.js.map} +2 -2
- package/dist/{chunk-nncwsdzz.js → chunk-ct274qts.js} +2 -2
- package/dist/{chunk-nncwsdzz.js.map → chunk-ct274qts.js.map} +1 -1
- package/dist/{chunk-jp4pf3yt.js → chunk-d36dfqxw.js} +4 -4
- package/dist/{chunk-jp4pf3yt.js.map → chunk-d36dfqxw.js.map} +2 -2
- package/dist/chunk-dzzmqv0j.js +5 -0
- package/dist/{chunk-f13f68c0.js.map → chunk-dzzmqv0j.js.map} +2 -2
- package/dist/{chunk-f418jh9k.js → chunk-ejrcyzx8.js} +2 -2
- package/dist/{chunk-f418jh9k.js.map → chunk-ejrcyzx8.js.map} +1 -1
- package/dist/chunk-enhkf60v.js +9 -0
- package/dist/chunk-enhkf60v.js.map +12 -0
- package/dist/{chunk-n1tkn8gv.js → chunk-eqrd31ye.js} +2 -2
- package/dist/{chunk-n1tkn8gv.js.map → chunk-eqrd31ye.js.map} +1 -1
- package/dist/{chunk-k14dmqwh.js → chunk-f9mfw82d.js} +3 -3
- package/dist/{chunk-k14dmqwh.js.map → chunk-f9mfw82d.js.map} +1 -1
- package/dist/{chunk-kv2ep453.js → chunk-g30q4n5y.js} +18 -19
- package/dist/{chunk-kv2ep453.js.map → chunk-g30q4n5y.js.map} +4 -8
- package/dist/chunk-gasdfwva.js +4 -0
- package/dist/{chunk-c0wcsmpj.js.map → chunk-gasdfwva.js.map} +2 -2
- package/dist/{chunk-c22vcxty.js → chunk-gzdf2025.js} +2 -2
- package/dist/{chunk-c22vcxty.js.map → chunk-gzdf2025.js.map} +2 -2
- package/dist/{chunk-ms8qd7da.js → chunk-h3mwgbg7.js} +3 -3
- package/dist/{chunk-ms8qd7da.js.map → chunk-h3mwgbg7.js.map} +1 -1
- package/dist/{chunk-6j1z2cqt.js → chunk-hs5v3eqj.js} +2 -2
- package/dist/{chunk-6j1z2cqt.js.map → chunk-hs5v3eqj.js.map} +1 -1
- package/dist/chunk-javjeayw.js +5 -0
- package/dist/{chunk-jdgvdddd.js.map → chunk-javjeayw.js.map} +2 -2
- package/dist/chunk-jdj7k3r9.js +4 -0
- package/dist/{chunk-hk067634.js.map → chunk-jdj7k3r9.js.map} +2 -2
- package/dist/chunk-kgg1eqne.js +4 -0
- package/dist/{chunk-hrrmxreg.js.map → chunk-kgg1eqne.js.map} +2 -2
- package/dist/{chunk-7f5ad759.js → chunk-kgmr9qxx.js} +2 -2
- package/dist/{chunk-7f5ad759.js.map → chunk-kgmr9qxx.js.map} +1 -1
- package/dist/{chunk-pgjk5ft3.js → chunk-kry5vwam.js} +3 -3
- package/dist/{chunk-pgjk5ft3.js.map → chunk-kry5vwam.js.map} +1 -1
- package/dist/{chunk-r06rxn19.js → chunk-m0ggfy1m.js} +3 -3
- package/dist/{chunk-r06rxn19.js.map → chunk-m0ggfy1m.js.map} +1 -1
- package/dist/{chunk-bzhtymvv.js → chunk-npg72mez.js} +2 -2
- package/dist/{chunk-bzhtymvv.js.map → chunk-npg72mez.js.map} +1 -1
- package/dist/chunk-pvdbrt4z.js +5 -0
- package/dist/chunk-pvdbrt4z.js.map +13 -0
- package/dist/{chunk-e3mggavt.js → chunk-q0waxxz5.js} +2 -2
- package/dist/{chunk-e3mggavt.js.map → chunk-q0waxxz5.js.map} +1 -1
- package/dist/chunk-rgb69nh1.js +4 -0
- package/dist/{chunk-s6e7cvek.js.map → chunk-rgb69nh1.js.map} +2 -2
- package/dist/{chunk-jjvnmyw4.js → chunk-rjxdc0xh.js} +2 -2
- package/dist/{chunk-jjvnmyw4.js.map → chunk-rjxdc0xh.js.map} +2 -2
- package/dist/{chunk-sqp7kn7h.js → chunk-rsdg619q.js} +3 -3
- package/dist/{chunk-sqp7kn7h.js.map → chunk-rsdg619q.js.map} +1 -1
- package/dist/chunk-tja0c815.js +5 -0
- package/dist/{chunk-2pt6kyn9.js.map → chunk-tja0c815.js.map} +2 -2
- package/dist/{chunk-agabw2w1.js → chunk-tkdxv6cq.js} +2 -2
- package/dist/{chunk-agabw2w1.js.map → chunk-tkdxv6cq.js.map} +1 -1
- package/dist/chunk-tmnhkphv.js +19 -0
- package/dist/chunk-tmnhkphv.js.map +60 -0
- package/dist/{chunk-w6gb9gc5.js → chunk-v06qcyj5.js} +3 -3
- package/dist/{chunk-w6gb9gc5.js.map → chunk-v06qcyj5.js.map} +1 -1
- package/dist/{chunk-9taz1h3t.js → chunk-v6v6sem5.js} +3 -3
- package/dist/{chunk-9taz1h3t.js.map → chunk-v6v6sem5.js.map} +1 -1
- package/dist/{chunk-f4e7fh95.js → chunk-v7y8zm61.js} +3 -3
- package/dist/{chunk-f4e7fh95.js.map → chunk-v7y8zm61.js.map} +2 -2
- package/dist/{chunk-85av4ncy.js → chunk-vkngcrzq.js} +2 -2
- package/dist/{chunk-85av4ncy.js.map → chunk-vkngcrzq.js.map} +1 -1
- package/dist/chunk-w9k9s4wh.js +4 -0
- package/dist/{chunk-jb2nst6v.js.map → chunk-w9k9s4wh.js.map} +2 -2
- package/dist/chunk-wgpa04jb.js +5 -0
- package/dist/{chunk-6rhebm18.js.map → chunk-wgpa04jb.js.map} +2 -2
- package/dist/chunk-x14sk95v.js +9 -0
- package/dist/{chunk-k8endm5j.js.map → chunk-x14sk95v.js.map} +6 -6
- package/dist/chunk-xjy5apyr.js +4 -0
- package/dist/{chunk-07t0dmdg.js.map → chunk-xjy5apyr.js.map} +2 -2
- package/dist/{chunk-fcqc3e3r.js → chunk-xnytbrda.js} +2 -2
- package/dist/{chunk-fcqc3e3r.js.map → chunk-xnytbrda.js.map} +1 -1
- package/dist/chunk-y9fp58bg.js +4 -0
- package/dist/{chunk-br8ten26.js.map → chunk-y9fp58bg.js.map} +2 -2
- package/dist/{chunk-jb022m7n.js → chunk-yf8kxjr2.js} +2 -2
- package/dist/{chunk-jb022m7n.js.map → chunk-yf8kxjr2.js.map} +1 -1
- package/dist/config/index.js +1 -1
- package/dist/console/run.js +2 -2
- package/dist/console/run.js.map +1 -1
- package/dist/container/index.js +2 -2
- package/dist/container/index.js.map +1 -1
- package/dist/database/DatabaseManager.d.ts.map +1 -1
- package/dist/database/index.js +2 -2
- package/dist/database/index.js.map +1 -1
- package/dist/email/index.js +2 -2
- package/dist/email/index.js.map +1 -1
- package/dist/facades/Storage.d.ts +1 -1
- package/dist/facades/Storage.d.ts.map +1 -1
- package/dist/facades/index.js +2 -2
- package/dist/facades/index.js.map +1 -1
- package/dist/foundation/index.js +2 -2
- package/dist/foundation/index.js.map +1 -1
- package/dist/http/index.js +2 -2
- package/dist/http/index.js.map +1 -1
- package/dist/i18n/dictionaryRuntime.js +2 -2
- package/dist/i18n/dictionaryRuntime.js.map +1 -1
- package/dist/i18n/index.js +2 -2
- package/dist/i18n/index.js.map +2 -2
- package/dist/kernel/index.js +2 -2
- package/dist/kernel/index.js.map +2 -2
- package/dist/orm/compile/relation-count.d.ts.map +1 -1
- package/dist/orm/corpus.d.ts.map +1 -1
- package/dist/orm/dialect/index.d.ts +32 -1
- package/dist/orm/dialect/index.d.ts.map +1 -1
- package/dist/orm/dialect/postgres.d.ts +14 -0
- package/dist/orm/dialect/postgres.d.ts.map +1 -1
- package/dist/orm/dialect/sqlite.d.ts +31 -0
- package/dist/orm/dialect/sqlite.d.ts.map +1 -1
- package/dist/orm/index.js +3 -3
- package/dist/orm/index.js.map +5 -5
- package/dist/orm/policy.d.ts.map +1 -1
- package/dist/orm/relation-filters.d.ts +24 -0
- package/dist/orm/relation-filters.d.ts.map +1 -1
- package/dist/orm/types.d.ts +129 -40
- package/dist/orm/types.d.ts.map +1 -1
- package/dist/server/index.js +2 -2
- package/dist/server/index.js.map +2 -2
- package/dist/services/email/drivers/ResendDriver.d.ts.map +1 -1
- package/dist/services/file-storage/drivers/S3Driver.d.ts +24 -1
- package/dist/services/file-storage/drivers/S3Driver.d.ts.map +1 -1
- package/dist/services/image-optimization/drivers/SharpDriver.d.ts.map +1 -1
- package/dist/services/index.js +9 -18
- package/dist/services/index.js.map +5 -99
- package/dist/services/rate-limiter/drivers/RedisRateLimiterDriver.d.ts.map +1 -1
- package/dist/services/redis/RedisManager.d.ts +19 -2
- package/dist/services/redis/RedisManager.d.ts.map +1 -1
- package/dist/services/router/ViewRouteDispatcher.d.ts.map +1 -1
- package/dist/support/index.js +2 -2
- package/dist/support/index.js.map +1 -1
- package/dist/support/sharp.d.ts +21 -0
- package/dist/support/sharp.d.ts.map +1 -0
- package/package.json +1 -1
- package/dist/chunk-07t0dmdg.js +0 -4
- package/dist/chunk-113khwbw.js +0 -5
- package/dist/chunk-1snh7yc4.js +0 -4
- package/dist/chunk-2pt6kyn9.js +0 -5
- package/dist/chunk-4qkzdyj7.js +0 -4
- package/dist/chunk-6rhebm18.js +0 -5
- package/dist/chunk-br8ten26.js +0 -4
- package/dist/chunk-c0wcsmpj.js +0 -4
- package/dist/chunk-dxw8k6f1.js +0 -5
- package/dist/chunk-efsk1wy0.js +0 -5
- package/dist/chunk-f13f68c0.js +0 -5
- package/dist/chunk-hk067634.js +0 -4
- package/dist/chunk-hrrmxreg.js +0 -4
- package/dist/chunk-jb2nst6v.js +0 -4
- package/dist/chunk-jdgvdddd.js +0 -5
- package/dist/chunk-k8endm5j.js +0 -9
- package/dist/chunk-p8fm3tjy.js +0 -6
- package/dist/chunk-r9z5rrk0.js +0 -4
- package/dist/chunk-s6e7cvek.js +0 -4
- package/dist/chunk-tpyhhdq5.js +0 -81
- package/dist/chunk-zckj6bs6.js +0 -9
- package/dist/chunk-zckj6bs6.js.map +0 -12
- /package/dist/{chunk-3bw1jk21.js.map → chunk-62723jyy.js.map} +0 -0
package/dist/chunk-s6e7cvek.js
DELETED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{Ga as ue}from"./chunk-efsk1wy0.js";import{Ia as _}from"./chunk-f13f68c0.js";import"./chunk-r06rxn19.js";import{Ka as w}from"./chunk-50vm7x98.js";import{La as l}from"./chunk-ms8qd7da.js";import{df as o,hf as d}from"./chunk-7f5ad759.js";var g=o(_(),1);var ie=o(l(),1);var O=o(w(),1),R=o(l(),1),J=o(_(),1);var j=o(w(),1),E=o(l(),1),U=(e,s,t)=>{let n={EcsContainer:async(r)=>{let{fromHttp:a}=await import("./chunk-c22vcxty.js"),{fromContainerMetadata:c}=await import("./chunk-jdgvdddd.js");return t?.debug("@aws-sdk/credential-provider-ini - credential_source is EcsContainer"),async()=>E.chain(a(r??{}),c(r))().then(L)},Ec2InstanceMetadata:async(r)=>{t?.debug("@aws-sdk/credential-provider-ini - credential_source is Ec2InstanceMetadata");let{fromInstanceMetadata:a}=await import("./chunk-jdgvdddd.js");return async()=>a(r)().then(L)},Environment:async(r)=>{t?.debug("@aws-sdk/credential-provider-ini - credential_source is Environment");let{fromEnv:a}=await import("./chunk-4qkzdyj7.js");return async()=>a(r)().then(L)}};if(e in n)return n[e];else throw new E.CredentialsProviderError(`Unsupported credential source in profile ${s}. Got ${e}, expected EcsContainer or Ec2InstanceMetadata or Environment.`,{logger:t})},L=(e)=>j.setCredentialFeature(e,"CREDENTIALS_PROFILE_NAMED_PROVIDER","p");var N=(e,{profile:s="default",logger:t}={})=>{return Boolean(e)&&typeof e==="object"&&typeof e.role_arn==="string"&&["undefined","string"].indexOf(typeof e.role_session_name)>-1&&["undefined","string"].indexOf(typeof e.external_id)>-1&&["undefined","string"].indexOf(typeof e.mfa_serial)>-1&&(he(e,{profile:s,logger:t})||ye(e,{profile:s,logger:t}))},he=(e,{profile:s,logger:t})=>{let n=typeof e.source_profile==="string"&&typeof e.credential_source>"u";if(n)t?.debug?.(` ${s} isAssumeRoleWithSourceProfile source_profile=${e.source_profile}`);return n},ye=(e,{profile:s,logger:t})=>{let n=typeof e.credential_source==="string"&&typeof e.source_profile>"u";if(n)t?.debug?.(` ${s} isCredentialSourceProfile credential_source=${e.credential_source}`);return n},v=async(e,s,t,n,r={},a)=>{t.logger?.debug("@aws-sdk/credential-provider-ini - resolveAssumeRoleCredentials (STS)");let c=s[e],{source_profile:h,region:I}=c;if(!t.roleAssumer){let{getDefaultRoleAssumer:i}=await import("./chunk-07t0dmdg.js").then((m)=>o(m.default,1));t.roleAssumer=i({...t.clientConfig,credentialProviderLogger:t.logger,parentClientConfig:{...n,...t?.parentClientConfig,region:I??t?.parentClientConfig?.region??n?.region}},t.clientPlugins)}if(h&&h in r)throw new R.CredentialsProviderError(`Detected a cycle attempting to resolve credentials for profile ${J.getProfileName(t)}. Profiles visited: `+Object.keys(r).join(", "),{logger:t.logger});t.logger?.debug(`@aws-sdk/credential-provider-ini - finding credential resolver using ${h?`source_profile=[${h}]`:`profile=[${e}]`}`);let T=h?a(h,s,t,n,{...r,[h]:!0},G(s[h]??{})):(await U(c.credential_source,e,t.logger)(t))();if(G(c))return T.then((i)=>O.setCredentialFeature(i,"CREDENTIALS_PROFILE_SOURCE_PROFILE","o"));else{let i={RoleArn:c.role_arn,RoleSessionName:c.role_session_name||`aws-sdk-js-${Date.now()}`,ExternalId:c.external_id,DurationSeconds:parseInt(c.duration_seconds||"3600",10)},{mfa_serial:u}=c;if(u){if(!t.mfaCodeProvider)throw new R.CredentialsProviderError(`Profile ${e} requires multi-factor authentication, but no MFA code callback was provided.`,{logger:t.logger,tryNextLink:!1});i.SerialNumber=u,i.TokenCode=await t.mfaCodeProvider(u)}let y=await T;return t.roleAssumer(y,i).then((m)=>O.setCredentialFeature(m,"CREDENTIALS_PROFILE_SOURCE_PROFILE","o"))}},G=(e)=>{return!e.role_arn&&!!e.credential_source};var V=o(w(),1);var C=o(w(),1),X=o(l(),1),K=o(_(),1);var k=o(l(),1),W=o(ue(),1),z=o(_(),1);import{createHash as de,createPrivateKey as we,createPublicKey as ke,sign as me}from"crypto";import{promises as D}from"fs";import{homedir as fe}from"os";import{dirname as Ie,join as Y}from"path";class b{profileData;init;callerClientConfig;static REFRESH_THRESHOLD=300000;constructor(e,s,t){this.profileData=e,this.init=s,this.callerClientConfig=t}async loadCredentials(){let e=await this.loadToken();if(!e)throw new k.CredentialsProviderError(`Failed to load a token for session ${this.loginSession}, please re-authenticate using aws login`,{tryNextLink:!1,logger:this.logger});let s=e.accessToken,t=Date.now();if(new Date(s.expiresAt).getTime()-t<=b.REFRESH_THRESHOLD)return this.refresh(e);return{accessKeyId:s.accessKeyId,secretAccessKey:s.secretAccessKey,sessionToken:s.sessionToken,accountId:s.accountId,expiration:new Date(s.expiresAt)}}get logger(){return this.init?.logger}get loginSession(){return this.profileData.login_session}async refresh(e){let{SigninClient:s,CreateOAuth2TokenCommand:t}=await import("./chunk-hk067634.js").then((m)=>o(m.default,1)),{logger:n,userAgentAppId:r}=this.callerClientConfig??{},c=((i)=>{return i?.metadata?.handlerProtocol==="h2"})(this.callerClientConfig?.requestHandler)?void 0:this.callerClientConfig?.requestHandler,h=this.profileData.region??await this.callerClientConfig?.region?.()??process.env.AWS_REGION,I=new s({credentials:{accessKeyId:"",secretAccessKey:""},region:h,requestHandler:c,logger:n,userAgentAppId:r,...this.init?.clientConfig});this.createDPoPInterceptor(I.middlewareStack);let T={tokenInput:{clientId:e.clientId,refreshToken:e.refreshToken,grantType:"refresh_token"}};try{let i=await I.send(new t(T)),{accessKeyId:u,secretAccessKey:y,sessionToken:m}=i.tokenOutput?.accessToken??{},{refreshToken:x,expiresIn:H}=i.tokenOutput??{};if(!u||!y||!m||!x)throw new k.CredentialsProviderError("Token refresh response missing required fields",{logger:this.logger,tryNextLink:!1});let A=(H??900)*1000,f=new Date(Date.now()+A),q={...e,accessToken:{...e.accessToken,accessKeyId:u,secretAccessKey:y,sessionToken:m,expiresAt:f.toISOString()},refreshToken:x};await this.saveToken(q);let S=q.accessToken;return{accessKeyId:S.accessKeyId,secretAccessKey:S.secretAccessKey,sessionToken:S.sessionToken,accountId:S.accountId,expiration:f}}catch(i){if(i.name==="AccessDeniedException"){let u=i.error,y;switch(u){case"TOKEN_EXPIRED":y="Your session has expired. Please reauthenticate.";break;case"USER_CREDENTIALS_CHANGED":y="Unable to refresh credentials because of a change in your password. Please reauthenticate with your new password.";break;case"INSUFFICIENT_PERMISSIONS":y="Unable to refresh credentials due to insufficient permissions. You may be missing permission for the 'CreateOAuth2Token' action.";break;default:y=`Failed to refresh token: ${String(i)}. Please re-authenticate using \`aws login\``}throw new k.CredentialsProviderError(y,{logger:this.logger,tryNextLink:!1})}throw new k.CredentialsProviderError(`Failed to refresh token: ${String(i)}. Please re-authenticate using aws login`,{logger:this.logger})}}async loadToken(){let e=this.getTokenFilePath();try{let s;try{s=await z.readFile(e,{ignoreCache:this.init?.ignoreCache})}catch{s=await D.readFile(e,"utf8")}let t=JSON.parse(s),n=["accessToken","clientId","refreshToken","dpopKey"].filter((r)=>!t[r]);if(!t.accessToken?.accountId)n.push("accountId");if(n.length>0)throw new k.CredentialsProviderError(`Token validation failed, missing fields: ${n.join(", ")}`,{logger:this.logger,tryNextLink:!1});return t}catch(s){throw new k.CredentialsProviderError(`Failed to load token from ${e}: ${String(s)}`,{logger:this.logger,tryNextLink:!1})}}async saveToken(e){let s=this.getTokenFilePath(),t=Ie(s);try{await D.mkdir(t,{recursive:!0})}catch(n){}await D.writeFile(s,JSON.stringify(e,null,2),"utf8")}getTokenFilePath(){let e=process.env.AWS_LOGIN_CACHE_DIRECTORY??Y(fe(),".aws","login","cache"),s=Buffer.from(this.loginSession,"utf8"),t=de("sha256").update(s).digest("hex");return Y(e,`${t}.json`)}derToRawSignature(e){let s=2;if(e[s]!==2)throw Error("Invalid DER signature");s++;let t=e[s++],n=e.subarray(s,s+t);if(s+=t,e[s]!==2)throw Error("Invalid DER signature");s++;let r=e[s++],a=e.subarray(s,s+r);n=n[0]===0?n.subarray(1):n,a=a[0]===0?a.subarray(1):a;let c=Buffer.concat([Buffer.alloc(32-n.length),n]),h=Buffer.concat([Buffer.alloc(32-a.length),a]);return Buffer.concat([c,h])}createDPoPInterceptor(e){e.add((s)=>async(t)=>{if(W.HttpRequest.isInstance(t.request)){let n=t.request,r=`${n.protocol}//${n.hostname}${n.port?`:${n.port}`:""}${n.path}`,a=await this.generateDpop(n.method,r);n.headers={...n.headers,DPoP:a}}return s(t)},{step:"finalizeRequest",name:"dpopInterceptor",override:!0})}async generateDpop(e="POST",s){let t=await this.loadToken();try{let n=we({key:t.dpopKey,format:"pem",type:"sec1"}),a=ke(n).export({format:"der",type:"spki"}),c=-1;for(let f=0;f<a.length;f++)if(a[f]===4){c=f;break}let h=a.slice(c+1,c+33),I=a.slice(c+33,c+65),T={alg:"ES256",typ:"dpop+jwt",jwk:{kty:"EC",crv:"P-256",x:h.toString("base64url"),y:I.toString("base64url")}},i={jti:crypto.randomUUID(),htm:e,htu:s,iat:Math.floor(Date.now()/1000)},u=Buffer.from(JSON.stringify(T)).toString("base64url"),y=Buffer.from(JSON.stringify(i)).toString("base64url"),m=`${u}.${y}`,x=me("sha256",Buffer.from(m),n),A=this.derToRawSignature(x).toString("base64url");return`${m}.${A}`}catch(n){throw new k.CredentialsProviderError(`Failed to generate Dpop proof: ${n instanceof Error?n.message:String(n)}`,{logger:this.logger,tryNextLink:!1})}}}var Q=(e)=>async({callerClientConfig:s}={})=>{e?.logger?.debug?.("@aws-sdk/credential-providers - fromLoginCredentials");let t=await K.parseKnownFiles(e||{}),n=K.getProfileName({profile:e?.profile??s?.profile}),r=t[n];if(!r?.login_session)throw new X.CredentialsProviderError(`Profile ${n} does not contain login_session.`,{tryNextLink:!0,logger:e?.logger});let c=await new b(r,e,s).loadCredentials();return C.setCredentialFeature(c,"CREDENTIALS_LOGIN","AD")};var Z=(e)=>{return Boolean(e&&e.login_session)},M=async(e,s,t)=>{let n=await Q({...s,profile:e})({callerClientConfig:t});return V.setCredentialFeature(n,"CREDENTIALS_PROFILE_LOGIN","AC")};var p=o(w(),1),ee=(e)=>Boolean(e)&&typeof e==="object"&&typeof e.credential_process==="string",te=async(e,s)=>import("./chunk-hrrmxreg.js").then(({fromProcess:t})=>t({...e,profile:s})().then((n)=>p.setCredentialFeature(n,"CREDENTIALS_PROFILE_PROCESS","v")));var $=o(w(),1),se=async(e,s,t={},n)=>{let{fromSSO:r}=await import("./chunk-dxw8k6f1.js");return r({profile:e,logger:t.logger,parentClientConfig:t.parentClientConfig,clientConfig:t.clientConfig})({callerClientConfig:n}).then((a)=>{if(s.sso_session)return $.setCredentialFeature(a,"CREDENTIALS_PROFILE_SSO","r");else return $.setCredentialFeature(a,"CREDENTIALS_PROFILE_SSO_LEGACY","t")})},ne=(e)=>e&&(typeof e.sso_start_url==="string"||typeof e.sso_account_id==="string"||typeof e.sso_session==="string"||typeof e.sso_region==="string"||typeof e.sso_role_name==="string");var ce=o(w(),1),P=(e)=>Boolean(e)&&typeof e==="object"&&typeof e.aws_access_key_id==="string"&&typeof e.aws_secret_access_key==="string"&&["undefined","string"].indexOf(typeof e.aws_session_token)>-1&&["undefined","string"].indexOf(typeof e.aws_account_id)>-1,F=async(e,s)=>{s?.logger?.debug("@aws-sdk/credential-provider-ini - resolveStaticCredentials");let t={accessKeyId:e.aws_access_key_id,secretAccessKey:e.aws_secret_access_key,sessionToken:e.aws_session_token,...e.aws_credential_scope&&{credentialScope:e.aws_credential_scope},...e.aws_account_id&&{accountId:e.aws_account_id}};return ce.setCredentialFeature(t,"CREDENTIALS_PROFILE","n")};var re=o(w(),1),ae=(e)=>Boolean(e)&&typeof e==="object"&&typeof e.web_identity_token_file==="string"&&typeof e.role_arn==="string"&&["undefined","string"].indexOf(typeof e.role_session_name)>-1,oe=async(e,s,t)=>import("./chunk-c0wcsmpj.js").then(({fromTokenFile:n})=>n({webIdentityTokenFile:e.web_identity_token_file,roleArn:e.role_arn,roleSessionName:e.role_session_name,roleAssumerWithWebIdentity:s.roleAssumerWithWebIdentity,logger:s.logger,parentClientConfig:s.parentClientConfig})({callerClientConfig:t}).then((r)=>re.setCredentialFeature(r,"CREDENTIALS_PROFILE_STS_WEB_ID_TOKEN","q")));var B=async(e,s,t,n,r={},a=!1)=>{let c=s[e];if(Object.keys(r).length>0&&P(c))return F(c,t);if(a||N(c,{profile:e,logger:t.logger}))return v(e,s,t,n,r,B);if(P(c))return F(c,t);if(ae(c))return oe(c,t,n);if(ee(c))return te(t,e);if(ne(c))return await se(e,c,t,n);if(Z(c))return M(e,t,n);throw new ie.CredentialsProviderError(`Could not resolve credentials using profile: [${e}] in configuration/credentials file(s).`,{logger:t.logger})};var Ne=(e={})=>async({callerClientConfig:s}={})=>{e.logger?.debug("@aws-sdk/credential-provider-ini - fromIni");let t=await g.parseKnownFiles(e);return B(g.getProfileName({profile:e.profile??s?.profile}),t,e,s)};export{Ne as fromIni};
|
|
3
|
-
|
|
4
|
-
//# debugId=9681DC45B49FED7064756E2164756E21
|