@dxos/echo-db 2.33.5-dev.bbe0c471 → 2.33.5-dev.cf9f6681

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 (256) hide show
  1. package/dist/src/api/index.d.ts +0 -5
  2. package/dist/src/api/index.d.ts.map +1 -1
  3. package/dist/src/api/index.js +0 -5
  4. package/dist/src/api/index.js.map +1 -1
  5. package/dist/src/api/schema.test.js +1 -1
  6. package/dist/src/api/schema.test.js.map +1 -1
  7. package/dist/src/echo.d.ts.map +1 -1
  8. package/dist/src/echo.js +2 -2
  9. package/dist/src/echo.js.map +1 -1
  10. package/dist/src/echo.test.js +12 -0
  11. package/dist/src/echo.test.js.map +1 -1
  12. package/dist/src/halo/contact-manager.d.ts +2 -1
  13. package/dist/src/halo/contact-manager.d.ts.map +1 -1
  14. package/dist/src/halo/contact-manager.js +1 -1
  15. package/dist/src/halo/contact-manager.js.map +1 -1
  16. package/dist/src/halo/preferences.d.ts +1 -1
  17. package/dist/src/halo/preferences.d.ts.map +1 -1
  18. package/dist/src/halo/preferences.js +1 -1
  19. package/dist/src/halo/preferences.js.map +1 -1
  20. package/dist/src/index.d.ts +2 -2
  21. package/dist/src/index.d.ts.map +1 -1
  22. package/dist/src/index.js +2 -2
  23. package/dist/src/index.js.map +1 -1
  24. package/dist/src/invitations/halo-recovery-initiator.js +1 -1
  25. package/dist/src/invitations/halo-recovery-initiator.js.map +1 -1
  26. package/dist/src/invitations/invitation-descriptor.js +1 -1
  27. package/dist/src/invitations/invitation-descriptor.js.map +1 -1
  28. package/dist/src/invitations/offline-invitation-claimer.js +1 -1
  29. package/dist/src/invitations/offline-invitation-claimer.js.map +1 -1
  30. package/dist/src/{database → packlets/database}/data-mirror.d.ts +0 -0
  31. package/dist/src/packlets/database/data-mirror.d.ts.map +1 -0
  32. package/dist/src/{database → packlets/database}/data-mirror.js +0 -0
  33. package/dist/src/packlets/database/data-mirror.js.map +1 -0
  34. package/dist/src/{database → packlets/database}/data-mirror.test.d.ts +0 -0
  35. package/dist/src/packlets/database/data-mirror.test.d.ts.map +1 -0
  36. package/dist/src/{database → packlets/database}/data-mirror.test.js +0 -0
  37. package/dist/src/packlets/database/data-mirror.test.js.map +1 -0
  38. package/dist/src/{database → packlets/database}/data-service-host.d.ts +0 -0
  39. package/dist/src/packlets/database/data-service-host.d.ts.map +1 -0
  40. package/dist/src/{database → packlets/database}/data-service-host.js +4 -3
  41. package/dist/src/packlets/database/data-service-host.js.map +1 -0
  42. package/dist/src/{database → packlets/database}/data-service-router.d.ts +0 -0
  43. package/dist/src/packlets/database/data-service-router.d.ts.map +1 -0
  44. package/dist/src/{database → packlets/database}/data-service-router.js +0 -0
  45. package/dist/src/packlets/database/data-service-router.js.map +1 -0
  46. package/dist/src/{database → packlets/database}/database-backend.d.ts +0 -0
  47. package/dist/src/packlets/database/database-backend.d.ts.map +1 -0
  48. package/dist/src/{database → packlets/database}/database-backend.js +0 -0
  49. package/dist/src/packlets/database/database-backend.js.map +1 -0
  50. package/dist/src/{api → packlets/database}/database.d.ts +2 -1
  51. package/dist/src/packlets/database/database.d.ts.map +1 -0
  52. package/dist/src/{api → packlets/database}/database.js +2 -2
  53. package/dist/src/packlets/database/database.js.map +1 -0
  54. package/dist/src/{api → packlets/database}/database.test.d.ts +0 -0
  55. package/dist/src/packlets/database/database.test.d.ts.map +1 -0
  56. package/dist/src/{api → packlets/database}/database.test.js +3 -3
  57. package/dist/src/packlets/database/database.test.js.map +1 -0
  58. package/dist/src/{api → packlets/database}/entity.d.ts +1 -1
  59. package/dist/src/packlets/database/entity.d.ts.map +1 -0
  60. package/dist/src/{api → packlets/database}/entity.js +0 -0
  61. package/dist/src/packlets/database/entity.js.map +1 -0
  62. package/dist/src/{database → packlets/database}/index.d.ts +5 -0
  63. package/dist/src/packlets/database/index.d.ts.map +1 -0
  64. package/dist/src/{database → packlets/database}/index.js +5 -0
  65. package/dist/src/packlets/database/index.js.map +1 -0
  66. package/dist/src/{database → packlets/database}/item-demuxer.d.ts +2 -1
  67. package/dist/src/packlets/database/item-demuxer.d.ts.map +1 -0
  68. package/dist/src/{database → packlets/database}/item-demuxer.js +0 -0
  69. package/dist/src/packlets/database/item-demuxer.js.map +1 -0
  70. package/dist/src/{database → packlets/database}/item-demuxer.test.d.ts +0 -0
  71. package/dist/src/packlets/database/item-demuxer.test.d.ts.map +1 -0
  72. package/dist/src/{database → packlets/database}/item-demuxer.test.js +2 -2
  73. package/dist/src/packlets/database/item-demuxer.test.js.map +1 -0
  74. package/dist/src/{database → packlets/database}/item-manager.d.ts +3 -1
  75. package/dist/src/packlets/database/item-manager.d.ts.map +1 -0
  76. package/dist/src/{database → packlets/database}/item-manager.js +11 -10
  77. package/dist/src/packlets/database/item-manager.js.map +1 -0
  78. package/dist/src/{database → packlets/database}/item-manager.test.d.ts +0 -0
  79. package/dist/src/packlets/database/item-manager.test.d.ts.map +1 -0
  80. package/dist/src/{database → packlets/database}/item-manager.test.js +0 -0
  81. package/dist/src/packlets/database/item-manager.test.js.map +1 -0
  82. package/dist/src/{api → packlets/database}/item.d.ts +1 -1
  83. package/dist/src/packlets/database/item.d.ts.map +1 -0
  84. package/dist/src/{api → packlets/database}/item.js +0 -0
  85. package/dist/src/packlets/database/item.js.map +1 -0
  86. package/dist/src/{api → packlets/database}/link.d.ts +1 -1
  87. package/dist/src/packlets/database/link.d.ts.map +1 -0
  88. package/dist/src/{api → packlets/database}/link.js +0 -0
  89. package/dist/src/packlets/database/link.js.map +1 -0
  90. package/dist/src/{api → packlets/database}/selection/index.d.ts +0 -0
  91. package/dist/src/packlets/database/selection/index.d.ts.map +1 -0
  92. package/dist/src/{api → packlets/database}/selection/index.js +0 -0
  93. package/dist/src/packlets/database/selection/index.js.map +1 -0
  94. package/dist/src/{api → packlets/database}/selection/queries.d.ts +0 -0
  95. package/dist/src/packlets/database/selection/queries.d.ts.map +1 -0
  96. package/dist/src/{api → packlets/database}/selection/queries.js +0 -0
  97. package/dist/src/packlets/database/selection/queries.js.map +1 -0
  98. package/dist/src/{api → packlets/database}/selection/result.d.ts +0 -0
  99. package/dist/src/packlets/database/selection/result.d.ts.map +1 -0
  100. package/dist/src/{api → packlets/database}/selection/result.js +0 -0
  101. package/dist/src/packlets/database/selection/result.js.map +1 -0
  102. package/dist/src/{api → packlets/database}/selection/selection.d.ts +0 -0
  103. package/dist/src/packlets/database/selection/selection.d.ts.map +1 -0
  104. package/dist/src/{api → packlets/database}/selection/selection.js +0 -0
  105. package/dist/src/packlets/database/selection/selection.js.map +1 -0
  106. package/dist/src/{api → packlets/database}/selection/selection.test.d.ts +0 -0
  107. package/dist/src/packlets/database/selection/selection.test.d.ts.map +1 -0
  108. package/dist/src/{api → packlets/database}/selection/selection.test.js +0 -0
  109. package/dist/src/packlets/database/selection/selection.test.js.map +1 -0
  110. package/dist/src/{api → packlets/database}/selection/util.d.ts +0 -0
  111. package/dist/src/packlets/database/selection/util.d.ts.map +1 -0
  112. package/dist/src/{api → packlets/database}/selection/util.js +0 -0
  113. package/dist/src/packlets/database/selection/util.js.map +1 -0
  114. package/dist/src/{database → packlets/database}/testing.d.ts +1 -1
  115. package/dist/src/packlets/database/testing.d.ts.map +1 -0
  116. package/dist/src/{database → packlets/database}/testing.js +3 -3
  117. package/dist/src/packlets/database/testing.js.map +1 -0
  118. package/dist/src/{database → packlets/database}/timeframe-clock.d.ts +0 -0
  119. package/dist/src/packlets/database/timeframe-clock.d.ts.map +1 -0
  120. package/dist/src/{database → packlets/database}/timeframe-clock.js +0 -0
  121. package/dist/src/packlets/database/timeframe-clock.js.map +1 -0
  122. package/dist/src/{errors.d.ts → packlets/errors/index.d.ts} +1 -1
  123. package/dist/src/packlets/errors/index.d.ts.map +1 -0
  124. package/dist/src/{errors.js → packlets/errors/index.js} +1 -1
  125. package/dist/src/packlets/errors/index.js.map +1 -0
  126. package/dist/src/parties/data-party.d.ts +3 -2
  127. package/dist/src/parties/data-party.d.ts.map +1 -1
  128. package/dist/src/parties/data-party.js.map +1 -1
  129. package/dist/src/parties/party-factory.d.ts.map +1 -1
  130. package/dist/src/parties/party-factory.js +3 -3
  131. package/dist/src/parties/party-factory.js.map +1 -1
  132. package/dist/src/parties/party-manager.test.js +6 -3
  133. package/dist/src/parties/party-manager.test.js.map +1 -1
  134. package/dist/src/pipeline/message-selector.d.ts +1 -1
  135. package/dist/src/pipeline/message-selector.d.ts.map +1 -1
  136. package/dist/src/pipeline/message-selector.js +6 -5
  137. package/dist/src/pipeline/message-selector.js.map +1 -1
  138. package/dist/src/pipeline/metadata-store.js +1 -1
  139. package/dist/src/pipeline/metadata-store.js.map +1 -1
  140. package/dist/src/pipeline/party-core.d.ts +1 -1
  141. package/dist/src/pipeline/party-core.d.ts.map +1 -1
  142. package/dist/src/pipeline/party-core.js +2 -3
  143. package/dist/src/pipeline/party-core.js.map +1 -1
  144. package/dist/src/pipeline/party-core.test.js +13 -12
  145. package/dist/src/pipeline/party-core.test.js.map +1 -1
  146. package/dist/src/pipeline/pipeline.d.ts +1 -1
  147. package/dist/src/pipeline/pipeline.d.ts.map +1 -1
  148. package/dist/src/pipeline/pipeline.js +8 -8
  149. package/dist/src/pipeline/pipeline.js.map +1 -1
  150. package/dist/src/pipeline/pipeline.test.js +2 -3
  151. package/dist/src/pipeline/pipeline.test.js.map +1 -1
  152. package/dist/src/snapshots/snapshot-generator.d.ts +1 -1
  153. package/dist/src/snapshots/snapshot-generator.d.ts.map +1 -1
  154. package/dist/src/snapshots/snapshot-store.js +1 -1
  155. package/dist/src/snapshots/snapshot-store.js.map +1 -1
  156. package/dist/src/snapshots/snapshot.test.js +1 -1
  157. package/dist/src/snapshots/snapshot.test.js.map +1 -1
  158. package/dist/src/testing/testing-factories.d.ts +1 -1
  159. package/dist/src/testing/testing-factories.d.ts.map +1 -1
  160. package/dist/tsconfig.tsbuildinfo +1 -1
  161. package/package.json +18 -18
  162. package/src/api/index.ts +0 -5
  163. package/src/api/schema.test.ts +1 -2
  164. package/src/echo.test.ts +16 -1
  165. package/src/echo.ts +2 -2
  166. package/src/halo/contact-manager.ts +3 -2
  167. package/src/halo/preferences.ts +3 -2
  168. package/src/index.ts +3 -2
  169. package/src/invitations/halo-recovery-initiator.ts +1 -1
  170. package/src/invitations/invitation-descriptor.ts +1 -1
  171. package/src/invitations/offline-invitation-claimer.ts +1 -1
  172. package/src/{database → packlets/database}/data-mirror.test.ts +1 -1
  173. package/src/{database → packlets/database}/data-mirror.ts +1 -1
  174. package/src/{database → packlets/database}/data-service-host.ts +2 -1
  175. package/src/{database → packlets/database}/data-service-router.ts +0 -0
  176. package/src/{database → packlets/database}/database-backend.ts +0 -0
  177. package/src/{api → packlets/database}/database.test.ts +2 -1
  178. package/src/{api → packlets/database}/database.ts +3 -1
  179. package/src/{api → packlets/database}/entity.ts +1 -1
  180. package/src/{database → packlets/database}/index.ts +5 -0
  181. package/src/{database → packlets/database}/item-demuxer.test.ts +1 -1
  182. package/src/{database → packlets/database}/item-demuxer.ts +3 -1
  183. package/src/{database → packlets/database}/item-manager.test.ts +0 -0
  184. package/src/{database → packlets/database}/item-manager.ts +3 -1
  185. package/src/{api → packlets/database}/item.ts +2 -2
  186. package/src/{api → packlets/database}/link.ts +1 -1
  187. package/src/{api → packlets/database}/selection/index.ts +0 -0
  188. package/src/{api → packlets/database}/selection/queries.ts +0 -0
  189. package/src/{api → packlets/database}/selection/result.ts +0 -0
  190. package/src/{api → packlets/database}/selection/selection.test.ts +0 -0
  191. package/src/{api → packlets/database}/selection/selection.ts +0 -0
  192. package/src/{api → packlets/database}/selection/util.ts +0 -0
  193. package/src/{database → packlets/database}/testing.ts +1 -1
  194. package/src/{database → packlets/database}/timeframe-clock.ts +0 -0
  195. package/src/{errors.ts → packlets/errors/index.ts} +0 -0
  196. package/src/parties/data-party.ts +2 -1
  197. package/src/parties/party-factory.ts +3 -3
  198. package/src/parties/party-manager.test.ts +12 -5
  199. package/src/pipeline/message-selector.ts +7 -6
  200. package/src/pipeline/metadata-store.ts +1 -1
  201. package/src/pipeline/party-core.test.ts +14 -13
  202. package/src/pipeline/party-core.ts +1 -2
  203. package/src/pipeline/pipeline.test.ts +2 -3
  204. package/src/pipeline/pipeline.ts +10 -9
  205. package/src/snapshots/snapshot-generator.ts +1 -1
  206. package/src/snapshots/snapshot-store.ts +1 -1
  207. package/src/snapshots/snapshot.test.ts +1 -1
  208. package/src/testing/testing-factories.ts +1 -1
  209. package/dist/src/api/database.d.ts.map +0 -1
  210. package/dist/src/api/database.js.map +0 -1
  211. package/dist/src/api/database.test.d.ts.map +0 -1
  212. package/dist/src/api/database.test.js.map +0 -1
  213. package/dist/src/api/entity.d.ts.map +0 -1
  214. package/dist/src/api/entity.js.map +0 -1
  215. package/dist/src/api/item.d.ts.map +0 -1
  216. package/dist/src/api/item.js.map +0 -1
  217. package/dist/src/api/link.d.ts.map +0 -1
  218. package/dist/src/api/link.js.map +0 -1
  219. package/dist/src/api/selection/index.d.ts.map +0 -1
  220. package/dist/src/api/selection/index.js.map +0 -1
  221. package/dist/src/api/selection/queries.d.ts.map +0 -1
  222. package/dist/src/api/selection/queries.js.map +0 -1
  223. package/dist/src/api/selection/result.d.ts.map +0 -1
  224. package/dist/src/api/selection/result.js.map +0 -1
  225. package/dist/src/api/selection/selection.d.ts.map +0 -1
  226. package/dist/src/api/selection/selection.js.map +0 -1
  227. package/dist/src/api/selection/selection.test.d.ts.map +0 -1
  228. package/dist/src/api/selection/selection.test.js.map +0 -1
  229. package/dist/src/api/selection/util.d.ts.map +0 -1
  230. package/dist/src/api/selection/util.js.map +0 -1
  231. package/dist/src/database/data-mirror.d.ts.map +0 -1
  232. package/dist/src/database/data-mirror.js.map +0 -1
  233. package/dist/src/database/data-mirror.test.d.ts.map +0 -1
  234. package/dist/src/database/data-mirror.test.js.map +0 -1
  235. package/dist/src/database/data-service-host.d.ts.map +0 -1
  236. package/dist/src/database/data-service-host.js.map +0 -1
  237. package/dist/src/database/data-service-router.d.ts.map +0 -1
  238. package/dist/src/database/data-service-router.js.map +0 -1
  239. package/dist/src/database/database-backend.d.ts.map +0 -1
  240. package/dist/src/database/database-backend.js.map +0 -1
  241. package/dist/src/database/index.d.ts.map +0 -1
  242. package/dist/src/database/index.js.map +0 -1
  243. package/dist/src/database/item-demuxer.d.ts.map +0 -1
  244. package/dist/src/database/item-demuxer.js.map +0 -1
  245. package/dist/src/database/item-demuxer.test.d.ts.map +0 -1
  246. package/dist/src/database/item-demuxer.test.js.map +0 -1
  247. package/dist/src/database/item-manager.d.ts.map +0 -1
  248. package/dist/src/database/item-manager.js.map +0 -1
  249. package/dist/src/database/item-manager.test.d.ts.map +0 -1
  250. package/dist/src/database/item-manager.test.js.map +0 -1
  251. package/dist/src/database/testing.d.ts.map +0 -1
  252. package/dist/src/database/testing.js.map +0 -1
  253. package/dist/src/database/timeframe-clock.d.ts.map +0 -1
  254. package/dist/src/database/timeframe-clock.js.map +0 -1
  255. package/dist/src/errors.d.ts.map +0 -1
  256. package/dist/src/errors.js.map +0 -1
