feat: 大规模去耦合

Moved various helper, event, and utility files from napcat-common to napcat-core/helper for better modularity and separation of concerns. Updated imports across packages to reflect new file locations. Removed unused dependencies from napcat-common and added them to napcat-core where needed. Also consolidated type definitions and cleaned up tsconfig settings for improved compatibility.
This commit is contained in:
手瓜一十雪 committed 2025-11-15 13:36:33 +08:00
1 parent 43441f285b
commit be87f1f8e5
50 files changed
+87 -465

No files matched your search

+1 -1
View File
@@ -1,6 +1,6 @@
import type { RequestHandler } from 'express';
import { sendError, sendSuccess } from '../utils/response';
import { logSubscription } from 'napcat-common/src/log';
import { logSubscription } from 'napcat-core/helper/log';
import { terminalManager } from '../terminal/terminal_manager';
import { WebUiConfig } from '@/napcat-webui-backend/index';
// 判断是否是 macos
@@ -2,11 +2,11 @@
import { WebUiConfig } from '../../index';
import { AuthHelper } from '../helper/SignToken';
import type { WebUiCredentialJson } from '@/napcat-webui-backend/src/types';
import { LogWrapper } from 'napcat-common/src/log';
import { WebSocket, WebSocketServer } from 'ws';
import os from 'os';
import { IPty, spawn as ptySpawn } from 'napcat-pty';
import { randomUUID } from 'crypto';
import { LogWrapper } from '@/napcat-core/helper/log';
interface TerminalInstance {
pty: IPty; // 改用 PTY 实例