@dxos/client-services 0.3.2-main.d77d2bc → 0.3.2-main.e5374ab
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-WOH6JPED.mjs → chunk-HQ4UBZ3F.mjs} +111 -164
- package/dist/lib/browser/chunk-HQ4UBZ3F.mjs.map +7 -0
- package/dist/lib/browser/index.mjs +2 -2
- package/dist/lib/browser/index.mjs.map +2 -2
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/packlets/testing/index.mjs +1 -1
- package/dist/lib/browser/packlets/testing/index.mjs.map +2 -2
- package/dist/lib/node/index.cjs +155 -198
- 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 +130 -173
- package/dist/lib/node/packlets/testing/index.cjs.map +3 -3
- package/dist/types/src/packlets/devices/devices-service.d.ts +4 -4
- package/dist/types/src/packlets/devices/devices-service.d.ts.map +1 -1
- package/dist/types/src/packlets/devtools/devtools.d.ts +4 -4
- package/dist/types/src/packlets/devtools/devtools.d.ts.map +1 -1
- package/dist/types/src/packlets/devtools/feeds.d.ts +3 -3
- package/dist/types/src/packlets/devtools/feeds.d.ts.map +1 -1
- package/dist/types/src/packlets/devtools/keys.d.ts +2 -2
- package/dist/types/src/packlets/devtools/keys.d.ts.map +1 -1
- package/dist/types/src/packlets/devtools/metadata.d.ts +2 -2
- package/dist/types/src/packlets/devtools/metadata.d.ts.map +1 -1
- package/dist/types/src/packlets/devtools/network.d.ts +3 -3
- package/dist/types/src/packlets/devtools/network.d.ts.map +1 -1
- package/dist/types/src/packlets/devtools/spaces.d.ts +2 -2
- package/dist/types/src/packlets/devtools/spaces.d.ts.map +1 -1
- package/dist/types/src/packlets/identity/authenticator.d.ts +5 -5
- package/dist/types/src/packlets/identity/authenticator.d.ts.map +1 -1
- package/dist/types/src/packlets/identity/identity-manager.d.ts +5 -9
- package/dist/types/src/packlets/identity/identity-manager.d.ts.map +1 -1
- package/dist/types/src/packlets/identity/identity-service.d.ts +4 -4
- package/dist/types/src/packlets/identity/identity-service.d.ts.map +1 -1
- package/dist/types/src/packlets/identity/identity.d.ts +8 -8
- package/dist/types/src/packlets/identity/identity.d.ts.map +1 -1
- package/dist/types/src/packlets/invitations/device-invitation-protocol.d.ts +4 -4
- package/dist/types/src/packlets/invitations/device-invitation-protocol.d.ts.map +1 -1
- package/dist/types/src/packlets/invitations/invitation-extension.d.ts +3 -3
- package/dist/types/src/packlets/invitations/invitation-extension.d.ts.map +1 -1
- package/dist/types/src/packlets/invitations/invitation-protocol.d.ts +3 -3
- package/dist/types/src/packlets/invitations/invitation-protocol.d.ts.map +1 -1
- package/dist/types/src/packlets/invitations/invitations-handler.d.ts +1 -1
- package/dist/types/src/packlets/invitations/invitations-handler.d.ts.map +1 -1
- package/dist/types/src/packlets/invitations/invitations-service.d.ts +3 -3
- package/dist/types/src/packlets/invitations/invitations-service.d.ts.map +1 -1
- package/dist/types/src/packlets/invitations/space-invitation-protocol.d.ts +6 -6
- package/dist/types/src/packlets/invitations/space-invitation-protocol.d.ts.map +1 -1
- package/dist/types/src/packlets/locks/browser.d.ts +1 -1
- package/dist/types/src/packlets/locks/browser.d.ts.map +1 -1
- package/dist/types/src/packlets/locks/node.d.ts +1 -1
- package/dist/types/src/packlets/locks/node.d.ts.map +1 -1
- package/dist/types/src/packlets/locks/resource-lock.d.ts +1 -1
- package/dist/types/src/packlets/locks/resource-lock.d.ts.map +1 -1
- package/dist/types/src/packlets/logging/logging-service.d.ts +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 +3 -3
- package/dist/types/src/packlets/network/network-service.d.ts.map +1 -1
- package/dist/types/src/packlets/services/client-rpc-server.d.ts +5 -5
- package/dist/types/src/packlets/services/client-rpc-server.d.ts.map +1 -1
- package/dist/types/src/packlets/services/diagnostics.d.ts +8 -8
- package/dist/types/src/packlets/services/diagnostics.d.ts.map +1 -1
- package/dist/types/src/packlets/services/service-context.d.ts +6 -6
- package/dist/types/src/packlets/services/service-context.d.ts.map +1 -1
- package/dist/types/src/packlets/services/service-host.d.ts +5 -5
- package/dist/types/src/packlets/services/service-host.d.ts.map +1 -1
- package/dist/types/src/packlets/services/service-registry.d.ts +1 -1
- package/dist/types/src/packlets/services/service-registry.d.ts.map +1 -1
- package/dist/types/src/packlets/spaces/data-space-manager.d.ts +7 -7
- package/dist/types/src/packlets/spaces/data-space-manager.d.ts.map +1 -1
- package/dist/types/src/packlets/spaces/data-space.d.ts +9 -9
- package/dist/types/src/packlets/spaces/data-space.d.ts.map +1 -1
- package/dist/types/src/packlets/spaces/genesis.d.ts +3 -3
- package/dist/types/src/packlets/spaces/genesis.d.ts.map +1 -1
- package/dist/types/src/packlets/spaces/notarization-plugin.d.ts +5 -5
- package/dist/types/src/packlets/spaces/notarization-plugin.d.ts.map +1 -1
- package/dist/types/src/packlets/spaces/spaces-service.d.ts +7 -7
- package/dist/types/src/packlets/spaces/spaces-service.d.ts.map +1 -1
- package/dist/types/src/packlets/system/system-service.d.ts +5 -5
- package/dist/types/src/packlets/system/system-service.d.ts.map +1 -1
- package/dist/types/src/packlets/testing/credential-utils.d.ts +2 -2
- package/dist/types/src/packlets/testing/credential-utils.d.ts.map +1 -1
- package/dist/types/src/packlets/testing/invitation-utils.d.ts +1 -1
- package/dist/types/src/packlets/testing/invitation-utils.d.ts.map +1 -1
- package/dist/types/src/packlets/testing/test-builder.d.ts +4 -4
- package/dist/types/src/packlets/testing/test-builder.d.ts.map +1 -1
- package/dist/types/src/packlets/vault/iframe-host-runtime.d.ts +4 -4
- package/dist/types/src/packlets/vault/iframe-host-runtime.d.ts.map +1 -1
- package/dist/types/src/packlets/vault/iframe-proxy-runtime.d.ts +4 -4
- package/dist/types/src/packlets/vault/iframe-proxy-runtime.d.ts.map +1 -1
- package/dist/types/src/packlets/vault/shell-runtime.d.ts +4 -4
- package/dist/types/src/packlets/vault/shell-runtime.d.ts.map +1 -1
- package/dist/types/src/packlets/vault/worker-runtime.d.ts +3 -3
- package/dist/types/src/packlets/vault/worker-runtime.d.ts.map +1 -1
- package/dist/types/src/packlets/vault/worker-session.d.ts +3 -3
- package/dist/types/src/packlets/vault/worker-session.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.test.ts +2 -2
- package/src/packlets/devices/devices-service.ts +10 -17
- package/src/packlets/devtools/devtools.ts +35 -35
- package/src/packlets/devtools/feeds.ts +6 -6
- package/src/packlets/devtools/keys.ts +2 -2
- package/src/packlets/devtools/metadata.ts +2 -2
- package/src/packlets/devtools/network.ts +8 -8
- package/src/packlets/devtools/spaces.ts +8 -5
- package/src/packlets/identity/authenticator.ts +5 -5
- package/src/packlets/identity/identity-manager.test.ts +7 -6
- package/src/packlets/identity/identity-manager.ts +18 -26
- package/src/packlets/identity/identity-service.test.ts +2 -2
- package/src/packlets/identity/identity-service.ts +8 -8
- package/src/packlets/identity/identity.test.ts +2 -2
- package/src/packlets/identity/identity.ts +13 -9
- package/src/packlets/invitations/device-invitation-protocol.test.ts +1 -1
- package/src/packlets/invitations/device-invitation-protocol.ts +8 -4
- package/src/packlets/invitations/invitation-extension.ts +6 -6
- package/src/packlets/invitations/invitation-protocol.ts +7 -3
- package/src/packlets/invitations/invitations-handler.ts +7 -2
- package/src/packlets/invitations/invitations-service.ts +5 -5
- package/src/packlets/invitations/space-invitation-protocol.test.ts +1 -1
- package/src/packlets/invitations/space-invitation-protocol.ts +12 -8
- package/src/packlets/locks/browser.ts +1 -1
- package/src/packlets/locks/node.ts +2 -2
- package/src/packlets/locks/resource-lock.ts +1 -1
- package/src/packlets/logging/logging-service.ts +14 -8
- package/src/packlets/logging/logging.test.ts +1 -1
- package/src/packlets/network/network-service.test.ts +2 -2
- package/src/packlets/network/network-service.ts +7 -3
- package/src/packlets/services/client-rpc-server.ts +5 -5
- package/src/packlets/services/diagnostics.ts +13 -13
- package/src/packlets/services/service-context.test.ts +2 -2
- package/src/packlets/services/service-context.ts +9 -9
- package/src/packlets/services/service-host.test.ts +3 -3
- package/src/packlets/services/service-host.ts +9 -9
- package/src/packlets/services/service-registry.test.ts +2 -2
- package/src/packlets/services/service-registry.ts +1 -1
- package/src/packlets/spaces/data-space-manager.test.ts +4 -4
- package/src/packlets/spaces/data-space-manager.ts +8 -8
- package/src/packlets/spaces/data-space.ts +10 -10
- package/src/packlets/spaces/genesis.ts +3 -3
- package/src/packlets/spaces/notarization-plugin.test.ts +2 -2
- package/src/packlets/spaces/notarization-plugin.ts +5 -5
- package/src/packlets/spaces/spaces-service.test.ts +2 -2
- package/src/packlets/spaces/spaces-service.ts +17 -17
- package/src/packlets/system/system-service.test.ts +1 -1
- package/src/packlets/system/system-service.ts +9 -9
- package/src/packlets/testing/credential-utils.ts +2 -2
- package/src/packlets/testing/invitation-utils.ts +1 -1
- package/src/packlets/testing/test-builder.ts +4 -4
- package/src/packlets/vault/iframe-host-runtime.ts +6 -6
- package/src/packlets/vault/iframe-proxy-runtime.ts +10 -5
- package/src/packlets/vault/shell-runtime.ts +4 -4
- package/src/packlets/vault/worker-runtime.ts +3 -3
- package/src/packlets/vault/worker-session.ts +5 -5
- package/src/version.ts +1 -1
- package/dist/lib/browser/chunk-WOH6JPED.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
|
|
@@ -546,7 +556,7 @@ var Identity = class Identity2 {
|
|
|
546
556
|
deviceKey
|
|
547
557
|
}, {
|
|
548
558
|
F: __dxlog_file2,
|
|
549
|
-
L:
|
|
559
|
+
L: 64,
|
|
550
560
|
S: this,
|
|
551
561
|
C: (f, a) => f(...a)
|
|
552
562
|
});
|
|
@@ -618,7 +628,7 @@ var Identity = class Identity2 {
|
|
|
618
628
|
getIdentityCredentialSigner() {
|
|
619
629
|
(0, import_invariant.invariant)(this._deviceStateMachine.deviceCredentialChain, "Device credential chain is not ready.", {
|
|
620
630
|
F: __dxlog_file2,
|
|
621
|
-
L:
|
|
631
|
+
L: 145,
|
|
622
632
|
S: this,
|
|
623
633
|
A: [
|
|
624
634
|
"this._deviceStateMachine.deviceCredentialChain",
|
|
@@ -642,7 +652,7 @@ var Identity = class Identity2 {
|
|
|
642
652
|
dataFeedKey
|
|
643
653
|
}, {
|
|
644
654
|
F: __dxlog_file2,
|
|
645
|
-
L:
|
|
655
|
+
L: 161,
|
|
646
656
|
S: this,
|
|
647
657
|
C: (f, a) => f(...a)
|
|
648
658
|
});
|
|
@@ -694,6 +704,7 @@ Identity = _ts_decorate([
|
|
|
694
704
|
], Identity);
|
|
695
705
|
|
|
696
706
|
// packages/sdk/client-services/src/packlets/identity/identity-manager.ts
|
|
707
|
+
var import_platform = __toESM(require("platform"));
|
|
697
708
|
var import_async6 = require("@dxos/async");
|
|
698
709
|
var import_context3 = require("@dxos/context");
|
|
699
710
|
var import_credentials4 = require("@dxos/credentials");
|
|
@@ -735,7 +746,7 @@ var IdentityManager = class IdentityManager2 {
|
|
|
735
746
|
id: traceId
|
|
736
747
|
}), {
|
|
737
748
|
F: __dxlog_file3,
|
|
738
|
-
L:
|
|
749
|
+
L: 75,
|
|
739
750
|
S: this,
|
|
740
751
|
C: (f, a) => f(...a)
|
|
741
752
|
});
|
|
@@ -744,7 +755,7 @@ var IdentityManager = class IdentityManager2 {
|
|
|
744
755
|
identityRecord
|
|
745
756
|
}, {
|
|
746
757
|
F: __dxlog_file3,
|
|
747
|
-
L:
|
|
758
|
+
L: 78,
|
|
748
759
|
S: this,
|
|
749
760
|
C: (f, a) => f(...a)
|
|
750
761
|
});
|
|
@@ -757,7 +768,7 @@ var IdentityManager = class IdentityManager2 {
|
|
|
757
768
|
displayName: this._identity.profileDocument?.displayName
|
|
758
769
|
}, {
|
|
759
770
|
F: __dxlog_file3,
|
|
760
|
-
L:
|
|
771
|
+
L: 83,
|
|
761
772
|
S: this,
|
|
762
773
|
C: (f, a) => f(...a)
|
|
763
774
|
});
|
|
@@ -767,7 +778,7 @@ var IdentityManager = class IdentityManager2 {
|
|
|
767
778
|
id: traceId
|
|
768
779
|
}), {
|
|
769
780
|
F: __dxlog_file3,
|
|
770
|
-
L:
|
|
781
|
+
L: 89,
|
|
771
782
|
S: this,
|
|
772
783
|
C: (f, a) => f(...a)
|
|
773
784
|
});
|
|
@@ -778,7 +789,7 @@ var IdentityManager = class IdentityManager2 {
|
|
|
778
789
|
async createIdentity({ displayName } = {}) {
|
|
779
790
|
(0, import_invariant2.invariant)(!this._identity, "Identity already exists.", {
|
|
780
791
|
F: __dxlog_file3,
|
|
781
|
-
L:
|
|
792
|
+
L: 97,
|
|
782
793
|
S: this,
|
|
783
794
|
A: [
|
|
784
795
|
"!this._identity",
|
|
@@ -787,7 +798,7 @@ var IdentityManager = class IdentityManager2 {
|
|
|
787
798
|
});
|
|
788
799
|
(0, import_log3.log)("creating identity...", void 0, {
|
|
789
800
|
F: __dxlog_file3,
|
|
790
|
-
L:
|
|
801
|
+
L: 98,
|
|
791
802
|
S: this,
|
|
792
803
|
C: (f, a) => f(...a)
|
|
793
804
|
});
|
|
@@ -808,7 +819,7 @@ var IdentityManager = class IdentityManager2 {
|
|
|
808
819
|
const generator = new import_credentials4.CredentialGenerator(this._keyring, identityRecord.identityKey, identityRecord.deviceKey);
|
|
809
820
|
(0, import_invariant2.invariant)(identityRecord.haloSpace.genesisFeedKey, "Genesis feed key is required.", {
|
|
810
821
|
F: __dxlog_file3,
|
|
811
|
-
L:
|
|
822
|
+
L: 117,
|
|
812
823
|
S: this,
|
|
813
824
|
A: [
|
|
814
825
|
"identityRecord.haloSpace.genesisFeedKey",
|
|
@@ -817,7 +828,7 @@ var IdentityManager = class IdentityManager2 {
|
|
|
817
828
|
});
|
|
818
829
|
(0, import_invariant2.invariant)(identityRecord.haloSpace.dataFeedKey, "Data feed key is required.", {
|
|
819
830
|
F: __dxlog_file3,
|
|
820
|
-
L:
|
|
831
|
+
L: 118,
|
|
821
832
|
S: this,
|
|
822
833
|
A: [
|
|
823
834
|
"identityRecord.haloSpace.dataFeedKey",
|
|
@@ -836,6 +847,13 @@ var IdentityManager = class IdentityManager2 {
|
|
|
836
847
|
}));
|
|
837
848
|
}
|
|
838
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
|
+
}));
|
|
839
857
|
for (const credential of credentials) {
|
|
840
858
|
await identity.controlPipeline.writer.write({
|
|
841
859
|
credential: {
|
|
@@ -852,7 +870,7 @@ var IdentityManager = class IdentityManager2 {
|
|
|
852
870
|
displayName: this._identity.profileDocument?.displayName
|
|
853
871
|
}, {
|
|
854
872
|
F: __dxlog_file3,
|
|
855
|
-
L:
|
|
873
|
+
L: 163,
|
|
856
874
|
S: this,
|
|
857
875
|
C: (f, a) => f(...a)
|
|
858
876
|
});
|
|
@@ -862,7 +880,7 @@ var IdentityManager = class IdentityManager2 {
|
|
|
862
880
|
deviceKey: identity.deviceKey
|
|
863
881
|
}, {
|
|
864
882
|
F: __dxlog_file3,
|
|
865
|
-
L:
|
|
883
|
+
L: 169,
|
|
866
884
|
S: this,
|
|
867
885
|
C: (f, a) => f(...a)
|
|
868
886
|
});
|
|
@@ -876,13 +894,13 @@ var IdentityManager = class IdentityManager2 {
|
|
|
876
894
|
params
|
|
877
895
|
}, {
|
|
878
896
|
F: __dxlog_file3,
|
|
879
|
-
L:
|
|
897
|
+
L: 177,
|
|
880
898
|
S: this,
|
|
881
899
|
C: (f, a) => f(...a)
|
|
882
900
|
});
|
|
883
901
|
(0, import_invariant2.invariant)(!this._identity, "Identity already exists.", {
|
|
884
902
|
F: __dxlog_file3,
|
|
885
|
-
L:
|
|
903
|
+
L: 178,
|
|
886
904
|
S: this,
|
|
887
905
|
A: [
|
|
888
906
|
"!this._identity",
|
|
@@ -910,7 +928,7 @@ var IdentityManager = class IdentityManager2 {
|
|
|
910
928
|
displayName: this._identity.profileDocument?.displayName
|
|
911
929
|
}, {
|
|
912
930
|
F: __dxlog_file3,
|
|
913
|
-
L:
|
|
931
|
+
L: 197,
|
|
914
932
|
S: this,
|
|
915
933
|
C: (f, a) => f(...a)
|
|
916
934
|
});
|
|
@@ -920,7 +938,7 @@ var IdentityManager = class IdentityManager2 {
|
|
|
920
938
|
deviceKey: identity.deviceKey
|
|
921
939
|
}, {
|
|
922
940
|
F: __dxlog_file3,
|
|
923
|
-
L:
|
|
941
|
+
L: 203,
|
|
924
942
|
S: this,
|
|
925
943
|
C: (f, a) => f(...a)
|
|
926
944
|
});
|
|
@@ -932,7 +950,7 @@ var IdentityManager = class IdentityManager2 {
|
|
|
932
950
|
async updateProfile(profile) {
|
|
933
951
|
(0, import_invariant2.invariant)(this._identity, "Identity not initialized.", {
|
|
934
952
|
F: __dxlog_file3,
|
|
935
|
-
L:
|
|
953
|
+
L: 211,
|
|
936
954
|
S: this,
|
|
937
955
|
A: [
|
|
938
956
|
"this._identity",
|
|
@@ -960,51 +978,10 @@ var IdentityManager = class IdentityManager2 {
|
|
|
960
978
|
this.stateUpdate.emit();
|
|
961
979
|
return profile;
|
|
962
980
|
}
|
|
963
|
-
async updateDevice({ deviceKey, profile }) {
|
|
964
|
-
(0, import_invariant2.invariant)(this._identity, "Identity not initialized.", {
|
|
965
|
-
F: __dxlog_file3,
|
|
966
|
-
L: 216,
|
|
967
|
-
S: this,
|
|
968
|
-
A: [
|
|
969
|
-
"this._identity",
|
|
970
|
-
"'Identity not initialized.'"
|
|
971
|
-
]
|
|
972
|
-
});
|
|
973
|
-
(0, import_invariant2.invariant)(this._identity.authorizedDeviceKeys.has(deviceKey), "Device not authorized.", {
|
|
974
|
-
F: __dxlog_file3,
|
|
975
|
-
L: 218,
|
|
976
|
-
S: this,
|
|
977
|
-
A: [
|
|
978
|
-
"this._identity.authorizedDeviceKeys.has(deviceKey)",
|
|
979
|
-
"'Device not authorized.'"
|
|
980
|
-
]
|
|
981
|
-
});
|
|
982
|
-
const credential = await this._identity.getIdentityCredentialSigner().createCredential({
|
|
983
|
-
subject: this._identity.identityKey,
|
|
984
|
-
assertion: {
|
|
985
|
-
"@type": "dxos.halo.credentials.DeviceProfile",
|
|
986
|
-
deviceKey,
|
|
987
|
-
profile
|
|
988
|
-
}
|
|
989
|
-
});
|
|
990
|
-
const receipt = await this._identity.controlPipeline.writer.write({
|
|
991
|
-
credential: {
|
|
992
|
-
credential
|
|
993
|
-
}
|
|
994
|
-
});
|
|
995
|
-
await this._identity.controlPipeline.state.waitUntilTimeframe(new import_timeframe.Timeframe([
|
|
996
|
-
[
|
|
997
|
-
receipt.feedKey,
|
|
998
|
-
receipt.seq
|
|
999
|
-
]
|
|
1000
|
-
]));
|
|
1001
|
-
this.stateUpdate.emit();
|
|
1002
|
-
return profile;
|
|
1003
|
-
}
|
|
1004
981
|
async _constructIdentity(identityRecord) {
|
|
1005
982
|
(0, import_invariant2.invariant)(!this._identity, void 0, {
|
|
1006
983
|
F: __dxlog_file3,
|
|
1007
|
-
L:
|
|
984
|
+
L: 228,
|
|
1008
985
|
S: this,
|
|
1009
986
|
A: [
|
|
1010
987
|
"!this._identity",
|
|
@@ -1015,13 +992,13 @@ var IdentityManager = class IdentityManager2 {
|
|
|
1015
992
|
identityRecord
|
|
1016
993
|
}, {
|
|
1017
994
|
F: __dxlog_file3,
|
|
1018
|
-
L:
|
|
995
|
+
L: 229,
|
|
1019
996
|
S: this,
|
|
1020
997
|
C: (f, a) => f(...a)
|
|
1021
998
|
});
|
|
1022
999
|
(0, import_invariant2.invariant)(identityRecord.haloSpace.controlFeedKey, void 0, {
|
|
1023
1000
|
F: __dxlog_file3,
|
|
1024
|
-
L:
|
|
1001
|
+
L: 232,
|
|
1025
1002
|
S: this,
|
|
1026
1003
|
A: [
|
|
1027
1004
|
"identityRecord.haloSpace.controlFeedKey",
|
|
@@ -1033,7 +1010,7 @@ var IdentityManager = class IdentityManager2 {
|
|
|
1033
1010
|
});
|
|
1034
1011
|
(0, import_invariant2.invariant)(identityRecord.haloSpace.dataFeedKey, void 0, {
|
|
1035
1012
|
F: __dxlog_file3,
|
|
1036
|
-
L:
|
|
1013
|
+
L: 236,
|
|
1037
1014
|
S: this,
|
|
1038
1015
|
A: [
|
|
1039
1016
|
"identityRecord.haloSpace.dataFeedKey",
|
|
@@ -1065,7 +1042,7 @@ var IdentityManager = class IdentityManager2 {
|
|
|
1065
1042
|
identityKey: identityRecord.identityKey
|
|
1066
1043
|
}, {
|
|
1067
1044
|
F: __dxlog_file3,
|
|
1068
|
-
L:
|
|
1045
|
+
L: 260,
|
|
1069
1046
|
S: this,
|
|
1070
1047
|
C: (f, a) => f(...a)
|
|
1071
1048
|
});
|
|
@@ -1086,7 +1063,7 @@ var IdentityManager = class IdentityManager2 {
|
|
|
1086
1063
|
onAuthFailure: () => {
|
|
1087
1064
|
import_log3.log.warn("auth failure", void 0, {
|
|
1088
1065
|
F: __dxlog_file3,
|
|
1089
|
-
L:
|
|
1066
|
+
L: 279,
|
|
1090
1067
|
S: this,
|
|
1091
1068
|
C: (f, a) => f(...a)
|
|
1092
1069
|
});
|
|
@@ -1196,7 +1173,7 @@ var DeviceInvitationProtocol = class {
|
|
|
1196
1173
|
async admit(request) {
|
|
1197
1174
|
(0, import_invariant4.invariant)(request.device, void 0, {
|
|
1198
1175
|
F: __dxlog_file5,
|
|
1199
|
-
L:
|
|
1176
|
+
L: 35,
|
|
1200
1177
|
S: this,
|
|
1201
1178
|
A: [
|
|
1202
1179
|
"request.device",
|
|
@@ -1232,7 +1209,7 @@ var DeviceInvitationProtocol = class {
|
|
|
1232
1209
|
async accept(response, request) {
|
|
1233
1210
|
(0, import_invariant4.invariant)(response.device, void 0, {
|
|
1234
1211
|
F: __dxlog_file5,
|
|
1235
|
-
L:
|
|
1212
|
+
L: 68,
|
|
1236
1213
|
S: this,
|
|
1237
1214
|
A: [
|
|
1238
1215
|
"response.device",
|
|
@@ -1242,7 +1219,7 @@ var DeviceInvitationProtocol = class {
|
|
|
1242
1219
|
const { identityKey, haloSpaceKey, genesisFeedKey, controlTimeframe } = response.device;
|
|
1243
1220
|
(0, import_invariant4.invariant)(request.device, void 0, {
|
|
1244
1221
|
F: __dxlog_file5,
|
|
1245
|
-
L:
|
|
1222
|
+
L: 71,
|
|
1246
1223
|
S: this,
|
|
1247
1224
|
A: [
|
|
1248
1225
|
"request.device",
|
|
@@ -1632,7 +1609,7 @@ var InvitationsHandler = class {
|
|
|
1632
1609
|
const authCode = options?.authCode ?? (authMethod === import_services3.Invitation.AuthMethod.SHARED_SECRET ? (0, import_credentials7.generatePasscode)(import_client_protocol2.AUTHENTICATION_CODE_LENGTH) : void 0);
|
|
1633
1610
|
(0, import_invariant6.invariant)(protocol, void 0, {
|
|
1634
1611
|
F: __dxlog_file7,
|
|
1635
|
-
L:
|
|
1612
|
+
L: 80,
|
|
1636
1613
|
S: this,
|
|
1637
1614
|
A: [
|
|
1638
1615
|
"protocol",
|
|
@@ -1661,7 +1638,7 @@ var InvitationsHandler = class {
|
|
|
1661
1638
|
...protocol.toJSON()
|
|
1662
1639
|
}, {
|
|
1663
1640
|
F: __dxlog_file7,
|
|
1664
|
-
L:
|
|
1641
|
+
L: 102,
|
|
1665
1642
|
S: this,
|
|
1666
1643
|
C: (f, a) => f(...a)
|
|
1667
1644
|
});
|
|
@@ -1686,7 +1663,7 @@ var InvitationsHandler = class {
|
|
|
1686
1663
|
const deviceKey = admissionRequest.device?.deviceKey ?? admissionRequest.space?.deviceKey;
|
|
1687
1664
|
(0, import_invariant6.invariant)(deviceKey, void 0, {
|
|
1688
1665
|
F: __dxlog_file7,
|
|
1689
|
-
L:
|
|
1666
|
+
L: 123,
|
|
1690
1667
|
S: this,
|
|
1691
1668
|
A: [
|
|
1692
1669
|
"deviceKey",
|
|
@@ -1709,7 +1686,7 @@ var InvitationsHandler = class {
|
|
|
1709
1686
|
id: traceId
|
|
1710
1687
|
}), {
|
|
1711
1688
|
F: __dxlog_file7,
|
|
1712
|
-
L:
|
|
1689
|
+
L: 141,
|
|
1713
1690
|
S: this,
|
|
1714
1691
|
C: (f, a) => f(...a)
|
|
1715
1692
|
});
|
|
@@ -1717,7 +1694,7 @@ var InvitationsHandler = class {
|
|
|
1717
1694
|
...protocol.toJSON()
|
|
1718
1695
|
}, {
|
|
1719
1696
|
F: __dxlog_file7,
|
|
1720
|
-
L:
|
|
1697
|
+
L: 142,
|
|
1721
1698
|
S: this,
|
|
1722
1699
|
C: (f, a) => f(...a)
|
|
1723
1700
|
});
|
|
@@ -1733,7 +1710,7 @@ var InvitationsHandler = class {
|
|
|
1733
1710
|
...protocol.toJSON()
|
|
1734
1711
|
}, {
|
|
1735
1712
|
F: __dxlog_file7,
|
|
1736
|
-
L:
|
|
1713
|
+
L: 145,
|
|
1737
1714
|
S: this,
|
|
1738
1715
|
C: (f, a) => f(...a)
|
|
1739
1716
|
});
|
|
@@ -1745,7 +1722,7 @@ var InvitationsHandler = class {
|
|
|
1745
1722
|
id: traceId
|
|
1746
1723
|
}), {
|
|
1747
1724
|
F: __dxlog_file7,
|
|
1748
|
-
L:
|
|
1725
|
+
L: 147,
|
|
1749
1726
|
S: this,
|
|
1750
1727
|
C: (f, a) => f(...a)
|
|
1751
1728
|
});
|
|
@@ -1755,7 +1732,7 @@ var InvitationsHandler = class {
|
|
|
1755
1732
|
...protocol.toJSON()
|
|
1756
1733
|
}, {
|
|
1757
1734
|
F: __dxlog_file7,
|
|
1758
|
-
L:
|
|
1735
|
+
L: 150,
|
|
1759
1736
|
S: this,
|
|
1760
1737
|
C: (f, a) => f(...a)
|
|
1761
1738
|
});
|
|
@@ -1766,7 +1743,7 @@ var InvitationsHandler = class {
|
|
|
1766
1743
|
} else {
|
|
1767
1744
|
import_log5.log.error("failed", err, {
|
|
1768
1745
|
F: __dxlog_file7,
|
|
1769
|
-
L:
|
|
1746
|
+
L: 153,
|
|
1770
1747
|
S: this,
|
|
1771
1748
|
C: (f, a) => f(...a)
|
|
1772
1749
|
});
|
|
@@ -1777,7 +1754,7 @@ var InvitationsHandler = class {
|
|
|
1777
1754
|
error: err
|
|
1778
1755
|
}), {
|
|
1779
1756
|
F: __dxlog_file7,
|
|
1780
|
-
L:
|
|
1757
|
+
L: 156,
|
|
1781
1758
|
S: this,
|
|
1782
1759
|
C: (f, a) => f(...a)
|
|
1783
1760
|
});
|
|
@@ -1798,7 +1775,7 @@ var InvitationsHandler = class {
|
|
|
1798
1775
|
...protocol.toJSON()
|
|
1799
1776
|
}, {
|
|
1800
1777
|
F: __dxlog_file7,
|
|
1801
|
-
L:
|
|
1778
|
+
L: 171,
|
|
1802
1779
|
S: this,
|
|
1803
1780
|
C: (f, a) => f(...a)
|
|
1804
1781
|
});
|
|
@@ -1809,7 +1786,7 @@ var InvitationsHandler = class {
|
|
|
1809
1786
|
} else {
|
|
1810
1787
|
import_log5.log.error("failed", err, {
|
|
1811
1788
|
F: __dxlog_file7,
|
|
1812
|
-
L:
|
|
1789
|
+
L: 174,
|
|
1813
1790
|
S: this,
|
|
1814
1791
|
C: (f, a) => f(...a)
|
|
1815
1792
|
});
|
|
@@ -1854,7 +1831,7 @@ var InvitationsHandler = class {
|
|
|
1854
1831
|
const { timeout = import_client_protocol2.INVITATION_TIMEOUT } = invitation;
|
|
1855
1832
|
(0, import_invariant6.invariant)(protocol, void 0, {
|
|
1856
1833
|
F: __dxlog_file7,
|
|
1857
|
-
L:
|
|
1834
|
+
L: 215,
|
|
1858
1835
|
S: this,
|
|
1859
1836
|
A: [
|
|
1860
1837
|
"protocol",
|
|
@@ -1868,7 +1845,7 @@ var InvitationsHandler = class {
|
|
|
1868
1845
|
const setState = (newData) => {
|
|
1869
1846
|
(0, import_invariant6.invariant)(newData.state !== void 0, void 0, {
|
|
1870
1847
|
F: __dxlog_file7,
|
|
1871
|
-
L:
|
|
1848
|
+
L: 226,
|
|
1872
1849
|
S: this,
|
|
1873
1850
|
A: [
|
|
1874
1851
|
"newData.state !== undefined",
|
|
@@ -1888,7 +1865,7 @@ var InvitationsHandler = class {
|
|
|
1888
1865
|
...protocol.toJSON()
|
|
1889
1866
|
}, {
|
|
1890
1867
|
F: __dxlog_file7,
|
|
1891
|
-
L:
|
|
1868
|
+
L: 234,
|
|
1892
1869
|
S: this,
|
|
1893
1870
|
C: (f, a) => f(...a)
|
|
1894
1871
|
});
|
|
@@ -1898,7 +1875,7 @@ var InvitationsHandler = class {
|
|
|
1898
1875
|
} else {
|
|
1899
1876
|
import_log5.log.warn("auth failed", err, {
|
|
1900
1877
|
F: __dxlog_file7,
|
|
1901
|
-
L:
|
|
1878
|
+
L: 237,
|
|
1902
1879
|
S: this,
|
|
1903
1880
|
C: (f, a) => f(...a)
|
|
1904
1881
|
});
|
|
@@ -1912,7 +1889,7 @@ var InvitationsHandler = class {
|
|
|
1912
1889
|
...protocol.toJSON()
|
|
1913
1890
|
}, {
|
|
1914
1891
|
F: __dxlog_file7,
|
|
1915
|
-
L:
|
|
1892
|
+
L: 245,
|
|
1916
1893
|
S: this,
|
|
1917
1894
|
C: (f, a) => f(...a)
|
|
1918
1895
|
});
|
|
@@ -1927,7 +1904,7 @@ var InvitationsHandler = class {
|
|
|
1927
1904
|
currentState
|
|
1928
1905
|
}, {
|
|
1929
1906
|
F: __dxlog_file7,
|
|
1930
|
-
L:
|
|
1907
|
+
L: 255,
|
|
1931
1908
|
S: this,
|
|
1932
1909
|
C: (f, a) => f(...a)
|
|
1933
1910
|
});
|
|
@@ -1942,7 +1919,7 @@ var InvitationsHandler = class {
|
|
|
1942
1919
|
id: traceId
|
|
1943
1920
|
}), {
|
|
1944
1921
|
F: __dxlog_file7,
|
|
1945
|
-
L:
|
|
1922
|
+
L: 264,
|
|
1946
1923
|
S: this,
|
|
1947
1924
|
C: (f, a) => f(...a)
|
|
1948
1925
|
});
|
|
@@ -1954,7 +1931,7 @@ var InvitationsHandler = class {
|
|
|
1954
1931
|
...protocol.toJSON()
|
|
1955
1932
|
}, {
|
|
1956
1933
|
F: __dxlog_file7,
|
|
1957
|
-
L:
|
|
1934
|
+
L: 272,
|
|
1958
1935
|
S: this,
|
|
1959
1936
|
C: (f, a) => f(...a)
|
|
1960
1937
|
});
|
|
@@ -1965,7 +1942,7 @@ var InvitationsHandler = class {
|
|
|
1965
1942
|
...protocol.toJSON()
|
|
1966
1943
|
}, {
|
|
1967
1944
|
F: __dxlog_file7,
|
|
1968
|
-
L:
|
|
1945
|
+
L: 276,
|
|
1969
1946
|
S: this,
|
|
1970
1947
|
C: (f, a) => f(...a)
|
|
1971
1948
|
});
|
|
@@ -1975,7 +1952,7 @@ var InvitationsHandler = class {
|
|
|
1975
1952
|
response: introductionResponse
|
|
1976
1953
|
}, {
|
|
1977
1954
|
F: __dxlog_file7,
|
|
1978
|
-
L:
|
|
1955
|
+
L: 280,
|
|
1979
1956
|
S: this,
|
|
1980
1957
|
C: (f, a) => f(...a)
|
|
1981
1958
|
});
|
|
@@ -1987,7 +1964,7 @@ var InvitationsHandler = class {
|
|
|
1987
1964
|
for (let attempt = 1; attempt <= MAX_OTP_ATTEMPTS; attempt++) {
|
|
1988
1965
|
(0, import_log5.log)("guest waiting for authentication code...", void 0, {
|
|
1989
1966
|
F: __dxlog_file7,
|
|
1990
|
-
L:
|
|
1967
|
+
L: 289,
|
|
1991
1968
|
S: this,
|
|
1992
1969
|
C: (f, a) => f(...a)
|
|
1993
1970
|
});
|
|
@@ -1999,7 +1976,7 @@ var InvitationsHandler = class {
|
|
|
1999
1976
|
});
|
|
2000
1977
|
(0, import_log5.log)("sending authentication request", void 0, {
|
|
2001
1978
|
F: __dxlog_file7,
|
|
2002
|
-
L:
|
|
1979
|
+
L: 293,
|
|
2003
1980
|
S: this,
|
|
2004
1981
|
C: (f, a) => f(...a)
|
|
2005
1982
|
});
|
|
@@ -2020,7 +1997,7 @@ var InvitationsHandler = class {
|
|
|
2020
1997
|
attempt
|
|
2021
1998
|
}, {
|
|
2022
1999
|
F: __dxlog_file7,
|
|
2023
|
-
L:
|
|
2000
|
+
L: 304,
|
|
2024
2001
|
S: this,
|
|
2025
2002
|
C: (f, a) => f(...a)
|
|
2026
2003
|
});
|
|
@@ -2037,7 +2014,7 @@ var InvitationsHandler = class {
|
|
|
2037
2014
|
...protocol.toJSON()
|
|
2038
2015
|
}, {
|
|
2039
2016
|
F: __dxlog_file7,
|
|
2040
|
-
L:
|
|
2017
|
+
L: 315,
|
|
2041
2018
|
S: this,
|
|
2042
2019
|
C: (f, a) => f(...a)
|
|
2043
2020
|
});
|
|
@@ -2049,7 +2026,7 @@ var InvitationsHandler = class {
|
|
|
2049
2026
|
...protocol.toJSON()
|
|
2050
2027
|
}, {
|
|
2051
2028
|
F: __dxlog_file7,
|
|
2052
|
-
L:
|
|
2029
|
+
L: 326,
|
|
2053
2030
|
S: this,
|
|
2054
2031
|
C: (f, a) => f(...a)
|
|
2055
2032
|
});
|
|
@@ -2061,7 +2038,7 @@ var InvitationsHandler = class {
|
|
|
2061
2038
|
id: traceId
|
|
2062
2039
|
}), {
|
|
2063
2040
|
F: __dxlog_file7,
|
|
2064
|
-
L:
|
|
2041
|
+
L: 328,
|
|
2065
2042
|
S: this,
|
|
2066
2043
|
C: (f, a) => f(...a)
|
|
2067
2044
|
});
|
|
@@ -2071,7 +2048,7 @@ var InvitationsHandler = class {
|
|
|
2071
2048
|
...protocol.toJSON()
|
|
2072
2049
|
}, {
|
|
2073
2050
|
F: __dxlog_file7,
|
|
2074
|
-
L:
|
|
2051
|
+
L: 331,
|
|
2075
2052
|
S: this,
|
|
2076
2053
|
C: (f, a) => f(...a)
|
|
2077
2054
|
});
|
|
@@ -2081,7 +2058,7 @@ var InvitationsHandler = class {
|
|
|
2081
2058
|
} else {
|
|
2082
2059
|
(0, import_log5.log)("auth failed", err, {
|
|
2083
2060
|
F: __dxlog_file7,
|
|
2084
|
-
L:
|
|
2061
|
+
L: 334,
|
|
2085
2062
|
S: this,
|
|
2086
2063
|
C: (f, a) => f(...a)
|
|
2087
2064
|
});
|
|
@@ -2092,7 +2069,7 @@ var InvitationsHandler = class {
|
|
|
2092
2069
|
error: err
|
|
2093
2070
|
}), {
|
|
2094
2071
|
F: __dxlog_file7,
|
|
2095
|
-
L:
|
|
2072
|
+
L: 337,
|
|
2096
2073
|
S: this,
|
|
2097
2074
|
C: (f, a) => f(...a)
|
|
2098
2075
|
});
|
|
@@ -2110,7 +2087,7 @@ var InvitationsHandler = class {
|
|
|
2110
2087
|
...protocol.toJSON()
|
|
2111
2088
|
}, {
|
|
2112
2089
|
F: __dxlog_file7,
|
|
2113
|
-
L:
|
|
2090
|
+
L: 348,
|
|
2114
2091
|
S: this,
|
|
2115
2092
|
C: (f, a) => f(...a)
|
|
2116
2093
|
});
|
|
@@ -2120,7 +2097,7 @@ var InvitationsHandler = class {
|
|
|
2120
2097
|
} else {
|
|
2121
2098
|
(0, import_log5.log)("auth failed", err, {
|
|
2122
2099
|
F: __dxlog_file7,
|
|
2123
|
-
L:
|
|
2100
|
+
L: 351,
|
|
2124
2101
|
S: this,
|
|
2125
2102
|
C: (f, a) => f(...a)
|
|
2126
2103
|
});
|
|
@@ -2133,7 +2110,7 @@ var InvitationsHandler = class {
|
|
|
2133
2110
|
(0, import_async8.scheduleTask)(ctx, async () => {
|
|
2134
2111
|
(0, import_invariant6.invariant)(invitation.swarmKey, void 0, {
|
|
2135
2112
|
F: __dxlog_file7,
|
|
2136
|
-
L:
|
|
2113
|
+
L: 361,
|
|
2137
2114
|
S: this,
|
|
2138
2115
|
A: [
|
|
2139
2116
|
"invitation.swarmKey",
|
|
@@ -2383,7 +2360,7 @@ var SpaceInvitationProtocol = class {
|
|
|
2383
2360
|
async admit(request, guestProfile) {
|
|
2384
2361
|
(0, import_invariant8.invariant)(this._spaceKey, void 0, {
|
|
2385
2362
|
F: __dxlog_file9,
|
|
2386
|
-
L:
|
|
2363
|
+
L: 46,
|
|
2387
2364
|
S: this,
|
|
2388
2365
|
A: [
|
|
2389
2366
|
"this._spaceKey",
|
|
@@ -2393,7 +2370,7 @@ var SpaceInvitationProtocol = class {
|
|
|
2393
2370
|
const space = await this._spaceManager.spaces.get(this._spaceKey);
|
|
2394
2371
|
(0, import_invariant8.invariant)(space, void 0, {
|
|
2395
2372
|
F: __dxlog_file9,
|
|
2396
|
-
L:
|
|
2373
|
+
L: 48,
|
|
2397
2374
|
S: this,
|
|
2398
2375
|
A: [
|
|
2399
2376
|
"space",
|
|
@@ -2402,7 +2379,7 @@ var SpaceInvitationProtocol = class {
|
|
|
2402
2379
|
});
|
|
2403
2380
|
(0, import_invariant8.invariant)(request.space, void 0, {
|
|
2404
2381
|
F: __dxlog_file9,
|
|
2405
|
-
L:
|
|
2382
|
+
L: 50,
|
|
2406
2383
|
S: this,
|
|
2407
2384
|
A: [
|
|
2408
2385
|
"request.space",
|
|
@@ -2415,14 +2392,14 @@ var SpaceInvitationProtocol = class {
|
|
|
2415
2392
|
guest: deviceKey
|
|
2416
2393
|
}, {
|
|
2417
2394
|
F: __dxlog_file9,
|
|
2418
|
-
L:
|
|
2395
|
+
L: 53,
|
|
2419
2396
|
S: this,
|
|
2420
2397
|
C: (f, a) => f(...a)
|
|
2421
2398
|
});
|
|
2422
2399
|
const credentials = await (0, import_credentials8.createAdmissionCredentials)(this._signingContext.credentialSigner, identityKey, space.key, space.inner.genesisFeedKey, guestProfile);
|
|
2423
2400
|
(0, import_invariant8.invariant)(credentials[0].credential, void 0, {
|
|
2424
2401
|
F: __dxlog_file9,
|
|
2425
|
-
L:
|
|
2402
|
+
L: 64,
|
|
2426
2403
|
S: this,
|
|
2427
2404
|
A: [
|
|
2428
2405
|
"credentials[0].credential",
|
|
@@ -2432,7 +2409,7 @@ var SpaceInvitationProtocol = class {
|
|
|
2432
2409
|
const spaceMemberCredential = credentials[0].credential.credential;
|
|
2433
2410
|
(0, import_invariant8.invariant)((0, import_credentials8.getCredentialAssertion)(spaceMemberCredential)["@type"] === "dxos.halo.credentials.SpaceMember", void 0, {
|
|
2434
2411
|
F: __dxlog_file9,
|
|
2435
|
-
L:
|
|
2412
|
+
L: 66,
|
|
2436
2413
|
S: this,
|
|
2437
2414
|
A: [
|
|
2438
2415
|
"getCredentialAssertion(spaceMemberCredential)['@type'] === 'dxos.halo.credentials.SpaceMember'",
|
|
@@ -2468,7 +2445,7 @@ var SpaceInvitationProtocol = class {
|
|
|
2468
2445
|
async accept(response) {
|
|
2469
2446
|
(0, import_invariant8.invariant)(response.space, void 0, {
|
|
2470
2447
|
F: __dxlog_file9,
|
|
2471
|
-
L:
|
|
2448
|
+
L: 101,
|
|
2472
2449
|
S: this,
|
|
2473
2450
|
A: [
|
|
2474
2451
|
"response.space",
|
|
@@ -2479,7 +2456,7 @@ var SpaceInvitationProtocol = class {
|
|
|
2479
2456
|
const assertion = (0, import_credentials8.getCredentialAssertion)(credential);
|
|
2480
2457
|
(0, import_invariant8.invariant)(assertion["@type"] === "dxos.halo.credentials.SpaceMember", "Invalid credential", {
|
|
2481
2458
|
F: __dxlog_file9,
|
|
2482
|
-
L:
|
|
2459
|
+
L: 104,
|
|
2483
2460
|
S: this,
|
|
2484
2461
|
A: [
|
|
2485
2462
|
"assertion['@type'] === 'dxos.halo.credentials.SpaceMember'",
|
|
@@ -2488,7 +2465,7 @@ var SpaceInvitationProtocol = class {
|
|
|
2488
2465
|
});
|
|
2489
2466
|
(0, import_invariant8.invariant)(credential.subject.id.equals(this._signingContext.identityKey), void 0, {
|
|
2490
2467
|
F: __dxlog_file9,
|
|
2491
|
-
L:
|
|
2468
|
+
L: 105,
|
|
2492
2469
|
S: this,
|
|
2493
2470
|
A: [
|
|
2494
2471
|
"credential.subject.id.equals(this._signingContext.identityKey)",
|
|
@@ -2587,10 +2564,10 @@ var getPlatform = () => {
|
|
|
2587
2564
|
};
|
|
2588
2565
|
}
|
|
2589
2566
|
} else {
|
|
2590
|
-
const { platform, version, arch } = process;
|
|
2567
|
+
const { platform: platform2, version, arch } = process;
|
|
2591
2568
|
return {
|
|
2592
2569
|
type: "node",
|
|
2593
|
-
platform: `${
|
|
2570
|
+
platform: `${platform2} ${version} ${arch}`,
|
|
2594
2571
|
runtime: process.version,
|
|
2595
2572
|
uptime: Math.floor(process.uptime()),
|
|
2596
2573
|
memory: process.memoryUsage()
|
|
@@ -2599,7 +2576,7 @@ var getPlatform = () => {
|
|
|
2599
2576
|
};
|
|
2600
2577
|
|
|
2601
2578
|
// packages/sdk/client-services/src/version.ts
|
|
2602
|
-
var DXOS_VERSION = "0.3.2-main.
|
|
2579
|
+
var DXOS_VERSION = "0.3.2-main.e5374ab";
|
|
2603
2580
|
|
|
2604
2581
|
// packages/sdk/client-services/src/packlets/services/diagnostics.ts
|
|
2605
2582
|
var __dxlog_file10 = "/home/runner/work/dxos/dxos/packages/sdk/client-services/src/packlets/services/diagnostics.ts";
|
|
@@ -4269,7 +4246,7 @@ var import_context10 = require("@dxos/context");
|
|
|
4269
4246
|
var import_document_model2 = require("@dxos/document-model");
|
|
4270
4247
|
var import_echo_pipeline3 = require("@dxos/echo-pipeline");
|
|
4271
4248
|
var import_echo_schema = require("@dxos/echo-schema");
|
|
4272
|
-
var
|
|
4249
|
+
var import_invariant15 = require("@dxos/invariant");
|
|
4273
4250
|
var import_keys12 = require("@dxos/keys");
|
|
4274
4251
|
var import_log16 = require("@dxos/log");
|
|
4275
4252
|
var import_messaging = require("@dxos/messaging");
|
|
@@ -4308,33 +4285,13 @@ var ServiceRegistry = class {
|
|
|
4308
4285
|
// packages/sdk/client-services/src/packlets/devices/devices-service.ts
|
|
4309
4286
|
var import_async15 = require("@dxos/async");
|
|
4310
4287
|
var import_codec_protobuf12 = require("@dxos/codec-protobuf");
|
|
4311
|
-
var import_invariant14 = require("@dxos/invariant");
|
|
4312
4288
|
var import_services11 = require("@dxos/protocols/proto/dxos/client/services");
|
|
4313
|
-
var __dxlog_file16 = "/home/runner/work/dxos/dxos/packages/sdk/client-services/src/packlets/devices/devices-service.ts";
|
|
4314
4289
|
var DevicesServiceImpl = class {
|
|
4315
4290
|
constructor(_identityManager) {
|
|
4316
4291
|
this._identityManager = _identityManager;
|
|
4317
4292
|
}
|
|
4318
4293
|
async updateDevice(profile) {
|
|
4319
|
-
|
|
4320
|
-
F: __dxlog_file16,
|
|
4321
|
-
L: 17,
|
|
4322
|
-
S: this,
|
|
4323
|
-
A: [
|
|
4324
|
-
"this._identityManager.identity",
|
|
4325
|
-
"'Identity not initialized'"
|
|
4326
|
-
]
|
|
4327
|
-
});
|
|
4328
|
-
const deviceKey = this._identityManager.identity.deviceKey;
|
|
4329
|
-
await this._identityManager.updateDevice({
|
|
4330
|
-
deviceKey,
|
|
4331
|
-
profile
|
|
4332
|
-
});
|
|
4333
|
-
return {
|
|
4334
|
-
deviceKey,
|
|
4335
|
-
kind: import_services11.DeviceKind.CURRENT,
|
|
4336
|
-
profile
|
|
4337
|
-
};
|
|
4294
|
+
throw new Error("Method not implemented.");
|
|
4338
4295
|
}
|
|
4339
4296
|
queryDevices() {
|
|
4340
4297
|
return new import_codec_protobuf12.Stream(({ next }) => {
|
|
@@ -4370,7 +4327,7 @@ var DevicesServiceImpl = class {
|
|
|
4370
4327
|
};
|
|
4371
4328
|
|
|
4372
4329
|
// packages/sdk/client-services/src/packlets/locks/node.ts
|
|
4373
|
-
var
|
|
4330
|
+
var import_invariant14 = require("@dxos/invariant");
|
|
4374
4331
|
var import_lock_file = require("@dxos/lock-file");
|
|
4375
4332
|
var import_log14 = require("@dxos/log");
|
|
4376
4333
|
function _ts_decorate6(decorators, target, key, desc) {
|
|
@@ -4383,7 +4340,7 @@ function _ts_decorate6(decorators, target, key, desc) {
|
|
|
4383
4340
|
r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
4384
4341
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
4385
4342
|
}
|
|
4386
|
-
var
|
|
4343
|
+
var __dxlog_file16 = "/home/runner/work/dxos/dxos/packages/sdk/client-services/src/packlets/locks/node.ts";
|
|
4387
4344
|
var Lock = class {
|
|
4388
4345
|
constructor({ lockKey: lockPath, onAcquire, onRelease }) {
|
|
4389
4346
|
this._lockPath = lockPath;
|
|
@@ -4395,7 +4352,7 @@ var Lock = class {
|
|
|
4395
4352
|
}
|
|
4396
4353
|
async acquire() {
|
|
4397
4354
|
(0, import_log14.log)("acquiring lock...", void 0, {
|
|
4398
|
-
F:
|
|
4355
|
+
F: __dxlog_file16,
|
|
4399
4356
|
L: 32,
|
|
4400
4357
|
S: this,
|
|
4401
4358
|
C: (f, a) => f(...a)
|
|
@@ -4403,7 +4360,7 @@ var Lock = class {
|
|
|
4403
4360
|
this._fileHandle = await import_lock_file.LockFile.acquire(this._lockPath);
|
|
4404
4361
|
await this._onAcquire?.();
|
|
4405
4362
|
(0, import_log14.log)("acquired lock", void 0, {
|
|
4406
|
-
F:
|
|
4363
|
+
F: __dxlog_file16,
|
|
4407
4364
|
L: 37,
|
|
4408
4365
|
S: this,
|
|
4409
4366
|
C: (f, a) => f(...a)
|
|
@@ -4411,8 +4368,8 @@ var Lock = class {
|
|
|
4411
4368
|
}
|
|
4412
4369
|
async release() {
|
|
4413
4370
|
await this._onRelease?.();
|
|
4414
|
-
(0,
|
|
4415
|
-
F:
|
|
4371
|
+
(0, import_invariant14.invariant)(this._fileHandle, "Lock is not acquired", {
|
|
4372
|
+
F: __dxlog_file16,
|
|
4416
4373
|
L: 42,
|
|
4417
4374
|
S: this,
|
|
4418
4375
|
A: [
|
|
@@ -4691,7 +4648,7 @@ function _ts_decorate7(decorators, target, key, desc) {
|
|
|
4691
4648
|
r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
4692
4649
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
4693
4650
|
}
|
|
4694
|
-
var
|
|
4651
|
+
var __dxlog_file17 = "/home/runner/work/dxos/dxos/packages/sdk/client-services/src/packlets/services/service-host.ts";
|
|
4695
4652
|
var createDefaultModelFactory = () => {
|
|
4696
4653
|
return new import_model_factory.ModelFactory().registerModel(import_document_model2.DocumentModel).registerModel(import_text_model.TextModel);
|
|
4697
4654
|
};
|
|
@@ -4791,8 +4748,8 @@ var ClientServicesHost = class ClientServicesHost2 {
|
|
|
4791
4748
|
* Can only be called once.
|
|
4792
4749
|
*/
|
|
4793
4750
|
initialize({ config, ...options }) {
|
|
4794
|
-
(0,
|
|
4795
|
-
F:
|
|
4751
|
+
(0, import_invariant15.invariant)(!this._open, "service host is open", {
|
|
4752
|
+
F: __dxlog_file17,
|
|
4796
4753
|
L: 201,
|
|
4797
4754
|
S: this,
|
|
4798
4755
|
A: [
|
|
@@ -4801,14 +4758,14 @@ var ClientServicesHost = class ClientServicesHost2 {
|
|
|
4801
4758
|
]
|
|
4802
4759
|
});
|
|
4803
4760
|
(0, import_log16.log)("initializing...", void 0, {
|
|
4804
|
-
F:
|
|
4761
|
+
F: __dxlog_file17,
|
|
4805
4762
|
L: 202,
|
|
4806
4763
|
S: this,
|
|
4807
4764
|
C: (f, a) => f(...a)
|
|
4808
4765
|
});
|
|
4809
4766
|
if (config) {
|
|
4810
|
-
(0,
|
|
4811
|
-
F:
|
|
4767
|
+
(0, import_invariant15.invariant)(!this._config, "config already set", {
|
|
4768
|
+
F: __dxlog_file17,
|
|
4812
4769
|
L: 205,
|
|
4813
4770
|
S: this,
|
|
4814
4771
|
A: [
|
|
@@ -4825,8 +4782,8 @@ var ClientServicesHost = class ClientServicesHost2 {
|
|
|
4825
4782
|
iceServers: this._config?.get("runtime.services.ice")
|
|
4826
4783
|
}), signalManager = new import_messaging.WebsocketSignalManager(this._config?.get("runtime.services.signaling") ?? []) } = options;
|
|
4827
4784
|
this._signalManager = signalManager;
|
|
4828
|
-
(0,
|
|
4829
|
-
F:
|
|
4785
|
+
(0, import_invariant15.invariant)(!this._networkManager, "network manager already set", {
|
|
4786
|
+
F: __dxlog_file17,
|
|
4830
4787
|
L: 221,
|
|
4831
4788
|
S: this,
|
|
4832
4789
|
A: [
|
|
@@ -4840,7 +4797,7 @@ var ClientServicesHost = class ClientServicesHost2 {
|
|
|
4840
4797
|
signalManager
|
|
4841
4798
|
});
|
|
4842
4799
|
(0, import_log16.log)("initialized", void 0, {
|
|
4843
|
-
F:
|
|
4800
|
+
F: __dxlog_file17,
|
|
4844
4801
|
L: 228,
|
|
4845
4802
|
S: this,
|
|
4846
4803
|
C: (f, a) => f(...a)
|
|
@@ -4854,13 +4811,13 @@ var ClientServicesHost = class ClientServicesHost2 {
|
|
|
4854
4811
|
import_log16.log.trace("dxos.client-services.host.open", import_protocols12.trace.begin({
|
|
4855
4812
|
id: traceId
|
|
4856
4813
|
}), {
|
|
4857
|
-
F:
|
|
4814
|
+
F: __dxlog_file17,
|
|
4858
4815
|
L: 239,
|
|
4859
4816
|
S: this,
|
|
4860
4817
|
C: (f, a) => f(...a)
|
|
4861
4818
|
});
|
|
4862
|
-
(0,
|
|
4863
|
-
F:
|
|
4819
|
+
(0, import_invariant15.invariant)(this._config, "config not set", {
|
|
4820
|
+
F: __dxlog_file17,
|
|
4864
4821
|
L: 241,
|
|
4865
4822
|
S: this,
|
|
4866
4823
|
A: [
|
|
@@ -4868,8 +4825,8 @@ var ClientServicesHost = class ClientServicesHost2 {
|
|
|
4868
4825
|
"'config not set'"
|
|
4869
4826
|
]
|
|
4870
4827
|
});
|
|
4871
|
-
(0,
|
|
4872
|
-
F:
|
|
4828
|
+
(0, import_invariant15.invariant)(this._storage, "storage not set", {
|
|
4829
|
+
F: __dxlog_file17,
|
|
4873
4830
|
L: 242,
|
|
4874
4831
|
S: this,
|
|
4875
4832
|
A: [
|
|
@@ -4877,8 +4834,8 @@ var ClientServicesHost = class ClientServicesHost2 {
|
|
|
4877
4834
|
"'storage not set'"
|
|
4878
4835
|
]
|
|
4879
4836
|
});
|
|
4880
|
-
(0,
|
|
4881
|
-
F:
|
|
4837
|
+
(0, import_invariant15.invariant)(this._signalManager, "signal manager not set", {
|
|
4838
|
+
F: __dxlog_file17,
|
|
4882
4839
|
L: 243,
|
|
4883
4840
|
S: this,
|
|
4884
4841
|
A: [
|
|
@@ -4886,8 +4843,8 @@ var ClientServicesHost = class ClientServicesHost2 {
|
|
|
4886
4843
|
"'signal manager not set'"
|
|
4887
4844
|
]
|
|
4888
4845
|
});
|
|
4889
|
-
(0,
|
|
4890
|
-
F:
|
|
4846
|
+
(0, import_invariant15.invariant)(this._networkManager, "network manager not set", {
|
|
4847
|
+
F: __dxlog_file17,
|
|
4891
4848
|
L: 244,
|
|
4892
4849
|
S: this,
|
|
4893
4850
|
A: [
|
|
@@ -4899,7 +4856,7 @@ var ClientServicesHost = class ClientServicesHost2 {
|
|
|
4899
4856
|
(0, import_log16.log)("opening...", {
|
|
4900
4857
|
lockKey: this._resourceLock?.lockKey
|
|
4901
4858
|
}, {
|
|
4902
|
-
F:
|
|
4859
|
+
F: __dxlog_file17,
|
|
4903
4860
|
L: 247,
|
|
4904
4861
|
S: this,
|
|
4905
4862
|
C: (f, a) => f(...a)
|
|
@@ -4945,7 +4902,7 @@ var ClientServicesHost = class ClientServicesHost2 {
|
|
|
4945
4902
|
(0, import_log16.log)("opened", {
|
|
4946
4903
|
deviceKey
|
|
4947
4904
|
}, {
|
|
4948
|
-
F:
|
|
4905
|
+
F: __dxlog_file17,
|
|
4949
4906
|
L: 316,
|
|
4950
4907
|
S: this,
|
|
4951
4908
|
C: (f, a) => f(...a)
|
|
@@ -4953,7 +4910,7 @@ var ClientServicesHost = class ClientServicesHost2 {
|
|
|
4953
4910
|
import_log16.log.trace("dxos.client-services.host.open", import_protocols12.trace.end({
|
|
4954
4911
|
id: traceId
|
|
4955
4912
|
}), {
|
|
4956
|
-
F:
|
|
4913
|
+
F: __dxlog_file17,
|
|
4957
4914
|
L: 317,
|
|
4958
4915
|
S: this,
|
|
4959
4916
|
C: (f, a) => f(...a)
|
|
@@ -4967,7 +4924,7 @@ var ClientServicesHost = class ClientServicesHost2 {
|
|
|
4967
4924
|
(0, import_log16.log)("closing...", {
|
|
4968
4925
|
deviceKey
|
|
4969
4926
|
}, {
|
|
4970
|
-
F:
|
|
4927
|
+
F: __dxlog_file17,
|
|
4971
4928
|
L: 328,
|
|
4972
4929
|
S: this,
|
|
4973
4930
|
C: (f, a) => f(...a)
|
|
@@ -4983,7 +4940,7 @@ var ClientServicesHost = class ClientServicesHost2 {
|
|
|
4983
4940
|
(0, import_log16.log)("closed", {
|
|
4984
4941
|
deviceKey
|
|
4985
4942
|
}, {
|
|
4986
|
-
F:
|
|
4943
|
+
F: __dxlog_file17,
|
|
4987
4944
|
L: 335,
|
|
4988
4945
|
S: this,
|
|
4989
4946
|
C: (f, a) => f(...a)
|
|
@@ -4994,13 +4951,13 @@ var ClientServicesHost = class ClientServicesHost2 {
|
|
|
4994
4951
|
import_log16.log.trace("dxos.sdk.client-services-host.reset", import_protocols12.trace.begin({
|
|
4995
4952
|
id: traceId
|
|
4996
4953
|
}), {
|
|
4997
|
-
F:
|
|
4954
|
+
F: __dxlog_file17,
|
|
4998
4955
|
L: 340,
|
|
4999
4956
|
S: this,
|
|
5000
4957
|
C: (f, a) => f(...a)
|
|
5001
4958
|
});
|
|
5002
4959
|
(0, import_log16.log)("resetting...", void 0, {
|
|
5003
|
-
F:
|
|
4960
|
+
F: __dxlog_file17,
|
|
5004
4961
|
L: 342,
|
|
5005
4962
|
S: this,
|
|
5006
4963
|
C: (f, a) => f(...a)
|
|
@@ -5008,7 +4965,7 @@ var ClientServicesHost = class ClientServicesHost2 {
|
|
|
5008
4965
|
await this._serviceContext?.close();
|
|
5009
4966
|
await this._storage.reset();
|
|
5010
4967
|
(0, import_log16.log)("reset", void 0, {
|
|
5011
|
-
F:
|
|
4968
|
+
F: __dxlog_file17,
|
|
5012
4969
|
L: 345,
|
|
5013
4970
|
S: this,
|
|
5014
4971
|
C: (f, a) => f(...a)
|
|
@@ -5016,7 +4973,7 @@ var ClientServicesHost = class ClientServicesHost2 {
|
|
|
5016
4973
|
import_log16.log.trace("dxos.sdk.client-services-host.reset", import_protocols12.trace.end({
|
|
5017
4974
|
id: traceId
|
|
5018
4975
|
}), {
|
|
5019
|
-
F:
|
|
4976
|
+
F: __dxlog_file17,
|
|
5020
4977
|
L: 346,
|
|
5021
4978
|
S: this,
|
|
5022
4979
|
C: (f, a) => f(...a)
|
|
@@ -5073,10 +5030,10 @@ var import_util11 = require("@dxos/util");
|
|
|
5073
5030
|
// packages/sdk/client-services/src/packlets/vault/shell-runtime.ts
|
|
5074
5031
|
var import_async18 = require("@dxos/async");
|
|
5075
5032
|
var import_client_protocol6 = require("@dxos/client-protocol");
|
|
5076
|
-
var
|
|
5033
|
+
var import_invariant16 = require("@dxos/invariant");
|
|
5077
5034
|
var import_iframe = require("@dxos/protocols/proto/dxos/iframe");
|
|
5078
5035
|
var import_rpc2 = require("@dxos/rpc");
|
|
5079
|
-
var
|
|
5036
|
+
var __dxlog_file18 = "/home/runner/work/dxos/dxos/packages/sdk/client-services/src/packlets/vault/shell-runtime.ts";
|
|
5080
5037
|
var ShellRuntimeImpl = class {
|
|
5081
5038
|
constructor(_port) {
|
|
5082
5039
|
this._port = _port;
|
|
@@ -5103,8 +5060,8 @@ var ShellRuntimeImpl = class {
|
|
|
5103
5060
|
});
|
|
5104
5061
|
}
|
|
5105
5062
|
async setAppContext(context) {
|
|
5106
|
-
(0,
|
|
5107
|
-
F:
|
|
5063
|
+
(0, import_invariant16.invariant)(this._appRpc, "runtime not open", {
|
|
5064
|
+
F: __dxlog_file18,
|
|
5108
5065
|
L: 44,
|
|
5109
5066
|
S: this,
|
|
5110
5067
|
A: [
|
|
@@ -5149,7 +5106,7 @@ function _ts_decorate8(decorators, target, key, desc) {
|
|
|
5149
5106
|
r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5150
5107
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
5151
5108
|
}
|
|
5152
|
-
var
|
|
5109
|
+
var __dxlog_file19 = "/home/runner/work/dxos/dxos/packages/sdk/client-services/src/packlets/vault/iframe-host-runtime.ts";
|
|
5153
5110
|
var LOCK_KEY = "DXOS_RESOURCE_LOCK";
|
|
5154
5111
|
var IFrameHostRuntime = class {
|
|
5155
5112
|
constructor({ config, origin, appPort, shellPort }) {
|
|
@@ -5170,7 +5127,7 @@ var IFrameHostRuntime = class {
|
|
|
5170
5127
|
}
|
|
5171
5128
|
async start() {
|
|
5172
5129
|
(0, import_log17.log)("starting...", void 0, {
|
|
5173
|
-
F:
|
|
5130
|
+
F: __dxlog_file19,
|
|
5174
5131
|
L: 71,
|
|
5175
5132
|
S: this,
|
|
5176
5133
|
C: (f, a) => f(...a)
|
|
@@ -5219,7 +5176,7 @@ var IFrameHostRuntime = class {
|
|
|
5219
5176
|
]);
|
|
5220
5177
|
this._ready.wake(void 0);
|
|
5221
5178
|
(0, import_log17.log)("started", void 0, {
|
|
5222
|
-
F:
|
|
5179
|
+
F: __dxlog_file19,
|
|
5223
5180
|
L: 114,
|
|
5224
5181
|
S: this,
|
|
5225
5182
|
C: (f, a) => f(...a)
|
|
@@ -5227,7 +5184,7 @@ var IFrameHostRuntime = class {
|
|
|
5227
5184
|
} catch (err) {
|
|
5228
5185
|
this._ready.wake(err);
|
|
5229
5186
|
import_log17.log.catch(err, void 0, {
|
|
5230
|
-
F:
|
|
5187
|
+
F: __dxlog_file19,
|
|
5231
5188
|
L: 117,
|
|
5232
5189
|
S: this,
|
|
5233
5190
|
C: (f, a) => f(...a)
|
|
@@ -5236,7 +5193,7 @@ var IFrameHostRuntime = class {
|
|
|
5236
5193
|
}
|
|
5237
5194
|
async stop() {
|
|
5238
5195
|
(0, import_log17.log)("stopping...", void 0, {
|
|
5239
|
-
F:
|
|
5196
|
+
F: __dxlog_file19,
|
|
5240
5197
|
L: 122,
|
|
5241
5198
|
S: this,
|
|
5242
5199
|
C: (f, a) => f(...a)
|
|
@@ -5245,7 +5202,7 @@ var IFrameHostRuntime = class {
|
|
|
5245
5202
|
await this._clientServices.close();
|
|
5246
5203
|
await this._shellRuntime?.close();
|
|
5247
5204
|
(0, import_log17.log)("stopped", void 0, {
|
|
5248
|
-
F:
|
|
5205
|
+
F: __dxlog_file19,
|
|
5249
5206
|
L: 126,
|
|
5250
5207
|
S: this,
|
|
5251
5208
|
C: (f, a) => f(...a)
|
|
@@ -5264,7 +5221,7 @@ var import_network_manager4 = require("@dxos/network-manager");
|
|
|
5264
5221
|
var import_protocols13 = require("@dxos/protocols");
|
|
5265
5222
|
var import_rpc3 = require("@dxos/rpc");
|
|
5266
5223
|
var import_util12 = require("@dxos/util");
|
|
5267
|
-
var
|
|
5224
|
+
var __dxlog_file20 = "/home/runner/work/dxos/dxos/packages/sdk/client-services/src/packlets/vault/iframe-proxy-runtime.ts";
|
|
5268
5225
|
var IFrameProxyRuntime = class {
|
|
5269
5226
|
constructor({ config, systemPort, shellPort }) {
|
|
5270
5227
|
this._id = String(Math.floor(Math.random() * 1e6));
|
|
@@ -5312,8 +5269,8 @@ var IFrameProxyRuntime = class {
|
|
|
5312
5269
|
});
|
|
5313
5270
|
} catch (err) {
|
|
5314
5271
|
import_log18.log.catch(err, void 0, {
|
|
5315
|
-
F:
|
|
5316
|
-
L:
|
|
5272
|
+
F: __dxlog_file20,
|
|
5273
|
+
L: 90,
|
|
5317
5274
|
S: this,
|
|
5318
5275
|
C: (f, a) => f(...a)
|
|
5319
5276
|
});
|
|
@@ -5342,7 +5299,7 @@ var import_network_manager5 = require("@dxos/network-manager");
|
|
|
5342
5299
|
// packages/sdk/client-services/src/packlets/vault/worker-session.ts
|
|
5343
5300
|
var import_async21 = require("@dxos/async");
|
|
5344
5301
|
var import_client_protocol9 = require("@dxos/client-protocol");
|
|
5345
|
-
var
|
|
5302
|
+
var import_invariant17 = require("@dxos/invariant");
|
|
5346
5303
|
var import_log19 = require("@dxos/log");
|
|
5347
5304
|
var import_rpc4 = require("@dxos/rpc");
|
|
5348
5305
|
var import_util13 = require("@dxos/util");
|
|
@@ -5356,13 +5313,13 @@ function _ts_decorate9(decorators, target, key, desc) {
|
|
|
5356
5313
|
r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5357
5314
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
5358
5315
|
}
|
|
5359
|
-
var
|
|
5316
|
+
var __dxlog_file21 = "/home/runner/work/dxos/dxos/packages/sdk/client-services/src/packlets/vault/worker-session.ts";
|
|
5360
5317
|
var WorkerSession = class {
|
|
5361
5318
|
constructor({ serviceHost, systemPort, appPort, shellPort, readySignal }) {
|
|
5362
5319
|
this._startTrigger = new import_async21.Trigger();
|
|
5363
5320
|
this.onClose = new import_util13.Callback();
|
|
5364
|
-
(0,
|
|
5365
|
-
F:
|
|
5321
|
+
(0, import_invariant17.invariant)(serviceHost, void 0, {
|
|
5322
|
+
F: __dxlog_file21,
|
|
5366
5323
|
L: 49,
|
|
5367
5324
|
S: this,
|
|
5368
5325
|
A: [
|
|
@@ -5417,7 +5374,7 @@ var WorkerSession = class {
|
|
|
5417
5374
|
await this.close();
|
|
5418
5375
|
} catch (err) {
|
|
5419
5376
|
import_log19.log.catch(err, void 0, {
|
|
5420
|
-
F:
|
|
5377
|
+
F: __dxlog_file21,
|
|
5421
5378
|
L: 99,
|
|
5422
5379
|
S: this,
|
|
5423
5380
|
C: (f, a) => f(...a)
|
|
@@ -5434,7 +5391,7 @@ var WorkerSession = class {
|
|
|
5434
5391
|
}
|
|
5435
5392
|
async open() {
|
|
5436
5393
|
import_log19.log.info("opening...", void 0, {
|
|
5437
|
-
F:
|
|
5394
|
+
F: __dxlog_file21,
|
|
5438
5395
|
L: 113,
|
|
5439
5396
|
S: this,
|
|
5440
5397
|
C: (f, a) => f(...a)
|
|
@@ -5451,7 +5408,7 @@ var WorkerSession = class {
|
|
|
5451
5408
|
void this._afterLockReleases(this.lockKey, () => this.close());
|
|
5452
5409
|
}
|
|
5453
5410
|
import_log19.log.info("opened", void 0, {
|
|
5454
|
-
F:
|
|
5411
|
+
F: __dxlog_file21,
|
|
5455
5412
|
L: 124,
|
|
5456
5413
|
S: this,
|
|
5457
5414
|
C: (f, a) => f(...a)
|
|
@@ -5459,7 +5416,7 @@ var WorkerSession = class {
|
|
|
5459
5416
|
}
|
|
5460
5417
|
async close() {
|
|
5461
5418
|
import_log19.log.info("closing...", void 0, {
|
|
5462
|
-
F:
|
|
5419
|
+
F: __dxlog_file21,
|
|
5463
5420
|
L: 128,
|
|
5464
5421
|
S: this,
|
|
5465
5422
|
C: (f, a) => f(...a)
|
|
@@ -5468,7 +5425,7 @@ var WorkerSession = class {
|
|
|
5468
5425
|
await this.onClose.callIfSet();
|
|
5469
5426
|
} catch (err) {
|
|
5470
5427
|
import_log19.log.catch(err, void 0, {
|
|
5471
|
-
F:
|
|
5428
|
+
F: __dxlog_file21,
|
|
5472
5429
|
L: 132,
|
|
5473
5430
|
S: this,
|
|
5474
5431
|
C: (f, a) => f(...a)
|
|
@@ -5479,7 +5436,7 @@ var WorkerSession = class {
|
|
|
5479
5436
|
this._iframeRpc.close()
|
|
5480
5437
|
]);
|
|
5481
5438
|
import_log19.log.info("closed", void 0, {
|
|
5482
|
-
F:
|
|
5439
|
+
F: __dxlog_file21,
|
|
5483
5440
|
L: 136,
|
|
5484
5441
|
S: this,
|
|
5485
5442
|
C: (f, a) => f(...a)
|
|
@@ -5490,7 +5447,7 @@ var WorkerSession = class {
|
|
|
5490
5447
|
await (0, import_async21.asyncTimeout)(this._shellClientRpc.open(), 1e3);
|
|
5491
5448
|
} catch {
|
|
5492
5449
|
import_log19.log.info("No shell connected.", void 0, {
|
|
5493
|
-
F:
|
|
5450
|
+
F: __dxlog_file21,
|
|
5494
5451
|
L: 143,
|
|
5495
5452
|
S: this,
|
|
5496
5453
|
C: (f, a) => f(...a)
|
|
@@ -5510,7 +5467,7 @@ _ts_decorate9([
|
|
|
5510
5467
|
], WorkerSession.prototype, "lockKey", void 0);
|
|
5511
5468
|
|
|
5512
5469
|
// packages/sdk/client-services/src/packlets/vault/worker-runtime.ts
|
|
5513
|
-
var
|
|
5470
|
+
var __dxlog_file22 = "/home/runner/work/dxos/dxos/packages/sdk/client-services/src/packlets/vault/worker-runtime.ts";
|
|
5514
5471
|
var WorkerRuntime = class {
|
|
5515
5472
|
constructor(_configProvider) {
|
|
5516
5473
|
this._configProvider = _configProvider;
|
|
@@ -5530,7 +5487,7 @@ var WorkerRuntime = class {
|
|
|
5530
5487
|
}
|
|
5531
5488
|
async start() {
|
|
5532
5489
|
(0, import_log20.log)("starting...", void 0, {
|
|
5533
|
-
F:
|
|
5490
|
+
F: __dxlog_file22,
|
|
5534
5491
|
L: 52,
|
|
5535
5492
|
S: this,
|
|
5536
5493
|
C: (f, a) => f(...a)
|
|
@@ -5546,7 +5503,7 @@ var WorkerRuntime = class {
|
|
|
5546
5503
|
await this._clientServices.open(new import_context12.Context());
|
|
5547
5504
|
this._ready.wake(void 0);
|
|
5548
5505
|
(0, import_log20.log)("started", void 0, {
|
|
5549
|
-
F:
|
|
5506
|
+
F: __dxlog_file22,
|
|
5550
5507
|
L: 66,
|
|
5551
5508
|
S: this,
|
|
5552
5509
|
C: (f, a) => f(...a)
|
|
@@ -5554,7 +5511,7 @@ var WorkerRuntime = class {
|
|
|
5554
5511
|
} catch (err) {
|
|
5555
5512
|
this._ready.wake(err);
|
|
5556
5513
|
import_log20.log.error("starting", err, {
|
|
5557
|
-
F:
|
|
5514
|
+
F: __dxlog_file22,
|
|
5558
5515
|
L: 69,
|
|
5559
5516
|
S: this,
|
|
5560
5517
|
C: (f, a) => f(...a)
|
|
@@ -5588,7 +5545,7 @@ var WorkerRuntime = class {
|
|
|
5588
5545
|
*/
|
|
5589
5546
|
_reconnectWebrtc() {
|
|
5590
5547
|
(0, import_log20.log)("reconnecting webrtc...", void 0, {
|
|
5591
|
-
F:
|
|
5548
|
+
F: __dxlog_file22,
|
|
5592
5549
|
L: 106,
|
|
5593
5550
|
S: this,
|
|
5594
5551
|
C: (f, a) => f(...a)
|