Files
DIYgodandClaude Opus 5.5 5559b7c09a build: deploy the Cloudflare Workers with cf instead of Wrangler
Migrate folo-web (apps/desktop), landing-vinext (apps/landing), folo-ota
(apps/ota) and folo-ssr (apps/ssr) with `cf migrate` and finish the
follow-up work from the cf migration guide.

- cloudflare.config.ts now configures each Worker, and the Wrangler `dev`
  environment is the `dev` mode (`--mode dev`). Worker names, routes and
  zone, custom domain, bindings and resource IDs, cron trigger,
  compatibility date and flags, placement, limits, observability,
  workers.dev and assets settings are unchanged. Build settings moved to
  wrangler.config.ts (Wrangler bundler) and vite.config.ts (landing).
- landing-next-dev keeps the IMAGES binding it is deployed with today:
  CI deployed the top-level landing config with only the name and route
  overridden.
- CI builds each Worker with cf (landing still builds with vinext), then
  deploys that Build Output with `cf deploy --prebuilt` and the matching
  mode. Triggers, build steps and secrets are unchanged, and only the
  deploy steps receive the API token. turbo now caches landing's Build
  Output.
- Package scripts call cf. The landing deploy scripts used `vinext
  deploy`, which vinext no longer has.
- cf only looks for its build tool in the Worker package's own
  node_modules, while this workspace hoists every dependency to the
  root, so a postinstall step links the hoisted Wrangler or Vite plugin
  into each Worker app.
- The Vite plugin beta writes the client build into cf's Build Output,
  so landing drops the unused `output: 'standalone'` step that read
  dist/client. Worker source maps stay off, as they were with Wrangler.
- The KV preview_id has no cf equivalent; `cf dev` uses local data.
- wrangler.jsonc stays for `wrangler tail` and as a fallback until the
  Workers have been deployed to production with cf.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-22 22:38:53 +08:00

88 lines
2.9 KiB
JSON

{
"name": "@follow/ssr",
"type": "module",
"private": true,
"scripts": {
"build": "cross-env NODE_ENV=production vite build && tsx scripts/prepare-vercel-build.ts && tsdown && tsx scripts/cleanup-vercel-build.ts",
"build:worker": "cross-env NODE_ENV=production vite build && tsx scripts/prepare-vercel-build.ts && tsx scripts/generate-font-data.ts && tsdown --config tsdown.worker.config.ts && tsx scripts/patch-worker-build.ts && cp -r dist/dist-external ../desktop/out/web/dist-external",
"deploy:dev": "cf deploy --mode dev",
"deploy:prod": "cf deploy",
"dev": "cross-env NODE_ENV=development tsx watch --include \"src/**/*.ts\" --exclude \"./*.ts\" --exclude \"./*.mjs\" index.ts",
"meta": "tsx helper/meta-map.ts --watch",
"start": "tsx index.ts",
"test": "vitest run --config vitest.config.ts",
"typecheck": "tsc --noEmit"
},
"dependencies": {
"@fastify/middie": "9.3.4",
"@fastify/request-context": "7.0.0",
"@follow-app/client-sdk": "catalog:",
"@follow/tracker": "workspace:*",
"@fontsource/sn-pro": "5.3.0",
"@radix-ui/react-avatar": "1.2.6",
"@resvg/resvg-js": "2.6.2",
"@sentry/react": "10.75.1",
"@tanstack/react-query": "5.103.2",
"blurhash": "2.0.5",
"dayjs": "1.11.23",
"fastify": "5.12.5",
"i18next": "26.4.2",
"jotai": "3.0.0",
"kose-font": "1.0.0",
"linkedom": "0.18.13",
"motion": "13.4.0",
"ofetch": "1.5.1",
"rc-modal-sheet": "1.0.2",
"react": "19.2.8",
"react-blurhash": "0.3.0",
"react-dom": "19.2.8",
"react-google-recaptcha-v3": "1.11.0",
"react-hook-form": "7.88.0",
"react-hotkeys-hook": "5.3.3",
"react-i18next": "17.0.15",
"react-photo-view": "1.2.7",
"react-router": "8.4.0",
"satori": "0.33.4",
"sonner": "2.0.8",
"use-context-selector": "2.0.0",
"xss": "1.0.15",
"zod": "4.6.5"
},
"devDependencies": {
"@follow/components": "workspace:*",
"@follow/configs": "workspace:*",
"@follow/constants": "workspace:*",
"@follow/hooks": "workspace:*",
"@follow/models": "workspace:*",
"@follow/shared": "workspace:*",
"@follow/types": "workspace:*",
"@follow/utils": "workspace:*",
"@resvg/resvg-wasm": "2.6.2",
"@tailwindcss/postcss": "4.3.3",
"@types/html-minifier-terser": "7.0.2",
"@vitejs/plugin-react": "6.1.1",
"cf": "1.0.0-beta.20",
"chokidar": "5.0.0",
"code-inspector-plugin": "2.0.9",
"daisyui": "5.7.43",
"dotenv-flow": "4.1.0",
"es-toolkit": "1.52.0",
"fast-glob": "3.3.3",
"foxact": "0.3.12",
"hono": "4.13.8",
"html-minifier-terser": "7.2.0",
"lightningcss": "1.33.0",
"masonic": "4.1.0",
"nanoid": "6.0.1",
"path-to-regexp": "8.4.2",
"tailwindcss": "4.3.3",
"tailwindcss-uikit-colors": "catalog:",
"tsdown": "0.23.0",
"tsx": "4.23.15",
"typescript": "catalog:",
"vite": "8.3.0",
"vite-plugin-route-builder": "0.4.1",
"wrangler": "4.136.1"
}
}