Generate typed asynchronous service capability bindings
This commit is contained in:
@@ -87,3 +87,18 @@ const negative: PortableImplementation = {
|
||||
void negative;
|
||||
`,
|
||||
);
|
||||
|
||||
const { asyncObjectPlan } = await import("./async-fixture.js");
|
||||
const { generateRemoteTypeScriptBindings } = await import("../src/bindings/portable.js");
|
||||
const asyncPlan = await asyncObjectPlan();
|
||||
await mkdir("dist/portable-reader/async", { recursive: true });
|
||||
await writeFile("dist/portable-reader/async/plan.json", JSON.stringify(asyncPlan));
|
||||
await writeFile("dist/portable-reader/async/kernel.json", JSON.stringify(compileKernelProgram(asyncPlan)));
|
||||
for (const [name, revision] of [
|
||||
["controller", "async:controller-runtime@1"],
|
||||
["provider", "async:provider-runtime@2"],
|
||||
] as const)
|
||||
await writeFile(
|
||||
`dist/portable-reader/async/${name}.ts`,
|
||||
generateRemoteTypeScriptBindings(asyncPlan.definition.bindingSchema, revision),
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user