72331bb865
InfiPlot now deploys to either Vercel or Cloudflare Workers — both targets are first-class. The project is fully stateless (sessions live on the client), so the Cloudflare side needs only Workers + Workers Assets and zero D1/KV/R2. - apps/web/wrangler.jsonc — nodejs_compat, Assets binding, 60s CPU limit (Workers Paid required; matches vercel.json maxDuration). I/O wait does not count against this budget — fits the LLM-bound workload that's most of the runtime. - apps/web/open-next.config.ts — minimal defineCloudflareConfig (no cache needed since the engine is stateless). - apps/web/package.json — added build:cf / preview:cf / deploy:cf via @opennextjs/cloudflare + wrangler (both devDeps); sharp moved from dependencies to devDependencies (only used by the manual optimize-home-images.mjs / localize-firstact-images.mjs scripts now). - .gitignore — .open-next, .wrangler, .dev.vars. - READMEs (3 langs) — Deploy to Cloudflare button next to Vercel, plus a Cloudflare section in the env-var setup (wrangler secret put + Cloudflare Access for staging access control). Verified: pnpm typecheck + pnpm build (Vercel path) + pnpm build:cf (OpenNext bundle: worker 4 KB, server 24 MB, assets 32 MB / 186 files — all within Workers limits) + pnpm preview:cf with the full play loop (start → scene → background click → CORS-clean Canvas annotation via Runware CDN → vision LLM → insert-beat) all green. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
21 lines
583 B
JSON
21 lines
583 B
JSON
{
|
|
"$schema": "node_modules/wrangler/config-schema.json",
|
|
"name": "infiplot",
|
|
"main": ".open-next/worker.js",
|
|
"compatibility_date": "2025-03-25",
|
|
"compatibility_flags": ["nodejs_compat"],
|
|
"assets": {
|
|
"binding": "ASSETS",
|
|
"directory": ".open-next/assets"
|
|
},
|
|
"observability": {
|
|
"enabled": true
|
|
},
|
|
// 60s mirrors apps/web/vercel.json maxDuration for the scene pipeline tail
|
|
// (multi-agent LLM, ~30-45s p95). Requires Workers Paid — Free is capped
|
|
// at 10ms CPU. I/O wait does not count against this budget.
|
|
"limits": {
|
|
"cpu_ms": 60000
|
|
}
|
|
}
|