(imageName: string)
| 96 | * Extract an image from the active ZIP archive. |
| 97 | */ |
| 98 | export async function extractZipImage(imageName: string): Promise<File | null> { |
| 99 | if (!activeArchive || !activeImageIndex) { |
| 100 | return null; |
| 101 | } |
| 102 | |
| 103 | const entry = findZipEntry(imageName, activeImageIndex); |
| 104 | if (!entry) { |
| 105 | return null; |
| 106 | } |
| 107 | |
| 108 | try { |
| 109 | return await entry.extract(); |
| 110 | } catch (err) { |
| 111 | appLogger.warn(`[ZIP] Failed to extract ${imageName}:`, err); |
| 112 | return null; |
| 113 | } |
| 114 | } |
no test coverage detected