package/src/echo.ts CHANGED
@@ -19,11 +19,11 @@ import { Storage, createStorage, StorageType } from '@dxos/random-access-multi-s
19
19
  import { SubscriptionGroup } from '@dxos/util';
20
20
 
21
21
  import { ResultSet } from './api';
22
- import { DataServiceRouter } from './database';
23
- import { IdentityNotInitializedError, InvalidStorageVersionError } from './errors';
24
22
  import { HALO } from './halo';
25
23
  import { autoPartyOpener } from './halo/party-opener';
26
24
  import { InvitationDescriptor, OfflineInvitationClaimer } from './invitations';
25
+ import { DataServiceRouter } from './packlets/database';
26
+ import { IdentityNotInitializedError, InvalidStorageVersionError } from './packlets/errors';
27
27
  import { OpenProgress, PartyFactory, DataParty, PartyManager } from './parties';
28
28
  import { MetadataStore, STORAGE_VERSION, PartyFeedProvider } from './pipeline';
29
29
  import { SnapshotStore } from './snapshots';
@@ -7,8 +7,9 @@ import { PublicKey } from '@dxos/crypto';
7
7
  import { raise } from '@dxos/debug';
8
8
  import { ObjectModel } from '@dxos/object-model';
9
9
 
10
- import { Database, Item, ResultSet } from '../api';
11
- import { IdentityNotInitializedError } from '../errors';
10
+ import { ResultSet } from '../api';
11
+ import { Database, Item } from '../packlets/database';
12
+ import { IdentityNotInitializedError } from '../packlets/errors';
12
13
  import { PartyMember } from '../parties';
