@better-auth/core 1.4.0-beta.21 → 1.4.0-beta.22

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.
Files changed (38) hide show
  1. package/.turbo/turbo-build.log +14 -14
  2. package/dist/api/index.d.mts +2 -2
  3. package/dist/api/index.mjs +2 -2
  4. package/dist/async_hooks/index.d.mts +1 -1
  5. package/dist/async_hooks/index.mjs +1 -1
  6. package/dist/context/index.d.mts +3 -3
  7. package/dist/context/index.mjs +2 -2
  8. package/dist/{context-Buud88Dd.mjs → context-DgQ9XGBl.mjs} +1 -1
  9. package/dist/db/adapter/index.d.mts +2 -2
  10. package/dist/db/index.d.mts +2 -2
  11. package/dist/env/index.d.mts +1 -1
  12. package/dist/env/index.mjs +1 -1
  13. package/dist/error/index.mjs +2 -2
  14. package/dist/{error-D6EqgOXr.mjs → error-BhAKg8LX.mjs} +1 -1
  15. package/dist/{index-DX7czw7K.d.mts → index-Duq4j0SF.d.mts} +4 -9
  16. package/dist/index.d.mts +2 -2
  17. package/dist/oauth2/index.d.mts +2 -2
  18. package/dist/oauth2/index.mjs +1 -1
  19. package/dist/social-providers/index.d.mts +2 -2
  20. package/dist/social-providers/index.mjs +5 -5
  21. package/dist/utils/index.mjs +1 -1
  22. package/package.json +1 -1
  23. package/src/api/index.ts +2 -6
  24. package/src/context/endpoint-context.ts +2 -1
  25. package/src/context/request-state.test.ts +1 -1
  26. package/src/context/request-state.ts +2 -1
  27. package/src/context/transaction.ts +2 -1
  28. package/src/env/logger.test.ts +2 -1
  29. package/src/social-providers/vk.ts +1 -2
  30. package/src/types/context.ts +1 -1
  31. package/src/types/init-options.ts +1 -8
  32. package/vitest.config.ts +3 -0
  33. /package/dist/{async_hooks-BQqSywfV.mjs → async_hooks-BfRfbd1J.mjs} +0 -0
  34. /package/dist/{env-YhoEXwYv.mjs → env-DwlNAN_D.mjs} +0 -0
  35. /package/dist/{index-JSfspfWW.d.mts → index-CdubV7uy.d.mts} +0 -0
  36. /package/dist/{index-CRg-E-VF.d.mts → index-DgwIISs7.d.mts} +0 -0
  37. /package/dist/{oauth2-D4PPavcA.mjs → oauth2-D3aE32ZH.mjs} +0 -0
  38. /package/dist/{utils-BFQCAfNW.mjs → utils-C5EN75oV.mjs} +0 -0
@@ -1,10 +1,10 @@
1
1
 
2
- > @better-auth/core@1.4.0-beta.21 build /home/runner/work/better-auth/better-auth/packages/core
2
+ > @better-auth/core@1.4.0-beta.22 build /home/runner/work/better-auth/better-auth/packages/core
3
3
  > tsdown
4
4
 
5
- ℹ tsdown v0.16.0 powered by rolldown v1.0.0-beta.46
5
+ ℹ tsdown v0.16.5 powered by rolldown v1.0.0-beta.50
6
6
  ℹ Using tsdown config: /home/runner/work/better-auth/better-auth/packages/core/tsdown.config.ts
7
- ℹ entry: src/index.ts, src/api/index.ts, src/async_hooks/index.ts, src/context/index.ts, src/db/index.ts, src/env/index.ts, src/error/index.ts, src/oauth2/index.ts, src/social-providers/index.ts, src/utils/index.ts, src/db/adapter/index.ts
7
+ ℹ entry: src/index.ts, src/db/index.ts, src/db/adapter/index.ts, src/async_hooks/index.ts, src/context/index.ts, src/env/index.ts, src/oauth2/index.ts, src/api/index.ts, src/social-providers/index.ts, src/utils/index.ts, src/error/index.ts
8
8
  ℹ tsconfig: tsconfig.json
9
9
  ℹ Build start
10
10
  ℹ dist/social-providers/index.mjs  77.94 kB │ gzip: 10.14 kB
@@ -18,12 +18,12 @@
18
18
  ℹ dist/utils/index.mjs  0.09 kB │ gzip: 0.09 kB
19
19
  ℹ dist/db/adapter/index.mjs  0.01 kB │ gzip: 0.03 kB
20
20
  ℹ dist/index.mjs  0.01 kB │ gzip: 0.03 kB
