@dxos/echo-pipeline 0.1.57 → 0.1.58-main.0e9c99e

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.
@@ -8,7 +8,7 @@ var valueEncoding = createCodecEncoding(codec);
8
8
 
9
9
  // packages/core/echo/echo-pipeline/src/common/feeds.ts
10
10
  import { invariant } from "@dxos/invariant";
11
- var __dxlog_file = "/mnt/ramdisk/work/packages/core/echo/echo-pipeline/src/common/feeds.ts";
11
+ var __dxlog_file = "/home/runner/work/dxos/dxos/packages/core/echo/echo-pipeline/src/common/feeds.ts";
12
12
  var createMappedFeedWriter = (mapper, writer) => {
13
13
  invariant(mapper, void 0, {
14
14
  F: __dxlog_file,
@@ -41,7 +41,7 @@ import { invariant as invariant2 } from "@dxos/invariant";
41
41
  import { log } from "@dxos/log";
42
42
  import { EchoEvent } from "@dxos/protocols/proto/dxos/echo/service";
43
43
  import { ComplexMap } from "@dxos/util";
44
- var __dxlog_file2 = "/mnt/ramdisk/work/packages/core/echo/echo-pipeline/src/db-host/data-service-host.ts";
44
+ var __dxlog_file2 = "/home/runner/work/dxos/dxos/packages/core/echo/echo-pipeline/src/db-host/data-service-host.ts";
45
45
  var DataServiceHost = class {
46
46
  constructor(_itemManager, _itemDemuxer, _flush, _writeStream) {
47
47
  this._itemManager = _itemManager;
@@ -320,7 +320,7 @@ import { invariant as invariant3 } from "@dxos/invariant";
320
320
  import { PublicKey as PublicKey2 } from "@dxos/keys";
321
321
  import { log as log2 } from "@dxos/log";
322
322
  import { ComplexMap as ComplexMap2 } from "@dxos/util";
323
- var __dxlog_file3 = "/mnt/ramdisk/work/packages/core/echo/echo-pipeline/src/db-host/data-service.ts";
323
+ var __dxlog_file3 = "/home/runner/work/dxos/dxos/packages/core/echo/echo-pipeline/src/db-host/data-service.ts";
324
324
  var DataServiceSubscriptions = class {
325
325
  constructor() {
326
326
  this._spaces = new ComplexMap2(PublicKey2.hash);
@@ -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) {
@@ -440,7 +439,7 @@ function _ts_decorate2(decorators, target, key, desc) {
440
439
  r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
441
440
  return c > 3 && r && Object.defineProperty(target, key, r), r;
442
441
  }
443
- var __dxlog_file4 = "/mnt/ramdisk/work/packages/core/echo/echo-pipeline/src/metadata/metadata-store.ts";
442
+ var __dxlog_file4 = "/home/runner/work/dxos/dxos/packages/core/echo/echo-pipeline/src/metadata/metadata-store.ts";
444
443
  var emptyEchoMetadata = () => ({
445
444
  version: STORAGE_VERSION,
446
445
  spaces: [],
@@ -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)",
@@ -741,7 +740,7 @@ function _ts_decorate3(decorators, target, key, desc) {
741
740
  r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
742
741
  return c > 3 && r && Object.defineProperty(target, key, r), r;
743
742
  }
744
- var __dxlog_file5 = "/mnt/ramdisk/work/packages/core/echo/echo-pipeline/src/pipeline/timeframe-clock.ts";
743
+ var __dxlog_file5 = "/home/runner/work/dxos/dxos/packages/core/echo/echo-pipeline/src/pipeline/timeframe-clock.ts";
745
744
  var mapTimeframeToFeedIndexes = (timeframe) => timeframe.frames().map(([feedKey, index]) => ({
746
745
  feedKey,
747
746
  index
@@ -838,7 +837,7 @@ import { ComplexMap as ComplexMap4 } from "@dxos/util";
838
837
  // packages/core/echo/echo-pipeline/src/pipeline/message-selector.ts
839
838
  import { invariant as invariant5 } from "@dxos/invariant";
840
839
  import { log as log5 } from "@dxos/log";
841
- var __dxlog_file6 = "/mnt/ramdisk/work/packages/core/echo/echo-pipeline/src/pipeline/message-selector.ts";
840
+ var __dxlog_file6 = "/home/runner/work/dxos/dxos/packages/core/echo/echo-pipeline/src/pipeline/message-selector.ts";
842
841
  var createMessageSelector = (timeframeClock) => {
843
842
  return (messages) => {
844
843
  for (let i = 0; i < messages.length; i++) {
@@ -876,7 +875,7 @@ function _ts_decorate4(decorators, target, key, desc) {
876
875
  r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
877
876
  return c > 3 && r && Object.defineProperty(target, key, r), r;
878
877
  }
879
- var __dxlog_file7 = "/mnt/ramdisk/work/packages/core/echo/echo-pipeline/src/pipeline/pipeline.ts";
878
+ var __dxlog_file7 = "/home/runner/work/dxos/dxos/packages/core/echo/echo-pipeline/src/pipeline/pipeline.ts";
880
879
  var PipelineState = class {
881
880
  // prettier-ignore
882
881
  constructor(_feeds, _timeframeClock) {
@@ -1289,7 +1288,7 @@ import { invariant as invariant7 } from "@dxos/invariant";
1289
1288
  import { log as log7 } from "@dxos/log";
1290
1289
  import { schema as schema5 } from "@dxos/protocols";
1291
1290
  import { RpcExtension } from "@dxos/teleport";
1292
- var __dxlog_file8 = "/mnt/ramdisk/work/packages/core/echo/echo-pipeline/src/space/auth.ts";
1291
+ var __dxlog_file8 = "/home/runner/work/dxos/dxos/packages/core/echo/echo-pipeline/src/space/auth.ts";
1293
1292
  var AuthExtension = class extends RpcExtension {
1294
1293
  constructor(_authParams) {
1295
1294
  super({
@@ -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";
@@ -1409,7 +1408,7 @@ function _ts_decorate5(decorators, target, key, desc) {
1409
1408
  r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
1410
1409
  return c > 3 && r && Object.defineProperty(target, key, r), r;
1411
1410
  }
1412
- var __dxlog_file9 = "/mnt/ramdisk/work/packages/core/echo/echo-pipeline/src/space/data-pipeline.ts";
1411
+ var __dxlog_file9 = "/home/runner/work/dxos/dxos/packages/core/echo/echo-pipeline/src/space/data-pipeline.ts";
1413
1412
  var MESSAGES_PER_SNAPSHOT = 10;
1414
1413
  var AUTOMATIC_SNAPSHOT_DEBOUNCE_INTERVAL = 5e3;
1415
1414
  var TIMEFRAME_SAVE_DEBOUNCE_INTERVAL = 5e3;
@@ -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
  });
@@ -1855,7 +1854,7 @@ function _ts_decorate6(decorators, target, key, desc) {
1855
1854
  r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
1856
1855
  return c > 3 && r && Object.defineProperty(target, key, r), r;
1857
1856
  }
1858
- var __dxlog_file10 = "/mnt/ramdisk/work/packages/core/echo/echo-pipeline/src/space/control-pipeline.ts";
1857
+ var __dxlog_file10 = "/home/runner/work/dxos/dxos/packages/core/echo/echo-pipeline/src/space/control-pipeline.ts";
1859
1858
  var TIMEFRAME_SAVE_DEBOUNCE_INTERVAL2 = 500;
1860
1859
  var CONTROL_PIPELINE_SNAPSHOT_DELAY = 1e4;
1861
1860
  var USE_SNAPSHOTS = true;
@@ -2103,7 +2102,7 @@ function _ts_decorate7(decorators, target, key, desc) {
2103
2102
  r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
2104
2103
  return c > 3 && r && Object.defineProperty(target, key, r), r;
2105
2104
  }
2106
- var __dxlog_file11 = "/mnt/ramdisk/work/packages/core/echo/echo-pipeline/src/space/space.ts";
2105
+ var __dxlog_file11 = "/home/runner/work/dxos/dxos/packages/core/echo/echo-pipeline/src/space/space.ts";
2107
2106
  var Space = class Space2 {
2108
2107
  constructor(params) {
2109
2108
  this._addFeedLock = new Lock();
@@ -2360,7 +2359,7 @@ function _ts_decorate8(decorators, target, key, desc) {
2360
2359
  r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
2361
2360
  return c > 3 && r && Object.defineProperty(target, key, r), r;
2362
2361
  }
2363
- var __dxlog_file12 = "/mnt/ramdisk/work/packages/core/echo/echo-pipeline/src/space/space-protocol.ts";
2362
+ var __dxlog_file12 = "/home/runner/work/dxos/dxos/packages/core/echo/echo-pipeline/src/space/space-protocol.ts";
2364
2363
  var MOCK_AUTH_PROVIDER = async (nonce) => Buffer.from("mock");
2365
2364
  var MOCK_AUTH_VERIFIER = async (nonce, credential) => true;
2366
2365
  var SpaceProtocol = class {
@@ -2564,7 +2563,7 @@ function _ts_decorate9(decorators, target, key, desc) {
2564
2563
  r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
2565
2564
  return c > 3 && r && Object.defineProperty(target, key, r), r;
2566
2565
  }
2567
- var __dxlog_file13 = "/mnt/ramdisk/work/packages/core/echo/echo-pipeline/src/space/space-manager.ts";
2566
+ var __dxlog_file13 = "/home/runner/work/dxos/dxos/packages/core/echo/echo-pipeline/src/space/space-manager.ts";
2568
2567
  var SpaceManager = class SpaceManager2 {
2569
2568
  constructor({ feedStore, networkManager, modelFactory, metadataStore, snapshotStore, blobStore }) {
2570
2569
  this._spaces = new ComplexMap6(PublicKey7.hash);
@@ -2673,4 +2672,4 @@ export {
2673
2672
  SpaceProtocolSession,
2674
2673
  SpaceManager
2675
2674
  };
2676
- //# sourceMappingURL=chunk-V6J3XM4Y.mjs.map
2675
+ //# sourceMappingURL=chunk-YHBA7EZB.mjs.map