AI Disclosure: This page was generated by an LLM and may contain inaccuracies. Hand-crafted documentation will be implemented over time on the road to 1.0
validateIdentityProjections
Since Plugin API: 1.0.0
Signature
export function validateIdentityProjections(identity: PluginIdentity, projections: readonly PluginIdentityProjection[]): ValidationResult {
const errors: string[] = [];
for (const projection of projections) {
for (const field of [
"id",
"version",
"minAppVersion",
"pluginApiVersion",
] as const) {
const value = projection[field];
if (value !== undefined && value !== identity[field]) {
errors.push(`${projection.source}.${field} "${value}" does not match manifest "${identity[field]}"`);
}
}
}
return { valid: errors.length === 0, errors };
}