Skip to content

Commit f522483

Browse files
committed
fix
1 parent 400c90f commit f522483

File tree

8 files changed

+130
-94
lines changed

8 files changed

+130
-94
lines changed

.changeset/beige-dragons-sleep.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"better-auth-convex": patch
3+
---
4+
5+
Fix

bun.lock

Lines changed: 98 additions & 74 deletions
Large diffs are not rendered by default.

package.json

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,20 +18,23 @@
1818
"license": "Apache-2.0",
1919
"sideEffects": false,
2020
"exports": {
21-
".": "./dist/index.mjs",
22-
"./schema": "./dist/schema.mjs",
21+
".": {
22+
"types": "./dist/index.d.ts",
23+
"import": "./dist/index.mjs",
24+
"require": "./dist/index.cjs"
25+
},
2326
"./package.json": "./package.json"
2427
},
25-
"main": "./dist/index.mjs",
28+
"main": "./dist/index.cjs",
2629
"module": "./dist/index.mjs",
27-
"types": "./dist/index.d.mts",
30+
"types": "./dist/index.d.ts",
2831
"files": [
2932
"dist"
3033
],
3134
"scripts": {
3235
"brl": "sh tooling/brl.sh",
33-
"build": "tsdown --config tooling/tsdown.config.ts",
34-
"build:watch": "tsdown --config tooling/tsdown.config.ts --watch",
36+
"build": "tsup --config tooling/tsup.config.ts",
37+
"build:watch": "tsup --config tooling/tsup.config.ts --watch",
3538
"check": "bun lint && bun run build && bun typecheck",
3639
"lint": "biome check",
3740
"lint:fix": "biome check --write",
@@ -56,7 +59,7 @@
5659
"better-auth": "1.3.34",
5760
"convex": "1.29.3",
5861
"lefthook": "2.0.4",
59-
"tsdown": "0.16.7",
62+
"tsup": "8.5.0",
6063
"typescript": "5.9.3",
6164
"ultracite": "6.3.6"
6265
},

src/adapter.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@ export const httpAdapter = <
228228
});
229229
},
230230
createSchema: async ({ file, tables }) => {
231-
const { createSchema } = await import('./schema');
231+
const { createSchema } = await import('./createSchema');
232232

233233
return createSchema({ file, tables });
234234
},
@@ -519,7 +519,7 @@ export const dbAdapter = <
519519
);
520520
},
521521
createSchema: async ({ file, tables }) => {
522-
const { createSchema } = await import('./schema');
522+
const { createSchema } = await import('./createSchema');
523523

524524
return createSchema({ file, tables });
525525
},
File renamed without changes.

src/index.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@ export * from './adapter';
66
export * from './adapterUtils';
77
export * from './api';
88
export * from './client';
9+
export * from './createSchema';
910
export * from './helpers';
1011
export * from './registerRoutes';
11-
12-
// createSchema is exported separately via better-auth-convex/schema
13-
// because it uses Node.js APIs (path) that aren't available in Convex runtime

tooling/tsdown.config.ts

Lines changed: 0 additions & 8 deletions
This file was deleted.

tooling/tsup.config.ts

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
import { defineConfig } from 'tsup';
2+
3+
export default defineConfig({
4+
clean: true,
5+
dts: true,
6+
entry: ['src/index.ts'],
7+
external: [],
8+
format: ['cjs', 'esm'],
9+
minify: false,
10+
outDir: 'dist',
11+
sourcemap: true,
12+
target: 'esnext',
13+
treeshake: true,
14+
});

0 commit comments

Comments
 (0)