fix(repository-plugin): reject incomplete MCP publication

This commit is contained in:
Tianyi Cui
2026-08-09 00:50:54 +08:00
parent 29b3e3fa84
commit cc7bd4948d
20 changed files with 89 additions and 43 deletions

View File

@@ -80,7 +80,11 @@ async function assertInstalledPackageMetadata(directory: string): Promise<void>
}
const result = installedPackageSchema.safeParse(value)
if (!result.success) {
throw new Error(`installed DSH plugin package must declare a non-empty scripts.prepack that invokes ${JSON.stringify(REPOSITORY_PLUGIN_PREPARE_COMMAND)}:\n${z.prettifyError(result.error)}`)
throw new Error([
`installed DSH plugin package must declare a non-empty scripts.prepack that invokes ${JSON.stringify(REPOSITORY_PLUGIN_PREPARE_COMMAND)}:`,
z.prettifyError(result.error),
'Clear the matching repository cache generation before retrying the same source, or select a different exact source/ref/path after fixing the package.',
].join('\n'))
}
}