environment.ts 2.3 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 14 15 16
export interface ParsedArgs {
	[arg: string]: any;
	_: string[];
	help?: boolean;
	version?: boolean;
	wait?: boolean;
	diff?: boolean;
	goto?: boolean;
	'new-window'?: boolean;
17 18 19 20
	/**
	 * Always open a new window, except if opening the first window or opening a file or folder as part of the launch.
	 */
	'unity-launch'?: boolean;
J
Joao Moreno 已提交
21 22 23 24
	'reuse-window'?: boolean;
	locale?: string;
	'user-data-dir'?: string;
	performance?: boolean;
J
Johannes Rieken 已提交
25
	'prof-startup'?: string;
J
Joao Moreno 已提交
26 27 28 29 30 31 32 33 34 35 36 37
	verbose?: boolean;
	logExtensionHostCommunication?: boolean;
	'disable-extensions'?: boolean;
	'extensions-dir'?: string;
	extensionDevelopmentPath?: string;
	extensionTestsPath?: string;
	debugBrkPluginHost?: string;
	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 61
	appSettingsHome: string;
	appSettingsPath: string;
	appKeybindingsPath: string;

62 63 64
	backupHome: string;
	backupWorkspacesPath: string;

65
	isExtensionDevelopment: boolean;
B
Benjamin Pasero 已提交
66
	disableExtensions: boolean;
J
Joao Moreno 已提交
67
	extensionsPath: string;
68
	extensionDevelopmentPath: string;
B
Benjamin Pasero 已提交
69
	extensionTestsPath: string;
70

J
Joao Moreno 已提交
71
	debugExtensionHost: { port: number; break: boolean; };
72

73 74
	logExtensionHostCommunication: boolean;

75
	isBuilt: boolean;
76
	verbose: boolean;
77
	wait: boolean;
B
Benjamin Pasero 已提交
78
	performance: boolean;
J
Johannes Rieken 已提交
79
	profileStartup: { prefix: string, dir: string } | undefined;
80

81
	skipGettingStarted: boolean | undefined;
82

83 84
	mainIPCHandle: string;
	sharedIPCHandle: string;
85 86 87

	nodeCachedDataDir: string;
}