mirror of
https://github.com/shishantbiswas/bknd.git
synced 2026-03-15 20:17:22 +00:00
docs: update cloudflare imports
This commit is contained in:
@@ -1,21 +1,7 @@
|
||||
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;
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
"$schema": "node_modules/wrangler/config-schema.json",
|
||||
"name": "bknd-cf-worker-example",
|
||||
"main": "src/index.ts",
|
||||
"compatibility_date": "2025-02-04",
|
||||
"compatibility_date": "2025-08-03",
|
||||
"compatibility_flags": ["nodejs_compat"],
|
||||
"workers_dev": true,
|
||||
"minify": true,
|
||||
|
||||
Reference in New Issue
Block a user