environment.ts 2.2 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 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[];
	'open-url'?: string | string[];
39
	'prof-startup-timers': string;
J
Joao Moreno 已提交
40 41
}

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

export interface IEnvironmentService {
45
	_serviceBrand: any;
J
Joao Moreno 已提交
46

J
Joao Moreno 已提交
47 48
	args: ParsedArgs;

49
	execPath: string;
50
	appRoot: string;
51

J
Joao Moreno 已提交
52
	userHome: string;
J
Joao Moreno 已提交
53
	userDataPath: string;
54

55 56
	appNameLong: string;
	appQuality: string;
57 58 59 60
	appSettingsHome: string;
	appSettingsPath: string;
	appKeybindingsPath: string;

61 62 63
	backupHome: string;
	backupWorkspacesPath: string;

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

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

72 73
	logExtensionHostCommunication: boolean;

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

	mainIPCHandle: string;
	sharedIPCHandle: string;
82 83 84

	nodeCachedDataDir: string;
}