Compare commits

..

5 Commits

Author SHA1 Message Date
手瓜一十雪
7557b71869 fix: httpSseServers DefaultConfig 2025-01-20 17:02:52 +08:00
Mlikiowa
d07187bd5d release: v4.3.7 2025-01-20 08:48:13 +00:00
手瓜一十雪
2c6a6ba440 fix: type 2025-01-20 16:47:06 +08:00
手瓜一十雪
4592bf7817 fix: nickname可能为null 2025-01-20 16:06:34 +08:00
Mlikiowa
afd6d450a0 release: v4.3.6 2025-01-20 06:51:29 +00:00
9 changed files with 15 additions and 8 deletions

View File

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

View File

@@ -2,7 +2,7 @@
"name": "napcat", "name": "napcat",
"private": true, "private": true,
"type": "module", "type": "module",
"version": "4.3.5", "version": "4.3.7",
"scripts": { "scripts": {
"build:universal": "npm run build:webui && vite build --mode universal || exit 1", "build:universal": "npm run build:webui && vite build --mode universal || exit 1",
"build:framework": "npm run build:webui && vite build --mode framework || exit 1", "build:framework": "npm run build:webui && vite build --mode framework || exit 1",

View File

@@ -1 +1 @@
export const napCatVersion = '4.3.5'; export const napCatVersion = '4.3.7';

View File

@@ -18,7 +18,7 @@ export interface BuddyCategoryType {
export interface CoreInfo { export interface CoreInfo {
uid: string; uid: string;
uin: string; uin: string;
nick: string; nick?: string;
remark: string; remark: string;
} }

View File

@@ -0,0 +1 @@
import '@/universal/napcat';

View File

@@ -139,13 +139,14 @@ export const defaultOneBotConfigs = createDefaultConfig<OneBotConfig>({
}); });
export const mergeNetworkDefaultConfig = { export const mergeNetworkDefaultConfig = {
httpSseServers: httpSseServerDefaultConfigs,
httpServers: httpServerDefaultConfigs, httpServers: httpServerDefaultConfigs,
httpClients: httpClientDefaultConfigs, httpClients: httpClientDefaultConfigs,
websocketServers: websocketServerDefaultConfigs, websocketServers: websocketServerDefaultConfigs,
websocketClients: websocketClientDefaultConfigs, websocketClients: websocketClientDefaultConfigs,
} as const; } as const;
export type NetworkConfigAdapter = HttpServerConfig | HttpClientConfig | WebsocketServerConfig | WebsocketClientConfig | PluginConfig; export type NetworkConfigAdapter = HttpServerConfig | HttpSseServerConfig | HttpClientConfig | WebsocketServerConfig | WebsocketClientConfig | PluginConfig;
type NetworkConfigKeys = keyof typeof mergeNetworkDefaultConfig; type NetworkConfigKeys = keyof typeof mergeNetworkDefaultConfig;
export function mergeOneBotConfigs( export function mergeOneBotConfigs(

View File

@@ -23,7 +23,7 @@ export class OB11Construct {
...rawFriend.baseInfo, ...rawFriend.baseInfo,
...rawFriend.coreInfo, ...rawFriend.coreInfo,
user_id: parseInt(rawFriend.coreInfo.uin), user_id: parseInt(rawFriend.coreInfo.uin),
nickname: rawFriend.coreInfo.nick, nickname: rawFriend.coreInfo.nick ?? "",
remark: rawFriend.coreInfo.remark ?? rawFriend.coreInfo.nick, remark: rawFriend.coreInfo.remark ?? rawFriend.coreInfo.nick,
sex: this.sex(rawFriend.baseInfo.sex), sex: this.sex(rawFriend.baseInfo.sex),
level: 0, level: 0,

6
src/universal/LiteLoader.d.ts vendored Normal file
View File

@@ -0,0 +1,6 @@
declare global {
namespace globalThis {
var LiteLoader: Symbol;
}
}
export {}

View File

@@ -1,7 +1,6 @@
import { NCoreInitShell } from "@/shell/base"; import { NCoreInitShell } from "@/shell/base";
export * from "@/framework/napcat"; export * from "@/framework/napcat";
export * from "@/shell/base"; export * from "@/shell/base";
if ((global as any).LiteLoader == undefined) { if (global.LiteLoader == undefined) {
NCoreInitShell(); NCoreInitShell();
} }