fix: 收口模板契约与安全门禁

统一模板包 visual 契约并补齐完成证据;修复 release 版本一致性、管理员 token 撤销、CORS 与默认品牌配置;收敛依赖安全风险并完成全量回归验证。
This commit is contained in:
que01 committed 2026-10-18 22:05:31 +08:00
1 parent 456171aa85
commit 4f0b50c7f1
84 files changed
+7367 -5180

No files matched your search

@@ -180,11 +180,25 @@ const runtimeWorkspace = {
trustPresentation: {},
capabilities: [],
plugins: [{ key: "inquiry", status: "enabled", config: {} }],
visualTemplate: {
key: "",
version: "",
name: "",
supportedIndustryTemplates: [],
variants: {},
},
theme: { colors: {} },
};
const templateContent = JSON.parse(
fs.readFileSync("../../packages/template-acheng-campus-food/template.json", "utf8"),
);
runtimeWorkspace.visualTemplate = {
key: templateContent.visualTemplateKey,
version: templateContent.version,
name: templateContent.displayName,
supportedIndustryTemplates: templateContent.supportedIndustryTemplates,
variants: templateContent.visualPresentation.variants,
};
// 根据真实声明生成完整列表数据,让每种内容区域都实际渲染。
const additionalFoodTrust = templateContent.trustContentTypes
@@ -706,6 +720,13 @@ test("林境模板支持首页和主理人区域点选", async ({ page }) => {
const editorialContent = JSON.parse(
fs.readFileSync("../../packages/template-linjing-editorial/template.json", "utf8"),
);
editorialWorkspace.visualTemplate = {
key: editorialContent.visualTemplateKey,
version: editorialContent.version,
name: editorialContent.displayName,
supportedIndustryTemplates: editorialContent.supportedIndustryTemplates,
variants: editorialContent.visualPresentation.variants,
};
await page.route("**/api/**", (route) => {
const url = new URL(route.request().url());
const path = url.pathname.replace(/^\/api/, "");