@dxos/client-services 0.8.2-main.f11618f → 0.8.2-staging.7ac8446
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-R24OWGT7.mjs → chunk-2TKMQ2UP.mjs} +71 -61
- package/dist/lib/browser/chunk-2TKMQ2UP.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-ZIKA2DAN.cjs → chunk-HUMVSL5Y.cjs} +242 -232
- package/dist/lib/node/chunk-HUMVSL5Y.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-QLUXYSIC.mjs → chunk-DQCPFIVI.mjs} +71 -61
- package/dist/lib/node-esm/chunk-DQCPFIVI.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.map +1 -1
- package/dist/types/src/packlets/network/network-service.d.ts +1 -3
- package/dist/types/src/packlets/network/network-service.d.ts.map +1 -1
- package/dist/types/src/packlets/services/service-host.d.ts.map +1 -1
- package/dist/types/src/packlets/spaces/edge-feed-replicator.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 +38 -38
- package/src/packlets/agents/edge-agent-service.ts +11 -8
- package/src/packlets/devices/devices-service.ts +3 -5
- package/src/packlets/identity/identity.test.ts +6 -9
- package/src/packlets/network/network-service.ts +15 -9
- package/src/packlets/services/service-host.ts +1 -5
- package/src/packlets/spaces/data-space-manager.ts +2 -2
- package/src/packlets/spaces/edge-feed-replicator.test.ts +1 -2
- package/src/packlets/spaces/edge-feed-replicator.ts +1 -2
- package/src/version.ts +1 -1
- package/dist/lib/browser/chunk-R24OWGT7.mjs.map +0 -7
- package/dist/lib/node/chunk-ZIKA2DAN.cjs.map +0 -7
- package/dist/lib/node-esm/chunk-QLUXYSIC.mjs.map +0 -7
|
@@ -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.8.2-
|
|
400
|
+
var DXOS_VERSION = "0.8.2-staging.7ac8446";
|
|
401
401
|
|
|
402
402
|
// packages/sdk/client-services/src/packlets/services/platform.ts
|
|
403
403
|
import { Platform } from "@dxos/protocols/proto/dxos/client/services";
|
|
@@ -817,7 +817,6 @@ import { log as log4, logInfo } from "@dxos/log";
|
|
|
817
817
|
import { EdgeService } from "@dxos/protocols";
|
|
818
818
|
import { buf } from "@dxos/protocols/buf";
|
|
819
819
|
import { MessageSchema as RouterMessageSchema } from "@dxos/protocols/buf/dxos/edge/messenger_pb";
|
|
820
|
-
import { EdgeStatus } from "@dxos/protocols/proto/dxos/client/services";
|
|
821
820
|
import { ComplexMap as ComplexMap2, arrayToBuffer, bufferToArray, defaultMap, rangeFromTo } from "@dxos/util";
|
|
822
821
|
function _ts_decorate(decorators, target, key, desc) {
|
|
823
822
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
@@ -908,7 +907,7 @@ var EdgeFeedReplicator = class extends Resource {
|
|
|
908
907
|
async _open() {
|
|
909
908
|
log4("open", void 0, {
|
|
910
909
|
F: __dxlog_file6,
|
|
911
|
-
L:
|
|
910
|
+
L: 56,
|
|
912
911
|
S: this,
|
|
913
912
|
C: (f, a) => f(...a)
|
|
914
913
|
});
|
|
@@ -927,7 +926,7 @@ var EdgeFeedReplicator = class extends Resource {
|
|
|
927
926
|
_spaceId: this._spaceId
|
|
928
927
|
}, {
|
|
929
928
|
F: __dxlog_file6,
|
|
930
|
-
L:
|
|
929
|
+
L: 70,
|
|
931
930
|
S: this,
|
|
932
931
|
C: (f, a) => f(...a)
|
|
933
932
|
});
|
|
@@ -940,7 +939,7 @@ var EdgeFeedReplicator = class extends Resource {
|
|
|
940
939
|
type: payload.type
|
|
941
940
|
}, {
|
|
942
941
|
F: __dxlog_file6,
|
|
943
|
-
L:
|
|
942
|
+
L: 75,
|
|
944
943
|
S: this,
|
|
945
944
|
C: (f, a) => f(...a)
|
|
946
945
|
});
|
|
@@ -952,14 +951,14 @@ var EdgeFeedReplicator = class extends Resource {
|
|
|
952
951
|
}
|
|
953
952
|
async _handleReconnect() {
|
|
954
953
|
await this._resetConnection();
|
|
955
|
-
if (this._messenger.
|
|
954
|
+
if (this._messenger.isConnected) {
|
|
956
955
|
this._startReplication();
|
|
957
956
|
}
|
|
958
957
|
}
|
|
959
958
|
async _close() {
|
|
960
959
|
log4("close", void 0, {
|
|
961
960
|
F: __dxlog_file6,
|
|
962
|
-
L:
|
|
961
|
+
L: 95,
|
|
963
962
|
S: this,
|
|
964
963
|
C: (f, a) => f(...a)
|
|
965
964
|
});
|
|
@@ -971,7 +970,7 @@ var EdgeFeedReplicator = class extends Resource {
|
|
|
971
970
|
this._connectionCtx = connectionCtx;
|
|
972
971
|
log4("connection context created", void 0, {
|
|
973
972
|
F: __dxlog_file6,
|
|
974
|
-
L:
|
|
973
|
+
L: 103,
|
|
975
974
|
S: this,
|
|
976
975
|
C: (f, a) => f(...a)
|
|
977
976
|
});
|
|
@@ -984,7 +983,7 @@ var EdgeFeedReplicator = class extends Resource {
|
|
|
984
983
|
async _resetConnection() {
|
|
985
984
|
log4("resetConnection", void 0, {
|
|
986
985
|
F: __dxlog_file6,
|
|
987
|
-
L:
|
|
986
|
+
L: 112,
|
|
988
987
|
S: this,
|
|
989
988
|
C: (f, a) => f(...a)
|
|
990
989
|
});
|
|
@@ -1000,7 +999,7 @@ var EdgeFeedReplicator = class extends Resource {
|
|
|
1000
999
|
hasConnectionCtx: !!this._connectionCtx
|
|
1001
1000
|
}, {
|
|
1002
1001
|
F: __dxlog_file6,
|
|
1003
|
-
L:
|
|
1002
|
+
L: 120,
|
|
1004
1003
|
S: this,
|
|
1005
1004
|
C: (f, a) => f(...a)
|
|
1006
1005
|
});
|
|
@@ -1017,7 +1016,7 @@ var EdgeFeedReplicator = class extends Resource {
|
|
|
1017
1016
|
key: feed.key
|
|
1018
1017
|
}, {
|
|
1019
1018
|
F: __dxlog_file6,
|
|
1020
|
-
L:
|
|
1019
|
+
L: 133,
|
|
1021
1020
|
S: this,
|
|
1022
1021
|
C: (f, a) => f(...a)
|
|
1023
1022
|
});
|
|
@@ -1033,7 +1032,7 @@ var EdgeFeedReplicator = class extends Resource {
|
|
|
1033
1032
|
if (!this._connectionCtx) {
|
|
1034
1033
|
log4("message dropped because connection was disposed", void 0, {
|
|
1035
1034
|
F: __dxlog_file6,
|
|
1036
|
-
L:
|
|
1035
|
+
L: 146,
|
|
1037
1036
|
S: this,
|
|
1038
1037
|
C: (f, a) => f(...a)
|
|
1039
1038
|
});
|
|
@@ -1045,14 +1044,14 @@ var EdgeFeedReplicator = class extends Resource {
|
|
|
1045
1044
|
blocks: message.blocks.map((b) => b.index)
|
|
1046
1045
|
}, {
|
|
1047
1046
|
F: __dxlog_file6,
|
|
1048
|
-
L:
|
|
1047
|
+
L: 151,
|
|
1049
1048
|
S: this,
|
|
1050
1049
|
C: (f, a) => f(...a)
|
|
1051
1050
|
});
|
|
1052
1051
|
}
|
|
1053
1052
|
invariant2(message.feedKey, void 0, {
|
|
1054
1053
|
F: __dxlog_file6,
|
|
1055
|
-
L:
|
|
1054
|
+
L: 157,
|
|
1056
1055
|
S: this,
|
|
1057
1056
|
A: [
|
|
1058
1057
|
"message.feedKey",
|
|
@@ -1064,7 +1063,7 @@ var EdgeFeedReplicator = class extends Resource {
|
|
|
1064
1063
|
type: message.type
|
|
1065
1064
|
}, {
|
|
1066
1065
|
F: __dxlog_file6,
|
|
1067
|
-
L:
|
|
1066
|
+
L: 160,
|
|
1068
1067
|
S: this,
|
|
1069
1068
|
C: (f, a) => f(...a)
|
|
1070
1069
|
});
|
|
@@ -1083,7 +1082,7 @@ var EdgeFeedReplicator = class extends Resource {
|
|
|
1083
1082
|
if (!this._connectionCtx) {
|
|
1084
1083
|
log4.warn("received message after connection context was disposed", void 0, {
|
|
1085
1084
|
F: __dxlog_file6,
|
|
1086
|
-
L:
|
|
1085
|
+
L: 175,
|
|
1087
1086
|
S: this,
|
|
1088
1087
|
C: (f, a) => f(...a)
|
|
1089
1088
|
});
|
|
@@ -1101,7 +1100,7 @@ var EdgeFeedReplicator = class extends Resource {
|
|
|
1101
1100
|
feedKey
|
|
1102
1101
|
}, {
|
|
1103
1102
|
F: __dxlog_file6,
|
|
1104
|
-
L:
|
|
1103
|
+
L: 184,
|
|
1105
1104
|
S: this,
|
|
1106
1105
|
C: (f, a) => f(...a)
|
|
1107
1106
|
});
|
|
@@ -1117,7 +1116,7 @@ var EdgeFeedReplicator = class extends Resource {
|
|
|
1117
1116
|
if (message.length > feed.length) {
|
|
1118
1117
|
log4("requesting missing blocks", logMeta, {
|
|
1119
1118
|
F: __dxlog_file6,
|
|
1120
|
-
L:
|
|
1119
|
+
L: 194,
|
|
1121
1120
|
S: this,
|
|
1122
1121
|
C: (f, a) => f(...a)
|
|
1123
1122
|
});
|
|
@@ -1132,7 +1131,7 @@ var EdgeFeedReplicator = class extends Resource {
|
|
|
1132
1131
|
} else if (message.length < feed.length) {
|
|
1133
1132
|
log4("pushing blocks to remote", logMeta, {
|
|
1134
1133
|
F: __dxlog_file6,
|
|
1135
|
-
L:
|
|
1134
|
+
L: 202,
|
|
1136
1135
|
S: this,
|
|
1137
1136
|
C: (f, a) => f(...a)
|
|
1138
1137
|
});
|
|
@@ -1151,7 +1150,7 @@ var EdgeFeedReplicator = class extends Resource {
|
|
|
1151
1150
|
blocks: message.blocks.map((b) => b.index)
|
|
1152
1151
|
}, {
|
|
1153
1152
|
F: __dxlog_file6,
|
|
1154
|
-
L:
|
|
1153
|
+
L: 211,
|
|
1155
1154
|
S: this,
|
|
1156
1155
|
C: (f, a) => f(...a)
|
|
1157
1156
|
});
|
|
@@ -1162,7 +1161,7 @@ var EdgeFeedReplicator = class extends Resource {
|
|
|
1162
1161
|
feedKey
|
|
1163
1162
|
}, {
|
|
1164
1163
|
F: __dxlog_file6,
|
|
1165
|
-
L:
|
|
1164
|
+
L: 216,
|
|
1166
1165
|
S: this,
|
|
1167
1166
|
C: (f, a) => f(...a)
|
|
1168
1167
|
});
|
|
@@ -1176,7 +1175,7 @@ var EdgeFeedReplicator = class extends Resource {
|
|
|
1176
1175
|
...message
|
|
1177
1176
|
}, {
|
|
1178
1177
|
F: __dxlog_file6,
|
|
1179
|
-
L:
|
|
1178
|
+
L: 225,
|
|
1180
1179
|
S: this,
|
|
1181
1180
|
C: (f, a) => f(...a)
|
|
1182
1181
|
});
|
|
@@ -1191,7 +1190,7 @@ var EdgeFeedReplicator = class extends Resource {
|
|
|
1191
1190
|
to
|
|
1192
1191
|
}, {
|
|
1193
1192
|
F: __dxlog_file6,
|
|
1194
|
-
L:
|
|
1193
|
+
L: 232,
|
|
1195
1194
|
S: this,
|
|
1196
1195
|
C: (f, a) => f(...a)
|
|
1197
1196
|
});
|
|
@@ -1201,7 +1200,7 @@ var EdgeFeedReplicator = class extends Resource {
|
|
|
1201
1200
|
});
|
|
1202
1201
|
invariant2(data instanceof Uint8Array, void 0, {
|
|
1203
1202
|
F: __dxlog_file6,
|
|
1204
|
-
L:
|
|
1203
|
+
L: 237,
|
|
1205
1204
|
S: this,
|
|
1206
1205
|
A: [
|
|
1207
1206
|
"data instanceof Uint8Array",
|
|
@@ -1229,7 +1228,7 @@ var EdgeFeedReplicator = class extends Resource {
|
|
|
1229
1228
|
blocks: blocks.length
|
|
1230
1229
|
}, {
|
|
1231
1230
|
F: __dxlog_file6,
|
|
1232
|
-
L:
|
|
1231
|
+
L: 258,
|
|
1233
1232
|
S: this,
|
|
1234
1233
|
C: (f, a) => f(...a)
|
|
1235
1234
|
});
|
|
@@ -1251,7 +1250,7 @@ var EdgeFeedReplicator = class extends Resource {
|
|
|
1251
1250
|
if (!this._remoteLength.has(feed.key)) {
|
|
1252
1251
|
log4("blocks not pushed because remote length is unknown", void 0, {
|
|
1253
1252
|
F: __dxlog_file6,
|
|
1254
|
-
L:
|
|
1253
|
+
L: 279,
|
|
1255
1254
|
S: this,
|
|
1256
1255
|
C: (f, a) => f(...a)
|
|
1257
1256
|
});
|
|
@@ -1276,7 +1275,7 @@ var EdgeFeedReplicator = class extends Resource {
|
|
|
1276
1275
|
if (err instanceof EdgeIdentityChangedError || err instanceof EdgeConnectionClosedError) {
|
|
1277
1276
|
log4("resetting on reconnect", void 0, {
|
|
1278
1277
|
F: __dxlog_file6,
|
|
1279
|
-
L:
|
|
1278
|
+
L: 296,
|
|
1280
1279
|
S: this,
|
|
1281
1280
|
C: (f, a) => f(...a)
|
|
1282
1281
|
});
|
|
@@ -1287,7 +1286,7 @@ var EdgeFeedReplicator = class extends Resource {
|
|
|
1287
1286
|
}
|
|
1288
1287
|
}, {
|
|
1289
1288
|
F: __dxlog_file6,
|
|
1290
|
-
L:
|
|
1289
|
+
L: 290
|
|
1291
1290
|
});
|
|
1292
1291
|
return connectionCtx;
|
|
1293
1292
|
}
|
|
@@ -1942,7 +1941,7 @@ import { Context as Context4, LifecycleState, Resource as Resource4, cancelWithC
|
|
|
1942
1941
|
import { createAdmissionCredentials, getCredentialAssertion as getCredentialAssertion2 } from "@dxos/credentials";
|
|
1943
1942
|
import { DatabaseRoot, findInlineObjectOfType, AuthStatus, CredentialServerExtension } from "@dxos/echo-pipeline";
|
|
1944
1943
|
import { SpaceDocVersion, createIdFromSpaceKey, encodeReference } from "@dxos/echo-protocol";
|
|
1945
|
-
import {
|
|
1944
|
+
import { createObjectId, getTypeReference } from "@dxos/echo-schema";
|
|
1946
1945
|
import { writeMessages } from "@dxos/feed-store";
|
|
1947
1946
|
import { assertArgument, assertState, failedInvariant, invariant as invariant5 } from "@dxos/invariant";
|
|
1948
1947
|
import { PublicKey as PublicKey5 } from "@dxos/keys";
|
|
@@ -2316,7 +2315,7 @@ var DataSpaceManager = class extends Resource4 {
|
|
|
2316
2315
|
keys: []
|
|
2317
2316
|
}
|
|
2318
2317
|
};
|
|
2319
|
-
const propertiesId =
|
|
2318
|
+
const propertiesId = createObjectId();
|
|
2320
2319
|
document.change((doc) => {
|
|
2321
2320
|
setDeep(doc, [
|
|
2322
2321
|
"objects",
|
|
@@ -7647,22 +7646,28 @@ _ts_decorate9([
|
|
|
7647
7646
|
// packages/sdk/client-services/src/packlets/agents/edge-agent-service.ts
|
|
7648
7647
|
import { Stream as Stream11 } from "@dxos/codec-protobuf/stream";
|
|
7649
7648
|
import { EdgeAgentStatus as EdgeAgentStatus2 } from "@dxos/protocols";
|
|
7650
|
-
import { QueryAgentStatusResponse,
|
|
7649
|
+
import { QueryAgentStatusResponse, QueryEdgeStatusResponse } from "@dxos/protocols/proto/dxos/client/services";
|
|
7651
7650
|
var EdgeAgentServiceImpl = class {
|
|
7652
7651
|
constructor(_agentManagerProvider, _edgeConnection) {
|
|
7653
7652
|
this._agentManagerProvider = _agentManagerProvider;
|
|
7654
7653
|
this._edgeConnection = _edgeConnection;
|
|
7655
7654
|
}
|
|
7656
|
-
// TODO(mykola): Reconcile with NetworkService.queryStatus.
|
|
7657
7655
|
queryEdgeStatus() {
|
|
7658
7656
|
return new Stream11(({ ctx, next }) => {
|
|
7659
|
-
|
|
7660
|
-
|
|
7661
|
-
|
|
7662
|
-
|
|
7663
|
-
|
|
7664
|
-
|
|
7665
|
-
|
|
7657
|
+
next({
|
|
7658
|
+
status: QueryEdgeStatusResponse.EdgeStatus.NOT_CONNECTED
|
|
7659
|
+
});
|
|
7660
|
+
if (!this._edgeConnection) {
|
|
7661
|
+
return;
|
|
7662
|
+
}
|
|
7663
|
+
ctx.onDispose(
|
|
7664
|
+
// TODO(wittjosiah): EdgeConnection should include a disconnected event as well.
|
|
7665
|
+
this._edgeConnection.onReconnected(() => {
|
|
7666
|
+
next({
|
|
7667
|
+
status: QueryEdgeStatusResponse.EdgeStatus.CONNECTED
|
|
7668
|
+
});
|
|
7669
|
+
})
|
|
7670
|
+
);
|
|
7666
7671
|
});
|
|
7667
7672
|
}
|
|
7668
7673
|
async createAgent() {
|
|
@@ -8654,7 +8659,7 @@ import { WebsocketRpcClient } from "@dxos/websocket-rpc";
|
|
|
8654
8659
|
import { SubscriptionList as SubscriptionList3 } from "@dxos/async";
|
|
8655
8660
|
import { Stream as Stream12 } from "@dxos/codec-protobuf/stream";
|
|
8656
8661
|
import { invariant as invariant24 } from "@dxos/invariant";
|
|
8657
|
-
import { Device as Device2, DeviceKind as DeviceKind2
|
|
8662
|
+
import { Device as Device2, DeviceKind as DeviceKind2 } from "@dxos/protocols/proto/dxos/client/services";
|
|
8658
8663
|
var __dxlog_file31 = "/home/runner/work/dxos/dxos/packages/sdk/client-services/src/packlets/devices/devices-service.ts";
|
|
8659
8664
|
var DevicesServiceImpl = class {
|
|
8660
8665
|
constructor(_identityManager, _edgeConnection) {
|
|
@@ -8675,7 +8680,7 @@ var DevicesServiceImpl = class {
|
|
|
8675
8680
|
} else {
|
|
8676
8681
|
invariant24(this._identityManager.identity?.presence, "presence not present", {
|
|
8677
8682
|
F: __dxlog_file31,
|
|
8678
|
-
L:
|
|
8683
|
+
L: 36,
|
|
8679
8684
|
S: this,
|
|
8680
8685
|
A: [
|
|
8681
8686
|
"this._identityManager.identity?.presence",
|
|
@@ -8690,7 +8695,7 @@ var DevicesServiceImpl = class {
|
|
|
8690
8695
|
if (isMe) {
|
|
8691
8696
|
presence = Device2.PresenceState.ONLINE;
|
|
8692
8697
|
} else if (profile.os?.toUpperCase() === "EDGE") {
|
|
8693
|
-
presence = this._edgeConnection?.
|
|
8698
|
+
presence = this._edgeConnection?.isConnected ? Device2.PresenceState.ONLINE : Device2.PresenceState.OFFLINE;
|
|
8694
8699
|
} else {
|
|
8695
8700
|
presence = peers.some((peer) => peer.identityKey.equals(key)) ? Device2.PresenceState.ONLINE : Device2.PresenceState.OFFLINE;
|
|
8696
8701
|
}
|
|
@@ -8950,13 +8955,12 @@ var LOG_PROCESSING = 0;
|
|
|
8950
8955
|
// packages/sdk/client-services/src/packlets/network/network-service.ts
|
|
8951
8956
|
import { Stream as Stream15 } from "@dxos/codec-protobuf/stream";
|
|
8952
8957
|
var NetworkServiceImpl = class {
|
|
8953
|
-
constructor(networkManager, signalManager
|
|
8958
|
+
constructor(networkManager, signalManager) {
|
|
8954
8959
|
this.networkManager = networkManager;
|
|
8955
8960
|
this.signalManager = signalManager;
|
|
8956
|
-
this.edgeConnection = edgeConnection;
|
|
8957
8961
|
}
|
|
8958
8962
|
queryStatus() {
|
|
8959
|
-
return new Stream15(({
|
|
8963
|
+
return new Stream15(({ next }) => {
|
|
8960
8964
|
const update = () => {
|
|
8961
8965
|
next({
|
|
8962
8966
|
swarm: this.networkManager.connectionState,
|
|
@@ -8967,9 +8971,13 @@ var NetworkServiceImpl = class {
|
|
|
8967
8971
|
}))
|
|
8968
8972
|
});
|
|
8969
8973
|
};
|
|
8970
|
-
this.networkManager.connectionStateChanged.on(
|
|
8971
|
-
this.signalManager.statusChanged?.on(
|
|
8974
|
+
const unsubscribeSwarm = this.networkManager.connectionStateChanged.on(() => update());
|
|
8975
|
+
const unsubscribeSignal = this.signalManager.statusChanged?.on(() => update());
|
|
8972
8976
|
update();
|
|
8977
|
+
return () => {
|
|
8978
|
+
unsubscribeSwarm();
|
|
8979
|
+
unsubscribeSignal?.();
|
|
8980
|
+
};
|
|
8973
8981
|
});
|
|
8974
8982
|
}
|
|
8975
8983
|
async updateConfig(request) {
|
|
@@ -8985,24 +8993,26 @@ var NetworkServiceImpl = class {
|
|
|
8985
8993
|
return this.signalManager.query(request);
|
|
8986
8994
|
}
|
|
8987
8995
|
subscribeSwarmState(request) {
|
|
8988
|
-
return new Stream15(({
|
|
8989
|
-
this.signalManager.swarmState?.on(
|
|
8996
|
+
return new Stream15(({ next }) => {
|
|
8997
|
+
const unsubscribe = this.signalManager.swarmState?.on((state) => {
|
|
8990
8998
|
if (request.topic.equals(state.swarmKey)) {
|
|
8991
8999
|
next(state);
|
|
8992
9000
|
}
|
|
8993
9001
|
});
|
|
9002
|
+
return unsubscribe;
|
|
8994
9003
|
});
|
|
8995
9004
|
}
|
|
8996
9005
|
async sendMessage(message) {
|
|
8997
9006
|
return this.signalManager.sendMessage(message);
|
|
8998
9007
|
}
|
|
8999
9008
|
subscribeMessages(peer) {
|
|
9000
|
-
return new Stream15(({
|
|
9001
|
-
this.signalManager.onMessage.on(
|
|
9009
|
+
return new Stream15(({ next }) => {
|
|
9010
|
+
const unsubscribe = this.signalManager.onMessage.on((message) => {
|
|
9002
9011
|
if (message.recipient.peerKey === peer.peerKey) {
|
|
9003
9012
|
next(message);
|
|
9004
9013
|
}
|
|
9005
9014
|
});
|
|
9015
|
+
return unsubscribe;
|
|
9006
9016
|
});
|
|
9007
9017
|
}
|
|
9008
9018
|
};
|
|
@@ -9327,7 +9337,7 @@ var ClientServicesHost = class {
|
|
|
9327
9337
|
SpacesService: new SpacesServiceImpl(this._serviceContext.identityManager, this._serviceContext.spaceManager, dataSpaceManagerProvider),
|
|
9328
9338
|
DataService: this._serviceContext.echoHost.dataService,
|
|
9329
9339
|
QueryService: this._serviceContext.echoHost.queryService,
|
|
9330
|
-
NetworkService: new NetworkServiceImpl(this._serviceContext.networkManager, this._serviceContext.signalManager
|
|
9340
|
+
NetworkService: new NetworkServiceImpl(this._serviceContext.networkManager, this._serviceContext.signalManager),
|
|
9331
9341
|
LoggingService: this._loggingService,
|
|
9332
9342
|
TracingService: this._tracingService,
|
|
9333
9343
|
// TODO(burdon): Move to new protobuf definitions.
|
|
@@ -9359,7 +9369,7 @@ var ClientServicesHost = class {
|
|
|
9359
9369
|
deviceKey
|
|
9360
9370
|
}, {
|
|
9361
9371
|
F: __dxlog_file32,
|
|
9362
|
-
L:
|
|
9372
|
+
L: 366,
|
|
9363
9373
|
S: this,
|
|
9364
9374
|
C: (f, a) => f(...a)
|
|
9365
9375
|
});
|
|
@@ -9367,7 +9377,7 @@ var ClientServicesHost = class {
|
|
|
9367
9377
|
id: traceId
|
|
9368
9378
|
}), {
|
|
9369
9379
|
F: __dxlog_file32,
|
|
9370
|
-
L:
|
|
9380
|
+
L: 367,
|
|
9371
9381
|
S: this,
|
|
9372
9382
|
C: (f, a) => f(...a)
|
|
9373
9383
|
});
|
|
@@ -9381,7 +9391,7 @@ var ClientServicesHost = class {
|
|
|
9381
9391
|
deviceKey
|
|
9382
9392
|
}, {
|
|
9383
9393
|
F: __dxlog_file32,
|
|
9384
|
-
L:
|
|
9394
|
+
L: 378,
|
|
9385
9395
|
S: this,
|
|
9386
9396
|
C: (f, a) => f(...a)
|
|
9387
9397
|
});
|
|
@@ -9399,7 +9409,7 @@ var ClientServicesHost = class {
|
|
|
9399
9409
|
deviceKey
|
|
9400
9410
|
}, {
|
|
9401
9411
|
F: __dxlog_file32,
|
|
9402
|
-
L:
|
|
9412
|
+
L: 387,
|
|
9403
9413
|
S: this,
|
|
9404
9414
|
C: (f, a) => f(...a)
|
|
9405
9415
|
});
|
|
@@ -9410,13 +9420,13 @@ var ClientServicesHost = class {
|
|
|
9410
9420
|
id: traceId
|
|
9411
9421
|
}), {
|
|
9412
9422
|
F: __dxlog_file32,
|
|
9413
|
-
L:
|
|
9423
|
+
L: 392,
|
|
9414
9424
|
S: this,
|
|
9415
9425
|
C: (f, a) => f(...a)
|
|
9416
9426
|
});
|
|
9417
9427
|
log28.info("resetting...", void 0, {
|
|
9418
9428
|
F: __dxlog_file32,
|
|
9419
|
-
L:
|
|
9429
|
+
L: 394,
|
|
9420
9430
|
S: this,
|
|
9421
9431
|
C: (f, a) => f(...a)
|
|
9422
9432
|
});
|
|
@@ -9426,7 +9436,7 @@ var ClientServicesHost = class {
|
|
|
9426
9436
|
await this._storage.reset();
|
|
9427
9437
|
log28.info("reset", void 0, {
|
|
9428
9438
|
F: __dxlog_file32,
|
|
9429
|
-
L:
|
|
9439
|
+
L: 401,
|
|
9430
9440
|
S: this,
|
|
9431
9441
|
C: (f, a) => f(...a)
|
|
9432
9442
|
});
|
|
@@ -9434,7 +9444,7 @@ var ClientServicesHost = class {
|
|
|
9434
9444
|
id: traceId
|
|
9435
9445
|
}), {
|
|
9436
9446
|
F: __dxlog_file32,
|
|
9437
|
-
L:
|
|
9447
|
+
L: 402,
|
|
9438
9448
|
S: this,
|
|
9439
9449
|
C: (f, a) => f(...a)
|
|
9440
9450
|
});
|
|
@@ -9512,4 +9522,4 @@ export {
|
|
|
9512
9522
|
importProfileData,
|
|
9513
9523
|
ClientServicesHost
|
|
9514
9524
|
};
|
|
9515
|
-
//# sourceMappingURL=chunk-
|
|
9525
|
+
//# sourceMappingURL=chunk-2TKMQ2UP.mjs.map
|