@dxos/client-services 0.1.56-main.e47dfd1 → 0.1.56-main.e79d64a
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-CSJSC47N.mjs → chunk-T32PP5QD.mjs} +1284 -625
- package/dist/lib/browser/chunk-T32PP5QD.mjs.map +7 -0
- package/dist/lib/browser/index.mjs +70 -54
- package/dist/lib/browser/index.mjs.map +3 -3
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/packlets/testing/index.mjs +42 -48
- package/dist/lib/browser/packlets/testing/index.mjs.map +3 -3
- package/dist/lib/node/index.cjs +1439 -767
- package/dist/lib/node/index.cjs.map +4 -4
- package/dist/lib/node/meta.json +1 -1
- package/dist/lib/node/packlets/testing/index.cjs +1590 -936
- package/dist/lib/node/packlets/testing/index.cjs.map +4 -4
- package/dist/types/src/packlets/identity/identity-manager.d.ts +7 -1
- package/dist/types/src/packlets/identity/identity-manager.d.ts.map +1 -1
- package/dist/types/src/packlets/identity/identity-service.d.ts +7 -3
- package/dist/types/src/packlets/identity/identity-service.d.ts.map +1 -1
- package/dist/types/src/packlets/identity/identity.d.ts +3 -2
- package/dist/types/src/packlets/identity/identity.d.ts.map +1 -1
- package/dist/types/src/packlets/invitations/device-invitation-protocol.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/invitations/invitations-service.d.ts.map +1 -1
- package/dist/types/src/packlets/invitations/space-invitation-protocol.d.ts.map +1 -1
- package/dist/types/src/packlets/logging/logging-service.d.ts +6 -2
- package/dist/types/src/packlets/logging/logging-service.d.ts.map +1 -1
- package/dist/types/src/packlets/services/client-rpc-server.d.ts.map +1 -1
- package/dist/types/src/packlets/services/diagnostics.d.ts +46 -0
- package/dist/types/src/packlets/services/diagnostics.d.ts.map +1 -0
- package/dist/types/src/packlets/services/index.d.ts +1 -0
- package/dist/types/src/packlets/services/index.d.ts.map +1 -1
- package/dist/types/src/packlets/services/platform.d.ts +16 -0
- package/dist/types/src/packlets/services/platform.d.ts.map +1 -0
- package/dist/types/src/packlets/services/service-context.d.ts +2 -1
- package/dist/types/src/packlets/services/service-context.d.ts.map +1 -1
- package/dist/types/src/packlets/services/service-host.d.ts +7 -3
- package/dist/types/src/packlets/services/service-host.d.ts.map +1 -1
- package/dist/types/src/packlets/services/util.d.ts +6 -0
- package/dist/types/src/packlets/services/util.d.ts.map +1 -0
- package/dist/types/src/packlets/spaces/data-space-manager.d.ts.map +1 -1
- package/dist/types/src/packlets/spaces/data-space.d.ts.map +1 -1
- package/dist/types/src/packlets/spaces/notarization-plugin.d.ts.map +1 -1
- package/dist/types/src/packlets/spaces/spaces-service.d.ts.map +1 -1
- package/dist/types/src/packlets/system/system-service.d.ts +12 -2
- package/dist/types/src/packlets/system/system-service.d.ts.map +1 -1
- package/dist/types/src/packlets/testing/invitation-utils.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/shell-runtime.d.ts.map +1 -1
- package/dist/types/src/packlets/vault/worker-runtime.d.ts.map +1 -1
- package/dist/types/src/packlets/vault/worker-session.d.ts.map +1 -1
- package/dist/types/src/version.d.ts +2 -0
- package/dist/types/src/version.d.ts.map +1 -0
- package/package.json +34 -33
- package/src/packlets/devices/devices-service.test.ts +2 -1
- package/src/packlets/identity/authenticator.test.ts +2 -2
- package/src/packlets/identity/identity-manager.test.ts +15 -3
- package/src/packlets/identity/identity-manager.ts +28 -8
- package/src/packlets/identity/identity-service.test.ts +17 -2
- package/src/packlets/identity/identity-service.ts +24 -16
- package/src/packlets/identity/identity.test.ts +7 -6
- package/src/packlets/identity/identity.ts +9 -5
- package/src/packlets/invitations/device-invitation-protocol.test.ts +2 -1
- package/src/packlets/invitations/device-invitation-protocol.ts +1 -2
- package/src/packlets/invitations/invitation-extension.ts +1 -2
- package/src/packlets/invitations/invitations-handler.ts +3 -2
- package/src/packlets/invitations/invitations-service.ts +1 -2
- package/src/packlets/invitations/space-invitation-protocol.ts +1 -2
- package/src/packlets/locks/node.ts +1 -1
- package/src/packlets/logging/logging-service.ts +17 -9
- package/src/packlets/network/network-service.test.ts +2 -1
- package/src/packlets/services/client-rpc-server.ts +4 -4
- package/src/packlets/services/diagnostics.ts +212 -0
- package/src/packlets/services/index.ts +1 -0
- package/src/packlets/services/platform.ts +48 -0
- package/src/packlets/services/service-context.test.ts +59 -0
- package/src/packlets/services/service-context.ts +21 -15
- package/src/packlets/services/service-host.test.ts +12 -11
- package/src/packlets/services/service-host.ts +39 -20
- package/src/packlets/services/service-registry.test.ts +3 -1
- package/src/packlets/services/util.ts +33 -0
- package/src/packlets/spaces/data-space-manager.test.ts +80 -22
- package/src/packlets/spaces/data-space-manager.ts +7 -4
- package/src/packlets/spaces/data-space.ts +17 -5
- package/src/packlets/spaces/notarization-plugin.ts +1 -2
- package/src/packlets/spaces/spaces-service.test.ts +2 -1
- package/src/packlets/spaces/spaces-service.ts +19 -13
- package/src/packlets/system/system-service.test.ts +1 -0
- package/src/packlets/system/system-service.ts +34 -2
- package/src/packlets/testing/invitation-utils.ts +1 -2
- package/src/packlets/testing/test-builder.ts +1 -1
- package/src/packlets/vault/iframe-host-runtime.ts +2 -1
- package/src/packlets/vault/shell-runtime.ts +1 -2
- package/src/packlets/vault/worker-runtime.ts +3 -2
- package/src/packlets/vault/worker-session.ts +7 -3
- package/src/version.ts +1 -0
- package/dist/lib/browser/chunk-CSJSC47N.mjs.map +0 -7
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
import { Trigger } from '@dxos/async';
|
|
6
6
|
import { PROXY_CONNECTION_TIMEOUT, ShellRuntime } from '@dxos/client-protocol';
|
|
7
7
|
import { Config } from '@dxos/config';
|
|
8
|
+
import { Context } from '@dxos/context';
|
|
8
9
|
import { log, logInfo } from '@dxos/log';
|
|
9
10
|
import { MemorySignalManager, MemorySignalManagerContext, WebsocketSignalManager } from '@dxos/messaging';
|
|
10
11
|
import { createWebRTCTransportFactory, TransportFactory } from '@dxos/network-manager';
|
|
@@ -108,7 +109,7 @@ export class IFrameHostRuntime {
|
|
|
108
109
|
...middleware,
|
|
109
110
|
});
|
|
110
111
|
|
|
111
|
-
await Promise.all([this._clientServices.open(), this._clientRpc.open(), this._shellRuntime?.open()]);
|
|
112
|
+
await Promise.all([this._clientServices.open(new Context()), this._clientRpc.open(), this._shellRuntime?.open()]);
|
|
112
113
|
this._ready.wake(undefined);
|
|
113
114
|
log('started');
|
|
114
115
|
} catch (err: any) {
|
|
@@ -2,10 +2,9 @@
|
|
|
2
2
|
// Copyright 2023 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import invariant from 'tiny-invariant';
|
|
6
|
-
|
|
7
5
|
import { Event } from '@dxos/async';
|
|
8
6
|
import { appServiceBundle, AppServiceBundle, ShellRuntime, shellServiceBundle } from '@dxos/client-protocol';
|
|
7
|
+
import { invariant } from '@dxos/invariant';
|
|
9
8
|
import { PublicKey } from '@dxos/keys';
|
|
10
9
|
import { AppContextRequest, LayoutRequest, ShellLayout } from '@dxos/protocols/proto/dxos/iframe';
|
|
11
10
|
import { createProtoRpcPeer, ProtoRpcPeer, RpcPort } from '@dxos/rpc';
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
import { Trigger } from '@dxos/async';
|
|
6
6
|
import { Config } from '@dxos/config';
|
|
7
|
+
import { Context } from '@dxos/context';
|
|
7
8
|
import { log } from '@dxos/log';
|
|
8
9
|
import { MemorySignalManager, MemorySignalManagerContext, WebsocketSignalManager } from '@dxos/messaging';
|
|
9
10
|
import { WebRTCTransportProxyFactory } from '@dxos/network-manager';
|
|
@@ -57,12 +58,12 @@ export class WorkerRuntime {
|
|
|
57
58
|
transportFactory: this._transportFactory,
|
|
58
59
|
});
|
|
59
60
|
|
|
60
|
-
await this._clientServices.open();
|
|
61
|
+
await this._clientServices.open(new Context());
|
|
61
62
|
this._ready.wake(undefined);
|
|
62
63
|
log('started');
|
|
63
64
|
} catch (err: any) {
|
|
64
65
|
this._ready.wake(err);
|
|
65
|
-
log.catch(err);
|
|
66
|
+
log.catch('starting', err);
|
|
66
67
|
}
|
|
67
68
|
}
|
|
68
69
|
|
|
@@ -2,8 +2,6 @@
|
|
|
2
2
|
// Copyright 2022 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import invariant from 'tiny-invariant';
|
|
6
|
-
|
|
7
5
|
import { asyncTimeout, Trigger } from '@dxos/async';
|
|
8
6
|
import {
|
|
9
7
|
iframeServiceBundle,
|
|
@@ -11,6 +9,7 @@ import {
|
|
|
11
9
|
PROXY_CONNECTION_TIMEOUT,
|
|
12
10
|
workerServiceBundle,
|
|
13
11
|
} from '@dxos/client-protocol';
|
|
12
|
+
import { invariant } from '@dxos/invariant';
|
|
14
13
|
import { log, logInfo } from '@dxos/log';
|
|
15
14
|
import { BridgeService } from '@dxos/protocols/proto/dxos/mesh/bridge';
|
|
16
15
|
import { createProtoRpcPeer, ProtoRpcPeer, RpcPort } from '@dxos/rpc';
|
|
@@ -74,6 +73,7 @@ export class WorkerSession {
|
|
|
74
73
|
port: appPort,
|
|
75
74
|
...middleware,
|
|
76
75
|
});
|
|
76
|
+
|
|
77
77
|
this._shellClientRpc = new ClientRpcServer({
|
|
78
78
|
serviceRegistry: this._serviceHost.serviceRegistry,
|
|
79
79
|
port: shellPort,
|
|
@@ -103,7 +103,7 @@ export class WorkerSession {
|
|
|
103
103
|
},
|
|
104
104
|
},
|
|
105
105
|
port: systemPort,
|
|
106
|
-
timeout:
|
|
106
|
+
timeout: 1_000, // With low timeout heartbeat may fail if the tab's thread is saturated.
|
|
107
107
|
});
|
|
108
108
|
|
|
109
109
|
this.bridgeService = this._iframeRpc.rpc.BridgeService;
|
|
@@ -113,10 +113,14 @@ export class WorkerSession {
|
|
|
113
113
|
log.info('opening...');
|
|
114
114
|
await Promise.all([this._clientRpc.open(), this._iframeRpc.open(), this._maybeOpenShell()]);
|
|
115
115
|
|
|
116
|
+
// Wait until the worker's RPC service has started.
|
|
116
117
|
await this._startTrigger.wait({ timeout: PROXY_CONNECTION_TIMEOUT });
|
|
118
|
+
|
|
119
|
+
// TODO(burdon): Comment required.
|
|
117
120
|
if (this.lockKey) {
|
|
118
121
|
void this._afterLockReleases(this.lockKey, () => this.close());
|
|
119
122
|
}
|
|
123
|
+
|
|
120
124
|
log.info('opened');
|
|
121
125
|
}
|
|
122
126
|
|
package/src/version.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export const DXOS_VERSION = "0.1.56-main.e79d64a";
|