environment.ts 2.6 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
	verbose?: boolean;
	logExtensionHostCommunication?: boolean;
	'disable-extensions'?: boolean;
	'extensions-dir'?: string;
	extensionDevelopmentPath?: string;
	extensionTestsPath?: string;
31
	debugPluginHost?: string;
J
Joao Moreno 已提交
32
	debugBrkPluginHost?: string;
33
	debugId?: string;
34 35
	debugSearch?: string;
	debugBrkSearch?: string;
J
Joao Moreno 已提交
36 37 38 39
	'list-extensions'?: boolean;
	'show-versions'?: boolean;
	'install-extension'?: string | string[];
	'uninstall-extension'?: string | string[];
40
	'enable-proposed-api'?: string | string[];
J
Joao Moreno 已提交
41
	'open-url'?: string | string[];
42
	'skip-getting-started'?: boolean;
J
Joao Moreno 已提交
43 44
}

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

47 48 49 50 51 52 53 54 55
export interface IDebugParams {
	port: number;
	break: boolean;
}

export interface IExtensionHostDebugParams extends IDebugParams {
	debugId: string;
}

J
Joao Moreno 已提交
56
export interface IEnvironmentService {
57
	_serviceBrand: any;
J
Joao Moreno 已提交
58

J
Joao Moreno 已提交
59 60
	args: ParsedArgs;

61
	execPath: string;
62
	appRoot: string;
63

J
Joao Moreno 已提交
64
	userHome: string;
J
Joao Moreno 已提交
65
	userDataPath: string;
66

67 68
	appNameLong: string;
	appQuality: string;
69 70 71
	appSettingsHome: string;
	appSettingsPath: string;
	appKeybindingsPath: string;
J
Joao 已提交
72
	machineUUID: string;
73

74 75 76
	backupHome: string;
	backupWorkspacesPath: string;

77 78
	workspacesHome: string;

79
	isExtensionDevelopment: boolean;
B
Benjamin Pasero 已提交
80
	disableExtensions: boolean;
J
Joao Moreno 已提交
81
	extensionsPath: string;
82
	extensionDevelopmentPath: string;
B
Benjamin Pasero 已提交
83
	extensionTestsPath: string;
84

85 86
	debugExtensionHost: IExtensionHostDebugParams;
	debugSearch: IDebugParams;
87

88

89 90
	logExtensionHostCommunication: boolean;

91
	isBuilt: boolean;
92
	verbose: boolean;
93
	wait: boolean;
B
Benjamin Pasero 已提交
94
	performance: boolean;
J
Johannes Rieken 已提交
95
	profileStartup: { prefix: string, dir: string } | undefined;
96

97
	skipGettingStarted: boolean | undefined;
98

99 100
	mainIPCHandle: string;
	sharedIPCHandle: string;
101 102 103

	nodeCachedDataDir: string;
}