@yielded/auth-persistence-drizzle 0.1.0-beta.16 → 0.1.0-beta.18
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/D1.d.mts +116 -116
- package/dist/Libsql.d.mts +125 -125
- package/dist/Mysql2.d.mts +123 -123
- package/dist/Pglite.d.mts +123 -123
- package/dist/Postgres.d.mts +123 -123
- package/dist/SqliteBun.d.mts +125 -125
- package/dist/SqliteDo.d.mts +125 -125
- package/dist/SqliteNode.d.mts +122 -122
- package/dist/SqliteWasm.d.mts +125 -125
- package/dist/drizzle/d1-oauth.d.mts +7 -7
- package/dist/drizzle/d1-password-prepared.mjs +3 -3
- package/dist/drizzle/d1-password-prepared.mjs.map +1 -1
- package/dist/drizzle/d1-passwords.mjs +1 -1
- package/dist/drizzle/d1-passwords.mjs.map +1 -1
- package/dist/drizzle/d1-sessions.mjs +4 -3
- package/dist/drizzle/d1-sessions.mjs.map +1 -1
- package/dist/drizzle/oauth-connected-state.d.mts +252 -252
- package/dist/drizzle/oauth-connected-target.d.mts +102 -102
- package/dist/drizzle/password-prepared-sql.mjs +1 -1
- package/dist/drizzle/password-prepared-sql.mjs.map +1 -1
- package/package.json +1 -1
- package/src/drizzle/d1-password-prepared.ts +11 -5
- package/src/drizzle/d1-passwords.ts +1 -1
- package/src/drizzle/d1-sessions.ts +8 -2
- package/src/drizzle/password-prepared-sql.ts +1 -1
|
@@ -86,8 +86,8 @@ const conditionMatches = (condition) => Effect.flatMap(CurrentD1PlanningDatabase
|
|
|
86
86
|
function runPlanned(plan, isConstraintConflict, recoverGuard) {
|
|
87
87
|
const planned = plan.pipe(Effect.map((value) => ({
|
|
88
88
|
...value,
|
|
89
|
-
isConstraintConflict,
|
|
90
|
-
recoverGuard
|
|
89
|
+
...isConstraintConflict === void 0 ? {} : { isConstraintConflict },
|
|
90
|
+
...recoverGuard === void 0 ? {} : { recoverGuard }
|
|
91
91
|
})));
|
|
92
92
|
const execution = Effect.gen(function* () {
|
|
93
93
|
const batch = yield* Effect.serviceOption(CurrentD1SessionBatch);
|
|
@@ -504,9 +504,10 @@ const makeD1StatefulSessions = (mapping) => {
|
|
|
504
504
|
const decoded = yield* Effect.forEach(rows, (row) => mapping.session.decode(row));
|
|
505
505
|
const codec = Schema.toCodecJson(Schema.toType(SessionMetadata));
|
|
506
506
|
const sessions = yield* Effect.forEach(decoded.slice(0, input.limit), (record) => Schema.encodeEffect(codec)(record).pipe(Effect.flatMap(Schema.decodeEffect(codec))));
|
|
507
|
+
const nextCursor = decoded.length <= input.limit ? void 0 : sessions.at(-1)?.sessionId;
|
|
507
508
|
return {
|
|
508
509
|
sessions,
|
|
509
|
-
...
|
|
510
|
+
...nextCursor === void 0 ? {} : { nextCursor }
|
|
510
511
|
};
|
|
511
512
|
}).pipe(terminalD1) }
|
|
512
513
|
};
|