better-auth 1.2.6-beta.7 → 1.2.7-beta.1
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 +186 -249
- package/dist/adapters/drizzle-adapter/index.d.cts +11 -49
- package/dist/adapters/drizzle-adapter/index.d.mts +11 -49
- package/dist/adapters/drizzle-adapter/index.d.ts +11 -49
- package/dist/adapters/drizzle-adapter/index.mjs +186 -249
- package/dist/adapters/index.cjs +26 -0
- package/dist/adapters/index.d.cts +17 -0
- package/dist/adapters/index.d.mts +17 -0
- package/dist/adapters/index.d.ts +17 -0
- package/dist/adapters/index.mjs +20 -0
- package/dist/adapters/kysely-adapter/index.cjs +7 -7
- package/dist/adapters/kysely-adapter/index.d.cts +17 -49
- package/dist/adapters/kysely-adapter/index.d.mts +17 -49
- package/dist/adapters/kysely-adapter/index.d.ts +17 -49
- package/dist/adapters/kysely-adapter/index.mjs +8 -8
- package/dist/adapters/memory-adapter/index.cjs +7 -8
- package/dist/adapters/memory-adapter/index.d.cts +9 -49
- package/dist/adapters/memory-adapter/index.d.mts +9 -49
- package/dist/adapters/memory-adapter/index.d.ts +9 -49
- package/dist/adapters/memory-adapter/index.mjs +8 -9
- package/dist/adapters/mongodb-adapter/index.cjs +2 -2
- package/dist/adapters/mongodb-adapter/index.d.cts +4 -4
- package/dist/adapters/mongodb-adapter/index.d.mts +4 -4
- package/dist/adapters/mongodb-adapter/index.d.ts +4 -4
- package/dist/adapters/mongodb-adapter/index.mjs +3 -3
- package/dist/adapters/prisma-adapter/index.cjs +130 -203
- package/dist/adapters/prisma-adapter/index.d.cts +17 -49
- package/dist/adapters/prisma-adapter/index.d.mts +17 -49
- package/dist/adapters/prisma-adapter/index.d.ts +17 -49
- package/dist/adapters/prisma-adapter/index.mjs +131 -204
- package/dist/adapters/test.cjs +710 -377
- package/dist/adapters/test.d.cts +64 -5
- package/dist/adapters/test.d.mts +64 -5
- package/dist/adapters/test.d.ts +64 -5
- package/dist/adapters/test.mjs +712 -380
- package/dist/api/index.cjs +61 -25
- package/dist/api/index.d.cts +3 -3
- package/dist/api/index.d.mts +3 -3
- package/dist/api/index.d.ts +3 -3
- package/dist/api/index.mjs +63 -27
- package/dist/client/index.d.cts +3 -3
- package/dist/client/index.d.mts +3 -3
- package/dist/client/index.d.ts +3 -3
- package/dist/client/plugins/index.cjs +13 -15
- package/dist/client/plugins/index.d.cts +80 -19
- package/dist/client/plugins/index.d.mts +80 -19
- package/dist/client/plugins/index.d.ts +80 -19
- package/dist/client/plugins/index.mjs +13 -16
- package/dist/client/react/index.cjs +4 -4
- 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.cjs +13 -2
- package/dist/cookies/index.d.cts +3 -3
- package/dist/cookies/index.d.mts +3 -3
- package/dist/cookies/index.d.ts +3 -3
- package/dist/cookies/index.mjs +13 -2
- package/dist/db/index.cjs +6 -5
- package/dist/db/index.d.cts +4 -4
- package/dist/db/index.d.mts +4 -4
- package/dist/db/index.d.ts +4 -4
- package/dist/db/index.mjs +7 -6
- package/dist/index.cjs +11 -7
- package/dist/index.d.cts +4 -4
- package/dist/index.d.mts +4 -4
- package/dist/index.d.ts +4 -4
- package/dist/index.mjs +14 -10
- package/dist/integrations/next-js.cjs +4 -5
- package/dist/integrations/next-js.d.cts +3 -3
- package/dist/integrations/next-js.d.mts +3 -3
- package/dist/integrations/next-js.d.ts +3 -3
- package/dist/integrations/next-js.mjs +5 -6
- package/dist/integrations/node.d.cts +3 -3
- package/dist/integrations/node.d.mts +3 -3
- package/dist/integrations/node.d.ts +3 -3
- package/dist/integrations/react-start.cjs +5 -6
- package/dist/integrations/react-start.d.cts +3 -3
- package/dist/integrations/react-start.d.mts +3 -3
- package/dist/integrations/react-start.d.ts +3 -3
- package/dist/integrations/react-start.mjs +6 -7
- package/dist/integrations/svelte-kit.d.cts +3 -3
- package/dist/integrations/svelte-kit.d.mts +3 -3
- package/dist/integrations/svelte-kit.d.ts +3 -3
- package/dist/oauth2/index.d.cts +5 -5
- package/dist/oauth2/index.d.mts +5 -5
- package/dist/oauth2/index.d.ts +5 -5
- package/dist/plugins/access/index.d.cts +1 -1
- package/dist/plugins/access/index.d.mts +1 -1
- package/dist/plugins/access/index.d.ts +1 -1
- package/dist/plugins/admin/access/index.d.cts +1 -1
- package/dist/plugins/admin/access/index.d.mts +1 -1
- package/dist/plugins/admin/access/index.d.ts +1 -1
- package/dist/plugins/admin/index.cjs +4 -4
- package/dist/plugins/admin/index.d.cts +74 -14
- package/dist/plugins/admin/index.d.mts +74 -14
- package/dist/plugins/admin/index.d.ts +74 -14
- package/dist/plugins/admin/index.mjs +5 -5
- package/dist/plugins/anonymous/index.cjs +4 -5
- package/dist/plugins/anonymous/index.d.cts +3 -3
- package/dist/plugins/anonymous/index.d.mts +3 -3
- package/dist/plugins/anonymous/index.d.ts +3 -3
- package/dist/plugins/anonymous/index.mjs +5 -6
- package/dist/plugins/bearer/index.cjs +2 -2
- package/dist/plugins/bearer/index.d.cts +3 -3
- package/dist/plugins/bearer/index.d.mts +3 -3
- package/dist/plugins/bearer/index.d.ts +3 -3
- package/dist/plugins/bearer/index.mjs +3 -3
- package/dist/plugins/captcha/index.cjs +110 -45
- package/dist/plugins/captcha/index.d.cts +26 -6
- package/dist/plugins/captcha/index.d.mts +26 -6
- package/dist/plugins/captcha/index.d.ts +26 -6
- package/dist/plugins/captcha/index.mjs +110 -45
- package/dist/plugins/custom-session/index.cjs +24 -5
- package/dist/plugins/custom-session/index.d.cts +25 -6
- package/dist/plugins/custom-session/index.d.mts +25 -6
- package/dist/plugins/custom-session/index.d.ts +25 -6
- package/dist/plugins/custom-session/index.mjs +25 -6
- package/dist/plugins/email-otp/index.cjs +96 -30
- package/dist/plugins/email-otp/index.d.cts +33 -10
- package/dist/plugins/email-otp/index.d.mts +33 -10
- package/dist/plugins/email-otp/index.d.ts +33 -10
- package/dist/plugins/email-otp/index.mjs +97 -31
- package/dist/plugins/generic-oauth/index.cjs +81 -20
- package/dist/plugins/generic-oauth/index.d.cts +46 -3
- package/dist/plugins/generic-oauth/index.d.mts +46 -3
- package/dist/plugins/generic-oauth/index.d.ts +46 -3
- package/dist/plugins/generic-oauth/index.mjs +82 -21
- package/dist/plugins/haveibeenpwned/index.cjs +98 -0
- package/dist/plugins/haveibeenpwned/index.d.cts +36 -0
- package/dist/plugins/haveibeenpwned/index.d.mts +36 -0
- package/dist/plugins/haveibeenpwned/index.d.ts +36 -0
- package/dist/plugins/haveibeenpwned/index.mjs +96 -0
- package/dist/plugins/index.cjs +583 -19
- package/dist/plugins/index.d.cts +7 -5
- package/dist/plugins/index.d.mts +7 -5
- package/dist/plugins/index.d.ts +7 -5
- package/dist/plugins/index.mjs +583 -21
- package/dist/plugins/jwt/index.cjs +45 -21
- package/dist/plugins/jwt/index.d.cts +52 -6
- package/dist/plugins/jwt/index.d.mts +52 -6
- package/dist/plugins/jwt/index.d.ts +52 -6
- package/dist/plugins/jwt/index.mjs +46 -22
- package/dist/plugins/magic-link/index.cjs +3 -3
- package/dist/plugins/magic-link/index.mjs +4 -4
- package/dist/plugins/multi-session/index.cjs +3 -3
- package/dist/plugins/multi-session/index.d.cts +3 -3
- package/dist/plugins/multi-session/index.d.mts +3 -3
- package/dist/plugins/multi-session/index.d.ts +3 -3
- package/dist/plugins/multi-session/index.mjs +4 -4
- package/dist/plugins/oauth-proxy/index.cjs +4 -4
- package/dist/plugins/oauth-proxy/index.d.cts +3 -3
- package/dist/plugins/oauth-proxy/index.d.mts +3 -3
- package/dist/plugins/oauth-proxy/index.d.ts +3 -3
- package/dist/plugins/oauth-proxy/index.mjs +5 -5
- package/dist/plugins/oidc-provider/index.cjs +227 -8
- package/dist/plugins/oidc-provider/index.d.cts +215 -3
- package/dist/plugins/oidc-provider/index.d.mts +215 -3
- package/dist/plugins/oidc-provider/index.d.ts +215 -3
- package/dist/plugins/oidc-provider/index.mjs +228 -9
- package/dist/plugins/one-tap/index.cjs +5 -5
- package/dist/plugins/one-tap/index.mjs +6 -6
- package/dist/plugins/one-time-token/index.cjs +119 -0
- package/dist/plugins/one-time-token/index.d.cts +134 -0
- package/dist/plugins/one-time-token/index.d.mts +134 -0
- package/dist/plugins/one-time-token/index.d.ts +134 -0
- package/dist/plugins/one-time-token/index.mjs +117 -0
- package/dist/plugins/open-api/index.cjs +3 -3
- package/dist/plugins/open-api/index.d.cts +3 -3
- package/dist/plugins/open-api/index.d.mts +3 -3
- package/dist/plugins/open-api/index.d.ts +3 -3
- package/dist/plugins/open-api/index.mjs +4 -4
- package/dist/plugins/organization/access/index.d.cts +1 -1
- package/dist/plugins/organization/access/index.d.mts +1 -1
- package/dist/plugins/organization/access/index.d.ts +1 -1
- package/dist/plugins/organization/index.cjs +4 -4
- package/dist/plugins/organization/index.d.cts +708 -55
- package/dist/plugins/organization/index.d.mts +708 -55
- package/dist/plugins/organization/index.d.ts +708 -55
- package/dist/plugins/organization/index.mjs +5 -5
- package/dist/plugins/passkey/index.cjs +82 -8
- package/dist/plugins/passkey/index.d.cts +72 -3
- package/dist/plugins/passkey/index.d.mts +72 -3
- package/dist/plugins/passkey/index.d.ts +72 -3
- package/dist/plugins/passkey/index.mjs +83 -9
- package/dist/plugins/phone-number/index.cjs +194 -26
- package/dist/plugins/phone-number/index.d.cts +132 -8
- package/dist/plugins/phone-number/index.d.mts +132 -8
- package/dist/plugins/phone-number/index.d.ts +132 -8
- package/dist/plugins/phone-number/index.mjs +195 -27
- package/dist/plugins/sso/index.cjs +190 -7
- package/dist/plugins/sso/index.d.cts +181 -15
- package/dist/plugins/sso/index.d.mts +181 -15
- package/dist/plugins/sso/index.d.ts +181 -15
- package/dist/plugins/sso/index.mjs +191 -8
- package/dist/plugins/two-factor/index.cjs +443 -92
- package/dist/plugins/two-factor/index.d.cts +230 -396
- package/dist/plugins/two-factor/index.d.mts +230 -396
- package/dist/plugins/two-factor/index.d.ts +230 -396
- package/dist/plugins/two-factor/index.mjs +431 -80
- package/dist/plugins/username/index.cjs +34 -31
- package/dist/plugins/username/index.d.cts +15 -12
- package/dist/plugins/username/index.d.mts +15 -12
- package/dist/plugins/username/index.d.ts +15 -12
- package/dist/plugins/username/index.mjs +35 -32
- package/dist/shared/better-auth.1DR6suCQ.mjs +307 -0
- package/dist/shared/{better-auth.BSsp73pg.cjs → better-auth.B7cZ2juS.cjs} +15 -14
- package/dist/shared/{better-auth.bKwabe3I.d.mts → better-auth.B88xucNq.d.mts} +529 -39
- package/dist/shared/{better-auth.CApEjVDP.cjs → better-auth.BW8BpneG.cjs} +4 -1
- package/dist/shared/{better-auth.BiQsvaIP.d.cts → better-auth.BcU1Kjyq.d.cts} +2051 -518
- package/dist/shared/better-auth.BfG24BjZ.cjs +118 -0
- package/dist/shared/{better-auth.A3TjrU8G.mjs → better-auth.Bk5IMdhM.mjs} +32 -12
- package/dist/shared/{better-auth.D9VnBkRI.mjs → better-auth.Bm9HxIzE.mjs} +47 -24
- package/dist/shared/{better-auth.BRf6Iynu.d.ts → better-auth.Bwc-6kOr.d.ts} +1 -1
- package/dist/shared/{better-auth.D-oLmHIj.d.mts → better-auth.CA2hFK4N.d.ts} +2051 -518
- package/dist/shared/{better-auth.Dmhe30iW.d.mts → better-auth.CGukGrxT.d.cts} +1 -1
- package/dist/shared/{better-auth.CsSpq0zL.cjs → better-auth.CHUzBidy.cjs} +46 -23
- package/dist/shared/{better-auth.DWRligF8.d.cts → better-auth.CT9J6rD-.d.cts} +539 -7
- package/dist/shared/better-auth.CVCo5Z2T.cjs +310 -0
- package/dist/shared/{better-auth.D4jH-sJA.mjs → better-auth.CWwVo_61.mjs} +458 -118
- package/dist/shared/{better-auth.Bi8FQwDD.d.cts → better-auth.CYegVoq1.d.cts} +1 -1
- package/dist/shared/{better-auth.Bi8FQwDD.d.mts → better-auth.CYegVoq1.d.mts} +1 -1
- package/dist/shared/{better-auth.Bi8FQwDD.d.ts → better-auth.CYegVoq1.d.ts} +1 -1
- package/dist/shared/{better-auth.CepcSj5H.mjs → better-auth.Cc72UxUH.mjs} +1 -2
- package/dist/shared/{better-auth.BWp5dztg.d.ts → better-auth.CmN4mlPh.d.ts} +539 -7
- package/dist/shared/{better-auth.DH3YjMQH.mjs → better-auth.Cqykj82J.mjs} +1 -1
- package/dist/shared/{better-auth.wcdMj2cT.d.mts → better-auth.DIt2e3lu.d.mts} +539 -7
- package/dist/shared/{better-auth.BANAxdkL.d.ts → better-auth.DNTAFSt1.d.ts} +529 -39
- package/dist/shared/{better-auth.DU2QNVc_.d.ts → better-auth.DQ7OSJbI.d.mts} +2051 -518
- package/dist/shared/{better-auth.DLTzKoOS.cjs → better-auth.DSVbLSt7.cjs} +4 -1
- package/dist/shared/{better-auth.B2Fw1vhH.d.cts → better-auth.DTiSPWEk.d.cts} +529 -39
- package/dist/shared/better-auth.DURsStt9.mjs +116 -0
- package/dist/shared/{better-auth.BIjcZ_vt.cjs → better-auth.DYoLD99C.cjs} +31 -11
- package/dist/shared/{better-auth.CV1L7TPV.cjs → better-auth.D_ZIX1O8.cjs} +317 -47
- package/dist/shared/{better-auth.C5H9XEzZ.cjs → better-auth.DcWKCjjf.cjs} +1 -2
- package/dist/shared/{better-auth.BDYXUcLv.cjs → better-auth.Dg0siV5C.cjs} +457 -117
- package/dist/shared/better-auth.DjryM8pE.cjs +760 -0
- package/dist/shared/{better-auth.DPBQN9Fs.mjs → better-auth.Dn_Ms1Uf.mjs} +318 -48
- package/dist/shared/{better-auth.DiG4KL2x.mjs → better-auth.OuYYTHC7.mjs} +4 -1
- package/dist/shared/{better-auth.DtC8i3pf.d.cts → better-auth.S1jimRbX.d.mts} +1 -1
- package/dist/shared/better-auth.SPmq4a4z.d.mts +344 -0
- package/dist/shared/{better-auth.cOCrlspr.mjs → better-auth.bkwPl2G4.mjs} +4 -1
- package/dist/shared/better-auth.cp2rC2iM.d.ts +344 -0
- package/dist/shared/better-auth.eVy4DZvP.d.cts +344 -0
- package/dist/shared/{better-auth.BrOpzmqo.mjs → better-auth.iKoUsdFE.mjs} +15 -14
- package/dist/shared/better-auth.rSYJCd3o.mjs +758 -0
- package/dist/social-providers/index.cjs +75 -3
- package/dist/social-providers/index.d.cts +2 -2
- package/dist/social-providers/index.d.mts +2 -2
- package/dist/social-providers/index.d.ts +2 -2
- package/dist/social-providers/index.mjs +77 -6
- package/dist/types/index.d.cts +4 -4
- package/dist/types/index.d.mts +4 -4
- package/dist/types/index.d.ts +4 -4
- package/package.json +42 -5
- package/dist/chunks/server.cjs +0 -905
- package/dist/chunks/server.mjs +0 -895
- package/dist/shared/better-auth.BcoSd9tC.mjs +0 -10
- package/dist/shared/better-auth.BnRFp-t0.mjs +0 -405
- package/dist/shared/better-auth.C1-vpKly.cjs +0 -12
- package/dist/shared/better-auth.ClTSOgiD.mjs +0 -140
- package/dist/shared/better-auth.DC8JQbiE.mjs +0 -173
- package/dist/shared/better-auth.DWHWPllD.cjs +0 -175
- package/dist/shared/better-auth.DqLjzBlO.cjs +0 -408
- package/dist/shared/better-auth.m575EIBC.cjs +0 -144
|
@@ -1,7 +1,11 @@
|
|
|
1
|
-
import { count, desc, asc, eq, inArray, like, lt, lte, and, or } from 'drizzle-orm';
|
|
2
|
-
import '../../shared/better-auth.
|
|
3
|
-
import '../../shared/better-auth.
|
|
4
|
-
import
|
|
1
|
+
import { count, desc, asc, sql, eq, inArray, like, lt, lte, and, or } from 'drizzle-orm';
|
|
2
|
+
import { B as BetterAuthError } from '../../shared/better-auth.DdzSJf-n.mjs';
|
|
3
|
+
import { c as createAdapter } from '../../shared/better-auth.rSYJCd3o.mjs';
|
|
4
|
+
import '../../shared/better-auth.tB5eU6EY.mjs';
|
|
5
|
+
import '../../shared/better-auth.0TC26uRi.mjs';
|
|
6
|
+
import '../../shared/better-auth.DORkW_Ge.mjs';
|
|
7
|
+
import '../../shared/better-auth.BUPPRXfK.mjs';
|
|
8
|
+
import '@better-auth/utils/random';
|
|
5
9
|
import 'zod';
|
|
6
10
|
import 'better-call';
|
|
7
11
|
import '@better-auth/utils/hash';
|
|
@@ -15,275 +19,208 @@ import '@better-auth/utils';
|
|
|
15
19
|
import '@better-auth/utils/hex';
|
|
16
20
|
import '@noble/hashes/utils';
|
|
17
21
|
import '../../shared/better-auth.B4Qoxdgc.mjs';
|
|
18
|
-
import '../../shared/better-auth.
|
|
19
|
-
import { g as getAuthTables } from '../../shared/better-auth.DORkW_Ge.mjs';
|
|
20
|
-
import { B as BetterAuthError } from '../../shared/better-auth.DdzSJf-n.mjs';
|
|
21
|
-
import 'kysely';
|
|
22
|
-
import { w as withApplyDefault } from '../../shared/better-auth.0TC26uRi.mjs';
|
|
23
|
-
import '@better-auth/utils/random';
|
|
22
|
+
import '../../shared/better-auth.Cqykj82J.mjs';
|
|
24
23
|
|
|
25
|
-
const
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
);
|
|
40
|
-
}
|
|
41
|
-
const model = getModelName(modelName);
|
|
42
|
-
const schemaModel = schema2[model];
|
|
43
|
-
if (!schemaModel) {
|
|
44
|
-
throw new BetterAuthError(
|
|
45
|
-
`[# Drizzle Adapter]: The model "${model}" was not found in the schema object. Please pass the schema directly to the adapter options.`
|
|
46
|
-
);
|
|
47
|
-
}
|
|
48
|
-
return schemaModel;
|
|
49
|
-
}
|
|
50
|
-
const getModelName = (model) => {
|
|
51
|
-
return schema[model].modelName !== model ? schema[model].modelName : config.usePlural ? `${model}s` : model;
|
|
52
|
-
};
|
|
53
|
-
function convertWhereClause(where, model) {
|
|
54
|
-
const schemaModel = getSchema(model);
|
|
55
|
-
if (!where) return [];
|
|
56
|
-
if (where.length === 1) {
|
|
57
|
-
const w = where[0];
|
|
58
|
-
if (!w) {
|
|
59
|
-
return [];
|
|
24
|
+
const drizzleAdapter = (db, config) => createAdapter({
|
|
25
|
+
config: {
|
|
26
|
+
adapterId: "drizzle",
|
|
27
|
+
adapterName: "Drizzle Adapter",
|
|
28
|
+
usePlural: config.usePlural ?? false,
|
|
29
|
+
debugLogs: config.debugLogs ?? false
|
|
30
|
+
},
|
|
31
|
+
adapter: ({ getFieldName, debugLog }) => {
|
|
32
|
+
function getSchema(model) {
|
|
33
|
+
const schema = config.schema || db._.fullSchema;
|
|
34
|
+
if (!schema) {
|
|
35
|
+
throw new BetterAuthError(
|
|
36
|
+
"Drizzle adapter failed to initialize. Schema not found. Please provide a schema object in the adapter options object."
|
|
37
|
+
);
|
|
60
38
|
}
|
|
61
|
-
const
|
|
62
|
-
if (!schemaModel
|
|
39
|
+
const schemaModel = schema[model];
|
|
40
|
+
if (!schemaModel) {
|
|
63
41
|
throw new BetterAuthError(
|
|
64
|
-
`The
|
|
42
|
+
`[# Drizzle Adapter]: The model "${model}" was not found in the schema object. Please pass the schema directly to the adapter options.`
|
|
65
43
|
);
|
|
66
44
|
}
|
|
67
|
-
|
|
68
|
-
|
|
45
|
+
return schemaModel;
|
|
46
|
+
}
|
|
47
|
+
const withReturning = async (model, builder, data, where) => {
|
|
48
|
+
if (config.provider !== "mysql") {
|
|
49
|
+
const c = await builder.returning();
|
|
50
|
+
return c[0];
|
|
51
|
+
}
|
|
52
|
+
await builder.execute();
|
|
53
|
+
const schemaModel = getSchema(model);
|
|
54
|
+
const builderVal = builder.config?.values;
|
|
55
|
+
if (where?.length) {
|
|
56
|
+
const clause = convertWhereClause(where, model);
|
|
57
|
+
const res = await db.select().from(schemaModel).where(...clause);
|
|
58
|
+
return res[0];
|
|
59
|
+
} else if (builderVal && builderVal[0]?.id?.value) {
|
|
60
|
+
let tId = builderVal[0]?.id?.value;
|
|
61
|
+
if (!tId) {
|
|
62
|
+
const lastInsertId = await db.select({ id: sql`LAST_INSERT_ID()` }).from(schemaModel).orderBy(desc(schemaModel.id)).limit(1);
|
|
63
|
+
tId = lastInsertId[0].id;
|
|
64
|
+
}
|
|
65
|
+
const res = await db.select().from(schemaModel).where(eq(schemaModel.id, tId)).limit(1).execute();
|
|
66
|
+
return res[0];
|
|
67
|
+
} else if (data.id) {
|
|
68
|
+
const res = await db.select().from(schemaModel).where(eq(schemaModel.id, data.id)).limit(1).execute();
|
|
69
|
+
return res[0];
|
|
70
|
+
} else {
|
|
71
|
+
if (!("id" in schemaModel)) {
|
|
69
72
|
throw new BetterAuthError(
|
|
70
|
-
`The
|
|
73
|
+
`The model "${model}" does not have an "id" field. Please use the "id" field as your primary key.`
|
|
71
74
|
);
|
|
72
75
|
}
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
if (w.operator === "contains") {
|
|
76
|
-
return [like(schemaModel[field], `%${w.value}%`)];
|
|
77
|
-
}
|
|
78
|
-
if (w.operator === "starts_with") {
|
|
79
|
-
return [like(schemaModel[field], `${w.value}%`)];
|
|
80
|
-
}
|
|
81
|
-
if (w.operator === "ends_with") {
|
|
82
|
-
return [like(schemaModel[field], `%${w.value}`)];
|
|
83
|
-
}
|
|
84
|
-
if (w.operator === "lt") {
|
|
85
|
-
return [lt(schemaModel[field], w.value)];
|
|
86
|
-
}
|
|
87
|
-
if (w.operator === "lte") {
|
|
88
|
-
return [lte(schemaModel[field], w.value)];
|
|
76
|
+
const res = await db.select().from(schemaModel).orderBy(desc(schemaModel.id)).limit(1).execute();
|
|
77
|
+
return res[0];
|
|
89
78
|
}
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
79
|
+
};
|
|
80
|
+
function convertWhereClause(where, model) {
|
|
81
|
+
const schemaModel = getSchema(model);
|
|
82
|
+
if (!where) return [];
|
|
83
|
+
if (where.length === 1) {
|
|
84
|
+
const w = where[0];
|
|
85
|
+
if (!w) {
|
|
86
|
+
return [];
|
|
87
|
+
}
|
|
88
|
+
const field = getFieldName({ model, field: w.field });
|
|
89
|
+
if (!schemaModel[field]) {
|
|
90
|
+
throw new BetterAuthError(
|
|
91
|
+
`The field "${w.field}" does not exist in the schema for the model "${model}". Please update your schema.`
|
|
92
|
+
);
|
|
93
|
+
}
|
|
97
94
|
if (w.operator === "in") {
|
|
98
95
|
if (!Array.isArray(w.value)) {
|
|
99
96
|
throw new BetterAuthError(
|
|
100
97
|
`The value for the field "${w.field}" must be an array when using the "in" operator.`
|
|
101
98
|
);
|
|
102
99
|
}
|
|
103
|
-
return inArray(schemaModel[field], w.value);
|
|
100
|
+
return [inArray(schemaModel[field], w.value)];
|
|
104
101
|
}
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
);
|
|
108
|
-
const orClause = or(
|
|
109
|
-
...orGroup.map((w) => {
|
|
110
|
-
const field = getField(model, w.field);
|
|
111
|
-
return eq(schemaModel[field], w.value);
|
|
112
|
-
})
|
|
113
|
-
);
|
|
114
|
-
const clause = [];
|
|
115
|
-
if (andGroup.length) clause.push(andClause);
|
|
116
|
-
if (orGroup.length) clause.push(orClause);
|
|
117
|
-
return clause;
|
|
118
|
-
}
|
|
119
|
-
const useDatabaseGeneratedId = options?.advanced?.generateId === false;
|
|
120
|
-
return {
|
|
121
|
-
getSchema,
|
|
122
|
-
transformInput(data, model, action) {
|
|
123
|
-
const transformedData = useDatabaseGeneratedId || action === "update" ? {} : {
|
|
124
|
-
id: options.advanced?.generateId ? options.advanced.generateId({
|
|
125
|
-
model
|
|
126
|
-
}) : data.id || generateId()
|
|
127
|
-
};
|
|
128
|
-
const fields = schema[model].fields;
|
|
129
|
-
for (const field in fields) {
|
|
130
|
-
const value = data[field];
|
|
131
|
-
if (value === void 0 && !fields[field].defaultValue) {
|
|
132
|
-
continue;
|
|
102
|
+
if (w.operator === "contains") {
|
|
103
|
+
return [like(schemaModel[field], `%${w.value}%`)];
|
|
133
104
|
}
|
|
134
|
-
|
|
135
|
-
value
|
|
136
|
-
fields[field],
|
|
137
|
-
action
|
|
138
|
-
);
|
|
139
|
-
}
|
|
140
|
-
return transformedData;
|
|
141
|
-
},
|
|
142
|
-
transformOutput(data, model, select = []) {
|
|
143
|
-
if (!data) return null;
|
|
144
|
-
const transformedData = data.id || data._id ? select.length === 0 || select.includes("id") ? {
|
|
145
|
-
id: data.id
|
|
146
|
-
} : {} : {};
|
|
147
|
-
const tableSchema = schema[model].fields;
|
|
148
|
-
for (const key in tableSchema) {
|
|
149
|
-
if (select.length && !select.includes(key)) {
|
|
150
|
-
continue;
|
|
105
|
+
if (w.operator === "starts_with") {
|
|
106
|
+
return [like(schemaModel[field], `${w.value}%`)];
|
|
151
107
|
}
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
transformedData[key] = data[field.fieldName || key];
|
|
108
|
+
if (w.operator === "ends_with") {
|
|
109
|
+
return [like(schemaModel[field], `%${w.value}`)];
|
|
155
110
|
}
|
|
111
|
+
if (w.operator === "lt") {
|
|
112
|
+
return [lt(schemaModel[field], w.value)];
|
|
113
|
+
}
|
|
114
|
+
if (w.operator === "lte") {
|
|
115
|
+
return [lte(schemaModel[field], w.value)];
|
|
116
|
+
}
|
|
117
|
+
return [eq(schemaModel[field], w.value)];
|
|
156
118
|
}
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
119
|
+
const andGroup = where.filter(
|
|
120
|
+
(w) => w.connector === "AND" || !w.connector
|
|
121
|
+
);
|
|
122
|
+
const orGroup = where.filter((w) => w.connector === "OR");
|
|
123
|
+
const andClause = and(
|
|
124
|
+
...andGroup.map((w) => {
|
|
125
|
+
const field = getFieldName({ model, field: w.field });
|
|
126
|
+
if (w.operator === "in") {
|
|
127
|
+
if (!Array.isArray(w.value)) {
|
|
128
|
+
throw new BetterAuthError(
|
|
129
|
+
`The value for the field "${w.field}" must be an array when using the "in" operator.`
|
|
130
|
+
);
|
|
131
|
+
}
|
|
132
|
+
return inArray(schemaModel[field], w.value);
|
|
133
|
+
}
|
|
134
|
+
return eq(schemaModel[field], w.value);
|
|
135
|
+
})
|
|
136
|
+
);
|
|
137
|
+
const orClause = or(
|
|
138
|
+
...orGroup.map((w) => {
|
|
139
|
+
const field = getFieldName({ model, field: w.field });
|
|
140
|
+
return eq(schemaModel[field], w.value);
|
|
141
|
+
})
|
|
142
|
+
);
|
|
143
|
+
const clause = [];
|
|
144
|
+
if (andGroup.length) clause.push(andClause);
|
|
145
|
+
if (orGroup.length) clause.push(orClause);
|
|
146
|
+
return clause;
|
|
147
|
+
}
|
|
148
|
+
function checkMissingFields(schema, model, values) {
|
|
149
|
+
if (!schema) {
|
|
150
|
+
throw new BetterAuthError(
|
|
151
|
+
"Drizzle adapter failed to initialize. Schema not found. Please provide a schema object in the adapter options object."
|
|
152
|
+
);
|
|
164
153
|
}
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
154
|
+
for (const key in values) {
|
|
155
|
+
if (!schema[key]) {
|
|
156
|
+
throw new BetterAuthError(
|
|
157
|
+
`The field "${key}" does not exist in the "${model}" schema. Please update your drizzle schema or re-generate using "npx @better-auth/cli generate".`
|
|
158
|
+
);
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
return {
|
|
163
|
+
async create({ model, data: values }) {
|
|
164
|
+
const schemaModel = getSchema(model);
|
|
165
|
+
checkMissingFields(schemaModel, model, values);
|
|
166
|
+
const builder = db.insert(schemaModel).values(values);
|
|
167
|
+
const returned = await withReturning(model, builder, values);
|
|
168
|
+
return returned;
|
|
169
|
+
},
|
|
170
|
+
async findOne({ model, where }) {
|
|
171
|
+
const schemaModel = getSchema(model);
|
|
169
172
|
const clause = convertWhereClause(where, model);
|
|
170
173
|
const res = await db.select().from(schemaModel).where(...clause);
|
|
174
|
+
if (!res.length) return null;
|
|
171
175
|
return res[0];
|
|
172
|
-
}
|
|
173
|
-
|
|
174
|
-
const
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
const
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
}
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
176
|
+
},
|
|
177
|
+
async findMany({ model, where, sortBy, limit, offset }) {
|
|
178
|
+
const schemaModel = getSchema(model);
|
|
179
|
+
const clause = where ? convertWhereClause(where, model) : [];
|
|
180
|
+
const sortFn = sortBy?.direction === "desc" ? desc : asc;
|
|
181
|
+
const builder = db.select().from(schemaModel).limit(limit || 100).offset(offset || 0);
|
|
182
|
+
if (sortBy?.field) {
|
|
183
|
+
builder.orderBy(
|
|
184
|
+
sortFn(
|
|
185
|
+
schemaModel[getFieldName({ model, field: sortBy?.field })]
|
|
186
|
+
)
|
|
187
|
+
);
|
|
188
|
+
}
|
|
189
|
+
return await builder.where(...clause);
|
|
190
|
+
},
|
|
191
|
+
async count({ model, where }) {
|
|
192
|
+
const schemaModel = getSchema(model);
|
|
193
|
+
const clause = where ? convertWhereClause(where, model) : [];
|
|
194
|
+
const res = await db.select({ count: count() }).from(schemaModel).where(...clause);
|
|
195
|
+
return res[0].count;
|
|
196
|
+
},
|
|
197
|
+
async update({ model, where, update: values }) {
|
|
198
|
+
const schemaModel = getSchema(model);
|
|
199
|
+
const clause = convertWhereClause(where, model);
|
|
200
|
+
const builder = db.update(schemaModel).set(values).where(...clause);
|
|
201
|
+
return await withReturning(model, builder, values, where);
|
|
202
|
+
},
|
|
203
|
+
async updateMany({ model, where, update: values }) {
|
|
204
|
+
const schemaModel = getSchema(model);
|
|
205
|
+
const clause = convertWhereClause(where, model);
|
|
206
|
+
const builder = db.update(schemaModel).set(values).where(...clause);
|
|
207
|
+
return await builder;
|
|
208
|
+
},
|
|
209
|
+
async delete({ model, where }) {
|
|
210
|
+
const schemaModel = getSchema(model);
|
|
211
|
+
const clause = convertWhereClause(where, model);
|
|
212
|
+
const builder = db.delete(schemaModel).where(...clause);
|
|
213
|
+
return await builder;
|
|
214
|
+
},
|
|
215
|
+
async deleteMany({ model, where }) {
|
|
216
|
+
const schemaModel = getSchema(model);
|
|
217
|
+
const clause = convertWhereClause(where, model);
|
|
218
|
+
const builder = db.delete(schemaModel).where(...clause);
|
|
219
|
+
return await builder;
|
|
220
|
+
},
|
|
221
|
+
options: config
|
|
222
|
+
};
|
|
197
223
|
}
|
|
198
|
-
}
|
|
199
|
-
const drizzleAdapter = (db, config) => (options) => {
|
|
200
|
-
const {
|
|
201
|
-
transformInput,
|
|
202
|
-
transformOutput,
|
|
203
|
-
convertWhereClause,
|
|
204
|
-
getSchema,
|
|
205
|
-
withReturning,
|
|
206
|
-
getField,
|
|
207
|
-
getModelName
|
|
208
|
-
} = createTransform(db, config, options);
|
|
209
|
-
return {
|
|
210
|
-
id: "drizzle",
|
|
211
|
-
async create(data) {
|
|
212
|
-
const { model, data: values } = data;
|
|
213
|
-
const transformed = transformInput(values, model, "create");
|
|
214
|
-
const schemaModel = getSchema(model);
|
|
215
|
-
checkMissingFields(schemaModel, getModelName(model), transformed);
|
|
216
|
-
const builder = db.insert(schemaModel).values(transformed);
|
|
217
|
-
const returned = await withReturning(model, builder, transformed);
|
|
218
|
-
return transformOutput(returned, model);
|
|
219
|
-
},
|
|
220
|
-
async findOne(data) {
|
|
221
|
-
const { model, where, select } = data;
|
|
222
|
-
const schemaModel = getSchema(model);
|
|
223
|
-
const clause = convertWhereClause(where, model);
|
|
224
|
-
const res = await db.select().from(schemaModel).where(...clause);
|
|
225
|
-
if (!res.length) return null;
|
|
226
|
-
return transformOutput(res[0], model, select);
|
|
227
|
-
},
|
|
228
|
-
async findMany(data) {
|
|
229
|
-
const { model, where, sortBy, limit, offset } = data;
|
|
230
|
-
const schemaModel = getSchema(model);
|
|
231
|
-
const clause = where ? convertWhereClause(where, model) : [];
|
|
232
|
-
const sortFn = sortBy?.direction === "desc" ? desc : asc;
|
|
233
|
-
const builder = db.select().from(schemaModel).limit(limit || 100).offset(offset || 0);
|
|
234
|
-
if (sortBy?.field) {
|
|
235
|
-
builder.orderBy(sortFn(schemaModel[getField(model, sortBy?.field)]));
|
|
236
|
-
}
|
|
237
|
-
const res = await builder.where(...clause);
|
|
238
|
-
return res.map((r) => transformOutput(r, model));
|
|
239
|
-
},
|
|
240
|
-
async count(data) {
|
|
241
|
-
const { model, where } = data;
|
|
242
|
-
const schemaModel = getSchema(model);
|
|
243
|
-
const clause = where ? convertWhereClause(where, model) : [];
|
|
244
|
-
const res = await db.select({ count: count() }).from(schemaModel).where(...clause);
|
|
245
|
-
return res.count;
|
|
246
|
-
},
|
|
247
|
-
async update(data) {
|
|
248
|
-
const { model, where, update: values } = data;
|
|
249
|
-
const schemaModel = getSchema(model);
|
|
250
|
-
const clause = convertWhereClause(where, model);
|
|
251
|
-
const transformed = transformInput(values, model, "update");
|
|
252
|
-
const builder = db.update(schemaModel).set(transformed).where(...clause);
|
|
253
|
-
const returned = await withReturning(
|
|
254
|
-
model,
|
|
255
|
-
builder,
|
|
256
|
-
transformed,
|
|
257
|
-
where
|
|
258
|
-
);
|
|
259
|
-
return transformOutput(returned, model);
|
|
260
|
-
},
|
|
261
|
-
async updateMany(data) {
|
|
262
|
-
const { model, where, update: values } = data;
|
|
263
|
-
const schemaModel = getSchema(model);
|
|
264
|
-
const clause = convertWhereClause(where, model);
|
|
265
|
-
const transformed = transformInput(values, model, "update");
|
|
266
|
-
const builder = db.update(schemaModel).set(transformed).where(...clause);
|
|
267
|
-
const res = await builder;
|
|
268
|
-
return res ? res.changes : 0;
|
|
269
|
-
},
|
|
270
|
-
async delete(data) {
|
|
271
|
-
const { model, where } = data;
|
|
272
|
-
const schemaModel = getSchema(model);
|
|
273
|
-
const clause = convertWhereClause(where, model);
|
|
274
|
-
const builder = db.delete(schemaModel).where(...clause);
|
|
275
|
-
await builder;
|
|
276
|
-
},
|
|
277
|
-
async deleteMany(data) {
|
|
278
|
-
const { model, where } = data;
|
|
279
|
-
const schemaModel = getSchema(model);
|
|
280
|
-
const clause = convertWhereClause(where, model);
|
|
281
|
-
const builder = db.delete(schemaModel).where(...clause);
|
|
282
|
-
const res = await builder;
|
|
283
|
-
return res ? res.length : 0;
|
|
284
|
-
},
|
|
285
|
-
options: config
|
|
286
|
-
};
|
|
287
|
-
};
|
|
224
|
+
});
|
|
288
225
|
|
|
289
226
|
export { drizzleAdapter };
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
const index = require('../shared/better-auth.DjryM8pE.cjs');
|
|
4
|
+
require('../shared/better-auth.D3mtHEZg.cjs');
|
|
5
|
+
require('../shared/better-auth.CUdxApHl.cjs');
|
|
6
|
+
require('../shared/better-auth.BEphVDyL.cjs');
|
|
7
|
+
require('../shared/better-auth.Bg6iw3ig.cjs');
|
|
8
|
+
require('@better-auth/utils/random');
|
|
9
|
+
require('zod');
|
|
10
|
+
require('better-call');
|
|
11
|
+
require('@better-auth/utils/hash');
|
|
12
|
+
require('@noble/ciphers/chacha');
|
|
13
|
+
require('@noble/ciphers/utils');
|
|
14
|
+
require('@noble/ciphers/webcrypto');
|
|
15
|
+
require('@better-auth/utils/base64');
|
|
16
|
+
require('jose');
|
|
17
|
+
require('@noble/hashes/scrypt');
|
|
18
|
+
require('@better-auth/utils');
|
|
19
|
+
require('@better-auth/utils/hex');
|
|
20
|
+
require('@noble/hashes/utils');
|
|
21
|
+
require('../shared/better-auth.CYeOI8C-.cjs');
|
|
22
|
+
require('../shared/better-auth.GpOOav9x.cjs');
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
exports.createAdapter = index.createAdapter;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { f as BetterAuthOptions, g as Adapter } from '../shared/better-auth.BcU1Kjyq.cjs';
|
|
2
|
+
import { a as AdapterConfig, C as CreateCustomAdapter } from '../shared/better-auth.eVy4DZvP.cjs';
|
|
3
|
+
export { A as AdapterDebugLogs, d as AdapterTestDebugLogs, c as CleanedWhere, b as CustomAdapter } from '../shared/better-auth.eVy4DZvP.cjs';
|
|
4
|
+
import '../shared/better-auth.CYegVoq1.cjs';
|
|
5
|
+
import 'zod';
|
|
6
|
+
import '../shared/better-auth.DTiSPWEk.cjs';
|
|
7
|
+
import 'jose';
|
|
8
|
+
import 'kysely';
|
|
9
|
+
import 'better-call';
|
|
10
|
+
import 'better-sqlite3';
|
|
11
|
+
|
|
12
|
+
declare const createAdapter: ({ adapter, config: cfg, }: {
|
|
13
|
+
config: AdapterConfig;
|
|
14
|
+
adapter: CreateCustomAdapter;
|
|
15
|
+
}) => (options: BetterAuthOptions) => Adapter;
|
|
16
|
+
|
|
17
|
+
export { AdapterConfig, CreateCustomAdapter, createAdapter };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { f as BetterAuthOptions, g as Adapter } from '../shared/better-auth.DQ7OSJbI.mjs';
|
|
2
|
+
import { a as AdapterConfig, C as CreateCustomAdapter } from '../shared/better-auth.SPmq4a4z.mjs';
|
|
3
|
+
export { A as AdapterDebugLogs, d as AdapterTestDebugLogs, c as CleanedWhere, b as CustomAdapter } from '../shared/better-auth.SPmq4a4z.mjs';
|
|
4
|
+
import '../shared/better-auth.CYegVoq1.mjs';
|
|
5
|
+
import 'zod';
|
|
6
|
+
import '../shared/better-auth.B88xucNq.mjs';
|
|
7
|
+
import 'jose';
|
|
8
|
+
import 'kysely';
|
|
9
|
+
import 'better-call';
|
|
10
|
+
import 'better-sqlite3';
|
|
11
|
+
|
|
12
|
+
declare const createAdapter: ({ adapter, config: cfg, }: {
|
|
13
|
+
config: AdapterConfig;
|
|
14
|
+
adapter: CreateCustomAdapter;
|
|
15
|
+
}) => (options: BetterAuthOptions) => Adapter;
|
|
16
|
+
|
|
17
|
+
export { AdapterConfig, CreateCustomAdapter, createAdapter };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { f as BetterAuthOptions, g as Adapter } from '../shared/better-auth.CA2hFK4N.js';
|
|
2
|
+
import { a as AdapterConfig, C as CreateCustomAdapter } from '../shared/better-auth.cp2rC2iM.js';
|
|
3
|
+
export { A as AdapterDebugLogs, d as AdapterTestDebugLogs, c as CleanedWhere, b as CustomAdapter } from '../shared/better-auth.cp2rC2iM.js';
|
|
4
|
+
import '../shared/better-auth.CYegVoq1.js';
|
|
5
|
+
import 'zod';
|
|
6
|
+
import '../shared/better-auth.DNTAFSt1.js';
|
|
7
|
+
import 'jose';
|
|
8
|
+
import 'kysely';
|
|
9
|
+
import 'better-call';
|
|
10
|
+
import 'better-sqlite3';
|
|
11
|
+
|
|
12
|
+
declare const createAdapter: ({ adapter, config: cfg, }: {
|
|
13
|
+
config: AdapterConfig;
|
|
14
|
+
adapter: CreateCustomAdapter;
|
|
15
|
+
}) => (options: BetterAuthOptions) => Adapter;
|
|
16
|
+
|
|
17
|
+
export { AdapterConfig, CreateCustomAdapter, createAdapter };
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export { c as createAdapter } from '../shared/better-auth.rSYJCd3o.mjs';
|
|
2
|
+
import '../shared/better-auth.tB5eU6EY.mjs';
|
|
3
|
+
import '../shared/better-auth.0TC26uRi.mjs';
|
|
4
|
+
import '../shared/better-auth.DORkW_Ge.mjs';
|
|
5
|
+
import '../shared/better-auth.BUPPRXfK.mjs';
|
|
6
|
+
import '@better-auth/utils/random';
|
|
7
|
+
import 'zod';
|
|
8
|
+
import 'better-call';
|
|
9
|
+
import '@better-auth/utils/hash';
|
|
10
|
+
import '@noble/ciphers/chacha';
|
|
11
|
+
import '@noble/ciphers/utils';
|
|
12
|
+
import '@noble/ciphers/webcrypto';
|
|
13
|
+
import '@better-auth/utils/base64';
|
|
14
|
+
import 'jose';
|
|
15
|
+
import '@noble/hashes/scrypt';
|
|
16
|
+
import '@better-auth/utils';
|
|
17
|
+
import '@better-auth/utils/hex';
|
|
18
|
+
import '@noble/hashes/utils';
|
|
19
|
+
import '../shared/better-auth.B4Qoxdgc.mjs';
|
|
20
|
+
import '../shared/better-auth.Cqykj82J.mjs';
|
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
const kyselyAdapter = require('../../shared/better-auth.
|
|
3
|
+
const kyselyAdapter = require('../../shared/better-auth.CVCo5Z2T.cjs');
|
|
4
4
|
require('kysely');
|
|
5
|
-
require('../../shared/better-auth.
|
|
6
|
-
require('
|
|
7
|
-
require('better-
|
|
8
|
-
require('../../shared/better-auth.
|
|
5
|
+
require('../../shared/better-auth.DjryM8pE.cjs');
|
|
6
|
+
require('../../shared/better-auth.D3mtHEZg.cjs');
|
|
7
|
+
require('../../shared/better-auth.CUdxApHl.cjs');
|
|
8
|
+
require('../../shared/better-auth.BEphVDyL.cjs');
|
|
9
9
|
require('../../shared/better-auth.Bg6iw3ig.cjs');
|
|
10
10
|
require('@better-auth/utils/random');
|
|
11
|
+
require('zod');
|
|
12
|
+
require('better-call');
|
|
11
13
|
require('@better-auth/utils/hash');
|
|
12
14
|
require('@noble/ciphers/chacha');
|
|
13
15
|
require('@noble/ciphers/utils');
|
|
@@ -20,8 +22,6 @@ require('@better-auth/utils/hex');
|
|
|
20
22
|
require('@noble/hashes/utils');
|
|
21
23
|
require('../../shared/better-auth.CYeOI8C-.cjs');
|
|
22
24
|
require('../../shared/better-auth.GpOOav9x.cjs');
|
|
23
|
-
require('../../shared/better-auth.BEphVDyL.cjs');
|
|
24
|
-
require('../../shared/better-auth.CUdxApHl.cjs');
|
|
25
25
|
|
|
26
26
|
|
|
27
27
|
|