Added multiple location option to package management dialog (#9790)

* Added multiple location option to package management dialog
This commit is contained in:
Leila Lali
2020-04-01 13:33:45 -07:00
committed by GitHub
parent 0bfbdc62ed
commit dd56908a06
25 changed files with 728 additions and 231 deletions

View File

@@ -51,13 +51,56 @@ export interface IPackageOverview {
summary: string;
}
export interface IPackageManageProvider {
providerId: string;
packageTarget: IPackageTarget;
listPackages(): Promise<IPackageDetails[]>
installPackages(package: IPackageDetails[], useMinVersion: boolean): Promise<void>;
uninstallPackages(package: IPackageDetails[]): Promise<void>;
canUseProvider(): Promise<boolean>;
getLocationTitle(): Promise<string>;
getPackageOverview(packageName: string): Promise<IPackageOverview>
export interface IPackageLocation {
name: string;
displayName: string;
}
/**
* Package manage provider interface
*/
export interface IPackageManageProvider {
/**
* Provider id
*/
providerId: string;
/**
* package target
*/
packageTarget: IPackageTarget;
/**
* Returns list of installed packages
*/
listPackages(location?: string): Promise<IPackageDetails[]>;
/**
* Installs give packages
* @param package Packages to install
* @param useMinVersion if true, minimal version will be used
*/
installPackages(package: IPackageDetails[], useMinVersion: boolean, location?: string): Promise<void>;
/**
* Uninstalls given packages
* @param package package to uninstall
*/
uninstallPackages(package: IPackageDetails[], location?: string): Promise<void>;
/**
* Returns true if the provider can be used in current context
*/
canUseProvider(): Promise<boolean>;
/**
* Returns location title
*/
getLocations(): Promise<IPackageLocation[]>;
/**
* Returns Package Overview
* @param packageName package name
*/
getPackageOverview(packageName: string): Promise<IPackageOverview>;
}