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:
authorisaacs <i@izs.me>2011-08-15 00:05:26 +0400
committerisaacs <i@izs.me>2011-08-15 00:05:26 +0400
commit0e3bb9e5da92f760ab2806cb7509e9760c49f5b6 (patch)
tree129735be80c7dd37366bab87408bc7e66d234892
parent6f7a5d3c9d577f067880a1997cdc46e3e79c6d84 (diff)
Use the non-delta uri for inital search index build
-rw-r--r--lib/utils/npm-registry-client/get.js6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/utils/npm-registry-client/get.js b/lib/utils/npm-registry-client/get.js
index 32a60ca85..7a4453900 100644
--- a/lib/utils/npm-registry-client/get.js
+++ b/lib/utils/npm-registry-client/get.js
@@ -76,12 +76,14 @@ function requestAll_ (c, data, cb) {
cb = function () {}
}
+ var uri = "/-/all/since?stale=update_after&startkey=" + c
+
if (c === 0) {
log.warn("Building the index for the first time, please be patient")
+ uri = "/-/all"
}
- var uri = "/-/all/since?stale=update_after&startkey=" + c
- , cache = path.join(npm.cache, "-/all", ".cache.json")
+ var cache = path.join(npm.cache, "-/all", ".cache.json")
GET(uri, function (er, updates, _, res) {
if (er) return cb(er, data)
var headers = res.headers