@dxos/client-services 0.1.45 → 0.1.46-next.412561
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
package/dist/lib/node/index.cjs
CHANGED
|
@@ -503,12 +503,12 @@ var TrustedKeySetAuthVerifier = class {
|
|
|
503
503
|
// packages/sdk/client-services/src/packlets/identity/identity.ts
|
|
504
504
|
var import_node_assert = __toESM(require("node:assert"));
|
|
505
505
|
var import_async5 = require("@dxos/async");
|
|
506
|
+
var import_client_protocol = require("@dxos/client-protocol");
|
|
506
507
|
var import_credentials2 = require("@dxos/credentials");
|
|
507
508
|
var import_debug = require("@dxos/debug");
|
|
508
509
|
var import_feed_store2 = require("@dxos/feed-store");
|
|
509
510
|
var import_log2 = require("@dxos/log");
|
|
510
511
|
var import_credentials3 = require("@dxos/protocols/proto/dxos/halo/credentials");
|
|
511
|
-
var AUTH_TIMEOUT = 3e4;
|
|
512
512
|
var Identity = class {
|
|
513
513
|
constructor({ space, signer, identityKey, deviceKey }) {
|
|
514
514
|
this.stateUpdate = new import_async5.Event();
|
|
@@ -528,7 +528,7 @@ var Identity = class {
|
|
|
528
528
|
this.authVerifier = new TrustedKeySetAuthVerifier({
|
|
529
529
|
trustedKeysProvider: () => this.authorizedDeviceKeys,
|
|
530
530
|
update: this.stateUpdate,
|
|
531
|
-
authTimeout: AUTH_TIMEOUT
|
|
531
|
+
authTimeout: import_client_protocol.AUTH_TIMEOUT
|
|
532
532
|
});
|
|
533
533
|
}
|
|
534
534
|
// TODO(burdon): Expose state object?
|
|
@@ -549,7 +549,7 @@ var Identity = class {
|
|
|
549
549
|
async ready() {
|
|
550
550
|
await this._deviceStateMachine.processor.deviceChainReady.wait();
|
|
551
551
|
await this.controlPipeline.state.waitUntilReachedTargetTimeframe({
|
|
552
|
-
timeout:
|
|
552
|
+
timeout: import_client_protocol.LOAD_CONTROL_FEEDS_TIMEOUT
|
|
553
553
|
});
|
|
554
554
|
}
|
|
555
555
|
get profileDocument() {
|
|
@@ -601,7 +601,7 @@ var Identity = class {
|
|
|
601
601
|
dataFeedKey
|
|
602
602
|
}, {
|
|
603
603
|
file: "identity.ts",
|
|
604
|
-
line:
|
|
604
|
+
line: 156,
|
|
605
605
|
scope: this,
|
|
606
606
|
callSite: (f, a) => f(...a)
|
|
607
607
|
});
|
|
@@ -1013,7 +1013,7 @@ var DeviceInvitationProtocol = class {
|
|
|
1013
1013
|
// packages/sdk/client-services/src/packlets/invitations/invitations-handler.ts
|
|
1014
1014
|
var import_node_assert6 = __toESM(require("node:assert"));
|
|
1015
1015
|
var import_async8 = require("@dxos/async");
|
|
1016
|
-
var
|
|
1016
|
+
var import_client_protocol2 = require("@dxos/client-protocol");
|
|
1017
1017
|
var import_context4 = require("@dxos/context");
|
|
1018
1018
|
var import_credentials7 = require("@dxos/credentials");
|
|
1019
1019
|
var import_errors2 = require("@dxos/errors");
|
|
@@ -1248,8 +1248,8 @@ var InvitationsHandler = class {
|
|
|
1248
1248
|
}
|
|
1249
1249
|
createInvitation(protocol, options) {
|
|
1250
1250
|
var _a;
|
|
1251
|
-
const { invitationId = import_keys6.PublicKey.random().toHex(), type = import_services2.Invitation.Type.INTERACTIVE, authMethod = import_services2.Invitation.AuthMethod.SHARED_SECRET, state = import_services2.Invitation.State.INIT, timeout =
|
|
1252
|
-
const authCode = (_a = options == null ? void 0 : options.authCode) != null ? _a : authMethod === import_services2.Invitation.AuthMethod.SHARED_SECRET ? (0, import_credentials7.generatePasscode)(
|
|
1251
|
+
const { invitationId = import_keys6.PublicKey.random().toHex(), type = import_services2.Invitation.Type.INTERACTIVE, authMethod = import_services2.Invitation.AuthMethod.SHARED_SECRET, state = import_services2.Invitation.State.INIT, timeout = import_client_protocol2.INVITATION_TIMEOUT, swarmKey = import_keys6.PublicKey.random() } = options != null ? options : {};
|
|
1252
|
+
const authCode = (_a = options == null ? void 0 : options.authCode) != null ? _a : authMethod === import_services2.Invitation.AuthMethod.SHARED_SECRET ? (0, import_credentials7.generatePasscode)(import_client_protocol2.AUTHENTICATION_CODE_LENGTH) : void 0;
|
|
1253
1253
|
(0, import_node_assert6.default)(protocol);
|
|
1254
1254
|
const invitation = {
|
|
1255
1255
|
invitationId,
|
|
@@ -1454,7 +1454,7 @@ var InvitationsHandler = class {
|
|
|
1454
1454
|
});
|
|
1455
1455
|
} finally {
|
|
1456
1456
|
if (type !== import_services2.Invitation.Type.MULTIUSE) {
|
|
1457
|
-
await (0, import_async8.sleep)(
|
|
1457
|
+
await (0, import_async8.sleep)(import_client_protocol2.ON_CLOSE_DELAY);
|
|
1458
1458
|
await ctx.dispose();
|
|
1459
1459
|
}
|
|
1460
1460
|
}
|
|
@@ -1506,7 +1506,7 @@ var InvitationsHandler = class {
|
|
|
1506
1506
|
state: import_services2.Invitation.State.CONNECTING
|
|
1507
1507
|
});
|
|
1508
1508
|
});
|
|
1509
|
-
const observable = new
|
|
1509
|
+
const observable = new import_client_protocol2.CancellableInvitationObservable({
|
|
1510
1510
|
initialInvitation: invitation,
|
|
1511
1511
|
subscriber: stream.observable,
|
|
1512
1512
|
onCancel: async () => {
|
|
@@ -1520,7 +1520,7 @@ var InvitationsHandler = class {
|
|
|
1520
1520
|
return observable;
|
|
1521
1521
|
}
|
|
1522
1522
|
acceptInvitation(protocol, invitation) {
|
|
1523
|
-
const { timeout =
|
|
1523
|
+
const { timeout = import_client_protocol2.INVITATION_TIMEOUT } = invitation;
|
|
1524
1524
|
(0, import_node_assert6.default)(protocol);
|
|
1525
1525
|
const authenticated = new import_async8.Trigger();
|
|
1526
1526
|
let currentState;
|
|
@@ -1797,7 +1797,7 @@ var InvitationsHandler = class {
|
|
|
1797
1797
|
state: import_services2.Invitation.State.CONNECTING
|
|
1798
1798
|
});
|
|
1799
1799
|
});
|
|
1800
|
-
const observable = new
|
|
1800
|
+
const observable = new import_client_protocol2.AuthenticatingInvitationObservable({
|
|
1801
1801
|
initialInvitation: invitation,
|
|
1802
1802
|
subscriber: stream.observable,
|
|
1803
1803
|
onCancel: async () => {
|
|
@@ -2076,7 +2076,7 @@ var SpaceInvitationProtocol = class {
|
|
|
2076
2076
|
// packages/sdk/client-services/src/packlets/services/service-host.ts
|
|
2077
2077
|
var import_node_assert14 = __toESM(require("node:assert"));
|
|
2078
2078
|
var import_async23 = require("@dxos/async");
|
|
2079
|
-
var
|
|
2079
|
+
var import_client_protocol9 = require("@dxos/client-protocol");
|
|
2080
2080
|
var import_echo_pipeline4 = require("@dxos/echo-pipeline");
|
|
2081
2081
|
var import_keys11 = require("@dxos/keys");
|
|
2082
2082
|
var import_log19 = require("@dxos/log");
|
|
@@ -2241,6 +2241,7 @@ var import_util5 = require("@dxos/util");
|
|
|
2241
2241
|
|
|
2242
2242
|
// packages/sdk/client-services/src/packlets/spaces/data-space.ts
|
|
2243
2243
|
var import_async13 = require("@dxos/async");
|
|
2244
|
+
var import_client_protocol3 = require("@dxos/client-protocol");
|
|
2244
2245
|
var import_context6 = require("@dxos/context");
|
|
2245
2246
|
var import_debug3 = require("@dxos/debug");
|
|
2246
2247
|
var import_echo_pipeline = require("@dxos/echo-pipeline");
|
|
@@ -2501,7 +2502,6 @@ var __decorate = function(decorators, target, key, desc) {
|
|
|
2501
2502
|
r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
2502
2503
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
2503
2504
|
};
|
|
2504
|
-
var AUTH_TIMEOUT2 = 3e4;
|
|
2505
2505
|
var DataSpace = class DataSpace2 {
|
|
2506
2506
|
constructor(params) {
|
|
2507
2507
|
this._ctx = new import_context6.Context();
|
|
@@ -2525,7 +2525,7 @@ var DataSpace = class DataSpace2 {
|
|
|
2525
2525
|
this.authVerifier = new TrustedKeySetAuthVerifier({
|
|
2526
2526
|
trustedKeysProvider: () => new import_util4.ComplexSet(import_keys8.PublicKey.hash, Array.from(this._inner.spaceState.members.keys())),
|
|
2527
2527
|
update: this._inner.stateUpdate,
|
|
2528
|
-
authTimeout:
|
|
2528
|
+
authTimeout: import_client_protocol3.AUTH_TIMEOUT
|
|
2529
2529
|
});
|
|
2530
2530
|
this._notarizationPluginConsumer = this._inner.spaceState.registerProcessor(new NotarizationPlugin());
|
|
2531
2531
|
this._cache = params.cache;
|
|
@@ -2589,7 +2589,7 @@ var DataSpace = class DataSpace2 {
|
|
|
2589
2589
|
if (err instanceof import_errors3.CancelledError) {
|
|
2590
2590
|
(0, import_log10.log)("Data pipeline initialization cancelled", err, {
|
|
2591
2591
|
file: "data-space.ts",
|
|
2592
|
-
line:
|
|
2592
|
+
line: 172,
|
|
2593
2593
|
scope: this,
|
|
2594
2594
|
callSite: (f, a) => f(...a)
|
|
2595
2595
|
});
|
|
@@ -2597,7 +2597,7 @@ var DataSpace = class DataSpace2 {
|
|
|
2597
2597
|
}
|
|
2598
2598
|
import_log10.log.error("Error initializing data pipeline", err, {
|
|
2599
2599
|
file: "data-space.ts",
|
|
2600
|
-
line:
|
|
2600
|
+
line: 176,
|
|
2601
2601
|
scope: this,
|
|
2602
2602
|
callSite: (f, a) => f(...a)
|
|
2603
2603
|
});
|
|
@@ -2623,7 +2623,7 @@ var DataSpace = class DataSpace2 {
|
|
|
2623
2623
|
await this._createWritableFeeds();
|
|
2624
2624
|
(0, import_log10.log)("Writable feeds created", {}, {
|
|
2625
2625
|
file: "data-space.ts",
|
|
2626
|
-
line:
|
|
2626
|
+
line: 201,
|
|
2627
2627
|
scope: this,
|
|
2628
2628
|
callSite: (f, a) => f(...a)
|
|
2629
2629
|
});
|
|
@@ -2638,7 +2638,7 @@ var DataSpace = class DataSpace2 {
|
|
|
2638
2638
|
await (0, import_context6.cancelWithContext)(this._ctx, this._inner.dataPipeline.ensureEpochInitialized());
|
|
2639
2639
|
(0, import_log10.log)("waiting for data pipeline to reach target timeframe", {}, {
|
|
2640
2640
|
file: "data-space.ts",
|
|
2641
|
-
line:
|
|
2641
|
+
line: 220,
|
|
2642
2642
|
scope: this,
|
|
2643
2643
|
callSite: (f, a) => f(...a)
|
|
2644
2644
|
});
|
|
@@ -2649,7 +2649,7 @@ var DataSpace = class DataSpace2 {
|
|
|
2649
2649
|
this.metrics.dataPipelineReady = new Date();
|
|
2650
2650
|
(0, import_log10.log)("data pipeline ready", {}, {
|
|
2651
2651
|
file: "data-space.ts",
|
|
2652
|
-
line:
|
|
2652
|
+
line: 229,
|
|
2653
2653
|
scope: this,
|
|
2654
2654
|
callSite: (f, a) => f(...a)
|
|
2655
2655
|
});
|
|
@@ -3319,6 +3319,7 @@ var SystemServiceImpl = class {
|
|
|
3319
3319
|
|
|
3320
3320
|
// packages/sdk/client-services/src/packlets/vault/iframe-host-runtime.ts
|
|
3321
3321
|
var import_async17 = require("@dxos/async");
|
|
3322
|
+
var import_client_protocol5 = require("@dxos/client-protocol");
|
|
3322
3323
|
var import_log13 = require("@dxos/log");
|
|
3323
3324
|
var import_messaging = require("@dxos/messaging");
|
|
3324
3325
|
var import_network_manager2 = require("@dxos/network-manager");
|
|
@@ -3380,7 +3381,7 @@ var ClientRpcServer = class {
|
|
|
3380
3381
|
// packages/sdk/client-services/src/packlets/vault/shell-runtime.ts
|
|
3381
3382
|
var import_node_assert11 = __toESM(require("node:assert"));
|
|
3382
3383
|
var import_async16 = require("@dxos/async");
|
|
3383
|
-
var
|
|
3384
|
+
var import_client_protocol4 = require("@dxos/client-protocol");
|
|
3384
3385
|
var import_iframe = require("@dxos/protocols/proto/dxos/iframe");
|
|
3385
3386
|
var import_rpc2 = require("@dxos/rpc");
|
|
3386
3387
|
var ShellRuntimeImpl = class {
|
|
@@ -3413,8 +3414,8 @@ var ShellRuntimeImpl = class {
|
|
|
3413
3414
|
}
|
|
3414
3415
|
async open() {
|
|
3415
3416
|
this._appRpc = (0, import_rpc2.createProtoRpcPeer)({
|
|
3416
|
-
requested:
|
|
3417
|
-
exposed:
|
|
3417
|
+
requested: import_client_protocol4.appServiceBundle,
|
|
3418
|
+
exposed: import_client_protocol4.shellServiceBundle,
|
|
3418
3419
|
handlers: {
|
|
3419
3420
|
ShellService: {
|
|
3420
3421
|
setLayout: async (request) => {
|
|
@@ -3499,7 +3500,7 @@ var IFrameHostRuntime = class {
|
|
|
3499
3500
|
var _a;
|
|
3500
3501
|
(0, import_log13.log)("starting...", {}, {
|
|
3501
3502
|
file: "iframe-host-runtime.ts",
|
|
3502
|
-
line:
|
|
3503
|
+
line: 70,
|
|
3503
3504
|
scope: this,
|
|
3504
3505
|
callSite: (f, a) => f(...a)
|
|
3505
3506
|
});
|
|
@@ -3518,7 +3519,7 @@ var IFrameHostRuntime = class {
|
|
|
3518
3519
|
const middleware = {
|
|
3519
3520
|
handleCall: async (method, params, handler) => {
|
|
3520
3521
|
const error = await this._ready.wait({
|
|
3521
|
-
timeout:
|
|
3522
|
+
timeout: import_client_protocol5.PROXY_CONNECTION_TIMEOUT
|
|
3522
3523
|
});
|
|
3523
3524
|
if (error) {
|
|
3524
3525
|
throw error;
|
|
@@ -3527,7 +3528,7 @@ var IFrameHostRuntime = class {
|
|
|
3527
3528
|
},
|
|
3528
3529
|
handleStream: async (method, params, handler) => {
|
|
3529
3530
|
const error = await this._ready.wait({
|
|
3530
|
-
timeout:
|
|
3531
|
+
timeout: import_client_protocol5.PROXY_CONNECTION_TIMEOUT
|
|
3531
3532
|
});
|
|
3532
3533
|
if (error) {
|
|
3533
3534
|
throw error;
|
|
@@ -3548,7 +3549,7 @@ var IFrameHostRuntime = class {
|
|
|
3548
3549
|
this._ready.wake(void 0);
|
|
3549
3550
|
(0, import_log13.log)("started", {}, {
|
|
3550
3551
|
file: "iframe-host-runtime.ts",
|
|
3551
|
-
line:
|
|
3552
|
+
line: 113,
|
|
3552
3553
|
scope: this,
|
|
3553
3554
|
callSite: (f, a) => f(...a)
|
|
3554
3555
|
});
|
|
@@ -3556,7 +3557,7 @@ var IFrameHostRuntime = class {
|
|
|
3556
3557
|
this._ready.wake(err);
|
|
3557
3558
|
import_log13.log.catch(err, {}, {
|
|
3558
3559
|
file: "iframe-host-runtime.ts",
|
|
3559
|
-
line:
|
|
3560
|
+
line: 116,
|
|
3560
3561
|
scope: this,
|
|
3561
3562
|
callSite: (f, a) => f(...a)
|
|
3562
3563
|
});
|
|
@@ -3566,7 +3567,7 @@ var IFrameHostRuntime = class {
|
|
|
3566
3567
|
var _a;
|
|
3567
3568
|
(0, import_log13.log)("stopping...", {}, {
|
|
3568
3569
|
file: "iframe-host-runtime.ts",
|
|
3569
|
-
line:
|
|
3570
|
+
line: 121,
|
|
3570
3571
|
scope: this,
|
|
3571
3572
|
callSite: (f, a) => f(...a)
|
|
3572
3573
|
});
|
|
@@ -3575,7 +3576,7 @@ var IFrameHostRuntime = class {
|
|
|
3575
3576
|
await ((_a = this._shellRuntime) == null ? void 0 : _a.close());
|
|
3576
3577
|
(0, import_log13.log)("stopped", {}, {
|
|
3577
3578
|
file: "iframe-host-runtime.ts",
|
|
3578
|
-
line:
|
|
3579
|
+
line: 125,
|
|
3579
3580
|
scope: this,
|
|
3580
3581
|
callSite: (f, a) => f(...a)
|
|
3581
3582
|
});
|
|
@@ -3587,7 +3588,7 @@ __decorate3([
|
|
|
3587
3588
|
|
|
3588
3589
|
// packages/sdk/client-services/src/packlets/vault/iframe-proxy-runtime.ts
|
|
3589
3590
|
var import_async18 = require("@dxos/async");
|
|
3590
|
-
var
|
|
3591
|
+
var import_client_protocol6 = require("@dxos/client-protocol");
|
|
3591
3592
|
var import_errors5 = require("@dxos/errors");
|
|
3592
3593
|
var import_log14 = require("@dxos/log");
|
|
3593
3594
|
var import_network_manager3 = require("@dxos/network-manager");
|
|
@@ -3614,8 +3615,8 @@ var IFrameProxyRuntime = class {
|
|
|
3614
3615
|
iceServers: this._config.get("runtime.services.ice")
|
|
3615
3616
|
});
|
|
3616
3617
|
this._systemRpc = (0, import_rpc3.createProtoRpcPeer)({
|
|
3617
|
-
requested:
|
|
3618
|
-
exposed:
|
|
3618
|
+
requested: import_client_protocol6.workerServiceBundle,
|
|
3619
|
+
exposed: import_client_protocol6.iframeServiceBundle,
|
|
3619
3620
|
handlers: {
|
|
3620
3621
|
BridgeService: this._transportService
|
|
3621
3622
|
},
|
|
@@ -3664,6 +3665,7 @@ var IFrameProxyRuntime = class {
|
|
|
3664
3665
|
|
|
3665
3666
|
// packages/sdk/client-services/src/packlets/vault/vault-resource-lock.ts
|
|
3666
3667
|
var import_async19 = require("@dxos/async");
|
|
3668
|
+
var import_client_protocol7 = require("@dxos/client-protocol");
|
|
3667
3669
|
var import_log15 = require("@dxos/log");
|
|
3668
3670
|
var __decorate4 = function(decorators, target, key, desc) {
|
|
3669
3671
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
@@ -3698,28 +3700,28 @@ var VaultResourceLock = class {
|
|
|
3698
3700
|
try {
|
|
3699
3701
|
(0, import_log15.log)("aquiring lock...", {}, {
|
|
3700
3702
|
file: "vault-resource-lock.ts",
|
|
3701
|
-
line:
|
|
3703
|
+
line: 45,
|
|
3702
3704
|
scope: this,
|
|
3703
3705
|
callSite: (f, a) => f(...a)
|
|
3704
3706
|
});
|
|
3705
|
-
await (0, import_async19.asyncTimeout)(this._requestLock(),
|
|
3707
|
+
await (0, import_async19.asyncTimeout)(this._requestLock(), import_client_protocol7.RESOURCE_LOCK_TIMEOUT);
|
|
3706
3708
|
(0, import_log15.log)("acquired lock", {}, {
|
|
3707
3709
|
file: "vault-resource-lock.ts",
|
|
3708
|
-
line:
|
|
3710
|
+
line: 47,
|
|
3709
3711
|
scope: this,
|
|
3710
3712
|
callSite: (f, a) => f(...a)
|
|
3711
3713
|
});
|
|
3712
3714
|
} catch (e) {
|
|
3713
3715
|
(0, import_log15.log)("stealing lock...", {}, {
|
|
3714
3716
|
file: "vault-resource-lock.ts",
|
|
3715
|
-
line:
|
|
3717
|
+
line: 49,
|
|
3716
3718
|
scope: this,
|
|
3717
3719
|
callSite: (f, a) => f(...a)
|
|
3718
3720
|
});
|
|
3719
3721
|
await this._requestLock(true);
|
|
3720
3722
|
(0, import_log15.log)("stolen lock", {}, {
|
|
3721
3723
|
file: "vault-resource-lock.ts",
|
|
3722
|
-
line:
|
|
3724
|
+
line: 51,
|
|
3723
3725
|
scope: this,
|
|
3724
3726
|
callSite: (f, a) => f(...a)
|
|
3725
3727
|
});
|
|
@@ -3738,7 +3740,7 @@ var VaultResourceLock = class {
|
|
|
3738
3740
|
steal
|
|
3739
3741
|
}, {
|
|
3740
3742
|
file: "vault-resource-lock.ts",
|
|
3741
|
-
line:
|
|
3743
|
+
line: 66,
|
|
3742
3744
|
scope: this,
|
|
3743
3745
|
callSite: (f, a) => f(...a)
|
|
3744
3746
|
});
|
|
@@ -3753,14 +3755,14 @@ var VaultResourceLock = class {
|
|
|
3753
3755
|
await this._releaseTrigger.wait();
|
|
3754
3756
|
(0, import_log15.log)("releasing lock...", {}, {
|
|
3755
3757
|
file: "vault-resource-lock.ts",
|
|
3756
|
-
line:
|
|
3758
|
+
line: 75,
|
|
3757
3759
|
scope: this,
|
|
3758
3760
|
callSite: (f, a) => f(...a)
|
|
3759
3761
|
});
|
|
3760
3762
|
await ((_b = this._onRelease) == null ? void 0 : _b.call(this));
|
|
3761
3763
|
(0, import_log15.log)("released lock", {}, {
|
|
3762
3764
|
file: "vault-resource-lock.ts",
|
|
3763
|
-
line:
|
|
3765
|
+
line: 77,
|
|
3764
3766
|
scope: this,
|
|
3765
3767
|
callSite: (f, a) => f(...a)
|
|
3766
3768
|
});
|
|
@@ -3773,7 +3775,7 @@ var VaultResourceLock = class {
|
|
|
3773
3775
|
steal
|
|
3774
3776
|
}, {
|
|
3775
3777
|
file: "vault-resource-lock.ts",
|
|
3776
|
-
line:
|
|
3778
|
+
line: 84,
|
|
3777
3779
|
scope: this,
|
|
3778
3780
|
callSite: (f, a) => f(...a)
|
|
3779
3781
|
});
|
|
@@ -3792,7 +3794,7 @@ var import_network_manager4 = require("@dxos/network-manager");
|
|
|
3792
3794
|
// packages/sdk/client-services/src/packlets/vault/worker-session.ts
|
|
3793
3795
|
var import_node_assert12 = __toESM(require("node:assert"));
|
|
3794
3796
|
var import_async20 = require("@dxos/async");
|
|
3795
|
-
var
|
|
3797
|
+
var import_client_protocol8 = require("@dxos/client-protocol");
|
|
3796
3798
|
var import_log16 = require("@dxos/log");
|
|
3797
3799
|
var import_rpc4 = require("@dxos/rpc");
|
|
3798
3800
|
var import_util9 = require("@dxos/util");
|
|
@@ -3815,7 +3817,7 @@ var WorkerSession = class {
|
|
|
3815
3817
|
const middleware = {
|
|
3816
3818
|
handleCall: async (method, params, handler) => {
|
|
3817
3819
|
const error = await readySignal.wait({
|
|
3818
|
-
timeout:
|
|
3820
|
+
timeout: import_client_protocol8.PROXY_CONNECTION_TIMEOUT
|
|
3819
3821
|
});
|
|
3820
3822
|
if (error) {
|
|
3821
3823
|
throw error;
|
|
@@ -3824,7 +3826,7 @@ var WorkerSession = class {
|
|
|
3824
3826
|
},
|
|
3825
3827
|
handleStream: async (method, params, handler) => {
|
|
3826
3828
|
const error = await readySignal.wait({
|
|
3827
|
-
timeout:
|
|
3829
|
+
timeout: import_client_protocol8.PROXY_CONNECTION_TIMEOUT
|
|
3828
3830
|
});
|
|
3829
3831
|
if (error) {
|
|
3830
3832
|
throw error;
|
|
@@ -3843,8 +3845,8 @@ var WorkerSession = class {
|
|
|
3843
3845
|
...middleware
|
|
3844
3846
|
});
|
|
3845
3847
|
this._iframeRpc = (0, import_rpc4.createProtoRpcPeer)({
|
|
3846
|
-
requested:
|
|
3847
|
-
exposed:
|
|
3848
|
+
requested: import_client_protocol8.iframeServiceBundle,
|
|
3849
|
+
exposed: import_client_protocol8.workerServiceBundle,
|
|
3848
3850
|
handlers: {
|
|
3849
3851
|
WorkerService: {
|
|
3850
3852
|
start: async (request) => {
|
|
@@ -3859,7 +3861,7 @@ var WorkerSession = class {
|
|
|
3859
3861
|
} catch (err) {
|
|
3860
3862
|
import_log16.log.catch(err, {}, {
|
|
3861
3863
|
file: "worker-session.ts",
|
|
3862
|
-
line:
|
|
3864
|
+
line: 100,
|
|
3863
3865
|
scope: this,
|
|
3864
3866
|
callSite: (f, a) => f(...a)
|
|
3865
3867
|
});
|
|
@@ -3876,7 +3878,7 @@ var WorkerSession = class {
|
|
|
3876
3878
|
async open() {
|
|
3877
3879
|
import_log16.log.info("opening..", {}, {
|
|
3878
3880
|
file: "worker-session.ts",
|
|
3879
|
-
line:
|
|
3881
|
+
line: 114,
|
|
3880
3882
|
scope: this,
|
|
3881
3883
|
callSite: (f, a) => f(...a)
|
|
3882
3884
|
});
|
|
@@ -3886,7 +3888,7 @@ var WorkerSession = class {
|
|
|
3886
3888
|
this._maybeOpenShell()
|
|
3887
3889
|
]);
|
|
3888
3890
|
await this._startTrigger.wait({
|
|
3889
|
-
timeout:
|
|
3891
|
+
timeout: import_client_protocol8.PROXY_CONNECTION_TIMEOUT
|
|
3890
3892
|
});
|
|
3891
3893
|
if (this.lockKey) {
|
|
3892
3894
|
void this._afterLockReleases(this.lockKey, () => this.close());
|
|
@@ -3895,7 +3897,7 @@ var WorkerSession = class {
|
|
|
3895
3897
|
async close() {
|
|
3896
3898
|
import_log16.log.info("closing..", {}, {
|
|
3897
3899
|
file: "worker-session.ts",
|
|
3898
|
-
line:
|
|
3900
|
+
line: 124,
|
|
3899
3901
|
scope: this,
|
|
3900
3902
|
callSite: (f, a) => f(...a)
|
|
3901
3903
|
});
|
|
@@ -3904,7 +3906,7 @@ var WorkerSession = class {
|
|
|
3904
3906
|
} catch (err) {
|
|
3905
3907
|
import_log16.log.catch(err, {}, {
|
|
3906
3908
|
file: "worker-session.ts",
|
|
3907
|
-
line:
|
|
3909
|
+
line: 128,
|
|
3908
3910
|
scope: this,
|
|
3909
3911
|
callSite: (f, a) => f(...a)
|
|
3910
3912
|
});
|
|
@@ -3920,7 +3922,7 @@ var WorkerSession = class {
|
|
|
3920
3922
|
} catch (e) {
|
|
3921
3923
|
import_log16.log.info("No shell connected.", {}, {
|
|
3922
3924
|
file: "worker-session.ts",
|
|
3923
|
-
line:
|
|
3925
|
+
line: 138,
|
|
3924
3926
|
scope: this,
|
|
3925
3927
|
callSite: (f, a) => f(...a)
|
|
3926
3928
|
});
|
|
@@ -4273,7 +4275,7 @@ var ServiceRegistry = class {
|
|
|
4273
4275
|
var ClientServicesHost = class {
|
|
4274
4276
|
constructor({
|
|
4275
4277
|
config,
|
|
4276
|
-
modelFactory = (0,
|
|
4278
|
+
modelFactory = (0, import_client_protocol9.createDefaultModelFactory)(),
|
|
4277
4279
|
// TODO(burdon): Create ApolloLink abstraction (see Client).
|
|
4278
4280
|
transportFactory,
|
|
4279
4281
|
signalManager,
|
|
@@ -4320,7 +4322,7 @@ var ClientServicesHost = class {
|
|
|
4320
4322
|
}
|
|
4321
4323
|
});
|
|
4322
4324
|
this._loggingService = new LoggingServiceImpl();
|
|
4323
|
-
this._serviceRegistry = new ServiceRegistry(
|
|
4325
|
+
this._serviceRegistry = new ServiceRegistry(import_client_protocol9.clientServiceBundle, {
|
|
4324
4326
|
SystemService: this._systemService
|
|
4325
4327
|
});
|
|
4326
4328
|
}
|