yingjieli-cloudflare-deploy v1.0.0
adapter yingjieli.deploy
capsule://quake0day/[email protected]
Cloudflare Pages deployment adapter. Owns the wrangler.toml template,
the KV namespace binding (YL_DATA), the R2 bucket binding (YL_IMAGES),
the CDN cache + security headers, and legacy URL redirects.
Owns
- wrangler.toml template (KV + R2 bindings; project name)
- _headers (CDN cache rules, security headers)
- _redirects (legacy URL fixes)
- the canonical binding names YL_DATA and YL_IMAGES
Does not own
- any application code (functions and assets belong to their own capsules)
- the ADMIN_PASSWORD / SESSION_SECRET values (set via Cloudflare dashboard)
AI orientation
The bridge between the code in this repo and the Cloudflare Pages
runtime. Contains bindings, not logic. The two bindings (YL_DATA,
YL_IMAGES) make the other capsules' env requirements satisfied at
runtime. If the bindings change, every dependent capsule must change.
Avoid
- Committing ADMIN_PASSWORD or SESSION_SECRET to wrangler.toml.
- Renaming bindings without coordinating with dependent capsules.
Provides
env:YL_DATA— KV namespace binding (id supplied at reconstruct time).env:YL_IMAGES— R2 bucket binding (name supplied at reconstruct time).
Requires
env:ADMIN_PASSWORD— Set via Cloudflare Pages → Settings → Environment Variables AFTER deploy. Required at runtime by yingjieli-admin-auth.env:SESSION_SECRET— HMAC key (>= 32 bytes). Set same place as ADMIN_PASSWORD.
Dependencies
Runtime
wrangler>=3cloudflare-pages*
Invariants (must always hold)
- Secrets are never committed to wrangler.toml.
- The binding names YL_DATA and YL_IMAGES are stable across reconstructions.
- /assets/* and /images/* responses are immutable cache; HTML is no-cache.
Source files (3)
Click any file to view its content; the path on the right shows where the file lands when this capsule is installed.
src/_headers→_headerssrc/_redirects→_redirectssrc/wrangler.toml.tmpl→wrangler.toml
Plus capsule.yaml and
install.json.