feat(companion): add waitForIdle runtime drain helper
This commit is contained in:
@@ -22,6 +22,7 @@ import type {
|
||||
SetNodeLocationInput,
|
||||
SystemCapabilitiesResult,
|
||||
SystemNodesResult,
|
||||
WaitForIdleOptions,
|
||||
} from './runtimeClient.js';
|
||||
import {
|
||||
CompanionHeartbeatLoop,
|
||||
@@ -325,6 +326,10 @@ export class MacOSCompanionClient {
|
||||
return this.runtime.waitForContextWarning(options);
|
||||
}
|
||||
|
||||
waitForIdle(options?: WaitForIdleOptions): Promise<void> {
|
||||
return this.runtime.waitForIdle(options);
|
||||
}
|
||||
|
||||
private resolveSessionId(sessionId?: string): string {
|
||||
const resolved = sessionId ?? this.defaultSessionId;
|
||||
if (!resolved) {
|
||||
@@ -579,6 +584,10 @@ export class IOSCompanionClient {
|
||||
return this.runtime.waitForContextWarning(options);
|
||||
}
|
||||
|
||||
waitForIdle(options?: WaitForIdleOptions): Promise<void> {
|
||||
return this.runtime.waitForIdle(options);
|
||||
}
|
||||
|
||||
private resolveSessionId(sessionId?: string): string {
|
||||
const resolved = sessionId ?? this.defaultSessionId;
|
||||
if (!resolved) {
|
||||
@@ -831,6 +840,10 @@ export class AndroidCompanionClient {
|
||||
return this.runtime.waitForContextWarning(options);
|
||||
}
|
||||
|
||||
waitForIdle(options?: WaitForIdleOptions): Promise<void> {
|
||||
return this.runtime.waitForIdle(options);
|
||||
}
|
||||
|
||||
private resolveSessionId(sessionId?: string): string {
|
||||
const resolved = sessionId ?? this.defaultSessionId;
|
||||
if (!resolved) {
|
||||
|
||||
Reference in New Issue
Block a user