Skip to content

Commit 8e959a4

Browse files
committed
feat(db): switch to @clawnify/db dual-binding adapter
Templates now work on both prod (Workers for Platforms + D1) and preview (Dynamic Workers Facet via env.STORAGE). The shared adapter in @clawnify/db detects the binding at runtime; no template-side branching needed. Fixes the 'Cannot read properties of undefined (reading prepare)' error on <slug>.draft.clawnify.com where env.DB is not bound.
1 parent 3f5a2c9 commit 8e959a4

4 files changed

Lines changed: 543 additions & 315 deletions

File tree

package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,12 @@
88
"build": "vite build"
99
},
1010
"dependencies": {
11+
"@clawnify/db": "^0.2.0",
1112
"@hono/zod-openapi": "^0.18.0",
1213
"hono": "^4.6.0",
13-
"zod": "^3.24.0",
1414
"lucide-preact": "^0.575.0",
15-
"preact": "^10.25.0"
15+
"preact": "^10.25.0",
16+
"zod": "^3.24.0"
1617
},
1718
"devDependencies": {
1819
"@preact/preset-vite": "^2.9.0",

0 commit comments

Comments
 (0)