feat: 初始提交

This commit is contained in:
2026-05-26 18:19:42 +08:00
commit 7ebf5ee5dc
107 changed files with 9317 additions and 0 deletions

View File

@@ -0,0 +1,15 @@
import { createConfigJsonSchema } from "../src/server/config/schema/export";
const schemaPath = "config.schema.json";
const schema = `${JSON.stringify(createConfigJsonSchema(), null, 2)}\n`;
if (process.argv.includes("--check")) {
const existing = await Bun.file(schemaPath)
.text()
.catch(() => null);
if (existing !== schema) {
throw new Error(`${schemaPath} 未同步,请运行 bun run schema`);
}
} else {
await Bun.write(schemaPath, schema);
}