@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.
- package/dist/src/api/index.d.ts +1 -0
- package/dist/src/api/index.d.ts.map +1 -1
- package/dist/src/api/index.js +1 -0
- package/dist/src/api/index.js.map +1 -1
- package/dist/src/api/subscription.d.ts +5 -0
- package/dist/src/api/subscription.d.ts.map +1 -0
- package/dist/src/api/subscription.js +25 -0
- package/dist/src/api/subscription.js.map +1 -0
- package/dist/src/echo-api.test.d.ts +2 -0
- package/dist/src/echo-api.test.d.ts.map +1 -0
- package/dist/src/echo-api.test.js +117 -0
- package/dist/src/echo-api.test.js.map +1 -0
- package/dist/src/echo.d.ts +3 -4
- package/dist/src/echo.d.ts.map +1 -1
- package/dist/src/echo.js +4 -6
- package/dist/src/echo.js.map +1 -1
- package/dist/src/echo.test.js.map +1 -1
- package/dist/src/halo/halo-party.d.ts +2 -2
- package/dist/src/halo/halo-party.d.ts.map +1 -1
- package/dist/src/halo/halo.test.js.map +1 -1
- package/dist/src/halo/identity-manager.d.ts.map +1 -1
- package/dist/src/halo/identity-manager.js +1 -4
- package/dist/src/halo/identity-manager.js.map +1 -1
- package/dist/src/halo/identity.d.ts +1 -1
- package/dist/src/halo/identity.d.ts.map +1 -1
- package/dist/src/halo/identity.js +2 -0
- package/dist/src/halo/identity.js.map +1 -1
- package/dist/src/halo/preferences.d.ts.map +1 -1
- package/dist/src/halo/preferences.js.map +1 -1
- package/dist/src/packlets/database/item-manager.d.ts.map +1 -1
- package/dist/src/parties/data-party.d.ts.map +1 -1
- package/dist/src/parties/data-party.test.js.map +1 -1
- package/dist/src/parties/party-factory.d.ts +3 -2
- package/dist/src/parties/party-factory.d.ts.map +1 -1
- package/dist/src/parties/party-factory.js.map +1 -1
- package/dist/src/parties/party-manager.d.ts +3 -3
- package/dist/src/parties/party-manager.d.ts.map +1 -1
- package/dist/src/parties/party-manager.js +0 -5
- package/dist/src/parties/party-manager.js.map +1 -1
- package/dist/src/parties/party-preferences.d.ts +1 -1
- package/dist/src/parties/party-preferences.d.ts.map +1 -1
- package/dist/src/parties/party-preferences.js +3 -3
- package/dist/src/parties/party-preferences.js.map +1 -1
- package/dist/src/pipeline/feed-muxer.test.js +4 -2
- package/dist/src/pipeline/feed-muxer.test.js.map +1 -1
- package/dist/src/pipeline/metadata-store.d.ts.map +1 -1
- package/dist/src/pipeline/metadata-store.js +32 -29
- package/dist/src/pipeline/metadata-store.js.map +1 -1
- package/dist/src/pipeline/party-pipeline.d.ts +3 -1
- package/dist/src/pipeline/party-pipeline.d.ts.map +1 -1
- package/dist/src/pipeline/party-pipeline.js +7 -5
- package/dist/src/pipeline/party-pipeline.js.map +1 -1
- package/dist/src/pipeline/party-pipeline.test.js +10 -9
- package/dist/src/pipeline/party-pipeline.test.js.map +1 -1
- package/dist/src/protocol/identity-credentials.d.ts +0 -1
- package/dist/src/protocol/identity-credentials.d.ts.map +1 -1
- package/dist/src/protocol/identity-credentials.js.map +1 -1
- package/dist/src/protocol/index.d.ts +1 -0
- package/dist/src/protocol/index.d.ts.map +1 -1
- package/dist/src/protocol/index.js +1 -0
- package/dist/src/protocol/index.js.map +1 -1
- package/dist/src/protocol/party-protocol-factory.d.ts +1 -1
- package/dist/src/protocol/party-protocol-factory.d.ts.map +1 -1
- package/dist/src/snapshots/snapshot-store.test.js +5 -1
- package/dist/src/snapshots/snapshot-store.test.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +17 -17
- package/src/api/index.ts +1 -0
- package/src/api/subscription.ts +24 -0
- package/src/echo-api.test.ts +162 -0
- package/src/echo.test.ts +1 -1
- package/src/echo.ts +11 -10
- package/src/halo/halo-party.ts +3 -3
- package/src/halo/halo.test.ts +1 -3
- package/src/halo/identity-manager.ts +1 -6
- package/src/halo/identity.ts +2 -2
- package/src/halo/preferences.ts +1 -0
- package/src/packlets/database/item-manager.ts +5 -5
- package/src/parties/data-party.test.ts +3 -1
- package/src/parties/data-party.ts +2 -2
- package/src/parties/party-factory.ts +3 -3
- package/src/parties/party-manager.ts +6 -13
- package/src/parties/party-preferences.ts +3 -3
- package/src/pipeline/feed-muxer.test.ts +4 -2
- package/src/pipeline/metadata-store.ts +37 -28
- package/src/pipeline/party-pipeline.test.ts +3 -2
- package/src/pipeline/party-pipeline.ts +9 -6
- package/src/protocol/identity-credentials.ts +0 -2
- package/src/protocol/index.ts +1 -0
- package/src/protocol/party-protocol-factory.ts +1 -1
- 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 {
|
|
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 });
|
package/src/protocol/index.ts
CHANGED
|
@@ -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
|
}
|