@dxos/client-services 0.6.7 → 0.6.8-main.046e6cf
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/lib/browser/{chunk-67R5H5BQ.mjs → chunk-2TPEVL6X.mjs} +22 -24
- package/dist/lib/browser/chunk-2TPEVL6X.mjs.map +7 -0
- package/dist/lib/browser/index.mjs +1 -1
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/testing/index.mjs +2 -6
- package/dist/lib/browser/testing/index.mjs.map +3 -3
- package/dist/lib/node/{chunk-7MSO7RYL.cjs → chunk-DIVJ2C6E.cjs} +23 -25
- package/dist/lib/node/chunk-DIVJ2C6E.cjs.map +7 -0
- package/dist/lib/node/index.cjs +45 -45
- package/dist/lib/node/meta.json +1 -1
- package/dist/lib/node/testing/index.cjs +8 -12
- package/dist/lib/node/testing/index.cjs.map +3 -3
- package/dist/types/src/packlets/devtools/feeds.d.ts.map +1 -1
- package/dist/types/src/packlets/diagnostics/diagnostics.d.ts +1 -1
- package/dist/types/src/packlets/diagnostics/diagnostics.d.ts.map +1 -1
- package/dist/types/src/packlets/identity/identity-service.d.ts.map +1 -1
- package/dist/types/src/packlets/invitations/invitations-handler.d.ts +0 -1
- package/dist/types/src/packlets/invitations/invitations-handler.d.ts.map +1 -1
- package/dist/types/src/packlets/invitations/space-invitation-protocol.d.ts.map +1 -1
- package/dist/types/src/packlets/invitations/utils.d.ts.map +1 -1
- package/dist/types/src/packlets/services/service-context.d.ts +1 -5
- package/dist/types/src/packlets/services/service-context.d.ts.map +1 -1
- package/dist/types/src/packlets/services/util.d.ts.map +1 -1
- package/dist/types/src/packlets/spaces/data-space-manager.d.ts.map +1 -1
- package/dist/types/src/packlets/spaces/epoch-migrations.d.ts.map +1 -1
- package/dist/types/src/packlets/storage/level.d.ts.map +1 -1
- package/dist/types/src/packlets/storage/profile-archive.d.ts.map +1 -1
- package/dist/types/src/packlets/storage/storage.d.ts.map +1 -1
- package/dist/types/src/packlets/storage/util.d.ts.map +1 -1
- package/dist/types/src/packlets/testing/credential-utils.d.ts.map +1 -1
- package/dist/types/src/packlets/testing/invitation-utils.d.ts.map +1 -1
- package/dist/types/src/packlets/testing/test-builder.d.ts +1 -3
- package/dist/types/src/packlets/testing/test-builder.d.ts.map +1 -1
- package/dist/types/src/packlets/worker/worker-session.d.ts.map +1 -1
- package/dist/types/src/version.d.ts +1 -1
- package/dist/types/src/version.d.ts.map +1 -1
- package/package.json +37 -37
- package/src/packlets/devtools/devtools.ts +1 -1
- package/src/packlets/identity/identity-manager.test.ts +1 -2
- package/src/packlets/identity/identity.test.ts +3 -10
- package/src/packlets/services/service-context.ts +1 -7
- package/src/packlets/spaces/data-space-manager.ts +2 -2
- package/src/packlets/testing/test-builder.ts +1 -7
- package/src/version.ts +1 -5
- package/dist/lib/browser/chunk-67R5H5BQ.mjs.map +0 -7
- package/dist/lib/node/chunk-7MSO7RYL.cjs.map +0 -7
|
@@ -11,8 +11,6 @@ import {
|
|
|
11
11
|
MetadataStore,
|
|
12
12
|
MOCK_AUTH_PROVIDER,
|
|
13
13
|
MOCK_AUTH_VERIFIER,
|
|
14
|
-
SnapshotManager,
|
|
15
|
-
SnapshotStore,
|
|
16
14
|
Space,
|
|
17
15
|
SpaceProtocol,
|
|
18
16
|
valueEncoding,
|
|
@@ -34,19 +32,17 @@ const createStores = () => {
|
|
|
34
32
|
const storage = createStorage({ type: StorageType.RAM });
|
|
35
33
|
const metadataStore = new MetadataStore(storage.createDirectory('metadata'));
|
|
36
34
|
const blobStore = new BlobStore(storage.createDirectory('blobs'));
|
|
37
|
-
const snapshotStore = new SnapshotStore(storage.createDirectory('snapshots'));
|
|
38
35
|
|
|
39
36
|
return {
|
|
40
37
|
storage,
|
|
41
38
|
metadataStore,
|
|
42
39
|
blobStore,
|
|
43
|
-
snapshotStore,
|
|
44
40
|
};
|
|
45
41
|
};
|
|
46
42
|
|
|
47
43
|
describe('identity/identity', () => {
|
|
48
44
|
test('create', async () => {
|
|
49
|
-
const { storage, metadataStore, blobStore
|
|
45
|
+
const { storage, metadataStore, blobStore } = createStores();
|
|
50
46
|
|
|
51
47
|
const keyring = new Keyring();
|
|
52
48
|
const identityKey = await keyring.createKey();
|
|
@@ -94,7 +90,6 @@ describe('identity/identity', () => {
|
|
|
94
90
|
feedProvider: (feedKey) => feedStore.openFeed(feedKey),
|
|
95
91
|
memberKey: identityKey,
|
|
96
92
|
metadataStore,
|
|
97
|
-
snapshotManager: new SnapshotManager(snapshotStore, blobStore, protocol.blobSync),
|
|
98
93
|
snapshotId: undefined,
|
|
99
94
|
onDelegatedInvitationStatusChange: async () => {},
|
|
100
95
|
onMemberRolesChanged: async () => {},
|
|
@@ -160,7 +155,7 @@ describe('identity/identity', () => {
|
|
|
160
155
|
// First device
|
|
161
156
|
//
|
|
162
157
|
{
|
|
163
|
-
const { storage, metadataStore, blobStore
|
|
158
|
+
const { storage, metadataStore, blobStore } = createStores();
|
|
164
159
|
|
|
165
160
|
const keyring = new Keyring();
|
|
166
161
|
identityKey = await keyring.createKey();
|
|
@@ -210,7 +205,6 @@ describe('identity/identity', () => {
|
|
|
210
205
|
feedProvider: (feedKey) => feedStore.openFeed(feedKey),
|
|
211
206
|
memberKey: identityKey,
|
|
212
207
|
metadataStore,
|
|
213
|
-
snapshotManager: new SnapshotManager(snapshotStore, blobStore, protocol.blobSync),
|
|
214
208
|
onDelegatedInvitationStatusChange: async () => {},
|
|
215
209
|
onMemberRolesChanged: async () => {},
|
|
216
210
|
});
|
|
@@ -253,7 +247,7 @@ describe('identity/identity', () => {
|
|
|
253
247
|
// Second device
|
|
254
248
|
//
|
|
255
249
|
{
|
|
256
|
-
const { storage, metadataStore, blobStore
|
|
250
|
+
const { storage, metadataStore, blobStore } = createStores();
|
|
257
251
|
|
|
258
252
|
const keyring = new Keyring();
|
|
259
253
|
const deviceKey = await keyring.createKey();
|
|
@@ -303,7 +297,6 @@ describe('identity/identity', () => {
|
|
|
303
297
|
feedProvider: (feedKey) => feedStore.openFeed(feedKey),
|
|
304
298
|
memberKey: identityKey,
|
|
305
299
|
metadataStore,
|
|
306
|
-
snapshotManager: new SnapshotManager(snapshotStore, blobStore, protocol.blobSync),
|
|
307
300
|
onDelegatedInvitationStatusChange: async () => {},
|
|
308
301
|
onMemberRolesChanged: async () => {},
|
|
309
302
|
});
|
|
@@ -7,7 +7,7 @@ import { Context, Resource } from '@dxos/context';
|
|
|
7
7
|
import { getCredentialAssertion, type CredentialProcessor } from '@dxos/credentials';
|
|
8
8
|
import { failUndefined } from '@dxos/debug';
|
|
9
9
|
import { EchoEdgeReplicator, EchoHost } from '@dxos/echo-db';
|
|
10
|
-
import { MeshEchoReplicator, MetadataStore,
|
|
10
|
+
import { MeshEchoReplicator, MetadataStore, SpaceManager, valueEncoding } from '@dxos/echo-pipeline';
|
|
11
11
|
import type { EdgeConnection } from '@dxos/edge-client';
|
|
12
12
|
import { FeedFactory, FeedStore } from '@dxos/feed-store';
|
|
13
13
|
import { invariant } from '@dxos/invariant';
|
|
@@ -57,10 +57,6 @@ export type ServiceContextRuntimeParams = IdentityManagerRuntimeParams &
|
|
|
57
57
|
export class ServiceContext extends Resource {
|
|
58
58
|
public readonly initialized = new Trigger();
|
|
59
59
|
public readonly metadataStore: MetadataStore;
|
|
60
|
-
/**
|
|
61
|
-
* @deprecated
|
|
62
|
-
*/
|
|
63
|
-
public readonly snapshotStore: SnapshotStore;
|
|
64
60
|
public readonly blobStore: BlobStore;
|
|
65
61
|
public readonly feedStore: FeedStore<FeedMessage>;
|
|
66
62
|
public readonly keyring: Keyring;
|
|
@@ -96,7 +92,6 @@ export class ServiceContext extends Resource {
|
|
|
96
92
|
|
|
97
93
|
// TODO(burdon): Move strings to constants.
|
|
98
94
|
this.metadataStore = new MetadataStore(storage.createDirectory('metadata'));
|
|
99
|
-
this.snapshotStore = new SnapshotStore(storage.createDirectory('snapshots'));
|
|
100
95
|
this.blobStore = new BlobStore(storage.createDirectory('blobs'));
|
|
101
96
|
|
|
102
97
|
this.keyring = new Keyring(storage.createDirectory('keyring'));
|
|
@@ -116,7 +111,6 @@ export class ServiceContext extends Resource {
|
|
|
116
111
|
networkManager: this.networkManager,
|
|
117
112
|
blobStore: this.blobStore,
|
|
118
113
|
metadataStore: this.metadataStore,
|
|
119
|
-
snapshotStore: this.snapshotStore,
|
|
120
114
|
disableP2pReplication: this._runtimeParams?.disableP2pReplication,
|
|
121
115
|
});
|
|
122
116
|
|
|
@@ -50,7 +50,7 @@ import { type Teleport } from '@dxos/teleport';
|
|
|
50
50
|
import { Gossip, Presence } from '@dxos/teleport-extension-gossip';
|
|
51
51
|
import { type Timeframe } from '@dxos/timeframe';
|
|
52
52
|
import { trace } from '@dxos/tracing';
|
|
53
|
-
import { ComplexMap,
|
|
53
|
+
import { ComplexMap, setDeep, deferFunction, forEachAsync } from '@dxos/util';
|
|
54
54
|
|
|
55
55
|
import { DataSpace } from './data-space';
|
|
56
56
|
import { spaceGenesis } from './genesis';
|
|
@@ -287,7 +287,7 @@ export class DataSpaceManager extends Resource {
|
|
|
287
287
|
|
|
288
288
|
const propertiesId = generateEchoId();
|
|
289
289
|
document.change((doc: SpaceDoc) => {
|
|
290
|
-
|
|
290
|
+
setDeep(doc, ['objects', propertiesId], properties);
|
|
291
291
|
});
|
|
292
292
|
|
|
293
293
|
await this._echoHost.flush();
|
|
@@ -7,7 +7,7 @@ import { Context } from '@dxos/context';
|
|
|
7
7
|
import { createCredentialSignerWithChain, CredentialGenerator } from '@dxos/credentials';
|
|
8
8
|
import { failUndefined } from '@dxos/debug';
|
|
9
9
|
import { EchoHost } from '@dxos/echo-db';
|
|
10
|
-
import { MetadataStore,
|
|
10
|
+
import { MetadataStore, SpaceManager, valueEncoding, MeshEchoReplicator } from '@dxos/echo-pipeline';
|
|
11
11
|
import { FeedFactory, FeedStore } from '@dxos/feed-store';
|
|
12
12
|
import { Keyring } from '@dxos/keyring';
|
|
13
13
|
import { type LevelDB } from '@dxos/kv-store';
|
|
@@ -103,7 +103,6 @@ export type TestPeerProps = {
|
|
|
103
103
|
networkManager?: SwarmNetworkManager;
|
|
104
104
|
spaceManager?: SpaceManager;
|
|
105
105
|
dataSpaceManager?: DataSpaceManager;
|
|
106
|
-
snapshotStore?: SnapshotStore;
|
|
107
106
|
signingContext?: SigningContext;
|
|
108
107
|
blobStore?: BlobStore;
|
|
109
108
|
echoHost?: EchoHost;
|
|
@@ -155,10 +154,6 @@ export class TestPeer {
|
|
|
155
154
|
return (this._props.blobStore ??= new BlobStore(this.storage.createDirectory('blobs')));
|
|
156
155
|
}
|
|
157
156
|
|
|
158
|
-
get snapshotStore() {
|
|
159
|
-
return (this._props.snapshotStore ??= new SnapshotStore(this.storage.createDirectory('snapshots')));
|
|
160
|
-
}
|
|
161
|
-
|
|
162
157
|
get networkManager() {
|
|
163
158
|
return (this._props.networkManager ??= new SwarmNetworkManager({
|
|
164
159
|
signalManager: new MemorySignalManager(this._signalContext),
|
|
@@ -171,7 +166,6 @@ export class TestPeer {
|
|
|
171
166
|
feedStore: this.feedStore,
|
|
172
167
|
networkManager: this.networkManager,
|
|
173
168
|
metadataStore: this.metadataStore,
|
|
174
|
-
snapshotStore: this.snapshotStore,
|
|
175
169
|
blobStore: this.blobStore,
|
|
176
170
|
}));
|
|
177
171
|
}
|
package/src/version.ts
CHANGED