environment.ts 3.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
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;
50
	'skip-add-to-recently-opened'?: boolean;
B
Benjamin Pasero 已提交
51
	'ps'?: boolean;
J
Joao Moreno 已提交
52 53
}

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

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

export interface IExtensionHostDebugParams extends IDebugParams {
	debugId: string;
}

J
Joao Moreno 已提交
65
export interface IEnvironmentService {
66
	_serviceBrand: any;
J
Joao Moreno 已提交
67

J
Joao Moreno 已提交
68 69
	args: ParsedArgs;

70
	execPath: string;
71
	appRoot: string;
72

J
Joao Moreno 已提交
73
	userHome: string;
J
Joao Moreno 已提交
74
	userDataPath: string;
J
Joao Moreno 已提交
75
	logsPath: string;
76

77 78
	appNameLong: string;
	appQuality: string;
79 80 81
	appSettingsHome: string;
	appSettingsPath: string;
	appKeybindingsPath: string;
J
Joao 已提交
82
	machineUUID: string;
83
	settingsSearchBuildId: number;
84
	settingsSearchUrl: string;
85

86 87 88
	backupHome: string;
	backupWorkspacesPath: string;

89 90
	workspacesHome: string;

91
	isExtensionDevelopment: boolean;
B
Benjamin Pasero 已提交
92
	disableExtensions: boolean;
J
Joao Moreno 已提交
93
	extensionsPath: string;
94
	extensionDevelopmentPath: string;
B
Benjamin Pasero 已提交
95
	extensionTestsPath: string;
96

97 98
	debugExtensionHost: IExtensionHostDebugParams;
	debugSearch: IDebugParams;
99

100

101 102
	logExtensionHostCommunication: boolean;

103
	isBuilt: boolean;
104
	verbose: boolean;
105
	wait: boolean;
B
Benjamin Pasero 已提交
106
	performance: boolean;
107

108
	skipGettingStarted: boolean | undefined;
109

110 111
	skipAddToRecentlyOpened: boolean;

112 113
	mainIPCHandle: string;
	sharedIPCHandle: string;
114 115

	nodeCachedDataDir: string;
116

117
	installSourcePath: string;
J
Joao Moreno 已提交
118
	disableUpdates: boolean;
119
	disableCrashReporter: boolean;
120
}