mozilla-download
Advanced tools
Comparing version 0.4.1 to 0.4.2
@@ -10,2 +10,6 @@ var mozget = require('mozilla-get-url'), | ||
var DEFAULT_VERSION = 'nightly'; | ||
// Used as the socket timeout | ||
var TIMEOUT = 60 * 60 * 1000; // 1 min | ||
// delay to display a dot when receiving data | ||
var DOWNLOAD_FEEDBACK_DELAY = 1000; | ||
@@ -42,3 +46,3 @@ /** | ||
var stream = fs.createWriteStream(tmpPath); | ||
http.get(url, function(res) { | ||
var request = http.get(url, function(res) { | ||
debug('opened http connection downloading...', path); | ||
@@ -48,6 +52,19 @@ res.pipe(stream); | ||
stream.on('close', function() { | ||
process.stdout.write('\n'); | ||
debug('done downloading extract', url, tmpPath, path); | ||
extract(product, url, tmpPath, path, callback); | ||
}); | ||
var timeout; | ||
res.on('data', function() { | ||
if (!timeout) { | ||
timeout = setTimeout(function() { | ||
process.stdout.write('.'); | ||
timeout = undefined; | ||
}, 1000); | ||
} | ||
}); | ||
}); | ||
request.setTimeout(TIMEOUT, function() { request.abort(); }); | ||
}); | ||
@@ -54,0 +71,0 @@ } |
{ | ||
"name": "mozilla-download", | ||
"version": "0.4.1", | ||
"version": "0.4.2", | ||
"author": "James Lal [:lightsofapollo]", | ||
@@ -21,4 +21,4 @@ "description": "Download firefox/b2g-desktop runtimes", | ||
"dependencies" : { | ||
"debug": "*", | ||
"mozilla-get-url": "0.2.0", | ||
"debug": "~1.0.3", | ||
"mozilla-get-url": "0.3.0", | ||
"dmg": "~0.0.3", | ||
@@ -25,0 +25,0 @@ "tmp": "~0.0.20", |
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
Wildcard dependency
QualityPackage has a dependency with a floating version range. This can cause issues if the dependency publishes a new major version.
Found 1 instance in 1 package
21032
533
1
+ Addeddebug@1.0.5(transitive)
+ Addedms@2.0.0(transitive)
- Removedasync@0.2.10(transitive)
- Removeddebug@0.7.44.4.0(transitive)
- Removedduplexer@0.1.2(transitive)
- Removedevent-stream@3.0.20(transitive)
- Removedfrom@0.1.7(transitive)
- Removedjsftp@1.1.1(transitive)
- Removedmap-stream@0.0.7(transitive)
- Removedmozilla-get-url@0.2.0(transitive)
- Removedms@2.1.3(transitive)
- Removedparse-listing@1.0.1(transitive)
- Removedpause-stream@0.0.11(transitive)
- Removedsplit@0.2.10(transitive)
- Removedstream-combiner@0.0.4(transitive)
- Removedthrough@2.3.8(transitive)
Updateddebug@~1.0.3
Updatedmozilla-get-url@0.3.0