@better-auth/kysely-adapter 1.6.23 → 1.6.25
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/{bun-sqlite-dialect-BW9W1_Ps.mjs → bun-sqlite-dialect-DTyyejk1.mjs} +1 -1
- package/dist/{d1-sqlite-dialect-BLC8LXE6.mjs → d1-sqlite-dialect-CDCl_qH4.mjs} +1 -1
- package/dist/index.d.mts +0 -1
- package/dist/index.mjs +4 -3
- package/dist/node-sqlite-dialect.d.mts +0 -1
- package/dist/node-sqlite-dialect.mjs +1 -1
- package/package.json +5 -5
- /package/dist/{kysely-migration-tables-JkVUjPF_.mjs → kysely-migration-tables-B2-rTeXm.mjs} +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as DEFAULT_MIGRATION_TABLE, t as DEFAULT_MIGRATION_LOCK_TABLE } from "./kysely-migration-tables-
|
|
1
|
+
import { n as DEFAULT_MIGRATION_TABLE, t as DEFAULT_MIGRATION_LOCK_TABLE } from "./kysely-migration-tables-B2-rTeXm.mjs";
|
|
2
2
|
import { CompiledQuery, DefaultQueryCompiler, sql } from "kysely";
|
|
3
3
|
//#region src/bun-sqlite-dialect.ts
|
|
4
4
|
var BunSqliteAdapter = class {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as DEFAULT_MIGRATION_TABLE, t as DEFAULT_MIGRATION_LOCK_TABLE } from "./kysely-migration-tables-
|
|
1
|
+
import { n as DEFAULT_MIGRATION_TABLE, t as DEFAULT_MIGRATION_LOCK_TABLE } from "./kysely-migration-tables-B2-rTeXm.mjs";
|
|
2
2
|
import { SqliteAdapter, SqliteQueryCompiler } from "kysely";
|
|
3
3
|
//#region src/d1-sqlite-dialect.ts
|
|
4
4
|
var D1SqliteAdapter = class extends SqliteAdapter {};
|
package/dist/index.d.mts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { Kysely } from "kysely";
|
|
2
2
|
import { DBAdapter, DBAdapterDebugLogOption } from "@better-auth/core/db/adapter";
|
|
3
3
|
import { BetterAuthOptions } from "@better-auth/core";
|
|
4
|
-
|
|
5
4
|
//#region src/types.d.ts
|
|
6
5
|
type KyselyDatabaseType = "postgres" | "mysql" | "sqlite" | "mssql";
|
|
7
6
|
//#endregion
|
package/dist/index.mjs
CHANGED
|
@@ -44,7 +44,7 @@ const createKyselyAdapter = async (config) => {
|
|
|
44
44
|
if ("getConnection" in db) dialect = new MysqlDialect(db);
|
|
45
45
|
if ("connect" in db) dialect = new PostgresDialect({ pool: db });
|
|
46
46
|
if ("fileControl" in db) {
|
|
47
|
-
const { BunSqliteDialect } = await import("./bun-sqlite-dialect-
|
|
47
|
+
const { BunSqliteDialect } = await import("./bun-sqlite-dialect-DTyyejk1.mjs");
|
|
48
48
|
dialect = new BunSqliteDialect({ database: db });
|
|
49
49
|
}
|
|
50
50
|
if ("createSession" in db) {
|
|
@@ -65,7 +65,7 @@ const createKyselyAdapter = async (config) => {
|
|
|
65
65
|
}
|
|
66
66
|
}
|
|
67
67
|
if ("batch" in db && "exec" in db && "prepare" in db) {
|
|
68
|
-
const { D1SqliteDialect } = await import("./d1-sqlite-dialect-
|
|
68
|
+
const { D1SqliteDialect } = await import("./d1-sqlite-dialect-CDCl_qH4.mjs");
|
|
69
69
|
dialect = new D1SqliteDialect({ database: db });
|
|
70
70
|
}
|
|
71
71
|
return {
|
|
@@ -358,7 +358,8 @@ const kyselyAdapter = (db, config) => {
|
|
|
358
358
|
}
|
|
359
359
|
return {
|
|
360
360
|
async create({ data, model }) {
|
|
361
|
-
|
|
361
|
+
const builder = db.insertInto(model).values(data);
|
|
362
|
+
return await withReturning(data, builder, model, []);
|
|
362
363
|
},
|
|
363
364
|
async findOne({ model, where, select, join }) {
|
|
364
365
|
const { and, or } = convertWhereClause(model, where);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as DEFAULT_MIGRATION_TABLE, t as DEFAULT_MIGRATION_LOCK_TABLE } from "./kysely-migration-tables-
|
|
1
|
+
import { n as DEFAULT_MIGRATION_TABLE, t as DEFAULT_MIGRATION_LOCK_TABLE } from "./kysely-migration-tables-B2-rTeXm.mjs";
|
|
2
2
|
import { CompiledQuery, DefaultQueryCompiler, sql } from "kysely";
|
|
3
3
|
//#region src/node-sqlite-dialect.ts
|
|
4
4
|
var NodeSqliteAdapter = class {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@better-auth/kysely-adapter",
|
|
3
|
-
"version": "1.6.
|
|
3
|
+
"version": "1.6.25",
|
|
4
4
|
"description": "Kysely adapter for Better Auth",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
"peerDependencies": {
|
|
43
43
|
"@better-auth/utils": "0.4.2",
|
|
44
44
|
"kysely": "^0.28.17 || ^0.29.0",
|
|
45
|
-
"@better-auth/core": "^1.6.
|
|
45
|
+
"@better-auth/core": "^1.6.25"
|
|
46
46
|
},
|
|
47
47
|
"peerDependenciesMeta": {
|
|
48
48
|
"kysely": {
|
|
@@ -53,9 +53,9 @@
|
|
|
53
53
|
"@cloudflare/workers-types": "^4.20250121.0",
|
|
54
54
|
"@better-auth/utils": "0.4.2",
|
|
55
55
|
"kysely": "^0.28.17 || ^0.29.0",
|
|
56
|
-
"tsdown": "0.
|
|
57
|
-
"typescript": "^
|
|
58
|
-
"@better-auth/core": "1.6.
|
|
56
|
+
"tsdown": "0.22.7",
|
|
57
|
+
"typescript": "^6.0.3",
|
|
58
|
+
"@better-auth/core": "1.6.25"
|
|
59
59
|
},
|
|
60
60
|
"scripts": {
|
|
61
61
|
"build": "tsdown",
|
|
File without changes
|