Skip to content

Commit 273d217

Browse files
tbjersclaude
andcommitted
fix: track wrangler.jsonc in git and suppress Hono auto-detection
wrangler.jsonc was gitignored (leftover from when only wrangler pages deploy was used in CI, which took CLI flags instead). Now that CI runs wrangler deploy, the config must be in the repo — without it, wrangler falls back to framework auto-detection and fails on Hono 4.105. Also adds build.command to wrangler.jsonc pointing at the dashboard SvelteKit build, which suppresses wrangler 4.105 auto-detection (Hono is the Worker router, not a front-end framework). The separate "Build dashboard" CI step is removed since wrangler now invokes the build itself; dashboard npm ci still runs first so deps are in place. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent e6068aa commit 273d217

3 files changed

Lines changed: 38 additions & 6 deletions

File tree

.github/workflows/deploy-dashboard.yml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,10 +45,6 @@ jobs:
4545
working-directory: dashboard
4646
run: npm ci
4747

48-
- name: Build dashboard
49-
working-directory: dashboard
50-
run: npm run build
51-
5248
- name: Deploy Worker + assets
5349
if: github.ref == 'refs/heads/main'
5450
run: npx wrangler deploy

.gitignore

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,5 @@ node_modules/
33
/dist/
44
.*.vars
55
!.*.vars.example
6-
wrangler.jsonc
7-
!dashboard/wrangler.jsonc
86
*.local
97
*.pem

wrangler.jsonc

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
{
2+
"$schema": "node_modules/wrangler/config-schema.json",
3+
"name": "coverage-tracker",
4+
"main": "src/index.ts",
5+
"compatibility_date": "2026-06-25",
6+
"compatibility_flags": ["nodejs_compat"],
7+
"assets": {
8+
"directory": "./dashboard/build",
9+
"binding": "ASSETS",
10+
"not_found_handling": "single-page-application",
11+
"run_worker_first": ["/api/*"]
12+
},
13+
// Explicit build command suppresses wrangler's Hono framework auto-detection.
14+
// Hono here is the Worker router, not a front-end framework; the SvelteKit SPA
15+
// is built separately. Dashboard node_modules must already be installed before
16+
// wrangler deploy runs (handled by CI's "Install dashboard dependencies" step).
17+
"build": {
18+
"command": "npm --prefix dashboard run build"
19+
},
20+
"observability": { "enabled": true },
21+
"triggers": { "crons": ["30 6 * * *"] },
22+
"d1_databases": [
23+
{
24+
"binding": "DB",
25+
"database_name": "coverage",
26+
"database_id": "907f940c-9613-4b8a-ab94-47453e2e2c13",
27+
"migrations_dir": "migrations"
28+
}
29+
]
30+
// Secrets (set with `wrangler secret put <NAME>`):
31+
// GITHUB_APP_ID
32+
// GITHUB_APP_CLIENT_ID
33+
// GITHUB_APP_PRIVATE_KEY — PKCS#8 PEM, see .dev.vars.example
34+
// GITHUB_WEBHOOK_SECRET
35+
// CF_ACCESS_AUD — Access application AUD tag
36+
// CF_ACCESS_TEAM_DOMAIN — e.g. myteam.cloudflareaccess.com
37+
// DEV_BYPASS_SECRET — local dev only, never set in production
38+
}

0 commit comments

Comments
 (0)