Merge commit 'be3e8236086165e5e45a5a10783823874b3f3ebd' as 'lib/vscode'

This commit is contained in:
Joe Previte
2020-12-15 15:52:33 -07:00
4649 changed files with 1311795 additions and 0 deletions

View File

@@ -0,0 +1,97 @@
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
/**
* A list of command line arguments we support natively.
*/
export interface NativeParsedArgs {
_: string[];
'folder-uri'?: string[]; // undefined or array of 1 or more
'file-uri'?: string[]; // undefined or array of 1 or more
_urls?: string[];
help?: boolean;
version?: boolean;
telemetry?: boolean;
status?: boolean;
wait?: boolean;
waitMarkerFilePath?: string;
diff?: boolean;
add?: boolean;
goto?: boolean;
'new-window'?: boolean;
'unity-launch'?: boolean; // Always open a new window, except if opening the first window or opening a file or folder as part of the launch.
'reuse-window'?: boolean;
locale?: string;
'user-data-dir'?: string;
'prof-startup'?: boolean;
'prof-startup-prefix'?: string;
'prof-append-timers'?: string;
verbose?: boolean;
trace?: boolean;
'trace-category-filter'?: string;
'trace-options'?: string;
'open-devtools'?: boolean;
log?: string;
logExtensionHostCommunication?: boolean;
'extensions-dir'?: string;
'extensions-download-dir'?: string;
'builtin-extensions-dir'?: string;
extensionDevelopmentPath?: string[]; // // undefined or array of 1 or more local paths or URIs
extensionTestsPath?: string; // either a local path or a URI
'inspect-extensions'?: string;
'inspect-brk-extensions'?: string;
debugId?: string;
debugRenderer?: boolean; // whether we expect a debugger (js-debug) to attach to the renderer, incl webviews+webworker
'inspect-search'?: string;
'inspect-brk-search'?: string;
'disable-extensions'?: boolean;
'disable-extension'?: string[]; // undefined or array of 1 or more
'list-extensions'?: boolean;
'show-versions'?: boolean;
'category'?: string;
'install-extension'?: string[]; // undefined or array of 1 or more
'install-builtin-extension'?: string[]; // undefined or array of 1 or more
'uninstall-extension'?: string[]; // undefined or array of 1 or more
'locate-extension'?: string[]; // undefined or array of 1 or more
'enable-proposed-api'?: string[]; // undefined or array of 1 or more
'open-url'?: boolean;
'skip-release-notes'?: boolean;
'disable-telemetry'?: boolean;
'export-default-configuration'?: string;
'install-source'?: string;
'disable-updates'?: boolean;
'disable-crash-reporter'?: boolean;
'crash-reporter-directory'?: string;
'crash-reporter-id'?: string;
'skip-add-to-recently-opened'?: boolean;
'max-memory'?: string;
'file-write'?: boolean;
'file-chmod'?: boolean;
'driver'?: string;
'driver-verbose'?: boolean;
'remote'?: string;
'disable-user-env-probe'?: boolean;
'force'?: boolean;
'do-not-sync'?: boolean;
'force-user-env'?: boolean;
'sync'?: 'on' | 'off';
'__sandbox'?: boolean;
// chromium command line args: https://electronjs.org/docs/all#supported-chrome-command-line-switches
'no-proxy-server'?: boolean;
'proxy-server'?: string;
'proxy-bypass-list'?: string;
'proxy-pac-url'?: string;
'inspect'?: string;
'inspect-brk'?: string;
'js-flags'?: string;
'disable-gpu'?: boolean;
'nolazy'?: boolean;
'force-device-scale-factor'?: string;
'force-renderer-accessibility'?: boolean;
'ignore-certificate-errors'?: boolean;
'allow-insecure-localhost'?: boolean;
'log-net-log'?: string;
}

View File

