environment.ts 2.4 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
export interface ParsedArgs {
	[arg: string]: any;
	_: string[];
	help?: boolean;
	version?: boolean;
	wait?: boolean;
14
	waitMarkerFilePath?: string;
J
Joao Moreno 已提交
15
	diff?: boolean;
16
	add?: boolean;
J
Joao Moreno 已提交
17 18
	goto?: boolean;
	'new-window'?: boolean;
19
	'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.
J
Joao Moreno 已提交
20 21 22 23
	'reuse-window'?: boolean;
	locale?: string;
	'user-data-dir'?: string;
	performance?: boolean;
J
Johannes Rieken 已提交
24
	'prof-startup'?: string;
J
Joao Moreno 已提交
25 26 27 28 29 30 31
	verbose?: boolean;
	logExtensionHostCommunication?: boolean;
	'disable-extensions'?: boolean;
	'extensions-dir'?: string;
	extensionDevelopmentPath?: string;
	extensionTestsPath?: string;
	debugBrkPluginHost?: string;
32
	debugId?: string;
J
Joao Moreno 已提交
33 34 35 36 37
	debugPluginHost?: string;
	'list-extensions'?: boolean;
	'show-versions'?: boolean;
	'install-extension'?: string | string[];
	'uninstall-extension'?: string | string[];
38
	'enable-proposed-api'?: string | string[];
J
Joao Moreno 已提交
39
	'open-url'?: string | string[];
40
	'skip-getting-started'?: boolean;
J
Joao Moreno 已提交
41 42
}

J
Joao Moreno 已提交
43 44 45
export const IEnvironmentService = createDecorator<IEnvironmentService>('environmentService');

export interface IEnvironmentService {
46
	_serviceBrand: any;
J
Joao Moreno 已提交
47

J
Joao Moreno 已提交
48 49
	args: ParsedArgs;

50
	execPath: string;
51
	appRoot: string;
52

J
Joao Moreno 已提交
53
	userHome: string;
J
Joao Moreno 已提交
54
	userDataPath: string;
55

56 57
	appNameLong: string;
	appQuality: string;
58 59 60
	appSettingsHome: string;
	appSettingsPath: string;
	appKeybindingsPath: string;
J
Joao 已提交
61
	machineUUID: string;
62

63 64 65
	backupHome: string;
	backupWorkspacesPath: string;

66 67
	workspacesHome: string;

68
	isExtensionDevelopment: boolean;
B
Benjamin Pasero 已提交
69
	disableExtensions: boolean;
J
Joao Moreno 已提交
70
	extensionsPath: string;
71
	extensionDevelopmentPath: string;
B
Benjamin Pasero 已提交
72
	extensionTestsPath: string;
73

74 75
	debugExtensionHost: { port: number; break: boolean; debugId: string };

76

77 78
	logExtensionHostCommunication: boolean;

79
	isBuilt: boolean;
80
	verbose: boolean;
81
	wait: boolean;
B
Benjamin Pasero 已提交
82
	performance: boolean;
J
Johannes Rieken 已提交
83
	profileStartup: { prefix: string, dir: string } | undefined;
84

85
	skipGettingStarted: boolean | undefined;
86

87 88
	mainIPCHandle: string;
	sharedIPCHandle: string;
89 90 91

	nodeCachedDataDir: string;
}