@dxos/echo-pipeline 0.1.58-main.d82e9a3 → 0.1.58-main.e460f33

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.
@@ -423,11 +423,10 @@ var DataServiceImpl = class {
423
423
  // packages/core/echo/echo-pipeline/src/metadata/metadata-store.ts
424
424
  import CRC32 from "crc-32";
425
425
  import { synchronized, Event } from "@dxos/async";
426
- import { DataCorruptionError } from "@dxos/errors";
427
426
  import { invariant as invariant4 } from "@dxos/invariant";
428
427
  import { PublicKey as PublicKey3 } from "@dxos/keys";
429
428
  import { log as log3 } from "@dxos/log";
430
- import { STORAGE_VERSION, schema as schema4 } from "@dxos/protocols";
429
+ import { DataCorruptionError, STORAGE_VERSION, schema as schema4 } from "@dxos/protocols";
431
430
  import { SpaceState } from "@dxos/protocols/proto/dxos/client/services";
432
431
  import { ComplexMap as ComplexMap3, arrayToBuffer, forEachAsync, isNotNullOrUndefined } from "@dxos/util";
433
432
  function _ts_decorate2(decorators, target, key, desc) {
@@ -486,7 +485,7 @@ var MetadataStore = class {
486
485
  name: file.filename
487
486
  }, {
488
487
  F: __dxlog_file4,
489
- L: 82,
488
+ L: 81,
490
489
  S: this,
491
490
  C: (f, a) => f(...a)
492
491
  });
@@ -519,7 +518,7 @@ var MetadataStore = class {
519
518
  checksum
520
519
  }, {
521
520
  F: __dxlog_file4,
522
- L: 114,
521
+ L: 113,
523
522
  S: this,
524
523
  C: (f, a) => f(...a)
525
524
  });
@@ -551,7 +550,7 @@ var MetadataStore = class {
551
550
  err
552
551
  }, {
553
552
  F: __dxlog_file4,
554
- L: 145,
553
+ L: 144,
555
554
  S: this,
556
555
  C: (f, a) => f(...a)
557
556
  });
@@ -568,7 +567,7 @@ var MetadataStore = class {
568
567
  err
569
568
  }, {
570
569
  F: __dxlog_file4,
571
- L: 157,
570
+ L: 156,
572
571
  S: this,
573
572
  C: (f, a) => f(...a)
574
573
  });
@@ -598,7 +597,7 @@ var MetadataStore = class {
598
597
  err
599
598
  }, {
600
599
  F: __dxlog_file4,
601
- L: 186,
600
+ L: 185,
602
601
  S: this,
603
602
  C: (f, a) => f(...a)
604
603
  });
