fix(client): Improve IPC client robustness and daemon debug logging; update tests and package metadata

This commit is contained in:
2025-08-29 09:29:53 +00:00
parent ebf06d6153
commit 6a8e723c03
10 changed files with 305 additions and 177 deletions

View File

@@ -2,7 +2,7 @@ import { expect, tap } from '@git.zone/tstest/tapbundle';
import * as tspm from '../ts/index.js';
import * as path from 'path';
import * as fs from 'fs/promises';
import { TspmIpcClient } from '../ts/classes.ipcclient.js';
import { TspmIpcClient } from '../ts/client/tspm.ipcclient.js';
import * as os from 'os';
// Test IPC client functionality
@@ -93,15 +93,15 @@ tap.test('IPC client daemon running check - current process', async () => {
tap.test('IPC client singleton instance', async () => {
// Import the singleton
const { tspmIpcClient } = await import('../ts/classes.ipcclient.js');
const { tspmIpcClient } = await import('../ts/client/tspm.ipcclient.js');
expect(tspmIpcClient).toBeInstanceOf(TspmIpcClient);
// Test that it's the same instance
const { tspmIpcClient: secondImport } = await import(
'../ts/classes.ipcclient.js'
'../ts/client/tspm.ipcclient.js'
);
expect(tspmIpcClient).toBe(secondImport);
expect(tspmIpcClient).toEqual(secondImport);
});
tap.test('IPC client request method type safety', async () => {