Skip to content

Commit c0319ac

Browse files
committed
better-auth patch
1 parent 6a4a794 commit c0319ac

File tree

3 files changed

+95
-1
lines changed

3 files changed

+95
-1
lines changed

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,14 @@
2323
"lint": "turbo run lint --continue -- --cache --cache-location .cache/.eslintcache",
2424
"lint:fix": "turbo run lint --continue -- --fix --cache --cache-location .cache/.eslintcache",
2525
"lint:ws": "pnpm dlx sherif@latest",
26-
"postinstall": "pnpm lint:ws",
26+
"postinstall": "pnpm lint:ws && patch-package",
2727
"typecheck": "turbo run typecheck",
2828
"ui-add": "turbo run ui-add"
2929
},
3030
"devDependencies": {
3131
"@1up/prettier-config": "workspace:*",
3232
"@turbo/gen": "^2.3.4",
33+
"patch-package": "^8.0.0",
3334
"prettier": "catalog:",
3435
"turbo": "^2.3.4",
3536
"typescript": "catalog:"

patches/better-auth+1.2.3.patch

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
diff --git a/node_modules/better-auth/dist/adapters/drizzle-adapter/index.cjs b/node_modules/better-auth/dist/adapters/drizzle-adapter/index.cjs
2+
index xxxxxxx..xxxxxxx 100644
3+
--- a/node_modules/better-auth/dist/adapters/drizzle-adapter/index.cjs
4+
+++ b/node_modules/better-auth/dist/adapters/drizzle-adapter/index.cjs
5+
@@ -175,6 +175,11 @@ const createTransform = (db, config, options) => {
6+
const res = await db.select().from(schemaModel).where(drizzleOrm.eq(schemaModel.id, tId));
7+
return res[0];
8+
}
9+
+ const email = builderVal[0]?.email?.value;
10+
+ if(email) {
11+
+ const res = await db.select().from(schemaModel).where(drizzleOrm.eq(schemaModel.email, email));
12+
+ return res[0];
13+
+ }
14+
const fieldValue = builderVal[0]?.identifier?.value;
15+
if(fieldValue) {
16+
const res = await db.select().from(schemaModel).where(drizzleOrm.eq(schemaModel.identifier, fieldValue));

pnpm-lock.yaml

Lines changed: 77 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)