environment.ts 2.0 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
export interface ParsedArgs {
	[arg: string]: any;
	_: string[];
	help?: boolean;
	version?: boolean;
	wait?: boolean;
	diff?: boolean;
	goto?: boolean;
	'new-window'?: boolean;
17
	'new-window-if-not-first'?: boolean;
J
Joao Moreno 已提交
18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34
	'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[];
35
	'prof-startup-timers': string;
J
Joao Moreno 已提交
36 37
}

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

export interface IEnvironmentService {
41
	_serviceBrand: any;
J
Joao Moreno 已提交
42

J
Joao Moreno 已提交
43 44
	args: ParsedArgs;

45
	execPath: string;
46
	appRoot: string;
47

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

52 53
	appNameLong: string;
	appQuality: string;
54 55 56 57
	appSettingsHome: string;
	appSettingsPath: string;
	appKeybindingsPath: string;

58 59 60
	backupHome: string;
	backupWorkspacesPath: string;

61
	isExtensionDevelopment: boolean;
B
Benjamin Pasero 已提交
62
	disableExtensions: boolean;
J
Joao Moreno 已提交
63
	extensionsPath: string;
64
	extensionDevelopmentPath: string;
B
Benjamin Pasero 已提交
65
	extensionTestsPath: string;
66

J
Joao Moreno 已提交
67
	debugExtensionHost: { port: number; break: boolean; };
68

69 70
	logExtensionHostCommunication: boolean;

71
	isBuilt: boolean;
72
	verbose: boolean;
73
	wait: boolean;
B
Benjamin Pasero 已提交
74
	performance: boolean;
75 76 77

	mainIPCHandle: string;
	sharedIPCHandle: string;
78 79 80

	nodeCachedDataDir: string;
}