Implement main-thread Camino sessions and synchronous CRDT editing
This commit is contained in:
@@ -154,3 +154,20 @@ await writeFile("dist/portable-reader/compound-crdt/kernel.json", JSON.stringify
|
||||
const { emitExecutionScaffold } = await import("./execution-scaffold-fixture.js");
|
||||
const executionScaffold = await emitExecutionScaffold("dist/portable-reader/execution-scaffold/source");
|
||||
await writeFile("dist/portable-reader/execution-scaffold/plan.json", JSON.stringify(executionScaffold));
|
||||
|
||||
// Native variant fixture shared by generated-type and browser editing qualification.
|
||||
const { readFile } = await import("node:fs/promises");
|
||||
const { compileCapabilityResourceSource } = await import("../src/capability-language/index.js");
|
||||
const { portableValueSchema, tsType } = await import("../src/bindings/portable.js");
|
||||
const variantSource = compileCapabilityResourceSource(await readFile("test/fixtures/canvas-content.qx", "utf8"), {
|
||||
source: { repository: "https://example.test/canvas-content.git", commit: "a".repeat(40) },
|
||||
});
|
||||
if (!variantSource.ok || variantSource.resource.kind !== "interface") throw Error("Invalid variant fixture");
|
||||
const entries = variantSource.resource.revision.members[0];
|
||||
if (entries.kind !== "value") throw Error("Expected entries value");
|
||||
await mkdir("dist/portable-reader/variants", { recursive: true });
|
||||
await writeFile("dist/portable-reader/variants/schema.json", JSON.stringify(portableValueSchema(entries.valueType)));
|
||||
await writeFile(
|
||||
"dist/portable-reader/variants/entries.ts",
|
||||
"export type Entries = " + tsType(entries.valueType) + ";\n",
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user