fix: 修复 web-manager 构建失败

- useSimConfig.test.ts: 移除未使用的 waitFor import
- vite.config.ts: 添加 vitest 类型引用,解决 test 属性类型错误

Co-Authored-By: Claude Opus 4.7 <[email protected]>
This commit is contained in:
clawdbuddyandClaude Opus 4.7 committed 2026-05-11 15:24:51 +08:00
1 parent 110387bc5c
commit e964bc14fb
4 files changed
+8 -7

No files matched your search

+3 -3
View File
@@ -265,9 +265,9 @@ src/
4. **release**:仅在打 tag 时生成 Release Notes
镜像地址:
- `ghcr.io/{owner}/adhoc-node`
- `ghcr.io/{owner}/adhoc-controller`
- `ghcr.io/{owner}/adhoc-controller-347`
- `ghcr.io/{owner}/manet-node`
- `ghcr.io/{owner}/manet-controller`
- `ghcr.io/{owner}/manet-controller-347`
### 部署方式
+3 -3
View File
@@ -109,7 +109,7 @@ export CR_PAT=<your-token>
echo $CR_PAT | docker login ghcr.io -u <your-github-username> --password-stdin
# 2. 拉取镜像
docker pull ghcr.io/clawdbuddy/adhoc-controller-347:latest
docker pull ghcr.io/clawdbuddy/manet-controller:latest
docker pull ghcr.io/clawdbuddy/manet-node:latest
# 3. 节点镜像必须本地 tag 为 manet-node:latest(控制器硬编码)
@@ -124,7 +124,7 @@ docker run -d --name controller \
--pid host \
-v /var/run/docker.sock:/var/run/docker.sock \
-v /var/run/netns:/var/run/netns \
ghcr.io/clawdbuddy/adhoc-controller-347:latest
ghcr.io/clawdbuddy/manet-controller:latest
# 5. 验证
curl -s localhost:8000/api/health
@@ -228,7 +228,7 @@ curl -X PUT localhost:8000/api/config \
| 参数 | 默认值 | 说明 |
|------|--------|------|
| `nNodes` | 6 | AdHoc 节点数(2–100) |
| `nNodes` | 6 | AdHoc 节点数(2–16) |
| `simulationTime` | 300 | 仿真时长(秒) |
| `seed` | 1 | 随机种子 |
| `run` | 1 | run 编号 |
@@ -1,5 +1,5 @@
import { describe, it, expect } from 'vitest';
import { renderHook, act, waitFor } from '@testing-library/react';
import { renderHook, act } from '@testing-library/react';
import { useSimConfig } from './useSimConfig';
describe('useSimConfig', () => {
+1
View File
@@ -1,3 +1,4 @@
/// <reference types="vitest/config" />
import path from "path"
import react from "@vitejs/plugin-react"
import { defineConfig } from "vite"