- 引入 typed target 判别联合,支持 http 与 command 两种 checker - expect 重构为有序规则数组,按配置顺序快速失败并生成结构化 failure - 新增 command runner,支持 exec + args 本地命令执行 - 引入全局并发限制 maxConcurrentChecks 和 size 解析 (KB/MB/GB) - HTTP/command 各自独立 expect pipeline,应用领域默认成功语义 - SQLite schema、API、Dashboard 全链路调整为 checker 通用契约 - 补充完整测试覆盖(192 tests),更新 README 与示例配置
20 lines
645 B
TypeScript
20 lines
645 B
TypeScript
import { rm } from "node:fs/promises";
|
|
import { resolve } from "node:path";
|
|
|
|
const root = resolve(import.meta.dir, "..");
|
|
|
|
const patterns: Array<{ glob: string; desc: string }> = [
|
|
{ glob: ".build/", desc: "Bun 构建缓存" },
|
|
{ glob: ".*.bun-build", desc: "Bun 构建临时文件" },
|
|
];
|
|
|
|
for (const { glob, desc } of patterns) {
|
|
const entries = await Array.fromAsync(new Bun.Glob(glob).scan({ cwd: root, dot: true }));
|
|
if (entries.length === 0) continue;
|
|
for (const entry of entries) {
|
|
const full = resolve(root, entry);
|
|
await rm(full, { recursive: true, force: true });
|
|
console.log(`已清理 ${desc}: ${entry}`);
|
|
}
|
|
}
|