better-auth 1.3.8 → 1.3.9-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 +16 -0
- package/dist/adapters/drizzle-adapter/index.d.cts +2 -2
- package/dist/adapters/drizzle-adapter/index.d.mts +2 -2
- package/dist/adapters/drizzle-adapter/index.d.ts +2 -2
- package/dist/adapters/drizzle-adapter/index.mjs +17 -1
- package/dist/adapters/index.d.cts +3 -3
- package/dist/adapters/index.d.mts +3 -3
- package/dist/adapters/index.d.ts +3 -3
- package/dist/adapters/kysely-adapter/index.cjs +1 -1
- package/dist/adapters/kysely-adapter/index.d.cts +2 -2
- package/dist/adapters/kysely-adapter/index.d.mts +2 -2
- package/dist/adapters/kysely-adapter/index.d.ts +2 -2
- package/dist/adapters/kysely-adapter/index.mjs +1 -1
- package/dist/adapters/memory-adapter/index.cjs +1 -1
- package/dist/adapters/memory-adapter/index.d.cts +2 -2
- package/dist/adapters/memory-adapter/index.d.mts +2 -2
- package/dist/adapters/memory-adapter/index.d.ts +2 -2
- package/dist/adapters/memory-adapter/index.mjs +1 -1
- package/dist/adapters/mongodb-adapter/index.cjs +1 -1
- package/dist/adapters/mongodb-adapter/index.d.cts +2 -2
- package/dist/adapters/mongodb-adapter/index.d.mts +2 -2
- package/dist/adapters/mongodb-adapter/index.d.ts +2 -2
- package/dist/adapters/mongodb-adapter/index.mjs +1 -1
- package/dist/adapters/prisma-adapter/index.cjs +2 -0
- package/dist/adapters/prisma-adapter/index.d.cts +2 -2
- package/dist/adapters/prisma-adapter/index.d.mts +2 -2
- package/dist/adapters/prisma-adapter/index.d.ts +2 -2
- package/dist/adapters/prisma-adapter/index.mjs +2 -0
- package/dist/adapters/test.cjs +44 -0
- package/dist/adapters/test.d.cts +4 -2
- package/dist/adapters/test.d.mts +4 -2
- package/dist/adapters/test.d.ts +4 -2
- package/dist/adapters/test.mjs +44 -0
- package/dist/api/index.cjs +1 -1
- package/dist/api/index.d.cts +2 -2
- package/dist/api/index.d.mts +2 -2
- package/dist/api/index.d.ts +2 -2
- package/dist/api/index.mjs +2 -2
- package/dist/client/index.d.cts +4 -4
- package/dist/client/index.d.mts +4 -4
- package/dist/client/index.d.ts +4 -4
- package/dist/client/plugins/index.cjs +4 -3
- package/dist/client/plugins/index.d.cts +12 -11
- package/dist/client/plugins/index.d.mts +12 -11
- package/dist/client/plugins/index.d.ts +12 -11
- package/dist/client/plugins/index.mjs +4 -3
- package/dist/client/react/index.d.cts +3 -3
- package/dist/client/react/index.d.mts +3 -3
- package/dist/client/react/index.d.ts +3 -3
- package/dist/client/solid/index.d.cts +3 -3
- package/dist/client/solid/index.d.mts +3 -3
- package/dist/client/solid/index.d.ts +3 -3
- package/dist/client/svelte/index.d.cts +3 -3
- package/dist/client/svelte/index.d.mts +3 -3
- package/dist/client/svelte/index.d.ts +3 -3
- package/dist/client/vue/index.d.cts +3 -3
- package/dist/client/vue/index.d.mts +3 -3
- package/dist/client/vue/index.d.ts +3 -3
- package/dist/cookies/index.d.cts +2 -2
- package/dist/cookies/index.d.mts +2 -2
- package/dist/cookies/index.d.ts +2 -2
- package/dist/db/index.cjs +3 -3
- package/dist/db/index.d.cts +3 -3
- package/dist/db/index.d.mts +3 -3
- package/dist/db/index.d.ts +3 -3
- package/dist/db/index.mjs +3 -3
- package/dist/index.cjs +5 -5
- package/dist/index.d.cts +10 -10
- package/dist/index.d.mts +10 -10
- package/dist/index.d.ts +10 -10
- package/dist/index.mjs +5 -5
- package/dist/integrations/next-js.cjs +2 -2
- package/dist/integrations/next-js.d.cts +2 -2
- package/dist/integrations/next-js.d.mts +2 -2
- package/dist/integrations/next-js.d.ts +2 -2
- package/dist/integrations/next-js.mjs +2 -2
- package/dist/integrations/node.d.cts +2 -2
- package/dist/integrations/node.d.mts +2 -2
- package/dist/integrations/node.d.ts +2 -2
- package/dist/integrations/react-start.cjs +2 -2
- package/dist/integrations/react-start.d.cts +2 -2
- package/dist/integrations/react-start.d.mts +2 -2
- package/dist/integrations/react-start.d.ts +2 -2
- package/dist/integrations/react-start.mjs +2 -2
- package/dist/integrations/svelte-kit.cjs +1 -1
- package/dist/integrations/svelte-kit.d.cts +2 -2
- package/dist/integrations/svelte-kit.d.mts +2 -2
- package/dist/integrations/svelte-kit.d.ts +2 -2
- package/dist/integrations/svelte-kit.mjs +1 -1
- package/dist/oauth2/index.cjs +1 -1
- package/dist/oauth2/index.d.cts +4 -4
- package/dist/oauth2/index.d.mts +4 -4
- package/dist/oauth2/index.d.ts +4 -4
- package/dist/oauth2/index.mjs +1 -1
- 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 +2 -2
- package/dist/plugins/admin/index.d.cts +16 -100
- package/dist/plugins/admin/index.d.mts +16 -100
- package/dist/plugins/admin/index.d.ts +16 -100
- package/dist/plugins/admin/index.mjs +2 -2
- package/dist/plugins/anonymous/index.cjs +1 -1
- package/dist/plugins/anonymous/index.d.cts +2 -2
- package/dist/plugins/anonymous/index.d.mts +2 -2
- package/dist/plugins/anonymous/index.d.ts +2 -2
- package/dist/plugins/anonymous/index.mjs +1 -1
- package/dist/plugins/bearer/index.cjs +1 -1
- package/dist/plugins/bearer/index.d.cts +2 -2
- package/dist/plugins/bearer/index.d.mts +2 -2
- package/dist/plugins/bearer/index.d.ts +2 -2
- package/dist/plugins/bearer/index.mjs +1 -1
- package/dist/plugins/captcha/index.d.cts +2 -2
- package/dist/plugins/captcha/index.d.mts +2 -2
- package/dist/plugins/captcha/index.d.ts +2 -2
- package/dist/plugins/custom-session/index.cjs +1 -1
- package/dist/plugins/custom-session/index.d.cts +2 -2
- package/dist/plugins/custom-session/index.d.mts +2 -2
- package/dist/plugins/custom-session/index.d.ts +2 -2
- package/dist/plugins/custom-session/index.mjs +1 -1
- package/dist/plugins/device-authorization/index.d.cts +2 -2
- package/dist/plugins/device-authorization/index.d.mts +2 -2
- package/dist/plugins/device-authorization/index.d.ts +2 -2
- package/dist/plugins/email-otp/index.cjs +1 -1
- package/dist/plugins/email-otp/index.d.cts +2 -2
- package/dist/plugins/email-otp/index.d.mts +2 -2
- package/dist/plugins/email-otp/index.d.ts +2 -2
- package/dist/plugins/email-otp/index.mjs +1 -1
- package/dist/plugins/generic-oauth/index.cjs +1 -1
- package/dist/plugins/generic-oauth/index.d.cts +2 -2
- package/dist/plugins/generic-oauth/index.d.mts +2 -2
- package/dist/plugins/generic-oauth/index.d.ts +2 -2
- package/dist/plugins/generic-oauth/index.mjs +1 -1
- package/dist/plugins/haveibeenpwned/index.cjs +1 -1
- package/dist/plugins/haveibeenpwned/index.d.cts +2 -2
- package/dist/plugins/haveibeenpwned/index.d.mts +2 -2
- package/dist/plugins/haveibeenpwned/index.d.ts +2 -2
- package/dist/plugins/haveibeenpwned/index.mjs +1 -1
- package/dist/plugins/index.cjs +10 -10
- package/dist/plugins/index.d.cts +8 -7
- package/dist/plugins/index.d.mts +8 -7
- package/dist/plugins/index.d.ts +8 -7
- package/dist/plugins/index.mjs +11 -11
- package/dist/plugins/jwt/index.cjs +1 -1
- package/dist/plugins/jwt/index.d.cts +2 -2
- package/dist/plugins/jwt/index.d.mts +2 -2
- package/dist/plugins/jwt/index.d.ts +2 -2
- package/dist/plugins/jwt/index.mjs +1 -1
- package/dist/plugins/magic-link/index.cjs +1 -1
- package/dist/plugins/magic-link/index.mjs +1 -1
- package/dist/plugins/multi-session/index.cjs +1 -1
- package/dist/plugins/multi-session/index.d.cts +2 -2
- package/dist/plugins/multi-session/index.d.mts +2 -2
- package/dist/plugins/multi-session/index.d.ts +2 -2
- package/dist/plugins/multi-session/index.mjs +1 -1
- package/dist/plugins/oauth-proxy/index.cjs +1 -1
- package/dist/plugins/oauth-proxy/index.d.cts +2 -2
- package/dist/plugins/oauth-proxy/index.d.mts +2 -2
- package/dist/plugins/oauth-proxy/index.d.ts +2 -2
- package/dist/plugins/oauth-proxy/index.mjs +1 -1
- package/dist/plugins/oidc-provider/index.cjs +2 -2
- package/dist/plugins/oidc-provider/index.d.cts +6 -6
- package/dist/plugins/oidc-provider/index.d.mts +6 -6
- package/dist/plugins/oidc-provider/index.d.ts +6 -6
- package/dist/plugins/oidc-provider/index.mjs +2 -2
- package/dist/plugins/one-tap/index.cjs +1 -1
- package/dist/plugins/one-tap/index.mjs +1 -1
- package/dist/plugins/one-time-token/index.cjs +3 -3
- package/dist/plugins/one-time-token/index.d.cts +2 -2
- package/dist/plugins/one-time-token/index.d.mts +2 -2
- package/dist/plugins/one-time-token/index.d.ts +2 -2
- package/dist/plugins/one-time-token/index.mjs +3 -3
- package/dist/plugins/open-api/index.cjs +1 -1
- package/dist/plugins/open-api/index.d.cts +2 -2
- package/dist/plugins/open-api/index.d.mts +2 -2
- package/dist/plugins/open-api/index.d.ts +2 -2
- package/dist/plugins/open-api/index.mjs +1 -1
- package/dist/plugins/organization/index.cjs +4 -4
- package/dist/plugins/organization/index.d.cts +4 -4
- package/dist/plugins/organization/index.d.mts +4 -4
- package/dist/plugins/organization/index.d.ts +4 -4
- package/dist/plugins/organization/index.mjs +4 -4
- package/dist/plugins/passkey/index.cjs +1 -1
- package/dist/plugins/passkey/index.d.cts +2 -2
- package/dist/plugins/passkey/index.d.mts +2 -2
- package/dist/plugins/passkey/index.d.ts +2 -2
- package/dist/plugins/passkey/index.mjs +1 -1
- package/dist/plugins/phone-number/index.cjs +1 -1
- package/dist/plugins/phone-number/index.d.cts +2 -2
- package/dist/plugins/phone-number/index.d.mts +2 -2
- package/dist/plugins/phone-number/index.d.ts +2 -2
- package/dist/plugins/phone-number/index.mjs +1 -1
- package/dist/plugins/siwe/index.cjs +1 -1
- package/dist/plugins/siwe/index.d.cts +2 -2
- package/dist/plugins/siwe/index.d.mts +2 -2
- package/dist/plugins/siwe/index.d.ts +2 -2
- package/dist/plugins/siwe/index.mjs +1 -1
- package/dist/plugins/sso/index.cjs +1 -1
- package/dist/plugins/sso/index.d.cts +4 -4
- package/dist/plugins/sso/index.d.mts +4 -4
- package/dist/plugins/sso/index.d.ts +4 -4
- package/dist/plugins/sso/index.mjs +1 -1
- package/dist/plugins/two-factor/index.cjs +1 -1
- package/dist/plugins/two-factor/index.d.cts +2 -2
- package/dist/plugins/two-factor/index.d.mts +2 -2
- package/dist/plugins/two-factor/index.d.ts +2 -2
- package/dist/plugins/two-factor/index.mjs +1 -1
- package/dist/plugins/username/index.cjs +1 -1
- package/dist/plugins/username/index.d.cts +4 -4
- package/dist/plugins/username/index.d.mts +4 -4
- package/dist/plugins/username/index.d.ts +4 -4
- package/dist/plugins/username/index.mjs +1 -1
- package/dist/shared/{better-auth.DIVj9vPt.mjs → better-auth.3K3VNUn3.mjs} +1 -1
- package/dist/shared/{better-auth.BAH6fCWD.cjs → better-auth.B1yOWNP8.cjs} +1 -1
- package/dist/shared/{better-auth.nqWf7zUe.mjs → better-auth.B3CPLvGC.mjs} +5 -2
- package/dist/shared/{better-auth.BA2h5uPw.mjs → better-auth.B8UjXTUa.mjs} +3 -64
- package/dist/shared/{better-auth.DQ0tJQPp.cjs → better-auth.BWzwHY8m.cjs} +1 -1
- package/dist/shared/{better-auth.Cgmn9Fog.d.mts → better-auth.BZiffGTH.d.mts} +1 -1
- package/dist/shared/{better-auth.DQunmJlF.mjs → better-auth.BjjUH-Ka.mjs} +1 -1
- package/dist/shared/{better-auth.BYiVM63b.mjs → better-auth.BlqpEUaH.mjs} +4 -4
- package/dist/shared/{better-auth.D5EWSfdb.d.cts → better-auth.CEc4wau_.d.cts} +1 -1
- package/dist/shared/{better-auth.BIJBY4I4.d.cts → better-auth.CTMmErGI.d.cts} +2 -2
- package/dist/shared/{better-auth.DtH5dc5P.cjs → better-auth.CXBi-DJc.cjs} +3 -3
- package/dist/shared/{better-auth.B1-Ox-3r.cjs → better-auth.C_gHVcnc.cjs} +7 -0
- package/dist/shared/{better-auth.Dzm1HvKI.d.mts → better-auth.ChqAn6N0.d.mts} +1 -1
- package/dist/shared/{better-auth.DVhkokI7.mjs → better-auth.Ck4qhtF6.mjs} +1 -1
- package/dist/shared/{better-auth.BUyNJDKf.d.ts → better-auth.CnIVrMwK.d.ts} +1 -1
- package/dist/shared/{better-auth.h_x91clN.d.cts → better-auth.D9BrVtBy.d.cts} +1 -1
- package/dist/shared/{better-auth.DlWzob1-.mjs → better-auth.DAUyNtx1.mjs} +3 -3
- package/dist/shared/{better-auth.B-Ud-fSV.mjs → better-auth.DDDKwecE.mjs} +2 -2
- package/dist/shared/{better-auth.DlDZ0HYa.cjs → better-auth.DFJOJkY1.cjs} +4 -4
- package/dist/shared/{better-auth.C24xvKiK.d.cts → better-auth.DGuotwA1.d.cts} +6 -6
- package/dist/shared/{better-auth.DHFf2nZ9.cjs → better-auth.DTV9hYzN.cjs} +2 -2
- package/dist/shared/{better-auth.DFpuqBlM.d.ts → better-auth.DU2vRHKI.d.ts} +6 -6
- package/dist/shared/{better-auth.B8b3lep0.mjs → better-auth.DXKgbji-.mjs} +13 -1
- package/dist/shared/{better-auth.PF4vmqR_.cjs → better-auth.Dc0nj0we.cjs} +5 -2
- package/dist/shared/{better-auth.DSyrs_Ma.d.mts → better-auth.Df1_Wu_1.d.mts} +5 -5
- package/dist/shared/{better-auth.CCB6dj0q.cjs → better-auth.DtZRMuXL.cjs} +1 -1
- package/dist/shared/{better-auth.BmYM45vZ.cjs → better-auth.Dyb4JEgv.cjs} +2 -2
- package/dist/shared/{better-auth.DwqUQnE2.d.ts → better-auth.EF9Iq11i.d.ts} +1 -1
- package/dist/shared/{better-auth.DYTLL0-k.cjs → better-auth.TZOo7890.cjs} +1 -62
- package/dist/shared/{better-auth.CF8G3gBm.d.ts → better-auth.WOu5GuAp.d.ts} +5 -5
- package/dist/shared/{better-auth.DA6N5T2Z.mjs → better-auth.XP_NDvic.mjs} +7 -0
- package/dist/shared/{better-auth.DWpv-qG8.cjs → better-auth.YWGwdADP.cjs} +13 -1
- package/dist/shared/{better-auth.DUWKOO0N.d.mts → better-auth.ZUo2dMO3.d.mts} +2 -2
- package/dist/shared/{better-auth.Bb1FRSH5.cjs → better-auth.aZPAhP-f.cjs} +5 -0
- package/dist/shared/{better-auth.B5M8DinZ.d.mts → better-auth.f-bUldRg.d.mts} +6 -6
- package/dist/shared/{better-auth.CSVCtb77.mjs → better-auth.fBcUR9cm.mjs} +2 -2
- package/dist/shared/{better-auth.C7uhlcDq.mjs → better-auth.gF8vGD5L.mjs} +5 -0
- package/dist/shared/{better-auth.BH54xFDQ.d.cts → better-auth.llWU4_4y.d.cts} +5 -5
- package/dist/shared/{better-auth.DOq11zLi.d.ts → better-auth.mA4L_-fq.d.ts} +2 -2
- package/dist/social-providers/index.cjs +1 -1
- package/dist/social-providers/index.d.cts +1 -1
- package/dist/social-providers/index.d.mts +1 -1
- package/dist/social-providers/index.d.ts +1 -1
- package/dist/social-providers/index.mjs +1 -1
- package/dist/test-utils/index.cjs +7 -7
- package/dist/test-utils/index.d.cts +3 -3
- package/dist/test-utils/index.d.mts +3 -3
- package/dist/test-utils/index.d.ts +3 -3
- package/dist/test-utils/index.mjs +7 -7
- package/dist/types/index.d.cts +3 -3
- package/dist/types/index.d.mts +3 -3
- package/dist/types/index.d.ts +3 -3
- package/package.json +1 -1
|
@@ -100,6 +100,14 @@ const drizzleAdapter = (db, config) => index.createAdapter({
|
|
|
100
100
|
}
|
|
101
101
|
return [drizzleOrm.inArray(schemaModel[field], w.value)];
|
|
102
102
|
}
|
|
103
|
+
if (w.operator === "not_in") {
|
|
104
|
+
if (!Array.isArray(w.value)) {
|
|
105
|
+
throw new index$1.BetterAuthError(
|
|
106
|
+
`The value for the field "${w.field}" must be an array when using the "not_in" operator.`
|
|
107
|
+
);
|
|
108
|
+
}
|
|
109
|
+
return [drizzleOrm.notInArray(schemaModel[field], w.value)];
|
|
110
|
+
}
|
|
103
111
|
if (w.operator === "contains") {
|
|
104
112
|
return [drizzleOrm.like(schemaModel[field], `%${w.value}%`)];
|
|
105
113
|
}
|
|
@@ -141,6 +149,14 @@ const drizzleAdapter = (db, config) => index.createAdapter({
|
|
|
141
149
|
}
|
|
142
150
|
return drizzleOrm.inArray(schemaModel[field], w.value);
|
|
143
151
|
}
|
|
152
|
+
if (w.operator === "not_in") {
|
|
153
|
+
if (!Array.isArray(w.value)) {
|
|
154
|
+
throw new index$1.BetterAuthError(
|
|
155
|
+
`The value for the field "${w.field}" must be an array when using the "not_in" operator.`
|
|
156
|
+
);
|
|
157
|
+
}
|
|
158
|
+
return drizzleOrm.notInArray(schemaModel[field], w.value);
|
|
159
|
+
}
|
|
144
160
|
return drizzleOrm.eq(schemaModel[field], w.value);
|
|
145
161
|
})
|
|
146
162
|
);
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { A as AdapterDebugLogs, B as BetterAuthOptions, a as Adapter } from '../../shared/better-auth.
|
|
1
|
+
import { A as AdapterDebugLogs, B as BetterAuthOptions, a as Adapter } from '../../shared/better-auth.DGuotwA1.cjs';
|
|
2
2
|
import 'kysely';
|
|
3
3
|
import 'better-call';
|
|
4
4
|
import 'zod/v4';
|
|
5
5
|
import '../../shared/better-auth.DTtXpZYr.cjs';
|
|
6
|
-
import '../../shared/better-auth.
|
|
6
|
+
import '../../shared/better-auth.CTMmErGI.cjs';
|
|
7
7
|
import 'jose';
|
|
8
8
|
import 'zod/v4/core';
|
|
9
9
|
import 'zod';
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { A as AdapterDebugLogs, B as BetterAuthOptions, a as Adapter } from '../../shared/better-auth.
|
|
1
|
+
import { A as AdapterDebugLogs, B as BetterAuthOptions, a as Adapter } from '../../shared/better-auth.f-bUldRg.mjs';
|
|
2
2
|
import 'kysely';
|
|
3
3
|
import 'better-call';
|
|
4
4
|
import 'zod/v4';
|
|
5
5
|
import '../../shared/better-auth.DTtXpZYr.mjs';
|
|
6
|
-
import '../../shared/better-auth.
|
|
6
|
+
import '../../shared/better-auth.ZUo2dMO3.mjs';
|
|
7
7
|
import 'jose';
|
|
8
8
|
import 'zod/v4/core';
|
|
9
9
|
import 'zod';
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { A as AdapterDebugLogs, B as BetterAuthOptions, a as Adapter } from '../../shared/better-auth.
|
|
1
|
+
import { A as AdapterDebugLogs, B as BetterAuthOptions, a as Adapter } from '../../shared/better-auth.DU2vRHKI.js';
|
|
2
2
|
import 'kysely';
|
|
3
3
|
import 'better-call';
|
|
4
4
|
import 'zod/v4';
|
|
5
5
|
import '../../shared/better-auth.DTtXpZYr.js';
|
|
6
|
-
import '../../shared/better-auth.
|
|
6
|
+
import '../../shared/better-auth.mA4L_-fq.js';
|
|
7
7
|
import 'jose';
|
|
8
8
|
import 'zod/v4/core';
|
|
9
9
|
import 'zod';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { count, desc, asc, sql, eq, inArray, like, lt, lte, ne, gt, gte, and, or } from 'drizzle-orm';
|
|
1
|
+
import { count, desc, asc, sql, eq, inArray, notInArray, like, lt, lte, ne, gt, gte, and, or } from 'drizzle-orm';
|
|
2
2
|
import { B as BetterAuthError } from '../../shared/better-auth.DdzSJf-n.mjs';
|
|
3
3
|
import { c as createAdapter } from '../../shared/better-auth.BuBqXPUp.mjs';
|
|
4
4
|
import '../../shared/better-auth.BZZKN1g7.mjs';
|
|
@@ -98,6 +98,14 @@ const drizzleAdapter = (db, config) => createAdapter({
|
|
|
98
98
|
}
|
|
99
99
|
return [inArray(schemaModel[field], w.value)];
|
|
100
100
|
}
|
|
101
|
+
if (w.operator === "not_in") {
|
|
102
|
+
if (!Array.isArray(w.value)) {
|
|
103
|
+
throw new BetterAuthError(
|
|
104
|
+
`The value for the field "${w.field}" must be an array when using the "not_in" operator.`
|
|
105
|
+
);
|
|
106
|
+
}
|
|
107
|
+
return [notInArray(schemaModel[field], w.value)];
|
|
108
|
+
}
|
|
101
109
|
if (w.operator === "contains") {
|
|
102
110
|
return [like(schemaModel[field], `%${w.value}%`)];
|
|
103
111
|
}
|
|
@@ -139,6 +147,14 @@ const drizzleAdapter = (db, config) => createAdapter({
|
|
|
139
147
|
}
|
|
140
148
|
return inArray(schemaModel[field], w.value);
|
|
141
149
|
}
|
|
150
|
+
if (w.operator === "not_in") {
|
|
151
|
+
if (!Array.isArray(w.value)) {
|
|
152
|
+
throw new BetterAuthError(
|
|
153
|
+
`The value for the field "${w.field}" must be an array when using the "not_in" operator.`
|
|
154
|
+
);
|
|
155
|
+
}
|
|
156
|
+
return notInArray(schemaModel[field], w.value);
|
|
157
|
+
}
|
|
142
158
|
return eq(schemaModel[field], w.value);
|
|
143
159
|
})
|
|
144
160
|
);
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { b as AdapterConfig, C as CreateCustomAdapter, B as BetterAuthOptions, a as Adapter } from '../shared/better-auth.
|
|
2
|
-
export { A as AdapterDebugLogs, e as AdapterTestDebugLogs, d as CleanedWhere, c as CustomAdapter } from '../shared/better-auth.
|
|
1
|
+
import { b as AdapterConfig, C as CreateCustomAdapter, B as BetterAuthOptions, a as Adapter } from '../shared/better-auth.DGuotwA1.cjs';
|
|
2
|
+
export { A as AdapterDebugLogs, e as AdapterTestDebugLogs, d as CleanedWhere, c as CustomAdapter } from '../shared/better-auth.DGuotwA1.cjs';
|
|
3
3
|
import 'kysely';
|
|
4
4
|
import 'better-call';
|
|
5
5
|
import 'zod/v4';
|
|
6
6
|
import '../shared/better-auth.DTtXpZYr.cjs';
|
|
7
|
-
import '../shared/better-auth.
|
|
7
|
+
import '../shared/better-auth.CTMmErGI.cjs';
|
|
8
8
|
import 'jose';
|
|
9
9
|
import 'zod/v4/core';
|
|
10
10
|
import 'zod';
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { b as AdapterConfig, C as CreateCustomAdapter, B as BetterAuthOptions, a as Adapter } from '../shared/better-auth.
|
|
2
|
-
export { A as AdapterDebugLogs, e as AdapterTestDebugLogs, d as CleanedWhere, c as CustomAdapter } from '../shared/better-auth.
|
|
1
|
+
import { b as AdapterConfig, C as CreateCustomAdapter, B as BetterAuthOptions, a as Adapter } from '../shared/better-auth.f-bUldRg.mjs';
|
|
2
|
+
export { A as AdapterDebugLogs, e as AdapterTestDebugLogs, d as CleanedWhere, c as CustomAdapter } from '../shared/better-auth.f-bUldRg.mjs';
|
|
3
3
|
import 'kysely';
|
|
4
4
|
import 'better-call';
|
|
5
5
|
import 'zod/v4';
|
|
6
6
|
import '../shared/better-auth.DTtXpZYr.mjs';
|
|
7
|
-
import '../shared/better-auth.
|
|
7
|
+
import '../shared/better-auth.ZUo2dMO3.mjs';
|
|
8
8
|
import 'jose';
|
|
9
9
|
import 'zod/v4/core';
|
|
10
10
|
import 'zod';
|
package/dist/adapters/index.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { b as AdapterConfig, C as CreateCustomAdapter, B as BetterAuthOptions, a as Adapter } from '../shared/better-auth.
|
|
2
|
-
export { A as AdapterDebugLogs, e as AdapterTestDebugLogs, d as CleanedWhere, c as CustomAdapter } from '../shared/better-auth.
|
|
1
|
+
import { b as AdapterConfig, C as CreateCustomAdapter, B as BetterAuthOptions, a as Adapter } from '../shared/better-auth.DU2vRHKI.js';
|
|
2
|
+
export { A as AdapterDebugLogs, e as AdapterTestDebugLogs, d as CleanedWhere, c as CustomAdapter } from '../shared/better-auth.DU2vRHKI.js';
|
|
3
3
|
import 'kysely';
|
|
4
4
|
import 'better-call';
|
|
5
5
|
import 'zod/v4';
|
|
6
6
|
import '../shared/better-auth.DTtXpZYr.js';
|
|
7
|
-
import '../shared/better-auth.
|
|
7
|
+
import '../shared/better-auth.mA4L_-fq.js';
|
|
8
8
|
import 'jose';
|
|
9
9
|
import 'zod/v4/core';
|
|
10
10
|
import 'zod';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
const kyselyAdapter = require('../../shared/better-auth.
|
|
3
|
+
const kyselyAdapter = require('../../shared/better-auth.YWGwdADP.cjs');
|
|
4
4
|
require('kysely');
|
|
5
5
|
require('../../shared/better-auth.C9jfJUDF.cjs');
|
|
6
6
|
require('../../shared/better-auth.vPQBmXQL.cjs');
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { Kysely } from 'kysely';
|
|
2
|
-
import { B as BetterAuthOptions, K as KyselyDatabaseType, A as AdapterDebugLogs, a as Adapter } from '../../shared/better-auth.
|
|
2
|
+
import { B as BetterAuthOptions, K as KyselyDatabaseType, A as AdapterDebugLogs, a as Adapter } from '../../shared/better-auth.DGuotwA1.cjs';
|
|
3
3
|
import 'better-call';
|
|
4
4
|
import 'zod/v4';
|
|
5
5
|
import '../../shared/better-auth.DTtXpZYr.cjs';
|
|
6
|
-
import '../../shared/better-auth.
|
|
6
|
+
import '../../shared/better-auth.CTMmErGI.cjs';
|
|
7
7
|
import 'jose';
|
|
8
8
|
import 'zod/v4/core';
|
|
9
9
|
import 'zod';
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { Kysely } from 'kysely';
|
|
2
|
-
import { B as BetterAuthOptions, K as KyselyDatabaseType, A as AdapterDebugLogs, a as Adapter } from '../../shared/better-auth.
|
|
2
|
+
import { B as BetterAuthOptions, K as KyselyDatabaseType, A as AdapterDebugLogs, a as Adapter } from '../../shared/better-auth.f-bUldRg.mjs';
|
|
3
3
|
import 'better-call';
|
|
4
4
|
import 'zod/v4';
|
|
5
5
|
import '../../shared/better-auth.DTtXpZYr.mjs';
|
|
6
|
-
import '../../shared/better-auth.
|
|
6
|
+
import '../../shared/better-auth.ZUo2dMO3.mjs';
|
|
7
7
|
import 'jose';
|
|
8
8
|
import 'zod/v4/core';
|
|
9
9
|
import 'zod';
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { Kysely } from 'kysely';
|
|
2
|
-
import { B as BetterAuthOptions, K as KyselyDatabaseType, A as AdapterDebugLogs, a as Adapter } from '../../shared/better-auth.
|
|
2
|
+
import { B as BetterAuthOptions, K as KyselyDatabaseType, A as AdapterDebugLogs, a as Adapter } from '../../shared/better-auth.DU2vRHKI.js';
|
|
3
3
|
import 'better-call';
|
|
4
4
|
import 'zod/v4';
|
|
5
5
|
import '../../shared/better-auth.DTtXpZYr.js';
|
|
6
|
-
import '../../shared/better-auth.
|
|
6
|
+
import '../../shared/better-auth.mA4L_-fq.js';
|
|
7
7
|
import 'jose';
|
|
8
8
|
import 'zod/v4/core';
|
|
9
9
|
import 'zod';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { c as createKyselyAdapter, g as getKyselyDatabaseType, k as kyselyAdapter } from '../../shared/better-auth.
|
|
1
|
+
export { c as createKyselyAdapter, g as getKyselyDatabaseType, k as kyselyAdapter } from '../../shared/better-auth.DXKgbji-.mjs';
|
|
2
2
|
import 'kysely';
|
|
3
3
|
import '../../shared/better-auth.BuBqXPUp.mjs';
|
|
4
4
|
import '../../shared/better-auth.BZZKN1g7.mjs';
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { A as AdapterDebugLogs, B as BetterAuthOptions, a as Adapter } from '../../shared/better-auth.
|
|
1
|
+
import { A as AdapterDebugLogs, B as BetterAuthOptions, a as Adapter } from '../../shared/better-auth.DGuotwA1.cjs';
|
|
2
2
|
import 'kysely';
|
|
3
3
|
import 'better-call';
|
|
4
4
|
import 'zod/v4';
|
|
5
5
|
import '../../shared/better-auth.DTtXpZYr.cjs';
|
|
6
|
-
import '../../shared/better-auth.
|
|
6
|
+
import '../../shared/better-auth.CTMmErGI.cjs';
|
|
7
7
|
import 'jose';
|
|
8
8
|
import 'zod/v4/core';
|
|
9
9
|
import 'zod';
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { A as AdapterDebugLogs, B as BetterAuthOptions, a as Adapter } from '../../shared/better-auth.
|
|
1
|
+
import { A as AdapterDebugLogs, B as BetterAuthOptions, a as Adapter } from '../../shared/better-auth.f-bUldRg.mjs';
|
|
2
2
|
import 'kysely';
|
|
3
3
|
import 'better-call';
|
|
4
4
|
import 'zod/v4';
|
|
5
5
|
import '../../shared/better-auth.DTtXpZYr.mjs';
|
|
6
|
-
import '../../shared/better-auth.
|
|
6
|
+
import '../../shared/better-auth.ZUo2dMO3.mjs';
|
|
7
7
|
import 'jose';
|
|
8
8
|
import 'zod/v4/core';
|
|
9
9
|
import 'zod';
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { A as AdapterDebugLogs, B as BetterAuthOptions, a as Adapter } from '../../shared/better-auth.
|
|
1
|
+
import { A as AdapterDebugLogs, B as BetterAuthOptions, a as Adapter } from '../../shared/better-auth.DU2vRHKI.js';
|
|
2
2
|
import 'kysely';
|
|
3
3
|
import 'better-call';
|
|
4
4
|
import 'zod/v4';
|
|
5
5
|
import '../../shared/better-auth.DTtXpZYr.js';
|
|
6
|
-
import '../../shared/better-auth.
|
|
6
|
+
import '../../shared/better-auth.mA4L_-fq.js';
|
|
7
7
|
import 'jose';
|
|
8
8
|
import 'zod/v4/core';
|
|
9
9
|
import 'zod';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
const mongodbAdapter = require('../../shared/better-auth.
|
|
3
|
+
const mongodbAdapter = require('../../shared/better-auth.C_gHVcnc.cjs');
|
|
4
4
|
require('mongodb');
|
|
5
5
|
require('../../shared/better-auth.C9jfJUDF.cjs');
|
|
6
6
|
require('../../shared/better-auth.vPQBmXQL.cjs');
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { A as AdapterDebugLogs, B as BetterAuthOptions, a as Adapter } from '../../shared/better-auth.
|
|
1
|
+
import { A as AdapterDebugLogs, B as BetterAuthOptions, a as Adapter } from '../../shared/better-auth.DGuotwA1.cjs';
|
|
2
2
|
import { Db } from 'mongodb';
|
|
3
3
|
import 'kysely';
|
|
4
4
|
import 'better-call';
|
|
5
5
|
import 'zod/v4';
|
|
6
6
|
import '../../shared/better-auth.DTtXpZYr.cjs';
|
|
7
|
-
import '../../shared/better-auth.
|
|
7
|
+
import '../../shared/better-auth.CTMmErGI.cjs';
|
|
8
8
|
import 'jose';
|
|
9
9
|
import 'zod/v4/core';
|
|
10
10
|
import 'zod';
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { A as AdapterDebugLogs, B as BetterAuthOptions, a as Adapter } from '../../shared/better-auth.
|
|
1
|
+
import { A as AdapterDebugLogs, B as BetterAuthOptions, a as Adapter } from '../../shared/better-auth.f-bUldRg.mjs';
|
|
2
2
|
import { Db } from 'mongodb';
|
|
3
3
|
import 'kysely';
|
|
4
4
|
import 'better-call';
|
|
5
5
|
import 'zod/v4';
|
|
6
6
|
import '../../shared/better-auth.DTtXpZYr.mjs';
|
|
7
|
-
import '../../shared/better-auth.
|
|
7
|
+
import '../../shared/better-auth.ZUo2dMO3.mjs';
|
|
8
8
|
import 'jose';
|
|
9
9
|
import 'zod/v4/core';
|
|
10
10
|
import 'zod';
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { A as AdapterDebugLogs, B as BetterAuthOptions, a as Adapter } from '../../shared/better-auth.
|
|
1
|
+
import { A as AdapterDebugLogs, B as BetterAuthOptions, a as Adapter } from '../../shared/better-auth.DU2vRHKI.js';
|
|
2
2
|
import { Db } from 'mongodb';
|
|
3
3
|
import 'kysely';
|
|
4
4
|
import 'better-call';
|
|
5
5
|
import 'zod/v4';
|
|
6
6
|
import '../../shared/better-auth.DTtXpZYr.js';
|
|
7
|
-
import '../../shared/better-auth.
|
|
7
|
+
import '../../shared/better-auth.mA4L_-fq.js';
|
|
8
8
|
import 'jose';
|
|
9
9
|
import 'zod/v4/core';
|
|
10
10
|
import 'zod';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { m as mongodbAdapter } from '../../shared/better-auth.
|
|
1
|
+
export { m as mongodbAdapter } from '../../shared/better-auth.XP_NDvic.mjs';
|
|
2
2
|
import 'mongodb';
|
|
3
3
|
import '../../shared/better-auth.BuBqXPUp.mjs';
|
|
4
4
|
import '../../shared/better-auth.BZZKN1g7.mjs';
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { A as AdapterDebugLogs, B as BetterAuthOptions, a as Adapter } from '../../shared/better-auth.
|
|
1
|
+
import { A as AdapterDebugLogs, B as BetterAuthOptions, a as Adapter } from '../../shared/better-auth.DGuotwA1.cjs';
|
|
2
2
|
import 'kysely';
|
|
3
3
|
import 'better-call';
|
|
4
4
|
import 'zod/v4';
|
|
5
5
|
import '../../shared/better-auth.DTtXpZYr.cjs';
|
|
6
|
-
import '../../shared/better-auth.
|
|
6
|
+
import '../../shared/better-auth.CTMmErGI.cjs';
|
|
7
7
|
import 'jose';
|
|
8
8
|
import 'zod/v4/core';
|
|
9
9
|
import 'zod';
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { A as AdapterDebugLogs, B as BetterAuthOptions, a as Adapter } from '../../shared/better-auth.
|
|
1
|
+
import { A as AdapterDebugLogs, B as BetterAuthOptions, a as Adapter } from '../../shared/better-auth.f-bUldRg.mjs';
|
|
2
2
|
import 'kysely';
|
|
3
3
|
import 'better-call';
|
|
4
4
|
import 'zod/v4';
|
|
5
5
|
import '../../shared/better-auth.DTtXpZYr.mjs';
|
|
6
|
-
import '../../shared/better-auth.
|
|
6
|
+
import '../../shared/better-auth.ZUo2dMO3.mjs';
|
|
7
7
|
import 'jose';
|
|
8
8
|
import 'zod/v4/core';
|
|
9
9
|
import 'zod';
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { A as AdapterDebugLogs, B as BetterAuthOptions, a as Adapter } from '../../shared/better-auth.
|
|
1
|
+
import { A as AdapterDebugLogs, B as BetterAuthOptions, a as Adapter } from '../../shared/better-auth.DU2vRHKI.js';
|
|
2
2
|
import 'kysely';
|
|
3
3
|
import 'better-call';
|
|
4
4
|
import 'zod/v4';
|
|
5
5
|
import '../../shared/better-auth.DTtXpZYr.js';
|
|
6
|
-
import '../../shared/better-auth.
|
|
6
|
+
import '../../shared/better-auth.mA4L_-fq.js';
|
|
7
7
|
import 'jose';
|
|
8
8
|
import 'zod/v4/core';
|
|
9
9
|
import 'zod';
|
package/dist/adapters/test.cjs
CHANGED
|
@@ -30,6 +30,7 @@ const adapterTests = {
|
|
|
30
30
|
SHOULD_FIND_MANY_WITH_WHERE: "should find many with where",
|
|
31
31
|
SHOULD_FIND_MANY_WITH_OPERATORS: "should find many with operators",
|
|
32
32
|
SHOULD_WORK_WITH_REFERENCE_FIELDS: "should work with reference fields",
|
|
33
|
+
SHOULD_FIND_MANY_WITH_NOT_IN_OPERATOR: "should find many with not in operator",
|
|
33
34
|
SHOULD_FIND_MANY_WITH_SORT_BY: "should find many with sortBy",
|
|
34
35
|
SHOULD_FIND_MANY_WITH_LIMIT: "should find many with limit",
|
|
35
36
|
SHOULD_FIND_MANY_WITH_OFFSET: "should find many with offset",
|
|
@@ -316,6 +317,49 @@ async function adapterTest({ getAdapter, disableTests: disabledTests, testPrefix
|
|
|
316
317
|
vitest.expect(res.length).toBe(2);
|
|
317
318
|
}
|
|
318
319
|
);
|
|
320
|
+
vitest.test.skipIf(disabledTests?.SHOULD_FIND_MANY_WITH_NOT_IN_OPERATOR)(
|
|
321
|
+
`${testPrefix ? `${testPrefix} - ` : ""}${adapterTests.SHOULD_FIND_MANY_WITH_NOT_IN_OPERATOR}`,
|
|
322
|
+
async ({ onTestFailed }) => {
|
|
323
|
+
await resetDebugLogs();
|
|
324
|
+
onTestFailed(async () => {
|
|
325
|
+
await printDebugLogs();
|
|
326
|
+
});
|
|
327
|
+
const newUser3 = await (await adapter()).create({
|
|
328
|
+
model: "user",
|
|
329
|
+
data: {
|
|
330
|
+
name: "user",
|
|
331
|
+
email: "test-email3email.com",
|
|
332
|
+
emailVerified: true,
|
|
333
|
+
createdAt: /* @__PURE__ */ new Date(),
|
|
334
|
+
updatedAt: /* @__PURE__ */ new Date()
|
|
335
|
+
}
|
|
336
|
+
});
|
|
337
|
+
const allUsers = await (await adapter()).findMany({
|
|
338
|
+
model: "user"
|
|
339
|
+
});
|
|
340
|
+
vitest.expect(allUsers.length).toBe(6);
|
|
341
|
+
const usersWithoutNotIn = await (await adapter()).findMany({
|
|
342
|
+
model: "user",
|
|
343
|
+
where: [
|
|
344
|
+
{
|
|
345
|
+
field: "id",
|
|
346
|
+
operator: "not_in",
|
|
347
|
+
value: [user.id, newUser3.id]
|
|
348
|
+
}
|
|
349
|
+
]
|
|
350
|
+
});
|
|
351
|
+
vitest.expect(usersWithoutNotIn.length).toBe(4);
|
|
352
|
+
await (await adapter()).delete({
|
|
353
|
+
model: "user",
|
|
354
|
+
where: [
|
|
355
|
+
{
|
|
356
|
+
field: "id",
|
|
357
|
+
value: newUser3.id
|
|
358
|
+
}
|
|
359
|
+
]
|
|
360
|
+
});
|
|
361
|
+
}
|
|
362
|
+
);
|
|
319
363
|
vitest.test.skipIf(disabledTests?.SHOULD_WORK_WITH_REFERENCE_FIELDS)(
|
|
320
364
|
`${testPrefix ? `${testPrefix} - ` : ""}${adapterTests.SHOULD_WORK_WITH_REFERENCE_FIELDS}`,
|
|
321
365
|
async ({ onTestFailed }) => {
|
package/dist/adapters/test.d.cts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { B as BetterAuthOptions, a as Adapter } from '../shared/better-auth.
|
|
1
|
+
import { B as BetterAuthOptions, a as Adapter } from '../shared/better-auth.DGuotwA1.cjs';
|
|
2
2
|
import 'kysely';
|
|
3
3
|
import 'better-call';
|
|
4
4
|
import 'zod/v4';
|
|
5
5
|
import '../shared/better-auth.DTtXpZYr.cjs';
|
|
6
|
-
import '../shared/better-auth.
|
|
6
|
+
import '../shared/better-auth.CTMmErGI.cjs';
|
|
7
7
|
import 'jose';
|
|
8
8
|
import 'zod/v4/core';
|
|
9
9
|
import 'zod';
|
|
@@ -33,6 +33,7 @@ declare const adapterTests: {
|
|
|
33
33
|
readonly SHOULD_FIND_MANY_WITH_WHERE: "should find many with where";
|
|
34
34
|
readonly SHOULD_FIND_MANY_WITH_OPERATORS: "should find many with operators";
|
|
35
35
|
readonly SHOULD_WORK_WITH_REFERENCE_FIELDS: "should work with reference fields";
|
|
36
|
+
readonly SHOULD_FIND_MANY_WITH_NOT_IN_OPERATOR: "should find many with not in operator";
|
|
36
37
|
readonly SHOULD_FIND_MANY_WITH_SORT_BY: "should find many with sortBy";
|
|
37
38
|
readonly SHOULD_FIND_MANY_WITH_LIMIT: "should find many with limit";
|
|
38
39
|
readonly SHOULD_FIND_MANY_WITH_OFFSET: "should find many with offset";
|
|
@@ -60,6 +61,7 @@ declare const numberIdAdapterTests: {
|
|
|
60
61
|
SHOULD_FIND_MANY_WITH_WHERE: "should find many with where";
|
|
61
62
|
SHOULD_FIND_MANY_WITH_OPERATORS: "should find many with operators";
|
|
62
63
|
SHOULD_WORK_WITH_REFERENCE_FIELDS: "should work with reference fields";
|
|
64
|
+
SHOULD_FIND_MANY_WITH_NOT_IN_OPERATOR: "should find many with not in operator";
|
|
63
65
|
SHOULD_FIND_MANY_WITH_SORT_BY: "should find many with sortBy";
|
|
64
66
|
SHOULD_FIND_MANY_WITH_LIMIT: "should find many with limit";
|
|
65
67
|
SHOULD_FIND_MANY_WITH_OFFSET: "should find many with offset";
|
package/dist/adapters/test.d.mts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { B as BetterAuthOptions, a as Adapter } from '../shared/better-auth.
|
|
1
|
+
import { B as BetterAuthOptions, a as Adapter } from '../shared/better-auth.f-bUldRg.mjs';
|
|
2
2
|
import 'kysely';
|
|
3
3
|
import 'better-call';
|
|
4
4
|
import 'zod/v4';
|
|
5
5
|
import '../shared/better-auth.DTtXpZYr.mjs';
|
|
6
|
-
import '../shared/better-auth.
|
|
6
|
+
import '../shared/better-auth.ZUo2dMO3.mjs';
|
|
7
7
|
import 'jose';
|
|
8
8
|
import 'zod/v4/core';
|
|
9
9
|
import 'zod';
|
|
@@ -33,6 +33,7 @@ declare const adapterTests: {
|
|
|
33
33
|
readonly SHOULD_FIND_MANY_WITH_WHERE: "should find many with where";
|
|
34
34
|
readonly SHOULD_FIND_MANY_WITH_OPERATORS: "should find many with operators";
|
|
35
35
|
readonly SHOULD_WORK_WITH_REFERENCE_FIELDS: "should work with reference fields";
|
|
36
|
+
readonly SHOULD_FIND_MANY_WITH_NOT_IN_OPERATOR: "should find many with not in operator";
|
|
36
37
|
readonly SHOULD_FIND_MANY_WITH_SORT_BY: "should find many with sortBy";
|
|
37
38
|
readonly SHOULD_FIND_MANY_WITH_LIMIT: "should find many with limit";
|
|
38
39
|
readonly SHOULD_FIND_MANY_WITH_OFFSET: "should find many with offset";
|
|
@@ -60,6 +61,7 @@ declare const numberIdAdapterTests: {
|
|
|
60
61
|
SHOULD_FIND_MANY_WITH_WHERE: "should find many with where";
|
|
61
62
|
SHOULD_FIND_MANY_WITH_OPERATORS: "should find many with operators";
|
|
62
63
|
SHOULD_WORK_WITH_REFERENCE_FIELDS: "should work with reference fields";
|
|
64
|
+
SHOULD_FIND_MANY_WITH_NOT_IN_OPERATOR: "should find many with not in operator";
|
|
63
65
|
SHOULD_FIND_MANY_WITH_SORT_BY: "should find many with sortBy";
|
|
64
66
|
SHOULD_FIND_MANY_WITH_LIMIT: "should find many with limit";
|
|
65
67
|
SHOULD_FIND_MANY_WITH_OFFSET: "should find many with offset";
|
package/dist/adapters/test.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { B as BetterAuthOptions, a as Adapter } from '../shared/better-auth.
|
|
1
|
+
import { B as BetterAuthOptions, a as Adapter } from '../shared/better-auth.DU2vRHKI.js';
|
|
2
2
|
import 'kysely';
|
|
3
3
|
import 'better-call';
|
|
4
4
|
import 'zod/v4';
|
|
5
5
|
import '../shared/better-auth.DTtXpZYr.js';
|
|
6
|
-
import '../shared/better-auth.
|
|
6
|
+
import '../shared/better-auth.mA4L_-fq.js';
|
|
7
7
|
import 'jose';
|
|
8
8
|
import 'zod/v4/core';
|
|
9
9
|
import 'zod';
|
|
@@ -33,6 +33,7 @@ declare const adapterTests: {
|
|
|
33
33
|
readonly SHOULD_FIND_MANY_WITH_WHERE: "should find many with where";
|
|
34
34
|
readonly SHOULD_FIND_MANY_WITH_OPERATORS: "should find many with operators";
|
|
35
35
|
readonly SHOULD_WORK_WITH_REFERENCE_FIELDS: "should work with reference fields";
|
|
36
|
+
readonly SHOULD_FIND_MANY_WITH_NOT_IN_OPERATOR: "should find many with not in operator";
|
|
36
37
|
readonly SHOULD_FIND_MANY_WITH_SORT_BY: "should find many with sortBy";
|
|
37
38
|
readonly SHOULD_FIND_MANY_WITH_LIMIT: "should find many with limit";
|
|
38
39
|
readonly SHOULD_FIND_MANY_WITH_OFFSET: "should find many with offset";
|
|
@@ -60,6 +61,7 @@ declare const numberIdAdapterTests: {
|
|
|
60
61
|
SHOULD_FIND_MANY_WITH_WHERE: "should find many with where";
|
|
61
62
|
SHOULD_FIND_MANY_WITH_OPERATORS: "should find many with operators";
|
|
62
63
|
SHOULD_WORK_WITH_REFERENCE_FIELDS: "should work with reference fields";
|
|
64
|
+
SHOULD_FIND_MANY_WITH_NOT_IN_OPERATOR: "should find many with not in operator";
|
|
63
65
|
SHOULD_FIND_MANY_WITH_SORT_BY: "should find many with sortBy";
|
|
64
66
|
SHOULD_FIND_MANY_WITH_LIMIT: "should find many with limit";
|
|
65
67
|
SHOULD_FIND_MANY_WITH_OFFSET: "should find many with offset";
|
package/dist/adapters/test.mjs
CHANGED
|
@@ -28,6 +28,7 @@ const adapterTests = {
|
|
|
28
28
|
SHOULD_FIND_MANY_WITH_WHERE: "should find many with where",
|
|
29
29
|
SHOULD_FIND_MANY_WITH_OPERATORS: "should find many with operators",
|
|
30
30
|
SHOULD_WORK_WITH_REFERENCE_FIELDS: "should work with reference fields",
|
|
31
|
+
SHOULD_FIND_MANY_WITH_NOT_IN_OPERATOR: "should find many with not in operator",
|
|
31
32
|
SHOULD_FIND_MANY_WITH_SORT_BY: "should find many with sortBy",
|
|
32
33
|
SHOULD_FIND_MANY_WITH_LIMIT: "should find many with limit",
|
|
33
34
|
SHOULD_FIND_MANY_WITH_OFFSET: "should find many with offset",
|
|
@@ -314,6 +315,49 @@ async function adapterTest({ getAdapter, disableTests: disabledTests, testPrefix
|
|
|
314
315
|
expect(res.length).toBe(2);
|
|
315
316
|
}
|
|
316
317
|
);
|
|
318
|
+
test.skipIf(disabledTests?.SHOULD_FIND_MANY_WITH_NOT_IN_OPERATOR)(
|
|
319
|
+
`${testPrefix ? `${testPrefix} - ` : ""}${adapterTests.SHOULD_FIND_MANY_WITH_NOT_IN_OPERATOR}`,
|
|
320
|
+
async ({ onTestFailed }) => {
|
|
321
|
+
await resetDebugLogs();
|
|
322
|
+
onTestFailed(async () => {
|
|
323
|
+
await printDebugLogs();
|
|
324
|
+
});
|
|
325
|
+
const newUser3 = await (await adapter()).create({
|
|
326
|
+
model: "user",
|
|
327
|
+
data: {
|
|
328
|
+
name: "user",
|
|
329
|
+
email: "test-email3email.com",
|
|
330
|
+
emailVerified: true,
|
|
331
|
+
createdAt: /* @__PURE__ */ new Date(),
|
|
332
|
+
updatedAt: /* @__PURE__ */ new Date()
|
|
333
|
+
}
|
|
334
|
+
});
|
|
335
|
+
const allUsers = await (await adapter()).findMany({
|
|
336
|
+
model: "user"
|
|
337
|
+
});
|
|
338
|
+
expect(allUsers.length).toBe(6);
|
|
339
|
+
const usersWithoutNotIn = await (await adapter()).findMany({
|
|
340
|
+
model: "user",
|
|
341
|
+
where: [
|
|
342
|
+
{
|
|
343
|
+
field: "id",
|
|
344
|
+
operator: "not_in",
|
|
345
|
+
value: [user.id, newUser3.id]
|
|
346
|
+
}
|
|
347
|
+
]
|
|
348
|
+
});
|
|
349
|
+
expect(usersWithoutNotIn.length).toBe(4);
|
|
350
|
+
await (await adapter()).delete({
|
|
351
|
+
model: "user",
|
|
352
|
+
where: [
|
|
353
|
+
{
|
|
354
|
+
field: "id",
|
|
355
|
+
value: newUser3.id
|
|
356
|
+
}
|
|
357
|
+
]
|
|
358
|
+
});
|
|
359
|
+
}
|
|
360
|
+
);
|
|
317
361
|
test.skipIf(disabledTests?.SHOULD_WORK_WITH_REFERENCE_FIELDS)(
|
|
318
362
|
`${testPrefix ? `${testPrefix} - ` : ""}${adapterTests.SHOULD_WORK_WITH_REFERENCE_FIELDS}`,
|
|
319
363
|
async ({ onTestFailed }) => {
|
package/dist/api/index.cjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
const betterCall = require('better-call');
|
|
4
|
-
const socialProviders_index = require('../shared/better-auth.
|
|
4
|
+
const socialProviders_index = require('../shared/better-auth.Dc0nj0we.cjs');
|
|
5
5
|
const session = require('../shared/better-auth.CLv80Pwz.cjs');
|
|
6
6
|
const z = require('zod/v4');
|
|
7
7
|
const cookies_index = require('../shared/better-auth.D5q0JUiv.cjs');
|
package/dist/api/index.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import '../shared/better-auth.
|
|
2
|
-
export { z as AuthEndpoint, D as AuthMiddleware, bp as accountInfo, aS as callbackOAuth, bg as changeEmail, bc as changePassword, aN as checkEndpointConflicts, y as createAuthEndpoint, x as createAuthMiddleware, b7 as createEmailVerificationToken, be as deleteUser, bf as deleteUserCallback, bh as error, b3 as forgetPassword, b5 as forgetPasswordCallback, aY as freshSessionMiddleware, bn as getAccessToken, aO as getEndpoints, aU as getSession, aV as getSessionFromCtx, aT as getSessionQuerySchema, bl as linkSocialAccount, aZ as listSessions, bk as listUserAccounts, bi as ok, w as optionsMiddleware, br as originCheck, bq as originCheckMiddleware, bo as refreshToken, aX as requestOnlySessionMiddleware, b2 as requestPasswordReset, b4 as requestPasswordResetCallback, b6 as resetPassword, b0 as revokeOtherSessions, a_ as revokeSession, a$ as revokeSessions, aP as router, b9 as sendVerificationEmail, b8 as sendVerificationEmailFn, aW as sessionMiddleware, bd as setPassword, aR as signInEmail, aQ as signInSocial, b1 as signOut, bj as signUpEmail, bm as unlinkAccount, bb as updateUser, ba as verifyEmail } from '../shared/better-auth.
|
|
1
|
+
import '../shared/better-auth.CTMmErGI.cjs';
|
|
2
|
+
export { z as AuthEndpoint, D as AuthMiddleware, bp as accountInfo, aS as callbackOAuth, bg as changeEmail, bc as changePassword, aN as checkEndpointConflicts, y as createAuthEndpoint, x as createAuthMiddleware, b7 as createEmailVerificationToken, be as deleteUser, bf as deleteUserCallback, bh as error, b3 as forgetPassword, b5 as forgetPasswordCallback, aY as freshSessionMiddleware, bn as getAccessToken, aO as getEndpoints, aU as getSession, aV as getSessionFromCtx, aT as getSessionQuerySchema, bl as linkSocialAccount, aZ as listSessions, bk as listUserAccounts, bi as ok, w as optionsMiddleware, br as originCheck, bq as originCheckMiddleware, bo as refreshToken, aX as requestOnlySessionMiddleware, b2 as requestPasswordReset, b4 as requestPasswordResetCallback, b6 as resetPassword, b0 as revokeOtherSessions, a_ as revokeSession, a$ as revokeSessions, aP as router, b9 as sendVerificationEmail, b8 as sendVerificationEmailFn, aW as sessionMiddleware, bd as setPassword, aR as signInEmail, aQ as signInSocial, b1 as signOut, bj as signUpEmail, bm as unlinkAccount, bb as updateUser, ba as verifyEmail } from '../shared/better-auth.DGuotwA1.cjs';
|
|
3
3
|
export { APIError } from 'better-call';
|
|
4
4
|
import '../shared/better-auth.DTtXpZYr.cjs';
|
|
5
5
|
import 'zod/v4/core';
|
package/dist/api/index.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import '../shared/better-auth.
|
|
2
|
-
export { z as AuthEndpoint, D as AuthMiddleware, bp as accountInfo, aS as callbackOAuth, bg as changeEmail, bc as changePassword, aN as checkEndpointConflicts, y as createAuthEndpoint, x as createAuthMiddleware, b7 as createEmailVerificationToken, be as deleteUser, bf as deleteUserCallback, bh as error, b3 as forgetPassword, b5 as forgetPasswordCallback, aY as freshSessionMiddleware, bn as getAccessToken, aO as getEndpoints, aU as getSession, aV as getSessionFromCtx, aT as getSessionQuerySchema, bl as linkSocialAccount, aZ as listSessions, bk as listUserAccounts, bi as ok, w as optionsMiddleware, br as originCheck, bq as originCheckMiddleware, bo as refreshToken, aX as requestOnlySessionMiddleware, b2 as requestPasswordReset, b4 as requestPasswordResetCallback, b6 as resetPassword, b0 as revokeOtherSessions, a_ as revokeSession, a$ as revokeSessions, aP as router, b9 as sendVerificationEmail, b8 as sendVerificationEmailFn, aW as sessionMiddleware, bd as setPassword, aR as signInEmail, aQ as signInSocial, b1 as signOut, bj as signUpEmail, bm as unlinkAccount, bb as updateUser, ba as verifyEmail } from '../shared/better-auth.
|
|
1
|
+
import '../shared/better-auth.ZUo2dMO3.mjs';
|
|
2
|
+
export { z as AuthEndpoint, D as AuthMiddleware, bp as accountInfo, aS as callbackOAuth, bg as changeEmail, bc as changePassword, aN as checkEndpointConflicts, y as createAuthEndpoint, x as createAuthMiddleware, b7 as createEmailVerificationToken, be as deleteUser, bf as deleteUserCallback, bh as error, b3 as forgetPassword, b5 as forgetPasswordCallback, aY as freshSessionMiddleware, bn as getAccessToken, aO as getEndpoints, aU as getSession, aV as getSessionFromCtx, aT as getSessionQuerySchema, bl as linkSocialAccount, aZ as listSessions, bk as listUserAccounts, bi as ok, w as optionsMiddleware, br as originCheck, bq as originCheckMiddleware, bo as refreshToken, aX as requestOnlySessionMiddleware, b2 as requestPasswordReset, b4 as requestPasswordResetCallback, b6 as resetPassword, b0 as revokeOtherSessions, a_ as revokeSession, a$ as revokeSessions, aP as router, b9 as sendVerificationEmail, b8 as sendVerificationEmailFn, aW as sessionMiddleware, bd as setPassword, aR as signInEmail, aQ as signInSocial, b1 as signOut, bj as signUpEmail, bm as unlinkAccount, bb as updateUser, ba as verifyEmail } from '../shared/better-auth.f-bUldRg.mjs';
|
|
3
3
|
export { APIError } from 'better-call';
|
|
4
4
|
import '../shared/better-auth.DTtXpZYr.mjs';
|
|
5
5
|
import 'zod/v4/core';
|