35 lines
1.7 KiB
Markdown
35 lines
1.7 KiB
Markdown
## Why
|
||
|
||
`command` 作为 checker type 名称过长,且测试依赖 Unix 系统命令导致 Windows 环境无法运行。需要统一重命名为 `cmd` 并实现跨平台测试适配。
|
||
|
||
## What Changes
|
||
|
||
- **BREAKING** type 字面量 `"command"` → `"cmd"`,configKey `"command"` → `"cmd"`
|
||
- **BREAKING** YAML 配置中 `type: command` → `type: cmd`,`command:` 块 → `cmd:` 块
|
||
- **BREAKING** `defaults.command` → `defaults.cmd`
|
||
- 源码目录 `runner/command/` → `runner/cmd/`
|
||
- spec 目录 `command-checker/` → `cmd-checker/`
|
||
- 测试全部改用 `bun -e "..."` 替代系统命令(true/false/sleep/bash)
|
||
- probes.example.yaml 更新为跨平台示例
|
||
|
||
## Capabilities
|
||
|
||
### New Capabilities
|
||
|
||
(无)
|
||
|
||
### Modified Capabilities
|
||
|
||
- `probe-config`: `type: command` → `type: cmd`,`command` 分组 → `cmd` 分组,`defaults.command` → `defaults.cmd`,所有校验中的 `"command"` 字面量更新
|
||
- `command-checker`: type/configKey 重命名为 `cmd`,spec 目录重命名为 `cmd-checker`
|
||
- `checker-runner-abstraction`: registry 注册的 type 从 `"command"` 变为 `"cmd"`,`supportedTypes` 返回 `["http", "cmd"]`
|
||
- `windows-test-compat`: 测试命令全面改用 `bun -e "..."`,probes.example.yaml 使用跨平台示例
|
||
|
||
## Impact
|
||
|
||
- 后端:`src/server/checker/runner/command/` 整个目录重命名及内部所有 `"command"` 字面量
|
||
- 配置:probes.example.yaml、probe-config.schema.json 中的 type 枚举和分组名
|
||
- 测试:`tests/server/checker/runner/command/` 目录重命名及测试命令替换
|
||
- 前端:无影响(动态显示 type 值)
|
||
- 数据库:stored_targets.type 列值变更(项目未上线,无迁移负担)
|