@dxos/client-services 0.1.41-next.d517c89 → 0.1.41
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-LGMYP2WL.mjs → chunk-T73F4MV4.mjs} +232 -213
- package/dist/lib/browser/chunk-T73F4MV4.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 +271 -252
- 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 +259 -217
- package/dist/lib/node/packlets/testing/index.cjs.map +4 -4
- package/dist/types/src/packlets/logging/index.d.ts +2 -0
- package/dist/types/src/packlets/logging/index.d.ts.map +1 -0
- package/dist/types/src/packlets/logging/logging-service.d.ts +13 -0
- package/dist/types/src/packlets/logging/logging-service.d.ts.map +1 -0
- package/dist/types/src/packlets/logging/logging.test.d.ts +2 -0
- package/dist/types/src/packlets/logging/logging.test.d.ts.map +1 -0
- package/dist/types/src/packlets/services/service-host.d.ts +1 -0
- package/dist/types/src/packlets/services/service-host.d.ts.map +1 -1
- package/dist/types/src/packlets/spaces/data-space-manager.d.ts.map +1 -1
- package/dist/types/src/packlets/vault/iframe-host-runtime.d.ts +6 -5
- package/dist/types/src/packlets/vault/iframe-host-runtime.d.ts.map +1 -1
- package/dist/types/src/packlets/vault/iframe-proxy-runtime.d.ts +9 -8
- package/dist/types/src/packlets/vault/iframe-proxy-runtime.d.ts.map +1 -1
- package/package.json +30 -30
- package/src/packlets/logging/index.ts +5 -0
- package/src/packlets/logging/logging-service.ts +78 -0
- package/src/packlets/logging/logging.test.ts +50 -0
- package/src/packlets/services/service-host.ts +9 -2
- package/src/packlets/spaces/data-space-manager.ts +7 -3
- package/src/packlets/tests/shared-worker.test.ts +9 -10
- package/src/packlets/vault/iframe-host-runtime.ts +13 -16
- package/src/packlets/vault/iframe-proxy-runtime.ts +28 -34
- package/dist/lib/browser/chunk-LGMYP2WL.mjs.map +0 -7
- package/dist/types/src/packlets/deprecated/index.d.ts +0 -2
- package/dist/types/src/packlets/deprecated/index.d.ts.map +0 -1
- package/dist/types/src/packlets/deprecated/tracing.d.ts +0 -12
- package/dist/types/src/packlets/deprecated/tracing.d.ts.map +0 -1
- package/src/packlets/deprecated/index.ts +0 -5
- package/src/packlets/deprecated/tracing.ts +0 -21
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/packlets/logging/index.ts"],"names":[],"mappings":"AAIA,cAAc,mBAAmB,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Stream } from '@dxos/codec-protobuf';
|
|
2
|
+
import { LoggingService, LogEntry, QueryLogsRequest } from '@dxos/protocols/proto/dxos/client/services';
|
|
3
|
+
/**
|
|
4
|
+
* Logging service used to spy on logs of the host.
|
|
5
|
+
*/
|
|
6
|
+
export declare class LoggingServiceImpl implements LoggingService {
|
|
7
|
+
private readonly _logs;
|
|
8
|
+
open(): Promise<void>;
|
|
9
|
+
close(): Promise<void>;
|
|
10
|
+
queryLogs(request: QueryLogsRequest): Stream<LogEntry>;
|
|
11
|
+
private _logProcessor;
|
|
12
|
+
}
|
|
13
|
+
//# sourceMappingURL=logging-service.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"logging-service.d.ts","sourceRoot":"","sources":["../../../../../src/packlets/logging/logging-service.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAE9C,OAAO,EAAE,cAAc,EAAE,QAAQ,EAAE,gBAAgB,EAAE,MAAM,4CAA4C,CAAC;AAExG;;GAEG;AACH,qBAAa,kBAAmB,YAAW,cAAc;IACvD,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAgC;IAEhD,IAAI;IAIJ,KAAK;IAKX,SAAS,CAAC,OAAO,EAAE,gBAAgB,GAAG,MAAM,CAAC,QAAQ,CAAC;IA0BtD,OAAO,CAAC,aAAa,CAEnB;CACH"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"logging.test.d.ts","sourceRoot":"","sources":["../../../../../src/packlets/logging/logging.test.ts"],"names":[],"mappings":""}
|
|
@@ -25,6 +25,7 @@ export declare class ClientServicesHost {
|
|
|
25
25
|
private readonly _resourceLock?;
|
|
26
26
|
private readonly _serviceRegistry;
|
|
27
27
|
private readonly _systemService;
|
|
28
|
+
private readonly _loggingService;
|
|
28
29
|
private _config?;
|
|
29
30
|
private readonly _statusUpdate;
|
|
30
31
|
private readonly _modelFactory;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"service-host.d.ts","sourceRoot":"","sources":["../../../../../src/packlets/services/service-host.ts"],"names":[],"mappings":"AAOA,OAAO,EAAuB,cAAc,EAAwC,MAAM,cAAc,CAAC;AACzG,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAGtC,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACnD,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAGvD,OAAO,EAAE,OAAO,EAAE,MAAM,6BAA6B,CAAC;AAatD,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAErD,oBAAY,wBAAwB,GAAG;IACrC;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,YAAY,CAAC,EAAE,YAAY,CAAC;IAC5B,cAAc,CAAC,EAAE,cAAc,CAAC;IAChC,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF,oBAAY,iBAAiB,GAAG;IAC9B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,cAAc,CAAC,EAAE,cAAc,CAAC;CACjC,CAAC;AAEF;;GAE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yBAAyB,EAAE,wBAAwB,EACnD,QAAQ,EAAE,OAAO,EACjB,eAAe,EAAE,cAAc,EAC/B,aAAa,EAAE,YAAY,EAC3B,UAAU,EAAE,SAAS,CAAC,WAAW,CAAC,EAClC,cAAc,EAAE,aAAa;IAIhD,IAAI,MAAM,qCAET;IAGK,IAAI;IAqBJ,KAAK;IAUX;;OAEG;IAEG,WAAW;IA8BX,WAAW,CAAC,IAAI,EAAE,kBAAkB,GAAG,OAAO,CAAC,SAAS,CAAC;IAqB/D;;;;OAIG;IACG,mBAAmB,CAAC,QAAQ,EAAE,SAAS;YAU/B,eAAe;CA6E9B"}
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { Config } from '@dxos/config';
|
|
2
2
|
import { RpcPort } from '@dxos/rpc';
|
|
3
|
-
import { Provider } from '@dxos/util';
|
|
3
|
+
import { MaybePromise, Provider } from '@dxos/util';
|
|
4
4
|
import { LocalClientServices } from '../services';
|
|
5
5
|
import { ShellRuntime } from './shell-runtime';
|
|
6
6
|
export declare type IFrameHostRuntimeParams = {
|
|
7
|
-
|
|
7
|
+
config: Config | Provider<MaybePromise<Config>>;
|
|
8
|
+
origin: string;
|
|
8
9
|
appPort: RpcPort;
|
|
9
10
|
shellPort?: RpcPort;
|
|
10
11
|
};
|
|
@@ -16,16 +17,16 @@ export declare type IFrameHostRuntimeParams = {
|
|
|
16
17
|
*/
|
|
17
18
|
export declare class IFrameHostRuntime {
|
|
18
19
|
private readonly _configProvider;
|
|
19
|
-
private readonly _transportFactory;
|
|
20
20
|
private readonly _ready;
|
|
21
21
|
private readonly _appPort;
|
|
22
22
|
private readonly _shellPort?;
|
|
23
23
|
private _config;
|
|
24
|
+
private _transportFactory;
|
|
24
25
|
private _clientServices;
|
|
25
26
|
private _clientRpc;
|
|
26
27
|
private _shellRuntime?;
|
|
27
|
-
origin
|
|
28
|
-
constructor({
|
|
28
|
+
origin: string;
|
|
29
|
+
constructor({ config, origin, appPort, shellPort }: IFrameHostRuntimeParams);
|
|
29
30
|
get services(): LocalClientServices;
|
|
30
31
|
get shell(): ShellRuntime | undefined;
|
|
31
32
|
start(): Promise<void>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"iframe-host-runtime.d.ts","sourceRoot":"","sources":["../../../../../src/packlets/vault/iframe-host-runtime.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAItC,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAiB,QAAQ,EAAE,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"iframe-host-runtime.d.ts","sourceRoot":"","sources":["../../../../../src/packlets/vault/iframe-host-runtime.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAItC,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAiB,YAAY,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAEnE,OAAO,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAElD,OAAO,EAAE,YAAY,EAAoB,MAAM,iBAAiB,CAAC;AAIjE,oBAAY,uBAAuB,GAAG;IACpC,MAAM,EAAE,MAAM,GAAG,QAAQ,CAAC,YAAY,CAAC,MAAM,CAAC,CAAC,CAAC;IAChD,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,OAAO,CAAC;IACjB,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB,CAAC;AAEF;;;;;GAKG;AACH,qBAAa,iBAAiB;IAC5B,OAAO,CAAC,QAAQ,CAAC,eAAe,CAAoC;IACpE,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAoC;IAE3D,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAU;IACnC,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAC,CAAU;IACtC,OAAO,CAAC,OAAO,CAAU;IACzB,OAAO,CAAC,iBAAiB,CAAoB;IAG7C,OAAO,CAAC,eAAe,CAAuB;IAC9C,OAAO,CAAC,UAAU,CAAmB;IACrC,OAAO,CAAC,aAAa,CAAC,CAAmB;IAGlC,MAAM,EAAE,MAAM,CAAC;gBAEV,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,SAAS,EAAE,EAAE,uBAAuB;IAW3E,IAAI,QAAQ,wBAEX;IAED,IAAI,KAAK,IAAI,YAAY,GAAG,SAAS,CAEpC;IAEK,KAAK;IAsDL,IAAI;CAOX"}
|
|
@@ -1,23 +1,24 @@
|
|
|
1
|
+
import { Config } from '@dxos/client';
|
|
1
2
|
import { RpcPort } from '@dxos/rpc';
|
|
3
|
+
import { MaybePromise, Provider } from '@dxos/util';
|
|
2
4
|
import { ShellRuntime } from './shell-runtime';
|
|
3
5
|
export declare type IFrameProxyRuntimeParams = {
|
|
6
|
+
config: Config | Provider<MaybePromise<Config>>;
|
|
4
7
|
systemPort: RpcPort;
|
|
5
|
-
workerAppPort: RpcPort;
|
|
6
|
-
windowAppPort: RpcPort;
|
|
7
8
|
shellPort?: RpcPort;
|
|
8
9
|
};
|
|
9
10
|
/**
|
|
10
11
|
* Manages the client connection to the shared worker.
|
|
11
12
|
*/
|
|
12
13
|
export declare class IFrameProxyRuntime {
|
|
14
|
+
private readonly _configProvider;
|
|
13
15
|
private readonly _systemPort;
|
|
14
|
-
private readonly _windowAppPort;
|
|
15
|
-
private readonly _workerAppPort;
|
|
16
16
|
private readonly _shellPort?;
|
|
17
|
-
private
|
|
18
|
-
private
|
|
19
|
-
private
|
|
20
|
-
|
|
17
|
+
private _config;
|
|
18
|
+
private _transportService;
|
|
19
|
+
private _systemRpc;
|
|
20
|
+
private _shellRuntime?;
|
|
21
|
+
constructor({ config, systemPort, shellPort }: IFrameProxyRuntimeParams);
|
|
21
22
|
get shell(): ShellRuntime | undefined;
|
|
22
23
|
open(origin: string): Promise<void>;
|
|
23
24
|
close(): Promise<void>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"iframe-proxy-runtime.d.ts","sourceRoot":"","sources":["../../../../../src/packlets/vault/iframe-proxy-runtime.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"iframe-proxy-runtime.d.ts","sourceRoot":"","sources":["../../../../../src/packlets/vault/iframe-proxy-runtime.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,MAAM,EAAiE,MAAM,cAAc,CAAC;AAKrG,OAAO,EAAoC,OAAO,EAAE,MAAM,WAAW,CAAC;AACtE,OAAO,EAAiB,YAAY,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAEnE,OAAO,EAAE,YAAY,EAAoB,MAAM,iBAAiB,CAAC;AAGjE,oBAAY,wBAAwB,GAAG;IACrC,MAAM,EAAE,MAAM,GAAG,QAAQ,CAAC,YAAY,CAAC,MAAM,CAAC,CAAC,CAAC;IAChD,UAAU,EAAE,OAAO,CAAC;IACpB,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB,CAAC;AAEF;;GAEG;AACH,qBAAa,kBAAkB;IAC7B,OAAO,CAAC,QAAQ,CAAC,eAAe,CAAqC;IACrE,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAU;IACtC,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAC,CAAU;IACtC,OAAO,CAAC,OAAO,CAAU;IACzB,OAAO,CAAC,iBAAiB,CAAiB;IAC1C,OAAO,CAAC,UAAU,CAAqC;IACvD,OAAO,CAAC,aAAa,CAAC,CAAmB;gBAE7B,EAAE,MAAM,EAAE,UAAU,EAAE,SAAS,EAAE,EAAE,wBAAwB;IAUvE,IAAI,KAAK,IAAI,YAAY,GAAG,SAAS,CAEpC;IAEK,IAAI,CAAC,MAAM,EAAE,MAAM;IAgCnB,KAAK;CAKZ"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dxos/client-services",
|
|
3
|
-
"version": "0.1.41
|
|
3
|
+
"version": "0.1.41",
|
|
4
4
|
"description": "DXOS client services implementation",
|
|
5
5
|
"homepage": "https://dxos.org",
|
|
6
6
|
"bugs": "https://github.com/dxos/dxos/issues",
|
|
@@ -20,39 +20,39 @@
|
|
|
20
20
|
"src"
|
|
21
21
|
],
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@dxos/async": "0.1.41
|
|
24
|
-
"@dxos/client": "0.1.41
|
|
25
|
-
"@dxos/codec-protobuf": "0.1.41
|
|
26
|
-
"@dxos/config": "0.1.41
|
|
27
|
-
"@dxos/context": "0.1.41
|
|
28
|
-
"@dxos/credentials": "0.1.41
|
|
29
|
-
"@dxos/crypto": "0.1.41
|
|
30
|
-
"@dxos/debug": "0.1.41
|
|
31
|
-
"@dxos/document-model": "0.1.41
|
|
32
|
-
"@dxos/echo-db": "0.1.41
|
|
33
|
-
"@dxos/echo-pipeline": "0.1.41
|
|
34
|
-
"@dxos/errors": "0.1.41
|
|
35
|
-
"@dxos/feed-store": "0.1.41
|
|
36
|
-
"@dxos/keyring": "0.1.41
|
|
37
|
-
"@dxos/keys": "0.1.41
|
|
38
|
-
"@dxos/log": "0.1.41
|
|
39
|
-
"@dxos/messaging": "0.1.41
|
|
40
|
-
"@dxos/model-factory": "0.1.41
|
|
41
|
-
"@dxos/network-manager": "0.1.41
|
|
42
|
-
"@dxos/node-std": "0.1.41
|
|
43
|
-
"@dxos/protocols": "0.1.41
|
|
44
|
-
"@dxos/random-access-storage": "0.1.41
|
|
45
|
-
"@dxos/rpc": "0.1.41
|
|
46
|
-
"@dxos/teleport": "0.1.41
|
|
47
|
-
"@dxos/teleport-extension-gossip": "0.1.41
|
|
48
|
-
"@dxos/text-model": "0.1.41
|
|
49
|
-
"@dxos/timeframe": "0.1.41
|
|
50
|
-
"@dxos/util": "0.1.41
|
|
23
|
+
"@dxos/async": "0.1.41",
|
|
24
|
+
"@dxos/client": "0.1.41",
|
|
25
|
+
"@dxos/codec-protobuf": "0.1.41",
|
|
26
|
+
"@dxos/config": "0.1.41",
|
|
27
|
+
"@dxos/context": "0.1.41",
|
|
28
|
+
"@dxos/credentials": "0.1.41",
|
|
29
|
+
"@dxos/crypto": "0.1.41",
|
|
30
|
+
"@dxos/debug": "0.1.41",
|
|
31
|
+
"@dxos/document-model": "0.1.41",
|
|
32
|
+
"@dxos/echo-db": "0.1.41",
|
|
33
|
+
"@dxos/echo-pipeline": "0.1.41",
|
|
34
|
+
"@dxos/errors": "0.1.41",
|
|
35
|
+
"@dxos/feed-store": "0.1.41",
|
|
36
|
+
"@dxos/keyring": "0.1.41",
|
|
37
|
+
"@dxos/keys": "0.1.41",
|
|
38
|
+
"@dxos/log": "0.1.41",
|
|
39
|
+
"@dxos/messaging": "0.1.41",
|
|
40
|
+
"@dxos/model-factory": "0.1.41",
|
|
41
|
+
"@dxos/network-manager": "0.1.41",
|
|
42
|
+
"@dxos/node-std": "0.1.41",
|
|
43
|
+
"@dxos/protocols": "0.1.41",
|
|
44
|
+
"@dxos/random-access-storage": "0.1.41",
|
|
45
|
+
"@dxos/rpc": "0.1.41",
|
|
46
|
+
"@dxos/teleport": "0.1.41",
|
|
47
|
+
"@dxos/teleport-extension-gossip": "0.1.41",
|
|
48
|
+
"@dxos/text-model": "0.1.41",
|
|
49
|
+
"@dxos/timeframe": "0.1.41",
|
|
50
|
+
"@dxos/util": "0.1.41"
|
|
51
51
|
},
|
|
52
52
|
"devDependencies": {
|
|
53
53
|
"@types/readable-stream": "^2.3.9",
|
|
54
54
|
"fast-check": "~3.3.0",
|
|
55
|
-
"@dxos/signal": "0.1.41
|
|
55
|
+
"@dxos/signal": "0.1.41"
|
|
56
56
|
},
|
|
57
57
|
"publishConfig": {
|
|
58
58
|
"access": "public"
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2022 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import { Event } from '@dxos/async';
|
|
6
|
+
import { Stream } from '@dxos/codec-protobuf';
|
|
7
|
+
import { log, LogEntry as NaturalLogEntry, LogProcessor, shouldLog } from '@dxos/log';
|
|
8
|
+
import { LoggingService, LogEntry, QueryLogsRequest } from '@dxos/protocols/proto/dxos/client/services';
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Logging service used to spy on logs of the host.
|
|
12
|
+
*/
|
|
13
|
+
export class LoggingServiceImpl implements LoggingService {
|
|
14
|
+
private readonly _logs = new Event<NaturalLogEntry>();
|
|
15
|
+
|
|
16
|
+
async open() {
|
|
17
|
+
log.runtimeConfig.processors.push(this._logProcessor);
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
async close() {
|
|
21
|
+
const index = log.runtimeConfig.processors.findIndex((processor) => processor === this._logProcessor);
|
|
22
|
+
log.runtimeConfig.processors.splice(index, 1);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
queryLogs(request: QueryLogsRequest): Stream<LogEntry> {
|
|
26
|
+
const filters = request.filters?.length ? request.filters : undefined;
|
|
27
|
+
return new Stream<LogEntry>(({ ctx, next }) => {
|
|
28
|
+
const handler = (entry: NaturalLogEntry) => {
|
|
29
|
+
// Prevent logging feedback loop from logging service.
|
|
30
|
+
if (
|
|
31
|
+
entry.meta?.file.includes('logging-service') ||
|
|
32
|
+
(entry.context &&
|
|
33
|
+
Object.values(entry.context).some((value) => typeof value === 'string' && value.includes('LoggingService')))
|
|
34
|
+
) {
|
|
35
|
+
return;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
if (shouldLog(entry, filters)) {
|
|
39
|
+
next(jsonify(entry));
|
|
40
|
+
}
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
ctx.onDispose(() => {
|
|
44
|
+
this._logs.off(handler);
|
|
45
|
+
});
|
|
46
|
+
|
|
47
|
+
this._logs.on(handler);
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
private _logProcessor: LogProcessor = (_config, entry) => {
|
|
52
|
+
this._logs.emit(entry);
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* Recursively converts an object into a JSON-compatible object.
|
|
58
|
+
*/
|
|
59
|
+
const jsonify = (value: any): any => {
|
|
60
|
+
if (typeof value === 'function') {
|
|
61
|
+
return null;
|
|
62
|
+
} else if (typeof value === 'object' && value !== null) {
|
|
63
|
+
if (Array.isArray(value)) {
|
|
64
|
+
return value.map(jsonify);
|
|
65
|
+
} else {
|
|
66
|
+
if (typeof value.toJSON === 'function') {
|
|
67
|
+
return value.toJSON();
|
|
68
|
+
}
|
|
69
|
+
const res: any = {};
|
|
70
|
+
for (const key of Object.keys(value)) {
|
|
71
|
+
res[key] = jsonify(value[key]);
|
|
72
|
+
}
|
|
73
|
+
return res;
|
|
74
|
+
}
|
|
75
|
+
} else {
|
|
76
|
+
return value;
|
|
77
|
+
}
|
|
78
|
+
};
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2023 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import { expect } from 'chai';
|
|
6
|
+
|
|
7
|
+
import { Trigger } from '@dxos/async';
|
|
8
|
+
import { log, LogLevel } from '@dxos/log';
|
|
9
|
+
import { LogEntry } from '@dxos/protocols/proto/dxos/client/services';
|
|
10
|
+
import { beforeEach, describe, test } from '@dxos/test';
|
|
11
|
+
|
|
12
|
+
import { LoggingServiceImpl } from './logging-service';
|
|
13
|
+
|
|
14
|
+
describe('LoggingService', () => {
|
|
15
|
+
let loggingService: LoggingServiceImpl;
|
|
16
|
+
|
|
17
|
+
beforeEach(async () => {
|
|
18
|
+
loggingService = new LoggingServiceImpl();
|
|
19
|
+
await loggingService.open();
|
|
20
|
+
});
|
|
21
|
+
|
|
22
|
+
afterEach(async () => {
|
|
23
|
+
await loggingService.close();
|
|
24
|
+
});
|
|
25
|
+
|
|
26
|
+
test('queryLogs streams logs', async () => {
|
|
27
|
+
const trigger = new Trigger<LogEntry>();
|
|
28
|
+
loggingService.queryLogs({}).subscribe((entry) => {
|
|
29
|
+
trigger.wake(entry);
|
|
30
|
+
});
|
|
31
|
+
const message = 'Hello World!';
|
|
32
|
+
log(message);
|
|
33
|
+
const entry = await trigger.wait();
|
|
34
|
+
expect(entry.message).to.eq(message);
|
|
35
|
+
expect(entry.level).to.eq(LogLevel.DEBUG);
|
|
36
|
+
});
|
|
37
|
+
|
|
38
|
+
test('queryLogs filters logs', async () => {
|
|
39
|
+
const trigger = new Trigger<LogEntry>();
|
|
40
|
+
loggingService.queryLogs({ filters: [{ level: LogLevel.ERROR }] }).subscribe((entry) => {
|
|
41
|
+
trigger.wake(entry);
|
|
42
|
+
});
|
|
43
|
+
log('debugging something');
|
|
44
|
+
const message = 'This is a failure';
|
|
45
|
+
log.error(message);
|
|
46
|
+
const entry = await trigger.wait();
|
|
47
|
+
expect(entry.message).to.eq(message);
|
|
48
|
+
expect(entry.level).to.eq(LogLevel.ERROR);
|
|
49
|
+
});
|
|
50
|
+
});
|
|
@@ -15,11 +15,11 @@ import { trace } from '@dxos/protocols';
|
|
|
15
15
|
import { SystemStatus } from '@dxos/protocols/proto/dxos/client/services';
|
|
16
16
|
import { Storage } from '@dxos/random-access-storage';
|
|
17
17
|
|
|
18
|
-
import { TracingServiceImpl } from '../deprecated';
|
|
19
18
|
import { DevicesServiceImpl } from '../devices';
|
|
20
19
|
import { DevtoolsServiceImpl, DevtoolsHostEvents } from '../devtools';
|
|
21
20
|
import { IdentityServiceImpl } from '../identity';
|
|
22
21
|
import { InvitationsServiceImpl } from '../invitations';
|
|
22
|
+
import { LoggingServiceImpl } from '../logging';
|
|
23
23
|
import { NetworkServiceImpl } from '../network';
|
|
24
24
|
import { SpacesServiceImpl } from '../spaces';
|
|
25
25
|
import { createStorageObjects } from '../storage';
|
|
@@ -51,6 +51,7 @@ export class ClientServicesHost {
|
|
|
51
51
|
private readonly _resourceLock?: VaultResourceLock;
|
|
52
52
|
private readonly _serviceRegistry: ServiceRegistry<ClientServices>;
|
|
53
53
|
private readonly _systemService: SystemServiceImpl;
|
|
54
|
+
private readonly _loggingService: LoggingServiceImpl;
|
|
54
55
|
|
|
55
56
|
private _config?: Config;
|
|
56
57
|
private readonly _statusUpdate = new Event<void>();
|
|
@@ -113,6 +114,8 @@ export class ClientServicesHost {
|
|
|
113
114
|
}
|
|
114
115
|
});
|
|
115
116
|
|
|
117
|
+
this._loggingService = new LoggingServiceImpl();
|
|
118
|
+
|
|
116
119
|
// TODO(burdon): Start to think of DMG (dynamic services).
|
|
117
120
|
this._serviceRegistry = new ServiceRegistry<ClientServices>(clientServiceBundle, {
|
|
118
121
|
SystemService: this._systemService
|
|
@@ -173,6 +176,8 @@ export class ClientServicesHost {
|
|
|
173
176
|
log('opening...', { lockKey: this._resourceLock?.lockKey });
|
|
174
177
|
await this._resourceLock?.acquire();
|
|
175
178
|
|
|
179
|
+
await this._loggingService.open();
|
|
180
|
+
|
|
176
181
|
// TODO(wittjosiah): Make re-entrant.
|
|
177
182
|
// TODO(burdon): Break into components.
|
|
178
183
|
this._serviceContext = new ServiceContext(this._storage, this._networkManager, this._modelFactory);
|
|
@@ -203,8 +208,9 @@ export class ClientServicesHost {
|
|
|
203
208
|
|
|
204
209
|
NetworkService: new NetworkServiceImpl(this._serviceContext.networkManager),
|
|
205
210
|
|
|
211
|
+
LoggingService: this._loggingService,
|
|
212
|
+
|
|
206
213
|
// TODO(burdon): Move to new protobuf definitions.
|
|
207
|
-
TracingService: new TracingServiceImpl(this._config),
|
|
208
214
|
DevtoolsHost: new DevtoolsServiceImpl({
|
|
209
215
|
events: new DevtoolsHostEvents(),
|
|
210
216
|
config: this._config,
|
|
@@ -228,6 +234,7 @@ export class ClientServicesHost {
|
|
|
228
234
|
const deviceKey = this._serviceContext.identityManager.identity?.deviceKey;
|
|
229
235
|
log('closing...', { deviceKey });
|
|
230
236
|
this._serviceRegistry.setServices({ SystemService: this._systemService });
|
|
237
|
+
await this._loggingService.close();
|
|
231
238
|
await this._serviceContext.close();
|
|
232
239
|
this._open = false;
|
|
233
240
|
this._statusUpdate.emit();
|
|
@@ -86,9 +86,13 @@ export class DataSpaceManager {
|
|
|
86
86
|
log('metadata loaded', { spaces: this._metadataStore.spaces.length });
|
|
87
87
|
|
|
88
88
|
for (const spaceMetadata of this._metadataStore.spaces) {
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
89
|
+
try {
|
|
90
|
+
log('load space', { spaceMetadata });
|
|
91
|
+
const space = await this._constructSpace(spaceMetadata);
|
|
92
|
+
space.initializeDataPipelineAsync();
|
|
93
|
+
} catch (err) {
|
|
94
|
+
log.error('Error loading space', { spaceMetadata, err });
|
|
95
|
+
}
|
|
92
96
|
}
|
|
93
97
|
|
|
94
98
|
this._isOpen = true;
|
|
@@ -10,33 +10,31 @@ import { Client, ClientServicesProxy, fromIFrame } from '@dxos/client';
|
|
|
10
10
|
import { Config } from '@dxos/config';
|
|
11
11
|
import { createLinkedPorts } from '@dxos/rpc';
|
|
12
12
|
import { describe, test, afterTest } from '@dxos/test';
|
|
13
|
-
import { MaybePromise } from '@dxos/util';
|
|
13
|
+
import { MaybePromise, Provider } from '@dxos/util';
|
|
14
14
|
|
|
15
15
|
import { TestBuilder } from '../testing';
|
|
16
16
|
import { IFrameProxyRuntime, WorkerRuntime } from '../vault';
|
|
17
17
|
|
|
18
18
|
chai.use(chaiAsPromised);
|
|
19
19
|
|
|
20
|
-
const setup = (getConfig:
|
|
20
|
+
const setup = (getConfig: Provider<MaybePromise<Config>>) => {
|
|
21
21
|
const workerRuntime = new WorkerRuntime(getConfig);
|
|
22
22
|
|
|
23
23
|
const systemPorts = createLinkedPorts();
|
|
24
|
-
const
|
|
25
|
-
const proxyWindowPorts = createLinkedPorts();
|
|
24
|
+
const appPorts = createLinkedPorts();
|
|
26
25
|
const shellPorts = createLinkedPorts();
|
|
27
26
|
void workerRuntime.createSession({
|
|
28
27
|
systemPort: systemPorts[1],
|
|
29
|
-
appPort:
|
|
28
|
+
appPort: appPorts[1],
|
|
30
29
|
shellPort: shellPorts[1]
|
|
31
30
|
});
|
|
32
31
|
const clientProxy = new IFrameProxyRuntime({
|
|
32
|
+
config: getConfig,
|
|
33
33
|
systemPort: systemPorts[0],
|
|
34
|
-
windowAppPort: proxyWindowPorts[0],
|
|
35
|
-
workerAppPort: workerProxyPorts[0],
|
|
36
34
|
shellPort: shellPorts[0]
|
|
37
35
|
});
|
|
38
36
|
const client = new Client({
|
|
39
|
-
services: new ClientServicesProxy(
|
|
37
|
+
services: new ClientServicesProxy(appPorts[0])
|
|
40
38
|
});
|
|
41
39
|
|
|
42
40
|
return { workerRuntime, clientProxy, client };
|
|
@@ -58,8 +56,9 @@ describe('Shared worker', () => {
|
|
|
58
56
|
});
|
|
59
57
|
|
|
60
58
|
const promise = Promise.all([
|
|
61
|
-
|
|
62
|
-
|
|
59
|
+
// This error should be propagated to client.initialize() call.
|
|
60
|
+
workerRuntime.start().catch(() => {}),
|
|
61
|
+
clientProxy.open('*').catch(() => {})
|
|
63
62
|
]);
|
|
64
63
|
|
|
65
64
|
await expect(client.initialize()).to.be.rejectedWith('Test error');
|
|
@@ -6,9 +6,9 @@ import { Trigger } from '@dxos/async';
|
|
|
6
6
|
import { Config } from '@dxos/config';
|
|
7
7
|
import { log, logInfo } from '@dxos/log';
|
|
8
8
|
import { MemorySignalManager, MemorySignalManagerContext, WebsocketSignalManager } from '@dxos/messaging';
|
|
9
|
-
import { createWebRTCTransportFactory, NetworkManager } from '@dxos/network-manager';
|
|
9
|
+
import { createWebRTCTransportFactory, NetworkManager, TransportFactory } from '@dxos/network-manager';
|
|
10
10
|
import { RpcPort } from '@dxos/rpc';
|
|
11
|
-
import { getAsyncValue, Provider } from '@dxos/util';
|
|
11
|
+
import { getAsyncValue, MaybePromise, Provider } from '@dxos/util';
|
|
12
12
|
|
|
13
13
|
import { LocalClientServices } from '../services';
|
|
14
14
|
import { ClientRpcServer, ClientRpcServerParams } from '../services/client-rpc-server';
|
|
@@ -17,7 +17,8 @@ import { ShellRuntime, ShellRuntimeImpl } from './shell-runtime';
|
|
|
17
17
|
const LOCK_KEY = 'DXOS_RESOURCE_LOCK';
|
|
18
18
|
|
|
19
19
|
export type IFrameHostRuntimeParams = {
|
|
20
|
-
|
|
20
|
+
config: Config | Provider<MaybePromise<Config>>;
|
|
21
|
+
origin: string;
|
|
21
22
|
appPort: RpcPort;
|
|
22
23
|
shellPort?: RpcPort;
|
|
23
24
|
};
|
|
@@ -29,21 +30,13 @@ export type IFrameHostRuntimeParams = {
|
|
|
29
30
|
* This should only be used when SharedWorker is not available.
|
|
30
31
|
*/
|
|
31
32
|
export class IFrameHostRuntime {
|
|
32
|
-
private readonly _configProvider:
|
|
33
|
-
private readonly _transportFactory = createWebRTCTransportFactory({
|
|
34
|
-
iceServers: [
|
|
35
|
-
{ urls: 'stun:dev.kube.dxos.org:3478', username: 'dxos', credential: 'dxos' },
|
|
36
|
-
{ urls: 'turn:dev.kube.dxos.org:3478', username: 'dxos', credential: 'dxos' },
|
|
37
|
-
{ urls: 'stun:kube.dxos.org:3478', username: 'dxos', credential: 'dxos' },
|
|
38
|
-
{ urls: 'turn:kube.dxos.org:3478', username: 'dxos', credential: 'dxos' }
|
|
39
|
-
]
|
|
40
|
-
});
|
|
41
|
-
|
|
33
|
+
private readonly _configProvider: IFrameHostRuntimeParams['config'];
|
|
42
34
|
private readonly _ready = new Trigger<Error | undefined>();
|
|
43
35
|
|
|
44
36
|
private readonly _appPort: RpcPort;
|
|
45
37
|
private readonly _shellPort?: RpcPort;
|
|
46
38
|
private _config!: Config;
|
|
39
|
+
private _transportFactory!: TransportFactory;
|
|
47
40
|
|
|
48
41
|
// TODO(dmaretskyi): Replace with host and figure out how to return services provider here.
|
|
49
42
|
private _clientServices!: LocalClientServices;
|
|
@@ -51,10 +44,11 @@ export class IFrameHostRuntime {
|
|
|
51
44
|
private _shellRuntime?: ShellRuntimeImpl;
|
|
52
45
|
|
|
53
46
|
@logInfo
|
|
54
|
-
public origin
|
|
47
|
+
public origin: string;
|
|
55
48
|
|
|
56
|
-
constructor({
|
|
57
|
-
this._configProvider =
|
|
49
|
+
constructor({ config, origin, appPort, shellPort }: IFrameHostRuntimeParams) {
|
|
50
|
+
this._configProvider = config;
|
|
51
|
+
this.origin = origin;
|
|
58
52
|
this._appPort = appPort;
|
|
59
53
|
this._shellPort = shellPort;
|
|
60
54
|
|
|
@@ -75,6 +69,9 @@ export class IFrameHostRuntime {
|
|
|
75
69
|
log('starting...');
|
|
76
70
|
try {
|
|
77
71
|
this._config = await getAsyncValue(this._configProvider);
|
|
72
|
+
this._transportFactory = createWebRTCTransportFactory({
|
|
73
|
+
iceServers: this._config.get('runtime.services.ice')
|
|
74
|
+
});
|
|
78
75
|
const signals = this._config.get('runtime.services.signaling');
|
|
79
76
|
this._clientServices = new LocalClientServices({
|
|
80
77
|
lockKey: LOCK_KEY,
|