Replace npms with npm registry

This commit is contained in:
Thomas LACAZE 2022-08-20 21:32:59 +02:00 committed by Eugene
parent 0d71cebb7e
commit 166fc2e78b

View File

@ -51,9 +51,9 @@ export class PluginManagerService {
_listAvailableInternal (namePrefix: string, keyword: string, query?: string): Observable<PluginInfo[]> {
return from(
axios.get(`https://api.npms.io/v2/search?q=keywords%3A${keyword}+${encodeURIComponent(query ?? '')}&size=250`)
axios.get(`https://registry.npmjs.com/-/v1/search?text=keywords%3A${keyword}%20${query}&size=250`)
).pipe(
map(response => response.data.results
map(response => response.data.objects
.filter(item => !item.keywords?.includes('tabby-dummy-transition-plugin'))
.map(item => ({
name: item.package.name.substring(namePrefix.length),