@better-auth/drizzle-adapter 1.6.27 → 1.6.28

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/index.d.mts CHANGED
@@ -1,5 +1,6 @@
1
1
  import { DBAdapter, DBAdapterDebugLogOption } from "@better-auth/core/db/adapter";
2
2
  import { BetterAuthOptions } from "@better-auth/core";
3
+
3
4
  //#region src/drizzle-adapter.d.ts
4
5
  interface DB {
5
6
  [key: string]: any;
package/dist/index.mjs CHANGED
@@ -331,8 +331,7 @@ const drizzleAdapter = (db, config) => {
331
331
  async create({ model, data: values }) {
332
332
  const schemaModel = getSchema(model);
333
333
  checkMissingFields(schemaModel, model, values);
334
- const builder = db.insert(schemaModel).values(values);
335
- return await withReturning(model, builder, values);
334
+ return await withReturning(model, db.insert(schemaModel).values(values), values);
336
335
  },
337
336
  async findOne({ model, where, select, join }) {
338
337
  const schemaModel = getSchema(model);
@@ -467,8 +466,7 @@ const drizzleAdapter = (db, config) => {
467
466
  async update({ model, where, update: values }) {
468
467
  const schemaModel = getSchema(model);
469
468
  const clause = convertWhereClause(where, model);
470
- const builder = db.update(schemaModel).set(values).where(...clause);
471
- return await withReturning(model, builder, values, where);
469
+ return await withReturning(model, db.update(schemaModel).set(values).where(...clause), values, where);
472
470
  },
473
471
  async updateMany({ model, where, update: values }) {
474
472
  const schemaModel = getSchema(model);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@better-auth/drizzle-adapter",
3
- "version": "1.6.27",
3
+ "version": "1.6.28",
4
4
  "bugs": {
5
5
  "url": "https://github.com/better-auth/better-auth/issues"
6
6
  },
@@ -40,7 +40,7 @@
40
40
  "peerDependencies": {
41
41
  "@better-auth/utils": "0.4.2",
42
42
  "drizzle-orm": "^0.45.2",
43
- "@better-auth/core": "^1.6.27"
43
+ "@better-auth/core": "^1.6.28"
44
44
  },
45
45
  "peerDependenciesMeta": {
46
46
  "drizzle-orm": {
@@ -50,9 +50,9 @@
50
50
  "devDependencies": {
51
51
  "@better-auth/utils": "0.4.2",
52
52
  "drizzle-orm": "^0.45.2",
53
- "tsdown": "0.22.7",
53
+ "tsdown": "0.21.10",
54
54
  "typescript": "^6.0.3",
55
- "@better-auth/core": "1.6.27"
55
+ "@better-auth/core": "1.6.28"
56
56
  },
57
57
  "scripts": {
58
58
  "build": "tsdown",