Expose closed module types and define stable presentation occurrences
This commit is contained in:
@@ -16,6 +16,7 @@ import { resolveForwardedBinding } from "../capability-model/forwarding.js";
|
||||
import { linkQueries, type LinkedQuery } from "../query/link.js";
|
||||
import { type BindingSchema } from "../bindings/index.js";
|
||||
import { unsupportedQueryOperator } from "./query-operators.js";
|
||||
import { moduleTypeContext } from "./module-contracts.js";
|
||||
|
||||
export class ExecutionPlanError extends Error {
|
||||
constructor(
|
||||
@@ -62,6 +63,8 @@ export interface PlanPackage {
|
||||
modules?: (NonNullable<WorkspaceRevision["packageImports"][number]["modules"]>[number] & {
|
||||
contract: string;
|
||||
subject?: import("../capability-model/types.js").ObjectExpectation;
|
||||
typeArguments?: readonly unknown[];
|
||||
requiredInterfaces?: readonly string[];
|
||||
})[];
|
||||
controllers?: NonNullable<WorkspaceRevision["packageImports"][number]["controllers"]>;
|
||||
components?: { id: string; displayName: string; subject: InterfaceRevisionId; runtime: "react" }[];
|
||||
@@ -504,6 +507,9 @@ export function compileExecutionPlan(input: WorkspaceRevision): ExecutionPlan {
|
||||
...module,
|
||||
contract: contract.contract,
|
||||
...(contract.subject ? { subject: contract.subject } : {}),
|
||||
...moduleTypeContext(
|
||||
workspace.interfaceImports.find((iface) => iface.revisionId === module.interfaceRevisionId)!,
|
||||
),
|
||||
};
|
||||
}),
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user