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;
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;
43
	'sticky-quickopen'?: boolean;
44
	'disable-telemetry'?: boolean;
45
	'export-default-configuration'?: string;
46
	'install-source'?: string;
J
Joao Moreno 已提交
47
	'disable-updates'?: string;
48
	'disable-crash-reporter'?: string;
J
Joao Moreno 已提交
49 50
}

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

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

export interface IExtensionHostDebugParams extends IDebugParams {
	debugId: string;
}

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

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

67
	execPath: string;
68
	appRoot: string;
69

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

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

81 82 83
	backupHome: string;
	backupWorkspacesPath: string;

84 85
	workspacesHome: string;

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

92 93
	debugExtensionHost: IExtensionHostDebugParams;
	debugSearch: IDebugParams;
94

95

96 97
	logExtensionHostCommunication: boolean;

98
	isBuilt: boolean;
99
	verbose: boolean;
100
	wait: boolean;
B
Benjamin Pasero 已提交
101
	performance: boolean;
J
Johannes Rieken 已提交
102
	profileStartup: { prefix: string, dir: string } | undefined;
103

104
	skipGettingStarted: boolean | undefined;
105

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

	nodeCachedDataDir: string;
110 111

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

	settingsSearchUrl: string;
116
}