From 3a9312654e4bbbf72279f477ab84cb5e60c1a94f Mon Sep 17 00:00:00 2001 From: CrescentLeaf Date: Wed, 24 Sep 2025 21:19:42 +0800 Subject: [PATCH] =?UTF-8?q?chore:=20=E6=8E=A7=E5=88=B6=E8=87=BA=E4=B8=8D?= =?UTF-8?q?=E8=A7=A3=E6=9E=90=20buffer=20*=20=E9=A1=8D=E5=A4=96=E4=BD=9C?= =?UTF-8?q?=E7=94=A8:=20=E5=8A=A0=E5=BF=AB=E5=82=B3=E8=BC=B8=E6=95=88?= =?UTF-8?q?=E7=8E=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- server/api/ApiManager.ts | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/server/api/ApiManager.ts b/server/api/ApiManager.ts index 90acdae..4b5a465 100644 --- a/server/api/ApiManager.ts +++ b/server/api/ApiManager.ts @@ -8,6 +8,19 @@ import BaseApi from "./BaseApi.ts" import DataWrongError from "./DataWrongError.ts" import chalk from "chalk" +function stringifyNotIncludeArrayBuffer(value: any) { + return JSON.stringify(value, (_k, v) => { + if (v instanceof ArrayBuffer) { + return { + type: 'ArrayBuffer', + byteLength: value.byteLength, + data: '[...binary data omitted...]' + } + } + return v + }) +} + export default class ApiManager { static httpServer: HttpServerLike static socketIoServer: SocketIo.Server