@dxos/echo-pipeline 0.3.8-main.8be0ad4 → 0.3.8-main.913b25a
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-KD6OVLI6.mjs → chunk-EIHG3NK5.mjs} +45 -20
- package/dist/lib/browser/{chunk-KD6OVLI6.mjs.map → chunk-EIHG3NK5.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-3GZGEC6P.cjs +2753 -0
- package/dist/lib/node/chunk-3GZGEC6P.cjs.map +7 -0
- package/dist/lib/node/index.cjs +28 -2727
- package/dist/lib/node/index.cjs.map +4 -4
- package/dist/lib/node/meta.json +1 -1
- package/dist/lib/node/testing/index.cjs +89 -2798
- package/dist/lib/node/testing/index.cjs.map +4 -4
- package/dist/types/src/space/data-pipeline.d.ts.map +1 -1
- package/package.json +51 -35
- package/src/space/data-pipeline.ts +39 -2
- package/testing.d.ts +0 -11
- package/testing.js +0 -5
|
@@ -1580,7 +1580,7 @@ var DataPipeline = class DataPipeline2 {
|
|
|
1580
1580
|
let messageCounter = 0;
|
|
1581
1581
|
invariant8(this._pipeline, "Pipeline is not initialized.", {
|
|
1582
1582
|
F: __dxlog_file9,
|
|
1583
|
-
L:
|
|
1583
|
+
L: 223,
|
|
1584
1584
|
S: this,
|
|
1585
1585
|
A: [
|
|
1586
1586
|
"this._pipeline",
|
|
@@ -1596,7 +1596,7 @@ var DataPipeline = class DataPipeline2 {
|
|
|
1596
1596
|
seq
|
|
1597
1597
|
}, {
|
|
1598
1598
|
F: __dxlog_file9,
|
|
1599
|
-
L:
|
|
1599
|
+
L: 229,
|
|
1600
1600
|
S: this,
|
|
1601
1601
|
C: (f, a) => f(...a)
|
|
1602
1602
|
});
|
|
@@ -1608,7 +1608,7 @@ var DataPipeline = class DataPipeline2 {
|
|
|
1608
1608
|
feedKey
|
|
1609
1609
|
}, {
|
|
1610
1610
|
F: __dxlog_file9,
|
|
1611
|
-
L:
|
|
1611
|
+
L: 235,
|
|
1612
1612
|
S: this,
|
|
1613
1613
|
C: (f, a) => f(...a)
|
|
1614
1614
|
});
|
|
@@ -1631,7 +1631,7 @@ var DataPipeline = class DataPipeline2 {
|
|
|
1631
1631
|
spaceKey: this._params.spaceKey.toHex()
|
|
1632
1632
|
}, {
|
|
1633
1633
|
F: __dxlog_file9,
|
|
1634
|
-
L:
|
|
1634
|
+
L: 252,
|
|
1635
1635
|
S: this,
|
|
1636
1636
|
C: (f, a) => f(...a)
|
|
1637
1637
|
});
|
|
@@ -1640,22 +1640,22 @@ var DataPipeline = class DataPipeline2 {
|
|
|
1640
1640
|
} catch (err) {
|
|
1641
1641
|
log8.catch(err, void 0, {
|
|
1642
1642
|
F: __dxlog_file9,
|
|
1643
|
-
L:
|
|
1643
|
+
L: 262,
|
|
1644
1644
|
S: this,
|
|
1645
1645
|
C: (f, a) => f(...a)
|
|
1646
1646
|
});
|
|
1647
1647
|
}
|
|
1648
1648
|
span.end();
|
|
1649
|
-
if (++messageCounter >
|
|
1649
|
+
if (++messageCounter > 100) {
|
|
1650
1650
|
messageCounter = 0;
|
|
1651
|
-
await
|
|
1651
|
+
await idle(1e3);
|
|
1652
1652
|
}
|
|
1653
1653
|
}
|
|
1654
1654
|
}
|
|
1655
1655
|
_createSnapshot() {
|
|
1656
1656
|
invariant8(this.databaseHost, "Database backend is not initialized.", {
|
|
1657
1657
|
F: __dxlog_file9,
|
|
1658
|
-
L:
|
|
1658
|
+
L: 276,
|
|
1659
1659
|
S: this,
|
|
1660
1660
|
A: [
|
|
1661
1661
|
"this.databaseHost",
|
|
@@ -1684,7 +1684,7 @@ var DataPipeline = class DataPipeline2 {
|
|
|
1684
1684
|
} catch (err) {
|
|
1685
1685
|
log8.warn("Failed to cache properties", err, {
|
|
1686
1686
|
F: __dxlog_file9,
|
|
1687
|
-
L:
|
|
1687
|
+
L: 305,
|
|
1688
1688
|
S: this,
|
|
1689
1689
|
C: (f, a) => f(...a)
|
|
1690
1690
|
});
|
|
@@ -1713,14 +1713,14 @@ var DataPipeline = class DataPipeline2 {
|
|
|
1713
1713
|
if (err instanceof CancelledError) {
|
|
1714
1714
|
log8("Epoch processing cancelled.", void 0, {
|
|
1715
1715
|
F: __dxlog_file9,
|
|
1716
|
-
L:
|
|
1716
|
+
L: 341,
|
|
1717
1717
|
S: this,
|
|
1718
1718
|
C: (f, a) => f(...a)
|
|
1719
1719
|
});
|
|
1720
1720
|
} else {
|
|
1721
1721
|
log8.catch(err, void 0, {
|
|
1722
1722
|
F: __dxlog_file9,
|
|
1723
|
-
L:
|
|
1723
|
+
L: 343,
|
|
1724
1724
|
S: this,
|
|
1725
1725
|
C: (f, a) => f(...a)
|
|
1726
1726
|
});
|
|
@@ -1740,7 +1740,7 @@ var DataPipeline = class DataPipeline2 {
|
|
|
1740
1740
|
async _processEpoch(ctx, epoch) {
|
|
1741
1741
|
invariant8(this._isOpen, "Space is closed.", {
|
|
1742
1742
|
F: __dxlog_file9,
|
|
1743
|
-
L:
|
|
1743
|
+
L: 362,
|
|
1744
1744
|
S: this,
|
|
1745
1745
|
A: [
|
|
1746
1746
|
"this._isOpen",
|
|
@@ -1749,7 +1749,7 @@ var DataPipeline = class DataPipeline2 {
|
|
|
1749
1749
|
});
|
|
1750
1750
|
invariant8(this._pipeline, void 0, {
|
|
1751
1751
|
F: __dxlog_file9,
|
|
1752
|
-
L:
|
|
1752
|
+
L: 363,
|
|
1753
1753
|
S: this,
|
|
1754
1754
|
A: [
|
|
1755
1755
|
"this._pipeline",
|
|
@@ -1761,7 +1761,7 @@ var DataPipeline = class DataPipeline2 {
|
|
|
1761
1761
|
epoch: omit(epoch, "proof")
|
|
1762
1762
|
}, {
|
|
1763
1763
|
F: __dxlog_file9,
|
|
1764
|
-
L:
|
|
1764
|
+
L: 366,
|
|
1765
1765
|
S: this,
|
|
1766
1766
|
C: (f, a) => f(...a)
|
|
1767
1767
|
});
|
|
@@ -1771,7 +1771,7 @@ var DataPipeline = class DataPipeline2 {
|
|
|
1771
1771
|
}
|
|
1772
1772
|
log8("restarting pipeline from epoch", void 0, {
|
|
1773
1773
|
F: __dxlog_file9,
|
|
1774
|
-
L:
|
|
1774
|
+
L: 372,
|
|
1775
1775
|
S: this,
|
|
1776
1776
|
C: (f, a) => f(...a)
|
|
1777
1777
|
});
|
|
@@ -1782,7 +1782,7 @@ var DataPipeline = class DataPipeline2 {
|
|
|
1782
1782
|
async waitUntilTimeframe(timeframe) {
|
|
1783
1783
|
invariant8(this._pipeline, "Pipeline is not initialized.", {
|
|
1784
1784
|
F: __dxlog_file9,
|
|
1785
|
-
L:
|
|
1785
|
+
L: 379,
|
|
1786
1786
|
S: this,
|
|
1787
1787
|
A: [
|
|
1788
1788
|
"this._pipeline",
|
|
@@ -1794,7 +1794,7 @@ var DataPipeline = class DataPipeline2 {
|
|
|
1794
1794
|
async createEpoch() {
|
|
1795
1795
|
invariant8(this._pipeline, void 0, {
|
|
1796
1796
|
F: __dxlog_file9,
|
|
1797
|
-
L:
|
|
1797
|
+
L: 385,
|
|
1798
1798
|
S: this,
|
|
1799
1799
|
A: [
|
|
1800
1800
|
"this._pipeline",
|
|
@@ -1803,7 +1803,7 @@ var DataPipeline = class DataPipeline2 {
|
|
|
1803
1803
|
});
|
|
1804
1804
|
invariant8(this.currentEpoch, void 0, {
|
|
1805
1805
|
F: __dxlog_file9,
|
|
1806
|
-
L:
|
|
1806
|
+
L: 386,
|
|
1807
1807
|
S: this,
|
|
1808
1808
|
A: [
|
|
1809
1809
|
"this.currentEpoch",
|
|
@@ -1834,7 +1834,7 @@ var DataPipeline = class DataPipeline2 {
|
|
|
1834
1834
|
} catch (err) {
|
|
1835
1835
|
log8.catch(err, void 0, {
|
|
1836
1836
|
F: __dxlog_file9,
|
|
1837
|
-
L:
|
|
1837
|
+
L: 416,
|
|
1838
1838
|
S: this,
|
|
1839
1839
|
C: (f, a) => f(...a)
|
|
1840
1840
|
});
|
|
@@ -1864,6 +1864,31 @@ DataPipeline = _ts_decorate4([
|
|
|
1864
1864
|
trackLeaks("open", "close"),
|
|
1865
1865
|
trace.resource()
|
|
1866
1866
|
], DataPipeline);
|
|
1867
|
+
var idle = async (timeout) => {
|
|
1868
|
+
if (!("scheduler" in globalThis && typeof globalThis.scheduler.postTask === "function")) {
|
|
1869
|
+
await sleep(1);
|
|
1870
|
+
return;
|
|
1871
|
+
}
|
|
1872
|
+
await new Promise((resolve) => {
|
|
1873
|
+
const cleanup = () => {
|
|
1874
|
+
clearTimeout(timer);
|
|
1875
|
+
controller.abort();
|
|
1876
|
+
};
|
|
1877
|
+
const controller = new AbortController();
|
|
1878
|
+
void globalThis.scheduler.postTask(() => {
|
|
1879
|
+
cleanup();
|
|
1880
|
+
resolve();
|
|
1881
|
+
}, {
|
|
1882
|
+
priority: "background",
|
|
1883
|
+
signal: controller.signal
|
|
1884
|
+
}).catch(() => {
|
|
1885
|
+
});
|
|
1886
|
+
const timer = setTimeout(() => {
|
|
1887
|
+
cleanup();
|
|
1888
|
+
resolve();
|
|
1889
|
+
}, timeout);
|
|
1890
|
+
});
|
|
1891
|
+
};
|
|
1867
1892
|
|
|
1868
1893
|
// packages/core/echo/echo-pipeline/src/space/space.ts
|
|
1869
1894
|
import { Event as Event5, synchronized as synchronized4, trackLeaks as trackLeaks3, Lock } from "@dxos/async";
|
|
@@ -2712,4 +2737,4 @@ export {
|
|
|
2712
2737
|
SpaceProtocolSession,
|
|
2713
2738
|
SpaceManager
|
|
2714
2739
|
};
|
|
2715
|
-
//# sourceMappingURL=chunk-
|
|
2740
|
+
//# sourceMappingURL=chunk-EIHG3NK5.mjs.map
|