@dxos/client-services 0.3.2-main.de57e73 → 0.3.2-main.ec06501
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-XEZCTVLQ.mjs → chunk-KLSDV4XQ.mjs} +76 -66
- package/dist/lib/browser/chunk-KLSDV4XQ.mjs.map +7 -0
- package/dist/lib/browser/index.mjs +1 -1
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/packlets/testing/index.mjs +1 -1
- package/dist/lib/node/index.cjs +111 -91
- package/dist/lib/node/index.cjs.map +3 -3
- package/dist/lib/node/meta.json +1 -1
- package/dist/lib/node/packlets/testing/index.cjs +109 -89
- package/dist/lib/node/packlets/testing/index.cjs.map +3 -3
- package/dist/types/src/packlets/devices/devices-service.d.ts +2 -2
- package/dist/types/src/packlets/devices/devices-service.d.ts.map +1 -1
- package/dist/types/src/packlets/identity/identity-manager.d.ts.map +1 -1
- package/dist/types/src/packlets/identity/identity.d.ts +3 -3
- package/dist/types/src/packlets/identity/identity.d.ts.map +1 -1
- package/dist/types/src/packlets/invitations/invitations-service.d.ts.map +1 -1
- package/dist/types/src/version.d.ts +1 -1
- package/package.json +37 -35
- package/src/packlets/devices/devices-service.ts +4 -3
- package/src/packlets/identity/identity-manager.test.ts +12 -0
- package/src/packlets/identity/identity-manager.ts +12 -0
- package/src/packlets/identity/identity.test.ts +2 -2
- package/src/packlets/identity/identity.ts +6 -4
- package/src/packlets/invitations/invitations-service.ts +0 -2
- package/src/version.ts +1 -1
- package/dist/lib/browser/chunk-XEZCTVLQ.mjs.map +0 -7
package/dist/lib/node/index.cjs
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __create = Object.create;
|
|
2
3
|
var __defProp = Object.defineProperty;
|
|
3
4
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
5
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
5
7
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
8
|
var __export = (target, all) => {
|
|
7
9
|
for (var name in all)
|
|
@@ -15,6 +17,14 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
15
17
|
}
|
|
16
18
|
return to;
|
|
17
19
|
};
|
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
+
mod
|
|
27
|
+
));
|
|
18
28
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
29
|
|
|
20
30
|
// packages/sdk/client-services/src/index.ts
|
|
@@ -519,9 +529,11 @@ var import_credentials2 = require("@dxos/credentials");
|
|
|
519
529
|
var import_debug = require("@dxos/debug");
|
|
520
530
|
var import_feed_store2 = require("@dxos/feed-store");
|
|
521
531
|
var import_invariant = require("@dxos/invariant");
|
|
532
|
+
var import_keys4 = require("@dxos/keys");
|
|
522
533
|
var import_log2 = require("@dxos/log");
|
|
523
534
|
var import_credentials3 = require("@dxos/protocols/proto/dxos/halo/credentials");
|
|
524
535
|
var import_tracing = require("@dxos/tracing");
|
|
536
|
+
var import_util2 = require("@dxos/util");
|
|
525
537
|
function _ts_decorate(decorators, target, key, desc) {
|
|
526
538
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
527
539
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
|
|
@@ -540,6 +552,14 @@ var Identity = class Identity2 {
|
|
|
540
552
|
this._signer = signer;
|
|
541
553
|
this.identityKey = identityKey;
|
|
542
554
|
this.deviceKey = deviceKey;
|
|
555
|
+
import_log2.log.trace("dxos.halo.device", {
|
|
556
|
+
deviceKey
|
|
557
|
+
}, {
|
|
558
|
+
F: __dxlog_file2,
|
|
559
|
+
L: 60,
|
|
560
|
+
S: this,
|
|
561
|
+
C: (f, a) => f(...a)
|
|
562
|
+
});
|
|
543
563
|
this._deviceStateMachine = new import_credentials2.DeviceStateMachine({
|
|
544
564
|
identityKey: this.identityKey,
|
|
545
565
|
deviceKey: this.deviceKey,
|
|
@@ -550,7 +570,7 @@ var Identity = class Identity2 {
|
|
|
550
570
|
onUpdate: () => this.stateUpdate.emit()
|
|
551
571
|
});
|
|
552
572
|
this.authVerifier = new TrustedKeySetAuthVerifier({
|
|
553
|
-
trustedKeysProvider: () => this.authorizedDeviceKeys,
|
|
573
|
+
trustedKeysProvider: () => new import_util2.ComplexSet(import_keys4.PublicKey.hash, this.authorizedDeviceKeys.keys()),
|
|
554
574
|
update: this.stateUpdate,
|
|
555
575
|
authTimeout: import_client_protocol.AUTH_TIMEOUT
|
|
556
576
|
});
|
|
@@ -608,7 +628,7 @@ var Identity = class Identity2 {
|
|
|
608
628
|
getIdentityCredentialSigner() {
|
|
609
629
|
(0, import_invariant.invariant)(this._deviceStateMachine.deviceCredentialChain, "Device credential chain is not ready.", {
|
|
610
630
|
F: __dxlog_file2,
|
|
611
|
-
L:
|
|
631
|
+
L: 141,
|
|
612
632
|
S: this,
|
|
613
633
|
A: [
|
|
614
634
|
"this._deviceStateMachine.deviceCredentialChain",
|
|
@@ -632,7 +652,7 @@ var Identity = class Identity2 {
|
|
|
632
652
|
dataFeedKey
|
|
633
653
|
}, {
|
|
634
654
|
F: __dxlog_file2,
|
|
635
|
-
L:
|
|
655
|
+
L: 157,
|
|
636
656
|
S: this,
|
|
637
657
|
C: (f, a) => f(...a)
|
|
638
658
|
});
|
|
@@ -684,17 +704,18 @@ Identity = _ts_decorate([
|
|
|
684
704
|
], Identity);
|
|
685
705
|
|
|
686
706
|
// packages/sdk/client-services/src/packlets/identity/identity-manager.ts
|
|
707
|
+
var import_platform = __toESM(require("platform"));
|
|
687
708
|
var import_async6 = require("@dxos/async");
|
|
688
709
|
var import_context3 = require("@dxos/context");
|
|
689
710
|
var import_credentials4 = require("@dxos/credentials");
|
|
690
711
|
var import_invariant2 = require("@dxos/invariant");
|
|
691
|
-
var
|
|
712
|
+
var import_keys5 = require("@dxos/keys");
|
|
692
713
|
var import_log3 = require("@dxos/log");
|
|
693
714
|
var import_protocols2 = require("@dxos/protocols");
|
|
694
715
|
var import_credentials5 = require("@dxos/protocols/proto/dxos/halo/credentials");
|
|
695
716
|
var import_timeframe = require("@dxos/timeframe");
|
|
696
717
|
var import_tracing2 = require("@dxos/tracing");
|
|
697
|
-
var
|
|
718
|
+
var import_util3 = require("@dxos/util");
|
|
698
719
|
function _ts_decorate2(decorators, target, key, desc) {
|
|
699
720
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
700
721
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
|
|
@@ -720,12 +741,12 @@ var IdentityManager = class IdentityManager2 {
|
|
|
720
741
|
return this._identity;
|
|
721
742
|
}
|
|
722
743
|
async open(ctx) {
|
|
723
|
-
const traceId =
|
|
744
|
+
const traceId = import_keys5.PublicKey.random().toHex();
|
|
724
745
|
import_log3.log.trace("dxos.halo.identity-manager.open", import_protocols2.trace.begin({
|
|
725
746
|
id: traceId
|
|
726
747
|
}), {
|
|
727
748
|
F: __dxlog_file3,
|
|
728
|
-
L:
|
|
749
|
+
L: 75,
|
|
729
750
|
S: this,
|
|
730
751
|
C: (f, a) => f(...a)
|
|
731
752
|
});
|
|
@@ -734,7 +755,7 @@ var IdentityManager = class IdentityManager2 {
|
|
|
734
755
|
identityRecord
|
|
735
756
|
}, {
|
|
736
757
|
F: __dxlog_file3,
|
|
737
|
-
L:
|
|
758
|
+
L: 78,
|
|
738
759
|
S: this,
|
|
739
760
|
C: (f, a) => f(...a)
|
|
740
761
|
});
|
|
@@ -747,7 +768,7 @@ var IdentityManager = class IdentityManager2 {
|
|
|
747
768
|
displayName: this._identity.profileDocument?.displayName
|
|
748
769
|
}, {
|
|
749
770
|
F: __dxlog_file3,
|
|
750
|
-
L:
|
|
771
|
+
L: 83,
|
|
751
772
|
S: this,
|
|
752
773
|
C: (f, a) => f(...a)
|
|
753
774
|
});
|
|
@@ -757,7 +778,7 @@ var IdentityManager = class IdentityManager2 {
|
|
|
757
778
|
id: traceId
|
|
758
779
|
}), {
|
|
759
780
|
F: __dxlog_file3,
|
|
760
|
-
L:
|
|
781
|
+
L: 89,
|
|
761
782
|
S: this,
|
|
762
783
|
C: (f, a) => f(...a)
|
|
763
784
|
});
|
|
@@ -768,7 +789,7 @@ var IdentityManager = class IdentityManager2 {
|
|
|
768
789
|
async createIdentity({ displayName } = {}) {
|
|
769
790
|
(0, import_invariant2.invariant)(!this._identity, "Identity already exists.", {
|
|
770
791
|
F: __dxlog_file3,
|
|
771
|
-
L:
|
|
792
|
+
L: 97,
|
|
772
793
|
S: this,
|
|
773
794
|
A: [
|
|
774
795
|
"!this._identity",
|
|
@@ -777,7 +798,7 @@ var IdentityManager = class IdentityManager2 {
|
|
|
777
798
|
});
|
|
778
799
|
(0, import_log3.log)("creating identity...", void 0, {
|
|
779
800
|
F: __dxlog_file3,
|
|
780
|
-
L:
|
|
801
|
+
L: 98,
|
|
781
802
|
S: this,
|
|
782
803
|
C: (f, a) => f(...a)
|
|
783
804
|
});
|
|
@@ -798,7 +819,7 @@ var IdentityManager = class IdentityManager2 {
|
|
|
798
819
|
const generator = new import_credentials4.CredentialGenerator(this._keyring, identityRecord.identityKey, identityRecord.deviceKey);
|
|
799
820
|
(0, import_invariant2.invariant)(identityRecord.haloSpace.genesisFeedKey, "Genesis feed key is required.", {
|
|
800
821
|
F: __dxlog_file3,
|
|
801
|
-
L:
|
|
822
|
+
L: 117,
|
|
802
823
|
S: this,
|
|
803
824
|
A: [
|
|
804
825
|
"identityRecord.haloSpace.genesisFeedKey",
|
|
@@ -807,7 +828,7 @@ var IdentityManager = class IdentityManager2 {
|
|
|
807
828
|
});
|
|
808
829
|
(0, import_invariant2.invariant)(identityRecord.haloSpace.dataFeedKey, "Data feed key is required.", {
|
|
809
830
|
F: __dxlog_file3,
|
|
810
|
-
L:
|
|
831
|
+
L: 118,
|
|
811
832
|
S: this,
|
|
812
833
|
A: [
|
|
813
834
|
"identityRecord.haloSpace.dataFeedKey",
|
|
@@ -826,6 +847,13 @@ var IdentityManager = class IdentityManager2 {
|
|
|
826
847
|
}));
|
|
827
848
|
}
|
|
828
849
|
credentials.push(await generator.createDeviceAuthorization(identityRecord.deviceKey));
|
|
850
|
+
credentials.push(await generator.createDeviceProfile({
|
|
851
|
+
platform: import_platform.default.name,
|
|
852
|
+
platformVersion: import_platform.default.version,
|
|
853
|
+
architecture: typeof import_platform.default.os?.architecture === "number" ? String(import_platform.default.os.architecture) : void 0,
|
|
854
|
+
os: import_platform.default.os?.family,
|
|
855
|
+
osVersion: import_platform.default.os?.version
|
|
856
|
+
}));
|
|
829
857
|
for (const credential of credentials) {
|
|
830
858
|
await identity.controlPipeline.writer.write({
|
|
831
859
|
credential: {
|
|
@@ -842,7 +870,7 @@ var IdentityManager = class IdentityManager2 {
|
|
|
842
870
|
displayName: this._identity.profileDocument?.displayName
|
|
843
871
|
}, {
|
|
844
872
|
F: __dxlog_file3,
|
|
845
|
-
L:
|
|
873
|
+
L: 163,
|
|
846
874
|
S: this,
|
|
847
875
|
C: (f, a) => f(...a)
|
|
848
876
|
});
|
|
@@ -852,7 +880,7 @@ var IdentityManager = class IdentityManager2 {
|
|
|
852
880
|
deviceKey: identity.deviceKey
|
|
853
881
|
}, {
|
|
854
882
|
F: __dxlog_file3,
|
|
855
|
-
L:
|
|
883
|
+
L: 169,
|
|
856
884
|
S: this,
|
|
857
885
|
C: (f, a) => f(...a)
|
|
858
886
|
});
|
|
@@ -866,13 +894,13 @@ var IdentityManager = class IdentityManager2 {
|
|
|
866
894
|
params
|
|
867
895
|
}, {
|
|
868
896
|
F: __dxlog_file3,
|
|
869
|
-
L:
|
|
897
|
+
L: 177,
|
|
870
898
|
S: this,
|
|
871
899
|
C: (f, a) => f(...a)
|
|
872
900
|
});
|
|
873
901
|
(0, import_invariant2.invariant)(!this._identity, "Identity already exists.", {
|
|
874
902
|
F: __dxlog_file3,
|
|
875
|
-
L:
|
|
903
|
+
L: 178,
|
|
876
904
|
S: this,
|
|
877
905
|
A: [
|
|
878
906
|
"!this._identity",
|
|
@@ -900,7 +928,7 @@ var IdentityManager = class IdentityManager2 {
|
|
|
900
928
|
displayName: this._identity.profileDocument?.displayName
|
|
901
929
|
}, {
|
|
902
930
|
F: __dxlog_file3,
|
|
903
|
-
L:
|
|
931
|
+
L: 197,
|
|
904
932
|
S: this,
|
|
905
933
|
C: (f, a) => f(...a)
|
|
906
934
|
});
|
|
@@ -910,7 +938,7 @@ var IdentityManager = class IdentityManager2 {
|
|
|
910
938
|
deviceKey: identity.deviceKey
|
|
911
939
|
}, {
|
|
912
940
|
F: __dxlog_file3,
|
|
913
|
-
L:
|
|
941
|
+
L: 203,
|
|
914
942
|
S: this,
|
|
915
943
|
C: (f, a) => f(...a)
|
|
916
944
|
});
|
|
@@ -922,7 +950,7 @@ var IdentityManager = class IdentityManager2 {
|
|
|
922
950
|
async updateProfile(profile) {
|
|
923
951
|
(0, import_invariant2.invariant)(this._identity, "Identity not initialized.", {
|
|
924
952
|
F: __dxlog_file3,
|
|
925
|
-
L:
|
|
953
|
+
L: 211,
|
|
926
954
|
S: this,
|
|
927
955
|
A: [
|
|
928
956
|
"this._identity",
|
|
@@ -953,7 +981,7 @@ var IdentityManager = class IdentityManager2 {
|
|
|
953
981
|
async _constructIdentity(identityRecord) {
|
|
954
982
|
(0, import_invariant2.invariant)(!this._identity, void 0, {
|
|
955
983
|
F: __dxlog_file3,
|
|
956
|
-
L:
|
|
984
|
+
L: 228,
|
|
957
985
|
S: this,
|
|
958
986
|
A: [
|
|
959
987
|
"!this._identity",
|
|
@@ -964,13 +992,13 @@ var IdentityManager = class IdentityManager2 {
|
|
|
964
992
|
identityRecord
|
|
965
993
|
}, {
|
|
966
994
|
F: __dxlog_file3,
|
|
967
|
-
L:
|
|
995
|
+
L: 229,
|
|
968
996
|
S: this,
|
|
969
997
|
C: (f, a) => f(...a)
|
|
970
998
|
});
|
|
971
999
|
(0, import_invariant2.invariant)(identityRecord.haloSpace.controlFeedKey, void 0, {
|
|
972
1000
|
F: __dxlog_file3,
|
|
973
|
-
L:
|
|
1001
|
+
L: 232,
|
|
974
1002
|
S: this,
|
|
975
1003
|
A: [
|
|
976
1004
|
"identityRecord.haloSpace.controlFeedKey",
|
|
@@ -982,7 +1010,7 @@ var IdentityManager = class IdentityManager2 {
|
|
|
982
1010
|
});
|
|
983
1011
|
(0, import_invariant2.invariant)(identityRecord.haloSpace.dataFeedKey, void 0, {
|
|
984
1012
|
F: __dxlog_file3,
|
|
985
|
-
L:
|
|
1013
|
+
L: 236,
|
|
986
1014
|
S: this,
|
|
987
1015
|
A: [
|
|
988
1016
|
"identityRecord.haloSpace.dataFeedKey",
|
|
@@ -998,7 +1026,7 @@ var IdentityManager = class IdentityManager2 {
|
|
|
998
1026
|
swarmIdentity: {
|
|
999
1027
|
peerKey: identityRecord.deviceKey,
|
|
1000
1028
|
credentialProvider: createAuthProvider((0, import_credentials4.createCredentialSignerWithKey)(this._keyring, identityRecord.deviceKey)),
|
|
1001
|
-
credentialAuthenticator: (0,
|
|
1029
|
+
credentialAuthenticator: (0, import_util3.deferFunction)(() => identity.authVerifier.verifier)
|
|
1002
1030
|
},
|
|
1003
1031
|
identityKey: identityRecord.identityKey
|
|
1004
1032
|
});
|
|
@@ -1014,7 +1042,7 @@ var IdentityManager = class IdentityManager2 {
|
|
|
1014
1042
|
identityKey: identityRecord.identityKey
|
|
1015
1043
|
}, {
|
|
1016
1044
|
F: __dxlog_file3,
|
|
1017
|
-
L:
|
|
1045
|
+
L: 260,
|
|
1018
1046
|
S: this,
|
|
1019
1047
|
C: (f, a) => f(...a)
|
|
1020
1048
|
});
|
|
@@ -1035,7 +1063,7 @@ var IdentityManager = class IdentityManager2 {
|
|
|
1035
1063
|
onAuthFailure: () => {
|
|
1036
1064
|
import_log3.log.warn("auth failure", void 0, {
|
|
1037
1065
|
F: __dxlog_file3,
|
|
1038
|
-
L:
|
|
1066
|
+
L: 279,
|
|
1039
1067
|
S: this,
|
|
1040
1068
|
C: (f, a) => f(...a)
|
|
1041
1069
|
});
|
|
@@ -1220,7 +1248,7 @@ var import_client_protocol2 = require("@dxos/client-protocol");
|
|
|
1220
1248
|
var import_context5 = require("@dxos/context");
|
|
1221
1249
|
var import_credentials7 = require("@dxos/credentials");
|
|
1222
1250
|
var import_invariant6 = require("@dxos/invariant");
|
|
1223
|
-
var
|
|
1251
|
+
var import_keys7 = require("@dxos/keys");
|
|
1224
1252
|
var import_log5 = require("@dxos/log");
|
|
1225
1253
|
var import_network_manager = require("@dxos/network-manager");
|
|
1226
1254
|
var import_protocols4 = require("@dxos/protocols");
|
|
@@ -1231,7 +1259,7 @@ var import_invitations2 = require("@dxos/protocols/proto/dxos/halo/invitations")
|
|
|
1231
1259
|
var import_async7 = require("@dxos/async");
|
|
1232
1260
|
var import_context4 = require("@dxos/context");
|
|
1233
1261
|
var import_invariant5 = require("@dxos/invariant");
|
|
1234
|
-
var
|
|
1262
|
+
var import_keys6 = require("@dxos/keys");
|
|
1235
1263
|
var import_log4 = require("@dxos/log");
|
|
1236
1264
|
var import_protocols3 = require("@dxos/protocols");
|
|
1237
1265
|
var import_services2 = require("@dxos/protocols/proto/dxos/client/services");
|
|
@@ -1279,7 +1307,7 @@ var InvitationHostExtension = class extends import_teleport.RpcExtension {
|
|
|
1279
1307
|
},
|
|
1280
1308
|
introduce: async (request) => {
|
|
1281
1309
|
const { profile, invitationId } = request;
|
|
1282
|
-
const traceId =
|
|
1310
|
+
const traceId = import_keys6.PublicKey.random().toHex();
|
|
1283
1311
|
import_log4.log.trace("dxos.sdk.invitation-handler.host.introduce", import_protocols3.trace.begin({
|
|
1284
1312
|
id: traceId
|
|
1285
1313
|
}), {
|
|
@@ -1331,7 +1359,7 @@ var InvitationHostExtension = class extends import_teleport.RpcExtension {
|
|
|
1331
1359
|
};
|
|
1332
1360
|
},
|
|
1333
1361
|
authenticate: async ({ authCode: code }) => {
|
|
1334
|
-
const traceId =
|
|
1362
|
+
const traceId = import_keys6.PublicKey.random().toHex();
|
|
1335
1363
|
import_log4.log.trace("dxos.sdk.invitation-handler.host.authenticate", import_protocols3.trace.begin({
|
|
1336
1364
|
id: traceId
|
|
1337
1365
|
}), {
|
|
@@ -1411,7 +1439,7 @@ var InvitationHostExtension = class extends import_teleport.RpcExtension {
|
|
|
1411
1439
|
};
|
|
1412
1440
|
},
|
|
1413
1441
|
admit: async (request) => {
|
|
1414
|
-
const traceId =
|
|
1442
|
+
const traceId = import_keys6.PublicKey.random().toHex();
|
|
1415
1443
|
import_log4.log.trace("dxos.sdk.invitation-handler.host.admit", import_protocols3.trace.begin({
|
|
1416
1444
|
id: traceId
|
|
1417
1445
|
}), {
|
|
@@ -1577,7 +1605,7 @@ var InvitationsHandler = class {
|
|
|
1577
1605
|
this._networkManager = _networkManager;
|
|
1578
1606
|
}
|
|
1579
1607
|
createInvitation(protocol, options) {
|
|
1580
|
-
const { invitationId =
|
|
1608
|
+
const { invitationId = import_keys7.PublicKey.random().toHex(), type = import_services3.Invitation.Type.INTERACTIVE, authMethod = import_services3.Invitation.AuthMethod.SHARED_SECRET, state = import_services3.Invitation.State.INIT, timeout = import_client_protocol2.INVITATION_TIMEOUT, swarmKey = import_keys7.PublicKey.random() } = options ?? {};
|
|
1581
1609
|
const authCode = options?.authCode ?? (authMethod === import_services3.Invitation.AuthMethod.SHARED_SECRET ? (0, import_credentials7.generatePasscode)(import_client_protocol2.AUTHENTICATION_CODE_LENGTH) : void 0);
|
|
1582
1610
|
(0, import_invariant6.invariant)(protocol, void 0, {
|
|
1583
1611
|
F: __dxlog_file7,
|
|
@@ -1652,7 +1680,7 @@ var InvitationsHandler = class {
|
|
|
1652
1680
|
},
|
|
1653
1681
|
onOpen: () => {
|
|
1654
1682
|
(0, import_async8.scheduleTask)(ctx, async () => {
|
|
1655
|
-
const traceId =
|
|
1683
|
+
const traceId = import_keys7.PublicKey.random().toHex();
|
|
1656
1684
|
try {
|
|
1657
1685
|
import_log5.log.trace("dxos.sdk.invitations-handler.host.onOpen", import_protocols4.trace.begin({
|
|
1658
1686
|
id: traceId
|
|
@@ -1885,7 +1913,7 @@ var InvitationsHandler = class {
|
|
|
1885
1913
|
}
|
|
1886
1914
|
});
|
|
1887
1915
|
(0, import_async8.scheduleTask)(ctx, async () => {
|
|
1888
|
-
const traceId =
|
|
1916
|
+
const traceId = import_keys7.PublicKey.random().toHex();
|
|
1889
1917
|
try {
|
|
1890
1918
|
import_log5.log.trace("dxos.sdk.invitations-handler.guest.onOpen", import_protocols4.trace.begin({
|
|
1891
1919
|
id: traceId
|
|
@@ -2092,7 +2120,7 @@ var InvitationsHandler = class {
|
|
|
2092
2120
|
const topic = invitation.swarmKey;
|
|
2093
2121
|
const swarmConnection = await this._networkManager.joinSwarm({
|
|
2094
2122
|
topic,
|
|
2095
|
-
peerId:
|
|
2123
|
+
peerId: import_keys7.PublicKey.random(),
|
|
2096
2124
|
protocolProvider: (0, import_network_manager.createTeleportProtocolFactory)(async (teleport) => {
|
|
2097
2125
|
teleport.addExtension("dxos.halo.invitations", createExtension());
|
|
2098
2126
|
}),
|
|
@@ -2249,15 +2277,6 @@ var InvitationsServiceImpl = class {
|
|
|
2249
2277
|
await accepted.cancel();
|
|
2250
2278
|
this._acceptInvitations.delete(invitationId);
|
|
2251
2279
|
this._removedAccepted.emit(accepted.get());
|
|
2252
|
-
} else {
|
|
2253
|
-
import_log6.log.warn("invalid invitation", {
|
|
2254
|
-
invitationId
|
|
2255
|
-
}, {
|
|
2256
|
-
F: __dxlog_file8,
|
|
2257
|
-
L: 132,
|
|
2258
|
-
S: this,
|
|
2259
|
-
C: (f, a) => f(...a)
|
|
2260
|
-
});
|
|
2261
2280
|
}
|
|
2262
2281
|
}
|
|
2263
2282
|
queryInvitations() {
|
|
@@ -2545,10 +2564,10 @@ var getPlatform = () => {
|
|
|
2545
2564
|
};
|
|
2546
2565
|
}
|
|
2547
2566
|
} else {
|
|
2548
|
-
const { platform, version, arch } = process;
|
|
2567
|
+
const { platform: platform2, version, arch } = process;
|
|
2549
2568
|
return {
|
|
2550
2569
|
type: "node",
|
|
2551
|
-
platform: `${
|
|
2570
|
+
platform: `${platform2} ${version} ${arch}`,
|
|
2552
2571
|
runtime: process.version,
|
|
2553
2572
|
uptime: Math.floor(process.uptime()),
|
|
2554
2573
|
memory: process.memoryUsage()
|
|
@@ -2557,7 +2576,7 @@ var getPlatform = () => {
|
|
|
2557
2576
|
};
|
|
2558
2577
|
|
|
2559
2578
|
// packages/sdk/client-services/src/version.ts
|
|
2560
|
-
var DXOS_VERSION = "0.3.2-main.
|
|
2579
|
+
var DXOS_VERSION = "0.3.2-main.ec06501";
|
|
2561
2580
|
|
|
2562
2581
|
// packages/sdk/client-services/src/packlets/services/diagnostics.ts
|
|
2563
2582
|
var __dxlog_file10 = "/home/runner/work/dxos/dxos/packages/sdk/client-services/src/packlets/services/diagnostics.ts";
|
|
@@ -2686,25 +2705,25 @@ var import_echo_pipeline2 = require("@dxos/echo-pipeline");
|
|
|
2686
2705
|
var import_feed_store4 = require("@dxos/feed-store");
|
|
2687
2706
|
var import_invariant13 = require("@dxos/invariant");
|
|
2688
2707
|
var import_keyring = require("@dxos/keyring");
|
|
2689
|
-
var
|
|
2708
|
+
var import_keys11 = require("@dxos/keys");
|
|
2690
2709
|
var import_log13 = require("@dxos/log");
|
|
2691
2710
|
var import_protocols10 = require("@dxos/protocols");
|
|
2692
2711
|
var import_services10 = require("@dxos/protocols/proto/dxos/client/services");
|
|
2693
2712
|
var import_teleport_extension_object_sync = require("@dxos/teleport-extension-object-sync");
|
|
2694
2713
|
var import_tracing4 = require("@dxos/tracing");
|
|
2695
|
-
var
|
|
2714
|
+
var import_util7 = require("@dxos/util");
|
|
2696
2715
|
|
|
2697
2716
|
// packages/sdk/client-services/src/packlets/spaces/data-space-manager.ts
|
|
2698
2717
|
var import_async12 = require("@dxos/async");
|
|
2699
2718
|
var import_context8 = require("@dxos/context");
|
|
2700
2719
|
var import_credentials13 = require("@dxos/credentials");
|
|
2701
2720
|
var import_invariant11 = require("@dxos/invariant");
|
|
2702
|
-
var
|
|
2721
|
+
var import_keys10 = require("@dxos/keys");
|
|
2703
2722
|
var import_log11 = require("@dxos/log");
|
|
2704
2723
|
var import_protocols8 = require("@dxos/protocols");
|
|
2705
2724
|
var import_services8 = require("@dxos/protocols/proto/dxos/client/services");
|
|
2706
2725
|
var import_teleport_extension_gossip = require("@dxos/teleport-extension-gossip");
|
|
2707
|
-
var
|
|
2726
|
+
var import_util6 = require("@dxos/util");
|
|
2708
2727
|
|
|
2709
2728
|
// packages/sdk/client-services/src/packlets/spaces/data-space.ts
|
|
2710
2729
|
var import_async11 = require("@dxos/async");
|
|
@@ -2712,24 +2731,24 @@ var import_client_protocol3 = require("@dxos/client-protocol");
|
|
|
2712
2731
|
var import_context7 = require("@dxos/context");
|
|
2713
2732
|
var import_debug4 = require("@dxos/debug");
|
|
2714
2733
|
var import_echo_pipeline = require("@dxos/echo-pipeline");
|
|
2715
|
-
var
|
|
2734
|
+
var import_keys9 = require("@dxos/keys");
|
|
2716
2735
|
var import_log10 = require("@dxos/log");
|
|
2717
2736
|
var import_protocols7 = require("@dxos/protocols");
|
|
2718
2737
|
var import_services7 = require("@dxos/protocols/proto/dxos/client/services");
|
|
2719
2738
|
var import_credentials10 = require("@dxos/protocols/proto/dxos/halo/credentials");
|
|
2720
2739
|
var import_timeframe2 = require("@dxos/timeframe");
|
|
2721
2740
|
var import_tracing3 = require("@dxos/tracing");
|
|
2722
|
-
var
|
|
2741
|
+
var import_util5 = require("@dxos/util");
|
|
2723
2742
|
|
|
2724
2743
|
// packages/sdk/client-services/src/packlets/spaces/notarization-plugin.ts
|
|
2725
2744
|
var import_async10 = require("@dxos/async");
|
|
2726
2745
|
var import_context6 = require("@dxos/context");
|
|
2727
2746
|
var import_invariant10 = require("@dxos/invariant");
|
|
2728
|
-
var
|
|
2747
|
+
var import_keys8 = require("@dxos/keys");
|
|
2729
2748
|
var import_log9 = require("@dxos/log");
|
|
2730
2749
|
var import_protocols6 = require("@dxos/protocols");
|
|
2731
2750
|
var import_teleport2 = require("@dxos/teleport");
|
|
2732
|
-
var
|
|
2751
|
+
var import_util4 = require("@dxos/util");
|
|
2733
2752
|
var __dxlog_file11 = "/home/runner/work/dxos/dxos/packages/sdk/client-services/src/packlets/spaces/notarization-plugin.ts";
|
|
2734
2753
|
var DEFAULT_RETRY_TIMEOUT = 1e3;
|
|
2735
2754
|
var DEFAULT_SUCCESS_DELAY = 1e3;
|
|
@@ -2740,8 +2759,8 @@ var NotarizationPlugin = class {
|
|
|
2740
2759
|
this._ctx = new import_context6.Context();
|
|
2741
2760
|
this._extensionOpened = new import_async10.Event();
|
|
2742
2761
|
this._extensions = /* @__PURE__ */ new Set();
|
|
2743
|
-
this._processedCredentials = new
|
|
2744
|
-
this._processCredentialsTriggers = new
|
|
2762
|
+
this._processedCredentials = new import_util4.ComplexSet(import_keys8.PublicKey.hash);
|
|
2763
|
+
this._processCredentialsTriggers = new import_util4.ComplexMap(import_keys8.PublicKey.hash);
|
|
2745
2764
|
}
|
|
2746
2765
|
get hasWriter() {
|
|
2747
2766
|
return !!this._writer;
|
|
@@ -2903,7 +2922,7 @@ var NotarizationPlugin = class {
|
|
|
2903
2922
|
if (this._processedCredentials.has(id)) {
|
|
2904
2923
|
return;
|
|
2905
2924
|
}
|
|
2906
|
-
await (0,
|
|
2925
|
+
await (0, import_util4.entry)(this._processCredentialsTriggers, id).orInsert(new import_async10.Trigger()).value.wait();
|
|
2907
2926
|
}
|
|
2908
2927
|
/**
|
|
2909
2928
|
* Requests from other peers to notarize credentials.
|
|
@@ -3023,7 +3042,7 @@ var DataSpace = class DataSpace2 {
|
|
|
3023
3042
|
this._signingContext = params.signingContext;
|
|
3024
3043
|
this._callbacks = params.callbacks ?? {};
|
|
3025
3044
|
this.authVerifier = new TrustedKeySetAuthVerifier({
|
|
3026
|
-
trustedKeysProvider: () => new
|
|
3045
|
+
trustedKeysProvider: () => new import_util5.ComplexSet(import_keys9.PublicKey.hash, Array.from(this._inner.spaceState.members.values()).filter((member) => !member.removed).map((member) => member.key)),
|
|
3027
3046
|
update: this._inner.stateUpdate,
|
|
3028
3047
|
authTimeout: import_client_protocol3.AUTH_TIMEOUT
|
|
3029
3048
|
});
|
|
@@ -3442,9 +3461,9 @@ var DataSpaceManager = class DataSpaceManager2 {
|
|
|
3442
3461
|
this._feedStore = _feedStore;
|
|
3443
3462
|
this._ctx = new import_context8.Context();
|
|
3444
3463
|
this.updated = new import_async12.Event();
|
|
3445
|
-
this._spaces = new
|
|
3464
|
+
this._spaces = new import_util6.ComplexMap(import_keys10.PublicKey.hash);
|
|
3446
3465
|
this._isOpen = false;
|
|
3447
|
-
this._instanceId =
|
|
3466
|
+
this._instanceId = import_keys10.PublicKey.random().toHex();
|
|
3448
3467
|
}
|
|
3449
3468
|
// TODO(burdon): Remove.
|
|
3450
3469
|
get spaces() {
|
|
@@ -3473,7 +3492,7 @@ var DataSpaceManager = class DataSpaceManager2 {
|
|
|
3473
3492
|
S: this,
|
|
3474
3493
|
C: (f, a) => f(...a)
|
|
3475
3494
|
});
|
|
3476
|
-
await (0,
|
|
3495
|
+
await (0, import_util6.forEachAsync)(this._metadataStore.spaces, async (spaceMetadata) => {
|
|
3477
3496
|
try {
|
|
3478
3497
|
(0, import_log11.log)("load space", {
|
|
3479
3498
|
spaceMetadata
|
|
@@ -3655,7 +3674,7 @@ var DataSpaceManager = class DataSpaceManager2 {
|
|
|
3655
3674
|
swarmIdentity: {
|
|
3656
3675
|
peerKey: this._signingContext.deviceKey,
|
|
3657
3676
|
credentialProvider: createAuthProvider(this._signingContext.credentialSigner),
|
|
3658
|
-
credentialAuthenticator: (0,
|
|
3677
|
+
credentialAuthenticator: (0, import_util6.deferFunction)(() => dataSpace.authVerifier.verifier)
|
|
3659
3678
|
},
|
|
3660
3679
|
onNetworkConnection: (session) => {
|
|
3661
3680
|
session.addExtension("dxos.mesh.teleport.gossip", gossip.createExtension({
|
|
@@ -3995,7 +4014,7 @@ var ServiceContext = class ServiceContext2 {
|
|
|
3995
4014
|
this.initialized = new import_async14.Trigger();
|
|
3996
4015
|
this.dataServiceSubscriptions = new import_echo_pipeline2.DataServiceSubscriptions();
|
|
3997
4016
|
this._handlerFactories = /* @__PURE__ */ new Map();
|
|
3998
|
-
this._instanceId =
|
|
4017
|
+
this._instanceId = import_keys11.PublicKey.random().toHex();
|
|
3999
4018
|
this.metadataStore = new import_echo_pipeline2.MetadataStore(storage.createDirectory("metadata"));
|
|
4000
4019
|
this.snapshotStore = new import_echo_pipeline2.SnapshotStore(storage.createDirectory("snapshots"));
|
|
4001
4020
|
this.blobStore = new import_teleport_extension_object_sync.BlobStore(storage.createDirectory("blobs"));
|
|
@@ -4216,7 +4235,7 @@ _ts_decorate5([
|
|
|
4216
4235
|
import_tracing4.trace.span()
|
|
4217
4236
|
], ServiceContext.prototype, "_initialize", null);
|
|
4218
4237
|
ServiceContext = _ts_decorate5([
|
|
4219
|
-
(0,
|
|
4238
|
+
(0, import_util7.safeInstanceof)("dxos.client-services.ServiceContext"),
|
|
4220
4239
|
import_tracing4.trace.resource()
|
|
4221
4240
|
], ServiceContext);
|
|
4222
4241
|
|
|
@@ -4228,7 +4247,7 @@ var import_document_model2 = require("@dxos/document-model");
|
|
|
4228
4247
|
var import_echo_pipeline3 = require("@dxos/echo-pipeline");
|
|
4229
4248
|
var import_echo_schema = require("@dxos/echo-schema");
|
|
4230
4249
|
var import_invariant15 = require("@dxos/invariant");
|
|
4231
|
-
var
|
|
4250
|
+
var import_keys12 = require("@dxos/keys");
|
|
4232
4251
|
var import_log16 = require("@dxos/log");
|
|
4233
4252
|
var import_messaging = require("@dxos/messaging");
|
|
4234
4253
|
var import_model_factory = require("@dxos/model-factory");
|
|
@@ -4271,7 +4290,7 @@ var DevicesServiceImpl = class {
|
|
|
4271
4290
|
constructor(_identityManager) {
|
|
4272
4291
|
this._identityManager = _identityManager;
|
|
4273
4292
|
}
|
|
4274
|
-
updateDevice(
|
|
4293
|
+
async updateDevice(profile) {
|
|
4275
4294
|
throw new Error("Method not implemented.");
|
|
4276
4295
|
}
|
|
4277
4296
|
queryDevices() {
|
|
@@ -4284,9 +4303,10 @@ var DevicesServiceImpl = class {
|
|
|
4284
4303
|
});
|
|
4285
4304
|
} else {
|
|
4286
4305
|
next({
|
|
4287
|
-
devices: Array.from(deviceKeys.
|
|
4306
|
+
devices: Array.from(deviceKeys.entries()).map(([key, profile]) => ({
|
|
4288
4307
|
deviceKey: key,
|
|
4289
|
-
kind: this._identityManager.identity?.deviceKey.equals(key) ? import_services11.DeviceKind.CURRENT : import_services11.DeviceKind.TRUSTED
|
|
4308
|
+
kind: this._identityManager.identity?.deviceKey.equals(key) ? import_services11.DeviceKind.CURRENT : import_services11.DeviceKind.TRUSTED,
|
|
4309
|
+
profile
|
|
4290
4310
|
}))
|
|
4291
4311
|
});
|
|
4292
4312
|
}
|
|
@@ -4370,7 +4390,7 @@ var import_async16 = require("@dxos/async");
|
|
|
4370
4390
|
var import_codec_protobuf13 = require("@dxos/codec-protobuf");
|
|
4371
4391
|
var import_log15 = require("@dxos/log");
|
|
4372
4392
|
var import_services12 = require("@dxos/protocols/proto/dxos/client/services");
|
|
4373
|
-
var
|
|
4393
|
+
var import_util8 = require("@dxos/util");
|
|
4374
4394
|
var LoggingServiceImpl = class {
|
|
4375
4395
|
constructor() {
|
|
4376
4396
|
this._logs = new import_async16.Event();
|
|
@@ -4388,15 +4408,15 @@ var LoggingServiceImpl = class {
|
|
|
4388
4408
|
}
|
|
4389
4409
|
async controlMetrics({ reset, record }) {
|
|
4390
4410
|
if (reset) {
|
|
4391
|
-
|
|
4411
|
+
import_util8.tracer.clear();
|
|
4392
4412
|
}
|
|
4393
4413
|
if (record === true) {
|
|
4394
|
-
|
|
4414
|
+
import_util8.tracer.start();
|
|
4395
4415
|
} else if (record === false) {
|
|
4396
|
-
|
|
4416
|
+
import_util8.tracer.stop();
|
|
4397
4417
|
}
|
|
4398
4418
|
return {
|
|
4399
|
-
recording:
|
|
4419
|
+
recording: import_util8.tracer.recording
|
|
4400
4420
|
};
|
|
4401
4421
|
}
|
|
4402
4422
|
/**
|
|
@@ -4404,10 +4424,10 @@ var LoggingServiceImpl = class {
|
|
|
4404
4424
|
*/
|
|
4405
4425
|
queryMetrics({ interval = 5e3 }) {
|
|
4406
4426
|
const getNumericalValues = (key) => {
|
|
4407
|
-
const events =
|
|
4427
|
+
const events = import_util8.tracer.get(key) ?? [];
|
|
4408
4428
|
return {
|
|
4409
4429
|
key,
|
|
4410
|
-
stats: (0,
|
|
4430
|
+
stats: (0, import_util8.numericalValues)(events, "duration")
|
|
4411
4431
|
};
|
|
4412
4432
|
};
|
|
4413
4433
|
return new import_codec_protobuf13.Stream(({ next }) => {
|
|
@@ -4445,7 +4465,7 @@ var LoggingServiceImpl = class {
|
|
|
4445
4465
|
}
|
|
4446
4466
|
const record = {
|
|
4447
4467
|
...entry2,
|
|
4448
|
-
context: (0,
|
|
4468
|
+
context: (0, import_util8.jsonify)((0, import_log15.getContextFromEntry)(entry2)),
|
|
4449
4469
|
timestamp: /* @__PURE__ */ new Date(),
|
|
4450
4470
|
meta: {
|
|
4451
4471
|
// TODO(dmaretskyi): Fix proto.
|
|
@@ -4519,10 +4539,10 @@ var import_client_protocol4 = require("@dxos/client-protocol");
|
|
|
4519
4539
|
var import_protocols11 = require("@dxos/protocols");
|
|
4520
4540
|
var import_config = require("@dxos/protocols/proto/dxos/config");
|
|
4521
4541
|
var import_random_access_storage = require("@dxos/random-access-storage");
|
|
4522
|
-
var
|
|
4542
|
+
var import_util9 = require("@dxos/util");
|
|
4523
4543
|
var StorageDriver = import_config.Runtime.Client.Storage.StorageDriver;
|
|
4524
4544
|
var createStorageObjects = (config) => {
|
|
4525
|
-
const { persistent = false, keyStore, dataStore, dataRoot = (0,
|
|
4545
|
+
const { persistent = false, keyStore, dataStore, dataRoot = (0, import_util9.isNode)() ? import_client_protocol4.DX_DATA : "dxos/storage" } = config ?? {};
|
|
4526
4546
|
if (persistent && dataStore === StorageDriver.RAM) {
|
|
4527
4547
|
throw new import_protocols11.InvalidConfigError("RAM storage cannot be used in persistent mode.");
|
|
4528
4548
|
}
|
|
@@ -4566,7 +4586,7 @@ var toStorageType = (type) => {
|
|
|
4566
4586
|
// packages/sdk/client-services/src/packlets/system/system-service.ts
|
|
4567
4587
|
var import_codec_protobuf15 = require("@dxos/codec-protobuf");
|
|
4568
4588
|
var import_services13 = require("@dxos/protocols/proto/dxos/client/services");
|
|
4569
|
-
var
|
|
4589
|
+
var import_util10 = require("@dxos/util");
|
|
4570
4590
|
var SystemServiceImpl = class {
|
|
4571
4591
|
constructor({ config, statusUpdate, getDiagnostics, onUpdateStatus, getCurrentStatus, onReset }) {
|
|
4572
4592
|
this._config = config;
|
|
@@ -4586,7 +4606,7 @@ var SystemServiceImpl = class {
|
|
|
4586
4606
|
const diagnostics = await this._getDiagnostics();
|
|
4587
4607
|
return {
|
|
4588
4608
|
timestamp: /* @__PURE__ */ new Date(),
|
|
4589
|
-
diagnostics: JSON.parse(JSON.stringify(diagnostics, (0,
|
|
4609
|
+
diagnostics: JSON.parse(JSON.stringify(diagnostics, (0, import_util10.jsonKeyReplacer)({
|
|
4590
4610
|
truncate: keys === import_services13.GetDiagnosticsRequest.KEY_OPTION.TRUNCATE,
|
|
4591
4611
|
humanize: keys === import_services13.GetDiagnosticsRequest.KEY_OPTION.HUMANIZE
|
|
4592
4612
|
})))
|
|
@@ -4787,7 +4807,7 @@ var ClientServicesHost = class ClientServicesHost2 {
|
|
|
4787
4807
|
if (this._open) {
|
|
4788
4808
|
return;
|
|
4789
4809
|
}
|
|
4790
|
-
const traceId =
|
|
4810
|
+
const traceId = import_keys12.PublicKey.random().toHex();
|
|
4791
4811
|
import_log16.log.trace("dxos.client-services.host.open", import_protocols12.trace.begin({
|
|
4792
4812
|
id: traceId
|
|
4793
4813
|
}), {
|
|
@@ -4927,7 +4947,7 @@ var ClientServicesHost = class ClientServicesHost2 {
|
|
|
4927
4947
|
});
|
|
4928
4948
|
}
|
|
4929
4949
|
async reset() {
|
|
4930
|
-
const traceId =
|
|
4950
|
+
const traceId = import_keys12.PublicKey.random().toHex();
|
|
4931
4951
|
import_log16.log.trace("dxos.sdk.client-services-host.reset", import_protocols12.trace.begin({
|
|
4932
4952
|
id: traceId
|
|
4933
4953
|
}), {
|
|
@@ -5005,7 +5025,7 @@ var import_context11 = require("@dxos/context");
|
|
|
5005
5025
|
var import_log17 = require("@dxos/log");
|
|
5006
5026
|
var import_messaging2 = require("@dxos/messaging");
|
|
5007
5027
|
var import_network_manager3 = require("@dxos/network-manager");
|
|
5008
|
-
var
|
|
5028
|
+
var import_util11 = require("@dxos/util");
|
|
5009
5029
|
|
|
5010
5030
|
// packages/sdk/client-services/src/packlets/vault/shell-runtime.ts
|
|
5011
5031
|
var import_async18 = require("@dxos/async");
|
|
@@ -5113,7 +5133,7 @@ var IFrameHostRuntime = class {
|
|
|
5113
5133
|
C: (f, a) => f(...a)
|
|
5114
5134
|
});
|
|
5115
5135
|
try {
|
|
5116
|
-
this._config = await (0,
|
|
5136
|
+
this._config = await (0, import_util11.getAsyncValue)(this._configProvider);
|
|
5117
5137
|
this._transportFactory = (0, import_network_manager3.createSimplePeerTransportFactory)({
|
|
5118
5138
|
iceServers: this._config.get("runtime.services.ice")
|
|
5119
5139
|
});
|
|
@@ -5200,7 +5220,7 @@ var import_log18 = require("@dxos/log");
|
|
|
5200
5220
|
var import_network_manager4 = require("@dxos/network-manager");
|
|
5201
5221
|
var import_protocols13 = require("@dxos/protocols");
|
|
5202
5222
|
var import_rpc3 = require("@dxos/rpc");
|
|
5203
|
-
var
|
|
5223
|
+
var import_util12 = require("@dxos/util");
|
|
5204
5224
|
var __dxlog_file20 = "/home/runner/work/dxos/dxos/packages/sdk/client-services/src/packlets/vault/iframe-proxy-runtime.ts";
|
|
5205
5225
|
var IFrameProxyRuntime = class {
|
|
5206
5226
|
constructor({ config, systemPort, shellPort }) {
|
|
@@ -5217,7 +5237,7 @@ var IFrameProxyRuntime = class {
|
|
|
5217
5237
|
return this._shellRuntime;
|
|
5218
5238
|
}
|
|
5219
5239
|
async open(origin) {
|
|
5220
|
-
this._config = await (0,
|
|
5240
|
+
this._config = await (0, import_util12.getAsyncValue)(this._configProvider);
|
|
5221
5241
|
this._transportService = new import_network_manager4.SimplePeerTransportService({
|
|
5222
5242
|
iceServers: this._config.get("runtime.services.ice")
|
|
5223
5243
|
});
|
|
@@ -5282,7 +5302,7 @@ var import_client_protocol9 = require("@dxos/client-protocol");
|
|
|
5282
5302
|
var import_invariant17 = require("@dxos/invariant");
|
|
5283
5303
|
var import_log19 = require("@dxos/log");
|
|
5284
5304
|
var import_rpc4 = require("@dxos/rpc");
|
|
5285
|
-
var
|
|
5305
|
+
var import_util13 = require("@dxos/util");
|
|
5286
5306
|
function _ts_decorate9(decorators, target, key, desc) {
|
|
5287
5307
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
5288
5308
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
|
|
@@ -5297,7 +5317,7 @@ var __dxlog_file21 = "/home/runner/work/dxos/dxos/packages/sdk/client-services/s
|
|
|
5297
5317
|
var WorkerSession = class {
|
|
5298
5318
|
constructor({ serviceHost, systemPort, appPort, shellPort, readySignal }) {
|
|
5299
5319
|
this._startTrigger = new import_async21.Trigger();
|
|
5300
|
-
this.onClose = new
|
|
5320
|
+
this.onClose = new import_util13.Callback();
|
|
5301
5321
|
(0, import_invariant17.invariant)(serviceHost, void 0, {
|
|
5302
5322
|
F: __dxlog_file21,
|
|
5303
5323
|
L: 49,
|