Revert "use npms.io instead of npmjs.org for plugin search"

This reverts commit 9c6f2747aa.
This commit is contained in:
Eugene Pankov 2018-10-08 11:30:52 +02:00
parent 441164363f
commit c2f4c343a7

View File

@ -72,9 +72,13 @@ export class PluginManagerService {
listAvailable (query?: string): Observable<IPluginInfo[]> {
return from(
axios.get(`https://api.npms.io/v2/search?q=keywords%3A${KEYWORD}+${encodeURIComponent(query || '')}&from=0&size=250`, {})
axios.get(`https://www.npmjs.com/search?q=keywords%3A${KEYWORD}+${encodeURIComponent(query || '')}&from=0&size=1000`, {
headers: {
'x-spiferack': '1',
}
})
).pipe(
map(response => response.data.results.map(item => ({
map(response => response.data.objects.map(item => ({
name: item.package.name.substring(NAME_PREFIX.length),
packageName: item.package.name,
description: item.package.description,