environment.ts 2.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
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;
25
	'prof-startup-prefix'?: string;
J
Joao Moreno 已提交
26 27 28 29 30 31
	verbose?: boolean;
	logExtensionHostCommunication?: boolean;
	'disable-extensions'?: boolean;
	'extensions-dir'?: string;
	extensionDevelopmentPath?: string;
	extensionTestsPath?: string;
32
	debugPluginHost?: string;
J
Joao Moreno 已提交
33
	debugBrkPluginHost?: string;
34
	debugId?: string;
35 36
	debugSearch?: string;
	debugBrkSearch?: string;
J
Joao Moreno 已提交
37 38 39 40
	'list-extensions'?: boolean;
	'show-versions'?: boolean;
	'install-extension'?: string | string[];
	'uninstall-extension'?: string | string[];
41
	'enable-proposed-api'?: string | string[];
J
Joao Moreno 已提交
42
	'open-url'?: string | string[];
43
	'skip-getting-started'?: boolean;
44
	'sticky-quickopen'?: boolean;
45
	'disable-telemetry'?: boolean;
46
	'export-default-configuration'?: string;
47
	'install-source'?: string;
J
Joao Moreno 已提交
48
	'disable-updates'?: string;
49
	'disable-crash-reporter'?: string;
J
Joao Moreno 已提交
50 51
}

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

54 55 56 57 58 59 60 61 62
export interface IDebugParams {
	port: number;
	break: boolean;
}

export interface IExtensionHostDebugParams extends IDebugParams {
	debugId: string;
}

J
Joao Moreno 已提交
63
export interface IEnvironmentService {
64
	_serviceBrand: any;
J
Joao Moreno 已提交
65

J
Joao Moreno 已提交
66 67
	args: ParsedArgs;

68
	execPath: string;
69
	appRoot: string;
70

J
Joao Moreno 已提交
71
	userHome: string;
J
Joao Moreno 已提交
72
	userDataPath: string;
73

74 75
	appNameLong: string;
	appQuality: string;
76 77 78
	appSettingsHome: string;
	appSettingsPath: string;
	appKeybindingsPath: string;
J
Joao 已提交
79
	machineUUID: string;
80
	settingsSearchBuildId: number;
81
	settingsSearchUrl: string;
82

83 84 85
	backupHome: string;
	backupWorkspacesPath: string;

86 87
	workspacesHome: string;

88
	isExtensionDevelopment: boolean;
B
Benjamin Pasero 已提交
89
	disableExtensions: boolean;
J
Joao Moreno 已提交
90
	extensionsPath: string;
91
	extensionDevelopmentPath: string;
B
Benjamin Pasero 已提交
92
	extensionTestsPath: string;
93

94 95
	debugExtensionHost: IExtensionHostDebugParams;
	debugSearch: IDebugParams;
96

97

98 99
	logExtensionHostCommunication: boolean;

100
	isBuilt: boolean;
101
	verbose: boolean;
102
	wait: boolean;
B
Benjamin Pasero 已提交
103
	performance: boolean;
104

105
	skipGettingStarted: boolean | undefined;
106

107 108
	mainIPCHandle: string;
	sharedIPCHandle: string;
109 110

	nodeCachedDataDir: string;
111 112

	installSource: string;
J
Joao Moreno 已提交
113
	disableUpdates: boolean;
114
	disableCrashReporter: boolean;
115
}