21
- ℹ dist/oauth2-D4PPavcA.mjs  9.16 kB │ gzip: 2.12 kB
22
- ℹ dist/env-YhoEXwYv.mjs  7.67 kB │ gzip: 2.54 kB
23
- ℹ dist/context-Buud88Dd.mjs  3.89 kB │ gzip: 1.00 kB
24
- ℹ dist/error-D6EqgOXr.mjs  1.77 kB │ gzip: 0.79 kB
25
- ℹ dist/async_hooks-BQqSywfV.mjs  0.87 kB │ gzip: 0.46 kB
26
- ℹ dist/utils-BFQCAfNW.mjs  0.13 kB │ gzip: 0.12 kB
21
+ ℹ dist/oauth2-D3aE32ZH.mjs  9.16 kB │ gzip: 2.12 kB
22
+ ℹ dist/env-DwlNAN_D.mjs  7.67 kB │ gzip: 2.54 kB
23
+ ℹ dist/context-DgQ9XGBl.mjs  3.89 kB │ gzip: 1.00 kB
24
+ ℹ dist/error-BhAKg8LX.mjs  1.77 kB │ gzip: 0.79 kB
25
+ ℹ dist/async_hooks-BfRfbd1J.mjs  0.87 kB │ gzip: 0.46 kB
26
+ ℹ dist/utils-C5EN75oV.mjs  0.13 kB │ gzip: 0.12 kB
27
27
  ℹ dist/social-providers/index.d.mts  3.78 kB │ gzip: 1.17 kB
28
28
  ℹ dist/context/index.d.mts  3.05 kB │ gzip: 0.96 kB
29
29
  ℹ dist/error/index.d.mts  1.84 kB │ gzip: 0.72 kB
@@ -35,8 +35,8 @@
35
35
  ℹ dist/db/adapter/index.d.mts  0.53 kB │ gzip: 0.25 kB
36
36
  ℹ dist/api/index.d.mts  0.29 kB │ gzip: 0.16 kB
37
37
  ℹ dist/async_hooks/index.d.mts  0.14 kB │ gzip: 0.10 kB
38
- ℹ dist/index-DX7czw7K.d.mts 203.84 kB │ gzip: 32.11 kB
39
- ℹ dist/index-JSfspfWW.d.mts  3.31 kB │ gzip: 1.11 kB
40
- ℹ dist/index-CRg-E-VF.d.mts  0.24 kB │ gzip: 0.16 kB
41
- ℹ 31 files, total: 327.10 kB
42
- ✔ Build complete in 4246ms
38
+ ℹ dist/index-Duq4j0SF.d.mts 203.73 kB │ gzip: 32.09 kB
39
+ ℹ dist/index-CdubV7uy.d.mts  3.31 kB │ gzip: 1.11 kB
40
+ ℹ dist/index-DgwIISs7.d.mts  0.24 kB │ gzip: 0.16 kB
41
+ ℹ 31 files, total: 326.99 kB
42
+ ✔ Build complete in 4755ms
@@ -1,3 +1,3 @@
1
- import { a as optionsMiddleware, i as createAuthMiddleware, n as AuthMiddleware, r as createAuthEndpoint, t as AuthEndpoint } from "../index-DX7czw7K.mjs";
2
- import "../index-JSfspfWW.mjs";
1
+ import { a as optionsMiddleware, i as createAuthMiddleware, n as AuthMiddleware, r as createAuthEndpoint, t as AuthEndpoint } from "../index-Duq4j0SF.mjs";
2
+ import "../index-CdubV7uy.mjs";
3
3
  export { AuthEndpoint, AuthMiddleware, createAuthEndpoint, createAuthMiddleware, optionsMiddleware };
@@ -1,5 +1,5 @@
1
- import "../async_hooks-BQqSywfV.mjs";
2
- import { f as runWithEndpointContext } from "../context-Buud88Dd.mjs";
1
+ import "../async_hooks-BfRfbd1J.mjs";
2
+ import { f as runWithEndpointContext } from "../context-DgQ9XGBl.mjs";
3
3
  import { createEndpoint, createMiddleware } from "better-call";
4
4
 
5
5
  //#region src/api/index.ts
@@ -1,2 +1,2 @@
1
- import { n as getAsyncLocalStorage, t as AsyncLocalStorage } from "../index-CRg-E-VF.mjs";
1
+ import { n as getAsyncLocalStorage, t as AsyncLocalStorage } from "../index-DgwIISs7.mjs";
2
2
  export { AsyncLocalStorage, getAsyncLocalStorage };
@@ -1,3 +1,3 @@
1
- import { t as getAsyncLocalStorage } from "../async_hooks-BQqSywfV.mjs";
1
+ import { t as getAsyncLocalStorage } from "../async_hooks-BfRfbd1J.mjs";
2
2
 
3
3
  export { getAsyncLocalStorage };
