restore: 恢复 11-06~11-09 本地未提交改动

- libs: 新增 hr_sdk / hotel_report / dingtalk,更新 desktopauto
- controlplane-next: SDK 管理模块(controller/entity/migrations)与前端视图
- electron-shell: 插件同步、注册表、runner 调整
- plugins: XQ0035/XQ0041/XQ0042/XQ0045_XQ0046/XQ0048/XQ0076/XQ0078 等版本更新
- tests/tools: 新增 SDK 兼容性检查与打包工具(sdk_pack.py、sdk_compat_check.py)
This commit is contained in:
2026-11-09 17:27:10 +08:00
parent 19078629d1
commit 1664821117
327 changed files with 29670 additions and 718 deletions
@@ -63,6 +63,22 @@ export function splitDesc(desc) {
return s.split(/[;;]/).map((x) => x.trim()).filter(Boolean)
}
// 插件通道徽章:中心机 /api/plugins 按账号下发 channel=test|prod(管理员在测通道 = test)。
// 返回 { text, kind, title };中心机不可达/旧版服务端无 channel 时返回 null(不显示徽章,避免瞎猜)。
export function pluginChannelTag(plugin) {
const ch = plugin && plugin.channel
if (ch !== 'test' && ch !== 'prod') return null
const isTest = ch === 'test'
const local = String(plugin.version || '')
const cloud = String(plugin.cloud_version || '')
const stale = !!cloud && !!local && cloud !== local
const base = isTest ? '测试版' : '正式版'
const title = stale
? `${base}:云端 v${cloud},本地 v${local},点左栏「插件同步」升级`
: `${base}:当前已是最新(v${local || cloud})`
return { text: base, kind: isTest ? 'test' : 'prod', title, stale }
}
// 版本比较:数字段按 int(1.10.0 > 1.9.0),非数字段按小写字符串;对齐 electron/crypto.js 的 versionLt
export function versionLt(a, b) {
const key = (s) => String(s || '').split('.')