Qualify read-only forwarding and scoped portable discovery
This commit is contained in:
@@ -11,7 +11,7 @@ import { compileQuery } from "../src/query/compile.js";
|
||||
import { readReaderFixture } from "./reader-fixture.js";
|
||||
const directory = resolve("test/fixtures/local-first-composite");
|
||||
export async function loadCompositeWorkspace() {
|
||||
const changed = new Set(["DocumentFactory", "DocumentMetadata", "CommentFactory"]);
|
||||
const changed = new Set(["DocumentFactory", "DocumentMetadata", "DocumentLabel", "CommentFactory"]);
|
||||
const read = (name: string) => readFile(resolve(directory, `${name}.qx`), "utf8");
|
||||
const source = { repository: "https://example.test/composite.git", commit: "b".repeat(40) };
|
||||
const interfaces = new Map<string, InterfaceRevision>();
|
||||
@@ -22,6 +22,7 @@ export async function loadCompositeWorkspace() {
|
||||
"DocumentActions",
|
||||
"DocumentFactory",
|
||||
"DocumentMetadata",
|
||||
"DocumentLabel",
|
||||
"CommentFactory",
|
||||
]) {
|
||||
const result = compileCapabilityResourceSource(
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
interface DocumentLabel id "interface:reader:document-label"
|
||||
revision "interface:reader:document-label@1" {
|
||||
queryable value title id "document:view-title" : string {
|
||||
get id "document:view-title:get" execution snapshot targets [browser, server];
|
||||
}
|
||||
}
|
||||
@@ -7,6 +7,7 @@ workspace Reader id "workspace:reader" revision "workspace:reader@1" commit "aaa
|
||||
import package ReaderRuntime;
|
||||
import package CommentRuntime;
|
||||
import interface DocumentMetadata;
|
||||
import interface DocumentLabel;
|
||||
import interface CommentFactory;
|
||||
// Shared record definitions, repeated explicitly in independently locked resources.
|
||||
|
||||
@@ -62,6 +63,10 @@ workspace Reader id "workspace:reader" revision "workspace:reader@1" commit "aaa
|
||||
};
|
||||
}
|
||||
|
||||
conform Document as DocumentLabel id "conformance:reader:document-label" {
|
||||
bind title.get to interface DocumentMetadata.label.get;
|
||||
}
|
||||
|
||||
conform Document as DocumentMetadata id "conformance:reader:document-metadata" {
|
||||
private state Label id "slot:document:label" on Document : string policy register;
|
||||
initialize { label to state Label; };
|
||||
|
||||
Reference in New Issue
Block a user