mirror of
https://github.com/verdaccio/verdaccio.git
synced 2025-03-25 02:32:52 -05:00
Merge pull request #152 from Verikon/master
Allows retrieval of all local package contents via http://server/-/search/~
This commit is contained in:
commit
ee2439d8da
1 changed files with 3 additions and 2 deletions
|
@ -12,7 +12,9 @@ function Search() {
|
|||
}
|
||||
|
||||
Search.prototype.query = function(q) {
|
||||
return this.index.search(q)
|
||||
return q === '*'
|
||||
? this.storage.config.localList.get().map( function( package ){ return { ref: package, score: 1 }; } )
|
||||
: this.index.search(q);
|
||||
}
|
||||
|
||||
Search.prototype.add = function(package) {
|
||||
|
@ -45,4 +47,3 @@ Search.prototype.configureStorage = function(storage) {
|
|||
}
|
||||
|
||||
module.exports = Search()
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue