diff options
author | isaacs <i@izs.me> | 2011-08-15 00:05:26 +0400 |
---|---|---|
committer | isaacs <i@izs.me> | 2011-08-15 00:05:26 +0400 |
commit | 0e3bb9e5da92f760ab2806cb7509e9760c49f5b6 (patch) | |
tree | 129735be80c7dd37366bab87408bc7e66d234892 | |
parent | 6f7a5d3c9d577f067880a1997cdc46e3e79c6d84 (diff) |
Use the non-delta uri for inital search index build
-rw-r--r-- | lib/utils/npm-registry-client/get.js | 6 |
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 |