chore(edit-demo): ensure proper tree expansion state

This commit is contained in:
Elian Doran
2026-04-11 10:32:27 +03:00
parent e27f5cd419
commit 9366d351e0
4 changed files with 6240 additions and 6185 deletions

View File

@@ -103,6 +103,14 @@ function waitForEnd(archive: Archiver, stream: WriteStream) {
});
}
export async function createZipFromDirectory(dirPath: string, zipPath: string) {
const archive = archiver("zip", { zlib: { level: 5 } });
const outputStream = fsExtra.createWriteStream(zipPath);
archive.directory(dirPath, false);
archive.pipe(outputStream);
await waitForEnd(archive, outputStream);
}
export async function extractZip(zipFilePath: string, outputPath: string, ignoredFiles?: Set<string>) {
const promise = deferred<void>();
setTimeout(async () => {