- web-api create-bucket and s3 virtual-host now use BucketNameSchema
(single canonical validator; no inline regex left in src/)
- routes '/': HEAD/DELETE/POST now check shouldHandleS3 with headers
like every other branch (non-S3 -> 404, never S3-direct blind)
- s3-routing.test.ts: 3 new tests locking the fixed root verbs
- upload-file use-case is now the single save path with dedup policy
(hash / bucket-key / none), partPrefix + signatureBuffer inputs,
fileHash in UploadOutput, and owned temp-file cleanup; pass temp
path (not open stream) to telegram service for testability
- upload-controller (multipart + JSON) and web-api upload delegate
to the use-case; JSON body via JsonUploadPayloadSchema; responses
built from use-case output via buildUploadResponse
- web-api download 302 redirect -> proxy stream (closes bot_token
leak); shared CORS + sanitizeFilenameHeader
- file-controller drops double file-info cache layer (pool caches)
- bot handler uses DI singletons instead of direct construction
- get-file RedirectRetrieval.redirectUrl marked deprecated, URL via
shared builder; chunked-storage URL via buildTelegramFileUrl
(no inline api.telegram.org/file/bot left in src/)
- Replace unsafe 'Function' type in test with ITelegramService interface
- Biome auto-fix formatting and import sorting across 8 files
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
- Deleted `upload.ts` and `web-api.ts` routes, consolidating logic into dedicated controllers.
- Updated import paths in tests to reflect new controller structure.
- Refactored Telegram API utilities to utilize a bot pool for improved bot management and error handling.
- Enhanced environment variable tests to ensure additional bot tokens are correctly populated.
- Adjusted S3 bucket configuration tests to align with new controller imports.
- Updated Telegram queue implementation to reflect new infrastructure organization.