diff options
author | Forrest L Norvell <forrest@npmjs.com> | 2014-05-24 10:38:44 +0400 |
---|---|---|
committer | Forrest L Norvell <forrest@npmjs.com> | 2014-06-13 23:41:12 +0400 |
commit | 626c3e4a7fb37159b79ab9b3af2c030f26540b0f (patch) | |
tree | 2b92e072dd5246840de5dfb838daaeeff76804d3 /lib/repo.js | |
parent | 4cd935df5467e0d4caaf84f5e894f6aa4f5def57 (diff) |
use the new URL-based npm-registry-client interface
Diffstat (limited to 'lib/repo.js')
-rw-r--r-- | lib/repo.js | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/repo.js b/lib/repo.js index a2ec99bb0..18b80615e 100644 --- a/lib/repo.js +++ b/lib/repo.js @@ -5,7 +5,8 @@ repo.usage = "npm repo <pkgname>" repo.completion = function (opts, cb) { if (opts.conf.argv.remain.length > 2) return cb() - registry.get("/-/short", 60000, function (er, list) { + var uri = url_.resolve(npm.config.get("registry"), "/-/short") + registry.get(uri, { timeout : 60000 }, function (er, list) { return cb(null, list || []) }) } @@ -52,7 +53,8 @@ function getUrlAndOpen (d, cb) { } function callRegistry (n, cb) { - registry.get(n + "/latest", 3600, function (er, d) { + var uri = url_.resolve(npm.config.get("registry"), n + "/latest") + registry.get(uri, { timeout : 3600 }, function (er, d) { if (er) return cb(er) getUrlAndOpen(d, cb) }) |