@dxos/client-services 0.6.12-main.15a606f → 0.6.12-main.78ddbdf
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-XSFLJVDP.mjs} +105 -61
- package/dist/lib/browser/chunk-XSFLJVDP.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-F3WGFGEN.cjs} +87 -43
- package/dist/lib/node/chunk-F3WGFGEN.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-3HDLTAT2.mjs} +105 -61
- package/dist/lib/node-esm/chunk-3HDLTAT2.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
|
@@ -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_F3WGFGEN = require("../chunk-F3WGFGEN.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");
|
|
@@ -228,7 +228,7 @@ var createInvitation = async (host, options) => {
|
|
|
228
228
|
authMethod: import_services.Invitation.AuthMethod.NONE,
|
|
229
229
|
...options ?? {}
|
|
230
230
|
};
|
|
231
|
-
if (host instanceof
|
|
231
|
+
if (host instanceof import_chunk_F3WGFGEN.ServiceContext) {
|
|
232
232
|
return host.invitationsManager.createInvitation({
|
|
233
233
|
kind: import_services.Invitation.Kind.SPACE,
|
|
234
234
|
...options
|
|
@@ -238,7 +238,7 @@ var createInvitation = async (host, options) => {
|
|
|
238
238
|
};
|
|
239
239
|
var acceptInvitation = (guest, invitation, guestDeviceProfile) => {
|
|
240
240
|
invitation = sanitizeInvitation(invitation);
|
|
241
|
-
if (guest instanceof
|
|
241
|
+
if (guest instanceof import_chunk_F3WGFGEN.ServiceContext) {
|
|
242
242
|
return guest.invitationsManager.acceptInvitation({
|
|
243
243
|
invitation,
|
|
244
244
|
deviceProfile: guestDeviceProfile
|
|
@@ -248,7 +248,7 @@ var acceptInvitation = (guest, invitation, guestDeviceProfile) => {
|
|
|
248
248
|
};
|
|
249
249
|
var __dxlog_file2 = "/home/runner/work/dxos/dxos/packages/sdk/client-services/src/packlets/testing/test-builder.ts";
|
|
250
250
|
var createServiceHost = (config, signalManagerContext) => {
|
|
251
|
-
return new
|
|
251
|
+
return new import_chunk_F3WGFGEN.ClientServicesHost({
|
|
252
252
|
config,
|
|
253
253
|
signalManager: new import_messaging.MemorySignalManager(signalManagerContext),
|
|
254
254
|
transportFactory: import_network_manager.MemoryTransportFactory
|
|
@@ -267,7 +267,7 @@ var createServiceContext = async ({ signalManagerFactory = async () => {
|
|
|
267
267
|
});
|
|
268
268
|
const level = (0, import_testing.createTestLevel)();
|
|
269
269
|
await level.open();
|
|
270
|
-
return new
|
|
270
|
+
return new import_chunk_F3WGFGEN.ServiceContext(storage, level, networkManager, signalManager, void 0, {
|
|
271
271
|
invitationConnectionDefaultParams: {
|
|
272
272
|
controlHeartbeatInterval: 200
|
|
273
273
|
},
|
|
@@ -376,7 +376,7 @@ var TestPeer = class {
|
|
|
376
376
|
return this._props.meshEchoReplicator ??= new import_echo_pipeline.MeshEchoReplicator();
|
|
377
377
|
}
|
|
378
378
|
get dataSpaceManager() {
|
|
379
|
-
return this._props.dataSpaceManager ??= new
|
|
379
|
+
return this._props.dataSpaceManager ??= new import_chunk_F3WGFGEN.DataSpaceManager({
|
|
380
380
|
spaceManager: this.spaceManager,
|
|
381
381
|
metadataStore: this.metadataStore,
|
|
382
382
|
keyring: this.keyring,
|
|
@@ -391,9 +391,9 @@ var TestPeer = class {
|
|
|
391
391
|
});
|
|
392
392
|
}
|
|
393
393
|
get invitationsManager() {
|
|
394
|
-
return this._props.invitationsManager ??= new
|
|
394
|
+
return this._props.invitationsManager ??= new import_chunk_F3WGFGEN.InvitationsManager(new import_chunk_F3WGFGEN.InvitationsHandler(this.networkManager), (invitation) => {
|
|
395
395
|
if (invitation.kind === import_services2.Invitation.Kind.SPACE) {
|
|
396
|
-
return new
|
|
396
|
+
return new import_chunk_F3WGFGEN.SpaceInvitationProtocol(this.dataSpaceManager, this.identity, this.keyring, invitation.spaceKey);
|
|
397
397
|
} else {
|
|
398
398
|
throw new Error("not implemented");
|
|
399
399
|
}
|
|
@@ -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.6.12-main.
|
|
400
|
+
var DXOS_VERSION = "0.6.12-main.78ddbdf";
|
|
401
401
|
|
|
402
402
|
// packages/sdk/client-services/src/packlets/services/platform.ts
|
|
403
403
|
import { Platform } from "@dxos/protocols/proto/dxos/client/services";
|
|
@@ -726,7 +726,8 @@ var TrustedKeySetAuthVerifier = class {
|
|
|
726
726
|
// packages/sdk/client-services/src/packlets/spaces/edge-feed-replicator.ts
|
|
727
727
|
import { decode as decodeCbor, encode as encodeCbor } from "cbor-x";
|
|
728
728
|
import { Event, Mutex, scheduleMicroTask } from "@dxos/async";
|
|
729
|
-
import { Resource } from "@dxos/context";
|
|
729
|
+
import { Context as Context3, Resource } from "@dxos/context";
|
|
730
|
+
import { EdgeConnectionClosedError, EdgeIdentityChangedError } from "@dxos/edge-client";
|
|
730
731
|
import { invariant as invariant2 } from "@dxos/invariant";
|
|
731
732
|
import { PublicKey as PublicKey3 } from "@dxos/keys";
|
|
732
733
|
import { log as log3 } from "@dxos/log";
|
|
@@ -815,7 +816,7 @@ var EdgeFeedReplicator = class extends Resource {
|
|
|
815
816
|
this._spaceId = spaceId;
|
|
816
817
|
}
|
|
817
818
|
async _open() {
|
|
818
|
-
this._ctx.onDispose(this._messenger.addListener(
|
|
819
|
+
this._ctx.onDispose(this._messenger.addListener((message) => {
|
|
819
820
|
if (!message.serviceId) {
|
|
820
821
|
return;
|
|
821
822
|
}
|
|
@@ -830,7 +831,7 @@ var EdgeFeedReplicator = class extends Resource {
|
|
|
830
831
|
_spaceId: this._spaceId
|
|
831
832
|
}, {
|
|
832
833
|
F: __dxlog_file5,
|
|
833
|
-
L:
|
|
834
|
+
L: 66,
|
|
834
835
|
S: this,
|
|
835
836
|
C: (f, a) => f(...a)
|
|
836
837
|
});
|
|
@@ -843,20 +844,54 @@ var EdgeFeedReplicator = class extends Resource {
|
|
|
843
844
|
type: payload.type
|
|
844
845
|
}, {
|
|
845
846
|
F: __dxlog_file5,
|
|
846
|
-
L:
|
|
847
|
+
L: 71,
|
|
847
848
|
S: this,
|
|
848
849
|
C: (f, a) => f(...a)
|
|
849
850
|
});
|
|
850
851
|
this._onMessage(payload);
|
|
851
852
|
}));
|
|
852
|
-
this.
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
853
|
+
this._messenger.connected.on(this._ctx, async () => {
|
|
854
|
+
await this._resetConnection();
|
|
855
|
+
this._connected = true;
|
|
856
|
+
const connectionCtx = new Context3({
|
|
857
|
+
onError: async (err) => {
|
|
858
|
+
if (connectionCtx !== this._connectionCtx) {
|
|
859
|
+
return;
|
|
860
|
+
}
|
|
861
|
+
if (err instanceof EdgeIdentityChangedError || err instanceof EdgeConnectionClosedError) {
|
|
862
|
+
log3("resetting on reconnect", void 0, {
|
|
863
|
+
F: __dxlog_file5,
|
|
864
|
+
L: 86,
|
|
865
|
+
S: this,
|
|
866
|
+
C: (f, a) => f(...a)
|
|
867
|
+
});
|
|
868
|
+
await this._resetConnection();
|
|
869
|
+
} else {
|
|
870
|
+
this._ctx.raise(err);
|
|
871
|
+
}
|
|
872
|
+
}
|
|
873
|
+
}, {
|
|
874
|
+
F: __dxlog_file5,
|
|
875
|
+
L: 80
|
|
876
|
+
});
|
|
877
|
+
this._connectionCtx = connectionCtx;
|
|
878
|
+
log3("connection context created", void 0, {
|
|
879
|
+
F: __dxlog_file5,
|
|
880
|
+
L: 94,
|
|
881
|
+
S: this,
|
|
882
|
+
C: (f, a) => f(...a)
|
|
883
|
+
});
|
|
884
|
+
scheduleMicroTask(connectionCtx, async () => {
|
|
885
|
+
for (const feed of this._feeds.values()) {
|
|
886
|
+
await this._replicateFeed(connectionCtx, feed);
|
|
887
|
+
}
|
|
888
|
+
});
|
|
889
|
+
});
|
|
857
890
|
}
|
|
858
891
|
async _close() {
|
|
859
|
-
this.
|
|
892
|
+
await this._resetConnection();
|
|
893
|
+
}
|
|
894
|
+
async _resetConnection() {
|
|
860
895
|
this._connected = false;
|
|
861
896
|
await this._connectionCtx?.dispose();
|
|
862
897
|
this._connectionCtx = void 0;
|
|
@@ -867,37 +902,37 @@ var EdgeFeedReplicator = class extends Resource {
|
|
|
867
902
|
key: feed.key
|
|
868
903
|
}, {
|
|
869
904
|
F: __dxlog_file5,
|
|
870
|
-
L:
|
|
905
|
+
L: 115,
|
|
871
906
|
S: this,
|
|
872
907
|
C: (f, a) => f(...a)
|
|
873
908
|
});
|
|
874
909
|
this._feeds.set(feed.key, feed);
|
|
875
|
-
if (this._connected) {
|
|
876
|
-
await this._replicateFeed(feed);
|
|
910
|
+
if (this._connected && this._connectionCtx) {
|
|
911
|
+
await this._replicateFeed(this._connectionCtx, feed);
|
|
877
912
|
}
|
|
878
913
|
}
|
|
879
914
|
_getPushMutex(key) {
|
|
880
915
|
return defaultMap(this._pushMutex, key, () => new Mutex());
|
|
881
916
|
}
|
|
882
|
-
async _replicateFeed(feed) {
|
|
883
|
-
invariant2(this._connectionCtx, void 0, {
|
|
884
|
-
F: __dxlog_file5,
|
|
885
|
-
L: 102,
|
|
886
|
-
S: this,
|
|
887
|
-
A: [
|
|
888
|
-
"this._connectionCtx",
|
|
889
|
-
""
|
|
890
|
-
]
|
|
891
|
-
});
|
|
917
|
+
async _replicateFeed(ctx, feed) {
|
|
892
918
|
await this._sendMessage({
|
|
893
919
|
type: "get-metadata",
|
|
894
920
|
feedKey: feed.key.toHex()
|
|
895
921
|
});
|
|
896
|
-
Event.wrap(feed.core, "append").on(
|
|
922
|
+
Event.wrap(feed.core, "append").on(ctx, async () => {
|
|
897
923
|
await this._pushBlocksIfNeeded(feed);
|
|
898
924
|
});
|
|
899
925
|
}
|
|
900
926
|
async _sendMessage(message) {
|
|
927
|
+
if (!this._connectionCtx) {
|
|
928
|
+
log3.info("message dropped because connection was disposed", void 0, {
|
|
929
|
+
F: __dxlog_file5,
|
|
930
|
+
L: 140,
|
|
931
|
+
S: this,
|
|
932
|
+
C: (f, a) => f(...a)
|
|
933
|
+
});
|
|
934
|
+
return;
|
|
935
|
+
}
|
|
901
936
|
const logPayload = message.type === "data" ? {
|
|
902
937
|
feedKey: message.feedKey,
|
|
903
938
|
blocks: message.blocks.map((b) => b.index)
|
|
@@ -906,13 +941,13 @@ var EdgeFeedReplicator = class extends Resource {
|
|
|
906
941
|
};
|
|
907
942
|
log3.info("sending message", logPayload, {
|
|
908
943
|
F: __dxlog_file5,
|
|
909
|
-
L:
|
|
944
|
+
L: 146,
|
|
910
945
|
S: this,
|
|
911
946
|
C: (f, a) => f(...a)
|
|
912
947
|
});
|
|
913
948
|
invariant2(message.feedKey, void 0, {
|
|
914
949
|
F: __dxlog_file5,
|
|
915
|
-
L:
|
|
950
|
+
L: 148,
|
|
916
951
|
S: this,
|
|
917
952
|
A: [
|
|
918
953
|
"message.feedKey",
|
|
@@ -932,7 +967,16 @@ var EdgeFeedReplicator = class extends Resource {
|
|
|
932
967
|
}));
|
|
933
968
|
}
|
|
934
969
|
_onMessage(message) {
|
|
935
|
-
|
|
970
|
+
if (!this._connectionCtx) {
|
|
971
|
+
log3.warn("received message after connection context was disposed", void 0, {
|
|
972
|
+
F: __dxlog_file5,
|
|
973
|
+
L: 165,
|
|
974
|
+
S: this,
|
|
975
|
+
C: (f, a) => f(...a)
|
|
976
|
+
});
|
|
977
|
+
return;
|
|
978
|
+
}
|
|
979
|
+
scheduleMicroTask(this._connectionCtx, async () => {
|
|
936
980
|
switch (message.type) {
|
|
937
981
|
case "metadata": {
|
|
938
982
|
try {
|
|
@@ -941,7 +985,7 @@ var EdgeFeedReplicator = class extends Resource {
|
|
|
941
985
|
message
|
|
942
986
|
}, {
|
|
943
987
|
F: __dxlog_file5,
|
|
944
|
-
L:
|
|
988
|
+
L: 171,
|
|
945
989
|
S: this,
|
|
946
990
|
C: (f, a) => f(...a)
|
|
947
991
|
});
|
|
@@ -952,7 +996,7 @@ var EdgeFeedReplicator = class extends Resource {
|
|
|
952
996
|
feedKey
|
|
953
997
|
}, {
|
|
954
998
|
F: __dxlog_file5,
|
|
955
|
-
L:
|
|
999
|
+
L: 176,
|
|
956
1000
|
S: this,
|
|
957
1001
|
C: (f, a) => f(...a)
|
|
958
1002
|
});
|
|
@@ -985,7 +1029,7 @@ var EdgeFeedReplicator = class extends Resource {
|
|
|
985
1029
|
blocks: message.blocks.map((b) => b.index)
|
|
986
1030
|
}, {
|
|
987
1031
|
F: __dxlog_file5,
|
|
988
|
-
L:
|
|
1032
|
+
L: 198,
|
|
989
1033
|
S: this,
|
|
990
1034
|
C: (f, a) => f(...a)
|
|
991
1035
|
});
|
|
@@ -996,7 +1040,7 @@ var EdgeFeedReplicator = class extends Resource {
|
|
|
996
1040
|
feedKey
|
|
997
1041
|
}, {
|
|
998
1042
|
F: __dxlog_file5,
|
|
999
|
-
L:
|
|
1043
|
+
L: 203,
|
|
1000
1044
|
S: this,
|
|
1001
1045
|
C: (f, a) => f(...a)
|
|
1002
1046
|
});
|
|
@@ -1010,7 +1054,7 @@ var EdgeFeedReplicator = class extends Resource {
|
|
|
1010
1054
|
...message
|
|
1011
1055
|
}, {
|
|
1012
1056
|
F: __dxlog_file5,
|
|
1013
|
-
L:
|
|
1057
|
+
L: 212,
|
|
1014
1058
|
S: this,
|
|
1015
1059
|
C: (f, a) => f(...a)
|
|
1016
1060
|
});
|
|
@@ -1025,7 +1069,7 @@ var EdgeFeedReplicator = class extends Resource {
|
|
|
1025
1069
|
to
|
|
1026
1070
|
}, {
|
|
1027
1071
|
F: __dxlog_file5,
|
|
1028
|
-
L:
|
|
1072
|
+
L: 219,
|
|
1029
1073
|
S: this,
|
|
1030
1074
|
C: (f, a) => f(...a)
|
|
1031
1075
|
});
|
|
@@ -1035,7 +1079,7 @@ var EdgeFeedReplicator = class extends Resource {
|
|
|
1035
1079
|
});
|
|
1036
1080
|
invariant2(data instanceof Uint8Array, void 0, {
|
|
1037
1081
|
F: __dxlog_file5,
|
|
1038
|
-
L:
|
|
1082
|
+
L: 224,
|
|
1039
1083
|
S: this,
|
|
1040
1084
|
A: [
|
|
1041
1085
|
"data instanceof Uint8Array",
|
|
@@ -1063,7 +1107,7 @@ var EdgeFeedReplicator = class extends Resource {
|
|
|
1063
1107
|
blocks: blocks.length
|
|
1064
1108
|
}, {
|
|
1065
1109
|
F: __dxlog_file5,
|
|
1066
|
-
L:
|
|
1110
|
+
L: 245,
|
|
1067
1111
|
S: this,
|
|
1068
1112
|
C: (f, a) => f(...a)
|
|
1069
1113
|
});
|
|
@@ -1081,11 +1125,11 @@ var EdgeFeedReplicator = class extends Resource {
|
|
|
1081
1125
|
async _pushBlocksIfNeeded(feed) {
|
|
1082
1126
|
try {
|
|
1083
1127
|
var _usingCtx = _using_ctx();
|
|
1084
|
-
const
|
|
1128
|
+
const _ = _usingCtx.u(await this._getPushMutex(feed.key).acquire());
|
|
1085
1129
|
if (!this._remoteLength.has(feed.key)) {
|
|
1086
1130
|
log3("blocks not pushed because remote length is unknown", void 0, {
|
|
1087
1131
|
F: __dxlog_file5,
|
|
1088
|
-
L:
|
|
1132
|
+
L: 266,
|
|
1089
1133
|
S: this,
|
|
1090
1134
|
C: (f, a) => f(...a)
|
|
1091
1135
|
});
|
|
@@ -1116,7 +1160,7 @@ var bufferizeBlock = (block) => ({
|
|
|
1116
1160
|
// packages/sdk/client-services/src/packlets/spaces/data-space.ts
|
|
1117
1161
|
import { Event as Event7, Mutex as Mutex2, scheduleTask as scheduleTask4, sleep as sleep3, synchronized as synchronized2, trackLeaks as trackLeaks2 } from "@dxos/async";
|
|
1118
1162
|
import { AUTH_TIMEOUT as AUTH_TIMEOUT2 } from "@dxos/client-protocol";
|
|
1119
|
-
import { Context as
|
|
1163
|
+
import { Context as Context6, ContextDisposedError, cancelWithContext as cancelWithContext2 } from "@dxos/context";
|
|
1120
1164
|
import { timed, warnAfterTimeout } from "@dxos/debug";
|
|
1121
1165
|
import { createMappedFeedWriter } from "@dxos/echo-pipeline";
|
|
1122
1166
|
import { SpaceDocVersion as SpaceDocVersion3 } from "@dxos/echo-protocol";
|
|
@@ -1352,7 +1396,7 @@ var runEpochMigration = async (ctx, context) => {
|
|
|
1352
1396
|
|
|
1353
1397
|
// packages/sdk/client-services/src/packlets/spaces/notarization-plugin.ts
|
|
1354
1398
|
import { DeferredTask, Event as Event3, scheduleTask as scheduleTask2, sleep, TimeoutError, Trigger as Trigger2 } from "@dxos/async";
|
|
1355
|
-
import { Context as
|
|
1399
|
+
import { Context as Context4, rejectOnDispose } from "@dxos/context";
|
|
1356
1400
|
import { invariant as invariant4 } from "@dxos/invariant";
|
|
1357
1401
|
import { PublicKey as PublicKey4 } from "@dxos/keys";
|
|
1358
1402
|
import { log as log5 } from "@dxos/log";
|
|
@@ -1366,7 +1410,7 @@ var DEFAULT_NOTARIZE_TIMEOUT = 1e4;
|
|
|
1366
1410
|
var WRITER_NOT_SET_ERROR_CODE = "WRITER_NOT_SET";
|
|
1367
1411
|
var NotarizationPlugin = class {
|
|
1368
1412
|
constructor() {
|
|
1369
|
-
this._ctx = new
|
|
1413
|
+
this._ctx = new Context4(void 0, {
|
|
1370
1414
|
F: __dxlog_file7,
|
|
1371
1415
|
L: 62
|
|
1372
1416
|
});
|
|
@@ -2936,7 +2980,7 @@ Identity = _ts_decorate2([
|
|
|
2936
2980
|
// packages/sdk/client-services/src/packlets/identity/identity-manager.ts
|
|
2937
2981
|
import platform from "platform";
|
|
2938
2982
|
import { Event as Event6 } from "@dxos/async";
|
|
2939
|
-
import { Context as
|
|
2983
|
+
import { Context as Context5 } from "@dxos/context";
|
|
2940
2984
|
import { createCredentialSignerWithKey as createCredentialSignerWithKey2, CredentialGenerator } from "@dxos/credentials";
|
|
2941
2985
|
import { invariant as invariant8 } from "@dxos/invariant";
|
|
2942
2986
|
import { PublicKey as PublicKey7 } from "@dxos/keys";
|
|
@@ -3018,7 +3062,7 @@ var IdentityManager = class {
|
|
|
3018
3062
|
});
|
|
3019
3063
|
}
|
|
3020
3064
|
async close() {
|
|
3021
|
-
await this._identity?.close(new
|
|
3065
|
+
await this._identity?.close(new Context5(void 0, {
|
|
3022
3066
|
F: __dxlog_file12,
|
|
3023
3067
|
L: 140
|
|
3024
3068
|
}));
|
|
@@ -3051,7 +3095,7 @@ var IdentityManager = class {
|
|
|
3051
3095
|
}
|
|
3052
3096
|
};
|
|
3053
3097
|
const identity = await this._constructIdentity(identityRecord);
|
|
3054
|
-
await identity.open(new
|
|
3098
|
+
await identity.open(new Context5(void 0, {
|
|
3055
3099
|
F: __dxlog_file12,
|
|
3056
3100
|
L: 161
|
|
3057
3101
|
}));
|
|
@@ -3180,7 +3224,7 @@ var IdentityManager = class {
|
|
|
3180
3224
|
}
|
|
3181
3225
|
};
|
|
3182
3226
|
const identity = await this._constructIdentity(identityRecord);
|
|
3183
|
-
await identity.open(new
|
|
3227
|
+
await identity.open(new Context5(void 0, {
|
|
3184
3228
|
F: __dxlog_file12,
|
|
3185
3229
|
L: 268
|
|
3186
3230
|
}));
|
|
@@ -3635,7 +3679,7 @@ function _using_ctx2() {
|
|
|
3635
3679
|
var __dxlog_file14 = "/home/runner/work/dxos/dxos/packages/sdk/client-services/src/packlets/spaces/data-space.ts";
|
|
3636
3680
|
var DataSpace = class {
|
|
3637
3681
|
constructor(params) {
|
|
3638
|
-
this._ctx = new
|
|
3682
|
+
this._ctx = new Context6(void 0, {
|
|
3639
3683
|
F: __dxlog_file14,
|
|
3640
3684
|
L: 94
|
|
3641
3685
|
});
|
|
@@ -3742,7 +3786,7 @@ var DataSpace = class {
|
|
|
3742
3786
|
if (this._edgeFeedReplicator) {
|
|
3743
3787
|
this.inner.protocol.feedAdded.append(this._onFeedAdded);
|
|
3744
3788
|
}
|
|
3745
|
-
await this._inner.open(new
|
|
3789
|
+
await this._inner.open(new Context6(void 0, {
|
|
3746
3790
|
F: __dxlog_file14,
|
|
3747
3791
|
L: 238
|
|
3748
3792
|
}));
|
|
@@ -3777,7 +3821,7 @@ var DataSpace = class {
|
|
|
3777
3821
|
C: (f, a) => f(...a)
|
|
3778
3822
|
});
|
|
3779
3823
|
await this._ctx.dispose();
|
|
3780
|
-
this._ctx = new
|
|
3824
|
+
this._ctx = new Context6(void 0, {
|
|
3781
3825
|
F: __dxlog_file14,
|
|
3782
3826
|
L: 264
|
|
3783
3827
|
});
|
|
@@ -4272,7 +4316,7 @@ import { ComplexSet as ComplexSet5 } from "@dxos/util";
|
|
|
4272
4316
|
|
|
4273
4317
|
// packages/sdk/client-services/src/packlets/invitations/invitation-guest-extenstion.ts
|
|
4274
4318
|
import { Trigger as Trigger4 } from "@dxos/async";
|
|
4275
|
-
import { cancelWithContext as cancelWithContext4, Context as
|
|
4319
|
+
import { cancelWithContext as cancelWithContext4, Context as Context7 } from "@dxos/context";
|
|
4276
4320
|
import { invariant as invariant11 } from "@dxos/invariant";
|
|
4277
4321
|
import { log as log13 } from "@dxos/log";
|
|
4278
4322
|
import { InvalidInvitationExtensionRoleError } from "@dxos/protocols";
|
|
@@ -4314,7 +4358,7 @@ var InvitationGuestExtension = class extends RpcExtension2 {
|
|
|
4314
4358
|
});
|
|
4315
4359
|
this._invitationFlowMutex = _invitationFlowMutex;
|
|
4316
4360
|
this._callbacks = _callbacks;
|
|
4317
|
-
this._ctx = new
|
|
4361
|
+
this._ctx = new Context7(void 0, {
|
|
4318
4362
|
F: __dxlog_file16,
|
|
4319
4363
|
L: 34
|
|
4320
4364
|
});
|
|
@@ -4426,7 +4470,7 @@ var InvitationGuestExtension = class extends RpcExtension2 {
|
|
|
4426
4470
|
|
|
4427
4471
|
// packages/sdk/client-services/src/packlets/invitations/invitation-host-extension.ts
|
|
4428
4472
|
import { Trigger as Trigger5, scheduleTask as scheduleTask5 } from "@dxos/async";
|
|
4429
|
-
import { cancelWithContext as cancelWithContext5, Context as
|
|
4473
|
+
import { cancelWithContext as cancelWithContext5, Context as Context8 } from "@dxos/context";
|
|
4430
4474
|
import { randomBytes, verify } from "@dxos/crypto";
|
|
4431
4475
|
import { invariant as invariant12, InvariantViolation } from "@dxos/invariant";
|
|
4432
4476
|
import { PublicKey as PublicKey9 } from "@dxos/keys";
|
|
@@ -4451,7 +4495,7 @@ var InvitationHostExtension = class extends RpcExtension3 {
|
|
|
4451
4495
|
});
|
|
4452
4496
|
this._invitationFlowMutex = _invitationFlowMutex;
|
|
4453
4497
|
this._callbacks = _callbacks;
|
|
4454
|
-
this._ctx = new
|
|
4498
|
+
this._ctx = new Context8(void 0, {
|
|
4455
4499
|
F: __dxlog_file17,
|
|
4456
4500
|
L: 53
|
|
4457
4501
|
});
|
|
@@ -5826,7 +5870,7 @@ var SpaceInvitationProtocol = class {
|
|
|
5826
5870
|
// packages/sdk/client-services/src/packlets/invitations/invitations-manager.ts
|
|
5827
5871
|
import { Event as Event8, PushStream, TimeoutError as TimeoutError3, Trigger as Trigger6 } from "@dxos/async";
|
|
5828
5872
|
import { AuthenticatingInvitation, AUTHENTICATION_CODE_LENGTH, CancellableInvitation, INVITATION_TIMEOUT as INVITATION_TIMEOUT2 } from "@dxos/client-protocol";
|
|
5829
|
-
import { Context as
|
|
5873
|
+
import { Context as Context9 } from "@dxos/context";
|
|
5830
5874
|
import { generatePasscode } from "@dxos/credentials";
|
|
5831
5875
|
import { hasInvitationExpired } from "@dxos/echo-pipeline";
|
|
5832
5876
|
import { invariant as invariant16 } from "@dxos/invariant";
|
|
@@ -6058,7 +6102,7 @@ var InvitationsManager = class {
|
|
|
6058
6102
|
}
|
|
6059
6103
|
_createObservableInvitation(handler, invitation) {
|
|
6060
6104
|
const stream = new PushStream();
|
|
6061
|
-
const ctx = new
|
|
6105
|
+
const ctx = new Context9({
|
|
6062
6106
|
onError: (err) => {
|
|
6063
6107
|
stream.error(err);
|
|
6064
6108
|
void ctx.dispose();
|
|
@@ -6098,7 +6142,7 @@ var InvitationsManager = class {
|
|
|
6098
6142
|
_createObservableAcceptingInvitation(handler, initialState) {
|
|
6099
6143
|
const otpEnteredTrigger = new Trigger6();
|
|
6100
6144
|
const stream = new PushStream();
|
|
6101
|
-
const ctx = new
|
|
6145
|
+
const ctx = new Context9({
|
|
6102
6146
|
onError: (err) => {
|
|
6103
6147
|
if (err instanceof TimeoutError3) {
|
|
6104
6148
|
log18("timeout", {
|
|
@@ -6328,7 +6372,7 @@ ClientRpcServer = _ts_decorate6([
|
|
|
6328
6372
|
|
|
6329
6373
|
// packages/sdk/client-services/src/packlets/services/service-context.ts
|
|
6330
6374
|
import { Trigger as Trigger7 } from "@dxos/async";
|
|
6331
|
-
import { Context as
|
|
6375
|
+
import { Context as Context10, Resource as Resource5 } from "@dxos/context";
|
|
6332
6376
|
import { getCredentialAssertion as getCredentialAssertion5 } from "@dxos/credentials";
|
|
6333
6377
|
import { failUndefined as failUndefined2 } from "@dxos/debug";
|
|
6334
6378
|
import { EchoEdgeReplicator, EchoHost, MeshEchoReplicator, MetadataStore, SpaceManager, valueEncoding } from "@dxos/echo-pipeline";
|
|
@@ -6518,7 +6562,7 @@ var ServiceContext = class extends Resource5 {
|
|
|
6518
6562
|
}
|
|
6519
6563
|
async createIdentity(params = {}) {
|
|
6520
6564
|
const identity = await this.identityManager.createIdentity(params);
|
|
6521
|
-
await this._initialize(new
|
|
6565
|
+
await this._initialize(new Context10(void 0, {
|
|
6522
6566
|
F: __dxlog_file23,
|
|
6523
6567
|
L: 249
|
|
6524
6568
|
}));
|
|
@@ -6547,7 +6591,7 @@ var ServiceContext = class extends Resource5 {
|
|
|
6547
6591
|
}
|
|
6548
6592
|
async _acceptIdentity(params) {
|
|
6549
6593
|
const identity = await this.identityManager.acceptIdentity(params);
|
|
6550
|
-
await this._initialize(new
|
|
6594
|
+
await this._initialize(new Context10(void 0, {
|
|
6551
6595
|
F: __dxlog_file23,
|
|
6552
6596
|
L: 271
|
|
6553
6597
|
}));
|
|
@@ -6937,7 +6981,7 @@ var importProfileData = async ({ storage, level }, archive) => {
|
|
|
6937
6981
|
// packages/sdk/client-services/src/packlets/services/service-host.ts
|
|
6938
6982
|
import { Event as Event10, synchronized as synchronized3 } from "@dxos/async";
|
|
6939
6983
|
import { clientServiceBundle } from "@dxos/client-protocol";
|
|
6940
|
-
import { Context as
|
|
6984
|
+
import { Context as Context11 } from "@dxos/context";
|
|
6941
6985
|
import { EdgeClient } from "@dxos/edge-client";
|
|
6942
6986
|
import { invariant as invariant21 } from "@dxos/invariant";
|
|
6943
6987
|
import { PublicKey as PublicKey17 } from "@dxos/keys";
|
|
@@ -7372,7 +7416,7 @@ var ClientServicesHost = class {
|
|
|
7372
7416
|
lockKey,
|
|
7373
7417
|
onAcquire: () => {
|
|
7374
7418
|
if (!this._opening) {
|
|
7375
|
-
void this.open(new
|
|
7419
|
+
void this.open(new Context11(void 0, {
|
|
7376
7420
|
F: __dxlog_file26,
|
|
7377
7421
|
L: 132
|
|
7378
7422
|
}));
|
|
@@ -7762,4 +7806,4 @@ export {
|
|
|
7762
7806
|
importProfileData,
|
|
7763
7807
|
ClientServicesHost
|
|
7764
7808
|
};
|
|
7765
|
-
//# sourceMappingURL=chunk-
|
|
7809
|
+
//# sourceMappingURL=chunk-3HDLTAT2.mjs.map
|