Compare commits

...

10 Commits

Author SHA1 Message Date
pk5ls20
3efd8163c9 fix: MoeHoo-Linux Amd64 2024-11-06 11:28:57 +08:00
pk5ls20
cc2d11449c release: v3.5.2 2024-11-06 09:28:14 +08:00
pk5ls20
7e9c19ca5b fix: MoeHoo-Linux Arm64 2024-11-06 09:26:15 +08:00
Mlikiowa
3b01b6827f release: v3.5.1 2024-11-05 14:45:36 +00:00
手瓜一十雪
8d9ef851ba fix: linux arm64 2024-11-05 22:45:00 +08:00
手瓜一十雪
b070bc59bc fix: MoeHoo-Linux Amd64 2024-11-05 22:36:47 +08:00
Mlikiowa
8d663946e1 release: v3.5.0 2024-11-05 14:13:33 +00:00
pk5ls20
2a2328b029 feat: better edge case handling 2024-11-05 22:11:01 +08:00
pk5ls20
efc9064abb fix: better log 2024-11-05 21:54:52 +08:00
Mlikiowa
dd70adf071 release: v3.4.11 2024-11-05 13:52:22 +00:00
8 changed files with 21 additions and 10 deletions

View File

@@ -4,7 +4,7 @@
"name": "NapCatQQ",
"slug": "NapCat.Framework",
"description": "高性能的 OneBot 11 协议实现",
"version": "3.4.10",
"version": "3.5.2",
"icon": "./logo.png",
"authors": [
{

View File

@@ -2,7 +2,7 @@
"name": "napcat",
"private": true,
"type": "module",
"version": "3.4.10",
"version": "3.5.2",
"scripts": {
"build:framework": "vite build --mode framework",
"build:shell": "vite build --mode shell",

View File

@@ -1 +1 @@
export const napCatVersion = '3.4.10';
export const napCatVersion = '3.5.2';

View File

@@ -51,7 +51,7 @@ export class NativePacketClient extends PacketClient {
//此时为recv 调用callback
const trace_id = this.sendEvent.get(seq);
const callback = this.cb.get(trace_id + 'recv');
console.log('callback:', callback, trace_id);
// console.log('callback:', callback, trace_id);
callback?.({ seq, cmd, hex_data });
}

View File

@@ -17,7 +17,7 @@ const clientPriority: clientPriority = {
export class PacketSession {
readonly logger: LogWrapper;
readonly client: PacketClient;
readonly client: PacketClient ;
readonly packer: PacketPacker;
readonly highwaySession: PacketHighwaySession;
@@ -30,17 +30,28 @@ export class PacketSession {
private newClient(core: NapCatCore): PacketClient {
const prefer = core.configLoader.configData.packetBackend;
let client: PacketClient | null;
switch (prefer) {
case "native":
return new NativePacketClient(core);
this.logger.log("[Core] [Packet] 使用指定的 NativePacketClient 作为后端");
client = new NativePacketClient(core);
break;
case "frida":
return new wsPacketClient(core);
this.logger.log("[Core] [Packet] 使用指定的 FridaPacketClient 作为后端");
client = new wsPacketClient(core);
break;
case "auto":
case undefined:
return this.judgeClient(core);
client = this.judgeClient(core);
break;
default:
throw new Error(`[Core] [Packet] 未知的Packet后端类型 ${prefer},请检查配置文件!`);
this.logger.logError(`[Core] [Packet] 未知的Packet后端类型 ${prefer},请检查配置文件!`);
client = null;
}
if (!(client && client.check(core))) {
throw new Error("[Core] [Packet] 无可用的后端NapCat.Packet将不会加载");
}
return client;
}
private judgeClient(core: NapCatCore): PacketClient {

View File

@@ -164,7 +164,7 @@ async function onSettingWindowCreated(view) {
SettingItem(
'<span id="napcat-update-title">Napcat</span>',
void 0,
SettingButton("V3.4.10", "napcat-update-button", "secondary")
SettingButton("V3.5.2", "napcat-update-button", "secondary")
)
]),
SettingList([