feat: 对齐运行时模块映射

This commit is contained in:
que01 committed 2026-09-22 17:57:13 +08:00
1 parent 0867585f65
commit 777bdaa766
4 files changed
+9 -6

No files matched your search

+4 -2
View File
@@ -16,8 +16,10 @@ const FALLBACK_THEME = {
};
function resolveModule(module) {
const known = Object.values(CORE_MODULES).find((entry) => entry.key === module.type);
return { ...module, variant: module.variant || (known ? known.variants[0] : "default"), supported: Boolean(known || module.type === "custom") };
const aliases = { identity: "brand-hero", trust: "trust-proof", offering: "offering-list", inquiry: "inquiry", contact: "founder-card" };
const type = aliases[module.type] || module.type;
const known = Object.values(CORE_MODULES).find((entry) => entry.key === type);
return { ...module, type, variant: module.variant || (known ? known.variants[0] : "default"), supported: Boolean(known || type === "custom") };
}
function resolveRuntime(workspace) {