@dxos/client-services 0.6.12-main.c974201 → 0.6.12-main.f9d0246
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-ENUB6MBB.mjs → chunk-7ONARHVD.mjs} +114 -60
- package/dist/lib/browser/chunk-7ONARHVD.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-JJ4F4MLG.cjs → chunk-UPLMIG6W.cjs} +96 -42
- package/dist/lib/node/chunk-UPLMIG6W.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 +8 -8
- package/dist/lib/node-esm/{chunk-S6XSANKR.mjs → chunk-DSRREBQH.mjs} +114 -60
- package/dist/lib/node-esm/chunk-DSRREBQH.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/spaces/edge-feed-replicator.d.ts +3 -0
- package/dist/types/src/packlets/spaces/edge-feed-replicator.d.ts.map +1 -1
- package/dist/types/src/packlets/spaces/edge-feed-replicator.test.d.ts +2 -0
- package/dist/types/src/packlets/spaces/edge-feed-replicator.test.d.ts.map +1 -0
- package/dist/types/src/version.d.ts +1 -1
- package/package.json +39 -38
- package/src/packlets/identity/identity.test.ts +4 -0
- package/src/packlets/spaces/edge-feed-replicator.test.ts +254 -0
- package/src/packlets/spaces/edge-feed-replicator.ts +61 -16
- package/src/version.ts +1 -1
- package/dist/lib/browser/chunk-ENUB6MBB.mjs.map +0 -7
- package/dist/lib/node/chunk-JJ4F4MLG.cjs.map +0 -7
- package/dist/lib/node-esm/chunk-S6XSANKR.mjs.map +0 -7
|
@@ -404,7 +404,7 @@ import { SpaceMember } from "@dxos/protocols/proto/dxos/client/services";
|
|
|
404
404
|
import { TRACE_PROCESSOR } from "@dxos/tracing";
|
|
405
405
|
|
|
406
406
|
// packages/sdk/client-services/src/version.ts
|
|
407
|
-
var DXOS_VERSION = "0.6.12-main.
|
|
407
|
+
var DXOS_VERSION = "0.6.12-main.f9d0246";
|
|
408
408
|
|
|
409
409
|
// packages/sdk/client-services/src/packlets/services/platform.ts
|
|
410
410
|
import { Platform } from "@dxos/protocols/proto/dxos/client/services";
|
|
@@ -811,7 +811,8 @@ var TrustedKeySetAuthVerifier = class {
|
|
|
811
811
|
// packages/sdk/client-services/src/packlets/spaces/edge-feed-replicator.ts
|
|
812
812
|
import { decode as decodeCbor, encode as encodeCbor } from "cbor-x";
|
|
813
813
|
import { Event, Mutex, scheduleMicroTask } from "@dxos/async";
|
|
814
|
-
import { Resource } from "@dxos/context";
|
|
814
|
+
import { Context as Context3, Resource } from "@dxos/context";
|
|
815
|
+
import { EdgeConnectionClosedError, EdgeIdentityChangedError } from "@dxos/edge-client";
|
|
815
816
|
import { invariant as invariant2 } from "@dxos/invariant";
|
|
816
817
|
import { PublicKey as PublicKey3 } from "@dxos/keys";
|
|
817
818
|
import { log as log4 } from "@dxos/log";
|
|
@@ -900,7 +901,7 @@ var EdgeFeedReplicator = class extends Resource {
|
|
|
900
901
|
this._spaceId = spaceId;
|
|
901
902
|
}
|
|
902
903
|
async _open() {
|
|
903
|
-
this._ctx.onDispose(this._messenger.addListener(
|
|
904
|
+
this._ctx.onDispose(this._messenger.addListener((message) => {
|
|
904
905
|
if (!message.serviceId) {
|
|
905
906
|
return;
|
|
906
907
|
}
|
|
@@ -915,7 +916,7 @@ var EdgeFeedReplicator = class extends Resource {
|
|
|
915
916
|
_spaceId: this._spaceId
|
|
916
917
|
}, {
|
|
917
918
|
F: __dxlog_file6,
|
|
918
|
-
L:
|
|
919
|
+
L: 66,
|
|
919
920
|
S: this,
|
|
920
921
|
C: (f, a) => f(...a)
|
|
921
922
|
});
|
|
@@ -928,20 +929,40 @@ var EdgeFeedReplicator = class extends Resource {
|
|
|
928
929
|
type: payload.type
|
|
929
930
|
}, {
|
|
930
931
|
F: __dxlog_file6,
|
|
931
|
-
L:
|
|
932
|
+
L: 71,
|
|
932
933
|
S: this,
|
|
933
934
|
C: (f, a) => f(...a)
|
|
934
935
|
});
|
|
935
936
|
this._onMessage(payload);
|
|
936
937
|
}));
|
|
937
|
-
this.
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
938
|
+
this._messenger.connected.on(this._ctx, async () => {
|
|
939
|
+
await this._resetConnection();
|
|
940
|
+
this._startReplication();
|
|
941
|
+
});
|
|
942
|
+
if (this._messenger.isConnected) {
|
|
943
|
+
this._startReplication();
|
|
941
944
|
}
|
|
942
945
|
}
|
|
943
946
|
async _close() {
|
|
944
|
-
this.
|
|
947
|
+
await this._resetConnection();
|
|
948
|
+
}
|
|
949
|
+
_startReplication() {
|
|
950
|
+
this._connected = true;
|
|
951
|
+
const connectionCtx = this._createConnectionContext();
|
|
952
|
+
this._connectionCtx = connectionCtx;
|
|
953
|
+
log4("connection context created", void 0, {
|
|
954
|
+
F: __dxlog_file6,
|
|
955
|
+
L: 94,
|
|
956
|
+
S: this,
|
|
957
|
+
C: (f, a) => f(...a)
|
|
958
|
+
});
|
|
959
|
+
scheduleMicroTask(connectionCtx, async () => {
|
|
960
|
+
for (const feed of this._feeds.values()) {
|
|
961
|
+
await this._replicateFeed(connectionCtx, feed);
|
|
962
|
+
}
|
|
963
|
+
});
|
|
964
|
+
}
|
|
965
|
+
async _resetConnection() {
|
|
945
966
|
this._connected = false;
|
|
946
967
|
await this._connectionCtx?.dispose();
|
|
947
968
|
this._connectionCtx = void 0;
|
|
@@ -952,37 +973,37 @@ var EdgeFeedReplicator = class extends Resource {
|
|
|
952
973
|
key: feed.key
|
|
953
974
|
}, {
|
|
954
975
|
F: __dxlog_file6,
|
|
955
|
-
L:
|
|
976
|
+
L: 110,
|
|
956
977
|
S: this,
|
|
957
978
|
C: (f, a) => f(...a)
|
|
958
979
|
});
|
|
959
980
|
this._feeds.set(feed.key, feed);
|
|
960
|
-
if (this._connected) {
|
|
961
|
-
await this._replicateFeed(feed);
|
|
981
|
+
if (this._connected && this._connectionCtx) {
|
|
982
|
+
await this._replicateFeed(this._connectionCtx, feed);
|
|
962
983
|
}
|
|
963
984
|
}
|
|
964
985
|
_getPushMutex(key) {
|
|
965
986
|
return defaultMap(this._pushMutex, key, () => new Mutex());
|
|
966
987
|
}
|
|
967
|
-
async _replicateFeed(feed) {
|
|
968
|
-
invariant2(this._connectionCtx, void 0, {
|
|
969
|
-
F: __dxlog_file6,
|
|
970
|
-
L: 102,
|
|
971
|
-
S: this,
|
|
972
|
-
A: [
|
|
973
|
-
"this._connectionCtx",
|
|
974
|
-
""
|
|
975
|
-
]
|
|
976
|
-
});
|
|
988
|
+
async _replicateFeed(ctx, feed) {
|
|
977
989
|
await this._sendMessage({
|
|
978
990
|
type: "get-metadata",
|
|
979
991
|
feedKey: feed.key.toHex()
|
|
980
992
|
});
|
|
981
|
-
Event.wrap(feed.core, "append").on(
|
|
993
|
+
Event.wrap(feed.core, "append").on(ctx, async () => {
|
|
982
994
|
await this._pushBlocksIfNeeded(feed);
|
|
983
995
|
});
|
|
984
996
|
}
|
|
985
997
|
async _sendMessage(message) {
|
|
998
|
+
if (!this._connectionCtx) {
|
|
999
|
+
log4.info("message dropped because connection was disposed", void 0, {
|
|
1000
|
+
F: __dxlog_file6,
|
|
1001
|
+
L: 135,
|
|
1002
|
+
S: this,
|
|
1003
|
+
C: (f, a) => f(...a)
|
|
1004
|
+
});
|
|
1005
|
+
return;
|
|
1006
|
+
}
|
|
986
1007
|
const logPayload = message.type === "data" ? {
|
|
987
1008
|
feedKey: message.feedKey,
|
|
988
1009
|
blocks: message.blocks.map((b) => b.index)
|
|
@@ -991,13 +1012,13 @@ var EdgeFeedReplicator = class extends Resource {
|
|
|
991
1012
|
};
|
|
992
1013
|
log4.info("sending message", logPayload, {
|
|
993
1014
|
F: __dxlog_file6,
|
|
994
|
-
L:
|
|
1015
|
+
L: 141,
|
|
995
1016
|
S: this,
|
|
996
1017
|
C: (f, a) => f(...a)
|
|
997
1018
|
});
|
|
998
1019
|
invariant2(message.feedKey, void 0, {
|
|
999
1020
|
F: __dxlog_file6,
|
|
1000
|
-
L:
|
|
1021
|
+
L: 143,
|
|
1001
1022
|
S: this,
|
|
1002
1023
|
A: [
|
|
1003
1024
|
"message.feedKey",
|
|
@@ -1017,7 +1038,16 @@ var EdgeFeedReplicator = class extends Resource {
|
|
|
1017
1038
|
}));
|
|
1018
1039
|
}
|
|
1019
1040
|
_onMessage(message) {
|
|
1020
|
-
|
|
1041
|
+
if (!this._connectionCtx) {
|
|
1042
|
+
log4.warn("received message after connection context was disposed", void 0, {
|
|
1043
|
+
F: __dxlog_file6,
|
|
1044
|
+
L: 160,
|
|
1045
|
+
S: this,
|
|
1046
|
+
C: (f, a) => f(...a)
|
|
1047
|
+
});
|
|
1048
|
+
return;
|
|
1049
|
+
}
|
|
1050
|
+
scheduleMicroTask(this._connectionCtx, async () => {
|
|
1021
1051
|
switch (message.type) {
|
|
1022
1052
|
case "metadata": {
|
|
1023
1053
|
try {
|
|
@@ -1026,7 +1056,7 @@ var EdgeFeedReplicator = class extends Resource {
|
|
|
1026
1056
|
message
|
|
1027
1057
|
}, {
|
|
1028
1058
|
F: __dxlog_file6,
|
|
1029
|
-
L:
|
|
1059
|
+
L: 166,
|
|
1030
1060
|
S: this,
|
|
1031
1061
|
C: (f, a) => f(...a)
|
|
1032
1062
|
});
|
|
@@ -1037,7 +1067,7 @@ var EdgeFeedReplicator = class extends Resource {
|
|
|
1037
1067
|
feedKey
|
|
1038
1068
|
}, {
|
|
1039
1069
|
F: __dxlog_file6,
|
|
1040
|
-
L:
|
|
1070
|
+
L: 171,
|
|
1041
1071
|
S: this,
|
|
1042
1072
|
C: (f, a) => f(...a)
|
|
1043
1073
|
});
|
|
@@ -1070,7 +1100,7 @@ var EdgeFeedReplicator = class extends Resource {
|
|
|
1070
1100
|
blocks: message.blocks.map((b) => b.index)
|
|
1071
1101
|
}, {
|
|
1072
1102
|
F: __dxlog_file6,
|
|
1073
|
-
L:
|
|
1103
|
+
L: 193,
|
|
1074
1104
|
S: this,
|
|
1075
1105
|
C: (f, a) => f(...a)
|
|
1076
1106
|
});
|
|
@@ -1081,7 +1111,7 @@ var EdgeFeedReplicator = class extends Resource {
|
|
|
1081
1111
|
feedKey
|
|
1082
1112
|
}, {
|
|
1083
1113
|
F: __dxlog_file6,
|
|
1084
|
-
L:
|
|
1114
|
+
L: 198,
|
|
1085
1115
|
S: this,
|
|
1086
1116
|
C: (f, a) => f(...a)
|
|
1087
1117
|
});
|
|
@@ -1095,7 +1125,7 @@ var EdgeFeedReplicator = class extends Resource {
|
|
|
1095
1125
|
...message
|
|
1096
1126
|
}, {
|
|
1097
1127
|
F: __dxlog_file6,
|
|
1098
|
-
L:
|
|
1128
|
+
L: 207,
|
|
1099
1129
|
S: this,
|
|
1100
1130
|
C: (f, a) => f(...a)
|
|
1101
1131
|
});
|
|
@@ -1110,7 +1140,7 @@ var EdgeFeedReplicator = class extends Resource {
|
|
|
1110
1140
|
to
|
|
1111
1141
|
}, {
|
|
1112
1142
|
F: __dxlog_file6,
|
|
1113
|
-
L:
|
|
1143
|
+
L: 214,
|
|
1114
1144
|
S: this,
|
|
1115
1145
|
C: (f, a) => f(...a)
|
|
1116
1146
|
});
|
|
@@ -1120,7 +1150,7 @@ var EdgeFeedReplicator = class extends Resource {
|
|
|
1120
1150
|
});
|
|
1121
1151
|
invariant2(data instanceof Uint8Array, void 0, {
|
|
1122
1152
|
F: __dxlog_file6,
|
|
1123
|
-
L:
|
|
1153
|
+
L: 219,
|
|
1124
1154
|
S: this,
|
|
1125
1155
|
A: [
|
|
1126
1156
|
"data instanceof Uint8Array",
|
|
@@ -1148,7 +1178,7 @@ var EdgeFeedReplicator = class extends Resource {
|
|
|
1148
1178
|
blocks: blocks.length
|
|
1149
1179
|
}, {
|
|
1150
1180
|
F: __dxlog_file6,
|
|
1151
|
-
L:
|
|
1181
|
+
L: 240,
|
|
1152
1182
|
S: this,
|
|
1153
1183
|
C: (f, a) => f(...a)
|
|
1154
1184
|
});
|
|
@@ -1166,11 +1196,11 @@ var EdgeFeedReplicator = class extends Resource {
|
|
|
1166
1196
|
async _pushBlocksIfNeeded(feed) {
|
|
1167
1197
|
try {
|
|
1168
1198
|
var _usingCtx = _using_ctx();
|
|
1169
|
-
const
|
|
1199
|
+
const _ = _usingCtx.u(await this._getPushMutex(feed.key).acquire());
|
|
1170
1200
|
if (!this._remoteLength.has(feed.key)) {
|
|
1171
1201
|
log4("blocks not pushed because remote length is unknown", void 0, {
|
|
1172
1202
|
F: __dxlog_file6,
|
|
1173
|
-
L:
|
|
1203
|
+
L: 261,
|
|
1174
1204
|
S: this,
|
|
1175
1205
|
C: (f, a) => f(...a)
|
|
1176
1206
|
});
|
|
@@ -1186,6 +1216,30 @@ var EdgeFeedReplicator = class extends Resource {
|
|
|
1186
1216
|
_usingCtx.d();
|
|
1187
1217
|
}
|
|
1188
1218
|
}
|
|
1219
|
+
_createConnectionContext() {
|
|
1220
|
+
const connectionCtx = new Context3({
|
|
1221
|
+
onError: async (err) => {
|
|
1222
|
+
if (connectionCtx !== this._connectionCtx) {
|
|
1223
|
+
return;
|
|
1224
|
+
}
|
|
1225
|
+
if (err instanceof EdgeIdentityChangedError || err instanceof EdgeConnectionClosedError) {
|
|
1226
|
+
log4("resetting on reconnect", void 0, {
|
|
1227
|
+
F: __dxlog_file6,
|
|
1228
|
+
L: 278,
|
|
1229
|
+
S: this,
|
|
1230
|
+
C: (f, a) => f(...a)
|
|
1231
|
+
});
|
|
1232
|
+
await this._resetConnection();
|
|
1233
|
+
} else {
|
|
1234
|
+
this._ctx.raise(err);
|
|
1235
|
+
}
|
|
1236
|
+
}
|
|
1237
|
+
}, {
|
|
1238
|
+
F: __dxlog_file6,
|
|
1239
|
+
L: 272
|
|
1240
|
+
});
|
|
1241
|
+
return connectionCtx;
|
|
1242
|
+
}
|
|
1189
1243
|
};
|
|
1190
1244
|
var bufferizeBlock = (block) => ({
|
|
1191
1245
|
index: block.index,
|
|
@@ -1201,7 +1255,7 @@ var bufferizeBlock = (block) => ({
|
|
|
1201
1255
|
// packages/sdk/client-services/src/packlets/spaces/data-space.ts
|
|
1202
1256
|
import { Event as Event7, Mutex as Mutex2, scheduleTask as scheduleTask4, sleep as sleep3, synchronized as synchronized2, trackLeaks as trackLeaks2 } from "@dxos/async";
|
|
1203
1257
|
import { AUTH_TIMEOUT as AUTH_TIMEOUT2 } from "@dxos/client-protocol";
|
|
1204
|
-
import { Context as
|
|
1258
|
+
import { Context as Context6, ContextDisposedError, cancelWithContext as cancelWithContext2 } from "@dxos/context";
|
|
1205
1259
|
import { timed, warnAfterTimeout } from "@dxos/debug";
|
|
1206
1260
|
import { createMappedFeedWriter } from "@dxos/echo-pipeline";
|
|
1207
1261
|
import { SpaceDocVersion as SpaceDocVersion3 } from "@dxos/echo-protocol";
|
|
@@ -1437,7 +1491,7 @@ var runEpochMigration = async (ctx, context) => {
|
|
|
1437
1491
|
|
|
1438
1492
|
// packages/sdk/client-services/src/packlets/spaces/notarization-plugin.ts
|
|
1439
1493
|
import { DeferredTask, Event as Event3, scheduleTask as scheduleTask2, sleep, TimeoutError, Trigger as Trigger3 } from "@dxos/async";
|
|
1440
|
-
import { Context as
|
|
1494
|
+
import { Context as Context4, rejectOnDispose } from "@dxos/context";
|
|
1441
1495
|
import { invariant as invariant4 } from "@dxos/invariant";
|
|
1442
1496
|
import { PublicKey as PublicKey4 } from "@dxos/keys";
|
|
1443
1497
|
import { log as log6 } from "@dxos/log";
|
|
@@ -1451,7 +1505,7 @@ var DEFAULT_NOTARIZE_TIMEOUT = 1e4;
|
|
|
1451
1505
|
var WRITER_NOT_SET_ERROR_CODE = "WRITER_NOT_SET";
|
|
1452
1506
|
var NotarizationPlugin = class {
|
|
1453
1507
|
constructor() {
|
|
1454
|
-
this._ctx = new
|
|
1508
|
+
this._ctx = new Context4(void 0, {
|
|
1455
1509
|
F: __dxlog_file8,
|
|
1456
1510
|
L: 62
|
|
1457
1511
|
});
|
|
@@ -3021,7 +3075,7 @@ Identity = _ts_decorate2([
|
|
|
3021
3075
|
// packages/sdk/client-services/src/packlets/identity/identity-manager.ts
|
|
3022
3076
|
import platform from "platform";
|
|
3023
3077
|
import { Event as Event6 } from "@dxos/async";
|
|
3024
|
-
import { Context as
|
|
3078
|
+
import { Context as Context5 } from "@dxos/context";
|
|
3025
3079
|
import { createCredentialSignerWithKey as createCredentialSignerWithKey2, CredentialGenerator } from "@dxos/credentials";
|
|
3026
3080
|
import { invariant as invariant8 } from "@dxos/invariant";
|
|
3027
3081
|
import { PublicKey as PublicKey7 } from "@dxos/keys";
|
|
@@ -3103,7 +3157,7 @@ var IdentityManager = class {
|
|
|
3103
3157
|
});
|
|
3104
3158
|
}
|
|
3105
3159
|
async close() {
|
|
3106
|
-
await this._identity?.close(new
|
|
3160
|
+
await this._identity?.close(new Context5(void 0, {
|
|
3107
3161
|
F: __dxlog_file13,
|
|
3108
3162
|
L: 140
|
|
3109
3163
|
}));
|
|
@@ -3136,7 +3190,7 @@ var IdentityManager = class {
|
|
|
3136
3190
|
}
|
|
3137
3191
|
};
|
|
3138
3192
|
const identity = await this._constructIdentity(identityRecord);
|
|
3139
|
-
await identity.open(new
|
|
3193
|
+
await identity.open(new Context5(void 0, {
|
|
3140
3194
|
F: __dxlog_file13,
|
|
3141
3195
|
L: 161
|
|
3142
3196
|
}));
|
|
@@ -3265,7 +3319,7 @@ var IdentityManager = class {
|
|
|
3265
3319
|
}
|
|
3266
3320
|
};
|
|
3267
3321
|
const identity = await this._constructIdentity(identityRecord);
|
|
3268
|
-
await identity.open(new
|
|
3322
|
+
await identity.open(new Context5(void 0, {
|
|
3269
3323
|
F: __dxlog_file13,
|
|
3270
3324
|
L: 268
|
|
3271
3325
|
}));
|
|
@@ -3720,7 +3774,7 @@ function _using_ctx2() {
|
|
|
3720
3774
|
var __dxlog_file15 = "/home/runner/work/dxos/dxos/packages/sdk/client-services/src/packlets/spaces/data-space.ts";
|
|
3721
3775
|
var DataSpace = class {
|
|
3722
3776
|
constructor(params) {
|
|
3723
|
-
this._ctx = new
|
|
3777
|
+
this._ctx = new Context6(void 0, {
|
|
3724
3778
|
F: __dxlog_file15,
|
|
3725
3779
|
L: 94
|
|
3726
3780
|
});
|
|
@@ -3827,7 +3881,7 @@ var DataSpace = class {
|
|
|
3827
3881
|
if (this._edgeFeedReplicator) {
|
|
3828
3882
|
this.inner.protocol.feedAdded.append(this._onFeedAdded);
|
|
3829
3883
|
}
|
|
3830
|
-
await this._inner.open(new
|
|
3884
|
+
await this._inner.open(new Context6(void 0, {
|
|
3831
3885
|
F: __dxlog_file15,
|
|
3832
3886
|
L: 238
|
|
3833
3887
|
}));
|
|
@@ -3862,7 +3916,7 @@ var DataSpace = class {
|
|
|
3862
3916
|
C: (f, a) => f(...a)
|
|
3863
3917
|
});
|
|
3864
3918
|
await this._ctx.dispose();
|
|
3865
|
-
this._ctx = new
|
|
3919
|
+
this._ctx = new Context6(void 0, {
|
|
3866
3920
|
F: __dxlog_file15,
|
|
3867
3921
|
L: 264
|
|
3868
3922
|
});
|
|
@@ -4357,7 +4411,7 @@ import { ComplexSet as ComplexSet5 } from "@dxos/util";
|
|
|
4357
4411
|
|
|
4358
4412
|
// packages/sdk/client-services/src/packlets/invitations/invitation-guest-extenstion.ts
|
|
4359
4413
|
import { Trigger as Trigger5 } from "@dxos/async";
|
|
4360
|
-
import { cancelWithContext as cancelWithContext4, Context as
|
|
4414
|
+
import { cancelWithContext as cancelWithContext4, Context as Context7 } from "@dxos/context";
|
|
4361
4415
|
import { invariant as invariant11 } from "@dxos/invariant";
|
|
4362
4416
|
import { log as log14 } from "@dxos/log";
|
|
4363
4417
|
import { InvalidInvitationExtensionRoleError } from "@dxos/protocols";
|
|
@@ -4399,7 +4453,7 @@ var InvitationGuestExtension = class extends RpcExtension2 {
|
|
|
4399
4453
|
});
|
|
4400
4454
|
this._invitationFlowMutex = _invitationFlowMutex;
|
|
4401
4455
|
this._callbacks = _callbacks;
|
|
4402
|
-
this._ctx = new
|
|
4456
|
+
this._ctx = new Context7(void 0, {
|
|
4403
4457
|
F: __dxlog_file17,
|
|
4404
4458
|
L: 34
|
|
4405
4459
|
});
|
|
@@ -4511,7 +4565,7 @@ var InvitationGuestExtension = class extends RpcExtension2 {
|
|
|
4511
4565
|
|
|
4512
4566
|
// packages/sdk/client-services/src/packlets/invitations/invitation-host-extension.ts
|
|
4513
4567
|
import { Trigger as Trigger6, scheduleTask as scheduleTask5 } from "@dxos/async";
|
|
4514
|
-
import { cancelWithContext as cancelWithContext5, Context as
|
|
4568
|
+
import { cancelWithContext as cancelWithContext5, Context as Context8 } from "@dxos/context";
|
|
4515
4569
|
import { randomBytes, verify } from "@dxos/crypto";
|
|
4516
4570
|
import { invariant as invariant12, InvariantViolation } from "@dxos/invariant";
|
|
4517
4571
|
import { PublicKey as PublicKey9 } from "@dxos/keys";
|
|
@@ -4536,7 +4590,7 @@ var InvitationHostExtension = class extends RpcExtension3 {
|
|
|
4536
4590
|
});
|
|
4537
4591
|
this._invitationFlowMutex = _invitationFlowMutex;
|
|
4538
4592
|
this._callbacks = _callbacks;
|
|
4539
|
-
this._ctx = new
|
|
4593
|
+
this._ctx = new Context8(void 0, {
|
|
4540
4594
|
F: __dxlog_file18,
|
|
4541
4595
|
L: 53
|
|
4542
4596
|
});
|
|
@@ -5911,7 +5965,7 @@ var SpaceInvitationProtocol = class {
|
|
|
5911
5965
|
// packages/sdk/client-services/src/packlets/invitations/invitations-manager.ts
|
|
5912
5966
|
import { Event as Event8, PushStream, TimeoutError as TimeoutError3, Trigger as Trigger7 } from "@dxos/async";
|
|
5913
5967
|
import { AuthenticatingInvitation, AUTHENTICATION_CODE_LENGTH, CancellableInvitation, INVITATION_TIMEOUT as INVITATION_TIMEOUT2 } from "@dxos/client-protocol";
|
|
5914
|
-
import { Context as
|
|
5968
|
+
import { Context as Context9 } from "@dxos/context";
|
|
5915
5969
|
import { generatePasscode } from "@dxos/credentials";
|
|
5916
5970
|
import { hasInvitationExpired } from "@dxos/echo-pipeline";
|
|
5917
5971
|
import { invariant as invariant16 } from "@dxos/invariant";
|
|
@@ -6143,7 +6197,7 @@ var InvitationsManager = class {
|
|
|
6143
6197
|
}
|
|
6144
6198
|
_createObservableInvitation(handler, invitation) {
|
|
6145
6199
|
const stream = new PushStream();
|
|
6146
|
-
const ctx = new
|
|
6200
|
+
const ctx = new Context9({
|
|
6147
6201
|
onError: (err) => {
|
|
6148
6202
|
stream.error(err);
|
|
6149
6203
|
void ctx.dispose();
|
|
@@ -6183,7 +6237,7 @@ var InvitationsManager = class {
|
|
|
6183
6237
|
_createObservableAcceptingInvitation(handler, initialState) {
|
|
6184
6238
|
const otpEnteredTrigger = new Trigger7();
|
|
6185
6239
|
const stream = new PushStream();
|
|
6186
|
-
const ctx = new
|
|
6240
|
+
const ctx = new Context9({
|
|
6187
6241
|
onError: (err) => {
|
|
6188
6242
|
if (err instanceof TimeoutError3) {
|
|
6189
6243
|
log19("timeout", {
|
|
@@ -6478,7 +6532,7 @@ ClientRpcServer = _ts_decorate6([
|
|
|
6478
6532
|
|
|
6479
6533
|
// packages/sdk/client-services/src/packlets/services/service-context.ts
|
|
6480
6534
|
import { Trigger as Trigger9 } from "@dxos/async";
|
|
6481
|
-
import { Context as
|
|
6535
|
+
import { Context as Context10, Resource as Resource5 } from "@dxos/context";
|
|
6482
6536
|
import { getCredentialAssertion as getCredentialAssertion5 } from "@dxos/credentials";
|
|
6483
6537
|
import { failUndefined as failUndefined2 } from "@dxos/debug";
|
|
6484
6538
|
import { EchoEdgeReplicator, EchoHost, MeshEchoReplicator, MetadataStore, SpaceManager, valueEncoding } from "@dxos/echo-pipeline";
|
|
@@ -6668,7 +6722,7 @@ var ServiceContext = class extends Resource5 {
|
|
|
6668
6722
|
}
|
|
6669
6723
|
async createIdentity(params = {}) {
|
|
6670
6724
|
const identity = await this.identityManager.createIdentity(params);
|
|
6671
|
-
await this._initialize(new
|
|
6725
|
+
await this._initialize(new Context10(void 0, {
|
|
6672
6726
|
F: __dxlog_file24,
|
|
6673
6727
|
L: 249
|
|
6674
6728
|
}));
|
|
@@ -6697,7 +6751,7 @@ var ServiceContext = class extends Resource5 {
|
|
|
6697
6751
|
}
|
|
6698
6752
|
async _acceptIdentity(params) {
|
|
6699
6753
|
const identity = await this.identityManager.acceptIdentity(params);
|
|
6700
|
-
await this._initialize(new
|
|
6754
|
+
await this._initialize(new Context10(void 0, {
|
|
6701
6755
|
F: __dxlog_file24,
|
|
6702
6756
|
L: 271
|
|
6703
6757
|
}));
|
|
@@ -7087,7 +7141,7 @@ var importProfileData = async ({ storage, level }, archive) => {
|
|
|
7087
7141
|
// packages/sdk/client-services/src/packlets/services/service-host.ts
|
|
7088
7142
|
import { Event as Event10, synchronized as synchronized3 } from "@dxos/async";
|
|
7089
7143
|
import { clientServiceBundle } from "@dxos/client-protocol";
|
|
7090
|
-
import { Context as
|
|
7144
|
+
import { Context as Context11 } from "@dxos/context";
|
|
7091
7145
|
import { EdgeClient } from "@dxos/edge-client";
|
|
7092
7146
|
import { invariant as invariant20 } from "@dxos/invariant";
|
|
7093
7147
|
import { PublicKey as PublicKey17 } from "@dxos/keys";
|
|
@@ -7522,7 +7576,7 @@ var ClientServicesHost = class {
|
|
|
7522
7576
|
lockKey,
|
|
7523
7577
|
onAcquire: () => {
|
|
7524
7578
|
if (!this._opening) {
|
|
7525
|
-
void this.open(new
|
|
7579
|
+
void this.open(new Context11(void 0, {
|
|
7526
7580
|
F: __dxlog_file27,
|
|
7527
7581
|
L: 132
|
|
7528
7582
|
}));
|
|
@@ -7913,4 +7967,4 @@ export {
|
|
|
7913
7967
|
importProfileData,
|
|
7914
7968
|
ClientServicesHost
|
|
7915
7969
|
};
|
|
7916
|
-
//# sourceMappingURL=chunk-
|
|
7970
|
+
//# sourceMappingURL=chunk-7ONARHVD.mjs.map
|