@@ -1,6 +1,6 @@
1
- import { Jn as DBTransactionAdapter, Un as DBAdapter, d as AuthContext } from "../index-DX7czw7K.mjs";
2
- import "../index-JSfspfWW.mjs";
3
- import { t as AsyncLocalStorage } from "../index-CRg-E-VF.mjs";
1
+ import { Jn as DBTransactionAdapter, Un as DBAdapter, d as AuthContext } from "../index-Duq4j0SF.mjs";
2
+ import "../index-CdubV7uy.mjs";
3
+ import { t as AsyncLocalStorage } from "../index-DgwIISs7.mjs";
4
4
  import { EndpointContext, InputContext } from "better-call";
5
5
 
6
6
  //#region src/context/endpoint-context.d.ts
@@ -1,4 +1,4 @@
1
- import "../async_hooks-BQqSywfV.mjs";
2
- import { a as defineRequestState, c as hasRequestState, d as getCurrentAuthContextAsyncLocalStorage, f as runWithEndpointContext, i as runWithTransaction, l as runWithRequestState, n as getCurrentDBAdapterAsyncLocalStorage, o as getCurrentRequestState, r as runWithAdapter, s as getRequestStateAsyncLocalStorage, t as getCurrentAdapter, u as getCurrentAuthContext } from "../context-Buud88Dd.mjs";
1
+ import "../async_hooks-BfRfbd1J.mjs";
2
+ import { a as defineRequestState, c as hasRequestState, d as getCurrentAuthContextAsyncLocalStorage, f as runWithEndpointContext, i as runWithTransaction, l as runWithRequestState, n as getCurrentDBAdapterAsyncLocalStorage, o as getCurrentRequestState, r as runWithAdapter, s as getRequestStateAsyncLocalStorage, t as getCurrentAdapter, u as getCurrentAuthContext } from "../context-DgQ9XGBl.mjs";
3
3
 
4
4
  export { defineRequestState, getCurrentAdapter, getCurrentAuthContext, getCurrentAuthContextAsyncLocalStorage, getCurrentDBAdapterAsyncLocalStorage, getCurrentRequestState, getRequestStateAsyncLocalStorage, hasRequestState, runWithAdapter, runWithEndpointContext, runWithRequestState, runWithTransaction };
@@ -1,4 +1,4 @@
1
- import { t as getAsyncLocalStorage } from "./async_hooks-BQqSywfV.mjs";
1
+ import { t as getAsyncLocalStorage } from "./async_hooks-BfRfbd1J.mjs";
2
2
 
3
3
  //#region src/context/endpoint-context.ts
4
4
  let currentContextAsyncStorage = null;
@@ -1,3 +1,3 @@
1
- import { Gn as DBAdapterFactoryConfig, Hn as CustomAdapter, Jn as DBTransactionAdapter, Kn as DBAdapterInstance, Un as DBAdapter, Vn as CleanedWhere, Wn as DBAdapterDebugLogOption, Xn as JoinOption, Yn as JoinConfig, Zn as Where, qn as DBAdapterSchemaCreation } from "../../index-DX7czw7K.mjs";
2
- import "../../index-JSfspfWW.mjs";
1
+ import { Gn as DBAdapterFactoryConfig, Hn as CustomAdapter, Jn as DBTransactionAdapter, Kn as DBAdapterInstance, Un as DBAdapter, Vn as CleanedWhere, Wn as DBAdapterDebugLogOption, Xn as JoinOption, Yn as JoinConfig, Zn as Where, qn as DBAdapterSchemaCreation } from "../../index-Duq4j0SF.mjs";
2
+ import "../../index-CdubV7uy.mjs";
3
3
  export { CleanedWhere, CustomAdapter, DBAdapter, DBAdapterDebugLogOption, DBAdapterFactoryConfig, DBAdapterInstance, DBAdapterSchemaCreation, DBTransactionAdapter, JoinConfig, JoinOption, Where };
@@ -1,3 +1,3 @@
1
- import { $n as BetterAuthDbSchema, Qn as AuthPluginSchema, Sr as SecondaryStorage, _r as DBFieldAttribute, ar as verificationSchema, br as DBPreservedModels, cr as coreSchema, dr as RateLimit, er as FieldAttribute, fr as rateLimitSchema, gr as BetterAuthDBSchema, hr as BetterAuthPluginDBSchema, ir as Verification, lr as Session, mr as accountSchema, nr as FieldType, or as User, pr as Account, rr as Primitive, sr as userSchema, tr as FieldAttributeConfig, ur as sessionSchema, vr as DBFieldAttributeConfig, xr as DBPrimitive, yr as DBFieldType } from "../index-DX7czw7K.mjs";
2
- import "../index-JSfspfWW.mjs";
1
+ import { $n as BetterAuthDbSchema, Qn as AuthPluginSchema, Sr as SecondaryStorage, _r as DBFieldAttribute, ar as verificationSchema, br as DBPreservedModels, cr as coreSchema, dr as RateLimit, er as FieldAttribute, fr as rateLimitSchema, gr as BetterAuthDBSchema, hr as BetterAuthPluginDBSchema, ir as Verification, lr as Session, mr as accountSchema, nr as FieldType, or as User, pr as Account, rr as Primitive, sr as userSchema, tr as FieldAttributeConfig, ur as sessionSchema, vr as DBFieldAttributeConfig, xr as DBPrimitive, yr as DBFieldType } from "../index-Duq4j0SF.mjs";
2
+ import "../index-CdubV7uy.mjs";
3
3
  export { Account, AuthPluginSchema, BetterAuthDBSchema, BetterAuthDbSchema, BetterAuthPluginDBSchema, DBFieldAttribute, DBFieldAttributeConfig, DBFieldType, DBPreservedModels, DBPrimitive, FieldAttribute, FieldAttributeConfig, FieldType, Primitive, RateLimit, SecondaryStorage, Session, User, Verification, accountSchema, coreSchema, rateLimitSchema, sessionSchema, userSchema, verificationSchema };
