@dxos/echo-db 2.33.7-dev.c2ba88fb → 2.33.8-dev.8609bc45
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/echo.d.ts +1 -1
- package/dist/src/echo.d.ts.map +1 -1
- package/dist/src/echo.js.map +1 -1
- package/dist/src/echo.test.js +13 -13
- package/dist/src/echo.test.js.map +1 -1
- package/dist/src/halo/contact-manager.d.ts.map +1 -1
- package/dist/src/halo/contact-manager.js +2 -2
- package/dist/src/halo/contact-manager.js.map +1 -1
- package/dist/src/halo/halo-factory.d.ts +1 -1
- package/dist/src/halo/halo-factory.d.ts.map +1 -1
- package/dist/src/halo/halo-factory.js +3 -2
- package/dist/src/halo/halo-factory.js.map +1 -1
- package/dist/src/halo/halo-party.d.ts +1 -1
- package/dist/src/halo/halo-party.d.ts.map +1 -1
- package/dist/src/halo/halo-party.js.map +1 -1
- package/dist/src/halo/halo.d.ts +1 -1
- package/dist/src/halo/halo.d.ts.map +1 -1
- package/dist/src/halo/halo.js +3 -2
- package/dist/src/halo/halo.js.map +1 -1
- package/dist/src/halo/halo.test.js +9 -9
- package/dist/src/halo/halo.test.js.map +1 -1
- package/dist/src/halo/preferences.d.ts +1 -1
- package/dist/src/halo/preferences.d.ts.map +1 -1
- package/dist/src/halo/preferences.js +3 -3
- package/dist/src/halo/preferences.js.map +1 -1
- package/dist/src/halo/types.d.ts +1 -0
- package/dist/src/halo/types.d.ts.map +1 -1
- package/dist/src/invitations/greeting-initiator.d.ts +1 -1
- package/dist/src/invitations/greeting-initiator.d.ts.map +1 -1
- package/dist/src/invitations/greeting-initiator.js +5 -4
- package/dist/src/invitations/greeting-initiator.js.map +1 -1
- package/dist/src/invitations/greeting-responder.d.ts.map +1 -1
- package/dist/src/invitations/greeting-responder.js +4 -3
- package/dist/src/invitations/greeting-responder.js.map +1 -1
- package/dist/src/invitations/halo-recovery-initiator.d.ts +1 -1
- package/dist/src/invitations/halo-recovery-initiator.d.ts.map +1 -1
- package/dist/src/invitations/halo-recovery-initiator.js +4 -3
- package/dist/src/invitations/halo-recovery-initiator.js.map +1 -1
- package/dist/src/invitations/invitation-descriptor.d.ts +1 -1
- package/dist/src/invitations/invitation-descriptor.d.ts.map +1 -1
- package/dist/src/invitations/invitation-descriptor.js +4 -3
- package/dist/src/invitations/invitation-descriptor.js.map +1 -1
- package/dist/src/invitations/invitation-factory.d.ts +1 -1
- package/dist/src/invitations/invitation-factory.d.ts.map +1 -1
- package/dist/src/invitations/offline-invitation-claimer.d.ts.map +1 -1
- package/dist/src/invitations/offline-invitation-claimer.js +4 -3
- package/dist/src/invitations/offline-invitation-claimer.js.map +1 -1
- package/dist/src/packlets/database/data-mirror.d.ts +1 -1
- package/dist/src/packlets/database/data-mirror.d.ts.map +1 -1
- package/dist/src/packlets/database/data-mirror.js.map +1 -1
- package/dist/src/packlets/database/data-mirror.test.js +5 -5
- package/dist/src/packlets/database/data-mirror.test.js.map +1 -1
- package/dist/src/packlets/database/data-service-host.d.ts.map +1 -1
- package/dist/src/packlets/database/data-service-host.js +3 -3
- package/dist/src/packlets/database/data-service-host.js.map +1 -1
- package/dist/src/packlets/database/database.d.ts +1 -1
- package/dist/src/packlets/database/database.d.ts.map +1 -1
- package/dist/src/packlets/database/database.js.map +1 -1
- package/dist/src/packlets/database/item-demuxer.test.js +7 -6
- package/dist/src/packlets/database/item-demuxer.test.js.map +1 -1
- package/dist/src/packlets/database/item-manager.d.ts +1 -1
- package/dist/src/packlets/database/item-manager.d.ts.map +1 -1
- package/dist/src/packlets/database/item-manager.js.map +1 -1
- package/dist/src/packlets/database/item-manager.test.js +11 -10
- package/dist/src/packlets/database/item-manager.test.js.map +1 -1
- package/dist/src/packlets/database/selection/selection.test.js +2 -2
- package/dist/src/packlets/database/selection/selection.test.js.map +1 -1
- package/dist/src/packlets/database/testing.d.ts.map +1 -1
- package/dist/src/packlets/database/testing.js +5 -5
- package/dist/src/packlets/database/testing.js.map +1 -1
- package/dist/src/packlets/errors/errors.d.ts +22 -0
- package/dist/src/packlets/errors/errors.d.ts.map +1 -0
- package/dist/src/packlets/errors/errors.js +44 -0
- package/dist/src/packlets/errors/errors.js.map +1 -0
- package/dist/src/packlets/errors/index.d.ts +1 -21
- package/dist/src/packlets/errors/index.d.ts.map +1 -1
- package/dist/src/packlets/errors/index.js +16 -39
- package/dist/src/packlets/errors/index.js.map +1 -1
- package/dist/src/parties/data-party.d.ts +1 -1
- package/dist/src/parties/data-party.d.ts.map +1 -1
- package/dist/src/parties/data-party.js.map +1 -1
- package/dist/src/parties/data-party.test.js.map +1 -1
- package/dist/src/parties/party-factory.d.ts +1 -1
- package/dist/src/parties/party-factory.d.ts.map +1 -1
- package/dist/src/parties/party-factory.js +2 -1
- package/dist/src/parties/party-factory.js.map +1 -1
- package/dist/src/parties/party-manager.d.ts +1 -1
- package/dist/src/parties/party-manager.d.ts.map +1 -1
- package/dist/src/parties/party-manager.js +2 -2
- package/dist/src/parties/party-manager.js.map +1 -1
- package/dist/src/parties/party-manager.test.js +10 -9
- package/dist/src/parties/party-manager.test.js.map +1 -1
- package/dist/src/pipeline/feed-muxer.d.ts.map +1 -1
- package/dist/src/pipeline/feed-muxer.js +3 -2
- package/dist/src/pipeline/feed-muxer.js.map +1 -1
- package/dist/src/pipeline/feed-muxer.test.js +5 -4
- package/dist/src/pipeline/feed-muxer.test.js.map +1 -1
- package/dist/src/pipeline/message-selector.d.ts.map +1 -1
- package/dist/src/pipeline/message-selector.js +3 -3
- package/dist/src/pipeline/message-selector.js.map +1 -1
- package/dist/src/pipeline/metadata-store.d.ts +1 -1
- package/dist/src/pipeline/metadata-store.d.ts.map +1 -1
- package/dist/src/pipeline/metadata-store.js.map +1 -1
- package/dist/src/pipeline/metadata-store.test.js +14 -14
- package/dist/src/pipeline/metadata-store.test.js.map +1 -1
- package/dist/src/pipeline/party-feed-provider.d.ts +1 -1
- package/dist/src/pipeline/party-feed-provider.d.ts.map +1 -1
- package/dist/src/pipeline/party-feed-provider.js.map +1 -1
- package/dist/src/pipeline/party-pipeline.d.ts +1 -1
- package/dist/src/pipeline/party-pipeline.d.ts.map +1 -1
- package/dist/src/pipeline/party-pipeline.js.map +1 -1
- package/dist/src/pipeline/party-pipeline.test.js +5 -4
- package/dist/src/pipeline/party-pipeline.test.js.map +1 -1
- package/dist/src/pipeline/party-processor.d.ts +1 -1
- package/dist/src/pipeline/party-processor.d.ts.map +1 -1
- package/dist/src/protocol/auth-plugin.d.ts +1 -1
- package/dist/src/protocol/auth-plugin.d.ts.map +1 -1
- package/dist/src/protocol/auth-plugin.js.map +1 -1
- package/dist/src/protocol/halo-recovery-plugin.d.ts +1 -1
- package/dist/src/protocol/halo-recovery-plugin.d.ts.map +1 -1
- package/dist/src/protocol/identity-credentials.d.ts.map +1 -1
- package/dist/src/protocol/identity-credentials.js +2 -1
- package/dist/src/protocol/identity-credentials.js.map +1 -1
- package/dist/src/protocol/offline-invitation-plugin.d.ts +1 -1
- package/dist/src/protocol/offline-invitation-plugin.d.ts.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/protocol/party-protocol-factory.js.map +1 -1
- package/dist/src/snapshots/snapshot-generator.d.ts.map +1 -1
- package/dist/src/snapshots/snapshot-generator.js +2 -1
- package/dist/src/snapshots/snapshot-generator.js.map +1 -1
- package/dist/src/snapshots/snapshot-store.test.js +2 -1
- package/dist/src/snapshots/snapshot-store.test.js.map +1 -1
- package/dist/src/snapshots/snapshot.test.js +4 -4
- package/dist/src/snapshots/snapshot.test.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +20 -20
- package/src/echo.test.ts +13 -11
- package/src/echo.ts +1 -1
- package/src/halo/contact-manager.ts +1 -1
- package/src/halo/halo-factory.ts +3 -1
- package/src/halo/halo-party.ts +1 -1
- package/src/halo/halo.test.ts +9 -7
- package/src/halo/halo.ts +3 -2
- package/src/halo/preferences.ts +1 -1
- package/src/halo/types.ts +1 -0
- package/src/invitations/greeting-initiator.ts +2 -1
- package/src/invitations/greeting-responder.ts +2 -1
- package/src/invitations/halo-recovery-initiator.ts +2 -1
- package/src/invitations/invitation-descriptor.ts +2 -1
- package/src/invitations/invitation-factory.ts +1 -1
- package/src/invitations/offline-invitation-claimer.ts +2 -1
- package/src/packlets/database/data-mirror.test.ts +1 -1
- package/src/packlets/database/data-mirror.ts +1 -1
- package/src/packlets/database/data-service-host.ts +1 -1
- package/src/packlets/database/database.ts +1 -1
- package/src/packlets/database/item-demuxer.test.ts +2 -1
- package/src/packlets/database/item-manager.test.ts +2 -1
- package/src/packlets/database/item-manager.ts +2 -1
- package/src/packlets/database/selection/selection.test.ts +1 -1
- package/src/packlets/database/testing.ts +1 -1
- package/src/packlets/errors/errors.ts +43 -0
- package/src/packlets/errors/index.ts +2 -40
- package/src/parties/data-party.test.ts +1 -1
- package/src/parties/data-party.ts +1 -1
- package/src/parties/party-factory.ts +2 -1
- package/src/parties/party-manager.test.ts +9 -7
- package/src/parties/party-manager.ts +1 -1
- package/src/pipeline/feed-muxer.test.ts +2 -1
- package/src/pipeline/feed-muxer.ts +2 -1
- package/src/pipeline/message-selector.ts +1 -1
- package/src/pipeline/metadata-store.test.ts +1 -1
- package/src/pipeline/metadata-store.ts +1 -1
- package/src/pipeline/party-feed-provider.ts +1 -1
- package/src/pipeline/party-pipeline.test.ts +2 -1
- package/src/pipeline/party-pipeline.ts +1 -1
- package/src/pipeline/party-processor.ts +1 -1
- package/src/protocol/auth-plugin.ts +1 -1
- package/src/protocol/halo-recovery-plugin.ts +1 -1
- package/src/protocol/identity-credentials.ts +2 -1
- package/src/protocol/offline-invitation-plugin.ts +1 -1
- package/src/protocol/party-protocol-factory.ts +2 -1
- package/src/snapshots/snapshot-generator.ts +3 -1
- package/src/snapshots/snapshot-store.test.ts +2 -1
- package/src/snapshots/snapshot.test.ts +1 -1
|
@@ -18,7 +18,8 @@ import {
|
|
|
18
18
|
SecretValidator
|
|
19
19
|
} from '@dxos/credentials';
|
|
20
20
|
import {
|
|
21
|
-
createKeyPair,
|
|
21
|
+
createKeyPair,
|
|
22
|
+
humanize,
|
|
22
23
|
randomBytes,
|
|
23
24
|
sign,
|
|
24
25
|
SIGNATURE_LENGTH, verify
|
|
@@ -29,6 +30,7 @@ import { createWritableFeedStream, FeedStore } from '@dxos/feed-store';
|
|
|
29
30
|
import { ModelFactory } from '@dxos/model-factory';
|
|
30
31
|
import { NetworkManager } from '@dxos/network-manager';
|
|
31
32
|
import { ObjectModel } from '@dxos/object-model';
|
|
33
|
+
import { PublicKey } from '@dxos/protocols';
|
|
32
34
|
import { createStorage, StorageType } from '@dxos/random-access-multi-storage';
|
|
33
35
|
import { afterTest, testTimeout } from '@dxos/testutils';
|
|
34
36
|
|
|
@@ -318,11 +320,11 @@ describe('Party manager', () => {
|
|
|
318
320
|
expect(members.length).toBe(2);
|
|
319
321
|
for (const member of members) {
|
|
320
322
|
if (identityA.identityKey!.publicKey.equals(member.publicKey)) {
|
|
321
|
-
expect(member.displayName).toEqual(identityA.identityKey!.publicKey
|
|
323
|
+
expect(member.displayName).toEqual(humanize(identityA.identityKey!.publicKey));
|
|
322
324
|
expect(member.displayName).toEqual(identityA.displayName);
|
|
323
325
|
}
|
|
324
326
|
if (identityB.identityKey!.publicKey.equals(member.publicKey)) {
|
|
325
|
-
expect(member.displayName).toEqual(identityB.identityKey!.publicKey
|
|
327
|
+
expect(member.displayName).toEqual(humanize(identityB.identityKey!.publicKey));
|
|
326
328
|
expect(member.displayName).toEqual(identityB.displayName);
|
|
327
329
|
}
|
|
328
330
|
}
|
|
@@ -399,10 +401,10 @@ describe('Party manager', () => {
|
|
|
399
401
|
expect(members.length).toBe(2);
|
|
400
402
|
for (const member of members) {
|
|
401
403
|
if (identityA.identityKey!.publicKey.equals(member.publicKey)) {
|
|
402
|
-
expect(member.displayName).toEqual(identityA.identityKey!.publicKey
|
|
404
|
+
expect(member.displayName).toEqual(humanize(identityA.identityKey!.publicKey));
|
|
403
405
|
}
|
|
404
406
|
if (identityB.identityKey!.publicKey.equals(member.publicKey)) {
|
|
405
|
-
expect(member.displayName).toEqual(identityB.identityKey!.publicKey
|
|
407
|
+
expect(member.displayName).toEqual(humanize(identityB.identityKey!.publicKey));
|
|
406
408
|
}
|
|
407
409
|
}
|
|
408
410
|
}
|
|
@@ -456,11 +458,11 @@ describe('Party manager', () => {
|
|
|
456
458
|
expect(members.length).toBe(2);
|
|
457
459
|
for (const member of members) {
|
|
458
460
|
if (identityA.identityKey!.publicKey.equals(member.publicKey)) {
|
|
459
|
-
expect(member.displayName).toEqual(identityA.identityKey!.publicKey
|
|
461
|
+
expect(member.displayName).toEqual(humanize(identityA.identityKey!.publicKey));
|
|
460
462
|
expect(member.displayName).toEqual(identityA.displayName);
|
|
461
463
|
}
|
|
462
464
|
if (identityB.identityKey!.publicKey.equals(member.publicKey)) {
|
|
463
|
-
expect(member.displayName).toEqual(identityB.identityKey!.publicKey
|
|
465
|
+
expect(member.displayName).toEqual(humanize(identityB.identityKey!.publicKey));
|
|
464
466
|
expect(member.displayName).toEqual(identityB.displayName);
|
|
465
467
|
}
|
|
466
468
|
}
|
|
@@ -8,9 +8,9 @@ import unionWith from 'lodash.unionwith';
|
|
|
8
8
|
|
|
9
9
|
import { Event, synchronized } from '@dxos/async';
|
|
10
10
|
import { KeyHint, KeyType, SecretProvider } from '@dxos/credentials';
|
|
11
|
-
import { PublicKey } from '@dxos/crypto';
|
|
12
11
|
import { failUndefined, timed } from '@dxos/debug';
|
|
13
12
|
import { PartyKey, PartySnapshot } from '@dxos/echo-protocol';
|
|
13
|
+
import { PublicKey } from '@dxos/protocols';
|
|
14
14
|
import { ComplexMap, boolGuard } from '@dxos/util';
|
|
15
15
|
|
|
16
16
|
import { InvitationDescriptor } from '../invitations';
|
|
@@ -8,10 +8,11 @@ import { it as test } from 'mocha';
|
|
|
8
8
|
|
|
9
9
|
import { waitForCondition, latch } from '@dxos/async';
|
|
10
10
|
import { createPartyGenesisMessage, Keyring, KeyType } from '@dxos/credentials';
|
|
11
|
-
import { createId, createKeyPair
|
|
11
|
+
import { createId, createKeyPair } from '@dxos/crypto';
|
|
12
12
|
import { codec, createFeedWriter, FeedSelector, FeedStoreIterator, IEchoStream, Timeframe } from '@dxos/echo-protocol';
|
|
13
13
|
import { FeedStore, createWritableFeedStream } from '@dxos/feed-store';
|
|
14
14
|
import { createSetPropertyMutation } from '@dxos/model-factory';
|
|
15
|
+
import { PublicKey } from '@dxos/protocols';
|
|
15
16
|
import { createStorage, StorageType } from '@dxos/random-access-multi-storage';
|
|
16
17
|
import { jsonReplacer } from '@dxos/util';
|
|
17
18
|
|
|
@@ -7,11 +7,12 @@ import debug from 'debug';
|
|
|
7
7
|
|
|
8
8
|
import { Event } from '@dxos/async';
|
|
9
9
|
import { Message as HaloMessage } from '@dxos/credentials';
|
|
10
|
-
import { keyToString
|
|
10
|
+
import { keyToString } from '@dxos/crypto';
|
|
11
11
|
import { checkType } from '@dxos/debug';
|
|
12
12
|
import {
|
|
13
13
|
createFeedMeta, EchoEnvelope, FeedMessage, FeedStoreIterator, FeedWriter, IEchoStream, mapFeedWriter, Timeframe
|
|
14
14
|
} from '@dxos/echo-protocol';
|
|
15
|
+
import { PublicKey } from '@dxos/protocols';
|
|
15
16
|
import { jsonReplacer } from '@dxos/util';
|
|
16
17
|
|
|
17
18
|
import { EchoProcessor, TimeframeClock } from '../packlets/database';
|
|
@@ -6,8 +6,8 @@ import assert from 'assert';
|
|
|
6
6
|
import debug from 'debug';
|
|
7
7
|
|
|
8
8
|
import { getPartyCredentialMessageType, PartyCredential } from '@dxos/credentials';
|
|
9
|
-
import { PublicKey } from '@dxos/crypto';
|
|
10
9
|
import { MessageSelector } from '@dxos/echo-protocol';
|
|
10
|
+
import { PublicKey } from '@dxos/protocols';
|
|
11
11
|
|
|
12
12
|
import { TimeframeClock } from '../packlets/database';
|
|
13
13
|
import { PartyStateProvider } from './party-processor';
|
|
@@ -6,9 +6,9 @@ import assert from 'assert';
|
|
|
6
6
|
import debug from 'debug';
|
|
7
7
|
|
|
8
8
|
import { synchronized } from '@dxos/async';
|
|
9
|
-
import { PublicKey } from '@dxos/crypto';
|
|
10
9
|
import { failUndefined } from '@dxos/debug';
|
|
11
10
|
import { EchoMetadata, PartyMetadata, schema, Timeframe } from '@dxos/echo-protocol';
|
|
11
|
+
import { PublicKey } from '@dxos/protocols';
|
|
12
12
|
import { Directory } from '@dxos/random-access-multi-storage';
|
|
13
13
|
|
|
14
14
|
/**
|
|
@@ -7,9 +7,9 @@ import debug from 'debug';
|
|
|
7
7
|
|
|
8
8
|
import { Event, synchronized } from '@dxos/async';
|
|
9
9
|
import { Keyring, KeyType } from '@dxos/credentials';
|
|
10
|
-
import { PublicKey } from '@dxos/crypto';
|
|
11
10
|
import { FeedSelector, FeedStoreIterator, MessageSelector, Timeframe } from '@dxos/echo-protocol';
|
|
12
11
|
import { FeedDescriptor, FeedStore } from '@dxos/feed-store';
|
|
12
|
+
import { PublicKey } from '@dxos/protocols';
|
|
13
13
|
import { ComplexMap } from '@dxos/util';
|
|
14
14
|
|
|
15
15
|
import { MetadataStore } from './metadata-store';
|
|
@@ -7,13 +7,14 @@ import { it as test } from 'mocha';
|
|
|
7
7
|
|
|
8
8
|
import { promiseTimeout } from '@dxos/async';
|
|
9
9
|
import { createFeedAdmitMessage, createPartyGenesisMessage, Keyring, KeyType } from '@dxos/credentials';
|
|
10
|
-
import { createId
|
|
10
|
+
import { createId } from '@dxos/crypto';
|
|
11
11
|
import { checkType } from '@dxos/debug';
|
|
12
12
|
import { codec, FeedMessage, Timeframe } from '@dxos/echo-protocol';
|
|
13
13
|
import { FeedStore } from '@dxos/feed-store';
|
|
14
14
|
import { createTestProtocolPair } from '@dxos/mesh-protocol';
|
|
15
15
|
import { ModelFactory } from '@dxos/model-factory';
|
|
16
16
|
import { ObjectModel } from '@dxos/object-model';
|
|
17
|
+
import { PublicKey } from '@dxos/protocols';
|
|
17
18
|
import { createStorage, StorageType } from '@dxos/random-access-multi-storage';
|
|
18
19
|
import { afterTest } from '@dxos/testutils';
|
|
19
20
|
|
|
@@ -6,10 +6,10 @@ import assert from 'assert';
|
|
|
6
6
|
|
|
7
7
|
import { synchronized } from '@dxos/async';
|
|
8
8
|
import { KeyType, Message as HaloMessage } from '@dxos/credentials';
|
|
9
|
-
import { PublicKey } from '@dxos/crypto';
|
|
10
9
|
import { timed } from '@dxos/debug';
|
|
11
10
|
import { createFeedWriter, DatabaseSnapshot, FeedSelector, FeedWriter, PartyKey, PartySnapshot, Timeframe } from '@dxos/echo-protocol';
|
|
12
11
|
import { ModelFactory } from '@dxos/model-factory';
|
|
12
|
+
import { PublicKey } from '@dxos/protocols';
|
|
13
13
|
import { SubscriptionGroup } from '@dxos/util';
|
|
14
14
|
|
|
15
15
|
import { createMessageSelector, PartyProcessor, PartyFeedProvider, FeedMuxer } from '.';
|
|
@@ -15,8 +15,8 @@ import {
|
|
|
15
15
|
PartyEventType,
|
|
16
16
|
SignedMessage
|
|
17
17
|
} from '@dxos/credentials';
|
|
18
|
-
import { PublicKey } from '@dxos/crypto';
|
|
19
18
|
import { FeedKey, IHaloStream, PartyKey, HaloStateSnapshot } from '@dxos/echo-protocol';
|
|
19
|
+
import { PublicKey } from '@dxos/protocols';
|
|
20
20
|
import { jsonReplacer } from '@dxos/util';
|
|
21
21
|
|
|
22
22
|
const log = debug('dxos:echo-db:party-processor');
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
//
|
|
4
4
|
|
|
5
5
|
import { Authenticator, AuthPlugin } from '@dxos/credentials';
|
|
6
|
-
import { PublicKey } from '@dxos/crypto';
|
|
7
6
|
import { Replicator } from '@dxos/protocol-plugin-replicator';
|
|
7
|
+
import { PublicKey } from '@dxos/protocols';
|
|
8
8
|
|
|
9
9
|
/**
|
|
10
10
|
* Creates authenticator network-protocol plugin that guards access to the replicator.
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
//
|
|
4
4
|
|
|
5
5
|
import { createIdentityInfoMessage, createKeyAdmitMessage, createPartyGenesisMessage, KeyChain, KeyRecord, Keyring, KeyType, SignedMessage } from '@dxos/credentials';
|
|
6
|
+
import { humanize } from '@dxos/crypto';
|
|
6
7
|
|
|
7
8
|
import { ContactManager, Preferences } from '../halo';
|
|
8
9
|
import { CredentialsSigner } from './credentials-signer';
|
|
@@ -38,7 +39,7 @@ export const createTestIdentityCredentials = async (keyring: Keyring): Promise<I
|
|
|
38
39
|
messageMap.set(deviceKey.publicKey.toHex(), partyGenesis);
|
|
39
40
|
const deviceKeyChain = Keyring.buildKeyChain(deviceKey.publicKey, messageMap, [feedKey.publicKey]);
|
|
40
41
|
|
|
41
|
-
const displayName = identityKey.publicKey
|
|
42
|
+
const displayName = humanize(identityKey.publicKey);
|
|
42
43
|
const identityInfo = createIdentityInfoMessage(keyring, displayName, identityKey);
|
|
43
44
|
|
|
44
45
|
return {
|
|
@@ -4,11 +4,12 @@
|
|
|
4
4
|
|
|
5
5
|
import debug from 'debug';
|
|
6
6
|
|
|
7
|
-
import { discoveryKey, keyToString
|
|
7
|
+
import { discoveryKey, keyToString } from '@dxos/crypto';
|
|
8
8
|
import { PartyKey } from '@dxos/echo-protocol';
|
|
9
9
|
import { Protocol } from '@dxos/mesh-protocol';
|
|
10
10
|
import { MMSTTopology, NetworkManager, Plugin } from '@dxos/network-manager';
|
|
11
11
|
import { PresencePlugin } from '@dxos/protocol-plugin-presence';
|
|
12
|
+
import { PublicKey } from '@dxos/protocols';
|
|
12
13
|
|
|
13
14
|
import { CredentialsProvider } from '.';
|
|
14
15
|
|
|
@@ -4,6 +4,8 @@
|
|
|
4
4
|
|
|
5
5
|
import debug from 'debug';
|
|
6
6
|
|
|
7
|
+
import { humanize } from '@dxos/crypto';
|
|
8
|
+
|
|
7
9
|
import { TimeframeClock } from '../packlets/database';
|
|
8
10
|
import { PartyPipeline } from '../pipeline';
|
|
9
11
|
import { SnapshotStore } from './snapshot-store';
|
|
@@ -13,7 +15,7 @@ const log = debug('dxos:snapshot-generator');
|
|
|
13
15
|
export const createAutomaticSnapshots = (party: PartyPipeline, clock: TimeframeClock, store: SnapshotStore, interval: number) => clock.update.on(async timeframe => {
|
|
14
16
|
const totalMessages = timeframe.totalMessages();
|
|
15
17
|
if (totalMessages > 0 && totalMessages % interval === 0) {
|
|
16
|
-
log(`Saving snapshot of ${party.key
|
|
18
|
+
log(`Saving snapshot of ${humanize(party.key)}...`);
|
|
17
19
|
try {
|
|
18
20
|
const snapshot = party.createSnapshot();
|
|
19
21
|
await store.save(snapshot);
|
|
@@ -5,8 +5,9 @@
|
|
|
5
5
|
import expect from 'expect';
|
|
6
6
|
import { it as test } from 'mocha';
|
|
7
7
|
|
|
8
|
-
import { createId, createKeyPair
|
|
8
|
+
import { createId, createKeyPair } from '@dxos/crypto';
|
|
9
9
|
import { PartySnapshot } from '@dxos/echo-protocol';
|
|
10
|
+
import { PublicKey } from '@dxos/protocols';
|
|
10
11
|
import { createStorage, StorageType } from '@dxos/random-access-multi-storage';
|
|
11
12
|
|
|
12
13
|
import { SnapshotStore } from './snapshot-store';
|
|
@@ -7,10 +7,10 @@ import expect from 'expect';
|
|
|
7
7
|
import { it as test } from 'mocha';
|
|
8
8
|
|
|
9
9
|
import { waitForCondition } from '@dxos/async';
|
|
10
|
-
import { PublicKey } from '@dxos/crypto';
|
|
11
10
|
import { schema, ItemID, MockFeedWriter, PartyKey } from '@dxos/echo-protocol';
|
|
12
11
|
import { ModelFactory } from '@dxos/model-factory';
|
|
13
12
|
import { ObjectModel, ValueUtil } from '@dxos/object-model';
|
|
13
|
+
import { PublicKey } from '@dxos/protocols';
|
|
14
14
|
|
|
15
15
|
import { ItemDemuxer, ItemManager } from '../packlets/database';
|
|
16
16
|
import { createTestInstance } from '../testing';
|