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
export interface ParsedArgs {
	[arg: string]: any;
	_: string[];
	help?: boolean;
	version?: boolean;
	wait?: boolean;
14
	waitMarkerFilePath?: string;
J
Joao Moreno 已提交
15 16 17
	diff?: boolean;
	goto?: boolean;
	'new-window'?: boolean;
18 19 20 21
	/**
	 * 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 已提交
22 23 24 25
	'reuse-window'?: boolean;
	locale?: string;
	'user-data-dir'?: string;
	performance?: boolean;
J
Johannes Rieken 已提交
26
	'prof-startup'?: string;
J
Joao Moreno 已提交
27 28 29 30 31 32 33 34 35 36 37 38
	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[];
39
	'enable-proposed-api'?: string | string[];
J
Joao Moreno 已提交
40
	'open-url'?: string | string[];
41
	'skip-getting-started'?: boolean;
J
Joao Moreno 已提交
42 43
}

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

export interface IEnvironmentService {
47
	_serviceBrand: any;
J
Joao Moreno 已提交
48

J
Joao Moreno 已提交
49 50
	args: ParsedArgs;

51
	execPath: string;
52
	appRoot: string;
53

J
Joao Moreno 已提交
54
	userHome: string;
J
Joao Moreno 已提交
55
	userDataPath: string;
56

57 58
	appNameLong: string;
	appQuality: string;
59 60 61 62
	appSettingsHome: string;
	appSettingsPath: string;
	appKeybindingsPath: string;

63 64 65
	backupHome: string;
	backupWorkspacesPath: string;

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

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

74 75
	logExtensionHostCommunication: boolean;

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

82
	skipGettingStarted: boolean | undefined;
83

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

	nodeCachedDataDir: string;
}