@dxos/client-services 0.7.5-main.9cb18ac → 0.7.5-main.9d2a38b
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-2VSGKKFD.mjs → chunk-RFZHCLFI.mjs} +46 -17
- package/dist/lib/browser/chunk-RFZHCLFI.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 +1 -1
- package/dist/lib/node/{chunk-B64P5OCZ.cjs → chunk-WCTGAZLA.cjs} +81 -52
- package/dist/lib/node/chunk-WCTGAZLA.cjs.map +7 -0
- package/dist/lib/node/index.cjs +47 -47
- package/dist/lib/node/meta.json +1 -1
- package/dist/lib/node/testing/index.cjs +8 -8
- package/dist/lib/node-esm/{chunk-C3BNCKWT.mjs → chunk-RSOLUJE6.mjs} +46 -17
- package/dist/lib/node-esm/chunk-RSOLUJE6.mjs.map +7 -0
- package/dist/lib/node-esm/index.mjs +1 -1
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/lib/node-esm/testing/index.mjs +1 -1
- package/dist/types/src/packlets/agents/edge-agent-service.d.ts +1 -1
- package/dist/types/src/packlets/agents/edge-agent-service.d.ts.map +1 -1
- package/dist/types/src/packlets/devices/devices-service.d.ts +1 -1
- package/dist/types/src/packlets/devices/devices-service.d.ts.map +1 -1
- package/dist/types/src/packlets/devtools/devtools.d.ts +1 -1
- package/dist/types/src/packlets/devtools/devtools.d.ts.map +1 -1
- package/dist/types/src/packlets/devtools/feeds.d.ts +1 -1
- package/dist/types/src/packlets/devtools/feeds.d.ts.map +1 -1
- package/dist/types/src/packlets/devtools/keys.d.ts +1 -1
- package/dist/types/src/packlets/devtools/keys.d.ts.map +1 -1
- package/dist/types/src/packlets/devtools/metadata.d.ts +1 -1
- package/dist/types/src/packlets/devtools/metadata.d.ts.map +1 -1
- package/dist/types/src/packlets/devtools/network.d.ts +1 -1
- package/dist/types/src/packlets/devtools/network.d.ts.map +1 -1
- package/dist/types/src/packlets/devtools/spaces.d.ts +1 -1
- package/dist/types/src/packlets/devtools/spaces.d.ts.map +1 -1
- package/dist/types/src/packlets/identity/contacts-service.d.ts +1 -1
- package/dist/types/src/packlets/identity/contacts-service.d.ts.map +1 -1
- package/dist/types/src/packlets/identity/identity-service.d.ts +1 -1
- package/dist/types/src/packlets/identity/identity-service.d.ts.map +1 -1
- package/dist/types/src/packlets/invitations/invitations-service.d.ts +1 -1
- package/dist/types/src/packlets/invitations/invitations-service.d.ts.map +1 -1
- package/dist/types/src/packlets/logging/logging-service.d.ts +1 -1
- package/dist/types/src/packlets/logging/logging-service.d.ts.map +1 -1
- package/dist/types/src/packlets/network/network-service.d.ts +9 -2
- package/dist/types/src/packlets/network/network-service.d.ts.map +1 -1
- package/dist/types/src/packlets/spaces/spaces-service.d.ts +1 -1
- package/dist/types/src/packlets/spaces/spaces-service.d.ts.map +1 -1
- package/dist/types/src/packlets/system/system-service.d.ts +1 -1
- package/dist/types/src/packlets/system/system-service.d.ts.map +1 -1
- package/dist/types/src/version.d.ts +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +38 -38
- package/src/packlets/agents/edge-agent-service.ts +1 -1
- package/src/packlets/devices/devices-service.ts +1 -1
- package/src/packlets/devtools/devtools.ts +1 -1
- package/src/packlets/devtools/feeds.ts +1 -1
- package/src/packlets/devtools/keys.ts +1 -1
- package/src/packlets/devtools/metadata.ts +1 -1
- package/src/packlets/devtools/network.ts +1 -1
- package/src/packlets/devtools/spaces.ts +1 -1
- package/src/packlets/identity/contacts-service.ts +1 -1
- package/src/packlets/identity/identity-service.ts +1 -1
- package/src/packlets/invitations/invitations-service.ts +1 -1
- package/src/packlets/logging/logging-service.ts +1 -1
- package/src/packlets/network/network-service.ts +39 -1
- package/src/packlets/spaces/spaces-service.ts +1 -1
- package/src/packlets/system/system-service.ts +1 -1
- package/src/version.ts +1 -1
- package/dist/lib/browser/chunk-2VSGKKFD.mjs.map +0 -7
- package/dist/lib/node/chunk-B64P5OCZ.cjs.map +0 -7
- package/dist/lib/node-esm/chunk-C3BNCKWT.mjs.map +0 -7
|
@@ -32,7 +32,7 @@ __export(testing_exports, {
|
|
|
32
32
|
sanitizeInvitation: () => sanitizeInvitation
|
|
33
33
|
});
|
|
34
34
|
module.exports = __toCommonJS(testing_exports);
|
|
35
|
-
var
|
|
35
|
+
var import_chunk_WCTGAZLA = require("../chunk-WCTGAZLA.cjs");
|
|
36
36
|
var import_credentials = require("@dxos/credentials");
|
|
37
37
|
var import_keys = require("@dxos/keys");
|
|
38
38
|
var import_async = require("@dxos/async");
|
|
@@ -235,7 +235,7 @@ var createInvitation = async (host, options) => {
|
|
|
235
235
|
authMethod: import_services.Invitation.AuthMethod.NONE,
|
|
236
236
|
...options ?? {}
|
|
237
237
|
};
|
|
238
|
-
if (host instanceof
|
|
238
|
+
if (host instanceof import_chunk_WCTGAZLA.ServiceContext) {
|
|
239
239
|
return host.invitationsManager.createInvitation({
|
|
240
240
|
kind: import_services.Invitation.Kind.SPACE,
|
|
241
241
|
...options
|
|
@@ -245,7 +245,7 @@ var createInvitation = async (host, options) => {
|
|
|
245
245
|
};
|
|
246
246
|
var acceptInvitation = (guest, invitation, guestDeviceProfile) => {
|
|
247
247
|
invitation = sanitizeInvitation(invitation);
|
|
248
|
-
if (guest instanceof
|
|
248
|
+
if (guest instanceof import_chunk_WCTGAZLA.ServiceContext) {
|
|
249
249
|
return guest.invitationsManager.acceptInvitation({
|
|
250
250
|
invitation,
|
|
251
251
|
deviceProfile: guestDeviceProfile
|
|
@@ -255,7 +255,7 @@ var acceptInvitation = (guest, invitation, guestDeviceProfile) => {
|
|
|
255
255
|
};
|
|
256
256
|
var __dxlog_file2 = "/home/runner/work/dxos/dxos/packages/sdk/client-services/src/packlets/testing/test-builder.ts";
|
|
257
257
|
var createServiceHost = (config, signalManagerContext) => {
|
|
258
|
-
return new
|
|
258
|
+
return new import_chunk_WCTGAZLA.ClientServicesHost({
|
|
259
259
|
config,
|
|
260
260
|
signalManager: new import_messaging.MemorySignalManager(signalManagerContext),
|
|
261
261
|
transportFactory: import_network_manager.MemoryTransportFactory
|
|
@@ -274,7 +274,7 @@ var createServiceContext = async ({ signalManagerFactory = async () => {
|
|
|
274
274
|
});
|
|
275
275
|
const level = (0, import_testing.createTestLevel)();
|
|
276
276
|
await level.open();
|
|
277
|
-
return new
|
|
277
|
+
return new import_chunk_WCTGAZLA.ServiceContext(storage, level, networkManager, signalManager, void 0, void 0, {
|
|
278
278
|
invitationConnectionDefaultParams: {
|
|
279
279
|
teleport: {
|
|
280
280
|
controlHeartbeatInterval: 200
|
|
@@ -385,7 +385,7 @@ var TestPeer = class {
|
|
|
385
385
|
return this._props.meshEchoReplicator ??= new import_echo_pipeline.MeshEchoReplicator();
|
|
386
386
|
}
|
|
387
387
|
get dataSpaceManager() {
|
|
388
|
-
return this._props.dataSpaceManager ??= new
|
|
388
|
+
return this._props.dataSpaceManager ??= new import_chunk_WCTGAZLA.DataSpaceManager({
|
|
389
389
|
spaceManager: this.spaceManager,
|
|
390
390
|
metadataStore: this.metadataStore,
|
|
391
391
|
keyring: this.keyring,
|
|
@@ -400,9 +400,9 @@ var TestPeer = class {
|
|
|
400
400
|
});
|
|
401
401
|
}
|
|
402
402
|
get invitationsManager() {
|
|
403
|
-
return this._props.invitationsManager ??= new
|
|
403
|
+
return this._props.invitationsManager ??= new import_chunk_WCTGAZLA.InvitationsManager(new import_chunk_WCTGAZLA.InvitationsHandler(this.networkManager), (invitation) => {
|
|
404
404
|
if (invitation.kind === import_services2.Invitation.Kind.SPACE) {
|
|
405
|
-
return new
|
|
405
|
+
return new import_chunk_WCTGAZLA.SpaceInvitationProtocol(this.dataSpaceManager, this.identity, this.keyring, invitation.spaceKey);
|
|
406
406
|
} else {
|
|
407
407
|
throw new Error("not implemented");
|
|
408
408
|
}
|
|
@@ -2,7 +2,7 @@ import { createRequire } from 'node:module';const require = createRequire(import
|
|
|
2
2
|
|
|
3
3
|
// packages/sdk/client-services/src/packlets/devtools/feeds.ts
|
|
4
4
|
import { EventSubscriptions } from "@dxos/async";
|
|
5
|
-
import { Stream } from "@dxos/codec-protobuf";
|
|
5
|
+
import { Stream } from "@dxos/codec-protobuf/stream";
|
|
6
6
|
import { FeedIterator } from "@dxos/feed-store";
|
|
7
7
|
import { PublicKey } from "@dxos/keys";
|
|
8
8
|
import { log } from "@dxos/log";
|
|
@@ -113,7 +113,7 @@ var subscribeToFeedBlocks = ({ feedStore }, { feedKey, maxBlocks = 10 }) => {
|
|
|
113
113
|
};
|
|
114
114
|
|
|
115
115
|
// packages/sdk/client-services/src/packlets/devtools/network.ts
|
|
116
|
-
import { Stream as Stream2 } from "@dxos/codec-protobuf";
|
|
116
|
+
import { Stream as Stream2 } from "@dxos/codec-protobuf/stream";
|
|
117
117
|
import { Context } from "@dxos/context";
|
|
118
118
|
import { PublicKey as PublicKey2 } from "@dxos/keys";
|
|
119
119
|
var __dxlog_file2 = "/home/runner/work/dxos/dxos/packages/sdk/client-services/src/packlets/devtools/network.ts";
|
|
@@ -210,7 +210,7 @@ var getNetworkPeers = ({ networkManager }, request) => {
|
|
|
210
210
|
};
|
|
211
211
|
|
|
212
212
|
// packages/sdk/client-services/src/packlets/devtools/spaces.ts
|
|
213
|
-
import { Stream as Stream3 } from "@dxos/codec-protobuf";
|
|
213
|
+
import { Stream as Stream3 } from "@dxos/codec-protobuf/stream";
|
|
214
214
|
var subscribeToSpaces = (context, { spaceKeys = [] }) => {
|
|
215
215
|
return new Stream3(({ next }) => {
|
|
216
216
|
let unsubscribe;
|
|
@@ -247,11 +247,11 @@ var subscribeToSpaces = (context, { spaceKeys = [] }) => {
|
|
|
247
247
|
|
|
248
248
|
// packages/sdk/client-services/src/packlets/devtools/devtools.ts
|
|
249
249
|
import { Event as AsyncEvent } from "@dxos/async";
|
|
250
|
-
import { Stream as Stream6 } from "@dxos/codec-protobuf";
|
|
250
|
+
import { Stream as Stream6 } from "@dxos/codec-protobuf/stream";
|
|
251
251
|
|
|
252
252
|
// packages/sdk/client-services/src/packlets/devtools/keys.ts
|
|
253
253
|
import { scheduleTask } from "@dxos/async";
|
|
254
|
-
import { Stream as Stream4 } from "@dxos/codec-protobuf";
|
|
254
|
+
import { Stream as Stream4 } from "@dxos/codec-protobuf/stream";
|
|
255
255
|
var subscribeToKeyringKeys = ({ keyring }) => new Stream4(({ next, ctx }) => {
|
|
256
256
|
const update = async () => {
|
|
257
257
|
next({
|
|
@@ -263,7 +263,7 @@ var subscribeToKeyringKeys = ({ keyring }) => new Stream4(({ next, ctx }) => {
|
|
|
263
263
|
});
|
|
264
264
|
|
|
265
265
|
// packages/sdk/client-services/src/packlets/devtools/metadata.ts
|
|
266
|
-
import { Stream as Stream5 } from "@dxos/codec-protobuf";
|
|
266
|
+
import { Stream as Stream5 } from "@dxos/codec-protobuf/stream";
|
|
267
267
|
var subscribeToMetadata = ({ context }) => new Stream5(({ next, ctx }) => {
|
|
268
268
|
context.metadataStore.update.on(ctx, (data) => next({
|
|
269
269
|
metadata: data
|
|
@@ -397,7 +397,7 @@ import { SpaceMember } from "@dxos/protocols/proto/dxos/client/services";
|
|
|
397
397
|
import { TRACE_PROCESSOR } from "@dxos/tracing";
|
|
398
398
|
|
|
399
399
|
// packages/sdk/client-services/src/version.ts
|
|
400
|
-
var DXOS_VERSION = "0.7.5-main.
|
|
400
|
+
var DXOS_VERSION = "0.7.5-main.9d2a38b";
|
|
401
401
|
|
|
402
402
|
// packages/sdk/client-services/src/packlets/services/platform.ts
|
|
403
403
|
import { Platform } from "@dxos/protocols/proto/dxos/client/services";
|
|
@@ -2597,7 +2597,7 @@ DataSpaceManager = _ts_decorate3([
|
|
|
2597
2597
|
|
|
2598
2598
|
// packages/sdk/client-services/src/packlets/spaces/spaces-service.ts
|
|
2599
2599
|
import { EventSubscriptions as EventSubscriptions2, UpdateScheduler, scheduleTask as scheduleTask3 } from "@dxos/async";
|
|
2600
|
-
import { Stream as Stream7 } from "@dxos/codec-protobuf";
|
|
2600
|
+
import { Stream as Stream7 } from "@dxos/codec-protobuf/stream";
|
|
2601
2601
|
import { createAdmissionCredentials as createAdmissionCredentials2, getCredentialAssertion as getCredentialAssertion3 } from "@dxos/credentials";
|
|
2602
2602
|
import { raise } from "@dxos/debug";
|
|
2603
2603
|
import { writeMessages as writeMessages2 } from "@dxos/feed-store";
|
|
@@ -3683,7 +3683,7 @@ IdentityManager = _ts_decorate5([
|
|
|
3683
3683
|
|
|
3684
3684
|
// packages/sdk/client-services/src/packlets/identity/identity-service.ts
|
|
3685
3685
|
import { Trigger as Trigger3, sleep as sleep2 } from "@dxos/async";
|
|
3686
|
-
import { Stream as Stream8 } from "@dxos/codec-protobuf";
|
|
3686
|
+
import { Stream as Stream8 } from "@dxos/codec-protobuf/stream";
|
|
3687
3687
|
import { Resource as Resource5 } from "@dxos/context";
|
|
3688
3688
|
import { createCredential as createCredential2, signPresentation } from "@dxos/credentials";
|
|
3689
3689
|
import { invariant as invariant9 } from "@dxos/invariant";
|
|
@@ -6067,7 +6067,7 @@ var createAdmissionKeypair = () => {
|
|
|
6067
6067
|
};
|
|
6068
6068
|
|
|
6069
6069
|
// packages/sdk/client-services/src/packlets/invitations/invitations-service.ts
|
|
6070
|
-
import { Stream as Stream9 } from "@dxos/codec-protobuf";
|
|
6070
|
+
import { Stream as Stream9 } from "@dxos/codec-protobuf/stream";
|
|
6071
6071
|
import { QueryInvitationsResponse } from "@dxos/protocols/proto/dxos/client/services";
|
|
6072
6072
|
import { trace as trace8 } from "@dxos/tracing";
|
|
6073
6073
|
var InvitationsServiceImpl = class {
|
|
@@ -7184,7 +7184,7 @@ _ts_decorate9([
|
|
|
7184
7184
|
], EdgeAgentManager.prototype, "createAgent", null);
|
|
7185
7185
|
|
|
7186
7186
|
// packages/sdk/client-services/src/packlets/agents/edge-agent-service.ts
|
|
7187
|
-
import { Stream as Stream11 } from "@dxos/codec-protobuf";
|
|
7187
|
+
import { Stream as Stream11 } from "@dxos/codec-protobuf/stream";
|
|
7188
7188
|
import { EdgeAgentStatus as EdgeAgentStatus2 } from "@dxos/protocols";
|
|
7189
7189
|
import { QueryAgentStatusResponse, QueryEdgeStatusResponse } from "@dxos/protocols/proto/dxos/client/services";
|
|
7190
7190
|
var EdgeAgentServiceImpl = class {
|
|
@@ -8091,7 +8091,7 @@ import { WebsocketRpcClient } from "@dxos/websocket-rpc";
|
|
|
8091
8091
|
|
|
8092
8092
|
// packages/sdk/client-services/src/packlets/devices/devices-service.ts
|
|
8093
8093
|
import { EventSubscriptions as EventSubscriptions3 } from "@dxos/async";
|
|
8094
|
-
import { Stream as Stream12 } from "@dxos/codec-protobuf";
|
|
8094
|
+
import { Stream as Stream12 } from "@dxos/codec-protobuf/stream";
|
|
8095
8095
|
import { invariant as invariant23 } from "@dxos/invariant";
|
|
8096
8096
|
import { Device as Device2, DeviceKind as DeviceKind2 } from "@dxos/protocols/proto/dxos/client/services";
|
|
8097
8097
|
var __dxlog_file29 = "/home/runner/work/dxos/dxos/packages/sdk/client-services/src/packlets/devices/devices-service.ts";
|
|
@@ -8181,7 +8181,7 @@ var DevicesServiceImpl = class {
|
|
|
8181
8181
|
|
|
8182
8182
|
// packages/sdk/client-services/src/packlets/identity/contacts-service.ts
|
|
8183
8183
|
import { EventSubscriptions as EventSubscriptions4, scheduleTask as scheduleTask9, UpdateScheduler as UpdateScheduler2 } from "@dxos/async";
|
|
8184
|
-
import { Stream as Stream13 } from "@dxos/codec-protobuf";
|
|
8184
|
+
import { Stream as Stream13 } from "@dxos/codec-protobuf/stream";
|
|
8185
8185
|
import { PublicKey as PublicKey17 } from "@dxos/keys";
|
|
8186
8186
|
import { ComplexMap as ComplexMap5, ComplexSet as ComplexSet6 } from "@dxos/util";
|
|
8187
8187
|
var ContactsServiceImpl = class {
|
|
@@ -8264,7 +8264,7 @@ var ContactsServiceImpl = class {
|
|
|
8264
8264
|
|
|
8265
8265
|
// packages/sdk/client-services/src/packlets/logging/logging-service.ts
|
|
8266
8266
|
import { Event as Event10 } from "@dxos/async";
|
|
8267
|
-
import { Stream as Stream14 } from "@dxos/codec-protobuf";
|
|
8267
|
+
import { Stream as Stream14 } from "@dxos/codec-protobuf/stream";
|
|
8268
8268
|
import { PublicKey as PublicKey18 } from "@dxos/keys";
|
|
8269
8269
|
import { getContextFromEntry, log as log25 } from "@dxos/log";
|
|
8270
8270
|
import { QueryLogsRequest } from "@dxos/protocols/proto/dxos/client/services";
|
|
@@ -8387,7 +8387,7 @@ var shouldLog = (entry2, request) => {
|
|
|
8387
8387
|
var LOG_PROCESSING = 0;
|
|
8388
8388
|
|
|
8389
8389
|
// packages/sdk/client-services/src/packlets/network/network-service.ts
|
|
8390
|
-
import { Stream as Stream15 } from "@dxos/codec-protobuf";
|
|
8390
|
+
import { Stream as Stream15 } from "@dxos/codec-protobuf/stream";
|
|
8391
8391
|
var NetworkServiceImpl = class {
|
|
8392
8392
|
constructor(networkManager, signalManager) {
|
|
8393
8393
|
this.networkManager = networkManager;
|
|
@@ -8417,10 +8417,39 @@ var NetworkServiceImpl = class {
|
|
|
8417
8417
|
async updateConfig(request) {
|
|
8418
8418
|
await this.networkManager.setConnectionState(request.swarm);
|
|
8419
8419
|
}
|
|
8420
|
+
async joinSwarm(request) {
|
|
8421
|
+
return this.signalManager.join(request);
|
|
8422
|
+
}
|
|
8423
|
+
async leaveSwarm(request) {
|
|
8424
|
+
return this.signalManager.leave(request);
|
|
8425
|
+
}
|
|
8426
|
+
subscribeSwarmState(request) {
|
|
8427
|
+
return new Stream15(({ next }) => {
|
|
8428
|
+
const unsubscribe = this.signalManager.swarmState?.on((state) => {
|
|
8429
|
+
if (request.topic.equals(state.swarmKey)) {
|
|
8430
|
+
next(state);
|
|
8431
|
+
}
|
|
8432
|
+
});
|
|
8433
|
+
return unsubscribe;
|
|
8434
|
+
});
|
|
8435
|
+
}
|
|
8436
|
+
async sendMessage(message) {
|
|
8437
|
+
return this.signalManager.sendMessage(message);
|
|
8438
|
+
}
|
|
8439
|
+
subscribeMessages(peer) {
|
|
8440
|
+
return new Stream15(({ next }) => {
|
|
8441
|
+
const unsubscribe = this.signalManager.onMessage.on((message) => {
|
|
8442
|
+
if (message.recipient.peerKey === peer.peerKey) {
|
|
8443
|
+
next(message);
|
|
8444
|
+
}
|
|
8445
|
+
});
|
|
8446
|
+
return unsubscribe;
|
|
8447
|
+
});
|
|
8448
|
+
}
|
|
8420
8449
|
};
|
|
8421
8450
|
|
|
8422
8451
|
// packages/sdk/client-services/src/packlets/system/system-service.ts
|
|
8423
|
-
import { Stream as Stream16 } from "@dxos/codec-protobuf";
|
|
8452
|
+
import { Stream as Stream16 } from "@dxos/codec-protobuf/stream";
|
|
8424
8453
|
import { GetDiagnosticsRequest as GetDiagnosticsRequest2 } from "@dxos/protocols/proto/dxos/client/services";
|
|
8425
8454
|
import { jsonKeyReplacer as jsonKeyReplacer2 } from "@dxos/util";
|
|
8426
8455
|
var SystemServiceImpl = class {
|
|
@@ -8924,4 +8953,4 @@ export {
|
|
|
8924
8953
|
importProfileData,
|
|
8925
8954
|
ClientServicesHost
|
|
8926
8955
|
};
|
|
8927
|
-
//# sourceMappingURL=chunk-
|
|
8956
|
+
//# sourceMappingURL=chunk-RSOLUJE6.mjs.map
|