
Security News
Axios Supply Chain Attack Reaches OpenAI macOS Signing Pipeline, Forces Certificate Rotation
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.
A fork of npm module easy-zip with enhanced folder zipping options.
npm install folder-zip
Zip a folder
var options = {
excludeParentFolder: true, //Default : false. if true, the content will be zipped excluding parent folder.
parentFolderName: 'v1.0' //if specified, the content will be zipped, within the 'v1.0' folder
};
//zip a folder and change folder destination name
var zip = new FolderZip();
zip.zipFolder('../folder-zip', options, function(){
zip.writeToFile('folderall.zip');
});
Add text
var FolderZip = require('folder-zip');
var zip = new FolderZip();
zip.file('hello.txt','Hello World!'); //add text
zip.writeToFile('text.zip');
Add folder
var zip = new FolderZip();
var jsFolder = zip.folder('js');
jsFolder.file('hello.js','alert("hello world")');
jsFolder.writeToFile('folder.zip');
Add file
var folderZip = new FolderZip();
folderZip.addFile('main.js','index.js',function(){
folderZip.writeToFileSync('file.zip');
});
Add files in batches
var files = [
{source : 'index.js',target:'index.js'},
{target : 'img'},//if source is null,means make a folder
{source : 'jszip.js',target:'lib/tmp.js'}
];
var folderZip = new FolderZip();
folderZip.batchAdd(files,function(){
folderZip.writeToFile('batchadd.zip');
});
Write data to http.Response
folderZip.writeToResponse(response, 'attachment.zip');
Write to file sync
folderZip.writeToFileSync(filePath);
To run the test suite, first install the dependencies, then run npm test:
npm install
npm test
FAQs
npm for enhanced folder zipping
We found that folder-zip demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.

Security News
Open source is under attack because of how much value it creates. It has been the foundation of every major software innovation for the last three decades. This is not the time to walk away from it.

Security News
Socket CEO Feross Aboukhadijeh breaks down how North Korea hijacked Axios and what it means for the future of software supply chain security.