fix(worker): move Pages Function under apps/web for Git integration - #1023
Conversation
The Pages Git integration did not detect functions/ at the repo root — the project root is apps/web, so the function must live at apps/web/functions/ for the Cloudflare build to compile and serve it. Generated with Codebuff 🤖 Co-Authored-By: Codebuff <noreply@codebuff.com>
Deploying do-epub-studio with
|
| Latest commit: |
5fc12af
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://2d4c3a0e.do-epub-studio.pages.dev |
| Branch Preview URL: | https://fix-pages-functions-location.do-epub-studio.pages.dev |
Up to standards ✅🟢 Issues
|
| Metric | Results |
|---|---|
| Complexity | 0 |
| Duplication | 0 |
NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.
Bundle budget (gzipped, ADR-107 §3)Budgets: main JS 180 KB · main CSS 30 KB · any lazy chunk 80 KB Bundle budget (gzipped + brotli) — ADR-107 §3
Budgets: main JS 180 KB · main CSS 30 KB · lazy chunk 100 KB Baseline delta comparison
|
The Pages Git integration only detects functions/ under the project root (apps/web), not at the repo root — verified by deploying both. Update the GOAP plan, ADR, runbook, and learnings to the correct location. Generated with Codebuff 🤖 Co-Authored-By: Codebuff <noreply@codebuff.com>
apps/web/functions/api/[[path]].ts is a runtime entry point bundled by Cloudflare at deploy time, never imported by app source, so knip flags it as an unused file. Add it to the apps/web ignore list. Generated with Codebuff 🤖 Co-Authored-By: Codebuff <noreply@codebuff.com>
|
✅ Health of changed files: 9.6 → 9.6 (+0.1) 📋 At a glance ✅ Health gate: passed 📌 Before you merge
🔎 More signals (2)🔥 Hotspot touched (1)
💀 Dead code (2 findings)
👀 Suggested reviewers @d-oit 📊 See the full report for this PR |
The Pages Git integration did not detect
functions/at the repo root (preview deployment had no_routes.json/_worker.js, and/api/healthreturned a 404). The Pages project root isapps/web, so the function must live atapps/web/functions/. Movesfunctions/api/[[path]].ts→apps/web/functions/api/[[path]].ts(import path updated).