Socket
Socket
Sign inDemoInstall

unzipper

Package Overview
Dependencies
Maintainers
1
Versions
76
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

unzipper - npm Package Compare versions

Comparing version 0.9.0-rc5 to 0.9.0-rc6

8

lib/parseOne.js

@@ -25,2 +25,6 @@ var Stream = require('stream');

found = true;
outStream.emit('entry',entry);
entry.on('error',function(e) {
outStream.emit('error',e);
});
entry.pipe(outStream)

@@ -37,3 +41,7 @@ .on('error',function(err) {

inStream.pipe(Parse(opts))
.on('error',function(err) {
outStream.emit('error',err);
})
.pipe(transform)
.on('error',Object) // Silence error as its already addressed in transform
.on('finish',function() {

@@ -40,0 +48,0 @@ if (!found)

2

lib/PullStream.js

@@ -59,3 +59,3 @@ var Stream = require('stream');

p.write(packet,function() {
if (!self.buffer.length) self.cb();
if (self.buffer.length === (eof.length || 0)) self.cb();
});

@@ -62,0 +62,0 @@ }

{
"name": "unzipper",
"version": "0.9.0-rc5",
"version": "0.9.0-rc6",
"description": "Unzip cross-platform streaming API ",

@@ -5,0 +5,0 @@ "author": "Evan Oxfeld <eoxfeld@gmail.com>",

@@ -1,17 +0,24 @@

var unzipper = require('./unzip')
var request = require('request')
const unzipper = require('./unzip');
const request = require('request');
const Stream = require('stream');
const fs = require('fs');
unzipper.Open.url(request, { url: 'https://tools.hana.ondemand.com/additional/sap-webide-personal-edition-1.45.3-prod-macosx.cocoa.x86_64.zip', headers: { Cookie: 'eula_3.1_agreed=tools.hana.ondemand.com/developer-license-3.1.txt' } })
.then(function (d) {
console.log('got',d)
var file = d.files.filter(function (d) {
return d.path === 'artifacts.xml';
})[0];
return file.buffer();
})
.then(function (d) {
console.log('hey',d.toString());
cb();
})
.catch((err) => console.log(err));
//request('http://geolite.maxmind.com/download/geoip/database/GeoLite2-City-CSV.zip')
fs.createReadStream('/home/zjonsson/Downloads/GeoLite2-City-CSV_20170207.zip')
.pipe(unzipper.Parse({}))
.pipe(Stream.Transform({
transform: (entry,e,cb) => {
console.log(entry)
let path = /\/(.*)$/.exec(entry.path)[1];
console.log(path);
entry.on('error', e => console.log(e))
.on('finish', () => console.log('done'));
entry.pipe(fs.createWriteStream(path))
.on('finish',() => cb());
},
objectMode: true
}))
setTimeout(()=>null,1000)
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc