Commit Graph

26 Commits

Author SHA1 Message Date
riz c13e1118ca Add DEFLATE decompression support to ZIP parser
- Add Bun.decompress() support for compression method 8 (DEFLATE)
- Properly decompress ZIP files instead of returning compressed data
- Fix JSON parsing errors for metadata.json
- Handle decompression errors gracefully with fallbacks
- Remove compression method warnings for supported formats

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-19 22:48:53 +00:00
riz 10dd559c0e Fix ZIP parser to read file sizes from central directory
- Fix compressed/uncompressed size reading from central directory instead of local header
- All files now show correct sizes instead of 0 bytes
- metadata.json correctly identified as 635MB (very large)
- ZIP parser now working properly with Bun-compatible implementation

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-19 22:45:17 +00:00
riz 2bd87e614d Add detailed ZIP file debugging
- Show all files in ZIP when metadata.json is not found
- Display file sizes and count
- List JSON files specifically

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-19 22:41:01 +00:00
riz de2537d84a Fix ZIP deployment integration with custom ZIP parser
- Fix import paths in _kv.ts to resolve module resolution errors
- Implement custom ZIP file parser using DataView and ArrayBuffer
- Replace zipFile.entries() with Bun-compatible ZIP parsing
- Add comprehensive debugging for ZIP loading process
- Maintain backward compatibility with legacy msgpack format

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-19 22:37:53 +00:00
riz 2fe9c28729 Fix ZIP extraction compatibility issue with Bun runtime
- Replace unzipper library with Bun's built-in ZIP reading capabilities
- Use zipFile.entries() to read ZIP entries directly in memory
- Process files in memory without filesystem extraction
- Maintain proper file categorization (public, server, site, core)
- Handle binary vs text files correctly with appropriate decoding
- Remove dependency on problematic unzipper library that has mkdir compatibility issues
- Clean up unused file system functions and imports

This fixes the "mkdir is not a function" error and makes ZIP loading fully compatible with Bun.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-19 22:32:11 +00:00
riz 9c92da52d2 Add comprehensive debugging to ZIP deployment loading
- Add detailed debug logging throughout ZIP loading process
- Log ZIP file size, extraction progress, and file counts
- Track metadata parsing and content setup
- Monitor public files, server, site, and core file loading
- Add error logging with stack traces
- Log completion of each deployment step

This will help identify where the server startup is getting stuck during ZIP deployment loading.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-19 22:28:10 +00:00
riz 3630d3f337 Fix readdirAsync import error in deployment system
- Replace non-existent readdirAsync from fs-jetpack with Node.js fs/promises.readdir
- Remove readdirAsync from fs-jetpack imports
- Update loadFilesFromDirectory to use standard readdir function

Fixes SyntaxError: Export named 'readdirAsync' not found in module error when running deployment system.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-19 22:23:19 +00:00
riz 6c452af796 Update prod-zip usage to work with new ZIP file format
- Replace msgpack/gzip download with ZIP file download
- Add loadFromZip() method to extract and process ZIP deployments
- Maintain backward compatibility with legacy msgpack/gzip deployments
- Add proper file loading with binary/text detection
- Update has_gz() to check for both .zip and .gz files
- Clean up extracted directories after processing

New ZIP deployment workflow:
1. Download ZIP file instead of gzipped msgpack data
2. Extract ZIP to temporary directory
3. Load metadata.json for site configuration
4. Load files from public/, server/, site/, core/ directories
5. Set up deploy content structure compatible with existing code
6. Clean up temporary files

Benefits:
- No more buffer overflow issues with large deployments
- Better file organization in ZIP structure
- Easier debugging with extractable files
- Maintains full compatibility with existing deployment system
- Supports both new ZIP and legacy msgpack formats

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-19 22:13:32 +00:00
rizky 4af0fc3e52 fix deployed server database access crashes
- Create database proxy for deployed servers to handle null database gracefully
- Pass database connection (or proxy) to deployed server init function
- Deployed servers now get meaningful error messages instead of crashing
- Ensures app stability when database connection is unavailable

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-10 09:37:56 +07:00
Rizky ca8ba09889 fix 2024-11-14 18:44:16 +07:00
Rizky b9c5108384 fix pub data 2024-08-15 05:23:36 +07:00
Rizky c33e081841 fix 2024-08-08 14:45:18 +07:00
Rizky 2e168805e0 fix 2024-08-04 14:53:27 +07:00
Rizky 1f15dbe2bb fixing hex 2024-07-29 17:58:55 +07:00
Rizky 4367723a46 fix brotli cached 2024-06-28 00:09:21 +07:00
Rizky d781756ab9 fix brotli cache 2024-06-26 16:32:24 +07:00
Rizky be6a9e36af fix 2024-05-14 12:50:25 +07:00
Rizky 42343a3af9 fix deploy index 2024-04-26 06:20:43 +07:00
Rizky 0fc9c6b3fb fix deploy 2024-04-18 12:47:58 +07:00
Rizky 8374511aef add port 2024-04-17 21:28:40 +07:00
Rizky 6e749e38e3 fix 2024-04-17 20:37:20 +07:00
Rizky 1b77a5851d wip fix prasi api 2024-02-22 04:55:01 +07:00
Rizky 7e3134d5c0 wip fix 2024-02-15 06:30:16 +07:00
Rizky 3b553b8349 wip fix 2024-02-14 21:40:12 +07:00
Rizky e0dc47351b wip fix 2024-02-13 20:35:50 +07:00
Rizky a71b32a9a8 wip fix 2024-02-13 20:32:27 +07:00