@@ -0,0 +1,139 @@
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import { createDecorator } from 'vs/platform/instantiation/common/instantiation';
import { URI } from 'vs/base/common/uri';
import { NativeParsedArgs } from 'vs/platform/environment/common/argv';
export const IEnvironmentService = createDecorator<IEnvironmentService>('environmentService');
export const INativeEnvironmentService = createDecorator<INativeEnvironmentService>('nativeEnvironmentService');
export interface IDebugParams {
port: number | null;
break: boolean;
}
export interface IExtensionHostDebugParams extends IDebugParams {
debugId?: string;
}
/**
* A basic environment service that can be used in various processes,
* such as main, renderer and shared process. Use subclasses of this
* service for specific environment.
*/
export interface IEnvironmentService {
readonly _serviceBrand: undefined;
// !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
//
// NOTE: KEEP THIS INTERFACE AS SMALL AS POSSIBLE.
//
// AS SUCH:
// - PUT NON-WEB PROPERTIES INTO NATIVE ENVIRONMENT SERVICE
// - PUT WORKBENCH ONLY PROPERTIES INTO WORKBENCH ENVIRONMENT SERVICE
// - PUT ELECTRON-MAIN ONLY PROPERTIES INTO MAIN ENVIRONMENT SERVICE
//
// !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
// --- user roaming data
userRoamingDataHome: URI;
settingsResource: URI;
keybindingsResource: URI;
keyboardLayoutResource: URI;
argvResource: URI;
snippetsHome: URI;
// --- data paths
untitledWorkspacesHome: URI;
globalStorageHome: URI;
workspaceStorageHome: URI;
// --- settings sync
userDataSyncHome: URI;
userDataSyncLogResource: URI;
sync: 'on' | 'off' | undefined;
// --- extension development
debugExtensionHost: IExtensionHostDebugParams;
isExtensionDevelopment: boolean;
disableExtensions: boolean | string[];
extensionDevelopmentLocationURI?: URI[];
extensionTestsLocationURI?: URI;
// --- logging
logsPath: string;
logLevel?: string;
verbose: boolean;
isBuilt: boolean;
// --- telemetry
disableTelemetry: boolean;
telemetryLogResource: URI;
serviceMachineIdResource: URI;
// !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
//
// NOTE: KEEP THIS INTERFACE AS SMALL AS POSSIBLE.
//
// AS SUCH:
// - PUT NON-WEB PROPERTIES INTO NATIVE ENVIRONMENT SERVICE
// - PUT WORKBENCH ONLY PROPERTIES INTO WORKBENCH ENVIRONMENT SERVICE
// - PUT ELECTRON-MAIN ONLY PROPERTIES INTO MAIN ENVIRONMENT SERVICE
//
// !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
}
/**
* A subclass of the `IEnvironmentService` to be used only in native
* environments (Windows, Linux, macOS) but not e.g. web.
*/
export interface INativeEnvironmentService extends IEnvironmentService {
// !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
//
// NOTE: KEEP THIS INTERFACE AS SMALL AS POSSIBLE.
//
// AS SUCH:
// - PUT WORKBENCH ONLY PROPERTIES INTO WORKBENCH ENVIRONMENT SERVICE
// - PUT ELECTRON-MAIN ONLY PROPERTIES INTO MAIN ENVIRONMENT SERVICE
//
// !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
// --- CLI Arguments
args: NativeParsedArgs;
// --- paths
appRoot: string;
userHome: URI;
appSettingsHome: URI;
tmpDir: URI;
userDataPath: string;
machineSettingsResource: URI;
installSourcePath: string;
// --- IPC Handles
sharedIPCHandle: string;
// --- Extensions
extensionsPath?: string;
extensionsDownloadPath: string;
builtinExtensionsPath: string;
// --- Smoke test support
driverHandle?: string;
// !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
//
// NOTE: KEEP THIS INTERFACE AS SMALL AS POSSIBLE.
//
// AS SUCH:
// - PUT NON-WEB PROPERTIES INTO NATIVE ENVIRONMENT SERVICE
// - PUT WORKBENCH ONLY PROPERTIES INTO WORKBENCH ENVIRONMENT SERVICE
// - PUT ELECTRON-MAIN ONLY PROPERTIES INTO MAIN ENVIRONMENT SERVICE
//
// !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
}