refactor: 统一模板契约并修复预览版本
This commit is contained in:
1 parent
cd2992c00a
commit
50b87e48de
56 files changed
+7849
-5756
No files matched your search
@@ -109,8 +109,8 @@ for (const { directory, manifest, package: packageMetadata } of packages) {
|
||||
const packageIndustries = Array.isArray(manifest.supportedIndustryTemplates)
|
||||
? manifest.supportedIndustryTemplates
|
||||
: [];
|
||||
const visualKey = manifest.visualTemplateKey ?? key;
|
||||
const visualRegistered = visualKeys.includes(visualKey);
|
||||
const visualKey = manifest.visualTemplateKey;
|
||||
const visualRegistered = typeof visualKey === "string" && visualKeys.includes(visualKey);
|
||||
const rendererPath = `${directory}/taro/index.tsx`;
|
||||
const rendererExists = fs.existsSync(path.join(packagesRoot, rendererPath));
|
||||
const rendererExport = rendererExists
|
||||
@@ -141,6 +141,7 @@ for (const { directory, manifest, package: packageMetadata } of packages) {
|
||||
errors.push("No capability definitions found in capability-contracts.ts");
|
||||
if (!rendererGlob) errors.push("Admin renderer package glob is not discoverable");
|
||||
if (!packageIndustries.length) errors.push(`${key}: supportedIndustryTemplates is empty`);
|
||||
if (!visualRegistered) errors.push(`${key}: visualTemplateKey is missing or unknown`);
|
||||
if (unknownCapabilities.length)
|
||||
errors.push(`${key}: unknown capabilities ${unknownCapabilities.join(", ")}`);
|
||||
if (!toolchainCompatible)
|
||||
|
||||
Reference in new issue
Block a user