@yielded/auth-persistence-drizzle 0.1.0-beta.21 → 0.1.0-beta.23
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/Libsql.d.mts +19 -19
- package/dist/Mysql2.d.mts +14 -14
- package/dist/Pglite.d.mts +14 -14
- package/dist/Postgres.d.mts +6 -6
- package/dist/SqliteBun.d.mts +27 -27
- package/dist/SqliteDo.d.mts +13 -13
- package/dist/SqliteNode.d.mts +23 -23
- package/dist/SqliteWasm.d.mts +13 -13
- package/dist/drizzle/d1-password-prepared.d.mts +3 -3
- package/dist/drizzle/d1-password-prepared.mjs.map +1 -1
- package/dist/drizzle/d1-passwords.d.mts +8 -9
- package/dist/drizzle/d1-passwords.mjs +103 -173
- package/dist/drizzle/d1-passwords.mjs.map +1 -1
- package/dist/drizzle/d1-proofs.d.mts +1 -1
- package/dist/drizzle/d1-sessions.d.mts +1 -1
- package/dist/drizzle/mysql-password-prepared.d.mts +5 -5
- package/dist/drizzle/mysql-password-prepared.mjs.map +1 -1
- package/dist/drizzle/mysql-passwords.d.mts +9 -9
- package/dist/drizzle/mysql-passwords.mjs.map +1 -1
- package/dist/drizzle/native-sql-table.mjs +110 -0
- package/dist/drizzle/native-sql-table.mjs.map +1 -0
- package/dist/drizzle/oauth-connected-target.d.mts +5 -5
- package/dist/drizzle/oauth-target.d.mts +1 -1
- package/dist/drizzle/password-model.d.mts +5 -7
- package/dist/drizzle/password-prepared-model.d.mts +5 -5
- package/dist/drizzle/password-prepared-model.mjs.map +1 -1
- package/dist/drizzle/password-sql.mjs +2 -1
- package/dist/drizzle/password-sql.mjs.map +1 -1
- package/dist/drizzle/password-target.mjs +13 -2
- package/dist/drizzle/password-target.mjs.map +1 -1
- package/dist/drizzle/pg-password-prepared.d.mts +5 -5
- package/dist/drizzle/pg-password-prepared.mjs.map +1 -1
- package/dist/drizzle/pg-passwords.d.mts +9 -9
- package/dist/drizzle/pg-passwords.mjs.map +1 -1
- package/dist/drizzle/phone-target.d.mts +1 -1
- package/dist/drizzle/session-sql.mjs +2 -1
- package/dist/drizzle/session-sql.mjs.map +1 -1
- package/dist/drizzle/sqlite-password-prepared.mjs.map +1 -1
- package/dist/drizzle/sqlite-passwords.mjs.map +1 -1
- package/dist/drizzle/storage-validation.mjs +0 -13
- package/dist/drizzle/storage-validation.mjs.map +1 -1
- package/dist/drizzle/totp-target.d.mts +1 -1
- package/dist/index.d.mts +2 -2
- package/dist/internal/drizzle-postgres.mjs +2 -0
- package/dist/internal/drizzle-postgres.mjs.map +1 -1
- package/dist/internal/drizzle-sqlite.mjs +2 -0
- package/dist/internal/drizzle-sqlite.mjs.map +1 -1
- package/package.json +1 -1
- package/src/drizzle/d1-password-prepared.ts +2 -20
- package/src/drizzle/d1-passwords.ts +232 -519
- package/src/drizzle/mysql-password-prepared.ts +4 -12
- package/src/drizzle/mysql-passwords.ts +5 -15
- package/src/drizzle/native-sql-table.ts +229 -0
- package/src/drizzle/password-model.ts +0 -20
- package/src/drizzle/password-prepared-model.ts +0 -12
- package/src/drizzle/password-sql.ts +3 -0
- package/src/drizzle/password-target.ts +41 -4
- package/src/drizzle/pg-password-prepared.ts +4 -12
- package/src/drizzle/pg-passwords.ts +5 -15
- package/src/drizzle/session-sql.ts +2 -1
- package/src/drizzle/sqlite-password-prepared.ts +4 -48
- package/src/drizzle/sqlite-passwords.ts +7 -21
- package/src/drizzle/storage-validation.ts +0 -8
- package/src/index.ts +0 -4
- package/src/internal/drizzle-postgres.ts +2 -0
- package/src/internal/drizzle-sqlite.ts +2 -0
|
@@ -55,11 +55,9 @@ type PasswordMapping<
|
|
|
55
55
|
C extends AnyPgTable,
|
|
56
56
|
AC extends AnyPgTable,
|
|
57
57
|
A extends AnyPgTable,
|
|
58
|
-
RS extends AnyPgTable,
|
|
59
|
-
CE extends AnyPgTable,
|
|
60
58
|
M extends AnyPgTable,
|
|
61
59
|
NativeId,
|
|
62
|
-
> = PasswordPersistenceMapping<S, I, C, AC, A,
|
|
60
|
+
> = PasswordPersistenceMapping<S, I, C, AC, A, M, NativeId>;
|
|
63
61
|
|
|
64
62
|
export const makePgPasswordPersistenceServices = <
|
|
65
63
|
S extends AnyPgTable,
|
|
@@ -67,12 +65,10 @@ export const makePgPasswordPersistenceServices = <
|
|
|
67
65
|
C extends AnyPgTable,
|
|
68
66
|
AC extends AnyPgTable,
|
|
69
67
|
A extends AnyPgTable,
|
|
70
|
-
RS extends AnyPgTable,
|
|
71
|
-
CE extends AnyPgTable,
|
|
72
68
|
M extends AnyPgTable,
|
|
73
69
|
NativeId,
|
|
74
70
|
>(
|
|
75
|
-
mapping: PasswordMapping<S, I, C, AC, A,
|
|
71
|
+
mapping: PasswordMapping<S, I, C, AC, A, M, NativeId>,
|
|
76
72
|
proofMapping?: ProofPersistenceMapping<
|
|
77
73
|
any,
|
|
78
74
|
any,
|
|
@@ -103,8 +99,6 @@ export function coordinatePgPasswordPersistence<
|
|
|
103
99
|
C extends AnyPgTable,
|
|
104
100
|
AC extends AnyPgTable,
|
|
105
101
|
A extends AnyPgTable,
|
|
106
|
-
RS extends AnyPgTable,
|
|
107
|
-
CE extends AnyPgTable,
|
|
108
102
|
M extends AnyPgTable,
|
|
109
103
|
NativeId,
|
|
110
104
|
PM extends
|
|
@@ -118,7 +112,7 @@ export function coordinatePgPasswordPersistence<
|
|
|
118
112
|
>(
|
|
119
113
|
acquire: Effect.Effect<D, DatabaseError, DatabaseRequirements>,
|
|
120
114
|
options: {
|
|
121
|
-
readonly mapping: PasswordMapping<S, I, C, AC, A,
|
|
115
|
+
readonly mapping: PasswordMapping<S, I, C, AC, A, M, NativeId>;
|
|
122
116
|
readonly proofMapping?: PM;
|
|
123
117
|
readonly transaction?: never;
|
|
124
118
|
},
|
|
@@ -136,8 +130,6 @@ export function coordinatePgPasswordPersistence<
|
|
|
136
130
|
C extends AnyPgTable,
|
|
137
131
|
AC extends AnyPgTable,
|
|
138
132
|
A extends AnyPgTable,
|
|
139
|
-
RS extends AnyPgTable,
|
|
140
|
-
CE extends AnyPgTable,
|
|
141
133
|
M extends AnyPgTable,
|
|
142
134
|
NativeId,
|
|
143
135
|
PM extends
|
|
@@ -153,7 +145,7 @@ export function coordinatePgPasswordPersistence<
|
|
|
153
145
|
>(
|
|
154
146
|
acquire: Effect.Effect<D, DatabaseError, DatabaseRequirements>,
|
|
155
147
|
options: {
|
|
156
|
-
readonly mapping: PasswordMapping<S, I, C, AC, A,
|
|
148
|
+
readonly mapping: PasswordMapping<S, I, C, AC, A, M, NativeId>;
|
|
157
149
|
readonly proofMapping?: PM;
|
|
158
150
|
readonly transaction: SuppliedService<TxId, NoInfer<TransactionOf<D>>, TxShape>;
|
|
159
151
|
},
|
|
@@ -171,8 +163,6 @@ export function coordinatePgPasswordPersistence<
|
|
|
171
163
|
C extends AnyPgTable,
|
|
172
164
|
AC extends AnyPgTable,
|
|
173
165
|
A extends AnyPgTable,
|
|
174
|
-
RS extends AnyPgTable,
|
|
175
|
-
CE extends AnyPgTable,
|
|
176
166
|
M extends AnyPgTable,
|
|
177
167
|
NativeId,
|
|
178
168
|
PM extends
|
|
@@ -188,7 +178,7 @@ export function coordinatePgPasswordPersistence<
|
|
|
188
178
|
>(
|
|
189
179
|
acquire: Effect.Effect<D, DatabaseError, DatabaseRequirements>,
|
|
190
180
|
options: {
|
|
191
|
-
readonly mapping: PasswordMapping<S, I, C, AC, A,
|
|
181
|
+
readonly mapping: PasswordMapping<S, I, C, AC, A, M, NativeId>;
|
|
192
182
|
readonly proofMapping?: PM;
|
|
193
183
|
readonly transaction?: SuppliedService<TxId, NoInfer<TransactionOf<D>>, TxShape>;
|
|
194
184
|
},
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { makeSessionKernel } from "@yielded/auth-persistence/Adapter";
|
|
2
2
|
|
|
3
|
+
import { makeDrizzleSqlTables } from "./native-sql-table";
|
|
3
4
|
import { drizzleQueryOperations } from "./query-operations";
|
|
4
5
|
export type { SessionSqlDatabase } from "@yielded/auth-persistence/Adapter";
|
|
5
6
|
export { CurrentSessionSql } from "@yielded/auth-persistence/Adapter";
|
|
@@ -11,4 +12,4 @@ export const {
|
|
|
11
12
|
makeSqlStatefulSessions,
|
|
12
13
|
makeSqlSignedValidity,
|
|
13
14
|
makeSqlSessionStepUp,
|
|
14
|
-
} = makeSessionKernel(drizzleQueryOperations);
|
|
15
|
+
} = makeSessionKernel(drizzleQueryOperations, makeDrizzleSqlTables);
|
|
@@ -55,8 +55,6 @@ export const makeSqlitePasswordPreparedTarget = <
|
|
|
55
55
|
C extends AnySQLiteTable,
|
|
56
56
|
AC extends AnySQLiteTable,
|
|
57
57
|
A extends AnySQLiteTable,
|
|
58
|
-
RS extends AnySQLiteTable,
|
|
59
|
-
CE extends AnySQLiteTable,
|
|
60
58
|
M extends AnySQLiteTable,
|
|
61
59
|
T extends AnySQLiteTable,
|
|
62
60
|
B extends AnySQLiteTable,
|
|
@@ -76,19 +74,7 @@ export const makeSqlitePasswordPreparedTarget = <
|
|
|
76
74
|
>(
|
|
77
75
|
acquire: Effect.Effect<Database, DatabaseError, DatabaseRequirements>,
|
|
78
76
|
options: {
|
|
79
|
-
readonly mapping: PasswordPreparedPersistenceMapping<
|
|
80
|
-
S,
|
|
81
|
-
I,
|
|
82
|
-
C,
|
|
83
|
-
AC,
|
|
84
|
-
A,
|
|
85
|
-
RS,
|
|
86
|
-
CE,
|
|
87
|
-
M,
|
|
88
|
-
T,
|
|
89
|
-
B,
|
|
90
|
-
NativeId
|
|
91
|
-
>;
|
|
77
|
+
readonly mapping: PasswordPreparedPersistenceMapping<S, I, C, AC, A, M, T, B, NativeId>;
|
|
92
78
|
readonly proofMapping?:
|
|
93
79
|
| PasswordPreparedProofMapping<PS, PC, PM, PSub, PI, PCr, PNativeId>
|
|
94
80
|
| undefined;
|
|
@@ -111,8 +97,6 @@ export const makeSqlitePasswordPreparedTarget = <
|
|
|
111
97
|
C extends AnySQLiteTable,
|
|
112
98
|
AC extends AnySQLiteTable,
|
|
113
99
|
A extends AnySQLiteTable,
|
|
114
|
-
RS extends AnySQLiteTable,
|
|
115
|
-
CE extends AnySQLiteTable,
|
|
116
100
|
M extends AnySQLiteTable,
|
|
117
101
|
T extends AnySQLiteTable,
|
|
118
102
|
B extends AnySQLiteTable,
|
|
@@ -134,19 +118,7 @@ export const makeSqlitePasswordPreparedTarget = <
|
|
|
134
118
|
>(
|
|
135
119
|
acquire: Effect.Effect<Database, DatabaseError, DatabaseRequirements>,
|
|
136
120
|
options: {
|
|
137
|
-
readonly mapping: PasswordPreparedPersistenceMapping<
|
|
138
|
-
S,
|
|
139
|
-
I,
|
|
140
|
-
C,
|
|
141
|
-
AC,
|
|
142
|
-
A,
|
|
143
|
-
RS,
|
|
144
|
-
CE,
|
|
145
|
-
M,
|
|
146
|
-
T,
|
|
147
|
-
B,
|
|
148
|
-
NativeId
|
|
149
|
-
>;
|
|
121
|
+
readonly mapping: PasswordPreparedPersistenceMapping<S, I, C, AC, A, M, T, B, NativeId>;
|
|
150
122
|
readonly proofMapping?:
|
|
151
123
|
| PasswordPreparedProofMapping<PS, PC, PM, PSub, PI, PCr, PNativeId>
|
|
152
124
|
| undefined;
|
|
@@ -169,8 +141,6 @@ export const makeSqlitePasswordPreparedTarget = <
|
|
|
169
141
|
C extends AnySQLiteTable,
|
|
170
142
|
AC extends AnySQLiteTable,
|
|
171
143
|
A extends AnySQLiteTable,
|
|
172
|
-
RS extends AnySQLiteTable,
|
|
173
|
-
CE extends AnySQLiteTable,
|
|
174
144
|
M extends AnySQLiteTable,
|
|
175
145
|
T extends AnySQLiteTable,
|
|
176
146
|
B extends AnySQLiteTable,
|
|
@@ -192,19 +162,7 @@ export const makeSqlitePasswordPreparedTarget = <
|
|
|
192
162
|
>(
|
|
193
163
|
acquire: Effect.Effect<Database, DatabaseError, DatabaseRequirements>,
|
|
194
164
|
options: {
|
|
195
|
-
readonly mapping: PasswordPreparedPersistenceMapping<
|
|
196
|
-
S,
|
|
197
|
-
I,
|
|
198
|
-
C,
|
|
199
|
-
AC,
|
|
200
|
-
A,
|
|
201
|
-
RS,
|
|
202
|
-
CE,
|
|
203
|
-
M,
|
|
204
|
-
T,
|
|
205
|
-
B,
|
|
206
|
-
NativeId
|
|
207
|
-
>;
|
|
165
|
+
readonly mapping: PasswordPreparedPersistenceMapping<S, I, C, AC, A, M, T, B, NativeId>;
|
|
208
166
|
readonly proofMapping?:
|
|
209
167
|
| PasswordPreparedProofMapping<PS, PC, PM, PSub, PI, PCr, PNativeId>
|
|
210
168
|
| undefined;
|
|
@@ -250,8 +208,6 @@ export const makeSqlitePasswordPreparedTarget = <
|
|
|
250
208
|
C extends AnySQLiteTable,
|
|
251
209
|
AC extends AnySQLiteTable,
|
|
252
210
|
A extends AnySQLiteTable,
|
|
253
|
-
RS extends AnySQLiteTable,
|
|
254
|
-
CE extends AnySQLiteTable,
|
|
255
211
|
M extends AnySQLiteTable,
|
|
256
212
|
T extends AnySQLiteTable,
|
|
257
213
|
B extends AnySQLiteTable,
|
|
@@ -264,7 +220,7 @@ export const makeSqlitePasswordPreparedTarget = <
|
|
|
264
220
|
PCr extends AnySQLiteTable = AnySQLiteTable,
|
|
265
221
|
PNativeId = unknown,
|
|
266
222
|
>(
|
|
267
|
-
mapping: PasswordPreparedPersistenceMapping<S, I, C, AC, A,
|
|
223
|
+
mapping: PasswordPreparedPersistenceMapping<S, I, C, AC, A, M, T, B, NativeId>,
|
|
268
224
|
proofMapping?: PasswordPreparedProofMapping<PS, PC, PM, PSub, PI, PCr, PNativeId>,
|
|
269
225
|
) =>
|
|
270
226
|
Effect.flatMap(standaloneConfiguration, (configuration) =>
|
|
@@ -70,11 +70,9 @@ type Mapping<
|
|
|
70
70
|
C extends AnySQLiteTable,
|
|
71
71
|
AC extends AnySQLiteTable,
|
|
72
72
|
A extends AnySQLiteTable,
|
|
73
|
-
RS extends AnySQLiteTable,
|
|
74
|
-
CE extends AnySQLiteTable,
|
|
75
73
|
M extends AnySQLiteTable,
|
|
76
74
|
NativeId,
|
|
77
|
-
> = PasswordPersistenceMapping<S, I, C, AC, A,
|
|
75
|
+
> = PasswordPersistenceMapping<S, I, C, AC, A, M, NativeId>;
|
|
78
76
|
|
|
79
77
|
export const makeSqlitePasswordPersistenceServices = <
|
|
80
78
|
S extends AnySQLiteTable,
|
|
@@ -82,12 +80,10 @@ export const makeSqlitePasswordPersistenceServices = <
|
|
|
82
80
|
C extends AnySQLiteTable,
|
|
83
81
|
AC extends AnySQLiteTable,
|
|
84
82
|
A extends AnySQLiteTable,
|
|
85
|
-
RS extends AnySQLiteTable,
|
|
86
|
-
CE extends AnySQLiteTable,
|
|
87
83
|
M extends AnySQLiteTable,
|
|
88
84
|
NativeId,
|
|
89
85
|
>(
|
|
90
|
-
mapping: Mapping<S, I, C, AC, A,
|
|
86
|
+
mapping: Mapping<S, I, C, AC, A, M, NativeId>,
|
|
91
87
|
configuration: PasswordTargetConfiguration,
|
|
92
88
|
proofMapping?: ProofPersistenceMapping<
|
|
93
89
|
any,
|
|
@@ -112,8 +108,6 @@ export const coordinateSqlitePasswordPersistence = <
|
|
|
112
108
|
C extends AnySQLiteTable,
|
|
113
109
|
AC extends AnySQLiteTable,
|
|
114
110
|
A extends AnySQLiteTable,
|
|
115
|
-
RS extends AnySQLiteTable,
|
|
116
|
-
CE extends AnySQLiteTable,
|
|
117
111
|
M extends AnySQLiteTable,
|
|
118
112
|
NativeId,
|
|
119
113
|
PM extends
|
|
@@ -124,7 +118,7 @@ export const coordinateSqlitePasswordPersistence = <
|
|
|
124
118
|
R,
|
|
125
119
|
>(
|
|
126
120
|
database: D,
|
|
127
|
-
mapping: Mapping<S, I, C, AC, A,
|
|
121
|
+
mapping: Mapping<S, I, C, AC, A, M, NativeId>,
|
|
128
122
|
configuration: PasswordTargetConfiguration,
|
|
129
123
|
proofMapping: PM,
|
|
130
124
|
owner: (
|
|
@@ -208,8 +202,6 @@ export const makeSqlitePasswordTarget = <
|
|
|
208
202
|
C extends AnySQLiteTable,
|
|
209
203
|
AC extends AnySQLiteTable,
|
|
210
204
|
A extends AnySQLiteTable,
|
|
211
|
-
RS extends AnySQLiteTable,
|
|
212
|
-
CE extends AnySQLiteTable,
|
|
213
205
|
M extends AnySQLiteTable,
|
|
214
206
|
NativeId,
|
|
215
207
|
PM extends
|
|
@@ -223,7 +215,7 @@ export const makeSqlitePasswordTarget = <
|
|
|
223
215
|
>(
|
|
224
216
|
acquire: Effect.Effect<Database, DatabaseError, DatabaseRequirements>,
|
|
225
217
|
options: {
|
|
226
|
-
readonly mapping: Mapping<S, I, C, AC, A,
|
|
218
|
+
readonly mapping: Mapping<S, I, C, AC, A, M, NativeId>;
|
|
227
219
|
readonly proofMapping?: PM;
|
|
228
220
|
readonly transaction?: never;
|
|
229
221
|
},
|
|
@@ -242,8 +234,6 @@ export const makeSqlitePasswordTarget = <
|
|
|
242
234
|
C extends AnySQLiteTable,
|
|
243
235
|
AC extends AnySQLiteTable,
|
|
244
236
|
A extends AnySQLiteTable,
|
|
245
|
-
RS extends AnySQLiteTable,
|
|
246
|
-
CE extends AnySQLiteTable,
|
|
247
237
|
M extends AnySQLiteTable,
|
|
248
238
|
NativeId,
|
|
249
239
|
PM extends
|
|
@@ -259,7 +249,7 @@ export const makeSqlitePasswordTarget = <
|
|
|
259
249
|
>(
|
|
260
250
|
acquire: Effect.Effect<Database, DatabaseError, DatabaseRequirements>,
|
|
261
251
|
options: {
|
|
262
|
-
readonly mapping: Mapping<S, I, C, AC, A,
|
|
252
|
+
readonly mapping: Mapping<S, I, C, AC, A, M, NativeId>;
|
|
263
253
|
readonly proofMapping?: PM;
|
|
264
254
|
readonly transaction: SuppliedService<TxId, NoInfer<TransactionOf<Database>>, TxShape>;
|
|
265
255
|
},
|
|
@@ -278,8 +268,6 @@ export const makeSqlitePasswordTarget = <
|
|
|
278
268
|
C extends AnySQLiteTable,
|
|
279
269
|
AC extends AnySQLiteTable,
|
|
280
270
|
A extends AnySQLiteTable,
|
|
281
|
-
RS extends AnySQLiteTable,
|
|
282
|
-
CE extends AnySQLiteTable,
|
|
283
271
|
M extends AnySQLiteTable,
|
|
284
272
|
NativeId,
|
|
285
273
|
PM extends
|
|
@@ -295,7 +283,7 @@ export const makeSqlitePasswordTarget = <
|
|
|
295
283
|
>(
|
|
296
284
|
acquire: Effect.Effect<Database, DatabaseError, DatabaseRequirements>,
|
|
297
285
|
options: {
|
|
298
|
-
readonly mapping: Mapping<S, I, C, AC, A,
|
|
286
|
+
readonly mapping: Mapping<S, I, C, AC, A, M, NativeId>;
|
|
299
287
|
readonly proofMapping?: PM;
|
|
300
288
|
readonly transaction?: SuppliedService<TxId, NoInfer<TransactionOf<Database>>, TxShape>;
|
|
301
289
|
},
|
|
@@ -468,12 +456,10 @@ export const makeSqlitePasswordTarget = <
|
|
|
468
456
|
C extends AnySQLiteTable,
|
|
469
457
|
AC extends AnySQLiteTable,
|
|
470
458
|
A extends AnySQLiteTable,
|
|
471
|
-
RS extends AnySQLiteTable,
|
|
472
|
-
CE extends AnySQLiteTable,
|
|
473
459
|
M extends AnySQLiteTable,
|
|
474
460
|
NativeId,
|
|
475
461
|
>(
|
|
476
|
-
mapping: Mapping<S, I, C, AC, A,
|
|
462
|
+
mapping: Mapping<S, I, C, AC, A, M, NativeId>,
|
|
477
463
|
proofMapping?: ProofPersistenceMapping<
|
|
478
464
|
any,
|
|
479
465
|
any,
|
|
@@ -25,10 +25,6 @@ const uniquePlans: Readonly<Record<string, readonly [string, ReadonlyArray<strin
|
|
|
25
25
|
"authorityCredential",
|
|
26
26
|
["subjectId", "credentialId"],
|
|
27
27
|
],
|
|
28
|
-
"unique(charge.moduleId,charge.action,charge.scopeKind,charge.scopeKey,charge.attemptId)": [
|
|
29
|
-
"charge",
|
|
30
|
-
["moduleId", "action", "scopeKind", "scopeKey", "attemptId"],
|
|
31
|
-
],
|
|
32
28
|
"unique(command.moduleId,command.commandId)": ["command", ["moduleId", "commandId"]],
|
|
33
29
|
"unique(connectedAdmission.admissionId)": ["admission", ["admissionId"]],
|
|
34
30
|
"unique(connectedClient.clientKey)": ["client", ["clientKey"]],
|
|
@@ -88,10 +84,6 @@ const uniquePlans: Readonly<Record<string, readonly [string, ReadonlyArray<strin
|
|
|
88
84
|
"unique(ownership.identityKey)": ["ownership", ["identityKey"]],
|
|
89
85
|
"unique(pending.digest)": ["pending", ["digest"]],
|
|
90
86
|
"unique(pending.flowId)": ["pending", ["flowId"]],
|
|
91
|
-
"unique(rateScope.moduleId,rateScope.action,rateScope.scopeKind,rateScope.scopeKey)": [
|
|
92
|
-
"rateScope",
|
|
93
|
-
["moduleId", "action", "scopeKind", "scopeKey"],
|
|
94
|
-
],
|
|
95
87
|
"unique(rateScope.moduleId,rateScope.purpose,rateScope.action,rateScope.scopeKind,rateScope.scopeKey)":
|
|
96
88
|
["rateScope", ["moduleId", "purpose", "action", "scopeKind", "scopeKey"]],
|
|
97
89
|
"unique(registration.moduleId,registration.requestId)": [
|
package/src/index.ts
CHANGED
|
@@ -40,22 +40,18 @@ export {
|
|
|
40
40
|
type PasswordAttemptState,
|
|
41
41
|
type PasswordAttemptTable,
|
|
42
42
|
type PasswordAuthorityCredentialTable,
|
|
43
|
-
type PasswordChargeTable,
|
|
44
43
|
type PasswordCommandTable,
|
|
45
44
|
type PasswordConstraintClassifier,
|
|
46
45
|
type PasswordCredentialTable,
|
|
47
46
|
type PasswordD1Clock,
|
|
48
47
|
type PasswordIdentifierTable,
|
|
49
48
|
type PasswordPersistenceMapping,
|
|
50
|
-
type PasswordRateScopeKind,
|
|
51
|
-
type PasswordRateScopeTable,
|
|
52
49
|
type PasswordRegistrationConstraintClassifier,
|
|
53
50
|
type PasswordRegistrationIntent,
|
|
54
51
|
type PasswordRegistrationMapping,
|
|
55
52
|
type PasswordRegistrationProvisioning,
|
|
56
53
|
type PasswordRegistrationState,
|
|
57
54
|
type PasswordRegistrationTable,
|
|
58
|
-
type PasswordScopeKeys,
|
|
59
55
|
type PasswordSubjectTable,
|
|
60
56
|
type RequiredPasswordConstraints,
|
|
61
57
|
type RequiredPasswordRegistrationConstraints,
|
|
@@ -17,6 +17,7 @@ import {
|
|
|
17
17
|
import type { Effect } from "effect";
|
|
18
18
|
import type { SqlClient } from "effect/sql/SqlClient";
|
|
19
19
|
|
|
20
|
+
import { makeDrizzleSqlTables } from "../drizzle/native-sql-table";
|
|
20
21
|
import { drizzleQueryOperations } from "../drizzle/query-operations";
|
|
21
22
|
|
|
22
23
|
const makeTable = (definition: StorageTable) =>
|
|
@@ -78,6 +79,7 @@ export const postgresPersistence = <R>(acquire: Effect.Effect<object, never, R |
|
|
|
78
79
|
makeTable,
|
|
79
80
|
describe,
|
|
80
81
|
operations: drizzleQueryOperations,
|
|
82
|
+
nativeTables: makeDrizzleSqlTables,
|
|
81
83
|
acquire,
|
|
82
84
|
passkeys: makeComposedPasskeys(drizzleQueryOperations),
|
|
83
85
|
});
|
|
@@ -16,6 +16,7 @@ import {
|
|
|
16
16
|
import type { Effect } from "effect";
|
|
17
17
|
import type { SqlClient } from "effect/sql/SqlClient";
|
|
18
18
|
|
|
19
|
+
import { makeDrizzleSqlTables } from "../drizzle/native-sql-table";
|
|
19
20
|
import { drizzleQueryOperations } from "../drizzle/query-operations";
|
|
20
21
|
|
|
21
22
|
const makeTable = (definition: StorageTable) =>
|
|
@@ -76,6 +77,7 @@ export const sqlitePersistence = <R>(acquire: Effect.Effect<object, never, R | S
|
|
|
76
77
|
makeTable,
|
|
77
78
|
describe,
|
|
78
79
|
operations: drizzleQueryOperations,
|
|
80
|
+
nativeTables: makeDrizzleSqlTables,
|
|
79
81
|
acquire,
|
|
80
82
|
passkeys: makeComposedPasskeys(drizzleQueryOperations),
|
|
81
83
|
});
|