Compare commits
2 Commits
40bc9aadd3
...
4b5eccad24
Author | SHA1 | Date |
---|---|---|
Tony Garnock-Jones | 4b5eccad24 | |
Tony Garnock-Jones | 4a05bbad73 |
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@syndicate-lang/browser-stdenv",
|
||||
"version": "0.33.0",
|
||||
"version": "0.34.0",
|
||||
"description": "Aggregated Syndicate and Preserves scripts for in-browser use",
|
||||
"homepage": "https://github.com/syndicate-lang/syndicate-js/tree/main/packages/browser-stdenv",
|
||||
"license": "GPL-3.0+",
|
||||
|
@ -22,8 +22,8 @@
|
|||
"@preserves/core": "0.995.200",
|
||||
"@preserves/schema": "0.995.201",
|
||||
"@syndicate-lang/compiler": "^0.21.1",
|
||||
"@syndicate-lang/core": "^0.32.0",
|
||||
"@syndicate-lang/html2": "^0.33.0",
|
||||
"@syndicate-lang/ws-relay": "^0.34.0"
|
||||
"@syndicate-lang/core": "^0.33.0",
|
||||
"@syndicate-lang/html2": "^0.34.0",
|
||||
"@syndicate-lang/ws-relay": "^0.35.0"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@syndicate-lang/core",
|
||||
"version": "0.32.0",
|
||||
"version": "0.33.0",
|
||||
"description": "Syndicate/JS for browser and node.js",
|
||||
"homepage": "https://github.com/syndicate-lang/syndicate-js/tree/main/packages/core",
|
||||
"license": "GPL-3.0+",
|
||||
|
|
|
@ -46,17 +46,16 @@ export class DataspaceObserver implements IndexObserver<Turn> {
|
|||
}
|
||||
|
||||
export class Dataspace implements Partial<Entity> {
|
||||
private static _global: Ref | undefined = void 0;
|
||||
private static _local: Ref | undefined = void 0;
|
||||
|
||||
static get global(): Ref {
|
||||
if (Dataspace._global === void 0) {
|
||||
static get local(): Ref {
|
||||
if (Dataspace._local === void 0) {
|
||||
Dataspace.boot(ds => {
|
||||
Turn.activeFacet.actor.name = Symbol.for('Dataspace.global');
|
||||
// Cast to any because `global` is otherwise readonly (!)
|
||||
Dataspace._global = ds;
|
||||
Turn.activeFacet.actor.name = Symbol.for('Dataspace.local');
|
||||
Dataspace._local = ds;
|
||||
});
|
||||
}
|
||||
return Dataspace._global!;
|
||||
return Dataspace._local!;
|
||||
}
|
||||
|
||||
// Alias for syndicatec code generator to use, plus hook for fallback use outside a Turn
|
||||
|
@ -73,7 +72,7 @@ export class Dataspace implements Partial<Entity> {
|
|||
if (Turn.active) {
|
||||
return Turn.active._spawn(bootProc);
|
||||
} else {
|
||||
return Actor.boot(bootProc, void 0, Dataspace.global.relay.actor.space);
|
||||
return Actor.boot(bootProc, void 0, Dataspace.local.relay.actor.space);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@syndicate-lang/fs",
|
||||
"version": "0.33.0",
|
||||
"version": "0.34.0",
|
||||
"description": "Reflect contents of a portion of the file system as assertions",
|
||||
"homepage": "https://github.com/syndicate-lang/syndicate-js/tree/main/packages/fs",
|
||||
"license": "GPL-3.0+",
|
||||
|
@ -30,13 +30,13 @@
|
|||
"@preserves/core": "0.995.200"
|
||||
},
|
||||
"dependencies": {
|
||||
"@syndicate-lang/core": "^0.32.0",
|
||||
"@syndicate-lang/service": "^0.33.0",
|
||||
"@syndicate-lang/core": "^0.33.0",
|
||||
"@syndicate-lang/service": "^0.34.0",
|
||||
"chokidar": "^3.5.3"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@preserves/schema-cli": "0.995.201",
|
||||
"@syndicate-lang/ts-plugin": "^0.34.0",
|
||||
"@syndicate-lang/tsc": "^0.34.0"
|
||||
"@syndicate-lang/ts-plugin": "^0.35.0",
|
||||
"@syndicate-lang/tsc": "^0.35.0"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@syndicate-lang/html",
|
||||
"version": "0.33.0",
|
||||
"version": "0.34.0",
|
||||
"description": "DOM/HTML UI for Syndicate/JS",
|
||||
"homepage": "https://github.com/syndicate-lang/syndicate-js/tree/main/packages/html",
|
||||
"license": "GPL-3.0+",
|
||||
|
@ -25,10 +25,10 @@
|
|||
"veryclean": "yarn run clean && rm -rf node_modules"
|
||||
},
|
||||
"dependencies": {
|
||||
"@syndicate-lang/core": "^0.32.0"
|
||||
"@syndicate-lang/core": "^0.33.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@syndicate-lang/ts-plugin": "^0.34.0",
|
||||
"@syndicate-lang/tsc": "^0.34.0"
|
||||
"@syndicate-lang/ts-plugin": "^0.35.0",
|
||||
"@syndicate-lang/tsc": "^0.35.0"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -11,7 +11,7 @@ export type UIFragmentRecord = ReturnType<typeof P.UIFragment>;
|
|||
import { HtmlFragments } from "./html";
|
||||
export * from "./html";
|
||||
|
||||
export function boot(ds = Dataspace.global) {
|
||||
export function boot(ds = Dataspace.local) {
|
||||
spawnGlobalEventFactory(ds);
|
||||
spawnWindowEventFactory(ds);
|
||||
spawnUIFragmentFactory(ds);
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@syndicate-lang/html2",
|
||||
"version": "0.33.0",
|
||||
"version": "0.34.0",
|
||||
"description": "DOM/HTML UI for Syndicate/JS",
|
||||
"homepage": "https://github.com/syndicate-lang/syndicate-js/tree/main/packages/html2",
|
||||
"license": "GPL-3.0+",
|
||||
|
@ -25,10 +25,10 @@
|
|||
"veryclean": "yarn run clean && rm -rf node_modules"
|
||||
},
|
||||
"dependencies": {
|
||||
"@syndicate-lang/core": "^0.32.0"
|
||||
"@syndicate-lang/core": "^0.33.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@syndicate-lang/ts-plugin": "^0.34.0",
|
||||
"@syndicate-lang/tsc": "^0.34.0"
|
||||
"@syndicate-lang/ts-plugin": "^0.35.0",
|
||||
"@syndicate-lang/tsc": "^0.35.0"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -8,7 +8,7 @@ export { HtmlTemplater, template, HtmlFragment } from "./html";
|
|||
export assertion type LocationHash(hash: string);
|
||||
export type LocationHash = ReturnType<typeof LocationHash>;
|
||||
|
||||
export function boot(ds = Dataspace.global) {
|
||||
export function boot(ds = Dataspace.local) {
|
||||
spawnLocationHashTracker(ds);
|
||||
}
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@syndicate-lang/loader",
|
||||
"version": "0.33.0",
|
||||
"version": "0.34.0",
|
||||
"description": "Syndicate/JS node.js loader hook",
|
||||
"homepage": "https://github.com/syndicate-lang/syndicate-js/tree/main/packages/loader",
|
||||
"license": "GPL-3.0+",
|
||||
|
@ -23,7 +23,7 @@
|
|||
"author": "Tony Garnock-Jones <tonyg@leastfixedpoint.com>",
|
||||
"dependencies": {
|
||||
"@syndicate-lang/compiler": "^0.21.1",
|
||||
"@syndicate-lang/core": "^0.32.0",
|
||||
"@syndicate-lang/service": "^0.33.0"
|
||||
"@syndicate-lang/core": "^0.33.0",
|
||||
"@syndicate-lang/service": "^0.34.0"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -7,7 +7,7 @@ import Pos = Syntax.Pos;
|
|||
|
||||
import * as Syndicate from '@syndicate-lang/core';
|
||||
Object.defineProperty(globalThis, 'currentSyndicateTarget', {
|
||||
value: Syndicate.Dataspace.global,
|
||||
value: Syndicate.Dataspace.local,
|
||||
writable: false,
|
||||
});
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@syndicate-lang/service",
|
||||
"version": "0.33.0",
|
||||
"version": "0.34.0",
|
||||
"description": "Run a node.js program as a service within syndicate-server",
|
||||
"homepage": "https://github.com/syndicate-lang/syndicate-js/tree/main/packages/service",
|
||||
"license": "GPL-3.0+",
|
||||
|
@ -22,10 +22,10 @@
|
|||
"veryclean": "yarn run clean && rm -rf node_modules"
|
||||
},
|
||||
"dependencies": {
|
||||
"@syndicate-lang/core": "^0.32.0"
|
||||
"@syndicate-lang/core": "^0.33.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@syndicate-lang/ts-plugin": "^0.34.0",
|
||||
"@syndicate-lang/tsc": "^0.34.0"
|
||||
"@syndicate-lang/ts-plugin": "^0.35.0",
|
||||
"@syndicate-lang/tsc": "^0.35.0"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@syndicate-lang/syndicatec",
|
||||
"version": "0.34.0",
|
||||
"version": "0.35.0",
|
||||
"description": "Syndicate/JS compiler command-line tool",
|
||||
"homepage": "https://github.com/syndicate-lang/syndicate-js/tree/main/packages/syndicatec",
|
||||
"license": "GPL-3.0+",
|
||||
|
@ -21,7 +21,7 @@
|
|||
"author": "Tony Garnock-Jones <tonyg@leastfixedpoint.com>",
|
||||
"dependencies": {
|
||||
"@syndicate-lang/compiler": "^0.21.1",
|
||||
"@syndicate-lang/core": "^0.32.0",
|
||||
"@syndicate-lang/core": "^0.33.0",
|
||||
"glob": "^7.1.6",
|
||||
"yargs": "^16.2.0"
|
||||
},
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@syndicate-lang/timer",
|
||||
"version": "0.33.0",
|
||||
"version": "0.34.0",
|
||||
"description": "Time and timer driver for Syndicate",
|
||||
"homepage": "https://github.com/syndicate-lang/syndicate-js/tree/main/packages/timer",
|
||||
"license": "GPL-3.0+",
|
||||
|
@ -25,10 +25,10 @@
|
|||
"veryclean": "yarn run clean && rm -rf node_modules"
|
||||
},
|
||||
"dependencies": {
|
||||
"@syndicate-lang/core": "^0.32.0"
|
||||
"@syndicate-lang/core": "^0.33.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@syndicate-lang/ts-plugin": "^0.34.0",
|
||||
"@syndicate-lang/tsc": "^0.34.0"
|
||||
"@syndicate-lang/ts-plugin": "^0.35.0",
|
||||
"@syndicate-lang/tsc": "^0.35.0"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -20,7 +20,7 @@ export function sleep(ds: Ref, seconds: number, cb: () => void): void {
|
|||
}
|
||||
}
|
||||
|
||||
export function boot(ds = Dataspace.global) {
|
||||
export function boot(ds = Dataspace.local) {
|
||||
spawn named 'timer/PeriodicTick' {
|
||||
at ds {
|
||||
during Observe({
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@syndicate-lang/ts-plugin",
|
||||
"version": "0.34.0",
|
||||
"version": "0.35.0",
|
||||
"description": "Syndicate/JS TypeScript tsserver plugin",
|
||||
"homepage": "https://github.com/syndicate-lang/syndicate-js/tree/main/packages/ts-plugin",
|
||||
"license": "GPL-3.0+",
|
||||
|
@ -23,7 +23,7 @@
|
|||
"author": "Tony Garnock-Jones <tonyg@leastfixedpoint.com>",
|
||||
"dependencies": {
|
||||
"@syndicate-lang/compiler": "^0.21.1",
|
||||
"@syndicate-lang/core": "^0.32.0"
|
||||
"@syndicate-lang/core": "^0.33.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"typescript": "^4.9"
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@syndicate-lang/tsc",
|
||||
"version": "0.34.0",
|
||||
"version": "0.35.0",
|
||||
"description": "Syndicate for TypeScript compiler command-line tool",
|
||||
"homepage": "https://github.com/syndicate-lang/syndicate-js/tree/main/packages/tsc",
|
||||
"license": "GPL-3.0+",
|
||||
|
@ -21,7 +21,7 @@
|
|||
"author": "Tony Garnock-Jones <tonyg@leastfixedpoint.com>",
|
||||
"dependencies": {
|
||||
"@syndicate-lang/compiler": "^0.21.1",
|
||||
"@syndicate-lang/core": "^0.32.0",
|
||||
"@syndicate-lang/core": "^0.33.0",
|
||||
"glob": "^7.1.6",
|
||||
"yargs": "^16.2.0"
|
||||
},
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@syndicate-lang/ws-relay",
|
||||
"version": "0.34.0",
|
||||
"version": "0.35.0",
|
||||
"description": "Browser WebSocket relay to a Syndicate server",
|
||||
"homepage": "https://github.com/syndicate-lang/syndicate-js/tree/main/packages/ws-relay",
|
||||
"license": "GPL-3.0+",
|
||||
|
@ -28,11 +28,11 @@
|
|||
"@preserves/core": "0.995.200"
|
||||
},
|
||||
"dependencies": {
|
||||
"@syndicate-lang/core": "^0.32.0",
|
||||
"@syndicate-lang/core": "^0.33.0",
|
||||
"salty-crypto": "0.3"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@syndicate-lang/ts-plugin": "^0.34.0",
|
||||
"@syndicate-lang/tsc": "^0.34.0"
|
||||
"@syndicate-lang/ts-plugin": "^0.35.0",
|
||||
"@syndicate-lang/tsc": "^0.35.0"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -39,7 +39,7 @@ type TransportState = {
|
|||
peer: Ref,
|
||||
};
|
||||
|
||||
export function boot(ds = Dataspace.global, debug: boolean = false, WebSocketConstructor?: typeof WebSocket) {
|
||||
export function boot(ds = Dataspace.local, debug: boolean = false, WebSocketConstructor?: typeof WebSocket) {
|
||||
spawn named 'transportConnector' {
|
||||
at ds {
|
||||
during Observe({ "pattern": :pattern G.TransportConnection({
|
||||
|
@ -470,7 +470,7 @@ export function contactRemote(
|
|||
controlObject: Ref,
|
||||
transportAddr: AnyValue,
|
||||
) => void,
|
||||
ds = Dataspace.global,
|
||||
ds = Dataspace.local,
|
||||
) {
|
||||
const routeValue = 'pathSteps' in route ? G.fromRoute(G.Route(route)) : route;
|
||||
at ds {
|
||||
|
|
Loading…
Reference in New Issue