From 6b473e48746a7b5d4064d6cae40959cc9e04e04b Mon Sep 17 00:00:00 2001 From: Il Harper Date: Tue, 5 Mar 2024 21:25:27 +0800 Subject: [PATCH] refactor(event): update --- packages/engine-chronocat-event/src/globalVars.ts | 1 + packages/engine-chronocat-event/src/index.ts | 4 +--- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/packages/engine-chronocat-event/src/globalVars.ts b/packages/engine-chronocat-event/src/globalVars.ts index d7597b4..8830d27 100644 --- a/packages/engine-chronocat-event/src/globalVars.ts +++ b/packages/engine-chronocat-event/src/globalVars.ts @@ -1 +1,2 @@ +export const requestMethodMap: Record = {} export const emittedBuddyReqList: string[] = [] diff --git a/packages/engine-chronocat-event/src/index.ts b/packages/engine-chronocat-event/src/index.ts index 998a1df..722cdcb 100644 --- a/packages/engine-chronocat-event/src/index.ts +++ b/packages/engine-chronocat-event/src/index.ts @@ -15,7 +15,7 @@ import { MsgType, SendType } from '@chronocat/red' import type { ChronocatContext } from '@chronocat/shell' import type { IpcManData } from 'ipcman' import { ipcMan } from 'ipcman' -import { emittedBuddyReqList } from './globalVars' +import { emittedBuddyReqList, requestMethodMap } from './globalVars' import { FriendRequestDispatchMessage, MessageCreatedDispatchMessage, @@ -26,8 +26,6 @@ declare const __DEFINE_CHRONO_VERSION__: string export const name = 'engine-chronocat-event' export const version = __DEFINE_CHRONO_VERSION__ -const requestMethodMap: Record = {} - export const apply = async (ctx: ChronocatContext) => { const dispatcher = async (method: string, payload: unknown) => { switch (method) {