@better-auth/core 1.4.4-beta.2 → 1.4.4
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/.turbo/turbo-build.log +6 -6
- package/dist/api/index.d.mts +2 -2
- package/dist/context/index.d.mts +2 -2
- package/dist/db/adapter/index.d.mts +2 -2
- package/dist/db/index.d.mts +2 -2
- package/dist/env/index.d.mts +1 -1
- package/dist/env/index.mjs +1 -1
- package/dist/{env-DwlNAN_D.mjs → env-8yWFh7b8.mjs} +3 -3
- package/dist/{index-wq2bt4fD.d.mts → index-DRwH9Qxo.d.mts} +1 -1
- package/dist/{index-CdubV7uy.d.mts → index-X1Fs3IbM.d.mts} +2 -2
- package/dist/index.d.mts +2 -2
- package/dist/oauth2/index.d.mts +2 -2
- package/dist/social-providers/index.d.mts +2 -2
- package/dist/social-providers/index.mjs +1 -1
- package/package.json +1 -1
- package/src/env/logger.test.ts +13 -13
- package/src/env/logger.ts +3 -3
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
> @better-auth/core@1.4.4
|
|
2
|
+
> @better-auth/core@1.4.4 build /home/runner/work/better-auth/better-auth/packages/core
|
|
3
3
|
> tsdown
|
|
4
4
|
|
|
5
5
|
[34mℹ[39m tsdown [2mv0.16.5[22m powered by rolldown [2mv1.0.0-beta.50[22m
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
[34mℹ[39m [2mdist/[22m[1mdb/adapter/index.mjs[22m [2m 0.01 kB[22m [2m│ gzip: 0.03 kB[22m
|
|
20
20
|
[34mℹ[39m [2mdist/[22m[1mindex.mjs[22m [2m 0.01 kB[22m [2m│ gzip: 0.03 kB[22m
|
|
21
21
|
[34mℹ[39m [2mdist/[22moauth2-B2XPHgx5.mjs [2m 9.19 kB[22m [2m│ gzip: 2.13 kB[22m
|
|
22
|
-
[34mℹ[39m [2mdist/[22menv-
|
|
22
|
+
[34mℹ[39m [2mdist/[22menv-8yWFh7b8.mjs [2m 7.67 kB[22m [2m│ gzip: 2.54 kB[22m
|
|
23
23
|
[34mℹ[39m [2mdist/[22mcontext-DgQ9XGBl.mjs [2m 3.89 kB[22m [2m│ gzip: 1.00 kB[22m
|
|
24
24
|
[34mℹ[39m [2mdist/[22merror-BhAKg8LX.mjs [2m 1.77 kB[22m [2m│ gzip: 0.79 kB[22m
|
|
25
25
|
[34mℹ[39m [2mdist/[22masync_hooks-BfRfbd1J.mjs [2m 0.87 kB[22m [2m│ gzip: 0.46 kB[22m
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
[34mℹ[39m [2mdist/[22m[32m[1msocial-providers/index.d.mts[22m[39m [2m 3.87 kB[22m [2m│ gzip: 1.20 kB[22m
|
|
28
28
|
[34mℹ[39m [2mdist/[22m[32m[1mcontext/index.d.mts[22m[39m [2m 3.05 kB[22m [2m│ gzip: 0.96 kB[22m
|
|
29
29
|
[34mℹ[39m [2mdist/[22m[32m[1merror/index.d.mts[22m[39m [2m 1.84 kB[22m [2m│ gzip: 0.72 kB[22m
|
|
30
|
-
[34mℹ[39m [2mdist/[22m[32m[1mdb/index.d.mts[22m[39m [2m 1.01 kB[22m [2m│ gzip: 0.
|
|
30
|
+
[34mℹ[39m [2mdist/[22m[32m[1mdb/index.d.mts[22m[39m [2m 1.01 kB[22m [2m│ gzip: 0.38 kB[22m
|
|
31
31
|
[34mℹ[39m [2mdist/[22m[32m[1mindex.d.mts[22m[39m [2m 0.87 kB[22m [2m│ gzip: 0.34 kB[22m
|
|
32
32
|
[34mℹ[39m [2mdist/[22m[32m[1mutils/index.d.mts[22m[39m [2m 0.84 kB[22m [2m│ gzip: 0.43 kB[22m
|
|
33
33
|
[34mℹ[39m [2mdist/[22m[32m[1moauth2/index.d.mts[22m[39m [2m 0.79 kB[22m [2m│ gzip: 0.30 kB[22m
|
|
@@ -35,8 +35,8 @@
|
|
|
35
35
|
[34mℹ[39m [2mdist/[22m[32m[1mdb/adapter/index.d.mts[22m[39m [2m 0.53 kB[22m [2m│ gzip: 0.25 kB[22m
|
|
36
36
|
[34mℹ[39m [2mdist/[22m[32m[1mapi/index.d.mts[22m[39m [2m 0.29 kB[22m [2m│ gzip: 0.16 kB[22m
|
|
37
37
|
[34mℹ[39m [2mdist/[22m[32m[1masync_hooks/index.d.mts[22m[39m [2m 0.14 kB[22m [2m│ gzip: 0.10 kB[22m
|
|
38
|
-
[34mℹ[39m [2mdist/[22m[32mindex-
|
|
39
|
-
[34mℹ[39m [2mdist/[22m[32mindex-
|
|
38
|
+
[34mℹ[39m [2mdist/[22m[32mindex-DRwH9Qxo.d.mts[39m [2m208.78 kB[22m [2m│ gzip: 32.75 kB[22m
|
|
39
|
+
[34mℹ[39m [2mdist/[22m[32mindex-X1Fs3IbM.d.mts[39m [2m 3.31 kB[22m [2m│ gzip: 1.11 kB[22m
|
|
40
40
|
[34mℹ[39m [2mdist/[22m[32mindex-DgwIISs7.d.mts[39m [2m 0.24 kB[22m [2m│ gzip: 0.16 kB[22m
|
|
41
41
|
[34mℹ[39m 31 files, total: 334.14 kB
|
|
42
|
-
[32m✔[39m Build complete in [
|
|
42
|
+
[32m✔[39m Build complete in [32m4549ms[39m
|
package/dist/api/index.d.mts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { a as optionsMiddleware, i as createAuthMiddleware, n as AuthMiddleware, r as createAuthEndpoint, t as AuthEndpoint } from "../index-
|
|
2
|
-
import "../index-
|
|
1
|
+
import { a as optionsMiddleware, i as createAuthMiddleware, n as AuthMiddleware, r as createAuthEndpoint, t as AuthEndpoint } from "../index-DRwH9Qxo.mjs";
|
|
2
|
+
import "../index-X1Fs3IbM.mjs";
|
|
3
3
|
export { AuthEndpoint, AuthMiddleware, createAuthEndpoint, createAuthMiddleware, optionsMiddleware };
|
package/dist/context/index.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Qn as DBTransactionAdapter, f as AuthContext, qn as DBAdapter } from "../index-
|
|
2
|
-
import "../index-
|
|
1
|
+
import { Qn as DBTransactionAdapter, f as AuthContext, qn as DBAdapter } from "../index-DRwH9Qxo.mjs";
|
|
2
|
+
import "../index-X1Fs3IbM.mjs";
|
|
3
3
|
import { t as AsyncLocalStorage } from "../index-DgwIISs7.mjs";
|
|
4
4
|
import { EndpointContext, InputContext } from "better-call";
|
|
5
5
|
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { $n as JoinConfig, Gn as CleanedWhere, Jn as DBAdapterDebugLogOption, Kn as CustomAdapter, Qn as DBTransactionAdapter, Xn as DBAdapterInstance, Yn as DBAdapterFactoryConfig, Zn as DBAdapterSchemaCreation, er as JoinOption, qn as DBAdapter, tr as Where } from "../../index-
|
|
2
|
-
import "../../index-
|
|
1
|
+
import { $n as JoinConfig, Gn as CleanedWhere, Jn as DBAdapterDebugLogOption, Kn as CustomAdapter, Qn as DBTransactionAdapter, Xn as DBAdapterInstance, Yn as DBAdapterFactoryConfig, Zn as DBAdapterSchemaCreation, er as JoinOption, qn as DBAdapter, tr as Where } from "../../index-DRwH9Qxo.mjs";
|
|
2
|
+
import "../../index-X1Fs3IbM.mjs";
|
|
3
3
|
export { CleanedWhere, CustomAdapter, DBAdapter, DBAdapterDebugLogOption, DBAdapterFactoryConfig, DBAdapterInstance, DBAdapterSchemaCreation, DBTransactionAdapter, JoinConfig, JoinOption, Where };
|
package/dist/db/index.d.mts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { Cr as DBFieldType, Er as SecondaryStorage, Sr as DBFieldAttributeConfig, Tr as DBPrimitive, _r as Account, ar as FieldAttributeConfig, br as BetterAuthDBSchema, cr as Verification, dr as userSchema, fr as coreSchema, gr as rateLimitSchema, hr as RateLimit, ir as FieldAttribute, lr as verificationSchema, mr as sessionSchema, nr as AuthPluginSchema, or as FieldType, pr as Session, rr as BetterAuthDbSchema, sr as Primitive, ur as User, vr as accountSchema, wr as DBPreservedModels, xr as DBFieldAttribute, yr as BetterAuthPluginDBSchema } from "../index-
|
|
2
|
-
import "../index-
|
|
1
|
+
import { Cr as DBFieldType, Er as SecondaryStorage, Sr as DBFieldAttributeConfig, Tr as DBPrimitive, _r as Account, ar as FieldAttributeConfig, br as BetterAuthDBSchema, cr as Verification, dr as userSchema, fr as coreSchema, gr as rateLimitSchema, hr as RateLimit, ir as FieldAttribute, lr as verificationSchema, mr as sessionSchema, nr as AuthPluginSchema, or as FieldType, pr as Session, rr as BetterAuthDbSchema, sr as Primitive, ur as User, vr as accountSchema, wr as DBPreservedModels, xr as DBFieldAttribute, yr as BetterAuthPluginDBSchema } from "../index-DRwH9Qxo.mjs";
|
|
2
|
+
import "../index-X1Fs3IbM.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 };
|
package/dist/env/index.d.mts
CHANGED
|
@@ -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-
|
|
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-X1Fs3IbM.mjs";
|
|
2
2
|
export { ENV, EnvObject, InternalLogger, LogHandlerParams, LogLevel, Logger, TTY_COLORS, createLogger, env, getBooleanEnvVar, getColorDepth, getEnvVar, isDevelopment, isProduction, isTest, levels, logger, nodeENV, shouldPublishLog };
|
package/dist/env/index.mjs
CHANGED
|
@@ -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-
|
|
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-8yWFh7b8.mjs";
|
|
2
2
|
|
|
3
3
|
export { ENV, TTY_COLORS, createLogger, env, getBooleanEnvVar, getColorDepth, getEnvVar, isDevelopment, isProduction, isTest, levels, logger, nodeENV, shouldPublishLog };
|
|
@@ -196,14 +196,14 @@ const TTY_COLORS = {
|
|
|
196
196
|
}
|
|
197
197
|
};
|
|
198
198
|
const levels = [
|
|
199
|
+
"debug",
|
|
199
200
|
"info",
|
|
200
201
|
"success",
|
|
201
202
|
"warn",
|
|
202
|
-
"error"
|
|
203
|
-
"debug"
|
|
203
|
+
"error"
|
|
204
204
|
];
|
|
205
205
|
function shouldPublishLog(currentLogLevel, logLevel) {
|
|
206
|
-
return levels.indexOf(logLevel)
|
|
206
|
+
return levels.indexOf(logLevel) >= levels.indexOf(currentLogLevel);
|
|
207
207
|
}
|
|
208
208
|
const levelColors = {
|
|
209
209
|
info: TTY_COLORS.fg.blue,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { i as Logger, o as createLogger } from "./index-
|
|
1
|
+
import { i as Logger, o as createLogger } from "./index-X1Fs3IbM.mjs";
|
|
2
2
|
import * as z from "zod";
|
|
3
3
|
import { BetterFetch, BetterFetchOption, BetterFetchPlugin } from "@better-fetch/fetch";
|
|
4
4
|
import * as jose0 from "jose";
|
|
@@ -63,8 +63,8 @@ declare const TTY_COLORS: {
|
|
|
63
63
|
readonly white: "\u001B[47m";
|
|
64
64
|
};
|
|
65
65
|
};
|
|
66
|
-
type LogLevel = "
|
|
67
|
-
declare const levels: readonly ["info", "success", "warn", "error"
|
|
66
|
+
type LogLevel = "debug" | "info" | "success" | "warn" | "error";
|
|
67
|
+
declare const levels: readonly ["debug", "info", "success", "warn", "error"];
|
|
68
68
|
declare function shouldPublishLog(currentLogLevel: LogLevel, logLevel: LogLevel): boolean;
|
|
69
69
|
interface Logger {
|
|
70
70
|
disabled?: boolean | undefined;
|
package/dist/index.d.mts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { An as BetterAuthCookies, On as LiteralString, _ as BetterAuthRateLimitOptions, b as HookEndpointContext, c as BetterAuthClientPlugin, d as ClientStore, f as AuthContext, g as BetterAuthOptions, h as BetterAuthAdvancedOptions, kn as LiteralUnion, l as ClientAtomListener, m as InternalAdapter, o as StandardSchemaV1, p as GenericEndpointContext, s as BetterAuthClientOptions, u as ClientFetchOption, v as GenerateIdFn, y as BetterAuthPlugin } from "./index-
|
|
2
|
-
import "./index-
|
|
1
|
+
import { An as BetterAuthCookies, On as LiteralString, _ as BetterAuthRateLimitOptions, b as HookEndpointContext, c as BetterAuthClientPlugin, d as ClientStore, f as AuthContext, g as BetterAuthOptions, h as BetterAuthAdvancedOptions, kn as LiteralUnion, l as ClientAtomListener, m as InternalAdapter, o as StandardSchemaV1, p as GenericEndpointContext, s as BetterAuthClientOptions, u as ClientFetchOption, v as GenerateIdFn, y as BetterAuthPlugin } from "./index-DRwH9Qxo.mjs";
|
|
2
|
+
import "./index-X1Fs3IbM.mjs";
|
|
3
3
|
export { AuthContext, BetterAuthAdvancedOptions, BetterAuthClientOptions, BetterAuthClientPlugin, BetterAuthCookies, BetterAuthOptions, BetterAuthPlugin, BetterAuthRateLimitOptions, ClientAtomListener, ClientFetchOption, ClientStore, GenerateIdFn, GenericEndpointContext, HookEndpointContext, InternalAdapter, LiteralString, LiteralUnion, StandardSchemaV1 };
|
package/dist/oauth2/index.d.mts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { Bn as createClientCredentialsTokenRequest, Fn as getOAuth2Tokens, Hn as OAuth2UserInfo, In as createRefreshAccessTokenRequest, Ln as refreshAccessToken, Mn as validateAuthorizationCode, Nn as validateToken, Pn as generateCodeChallenge, Rn as createAuthorizationURL, Un as OAuthProvider, Vn as OAuth2Tokens, Wn as ProviderOptions, jn as createAuthorizationCodeRequest, zn as clientCredentialsToken } from "../index-
|
|
2
|
-
import "../index-
|
|
1
|
+
import { Bn as createClientCredentialsTokenRequest, Fn as getOAuth2Tokens, Hn as OAuth2UserInfo, In as createRefreshAccessTokenRequest, Ln as refreshAccessToken, Mn as validateAuthorizationCode, Nn as validateToken, Pn as generateCodeChallenge, Rn as createAuthorizationURL, Un as OAuthProvider, Vn as OAuth2Tokens, Wn as ProviderOptions, jn as createAuthorizationCodeRequest, zn as clientCredentialsToken } from "../index-DRwH9Qxo.mjs";
|
|
2
|
+
import "../index-X1Fs3IbM.mjs";
|
|
3
3
|
export { OAuth2Tokens, OAuth2UserInfo, OAuthProvider, ProviderOptions, clientCredentialsToken, createAuthorizationCodeRequest, createAuthorizationURL, createClientCredentialsTokenRequest, createRefreshAccessTokenRequest, generateCodeChallenge, getOAuth2Tokens, refreshAccessToken, validateAuthorizationCode, validateToken };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { $ as AccountStatus, $t as GoogleProfile, A as PolarOptions, At as linear, B as LineIdTokenPayload, Bt as TwitchOptions, C as SocialProviderListEnum, Cn as AppleNonConformUser, Ct as gitlab, D as VercelOptions, Dn as getApplePublicKey, Dt as LinearOptions, E as socialProviders, En as apple, Et as linkedin, F as PayPalTokenResponse, Ft as DropboxProfile, G as NaverProfile, Gt as spotify, H as LineUserInfo, Ht as twitch, I as paypal, It as dropbox, J as KakaoProfile, Jt as slack, K as naver, Kt as SlackOptions, L as PaybinOptions, Lt as TwitterOption, M as polar, Mt as KickProfile, N as PayPalOptions, Nt as kick, O as VercelProfile, Ot as LinearProfile, P as PayPalProfile, Pt as DropboxOptions, Q as notion, Qt as GoogleOptions, R as PaybinProfile, Rt as TwitterProfile, S as SocialProviderList, Sn as atlassian, St as GitlabProfile, T as socialProviderList, Tn as AppleProfile, Tt as LinkedInProfile, U as line, Ut as SpotifyOptions, V as LineOptions, Vt as TwitchProfile, W as NaverOptions, Wt as SpotifyProfile, X as NotionOptions, Xt as HuggingFaceProfile, Y as kakao, Yt as HuggingFaceOptions, Z as NotionProfile, Zt as huggingface, _n as CognitoProfile, _t as reddit, an as GithubProfile, at as zoom, bn as AtlassianOptions, bt as tiktok, cn as FigmaProfile, ct as vk, dn as FacebookProfile, dt as salesforce, en as google, et as LoginType, fn as facebook, ft as RobloxOptions, gn as CognitoOptions, gt as RedditProfile, hn as discord, ht as RedditOptions, in as GithubOptions, it as ZoomProfile, j as PolarProfile, jt as KickOptions, k as vercel, kt as LinearUser, ln as figma, lt as SalesforceOptions, mn as DiscordProfile, mt as roblox, nn as MicrosoftOptions, nt as PronounOption, on as github, ot as VkOption, pn as DiscordOptions, pt as RobloxProfile, q as KakaoOptions, qt as SlackProfile, rn as microsoft, rt as ZoomOptions, sn as FigmaOptions, st as VkProfile, tn as MicrosoftEntraIDProfile, tt as PhoneNumber, un as FacebookOptions, ut as SalesforceProfile, vn as cognito, vt as TiktokOptions, w as SocialProviders, wn as AppleOptions, wt as LinkedInOptions, x as SocialProvider, xn as AtlassianProfile, xt as GitlabOptions, yn as getCognitoPublicKey, yt as TiktokProfile, z as paybin, zt as twitter } from "../index-
|
|
2
|
-
import "../index-
|
|
1
|
+
import { $ as AccountStatus, $t as GoogleProfile, A as PolarOptions, At as linear, B as LineIdTokenPayload, Bt as TwitchOptions, C as SocialProviderListEnum, Cn as AppleNonConformUser, Ct as gitlab, D as VercelOptions, Dn as getApplePublicKey, Dt as LinearOptions, E as socialProviders, En as apple, Et as linkedin, F as PayPalTokenResponse, Ft as DropboxProfile, G as NaverProfile, Gt as spotify, H as LineUserInfo, Ht as twitch, I as paypal, It as dropbox, J as KakaoProfile, Jt as slack, K as naver, Kt as SlackOptions, L as PaybinOptions, Lt as TwitterOption, M as polar, Mt as KickProfile, N as PayPalOptions, Nt as kick, O as VercelProfile, Ot as LinearProfile, P as PayPalProfile, Pt as DropboxOptions, Q as notion, Qt as GoogleOptions, R as PaybinProfile, Rt as TwitterProfile, S as SocialProviderList, Sn as atlassian, St as GitlabProfile, T as socialProviderList, Tn as AppleProfile, Tt as LinkedInProfile, U as line, Ut as SpotifyOptions, V as LineOptions, Vt as TwitchProfile, W as NaverOptions, Wt as SpotifyProfile, X as NotionOptions, Xt as HuggingFaceProfile, Y as kakao, Yt as HuggingFaceOptions, Z as NotionProfile, Zt as huggingface, _n as CognitoProfile, _t as reddit, an as GithubProfile, at as zoom, bn as AtlassianOptions, bt as tiktok, cn as FigmaProfile, ct as vk, dn as FacebookProfile, dt as salesforce, en as google, et as LoginType, fn as facebook, ft as RobloxOptions, gn as CognitoOptions, gt as RedditProfile, hn as discord, ht as RedditOptions, in as GithubOptions, it as ZoomProfile, j as PolarProfile, jt as KickOptions, k as vercel, kt as LinearUser, ln as figma, lt as SalesforceOptions, mn as DiscordProfile, mt as roblox, nn as MicrosoftOptions, nt as PronounOption, on as github, ot as VkOption, pn as DiscordOptions, pt as RobloxProfile, q as KakaoOptions, qt as SlackProfile, rn as microsoft, rt as ZoomOptions, sn as FigmaOptions, st as VkProfile, tn as MicrosoftEntraIDProfile, tt as PhoneNumber, un as FacebookOptions, ut as SalesforceProfile, vn as cognito, vt as TiktokOptions, w as SocialProviders, wn as AppleOptions, wt as LinkedInOptions, x as SocialProvider, xn as AtlassianProfile, xt as GitlabOptions, yn as getCognitoPublicKey, yt as TiktokProfile, z as paybin, zt as twitter } from "../index-DRwH9Qxo.mjs";
|
|
2
|
+
import "../index-X1Fs3IbM.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, VercelOptions, VercelProfile, 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, vercel, vk, zoom };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { i as logger } from "../env-
|
|
1
|
+
import { i as logger } from "../env-8yWFh7b8.mjs";
|
|
2
2
|
import { a as refreshAccessToken, c as getOAuth2Tokens, n as validateAuthorizationCode, o as createAuthorizationURL, s as generateCodeChallenge } from "../oauth2-B2XPHgx5.mjs";
|
|
3
3
|
import "../utils-C5EN75oV.mjs";
|
|
4
4
|
import { t as BetterAuthError } from "../error-BhAKg8LX.mjs";
|
package/package.json
CHANGED
package/src/env/logger.test.ts
CHANGED
|
@@ -8,22 +8,22 @@ describe("shouldPublishLog", () => {
|
|
|
8
8
|
logLevel: LogLevel;
|
|
9
9
|
expected: boolean;
|
|
10
10
|
}[] = [
|
|
11
|
-
{ currentLogLevel: "
|
|
12
|
-
{ currentLogLevel: "info", logLevel: "warn", expected: false },
|
|
13
|
-
{ currentLogLevel: "info", logLevel: "error", expected: false },
|
|
14
|
-
{ currentLogLevel: "info", logLevel: "debug", expected: false },
|
|
15
|
-
{ currentLogLevel: "warn", logLevel: "info", expected: true },
|
|
16
|
-
{ currentLogLevel: "warn", logLevel: "warn", expected: true },
|
|
17
|
-
{ currentLogLevel: "warn", logLevel: "error", expected: false },
|
|
18
|
-
{ currentLogLevel: "warn", logLevel: "debug", expected: false },
|
|
19
|
-
{ currentLogLevel: "error", logLevel: "info", expected: true },
|
|
20
|
-
{ currentLogLevel: "error", logLevel: "warn", expected: true },
|
|
21
|
-
{ currentLogLevel: "error", logLevel: "error", expected: true },
|
|
22
|
-
{ currentLogLevel: "error", logLevel: "debug", expected: false },
|
|
11
|
+
{ currentLogLevel: "debug", logLevel: "debug", expected: true },
|
|
23
12
|
{ currentLogLevel: "debug", logLevel: "info", expected: true },
|
|
24
13
|
{ currentLogLevel: "debug", logLevel: "warn", expected: true },
|
|
25
14
|
{ currentLogLevel: "debug", logLevel: "error", expected: true },
|
|
26
|
-
{ currentLogLevel: "
|
|
15
|
+
{ currentLogLevel: "info", logLevel: "debug", expected: false },
|
|
16
|
+
{ currentLogLevel: "info", logLevel: "info", expected: true },
|
|
17
|
+
{ currentLogLevel: "info", logLevel: "warn", expected: true },
|
|
18
|
+
{ currentLogLevel: "info", logLevel: "error", expected: true },
|
|
19
|
+
{ currentLogLevel: "warn", logLevel: "debug", expected: false },
|
|
20
|
+
{ currentLogLevel: "warn", logLevel: "info", expected: false },
|
|
21
|
+
{ currentLogLevel: "warn", logLevel: "warn", expected: true },
|
|
22
|
+
{ currentLogLevel: "warn", logLevel: "error", expected: true },
|
|
23
|
+
{ currentLogLevel: "error", logLevel: "debug", expected: false },
|
|
24
|
+
{ currentLogLevel: "error", logLevel: "info", expected: false },
|
|
25
|
+
{ currentLogLevel: "error", logLevel: "warn", expected: false },
|
|
26
|
+
{ currentLogLevel: "error", logLevel: "error", expected: true },
|
|
27
27
|
];
|
|
28
28
|
|
|
29
29
|
testCases.forEach(({ currentLogLevel, logLevel, expected }) => {
|
package/src/env/logger.ts
CHANGED
|
@@ -31,15 +31,15 @@ export const TTY_COLORS = {
|
|
|
31
31
|
},
|
|
32
32
|
} as const;
|
|
33
33
|
|
|
34
|
-
export type LogLevel = "
|
|
34
|
+
export type LogLevel = "debug" | "info" | "success" | "warn" | "error";
|
|
35
35
|
|
|
36
|
-
export const levels = ["info", "success", "warn", "error"
|
|
36
|
+
export const levels = ["debug", "info", "success", "warn", "error"] as const;
|
|
37
37
|
|
|
38
38
|
export function shouldPublishLog(
|
|
39
39
|
currentLogLevel: LogLevel,
|
|
40
40
|
logLevel: LogLevel,
|
|
41
41
|
): boolean {
|
|
42
|
-
return levels.indexOf(logLevel)
|
|
42
|
+
return levels.indexOf(logLevel) >= levels.indexOf(currentLogLevel);
|
|
43
43
|
}
|
|
44
44
|
|
|
45
45
|
export interface Logger {
|