* chore(infra): migrate desktop web from Vercel to Cloudflare Workers Replaces separate Vercel deployments (follow SPA + follow-external-ssr) with unified Cloudflare Workers + Assets deployment. Implements meta tag injection, OG image generation, and environment variable management in Hono-based Worker. Adds GitHub Actions CI/CD for automatic deployment on push to dev/main branches. - Replace Fastify with Hono for Cloudflare Workers compatibility - Create Worker entry point with SSR routes and SPA fallback - Add AsyncLocalStorage-based request context shim - Implement WASM-based OG image rendering with R2 font storage - Split SPA and SSR routing: /share/* and auth routes use SSR, others fallback to SPA - Add Cloudflare wrangler configuration with dev/prod environments - Create GitHub Actions workflow for automated deployments - Add build scripts for font data and WASM patching Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * fix(ssr): exclude worker files from typecheck and fix tsdown config Worker-specific files (*.worker.ts) use Cloudflare Workers types and generated modules that aren't available during the main tsc typecheck. Exclude them from tsconfig since they're only used via tsdown aliases. Also fix broken path.resolve reference in tsdown.worker.config.ts. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
84 lines
2.8 KiB
JSON
84 lines
2.8 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": "wrangler deploy --env dev",
|
|
"deploy:prod": "wrangler 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",
|
|
"typecheck": "tsc --noEmit"
|
|
},
|
|
"dependencies": {
|
|
"@fastify/middie": "9.1.0",
|
|
"@fastify/request-context": "6.2.1",
|
|
"@follow-app/client-sdk": "catalog:",
|
|
"@follow/tracker": "workspace:*",
|
|
"@fontsource/sn-pro": "5.2.6",
|
|
"@openpanel/web": "1.0.7",
|
|
"@radix-ui/react-avatar": "1.1.11",
|
|
"@resvg/resvg-js": "2.6.2",
|
|
"@sentry/react": "10.38.0",
|
|
"@tanstack/react-query": "5.90.21",
|
|
"blurhash": "2.0.5",
|
|
"dayjs": "1.11.19",
|
|
"fastify": "5.7.4",
|
|
"i18next": "25.8.6",
|
|
"jotai": "2.17.1",
|
|
"kose-font": "1.0.0",
|
|
"linkedom": "0.18.12",
|
|
"motion": "12.34.0",
|
|
"ofetch": "1.5.1",
|
|
"rc-modal-sheet": "1.0.2",
|
|
"react": "19.0.0",
|
|
"react-blurhash": "0.3.0",
|
|
"react-dom": "19.0.0",
|
|
"react-google-recaptcha-v3": "1.11.0",
|
|
"react-hook-form": "7.71.1",
|
|
"react-hotkeys-hook": "5.2.4",
|
|
"react-i18next": "16.5.4",
|
|
"react-photo-view": "1.2.7",
|
|
"react-router": "7.13.0",
|
|
"satori": "0.19.2",
|
|
"sonner": "2.0.7",
|
|
"use-context-selector": "2.0.0",
|
|
"xss": "1.0.15",
|
|
"zod": "3.25.76"
|
|
},
|
|
"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",
|
|
"@types/html-minifier-terser": "7.0.2",
|
|
"chokidar": "4.0.3",
|
|
"code-inspector-plugin": "1.4.2",
|
|
"daisyui": "4.12.24",
|
|
"dotenv-flow": "4.1.0",
|
|
"es-toolkit": "1.44.0",
|
|
"fast-glob": "3.3.3",
|
|
"foxact": "0.2.52",
|
|
"hono": "4.12.1",
|
|
"html-minifier-terser": "7.2.0",
|
|
"lightningcss": "1.31.1",
|
|
"masonic": "4.1.0",
|
|
"nanoid": "5.1.6",
|
|
"path-to-regexp": "8.3.0",
|
|
"tailwindcss-uikit-colors": "catalog:",
|
|
"tsdown": "0.20.3",
|
|
"tsx": "4.21.0",
|
|
"typescript": "catalog:",
|
|
"vite": "7.3.1",
|
|
"vite-plugin-route-builder": "0.4.1",
|
|
"wrangler": "4.67.0"
|
|
}
|
|
}
|