@dxos/echo-db 2.33.8-dev.8609bc45 → 2.33.9-dev.002e8917

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.
Files changed (189) hide show
  1. package/dist/src/api/result-set.js +4 -4
  2. package/dist/src/api/result-set.js.map +1 -1
  3. package/dist/src/echo.js +2 -2
  4. package/dist/src/echo.js.map +1 -1
  5. package/dist/src/echo.test.js +13 -13
  6. package/dist/src/echo.test.js.map +1 -1
  7. package/dist/src/halo/halo-factory.d.ts +1 -1
  8. package/dist/src/halo/halo-factory.d.ts.map +1 -1
  9. package/dist/src/halo/halo-factory.js +16 -16
  10. package/dist/src/halo/halo-factory.js.map +1 -1
  11. package/dist/src/halo/halo-party.d.ts +4 -6
  12. package/dist/src/halo/halo-party.d.ts.map +1 -1
  13. package/dist/src/halo/halo-party.js +12 -6
  14. package/dist/src/halo/halo-party.js.map +1 -1
  15. package/dist/src/halo/halo.d.ts.map +1 -1
  16. package/dist/src/halo/halo.js +11 -10
  17. package/dist/src/halo/halo.js.map +1 -1
  18. package/dist/src/halo/identity-manager.d.ts.map +1 -1
  19. package/dist/src/halo/identity-manager.js +13 -7
  20. package/dist/src/halo/identity-manager.js.map +1 -1
  21. package/dist/src/halo/identity.js +2 -2
  22. package/dist/src/halo/identity.js.map +1 -1
  23. package/dist/src/halo/party-opener.d.ts.map +1 -1
  24. package/dist/src/halo/party-opener.js +2 -4
  25. package/dist/src/halo/party-opener.js.map +1 -1
  26. package/dist/src/halo/preferences.d.ts.map +1 -1
  27. package/dist/src/halo/preferences.js +9 -12
  28. package/dist/src/halo/preferences.js.map +1 -1
  29. package/dist/src/invitations/greeting-initiator.d.ts +5 -4
  30. package/dist/src/invitations/greeting-initiator.d.ts.map +1 -1
  31. package/dist/src/invitations/greeting-initiator.js +9 -10
  32. package/dist/src/invitations/greeting-initiator.js.map +1 -1
  33. package/dist/src/invitations/greeting-protocol-provider.js +2 -2
  34. package/dist/src/invitations/greeting-protocol-provider.js.map +1 -1
  35. package/dist/src/invitations/greeting-responder.d.ts +4 -7
  36. package/dist/src/invitations/greeting-responder.d.ts.map +1 -1
  37. package/dist/src/invitations/greeting-responder.js +12 -26
  38. package/dist/src/invitations/greeting-responder.js.map +1 -1
  39. package/dist/src/invitations/halo-recovery-initiator.js +8 -8
  40. package/dist/src/invitations/halo-recovery-initiator.js.map +1 -1
  41. package/dist/src/invitations/invitation-descriptor.js +12 -12
  42. package/dist/src/invitations/invitation-descriptor.js.map +1 -1
  43. package/dist/src/invitations/invitation-factory.d.ts +2 -1
  44. package/dist/src/invitations/invitation-factory.d.ts.map +1 -1
  45. package/dist/src/invitations/invitation-factory.js +6 -8
  46. package/dist/src/invitations/invitation-factory.js.map +1 -1
  47. package/dist/src/invitations/offline-invitation-claimer.js +9 -9
  48. package/dist/src/invitations/offline-invitation-claimer.js.map +1 -1
  49. package/dist/src/packlets/database/data-mirror.js +8 -8
  50. package/dist/src/packlets/database/data-mirror.js.map +1 -1
  51. package/dist/src/packlets/database/data-mirror.test.js +1 -1
  52. package/dist/src/packlets/database/data-mirror.test.js.map +1 -1
  53. package/dist/src/packlets/database/data-service-host.js +3 -3
  54. package/dist/src/packlets/database/data-service-host.js.map +1 -1
  55. package/dist/src/packlets/database/data-service-router.js +5 -5
  56. package/dist/src/packlets/database/data-service-router.js.map +1 -1
  57. package/dist/src/packlets/database/database-backend.js +3 -3
  58. package/dist/src/packlets/database/database-backend.js.map +1 -1
  59. package/dist/src/packlets/database/database.js +2 -2
  60. package/dist/src/packlets/database/database.js.map +1 -1
  61. package/dist/src/packlets/database/item-demuxer.js +14 -14
  62. package/dist/src/packlets/database/item-demuxer.js.map +1 -1
  63. package/dist/src/packlets/database/item-demuxer.test.js +1 -1
  64. package/dist/src/packlets/database/item-demuxer.test.js.map +1 -1
  65. package/dist/src/packlets/database/item-manager.js +18 -18
  66. package/dist/src/packlets/database/item-manager.js.map +1 -1
  67. package/dist/src/packlets/database/link.js +3 -3
  68. package/dist/src/packlets/database/link.js.map +1 -1
  69. package/dist/src/packlets/database/selection/result.js +2 -2
  70. package/dist/src/packlets/database/selection/result.js.map +1 -1
  71. package/dist/src/packlets/database/testing.js +1 -1
  72. package/dist/src/packlets/database/testing.js.map +1 -1
  73. package/dist/src/packlets/database/timeframe-clock.d.ts +2 -1
  74. package/dist/src/packlets/database/timeframe-clock.d.ts.map +1 -1
  75. package/dist/src/packlets/database/timeframe-clock.js +15 -5
  76. package/dist/src/packlets/database/timeframe-clock.js.map +1 -1
  77. package/dist/src/parties/data-party.d.ts +4 -3
  78. package/dist/src/parties/data-party.d.ts.map +1 -1
  79. package/dist/src/parties/data-party.js +18 -14
  80. package/dist/src/parties/data-party.js.map +1 -1
  81. package/dist/src/parties/data-party.test.js +12 -12
  82. package/dist/src/parties/data-party.test.js.map +1 -1
  83. package/dist/src/parties/party-factory.d.ts +2 -4
  84. package/dist/src/parties/party-factory.d.ts.map +1 -1
  85. package/dist/src/parties/party-factory.js +18 -15
  86. package/dist/src/parties/party-factory.js.map +1 -1
  87. package/dist/src/parties/party-manager.d.ts +1 -1
  88. package/dist/src/parties/party-manager.d.ts.map +1 -1
  89. package/dist/src/parties/party-manager.js +19 -19
  90. package/dist/src/parties/party-manager.js.map +1 -1
  91. package/dist/src/parties/party-manager.test.js +22 -18
  92. package/dist/src/parties/party-manager.test.js.map +1 -1
  93. package/dist/src/parties/party-preferences.js +2 -2
  94. package/dist/src/parties/party-preferences.js.map +1 -1
  95. package/dist/src/pipeline/feed-muxer.d.ts.map +1 -1
  96. package/dist/src/pipeline/feed-muxer.js +5 -5
  97. package/dist/src/pipeline/feed-muxer.js.map +1 -1
  98. package/dist/src/pipeline/feed-muxer.test.js +2 -2
  99. package/dist/src/pipeline/feed-muxer.test.js.map +1 -1
  100. package/dist/src/pipeline/message-selector.d.ts +1 -2
  101. package/dist/src/pipeline/message-selector.d.ts.map +1 -1
  102. package/dist/src/pipeline/message-selector.js +6 -33
  103. package/dist/src/pipeline/message-selector.js.map +1 -1
  104. package/dist/src/pipeline/metadata-store.d.ts +7 -2
  105. package/dist/src/pipeline/metadata-store.d.ts.map +1 -1
  106. package/dist/src/pipeline/metadata-store.js +12 -3
  107. package/dist/src/pipeline/metadata-store.js.map +1 -1
  108. package/dist/src/pipeline/party-feed-provider.d.ts +2 -2
  109. package/dist/src/pipeline/party-feed-provider.d.ts.map +1 -1
  110. package/dist/src/pipeline/party-feed-provider.js +5 -4
  111. package/dist/src/pipeline/party-feed-provider.js.map +1 -1
  112. package/dist/src/pipeline/party-pipeline.d.ts +5 -5
  113. package/dist/src/pipeline/party-pipeline.d.ts.map +1 -1
  114. package/dist/src/pipeline/party-pipeline.js +19 -20
  115. package/dist/src/pipeline/party-pipeline.js.map +1 -1
  116. package/dist/src/pipeline/party-pipeline.test.js +13 -18
  117. package/dist/src/pipeline/party-pipeline.test.js.map +1 -1
  118. package/dist/src/pipeline/party-processor.js +3 -3
  119. package/dist/src/pipeline/party-processor.js.map +1 -1
  120. package/dist/src/protocol/authenticator.test.js +53 -12
  121. package/dist/src/protocol/authenticator.test.js.map +1 -1
  122. package/dist/src/protocol/identity-credentials.d.ts.map +1 -1
  123. package/dist/src/protocol/identity-credentials.js +2 -2
  124. package/dist/src/protocol/identity-credentials.js.map +1 -1
  125. package/dist/src/protocol/party-protocol-factory.js +1 -1
  126. package/dist/src/protocol/party-protocol-factory.js.map +1 -1
  127. package/dist/src/protocol/replicator-plugin.d.ts.map +1 -1
  128. package/dist/src/protocol/replicator-plugin.js +1 -2
  129. package/dist/src/protocol/replicator-plugin.js.map +1 -1
  130. package/dist/src/snapshots/snapshot-generator.js +2 -2
  131. package/dist/src/snapshots/snapshot-generator.js.map +1 -1
  132. package/dist/src/snapshots/snapshot-store.d.ts.map +1 -1
  133. package/dist/src/snapshots/snapshot-store.js +4 -4
  134. package/dist/src/snapshots/snapshot-store.js.map +1 -1
  135. package/dist/src/testing/testing-factories.js +2 -2
  136. package/dist/src/testing/testing-factories.js.map +1 -1
  137. package/dist/tsconfig.tsbuildinfo +1 -1
  138. package/package.json +24 -20
  139. package/src/api/result-set.ts +1 -1
  140. package/src/echo.test.ts +3 -3
  141. package/src/echo.ts +1 -1
  142. package/src/halo/halo-factory.ts +8 -9
  143. package/src/halo/halo-party.ts +15 -7
  144. package/src/halo/halo.ts +4 -2
  145. package/src/halo/identity-manager.ts +12 -3
  146. package/src/halo/identity.ts +1 -1
  147. package/src/halo/party-opener.ts +2 -4
  148. package/src/halo/preferences.ts +5 -9
  149. package/src/invitations/greeting-initiator.ts +11 -6
  150. package/src/invitations/greeting-protocol-provider.ts +2 -2
  151. package/src/invitations/greeting-responder.ts +12 -31
  152. package/src/invitations/halo-recovery-initiator.ts +4 -4
  153. package/src/invitations/invitation-descriptor.ts +6 -6
  154. package/src/invitations/invitation-factory.ts +3 -3
  155. package/src/invitations/offline-invitation-claimer.ts +4 -4
  156. package/src/packlets/database/data-mirror.test.ts +2 -2
  157. package/src/packlets/database/data-mirror.ts +1 -1
  158. package/src/packlets/database/data-service-host.ts +1 -1
  159. package/src/packlets/database/data-service-router.ts +1 -1
  160. package/src/packlets/database/database-backend.ts +1 -1
  161. package/src/packlets/database/database.ts +1 -1
  162. package/src/packlets/database/item-demuxer.test.ts +2 -2
  163. package/src/packlets/database/item-demuxer.ts +1 -1
  164. package/src/packlets/database/item-manager.ts +1 -1
  165. package/src/packlets/database/link.ts +1 -1
  166. package/src/packlets/database/selection/result.ts +1 -1
  167. package/src/packlets/database/testing.ts +2 -2
  168. package/src/packlets/database/timeframe-clock.ts +4 -1
  169. package/src/parties/data-party.test.ts +12 -12
  170. package/src/parties/data-party.ts +15 -7
  171. package/src/parties/party-factory.ts +21 -13
  172. package/src/parties/party-manager.test.ts +13 -9
  173. package/src/parties/party-manager.ts +15 -13
  174. package/src/parties/party-preferences.ts +1 -1
  175. package/src/pipeline/feed-muxer.test.ts +2 -2
  176. package/src/pipeline/feed-muxer.ts +5 -5
  177. package/src/pipeline/message-selector.ts +5 -36
  178. package/src/pipeline/metadata-store.ts +53 -31
  179. package/src/pipeline/party-feed-provider.ts +3 -3
  180. package/src/pipeline/party-pipeline.test.ts +13 -19
  181. package/src/pipeline/party-pipeline.ts +14 -13
  182. package/src/pipeline/party-processor.ts +1 -1
  183. package/src/protocol/authenticator.test.ts +102 -17
  184. package/src/protocol/identity-credentials.ts +5 -2
  185. package/src/protocol/party-protocol-factory.ts +2 -2
  186. package/src/protocol/replicator-plugin.ts +1 -2
  187. package/src/snapshots/snapshot-generator.ts +1 -1
  188. package/src/snapshots/snapshot-store.ts +3 -3
  189. package/src/testing/testing-factories.ts +1 -1
