feat(center): 新增通知实时推送 WS /ws/notifications,管理台建单秒达

挂到 Koa 同一 http.Server 的 upgrade 事件(复用 8800,不占新端口、不改 nginx),X-API-Token 握手鉴权,帧格式对齐执行机 notifier.js;新建通知后立即广播(target=all / account),GET /api/notifications 轮询继续兜底。

连接状态放模块作用域(生命周期挂载与请求内推送的 provider 实例不保证同一个),心跳 30s 清理半开连接;src/index.ts 补导出(bundle 关闭 moduleDetector 时必须显式导出)。

部署 SOP 增加 WS 端点探针,客户端交接文档补 /ws/notifications 契约。
This commit is contained in:
2026-11-10 16:38:00 +08:00
parent 41ffbf30d3
commit 066bbe4989
6 changed files with 296 additions and 2 deletions
@@ -1,5 +1,5 @@
/** This file generated by @midwayjs/bundle-helper */
␍export { MainConfiguration as Configuration } from './configuration';
export { MainConfiguration as Configuration } from './configuration';
export * from './comm/path';
export * from './comm/port';
export * from './comm/utils';
@@ -41,6 +41,7 @@ export * from './modules/center/comm/conf';
export * from './modules/center/service/crypto';
export * from './modules/center/service/dingtalk';
export * from './modules/center/service/notify';
export * from './modules/center/service/notify-ws';
export * from './modules/center/service/fileserver-monitor';
export * from './modules/center/service/logstore';
export * from './modules/center/service/rbac';