@dxos/client-services 0.6.12-main.15a606f → 0.6.12-main.c4a728f
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-BDGSOBZV.mjs → chunk-BAV44MSY.mjs} +105 -61
- package/dist/lib/browser/chunk-BAV44MSY.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-EBZ7KFXS.cjs → chunk-KSDDPS63.cjs} +87 -43
- package/dist/lib/node/chunk-KSDDPS63.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-LDBJYNPL.mjs → chunk-UMKX2SNB.mjs} +105 -61
- package/dist/lib/node-esm/chunk-UMKX2SNB.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 +1 -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 +244 -0
- package/src/packlets/spaces/edge-feed-replicator.ts +50 -17
- package/src/version.ts +1 -1
- package/dist/lib/browser/chunk-BDGSOBZV.mjs.map +0 -7
- package/dist/lib/node/chunk-EBZ7KFXS.cjs.map +0 -7
- package/dist/lib/node-esm/chunk-LDBJYNPL.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.c4a728f";
|
|
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,54 @@ 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
|
-
|
|
941
|
-
|
|
938
|
+
this._messenger.connected.on(this._ctx, async () => {
|
|
939
|
+
await this._resetConnection();
|
|
940
|
+
this._connected = true;
|
|
941
|
+
const connectionCtx = new Context3({
|
|
942
|
+
onError: async (err) => {
|
|
943
|
+
if (connectionCtx !== this._connectionCtx) {
|
|
944
|
+
return;
|
|
945
|
+
}
|
|
946
|
+
if (err instanceof EdgeIdentityChangedError || err instanceof EdgeConnectionClosedError) {
|
|
947
|
+
log4("resetting on reconnect", void 0, {
|
|
948
|
+
F: __dxlog_file6,
|
|
949
|
+
L: 86,
|
|
950
|
+
S: this,
|
|
951
|
+
C: (f, a) => f(...a)
|
|
952
|
+
});
|
|
953
|
+
await this._resetConnection();
|
|
954
|
+
} else {
|
|
955
|
+
this._ctx.raise(err);
|
|
956
|
+
}
|
|
957
|
+
}
|
|
958
|
+
}, {
|
|
959
|
+
F: __dxlog_file6,
|
|
960
|
+
L: 80
|
|
961
|
+
});
|
|
962
|
+
this._connectionCtx = connectionCtx;
|
|
963
|
+
log4("connection context created", void 0, {
|
|
964
|
+
F: __dxlog_file6,
|
|
965
|
+
L: 94,
|
|
966
|
+
S: this,
|
|
967
|
+
C: (f, a) => f(...a)
|
|
968
|
+
});
|
|
969
|
+
scheduleMicroTask(connectionCtx, async () => {
|
|
970
|
+
for (const feed of this._feeds.values()) {
|
|
971
|
+
await this._replicateFeed(connectionCtx, feed);
|
|
972
|
+
}
|
|
973
|
+
});
|
|
974
|
+
});
|
|
942
975
|
}
|
|
943
976
|
async _close() {
|
|
944
|
-
this.
|
|
977
|
+
await this._resetConnection();
|
|
978
|
+
}
|
|
979
|
+
async _resetConnection() {
|
|
945
980
|
this._connected = false;
|
|
946
981
|
await this._connectionCtx?.dispose();
|
|
947
982
|
this._connectionCtx = void 0;
|
|
@@ -952,37 +987,37 @@ var EdgeFeedReplicator = class extends Resource {
|
|
|
952
987
|
key: feed.key
|
|
953
988
|
}, {
|
|
954
989
|
F: __dxlog_file6,
|
|
955
|
-
L:
|
|
990
|
+
L: 115,
|
|
956
991
|
S: this,
|
|
957
992
|
C: (f, a) => f(...a)
|
|
958
993
|
});
|
|
959
994
|
this._feeds.set(feed.key, feed);
|
|
960
|
-
if (this._connected) {
|
|
961
|
-
await this._replicateFeed(feed);
|
|
995
|
+
if (this._connected && this._connectionCtx) {
|
|
996
|
+
await this._replicateFeed(this._connectionCtx, feed);
|
|
962
997
|
}
|
|
963
998
|
}
|
|
964
999
|
_getPushMutex(key) {
|
|
965
1000
|
return defaultMap(this._pushMutex, key, () => new Mutex());
|
|
966
1001
|
}
|
|
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
|
-
});
|
|
1002
|
+
async _replicateFeed(ctx, feed) {
|
|
977
1003
|
await this._sendMessage({
|
|
978
1004
|
type: "get-metadata",
|
|
979
1005
|
feedKey: feed.key.toHex()
|
|
980
1006
|
});
|
|
981
|
-
Event.wrap(feed.core, "append").on(
|
|
1007
|
+
Event.wrap(feed.core, "append").on(ctx, async () => {
|
|
982
1008
|
await this._pushBlocksIfNeeded(feed);
|
|
983
1009
|
});
|
|
984
1010
|
}
|
|
985
1011
|
async _sendMessage(message) {
|
|
1012
|
+
if (!this._connectionCtx) {
|
|
1013
|
+
log4.info("message dropped because connection was disposed", void 0, {
|
|
1014
|
+
F: __dxlog_file6,
|
|
1015
|
+
L: 140,
|
|
1016
|
+
S: this,
|
|
1017
|
+
C: (f, a) => f(...a)
|
|
1018
|
+
});
|
|
1019
|
+
return;
|
|
1020
|
+
}
|
|
986
1021
|
const logPayload = message.type === "data" ? {
|
|
987
1022
|
feedKey: message.feedKey,
|
|
988
1023
|
blocks: message.blocks.map((b) => b.index)
|
|
@@ -991,13 +1026,13 @@ var EdgeFeedReplicator = class extends Resource {
|
|
|
991
1026
|
};
|
|
992
1027
|
log4.info("sending message", logPayload, {
|
|
993
1028
|
F: __dxlog_file6,
|
|
994
|
-
L:
|
|
1029
|
+
L: 146,
|
|
995
1030
|
S: this,
|
|
996
1031
|
C: (f, a) => f(...a)
|
|
997
1032
|
});
|
|
998
1033
|
invariant2(message.feedKey, void 0, {
|
|
999
1034
|
F: __dxlog_file6,
|
|
1000
|
-
L:
|
|
1035
|
+
L: 148,
|
|
1001
1036
|
S: this,
|
|
1002
1037
|
A: [
|
|
1003
1038
|
"message.feedKey",
|
|
@@ -1017,7 +1052,16 @@ var EdgeFeedReplicator = class extends Resource {
|
|
|
1017
1052
|
}));
|
|
1018
1053
|
}
|
|
1019
1054
|
_onMessage(message) {
|
|
1020
|
-
|
|
1055
|
+
if (!this._connectionCtx) {
|
|
1056
|
+
log4.warn("received message after connection context was disposed", void 0, {
|
|
1057
|
+
F: __dxlog_file6,
|
|
1058
|
+
L: 165,
|
|
1059
|
+
S: this,
|
|
1060
|
+
C: (f, a) => f(...a)
|
|
1061
|
+
});
|
|
1062
|
+
return;
|
|
1063
|
+
}
|
|
1064
|
+
scheduleMicroTask(this._connectionCtx, async () => {
|
|
1021
1065
|
switch (message.type) {
|
|
1022
1066
|
case "metadata": {
|
|
1023
1067
|
try {
|
|
@@ -1026,7 +1070,7 @@ var EdgeFeedReplicator = class extends Resource {
|
|
|
1026
1070
|
message
|
|
1027
1071
|
}, {
|
|
1028
1072
|
F: __dxlog_file6,
|
|
1029
|
-
L:
|
|
1073
|
+
L: 171,
|
|
1030
1074
|
S: this,
|
|
1031
1075
|
C: (f, a) => f(...a)
|
|
1032
1076
|
});
|
|
@@ -1037,7 +1081,7 @@ var EdgeFeedReplicator = class extends Resource {
|
|
|
1037
1081
|
feedKey
|
|
1038
1082
|
}, {
|
|
1039
1083
|
F: __dxlog_file6,
|
|
1040
|
-
L:
|
|
1084
|
+
L: 176,
|
|
1041
1085
|
S: this,
|
|
1042
1086
|
C: (f, a) => f(...a)
|
|
1043
1087
|
});
|
|
@@ -1070,7 +1114,7 @@ var EdgeFeedReplicator = class extends Resource {
|
|
|
1070
1114
|
blocks: message.blocks.map((b) => b.index)
|
|
1071
1115
|
}, {
|
|
1072
1116
|
F: __dxlog_file6,
|
|
1073
|
-
L:
|
|
1117
|
+
L: 198,
|
|
1074
1118
|
S: this,
|
|
1075
1119
|
C: (f, a) => f(...a)
|
|
1076
1120
|
});
|
|
@@ -1081,7 +1125,7 @@ var EdgeFeedReplicator = class extends Resource {
|
|
|
1081
1125
|
feedKey
|
|
1082
1126
|
}, {
|
|
1083
1127
|
F: __dxlog_file6,
|
|
1084
|
-
L:
|
|
1128
|
+
L: 203,
|
|
1085
1129
|
S: this,
|
|
1086
1130
|
C: (f, a) => f(...a)
|
|
1087
1131
|
});
|
|
@@ -1095,7 +1139,7 @@ var EdgeFeedReplicator = class extends Resource {
|
|
|
1095
1139
|
...message
|
|
1096
1140
|
}, {
|
|
1097
1141
|
F: __dxlog_file6,
|
|
1098
|
-
L:
|
|
1142
|
+
L: 212,
|
|
1099
1143
|
S: this,
|
|
1100
1144
|
C: (f, a) => f(...a)
|
|
1101
1145
|
});
|
|
@@ -1110,7 +1154,7 @@ var EdgeFeedReplicator = class extends Resource {
|
|
|
1110
1154
|
to
|
|
1111
1155
|
}, {
|
|
1112
1156
|
F: __dxlog_file6,
|
|
1113
|
-
L:
|
|
1157
|
+
L: 219,
|
|
1114
1158
|
S: this,
|
|
1115
1159
|
C: (f, a) => f(...a)
|
|
1116
1160
|
});
|
|
@@ -1120,7 +1164,7 @@ var EdgeFeedReplicator = class extends Resource {
|
|
|
1120
1164
|
});
|
|
1121
1165
|
invariant2(data instanceof Uint8Array, void 0, {
|
|
1122
1166
|
F: __dxlog_file6,
|
|
1123
|
-
L:
|
|
1167
|
+
L: 224,
|
|
1124
1168
|
S: this,
|
|
1125
1169
|
A: [
|
|
1126
1170
|
"data instanceof Uint8Array",
|
|
@@ -1148,7 +1192,7 @@ var EdgeFeedReplicator = class extends Resource {
|
|
|
1148
1192
|
blocks: blocks.length
|
|
1149
1193
|
}, {
|
|
1150
1194
|
F: __dxlog_file6,
|
|
1151
|
-
L:
|
|
1195
|
+
L: 245,
|
|
1152
1196
|
S: this,
|
|
1153
1197
|
C: (f, a) => f(...a)
|
|
1154
1198
|
});
|
|
@@ -1166,11 +1210,11 @@ var EdgeFeedReplicator = class extends Resource {
|
|
|
1166
1210
|
async _pushBlocksIfNeeded(feed) {
|
|
1167
1211
|
try {
|
|
1168
1212
|
var _usingCtx = _using_ctx();
|
|
1169
|
-
const
|
|
1213
|
+
const _ = _usingCtx.u(await this._getPushMutex(feed.key).acquire());
|
|
1170
1214
|
if (!this._remoteLength.has(feed.key)) {
|
|
1171
1215
|
log4("blocks not pushed because remote length is unknown", void 0, {
|
|
1172
1216
|
F: __dxlog_file6,
|
|
1173
|
-
L:
|
|
1217
|
+
L: 266,
|
|
1174
1218
|
S: this,
|
|
1175
1219
|
C: (f, a) => f(...a)
|
|
1176
1220
|
});
|
|
@@ -1201,7 +1245,7 @@ var bufferizeBlock = (block) => ({
|
|
|
1201
1245
|
// packages/sdk/client-services/src/packlets/spaces/data-space.ts
|
|
1202
1246
|
import { Event as Event7, Mutex as Mutex2, scheduleTask as scheduleTask4, sleep as sleep3, synchronized as synchronized2, trackLeaks as trackLeaks2 } from "@dxos/async";
|
|
1203
1247
|
import { AUTH_TIMEOUT as AUTH_TIMEOUT2 } from "@dxos/client-protocol";
|
|
1204
|
-
import { Context as
|
|
1248
|
+
import { Context as Context6, ContextDisposedError, cancelWithContext as cancelWithContext2 } from "@dxos/context";
|
|
1205
1249
|
import { timed, warnAfterTimeout } from "@dxos/debug";
|
|
1206
1250
|
import { createMappedFeedWriter } from "@dxos/echo-pipeline";
|
|
1207
1251
|
import { SpaceDocVersion as SpaceDocVersion3 } from "@dxos/echo-protocol";
|
|
@@ -1437,7 +1481,7 @@ var runEpochMigration = async (ctx, context) => {
|
|
|
1437
1481
|
|
|
1438
1482
|
// packages/sdk/client-services/src/packlets/spaces/notarization-plugin.ts
|
|
1439
1483
|
import { DeferredTask, Event as Event3, scheduleTask as scheduleTask2, sleep, TimeoutError, Trigger as Trigger3 } from "@dxos/async";
|
|
1440
|
-
import { Context as
|
|
1484
|
+
import { Context as Context4, rejectOnDispose } from "@dxos/context";
|
|
1441
1485
|
import { invariant as invariant4 } from "@dxos/invariant";
|
|
1442
1486
|
import { PublicKey as PublicKey4 } from "@dxos/keys";
|
|
1443
1487
|
import { log as log6 } from "@dxos/log";
|
|
@@ -1451,7 +1495,7 @@ var DEFAULT_NOTARIZE_TIMEOUT = 1e4;
|
|
|
1451
1495
|
var WRITER_NOT_SET_ERROR_CODE = "WRITER_NOT_SET";
|
|
1452
1496
|
var NotarizationPlugin = class {
|
|
1453
1497
|
constructor() {
|
|
1454
|
-
this._ctx = new
|
|
1498
|
+
this._ctx = new Context4(void 0, {
|
|
1455
1499
|
F: __dxlog_file8,
|
|
1456
1500
|
L: 62
|
|
1457
1501
|
});
|
|
@@ -3021,7 +3065,7 @@ Identity = _ts_decorate2([
|
|
|
3021
3065
|
// packages/sdk/client-services/src/packlets/identity/identity-manager.ts
|
|
3022
3066
|
import platform from "platform";
|
|
3023
3067
|
import { Event as Event6 } from "@dxos/async";
|
|
3024
|
-
import { Context as
|
|
3068
|
+
import { Context as Context5 } from "@dxos/context";
|
|
3025
3069
|
import { createCredentialSignerWithKey as createCredentialSignerWithKey2, CredentialGenerator } from "@dxos/credentials";
|
|
3026
3070
|
import { invariant as invariant8 } from "@dxos/invariant";
|
|
3027
3071
|
import { PublicKey as PublicKey7 } from "@dxos/keys";
|
|
@@ -3103,7 +3147,7 @@ var IdentityManager = class {
|
|
|
3103
3147
|
});
|
|
3104
3148
|
}
|
|
3105
3149
|
async close() {
|
|
3106
|
-
await this._identity?.close(new
|
|
3150
|
+
await this._identity?.close(new Context5(void 0, {
|
|
3107
3151
|
F: __dxlog_file13,
|
|
3108
3152
|
L: 140
|
|
3109
3153
|
}));
|
|
@@ -3136,7 +3180,7 @@ var IdentityManager = class {
|
|
|
3136
3180
|
}
|
|
3137
3181
|
};
|
|
3138
3182
|
const identity = await this._constructIdentity(identityRecord);
|
|
3139
|
-
await identity.open(new
|
|
3183
|
+
await identity.open(new Context5(void 0, {
|
|
3140
3184
|
F: __dxlog_file13,
|
|
3141
3185
|
L: 161
|
|
3142
3186
|
}));
|
|
@@ -3265,7 +3309,7 @@ var IdentityManager = class {
|
|
|
3265
3309
|
}
|
|
3266
3310
|
};
|
|
3267
3311
|
const identity = await this._constructIdentity(identityRecord);
|
|
3268
|
-
await identity.open(new
|
|
3312
|
+
await identity.open(new Context5(void 0, {
|
|
3269
3313
|
F: __dxlog_file13,
|
|
3270
3314
|
L: 268
|
|
3271
3315
|
}));
|
|
@@ -3720,7 +3764,7 @@ function _using_ctx2() {
|
|
|
3720
3764
|
var __dxlog_file15 = "/home/runner/work/dxos/dxos/packages/sdk/client-services/src/packlets/spaces/data-space.ts";
|
|
3721
3765
|
var DataSpace = class {
|
|
3722
3766
|
constructor(params) {
|
|
3723
|
-
this._ctx = new
|
|
3767
|
+
this._ctx = new Context6(void 0, {
|
|
3724
3768
|
F: __dxlog_file15,
|
|
3725
3769
|
L: 94
|
|
3726
3770
|
});
|
|
@@ -3827,7 +3871,7 @@ var DataSpace = class {
|
|
|
3827
3871
|
if (this._edgeFeedReplicator) {
|
|
3828
3872
|
this.inner.protocol.feedAdded.append(this._onFeedAdded);
|
|
3829
3873
|
}
|
|
3830
|
-
await this._inner.open(new
|
|
3874
|
+
await this._inner.open(new Context6(void 0, {
|
|
3831
3875
|
F: __dxlog_file15,
|
|
3832
3876
|
L: 238
|
|
3833
3877
|
}));
|
|
@@ -3862,7 +3906,7 @@ var DataSpace = class {
|
|
|
3862
3906
|
C: (f, a) => f(...a)
|
|
3863
3907
|
});
|
|
3864
3908
|
await this._ctx.dispose();
|
|
3865
|
-
this._ctx = new
|
|
3909
|
+
this._ctx = new Context6(void 0, {
|
|
3866
3910
|
F: __dxlog_file15,
|
|
3867
3911
|
L: 264
|
|
3868
3912
|
});
|
|
@@ -4357,7 +4401,7 @@ import { ComplexSet as ComplexSet5 } from "@dxos/util";
|
|
|
4357
4401
|
|
|
4358
4402
|
// packages/sdk/client-services/src/packlets/invitations/invitation-guest-extenstion.ts
|
|
4359
4403
|
import { Trigger as Trigger5 } from "@dxos/async";
|
|
4360
|
-
import { cancelWithContext as cancelWithContext4, Context as
|
|
4404
|
+
import { cancelWithContext as cancelWithContext4, Context as Context7 } from "@dxos/context";
|
|
4361
4405
|
import { invariant as invariant11 } from "@dxos/invariant";
|
|
4362
4406
|
import { log as log14 } from "@dxos/log";
|
|
4363
4407
|
import { InvalidInvitationExtensionRoleError } from "@dxos/protocols";
|
|
@@ -4399,7 +4443,7 @@ var InvitationGuestExtension = class extends RpcExtension2 {
|
|
|
4399
4443
|
});
|
|
4400
4444
|
this._invitationFlowMutex = _invitationFlowMutex;
|
|
4401
4445
|
this._callbacks = _callbacks;
|
|
4402
|
-
this._ctx = new
|
|
4446
|
+
this._ctx = new Context7(void 0, {
|
|
4403
4447
|
F: __dxlog_file17,
|
|
4404
4448
|
L: 34
|
|
4405
4449
|
});
|
|
@@ -4511,7 +4555,7 @@ var InvitationGuestExtension = class extends RpcExtension2 {
|
|
|
4511
4555
|
|
|
4512
4556
|
// packages/sdk/client-services/src/packlets/invitations/invitation-host-extension.ts
|
|
4513
4557
|
import { Trigger as Trigger6, scheduleTask as scheduleTask5 } from "@dxos/async";
|
|
4514
|
-
import { cancelWithContext as cancelWithContext5, Context as
|
|
4558
|
+
import { cancelWithContext as cancelWithContext5, Context as Context8 } from "@dxos/context";
|
|
4515
4559
|
import { randomBytes, verify } from "@dxos/crypto";
|
|
4516
4560
|
import { invariant as invariant12, InvariantViolation } from "@dxos/invariant";
|
|
4517
4561
|
import { PublicKey as PublicKey9 } from "@dxos/keys";
|
|
@@ -4536,7 +4580,7 @@ var InvitationHostExtension = class extends RpcExtension3 {
|
|
|
4536
4580
|
});
|
|
4537
4581
|
this._invitationFlowMutex = _invitationFlowMutex;
|
|
4538
4582
|
this._callbacks = _callbacks;
|
|
4539
|
-
this._ctx = new
|
|
4583
|
+
this._ctx = new Context8(void 0, {
|
|
4540
4584
|
F: __dxlog_file18,
|
|
4541
4585
|
L: 53
|
|
4542
4586
|
});
|
|
@@ -5911,7 +5955,7 @@ var SpaceInvitationProtocol = class {
|
|
|
5911
5955
|
// packages/sdk/client-services/src/packlets/invitations/invitations-manager.ts
|
|
5912
5956
|
import { Event as Event8, PushStream, TimeoutError as TimeoutError3, Trigger as Trigger7 } from "@dxos/async";
|
|
5913
5957
|
import { AuthenticatingInvitation, AUTHENTICATION_CODE_LENGTH, CancellableInvitation, INVITATION_TIMEOUT as INVITATION_TIMEOUT2 } from "@dxos/client-protocol";
|
|
5914
|
-
import { Context as
|
|
5958
|
+
import { Context as Context9 } from "@dxos/context";
|
|
5915
5959
|
import { generatePasscode } from "@dxos/credentials";
|
|
5916
5960
|
import { hasInvitationExpired } from "@dxos/echo-pipeline";
|
|
5917
5961
|
import { invariant as invariant16 } from "@dxos/invariant";
|
|
@@ -6143,7 +6187,7 @@ var InvitationsManager = class {
|
|
|
6143
6187
|
}
|
|
6144
6188
|
_createObservableInvitation(handler, invitation) {
|
|
6145
6189
|
const stream = new PushStream();
|
|
6146
|
-
const ctx = new
|
|
6190
|
+
const ctx = new Context9({
|
|
6147
6191
|
onError: (err) => {
|
|
6148
6192
|
stream.error(err);
|
|
6149
6193
|
void ctx.dispose();
|
|
@@ -6183,7 +6227,7 @@ var InvitationsManager = class {
|
|
|
6183
6227
|
_createObservableAcceptingInvitation(handler, initialState) {
|
|
6184
6228
|
const otpEnteredTrigger = new Trigger7();
|
|
6185
6229
|
const stream = new PushStream();
|
|
6186
|
-
const ctx = new
|
|
6230
|
+
const ctx = new Context9({
|
|
6187
6231
|
onError: (err) => {
|
|
6188
6232
|
if (err instanceof TimeoutError3) {
|
|
6189
6233
|
log19("timeout", {
|
|
@@ -6478,7 +6522,7 @@ ClientRpcServer = _ts_decorate6([
|
|
|
6478
6522
|
|
|
6479
6523
|
// packages/sdk/client-services/src/packlets/services/service-context.ts
|
|
6480
6524
|
import { Trigger as Trigger9 } from "@dxos/async";
|
|
6481
|
-
import { Context as
|
|
6525
|
+
import { Context as Context10, Resource as Resource5 } from "@dxos/context";
|
|
6482
6526
|
import { getCredentialAssertion as getCredentialAssertion5 } from "@dxos/credentials";
|
|
6483
6527
|
import { failUndefined as failUndefined2 } from "@dxos/debug";
|
|
6484
6528
|
import { EchoEdgeReplicator, EchoHost, MeshEchoReplicator, MetadataStore, SpaceManager, valueEncoding } from "@dxos/echo-pipeline";
|
|
@@ -6668,7 +6712,7 @@ var ServiceContext = class extends Resource5 {
|
|
|
6668
6712
|
}
|
|
6669
6713
|
async createIdentity(params = {}) {
|
|
6670
6714
|
const identity = await this.identityManager.createIdentity(params);
|
|
6671
|
-
await this._initialize(new
|
|
6715
|
+
await this._initialize(new Context10(void 0, {
|
|
6672
6716
|
F: __dxlog_file24,
|
|
6673
6717
|
L: 249
|
|
6674
6718
|
}));
|
|
@@ -6697,7 +6741,7 @@ var ServiceContext = class extends Resource5 {
|
|
|
6697
6741
|
}
|
|
6698
6742
|
async _acceptIdentity(params) {
|
|
6699
6743
|
const identity = await this.identityManager.acceptIdentity(params);
|
|
6700
|
-
await this._initialize(new
|
|
6744
|
+
await this._initialize(new Context10(void 0, {
|
|
6701
6745
|
F: __dxlog_file24,
|
|
6702
6746
|
L: 271
|
|
6703
6747
|
}));
|
|
@@ -7087,7 +7131,7 @@ var importProfileData = async ({ storage, level }, archive) => {
|
|
|
7087
7131
|
// packages/sdk/client-services/src/packlets/services/service-host.ts
|
|
7088
7132
|
import { Event as Event10, synchronized as synchronized3 } from "@dxos/async";
|
|
7089
7133
|
import { clientServiceBundle } from "@dxos/client-protocol";
|
|
7090
|
-
import { Context as
|
|
7134
|
+
import { Context as Context11 } from "@dxos/context";
|
|
7091
7135
|
import { EdgeClient } from "@dxos/edge-client";
|
|
7092
7136
|
import { invariant as invariant20 } from "@dxos/invariant";
|
|
7093
7137
|
import { PublicKey as PublicKey17 } from "@dxos/keys";
|
|
@@ -7522,7 +7566,7 @@ var ClientServicesHost = class {
|
|
|
7522
7566
|
lockKey,
|
|
7523
7567
|
onAcquire: () => {
|
|
7524
7568
|
if (!this._opening) {
|
|
7525
|
-
void this.open(new
|
|
7569
|
+
void this.open(new Context11(void 0, {
|
|
7526
7570
|
F: __dxlog_file27,
|
|
7527
7571
|
L: 132
|
|
7528
7572
|
}));
|
|
@@ -7913,4 +7957,4 @@ export {
|
|
|
7913
7957
|
importProfileData,
|
|
7914
7958
|
ClientServicesHost
|
|
7915
7959
|
};
|
|
7916
|
-
//# sourceMappingURL=chunk-
|
|
7960
|
+
//# sourceMappingURL=chunk-BAV44MSY.mjs.map
|