feat: vendor permission system source

This commit is contained in:
云服务部-叶林立
2026-08-19 14:35:19 +08:00
parent 198584daf8
commit 410c50a3e5
809 changed files with 157793 additions and 139 deletions
@@ -0,0 +1,21 @@
#!/usr/bin/env node
// Regenerate schemas/permissions.schema.json from the zod source of truth.
// Run via `pnpm run gen:schema`. Never edit the JSON by hand — a parity test
// (test/config-schema.test.ts) fails if the committed file drifts from this.
import { writeFileSync } from "node:fs";
import { dirname, join } from "node:path";
import { fileURLToPath } from "node:url";
import { buildPermissionsJsonSchema } from "../src/config-schema.ts";
const outputPath = join(
dirname(fileURLToPath(import.meta.url)),
"..",
"schemas",
"permissions.schema.json",
);
const json = `${JSON.stringify(buildPermissionsJsonSchema(), null, 2)}\n`;
writeFileSync(outputPath, json);
console.log(`Wrote ${outputPath}`);