This commit is contained in:
2025-08-28 15:47:59 +00:00
parent 1c2310c185
commit 33fb02733d
30 changed files with 1061 additions and 1070 deletions

14
ts/cli/utils/ipc.ts Normal file
View File

@@ -0,0 +1,14 @@
import { tspmIpcClient } from '../../classes.ipcclient.js';
// Helper function to run IPC commands with automatic disconnect
export async function runIpcCommand<T>(body: () => Promise<T>): Promise<T> {
try {
return await body();
} finally {
try {
await tspmIpcClient.disconnect();
} catch {
// Ignore disconnect errors
}
}
}