@astrosheep/square 0.3.45 → 0.3.47

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/landing.js DELETED
@@ -1,42 +0,0 @@
1
- import { done as applyDone, express as applyExpress, hold as applyHold, ignore as applyIgnore, implicitJoin as applyImplicitJoin, join as applyJoin, listen as applyListen, listening as applyListening, resume as applyResume, } from './square-actions.js';
2
- function artifactOf(square) {
3
- if ('artifact' in square)
4
- return square.artifact;
5
- const { cell } = square;
6
- return {
7
- read: () => cell.read(),
8
- transact: (fn) => cell.transact(fn),
9
- changed: (sinceVersion, timeoutMs) => cell.changed(sinceVersion, timeoutMs),
10
- close: () => cell.close(),
11
- };
12
- }
13
- function contextOf(square) {
14
- return { artifact: artifactOf(square), clock: square.clock, ...('location' in square ? { location: square.location, hostLedger: square.hostLedger, env: square.env } : {}) };
15
- }
16
- export function join(square, name) {
17
- return applyJoin(contextOf(square), name);
18
- }
19
- export function implicitJoin(square, name) {
20
- return applyImplicitJoin(contextOf(square), name);
21
- }
22
- export function express(square, name, body, options) {
23
- return applyExpress(contextOf(square), name, body, options);
24
- }
25
- export function listen(square, actor, target) {
26
- return applyListen(contextOf(square), actor, target);
27
- }
28
- export function ignore(square, actor, target) {
29
- return applyIgnore(contextOf(square), actor, target);
30
- }
31
- export function listening(square, actor) {
32
- return applyListening(contextOf(square), actor);
33
- }
34
- export function done(square, name, body = '') {
35
- return applyDone(contextOf(square), name, body);
36
- }
37
- export function hold(square, name, reason = '') {
38
- return applyHold(contextOf(square), name, reason);
39
- }
40
- export function resume(square, name) {
41
- return applyResume(contextOf(square), name);
42
- }