better-auth 0.2.4 → 0.2.5-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/node.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import * as http from 'http';
2
- import { d as Auth } from './index-DH-qiFLO.js';
2
+ import { e as Auth } from './index-CcdDoX76.js';
3
3
  import 'kysely';
4
4
  import './index-CE92ti2Z.js';
5
5
  import 'arctic';
package/dist/plugins.d.ts CHANGED
@@ -1,7 +1,7 @@
1
- export { O as OrganizationOptions, b as Passkey, P as PasskeyOptions, W as WebAuthnCookieType, g as getPasskeyActions, m as magicLink, o as organization, p as passkey, c as passkeyClient, t as twoFactor, a as twoFactorClient, u as username } from './index-DeH0CN6S.js';
1
+ export { O as OrganizationOptions, b as Passkey, P as PasskeyOptions, W as WebAuthnCookieType, g as getPasskeyActions, m as magicLink, o as organization, p as passkey, c as passkeyClient, t as twoFactor, a as twoFactorClient, u as username } from './index-D4lHPI1i.js';
2
2
  export { i as ac } from './index-D6NOkCRo.js';
3
- import { H as HookEndpointContext } from './index-DH-qiFLO.js';
4
- export { A as AuthEndpoint, b as AuthMiddleware, B as BetterAuthPlugin, P as PluginSchema, a as createAuthEndpoint, c as createAuthMiddleware, o as optionsMiddleware } from './index-DH-qiFLO.js';
3
+ import { H as HookEndpointContext } from './index-CcdDoX76.js';
4
+ export { b as AuthEndpoint, d as AuthMiddleware, B as BetterAuthPlugin, P as PluginSchema, a as createAuthEndpoint, c as createAuthMiddleware, o as optionsMiddleware } from './index-CcdDoX76.js';
5
5
  export { H as HIDE_METADATA } from './hide-metadata-DEHJp1rk.js';
6
6
  import './index-CE92ti2Z.js';
7
7
  import 'arctic';
package/dist/react.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import * as _better_fetch_fetch from '@better-fetch/fetch';
2
- import { B as BetterAuthPlugin, F as FieldAttribute, I as InferFieldOutput } from './index-DH-qiFLO.js';
2
+ import { B as BetterAuthPlugin, F as FieldAttribute, I as InferFieldOutput } from './index-CcdDoX76.js';
3
3
  import { U as UnionToIntersection, P as Prettify } from './helper-C1ihmerM.js';
4
4
  import { ClientOptions, InferClientAPI, InferActions, BetterAuthClientPlugin, IsSignal } from './types.js';
5
5
  import { useStore } from '@nanostores/react';
@@ -1,4 +1,4 @@
1
- import { d as Auth } from './index-DH-qiFLO.js';
1
+ import { e as Auth } from './index-CcdDoX76.js';
2
2
  import 'kysely';
3
3
  import './index-CE92ti2Z.js';
4
4
  import 'arctic';
package/dist/solid.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import * as _better_fetch_fetch from '@better-fetch/fetch';
2
- import { B as BetterAuthPlugin, F as FieldAttribute, I as InferFieldOutput } from './index-DH-qiFLO.js';
2
+ import { B as BetterAuthPlugin, F as FieldAttribute, I as InferFieldOutput } from './index-CcdDoX76.js';
3
3
  import { U as UnionToIntersection, P as Prettify } from './helper-C1ihmerM.js';
4
4
  import { ClientOptions, InferClientAPI, InferActions, BetterAuthClientPlugin, IsSignal } from './types.js';
5
5
  import { Accessor } from 'solid-js';
@@ -1,4 +1,4 @@
1
- import { d as Auth, e as BetterAuthOptions } from './index-DH-qiFLO.js';
1
+ import { e as Auth, f as BetterAuthOptions } from './index-CcdDoX76.js';
2
2
  import 'kysely';
3
3
  import './index-CE92ti2Z.js';
4
4
  import 'arctic';
package/dist/svelte.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import * as nanostores from 'nanostores';
2
2
  import * as _better_fetch_fetch from '@better-fetch/fetch';
3
- import { B as BetterAuthPlugin, F as FieldAttribute, I as InferFieldOutput } from './index-DH-qiFLO.js';
3
+ import { B as BetterAuthPlugin, F as FieldAttribute, I as InferFieldOutput } from './index-CcdDoX76.js';
4
4
  import { U as UnionToIntersection, P as Prettify } from './helper-C1ihmerM.js';
5
5
  import { ClientOptions, InferClientAPI, InferActions, BetterAuthClientPlugin, IsSignal } from './types.js';
6
6
  import 'kysely';
package/dist/types.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { B as BetterAuthPlugin, d as Auth, n as InferSession, q as InferUser } from './index-DH-qiFLO.js';
2
- export { f as Adapter, g as AuthContext, e as BetterAuthOptions, G as GenericEndpointContext, H as HookEndpointContext, r as InferPluginTypes, P as PluginSchema, R as RateLimit, S as SessionAdapter, W as Where, t as init } from './index-DH-qiFLO.js';
1
+ import { B as BetterAuthPlugin, e as Auth, n as InferSession, q as InferUser } from './index-CcdDoX76.js';
2
+ export { A as Adapter, g as AuthContext, f as BetterAuthOptions, G as GenericEndpointContext, H as HookEndpointContext, r as InferPluginTypes, P as PluginSchema, R as RateLimit, S as SessionAdapter, W as Where, t as init } from './index-CcdDoX76.js';
3
3
  import { U as UnionToIntersection, H as HasRequiredKeys, P as Prettify, L as LiteralString } from './helper-C1ihmerM.js';
