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,5 +1,65 @@
|
|
|
1
1
|
import type { Account, AuthModels, CreateAccountArgs, CreateMagicLinkTokenArgs, CreatePasswordResetTokenArgs, CreateSessionArgs, CreateSocialAccountArgs, CreateUserArgs, DeletePasswordResetTokenArgs, DeleteSessionArgs, FindPasswordResetTokenArgs, FindSessionArgs, Invitation, PasswordResetToken, SessionWithUser, SocialAccount, UpdateSessionArgs, UpdateUserPasswordArgs, User } from "./types";
|
|
2
|
-
|
|
2
|
+
/**
|
|
3
|
+
* The `select` all three session queries — `findSession`, `updateSession` and
|
|
4
|
+
* `createSessionV2` — run with, unless a provider's `sessionSelect()` returns
|
|
5
|
+
* another.
|
|
6
|
+
*
|
|
7
|
+
* Exported so that an override can **build on it rather than copy it**. A copy
|
|
8
|
+
* made field for field goes stale silently: it is how an application came to
|
|
9
|
+
* keep selecting `User.organizationId` after gemi stopped (#346), and a schema
|
|
10
|
+
* error inside `findSession` is caught and reads as "signed out", not as a bug.
|
|
11
|
+
* Spread this, and the columns gemi adds later arrive on their own.
|
|
12
|
+
*
|
|
13
|
+
* Frozen, because it is shared: assigning into it would change every
|
|
14
|
+
* provider's session, the default one's included, from wherever the
|
|
15
|
+
* assignment happened to run.
|
|
16
|
+
*/
|
|
17
|
+
export declare const SESSION_SELECT: {
|
|
18
|
+
readonly token: true;
|
|
19
|
+
readonly expiresAt: true;
|
|
20
|
+
readonly absoluteExpiresAt: true;
|
|
21
|
+
readonly updatedAt: true;
|
|
22
|
+
readonly location: true;
|
|
23
|
+
readonly userAgent: true;
|
|
24
|
+
readonly user: {
|
|
25
|
+
readonly select: {
|
|
26
|
+
readonly id: true;
|
|
27
|
+
readonly publicId: true;
|
|
28
|
+
readonly email: true;
|
|
29
|
+
readonly name: true;
|
|
30
|
+
readonly locale: true;
|
|
31
|
+
readonly globalRole: true;
|
|
32
|
+
readonly accounts: {
|
|
33
|
+
readonly select: {
|
|
34
|
+
readonly id: true;
|
|
35
|
+
readonly publicId: true;
|
|
36
|
+
readonly organizationRole: true;
|
|
37
|
+
readonly organization: true;
|
|
38
|
+
};
|
|
39
|
+
};
|
|
40
|
+
};
|
|
41
|
+
};
|
|
42
|
+
};
|
|
43
|
+
/**
|
|
44
|
+
* What `sessionSelect()` returns: a `select` on `Session`, in the ORM's
|
|
45
|
+
* grammar. Loose on purpose — the framework does not know an application's
|
|
46
|
+
* models, so it cannot name their columns. Check an override against them
|
|
47
|
+
* with `satisfies SelectInput<SessionTypes>` from the app's generated models.
|
|
48
|
+
*/
|
|
49
|
+
export type SessionSelect = {
|
|
50
|
+
readonly [field: string]: unknown;
|
|
51
|
+
};
|
|
52
|
+
/**
|
|
53
|
+
* `TSession` is the session the three session queries return. It defaults to
|
|
54
|
+
* `SessionWithUser`, so a provider that does not override `sessionSelect()`
|
|
55
|
+
* types exactly as before. One that does names the shape its select produces —
|
|
56
|
+
* derived from the select itself with the ORM's `Payload`, so the type cannot
|
|
57
|
+
* drift from the query:
|
|
58
|
+
*
|
|
59
|
+
* type AppSession = Payload<SessionTypes, { select: typeof APP_SESSION_SELECT }>;
|
|
60
|
+
* class AppUserProvider extends UserProvider<AppSession> { … }
|
|
61
|
+
*/
|
|
62
|
+
export declare class UserProvider<TSession = SessionWithUser> {
|
|
3
63
|
protected models: AuthModels;
|
|
4
64
|
/**
|
|
5
65
|
* Defaults to the ORM registry, so an application needs no configuration to
|
|
@@ -16,6 +76,27 @@ export declare class UserProvider {
|
|
|
16
76
|
* server error. One wrapper, applied uniformly, so no method can forget.
|
|
17
77
|
*/
|
|
18
78
|
protected run<T>(fn: () => Promise<T>): Promise<T>;
|
|
79
|
+
/**
|
|
80
|
+
* **The session query's `select`, shared by `findSession`, `updateSession`
|
|
81
|
+
* and `createSessionV2`.** Override it to change what a session carries
|
|
82
|
+
* without owning those queries: select an extra column (`deletedAt`), order
|
|
83
|
+
* or filter `user.accounts` with an `orderBy` or `where` on the relation.
|
|
84
|
+
* Start from `SESSION_SELECT` and spread it, so the fields gemi selects keep
|
|
85
|
+
* coming along:
|
|
86
|
+
*
|
|
87
|
+
* protected sessionSelect() {
|
|
88
|
+
* return APP_SESSION_SELECT; // `{ ...SESSION_SELECT, user: … }`
|
|
89
|
+
* }
|
|
90
|
+
*
|
|
91
|
+
* The order or filter lives *in the query*, so every session gemi hands
|
|
92
|
+
* out — to the web app and to a native client alike — has it, and nothing
|
|
93
|
+
* re-queries `Account` on the auth hot path to recover a field.
|
|
94
|
+
*
|
|
95
|
+
* Keep the fields the default selects, the ones `AuthManager` reads above
|
|
96
|
+
* all: `token`, `expiresAt`, `absoluteExpiresAt` and `user`. A row that
|
|
97
|
+
* lacks an expiry is treated as expired.
|
|
98
|
+
*/
|
|
99
|
+
protected sessionSelect(): SessionSelect;
|
|
19
100
|
/**
|
|
20
101
|
* Runs `fn` inside a transaction on the connection the `User` model lives on.
|
|
21
102
|
* Every ORM query in it joins automatically, at any call depth — see
|
|
@@ -60,24 +141,27 @@ export declare class UserProvider {
|
|
|
60
141
|
/**
|
|
61
142
|
* `AuthManager` reads a new session back through `findSession` before
|
|
62
143
|
* handing it out, so an override that shapes the session there need not
|
|
63
|
-
* repeat the shaping here.
|
|
144
|
+
* repeat the shaping here. Selects with `sessionSelect()`, as that does.
|
|
64
145
|
*/
|
|
65
|
-
createSessionV2(args: CreateSessionArgs): Promise<
|
|
146
|
+
createSessionV2(args: CreateSessionArgs): Promise<TSession>;
|
|
66
147
|
/**
|
|
67
148
|
* **The shape of every session `AuthManager` hands out.** It serves this
|
|
68
149
|
* result on each request, keeps it when `updateSession` slides the expiry
|
|
69
150
|
* (taking only the new `expiresAt`), and reads a sign-in's new row back
|
|
70
|
-
* through it. So
|
|
71
|
-
*
|
|
72
|
-
*
|
|
151
|
+
* through it. So this is the only method a provider needs to shape a
|
|
152
|
+
* session. What can be said in the query — an extra column, an order or a
|
|
153
|
+
* filter on `user.accounts` — belongs in `sessionSelect()`, which this
|
|
154
|
+
* reads with; what cannot, an override here does by calling
|
|
155
|
+
* `super.findSession` and post-processing the result.
|
|
73
156
|
*/
|
|
74
|
-
findSession(args: FindSessionArgs): Promise<
|
|
157
|
+
findSession(args: FindSessionArgs): Promise<TSession | null>;
|
|
75
158
|
/**
|
|
76
159
|
* `AuthManager` takes only `expiresAt` from the result and keeps the session
|
|
77
160
|
* `findSession` returned, so the user selected here is not what a request
|
|
78
|
-
* sees.
|
|
161
|
+
* sees. Selects with `sessionSelect()` all the same, so that a caller
|
|
162
|
+
* reading this row gets the shape every other session has.
|
|
79
163
|
*/
|
|
80
|
-
updateSession(args: UpdateSessionArgs): Promise<
|
|
164
|
+
updateSession(args: UpdateSessionArgs): Promise<TSession | null>;
|
|
81
165
|
deleteSession(args: DeleteSessionArgs): Promise<void>;
|
|
82
166
|
deleteAllUserSessions(userId: number): Promise<void>;
|
|
83
167
|
createPasswordResetToken(args: CreatePasswordResetTokenArgs): Promise<string>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UserProvider.d.ts","sourceRoot":"","sources":["../../auth/UserProvider.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,OAAO,EACP,UAAU,EACV,iBAAiB,EACjB,wBAAwB,EACxB,4BAA4B,EAC5B,iBAAiB,EACjB,uBAAuB,EACvB,cAAc,EACd,4BAA4B,EAC5B,iBAAiB,EACjB,0BAA0B,EAC1B,eAAe,EACf,UAAU,EACV,kBAAkB,EAClB,e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IAAI,EAAE,iBAAiB,GAAG,OAAO,CAAC,OAAO,GAAG,IAAI,CAAC;IAY/D,oBAAoB,CACxB,IAAI,EAAE,wBAAwB,GAC7B,OAAO,CAAC;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,GAAG,EAAE,MAAM,CAAA;KAAE,CAAC;IAQpC,sBAAsB,CAAC,IAAI,EAAE;QACjC,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,GAAG,CAAC,EAAE,MAAM,CAAC;QACb,KAAK,EAAE,MAAM,CAAC;KACf,GAAG,OAAO,CAAC,IAAI,GAAG,IAAI,CAAC;IAgBlB,oBAAoB,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAMlD,mBAAmB,CAAC,IAAI,EAAE,uBAAuB,GAAG,OAAO,CAAC,GAAG,CAAC;IAMtE;;;;;;;;;;;OAWG;IACG,uBAAuB,CAC3B,QAAQ,EAAE,MAAM,EAChB,UAAU,EAAE,MAAM,GACjB,OAAO,CAAC,IAAI,GAAG,IAAI,CAAC;IAWjB,kBAAkB,CACtB,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,MAAM,GACf,OAAO,CAAC,aAAa,EAAE,CAAC;IAS3B;;;;;;;OAOG;IACG,kBAAkB,CACtB,OAAO,EAAE,IAAI,CAAC,aAAa,EAAE,IAAI,GAAG,YAAY,CAAC,EACjD,UAAU,EAAE,MAAM,GACjB,OAAO,CAAC,OAAO,CAAC;CASpB"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import"../chunk-
|
|
2
|
+
import"../chunk-5fxqzs72.js";class n{async subscribe(r){return!0}publish(r){return{}}}export{n as BroadcastingChannel};
|
|
3
3
|
|
|
4
4
|
//# debugId=3E2D2EBC3796AA1A64756E2164756E21
|
package/dist/bun/plugin.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{ca as a}from"../chunk-
|
|
2
|
+
import{ca as a}from"../chunk-bt9rjc80.js";import"../chunk-yvkm7qya.js";import"../chunk-zz0t0pwk.js";import"../chunk-5fxqzs72.js";export{a as gemiPlugin};
|
|
3
3
|
|
|
4
4
|
//# debugId=DBAE3729A59FFE4464756E2164756E21
|
package/dist/bun/preload.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{ca as k}from"../chunk-
|
|
2
|
+
import{ca as k}from"../chunk-bt9rjc80.js";import"../chunk-yvkm7qya.js";import"../chunk-zz0t0pwk.js";import{ua as j}from"../chunk-gvkydx8r.js";import"../chunk-5fxqzs72.js";var{plugin:q}=globalThis.Bun;q(k());var y=await j(process.cwd());for(let x of y.bun?.plugins??[])q(x);
|
|
3
3
|
|
|
4
4
|
//# debugId=D461962ED718EDF864756E2164756E21
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
function j(h){return h}function p(){return{supportedLocales:[],defaultLocale:"en-US",prefetch:{},components:{},detectLocale:()=>null,onLocaleChange:(h)=>{console.log(`Locale changed to ${h}`)}}}
|
|
3
|
-
export{j as
|
|
3
|
+
export{j as fc,p as gc};
|
|
4
4
|
|
|
5
|
-
//# debugId=
|
|
5
|
+
//# debugId=C1453D4E8D4DC38964756E2164756E21
|
|
@@ -5,6 +5,6 @@
|
|
|
5
5
|
"import type { Dictionary } from \"./Dictionary\";\nimport type { HttpRequest } from \"../http/HttpRequest\";\n\n// Config key: `translation`. Derived from `I18nServiceProvider`.\nexport interface TranslationConfig {\n supportedLocales?: string[];\n defaultLocale?: string;\n /**\n * @deprecated Only for `Dictionary.create` dictionaries. A `defineDictionary`\n * dictionary needs no entry here — the component that reads it pulls it in,\n * and the bundler ships only the active locale.\n */\n prefetch?: Record<string, Array<Dictionary<any>>>;\n /** @deprecated Only for `Dictionary.create` dictionaries. See `prefetch`. */\n components?: Record<string, Dictionary<any>>;\n\n // Returning `null` falls back to gemi's own locale detection.\n detectLocale?: (req: HttpRequest) => string | null;\n onLocaleChange?: (locale: string) => Promise<void> | void;\n}\n\nexport function defineTranslationConfig(\n config: TranslationConfig,\n): TranslationConfig {\n return config;\n}\n\nexport function translationConfigDefaults(): Required<TranslationConfig> {\n return {\n supportedLocales: [],\n defaultLocale: \"en-US\",\n prefetch: {},\n components: {},\n detectLocale: () => null,\n onLocaleChange: (locale) => {\n console.log(`Locale changed to ${locale}`);\n },\n };\n}\n"
|
|
6
6
|
],
|
|
7
7
|
"mappings": ";AAqBO,SAAS,CAAuB,CACrC,EACmB,CACnB,OAAO,EAGF,SAAS,CAAyB,EAAgC,CACvE,MAAO,CACL,iBAAkB,CAAC,EACnB,cAAe,QACf,SAAU,CAAC,EACX,WAAY,CAAC,EACb,aAAc,IAAM,KACpB,eAAgB,CAAC,IAAW,CAC1B,QAAQ,IAAI,qBAAqB,GAAQ,EAE7C",
|
|
8
|
-
"debugId": "
|
|
8
|
+
"debugId": "C1453D4E8D4DC38964756E2164756E21",
|
|
9
9
|
"names": []
|
|
10
10
|
}
|