mirror of
https://git.openapi.site/https://github.com/desirecore/registry.git
synced 2026-12-05 10:19:03 +08:00
feat: 补充固定工作台合成样本与 webBundles 校验 (#12)
新增静态、原生服务、Docker 三组合成的 listing-only 作者契约样本,补充 webBundles 目录统计与 definitionPath 规范路径检查。受主仓固定的 4.3 作者 Schema、正式 4.2 Schema、根 manifest 和 27 个条目均不变。 Add synthetic listing-only authoring fixtures, webBundles catalog statistics and a canonical definitionPath check. The pinned 4.3 authoring Schema, formal 4.2 Schema, root manifest and 27 entries are unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
5247054b7a
commit
13986db85e
17 files changed
+630
-5
No files matched your search
@@ -249,6 +249,7 @@ export function validateRegistry(repoRoot, options = {}) {
|
||||
if (entry.type === 'docker-app') counts.dockerApps += 1
|
||||
if (entry.type === 'native-app') counts.nativeApps = (counts.nativeApps ?? 0) + 1
|
||||
if (entry.type === 'artifact') counts.artifactApps = (counts.artifactApps ?? 0) + 1
|
||||
if (entry.type === 'web-bundle') counts.webBundles = (counts.webBundles ?? 0) + 1
|
||||
if (entry.type === 'mcp') counts.mcpServices += 1
|
||||
if (entry.type === 'http-api') counts.httpApis += 1
|
||||
if (entry.type === 'external-integration') counts.externalIntegrations += 1
|
||||
@@ -284,8 +285,8 @@ export function validateRegistry(repoRoot, options = {}) {
|
||||
}
|
||||
|
||||
if (rootManifest?.stats) {
|
||||
for (const key of ['totalEntries', 'dockerApps', 'nativeApps', 'artifactApps', 'mcpServices', 'httpApis', 'externalIntegrations']) {
|
||||
if (['nativeApps', 'artifactApps'].includes(key) && rootManifest.stats[key] === undefined && !counts[key]) continue
|
||||
for (const key of ['totalEntries', 'dockerApps', 'nativeApps', 'artifactApps', 'webBundles', 'mcpServices', 'httpApis', 'externalIntegrations']) {
|
||||
if (['nativeApps', 'artifactApps', 'webBundles'].includes(key) && rootManifest.stats[key] === undefined && !counts[key]) continue
|
||||
if (rootManifest.stats[key] === undefined && key === 'externalIntegrations' && counts[key] === 0) continue
|
||||
if (rootManifest.stats[key] !== (counts[key] ?? 0)) diagnostics.push(diagnostic('error', 'stats-mismatch', 'manifest.json', `$.stats.${key}`, `声明 ${rootManifest.stats[key]},实际 ${counts[key] ?? 0}`))
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user