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>
This commit is contained in:
riz 2025-11-19 22:41:01 +00:00
parent de2537d84a
commit 2bd87e614d
1 changed files with 6 additions and 2 deletions

View File

@ -339,10 +339,14 @@ export const deploy = {
console.log(`[DEBUG] ZIP processing completed: ${loadedFiles} files loaded`); console.log(`[DEBUG] ZIP processing completed: ${loadedFiles} files loaded`);
if (!foundMetadata) { if (!foundMetadata) {
console.log(`[DEBUG] Available files in ZIP:`); console.log(`[DEBUG] Available files in ZIP (${zipEntries.length} total entries):`);
for (const entry of zipEntries) { for (const entry of zipEntries) {
console.log(`[DEBUG] - ${entry.filename}`); console.log(`[DEBUG] - ${entry.filename} (size: ${entry.uncompressedSize} bytes)`);
} }
// Let's also try to find any JSON files
const jsonFiles = zipEntries.filter(entry => entry.filename.endsWith('.json'));
console.log(`[DEBUG] JSON files found: ${jsonFiles.length}`);
jsonFiles.forEach(entry => console.log(`[DEBUG] - ${entry.filename}`));
throw new Error("metadata.json not found in ZIP file"); throw new Error("metadata.json not found in ZIP file");
} }