-
Notifications
You must be signed in to change notification settings - Fork 29.7k
/
extensionHostStarter.ts
35 lines (27 loc) · 1.42 KB
/
extensionHostStarter.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import { SerializedError } from 'vs/base/common/errors';
import { Event } from 'vs/base/common/event';
import { createDecorator } from 'vs/platform/instantiation/common/instantiation';
export const IExtensionHostStarter = createDecorator<IExtensionHostStarter>('extensionHostStarter');
export const ipcExtensionHostStarterChannelName = 'extensionHostStarter';
export interface IExtensionHostProcessOptions {
env: { [key: string]: string | undefined; };
detached: boolean;
execArgv: string[] | undefined;
silent: boolean;
}
export interface IExtensionHostStarter {
readonly _serviceBrand: undefined;
onDynamicStdout(id: string): Event<string>;
onDynamicStderr(id: string): Event<string>;
onDynamicMessage(id: string): Event<any>;
onDynamicError(id: string): Event<{ error: SerializedError; }>;
onDynamicExit(id: string): Event<{ code: number; signal: string }>;
createExtensionHost(): Promise<{ id: string; }>;
start(id: string, opts: IExtensionHostProcessOptions): Promise<{ pid: number; }>;
enableInspectPort(id: string): Promise<boolean>;
kill(id: string): Promise<void>;
}