@openveo/api
Advanced tools
Comparing version 3.0.2 to 3.0.3
@@ -0,1 +1,5 @@ | ||
# 3.0.3 / 2016-09-26 | ||
- Debug tar extract on large files by changing dependency | ||
# 3.0.2 / 2016-09-09 | ||
@@ -2,0 +6,0 @@ |
@@ -13,3 +13,3 @@ 'use strict'; | ||
var path = require('path'); | ||
var tar = require('tar'); | ||
var tar = require('tar-fs'); | ||
@@ -217,2 +217,3 @@ /** | ||
var streamError; | ||
var extractDone = false; | ||
@@ -229,9 +230,7 @@ callback = callback || function(error) { | ||
// Prepare the extractor with destination path | ||
var extractor = tar.Extract( | ||
{ | ||
path: path.normalize(destinationPath) | ||
} | ||
); | ||
var extractor = tar.extract(path.normalize(destinationPath)); | ||
var onError = function(error) { | ||
process.logger.error(error); | ||
process.logger.debug('Extract error'); | ||
if (extractTimeout) | ||
@@ -245,3 +244,5 @@ clearTimeout(extractTimeout); | ||
// Handle extraction end | ||
extractor.on('end', function() { | ||
extractor.on('finish', function() { | ||
extractDone = true; | ||
process.logger.debug('extractor end'); | ||
if (extractTimeout) | ||
@@ -261,6 +262,8 @@ clearTimeout(extractTimeout); | ||
tarFileReadableStream.on('close', function(chunk) { | ||
process.logger.debug('stream closed'); | ||
// In case of a broken archive, the readable stream close event is dispatched but not the close event of the | ||
// writable stream, wait for 10 seconds and dispatch an error if writable stream is still not closed | ||
extractTimeout = setTimeout(onError, 10000, new Error('Unexpected end of archive')); | ||
if (!extractDone) | ||
extractTimeout = setTimeout(onError, 30000, new Error('Unexpected end of archive')); | ||
@@ -267,0 +270,0 @@ }); |
{ | ||
"name": "@openveo/api", | ||
"version": "3.0.2", | ||
"version": "3.0.3", | ||
"description": "API for OpenVeo plugins", | ||
@@ -22,3 +22,3 @@ "keywords": [ | ||
"dependencies": { | ||
"tar": "2.2.1" | ||
"tar-fs": "1.13.2" | ||
}, | ||
@@ -25,0 +25,0 @@ "devDependencies": { |
@@ -19,3 +19,3 @@ # OpenVeo API | ||
Documentation is available on [Github pages](http://veo-labs.github.io/openveo-api/3.0.2). | ||
Documentation is available on [Github pages](http://veo-labs.github.io/openveo-api/3.0.3). | ||
@@ -22,0 +22,0 @@ # Contributors |
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
136847
2891
+ Addedtar-fs@1.13.2
+ Addedbl@1.2.3(transitive)
+ Addedbuffer-alloc@1.2.0(transitive)
+ Addedbuffer-alloc-unsafe@1.1.0(transitive)
+ Addedbuffer-fill@1.0.0(transitive)
+ Addedcore-util-is@1.0.3(transitive)
+ Addedend-of-stream@1.4.4(transitive)
+ Addedfs-constants@1.0.0(transitive)
+ Addedisarray@1.0.0(transitive)
+ Addedprocess-nextick-args@2.0.1(transitive)
+ Addedpump@1.0.3(transitive)
+ Addedreadable-stream@2.3.8(transitive)
+ Addedsafe-buffer@5.1.25.2.1(transitive)
+ Addedstring_decoder@1.1.1(transitive)
+ Addedtar-fs@1.13.2(transitive)
+ Addedtar-stream@1.6.2(transitive)
+ Addedto-buffer@1.1.1(transitive)
+ Addedutil-deprecate@1.0.2(transitive)
+ Addedxtend@4.0.2(transitive)
- Removedtar@2.2.1
- Removedbalanced-match@1.0.2(transitive)
- Removedblock-stream@0.0.9(transitive)
- Removedbrace-expansion@1.1.11(transitive)
- Removedconcat-map@0.0.1(transitive)
- Removedfs.realpath@1.0.0(transitive)
- Removedfstream@1.0.12(transitive)
- Removedglob@7.2.3(transitive)
- Removedgraceful-fs@4.2.11(transitive)
- Removedinflight@1.0.6(transitive)
- Removedminimatch@3.1.2(transitive)
- Removedpath-is-absolute@1.0.1(transitive)
- Removedrimraf@2.7.1(transitive)
- Removedtar@2.2.1(transitive)