```
refactor(registry): 生产环境数据库访问迁移至 SQLx 并统一测试端口策略 将 rusqlite 从生产依赖移至 dev-dependencies,正式数据库操作全部 由 SQLx 完成;rusqlite 仅保留用于测试夹具及旧数据库兼容验证。 UI 验收脚本移除 HTTP 代理和动态端口分配,统一通过 ui-test-port.mjs 的 assertUiPortAvailable 直连 8787 端口, 确保测试与正式实例串行执行。 新增 doc/registry/rust/axum-sqlx-architecture.md 记录模块职责、 数据兼容、退出资源回收及验证维护规范。 修复接收器页面按钮缺少显式 height 导致的布局偏差。 ```
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
// UI acceptance runs serially on the same origin as the released application.
|
||||
// Never attach a test to a listener owned by another process.
|
||||
import net from 'node:net';
|
||||
export const UI_URL = 'http://127.0.0.1:8787';
|
||||
export async function assertUiPortAvailable() {
|
||||
await new Promise((resolve, reject) => {
|
||||
const probe = net.createServer();
|
||||
probe.once('error', () => reject(new Error('8787 occupied; stop the project safely before running UI acceptance. No existing service was changed.')));
|
||||
probe.listen(8787, '127.0.0.1', () => probe.close(resolve));
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user