@@ -1,2 +1,2 @@
1
- import { _ as isTest, a as TTY_COLORS, c as logger, d as EnvObject, f as env, g as isProduction, h as isDevelopment, i as Logger, l as shouldPublishLog, m as getEnvVar, n as LogHandlerParams, o as createLogger, p as getBooleanEnvVar, r as LogLevel, s as levels, t as InternalLogger, u as ENV, v as nodeENV, y as getColorDepth } from "../index-JSfspfWW.mjs";
1
+ import { _ as isTest, a as TTY_COLORS, c as logger, d as EnvObject, f as env, g as isProduction, h as isDevelopment, i as Logger, l as shouldPublishLog, m as getEnvVar, n as LogHandlerParams, o as createLogger, p as getBooleanEnvVar, r as LogLevel, s as levels, t as InternalLogger, u as ENV, v as nodeENV, y as getColorDepth } from "../index-CdubV7uy.mjs";
2
2
  export { ENV, EnvObject, InternalLogger, LogHandlerParams, LogLevel, Logger, TTY_COLORS, createLogger, env, getBooleanEnvVar, getColorDepth, getEnvVar, isDevelopment, isProduction, isTest, levels, logger, nodeENV, shouldPublishLog };
@@ -1,3 +1,3 @@
1
- import { a as shouldPublishLog, c as env, d as isDevelopment, f as isProduction, i as logger, l as getBooleanEnvVar, m as nodeENV, n as createLogger, o as getColorDepth, p as isTest, r as levels, s as ENV, t as TTY_COLORS, u as getEnvVar } from "../env-YhoEXwYv.mjs";
1
+ import { a as shouldPublishLog, c as env, d as isDevelopment, f as isProduction, i as logger, l as getBooleanEnvVar, m as nodeENV, n as createLogger, o as getColorDepth, p as isTest, r as levels, s as ENV, t as TTY_COLORS, u as getEnvVar } from "../env-DwlNAN_D.mjs";
2
2
 
3
3
  export { ENV, TTY_COLORS, createLogger, env, getBooleanEnvVar, getColorDepth, getEnvVar, isDevelopment, isProduction, isTest, levels, logger, nodeENV, shouldPublishLog };
@@ -1,4 +1,4 @@
1
- import "../utils-BFQCAfNW.mjs";
2
- import { n as BASE_ERROR_CODES, t as BetterAuthError } from "../error-D6EqgOXr.mjs";
1
+ import "../utils-C5EN75oV.mjs";
2
+ import { n as BASE_ERROR_CODES, t as BetterAuthError } from "../error-BhAKg8LX.mjs";
3
3
 
4
4
  export { BASE_ERROR_CODES, BetterAuthError };
@@ -1,4 +1,4 @@
1
- import { t as defineErrorCodes } from "./utils-BFQCAfNW.mjs";
1
+ import { t as defineErrorCodes } from "./utils-C5EN75oV.mjs";
2
2
 
3
3
  //#region src/error/codes.ts
