From 56d6ebe916cedcc1e7520eb435258de413a54d6f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=89=8B=E7=93=9C=E4=B8=80=E5=8D=81=E9=9B=AA?= Date: Fri, 5 Jul 2024 15:48:03 +0800 Subject: [PATCH] =?UTF-8?q?refactor:=20=E8=BF=81=E7=A7=BB=E5=88=B0?= =?UTF-8?q?=E6=96=B0=E5=BA=93?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/common/utils/EventTask.ts | 1 - src/newcore/index.ts | 2 -- src/newcore/main.ts | 29 ------------------------ src/newcore/platform/liteloader/index.ts | 1 - src/newcore/platform/node/index.ts | 1 - src/newcore/util/proxyWrapper.ts | 1 - 6 files changed, 35 deletions(-) delete mode 100644 src/newcore/index.ts delete mode 100644 src/newcore/main.ts delete mode 100644 src/newcore/platform/liteloader/index.ts delete mode 100644 src/newcore/platform/node/index.ts delete mode 100644 src/newcore/util/proxyWrapper.ts diff --git a/src/common/utils/EventTask.ts b/src/common/utils/EventTask.ts index 319bebd8..696973db 100644 --- a/src/common/utils/EventTask.ts +++ b/src/common/utils/EventTask.ts @@ -1,4 +1,3 @@ -import { NodeIKernelMsgListener } from '@/core'; import { NodeIQQNTWrapperSession } from '@/core/wrapper'; import { randomUUID } from 'crypto'; diff --git a/src/newcore/index.ts b/src/newcore/index.ts deleted file mode 100644 index 89b9370c..00000000 --- a/src/newcore/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -//统一到处入口 -export * from './main'; \ No newline at end of file diff --git a/src/newcore/main.ts b/src/newcore/main.ts deleted file mode 100644 index 38c417c9..00000000 --- a/src/newcore/main.ts +++ /dev/null @@ -1,29 +0,0 @@ -enum NapCatCorePlatform { - Node = 'Node',//命令行模式加载 - LiteLoader = 'LiteLoader',//LL插件模式加载 -} -class NewNapCatCore { - platform: NapCatCorePlatform; // 平台 - constructor(platform: NapCatCorePlatform) { - this.platform = platform; - } -} -export class NapCatCoreManger { - static core: NewNapCatCore | undefined = undefined; - static defaultPlatform: NapCatCorePlatform = NapCatCorePlatform.Node; - static SetDefaultCore(platform: NapCatCorePlatform) { - if (this.core !== undefined) { - return; - } - this.defaultPlatform = platform; - } - static GetPlatform(): NapCatCorePlatform { - return NapCatCoreManger.defaultPlatform; - } - static GetInstance(): NewNapCatCore { - if (this.core === undefined) { - this.core = new NewNapCatCore(NapCatCoreManger.defaultPlatform); - } - return this.core; - } -} \ No newline at end of file diff --git a/src/newcore/platform/liteloader/index.ts b/src/newcore/platform/liteloader/index.ts deleted file mode 100644 index 7f2ec822..00000000 --- a/src/newcore/platform/liteloader/index.ts +++ /dev/null @@ -1 +0,0 @@ -//拦截proxy到会话 \ No newline at end of file diff --git a/src/newcore/platform/node/index.ts b/src/newcore/platform/node/index.ts deleted file mode 100644 index 6040b8db..00000000 --- a/src/newcore/platform/node/index.ts +++ /dev/null @@ -1 +0,0 @@ -//初始化跟之前一样 \ No newline at end of file diff --git a/src/newcore/util/proxyWrapper.ts b/src/newcore/util/proxyWrapper.ts deleted file mode 100644 index 0fea8f66..00000000 --- a/src/newcore/util/proxyWrapper.ts +++ /dev/null @@ -1 +0,0 @@ -//proxy封装工具类 \ No newline at end of file