Files
cloudflare__vinext/package.json
T
Steve Faulkner 75703d3b72 Align Pages Router worker entry with prod-server request handling (#171)
* Skip deploy previews for fork PRs that lack Cloudflare secrets

Fork PRs don't have access to repository secrets (CLOUDFLARE_API_TOKEN,
CLOUDFLARE_ACCOUNT_ID), so deploy/smoke-test/comment steps always fail.
Add a fork detection condition to skip these steps gracefully. The build
steps still run, so example builds are still validated for fork PRs.

* fix: align Pages Router worker entry with prod-server request handling

The generated Cloudflare Worker entry for Pages Router apps was missing
several request handling steps that the Node.js production server
(prod-server.ts) already handled. This brings the two in sync:

- Run middleware (runMiddleware) before routing
- Apply next.config.js redirects, rewrites (before/after/fallback), and headers
- Handle basePath stripping and trailing slash normalization
- Merge middleware response headers with correct precedence
- Guard renderPage with typeof check

Also updates the two Pages Router examples (pages-router-cloudflare,
realworld-api-rest) and exports vinext/config/config-matchers so the
worker entry can import the shared matching utilities.

* chore: sync pnpm-lock.yaml with upstream package.json changes
2026-02-27 13:01:34 -06:00

48 lines
1.1 KiB
JSON

{
"name": "vinext-monorepo",
"private": true,
"packageManager": "pnpm@10.30.0",
"scripts": {
"build": "pnpm --filter vinext run build",
"test": "vitest run",
"test:watch": "vitest",
"typecheck": "tsgo --noEmit",
"lint": "oxlint --deny-warnings",
"test:e2e": "playwright test"
},
"devDependencies": {
"@playwright/test": "^1.58.2",
"@types/node": "^25.2.3",
"@types/react": "^19.2.14",
"@types/react-dom": "^19.2.3",
"@typescript/native-preview": "^7.0.0-dev.20260213.1",
"@vitejs/plugin-rsc": "^0.5.19",
"image-size": "2.0.2",
"oxlint": "^1.47.0",
"playwright": "^1.52.0",
"react": "^19.2.4",
"react-dom": "^19.2.4",
"typescript": "^5.7.0",
"vite": "^7.3.1",
"vitest": "^3.2.1"
},
"dependencies": {
"@mdx-js/react": "^3.1.1",
"@mdx-js/rollup": "^3.1.1",
"@unpic/react": "^1.0.2"
},
"pnpm": {
"peerDependencyRules": {
"ignoreMissing": ["next", "webpack"]
},
"onlyBuiltDependencies": [
"better-sqlite3",
"esbuild",
"sharp",
"workerd",
"@parcel/watcher",
"@swc/core"
]
}
}