mirror of
https://github.com/oven-sh/bun
synced 2026-02-12 11:59:00 +00:00
This commit adds comprehensive test coverage, TypeScript type definitions, and documentation for the new directory routes feature in Bun.serve(). Changes: - Added 16 test cases covering various directory route scenarios including: - Serving static files from directories - Nested directory structures - HEAD and GET request support - Binary file handling - Concurrent requests - Mixed route types (static, dynamic, and directory) - Added TypeScript types: - New DirectoryRouteOptions interface - Updated BaseRouteValue type to include directory routes - Comprehensive JSDoc examples in serve.d.ts - Added example file demonstrating directory routes usage - Tests document known limitations (fallback behavior needs work) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>