mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-03-28 15:50:29 -04:00
Refresh master with initial release/0.24 snapshot (#332)
* Initial port of release/0.24 source code * Fix additional headers * Fix a typo in launch.json
This commit is contained in:
@@ -79,6 +79,12 @@ export interface IView {
|
||||
name: string;
|
||||
}
|
||||
|
||||
export interface IColor {
|
||||
id: string;
|
||||
description: string;
|
||||
defaults: { light: string, dark: string, highContrast: string };
|
||||
}
|
||||
|
||||
export interface IExtensionContributions {
|
||||
commands?: ICommand[];
|
||||
configuration?: IConfiguration;
|
||||
@@ -90,7 +96,9 @@ export interface IExtensionContributions {
|
||||
menus?: { [context: string]: IMenu[] };
|
||||
snippets?: ISnippet[];
|
||||
themes?: ITheme[];
|
||||
iconThemes?: ITheme[];
|
||||
views?: { [location: string]: IView[] };
|
||||
colors: IColor[];
|
||||
}
|
||||
|
||||
export interface IExtensionManifest {
|
||||
@@ -127,10 +135,14 @@ export interface IGalleryExtensionAssets {
|
||||
license: IGalleryExtensionAsset;
|
||||
}
|
||||
|
||||
export interface IGalleryExtension {
|
||||
uuid: string;
|
||||
export interface IExtensionIdentifier {
|
||||
id: string;
|
||||
uuid?: string;
|
||||
}
|
||||
|
||||
export interface IGalleryExtension {
|
||||
name: string;
|
||||
identifier: IExtensionIdentifier;
|
||||
version: string;
|
||||
date: string;
|
||||
displayName: string;
|
||||
@@ -159,7 +171,7 @@ export enum LocalExtensionType {
|
||||
|
||||
export interface ILocalExtension {
|
||||
type: LocalExtensionType;
|
||||
id: string;
|
||||
identifier: IExtensionIdentifier;
|
||||
manifest: IExtensionManifest;
|
||||
metadata: IGalleryMetadata;
|
||||
path: string;
|
||||
@@ -209,28 +221,28 @@ export interface IExtensionGalleryService {
|
||||
reportStatistic(publisher: string, name: string, version: string, type: StatisticType): TPromise<void>;
|
||||
getReadme(extension: IGalleryExtension): TPromise<string>;
|
||||
getManifest(extension: IGalleryExtension): TPromise<IExtensionManifest>;
|
||||
getChangelog(extension: IGalleryMetadata): TPromise<string>;
|
||||
getChangelog(extension: IGalleryExtension): TPromise<string>;
|
||||
loadCompatibleVersion(extension: IGalleryExtension): TPromise<IGalleryExtension>;
|
||||
getAllDependencies(extension: IGalleryExtension): TPromise<IGalleryExtension[]>;
|
||||
}
|
||||
|
||||
export interface InstallExtensionEvent {
|
||||
id: string;
|
||||
identifier: IExtensionIdentifier;
|
||||
zipPath?: string;
|
||||
gallery?: IGalleryExtension;
|
||||
}
|
||||
|
||||
export interface DidInstallExtensionEvent {
|
||||
id: string;
|
||||
identifier: IExtensionIdentifier;
|
||||
zipPath?: string;
|
||||
gallery?: IGalleryExtension;
|
||||
local?: ILocalExtension;
|
||||
error?: Error;
|
||||
error?: string;
|
||||
}
|
||||
|
||||
export interface DidUninstallExtensionEvent {
|
||||
id: string;
|
||||
error?: Error;
|
||||
identifier: IExtensionIdentifier;
|
||||
error?: string;
|
||||
}
|
||||
|
||||
export interface IExtensionManagementService {
|
||||
@@ -238,13 +250,15 @@ export interface IExtensionManagementService {
|
||||
|
||||
onInstallExtension: Event<InstallExtensionEvent>;
|
||||
onDidInstallExtension: Event<DidInstallExtensionEvent>;
|
||||
onUninstallExtension: Event<string>;
|
||||
onUninstallExtension: Event<IExtensionIdentifier>;
|
||||
onDidUninstallExtension: Event<DidUninstallExtensionEvent>;
|
||||
|
||||
install(zipPath: string): TPromise<void>;
|
||||
installFromGallery(extension: IGalleryExtension, promptToInstallDependencies?: boolean): TPromise<void>;
|
||||
installFromGallery(extension: IGalleryExtension): TPromise<void>;
|
||||
uninstall(extension: ILocalExtension, force?: boolean): TPromise<void>;
|
||||
getInstalled(type?: LocalExtensionType): TPromise<ILocalExtension[]>;
|
||||
|
||||
updateMetadata(local: ILocalExtension, metadata: IGalleryMetadata): TPromise<ILocalExtension>;
|
||||
}
|
||||
|
||||
export const IExtensionEnablementService = createDecorator<IExtensionEnablementService>('extensionEnablementService');
|
||||
@@ -256,24 +270,24 @@ export interface IExtensionEnablementService {
|
||||
/**
|
||||
* Event to listen on for extension enablement changes
|
||||
*/
|
||||
onEnablementChanged: Event<string>;
|
||||
onEnablementChanged: Event<IExtensionIdentifier>;
|
||||
|
||||
/**
|
||||
* Returns all globally disabled extension identifiers.
|
||||
* Returns an empty array if none exist.
|
||||
*/
|
||||
getGloballyDisabledExtensions(): string[];
|
||||
getGloballyDisabledExtensions(): IExtensionIdentifier[];
|
||||
|
||||
/**
|
||||
* Returns all workspace disabled extension identifiers.
|
||||
* Returns an empty array if none exist or workspace does not exist.
|
||||
*/
|
||||
getWorkspaceDisabledExtensions(): string[];
|
||||
getWorkspaceDisabledExtensions(): IExtensionIdentifier[];
|
||||
|
||||
/**
|
||||
* Returns `true` if given extension can be enabled by calling `setEnablement`, otherwise false`.
|
||||
*/
|
||||
canEnable(identifier: string): boolean;
|
||||
canEnable(identifier: IExtensionIdentifier): boolean;
|
||||
|
||||
/**
|
||||
* Enable or disable the given extension.
|
||||
@@ -284,14 +298,18 @@ export interface IExtensionEnablementService {
|
||||
*
|
||||
* Throws error if enablement is requested for workspace and there is no workspace
|
||||
*/
|
||||
setEnablement(identifier: string, enable: boolean, workspace?: boolean): TPromise<boolean>;
|
||||
setEnablement(identifier: IExtensionIdentifier, enable: boolean, workspace?: boolean): TPromise<boolean>;
|
||||
|
||||
migrateToIdentifiers(installed: IExtensionIdentifier[]): void;
|
||||
}
|
||||
|
||||
export const IExtensionTipsService = createDecorator<IExtensionTipsService>('extensionTipsService');
|
||||
|
||||
export interface IExtensionTipsService {
|
||||
_serviceBrand: any;
|
||||
getRecommendations(): string[];
|
||||
getAllRecommendationsWithReason(): { [id: string]: string; };
|
||||
getFileBasedRecommendations(): string[];
|
||||
getOtherRecommendations(): string[];
|
||||
getWorkspaceRecommendations(): TPromise<string[]>;
|
||||
getKeymapRecommendations(): string[];
|
||||
getKeywordsForExtension(extension: string): string[];
|
||||
|
||||
Reference in New Issue
Block a user