Commit Graph

210 Commits

Author SHA1 Message Date
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 74a70e99ca fix database connection error handling to prevent app crashes
- Add proper error handling in database connection attempts
- Set g.db to null when connection fails to prevent subsequent crashes
- Add null check in execQuery to throw meaningful error when DB unavailable
- Improve API endpoint to return 503 status when database is unavailable
- Enhanced logging for better debugging of connection issues

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-10 09:07:03 +07:00
Rizky a09cf17451 fix record 2024-12-11 16:38:22 +07:00
Rizky 4687513434 fix 2024-12-11 13:18:21 +07:00
Rizky e93779ebf7 fixing compression 2024-12-11 11:17:14 +07:00
Rizky f3d020b031 fix 2024-12-04 14:45:05 +07:00
Rizky 2299073e4a undo csp 2024-11-14 22:13:07 +07:00
Rizky 0ae6dc5743 csp 2024-11-14 21:37:31 +07:00
Rizky 949b61a05a fix 2024-11-14 21:34:15 +07:00
Rizky 6f31086970 fix 2024-11-14 21:33:04 +07:00
Rizky e0c4ce8d01 checkpoint 2024-11-14 21:15:12 +07:00
Rizky ca8ba09889 fix 2024-11-14 18:44:16 +07:00
Rizky 0801109562 fix 2024-11-13 17:25:05 +07:00
Rizky 67deac8114 adding batch upsert to server.ts 2024-11-08 14:34:47 +07:00
Rizky 4bf174a09c fix batch upsert 2024-10-09 14:16:03 +07:00
Rizky 0825b55d82 fix 2024-08-29 10:10:49 +07:00
Rizky 1cca29d504 fix 2024-08-20 11:29:11 +07:00
Rizky cfa5cbf677 fix 2024-08-19 21:41:05 +07:00
Rizky b5be015424 fix 2024-08-19 20:52:04 +07:00
Rizky 1011d293b8 fix 2024-08-19 20:46:57 +07:00
Rizky 72c9212d9e fix 2024-08-19 20:17:23 +07:00
Rizky cd856a75f3 fix 2024-08-19 20:08:58 +07:00
Rizky 9a562eeb76 fix 2024-08-17 14:30:15 +07:00
Rizky 599ec7b777 fix subprocess 2024-08-15 21:42:34 +07:00
Rizky ff139e3846 fix 2024-08-15 21:35:52 +07:00
Rizky 69d2a57d07 fix 2024-08-15 21:32:24 +07:00
Rizky 13c691a286 fix 2024-08-15 21:30:37 +07:00
Rizky 07d5613aa1 fix 2024-08-15 21:29:07 +07:00
Rizky f9f47d861c fix 2024-08-15 21:19:18 +07:00
Rizky 08b5c64b3c fix 2024-08-15 21:15:19 +07:00
Rizky bc2a454bd0 fix restart delay 2024-08-15 06:05:01 +07:00
Rizky 02239da2e2 fix restart delay 2024-08-15 06:04:23 +07:00
Rizky b9c5108384 fix pub data 2024-08-15 05:23:36 +07:00
Rizky 700cc0887c fix batch upsert no return deleted 2024-08-12 11:12:42 +07:00
Rizky 78a4141dc8 fix mode batch upsert 2024-08-12 10:50:33 +07:00
Rizky e23a4a2977 fix query 2024-08-12 10:15:23 +07:00
Rizky 9c04dadf03 update finfo 2024-08-10 18:24:30 +07:00
Rizky 986ac4cb27 update finfo 2024-08-10 06:30:26 +07:00
Rizky 7816056529 update finfo 2024-08-10 06:27:43 +07:00
Rizky c9a16eefca add finfo 2024-08-10 06:22:35 +07:00
Rizky 3f79c2234c fix 2024-08-09 09:23:35 +07:00
Rizky 595735b1a4 fix 2024-08-08 16:26:12 +07:00
Rizky b7ae338e59 fix 2024-08-08 16:22:43 +07:00
Rizky 6bc5db089a fix 2024-08-08 16:22:17 +07:00