github komari-monitor/komari Snapshot-2607311655

pre-release5 hours ago

主要更新内容

  • 重构 JavaScript 运行时:新增 pkg/jsruntime 包替代旧的消息发送脚本实现,内置 Fetch API、XMLHttpRequest、console、定时器及 queueMicrotask 等 Web API,并完成内置模块的模块化拆分。
  • 新增 Node.js 兼容模块:eventspathosprocessfschild_processnethttp,支持通过 AllowExecAllowListenAllowAllFileAccess 等选项控制子进程执行、端口监听与文件访问权限。
  • 新增 pkg/jsruntime/README.md API 与兼容性文档,明确各接口支持状态;未支持的方法会抛错而非静默无操作。
  • 将 metric store 从 database/metricstore 迁移至 internal/metricstore,并按职责拆分为配置、压缩、删除、ping 记录、报告映射等模块。

Bug修复

  • 修复 JavaScript 运行时将 process.exit(0) 误判为异常的问题,现按正常终止处理,并改进错误上报。

其他

  • 移除未使用的数据库辅助函数:GetAllMessageSenderConfigsGetAllOidcConfigsSaveLoadNotificationGetEnabledTrafficReportByType
  • 移除 pkg/metric 中未使用的 API:DeleteMetricDataDeleteBeforeTxscanRollupRowsContained 及各数据库方言的 nowExpr
  • 依赖调整:golang.org/x/sys 转为直接依赖,新增 github.com/dop251/base64dec 间接依赖。

Commits

  • style: 移除没有使用的旧版本兼容代码,移动 database/metricstore 到 internal/metricstore 并拆分组件 (4077201) @Akizon77
  • refactor: javascript runtime (df6ffba) @Akizon77
  • refactor(jsruntime): modularize built-ins (3c58382) @Akizon77
  • docs(jsruntime): add API and compatibility documentation (54851bd) @Akizon77
  • docs(jsruntime): clarify unsupported methods throw instead of no-op (91ae9ed) @Akizon77
  • fix(jsruntime): treat process.exit(0) as normal termination and improve error reporting (91cbeb3) @Akizon77

Full Changelog: 1.3.2...Snapshot-2607311655

Don't miss a new komari release

NewReleases is sending notifications on new releases.