gemi 0.74.1 → 0.76.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/ai/AgentController.d.ts +47 -0
- package/dist/ai/AgentController.d.ts.map +1 -1
- package/dist/ai/index.js +10 -10
- package/dist/ai/index.js.map +7 -5
- package/dist/ai/providers/request.d.ts.map +1 -1
- package/dist/ai/store/TurnJournal.d.ts +97 -0
- package/dist/ai/store/TurnJournal.d.ts.map +1 -0
- package/dist/ai/types.d.ts +29 -3
- package/dist/ai/types.d.ts.map +1 -1
- package/dist/{chunk-2yje4e2t.js → chunk-dsgb59xm.js} +1 -1
- package/dist/{chunk-qn3y2sjy.js → chunk-hny56r47.js} +1 -1
- package/dist/{chunk-1rzn4rvz.js → chunk-p2ny6anh.js} +1 -1
- package/dist/{chunk-eg2n7x73.js → chunk-th77kbcq.js} +2 -2
- package/dist/{chunk-eg2n7x73.js.map → chunk-th77kbcq.js.map} +1 -1
- package/dist/{chunk-4qwz8b3z.js → chunk-ytt205yt.js} +7 -7
- package/dist/{chunk-4qwz8b3z.js.map → chunk-ytt205yt.js.map} +3 -3
- package/dist/chunks/{ThemeProvider-D9v0VAbY.js → ThemeProvider-BiNFL6l7.js} +152 -15
- package/dist/chunks/ThemeProvider-BiNFL6l7.js.map +1 -0
- package/dist/client/QueryError.d.ts +6 -1
- package/dist/client/QueryError.d.ts.map +1 -1
- package/dist/client/QueryManagerContext.d.ts +32 -1
- package/dist/client/QueryManagerContext.d.ts.map +1 -1
- package/dist/client/QueryResource.d.ts +27 -0
- package/dist/client/QueryResource.d.ts.map +1 -1
- package/dist/client/auth/useUser.d.ts +7 -1
- package/dist/client/auth/useUser.d.ts.map +1 -1
- package/dist/client/index.d.ts +3 -1
- package/dist/client/index.d.ts.map +1 -1
- package/dist/client/index.js +34 -22
- package/dist/client/index.js.map +1 -1
- package/dist/client/retryPolicy.d.ts +49 -0
- package/dist/client/retryPolicy.d.ts.map +1 -0
- package/dist/client/useQuery.d.ts +21 -0
- package/dist/client/useQuery.d.ts.map +1 -1
- package/dist/facades/index.js +1 -1
- package/dist/http/index.js +1 -1
- package/dist/i18n/index.js +1 -1
- package/dist/kernel/index.js +1 -1
- package/dist/server/index.js +1 -1
- package/dist/services/index.js +1 -1
- package/dist/services/queue/queueDriverContract.d.ts +6 -2
- package/dist/services/queue/queueDriverContract.d.ts.map +1 -1
- package/dist/testing/index.js +1 -1
- package/package.json +1 -1
- package/dist/chunks/ThemeProvider-D9v0VAbY.js.map +0 -1
- /package/dist/{chunk-2yje4e2t.js.map → chunk-dsgb59xm.js.map} +0 -0
- /package/dist/{chunk-qn3y2sjy.js.map → chunk-hny56r47.js.map} +0 -0
- /package/dist/{chunk-1rzn4rvz.js.map → chunk-p2ny6anh.js.map} +0 -0
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { QueryError } from "./QueryError";
|
|
2
|
+
/**
|
|
3
|
+
* What a failed query stores as its `error`: a `QueryError` when the server
|
|
4
|
+
* answered with a non-2xx status, or the `Error` the browser raised when it
|
|
5
|
+
* got no usable answer — a `TypeError` for a network failure, a `SyntaxError`
|
|
6
|
+
* for a 2xx body that is not JSON.
|
|
7
|
+
*/
|
|
8
|
+
export type QueryFailure = QueryError | Error;
|
|
9
|
+
/**
|
|
10
|
+
* Whether a failed query is retried in the background (`suspense: false`
|
|
11
|
+
* queries only — under suspense the error goes to the error boundary).
|
|
12
|
+
*
|
|
13
|
+
* - a number: retry transient failures (see `isRetryableQueryError`) up to that
|
|
14
|
+
* many times in a row;
|
|
15
|
+
* - `true`: retry transient failures with no cap;
|
|
16
|
+
* - `false` / `0`: never retry;
|
|
17
|
+
* - a function: called after every failure with the number of consecutive
|
|
18
|
+
* failures so far (1 for the first) and the error. It decides alone, so it
|
|
19
|
+
* can retry a status the default never does.
|
|
20
|
+
*/
|
|
21
|
+
export type RetryOption = boolean | number | ((failureCount: number, error: QueryFailure) => boolean);
|
|
22
|
+
/**
|
|
23
|
+
* The wait before a retry, in ms: a number, or a function of the consecutive
|
|
24
|
+
* failure count (1 for the first) and the error. A `Retry-After` header on the
|
|
25
|
+
* failed response wins over either.
|
|
26
|
+
*/
|
|
27
|
+
export type RetryDelayOption = number | ((failureCount: number, error: QueryFailure) => number);
|
|
28
|
+
export declare const DEFAULT_RETRY = 3;
|
|
29
|
+
export declare const DEFAULT_RETRY_BASE_DELAY = 1000;
|
|
30
|
+
export declare const MAX_RETRY_DELAY = 30000;
|
|
31
|
+
/**
|
|
32
|
+
* A failure that another attempt might fix: no answer at all (offline, a
|
|
33
|
+
* dropped connection), a 2xx body that failed to parse, 408, 429 or any 5xx.
|
|
34
|
+
* Every other status — 400, 401, 403, 404, 410, 422, … — says the request
|
|
35
|
+
* itself is the problem, so sending it again gets the same answer.
|
|
36
|
+
*/
|
|
37
|
+
export declare function isRetryableQueryError(error: unknown): boolean;
|
|
38
|
+
export declare function shouldRetryQuery(failureCount: number, error: QueryFailure, retry?: RetryOption | undefined): boolean;
|
|
39
|
+
/**
|
|
40
|
+
* `baseDelay * 2^(failureCount - 1)`, capped at 30s: 1s, 2s, 4s, … by default.
|
|
41
|
+
* A `Retry-After` the server sent (a 429 or 503) is honoured as is.
|
|
42
|
+
*/
|
|
43
|
+
export declare function retryDelayFor(failureCount: number, error: QueryFailure, retryDelay: RetryDelayOption | undefined, baseDelay?: number): number;
|
|
44
|
+
/**
|
|
45
|
+
* A `Retry-After` header value in ms: delta-seconds or an HTTP date.
|
|
46
|
+
* `undefined` when absent or unreadable.
|
|
47
|
+
*/
|
|
48
|
+
export declare function parseRetryAfter(value: string | null | undefined, now?: number): number | undefined;
|
|
49
|
+
//# sourceMappingURL=retryPolicy.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"retryPolicy.d.ts","sourceRoot":"","sources":["../../client/retryPolicy.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE1C;;;;;GAKG;AACH,MAAM,MAAM,YAAY,GAAG,UAAU,GAAG,KAAK,CAAC;AAE9C;;;;;;;;;;;GAWG;AACH,MAAM,MAAM,WAAW,GACnB,OAAO,GACP,MAAM,GACN,CAAC,CAAC,YAAY,EAAE,MAAM,EAAE,KAAK,EAAE,YAAY,KAAK,OAAO,CAAC,CAAC;AAE7D;;;;GAIG;AACH,MAAM,MAAM,gBAAgB,GACxB,MAAM,GACN,CAAC,CAAC,YAAY,EAAE,MAAM,EAAE,KAAK,EAAE,YAAY,KAAK,MAAM,CAAC,CAAC;AAE5D,eAAO,MAAM,aAAa,IAAI,CAAC;AAC/B,eAAO,MAAM,wBAAwB,OAAO,CAAC;AAC7C,eAAO,MAAM,eAAe,QAAS,CAAC;AAEtC;;;;;GAKG;AACH,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO,CAK7D;AAED,wBAAgB,gBAAgB,CAC9B,YAAY,EAAE,MAAM,EACpB,KAAK,EAAE,YAAY,EACnB,KAAK,GAAE,WAAW,GAAG,SAAyB,GAC7C,OAAO,CAKT;AAED;;;GAGG;AACH,wBAAgB,aAAa,CAC3B,YAAY,EAAE,MAAM,EACpB,KAAK,EAAE,YAAY,EACnB,UAAU,EAAE,gBAAgB,GAAG,SAAS,EACxC,SAAS,GAAE,MAAiC,GAC3C,MAAM,CAUR;AAED;;;GAGG;AACH,wBAAgB,eAAe,CAC7B,KAAK,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,EAChC,GAAG,GAAE,MAAmB,GACvB,MAAM,GAAG,SAAS,CAQpB"}
|
|
@@ -3,6 +3,7 @@ import type { NestedPrettify } from "../utils/type";
|
|
|
3
3
|
import type { ApiRouterHandler } from "../http/ApiRouter";
|
|
4
4
|
import type { UnwrapPromise } from "../utils/type";
|
|
5
5
|
import type { UrlParser } from "./types";
|
|
6
|
+
import { type RetryDelayOption, type RetryOption } from "./retryPolicy";
|
|
6
7
|
export interface Config<T> {
|
|
7
8
|
fallbackData?: T;
|
|
8
9
|
/**
|
|
@@ -15,6 +16,26 @@ export interface Config<T> {
|
|
|
15
16
|
* stale rows would mislead). First mount always suspends either way.
|
|
16
17
|
*/
|
|
17
18
|
keepPreviousData?: boolean;
|
|
19
|
+
/**
|
|
20
|
+
* Background retries for a failed `suspense: false` query (under suspense
|
|
21
|
+
* the error goes to the error boundary instead). Default `3`: network
|
|
22
|
+
* failures, 408, 429 and 5xx are retried up to three times in a row with
|
|
23
|
+
* exponential backoff; any other 4xx (401, 403, 404, 422, …) is returned
|
|
24
|
+
* once and never retried, because sending the same request again gets the
|
|
25
|
+
* same answer. `false` turns retries off, `true` removes the cap, and a
|
|
26
|
+
* function `(failureCount, error) => boolean` decides alone.
|
|
27
|
+
*/
|
|
28
|
+
retry?: RetryOption;
|
|
29
|
+
/**
|
|
30
|
+
* The wait before each retry, in ms, or `(failureCount, error) => ms`.
|
|
31
|
+
* Default: `1000 * 2^(failureCount - 1)` capped at 30s — 1s, 2s, 4s. A
|
|
32
|
+
* `Retry-After` header on the failed response (a 429 or 503) wins.
|
|
33
|
+
*/
|
|
34
|
+
retryDelay?: RetryDelayOption;
|
|
35
|
+
/**
|
|
36
|
+
* @deprecated Use `retryDelay`. Kept as the base of the default backoff:
|
|
37
|
+
* the first retry waits this long, each next one twice as long.
|
|
38
|
+
*/
|
|
18
39
|
retryIntervalOnError?: number;
|
|
19
40
|
refreshInterval?: number;
|
|
20
41
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useQuery.d.ts","sourceRoot":"","sources":["../../client/useQuery.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AACjC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAEpD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAC1D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAKnD,OAAO,KAAK,EAA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AC,IAAI,CAAC,CAAC,CAAC,CAAC,GAC/B,WAAW,CAAC,CAAC,EAAE,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC;AAClC,wBAAgB,QAAQ,CAAC,CAAC,SAAS,MAAM,MAAM,EAC7C,GAAG,EAAE,CAAC,EACN,OAAO,CAAC,EAAE,OAAO,CAAC,CAAC,CAAC,EACpB,MAAM,CAAC,EAAE,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,GACvB,WAAW,CAAC,CAAC,EAAE,cAAc,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,GAAG,SAAS,CAAC,CAAC;AA0BvD;;;;;;GAMG;AACH,wBAAgB,iBAAiB,CAAC,CAAC,SAAS,MAAM,MAAM,EACtD,GAAG,EAAE,CAAC,EACN,GAAG,IAAI,EAAE,CAAC,OAAO,CAAC,EAAE,OAAO,CAAC,CAAC,CAAC,EAAE,MAAM,CAAC,EAAE,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,GACxD,WAAW,CAAC,CAAC,EAAE,cAAc,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,GAAG,SAAS,CAAC,CAsdrD"}
|
package/dist/facades/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{Cc as c,Dc as d,Ec as e,Fc as g,Gc as h,Ic as i,Jc as j,Kc as k,Mc as l,Oc as m,ad as n,bd as o,cd as p,oc as a}from"../chunk-
|
|
2
|
+
import{Cc as c,Dc as d,Ec as e,Fc as g,Gc as h,Ic as i,Jc as j,Kc as k,Mc as l,Oc as m,ad as n,bd as o,cd as p,oc as a}from"../chunk-ytt205yt.js";import"../chunk-q60vevbt.js";import"../chunk-ngq4n2b3.js";import{jf as b,qf as f}from"../chunk-xrd9xx3c.js";import"../chunk-8ypzxfvx.js";import"../chunk-8ef9n5pk.js";import"../chunk-62pzr6vf.js";import"../chunk-achgw308.js";import"../chunk-yqb9cpkx.js";import"../chunk-9p5vwn4d.js";import"../chunk-zat41156.js";import"../chunk-bm97dwbp.js";import"../chunk-f90k29w1.js";import"../chunk-ywf0kz71.js";import"../chunk-7e4rhaqs.js";import"../chunk-1x8gzkpq.js";export{h as Url,f as Storage,l as Redis,a as Redirect,m as RateLimiter,g as Query,j as Meta,i as Log,e as Lang,n as Features,b as Facade,p as DB,k as Cookie,o as ConnectionQueries,c as Broadcast,d as Auth};
|
|
3
3
|
|
|
4
4
|
//# debugId=4372DCA13D9D792964756E2164756E21
|
package/dist/http/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{Ed as G,Fd as H,Gd as I,Hd as J,Id as K,Jd as L,ic as n,jc as o,kc as p,lc as v,mc as w,nc as x,pc as y,qc as z,rc as A,sc as B,tc as C,vd as D,wd as E,xd as F}from"../chunk-
|
|
2
|
+
import{Ed as G,Fd as H,Gd as I,Hd as J,Id as K,Jd as L,ic as n,jc as o,kc as p,lc as v,mc as w,nc as x,pc as y,qc as z,rc as A,sc as B,tc as C,vd as D,wd as E,xd as F}from"../chunk-ytt205yt.js";import"../chunk-q60vevbt.js";import"../chunk-ngq4n2b3.js";import{Le as a,Me as b,Oe as c,Re as d,Se as e,Te as f,Ue as g,Ve as h,We as i,af as j,bf as k,cf as l,df as m,ef as q,ff as r,gf as s,hf as t,if as u}from"../chunk-xrd9xx3c.js";import"../chunk-8ypzxfvx.js";import"../chunk-8ef9n5pk.js";import"../chunk-62pzr6vf.js";import"../chunk-achgw308.js";import"../chunk-yqb9cpkx.js";import"../chunk-9p5vwn4d.js";import"../chunk-zat41156.js";import"../chunk-bm97dwbp.js";import"../chunk-f90k29w1.js";import"../chunk-ywf0kz71.js";import"../chunk-7e4rhaqs.js";import"../chunk-1x8gzkpq.js";export{f as toRangeHeaderValue,n as toMiddlewareList,e as resolveRange,d as parseRangeHeader,g as parseContentRange,C as middlewareConfigDefaults,c as getCookies,i as formatUnsatisfiedContentRange,h as formatContentRange,B as defineMiddlewareConfig,o as createUnsatisfiableResponse,p as createStreamResponse,y as createFileResponse,F as clientIp,z as ViewRouter,k as ValidationError,b as ResourceController,j as RequestBreakerError,E as RateLimitMiddleware,D as RateLimitExceededError,s as RangeNotSatisfiableError,K as PoliciesServiceProvider,L as Policies,A as Middleware,x as McpRouter,w as McpRouteDeclaration,l as InvalidValidationRuleError,r as InsufficientPermissionsError,m as HttpRequest,t as FileNotFoundError,I as CorsMiddleware,a as Controller,H as CacheMiddleware,J as CSRFMiddleware,q as AuthorizationError,G as AuthenticationMiddleware,u as AuthenticationError,v as ApiRouter};
|
|
3
3
|
|
|
4
4
|
//# debugId=6A673CDF057FD0B464756E2164756E21
|
package/dist/i18n/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{aa as R}from"../chunk-pjcdekm1.js";import"../chunk-9a8qz3s7.js";import{Wa as L}from"../chunk-krjkgg9v.js";import{fc as E,gc as V}from"../chunk-0kpvbnz0.js";import"../chunk-9hbwvcxn.js";import{Ec as j}from"../chunk-
|
|
2
|
+
import{aa as R}from"../chunk-pjcdekm1.js";import"../chunk-9a8qz3s7.js";import{Wa as L}from"../chunk-krjkgg9v.js";import{fc as E,gc as V}from"../chunk-0kpvbnz0.js";import"../chunk-9hbwvcxn.js";import{Ec as j}from"../chunk-ytt205yt.js";import"../chunk-q60vevbt.js";import"../chunk-ngq4n2b3.js";import"../chunk-xrd9xx3c.js";import"../chunk-8ypzxfvx.js";import"../chunk-8ef9n5pk.js";import"../chunk-62pzr6vf.js";import"../chunk-achgw308.js";import"../chunk-yqb9cpkx.js";import{mg as X}from"../chunk-9p5vwn4d.js";import"../chunk-zat41156.js";import"../chunk-bm97dwbp.js";import"../chunk-f90k29w1.js";import"../chunk-ywf0kz71.js";import"../chunk-7e4rhaqs.js";import"../chunk-1x8gzkpq.js";import{createElement as J,Fragment as M,isValidElement as U}from"react";function $(q,B){let G=Object.values(B).some((z)=>typeof z==="function"&&U(z(""))),Q=/{{([^{}]+?)(?::([^{}\[\]]+?))?(?:\[(.*?)\])?}}/g;if(!G)return q.replace(Q,(W,O,_,Z)=>{let C=O.includes(":")?O.split(":")[0]:O,H=B[C];if(H===void 0)return W;if(typeof H==="function"){let K=H(Z!==void 0?Z:"");if(U(K))throw Error("JSX returned in string context");return String(K)}if(_)switch(_.toLowerCase()){case"number":return Number(H).toString();case"string":return String(H);case"boolean":return Boolean(H).toString();default:return String(H)}return String(H)});else{let z=[],W=0,O=null;while((O=Q.exec(q))!==null){let[_,Z,C,H]=O,F=O.index,K=Z.includes(":")?Z.split(":")[0]:Z;if(F>W)z.push(q.substring(W,F));let Y=B[K];if(Y===void 0)z.push(_);else if(typeof Y==="function"){let A=Y(H!==void 0?H:"");z.push(A)}else if(C)switch(C.toLowerCase()){case"number":z.push(Number(Y).toString());break;case"string":z.push(String(Y));break;case"boolean":z.push(Boolean(Y).toString());break;default:z.push(String(Y))}else z.push(String(Y));W=F+_.length}if(W<q.length)z.push(q.substring(W));return J(M,{},...z)}}class P{name;dictionary;constructor(q,B){this.name=q;this.dictionary=B}reference(q){if(typeof window<"u")throw Error("Cannot use reference in the browser");if(!this.dictionary?.[q])throw Error(`Translation not found for ${String(q)}`);return this.dictionary[q]}render(q,...B){let{locale:G=j.locale(),params:Q}={params:{},...B[0]};if(typeof window<"u")throw Error("Cannot use render in the browser");if(!this.dictionary?.[q]?.[G])throw Error(`Translation not found for ${String(q)} in ${String(G)}`);return $(this.dictionary[q][G],Q??{})}static create(q,B){return new P(q,B)}static text(q,...B){let{locale:G=j.locale(),params:Q}={params:{},...B?.[0]};if(!q?.[G])throw Error(`Translation not found for ${String(G)}`);return $(q[G],Q??{})}}async function N(q,B,...G){let{locale:Q=j.locale(),params:z}={params:{},...G[0]},O=(await q.load(String(Q)))[B];if(typeof O!=="string")throw Error(`Translation not found for "${B}" in "${String(Q)}" (dictionary ${q.id})`);return $(O,z??{})}export{V as translationConfigDefaults,N as translate,E as defineTranslationConfig,R as defineDictionary,X as Translator,L as TranslationServiceProvider,P as Dictionary};
|
|
3
3
|
|
|
4
4
|
//# debugId=087F57B70CFEEC9064756E2164756E21
|
package/dist/kernel/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{ya as y}from"../chunk-3dd2gwrj.js";import{Va as e}from"../chunk-17q5kheg.js";import{Wa as g}from"../chunk-krjkgg9v.js";import{$a as zj,Cb as n,Fb as a,Za as _,_a as D,ab as A,bb as w,fb as P,gb as S,ib as h,jb as R,kb as u,lb as l,ob as v,pb as d,sb as p,zb as c}from"../chunk-
|
|
2
|
+
import{ya as y}from"../chunk-3dd2gwrj.js";import{Va as e}from"../chunk-17q5kheg.js";import{Wa as g}from"../chunk-krjkgg9v.js";import{$a as zj,Cb as n,Fb as a,Za as _,_a as D,ab as A,bb as w,fb as P,gb as S,ib as h,jb as R,kb as u,lb as l,ob as v,pb as d,sb as p,zb as c}from"../chunk-hny56r47.js";import"../chunk-zbhqa2z7.js";import"../chunk-a1n0thja.js";import{ac as jj}from"../chunk-mc7nbgct.js";import"../chunk-0kpvbnz0.js";import"../chunk-9hbwvcxn.js";import{Ac as Hj,Ad as Q,Bc as t,Bd as i,Cd as r,id as B,od as I,pd as E,sd as K,td as q,ud as o,yd as M,zc as Gj,zd as m}from"../chunk-ytt205yt.js";import{Nd as s}from"../chunk-q60vevbt.js";import{_d as V,de as f}from"../chunk-ngq4n2b3.js";import{$e as F,df as b}from"../chunk-xrd9xx3c.js";import{tf as L}from"../chunk-8ypzxfvx.js";import"../chunk-8ef9n5pk.js";import"../chunk-62pzr6vf.js";import"../chunk-achgw308.js";import"../chunk-yqb9cpkx.js";import"../chunk-a82m12q4.js";import"../chunk-9p5vwn4d.js";import{og as N,pg as x}from"../chunk-zat41156.js";import{qg as U}from"../chunk-bm97dwbp.js";import"../chunk-f90k29w1.js";import"../chunk-8rqdeyhv.js";import"../chunk-ywf0kz71.js";import{Dg as C}from"../chunk-7e4rhaqs.js";import"../chunk-1x8gzkpq.js";function Xj(j){let X=j.headers.get("Cache-Control")?.toLowerCase()??"";return/(^|[\s,])(public|s-maxage)\b/.test(X)}var Yj=new Set,Zj={refusal:null,apply:(j)=>j,carried:null};async function k(j){let X=x(B);if(X.config.global.length===0)return Zj;let{pathname:Z}=new URL(j.url),W=C(Z),z=new b(j,{},W?"api":"view","");return await L.run(z,async()=>{let $=L.getStore(),{headers:H,cookies:Wj}=$,Y=(J)=>{if(!Xj(J))return Q(J,H,Wj);let G=new Headers(H);return G.delete("Set-Cookie"),Q(J,G,Yj)};try{return await X.runGlobalMiddleware(),{refusal:null,apply:Y,carried:{user:$.user}}}catch(J){let G=!W&&Z.endsWith(".json");if(J?.kind===F){let O=W?m(J.payload.api):G?q(J.payload.viewData??J.payload.api):K(J.payload.view);return{refusal:Y(O),apply:Y,carried:null}}if(V(J)&&(W||G))return{refusal:Y(M()),apply:Y,carried:null};if(f(J)){console.error(J);let O=W||G?I():K(E());return{refusal:Y(O),apply:Y,carried:null}}throw J}finally{$.destroy()}})}var T=[l,d,y,P,a,A,S,v,R,D,h,n,p,u,g,c,w];class Jj{config={};providers=[];services=[];serviceInstances=[];serviceTokens=new Set;servicesBooted=!1;models=[];app=new N;boot(){if(this.models.length>0)e(...this.models);else $j();this.app.config.merge(this.config),N.setInstance(this.app),this.app.registerMany([...T,...this.providers]),this.registerServices()}registerServices(){let j=this.serviceTokens;this.serviceInstances=[],this.serviceTokens=new Set,this.servicesBooted=!1;let X=new Map;for(let Z of this.services){let W=typeof Z==="function"?new Z:Z,z=W.constructor;if(!z.token)throw Error(`Service [${z.name}] is listed in \`services\` but does not declare a \`static token\`.`);let $=X.get(z.token);if($)throw Error(`Services [${$}] and [${z.name}] both declare the token "${z.token}". Tokens are the container's keys, so they must be unique.`);X.set(z.token,z.name);let H=z;if(!j.has(z.token)&&this.app.bound(H))throw Error(`Service [${z.name}] declares the token "${z.token}", which is already bound in the container by the framework or a provider. Binding it would replace that service everywhere, so pick a token nothing else owns.`);this.app.instance(H,W),this.serviceInstances.push(W),this.serviceTokens.add(z.token)}}async waitForBoot(){await this.app.boot(),await this.bootServices(),zj(this.app)}async bootServices(){if(this.servicesBooted)return;for(let j of this.serviceInstances)await j.boot();this.servicesBooted=!0}shutdown(j){return this.run(()=>this.app.shutdown(j))}run(j){return U.run(this.app,j)}resolve(j){return this.app.make(j)}apiRoutes(){return this.app.make(i)}viewRoutes(){return this.app.make(o)}domains(){return this.app.make(r)}broadcast(){return this.app.make(t)}queue(){return this.app.make(jj)}globalMiddleware(j){return k(j)}destroy(){if(this.app.resolved(_))this.app.make(_).stop();if(this.app.flush(),N.getInstance()===this.app)N.setInstance(void 0);U.disable()}}function $j(){if(Bun.env.NODE_ENV==="production")return;let j=s();if(j.length===0)return;console.warn(`[gemi] ${j.length} model${j.length===1?" is":"s are"} registered, but Kernel.models is empty.
|
|
3
3
|
Nested relation reads resolve a model by name, so a policy on a subclass that does not own its
|
|
4
4
|
`+" name is skipped inside every include \u2014 scoped at the root, "+`unscoped in an include, with nothing
|
|
5
5
|
to notice it. Declaring the modules registers each class under its own name and audits the set:
|
package/dist/server/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{wa as Y}from"../chunk-8z37k28d.js";import{xa as L}from"../chunk-1k0gv92y.js";import{tg as b,vg as C,wg as Q,xg as V,yg as X}from"../chunk-8rqdeyhv.js";import{Cg as K}from"../chunk-ywf0kz71.js";import"../chunk-7e4rhaqs.js";import{Jg as J}from"../chunk-1x8gzkpq.js";class Z{app;instrumentation;handleSignals;server;stopping;settings;constructor(z){this.app=new L({kernel:z.kernel}),this.handleSignals=z.handleSignals??!0,this.instrumentation=V(z.instrumentation??((B,$)=>$(B)))}async start(){process.env.ROOT_DIR=K();let z=Bun.env.NODE_ENV==="production";if(z){if(this.handleSignals)X(()=>this.stop());this.settings=C()}if(await this.app.waitForBoot(),z){let{httpProd:B}=await import("../chunk-
|
|
2
|
+
import{wa as Y}from"../chunk-8z37k28d.js";import{xa as L}from"../chunk-1k0gv92y.js";import{tg as b,vg as C,wg as Q,xg as V,yg as X}from"../chunk-8rqdeyhv.js";import{Cg as K}from"../chunk-ywf0kz71.js";import"../chunk-7e4rhaqs.js";import{Jg as J}from"../chunk-1x8gzkpq.js";class Z{app;instrumentation;handleSignals;server;stopping;settings;constructor(z){this.app=new L({kernel:z.kernel}),this.handleSignals=z.handleSignals??!0,this.instrumentation=V(z.instrumentation??((B,$)=>$(B)))}async start(){process.env.ROOT_DIR=K();let z=Bun.env.NODE_ENV==="production";if(z){if(this.handleSignals)X(()=>this.stop());this.settings=C()}if(await this.app.waitForBoot(),z){let{httpProd:B}=await import("../chunk-p2ny6anh.js");this.server=await B(this.app,this.instrumentation.bind(this))}else{Y();let{httpDev:B}=await import("../chunk-dsgb59xm.js");this.server=await B(this.app,this.instrumentation.bind(this))}return this.server}stop(z={}){return this.stopping??=Q({server:this.server,shutdownProviders:(B)=>this.app.shutdown(B),settings:{...this.settings??C(),...z}}),this.stopping}}export{b as isShuttingDown,Z as Server};
|
|
3
3
|
|
|
4
4
|
//# debugId=D37D11A57B54465764756E2164756E21
|
package/dist/services/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{Ya as mW}from"../chunk-zytmxty5.js";import{Ab as AW,Bb as yW,Cb as VW,Db as gW,Eb as cW,Fb as EW,Za as u6,_a as BW,ab as xW,bb as NW,cb as LW,db as DW,eb as FW,fb as OW,gb as HW,hb as U,ib as UW,jb as SW,kb as fW,lb as RW,mb as kW,nb as _W,ob as CW,pb as bW,qb as vW,rb as IW,sb as TW,tb as i4,ub as o4,vb as y1,wb as qW,xb as hW,yb as PW,zb as wW}from"../chunk-
|
|
2
|
+
import{Ya as mW}from"../chunk-zytmxty5.js";import{Ab as AW,Bb as yW,Cb as VW,Db as gW,Eb as cW,Fb as EW,Za as u6,_a as BW,ab as xW,bb as NW,cb as LW,db as DW,eb as FW,fb as OW,gb as HW,hb as U,ib as UW,jb as SW,kb as fW,lb as RW,mb as kW,nb as _W,ob as CW,pb as bW,qb as vW,rb as IW,sb as TW,tb as i4,ub as o4,vb as y1,wb as qW,xb as hW,yb as PW,zb as wW}from"../chunk-hny56r47.js";import"../chunk-zbhqa2z7.js";import{Ib as o6,Jb as s6,Kb as a6,Lb as t6,Mb as r6,Nb as e6,Ob as WW,Pb as YW,Qb as JW,Rb as ZW,Sb as GW,Tb as $W,Ub as QW,Vb as KW,Wb as XW,Xb as zW}from"../chunk-a1n0thja.js";import{$b as n6,Yb as d6,Zb as p6,_b as l6,ac as i6}from"../chunk-mc7nbgct.js";import{fc as MW,gc as jW}from"../chunk-0kpvbnz0.js";import"../chunk-9hbwvcxn.js";import{$c as R6,Bc as $6,Bd as A6,Dd as y6,Hc as B6,Lc as N1,Nc as x6,Pc as M6,Qc as j6,Rc as N6,Sc as L6,Tc as D6,Uc as F6,Vc as O6,Wc as m4,Xc as H6,Yc as U6,Zc as S6,_c as f6,dd as k6,ed as _6,fd as C6,gd as b6,hd as v6,id as I6,jd as T6,kd as q6,ld as h6,nd as P6,oc as C0,sc as r0,tc as e0,uc as W6,ud as w6,vc as Y6,wc as J6,xc as Z6,yc as G6}from"../chunk-ytt205yt.js";import"../chunk-q60vevbt.js";import"../chunk-ngq4n2b3.js";import{Se as A1,Te as P1,Ue as W1,gf as V,hf as P,lf as Y1,mf as Q6,nf as K6,of as X6,pf as z6}from"../chunk-xrd9xx3c.js";import"../chunk-8ypzxfvx.js";import"../chunk-8ef9n5pk.js";import"../chunk-62pzr6vf.js";import"../chunk-achgw308.js";import"../chunk-yqb9cpkx.js";import{gg as V6,hg as g6,ig as c6,jg as E6,kg as m6}from"../chunk-a82m12q4.js";import"../chunk-9p5vwn4d.js";import{pg as g}from"../chunk-zat41156.js";import"../chunk-bm97dwbp.js";import"../chunk-f90k29w1.js";import"../chunk-8rqdeyhv.js";import"../chunk-ywf0kz71.js";import"../chunk-7e4rhaqs.js";import{Jg as d4}from"../chunk-1x8gzkpq.js";import{Buffer as u4}from"buffer";class p4 extends Y1{client;config;constructor(...W){super();this.config=W}async connect(){let W=await import("../chunk-371tt28q.js");return this.client??=new W.S3Client(...this.config),{sdk:W,client:this.client}}async put(W,{signal:Y}={}){Y?.throwIfAborted();let J,Z,G,$=process.env.BUCKET_NAME;if(W instanceof Blob)J=W,G=`${Bun.randomUUIDv7()}.${W.type.split("/")[1].split(";")[0]}`,Z=W.type;else J=W.body,G=W.name,$=W.bucket??$,Z=W.contentType||(J instanceof Blob||J instanceof File?J.type:void 0);Z=Z||void 0;let Q=J instanceof u4?J:J instanceof Blob||J instanceof File?u4.from(await J.arrayBuffer()):"",{sdk:K,client:z}=await this.connect();return Y?.throwIfAborted(),await z.send(new K.PutObjectCommand({Bucket:$,Key:G,Body:Q,ContentType:Z}),{abortSignal:Y}),G}async delete(W){let Y=typeof W==="string"?W:W.name,J=(typeof W==="string"?void 0:W.bucket)??process.env.BUCKET_NAME;if(!Y)throw Error("Object name has to be specified");let{sdk:Z,client:G}=await this.connect();try{await G.send(new Z.DeleteObjectCommand({Bucket:J,Key:Y}))}catch($){if($?.name==="NoSuchKey"||$?.$metadata?.httpStatusCode===404)return;throw $}}async list(W){let{sdk:Y,client:J}=await this.connect();return await J.send(new Y.ListObjectsV2Command({Bucket:process.env.BUCKET_NAME,Prefix:W}))}async fetch(W){let Y=process.env.BUCKET_NAME,J;if(typeof W==="string")J=W;else Y=W.bucket??Y,J=W.name;if(!J)throw Error("Object name has to be specified");let{sdk:Z,client:G}=await this.connect(),$=await G.send(new Z.GetObjectCommand({Bucket:Y,Key:J}));return new Response($.Body.transformToWebStream(),{headers:{"Content-Type":$.ContentType,"Content-Length":$.ContentLength.toString(),"Cache-Control":"private, max-age=12000, must-revalidate","Last-Modified":$.LastModified?.toUTCString()||"",ETag:$.ETag||""}})}async read(W){let Y=typeof W==="string"?{name:W}:W,J=Y.bucket??process.env.BUCKET_NAME,{name:Z,range:G=null}=Y;if(!Z)throw Error("Object name has to be specified");let{sdk:$,client:Q}=await this.connect(),K;try{K=await Q.send(new $.GetObjectCommand({Bucket:J,Key:Z,Range:G?P1(G):void 0}))}catch(M){if(M?.name==="InvalidRange"||M?.$metadata?.httpStatusCode===416)throw new V(await this.size({name:Z,bucket:J}));if(M?.name==="NoSuchKey"||M?.$metadata?.httpStatusCode===404)throw new P(Z);throw M}let z=W1(K.ContentRange),X=Boolean(z)&&K.$metadata?.httpStatusCode===206,x=z?.total??K.ContentLength??0;return{body:K.Body.transformToWebStream(),start:z?.start??0,end:z?.end??x-1,total:x,partial:X,type:K.ContentType??"application/octet-stream",etag:K.ETag||void 0,lastModified:K.LastModified,name:Z}}async size(W){let Y=typeof W==="string"?W:W.name,J=(typeof W==="string"?void 0:W.bucket)??process.env.BUCKET_NAME,{sdk:Z,client:G}=await this.connect();try{return(await G.send(new Z.HeadObjectCommand({Bucket:J,Key:Y}))).ContentLength??0}catch($){if($?.name==="NotFound"||$?.$metadata?.httpStatusCode===404)throw new P(Y);throw $}}}import{Buffer as l4}from"buffer";import{Readable as T0}from"stream";function w1(W){return W?.statusCode===404||W?.details?.errorCode==="BlobNotFound"||W?.code==="BlobNotFound"}function q0(W){return W?.statusCode===416||W?.details?.errorCode==="InvalidRange"||W?.code==="InvalidRange"}class n4 extends Y1{config;serviceClientPromise=null;constructor(W={}){super();this.config=W}async serviceClient(){if(this.config.serviceClient)return this.config.serviceClient;return this.serviceClientPromise??=(async()=>{let W;try{W=await import("@azure/storage-blob")}catch{throw Error("AzureBlobDriver requires the '@azure/storage-blob' package. Install it with `bun add @azure/storage-blob`, or pass a pre-built `serviceClient`.")}let Y=this.config.connectionString??process.env.AZURE_STORAGE_CONNECTION_STRING;if(this.config.url)return new W.BlobServiceClient(this.config.url,this.config.credential);if(Y)return W.BlobServiceClient.fromConnectionString(Y);throw Error("AzureBlobDriver needs a connection string (AZURE_STORAGE_CONNECTION_STRING), a `url`, or a `serviceClient`.")})(),this.serviceClientPromise}async blob(W,Y){if(!W)throw Error("Object name has to be specified");let J=Y??this.config.container??process.env.BUCKET_NAME;if(!J)throw Error("AzureBlobDriver needs a container name, from `bucket`, the `container` config, or BUCKET_NAME.");return(await this.serviceClient()).getContainerClient(J).getBlockBlobClient(W)}async put(W,{signal:Y}={}){Y?.throwIfAborted();let J,Z,G,$;if(W instanceof Blob)J=W,G=`${Bun.randomUUIDv7()}.${W.type.split("/")[1].split(";")[0]}`,Z=W.type;else J=W.body,G=W.name,$=W.bucket,Z=W.contentType??(J instanceof Blob||J instanceof File?J.type:void 0);let Q=J instanceof l4?J:l4.from(await J.arrayBuffer()),K=await this.blob(G,$);return Y?.throwIfAborted(),await K.uploadData(Q,{blobHTTPHeaders:Z?{blobContentType:Z}:void 0,abortSignal:Y}),G}async list(W){let Y=this.config.container??process.env.BUCKET_NAME,Z=(await this.serviceClient()).getContainerClient(Y),G=[];for await(let $ of Z.listBlobsFlat({prefix:W}))G.push($.name);return G}async fetch(W){let Y=await this.read(typeof W==="string"?{name:W}:{name:W.name,bucket:W.bucket});return new Response(Y.body,{headers:{"Content-Type":Y.type,"Content-Length":String(Y.total),"Cache-Control":"private, max-age=12000, must-revalidate","Last-Modified":Y.lastModified?.toUTCString()??"",ETag:Y.etag??""}})}async read(W){let Y=typeof W==="string"?{name:W}:W,{name:J,bucket:Z,range:G=null}=Y,$=await this.blob(J,Z),Q,K,z=G?.kind==="suffix"||G?.kind==="offset"&&G.end===null&&G.start===0;if(G&&z){let k=await this.size({name:J,bucket:Z}),e=A1(G,k);if(!e)throw new V(k);Q=e.start,K=e.length}else if(G?.kind==="offset")Q=G.start,K=G.end===null?void 0:G.end-G.start+1;let X;try{X=await $.download(Q,K)}catch(k){if(q0(k))throw new V(await this.size({name:J,bucket:Z}));if(w1(k))throw new P(J);throw k}let x=W1(X.contentRange),M=Boolean(x),R=x?.total??X.contentLength??0;return{body:await h0(X),start:x?.start??0,end:x?.end??R-1,total:R,partial:M,type:X.contentType??"application/octet-stream",etag:X.etag||void 0,lastModified:X.lastModified,name:J}}async size(W){let Y=typeof W==="string"?W:W.name,J=typeof W==="string"?void 0:W.bucket,Z=await this.blob(Y,J);try{return(await Z.getProperties()).contentLength??0}catch(G){if(w1(G))throw new P(Y);throw G}}async delete(W){let Y=typeof W==="string"?W:W.name,J=typeof W==="string"?void 0:W.bucket,Z=await this.blob(Y,J);try{await Z.delete()}catch(G){if(w1(G))return;throw G}}}async function h0(W){if(W.blobBody)return await W.blobBody;if(W.readableStreamBody)return T0.toWeb(W.readableStreamBody);return null}var P0=`
|
|
3
3
|
local currentKey = KEYS[1]
|
|
4
4
|
local previousKey = KEYS[2]
|
|
5
5
|
local limit = tonumber(ARGV[1])
|
|
@@ -29,8 +29,12 @@ import type { QueueDriver } from "./QueueDriver";
|
|
|
29
29
|
*
|
|
30
30
|
* The timing tests use real, short leases and delays rather than fake timers,
|
|
31
31
|
* because a driver measuring time on its database's clock cannot be faked from
|
|
32
|
-
* here.
|
|
33
|
-
*
|
|
32
|
+
* here. Waiting for a delay or a lease to pass is safe on any runner: the
|
|
33
|
+
* sleep only ever makes it longer. Asserting that one has *not* passed yet is
|
|
34
|
+
* not, because a loaded runner can take longer than `SHORT` between two
|
|
35
|
+
* statements, and then handing the job out is right. Those assertions go
|
|
36
|
+
* through `notYet`, which makes them only when the client saw too little time
|
|
37
|
+
* pass for the driver to be allowed to — see there.
|
|
34
38
|
*/
|
|
35
39
|
export declare function queueDriverContract(name: string, create: () => QueueDriver | Promise<QueueDriver>, cleanup?: (driver: QueueDriver) => void | Promise<void>, features?: {
|
|
36
40
|
claimsByName?: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"queueDriverContract.d.ts","sourceRoot":"","sources":["../../../services/queue/queueDriverContract.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAEjD
|
|
1
|
+
{"version":3,"file":"queueDriverContract.d.ts","sourceRoot":"","sources":["../../../services/queue/queueDriverContract.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAEjD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoCG;AACH,wBAAgB,mBAAmB,CACjC,IAAI,EAAE,MAAM,EACZ,MAAM,EAAE,MAAM,WAAW,GAAG,OAAO,CAAC,WAAW,CAAC,EAChD,OAAO,CAAC,EAAE,CAAC,MAAM,EAAE,WAAW,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,EACvD,QAAQ,GAAE;IACR,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,WAAW,CAAC,EAAE;QACZ,GAAG,CAAC,MAAM,EAAE,WAAW,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;QACjE,KAAK,EAAE,OAAO,CAAC;KAChB,CAAC;CACE,QAulBP"}
|
package/dist/testing/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { E as ServerDataContext, F as applyParams, L as QueryManagerContext, M as Action, N as createMemoryHistory, P as toVariantKey, R as QueryManagerProvider, T as I18nProvider,
|
|
1
|
+
import { E as ServerDataContext, F as applyParams, K as Subject, L as QueryManagerContext, M as Action, N as createMemoryHistory, P as toVariantKey, R as QueryManagerProvider, T as I18nProvider, a as m, c as ClientRouterContext, j as ProgressManager, o as RouteTransitionProvider, r as WebSocketContext, t as ThemeProvider } from "../chunks/ThemeProvider-BiNFL6l7.js";
|
|
2
2
|
import { r as RouteStateProvider } from "../chunks/useParams-BN3XXfmG.js";
|
|
3
3
|
import { Suspense, useContext, useMemo, useRef, useState } from "react";
|
|
4
4
|
import { jsx } from "react/jsx-runtime";
|