better-auth 1.4.0-beta.13 → 1.4.0-beta.15
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/README.md +1 -1
- package/dist/{access-CMKBGgPM.cjs → access-BEhlHupZ.cjs} +1 -1
- package/dist/{access-C85goQpj.cjs → access-C7E6cTL4.cjs} +1 -1
- package/dist/{access-CiYP7qc2.js → access-CgamBNNQ.js} +1 -1
- package/dist/{access-DzjK1clY.js → access-DLZwpgWe.js} +1 -1
- package/dist/{adapter-factory-KQnbXzIu.js → adapter-factory-C4zrRt2K.js} +6 -7
- package/dist/{adapter-factory-CaEezC7-.cjs → adapter-factory-D7FKzFTi.cjs} +6 -7
- package/dist/adapters/drizzle-adapter/index.cjs +6 -5
- package/dist/adapters/drizzle-adapter/index.d.cts +5 -5
- package/dist/adapters/drizzle-adapter/index.d.ts +5 -5
- package/dist/adapters/drizzle-adapter/index.js +6 -5
- package/dist/adapters/index.cjs +6 -5
- package/dist/adapters/index.d.cts +7 -7
- package/dist/adapters/index.d.ts +9 -9
- package/dist/adapters/index.js +6 -5
- package/dist/adapters/kysely-adapter/index.cjs +7 -6
- package/dist/adapters/kysely-adapter/index.d.cts +5 -5
- package/dist/adapters/kysely-adapter/index.d.ts +6 -6
- package/dist/adapters/kysely-adapter/index.js +7 -6
- package/dist/adapters/memory-adapter/index.cjs +7 -6
- package/dist/adapters/memory-adapter/index.d.cts +3 -3
- package/dist/adapters/memory-adapter/index.d.ts +3 -3
- package/dist/adapters/memory-adapter/index.js +7 -6
- package/dist/adapters/mongodb-adapter/index.cjs +7 -6
- package/dist/adapters/mongodb-adapter/index.d.cts +5 -5
- package/dist/adapters/mongodb-adapter/index.d.ts +5 -5
- package/dist/adapters/mongodb-adapter/index.js +7 -6
- package/dist/adapters/prisma-adapter/index.cjs +6 -5
- package/dist/adapters/prisma-adapter/index.d.cts +3 -3
- package/dist/adapters/prisma-adapter/index.d.ts +3 -3
- package/dist/adapters/prisma-adapter/index.js +6 -5
- package/dist/adapters/test.cjs +4 -3
- package/dist/adapters/test.js +4 -3
- package/dist/{admin-Bm4YWSyK.cjs → admin-B0mwXWqU.cjs} +13 -11
- package/dist/{admin-DUGV_VcG.d.cts → admin-BF6OMdGy.d.cts} +76 -76
- package/dist/{admin-Bv_87xle.js → admin-BTzNtVei.js} +10 -8
- package/dist/{admin-CZqCaWVS.d.ts → admin-DYr8mGMK.d.ts} +47 -47
- package/dist/{anonymous-GeIs8dX-.js → anonymous-3gIFUdWE.js} +6 -6
- package/dist/{anonymous-CZt2hIgy.cjs → anonymous-CQSeTAsJ.cjs} +6 -6
- package/dist/api/index.cjs +15 -15
- package/dist/api/index.d.cts +3 -3
- package/dist/api/index.d.ts +5 -5
- package/dist/api/index.js +16 -15
- package/dist/{api-DxoCILgu.js → api-6Gh-v8xm.js} +1647 -1637
- package/dist/{api-D47Fl7g_.cjs → api-BGfXCsxG.cjs} +1649 -1639
- package/dist/{auth-nfiyF_s0.js → auth-CPdeGK4d.js} +24 -11
- package/dist/{auth-DOcOyyAO.cjs → auth-DQgaXk78.cjs} +25 -12
- package/dist/{bearer-Dbv3s-Ey.cjs → bearer-8fxr0Vrv.cjs} +1 -1
- package/dist/{bearer-yOkphqTA.js → bearer-CKwCx0Ys.js} +1 -1
- package/dist/{captcha-Cu5L5AI9.cjs → captcha-B6SAesoe.cjs} +31 -31
- package/dist/{captcha-DMvJpJ_i.js → captcha-Bi_qvqJM.js} +31 -31
- package/dist/client/index.cjs +8 -6
- package/dist/client/index.d.cts +67 -37
- package/dist/client/index.d.ts +53 -23
- package/dist/client/index.js +7 -7
- package/dist/client/lynx/index.cjs +3 -3
- package/dist/client/lynx/index.d.cts +24 -24
- package/dist/client/lynx/index.d.ts +26 -26
- package/dist/client/lynx/index.js +3 -3
- package/dist/client/plugins/index.cjs +351 -363
- package/dist/client/plugins/index.d.cts +1596 -1616
- package/dist/client/plugins/index.d.ts +475 -478
- package/dist/client/plugins/index.js +346 -358
- package/dist/client/react/index.cjs +3 -3
- package/dist/client/react/index.d.cts +24 -24
- package/dist/client/react/index.d.ts +26 -26
- package/dist/client/react/index.js +3 -3
- package/dist/client/solid/index.cjs +6 -6
- package/dist/client/solid/index.d.cts +17 -17
- package/dist/client/solid/index.d.ts +19 -19
- package/dist/client/solid/index.js +5 -5
- package/dist/client/svelte/index.cjs +4 -4
- package/dist/client/svelte/index.d.cts +20 -20
- package/dist/client/svelte/index.d.ts +20 -20
- package/dist/client/svelte/index.js +4 -4
- package/dist/client/vue/index.cjs +5 -5
- package/dist/client/vue/index.d.cts +21 -21
- package/dist/client/vue/index.d.ts +7 -7
- package/dist/client/vue/index.js +5 -5
- package/dist/{client-tn91AMhb.d.ts → client-D2fd_ySm.d.ts} +14 -14
- package/dist/{client-BuCPepf7.d.cts → client-Df4BjPAg.d.cts} +14 -14
- package/dist/{client-CHNR12_D.d.cts → client-Du0PAan5.d.cts} +70 -70
- package/dist/{client-CmCcVw0X.d.ts → client-P2tgFSW-.d.ts} +71 -71
- package/dist/cookies/index.cjs +7 -4
- package/dist/cookies/index.d.cts +4 -4
- package/dist/cookies/index.d.ts +6 -6
- package/dist/cookies/index.js +6 -5
- package/dist/{cookies-C0ukzamv.cjs → cookies-B6gl9E6Z.cjs} +297 -28
- package/dist/{cookies-YIhGFT3t.js → cookies-CBcV_aA7.js} +277 -27
- package/dist/crypto/index.cjs +6 -2
- package/dist/crypto/index.d.cts +4 -1
- package/dist/crypto/index.d.ts +4 -1
- package/dist/crypto/index.js +3 -2
- package/dist/{crypto-Cm1LKxZK.js → crypto-CGcj9N1E.js} +4 -11
- package/dist/{crypto-GB8E2Sqo.cjs → crypto-DgMl-YEg.cjs} +6 -20
- package/dist/{custom-session-mzjgl4I0.js → custom-session-4TJwa0ps.js} +2 -2
- package/dist/{custom-session-Dq7kJpay.cjs → custom-session-BN-427vp.cjs} +2 -2
- package/dist/{schema-DVD_DMGr.js → date-BPjINFle.js} +13 -11
- package/dist/{schema-CZyco4Bb.cjs → date-utEdG8L8.cjs} +12 -10
- package/dist/db/index.cjs +20 -19
- package/dist/db/index.d.cts +2 -2
- package/dist/db/index.d.ts +4 -4
- package/dist/db/index.js +11 -10
- package/dist/{db-BvFyxQ2U.js → db-BRTGwZsa.js} +1066 -1069
- package/dist/{db-Dn17omQ4.cjs → db-DmlJvzsY.cjs} +1067 -1070
- package/dist/{device-authorization-Cn96X1mD.js → device-authorization-BuueMGYZ.js} +4 -4
- package/dist/{device-authorization-EOq-p6gT.cjs → device-authorization-DHFsD2aH.cjs} +5 -5
- package/dist/{email-otp-BJc23Pox.js → email-otp-CQ_utv14.js} +28 -30
- package/dist/{email-otp-Duy-8LZZ.cjs → email-otp-Cd-74e0P.cjs} +34 -35
- package/dist/{generic-oauth-B3I2Gf44.js → generic-oauth-BB9EdG6w.js} +5 -5
- package/dist/{generic-oauth-DFnrwFvM.cjs → generic-oauth-BiVIdp_U.cjs} +6 -6
- package/dist/{has-permission-CAhU7MOW.cjs → has-permission-BXnfxm8t.cjs} +1 -1
- package/dist/{has-permission-CFehLg5L.js → has-permission-D4Cw2FMS.js} +1 -1
- package/dist/{haveibeenpwned-BIwNylxL.js → haveibeenpwned-DurqczXF.js} +1 -1
- package/dist/{index-DgpmIAjL.d.cts → index--81PBOoZ.d.cts} +1 -1
- package/dist/{index-D47evZgv.d.cts → index-4zGHsckJ.d.cts} +24 -24
- package/dist/index-7gHShZt3.d.ts +113 -0
- package/dist/{index-B6kMPMVt.d.ts → index-9hLkyMei.d.ts} +15 -15
- package/dist/{index-gFOnZNib.d.ts → index-B-SnFEKa.d.cts} +1992 -2271
- package/dist/{index-Cg1CVzvT.d.ts → index-B2Ny-3GE.d.ts} +59 -59
- package/dist/{index-CvRBCe6q.d.ts → index-B55U6Ak-.d.ts} +47 -47
- package/dist/{index-B54rcdu6.d.ts → index-B7htH85S.d.ts} +24 -24
- package/dist/{index-B7uT04qq.d.ts → index-B84pNnEA.d.ts} +7 -7
- package/dist/{index-B9S3H-6J.d.ts → index-B85DGXi3.d.cts} +81 -82
- package/dist/{index-j5Hnm9IK.d.cts → index-B9k29p-B.d.cts} +2 -2
- package/dist/index-BP1R5jM5.d.ts +36 -0
- package/dist/{index-DgP_W74p.d.cts → index-BY_Dn8rS.d.cts} +11 -11
- package/dist/{index-C0pFvDmG.d.cts → index-BaTFWF0T.d.ts} +2100 -2379
- package/dist/{index-AFECof_v.d.cts → index-BiC8Bpe_.d.cts} +26 -28
- package/dist/{index--btdjysb.d.cts → index-BiL6fcXL.d.cts} +15 -15
- package/dist/{index-CwUQdVct.d.ts → index-BkaxKbzZ.d.ts} +4 -4
- package/dist/{index-RWNGvtOw.d.cts → index-BrUz7QlW.d.cts} +7 -7
- package/dist/{index-BGjDkvdo.d.cts → index-BsEIAwi8.d.cts} +1526 -1713
- package/dist/{index-CpXg4Juh.d.ts → index-BxgY7t4k.d.ts} +32 -32
- package/dist/{index-Cpy42W_d.d.cts → index-Bxl_yLTd.d.cts} +16 -17
- package/dist/{index-CMe7EykX.d.ts → index-C73W2jG7.d.ts} +15 -15
- package/dist/{index-Ch8HkJZj.d.cts → index-CCnhllmu.d.cts} +24 -24
- package/dist/{index-D6BVJs-h.d.ts → index-CHRHRD8F.d.ts} +5 -5
- package/dist/{index-C-z9Otzw.d.ts → index-CLIUb8-A.d.ts} +8 -8
- package/dist/{index-BPfW0EE8.d.cts → index-CNKyl0Pp.d.cts} +50 -50
- package/dist/{index-Cqz6miMA.d.ts → index-CRr_-9Dg.d.ts} +32 -32
- package/dist/{index-BKs8lAg_.d.cts → index-CSzuGp7U.d.cts} +12 -12
- package/dist/{index-DjXaaott.d.ts → index-CWI7sdP7.d.ts} +16 -17
- package/dist/{index-Dd1ffzzA.d.ts → index-CnZd1YZ_.d.ts} +13 -13
- package/dist/{index-Bk5OXyUg.d.cts → index-CqFQMp7E.d.cts} +3 -3
- package/dist/{index-DT_dYqYt.d.ts → index-CqhKt6bv.d.ts} +12 -12
- package/dist/{index-7IFEqRAp.d.ts → index-DB5KbGvG.d.ts} +21 -21
- package/dist/{index-D_CyR6xm.d.cts → index-DBwtHgbM.d.cts} +15 -15
- package/dist/index-DJ-9T-mA.d.cts +112 -0
- package/dist/{index-D4Dckjj-.d.ts → index-DJAoqSe7.d.ts} +5 -5
- package/dist/{index-e0STHISZ.d.ts → index-DP-M7vHz.d.ts} +11 -11
- package/dist/{index-CntsO_8k.d.cts → index-DXlXcYS5.d.ts} +46 -47
- package/dist/{index-yic5OK6z.d.cts → index-D_dLOuVT.d.cts} +32 -32
- package/dist/{index-DUS1-CMU.d.cts → index-Dcf7jJ87.d.cts} +31 -31
- package/dist/{index-Bkyb84Ii.d.ts → index-Dd3eyVRJ.d.ts} +1 -1
- package/dist/index-DgN3-VmS.d.cts +36 -0
- package/dist/{index-DDaNGXa2.d.cts → index-DgTqMaSl.d.cts} +12 -12
- package/dist/{index-DHZ4drLn.d.ts → index-DggDHQNY.d.ts} +24 -24
- package/dist/{index-Cgi7uXuu.d.ts → index-DqjKAy1F.d.ts} +26 -28
- package/dist/{index-BBtdzPzk.d.ts → index-Dxex3mlh.d.ts} +1528 -1715
- package/dist/{index-H0wZ8DLw.d.cts → index-LNqDq1Hq.d.cts} +5 -5
- package/dist/{index-G-ankSM7.d.cts → index-Pqf6-jfF.d.cts} +21 -21
- package/dist/{index-BqfmtmEV.d.cts → index-fnYyOsr9.d.cts} +59 -59
- package/dist/{index-CKpTDvcE.d.cts → index-qTH_rN0R.d.cts} +8 -8
- package/dist/index.cjs +28 -27
- package/dist/index.d.cts +3 -3
- package/dist/index.d.ts +6 -6
- package/dist/index.js +20 -19
- package/dist/integrations/next-js.cjs +5 -4
- package/dist/integrations/next-js.d.cts +4 -4
- package/dist/integrations/next-js.d.ts +2 -2
- package/dist/integrations/next-js.js +5 -4
- package/dist/integrations/node.d.cts +2 -2
- package/dist/integrations/node.d.ts +4 -4
- package/dist/integrations/react-start.cjs +5 -4
- package/dist/integrations/react-start.d.cts +4 -4
- package/dist/integrations/react-start.d.ts +2 -2
- package/dist/integrations/react-start.js +5 -4
- package/dist/integrations/svelte-kit.cjs +5 -4
- package/dist/integrations/svelte-kit.d.cts +4 -4
- package/dist/integrations/svelte-kit.d.ts +6 -6
- package/dist/integrations/svelte-kit.js +5 -4
- package/dist/jwt-C3JWvMfo.js +94 -0
- package/dist/{jwt-2W7QW_0l.js → jwt-CDlbjYp2.js} +4 -4
- package/dist/jwt-DgRU65bf.cjs +121 -0
- package/dist/{jwt-DvuL40-q.cjs → jwt-nzKALWtQ.cjs} +4 -4
- package/dist/{kysely-adapter-CRd7C98k.cjs → kysely-adapter-D_pu-BzM.cjs} +3 -3
- package/dist/{kysely-adapter-Raw4YS5F.js → kysely-adapter-RP4FQnP-.js} +3 -3
- package/dist/{magic-link-sK6PyR1P.cjs → magic-link-B-TAuQox.cjs} +5 -5
- package/dist/{magic-link-DapoBSZo.js → magic-link-CxYBG-U8.js} +4 -4
- package/dist/{memory-adapter-DUlbdoJe.js → memory-adapter-5dOyXPKc.js} +1 -1
- package/dist/{memory-adapter-Cd7XB1KM.cjs → memory-adapter-yPDa0_of.cjs} +1 -1
- package/dist/{mongodb-adapter-Cplt9kk7.cjs → mongodb-adapter-DFQO1inP.cjs} +1 -1
- package/dist/{mongodb-adapter-BuGGSrtp.js → mongodb-adapter-U6gPYEBl.js} +1 -1
- package/dist/{multi-session-BNddUjFx.js → multi-session-DsOJfKSo.js} +3 -3
- package/dist/{multi-session-Bttq6Dk8.cjs → multi-session-i5i3oLst.cjs} +2 -2
- package/dist/{oauth-proxy-CYovlEOY.cjs → oauth-proxy-CJsdMW4Q.cjs} +3 -3
- package/dist/{oauth-proxy-B5aRoZkb.js → oauth-proxy-t3aWFzd5.js} +3 -3
- package/dist/oauth2/index.cjs +15 -14
- package/dist/oauth2/index.d.cts +9 -9
- package/dist/oauth2/index.d.ts +11 -11
- package/dist/oauth2/index.js +15 -14
- package/dist/{oidc-provider-DG6mR-lu.js → oidc-provider-C6iYtoIq.js} +114 -114
- package/dist/{oidc-provider-5sES_06H.cjs → oidc-provider-zLhXChrP.cjs} +115 -115
- package/dist/{one-tap-BIV-N3rL.cjs → one-tap-CT8Rr53G.cjs} +1 -1
- package/dist/{one-tap-C1q5Xvxq.js → one-tap-aKQMlpET.js} +2 -2
- package/dist/{open-api-CWzVb29I.cjs → open-api-CPDeQNsp.cjs} +2 -2
- package/dist/{open-api-DzIRvxPd.js → open-api-DaBBUfld.js} +2 -2
- package/dist/{organization-Dd25_EH3.cjs → organization-Cf4FevpV.cjs} +2476 -2492
- package/dist/{organization-Cz6DO2Gm.js → organization-DgOa6BVQ.js} +2438 -2448
- package/dist/permission-BErHURBU.js +15 -0
- package/dist/permission-CoOqrICL.cjs +27 -0
- package/dist/{phone-number-BuORpYMF.js → phone-number-BTiCUGPy.js} +4 -4
- package/dist/{phone-number-5snPnXW1.cjs → phone-number-BaCtIX8Y.cjs} +8 -8
- package/dist/plugins/access/index.cjs +1 -1
- package/dist/plugins/access/index.d.cts +1 -1
- package/dist/plugins/access/index.d.ts +2 -2
- package/dist/plugins/access/index.js +1 -1
- package/dist/plugins/admin/access/index.cjs +2 -2
- package/dist/plugins/admin/access/index.d.cts +1 -1
- package/dist/plugins/admin/access/index.d.ts +2 -2
- package/dist/plugins/admin/access/index.js +2 -2
- package/dist/plugins/admin/index.cjs +20 -19
- package/dist/plugins/admin/index.d.cts +5 -6
- package/dist/plugins/admin/index.d.ts +7 -8
- package/dist/plugins/admin/index.js +20 -19
- package/dist/plugins/anonymous/index.cjs +16 -15
- package/dist/plugins/anonymous/index.d.cts +3 -3
- package/dist/plugins/anonymous/index.d.ts +5 -5
- package/dist/plugins/anonymous/index.js +16 -15
- package/dist/plugins/bearer/index.cjs +6 -5
- package/dist/plugins/bearer/index.d.cts +1 -1
- package/dist/plugins/bearer/index.d.ts +1 -1
- package/dist/plugins/bearer/index.js +6 -5
- package/dist/plugins/captcha/index.cjs +1 -1
- package/dist/plugins/captcha/index.d.cts +1 -1
- package/dist/plugins/captcha/index.d.ts +1 -1
- package/dist/plugins/captcha/index.js +1 -1
- package/dist/plugins/custom-session/index.cjs +17 -16
- package/dist/plugins/custom-session/index.d.cts +3 -3
- package/dist/plugins/custom-session/index.d.ts +5 -5
- package/dist/plugins/custom-session/index.js +17 -16
- package/dist/plugins/device-authorization/index.cjs +16 -15
- package/dist/plugins/device-authorization/index.d.cts +2 -2
- package/dist/plugins/device-authorization/index.d.ts +3 -3
- package/dist/plugins/device-authorization/index.js +16 -15
- package/dist/plugins/email-otp/index.cjs +17 -16
- package/dist/plugins/email-otp/index.d.cts +1 -2
- package/dist/plugins/email-otp/index.d.ts +1 -2
- package/dist/plugins/email-otp/index.js +17 -16
- package/dist/plugins/generic-oauth/index.cjs +16 -15
- package/dist/plugins/generic-oauth/index.d.cts +3 -3
- package/dist/plugins/generic-oauth/index.d.ts +5 -5
- package/dist/plugins/generic-oauth/index.js +16 -15
- package/dist/plugins/haveibeenpwned/index.cjs +16 -15
- package/dist/plugins/haveibeenpwned/index.d.cts +1 -1
- package/dist/plugins/haveibeenpwned/index.d.ts +1 -1
- package/dist/plugins/haveibeenpwned/index.js +16 -15
- package/dist/plugins/index.cjs +51 -50
- package/dist/plugins/index.d.cts +147 -150
- package/dist/plugins/index.d.ts +139 -142
- package/dist/plugins/index.js +48 -47
- package/dist/plugins/jwt/index.cjs +18 -17
- package/dist/plugins/jwt/index.d.cts +3 -3
- package/dist/plugins/jwt/index.d.ts +5 -5
- package/dist/plugins/jwt/index.js +17 -16
- package/dist/plugins/magic-link/index.cjs +16 -15
- package/dist/plugins/magic-link/index.d.cts +1 -1
- package/dist/plugins/magic-link/index.d.ts +1 -1
- package/dist/plugins/magic-link/index.js +16 -15
- package/dist/plugins/multi-session/index.cjs +16 -15
- package/dist/plugins/multi-session/index.d.cts +1 -3
- package/dist/plugins/multi-session/index.d.ts +1 -3
- package/dist/plugins/multi-session/index.js +16 -15
- package/dist/plugins/oauth-proxy/index.cjs +16 -15
- package/dist/plugins/oauth-proxy/index.d.cts +1 -1
- package/dist/plugins/oauth-proxy/index.d.ts +1 -1
- package/dist/plugins/oauth-proxy/index.js +16 -15
- package/dist/plugins/oidc-provider/index.cjs +17 -16
- package/dist/plugins/oidc-provider/index.d.cts +3 -3
- package/dist/plugins/oidc-provider/index.d.ts +5 -5
- package/dist/plugins/oidc-provider/index.js +17 -16
- package/dist/plugins/one-tap/index.cjs +16 -15
- package/dist/plugins/one-tap/index.d.cts +1 -1
- package/dist/plugins/one-tap/index.d.ts +1 -1
- package/dist/plugins/one-tap/index.js +16 -15
- package/dist/plugins/one-time-token/index.cjs +48 -47
- package/dist/plugins/one-time-token/index.d.cts +3 -3
- package/dist/plugins/one-time-token/index.d.ts +5 -5
- package/dist/plugins/one-time-token/index.js +48 -47
- package/dist/plugins/open-api/index.cjs +16 -15
- package/dist/plugins/open-api/index.d.cts +1 -1
- package/dist/plugins/open-api/index.d.ts +2 -2
- package/dist/plugins/open-api/index.js +16 -15
- package/dist/plugins/organization/access/index.cjs +2 -2
- package/dist/plugins/organization/access/index.d.cts +2 -2
- package/dist/plugins/organization/access/index.d.ts +3 -3
- package/dist/plugins/organization/access/index.js +2 -2
- package/dist/plugins/organization/index.cjs +20 -19
- package/dist/plugins/organization/index.d.cts +5 -8
- package/dist/plugins/organization/index.d.ts +7 -10
- package/dist/plugins/organization/index.js +20 -19
- package/dist/plugins/passkey/index.cjs +16 -15
- package/dist/plugins/passkey/index.d.cts +2 -2
- package/dist/plugins/passkey/index.d.ts +3 -3
- package/dist/plugins/passkey/index.js +15 -14
- package/dist/plugins/phone-number/index.cjs +16 -15
- package/dist/plugins/phone-number/index.d.cts +3 -3
- package/dist/plugins/phone-number/index.d.ts +5 -5
- package/dist/plugins/phone-number/index.js +16 -15
- package/dist/plugins/siwe/index.cjs +16 -15
- package/dist/plugins/siwe/index.d.cts +3 -3
- package/dist/plugins/siwe/index.d.ts +5 -5
- package/dist/plugins/siwe/index.js +16 -15
- package/dist/plugins/two-factor/index.cjs +18 -17
- package/dist/plugins/two-factor/index.d.cts +3 -3
- package/dist/plugins/two-factor/index.d.ts +5 -5
- package/dist/plugins/two-factor/index.js +18 -17
- package/dist/plugins/username/index.cjs +16 -15
- package/dist/plugins/username/index.d.cts +2 -2
- package/dist/plugins/username/index.d.ts +3 -3
- package/dist/plugins/username/index.js +16 -15
- package/dist/{plugins-BvfmdVWp.cjs → plugins-CQPBhZ16.cjs} +308 -308
- package/dist/{plugins-C57Wvgvy.js → plugins-D4OWj_2x.js} +305 -305
- package/dist/{plugins-BbSF_Pek.d.ts → plugins-D_DW87jQ.d.ts} +3 -3
- package/dist/{plugins-Bda65QeL.d.cts → plugins-ivDhKYPY.d.cts} +2 -2
- package/dist/{proxy-Bur4Ci41.cjs → proxy-CrB-ATzF.cjs} +187 -25
- package/dist/{proxy-D4B6B6z4.js → proxy-DGoSvKdo.js} +176 -26
- package/dist/{session-BqpHJ0z-.js → session-1slmMotZ.js} +102 -25
- package/dist/{session-D5q1XDfx.cjs → session-BqrKkkSd.cjs} +104 -33
- package/dist/{sign-0t1-RJB5.js → sign-BIyc0J4i.js} +1 -1
- package/dist/{sign-KfLOKIQS.cjs → sign-C89ROO81.cjs} +1 -1
- package/dist/{siwe-CspaUlkq.js → siwe-DGF6ANXu.js} +20 -20
- package/dist/{siwe-BbVRRyiy.cjs → siwe-Da1cjQzQ.cjs} +20 -20
- package/dist/test-utils/index.cjs +8995 -8986
- package/dist/test-utils/index.d.cts +372 -373
- package/dist/test-utils/index.d.ts +83 -84
- package/dist/test-utils/index.js +8995 -8986
- package/dist/{two-factor-BiVGRW-E.js → two-factor-D2vx3jKv.js} +39 -39
- package/dist/{two-factor-1UxFwVuo.cjs → two-factor-FcwMt2ak.cjs} +41 -41
- package/dist/types/index.cjs +1 -1
- package/dist/types/index.d.cts +2 -2
- package/dist/types/index.d.ts +4 -4
- package/dist/types/index.js +1 -1
- package/dist/{url-GPfV0MFh.cjs → url-CADm8geO.cjs} +1 -1
- package/dist/{url-B43v92M_.js → url-DqQShdt9.js} +1 -1
- package/dist/{username-DW7xzEDM.cjs → username-CpiM_orl.cjs} +17 -17
- package/dist/{username-QS3MZXwm.js → username-DNMQwdH8.js} +16 -16
- package/dist/{utils-CyWxqQlM.cjs → utils-BWorSjpq.cjs} +12 -12
- package/dist/{utils-C86NQnwF.js → utils-CrGREH-c.js} +13 -13
- package/dist/{vanilla-CjDGO-xN.cjs → vanilla-BEVvH8BS.cjs} +2 -2
- package/dist/{vanilla-io0ilbFf.js → vanilla-DGLnf-wi.js} +2 -2
- package/package.json +8 -7
- package/dist/index-A2P42rxH.d.ts +0 -36
- package/dist/index-DAM-D9Cw.d.ts +0 -71
- package/dist/index-DRiG_er6.d.cts +0 -71
- package/dist/index-DlDw_Wj7.d.cts +0 -36
- package/dist/init-options-VvQwsOfO.d.cts +0 -4881
- package/dist/init-options-bKXqGECK.d.ts +0 -4882
- package/dist/session-C4KIPzRe.d.ts +0 -21
- package/dist/session-FTqk_ucC.d.cts +0 -21
- package/dist/types-9O9RA1so.cjs +0 -0
- package/dist/types-Bkw-9vBe.js +0 -1
- package/dist/user-BckRO-VN.d.ts +0 -20
- package/dist/user-DcGEK64L.d.cts +0 -20
- /package/dist/{access-CvCBdssC.js → access-BEuU6R79.js} +0 -0
- /package/dist/{access-KlwyAJUG.cjs → access-BLwdGGDJ.cjs} +0 -0
- /package/dist/{bun-sqlite-dialect-Di0S2xW4.js → bun-sqlite-dialect-19FWyoCu.js} +0 -0
- /package/dist/{bun-sqlite-dialect-DWe97FcN.cjs → bun-sqlite-dialect-CDy1mm9D.cjs} +0 -0
- /package/dist/{client-BgeEbVdf.js → client-BDyugzk9.js} +0 -0
- /package/dist/{client-D9BvKRI6.cjs → client-BuXfVfp7.cjs} +0 -0
- /package/dist/{client-BgV-MZs1.cjs → client-CdgpGQaK.cjs} +0 -0
- /package/dist/{client-CPRUKMwz.js → client-D-TSCG4M.js} +0 -0
- /package/dist/{client-Cp9AJdg5.js → client-DvRBxKYL.js} +0 -0
- /package/dist/{client-Nf2zsTdY.cjs → client-PGwhle1j.cjs} +0 -0
- /package/dist/{haveibeenpwned-g1qbSmgu.cjs → haveibeenpwned-n7QeG9ZS.cjs} +0 -0
- /package/dist/{helper-DciwSp4h.d.ts → helper-DHVUEBjl.d.ts} +0 -0
- /package/dist/{index-CCggO_hw.d.ts → index-9e6p7TFv.d.ts} +0 -0
- /package/dist/{index-D2HUTZ-d.d.cts → index-_1bfRgi2.d.cts} +0 -0
- /package/dist/{json-Cao-wnuS.cjs → json-CSNVAYvC.cjs} +0 -0
- /package/dist/{json-C3L9IMZ_.js → json-rUsZ9vGt.js} +0 -0
- /package/dist/{misc-Qf_w3crA.cjs → misc-BRSAgnve.cjs} +0 -0
- /package/dist/{misc-iq1wY9b6.js → misc-C0Kg4w6i.js} +0 -0
- /package/dist/{node-sqlite-dialect-qAUNq0lI.js → node-sqlite-dialect-CmwmRgW4.js} +0 -0
- /package/dist/{node-sqlite-dialect-Bfd3-YTX.cjs → node-sqlite-dialect-Uo19ydNx.cjs} +0 -0
- /package/dist/{parser-B3VysIjg.cjs → parser-Cv8gMvb_.cjs} +0 -0
- /package/dist/{parser-CtHEE8Bt.js → parser-LnIuhyfR.js} +0 -0
- /package/dist/{password-yMNRDQKB.js → password-B8hrwTWa.js} +0 -0
- /package/dist/{password-C3iUi9QC.cjs → password-bcNraGUR.cjs} +0 -0
- /package/dist/{plugin-helper-Ew7TUVuj.cjs → plugin-helper-BTYwL00A.cjs} +0 -0
- /package/dist/{plugin-helper-CaHV6HPJ.js → plugin-helper-CGhaPhDN.js} +0 -0
- /package/dist/{types-DMBaPPuG.d.ts → types-4dCicFIY.d.ts} +0 -0
- /package/dist/{organization-DRrjcP8j.js → types-D97IFTaH.js} +0 -0
- /package/dist/{organization-CLBgwBBZ.cjs → types-DDfu9blO.cjs} +0 -0
package/README.md
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { t as safeJSONParse } from "./json-
|
|
2
|
-
import {
|
|
1
|
+
import { t as safeJSONParse } from "./json-rUsZ9vGt.js";
|
|
2
|
+
import { t as generateId } from "./utils-CrGREH-c.js";
|
|
3
3
|
import { TTY_COLORS, getColorDepth, logger } from "@better-auth/core/env";
|
|
4
4
|
import { BetterAuthError } from "@better-auth/core/error";
|
|
5
5
|
|
|
@@ -109,7 +109,8 @@ const getAuthTables = (options) => {
|
|
|
109
109
|
type: "boolean",
|
|
110
110
|
defaultValue: false,
|
|
111
111
|
required: true,
|
|
112
|
-
fieldName: options.user?.fields?.emailVerified || "emailVerified"
|
|
112
|
+
fieldName: options.user?.fields?.emailVerified || "emailVerified",
|
|
113
|
+
input: false
|
|
113
114
|
},
|
|
114
115
|
image: {
|
|
115
116
|
type: "string",
|
|
@@ -555,10 +556,8 @@ const createAdapterFactory = ({ adapter: customAdapter, config: cfg }) => (optio
|
|
|
555
556
|
let lazyLoadTransaction = null;
|
|
556
557
|
const adapter = {
|
|
557
558
|
transaction: async (cb) => {
|
|
558
|
-
if (!lazyLoadTransaction) if (!config.transaction)
|
|
559
|
-
|
|
560
|
-
lazyLoadTransaction = createAsIsTransaction(adapter);
|
|
561
|
-
} else {
|
|
559
|
+
if (!lazyLoadTransaction) if (!config.transaction) lazyLoadTransaction = createAsIsTransaction(adapter);
|
|
560
|
+
else {
|
|
562
561
|
logger.debug(`[${config.adapterName}] - Using provided transaction implementation.`);
|
|
563
562
|
lazyLoadTransaction = config.transaction;
|
|
564
563
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
const require_chunk = require('./chunk-DWy1uDak.cjs');
|
|
2
|
-
const require_json = require('./json-
|
|
3
|
-
const require_utils = require('./utils-
|
|
2
|
+
const require_json = require('./json-CSNVAYvC.cjs');
|
|
3
|
+
const require_utils = require('./utils-BWorSjpq.cjs');
|
|
4
4
|
let __better_auth_core_env = require("@better-auth/core/env");
|
|
5
5
|
__better_auth_core_env = require_chunk.__toESM(__better_auth_core_env);
|
|
6
6
|
let __better_auth_core_error = require("@better-auth/core/error");
|
|
@@ -112,7 +112,8 @@ const getAuthTables = (options) => {
|
|
|
112
112
|
type: "boolean",
|
|
113
113
|
defaultValue: false,
|
|
114
114
|
required: true,
|
|
115
|
-
fieldName: options.user?.fields?.emailVerified || "emailVerified"
|
|
115
|
+
fieldName: options.user?.fields?.emailVerified || "emailVerified",
|
|
116
|
+
input: false
|
|
116
117
|
},
|
|
117
118
|
image: {
|
|
118
119
|
type: "string",
|
|
@@ -558,10 +559,8 @@ const createAdapterFactory = ({ adapter: customAdapter, config: cfg }) => (optio
|
|
|
558
559
|
let lazyLoadTransaction = null;
|
|
559
560
|
const adapter = {
|
|
560
561
|
transaction: async (cb) => {
|
|
561
|
-
if (!lazyLoadTransaction) if (!config.transaction)
|
|
562
|
-
|
|
563
|
-
lazyLoadTransaction = createAsIsTransaction(adapter);
|
|
564
|
-
} else {
|
|
562
|
+
if (!lazyLoadTransaction) if (!config.transaction) lazyLoadTransaction = createAsIsTransaction(adapter);
|
|
563
|
+
else {
|
|
565
564
|
__better_auth_core_env.logger.debug(`[${config.adapterName}] - Using provided transaction implementation.`);
|
|
566
565
|
lazyLoadTransaction = config.transaction;
|
|
567
566
|
}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
const require_chunk = require('../../chunk-DWy1uDak.cjs');
|
|
2
|
-
require('../../json-
|
|
3
|
-
require('../../crypto-
|
|
4
|
-
require('../../
|
|
5
|
-
require('../../utils-
|
|
6
|
-
|
|
2
|
+
require('../../json-CSNVAYvC.cjs');
|
|
3
|
+
require('../../crypto-DgMl-YEg.cjs');
|
|
4
|
+
require('../../jwt-DgRU65bf.cjs');
|
|
5
|
+
require('../../utils-BWorSjpq.cjs');
|
|
6
|
+
require('../../misc-BRSAgnve.cjs');
|
|
7
|
+
const require_adapter_factory = require('../../adapter-factory-D7FKzFTi.cjs');
|
|
7
8
|
let __better_auth_core_error = require("@better-auth/core/error");
|
|
8
9
|
__better_auth_core_error = require_chunk.__toESM(__better_auth_core_error);
|
|
9
10
|
let drizzle_orm = require("drizzle-orm");
|
|
@@ -9,7 +9,7 @@ interface DrizzleAdapterConfig {
|
|
|
9
9
|
/**
|
|
10
10
|
* The schema object that defines the tables and fields
|
|
11
11
|
*/
|
|
12
|
-
schema?: Record<string, any
|
|
12
|
+
schema?: Record<string, any> | undefined;
|
|
13
13
|
/**
|
|
14
14
|
* The database provider
|
|
15
15
|
*/
|
|
@@ -19,20 +19,20 @@ interface DrizzleAdapterConfig {
|
|
|
19
19
|
* set this to true. For example, if the schema
|
|
20
20
|
* has an object with a key "users" instead of "user"
|
|
21
21
|
*/
|
|
22
|
-
usePlural?: boolean;
|
|
22
|
+
usePlural?: boolean | undefined;
|
|
23
23
|
/**
|
|
24
24
|
* Enable debug logs for the adapter
|
|
25
25
|
*
|
|
26
26
|
* @default false
|
|
27
27
|
*/
|
|
28
|
-
debugLogs?: DBAdapterDebugLogOption;
|
|
28
|
+
debugLogs?: DBAdapterDebugLogOption | undefined;
|
|
29
29
|
/**
|
|
30
30
|
* By default snake case is used for table and field names
|
|
31
31
|
* when the CLI is used to generate the schema. If you want
|
|
32
32
|
* to use camel case, set this to true.
|
|
33
33
|
* @default false
|
|
34
34
|
*/
|
|
35
|
-
camelCase?: boolean;
|
|
35
|
+
camelCase?: boolean | undefined;
|
|
36
36
|
/**
|
|
37
37
|
* Whether to execute multiple operations in a transaction.
|
|
38
38
|
*
|
|
@@ -40,7 +40,7 @@ interface DrizzleAdapterConfig {
|
|
|
40
40
|
* set this to `false` and operations will be executed sequentially.
|
|
41
41
|
* @default false
|
|
42
42
|
*/
|
|
43
|
-
transaction?: boolean;
|
|
43
|
+
transaction?: boolean | undefined;
|
|
44
44
|
}
|
|
45
45
|
declare const drizzleAdapter: (db: DB, config: DrizzleAdapterConfig) => (options: BetterAuthOptions) => DBAdapter<BetterAuthOptions>;
|
|
46
46
|
//#endregion
|
|
@@ -9,7 +9,7 @@ interface DrizzleAdapterConfig {
|
|
|
9
9
|
/**
|
|
10
10
|
* The schema object that defines the tables and fields
|
|
11
11
|
*/
|
|
12
|
-
schema?: Record<string, any
|
|
12
|
+
schema?: Record<string, any> | undefined;
|
|
13
13
|
/**
|
|
14
14
|
* The database provider
|
|
15
15
|
*/
|
|
@@ -19,20 +19,20 @@ interface DrizzleAdapterConfig {
|
|
|
19
19
|
* set this to true. For example, if the schema
|
|
20
20
|
* has an object with a key "users" instead of "user"
|
|
21
21
|
*/
|
|
22
|
-
usePlural?: boolean;
|
|
22
|
+
usePlural?: boolean | undefined;
|
|
23
23
|
/**
|
|
24
24
|
* Enable debug logs for the adapter
|
|
25
25
|
*
|
|
26
26
|
* @default false
|
|
27
27
|
*/
|
|
28
|
-
debugLogs?: DBAdapterDebugLogOption;
|
|
28
|
+
debugLogs?: DBAdapterDebugLogOption | undefined;
|
|
29
29
|
/**
|
|
30
30
|
* By default snake case is used for table and field names
|
|
31
31
|
* when the CLI is used to generate the schema. If you want
|
|
32
32
|
* to use camel case, set this to true.
|
|
33
33
|
* @default false
|
|
34
34
|
*/
|
|
35
|
-
camelCase?: boolean;
|
|
35
|
+
camelCase?: boolean | undefined;
|
|
36
36
|
/**
|
|
37
37
|
* Whether to execute multiple operations in a transaction.
|
|
38
38
|
*
|
|
@@ -40,7 +40,7 @@ interface DrizzleAdapterConfig {
|
|
|
40
40
|
* set this to `false` and operations will be executed sequentially.
|
|
41
41
|
* @default false
|
|
42
42
|
*/
|
|
43
|
-
transaction?: boolean;
|
|
43
|
+
transaction?: boolean | undefined;
|
|
44
44
|
}
|
|
45
45
|
declare const drizzleAdapter: (db: DB, config: DrizzleAdapterConfig) => (options: BetterAuthOptions) => DBAdapter<BetterAuthOptions>;
|
|
46
46
|
//#endregion
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import "../../json-
|
|
2
|
-
import "../../crypto-
|
|
3
|
-
import "../../
|
|
4
|
-
import "../../utils-
|
|
5
|
-
import
|
|
1
|
+
import "../../json-rUsZ9vGt.js";
|
|
2
|
+
import "../../crypto-CGcj9N1E.js";
|
|
3
|
+
import "../../jwt-C3JWvMfo.js";
|
|
4
|
+
import "../../utils-CrGREH-c.js";
|
|
5
|
+
import "../../misc-C0Kg4w6i.js";
|
|
6
|
+
import { t as createAdapterFactory } from "../../adapter-factory-C4zrRt2K.js";
|
|
6
7
|
import { BetterAuthError } from "@better-auth/core/error";
|
|
7
8
|
import { and, asc, count, desc, eq, gt, gte, inArray, like, lt, lte, ne, notInArray, or, sql } from "drizzle-orm";
|
|
8
9
|
|
package/dist/adapters/index.cjs
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
require('../json-
|
|
2
|
-
require('../crypto-
|
|
3
|
-
require('../
|
|
4
|
-
require('../utils-
|
|
5
|
-
|
|
1
|
+
require('../json-CSNVAYvC.cjs');
|
|
2
|
+
require('../crypto-DgMl-YEg.cjs');
|
|
3
|
+
require('../jwt-DgRU65bf.cjs');
|
|
4
|
+
require('../utils-BWorSjpq.cjs');
|
|
5
|
+
require('../misc-BRSAgnve.cjs');
|
|
6
|
+
const require_adapter_factory = require('../adapter-factory-D7FKzFTi.cjs');
|
|
6
7
|
|
|
7
8
|
//#region src/adapters/index.ts
|
|
8
9
|
/**
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { A as Where$1, k as TransactionAdapter, w as AdapterSchemaCreation } from "../index-BsEIAwi8.cjs";
|
|
2
2
|
import { a as Prettify } from "../helper-fGlPrlKg.cjs";
|
|
3
3
|
import "../types-BwaMmeuy.cjs";
|
|
4
|
-
import "../plugins-
|
|
4
|
+
import "../plugins-ivDhKYPY.cjs";
|
|
5
5
|
import { BetterAuthOptions } from "@better-auth/core";
|
|
6
6
|
import { CustomAdapter as CustomAdapter$1, DBAdapter, DBAdapterFactoryConfig } from "@better-auth/core/db/adapter";
|
|
7
7
|
import { BetterAuthDBSchema, DBFieldAttribute } from "@better-auth/core/db";
|
|
@@ -23,7 +23,7 @@ interface AdapterFactoryConfig extends Omit<DBAdapterFactoryConfig<BetterAuthOpt
|
|
|
23
23
|
*
|
|
24
24
|
* @default false
|
|
25
25
|
*/
|
|
26
|
-
transaction?: false | (<R>(callback: (trx: TransactionAdapter) => Promise<R>) => Promise<R>);
|
|
26
|
+
transaction?: (false | (<R>(callback: (trx: TransactionAdapter) => Promise<R>) => Promise<R>)) | undefined;
|
|
27
27
|
}
|
|
28
28
|
type AdapterFactoryCustomizeAdapterCreator = (config: {
|
|
29
29
|
options: BetterAuthOptions;
|
|
@@ -94,8 +94,8 @@ type AdapterFactoryCustomizeAdapterCreator = (config: {
|
|
|
94
94
|
model: string;
|
|
95
95
|
field: string;
|
|
96
96
|
}) => DBFieldAttribute;
|
|
97
|
-
transformInput: (data: Record<string, any>, defaultModelName: string, action: "create" | "update", forceAllowId?: boolean) => Promise<Record<string, any>>;
|
|
98
|
-
transformOutput: (data: Record<string, any>, defaultModelName: string, select?: string[]) => Promise<Record<string, any>>;
|
|
97
|
+
transformInput: (data: Record<string, any>, defaultModelName: string, action: "create" | "update", forceAllowId?: boolean | undefined) => Promise<Record<string, any>>;
|
|
98
|
+
transformOutput: (data: Record<string, any>, defaultModelName: string, select?: string[] | undefined) => Promise<Record<string, any>>;
|
|
99
99
|
transformWhereClause: <W extends Where$1[] | undefined>({
|
|
100
100
|
model,
|
|
101
101
|
where
|
|
@@ -108,7 +108,7 @@ type AdapterFactoryCustomizeAdapterCreator = (config: {
|
|
|
108
108
|
* @deprecated Use `CustomAdapter` from `@better-auth/core/db/adapter` instead.
|
|
109
109
|
*/
|
|
110
110
|
interface CustomAdapter extends Omit<CustomAdapter$1, "createSchema"> {
|
|
111
|
-
createSchema?: (props: {
|
|
111
|
+
createSchema?: ((props: {
|
|
112
112
|
/**
|
|
113
113
|
* The file the user may have passed in to the `generate` command as the expected schema file output path.
|
|
114
114
|
*/
|
|
@@ -117,7 +117,7 @@ interface CustomAdapter extends Omit<CustomAdapter$1, "createSchema"> {
|
|
|
117
117
|
* The tables from the user's Better-Auth instance schema.
|
|
118
118
|
*/
|
|
119
119
|
tables: BetterAuthDBSchema;
|
|
120
|
-
}) => Promise<AdapterSchemaCreation
|
|
120
|
+
}) => Promise<AdapterSchemaCreation>) | undefined;
|
|
121
121
|
}
|
|
122
122
|
/**
|
|
123
123
|
* @deprecated Use `CleanedWhere` from `@better-auth/core/db/adapter` instead.
|
package/dist/adapters/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { a as Prettify } from "../helper-
|
|
3
|
-
import "../types-
|
|
4
|
-
import "../plugins-
|
|
1
|
+
import { A as Where$1, k as TransactionAdapter, w as AdapterSchemaCreation } from "../index-Dxex3mlh.js";
|
|
2
|
+
import { a as Prettify } from "../helper-DHVUEBjl.js";
|
|
3
|
+
import "../types-4dCicFIY.js";
|
|
4
|
+
import "../plugins-D_DW87jQ.js";
|
|
5
5
|
import { BetterAuthOptions } from "@better-auth/core";
|
|
6
6
|
import { BetterAuthDBSchema, DBFieldAttribute } from "@better-auth/core/db";
|
|
7
7
|
import { CustomAdapter as CustomAdapter$1, DBAdapter, DBAdapterFactoryConfig } from "@better-auth/core/db/adapter";
|
|
@@ -23,7 +23,7 @@ interface AdapterFactoryConfig extends Omit<DBAdapterFactoryConfig<BetterAuthOpt
|
|
|
23
23
|
*
|
|
24
24
|
* @default false
|
|
25
25
|
*/
|
|
26
|
-
transaction?: false | (<R>(callback: (trx: TransactionAdapter) => Promise<R>) => Promise<R>);
|
|
26
|
+
transaction?: (false | (<R>(callback: (trx: TransactionAdapter) => Promise<R>) => Promise<R>)) | undefined;
|
|
27
27
|
}
|
|
28
28
|
type AdapterFactoryCustomizeAdapterCreator = (config: {
|
|
29
29
|
options: BetterAuthOptions;
|
|
@@ -94,8 +94,8 @@ type AdapterFactoryCustomizeAdapterCreator = (config: {
|
|
|
94
94
|
model: string;
|
|
95
95
|
field: string;
|
|
96
96
|
}) => DBFieldAttribute;
|
|
97
|
-
transformInput: (data: Record<string, any>, defaultModelName: string, action: "create" | "update", forceAllowId?: boolean) => Promise<Record<string, any>>;
|
|
98
|
-
transformOutput: (data: Record<string, any>, defaultModelName: string, select?: string[]) => Promise<Record<string, any>>;
|
|
97
|
+
transformInput: (data: Record<string, any>, defaultModelName: string, action: "create" | "update", forceAllowId?: boolean | undefined) => Promise<Record<string, any>>;
|
|
98
|
+
transformOutput: (data: Record<string, any>, defaultModelName: string, select?: string[] | undefined) => Promise<Record<string, any>>;
|
|
99
99
|
transformWhereClause: <W extends Where$1[] | undefined>({
|
|
100
100
|
model,
|
|
101
101
|
where
|
|
@@ -108,7 +108,7 @@ type AdapterFactoryCustomizeAdapterCreator = (config: {
|
|
|
108
108
|
* @deprecated Use `CustomAdapter` from `@better-auth/core/db/adapter` instead.
|
|
109
109
|
*/
|
|
110
110
|
interface CustomAdapter extends Omit<CustomAdapter$1, "createSchema"> {
|
|
111
|
-
createSchema?: (props: {
|
|
111
|
+
createSchema?: ((props: {
|
|
112
112
|
/**
|
|
113
113
|
* The file the user may have passed in to the `generate` command as the expected schema file output path.
|
|
114
114
|
*/
|
|
@@ -117,7 +117,7 @@ interface CustomAdapter extends Omit<CustomAdapter$1, "createSchema"> {
|
|
|
117
117
|
* The tables from the user's Better-Auth instance schema.
|
|
118
118
|
*/
|
|
119
119
|
tables: BetterAuthDBSchema;
|
|
120
|
-
}) => Promise<AdapterSchemaCreation
|
|
120
|
+
}) => Promise<AdapterSchemaCreation>) | undefined;
|
|
121
121
|
}
|
|
122
122
|
/**
|
|
123
123
|
* @deprecated Use `CleanedWhere` from `@better-auth/core/db/adapter` instead.
|
package/dist/adapters/index.js
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import "../json-
|
|
2
|
-
import "../crypto-
|
|
3
|
-
import "../
|
|
4
|
-
import "../utils-
|
|
5
|
-
import
|
|
1
|
+
import "../json-rUsZ9vGt.js";
|
|
2
|
+
import "../crypto-CGcj9N1E.js";
|
|
3
|
+
import "../jwt-C3JWvMfo.js";
|
|
4
|
+
import "../utils-CrGREH-c.js";
|
|
5
|
+
import "../misc-C0Kg4w6i.js";
|
|
6
|
+
import { t as createAdapterFactory } from "../adapter-factory-C4zrRt2K.js";
|
|
6
7
|
|
|
7
8
|
export * from "@better-auth/core/db/adapter"
|
|
8
9
|
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
require('../../json-
|
|
2
|
-
require('../../crypto-
|
|
3
|
-
require('../../
|
|
4
|
-
require('../../utils-
|
|
5
|
-
require('../../
|
|
6
|
-
const require_kysely_adapter = require('../../kysely-adapter-
|
|
1
|
+
require('../../json-CSNVAYvC.cjs');
|
|
2
|
+
require('../../crypto-DgMl-YEg.cjs');
|
|
3
|
+
require('../../jwt-DgRU65bf.cjs');
|
|
4
|
+
require('../../utils-BWorSjpq.cjs');
|
|
5
|
+
require('../../misc-BRSAgnve.cjs');
|
|
6
|
+
const require_kysely_adapter = require('../../kysely-adapter-D_pu-BzM.cjs');
|
|
7
|
+
require('../../adapter-factory-D7FKzFTi.cjs');
|
|
7
8
|
|
|
8
9
|
exports.createKyselyAdapter = require_kysely_adapter.createKyselyAdapter;
|
|
9
10
|
exports.getKyselyDatabaseType = require_kysely_adapter.getKyselyDatabaseType;
|
|
@@ -20,19 +20,19 @@ interface KyselyAdapterConfig {
|
|
|
20
20
|
/**
|
|
21
21
|
* Database type.
|
|
22
22
|
*/
|
|
23
|
-
type?: KyselyDatabaseType;
|
|
23
|
+
type?: KyselyDatabaseType | undefined;
|
|
24
24
|
/**
|
|
25
25
|
* Enable debug logs for the adapter
|
|
26
26
|
*
|
|
27
27
|
* @default false
|
|
28
28
|
*/
|
|
29
|
-
debugLogs?: DBAdapterDebugLogOption;
|
|
29
|
+
debugLogs?: DBAdapterDebugLogOption | undefined;
|
|
30
30
|
/**
|
|
31
31
|
* Use plural for table names.
|
|
32
32
|
*
|
|
33
33
|
* @default false
|
|
34
34
|
*/
|
|
35
|
-
usePlural?: boolean;
|
|
35
|
+
usePlural?: boolean | undefined;
|
|
36
36
|
/**
|
|
37
37
|
* Whether to execute multiple operations in a transaction.
|
|
38
38
|
*
|
|
@@ -40,8 +40,8 @@ interface KyselyAdapterConfig {
|
|
|
40
40
|
* set this to `false` and operations will be executed sequentially.
|
|
41
41
|
* @default false
|
|
42
42
|
*/
|
|
43
|
-
transaction?: boolean;
|
|
43
|
+
transaction?: boolean | undefined;
|
|
44
44
|
}
|
|
45
|
-
declare const kyselyAdapter: (db: Kysely<any>, config?: KyselyAdapterConfig) => (options: BetterAuthOptions) => DBAdapter<BetterAuthOptions>;
|
|
45
|
+
declare const kyselyAdapter: (db: Kysely<any>, config?: KyselyAdapterConfig | undefined) => (options: BetterAuthOptions) => DBAdapter<BetterAuthOptions>;
|
|
46
46
|
//#endregion
|
|
47
47
|
export { KyselyDatabaseType, createKyselyAdapter, getKyselyDatabaseType, kyselyAdapter };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as KyselyDatabaseType } from "../../types-
|
|
1
|
+
import { t as KyselyDatabaseType } from "../../types-4dCicFIY.js";
|
|
2
2
|
import { BetterAuthOptions } from "@better-auth/core";
|
|
3
3
|
import { Kysely } from "kysely";
|
|
4
4
|
import { DBAdapter, DBAdapterDebugLogOption } from "@better-auth/core/db/adapter";
|
|
@@ -20,19 +20,19 @@ interface KyselyAdapterConfig {
|
|
|
20
20
|
/**
|
|
21
21
|
* Database type.
|
|
22
22
|
*/
|
|
23
|
-
type?: KyselyDatabaseType;
|
|
23
|
+
type?: KyselyDatabaseType | undefined;
|
|
24
24
|
/**
|
|
25
25
|
* Enable debug logs for the adapter
|
|
26
26
|
*
|
|
27
27
|
* @default false
|
|
28
28
|
*/
|
|
29
|
-
debugLogs?: DBAdapterDebugLogOption;
|
|
29
|
+
debugLogs?: DBAdapterDebugLogOption | undefined;
|
|
30
30
|
/**
|
|
31
31
|
* Use plural for table names.
|
|
32
32
|
*
|
|
33
33
|
* @default false
|
|
34
34
|
*/
|
|
35
|
-
usePlural?: boolean;
|
|
35
|
+
usePlural?: boolean | undefined;
|
|
36
36
|
/**
|
|
37
37
|
* Whether to execute multiple operations in a transaction.
|
|
38
38
|
*
|
|
@@ -40,8 +40,8 @@ interface KyselyAdapterConfig {
|
|
|
40
40
|
* set this to `false` and operations will be executed sequentially.
|
|
41
41
|
* @default false
|
|
42
42
|
*/
|
|
43
|
-
transaction?: boolean;
|
|
43
|
+
transaction?: boolean | undefined;
|
|
44
44
|
}
|
|
45
|
-
declare const kyselyAdapter: (db: Kysely<any>, config?: KyselyAdapterConfig) => (options: BetterAuthOptions) => DBAdapter<BetterAuthOptions>;
|
|
45
|
+
declare const kyselyAdapter: (db: Kysely<any>, config?: KyselyAdapterConfig | undefined) => (options: BetterAuthOptions) => DBAdapter<BetterAuthOptions>;
|
|
46
46
|
//#endregion
|
|
47
47
|
export { KyselyDatabaseType, createKyselyAdapter, getKyselyDatabaseType, kyselyAdapter };
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import "../../json-
|
|
2
|
-
import "../../crypto-
|
|
3
|
-
import "../../
|
|
4
|
-
import "../../utils-
|
|
5
|
-
import "../../
|
|
6
|
-
import { n as createKyselyAdapter, r as getKyselyDatabaseType, t as kyselyAdapter } from "../../kysely-adapter-
|
|
1
|
+
import "../../json-rUsZ9vGt.js";
|
|
2
|
+
import "../../crypto-CGcj9N1E.js";
|
|
3
|
+
import "../../jwt-C3JWvMfo.js";
|
|
4
|
+
import "../../utils-CrGREH-c.js";
|
|
5
|
+
import "../../misc-C0Kg4w6i.js";
|
|
6
|
+
import { n as createKyselyAdapter, r as getKyselyDatabaseType, t as kyselyAdapter } from "../../kysely-adapter-RP4FQnP-.js";
|
|
7
|
+
import "../../adapter-factory-C4zrRt2K.js";
|
|
7
8
|
|
|
8
9
|
export { createKyselyAdapter, getKyselyDatabaseType, kyselyAdapter };
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
require('../../json-
|
|
2
|
-
require('../../crypto-
|
|
3
|
-
require('../../
|
|
4
|
-
require('../../utils-
|
|
5
|
-
require('../../
|
|
6
|
-
|
|
1
|
+
require('../../json-CSNVAYvC.cjs');
|
|
2
|
+
require('../../crypto-DgMl-YEg.cjs');
|
|
3
|
+
require('../../jwt-DgRU65bf.cjs');
|
|
4
|
+
require('../../utils-BWorSjpq.cjs');
|
|
5
|
+
require('../../misc-BRSAgnve.cjs');
|
|
6
|
+
require('../../adapter-factory-D7FKzFTi.cjs');
|
|
7
|
+
const require_memory_adapter = require('../../memory-adapter-yPDa0_of.cjs');
|
|
7
8
|
|
|
8
9
|
exports.memoryAdapter = require_memory_adapter.memoryAdapter;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { BetterAuthOptions } from "@better-auth/core";
|
|
2
|
-
import * as
|
|
2
|
+
import * as _better_auth_core_db_adapter2 from "@better-auth/core/db/adapter";
|
|
3
3
|
import { DBAdapterDebugLogOption } from "@better-auth/core/db/adapter";
|
|
4
4
|
|
|
5
5
|
//#region src/adapters/memory-adapter/memory-adapter.d.ts
|
|
@@ -7,8 +7,8 @@ interface MemoryDB {
|
|
|
7
7
|
[key: string]: any[];
|
|
8
8
|
}
|
|
9
9
|
interface MemoryAdapterConfig {
|
|
10
|
-
debugLogs?: DBAdapterDebugLogOption;
|
|
10
|
+
debugLogs?: DBAdapterDebugLogOption | undefined;
|
|
11
11
|
}
|
|
12
|
-
declare const memoryAdapter: (db: MemoryDB, config?: MemoryAdapterConfig) => (options: BetterAuthOptions) =>
|
|
12
|
+
declare const memoryAdapter: (db: MemoryDB, config?: MemoryAdapterConfig | undefined) => (options: BetterAuthOptions) => _better_auth_core_db_adapter2.DBAdapter<BetterAuthOptions>;
|
|
13
13
|
//#endregion
|
|
14
14
|
export { MemoryAdapterConfig, MemoryDB, memoryAdapter };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { BetterAuthOptions } from "@better-auth/core";
|
|
2
|
-
import * as
|
|
2
|
+
import * as _better_auth_core_db_adapter2 from "@better-auth/core/db/adapter";
|
|
3
3
|
import { DBAdapterDebugLogOption } from "@better-auth/core/db/adapter";
|
|
4
4
|
|
|
5
5
|
//#region src/adapters/memory-adapter/memory-adapter.d.ts
|
|
@@ -7,8 +7,8 @@ interface MemoryDB {
|
|
|
7
7
|
[key: string]: any[];
|
|
8
8
|
}
|
|
9
9
|
interface MemoryAdapterConfig {
|
|
10
|
-
debugLogs?: DBAdapterDebugLogOption;
|
|
10
|
+
debugLogs?: DBAdapterDebugLogOption | undefined;
|
|
11
11
|
}
|
|
12
|
-
declare const memoryAdapter: (db: MemoryDB, config?: MemoryAdapterConfig) => (options: BetterAuthOptions) =>
|
|
12
|
+
declare const memoryAdapter: (db: MemoryDB, config?: MemoryAdapterConfig | undefined) => (options: BetterAuthOptions) => _better_auth_core_db_adapter2.DBAdapter<BetterAuthOptions>;
|
|
13
13
|
//#endregion
|
|
14
14
|
export { MemoryAdapterConfig, MemoryDB, memoryAdapter };
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import "../../json-
|
|
2
|
-
import "../../crypto-
|
|
3
|
-
import "../../
|
|
4
|
-
import "../../utils-
|
|
5
|
-
import "../../
|
|
6
|
-
import
|
|
1
|
+
import "../../json-rUsZ9vGt.js";
|
|
2
|
+
import "../../crypto-CGcj9N1E.js";
|
|
3
|
+
import "../../jwt-C3JWvMfo.js";
|
|
4
|
+
import "../../utils-CrGREH-c.js";
|
|
5
|
+
import "../../misc-C0Kg4w6i.js";
|
|
6
|
+
import "../../adapter-factory-C4zrRt2K.js";
|
|
7
|
+
import { t as memoryAdapter } from "../../memory-adapter-5dOyXPKc.js";
|
|
7
8
|
|
|
8
9
|
export { memoryAdapter };
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
require('../../json-
|
|
2
|
-
require('../../crypto-
|
|
3
|
-
require('../../
|
|
4
|
-
require('../../utils-
|
|
5
|
-
require('../../
|
|
6
|
-
|
|
1
|
+
require('../../json-CSNVAYvC.cjs');
|
|
2
|
+
require('../../crypto-DgMl-YEg.cjs');
|
|
3
|
+
require('../../jwt-DgRU65bf.cjs');
|
|
4
|
+
require('../../utils-BWorSjpq.cjs');
|
|
5
|
+
require('../../misc-BRSAgnve.cjs');
|
|
6
|
+
require('../../adapter-factory-D7FKzFTi.cjs');
|
|
7
|
+
const require_mongodb_adapter = require('../../mongodb-adapter-DFQO1inP.cjs');
|
|
7
8
|
|
|
8
9
|
exports.mongodbAdapter = require_mongodb_adapter.mongodbAdapter;
|
|
@@ -8,19 +8,19 @@ interface MongoDBAdapterConfig {
|
|
|
8
8
|
* MongoDB client instance
|
|
9
9
|
* If not provided, Database transactions won't be enabled.
|
|
10
10
|
*/
|
|
11
|
-
client?: MongoClient;
|
|
11
|
+
client?: MongoClient | undefined;
|
|
12
12
|
/**
|
|
13
13
|
* Enable debug logs for the adapter
|
|
14
14
|
*
|
|
15
15
|
* @default false
|
|
16
16
|
*/
|
|
17
|
-
debugLogs?: DBAdapterDebugLogOption;
|
|
17
|
+
debugLogs?: DBAdapterDebugLogOption | undefined;
|
|
18
18
|
/**
|
|
19
19
|
* Use plural table names
|
|
20
20
|
*
|
|
21
21
|
* @default false
|
|
22
22
|
*/
|
|
23
|
-
usePlural?: boolean;
|
|
23
|
+
usePlural?: boolean | undefined;
|
|
24
24
|
/**
|
|
25
25
|
* Whether to execute multiple operations in a transaction.
|
|
26
26
|
*
|
|
@@ -28,8 +28,8 @@ interface MongoDBAdapterConfig {
|
|
|
28
28
|
* set this to `false` and operations will be executed sequentially.
|
|
29
29
|
* @default false
|
|
30
30
|
*/
|
|
31
|
-
transaction?: boolean;
|
|
31
|
+
transaction?: boolean | undefined;
|
|
32
32
|
}
|
|
33
|
-
declare const mongodbAdapter: (db: Db, config?: MongoDBAdapterConfig) => (options: BetterAuthOptions) => DBAdapter<BetterAuthOptions>;
|
|
33
|
+
declare const mongodbAdapter: (db: Db, config?: MongoDBAdapterConfig | undefined) => (options: BetterAuthOptions) => DBAdapter<BetterAuthOptions>;
|
|
34
34
|
//#endregion
|
|
35
35
|
export { MongoDBAdapterConfig, mongodbAdapter };
|
|
@@ -8,19 +8,19 @@ interface MongoDBAdapterConfig {
|
|
|
8
8
|
* MongoDB client instance
|
|
9
9
|
* If not provided, Database transactions won't be enabled.
|
|
10
10
|
*/
|
|
11
|
-
client?: MongoClient;
|
|
11
|
+
client?: MongoClient | undefined;
|
|
12
12
|
/**
|
|
13
13
|
* Enable debug logs for the adapter
|
|
14
14
|
*
|
|
15
15
|
* @default false
|
|
16
16
|
*/
|
|
17
|
-
debugLogs?: DBAdapterDebugLogOption;
|
|
17
|
+
debugLogs?: DBAdapterDebugLogOption | undefined;
|
|
18
18
|
/**
|
|
19
19
|
* Use plural table names
|
|
20
20
|
*
|
|
21
21
|
* @default false
|
|
22
22
|
*/
|
|
23
|
-
usePlural?: boolean;
|
|
23
|
+
usePlural?: boolean | undefined;
|
|
24
24
|
/**
|
|
25
25
|
* Whether to execute multiple operations in a transaction.
|
|
26
26
|
*
|
|
@@ -28,8 +28,8 @@ interface MongoDBAdapterConfig {
|
|
|
28
28
|
* set this to `false` and operations will be executed sequentially.
|
|
29
29
|
* @default false
|
|
30
30
|
*/
|
|
31
|
-
transaction?: boolean;
|
|
31
|
+
transaction?: boolean | undefined;
|
|
32
32
|
}
|
|
33
|
-
declare const mongodbAdapter: (db: Db, config?: MongoDBAdapterConfig) => (options: BetterAuthOptions) => DBAdapter<BetterAuthOptions>;
|
|
33
|
+
declare const mongodbAdapter: (db: Db, config?: MongoDBAdapterConfig | undefined) => (options: BetterAuthOptions) => DBAdapter<BetterAuthOptions>;
|
|
34
34
|
//#endregion
|
|
35
35
|
export { MongoDBAdapterConfig, mongodbAdapter };
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import "../../json-
|
|
2
|
-
import "../../crypto-
|
|
3
|
-
import "../../
|
|
4
|
-
import "../../utils-
|
|
5
|
-
import "../../
|
|
6
|
-
import
|
|
1
|
+
import "../../json-rUsZ9vGt.js";
|
|
2
|
+
import "../../crypto-CGcj9N1E.js";
|
|
3
|
+
import "../../jwt-C3JWvMfo.js";
|
|
4
|
+
import "../../utils-CrGREH-c.js";
|
|
5
|
+
import "../../misc-C0Kg4w6i.js";
|
|
6
|
+
import "../../adapter-factory-C4zrRt2K.js";
|
|
7
|
+
import { t as mongodbAdapter } from "../../mongodb-adapter-U6gPYEBl.js";
|
|
7
8
|
|
|
8
9
|
export { mongodbAdapter };
|