gemi 0.84.1 → 0.85.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/Agent.d.ts +41 -3
- package/dist/ai/Agent.d.ts.map +1 -1
- package/dist/ai/AgentController.d.ts +238 -0
- package/dist/ai/AgentController.d.ts.map +1 -1
- package/dist/ai/AgentProvider.d.ts +15 -0
- package/dist/ai/AgentProvider.d.ts.map +1 -1
- package/dist/ai/client/index.d.ts +2 -2
- package/dist/ai/client/index.d.ts.map +1 -1
- package/dist/ai/client/index.js +138 -35
- package/dist/ai/client/index.js.map +1 -1
- package/dist/ai/client/reducer.d.ts +7 -1
- package/dist/ai/client/reducer.d.ts.map +1 -1
- package/dist/ai/generate.d.ts.map +1 -1
- package/dist/ai/index.d.ts +4 -2
- package/dist/ai/index.d.ts.map +1 -1
- package/dist/ai/index.js +12 -12
- package/dist/ai/index.js.map +19 -16
- package/dist/ai/providers/call.d.ts +4 -0
- package/dist/ai/providers/call.d.ts.map +1 -1
- package/dist/ai/providers/fileRejection.d.ts +84 -0
- package/dist/ai/providers/fileRejection.d.ts.map +1 -0
- package/dist/ai/providers/request.d.ts.map +1 -1
- package/dist/ai/redact.d.ts +70 -0
- package/dist/ai/redact.d.ts.map +1 -0
- package/dist/ai/signing.d.ts +33 -4
- package/dist/ai/signing.d.ts.map +1 -1
- package/dist/ai/store/Attachments.d.ts +5 -3
- package/dist/ai/store/Attachments.d.ts.map +1 -1
- package/dist/ai/store/FileOwners.d.ts +59 -0
- package/dist/ai/store/FileOwners.d.ts.map +1 -0
- package/dist/ai/store/LiveRuns.d.ts +25 -0
- package/dist/ai/store/LiveRuns.d.ts.map +1 -1
- package/dist/ai/store/MemoryAgentStore.d.ts +1 -0
- package/dist/ai/store/MemoryAgentStore.d.ts.map +1 -1
- package/dist/ai/store/Nonces.d.ts +109 -0
- package/dist/ai/store/Nonces.d.ts.map +1 -0
- package/dist/ai/store/index.d.ts +2 -0
- package/dist/ai/store/index.d.ts.map +1 -1
- package/dist/ai/types.d.ts +30 -1
- package/dist/ai/types.d.ts.map +1 -1
- package/dist/ai/useChat.d.ts +62 -3
- package/dist/ai/useChat.d.ts.map +1 -1
- package/dist/app/index.js +1 -1
- package/dist/bun/plugin.js +1 -1
- package/dist/bun/preload.js +1 -1
- package/dist/{chunk-82nn71zs.js → chunk-09sr33ff.js} +2 -2
- package/dist/{chunk-82nn71zs.js.map → chunk-09sr33ff.js.map} +1 -1
- package/dist/chunk-174jkg6d.js +7 -0
- package/dist/{chunk-302mkqeq.js.map → chunk-174jkg6d.js.map} +9 -8
- package/dist/{chunk-87x692j7.js → chunk-1b5s4w5f.js} +2 -2
- package/dist/{chunk-87x692j7.js.map → chunk-1b5s4w5f.js.map} +1 -1
- package/dist/{chunk-rmv1jp9p.js → chunk-1jcp8m8h.js} +2 -2
- package/dist/{chunk-rmv1jp9p.js.map → chunk-1jcp8m8h.js.map} +1 -1
- package/dist/{chunk-g6qe6wyb.js → chunk-1w5a11cd.js} +2 -2
- package/dist/{chunk-g6qe6wyb.js.map → chunk-1w5a11cd.js.map} +1 -1
- package/dist/chunk-1wby1sr2.js +5 -0
- package/dist/{chunk-e43drft2.js.map → chunk-1wby1sr2.js.map} +3 -3
- package/dist/{chunk-vmpzg4z5.js → chunk-1yq1e6sb.js} +3 -3
- package/dist/{chunk-vmpzg4z5.js.map → chunk-1yq1e6sb.js.map} +1 -1
- package/dist/chunk-1yzdxv2a.js +5 -0
- package/dist/{chunk-tmwsvf02.js.map → chunk-1yzdxv2a.js.map} +1 -1
- package/dist/{chunk-ah9ajys0.js → chunk-2gdhcswa.js} +1 -1
- package/dist/chunk-2k5kyk0h.js +24 -0
- package/dist/chunk-2k5kyk0h.js.map +17 -0
- package/dist/{chunk-1evk2pma.js → chunk-2yw23zhn.js} +4 -4
- package/dist/{chunk-1evk2pma.js.map → chunk-2yw23zhn.js.map} +1 -1
- package/dist/{chunk-3z6wkvwj.js → chunk-4ysar3ev.js} +2 -2
- package/dist/{chunk-3z6wkvwj.js.map → chunk-4ysar3ev.js.map} +1 -1
- package/dist/{chunk-z409rk5j.js → chunk-4zj05vry.js} +2 -2
- package/dist/{chunk-z409rk5j.js.map → chunk-4zj05vry.js.map} +1 -1
- package/dist/{chunk-1cebv3h8.js → chunk-55x9kkdt.js} +2 -2
- package/dist/{chunk-1cebv3h8.js.map → chunk-55x9kkdt.js.map} +1 -1
- package/dist/{chunk-0agfx93f.js → chunk-5ktfpty1.js} +2 -2
- package/dist/{chunk-0agfx93f.js.map → chunk-5ktfpty1.js.map} +1 -1
- package/dist/chunk-6k2czkkh.js +55 -0
- package/dist/{chunk-rp5j1mgk.js.map → chunk-6k2czkkh.js.map} +3 -3
- package/dist/{chunk-3zb2ycxj.js → chunk-7c33ngqs.js} +2 -2
- package/dist/{chunk-3zb2ycxj.js.map → chunk-7c33ngqs.js.map} +1 -1
- package/dist/{chunk-en3mtnsg.js → chunk-7n5775qx.js} +2 -2
- package/dist/{chunk-en3mtnsg.js.map → chunk-7n5775qx.js.map} +1 -1
- package/dist/{chunk-bn9pzgww.js → chunk-7nj2t2gm.js} +2 -2
- package/dist/{chunk-bn9pzgww.js.map → chunk-7nj2t2gm.js.map} +1 -1
- package/dist/{chunk-kfavcgv2.js → chunk-81k26w39.js} +2 -2
- package/dist/{chunk-kfavcgv2.js.map → chunk-81k26w39.js.map} +1 -1
- package/dist/{chunk-cg4k40zy.js → chunk-81v4c4b1.js} +2 -2
- package/dist/{chunk-cg4k40zy.js.map → chunk-81v4c4b1.js.map} +1 -1
- package/dist/{chunk-wh728wd6.js → chunk-8gexb1gt.js} +2 -2
- package/dist/{chunk-wh728wd6.js.map → chunk-8gexb1gt.js.map} +1 -1
- package/dist/{chunk-zfch4da5.js → chunk-9tsw1bmt.js} +2 -2
- package/dist/{chunk-8mmfpqgs.js.map → chunk-9tsw1bmt.js.map} +1 -1
- package/dist/{chunk-m0zba09s.js → chunk-9tv5j3b2.js} +3 -3
- package/dist/{chunk-m0zba09s.js.map → chunk-9tv5j3b2.js.map} +1 -1
- package/dist/{chunk-jg9eqd3r.js → chunk-c3gzpjba.js} +1 -1
- package/dist/{chunk-r5e4vpa1.js → chunk-cbycz5z3.js} +2 -2
- package/dist/{chunk-r5e4vpa1.js.map → chunk-cbycz5z3.js.map} +1 -1
- package/dist/{chunk-cfvq30n4.js → chunk-cfykfnqx.js} +2 -2
- package/dist/{chunk-cfvq30n4.js.map → chunk-cfykfnqx.js.map} +1 -1
- package/dist/{chunk-eysexnqb.js → chunk-ct7wxm98.js} +2 -2
- package/dist/{chunk-eysexnqb.js.map → chunk-ct7wxm98.js.map} +1 -1
- package/dist/{chunk-v27a4se1.js → chunk-d3jkypc7.js} +3 -3
- package/dist/{chunk-v27a4se1.js.map → chunk-d3jkypc7.js.map} +1 -1
- package/dist/{chunk-vfrrzr10.js → chunk-dadygfkf.js} +2 -2
- package/dist/{chunk-vfrrzr10.js.map → chunk-dadygfkf.js.map} +1 -1
- package/dist/{chunk-m4xw99vm.js → chunk-dwqh79e5.js} +2 -2
- package/dist/{chunk-m4xw99vm.js.map → chunk-dwqh79e5.js.map} +1 -1
- package/dist/{chunk-ng8pp9k2.js → chunk-fbwe0agk.js} +2 -2
- package/dist/{chunk-ng8pp9k2.js.map → chunk-fbwe0agk.js.map} +1 -1
- package/dist/{chunk-495qwteq.js → chunk-fc2je244.js} +3 -3
- package/dist/{chunk-495qwteq.js.map → chunk-fc2je244.js.map} +1 -1
- package/dist/{chunk-gr61ymse.js → chunk-gx0x772p.js} +2 -2
- package/dist/{chunk-gr61ymse.js.map → chunk-gx0x772p.js.map} +1 -1
- package/dist/{chunk-tdnfhe7x.js → chunk-ha705bcz.js} +3 -3
- package/dist/{chunk-tdnfhe7x.js.map → chunk-ha705bcz.js.map} +1 -1
- package/dist/chunk-jhe0t7yj.js +5 -0
- package/dist/chunk-jhe0t7yj.js.map +11 -0
- package/dist/{chunk-d0qwdeza.js → chunk-k5j65f2c.js} +2 -2
- package/dist/{chunk-d0qwdeza.js.map → chunk-k5j65f2c.js.map} +1 -1
- package/dist/{chunk-pt59xjfc.js → chunk-kmsrzbx1.js} +2 -2
- package/dist/{chunk-pt59xjfc.js.map → chunk-kmsrzbx1.js.map} +1 -1
- package/dist/{chunk-v1nm4tcq.js → chunk-m7y8d3k7.js} +2 -2
- package/dist/{chunk-v1nm4tcq.js.map → chunk-m7y8d3k7.js.map} +1 -1
- package/dist/{chunk-k2qh3hvd.js → chunk-mk8m3ffx.js} +2 -2
- package/dist/{chunk-k2qh3hvd.js.map → chunk-mk8m3ffx.js.map} +1 -1
- package/dist/{chunk-z7442w3q.js → chunk-mszy6cfw.js} +2 -2
- package/dist/{chunk-z7442w3q.js.map → chunk-mszy6cfw.js.map} +1 -1
- package/dist/{chunk-kb3xk9r8.js → chunk-ndat0nf0.js} +2 -2
- package/dist/{chunk-kb3xk9r8.js.map → chunk-ndat0nf0.js.map} +1 -1
- package/dist/{chunk-j9wqzemf.js → chunk-p0m3qgs5.js} +2 -2
- package/dist/{chunk-j9wqzemf.js.map → chunk-p0m3qgs5.js.map} +1 -1
- package/dist/{chunk-8mmfpqgs.js → chunk-p7r3ecpk.js} +2 -2
- package/dist/{chunk-zfch4da5.js.map → chunk-p7r3ecpk.js.map} +1 -1
- package/dist/{chunk-zp971jp2.js → chunk-pmmrhak1.js} +3 -3
- package/dist/{chunk-zp971jp2.js.map → chunk-pmmrhak1.js.map} +1 -1
- package/dist/{chunk-nvj1z2rs.js → chunk-pzwyg474.js} +2 -2
- package/dist/{chunk-nvj1z2rs.js.map → chunk-pzwyg474.js.map} +1 -1
- package/dist/{chunk-73dk6k4p.js → chunk-qje4kdff.js} +3 -3
- package/dist/{chunk-73dk6k4p.js.map → chunk-qje4kdff.js.map} +1 -1
- package/dist/{chunk-yk8s5egf.js → chunk-rdnm6rem.js} +2 -2
- package/dist/{chunk-yk8s5egf.js.map → chunk-rdnm6rem.js.map} +1 -1
- package/dist/{chunk-enf9mdac.js → chunk-s046a984.js} +2 -2
- package/dist/{chunk-enf9mdac.js.map → chunk-s046a984.js.map} +1 -1
- package/dist/{chunk-1s914cdj.js → chunk-saqfc6vp.js} +3 -3
- package/dist/{chunk-1s914cdj.js.map → chunk-saqfc6vp.js.map} +1 -1
- package/dist/{chunk-pgpqsgzx.js → chunk-sejnmn1q.js} +1 -1
- package/dist/{chunk-xhha1gb3.js → chunk-sjckrbr2.js} +2 -2
- package/dist/{chunk-xhha1gb3.js.map → chunk-sjckrbr2.js.map} +1 -1
- package/dist/{chunk-r8nhndzb.js → chunk-swhyp0yw.js} +2 -2
- package/dist/{chunk-r8nhndzb.js.map → chunk-swhyp0yw.js.map} +1 -1
- package/dist/{chunk-wkdzz0rx.js → chunk-trdwxm5x.js} +3 -3
- package/dist/{chunk-wkdzz0rx.js.map → chunk-trdwxm5x.js.map} +1 -1
- package/dist/{chunk-aztkrzvf.js → chunk-v2hvnxsf.js} +2 -2
- package/dist/{chunk-aztkrzvf.js.map → chunk-v2hvnxsf.js.map} +1 -1
- package/dist/{chunk-57ryyhh3.js → chunk-v4ngf77f.js} +2 -2
- package/dist/{chunk-57ryyhh3.js.map → chunk-v4ngf77f.js.map} +1 -1
- package/dist/{chunk-159hyeng.js → chunk-v8nf45gt.js} +2 -2
- package/dist/{chunk-159hyeng.js.map → chunk-v8nf45gt.js.map} +1 -1
- package/dist/{chunk-ys4fejmx.js → chunk-vwp1g8wh.js} +2 -2
- package/dist/{chunk-ys4fejmx.js.map → chunk-vwp1g8wh.js.map} +1 -1
- package/dist/chunk-w312e9nx.js +5 -0
- package/dist/{chunk-ash9e6fn.js.map → chunk-w312e9nx.js.map} +4 -3
- package/dist/{chunk-wwdaswxh.js → chunk-wwzg4dmy.js} +3 -3
- package/dist/{chunk-wwdaswxh.js.map → chunk-wwzg4dmy.js.map} +1 -1
- package/dist/{chunk-wsx3j5ws.js → chunk-xckeyg3v.js} +2 -2
- package/dist/{chunk-wsx3j5ws.js.map → chunk-xckeyg3v.js.map} +1 -1
- package/dist/chunk-xx2zg6sk.js +17 -0
- package/dist/{chunk-49akdtfe.js.map → chunk-xx2zg6sk.js.map} +11 -12
- package/dist/{chunk-rqh2wdhb.js → chunk-y7qnx8vm.js} +2 -2
- package/dist/{chunk-rqh2wdhb.js.map → chunk-y7qnx8vm.js.map} +1 -1
- package/dist/{chunk-rv7da58g.js → chunk-z4k18gnp.js} +2 -2
- package/dist/{chunk-rv7da58g.js.map → chunk-z4k18gnp.js.map} +1 -1
- package/dist/{chunk-w099t7zj.js → chunk-zf4r4kat.js} +2 -2
- package/dist/{chunk-w099t7zj.js.map → chunk-zf4r4kat.js.map} +1 -1
- package/dist/{chunk-dvpxkzms.js → chunk-zs90w6ke.js} +2 -2
- package/dist/{chunk-dvpxkzms.js.map → chunk-zs90w6ke.js.map} +1 -1
- package/dist/chunks/{ThemeProvider-Dn3UREDn.js → ThemeProvider-D1kDfCwY.js} +59 -2
- package/dist/chunks/ThemeProvider-D1kDfCwY.js.map +1 -0
- package/dist/client/Link.d.ts.map +1 -1
- package/dist/client/MutationError.d.ts +60 -50
- package/dist/client/MutationError.d.ts.map +1 -1
- package/dist/client/ProgressManager.d.ts +1 -1
- package/dist/client/QueryResource.d.ts +20 -0
- package/dist/client/QueryResource.d.ts.map +1 -1
- package/dist/client/index.d.ts +2 -1
- package/dist/client/index.d.ts.map +1 -1
- package/dist/client/index.js +109 -35
- package/dist/client/index.js.map +1 -1
- package/dist/client/useMutation.d.ts.map +1 -1
- package/dist/client/useQuery.d.ts.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/index.js +2 -2
- package/dist/database/index.js.map +1 -1
- package/dist/email/Email.d.ts.map +1 -1
- package/dist/email/debugEmail.d.ts +40 -0
- package/dist/email/debugEmail.d.ts.map +1 -0
- package/dist/email/index.js +4 -3
- package/dist/email/index.js.map +6 -5
- 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/ApiRouter.d.ts +12 -0
- package/dist/http/ApiRouter.d.ts.map +1 -1
- package/dist/http/CSRFMiddleware.d.ts +1 -1
- package/dist/http/CSRFMiddleware.d.ts.map +1 -1
- package/dist/http/Error.d.ts +50 -0
- package/dist/http/Error.d.ts.map +1 -1
- package/dist/http/HttpRequest.d.ts +26 -0
- package/dist/http/HttpRequest.d.ts.map +1 -1
- package/dist/http/RateLimitMiddleware.d.ts +6 -3
- package/dist/http/RateLimitMiddleware.d.ts.map +1 -1
- package/dist/http/Router.d.ts.map +1 -1
- package/dist/http/errors.d.ts.map +1 -1
- package/dist/http/index.d.ts +2 -1
- package/dist/http/index.d.ts.map +1 -1
- package/dist/http/index.js +2 -2
- package/dist/http/index.js.map +1 -1
- package/dist/http/mediaType.d.ts +16 -0
- package/dist/http/mediaType.d.ts.map +1 -0
- package/dist/http/refusal.d.ts +52 -0
- package/dist/http/refusal.d.ts.map +1 -0
- 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/index.js +2 -2
- package/dist/orm/index.js.map +1 -1
- package/dist/server/devFetch.d.ts.map +1 -1
- package/dist/server/forwardedFor.d.ts +42 -0
- package/dist/server/forwardedFor.d.ts.map +1 -0
- package/dist/server/httpProd.d.ts.map +1 -1
- package/dist/server/index.js +2 -2
- package/dist/server/index.js.map +1 -1
- package/dist/server/staticFile.d.ts +33 -0
- package/dist/server/staticFile.d.ts.map +1 -0
- package/dist/server/unhandledError.d.ts.map +1 -1
- package/dist/services/index.js +2 -2
- package/dist/services/index.js.map +2 -2
- package/dist/services/mcp/McpRegistry.d.ts +2 -1
- package/dist/services/mcp/McpRegistry.d.ts.map +1 -1
- package/dist/services/mcp/toAgentTools.d.ts +1 -1
- package/dist/services/mcp/toAgentTools.d.ts.map +1 -1
- package/dist/services/queue/work.js +2 -2
- package/dist/services/queue/work.js.map +1 -1
- package/dist/services/router/notFound.d.ts.map +1 -1
- package/dist/services/router/policyDenied.d.ts.map +1 -1
- package/dist/services/router/serverQueryFetcher.d.ts.map +1 -1
- package/dist/support/index.js +2 -2
- package/dist/support/index.js.map +1 -1
- package/dist/testing/index.js +1 -1
- package/package.json +1 -1
- package/skills/gemi-react-best-practices/rules/controller-throw-framework-errors.md +5 -0
- package/dist/chunk-302mkqeq.js +0 -7
- package/dist/chunk-49akdtfe.js +0 -17
- package/dist/chunk-ash9e6fn.js +0 -5
- package/dist/chunk-e43drft2.js +0 -5
- package/dist/chunk-j5xcfeqx.js +0 -24
- package/dist/chunk-j5xcfeqx.js.map +0 -16
- package/dist/chunk-rp5j1mgk.js +0 -55
- package/dist/chunk-tmwsvf02.js +0 -5
- package/dist/chunks/ThemeProvider-Dn3UREDn.js.map +0 -1
- /package/dist/{chunk-ah9ajys0.js.map → chunk-2gdhcswa.js.map} +0 -0
- /package/dist/{chunk-jg9eqd3r.js.map → chunk-c3gzpjba.js.map} +0 -0
- /package/dist/{chunk-pgpqsgzx.js.map → chunk-sejnmn1q.js.map} +0 -0
package/dist/http/Error.d.ts
CHANGED
|
@@ -1,5 +1,35 @@
|
|
|
1
|
+
import { type Refusal, type RefusalKind } from "./refusal";
|
|
1
2
|
export declare const GEMI_REQUEST_BREAKER_ERROR = "GEMI_REQUEST_BREAKER_ERROR";
|
|
3
|
+
export type RequestBreakerOptions = {
|
|
4
|
+
/** The answer's status. 400 when absent. */
|
|
5
|
+
status?: number;
|
|
6
|
+
/**
|
|
7
|
+
* What the client's guards classify it as. Absent, it follows from
|
|
8
|
+
* `status`: 401 `authentication`, 403 `permission`, 404 `not_found`, 429
|
|
9
|
+
* `rate_limit`, 5xx `server_error`, any other status `form_error`.
|
|
10
|
+
*/
|
|
11
|
+
kind?: Exclude<RefusalKind, "validation_error">;
|
|
12
|
+
/** Extra headers for the API answer. */
|
|
13
|
+
headers?: Record<string, string>;
|
|
14
|
+
};
|
|
2
15
|
export declare class RequestBreakerError extends Error {
|
|
16
|
+
/**
|
|
17
|
+
* Answer the refusals that were bare strings before 0.85 — authentication,
|
|
18
|
+
* authorization, permission, CSRF and a 500 — with that string again,
|
|
19
|
+
* instead of `{ kind, message, status }`.
|
|
20
|
+
*
|
|
21
|
+
* For a shipped native client that reads `body.error` as a string and cannot
|
|
22
|
+
* be rolled forward in the same deploy as the server. Set it once at boot,
|
|
23
|
+
* and remove the line when the clients read `body.error.message`:
|
|
24
|
+
*
|
|
25
|
+
* ```ts
|
|
26
|
+
* RequestBreakerError.legacyStringPayload = true;
|
|
27
|
+
* ```
|
|
28
|
+
*
|
|
29
|
+
* gemi's own web client reads either shape. Refusals that were already
|
|
30
|
+
* objects (404, 429, a policy 403) stay objects.
|
|
31
|
+
*/
|
|
32
|
+
static legacyStringPayload: boolean;
|
|
3
33
|
kind: string;
|
|
4
34
|
payload: {
|
|
5
35
|
api: Record<string, any>;
|
|
@@ -11,5 +41,25 @@ export declare class RequestBreakerError extends Error {
|
|
|
11
41
|
*/
|
|
12
42
|
viewData?: Record<string, any>;
|
|
13
43
|
};
|
|
44
|
+
/**
|
|
45
|
+
* A refusal that answers `{ error: { kind, message, status } }` with
|
|
46
|
+
* `status`, so the client's guards classify it without a payload of your
|
|
47
|
+
* own. A subclass that sets `payload` itself replaces this.
|
|
48
|
+
*
|
|
49
|
+
* ```ts
|
|
50
|
+
* throw new RequestBreakerError("This slug is taken", { status: 409 });
|
|
51
|
+
* // → 409 { error: { kind: "form_error", message: "This slug is taken", status: 409 } }
|
|
52
|
+
* ```
|
|
53
|
+
*/
|
|
54
|
+
constructor(message?: string, options?: RequestBreakerOptions);
|
|
14
55
|
}
|
|
56
|
+
/** A refusal's `error` field. */
|
|
57
|
+
export declare function refusal<K extends Exclude<RefusalKind, "validation_error">>(kind: K, message: string, status: number): Refusal<K>;
|
|
58
|
+
/**
|
|
59
|
+
* A refusal that was a bare string before 0.85: the object, or the string
|
|
60
|
+
* under `RequestBreakerError.legacyStringPayload`.
|
|
61
|
+
*
|
|
62
|
+
* @internal
|
|
63
|
+
*/
|
|
64
|
+
export declare function stringEraRefusal<K extends Exclude<RefusalKind, "validation_error">>(kind: K, message: string, status: number): Refusal<K> | string;
|
|
15
65
|
//# sourceMappingURL=Error.d.ts.map
|
package/dist/http/Error.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Error.d.ts","sourceRoot":"","sources":["../../http/Error.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,0BAA0B,+BAA+B,CAAC;AAEvE,qBAAa,mBAAoB,SAAQ,KAAK;
|
|
1
|
+
{"version":3,"file":"Error.d.ts","sourceRoot":"","sources":["../../http/Error.ts"],"names":[],"mappings":"AAAA,OAAO,EAAwB,KAAK,OAAO,EAAE,KAAK,WAAW,EAAE,MAAM,WAAW,CAAC;AAEjF,eAAO,MAAM,0BAA0B,+BAA+B,CAAC;AAEvE,MAAM,MAAM,qBAAqB,GAAG;IAClC,4CAA4C;IAC5C,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;;;OAIG;IACH,IAAI,CAAC,EAAE,OAAO,CAAC,WAAW,EAAE,kBAAkB,CAAC,CAAC;IAChD,wCAAwC;IACxC,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CAClC,CAAC;AAEF,qBAAa,mBAAoB,SAAQ,KAAK;IAC5C;;;;;;;;;;;;;;;OAeG;IACH,MAAM,CAAC,mBAAmB,UAAS;IAE5B,IAAI,SAA8B;IAClC,OAAO,EAAE;QACd,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;QACzB,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;QAC1B;;;;WAIG;QACH,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;KAChC,CAAC;IAEF;;;;;;;;;OASG;gBACS,OAAO,CAAC,EAAE,MAAM,EAAE,OAAO,GAAE,qBAA0B;CAclE;AAED,iCAAiC;AACjC,wBAAgB,OAAO,CAAC,CAAC,SAAS,OAAO,CAAC,WAAW,EAAE,kBAAkB,CAAC,EACxE,IAAI,EAAE,CAAC,EACP,OAAO,EAAE,MAAM,EACf,MAAM,EAAE,MAAM,GACb,OAAO,CAAC,CAAC,CAAC,CAEZ;AAED;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAAC,CAAC,SAAS,OAAO,CAAC,WAAW,EAAE,kBAAkB,CAAC,EACjF,IAAI,EAAE,CAAC,EACP,OAAO,EAAE,MAAM,EACf,MAAM,EAAE,MAAM,GACb,OAAO,CAAC,CAAC,CAAC,GAAG,MAAM,CAErB"}
|
|
@@ -87,6 +87,21 @@ export declare class HttpRequest<T extends Body = Record<string, never>, Params
|
|
|
87
87
|
* No header or cookie can make this true; see `http/modelOriginated.ts`.
|
|
88
88
|
*/
|
|
89
89
|
isModelOriginated(): boolean;
|
|
90
|
+
/**
|
|
91
|
+
* Aborts when the client goes away before the response is sent: the
|
|
92
|
+
* browser closed the connection, or `useQuery` gave up on a request nobody
|
|
93
|
+
* renders any more (#659). Hand it to slow work — a model call, an upstream
|
|
94
|
+
* `fetch` — so it stops instead of running to completion for no one:
|
|
95
|
+
*
|
|
96
|
+
* ```ts
|
|
97
|
+
* const reply = await fetch(upstream, { signal: req.signal });
|
|
98
|
+
* if (req.signal.aborted) return null;
|
|
99
|
+
* ```
|
|
100
|
+
*
|
|
101
|
+
* During a server render, an in-process query shares the page request's
|
|
102
|
+
* signal.
|
|
103
|
+
*/
|
|
104
|
+
get signal(): AbortSignal;
|
|
90
105
|
/**
|
|
91
106
|
* The parsed `Range` header, or `null` when absent or unusable. Pass it to
|
|
92
107
|
* `FileStorage.read(name, { range })` to range explicitly; inside a
|
|
@@ -94,7 +109,18 @@ export declare class HttpRequest<T extends Body = Record<string, never>, Params
|
|
|
94
109
|
*/
|
|
95
110
|
range(): import("./range").ByteRange;
|
|
96
111
|
refine(_input: any): any;
|
|
112
|
+
/**
|
|
113
|
+
* The body, by its media type: JSON (`application/json` or any `+json`
|
|
114
|
+
* type), a urlencoded form, or a multipart form. The type is read without
|
|
115
|
+
* its parameters and case-insensitively, so `application/json;
|
|
116
|
+
* charset=utf-8` is JSON (#699). Any other type, or none, reads as `{}`.
|
|
117
|
+
*
|
|
118
|
+
* An empty JSON body is no body, and reads as `{}` like a request without
|
|
119
|
+
* one. A body that is not JSON, or is JSON but not an object, is the
|
|
120
|
+
* client's mistake: a 400 refusal (`form_error`), never a 500 (#700).
|
|
121
|
+
*/
|
|
97
122
|
private parseBody;
|
|
123
|
+
private parseJsonBody;
|
|
98
124
|
private validateInput;
|
|
99
125
|
private ruleFor;
|
|
100
126
|
input(): Promise<Input<T>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HttpRequest.d.ts","sourceRoot":"","sources":["../../http/HttpRequest.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"HttpRequest.d.ts","sourceRoot":"","sources":["../../http/HttpRequest.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mCAAmC,CAAC;AAExE,cAAM,KAAK,CAAC,CAAC;IACC,OAAO,CAAC,IAAI;gBAAJ,IAAI,EAAE,CAAC;IAEpB,GAAG,CAAC,CAAC,SAAS,MAAM,CAAC,EAAE,GAAG,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;IAIpC,GAAG,CAAC,GAAG,EAAE,MAAM,CAAC;IAIhB,MAAM,IAAI,CAAC;CAGnB;AAED,KAAK,UAAU,GAAG,QAAQ,CAAC;AAC3B,KAAK,UAAU,GAAG,QAAQ,CAAC;AAC3B,KAAK,WAAW,GAAG,SAAS,CAAC;AAC7B,KAA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G,CAAC,MAAM,EAAE,MAAM,CAAC,EAAE,KAAK,GAAG,QAAQ,CAAC,CAAC;IACrD,MAAM,EAAE,KAAK,CAAC,GAAG,CAAC,CAAC;IACnB,MAAM,EAAE,GAAG,CAAM;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,MAAM,CAAC;IACf;;;;;;OAMG;IACH,MAAM,EAAE,cAAc,GAAG,IAAI,CAAC;gBAElB,GAAG,CAAC,EAAE,OAAO,EAAE,MAAM,CAAC,EAAE,GAAG,EAAE,IAAI,CAAC,EAAE,eAAe,EAAE,SAAS,CAAC,EAAE,MAAM;IAuCnF,MAAM;IAIN,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAIH;;;;;;OAMG;IACH,iBAAiB,IAAI,OAAO;IAI5B;;;;;;;;;;;;;OAaG;IACH,IAAI,MAAM,IAAI,WAAW,CAExB;IAED;;;;OAIG;IACH,KAAK;IAIL,MAAM,CAAC,MAAM,EAAE,GAAG,GAAG,GAAG;IAIxB;;;;;;;;;OASG;YACW,SAAS;YAiCT,aAAa;IA2B3B,OAAO,CAAC,aAAa;IA6ErB,OAAO,CAAC,OAAO;IAaT,KAAK,IAAI,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;IAI1B,SAAS,IAAI,OAAO,CAAC;QACzB,OAAO,EAAE,OAAO,CAAC;QACjB,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,CAAC;QACjC,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC;KACjB,CAAC;CAoBH"}
|
|
@@ -66,9 +66,12 @@ export declare class RateLimitMiddleware extends Middleware<RateLimitMiddlewareC
|
|
|
66
66
|
* through a different proxy chain got a fresh budget. Only the left-most entry
|
|
67
67
|
* names the client.
|
|
68
68
|
*
|
|
69
|
-
*
|
|
70
|
-
*
|
|
71
|
-
*
|
|
69
|
+
* Under `gemi start` the production server has already decided which entry to
|
|
70
|
+
* believe (`GEMI_TRUST_PROXY`, see `server/forwardedFor.ts`) and left exactly
|
|
71
|
+
* one address in `x-forwarded-for`, with `x-real-ip` dropped, so neither is
|
|
72
|
+
* client-written here. Elsewhere (`gemi dev`, a custom server) both headers are
|
|
73
|
+
* whatever the client sent. When you have something better (a session, an API
|
|
74
|
+
* key), pass `key` in the config.
|
|
72
75
|
*/
|
|
73
76
|
export declare function clientIp(req: HttpRequest): string;
|
|
74
77
|
//# sourceMappingURL=RateLimitMiddleware.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RateLimitMiddleware.d.ts","sourceRoot":"","sources":["../../http/RateLimitMiddleware.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,gCAAgC,CAAC;AACtE,OAAO,
|
|
1
|
+
{"version":3,"file":"RateLimitMiddleware.d.ts","sourceRoot":"","sources":["../../http/RateLimitMiddleware.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,gCAAgC,CAAC;AACtE,OAAO,EAAW,mBAAmB,EAAE,MAAM,SAAS,CAAC;AACvD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AACjD,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAG1C,qBAAa,sBAAuB,SAAQ,mBAAmB;gBACjD,MAAM,CAAC,EAAE,eAAe;CAwBrC;AAED,MAAM,WAAW,yBAAyB;IACxC,qEAAqE;IACrE,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,sEAAsE;IACtE,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;;;;;;;;;;;;;;;;;;;;;;;;;;OA2BG;IACH,GAAG,CAAC,EAAE,CAAC,GAAG,EAAE,WAAW,KAAK,MAAM,CAAC;IACnC,gEAAgE;IAChE,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED;;;;;;;;;;;GAWG;AACH,qBAAa,mBAAoB,SAAQ,UAAU,CAAC,yBAAyB,CAAC;IACtE,GAAG,CAAC,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM;IAgC3D,OAAO,CAAC,GAAG;CAMZ;AAgBD;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,QAAQ,CAAC,GAAG,EAAE,WAAW,UAcxC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Router.d.ts","sourceRoot":"","sources":["../../http/Router.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAC9C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAEjD,KAAK,gBAAgB,GAAG,OAAO,CAAC;IAC9B,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAChC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CACjC,CAAC,CAAC;AAEH,MAAM,MAAM,oBAAoB,GAC5B,IAAI,GACJ,OAAO,CAAC,gBAAgB,CAAC,GACzB,gBAAgB,CAAC;AAErB,MAAM,MAAM,gBAAgB,GAAG,CAC7B,GAAG,EAAE,WAAW,EAChB,GAAG,EAAE,GAAG,KACL,oBAAoB,CAAC;AAE1B,qBAAa,eAAgB,SAAQ,mBAAmB;IACtD,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,CAAM;gBAC1B,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC;
|
|
1
|
+
{"version":3,"file":"Router.d.ts","sourceRoot":"","sources":["../../http/Router.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAC9C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAEjD,KAAK,gBAAgB,GAAG,OAAO,CAAC;IAC9B,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAChC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CACjC,CAAC,CAAC;AAEH,MAAM,MAAM,oBAAoB,GAC5B,IAAI,GACJ,OAAO,CAAC,gBAAgB,CAAC,GACzB,gBAAgB,CAAC;AAErB,MAAM,MAAM,gBAAgB,GAAG,CAC7B,GAAG,EAAE,WAAW,EAChB,GAAG,EAAE,GAAG,KACL,oBAAoB,CAAC;AAE1B,qBAAa,eAAgB,SAAQ,mBAAmB;IACtD,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,CAAM;gBAC1B,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC;CAuB7C"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../http/errors.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../http/errors.ts"],"names":[],"mappings":"AAAA,OAAO,EAAW,mBAAmB,EAAoB,MAAM,SAAS,CAAC;AAGzE,qBAAa,kBAAmB,SAAQ,mBAAmB;IACzD,OAAO,CAAC,KAAK,CAAS;gBACV,KAAK,GAAE,MAAyB;CAY7C;AAED;;;;;;;GAOG;AACH,qBAAa,4BAA6B,SAAQ,mBAAmB;IACnE;;;;;;;;;;;;;OAaG;IACH,MAAM,CAAC,SAAS,EAAE,GAAG,GAAG,GAAG,CAAO;IAElC,OAAO,CAAC,KAAK,CAAS;gBACV,KAAK,GAAE,MAAmC;CAgBvD;AAED;;;;;;;GAOG;AACH,qBAAa,wBAAyB,SAAQ,mBAAmB;IAC5C,KAAK,EAAE,MAAM;gBAAb,KAAK,EAAE,MAAM;CAmBjC;AAED,qBAAa,iBAAkB,SAAQ,mBAAmB;IACrC,QAAQ,EAAE,MAAM;gBAAhB,QAAQ,EAAE,MAAM;CAYpC;AAED;;;;;;;;;GASG;AACH,qBAAa,mBAAoB,SAAQ,mBAAmB;gBAC9C,OAAO,GAAE;QAAE,UAAU,CAAC,EAAE,MAAM,CAAA;KAAO;CA+BlD"}
|
package/dist/http/index.d.ts
CHANGED
|
@@ -10,7 +10,8 @@ export { HttpRequest } from "./HttpRequest";
|
|
|
10
10
|
export { InvalidValidationRuleError } from "./validate";
|
|
11
11
|
export { Middleware } from "./Middleware";
|
|
12
12
|
export { getCookies } from "./getCookies";
|
|
13
|
-
export { RequestBreakerError } from "./Error";
|
|
13
|
+
export { RequestBreakerError, type RequestBreakerOptions } from "./Error";
|
|
14
|
+
export type { Refusal, RefusalKind } from "./refusal";
|
|
14
15
|
export { HttpResponse, type HttpResponseOptions } from "./HttpResponse";
|
|
15
16
|
export { defineMiddlewareConfig, middlewareConfigDefaults, type MiddlewareConfig, } from "./middleware-config";
|
|
16
17
|
export { AuthenticationMiddleware } from "./AuthenticationMiddlware";
|
package/dist/http/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../http/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AAC9D,OAAO,EAAE,SAAS,EAAE,KAAK,SAAS,EAAE,MAAM,aAAa,CAAC;AACxD,OAAO,EACL,SAAS,EACT,mBAAmB,EACnB,KAAK,aAAa,EAClB,KAAK,SAAS,EACd,KAAK,cAAc,EACnB,KAAK,YAAY,EACjB,KAAK,SAAS,GACf,MAAM,aAAa,CAAC;AACrB,OAAO,EACL,kBAAkB,EAClB,UAAU,EACV,KAAK,aAAa,EAClB,KAAK,UAAU,EACf,KAAK,WAAW,GACjB,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,gBAAgB,EAAE,KAAK,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAC1E,OAAO,EACL,oBAAoB,EACpB,2BAA2B,EAC3B,KAAK,YAAY,EACjB,KAAK,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
|
2
|
+
import{Bd as H,Cd as I,Dd as J,Ed as K,Fd as L,Gd as M,kc as n,lc as o,mc as p,nc as v,oc as w,pc as x,rc as y,sc as z,sd as E,tc as A,td as F,uc as B,ud as G,vc as C,wc as D}from"../chunk-xx2zg6sk.js";import"../chunk-ha705bcz.js";import"../chunk-k5j65f2c.js";import{$e as q,Ie as a,Je as b,Ke as d,Oe as e,Pe as f,Qe as g,Re as h,Se as i,Te as j,Ye as k,Ze as l,_e as m,af as r,bf as s,cf as t,df as u}from"../chunk-174jkg6d.js";import{sf as c}from"../chunk-jhe0t7yj.js";import"../chunk-1jcp8m8h.js";import"../chunk-trdwxm5x.js";import"../chunk-1w5a11cd.js";import"../chunk-4ysar3ev.js";import"../chunk-dwqh79e5.js";import"../chunk-7n5775qx.js";import"../chunk-d3jkypc7.js";import"../chunk-8gexb1gt.js";import"../chunk-swhyp0yw.js";import"../chunk-cbycz5z3.js";import"../chunk-ndat0nf0.js";import"../chunk-9tsw1bmt.js";export{g as toRangeHeaderValue,n as toMiddlewareList,f as resolveRange,e as parseRangeHeader,h as parseContentRange,D as middlewareConfigDefaults,d as getCookies,j as formatUnsatisfiedContentRange,i as formatContentRange,C as defineMiddlewareConfig,o as createUnsatisfiableResponse,p as createStreamResponse,z as createFileResponse,G as clientIp,A as ViewRouter,k as ValidationError,b as ResourceController,c as RequestBreakerError,F as RateLimitMiddleware,E as RateLimitExceededError,s as RangeNotSatisfiableError,L as PoliciesServiceProvider,M as Policies,B as Middleware,x as McpRouter,w as McpRouteDeclaration,l as InvalidValidationRuleError,r as InsufficientPermissionsError,y as HttpResponse,m as HttpRequest,t as FileNotFoundError,J as CorsMiddleware,a as Controller,I as CacheMiddleware,K as CSRFMiddleware,q as AuthorizationError,H as AuthenticationMiddleware,u as AuthenticationError,v as ApiRouter};
|
|
3
3
|
|
|
4
|
-
//# debugId=
|
|
4
|
+
//# debugId=FC1BB2977C01B33664756E2164756E21
|
package/dist/http/index.js.map
CHANGED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The media type of a `Content-Type` header: lowercased, with its parameters
|
|
3
|
+
* (`; charset=utf-8`, `; boundary=…`) cut off. `null` when there is no header
|
|
4
|
+
* or nothing before the first `;`.
|
|
5
|
+
*
|
|
6
|
+
* Media types compare case-insensitively (RFC 9110 §8.3.1), so
|
|
7
|
+
* `Application/JSON; charset=UTF-8` is `application/json`.
|
|
8
|
+
*/
|
|
9
|
+
export declare function mediaType(header: string | null | undefined): string | null;
|
|
10
|
+
/**
|
|
11
|
+
* `application/json`, or a structured `+json` type such as
|
|
12
|
+
* `application/vnd.api+json` or `application/merge-patch+json` (RFC 6839).
|
|
13
|
+
* Not a prefix match: `application/json-seq` is not JSON.
|
|
14
|
+
*/
|
|
15
|
+
export declare function isJsonMediaType(type: string | null): boolean;
|
|
16
|
+
//# sourceMappingURL=mediaType.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mediaType.d.ts","sourceRoot":"","sources":["../../http/mediaType.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,wBAAgB,SAAS,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAAG,MAAM,GAAG,IAAI,CAK1E;AAED;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,GAAG,OAAO,CAK5D"}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The shape of a refusal on the wire: the `error` field of a non-2xx `/api`
|
|
3
|
+
* answer, for every refusal gemi sends.
|
|
4
|
+
*
|
|
5
|
+
* It was a bare string for most of them (`"Not authorized"`, `"Invalid CSRF
|
|
6
|
+
* token"`, a 500's message) and `{ message }` for the rest. A string carries no
|
|
7
|
+
* status, so a client could only classify the framework's default messages: an
|
|
8
|
+
* `AuthorizationError` thrown with a message of its own, the rule the skill
|
|
9
|
+
* teaches, was `"unknown"`, and apps compared strings (issue #673).
|
|
10
|
+
*
|
|
11
|
+
* Shared by the server, which builds it, and the client, which reads it and
|
|
12
|
+
* wraps an older server's bare strings into it, so this module imports nothing.
|
|
13
|
+
*/
|
|
14
|
+
/**
|
|
15
|
+
* Which refusal this is. `validation_error` and `form_error` predate the rest
|
|
16
|
+
* and keep their spelling, and `server_error` is the kind `useUpload` already
|
|
17
|
+
* reported for a failed upload, so a 500 has one name wherever it comes from.
|
|
18
|
+
*/
|
|
19
|
+
export type RefusalKind =
|
|
20
|
+
/** No signed-in user: `AuthenticationError` (401). */
|
|
21
|
+
"authentication"
|
|
22
|
+
/** `AuthorizationError` (401): a known user refused this action. */
|
|
23
|
+
| "authorization"
|
|
24
|
+
/** `InsufficientPermissionsError` (403) or a policy denial (403). */
|
|
25
|
+
| "permission"
|
|
26
|
+
/** `InvalidCSRFTokenError` (403): the CSRF cookie is missing or stale. */
|
|
27
|
+
| "csrf"
|
|
28
|
+
/** A missing record, file or route (404). */
|
|
29
|
+
| "not_found"
|
|
30
|
+
/** A `Range` the object cannot satisfy (416). */
|
|
31
|
+
| "range_not_satisfiable"
|
|
32
|
+
/** `RateLimitMiddleware` refused the request (429). */
|
|
33
|
+
| "rate_limit"
|
|
34
|
+
/** An unhandled exception (500). */
|
|
35
|
+
| "server_error"
|
|
36
|
+
/** A single form-level message, which `<FormError>` renders. */
|
|
37
|
+
| "form_error"
|
|
38
|
+
/** `ValidationError` (400). Carries `messages` instead of `message`. */
|
|
39
|
+
| "validation_error";
|
|
40
|
+
/** A refusal's `error`, apart from `validation_error`, which has `messages`. */
|
|
41
|
+
export type Refusal<K extends RefusalKind = Exclude<RefusalKind, "validation_error">> = {
|
|
42
|
+
kind: K;
|
|
43
|
+
message: string;
|
|
44
|
+
status: number;
|
|
45
|
+
};
|
|
46
|
+
/**
|
|
47
|
+
* The kind a status stands for, for a refusal that does not name one: an app's
|
|
48
|
+
* own `RequestBreakerError`, or an older server's `{ message }`. Any other 4xx
|
|
49
|
+
* is a `form_error`, a message about this request for `<FormError>` to show.
|
|
50
|
+
*/
|
|
51
|
+
export declare function refusalKindForStatus(status: number): Exclude<RefusalKind, "validation_error">;
|
|
52
|
+
//# sourceMappingURL=refusal.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"refusal.d.ts","sourceRoot":"","sources":["../../http/refusal.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH;;;;GAIG;AACH,MAAM,MAAM,WAAW;AACrB,sDAAsD;AACpD,gBAAgB;AAClB,oEAAoE;GAClE,eAAe;AACjB,qEAAqE;GACnE,YAAY;AACd,0EAA0E;GACxE,MAAM;AACR,6CAA6C;GAC3C,WAAW;AACb,iDAAiD;GAC/C,uBAAuB;AACzB,uDAAuD;GACrD,YAAY;AACd,oCAAoC;GAClC,cAAc;AAChB,gEAAgE;GAC9D,YAAY;AACd,wEAAwE;GACtE,kBAAkB,CAAC;AAEvB,gFAAgF;AAChF,MAAM,MAAM,OAAO,CAAC,CAAC,SAAS,WAAW,GAAG,OAAO,CAAC,WAAW,EAAE,kBAAkB,CAAC,IAAI;IACtF,IAAI,EAAE,CAAC,CAAC;IACR,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF;;;;GAIG;AACH,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,EAAE,kBAAkB,CAAC,CAQ7F"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{aa as y,ba as p}from"../chunk-
|
|
2
|
+
import{aa as y,ba as p}from"../chunk-7nj2t2gm.js";import{qa as c,ra as d,ta as l}from"../chunk-9a8qz3s7.js";import{ag as e,bg as i,dg as t,eg as r,fg as o,gg as n,hg as a,ig as s}from"../chunk-4ysar3ev.js";import"../chunk-9tsw1bmt.js";export{o as setActiveLocale,r as seedDictionaries,t as preloadDictionaries,d as localeStrings,i as loadDictionary,n as getActiveLocale,e as dictionaryRegistrationMark,c as dictionaryLocales,l as dictionaryId,y as defineDictionary,s as createDictionarySink,a as __resetDictionaryRegistry,p as __gemi_dict__};
|
|
3
3
|
|
|
4
|
-
//# debugId=
|
|
4
|
+
//# debugId=34159CEBBD53053764756E2164756E21
|
package/dist/i18n/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{aa as R}from"../chunk-
|
|
2
|
+
import{aa as R}from"../chunk-7nj2t2gm.js";import"../chunk-9a8qz3s7.js";import{Wa as L}from"../chunk-1yzdxv2a.js";import{hc as E,ic as V}from"../chunk-p0m3qgs5.js";import"../chunk-z4k18gnp.js";import{Fc as j}from"../chunk-xx2zg6sk.js";import"../chunk-ha705bcz.js";import"../chunk-k5j65f2c.js";import"../chunk-174jkg6d.js";import"../chunk-jhe0t7yj.js";import"../chunk-1jcp8m8h.js";import"../chunk-trdwxm5x.js";import"../chunk-1w5a11cd.js";import"../chunk-4ysar3ev.js";import"../chunk-dwqh79e5.js";import{qg as X}from"../chunk-7n5775qx.js";import"../chunk-d3jkypc7.js";import"../chunk-8gexb1gt.js";import"../chunk-swhyp0yw.js";import"../chunk-cbycz5z3.js";import"../chunk-ndat0nf0.js";import"../chunk-9tsw1bmt.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
|
-
//# debugId=
|
|
4
|
+
//# debugId=E2CFF379B406607264756E2164756E21
|
package/dist/i18n/index.js.map
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
"// The module, not the `../facades` barrel. A dictionary is the one server-side\n// artifact a *component* test has to import — `<Page dictionaries={[…]}>` takes\n// the app's real `app/i18n/index.ts` — and the barrel drags the whole facade\n// set in behind it, including `Redis` and its `import { RedisClient } from\n// \"bun\"`. Under a browser-targeted runner (vitest/jsdom) that specifier does\n// not resolve, so importing the app's dictionaries failed to collect before it\n// rendered anything. `Lang` itself only needs the translator and the request\n// context.\nimport { Lang } from \"../facades/Lang\";\nimport { parseTranslation } from \"../utils/parseTranslation\";\nimport type {\n ParseTranslationParams,\n ParseTranslationParamsServer,\n Prettify,\n} from \"../utils/type\";\n\ntype Translations = Record<string, Record<string, string>>;\n\nexport class Dictionary<T extends Translations> {\n constructor(\n public name: string,\n public dictionary: T,\n ) {}\n\n reference(key: keyof T) {\n if (typeof window !== \"undefined\") {\n throw new Error(\"Cannot use reference in the browser\");\n }\n if (!this.dictionary?.[key]) {\n throw new Error(`Translation not found for ${String(key)}`);\n }\n return this.dictionary[key];\n }\n\n render<\n K extends keyof T,\n U extends keyof T[K],\n R = Prettify<ParseTranslationParams<T[K][U]>>,\n >(\n key: K,\n ...args: R extends Record<string, never>\n ? [args?: { locale?: U | (string & {}) }]\n : [args: { locale?: U | (string & {}); params: R }]\n ) {\n const { locale = Lang.locale(), params } = {\n params: {},\n ...args[0],\n };\n\n if (typeof window !== \"undefined\") {\n throw new Error(\"Cannot use render in the browser\");\n }\n\n if (!this.dictionary?.[key]?.[locale]) {\n throw new Error(\n `Translation not found for ${String(key)} in ${String(locale)}`,\n );\n }\n return parseTranslation(this.dictionary[key][locale], params ?? {});\n }\n\n /**\n * @deprecated Use `defineDictionary` from `gemi/client`, declared next to the\n * component that reads it. A dictionary made here has to be re-exported from\n * `app/i18n/index.ts` and listed against a route in the `prefetch` config,\n * and every locale of it stays resident whether a page uses it or not. Still\n * supported; see `docs/i18n.md`.\n */\n static create<const T extends Translations>(name: string, translations: T) {\n return new Dictionary<T>(name, translations);\n }\n\n static text<const T extends Record<string, string>, U extends keyof T>(\n content: T,\n ...args: Prettify<ParseTranslationParamsServer<T[U]>> extends Record<\n string,\n never\n >\n ? [args?: { locale?: U | (string & {}) }]\n : [\n args: {\n locale?: U | (string & {});\n params: Prettify<ParseTranslationParamsServer<T[U]>>;\n },\n ]\n ): string {\n const { locale = Lang.locale(), params } = { params: {}, ...args?.[0] };\n\n if (!content?.[locale]) {\n throw new Error(`Translation not found for ${String(locale)}`);\n }\n\n return parseTranslation(content[locale], params ?? {});\n }\n}\n",
|
|
7
7
|
"import { Lang } from \"../facades\";\nimport { parseTranslation } from \"../utils/parseTranslation\";\nimport type { ParseTranslationParamsServer, Prettify } from \"../utils/type\";\nimport type { DictionaryHandle } from \"./defineDictionary\";\nimport type { DictionaryTranslations } from \"./dictionaryShape\";\n\n/**\n * Read one string from a `defineDictionary` dictionary outside React — a\n * controller, a job, an email template.\n *\n * Async because a bundled dictionary loads its locale on demand. Server code\n * does not go through the bundler, so in practice this resolves without ever\n * yielding; the `await` is what makes the same call work either way.\n *\n * Kept out of `defineDictionary.ts` on purpose: that module is imported by\n * components and has to stay free of the server facades this one needs.\n */\nexport async function translate<\n T extends DictionaryTranslations,\n K extends keyof T & string,\n U extends keyof T[K],\n R = Prettify<ParseTranslationParamsServer<T[K][U] & string>>,\n>(\n dictionary: DictionaryHandle<T>,\n key: K,\n ...args: R extends Record<string, never>\n ? [args?: { locale?: U | (string & {}) }]\n : [args: { locale?: U | (string & {}); params: R }]\n): Promise<string> {\n const { locale = Lang.locale(), params } = { params: {}, ...args[0] };\n const strings = await dictionary.load(String(locale));\n const template = strings[key];\n\n if (typeof template !== \"string\") {\n throw new Error(\n `Translation not found for \"${key}\" in \"${String(locale)}\" (dictionary ${dictionary.id})`,\n );\n }\n\n return parseTranslation(template, (params ?? {}) as any) as string;\n}\n"
|
|
8
8
|
],
|
|
9
|
-
"mappings": ";
|
|
10
|
-
"debugId": "
|
|
9
|
+
"mappings": ";gzBAAA,mBAAS,SAAe,eAAU,SAO3B,IAAS,JAAgB,JAAC,HAAkB,HAAwB,JAEzE,DAAM,HAAS,EAAO,EAAO,JAAM,HAAE,AACnC,JAAC,DACC,EAAO,DAAU,YACjB,EAAgB,EAAkC,EAAE,CAAC,CACzD,EAMM,EAAQ,kDAEd,GAAI,CAAC,EAqCH,OAnCe,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GAC3B,GAEzB,GAAI,OAAO,IAAa,SACtB,MAAU,MACR,8BAA8B,UAAY,OAAO,CAAM,kBAAkB,EAAW,KACtF,EAGF,OAAO,EAAiB,EAAW,GAAU,CAAC,CAAS",
|
|
10
|
+
"debugId": "E2CFF379B406607264756E2164756E21",
|
|
11
11
|
"names": []
|
|
12
12
|
}
|
package/dist/kernel/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{ya as y}from"../chunk-
|
|
2
|
+
import{ya as y}from"../chunk-81k26w39.js";import{Va as i}from"../chunk-7c33ngqs.js";import{Wa as g}from"../chunk-1yzdxv2a.js";import{$a as e,Cb as n,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,wb as c,zb as p}from"../chunk-1wby1sr2.js";import"../chunk-w312e9nx.js";import"../chunk-1yq1e6sb.js";import{cc as r}from"../chunk-saqfc6vp.js";import"../chunk-p0m3qgs5.js";import"../chunk-z4k18gnp.js";import{Cc as Zj,Dc as $j,gd as x,ld as I,md as E,pd as K,qd as M,rd as s,vd as C,wd as m,xd as Q,yd as t,zd as o}from"../chunk-xx2zg6sk.js";import{Kd as a}from"../chunk-ha705bcz.js";import{Xd as b,ae as V}from"../chunk-k5j65f2c.js";import{_e as F}from"../chunk-174jkg6d.js";import{rf as B}from"../chunk-jhe0t7yj.js";import{xf as L}from"../chunk-1jcp8m8h.js";import"../chunk-trdwxm5x.js";import"../chunk-1w5a11cd.js";import"../chunk-4ysar3ev.js";import"../chunk-dwqh79e5.js";import"../chunk-pmmrhak1.js";import"../chunk-7n5775qx.js";import{sg as N,tg as f}from"../chunk-d3jkypc7.js";import{ug as U}from"../chunk-8gexb1gt.js";import"../chunk-swhyp0yw.js";import"../chunk-gx0x772p.js";import"../chunk-cbycz5z3.js";import{Hg as q}from"../chunk-ndat0nf0.js";import"../chunk-9tsw1bmt.js";function Jj(j){let X=j.headers.get("Cache-Control")?.toLowerCase()??"";return/(^|[\s,])(public|s-maxage)\b/.test(X)}var Wj=new Set,Xj={refusal:null,apply:(j)=>j,carried:null};async function k(j){let X=f(x);if(X.config.global.length===0)return Xj;let{pathname:Z}=new URL(j.url),W=q(Z),z=new F(j,{},W?"api":"view","");return await L.run(z,async()=>{let $=L.getStore(),{headers:H,cookies:zj}=$,Y=(J)=>{if(!Jj(J))return Q(J,H,zj);let G=new Headers(H);return G.delete("Set-Cookie"),Q(J,G,Wj)};try{return await X.runGlobalMiddleware(),{refusal:null,apply:Y,carried:{user:$.user}}}catch(J){let G=!W&&Z.endsWith(".json");if(J?.kind===B){let O=W?m(J.payload.api):G?M(J.payload.viewData??J.payload.api):K(J.payload.view);return{refusal:Y(O),apply:Y,carried:null}}if(b(J)&&(W||G))return{refusal:Y(C()),apply:Y,carried:null};if(V(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,n,A,S,v,R,D,h,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)i(...this.models);else Yj();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(),e(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(t)}viewRoutes(){return this.app.make(s)}domains(){return this.app.make(o)}queue(){return this.app.make(r)}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 Yj(){if(Bun.env.NODE_ENV==="production")return;let j=a();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:
|
|
@@ -13,4 +13,4 @@ import{ya as y}from"../chunk-kfavcgv2.js";import{Va as i}from"../chunk-3zb2ycxj.
|
|
|
13
13
|
|
|
14
14
|
See docs/orm.md#your-model-class. Development only; this never prints in production.`)}export{T as frameworkProviders,$j as UserProvider,Zj as SESSION_SELECT,jj as Kernel};
|
|
15
15
|
|
|
16
|
-
//# debugId=
|
|
16
|
+
//# debugId=3C4F5211677D218464756E2164756E21
|
package/dist/kernel/index.js.map
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
"import type { ServiceProviderConstructor } from \"../foundation/Application\";\nimport { AuthServiceProvider } from \"../auth/AuthServiceProvider\";\nimport { DatabaseServiceProvider } from \"../database/DatabaseServiceProvider\";\nimport { TranslationServiceProvider } from \"../i18n/TranslationServiceProvider\";\nimport { ScheduleServiceProvider } from \"../services/cron/ScheduleServiceProvider\";\nimport { FeaturesServiceProvider } from \"../services/features/FeaturesServiceProvider\";\nimport { MailServiceProvider } from \"../services/email/MailServiceProvider\";\nimport { EventServiceProvider } from \"../services/events/EventServiceProvider\";\nimport { FilesystemServiceProvider } from \"../services/file-storage/FilesystemServiceProvider\";\nimport { ImageServiceProvider } from \"../services/image-optimization/ImageServiceProvider\";\nimport { KernelIdServiceProvider } from \"../services/kernel-id/KernelIdServiceProvider\";\nimport { LogServiceProvider } from \"../services/logging/LogServiceProvider\";\nimport { MiddlewareServiceProvider } from \"../services/middleware/MiddlewareServiceProvider\";\nimport { QueueServiceProvider } from \"../services/queue/QueueServiceProvider\";\nimport { RateLimiterServiceProvider } from \"../services/rate-limiter/RateLimiterServiceProvider\";\nimport { RedisServiceProvider } from \"../services/redis/RedisServiceProvider\";\nimport { RouteServiceProvider } from \"../services/router/RouteServiceProvider\";\n\n/**\n * The providers every gemi app boots with, in registration order. Seventeen\n * providers for eighteen services — `RouteServiceProvider` owns both the api\n * and the view dispatcher, the way Laravel's does.\n *\n * Order only matters for `boot()`; `register()` binds factories and resolves\n * nothing, so no provider here depends on an earlier one having run — with one\n * exception, which is the reason to read this before reordering anything.\n *\n * **`EventServiceProvider` must stay after `QueueServiceProvider`.** A queued\n * listener is registered with the queue as a synthetic job, and\n * `EventServiceProvider.boot()` is what hands those over. `QueueManager.useJobs`\n * — which `QueueServiceProvider.boot()` calls with whatever it discovered under\n * `app/jobs` — *replaces* the registry (`this.jobs = {}`). Move the events\n * provider up and the two boots run in the order that discards: every\n * `listener:*` entry is registered and then thrown away. Nothing errors, boot\n * succeeds, and each queued dispatch afterwards lands on `next()`'s \"Dropped a\n * queued job: nothing is registered under the name listener:SendWelcomeEmail\",\n * long after `dispatch` returned to a caller that cannot hear it.\n */\nexport const frameworkProviders: ServiceProviderConstructor[] = [\n KernelIdServiceProvider,\n MiddlewareServiceProvider,\n DatabaseServiceProvider,\n // After the database, whose `boot()` its cache warm-up depends on, and before\n // the route dispatchers, which evaluate flags on every view request.\n FeaturesServiceProvider,\n RouteServiceProvider,\n AuthServiceProvider,\n MailServiceProvider,\n LogServiceProvider,\n FilesystemServiceProvider,\n QueueServiceProvider,\n EventServiceProvider,\n RedisServiceProvider,\n ImageServiceProvider,\n TranslationServiceProvider,\n RateLimiterServiceProvider,\n ScheduleServiceProvider,\n];\n",
|
|
7
7
|
"import { Application } from \"../foundation/Application\";\nimport type { ServiceProviderConstructor, ShutdownReport } from \"../foundation/Application\";\nimport type { ServiceToken } from \"../container/Container\";\nimport type { ConfigItems } from \"../support/Repository\";\nimport type { Service, ServiceConstructor } from \"../support/Service\";\nimport { registerModels } from \"../orm/registration\";\nimport { registeredNames } from \"../orm/registry\";\nimport { Scheduler } from \"../services/cron/Scheduler\";\nimport { QueueManager } from \"../services/queue/QueueManager\";\nimport { startClaimingIfServing } from \"../services/queue/QueueServiceProvider\";\nimport { ApiRouteDispatcher } from \"../services/router/ApiRouteDispatcher\";\nimport { ViewRouteDispatcher } from \"../services/router/ViewRouteDispatcher\";\nimport { DomainRouter } from \"../services/router/DomainRouter\";\nimport { runGlobalMiddleware } from \"../services/router/globalMiddleware\";\nimport { kernelContext } from \"./context\";\nimport { frameworkProviders } from \"./providers\";\n\n/**\n * The app's entry point into the framework. A Kernel subclass declares what the\n * app adds — its `config` slices and any extra `providers` — and everything\n * else lives in the Application container it owns.\n */\nexport class Kernel {\n /**\n * App-level config, merged over the framework defaults. Each key is a config\n * slice: `{ mail: { ... }, route: { ... } }`, normally the modules under\n * `app/config`.\n */\n protected config: ConfigItems = {};\n\n /**\n * App-level providers, registered after the framework's own so they can\n * rebind anything the framework bound.\n */\n protected providers: ServiceProviderConstructor[] = [];\n\n /**\n * The app's own singleton services. Each is constructed during the\n * synchronous boot phase and its `boot()` awaited during the asynchronous\n * one, in the order listed — so a service whose `boot()` depends on another\n * goes after it.\n *\n * An entry is either the class itself or a configured instance from\n * `Service.with({ ... })`. Listing is explicit rather than discovered because\n * the order is load-bearing here, and because a service is always imported by\n * whatever injects it — there is no file the import graph would miss.\n */\n protected services: Array<ServiceConstructor | Service> = [];\n\n private serviceInstances: Service[] = [];\n private serviceTokens = new Set<string>();\n private servicesBooted = false;\n\n /**\n * The modules holding the app's model classes — normally\n * `[generated, models]`, the generated namespace and the barrel of subclasses\n * written over it. Every model class they export is registered under the name\n * its schema carries, later modules winning, and the whole set is audited\n * before anything else boots.\n *\n * ### Why this is a Kernel field and not a line in a file somewhere\n *\n * Registration used to be `register(\"User\", User)` next to each subclass, and\n * the failure mode of forgetting it is an authorization hole that nothing\n * reports: a relation read resolves its target by name, so an unregistered\n * policied subclass leaves the generated base owning the name and every\n * nested `include` of that model comes back unscoped. No error at the root\n * either, because `$exec`'s divergence guard begins `registered !== this` and\n * the base it is running on *is* the registered one. A model only ever read\n * through an include — a membership, a pivot, the kind that carries a tenant\n * scope — never trips anything.\n *\n * Listing the modules here says it once, in the same place the app already\n * declares its config slices and providers, and turns the mistake into a\n * failure to boot rather than a quiet cross-tenant read.\n *\n * It sees the modules it is given, so a model class in a file that no barrel\n * re-exports is still invisible. That is the residual, and it is a smaller\n * one: a barrel is a place to notice an omission, and thirteen `register`\n * lines scattered across thirteen files is not.\n */\n protected models: Array<Record<string, unknown>> = [];\n\n readonly app = new Application();\n\n /**\n * Phase one, synchronous: every provider is constructed and its `register()`\n * runs. Only bindings are recorded here — no service is instantiated, so this\n * is safe to call from a synchronous constructor (`new App({ kernel })`).\n * Phase two is `waitForBoot()`.\n */\n boot() {\n // Before the container, deliberately. This throws on a model whose policies\n // would be skipped, and the useful moment for that is the one where nothing\n // has been constructed and no request can be in flight.\n if (this.models.length > 0) registerModels(...this.models);\n else warnIfModelsAreRegisteredButUndeclared();\n\n this.app.config.merge(this.config);\n Application.setInstance(this.app);\n this.app.registerMany([...frameworkProviders, ...this.providers]);\n this.registerServices();\n }\n\n /**\n * Constructs every listed service and binds it into the container. Runs after\n * the providers have registered, so a provider's `boot()` can `inject()` one;\n * a `Service` constructor does no I/O, so doing this synchronously costs\n * nothing beyond the field initializers.\n */\n private registerServices() {\n // What a previous pass bound, so re-running this on the same kernel is not\n // mistaken for a collision with something else.\n const ours = this.serviceTokens;\n\n this.serviceInstances = [];\n this.serviceTokens = new Set();\n this.servicesBooted = false;\n\n const owners = new Map<string, string>();\n\n for (const declaration of this.services) {\n const instance =\n typeof declaration === \"function\" ? new declaration() : declaration;\n const ctor = instance.constructor as ServiceConstructor;\n\n if (!ctor.token) {\n throw new Error(\n `Service [${ctor.name}] is listed in \\`services\\` but does not declare a \\`static token\\`.`,\n );\n }\n\n // Two services under one token is the failure this refuses to have\n // silently: the second would replace the first in the container, and\n // every `inject()` written against either would hand back whichever was\n // listed last.\n const owner = owners.get(ctor.token);\n if (owner) {\n throw new Error(\n `Services [${owner}] and [${ctor.name}] both declare the token \"${ctor.token}\". Tokens are the container's keys, so they must be unique.`,\n );\n }\n owners.set(ctor.token, ctor.name);\n\n // The same failure one level out. `Container.instance()` writes into\n // `instances`, which `make()` consults before `bindings`, so a token that\n // is already spoken for is not shared with its owner — it replaces it, for\n // every `app()` and `inject()` in the process. An app service that named\n // itself \"mail\" would leave `Mail.send()` resolving to an object with no\n // `send`, and the boot that caused it would report nothing. Providers have\n // all registered by now, so anything bound here belongs to somebody else.\n const token = ctor as unknown as ServiceToken<Service>;\n if (!ours.has(ctor.token) && this.app.bound(token)) {\n throw new Error(\n `Service [${ctor.name}] declares the token \"${ctor.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.`,\n );\n }\n\n this.app.instance(token, instance);\n this.serviceInstances.push(instance);\n this.serviceTokens.add(ctor.token);\n }\n }\n\n /**\n * Phase two, asynchronous: every provider's `boot()` runs, in registration\n * order, after all of them have registered. Idempotent.\n */\n async waitForBoot() {\n await this.app.boot();\n await this.bootServices();\n // Last, once every job — queued listeners included — is registered.\n startClaimingIfServing(this.app);\n }\n\n /**\n * Phase two for services, after every provider's `boot()` — so a service may\n * use the facades and anything else a provider owns. Idempotent, like the\n * provider phase it follows.\n */\n private async bootServices() {\n if (this.servicesBooted) {\n return;\n }\n for (const service of this.serviceInstances) {\n await service.boot();\n }\n this.servicesBooted = true;\n }\n\n /**\n * Every provider's `shutdown()`, in reverse registration order, inside the\n * application context — so a hook may use the facades, as a cron tick or a\n * request would. See `Application.shutdown` for the deadline and the\n * report. Idempotent.\n */\n shutdown(options?: { timeoutMs?: number }): Promise<ShutdownReport> {\n return this.run(() => this.app.shutdown(options));\n }\n\n run<T>(cb: () => T) {\n return kernelContext.run(this.app, cb);\n }\n\n /**\n * Resolve a service by token. Callers outside this module should prefer the\n * named accessors below or `app()`; this exists for tooling that holds a\n * Kernel but no ambient context.\n */\n resolve<T>(token: ServiceToken<T>): T {\n return this.app.make(token);\n }\n\n // Named accessors. `app/App.ts` goes through these rather than importing the\n // service classes itself — see the note in that file about the two copies of\n // gemi that coexist at build time.\n apiRoutes(): ApiRouteDispatcher {\n return this.app.make(ApiRouteDispatcher);\n }\n\n viewRoutes(): ViewRouteDispatcher {\n return this.app.make(ViewRouteDispatcher);\n }\n\n domains(): DomainRouter {\n return this.app.make(DomainRouter);\n }\n\n queue(): QueueManager {\n return this.app.make(QueueManager);\n }\n\n /** The `global` middleware list for one request. Call it inside `run`. */\n globalMiddleware(req: Request) {\n return runGlobalMiddleware(req);\n }\n\n destroy() {\n // Only touch services that were actually resolved — resolving one here\n // would construct it purely to tear it down.\n if (this.app.resolved(Scheduler)) {\n this.app.make(Scheduler).stop();\n }\n\n this.app.flush();\n\n if (Application.getInstance() === this.app) {\n Application.setInstance(undefined);\n }\n\n kernelContext.disable();\n }\n}\n\n/**\n * Says something to an application that has models and has not declared them.\n *\n * Without this the fix for #316 defaults to off. `models` is `[]`, `boot()`\n * no-ops, and an app upgrading from 0.48 is in exactly the state the issue\n * describes until somebody edits their Kernel by hand — while the only place\n * that says to is the **Setup** section of `docs/orm.md`, which an existing app\n * read once and will not read again. #316 was filed by an app mid-migration\n * with a 79-model schema, which is precisely the reader who never sees it.\n *\n * The condition is what makes this worth printing. A populated registry with an\n * empty `models` means the generated `index.ts` was imported and its bases are\n * what every nested read resolves to — so if any policy lives on a subclass, it\n * is being skipped inside includes right now. A Kernel with no ORM at all has\n * an empty registry and hears nothing.\n *\n * Development only, and a warning rather than a throw: an app in this state is\n * running today, and turning a working deploy into a failure to start over an\n * arrangement that *might* be fine is not a patch-level thing to do. The\n * failure it points at is silent, so the fix for it has to be noisy somewhere,\n * and the terminal an author is already looking at is the cheapest somewhere\n * there is.\n */\nfunction warnIfModelsAreRegisteredButUndeclared(): void {\n if (process.env.NODE_ENV === \"production\") return;\n\n const registered = registeredNames();\n if (registered.length === 0) return;\n\n console.warn(\n `[gemi] ${registered.length} model${registered.length === 1 ? \" is\" : \"s are\"} ` +\n `registered, but Kernel.models is empty.\\n` +\n ` Nested relation reads resolve a model by name, so a policy on a ` +\n `subclass that does not own its\\n` +\n ` name is skipped inside every include — scoped at the root, ` +\n `unscoped in an include, with nothing\\n` +\n ` to notice it. Declaring the modules registers each class under ` +\n `its own name and audits the set:\\n\\n` +\n ` import * as generated from \"../models/generated\"\\n` +\n ` import * as models from \"../models\"\\n\\n` +\n ` export default class extends Kernel {\\n` +\n ` models = [generated, models]\\n` +\n ` }\\n\\n` +\n ` See docs/orm.md#your-model-class. Development only; this never ` +\n `prints in production.`,\n );\n}\n"
|
|
8
8
|
],
|
|
9
|
-
"mappings": ";
|
|
10
|
-
"debugId": "
|
|
9
|
+
"mappings": ";m1CAqCA,IAAS,HAAe,JAAC,HAAoB,JAC3C,DAAM,HAAe,HAAS,GAAQ,DAAI,UAAe,FAAG,OAAY,FAAK,FAC7E,CAAO,0BAA+B,AAAK,JAAY,HAGzD,DAAM,FAAY,DAAI,DAEhB,FAAuC,JAC3C,GAAS,KACT,MAAO,CAAC,IAAa,EACrB,QAAS,IACX,EA8BA,eAAsB,CAAmB,CAAC,EAAgD,CACxF,IAAM,EAAW,EAAI,CAAkB,EACvC,GAAI,EAAS,OAAO,OAAO,SAAW,EACpC,OAAO,GAGT,IAAQ,YAAa,IAAI,IAAI,EAAI,GAAG,EAC9B,EAAQ,EAA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