mozilla-get-url
Advanced tools
Comparing version 0.4.2 to 0.4.3
@@ -49,3 +49,3 @@ var fsPath = require('path'), | ||
} | ||
callback(null, urls.httpUrl(path)); | ||
callback(null, urls.httpUrl(options.host, path)); | ||
}); | ||
@@ -52,0 +52,0 @@ } |
@@ -55,3 +55,3 @@ var fsPath = require('path'), | ||
if (err) return callback(err); | ||
callback(null, urls.httpUrl(path)); | ||
callback(null, urls.httpUrl(options.host, path)); | ||
}); | ||
@@ -58,0 +58,0 @@ } |
@@ -60,3 +60,3 @@ var fsPath = require('path'), | ||
} else { | ||
fireCallback(null, urls.httpUrl(path)); | ||
fireCallback(null, urls.httpUrl(options.host, path)); | ||
} | ||
@@ -63,0 +63,0 @@ }); |
@@ -42,3 +42,3 @@ var urls = require('../urls'), | ||
callback(null, urls.httpUrl(path)); | ||
callback(null, urls.httpUrl(options.host, path)); | ||
}); | ||
@@ -45,0 +45,0 @@ }); |
@@ -0,1 +1,3 @@ | ||
var FTP_HOST = require("./urls").FTP_HOST; | ||
/** | ||
@@ -15,3 +17,4 @@ Shared helpers for handling options across channels | ||
language: 'en-US', | ||
channel: 'release' | ||
channel: 'release', | ||
host: FTP_HOST | ||
}; | ||
@@ -18,0 +21,0 @@ |
@@ -1,2 +0,3 @@ | ||
var fsPath = require('path'); | ||
var fsPath = require('path'), | ||
url = require('url'); | ||
@@ -6,7 +7,2 @@ var PREFIX = 'pub/mozilla.org'; | ||
/** | ||
where we serve all content from over http | ||
*/ | ||
var HTTP_URL = 'http://ftp.mozilla.org'; | ||
/** | ||
where we serve ftp content (used instead of scraping html) | ||
@@ -16,4 +12,4 @@ */ | ||
function httpUrl(uri) { | ||
return HTTP_URL + '/' + uri; | ||
function httpUrl(host, uri) { | ||
return ["http:/", (host || FTP_HOST), uri ].join('/'); | ||
} | ||
@@ -27,3 +23,2 @@ | ||
module.exports = { | ||
HTTP_URL: HTTP_URL, | ||
FTP_HOST: FTP_HOST, | ||
@@ -30,0 +25,0 @@ PUB_PREFIX: PREFIX, |
{ | ||
"name": "mozilla-get-url", | ||
"version": "0.4.2", | ||
"version": "0.4.3", | ||
"description": "Utility to get the url of a particular version/release of a mozilla product (like firefox/b2g)", | ||
@@ -5,0 +5,0 @@ "main": "lib/locate.js", |
Sorry, the diff of this file is not supported yet
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
18871
460
1