import archiver from 'archiver';
archiver.registerFormat('zip-encrypted', require('archiver-zip-encrypted'));
const archive = archiver.create('zip-encrypted', {
zlib: { level: 8 },
encryptionMethod: 'aes256',
password: 'n.ddsadc3ch',
});
const entry = path.join(process.cwd(), 'app/dist/sourcemaps');
const output = fs.createWriteStream(path.join(process.cwd(), 'app/dist/sourcemaps.zip'));
archive.pipe(output);
archive.directory(entry, 'sourcemaps');
archive.finalize();
Above codes show how can I zip files with password
I want to unzip this file named sourcemaps.zip. I used unzipper and adm-zip. all of them tell me the password 'n.ddsadc3ch' is bad password. but I can use it unzip this file on Finder macOS. so How can i unzip this file?
Above codes show how can I zip files with password
I want to unzip this file named
sourcemaps.zip. I usedunzipperandadm-zip. all of them tell me the password 'n.ddsadc3ch' is bad password. but I can use it unzip this file on Finder macOS. so How can i unzip this file?