4
4
  export { a as LiteralUnion, R as RequiredKeysOf, W as WithoutEmpty } from './helper-C1ihmerM.js';
5
5
  export { O as OAuthProvider, f as OAuthProviderList, P as ProviderOptions, S as Session, U as User } from './index-CE92ti2Z.js';
package/dist/utils.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { g as AuthContext, G as GenericEndpointContext } from './index-DH-qiFLO.js';
2
- export { j as BetterAuthCookies, i as createCookieGetter, l as createLogger, k as deleteSessionCookie, h as getCookies, m as logger, p as parseSetCookieHeader, s as setSessionCookie } from './index-DH-qiFLO.js';
1
+ import { g as AuthContext, G as GenericEndpointContext } from './index-CcdDoX76.js';
2
+ export { j as BetterAuthCookies, i as createCookieGetter, l as createLogger, k as deleteSessionCookie, h as getCookies, m as logger, p as parseSetCookieHeader, s as setSessionCookie } from './index-CcdDoX76.js';
3
3
  export { H as HIDE_METADATA } from './hide-metadata-DEHJp1rk.js';
4
4
  import { z } from 'zod';
5
5
  import 'kysely';
package/dist/vue.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import * as _better_fetch_fetch from '@better-fetch/fetch';
2
- import { B as BetterAuthPlugin, F as FieldAttribute, I as InferFieldOutput } from './index-DH-qiFLO.js';
2
+ import { B as BetterAuthPlugin, F as FieldAttribute, I as InferFieldOutput } from './index-CcdDoX76.js';
3
3
  import { U as UnionToIntersection, P as Prettify } from './helper-C1ihmerM.js';
4
4
  import { ClientOptions, InferClientAPI, InferActions, BetterAuthClientPlugin, IsSignal } from './types.js';
5
5
  import { Ref, DeepReadonly } from 'vue';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "better-auth",
3
- "version": "0.2.4",
3
+ "version": "0.2.5-beta.2",
4
4
  "description": "The most comprehensive authentication library for TypeScript.",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -37,7 +37,9 @@
37
37
  "./next-js": "./dist/next-js.js",
38
38
  "./package.json": "./package.json",
39
39
  "./node": "./dist/node.js",
40
- "./adapters": "./dist/adapters.js",
40
+ "./adapters/prisma": "./dist/adapters/prisma.js",
41
+ "./adapters/drizzle": "./dist/adapters/drizzle.js",
42
+ "./adapters/mongodb": "./dist/adapters/mongodb.js",
41
43
  "./utils": "./dist/utils.js"
42
44
  },
43
45
  "devDependencies": {
@@ -1,63 +0,0 @@
1
- import { f as Adapter, W as Where, F as FieldAttribute } from './index-DH-qiFLO.js';
2
- import { Kysely } from 'kysely';
3
- import './index-CE92ti2Z.js';
4
- import 'arctic';
5
- import 'zod';
6
- import './helper-C1ihmerM.js';
7
- import 'better-call';
8
-
9
- declare const prismaAdapter: (prisma: any, { provider, }: {
10
- provider: "sqlite" | "cockroachdb" | "mysql" | "postgresql" | "sqlserver";
11
- }) => Adapter;
12
-
13
- interface DrizzleAdapterOptions {
14
- schema?: Record<string, any>;
15
- provider: "pg" | "mysql" | "sqlite";
16
- }
17
- interface DB {
18
- [key: string]: any;
19
- }
20
- declare const drizzleAdapter: (db: DB, options: DrizzleAdapterOptions) => Adapter;
21
-
22
- declare const mongodbAdapter: (mongo: any) => {
23
- id: string;
24
- create<T, R = T>(data: {
25
- model: string;
26
- data: T;
27
- select?: string[];
28
- }): Promise<any>;
29
- findOne<T>(data: {
30
- model: string;
31
- where: Where[];
32
- select?: string[];
33
- }): Promise<any>;
34
- findMany<T>(data: {
35
- model: string;
36
- where?: Where[];
37
- }): Promise<any>;
38
- update<T>(data: {
39
- model: string;
40
- where: Where[];
41
- update: Record<string, any>;
42
- }): Promise<any>;
43
- delete<T>(data: {
44
- model: string;
45
- where: Where[];
46
- }): Promise<any>;
47
- };
48
-
49
- interface KyselyAdapterConfig {
50
- /**
51
- * Transform dates and booleans for sqlite.
52
- */
53
- transform?: {
54
- schema: {
55
- [table: string]: Record<string, FieldAttribute>;
56
- };
57
- boolean: boolean;
58
- date: boolean;
59
- };
60
- }
61
- declare const kyselyAdapter: (db: Kysely<any>, config?: KyselyAdapterConfig) => Adapter;
62
-
63
- export { type DrizzleAdapterOptions, type KyselyAdapterConfig, drizzleAdapter, kyselyAdapter, mongodbAdapter, prismaAdapter };