Compare commits

...

2 Commits

Author SHA1 Message Date
Tony Garnock-Jones 4b5eccad24 Publish
- @syndicate-lang/browser-stdenv@0.34.0
 - @syndicate-lang/core@0.33.0
 - @syndicate-lang/fs@0.34.0
 - @syndicate-lang/html@0.34.0
 - @syndicate-lang/html2@0.34.0
 - @syndicate-lang/loader@0.34.0
 - @syndicate-lang/service@0.34.0
 - @syndicate-lang/syndicatec@0.35.0
 - @syndicate-lang/timer@0.34.0
 - @syndicate-lang/ts-plugin@0.35.0
 - @syndicate-lang/tsc@0.35.0
 - @syndicate-lang/ws-relay@0.35.0
2024-04-15 10:26:49 +02:00
Tony Garnock-Jones 4a05bbad73 Rename Dataspace.global to Dataspace.local 2024-04-15 10:26:27 +02:00
18 changed files with 52 additions and 53 deletions

View File

@ -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"
}
}

View File

@ -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+",

View File

@ -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);
}
}

View File

@ -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"
}
}

View File

@ -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"
}
}

View File

@ -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);

View File

@ -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"
}
}

View File

@ -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);
}

View File

@ -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"
}
}

View File

@ -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,
});

View File

@ -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"
}
}

View File

@ -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"
},

View File

@ -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"
}
}

View File

@ -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({

View File

@ -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"

View File

@ -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"
},

View File

@ -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"
}
}

View File

@ -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 {