diff options
author | Jean Pierre <jeanp413@hotmail.com> | 2021-12-03 22:20:50 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-12-03 22:20:50 +0300 |
commit | 248de5abb44cd53c4d75ec2b6396019de07735f7 (patch) | |
tree | 78bfbfd2dc31c8821a4d587c318c147656f82f70 /src/vs/workbench/contrib/extensions/common | |
parent | 6403829441b0e6eba0682e701a80c287e3b12c55 (diff) | |
parent | 8541d5b225cf6847dd2cf45a43778e1047766702 (diff) |
Merge branch 'main' into fix-136313
Diffstat (limited to 'src/vs/workbench/contrib/extensions/common')
-rw-r--r-- | src/vs/workbench/contrib/extensions/common/extensions.ts | 25 | ||||
-rw-r--r-- | src/vs/workbench/contrib/extensions/common/extensionsInput.ts | 9 |
2 files changed, 23 insertions, 11 deletions
diff --git a/src/vs/workbench/contrib/extensions/common/extensions.ts b/src/vs/workbench/contrib/extensions/common/extensions.ts index 9a91536e26d..8f7974fdba9 100644 --- a/src/vs/workbench/contrib/extensions/common/extensions.ts +++ b/src/vs/workbench/contrib/extensions/common/extensions.ts @@ -16,6 +16,7 @@ import { URI } from 'vs/base/common/uri'; import { IView, IViewPaneContainer } from 'vs/workbench/common/views'; import { RawContextKey } from 'vs/platform/contextkey/common/contextkey'; import { IExtensionsStatus } from 'vs/workbench/services/extensions/common/extensions'; +import { IExtensionEditorOptions } from 'vs/workbench/contrib/extensions/common/extensionsInput'; export const VIEWLET_ID = 'workbench.view.extensions'; @@ -48,6 +49,8 @@ export interface IExtension { readonly publisherDomain?: { link: string, verified: boolean }; readonly version: string; readonly latestVersion: string; + readonly hasPreReleaseVersion: boolean; + readonly hasReleaseVersion: boolean; readonly description: string; readonly url?: string; readonly repository?: string; @@ -65,15 +68,16 @@ export interface IExtension { readonly extensionPack: string[]; readonly telemetryData: any; readonly preview: boolean; - getManifest(token: CancellationToken): Promise<IExtensionManifest | null>; - getReadme(token: CancellationToken): Promise<string>; + getManifest(preRelease: boolean, token: CancellationToken): Promise<IExtensionManifest | null>; hasReadme(): boolean; - getChangelog(token: CancellationToken): Promise<string>; + getReadme(preRelease: boolean, token: CancellationToken): Promise<string>; hasChangelog(): boolean; + getChangelog(preRelease: boolean, token: CancellationToken): Promise<string>; readonly server?: IExtensionManagementServer; readonly local?: ILocalExtension; gallery?: IGalleryExtension; readonly isMalicious: boolean; + readonly isUnsupported: boolean | { preReleaseExtension: { id: string, displayName: string } }; } export const SERVICE_ID = 'extensionsWorkbenchService'; @@ -82,21 +86,22 @@ export const IExtensionsWorkbenchService = createDecorator<IExtensionsWorkbenchS export interface IExtensionsWorkbenchService { readonly _serviceBrand: undefined; - onChange: Event<IExtension | undefined>; - local: IExtension[]; - installed: IExtension[]; - outdated: IExtension[]; + readonly onChange: Event<IExtension | undefined>; + readonly preferPreReleases: boolean; + readonly local: IExtension[]; + readonly installed: IExtension[]; + readonly outdated: IExtension[]; queryLocal(server?: IExtensionManagementServer): Promise<IExtension[]>; queryGallery(token: CancellationToken): Promise<IPager<IExtension>>; queryGallery(options: IQueryOptions, token: CancellationToken): Promise<IPager<IExtension>>; canInstall(extension: IExtension): Promise<boolean>; install(vsix: URI): Promise<IExtension>; - install(extension: IExtension, installOptins?: InstallOptions): Promise<IExtension>; + install(extension: IExtension, installOptions?: InstallOptions): Promise<IExtension>; uninstall(extension: IExtension): Promise<void>; - installVersion(extension: IExtension, version: string): Promise<IExtension>; + installVersion(extension: IExtension, version: string, installOptions?: InstallOptions): Promise<IExtension>; reinstall(extension: IExtension): Promise<IExtension>; setEnablement(extensions: IExtension | IExtension[], enablementState: EnablementState): Promise<void>; - open(extension: IExtension, options?: { sideByside?: boolean, preserveFocus?: boolean, pinned?: boolean, tab?: string }): Promise<void>; + open(extension: IExtension, options?: IExtensionEditorOptions): Promise<void>; checkForUpdates(): Promise<void>; getExtensionStatus(extension: IExtension): IExtensionsStatus | undefined; ignoreAutoUpdate(identifierWithVersion: ExtensionIdentifierWithVersion): void; diff --git a/src/vs/workbench/contrib/extensions/common/extensionsInput.ts b/src/vs/workbench/contrib/extensions/common/extensionsInput.ts index f8c46c90d18..9e222c71023 100644 --- a/src/vs/workbench/contrib/extensions/common/extensionsInput.ts +++ b/src/vs/workbench/contrib/extensions/common/extensionsInput.ts @@ -8,9 +8,16 @@ import { URI } from 'vs/base/common/uri'; import { localize } from 'vs/nls'; import { EditorInputCapabilities, IUntypedEditorInput } from 'vs/workbench/common/editor'; import { EditorInput } from 'vs/workbench/common/editor/editorInput'; -import { IExtension, IExtensionsWorkbenchService } from 'vs/workbench/contrib/extensions/common/extensions'; +import { ExtensionEditorTab, IExtension, IExtensionsWorkbenchService } from 'vs/workbench/contrib/extensions/common/extensions'; import { areSameExtensions } from 'vs/platform/extensionManagement/common/extensionManagementUtil'; import { join } from 'vs/base/common/path'; +import { IEditorOptions } from 'vs/platform/editor/common/editor'; + +export interface IExtensionEditorOptions extends IEditorOptions { + showPreReleaseVersion?: boolean; + tab?: ExtensionEditorTab; + sideByside?: boolean; +} export class ExtensionsInput extends EditorInput { |