feat: 턴 다이아몬드 CLI 추가 및 상태 관리 개선

This commit is contained in:
2025-12-29 07:50:35 +00:00
parent 86c5d5f111
commit e0eb768e2e
6 changed files with 212 additions and 13 deletions
+20
View File
@@ -1,3 +1,8 @@
import path from 'node:path';
import { fileURLToPath } from 'node:url';
import { runTurnDaemonCli } from './turn/cli.js';
export * from './lifecycle/types.js';
export * from './lifecycle/clock.js';
export * from './lifecycle/inMemoryControlQueue.js';
@@ -14,3 +19,18 @@ export * from './turn/inMemoryStateStore.js';
export * from './turn/inMemoryTurnProcessor.js';
export * from './turn/databaseHooks.js';
export * from './turn/turnDaemon.js';
export * from './turn/cli.js';
const isMain = (): boolean => {
if (!process.argv[1]) {
return false;
}
return fileURLToPath(import.meta.url) === path.resolve(process.argv[1]);
};
if (isMain()) {
runTurnDaemonCli().catch((error) => {
console.error('[turn-daemon] failed to start', error);
process.exitCode = 1;
});
}