Comparing version 0.2.3 to 0.2.4
@@ -31,2 +31,3 @@ /** | ||
path = require('path'), | ||
tmp = require('tmp'), | ||
spawn = require('child_process').spawn; | ||
@@ -123,8 +124,10 @@ | ||
ftpClient.get(name, function(error, stream) { | ||
var outfile = path.join(dependencyDir, name), | ||
writer = fs.createWriteStream(outfile); | ||
tmp.tmpName({ | ||
postfix: path.basename(name), | ||
tries: 10 | ||
}, function(err, outfile) { | ||
if (err) throw err; | ||
var writer = fs.createWriteStream(outfile); | ||
writer.on('error', onError); | ||
stream.on('error', onError); | ||
writer.on('close', function() { | ||
@@ -134,8 +137,14 @@ ftpClient.end(); | ||
console.log('Download complete!'); | ||
callback(outfile); | ||
}); | ||
stream.pipe(writer); | ||
}); | ||
writer.on('open', function() { | ||
ftpClient.get(name, function(error, stream) { | ||
if (error) throw error; | ||
stream.on('error', onError); | ||
stream.pipe(writer); | ||
}); | ||
}); | ||
}); | ||
} | ||
@@ -142,0 +151,0 @@ |
@@ -5,3 +5,3 @@ { | ||
"license": "MIT", | ||
"version": "0.2.3", | ||
"version": "0.2.4", | ||
"description": "Node bindings for the libxl library for reading and writing excel (XLS and XLSX) spreadsheets.", | ||
@@ -30,6 +30,6 @@ "keywords": [ | ||
"dependencies": { | ||
"nan": "~1.2.0", | ||
"ftp": "~0.3.0" | ||
"nan": "~1.3.0", | ||
"ftp": "~0.3.0", | ||
"tmp": "~0.0.24" | ||
} | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
968148
1705
3
+ Addedtmp@~0.0.24
+ Addednan@1.3.0(transitive)
+ Addedos-tmpdir@1.0.2(transitive)
+ Addedtmp@0.0.33(transitive)
- Removednan@1.2.0(transitive)
Updatednan@~1.3.0