mirror of
https://github.com/shishantbiswas/bknd.git
synced 2026-03-16 12:37:20 +00:00
22 lines
526 B
TypeScript
22 lines
526 B
TypeScript
import type { CloudflareBkndConfig } from "bknd/adapter/cloudflare";
|
|
import { syncTypes } from "bknd/plugins";
|
|
import { writeFile } from "node:fs/promises";
|
|
|
|
const isDev = import.meta.env && !import.meta.env.PROD;
|
|
|
|
export default {
|
|
d1: {
|
|
session: true,
|
|
},
|
|
options: {
|
|
plugins: [
|
|
syncTypes({
|
|
enabled: isDev,
|
|
write: async (et) => {
|
|
await writeFile("bknd-types.d.ts", et.toString());
|
|
},
|
|
}),
|
|
],
|
|
},
|
|
} satisfies CloudflareBkndConfig;
|