BREAKING CHANGE(daemon): Refactor daemon and service management: remove IPC auto-spawn, add TspmServiceManager, tighten IPC/client/CLI behavior and tests
This commit is contained in:
@@ -7,11 +7,12 @@ export function pad(str: string, length: number): string {
|
||||
|
||||
// Helper for unknown errors
|
||||
export const unknownError = (err: any) =>
|
||||
(err?.message && typeof err.message === 'string') ? err.message : String(err);
|
||||
err?.message && typeof err.message === 'string' ? err.message : String(err);
|
||||
|
||||
// Helper function to format log entries
|
||||
export function formatLog(log: any): string {
|
||||
const timestamp = new Date(log.timestamp).toLocaleTimeString();
|
||||
const prefix = log.type === 'stdout' ? '[OUT]' : log.type === 'stderr' ? '[ERR]' : '[SYS]';
|
||||
const prefix =
|
||||
log.type === 'stdout' ? '[OUT]' : log.type === 'stderr' ? '[ERR]' : '[SYS]';
|
||||
return `${timestamp} ${prefix} ${log.message}`;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user