1
1
mirror of https://github.com/Eugeny/tabby.git synced 2024-12-24 11:02:47 +03:00

plugin manages fixes

This commit is contained in:
Eugene Pankov 2017-06-20 23:58:42 +02:00
parent 5e2dae153e
commit 1a7437ed7c
2 changed files with 3 additions and 2 deletions

View File

@ -5,7 +5,7 @@ module.exports = {
name: 'terminus',
target: 'node',
entry: {
'index.ignore': 'file-loader?name=index.html!pug-html-loader!' + path.resolve(__dirname, './index.pug'),
'index.ignore': 'file-loader?name=index.html!val-loader!pug-html-loader!' + path.resolve(__dirname, './index.pug'),
'preload': path.resolve(__dirname, 'src/entry.preload.ts'),
'bundle': path.resolve(__dirname, 'src/entry.ts'),
},

View File

@ -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),