"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "tabby-plugin-manager/src/services/pluginManager.service.ts" between
tabby-1.0.181.tar.gz and tabby-1.0.183.tar.gz

About: Tabby is a modern cross-platform terminal emulator, SSH and serial client.

pluginManager.service.ts  (tabby-1.0.181):pluginManager.service.ts  (tabby-1.0.183)
import axios from 'axios' import axios from 'axios'
import { compare as semverCompare } from 'semver' import { compare as semverCompare } from 'semver'
import { Observable, from, forkJoin, map } from 'rxjs' import { Observable, from, forkJoin, map, of } from 'rxjs'
import { Injectable, Inject } from '@angular/core' import { Injectable, Inject } from '@angular/core'
import { Logger, LogService, PlatformService, BOOTSTRAP_DATA, BootstrapData, Plu ginInfo } from 'tabby-core' import { Logger, LogService, PlatformService, BOOTSTRAP_DATA, BootstrapData, Plu ginInfo } from 'tabby-core'
import { PLUGIN_BLACKLIST } from '../../../app/src/pluginBlacklist' import { PLUGIN_BLACKLIST } from '../../../app/src/pluginBlacklist'
const OFFICIAL_NPM_ACCOUNT = 'eugenepankov' const OFFICIAL_NPM_ACCOUNT = 'eugenepankov'
@Injectable({ providedIn: 'root' }) @Injectable({ providedIn: 'root' })
export class PluginManagerService { export class PluginManagerService {
logger: Logger logger: Logger
userPluginsPath: string userPluginsPath: string
skipping to change at line 47 skipping to change at line 47
return false return false
} }
names.add(item.name) names.add(item.name)
return true return true
}) })
}), }),
map(x => x.sort((a, b) => a.name.localeCompare(b.name))), map(x => x.sort((a, b) => a.name.localeCompare(b.name))),
) )
} }
listInstalled (query: string): Observable<PluginInfo[]> {
return of(this.installedPlugins.filter(x=>x.name.includes(query)))
}
_listAvailableInternal (namePrefix: string, keyword: string, query?: string) : Observable<PluginInfo[]> { _listAvailableInternal (namePrefix: string, keyword: string, query?: string) : Observable<PluginInfo[]> {
return from( return from(
axios.get(`https://api.npms.io/v2/search?q=keywords%3A${keyword}+${e ncodeURIComponent(query ?? '')}&size=250`) axios.get(`https://api.npms.io/v2/search?q=keywords%3A${keyword}+${e ncodeURIComponent(query ?? '')}&size=250`)
).pipe( ).pipe(
map(response => response.data.results map(response => response.data.results
.filter(item => !item.keywords?.includes('tabby-dummy-transition -plugin')) .filter(item => !item.keywords?.includes('tabby-dummy-transition -plugin'))
.map(item => ({ .map(item => ({
name: item.package.name.substring(namePrefix.length), name: item.package.name.substring(namePrefix.length),
packageName: item.package.name, packageName: item.package.name,
description: item.package.description, description: item.package.description,
 End of changes. 2 change blocks. 
1 lines changed or deleted 5 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)