feat: ship enterprise control and desktop governance

This commit is contained in:
AI Bot
2026-05-11 14:59:26 +08:00
parent 0757d07521
commit a311280238
285 changed files with 48574 additions and 2428 deletions

View File

@@ -0,0 +1,23 @@
import test from "node:test";
import assert from "node:assert/strict";
import { readFile } from "node:fs/promises";
async function readSource(path: string) {
return readFile(new URL(path, import.meta.url), "utf8");
}
test("enterprise admin route gates static Vue admin behind highest_admin", async () => {
const source = await readSource("../src/app/enterprise-admin/page.tsx");
assert.match(source, /requirePageSession/);
assert.match(source, /session\.role\s*!==\s*["']highest_admin["']/);
assert.match(source, /redirect\(["']\/admin-web\/index\.html["']\)/);
});
test("independent admin build publishes static assets under Next public admin-web", async () => {
const source = await readSource("../apps/boss-admin-web/vite.config.ts");
assert.match(source, /base:\s*["']\/admin-web\/["']/);
assert.match(source, /outDir:\s*["']\.\.\/\.\.\/public\/admin-web["']/);
assert.match(source, /emptyOutDir:\s*true/);
});