@dxos/client-services 0.1.45 → 0.1.46-next.c3cc04c
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-IHSMRQ3L.mjs → chunk-ZHDJQGXL.mjs} +37 -35
- package/dist/lib/browser/chunk-ZHDJQGXL.mjs.map +7 -0
- package/dist/lib/browser/index.mjs +1 -1
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/packlets/testing/index.mjs +1 -1
- package/dist/lib/node/index.cjs +56 -54
- 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 +57 -55
- package/dist/lib/node/packlets/testing/index.cjs.map +3 -3
- package/dist/types/src/packlets/identity/identity.d.ts.map +1 -1
- package/dist/types/src/packlets/spaces/data-space.d.ts.map +1 -1
- package/dist/types/src/packlets/vault/iframe-host-runtime.d.ts.map +1 -1
- package/dist/types/src/packlets/vault/vault-resource-lock.d.ts.map +1 -1
- package/dist/types/src/packlets/vault/worker-session.d.ts.map +1 -1
- package/package.json +30 -30
- package/src/packlets/identity/identity.ts +2 -6
- package/src/packlets/spaces/data-space.ts +1 -2
- package/src/packlets/vault/iframe-host-runtime.ts +3 -2
- package/src/packlets/vault/vault-resource-lock.ts +2 -1
- package/src/packlets/vault/worker-session.ts +9 -4
- package/dist/lib/browser/chunk-IHSMRQ3L.mjs.map +0 -7
|
@@ -68,7 +68,7 @@ var import_services13 = require("@dxos/protocols/proto/dxos/client/services");
|
|
|
68
68
|
// packages/sdk/client-services/src/packlets/services/service-host.ts
|
|
69
69
|
var import_node_assert14 = __toESM(require("node:assert"));
|
|
70
70
|
var import_async23 = require("@dxos/async");
|
|
71
|
-
var
|
|
71
|
+
var import_client_protocol9 = require("@dxos/client-protocol");
|
|
72
72
|
var import_echo_pipeline4 = require("@dxos/echo-pipeline");
|
|
73
73
|
var import_keys12 = require("@dxos/keys");
|
|
74
74
|
var import_log19 = require("@dxos/log");
|
|
@@ -527,12 +527,12 @@ var TrustedKeySetAuthVerifier = class {
|
|
|
527
527
|
// packages/sdk/client-services/src/packlets/identity/identity.ts
|
|
528
528
|
var import_node_assert = __toESM(require("node:assert"));
|
|
529
529
|
var import_async6 = require("@dxos/async");
|
|
530
|
+
var import_client_protocol = require("@dxos/client-protocol");
|
|
530
531
|
var import_credentials3 = require("@dxos/credentials");
|
|
531
532
|
var import_debug = require("@dxos/debug");
|
|
532
533
|
var import_feed_store2 = require("@dxos/feed-store");
|
|
533
534
|
var import_log2 = require("@dxos/log");
|
|
534
535
|
var import_credentials4 = require("@dxos/protocols/proto/dxos/halo/credentials");
|
|
535
|
-
var AUTH_TIMEOUT = 3e4;
|
|
536
536
|
var Identity = class {
|
|
537
537
|
constructor({ space, signer, identityKey, deviceKey }) {
|
|
538
538
|
this.stateUpdate = new import_async6.Event();
|
|
@@ -552,7 +552,7 @@ var Identity = class {
|
|
|
552
552
|
this.authVerifier = new TrustedKeySetAuthVerifier({
|
|
553
553
|
trustedKeysProvider: () => this.authorizedDeviceKeys,
|
|
554
554
|
update: this.stateUpdate,
|
|
555
|
-
authTimeout: AUTH_TIMEOUT
|
|
555
|
+
authTimeout: import_client_protocol.AUTH_TIMEOUT
|
|
556
556
|
});
|
|
557
557
|
}
|
|
558
558
|
// TODO(burdon): Expose state object?
|
|
@@ -573,7 +573,7 @@ var Identity = class {
|
|
|
573
573
|
async ready() {
|
|
574
574
|
await this._deviceStateMachine.processor.deviceChainReady.wait();
|
|
575
575
|
await this.controlPipeline.state.waitUntilReachedTargetTimeframe({
|
|
576
|
-
timeout:
|
|
576
|
+
timeout: import_client_protocol.LOAD_CONTROL_FEEDS_TIMEOUT
|
|
577
577
|
});
|
|
578
578
|
}
|
|
579
579
|
get profileDocument() {
|
|
@@ -625,7 +625,7 @@ var Identity = class {
|
|
|
625
625
|
dataFeedKey
|
|
626
626
|
}, {
|
|
627
627
|
file: "identity.ts",
|
|
628
|
-
line:
|
|
628
|
+
line: 156,
|
|
629
629
|
scope: this,
|
|
630
630
|
callSite: (f, a) => f(...a)
|
|
631
631
|
});
|
|
@@ -1037,7 +1037,7 @@ var DeviceInvitationProtocol = class {
|
|
|
1037
1037
|
// packages/sdk/client-services/src/packlets/invitations/invitations-handler.ts
|
|
1038
1038
|
var import_node_assert6 = __toESM(require("node:assert"));
|
|
1039
1039
|
var import_async9 = require("@dxos/async");
|
|
1040
|
-
var
|
|
1040
|
+
var import_client_protocol2 = require("@dxos/client-protocol");
|
|
1041
1041
|
var import_context4 = require("@dxos/context");
|
|
1042
1042
|
var import_credentials8 = require("@dxos/credentials");
|
|
1043
1043
|
var import_errors2 = require("@dxos/errors");
|
|
@@ -1272,8 +1272,8 @@ var InvitationsHandler = class {
|
|
|
1272
1272
|
}
|
|
1273
1273
|
createInvitation(protocol, options) {
|
|
1274
1274
|
var _a;
|
|
1275
|
-
const { invitationId = import_keys7.PublicKey.random().toHex(), type = import_services3.Invitation.Type.INTERACTIVE, authMethod = import_services3.Invitation.AuthMethod.SHARED_SECRET, state = import_services3.Invitation.State.INIT, timeout =
|
|
1276
|
-
const authCode = (_a = options == null ? void 0 : options.authCode) != null ? _a : authMethod === import_services3.Invitation.AuthMethod.SHARED_SECRET ? (0, import_credentials8.generatePasscode)(
|
|
1275
|
+
const { invitationId = import_keys7.PublicKey.random().toHex(), type = import_services3.Invitation.Type.INTERACTIVE, authMethod = import_services3.Invitation.AuthMethod.SHARED_SECRET, state = import_services3.Invitation.State.INIT, timeout = import_client_protocol2.INVITATION_TIMEOUT, swarmKey = import_keys7.PublicKey.random() } = options != null ? options : {};
|
|
1276
|
+
const authCode = (_a = options == null ? void 0 : options.authCode) != null ? _a : authMethod === import_services3.Invitation.AuthMethod.SHARED_SECRET ? (0, import_credentials8.generatePasscode)(import_client_protocol2.AUTHENTICATION_CODE_LENGTH) : void 0;
|
|
1277
1277
|
(0, import_node_assert6.default)(protocol);
|
|
1278
1278
|
const invitation = {
|
|
1279
1279
|
invitationId,
|
|
@@ -1478,7 +1478,7 @@ var InvitationsHandler = class {
|
|
|
1478
1478
|
});
|
|
1479
1479
|
} finally {
|
|
1480
1480
|
if (type !== import_services3.Invitation.Type.MULTIUSE) {
|
|
1481
|
-
await (0, import_async9.sleep)(
|
|
1481
|
+
await (0, import_async9.sleep)(import_client_protocol2.ON_CLOSE_DELAY);
|
|
1482
1482
|
await ctx.dispose();
|
|
1483
1483
|
}
|
|
1484
1484
|
}
|
|
@@ -1530,7 +1530,7 @@ var InvitationsHandler = class {
|
|
|
1530
1530
|
state: import_services3.Invitation.State.CONNECTING
|
|
1531
1531
|
});
|
|
1532
1532
|
});
|
|
1533
|
-
const observable = new
|
|
1533
|
+
const observable = new import_client_protocol2.CancellableInvitationObservable({
|
|
1534
1534
|
initialInvitation: invitation,
|
|
1535
1535
|
subscriber: stream.observable,
|
|
1536
1536
|
onCancel: async () => {
|
|
@@ -1544,7 +1544,7 @@ var InvitationsHandler = class {
|
|
|
1544
1544
|
return observable;
|
|
1545
1545
|
}
|
|
1546
1546
|
acceptInvitation(protocol, invitation) {
|
|
1547
|
-
const { timeout =
|
|
1547
|
+
const { timeout = import_client_protocol2.INVITATION_TIMEOUT } = invitation;
|
|
1548
1548
|
(0, import_node_assert6.default)(protocol);
|
|
1549
1549
|
const authenticated = new import_async9.Trigger();
|
|
1550
1550
|
let currentState;
|
|
@@ -1821,7 +1821,7 @@ var InvitationsHandler = class {
|
|
|
1821
1821
|
state: import_services3.Invitation.State.CONNECTING
|
|
1822
1822
|
});
|
|
1823
1823
|
});
|
|
1824
|
-
const observable = new
|
|
1824
|
+
const observable = new import_client_protocol2.AuthenticatingInvitationObservable({
|
|
1825
1825
|
initialInvitation: invitation,
|
|
1826
1826
|
subscriber: stream.observable,
|
|
1827
1827
|
onCancel: async () => {
|
|
@@ -2206,6 +2206,7 @@ var import_util5 = require("@dxos/util");
|
|
|
2206
2206
|
|
|
2207
2207
|
// packages/sdk/client-services/src/packlets/spaces/data-space.ts
|
|
2208
2208
|
var import_async13 = require("@dxos/async");
|
|
2209
|
+
var import_client_protocol3 = require("@dxos/client-protocol");
|
|
2209
2210
|
var import_context6 = require("@dxos/context");
|
|
2210
2211
|
var import_debug3 = require("@dxos/debug");
|
|
2211
2212
|
var import_echo_pipeline = require("@dxos/echo-pipeline");
|
|
@@ -2466,7 +2467,6 @@ var __decorate = function(decorators, target, key, desc) {
|
|
|
2466
2467
|
r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
2467
2468
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
2468
2469
|
};
|
|
2469
|
-
var AUTH_TIMEOUT2 = 3e4;
|
|
2470
2470
|
var DataSpace = class DataSpace2 {
|
|
2471
2471
|
constructor(params) {
|
|
2472
2472
|
this._ctx = new import_context6.Context();
|
|
@@ -2490,7 +2490,7 @@ var DataSpace = class DataSpace2 {
|
|
|
2490
2490
|
this.authVerifier = new TrustedKeySetAuthVerifier({
|
|
2491
2491
|
trustedKeysProvider: () => new import_util4.ComplexSet(import_keys9.PublicKey.hash, Array.from(this._inner.spaceState.members.keys())),
|
|
2492
2492
|
update: this._inner.stateUpdate,
|
|
2493
|
-
authTimeout:
|
|
2493
|
+
authTimeout: import_client_protocol3.AUTH_TIMEOUT
|
|
2494
2494
|
});
|
|
2495
2495
|
this._notarizationPluginConsumer = this._inner.spaceState.registerProcessor(new NotarizationPlugin());
|
|
2496
2496
|
this._cache = params.cache;
|
|
@@ -2554,7 +2554,7 @@ var DataSpace = class DataSpace2 {
|
|
|
2554
2554
|
if (err instanceof import_errors3.CancelledError) {
|
|
2555
2555
|
(0, import_log10.log)("Data pipeline initialization cancelled", err, {
|
|
2556
2556
|
file: "data-space.ts",
|
|
2557
|
-
line:
|
|
2557
|
+
line: 172,
|
|
2558
2558
|
scope: this,
|
|
2559
2559
|
callSite: (f, a) => f(...a)
|
|
2560
2560
|
});
|
|
@@ -2562,7 +2562,7 @@ var DataSpace = class DataSpace2 {
|
|
|
2562
2562
|
}
|
|
2563
2563
|
import_log10.log.error("Error initializing data pipeline", err, {
|
|
2564
2564
|
file: "data-space.ts",
|
|
2565
|
-
line:
|
|
2565
|
+
line: 176,
|
|
2566
2566
|
scope: this,
|
|
2567
2567
|
callSite: (f, a) => f(...a)
|
|
2568
2568
|
});
|
|
@@ -2588,7 +2588,7 @@ var DataSpace = class DataSpace2 {
|
|
|
2588
2588
|
await this._createWritableFeeds();
|
|
2589
2589
|
(0, import_log10.log)("Writable feeds created", {}, {
|
|
2590
2590
|
file: "data-space.ts",
|
|
2591
|
-
line:
|
|
2591
|
+
line: 201,
|
|
2592
2592
|
scope: this,
|
|
2593
2593
|
callSite: (f, a) => f(...a)
|
|
2594
2594
|
});
|
|
@@ -2603,7 +2603,7 @@ var DataSpace = class DataSpace2 {
|
|
|
2603
2603
|
await (0, import_context6.cancelWithContext)(this._ctx, this._inner.dataPipeline.ensureEpochInitialized());
|
|
2604
2604
|
(0, import_log10.log)("waiting for data pipeline to reach target timeframe", {}, {
|
|
2605
2605
|
file: "data-space.ts",
|
|
2606
|
-
line:
|
|
2606
|
+
line: 220,
|
|
2607
2607
|
scope: this,
|
|
2608
2608
|
callSite: (f, a) => f(...a)
|
|
2609
2609
|
});
|
|
@@ -2614,7 +2614,7 @@ var DataSpace = class DataSpace2 {
|
|
|
2614
2614
|
this.metrics.dataPipelineReady = new Date();
|
|
2615
2615
|
(0, import_log10.log)("data pipeline ready", {}, {
|
|
2616
2616
|
file: "data-space.ts",
|
|
2617
|
-
line:
|
|
2617
|
+
line: 229,
|
|
2618
2618
|
scope: this,
|
|
2619
2619
|
callSite: (f, a) => f(...a)
|
|
2620
2620
|
});
|
|
@@ -3284,6 +3284,7 @@ var SystemServiceImpl = class {
|
|
|
3284
3284
|
|
|
3285
3285
|
// packages/sdk/client-services/src/packlets/vault/iframe-host-runtime.ts
|
|
3286
3286
|
var import_async17 = require("@dxos/async");
|
|
3287
|
+
var import_client_protocol5 = require("@dxos/client-protocol");
|
|
3287
3288
|
var import_log13 = require("@dxos/log");
|
|
3288
3289
|
var import_messaging = require("@dxos/messaging");
|
|
3289
3290
|
var import_network_manager2 = require("@dxos/network-manager");
|
|
@@ -3345,7 +3346,7 @@ var ClientRpcServer = class {
|
|
|
3345
3346
|
// packages/sdk/client-services/src/packlets/vault/shell-runtime.ts
|
|
3346
3347
|
var import_node_assert11 = __toESM(require("node:assert"));
|
|
3347
3348
|
var import_async16 = require("@dxos/async");
|
|
3348
|
-
var
|
|
3349
|
+
var import_client_protocol4 = require("@dxos/client-protocol");
|
|
3349
3350
|
var import_iframe = require("@dxos/protocols/proto/dxos/iframe");
|
|
3350
3351
|
var import_rpc2 = require("@dxos/rpc");
|
|
3351
3352
|
var ShellRuntimeImpl = class {
|
|
@@ -3378,8 +3379,8 @@ var ShellRuntimeImpl = class {
|
|
|
3378
3379
|
}
|
|
3379
3380
|
async open() {
|
|
3380
3381
|
this._appRpc = (0, import_rpc2.createProtoRpcPeer)({
|
|
3381
|
-
requested:
|
|
3382
|
-
exposed:
|
|
3382
|
+
requested: import_client_protocol4.appServiceBundle,
|
|
3383
|
+
exposed: import_client_protocol4.shellServiceBundle,
|
|
3383
3384
|
handlers: {
|
|
3384
3385
|
ShellService: {
|
|
3385
3386
|
setLayout: async (request) => {
|
|
@@ -3434,7 +3435,7 @@ var IFrameHostRuntime = class {
|
|
|
3434
3435
|
var _a;
|
|
3435
3436
|
(0, import_log13.log)("starting...", {}, {
|
|
3436
3437
|
file: "iframe-host-runtime.ts",
|
|
3437
|
-
line:
|
|
3438
|
+
line: 70,
|
|
3438
3439
|
scope: this,
|
|
3439
3440
|
callSite: (f, a) => f(...a)
|
|
3440
3441
|
});
|
|
@@ -3453,7 +3454,7 @@ var IFrameHostRuntime = class {
|
|
|
3453
3454
|
const middleware = {
|
|
3454
3455
|
handleCall: async (method, params, handler) => {
|
|
3455
3456
|
const error = await this._ready.wait({
|
|
3456
|
-
timeout:
|
|
3457
|
+
timeout: import_client_protocol5.PROXY_CONNECTION_TIMEOUT
|
|
3457
3458
|
});
|
|
3458
3459
|
if (error) {
|
|
3459
3460
|
throw error;
|
|
@@ -3462,7 +3463,7 @@ var IFrameHostRuntime = class {
|
|
|
3462
3463
|
},
|
|
3463
3464
|
handleStream: async (method, params, handler) => {
|
|
3464
3465
|
const error = await this._ready.wait({
|
|
3465
|
-
timeout:
|
|
3466
|
+
timeout: import_client_protocol5.PROXY_CONNECTION_TIMEOUT
|
|
3466
3467
|
});
|
|
3467
3468
|
if (error) {
|
|
3468
3469
|
throw error;
|
|
@@ -3483,7 +3484,7 @@ var IFrameHostRuntime = class {
|
|
|
3483
3484
|
this._ready.wake(void 0);
|
|
3484
3485
|
(0, import_log13.log)("started", {}, {
|
|
3485
3486
|
file: "iframe-host-runtime.ts",
|
|
3486
|
-
line:
|
|
3487
|
+
line: 113,
|
|
3487
3488
|
scope: this,
|
|
3488
3489
|
callSite: (f, a) => f(...a)
|
|
3489
3490
|
});
|
|
@@ -3491,7 +3492,7 @@ var IFrameHostRuntime = class {
|
|
|
3491
3492
|
this._ready.wake(err);
|
|
3492
3493
|
import_log13.log.catch(err, {}, {
|
|
3493
3494
|
file: "iframe-host-runtime.ts",
|
|
3494
|
-
line:
|
|
3495
|
+
line: 116,
|
|
3495
3496
|
scope: this,
|
|
3496
3497
|
callSite: (f, a) => f(...a)
|
|
3497
3498
|
});
|
|
@@ -3501,7 +3502,7 @@ var IFrameHostRuntime = class {
|
|
|
3501
3502
|
var _a;
|
|
3502
3503
|
(0, import_log13.log)("stopping...", {}, {
|
|
3503
3504
|
file: "iframe-host-runtime.ts",
|
|
3504
|
-
line:
|
|
3505
|
+
line: 121,
|
|
3505
3506
|
scope: this,
|
|
3506
3507
|
callSite: (f, a) => f(...a)
|
|
3507
3508
|
});
|
|
@@ -3510,7 +3511,7 @@ var IFrameHostRuntime = class {
|
|
|
3510
3511
|
await ((_a = this._shellRuntime) == null ? void 0 : _a.close());
|
|
3511
3512
|
(0, import_log13.log)("stopped", {}, {
|
|
3512
3513
|
file: "iframe-host-runtime.ts",
|
|
3513
|
-
line:
|
|
3514
|
+
line: 125,
|
|
3514
3515
|
scope: this,
|
|
3515
3516
|
callSite: (f, a) => f(...a)
|
|
3516
3517
|
});
|
|
@@ -3522,7 +3523,7 @@ __decorate3([
|
|
|
3522
3523
|
|
|
3523
3524
|
// packages/sdk/client-services/src/packlets/vault/iframe-proxy-runtime.ts
|
|
3524
3525
|
var import_async18 = require("@dxos/async");
|
|
3525
|
-
var
|
|
3526
|
+
var import_client_protocol6 = require("@dxos/client-protocol");
|
|
3526
3527
|
var import_errors5 = require("@dxos/errors");
|
|
3527
3528
|
var import_log14 = require("@dxos/log");
|
|
3528
3529
|
var import_network_manager3 = require("@dxos/network-manager");
|
|
@@ -3531,6 +3532,7 @@ var import_util8 = require("@dxos/util");
|
|
|
3531
3532
|
|
|
3532
3533
|
// packages/sdk/client-services/src/packlets/vault/vault-resource-lock.ts
|
|
3533
3534
|
var import_async19 = require("@dxos/async");
|
|
3535
|
+
var import_client_protocol7 = require("@dxos/client-protocol");
|
|
3534
3536
|
var import_log15 = require("@dxos/log");
|
|
3535
3537
|
var __decorate4 = function(decorators, target, key, desc) {
|
|
3536
3538
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
@@ -3565,28 +3567,28 @@ var VaultResourceLock = class {
|
|
|
3565
3567
|
try {
|
|
3566
3568
|
(0, import_log15.log)("aquiring lock...", {}, {
|
|
3567
3569
|
file: "vault-resource-lock.ts",
|
|
3568
|
-
line:
|
|
3570
|
+
line: 45,
|
|
3569
3571
|
scope: this,
|
|
3570
3572
|
callSite: (f, a) => f(...a)
|
|
3571
3573
|
});
|
|
3572
|
-
await (0, import_async19.asyncTimeout)(this._requestLock(),
|
|
3574
|
+
await (0, import_async19.asyncTimeout)(this._requestLock(), import_client_protocol7.RESOURCE_LOCK_TIMEOUT);
|
|
3573
3575
|
(0, import_log15.log)("acquired lock", {}, {
|
|
3574
3576
|
file: "vault-resource-lock.ts",
|
|
3575
|
-
line:
|
|
3577
|
+
line: 47,
|
|
3576
3578
|
scope: this,
|
|
3577
3579
|
callSite: (f, a) => f(...a)
|
|
3578
3580
|
});
|
|
3579
3581
|
} catch (e) {
|
|
3580
3582
|
(0, import_log15.log)("stealing lock...", {}, {
|
|
3581
3583
|
file: "vault-resource-lock.ts",
|
|
3582
|
-
line:
|
|
3584
|
+
line: 49,
|
|
3583
3585
|
scope: this,
|
|
3584
3586
|
callSite: (f, a) => f(...a)
|
|
3585
3587
|
});
|
|
3586
3588
|
await this._requestLock(true);
|
|
3587
3589
|
(0, import_log15.log)("stolen lock", {}, {
|
|
3588
3590
|
file: "vault-resource-lock.ts",
|
|
3589
|
-
line:
|
|
3591
|
+
line: 51,
|
|
3590
3592
|
scope: this,
|
|
3591
3593
|
callSite: (f, a) => f(...a)
|
|
3592
3594
|
});
|
|
@@ -3605,7 +3607,7 @@ var VaultResourceLock = class {
|
|
|
3605
3607
|
steal
|
|
3606
3608
|
}, {
|
|
3607
3609
|
file: "vault-resource-lock.ts",
|
|
3608
|
-
line:
|
|
3610
|
+
line: 66,
|
|
3609
3611
|
scope: this,
|
|
3610
3612
|
callSite: (f, a) => f(...a)
|
|
3611
3613
|
});
|
|
@@ -3620,14 +3622,14 @@ var VaultResourceLock = class {
|
|
|
3620
3622
|
await this._releaseTrigger.wait();
|
|
3621
3623
|
(0, import_log15.log)("releasing lock...", {}, {
|
|
3622
3624
|
file: "vault-resource-lock.ts",
|
|
3623
|
-
line:
|
|
3625
|
+
line: 75,
|
|
3624
3626
|
scope: this,
|
|
3625
3627
|
callSite: (f, a) => f(...a)
|
|
3626
3628
|
});
|
|
3627
3629
|
await ((_b = this._onRelease) == null ? void 0 : _b.call(this));
|
|
3628
3630
|
(0, import_log15.log)("released lock", {}, {
|
|
3629
3631
|
file: "vault-resource-lock.ts",
|
|
3630
|
-
line:
|
|
3632
|
+
line: 77,
|
|
3631
3633
|
scope: this,
|
|
3632
3634
|
callSite: (f, a) => f(...a)
|
|
3633
3635
|
});
|
|
@@ -3640,7 +3642,7 @@ var VaultResourceLock = class {
|
|
|
3640
3642
|
steal
|
|
3641
3643
|
}, {
|
|
3642
3644
|
file: "vault-resource-lock.ts",
|
|
3643
|
-
line:
|
|
3645
|
+
line: 84,
|
|
3644
3646
|
scope: this,
|
|
3645
3647
|
callSite: (f, a) => f(...a)
|
|
3646
3648
|
});
|
|
@@ -3659,7 +3661,7 @@ var import_network_manager4 = require("@dxos/network-manager");
|
|
|
3659
3661
|
// packages/sdk/client-services/src/packlets/vault/worker-session.ts
|
|
3660
3662
|
var import_node_assert12 = __toESM(require("node:assert"));
|
|
3661
3663
|
var import_async20 = require("@dxos/async");
|
|
3662
|
-
var
|
|
3664
|
+
var import_client_protocol8 = require("@dxos/client-protocol");
|
|
3663
3665
|
var import_log16 = require("@dxos/log");
|
|
3664
3666
|
var import_rpc4 = require("@dxos/rpc");
|
|
3665
3667
|
var import_util9 = require("@dxos/util");
|
|
@@ -3682,7 +3684,7 @@ var WorkerSession = class {
|
|
|
3682
3684
|
const middleware = {
|
|
3683
3685
|
handleCall: async (method, params, handler) => {
|
|
3684
3686
|
const error = await readySignal.wait({
|
|
3685
|
-
timeout:
|
|
3687
|
+
timeout: import_client_protocol8.PROXY_CONNECTION_TIMEOUT
|
|
3686
3688
|
});
|
|
3687
3689
|
if (error) {
|
|
3688
3690
|
throw error;
|
|
@@ -3691,7 +3693,7 @@ var WorkerSession = class {
|
|
|
3691
3693
|
},
|
|
3692
3694
|
handleStream: async (method, params, handler) => {
|
|
3693
3695
|
const error = await readySignal.wait({
|
|
3694
|
-
timeout:
|
|
3696
|
+
timeout: import_client_protocol8.PROXY_CONNECTION_TIMEOUT
|
|
3695
3697
|
});
|
|
3696
3698
|
if (error) {
|
|
3697
3699
|
throw error;
|
|
@@ -3710,8 +3712,8 @@ var WorkerSession = class {
|
|
|
3710
3712
|
...middleware
|
|
3711
3713
|
});
|
|
3712
3714
|
this._iframeRpc = (0, import_rpc4.createProtoRpcPeer)({
|
|
3713
|
-
requested:
|
|
3714
|
-
exposed:
|
|
3715
|
+
requested: import_client_protocol8.iframeServiceBundle,
|
|
3716
|
+
exposed: import_client_protocol8.workerServiceBundle,
|
|
3715
3717
|
handlers: {
|
|
3716
3718
|
WorkerService: {
|
|
3717
3719
|
start: async (request) => {
|
|
@@ -3726,7 +3728,7 @@ var WorkerSession = class {
|
|
|
3726
3728
|
} catch (err) {
|
|
3727
3729
|
import_log16.log.catch(err, {}, {
|
|
3728
3730
|
file: "worker-session.ts",
|
|
3729
|
-
line:
|
|
3731
|
+
line: 100,
|
|
3730
3732
|
scope: this,
|
|
3731
3733
|
callSite: (f, a) => f(...a)
|
|
3732
3734
|
});
|
|
@@ -3743,7 +3745,7 @@ var WorkerSession = class {
|
|
|
3743
3745
|
async open() {
|
|
3744
3746
|
import_log16.log.info("opening..", {}, {
|
|
3745
3747
|
file: "worker-session.ts",
|
|
3746
|
-
line:
|
|
3748
|
+
line: 114,
|
|
3747
3749
|
scope: this,
|
|
3748
3750
|
callSite: (f, a) => f(...a)
|
|
3749
3751
|
});
|
|
@@ -3753,7 +3755,7 @@ var WorkerSession = class {
|
|
|
3753
3755
|
this._maybeOpenShell()
|
|
3754
3756
|
]);
|
|
3755
3757
|
await this._startTrigger.wait({
|
|
3756
|
-
timeout:
|
|
3758
|
+
timeout: import_client_protocol8.PROXY_CONNECTION_TIMEOUT
|
|
3757
3759
|
});
|
|
3758
3760
|
if (this.lockKey) {
|
|
3759
3761
|
void this._afterLockReleases(this.lockKey, () => this.close());
|
|
@@ -3762,7 +3764,7 @@ var WorkerSession = class {
|
|
|
3762
3764
|
async close() {
|
|
3763
3765
|
import_log16.log.info("closing..", {}, {
|
|
3764
3766
|
file: "worker-session.ts",
|
|
3765
|
-
line:
|
|
3767
|
+
line: 124,
|
|
3766
3768
|
scope: this,
|
|
3767
3769
|
callSite: (f, a) => f(...a)
|
|
3768
3770
|
});
|
|
@@ -3771,7 +3773,7 @@ var WorkerSession = class {
|
|
|
3771
3773
|
} catch (err) {
|
|
3772
3774
|
import_log16.log.catch(err, {}, {
|
|
3773
3775
|
file: "worker-session.ts",
|
|
3774
|
-
line:
|
|
3776
|
+
line: 128,
|
|
3775
3777
|
scope: this,
|
|
3776
3778
|
callSite: (f, a) => f(...a)
|
|
3777
3779
|
});
|
|
@@ -3787,7 +3789,7 @@ var WorkerSession = class {
|
|
|
3787
3789
|
} catch (e) {
|
|
3788
3790
|
import_log16.log.info("No shell connected.", {}, {
|
|
3789
3791
|
file: "worker-session.ts",
|
|
3790
|
-
line:
|
|
3792
|
+
line: 138,
|
|
3791
3793
|
scope: this,
|
|
3792
3794
|
callSite: (f, a) => f(...a)
|
|
3793
3795
|
});
|
|
@@ -4045,7 +4047,7 @@ var ServiceRegistry = class {
|
|
|
4045
4047
|
var ClientServicesHost = class {
|
|
4046
4048
|
constructor({
|
|
4047
4049
|
config,
|
|
4048
|
-
modelFactory = (0,
|
|
4050
|
+
modelFactory = (0, import_client_protocol9.createDefaultModelFactory)(),
|
|
4049
4051
|
// TODO(burdon): Create ApolloLink abstraction (see Client).
|
|
4050
4052
|
transportFactory,
|
|
4051
4053
|
signalManager,
|
|
@@ -4092,7 +4094,7 @@ var ClientServicesHost = class {
|
|
|
4092
4094
|
}
|
|
4093
4095
|
});
|
|
4094
4096
|
this._loggingService = new LoggingServiceImpl();
|
|
4095
|
-
this._serviceRegistry = new ServiceRegistry(
|
|
4097
|
+
this._serviceRegistry = new ServiceRegistry(import_client_protocol9.clientServiceBundle, {
|
|
4096
4098
|
SystemService: this._systemService
|
|
4097
4099
|
});
|
|
4098
4100
|
}
|
|
@@ -4466,7 +4468,7 @@ var acceptInvitation = (guest, invitation) => {
|
|
|
4466
4468
|
};
|
|
4467
4469
|
|
|
4468
4470
|
// packages/sdk/client-services/src/packlets/testing/test-builder.ts
|
|
4469
|
-
var
|
|
4471
|
+
var import_client_protocol10 = require("@dxos/client-protocol");
|
|
4470
4472
|
var import_credentials15 = require("@dxos/credentials");
|
|
4471
4473
|
var import_echo_pipeline5 = require("@dxos/echo-pipeline");
|
|
4472
4474
|
var import_testing = require("@dxos/echo-pipeline/testing");
|
|
@@ -4490,7 +4492,7 @@ var createServiceContext = ({ signalContext = new import_messaging4.MemorySignal
|
|
|
4490
4492
|
signalManager,
|
|
4491
4493
|
transportFactory: import_network_manager6.MemoryTransportFactory
|
|
4492
4494
|
});
|
|
4493
|
-
const modelFactory = (0,
|
|
4495
|
+
const modelFactory = (0, import_client_protocol10.createDefaultModelFactory)();
|
|
4494
4496
|
return new ServiceContext(storage, networkManager, signalManager, modelFactory);
|
|
4495
4497
|
};
|
|
4496
4498
|
var createPeers = async (numPeers) => {
|
|
@@ -4567,7 +4569,7 @@ var TestPeer = class {
|
|
|
4567
4569
|
feedStore: this.feedStore,
|
|
4568
4570
|
networkManager: this.networkManager,
|
|
4569
4571
|
metadataStore: this.metadataStore,
|
|
4570
|
-
modelFactory: (0,
|
|
4572
|
+
modelFactory: (0, import_client_protocol10.createDefaultModelFactory)(),
|
|
4571
4573
|
snapshotStore: this.snapshotStore
|
|
4572
4574
|
});
|
|
4573
4575
|
}
|