mirror of
https://github.com/meteor/meteor.git
synced 2026-05-02 03:01:46 -04:00
Allow the other types of URLs that npm supports.
See for instance #844 for people running into the fact that our lack of support for git protocols means dealing with private npm packages is a pain.
This commit is contained in:
@@ -477,9 +477,10 @@ exports.isUrlWithFileScheme = function (x) {
|
||||
};
|
||||
|
||||
exports.isUrlWithSha = function (x) {
|
||||
// For now, just support http/https, which is at least less restrictive than
|
||||
// the old "github only" rule.
|
||||
return /^https?:\/\/.*[0-9a-f]{40}/.test(x);
|
||||
// These are the various protocols that NPM supports, which we use to download
|
||||
// both NPM and Cordova dependencies
|
||||
// See https://docs.npmjs.com/files/package.json#git-urls-as-dependencies
|
||||
return /^(https|git|git\+ssh|git\+http|git\+https)?:\/\/.*[0-9a-f]{40}/.test(x);
|
||||
};
|
||||
|
||||
exports.isPathRelative = function (x) {
|
||||
|
||||
Reference in New Issue
Block a user