@better-auth/core 1.4.0-beta.8 → 1.4.0-beta.9
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 +44 -2
- package/build.config.ts +4 -0
- package/dist/db/adapter/index.d.cts +14 -23
- package/dist/db/adapter/index.d.mts +14 -23
- package/dist/db/adapter/index.d.ts +14 -23
- package/dist/db/index.d.cts +6 -94
- package/dist/db/index.d.mts +6 -94
- package/dist/db/index.d.ts +6 -94
- package/dist/env/index.d.cts +4 -53
- package/dist/env/index.d.mts +4 -53
- package/dist/env/index.d.ts +4 -53
- package/dist/error/index.cjs +44 -0
- package/dist/error/index.d.cts +33 -0
- package/dist/error/index.d.mts +33 -0
- package/dist/error/index.d.ts +33 -0
- package/dist/error/index.mjs +41 -0
- package/dist/index.d.cts +159 -94
- package/dist/index.d.mts +159 -94
- package/dist/index.d.ts +159 -94
- package/dist/middleware/index.cjs +25 -0
- package/dist/middleware/index.d.cts +14 -0
- package/dist/middleware/index.d.mts +14 -0
- package/dist/middleware/index.d.ts +14 -0
- package/dist/middleware/index.mjs +21 -0
- package/dist/oauth2/index.d.cts +4 -182
- package/dist/oauth2/index.d.mts +4 -182
- package/dist/oauth2/index.d.ts +4 -182
- package/dist/shared/core.2rWMW9q9.d.ts +13 -0
- package/dist/shared/core.40VTWh-p.d.cts +217 -0
- package/dist/shared/core.BfcVdsSf.d.cts +181 -0
- package/dist/shared/core.Bisb2Bdk.d.mts +181 -0
- package/dist/shared/core.BwoNUcJQ.d.cts +53 -0
- package/dist/shared/core.BwoNUcJQ.d.mts +53 -0
- package/dist/shared/core.BwoNUcJQ.d.ts +53 -0
- package/dist/shared/core.CErFRCOZ.d.mts +1684 -0
- package/dist/shared/core.CGN6D-Mh.d.ts +181 -0
- package/dist/shared/core.CPuIItYE.d.ts +217 -0
- package/dist/shared/core.CftpHMDz.d.cts +13 -0
- package/dist/shared/core.Db7zJyxf.d.ts +1684 -0
- package/dist/shared/core.DqaxObkf.d.cts +1684 -0
- package/dist/shared/core.MjcDoj7R.d.cts +5 -0
- package/dist/shared/core.MjcDoj7R.d.mts +5 -0
- package/dist/shared/core.MjcDoj7R.d.ts +5 -0
- package/dist/shared/core.g2ZbxAEV.d.mts +217 -0
- package/dist/shared/core.g9ACQ8v2.d.mts +13 -0
- package/dist/social-providers/index.cjs +2793 -0
- package/dist/social-providers/index.d.cts +3903 -0
- package/dist/social-providers/index.d.mts +3903 -0
- package/dist/social-providers/index.d.ts +3903 -0
- package/dist/social-providers/index.mjs +2743 -0
- package/dist/utils/index.cjs +7 -0
- package/dist/utils/index.d.cts +10 -0
- package/dist/utils/index.d.mts +10 -0
- package/dist/utils/index.d.ts +10 -0
- package/dist/utils/index.mjs +5 -0
- package/package.json +72 -3
- package/src/db/adapter/index.ts +424 -0
- package/src/db/index.ts +2 -0
- package/src/db/type.ts +1 -10
- package/src/error/codes.ts +31 -0
- package/src/error/index.ts +11 -0
- package/src/index.ts +0 -2
- package/src/middleware/index.ts +33 -0
- package/src/social-providers/apple.ts +213 -0
- package/src/social-providers/atlassian.ts +130 -0
- package/src/social-providers/cognito.ts +269 -0
- package/src/social-providers/discord.ts +172 -0
- package/src/social-providers/dropbox.ts +112 -0
- package/src/social-providers/facebook.ts +204 -0
- package/src/social-providers/figma.ts +115 -0
- package/src/social-providers/github.ts +154 -0
- package/src/social-providers/gitlab.ts +152 -0
- package/src/social-providers/google.ts +171 -0
- package/src/social-providers/huggingface.ts +116 -0
- package/src/social-providers/index.ts +118 -0
- package/src/social-providers/kakao.ts +178 -0
- package/src/social-providers/kick.ts +95 -0
- package/src/social-providers/line.ts +169 -0
- package/src/social-providers/linear.ts +120 -0
- package/src/social-providers/linkedin.ts +110 -0
- package/src/social-providers/microsoft-entra-id.ts +243 -0
- package/src/social-providers/naver.ts +112 -0
- package/src/social-providers/notion.ts +106 -0
- package/src/social-providers/paypal.ts +261 -0
- package/src/social-providers/reddit.ts +122 -0
- package/src/social-providers/roblox.ts +110 -0
- package/src/social-providers/salesforce.ts +157 -0
- package/src/social-providers/slack.ts +114 -0
- package/src/social-providers/spotify.ts +93 -0
- package/src/social-providers/tiktok.ts +211 -0
- package/src/social-providers/twitch.ts +111 -0
- package/src/social-providers/twitter.ts +194 -0
- package/src/social-providers/vk.ts +128 -0
- package/src/social-providers/zoom.ts +218 -0
- package/src/types/context.ts +270 -0
- package/src/types/cookie.ts +7 -0
- package/src/types/index.ts +19 -1
- package/src/types/init-options.ts +1039 -2
- package/src/types/plugin-client.ts +69 -0
- package/src/types/plugin.ts +134 -0
- package/src/utils/error-codes.ts +51 -0
- package/src/utils/index.ts +1 -0
- package/dist/shared/core.DeNN5HMO.d.cts +0 -143
- package/dist/shared/core.DeNN5HMO.d.mts +0 -143
- package/dist/shared/core.DeNN5HMO.d.ts +0 -143
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
> @better-auth/core@1.4.0-beta.
|
|
2
|
+
> @better-auth/core@1.4.0-beta.9 build /home/runner/work/better-auth/better-auth/packages/core
|
|
3
3
|
> unbuild --clean
|
|
4
4
|
|
|
5
5
|
[info] Building core
|
|
@@ -8,28 +8,70 @@ Generated an empty chunk: "index".
|
|
|
8
8
|
Generated an empty chunk: "db/adapter/index".
|
|
9
9
|
Generated an empty chunk: "index".
|
|
10
10
|
Generated an empty chunk: "db/adapter/index".
|
|
11
|
+
"node:sqlite" is imported by "src/types/init-options.ts", but could not be resolved – treating it as an external dependency.
|
|
12
|
+
"bun:sqlite" is imported by "src/types/init-options.ts", but could not be resolved – treating it as an external dependency.
|
|
13
|
+
Export "ProviderOptions" of module "src/oauth2/oauth-provider.ts" was reexported through module "src/oauth2/index.ts" while both modules are dependencies of each other and will end up in different chunks by current Rollup settings. This scenario is not well supported at the moment as it will produce a circular dependency between chunks and will likely lead to broken execution order.
|
|
14
|
+
Either change the import in "src/oauth2/create-authorization-url.ts" to point directly to the exporting module or reconfigure "output.manualChunks" to ensure these modules end up in the same chunk.
|
|
15
|
+
Export "ProviderOptions" of module "src/oauth2/oauth-provider.ts" was reexported through module "src/oauth2/index.ts" while both modules are dependencies of each other and will end up in different chunks by current Rollup settings. This scenario is not well supported at the moment as it will produce a circular dependency between chunks and will likely lead to broken execution order.
|
|
16
|
+
Either change the import in "src/oauth2/validate-authorization-code.ts" to point directly to the exporting module or reconfigure "output.manualChunks" to ensure these modules end up in the same chunk.
|
|
17
|
+
Export "OAuthProvider" of module "src/oauth2/oauth-provider.ts" was reexported through module "src/oauth2/index.ts" while both modules are dependencies of each other and will end up in different chunks by current Rollup settings. This scenario is not well supported at the moment as it will produce a circular dependency between chunks and will likely lead to broken execution order.
|
|
18
|
+
Either change the import in "src/types/context.ts" to point directly to the exporting module or reconfigure "output.manualChunks" to ensure these modules end up in the same chunk.
|
|
19
|
+
Export "ProviderOptions" of module "src/oauth2/oauth-provider.ts" was reexported through module "src/oauth2/index.ts" while both modules are dependencies of each other and will end up in different chunks by current Rollup settings. This scenario is not well supported at the moment as it will produce a circular dependency between chunks and will likely lead to broken execution order.
|
|
20
|
+
Either change the import in "src/oauth2/create-authorization-url.ts" to point directly to the exporting module or reconfigure "output.manualChunks" to ensure these modules end up in the same chunk.
|
|
21
|
+
Export "ProviderOptions" of module "src/oauth2/oauth-provider.ts" was reexported through module "src/oauth2/index.ts" while both modules are dependencies of each other and will end up in different chunks by current Rollup settings. This scenario is not well supported at the moment as it will produce a circular dependency between chunks and will likely lead to broken execution order.
|
|
22
|
+
Either change the import in "src/oauth2/validate-authorization-code.ts" to point directly to the exporting module or reconfigure "output.manualChunks" to ensure these modules end up in the same chunk.
|
|
23
|
+
Export "OAuthProvider" of module "src/oauth2/oauth-provider.ts" was reexported through module "src/oauth2/index.ts" while both modules are dependencies of each other and will end up in different chunks by current Rollup settings. This scenario is not well supported at the moment as it will produce a circular dependency between chunks and will likely lead to broken execution order.
|
|
24
|
+
Either change the import in "src/types/context.ts" to point directly to the exporting module or reconfigure "output.manualChunks" to ensure these modules end up in the same chunk.
|
|
25
|
+
Export "ProviderOptions" of module "src/oauth2/oauth-provider.ts" was reexported through module "src/oauth2/index.ts" while both modules are dependencies of each other and will end up in different chunks by current Rollup settings. This scenario is not well supported at the moment as it will produce a circular dependency between chunks and will likely lead to broken execution order.
|
|
26
|
+
Either change the import in "src/oauth2/create-authorization-url.ts" to point directly to the exporting module or reconfigure "output.manualChunks" to ensure these modules end up in the same chunk.
|
|
27
|
+
Export "ProviderOptions" of module "src/oauth2/oauth-provider.ts" was reexported through module "src/oauth2/index.ts" while both modules are dependencies of each other and will end up in different chunks by current Rollup settings. This scenario is not well supported at the moment as it will produce a circular dependency between chunks and will likely lead to broken execution order.
|
|
28
|
+
Either change the import in "src/oauth2/validate-authorization-code.ts" to point directly to the exporting module or reconfigure "output.manualChunks" to ensure these modules end up in the same chunk.
|
|
29
|
+
Export "OAuthProvider" of module "src/oauth2/oauth-provider.ts" was reexported through module "src/oauth2/index.ts" while both modules are dependencies of each other and will end up in different chunks by current Rollup settings. This scenario is not well supported at the moment as it will produce a circular dependency between chunks and will likely lead to broken execution order.
|
|
30
|
+
Either change the import in "src/types/context.ts" to point directly to the exporting module or reconfigure "output.manualChunks" to ensure these modules end up in the same chunk.
|
|
11
31
|
[success] Build succeeded for core
|
|
12
32
|
[log] dist/index.cjs (total size: 15 B, chunk size: 15 B)
|
|
13
33
|
|
|
14
34
|
[log] dist/async_hooks/index.cjs (total size: 922 B, chunk size: 922 B, exports: getAsyncLocalStorage)
|
|
15
35
|
|
|
36
|
+
[log] dist/middleware/index.cjs (total size: 610 B, chunk size: 610 B, exports: createAuthEndpoint, createAuthMiddleware, optionsMiddleware)
|
|
37
|
+
|
|
38
|
+
[log] dist/utils/index.cjs (total size: 114 B, chunk size: 114 B, exports: defineErrorCodes)
|
|
39
|
+
|
|
40
|
+
[log] dist/error/index.cjs (total size: 1.75 kB, chunk size: 1.75 kB, exports: BASE_ERROR_CODES, BetterAuthError)
|
|
41
|
+
|
|
16
42
|
[log] dist/env/index.cjs (total size: 8.71 kB, chunk size: 8.71 kB, exports: ENV, TTY_COLORS, createLogger, env, getBooleanEnvVar, getColorDepth, getEnvVar, isDevelopment, isProduction, isTest, levels, logger, nodeENV, shouldPublishLog)
|
|
17
43
|
|
|
18
44
|
[log] dist/oauth2/index.cjs (total size: 10.3 kB, chunk size: 10.3 kB, exports: clientCredentialsToken, createAuthorizationCodeRequest, createAuthorizationURL, createClientCredentialsTokenRequest, createRefreshAccessTokenRequest, generateCodeChallenge, getOAuth2Tokens, refreshAccessToken, validateAuthorizationCode, validateToken)
|
|
19
45
|
|
|
20
46
|
[log] dist/db/index.cjs (total size: 2.43 kB, chunk size: 2.43 kB, exports: accountSchema, coreSchema, rateLimitSchema, sessionSchema, userSchema, verificationSchema)
|
|
21
47
|
|
|
48
|
+
[log] dist/social-providers/index.cjs (total size: 87.9 kB, chunk size: 86.1 kB, exports: SocialProviderListEnum, apple, atlassian, cognito, discord, dropbox, facebook, figma, getApplePublicKey, getCognitoPublicKey, github, gitlab, google, huggingface, kakao, kick, line, linear, linkedin, microsoft, naver, notion, paypal, reddit, roblox, salesforce, slack, socialProviderList, socialProviders, spotify, tiktok, twitch, twitter, vk, zoom)
|
|
49
|
+
└─ dist/error/index.cjs (1.75 kB)
|
|
50
|
+
|
|
22
51
|
[log] dist/db/adapter/index.cjs (total size: 15 B, chunk size: 15 B)
|
|
23
52
|
[log] dist/index.mjs (total size: 1 B, chunk size: 1 B)
|
|
24
53
|
|
|
25
54
|
[log] dist/async_hooks/index.mjs (total size: 887 B, chunk size: 887 B, exports: getAsyncLocalStorage)
|
|
26
55
|
|
|
56
|
+
[log] dist/middleware/index.mjs (total size: 495 B, chunk size: 495 B, exports: createAuthEndpoint, createAuthMiddleware, optionsMiddleware)
|
|
57
|
+
|
|
58
|
+
[log] dist/utils/index.mjs (total size: 83 B, chunk size: 83 B, exports: defineErrorCodes)
|
|
59
|
+
|
|
60
|
+
[log] dist/error/index.mjs (total size: 1.7 kB, chunk size: 1.7 kB, exports: BASE_ERROR_CODES, BetterAuthError)
|
|
61
|
+
|
|
27
62
|
[log] dist/env/index.mjs (total size: 8.42 kB, chunk size: 8.42 kB, exports: ENV, TTY_COLORS, createLogger, env, getBooleanEnvVar, getColorDepth, getEnvVar, isDevelopment, isProduction, isTest, levels, logger, nodeENV, shouldPublishLog)
|
|
28
63
|
|
|
29
64
|
[log] dist/oauth2/index.mjs (total size: 9.88 kB, chunk size: 9.88 kB, exports: clientCredentialsToken, createAuthorizationCodeRequest, createAuthorizationURL, createClientCredentialsTokenRequest, createRefreshAccessTokenRequest, generateCodeChallenge, getOAuth2Tokens, refreshAccessToken, validateAuthorizationCode, validateToken)
|
|
30
65
|
|
|
31
66
|
[log] dist/db/index.mjs (total size: 1.67 kB, chunk size: 1.67 kB, exports: accountSchema, coreSchema, rateLimitSchema, sessionSchema, userSchema, verificationSchema)
|
|
32
67
|
|
|
68
|
+
[log] dist/social-providers/index.mjs (total size: 85.8 kB, chunk size: 84.1 kB, exports: SocialProviderListEnum, apple, atlassian, cognito, discord, dropbox, facebook, figma, getApplePublicKey, getCognitoPublicKey, github, gitlab, google, huggingface, kakao, kick, line, linear, linkedin, microsoft, naver, notion, paypal, reddit, roblox, salesforce, slack, socialProviderList, socialProviders, spotify, tiktok, twitch, twitter, vk, zoom)
|
|
69
|
+
└─ dist/error/index.mjs (1.7 kB)
|
|
70
|
+
|
|
33
71
|
[log] dist/db/adapter/index.mjs (total size: 1 B, chunk size: 1 B)
|
|
34
|
-
Σ Total dist size (byte size):
|
|
72
|
+
Σ Total dist size (byte size): 859 kB
|
|
35
73
|
[log]
|
|
74
|
+
[warn] Build is done with some warnings:
|
|
75
|
+
|
|
76
|
+
- Implicitly bundling "bun:sqlite"
|
|
77
|
+
- Implicitly bundling "node:sqlite"
|
package/build.config.ts
CHANGED
|
@@ -1,23 +1,14 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
/**
|
|
16
|
-
* Only used for adapter tests to show debug logs if a test fails.
|
|
17
|
-
*
|
|
18
|
-
* @deprecated Not actually deprecated. Doing this for IDEs to show this option at the very bottom and stop end-users from using this.
|
|
19
|
-
*/
|
|
20
|
-
isRunningAdapterTests: boolean;
|
|
21
|
-
};
|
|
22
|
-
|
|
23
|
-
export type { DBAdapterDebugLogOption };
|
|
1
|
+
import '../../shared/core.40VTWh-p.cjs';
|
|
2
|
+
export { C as CleanedWhere, j as CustomAdapter, i as DBAdapter, D as DBAdapterDebugLogOption, g as DBAdapterFactoryConfig, k as DBAdapterInstance, f as DBAdapterSchemaCreation, h as DBTransactionAdapter, W as Where } from '../../shared/core.DqaxObkf.cjs';
|
|
3
|
+
import 'zod';
|
|
4
|
+
import '../../shared/core.MjcDoj7R.cjs';
|
|
5
|
+
import 'kysely';
|
|
6
|
+
import 'better-sqlite3';
|
|
7
|
+
import 'better-call';
|
|
8
|
+
import 'bun:sqlite';
|
|
9
|
+
import 'node:sqlite';
|
|
10
|
+
import '../../social-providers/index.cjs';
|
|
11
|
+
import '@better-auth/core/oauth2';
|
|
12
|
+
import '../../shared/core.BfcVdsSf.cjs';
|
|
13
|
+
import '../../shared/core.BwoNUcJQ.cjs';
|
|
14
|
+
import '@better-auth/core';
|
|
@@ -1,23 +1,14 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
/**
|
|
16
|
-
* Only used for adapter tests to show debug logs if a test fails.
|
|
17
|
-
*
|
|
18
|
-
* @deprecated Not actually deprecated. Doing this for IDEs to show this option at the very bottom and stop end-users from using this.
|
|
19
|
-
*/
|
|
20
|
-
isRunningAdapterTests: boolean;
|
|
21
|
-
};
|
|
22
|
-
|
|
23
|
-
export type { DBAdapterDebugLogOption };
|
|
1
|
+
import '../../shared/core.g2ZbxAEV.mjs';
|
|
2
|
+
export { C as CleanedWhere, j as CustomAdapter, i as DBAdapter, D as DBAdapterDebugLogOption, g as DBAdapterFactoryConfig, k as DBAdapterInstance, f as DBAdapterSchemaCreation, h as DBTransactionAdapter, W as Where } from '../../shared/core.CErFRCOZ.mjs';
|
|
3
|
+
import 'zod';
|
|
4
|
+
import '../../shared/core.MjcDoj7R.mjs';
|
|
5
|
+
import 'kysely';
|
|
6
|
+
import 'better-sqlite3';
|
|
7
|
+
import 'better-call';
|
|
8
|
+
import 'bun:sqlite';
|
|
9
|
+
import 'node:sqlite';
|
|
10
|
+
import '../../social-providers/index.mjs';
|
|
11
|
+
import '@better-auth/core/oauth2';
|
|
12
|
+
import '../../shared/core.Bisb2Bdk.mjs';
|
|
13
|
+
import '../../shared/core.BwoNUcJQ.mjs';
|
|
14
|
+
import '@better-auth/core';
|
|
@@ -1,23 +1,14 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
/**
|
|
16
|
-
* Only used for adapter tests to show debug logs if a test fails.
|
|
17
|
-
*
|
|
18
|
-
* @deprecated Not actually deprecated. Doing this for IDEs to show this option at the very bottom and stop end-users from using this.
|
|
19
|
-
*/
|
|
20
|
-
isRunningAdapterTests: boolean;
|
|
21
|
-
};
|
|
22
|
-
|
|
23
|
-
export type { DBAdapterDebugLogOption };
|
|
1
|
+
import '../../shared/core.CPuIItYE.js';
|
|
2
|
+
export { C as CleanedWhere, j as CustomAdapter, i as DBAdapter, D as DBAdapterDebugLogOption, g as DBAdapterFactoryConfig, k as DBAdapterInstance, f as DBAdapterSchemaCreation, h as DBTransactionAdapter, W as Where } from '../../shared/core.Db7zJyxf.js';
|
|
3
|
+
import 'zod';
|
|
4
|
+
import '../../shared/core.MjcDoj7R.js';
|
|
5
|
+
import 'kysely';
|
|
6
|
+
import 'better-sqlite3';
|
|
7
|
+
import 'better-call';
|
|
8
|
+
import 'bun:sqlite';
|
|
9
|
+
import 'node:sqlite';
|
|
10
|
+
import '../../social-providers/index.js';
|
|
11
|
+
import '@better-auth/core/oauth2';
|
|
12
|
+
import '../../shared/core.CGN6D-Mh.js';
|
|
13
|
+
import '../../shared/core.BwoNUcJQ.js';
|
|
14
|
+
import '@better-auth/core';
|
package/dist/db/index.d.cts
CHANGED
|
@@ -1,16 +1,8 @@
|
|
|
1
|
-
import { D as DBFieldAttribute,
|
|
2
|
-
export { S as SecondaryStorage } from '../shared/core.
|
|
1
|
+
import { D as DBFieldAttribute, a as DBFieldAttributeConfig, b as DBFieldType, c as DBPrimitive, B as BetterAuthDBSchema } from '../shared/core.40VTWh-p.cjs';
|
|
2
|
+
export { A as Account, d as DBPreservedModels, R as RateLimit, S as SecondaryStorage, f as Session, U as User, V as Verification, e as accountSchema, r as rateLimitSchema, s as sessionSchema, u as userSchema, v as verificationSchema } from '../shared/core.40VTWh-p.cjs';
|
|
3
|
+
import { B as BetterAuthPluginDBSchema } from '../shared/core.CftpHMDz.cjs';
|
|
3
4
|
import * as z from 'zod';
|
|
4
|
-
|
|
5
|
-
type BetterAuthPluginDBSchema = {
|
|
6
|
-
[table in string]: {
|
|
7
|
-
fields: {
|
|
8
|
-
[field in string]: DBFieldAttribute;
|
|
9
|
-
};
|
|
10
|
-
disableMigration?: boolean;
|
|
11
|
-
modelName?: string;
|
|
12
|
-
};
|
|
13
|
-
};
|
|
5
|
+
import '../shared/core.MjcDoj7R.cjs';
|
|
14
6
|
|
|
15
7
|
declare const coreSchema: z.ZodObject<{
|
|
16
8
|
id: z.ZodString;
|
|
@@ -18,86 +10,6 @@ declare const coreSchema: z.ZodObject<{
|
|
|
18
10
|
updatedAt: z.ZodDefault<z.ZodDate>;
|
|
19
11
|
}, z.core.$strip>;
|
|
20
12
|
|
|
21
|
-
declare const userSchema: z.ZodObject<{
|
|
22
|
-
id: z.ZodString;
|
|
23
|
-
createdAt: z.ZodDefault<z.ZodDate>;
|
|
24
|
-
updatedAt: z.ZodDefault<z.ZodDate>;
|
|
25
|
-
email: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
|
|
26
|
-
emailVerified: z.ZodDefault<z.ZodBoolean>;
|
|
27
|
-
name: z.ZodString;
|
|
28
|
-
image: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
29
|
-
}, z.core.$strip>;
|
|
30
|
-
/**
|
|
31
|
-
* User schema type used by better-auth, note that it's possible that user could have additional fields
|
|
32
|
-
*
|
|
33
|
-
* todo: we should use generics to extend this type with additional fields from plugins and options in the future
|
|
34
|
-
*/
|
|
35
|
-
type User = z.infer<typeof userSchema>;
|
|
36
|
-
|
|
37
|
-
declare const accountSchema: z.ZodObject<{
|
|
38
|
-
id: z.ZodString;
|
|
39
|
-
createdAt: z.ZodDefault<z.ZodDate>;
|
|
40
|
-
updatedAt: z.ZodDefault<z.ZodDate>;
|
|
41
|
-
providerId: z.ZodString;
|
|
42
|
-
accountId: z.ZodString;
|
|
43
|
-
userId: z.ZodCoercedString<unknown>;
|
|
44
|
-
accessToken: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
45
|
-
refreshToken: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
46
|
-
idToken: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
47
|
-
accessTokenExpiresAt: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
|
|
48
|
-
refreshTokenExpiresAt: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
|
|
49
|
-
scope: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
50
|
-
password: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
51
|
-
}, z.core.$strip>;
|
|
52
|
-
/**
|
|
53
|
-
* Account schema type used by better-auth, note that it's possible that account could have additional fields
|
|
54
|
-
*
|
|
55
|
-
* todo: we should use generics to extend this type with additional fields from plugins and options in the future
|
|
56
|
-
*/
|
|
57
|
-
type Account = z.infer<typeof accountSchema>;
|
|
58
|
-
|
|
59
|
-
declare const sessionSchema: z.ZodObject<{
|
|
60
|
-
id: z.ZodString;
|
|
61
|
-
createdAt: z.ZodDefault<z.ZodDate>;
|
|
62
|
-
updatedAt: z.ZodDefault<z.ZodDate>;
|
|
63
|
-
userId: z.ZodCoercedString<unknown>;
|
|
64
|
-
expiresAt: z.ZodDate;
|
|
65
|
-
token: z.ZodString;
|
|
66
|
-
ipAddress: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
67
|
-
userAgent: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
68
|
-
}, z.core.$strip>;
|
|
69
|
-
/**
|
|
70
|
-
* Session schema type used by better-auth, note that it's possible that session could have additional fields
|
|
71
|
-
*
|
|
72
|
-
* todo: we should use generics to extend this type with additional fields from plugins and options in the future
|
|
73
|
-
*/
|
|
74
|
-
type Session = z.infer<typeof sessionSchema>;
|
|
75
|
-
|
|
76
|
-
declare const verificationSchema: z.ZodObject<{
|
|
77
|
-
id: z.ZodString;
|
|
78
|
-
createdAt: z.ZodDefault<z.ZodDate>;
|
|
79
|
-
updatedAt: z.ZodDefault<z.ZodDate>;
|
|
80
|
-
value: z.ZodString;
|
|
81
|
-
expiresAt: z.ZodDate;
|
|
82
|
-
identifier: z.ZodString;
|
|
83
|
-
}, z.core.$strip>;
|
|
84
|
-
/**
|
|
85
|
-
* Verification schema type used by better-auth, note that it's possible that verification could have additional fields
|
|
86
|
-
*
|
|
87
|
-
* todo: we should use generics to extend this type with additional fields from plugins and options in the future
|
|
88
|
-
*/
|
|
89
|
-
type Verification = z.infer<typeof verificationSchema>;
|
|
90
|
-
|
|
91
|
-
declare const rateLimitSchema: z.ZodObject<{
|
|
92
|
-
key: z.ZodString;
|
|
93
|
-
count: z.ZodNumber;
|
|
94
|
-
lastRequest: z.ZodNumber;
|
|
95
|
-
}, z.core.$strip>;
|
|
96
|
-
/**
|
|
97
|
-
* Rate limit schema type used by better-auth for rate limiting
|
|
98
|
-
*/
|
|
99
|
-
type RateLimit = z.infer<typeof rateLimitSchema>;
|
|
100
|
-
|
|
101
13
|
/**
|
|
102
14
|
* @deprecated Backport for 1.3.x, we will remove this in 1.4.x
|
|
103
15
|
*/
|
|
@@ -123,5 +35,5 @@ type Primitive = DBPrimitive;
|
|
|
123
35
|
*/
|
|
124
36
|
type BetterAuthDbSchema = BetterAuthDBSchema;
|
|
125
37
|
|
|
126
|
-
export { BetterAuthDBSchema, DBFieldAttribute, DBFieldAttributeConfig, DBFieldType, DBPrimitive,
|
|
127
|
-
export type {
|
|
38
|
+
export { BetterAuthDBSchema, BetterAuthPluginDBSchema, DBFieldAttribute, DBFieldAttributeConfig, DBFieldType, DBPrimitive, coreSchema };
|
|
39
|
+
export type { AuthPluginSchema, BetterAuthDbSchema, FieldAttribute, FieldAttributeConfig, FieldType, Primitive };
|
package/dist/db/index.d.mts
CHANGED
|
@@ -1,16 +1,8 @@
|
|
|
1
|
-
import { D as DBFieldAttribute,
|
|
2
|
-
export { S as SecondaryStorage } from '../shared/core.
|
|
1
|
+
import { D as DBFieldAttribute, a as DBFieldAttributeConfig, b as DBFieldType, c as DBPrimitive, B as BetterAuthDBSchema } from '../shared/core.g2ZbxAEV.mjs';
|
|
2
|
+
export { A as Account, d as DBPreservedModels, R as RateLimit, S as SecondaryStorage, f as Session, U as User, V as Verification, e as accountSchema, r as rateLimitSchema, s as sessionSchema, u as userSchema, v as verificationSchema } from '../shared/core.g2ZbxAEV.mjs';
|
|
3
|
+
import { B as BetterAuthPluginDBSchema } from '../shared/core.g9ACQ8v2.mjs';
|
|
3
4
|
import * as z from 'zod';
|
|
4
|
-
|
|
5
|
-
type BetterAuthPluginDBSchema = {
|
|
6
|
-
[table in string]: {
|
|
7
|
-
fields: {
|
|
8
|
-
[field in string]: DBFieldAttribute;
|
|
9
|
-
};
|
|
10
|
-
disableMigration?: boolean;
|
|
11
|
-
modelName?: string;
|
|
12
|
-
};
|
|
13
|
-
};
|
|
5
|
+
import '../shared/core.MjcDoj7R.mjs';
|
|
14
6
|
|
|
15
7
|
declare const coreSchema: z.ZodObject<{
|
|
16
8
|
id: z.ZodString;
|
|
@@ -18,86 +10,6 @@ declare const coreSchema: z.ZodObject<{
|
|
|
18
10
|
updatedAt: z.ZodDefault<z.ZodDate>;
|
|
19
11
|
}, z.core.$strip>;
|
|
20
12
|
|
|
21
|
-
declare const userSchema: z.ZodObject<{
|
|
22
|
-
id: z.ZodString;
|
|
23
|
-
createdAt: z.ZodDefault<z.ZodDate>;
|
|
24
|
-
updatedAt: z.ZodDefault<z.ZodDate>;
|
|
25
|
-
email: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
|
|
26
|
-
emailVerified: z.ZodDefault<z.ZodBoolean>;
|
|
27
|
-
name: z.ZodString;
|
|
28
|
-
image: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
29
|
-
}, z.core.$strip>;
|
|
30
|
-
/**
|
|
31
|
-
* User schema type used by better-auth, note that it's possible that user could have additional fields
|
|
32
|
-
*
|
|
33
|
-
* todo: we should use generics to extend this type with additional fields from plugins and options in the future
|
|
34
|
-
*/
|
|
35
|
-
type User = z.infer<typeof userSchema>;
|
|
36
|
-
|
|
37
|
-
declare const accountSchema: z.ZodObject<{
|
|
38
|
-
id: z.ZodString;
|
|
39
|
-
createdAt: z.ZodDefault<z.ZodDate>;
|
|
40
|
-
updatedAt: z.ZodDefault<z.ZodDate>;
|
|
41
|
-
providerId: z.ZodString;
|
|
42
|
-
accountId: z.ZodString;
|
|
43
|
-
userId: z.ZodCoercedString<unknown>;
|
|
44
|
-
accessToken: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
45
|
-
refreshToken: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
46
|
-
idToken: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
47
|
-
accessTokenExpiresAt: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
|
|
48
|
-
refreshTokenExpiresAt: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
|
|
49
|
-
scope: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
50
|
-
password: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
51
|
-
}, z.core.$strip>;
|
|
52
|
-
/**
|
|
53
|
-
* Account schema type used by better-auth, note that it's possible that account could have additional fields
|
|
54
|
-
*
|
|
55
|
-
* todo: we should use generics to extend this type with additional fields from plugins and options in the future
|
|
56
|
-
*/
|
|
57
|
-
type Account = z.infer<typeof accountSchema>;
|
|
58
|
-
|
|
59
|
-
declare const sessionSchema: z.ZodObject<{
|
|
60
|
-
id: z.ZodString;
|
|
61
|
-
createdAt: z.ZodDefault<z.ZodDate>;
|
|
62
|
-
updatedAt: z.ZodDefault<z.ZodDate>;
|
|
63
|
-
userId: z.ZodCoercedString<unknown>;
|
|
64
|
-
expiresAt: z.ZodDate;
|
|
65
|
-
token: z.ZodString;
|
|
66
|
-
ipAddress: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
67
|
-
userAgent: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
68
|
-
}, z.core.$strip>;
|
|
69
|
-
/**
|
|
70
|
-
* Session schema type used by better-auth, note that it's possible that session could have additional fields
|
|
71
|
-
*
|
|
72
|
-
* todo: we should use generics to extend this type with additional fields from plugins and options in the future
|
|
73
|
-
*/
|
|
74
|
-
type Session = z.infer<typeof sessionSchema>;
|
|
75
|
-
|
|
76
|
-
declare const verificationSchema: z.ZodObject<{
|
|
77
|
-
id: z.ZodString;
|
|
78
|
-
createdAt: z.ZodDefault<z.ZodDate>;
|
|
79
|
-
updatedAt: z.ZodDefault<z.ZodDate>;
|
|
80
|
-
value: z.ZodString;
|
|
81
|
-
expiresAt: z.ZodDate;
|
|
82
|
-
identifier: z.ZodString;
|
|
83
|
-
}, z.core.$strip>;
|
|
84
|
-
/**
|
|
85
|
-
* Verification schema type used by better-auth, note that it's possible that verification could have additional fields
|
|
86
|
-
*
|
|
87
|
-
* todo: we should use generics to extend this type with additional fields from plugins and options in the future
|
|
88
|
-
*/
|
|
89
|
-
type Verification = z.infer<typeof verificationSchema>;
|
|
90
|
-
|
|
91
|
-
declare const rateLimitSchema: z.ZodObject<{
|
|
92
|
-
key: z.ZodString;
|
|
93
|
-
count: z.ZodNumber;
|
|
94
|
-
lastRequest: z.ZodNumber;
|
|
95
|
-
}, z.core.$strip>;
|
|
96
|
-
/**
|
|
97
|
-
* Rate limit schema type used by better-auth for rate limiting
|
|
98
|
-
*/
|
|
99
|
-
type RateLimit = z.infer<typeof rateLimitSchema>;
|
|
100
|
-
|
|
101
13
|
/**
|
|
102
14
|
* @deprecated Backport for 1.3.x, we will remove this in 1.4.x
|
|
103
15
|
*/
|
|
@@ -123,5 +35,5 @@ type Primitive = DBPrimitive;
|
|
|
123
35
|
*/
|
|
124
36
|
type BetterAuthDbSchema = BetterAuthDBSchema;
|
|
125
37
|
|
|
126
|
-
export { BetterAuthDBSchema, DBFieldAttribute, DBFieldAttributeConfig, DBFieldType, DBPrimitive,
|
|
127
|
-
export type {
|
|
38
|
+
export { BetterAuthDBSchema, BetterAuthPluginDBSchema, DBFieldAttribute, DBFieldAttributeConfig, DBFieldType, DBPrimitive, coreSchema };
|
|
39
|
+
export type { AuthPluginSchema, BetterAuthDbSchema, FieldAttribute, FieldAttributeConfig, FieldType, Primitive };
|
package/dist/db/index.d.ts
CHANGED
|
@@ -1,16 +1,8 @@
|
|
|
1
|
-
import { D as DBFieldAttribute,
|
|
2
|
-
export { S as SecondaryStorage } from '../shared/core.
|
|
1
|
+
import { D as DBFieldAttribute, a as DBFieldAttributeConfig, b as DBFieldType, c as DBPrimitive, B as BetterAuthDBSchema } from '../shared/core.CPuIItYE.js';
|
|
2
|
+
export { A as Account, d as DBPreservedModels, R as RateLimit, S as SecondaryStorage, f as Session, U as User, V as Verification, e as accountSchema, r as rateLimitSchema, s as sessionSchema, u as userSchema, v as verificationSchema } from '../shared/core.CPuIItYE.js';
|
|
3
|
+
import { B as BetterAuthPluginDBSchema } from '../shared/core.2rWMW9q9.js';
|
|
3
4
|
import * as z from 'zod';
|
|
4
|
-
|
|
5
|
-
type BetterAuthPluginDBSchema = {
|
|
6
|
-
[table in string]: {
|
|
7
|
-
fields: {
|
|
8
|
-
[field in string]: DBFieldAttribute;
|
|
9
|
-
};
|
|
10
|
-
disableMigration?: boolean;
|
|
11
|
-
modelName?: string;
|
|
12
|
-
};
|
|
13
|
-
};
|
|
5
|
+
import '../shared/core.MjcDoj7R.js';
|
|
14
6
|
|
|
15
7
|
declare const coreSchema: z.ZodObject<{
|
|
16
8
|
id: z.ZodString;
|
|
@@ -18,86 +10,6 @@ declare const coreSchema: z.ZodObject<{
|
|
|
18
10
|
updatedAt: z.ZodDefault<z.ZodDate>;
|
|
19
11
|
}, z.core.$strip>;
|
|
20
12
|
|
|
21
|
-
declare const userSchema: z.ZodObject<{
|
|
22
|
-
id: z.ZodString;
|
|
23
|
-
createdAt: z.ZodDefault<z.ZodDate>;
|
|
24
|
-
updatedAt: z.ZodDefault<z.ZodDate>;
|
|
25
|
-
email: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
|
|
26
|
-
emailVerified: z.ZodDefault<z.ZodBoolean>;
|
|
27
|
-
name: z.ZodString;
|
|
28
|
-
image: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
29
|
-
}, z.core.$strip>;
|
|
30
|
-
/**
|
|
31
|
-
* User schema type used by better-auth, note that it's possible that user could have additional fields
|
|
32
|
-
*
|
|
33
|
-
* todo: we should use generics to extend this type with additional fields from plugins and options in the future
|
|
34
|
-
*/
|
|
35
|
-
type User = z.infer<typeof userSchema>;
|
|
36
|
-
|
|
37
|
-
declare const accountSchema: z.ZodObject<{
|
|
38
|
-
id: z.ZodString;
|
|
39
|
-
createdAt: z.ZodDefault<z.ZodDate>;
|
|
40
|
-
updatedAt: z.ZodDefault<z.ZodDate>;
|
|
41
|
-
providerId: z.ZodString;
|
|
42
|
-
accountId: z.ZodString;
|
|
43
|
-
userId: z.ZodCoercedString<unknown>;
|
|
44
|
-
accessToken: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
45
|
-
refreshToken: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
46
|
-
idToken: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
47
|
-
accessTokenExpiresAt: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
|
|
48
|
-
refreshTokenExpiresAt: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
|
|
49
|
-
scope: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
50
|
-
password: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
51
|
-
}, z.core.$strip>;
|
|
52
|
-
/**
|
|
53
|
-
* Account schema type used by better-auth, note that it's possible that account could have additional fields
|
|
54
|
-
*
|
|
55
|
-
* todo: we should use generics to extend this type with additional fields from plugins and options in the future
|
|
56
|
-
*/
|
|
57
|
-
type Account = z.infer<typeof accountSchema>;
|
|
58
|
-
|
|
59
|
-
declare const sessionSchema: z.ZodObject<{
|
|
60
|
-
id: z.ZodString;
|
|
61
|
-
createdAt: z.ZodDefault<z.ZodDate>;
|
|
62
|
-
updatedAt: z.ZodDefault<z.ZodDate>;
|
|
63
|
-
userId: z.ZodCoercedString<unknown>;
|
|
64
|
-
expiresAt: z.ZodDate;
|
|
65
|
-
token: z.ZodString;
|
|
66
|
-
ipAddress: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
67
|
-
userAgent: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
68
|
-
}, z.core.$strip>;
|
|
69
|
-
/**
|
|
70
|
-
* Session schema type used by better-auth, note that it's possible that session could have additional fields
|
|
71
|
-
*
|
|
72
|
-
* todo: we should use generics to extend this type with additional fields from plugins and options in the future
|
|
73
|
-
*/
|
|
74
|
-
type Session = z.infer<typeof sessionSchema>;
|
|
75
|
-
|
|
76
|
-
declare const verificationSchema: z.ZodObject<{
|
|
77
|
-
id: z.ZodString;
|
|
78
|
-
createdAt: z.ZodDefault<z.ZodDate>;
|
|
79
|
-
updatedAt: z.ZodDefault<z.ZodDate>;
|
|
80
|
-
value: z.ZodString;
|
|
81
|
-
expiresAt: z.ZodDate;
|
|
82
|
-
identifier: z.ZodString;
|
|
83
|
-
}, z.core.$strip>;
|
|
84
|
-
/**
|
|
85
|
-
* Verification schema type used by better-auth, note that it's possible that verification could have additional fields
|
|
86
|
-
*
|
|
87
|
-
* todo: we should use generics to extend this type with additional fields from plugins and options in the future
|
|
88
|
-
*/
|
|
89
|
-
type Verification = z.infer<typeof verificationSchema>;
|
|
90
|
-
|
|
91
|
-
declare const rateLimitSchema: z.ZodObject<{
|
|
92
|
-
key: z.ZodString;
|
|
93
|
-
count: z.ZodNumber;
|
|
94
|
-
lastRequest: z.ZodNumber;
|
|
95
|
-
}, z.core.$strip>;
|
|
96
|
-
/**
|
|
97
|
-
* Rate limit schema type used by better-auth for rate limiting
|
|
98
|
-
*/
|
|
99
|
-
type RateLimit = z.infer<typeof rateLimitSchema>;
|
|
100
|
-
|
|
101
13
|
/**
|
|
102
14
|
* @deprecated Backport for 1.3.x, we will remove this in 1.4.x
|
|
103
15
|
*/
|
|
@@ -123,5 +35,5 @@ type Primitive = DBPrimitive;
|
|
|
123
35
|
*/
|
|
124
36
|
type BetterAuthDbSchema = BetterAuthDBSchema;
|
|
125
37
|
|
|
126
|
-
export { BetterAuthDBSchema, DBFieldAttribute, DBFieldAttributeConfig, DBFieldType, DBPrimitive,
|
|
127
|
-
export type {
|
|
38
|
+
export { BetterAuthDBSchema, BetterAuthPluginDBSchema, DBFieldAttribute, DBFieldAttributeConfig, DBFieldType, DBPrimitive, coreSchema };
|
|
39
|
+
export type { AuthPluginSchema, BetterAuthDbSchema, FieldAttribute, FieldAttributeConfig, FieldType, Primitive };
|
package/dist/env/index.d.cts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
export { I as InternalLogger, d as LogHandlerParams, b as LogLevel, L as Logger, T as TTY_COLORS, c as createLogger, a as levels, l as logger, s as shouldPublishLog } from '../shared/core.BwoNUcJQ.cjs';
|
|
2
|
+
|
|
1
3
|
type EnvObject = Record<string, string | undefined>;
|
|
2
4
|
declare const env: EnvObject;
|
|
3
5
|
declare const nodeENV: string;
|
|
@@ -30,56 +32,5 @@ declare const ENV: Readonly<{
|
|
|
30
32
|
|
|
31
33
|
declare function getColorDepth(): number;
|
|
32
34
|
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
readonly bright: "\u001B[1m";
|
|
36
|
-
readonly dim: "\u001B[2m";
|
|
37
|
-
readonly undim: "\u001B[22m";
|
|
38
|
-
readonly underscore: "\u001B[4m";
|
|
39
|
-
readonly blink: "\u001B[5m";
|
|
40
|
-
readonly reverse: "\u001B[7m";
|
|
41
|
-
readonly hidden: "\u001B[8m";
|
|
42
|
-
readonly fg: {
|
|
43
|
-
readonly black: "\u001B[30m";
|
|
44
|
-
readonly red: "\u001B[31m";
|
|
45
|
-
readonly green: "\u001B[32m";
|
|
46
|
-
readonly yellow: "\u001B[33m";
|
|
47
|
-
readonly blue: "\u001B[34m";
|
|
48
|
-
readonly magenta: "\u001B[35m";
|
|
49
|
-
readonly cyan: "\u001B[36m";
|
|
50
|
-
readonly white: "\u001B[37m";
|
|
51
|
-
};
|
|
52
|
-
readonly bg: {
|
|
53
|
-
readonly black: "\u001B[40m";
|
|
54
|
-
readonly red: "\u001B[41m";
|
|
55
|
-
readonly green: "\u001B[42m";
|
|
56
|
-
readonly yellow: "\u001B[43m";
|
|
57
|
-
readonly blue: "\u001B[44m";
|
|
58
|
-
readonly magenta: "\u001B[45m";
|
|
59
|
-
readonly cyan: "\u001B[46m";
|
|
60
|
-
readonly white: "\u001B[47m";
|
|
61
|
-
};
|
|
62
|
-
};
|
|
63
|
-
type LogLevel = "info" | "success" | "warn" | "error" | "debug";
|
|
64
|
-
declare const levels: readonly ["info", "success", "warn", "error", "debug"];
|
|
65
|
-
declare function shouldPublishLog(currentLogLevel: LogLevel, logLevel: LogLevel): boolean;
|
|
66
|
-
interface Logger {
|
|
67
|
-
disabled?: boolean;
|
|
68
|
-
disableColors?: boolean;
|
|
69
|
-
level?: Exclude<LogLevel, "success">;
|
|
70
|
-
log?: (level: Exclude<LogLevel, "success">, message: string, ...args: any[]) => void;
|
|
71
|
-
}
|
|
72
|
-
type LogHandlerParams = Parameters<NonNullable<Logger["log"]>> extends [
|
|
73
|
-
LogLevel,
|
|
74
|
-
...infer Rest
|
|
75
|
-
] ? Rest : never;
|
|
76
|
-
type InternalLogger = {
|
|
77
|
-
[K in LogLevel]: (...params: LogHandlerParams) => void;
|
|
78
|
-
} & {
|
|
79
|
-
get level(): LogLevel;
|
|
80
|
-
};
|
|
81
|
-
declare const createLogger: (options?: Logger) => InternalLogger;
|
|
82
|
-
declare const logger: InternalLogger;
|
|
83
|
-
|
|
84
|
-
export { ENV, TTY_COLORS, createLogger, env, getBooleanEnvVar, getColorDepth, getEnvVar, isDevelopment, isProduction, isTest, levels, logger, nodeENV, shouldPublishLog };
|
|
85
|
-
export type { EnvObject, InternalLogger, LogHandlerParams, LogLevel, Logger };
|
|
35
|
+
export { ENV, env, getBooleanEnvVar, getColorDepth, getEnvVar, isDevelopment, isProduction, isTest, nodeENV };
|
|
36
|
+
export type { EnvObject };
|