mirror of
https://github.com/Eugeny/tabby.git
synced 2025-10-04 05:54:57 +00:00
plugin manages fixes
This commit is contained in:
@@ -5,6 +5,7 @@ import { exec } from 'mz/child_process'
|
||||
import axios from 'axios'
|
||||
|
||||
const NAME_PREFIX = 'terminus-'
|
||||
const KEYWORD = 'terminus-plugin'
|
||||
|
||||
export interface IPluginInfo {
|
||||
name: string
|
||||
@@ -42,7 +43,7 @@ export class PluginManagerService {
|
||||
listAvailable (query?: string): Observable<IPluginInfo[]> {
|
||||
return Observable
|
||||
.fromPromise(
|
||||
axios.get(`https://www.npmjs.com/-/search?text=${NAME_PREFIX}+${encodeURIComponent(query || '')}&from=0&size=1000`)
|
||||
axios.get(`https://www.npmjs.com/-/search?text=keywords:${KEYWORD}+${encodeURIComponent(query || '')}&from=0&size=1000`)
|
||||
)
|
||||
.map(response => response.data.objects.map(item => ({
|
||||
name: item.package.name.substring(NAME_PREFIX.length),
|
||||
|
Reference in New Issue
Block a user