Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

mozilla-download

Package Overview
Dependencies
Maintainers
2
Versions
26
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mozilla-download - npm Package Compare versions

Comparing version 0.4.1 to 0.4.2

19

lib/download.js

@@ -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 @@ }

6

package.json
{
"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",

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