gemi 0.4.91 → 0.4.93
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/App.d.ts +2 -24
- package/dist/app/App.d.ts.map +1 -1
- package/dist/app/index.js +1 -1
- package/dist/bin/index.js +73 -31
- package/dist/broadcasting/index.js +1 -1
- package/dist/{chunk-8ee09f1f74206a04.js → chunk-035e233acf299392.js} +2 -2
- package/dist/chunk-04f04986e53516f0.js +2 -0
- package/dist/chunk-0f0add364d3ea615.js +2 -0
- package/dist/chunk-0fd23409fff0376b.js +2 -0
- package/dist/chunk-1770e9abf10029e0.js +2 -0
- package/dist/chunk-2573b2361de4a370.js +2 -0
- package/dist/{chunk-fcd9eb76c67113d3.js → chunk-2f8839f406606d63.js} +1 -1
- package/dist/{chunk-7d5fe4acabfee228.js → chunk-33abc8f4f7df6791.js} +2 -2
- package/dist/chunk-494de321e3423d54.js +2 -0
- package/dist/chunk-496c32676431beab.js +18 -0
- package/dist/chunk-6286081da32e2feb.js +2 -0
- package/dist/{chunk-24a86f8f5ddc0cbd.js → chunk-7ce930fe69575c87.js} +1 -1
- package/dist/chunk-8fec55214eb03a61.js +9 -0
- package/dist/chunk-9a9d43e4b919c267.js +2 -0
- package/dist/chunk-b6fb088270ea6584.js +3 -0
- package/dist/chunk-c459f3e37965c22f.js +2 -0
- package/dist/{chunk-0ba2cc302113ab40.js → chunk-cfb8c5b12b0e5378.js} +2 -2
- package/dist/chunk-cfbe2cbcadcb1ac1.js +2 -0
- package/dist/chunk-d09948245f5b426d.js +2 -0
- package/dist/chunk-d7525516b1305ba3.js +6 -0
- package/dist/{chunk-332553172e3ab961.js → chunk-dfb863d471bf3b18.js} +2 -2
- package/dist/{chunk-28694e5e949df0ff.js → chunk-e1929f0f7003fbdf.js} +2 -2
- package/dist/chunk-e76c7e3bf2d698af.js +2 -0
- package/dist/chunk-eabfa03c809e14df.js +2 -0
- package/dist/{chunk-43b1a27bc037bc09.js → chunk-ef791082443c0cbd.js} +1 -1
- package/dist/{chunk-201d67e6e22cc14b.js → chunk-f10ba402aaacfc12.js} +2 -2
- package/dist/client/ClientRouterContext.d.ts.map +1 -1
- package/dist/client/ServerDataProvider.d.ts +5 -1
- package/dist/client/ServerDataProvider.d.ts.map +1 -1
- package/dist/client/i18n/I18nContext.d.ts.map +1 -1
- package/dist/client/index.js +16 -14
- package/dist/email/index.js +1 -1
- package/dist/facades/index.js +1 -1
- package/dist/http/I18nServiceContainer.d.ts.map +1 -1
- package/dist/http/index.js +1 -1
- package/dist/kernel/Kernel.d.ts +5 -4
- package/dist/kernel/Kernel.d.ts.map +1 -1
- package/dist/kernel/context.d.ts +2 -2
- package/dist/kernel/context.d.ts.map +1 -1
- package/dist/kernel/index.js +1 -1
- package/dist/server/index.js +5 -5
- package/dist/services/ServiceProvider.d.ts +1 -1
- package/dist/services/ServiceProvider.d.ts.map +1 -1
- package/dist/services/index.js +1 -1
- package/dist/services/router/ViewRouterServiceContainer.d.ts +12 -0
- package/dist/services/router/ViewRouterServiceContainer.d.ts.map +1 -0
- package/dist/services/router/ViewRouterServiceProvider.d.ts +13 -0
- package/dist/services/router/ViewRouterServiceProvider.d.ts.map +1 -0
- package/dist/services/router/createComponentTree.d.ts +4 -0
- package/dist/services/router/createComponentTree.d.ts.map +1 -0
- package/dist/services/router/createComponentTree.test.d.ts +2 -0
- package/dist/services/router/createComponentTree.test.d.ts.map +1 -0
- package/dist/services/router/createFlatViewRoutes.d.ts +14 -0
- package/dist/services/router/createFlatViewRoutes.d.ts.map +1 -0
- package/dist/services/router/createFlatViewRoutes.test.d.ts +2 -0
- package/dist/services/router/createFlatViewRoutes.test.d.ts.map +1 -0
- package/dist/services/router/createRouteManifest.d.ts +3 -0
- package/dist/services/router/createRouteManifest.d.ts.map +1 -0
- package/dist/services/router/createRouteManifest.test.d.ts +2 -0
- package/dist/services/router/createRouteManifest.test.d.ts.map +1 -0
- package/package.json +1 -1
- package/dist/app/Plugin.d.ts +0 -10
- package/dist/app/Plugin.d.ts.map +0 -1
- package/dist/app/createComponentTree.d.ts +0 -4
- package/dist/app/createComponentTree.d.ts.map +0 -1
- package/dist/app/createFlatViewRoutes.d.ts +0 -10
- package/dist/app/createFlatViewRoutes.d.ts.map +0 -1
- package/dist/app/createRouteManifest.d.ts +0 -3
- package/dist/app/createRouteManifest.d.ts.map +0 -1
- package/dist/chunk-19790c50198f1898.js +0 -2
- package/dist/chunk-2b9b6009ebe271d3.js +0 -2
- package/dist/chunk-32d1342f9f8391c0.js +0 -2
- package/dist/chunk-3a6838d9e6866471.js +0 -2
- package/dist/chunk-53b7d6267c9172bc.js +0 -2
- package/dist/chunk-7085d9454a422181.js +0 -2
- package/dist/chunk-809308720fc22418.js +0 -2
- package/dist/chunk-900bf3955cb1bbab.js +0 -2
- package/dist/chunk-931a005d4bb28ffe.js +0 -2
- package/dist/chunk-9475c6ed18013dc8.js +0 -2
- package/dist/chunk-967cb54562e3d29b.js +0 -3
- package/dist/chunk-b94896500a1345bf.js +0 -2
- package/dist/chunk-bce765dc10669cd0.js +0 -6
- package/dist/chunk-bdac4694bbb37064.js +0 -1
- package/dist/chunk-c3c17a7115770391.js +0 -2
- package/dist/chunk-d1e1b959b1124e74.js +0 -18
- package/dist/chunk-f6a9cd06681eb0dc.js +0 -9
- package/dist/server/generateEtag.d.ts +0 -2
- package/dist/server/generateEtag.d.ts.map +0 -1
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{y as K} from"./chunk-7ce930fe69575c87.js";import"./chunk-f10ba402aaacfc12.js";import{tb as v,ub as P} from"./chunk-494de321e3423d54.js";import{vb as _} from"./chunk-eabfa03c809e14df.js";import"./chunk-2f8839f406606d63.js";var m=K(_(),1);import{parse as o} from"url";var z=K(_(),1);import{Buffer as a} from"buffer";import{request as n} from"http";function f(c){return new Promise((I,x)=>{const T=n({method:"GET",...c,hostname:c.hostname?.replace(/^\[(.+)\]$/,"$1")});T.on("error",(N)=>{x(Object.assign(new z.ProviderError("Unable to connect to instance metadata service"),N)),T.destroy()}),T.on("timeout",()=>{x(new z.ProviderError("TimeoutError from instance metadata service")),T.destroy()}),T.on("response",(N)=>{const{statusCode:O=400}=N;if(O<200||300<=O)x(Object.assign(new z.ProviderError("Error response received from instance metadata service"),{statusCode:O})),T.destroy();const u=[];N.on("data",(y)=>{u.push(y)}),N.on("end",()=>{I(a.concat(u)),T.destroy()})}),T.end()})}var D=(c)=>Boolean(c)&&typeof c==="object"&&typeof c.AccessKeyId==="string"&&typeof c.SecretAccessKey==="string"&&typeof c.Token==="string"&&typeof c.Expiration==="string",G=(c)=>({accessKeyId:c.AccessKeyId,secretAccessKey:c.SecretAccessKey,sessionToken:c.Token,expiration:new Date(c.Expiration),...c.AccountId&&{accountId:c.AccountId}});var fc=1000,uc=0,Q=({maxRetries:c=0,timeout:I=1000})=>({maxRetries:c,timeout:I});var J=(c,I)=>{let x=c();for(let T=0;T<I;T++)x=x.catch(c);return x};var Z="AWS_CONTAINER_CREDENTIALS_FULL_URI",L="AWS_CONTAINER_CREDENTIALS_RELATIVE_URI",B="AWS_CONTAINER_AUTHORIZATION_TOKEN",zc=(c={})=>{const{timeout:I,maxRetries:x}=Q(c);return()=>J(async()=>{const T=await d({logger:c.logger}),N=JSON.parse(await s(I,T));if(!D(N))throw new m.CredentialsProviderError("Invalid response received from instance metadata service.",{logger:c.logger});return G(N)},x)},s=async(c,I)=>{if(process.env[B])I.headers={...I.headers,Authorization:process.env[B]};return(await f({...I,timeout:c})).toString()},g="169.254.170.2",l={localhost:!0,"127.0.0.1":!0},r={"http:":!0,"https:":!0},d=async({logger:c})=>{if(process.env[L])return{hostname:g,path:process.env[L]};if(process.env[Z]){const I=o(process.env[Z]);if(!I.hostname||!(I.hostname in l))throw new m.CredentialsProviderError(`${I.hostname} is not a valid container metadata service hostname`,{tryNextLink:!1,logger:c});if(!I.protocol||!(I.protocol in r))throw new m.CredentialsProviderError(`${I.protocol} is not a valid container metadata service protocol`,{tryNextLink:!1,logger:c});return{...I,port:I.port?parseInt(I.port,10):void 0}}throw new m.CredentialsProviderError("The container metadata credential provider cannot be used unless"+` the ${L} or ${Z} environment`+" variable is set",{tryNextLink:!1,logger:c})};var q=K(_(),1);var U=K(_(),1);class X extends U.CredentialsProviderError{constructor(c,I=!0){super(c,I);this.tryNextLink=I,this.name="InstanceMetadataV1FallbackError",Object.setPrototypeOf(this,X.prototype)}}var j;(function(c){c.IPv4="http://169.254.169.254",c.IPv6="http://[fd00:ec2::254]"})(j||(j={}));var t={environmentVariableSelector:(c)=>c["AWS_EC2_METADATA_SERVICE_ENDPOINT"],configFileSelector:(c)=>c["ec2_metadata_service_endpoint"],default:void 0};var S;(function(c){c.IPv4="IPv4",c.IPv6="IPv6"})(S||(S={}));var e="AWS_EC2_METADATA_SERVICE_ENDPOINT_MODE",i="ec2_metadata_service_endpoint_mode",F={environmentVariableSelector:(c)=>c[e],configFileSelector:(c)=>c[i],default:S.IPv4};var W=async()=>P(await cc()||await Ic()),cc=async()=>v(t)(),Ic=async()=>{const c=await v(F)();switch(c){case S.IPv4:return j.IPv4;case S.IPv6:return j.IPv6;default:throw new Error(`Unsupported endpoint mode: ${c}.`+` Select from ${Object.values(S)}`)}};var b=(c,I)=>{const x=300+Math.floor(Math.random()*300),T=new Date(Date.now()+x*1000);I.warn("Attempting credential expiration extension due to a credential service availability issue. A refresh of these "+`credentials will be attempted after ${new Date(T)}.\nFor more information, please visit: `+"https://docs.aws.amazon.com/sdkref/latest/guide/feature-static-credentials.html");const N=c.originalExpiration??c.expiration;return{...c,...N?{originalExpiration:N}:{},expiration:T}};var V=(c,I={})=>{const x=I?.logger||console;let T;return async()=>{let N;try{if(N=await c(),N.expiration&&N.expiration.getTime()<Date.now())N=b(N,x)}catch(O){if(T)x.warn("Credential renew failed: ",O),N=b(T,x);else throw O}return T=N,N}};var k="/latest/meta-data/iam/security-credentials/",Tc="/latest/api/token",H="AWS_EC2_METADATA_V1_DISABLED",R="ec2_metadata_v1_disabled",M="x-aws-ec2-metadata-token",oc=(c={})=>V(Nc(c),{logger:c.logger}),Nc=(c={})=>{let I=!1;const{logger:x,profile:T}=c,{timeout:N,maxRetries:O}=Q(c),u=async(y,E)=>{if(I||E.headers?.[M]==null){let w=!1,h=!1;const C=await v({environmentVariableSelector:(Y)=>{const $=Y[H];if(h=!!$&&$!=="false",$===void 0)throw new q.CredentialsProviderError(`${H} not set in env, checking config file next.`,{logger:c.logger});return h},configFileSelector:(Y)=>{const $=Y[R];return w=!!$&&$!=="false",w},default:!1},{profile:T})();if(c.ec2MetadataV1Disabled||C){const Y=[];if(c.ec2MetadataV1Disabled)Y.push("credential provider initialization (runtime option ec2MetadataV1Disabled)");if(w)Y.push(`config file profile (${R})`);if(h)Y.push(`process environment variable (${H})`);throw new X(`AWS EC2 Metadata v1 fallback has been blocked by AWS SDK configuration in the following: [${Y.join(", ")}].`)}}const p=(await J(async()=>{let w;try{w=await Oc(E)}catch(h){if(h.statusCode===401)I=!1;throw h}return w},y)).trim();return J(async()=>{let w;try{w=await yc(p,E,c)}catch(h){if(h.statusCode===401)I=!1;throw h}return w},y)};return async()=>{const y=await W();if(I)return x?.debug("AWS SDK Instance Metadata","using v1 fallback (no token fetch)"),u(O,{...y,timeout:N});else{let E;try{E=(await xc({...y,timeout:N})).toString()}catch(A){if(A?.statusCode===400)throw Object.assign(A,{message:"EC2 Metadata token request returned error"});else if(A.message==="TimeoutError"||[403,404,405].includes(A.statusCode))I=!0;return x?.debug("AWS SDK Instance Metadata","using v1 fallback (initial)"),u(O,{...y,timeout:N})}return u(O,{...y,headers:{[M]:E},timeout:N})}}},xc=async(c)=>f({...c,path:Tc,method:"PUT",headers:{"x-aws-ec2-metadata-token-ttl-seconds":"21600"}}),Oc=async(c)=>(await f({...c,path:k})).toString(),yc=async(c,I,x)=>{const T=JSON.parse((await f({...I,path:k+c})).toString());if(!D(T))throw new q.CredentialsProviderError("Invalid response received from instance metadata service.",{logger:x.logger});return G(T)};export{Q as providerConfigFromInit,f as httpRequest,W as getInstanceMetadataEndpoint,oc as fromInstanceMetadata,zc as fromContainerMetadata,j as Endpoint,L as ENV_CMDS_RELATIVE_URI,Z as ENV_CMDS_FULL_URI,B as ENV_CMDS_AUTH_TOKEN,fc as DEFAULT_TIMEOUT,uc as DEFAULT_MAX_RETRIES};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{y as l} from"./chunk-7ce930fe69575c87.js";import{vb as m} from"./chunk-eabfa03c809e14df.js";var E=l(m(),1);import{readFileSync as S} from"fs";var t=(e)=>async()=>{e.logger?.debug("@aws-sdk/credential-provider-web-identity - fromWebToken");const{roleArn:o,roleSessionName:r,webIdentityToken:n,providerId:c,policyArns:i,policy:_,durationSeconds:N}=e;let{roleAssumerWithWebIdentity:s}=e;if(!s){const{getDefaultRoleAssumerWithWebIdentity:d}=await import("./chunk-c459f3e37965c22f.js");s=d({...e.clientConfig,credentialProviderLogger:e.logger,parentClientConfig:e.parentClientConfig},e.clientPlugins)}return s({RoleArn:o,RoleSessionName:r??`aws-sdk-js-session-${Date.now()}`,WebIdentityToken:n,ProviderId:c,PolicyArns:i,Policy:_,DurationSeconds:N})};var p="AWS_WEB_IDENTITY_TOKEN_FILE",f="AWS_ROLE_ARN",T="AWS_ROLE_SESSION_NAME",I=(e={})=>async()=>{e.logger?.debug("@aws-sdk/credential-provider-web-identity - fromTokenFile");const o=e?.webIdentityTokenFile??process.env[p],r=e?.roleArn??process.env[f],n=e?.roleSessionName??process.env[T];if(!o||!r)throw new E.CredentialsProviderError("Web identity configuration not specified",{logger:e.logger});return t({...e,webIdentityToken:S(o,{encoding:"ascii"}),roleArn:r,roleSessionName:n})()};export{t as fromWebToken,I as fromTokenFile};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{y as h} from"./chunk-7ce930fe69575c87.js";import{Ma as P,Pa as w,db as I,ya as g} from"./chunk-b6fb088270ea6584.js";import"./chunk-f10ba402aaacfc12.js";import{vb as d} from"./chunk-eabfa03c809e14df.js";var i=h(d(),1);import A from"fs/promises";var C=h(d(),1);var E="169.254.170.2",R="169.254.170.23",p="[fd00:ec2::23]",S=(e,c)=>{if(e.protocol==="https:")return;if(e.hostname===E||e.hostname===R||e.hostname===p)return;if(e.hostname.includes("[")){if(e.hostname==="[::1]"||e.hostname==="[0000:0000:0000:0000:0000:0000:0000:0001]")return}else{if(e.hostname==="localhost")return;const a=e.hostname.split("."),r=(t)=>{const s=parseInt(t,10);return 0<=s&&s<=255};if(a[0]==="127"&&r(a[1])&&r(a[2])&&r(a[3])&&a.length===4)return}throw new C.CredentialsProviderError(`URL not accepted. It must either be HTTPS or match one of the following:
|
|
3
|
+
- loopback CIDR 127.0.0.0/8 or [::1/128]
|
|
4
|
+
- ECS container host 169.254.170.2
|
|
5
|
+
- EKS container host 169.254.170.23 or [fd00:ec2::23]`,{logger:c})};var m=h(d(),1);function K(e){return new g({protocol:e.protocol,hostname:e.hostname,port:Number(e.port),path:e.pathname,query:Array.from(e.searchParams.entries()).reduce((c,[a,r])=>{return c[a]=r,c},{}),fragment:e.hash})}async function T(e,c){const r=await w(e.body).transformToString();if(e.statusCode===200){const t=JSON.parse(r);if(typeof t.AccessKeyId!=="string"||typeof t.SecretAccessKey!=="string"||typeof t.Token!=="string"||typeof t.Expiration!=="string")throw new m.CredentialsProviderError("HTTP credential provider response not of the required format, an object matching: { AccessKeyId: string, SecretAccessKey: string, Token: string, Expiration: string(rfc3339) }",{logger:c});return{accessKeyId:t.AccessKeyId,secretAccessKey:t.SecretAccessKey,sessionToken:t.Token,expiration:I(t.Expiration)}}if(e.statusCode>=400&&e.statusCode<500){let t={};try{t=JSON.parse(r)}catch(s){}throw Object.assign(new m.CredentialsProviderError(`Server responded with status: ${e.statusCode}`,{logger:c}),{Code:t.Code,Message:t.Message})}throw new m.CredentialsProviderError(`Server responded with status: ${e.statusCode}`,{logger:c})}var x=(e,c,a)=>{return async()=>{for(let r=0;r<c;++r)try{return await e()}catch(t){await new Promise((s)=>setTimeout(s,a))}return await e()}};var O="AWS_CONTAINER_CREDENTIALS_RELATIVE_URI",b="http://169.254.170.2",_="AWS_CONTAINER_CREDENTIALS_FULL_URI",v="AWS_CONTAINER_AUTHORIZATION_TOKEN_FILE",B="AWS_CONTAINER_AUTHORIZATION_TOKEN",D=(e={})=>{e.logger?.debug("@aws-sdk/credential-provider-http - fromHttp");let c;const a=e.awsContainerCredentialsRelativeUri??process.env[O],r=e.awsContainerCredentialsFullUri??process.env[_],t=e.awsContainerAuthorizationToken??process.env[B],s=e.awsContainerAuthorizationTokenFile??process.env[v],n=e.logger?.constructor?.name==="NoOpLogger"||!e.logger?console.warn:e.logger.warn;if(a&&r)n("@aws-sdk/credential-provider-http: you have set both awsContainerCredentialsRelativeUri and awsContainerCredentialsFullUri."),n("awsContainerCredentialsFullUri will take precedence.");if(t&&s)n("@aws-sdk/credential-provider-http: you have set both awsContainerAuthorizationToken and awsContainerAuthorizationTokenFile."),n("awsContainerAuthorizationToken will take precedence.");if(r)c=r;else if(a)c=`${b}${a}`;else throw new i.CredentialsProviderError(`No HTTP credential provider host provided.
|
|
6
|
+
Set AWS_CONTAINER_CREDENTIALS_FULL_URI or AWS_CONTAINER_CREDENTIALS_RELATIVE_URI.`,{logger:e.logger});const y=new URL(c);S(y,e.logger);const u=new P({requestTimeout:e.timeout??1000,connectionTimeout:e.timeout??1000});return x(async()=>{const o=K(y);if(t)o.headers.Authorization=t;else if(s)o.headers.Authorization=(await A.readFile(s)).toString();try{const f=await u.handle(o);return T(f.response)}catch(f){throw new i.CredentialsProviderError(String(f),{logger:e.logger})}},e.maxRetries??3,e.timeout??1000)};export{D as fromHttp};
|