@takazudo/zfb-adapter-cloudflare 2.3.0 → 2.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +8 -0
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -62,7 +62,15 @@ export default async function Products() {
62
62
  See the [SSR and Cloudflare Bindings guide][ssr-guide] for the full D1
63
63
  lifecycle (`wrangler d1 create`, migrations, preview-vs-prod).
64
64
 
65
+ `getCloudflareContext()` only works when a real Cloudflare request scope
66
+ exists. `pnpm dev` (`zfb dev`) does not provide one — it runs the SSR
67
+ render code but exposes no bindings, so the call above throws there. Use
68
+ `wrangler dev` (or `zfb preview`, which wraps it) instead; see
69
+ [Local development][ssr-guide-local-dev] in the same guide for the
70
+ two-loop setup.
71
+
65
72
  [ssr-guide]: https://takazudomodular.com/pj/zudo-front-builder/docs/guides/ssr-and-cloudflare-bindings/
73
+ [ssr-guide-local-dev]: https://takazudomodular.com/pj/zudo-front-builder/docs/guides/ssr-and-cloudflare-bindings/#local-development
66
74
 
67
75
  `zfb build` will:
68
76
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@takazudo/zfb-adapter-cloudflare",
3
- "version": "2.3.0",
3
+ "version": "2.4.0",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "description": "Rust-built static-site engine for Astro and Next.js users — millisecond rebuilds, single binary. Cloudflare adapter: Workers Static Assets (Pages-compatible).",