gemi 0.4.73 → 0.4.75
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 +0 -1
- package/dist/app/App.d.ts.map +1 -1
- package/dist/app/index.js +61 -61
- package/dist/bin/index.js +10 -2
- package/dist/chunk-168ace6fc79b185b.js +2 -0
- package/dist/chunk-1c56f79378e4123d.js +2 -0
- package/dist/{chunk-e9695f3cdafee20b.js → chunk-20e12a96dfe36b97.js} +1 -1
- package/dist/chunk-269dd2cd89aa1c32.js +2 -0
- package/dist/{chunk-c4424c04ab2ac6d1.js → chunk-28c7d04b6f555350.js} +2 -2
- package/dist/chunk-30daf610f498e198.js +6 -0
- package/dist/chunk-3abc648638ed6645.js +18 -0
- package/dist/chunk-48b2990a93ae50b3.js +2 -0
- package/dist/{chunk-0c3a31bca25291a6.js → chunk-4ad752c87b795617.js} +2 -2
- package/dist/{chunk-b9d952fe3db3df1c.js → chunk-4e37f45d636da627.js} +2 -2
- package/dist/chunk-52dd5453e79e1cef.js +2 -0
- package/dist/chunk-5c1c113b94101135.js +2 -0
- package/dist/{chunk-474c8dc0ac6b3cdf.js → chunk-5ea45ebea038bef4.js} +2 -2
- package/dist/chunk-5fb9d31b7b4629e9.js +1 -0
- package/dist/chunk-8bf925705fdcef0c.js +2 -0
- package/dist/{chunk-2c49184ec3c45a26.js → chunk-9631e167bae739a0.js} +1 -1
- package/dist/chunk-9c05674e98ebc485.js +2 -0
- package/dist/chunk-a5da5f8d6f9e8633.js +2 -0
- package/dist/chunk-b943cac32cc3670f.js +2 -0
- package/dist/chunk-d4eceea16ddc567d.js +9 -0
- package/dist/{chunk-7ce930fe69575c87.js → chunk-e3d242546d1a2927.js} +1 -1
- package/dist/chunk-e64fe80074576b85.js +2 -0
- package/dist/chunk-f9d7921dc209275a.js +2 -0
- package/dist/client/ClientRouterContext.d.ts.map +1 -1
- package/dist/client/Link.d.ts +1 -1
- package/dist/client/Link.d.ts.map +1 -1
- package/dist/client/QueryManagerContext.d.ts +3 -3
- package/dist/client/QueryManagerContext.d.ts.map +1 -1
- package/dist/client/ServerDataProvider.d.ts +1 -0
- package/dist/client/ServerDataProvider.d.ts.map +1 -1
- package/dist/client/index.js +55 -25
- package/dist/client/useNavigate.d.ts.map +1 -1
- package/dist/client/useQuery.d.ts.map +1 -1
- package/dist/email/index.js +1 -1
- package/dist/facades/Prefetch.d.ts +25 -0
- package/dist/facades/Prefetch.d.ts.map +1 -0
- package/dist/facades/index.d.ts +1 -0
- package/dist/facades/index.d.ts.map +1 -1
- package/dist/facades/index.js +1 -1
- package/dist/http/ApiRouter.d.ts +1 -1
- package/dist/http/ApiRouter.d.ts.map +1 -1
- package/dist/http/HttpRequest.d.ts +5 -1
- package/dist/http/HttpRequest.d.ts.map +1 -1
- package/dist/http/Middleware.d.ts +3 -1
- package/dist/http/Middleware.d.ts.map +1 -1
- package/dist/http/MiddlewareServiceProvider.d.ts +1 -1
- package/dist/http/MiddlewareServiceProvider.d.ts.map +1 -1
- package/dist/http/RateLimitMiddleware.d.ts +6 -0
- package/dist/http/RateLimitMiddleware.d.ts.map +1 -0
- package/dist/http/index.d.ts +1 -0
- package/dist/http/index.d.ts.map +1 -1
- package/dist/http/index.js +1 -1
- package/dist/http/requestContext.d.ts +6 -3
- package/dist/http/requestContext.d.ts.map +1 -1
- package/dist/kernel/Kernel.d.ts +13 -2
- package/dist/kernel/Kernel.d.ts.map +1 -1
- package/dist/kernel/context.d.ts +6 -2
- package/dist/kernel/context.d.ts.map +1 -1
- package/dist/kernel/index.js +2 -2
- package/dist/server/index.js +5 -5
- package/dist/services/ServiceProvider.d.ts +4 -0
- package/dist/services/ServiceProvider.d.ts.map +1 -0
- package/dist/services/file-storage/drivers/FileSystemDriver.d.ts.map +1 -1
- package/dist/services/index.d.ts +3 -0
- package/dist/services/index.d.ts.map +1 -1
- package/dist/services/index.js +1 -1
- package/dist/services/middleware/MiddlewareServiceContainer.d.ts +8 -0
- package/dist/services/middleware/MiddlewareServiceContainer.d.ts.map +1 -0
- package/dist/services/rate-limiter/RateLimiterServiceContainer.d.ts +6 -0
- package/dist/services/rate-limiter/RateLimiterServiceContainer.d.ts.map +1 -0
- package/dist/services/rate-limiter/RateLimiterServiceProvider.d.ts +5 -0
- package/dist/services/rate-limiter/RateLimiterServiceProvider.d.ts.map +1 -0
- package/dist/services/rate-limiter/drivers/InMemoryRateLimiterDriver.d.ts +9 -0
- package/dist/services/rate-limiter/drivers/InMemoryRateLimiterDriver.d.ts.map +1 -0
- package/dist/services/rate-limiter/drivers/RateLimiterDriver.d.ts +4 -0
- package/dist/services/rate-limiter/drivers/RateLimiterDriver.d.ts.map +1 -0
- package/dist/services/rate-limiter/types.d.ts +2 -0
- package/dist/services/rate-limiter/types.d.ts.map +1 -0
- package/dist/services/router/ApiRouterServiceContainer.d.ts +13 -0
- package/dist/services/router/ApiRouterServiceContainer.d.ts.map +1 -0
- package/dist/services/router/ApiRouterServiceProvider.d.ts +8 -0
- package/dist/services/router/ApiRouterServiceProvider.d.ts.map +1 -0
- package/dist/services/router/createFlatApiRoutes.d.ts +16 -0
- package/dist/services/router/createFlatApiRoutes.d.ts.map +1 -0
- package/dist/utils/omitNullishValues.d.ts +2 -0
- package/dist/utils/omitNullishValues.d.ts.map +1 -0
- package/dist/vite/{index-BfdM1qcG.mjs → index-DgYsNMcB.mjs} +3 -2
- package/dist/vite/index.mjs +1 -1
- package/dist/vite/{typescript-DU6uj0V1.mjs → typescript-Cv6BtTKL.mjs} +1 -1
- package/package.json +1 -1
- package/dist/chunk-027f8856aa132d85.js +0 -6
- package/dist/chunk-035e233acf299392.js +0 -2
- package/dist/chunk-3e2f1f65cba86ad5.js +0 -2
- package/dist/chunk-6a30174fcc338251.js +0 -2
- package/dist/chunk-6def55ea02e050ec.js +0 -2
- package/dist/chunk-722959aee5ef3fae.js +0 -2
- package/dist/chunk-89067bce11a12276.js +0 -2
- package/dist/chunk-89c603058a8ca2e0.js +0 -2
- package/dist/chunk-9c10a08ee4b4d468.js +0 -9
- package/dist/chunk-9e6c223585edf12e.js +0 -2
- package/dist/chunk-a2fa7b0b7cb9d696.js +0 -2
- package/dist/chunk-a75cb687951e66a0.js +0 -2
- package/dist/chunk-b240c1abcf310471.js +0 -2
- package/dist/chunk-b3d1c993471a0dbe.js +0 -2
- package/dist/chunk-db704ae1cdab22a5.js +0 -18
- package/dist/chunk-e1c93f98afc62202.js +0 -2
- package/dist/chunk-e4119fe2a26e4a22.js +0 -2
- package/dist/chunk-e4fa4d02a212da4f.js +0 -2
|
@@ -0,0 +1 @@
|
|
|
1
|
+
class n extends Error{constructor(t,e=!0){let o,r=!0;if(typeof e==="boolean")o=void 0,r=e;else if(e!=null&&typeof e==="object")o=e.logger,r=e.tryNextLink??!0;super(t);this.name="ProviderError",this.tryNextLink=r,Object.setPrototypeOf(this,n.prototype),o?.debug?.(`@smithy/property-provider ${r?"->":"(!)"} ${t}`)}static from(t,e=!0){return Object.assign(new this(t.message,e),t)}}class u extends n{constructor(t,e=!0){super(t,e);this.name="CredentialsProviderError",Object.setPrototypeOf(this,u.prototype)}}class l extends n{constructor(t,e=!0){super(t,e);this.name="TokenProviderError",Object.setPrototypeOf(this,l.prototype)}}var v=(...t)=>async()=>{if(t.length===0)throw new n("No providers in chain");let e;for(let o of t)try{return await o()}catch(r){if(e=r,r?.tryNextLink)continue;throw r}throw e};var w=(t)=>()=>Promise.resolve(t);var b=(t,e,o)=>{let r,i,s,f=!1;const a=async()=>{if(!i)i=t();try{r=await i,s=!0,f=!1}finally{i=void 0}return r};if(e===void 0)return async(c)=>{if(!s||c?.forceRefresh)r=await a();return r};return async(c)=>{if(!s||c?.forceRefresh)r=await a();if(f)return r;if(o&&!o(r))return f=!0,r;if(e(r))return await a(),r;return r}};export{n as mb,u as nb,l as ob,v as pb,w as qb,b as rb};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import"./chunk-e3d242546d1a2927.js";import"./chunk-4e37f45d636da627.js";import{kb as v,lb as B} from"./chunk-48b2990a93ae50b3.js";import{mb as z,nb as y} from"./chunk-5fb9d31b7b4629e9.js";import"./chunk-9631e167bae739a0.js";import{parse as p} from"url";import{Buffer as M} from"buffer";import{request as k} from"http";function u(c){return new Promise((I,x)=>{const T=k({method:"GET",...c,hostname:c.hostname?.replace(/^\[(.+)\]$/,"$1")});T.on("error",(N)=>{x(Object.assign(new z("Unable to connect to instance metadata service"),N)),T.destroy()}),T.on("timeout",()=>{x(new z("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("Error response received from instance metadata service"),{statusCode:O})),T.destroy();const E=[];N.on("data",(w)=>{E.push(w)}),N.on("end",()=>{I(M.concat(E)),T.destroy()})}),T.end()})}var K=(c)=>Boolean(c)&&typeof c==="object"&&typeof c.AccessKeyId==="string"&&typeof c.SecretAccessKey==="string"&&typeof c.Token==="string"&&typeof c.Expiration==="string",_=(c)=>({accessKeyId:c.AccessKeyId,secretAccessKey:c.SecretAccessKey,sessionToken:c.Token,expiration:new Date(c.Expiration),...c.AccountId&&{accountId:c.AccountId}});var hc=1000,Yc=0,D=({maxRetries:c=0,timeout:I=1000})=>({maxRetries:c,timeout:I});var m=(c,I)=>{let x=c();for(let T=0;T<I;T++)x=x.catch(c);return x};var Q="AWS_CONTAINER_CREDENTIALS_FULL_URI",X="AWS_CONTAINER_CREDENTIALS_RELATIVE_URI",b="AWS_CONTAINER_AUTHORIZATION_TOKEN",mc=(c={})=>{const{timeout:I,maxRetries:x}=D(c);return()=>m(async()=>{const T=await s({logger:c.logger}),N=JSON.parse(await C(I,T));if(!K(N))throw new y("Invalid response received from instance metadata service.",{logger:c.logger});return _(N)},x)},C=async(c,I)=>{if(process.env[b])I.headers={...I.headers,Authorization:process.env[b]};return(await u({...I,timeout:c})).toString()},a="169.254.170.2",n={localhost:!0,"127.0.0.1":!0},o={"http:":!0,"https:":!0},s=async({logger:c})=>{if(process.env[X])return{hostname:a,path:process.env[X]};if(process.env[Q]){const I=p(process.env[Q]);if(!I.hostname||!(I.hostname in n))throw new y(`${I.hostname} is not a valid container metadata service hostname`,{tryNextLink:!1,logger:c});if(!I.protocol||!(I.protocol in o))throw new y(`${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 y("The container metadata credential provider cannot be used unless"+` the ${X} or ${Q} environment`+" variable is set",{tryNextLink:!1,logger:c})};class G extends y{constructor(c,I=!0){super(c,I);this.tryNextLink=I,this.name="InstanceMetadataV1FallbackError",Object.setPrototypeOf(this,G.prototype)}}var A;(function(c){c.IPv4="http://169.254.169.254",c.IPv6="http://[fd00:ec2::254]"})(A||(A={}));var H={environmentVariableSelector:(c)=>c["AWS_EC2_METADATA_SERVICE_ENDPOINT"],configFileSelector:(c)=>c["ec2_metadata_service_endpoint"],default:void 0};var f;(function(c){c.IPv4="IPv4",c.IPv6="IPv6"})(f||(f={}));var g="AWS_EC2_METADATA_SERVICE_ENDPOINT_MODE",l="ec2_metadata_service_endpoint_mode",q={environmentVariableSelector:(c)=>c[g],configFileSelector:(c)=>c[l],default:f.IPv4};var Z=async()=>B(await r()||await d()),r=async()=>v(H)(),d=async()=>{const c=await v(q)();switch(c){case f.IPv4:return A.IPv4;case f.IPv6:return A.IPv6;default:throw new Error(`Unsupported endpoint mode: ${c}.`+` Select from ${Object.values(f)}`)}};var L=(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 U=(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=L(N,x)}catch(O){if(T)x.warn("Credential renew failed: ",O),N=L(T,x);else throw O}return T=N,N}};var P="/latest/meta-data/iam/security-credentials/",e="/latest/api/token",W="AWS_EC2_METADATA_V1_DISABLED",t="ec2_metadata_v1_disabled",F="x-aws-ec2-metadata-token",oc=(c={})=>U(i(c),{logger:c.logger}),i=(c={})=>{let I=!1;const{logger:x,profile:T}=c,{timeout:N,maxRetries:O}=D(c),E=async(w,$)=>{if(I||$.headers?.[F]==null){let h=!1,Y=!1;const R=await v({environmentVariableSelector:(S)=>{const j=S[W];if(Y=!!j&&j!=="false",j===void 0)throw new y(`${W} not set in env, checking config file next.`,{logger:c.logger});return Y},configFileSelector:(S)=>{const j=S[t];return h=!!j&&j!=="false",h},default:!1},{profile:T})();if(c.ec2MetadataV1Disabled||R){const S=[];if(c.ec2MetadataV1Disabled)S.push("credential provider initialization (runtime option ec2MetadataV1Disabled)");if(h)S.push(`config file profile (${t})`);if(Y)S.push(`process environment variable (${W})`);throw new G(`AWS EC2 Metadata v1 fallback has been blocked by AWS SDK configuration in the following: [${S.join(", ")}].`)}}const V=(await m(async()=>{let h;try{h=await Ic($)}catch(Y){if(Y.statusCode===401)I=!1;throw Y}return h},w)).trim();return m(async()=>{let h;try{h=await Tc(V,$,c)}catch(Y){if(Y.statusCode===401)I=!1;throw Y}return h},w)};return async()=>{const w=await Z();if(I)return x?.debug("AWS SDK Instance Metadata","using v1 fallback (no token fetch)"),E(O,{...w,timeout:N});else{let $;try{$=(await cc({...w,timeout:N})).toString()}catch(J){if(J?.statusCode===400)throw Object.assign(J,{message:"EC2 Metadata token request returned error"});else if(J.message==="TimeoutError"||[403,404,405].includes(J.statusCode))I=!0;return x?.debug("AWS SDK Instance Metadata","using v1 fallback (initial)"),E(O,{...w,timeout:N})}return E(O,{...w,headers:{[F]:$},timeout:N})}}},cc=async(c)=>u({...c,path:e,method:"PUT",headers:{"x-aws-ec2-metadata-token-ttl-seconds":"21600"}}),Ic=async(c)=>(await u({...c,path:P})).toString(),Tc=async(c,I,x)=>{const T=JSON.parse((await u({...I,path:P+c})).toString());if(!K(T))throw new y("Invalid response received from instance metadata service.",{logger:x.logger});return _(T)};export{D as providerConfigFromInit,u as httpRequest,Z as getInstanceMetadataEndpoint,oc as fromInstanceMetadata,mc as fromContainerMetadata,A as Endpoint,X as ENV_CMDS_RELATIVE_URI,Q as ENV_CMDS_FULL_URI,b as ENV_CMDS_AUTH_TOKEN,hc as DEFAULT_TIMEOUT,Yc as DEFAULT_MAX_RETRIES};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{A as x} from"./chunk-e3d242546d1a2927.js";import{jb as S} from"./chunk-4e37f45d636da627.js";var q="AWS_PROFILE";var B=(o)=>o.profile||process.env["AWS_PROFILE"]||"default";import{join as b} from"path";import{homedir as N} from"os";import{sep as L} from"path";var d={},w=()=>{if(process&&process.geteuid)return`${process.geteuid()}`;return"DEFAULT"},f=()=>{const{HOME:o,USERPROFILE:e,HOMEPATH:t,HOMEDRIVE:r=`C:${L}`}=process.env;if(o)return o;if(e)return e;if(t)return`${r}${t}`;const i=w();if(!d[i])d[i]=N();return d[i]};var v="AWS_CONFIG_FILE",g=()=>process.env[v]||b(f(),".aws","config");var D=x(S(),1);import{join as I} from"path";var h=x(S(),1);var O=(o)=>Object.entries(o).filter(([e])=>{const t=e.indexOf(c);if(t===-1)return!1;return Object.values(h.IniSectionType).includes(e.substring(0,t))}).reduce((e,[t,r])=>{const i=t.indexOf(c),s=t.substring(0,i)===h.IniSectionType.PROFILE?t.substring(i+1):t;return e[s]=r,e},{...o.default&&{default:o.default}});import{join as j} from"path";var y="AWS_SHARED_CREDENTIALS_FILE",_=()=>process.env[y]||j(f(),".aws","credentials");var C=x(S(),1);var $=/^([\w-]+)\s(["'])?([\w-@\+\.%:/]+)\2$/,G=["__proto__","profile __proto__"],a=(o)=>{const e={};let t,r;for(let i of o.split(/\r?\n/)){const s=i.split(/(^|\s)[;#]/)[0].trim();if(s[0]==="["&&s[s.length-1]==="]"){t=void 0,r=void 0;const n=s.substring(1,s.length-1),m=$.exec(n);if(m){const[,p,,F]=m;if(Object.values(C.IniSectionType).includes(p))t=[p,F].join(c)}else t=n;if(G.includes(n))throw new Error(`Found invalid profile name "${n}"`)}else if(t){const n=s.indexOf("=");if(![0,-1].includes(n)){const[m,p]=[s.substring(0,n).trim(),s.substring(n+1).trim()];if(p==="")r=m;else{if(r&&i.trimStart()===i)r=void 0;e[t]=e[t]||{};const F=r?[r,m].join(c):m;e[t][F]=p}}}}return e};import{promises as W} from"fs";var{readFile:K}=W,E={},l=(o,e)=>{if(!E[o]||e?.ignoreCache)E[o]=K(o,"utf8");return E[o]};var P=()=>({}),c=".",R=async(o={})=>{const{filepath:e=_(),configFilepath:t=g()}=o,r=f();let s=e;if(e.startsWith("~/"))s=I(r,e.slice(2));let u=t;if(t.startsWith("~/"))u=I(r,t.slice(2));const n=await Promise.all([l(u,{ignoreCache:o.ignoreCache}).then(a).then(O).catch(P),l(s,{ignoreCache:o.ignoreCache}).then(a).catch(P)]);return{configFile:n[0],credentialsFile:n[1]}};var T=(o)=>Object.entries(o).filter(([e])=>e.startsWith(D.IniSectionType.SSO_SESSION+c)).reduce((e,[t,r])=>({...e,[t.substring(t.indexOf(c)+1)]:r}),{});var V=()=>({}),Pe=async(o={})=>l(o.configFilepath??g()).then(a).then(T).catch(V);var A=(...o)=>{const e={};for(let t of o)for(let[r,i]of Object.entries(t))if(e[r]!==void 0)Object.assign(e[r],i);else e[r]=i;return e};var He=async(o)=>{const e=await R(o);return A(e.configFile,e.credentialsFile)};import{createHash as U} from"crypto";import{join as X} from"path";var H=(o)=>{const t=U("sha1").update(o).digest("hex");return X(f(),".aws","sso","cache",`${t}.json`)};import{promises as k} from"fs";var{readFile:M}=k,$e=async(o)=>{const e=H(o),t=await M(e,"utf8");return JSON.parse(t)};export{q as sb,B as tb,H as ub,$e as vb,c as wb,R as xb,Pe as yb,He as zb};
|