mirror of
https://github.com/better-auth/better-auth.git
synced 2026-05-23 07:18:56 -05:00
chore: use TypeScript project references (#5423)
This commit is contained in:
@@ -18,7 +18,7 @@
|
||||
"test": "turbo --filter \"./packages/*\" test",
|
||||
"e2e:smoke": "turbo --filter \"./e2e/*\" e2e:smoke",
|
||||
"e2e:integration": "turbo --filter \"./e2e/*\" e2e:integration",
|
||||
"typecheck": "turbo --filter \"./packages/*\" typecheck"
|
||||
"typecheck": "tsc --build"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@biomejs/biome": "2.2.4",
|
||||
|
||||
@@ -32,6 +32,7 @@
|
||||
"module": "./dist/index.js",
|
||||
"exports": {
|
||||
".": {
|
||||
"better-auth-dev-source": "./src/index.ts",
|
||||
"import": {
|
||||
"types": "./dist/index.d.ts",
|
||||
"default": "./dist/index.js"
|
||||
@@ -42,6 +43,7 @@
|
||||
}
|
||||
},
|
||||
"./social-providers": {
|
||||
"better-auth-dev-source": "./src/social-providers/index.ts",
|
||||
"import": {
|
||||
"types": "./dist/social-providers/index.d.ts",
|
||||
"default": "./dist/social-providers/index.js"
|
||||
@@ -52,6 +54,7 @@
|
||||
}
|
||||
},
|
||||
"./client": {
|
||||
"better-auth-dev-source": "./src/client/index.ts",
|
||||
"import": {
|
||||
"types": "./dist/client/index.d.ts",
|
||||
"default": "./dist/client/index.js"
|
||||
@@ -62,6 +65,7 @@
|
||||
}
|
||||
},
|
||||
"./client/plugins": {
|
||||
"better-auth-dev-source": "./src/client/plugins/index.ts",
|
||||
"import": {
|
||||
"types": "./dist/client/plugins/index.d.ts",
|
||||
"default": "./dist/client/plugins/index.js"
|
||||
@@ -72,6 +76,7 @@
|
||||
}
|
||||
},
|
||||
"./types": {
|
||||
"better-auth-dev-source": "./src/types/index.ts",
|
||||
"import": {
|
||||
"types": "./dist/types/index.d.ts",
|
||||
"default": "./dist/types/index.js"
|
||||
@@ -82,6 +87,7 @@
|
||||
}
|
||||
},
|
||||
"./crypto": {
|
||||
"better-auth-dev-source": "./src/crypto/index.ts",
|
||||
"import": {
|
||||
"types": "./dist/crypto/index.d.ts",
|
||||
"default": "./dist/crypto/index.js"
|
||||
@@ -92,6 +98,7 @@
|
||||
}
|
||||
},
|
||||
"./cookies": {
|
||||
"better-auth-dev-source": "./src/cookies/index.ts",
|
||||
"import": {
|
||||
"types": "./dist/cookies/index.d.ts",
|
||||
"default": "./dist/cookies/index.js"
|
||||
@@ -102,6 +109,7 @@
|
||||
}
|
||||
},
|
||||
"./oauth2": {
|
||||
"better-auth-dev-source": "./src/oauth2/index.ts",
|
||||
"import": {
|
||||
"types": "./dist/oauth2/index.d.ts",
|
||||
"default": "./dist/oauth2/index.js"
|
||||
@@ -112,6 +120,7 @@
|
||||
}
|
||||
},
|
||||
"./react": {
|
||||
"better-auth-dev-source": "./src/client/react/index.ts",
|
||||
"import": {
|
||||
"types": "./dist/client/react/index.d.ts",
|
||||
"default": "./dist/client/react/index.js"
|
||||
@@ -122,6 +131,7 @@
|
||||
}
|
||||
},
|
||||
"./solid": {
|
||||
"better-auth-dev-source": "./src/client/solid/index.ts",
|
||||
"import": {
|
||||
"types": "./dist/client/solid/index.d.ts",
|
||||
"default": "./dist/client/solid/index.js"
|
||||
@@ -132,6 +142,7 @@
|
||||
}
|
||||
},
|
||||
"./lynx": {
|
||||
"better-auth-dev-source": "./src/client/lynx/index.ts",
|
||||
"import": {
|
||||
"types": "./dist/client/lynx/index.d.ts",
|
||||
"default": "./dist/client/lynx/index.js"
|
||||
@@ -142,6 +153,7 @@
|
||||
}
|
||||
},
|
||||
"./test": {
|
||||
"better-auth-dev-source": "./src/test-utils/index.ts",
|
||||
"import": {
|
||||
"types": "./dist/test-utils/index.d.ts",
|
||||
"default": "./dist/test-utils/index.js"
|
||||
@@ -152,6 +164,7 @@
|
||||
}
|
||||
},
|
||||
"./api": {
|
||||
"better-auth-dev-source": "./src/api/index.ts",
|
||||
"import": {
|
||||
"types": "./dist/api/index.d.ts",
|
||||
"default": "./dist/api/index.js"
|
||||
@@ -162,6 +175,7 @@
|
||||
}
|
||||
},
|
||||
"./db": {
|
||||
"better-auth-dev-source": "./src/db/index.ts",
|
||||
"import": {
|
||||
"types": "./dist/db/index.d.ts",
|
||||
"default": "./dist/db/index.js"
|
||||
@@ -172,6 +186,7 @@
|
||||
}
|
||||
},
|
||||
"./vue": {
|
||||
"better-auth-dev-source": "./src/client/vue/index.ts",
|
||||
"import": {
|
||||
"types": "./dist/client/vue/index.d.ts",
|
||||
"default": "./dist/client/vue/index.js"
|
||||
@@ -182,6 +197,7 @@
|
||||
}
|
||||
},
|
||||
"./plugins": {
|
||||
"better-auth-dev-source": "./src/plugins/index.ts",
|
||||
"import": {
|
||||
"types": "./dist/plugins/index.d.ts",
|
||||
"default": "./dist/plugins/index.js"
|
||||
@@ -192,6 +208,7 @@
|
||||
}
|
||||
},
|
||||
"./svelte-kit": {
|
||||
"better-auth-dev-source": "./src/integrations/svelte-kit.ts",
|
||||
"import": {
|
||||
"types": "./dist/integrations/svelte-kit.d.ts",
|
||||
"default": "./dist/integrations/svelte-kit.js"
|
||||
@@ -202,6 +219,7 @@
|
||||
}
|
||||
},
|
||||
"./solid-start": {
|
||||
"better-auth-dev-source": "./src/integrations/solid-start.ts",
|
||||
"import": {
|
||||
"types": "./dist/integrations/solid-start.d.ts",
|
||||
"default": "./dist/integrations/solid-start.js"
|
||||
@@ -212,6 +230,7 @@
|
||||
}
|
||||
},
|
||||
"./svelte": {
|
||||
"better-auth-dev-source": "./src/client/svelte/index.ts",
|
||||
"import": {
|
||||
"types": "./dist/client/svelte/index.d.ts",
|
||||
"default": "./dist/client/svelte/index.js"
|
||||
@@ -222,6 +241,7 @@
|
||||
}
|
||||
},
|
||||
"./next-js": {
|
||||
"better-auth-dev-source": "./src/integrations/next-js.ts",
|
||||
"import": {
|
||||
"types": "./dist/integrations/next-js.d.ts",
|
||||
"default": "./dist/integrations/next-js.js"
|
||||
@@ -232,6 +252,7 @@
|
||||
}
|
||||
},
|
||||
"./react-start": {
|
||||
"better-auth-dev-source": "./src/integrations/react-start.ts",
|
||||
"import": {
|
||||
"types": "./dist/integrations/react-start.d.ts",
|
||||
"default": "./dist/integrations/react-start.js"
|
||||
@@ -242,6 +263,7 @@
|
||||
}
|
||||
},
|
||||
"./node": {
|
||||
"better-auth-dev-source": "./src/integrations/node.ts",
|
||||
"import": {
|
||||
"types": "./dist/integrations/node.d.ts",
|
||||
"default": "./dist/integrations/node.js"
|
||||
@@ -252,6 +274,7 @@
|
||||
}
|
||||
},
|
||||
"./adapters/prisma": {
|
||||
"better-auth-dev-source": "./src/adapters/prisma-adapter/index.ts",
|
||||
"import": {
|
||||
"types": "./dist/adapters/prisma-adapter/index.d.ts",
|
||||
"default": "./dist/adapters/prisma-adapter/index.js"
|
||||
@@ -262,6 +285,7 @@
|
||||
}
|
||||
},
|
||||
"./adapters/drizzle": {
|
||||
"better-auth-dev-source": "./src/adapters/drizzle-adapter/index.ts",
|
||||
"import": {
|
||||
"types": "./dist/adapters/drizzle-adapter/index.d.ts",
|
||||
"default": "./dist/adapters/drizzle-adapter/index.js"
|
||||
@@ -272,6 +296,7 @@
|
||||
}
|
||||
},
|
||||
"./adapters/mongodb": {
|
||||
"better-auth-dev-source": "./src/adapters/mongodb-adapter/index.ts",
|
||||
"import": {
|
||||
"types": "./dist/adapters/mongodb-adapter/index.d.ts",
|
||||
"default": "./dist/adapters/mongodb-adapter/index.js"
|
||||
@@ -282,6 +307,7 @@
|
||||
}
|
||||
},
|
||||
"./adapters/memory": {
|
||||
"better-auth-dev-source": "./src/adapters/memory-adapter/index.ts",
|
||||
"import": {
|
||||
"types": "./dist/adapters/memory-adapter/index.d.ts",
|
||||
"default": "./dist/adapters/memory-adapter/index.js"
|
||||
@@ -292,6 +318,7 @@
|
||||
}
|
||||
},
|
||||
"./adapters/test": {
|
||||
"better-auth-dev-source": "./src/adapters/test.ts",
|
||||
"import": {
|
||||
"types": "./dist/adapters/test.d.ts",
|
||||
"default": "./dist/adapters/test.js"
|
||||
@@ -302,6 +329,7 @@
|
||||
}
|
||||
},
|
||||
"./adapters": {
|
||||
"better-auth-dev-source": "./src/adapters/index.ts",
|
||||
"import": {
|
||||
"types": "./dist/adapters/index.d.ts",
|
||||
"default": "./dist/adapters/index.js"
|
||||
@@ -312,6 +340,7 @@
|
||||
}
|
||||
},
|
||||
"./plugins/access": {
|
||||
"better-auth-dev-source": "./src/plugins/access/index.ts",
|
||||
"import": {
|
||||
"types": "./dist/plugins/access/index.d.ts",
|
||||
"default": "./dist/plugins/access/index.js"
|
||||
@@ -322,6 +351,7 @@
|
||||
}
|
||||
},
|
||||
"./plugins/admin": {
|
||||
"better-auth-dev-source": "./src/plugins/admin/index.ts",
|
||||
"import": {
|
||||
"types": "./dist/plugins/admin/index.d.ts",
|
||||
"default": "./dist/plugins/admin/index.js"
|
||||
@@ -332,6 +362,7 @@
|
||||
}
|
||||
},
|
||||
"./plugins/admin/access": {
|
||||
"better-auth-dev-source": "./src/plugins/admin/access/index.ts",
|
||||
"import": {
|
||||
"types": "./dist/plugins/admin/access/index.d.ts",
|
||||
"default": "./dist/plugins/admin/access/index.js"
|
||||
@@ -342,6 +373,7 @@
|
||||
}
|
||||
},
|
||||
"./plugins/anonymous": {
|
||||
"better-auth-dev-source": "./src/plugins/anonymous/index.ts",
|
||||
"import": {
|
||||
"types": "./dist/plugins/anonymous/index.d.ts",
|
||||
"default": "./dist/plugins/anonymous/index.js"
|
||||
@@ -352,6 +384,7 @@
|
||||
}
|
||||
},
|
||||
"./plugins/bearer": {
|
||||
"better-auth-dev-source": "./src/plugins/bearer/index.ts",
|
||||
"import": {
|
||||
"types": "./dist/plugins/bearer/index.d.ts",
|
||||
"default": "./dist/plugins/bearer/index.js"
|
||||
@@ -362,6 +395,7 @@
|
||||
}
|
||||
},
|
||||
"./plugins/custom-session": {
|
||||
"better-auth-dev-source": "./src/plugins/custom-session/index.ts",
|
||||
"import": {
|
||||
"types": "./dist/plugins/custom-session/index.d.ts",
|
||||
"default": "./dist/plugins/custom-session/index.js"
|
||||
@@ -372,6 +406,7 @@
|
||||
}
|
||||
},
|
||||
"./plugins/email-otp": {
|
||||
"better-auth-dev-source": "./src/plugins/email-otp/index.ts",
|
||||
"import": {
|
||||
"types": "./dist/plugins/email-otp/index.d.ts",
|
||||
"default": "./dist/plugins/email-otp/index.js"
|
||||
@@ -382,6 +417,7 @@
|
||||
}
|
||||
},
|
||||
"./plugins/generic-oauth": {
|
||||
"better-auth-dev-source": "./src/plugins/generic-oauth/index.ts",
|
||||
"import": {
|
||||
"types": "./dist/plugins/generic-oauth/index.d.ts",
|
||||
"default": "./dist/plugins/generic-oauth/index.js"
|
||||
@@ -392,6 +428,7 @@
|
||||
}
|
||||
},
|
||||
"./plugins/jwt": {
|
||||
"better-auth-dev-source": "./src/plugins/jwt/index.ts",
|
||||
"import": {
|
||||
"types": "./dist/plugins/jwt/index.d.ts",
|
||||
"default": "./dist/plugins/jwt/index.js"
|
||||
@@ -402,6 +439,7 @@
|
||||
}
|
||||
},
|
||||
"./plugins/haveibeenpwned": {
|
||||
"better-auth-dev-source": "./src/plugins/haveibeenpwned/index.ts",
|
||||
"import": {
|
||||
"types": "./dist/plugins/haveibeenpwned/index.d.ts",
|
||||
"default": "./dist/plugins/haveibeenpwned/index.js"
|
||||
@@ -412,6 +450,7 @@
|
||||
}
|
||||
},
|
||||
"./plugins/oidc-provider": {
|
||||
"better-auth-dev-source": "./src/plugins/oidc-provider/index.ts",
|
||||
"import": {
|
||||
"types": "./dist/plugins/oidc-provider/index.d.ts",
|
||||
"default": "./dist/plugins/oidc-provider/index.js"
|
||||
@@ -422,6 +461,7 @@
|
||||
}
|
||||
},
|
||||
"./plugins/magic-link": {
|
||||
"better-auth-dev-source": "./src/plugins/magic-link/index.ts",
|
||||
"import": {
|
||||
"types": "./dist/plugins/magic-link/index.d.ts",
|
||||
"default": "./dist/plugins/magic-link/index.js"
|
||||
@@ -432,6 +472,7 @@
|
||||
}
|
||||
},
|
||||
"./plugins/multi-session": {
|
||||
"better-auth-dev-source": "./src/plugins/multi-session/index.ts",
|
||||
"import": {
|
||||
"types": "./dist/plugins/multi-session/index.d.ts",
|
||||
"default": "./dist/plugins/multi-session/index.js"
|
||||
@@ -442,6 +483,7 @@
|
||||
}
|
||||
},
|
||||
"./plugins/oauth-proxy": {
|
||||
"better-auth-dev-source": "./src/plugins/oauth-proxy/index.ts",
|
||||
"import": {
|
||||
"types": "./dist/plugins/oauth-proxy/index.d.ts",
|
||||
"default": "./dist/plugins/oauth-proxy/index.js"
|
||||
@@ -452,6 +494,7 @@
|
||||
}
|
||||
},
|
||||
"./plugins/organization": {
|
||||
"better-auth-dev-source": "./src/plugins/organization/index.ts",
|
||||
"import": {
|
||||
"types": "./dist/plugins/organization/index.d.ts",
|
||||
"default": "./dist/plugins/organization/index.js"
|
||||
@@ -462,6 +505,7 @@
|
||||
}
|
||||
},
|
||||
"./plugins/organization/access": {
|
||||
"better-auth-dev-source": "./src/plugins/organization/access/index.ts",
|
||||
"import": {
|
||||
"types": "./dist/plugins/organization/access/index.d.ts",
|
||||
"default": "./dist/plugins/organization/access/index.js"
|
||||
@@ -472,6 +516,7 @@
|
||||
}
|
||||
},
|
||||
"./plugins/one-time-token": {
|
||||
"better-auth-dev-source": "./src/plugins/one-time-token/index.ts",
|
||||
"import": {
|
||||
"types": "./dist/plugins/one-time-token/index.d.ts",
|
||||
"default": "./dist/plugins/one-time-token/index.js"
|
||||
@@ -482,6 +527,7 @@
|
||||
}
|
||||
},
|
||||
"./plugins/passkey": {
|
||||
"better-auth-dev-source": "./src/plugins/passkey/index.ts",
|
||||
"import": {
|
||||
"types": "./dist/plugins/passkey/index.d.ts",
|
||||
"default": "./dist/plugins/passkey/index.js"
|
||||
@@ -492,6 +538,7 @@
|
||||
}
|
||||
},
|
||||
"./plugins/phone-number": {
|
||||
"better-auth-dev-source": "./src/plugins/phone-number/index.ts",
|
||||
"import": {
|
||||
"types": "./dist/plugins/phone-number/index.d.ts",
|
||||
"default": "./dist/plugins/phone-number/index.js"
|
||||
@@ -502,6 +549,7 @@
|
||||
}
|
||||
},
|
||||
"./plugins/two-factor": {
|
||||
"better-auth-dev-source": "./src/plugins/two-factor/index.ts",
|
||||
"import": {
|
||||
"types": "./dist/plugins/two-factor/index.d.ts",
|
||||
"default": "./dist/plugins/two-factor/index.js"
|
||||
@@ -512,6 +560,7 @@
|
||||
}
|
||||
},
|
||||
"./plugins/username": {
|
||||
"better-auth-dev-source": "./src/plugins/username/index.ts",
|
||||
"import": {
|
||||
"types": "./dist/plugins/username/index.d.ts",
|
||||
"default": "./dist/plugins/username/index.js"
|
||||
@@ -522,6 +571,7 @@
|
||||
}
|
||||
},
|
||||
"./plugins/siwe": {
|
||||
"better-auth-dev-source": "./src/plugins/siwe/index.ts",
|
||||
"import": {
|
||||
"types": "./dist/plugins/siwe/index.d.ts",
|
||||
"default": "./dist/plugins/siwe/index.js"
|
||||
@@ -532,6 +582,7 @@
|
||||
}
|
||||
},
|
||||
"./plugins/device-authorization": {
|
||||
"better-auth-dev-source": "./src/plugins/device-authorization/index.ts",
|
||||
"import": {
|
||||
"types": "./dist/plugins/device-authorization/index.d.ts",
|
||||
"default": "./dist/plugins/device-authorization/index.js"
|
||||
|
||||
@@ -1,10 +1,15 @@
|
||||
{
|
||||
"extends": "../../tsconfig.json",
|
||||
"extends": "../../tsconfig.base.json",
|
||||
"compilerOptions": {
|
||||
"rootDir": "./src",
|
||||
"outDir": "./dist",
|
||||
"lib": ["esnext", "dom", "dom.iterable"],
|
||||
"types": ["node", "bun"]
|
||||
},
|
||||
"include": ["src"]
|
||||
"references": [
|
||||
{
|
||||
"path": "../core/tsconfig.json"
|
||||
},
|
||||
{
|
||||
"path": "../telemetry/tsconfig.json"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { defineConfig } from "tsdown";
|
||||
|
||||
export default defineConfig({
|
||||
dts: true,
|
||||
dts: { build: true, incremental: true },
|
||||
format: ["esm", "cjs"],
|
||||
entry: [
|
||||
"./src/index.ts",
|
||||
|
||||
@@ -1,9 +1,11 @@
|
||||
{
|
||||
"extends": "../../tsconfig.json",
|
||||
"extends": "../../tsconfig.base.json",
|
||||
"compilerOptions": {
|
||||
"rootDir": "./src",
|
||||
"outDir": "./dist",
|
||||
"lib": ["esnext", "dom", "dom.iterable"]
|
||||
},
|
||||
"include": ["src"]
|
||||
"references": [
|
||||
{
|
||||
"path": "../better-auth/tsconfig.json"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -1,15 +0,0 @@
|
||||
{
|
||||
"extends": "../../tsconfig.json",
|
||||
"compilerOptions": {
|
||||
"rootDir": ".",
|
||||
"outDir": "./node_modules/.cache/test",
|
||||
"tsBuildInfoFile": "tsconfig.test.tsbuildinfo",
|
||||
"lib": ["esnext", "dom", "dom.iterable"]
|
||||
},
|
||||
"references": [
|
||||
{
|
||||
"path": "../better-auth/tsconfig.json"
|
||||
}
|
||||
],
|
||||
"include": ["test", "src"]
|
||||
}
|
||||
@@ -7,6 +7,7 @@
|
||||
"module": "./dist/index.js",
|
||||
"exports": {
|
||||
".": {
|
||||
"better-auth-dev-source": "./src/index.ts",
|
||||
"import": {
|
||||
"types": "./dist/index.d.ts",
|
||||
"default": "./dist/index.js"
|
||||
@@ -17,6 +18,7 @@
|
||||
}
|
||||
},
|
||||
"./api": {
|
||||
"better-auth-dev-source": "./src/api/index.ts",
|
||||
"import": {
|
||||
"types": "./dist/api/index.d.ts",
|
||||
"default": "./dist/api/index.js"
|
||||
@@ -27,6 +29,7 @@
|
||||
}
|
||||
},
|
||||
"./async_hooks": {
|
||||
"better-auth-dev-source": "./src/async_hooks/index.ts",
|
||||
"import": {
|
||||
"types": "./dist/async_hooks/index.d.ts",
|
||||
"default": "./dist/async_hooks/index.js"
|
||||
@@ -37,6 +40,7 @@
|
||||
}
|
||||
},
|
||||
"./context": {
|
||||
"better-auth-dev-source": "./src/context/index.ts",
|
||||
"import": {
|
||||
"types": "./dist/context/index.d.ts",
|
||||
"default": "./dist/context/index.js"
|
||||
@@ -47,6 +51,7 @@
|
||||
}
|
||||
},
|
||||
"./env": {
|
||||
"better-auth-dev-source": "./src/env/index.ts",
|
||||
"import": {
|
||||
"types": "./dist/env/index.d.ts",
|
||||
"default": "./dist/env/index.js"
|
||||
@@ -57,6 +62,7 @@
|
||||
}
|
||||
},
|
||||
"./error": {
|
||||
"better-auth-dev-source": "./src/error/index.ts",
|
||||
"import": {
|
||||
"types": "./dist/error/index.d.ts",
|
||||
"default": "./dist/error/index.js"
|
||||
@@ -67,6 +73,7 @@
|
||||
}
|
||||
},
|
||||
"./utils": {
|
||||
"better-auth-dev-source": "./src/utils/index.ts",
|
||||
"import": {
|
||||
"types": "./dist/utils/index.d.ts",
|
||||
"default": "./dist/utils/index.js"
|
||||
@@ -77,6 +84,7 @@
|
||||
}
|
||||
},
|
||||
"./social-providers": {
|
||||
"better-auth-dev-source": "./src/social-providers/index.ts",
|
||||
"import": {
|
||||
"types": "./dist/social-providers/index.d.ts",
|
||||
"default": "./dist/social-providers/index.js"
|
||||
@@ -87,6 +95,7 @@
|
||||
}
|
||||
},
|
||||
"./db": {
|
||||
"better-auth-dev-source": "./src/db/index.ts",
|
||||
"import": {
|
||||
"types": "./dist/db/index.d.ts",
|
||||
"default": "./dist/db/index.js"
|
||||
@@ -97,6 +106,7 @@
|
||||
}
|
||||
},
|
||||
"./db/adapter": {
|
||||
"better-auth-dev-source": "./src/db/adapter/index.ts",
|
||||
"import": {
|
||||
"types": "./dist/db/adapter/index.d.ts",
|
||||
"default": "./dist/db/adapter/index.js"
|
||||
@@ -107,6 +117,7 @@
|
||||
}
|
||||
},
|
||||
"./oauth2": {
|
||||
"better-auth-dev-source": "./src/oauth2/index.ts",
|
||||
"import": {
|
||||
"types": "./dist/oauth2/index.d.ts",
|
||||
"default": "./dist/oauth2/index.js"
|
||||
|
||||
@@ -1,10 +1,7 @@
|
||||
{
|
||||
"extends": "../../tsconfig.json",
|
||||
"extends": "../../tsconfig.base.json",
|
||||
"compilerOptions": {
|
||||
"rootDir": "./src",
|
||||
"outDir": "./dist",
|
||||
"lib": ["esnext", "dom", "dom.iterable"],
|
||||
"types": ["node"]
|
||||
},
|
||||
"include": ["src"]
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { defineConfig } from "tsdown";
|
||||
|
||||
export default defineConfig({
|
||||
dts: true,
|
||||
dts: { build: true, incremental: true },
|
||||
format: ["esm", "cjs"],
|
||||
entry: [
|
||||
"./src/index.ts",
|
||||
|
||||
@@ -19,11 +19,13 @@
|
||||
},
|
||||
"exports": {
|
||||
".": {
|
||||
"better-auth-dev-source": "./src/index.ts",
|
||||
"types": "./dist/index.d.ts",
|
||||
"import": "./dist/index.js",
|
||||
"require": "./dist/index.cjs"
|
||||
},
|
||||
"./client": {
|
||||
"better-auth-dev-source": "./src/client.ts",
|
||||
"types": "./dist/client.d.ts",
|
||||
"import": "./dist/client.js",
|
||||
"require": "./dist/client.cjs"
|
||||
|
||||
@@ -1,9 +1,11 @@
|
||||
{
|
||||
"extends": "../../tsconfig.json",
|
||||
"extends": "../../tsconfig.base.json",
|
||||
"compilerOptions": {
|
||||
"rootDir": "./src",
|
||||
"outDir": "./dist",
|
||||
"lib": ["esnext", "dom", "dom.iterable"]
|
||||
},
|
||||
"include": ["src"]
|
||||
"references": [
|
||||
{
|
||||
"path": "../better-auth/tsconfig.json"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { defineConfig } from "tsdown";
|
||||
|
||||
export default defineConfig({
|
||||
dts: true,
|
||||
dts: { build: true, incremental: true },
|
||||
format: ["esm", "cjs"],
|
||||
entry: ["./src/index.ts", "./src/client.ts"],
|
||||
external: [
|
||||
|
||||
@@ -30,11 +30,13 @@
|
||||
},
|
||||
"exports": {
|
||||
".": {
|
||||
"better-auth-dev-source": "./src/index.ts",
|
||||
"types": "./dist/index.d.ts",
|
||||
"import": "./dist/index.js",
|
||||
"require": "./dist/index.cjs"
|
||||
},
|
||||
"./client": {
|
||||
"better-auth-dev-source": "./src/client.ts",
|
||||
"types": "./dist/client.d.ts",
|
||||
"import": "./dist/client.js",
|
||||
"require": "./dist/client.cjs"
|
||||
|
||||
@@ -1,9 +1,11 @@
|
||||
{
|
||||
"extends": "../../tsconfig.json",
|
||||
"extends": "../../tsconfig.base.json",
|
||||
"compilerOptions": {
|
||||
"rootDir": "./src",
|
||||
"outDir": "./dist",
|
||||
"lib": ["esnext", "dom", "dom.iterable"]
|
||||
},
|
||||
"include": ["src"]
|
||||
"references": [
|
||||
{
|
||||
"path": "../better-auth/tsconfig.json"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { defineConfig } from "tsdown";
|
||||
|
||||
export default defineConfig({
|
||||
dts: true,
|
||||
dts: { build: true, incremental: true },
|
||||
format: ["esm", "cjs"],
|
||||
entry: ["./src/index.ts", "./src/client.ts"],
|
||||
external: ["better-auth", "better-call", "@better-fetch/fetch", "stripe"],
|
||||
|
||||
@@ -23,11 +23,13 @@
|
||||
},
|
||||
"exports": {
|
||||
".": {
|
||||
"better-auth-dev-source": "./src/index.ts",
|
||||
"types": "./dist/index.d.ts",
|
||||
"import": "./dist/index.js",
|
||||
"require": "./dist/index.cjs"
|
||||
},
|
||||
"./client": {
|
||||
"better-auth-dev-source": "./src/client.ts",
|
||||
"types": "./dist/client.d.ts",
|
||||
"import": "./dist/client.js",
|
||||
"require": "./dist/client.cjs"
|
||||
|
||||
@@ -1,9 +1,14 @@
|
||||
{
|
||||
"extends": "../../tsconfig.json",
|
||||
"extends": "../../tsconfig.base.json",
|
||||
"compilerOptions": {
|
||||
"rootDir": "./src",
|
||||
"outDir": "./dist",
|
||||
"lib": ["esnext", "dom", "dom.iterable"]
|
||||
},
|
||||
"include": ["src"]
|
||||
"references": [
|
||||
{
|
||||
"path": "../better-auth/tsconfig.json"
|
||||
},
|
||||
{
|
||||
"path": "../core/tsconfig.json"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { defineConfig } from "tsdown";
|
||||
|
||||
export default defineConfig({
|
||||
dts: true,
|
||||
dts: { build: true, incremental: true },
|
||||
format: ["esm", "cjs"],
|
||||
entry: ["./src/index.ts", "./src/client.ts"],
|
||||
external: ["better-auth", "better-call", "@better-fetch/fetch", "stripe"],
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
"module": "./dist/index.js",
|
||||
"exports": {
|
||||
".": {
|
||||
"better-auth-dev-source": "./src/index.ts",
|
||||
"import": {
|
||||
"types": "./dist/index.d.ts",
|
||||
"default": "./dist/index.js"
|
||||
|
||||
@@ -1,9 +1,8 @@
|
||||
{
|
||||
"extends": "../../tsconfig.json",
|
||||
"compilerOptions": {
|
||||
"outDir": "dist",
|
||||
"rootDir": "src"
|
||||
},
|
||||
"include": ["src/**/*"],
|
||||
"exclude": ["node_modules", "dist"]
|
||||
"extends": "../../tsconfig.base.json",
|
||||
"references": [
|
||||
{
|
||||
"path": "../core/tsconfig.json"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { defineConfig } from "tsdown";
|
||||
|
||||
export default defineConfig({
|
||||
dts: true,
|
||||
dts: { build: true, incremental: true },
|
||||
format: ["esm", "cjs"],
|
||||
entry: ["./src/index.ts"],
|
||||
});
|
||||
|
||||
30
tsconfig.base.json
Normal file
30
tsconfig.base.json
Normal file
@@ -0,0 +1,30 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"strict": true,
|
||||
"target": "esnext",
|
||||
"module": "esnext",
|
||||
"moduleResolution": "bundler",
|
||||
"downlevelIteration": true,
|
||||
"baseUrl": ".",
|
||||
"esModuleInterop": true,
|
||||
"skipLibCheck": true,
|
||||
"verbatimModuleSyntax": true,
|
||||
"noUncheckedIndexedAccess": true,
|
||||
"exactOptionalPropertyTypes": false,
|
||||
"incremental": true,
|
||||
"noErrorTruncation": true,
|
||||
"composite": true,
|
||||
"declaration": true,
|
||||
"emitDeclarationOnly": true,
|
||||
"types": ["node", "bun"],
|
||||
// Put the .d.ts files output and cache file (tsbuildinfo) in a directory
|
||||
// that will be ignored by other tools.
|
||||
"outDir": "${configDir}/node_modules/.cache/ts/out",
|
||||
"tsBuildInfoFile": "${configDir}/node_modules/.cache/ts/tsbuildinfo",
|
||||
// A custom condition that can be set to the "exports" filed in package.json
|
||||
// and it should directs to the source .ts files. This enables the
|
||||
// jump-to-definition feature in IDEs to function properly.
|
||||
"customConditions": ["better-auth-dev-source"]
|
||||
},
|
||||
"exclude": ["**/dist/**", "**/node_modules/**"]
|
||||
}
|
||||
@@ -1,19 +1,31 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"strict": true,
|
||||
"target": "esnext",
|
||||
"module": "esnext",
|
||||
"moduleResolution": "bundler",
|
||||
"downlevelIteration": true,
|
||||
"baseUrl": ".",
|
||||
"esModuleInterop": true,
|
||||
"skipLibCheck": true,
|
||||
"verbatimModuleSyntax": true,
|
||||
"noUncheckedIndexedAccess": true,
|
||||
"exactOptionalPropertyTypes": false,
|
||||
"incremental": true,
|
||||
"noErrorTruncation": true,
|
||||
"types": ["node", "bun"]
|
||||
},
|
||||
"exclude": ["**/dist/**", "**/node_modules/**"]
|
||||
"extends": "./tsconfig.base.json",
|
||||
"include": [
|
||||
// Only include files that are in the root directory. All other files are included by the references.
|
||||
"./*.ts",
|
||||
"./*.js"
|
||||
],
|
||||
"references": [
|
||||
{
|
||||
"path": "./packages/better-auth/tsconfig.json"
|
||||
},
|
||||
{
|
||||
"path": "./packages/cli/tsconfig.json"
|
||||
},
|
||||
{
|
||||
"path": "./packages/core/tsconfig.json"
|
||||
},
|
||||
{
|
||||
"path": "./packages/expo/tsconfig.json"
|
||||
},
|
||||
{
|
||||
"path": "./packages/sso/tsconfig.json"
|
||||
},
|
||||
{
|
||||
"path": "./packages/stripe/tsconfig.json"
|
||||
},
|
||||
{
|
||||
"path": "./packages/telemetry/tsconfig.json"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user