4
4
  const BASE_ERROR_CODES = defineErrorCodes({
@@ -1,9 +1,9 @@
1
- import { i as Logger, o as createLogger } from "./index-JSfspfWW.mjs";
2
- import * as better_call0 from "better-call";
3
- import { CookieOptions, Endpoint, EndpointContext, EndpointOptions, InputContext, Middleware } from "better-call";
1
+ import { i as Logger, o as createLogger } from "./index-CdubV7uy.mjs";
4
2
  import * as z from "zod";
5
3
  import { BetterFetch, BetterFetchOption, BetterFetchPlugin } from "@better-fetch/fetch";
6
4
  import * as jose0 from "jose";
5
+ import * as better_call0 from "better-call";
6
+ import { CookieOptions, Endpoint, EndpointContext, EndpointOptions, InputContext, Middleware } from "better-call";
7
7
  import { StandardSchemaV1, StandardSchemaV1 as StandardSchemaV1$1 } from "@standard-schema/spec";
8
8
  import { Database } from "bun:sqlite";
9
9
  import { DatabaseSync } from "node:sqlite";
@@ -6715,12 +6715,7 @@ type BetterAuthOptions = {
6715
6715
  /**
6716
6716
  * Advanced options
6717
6717
  */
6718
- advanced?: (BetterAuthAdvancedOptions & {
6719
- /**
6720
- * @deprecated Please use `database.generateId` instead.
6721
- */
6722
- generateId?: never;
6723
- }) | undefined;
6718
+ advanced?: BetterAuthAdvancedOptions | undefined;
6724
6719
  logger?: Logger | undefined;
6725
6720
  /**
6726
6721
  * allows you to define custom hooks that can be
package/dist/index.d.mts CHANGED
@@ -1,3 +1,3 @@
1
- import { En as BetterAuthCookies, Tn as LiteralUnion, _ as GenerateIdFn, c as BetterAuthClientPlugin, d as AuthContext, f as GenericEndpointContext, g as BetterAuthRateLimitOptions, h as BetterAuthOptions, l as ClientAtomListener, m as BetterAuthAdvancedOptions, o as StandardSchemaV1, p as InternalAdapter, s as BetterAuthClientOptions, u as ClientStore, v as BetterAuthPlugin, wn as LiteralString, y as HookEndpointContext } from "./index-DX7czw7K.mjs";
2
- import "./index-JSfspfWW.mjs";
1
+ import { En as BetterAuthCookies, Tn as LiteralUnion, _ as GenerateIdFn, c as BetterAuthClientPlugin, d as AuthContext, f as GenericEndpointContext, g as BetterAuthRateLimitOptions, h as BetterAuthOptions, l as ClientAtomListener, m as BetterAuthAdvancedOptions, o as StandardSchemaV1, p as InternalAdapter, s as BetterAuthClientOptions, u as ClientStore, v as BetterAuthPlugin, wn as LiteralString, y as HookEndpointContext } from "./index-Duq4j0SF.mjs";
2
+ import "./index-CdubV7uy.mjs";
3
3
  export { AuthContext, BetterAuthAdvancedOptions, BetterAuthClientOptions, BetterAuthClientPlugin, BetterAuthCookies, BetterAuthOptions, BetterAuthPlugin, BetterAuthRateLimitOptions, ClientAtomListener, ClientStore, GenerateIdFn, GenericEndpointContext, HookEndpointContext, InternalAdapter, LiteralString, LiteralUnion, StandardSchemaV1 };
@@ -1,3 +1,3 @@
1
- import { An as generateCodeChallenge, Bn as ProviderOptions, Dn as createAuthorizationCodeRequest, Fn as clientCredentialsToken, In as createClientCredentialsTokenRequest, Ln as OAuth2Tokens, Mn as createRefreshAccessTokenRequest, Nn as refreshAccessToken, On as validateAuthorizationCode, Pn as createAuthorizationURL, Rn as OAuth2UserInfo, jn as getOAuth2Tokens, kn as validateToken, zn as OAuthProvider } from "../index-DX7czw7K.mjs";
2
- import "../index-JSfspfWW.mjs";
1
+ import { An as generateCodeChallenge, Bn as ProviderOptions, Dn as createAuthorizationCodeRequest, Fn as clientCredentialsToken, In as createClientCredentialsTokenRequest, Ln as OAuth2Tokens, Mn as createRefreshAccessTokenRequest, Nn as refreshAccessToken, On as validateAuthorizationCode, Pn as createAuthorizationURL, Rn as OAuth2UserInfo, jn as getOAuth2Tokens, kn as validateToken, zn as OAuthProvider } from "../index-Duq4j0SF.mjs";
2
+ import "../index-CdubV7uy.mjs";
3
3
  export { OAuth2Tokens, OAuth2UserInfo, OAuthProvider, ProviderOptions, clientCredentialsToken, createAuthorizationCodeRequest, createAuthorizationURL, createClientCredentialsTokenRequest, createRefreshAccessTokenRequest, generateCodeChallenge, getOAuth2Tokens, refreshAccessToken, validateAuthorizationCode, validateToken };
@@ -1,3 +1,3 @@
1
- import { a as refreshAccessToken, c as getOAuth2Tokens, i as createRefreshAccessTokenRequest, l as clientCredentialsToken, n as validateAuthorizationCode, o as createAuthorizationURL, r as validateToken, s as generateCodeChallenge, t as createAuthorizationCodeRequest, u as createClientCredentialsTokenRequest } from "../oauth2-D4PPavcA.mjs";
1
+ import { a as refreshAccessToken, c as getOAuth2Tokens, i as createRefreshAccessTokenRequest, l as clientCredentialsToken, n as validateAuthorizationCode, o as createAuthorizationURL, r as validateToken, s as generateCodeChallenge, t as createAuthorizationCodeRequest, u as createClientCredentialsTokenRequest } from "../oauth2-D3aE32ZH.mjs";
2
2
 
3
3
  export { clientCredentialsToken, createAuthorizationCodeRequest, createAuthorizationURL, createClientCredentialsTokenRequest, createRefreshAccessTokenRequest, generateCodeChallenge, getOAuth2Tokens, refreshAccessToken, validateAuthorizationCode, validateToken };
@@ -1,3 +1,3 @@
1
- import { $ as ZoomOptions, $t as microsoft, A as PayPalProfile, At as DropboxOptions, B as NaverOptions, Bt as SpotifyProfile, C as SocialProviders, Cn as getApplePublicKey, Ct as LinearOptions, D as PolarProfile, Dt as KickOptions, E as PolarOptions, Et as linear, F as paybin, Ft as twitter, G as kakao, Gt as HuggingFaceOptions, H as naver, Ht as SlackOptions, I as LineIdTokenPayload, It as TwitchOptions, J as notion, Jt as GoogleOptions, K as NotionOptions, Kt as HuggingFaceProfile, L as LineOptions, Lt as TwitchProfile, M as paypal, Mt as dropbox, N as PaybinOptions, Nt as TwitterOption, O as polar, Ot as KickProfile, P as PaybinProfile, Pt as TwitterProfile, Q as PronounOption, Qt as MicrosoftOptions, R as LineUserInfo, Rt as twitch, S as SocialProviderListEnum, Sn as apple, St as linkedin, T as socialProviders, Tt as LinearUser, U as KakaoOptions, Ut as SlackProfile, V as NaverProfile, Vt as spotify, W as KakaoProfile, Wt as slack, X as LoginType, Xt as google, Y as AccountStatus, Yt as GoogleProfile, Z as PhoneNumber, Zt as MicrosoftEntraIDProfile, _n as AtlassianProfile, _t as GitlabOptions, an as figma, at as SalesforceOptions, b as SocialProvider, bn as AppleOptions, bt as LinkedInOptions, cn as facebook, ct as RobloxOptions, dn as discord, dt as RedditOptions, en as GithubOptions, et as ZoomProfile, fn as CognitoOptions, ft as RedditProfile, gn as AtlassianOptions, gt as tiktok, hn as getCognitoPublicKey, ht as TiktokProfile, in as FigmaProfile, it as vk, j as PayPalTokenResponse, jt as DropboxProfile, k as PayPalOptions, kt as kick, ln as DiscordOptions, lt as RobloxProfile, mn as cognito, mt as TiktokOptions, nn as github, nt as VkOption, on as FacebookOptions, ot as SalesforceProfile, pn as CognitoProfile, pt as reddit, q as NotionProfile, qt as huggingface, rn as FigmaOptions, rt as VkProfile, sn as FacebookProfile, st as salesforce, tn as GithubProfile, tt as zoom, un as DiscordProfile, ut as roblox, vn as atlassian, vt as GitlabProfile, w as socialProviderList, wt as LinearProfile, x as SocialProviderList, xn as AppleProfile, xt as LinkedInProfile, yn as AppleNonConformUser, yt as gitlab, z as line, zt as SpotifyOptions } from "../index-DX7czw7K.mjs";
2
- import "../index-JSfspfWW.mjs";
1
+ import { $ as ZoomOptions, $t as microsoft, A as PayPalProfile, At as DropboxOptions, B as NaverOptions, Bt as SpotifyProfile, C as SocialProviders, Cn as getApplePublicKey, Ct as LinearOptions, D as PolarProfile, Dt as KickOptions, E as PolarOptions, Et as linear, F as paybin, Ft as twitter, G as kakao, Gt as HuggingFaceOptions, H as naver, Ht as SlackOptions, I as LineIdTokenPayload, It as TwitchOptions, J as notion, Jt as GoogleOptions, K as NotionOptions, Kt as HuggingFaceProfile, L as LineOptions, Lt as TwitchProfile, M as paypal, Mt as dropbox, N as PaybinOptions, Nt as TwitterOption, O as polar, Ot as KickProfile, P as PaybinProfile, Pt as TwitterProfile, Q as PronounOption, Qt as MicrosoftOptions, R as LineUserInfo, Rt as twitch, S as SocialProviderListEnum, Sn as apple, St as linkedin, T as socialProviders, Tt as LinearUser, U as KakaoOptions, Ut as SlackProfile, V as NaverProfile, Vt as spotify, W as KakaoProfile, Wt as slack, X as LoginType, Xt as google, Y as AccountStatus, Yt as GoogleProfile, Z as PhoneNumber, Zt as MicrosoftEntraIDProfile, _n as AtlassianProfile, _t as GitlabOptions, an as figma, at as SalesforceOptions, b as SocialProvider, bn as AppleOptions, bt as LinkedInOptions, cn as facebook, ct as RobloxOptions, dn as discord, dt as RedditOptions, en as GithubOptions, et as ZoomProfile, fn as CognitoOptions, ft as RedditProfile, gn as AtlassianOptions, gt as tiktok, hn as getCognitoPublicKey, ht as TiktokProfile, in as FigmaProfile, it as vk, j as PayPalTokenResponse, jt as DropboxProfile, k as PayPalOptions, kt as kick, ln as DiscordOptions, lt as RobloxProfile, mn as cognito, mt as TiktokOptions, nn as github, nt as VkOption, on as FacebookOptions, ot as SalesforceProfile, pn as CognitoProfile, pt as reddit, q as NotionProfile, qt as huggingface, rn as FigmaOptions, rt as VkProfile, sn as FacebookProfile, st as salesforce, tn as GithubProfile, tt as zoom, un as DiscordProfile, ut as roblox, vn as atlassian, vt as GitlabProfile, w as socialProviderList, wt as LinearProfile, x as SocialProviderList, xn as AppleProfile, xt as LinkedInProfile, yn as AppleNonConformUser, yt as gitlab, z as line, zt as SpotifyOptions } from "../index-Duq4j0SF.mjs";
2
+ import "../index-CdubV7uy.mjs";
3
3
  export { AccountStatus, AppleNonConformUser, AppleOptions, AppleProfile, AtlassianOptions, AtlassianProfile, CognitoOptions, CognitoProfile, DiscordOptions, DiscordProfile, DropboxOptions, DropboxProfile, FacebookOptions, FacebookProfile, FigmaOptions, FigmaProfile, GithubOptions, GithubProfile, GitlabOptions, GitlabProfile, GoogleOptions, GoogleProfile, HuggingFaceOptions, HuggingFaceProfile, KakaoOptions, KakaoProfile, KickOptions, KickProfile, LineIdTokenPayload, LineOptions, LineUserInfo, LinearOptions, LinearProfile, LinearUser, LinkedInOptions, LinkedInProfile, LoginType, MicrosoftEntraIDProfile, MicrosoftOptions, NaverOptions, NaverProfile, NotionOptions, NotionProfile, PayPalOptions, PayPalProfile, PayPalTokenResponse, PaybinOptions, PaybinProfile, PhoneNumber, PolarOptions, PolarProfile, PronounOption, RedditOptions, RedditProfile, RobloxOptions, RobloxProfile, SalesforceOptions, SalesforceProfile, SlackOptions, SlackProfile, SocialProvider, SocialProviderList, SocialProviderListEnum, SocialProviders, SpotifyOptions, SpotifyProfile, TiktokOptions, TiktokProfile, TwitchOptions, TwitchProfile, TwitterOption, TwitterProfile, VkOption, VkProfile, ZoomOptions, ZoomProfile, apple, atlassian, cognito, discord, dropbox, facebook, figma, getApplePublicKey, getCognitoPublicKey, github, gitlab, google, huggingface, kakao, kick, line, linear, linkedin, microsoft, naver, notion, paybin, paypal, polar, reddit, roblox, salesforce, slack, socialProviderList, socialProviders, spotify, tiktok, twitch, twitter, vk, zoom };
@@ -1,12 +1,12 @@
1
- import { i as logger } from "../env-YhoEXwYv.mjs";
2
- import "../utils-BFQCAfNW.mjs";
3
- import { t as BetterAuthError } from "../error-D6EqgOXr.mjs";
4
- import { a as refreshAccessToken, c as getOAuth2Tokens, n as validateAuthorizationCode, o as createAuthorizationURL, s as generateCodeChallenge } from "../oauth2-D4PPavcA.mjs";
5
- import { APIError } from "better-call";
1
+ import { i as logger } from "../env-DwlNAN_D.mjs";
2
+ import { a as refreshAccessToken, c as getOAuth2Tokens, n as validateAuthorizationCode, o as createAuthorizationURL, s as generateCodeChallenge } from "../oauth2-D3aE32ZH.mjs";
3
+ import "../utils-C5EN75oV.mjs";
4
+ import { t as BetterAuthError } from "../error-BhAKg8LX.mjs";
6
5
  import * as z from "zod";
7
6
  import { base64 } from "@better-auth/utils/base64";
8
7
  import { betterFetch } from "@better-fetch/fetch";
9
8
  import { createRemoteJWKSet, decodeJwt, decodeProtectedHeader, importJWK, jwtVerify } from "jose";
9
+ import { APIError } from "better-call";
10
10
 
11
11
  //#region src/social-providers/apple.ts
12
12
  const apple = (options) => {
@@ -1,3 +1,3 @@
1
- import { t as defineErrorCodes } from "../utils-BFQCAfNW.mjs";
1
+ import { t as defineErrorCodes } from "../utils-C5EN75oV.mjs";
2
2
 
3
3
  export { defineErrorCodes };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@better-auth/core",
3
- "version": "1.4.0-beta.21",
3
+ "version": "1.4.0-beta.22",
4
4
  "description": "The most comprehensive authentication framework for TypeScript.",
5
5
  "type": "module",
6
6
  "main": "./dist/index.mjs",
package/src/api/index.ts CHANGED
@@ -1,9 +1,5 @@
1
- import {
2
- createEndpoint,
3
- createMiddleware,
4
- type EndpointContext,
5
- type EndpointOptions,
6
- } from "better-call";
1
+ import type { EndpointContext, EndpointOptions } from "better-call";
2
+ import { createEndpoint, createMiddleware } from "better-call";
7
3
  import { runWithEndpointContext } from "../context";
8
4
  import type { AuthContext } from "../types";
9
5
 
@@ -1,5 +1,6 @@
1
1
  import type { EndpointContext, InputContext } from "better-call";
2
- import { type AsyncLocalStorage, getAsyncLocalStorage } from "../async_hooks";
2
+ import type { AsyncLocalStorage } from "../async_hooks";
3
+ import { getAsyncLocalStorage } from "../async_hooks";
3
4
  import type { AuthContext } from "../types";
4
5
 
5
6
  export type AuthEndpointContext = Partial<
@@ -1,9 +1,9 @@
1
1
  import { describe, expect, it } from "vitest";
2
+ import type { RequestStateWeakMap } from "./request-state";
2
3
  import {
3
4
  defineRequestState,
4
5
  getCurrentRequestState,
5
6
  hasRequestState,
6
- type RequestStateWeakMap,
7
7
  runWithRequestState,
8
8
  } from "./request-state";
9
9
 
@@ -1,4 +1,5 @@
1
- import { type AsyncLocalStorage, getAsyncLocalStorage } from "../async_hooks";
1
+ import type { AsyncLocalStorage } from "../async_hooks";
2
+ import { getAsyncLocalStorage } from "../async_hooks";
2
3
 
3
4
  export type RequestStateWeakMap = WeakMap<object, any>;
4
5
 
@@ -1,4 +1,5 @@
1
- import { type AsyncLocalStorage, getAsyncLocalStorage } from "../async_hooks";
1
+ import type { AsyncLocalStorage } from "../async_hooks";
2
+ import { getAsyncLocalStorage } from "../async_hooks";
2
3
  import type { DBAdapter, DBTransactionAdapter } from "../db/adapter";
3
4
 
4
5
  let currentAdapterAsyncStorage: AsyncLocalStorage<DBTransactionAdapter> | null =
@@ -1,5 +1,6 @@
1
1
  import { describe, expect, it } from "vitest";
2
- import { type LogLevel, shouldPublishLog } from "./logger";
2
+ import type { LogLevel } from "./logger";
3
+ import { shouldPublishLog } from "./logger";
3
4
 
4
5
  describe("shouldPublishLog", () => {
5
6
  const testCases: {
@@ -1,8 +1,7 @@
1
1
  import { betterFetch } from "@better-fetch/fetch";
2
+ import type { OAuthProvider, ProviderOptions } from "../oauth2";
2
3
  import {
3
4
  createAuthorizationURL,
4
- type OAuthProvider,
5
- type ProviderOptions,
6
5
  refreshAccessToken,
7
6
  validateAuthorizationCode,
8
7
  } from "../oauth2";
@@ -9,7 +9,7 @@ import type {
9
9
  Verification,
10
10
  } from "../db";
11
11
  import type { DBAdapter, Where } from "../db/adapter";
12
- import { createLogger } from "../env";
12
+ import type { createLogger } from "../env";
13
13
  import type { OAuthProvider } from "../oauth2";
14
14
  import type { BetterAuthCookies } from "./cookie";
15
15
  import type { LiteralUnion } from "./helper";
@@ -936,14 +936,7 @@ export type BetterAuthOptions = {
936
936
  /**
937
937
  * Advanced options
938
938
  */
939
- advanced?:
940
- | (BetterAuthAdvancedOptions & {
941
- /**
942
- * @deprecated Please use `database.generateId` instead.
943
- */
944
- generateId?: never;
945
- })
946
- | undefined;
939
+ advanced?: BetterAuthAdvancedOptions | undefined;
947
940
  logger?: Logger | undefined;
948
941
  /**
949
942
  * allows you to define custom hooks that can be
@@ -0,0 +1,3 @@
1
+ import { defineProject } from "vitest/config";
2
+
3
+ export default defineProject({});
File without changes
File without changes