better-auth 1.3.9 → 1.3.10-beta.2
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/adapters/drizzle-adapter/index.cjs +47 -29
- package/dist/adapters/drizzle-adapter/index.d.cts +14 -7
- package/dist/adapters/drizzle-adapter/index.d.mts +14 -7
- package/dist/adapters/drizzle-adapter/index.d.ts +14 -7
- package/dist/adapters/drizzle-adapter/index.mjs +48 -30
- package/dist/adapters/index.cjs +6 -5
- package/dist/adapters/index.d.cts +9 -13
- package/dist/adapters/index.d.mts +9 -13
- package/dist/adapters/index.d.ts +9 -13
- package/dist/adapters/index.mjs +6 -5
- package/dist/adapters/kysely-adapter/index.cjs +7 -6
- package/dist/adapters/kysely-adapter/index.d.cts +13 -6
- package/dist/adapters/kysely-adapter/index.d.mts +13 -6
- package/dist/adapters/kysely-adapter/index.d.ts +13 -6
- package/dist/adapters/kysely-adapter/index.mjs +7 -6
- package/dist/adapters/memory-adapter/index.cjs +7 -6
- package/dist/adapters/memory-adapter/index.d.cts +6 -7
- package/dist/adapters/memory-adapter/index.d.mts +6 -7
- package/dist/adapters/memory-adapter/index.d.ts +6 -7
- package/dist/adapters/memory-adapter/index.mjs +7 -6
- package/dist/adapters/mongodb-adapter/index.cjs +7 -6
- package/dist/adapters/mongodb-adapter/index.d.cts +20 -8
- package/dist/adapters/mongodb-adapter/index.d.mts +20 -8
- package/dist/adapters/mongodb-adapter/index.d.ts +20 -8
- package/dist/adapters/mongodb-adapter/index.mjs +7 -6
- package/dist/adapters/prisma-adapter/index.cjs +34 -16
- package/dist/adapters/prisma-adapter/index.d.cts +14 -7
- package/dist/adapters/prisma-adapter/index.d.mts +14 -7
- package/dist/adapters/prisma-adapter/index.d.ts +14 -7
- package/dist/adapters/prisma-adapter/index.mjs +34 -16
- package/dist/adapters/test.cjs +134 -3
- package/dist/adapters/test.d.cts +12 -7
- package/dist/adapters/test.d.mts +12 -7
- package/dist/adapters/test.d.ts +12 -7
- package/dist/adapters/test.mjs +134 -3
- package/dist/api/index.cjs +58 -17
- package/dist/api/index.d.cts +4 -5
- package/dist/api/index.d.mts +4 -5
- package/dist/api/index.d.ts +4 -5
- package/dist/api/index.mjs +61 -21
- package/dist/client/index.cjs +2 -2
- package/dist/client/index.d.cts +7 -8
- package/dist/client/index.d.mts +7 -8
- package/dist/client/index.d.ts +7 -8
- package/dist/client/index.mjs +4 -4
- package/dist/client/plugins/index.cjs +32 -10
- package/dist/client/plugins/index.d.cts +62 -16
- package/dist/client/plugins/index.d.mts +62 -16
- package/dist/client/plugins/index.d.ts +62 -16
- package/dist/client/plugins/index.mjs +34 -12
- package/dist/client/react/index.cjs +1 -1
- package/dist/client/react/index.d.cts +8 -9
- package/dist/client/react/index.d.mts +8 -9
- package/dist/client/react/index.d.ts +8 -9
- package/dist/client/react/index.mjs +3 -3
- package/dist/client/solid/index.cjs +1 -1
- package/dist/client/solid/index.d.cts +8 -9
- package/dist/client/solid/index.d.mts +8 -9
- package/dist/client/solid/index.d.ts +8 -9
- package/dist/client/solid/index.mjs +3 -3
- package/dist/client/svelte/index.cjs +1 -1
- package/dist/client/svelte/index.d.cts +8 -9
- package/dist/client/svelte/index.d.mts +8 -9
- package/dist/client/svelte/index.d.ts +8 -9
- package/dist/client/svelte/index.mjs +3 -3
- package/dist/client/vue/index.cjs +3 -6
- package/dist/client/vue/index.d.cts +8 -9
- package/dist/client/vue/index.d.mts +8 -9
- package/dist/client/vue/index.d.ts +8 -9
- package/dist/client/vue/index.mjs +5 -8
- package/dist/cookies/index.cjs +6 -6
- package/dist/cookies/index.d.cts +5 -6
- package/dist/cookies/index.d.mts +5 -6
- package/dist/cookies/index.d.ts +5 -6
- package/dist/cookies/index.mjs +8 -8
- package/dist/db/index.cjs +11 -11
- package/dist/db/index.d.cts +10 -11
- package/dist/db/index.d.mts +10 -11
- package/dist/db/index.d.ts +10 -11
- package/dist/db/index.mjs +12 -12
- package/dist/index.cjs +16 -16
- package/dist/index.d.cts +7 -7
- package/dist/index.d.mts +7 -7
- package/dist/index.d.ts +7 -7
- package/dist/index.mjs +17 -17
- package/dist/integrations/next-js.cjs +10 -11
- package/dist/integrations/next-js.d.cts +5 -6
- package/dist/integrations/next-js.d.mts +5 -6
- package/dist/integrations/next-js.d.ts +5 -6
- package/dist/integrations/next-js.mjs +11 -12
- package/dist/integrations/node.d.cts +6 -7
- package/dist/integrations/node.d.mts +6 -7
- package/dist/integrations/node.d.ts +6 -7
- package/dist/integrations/react-start.cjs +10 -11
- package/dist/integrations/react-start.d.cts +5 -6
- package/dist/integrations/react-start.d.mts +5 -6
- package/dist/integrations/react-start.d.ts +5 -6
- package/dist/integrations/react-start.mjs +11 -12
- package/dist/integrations/svelte-kit.cjs +9 -9
- package/dist/integrations/svelte-kit.d.cts +5 -6
- package/dist/integrations/svelte-kit.d.mts +5 -6
- package/dist/integrations/svelte-kit.d.ts +5 -6
- package/dist/integrations/svelte-kit.mjs +10 -10
- package/dist/oauth2/index.cjs +10 -10
- package/dist/oauth2/index.d.cts +7 -8
- package/dist/oauth2/index.d.mts +7 -8
- package/dist/oauth2/index.d.ts +7 -8
- package/dist/oauth2/index.mjs +11 -11
- package/dist/plugins/admin/access/index.cjs +0 -2
- package/dist/plugins/admin/access/index.d.cts +23 -23
- package/dist/plugins/admin/access/index.d.mts +23 -23
- package/dist/plugins/admin/access/index.d.ts +23 -23
- package/dist/plugins/admin/access/index.mjs +0 -2
- package/dist/plugins/admin/index.cjs +11 -11
- package/dist/plugins/admin/index.d.cts +17 -102
- package/dist/plugins/admin/index.d.mts +17 -102
- package/dist/plugins/admin/index.d.ts +17 -102
- package/dist/plugins/admin/index.mjs +12 -12
- package/dist/plugins/anonymous/index.cjs +19 -13
- package/dist/plugins/anonymous/index.d.cts +5 -6
- package/dist/plugins/anonymous/index.d.mts +5 -6
- package/dist/plugins/anonymous/index.d.ts +5 -6
- package/dist/plugins/anonymous/index.mjs +17 -11
- package/dist/plugins/bearer/index.cjs +9 -9
- package/dist/plugins/bearer/index.d.cts +5 -6
- package/dist/plugins/bearer/index.d.mts +5 -6
- package/dist/plugins/bearer/index.d.ts +5 -6
- package/dist/plugins/bearer/index.mjs +10 -10
- package/dist/plugins/captcha/index.d.cts +6 -7
- package/dist/plugins/captcha/index.d.mts +6 -7
- package/dist/plugins/captcha/index.d.ts +6 -7
- package/dist/plugins/custom-session/index.cjs +9 -9
- package/dist/plugins/custom-session/index.d.cts +6 -7
- package/dist/plugins/custom-session/index.d.mts +6 -7
- package/dist/plugins/custom-session/index.d.ts +6 -7
- package/dist/plugins/custom-session/index.mjs +10 -10
- package/dist/plugins/device-authorization/index.cjs +40 -40
- package/dist/plugins/device-authorization/index.d.cts +6 -7
- package/dist/plugins/device-authorization/index.d.mts +6 -7
- package/dist/plugins/device-authorization/index.d.ts +6 -7
- package/dist/plugins/device-authorization/index.mjs +42 -43
- package/dist/plugins/email-otp/index.cjs +8 -8
- package/dist/plugins/email-otp/index.d.cts +6 -7
- package/dist/plugins/email-otp/index.d.mts +6 -7
- package/dist/plugins/email-otp/index.d.ts +6 -7
- package/dist/plugins/email-otp/index.mjs +10 -10
- package/dist/plugins/generic-oauth/index.cjs +8 -8
- package/dist/plugins/generic-oauth/index.d.cts +5 -6
- package/dist/plugins/generic-oauth/index.d.mts +5 -6
- package/dist/plugins/generic-oauth/index.d.ts +5 -6
- package/dist/plugins/generic-oauth/index.mjs +10 -10
- package/dist/plugins/haveibeenpwned/index.cjs +9 -9
- package/dist/plugins/haveibeenpwned/index.d.cts +6 -7
- package/dist/plugins/haveibeenpwned/index.d.mts +6 -7
- package/dist/plugins/haveibeenpwned/index.d.ts +6 -7
- package/dist/plugins/haveibeenpwned/index.mjs +10 -10
- package/dist/plugins/index.cjs +31 -25
- package/dist/plugins/index.d.cts +7 -8
- package/dist/plugins/index.d.mts +7 -8
- package/dist/plugins/index.d.ts +7 -8
- package/dist/plugins/index.mjs +34 -28
- package/dist/plugins/jwt/index.cjs +25 -16
- package/dist/plugins/jwt/index.d.cts +9 -10
- package/dist/plugins/jwt/index.d.mts +9 -10
- package/dist/plugins/jwt/index.d.ts +9 -10
- package/dist/plugins/jwt/index.mjs +11 -12
- package/dist/plugins/magic-link/index.cjs +7 -7
- package/dist/plugins/magic-link/index.d.cts +1 -1
- package/dist/plugins/magic-link/index.d.mts +1 -1
- package/dist/plugins/magic-link/index.d.ts +1 -1
- package/dist/plugins/magic-link/index.mjs +9 -9
- package/dist/plugins/multi-session/index.cjs +16 -12
- package/dist/plugins/multi-session/index.d.cts +6 -7
- package/dist/plugins/multi-session/index.d.mts +6 -7
- package/dist/plugins/multi-session/index.d.ts +6 -7
- package/dist/plugins/multi-session/index.mjs +18 -14
- package/dist/plugins/oauth-proxy/index.cjs +9 -9
- package/dist/plugins/oauth-proxy/index.d.cts +6 -7
- package/dist/plugins/oauth-proxy/index.d.mts +6 -7
- package/dist/plugins/oauth-proxy/index.d.ts +6 -7
- package/dist/plugins/oauth-proxy/index.mjs +10 -10
- package/dist/plugins/oidc-provider/index.cjs +10 -10
- package/dist/plugins/oidc-provider/index.d.cts +6 -7
- package/dist/plugins/oidc-provider/index.d.mts +6 -7
- package/dist/plugins/oidc-provider/index.d.ts +6 -7
- package/dist/plugins/oidc-provider/index.mjs +11 -11
- package/dist/plugins/one-tap/index.cjs +8 -8
- package/dist/plugins/one-tap/index.d.cts +1 -1
- package/dist/plugins/one-tap/index.d.mts +1 -1
- package/dist/plugins/one-tap/index.d.ts +1 -1
- package/dist/plugins/one-tap/index.mjs +10 -10
- package/dist/plugins/one-time-token/index.cjs +12 -13
- package/dist/plugins/one-time-token/index.d.cts +8 -9
- package/dist/plugins/one-time-token/index.d.mts +8 -9
- package/dist/plugins/one-time-token/index.d.ts +8 -9
- package/dist/plugins/one-time-token/index.mjs +13 -14
- package/dist/plugins/open-api/index.cjs +34 -20
- package/dist/plugins/open-api/index.d.cts +4 -5
- package/dist/plugins/open-api/index.d.mts +4 -5
- package/dist/plugins/open-api/index.d.ts +4 -5
- package/dist/plugins/open-api/index.mjs +20 -20
- package/dist/plugins/organization/index.cjs +14 -14
- package/dist/plugins/organization/index.d.cts +419 -8
- package/dist/plugins/organization/index.d.mts +419 -8
- package/dist/plugins/organization/index.d.ts +419 -8
- package/dist/plugins/organization/index.mjs +15 -15
- package/dist/plugins/passkey/index.cjs +7 -7
- package/dist/plugins/passkey/index.d.cts +6 -7
- package/dist/plugins/passkey/index.d.mts +6 -7
- package/dist/plugins/passkey/index.d.ts +6 -7
- package/dist/plugins/passkey/index.mjs +9 -9
- package/dist/plugins/phone-number/index.cjs +7 -7
- package/dist/plugins/phone-number/index.d.cts +6 -7
- package/dist/plugins/phone-number/index.d.mts +6 -7
- package/dist/plugins/phone-number/index.d.ts +6 -7
- package/dist/plugins/phone-number/index.mjs +9 -9
- package/dist/plugins/siwe/index.cjs +31 -18
- package/dist/plugins/siwe/index.d.cts +6 -7
- package/dist/plugins/siwe/index.d.mts +6 -7
- package/dist/plugins/siwe/index.d.ts +6 -7
- package/dist/plugins/siwe/index.mjs +10 -11
- package/dist/plugins/sso/index.cjs +8 -8
- package/dist/plugins/sso/index.d.cts +5 -6
- package/dist/plugins/sso/index.d.mts +5 -6
- package/dist/plugins/sso/index.d.ts +5 -6
- package/dist/plugins/sso/index.mjs +10 -10
- package/dist/plugins/two-factor/index.cjs +8 -8
- package/dist/plugins/two-factor/index.d.cts +5 -6
- package/dist/plugins/two-factor/index.d.mts +5 -6
- package/dist/plugins/two-factor/index.d.ts +5 -6
- package/dist/plugins/two-factor/index.mjs +10 -10
- package/dist/plugins/username/index.cjs +28 -9
- package/dist/plugins/username/index.d.cts +8 -7
- package/dist/plugins/username/index.d.mts +8 -7
- package/dist/plugins/username/index.d.ts +8 -7
- package/dist/plugins/username/index.mjs +30 -11
- package/dist/shared/{better-auth.Szg-8evr.cjs → better-auth.6YoZ6q0o.cjs} +26 -10
- package/dist/shared/{better-auth.CewjboYP.mjs → better-auth.B213EsGq.mjs} +25 -20
- package/dist/shared/{better-auth.B5FL4Q2B.d.ts → better-auth.B2AIpsP8.d.ts} +41 -7
- package/dist/shared/{better-auth.DV5EHeYG.mjs → better-auth.B9SEc8iu.mjs} +17 -8
- package/dist/shared/{better-auth.D7Ni8r_z.mjs → better-auth.BA3nnHWN.mjs} +4 -1
- package/dist/shared/better-auth.BCYTZmGj.cjs +177 -0
- package/dist/shared/{better-auth.CkWzYwIl.cjs → better-auth.BEJWd2JW.cjs} +8 -8
- package/dist/shared/better-auth.BFuRqFpJ.cjs +370 -0
- package/dist/shared/{better-auth.DR57bygo.d.mts → better-auth.BHqN3Ecq.d.mts} +41 -7
- package/dist/shared/{better-auth.UfVWArIB.mjs → better-auth.BY3136V6.mjs} +51 -29
- package/dist/shared/{better-auth.DSI5WTAg.cjs → better-auth.B_u82vze.cjs} +24 -19
- package/dist/shared/better-auth.Bi4RSBAD.mjs +294 -0
- package/dist/shared/{better-auth.QrcI0Z8z.cjs → better-auth.BsOSAXf7.cjs} +1 -1
- package/dist/shared/{better-auth.tThsKLej.d.ts → better-auth.BtAaeROk.d.ts} +1382 -1313
- package/dist/shared/{better-auth.C-DLukV1.d.ts → better-auth.BveDqFQV.d.ts} +1 -1
- package/dist/shared/{better-auth.D5q0JUiv.cjs → better-auth.Bwd5OvjA.cjs} +49 -27
- package/dist/shared/{better-auth.Dn1vueo5.cjs → better-auth.BxQfeq5D.cjs} +13 -17
- package/dist/shared/{better-auth.DwP9mHxb.cjs → better-auth.Bx_K3qJR.cjs} +66 -12
- package/dist/shared/{better-auth.DrJWSFx6.mjs → better-auth.BxexnJiR.mjs} +1 -1
- package/dist/shared/{better-auth.DpiViI0d.d.mts → better-auth.C0ai3iV5.d.cts} +1 -1
- package/dist/shared/{better-auth.gN3g-znU.cjs → better-auth.C0qxpMUS.cjs} +1 -1
- package/dist/shared/better-auth.C4g12FAA.mjs +200 -0
- package/dist/shared/{better-auth.BNm-Id9Y.d.mts → better-auth.CFvgYmbH.d.mts} +1382 -1313
- package/dist/shared/{better-auth.DGUCyils.cjs → better-auth.CKikTV5q.cjs} +8 -8
- package/dist/shared/{better-auth.Q1vWPhO4.mjs → better-auth.COtWxAMt.mjs} +7 -68
- package/dist/shared/{better-auth.Cxcr0S4x.mjs → better-auth.COzCYtYI.mjs} +8 -8
- package/dist/shared/better-auth.CRHXayTu.mjs +175 -0
- package/dist/shared/better-auth.CS1Fdkun.cjs +296 -0
- package/dist/shared/{better-auth.B1aLAOp3.mjs → better-auth.CbQUbf5X.mjs} +7 -7
- package/dist/shared/{better-auth.QRjaqA1W.cjs → better-auth.Cg3wNbjj.cjs} +7 -7
- package/dist/shared/{better-auth.CMQ3rA-I.mjs → better-auth.CiuwFiHM.mjs} +1 -1
- package/dist/shared/{better-auth.B_PTVODM.mjs → better-auth.Cjw1GDsh.mjs} +1 -1
- package/dist/shared/{better-auth.CpS2FLSa.cjs → better-auth.CsC4FSOQ.cjs} +1 -1
- package/dist/shared/{better-auth.BZZKN1g7.mjs → better-auth.CvNZNAOW.mjs} +1 -1
- package/dist/shared/{better-auth.O2VtDkDK.mjs → better-auth.Cwj5CPkV.mjs} +4 -1
- package/dist/shared/{better-auth.CUS1tZYm.cjs → better-auth.D-RkNl1x.cjs} +9 -9
- package/dist/shared/{better-auth.F4gRWoeQ.d.ts → better-auth.D5Ok_KEz.d.ts} +1 -1
- package/dist/shared/{better-auth.Byugpn9h.cjs → better-auth.DF_1VOmo.cjs} +1 -1
- package/dist/shared/{better-auth.CujFcMib.mjs → better-auth.DJQzBrv5.mjs} +11 -11
- package/dist/shared/{better-auth.DOXaXTC6.mjs → better-auth.DR23L78Y.mjs} +26 -10
- package/dist/shared/better-auth.DTvRBuq4.cjs +205 -0
- package/dist/shared/{better-auth.C5ZbY8Lo.cjs → better-auth.DV9461yy.cjs} +144 -127
- package/dist/shared/{better-auth.DV0Lly8-.mjs → better-auth.DW4uCD5d.mjs} +145 -128
- package/dist/shared/{better-auth.vPQBmXQL.cjs → better-auth.DgMx7bVs.cjs} +1 -1
- package/dist/shared/{better-auth.BaMSx6K3.d.cts → better-auth.DhdDxivH.d.cts} +41 -7
- package/dist/shared/{better-auth.fOOSrFgz.cjs → better-auth.DkOdlfr0.cjs} +3 -0
- package/dist/shared/{better-auth.Cxlqz5AU.cjs → better-auth.DkbzbiTb.cjs} +3 -0
- package/dist/shared/{better-auth.B-Y3tALa.d.mts → better-auth.DkhktrtM.d.mts} +36 -36
- package/dist/shared/{better-auth.Dcv8PS7T.mjs → better-auth.Dlx1jCB2.mjs} +1 -1
- package/dist/shared/{better-auth.-KqwM6Dk.d.ts → better-auth.DqMvT2z5.d.ts} +36 -36
- package/dist/shared/{better-auth.Cri7Gd3F.d.cts → better-auth.Drx6LALw.d.cts} +1 -1
- package/dist/shared/{better-auth.BWDlmABj.d.cts → better-auth.Dvr1BSLI.d.cts} +1382 -1313
- package/dist/shared/{better-auth.BLxUOrSM.mjs → better-auth.Dvs5Am9c.mjs} +13 -17
- package/dist/shared/{better-auth.CuS_eDdK.mjs → better-auth.DxV4YGX3.mjs} +1 -1
- package/dist/shared/{better-auth.CLv80Pwz.cjs → better-auth.KwBWPw88.cjs} +17 -7
- package/dist/shared/{better-auth.DEfCvgT7.d.cts → better-auth.M4WgZY9Z.d.mts} +1 -1
- package/dist/shared/{better-auth.DohEz_02.d.mts → better-auth.TGHC1Bst.d.mts} +1 -1
- package/dist/shared/{better-auth.1do_0Yab.mjs → better-auth.VpXE6sMp.mjs} +66 -12
- package/dist/shared/{better-auth.DtbDmaRJ.mjs → better-auth.fSewea6i.mjs} +1 -1
- package/dist/shared/{better-auth.v4QNWZDp.cjs → better-auth.oBv2D_CE.cjs} +6 -67
- package/dist/shared/{better-auth.BvjZXQPa.mjs → better-auth.uFahZt8J.mjs} +8 -8
- package/dist/shared/{better-auth.CxoVMW7L.d.cts → better-auth.uQIZSMHG.d.cts} +36 -36
- package/dist/shared/better-auth.x3lTeogm.mjs +366 -0
- package/dist/social-providers/index.cjs +10 -10
- package/dist/social-providers/index.d.cts +2 -2
- package/dist/social-providers/index.d.mts +2 -2
- package/dist/social-providers/index.d.ts +2 -2
- package/dist/social-providers/index.mjs +11 -11
- package/dist/test-utils/index.cjs +20 -21
- package/dist/test-utils/index.d.cts +738 -739
- package/dist/test-utils/index.d.mts +738 -739
- package/dist/test-utils/index.d.ts +738 -739
- package/dist/test-utils/index.mjs +21 -22
- package/dist/types/index.d.cts +7 -8
- package/dist/types/index.d.mts +7 -8
- package/dist/types/index.d.ts +7 -8
- package/package.json +28 -5
- package/dist/shared/better-auth.7ZeACU2v.mjs +0 -143
- package/dist/shared/better-auth.B3274wGK.cjs +0 -66
- package/dist/shared/better-auth.BEYvND1Y.cjs +0 -261
- package/dist/shared/better-auth.BduPtJy8.mjs +0 -347
- package/dist/shared/better-auth.BjBlybv-.mjs +0 -61
- package/dist/shared/better-auth.C7KUdiwV.mjs +0 -259
- package/dist/shared/better-auth.QqWdVDmR.cjs +0 -145
- package/dist/shared/better-auth.WyvofoOW.cjs +0 -351
|
@@ -2,13 +2,14 @@
|
|
|
2
2
|
|
|
3
3
|
const drizzleOrm = require('drizzle-orm');
|
|
4
4
|
const index$1 = require('../../shared/better-auth.ANpbi45u.cjs');
|
|
5
|
-
const index = require('../../shared/better-auth.
|
|
6
|
-
require('../../shared/better-auth.
|
|
7
|
-
require('../../shared/better-auth.
|
|
8
|
-
require('../../shared/better-auth.
|
|
5
|
+
const index = require('../../shared/better-auth.6YoZ6q0o.cjs');
|
|
6
|
+
require('../../shared/better-auth.DgMx7bVs.cjs');
|
|
7
|
+
require('../../shared/better-auth.DTvRBuq4.cjs');
|
|
8
|
+
require('../../shared/better-auth.B6fIklBU.cjs');
|
|
9
|
+
require('../../shared/better-auth.DF_1VOmo.cjs');
|
|
9
10
|
require('../../shared/better-auth.Bg6iw3ig.cjs');
|
|
10
11
|
require('@better-auth/utils/random');
|
|
11
|
-
require('zod
|
|
12
|
+
require('zod');
|
|
12
13
|
require('better-call');
|
|
13
14
|
require('@better-auth/utils/hash');
|
|
14
15
|
require('@noble/ciphers/chacha.js');
|
|
@@ -21,16 +22,11 @@ require('@better-auth/utils/hex');
|
|
|
21
22
|
require('@noble/hashes/utils.js');
|
|
22
23
|
require('../../shared/better-auth.CYeOI8C-.cjs');
|
|
23
24
|
|
|
24
|
-
const drizzleAdapter = (db, config) =>
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
adapterName: "Drizzle Adapter",
|
|
28
|
-
usePlural: config.usePlural ?? false,
|
|
29
|
-
debugLogs: config.debugLogs ?? false
|
|
30
|
-
},
|
|
31
|
-
adapter: ({ getFieldName, debugLog }) => {
|
|
25
|
+
const drizzleAdapter = (db, config) => {
|
|
26
|
+
let lazyOptions = null;
|
|
27
|
+
const createCustomAdapter = (db2) => ({ getFieldName, debugLog }) => {
|
|
32
28
|
function getSchema(model) {
|
|
33
|
-
const schema = config.schema ||
|
|
29
|
+
const schema = config.schema || db2._.fullSchema;
|
|
34
30
|
if (!schema) {
|
|
35
31
|
throw new index$1.BetterAuthError(
|
|
36
32
|
"Drizzle adapter failed to initialize. Schema not found. Please provide a schema object in the adapter options object."
|
|
@@ -54,18 +50,18 @@ const drizzleAdapter = (db, config) => index.createAdapter({
|
|
|
54
50
|
const builderVal = builder.config?.values;
|
|
55
51
|
if (where?.length) {
|
|
56
52
|
const clause = convertWhereClause(where, model);
|
|
57
|
-
const res = await
|
|
53
|
+
const res = await db2.select().from(schemaModel).where(...clause);
|
|
58
54
|
return res[0];
|
|
59
55
|
} else if (builderVal && builderVal[0]?.id?.value) {
|
|
60
56
|
let tId = builderVal[0]?.id?.value;
|
|
61
57
|
if (!tId) {
|
|
62
|
-
const lastInsertId = await
|
|
58
|
+
const lastInsertId = await db2.select({ id: drizzleOrm.sql`LAST_INSERT_ID()` }).from(schemaModel).orderBy(drizzleOrm.desc(schemaModel.id)).limit(1);
|
|
63
59
|
tId = lastInsertId[0].id;
|
|
64
60
|
}
|
|
65
|
-
const res = await
|
|
61
|
+
const res = await db2.select().from(schemaModel).where(drizzleOrm.eq(schemaModel.id, tId)).limit(1).execute();
|
|
66
62
|
return res[0];
|
|
67
63
|
} else if (data.id) {
|
|
68
|
-
const res = await
|
|
64
|
+
const res = await db2.select().from(schemaModel).where(drizzleOrm.eq(schemaModel.id, data.id)).limit(1).execute();
|
|
69
65
|
return res[0];
|
|
70
66
|
} else {
|
|
71
67
|
if (!("id" in schemaModel)) {
|
|
@@ -73,7 +69,7 @@ const drizzleAdapter = (db, config) => index.createAdapter({
|
|
|
73
69
|
`The model "${model}" does not have an "id" field. Please use the "id" field as your primary key.`
|
|
74
70
|
);
|
|
75
71
|
}
|
|
76
|
-
const res = await
|
|
72
|
+
const res = await db2.select().from(schemaModel).orderBy(drizzleOrm.desc(schemaModel.id)).limit(1).execute();
|
|
77
73
|
return res[0];
|
|
78
74
|
}
|
|
79
75
|
};
|
|
@@ -188,14 +184,14 @@ const drizzleAdapter = (db, config) => index.createAdapter({
|
|
|
188
184
|
async create({ model, data: values }) {
|
|
189
185
|
const schemaModel = getSchema(model);
|
|
190
186
|
checkMissingFields(schemaModel, model, values);
|
|
191
|
-
const builder =
|
|
187
|
+
const builder = db2.insert(schemaModel).values(values);
|
|
192
188
|
const returned = await withReturning(model, builder, values);
|
|
193
189
|
return returned;
|
|
194
190
|
},
|
|
195
191
|
async findOne({ model, where }) {
|
|
196
192
|
const schemaModel = getSchema(model);
|
|
197
193
|
const clause = convertWhereClause(where, model);
|
|
198
|
-
const res = await
|
|
194
|
+
const res = await db2.select().from(schemaModel).where(...clause);
|
|
199
195
|
if (!res.length) return null;
|
|
200
196
|
return res[0];
|
|
201
197
|
},
|
|
@@ -203,7 +199,7 @@ const drizzleAdapter = (db, config) => index.createAdapter({
|
|
|
203
199
|
const schemaModel = getSchema(model);
|
|
204
200
|
const clause = where ? convertWhereClause(where, model) : [];
|
|
205
201
|
const sortFn = sortBy?.direction === "desc" ? drizzleOrm.desc : drizzleOrm.asc;
|
|
206
|
-
const builder =
|
|
202
|
+
const builder = db2.select().from(schemaModel).limit(limit || 100).offset(offset || 0);
|
|
207
203
|
if (sortBy?.field) {
|
|
208
204
|
builder.orderBy(
|
|
209
205
|
sortFn(
|
|
@@ -216,36 +212,58 @@ const drizzleAdapter = (db, config) => index.createAdapter({
|
|
|
216
212
|
async count({ model, where }) {
|
|
217
213
|
const schemaModel = getSchema(model);
|
|
218
214
|
const clause = where ? convertWhereClause(where, model) : [];
|
|
219
|
-
const res = await
|
|
215
|
+
const res = await db2.select({ count: drizzleOrm.count() }).from(schemaModel).where(...clause);
|
|
220
216
|
return res[0].count;
|
|
221
217
|
},
|
|
222
218
|
async update({ model, where, update: values }) {
|
|
223
219
|
const schemaModel = getSchema(model);
|
|
224
220
|
const clause = convertWhereClause(where, model);
|
|
225
|
-
const builder =
|
|
221
|
+
const builder = db2.update(schemaModel).set(values).where(...clause);
|
|
226
222
|
return await withReturning(model, builder, values, where);
|
|
227
223
|
},
|
|
228
224
|
async updateMany({ model, where, update: values }) {
|
|
229
225
|
const schemaModel = getSchema(model);
|
|
230
226
|
const clause = convertWhereClause(where, model);
|
|
231
|
-
const builder =
|
|
227
|
+
const builder = db2.update(schemaModel).set(values).where(...clause);
|
|
232
228
|
return await builder;
|
|
233
229
|
},
|
|
234
230
|
async delete({ model, where }) {
|
|
235
231
|
const schemaModel = getSchema(model);
|
|
236
232
|
const clause = convertWhereClause(where, model);
|
|
237
|
-
const builder =
|
|
233
|
+
const builder = db2.delete(schemaModel).where(...clause);
|
|
238
234
|
return await builder;
|
|
239
235
|
},
|
|
240
236
|
async deleteMany({ model, where }) {
|
|
241
237
|
const schemaModel = getSchema(model);
|
|
242
238
|
const clause = convertWhereClause(where, model);
|
|
243
|
-
const builder =
|
|
239
|
+
const builder = db2.delete(schemaModel).where(...clause);
|
|
244
240
|
return await builder;
|
|
245
241
|
},
|
|
246
242
|
options: config
|
|
247
243
|
};
|
|
248
|
-
}
|
|
249
|
-
|
|
244
|
+
};
|
|
245
|
+
let adapterOptions = null;
|
|
246
|
+
adapterOptions = {
|
|
247
|
+
config: {
|
|
248
|
+
adapterId: "drizzle",
|
|
249
|
+
adapterName: "Drizzle Adapter",
|
|
250
|
+
usePlural: config.usePlural ?? false,
|
|
251
|
+
debugLogs: config.debugLogs ?? false,
|
|
252
|
+
transaction: config.transaction ?? true ? (cb) => db.transaction((tx) => {
|
|
253
|
+
const adapter2 = index.createAdapter({
|
|
254
|
+
config: adapterOptions.config,
|
|
255
|
+
adapter: createCustomAdapter(tx)
|
|
256
|
+
})(lazyOptions);
|
|
257
|
+
return cb(adapter2);
|
|
258
|
+
}) : false
|
|
259
|
+
},
|
|
260
|
+
adapter: createCustomAdapter(db)
|
|
261
|
+
};
|
|
262
|
+
const adapter = index.createAdapter(adapterOptions);
|
|
263
|
+
return (options) => {
|
|
264
|
+
lazyOptions = options;
|
|
265
|
+
return adapter(options);
|
|
266
|
+
};
|
|
267
|
+
};
|
|
250
268
|
|
|
251
269
|
exports.drizzleAdapter = drizzleAdapter;
|
|
@@ -1,14 +1,13 @@
|
|
|
1
|
-
import { A as AdapterDebugLogs, B as BetterAuthOptions, a as Adapter } from '../../shared/better-auth.
|
|
2
|
-
import 'kysely';
|
|
3
|
-
import 'better-call';
|
|
4
|
-
import 'zod/v4';
|
|
5
|
-
import '../../shared/better-auth.DTtXpZYr.cjs';
|
|
6
|
-
import '../../shared/better-auth.BaMSx6K3.cjs';
|
|
7
|
-
import 'zod/v4/core';
|
|
1
|
+
import { A as AdapterDebugLogs, B as BetterAuthOptions, a as Adapter } from '../../shared/better-auth.Dvr1BSLI.cjs';
|
|
8
2
|
import 'zod';
|
|
3
|
+
import 'better-call';
|
|
9
4
|
import 'better-sqlite3';
|
|
10
5
|
import 'bun:sqlite';
|
|
6
|
+
import 'kysely';
|
|
11
7
|
import 'node:sqlite';
|
|
8
|
+
import '../../shared/better-auth.DTtXpZYr.cjs';
|
|
9
|
+
import '../../shared/better-auth.DhdDxivH.cjs';
|
|
10
|
+
import 'zod/v4/core';
|
|
12
11
|
|
|
13
12
|
interface DB {
|
|
14
13
|
[key: string]: any;
|
|
@@ -41,6 +40,14 @@ interface DrizzleAdapterConfig {
|
|
|
41
40
|
* @default false
|
|
42
41
|
*/
|
|
43
42
|
camelCase?: boolean;
|
|
43
|
+
/**
|
|
44
|
+
* Whether to execute multiple operations in a transaction.
|
|
45
|
+
*
|
|
46
|
+
* If the database doesn't support transactions,
|
|
47
|
+
* set this to `false` and operations will be executed sequentially.
|
|
48
|
+
* @default true
|
|
49
|
+
*/
|
|
50
|
+
transaction?: boolean;
|
|
44
51
|
}
|
|
45
52
|
declare const drizzleAdapter: (db: DB, config: DrizzleAdapterConfig) => (options: BetterAuthOptions) => Adapter;
|
|
46
53
|
|
|
@@ -1,14 +1,13 @@
|
|
|
1
|
-
import { A as AdapterDebugLogs, B as BetterAuthOptions, a as Adapter } from '../../shared/better-auth.
|
|
2
|
-
import 'kysely';
|
|
3
|
-
import 'better-call';
|
|
4
|
-
import 'zod/v4';
|
|
5
|
-
import '../../shared/better-auth.DTtXpZYr.mjs';
|
|
6
|
-
import '../../shared/better-auth.DR57bygo.mjs';
|
|
7
|
-
import 'zod/v4/core';
|
|
1
|
+
import { A as AdapterDebugLogs, B as BetterAuthOptions, a as Adapter } from '../../shared/better-auth.CFvgYmbH.mjs';
|
|
8
2
|
import 'zod';
|
|
3
|
+
import 'better-call';
|
|
9
4
|
import 'better-sqlite3';
|
|
10
5
|
import 'bun:sqlite';
|
|
6
|
+
import 'kysely';
|
|
11
7
|
import 'node:sqlite';
|
|
8
|
+
import '../../shared/better-auth.DTtXpZYr.mjs';
|
|
9
|
+
import '../../shared/better-auth.BHqN3Ecq.mjs';
|
|
10
|
+
import 'zod/v4/core';
|
|
12
11
|
|
|
13
12
|
interface DB {
|
|
14
13
|
[key: string]: any;
|
|
@@ -41,6 +40,14 @@ interface DrizzleAdapterConfig {
|
|
|
41
40
|
* @default false
|
|
42
41
|
*/
|
|
43
42
|
camelCase?: boolean;
|
|
43
|
+
/**
|
|
44
|
+
* Whether to execute multiple operations in a transaction.
|
|
45
|
+
*
|
|
46
|
+
* If the database doesn't support transactions,
|
|
47
|
+
* set this to `false` and operations will be executed sequentially.
|
|
48
|
+
* @default true
|
|
49
|
+
*/
|
|
50
|
+
transaction?: boolean;
|
|
44
51
|
}
|
|
45
52
|
declare const drizzleAdapter: (db: DB, config: DrizzleAdapterConfig) => (options: BetterAuthOptions) => Adapter;
|
|
46
53
|
|
|
@@ -1,14 +1,13 @@
|
|
|
1
|
-
import { A as AdapterDebugLogs, B as BetterAuthOptions, a as Adapter } from '../../shared/better-auth.
|
|
2
|
-
import 'kysely';
|
|
3
|
-
import 'better-call';
|
|
4
|
-
import 'zod/v4';
|
|
5
|
-
import '../../shared/better-auth.DTtXpZYr.js';
|
|
6
|
-
import '../../shared/better-auth.B5FL4Q2B.js';
|
|
7
|
-
import 'zod/v4/core';
|
|
1
|
+
import { A as AdapterDebugLogs, B as BetterAuthOptions, a as Adapter } from '../../shared/better-auth.BtAaeROk.js';
|
|
8
2
|
import 'zod';
|
|
3
|
+
import 'better-call';
|
|
9
4
|
import 'better-sqlite3';
|
|
10
5
|
import 'bun:sqlite';
|
|
6
|
+
import 'kysely';
|
|
11
7
|
import 'node:sqlite';
|
|
8
|
+
import '../../shared/better-auth.DTtXpZYr.js';
|
|
9
|
+
import '../../shared/better-auth.B2AIpsP8.js';
|
|
10
|
+
import 'zod/v4/core';
|
|
12
11
|
|
|
13
12
|
interface DB {
|
|
14
13
|
[key: string]: any;
|
|
@@ -41,6 +40,14 @@ interface DrizzleAdapterConfig {
|
|
|
41
40
|
* @default false
|
|
42
41
|
*/
|
|
43
42
|
camelCase?: boolean;
|
|
43
|
+
/**
|
|
44
|
+
* Whether to execute multiple operations in a transaction.
|
|
45
|
+
*
|
|
46
|
+
* If the database doesn't support transactions,
|
|
47
|
+
* set this to `false` and operations will be executed sequentially.
|
|
48
|
+
* @default true
|
|
49
|
+
*/
|
|
50
|
+
transaction?: boolean;
|
|
44
51
|
}
|
|
45
52
|
declare const drizzleAdapter: (db: DB, config: DrizzleAdapterConfig) => (options: BetterAuthOptions) => Adapter;
|
|
46
53
|
|
|
@@ -1,12 +1,13 @@
|
|
|
1
|
-
import { count, desc, asc,
|
|
1
|
+
import { count, desc, asc, inArray, notInArray, like, lt, lte, ne, gt, gte, eq, and, or, sql } from 'drizzle-orm';
|
|
2
2
|
import { B as BetterAuthError } from '../../shared/better-auth.DdzSJf-n.mjs';
|
|
3
|
-
import { c as createAdapter } from '../../shared/better-auth.
|
|
4
|
-
import '../../shared/better-auth.
|
|
5
|
-
import '../../shared/better-auth.
|
|
6
|
-
import '../../shared/better-auth.
|
|
3
|
+
import { c as createAdapter } from '../../shared/better-auth.DR23L78Y.mjs';
|
|
4
|
+
import '../../shared/better-auth.CvNZNAOW.mjs';
|
|
5
|
+
import '../../shared/better-auth.C4g12FAA.mjs';
|
|
6
|
+
import '../../shared/better-auth.CiuwFiHM.mjs';
|
|
7
|
+
import '../../shared/better-auth.Cjw1GDsh.mjs';
|
|
7
8
|
import '../../shared/better-auth.BUPPRXfK.mjs';
|
|
8
9
|
import '@better-auth/utils/random';
|
|
9
|
-
import 'zod
|
|
10
|
+
import 'zod';
|
|
10
11
|
import 'better-call';
|
|
11
12
|
import '@better-auth/utils/hash';
|
|
12
13
|
import '@noble/ciphers/chacha.js';
|
|
@@ -19,16 +20,11 @@ import '@better-auth/utils/hex';
|
|
|
19
20
|
import '@noble/hashes/utils.js';
|
|
20
21
|
import '../../shared/better-auth.B4Qoxdgc.mjs';
|
|
21
22
|
|
|
22
|
-
const drizzleAdapter = (db, config) =>
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
adapterName: "Drizzle Adapter",
|
|
26
|
-
usePlural: config.usePlural ?? false,
|
|
27
|
-
debugLogs: config.debugLogs ?? false
|
|
28
|
-
},
|
|
29
|
-
adapter: ({ getFieldName, debugLog }) => {
|
|
23
|
+
const drizzleAdapter = (db, config) => {
|
|
24
|
+
let lazyOptions = null;
|
|
25
|
+
const createCustomAdapter = (db2) => ({ getFieldName, debugLog }) => {
|
|
30
26
|
function getSchema(model) {
|
|
31
|
-
const schema = config.schema ||
|
|
27
|
+
const schema = config.schema || db2._.fullSchema;
|
|
32
28
|
if (!schema) {
|
|
33
29
|
throw new BetterAuthError(
|
|
34
30
|
"Drizzle adapter failed to initialize. Schema not found. Please provide a schema object in the adapter options object."
|
|
@@ -52,18 +48,18 @@ const drizzleAdapter = (db, config) => createAdapter({
|
|
|
52
48
|
const builderVal = builder.config?.values;
|
|
53
49
|
if (where?.length) {
|
|
54
50
|
const clause = convertWhereClause(where, model);
|
|
55
|
-
const res = await
|
|
51
|
+
const res = await db2.select().from(schemaModel).where(...clause);
|
|
56
52
|
return res[0];
|
|
57
53
|
} else if (builderVal && builderVal[0]?.id?.value) {
|
|
58
54
|
let tId = builderVal[0]?.id?.value;
|
|
59
55
|
if (!tId) {
|
|
60
|
-
const lastInsertId = await
|
|
56
|
+
const lastInsertId = await db2.select({ id: sql`LAST_INSERT_ID()` }).from(schemaModel).orderBy(desc(schemaModel.id)).limit(1);
|
|
61
57
|
tId = lastInsertId[0].id;
|
|
62
58
|
}
|
|
63
|
-
const res = await
|
|
59
|
+
const res = await db2.select().from(schemaModel).where(eq(schemaModel.id, tId)).limit(1).execute();
|
|
64
60
|
return res[0];
|
|
65
61
|
} else if (data.id) {
|
|
66
|
-
const res = await
|
|
62
|
+
const res = await db2.select().from(schemaModel).where(eq(schemaModel.id, data.id)).limit(1).execute();
|
|
67
63
|
return res[0];
|
|
68
64
|
} else {
|
|
69
65
|
if (!("id" in schemaModel)) {
|
|
@@ -71,7 +67,7 @@ const drizzleAdapter = (db, config) => createAdapter({
|
|
|
71
67
|
`The model "${model}" does not have an "id" field. Please use the "id" field as your primary key.`
|
|
72
68
|
);
|
|
73
69
|
}
|
|
74
|
-
const res = await
|
|
70
|
+
const res = await db2.select().from(schemaModel).orderBy(desc(schemaModel.id)).limit(1).execute();
|
|
75
71
|
return res[0];
|
|
76
72
|
}
|
|
77
73
|
};
|
|
@@ -186,14 +182,14 @@ const drizzleAdapter = (db, config) => createAdapter({
|
|
|
186
182
|
async create({ model, data: values }) {
|
|
187
183
|
const schemaModel = getSchema(model);
|
|
188
184
|
checkMissingFields(schemaModel, model, values);
|
|
189
|
-
const builder =
|
|
185
|
+
const builder = db2.insert(schemaModel).values(values);
|
|
190
186
|
const returned = await withReturning(model, builder, values);
|
|
191
187
|
return returned;
|
|
192
188
|
},
|
|
193
189
|
async findOne({ model, where }) {
|
|
194
190
|
const schemaModel = getSchema(model);
|
|
195
191
|
const clause = convertWhereClause(where, model);
|
|
196
|
-
const res = await
|
|
192
|
+
const res = await db2.select().from(schemaModel).where(...clause);
|
|
197
193
|
if (!res.length) return null;
|
|
198
194
|
return res[0];
|
|
199
195
|
},
|
|
@@ -201,7 +197,7 @@ const drizzleAdapter = (db, config) => createAdapter({
|
|
|
201
197
|
const schemaModel = getSchema(model);
|
|
202
198
|
const clause = where ? convertWhereClause(where, model) : [];
|
|
203
199
|
const sortFn = sortBy?.direction === "desc" ? desc : asc;
|
|
204
|
-
const builder =
|
|
200
|
+
const builder = db2.select().from(schemaModel).limit(limit || 100).offset(offset || 0);
|
|
205
201
|
if (sortBy?.field) {
|
|
206
202
|
builder.orderBy(
|
|
207
203
|
sortFn(
|
|
@@ -214,36 +210,58 @@ const drizzleAdapter = (db, config) => createAdapter({
|
|
|
214
210
|
async count({ model, where }) {
|
|
215
211
|
const schemaModel = getSchema(model);
|
|
216
212
|
const clause = where ? convertWhereClause(where, model) : [];
|
|
217
|
-
const res = await
|
|
213
|
+
const res = await db2.select({ count: count() }).from(schemaModel).where(...clause);
|
|
218
214
|
return res[0].count;
|
|
219
215
|
},
|
|
220
216
|
async update({ model, where, update: values }) {
|
|
221
217
|
const schemaModel = getSchema(model);
|
|
222
218
|
const clause = convertWhereClause(where, model);
|
|
223
|
-
const builder =
|
|
219
|
+
const builder = db2.update(schemaModel).set(values).where(...clause);
|
|
224
220
|
return await withReturning(model, builder, values, where);
|
|
225
221
|
},
|
|
226
222
|
async updateMany({ model, where, update: values }) {
|
|
227
223
|
const schemaModel = getSchema(model);
|
|
228
224
|
const clause = convertWhereClause(where, model);
|
|
229
|
-
const builder =
|
|
225
|
+
const builder = db2.update(schemaModel).set(values).where(...clause);
|
|
230
226
|
return await builder;
|
|
231
227
|
},
|
|
232
228
|
async delete({ model, where }) {
|
|
233
229
|
const schemaModel = getSchema(model);
|
|
234
230
|
const clause = convertWhereClause(where, model);
|
|
235
|
-
const builder =
|
|
231
|
+
const builder = db2.delete(schemaModel).where(...clause);
|
|
236
232
|
return await builder;
|
|
237
233
|
},
|
|
238
234
|
async deleteMany({ model, where }) {
|
|
239
235
|
const schemaModel = getSchema(model);
|
|
240
236
|
const clause = convertWhereClause(where, model);
|
|
241
|
-
const builder =
|
|
237
|
+
const builder = db2.delete(schemaModel).where(...clause);
|
|
242
238
|
return await builder;
|
|
243
239
|
},
|
|
244
240
|
options: config
|
|
245
241
|
};
|
|
246
|
-
}
|
|
247
|
-
|
|
242
|
+
};
|
|
243
|
+
let adapterOptions = null;
|
|
244
|
+
adapterOptions = {
|
|
245
|
+
config: {
|
|
246
|
+
adapterId: "drizzle",
|
|
247
|
+
adapterName: "Drizzle Adapter",
|
|
248
|
+
usePlural: config.usePlural ?? false,
|
|
249
|
+
debugLogs: config.debugLogs ?? false,
|
|
250
|
+
transaction: config.transaction ?? true ? (cb) => db.transaction((tx) => {
|
|
251
|
+
const adapter2 = createAdapter({
|
|
252
|
+
config: adapterOptions.config,
|
|
253
|
+
adapter: createCustomAdapter(tx)
|
|
254
|
+
})(lazyOptions);
|
|
255
|
+
return cb(adapter2);
|
|
256
|
+
}) : false
|
|
257
|
+
},
|
|
258
|
+
adapter: createCustomAdapter(db)
|
|
259
|
+
};
|
|
260
|
+
const adapter = createAdapter(adapterOptions);
|
|
261
|
+
return (options) => {
|
|
262
|
+
lazyOptions = options;
|
|
263
|
+
return adapter(options);
|
|
264
|
+
};
|
|
265
|
+
};
|
|
248
266
|
|
|
249
267
|
export { drizzleAdapter };
|
package/dist/adapters/index.cjs
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
const index = require('../shared/better-auth.
|
|
4
|
-
require('../shared/better-auth.
|
|
5
|
-
require('../shared/better-auth.
|
|
6
|
-
require('../shared/better-auth.
|
|
3
|
+
const index = require('../shared/better-auth.6YoZ6q0o.cjs');
|
|
4
|
+
require('../shared/better-auth.DgMx7bVs.cjs');
|
|
5
|
+
require('../shared/better-auth.DTvRBuq4.cjs');
|
|
6
|
+
require('../shared/better-auth.B6fIklBU.cjs');
|
|
7
|
+
require('../shared/better-auth.DF_1VOmo.cjs');
|
|
7
8
|
require('../shared/better-auth.Bg6iw3ig.cjs');
|
|
8
9
|
require('@better-auth/utils/random');
|
|
9
|
-
require('zod
|
|
10
|
+
require('zod');
|
|
10
11
|
require('better-call');
|
|
11
12
|
require('@better-auth/utils/hash');
|
|
12
13
|
require('@noble/ciphers/chacha.js');
|
|
@@ -1,19 +1,15 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export { A as AdapterDebugLogs,
|
|
3
|
-
import 'kysely';
|
|
4
|
-
import 'better-call';
|
|
5
|
-
import 'zod/v4';
|
|
6
|
-
import '../shared/better-auth.DTtXpZYr.cjs';
|
|
7
|
-
import '../shared/better-auth.BaMSx6K3.cjs';
|
|
8
|
-
import 'zod/v4/core';
|
|
1
|
+
import { C as CreateAdapterOptions, B as BetterAuthOptions, a as Adapter } from '../shared/better-auth.Dvr1BSLI.cjs';
|
|
2
|
+
export { b as AdapterConfig, A as AdapterDebugLogs, f as AdapterTestDebugLogs, e as CleanedWhere, c as CreateCustomAdapter, d as CustomAdapter } from '../shared/better-auth.Dvr1BSLI.cjs';
|
|
9
3
|
import 'zod';
|
|
4
|
+
import 'better-call';
|
|
10
5
|
import 'better-sqlite3';
|
|
11
6
|
import 'bun:sqlite';
|
|
7
|
+
import 'kysely';
|
|
12
8
|
import 'node:sqlite';
|
|
9
|
+
import '../shared/better-auth.DTtXpZYr.cjs';
|
|
10
|
+
import '../shared/better-auth.DhdDxivH.cjs';
|
|
11
|
+
import 'zod/v4/core';
|
|
13
12
|
|
|
14
|
-
declare const createAdapter: ({ adapter, config: cfg
|
|
15
|
-
config: AdapterConfig;
|
|
16
|
-
adapter: CreateCustomAdapter;
|
|
17
|
-
}) => (options: BetterAuthOptions) => Adapter;
|
|
13
|
+
declare const createAdapter: ({ adapter: customAdapter, config: cfg }: CreateAdapterOptions) => (options: BetterAuthOptions) => Adapter;
|
|
18
14
|
|
|
19
|
-
export {
|
|
15
|
+
export { CreateAdapterOptions, createAdapter };
|
|
@@ -1,19 +1,15 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export { A as AdapterDebugLogs,
|
|
3
|
-
import 'kysely';
|
|
4
|
-
import 'better-call';
|
|
5
|
-
import 'zod/v4';
|
|
6
|
-
import '../shared/better-auth.DTtXpZYr.mjs';
|
|
7
|
-
import '../shared/better-auth.DR57bygo.mjs';
|
|
8
|
-
import 'zod/v4/core';
|
|
1
|
+
import { C as CreateAdapterOptions, B as BetterAuthOptions, a as Adapter } from '../shared/better-auth.CFvgYmbH.mjs';
|
|
2
|
+
export { b as AdapterConfig, A as AdapterDebugLogs, f as AdapterTestDebugLogs, e as CleanedWhere, c as CreateCustomAdapter, d as CustomAdapter } from '../shared/better-auth.CFvgYmbH.mjs';
|
|
9
3
|
import 'zod';
|
|
4
|
+
import 'better-call';
|
|
10
5
|
import 'better-sqlite3';
|
|
11
6
|
import 'bun:sqlite';
|
|
7
|
+
import 'kysely';
|
|
12
8
|
import 'node:sqlite';
|
|
9
|
+
import '../shared/better-auth.DTtXpZYr.mjs';
|
|
10
|
+
import '../shared/better-auth.BHqN3Ecq.mjs';
|
|
11
|
+
import 'zod/v4/core';
|
|
13
12
|
|
|
14
|
-
declare const createAdapter: ({ adapter, config: cfg
|
|
15
|
-
config: AdapterConfig;
|
|
16
|
-
adapter: CreateCustomAdapter;
|
|
17
|
-
}) => (options: BetterAuthOptions) => Adapter;
|
|
13
|
+
declare const createAdapter: ({ adapter: customAdapter, config: cfg }: CreateAdapterOptions) => (options: BetterAuthOptions) => Adapter;
|
|
18
14
|
|
|
19
|
-
export {
|
|
15
|
+
export { CreateAdapterOptions, createAdapter };
|
package/dist/adapters/index.d.ts
CHANGED
|
@@ -1,19 +1,15 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export { A as AdapterDebugLogs,
|
|
3
|
-
import 'kysely';
|
|
4
|
-
import 'better-call';
|
|
5
|
-
import 'zod/v4';
|
|
6
|
-
import '../shared/better-auth.DTtXpZYr.js';
|
|
7
|
-
import '../shared/better-auth.B5FL4Q2B.js';
|
|
8
|
-
import 'zod/v4/core';
|
|
1
|
+
import { C as CreateAdapterOptions, B as BetterAuthOptions, a as Adapter } from '../shared/better-auth.BtAaeROk.js';
|
|
2
|
+
export { b as AdapterConfig, A as AdapterDebugLogs, f as AdapterTestDebugLogs, e as CleanedWhere, c as CreateCustomAdapter, d as CustomAdapter } from '../shared/better-auth.BtAaeROk.js';
|
|
9
3
|
import 'zod';
|
|
4
|
+
import 'better-call';
|
|
10
5
|
import 'better-sqlite3';
|
|
11
6
|
import 'bun:sqlite';
|
|
7
|
+
import 'kysely';
|
|
12
8
|
import 'node:sqlite';
|
|
9
|
+
import '../shared/better-auth.DTtXpZYr.js';
|
|
10
|
+
import '../shared/better-auth.B2AIpsP8.js';
|
|
11
|
+
import 'zod/v4/core';
|
|
13
12
|
|
|
14
|
-
declare const createAdapter: ({ adapter, config: cfg
|
|
15
|
-
config: AdapterConfig;
|
|
16
|
-
adapter: CreateCustomAdapter;
|
|
17
|
-
}) => (options: BetterAuthOptions) => Adapter;
|
|
13
|
+
declare const createAdapter: ({ adapter: customAdapter, config: cfg }: CreateAdapterOptions) => (options: BetterAuthOptions) => Adapter;
|
|
18
14
|
|
|
19
|
-
export {
|
|
15
|
+
export { CreateAdapterOptions, createAdapter };
|
package/dist/adapters/index.mjs
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
export { c as createAdapter } from '../shared/better-auth.
|
|
2
|
-
import '../shared/better-auth.
|
|
3
|
-
import '../shared/better-auth.
|
|
4
|
-
import '../shared/better-auth.
|
|
1
|
+
export { c as createAdapter } from '../shared/better-auth.DR23L78Y.mjs';
|
|
2
|
+
import '../shared/better-auth.CvNZNAOW.mjs';
|
|
3
|
+
import '../shared/better-auth.C4g12FAA.mjs';
|
|
4
|
+
import '../shared/better-auth.CiuwFiHM.mjs';
|
|
5
|
+
import '../shared/better-auth.Cjw1GDsh.mjs';
|
|
5
6
|
import '../shared/better-auth.BUPPRXfK.mjs';
|
|
6
7
|
import '@better-auth/utils/random';
|
|
7
|
-
import 'zod
|
|
8
|
+
import 'zod';
|
|
8
9
|
import 'better-call';
|
|
9
10
|
import '@better-auth/utils/hash';
|
|
10
11
|
import '@noble/ciphers/chacha.js';
|
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
const kyselyAdapter = require('../../shared/better-auth.
|
|
3
|
+
const kyselyAdapter = require('../../shared/better-auth.BFuRqFpJ.cjs');
|
|
4
4
|
require('kysely');
|
|
5
|
-
require('../../shared/better-auth.
|
|
6
|
-
require('../../shared/better-auth.
|
|
7
|
-
require('../../shared/better-auth.
|
|
8
|
-
require('../../shared/better-auth.
|
|
5
|
+
require('../../shared/better-auth.6YoZ6q0o.cjs');
|
|
6
|
+
require('../../shared/better-auth.DgMx7bVs.cjs');
|
|
7
|
+
require('../../shared/better-auth.DTvRBuq4.cjs');
|
|
8
|
+
require('../../shared/better-auth.B6fIklBU.cjs');
|
|
9
|
+
require('../../shared/better-auth.DF_1VOmo.cjs');
|
|
9
10
|
require('../../shared/better-auth.Bg6iw3ig.cjs');
|
|
10
11
|
require('@better-auth/utils/random');
|
|
11
|
-
require('zod
|
|
12
|
+
require('zod');
|
|
12
13
|
require('better-call');
|
|
13
14
|
require('@better-auth/utils/hash');
|
|
14
15
|
require('@noble/ciphers/chacha.js');
|
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
import { Kysely } from 'kysely';
|
|
2
|
-
import { B as BetterAuthOptions, K as KyselyDatabaseType, A as AdapterDebugLogs, a as Adapter } from '../../shared/better-auth.
|
|
3
|
-
import 'better-call';
|
|
4
|
-
import 'zod/v4';
|
|
5
|
-
import '../../shared/better-auth.DTtXpZYr.cjs';
|
|
6
|
-
import '../../shared/better-auth.BaMSx6K3.cjs';
|
|
7
|
-
import 'zod/v4/core';
|
|
2
|
+
import { B as BetterAuthOptions, K as KyselyDatabaseType, A as AdapterDebugLogs, a as Adapter } from '../../shared/better-auth.Dvr1BSLI.cjs';
|
|
8
3
|
import 'zod';
|
|
4
|
+
import 'better-call';
|
|
9
5
|
import 'better-sqlite3';
|
|
10
6
|
import 'bun:sqlite';
|
|
11
7
|
import 'node:sqlite';
|
|
8
|
+
import '../../shared/better-auth.DTtXpZYr.cjs';
|
|
9
|
+
import '../../shared/better-auth.DhdDxivH.cjs';
|
|
10
|
+
import 'zod/v4/core';
|
|
12
11
|
|
|
13
12
|
declare function getKyselyDatabaseType(db: BetterAuthOptions["database"]): KyselyDatabaseType | null;
|
|
14
13
|
declare const createKyselyAdapter: (config: BetterAuthOptions) => Promise<{
|
|
@@ -33,6 +32,14 @@ interface KyselyAdapterConfig {
|
|
|
33
32
|
* @default false
|
|
34
33
|
*/
|
|
35
34
|
usePlural?: boolean;
|
|
35
|
+
/**
|
|
36
|
+
* Whether to execute multiple operations in a transaction.
|
|
37
|
+
*
|
|
38
|
+
* If the database doesn't support transactions,
|
|
39
|
+
* set this to `false` and operations will be executed sequentially.
|
|
40
|
+
* @default true
|
|
41
|
+
*/
|
|
42
|
+
transaction?: boolean;
|
|
36
43
|
}
|
|
37
44
|
declare const kyselyAdapter: (db: Kysely<any>, config?: KyselyAdapterConfig) => (options: BetterAuthOptions) => Adapter;
|
|
38
45
|
|
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
import { Kysely } from 'kysely';
|
|
2
|
-
import { B as BetterAuthOptions, K as KyselyDatabaseType, A as AdapterDebugLogs, a as Adapter } from '../../shared/better-auth.
|
|
3
|
-
import 'better-call';
|
|
4
|
-
import 'zod/v4';
|
|
5
|
-
import '../../shared/better-auth.DTtXpZYr.mjs';
|
|
6
|
-
import '../../shared/better-auth.DR57bygo.mjs';
|
|
7
|
-
import 'zod/v4/core';
|
|
2
|
+
import { B as BetterAuthOptions, K as KyselyDatabaseType, A as AdapterDebugLogs, a as Adapter } from '../../shared/better-auth.CFvgYmbH.mjs';
|
|
8
3
|
import 'zod';
|
|
4
|
+
import 'better-call';
|
|
9
5
|
import 'better-sqlite3';
|
|
10
6
|
import 'bun:sqlite';
|
|
11
7
|
import 'node:sqlite';
|
|
8
|
+
import '../../shared/better-auth.DTtXpZYr.mjs';
|
|
9
|
+
import '../../shared/better-auth.BHqN3Ecq.mjs';
|
|
10
|
+
import 'zod/v4/core';
|
|
12
11
|
|
|
13
12
|
declare function getKyselyDatabaseType(db: BetterAuthOptions["database"]): KyselyDatabaseType | null;
|
|
14
13
|
declare const createKyselyAdapter: (config: BetterAuthOptions) => Promise<{
|
|
@@ -33,6 +32,14 @@ interface KyselyAdapterConfig {
|
|
|
33
32
|
* @default false
|
|
34
33
|
*/
|
|
35
34
|
usePlural?: boolean;
|
|
35
|
+
/**
|
|
36
|
+
* Whether to execute multiple operations in a transaction.
|
|
37
|
+
*
|
|
38
|
+
* If the database doesn't support transactions,
|
|
39
|
+
* set this to `false` and operations will be executed sequentially.
|
|
40
|
+
* @default true
|
|
41
|
+
*/
|
|
42
|
+
transaction?: boolean;
|
|
36
43
|
}
|
|
37
44
|
declare const kyselyAdapter: (db: Kysely<any>, config?: KyselyAdapterConfig) => (options: BetterAuthOptions) => Adapter;
|
|
38
45
|
|