@dxos/client-services 0.5.9-main.4ed8273 → 0.5.9-main.72c50cd
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-YJ5SPRLY.mjs → chunk-G25WUL6O.mjs} +589 -731
- package/dist/lib/browser/chunk-G25WUL6O.mjs.map +7 -0
- package/dist/lib/browser/index.mjs +1 -1
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/packlets/testing/index.mjs +9 -10
- package/dist/lib/browser/packlets/testing/index.mjs.map +3 -3
- package/dist/lib/node/{chunk-RQHBQWKH.cjs → chunk-FTGPY2GQ.cjs} +809 -947
- package/dist/lib/node/chunk-FTGPY2GQ.cjs.map +7 -0
- package/dist/lib/node/index.cjs +42 -42
- package/dist/lib/node/meta.json +1 -1
- package/dist/lib/node/packlets/testing/index.cjs +15 -16
- package/dist/lib/node/packlets/testing/index.cjs.map +3 -3
- package/dist/types/src/packlets/identity/identity-service.d.ts +7 -14
- package/dist/types/src/packlets/identity/identity-service.d.ts.map +1 -1
- package/dist/types/src/packlets/identity/identity.d.ts +1 -4
- package/dist/types/src/packlets/identity/identity.d.ts.map +1 -1
- package/dist/types/src/packlets/services/service-host.d.ts +1 -1
- package/dist/types/src/packlets/services/service-host.d.ts.map +1 -1
- package/dist/types/src/packlets/spaces/data-space-manager.d.ts +3 -5
- package/dist/types/src/packlets/spaces/data-space-manager.d.ts.map +1 -1
- package/dist/types/src/packlets/spaces/data-space.d.ts.map +1 -1
- package/dist/types/src/packlets/testing/test-builder.d.ts +6 -8
- package/dist/types/src/packlets/testing/test-builder.d.ts.map +1 -1
- package/dist/types/src/version.d.ts +1 -1
- package/package.json +36 -36
- package/src/packlets/identity/identity-service.test.ts +5 -35
- package/src/packlets/identity/identity-service.ts +8 -50
- package/src/packlets/identity/identity.ts +2 -25
- package/src/packlets/services/service-host.ts +40 -13
- package/src/packlets/spaces/data-space-manager.test.ts +1 -46
- package/src/packlets/spaces/data-space-manager.ts +25 -54
- package/src/packlets/spaces/data-space.ts +5 -10
- package/src/packlets/testing/test-builder.ts +6 -11
- package/src/version.ts +1 -1
- package/dist/lib/browser/chunk-YJ5SPRLY.mjs.map +0 -7
- package/dist/lib/node/chunk-RQHBQWKH.cjs.map +0 -7
- package/dist/types/src/packlets/identity/default-space-state-machine.d.ts +0 -19
- package/dist/types/src/packlets/identity/default-space-state-machine.d.ts.map +0 -1
- package/src/packlets/identity/default-space-state-machine.ts +0 -44
|
@@ -19,8 +19,8 @@ import { createStorage, StorageType, type Storage } from '@dxos/random-access-st
|
|
|
19
19
|
import { BlobStore } from '@dxos/teleport-extension-object-sync';
|
|
20
20
|
|
|
21
21
|
import { InvitationsHandler, InvitationsManager, SpaceInvitationProtocol } from '../invitations';
|
|
22
|
-
import { ClientServicesHost, ServiceContext
|
|
23
|
-
import { DataSpaceManager, type
|
|
22
|
+
import { ClientServicesHost, ServiceContext } from '../services';
|
|
23
|
+
import { DataSpaceManager, type SigningContext } from '../spaces';
|
|
24
24
|
|
|
25
25
|
//
|
|
26
26
|
// TODO(burdon): Replace with test builder.
|
|
@@ -37,11 +37,9 @@ export const createServiceHost = (config: Config, signalManagerContext: MemorySi
|
|
|
37
37
|
export const createServiceContext = async ({
|
|
38
38
|
signalContext = new MemorySignalManagerContext(),
|
|
39
39
|
storage = createStorage({ type: StorageType.RAM }),
|
|
40
|
-
runtimeParams,
|
|
41
40
|
}: {
|
|
42
41
|
signalContext?: MemorySignalManagerContext;
|
|
43
42
|
storage?: Storage;
|
|
44
|
-
runtimeParams?: ServiceContextRuntimeParams;
|
|
45
43
|
} = {}) => {
|
|
46
44
|
const signalManager = new MemorySignalManager(signalContext);
|
|
47
45
|
const networkManager = new SwarmNetworkManager({
|
|
@@ -53,7 +51,6 @@ export const createServiceContext = async ({
|
|
|
53
51
|
|
|
54
52
|
return new ServiceContext(storage, level, networkManager, signalManager, {
|
|
55
53
|
invitationConnectionDefaultParams: { controlHeartbeatInterval: 200 },
|
|
56
|
-
...runtimeParams,
|
|
57
54
|
});
|
|
58
55
|
};
|
|
59
56
|
|
|
@@ -91,7 +88,6 @@ export class TestBuilder {
|
|
|
91
88
|
|
|
92
89
|
export type TestPeerOpts = {
|
|
93
90
|
dataStore?: StorageType;
|
|
94
|
-
dataSpaceParams?: DataSpaceManagerRuntimeParams;
|
|
95
91
|
};
|
|
96
92
|
|
|
97
93
|
export type TestPeerProps = {
|
|
@@ -114,8 +110,8 @@ export class TestPeer {
|
|
|
114
110
|
private _props: TestPeerProps = {};
|
|
115
111
|
|
|
116
112
|
constructor(
|
|
117
|
-
private readonly
|
|
118
|
-
private readonly
|
|
113
|
+
private readonly signalContext: MemorySignalManagerContext,
|
|
114
|
+
private readonly opts: TestPeerOpts = { dataStore: StorageType.RAM },
|
|
119
115
|
) {}
|
|
120
116
|
|
|
121
117
|
get props() {
|
|
@@ -123,7 +119,7 @@ export class TestPeer {
|
|
|
123
119
|
}
|
|
124
120
|
|
|
125
121
|
get storage() {
|
|
126
|
-
return (this._props.storage ??= createStorage({ type: this.
|
|
122
|
+
return (this._props.storage ??= createStorage({ type: this.opts.dataStore }));
|
|
127
123
|
}
|
|
128
124
|
|
|
129
125
|
get keyring() {
|
|
@@ -160,7 +156,7 @@ export class TestPeer {
|
|
|
160
156
|
|
|
161
157
|
get networkManager() {
|
|
162
158
|
return (this._props.networkManager ??= new SwarmNetworkManager({
|
|
163
|
-
signalManager: new MemorySignalManager(this.
|
|
159
|
+
signalManager: new MemorySignalManager(this.signalContext),
|
|
164
160
|
transportFactory: MemoryTransportFactory,
|
|
165
161
|
}));
|
|
166
162
|
}
|
|
@@ -195,7 +191,6 @@ export class TestPeer {
|
|
|
195
191
|
this.feedStore,
|
|
196
192
|
this.echoHost,
|
|
197
193
|
this.invitationsManager,
|
|
198
|
-
this._opts.dataSpaceParams,
|
|
199
194
|
));
|
|
200
195
|
}
|
|
201
196
|
|
package/src/version.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const DXOS_VERSION = "0.5.9-main.
|
|
1
|
+
export const DXOS_VERSION = "0.5.9-main.72c50cd";
|