@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
|
@@ -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/packlets/testing/index.ts
|
|
@@ -52,7 +62,7 @@ var createMockCredential = async ({ signer, issuer }) => (0, import_credentials.
|
|
|
52
62
|
|
|
53
63
|
// packages/sdk/client-services/src/packlets/testing/invitation-utils.ts
|
|
54
64
|
var import_async18 = require("@dxos/async");
|
|
55
|
-
var
|
|
65
|
+
var import_invariant16 = require("@dxos/invariant");
|
|
56
66
|
var import_services15 = require("@dxos/protocols/proto/dxos/client/services");
|
|
57
67
|
|
|
58
68
|
// packages/sdk/client-services/src/packlets/services/client-rpc-server.ts
|
|
@@ -87,10 +97,10 @@ var getPlatform = () => {
|
|
|
87
97
|
};
|
|
88
98
|
}
|
|
89
99
|
} else {
|
|
90
|
-
const { platform, version, arch } = process;
|
|
100
|
+
const { platform: platform2, version, arch } = process;
|
|
91
101
|
return {
|
|
92
102
|
type: "node",
|
|
93
|
-
platform: `${
|
|
103
|
+
platform: `${platform2} ${version} ${arch}`,
|
|
94
104
|
runtime: process.version,
|
|
95
105
|
uptime: Math.floor(process.uptime()),
|
|
96
106
|
memory: process.memoryUsage()
|
|
@@ -99,7 +109,7 @@ var getPlatform = () => {
|
|
|
99
109
|
};
|
|
100
110
|
|
|
101
111
|
// packages/sdk/client-services/src/version.ts
|
|
102
|
-
var DXOS_VERSION = "0.3.2-main.
|
|
112
|
+
var DXOS_VERSION = "0.3.2-main.e5374ab";
|
|
103
113
|
|
|
104
114
|
// packages/sdk/client-services/src/packlets/services/diagnostics.ts
|
|
105
115
|
var __dxlog_file = "/home/runner/work/dxos/dxos/packages/sdk/client-services/src/packlets/services/diagnostics.ts";
|
|
@@ -385,7 +395,7 @@ var Identity = class Identity2 {
|
|
|
385
395
|
deviceKey
|
|
386
396
|
}, {
|
|
387
397
|
F: __dxlog_file3,
|
|
388
|
-
L:
|
|
398
|
+
L: 64,
|
|
389
399
|
S: this,
|
|
390
400
|
C: (f, a) => f(...a)
|
|
391
401
|
});
|
|
@@ -457,7 +467,7 @@ var Identity = class Identity2 {
|
|
|
457
467
|
getIdentityCredentialSigner() {
|
|
458
468
|
(0, import_invariant2.invariant)(this._deviceStateMachine.deviceCredentialChain, "Device credential chain is not ready.", {
|
|
459
469
|
F: __dxlog_file3,
|
|
460
|
-
L:
|
|
470
|
+
L: 145,
|
|
461
471
|
S: this,
|
|
462
472
|
A: [
|
|
463
473
|
"this._deviceStateMachine.deviceCredentialChain",
|
|
@@ -481,7 +491,7 @@ var Identity = class Identity2 {
|
|
|
481
491
|
dataFeedKey
|
|
482
492
|
}, {
|
|
483
493
|
F: __dxlog_file3,
|
|
484
|
-
L:
|
|
494
|
+
L: 161,
|
|
485
495
|
S: this,
|
|
486
496
|
C: (f, a) => f(...a)
|
|
487
497
|
});
|
|
@@ -533,6 +543,7 @@ Identity = _ts_decorate([
|
|
|
533
543
|
], Identity);
|
|
534
544
|
|
|
535
545
|
// packages/sdk/client-services/src/packlets/identity/identity-manager.ts
|
|
546
|
+
var import_platform2 = __toESM(require("platform"));
|
|
536
547
|
var import_async3 = require("@dxos/async");
|
|
537
548
|
var import_context2 = require("@dxos/context");
|
|
538
549
|
var import_credentials6 = require("@dxos/credentials");
|
|
@@ -574,7 +585,7 @@ var IdentityManager = class IdentityManager2 {
|
|
|
574
585
|
id: traceId
|
|
575
586
|
}), {
|
|
576
587
|
F: __dxlog_file4,
|
|
577
|
-
L:
|
|
588
|
+
L: 75,
|
|
578
589
|
S: this,
|
|
579
590
|
C: (f, a) => f(...a)
|
|
580
591
|
});
|
|
@@ -583,7 +594,7 @@ var IdentityManager = class IdentityManager2 {
|
|
|
583
594
|
identityRecord
|
|
584
595
|
}, {
|
|
585
596
|
F: __dxlog_file4,
|
|
586
|
-
L:
|
|
597
|
+
L: 78,
|
|
587
598
|
S: this,
|
|
588
599
|
C: (f, a) => f(...a)
|
|
589
600
|
});
|
|
@@ -596,7 +607,7 @@ var IdentityManager = class IdentityManager2 {
|
|
|
596
607
|
displayName: this._identity.profileDocument?.displayName
|
|
597
608
|
}, {
|
|
598
609
|
F: __dxlog_file4,
|
|
599
|
-
L:
|
|
610
|
+
L: 83,
|
|
600
611
|
S: this,
|
|
601
612
|
C: (f, a) => f(...a)
|
|
602
613
|
});
|
|
@@ -606,7 +617,7 @@ var IdentityManager = class IdentityManager2 {
|
|
|
606
617
|
id: traceId
|
|
607
618
|
}), {
|
|
608
619
|
F: __dxlog_file4,
|
|
609
|
-
L:
|
|
620
|
+
L: 89,
|
|
610
621
|
S: this,
|
|
611
622
|
C: (f, a) => f(...a)
|
|
612
623
|
});
|
|
@@ -617,7 +628,7 @@ var IdentityManager = class IdentityManager2 {
|
|
|
617
628
|
async createIdentity({ displayName } = {}) {
|
|
618
629
|
(0, import_invariant3.invariant)(!this._identity, "Identity already exists.", {
|
|
619
630
|
F: __dxlog_file4,
|
|
620
|
-
L:
|
|
631
|
+
L: 97,
|
|
621
632
|
S: this,
|
|
622
633
|
A: [
|
|
623
634
|
"!this._identity",
|
|
@@ -626,7 +637,7 @@ var IdentityManager = class IdentityManager2 {
|
|
|
626
637
|
});
|
|
627
638
|
(0, import_log4.log)("creating identity...", void 0, {
|
|
628
639
|
F: __dxlog_file4,
|
|
629
|
-
L:
|
|
640
|
+
L: 98,
|
|
630
641
|
S: this,
|
|
631
642
|
C: (f, a) => f(...a)
|
|
632
643
|
});
|
|
@@ -647,7 +658,7 @@ var IdentityManager = class IdentityManager2 {
|
|
|
647
658
|
const generator = new import_credentials6.CredentialGenerator(this._keyring, identityRecord.identityKey, identityRecord.deviceKey);
|
|
648
659
|
(0, import_invariant3.invariant)(identityRecord.haloSpace.genesisFeedKey, "Genesis feed key is required.", {
|
|
649
660
|
F: __dxlog_file4,
|
|
650
|
-
L:
|
|
661
|
+
L: 117,
|
|
651
662
|
S: this,
|
|
652
663
|
A: [
|
|
653
664
|
"identityRecord.haloSpace.genesisFeedKey",
|
|
@@ -656,7 +667,7 @@ var IdentityManager = class IdentityManager2 {
|
|
|
656
667
|
});
|
|
657
668
|
(0, import_invariant3.invariant)(identityRecord.haloSpace.dataFeedKey, "Data feed key is required.", {
|
|
658
669
|
F: __dxlog_file4,
|
|
659
|
-
L:
|
|
670
|
+
L: 118,
|
|
660
671
|
S: this,
|
|
661
672
|
A: [
|
|
662
673
|
"identityRecord.haloSpace.dataFeedKey",
|
|
@@ -675,6 +686,13 @@ var IdentityManager = class IdentityManager2 {
|
|
|
675
686
|
}));
|
|
676
687
|
}
|
|
677
688
|
credentials.push(await generator.createDeviceAuthorization(identityRecord.deviceKey));
|
|
689
|
+
credentials.push(await generator.createDeviceProfile({
|
|
690
|
+
platform: import_platform2.default.name,
|
|
691
|
+
platformVersion: import_platform2.default.version,
|
|
692
|
+
architecture: typeof import_platform2.default.os?.architecture === "number" ? String(import_platform2.default.os.architecture) : void 0,
|
|
693
|
+
os: import_platform2.default.os?.family,
|
|
694
|
+
osVersion: import_platform2.default.os?.version
|
|
695
|
+
}));
|
|
678
696
|
for (const credential of credentials) {
|
|
679
697
|
await identity.controlPipeline.writer.write({
|
|
680
698
|
credential: {
|
|
@@ -691,7 +709,7 @@ var IdentityManager = class IdentityManager2 {
|
|
|
691
709
|
displayName: this._identity.profileDocument?.displayName
|
|
692
710
|
}, {
|
|
693
711
|
F: __dxlog_file4,
|
|
694
|
-
L:
|
|
712
|
+
L: 163,
|
|
695
713
|
S: this,
|
|
696
714
|
C: (f, a) => f(...a)
|
|
697
715
|
});
|
|
@@ -701,7 +719,7 @@ var IdentityManager = class IdentityManager2 {
|
|
|
701
719
|
deviceKey: identity.deviceKey
|
|
702
720
|
}, {
|
|
703
721
|
F: __dxlog_file4,
|
|
704
|
-
L:
|
|
722
|
+
L: 169,
|
|
705
723
|
S: this,
|
|
706
724
|
C: (f, a) => f(...a)
|
|
707
725
|
});
|
|
@@ -715,13 +733,13 @@ var IdentityManager = class IdentityManager2 {
|
|
|
715
733
|
params
|
|
716
734
|
}, {
|
|
717
735
|
F: __dxlog_file4,
|
|
718
|
-
L:
|
|
736
|
+
L: 177,
|
|
719
737
|
S: this,
|
|
720
738
|
C: (f, a) => f(...a)
|
|
721
739
|
});
|
|
722
740
|
(0, import_invariant3.invariant)(!this._identity, "Identity already exists.", {
|
|
723
741
|
F: __dxlog_file4,
|
|
724
|
-
L:
|
|
742
|
+
L: 178,
|
|
725
743
|
S: this,
|
|
726
744
|
A: [
|
|
727
745
|
"!this._identity",
|
|
@@ -749,7 +767,7 @@ var IdentityManager = class IdentityManager2 {
|
|
|
749
767
|
displayName: this._identity.profileDocument?.displayName
|
|
750
768
|
}, {
|
|
751
769
|
F: __dxlog_file4,
|
|
752
|
-
L:
|
|
770
|
+
L: 197,
|
|
753
771
|
S: this,
|
|
754
772
|
C: (f, a) => f(...a)
|
|
755
773
|
});
|
|
@@ -759,7 +777,7 @@ var IdentityManager = class IdentityManager2 {
|
|
|
759
777
|
deviceKey: identity.deviceKey
|
|
760
778
|
}, {
|
|
761
779
|
F: __dxlog_file4,
|
|
762
|
-
L:
|
|
780
|
+
L: 203,
|
|
763
781
|
S: this,
|
|
764
782
|
C: (f, a) => f(...a)
|
|
765
783
|
});
|
|
@@ -771,7 +789,7 @@ var IdentityManager = class IdentityManager2 {
|
|
|
771
789
|
async updateProfile(profile) {
|
|
772
790
|
(0, import_invariant3.invariant)(this._identity, "Identity not initialized.", {
|
|
773
791
|
F: __dxlog_file4,
|
|
774
|
-
L:
|
|
792
|
+
L: 211,
|
|
775
793
|
S: this,
|
|
776
794
|
A: [
|
|
777
795
|
"this._identity",
|
|
@@ -799,51 +817,10 @@ var IdentityManager = class IdentityManager2 {
|
|
|
799
817
|
this.stateUpdate.emit();
|
|
800
818
|
return profile;
|
|
801
819
|
}
|
|
802
|
-
async updateDevice({ deviceKey, profile }) {
|
|
803
|
-
(0, import_invariant3.invariant)(this._identity, "Identity not initialized.", {
|
|
804
|
-
F: __dxlog_file4,
|
|
805
|
-
L: 216,
|
|
806
|
-
S: this,
|
|
807
|
-
A: [
|
|
808
|
-
"this._identity",
|
|
809
|
-
"'Identity not initialized.'"
|
|
810
|
-
]
|
|
811
|
-
});
|
|
812
|
-
(0, import_invariant3.invariant)(this._identity.authorizedDeviceKeys.has(deviceKey), "Device not authorized.", {
|
|
813
|
-
F: __dxlog_file4,
|
|
814
|
-
L: 218,
|
|
815
|
-
S: this,
|
|
816
|
-
A: [
|
|
817
|
-
"this._identity.authorizedDeviceKeys.has(deviceKey)",
|
|
818
|
-
"'Device not authorized.'"
|
|
819
|
-
]
|
|
820
|
-
});
|
|
821
|
-
const credential = await this._identity.getIdentityCredentialSigner().createCredential({
|
|
822
|
-
subject: this._identity.identityKey,
|
|
823
|
-
assertion: {
|
|
824
|
-
"@type": "dxos.halo.credentials.DeviceProfile",
|
|
825
|
-
deviceKey,
|
|
826
|
-
profile
|
|
827
|
-
}
|
|
828
|
-
});
|
|
829
|
-
const receipt = await this._identity.controlPipeline.writer.write({
|
|
830
|
-
credential: {
|
|
831
|
-
credential
|
|
832
|
-
}
|
|
833
|
-
});
|
|
834
|
-
await this._identity.controlPipeline.state.waitUntilTimeframe(new import_timeframe.Timeframe([
|
|
835
|
-
[
|
|
836
|
-
receipt.feedKey,
|
|
837
|
-
receipt.seq
|
|
838
|
-
]
|
|
839
|
-
]));
|
|
840
|
-
this.stateUpdate.emit();
|
|
841
|
-
return profile;
|
|
842
|
-
}
|
|
843
820
|
async _constructIdentity(identityRecord) {
|
|
844
821
|
(0, import_invariant3.invariant)(!this._identity, void 0, {
|
|
845
822
|
F: __dxlog_file4,
|
|
846
|
-
L:
|
|
823
|
+
L: 228,
|
|
847
824
|
S: this,
|
|
848
825
|
A: [
|
|
849
826
|
"!this._identity",
|
|
@@ -854,13 +831,13 @@ var IdentityManager = class IdentityManager2 {
|
|
|
854
831
|
identityRecord
|
|
855
832
|
}, {
|
|
856
833
|
F: __dxlog_file4,
|
|
857
|
-
L:
|
|
834
|
+
L: 229,
|
|
858
835
|
S: this,
|
|
859
836
|
C: (f, a) => f(...a)
|
|
860
837
|
});
|
|
861
838
|
(0, import_invariant3.invariant)(identityRecord.haloSpace.controlFeedKey, void 0, {
|
|
862
839
|
F: __dxlog_file4,
|
|
863
|
-
L:
|
|
840
|
+
L: 232,
|
|
864
841
|
S: this,
|
|
865
842
|
A: [
|
|
866
843
|
"identityRecord.haloSpace.controlFeedKey",
|
|
@@ -872,7 +849,7 @@ var IdentityManager = class IdentityManager2 {
|
|
|
872
849
|
});
|
|
873
850
|
(0, import_invariant3.invariant)(identityRecord.haloSpace.dataFeedKey, void 0, {
|
|
874
851
|
F: __dxlog_file4,
|
|
875
|
-
L:
|
|
852
|
+
L: 236,
|
|
876
853
|
S: this,
|
|
877
854
|
A: [
|
|
878
855
|
"identityRecord.haloSpace.dataFeedKey",
|
|
@@ -904,7 +881,7 @@ var IdentityManager = class IdentityManager2 {
|
|
|
904
881
|
identityKey: identityRecord.identityKey
|
|
905
882
|
}, {
|
|
906
883
|
F: __dxlog_file4,
|
|
907
|
-
L:
|
|
884
|
+
L: 260,
|
|
908
885
|
S: this,
|
|
909
886
|
C: (f, a) => f(...a)
|
|
910
887
|
});
|
|
@@ -925,7 +902,7 @@ var IdentityManager = class IdentityManager2 {
|
|
|
925
902
|
onAuthFailure: () => {
|
|
926
903
|
import_log4.log.warn("auth failure", void 0, {
|
|
927
904
|
F: __dxlog_file4,
|
|
928
|
-
L:
|
|
905
|
+
L: 279,
|
|
929
906
|
S: this,
|
|
930
907
|
C: (f, a) => f(...a)
|
|
931
908
|
});
|
|
@@ -1035,7 +1012,7 @@ var DeviceInvitationProtocol = class {
|
|
|
1035
1012
|
async admit(request) {
|
|
1036
1013
|
(0, import_invariant5.invariant)(request.device, void 0, {
|
|
1037
1014
|
F: __dxlog_file6,
|
|
1038
|
-
L:
|
|
1015
|
+
L: 35,
|
|
1039
1016
|
S: this,
|
|
1040
1017
|
A: [
|
|
1041
1018
|
"request.device",
|
|
@@ -1071,7 +1048,7 @@ var DeviceInvitationProtocol = class {
|
|
|
1071
1048
|
async accept(response, request) {
|
|
1072
1049
|
(0, import_invariant5.invariant)(response.device, void 0, {
|
|
1073
1050
|
F: __dxlog_file6,
|
|
1074
|
-
L:
|
|
1051
|
+
L: 68,
|
|
1075
1052
|
S: this,
|
|
1076
1053
|
A: [
|
|
1077
1054
|
"response.device",
|
|
@@ -1081,7 +1058,7 @@ var DeviceInvitationProtocol = class {
|
|
|
1081
1058
|
const { identityKey, haloSpaceKey, genesisFeedKey, controlTimeframe } = response.device;
|
|
1082
1059
|
(0, import_invariant5.invariant)(request.device, void 0, {
|
|
1083
1060
|
F: __dxlog_file6,
|
|
1084
|
-
L:
|
|
1061
|
+
L: 71,
|
|
1085
1062
|
S: this,
|
|
1086
1063
|
A: [
|
|
1087
1064
|
"request.device",
|
|
@@ -1471,7 +1448,7 @@ var InvitationsHandler = class {
|
|
|
1471
1448
|
const authCode = options?.authCode ?? (authMethod === import_services4.Invitation.AuthMethod.SHARED_SECRET ? (0, import_credentials9.generatePasscode)(import_client_protocol2.AUTHENTICATION_CODE_LENGTH) : void 0);
|
|
1472
1449
|
(0, import_invariant7.invariant)(protocol, void 0, {
|
|
1473
1450
|
F: __dxlog_file8,
|
|
1474
|
-
L:
|
|
1451
|
+
L: 80,
|
|
1475
1452
|
S: this,
|
|
1476
1453
|
A: [
|
|
1477
1454
|
"protocol",
|
|
@@ -1500,7 +1477,7 @@ var InvitationsHandler = class {
|
|
|
1500
1477
|
...protocol.toJSON()
|
|
1501
1478
|
}, {
|
|
1502
1479
|
F: __dxlog_file8,
|
|
1503
|
-
L:
|
|
1480
|
+
L: 102,
|
|
1504
1481
|
S: this,
|
|
1505
1482
|
C: (f, a) => f(...a)
|
|
1506
1483
|
});
|
|
@@ -1525,7 +1502,7 @@ var InvitationsHandler = class {
|
|
|
1525
1502
|
const deviceKey = admissionRequest.device?.deviceKey ?? admissionRequest.space?.deviceKey;
|
|
1526
1503
|
(0, import_invariant7.invariant)(deviceKey, void 0, {
|
|
1527
1504
|
F: __dxlog_file8,
|
|
1528
|
-
L:
|
|
1505
|
+
L: 123,
|
|
1529
1506
|
S: this,
|
|
1530
1507
|
A: [
|
|
1531
1508
|
"deviceKey",
|
|
@@ -1548,7 +1525,7 @@ var InvitationsHandler = class {
|
|
|
1548
1525
|
id: traceId
|
|
1549
1526
|
}), {
|
|
1550
1527
|
F: __dxlog_file8,
|
|
1551
|
-
L:
|
|
1528
|
+
L: 141,
|
|
1552
1529
|
S: this,
|
|
1553
1530
|
C: (f, a) => f(...a)
|
|
1554
1531
|
});
|
|
@@ -1556,7 +1533,7 @@ var InvitationsHandler = class {
|
|
|
1556
1533
|
...protocol.toJSON()
|
|
1557
1534
|
}, {
|
|
1558
1535
|
F: __dxlog_file8,
|
|
1559
|
-
L:
|
|
1536
|
+
L: 142,
|
|
1560
1537
|
S: this,
|
|
1561
1538
|
C: (f, a) => f(...a)
|
|
1562
1539
|
});
|
|
@@ -1572,7 +1549,7 @@ var InvitationsHandler = class {
|
|
|
1572
1549
|
...protocol.toJSON()
|
|
1573
1550
|
}, {
|
|
1574
1551
|
F: __dxlog_file8,
|
|
1575
|
-
L:
|
|
1552
|
+
L: 145,
|
|
1576
1553
|
S: this,
|
|
1577
1554
|
C: (f, a) => f(...a)
|
|
1578
1555
|
});
|
|
@@ -1584,7 +1561,7 @@ var InvitationsHandler = class {
|
|
|
1584
1561
|
id: traceId
|
|
1585
1562
|
}), {
|
|
1586
1563
|
F: __dxlog_file8,
|
|
1587
|
-
L:
|
|
1564
|
+
L: 147,
|
|
1588
1565
|
S: this,
|
|
1589
1566
|
C: (f, a) => f(...a)
|
|
1590
1567
|
});
|
|
@@ -1594,7 +1571,7 @@ var InvitationsHandler = class {
|
|
|
1594
1571
|
...protocol.toJSON()
|
|
1595
1572
|
}, {
|
|
1596
1573
|
F: __dxlog_file8,
|
|
1597
|
-
L:
|
|
1574
|
+
L: 150,
|
|
1598
1575
|
S: this,
|
|
1599
1576
|
C: (f, a) => f(...a)
|
|
1600
1577
|
});
|
|
@@ -1605,7 +1582,7 @@ var InvitationsHandler = class {
|
|
|
1605
1582
|
} else {
|
|
1606
1583
|
import_log6.log.error("failed", err, {
|
|
1607
1584
|
F: __dxlog_file8,
|
|
1608
|
-
L:
|
|
1585
|
+
L: 153,
|
|
1609
1586
|
S: this,
|
|
1610
1587
|
C: (f, a) => f(...a)
|
|
1611
1588
|
});
|
|
@@ -1616,7 +1593,7 @@ var InvitationsHandler = class {
|
|
|
1616
1593
|
error: err
|
|
1617
1594
|
}), {
|
|
1618
1595
|
F: __dxlog_file8,
|
|
1619
|
-
L:
|
|
1596
|
+
L: 156,
|
|
1620
1597
|
S: this,
|
|
1621
1598
|
C: (f, a) => f(...a)
|
|
1622
1599
|
});
|
|
@@ -1637,7 +1614,7 @@ var InvitationsHandler = class {
|
|
|
1637
1614
|
...protocol.toJSON()
|
|
1638
1615
|
}, {
|
|
1639
1616
|
F: __dxlog_file8,
|
|
1640
|
-
L:
|
|
1617
|
+
L: 171,
|
|
1641
1618
|
S: this,
|
|
1642
1619
|
C: (f, a) => f(...a)
|
|
1643
1620
|
});
|
|
@@ -1648,7 +1625,7 @@ var InvitationsHandler = class {
|
|
|
1648
1625
|
} else {
|
|
1649
1626
|
import_log6.log.error("failed", err, {
|
|
1650
1627
|
F: __dxlog_file8,
|
|
1651
|
-
L:
|
|
1628
|
+
L: 174,
|
|
1652
1629
|
S: this,
|
|
1653
1630
|
C: (f, a) => f(...a)
|
|
1654
1631
|
});
|
|
@@ -1693,7 +1670,7 @@ var InvitationsHandler = class {
|
|
|
1693
1670
|
const { timeout = import_client_protocol2.INVITATION_TIMEOUT } = invitation;
|
|
1694
1671
|
(0, import_invariant7.invariant)(protocol, void 0, {
|
|
1695
1672
|
F: __dxlog_file8,
|
|
1696
|
-
L:
|
|
1673
|
+
L: 215,
|
|
1697
1674
|
S: this,
|
|
1698
1675
|
A: [
|
|
1699
1676
|
"protocol",
|
|
@@ -1707,7 +1684,7 @@ var InvitationsHandler = class {
|
|
|
1707
1684
|
const setState = (newData) => {
|
|
1708
1685
|
(0, import_invariant7.invariant)(newData.state !== void 0, void 0, {
|
|
1709
1686
|
F: __dxlog_file8,
|
|
1710
|
-
L:
|
|
1687
|
+
L: 226,
|
|
1711
1688
|
S: this,
|
|
1712
1689
|
A: [
|
|
1713
1690
|
"newData.state !== undefined",
|
|
@@ -1727,7 +1704,7 @@ var InvitationsHandler = class {
|
|
|
1727
1704
|
...protocol.toJSON()
|
|
1728
1705
|
}, {
|
|
1729
1706
|
F: __dxlog_file8,
|
|
1730
|
-
L:
|
|
1707
|
+
L: 234,
|
|
1731
1708
|
S: this,
|
|
1732
1709
|
C: (f, a) => f(...a)
|
|
1733
1710
|
});
|
|
@@ -1737,7 +1714,7 @@ var InvitationsHandler = class {
|
|
|
1737
1714
|
} else {
|
|
1738
1715
|
import_log6.log.warn("auth failed", err, {
|
|
1739
1716
|
F: __dxlog_file8,
|
|
1740
|
-
L:
|
|
1717
|
+
L: 237,
|
|
1741
1718
|
S: this,
|
|
1742
1719
|
C: (f, a) => f(...a)
|
|
1743
1720
|
});
|
|
@@ -1751,7 +1728,7 @@ var InvitationsHandler = class {
|
|
|
1751
1728
|
...protocol.toJSON()
|
|
1752
1729
|
}, {
|
|
1753
1730
|
F: __dxlog_file8,
|
|
1754
|
-
L:
|
|
1731
|
+
L: 245,
|
|
1755
1732
|
S: this,
|
|
1756
1733
|
C: (f, a) => f(...a)
|
|
1757
1734
|
});
|
|
@@ -1766,7 +1743,7 @@ var InvitationsHandler = class {
|
|
|
1766
1743
|
currentState
|
|
1767
1744
|
}, {
|
|
1768
1745
|
F: __dxlog_file8,
|
|
1769
|
-
L:
|
|
1746
|
+
L: 255,
|
|
1770
1747
|
S: this,
|
|
1771
1748
|
C: (f, a) => f(...a)
|
|
1772
1749
|
});
|
|
@@ -1781,7 +1758,7 @@ var InvitationsHandler = class {
|
|
|
1781
1758
|
id: traceId
|
|
1782
1759
|
}), {
|
|
1783
1760
|
F: __dxlog_file8,
|
|
1784
|
-
L:
|
|
1761
|
+
L: 264,
|
|
1785
1762
|
S: this,
|
|
1786
1763
|
C: (f, a) => f(...a)
|
|
1787
1764
|
});
|
|
@@ -1793,7 +1770,7 @@ var InvitationsHandler = class {
|
|
|
1793
1770
|
...protocol.toJSON()
|
|
1794
1771
|
}, {
|
|
1795
1772
|
F: __dxlog_file8,
|
|
1796
|
-
L:
|
|
1773
|
+
L: 272,
|
|
1797
1774
|
S: this,
|
|
1798
1775
|
C: (f, a) => f(...a)
|
|
1799
1776
|
});
|
|
@@ -1804,7 +1781,7 @@ var InvitationsHandler = class {
|
|
|
1804
1781
|
...protocol.toJSON()
|
|
1805
1782
|
}, {
|
|
1806
1783
|
F: __dxlog_file8,
|
|
1807
|
-
L:
|
|
1784
|
+
L: 276,
|
|
1808
1785
|
S: this,
|
|
1809
1786
|
C: (f, a) => f(...a)
|
|
1810
1787
|
});
|
|
@@ -1814,7 +1791,7 @@ var InvitationsHandler = class {
|
|
|
1814
1791
|
response: introductionResponse
|
|
1815
1792
|
}, {
|
|
1816
1793
|
F: __dxlog_file8,
|
|
1817
|
-
L:
|
|
1794
|
+
L: 280,
|
|
1818
1795
|
S: this,
|
|
1819
1796
|
C: (f, a) => f(...a)
|
|
1820
1797
|
});
|
|
@@ -1826,7 +1803,7 @@ var InvitationsHandler = class {
|
|
|
1826
1803
|
for (let attempt = 1; attempt <= MAX_OTP_ATTEMPTS; attempt++) {
|
|
1827
1804
|
(0, import_log6.log)("guest waiting for authentication code...", void 0, {
|
|
1828
1805
|
F: __dxlog_file8,
|
|
1829
|
-
L:
|
|
1806
|
+
L: 289,
|
|
1830
1807
|
S: this,
|
|
1831
1808
|
C: (f, a) => f(...a)
|
|
1832
1809
|
});
|
|
@@ -1838,7 +1815,7 @@ var InvitationsHandler = class {
|
|
|
1838
1815
|
});
|
|
1839
1816
|
(0, import_log6.log)("sending authentication request", void 0, {
|
|
1840
1817
|
F: __dxlog_file8,
|
|
1841
|
-
L:
|
|
1818
|
+
L: 293,
|
|
1842
1819
|
S: this,
|
|
1843
1820
|
C: (f, a) => f(...a)
|
|
1844
1821
|
});
|
|
@@ -1859,7 +1836,7 @@ var InvitationsHandler = class {
|
|
|
1859
1836
|
attempt
|
|
1860
1837
|
}, {
|
|
1861
1838
|
F: __dxlog_file8,
|
|
1862
|
-
L:
|
|
1839
|
+
L: 304,
|
|
1863
1840
|
S: this,
|
|
1864
1841
|
C: (f, a) => f(...a)
|
|
1865
1842
|
});
|
|
@@ -1876,7 +1853,7 @@ var InvitationsHandler = class {
|
|
|
1876
1853
|
...protocol.toJSON()
|
|
1877
1854
|
}, {
|
|
1878
1855
|
F: __dxlog_file8,
|
|
1879
|
-
L:
|
|
1856
|
+
L: 315,
|
|
1880
1857
|
S: this,
|
|
1881
1858
|
C: (f, a) => f(...a)
|
|
1882
1859
|
});
|
|
@@ -1888,7 +1865,7 @@ var InvitationsHandler = class {
|
|
|
1888
1865
|
...protocol.toJSON()
|
|
1889
1866
|
}, {
|
|
1890
1867
|
F: __dxlog_file8,
|
|
1891
|
-
L:
|
|
1868
|
+
L: 326,
|
|
1892
1869
|
S: this,
|
|
1893
1870
|
C: (f, a) => f(...a)
|
|
1894
1871
|
});
|
|
@@ -1900,7 +1877,7 @@ var InvitationsHandler = class {
|
|
|
1900
1877
|
id: traceId
|
|
1901
1878
|
}), {
|
|
1902
1879
|
F: __dxlog_file8,
|
|
1903
|
-
L:
|
|
1880
|
+
L: 328,
|
|
1904
1881
|
S: this,
|
|
1905
1882
|
C: (f, a) => f(...a)
|
|
1906
1883
|
});
|
|
@@ -1910,7 +1887,7 @@ var InvitationsHandler = class {
|
|
|
1910
1887
|
...protocol.toJSON()
|
|
1911
1888
|
}, {
|
|
1912
1889
|
F: __dxlog_file8,
|
|
1913
|
-
L:
|
|
1890
|
+
L: 331,
|
|
1914
1891
|
S: this,
|
|
1915
1892
|
C: (f, a) => f(...a)
|
|
1916
1893
|
});
|
|
@@ -1920,7 +1897,7 @@ var InvitationsHandler = class {
|
|
|
1920
1897
|
} else {
|
|
1921
1898
|
(0, import_log6.log)("auth failed", err, {
|
|
1922
1899
|
F: __dxlog_file8,
|
|
1923
|
-
L:
|
|
1900
|
+
L: 334,
|
|
1924
1901
|
S: this,
|
|
1925
1902
|
C: (f, a) => f(...a)
|
|
1926
1903
|
});
|
|
@@ -1931,7 +1908,7 @@ var InvitationsHandler = class {
|
|
|
1931
1908
|
error: err
|
|
1932
1909
|
}), {
|
|
1933
1910
|
F: __dxlog_file8,
|
|
1934
|
-
L:
|
|
1911
|
+
L: 337,
|
|
1935
1912
|
S: this,
|
|
1936
1913
|
C: (f, a) => f(...a)
|
|
1937
1914
|
});
|
|
@@ -1949,7 +1926,7 @@ var InvitationsHandler = class {
|
|
|
1949
1926
|
...protocol.toJSON()
|
|
1950
1927
|
}, {
|
|
1951
1928
|
F: __dxlog_file8,
|
|
1952
|
-
L:
|
|
1929
|
+
L: 348,
|
|
1953
1930
|
S: this,
|
|
1954
1931
|
C: (f, a) => f(...a)
|
|
1955
1932
|
});
|
|
@@ -1959,7 +1936,7 @@ var InvitationsHandler = class {
|
|
|
1959
1936
|
} else {
|
|
1960
1937
|
(0, import_log6.log)("auth failed", err, {
|
|
1961
1938
|
F: __dxlog_file8,
|
|
1962
|
-
L:
|
|
1939
|
+
L: 351,
|
|
1963
1940
|
S: this,
|
|
1964
1941
|
C: (f, a) => f(...a)
|
|
1965
1942
|
});
|
|
@@ -1972,7 +1949,7 @@ var InvitationsHandler = class {
|
|
|
1972
1949
|
(0, import_async5.scheduleTask)(ctx, async () => {
|
|
1973
1950
|
(0, import_invariant7.invariant)(invitation.swarmKey, void 0, {
|
|
1974
1951
|
F: __dxlog_file8,
|
|
1975
|
-
L:
|
|
1952
|
+
L: 361,
|
|
1976
1953
|
S: this,
|
|
1977
1954
|
A: [
|
|
1978
1955
|
"invitation.swarmKey",
|
|
@@ -2222,7 +2199,7 @@ var SpaceInvitationProtocol = class {
|
|
|
2222
2199
|
async admit(request, guestProfile) {
|
|
2223
2200
|
(0, import_invariant9.invariant)(this._spaceKey, void 0, {
|
|
2224
2201
|
F: __dxlog_file10,
|
|
2225
|
-
L:
|
|
2202
|
+
L: 46,
|
|
2226
2203
|
S: this,
|
|
2227
2204
|
A: [
|
|
2228
2205
|
"this._spaceKey",
|
|
@@ -2232,7 +2209,7 @@ var SpaceInvitationProtocol = class {
|
|
|
2232
2209
|
const space = await this._spaceManager.spaces.get(this._spaceKey);
|
|
2233
2210
|
(0, import_invariant9.invariant)(space, void 0, {
|
|
2234
2211
|
F: __dxlog_file10,
|
|
2235
|
-
L:
|
|
2212
|
+
L: 48,
|
|
2236
2213
|
S: this,
|
|
2237
2214
|
A: [
|
|
2238
2215
|
"space",
|
|
@@ -2241,7 +2218,7 @@ var SpaceInvitationProtocol = class {
|
|
|
2241
2218
|
});
|
|
2242
2219
|
(0, import_invariant9.invariant)(request.space, void 0, {
|
|
2243
2220
|
F: __dxlog_file10,
|
|
2244
|
-
L:
|
|
2221
|
+
L: 50,
|
|
2245
2222
|
S: this,
|
|
2246
2223
|
A: [
|
|
2247
2224
|
"request.space",
|
|
@@ -2254,14 +2231,14 @@ var SpaceInvitationProtocol = class {
|
|
|
2254
2231
|
guest: deviceKey
|
|
2255
2232
|
}, {
|
|
2256
2233
|
F: __dxlog_file10,
|
|
2257
|
-
L:
|
|
2234
|
+
L: 53,
|
|
2258
2235
|
S: this,
|
|
2259
2236
|
C: (f, a) => f(...a)
|
|
2260
2237
|
});
|
|
2261
2238
|
const credentials = await (0, import_credentials10.createAdmissionCredentials)(this._signingContext.credentialSigner, identityKey, space.key, space.inner.genesisFeedKey, guestProfile);
|
|
2262
2239
|
(0, import_invariant9.invariant)(credentials[0].credential, void 0, {
|
|
2263
2240
|
F: __dxlog_file10,
|
|
2264
|
-
L:
|
|
2241
|
+
L: 64,
|
|
2265
2242
|
S: this,
|
|
2266
2243
|
A: [
|
|
2267
2244
|
"credentials[0].credential",
|
|
@@ -2271,7 +2248,7 @@ var SpaceInvitationProtocol = class {
|
|
|
2271
2248
|
const spaceMemberCredential = credentials[0].credential.credential;
|
|
2272
2249
|
(0, import_invariant9.invariant)((0, import_credentials10.getCredentialAssertion)(spaceMemberCredential)["@type"] === "dxos.halo.credentials.SpaceMember", void 0, {
|
|
2273
2250
|
F: __dxlog_file10,
|
|
2274
|
-
L:
|
|
2251
|
+
L: 66,
|
|
2275
2252
|
S: this,
|
|
2276
2253
|
A: [
|
|
2277
2254
|
"getCredentialAssertion(spaceMemberCredential)['@type'] === 'dxos.halo.credentials.SpaceMember'",
|
|
@@ -2307,7 +2284,7 @@ var SpaceInvitationProtocol = class {
|
|
|
2307
2284
|
async accept(response) {
|
|
2308
2285
|
(0, import_invariant9.invariant)(response.space, void 0, {
|
|
2309
2286
|
F: __dxlog_file10,
|
|
2310
|
-
L:
|
|
2287
|
+
L: 101,
|
|
2311
2288
|
S: this,
|
|
2312
2289
|
A: [
|
|
2313
2290
|
"response.space",
|
|
@@ -2318,7 +2295,7 @@ var SpaceInvitationProtocol = class {
|
|
|
2318
2295
|
const assertion = (0, import_credentials10.getCredentialAssertion)(credential);
|
|
2319
2296
|
(0, import_invariant9.invariant)(assertion["@type"] === "dxos.halo.credentials.SpaceMember", "Invalid credential", {
|
|
2320
2297
|
F: __dxlog_file10,
|
|
2321
|
-
L:
|
|
2298
|
+
L: 104,
|
|
2322
2299
|
S: this,
|
|
2323
2300
|
A: [
|
|
2324
2301
|
"assertion['@type'] === 'dxos.halo.credentials.SpaceMember'",
|
|
@@ -2327,7 +2304,7 @@ var SpaceInvitationProtocol = class {
|
|
|
2327
2304
|
});
|
|
2328
2305
|
(0, import_invariant9.invariant)(credential.subject.id.equals(this._signingContext.identityKey), void 0, {
|
|
2329
2306
|
F: __dxlog_file10,
|
|
2330
|
-
L:
|
|
2307
|
+
L: 105,
|
|
2331
2308
|
S: this,
|
|
2332
2309
|
A: [
|
|
2333
2310
|
"credential.subject.id.equals(this._signingContext.identityKey)",
|
|
@@ -3880,7 +3857,7 @@ var import_context10 = require("@dxos/context");
|
|
|
3880
3857
|
var import_document_model2 = require("@dxos/document-model");
|
|
3881
3858
|
var import_echo_pipeline3 = require("@dxos/echo-pipeline");
|
|
3882
3859
|
var import_echo_schema = require("@dxos/echo-schema");
|
|
3883
|
-
var
|
|
3860
|
+
var import_invariant15 = require("@dxos/invariant");
|
|
3884
3861
|
var import_keys13 = require("@dxos/keys");
|
|
3885
3862
|
var import_log16 = require("@dxos/log");
|
|
3886
3863
|
var import_messaging = require("@dxos/messaging");
|
|
@@ -3919,33 +3896,13 @@ var ServiceRegistry = class {
|
|
|
3919
3896
|
// packages/sdk/client-services/src/packlets/devices/devices-service.ts
|
|
3920
3897
|
var import_async12 = require("@dxos/async");
|
|
3921
3898
|
var import_codec_protobuf6 = require("@dxos/codec-protobuf");
|
|
3922
|
-
var import_invariant14 = require("@dxos/invariant");
|
|
3923
3899
|
var import_services11 = require("@dxos/protocols/proto/dxos/client/services");
|
|
3924
|
-
var __dxlog_file16 = "/home/runner/work/dxos/dxos/packages/sdk/client-services/src/packlets/devices/devices-service.ts";
|
|
3925
3900
|
var DevicesServiceImpl = class {
|
|
3926
3901
|
constructor(_identityManager) {
|
|
3927
3902
|
this._identityManager = _identityManager;
|
|
3928
3903
|
}
|
|
3929
3904
|
async updateDevice(profile) {
|
|
3930
|
-
|
|
3931
|
-
F: __dxlog_file16,
|
|
3932
|
-
L: 17,
|
|
3933
|
-
S: this,
|
|
3934
|
-
A: [
|
|
3935
|
-
"this._identityManager.identity",
|
|
3936
|
-
"'Identity not initialized'"
|
|
3937
|
-
]
|
|
3938
|
-
});
|
|
3939
|
-
const deviceKey = this._identityManager.identity.deviceKey;
|
|
3940
|
-
await this._identityManager.updateDevice({
|
|
3941
|
-
deviceKey,
|
|
3942
|
-
profile
|
|
3943
|
-
});
|
|
3944
|
-
return {
|
|
3945
|
-
deviceKey,
|
|
3946
|
-
kind: import_services11.DeviceKind.CURRENT,
|
|
3947
|
-
profile
|
|
3948
|
-
};
|
|
3905
|
+
throw new Error("Method not implemented.");
|
|
3949
3906
|
}
|
|
3950
3907
|
queryDevices() {
|
|
3951
3908
|
return new import_codec_protobuf6.Stream(({ next }) => {
|
|
@@ -4289,7 +4246,7 @@ var DevtoolsServiceImpl = class {
|
|
|
4289
4246
|
};
|
|
4290
4247
|
|
|
4291
4248
|
// packages/sdk/client-services/src/packlets/locks/node.ts
|
|
4292
|
-
var
|
|
4249
|
+
var import_invariant14 = require("@dxos/invariant");
|
|
4293
4250
|
var import_lock_file = require("@dxos/lock-file");
|
|
4294
4251
|
var import_log14 = require("@dxos/log");
|
|
4295
4252
|
function _ts_decorate6(decorators, target, key, desc) {
|
|
@@ -4302,7 +4259,7 @@ function _ts_decorate6(decorators, target, key, desc) {
|
|
|
4302
4259
|
r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
4303
4260
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
4304
4261
|
}
|
|
4305
|
-
var
|
|
4262
|
+
var __dxlog_file16 = "/home/runner/work/dxos/dxos/packages/sdk/client-services/src/packlets/locks/node.ts";
|
|
4306
4263
|
var Lock = class {
|
|
4307
4264
|
constructor({ lockKey: lockPath, onAcquire, onRelease }) {
|
|
4308
4265
|
this._lockPath = lockPath;
|
|
@@ -4314,7 +4271,7 @@ var Lock = class {
|
|
|
4314
4271
|
}
|
|
4315
4272
|
async acquire() {
|
|
4316
4273
|
(0, import_log14.log)("acquiring lock...", void 0, {
|
|
4317
|
-
F:
|
|
4274
|
+
F: __dxlog_file16,
|
|
4318
4275
|
L: 32,
|
|
4319
4276
|
S: this,
|
|
4320
4277
|
C: (f, a) => f(...a)
|
|
@@ -4322,7 +4279,7 @@ var Lock = class {
|
|
|
4322
4279
|
this._fileHandle = await import_lock_file.LockFile.acquire(this._lockPath);
|
|
4323
4280
|
await this._onAcquire?.();
|
|
4324
4281
|
(0, import_log14.log)("acquired lock", void 0, {
|
|
4325
|
-
F:
|
|
4282
|
+
F: __dxlog_file16,
|
|
4326
4283
|
L: 37,
|
|
4327
4284
|
S: this,
|
|
4328
4285
|
C: (f, a) => f(...a)
|
|
@@ -4330,8 +4287,8 @@ var Lock = class {
|
|
|
4330
4287
|
}
|
|
4331
4288
|
async release() {
|
|
4332
4289
|
await this._onRelease?.();
|
|
4333
|
-
(0,
|
|
4334
|
-
F:
|
|
4290
|
+
(0, import_invariant14.invariant)(this._fileHandle, "Lock is not acquired", {
|
|
4291
|
+
F: __dxlog_file16,
|
|
4335
4292
|
L: 42,
|
|
4336
4293
|
S: this,
|
|
4337
4294
|
A: [
|
|
@@ -4609,7 +4566,7 @@ function _ts_decorate7(decorators, target, key, desc) {
|
|
|
4609
4566
|
r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
4610
4567
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
4611
4568
|
}
|
|
4612
|
-
var
|
|
4569
|
+
var __dxlog_file17 = "/home/runner/work/dxos/dxos/packages/sdk/client-services/src/packlets/services/service-host.ts";
|
|
4613
4570
|
var createDefaultModelFactory = () => {
|
|
4614
4571
|
return new import_model_factory.ModelFactory().registerModel(import_document_model2.DocumentModel).registerModel(import_text_model.TextModel);
|
|
4615
4572
|
};
|
|
@@ -4709,8 +4666,8 @@ var ClientServicesHost = class ClientServicesHost2 {
|
|
|
4709
4666
|
* Can only be called once.
|
|
4710
4667
|
*/
|
|
4711
4668
|
initialize({ config, ...options }) {
|
|
4712
|
-
(0,
|
|
4713
|
-
F:
|
|
4669
|
+
(0, import_invariant15.invariant)(!this._open, "service host is open", {
|
|
4670
|
+
F: __dxlog_file17,
|
|
4714
4671
|
L: 201,
|
|
4715
4672
|
S: this,
|
|
4716
4673
|
A: [
|
|
@@ -4719,14 +4676,14 @@ var ClientServicesHost = class ClientServicesHost2 {
|
|
|
4719
4676
|
]
|
|
4720
4677
|
});
|
|
4721
4678
|
(0, import_log16.log)("initializing...", void 0, {
|
|
4722
|
-
F:
|
|
4679
|
+
F: __dxlog_file17,
|
|
4723
4680
|
L: 202,
|
|
4724
4681
|
S: this,
|
|
4725
4682
|
C: (f, a) => f(...a)
|
|
4726
4683
|
});
|
|
4727
4684
|
if (config) {
|
|
4728
|
-
(0,
|
|
4729
|
-
F:
|
|
4685
|
+
(0, import_invariant15.invariant)(!this._config, "config already set", {
|
|
4686
|
+
F: __dxlog_file17,
|
|
4730
4687
|
L: 205,
|
|
4731
4688
|
S: this,
|
|
4732
4689
|
A: [
|
|
@@ -4743,8 +4700,8 @@ var ClientServicesHost = class ClientServicesHost2 {
|
|
|
4743
4700
|
iceServers: this._config?.get("runtime.services.ice")
|
|
4744
4701
|
}), signalManager = new import_messaging.WebsocketSignalManager(this._config?.get("runtime.services.signaling") ?? []) } = options;
|
|
4745
4702
|
this._signalManager = signalManager;
|
|
4746
|
-
(0,
|
|
4747
|
-
F:
|
|
4703
|
+
(0, import_invariant15.invariant)(!this._networkManager, "network manager already set", {
|
|
4704
|
+
F: __dxlog_file17,
|
|
4748
4705
|
L: 221,
|
|
4749
4706
|
S: this,
|
|
4750
4707
|
A: [
|
|
@@ -4758,7 +4715,7 @@ var ClientServicesHost = class ClientServicesHost2 {
|
|
|
4758
4715
|
signalManager
|
|
4759
4716
|
});
|
|
4760
4717
|
(0, import_log16.log)("initialized", void 0, {
|
|
4761
|
-
F:
|
|
4718
|
+
F: __dxlog_file17,
|
|
4762
4719
|
L: 228,
|
|
4763
4720
|
S: this,
|
|
4764
4721
|
C: (f, a) => f(...a)
|
|
@@ -4772,13 +4729,13 @@ var ClientServicesHost = class ClientServicesHost2 {
|
|
|
4772
4729
|
import_log16.log.trace("dxos.client-services.host.open", import_protocols12.trace.begin({
|
|
4773
4730
|
id: traceId
|
|
4774
4731
|
}), {
|
|
4775
|
-
F:
|
|
4732
|
+
F: __dxlog_file17,
|
|
4776
4733
|
L: 239,
|
|
4777
4734
|
S: this,
|
|
4778
4735
|
C: (f, a) => f(...a)
|
|
4779
4736
|
});
|
|
4780
|
-
(0,
|
|
4781
|
-
F:
|
|
4737
|
+
(0, import_invariant15.invariant)(this._config, "config not set", {
|
|
4738
|
+
F: __dxlog_file17,
|
|
4782
4739
|
L: 241,
|
|
4783
4740
|
S: this,
|
|
4784
4741
|
A: [
|
|
@@ -4786,8 +4743,8 @@ var ClientServicesHost = class ClientServicesHost2 {
|
|
|
4786
4743
|
"'config not set'"
|
|
4787
4744
|
]
|
|
4788
4745
|
});
|
|
4789
|
-
(0,
|
|
4790
|
-
F:
|
|
4746
|
+
(0, import_invariant15.invariant)(this._storage, "storage not set", {
|
|
4747
|
+
F: __dxlog_file17,
|
|
4791
4748
|
L: 242,
|
|
4792
4749
|
S: this,
|
|
4793
4750
|
A: [
|
|
@@ -4795,8 +4752,8 @@ var ClientServicesHost = class ClientServicesHost2 {
|
|
|
4795
4752
|
"'storage not set'"
|
|
4796
4753
|
]
|
|
4797
4754
|
});
|
|
4798
|
-
(0,
|
|
4799
|
-
F:
|
|
4755
|
+
(0, import_invariant15.invariant)(this._signalManager, "signal manager not set", {
|
|
4756
|
+
F: __dxlog_file17,
|
|
4800
4757
|
L: 243,
|
|
4801
4758
|
S: this,
|
|
4802
4759
|
A: [
|
|
@@ -4804,8 +4761,8 @@ var ClientServicesHost = class ClientServicesHost2 {
|
|
|
4804
4761
|
"'signal manager not set'"
|
|
4805
4762
|
]
|
|
4806
4763
|
});
|
|
4807
|
-
(0,
|
|
4808
|
-
F:
|
|
4764
|
+
(0, import_invariant15.invariant)(this._networkManager, "network manager not set", {
|
|
4765
|
+
F: __dxlog_file17,
|
|
4809
4766
|
L: 244,
|
|
4810
4767
|
S: this,
|
|
4811
4768
|
A: [
|
|
@@ -4817,7 +4774,7 @@ var ClientServicesHost = class ClientServicesHost2 {
|
|
|
4817
4774
|
(0, import_log16.log)("opening...", {
|
|
4818
4775
|
lockKey: this._resourceLock?.lockKey
|
|
4819
4776
|
}, {
|
|
4820
|
-
F:
|
|
4777
|
+
F: __dxlog_file17,
|
|
4821
4778
|
L: 247,
|
|
4822
4779
|
S: this,
|
|
4823
4780
|
C: (f, a) => f(...a)
|
|
@@ -4863,7 +4820,7 @@ var ClientServicesHost = class ClientServicesHost2 {
|
|
|
4863
4820
|
(0, import_log16.log)("opened", {
|
|
4864
4821
|
deviceKey
|
|
4865
4822
|
}, {
|
|
4866
|
-
F:
|
|
4823
|
+
F: __dxlog_file17,
|
|
4867
4824
|
L: 316,
|
|
4868
4825
|
S: this,
|
|
4869
4826
|
C: (f, a) => f(...a)
|
|
@@ -4871,7 +4828,7 @@ var ClientServicesHost = class ClientServicesHost2 {
|
|
|
4871
4828
|
import_log16.log.trace("dxos.client-services.host.open", import_protocols12.trace.end({
|
|
4872
4829
|
id: traceId
|
|
4873
4830
|
}), {
|
|
4874
|
-
F:
|
|
4831
|
+
F: __dxlog_file17,
|
|
4875
4832
|
L: 317,
|
|
4876
4833
|
S: this,
|
|
4877
4834
|
C: (f, a) => f(...a)
|
|
@@ -4885,7 +4842,7 @@ var ClientServicesHost = class ClientServicesHost2 {
|
|
|
4885
4842
|
(0, import_log16.log)("closing...", {
|
|
4886
4843
|
deviceKey
|
|
4887
4844
|
}, {
|
|
4888
|
-
F:
|
|
4845
|
+
F: __dxlog_file17,
|
|
4889
4846
|
L: 328,
|
|
4890
4847
|
S: this,
|
|
4891
4848
|
C: (f, a) => f(...a)
|
|
@@ -4901,7 +4858,7 @@ var ClientServicesHost = class ClientServicesHost2 {
|
|
|
4901
4858
|
(0, import_log16.log)("closed", {
|
|
4902
4859
|
deviceKey
|
|
4903
4860
|
}, {
|
|
4904
|
-
F:
|
|
4861
|
+
F: __dxlog_file17,
|
|
4905
4862
|
L: 335,
|
|
4906
4863
|
S: this,
|
|
4907
4864
|
C: (f, a) => f(...a)
|
|
@@ -4912,13 +4869,13 @@ var ClientServicesHost = class ClientServicesHost2 {
|
|
|
4912
4869
|
import_log16.log.trace("dxos.sdk.client-services-host.reset", import_protocols12.trace.begin({
|
|
4913
4870
|
id: traceId
|
|
4914
4871
|
}), {
|
|
4915
|
-
F:
|
|
4872
|
+
F: __dxlog_file17,
|
|
4916
4873
|
L: 340,
|
|
4917
4874
|
S: this,
|
|
4918
4875
|
C: (f, a) => f(...a)
|
|
4919
4876
|
});
|
|
4920
4877
|
(0, import_log16.log)("resetting...", void 0, {
|
|
4921
|
-
F:
|
|
4878
|
+
F: __dxlog_file17,
|
|
4922
4879
|
L: 342,
|
|
4923
4880
|
S: this,
|
|
4924
4881
|
C: (f, a) => f(...a)
|
|
@@ -4926,7 +4883,7 @@ var ClientServicesHost = class ClientServicesHost2 {
|
|
|
4926
4883
|
await this._serviceContext?.close();
|
|
4927
4884
|
await this._storage.reset();
|
|
4928
4885
|
(0, import_log16.log)("reset", void 0, {
|
|
4929
|
-
F:
|
|
4886
|
+
F: __dxlog_file17,
|
|
4930
4887
|
L: 345,
|
|
4931
4888
|
S: this,
|
|
4932
4889
|
C: (f, a) => f(...a)
|
|
@@ -4934,7 +4891,7 @@ var ClientServicesHost = class ClientServicesHost2 {
|
|
|
4934
4891
|
import_log16.log.trace("dxos.sdk.client-services-host.reset", import_protocols12.trace.end({
|
|
4935
4892
|
id: traceId
|
|
4936
4893
|
}), {
|
|
4937
|
-
F:
|
|
4894
|
+
F: __dxlog_file17,
|
|
4938
4895
|
L: 346,
|
|
4939
4896
|
S: this,
|
|
4940
4897
|
C: (f, a) => f(...a)
|
|
@@ -4980,7 +4937,7 @@ ClientServicesHost = _ts_decorate7([
|
|
|
4980
4937
|
], ClientServicesHost);
|
|
4981
4938
|
|
|
4982
4939
|
// packages/sdk/client-services/src/packlets/testing/invitation-utils.ts
|
|
4983
|
-
var
|
|
4940
|
+
var __dxlog_file18 = "/home/runner/work/dxos/dxos/packages/sdk/client-services/src/packlets/testing/invitation-utils.ts";
|
|
4984
4941
|
var sanitizeInvitation = (invitation) => {
|
|
4985
4942
|
return {
|
|
4986
4943
|
invitationId: invitation.invitationId,
|
|
@@ -5010,8 +4967,8 @@ var performInvitation = ({ host, guest, options, hooks }) => {
|
|
|
5010
4967
|
if (hooks?.guest?.onConnecting?.(guestObservable)) {
|
|
5011
4968
|
break;
|
|
5012
4969
|
}
|
|
5013
|
-
(0,
|
|
5014
|
-
F:
|
|
4970
|
+
(0, import_invariant16.invariant)(hostInvitation.swarmKey.equals(guestInvitation.swarmKey), void 0, {
|
|
4971
|
+
F: __dxlog_file18,
|
|
5015
4972
|
L: 84,
|
|
5016
4973
|
S: void 0,
|
|
5017
4974
|
A: [
|