migrate frontend

This commit is contained in:
ryan
2026-06-18 18:05:00 +08:00
parent 31b114b0cc
commit e7b8993181
27 changed files with 1836 additions and 383 deletions
+29 -10
View File
@@ -1,8 +1,16 @@
# OpenFlare 前端 Service 层验证报告
> **验证日期**:2026-06-18
> **验证日期**:2026-06-18(复验)
> **目录**:`Wavelet/frontend/lib/services/openflare/`
## 覆盖率摘要
| 维度 | 结果 |
|---|---|
| §7.1 计划服务文件 | **15 / 15 = 100%** |
| 业务 `/api/*` 端点 | **100%** |
| 待补 API | **0** |
## §7.1 对照结果
| 计划服务 | 实际文件 | 注册 | 方法覆盖 |
@@ -21,22 +29,33 @@
| access-log | ✅ | `openflareAccessLog` | ✅ |
| apply-log | ✅ | `openflareApplyLog` | ✅ |
| option | ✅ | `openflareOption` | ✅ |
| update | ⚠️ partial | `openflareUpdate` | 仅 `getLatestRelease` |
| update | ✅ | `openflareUpdate` | ✅ 6 方法 |
| about | ✅ | `openflareAbout` | `getAboutContent()` |
## update.service.ts 复验
| 方法 | 端点 |
|---|---|
| `getLatestRelease(channel?)` | `GET /api/update/latest-release` |
| `upgradeServer(channel?)` | `POST /api/update/upgrade` |
| `uploadServerBinary(file, onProgress?)` | `POST /api/update/manual-upload` |
| `confirmManualServerUpgrade(token)` | `POST /api/update/manual-upgrade` |
| `createUpgradeLogsWebSocket()` | `WS /api/update/logs/ws` |
| `parseUpgradeStreamSnapshot(raw)` | WS 消息解析 |
已接入:`use-openflare-server-upgrade.ts`、`openflare-version-entry.tsx`、`openflare-ops.tsx`。
## 计划外(已实现)
- `status.service.ts` → `openflareStatus`
- `uptimekuma.service.ts` → `openflareUptimeKuma`
- `about.service.ts` → `openflareAbout`
- `legacy-base.service.ts`(基类)
## 待补 API
| 端点 | 说明 |
|---|---|
| `POST /api/update/upgrade` | 顶栏升级流程 |
| `POST /api/update/manual-upload` | 手动上传 |
| `POST /api/update/manual-upgrade` | 手动确认升级 |
| `WS /api/update/logs/ws` | 升级日志流 |
| `GET /api/about` | About 页(FC-20) |
无。
业务 `/api/*` 其余端点均已由 Service 覆盖。
## 结论
Service 层迁移 **完成**。所有计划内业务 API 均已由 Service 覆盖。