2026-02-19 11:54:32 -08:00
|
|
|
// Browser-safe stub for database/context
|
|
|
|
|
// The real implementation uses Node.js AsyncLocalStorage which is server-only.
|
|
|
|
|
// This stub is used during the client build to avoid bundling server-only code.
|
|
|
|
|
|
2026-03-21 09:30:59 -07:00
|
|
|
export const DatabaseContext = null as unknown;
|
2026-02-19 11:54:32 -08:00
|
|
|
|
|
|
|
|
export function database(): never {
|
|
|
|
|
throw new Error("database() can only be called on the server");
|
|
|
|
|
}
|