Make local graph execution optional across composed packages
This commit is contained in:
@@ -14,23 +14,24 @@ const iface = (text: string): InterfaceRevision => {
|
||||
return result.resource.revision;
|
||||
};
|
||||
const data = iface(`interface Data id "data" revision "data@1" {
|
||||
value title id "title" : string { get id "title:get" execution snapshot targets [browser, server]; }
|
||||
value title id "title" : string { get id "title:get" execution snapshot; }
|
||||
}`);
|
||||
const tagged = iface(`interface Tagged id "tagged" revision "tagged@1" {
|
||||
value tags id "tags" : list<string> { get id "tags:get" execution snapshot targets [browser, server]; }
|
||||
value tags id "tags" : list<string> { get id "tags:get" execution snapshot; }
|
||||
}`);
|
||||
const factory = iface(`external atom Note id "note";
|
||||
interface Factory id "factory" revision "factory@1" {
|
||||
static operation create id "create" : ${seed} -> atom-ref<Note> { call id "create:call" execution transaction targets [browser, server]; }
|
||||
static operation importNote id "import" : ${seed} -> atom-ref<Note> { call id "import:call" execution transaction targets [browser, server]; }
|
||||
static operation create id "create" : ${seed} -> atom-ref<Note> { call id "create:call" execution transaction; }
|
||||
static operation importNote id "import" : ${seed} -> atom-ref<Note> { call id "import:call" execution transaction; }
|
||||
}`);
|
||||
const runtime = compileCapabilityResourceSource(
|
||||
`external atom Note id "note";
|
||||
`symbol JavaScript id "target:org.quixos.execution.javascript@1";
|
||||
external atom Note id "note";
|
||||
package Runtime id "runtime" revision "runtime@1" {
|
||||
function createNote id "create-note" : ${seed} -> atom-ref<Note> execution transaction targets [browser, server] requires {
|
||||
function createNote id "create-note" : ${seed} -> atom-ref<Note> execution transaction targets [JavaScript, server] requires {
|
||||
creation note id "new-note" : Note input ${seed};
|
||||
};
|
||||
function importNote id "import-note" : ${seed} -> atom-ref<Note> execution transaction targets [browser, server] requires {
|
||||
function importNote id "import-note" : ${seed} -> atom-ref<Note> execution transaction targets [JavaScript, server] requires {
|
||||
creation note id "new-note" : Note input ${seed};
|
||||
};
|
||||
}`,
|
||||
@@ -137,9 +138,10 @@ test("defaults supply unmapped state and seeds cannot invoke an undeclared owner
|
||||
|
||||
test("creation ports cannot be used in snapshot execution", () => {
|
||||
const result = compileCapabilityResourceSource(
|
||||
`external atom Note id "note";
|
||||
`symbol JavaScript id "target:org.quixos.execution.javascript@1";
|
||||
external atom Note id "note";
|
||||
package P id "p" revision "p@1" {
|
||||
function createNote id "create" : unit -> atom-ref<Note> execution snapshot targets [browser, server] requires {
|
||||
function createNote id "create" : unit -> atom-ref<Note> execution snapshot targets [JavaScript, server] requires {
|
||||
creation note id "note" : Note input record { title:string; };
|
||||
};
|
||||
}`,
|
||||
|
||||
Reference in New Issue
Block a user