@dxos/client-services 0.6.9 → 0.6.10-main.3cfcc89
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-67XXCVHL.mjs → chunk-O6MPOXIE.mjs} +623 -584
- package/dist/lib/browser/chunk-O6MPOXIE.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 +7 -8
- package/dist/lib/browser/testing/index.mjs.map +3 -3
- package/dist/lib/node/{chunk-WTK4Q3EG.cjs → chunk-KMJ5N75W.cjs} +669 -630
- package/dist/lib/node/chunk-KMJ5N75W.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 +13 -14
- package/dist/lib/node/testing/index.cjs.map +3 -3
- package/dist/types/src/packlets/devtools/feeds.d.ts +3 -1
- package/dist/types/src/packlets/devtools/feeds.d.ts.map +1 -1
- package/dist/types/src/packlets/invitations/invitation-guest-extenstion.d.ts.map +1 -1
- package/dist/types/src/packlets/invitations/invitation-host-extension.d.ts.map +1 -1
- package/dist/types/src/packlets/services/service-host.d.ts.map +1 -1
- package/dist/types/src/packlets/testing/test-builder.d.ts +2 -4
- package/dist/types/src/packlets/testing/test-builder.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/devtools/feeds.ts +37 -4
- package/src/packlets/identity/authenticator.ts +1 -1
- package/src/packlets/invitations/invitation-guest-extenstion.ts +2 -1
- package/src/packlets/invitations/invitation-host-extension.ts +2 -1
- package/src/packlets/services/service-context.ts +3 -3
- package/src/packlets/services/service-host.ts +4 -5
- package/src/packlets/services/service-registry.test.ts +1 -1
- package/src/packlets/spaces/edge-feed-replicator.ts +2 -2
- package/src/packlets/spaces/notarization-plugin.ts +1 -1
- package/src/packlets/testing/test-builder.ts +3 -10
- package/src/version.ts +1 -5
- package/dist/lib/browser/chunk-67XXCVHL.mjs.map +0 -7
- package/dist/lib/node/chunk-WTK4Q3EG.cjs.map +0 -7
|
@@ -212,9 +212,8 @@ export class ClientServicesHost {
|
|
|
212
212
|
|
|
213
213
|
const edgeEndpoint = config?.get('runtime.services.edge.url');
|
|
214
214
|
if (edgeEndpoint) {
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
});
|
|
215
|
+
const randomKey = PublicKey.random().toHex();
|
|
216
|
+
this._edgeConnection = new EdgeClient(randomKey, randomKey, { socketEndpoint: edgeEndpoint });
|
|
218
217
|
}
|
|
219
218
|
|
|
220
219
|
const {
|
|
@@ -237,8 +236,8 @@ export class ClientServicesHost {
|
|
|
237
236
|
signalManager,
|
|
238
237
|
peerInfo: this._edgeConnection
|
|
239
238
|
? {
|
|
240
|
-
identityKey: this._edgeConnection.identityKey
|
|
241
|
-
peerKey: this._edgeConnection.
|
|
239
|
+
identityKey: this._edgeConnection.identityKey,
|
|
240
|
+
peerKey: this._edgeConnection.peerKey,
|
|
242
241
|
}
|
|
243
242
|
: undefined,
|
|
244
243
|
});
|
|
@@ -9,7 +9,7 @@ import { type ClientServices } from '@dxos/client-protocol';
|
|
|
9
9
|
import { Config } from '@dxos/config';
|
|
10
10
|
import { Context } from '@dxos/context';
|
|
11
11
|
import { log } from '@dxos/log';
|
|
12
|
-
import { schema } from '@dxos/protocols';
|
|
12
|
+
import { schema } from '@dxos/protocols/proto';
|
|
13
13
|
import { type SystemService, SystemStatus } from '@dxos/protocols/proto/dxos/client/services';
|
|
14
14
|
import { createLinkedPorts, createProtoRpcPeer, createServiceBundle } from '@dxos/rpc';
|
|
15
15
|
import { describe, test } from '@dxos/test';
|
|
@@ -120,8 +120,8 @@ export class EdgeFeedReplicator extends Resource {
|
|
|
120
120
|
await this._messenger.send(
|
|
121
121
|
buf.create(RouterMessageSchema, {
|
|
122
122
|
source: {
|
|
123
|
-
identityKey: this._messenger.identityKey
|
|
124
|
-
peerKey: this._messenger.
|
|
123
|
+
identityKey: this._messenger.identityKey,
|
|
124
|
+
peerKey: this._messenger.peerKey,
|
|
125
125
|
},
|
|
126
126
|
serviceId: `${EdgeService.FEED_REPLICATOR}:${this._spaceId}`,
|
|
127
127
|
payload: { value: payloadValue },
|
|
@@ -9,7 +9,7 @@ import { type FeedWriter } from '@dxos/feed-store';
|
|
|
9
9
|
import { invariant } from '@dxos/invariant';
|
|
10
10
|
import { PublicKey } from '@dxos/keys';
|
|
11
11
|
import { log } from '@dxos/log';
|
|
12
|
-
import { schema } from '@dxos/protocols';
|
|
12
|
+
import { schema } from '@dxos/protocols/proto';
|
|
13
13
|
import { type Credential } from '@dxos/protocols/proto/dxos/halo/credentials';
|
|
14
14
|
import { type NotarizationService, type NotarizeRequest } from '@dxos/protocols/proto/dxos/mesh/teleport/notarization';
|
|
15
15
|
import { type ExtensionContext, RpcExtension } from '@dxos/teleport';
|
|
@@ -8,7 +8,6 @@ import { createCredentialSignerWithChain, CredentialGenerator } from '@dxos/cred
|
|
|
8
8
|
import { failUndefined } from '@dxos/debug';
|
|
9
9
|
import { EchoHost } from '@dxos/echo-db';
|
|
10
10
|
import { MetadataStore, SpaceManager, valueEncoding, MeshEchoReplicator } from '@dxos/echo-pipeline';
|
|
11
|
-
import { type EdgeConnection } from '@dxos/edge-client';
|
|
12
11
|
import { FeedFactory, FeedStore } from '@dxos/feed-store';
|
|
13
12
|
import { Keyring } from '@dxos/keyring';
|
|
14
13
|
import { type LevelDB } from '@dxos/kv-store';
|
|
@@ -42,12 +41,10 @@ export const createServiceContext = async ({
|
|
|
42
41
|
},
|
|
43
42
|
storage = createStorage({ type: StorageType.RAM }),
|
|
44
43
|
runtimeParams,
|
|
45
|
-
edgeConnection,
|
|
46
44
|
}: {
|
|
47
45
|
signalManagerFactory?: () => Promise<SignalManager>;
|
|
48
46
|
storage?: Storage;
|
|
49
47
|
runtimeParams?: ServiceContextRuntimeParams;
|
|
50
|
-
edgeConnection?: EdgeConnection;
|
|
51
48
|
} = {}) => {
|
|
52
49
|
const signalManager = await signalManagerFactory();
|
|
53
50
|
const networkManager = new SwarmNetworkManager({
|
|
@@ -57,24 +54,20 @@ export const createServiceContext = async ({
|
|
|
57
54
|
const level = createTestLevel();
|
|
58
55
|
await level.open();
|
|
59
56
|
|
|
60
|
-
return new ServiceContext(storage, level, networkManager, signalManager,
|
|
57
|
+
return new ServiceContext(storage, level, networkManager, signalManager, undefined, {
|
|
61
58
|
invitationConnectionDefaultParams: { controlHeartbeatInterval: 200 },
|
|
62
59
|
...runtimeParams,
|
|
63
60
|
});
|
|
64
61
|
};
|
|
65
62
|
|
|
66
|
-
export const createPeers = async (
|
|
67
|
-
numPeers: number,
|
|
68
|
-
signalManagerFactory?: () => Promise<SignalManager>,
|
|
69
|
-
edgeConnection?: EdgeConnection,
|
|
70
|
-
) => {
|
|
63
|
+
export const createPeers = async (numPeers: number, signalManagerFactory?: () => Promise<SignalManager>) => {
|
|
71
64
|
if (!signalManagerFactory) {
|
|
72
65
|
const signalContext = new MemorySignalManagerContext();
|
|
73
66
|
signalManagerFactory = async () => new MemorySignalManager(signalContext);
|
|
74
67
|
}
|
|
75
68
|
return await Promise.all(
|
|
76
69
|
Array.from(Array(numPeers)).map(async () => {
|
|
77
|
-
const peer = await createServiceContext({ signalManagerFactory
|
|
70
|
+
const peer = await createServiceContext({ signalManagerFactory });
|
|
78
71
|
await peer.open(new Context());
|
|
79
72
|
return peer;
|
|
80
73
|
}),
|
package/src/version.ts
CHANGED