@dxos/echo-pipeline 0.4.10-main.eedd150 → 0.4.10-main.ef6fbc2
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/lib/browser/{chunk-Y5YOH4CA.mjs → chunk-RA6MLCZM.mjs} +13 -27
- package/dist/lib/browser/{chunk-Y5YOH4CA.mjs.map → chunk-RA6MLCZM.mjs.map} +3 -3
- package/dist/lib/browser/index.mjs +1 -1
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/testing/index.mjs +1 -1
- package/dist/lib/node/{chunk-ONMB6ZZF.cjs → chunk-KGIYLJBT.cjs} +19 -33
- package/dist/lib/node/chunk-KGIYLJBT.cjs.map +7 -0
- package/dist/lib/node/index.cjs +21 -21
- package/dist/lib/node/meta.json +1 -1
- package/dist/lib/node/testing/index.cjs +11 -11
- package/dist/types/src/space/space.d.ts +4 -8
- package/dist/types/src/space/space.d.ts.map +1 -1
- package/dist/types/src/testing/test-agent-builder.d.ts +2 -2
- package/package.json +30 -30
- package/src/space/space.test.ts +7 -7
- package/src/space/space.ts +6 -21
- package/dist/lib/node/chunk-ONMB6ZZF.cjs.map +0 -7
|
@@ -1143,6 +1143,7 @@ var AuthExtension = class extends RpcExtension {
|
|
|
1143
1143
|
|
|
1144
1144
|
// packages/core/echo/echo-pipeline/src/space/space.ts
|
|
1145
1145
|
import { Event as Event4, Mutex, synchronized as synchronized3, trackLeaks as trackLeaks2 } from "@dxos/async";
|
|
1146
|
+
import { Resource, LifecycleState } from "@dxos/context";
|
|
1146
1147
|
import { invariant as invariant6 } from "@dxos/invariant";
|
|
1147
1148
|
import { log as log7, logInfo } from "@dxos/log";
|
|
1148
1149
|
import { AdmittedFeed as AdmittedFeed2 } from "@dxos/protocols/proto/dxos/halo/credentials";
|
|
@@ -1422,12 +1423,12 @@ function _ts_decorate5(decorators, target, key, desc) {
|
|
|
1422
1423
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
1423
1424
|
}
|
|
1424
1425
|
var __dxlog_file8 = "/home/runner/work/dxos/dxos/packages/core/echo/echo-pipeline/src/space/space.ts";
|
|
1425
|
-
var Space = class {
|
|
1426
|
+
var Space = class extends Resource {
|
|
1426
1427
|
constructor(params) {
|
|
1428
|
+
super();
|
|
1427
1429
|
this._addFeedMutex = new Mutex();
|
|
1428
1430
|
this.onCredentialProcessed = new Callback2();
|
|
1429
1431
|
this.stateUpdate = new Event4();
|
|
1430
|
-
this._isOpen = false;
|
|
1431
1432
|
invariant6(params.spaceKey && params.feedProvider, void 0, {
|
|
1432
1433
|
F: __dxlog_file8,
|
|
1433
1434
|
L: 72,
|
|
@@ -1476,7 +1477,7 @@ var Space = class {
|
|
|
1476
1477
|
return this._key;
|
|
1477
1478
|
}
|
|
1478
1479
|
get isOpen() {
|
|
1479
|
-
return this.
|
|
1480
|
+
return this._lifecycleState === LifecycleState.OPEN;
|
|
1480
1481
|
}
|
|
1481
1482
|
get genesisFeedKey() {
|
|
1482
1483
|
return this._genesisFeedKey;
|
|
@@ -1532,50 +1533,36 @@ var Space = class {
|
|
|
1532
1533
|
getControlFeeds() {
|
|
1533
1534
|
return Array.from(this._controlPipeline.spaceState.feeds.values());
|
|
1534
1535
|
}
|
|
1535
|
-
|
|
1536
|
-
* Use for diagnostics.
|
|
1537
|
-
*/
|
|
1538
|
-
// getDataFeeds(): FeedInfo[] {
|
|
1539
|
-
// return this._dataPipeline?.getFeeds();
|
|
1540
|
-
// }
|
|
1541
|
-
async open(ctx) {
|
|
1536
|
+
async _open(ctx) {
|
|
1542
1537
|
log7("opening...", void 0, {
|
|
1543
1538
|
F: __dxlog_file8,
|
|
1544
|
-
L:
|
|
1539
|
+
L: 167,
|
|
1545
1540
|
S: this,
|
|
1546
1541
|
C: (f, a) => f(...a)
|
|
1547
1542
|
});
|
|
1548
|
-
if (this._isOpen) {
|
|
1549
|
-
return;
|
|
1550
|
-
}
|
|
1551
1543
|
await this._controlPipeline.start();
|
|
1552
1544
|
await this.protocol.start();
|
|
1553
|
-
this._isOpen = true;
|
|
1554
1545
|
log7("opened", void 0, {
|
|
1555
1546
|
F: __dxlog_file8,
|
|
1556
|
-
L:
|
|
1547
|
+
L: 173,
|
|
1557
1548
|
S: this,
|
|
1558
1549
|
C: (f, a) => f(...a)
|
|
1559
1550
|
});
|
|
1560
1551
|
}
|
|
1561
|
-
async
|
|
1552
|
+
async _close() {
|
|
1562
1553
|
log7("closing...", {
|
|
1563
1554
|
key: this._key
|
|
1564
1555
|
}, {
|
|
1565
1556
|
F: __dxlog_file8,
|
|
1566
|
-
L:
|
|
1557
|
+
L: 178,
|
|
1567
1558
|
S: this,
|
|
1568
1559
|
C: (f, a) => f(...a)
|
|
1569
1560
|
});
|
|
1570
|
-
if (!this._isOpen) {
|
|
1571
|
-
return;
|
|
1572
|
-
}
|
|
1573
1561
|
await this.protocol.stop();
|
|
1574
1562
|
await this._controlPipeline.stop();
|
|
1575
|
-
this._isOpen = false;
|
|
1576
1563
|
log7("closed", void 0, {
|
|
1577
1564
|
F: __dxlog_file8,
|
|
1578
|
-
L:
|
|
1565
|
+
L: 184,
|
|
1579
1566
|
S: this,
|
|
1580
1567
|
C: (f, a) => f(...a)
|
|
1581
1568
|
});
|
|
@@ -1592,12 +1579,11 @@ _ts_decorate5([
|
|
|
1592
1579
|
trace2.info()
|
|
1593
1580
|
], Space.prototype, "key", null);
|
|
1594
1581
|
_ts_decorate5([
|
|
1595
|
-
synchronized3,
|
|
1596
1582
|
trace2.span()
|
|
1597
|
-
], Space.prototype, "
|
|
1583
|
+
], Space.prototype, "_open", null);
|
|
1598
1584
|
_ts_decorate5([
|
|
1599
1585
|
synchronized3
|
|
1600
|
-
], Space.prototype, "
|
|
1586
|
+
], Space.prototype, "_close", null);
|
|
1601
1587
|
Space = _ts_decorate5([
|
|
1602
1588
|
trackLeaks2("open", "close"),
|
|
1603
1589
|
trace2.resource()
|
|
@@ -1938,4 +1924,4 @@ export {
|
|
|
1938
1924
|
SpaceProtocolSession,
|
|
1939
1925
|
SpaceManager
|
|
1940
1926
|
};
|
|
1941
|
-
//# sourceMappingURL=chunk-
|
|
1927
|
+
//# sourceMappingURL=chunk-RA6MLCZM.mjs.map
|