Restore the workspace canvas and atomic Studio creation workflow
This commit is contained in:
@@ -114,3 +114,20 @@ test("server projection descriptors are distinct from canonical inputs and have
|
||||
/@live is retired/,
|
||||
);
|
||||
});
|
||||
|
||||
test("static interface ports keep unit arguments explicit for generic factory composition", async () => {
|
||||
const schema = compileExecutionPlan(await loadReaderWorkspace()).definition.bindingSchema;
|
||||
const entry = schema.packages.flatMap((p) => p.exports).find((e) => e.displayName === "addHighlight")!;
|
||||
const port = entry.dependencyPorts.find((p) => p.requirement.kind === "interface")!;
|
||||
if (port.requirement.kind !== "interface") throw Error("interface required");
|
||||
const requirement = port.requirement;
|
||||
const iface = schema.interfaces.find((i) => i.revisionId === requirement.interfaceRevisionId)!;
|
||||
const op = iface.members.flatMap((m) => m.operations).find((o) => o.id === requirement.operations![0])!;
|
||||
op.scope = "class";
|
||||
op.inputType = { kind: "builtin", name: "unit" };
|
||||
port.requirement.operations = [op.id];
|
||||
delete port.requirement.receiver;
|
||||
const generated = generatePortableTypeScriptBindings(schema, "package:reader-runtime@1", { target: "browser" });
|
||||
assert.match(generated, /"explicitInput": true/);
|
||||
assert.match(generated, /input: null/);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user