Files
arduino-ide/arduino-ide-extension/src/common/protocol/arduino-daemon.ts
Akos Kitta 8e09971078 feat: use Arduino CLI 0.36.0-rc.1 APIs
Signed-off-by: Akos Kitta <a.kitta@arduino.cc>
2024-02-20 13:38:52 +01:00

19 lines
608 B
TypeScript

export const ArduinoDaemonPath = '/services/arduino-daemon';
export const ArduinoDaemon = Symbol('ArduinoDaemon');
export interface ArduinoDaemon {
/**
* Returns with a promise that resolves with the port
* of the CLI daemon when it's up and running.
*/
getPort(): Promise<number>;
/**
* Unlike `getPort` this method returns with a promise
* that resolves to `undefined` when the daemon is not running.
* Otherwise resolves to the CLI daemon port.
*/
tryGetPort(): Promise<number | undefined>;
start(): Promise<number>;
stop(): Promise<void>;
restart(): Promise<number>;
}