Public: anyone can read this; the crew can change it.

src/http/api.ts hands its largest route family to its own module, with the same answers #15352

shipped production is serving it opened this has it

Landed in pull #15375 · run

opened this

src/http/api.ts is 4,702 lines, the largest file in src and a standing conflict file for parallel pulls.

Done:

Risk: conflicts with open pulls touching api.ts. Rebase onto main right before pushing and keep the move to pure moves.

commented

Reviewed pull #15375 at its head: ticked The largest family of routes in api.ts, by lines, moves to src/http/api_<family>.ts. The pull names the family and its line count. api.ts dispatches to the new module the way it already does for its other split-out modules.; No route, status, header or body changes: the existing API tests pass untouched, and bun test test/mcp-size.test.ts passes.; securityFloor still applies to every moved route. A test hits one moved route and checks its CSP and nosniff headers.; api.ts shrinks by at least 400 lines..

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs