/*--------------------------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ import 'vs/workbench/workbench.web.main'; import { main } from 'vs/workbench/browser/web.main'; import { UriComponents, URI } from 'vs/base/common/uri'; import { IFileSystemProvider, FileSystemProviderCapabilities, IFileChange, FileChangeType } from 'vs/platform/files/common/files'; import { IWebSocketFactory, IWebSocket } from 'vs/platform/remote/browser/browserSocketFactory'; import { IExtensionManifest } from 'vs/platform/extensions/common/extensions'; import { IURLCallbackProvider } from 'vs/workbench/services/url/browser/urlService'; import { LogLevel } from 'vs/platform/log/common/log'; import { IUpdateProvider, IUpdate } from 'vs/workbench/services/update/browser/updateService'; import { Event, Emitter } from 'vs/base/common/event'; import { Disposable, IDisposable, toDisposable } from 'vs/base/common/lifecycle'; import { IWorkspaceProvider, IWorkspace } from 'vs/workbench/services/host/browser/browserHostService'; import { CommandsRegistry } from 'vs/platform/commands/common/commands'; import { IProductConfiguration } from 'vs/platform/product/common/productService'; import { mark } from 'vs/base/common/performance'; import { ICredentialsProvider } from 'vs/workbench/services/credentials/common/credentials'; interface IResourceUriProvider { (uri: URI): URI; } interface IStaticExtension { packageJSON: IExtensionManifest; extensionLocation: URI; isBuiltin?: boolean; } interface ICommonTelemetryPropertiesResolver { (): { [key: string]: any }; } interface IExternalUriResolver { (uri: URI): Promise; } interface ITunnelProvider { /** * Support for creating tunnels. */ tunnelFactory?: ITunnelFactory; /** * Support for filtering candidate ports */ showPortCandidate?: IShowPortCandidate; } interface ITunnelFactory { (tunnelOptions: ITunnelOptions): Promise | undefined; } interface ITunnelOptions { remoteAddress: { port: number, host: string }; /** * The desired local port. If this port can't be used, then another will be chosen. */ localAddressPort?: number; label?: string; } interface ITunnel extends IDisposable { remoteAddress: { port: number, host: string }; /** * The complete local address(ex. localhost:1234) */ localAddress: string; /** * Implementers of Tunnel should fire onDidDispose when dispose is called. */ onDidDispose: Event; } interface IShowPortCandidate { (host: string, port: number, detail: string): Promise; } interface ICommand { /** * An identifier for the command. Commands can be executed from extensions * using the `vscode.commands.executeCommand` API using that command ID. */ id: string, /** * A function that is being executed with any arguments passed over. The * return type will be send back to the caller. * * Note: arguments and return type should be serializable so that they can * be exchanged across processes boundaries. */ handler: (...args: any[]) => unknown; } interface IHomeIndicator { /** * The link to open when clicking the home indicator. */ href: string; /** * The icon name for the home indicator. This needs to be one of the existing * icons from our Codicon icon set. For example `sync`. */ icon: string; /** * A tooltip that will appear while hovering over the home indicator. */ title: string; } interface IWindowIndicator { /** * Triggering this event will cause the window indicator to update. */ onDidChange: Event; /** * Label of the window indicator may include octicons * e.g. `$(remote) label` */ label: string; /** * Tooltip of the window indicator should not include * octicons and be descriptive. */ tooltip: string; /** * If provided, overrides the default command that * is executed when clicking on the window indicator. */ command?: string; } enum ColorScheme { DARK = 'dark', LIGHT = 'light', HIGH_CONTRAST = 'hc' } interface IInitialColorTheme { /** * Initial color theme type. */ themeType: ColorScheme; /** * A list of workbench colors to apply initially. */ colors?: { [colorId: string]: string }; } interface IDefaultSideBarLayout { visible?: boolean; containers?: ({ id: 'explorer' | 'run' | 'scm' | 'search' | 'extensions' | 'remote' | string; active: true; order?: number; views?: { id: string; order?: number; visible?: boolean; collapsed?: boolean; }[]; } | { id: 'explorer' | 'run' | 'scm' | 'search' | 'extensions' | 'remote' | string; active?: false; order?: number; visible?: boolean; views?: { id: string; order?: number; visible?: boolean; collapsed?: boolean; }[]; })[]; } interface IDefaultPanelLayout { visible?: boolean; containers?: ({ id: 'terminal' | 'debug' | 'problems' | 'output' | 'comments' | string; order?: number; active: true; } | { id: 'terminal' | 'debug' | 'problems' | 'output' | 'comments' | string; order?: number; active?: false; visible?: boolean; })[]; } interface IDefaultView { readonly id: string; } interface IDefaultEditor { readonly uri: UriComponents; readonly openOnlyIfExists?: boolean; readonly openWith?: string; } interface IDefaultLayout { /** @deprecated Use views instead (TODO@eamodio remove eventually) */ readonly sidebar?: IDefaultSideBarLayout; /** @deprecated Use views instead (TODO@eamodio remove eventually) */ readonly panel?: IDefaultPanelLayout; readonly views?: IDefaultView[]; readonly editors?: IDefaultEditor[]; } interface IProductQualityChangeHandler { /** * Handler is being called when the user wants to switch between * `insider` or `stable` product qualities. */ (newQuality: 'insider' | 'stable'): void; } /** * Settings sync options */ interface ISettingsSyncOptions { /** * Is settings sync enabled */ readonly enabled: boolean; /** * Handler is being called when the user changes Settings Sync enablement. */ enablementHandler?(enablement: boolean): void; } interface IWorkbenchConstructionOptions { //#region Connection related configuration /** * The remote authority is the IP:PORT from where the workbench is served * from. It is for example being used for the websocket connections as address. */ readonly remoteAuthority?: string; /** * The connection token to send to the server. */ readonly connectionToken?: string; /** * An endpoint to serve iframe content ("webview") from. This is required * to provide full security isolation from the workbench host. */ readonly webviewEndpoint?: string; /** * An URL pointing to the web worker extension host