better-auth 1.2.8 → 1.2.9-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.d.cts +3 -2
- package/dist/adapters/drizzle-adapter/index.d.mts +3 -2
- package/dist/adapters/drizzle-adapter/index.d.ts +3 -2
- package/dist/adapters/index.d.cts +4 -3
- package/dist/adapters/index.d.mts +4 -3
- package/dist/adapters/index.d.ts +4 -3
- package/dist/adapters/kysely-adapter/index.cjs +1 -1
- package/dist/adapters/kysely-adapter/index.d.cts +3 -2
- package/dist/adapters/kysely-adapter/index.d.mts +3 -2
- package/dist/adapters/kysely-adapter/index.d.ts +3 -2
- package/dist/adapters/kysely-adapter/index.mjs +1 -1
- package/dist/adapters/memory-adapter/index.d.cts +3 -2
- package/dist/adapters/memory-adapter/index.d.mts +3 -2
- package/dist/adapters/memory-adapter/index.d.ts +3 -2
- package/dist/adapters/mongodb-adapter/index.d.cts +2 -1
- package/dist/adapters/mongodb-adapter/index.d.mts +2 -1
- package/dist/adapters/mongodb-adapter/index.d.ts +2 -1
- package/dist/adapters/prisma-adapter/index.d.cts +3 -2
- package/dist/adapters/prisma-adapter/index.d.mts +3 -2
- package/dist/adapters/prisma-adapter/index.d.ts +3 -2
- package/dist/adapters/test.d.cts +2 -1
- package/dist/adapters/test.d.mts +2 -1
- package/dist/adapters/test.d.ts +2 -1
- package/dist/api/index.d.cts +2 -1
- package/dist/api/index.d.mts +2 -1
- package/dist/api/index.d.ts +2 -1
- package/dist/chunks/bun-sqlite-dialect.cjs +170 -0
- package/dist/chunks/bun-sqlite-dialect.mjs +164 -0
- package/dist/client/index.d.cts +2 -1
- package/dist/client/index.d.mts +2 -1
- package/dist/client/index.d.ts +2 -1
- package/dist/client/plugins/index.d.cts +3 -2
- package/dist/client/plugins/index.d.mts +3 -2
- package/dist/client/plugins/index.d.ts +3 -2
- package/dist/client/react/index.d.cts +2 -1
- package/dist/client/react/index.d.mts +2 -1
- package/dist/client/react/index.d.ts +2 -1
- package/dist/client/solid/index.d.cts +2 -1
- package/dist/client/solid/index.d.mts +2 -1
- package/dist/client/solid/index.d.ts +2 -1
- package/dist/client/svelte/index.d.cts +2 -1
- package/dist/client/svelte/index.d.mts +2 -1
- package/dist/client/svelte/index.d.ts +2 -1
- package/dist/client/vue/index.d.cts +2 -1
- package/dist/client/vue/index.d.mts +2 -1
- package/dist/client/vue/index.d.ts +2 -1
- package/dist/cookies/index.d.cts +2 -1
- package/dist/cookies/index.d.mts +2 -1
- package/dist/cookies/index.d.ts +2 -1
- package/dist/db/index.cjs +2 -2
- package/dist/db/index.d.cts +3 -2
- package/dist/db/index.d.mts +3 -2
- package/dist/db/index.d.ts +3 -2
- package/dist/db/index.mjs +2 -2
- package/dist/index.cjs +2 -2
- package/dist/index.d.cts +3 -2
- package/dist/index.d.mts +3 -2
- package/dist/index.d.ts +3 -2
- package/dist/index.mjs +2 -2
- package/dist/integrations/next-js.d.cts +2 -1
- package/dist/integrations/next-js.d.mts +2 -1
- package/dist/integrations/next-js.d.ts +2 -1
- package/dist/integrations/node.d.cts +2 -1
- package/dist/integrations/node.d.mts +2 -1
- package/dist/integrations/node.d.ts +2 -1
- package/dist/integrations/react-start.d.cts +2 -1
- package/dist/integrations/react-start.d.mts +2 -1
- package/dist/integrations/react-start.d.ts +2 -1
- package/dist/integrations/svelte-kit.d.cts +2 -1
- package/dist/integrations/svelte-kit.d.mts +2 -1
- package/dist/integrations/svelte-kit.d.ts +2 -1
- package/dist/oauth2/index.d.cts +3 -2
- package/dist/oauth2/index.d.mts +3 -2
- package/dist/oauth2/index.d.ts +3 -2
- package/dist/plugins/admin/index.cjs +1 -1
- package/dist/plugins/admin/index.d.cts +2 -1
- package/dist/plugins/admin/index.d.mts +2 -1
- package/dist/plugins/admin/index.d.ts +2 -1
- package/dist/plugins/admin/index.mjs +1 -1
- package/dist/plugins/anonymous/index.d.cts +2 -1
- package/dist/plugins/anonymous/index.d.mts +2 -1
- package/dist/plugins/anonymous/index.d.ts +2 -1
- package/dist/plugins/bearer/index.d.cts +2 -1
- package/dist/plugins/bearer/index.d.mts +2 -1
- package/dist/plugins/bearer/index.d.ts +2 -1
- package/dist/plugins/captcha/index.d.cts +2 -1
- package/dist/plugins/captcha/index.d.mts +2 -1
- package/dist/plugins/captcha/index.d.ts +2 -1
- package/dist/plugins/custom-session/index.d.cts +2 -1
- package/dist/plugins/custom-session/index.d.mts +2 -1
- package/dist/plugins/custom-session/index.d.ts +2 -1
- package/dist/plugins/email-otp/index.d.cts +2 -1
- package/dist/plugins/email-otp/index.d.mts +2 -1
- package/dist/plugins/email-otp/index.d.ts +2 -1
- package/dist/plugins/generic-oauth/index.d.cts +2 -1
- package/dist/plugins/generic-oauth/index.d.mts +2 -1
- package/dist/plugins/generic-oauth/index.d.ts +2 -1
- package/dist/plugins/haveibeenpwned/index.d.cts +2 -1
- package/dist/plugins/haveibeenpwned/index.d.mts +2 -1
- package/dist/plugins/haveibeenpwned/index.d.ts +2 -1
- package/dist/plugins/index.cjs +992 -12
- package/dist/plugins/index.d.cts +556 -5
- package/dist/plugins/index.d.mts +556 -5
- package/dist/plugins/index.d.ts +556 -5
- package/dist/plugins/index.mjs +990 -14
- package/dist/plugins/jwt/index.d.cts +2 -1
- package/dist/plugins/jwt/index.d.mts +2 -1
- package/dist/plugins/jwt/index.d.ts +2 -1
- package/dist/plugins/multi-session/index.d.cts +2 -1
- package/dist/plugins/multi-session/index.d.mts +2 -1
- package/dist/plugins/multi-session/index.d.ts +2 -1
- package/dist/plugins/oauth-proxy/index.d.cts +2 -1
- package/dist/plugins/oauth-proxy/index.d.mts +2 -1
- package/dist/plugins/oauth-proxy/index.d.ts +2 -1
- package/dist/plugins/oidc-provider/index.cjs +12 -1314
- package/dist/plugins/oidc-provider/index.d.cts +12 -2
- package/dist/plugins/oidc-provider/index.d.mts +12 -2
- package/dist/plugins/oidc-provider/index.d.ts +12 -2
- package/dist/plugins/oidc-provider/index.mjs +10 -1317
- package/dist/plugins/one-time-token/index.d.cts +2 -1
- package/dist/plugins/one-time-token/index.d.mts +2 -1
- package/dist/plugins/one-time-token/index.d.ts +2 -1
- package/dist/plugins/open-api/index.d.cts +2 -1
- package/dist/plugins/open-api/index.d.mts +2 -1
- package/dist/plugins/open-api/index.d.ts +2 -1
- package/dist/plugins/organization/index.d.cts +2 -1
- package/dist/plugins/organization/index.d.mts +2 -1
- package/dist/plugins/organization/index.d.ts +2 -1
- package/dist/plugins/passkey/index.d.cts +2 -1
- package/dist/plugins/passkey/index.d.mts +2 -1
- package/dist/plugins/passkey/index.d.ts +2 -1
- package/dist/plugins/phone-number/index.d.cts +2 -1
- package/dist/plugins/phone-number/index.d.mts +2 -1
- package/dist/plugins/phone-number/index.d.ts +2 -1
- package/dist/plugins/sso/index.d.cts +2 -1
- package/dist/plugins/sso/index.d.mts +2 -1
- package/dist/plugins/sso/index.d.ts +2 -1
- package/dist/plugins/two-factor/index.d.cts +2 -1
- package/dist/plugins/two-factor/index.d.mts +2 -1
- package/dist/plugins/two-factor/index.d.ts +2 -1
- package/dist/plugins/username/index.d.cts +2 -1
- package/dist/plugins/username/index.d.mts +2 -1
- package/dist/plugins/username/index.d.ts +2 -1
- package/dist/shared/{better-auth.Ia_Tf4f9.mjs → better-auth.B-orlLFy.mjs} +9 -0
- package/dist/shared/{better-auth.Cl08k4BO.d.ts → better-auth.B7NH8D_Q.d.ts} +3 -2
- package/dist/shared/{better-auth.evJO2IA-.d.mts → better-auth.B9518la0.d.mts} +1 -1
- package/dist/shared/{better-auth.B2ilRwKj.d.cts → better-auth.BIYNWcaQ.d.cts} +1 -1
- package/dist/shared/{better-auth.Bi6qVH78.d.ts → better-auth.BJfF6T3s.d.ts} +1 -1
- package/dist/shared/{better-auth.Dl0SPo2H.cjs → better-auth.BMyxOUuq.cjs} +1 -1
- package/dist/shared/{better-auth.CH860PZb.d.ts → better-auth.BVyTlGJD.d.cts} +2 -2
- package/dist/shared/{better-auth.XjdOGtZf.mjs → better-auth.Bdf76d5Z.mjs} +1 -1
- package/dist/shared/{better-auth.DxCeypxR.cjs → better-auth.BgyblbhF.cjs} +4 -2
- package/dist/shared/{better-auth.Bx1dDhzl.d.mts → better-auth.Bt3Neoqa.d.mts} +1 -1
- package/dist/shared/{better-auth.BCcWVQ6K.d.cts → better-auth.Bx-sj0KL.d.cts} +1 -1
- package/dist/shared/better-auth.CQcCOgHC.mjs +1329 -0
- package/dist/shared/{better-auth.ByRVnZKI.d.cts → better-auth.CUQGT7zI.d.cts} +3 -2
- package/dist/shared/better-auth.Ch9yQZRY.cjs +1333 -0
- package/dist/shared/{better-auth.DgQ-2IHz.d.mts → better-auth.Cm5_Oaun.d.mts} +1 -1
- package/dist/shared/{better-auth.Dxk5h-5w.d.ts → better-auth.CsujSPu3.d.ts} +1 -1
- package/dist/shared/{better-auth.CDnTKHpI.mjs → better-auth.Cwb6DfVs.mjs} +4 -2
- package/dist/shared/{better-auth.Bm5vSUzp.d.mts → better-auth.ZI2NxmSV.d.mts} +3 -2
- package/dist/shared/{better-auth.Cs3HTlCG.d.cts → better-auth.jp32bTkx.d.ts} +2 -2
- package/dist/shared/{better-auth.DGHIk-hV.cjs → better-auth.xK-w0Rah.cjs} +9 -0
- package/dist/types/index.d.cts +3 -2
- package/dist/types/index.d.mts +3 -2
- package/dist/types/index.d.ts +3 -2
- package/package.json +16 -15
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { A as AdapterDebugLogs } from '../../shared/better-auth.
|
|
1
|
+
import { B as BetterAuthOptions, A as Adapter } from '../../shared/better-auth.CUQGT7zI.cjs';
|
|
2
|
+
import { A as AdapterDebugLogs } from '../../shared/better-auth.BIYNWcaQ.cjs';
|
|
3
3
|
import '../../shared/better-auth.CYegVoq1.cjs';
|
|
4
4
|
import 'zod';
|
|
5
5
|
import '../../shared/better-auth._rXvQlMG.cjs';
|
|
@@ -7,6 +7,7 @@ import 'jose';
|
|
|
7
7
|
import 'kysely';
|
|
8
8
|
import 'better-call';
|
|
9
9
|
import 'better-sqlite3';
|
|
10
|
+
import 'bun:sqlite';
|
|
10
11
|
|
|
11
12
|
interface DB {
|
|
12
13
|
[key: string]: any;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { A as AdapterDebugLogs } from '../../shared/better-auth.
|
|
1
|
+
import { B as BetterAuthOptions, A as Adapter } from '../../shared/better-auth.ZI2NxmSV.mjs';
|
|
2
|
+
import { A as AdapterDebugLogs } from '../../shared/better-auth.B9518la0.mjs';
|
|
3
3
|
import '../../shared/better-auth.CYegVoq1.mjs';
|
|
4
4
|
import 'zod';
|
|
5
5
|
import '../../shared/better-auth.BTXFetzv.mjs';
|
|
@@ -7,6 +7,7 @@ import 'jose';
|
|
|
7
7
|
import 'kysely';
|
|
8
8
|
import 'better-call';
|
|
9
9
|
import 'better-sqlite3';
|
|
10
|
+
import 'bun:sqlite';
|
|
10
11
|
|
|
11
12
|
interface DB {
|
|
12
13
|
[key: string]: any;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { A as AdapterDebugLogs } from '../../shared/better-auth.
|
|
1
|
+
import { B as BetterAuthOptions, A as Adapter } from '../../shared/better-auth.B7NH8D_Q.js';
|
|
2
|
+
import { A as AdapterDebugLogs } from '../../shared/better-auth.BJfF6T3s.js';
|
|
3
3
|
import '../../shared/better-auth.CYegVoq1.js';
|
|
4
4
|
import 'zod';
|
|
5
5
|
import '../../shared/better-auth.Bzjh9zg_.js';
|
|
@@ -7,6 +7,7 @@ import 'jose';
|
|
|
7
7
|
import 'kysely';
|
|
8
8
|
import 'better-call';
|
|
9
9
|
import 'better-sqlite3';
|
|
10
|
+
import 'bun:sqlite';
|
|
10
11
|
|
|
11
12
|
interface DB {
|
|
12
13
|
[key: string]: any;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { a as AdapterConfig, C as CreateCustomAdapter } from '../shared/better-auth.
|
|
3
|
-
export { A as AdapterDebugLogs, d as AdapterTestDebugLogs, c as CleanedWhere, b as CustomAdapter } from '../shared/better-auth.
|
|
1
|
+
import { B as BetterAuthOptions, A as Adapter } from '../shared/better-auth.CUQGT7zI.cjs';
|
|
2
|
+
import { a as AdapterConfig, C as CreateCustomAdapter } from '../shared/better-auth.BIYNWcaQ.cjs';
|
|
3
|
+
export { A as AdapterDebugLogs, d as AdapterTestDebugLogs, c as CleanedWhere, b as CustomAdapter } from '../shared/better-auth.BIYNWcaQ.cjs';
|
|
4
4
|
import '../shared/better-auth.CYegVoq1.cjs';
|
|
5
5
|
import 'zod';
|
|
6
6
|
import '../shared/better-auth._rXvQlMG.cjs';
|
|
@@ -8,6 +8,7 @@ import 'jose';
|
|
|
8
8
|
import 'kysely';
|
|
9
9
|
import 'better-call';
|
|
10
10
|
import 'better-sqlite3';
|
|
11
|
+
import 'bun:sqlite';
|
|
11
12
|
|
|
12
13
|
declare const createAdapter: ({ adapter, config: cfg, }: {
|
|
13
14
|
config: AdapterConfig;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { a as AdapterConfig, C as CreateCustomAdapter } from '../shared/better-auth.
|
|
3
|
-
export { A as AdapterDebugLogs, d as AdapterTestDebugLogs, c as CleanedWhere, b as CustomAdapter } from '../shared/better-auth.
|
|
1
|
+
import { B as BetterAuthOptions, A as Adapter } from '../shared/better-auth.ZI2NxmSV.mjs';
|
|
2
|
+
import { a as AdapterConfig, C as CreateCustomAdapter } from '../shared/better-auth.B9518la0.mjs';
|
|
3
|
+
export { A as AdapterDebugLogs, d as AdapterTestDebugLogs, c as CleanedWhere, b as CustomAdapter } from '../shared/better-auth.B9518la0.mjs';
|
|
4
4
|
import '../shared/better-auth.CYegVoq1.mjs';
|
|
5
5
|
import 'zod';
|
|
6
6
|
import '../shared/better-auth.BTXFetzv.mjs';
|
|
@@ -8,6 +8,7 @@ import 'jose';
|
|
|
8
8
|
import 'kysely';
|
|
9
9
|
import 'better-call';
|
|
10
10
|
import 'better-sqlite3';
|
|
11
|
+
import 'bun:sqlite';
|
|
11
12
|
|
|
12
13
|
declare const createAdapter: ({ adapter, config: cfg, }: {
|
|
13
14
|
config: AdapterConfig;
|
package/dist/adapters/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { a as AdapterConfig, C as CreateCustomAdapter } from '../shared/better-auth.
|
|
3
|
-
export { A as AdapterDebugLogs, d as AdapterTestDebugLogs, c as CleanedWhere, b as CustomAdapter } from '../shared/better-auth.
|
|
1
|
+
import { B as BetterAuthOptions, A as Adapter } from '../shared/better-auth.B7NH8D_Q.js';
|
|
2
|
+
import { a as AdapterConfig, C as CreateCustomAdapter } from '../shared/better-auth.BJfF6T3s.js';
|
|
3
|
+
export { A as AdapterDebugLogs, d as AdapterTestDebugLogs, c as CleanedWhere, b as CustomAdapter } from '../shared/better-auth.BJfF6T3s.js';
|
|
4
4
|
import '../shared/better-auth.CYegVoq1.js';
|
|
5
5
|
import 'zod';
|
|
6
6
|
import '../shared/better-auth.Bzjh9zg_.js';
|
|
@@ -8,6 +8,7 @@ import 'jose';
|
|
|
8
8
|
import 'kysely';
|
|
9
9
|
import 'better-call';
|
|
10
10
|
import 'better-sqlite3';
|
|
11
|
+
import 'bun:sqlite';
|
|
11
12
|
|
|
12
13
|
declare const createAdapter: ({ adapter, config: cfg, }: {
|
|
13
14
|
config: AdapterConfig;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
const kyselyAdapter = require('../../shared/better-auth.
|
|
3
|
+
const kyselyAdapter = require('../../shared/better-auth.xK-w0Rah.cjs');
|
|
4
4
|
require('kysely');
|
|
5
5
|
require('../../shared/better-auth.Be27qhjB.cjs');
|
|
6
6
|
require('../../shared/better-auth.D3mtHEZg.cjs');
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import { Kysely } from 'kysely';
|
|
2
|
-
import {
|
|
3
|
-
import { A as AdapterDebugLogs } from '../../shared/better-auth.
|
|
2
|
+
import { B as BetterAuthOptions, K as KyselyDatabaseType, A as Adapter } from '../../shared/better-auth.CUQGT7zI.cjs';
|
|
3
|
+
import { A as AdapterDebugLogs } from '../../shared/better-auth.BIYNWcaQ.cjs';
|
|
4
4
|
import '../../shared/better-auth.CYegVoq1.cjs';
|
|
5
5
|
import 'zod';
|
|
6
6
|
import '../../shared/better-auth._rXvQlMG.cjs';
|
|
7
7
|
import 'jose';
|
|
8
8
|
import 'better-call';
|
|
9
9
|
import 'better-sqlite3';
|
|
10
|
+
import 'bun:sqlite';
|
|
10
11
|
|
|
11
12
|
declare const createKyselyAdapter: (config: BetterAuthOptions) => Promise<{
|
|
12
13
|
kysely: Kysely<any> | null;
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import { Kysely } from 'kysely';
|
|
2
|
-
import {
|
|
3
|
-
import { A as AdapterDebugLogs } from '../../shared/better-auth.
|
|
2
|
+
import { B as BetterAuthOptions, K as KyselyDatabaseType, A as Adapter } from '../../shared/better-auth.ZI2NxmSV.mjs';
|
|
3
|
+
import { A as AdapterDebugLogs } from '../../shared/better-auth.B9518la0.mjs';
|
|
4
4
|
import '../../shared/better-auth.CYegVoq1.mjs';
|
|
5
5
|
import 'zod';
|
|
6
6
|
import '../../shared/better-auth.BTXFetzv.mjs';
|
|
7
7
|
import 'jose';
|
|
8
8
|
import 'better-call';
|
|
9
9
|
import 'better-sqlite3';
|
|
10
|
+
import 'bun:sqlite';
|
|
10
11
|
|
|
11
12
|
declare const createKyselyAdapter: (config: BetterAuthOptions) => Promise<{
|
|
12
13
|
kysely: Kysely<any> | null;
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import { Kysely } from 'kysely';
|
|
2
|
-
import {
|
|
3
|
-
import { A as AdapterDebugLogs } from '../../shared/better-auth.
|
|
2
|
+
import { B as BetterAuthOptions, K as KyselyDatabaseType, A as Adapter } from '../../shared/better-auth.B7NH8D_Q.js';
|
|
3
|
+
import { A as AdapterDebugLogs } from '../../shared/better-auth.BJfF6T3s.js';
|
|
4
4
|
import '../../shared/better-auth.CYegVoq1.js';
|
|
5
5
|
import 'zod';
|
|
6
6
|
import '../../shared/better-auth.Bzjh9zg_.js';
|
|
7
7
|
import 'jose';
|
|
8
8
|
import 'better-call';
|
|
9
9
|
import 'better-sqlite3';
|
|
10
|
+
import 'bun:sqlite';
|
|
10
11
|
|
|
11
12
|
declare const createKyselyAdapter: (config: BetterAuthOptions) => Promise<{
|
|
12
13
|
kysely: Kysely<any> | null;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { c as createKyselyAdapter, k as kyselyAdapter } from '../../shared/better-auth.
|
|
1
|
+
export { c as createKyselyAdapter, k as kyselyAdapter } from '../../shared/better-auth.B-orlLFy.mjs';
|
|
2
2
|
import 'kysely';
|
|
3
3
|
import '../../shared/better-auth.Dpv9J4ny.mjs';
|
|
4
4
|
import '../../shared/better-auth.tB5eU6EY.mjs';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { A as AdapterDebugLogs } from '../../shared/better-auth.
|
|
1
|
+
import { B as BetterAuthOptions, A as Adapter } from '../../shared/better-auth.CUQGT7zI.cjs';
|
|
2
|
+
import { A as AdapterDebugLogs } from '../../shared/better-auth.BIYNWcaQ.cjs';
|
|
3
3
|
import '../../shared/better-auth.CYegVoq1.cjs';
|
|
4
4
|
import 'zod';
|
|
5
5
|
import '../../shared/better-auth._rXvQlMG.cjs';
|
|
@@ -7,6 +7,7 @@ import 'jose';
|
|
|
7
7
|
import 'kysely';
|
|
8
8
|
import 'better-call';
|
|
9
9
|
import 'better-sqlite3';
|
|
10
|
+
import 'bun:sqlite';
|
|
10
11
|
|
|
11
12
|
interface MemoryDB {
|
|
12
13
|
[key: string]: any[];
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { A as AdapterDebugLogs } from '../../shared/better-auth.
|
|
1
|
+
import { B as BetterAuthOptions, A as Adapter } from '../../shared/better-auth.ZI2NxmSV.mjs';
|
|
2
|
+
import { A as AdapterDebugLogs } from '../../shared/better-auth.B9518la0.mjs';
|
|
3
3
|
import '../../shared/better-auth.CYegVoq1.mjs';
|
|
4
4
|
import 'zod';
|
|
5
5
|
import '../../shared/better-auth.BTXFetzv.mjs';
|
|
@@ -7,6 +7,7 @@ import 'jose';
|
|
|
7
7
|
import 'kysely';
|
|
8
8
|
import 'better-call';
|
|
9
9
|
import 'better-sqlite3';
|
|
10
|
+
import 'bun:sqlite';
|
|
10
11
|
|
|
11
12
|
interface MemoryDB {
|
|
12
13
|
[key: string]: any[];
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { A as AdapterDebugLogs } from '../../shared/better-auth.
|
|
1
|
+
import { B as BetterAuthOptions, A as Adapter } from '../../shared/better-auth.B7NH8D_Q.js';
|
|
2
|
+
import { A as AdapterDebugLogs } from '../../shared/better-auth.BJfF6T3s.js';
|
|
3
3
|
import '../../shared/better-auth.CYegVoq1.js';
|
|
4
4
|
import 'zod';
|
|
5
5
|
import '../../shared/better-auth.Bzjh9zg_.js';
|
|
@@ -7,6 +7,7 @@ import 'jose';
|
|
|
7
7
|
import 'kysely';
|
|
8
8
|
import 'better-call';
|
|
9
9
|
import 'better-sqlite3';
|
|
10
|
+
import 'bun:sqlite';
|
|
10
11
|
|
|
11
12
|
interface MemoryDB {
|
|
12
13
|
[key: string]: any[];
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Db } from 'mongodb';
|
|
2
|
-
import {
|
|
2
|
+
import { B as BetterAuthOptions, W as Where } from '../../shared/better-auth.CUQGT7zI.cjs';
|
|
3
3
|
import '../../shared/better-auth.CYegVoq1.cjs';
|
|
4
4
|
import 'zod';
|
|
5
5
|
import '../../shared/better-auth._rXvQlMG.cjs';
|
|
@@ -7,6 +7,7 @@ import 'jose';
|
|
|
7
7
|
import 'kysely';
|
|
8
8
|
import 'better-call';
|
|
9
9
|
import 'better-sqlite3';
|
|
10
|
+
import 'bun:sqlite';
|
|
10
11
|
|
|
11
12
|
declare const mongodbAdapter: (db: Db) => (options: BetterAuthOptions) => {
|
|
12
13
|
id: string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Db } from 'mongodb';
|
|
2
|
-
import {
|
|
2
|
+
import { B as BetterAuthOptions, W as Where } from '../../shared/better-auth.ZI2NxmSV.mjs';
|
|
3
3
|
import '../../shared/better-auth.CYegVoq1.mjs';
|
|
4
4
|
import 'zod';
|
|
5
5
|
import '../../shared/better-auth.BTXFetzv.mjs';
|
|
@@ -7,6 +7,7 @@ import 'jose';
|
|
|
7
7
|
import 'kysely';
|
|
8
8
|
import 'better-call';
|
|
9
9
|
import 'better-sqlite3';
|
|
10
|
+
import 'bun:sqlite';
|
|
10
11
|
|
|
11
12
|
declare const mongodbAdapter: (db: Db) => (options: BetterAuthOptions) => {
|
|
12
13
|
id: string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Db } from 'mongodb';
|
|
2
|
-
import {
|
|
2
|
+
import { B as BetterAuthOptions, W as Where } from '../../shared/better-auth.B7NH8D_Q.js';
|
|
3
3
|
import '../../shared/better-auth.CYegVoq1.js';
|
|
4
4
|
import 'zod';
|
|
5
5
|
import '../../shared/better-auth.Bzjh9zg_.js';
|
|
@@ -7,6 +7,7 @@ import 'jose';
|
|
|
7
7
|
import 'kysely';
|
|
8
8
|
import 'better-call';
|
|
9
9
|
import 'better-sqlite3';
|
|
10
|
+
import 'bun:sqlite';
|
|
10
11
|
|
|
11
12
|
declare const mongodbAdapter: (db: Db) => (options: BetterAuthOptions) => {
|
|
12
13
|
id: string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { A as AdapterDebugLogs } from '../../shared/better-auth.
|
|
1
|
+
import { B as BetterAuthOptions, A as Adapter } from '../../shared/better-auth.CUQGT7zI.cjs';
|
|
2
|
+
import { A as AdapterDebugLogs } from '../../shared/better-auth.BIYNWcaQ.cjs';
|
|
3
3
|
import '../../shared/better-auth.CYegVoq1.cjs';
|
|
4
4
|
import 'zod';
|
|
5
5
|
import '../../shared/better-auth._rXvQlMG.cjs';
|
|
@@ -7,6 +7,7 @@ import 'jose';
|
|
|
7
7
|
import 'kysely';
|
|
8
8
|
import 'better-call';
|
|
9
9
|
import 'better-sqlite3';
|
|
10
|
+
import 'bun:sqlite';
|
|
10
11
|
|
|
11
12
|
interface PrismaConfig {
|
|
12
13
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { A as AdapterDebugLogs } from '../../shared/better-auth.
|
|
1
|
+
import { B as BetterAuthOptions, A as Adapter } from '../../shared/better-auth.ZI2NxmSV.mjs';
|
|
2
|
+
import { A as AdapterDebugLogs } from '../../shared/better-auth.B9518la0.mjs';
|
|
3
3
|
import '../../shared/better-auth.CYegVoq1.mjs';
|
|
4
4
|
import 'zod';
|
|
5
5
|
import '../../shared/better-auth.BTXFetzv.mjs';
|
|
@@ -7,6 +7,7 @@ import 'jose';
|
|
|
7
7
|
import 'kysely';
|
|
8
8
|
import 'better-call';
|
|
9
9
|
import 'better-sqlite3';
|
|
10
|
+
import 'bun:sqlite';
|
|
10
11
|
|
|
11
12
|
interface PrismaConfig {
|
|
12
13
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { A as AdapterDebugLogs } from '../../shared/better-auth.
|
|
1
|
+
import { B as BetterAuthOptions, A as Adapter } from '../../shared/better-auth.B7NH8D_Q.js';
|
|
2
|
+
import { A as AdapterDebugLogs } from '../../shared/better-auth.BJfF6T3s.js';
|
|
3
3
|
import '../../shared/better-auth.CYegVoq1.js';
|
|
4
4
|
import 'zod';
|
|
5
5
|
import '../../shared/better-auth.Bzjh9zg_.js';
|
|
@@ -7,6 +7,7 @@ import 'jose';
|
|
|
7
7
|
import 'kysely';
|
|
8
8
|
import 'better-call';
|
|
9
9
|
import 'better-sqlite3';
|
|
10
|
+
import 'bun:sqlite';
|
|
10
11
|
|
|
11
12
|
interface PrismaConfig {
|
|
12
13
|
/**
|
package/dist/adapters/test.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { B as BetterAuthOptions, A as Adapter } from '../shared/better-auth.CUQGT7zI.cjs';
|
|
2
2
|
import '../shared/better-auth.CYegVoq1.cjs';
|
|
3
3
|
import 'zod';
|
|
4
4
|
import '../shared/better-auth._rXvQlMG.cjs';
|
|
@@ -6,6 +6,7 @@ import 'jose';
|
|
|
6
6
|
import 'kysely';
|
|
7
7
|
import 'better-call';
|
|
8
8
|
import 'better-sqlite3';
|
|
9
|
+
import 'bun:sqlite';
|
|
9
10
|
|
|
10
11
|
interface AdapterTestOptions {
|
|
11
12
|
getAdapter: (customOptions?: Omit<BetterAuthOptions, "database">) => Promise<Adapter>;
|
package/dist/adapters/test.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { B as BetterAuthOptions, A as Adapter } from '../shared/better-auth.ZI2NxmSV.mjs';
|
|
2
2
|
import '../shared/better-auth.CYegVoq1.mjs';
|
|
3
3
|
import 'zod';
|
|
4
4
|
import '../shared/better-auth.BTXFetzv.mjs';
|
|
@@ -6,6 +6,7 @@ import 'jose';
|
|
|
6
6
|
import 'kysely';
|
|
7
7
|
import 'better-call';
|
|
8
8
|
import 'better-sqlite3';
|
|
9
|
+
import 'bun:sqlite';
|
|
9
10
|
|
|
10
11
|
interface AdapterTestOptions {
|
|
11
12
|
getAdapter: (customOptions?: Omit<BetterAuthOptions, "database">) => Promise<Adapter>;
|
package/dist/adapters/test.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { B as BetterAuthOptions, A as Adapter } from '../shared/better-auth.B7NH8D_Q.js';
|
|
2
2
|
import '../shared/better-auth.CYegVoq1.js';
|
|
3
3
|
import 'zod';
|
|
4
4
|
import '../shared/better-auth.Bzjh9zg_.js';
|
|
@@ -6,6 +6,7 @@ import 'jose';
|
|
|
6
6
|
import 'kysely';
|
|
7
7
|
import 'better-call';
|
|
8
8
|
import 'better-sqlite3';
|
|
9
|
+
import 'bun:sqlite';
|
|
9
10
|
|
|
10
11
|
interface AdapterTestOptions {
|
|
11
12
|
getAdapter: (customOptions?: Omit<BetterAuthOptions, "database">) => Promise<Adapter>;
|
package/dist/api/index.d.cts
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import '../shared/better-auth.CYegVoq1.cjs';
|
|
2
2
|
export { APIError } from 'better-call';
|
|
3
|
-
export {
|
|
3
|
+
export { i as AuthEndpoint, j as AuthMiddleware, aF as callbackOAuth, b0 as changeEmail, aY as changePassword, h as createAuthEndpoint, g as createAuthMiddleware, aT as createEmailVerificationToken, a_ as deleteUser, a$ as deleteUserCallback, b1 as error, aQ as forgetPassword, aR as forgetPasswordCallback, aK as freshSessionMiddleware, b7 as getAccessToken, aB as getEndpoints, aG as getSession, aH as getSessionFromCtx, b5 as linkSocialAccount, aL as listSessions, b4 as listUserAccounts, b2 as ok, o as optionsMiddleware, ba as originCheck, b9 as originCheckMiddleware, b8 as refreshToken, aJ as requestOnlySessionMiddleware, aS as resetPassword, aO as revokeOtherSessions, aM as revokeSession, aN as revokeSessions, aC as router, aV as sendVerificationEmail, aU as sendVerificationEmailFn, aI as sessionMiddleware, aZ as setPassword, aE as signInEmail, aD as signInSocial, aP as signOut, b3 as signUpEmail, b6 as unlinkAccount, aX as updateUser, aW as verifyEmail } from '../shared/better-auth.CUQGT7zI.cjs';
|
|
4
4
|
import 'zod';
|
|
5
5
|
import '../shared/better-auth._rXvQlMG.cjs';
|
|
6
6
|
import 'kysely';
|
|
7
7
|
import 'better-sqlite3';
|
|
8
|
+
import 'bun:sqlite';
|
|
8
9
|
import 'jose';
|
package/dist/api/index.d.mts
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import '../shared/better-auth.CYegVoq1.mjs';
|
|
2
2
|
export { APIError } from 'better-call';
|
|
3
|
-
export {
|
|
3
|
+
export { i as AuthEndpoint, j as AuthMiddleware, aF as callbackOAuth, b0 as changeEmail, aY as changePassword, h as createAuthEndpoint, g as createAuthMiddleware, aT as createEmailVerificationToken, a_ as deleteUser, a$ as deleteUserCallback, b1 as error, aQ as forgetPassword, aR as forgetPasswordCallback, aK as freshSessionMiddleware, b7 as getAccessToken, aB as getEndpoints, aG as getSession, aH as getSessionFromCtx, b5 as linkSocialAccount, aL as listSessions, b4 as listUserAccounts, b2 as ok, o as optionsMiddleware, ba as originCheck, b9 as originCheckMiddleware, b8 as refreshToken, aJ as requestOnlySessionMiddleware, aS as resetPassword, aO as revokeOtherSessions, aM as revokeSession, aN as revokeSessions, aC as router, aV as sendVerificationEmail, aU as sendVerificationEmailFn, aI as sessionMiddleware, aZ as setPassword, aE as signInEmail, aD as signInSocial, aP as signOut, b3 as signUpEmail, b6 as unlinkAccount, aX as updateUser, aW as verifyEmail } from '../shared/better-auth.ZI2NxmSV.mjs';
|
|
4
4
|
import 'zod';
|
|
5
5
|
import '../shared/better-auth.BTXFetzv.mjs';
|
|
6
6
|
import 'kysely';
|
|
7
7
|
import 'better-sqlite3';
|
|
8
|
+
import 'bun:sqlite';
|
|
8
9
|
import 'jose';
|
package/dist/api/index.d.ts
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import '../shared/better-auth.CYegVoq1.js';
|
|
2
2
|
export { APIError } from 'better-call';
|
|
3
|
-
export {
|
|
3
|
+
export { i as AuthEndpoint, j as AuthMiddleware, aF as callbackOAuth, b0 as changeEmail, aY as changePassword, h as createAuthEndpoint, g as createAuthMiddleware, aT as createEmailVerificationToken, a_ as deleteUser, a$ as deleteUserCallback, b1 as error, aQ as forgetPassword, aR as forgetPasswordCallback, aK as freshSessionMiddleware, b7 as getAccessToken, aB as getEndpoints, aG as getSession, aH as getSessionFromCtx, b5 as linkSocialAccount, aL as listSessions, b4 as listUserAccounts, b2 as ok, o as optionsMiddleware, ba as originCheck, b9 as originCheckMiddleware, b8 as refreshToken, aJ as requestOnlySessionMiddleware, aS as resetPassword, aO as revokeOtherSessions, aM as revokeSession, aN as revokeSessions, aC as router, aV as sendVerificationEmail, aU as sendVerificationEmailFn, aI as sessionMiddleware, aZ as setPassword, aE as signInEmail, aD as signInSocial, aP as signOut, b3 as signUpEmail, b6 as unlinkAccount, aX as updateUser, aW as verifyEmail } from '../shared/better-auth.B7NH8D_Q.js';
|
|
4
4
|
import 'zod';
|
|
5
5
|
import '../shared/better-auth.Bzjh9zg_.js';
|
|
6
6
|
import 'kysely';
|
|
7
7
|
import 'better-sqlite3';
|
|
8
|
+
import 'bun:sqlite';
|
|
8
9
|
import 'jose';
|
|
@@ -0,0 +1,170 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
const kysely = require('kysely');
|
|
4
|
+
|
|
5
|
+
class BunSqliteAdapter {
|
|
6
|
+
get supportsCreateIfNotExists() {
|
|
7
|
+
return true;
|
|
8
|
+
}
|
|
9
|
+
get supportsTransactionalDdl() {
|
|
10
|
+
return false;
|
|
11
|
+
}
|
|
12
|
+
get supportsReturning() {
|
|
13
|
+
return true;
|
|
14
|
+
}
|
|
15
|
+
async acquireMigrationLock() {
|
|
16
|
+
}
|
|
17
|
+
async releaseMigrationLock() {
|
|
18
|
+
}
|
|
19
|
+
get supportsOutput() {
|
|
20
|
+
return true;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
class BunSqliteDriver {
|
|
24
|
+
#config;
|
|
25
|
+
#connectionMutex = new ConnectionMutex();
|
|
26
|
+
#db;
|
|
27
|
+
#connection;
|
|
28
|
+
constructor(config) {
|
|
29
|
+
this.#config = { ...config };
|
|
30
|
+
}
|
|
31
|
+
async init() {
|
|
32
|
+
this.#db = this.#config.database;
|
|
33
|
+
this.#connection = new BunSqliteConnection(this.#db);
|
|
34
|
+
if (this.#config.onCreateConnection) {
|
|
35
|
+
await this.#config.onCreateConnection(this.#connection);
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
async acquireConnection() {
|
|
39
|
+
await this.#connectionMutex.lock();
|
|
40
|
+
return this.#connection;
|
|
41
|
+
}
|
|
42
|
+
async beginTransaction(connection) {
|
|
43
|
+
await connection.executeQuery(kysely.CompiledQuery.raw("begin"));
|
|
44
|
+
}
|
|
45
|
+
async commitTransaction(connection) {
|
|
46
|
+
await connection.executeQuery(kysely.CompiledQuery.raw("commit"));
|
|
47
|
+
}
|
|
48
|
+
async rollbackTransaction(connection) {
|
|
49
|
+
await connection.executeQuery(kysely.CompiledQuery.raw("rollback"));
|
|
50
|
+
}
|
|
51
|
+
async releaseConnection() {
|
|
52
|
+
this.#connectionMutex.unlock();
|
|
53
|
+
}
|
|
54
|
+
async destroy() {
|
|
55
|
+
this.#db?.close();
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
class BunSqliteConnection {
|
|
59
|
+
#db;
|
|
60
|
+
constructor(db) {
|
|
61
|
+
this.#db = db;
|
|
62
|
+
}
|
|
63
|
+
executeQuery(compiledQuery) {
|
|
64
|
+
const { sql: sql2, parameters } = compiledQuery;
|
|
65
|
+
const stmt = this.#db.prepare(sql2);
|
|
66
|
+
return Promise.resolve({
|
|
67
|
+
rows: stmt.all(parameters)
|
|
68
|
+
});
|
|
69
|
+
}
|
|
70
|
+
async *streamQuery() {
|
|
71
|
+
throw new Error("Streaming query is not supported by SQLite driver.");
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
class ConnectionMutex {
|
|
75
|
+
#promise;
|
|
76
|
+
#resolve;
|
|
77
|
+
async lock() {
|
|
78
|
+
while (this.#promise) {
|
|
79
|
+
await this.#promise;
|
|
80
|
+
}
|
|
81
|
+
this.#promise = new Promise((resolve) => {
|
|
82
|
+
this.#resolve = resolve;
|
|
83
|
+
});
|
|
84
|
+
}
|
|
85
|
+
unlock() {
|
|
86
|
+
const resolve = this.#resolve;
|
|
87
|
+
this.#promise = void 0;
|
|
88
|
+
this.#resolve = void 0;
|
|
89
|
+
resolve?.();
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
class BunSqliteIntrospector {
|
|
93
|
+
#db;
|
|
94
|
+
constructor(db) {
|
|
95
|
+
this.#db = db;
|
|
96
|
+
}
|
|
97
|
+
async getSchemas() {
|
|
98
|
+
return [];
|
|
99
|
+
}
|
|
100
|
+
async getTables(options = { withInternalKyselyTables: false }) {
|
|
101
|
+
let query = this.#db.selectFrom("sqlite_schema").where("type", "=", "table").where("name", "not like", "sqlite_%").select("name").$castTo();
|
|
102
|
+
if (!options.withInternalKyselyTables) {
|
|
103
|
+
query = query.where("name", "!=", kysely.DEFAULT_MIGRATION_TABLE).where("name", "!=", kysely.DEFAULT_MIGRATION_LOCK_TABLE);
|
|
104
|
+
}
|
|
105
|
+
const tables = await query.execute();
|
|
106
|
+
return Promise.all(tables.map(({ name }) => this.#getTableMetadata(name)));
|
|
107
|
+
}
|
|
108
|
+
async getMetadata(options) {
|
|
109
|
+
return {
|
|
110
|
+
tables: await this.getTables(options)
|
|
111
|
+
};
|
|
112
|
+
}
|
|
113
|
+
async #getTableMetadata(table) {
|
|
114
|
+
const db = this.#db;
|
|
115
|
+
const createSql = await db.selectFrom("sqlite_master").where("name", "=", table).select("sql").$castTo().execute();
|
|
116
|
+
const autoIncrementCol = createSql[0]?.sql?.split(/[\(\),]/)?.find((it) => it.toLowerCase().includes("autoincrement"))?.split(/\s+/)?.[0]?.replace(/["`]/g, "");
|
|
117
|
+
const columns = await db.selectFrom(
|
|
118
|
+
kysely.sql`pragma_table_info(${table})`.as("table_info")
|
|
119
|
+
).select(["name", "type", "notnull", "dflt_value"]).execute();
|
|
120
|
+
return {
|
|
121
|
+
name: table,
|
|
122
|
+
columns: columns.map((col) => ({
|
|
123
|
+
name: col.name,
|
|
124
|
+
dataType: col.type,
|
|
125
|
+
isNullable: !col.notnull,
|
|
126
|
+
isAutoIncrementing: col.name === autoIncrementCol,
|
|
127
|
+
hasDefaultValue: col.dflt_value != null
|
|
128
|
+
})),
|
|
129
|
+
isView: true
|
|
130
|
+
};
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
class BunSqliteQueryCompiler extends kysely.DefaultQueryCompiler {
|
|
134
|
+
getCurrentParameterPlaceholder() {
|
|
135
|
+
return "?";
|
|
136
|
+
}
|
|
137
|
+
getLeftIdentifierWrapper() {
|
|
138
|
+
return '"';
|
|
139
|
+
}
|
|
140
|
+
getRightIdentifierWrapper() {
|
|
141
|
+
return '"';
|
|
142
|
+
}
|
|
143
|
+
getAutoIncrement() {
|
|
144
|
+
return "autoincrement";
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
class BunSqliteDialect {
|
|
148
|
+
#config;
|
|
149
|
+
constructor(config) {
|
|
150
|
+
this.#config = { ...config };
|
|
151
|
+
}
|
|
152
|
+
createDriver() {
|
|
153
|
+
return new BunSqliteDriver(this.#config);
|
|
154
|
+
}
|
|
155
|
+
createQueryCompiler() {
|
|
156
|
+
return new BunSqliteQueryCompiler();
|
|
157
|
+
}
|
|
158
|
+
createAdapter() {
|
|
159
|
+
return new BunSqliteAdapter();
|
|
160
|
+
}
|
|
161
|
+
createIntrospector(db) {
|
|
162
|
+
return new BunSqliteIntrospector(db);
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
exports.BunSqliteAdapter = BunSqliteAdapter;
|
|
167
|
+
exports.BunSqliteDialect = BunSqliteDialect;
|
|
168
|
+
exports.BunSqliteDriver = BunSqliteDriver;
|
|
169
|
+
exports.BunSqliteIntrospector = BunSqliteIntrospector;
|
|
170
|
+
exports.BunSqliteQueryCompiler = BunSqliteQueryCompiler;
|