@dxos/echo-db 2.33.9-dev.2637427f → 2.33.9-dev.37a7739a

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 (91) hide show
  1. package/dist/src/api/index.d.ts +1 -0
  2. package/dist/src/api/index.d.ts.map +1 -1
  3. package/dist/src/api/index.js +1 -0
  4. package/dist/src/api/index.js.map +1 -1
  5. package/dist/src/api/subscription.d.ts +5 -0
  6. package/dist/src/api/subscription.d.ts.map +1 -0
  7. package/dist/src/api/subscription.js +25 -0
  8. package/dist/src/api/subscription.js.map +1 -0
  9. package/dist/src/echo-api.test.d.ts +2 -0
  10. package/dist/src/echo-api.test.d.ts.map +1 -0
  11. package/dist/src/echo-api.test.js +117 -0
  12. package/dist/src/echo-api.test.js.map +1 -0
  13. package/dist/src/echo.d.ts +3 -4
  14. package/dist/src/echo.d.ts.map +1 -1
  15. package/dist/src/echo.js +4 -6
  16. package/dist/src/echo.js.map +1 -1
  17. package/dist/src/echo.test.js.map +1 -1
  18. package/dist/src/halo/halo-party.d.ts +2 -2
  19. package/dist/src/halo/halo-party.d.ts.map +1 -1
  20. package/dist/src/halo/halo.test.js.map +1 -1
  21. package/dist/src/halo/identity-manager.d.ts.map +1 -1
  22. package/dist/src/halo/identity-manager.js +1 -4
  23. package/dist/src/halo/identity-manager.js.map +1 -1
  24. package/dist/src/halo/identity.d.ts +1 -1
  25. package/dist/src/halo/identity.d.ts.map +1 -1
  26. package/dist/src/halo/identity.js +2 -0
  27. package/dist/src/halo/identity.js.map +1 -1
  28. package/dist/src/halo/preferences.d.ts.map +1 -1
  29. package/dist/src/halo/preferences.js.map +1 -1
  30. package/dist/src/packlets/database/item-manager.d.ts.map +1 -1
  31. package/dist/src/parties/data-party.d.ts.map +1 -1
  32. package/dist/src/parties/data-party.test.js.map +1 -1
  33. package/dist/src/parties/party-factory.d.ts +3 -2
  34. package/dist/src/parties/party-factory.d.ts.map +1 -1
  35. package/dist/src/parties/party-factory.js.map +1 -1
  36. package/dist/src/parties/party-manager.d.ts +3 -3
  37. package/dist/src/parties/party-manager.d.ts.map +1 -1
  38. package/dist/src/parties/party-manager.js +0 -5
  39. package/dist/src/parties/party-manager.js.map +1 -1
  40. package/dist/src/parties/party-preferences.d.ts +1 -1
  41. package/dist/src/parties/party-preferences.d.ts.map +1 -1
  42. package/dist/src/parties/party-preferences.js +3 -3
  43. package/dist/src/parties/party-preferences.js.map +1 -1
  44. package/dist/src/pipeline/feed-muxer.test.js +4 -2
  45. package/dist/src/pipeline/feed-muxer.test.js.map +1 -1
  46. package/dist/src/pipeline/metadata-store.d.ts.map +1 -1
  47. package/dist/src/pipeline/metadata-store.js +32 -29
  48. package/dist/src/pipeline/metadata-store.js.map +1 -1
  49. package/dist/src/pipeline/party-pipeline.d.ts +3 -1
  50. package/dist/src/pipeline/party-pipeline.d.ts.map +1 -1
  51. package/dist/src/pipeline/party-pipeline.js +7 -5
  52. package/dist/src/pipeline/party-pipeline.js.map +1 -1
  53. package/dist/src/pipeline/party-pipeline.test.js +10 -9
  54. package/dist/src/pipeline/party-pipeline.test.js.map +1 -1
  55. package/dist/src/protocol/identity-credentials.d.ts +0 -1
  56. package/dist/src/protocol/identity-credentials.d.ts.map +1 -1
  57. package/dist/src/protocol/identity-credentials.js.map +1 -1
  58. package/dist/src/protocol/index.d.ts +1 -0
  59. package/dist/src/protocol/index.d.ts.map +1 -1
  60. package/dist/src/protocol/index.js +1 -0
  61. package/dist/src/protocol/index.js.map +1 -1
  62. package/dist/src/protocol/party-protocol-factory.d.ts +1 -1
  63. package/dist/src/protocol/party-protocol-factory.d.ts.map +1 -1
  64. package/dist/src/snapshots/snapshot-store.test.js +5 -1
  65. package/dist/src/snapshots/snapshot-store.test.js.map +1 -1
  66. package/dist/tsconfig.tsbuildinfo +1 -1
  67. package/package.json +17 -17
  68. package/src/api/index.ts +1 -0
  69. package/src/api/subscription.ts +24 -0
  70. package/src/echo-api.test.ts +162 -0
  71. package/src/echo.test.ts +1 -1
  72. package/src/echo.ts +11 -10
  73. package/src/halo/halo-party.ts +3 -3
  74. package/src/halo/halo.test.ts +1 -3
  75. package/src/halo/identity-manager.ts +1 -6
  76. package/src/halo/identity.ts +2 -2
  77. package/src/halo/preferences.ts +1 -0
  78. package/src/packlets/database/item-manager.ts +5 -5
  79. package/src/parties/data-party.test.ts +3 -1
  80. package/src/parties/data-party.ts +2 -2
  81. package/src/parties/party-factory.ts +3 -3
  82. package/src/parties/party-manager.ts +6 -13
  83. package/src/parties/party-preferences.ts +3 -3
  84. package/src/pipeline/feed-muxer.test.ts +4 -2
  85. package/src/pipeline/metadata-store.ts +37 -28
  86. package/src/pipeline/party-pipeline.test.ts +3 -2
  87. package/src/pipeline/party-pipeline.ts +9 -6
  88. package/src/protocol/identity-credentials.ts +0 -2
  89. package/src/protocol/index.ts +1 -0
  90. package/src/protocol/party-protocol-factory.ts +1 -1
  91. package/src/snapshots/snapshot-store.test.ts +5 -1
