2019-06-12 00:54:49 +08:00
|
|
|
import * as jspb from "google-protobuf";
|
|
|
|
|
2019-01-12 03:33:44 +08:00
|
|
|
export interface SendableConnection {
|
|
|
|
send(data: Buffer | Uint8Array): void;
|
|
|
|
}
|
|
|
|
|
|
|
|
export interface ReadWriteConnection extends SendableConnection {
|
|
|
|
onMessage(cb: (data: Uint8Array | Buffer) => void): void;
|
|
|
|
onClose(cb: () => void): void;
|
2019-03-27 02:01:25 +08:00
|
|
|
onDown(cb: () => void): void;
|
|
|
|
onUp(cb: () => void): void;
|
2019-01-12 03:33:44 +08:00
|
|
|
close(): void;
|
|
|
|
}
|
2019-01-16 02:36:09 +08:00
|
|
|
|
|
|
|
export enum OperatingSystem {
|
|
|
|
Windows,
|
|
|
|
Linux,
|
|
|
|
Mac,
|
|
|
|
}
|
|
|
|
|
|
|
|
export interface InitData {
|
|
|
|
readonly os: OperatingSystem;
|
|
|
|
readonly dataDirectory: string;
|
|
|
|
readonly workingDirectory: string;
|
|
|
|
readonly homeDirectory: string;
|
|
|
|
readonly tmpDirectory: string;
|
2019-01-29 01:14:06 +08:00
|
|
|
readonly shell: string;
|
2019-04-04 06:07:47 +08:00
|
|
|
readonly extensionsDirectory: string;
|
2019-02-06 01:15:20 +08:00
|
|
|
readonly builtInExtensionsDirectory: string;
|
2019-05-20 06:58:47 +08:00
|
|
|
readonly extraExtensionDirectories: string[];
|
|
|
|
readonly extraBuiltinExtensionDirectories: string[];
|
2019-06-12 00:54:49 +08:00
|
|
|
readonly env: jspb.Map<string, string>;
|
2019-01-19 08:04:24 +08:00
|
|
|
}
|
|
|
|
|
2019-02-07 06:55:29 +08:00
|
|
|
export interface SharedProcessData {
|
2019-01-19 08:04:24 +08:00
|
|
|
readonly socketPath: string;
|
2019-01-29 01:14:06 +08:00
|
|
|
readonly logPath: string;
|
2019-01-19 08:04:24 +08:00
|
|
|
}
|