feat(core): add staged self-updates and unify application version

This commit is contained in:
手瓜一十雪 committed 2026-10-18 12:50:11 +08:00
1 parent c54aeffc77
commit 5032cbb8c0
45 files changed
+1860 -165

No files matched your search

+2 -4
View File
@@ -1,9 +1,7 @@
import { APP_VERSION } from '@snowluma/common/version';
import { defineAction } from '../action-kit';
import { okResponse } from '../types';
// 后续考虑移动到一个统一的地方构建,避免版本信息分散在各个模块中。
const appVersion = typeof __APP_VERSION__ !== 'undefined' ? __APP_VERSION__ : 'dev';
export const actions = [
defineAction({
name: 'get_login_info',
@@ -72,7 +70,7 @@ export const actions = [
run: () => {
return okResponse({
app_name: 'SnowLuma',
app_version: `${appVersion}-node`,
app_version: `${APP_VERSION}-node`,
protocol_version: 'v11',
});
},
-1
View File
@@ -1,2 +1 @@
declare const __BUILD_WEBUI__: boolean;
declare const __APP_VERSION__: string;
+2 -1
View File
@@ -1,3 +1,4 @@
import { APP_VERSION } from '@snowluma/common/version';
import { createLogger, type Logger } from '@snowluma/common/logger';
import type { BridgeInterface } from '@snowluma/core/bridge-interface';
import {
@@ -621,7 +622,7 @@ export class OneBotInstance {
private async replyStatus(isGroup: boolean, sessionId: number): Promise<void> {
const text = buildStatusText({
version: typeof __APP_VERSION__ !== 'undefined' ? __APP_VERSION__ : 'dev',
version: APP_VERSION,
platform: process.platform,
arch: process.arch,
uptimeMs: this.ctx.getUptimeMs(),