@dxos/client-services 0.8.2-main.fbd8ed0 → 0.8.2-staging.4d6ad0f
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-I3QLQXQD.mjs → chunk-AA2G5WEV.mjs} +375 -394
- package/dist/lib/browser/chunk-AA2G5WEV.mjs.map +7 -0
- package/dist/lib/browser/index.mjs +1 -1
- package/dist/lib/browser/index.mjs.map +3 -3
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/testing/index.mjs +1 -1
- package/dist/lib/browser/testing/index.mjs.map +3 -3
- package/dist/lib/node/{chunk-Y747YVDI.cjs → chunk-JC3EZ3VA.cjs} +378 -386
- package/dist/lib/node/chunk-JC3EZ3VA.cjs.map +7 -0
- package/dist/lib/node/index.cjs +47 -47
- package/dist/lib/node/index.cjs.map +3 -3
- package/dist/lib/node/meta.json +1 -1
- package/dist/lib/node/testing/index.cjs +8 -8
- package/dist/lib/node/testing/index.cjs.map +3 -3
- package/dist/lib/node-esm/{chunk-XNCWQTDB.mjs → chunk-ZCHUTUNU.mjs} +375 -383
- package/dist/lib/node-esm/chunk-ZCHUTUNU.mjs.map +7 -0
- package/dist/lib/node-esm/index.mjs +1 -1
- package/dist/lib/node-esm/index.mjs.map +3 -3
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/lib/node-esm/testing/index.mjs +1 -1
- package/dist/lib/node-esm/testing/index.mjs.map +3 -3
- package/dist/types/src/packlets/agents/edge-agent-manager.d.ts.map +1 -1
- package/dist/types/src/packlets/identity/authenticator.d.ts.map +1 -1
- package/dist/types/src/packlets/identity/default-space-state-machine.d.ts.map +1 -1
- package/dist/types/src/packlets/identity/identity-manager.d.ts +2 -2
- package/dist/types/src/packlets/identity/identity-manager.d.ts.map +1 -1
- package/dist/types/src/packlets/identity/identity-recovery-manager.d.ts +1 -1
- package/dist/types/src/packlets/identity/identity-recovery-manager.d.ts.map +1 -1
- package/dist/types/src/packlets/identity/identity-service.d.ts.map +1 -1
- package/dist/types/src/packlets/identity/identity.d.ts.map +1 -1
- package/dist/types/src/packlets/invitations/device-invitation-protocol.d.ts.map +1 -1
- package/dist/types/src/packlets/invitations/edge-invitation-handler.d.ts.map +1 -1
- package/dist/types/src/packlets/invitations/invitation-guest-extenstion.d.ts.map +1 -1
- package/dist/types/src/packlets/invitations/invitation-host-extension.d.ts.map +1 -1
- package/dist/types/src/packlets/invitations/invitation-topology.d.ts.map +1 -1
- package/dist/types/src/packlets/invitations/invitations-manager.d.ts.map +1 -1
- package/dist/types/src/packlets/invitations/space-invitation-protocol.d.ts +1 -1
- package/dist/types/src/packlets/invitations/space-invitation-protocol.d.ts.map +1 -1
- package/dist/types/src/packlets/locks/browser.d.ts.map +1 -1
- package/dist/types/src/packlets/locks/node.d.ts.map +1 -1
- package/dist/types/src/packlets/logging/logging-service.d.ts.map +1 -1
- package/dist/types/src/packlets/network/network-service.d.ts.map +1 -1
- package/dist/types/src/packlets/services/client-rpc-server.d.ts.map +1 -1
- package/dist/types/src/packlets/services/service-context.d.ts +1 -0
- package/dist/types/src/packlets/services/service-context.d.ts.map +1 -1
- package/dist/types/src/packlets/services/service-host.d.ts.map +1 -1
- package/dist/types/src/packlets/services/service-registry.d.ts.map +1 -1
- package/dist/types/src/packlets/space-export/space-archive-writer.d.ts.map +1 -1
- package/dist/types/src/packlets/spaces/automerge-space-state.d.ts.map +1 -1
- package/dist/types/src/packlets/spaces/data-space-manager.d.ts.map +1 -1
- package/dist/types/src/packlets/spaces/data-space.d.ts.map +1 -1
- package/dist/types/src/packlets/spaces/edge-feed-replicator.d.ts.map +1 -1
- package/dist/types/src/packlets/spaces/notarization-plugin.d.ts.map +1 -1
- package/dist/types/src/packlets/spaces/spaces-service.d.ts.map +1 -1
- package/dist/types/src/packlets/system/system-service.d.ts.map +1 -1
- package/dist/types/src/packlets/testing/test-builder.d.ts.map +1 -1
- package/dist/types/src/packlets/worker/worker-runtime.d.ts.map +1 -1
- package/dist/types/src/packlets/worker/worker-session.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 +39 -39
- package/src/packlets/agents/edge-agent-manager.ts +6 -6
- package/src/packlets/identity/authenticator.ts +2 -2
- package/src/packlets/identity/default-space-state-machine.ts +1 -1
- package/src/packlets/identity/identity-manager.ts +13 -9
- package/src/packlets/identity/identity-recovery-manager.ts +6 -4
- package/src/packlets/identity/identity-service.ts +4 -4
- package/src/packlets/identity/identity.ts +5 -5
- package/src/packlets/invitations/device-invitation-protocol.ts +1 -1
- package/src/packlets/invitations/edge-invitation-handler.ts +3 -3
- package/src/packlets/invitations/invitation-guest-extenstion.ts +3 -3
- package/src/packlets/invitations/invitation-host-extension.ts +5 -5
- package/src/packlets/invitations/invitation-topology.ts +1 -1
- package/src/packlets/invitations/invitations-handler.ts +2 -2
- package/src/packlets/invitations/invitations-manager.ts +15 -4
- package/src/packlets/invitations/space-invitation-protocol.ts +1 -1
- package/src/packlets/locks/browser.ts +4 -4
- package/src/packlets/locks/node.ts +2 -2
- package/src/packlets/logging/logging-service.ts +2 -2
- package/src/packlets/network/network-service.ts +2 -2
- package/src/packlets/services/client-rpc-server.ts +2 -2
- package/src/packlets/services/service-context.ts +10 -6
- package/src/packlets/services/service-host.ts +8 -4
- package/src/packlets/services/service-registry.ts +3 -3
- package/src/packlets/space-export/space-archive-writer.ts +3 -3
- package/src/packlets/spaces/automerge-space-state.ts +3 -3
- package/src/packlets/spaces/data-space-manager.ts +14 -14
- package/src/packlets/spaces/data-space.ts +18 -18
- package/src/packlets/spaces/edge-feed-replicator.ts +12 -12
- package/src/packlets/spaces/notarization-plugin.test.ts +1 -1
- package/src/packlets/spaces/notarization-plugin.ts +18 -18
- package/src/packlets/spaces/spaces-service.ts +5 -5
- package/src/packlets/system/system-service.ts +2 -2
- package/src/packlets/testing/test-builder.ts +3 -3
- package/src/packlets/worker/worker-runtime.ts +4 -4
- package/src/packlets/worker/worker-session.ts +3 -3
- package/src/version.ts +1 -1
- package/dist/lib/browser/chunk-I3QLQXQD.mjs.map +0 -7
- package/dist/lib/node/chunk-Y747YVDI.cjs.map +0 -7
- package/dist/lib/node-esm/chunk-XNCWQTDB.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.4d6ad0f";
|
|
401
401
|
|
|
402
402
|
// packages/sdk/client-services/src/packlets/services/platform.ts
|
|
403
403
|
import { Platform } from "@dxos/protocols/proto/dxos/client/services";
|
|
@@ -747,67 +747,70 @@ function _ts_decorate(decorators, target, key, desc) {
|
|
|
747
747
|
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
748
748
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
749
749
|
}
|
|
750
|
-
function
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
a: isAwait
|
|
781
|
-
});
|
|
782
|
-
}
|
|
783
|
-
return value;
|
|
750
|
+
function _ts_add_disposable_resource(env, value, async) {
|
|
751
|
+
if (value !== null && value !== void 0) {
|
|
752
|
+
if (typeof value !== "object" && typeof value !== "function") throw new TypeError("Object expected.");
|
|
753
|
+
var dispose, inner;
|
|
754
|
+
if (async) {
|
|
755
|
+
if (!Symbol.asyncDispose) throw new TypeError("Symbol.asyncDispose is not defined.");
|
|
756
|
+
dispose = value[Symbol.asyncDispose];
|
|
757
|
+
}
|
|
758
|
+
if (dispose === void 0) {
|
|
759
|
+
if (!Symbol.dispose) throw new TypeError("Symbol.dispose is not defined.");
|
|
760
|
+
dispose = value[Symbol.dispose];
|
|
761
|
+
if (async) inner = dispose;
|
|
762
|
+
}
|
|
763
|
+
if (typeof dispose !== "function") throw new TypeError("Object not disposable.");
|
|
764
|
+
if (inner) dispose = function() {
|
|
765
|
+
try {
|
|
766
|
+
inner.call(this);
|
|
767
|
+
} catch (e) {
|
|
768
|
+
return Promise.reject(e);
|
|
769
|
+
}
|
|
770
|
+
};
|
|
771
|
+
env.stack.push({
|
|
772
|
+
value,
|
|
773
|
+
dispose,
|
|
774
|
+
async
|
|
775
|
+
});
|
|
776
|
+
} else if (async) {
|
|
777
|
+
env.stack.push({
|
|
778
|
+
async: true
|
|
779
|
+
});
|
|
784
780
|
}
|
|
785
|
-
return
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
781
|
+
return value;
|
|
782
|
+
}
|
|
783
|
+
function _ts_dispose_resources(env) {
|
|
784
|
+
var _SuppressedError = typeof SuppressedError === "function" ? SuppressedError : function(error, suppressed, message) {
|
|
785
|
+
var e = new Error(message);
|
|
786
|
+
return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
|
|
787
|
+
};
|
|
788
|
+
return (_ts_dispose_resources = function _ts_dispose_resources5(env2) {
|
|
789
|
+
function fail(e) {
|
|
790
|
+
env2.error = env2.hasError ? new _SuppressedError(e, env2.error, "An error was suppressed during disposal.") : e;
|
|
791
|
+
env2.hasError = true;
|
|
792
|
+
}
|
|
793
|
+
var r, s = 0;
|
|
794
|
+
function next() {
|
|
795
|
+
while (r = env2.stack.pop()) {
|
|
796
|
+
try {
|
|
797
|
+
if (!r.async && s === 1) return s = 0, env2.stack.push(r), Promise.resolve().then(next);
|
|
798
|
+
if (r.dispose) {
|
|
799
|
+
var result = r.dispose.call(r.value);
|
|
800
|
+
if (r.async) return s |= 2, Promise.resolve(result).then(next, function(e) {
|
|
801
|
+
fail(e);
|
|
802
|
+
return next();
|
|
803
|
+
});
|
|
804
|
+
} else s |= 1;
|
|
805
|
+
} catch (e) {
|
|
806
|
+
fail(e);
|
|
801
807
|
}
|
|
802
|
-
if (error !== empty) throw error;
|
|
803
|
-
}
|
|
804
|
-
function err(e) {
|
|
805
|
-
error = error !== empty ? new _disposeSuppressedError(error, e) : e;
|
|
806
|
-
return next();
|
|
807
808
|
}
|
|
808
|
-
return
|
|
809
|
+
if (s === 1) return env2.hasError ? Promise.reject(env2.error) : Promise.resolve();
|
|
810
|
+
if (env2.hasError) throw env2.error;
|
|
809
811
|
}
|
|
810
|
-
|
|
812
|
+
return next();
|
|
813
|
+
})(env);
|
|
811
814
|
}
|
|
812
815
|
var __dxlog_file5 = "/home/runner/work/dxos/dxos/packages/sdk/client-services/src/packlets/spaces/edge-feed-replicator.ts";
|
|
813
816
|
var EdgeFeedReplicator = class extends Resource {
|
|
@@ -1014,8 +1017,12 @@ var EdgeFeedReplicator = class extends Resource {
|
|
|
1014
1017
|
scheduleMicroTask(this._connectionCtx, async () => {
|
|
1015
1018
|
switch (message.type) {
|
|
1016
1019
|
case "metadata": {
|
|
1020
|
+
const env = {
|
|
1021
|
+
stack: [],
|
|
1022
|
+
error: void 0,
|
|
1023
|
+
hasError: false
|
|
1024
|
+
};
|
|
1017
1025
|
try {
|
|
1018
|
-
var _usingCtx = _using_ctx();
|
|
1019
1026
|
const feedKey = PublicKey3.fromHex(message.feedKey);
|
|
1020
1027
|
const feed = this._feeds.get(feedKey);
|
|
1021
1028
|
if (!feed) {
|
|
@@ -1029,7 +1036,7 @@ var EdgeFeedReplicator = class extends Resource {
|
|
|
1029
1036
|
});
|
|
1030
1037
|
return;
|
|
1031
1038
|
}
|
|
1032
|
-
const _guard =
|
|
1039
|
+
const _guard = _ts_add_disposable_resource(env, await this._getPushMutex(feed.key).acquire(), false);
|
|
1033
1040
|
this._remoteLength.set(feedKey, message.length);
|
|
1034
1041
|
const logMeta = {
|
|
1035
1042
|
localLength: feed.length,
|
|
@@ -1061,10 +1068,11 @@ var EdgeFeedReplicator = class extends Resource {
|
|
|
1061
1068
|
await this._pushBlocks(feed, message.length, feed.length);
|
|
1062
1069
|
}
|
|
1063
1070
|
break;
|
|
1064
|
-
} catch (
|
|
1065
|
-
|
|
1071
|
+
} catch (e) {
|
|
1072
|
+
env.error = e;
|
|
1073
|
+
env.hasError = true;
|
|
1066
1074
|
} finally {
|
|
1067
|
-
|
|
1075
|
+
_ts_dispose_resources(env);
|
|
1068
1076
|
}
|
|
1069
1077
|
}
|
|
1070
1078
|
case "data": {
|
|
@@ -1167,9 +1175,13 @@ var EdgeFeedReplicator = class extends Resource {
|
|
|
1167
1175
|
}
|
|
1168
1176
|
}
|
|
1169
1177
|
async _pushBlocksIfNeeded(feed) {
|
|
1178
|
+
const env = {
|
|
1179
|
+
stack: [],
|
|
1180
|
+
error: void 0,
|
|
1181
|
+
hasError: false
|
|
1182
|
+
};
|
|
1170
1183
|
try {
|
|
1171
|
-
|
|
1172
|
-
const _ = _usingCtx.u(await this._getPushMutex(feed.key).acquire());
|
|
1184
|
+
const _ = _ts_add_disposable_resource(env, await this._getPushMutex(feed.key).acquire(), false);
|
|
1173
1185
|
if (!this._remoteLength.has(feed.key)) {
|
|
1174
1186
|
log3("blocks not pushed because remote length is unknown", void 0, {
|
|
1175
1187
|
F: __dxlog_file5,
|
|
@@ -1183,10 +1195,11 @@ var EdgeFeedReplicator = class extends Resource {
|
|
|
1183
1195
|
if (remoteLength < feed.length) {
|
|
1184
1196
|
await this._pushBlocks(feed, remoteLength, feed.length);
|
|
1185
1197
|
}
|
|
1186
|
-
} catch (
|
|
1187
|
-
|
|
1198
|
+
} catch (e) {
|
|
1199
|
+
env.error = e;
|
|
1200
|
+
env.hasError = true;
|
|
1188
1201
|
} finally {
|
|
1189
|
-
|
|
1202
|
+
_ts_dispose_resources(env);
|
|
1190
1203
|
}
|
|
1191
1204
|
}
|
|
1192
1205
|
_createConnectionContext() {
|
|
@@ -1252,12 +1265,7 @@ import { Resource as Resource2 } from "@dxos/context";
|
|
|
1252
1265
|
import { checkCredentialType } from "@dxos/credentials";
|
|
1253
1266
|
var AutomergeSpaceState = class extends Resource2 {
|
|
1254
1267
|
constructor(_onNewRoot) {
|
|
1255
|
-
super();
|
|
1256
|
-
this._onNewRoot = _onNewRoot;
|
|
1257
|
-
this.rootUrl = void 0;
|
|
1258
|
-
this.lastEpoch = void 0;
|
|
1259
|
-
this.onNewEpoch = new Event2();
|
|
1260
|
-
this._isProcessingRootDocs = false;
|
|
1268
|
+
super(), this._onNewRoot = _onNewRoot, this.rootUrl = void 0, this.lastEpoch = void 0, this.onNewEpoch = new Event2(), this._isProcessingRootDocs = false;
|
|
1261
1269
|
}
|
|
1262
1270
|
async _open(ctx) {
|
|
1263
1271
|
}
|
|
@@ -1775,8 +1783,7 @@ var NotarizationTeleportExtension = class extends RpcExtension {
|
|
|
1775
1783
|
exposed: {
|
|
1776
1784
|
NotarizationService: schema2.getService("dxos.mesh.teleport.notarization.NotarizationService")
|
|
1777
1785
|
}
|
|
1778
|
-
});
|
|
1779
|
-
this._params = _params;
|
|
1786
|
+
}), this._params = _params;
|
|
1780
1787
|
}
|
|
1781
1788
|
async getHandlers() {
|
|
1782
1789
|
return {
|
|
@@ -2792,67 +2799,70 @@ var extractSpaceArchive = async (archive) => {
|
|
|
2792
2799
|
};
|
|
2793
2800
|
|
|
2794
2801
|
// packages/sdk/client-services/src/packlets/spaces/spaces-service.ts
|
|
2795
|
-
function
|
|
2796
|
-
|
|
2797
|
-
|
|
2798
|
-
|
|
2799
|
-
|
|
2800
|
-
|
|
2801
|
-
|
|
2802
|
-
|
|
2803
|
-
|
|
2804
|
-
|
|
2805
|
-
|
|
2806
|
-
|
|
2807
|
-
|
|
2808
|
-
|
|
2809
|
-
|
|
2810
|
-
|
|
2811
|
-
|
|
2812
|
-
|
|
2813
|
-
|
|
2814
|
-
|
|
2815
|
-
|
|
2816
|
-
|
|
2817
|
-
|
|
2818
|
-
|
|
2819
|
-
|
|
2820
|
-
|
|
2821
|
-
|
|
2822
|
-
|
|
2823
|
-
|
|
2824
|
-
|
|
2825
|
-
a: isAwait
|
|
2826
|
-
});
|
|
2827
|
-
}
|
|
2828
|
-
return value;
|
|
2802
|
+
function _ts_add_disposable_resource2(env, value, async) {
|
|
2803
|
+
if (value !== null && value !== void 0) {
|
|
2804
|
+
if (typeof value !== "object" && typeof value !== "function") throw new TypeError("Object expected.");
|
|
2805
|
+
var dispose, inner;
|
|
2806
|
+
if (async) {
|
|
2807
|
+
if (!Symbol.asyncDispose) throw new TypeError("Symbol.asyncDispose is not defined.");
|
|
2808
|
+
dispose = value[Symbol.asyncDispose];
|
|
2809
|
+
}
|
|
2810
|
+
if (dispose === void 0) {
|
|
2811
|
+
if (!Symbol.dispose) throw new TypeError("Symbol.dispose is not defined.");
|
|
2812
|
+
dispose = value[Symbol.dispose];
|
|
2813
|
+
if (async) inner = dispose;
|
|
2814
|
+
}
|
|
2815
|
+
if (typeof dispose !== "function") throw new TypeError("Object not disposable.");
|
|
2816
|
+
if (inner) dispose = function() {
|
|
2817
|
+
try {
|
|
2818
|
+
inner.call(this);
|
|
2819
|
+
} catch (e) {
|
|
2820
|
+
return Promise.reject(e);
|
|
2821
|
+
}
|
|
2822
|
+
};
|
|
2823
|
+
env.stack.push({
|
|
2824
|
+
value,
|
|
2825
|
+
dispose,
|
|
2826
|
+
async
|
|
2827
|
+
});
|
|
2828
|
+
} else if (async) {
|
|
2829
|
+
env.stack.push({
|
|
2830
|
+
async: true
|
|
2831
|
+
});
|
|
2829
2832
|
}
|
|
2830
|
-
return
|
|
2831
|
-
|
|
2832
|
-
|
|
2833
|
-
|
|
2834
|
-
|
|
2835
|
-
|
|
2836
|
-
|
|
2837
|
-
|
|
2838
|
-
|
|
2839
|
-
|
|
2840
|
-
|
|
2841
|
-
|
|
2842
|
-
|
|
2843
|
-
|
|
2844
|
-
|
|
2845
|
-
|
|
2833
|
+
return value;
|
|
2834
|
+
}
|
|
2835
|
+
function _ts_dispose_resources2(env) {
|
|
2836
|
+
var _SuppressedError = typeof SuppressedError === "function" ? SuppressedError : function(error, suppressed, message) {
|
|
2837
|
+
var e = new Error(message);
|
|
2838
|
+
return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
|
|
2839
|
+
};
|
|
2840
|
+
return (_ts_dispose_resources2 = function _ts_dispose_resources5(env2) {
|
|
2841
|
+
function fail(e) {
|
|
2842
|
+
env2.error = env2.hasError ? new _SuppressedError(e, env2.error, "An error was suppressed during disposal.") : e;
|
|
2843
|
+
env2.hasError = true;
|
|
2844
|
+
}
|
|
2845
|
+
var r, s = 0;
|
|
2846
|
+
function next() {
|
|
2847
|
+
while (r = env2.stack.pop()) {
|
|
2848
|
+
try {
|
|
2849
|
+
if (!r.async && s === 1) return s = 0, env2.stack.push(r), Promise.resolve().then(next);
|
|
2850
|
+
if (r.dispose) {
|
|
2851
|
+
var result = r.dispose.call(r.value);
|
|
2852
|
+
if (r.async) return s |= 2, Promise.resolve(result).then(next, function(e) {
|
|
2853
|
+
fail(e);
|
|
2854
|
+
return next();
|
|
2855
|
+
});
|
|
2856
|
+
} else s |= 1;
|
|
2857
|
+
} catch (e) {
|
|
2858
|
+
fail(e);
|
|
2846
2859
|
}
|
|
2847
|
-
if (error !== empty) throw error;
|
|
2848
|
-
}
|
|
2849
|
-
function err(e) {
|
|
2850
|
-
error = error !== empty ? new _disposeSuppressedError(error, e) : e;
|
|
2851
|
-
return next();
|
|
2852
2860
|
}
|
|
2853
|
-
return
|
|
2861
|
+
if (s === 1) return env2.hasError ? Promise.reject(env2.error) : Promise.resolve();
|
|
2862
|
+
if (env2.hasError) throw env2.error;
|
|
2854
2863
|
}
|
|
2855
|
-
|
|
2864
|
+
return next();
|
|
2865
|
+
})(env);
|
|
2856
2866
|
}
|
|
2857
2867
|
var __dxlog_file11 = "/home/runner/work/dxos/dxos/packages/sdk/client-services/src/packlets/spaces/spaces-service.ts";
|
|
2858
2868
|
var SpacesServiceImpl = class {
|
|
@@ -3088,9 +3098,13 @@ var SpacesServiceImpl = class {
|
|
|
3088
3098
|
});
|
|
3089
3099
|
}
|
|
3090
3100
|
async exportSpace(request) {
|
|
3101
|
+
const env = {
|
|
3102
|
+
stack: [],
|
|
3103
|
+
error: void 0,
|
|
3104
|
+
hasError: false
|
|
3105
|
+
};
|
|
3091
3106
|
try {
|
|
3092
|
-
|
|
3093
|
-
const writer = _usingCtx.a(await new SpaceArchiveWriter().open());
|
|
3107
|
+
const writer = _ts_add_disposable_resource2(env, await new SpaceArchiveWriter().open(), true);
|
|
3094
3108
|
assertArgument4(SpaceId2.isValid(request.spaceId), "Invalid space ID");
|
|
3095
3109
|
const dataSpaceManager = await this._getDataSpaceManager();
|
|
3096
3110
|
const space = dataSpaceManager.getSpaceById(request.spaceId) ?? raise(new Error("Space not found"));
|
|
@@ -3107,10 +3121,12 @@ var SpacesServiceImpl = class {
|
|
|
3107
3121
|
return {
|
|
3108
3122
|
archive
|
|
3109
3123
|
};
|
|
3110
|
-
} catch (
|
|
3111
|
-
|
|
3124
|
+
} catch (e) {
|
|
3125
|
+
env.error = e;
|
|
3126
|
+
env.hasError = true;
|
|
3112
3127
|
} finally {
|
|
3113
|
-
|
|
3128
|
+
const result = _ts_dispose_resources2(env);
|
|
3129
|
+
if (result) await result;
|
|
3114
3130
|
}
|
|
3115
3131
|
}
|
|
3116
3132
|
async importSpace(request) {
|
|
@@ -3548,7 +3564,7 @@ var IdentityManager = class {
|
|
|
3548
3564
|
L: 135
|
|
3549
3565
|
}));
|
|
3550
3566
|
}
|
|
3551
|
-
async createIdentity({
|
|
3567
|
+
async createIdentity({ profile, deviceProfile } = {}) {
|
|
3552
3568
|
invariant9(!this._identity, "Identity already exists.", {
|
|
3553
3569
|
F: __dxlog_file13,
|
|
3554
3570
|
L: 140,
|
|
@@ -3606,10 +3622,8 @@ var IdentityManager = class {
|
|
|
3606
3622
|
// Feed admission.
|
|
3607
3623
|
await generator.createFeedAdmission(identityRecord.haloSpace.key, identityRecord.haloSpace.dataFeedKey, AdmittedFeed3.Designation.DATA)
|
|
3608
3624
|
];
|
|
3609
|
-
if (
|
|
3610
|
-
credentials.push(await generator.createProfileCredential(
|
|
3611
|
-
displayName
|
|
3612
|
-
}));
|
|
3625
|
+
if (profile) {
|
|
3626
|
+
credentials.push(await generator.createProfileCredential(profile));
|
|
3613
3627
|
}
|
|
3614
3628
|
credentials.push(await generator.createDeviceAuthorization(identityRecord.deviceKey));
|
|
3615
3629
|
credentials.push(await generator.createDeviceProfile({
|
|
@@ -3726,7 +3740,7 @@ var IdentityManager = class {
|
|
|
3726
3740
|
displayName: this._identity.profileDocument?.displayName
|
|
3727
3741
|
}, {
|
|
3728
3742
|
F: __dxlog_file13,
|
|
3729
|
-
L:
|
|
3743
|
+
L: 277,
|
|
3730
3744
|
S: this,
|
|
3731
3745
|
C: (f, a) => f(...a)
|
|
3732
3746
|
});
|
|
@@ -3740,7 +3754,7 @@ var IdentityManager = class {
|
|
|
3740
3754
|
deviceKey: identity.deviceKey
|
|
3741
3755
|
}, {
|
|
3742
3756
|
F: __dxlog_file13,
|
|
3743
|
-
L:
|
|
3757
|
+
L: 288,
|
|
3744
3758
|
S: this,
|
|
3745
3759
|
C: (f, a) => f(...a)
|
|
3746
3760
|
});
|
|
@@ -3751,7 +3765,7 @@ var IdentityManager = class {
|
|
|
3751
3765
|
async updateProfile(profile) {
|
|
3752
3766
|
invariant9(this._identity, "Identity not initialized.", {
|
|
3753
3767
|
F: __dxlog_file13,
|
|
3754
|
-
L:
|
|
3768
|
+
L: 295,
|
|
3755
3769
|
S: this,
|
|
3756
3770
|
A: [
|
|
3757
3771
|
"this._identity",
|
|
@@ -3782,7 +3796,7 @@ var IdentityManager = class {
|
|
|
3782
3796
|
async updateDeviceProfile(profile) {
|
|
3783
3797
|
invariant9(this._identity, "Identity not initialized.", {
|
|
3784
3798
|
F: __dxlog_file13,
|
|
3785
|
-
L:
|
|
3799
|
+
L: 312,
|
|
3786
3800
|
S: this,
|
|
3787
3801
|
A: [
|
|
3788
3802
|
"this._identity",
|
|
@@ -3818,7 +3832,7 @@ var IdentityManager = class {
|
|
|
3818
3832
|
async _constructIdentity(identityRecord) {
|
|
3819
3833
|
invariant9(!this._identity, void 0, {
|
|
3820
3834
|
F: __dxlog_file13,
|
|
3821
|
-
L:
|
|
3835
|
+
L: 338,
|
|
3822
3836
|
S: this,
|
|
3823
3837
|
A: [
|
|
3824
3838
|
"!this._identity",
|
|
@@ -3829,7 +3843,7 @@ var IdentityManager = class {
|
|
|
3829
3843
|
identityRecord
|
|
3830
3844
|
}, {
|
|
3831
3845
|
F: __dxlog_file13,
|
|
3832
|
-
L:
|
|
3846
|
+
L: 339,
|
|
3833
3847
|
S: this,
|
|
3834
3848
|
C: (f, a) => f(...a)
|
|
3835
3849
|
});
|
|
@@ -3844,7 +3858,7 @@ var IdentityManager = class {
|
|
|
3844
3858
|
});
|
|
3845
3859
|
invariant9(identityRecord.haloSpace.controlFeedKey, void 0, {
|
|
3846
3860
|
F: __dxlog_file13,
|
|
3847
|
-
L:
|
|
3861
|
+
L: 352,
|
|
3848
3862
|
S: this,
|
|
3849
3863
|
A: [
|
|
3850
3864
|
"identityRecord.haloSpace.controlFeedKey",
|
|
@@ -3856,7 +3870,7 @@ var IdentityManager = class {
|
|
|
3856
3870
|
});
|
|
3857
3871
|
invariant9(identityRecord.haloSpace.dataFeedKey, void 0, {
|
|
3858
3872
|
F: __dxlog_file13,
|
|
3859
|
-
L:
|
|
3873
|
+
L: 356,
|
|
3860
3874
|
S: this,
|
|
3861
3875
|
A: [
|
|
3862
3876
|
"identityRecord.haloSpace.dataFeedKey",
|
|
@@ -3895,7 +3909,7 @@ var IdentityManager = class {
|
|
|
3895
3909
|
identityKey: identityRecord.identityKey
|
|
3896
3910
|
}, {
|
|
3897
3911
|
F: __dxlog_file13,
|
|
3898
|
-
L:
|
|
3912
|
+
L: 387,
|
|
3899
3913
|
S: this,
|
|
3900
3914
|
C: (f, a) => f(...a)
|
|
3901
3915
|
});
|
|
@@ -3920,7 +3934,7 @@ var IdentityManager = class {
|
|
|
3920
3934
|
onAuthFailure: () => {
|
|
3921
3935
|
log10.warn("auth failure", void 0, {
|
|
3922
3936
|
F: __dxlog_file13,
|
|
3923
|
-
L:
|
|
3937
|
+
L: 412,
|
|
3924
3938
|
S: this,
|
|
3925
3939
|
C: (f, a) => f(...a)
|
|
3926
3940
|
});
|
|
@@ -3955,13 +3969,7 @@ var __dxlog_file14 = "/home/runner/work/dxos/dxos/packages/sdk/client-services/s
|
|
|
3955
3969
|
var DEFAULT_SPACE_SEARCH_TIMEOUT = 1e4;
|
|
3956
3970
|
var IdentityServiceImpl = class extends Resource6 {
|
|
3957
3971
|
constructor(_identityManager, _recoveryManager, _keyring, _dataSpaceManagerProvider, _createIdentity, _onProfileUpdate) {
|
|
3958
|
-
super();
|
|
3959
|
-
this._identityManager = _identityManager;
|
|
3960
|
-
this._recoveryManager = _recoveryManager;
|
|
3961
|
-
this._keyring = _keyring;
|
|
3962
|
-
this._dataSpaceManagerProvider = _dataSpaceManagerProvider;
|
|
3963
|
-
this._createIdentity = _createIdentity;
|
|
3964
|
-
this._onProfileUpdate = _onProfileUpdate;
|
|
3972
|
+
super(), this._identityManager = _identityManager, this._recoveryManager = _recoveryManager, this._keyring = _keyring, this._dataSpaceManagerProvider = _dataSpaceManagerProvider, this._createIdentity = _createIdentity, this._onProfileUpdate = _onProfileUpdate;
|
|
3965
3973
|
}
|
|
3966
3974
|
async _open() {
|
|
3967
3975
|
const identity = this._identityManager.identity;
|
|
@@ -3971,7 +3979,7 @@ var IdentityServiceImpl = class extends Resource6 {
|
|
|
3971
3979
|
}
|
|
3972
3980
|
async createIdentity(request) {
|
|
3973
3981
|
await this._createIdentity({
|
|
3974
|
-
|
|
3982
|
+
profile: request.profile,
|
|
3975
3983
|
deviceProfile: request.deviceProfile
|
|
3976
3984
|
});
|
|
3977
3985
|
const dataSpaceManager = this._dataSpaceManagerProvider();
|
|
@@ -4146,67 +4154,70 @@ function _ts_decorate6(decorators, target, key, desc) {
|
|
|
4146
4154
|
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
4147
4155
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
4148
4156
|
}
|
|
4149
|
-
function
|
|
4150
|
-
|
|
4151
|
-
|
|
4152
|
-
|
|
4153
|
-
|
|
4154
|
-
|
|
4155
|
-
|
|
4156
|
-
|
|
4157
|
-
|
|
4158
|
-
|
|
4159
|
-
|
|
4160
|
-
|
|
4161
|
-
|
|
4162
|
-
|
|
4163
|
-
|
|
4164
|
-
|
|
4165
|
-
|
|
4166
|
-
|
|
4167
|
-
|
|
4168
|
-
|
|
4169
|
-
|
|
4170
|
-
|
|
4171
|
-
|
|
4172
|
-
|
|
4173
|
-
|
|
4174
|
-
|
|
4175
|
-
|
|
4176
|
-
|
|
4177
|
-
|
|
4178
|
-
|
|
4179
|
-
a: isAwait
|
|
4180
|
-
});
|
|
4181
|
-
}
|
|
4182
|
-
return value;
|
|
4157
|
+
function _ts_add_disposable_resource3(env, value, async) {
|
|
4158
|
+
if (value !== null && value !== void 0) {
|
|
4159
|
+
if (typeof value !== "object" && typeof value !== "function") throw new TypeError("Object expected.");
|
|
4160
|
+
var dispose, inner;
|
|
4161
|
+
if (async) {
|
|
4162
|
+
if (!Symbol.asyncDispose) throw new TypeError("Symbol.asyncDispose is not defined.");
|
|
4163
|
+
dispose = value[Symbol.asyncDispose];
|
|
4164
|
+
}
|
|
4165
|
+
if (dispose === void 0) {
|
|
4166
|
+
if (!Symbol.dispose) throw new TypeError("Symbol.dispose is not defined.");
|
|
4167
|
+
dispose = value[Symbol.dispose];
|
|
4168
|
+
if (async) inner = dispose;
|
|
4169
|
+
}
|
|
4170
|
+
if (typeof dispose !== "function") throw new TypeError("Object not disposable.");
|
|
4171
|
+
if (inner) dispose = function() {
|
|
4172
|
+
try {
|
|
4173
|
+
inner.call(this);
|
|
4174
|
+
} catch (e) {
|
|
4175
|
+
return Promise.reject(e);
|
|
4176
|
+
}
|
|
4177
|
+
};
|
|
4178
|
+
env.stack.push({
|
|
4179
|
+
value,
|
|
4180
|
+
dispose,
|
|
4181
|
+
async
|
|
4182
|
+
});
|
|
4183
|
+
} else if (async) {
|
|
4184
|
+
env.stack.push({
|
|
4185
|
+
async: true
|
|
4186
|
+
});
|
|
4183
4187
|
}
|
|
4184
|
-
return
|
|
4185
|
-
|
|
4186
|
-
|
|
4187
|
-
|
|
4188
|
-
|
|
4189
|
-
|
|
4190
|
-
|
|
4191
|
-
|
|
4192
|
-
|
|
4193
|
-
|
|
4194
|
-
|
|
4195
|
-
|
|
4196
|
-
|
|
4197
|
-
|
|
4198
|
-
|
|
4199
|
-
|
|
4188
|
+
return value;
|
|
4189
|
+
}
|
|
4190
|
+
function _ts_dispose_resources3(env) {
|
|
4191
|
+
var _SuppressedError = typeof SuppressedError === "function" ? SuppressedError : function(error, suppressed, message) {
|
|
4192
|
+
var e = new Error(message);
|
|
4193
|
+
return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
|
|
4194
|
+
};
|
|
4195
|
+
return (_ts_dispose_resources3 = function _ts_dispose_resources5(env2) {
|
|
4196
|
+
function fail(e) {
|
|
4197
|
+
env2.error = env2.hasError ? new _SuppressedError(e, env2.error, "An error was suppressed during disposal.") : e;
|
|
4198
|
+
env2.hasError = true;
|
|
4199
|
+
}
|
|
4200
|
+
var r, s = 0;
|
|
4201
|
+
function next() {
|
|
4202
|
+
while (r = env2.stack.pop()) {
|
|
4203
|
+
try {
|
|
4204
|
+
if (!r.async && s === 1) return s = 0, env2.stack.push(r), Promise.resolve().then(next);
|
|
4205
|
+
if (r.dispose) {
|
|
4206
|
+
var result = r.dispose.call(r.value);
|
|
4207
|
+
if (r.async) return s |= 2, Promise.resolve(result).then(next, function(e) {
|
|
4208
|
+
fail(e);
|
|
4209
|
+
return next();
|
|
4210
|
+
});
|
|
4211
|
+
} else s |= 1;
|
|
4212
|
+
} catch (e) {
|
|
4213
|
+
fail(e);
|
|
4200
4214
|
}
|
|
4201
|
-
if (error !== empty) throw error;
|
|
4202
4215
|
}
|
|
4203
|
-
|
|
4204
|
-
|
|
4205
|
-
return next();
|
|
4206
|
-
}
|
|
4207
|
-
return next();
|
|
4216
|
+
if (s === 1) return env2.hasError ? Promise.reject(env2.error) : Promise.resolve();
|
|
4217
|
+
if (env2.hasError) throw env2.error;
|
|
4208
4218
|
}
|
|
4209
|
-
|
|
4219
|
+
return next();
|
|
4220
|
+
})(env);
|
|
4210
4221
|
}
|
|
4211
4222
|
var __dxlog_file15 = "/home/runner/work/dxos/dxos/packages/sdk/client-services/src/packlets/spaces/data-space.ts";
|
|
4212
4223
|
var DataSpace = class {
|
|
@@ -4610,8 +4621,12 @@ var DataSpace = class {
|
|
|
4610
4621
|
let handle;
|
|
4611
4622
|
queueMicrotask(async () => {
|
|
4612
4623
|
try {
|
|
4624
|
+
const env = {
|
|
4625
|
+
stack: [],
|
|
4626
|
+
error: void 0,
|
|
4627
|
+
hasError: false
|
|
4628
|
+
};
|
|
4613
4629
|
try {
|
|
4614
|
-
var _usingCtx = _using_ctx3();
|
|
4615
4630
|
await warnAfterTimeout(5e3, "Automerge root doc load timeout (DataSpace)", async () => {
|
|
4616
4631
|
handle = await cancelWithContext2(this._ctx, this._echoHost.automergeRepo.find(rootUrl, FIND_PARAMS2));
|
|
4617
4632
|
await cancelWithContext2(this._ctx, handle.whenReady());
|
|
@@ -4619,10 +4634,7 @@ var DataSpace = class {
|
|
|
4619
4634
|
if (this._ctx.disposed) {
|
|
4620
4635
|
return;
|
|
4621
4636
|
}
|
|
4622
|
-
const _guard = (
|
|
4623
|
-
// Ensure only one root is processed at a time.
|
|
4624
|
-
_usingCtx.u(await this._epochProcessingMutex.acquire())
|
|
4625
|
-
);
|
|
4637
|
+
const _guard = _ts_add_disposable_resource3(env, await this._epochProcessingMutex.acquire(), false);
|
|
4626
4638
|
const doc = handle.doc() ?? failedInvariant3();
|
|
4627
4639
|
if (!doc.access?.spaceKey) {
|
|
4628
4640
|
handle.change((doc2) => {
|
|
@@ -4641,10 +4653,11 @@ var DataSpace = class {
|
|
|
4641
4653
|
} else {
|
|
4642
4654
|
this.stateUpdate.emit();
|
|
4643
4655
|
}
|
|
4644
|
-
} catch (
|
|
4645
|
-
|
|
4656
|
+
} catch (e) {
|
|
4657
|
+
env.error = e;
|
|
4658
|
+
env.hasError = true;
|
|
4646
4659
|
} finally {
|
|
4647
|
-
|
|
4660
|
+
_ts_dispose_resources3(env);
|
|
4648
4661
|
}
|
|
4649
4662
|
} catch (err) {
|
|
4650
4663
|
if (err instanceof ContextDisposedError) {
|
|
@@ -5157,15 +5170,10 @@ var InvitationGuestExtension = class extends RpcExtension2 {
|
|
|
5157
5170
|
exposed: {
|
|
5158
5171
|
InvitationHostService: schema4.getService("dxos.halo.invitations.InvitationHostService")
|
|
5159
5172
|
}
|
|
5160
|
-
})
|
|
5161
|
-
this._invitationFlowMutex = _invitationFlowMutex;
|
|
5162
|
-
this._callbacks = _callbacks;
|
|
5163
|
-
this._ctx = new Context7(void 0, {
|
|
5173
|
+
}), this._invitationFlowMutex = _invitationFlowMutex, this._callbacks = _callbacks, this._ctx = new Context7(void 0, {
|
|
5164
5174
|
F: __dxlog_file18,
|
|
5165
5175
|
L: 38
|
|
5166
|
-
});
|
|
5167
|
-
this._remoteOptionsTrigger = new Trigger4();
|
|
5168
|
-
this._invitationFlowLock = null;
|
|
5176
|
+
}), this._remoteOptionsTrigger = new Trigger4(), this._invitationFlowLock = null;
|
|
5169
5177
|
}
|
|
5170
5178
|
hasFlowLock() {
|
|
5171
5179
|
return this._invitationFlowLock != null;
|
|
@@ -5294,20 +5302,10 @@ var InvitationHostExtension = class extends RpcExtension3 {
|
|
|
5294
5302
|
exposed: {
|
|
5295
5303
|
InvitationHostService: schema5.getService("dxos.halo.invitations.InvitationHostService")
|
|
5296
5304
|
}
|
|
5297
|
-
})
|
|
5298
|
-
this._invitationFlowMutex = _invitationFlowMutex;
|
|
5299
|
-
this._callbacks = _callbacks;
|
|
5300
|
-
this._ctx = new Context8(void 0, {
|
|
5305
|
+
}), this._invitationFlowMutex = _invitationFlowMutex, this._callbacks = _callbacks, this._ctx = new Context8(void 0, {
|
|
5301
5306
|
F: __dxlog_file19,
|
|
5302
5307
|
L: 57
|
|
5303
|
-
});
|
|
5304
|
-
this._remoteOptionsTrigger = new Trigger5();
|
|
5305
|
-
this._challenge = void 0;
|
|
5306
|
-
this.guestProfile = void 0;
|
|
5307
|
-
this.authenticationPassed = false;
|
|
5308
|
-
this.authenticationRetry = 0;
|
|
5309
|
-
this.completedTrigger = new Trigger5();
|
|
5310
|
-
this._invitationFlowLock = null;
|
|
5308
|
+
}), this._remoteOptionsTrigger = new Trigger5(), this._challenge = void 0, this.guestProfile = void 0, this.authenticationPassed = false, this.authenticationRetry = 0, this.completedTrigger = new Trigger5(), this._invitationFlowLock = null;
|
|
5311
5309
|
}
|
|
5312
5310
|
hasFlowLock() {
|
|
5313
5311
|
return this._invitationFlowLock != null;
|
|
@@ -7011,14 +7009,14 @@ var InvitationsManager = class {
|
|
|
7011
7009
|
}
|
|
7012
7010
|
}, {
|
|
7013
7011
|
F: __dxlog_file24,
|
|
7014
|
-
L:
|
|
7012
|
+
L: 239
|
|
7015
7013
|
});
|
|
7016
7014
|
ctx.onDispose(() => {
|
|
7017
7015
|
log20("complete", {
|
|
7018
7016
|
...handler.toJSON()
|
|
7019
7017
|
}, {
|
|
7020
7018
|
F: __dxlog_file24,
|
|
7021
|
-
L:
|
|
7019
|
+
L: 246,
|
|
7022
7020
|
S: this,
|
|
7023
7021
|
C: (f, a) => f(...a)
|
|
7024
7022
|
});
|
|
@@ -7051,7 +7049,7 @@ var InvitationsManager = class {
|
|
|
7051
7049
|
...handler.toJSON()
|
|
7052
7050
|
}, {
|
|
7053
7051
|
F: __dxlog_file24,
|
|
7054
|
-
L:
|
|
7052
|
+
L: 274,
|
|
7055
7053
|
S: this,
|
|
7056
7054
|
C: (f, a) => f(...a)
|
|
7057
7055
|
});
|
|
@@ -7062,7 +7060,7 @@ var InvitationsManager = class {
|
|
|
7062
7060
|
} else {
|
|
7063
7061
|
log20.warn("auth failed", err, {
|
|
7064
7062
|
F: __dxlog_file24,
|
|
7065
|
-
L:
|
|
7063
|
+
L: 277,
|
|
7066
7064
|
S: this,
|
|
7067
7065
|
C: (f, a) => f(...a)
|
|
7068
7066
|
});
|
|
@@ -7075,14 +7073,14 @@ var InvitationsManager = class {
|
|
|
7075
7073
|
}
|
|
7076
7074
|
}, {
|
|
7077
7075
|
F: __dxlog_file24,
|
|
7078
|
-
L:
|
|
7076
|
+
L: 271
|
|
7079
7077
|
});
|
|
7080
7078
|
ctx.onDispose(() => {
|
|
7081
7079
|
log20("complete", {
|
|
7082
7080
|
...handler.toJSON()
|
|
7083
7081
|
}, {
|
|
7084
7082
|
F: __dxlog_file24,
|
|
7085
|
-
L:
|
|
7083
|
+
L: 284,
|
|
7086
7084
|
S: this,
|
|
7087
7085
|
C: (f, a) => f(...a)
|
|
7088
7086
|
});
|
|
@@ -7127,7 +7125,7 @@ var InvitationsManager = class {
|
|
|
7127
7125
|
} catch (err) {
|
|
7128
7126
|
log20.catch(err, void 0, {
|
|
7129
7127
|
F: __dxlog_file24,
|
|
7130
|
-
L:
|
|
7128
|
+
L: 320,
|
|
7131
7129
|
S: this,
|
|
7132
7130
|
C: (f, a) => f(...a)
|
|
7133
7131
|
});
|
|
@@ -7293,13 +7291,7 @@ var AGENT_STATUS_QUERY_RETRY_JITTER = 1e3;
|
|
|
7293
7291
|
var AGENT_FEED_ADDED_CHECK_INTERVAL_MS = 3e3;
|
|
7294
7292
|
var EdgeAgentManager = class extends Resource7 {
|
|
7295
7293
|
constructor(_edgeFeatures, _edgeHttpClient, _dataSpaceManager, _identity) {
|
|
7296
|
-
super();
|
|
7297
|
-
this._edgeFeatures = _edgeFeatures;
|
|
7298
|
-
this._edgeHttpClient = _edgeHttpClient;
|
|
7299
|
-
this._dataSpaceManager = _dataSpaceManager;
|
|
7300
|
-
this._identity = _identity;
|
|
7301
|
-
this.agentStatusChanged = new Event9();
|
|
7302
|
-
this._lastKnownDeviceCount = 0;
|
|
7294
|
+
super(), this._edgeFeatures = _edgeFeatures, this._edgeHttpClient = _edgeHttpClient, this._dataSpaceManager = _dataSpaceManager, this._identity = _identity, this.agentStatusChanged = new Event9(), this._lastKnownDeviceCount = 0;
|
|
7303
7295
|
}
|
|
7304
7296
|
get agentStatus() {
|
|
7305
7297
|
return this._agentStatus;
|
|
@@ -7608,7 +7600,7 @@ var EdgeIdentityRecoveryManager = class {
|
|
|
7608
7600
|
const identity = this._identityProvider();
|
|
7609
7601
|
invariant22(identity, void 0, {
|
|
7610
7602
|
F: __dxlog_file27,
|
|
7611
|
-
L:
|
|
7603
|
+
L: 39,
|
|
7612
7604
|
S: this,
|
|
7613
7605
|
A: [
|
|
7614
7606
|
"identity",
|
|
@@ -7659,7 +7651,7 @@ var EdgeIdentityRecoveryManager = class {
|
|
|
7659
7651
|
async requestRecoveryChallenge() {
|
|
7660
7652
|
invariant22(this._edgeClient, "Not connected to EDGE.", {
|
|
7661
7653
|
F: __dxlog_file27,
|
|
7662
|
-
L:
|
|
7654
|
+
L: 76,
|
|
7663
7655
|
S: this,
|
|
7664
7656
|
A: [
|
|
7665
7657
|
"this._edgeClient",
|
|
@@ -7689,7 +7681,7 @@ var EdgeIdentityRecoveryManager = class {
|
|
|
7689
7681
|
async recoverIdentityWithExternalSignature({ lookupKey, deviceKey, controlFeedKey, signature, clientDataJson, authenticatorData }) {
|
|
7690
7682
|
invariant22(this._edgeClient, "Not connected to EDGE.", {
|
|
7691
7683
|
F: __dxlog_file27,
|
|
7692
|
-
L:
|
|
7684
|
+
L: 108,
|
|
7693
7685
|
S: this,
|
|
7694
7686
|
A: [
|
|
7695
7687
|
"this._edgeClient",
|
|
@@ -7723,7 +7715,7 @@ var EdgeIdentityRecoveryManager = class {
|
|
|
7723
7715
|
async recoverIdentityWithToken({ token }) {
|
|
7724
7716
|
invariant22(this._edgeClient, "Not connected to EDGE.", {
|
|
7725
7717
|
F: __dxlog_file27,
|
|
7726
|
-
L:
|
|
7718
|
+
L: 141,
|
|
7727
7719
|
S: this,
|
|
7728
7720
|
A: [
|
|
7729
7721
|
"this._edgeClient",
|
|
@@ -7751,7 +7743,7 @@ var EdgeIdentityRecoveryManager = class {
|
|
|
7751
7743
|
async recoverIdentity({ recoveryCode }) {
|
|
7752
7744
|
invariant22(this._edgeClient, "Not connected to EDGE.", {
|
|
7753
7745
|
F: __dxlog_file27,
|
|
7754
|
-
L:
|
|
7746
|
+
L: 165,
|
|
7755
7747
|
S: this,
|
|
7756
7748
|
A: [
|
|
7757
7749
|
"this._edgeClient",
|
|
@@ -7782,7 +7774,7 @@ var EdgeIdentityRecoveryManager = class {
|
|
|
7782
7774
|
}
|
|
7783
7775
|
log23.info("recovering identity", response, {
|
|
7784
7776
|
F: __dxlog_file27,
|
|
7785
|
-
L:
|
|
7777
|
+
L: 191,
|
|
7786
7778
|
S: this,
|
|
7787
7779
|
C: (f, a) => f(...a)
|
|
7788
7780
|
});
|
|
@@ -7810,86 +7802,75 @@ function _ts_decorate10(decorators, target, key, desc) {
|
|
|
7810
7802
|
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
7811
7803
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7812
7804
|
}
|
|
7813
|
-
function
|
|
7814
|
-
|
|
7815
|
-
|
|
7816
|
-
|
|
7817
|
-
|
|
7818
|
-
|
|
7819
|
-
|
|
7820
|
-
|
|
7821
|
-
|
|
7822
|
-
|
|
7823
|
-
|
|
7824
|
-
|
|
7825
|
-
|
|
7826
|
-
|
|
7827
|
-
|
|
7828
|
-
|
|
7829
|
-
|
|
7830
|
-
|
|
7831
|
-
|
|
7832
|
-
|
|
7833
|
-
|
|
7834
|
-
|
|
7835
|
-
|
|
7836
|
-
|
|
7837
|
-
|
|
7838
|
-
|
|
7839
|
-
|
|
7840
|
-
|
|
7841
|
-
|
|
7842
|
-
|
|
7843
|
-
a: isAwait
|
|
7844
|
-
});
|
|
7845
|
-
}
|
|
7846
|
-
return value;
|
|
7805
|
+
function _ts_add_disposable_resource4(env, value, async) {
|
|
7806
|
+
if (value !== null && value !== void 0) {
|
|
7807
|
+
if (typeof value !== "object" && typeof value !== "function") throw new TypeError("Object expected.");
|
|
7808
|
+
var dispose, inner;
|
|
7809
|
+
if (async) {
|
|
7810
|
+
if (!Symbol.asyncDispose) throw new TypeError("Symbol.asyncDispose is not defined.");
|
|
7811
|
+
dispose = value[Symbol.asyncDispose];
|
|
7812
|
+
}
|
|
7813
|
+
if (dispose === void 0) {
|
|
7814
|
+
if (!Symbol.dispose) throw new TypeError("Symbol.dispose is not defined.");
|
|
7815
|
+
dispose = value[Symbol.dispose];
|
|
7816
|
+
if (async) inner = dispose;
|
|
7817
|
+
}
|
|
7818
|
+
if (typeof dispose !== "function") throw new TypeError("Object not disposable.");
|
|
7819
|
+
if (inner) dispose = function() {
|
|
7820
|
+
try {
|
|
7821
|
+
inner.call(this);
|
|
7822
|
+
} catch (e) {
|
|
7823
|
+
return Promise.reject(e);
|
|
7824
|
+
}
|
|
7825
|
+
};
|
|
7826
|
+
env.stack.push({
|
|
7827
|
+
value,
|
|
7828
|
+
dispose,
|
|
7829
|
+
async
|
|
7830
|
+
});
|
|
7831
|
+
} else if (async) {
|
|
7832
|
+
env.stack.push({
|
|
7833
|
+
async: true
|
|
7834
|
+
});
|
|
7847
7835
|
}
|
|
7848
|
-
return
|
|
7849
|
-
|
|
7850
|
-
|
|
7851
|
-
|
|
7852
|
-
|
|
7853
|
-
|
|
7854
|
-
|
|
7855
|
-
|
|
7856
|
-
|
|
7857
|
-
|
|
7858
|
-
|
|
7859
|
-
|
|
7860
|
-
|
|
7861
|
-
|
|
7862
|
-
|
|
7863
|
-
|
|
7836
|
+
return value;
|
|
7837
|
+
}
|
|
7838
|
+
function _ts_dispose_resources4(env) {
|
|
7839
|
+
var _SuppressedError = typeof SuppressedError === "function" ? SuppressedError : function(error, suppressed, message) {
|
|
7840
|
+
var e = new Error(message);
|
|
7841
|
+
return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
|
|
7842
|
+
};
|
|
7843
|
+
return (_ts_dispose_resources4 = function _ts_dispose_resources5(env2) {
|
|
7844
|
+
function fail(e) {
|
|
7845
|
+
env2.error = env2.hasError ? new _SuppressedError(e, env2.error, "An error was suppressed during disposal.") : e;
|
|
7846
|
+
env2.hasError = true;
|
|
7847
|
+
}
|
|
7848
|
+
var r, s = 0;
|
|
7849
|
+
function next() {
|
|
7850
|
+
while (r = env2.stack.pop()) {
|
|
7851
|
+
try {
|
|
7852
|
+
if (!r.async && s === 1) return s = 0, env2.stack.push(r), Promise.resolve().then(next);
|
|
7853
|
+
if (r.dispose) {
|
|
7854
|
+
var result = r.dispose.call(r.value);
|
|
7855
|
+
if (r.async) return s |= 2, Promise.resolve(result).then(next, function(e) {
|
|
7856
|
+
fail(e);
|
|
7857
|
+
return next();
|
|
7858
|
+
});
|
|
7859
|
+
} else s |= 1;
|
|
7860
|
+
} catch (e) {
|
|
7861
|
+
fail(e);
|
|
7864
7862
|
}
|
|
7865
|
-
if (error !== empty) throw error;
|
|
7866
|
-
}
|
|
7867
|
-
function err(e) {
|
|
7868
|
-
error = error !== empty ? new _disposeSuppressedError(error, e) : e;
|
|
7869
|
-
return next();
|
|
7870
7863
|
}
|
|
7871
|
-
return
|
|
7864
|
+
if (s === 1) return env2.hasError ? Promise.reject(env2.error) : Promise.resolve();
|
|
7865
|
+
if (env2.hasError) throw env2.error;
|
|
7872
7866
|
}
|
|
7873
|
-
|
|
7867
|
+
return next();
|
|
7868
|
+
})(env);
|
|
7874
7869
|
}
|
|
7875
7870
|
var __dxlog_file28 = "/home/runner/work/dxos/dxos/packages/sdk/client-services/src/packlets/services/service-context.ts";
|
|
7876
7871
|
var ServiceContext = class extends Resource8 {
|
|
7877
7872
|
constructor(storage, level, networkManager, signalManager, _edgeConnection, _edgeHttpClient, _runtimeParams, _edgeFeatures) {
|
|
7878
|
-
super();
|
|
7879
|
-
this.storage = storage;
|
|
7880
|
-
this.level = level;
|
|
7881
|
-
this.networkManager = networkManager;
|
|
7882
|
-
this.signalManager = signalManager;
|
|
7883
|
-
this._edgeConnection = _edgeConnection;
|
|
7884
|
-
this._edgeHttpClient = _edgeHttpClient;
|
|
7885
|
-
this._runtimeParams = _runtimeParams;
|
|
7886
|
-
this._edgeFeatures = _edgeFeatures;
|
|
7887
|
-
this._edgeIdentityUpdateMutex = new Mutex4();
|
|
7888
|
-
this.initialized = new Trigger7();
|
|
7889
|
-
this._meshReplicator = void 0;
|
|
7890
|
-
this._echoEdgeReplicator = void 0;
|
|
7891
|
-
this._handlerFactories = /* @__PURE__ */ new Map();
|
|
7892
|
-
this._instanceId = PublicKey15.random().toHex();
|
|
7873
|
+
super(), this.storage = storage, this.level = level, this.networkManager = networkManager, this.signalManager = signalManager, this._edgeConnection = _edgeConnection, this._edgeHttpClient = _edgeHttpClient, this._runtimeParams = _runtimeParams, this._edgeFeatures = _edgeFeatures, this._edgeIdentityUpdateMutex = new Mutex4(), this.initialized = new Trigger7(), this._meshReplicator = void 0, this._echoEdgeReplicator = void 0, this._handlerFactories = /* @__PURE__ */ new Map(), this._instanceId = PublicKey15.random().toHex();
|
|
7893
7874
|
this.metadataStore = new MetadataStore(storage.createDirectory("metadata"));
|
|
7894
7875
|
this.blobStore = new BlobStore(storage.createDirectory("blobs"));
|
|
7895
7876
|
this.keyring = new Keyring(storage.createDirectory("keyring"));
|
|
@@ -7924,7 +7905,10 @@ var ServiceContext = class extends Resource8 {
|
|
|
7924
7905
|
this.echoHost = new EchoHost({
|
|
7925
7906
|
kv: this.level,
|
|
7926
7907
|
peerIdProvider: () => this.identityManager.identity?.deviceKey?.toHex(),
|
|
7927
|
-
getSpaceKeyByRootDocumentId: (documentId) => this.spaceManager.findSpaceByRootDocumentId(documentId)?.key
|
|
7908
|
+
getSpaceKeyByRootDocumentId: (documentId) => this.spaceManager.findSpaceByRootDocumentId(documentId)?.key,
|
|
7909
|
+
indexing: {
|
|
7910
|
+
vector: this._runtimeParams?.enableVectorIndexing
|
|
7911
|
+
}
|
|
7928
7912
|
});
|
|
7929
7913
|
this._meshReplicator = new MeshEchoReplicator();
|
|
7930
7914
|
this.invitations = new InvitationsHandler(this.networkManager, this._edgeHttpClient, _runtimeParams?.invitationConnectionDefaultParams);
|
|
@@ -7943,7 +7927,7 @@ var ServiceContext = class extends Resource8 {
|
|
|
7943
7927
|
await this._checkStorageVersion();
|
|
7944
7928
|
log24("opening...", void 0, {
|
|
7945
7929
|
F: __dxlog_file28,
|
|
7946
|
-
L:
|
|
7930
|
+
L: 203,
|
|
7947
7931
|
S: this,
|
|
7948
7932
|
C: (f, a) => f(...a)
|
|
7949
7933
|
});
|
|
@@ -7951,7 +7935,7 @@ var ServiceContext = class extends Resource8 {
|
|
|
7951
7935
|
id: this._instanceId
|
|
7952
7936
|
}), {
|
|
7953
7937
|
F: __dxlog_file28,
|
|
7954
|
-
L:
|
|
7938
|
+
L: 204,
|
|
7955
7939
|
S: this,
|
|
7956
7940
|
C: (f, a) => f(...a)
|
|
7957
7941
|
});
|
|
@@ -7978,7 +7962,7 @@ var ServiceContext = class extends Resource8 {
|
|
|
7978
7962
|
count: loadedInvitations.invitations?.length
|
|
7979
7963
|
}, {
|
|
7980
7964
|
F: __dxlog_file28,
|
|
7981
|
-
L:
|
|
7965
|
+
L: 232,
|
|
7982
7966
|
S: this,
|
|
7983
7967
|
C: (f, a) => f(...a)
|
|
7984
7968
|
});
|
|
@@ -7986,13 +7970,13 @@ var ServiceContext = class extends Resource8 {
|
|
|
7986
7970
|
id: this._instanceId
|
|
7987
7971
|
}), {
|
|
7988
7972
|
F: __dxlog_file28,
|
|
7989
|
-
L:
|
|
7973
|
+
L: 234,
|
|
7990
7974
|
S: this,
|
|
7991
7975
|
C: (f, a) => f(...a)
|
|
7992
7976
|
});
|
|
7993
7977
|
log24("opened", void 0, {
|
|
7994
7978
|
F: __dxlog_file28,
|
|
7995
|
-
L:
|
|
7979
|
+
L: 235,
|
|
7996
7980
|
S: this,
|
|
7997
7981
|
C: (f, a) => f(...a)
|
|
7998
7982
|
});
|
|
@@ -8000,7 +7984,7 @@ var ServiceContext = class extends Resource8 {
|
|
|
8000
7984
|
async _close(ctx) {
|
|
8001
7985
|
log24("closing...", void 0, {
|
|
8002
7986
|
F: __dxlog_file28,
|
|
8003
|
-
L:
|
|
7987
|
+
L: 239,
|
|
8004
7988
|
S: this,
|
|
8005
7989
|
C: (f, a) => f(...a)
|
|
8006
7990
|
});
|
|
@@ -8019,7 +8003,7 @@ var ServiceContext = class extends Resource8 {
|
|
|
8019
8003
|
await this._edgeConnection?.close();
|
|
8020
8004
|
log24("closed", void 0, {
|
|
8021
8005
|
F: __dxlog_file28,
|
|
8022
|
-
L:
|
|
8006
|
+
L: 255,
|
|
8023
8007
|
S: this,
|
|
8024
8008
|
C: (f, a) => f(...a)
|
|
8025
8009
|
});
|
|
@@ -8030,7 +8014,7 @@ var ServiceContext = class extends Resource8 {
|
|
|
8030
8014
|
await identity.joinNetwork();
|
|
8031
8015
|
await this._initialize(new Context10(void 0, {
|
|
8032
8016
|
F: __dxlog_file28,
|
|
8033
|
-
L:
|
|
8017
|
+
L: 262
|
|
8034
8018
|
}));
|
|
8035
8019
|
return identity;
|
|
8036
8020
|
}
|
|
@@ -8041,7 +8025,7 @@ var ServiceContext = class extends Resource8 {
|
|
|
8041
8025
|
const factory = this._handlerFactories.get(invitation.kind);
|
|
8042
8026
|
invariant23(factory, `Unknown invitation kind: ${invitation.kind}`, {
|
|
8043
8027
|
F: __dxlog_file28,
|
|
8044
|
-
L:
|
|
8028
|
+
L: 271,
|
|
8045
8029
|
S: this,
|
|
8046
8030
|
A: [
|
|
8047
8031
|
"factory",
|
|
@@ -8067,7 +8051,7 @@ var ServiceContext = class extends Resource8 {
|
|
|
8067
8051
|
await this.identityManager.acceptIdentity(identity, identityRecord, params.deviceProfile);
|
|
8068
8052
|
await this._initialize(new Context10(void 0, {
|
|
8069
8053
|
F: __dxlog_file28,
|
|
8070
|
-
L:
|
|
8054
|
+
L: 290
|
|
8071
8055
|
}));
|
|
8072
8056
|
return identity;
|
|
8073
8057
|
}
|
|
@@ -8081,7 +8065,7 @@ var ServiceContext = class extends Resource8 {
|
|
|
8081
8065
|
async _initialize(ctx) {
|
|
8082
8066
|
log24("initializing spaces...", void 0, {
|
|
8083
8067
|
F: __dxlog_file28,
|
|
8084
|
-
L:
|
|
8068
|
+
L: 305,
|
|
8085
8069
|
S: this,
|
|
8086
8070
|
C: (f, a) => f(...a)
|
|
8087
8071
|
});
|
|
@@ -8120,7 +8104,7 @@ var ServiceContext = class extends Resource8 {
|
|
|
8120
8104
|
this._handlerFactories.set(Invitation10.Kind.SPACE, (invitation) => {
|
|
8121
8105
|
invariant23(this.dataSpaceManager, "dataSpaceManager not initialized yet", {
|
|
8122
8106
|
F: __dxlog_file28,
|
|
8123
|
-
L:
|
|
8107
|
+
L: 343,
|
|
8124
8108
|
S: this,
|
|
8125
8109
|
A: [
|
|
8126
8110
|
"this.dataSpaceManager",
|
|
@@ -8144,7 +8128,7 @@ var ServiceContext = class extends Resource8 {
|
|
|
8144
8128
|
details: assertion
|
|
8145
8129
|
}, {
|
|
8146
8130
|
F: __dxlog_file28,
|
|
8147
|
-
L:
|
|
8131
|
+
L: 359,
|
|
8148
8132
|
S: this,
|
|
8149
8133
|
C: (f, a) => f(...a)
|
|
8150
8134
|
});
|
|
@@ -8155,7 +8139,7 @@ var ServiceContext = class extends Resource8 {
|
|
|
8155
8139
|
details: assertion
|
|
8156
8140
|
}, {
|
|
8157
8141
|
F: __dxlog_file28,
|
|
8158
|
-
L:
|
|
8142
|
+
L: 363,
|
|
8159
8143
|
S: this,
|
|
8160
8144
|
C: (f, a) => f(...a)
|
|
8161
8145
|
});
|
|
@@ -8166,7 +8150,7 @@ var ServiceContext = class extends Resource8 {
|
|
|
8166
8150
|
details: assertion
|
|
8167
8151
|
}, {
|
|
8168
8152
|
F: __dxlog_file28,
|
|
8169
|
-
L:
|
|
8153
|
+
L: 368,
|
|
8170
8154
|
S: this,
|
|
8171
8155
|
C: (f, a) => f(...a)
|
|
8172
8156
|
});
|
|
@@ -8177,7 +8161,7 @@ var ServiceContext = class extends Resource8 {
|
|
|
8177
8161
|
} catch (err) {
|
|
8178
8162
|
log24.catch(err, void 0, {
|
|
8179
8163
|
F: __dxlog_file28,
|
|
8180
|
-
L:
|
|
8164
|
+
L: 374,
|
|
8181
8165
|
S: this,
|
|
8182
8166
|
C: (f, a) => f(...a)
|
|
8183
8167
|
});
|
|
@@ -8187,9 +8171,13 @@ var ServiceContext = class extends Resource8 {
|
|
|
8187
8171
|
await identity.space.spaceState.addCredentialProcessor(this._deviceSpaceSync);
|
|
8188
8172
|
}
|
|
8189
8173
|
async _setNetworkIdentity(params) {
|
|
8174
|
+
const env = {
|
|
8175
|
+
stack: [],
|
|
8176
|
+
error: void 0,
|
|
8177
|
+
hasError: false
|
|
8178
|
+
};
|
|
8190
8179
|
try {
|
|
8191
|
-
|
|
8192
|
-
const _ = _usingCtx.u(await this._edgeIdentityUpdateMutex.acquire());
|
|
8180
|
+
const _ = _ts_add_disposable_resource4(env, await this._edgeIdentityUpdateMutex.acquire(), false);
|
|
8193
8181
|
let edgeIdentity;
|
|
8194
8182
|
const identity = this.identityManager.identity;
|
|
8195
8183
|
if (identity) {
|
|
@@ -8198,7 +8186,7 @@ var ServiceContext = class extends Resource8 {
|
|
|
8198
8186
|
swarms: this.networkManager.topics
|
|
8199
8187
|
}, {
|
|
8200
8188
|
F: __dxlog_file28,
|
|
8201
|
-
L:
|
|
8189
|
+
L: 388,
|
|
8202
8190
|
S: this,
|
|
8203
8191
|
C: (f, a) => f(...a)
|
|
8204
8192
|
});
|
|
@@ -8212,7 +8200,7 @@ var ServiceContext = class extends Resource8 {
|
|
|
8212
8200
|
});
|
|
8213
8201
|
invariant23(identity.deviceCredentialChain, void 0, {
|
|
8214
8202
|
F: __dxlog_file28,
|
|
8215
|
-
L:
|
|
8203
|
+
L: 407,
|
|
8216
8204
|
S: this,
|
|
8217
8205
|
A: [
|
|
8218
8206
|
"identity.deviceCredentialChain",
|
|
@@ -8230,10 +8218,11 @@ var ServiceContext = class extends Resource8 {
|
|
|
8230
8218
|
identityKey: edgeIdentity.identityKey,
|
|
8231
8219
|
peerKey: edgeIdentity.peerKey
|
|
8232
8220
|
});
|
|
8233
|
-
} catch (
|
|
8234
|
-
|
|
8221
|
+
} catch (e) {
|
|
8222
|
+
env.error = e;
|
|
8223
|
+
env.hasError = true;
|
|
8235
8224
|
} finally {
|
|
8236
|
-
|
|
8225
|
+
_ts_dispose_resources4(env);
|
|
8237
8226
|
}
|
|
8238
8227
|
}
|
|
8239
8228
|
};
|
|
@@ -8968,6 +8957,9 @@ var ClientServicesHost = class {
|
|
|
8968
8957
|
if (this._runtimeParams.disableP2pReplication === void 0) {
|
|
8969
8958
|
this._runtimeParams.disableP2pReplication = config?.get("runtime.client.disableP2pReplication", false);
|
|
8970
8959
|
}
|
|
8960
|
+
if (this._runtimeParams.enableVectorIndexing === void 0) {
|
|
8961
|
+
this._runtimeParams.enableVectorIndexing = config?.get("runtime.client.enableVectorIndexing", false);
|
|
8962
|
+
}
|
|
8971
8963
|
if (config) {
|
|
8972
8964
|
this.initialize({
|
|
8973
8965
|
config,
|
|
@@ -8982,7 +8974,7 @@ var ClientServicesHost = class {
|
|
|
8982
8974
|
if (!this._opening) {
|
|
8983
8975
|
void this.open(new Context11(void 0, {
|
|
8984
8976
|
F: __dxlog_file31,
|
|
8985
|
-
L:
|
|
8977
|
+
L: 141
|
|
8986
8978
|
}));
|
|
8987
8979
|
}
|
|
8988
8980
|
},
|
|
@@ -9040,7 +9032,7 @@ var ClientServicesHost = class {
|
|
|
9040
9032
|
initialize({ config, ...options }) {
|
|
9041
9033
|
invariant26(!this._open, "service host is open", {
|
|
9042
9034
|
F: __dxlog_file31,
|
|
9043
|
-
L:
|
|
9035
|
+
L: 207,
|
|
9044
9036
|
S: this,
|
|
9045
9037
|
A: [
|
|
9046
9038
|
"!this._open",
|
|
@@ -9049,14 +9041,14 @@ var ClientServicesHost = class {
|
|
|
9049
9041
|
});
|
|
9050
9042
|
log27("initializing...", void 0, {
|
|
9051
9043
|
F: __dxlog_file31,
|
|
9052
|
-
L:
|
|
9044
|
+
L: 208,
|
|
9053
9045
|
S: this,
|
|
9054
9046
|
C: (f, a) => f(...a)
|
|
9055
9047
|
});
|
|
9056
9048
|
if (config) {
|
|
9057
9049
|
invariant26(!this._config, "config already set", {
|
|
9058
9050
|
F: __dxlog_file31,
|
|
9059
|
-
L:
|
|
9051
|
+
L: 211,
|
|
9060
9052
|
S: this,
|
|
9061
9053
|
A: [
|
|
9062
9054
|
"!this._config",
|
|
@@ -9071,7 +9063,7 @@ var ClientServicesHost = class {
|
|
|
9071
9063
|
if (!options.signalManager) {
|
|
9072
9064
|
log27.warn("running signaling without telemetry metadata.", void 0, {
|
|
9073
9065
|
F: __dxlog_file31,
|
|
9074
|
-
L:
|
|
9066
|
+
L: 219,
|
|
9075
9067
|
S: this,
|
|
9076
9068
|
C: (f, a) => f(...a)
|
|
9077
9069
|
});
|
|
@@ -9091,7 +9083,7 @@ var ClientServicesHost = class {
|
|
|
9091
9083
|
this._signalManager = signalManager;
|
|
9092
9084
|
invariant26(!this._networkManager, "network manager already set", {
|
|
9093
9085
|
F: __dxlog_file31,
|
|
9094
|
-
L:
|
|
9086
|
+
L: 241,
|
|
9095
9087
|
S: this,
|
|
9096
9088
|
A: [
|
|
9097
9089
|
"!this._networkManager",
|
|
@@ -9109,7 +9101,7 @@ var ClientServicesHost = class {
|
|
|
9109
9101
|
});
|
|
9110
9102
|
log27("initialized", void 0, {
|
|
9111
9103
|
F: __dxlog_file31,
|
|
9112
|
-
L:
|
|
9104
|
+
L: 254,
|
|
9113
9105
|
S: this,
|
|
9114
9106
|
C: (f, a) => f(...a)
|
|
9115
9107
|
});
|
|
@@ -9123,13 +9115,13 @@ var ClientServicesHost = class {
|
|
|
9123
9115
|
id: traceId
|
|
9124
9116
|
}), {
|
|
9125
9117
|
F: __dxlog_file31,
|
|
9126
|
-
L:
|
|
9118
|
+
L: 265,
|
|
9127
9119
|
S: this,
|
|
9128
9120
|
C: (f, a) => f(...a)
|
|
9129
9121
|
});
|
|
9130
9122
|
invariant26(this._config, "config not set", {
|
|
9131
9123
|
F: __dxlog_file31,
|
|
9132
|
-
L:
|
|
9124
|
+
L: 267,
|
|
9133
9125
|
S: this,
|
|
9134
9126
|
A: [
|
|
9135
9127
|
"this._config",
|
|
@@ -9138,7 +9130,7 @@ var ClientServicesHost = class {
|
|
|
9138
9130
|
});
|
|
9139
9131
|
invariant26(this._storage, "storage not set", {
|
|
9140
9132
|
F: __dxlog_file31,
|
|
9141
|
-
L:
|
|
9133
|
+
L: 268,
|
|
9142
9134
|
S: this,
|
|
9143
9135
|
A: [
|
|
9144
9136
|
"this._storage",
|
|
@@ -9147,7 +9139,7 @@ var ClientServicesHost = class {
|
|
|
9147
9139
|
});
|
|
9148
9140
|
invariant26(this._signalManager, "signal manager not set", {
|
|
9149
9141
|
F: __dxlog_file31,
|
|
9150
|
-
L:
|
|
9142
|
+
L: 269,
|
|
9151
9143
|
S: this,
|
|
9152
9144
|
A: [
|
|
9153
9145
|
"this._signalManager",
|
|
@@ -9156,7 +9148,7 @@ var ClientServicesHost = class {
|
|
|
9156
9148
|
});
|
|
9157
9149
|
invariant26(this._networkManager, "network manager not set", {
|
|
9158
9150
|
F: __dxlog_file31,
|
|
9159
|
-
L:
|
|
9151
|
+
L: 270,
|
|
9160
9152
|
S: this,
|
|
9161
9153
|
A: [
|
|
9162
9154
|
"this._networkManager",
|
|
@@ -9168,7 +9160,7 @@ var ClientServicesHost = class {
|
|
|
9168
9160
|
lockKey: this._resourceLock?.lockKey
|
|
9169
9161
|
}, {
|
|
9170
9162
|
F: __dxlog_file31,
|
|
9171
|
-
L:
|
|
9163
|
+
L: 273,
|
|
9172
9164
|
S: this,
|
|
9173
9165
|
C: (f, a) => f(...a)
|
|
9174
9166
|
});
|
|
@@ -9229,7 +9221,7 @@ var ClientServicesHost = class {
|
|
|
9229
9221
|
deviceKey
|
|
9230
9222
|
}, {
|
|
9231
9223
|
F: __dxlog_file31,
|
|
9232
|
-
L:
|
|
9224
|
+
L: 374,
|
|
9233
9225
|
S: this,
|
|
9234
9226
|
C: (f, a) => f(...a)
|
|
9235
9227
|
});
|
|
@@ -9237,7 +9229,7 @@ var ClientServicesHost = class {
|
|
|
9237
9229
|
id: traceId
|
|
9238
9230
|
}), {
|
|
9239
9231
|
F: __dxlog_file31,
|
|
9240
|
-
L:
|
|
9232
|
+
L: 375,
|
|
9241
9233
|
S: this,
|
|
9242
9234
|
C: (f, a) => f(...a)
|
|
9243
9235
|
});
|
|
@@ -9251,7 +9243,7 @@ var ClientServicesHost = class {
|
|
|
9251
9243
|
deviceKey
|
|
9252
9244
|
}, {
|
|
9253
9245
|
F: __dxlog_file31,
|
|
9254
|
-
L:
|
|
9246
|
+
L: 386,
|
|
9255
9247
|
S: this,
|
|
9256
9248
|
C: (f, a) => f(...a)
|
|
9257
9249
|
});
|
|
@@ -9269,7 +9261,7 @@ var ClientServicesHost = class {
|
|
|
9269
9261
|
deviceKey
|
|
9270
9262
|
}, {
|
|
9271
9263
|
F: __dxlog_file31,
|
|
9272
|
-
L:
|
|
9264
|
+
L: 395,
|
|
9273
9265
|
S: this,
|
|
9274
9266
|
C: (f, a) => f(...a)
|
|
9275
9267
|
});
|
|
@@ -9280,13 +9272,13 @@ var ClientServicesHost = class {
|
|
|
9280
9272
|
id: traceId
|
|
9281
9273
|
}), {
|
|
9282
9274
|
F: __dxlog_file31,
|
|
9283
|
-
L:
|
|
9275
|
+
L: 400,
|
|
9284
9276
|
S: this,
|
|
9285
9277
|
C: (f, a) => f(...a)
|
|
9286
9278
|
});
|
|
9287
9279
|
log27.info("resetting...", void 0, {
|
|
9288
9280
|
F: __dxlog_file31,
|
|
9289
|
-
L:
|
|
9281
|
+
L: 402,
|
|
9290
9282
|
S: this,
|
|
9291
9283
|
C: (f, a) => f(...a)
|
|
9292
9284
|
});
|
|
@@ -9296,7 +9288,7 @@ var ClientServicesHost = class {
|
|
|
9296
9288
|
await this._storage.reset();
|
|
9297
9289
|
log27.info("reset", void 0, {
|
|
9298
9290
|
F: __dxlog_file31,
|
|
9299
|
-
L:
|
|
9291
|
+
L: 409,
|
|
9300
9292
|
S: this,
|
|
9301
9293
|
C: (f, a) => f(...a)
|
|
9302
9294
|
});
|
|
@@ -9304,7 +9296,7 @@ var ClientServicesHost = class {
|
|
|
9304
9296
|
id: traceId
|
|
9305
9297
|
}), {
|
|
9306
9298
|
F: __dxlog_file31,
|
|
9307
|
-
L:
|
|
9299
|
+
L: 410,
|
|
9308
9300
|
S: this,
|
|
9309
9301
|
C: (f, a) => f(...a)
|
|
9310
9302
|
});
|
|
@@ -9382,4 +9374,4 @@ export {
|
|
|
9382
9374
|
importProfileData,
|
|
9383
9375
|
ClientServicesHost
|
|
9384
9376
|
};
|
|
9385
|
-
//# sourceMappingURL=chunk-
|
|
9377
|
+
//# sourceMappingURL=chunk-ZCHUTUNU.mjs.map
|