gemi 0.70.1 → 0.71.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/index.js +2 -2
- package/dist/ai/index.js.map +1 -1
- package/dist/app/index.js +1 -1
- package/dist/auth/AuthManager.d.ts +1 -1
- package/dist/auth/AuthManager.d.ts.map +1 -1
- package/dist/auth/UserProvider.d.ts +93 -9
- package/dist/auth/UserProvider.d.ts.map +1 -1
- package/dist/broadcasting/index.js +1 -1
- package/dist/bun/plugin.js +1 -1
- package/dist/bun/preload.js +1 -1
- package/dist/{chunk-p0m3qgs5.js → chunk-0kpvbnz0.js} +2 -2
- package/dist/{chunk-p0m3qgs5.js.map → chunk-0kpvbnz0.js.map} +1 -1
- package/dist/chunk-0x9a9yha.js +19 -0
- package/dist/{chunk-4t9zv1rk.js.map → chunk-0x9a9yha.js.map} +9 -8
- package/dist/{chunk-63n765wn.js → chunk-25a65e4r.js} +2 -2
- package/dist/{chunk-63n765wn.js.map → chunk-25a65e4r.js.map} +1 -1
- package/dist/{chunk-dmxr0bt8.js → chunk-26n9365a.js} +3 -3
- package/dist/{chunk-dmxr0bt8.js.map → chunk-26n9365a.js.map} +1 -1
- package/dist/{chunk-7tmqw6a5.js → chunk-2a2qd22n.js} +2 -2
- package/dist/{chunk-7tmqw6a5.js.map → chunk-2a2qd22n.js.map} +1 -1
- package/dist/{chunk-k4vj2b98.js → chunk-385exk8p.js} +2 -2
- package/dist/{chunk-k4vj2b98.js.map → chunk-385exk8p.js.map} +1 -1
- package/dist/{chunk-mpk36kdy.js → chunk-3g94pe6x.js} +2 -2
- package/dist/{chunk-mpk36kdy.js.map → chunk-3g94pe6x.js.map} +1 -1
- package/dist/{chunk-8nzcqw9n.js → chunk-3w80kmxr.js} +2 -2
- package/dist/{chunk-8nzcqw9n.js.map → chunk-3w80kmxr.js.map} +1 -1
- package/dist/{chunk-c776vm8q.js → chunk-3zraw16t.js} +3 -3
- package/dist/{chunk-c776vm8q.js.map → chunk-3zraw16t.js.map} +1 -1
- package/dist/{chunk-tkrj74c1.js → chunk-3zv572s2.js} +2 -2
- package/dist/{chunk-tkrj74c1.js.map → chunk-3zv572s2.js.map} +1 -1
- package/dist/{chunk-zpjx407m.js → chunk-44j2dckn.js} +3 -3
- package/dist/{chunk-zpjx407m.js.map → chunk-44j2dckn.js.map} +1 -1
- package/dist/{chunk-rm5qa99y.js → chunk-47589yz8.js} +3 -3
- package/dist/{chunk-rm5qa99y.js.map → chunk-47589yz8.js.map} +1 -1
- package/dist/{chunk-th8drc6f.js → chunk-4yj86ds2.js} +2 -2
- package/dist/{chunk-th8drc6f.js.map → chunk-4yj86ds2.js.map} +1 -1
- package/dist/{chunk-xmjzrg41.js → chunk-544va0er.js} +3 -3
- package/dist/{chunk-xmjzrg41.js.map → chunk-544va0er.js.map} +1 -1
- package/dist/{chunk-vpvde0nb.js → chunk-5fxqzs72.js} +2 -2
- package/dist/{chunk-vpvde0nb.js.map → chunk-5fxqzs72.js.map} +1 -1
- package/dist/{chunk-5p4ywbsz.js → chunk-88qvsv9w.js} +2 -2
- package/dist/{chunk-5p4ywbsz.js.map → chunk-88qvsv9w.js.map} +1 -1
- package/dist/{chunk-vxr752md.js → chunk-8dvntsme.js} +2 -2
- package/dist/{chunk-vxr752md.js.map → chunk-8dvntsme.js.map} +1 -1
- package/dist/{chunk-z4k18gnp.js → chunk-9hbwvcxn.js} +2 -2
- package/dist/{chunk-z4k18gnp.js.map → chunk-9hbwvcxn.js.map} +1 -1
- package/dist/{chunk-wqamwrrn.js → chunk-ak7jma5c.js} +2 -2
- package/dist/{chunk-wqamwrrn.js.map → chunk-ak7jma5c.js.map} +1 -1
- package/dist/{chunk-5qnk24jy.js → chunk-awjqnh2x.js} +2 -2
- package/dist/{chunk-5qnk24jy.js.map → chunk-awjqnh2x.js.map} +1 -1
- package/dist/{chunk-5fxz3knw.js → chunk-b2bpwb1d.js} +2 -2
- package/dist/{chunk-5fxz3knw.js.map → chunk-b2bpwb1d.js.map} +1 -1
- package/dist/{chunk-4j6vrkmj.js → chunk-b53j44zv.js} +2 -2
- package/dist/{chunk-4j6vrkmj.js.map → chunk-b53j44zv.js.map} +1 -1
- package/dist/{chunk-4azcbkxm.js → chunk-bjr740m4.js} +1 -1
- package/dist/{chunk-qxfby5zf.js → chunk-bt9rjc80.js} +3 -3
- package/dist/{chunk-qxfby5zf.js.map → chunk-bt9rjc80.js.map} +1 -1
- package/dist/{chunk-f8wyyky5.js → chunk-c6z9f6cp.js} +2 -2
- package/dist/{chunk-f8wyyky5.js.map → chunk-c6z9f6cp.js.map} +1 -1
- package/dist/chunk-cvm5sm4m.js +5 -0
- package/dist/{chunk-ds8d17k6.js.map → chunk-cvm5sm4m.js.map} +1 -1
- package/dist/{chunk-f65v7rqq.js → chunk-drrxkg9v.js} +3 -3
- package/dist/{chunk-f65v7rqq.js.map → chunk-drrxkg9v.js.map} +1 -1
- package/dist/{chunk-p9rg95p6.js → chunk-ejspccjb.js} +1 -1
- package/dist/{chunk-q2qnet5h.js → chunk-ep1jte2d.js} +2 -2
- package/dist/{chunk-q2qnet5h.js.map → chunk-ep1jte2d.js.map} +1 -1
- package/dist/{chunk-44jp4cb2.js → chunk-ev1pe2ry.js} +2 -2
- package/dist/{chunk-44jp4cb2.js.map → chunk-ev1pe2ry.js.map} +1 -1
- package/dist/{chunk-2yrgzmpk.js → chunk-gf3y4k0r.js} +2 -2
- package/dist/{chunk-2yrgzmpk.js.map → chunk-gf3y4k0r.js.map} +1 -1
- package/dist/{chunk-wc4jpf86.js → chunk-gjanfny1.js} +3 -3
- package/dist/{chunk-wc4jpf86.js.map → chunk-gjanfny1.js.map} +1 -1
- package/dist/{chunk-qtwmbqzr.js → chunk-gkedmh5f.js} +2 -2
- package/dist/{chunk-qtwmbqzr.js.map → chunk-gkedmh5f.js.map} +1 -1
- package/dist/{chunk-vbrbsk9b.js → chunk-gn0vhf9n.js} +3 -3
- package/dist/{chunk-vbrbsk9b.js.map → chunk-gn0vhf9n.js.map} +1 -1
- package/dist/{chunk-fxdc34cj.js → chunk-jgn1jyys.js} +2 -2
- package/dist/{chunk-fxdc34cj.js.map → chunk-jgn1jyys.js.map} +1 -1
- package/dist/{chunk-7srjk8t7.js → chunk-ksxes55e.js} +2 -2
- package/dist/{chunk-7srjk8t7.js.map → chunk-ksxes55e.js.map} +1 -1
- package/dist/{chunk-dacq5bw8.js → chunk-mt1776nd.js} +2 -2
- package/dist/{chunk-dacq5bw8.js.map → chunk-mt1776nd.js.map} +1 -1
- package/dist/{chunk-y73tppyk.js → chunk-n74re6da.js} +2 -2
- package/dist/{chunk-y73tppyk.js.map → chunk-n74re6da.js.map} +1 -1
- package/dist/chunk-ngq4n2b3.js +54 -0
- package/dist/chunk-ngq4n2b3.js.map +15 -0
- package/dist/{chunk-k7hm7f3t.js → chunk-p7tbab19.js} +3 -3
- package/dist/{chunk-k7hm7f3t.js.map → chunk-p7tbab19.js.map} +1 -1
- package/dist/{chunk-ah13y0hy.js → chunk-ps59yj5b.js} +2 -2
- package/dist/{chunk-ah13y0hy.js.map → chunk-ps59yj5b.js.map} +1 -1
- package/dist/chunk-qb1x1r58.js +5 -0
- package/dist/{chunk-x2tqctjm.js.map → chunk-qb1x1r58.js.map} +4 -5
- package/dist/{chunk-nkfj4qq5.js → chunk-qcpar2xh.js} +2 -2
- package/dist/{chunk-nkfj4qq5.js.map → chunk-qcpar2xh.js.map} +1 -1
- package/dist/{chunk-pmze0zcr.js → chunk-qm16ep90.js} +2 -2
- package/dist/{chunk-pmze0zcr.js.map → chunk-qm16ep90.js.map} +1 -1
- package/dist/{chunk-ezd59jpg.js → chunk-r4t5a213.js} +1 -1
- package/dist/{chunk-bq3sc20y.js → chunk-rnbgw55r.js} +2 -2
- package/dist/{chunk-bq3sc20y.js.map → chunk-rnbgw55r.js.map} +1 -1
- package/dist/{chunk-p48th4ps.js → chunk-ryynt7wx.js} +2 -2
- package/dist/{chunk-p48th4ps.js.map → chunk-ryynt7wx.js.map} +1 -1
- package/dist/{chunk-cw2wjrya.js → chunk-sbeszmmp.js} +3 -3
- package/dist/{chunk-cw2wjrya.js.map → chunk-sbeszmmp.js.map} +1 -1
- package/dist/{chunk-q8630z08.js → chunk-sm8h95v3.js} +2 -2
- package/dist/{chunk-q8630z08.js.map → chunk-sm8h95v3.js.map} +1 -1
- package/dist/{chunk-ceemr927.js → chunk-tfsbtz0j.js} +2 -2
- package/dist/{chunk-ceemr927.js.map → chunk-tfsbtz0j.js.map} +1 -1
- package/dist/{chunk-gj5jjmf8.js → chunk-vt9tm0xx.js} +2 -2
- package/dist/{chunk-gj5jjmf8.js.map → chunk-vt9tm0xx.js.map} +1 -1
- package/dist/{chunk-paqjyvjm.js → chunk-w316w188.js} +2 -2
- package/dist/{chunk-paqjyvjm.js.map → chunk-w316w188.js.map} +1 -1
- package/dist/{chunk-snheb16b.js → chunk-wa5emk60.js} +2 -2
- package/dist/{chunk-snheb16b.js.map → chunk-wa5emk60.js.map} +1 -1
- package/dist/{chunk-yffy1k69.js → chunk-wtyn66c0.js} +2 -2
- package/dist/{chunk-yffy1k69.js.map → chunk-wtyn66c0.js.map} +1 -1
- package/dist/{chunk-wbv5kyhe.js → chunk-wxahf19j.js} +4 -4
- package/dist/{chunk-wbv5kyhe.js.map → chunk-wxahf19j.js.map} +1 -1
- package/dist/{chunk-wx3rx7vp.js → chunk-x3jwa5mx.js} +2 -2
- package/dist/{chunk-wx3rx7vp.js.map → chunk-x3jwa5mx.js.map} +1 -1
- package/dist/{chunk-3296fwss.js → chunk-xh65fgg1.js} +2 -2
- package/dist/{chunk-3296fwss.js.map → chunk-xh65fgg1.js.map} +1 -1
- package/dist/{chunk-083j4ktb.js → chunk-xkt6pnv3.js} +2 -2
- package/dist/{chunk-083j4ktb.js.map → chunk-xkt6pnv3.js.map} +1 -1
- package/dist/{chunk-v6v1b4jp.js → chunk-ybtwp81a.js} +2 -2
- package/dist/{chunk-v6v1b4jp.js.map → chunk-ybtwp81a.js.map} +1 -1
- package/dist/{chunk-em9kwz08.js → chunk-yt96ny9v.js} +2 -2
- package/dist/{chunk-em9kwz08.js.map → chunk-yt96ny9v.js.map} +1 -1
- package/dist/{chunk-s7v66c70.js → chunk-yvkm7qya.js} +2 -2
- package/dist/{chunk-s7v66c70.js.map → chunk-yvkm7qya.js.map} +1 -1
- package/dist/{chunk-kh64a9rh.js → chunk-z99bj1mv.js} +2 -2
- package/dist/{chunk-kh64a9rh.js.map → chunk-z99bj1mv.js.map} +1 -1
- package/dist/{chunk-hq496pa4.js → chunk-zbhqa2z7.js} +2 -2
- package/dist/{chunk-hq496pa4.js.map → chunk-zbhqa2z7.js.map} +1 -1
- package/dist/{chunk-b004v4jt.js → chunk-zkpwb3fp.js} +2 -2
- package/dist/{chunk-b004v4jt.js.map → chunk-zkpwb3fp.js.map} +1 -1
- package/dist/{chunk-2qyghpe0.js → chunk-zz0t0pwk.js} +2 -2
- package/dist/{chunk-2qyghpe0.js.map → chunk-zz0t0pwk.js.map} +1 -1
- package/dist/config/index.js +1 -1
- package/dist/console/run.js +2 -2
- package/dist/console/run.js.map +1 -1
- package/dist/container/index.js +2 -2
- package/dist/container/index.js.map +1 -1
- package/dist/database/index.js +2 -2
- package/dist/database/index.js.map +1 -1
- package/dist/email/index.js +2 -2
- package/dist/email/index.js.map +1 -1
- package/dist/facades/Features.d.ts +45 -2
- package/dist/facades/Features.d.ts.map +1 -1
- package/dist/facades/index.js +2 -2
- package/dist/facades/index.js.map +1 -1
- package/dist/foundation/index.js +2 -2
- package/dist/foundation/index.js.map +1 -1
- package/dist/http/index.js +2 -2
- package/dist/http/index.js.map +1 -1
- package/dist/i18n/dictionaryRuntime.js +2 -2
- package/dist/i18n/dictionaryRuntime.js.map +1 -1
- package/dist/i18n/index.js +2 -2
- package/dist/i18n/index.js.map +1 -1
- package/dist/kernel/index.d.ts +3 -2
- package/dist/kernel/index.d.ts.map +1 -1
- package/dist/kernel/index.js +3 -3
- package/dist/kernel/index.js.map +2 -2
- package/dist/orm/Model.d.ts.map +1 -1
- package/dist/orm/compile/lock.d.ts +23 -0
- package/dist/orm/compile/lock.d.ts.map +1 -0
- package/dist/orm/compile/plan-relations.d.ts.map +1 -1
- package/dist/orm/compile/read.d.ts.map +1 -1
- package/dist/orm/dialect/index.d.ts +23 -0
- package/dist/orm/dialect/index.d.ts.map +1 -1
- package/dist/orm/dialect/postgres.d.ts +2 -0
- package/dist/orm/dialect/postgres.d.ts.map +1 -1
- package/dist/orm/dialect/sqlite.d.ts +2 -0
- package/dist/orm/dialect/sqlite.d.ts.map +1 -1
- package/dist/orm/errors.d.ts +17 -0
- package/dist/orm/errors.d.ts.map +1 -1
- package/dist/orm/index.d.ts +2 -2
- package/dist/orm/index.d.ts.map +1 -1
- package/dist/orm/index.js +3 -3
- package/dist/orm/index.js.map +11 -10
- package/dist/orm/plan.d.ts.map +1 -1
- package/dist/orm/types.d.ts +32 -0
- package/dist/orm/types.d.ts.map +1 -1
- package/dist/server/index.js +2 -2
- package/dist/server/index.js.map +1 -1
- package/dist/services/features/FeatureFlagStore.d.ts +14 -1
- package/dist/services/features/FeatureFlagStore.d.ts.map +1 -1
- package/dist/services/features/FeatureManager.d.ts +43 -0
- package/dist/services/features/FeatureManager.d.ts.map +1 -1
- package/dist/services/features/sources/DatabaseFeatureFlagSource.d.ts +17 -1
- package/dist/services/features/sources/DatabaseFeatureFlagSource.d.ts.map +1 -1
- package/dist/services/features/sources/FeatureFlagSource.d.ts +28 -0
- package/dist/services/features/sources/FeatureFlagSource.d.ts.map +1 -1
- package/dist/services/features/sources/StaticFeatureFlagSource.d.ts +7 -2
- package/dist/services/features/sources/StaticFeatureFlagSource.d.ts.map +1 -1
- package/dist/services/features/types.d.ts +11 -0
- package/dist/services/features/types.d.ts.map +1 -1
- package/dist/services/index.d.ts +3 -3
- package/dist/services/index.d.ts.map +1 -1
- package/dist/services/index.js +7 -7
- package/dist/services/index.js.map +3 -3
- package/dist/services/queue/work.js +2 -2
- package/dist/services/queue/work.js.map +1 -1
- package/dist/support/index.js +2 -2
- package/dist/support/index.js.map +1 -1
- package/package.json +1 -1
- package/dist/chunk-4t9zv1rk.js +0 -19
- package/dist/chunk-ayja3wqv.js +0 -54
- package/dist/chunk-ayja3wqv.js.map +0 -15
- package/dist/chunk-ds8d17k6.js +0 -5
- package/dist/chunk-x2tqctjm.js +0 -5
- /package/dist/{chunk-4azcbkxm.js.map → chunk-bjr740m4.js.map} +0 -0
- /package/dist/{chunk-p9rg95p6.js.map → chunk-ejspccjb.js.map} +0 -0
- /package/dist/{chunk-ezd59jpg.js.map → chunk-r4t5a213.js.map} +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { FeatureKey } from "../client/rpc";
|
|
2
2
|
import type { FeatureSubject } from "../services/features/context";
|
|
3
|
-
import { FeatureManager, type FeatureScope } from "../services/features/FeatureManager";
|
|
3
|
+
import { FeatureManager, type FeatureScope, type FeatureSetOptions } from "../services/features/FeatureManager";
|
|
4
4
|
import type { FeatureEvaluation, FeatureListing } from "../services/features/types";
|
|
5
5
|
import { Facade } from "./Facade";
|
|
6
6
|
/**
|
|
@@ -79,10 +79,53 @@ export declare class Features extends Facade {
|
|
|
79
79
|
* ```
|
|
80
80
|
*/
|
|
81
81
|
static list(): Promise<FeatureListing>;
|
|
82
|
+
/**
|
|
83
|
+
* Switches a feature on or off through the configured source, and
|
|
84
|
+
* `invalidate()`s so this process sees it immediately.
|
|
85
|
+
*
|
|
86
|
+
* ```ts
|
|
87
|
+
* public async update(
|
|
88
|
+
* request: HttpRequest<{ active: boolean }, { key: string }>,
|
|
89
|
+
* ) {
|
|
90
|
+
* const input = await request.input();
|
|
91
|
+
*
|
|
92
|
+
* await Features.set(request.params.key, input.get("active"), {
|
|
93
|
+
* actor: await Auth.user(),
|
|
94
|
+
* });
|
|
95
|
+
*
|
|
96
|
+
* return await Features.list();
|
|
97
|
+
* }
|
|
98
|
+
* ```
|
|
99
|
+
*
|
|
100
|
+
* The key accepts any `string`, unlike `enabled()`: the caller is almost
|
|
101
|
+
* always an admin route whose key is a route param, and the declared keys
|
|
102
|
+
* still autocomplete. A typo is caught at runtime instead, before anything is
|
|
103
|
+
* written. Throws:
|
|
104
|
+
*
|
|
105
|
+
* - `UndeclaredFeatureError` for a key `app/features` does not declare. A row
|
|
106
|
+
* for it would be ignored, so the write would create a switch that looks
|
|
107
|
+
* live and does nothing.
|
|
108
|
+
* - `TypeError` for an `active` that is not a boolean, or an `actor` that
|
|
109
|
+
* identifies nobody.
|
|
110
|
+
* - `FeatureSourceReadOnlyError` when the configured source has no `write()`.
|
|
111
|
+
* - `FeatureReloadError` when the write landed and the reload did not — see
|
|
112
|
+
* `invalidate()`.
|
|
113
|
+
*
|
|
114
|
+
* `actor` is recorded as the row's `updatedBy` — a string as given, a user by
|
|
115
|
+
* `publicId` (falling back to `id`) — when the source keeps one. The database
|
|
116
|
+
* source does when the model has the optional `updatedBy String?` column, and
|
|
117
|
+
* `list()` then reports it on each descriptor. Without the column the write
|
|
118
|
+
* still happens and the actor is dropped, with a warning logged once.
|
|
119
|
+
*
|
|
120
|
+
* **Process-local, like `invalidate()`.** Other instances converge within
|
|
121
|
+
* `ttl`.
|
|
122
|
+
*/
|
|
123
|
+
static set(key: FeatureKey | (string & {}), active: boolean, options?: FeatureSetOptions): Promise<void>;
|
|
82
124
|
/** Reloads this process's snapshot now, rather than waiting for the TTL. */
|
|
83
125
|
static refresh(): Promise<void>;
|
|
84
126
|
/**
|
|
85
|
-
* Call this after writing to the `FeatureFlag` table.
|
|
127
|
+
* Call this after writing to the `FeatureFlag` table yourself. `set()` calls
|
|
128
|
+
* it for you.
|
|
86
129
|
*
|
|
87
130
|
* ```ts
|
|
88
131
|
* public async update(
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Features.d.ts","sourceRoot":"","sources":["../../facades/Features.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAChD,OAAO,KAAK,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,IAAI,CAAC;IAIhB,4EAA4E;IAC5E,MAAM,CAAC,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC;IAI/B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAqCG;IACH,MAAM,CAAC,UAAU,IAAI,OAAO,CAAC,IAAI,CAAC;CAGnC"}
|
package/dist/facades/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{
|
|
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-0x9a9yha.js";import"../chunk-gn0vhf9n.js";import"../chunk-ngq4n2b3.js";import{gf as b,nf as f}from"../chunk-3zraw16t.js";import"../chunk-z99bj1mv.js";import"../chunk-xh65fgg1.js";import"../chunk-sbeszmmp.js";import"../chunk-xkt6pnv3.js";import"../chunk-jgn1jyys.js";import"../chunk-tfsbtz0j.js";import"../chunk-26n9365a.js";import"../chunk-mt1776nd.js";import"../chunk-4yj86ds2.js";import"../chunk-25a65e4r.js";import"../chunk-ryynt7wx.js";import"../chunk-5fxqzs72.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
|
-
//# debugId=
|
|
4
|
+
//# debugId=3D931D8FA5303DE464756E2164756E21
|
package/dist/foundation/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{
|
|
2
|
+
import{lg as o,mg as r}from"../chunk-26n9365a.js";import"../chunk-mt1776nd.js";import"../chunk-4yj86ds2.js";import"../chunk-5fxqzs72.js";export{r as app,o as Application};
|
|
3
3
|
|
|
4
|
-
//# debugId=
|
|
4
|
+
//# debugId=42EB8697A32F065F64756E2164756E21
|
package/dist/http/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{
|
|
2
|
+
import{Ed as F,Fd as G,Gd as H,Hd as I,Id as J,Jd as K,ic as m,jc as n,kc as o,lc as u,mc as v,nc as w,pc as x,qc as y,rc as z,sc as A,tc as B,vd as C,wd as D,xd as E}from"../chunk-0x9a9yha.js";import"../chunk-gn0vhf9n.js";import"../chunk-ngq4n2b3.js";import{$e as k,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,_e as j,af as l,bf as p,cf as q,df as r,ef as s,ff as t}from"../chunk-3zraw16t.js";import"../chunk-z99bj1mv.js";import"../chunk-xh65fgg1.js";import"../chunk-sbeszmmp.js";import"../chunk-xkt6pnv3.js";import"../chunk-jgn1jyys.js";import"../chunk-tfsbtz0j.js";import"../chunk-26n9365a.js";import"../chunk-mt1776nd.js";import"../chunk-4yj86ds2.js";import"../chunk-25a65e4r.js";import"../chunk-ryynt7wx.js";import"../chunk-5fxqzs72.js";export{f as toRangeHeaderValue,m as toMiddlewareList,e as resolveRange,d as parseRangeHeader,g as parseContentRange,B as middlewareConfigDefaults,c as getCookies,i as formatUnsatisfiedContentRange,h as formatContentRange,A as defineMiddlewareConfig,n as createUnsatisfiableResponse,o as createStreamResponse,x as createFileResponse,E as clientIp,y as ViewRouter,k as ValidationError,b as ResourceController,j as RequestBreakerError,D as RateLimitMiddleware,C as RateLimitExceededError,r as RangeNotSatisfiableError,J as PoliciesServiceProvider,K as Policies,z as Middleware,w as McpRouter,v as McpRouteDeclaration,q as InsufficientPermissionsError,l as HttpRequest,s as FileNotFoundError,H as CorsMiddleware,a as Controller,G as CacheMiddleware,I as CSRFMiddleware,p as AuthorizationError,F as AuthenticationMiddleware,t as AuthenticationError,u as ApiRouter};
|
|
3
3
|
|
|
4
|
-
//# debugId=
|
|
4
|
+
//# debugId=2B96323E477ADCC564756E2164756E21
|
package/dist/http/index.js.map
CHANGED
|
@@ -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-8dvntsme.js";import{qa as c,ra as d,ta as l}from"../chunk-9a8qz3s7.js";import{$f as o,Wf as e,Xf as i,Zf as t,_f as r,ag as n,bg as a,cg as s}from"../chunk-jgn1jyys.js";import"../chunk-5fxqzs72.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=499D7D917860294F64756E2164756E21
|
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-8dvntsme.js";import"../chunk-9a8qz3s7.js";import{Wa as L}from"../chunk-cvm5sm4m.js";import{fc as E,gc as V}from"../chunk-0kpvbnz0.js";import"../chunk-9hbwvcxn.js";import{Ec as j}from"../chunk-0x9a9yha.js";import"../chunk-gn0vhf9n.js";import"../chunk-ngq4n2b3.js";import"../chunk-3zraw16t.js";import"../chunk-z99bj1mv.js";import"../chunk-xh65fgg1.js";import"../chunk-sbeszmmp.js";import"../chunk-xkt6pnv3.js";import"../chunk-jgn1jyys.js";import{jg as X}from"../chunk-tfsbtz0j.js";import"../chunk-26n9365a.js";import"../chunk-mt1776nd.js";import"../chunk-4yj86ds2.js";import"../chunk-25a65e4r.js";import"../chunk-ryynt7wx.js";import"../chunk-5fxqzs72.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=CDA2DB5524B445EA64756E2164756E21
|
package/dist/i18n/index.js.map
CHANGED
|
@@ -7,6 +7,6 @@
|
|
|
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
9
|
"mappings": ";8wBAAA,mBAAS,SAAe,eAAU,SAO3B,IAAS,JAAgB,JAAC,HAAkB,HAAwB,JAEzE,DAAM,HAAS,EAAO,EAAO,JAAM,HAAE,AACnC,JAAC,DACC,EAAO,IAAU,YACjB,EAAgB,EAAkC,EAAE,CAAC,CACzD,EAMM,EAAQ,kDAEd,GAAI,CAAC,EAqCH,OAnCe,EAAS,QAAQ,EAAO,CAAC,EAAO,EAAM,EAAM,IAAY,CAErE,IAAM,EAAY,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O,CAAM,kBAAkB,EAAW,KACtF,EAGF,OAAO,EAAiB,EAAW,GAAU,CAAC,CAAS",
|
|
10
|
-
"debugId": "
|
|
10
|
+
"debugId": "CDA2DB5524B445EA64756E2164756E21",
|
|
11
11
|
"names": []
|
|
12
12
|
}
|
package/dist/kernel/index.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export { Kernel } from "./Kernel";
|
|
2
2
|
export { frameworkProviders } from "./providers";
|
|
3
|
-
export { UserProvider } from "../auth/UserProvider";
|
|
4
|
-
export type {
|
|
3
|
+
export { SESSION_SELECT, UserProvider } from "../auth/UserProvider";
|
|
4
|
+
export type { SessionSelect } from "../auth/UserProvider";
|
|
5
|
+
export type { Account, AuthModels, CreateAccountArgs, CreateMagicLinkTokenArgs, CreatePasswordResetTokenArgs, CreateSessionArgs, CreateSocialAccountArgs, CreateUserArgs, DeleteSessionArgs, FindSessionArgs, Invitation, Organization, PasswordResetToken, SessionWithUser, UpdateSessionArgs, UpdateUserPasswordArgs, User, } from "../auth/types";
|
|
5
6
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../kernel/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAMjD,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../kernel/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAMjD,OAAO,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACpE,YAAY,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAC1D,YAAY,EACV,OAAO,EACP,UAAU,EACV,iBAAiB,EACjB,wBAAwB,EACxB,4BAA4B,EAC5B,iBAAiB,EACjB,uBAAuB,EACvB,cAAc,EACd,iBAAiB,EACjB,eAAe,EACf,UAAU,EACV,YAAY,EACZ,kBAAkB,EAClB,eAAe,EACf,iBAAiB,EACjB,sBAAsB,EACtB,IAAI,GACL,MAAM,eAAe,CAAC"}
|
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-3g94pe6x.js";import{Va as e}from"../chunk-b53j44zv.js";import{Wa as g}from"../chunk-cvm5sm4m.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-qb1x1r58.js";import"../chunk-zbhqa2z7.js";import"../chunk-drrxkg9v.js";import{ac as jj}from"../chunk-p7tbab19.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-0x9a9yha.js";import{Nd as s}from"../chunk-gn0vhf9n.js";import{_d as V,de as f}from"../chunk-ngq4n2b3.js";import{Ze as F,af as b}from"../chunk-3zraw16t.js";import{qf as L}from"../chunk-z99bj1mv.js";import"../chunk-xh65fgg1.js";import"../chunk-sbeszmmp.js";import"../chunk-xkt6pnv3.js";import"../chunk-jgn1jyys.js";import"../chunk-544va0er.js";import"../chunk-tfsbtz0j.js";import{lg as N,mg as x}from"../chunk-26n9365a.js";import{ng as U}from"../chunk-mt1776nd.js";import"../chunk-4yj86ds2.js";import"../chunk-b2bpwb1d.js";import"../chunk-25a65e4r.js";import{Ag as C}from"../chunk-ryynt7wx.js";import"../chunk-5fxqzs72.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:
|
|
@@ -11,6 +11,6 @@ import{ya as y}from"../chunk-mpk36kdy.js";import{Va as e}from"../chunk-4j6vrkmj.
|
|
|
11
11
|
models = [generated, models]
|
|
12
12
|
}
|
|
13
13
|
|
|
14
|
-
See docs/orm.md#your-model-class. Development only; this never prints in production.`)}export{T as frameworkProviders,
|
|
14
|
+
See docs/orm.md#your-model-class. Development only; this never prints in production.`)}export{T as frameworkProviders,Hj as UserProvider,Gj as SESSION_SELECT,Jj as Kernel};
|
|
15
15
|
|
|
16
|
-
//# debugId=
|
|
16
|
+
//# debugId=5C074C9FBE6183A564756E2164756E21
|
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 { BroadcastServiceProvider } from \"../services/pubsub/BroadcastServiceProvider\";\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 BroadcastServiceProvider,\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 { BroadcastManager } from \"../services/pubsub/BroadcastManager\";\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 broadcast(): BroadcastManager {\n return this.app.make(BroadcastManager);\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": ";8zCAqCA,IAAS,HAAe,JAAC,HAAoB,JAC3C,DAAM,HAAe,HAAS,GAAQ,DAAI,UAAe,FAAG,OAAY,FAA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,aAAc,OAE3C,IAAM,EAAa,EAAgB,EACnC,GAAI,EAAW,SAAW,EAAG,OAE7B,QAAQ,KACN,UAAU,EAAW,eAAe,EAAW,SAAW,EAAI,MAAQ;AAAA;AAAA,EAIpE,2EACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,6FAUJ",
|
|
10
|
+
"debugId": "5C074C9FBE6183A564756E2164756E21",
|
|
11
11
|
"names": []
|
|
12
12
|
}
|
package/dist/orm/Model.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Model.d.ts","sourceRoot":"","sources":["../../orm/Model.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Model.d.ts","sourceRoot":"","sources":["../../orm/Model.ts"],"names":[],"mappings":"AAoCA,OAAO,EAEL,KAAK,WAAW,EAChB,KAAK,SAAS,EACd,KAAK,SAAS,EACf,MAAM,QAAQ,CAAC;AAChB,OAAO,EAcL,KAAK,WAAW,EAEjB,MAAM,UAAU,CAAC;AASlB,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAuE5C,8BAAsB,KAAK;IACzB;;;;;;;;;;;;;OAaG;IACH,SAAS;IAET,gFAAgF;IAChF,MAAM,CAAC,OAAO,EAAE,WAAW,CAAC;IAE5B;;;;;;;;;;;;;;;;;;;;;;;;;OAyBG;IACH,OAAe,UAAU,CAAC,EAAE,IAAI,CAAC;IAEjC;;;;;;;;;;;;;;;;;;OAkBG;IACH,MAAM,CAAC,SAAS,CAAC,EAAE,SAAS,WAAW,EAAE,CAAC;IAE1C;;;;;;;;OAQG;IACH,MAAM,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC;IAE5B;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA4BG;IACH,MAAM,CAAC,EAAE,CAAC,CAAC,SAAS,OAAO,KAAK,EAAE,IAAI,EAAE,CAAC,EAAE,UAAU,EAAE,MAAM,GAAG,CAAC;IA6Bj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and one
|
|
4
|
+
* answer to "what if another transaction holds the row".
|
|
5
|
+
*
|
|
6
|
+
* The dialect turns this into SQL (`SqlDialect.rowLock`); the compiler never
|
|
7
|
+
* spells a lock clause itself.
|
|
8
|
+
*/
|
|
9
|
+
export interface RowLockClause {
|
|
10
|
+
mode: RowLockMode;
|
|
11
|
+
/** `wait` blocks, `skipLocked` leaves the row out, `noWait` fails at once. */
|
|
12
|
+
onLocked: "wait" | "skipLocked" | "noWait";
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Validates `lock` and returns what it asks for, or `undefined` for no lock.
|
|
16
|
+
*
|
|
17
|
+
* Strict for the reason every argument here is: a lock that is silently not
|
|
18
|
+
* taken is a race that reads as fixed. So an unknown key, a misspelt mode or
|
|
19
|
+
* both `skipLocked` and `noWait` at once raise rather than degrade to a plain
|
|
20
|
+
* read.
|
|
21
|
+
*/
|
|
22
|
+
export declare function parseRowLock(lock: unknown, model: string, operation: string): RowLockClause | undefined;
|
|
23
|
+
//# sourceMappingURL=lock.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lock.d.ts","sourceRoot":"","sources":["../../../orm/compile/lock.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAE5C;;;;;;GAMG;AACH,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,WAAW,CAAC;IAClB,8EAA8E;IAC9E,QAAQ,EAAE,MAAM,GAAG,YAAY,GAAG,QAAQ,CAAC;CAC5C;AASD;;;;;;;GAOG;AACH,wBAAgB,YAAY,CAC1B,IAAI,EAAE,OAAO,EACb,KAAK,EAAE,MAAM,EACb,SAAS,EAAE,MAAM,GAChB,aAAa,GAAG,SAAS,CA6D3B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plan-relations.d.ts","sourceRoot":"","sources":["../../../orm/compile/plan-relations.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,E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S,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AACpD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AAW7C,OAAO,EAGL,KAAK,gBAAgB,EACtB,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"read.d.ts","sourceRoot":"","sources":["../../../orm/compile/read.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAM7C,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AACpD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AAW7C,OAAO,EAGL,KAAK,gBAAgB,EACtB,MAAM,kBAAkB,CAAC;AAS1B,mDAAmD;AAMnD,eAAO,MAAM,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,MAAM,CAAC,CAuCjD,CAAC;AA8BF,wBAAgB,eAAe,CAAC,EAAE,EAAE,SAAS,GAAG,OAAO,CAEtD;AAUD,wBAAgB,WAAW,CACzB,MAAM,EAAE,WAAW,EACnB,EAAE,EAAE,SAAS,EACb,IAAI,EAAE,GAAG,EACT,OAAO,EAAE,UAAU;AACnB;;;;;;;;GAQG;AACH,QAAQ,CAAC,EAAE,gBAAgB,GAC1B,SAAS,CAiOX"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { Dialect } from "../../database/dialect";
|
|
2
2
|
import type { Binder, Fragment } from "../compile/fragment";
|
|
3
|
+
import type { RowLockClause } from "../compile/lock";
|
|
3
4
|
import type { FieldSchema, ScalarType } from "../schema";
|
|
4
5
|
import { PostgresDialect } from "./postgres";
|
|
5
6
|
import { SqliteDialect } from "./sqlite";
|
|
@@ -360,6 +361,28 @@ export interface SqlDialect {
|
|
|
360
361
|
* a `Fragment` because everything the compiler emits is one.
|
|
361
362
|
*/
|
|
362
363
|
ignoreConflicts(): Fragment | null;
|
|
364
|
+
/**
|
|
365
|
+
* The clause a locking read ends with — `lock: "update"` on a `findMany` —
|
|
366
|
+
* naming `table` as the only table whose rows are locked.
|
|
367
|
+
*
|
|
368
|
+
* Scoped to the root table (`for update of "User"`) rather than left bare,
|
|
369
|
+
* because a folded `include` puts a lateral subquery in the `from` clause and
|
|
370
|
+
* Postgres refuses to lock through one (`FOR UPDATE is not allowed with
|
|
371
|
+
* aggregate functions`). Scoping it also matches the documented contract on
|
|
372
|
+
* both strategies: the root rows are locked, related rows never are.
|
|
373
|
+
*
|
|
374
|
+
* **Empty on SQLite, and that is a decision.** SQLite has no row locks, and
|
|
375
|
+
* does not need them for what a locking read is for: its transactions are
|
|
376
|
+
* serializable, with one writer at a time on the whole database, so the lost
|
|
377
|
+
* update a row lock prevents cannot happen there. Two transactions that race
|
|
378
|
+
* wait on (or fail with `SQLITE_BUSY` on) the database lock instead of the
|
|
379
|
+
* row's, and `skipLocked` / `noWait` have no row lock to react to. Refusing
|
|
380
|
+
* would stop code that runs on Postgres in production from running against
|
|
381
|
+
* SQLite in development and tests, for no gain. The one misuse that matters
|
|
382
|
+
* on both — a lock outside a transaction — is refused in `Model.$execute`
|
|
383
|
+
* on every dialect.
|
|
384
|
+
*/
|
|
385
|
+
rowLock(lock: RowLockClause, table: string): Fragment;
|
|
363
386
|
/**
|
|
364
387
|
* Recognise a driver error as a constraint violation, and say which columns
|
|
365
388
|
* it names.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../orm/dialect/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAC;AACtD,OAAO,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAC5D,OAAO,KAAK,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AACzD,OAAO,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAC7C,OAAO,EAAE,aAAa,EAAE,M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a,uBAAwB,SAAQ,KAAK;gBACpC,OAAO,EAAE,OAAO;CAc7B;AAED;;;;;;;;GAQG;AACH,wBAAgB,WAAW,CAAC,OAAO,EAAE,OAAO,GAAG,OAAO,CAErD;AAED,6EAA6E;AAC7E,wBAAgB,YAAY,IAAI,OAAO,EAAE,CAExC;AAkCD;;;;GAIG;AACH,wBAAgB,UAAU,CAAC,OAAO,EAAE,OAAO,GAAG,UAAU,CAIvD;AAED,OAAO,EAAE,eAAe,EAAE,aAAa,EAAE,CAAC"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { Dialect } from "../../database/dialect";
|
|
2
2
|
import { type Binder, type Fragment } from "../compile/fragment";
|
|
3
|
+
import type { RowLockClause } from "../compile/lock";
|
|
3
4
|
import type { FieldSchema, ScalarType } from "../schema";
|
|
4
5
|
import type { ConstraintViolation, SqlDialect } from "./index";
|
|
5
6
|
export declare class PostgresDialect implements SqlDialect {
|
|
@@ -154,6 +155,7 @@ export declare class PostgresDialect implements SqlDialect {
|
|
|
154
155
|
jsonArrayContains(column: string, path: Binder, value: Binder): Fragment;
|
|
155
156
|
like(lhs: string, insensitive: boolean, pattern: Binder): Fragment;
|
|
156
157
|
ignoreConflicts(): Fragment;
|
|
158
|
+
rowLock(lock: RowLockClause, table: string): Fragment;
|
|
157
159
|
paginate(take: Binder | null, skip: Binder | null): Fragment;
|
|
158
160
|
constraintViolation(error: unknown): ConstraintViolation | null;
|
|
159
161
|
castParameter(field: FieldSchema): string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"postgres.d.ts","sourceRoot":"","sources":["../../../orm/dialect/postgres.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAC;AACtD,OAAO,EACL,KAAK,MAAM,EACX,KAAK,QAAQ,EAId,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"postgres.d.ts","sourceRoot":"","sources":["../../../orm/dialect/postgres.ts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,IAAI,EAAE,MAAM,GAAG,IAAI,GAAG,QAAQ;IAkC5D,mBAAmB,CAAC,KAAK,EAAE,OAAO,GAAG,mBAAmB,GAAG,IAAI;IAwC/D,aAAa,CAAC,KAAK,EAAE,WAAW,GAAG,MAAM;IAUzC,MAAM,CAAC,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,WAAW,GAAG,OAAO;IA+FnD,aAAa,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO;IA4BtC,WAAW,CAAC,KAAK,EAAE,WAAW,GAAG,OAAO;IAoBxC,MAAM,CAAC,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,WAAW,GAAG,OAAO;IAMnD;;;;;;;;;;;;;;;;;;;;;;;;;OAyBG;IACH,OAAO,CAAC,UAAU;IAkBlB,OAAO,CAAC,YAAY;CA2ErB"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { Dialect } from "../../database/dialect";
|
|
2
2
|
import { type Binder, type Fragment } from "../compile/fragment";
|
|
3
|
+
import type { RowLockClause } from "../compile/lock";
|
|
3
4
|
import type { FieldSchema } from "../schema";
|
|
4
5
|
import type { ConstraintViolation, SqlDialect } from "./index";
|
|
5
6
|
export declare class SqliteDialect implements SqlDialect {
|
|
@@ -112,6 +113,7 @@ export declare class SqliteDialect implements SqlDialect {
|
|
|
112
113
|
jsonArrayContains(): Fragment;
|
|
113
114
|
like(lhs: string, _insensitive: boolean, pattern: Binder): Fragment;
|
|
114
115
|
ignoreConflicts(): Fragment | null;
|
|
116
|
+
rowLock(_lock: RowLockClause, _table: string): Fragment;
|
|
115
117
|
paginate(take: Binder | null, skip: Binder | null): Fragment;
|
|
116
118
|
constraintViolation(error: unknown): ConstraintViolation | null;
|
|
117
119
|
castParameter(_field: FieldSchema): string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sqlite.d.ts","sourceRoot":"","sources":["../../../orm/dialect/sqlite.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,O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@@ export declare class ModelNotRegisteredError extends Error {
|
|
|
631
631
|
export declare class MissingModelSchemaError extends Error {
|
|
632
632
|
constructor(className: string);
|
|
633
633
|
}
|
|
634
|
+
/**
|
|
635
|
+
* A `lock` asked for outside a transaction.
|
|
636
|
+
*
|
|
637
|
+
* A row lock is held until the transaction that took it ends. Outside one, the
|
|
638
|
+
* statement is its own transaction, so the lock is released the moment the row
|
|
639
|
+
* comes back — before the write it was meant to guard has even been issued. The
|
|
640
|
+
* read would succeed and protect nothing, which is the failure this refuses: the
|
|
641
|
+
* race the lock was written to close stays open, silently.
|
|
642
|
+
*
|
|
643
|
+
* Raised on SQLite too, where the lock itself compiles to nothing, so code that
|
|
644
|
+
* forgot its transaction fails in development rather than first on Postgres.
|
|
645
|
+
*/
|
|
646
|
+
export declare class LockOutsideTransactionError extends Error {
|
|
647
|
+
readonly model: string;
|
|
648
|
+
readonly operation: string;
|
|
649
|
+
constructor(model: string, operation: string);
|
|
650
|
+
}
|
|
634
651
|
//# sourceMappingURL=errors.d.ts.map
|
package/dist/orm/errors.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../orm/errors.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,qBAAa,qBAAsB,SAAQ,KAAK;aAE5B,QAAQ,EAAE,MAAM;aAChB,KAAK,EAAE,MAAM;aACb,SAAS,EAAE,MAAM;gBAFjB,QAAQ,EAAE,MAAM,EAChB,KAAK,EAAE,MAAM,EACb,SAAS,EAAE,MAAM;IACjC;;;;;;;;;;;;;;;;;;;;OAoBG;IACH,MAAM,EAAE,MAAM;CAQjB;AAED;;;;;;;;;;;;;GAaG;AACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AACH,qBAAa,oBAAqB,SAAQ,qBAAqB;gBAE3D,QAAQ,EAAE,MAAM,EAChB,KAAK,EAAE,MAAM,EACb,SAAS,EAAE,MAAM;IACj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AAK;aAElC,KAAK,EAAE,MAAM;aACb,SAAS,EAAE,MAAM;gBADjB,KAAK,EAAE,MAAM,EACb,SAAS,EAAE,MAAM;CAWpC"}
|
package/dist/orm/index.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
export { Model } from "./Model";
|
|
2
2
|
export { ActiveRecordModel } from "./active-record";
|
|
3
3
|
export { SCHEMA_ARTIFACT_VERSION, StaleSchemaArtifactError, assertSchemaArtifactVersion, type DefaultKind, type DefaultSpec, type FieldSchema, type ModelSchema, type RelationSchema, type ScalarType, } from "./schema";
|
|
4
|
-
export type { AggregateArgs, AggregatePayload, CountArgs, CountPayload, CreateArgs, CreateInput, CreateManyArgs, DeleteArgs, DeleteManyArgs, FieldFilter, FindFirstArgs, FindFirstOrThrowArgs, FindManyArgs, FindUniqueArgs, FindUniqueOrThrowArgs, GroupByArgs, GroupByHavingInput, GroupByOrderByInput, GroupByPayload, IncludeInput, JsonInput, JsonValue, ModelTypeInfo, NullsOrder, OmitInput, OrderByInput, Payload, RelationInfo, Row, SelectInput, SelectSubset, SortOrder, SortOrderInput, Subset, UpdateArgs, UpdateInput, UpdateManyArgs, UpsertArgs, WhereInput, WhereUniqueInput, } from "./types";
|
|
4
|
+
export type { AggregateArgs, AggregatePayload, CountArgs, CountPayload, CreateArgs, CreateInput, CreateManyArgs, DeleteArgs, DeleteManyArgs, FieldFilter, FindFirstArgs, FindFirstOrThrowArgs, FindManyArgs, FindUniqueArgs, FindUniqueOrThrowArgs, GroupByArgs, GroupByHavingInput, GroupByOrderByInput, GroupByPayload, IncludeInput, JsonInput, JsonValue, ModelTypeInfo, NullsOrder, OmitInput, OrderByInput, Payload, RelationInfo, Row, RowLock, RowLockMode, SelectInput, SelectSubset, SortOrder, SortOrderInput, Subset, UpdateArgs, UpdateInput, UpdateManyArgs, UpsertArgs, WhereInput, WhereUniqueInput, } from "./types";
|
|
5
5
|
export { AnyNull, DbNull, JsonNull, jsonNullKind, type JsonNullKind, } from "./json-null";
|
|
6
|
-
export { AmbiguousModelRegistrationError, DecodeError, InvalidPolicyEntryError, MalformedRelationError, MissingModelSchemaError, MissingRequiredValueError, ModelNotRegisteredError, ParameterLimitError, PolicyDeniedError, RecordNotFoundError, RelationDepthExceededError, ReturningUnsupportedError, ScopeEscapeError, UniqueConstraintError, UnknownFieldError, UnknownRelationError, UnregisteredPolicyClassError, UnregisteredRelationTargetError, InvalidArgumentError, UnsupportedByDesignError, UnsupportedQueryError, isRecordNotFoundError, isUniqueConstraintError, } from "./errors";
|
|
6
|
+
export { AmbiguousModelRegistrationError, DecodeError, InvalidPolicyEntryError, LockOutsideTransactionError, MalformedRelationError, MissingModelSchemaError, MissingRequiredValueError, ModelNotRegisteredError, ParameterLimitError, PolicyDeniedError, RecordNotFoundError, RelationDepthExceededError, ReturningUnsupportedError, ScopeEscapeError, UniqueConstraintError, UnknownFieldError, UnknownRelationError, UnregisteredPolicyClassError, UnregisteredRelationTargetError, InvalidArgumentError, UnsupportedByDesignError, UnsupportedQueryError, isRecordNotFoundError, isUniqueConstraintError, } from "./errors";
|
|
7
7
|
export { createCuid, createNanoid, createUlid, createUuid, clientSideValue, hasClientSideValue, isClientSideDefault, } from "./defaults";
|
|
8
8
|
export { canonicalShape, clearPlanCache, getOrCompile, planCacheStats, planKey, type ExecOptions, type Operation, type QueryPlan, } from "./plan";
|
|
9
9
|
export { currentActor, currentTransaction, isSystemScope, ormContext, runAsSystem, runAsUser, transactionDepth, TransactionDependencyError, withTransaction, type OrmScope, } from "./context";
|
package/dist/orm/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../orm/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AAEpD,OAAO,EACL,uBAAuB,EACvB,wBAAwB,EACxB,2BAA2B,EAC3B,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,GACZ,MAAM,oBAAoB,CAAC;AAI5B,OAAO,EACL,kBAAkB,EAClB,eAAe,EACf,eAAe,EACf,aAAa,EACb,YAAY,EACZ,KAAK,YAAY,EACjB,KAAK,gBAAgB,EACrB,KAAK,gBAAgB,EACrB,KAAK,eAAe,EACpB,KAAK,gBAAgB,GACtB,MAAM,0BAA0B,CAAC;AAElC,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAEtE,OAAO,EACL,eAAe,EACf,aAAa,EACb,uBAAuB,EACvB,UAAU,EACV,YAAY,EACZ,WAAW,EACX,KAAK,mBAAmB,EACxB,KAAK,UAAU,GAChB,MAAM,WAAW,CAAC;AAKnB,OAAO,KAAK,QAAQ,MAAM,YAAY,CAAC;AACvC,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../orm/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AAEpD,OAAO,EACL,uBAAuB,EACvB,wBAAwB,EACxB,2BAA2B,EAC3B,KAAK,WAAW,EAChB,KAAK,WAAW,EAChB,KAAK,WAAW,EAChB,KAAK,WAAW,EAChB,KAAK,cAAc,EACnB,KAAK,UAAU,GAChB,MAAM,UAAU,CAAC;AAMlB,YAAY,EACV,aAAa,EACb,gBAAgB,EAChB,SAAS,EACT,YAAY,EACZ,UAAU,EACV,WAAW,EACX,cAAc,EACd,UAAU,EACV,cAAc,EACd,WAAW,EACX,aAAa,EACb,oBAAoB,EACpB,YAAY,EACZ,cAAc,EACd,qBAAqB,EACrB,WAAW,EACX,kBAAkB,EAClB,mBAAmB,EACnB,cAAc,EACd,YAAY,EACZ,SAAS,EACT,SAAS,EACT,aAAa,EACb,UA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