onebots 0.4.21 → 0.4.23

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,9 +1,6 @@
1
1
  import { Client, MessageElem, ShareElem } from "icqq";
2
- import { SegmentElem } from "icqq-cq-enable/lib/utils";
3
- import { QuoteElem } from "icqq/lib/message";
4
- export declare function processMessage(this: Client, message: string | SegmentElem | SegmentElem[], source?: QuoteElem): Promise<{
2
+ export declare function processMessage(this: Client, elements: MessageElem[]): Promise<{
5
3
  element: MessageElem[];
6
4
  music?: MessageElem;
7
5
  share?: ShareElem;
8
- quote?: QuoteElem;
9
6
  }>;
@@ -2,30 +2,25 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.processMessage = void 0;
4
4
  const utils_1 = require("../../utils");
5
- const utils_2 = require("icqq-cq-enable/lib/utils");
6
- async function processMessage(message, source) {
7
- const elements = typeof message === 'string' ? (0, utils_2.fromCqcode)(message) : (0, utils_2.fromSegment)(message);
8
- let quote = elements.find(e => e.type === 'reply');
9
- if (quote)
10
- (0, utils_1.remove)(elements, quote);
11
- let music = elements.find(e => e.type === 'music');
5
+ async function processMessage(elements) {
6
+ let music = elements.find((e) => e.type === "music");
12
7
  if (music) {
13
8
  (0, utils_1.remove)(elements, music);
14
- if (String(music.platform) === 'custom') {
15
- music.platform = music['subtype']; // gocq 的平台数据存储在 subtype 内,兼容 icqq 时要求前端必须发送 id 字段
9
+ if (String(music.platform) === "custom") {
10
+ music.platform = music["subtype"]; // gocq 的平台数据存储在 subtype 内,兼容 icqq 时要求前端必须发送 id 字段
16
11
  }
17
12
  }
18
- let share = elements.find(e => e.type === 'share');
13
+ let share = elements.find((e) => e.type === "share");
19
14
  if (share)
20
15
  (0, utils_1.remove)(elements, share);
21
16
  for (const element of elements) {
22
- if (['image', 'video', 'audio'].includes(element.type)) {
23
- if (element['file_id']?.startsWith('base64://'))
24
- element['file_id'] = Buffer.from(element['file_id'].slice(9), 'base64');
25
- if (element['file']?.startsWith('base64://'))
26
- element['file'] = Buffer.from(element['file'].slice(9), 'base64');
17
+ if (["image", "video", "audio"].includes(element.type)) {
18
+ if (element["file_id"]?.startsWith("base64://"))
19
+ element["file_id"] = Buffer.from(element["file_id"].slice(9), "base64");
20
+ if (element["file"]?.startsWith("base64://"))
21
+ element["file"] = Buffer.from(element["file"].slice(9), "base64");
27
22
  }
28
23
  }
29
- return { element: elements, quote: quote || source, share, music };
24
+ return { element: elements, share, music };
30
25
  }
31
26
  exports.processMessage = processMessage;
@@ -1,16 +1,14 @@
1
1
  /// <reference types="node" />
2
- /// <reference types="node" />
3
2
  import { Client, EventMap, MessageElem, Sendable as IcqqCanSend } from "icqq";
4
3
  import { Config } from './config';
5
4
  import { OneBot } from "../../onebot";
6
5
  import { Action } from "./action";
7
- import { EventEmitter } from "events";
8
6
  import { Logger } from "log4js";
9
7
  import { WebSocket, WebSocketServer } from "ws";
10
- export declare class V12 extends EventEmitter implements OneBot.Base {
8
+ import { Service } from "../../service";
9
+ export declare class V12 extends Service<'V12'> implements OneBot.Base {
11
10
  oneBot: OneBot<'V12'>;
12
11
  client: Client;
13
- config: V12.Config;
14
12
  version: string;
15
13
  action: Action;
16
14
  protected timestamp: number;
@@ -20,7 +18,7 @@ export declare class V12 extends EventEmitter implements OneBot.Base {
20
18
  wss?: WebSocketServer;
21
19
  wsr: Set<WebSocket>;
22
20
  private db;
23
- constructor(oneBot: OneBot<'V12'>, client: Client, config: V12.Config);
21
+ constructor(oneBot: OneBot<'V12'>, client: Client, config: OneBot.Config<'V12'>);
24
22
  get history(): V12.Payload<keyof Action>[];
25
23
  getFile(file_id: string): V12.FileInfo;
26
24
  delFile(file_id: string): boolean;
@@ -9,7 +9,6 @@ const utils_1 = require("../../utils");
9
9
  const path_1 = require("path");
10
10
  const onebot_1 = require("../../onebot");
11
11
  const action_1 = require("./action");
12
- const events_1 = require("events");
13
12
  const url_1 = require("url");
14
13
  const http_1 = __importDefault(require("http"));
15
14
  const https_1 = __importDefault(require("https"));
@@ -19,12 +18,12 @@ const db_1 = require("../../db");
19
18
  const app_1 = require("../../server/app");
20
19
  const fs_1 = require("fs");
21
20
  const message_1 = require("icqq/lib/message");
22
- class V12 extends events_1.EventEmitter {
21
+ const service_1 = require("../../service");
22
+ class V12 extends service_1.Service {
23
23
  constructor(oneBot, client, config) {
24
- super();
24
+ super(config);
25
25
  this.oneBot = oneBot;
26
26
  this.client = client;
27
- this.config = config;
28
27
  this.version = 'V12';
29
28
  this.timestamp = Date.now();
30
29
  this.wsr = new Set();
@@ -110,6 +109,25 @@ class V12 extends events_1.EventEmitter {
110
109
  }
111
110
  this.startWsReverse(config);
112
111
  });
112
+ this.on('dispatch', (unserialized) => {
113
+ const serialized = JSON.stringify(unserialized);
114
+ for (const ws of this.wss.clients) {
115
+ ws.send(serialized, (err) => {
116
+ if (err)
117
+ this.logger.error(`正向WS(${ws.url})上报事件失败: ` + err.message);
118
+ else
119
+ this.logger.debug(`正向WS(${ws.url})上报事件成功: ` + serialized);
120
+ });
121
+ }
122
+ for (const ws of this.wsr) {
123
+ ws.send(serialized, (err) => {
124
+ if (err)
125
+ this.logger.error(`反向WS(${ws.url})上报事件失败: ` + err.message);
126
+ else
127
+ this.logger.debug(`反向WS(${ws.url})上报事件成功: ` + serialized);
128
+ });
129
+ }
130
+ });
113
131
  if (this.config.heartbeat) {
114
132
  this.heartbeat = setInterval(() => {
115
133
  this.dispatch(V12.formatPayload(this.oneBot.uin, 'heartbeat', {
@@ -258,31 +276,9 @@ class V12 extends events_1.EventEmitter {
258
276
  }
259
277
  this._webSocketHandler(ws);
260
278
  });
261
- this.on('dispatch', (unserialized) => {
262
- const serialized = JSON.stringify(unserialized);
263
- for (const ws of this.wss.clients) {
264
- ws.send(serialized, (err) => {
265
- if (err)
266
- this.logger.error(`正向WS(${ws.url})上报事件失败: ` + err.message);
267
- else
268
- this.logger.debug(`正向WS(${ws.url})上报事件成功: ` + serialized);
269
- });
270
- }
271
- });
272
279
  }
273
280
  startWsReverse(config) {
274
281
  this._createWsr(config.url, config);
275
- this.on('dispatch', (unserialized) => {
276
- const serialized = JSON.stringify(unserialized);
277
- for (const ws of this.wsr) {
278
- ws.send(serialized, (err) => {
279
- if (err)
280
- this.logger.error(`反向WS(${ws.url})上报事件失败: ` + err.message);
281
- else
282
- this.logger.debug(`反向WS(${ws.url})上报事件成功: ` + serialized);
283
- });
284
- }
285
- });
286
282
  }
287
283
  async stop(force) {
288
284
  if (this.client.status === icqq_1.OnlineStatus.Online) {
@@ -369,6 +365,8 @@ class V12 extends events_1.EventEmitter {
369
365
  return value + '';
370
366
  }),
371
367
  };
368
+ if (!this.filterFn(payload))
369
+ return;
372
370
  this.emit('dispatch', payload);
373
371
  }
374
372
  async apply(req) {
@@ -17,8 +17,8 @@ async function buildMusic(target, bu, music) {
17
17
  let { singer = null, title = null, jumpUrl = null, musicUrl = null, preview = null } = music.id ? await getMusicInfo(music.id) : {};
18
18
  singer = music['content'] || music.singer || singer; // 自定义参数优先级高于默认值(gocq的参数名与icqq有区别,做下兼容)
19
19
  title = music.title || title;
20
- jumpUrl = music.jumpUrl || jumpUrl;
21
- musicUrl = music['url'] || music['voice'] || music.musicUrl || musicUrl;
20
+ jumpUrl = music.jumpUrl || music['url'] || jumpUrl;
21
+ musicUrl = music['voice'] || music['url'] || music.musicUrl || musicUrl;
22
22
  preview = music['image'] || music.preview || preview;
23
23
  if (!musicUrl)
24
24
  style = 0;
@@ -0,0 +1,29 @@
1
+ /// <reference types="node" />
2
+ import { EventEmitter } from "events";
3
+ import { OneBot } from "./onebot";
4
+ import { Dict } from "@zhinjs/shared";
5
+ export interface Service<V extends OneBot.Version> {
6
+ filterFn(event: Dict): boolean;
7
+ }
8
+ export declare class Service<V extends OneBot.Version> extends EventEmitter {
9
+ config: OneBot.Config<V>;
10
+ constructor(config: OneBot.Config<V>);
11
+ }
12
+ export declare namespace Service {
13
+ type MaybeArray<T = any> = T | T[];
14
+ type AttrFilter = {
15
+ [P in keyof Dict]?: MaybeArray | boolean;
16
+ };
17
+ export type Filters = AttrFilter | WithFilter | UnionFilter | ExcludeFilter;
18
+ export type WithFilter = {
19
+ $and: Filters;
20
+ };
21
+ export type UnionFilter = {
22
+ $or: Filters;
23
+ };
24
+ export type ExcludeFilter = {
25
+ $not: Filters;
26
+ };
27
+ export function createFilterFunction(filters: Filters): (event: Dict) => any;
28
+ export {};
29
+ }
package/lib/service.js ADDED
@@ -0,0 +1,85 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Service = void 0;
4
+ const events_1 = require("events");
5
+ class Service extends events_1.EventEmitter {
6
+ constructor(config) {
7
+ super();
8
+ this.config = config;
9
+ this.filterFn = Service.createFilterFunction(config.filters || {});
10
+ }
11
+ }
12
+ exports.Service = Service;
13
+ (function (Service) {
14
+ function createFilterFunction(filters) {
15
+ const isLogicKey = (key) => {
16
+ return [
17
+ "$and",
18
+ "$or",
19
+ "$not",
20
+ "$nor",
21
+ "$regexp",
22
+ "$like",
23
+ "$gt",
24
+ "$gte",
25
+ "$lt",
26
+ "$lte",
27
+ "$between",
28
+ ].includes(key);
29
+ };
30
+ const filterFn = (event, key, value) => {
31
+ // 如果 key 为 $and、$or、$not、$nor 则递归调用
32
+ if (key === "$and" || key === "$or" || key === "$not" || key === "$nor") {
33
+ if (!value || typeof value !== "object")
34
+ throw new Error("invalid filter");
35
+ switch (key) {
36
+ case "$and":
37
+ return Array.isArray(value)
38
+ ? value.every(item => filterFn(event, key, item))
39
+ : Object.entries(value).every(([key, value]) => filterFn(event, key, value));
40
+ case "$or":
41
+ return Array.isArray(value)
42
+ ? value.some(item => filterFn(event, key, item))
43
+ : Object.entries(value).some(([key, value]) => filterFn(event, key, value));
44
+ case "$nor":
45
+ return !filterFn(event, "$or", value);
46
+ case "$not":
47
+ return !filterFn(event, "$and", value);
48
+ }
49
+ }
50
+ if (typeof value === "boolean" && typeof event[key] !== "boolean") {
51
+ return value;
52
+ }
53
+ if (typeof value !== "object") {
54
+ if (key === "$regex" && typeof value === "string")
55
+ return new RegExp(value).test(String(event));
56
+ if (key === "$like" && typeof value === "string")
57
+ return String(event).includes(value);
58
+ if (key === "$gt" && typeof value === "number")
59
+ return Number(event) > value;
60
+ if (key === "$gte" && typeof value === "number")
61
+ return Number(event) >= value;
62
+ if (key === "$lt" && typeof value === "number")
63
+ return Number(event) < value;
64
+ if (key === "$lte" && typeof value === "number")
65
+ return Number(event) <= value;
66
+ return value === event[key];
67
+ }
68
+ if (key === "$between" &&
69
+ Array.isArray(value) &&
70
+ value.length === 2 &&
71
+ value.every(item => typeof item === "number")) {
72
+ const [start, end] = value;
73
+ return event >= start && event <= end;
74
+ }
75
+ if (Array.isArray(value)) {
76
+ return value.includes(event[key]);
77
+ }
78
+ return createFilterFunction(value)(isLogicKey(key) ? event : event[key]);
79
+ };
80
+ return (event) => {
81
+ return Object.entries(filters).every(([key, value]) => filterFn(event, key, value));
82
+ };
83
+ }
84
+ Service.createFilterFunction = createFilterFunction;
85
+ })(Service || (exports.Service = Service = {}));
package/lib/types.d.ts CHANGED
@@ -2,8 +2,8 @@ export type LogLevel = "trace" | "debug" | "info" | "warn" | "error" | "fatal" |
2
2
  export type Dispose = () => any;
3
3
  export type MayBeArray<T extends any> = T | T[];
4
4
  /**
5
- * 异步锁---
6
- */
5
+ * 异步锁---
6
+ */
7
7
  export declare class AsyncLock {
8
8
  private _lock;
9
9
  private _waitList;
package/lib/types.js CHANGED
@@ -2,8 +2,8 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.AsyncLock = void 0;
4
4
  /**
5
- * 异步锁---
6
- */
5
+ * 异步锁---
6
+ */
7
7
  class AsyncLock {
8
8
  constructor() {
9
9
  this._lock = false;
@@ -11,7 +11,7 @@ class AsyncLock {
11
11
  }
12
12
  async lock() {
13
13
  if (this._lock) {
14
- await new Promise((resolve) => {
14
+ await new Promise(resolve => {
15
15
  this._waitList.push(resolve);
16
16
  });
17
17
  }
package/lib/utils.js CHANGED
@@ -25,7 +25,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
25
25
  Object.defineProperty(exports, "__esModule", { value: true });
26
26
  exports.getProperties = exports.protectedFields = exports.uuid = exports.toBool = exports.remove = exports.toHump = exports.Mixin = exports.toLine = exports.omit = exports.pick = exports.deepClone = exports.transformObj = exports.deepMerge = exports.version = void 0;
27
27
  const crypto = __importStar(require("crypto"));
28
- const packageJson = require('../package.json');
28
+ const packageJson = require("../package.json");
29
29
  exports.version = packageJson.version;
30
30
  // 合并对象/数组
31
31
  function deepMerge(base, ...from) {
@@ -34,7 +34,7 @@ function deepMerge(base, ...from) {
34
34
  if (from.length === 0) {
35
35
  return base;
36
36
  }
37
- if (typeof base !== 'object') {
37
+ if (typeof base !== "object") {
38
38
  return base;
39
39
  }
40
40
  if (Array.isArray(base)) {
@@ -43,7 +43,7 @@ function deepMerge(base, ...from) {
43
43
  for (const item of from) {
44
44
  for (const key in item) {
45
45
  if (base.hasOwnProperty(key)) {
46
- if (typeof base[key] === 'object') {
46
+ if (typeof base[key] === "object") {
47
47
  base[key] = deepMerge(base[key], item[key]);
48
48
  }
49
49
  else {
@@ -63,7 +63,7 @@ function transformObj(obj, callback) {
63
63
  return obj;
64
64
  if (Array.isArray(obj))
65
65
  return obj.map(item => transformObj(item, callback));
66
- if (typeof obj !== 'object')
66
+ if (typeof obj !== "object")
67
67
  return obj;
68
68
  return Object.fromEntries(Object.keys(obj).map(key => {
69
69
  return [key, callback(key, obj[key])];
@@ -72,13 +72,13 @@ function transformObj(obj, callback) {
72
72
  exports.transformObj = transformObj;
73
73
  // 深拷贝
74
74
  function deepClone(obj) {
75
- if (typeof obj !== 'object')
75
+ if (typeof obj !== "object")
76
76
  return obj;
77
77
  if (!obj)
78
78
  return obj;
79
79
  //判断拷贝的obj是对象还是数组
80
80
  if (Array.isArray(obj))
81
- return obj.map((item) => deepClone(item));
81
+ return obj.map(item => deepClone(item));
82
82
  const objClone = {};
83
83
  for (const key in obj) {
84
84
  if (obj.hasOwnProperty(key)) {
@@ -127,7 +127,7 @@ exports.toLine = toLine;
127
127
  function Mixin(base, ...classes) {
128
128
  classes.forEach(ctr => {
129
129
  Object.getOwnPropertyNames(ctr.prototype).forEach(name => {
130
- if (name === 'constructor')
130
+ if (name === "constructor")
131
131
  return;
132
132
  base.prototype[name] = ctr.prototype[name];
133
133
  });
@@ -136,7 +136,7 @@ function Mixin(base, ...classes) {
136
136
  }
137
137
  exports.Mixin = Mixin;
138
138
  function toHump(action) {
139
- return action.replace(/_[\w]/g, (s) => {
139
+ return action.replace(/_[\w]/g, s => {
140
140
  return s[1].toUpperCase();
141
141
  });
142
142
  }
@@ -155,26 +155,38 @@ function toBool(v) {
155
155
  exports.toBool = toBool;
156
156
  function uuid() {
157
157
  let hex = crypto.randomBytes(16).toString("hex");
158
- return hex.substr(0, 8) + "-" + hex.substr(8, 4) + "-" + hex.substr(12, 4) + "-" + hex.substr(16, 4) + "-" + hex.substr(20);
158
+ return (hex.substr(0, 8) +
159
+ "-" +
160
+ hex.substr(8, 4) +
161
+ "-" +
162
+ hex.substr(12, 4) +
163
+ "-" +
164
+ hex.substr(16, 4) +
165
+ "-" +
166
+ hex.substr(20));
159
167
  }
160
168
  exports.uuid = uuid;
161
169
  function protectedFields(source, ...keys) {
162
- const protocolValue = (value) => {
163
- if (value && typeof value === 'object')
170
+ const protocolValue = value => {
171
+ if (value && typeof value === "object")
164
172
  return Object.fromEntries(Object.entries(value).map(([key, value]) => {
165
173
  return [key, protocolValue(value)];
166
174
  }));
167
- return `${value}`.split('').map(() => '*').join('');
175
+ return `${value}`
176
+ .split("")
177
+ .map(() => "*")
178
+ .join("");
168
179
  };
169
- if (!source || typeof source !== 'object')
170
- throw new Error('source must is object');
180
+ if (!source || typeof source !== "object")
181
+ throw new Error("source must is object");
171
182
  return Object.fromEntries(Object.entries(source).map(([key, value]) => {
172
183
  return [key, keys.includes(key) ? protocolValue(value) : value];
173
184
  }));
174
185
  }
175
186
  exports.protectedFields = protectedFields;
176
187
  function getProperties(obj) {
177
- if (obj.__proto__ === null) { //说明该对象已经是最顶层的对象
188
+ if (obj.__proto__ === null) {
189
+ //说明该对象已经是最顶层的对象
178
190
  return [];
179
191
  }
180
192
  return Object.getOwnPropertyNames(obj).concat(getProperties(obj.__proto__));
package/package.json CHANGED
@@ -1,72 +1,75 @@
1
1
  {
2
- "name": "onebots",
3
- "version": "0.4.21",
4
- "description": "基于icqq的多例oneBot实现",
5
- "engines": {
6
- "node": ">=16"
7
- },
8
- "main": "lib/index.js",
9
- "bin": {
10
- "onebots": "./lib/bin.js"
11
- },
12
- "scripts": {
13
- "start": "node .",
14
- "build": "tsc --project tsconfig.json && tsc-alias -p tsconfig.json && cp -r src/config.sample.yaml lib/config.sample.yaml",
15
- "dev": "ts-node-dev -r tsconfig-paths/register ./src/bin.ts -c config.yaml",
16
- "pub": "npm publish --access public",
17
- "docs:dev": "vitepress dev docs --port 8989",
18
- "docs:build": "vitepress build docs",
19
- "docs:preview": "vitepress preview docs",
20
- "test": "echo \"Error: no test specified\" && exit 1"
21
- },
22
- "repository": {
23
- "type": "git",
24
- "url": "git+https://github.com/liucl-cn/onebots.git"
25
- },
26
- "keywords": [
27
- "onebot",
28
- "icqq",
29
- "cq-http"
30
- ],
31
- "author": "凉菜",
32
- "license": "MIT",
33
- "bugs": {
34
- "url": "https://github.com/liucl-cn/onebots/issues"
35
- },
36
- "homepage": "https://github.com/liucl-cn/onebots#readme",
37
- "devDependencies": {
38
- "@types/koa": "^2.13.4",
39
- "@types/koa__router": "^8.0.11",
40
- "@types/koa-bodyparser": "^4.3.7",
41
- "@types/node": "latest",
42
- "@types/ws": "^8.5.3",
43
- "ts-node-dev": "latest",
44
- "tsc-alias": "latest",
45
- "tsconfig-paths": "latest",
46
- "typescript": "latest",
47
- "vitepress": "^1.0.0-alpha.72"
48
- },
49
- "files": [
50
- "/lib/**/*.js",
51
- "/lib/**/*.d.ts",
52
- "/lib/*.yaml",
53
- "/**/LICENSE"
54
- ],
55
- "peerDependencies": {
56
- "icqq": "latest"
57
- },
58
- "dependencies": {
59
- "@koa/router": "^10.1.1",
60
- "@zhinjs/shared": "^0.0.9",
61
- "icqq-cq-enable": "^1.0.1",
62
- "js-yaml": "^4.1.0",
63
- "koa": "^2.13.4",
64
- "koa-bodyparser": "^4.3.0",
65
- "log4js": "^6.5.2",
66
- "mime-types": "^2.1.35",
67
- "ws": "^8.8.0",
68
- "better-sqlite3": "^8.6.0",
69
- "reflect-metadata": "^0.1.13",
70
- "typeorm": "^0.3.17"
71
- }
2
+ "name": "onebots",
3
+ "version": "0.4.23",
4
+ "description": "基于icqq的多例oneBot实现",
5
+ "engines": {
6
+ "node": ">=16"
7
+ },
8
+ "main": "lib/index.js",
9
+ "bin": {
10
+ "onebots": "./lib/bin.js"
11
+ },
12
+ "scripts": {
13
+ "start": "node .",
14
+ "build": "tsc --project tsconfig.json && tsc-alias -p tsconfig.json && cp -r src/config.sample.yaml lib/config.sample.yaml",
15
+ "dev": "ts-node-dev -r tsconfig-paths/register ./src/bin.ts -c config.yaml",
16
+ "pub": "npm publish --access public",
17
+ "lint": "prettier --check ./**/*.{ts,js,vue}",
18
+ "lint:fix": "prettier --write ./**/*.{ts,js,md}",
19
+ "test": "ts-node-dev -r tsconfig-paths/register ./src/test.ts",
20
+ "docs:dev": "vitepress dev docs --port 8989",
21
+ "docs:build": "vitepress build docs",
22
+ "docs:preview": "vitepress preview docs"
23
+ },
24
+ "repository": {
25
+ "type": "git",
26
+ "url": "git+https://github.com/liucl-cn/onebots.git"
27
+ },
28
+ "keywords": [
29
+ "onebot",
30
+ "icqq",
31
+ "cq-http"
32
+ ],
33
+ "author": "凉菜",
34
+ "license": "MIT",
35
+ "bugs": {
36
+ "url": "https://github.com/liucl-cn/onebots/issues"
37
+ },
38
+ "homepage": "https://github.com/liucl-cn/onebots#readme",
39
+ "devDependencies": {
40
+ "@types/koa": "^2.13.4",
41
+ "@types/koa__router": "^8.0.11",
42
+ "@types/koa-bodyparser": "^4.3.7",
43
+ "@types/node": "latest",
44
+ "@types/ws": "^8.5.3",
45
+ "ts-node-dev": "latest",
46
+ "tsc-alias": "latest",
47
+ "prettier": "^3.0.0",
48
+ "tsconfig-paths": "latest",
49
+ "typescript": "latest",
50
+ "vitepress": "^1.0.0-alpha.72"
51
+ },
52
+ "files": [
53
+ "/lib/**/*.js",
54
+ "/lib/**/*.d.ts",
55
+ "/lib/*.yaml",
56
+ "/**/LICENSE"
57
+ ],
58
+ "peerDependencies": {
59
+ "icqq": "latest"
60
+ },
61
+ "dependencies": {
62
+ "@koa/router": "^10.1.1",
63
+ "@zhinjs/shared": "^0.0.9",
64
+ "icqq-cq-enable": "^1.0.1",
65
+ "js-yaml": "^4.1.0",
66
+ "koa": "^2.13.4",
67
+ "koa-bodyparser": "^4.3.0",
68
+ "log4js": "^6.5.2",
69
+ "mime-types": "^2.1.35",
70
+ "reflect-metadata": "^0.1.13",
71
+ "sqlite3": "^5.1.6",
72
+ "typeorm": "^0.3.17",
73
+ "ws": "^8.8.0"
74
+ }
72
75
  }