From 7109f61cefe16bddc3f791b4e6bb13092d7d6757 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=97=B6=E7=91=BE?= <74231782+sj817@users.noreply.github.com> Date: Fri, 17 Jan 2025 18:27:30 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=A5=BD=E5=8F=8B=E4=BA=8B=E4=BB=B6?= =?UTF-8?q?=E5=90=AF=E7=94=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 20 ++++++++++--------- packages/core/package.json | 2 +- .../core/src/event/handler/other/handler.ts | 2 +- packages/core/src/types/config/config.ts | 2 -- 4 files changed, 13 insertions(+), 13 deletions(-) diff --git a/package.json b/package.json index 5eaf9b6..f88b620 100644 --- a/package.json +++ b/package.json @@ -2,14 +2,19 @@ "name": "@karinjs/project", "version": "1.0.0", "description": "", - "main": "", + "keywords": [], + "license": "MIT", + "author": "shijin", "type": "module", + "main": "", "scripts": { - "dev": "cd packages/core && pnpm run dev", - "dev:web": "cd packages/web && pnpm run dev", - "build": "cd packages/core && pnpm run build", + "build": "pnpm --filter node-karin run build", + "build:all": "pnpm run build && pnpm run build:web", + "build:prod": "pnpm --filter node-karin run build:prod", "build:web": "cd packages/web && pnpm run build", - "build:all": "pnpm run build && pnpm run build:web" + "dev": "pnpm --filter node-karin run dev", + "dev:cli": "pnpm --filter node-karin run dev:cli", + "dev:web": "cd packages/web && pnpm run dev" }, "devDependencies": { "@types/node": "^22.5.0", @@ -25,8 +30,5 @@ }, "peerDependencies": { "node-karin": "workspace:*" - }, - "keywords": [], - "author": "shijin", - "license": "MIT" + } } diff --git a/packages/core/package.json b/packages/core/package.json index 73c458a..375378a 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -62,7 +62,7 @@ "pr": "node cli/pr.js all", "pub": "npm publish --access public", "pub-beta": "npm publish --access public --tag beta", - "sort": "npx sort-package-json && sort-json tsconfig.json" + "sort": "sort-package-json && sort-json tsconfig.json" }, "dependencies": { "@types/express": "^5.0.0", diff --git a/packages/core/src/event/handler/other/handler.ts b/packages/core/src/event/handler/other/handler.ts index 806a746..97e20ca 100644 --- a/packages/core/src/event/handler/other/handler.ts +++ b/packages/core/src/event/handler/other/handler.ts @@ -180,7 +180,7 @@ export const privateFilterEvent = ( cd: boolean, ): boolean => { if (ctx.isFriend) { - if (!config?.user?.enable) { + if (!config?.friend?.enable) { log(ctx.userId, `当前好友事件未启用: ${ctx.eventId}`) return false } diff --git a/packages/core/src/types/config/config.ts b/packages/core/src/types/config/config.ts index 9224855..b36a71a 100644 --- a/packages/core/src/types/config/config.ts +++ b/packages/core/src/types/config/config.ts @@ -8,8 +8,6 @@ export interface Config { admin: string[] /** 用户管理 */ user: { - /** 是否启用用户事件 */ - enable: boolean /** 用户白名单 */ enable_list: string[] /** 用户黑名单 */