Skip to content
Source
Sign inSign up
Open History to see the last commit

index.ts

35 lines1.5 KB

1export type { BetterAuthApi } from "./ApiProxy.ts";
2export {
3 BetterAuth,
4 type AuthOptions,
5 type BetterAuthInstance,
6 type BetterAuthProps,
7 type Session,
8} from "./BetterAuth.ts";
9export {
10 Database,
11 type DatabaseInput,
12 type DatabaseService,
13 type DirectDatabase,
14 type Provider,
15} from "./Database.ts";
16export {
17 BetterAuthApiError,
18 BetterAuthMigrationError,
19 BetterAuthStorageError,
20 isAPIErrorLike,
21 mergeAPIErrorHeaders,
22} from "./Errors.ts";
23export { Memory } from "./Memory.ts";
24export { SecondaryStorage, type SecondaryStorageService } from "./SecondaryStorage.ts";
25// Driver-backed platform layers are deliberately NOT re-exported from the
26// barrel (they carry optional peer deps / runtime-specific imports).
27// One file per layer, one export condition per layer:
28// @alchemy.run/better-auth/CloudflareD1 — native D1 binding + HTTP migrations
29// @alchemy.run/better-auth/CloudflareHyperdrive — pooled TCP Postgres/MySQL via Hyperdrive
30// @alchemy.run/better-auth/Neon — Neon serverless driver (Workers/Lambda, no Hyperdrive/pg)
31// @alchemy.run/better-auth/AuroraDataApi — Aurora over the RDS Data API (Lambda, no VPC/pg)
32// @alchemy.run/better-auth/Postgres — generic pg TCP (Hyperdrive origin, RDS-in-VPC, literal URLs)
33// @alchemy.run/better-auth/MySQL — generic mysql2 TCP (PlanetScale MySQL, Hyperdrive origin)
34// @alchemy.run/better-auth/SQLite — bun:sqlite (dev/tests)
35// @alchemy.run/better-auth/Drizzle — drizzle-orm