environment.ts 1.9 KB
Newer Older
J
Joao Moreno 已提交
1 2 3 4 5
/*---------------------------------------------------------------------------------------------
 *  Copyright (c) Microsoft Corporation. All rights reserved.
 *  Licensed under the MIT License. See License.txt in the project root for license information.
 *--------------------------------------------------------------------------------------------*/

6
import { createDecorator } from 'vs/platform/instantiation/common/instantiation';
J
Joao Moreno 已提交
7

J
Joao Moreno 已提交
8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35
export interface ParsedArgs {
	[arg: string]: any;
	_: string[];
	help?: boolean;
	version?: boolean;
	wait?: boolean;
	diff?: boolean;
	goto?: boolean;
	'new-window'?: boolean;
	'reuse-window'?: boolean;
	locale?: string;
	'user-data-dir'?: string;
	performance?: boolean;
	verbose?: boolean;
	logExtensionHostCommunication?: boolean;
	'disable-extensions'?: boolean;
	'extensions-dir'?: string;
	extensionDevelopmentPath?: string;
	extensionTestsPath?: string;
	debugBrkPluginHost?: string;
	debugPluginHost?: string;
	'list-extensions'?: boolean;
	'show-versions'?: boolean;
	'install-extension'?: string | string[];
	'uninstall-extension'?: string | string[];
	'open-url'?: string | string[];
}

J
Joao Moreno 已提交
36 37 38
export const IEnvironmentService = createDecorator<IEnvironmentService>('environmentService');

export interface IEnvironmentService {
39
	_serviceBrand: any;
J
Joao Moreno 已提交
40

J
Joao Moreno 已提交
41 42
	args: ParsedArgs;

43
	execPath: string;
44
	appRoot: string;
45

J
Joao Moreno 已提交
46
	userHome: string;
47
	userProductHome: string;
J
Joao Moreno 已提交
48
	userDataPath: string;
49 50 51 52 53

	appSettingsHome: string;
	appSettingsPath: string;
	appKeybindingsPath: string;

54 55 56
	backupHome: string;
	backupWorkspacesPath: string;

57
	isExtensionDevelopment: boolean;
B
Benjamin Pasero 已提交
58
	disableExtensions: boolean;
J
Joao Moreno 已提交
59
	extensionsPath: string;
60
	extensionDevelopmentPath: string;
B
Benjamin Pasero 已提交
61
	extensionTestsPath: string;
62

J
Joao Moreno 已提交
63
	debugExtensionHost: { port: number; break: boolean; };
64

65 66
	logExtensionHostCommunication: boolean;

67
	isBuilt: boolean;
68
	verbose: boolean;
69
	wait: boolean;
B
Benjamin Pasero 已提交
70
	performance: boolean;
71 72 73

	mainIPCHandle: string;
	sharedIPCHandle: string;
74
}