@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
|
@@ -185,10 +185,10 @@ var getPlatform = () => {
|
|
|
185
185
|
};
|
|
186
186
|
|
|
187
187
|
// packages/sdk/client-services/src/version.ts
|
|
188
|
-
var DXOS_VERSION = "0.3.5
|
|
188
|
+
var DXOS_VERSION = "0.3.5";
|
|
189
189
|
|
|
190
190
|
// packages/sdk/client-services/src/packlets/services/diagnostics.ts
|
|
191
|
-
var __dxlog_file = "/home/
|
|
191
|
+
var __dxlog_file = "/home/circleci/project/packages/sdk/client-services/src/packlets/services/diagnostics.ts";
|
|
192
192
|
var DEFAULT_TIMEOUT = 1e3;
|
|
193
193
|
var createDiagnostics = async (clientServices, serviceContext, config) => {
|
|
194
194
|
const diagnostics = {
|
|
@@ -333,7 +333,7 @@ var import_context = require("@dxos/context");
|
|
|
333
333
|
var import_credentials3 = require("@dxos/credentials");
|
|
334
334
|
var import_log2 = require("@dxos/log");
|
|
335
335
|
var import_protocols2 = require("@dxos/protocols");
|
|
336
|
-
var __dxlog_file2 = "/home/
|
|
336
|
+
var __dxlog_file2 = "/home/circleci/project/packages/sdk/client-services/src/packlets/identity/authenticator.ts";
|
|
337
337
|
var Credential = import_protocols2.schema.getCodecForType("dxos.halo.credentials.Credential");
|
|
338
338
|
var createAuthProvider = (signer) => async (nonce) => {
|
|
339
339
|
const credential = await signer.createCredential({
|
|
@@ -464,7 +464,7 @@ function _ts_decorate2(decorators, target, key, desc) {
|
|
|
464
464
|
r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
465
465
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
466
466
|
}
|
|
467
|
-
var __dxlog_file3 = "/home/
|
|
467
|
+
var __dxlog_file3 = "/home/circleci/project/packages/sdk/client-services/src/packlets/identity/identity.ts";
|
|
468
468
|
var Identity = class Identity2 {
|
|
469
469
|
constructor({ space, signer, identityKey, deviceKey }) {
|
|
470
470
|
this.stateUpdate = new import_async2.Event();
|
|
@@ -646,7 +646,7 @@ function _ts_decorate3(decorators, target, key, desc) {
|
|
|
646
646
|
r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
647
647
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
648
648
|
}
|
|
649
|
-
var __dxlog_file4 = "/home/
|
|
649
|
+
var __dxlog_file4 = "/home/circleci/project/packages/sdk/client-services/src/packlets/identity/identity-manager.ts";
|
|
650
650
|
var IdentityManager = class IdentityManager2 {
|
|
651
651
|
// TODO(burdon): IdentityManagerParams.
|
|
652
652
|
// TODO(dmaretskyi): Perhaps this should take/generate the peerKey outside of an initialized identity.
|
|
@@ -1006,12 +1006,13 @@ var import_codec_protobuf3 = require("@dxos/codec-protobuf");
|
|
|
1006
1006
|
var import_credentials8 = require("@dxos/credentials");
|
|
1007
1007
|
var import_debug3 = require("@dxos/debug");
|
|
1008
1008
|
var import_invariant4 = require("@dxos/invariant");
|
|
1009
|
-
var __dxlog_file5 = "/home/
|
|
1009
|
+
var __dxlog_file5 = "/home/circleci/project/packages/sdk/client-services/src/packlets/identity/identity-service.ts";
|
|
1010
1010
|
var IdentityServiceImpl = class {
|
|
1011
|
-
constructor(_createIdentity, _identityManager, _keyring) {
|
|
1011
|
+
constructor(_createIdentity, _identityManager, _keyring, _onProfileUpdate) {
|
|
1012
1012
|
this._createIdentity = _createIdentity;
|
|
1013
1013
|
this._identityManager = _identityManager;
|
|
1014
1014
|
this._keyring = _keyring;
|
|
1015
|
+
this._onProfileUpdate = _onProfileUpdate;
|
|
1015
1016
|
}
|
|
1016
1017
|
async createIdentity(request) {
|
|
1017
1018
|
await this._createIdentity(request);
|
|
@@ -1042,7 +1043,7 @@ var IdentityServiceImpl = class {
|
|
|
1042
1043
|
async updateProfile(profile) {
|
|
1043
1044
|
(0, import_invariant4.invariant)(this._identityManager.identity, "Identity not initialized.", {
|
|
1044
1045
|
F: __dxlog_file5,
|
|
1045
|
-
L:
|
|
1046
|
+
L: 60,
|
|
1046
1047
|
S: this,
|
|
1047
1048
|
A: [
|
|
1048
1049
|
"this._identityManager.identity",
|
|
@@ -1050,12 +1051,13 @@ var IdentityServiceImpl = class {
|
|
|
1050
1051
|
]
|
|
1051
1052
|
});
|
|
1052
1053
|
await this._identityManager.updateProfile(profile);
|
|
1054
|
+
await this._onProfileUpdate?.(this._identityManager.identity.profileDocument);
|
|
1053
1055
|
return this._getIdentity();
|
|
1054
1056
|
}
|
|
1055
1057
|
async signPresentation({ presentation, nonce }) {
|
|
1056
1058
|
(0, import_invariant4.invariant)(this._identityManager.identity, "Identity not initialized.", {
|
|
1057
1059
|
F: __dxlog_file5,
|
|
1058
|
-
L:
|
|
1060
|
+
L: 67,
|
|
1059
1061
|
S: this,
|
|
1060
1062
|
A: [
|
|
1061
1063
|
"this._identityManager.identity",
|
|
@@ -1075,7 +1077,7 @@ var IdentityServiceImpl = class {
|
|
|
1075
1077
|
// packages/sdk/client-services/src/packlets/invitations/device-invitation-protocol.ts
|
|
1076
1078
|
var import_invariant5 = require("@dxos/invariant");
|
|
1077
1079
|
var import_services2 = require("@dxos/protocols/proto/dxos/client/services");
|
|
1078
|
-
var __dxlog_file6 = "/home/
|
|
1080
|
+
var __dxlog_file6 = "/home/circleci/project/packages/sdk/client-services/src/packlets/invitations/device-invitation-protocol.ts";
|
|
1079
1081
|
var DeviceInvitationProtocol = class {
|
|
1080
1082
|
constructor(_keyring, _getIdentity, _acceptIdentity) {
|
|
1081
1083
|
this._keyring = _keyring;
|
|
@@ -1185,7 +1187,7 @@ var import_protocols4 = require("@dxos/protocols");
|
|
|
1185
1187
|
var import_services3 = require("@dxos/protocols/proto/dxos/client/services");
|
|
1186
1188
|
var import_invitations = require("@dxos/protocols/proto/dxos/halo/invitations");
|
|
1187
1189
|
var import_teleport = require("@dxos/teleport");
|
|
1188
|
-
var __dxlog_file7 = "/home/
|
|
1190
|
+
var __dxlog_file7 = "/home/circleci/project/packages/sdk/client-services/src/packlets/invitations/invitation-extension.ts";
|
|
1189
1191
|
var OPTIONS_TIMEOUT = 1e4;
|
|
1190
1192
|
var MAX_OTP_ATTEMPTS = 3;
|
|
1191
1193
|
var InvitationHostExtension = class extends import_teleport.RpcExtension {
|
|
@@ -1274,7 +1276,6 @@ var InvitationHostExtension = class extends import_teleport.RpcExtension {
|
|
|
1274
1276
|
C: (f, a) => f(...a)
|
|
1275
1277
|
});
|
|
1276
1278
|
return {
|
|
1277
|
-
spaceKey: this.invitation.authMethod === import_services3.Invitation.AuthMethod.NONE ? this.invitation.spaceKey : void 0,
|
|
1278
1279
|
authMethod: this.invitation.authMethod
|
|
1279
1280
|
};
|
|
1280
1281
|
},
|
|
@@ -1284,7 +1285,7 @@ var InvitationHostExtension = class extends import_teleport.RpcExtension {
|
|
|
1284
1285
|
id: traceId
|
|
1285
1286
|
}), {
|
|
1286
1287
|
F: __dxlog_file7,
|
|
1287
|
-
L:
|
|
1288
|
+
L: 124,
|
|
1288
1289
|
S: this,
|
|
1289
1290
|
C: (f, a) => f(...a)
|
|
1290
1291
|
});
|
|
@@ -1292,14 +1293,14 @@ var InvitationHostExtension = class extends import_teleport.RpcExtension {
|
|
|
1292
1293
|
authCode: code
|
|
1293
1294
|
}, {
|
|
1294
1295
|
F: __dxlog_file7,
|
|
1295
|
-
L:
|
|
1296
|
+
L: 125,
|
|
1296
1297
|
S: this,
|
|
1297
1298
|
C: (f, a) => f(...a)
|
|
1298
1299
|
});
|
|
1299
1300
|
let status = import_invitations.AuthenticationResponse.Status.OK;
|
|
1300
1301
|
(0, import_invariant6.invariant)(this.invitation, "Invitation is not set.", {
|
|
1301
1302
|
F: __dxlog_file7,
|
|
1302
|
-
L:
|
|
1303
|
+
L: 128,
|
|
1303
1304
|
S: this,
|
|
1304
1305
|
A: [
|
|
1305
1306
|
"this.invitation",
|
|
@@ -1310,7 +1311,7 @@ var InvitationHostExtension = class extends import_teleport.RpcExtension {
|
|
|
1310
1311
|
case import_services3.Invitation.AuthMethod.NONE: {
|
|
1311
1312
|
(0, import_log5.log)("authentication not required", void 0, {
|
|
1312
1313
|
F: __dxlog_file7,
|
|
1313
|
-
L:
|
|
1314
|
+
L: 131,
|
|
1314
1315
|
S: this,
|
|
1315
1316
|
C: (f, a) => f(...a)
|
|
1316
1317
|
});
|
|
@@ -1335,7 +1336,7 @@ var InvitationHostExtension = class extends import_teleport.RpcExtension {
|
|
|
1335
1336
|
authMethod: this.invitation.authMethod
|
|
1336
1337
|
}, {
|
|
1337
1338
|
F: __dxlog_file7,
|
|
1338
|
-
L:
|
|
1339
|
+
L: 149,
|
|
1339
1340
|
S: this,
|
|
1340
1341
|
C: (f, a) => f(...a)
|
|
1341
1342
|
});
|
|
@@ -1350,7 +1351,7 @@ var InvitationHostExtension = class extends import_teleport.RpcExtension {
|
|
|
1350
1351
|
}
|
|
1351
1352
|
}), {
|
|
1352
1353
|
F: __dxlog_file7,
|
|
1353
|
-
L:
|
|
1354
|
+
L: 155,
|
|
1354
1355
|
S: this,
|
|
1355
1356
|
C: (f, a) => f(...a)
|
|
1356
1357
|
});
|
|
@@ -1364,14 +1365,14 @@ var InvitationHostExtension = class extends import_teleport.RpcExtension {
|
|
|
1364
1365
|
id: traceId
|
|
1365
1366
|
}), {
|
|
1366
1367
|
F: __dxlog_file7,
|
|
1367
|
-
L:
|
|
1368
|
+
L: 161,
|
|
1368
1369
|
S: this,
|
|
1369
1370
|
C: (f, a) => f(...a)
|
|
1370
1371
|
});
|
|
1371
1372
|
try {
|
|
1372
1373
|
(0, import_invariant6.invariant)(this.invitation, "Invitation is not set.", {
|
|
1373
1374
|
F: __dxlog_file7,
|
|
1374
|
-
L:
|
|
1375
|
+
L: 164,
|
|
1375
1376
|
S: this,
|
|
1376
1377
|
A: [
|
|
1377
1378
|
"this.invitation",
|
|
@@ -1386,7 +1387,7 @@ var InvitationHostExtension = class extends import_teleport.RpcExtension {
|
|
|
1386
1387
|
id: traceId
|
|
1387
1388
|
}), {
|
|
1388
1389
|
F: __dxlog_file7,
|
|
1389
|
-
L:
|
|
1390
|
+
L: 172,
|
|
1390
1391
|
S: this,
|
|
1391
1392
|
C: (f, a) => f(...a)
|
|
1392
1393
|
});
|
|
@@ -1443,7 +1444,7 @@ var InvitationGuestExtension = class extends import_teleport.RpcExtension {
|
|
|
1443
1444
|
options: async (options) => {
|
|
1444
1445
|
(0, import_invariant6.invariant)(!this._remoteOptions, "Remote options already set.", {
|
|
1445
1446
|
F: __dxlog_file7,
|
|
1446
|
-
L:
|
|
1447
|
+
L: 239,
|
|
1447
1448
|
S: this,
|
|
1448
1449
|
A: [
|
|
1449
1450
|
"!this._remoteOptions",
|
|
@@ -1470,7 +1471,7 @@ var InvitationGuestExtension = class extends import_teleport.RpcExtension {
|
|
|
1470
1471
|
try {
|
|
1471
1472
|
(0, import_log5.log)("begin options", void 0, {
|
|
1472
1473
|
F: __dxlog_file7,
|
|
1473
|
-
L:
|
|
1474
|
+
L: 260,
|
|
1474
1475
|
S: this,
|
|
1475
1476
|
C: (f, a) => f(...a)
|
|
1476
1477
|
});
|
|
@@ -1482,7 +1483,7 @@ var InvitationGuestExtension = class extends import_teleport.RpcExtension {
|
|
|
1482
1483
|
}));
|
|
1483
1484
|
(0, import_log5.log)("end options", void 0, {
|
|
1484
1485
|
F: __dxlog_file7,
|
|
1485
|
-
L:
|
|
1486
|
+
L: 263,
|
|
1486
1487
|
S: this,
|
|
1487
1488
|
C: (f, a) => f(...a)
|
|
1488
1489
|
});
|
|
@@ -1496,7 +1497,7 @@ var InvitationGuestExtension = class extends import_teleport.RpcExtension {
|
|
|
1496
1497
|
} catch (err) {
|
|
1497
1498
|
(0, import_log5.log)("openError", err, {
|
|
1498
1499
|
F: __dxlog_file7,
|
|
1499
|
-
L:
|
|
1500
|
+
L: 273,
|
|
1500
1501
|
S: this,
|
|
1501
1502
|
C: (f, a) => f(...a)
|
|
1502
1503
|
});
|
|
@@ -1506,7 +1507,7 @@ var InvitationGuestExtension = class extends import_teleport.RpcExtension {
|
|
|
1506
1507
|
async onClose() {
|
|
1507
1508
|
(0, import_log5.log)("onClose", void 0, {
|
|
1508
1509
|
F: __dxlog_file7,
|
|
1509
|
-
L:
|
|
1510
|
+
L: 279,
|
|
1510
1511
|
S: this,
|
|
1511
1512
|
C: (f, a) => f(...a)
|
|
1512
1513
|
});
|
|
@@ -1516,7 +1517,7 @@ var InvitationGuestExtension = class extends import_teleport.RpcExtension {
|
|
|
1516
1517
|
var isAuthenticationRequired = (invitation) => invitation.authMethod !== import_services3.Invitation.AuthMethod.NONE;
|
|
1517
1518
|
|
|
1518
1519
|
// packages/sdk/client-services/src/packlets/invitations/invitations-handler.ts
|
|
1519
|
-
var __dxlog_file8 = "/home/
|
|
1520
|
+
var __dxlog_file8 = "/home/circleci/project/packages/sdk/client-services/src/packlets/invitations/invitations-handler.ts";
|
|
1520
1521
|
var InvitationsHandler = class {
|
|
1521
1522
|
/**
|
|
1522
1523
|
* @internal
|
|
@@ -1877,14 +1878,11 @@ var InvitationsHandler = class {
|
|
|
1877
1878
|
C: (f, a) => f(...a)
|
|
1878
1879
|
});
|
|
1879
1880
|
invitation.authMethod = introductionResponse.authMethod;
|
|
1880
|
-
if (introductionResponse.spaceKey) {
|
|
1881
|
-
invitation.spaceKey = introductionResponse.spaceKey;
|
|
1882
|
-
}
|
|
1883
1881
|
if (isAuthenticationRequired(invitation)) {
|
|
1884
1882
|
for (let attempt = 1; attempt <= MAX_OTP_ATTEMPTS; attempt++) {
|
|
1885
1883
|
(0, import_log6.log)("guest waiting for authentication code...", void 0, {
|
|
1886
1884
|
F: __dxlog_file8,
|
|
1887
|
-
L:
|
|
1885
|
+
L: 286,
|
|
1888
1886
|
S: this,
|
|
1889
1887
|
C: (f, a) => f(...a)
|
|
1890
1888
|
});
|
|
@@ -1896,7 +1894,7 @@ var InvitationsHandler = class {
|
|
|
1896
1894
|
});
|
|
1897
1895
|
(0, import_log6.log)("sending authentication request", void 0, {
|
|
1898
1896
|
F: __dxlog_file8,
|
|
1899
|
-
L:
|
|
1897
|
+
L: 290,
|
|
1900
1898
|
S: this,
|
|
1901
1899
|
C: (f, a) => f(...a)
|
|
1902
1900
|
});
|
|
@@ -1917,7 +1915,7 @@ var InvitationsHandler = class {
|
|
|
1917
1915
|
attempt
|
|
1918
1916
|
}, {
|
|
1919
1917
|
F: __dxlog_file8,
|
|
1920
|
-
L:
|
|
1918
|
+
L: 301,
|
|
1921
1919
|
S: this,
|
|
1922
1920
|
C: (f, a) => f(...a)
|
|
1923
1921
|
});
|
|
@@ -1934,7 +1932,7 @@ var InvitationsHandler = class {
|
|
|
1934
1932
|
...protocol.toJSON()
|
|
1935
1933
|
}, {
|
|
1936
1934
|
F: __dxlog_file8,
|
|
1937
|
-
L:
|
|
1935
|
+
L: 312,
|
|
1938
1936
|
S: this,
|
|
1939
1937
|
C: (f, a) => f(...a)
|
|
1940
1938
|
});
|
|
@@ -1946,7 +1944,7 @@ var InvitationsHandler = class {
|
|
|
1946
1944
|
...protocol.toJSON()
|
|
1947
1945
|
}, {
|
|
1948
1946
|
F: __dxlog_file8,
|
|
1949
|
-
L:
|
|
1947
|
+
L: 323,
|
|
1950
1948
|
S: this,
|
|
1951
1949
|
C: (f, a) => f(...a)
|
|
1952
1950
|
});
|
|
@@ -1958,7 +1956,7 @@ var InvitationsHandler = class {
|
|
|
1958
1956
|
id: traceId
|
|
1959
1957
|
}), {
|
|
1960
1958
|
F: __dxlog_file8,
|
|
1961
|
-
L:
|
|
1959
|
+
L: 325,
|
|
1962
1960
|
S: this,
|
|
1963
1961
|
C: (f, a) => f(...a)
|
|
1964
1962
|
});
|
|
@@ -1968,7 +1966,7 @@ var InvitationsHandler = class {
|
|
|
1968
1966
|
...protocol.toJSON()
|
|
1969
1967
|
}, {
|
|
1970
1968
|
F: __dxlog_file8,
|
|
1971
|
-
L:
|
|
1969
|
+
L: 328,
|
|
1972
1970
|
S: this,
|
|
1973
1971
|
C: (f, a) => f(...a)
|
|
1974
1972
|
});
|
|
@@ -1978,7 +1976,7 @@ var InvitationsHandler = class {
|
|
|
1978
1976
|
} else {
|
|
1979
1977
|
(0, import_log6.log)("auth failed", err, {
|
|
1980
1978
|
F: __dxlog_file8,
|
|
1981
|
-
L:
|
|
1979
|
+
L: 331,
|
|
1982
1980
|
S: this,
|
|
1983
1981
|
C: (f, a) => f(...a)
|
|
1984
1982
|
});
|
|
@@ -1989,7 +1987,7 @@ var InvitationsHandler = class {
|
|
|
1989
1987
|
error: err
|
|
1990
1988
|
}), {
|
|
1991
1989
|
F: __dxlog_file8,
|
|
1992
|
-
L:
|
|
1990
|
+
L: 334,
|
|
1993
1991
|
S: this,
|
|
1994
1992
|
C: (f, a) => f(...a)
|
|
1995
1993
|
});
|
|
@@ -2007,7 +2005,7 @@ var InvitationsHandler = class {
|
|
|
2007
2005
|
...protocol.toJSON()
|
|
2008
2006
|
}, {
|
|
2009
2007
|
F: __dxlog_file8,
|
|
2010
|
-
L:
|
|
2008
|
+
L: 345,
|
|
2011
2009
|
S: this,
|
|
2012
2010
|
C: (f, a) => f(...a)
|
|
2013
2011
|
});
|
|
@@ -2017,7 +2015,7 @@ var InvitationsHandler = class {
|
|
|
2017
2015
|
} else {
|
|
2018
2016
|
(0, import_log6.log)("auth failed", err, {
|
|
2019
2017
|
F: __dxlog_file8,
|
|
2020
|
-
L:
|
|
2018
|
+
L: 348,
|
|
2021
2019
|
S: this,
|
|
2022
2020
|
C: (f, a) => f(...a)
|
|
2023
2021
|
});
|
|
@@ -2030,7 +2028,7 @@ var InvitationsHandler = class {
|
|
|
2030
2028
|
(0, import_async5.scheduleTask)(ctx, async () => {
|
|
2031
2029
|
(0, import_invariant7.invariant)(invitation.swarmKey, void 0, {
|
|
2032
2030
|
F: __dxlog_file8,
|
|
2033
|
-
L:
|
|
2031
|
+
L: 358,
|
|
2034
2032
|
S: this,
|
|
2035
2033
|
A: [
|
|
2036
2034
|
"invitation.swarmKey",
|
|
@@ -2075,7 +2073,7 @@ var import_codec_protobuf4 = require("@dxos/codec-protobuf");
|
|
|
2075
2073
|
var import_invariant8 = require("@dxos/invariant");
|
|
2076
2074
|
var import_log7 = require("@dxos/log");
|
|
2077
2075
|
var import_services5 = require("@dxos/protocols/proto/dxos/client/services");
|
|
2078
|
-
var __dxlog_file9 = "/home/
|
|
2076
|
+
var __dxlog_file9 = "/home/circleci/project/packages/sdk/client-services/src/packlets/invitations/invitations-service.ts";
|
|
2079
2077
|
var InvitationsServiceImpl = class {
|
|
2080
2078
|
constructor(_invitationsHandler, _getHandler) {
|
|
2081
2079
|
this._invitationsHandler = _invitationsHandler;
|
|
@@ -2257,7 +2255,7 @@ var import_feed_store2 = require("@dxos/feed-store");
|
|
|
2257
2255
|
var import_invariant9 = require("@dxos/invariant");
|
|
2258
2256
|
var import_log8 = require("@dxos/log");
|
|
2259
2257
|
var import_services6 = require("@dxos/protocols/proto/dxos/client/services");
|
|
2260
|
-
var __dxlog_file10 = "/home/
|
|
2258
|
+
var __dxlog_file10 = "/home/circleci/project/packages/sdk/client-services/src/packlets/invitations/space-invitation-protocol.ts";
|
|
2261
2259
|
var SpaceInvitationProtocol = class {
|
|
2262
2260
|
constructor(_spaceManager, _signingContext, _keyring, _spaceKey) {
|
|
2263
2261
|
this._spaceManager = _spaceManager;
|
|
@@ -2347,7 +2345,7 @@ var SpaceInvitationProtocol = class {
|
|
|
2347
2345
|
}
|
|
2348
2346
|
createIntroduction() {
|
|
2349
2347
|
return {
|
|
2350
|
-
profile: this._signingContext.
|
|
2348
|
+
profile: this._signingContext.getProfile()
|
|
2351
2349
|
};
|
|
2352
2350
|
}
|
|
2353
2351
|
async createAdmissionRequest() {
|
|
@@ -2441,7 +2439,7 @@ var import_log9 = require("@dxos/log");
|
|
|
2441
2439
|
var import_protocols6 = require("@dxos/protocols");
|
|
2442
2440
|
var import_teleport2 = require("@dxos/teleport");
|
|
2443
2441
|
var import_util3 = require("@dxos/util");
|
|
2444
|
-
var __dxlog_file11 = "/home/
|
|
2442
|
+
var __dxlog_file11 = "/home/circleci/project/packages/sdk/client-services/src/packlets/spaces/notarization-plugin.ts";
|
|
2445
2443
|
var DEFAULT_RETRY_TIMEOUT = 1e3;
|
|
2446
2444
|
var DEFAULT_SUCCESS_DELAY = 1e3;
|
|
2447
2445
|
var DEFAULT_NOTARIZE_TIMEOUT = 1e4;
|
|
@@ -2711,7 +2709,7 @@ function _ts_decorate4(decorators, target, key, desc) {
|
|
|
2711
2709
|
r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
2712
2710
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
2713
2711
|
}
|
|
2714
|
-
var __dxlog_file12 = "/home/
|
|
2712
|
+
var __dxlog_file12 = "/home/circleci/project/packages/sdk/client-services/src/packlets/spaces/data-space.ts";
|
|
2715
2713
|
var ENABLE_FEED_PURGE = false;
|
|
2716
2714
|
var DataSpace = class DataSpace2 {
|
|
2717
2715
|
constructor(params) {
|
|
@@ -2978,6 +2976,21 @@ var DataSpace = class DataSpace2 {
|
|
|
2978
2976
|
await this._metadataStore.setWritableFeedKeys(this.key, this.inner.controlFeedKey, this.inner.dataFeedKey);
|
|
2979
2977
|
}
|
|
2980
2978
|
}
|
|
2979
|
+
// TODO(dmaretskyi): Use profile from signing context.
|
|
2980
|
+
async updateOwnProfile(profile) {
|
|
2981
|
+
const credential = await this._signingContext.credentialSigner.createCredential({
|
|
2982
|
+
subject: this._signingContext.identityKey,
|
|
2983
|
+
assertion: {
|
|
2984
|
+
"@type": "dxos.halo.credentials.MemberProfile",
|
|
2985
|
+
profile
|
|
2986
|
+
}
|
|
2987
|
+
});
|
|
2988
|
+
await this.inner.controlPipeline.writer.write({
|
|
2989
|
+
credential: {
|
|
2990
|
+
credential
|
|
2991
|
+
}
|
|
2992
|
+
});
|
|
2993
|
+
}
|
|
2981
2994
|
async createEpoch() {
|
|
2982
2995
|
const epoch = await this.dataPipeline.createEpoch();
|
|
2983
2996
|
const receipt = await this.inner.controlPipeline.writer.write({
|
|
@@ -3026,7 +3039,7 @@ var DataSpace = class DataSpace2 {
|
|
|
3026
3039
|
state: import_services7.SpaceState[this._state]
|
|
3027
3040
|
}, {
|
|
3028
3041
|
F: __dxlog_file12,
|
|
3029
|
-
L:
|
|
3042
|
+
L: 404,
|
|
3030
3043
|
S: this,
|
|
3031
3044
|
C: (f, a) => f(...a)
|
|
3032
3045
|
});
|
|
@@ -3086,7 +3099,7 @@ var spaceGenesis = async (keyring, signingContext, space) => {
|
|
|
3086
3099
|
"@type": "dxos.halo.credentials.SpaceMember",
|
|
3087
3100
|
spaceKey: space.key,
|
|
3088
3101
|
role: import_credentials13.SpaceMember.Role.ADMIN,
|
|
3089
|
-
profile: signingContext.
|
|
3102
|
+
profile: signingContext.getProfile(),
|
|
3090
3103
|
genesisFeedKey: space.controlFeedKey ?? (0, import_debug5.failUndefined)()
|
|
3091
3104
|
}
|
|
3092
3105
|
}),
|
|
@@ -3142,7 +3155,7 @@ function _ts_decorate5(decorators, target, key, desc) {
|
|
|
3142
3155
|
r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
3143
3156
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
3144
3157
|
}
|
|
3145
|
-
var __dxlog_file13 = "/home/
|
|
3158
|
+
var __dxlog_file13 = "/home/circleci/project/packages/sdk/client-services/src/packlets/spaces/data-space-manager.ts";
|
|
3146
3159
|
var PRESENCE_ANNOUNCE_INTERVAL = 1e4;
|
|
3147
3160
|
var PRESENCE_OFFLINE_TIMEOUT = 2e4;
|
|
3148
3161
|
var DataSpaceManager = class DataSpaceManager2 {
|
|
@@ -3166,7 +3179,7 @@ var DataSpaceManager = class DataSpaceManager2 {
|
|
|
3166
3179
|
async open() {
|
|
3167
3180
|
(0, import_log11.log)("open", void 0, {
|
|
3168
3181
|
F: __dxlog_file13,
|
|
3169
|
-
L:
|
|
3182
|
+
L: 83,
|
|
3170
3183
|
S: this,
|
|
3171
3184
|
C: (f, a) => f(...a)
|
|
3172
3185
|
});
|
|
@@ -3174,7 +3187,7 @@ var DataSpaceManager = class DataSpaceManager2 {
|
|
|
3174
3187
|
id: this._instanceId
|
|
3175
3188
|
}), {
|
|
3176
3189
|
F: __dxlog_file13,
|
|
3177
|
-
L:
|
|
3190
|
+
L: 84,
|
|
3178
3191
|
S: this,
|
|
3179
3192
|
C: (f, a) => f(...a)
|
|
3180
3193
|
});
|
|
@@ -3182,7 +3195,7 @@ var DataSpaceManager = class DataSpaceManager2 {
|
|
|
3182
3195
|
spaces: this._metadataStore.spaces.length
|
|
3183
3196
|
}, {
|
|
3184
3197
|
F: __dxlog_file13,
|
|
3185
|
-
L:
|
|
3198
|
+
L: 85,
|
|
3186
3199
|
S: this,
|
|
3187
3200
|
C: (f, a) => f(...a)
|
|
3188
3201
|
});
|
|
@@ -3192,7 +3205,7 @@ var DataSpaceManager = class DataSpaceManager2 {
|
|
|
3192
3205
|
spaceMetadata
|
|
3193
3206
|
}, {
|
|
3194
3207
|
F: __dxlog_file13,
|
|
3195
|
-
L:
|
|
3208
|
+
L: 89,
|
|
3196
3209
|
S: this,
|
|
3197
3210
|
C: (f, a) => f(...a)
|
|
3198
3211
|
});
|
|
@@ -3203,7 +3216,7 @@ var DataSpaceManager = class DataSpaceManager2 {
|
|
|
3203
3216
|
err
|
|
3204
3217
|
}, {
|
|
3205
3218
|
F: __dxlog_file13,
|
|
3206
|
-
L:
|
|
3219
|
+
L: 92,
|
|
3207
3220
|
S: this,
|
|
3208
3221
|
C: (f, a) => f(...a)
|
|
3209
3222
|
});
|
|
@@ -3220,7 +3233,7 @@ var DataSpaceManager = class DataSpaceManager2 {
|
|
|
3220
3233
|
id: this._instanceId
|
|
3221
3234
|
}), {
|
|
3222
3235
|
F: __dxlog_file13,
|
|
3223
|
-
L:
|
|
3236
|
+
L: 105,
|
|
3224
3237
|
S: this,
|
|
3225
3238
|
C: (f, a) => f(...a)
|
|
3226
3239
|
});
|
|
@@ -3228,7 +3241,7 @@ var DataSpaceManager = class DataSpaceManager2 {
|
|
|
3228
3241
|
async close() {
|
|
3229
3242
|
(0, import_log11.log)("close", void 0, {
|
|
3230
3243
|
F: __dxlog_file13,
|
|
3231
|
-
L:
|
|
3244
|
+
L: 110,
|
|
3232
3245
|
S: this,
|
|
3233
3246
|
C: (f, a) => f(...a)
|
|
3234
3247
|
});
|
|
@@ -3244,7 +3257,7 @@ var DataSpaceManager = class DataSpaceManager2 {
|
|
|
3244
3257
|
async createSpace() {
|
|
3245
3258
|
(0, import_invariant11.invariant)(this._isOpen, "Not open.", {
|
|
3246
3259
|
F: __dxlog_file13,
|
|
3247
|
-
L:
|
|
3260
|
+
L: 123,
|
|
3248
3261
|
S: this,
|
|
3249
3262
|
A: [
|
|
3250
3263
|
"this._isOpen",
|
|
@@ -3265,7 +3278,7 @@ var DataSpaceManager = class DataSpaceManager2 {
|
|
|
3265
3278
|
spaceKey
|
|
3266
3279
|
}, {
|
|
3267
3280
|
F: __dxlog_file13,
|
|
3268
|
-
L:
|
|
3281
|
+
L: 135,
|
|
3269
3282
|
S: this,
|
|
3270
3283
|
C: (f, a) => f(...a)
|
|
3271
3284
|
});
|
|
@@ -3275,7 +3288,7 @@ var DataSpaceManager = class DataSpaceManager2 {
|
|
|
3275
3288
|
const memberCredential = credentials[1];
|
|
3276
3289
|
(0, import_invariant11.invariant)((0, import_credentials14.getCredentialAssertion)(memberCredential)["@type"] === "dxos.halo.credentials.SpaceMember", void 0, {
|
|
3277
3290
|
F: __dxlog_file13,
|
|
3278
|
-
L:
|
|
3291
|
+
L: 142,
|
|
3279
3292
|
S: this,
|
|
3280
3293
|
A: [
|
|
3281
3294
|
"getCredentialAssertion(memberCredential)['@type'] === 'dxos.halo.credentials.SpaceMember'",
|
|
@@ -3293,13 +3306,13 @@ var DataSpaceManager = class DataSpaceManager2 {
|
|
|
3293
3306
|
opts
|
|
3294
3307
|
}, {
|
|
3295
3308
|
F: __dxlog_file13,
|
|
3296
|
-
L:
|
|
3309
|
+
L: 154,
|
|
3297
3310
|
S: this,
|
|
3298
3311
|
C: (f, a) => f(...a)
|
|
3299
3312
|
});
|
|
3300
3313
|
(0, import_invariant11.invariant)(this._isOpen, "Not open.", {
|
|
3301
3314
|
F: __dxlog_file13,
|
|
3302
|
-
L:
|
|
3315
|
+
L: 155,
|
|
3303
3316
|
S: this,
|
|
3304
3317
|
A: [
|
|
3305
3318
|
"this._isOpen",
|
|
@@ -3308,7 +3321,7 @@ var DataSpaceManager = class DataSpaceManager2 {
|
|
|
3308
3321
|
});
|
|
3309
3322
|
(0, import_invariant11.invariant)(!this._spaces.has(opts.spaceKey), "Space already exists.", {
|
|
3310
3323
|
F: __dxlog_file13,
|
|
3311
|
-
L:
|
|
3324
|
+
L: 156,
|
|
3312
3325
|
S: this,
|
|
3313
3326
|
A: [
|
|
3314
3327
|
"!this._spaces.has(opts.spaceKey)",
|
|
@@ -3343,7 +3356,7 @@ var DataSpaceManager = class DataSpaceManager2 {
|
|
|
3343
3356
|
metadata
|
|
3344
3357
|
}, {
|
|
3345
3358
|
F: __dxlog_file13,
|
|
3346
|
-
L:
|
|
3359
|
+
L: 189,
|
|
3347
3360
|
S: this,
|
|
3348
3361
|
C: (f, a) => f(...a)
|
|
3349
3362
|
});
|
|
@@ -3379,7 +3392,7 @@ var DataSpaceManager = class DataSpaceManager2 {
|
|
|
3379
3392
|
onAuthFailure: () => {
|
|
3380
3393
|
import_log11.log.warn("auth failure", void 0, {
|
|
3381
3394
|
F: __dxlog_file13,
|
|
3382
|
-
L:
|
|
3395
|
+
L: 224,
|
|
3383
3396
|
S: this,
|
|
3384
3397
|
C: (f, a) => f(...a)
|
|
3385
3398
|
});
|
|
@@ -3403,7 +3416,7 @@ var DataSpaceManager = class DataSpaceManager2 {
|
|
|
3403
3416
|
space: space.key
|
|
3404
3417
|
}, {
|
|
3405
3418
|
F: __dxlog_file13,
|
|
3406
|
-
L:
|
|
3419
|
+
L: 242,
|
|
3407
3420
|
S: this,
|
|
3408
3421
|
C: (f, a) => f(...a)
|
|
3409
3422
|
});
|
|
@@ -3415,7 +3428,7 @@ var DataSpaceManager = class DataSpaceManager2 {
|
|
|
3415
3428
|
open: this._isOpen
|
|
3416
3429
|
}, {
|
|
3417
3430
|
F: __dxlog_file13,
|
|
3418
|
-
L:
|
|
3431
|
+
L: 249,
|
|
3419
3432
|
S: this,
|
|
3420
3433
|
C: (f, a) => f(...a)
|
|
3421
3434
|
});
|
|
@@ -3428,7 +3441,7 @@ var DataSpaceManager = class DataSpaceManager2 {
|
|
|
3428
3441
|
space: space.key
|
|
3429
3442
|
}, {
|
|
3430
3443
|
F: __dxlog_file13,
|
|
3431
|
-
L:
|
|
3444
|
+
L: 255,
|
|
3432
3445
|
S: this,
|
|
3433
3446
|
C: (f, a) => f(...a)
|
|
3434
3447
|
});
|
|
@@ -3474,7 +3487,7 @@ var import_invariant12 = require("@dxos/invariant");
|
|
|
3474
3487
|
var import_log12 = require("@dxos/log");
|
|
3475
3488
|
var import_protocols9 = require("@dxos/protocols");
|
|
3476
3489
|
var import_services9 = require("@dxos/protocols/proto/dxos/client/services");
|
|
3477
|
-
var __dxlog_file14 = "/home/
|
|
3490
|
+
var __dxlog_file14 = "/home/circleci/project/packages/sdk/client-services/src/packlets/spaces/spaces-service.ts";
|
|
3478
3491
|
var SpacesServiceImpl = class {
|
|
3479
3492
|
constructor(_identityManager, _spaceManager, _dataServiceSubscriptions, _getDataSpaceManager) {
|
|
3480
3493
|
this._identityManager = _identityManager;
|
|
@@ -3672,7 +3685,7 @@ var SpacesServiceImpl = class {
|
|
|
3672
3685
|
identity: {
|
|
3673
3686
|
identityKey: member.key,
|
|
3674
3687
|
profile: {
|
|
3675
|
-
displayName: member.
|
|
3688
|
+
displayName: member.profile?.displayName
|
|
3676
3689
|
}
|
|
3677
3690
|
},
|
|
3678
3691
|
presence: member.removed ? import_services9.SpaceMember.PresenceState.REMOVED : isMe || peers.length > 0 ? import_services9.SpaceMember.PresenceState.ONLINE : import_services9.SpaceMember.PresenceState.OFFLINE,
|
|
@@ -3698,7 +3711,7 @@ function _ts_decorate6(decorators, target, key, desc) {
|
|
|
3698
3711
|
r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
3699
3712
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
3700
3713
|
}
|
|
3701
|
-
var __dxlog_file15 = "/home/
|
|
3714
|
+
var __dxlog_file15 = "/home/circleci/project/packages/sdk/client-services/src/packlets/services/service-context.ts";
|
|
3702
3715
|
var ServiceContext = class ServiceContext2 {
|
|
3703
3716
|
constructor(storage, networkManager, signalManager, modelFactory) {
|
|
3704
3717
|
this.storage = storage;
|
|
@@ -3817,6 +3830,14 @@ var ServiceContext = class ServiceContext2 {
|
|
|
3817
3830
|
});
|
|
3818
3831
|
return factory(invitation);
|
|
3819
3832
|
}
|
|
3833
|
+
async broadcastProfileUpdate(profile) {
|
|
3834
|
+
if (!profile || !this.dataSpaceManager) {
|
|
3835
|
+
return;
|
|
3836
|
+
}
|
|
3837
|
+
for (const space of this.dataSpaceManager.spaces.values()) {
|
|
3838
|
+
await space.updateOwnProfile(profile);
|
|
3839
|
+
}
|
|
3840
|
+
}
|
|
3820
3841
|
async _acceptIdentity(params) {
|
|
3821
3842
|
const identity = await this.identityManager.acceptIdentity(params);
|
|
3822
3843
|
await this._initialize(new import_context8.Context());
|
|
@@ -3832,7 +3853,7 @@ var ServiceContext = class ServiceContext2 {
|
|
|
3832
3853
|
async _initialize(ctx) {
|
|
3833
3854
|
(0, import_log13.log)("initializing spaces...", void 0, {
|
|
3834
3855
|
F: __dxlog_file15,
|
|
3835
|
-
L:
|
|
3856
|
+
L: 199,
|
|
3836
3857
|
S: this,
|
|
3837
3858
|
C: (f, a) => f(...a)
|
|
3838
3859
|
});
|
|
@@ -3841,7 +3862,7 @@ var ServiceContext = class ServiceContext2 {
|
|
|
3841
3862
|
credentialSigner: identity.getIdentityCredentialSigner(),
|
|
3842
3863
|
identityKey: identity.identityKey,
|
|
3843
3864
|
deviceKey: identity.deviceKey,
|
|
3844
|
-
|
|
3865
|
+
getProfile: () => identity.profileDocument,
|
|
3845
3866
|
recordCredential: async (credential) => {
|
|
3846
3867
|
await identity.controlPipeline.writer.write({
|
|
3847
3868
|
credential: {
|
|
@@ -3855,7 +3876,7 @@ var ServiceContext = class ServiceContext2 {
|
|
|
3855
3876
|
this._handlerFactories.set(import_services10.Invitation.Kind.SPACE, (invitation) => {
|
|
3856
3877
|
(0, import_invariant13.invariant)(this.dataSpaceManager, "dataSpaceManager not initialized yet", {
|
|
3857
3878
|
F: __dxlog_file15,
|
|
3858
|
-
L:
|
|
3879
|
+
L: 222,
|
|
3859
3880
|
S: this,
|
|
3860
3881
|
A: [
|
|
3861
3882
|
"this.dataSpaceManager",
|
|
@@ -3879,7 +3900,7 @@ var ServiceContext = class ServiceContext2 {
|
|
|
3879
3900
|
details: assertion
|
|
3880
3901
|
}, {
|
|
3881
3902
|
F: __dxlog_file15,
|
|
3882
|
-
L:
|
|
3903
|
+
L: 238,
|
|
3883
3904
|
S: this,
|
|
3884
3905
|
C: (f, a) => f(...a)
|
|
3885
3906
|
});
|
|
@@ -3890,7 +3911,7 @@ var ServiceContext = class ServiceContext2 {
|
|
|
3890
3911
|
details: assertion
|
|
3891
3912
|
}, {
|
|
3892
3913
|
F: __dxlog_file15,
|
|
3893
|
-
L:
|
|
3914
|
+
L: 242,
|
|
3894
3915
|
S: this,
|
|
3895
3916
|
C: (f, a) => f(...a)
|
|
3896
3917
|
});
|
|
@@ -3901,7 +3922,7 @@ var ServiceContext = class ServiceContext2 {
|
|
|
3901
3922
|
details: assertion
|
|
3902
3923
|
}, {
|
|
3903
3924
|
F: __dxlog_file15,
|
|
3904
|
-
L:
|
|
3925
|
+
L: 247,
|
|
3905
3926
|
S: this,
|
|
3906
3927
|
C: (f, a) => f(...a)
|
|
3907
3928
|
});
|
|
@@ -3912,7 +3933,7 @@ var ServiceContext = class ServiceContext2 {
|
|
|
3912
3933
|
} catch (err) {
|
|
3913
3934
|
import_log13.log.catch(err, void 0, {
|
|
3914
3935
|
F: __dxlog_file15,
|
|
3915
|
-
L:
|
|
3936
|
+
L: 253,
|
|
3916
3937
|
S: this,
|
|
3917
3938
|
C: (f, a) => f(...a)
|
|
3918
3939
|
});
|
|
@@ -4342,7 +4363,7 @@ function _ts_decorate7(decorators, target, key, desc) {
|
|
|
4342
4363
|
r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
4343
4364
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
4344
4365
|
}
|
|
4345
|
-
var __dxlog_file16 = "/home/
|
|
4366
|
+
var __dxlog_file16 = "/home/circleci/project/packages/sdk/client-services/src/packlets/locks/node.ts";
|
|
4346
4367
|
var Lock = class {
|
|
4347
4368
|
constructor({ lockKey: lockPath, onAcquire, onRelease }) {
|
|
4348
4369
|
this._lockPath = lockPath;
|
|
@@ -4649,7 +4670,7 @@ function _ts_decorate8(decorators, target, key, desc) {
|
|
|
4649
4670
|
r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
4650
4671
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
4651
4672
|
}
|
|
4652
|
-
var __dxlog_file17 = "/home/
|
|
4673
|
+
var __dxlog_file17 = "/home/circleci/project/packages/sdk/client-services/src/packlets/services/service-host.ts";
|
|
4653
4674
|
var createDefaultModelFactory = () => {
|
|
4654
4675
|
return new import_model_factory.ModelFactory().registerModel(import_document_model2.DocumentModel).registerModel(import_text_model.TextModel);
|
|
4655
4676
|
};
|
|
@@ -4867,7 +4888,7 @@ var ClientServicesHost = class ClientServicesHost2 {
|
|
|
4867
4888
|
this._serviceContext = new ServiceContext(this._storage, this._networkManager, this._signalManager, this._modelFactory);
|
|
4868
4889
|
this._serviceRegistry.setServices({
|
|
4869
4890
|
SystemService: this._systemService,
|
|
4870
|
-
IdentityService: new IdentityServiceImpl((params) => this._createIdentity(params), this._serviceContext.identityManager, this._serviceContext.keyring),
|
|
4891
|
+
IdentityService: new IdentityServiceImpl((params) => this._createIdentity(params), this._serviceContext.identityManager, this._serviceContext.keyring, (profile) => this._serviceContext.broadcastProfileUpdate(profile)),
|
|
4871
4892
|
InvitationsService: new InvitationsServiceImpl(this._serviceContext.invitations, (invitation) => this._serviceContext.getInvitationHandler(invitation)),
|
|
4872
4893
|
DevicesService: new DevicesServiceImpl(this._serviceContext.identityManager),
|
|
4873
4894
|
SpacesService: new SpacesServiceImpl(this._serviceContext.identityManager, this._serviceContext.spaceManager, this._serviceContext.dataServiceSubscriptions, async () => {
|
|
@@ -4904,7 +4925,7 @@ var ClientServicesHost = class ClientServicesHost2 {
|
|
|
4904
4925
|
deviceKey
|
|
4905
4926
|
}, {
|
|
4906
4927
|
F: __dxlog_file17,
|
|
4907
|
-
L:
|
|
4928
|
+
L: 317,
|
|
4908
4929
|
S: this,
|
|
4909
4930
|
C: (f, a) => f(...a)
|
|
4910
4931
|
});
|
|
@@ -4912,7 +4933,7 @@ var ClientServicesHost = class ClientServicesHost2 {
|
|
|
4912
4933
|
id: traceId
|
|
4913
4934
|
}), {
|
|
4914
4935
|
F: __dxlog_file17,
|
|
4915
|
-
L:
|
|
4936
|
+
L: 318,
|
|
4916
4937
|
S: this,
|
|
4917
4938
|
C: (f, a) => f(...a)
|
|
4918
4939
|
});
|
|
@@ -4926,7 +4947,7 @@ var ClientServicesHost = class ClientServicesHost2 {
|
|
|
4926
4947
|
deviceKey
|
|
4927
4948
|
}, {
|
|
4928
4949
|
F: __dxlog_file17,
|
|
4929
|
-
L:
|
|
4950
|
+
L: 329,
|
|
4930
4951
|
S: this,
|
|
4931
4952
|
C: (f, a) => f(...a)
|
|
4932
4953
|
});
|
|
@@ -4942,7 +4963,7 @@ var ClientServicesHost = class ClientServicesHost2 {
|
|
|
4942
4963
|
deviceKey
|
|
4943
4964
|
}, {
|
|
4944
4965
|
F: __dxlog_file17,
|
|
4945
|
-
L:
|
|
4966
|
+
L: 336,
|
|
4946
4967
|
S: this,
|
|
4947
4968
|
C: (f, a) => f(...a)
|
|
4948
4969
|
});
|
|
@@ -4953,13 +4974,13 @@ var ClientServicesHost = class ClientServicesHost2 {
|
|
|
4953
4974
|
id: traceId
|
|
4954
4975
|
}), {
|
|
4955
4976
|
F: __dxlog_file17,
|
|
4956
|
-
L:
|
|
4977
|
+
L: 341,
|
|
4957
4978
|
S: this,
|
|
4958
4979
|
C: (f, a) => f(...a)
|
|
4959
4980
|
});
|
|
4960
4981
|
(0, import_log16.log)("resetting...", void 0, {
|
|
4961
4982
|
F: __dxlog_file17,
|
|
4962
|
-
L:
|
|
4983
|
+
L: 343,
|
|
4963
4984
|
S: this,
|
|
4964
4985
|
C: (f, a) => f(...a)
|
|
4965
4986
|
});
|
|
@@ -4967,7 +4988,7 @@ var ClientServicesHost = class ClientServicesHost2 {
|
|
|
4967
4988
|
await this._storage.reset();
|
|
4968
4989
|
(0, import_log16.log)("reset", void 0, {
|
|
4969
4990
|
F: __dxlog_file17,
|
|
4970
|
-
L:
|
|
4991
|
+
L: 346,
|
|
4971
4992
|
S: this,
|
|
4972
4993
|
C: (f, a) => f(...a)
|
|
4973
4994
|
});
|
|
@@ -4975,7 +4996,7 @@ var ClientServicesHost = class ClientServicesHost2 {
|
|
|
4975
4996
|
id: traceId
|
|
4976
4997
|
}), {
|
|
4977
4998
|
F: __dxlog_file17,
|
|
4978
|
-
L:
|
|
4999
|
+
L: 347,
|
|
4979
5000
|
S: this,
|
|
4980
5001
|
C: (f, a) => f(...a)
|
|
4981
5002
|
});
|
|
@@ -5020,7 +5041,7 @@ ClientServicesHost = _ts_decorate8([
|
|
|
5020
5041
|
], ClientServicesHost);
|
|
5021
5042
|
|
|
5022
5043
|
// packages/sdk/client-services/src/packlets/testing/invitation-utils.ts
|
|
5023
|
-
var __dxlog_file18 = "/home/
|
|
5044
|
+
var __dxlog_file18 = "/home/circleci/project/packages/sdk/client-services/src/packlets/testing/invitation-utils.ts";
|
|
5024
5045
|
var sanitizeInvitation = (invitation) => {
|
|
5025
5046
|
return {
|
|
5026
5047
|
invitationId: invitation.invitationId,
|
|
@@ -5336,7 +5357,8 @@ var createSigningContext = async (keyring) => {
|
|
|
5336
5357
|
credential: await new import_credentials16.CredentialGenerator(keyring, identityKey, deviceKey).createDeviceAuthorization(deviceKey)
|
|
5337
5358
|
}, deviceKey),
|
|
5338
5359
|
recordCredential: async () => {
|
|
5339
|
-
}
|
|
5360
|
+
},
|
|
5361
|
+
getProfile: () => void 0
|
|
5340
5362
|
};
|
|
5341
5363
|
};
|
|
5342
5364
|
// Annotate the CommonJS export names for ESM import in node:
|