feat: publish Toolbox 0.7.0
This commit is contained in:
@@ -2,7 +2,7 @@ import { createReadStream, createWriteStream } from 'node:fs';
|
||||
import { mkdir, readdir, stat } from 'node:fs/promises';
|
||||
import path from 'node:path';
|
||||
import { pipeline } from 'node:stream/promises';
|
||||
import archiver from 'archiver';
|
||||
import { ZipArchive } from 'archiver';
|
||||
import {
|
||||
canonicalExistingPath,
|
||||
canonicalPathsOverlap,
|
||||
@@ -56,7 +56,7 @@ export async function createStaticArchive(inputDirectory, outputFile) {
|
||||
throw new Error(`Archive input is not a directory: ${source}`);
|
||||
await mkdir(path.dirname(output), { recursive: true });
|
||||
|
||||
const archive = archiver('zip', { zlib: { level: 9 } });
|
||||
const archive = new ZipArchive({ zlib: { level: 9 } });
|
||||
const destination = createWriteStream(output, { flags: 'wx' });
|
||||
archive.on('warning', (error) => {
|
||||
if (error.code !== 'ENOENT') destination.destroy(error);
|
||||
|
||||
Reference in New Issue
Block a user