(output: string, entries: Entry[])
| 179 | } |
| 180 | |
| 181 | async function writeZip(output: string, entries: Entry[]) { |
| 182 | const writer = new ZipWriter(new BlobWriter("application/zip")) |
| 183 | for (const entry of entries) { |
| 184 | const data = entry.data ?? readFileSync(entry.path!) |
| 185 | await writer.add(entry.name, new BlobReader(new Blob([new Uint8Array(data)]))) |
| 186 | } |
| 187 | const zip = await writer.close() |
| 188 | writeFileSync(output, Buffer.from(await zip.arrayBuffer())) |
| 189 | } |
| 190 | |
| 191 | function initConsoleTransport() { |
| 192 | const write = log.transports.console.writeFn.bind(log.transports.console) |
no test coverage detected