Package ordinary PresentationMount contracts and typed React hosting
This commit is contained in:
@@ -37,8 +37,8 @@ export function validatePresentations(workspace: WorkspaceRevision): CapabilityV
|
||||
?.modules?.find((entry) => entry.id === presentation.componentId);
|
||||
if (module) {
|
||||
const contract = moduleContract(workspace.interfaceImports, module);
|
||||
if (contract?.contract !== "org.quixos.react.subject-only/1")
|
||||
fail(`${path}.componentId`, "Standalone presentation requires a subject-only module contract");
|
||||
if (!contract || !["org.quixos.react.subject-only/1", "org.quixos.react.component/2"].includes(contract.contract))
|
||||
fail(`${path}.componentId`, "Standalone presentation requires a supported React presentation contract");
|
||||
if (contract?.subject?.kind !== "interface" || contract.subject.interfaceRevisionId !== presentation.subject)
|
||||
fail(`${path}.subject`, "Component requires its exact declared subject interface");
|
||||
continue;
|
||||
|
||||
Reference in New Issue
Block a user