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/search.js')
-rw-r--r--lib/search.js18
1 files changed, 9 insertions, 9 deletions
diff --git a/lib/search.js b/lib/search.js
index 5dd060f82..d2ce9a3c0 100644
--- a/lib/search.js
+++ b/lib/search.js
@@ -2,8 +2,7 @@
module.exports = exports = search
var npm = require("./npm.js")
- , registry = npm.registry
- , columnify = require('columnify')
+ , columnify = require("columnify")
, mapToRegistry = require("./utils/map-to-registry.js")
search.usage = "npm search [some search terms ...]"
@@ -58,15 +57,16 @@ function search (args, silent, staleness, cb) {
}
function getFilteredData (staleness, args, notArgs, cb) {
- var opts = {
- timeout : staleness,
- follow : true,
- staleOk : true
- }
- mapToRegistry("-/all", npm.config, function (er, uri) {
+ mapToRegistry("-/all", npm.config, function (er, uri, auth) {
if (er) return cb(er)
- registry.get(uri, opts, function (er, data) {
+ var params = {
+ timeout : staleness,
+ follow : true,
+ staleOk : true,
+ auth : auth
+ }
+ npm.registry.getAll(uri, params, function (er, data) {
if (er) return cb(er)
return cb(null, filter(data, args, notArgs))
})