github komari-monitor/komari Snapshot-2610221543

pre-release5 hours ago

主要更新内容

  • JS 运行时迁移至 MoeJS:插件引擎底层从 dop251/goja + goja_nodejs 全面替换为 Calcium-Ion/moejs,涉及插件路由、Hook、RPC、定时任务、通知通道、WebSocket Hook 及全部 Node.js 兼容模块(fs、http、net、crypto、fetch、child_process、console、events、os、path 等)。
  • 插件可修改自身内建对象:每个插件运行时启用 MutableIntrinsics,插件可自由扩展 Reflect、Array.prototype 等内建对象,且修改不会泄漏到其他插件实例。
  • 新增 pkg/jsruntime/buffer 模块:基于原生 TypedArray 实现 Node.js Buffer API(alloc、from、concat、读写整数/浮点/BigInt、编码转换等)。
  • 新增 pkg/jsruntime/loop 包:封装 MoeJS 事件循环,提供 RunOnLoop、SetTimeout/SetInterval、Terminate 等宿主接口。
  • 新增 pkg/jsruntime/native 包:提供 MoeJS 值操作辅助函数(Get/Set/From/Run/Bind 等),统一宿主模块与 JS 值的交互方式。
  • Ping 队列独立容量:Ping 记录批处理队列容量从与 Report 队列共享的 512 提升为独立的 4096,避免高频率 Ping 上报时阻塞指标写入。
  • 指标查询性能优化:legacy_records.go 改用 SeriesBatch 批量查询替代逐指标 Series 调用;提取公共 downsampleInterval 函数,减少重复逻辑。
  • Store 迁移与重构代码整理:提取 openWithoutMigration、awaitStoreMigrationStop 等辅助函数,简化 RestructureConfiguredStore 和 CancelStoreMigration 流程。

Bug修复

  • 修复 Ping 队列容量不足问题:此前 Ping 队列与 Report 队列共用 512 容量,高频 Ping 场景下可能丢数据;现 Ping 队列独立为 4096(PR #695)。

其他

  • 数据库层(accounts、sessions、clients、tasks、oauth)及 metricstore 配置/存储代码进行简化,去除冗余错误处理和中间变量。
  • 2FA 校验逻辑精简为单行返回。
  • 移除已废弃的测试文件 cmd/flags/config_test.go 和 internal/sqlitetune/connector_test.go。
  • go.mod:移除 goja 相关依赖,引入 Calcium-Ion/moejs v0.1.0-alpha.9;stretchr/testify 升级至 v1.12.1。
  • README 新增 MooProxy 赞助商条目。
  • .gitignore 新增 .gocache/。

What's Changed

Commits

New Contributors

Full Changelog: 1.6.0...Snapshot-2610221543

Don't miss a new komari release

NewReleases is sending notifications on new releases.