feat: 完善模板驱动的品牌内容工作台

This commit is contained in:
que01 committed 2026-09-25 05:21:42 +08:00
1 parent 77224ea51f
commit dd55af8d73
46 files changed
+2204 -295

No files matched your search

+11
View File
@@ -2,6 +2,7 @@ const fs = require("node:fs");
const path = require("node:path");
const root = path.resolve(__dirname, "..");
require(path.join(root, "scripts/generate-template-catalog.cjs"));
const packageRoot = path.join(root, "templates");
const requiredPages = ["home", "offerings", "detail", "inquiry", "success", "records", "profile"];
const errors = [];
@@ -74,6 +75,16 @@ for (const entry of workspaceTemplates) {
if (!manifest.displayName) errors.push(`${entry.name}: displayName is required`);
if (!Array.isArray(manifest.navigation) || !manifest.navigation.length)
errors.push(`${entry.name}: navigation is required`);
if (!Array.isArray(manifest.dataSlots) || !manifest.dataSlots.length)
errors.push(`${entry.name}: dataSlots is required`);
if (!Array.isArray(manifest.assetSlots))
errors.push(`${entry.name}: assetSlots must be an array`);
if (
!manifest.admin ||
!Array.isArray(manifest.admin.sections) ||
!manifest.admin.sections.length
)
errors.push(`${entry.name}: admin.sections is required`);
if (manifest.ownedPaths !== undefined && !Array.isArray(manifest.ownedPaths))
errors.push(`${entry.name}: ownedPaths must be an array`);
if (