@@ -2,11 +2,11 @@
2
2
  // Copyright 2020 DXOS.org
3
3
  //
4
4
 
5
- import assert from 'assert';
6
5
  import debug from 'debug';
6
+ import assert from 'node:assert';
7
7
 
8
- import { keyToString } from '@dxos/crypto';
9
8
  import { schema, PartyKey, PartySnapshot } from '@dxos/echo-protocol';
9
+ import { PublicKey } from '@dxos/protocols';
10
10
  import { Directory } from '@dxos/random-access-multi-storage';
11
11
 
12
12
  const log = debug('dxos:snapshot-store');
@@ -44,7 +44,7 @@ export class SnapshotStore {
44
44
 
45
45
  async save (snapshot: PartySnapshot) {
46
46
  assert(snapshot.partyKey);
47
- const file = this._directory.createOrOpen(keyToString(snapshot.partyKey), { truncate: true, size: 0 });
47
+ const file = this._directory.createOrOpen(PublicKey.stringify(snapshot.partyKey), { truncate: true, size: 0 });
48
48
 
49
49
  try {
50
50
  const data = schema.getCodecForType('dxos.echo.snapshot.PartySnapshot').encode(snapshot);
@@ -2,7 +2,7 @@
2
2
  // Copyright 2020 DXOS.org
3
3
  //
4
4
 
5
- import assert from 'assert';
5
+ import assert from 'node:assert';
6
6
 
7
7
  import { Model } from '@dxos/model-factory';
8
8
  import { ObjectModel } from '@dxos/object-model';