refactor: 收敛公开工作区运行时契约

This commit is contained in:
que01 committed 2026-09-25 12:19:20 +08:00
1 parent d5e63be074
commit 9b61047ec6
13 files changed
+93 -64

No files matched your search

+1 -1
View File
@@ -160,7 +160,7 @@ export function validateTemplatePackageManifest(value: unknown): string[] {
}
if (manifest.sampleContent !== undefined) {
for (const [industryKey, sample] of Object.entries(manifest.sampleContent)) {
if (!manifest.supportedIndustryTemplates.includes(industryKey))
if (!manifest.supportedIndustryTemplates?.includes(industryKey))
errors.push(`sampleContent.${industryKey} is not a supported industry template`);
if (sample.templateKey !== industryKey)
errors.push(`sampleContent.${industryKey}.templateKey must match its key`);