Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/npm/cli.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'lib/view.js')
-rw-r--r--lib/view.js12
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/view.js b/lib/view.js
index 6b45cca2e..c2605cf0a 100644
--- a/lib/view.js
+++ b/lib/view.js
@@ -5,18 +5,18 @@ view.usage = "npm view pkg[@version] [<field>[.subfield]...]"
view.completion = function (opts, cb) {
if (opts.conf.argv.remain.length <= 2) {
- return mapToRegistry("-/short", npm.config, function (er, uri) {
+ return mapToRegistry("-/short", npm.config, function (er, uri, auth) {
if (er) return cb(er)
- registry.get(uri, null, cb)
+ npm.registry.get(uri, { auth : auth }, cb)
})
}
// have the package, get the fields.
var tag = npm.config.get("tag")
- mapToRegistry(opts.conf.argv.remain[2], npm.config, function (er, uri) {
+ mapToRegistry(opts.conf.argv.remain[2], npm.config, function (er, uri, auth) {
if (er) return cb(er)
- registry.get(uri, null, function (er, d) {
+ npm.registry.get(uri, { auth : auth }, function (er, d) {
if (er) return cb(er)
var dv = d.versions[d["dist-tags"][tag]]
, fields = []
@@ -97,10 +97,10 @@ function fetchAndRead (nv, args, silent, cb) {
var name = nv.name
, version = nv.rawSpec || npm.config.get("tag")
- mapToRegistry(name, npm.config, function (er, uri) {
+ mapToRegistry(name, npm.config, function (er, uri, auth) {
if (er) return cb(er)
- registry.get(uri, null, function (er, data) {
+ npm.registry.get(uri, { auth : auth }, function (er, data) {
if (er) return cb(er)
if (data["dist-tags"] && data["dist-tags"].hasOwnProperty(version)) {
version = data["dist-tags"][version]