Summary
main currently fails to compile. Both npx tsc --noEmit and npm run lint error out with parser failures:
src/routes/users.ts(357,1): error TS1005: '}' expected.
src/routes/webhooks.ts(267,1): error TS1005: '}' expected.
Confirmed on a clean checkout of main (no local changes) — unrelated to any in-flight PR.
Likely cause
Looking at src/routes/webhooks.ts, there's a dangling block with no enclosing declaration:
function serializeDelivery(row: WebhookDelivery) {
return { ... };
}
// ---------------------------------------------------------------------------
// Router
// ---------------------------------------------------------------------------
// Enforce CORS allowlist before admin auth so unapproved origins are
// rejected early without leaking auth challenge details.
router.use(webhookCors());
router.use(requireAdmin);
router.get("/", async (req, res, next) => {
...
The const webhooksRouter = Router(); declaration (and a matching closing brace/export) appear to be missing — the file reads like two independently-written route modules (admin subscription CRUD vs. CORS-allowlisted delivery listing) that got concatenated rather than merged. This lines up with several recent merges in the history being resolved with git merge -X theirs (see PRs #551–#554), which can silently drop non-conflicting hunks from a file when two branches touch it concurrently.
src/routes/users.ts likely has the same root cause and needs the same kind of inspection.
Impact
npm run build fails (prebuild → tsc).
npm run lint fails.
- Any PR whose CI compares against a clean
main will inherit these failures regardless of what the PR itself touches.
Suggested fix
Someone familiar with the intended behavior of both conflicting features (webhook subscription management vs. CORS allowlist enforcement in webhooks.ts; whatever collided in users.ts) should reconcile the two implementations by hand rather than re-running the automatic merge.
Found while working on #342 (OpenAPI examples for markets) — that PR is intentionally scoped to markets/OpenAPI only and does not attempt to fix this.
Summary
maincurrently fails to compile. Bothnpx tsc --noEmitandnpm run linterror out with parser failures:Confirmed on a clean checkout of
main(no local changes) — unrelated to any in-flight PR.Likely cause
Looking at
src/routes/webhooks.ts, there's a dangling block with no enclosing declaration:The
const webhooksRouter = Router();declaration (and a matching closing brace/export) appear to be missing — the file reads like two independently-written route modules (admin subscription CRUD vs. CORS-allowlisted delivery listing) that got concatenated rather than merged. This lines up with several recent merges in the history being resolved withgit merge -X theirs(see PRs #551–#554), which can silently drop non-conflicting hunks from a file when two branches touch it concurrently.src/routes/users.tslikely has the same root cause and needs the same kind of inspection.Impact
npm run buildfails (prebuild →tsc).npm run lintfails.mainwill inherit these failures regardless of what the PR itself touches.Suggested fix
Someone familiar with the intended behavior of both conflicting features (webhook subscription management vs. CORS allowlist enforcement in
webhooks.ts; whatever collided inusers.ts) should reconcile the two implementations by hand rather than re-running the automatic merge.Found while working on #342 (OpenAPI examples for markets) — that PR is intentionally scoped to markets/OpenAPI only and does not attempt to fix this.