13
14
  import { HALO_PARTY_CONTACT_LIST_TYPE } from './halo-party';
14
15
 
@@ -12,8 +12,9 @@ import { PublicKey } from '@dxos/crypto';
12
12
  import { raise } from '@dxos/debug';
13
13
  import { ObjectModel } from '@dxos/object-model';
14
14
 
15
- import { Database, Item, ResultSet } from '../api';
16
- import { IdentityNotInitializedError } from '../errors';
15
+ import { ResultSet } from '../api';
16
+ import { Database, Item } from '../packlets/database';
17
+ import { IdentityNotInitializedError } from '../packlets/errors';
17
18
  import { DataParty } from '../parties';
18
19
  import {
19
20
  HALO_PARTY_DESCRIPTOR_TYPE, HALO_PARTY_DEVICE_PREFERENCES_TYPE, HALO_PARTY_PREFERENCES_TYPE, JoinedParty
package/src/index.ts CHANGED
@@ -4,10 +4,11 @@
4
4
 
5
5
  export { codec } from '@dxos/echo-protocol';
6
6
 
7
+ export * from './packlets/database';
8
+ export * from './packlets/errors';
9
+
7
10
  export * from './api';
8
- export * from './database';
9
11
  export * from './echo';
10
- export * from './errors';
11
12
  export * from './halo';
12
13
  export * from './invitations';
13
14
  export * from './protocol';
@@ -22,7 +22,7 @@ import {
22
22
  import { keyToBuffer, keyToString, PublicKey, randomBytes, verify } from '@dxos/crypto';
23
23
  import { FullyConnectedTopology, NetworkManager } from '@dxos/network-manager';
24
24
 
25
- import { InvalidInvitationError } from '../errors';
25
+ import { InvalidInvitationError } from '../packlets/errors';
26
26
  import { CredentialsSigner } from '../protocol/credentials-signer';
27
27
  import { greetingProtocolProvider } from './greeting-protocol-provider';
28
28
  import { GreetingState } from './greeting-responder';
@@ -10,7 +10,7 @@ import { keyToBuffer, keyToString, ripemd160, PublicKey } from '@dxos/crypto';
10
10
  import { SwarmKey } from '@dxos/echo-protocol';
11
11
  import * as proto from '@dxos/echo-protocol';
12
12
 
13
- import { InvalidInvitationError } from '../errors';
13
+ import { InvalidInvitationError } from '../packlets/errors';
14
14
 
15
15
  // Re-exporting type enum from protobuf definitions.
16
16
  export import InvitationDescriptorType = proto.InvitationDescriptor.Type;
@@ -23,7 +23,7 @@ import {
23
23
  import { keyToBuffer, keyToString, PublicKey, randomBytes } from '@dxos/crypto';
24
24
  import { FullyConnectedTopology, NetworkManager } from '@dxos/network-manager';
25
25
 
26
- import { InvalidInvitationError } from '../errors';
26
+ import { InvalidInvitationError } from '../packlets/errors';
27
27
  import { CredentialsSigner } from '../protocol';
28
28
  import { greetingProtocolProvider } from './greeting-protocol-provider';
29
29
  import { GreetingState } from './greeting-responder';
@@ -11,10 +11,10 @@ import { EchoEnvelope, MockFeedWriter, Timeframe } from '@dxos/echo-protocol';
11
11
  import { ModelFactory } from '@dxos/model-factory';
12
12
  import { ObjectModel } from '@dxos/object-model';
13
13
 
14
- import { Item } from '../api';
15
14
  import { DataMirror } from './data-mirror';
16
15
  import { DataServiceHost } from './data-service-host';
17
16
  import { DataServiceRouter } from './data-service-router';
17
+ import { Item } from './item';
18
18
  import { ItemDemuxer } from './item-demuxer';
19
19
  import { ItemManager } from './item-manager';
20
20
 
@@ -10,7 +10,7 @@ import { failUndefined } from '@dxos/debug';
10
10
  import { DataService } from '@dxos/echo-protocol';
11
11
  import { Model } from '@dxos/model-factory';
12
12
 
13
- import { Entity } from '../api';
13
+ import { Entity } from './entity';
14
14
  import { ItemManager } from './item-manager';
15
15
 
16
16
  const log = debug('dxos:echo-db:data-mirror');
@@ -18,10 +18,11 @@ import {
18
18
  SubscribeEntityStreamResponse
19
19
  } from '@dxos/echo-protocol';
20
20
 
21
- import { Item, Link } from '../api';
22
21
  import { EntityNotFoundError } from '../errors';
22
+ import { Item } from './item';
23
23
  import { ItemDemuxer } from './item-demuxer';
24
24
  import { ItemManager } from './item-manager';
25
+ import { Link } from './link';
25
26
 
26
27
  const log = debug('dxos:echo-db:data-service-host');
27
28
 
@@ -10,9 +10,10 @@ import { ModelFactory, TestListModel } from '@dxos/model-factory';
10
10
  import { ObjectModel } from '@dxos/object-model';
11
11
  import { afterTest } from '@dxos/testutils';
12
12
 
13
- import { createInMemoryDatabase, createRemoteDatabaseFromDataServiceHost, DataServiceHost } from '../database';
13
+ import { DataServiceHost } from './data-service-host';
14
14
  import { Item } from './item';
15
15
  import { ItemFilterDeleted } from './selection';
16
+ import { createInMemoryDatabase, createRemoteDatabaseFromDataServiceHost } from './testing';
16
17
 
17
18
  const OBJECT_ORG = 'example:object/org';
18
19
  const OBJECT_PERSON = 'example:object/person';
@@ -10,9 +10,11 @@ import { ItemID, ItemType } from '@dxos/echo-protocol';
10
10
  import { Model, ModelConstructor, ModelFactory, validateModelClass } from '@dxos/model-factory';
11
11
  import { ObjectModel } from '@dxos/object-model';
12
12
 
13
- import { DatabaseBackend, DataServiceHost, ItemManager } from '../database';
13
+ import { DataServiceHost } from './data-service-host';
14
+ import { DatabaseBackend } from './database-backend';
14
15
  import { Entity } from './entity';
15
16
  import { Item } from './item';
17
+ import { ItemManager } from './item-manager';
16
18
  import { Link } from './link';
17
19
  import { RootFilter, Selection, createSelection } from './selection';
18
20
 
@@ -7,7 +7,7 @@ import { ItemID, ItemType } from '@dxos/echo-protocol';
7
7
  import { Model, ModelMeta, StateManager } from '@dxos/model-factory';
8
8
  import { SubscriptionGroup } from '@dxos/util';
9
9
 
10
- import { ItemManager } from '../database';
10
+ import { ItemManager } from './item-manager';
11
11
 
12
12
  /**
13
13
  * Base class for all ECHO entitities.
@@ -10,3 +10,8 @@ export * from './item-demuxer';
10
10
  export * from './item-manager';
11
11
  export * from './testing';
12
12
  export * from './timeframe-clock';
13
+ export * from './item';
14
+ export * from './link';
15
+ export * from './entity';
16
+ export * from './selection';
17
+ export * from './database';
@@ -14,7 +14,7 @@ import { createTransform } from '@dxos/feed-store';
14
14
  import { ModelFactory, TestModel } from '@dxos/model-factory';
15
15
  import { ObjectModel } from '@dxos/object-model';
16
16
 
17
- import { Item } from '../api';
17
+ import { Item } from './item';
18
18
  import { ItemDemuxer } from './item-demuxer';
19
19
  import { ItemManager } from './item-manager';
20
20
 
@@ -11,8 +11,10 @@ import { DatabaseSnapshot, IEchoStream, ItemID, ItemSnapshot, LinkSnapshot } fro
11
11
  import { createWritable } from '@dxos/feed-store';
12
12
  import { Model, ModelFactory, ModelMessage } from '@dxos/model-factory';
13
13
 
14
- import { Entity, Item, Link } from '../api';
14
+ import { Entity } from './entity';
15
+ import { Item } from './item';
15
16
  import { ItemManager, ModelConstructionOptions } from './item-manager';
17
+ import { Link } from './link';
16
18
 
17
19
  const log = debug('dxos:echo-db:item-demuxer');
18
20
 
@@ -11,8 +11,10 @@ import { timed } from '@dxos/debug';
11
11
  import { EchoEnvelope, FeedWriter, ItemID, ItemType, mapFeedWriter, ModelSnapshot } from '@dxos/echo-protocol';
12
12
  import { Model, ModelFactory, ModelMessage, ModelType, StateManager } from '@dxos/model-factory';
13
13
 
14
- import { Entity, Item, Link } from '../api';
15
14
  import { UnknownModelError } from '../errors';
15
+ import { Entity } from './entity';
16
+ import { Item } from './item';
17
+ import { Link } from './link';
16
18
 
17
19
  const log = debug('dxos:echo-db:item-manager');
18
20
 
@@ -7,10 +7,10 @@ import debug from 'debug';
7
7
  import { EchoEnvelope, ItemID, ItemMutation, ItemType, FeedWriter } from '@dxos/echo-protocol';
8
8
  import { Model, StateManager } from '@dxos/model-factory';
9
9
 
10
- import { ItemManager } from '../database';
11
10
  import { Entity } from './entity';
11
+ import { ItemManager } from './item-manager';
12
12
  import type { Link } from './link';
13
- import { Selection, createItemSelection } from './selection';
13
+ import { createItemSelection, Selection } from './selection';
14
14
 
15
15
  const log = debug('dxos:echo-db:item');
16
16
 
@@ -7,9 +7,9 @@ import assert from 'assert';
7
7
  import { ItemID, ItemType } from '@dxos/echo-protocol';
8
8
  import { Model, StateManager } from '@dxos/model-factory';
9
9
 
10
- import { ItemManager } from '../database';
11
10
  import { Entity } from './entity';
12
11
  import { Item } from './item';
12
+ import { ItemManager } from './item-manager';
13
13
 
14
14
  export interface LinkData {
15
15
  sourceId: ItemID
File without changes
@@ -8,9 +8,9 @@ import { PublicKey } from '@dxos/crypto';
8
8
  import { EchoEnvelope, MockFeedWriter, Timeframe } from '@dxos/echo-protocol';
9
9
  import { ModelFactory } from '@dxos/model-factory';
10
10
 
11
- import { Database } from '../api';
12
11
  import { DataServiceHost } from './data-service-host';
13
12
  import { DataServiceRouter } from './data-service-router';
13
+ import { Database } from './database';
14
14
  import { FeedDatabaseBackend, RemoteDatabaseBackend } from './database-backend';
15
15
 
16
16
  export const createInMemoryDatabase = async (modelFactory: ModelFactory) => {
File without changes
@@ -14,9 +14,10 @@ import { ModelFactory } from '@dxos/model-factory';
14
14
  import { NetworkManager } from '@dxos/network-manager';
15
15
  import { ObjectModel } from '@dxos/object-model';
16
16
 
17
- import { Database, Item, ResultSet } from '../api';
17
+ import { ResultSet } from '../api';
18
18
  import { ActivationOptions, PartyPreferences, Preferences } from '../halo';
19
19
  import { InvitationFactory } from '../invitations';
20
+ import { Database, Item } from '../packlets/database';
20
21
  import { PartyFeedProvider, PartyProtocolFactory, PartyCore, PartyOptions } from '../pipeline';
21
22
  import { createAuthPlugin, createOfflineInvitationPlugin, createAuthenticator, createCredentialsProvider } from '../protocol';
22
23
  import { CredentialsSigner } from '../protocol/credentials-signer';
@@ -21,11 +21,11 @@ import { ModelFactory } from '@dxos/model-factory';
21
21
  import { NetworkManager } from '@dxos/network-manager';
22
22
  import { ObjectModel } from '@dxos/object-model';
23
23
 
24
- import { IdentityNotInitializedError } from '../errors';
25
24
  import {
26
25
  createDataPartyAdmissionMessages,
27
26
  GreetingInitiator, InvitationDescriptor, InvitationDescriptorType, OfflineInvitationClaimer
28
27
  } from '../invitations';
28
+ import { IdentityNotInitializedError } from '../packlets/errors';
29
29
  import { PartyFeedProvider, PartyOptions } from '../pipeline';
30
30
  import { IdentityCredentialsProvider } from '../protocol/identity-credentials';
31
31
  import { SnapshotStore } from '../snapshots';
@@ -254,6 +254,7 @@ export class PartyFactory {
254
254
  const feedWriter = createFeedWriter(writableFeed.feed);
255
255
  for (const item of snapshot.database?.items || []) {
256
256
  const message: FeedMessage = {
257
+ timeframe: new Timeframe(),
257
258
  echo: {
258
259
  itemId: item.itemId ?? failUndefined(),
259
260
  genesis: {
@@ -264,8 +265,7 @@ export class PartyFactory {
264
265
  itemMutation: {
265
266
  parentId: item.parentId
266
267
  },
267
- snapshot: item.model,
268
- timeframe: new Timeframe()
268
+ snapshot: item.model
269
269
  }
270
270
  };
271
271
  await feedWriter.write(message);
@@ -32,8 +32,8 @@ import { ObjectModel } from '@dxos/object-model';
32
32
  import { createStorage, StorageType } from '@dxos/random-access-multi-storage';
33
33
  import { afterTest, testTimeout } from '@dxos/testutils';
34
34
 
35
- import { Item } from '../api';
36
35
  import { defaultInvitationAuthenticator, OfflineInvitationClaimer } from '../invitations';
36
+ import { Item } from '../packlets/database';
37
37
  import { MetadataStore, PartyFeedProvider } from '../pipeline';
38
38
  import { createTestIdentityCredentials } from '../protocol/identity-credentials';
39
39
  import { SnapshotStore } from '../snapshots';
@@ -149,7 +149,6 @@ describe('Party manager', () => {
149
149
  });
150
150
 
151
151
  test('Create from cold start', async () => {
152
-
153
152
  const storage = createStorage('', StorageType.RAM);
154
153
  const feedStore = new FeedStore(storage.directory('feed'), { valueEncoding: codec });
155
154
  const keyring = new Keyring();
@@ -191,15 +190,23 @@ describe('Party manager', () => {
191
190
  assert(feedKey);
192
191
 
193
192
  const feedStream = createWritableFeedStream(feed);
194
- feedStream.write({ halo: createPartyGenesisMessage(keyring, partyKey, feedKey.publicKey, identity.identityKey) });
195
193
  feedStream.write({
194
+ timeframe: new Timeframe(),
195
+ halo: createPartyGenesisMessage(
196
+ keyring,
197
+ partyKey,
198
+ feedKey.publicKey,
199
+ identity.identityKey
200
+ )
201
+ });
202
+ feedStream.write({
203
+ timeframe: new Timeframe(),
196
204
  echo: checkType<EchoEnvelope>({
197
205
  itemId: 'foo',
198
206
  genesis: {
199
207
  itemType: PARTY_ITEM_TYPE,
200
208
  modelType: ObjectModel.meta.type
201
- },
202
- timeframe: new Timeframe()
209
+ }
203
210
  })
204
211
  });
205
212
  }
@@ -9,7 +9,7 @@ import { getPartyCredentialMessageType, PartyCredential } from '@dxos/credential
9
9
  import { PublicKey } from '@dxos/crypto';
10
10
  import { MessageSelector } from '@dxos/echo-protocol';
11
11
 
12
- import { TimeframeClock } from '../database';
12
+ import { TimeframeClock } from '../packlets/database';
13
13
  import { PartyStateProvider } from './party-processor';
14
14
 
15
15
  const log = debug('dxos:echo-db:message-selector');
@@ -26,27 +26,28 @@ const log = debug('dxos:echo-db:message-selector');
26
26
  export const createMessageSelector = (partyProcessor: PartyStateProvider, timeframeClock: TimeframeClock): MessageSelector => candidates => {
27
27
  // Check ECHO message candidates first since they are less expensive than HALO cancidates.
28
28
  for (let i = 0; i < candidates.length; i++) {
29
- const { data: { echo } } = candidates[i];
29
+ const { data: { timeframe, echo } } = candidates[i];
30
30
  const feedKey = PublicKey.from(candidates[i].key);
31
31
  if (!echo) {
32
32
  continue;
33
33
  }
34
34
 
35
- assert(echo.timeframe);
36
- if (partyProcessor.isFeedAdmitted(feedKey) && !timeframeClock.hasGaps(echo.timeframe)) {
35
+ assert(timeframe);
36
+ if (partyProcessor.isFeedAdmitted(feedKey) && !timeframeClock.hasGaps(timeframe)) {
37
37
  return i;
38
38
  }
39
39
  }
40
40
 
41
41
  // Check HALO message candidates.
42
42
  for (let i = 0; i < candidates.length; i++) {
43
- const { data: { halo } } = candidates[i];
43
+ const { data: { timeframe, halo } } = candidates[i];
44
44
  const feedKey = PublicKey.from(candidates[i].key);
45
45
  if (!halo) {
46
46
  continue;
47
47
  }
48
48
 
49
- if (partyProcessor.isFeedAdmitted(feedKey)) {
49
+ assert(timeframe);
50
+ if (partyProcessor.isFeedAdmitted(feedKey) && !timeframeClock.hasGaps(timeframe)) {
50
51
  return i;
51
52
  }
52
53
 
@@ -90,7 +90,7 @@ export class MetadataStore {
90
90
  */
91
91
  async clear (): Promise<void> {
92
92
  log('Clearing all echo metadata...');
93
- await this._directory.destroy();
93
+ await this._directory.delete();
94
94
  }
95
95
 
96
96
  /**
@@ -8,7 +8,8 @@ import { it as test } from 'mocha';
8
8
  import { promiseTimeout } from '@dxos/async';
9
9
  import { createFeedAdmitMessage, createPartyGenesisMessage, Keyring, KeyType } from '@dxos/credentials';
10
10
  import { createId, PublicKey } from '@dxos/crypto';
11
- import { codec, Timeframe } from '@dxos/echo-protocol';
11
+ import { checkType } from '@dxos/debug';
12
+ import { codec, FeedMessage, Timeframe } from '@dxos/echo-protocol';
12
13
  import { FeedStore } from '@dxos/feed-store';
13
14
  import { createTestProtocolPair } from '@dxos/mesh-protocol';
14
15
  import { ModelFactory } from '@dxos/model-factory';
@@ -175,16 +176,16 @@ describe('PartyCore', () => {
175
176
  const feed = await partyFeedProvider.createOrOpenWritableFeed();
176
177
 
177
178
  const itemId = createId();
178
- await feed.feed.append({
179
+ await feed.feed.append(checkType<FeedMessage>({
180
+ timeframe: new Timeframe(),
179
181
  echo: {
180
182
  itemId,
181
183
  genesis: {
182
184
  itemType: 'dxos:example',
183
185
  modelType: ObjectModel.meta.type
184
- },
185
- timeframe: new Timeframe()
186
+ }
186
187
  }
187
- });
188
+ }));
188
189
 
189
190
  await promiseTimeout(party.database.waitForItem({ id: itemId }), 1000, new Error('timeout'));
190
191
  });
@@ -205,16 +206,16 @@ describe('PartyCore', () => {
205
206
  ));
206
207
 
207
208
  const itemId = createId();
208
- await feed2.append({
209
+ await feed2.append(checkType<FeedMessage>({
210
+ timeframe: new Timeframe(),
209
211
  echo: {
210
212
  itemId,
211
213
  genesis: {
212
214
  itemType: 'dxos:example',
213
215
  modelType: ObjectModel.meta.type
214
- },
215
- timeframe: new Timeframe()
216
+ }
216
217
  }
217
- });
218
+ }));
218
219
 
219
220
  await promiseTimeout(party.database.waitForItem({ id: itemId }), 1000, new Error('timeout'));
220
221
  });
@@ -235,16 +236,16 @@ describe('PartyCore', () => {
235
236
 
236
237
  const feed2 = await feedStore.openReadWriteFeed(fullKey!.publicKey, fullKey!.secretKey!);
237
238
  const itemId = createId();
238
- await feed2.append({
239
+ await feed2.append(checkType<FeedMessage>({
240
+ timeframe: new Timeframe(),
239
241
  echo: {
240
242
  itemId,
241
243
  genesis: {
242
244
  itemType: 'dxos:example',
243
245
  modelType: ObjectModel.meta.type
244
- },
245
- timeframe: new Timeframe()
246
+ }
246
247
  }
247
- });
248
+ }));
248
249
 
249
250
  await promiseTimeout(party.database.waitForItem({ id: itemId }), 1000, new Error('timeout'));
250
251
  });
@@ -12,8 +12,7 @@ import { createFeedWriter, DatabaseSnapshot, FeedWriter, PartyKey, PartySnapshot
12
12
  import { ModelFactory } from '@dxos/model-factory';
13
13
  import { SubscriptionGroup } from '@dxos/util';
14
14
 
15
- import { Database } from '../api';
16
- import { FeedDatabaseBackend, TimeframeClock } from '../database';
15
+ import { Database, FeedDatabaseBackend, TimeframeClock } from '../packlets/database';
17
16
  import { createMessageSelector, PartyProcessor, PartyFeedProvider, Pipeline } from '../pipeline';
18
17
  import { createAutomaticSnapshots, SnapshotStore } from '../snapshots';
19
18
 
@@ -15,7 +15,7 @@ import { createSetPropertyMutation } from '@dxos/model-factory';
15
15
  import { createStorage, StorageType } from '@dxos/random-access-multi-storage';
16
16
  import { jsonReplacer } from '@dxos/util';
17
17
 
18
- import { TimeframeClock } from '../database';
18
+ import { TimeframeClock } from '../packlets/database';
19
19
  import { PartyProcessor } from './party-processor';
20
20
  import { Pipeline } from './pipeline';
21
21
 
@@ -133,8 +133,7 @@ describe('pipeline', () => {
133
133
  itemId: '123',
134
134
  genesis: {
135
135
  itemType: 'foo'
136
- },
137
- timeframe: expect.any(Timeframe)
136
+ }
138
137
  });
139
138
  });
140
139
  });
@@ -16,7 +16,7 @@ import {
16
16
  import { createReadable } from '@dxos/feed-store';
17
17
  import { jsonReplacer } from '@dxos/util';
18
18
 
19
- import { TimeframeClock } from '../database';
19
+ import { TimeframeClock } from '../packlets/database';
20
20
  import { CredentialProcessor, PartyStateProvider } from './party-processor';
21
21
 
22
22
  interface Options {
@@ -109,6 +109,8 @@ export class Pipeline {
109
109
  try {
110
110
  const { data: message } = block;
111
111
 
112
+ this._timeframeClock.updateTimeframe(PublicKey.from(block.key), block.seq);
113
+
112
114
  //
113
115
  // HALO
114
116
  //
@@ -125,7 +127,6 @@ export class Pipeline {
125
127
  //
126
128
 
127
129
  if (message.echo) {
128
- this._timeframeClock.updateTimeframe(PublicKey.from(block.key), block.seq);
129
130
  const memberKey = this._partyProcessor.getFeedOwningMember(PublicKey.from(block.key));
130
131
  assert(memberKey, `Ownership of feed ${keyToString(block.key)} could not be determined.`);
131
132
 
@@ -138,7 +139,7 @@ export class Pipeline {
138
139
  seq: block.seq,
139
140
  feedKey: block.key,
140
141
  memberKey,
141
- timeframe: message.echo.timeframe ?? new Timeframe()
142
+ timeframe: message.timeframe ?? new Timeframe()
142
143
  },
143
144
  data: message.echo
144
145
  }));
@@ -167,13 +168,13 @@ export class Pipeline {
167
168
  }, this._feedWriter);
168
169
 
169
170
  this._outboundEchoStream = mapFeedWriter<EchoEnvelope, FeedMessage>(async message => ({
170
- echo: {
171
- ...message,
172
- timeframe: this._timeframeClock.timeframe
173
- }
171
+ timeframe: this._timeframeClock.timeframe,
172
+ echo: message
173
+ }), loggingWriter);
174
+ this._outboundHaloStream = mapFeedWriter<HaloMessage, FeedMessage>(async message => ({
175
+ timeframe: this._timeframeClock.timeframe,
176
+ halo: message
174
177
  }), loggingWriter);
175
- this._outboundHaloStream =
176
- mapFeedWriter<HaloMessage, FeedMessage>(async message => ({ halo: message }), loggingWriter);
177
178
  }
178
179
 
179
180
  return [
@@ -4,7 +4,7 @@
4
4
 
5
5
  import debug from 'debug';
6
6
 
7
- import { TimeframeClock } from '../database';
7
+ import { TimeframeClock } from '../packlets/database';
8
8
  import { PartyCore } from '../pipeline';
9
9
  import { SnapshotStore } from './snapshot-store';
10
10
 
@@ -59,6 +59,6 @@ export class SnapshotStore {
59
59
  */
60
60
  async clear () {
61
61
  log('Clearing all snapshots..');
62
- await this._directory.destroy();
62
+ await this._directory.delete();
63
63
  }
64
64
  }
@@ -12,7 +12,7 @@ import { schema, ItemID, MockFeedWriter, PartyKey } from '@dxos/echo-protocol';
12
12
  import { ModelFactory } from '@dxos/model-factory';
13
13
  import { ObjectModel, ValueUtil } from '@dxos/object-model';
14
14
 
15
- import { ItemDemuxer, ItemManager } from '../database';
15
+ import { ItemDemuxer, ItemManager } from '../packlets/database';
16
16
  import { createTestInstance } from '../testing';
17
17
 
18
18
  const log = debug('dxos:snapshot:test');
@@ -8,8 +8,8 @@ import { Model } from '@dxos/model-factory';
8
8
  import { ObjectModel } from '@dxos/object-model';
9
9
  import { range } from '@dxos/util';
10
10
 
11
- import { Item, CreateItemOption } from '../api';
12
11
  import { ECHO } from '../echo';
12
+ import { CreateItemOption, Item } from '../packlets/database';
13
13
  import { DataParty } from '../parties';
14
14
  import { createTestInstance, inviteTestPeer } from './testing';
15
15
 
@@ -1 +0,0 @@
1
- {"version":3,"file":"database.d.ts","sourceRoot":"","sources":["../../../src/api/database.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,KAAK,EAAgB,MAAM,aAAa,CAAC;AAClD,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,EAAE,KAAK,EAAE,gBAAgB,EAAE,YAAY,EAAsB,MAAM,qBAAqB,CAAC;AAGhG,OAAO,EAAE,eAAe,EAAE,eAAe,EAAe,MAAM,aAAa,CAAC;AAC5E,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9B,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9B,OAAO,EAAE,UAAU,EAAE,SAAS,EAAmB,MAAM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