@@ -18,9 +18,10 @@ import { PublicKey, Timeframe } from '@dxos/protocols';
18
18
  import { createStorage, StorageType } from '@dxos/random-access-multi-storage';
19
19
  import { afterTest } from '@dxos/testutils';
20
20
 
21
- import { MetadataStore, PartyFeedProvider } from '.';
22
- import { createReplicatorPlugin } from '../protocol/replicator-plugin';
21
+ import { createReplicatorPlugin } from '../protocol';
23
22
  import { SnapshotStore } from '../snapshots';
23
+ import { MetadataStore } from './metadata-store';
24
+ import { PartyFeedProvider } from './party-feed-provider';
24
25
  import { PartyPipeline } from './party-pipeline';
25
26
 
26
27
  describe('PartyPipeline', () => {
@@ -14,20 +14,23 @@ import { ModelFactory } from '@dxos/model-factory';
14
14
  import { PublicKey, Timeframe } from '@dxos/protocols';
15
15
  import { SubscriptionGroup } from '@dxos/util';
16
16
 
17
- import { createMessageSelector, PartyProcessor, PartyFeedProvider, FeedMuxer } from '.';
18
17
  import { Database, FeedDatabaseBackend, TimeframeClock } from '../packlets/database';
19
18
  import { createAutomaticSnapshots, SnapshotStore } from '../snapshots';
19
+ import { FeedMuxer } from './feed-muxer';
20
+ import { createMessageSelector } from './message-selector';
21
+ import { PartyFeedProvider } from './party-feed-provider';
22
+ import { PartyProcessor } from './party-processor';
20
23
 
21
24
  const DEFAULT_SNAPSHOT_INTERVAL = 100; // Every 100 messages.
22
25
 
23
26
  export interface PipelineOptions {
24
- readLogger?: (msg: any) => void;
25
- writeLogger?: (msg: any) => void;
26
- readOnly?: boolean;
27
+ readLogger?: (msg: any) => void
28
+ writeLogger?: (msg: any) => void
29
+ readOnly?: boolean
27
30
  // TODO(burdon): Hierarchical options.
28
31
  // snapshots: { enabled: true, interval: 100 } }
29
- snapshots?: boolean;
30
- snapshotInterval?: number;
32
+ snapshots?: boolean
33
+ snapshotInterval?: number
31
34
  }
32
35
 
33
36
  export interface OpenOptions {
@@ -27,8 +27,6 @@ export interface IdentityCredentials {
27
27
  contacts: ContactManager | undefined
28
28
  }
29
29
 
30
- export type IdentityCredentialsProvider = () => IdentityCredentials | undefined
31
-
32
30
  export const createTestIdentityCredentials = async (keyring: Keyring): Promise<IdentityCredentials> => {
33
31
  const identityKey = await keyring.createKeyRecord({ type: KeyType.IDENTITY });
34
32
  const deviceKey = await keyring.createKeyRecord({ type: KeyType.DEVICE });
@@ -8,3 +8,4 @@ export * from './auth-plugin';
8
8
  export * from './halo-recovery-plugin';
9
9
  export * from './offline-invitation-plugin';
10
10
  export * from './party-protocol-factory';
11
+ export * from './replicator-plugin';
@@ -11,7 +11,7 @@ import { MMSTTopology, NetworkManager, Plugin } from '@dxos/network-manager';
11
11
  import { PresencePlugin } from '@dxos/protocol-plugin-presence';
12
12
  import { PublicKey } from '@dxos/protocols';
13
13
 
14
- import { CredentialsProvider } from '.';
14
+ import { CredentialsProvider } from './authenticator';
15
15
 
16
16
  const log = debug('dxos:echo-db:party-protocol-factory');
17
17
 
@@ -26,10 +26,14 @@ describe('SnapshotStore', () => {
26
26
 
27
27
  const snapshot: PartySnapshot = {
28
28
  partyKey: key1.asBuffer(),
29
+ halo: {
30
+ messages: []
31
+ },
29
32
  database: {
30
33
  items: [{
31
34
  itemId: createId(),
32
- itemType: 'example:test'
35
+ itemType: 'example:test',
36
+ modelType: 'example:model'
33
37
  }],
34
38
  links: []
35
39
  }