Commit Graph
84 Commits
Author SHA1 Message Date
asepharyana 0ad783b794 fix: PutObject raw body, presigned URL auth guard, DeleteObjects tracking, home.ts path 2026-07-06 21:38:17 +07:00
asepharyana e175a27512 test: add S3 auth, operations, and web API tests 2026-07-06 21:15:26 +07:00
asepharyana 5e38f80267 feat: add web file manager UI and S3 catch-all route 2026-07-06 20:56:55 +07:00
asepharyana a4f902a37b feat: add JSON v1 web API for S3 management UI 2026-07-06 16:10:17 +07:00
asepharyana dd61e7e0fc feat: implement S3 protocol dispatcher with bucket, object, listing, and multipart operations 2026-07-06 15:52:42 +07:00
asepharyana 084ff3fb9d fix: add region validation, fix presigned URL canonical request (add method, fix headers), normalizeUri decode 2026-07-06 15:31:06 +07:00
asepharyana ee758aa939 feat: add S3 SigV4 auth verification and XML builders 2026-07-06 14:56:39 +07:00
asepharyana a2ca489039 fix: add explicit snake_case-to-camelCase mapping for S3FileRecord, add missing findOrphanFilesByBucket 2026-07-06 14:33:27 +07:00
asepharyana caef31c703 feat: add DB CRUD layer for buckets, multipart, and S3 file extensions 2026-07-06 14:23:37 +07:00
asepharyana e37fb00295 feat: add S3 env config, bucket and multipart DB schema 2026-07-06 13:59:03 +07:00
asepharyana 0d0d7a5dfa chore: remove GitHub Actions workflow for notifying parent repository 2026-07-06 01:25:37 +07:00
asepharyana 52bd704d21 refactor: enhance file handling and metrics tracking; remove unused bot health tracker 2026-07-06 01:25:18 +07:00
asepharyana bbf420759b chore: update Dockerfile and docker-compose for improved deployment process; add deploy script 2026-07-05 22:06:52 +07:00
MythEclipse 20b622c4c2 fix(core): resolve wrong file_id error and zip stream memory leaks
- Refactored Telegram bot pool iteration to handle 'wrong file_id' properly by verifying against all active bots
- Upgraded TelegramFileInfo interface to track owner bot_token
- Patched MaxListenersExceededWarning memory leak in zip.ts stream writes with events.once and async iteration
2026-06-20 22:24:23 +07:00
MythEclipseandClaude Opus 4.8 50176e5764 chore: migrate domain asepharyana.tech to asepharyana.my.id
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-06 12:39:26 +07:00
MythEclipse 2a833d3908 feat: include bot token in file info response for Telegram API 2026-05-30 00:15:35 +07:00
MythEclipse 3ca5ab7983 refactor: update Telegram file handling to use new getFileInfo function and include bot token in cache 2026-05-29 16:53:55 +07:00
Asep Haryana Saputra cc0f1dde79 ci: remove obsolete deploy.yml, replaced by notify-parent.yml 2026-05-29 15:00:00 +07:00
Asep Haryana Saputra e88e5dbc39 ci: slim deploy.yml to test-only; build/push/deploy handled by monorepo 2026-05-29 14:08:50 +07:00
Asep Haryana Saputra 0e2f09012f ci: add notify-parent workflow for monorepo integration 2026-05-29 14:08:21 +07:00
MythEclipse 134a7d4bf6 feat: update Traefik router rules to support additional domains and change TLS certresolver to Cloudflare 2026-05-29 03:45:57 +07:00
MythEclipse 8508b36026 feat: update file handling to redirect to Telegram CDN and adjust Swagger documentation 2026-05-29 03:43:49 +07:00
MythEclipse 5425f6d33d feat: enhance configuration and rate limiting
- Added new configuration options: trustProxy, uploadConcurrency, batchMaxItems, batchMaxSizeBytes, and maxRequestBodyBytes to AppConfig.
- Implemented utility functions for parsing environment variables and masking sensitive data.
- Updated rate limiting logic to use configurable window size and maximum requests per window.
- Introduced a middleware for rate limiting on specific routes.
- Refactored file handling routes to support streaming downloads instead of redirects.
- Improved error handling and response formatting in file routes.
- Added support for oversized request rejection based on Content-Length header.
- Updated Swagger documentation to reflect changes in API behavior and responses.
- Enhanced tests to cover new features and ensure proper functionality.
2026-05-29 03:33:39 +07:00
MythEclipse be813b1c0e feat: update Traefik router rule to use new domain for file upload service 2026-05-29 02:57:50 +07:00
MythEclipse db5de1367d feat: extend file schema with archive metadata, implement batch upload processing, and add zip utilities for file handling 2026-05-22 00:51:49 +07:00
MythEclipse 56b929ffb1 feat: enhance file upload process with temporary file handling, improved error management, and metrics logging 2026-05-22 00:29:54 +07:00
MythEclipse fd5eb98586 feat: implement caching for file info, add rate limiting, and enhance upload handling with retry logic 2026-05-21 23:31:49 +07:00
MythEclipse 10c968cf01 feat: add file_hash column and related index to files table; refactor Telegram API utilities for improved file handling 2026-05-21 22:55:42 +07:00
MythEclipse 52340ee77d feat: enhance file upload handling with improved file detection, size limits, and response formatting 2026-05-21 22:31:55 +07:00
MythEclipse 06844f1fa1 docs: update CLAUDE.md to include details on temporary file handling for API uploads 2026-05-18 22:03:55 +07:00
MythEclipse 884710fd42 feat: implement temporary file handling for uploads and update tests for dynamic ID verification 2026-05-18 22:01:26 +07:00
MythEclipse cc3f85284b docs: add dynamic image fetching details for unit tests in CLAUDE.md 2026-05-18 21:54:57 +07:00
MythEclipse d58b2390ef refactor: remove concurrency limit from Telegram upload queue and enhance media group handling 2026-05-18 21:54:39 +07:00
MythEclipse b91b276214 feat: add support for batch uploads of media groups to Telegram with debounce handling 2026-05-18 21:31:20 +07:00
MythEclipse 0bc12651db fix: clean up logger info message formatting and remove unused import in rate limit tests 2026-05-18 21:19:38 +07:00
MythEclipse 825e969569 feat: implement multi-bot support for Telegram API with rate limit handling and add task queue for uploads 2026-05-18 21:18:16 +07:00
MythEclipse 721fa3db7d feat: implement auto-retry for Telegram API requests on error 429 and update documentation 2026-05-18 21:02:38 +07:00
MythEclipseandClaude Opus 4.7 91cfee0b37 fix: load BOT_TOKEN from process.env in tests to prevent leaks
- Update test/bot.test.ts to use process.env.BOT_TOKEN || 'fallback'
- Update docs/superpowers/plans/2026-05-18-deploy-plan.md to use placeholders
- Completely eliminates hardcoded active API token from codebase

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-18 19:55:03 +07:00
MythEclipseandClaude Opus 4.7 525348b1f3 fix: make forwardToStorage fully dynamic based on fileType
- Replace forceDocument boolean with fileType string in forwardToStorage
- Dynamically call matching sendPhoto, sendAudio, sendVideo, sendVoice, sendAnimation, sendSticker, or sendDocument Telegraf API method
- Correctly extract uploaded file details based on what Telegram returned
- Fixes IMAGE_PROCESS_FAILED 500 error when uploading ogg audio, video, sticker, or voice notes via HTTP
- Update upload.ts, bot.ts, and test suites to match the new dynamic signature

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-18 19:52:46 +07:00
MythEclipseandClaude Opus 4.7 bf6d5f04c4 fix: bundle migration script and ensure file_hash column exists
- Compile src/db/migrate.ts to dist/migrate.js during build
- Copy dist/migrate.js to Stage 2 (runner) inside Dockerfile
- Run bun dist/migrate.js on db:migrate command
- Modify schema.sql to use CREATE TABLE IF NOT EXISTS and ALTER TABLE to add file_hash to existing database instances on VPS

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-18 19:46:21 +07:00
MythEclipse b2de5f583d feat: add design document for multi-format upload and anti-duplication feature 2026-05-18 19:42:17 +07:00
MythEclipse a0262e2d46 style: run formatter on modified files 2026-05-18 19:41:51 +07:00
MythEclipseandClaude Opus 4.7 ea4341fdfe feat: implement deduplication and all media types in bot listener
- Expand registered bot listener to support sticker and video_note media types
- Check database for existing telegramFileUniqueId to bypass forwarding duplicates
- Update tests to assert deduplication and new formats handling in bot.test.ts

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-18 19:41:16 +07:00
MythEclipseandClaude Opus 4.7 04a2e52250 feat: implement deduplication in HTTP upload router
- Compute SHA-256 hash using computeHash for multipart and JSON uploads
- Query database for existing file records with the same hash
- Return existing metadata and download URL immediately on duplicate match without reforwarding to Telegram
- Include fileHash in newly inserted file database records

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-18 19:39:55 +07:00
MythEclipseandClaude Opus 4.7 4e805689c1 feat: extend file type classification and implement computeHash
- Add sticker (webp) and video_note to classification mapping and file limits
- Handle unknown mime or caption fallback to document
- Implement computeHash utility using Bun.CryptoHasher for sha256 checksums
- Update and add comprehensive tests in file.test.ts

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-18 19:38:12 +07:00
MythEclipseandClaude Opus 4.7 22c2133b24 feat: add fileHash column to files schema
Update files database schema and test suite to support fileHash property.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-18 19:36:19 +07:00
MythEclipse 3d2500ed7f fix: auto-append file extension based on magic bytes or mime type if missing 2026-05-18 09:20:03 +07:00
MythEclipse 5de424bf8e ci: add write permission for packages to GHCR pushing 2026-05-18 08:56:22 +07:00
MythEclipse ed7f607ee4 style: sort imports in telegram test to satisfy Biome check 2026-05-18 08:55:22 +07:00
MythEclipse ed88069e60 fix: assert sendDocument with config.storageChatId to match dynamic mock env in CI 2026-05-18 08:54:24 +07:00