@dxos/client-services 0.3.5-next.5910692 → 0.3.5
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-RZTCGO36.mjs → chunk-EC6QJ3VR.mjs} +111 -90
- package/dist/lib/browser/chunk-EC6QJ3VR.mjs.map +7 -0
- package/dist/lib/browser/index.mjs +6 -6
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/packlets/testing/index.mjs +4 -3
- package/dist/lib/browser/packlets/testing/index.mjs.map +3 -3
- package/dist/lib/node/index.cjs +115 -94
- 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 +113 -91
- package/dist/lib/node/packlets/testing/index.cjs.map +3 -3
- package/dist/types/src/packlets/identity/identity-service.d.ts +2 -1
- package/dist/types/src/packlets/identity/identity-service.d.ts.map +1 -1
- package/dist/types/src/packlets/invitations/invitation-extension.d.ts.map +1 -1
- package/dist/types/src/packlets/invitations/invitations-handler.d.ts.map +1 -1
- package/dist/types/src/packlets/services/service-context.d.ts +2 -0
- package/dist/types/src/packlets/services/service-context.d.ts.map +1 -1
- package/dist/types/src/packlets/services/service-host.d.ts.map +1 -1
- package/dist/types/src/packlets/spaces/data-space-manager.d.ts +1 -1
- package/dist/types/src/packlets/spaces/data-space-manager.d.ts.map +1 -1
- package/dist/types/src/packlets/spaces/data-space.d.ts +2 -0
- package/dist/types/src/packlets/spaces/data-space.d.ts.map +1 -1
- package/dist/types/src/packlets/testing/test-builder.d.ts.map +1 -1
- package/dist/types/src/version.d.ts +1 -1
- package/dist/types/src/version.d.ts.map +1 -1
- package/package.json +35 -35
- package/src/packlets/identity/identity-service.ts +2 -0
- package/src/packlets/invitations/invitation-extension.ts +0 -1
- package/src/packlets/invitations/invitations-handler.ts +0 -3
- package/src/packlets/invitations/space-invitation-protocol.ts +1 -1
- package/src/packlets/services/service-context.ts +12 -2
- package/src/packlets/services/service-host.ts +1 -0
- package/src/packlets/spaces/data-space-manager.ts +2 -1
- package/src/packlets/spaces/data-space.ts +13 -1
- package/src/packlets/spaces/genesis.ts +1 -1
- package/src/packlets/spaces/spaces-service.ts +1 -1
- package/src/packlets/testing/test-builder.ts +1 -0
- package/src/version.ts +5 -1
- package/dist/lib/browser/chunk-RZTCGO36.mjs.map +0 -7
package/dist/lib/node/index.cjs
CHANGED
|
@@ -413,7 +413,7 @@ var import_context2 = require("@dxos/context");
|
|
|
413
413
|
var import_credentials = require("@dxos/credentials");
|
|
414
414
|
var import_log = require("@dxos/log");
|
|
415
415
|
var import_protocols = require("@dxos/protocols");
|
|
416
|
-
var __dxlog_file = "/home/
|
|
416
|
+
var __dxlog_file = "/home/circleci/project/packages/sdk/client-services/src/packlets/identity/authenticator.ts";
|
|
417
417
|
var Credential = import_protocols.schema.getCodecForType("dxos.halo.credentials.Credential");
|
|
418
418
|
var createAuthProvider = (signer) => async (nonce) => {
|
|
419
419
|
const credential = await signer.createCredential({
|
|
@@ -544,7 +544,7 @@ function _ts_decorate(decorators, target, key, desc) {
|
|
|
544
544
|
r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
545
545
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
546
546
|
}
|
|
547
|
-
var __dxlog_file2 = "/home/
|
|
547
|
+
var __dxlog_file2 = "/home/circleci/project/packages/sdk/client-services/src/packlets/identity/identity.ts";
|
|
548
548
|
var Identity = class Identity2 {
|
|
549
549
|
constructor({ space, signer, identityKey, deviceKey }) {
|
|
550
550
|
this.stateUpdate = new import_async5.Event();
|
|
@@ -726,7 +726,7 @@ function _ts_decorate2(decorators, target, key, desc) {
|
|
|
726
726
|
r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
727
727
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
728
728
|
}
|
|
729
|
-
var __dxlog_file3 = "/home/
|
|
729
|
+
var __dxlog_file3 = "/home/circleci/project/packages/sdk/client-services/src/packlets/identity/identity-manager.ts";
|
|
730
730
|
var IdentityManager = class IdentityManager2 {
|
|
731
731
|
// TODO(burdon): IdentityManagerParams.
|
|
732
732
|
// TODO(dmaretskyi): Perhaps this should take/generate the peerKey outside of an initialized identity.
|
|
@@ -1086,12 +1086,13 @@ var import_codec_protobuf7 = require("@dxos/codec-protobuf");
|
|
|
1086
1086
|
var import_credentials6 = require("@dxos/credentials");
|
|
1087
1087
|
var import_debug2 = require("@dxos/debug");
|
|
1088
1088
|
var import_invariant3 = require("@dxos/invariant");
|
|
1089
|
-
var __dxlog_file4 = "/home/
|
|
1089
|
+
var __dxlog_file4 = "/home/circleci/project/packages/sdk/client-services/src/packlets/identity/identity-service.ts";
|
|
1090
1090
|
var IdentityServiceImpl = class {
|
|
1091
|
-
constructor(_createIdentity, _identityManager, _keyring) {
|
|
1091
|
+
constructor(_createIdentity, _identityManager, _keyring, _onProfileUpdate) {
|
|
1092
1092
|
this._createIdentity = _createIdentity;
|
|
1093
1093
|
this._identityManager = _identityManager;
|
|
1094
1094
|
this._keyring = _keyring;
|
|
1095
|
+
this._onProfileUpdate = _onProfileUpdate;
|
|
1095
1096
|
}
|
|
1096
1097
|
async createIdentity(request) {
|
|
1097
1098
|
await this._createIdentity(request);
|
|
@@ -1122,7 +1123,7 @@ var IdentityServiceImpl = class {
|
|
|
1122
1123
|
async updateProfile(profile) {
|
|
1123
1124
|
(0, import_invariant3.invariant)(this._identityManager.identity, "Identity not initialized.", {
|
|
1124
1125
|
F: __dxlog_file4,
|
|
1125
|
-
L:
|
|
1126
|
+
L: 60,
|
|
1126
1127
|
S: this,
|
|
1127
1128
|
A: [
|
|
1128
1129
|
"this._identityManager.identity",
|
|
@@ -1130,12 +1131,13 @@ var IdentityServiceImpl = class {
|
|
|
1130
1131
|
]
|
|
1131
1132
|
});
|
|
1132
1133
|
await this._identityManager.updateProfile(profile);
|
|
1134
|
+
await this._onProfileUpdate?.(this._identityManager.identity.profileDocument);
|
|
1133
1135
|
return this._getIdentity();
|
|
1134
1136
|
}
|
|
1135
1137
|
async signPresentation({ presentation, nonce }) {
|
|
1136
1138
|
(0, import_invariant3.invariant)(this._identityManager.identity, "Identity not initialized.", {
|
|
1137
1139
|
F: __dxlog_file4,
|
|
1138
|
-
L:
|
|
1140
|
+
L: 67,
|
|
1139
1141
|
S: this,
|
|
1140
1142
|
A: [
|
|
1141
1143
|
"this._identityManager.identity",
|
|
@@ -1155,7 +1157,7 @@ var IdentityServiceImpl = class {
|
|
|
1155
1157
|
// packages/sdk/client-services/src/packlets/invitations/device-invitation-protocol.ts
|
|
1156
1158
|
var import_invariant4 = require("@dxos/invariant");
|
|
1157
1159
|
var import_services = require("@dxos/protocols/proto/dxos/client/services");
|
|
1158
|
-
var __dxlog_file5 = "/home/
|
|
1160
|
+
var __dxlog_file5 = "/home/circleci/project/packages/sdk/client-services/src/packlets/invitations/device-invitation-protocol.ts";
|
|
1159
1161
|
var DeviceInvitationProtocol = class {
|
|
1160
1162
|
constructor(_keyring, _getIdentity, _acceptIdentity) {
|
|
1161
1163
|
this._keyring = _keyring;
|
|
@@ -1265,7 +1267,7 @@ var import_protocols3 = require("@dxos/protocols");
|
|
|
1265
1267
|
var import_services2 = require("@dxos/protocols/proto/dxos/client/services");
|
|
1266
1268
|
var import_invitations = require("@dxos/protocols/proto/dxos/halo/invitations");
|
|
1267
1269
|
var import_teleport = require("@dxos/teleport");
|
|
1268
|
-
var __dxlog_file6 = "/home/
|
|
1270
|
+
var __dxlog_file6 = "/home/circleci/project/packages/sdk/client-services/src/packlets/invitations/invitation-extension.ts";
|
|
1269
1271
|
var OPTIONS_TIMEOUT = 1e4;
|
|
1270
1272
|
var MAX_OTP_ATTEMPTS = 3;
|
|
1271
1273
|
var InvitationHostExtension = class extends import_teleport.RpcExtension {
|
|
@@ -1354,7 +1356,6 @@ var InvitationHostExtension = class extends import_teleport.RpcExtension {
|
|
|
1354
1356
|
C: (f, a) => f(...a)
|
|
1355
1357
|
});
|
|
1356
1358
|
return {
|
|
1357
|
-
spaceKey: this.invitation.authMethod === import_services2.Invitation.AuthMethod.NONE ? this.invitation.spaceKey : void 0,
|
|
1358
1359
|
authMethod: this.invitation.authMethod
|
|
1359
1360
|
};
|
|
1360
1361
|
},
|
|
@@ -1364,7 +1365,7 @@ var InvitationHostExtension = class extends import_teleport.RpcExtension {
|
|
|
1364
1365
|
id: traceId
|
|
1365
1366
|
}), {
|
|
1366
1367
|
F: __dxlog_file6,
|
|
1367
|
-
L:
|
|
1368
|
+
L: 124,
|
|
1368
1369
|
S: this,
|
|
1369
1370
|
C: (f, a) => f(...a)
|
|
1370
1371
|
});
|
|
@@ -1372,14 +1373,14 @@ var InvitationHostExtension = class extends import_teleport.RpcExtension {
|
|
|
1372
1373
|
authCode: code
|
|
1373
1374
|
}, {
|
|
1374
1375
|
F: __dxlog_file6,
|
|
1375
|
-
L:
|
|
1376
|
+
L: 125,
|
|
1376
1377
|
S: this,
|
|
1377
1378
|
C: (f, a) => f(...a)
|
|
1378
1379
|
});
|
|
1379
1380
|
let status = import_invitations.AuthenticationResponse.Status.OK;
|
|
1380
1381
|
(0, import_invariant5.invariant)(this.invitation, "Invitation is not set.", {
|
|
1381
1382
|
F: __dxlog_file6,
|
|
1382
|
-
L:
|
|
1383
|
+
L: 128,
|
|
1383
1384
|
S: this,
|
|
1384
1385
|
A: [
|
|
1385
1386
|
"this.invitation",
|
|
@@ -1390,7 +1391,7 @@ var InvitationHostExtension = class extends import_teleport.RpcExtension {
|
|
|
1390
1391
|
case import_services2.Invitation.AuthMethod.NONE: {
|
|
1391
1392
|
(0, import_log4.log)("authentication not required", void 0, {
|
|
1392
1393
|
F: __dxlog_file6,
|
|
1393
|
-
L:
|
|
1394
|
+
L: 131,
|
|
1394
1395
|
S: this,
|
|
1395
1396
|
C: (f, a) => f(...a)
|
|
1396
1397
|
});
|
|
@@ -1415,7 +1416,7 @@ var InvitationHostExtension = class extends import_teleport.RpcExtension {
|
|
|
1415
1416
|
authMethod: this.invitation.authMethod
|
|
1416
1417
|
}, {
|
|
1417
1418
|
F: __dxlog_file6,
|
|
1418
|
-
L:
|
|
1419
|
+
L: 149,
|
|
1419
1420
|
S: this,
|
|
1420
1421
|
C: (f, a) => f(...a)
|
|
1421
1422
|
});
|
|
@@ -1430,7 +1431,7 @@ var InvitationHostExtension = class extends import_teleport.RpcExtension {
|
|
|
1430
1431
|
}
|
|
1431
1432
|
}), {
|
|
1432
1433
|
F: __dxlog_file6,
|
|
1433
|
-
L:
|
|
1434
|
+
L: 155,
|
|
1434
1435
|
S: this,
|
|
1435
1436
|
C: (f, a) => f(...a)
|
|
1436
1437
|
});
|
|
@@ -1444,14 +1445,14 @@ var InvitationHostExtension = class extends import_teleport.RpcExtension {
|
|
|
1444
1445
|
id: traceId
|
|
1445
1446
|
}), {
|
|
1446
1447
|
F: __dxlog_file6,
|
|
1447
|
-
L:
|
|
1448
|
+
L: 161,
|
|
1448
1449
|
S: this,
|
|
1449
1450
|
C: (f, a) => f(...a)
|
|
1450
1451
|
});
|
|
1451
1452
|
try {
|
|
1452
1453
|
(0, import_invariant5.invariant)(this.invitation, "Invitation is not set.", {
|
|
1453
1454
|
F: __dxlog_file6,
|
|
1454
|
-
L:
|
|
1455
|
+
L: 164,
|
|
1455
1456
|
S: this,
|
|
1456
1457
|
A: [
|
|
1457
1458
|
"this.invitation",
|
|
@@ -1466,7 +1467,7 @@ var InvitationHostExtension = class extends import_teleport.RpcExtension {
|
|
|
1466
1467
|
id: traceId
|
|
1467
1468
|
}), {
|
|
1468
1469
|
F: __dxlog_file6,
|
|
1469
|
-
L:
|
|
1470
|
+
L: 172,
|
|
1470
1471
|
S: this,
|
|
1471
1472
|
C: (f, a) => f(...a)
|
|
1472
1473
|
});
|
|
@@ -1523,7 +1524,7 @@ var InvitationGuestExtension = class extends import_teleport.RpcExtension {
|
|
|
1523
1524
|
options: async (options) => {
|
|
1524
1525
|
(0, import_invariant5.invariant)(!this._remoteOptions, "Remote options already set.", {
|
|
1525
1526
|
F: __dxlog_file6,
|
|
1526
|
-
L:
|
|
1527
|
+
L: 239,
|
|
1527
1528
|
S: this,
|
|
1528
1529
|
A: [
|
|
1529
1530
|
"!this._remoteOptions",
|
|
@@ -1550,7 +1551,7 @@ var InvitationGuestExtension = class extends import_teleport.RpcExtension {
|
|
|
1550
1551
|
try {
|
|
1551
1552
|
(0, import_log4.log)("begin options", void 0, {
|
|
1552
1553
|
F: __dxlog_file6,
|
|
1553
|
-
L:
|
|
1554
|
+
L: 260,
|
|
1554
1555
|
S: this,
|
|
1555
1556
|
C: (f, a) => f(...a)
|
|
1556
1557
|
});
|
|
@@ -1562,7 +1563,7 @@ var InvitationGuestExtension = class extends import_teleport.RpcExtension {
|
|
|
1562
1563
|
}));
|
|
1563
1564
|
(0, import_log4.log)("end options", void 0, {
|
|
1564
1565
|
F: __dxlog_file6,
|
|
1565
|
-
L:
|
|
1566
|
+
L: 263,
|
|
1566
1567
|
S: this,
|
|
1567
1568
|
C: (f, a) => f(...a)
|
|
1568
1569
|
});
|
|
@@ -1576,7 +1577,7 @@ var InvitationGuestExtension = class extends import_teleport.RpcExtension {
|
|
|
1576
1577
|
} catch (err) {
|
|
1577
1578
|
(0, import_log4.log)("openError", err, {
|
|
1578
1579
|
F: __dxlog_file6,
|
|
1579
|
-
L:
|
|
1580
|
+
L: 273,
|
|
1580
1581
|
S: this,
|
|
1581
1582
|
C: (f, a) => f(...a)
|
|
1582
1583
|
});
|
|
@@ -1586,7 +1587,7 @@ var InvitationGuestExtension = class extends import_teleport.RpcExtension {
|
|
|
1586
1587
|
async onClose() {
|
|
1587
1588
|
(0, import_log4.log)("onClose", void 0, {
|
|
1588
1589
|
F: __dxlog_file6,
|
|
1589
|
-
L:
|
|
1590
|
+
L: 279,
|
|
1590
1591
|
S: this,
|
|
1591
1592
|
C: (f, a) => f(...a)
|
|
1592
1593
|
});
|
|
@@ -1596,7 +1597,7 @@ var InvitationGuestExtension = class extends import_teleport.RpcExtension {
|
|
|
1596
1597
|
var isAuthenticationRequired = (invitation) => invitation.authMethod !== import_services2.Invitation.AuthMethod.NONE;
|
|
1597
1598
|
|
|
1598
1599
|
// packages/sdk/client-services/src/packlets/invitations/invitations-handler.ts
|
|
1599
|
-
var __dxlog_file7 = "/home/
|
|
1600
|
+
var __dxlog_file7 = "/home/circleci/project/packages/sdk/client-services/src/packlets/invitations/invitations-handler.ts";
|
|
1600
1601
|
var InvitationsHandler = class {
|
|
1601
1602
|
/**
|
|
1602
1603
|
* @internal
|
|
@@ -1957,14 +1958,11 @@ var InvitationsHandler = class {
|
|
|
1957
1958
|
C: (f, a) => f(...a)
|
|
1958
1959
|
});
|
|
1959
1960
|
invitation.authMethod = introductionResponse.authMethod;
|
|
1960
|
-
if (introductionResponse.spaceKey) {
|
|
1961
|
-
invitation.spaceKey = introductionResponse.spaceKey;
|
|
1962
|
-
}
|
|
1963
1961
|
if (isAuthenticationRequired(invitation)) {
|
|
1964
1962
|
for (let attempt = 1; attempt <= MAX_OTP_ATTEMPTS; attempt++) {
|
|
1965
1963
|
(0, import_log5.log)("guest waiting for authentication code...", void 0, {
|
|
1966
1964
|
F: __dxlog_file7,
|
|
1967
|
-
L:
|
|
1965
|
+
L: 286,
|
|
1968
1966
|
S: this,
|
|
1969
1967
|
C: (f, a) => f(...a)
|
|
1970
1968
|
});
|
|
@@ -1976,7 +1974,7 @@ var InvitationsHandler = class {
|
|
|
1976
1974
|
});
|
|
1977
1975
|
(0, import_log5.log)("sending authentication request", void 0, {
|
|
1978
1976
|
F: __dxlog_file7,
|
|
1979
|
-
L:
|
|
1977
|
+
L: 290,
|
|
1980
1978
|
S: this,
|
|
1981
1979
|
C: (f, a) => f(...a)
|
|
1982
1980
|
});
|
|
@@ -1997,7 +1995,7 @@ var InvitationsHandler = class {
|
|
|
1997
1995
|
attempt
|
|
1998
1996
|
}, {
|
|
1999
1997
|
F: __dxlog_file7,
|
|
2000
|
-
L:
|
|
1998
|
+
L: 301,
|
|
2001
1999
|
S: this,
|
|
2002
2000
|
C: (f, a) => f(...a)
|
|
2003
2001
|
});
|
|
@@ -2014,7 +2012,7 @@ var InvitationsHandler = class {
|
|
|
2014
2012
|
...protocol.toJSON()
|
|
2015
2013
|
}, {
|
|
2016
2014
|
F: __dxlog_file7,
|
|
2017
|
-
L:
|
|
2015
|
+
L: 312,
|
|
2018
2016
|
S: this,
|
|
2019
2017
|
C: (f, a) => f(...a)
|
|
2020
2018
|
});
|
|
@@ -2026,7 +2024,7 @@ var InvitationsHandler = class {
|
|
|
2026
2024
|
...protocol.toJSON()
|
|
2027
2025
|
}, {
|
|
2028
2026
|
F: __dxlog_file7,
|
|
2029
|
-
L:
|
|
2027
|
+
L: 323,
|
|
2030
2028
|
S: this,
|
|
2031
2029
|
C: (f, a) => f(...a)
|
|
2032
2030
|
});
|
|
@@ -2038,7 +2036,7 @@ var InvitationsHandler = class {
|
|
|
2038
2036
|
id: traceId
|
|
2039
2037
|
}), {
|
|
2040
2038
|
F: __dxlog_file7,
|
|
2041
|
-
L:
|
|
2039
|
+
L: 325,
|
|
2042
2040
|
S: this,
|
|
2043
2041
|
C: (f, a) => f(...a)
|
|
2044
2042
|
});
|
|
@@ -2048,7 +2046,7 @@ var InvitationsHandler = class {
|
|
|
2048
2046
|
...protocol.toJSON()
|
|
2049
2047
|
}, {
|
|
2050
2048
|
F: __dxlog_file7,
|
|
2051
|
-
L:
|
|
2049
|
+
L: 328,
|
|
2052
2050
|
S: this,
|
|
2053
2051
|
C: (f, a) => f(...a)
|
|
2054
2052
|
});
|
|
@@ -2058,7 +2056,7 @@ var InvitationsHandler = class {
|
|
|
2058
2056
|
} else {
|
|
2059
2057
|
(0, import_log5.log)("auth failed", err, {
|
|
2060
2058
|
F: __dxlog_file7,
|
|
2061
|
-
L:
|
|
2059
|
+
L: 331,
|
|
2062
2060
|
S: this,
|
|
2063
2061
|
C: (f, a) => f(...a)
|
|
2064
2062
|
});
|
|
@@ -2069,7 +2067,7 @@ var InvitationsHandler = class {
|
|
|
2069
2067
|
error: err
|
|
2070
2068
|
}), {
|
|
2071
2069
|
F: __dxlog_file7,
|
|
2072
|
-
L:
|
|
2070
|
+
L: 334,
|
|
2073
2071
|
S: this,
|
|
2074
2072
|
C: (f, a) => f(...a)
|
|
2075
2073
|
});
|
|
@@ -2087,7 +2085,7 @@ var InvitationsHandler = class {
|
|
|
2087
2085
|
...protocol.toJSON()
|
|
2088
2086
|
}, {
|
|
2089
2087
|
F: __dxlog_file7,
|
|
2090
|
-
L:
|
|
2088
|
+
L: 345,
|
|
2091
2089
|
S: this,
|
|
2092
2090
|
C: (f, a) => f(...a)
|
|
2093
2091
|
});
|
|
@@ -2097,7 +2095,7 @@ var InvitationsHandler = class {
|
|
|
2097
2095
|
} else {
|
|
2098
2096
|
(0, import_log5.log)("auth failed", err, {
|
|
2099
2097
|
F: __dxlog_file7,
|
|
2100
|
-
L:
|
|
2098
|
+
L: 348,
|
|
2101
2099
|
S: this,
|
|
2102
2100
|
C: (f, a) => f(...a)
|
|
2103
2101
|
});
|
|
@@ -2110,7 +2108,7 @@ var InvitationsHandler = class {
|
|
|
2110
2108
|
(0, import_async8.scheduleTask)(ctx, async () => {
|
|
2111
2109
|
(0, import_invariant6.invariant)(invitation.swarmKey, void 0, {
|
|
2112
2110
|
F: __dxlog_file7,
|
|
2113
|
-
L:
|
|
2111
|
+
L: 358,
|
|
2114
2112
|
S: this,
|
|
2115
2113
|
A: [
|
|
2116
2114
|
"invitation.swarmKey",
|
|
@@ -2155,7 +2153,7 @@ var import_codec_protobuf8 = require("@dxos/codec-protobuf");
|
|
|
2155
2153
|
var import_invariant7 = require("@dxos/invariant");
|
|
2156
2154
|
var import_log6 = require("@dxos/log");
|
|
2157
2155
|
var import_services4 = require("@dxos/protocols/proto/dxos/client/services");
|
|
2158
|
-
var __dxlog_file8 = "/home/
|
|
2156
|
+
var __dxlog_file8 = "/home/circleci/project/packages/sdk/client-services/src/packlets/invitations/invitations-service.ts";
|
|
2159
2157
|
var InvitationsServiceImpl = class {
|
|
2160
2158
|
constructor(_invitationsHandler, _getHandler) {
|
|
2161
2159
|
this._invitationsHandler = _invitationsHandler;
|
|
@@ -2337,7 +2335,7 @@ var import_feed_store3 = require("@dxos/feed-store");
|
|
|
2337
2335
|
var import_invariant8 = require("@dxos/invariant");
|
|
2338
2336
|
var import_log7 = require("@dxos/log");
|
|
2339
2337
|
var import_services5 = require("@dxos/protocols/proto/dxos/client/services");
|
|
2340
|
-
var __dxlog_file9 = "/home/
|
|
2338
|
+
var __dxlog_file9 = "/home/circleci/project/packages/sdk/client-services/src/packlets/invitations/space-invitation-protocol.ts";
|
|
2341
2339
|
var SpaceInvitationProtocol = class {
|
|
2342
2340
|
constructor(_spaceManager, _signingContext, _keyring, _spaceKey) {
|
|
2343
2341
|
this._spaceManager = _spaceManager;
|
|
@@ -2427,7 +2425,7 @@ var SpaceInvitationProtocol = class {
|
|
|
2427
2425
|
}
|
|
2428
2426
|
createIntroduction() {
|
|
2429
2427
|
return {
|
|
2430
|
-
profile: this._signingContext.
|
|
2428
|
+
profile: this._signingContext.getProfile()
|
|
2431
2429
|
};
|
|
2432
2430
|
}
|
|
2433
2431
|
async createAdmissionRequest() {
|
|
@@ -2605,10 +2603,10 @@ var getPlatform = () => {
|
|
|
2605
2603
|
};
|
|
2606
2604
|
|
|
2607
2605
|
// packages/sdk/client-services/src/version.ts
|
|
2608
|
-
var DXOS_VERSION = "0.3.5
|
|
2606
|
+
var DXOS_VERSION = "0.3.5";
|
|
2609
2607
|
|
|
2610
2608
|
// packages/sdk/client-services/src/packlets/services/diagnostics.ts
|
|
2611
|
-
var __dxlog_file10 = "/home/
|
|
2609
|
+
var __dxlog_file10 = "/home/circleci/project/packages/sdk/client-services/src/packlets/services/diagnostics.ts";
|
|
2612
2610
|
var DEFAULT_TIMEOUT = 1e3;
|
|
2613
2611
|
var createDiagnostics = async (clientServices, serviceContext, config) => {
|
|
2614
2612
|
const diagnostics = {
|
|
@@ -2783,7 +2781,7 @@ var import_log9 = require("@dxos/log");
|
|
|
2783
2781
|
var import_protocols6 = require("@dxos/protocols");
|
|
2784
2782
|
var import_teleport2 = require("@dxos/teleport");
|
|
2785
2783
|
var import_util4 = require("@dxos/util");
|
|
2786
|
-
var __dxlog_file11 = "/home/
|
|
2784
|
+
var __dxlog_file11 = "/home/circleci/project/packages/sdk/client-services/src/packlets/spaces/notarization-plugin.ts";
|
|
2787
2785
|
var DEFAULT_RETRY_TIMEOUT = 1e3;
|
|
2788
2786
|
var DEFAULT_SUCCESS_DELAY = 1e3;
|
|
2789
2787
|
var DEFAULT_NOTARIZE_TIMEOUT = 1e4;
|
|
@@ -3053,7 +3051,7 @@ function _ts_decorate4(decorators, target, key, desc) {
|
|
|
3053
3051
|
r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
3054
3052
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
3055
3053
|
}
|
|
3056
|
-
var __dxlog_file12 = "/home/
|
|
3054
|
+
var __dxlog_file12 = "/home/circleci/project/packages/sdk/client-services/src/packlets/spaces/data-space.ts";
|
|
3057
3055
|
var ENABLE_FEED_PURGE = false;
|
|
3058
3056
|
var DataSpace = class DataSpace2 {
|
|
3059
3057
|
constructor(params) {
|
|
@@ -3320,6 +3318,21 @@ var DataSpace = class DataSpace2 {
|
|
|
3320
3318
|
await this._metadataStore.setWritableFeedKeys(this.key, this.inner.controlFeedKey, this.inner.dataFeedKey);
|
|
3321
3319
|
}
|
|
3322
3320
|
}
|
|
3321
|
+
// TODO(dmaretskyi): Use profile from signing context.
|
|
3322
|
+
async updateOwnProfile(profile) {
|
|
3323
|
+
const credential = await this._signingContext.credentialSigner.createCredential({
|
|
3324
|
+
subject: this._signingContext.identityKey,
|
|
3325
|
+
assertion: {
|
|
3326
|
+
"@type": "dxos.halo.credentials.MemberProfile",
|
|
3327
|
+
profile
|
|
3328
|
+
}
|
|
3329
|
+
});
|
|
3330
|
+
await this.inner.controlPipeline.writer.write({
|
|
3331
|
+
credential: {
|
|
3332
|
+
credential
|
|
3333
|
+
}
|
|
3334
|
+
});
|
|
3335
|
+
}
|
|
3323
3336
|
async createEpoch() {
|
|
3324
3337
|
const epoch = await this.dataPipeline.createEpoch();
|
|
3325
3338
|
const receipt = await this.inner.controlPipeline.writer.write({
|
|
@@ -3368,7 +3381,7 @@ var DataSpace = class DataSpace2 {
|
|
|
3368
3381
|
state: import_services7.SpaceState[this._state]
|
|
3369
3382
|
}, {
|
|
3370
3383
|
F: __dxlog_file12,
|
|
3371
|
-
L:
|
|
3384
|
+
L: 404,
|
|
3372
3385
|
S: this,
|
|
3373
3386
|
C: (f, a) => f(...a)
|
|
3374
3387
|
});
|
|
@@ -3428,7 +3441,7 @@ var spaceGenesis = async (keyring, signingContext, space) => {
|
|
|
3428
3441
|
"@type": "dxos.halo.credentials.SpaceMember",
|
|
3429
3442
|
spaceKey: space.key,
|
|
3430
3443
|
role: import_credentials12.SpaceMember.Role.ADMIN,
|
|
3431
|
-
profile: signingContext.
|
|
3444
|
+
profile: signingContext.getProfile(),
|
|
3432
3445
|
genesisFeedKey: space.controlFeedKey ?? (0, import_debug5.failUndefined)()
|
|
3433
3446
|
}
|
|
3434
3447
|
}),
|
|
@@ -3484,7 +3497,7 @@ function _ts_decorate5(decorators, target, key, desc) {
|
|
|
3484
3497
|
r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
3485
3498
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
3486
3499
|
}
|
|
3487
|
-
var __dxlog_file13 = "/home/
|
|
3500
|
+
var __dxlog_file13 = "/home/circleci/project/packages/sdk/client-services/src/packlets/spaces/data-space-manager.ts";
|
|
3488
3501
|
var PRESENCE_ANNOUNCE_INTERVAL = 1e4;
|
|
3489
3502
|
var PRESENCE_OFFLINE_TIMEOUT = 2e4;
|
|
3490
3503
|
var DataSpaceManager = class DataSpaceManager2 {
|
|
@@ -3508,7 +3521,7 @@ var DataSpaceManager = class DataSpaceManager2 {
|
|
|
3508
3521
|
async open() {
|
|
3509
3522
|
(0, import_log11.log)("open", void 0, {
|
|
3510
3523
|
F: __dxlog_file13,
|
|
3511
|
-
L:
|
|
3524
|
+
L: 83,
|
|
3512
3525
|
S: this,
|
|
3513
3526
|
C: (f, a) => f(...a)
|
|
3514
3527
|
});
|
|
@@ -3516,7 +3529,7 @@ var DataSpaceManager = class DataSpaceManager2 {
|
|
|
3516
3529
|
id: this._instanceId
|
|
3517
3530
|
}), {
|
|
3518
3531
|
F: __dxlog_file13,
|
|
3519
|
-
L:
|
|
3532
|
+
L: 84,
|
|
3520
3533
|
S: this,
|
|
3521
3534
|
C: (f, a) => f(...a)
|
|
3522
3535
|
});
|
|
@@ -3524,7 +3537,7 @@ var DataSpaceManager = class DataSpaceManager2 {
|
|
|
3524
3537
|
spaces: this._metadataStore.spaces.length
|
|
3525
3538
|
}, {
|
|
3526
3539
|
F: __dxlog_file13,
|
|
3527
|
-
L:
|
|
3540
|
+
L: 85,
|
|
3528
3541
|
S: this,
|
|
3529
3542
|
C: (f, a) => f(...a)
|
|
3530
3543
|
});
|
|
@@ -3534,7 +3547,7 @@ var DataSpaceManager = class DataSpaceManager2 {
|
|
|
3534
3547
|
spaceMetadata
|
|
3535
3548
|
}, {
|
|
3536
3549
|
F: __dxlog_file13,
|
|
3537
|
-
L:
|
|
3550
|
+
L: 89,
|
|
3538
3551
|
S: this,
|
|
3539
3552
|
C: (f, a) => f(...a)
|
|
3540
3553
|
});
|
|
@@ -3545,7 +3558,7 @@ var DataSpaceManager = class DataSpaceManager2 {
|
|
|
3545
3558
|
err
|
|
3546
3559
|
}, {
|
|
3547
3560
|
F: __dxlog_file13,
|
|
3548
|
-
L:
|
|
3561
|
+
L: 92,
|
|
3549
3562
|
S: this,
|
|
3550
3563
|
C: (f, a) => f(...a)
|
|
3551
3564
|
});
|
|
@@ -3562,7 +3575,7 @@ var DataSpaceManager = class DataSpaceManager2 {
|
|
|
3562
3575
|
id: this._instanceId
|
|
3563
3576
|
}), {
|
|
3564
3577
|
F: __dxlog_file13,
|
|
3565
|
-
L:
|
|
3578
|
+
L: 105,
|
|
3566
3579
|
S: this,
|
|
3567
3580
|
C: (f, a) => f(...a)
|
|
3568
3581
|
});
|
|
@@ -3570,7 +3583,7 @@ var DataSpaceManager = class DataSpaceManager2 {
|
|
|
3570
3583
|
async close() {
|
|
3571
3584
|
(0, import_log11.log)("close", void 0, {
|
|
3572
3585
|
F: __dxlog_file13,
|
|
3573
|
-
L:
|
|
3586
|
+
L: 110,
|
|
3574
3587
|
S: this,
|
|
3575
3588
|
C: (f, a) => f(...a)
|
|
3576
3589
|
});
|
|
@@ -3586,7 +3599,7 @@ var DataSpaceManager = class DataSpaceManager2 {
|
|
|
3586
3599
|
async createSpace() {
|
|
3587
3600
|
(0, import_invariant11.invariant)(this._isOpen, "Not open.", {
|
|
3588
3601
|
F: __dxlog_file13,
|
|
3589
|
-
L:
|
|
3602
|
+
L: 123,
|
|
3590
3603
|
S: this,
|
|
3591
3604
|
A: [
|
|
3592
3605
|
"this._isOpen",
|
|
@@ -3607,7 +3620,7 @@ var DataSpaceManager = class DataSpaceManager2 {
|
|
|
3607
3620
|
spaceKey
|
|
3608
3621
|
}, {
|
|
3609
3622
|
F: __dxlog_file13,
|
|
3610
|
-
L:
|
|
3623
|
+
L: 135,
|
|
3611
3624
|
S: this,
|
|
3612
3625
|
C: (f, a) => f(...a)
|
|
3613
3626
|
});
|
|
@@ -3617,7 +3630,7 @@ var DataSpaceManager = class DataSpaceManager2 {
|
|
|
3617
3630
|
const memberCredential = credentials[1];
|
|
3618
3631
|
(0, import_invariant11.invariant)((0, import_credentials13.getCredentialAssertion)(memberCredential)["@type"] === "dxos.halo.credentials.SpaceMember", void 0, {
|
|
3619
3632
|
F: __dxlog_file13,
|
|
3620
|
-
L:
|
|
3633
|
+
L: 142,
|
|
3621
3634
|
S: this,
|
|
3622
3635
|
A: [
|
|
3623
3636
|
"getCredentialAssertion(memberCredential)['@type'] === 'dxos.halo.credentials.SpaceMember'",
|
|
@@ -3635,13 +3648,13 @@ var DataSpaceManager = class DataSpaceManager2 {
|
|
|
3635
3648
|
opts
|
|
3636
3649
|
}, {
|
|
3637
3650
|
F: __dxlog_file13,
|
|
3638
|
-
L:
|
|
3651
|
+
L: 154,
|
|
3639
3652
|
S: this,
|
|
3640
3653
|
C: (f, a) => f(...a)
|
|
3641
3654
|
});
|
|
3642
3655
|
(0, import_invariant11.invariant)(this._isOpen, "Not open.", {
|
|
3643
3656
|
F: __dxlog_file13,
|
|
3644
|
-
L:
|
|
3657
|
+
L: 155,
|
|
3645
3658
|
S: this,
|
|
3646
3659
|
A: [
|
|
3647
3660
|
"this._isOpen",
|
|
@@ -3650,7 +3663,7 @@ var DataSpaceManager = class DataSpaceManager2 {
|
|
|
3650
3663
|
});
|
|
3651
3664
|
(0, import_invariant11.invariant)(!this._spaces.has(opts.spaceKey), "Space already exists.", {
|
|
3652
3665
|
F: __dxlog_file13,
|
|
3653
|
-
L:
|
|
3666
|
+
L: 156,
|
|
3654
3667
|
S: this,
|
|
3655
3668
|
A: [
|
|
3656
3669
|
"!this._spaces.has(opts.spaceKey)",
|
|
@@ -3685,7 +3698,7 @@ var DataSpaceManager = class DataSpaceManager2 {
|
|
|
3685
3698
|
metadata
|
|
3686
3699
|
}, {
|
|
3687
3700
|
F: __dxlog_file13,
|
|
3688
|
-
L:
|
|
3701
|
+
L: 189,
|
|
3689
3702
|
S: this,
|
|
3690
3703
|
C: (f, a) => f(...a)
|
|
3691
3704
|
});
|
|
@@ -3721,7 +3734,7 @@ var DataSpaceManager = class DataSpaceManager2 {
|
|
|
3721
3734
|
onAuthFailure: () => {
|
|
3722
3735
|
import_log11.log.warn("auth failure", void 0, {
|
|
3723
3736
|
F: __dxlog_file13,
|
|
3724
|
-
L:
|
|
3737
|
+
L: 224,
|
|
3725
3738
|
S: this,
|
|
3726
3739
|
C: (f, a) => f(...a)
|
|
3727
3740
|
});
|
|
@@ -3745,7 +3758,7 @@ var DataSpaceManager = class DataSpaceManager2 {
|
|
|
3745
3758
|
space: space.key
|
|
3746
3759
|
}, {
|
|
3747
3760
|
F: __dxlog_file13,
|
|
3748
|
-
L:
|
|
3761
|
+
L: 242,
|
|
3749
3762
|
S: this,
|
|
3750
3763
|
C: (f, a) => f(...a)
|
|
3751
3764
|
});
|
|
@@ -3757,7 +3770,7 @@ var DataSpaceManager = class DataSpaceManager2 {
|
|
|
3757
3770
|
open: this._isOpen
|
|
3758
3771
|
}, {
|
|
3759
3772
|
F: __dxlog_file13,
|
|
3760
|
-
L:
|
|
3773
|
+
L: 249,
|
|
3761
3774
|
S: this,
|
|
3762
3775
|
C: (f, a) => f(...a)
|
|
3763
3776
|
});
|
|
@@ -3770,7 +3783,7 @@ var DataSpaceManager = class DataSpaceManager2 {
|
|
|
3770
3783
|
space: space.key
|
|
3771
3784
|
}, {
|
|
3772
3785
|
F: __dxlog_file13,
|
|
3773
|
-
L:
|
|
3786
|
+
L: 255,
|
|
3774
3787
|
S: this,
|
|
3775
3788
|
C: (f, a) => f(...a)
|
|
3776
3789
|
});
|
|
@@ -3816,7 +3829,7 @@ var import_invariant12 = require("@dxos/invariant");
|
|
|
3816
3829
|
var import_log12 = require("@dxos/log");
|
|
3817
3830
|
var import_protocols9 = require("@dxos/protocols");
|
|
3818
3831
|
var import_services9 = require("@dxos/protocols/proto/dxos/client/services");
|
|
3819
|
-
var __dxlog_file14 = "/home/
|
|
3832
|
+
var __dxlog_file14 = "/home/circleci/project/packages/sdk/client-services/src/packlets/spaces/spaces-service.ts";
|
|
3820
3833
|
var SpacesServiceImpl = class {
|
|
3821
3834
|
constructor(_identityManager, _spaceManager, _dataServiceSubscriptions, _getDataSpaceManager) {
|
|
3822
3835
|
this._identityManager = _identityManager;
|
|
@@ -4014,7 +4027,7 @@ var SpacesServiceImpl = class {
|
|
|
4014
4027
|
identity: {
|
|
4015
4028
|
identityKey: member.key,
|
|
4016
4029
|
profile: {
|
|
4017
|
-
displayName: member.
|
|
4030
|
+
displayName: member.profile?.displayName
|
|
4018
4031
|
}
|
|
4019
4032
|
},
|
|
4020
4033
|
presence: member.removed ? import_services9.SpaceMember.PresenceState.REMOVED : isMe || peers.length > 0 ? import_services9.SpaceMember.PresenceState.ONLINE : import_services9.SpaceMember.PresenceState.OFFLINE,
|
|
@@ -4040,7 +4053,7 @@ function _ts_decorate6(decorators, target, key, desc) {
|
|
|
4040
4053
|
r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
4041
4054
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
4042
4055
|
}
|
|
4043
|
-
var __dxlog_file15 = "/home/
|
|
4056
|
+
var __dxlog_file15 = "/home/circleci/project/packages/sdk/client-services/src/packlets/services/service-context.ts";
|
|
4044
4057
|
var ServiceContext = class ServiceContext2 {
|
|
4045
4058
|
constructor(storage, networkManager, signalManager, modelFactory) {
|
|
4046
4059
|
this.storage = storage;
|
|
@@ -4159,6 +4172,14 @@ var ServiceContext = class ServiceContext2 {
|
|
|
4159
4172
|
});
|
|
4160
4173
|
return factory(invitation);
|
|
4161
4174
|
}
|
|
4175
|
+
async broadcastProfileUpdate(profile) {
|
|
4176
|
+
if (!profile || !this.dataSpaceManager) {
|
|
4177
|
+
return;
|
|
4178
|
+
}
|
|
4179
|
+
for (const space of this.dataSpaceManager.spaces.values()) {
|
|
4180
|
+
await space.updateOwnProfile(profile);
|
|
4181
|
+
}
|
|
4182
|
+
}
|
|
4162
4183
|
async _acceptIdentity(params) {
|
|
4163
4184
|
const identity = await this.identityManager.acceptIdentity(params);
|
|
4164
4185
|
await this._initialize(new import_context9.Context());
|
|
@@ -4174,7 +4195,7 @@ var ServiceContext = class ServiceContext2 {
|
|
|
4174
4195
|
async _initialize(ctx) {
|
|
4175
4196
|
(0, import_log13.log)("initializing spaces...", void 0, {
|
|
4176
4197
|
F: __dxlog_file15,
|
|
4177
|
-
L:
|
|
4198
|
+
L: 199,
|
|
4178
4199
|
S: this,
|
|
4179
4200
|
C: (f, a) => f(...a)
|
|
4180
4201
|
});
|
|
@@ -4183,7 +4204,7 @@ var ServiceContext = class ServiceContext2 {
|
|
|
4183
4204
|
credentialSigner: identity.getIdentityCredentialSigner(),
|
|
4184
4205
|
identityKey: identity.identityKey,
|
|
4185
4206
|
deviceKey: identity.deviceKey,
|
|
4186
|
-
|
|
4207
|
+
getProfile: () => identity.profileDocument,
|
|
4187
4208
|
recordCredential: async (credential) => {
|
|
4188
4209
|
await identity.controlPipeline.writer.write({
|
|
4189
4210
|
credential: {
|
|
@@ -4197,7 +4218,7 @@ var ServiceContext = class ServiceContext2 {
|
|
|
4197
4218
|
this._handlerFactories.set(import_services10.Invitation.Kind.SPACE, (invitation) => {
|
|
4198
4219
|
(0, import_invariant13.invariant)(this.dataSpaceManager, "dataSpaceManager not initialized yet", {
|
|
4199
4220
|
F: __dxlog_file15,
|
|
4200
|
-
L:
|
|
4221
|
+
L: 222,
|
|
4201
4222
|
S: this,
|
|
4202
4223
|
A: [
|
|
4203
4224
|
"this.dataSpaceManager",
|
|
@@ -4221,7 +4242,7 @@ var ServiceContext = class ServiceContext2 {
|
|
|
4221
4242
|
details: assertion
|
|
4222
4243
|
}, {
|
|
4223
4244
|
F: __dxlog_file15,
|
|
4224
|
-
L:
|
|
4245
|
+
L: 238,
|
|
4225
4246
|
S: this,
|
|
4226
4247
|
C: (f, a) => f(...a)
|
|
4227
4248
|
});
|
|
@@ -4232,7 +4253,7 @@ var ServiceContext = class ServiceContext2 {
|
|
|
4232
4253
|
details: assertion
|
|
4233
4254
|
}, {
|
|
4234
4255
|
F: __dxlog_file15,
|
|
4235
|
-
L:
|
|
4256
|
+
L: 242,
|
|
4236
4257
|
S: this,
|
|
4237
4258
|
C: (f, a) => f(...a)
|
|
4238
4259
|
});
|
|
@@ -4243,7 +4264,7 @@ var ServiceContext = class ServiceContext2 {
|
|
|
4243
4264
|
details: assertion
|
|
4244
4265
|
}, {
|
|
4245
4266
|
F: __dxlog_file15,
|
|
4246
|
-
L:
|
|
4267
|
+
L: 247,
|
|
4247
4268
|
S: this,
|
|
4248
4269
|
C: (f, a) => f(...a)
|
|
4249
4270
|
});
|
|
@@ -4254,7 +4275,7 @@ var ServiceContext = class ServiceContext2 {
|
|
|
4254
4275
|
} catch (err) {
|
|
4255
4276
|
import_log13.log.catch(err, void 0, {
|
|
4256
4277
|
F: __dxlog_file15,
|
|
4257
|
-
L:
|
|
4278
|
+
L: 253,
|
|
4258
4279
|
S: this,
|
|
4259
4280
|
C: (f, a) => f(...a)
|
|
4260
4281
|
});
|
|
@@ -4376,7 +4397,7 @@ function _ts_decorate7(decorators, target, key, desc) {
|
|
|
4376
4397
|
r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
4377
4398
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
4378
4399
|
}
|
|
4379
|
-
var __dxlog_file16 = "/home/
|
|
4400
|
+
var __dxlog_file16 = "/home/circleci/project/packages/sdk/client-services/src/packlets/locks/node.ts";
|
|
4380
4401
|
var Lock = class {
|
|
4381
4402
|
constructor({ lockKey: lockPath, onAcquire, onRelease }) {
|
|
4382
4403
|
this._lockPath = lockPath;
|
|
@@ -4684,7 +4705,7 @@ function _ts_decorate8(decorators, target, key, desc) {
|
|
|
4684
4705
|
r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
4685
4706
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
4686
4707
|
}
|
|
4687
|
-
var __dxlog_file17 = "/home/
|
|
4708
|
+
var __dxlog_file17 = "/home/circleci/project/packages/sdk/client-services/src/packlets/services/service-host.ts";
|
|
4688
4709
|
var createDefaultModelFactory = () => {
|
|
4689
4710
|
return new import_model_factory.ModelFactory().registerModel(import_document_model2.DocumentModel).registerModel(import_text_model.TextModel);
|
|
4690
4711
|
};
|
|
@@ -4902,7 +4923,7 @@ var ClientServicesHost = class ClientServicesHost2 {
|
|
|
4902
4923
|
this._serviceContext = new ServiceContext(this._storage, this._networkManager, this._signalManager, this._modelFactory);
|
|
4903
4924
|
this._serviceRegistry.setServices({
|
|
4904
4925
|
SystemService: this._systemService,
|
|
4905
|
-
IdentityService: new IdentityServiceImpl((params) => this._createIdentity(params), this._serviceContext.identityManager, this._serviceContext.keyring),
|
|
4926
|
+
IdentityService: new IdentityServiceImpl((params) => this._createIdentity(params), this._serviceContext.identityManager, this._serviceContext.keyring, (profile) => this._serviceContext.broadcastProfileUpdate(profile)),
|
|
4906
4927
|
InvitationsService: new InvitationsServiceImpl(this._serviceContext.invitations, (invitation) => this._serviceContext.getInvitationHandler(invitation)),
|
|
4907
4928
|
DevicesService: new DevicesServiceImpl(this._serviceContext.identityManager),
|
|
4908
4929
|
SpacesService: new SpacesServiceImpl(this._serviceContext.identityManager, this._serviceContext.spaceManager, this._serviceContext.dataServiceSubscriptions, async () => {
|
|
@@ -4939,7 +4960,7 @@ var ClientServicesHost = class ClientServicesHost2 {
|
|
|
4939
4960
|
deviceKey
|
|
4940
4961
|
}, {
|
|
4941
4962
|
F: __dxlog_file17,
|
|
4942
|
-
L:
|
|
4963
|
+
L: 317,
|
|
4943
4964
|
S: this,
|
|
4944
4965
|
C: (f, a) => f(...a)
|
|
4945
4966
|
});
|
|
@@ -4947,7 +4968,7 @@ var ClientServicesHost = class ClientServicesHost2 {
|
|
|
4947
4968
|
id: traceId
|
|
4948
4969
|
}), {
|
|
4949
4970
|
F: __dxlog_file17,
|
|
4950
|
-
L:
|
|
4971
|
+
L: 318,
|
|
4951
4972
|
S: this,
|
|
4952
4973
|
C: (f, a) => f(...a)
|
|
4953
4974
|
});
|
|
@@ -4961,7 +4982,7 @@ var ClientServicesHost = class ClientServicesHost2 {
|
|
|
4961
4982
|
deviceKey
|
|
4962
4983
|
}, {
|
|
4963
4984
|
F: __dxlog_file17,
|
|
4964
|
-
L:
|
|
4985
|
+
L: 329,
|
|
4965
4986
|
S: this,
|
|
4966
4987
|
C: (f, a) => f(...a)
|
|
4967
4988
|
});
|
|
@@ -4977,7 +4998,7 @@ var ClientServicesHost = class ClientServicesHost2 {
|
|
|
4977
4998
|
deviceKey
|
|
4978
4999
|
}, {
|
|
4979
5000
|
F: __dxlog_file17,
|
|
4980
|
-
L:
|
|
5001
|
+
L: 336,
|
|
4981
5002
|
S: this,
|
|
4982
5003
|
C: (f, a) => f(...a)
|
|
4983
5004
|
});
|
|
@@ -4988,13 +5009,13 @@ var ClientServicesHost = class ClientServicesHost2 {
|
|
|
4988
5009
|
id: traceId
|
|
4989
5010
|
}), {
|
|
4990
5011
|
F: __dxlog_file17,
|
|
4991
|
-
L:
|
|
5012
|
+
L: 341,
|
|
4992
5013
|
S: this,
|
|
4993
5014
|
C: (f, a) => f(...a)
|
|
4994
5015
|
});
|
|
4995
5016
|
(0, import_log16.log)("resetting...", void 0, {
|
|
4996
5017
|
F: __dxlog_file17,
|
|
4997
|
-
L:
|
|
5018
|
+
L: 343,
|
|
4998
5019
|
S: this,
|
|
4999
5020
|
C: (f, a) => f(...a)
|
|
5000
5021
|
});
|
|
@@ -5002,7 +5023,7 @@ var ClientServicesHost = class ClientServicesHost2 {
|
|
|
5002
5023
|
await this._storage.reset();
|
|
5003
5024
|
(0, import_log16.log)("reset", void 0, {
|
|
5004
5025
|
F: __dxlog_file17,
|
|
5005
|
-
L:
|
|
5026
|
+
L: 346,
|
|
5006
5027
|
S: this,
|
|
5007
5028
|
C: (f, a) => f(...a)
|
|
5008
5029
|
});
|
|
@@ -5010,7 +5031,7 @@ var ClientServicesHost = class ClientServicesHost2 {
|
|
|
5010
5031
|
id: traceId
|
|
5011
5032
|
}), {
|
|
5012
5033
|
F: __dxlog_file17,
|
|
5013
|
-
L:
|
|
5034
|
+
L: 347,
|
|
5014
5035
|
S: this,
|
|
5015
5036
|
C: (f, a) => f(...a)
|
|
5016
5037
|
});
|
|
@@ -5069,7 +5090,7 @@ var import_client_protocol6 = require("@dxos/client-protocol");
|
|
|
5069
5090
|
var import_invariant16 = require("@dxos/invariant");
|
|
5070
5091
|
var import_iframe = require("@dxos/protocols/proto/dxos/iframe");
|
|
5071
5092
|
var import_rpc2 = require("@dxos/rpc");
|
|
5072
|
-
var __dxlog_file18 = "/home/
|
|
5093
|
+
var __dxlog_file18 = "/home/circleci/project/packages/sdk/client-services/src/packlets/vault/shell-runtime.ts";
|
|
5073
5094
|
var ShellRuntimeImpl = class {
|
|
5074
5095
|
constructor(_port) {
|
|
5075
5096
|
this._port = _port;
|
|
@@ -5142,7 +5163,7 @@ function _ts_decorate9(decorators, target, key, desc) {
|
|
|
5142
5163
|
r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5143
5164
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
5144
5165
|
}
|
|
5145
|
-
var __dxlog_file19 = "/home/
|
|
5166
|
+
var __dxlog_file19 = "/home/circleci/project/packages/sdk/client-services/src/packlets/vault/iframe-host-runtime.ts";
|
|
5146
5167
|
var LOCK_KEY = "DXOS_RESOURCE_LOCK";
|
|
5147
5168
|
var IFrameHostRuntime = class {
|
|
5148
5169
|
constructor({ config, origin, appPort, shellPort }) {
|
|
@@ -5257,7 +5278,7 @@ var import_network_manager4 = require("@dxos/network-manager");
|
|
|
5257
5278
|
var import_protocols13 = require("@dxos/protocols");
|
|
5258
5279
|
var import_rpc3 = require("@dxos/rpc");
|
|
5259
5280
|
var import_util12 = require("@dxos/util");
|
|
5260
|
-
var __dxlog_file20 = "/home/
|
|
5281
|
+
var __dxlog_file20 = "/home/circleci/project/packages/sdk/client-services/src/packlets/vault/iframe-proxy-runtime.ts";
|
|
5261
5282
|
var IFrameProxyRuntime = class {
|
|
5262
5283
|
constructor({ config, systemPort, shellPort }) {
|
|
5263
5284
|
this._id = String(Math.floor(Math.random() * 1e6));
|
|
@@ -5349,7 +5370,7 @@ function _ts_decorate10(decorators, target, key, desc) {
|
|
|
5349
5370
|
r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5350
5371
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
5351
5372
|
}
|
|
5352
|
-
var __dxlog_file21 = "/home/
|
|
5373
|
+
var __dxlog_file21 = "/home/circleci/project/packages/sdk/client-services/src/packlets/vault/worker-session.ts";
|
|
5353
5374
|
var WorkerSession = class {
|
|
5354
5375
|
constructor({ serviceHost, systemPort, appPort, shellPort, readySignal }) {
|
|
5355
5376
|
this._startTrigger = new import_async21.Trigger();
|
|
@@ -5503,7 +5524,7 @@ _ts_decorate10([
|
|
|
5503
5524
|
], WorkerSession.prototype, "lockKey", void 0);
|
|
5504
5525
|
|
|
5505
5526
|
// packages/sdk/client-services/src/packlets/vault/worker-runtime.ts
|
|
5506
|
-
var __dxlog_file22 = "/home/
|
|
5527
|
+
var __dxlog_file22 = "/home/circleci/project/packages/sdk/client-services/src/packlets/vault/worker-runtime.ts";
|
|
5507
5528
|
var WorkerRuntime = class {
|
|
5508
5529
|
constructor(_configProvider) {
|
|
5509
5530
|
this._configProvider = _configProvider;
|