mirror of
https://github.com/Eugeny/tabby.git
synced 2025-06-20 11:29:56 +00:00
use npms.io instead of npmjs.org for plugin search
This commit is contained in:
parent
1e902d734f
commit
9c6f2747aa
@ -72,13 +72,9 @@ export class PluginManagerService {
|
|||||||
|
|
||||||
listAvailable (query?: string): Observable<IPluginInfo[]> {
|
listAvailable (query?: string): Observable<IPluginInfo[]> {
|
||||||
return from(
|
return from(
|
||||||
axios.get(`https://www.npmjs.com/search?q=keywords%3A${KEYWORD}+${encodeURIComponent(query || '')}&from=0&size=1000`, {
|
axios.get(`https://api.npms.io/v2/search?q=keywords%3A${KEYWORD}+${encodeURIComponent(query || '')}&from=0&size=250`, {})
|
||||||
headers: {
|
|
||||||
'x-spiferack': '1',
|
|
||||||
}
|
|
||||||
})
|
|
||||||
).pipe(
|
).pipe(
|
||||||
map(response => response.data.objects.map(item => ({
|
map(response => response.data.results.map(item => ({
|
||||||
name: item.package.name.substring(NAME_PREFIX.length),
|
name: item.package.name.substring(NAME_PREFIX.length),
|
||||||
packageName: item.package.name,
|
packageName: item.package.name,
|
||||||
description: item.package.description,
|
description: item.package.description,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user