@dxos/client-services 0.6.3-main.9e4e207 → 0.6.3-main.b88405e
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-LOXM2SQM.mjs → chunk-4ZXBCUKZ.mjs} +10 -10
- package/dist/lib/browser/{chunk-LOXM2SQM.mjs.map → chunk-4ZXBCUKZ.mjs.map} +2 -2
- package/dist/lib/browser/index.mjs +1 -1
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/packlets/testing/index.mjs +1 -1
- package/dist/lib/node/{chunk-MMUSO27N.cjs → chunk-5M2VEOKD.cjs} +13 -13
- package/dist/lib/node/{chunk-MMUSO27N.cjs.map → chunk-5M2VEOKD.cjs.map} +2 -2
- package/dist/lib/node/index.cjs +45 -45
- package/dist/lib/node/meta.json +1 -1
- package/dist/lib/node/packlets/testing/index.cjs +8 -8
- package/dist/types/src/version.d.ts +1 -1
- package/package.json +36 -36
- package/src/packlets/invitations/invitations-handler.ts +7 -7
- package/src/packlets/spaces/spaces-service.ts +1 -1
- package/src/version.ts +1 -1
|
@@ -30,7 +30,7 @@ __export(testing_exports, {
|
|
|
30
30
|
sanitizeInvitation: () => sanitizeInvitation
|
|
31
31
|
});
|
|
32
32
|
module.exports = __toCommonJS(testing_exports);
|
|
33
|
-
var
|
|
33
|
+
var import_chunk_5M2VEOKD = require("../../chunk-5M2VEOKD.cjs");
|
|
34
34
|
var import_credentials = require("@dxos/credentials");
|
|
35
35
|
var import_keys = require("@dxos/keys");
|
|
36
36
|
var import_async = require("@dxos/async");
|
|
@@ -227,7 +227,7 @@ var createInvitation = async (host, options) => {
|
|
|
227
227
|
authMethod: import_services.Invitation.AuthMethod.NONE,
|
|
228
228
|
...options ?? {}
|
|
229
229
|
};
|
|
230
|
-
if (host instanceof
|
|
230
|
+
if (host instanceof import_chunk_5M2VEOKD.ServiceContext) {
|
|
231
231
|
return host.invitationsManager.createInvitation({
|
|
232
232
|
kind: import_services.Invitation.Kind.SPACE,
|
|
233
233
|
...options
|
|
@@ -237,7 +237,7 @@ var createInvitation = async (host, options) => {
|
|
|
237
237
|
};
|
|
238
238
|
var acceptInvitation = (guest, invitation, guestDeviceProfile) => {
|
|
239
239
|
invitation = sanitizeInvitation(invitation);
|
|
240
|
-
if (guest instanceof
|
|
240
|
+
if (guest instanceof import_chunk_5M2VEOKD.ServiceContext) {
|
|
241
241
|
return guest.invitationsManager.acceptInvitation({
|
|
242
242
|
invitation,
|
|
243
243
|
deviceProfile: guestDeviceProfile
|
|
@@ -247,7 +247,7 @@ var acceptInvitation = (guest, invitation, guestDeviceProfile) => {
|
|
|
247
247
|
};
|
|
248
248
|
var __dxlog_file2 = "/home/runner/work/dxos/dxos/packages/sdk/client-services/src/packlets/testing/test-builder.ts";
|
|
249
249
|
var createServiceHost = (config, signalManagerContext) => {
|
|
250
|
-
return new
|
|
250
|
+
return new import_chunk_5M2VEOKD.ClientServicesHost({
|
|
251
251
|
config,
|
|
252
252
|
signalManager: new import_messaging.MemorySignalManager(signalManagerContext),
|
|
253
253
|
transportFactory: import_network_manager.MemoryTransportFactory
|
|
@@ -263,7 +263,7 @@ var createServiceContext = async ({ signalContext = new import_messaging.MemoryS
|
|
|
263
263
|
});
|
|
264
264
|
const level = (0, import_testing.createTestLevel)();
|
|
265
265
|
await level.open();
|
|
266
|
-
return new
|
|
266
|
+
return new import_chunk_5M2VEOKD.ServiceContext(storage, level, networkManager, signalManager, {
|
|
267
267
|
invitationConnectionDefaultParams: {
|
|
268
268
|
controlHeartbeatInterval: 200
|
|
269
269
|
},
|
|
@@ -370,12 +370,12 @@ var TestPeer = class {
|
|
|
370
370
|
});
|
|
371
371
|
}
|
|
372
372
|
get dataSpaceManager() {
|
|
373
|
-
return this._props.dataSpaceManager ??= new
|
|
373
|
+
return this._props.dataSpaceManager ??= new import_chunk_5M2VEOKD.DataSpaceManager(this.spaceManager, this.metadataStore, this.keyring, this.identity, this.feedStore, this.echoHost, this.invitationsManager, this._opts.dataSpaceParams);
|
|
374
374
|
}
|
|
375
375
|
get invitationsManager() {
|
|
376
|
-
return this._props.invitationsManager ??= new
|
|
376
|
+
return this._props.invitationsManager ??= new import_chunk_5M2VEOKD.InvitationsManager(new import_chunk_5M2VEOKD.InvitationsHandler(this.networkManager), (invitation) => {
|
|
377
377
|
if (invitation.kind === import_services2.Invitation.Kind.SPACE) {
|
|
378
|
-
return new
|
|
378
|
+
return new import_chunk_5M2VEOKD.SpaceInvitationProtocol(this.dataSpaceManager, this.identity, this.keyring, invitation.spaceKey);
|
|
379
379
|
} else {
|
|
380
380
|
throw new Error("not implemented");
|
|
381
381
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const DXOS_VERSION = "0.6.3-main.
|
|
1
|
+
export declare const DXOS_VERSION = "0.6.3-main.b88405e";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dxos/client-services",
|
|
3
|
-
"version": "0.6.3-main.
|
|
3
|
+
"version": "0.6.3-main.b88405e",
|
|
4
4
|
"description": "DXOS client services implementation",
|
|
5
5
|
"homepage": "https://dxos.org",
|
|
6
6
|
"bugs": "https://github.com/dxos/dxos/issues",
|
|
@@ -23,45 +23,45 @@
|
|
|
23
23
|
],
|
|
24
24
|
"dependencies": {
|
|
25
25
|
"platform": "^1.3.6",
|
|
26
|
-
"@dxos/async": "0.6.3-main.
|
|
27
|
-
"@dxos/client-protocol": "0.6.3-main.
|
|
28
|
-
"@dxos/
|
|
29
|
-
"@dxos/codec-protobuf": "0.6.3-main.
|
|
30
|
-
"@dxos/
|
|
31
|
-
"@dxos/
|
|
32
|
-
"@dxos/credentials": "0.6.3-main.
|
|
33
|
-
"@dxos/crypto": "0.6.3-main.
|
|
34
|
-
"@dxos/
|
|
35
|
-
"@dxos/
|
|
36
|
-
"@dxos/echo-
|
|
37
|
-
"@dxos/echo-
|
|
38
|
-
"@dxos/
|
|
39
|
-
"@dxos/
|
|
40
|
-
"@dxos/indexing": "0.6.3-main.
|
|
41
|
-
"@dxos/
|
|
42
|
-
"@dxos/
|
|
43
|
-
"@dxos/
|
|
44
|
-
"@dxos/kv-store": "0.6.3-main.
|
|
45
|
-
"@dxos/
|
|
46
|
-
"@dxos/
|
|
47
|
-
"@dxos/
|
|
48
|
-
"@dxos/
|
|
49
|
-
"@dxos/
|
|
50
|
-
"@dxos/protocols": "0.6.3-main.
|
|
51
|
-
"@dxos/random-access-storage": "0.6.3-main.
|
|
52
|
-
"@dxos/rpc": "0.6.3-main.
|
|
53
|
-
"@dxos/teleport": "0.6.3-main.
|
|
54
|
-
"@dxos/teleport-extension-
|
|
55
|
-
"@dxos/teleport-extension-
|
|
56
|
-
"@dxos/timeframe": "0.6.3-main.
|
|
57
|
-
"@dxos/util": "0.6.3-main.
|
|
58
|
-
"@dxos/
|
|
59
|
-
"@dxos/
|
|
26
|
+
"@dxos/async": "0.6.3-main.b88405e",
|
|
27
|
+
"@dxos/client-protocol": "0.6.3-main.b88405e",
|
|
28
|
+
"@dxos/automerge": "0.6.3-main.b88405e",
|
|
29
|
+
"@dxos/codec-protobuf": "0.6.3-main.b88405e",
|
|
30
|
+
"@dxos/config": "0.6.3-main.b88405e",
|
|
31
|
+
"@dxos/context": "0.6.3-main.b88405e",
|
|
32
|
+
"@dxos/credentials": "0.6.3-main.b88405e",
|
|
33
|
+
"@dxos/crypto": "0.6.3-main.b88405e",
|
|
34
|
+
"@dxos/echo-db": "0.6.3-main.b88405e",
|
|
35
|
+
"@dxos/debug": "0.6.3-main.b88405e",
|
|
36
|
+
"@dxos/echo-pipeline": "0.6.3-main.b88405e",
|
|
37
|
+
"@dxos/echo-schema": "0.6.3-main.b88405e",
|
|
38
|
+
"@dxos/feed-store": "0.6.3-main.b88405e",
|
|
39
|
+
"@dxos/echo-protocol": "0.6.3-main.b88405e",
|
|
40
|
+
"@dxos/indexing": "0.6.3-main.b88405e",
|
|
41
|
+
"@dxos/keys": "0.6.3-main.b88405e",
|
|
42
|
+
"@dxos/invariant": "0.6.3-main.b88405e",
|
|
43
|
+
"@dxos/keyring": "0.6.3-main.b88405e",
|
|
44
|
+
"@dxos/kv-store": "0.6.3-main.b88405e",
|
|
45
|
+
"@dxos/lock-file": "0.6.3-main.b88405e",
|
|
46
|
+
"@dxos/log": "0.6.3-main.b88405e",
|
|
47
|
+
"@dxos/messaging": "0.6.3-main.b88405e",
|
|
48
|
+
"@dxos/node-std": "0.6.3-main.b88405e",
|
|
49
|
+
"@dxos/network-manager": "0.6.3-main.b88405e",
|
|
50
|
+
"@dxos/protocols": "0.6.3-main.b88405e",
|
|
51
|
+
"@dxos/random-access-storage": "0.6.3-main.b88405e",
|
|
52
|
+
"@dxos/rpc": "0.6.3-main.b88405e",
|
|
53
|
+
"@dxos/teleport": "0.6.3-main.b88405e",
|
|
54
|
+
"@dxos/teleport-extension-object-sync": "0.6.3-main.b88405e",
|
|
55
|
+
"@dxos/teleport-extension-gossip": "0.6.3-main.b88405e",
|
|
56
|
+
"@dxos/timeframe": "0.6.3-main.b88405e",
|
|
57
|
+
"@dxos/util": "0.6.3-main.b88405e",
|
|
58
|
+
"@dxos/tracing": "0.6.3-main.b88405e",
|
|
59
|
+
"@dxos/websocket-rpc": "0.6.3-main.b88405e"
|
|
60
60
|
},
|
|
61
61
|
"devDependencies": {
|
|
62
62
|
"@types/platform": "^1.3.4",
|
|
63
63
|
"@types/readable-stream": "^2.3.9",
|
|
64
|
-
"@dxos/signal": "0.6.3-main.
|
|
64
|
+
"@dxos/signal": "0.6.3-main.b88405e"
|
|
65
65
|
},
|
|
66
66
|
"publishConfig": {
|
|
67
67
|
"access": "public"
|
|
@@ -73,7 +73,7 @@ export class InvitationsHandler {
|
|
|
73
73
|
protocol: InvitationProtocol,
|
|
74
74
|
invitation: Invitation,
|
|
75
75
|
): void {
|
|
76
|
-
metrics.increment('invitation.created');
|
|
76
|
+
metrics.increment('dxos.invitation.created');
|
|
77
77
|
const guardedState = this._createGuardedState(ctx, invitation, stream);
|
|
78
78
|
// Called for every connecting peer.
|
|
79
79
|
const createExtension = (): InvitationHostExtension => {
|
|
@@ -120,7 +120,7 @@ export class InvitationsHandler {
|
|
|
120
120
|
const deviceKey = await extension.completedTrigger.wait({ timeout: invitation.timeout });
|
|
121
121
|
log('admitted guest', { guest: deviceKey, ...protocol.toJSON() });
|
|
122
122
|
guardedState.set(extension, Invitation.State.SUCCESS);
|
|
123
|
-
metrics.increment('invitation.success');
|
|
123
|
+
metrics.increment('dxos.invitation.success');
|
|
124
124
|
log.trace('dxos.sdk.invitations-handler.host.onOpen', trace.end({ id: traceId }));
|
|
125
125
|
admitted = true;
|
|
126
126
|
|
|
@@ -130,12 +130,12 @@ export class InvitationsHandler {
|
|
|
130
130
|
} catch (err: any) {
|
|
131
131
|
if (err instanceof TimeoutError) {
|
|
132
132
|
if (guardedState.set(extension, Invitation.State.TIMEOUT)) {
|
|
133
|
-
metrics.increment('invitation.timeout');
|
|
133
|
+
metrics.increment('dxos.invitation.timeout');
|
|
134
134
|
log('timeout', { ...protocol.toJSON() });
|
|
135
135
|
}
|
|
136
136
|
} else {
|
|
137
137
|
if (guardedState.error(extension, err)) {
|
|
138
|
-
metrics.increment('invitation.failed');
|
|
138
|
+
metrics.increment('dxos.invitation.failed');
|
|
139
139
|
log.error('failed', err);
|
|
140
140
|
}
|
|
141
141
|
}
|
|
@@ -152,12 +152,12 @@ export class InvitationsHandler {
|
|
|
152
152
|
}
|
|
153
153
|
if (err instanceof TimeoutError) {
|
|
154
154
|
if (guardedState.set(extension, Invitation.State.TIMEOUT)) {
|
|
155
|
-
metrics.increment('invitation.timeout');
|
|
155
|
+
metrics.increment('dxos.invitation.timeout');
|
|
156
156
|
log('timeout', { err });
|
|
157
157
|
}
|
|
158
158
|
} else {
|
|
159
159
|
if (guardedState.error(extension, err)) {
|
|
160
|
-
metrics.increment('invitation.failed');
|
|
160
|
+
metrics.increment('dxos.invitation.failed');
|
|
161
161
|
log.error('failed', err);
|
|
162
162
|
}
|
|
163
163
|
}
|
|
@@ -177,7 +177,7 @@ export class InvitationsHandler {
|
|
|
177
177
|
// ensure the swarm is closed before changing state and closing the stream.
|
|
178
178
|
await swarmConnection.close();
|
|
179
179
|
guardedState.set(null, Invitation.State.EXPIRED);
|
|
180
|
-
metrics.increment('invitation.expired');
|
|
180
|
+
metrics.increment('dxos.invitation.expired');
|
|
181
181
|
await ctx.dispose();
|
|
182
182
|
},
|
|
183
183
|
invitation.created.getTime() + invitation.lifetime * 1000 - Date.now(),
|
|
@@ -324,7 +324,7 @@ export class SpacesServiceImpl implements SpacesService {
|
|
|
324
324
|
const dataSpaceManager = await this._getDataSpaceManager();
|
|
325
325
|
const identity = this._identityManager.identity?.identityKey.truncate();
|
|
326
326
|
if (identity) {
|
|
327
|
-
trace.metrics.gauge('echo.space.count', dataSpaceManager.spaces.size, {
|
|
327
|
+
trace.metrics.gauge('dxos.echo.space.count', dataSpaceManager.spaces.size, {
|
|
328
328
|
tags: { identity },
|
|
329
329
|
});
|
|
330
330
|
}
|
package/src/version.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const DXOS_VERSION = "0.6.3-main.
|
|
1
|
+
export const DXOS_VERSION = "0.6.3-main.b88405e";
|