@@ -619,7 +618,7 @@ var MetadataStore = class {
619
618
  const space = this.spaces.find((space2) => space2.key === spaceKey);
620
619
  invariant4(space, "Space not found", {
621
620
  F: __dxlog_file4,
622
- L: 208,
621
+ L: 207,
623
622
  S: this,
624
623
  A: [
625
624
  "space",
@@ -643,7 +642,7 @@ var MetadataStore = class {
643
642
  async clear() {
644
643
  log3("clearing all metadata", void 0, {
645
644
  F: __dxlog_file4,
646
- L: 227,
645
+ L: 226,
647
646
  S: this,
648
647
  C: (f, a) => f(...a)
649
648
  });
@@ -656,7 +655,7 @@ var MetadataStore = class {
656
655
  async setIdentityRecord(record) {
657
656
  invariant4(!this._metadata.identity, "Cannot overwrite existing identity in metadata", {
658
657
  F: __dxlog_file4,
659
- L: 237,
658
+ L: 236,
660
659
  S: this,
661
660
  A: [
662
661
  "!this._metadata.identity",
@@ -670,7 +669,7 @@ var MetadataStore = class {
670
669
  async addSpace(record) {
671
670
  invariant4(!(this._metadata.spaces ?? []).find((space) => space.key === record.key), "Cannot overwrite existing space in metadata", {
672
671
  F: __dxlog_file4,
673
- L: 245,
672
+ L: 244,
674
673
  S: this,
675
674
  A: [
676
675
  "!(this._metadata.spaces ?? []).find((space) => space.key === record.key)",
@@ -1393,9 +1392,9 @@ import { Event as Event4, scheduleTask as scheduleTask2, sleep as sleep2, synchr
1393
1392
  import { Context as Context4 } from "@dxos/context";
1394
1393
  import { checkCredentialType } from "@dxos/credentials";
1395
1394
  import { getStateMachineFromItem, ItemManager, TYPE_PROPERTIES } from "@dxos/echo-db";
1396
- import { CancelledError } from "@dxos/errors";
1397
1395
  import { invariant as invariant8 } from "@dxos/invariant";
1398
1396
  import { log as log8, omit } from "@dxos/log";
1397
+ import { CancelledError } from "@dxos/protocols";
1399
1398
  import { Timeframe as Timeframe3 } from "@dxos/timeframe";
1400
1399
  import { TimeSeriesCounter, TimeUsageCounter, trace } from "@dxos/tracing";
1401
1400
  import { tracer } from "@dxos/util";
@@ -1467,7 +1466,7 @@ var DataPipeline = class DataPipeline2 {
1467
1466
  write: (data, options) => {
1468
1467
  invariant8(this._pipeline, "Pipeline is not initialized.", {
1469
1468
  F: __dxlog_file9,
1470
- L: 154,
1469
+ L: 153,
1471
1470
  S: this,
1472
1471
  A: [
1473
1472
  "this._pipeline",
@@ -1476,7 +1475,7 @@ var DataPipeline = class DataPipeline2 {
1476
1475
  });
1477
1476
  invariant8(this.currentEpoch, "Epoch is not initialized.", {
1478
1477
  F: __dxlog_file9,
1479
- L: 155,
1478
+ L: 154,
1480
1479
  S: this,
1481
1480
  A: [
1482
1481
  "this.currentEpoch",
@@ -1502,7 +1501,7 @@ var DataPipeline = class DataPipeline2 {
1502
1501
  }
1503
1502
  log8("close", void 0, {
1504
1503
  F: __dxlog_file9,
1505
- L: 179,
1504
+ L: 178,
1506
1505
  S: this,
1507
1506
  C: (f, a) => f(...a)
1508
1507
  });
@@ -1517,7 +1516,7 @@ var DataPipeline = class DataPipeline2 {
1517
1516
  } catch (err) {
1518
1517
  log8.catch(err, void 0, {
1519
1518
  F: __dxlog_file9,
1520
- L: 192,
1519
+ L: 191,
1521
1520
  S: this,
1522
1521
  C: (f, a) => f(...a)
1523
1522
  });
@@ -1542,7 +1541,7 @@ var DataPipeline = class DataPipeline2 {
1542
1541
  let messageCounter = 0;
1543
1542
  invariant8(this._pipeline, "Pipeline is not initialized.", {
1544
1543
  F: __dxlog_file9,
1545
- L: 217,
1544
+ L: 216,
1546
1545
  S: this,
1547
1546
  A: [
1548
1547
  "this._pipeline",
@@ -1558,7 +1557,7 @@ var DataPipeline = class DataPipeline2 {
1558
1557
  seq
1559
1558
  }, {
1560
1559
  F: __dxlog_file9,
1561
- L: 223,
1560
+ L: 222,
1562
1561
  S: this,
1563
1562
  C: (f, a) => f(...a)
1564
1563
  });
@@ -1570,7 +1569,7 @@ var DataPipeline = class DataPipeline2 {
1570
1569
  feedKey
1571
1570
  }, {
1572
1571
  F: __dxlog_file9,
1573
- L: 229,
1572
+ L: 228,
1574
1573
  S: this,
1575
1574
  C: (f, a) => f(...a)
1576
1575
  });
@@ -1593,7 +1592,7 @@ var DataPipeline = class DataPipeline2 {
1593
1592
  spaceKey: this._params.spaceKey.toHex()
1594
1593
  }, {
1595
1594
  F: __dxlog_file9,
1596
- L: 246,
1595
+ L: 245,
1597
1596
  S: this,
1598
1597
  C: (f, a) => f(...a)
1599
1598
  });
@@ -1602,7 +1601,7 @@ var DataPipeline = class DataPipeline2 {
1602
1601
  } catch (err) {
1603
1602
  log8.catch(err, void 0, {
1604
1603
  F: __dxlog_file9,
1605
- L: 256,
1604
+ L: 255,
1606
1605
  S: this,
1607
1606
  C: (f, a) => f(...a)
1608
1607
  });
@@ -1617,7 +1616,7 @@ var DataPipeline = class DataPipeline2 {
1617
1616
  _createSnapshot() {
1618
1617
  invariant8(this.databaseHost, "Database backend is not initialized.", {
1619
1618
  F: __dxlog_file9,
1620
- L: 270,
1619
+ L: 269,
1621
1620
  S: this,
1622
1621
  A: [
1623
1622
  "this.databaseHost",
@@ -1646,7 +1645,7 @@ var DataPipeline = class DataPipeline2 {
1646
1645
  } catch (err) {
1647
1646
  log8.warn("Failed to cache properties", err, {
1648
1647
  F: __dxlog_file9,
1649
- L: 299,
1648
+ L: 298,
1650
1649
  S: this,
1651
1650
  C: (f, a) => f(...a)
1652
1651
  });
@@ -1675,14 +1674,14 @@ var DataPipeline = class DataPipeline2 {
1675
1674
  if (err instanceof CancelledError) {
1676
1675
  log8("Epoch processing cancelled.", void 0, {
1677
1676
  F: __dxlog_file9,
1678
- L: 335,
1677
+ L: 334,
1679
1678
  S: this,
1680
1679
  C: (f, a) => f(...a)
1681
1680
  });
1682
1681
  } else {
1683
1682
  log8.catch(err, void 0, {
1684
1683
  F: __dxlog_file9,
1685
- L: 337,
1684
+ L: 336,
1686
1685
  S: this,
1687
1686
  C: (f, a) => f(...a)
1688
1687
  });
@@ -1702,7 +1701,7 @@ var DataPipeline = class DataPipeline2 {
1702
1701
  async _processEpoch(ctx, epoch) {
1703
1702
  invariant8(this._isOpen, "Space is closed.", {
1704
1703
  F: __dxlog_file9,
1705
- L: 356,
1704
+ L: 355,
1706
1705
  S: this,
1707
1706
  A: [
1708
1707
  "this._isOpen",
@@ -1711,7 +1710,7 @@ var DataPipeline = class DataPipeline2 {
1711
1710
  });
1712
1711
  invariant8(this._pipeline, void 0, {
1713
1712
  F: __dxlog_file9,
1714
- L: 357,
1713
+ L: 356,
1715
1714
  S: this,
1716
1715
  A: [
1717
1716
  "this._pipeline",
@@ -1723,7 +1722,7 @@ var DataPipeline = class DataPipeline2 {
1723
1722
  epoch: omit(epoch, "proof")
1724
1723
  }, {
1725
1724
  F: __dxlog_file9,
1726
- L: 360,
1725
+ L: 359,
1727
1726
  S: this,
1728
1727
  C: (f, a) => f(...a)
1729
1728
  });
@@ -1733,7 +1732,7 @@ var DataPipeline = class DataPipeline2 {
1733
1732
  }
1734
1733
  log8("restarting pipeline from epoch", void 0, {
1735
1734
  F: __dxlog_file9,
1736
- L: 366,
1735
+ L: 365,
1737
1736
  S: this,
1738
1737
  C: (f, a) => f(...a)
1739
1738
  });
@@ -1744,7 +1743,7 @@ var DataPipeline = class DataPipeline2 {
1744
1743
  async waitUntilTimeframe(timeframe) {
1745
1744
  invariant8(this._pipeline, "Pipeline is not initialized.", {
1746
1745
  F: __dxlog_file9,
1747
- L: 373,
1746
+ L: 372,
1748
1747
  S: this,
1749
1748
  A: [
1750
1749
  "this._pipeline",
@@ -1756,7 +1755,7 @@ var DataPipeline = class DataPipeline2 {
1756
1755
  async createEpoch() {
1757
1756
  invariant8(this._pipeline, void 0, {
1758
1757
  F: __dxlog_file9,
1759
- L: 379,
1758
+ L: 378,
1760
1759
  S: this,
1761
1760
  A: [
1762
1761
  "this._pipeline",
@@ -1765,7 +1764,7 @@ var DataPipeline = class DataPipeline2 {
1765
1764
  });
1766
1765
  invariant8(this.currentEpoch, void 0, {
1767
1766
  F: __dxlog_file9,
1768
- L: 380,
1767
+ L: 379,
1769
1768
  S: this,
1770
1769
  A: [
1771
1770
  "this.currentEpoch",
@@ -1796,7 +1795,7 @@ var DataPipeline = class DataPipeline2 {
1796
1795
  } catch (err) {
1797
1796
  log8.catch(err, void 0, {
1798
1797
  F: __dxlog_file9,
1799
- L: 410,
1798
+ L: 409,
1800
1799
  S: this,
1801
1800
  C: (f, a) => f(...a)
1802
1801
  });
@@ -2673,4 +2672,4 @@ export {
2673
2672
  SpaceProtocolSession,
2674
2673
  SpaceManager
2675
2674
  };
2676
- //# sourceMappingURL=chunk-VYZEP2BZ.mjs.map
2675
+ //# sourceMappingURL=chunk-YHBA7EZB.mjs.map