@dxos/client-services 0.1.48-next.83f55fd → 0.1.48

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.
@@ -1 +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"}
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;AAGxG;;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;IAgCtD,OAAO,CAAC,aAAa,CAEnB;CACH"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dxos/client-services",
3
- "version": "0.1.48-next.83f55fd",
3
+ "version": "0.1.48",
4
4
  "description": "DXOS client services implementation",
5
5
  "homepage": "https://dxos.org",
6
6
  "bugs": "https://github.com/dxos/dxos/issues",
@@ -20,38 +20,38 @@
20
20
  "src"
21
21
  ],
22
22
  "dependencies": {
23
- "@dxos/async": "0.1.48-next.83f55fd",
24
- "@dxos/client-protocol": "0.1.48-next.83f55fd",
25
- "@dxos/codec-protobuf": "0.1.48-next.83f55fd",
26
- "@dxos/config": "0.1.48-next.83f55fd",
27
- "@dxos/context": "0.1.48-next.83f55fd",
28
- "@dxos/credentials": "0.1.48-next.83f55fd",
29
- "@dxos/crypto": "0.1.48-next.83f55fd",
30
- "@dxos/debug": "0.1.48-next.83f55fd",
31
- "@dxos/document-model": "0.1.48-next.83f55fd",
32
- "@dxos/echo-db": "0.1.48-next.83f55fd",
33
- "@dxos/echo-pipeline": "0.1.48-next.83f55fd",
34
- "@dxos/errors": "0.1.48-next.83f55fd",
35
- "@dxos/feed-store": "0.1.48-next.83f55fd",
36
- "@dxos/keyring": "0.1.48-next.83f55fd",
37
- "@dxos/keys": "0.1.48-next.83f55fd",
38
- "@dxos/log": "0.1.48-next.83f55fd",
39
- "@dxos/messaging": "0.1.48-next.83f55fd",
40
- "@dxos/model-factory": "0.1.48-next.83f55fd",
41
- "@dxos/network-manager": "0.1.48-next.83f55fd",
42
- "@dxos/node-std": "0.1.48-next.83f55fd",
43
- "@dxos/protocols": "0.1.48-next.83f55fd",
44
- "@dxos/random-access-storage": "0.1.48-next.83f55fd",
45
- "@dxos/rpc": "0.1.48-next.83f55fd",
46
- "@dxos/teleport": "0.1.48-next.83f55fd",
47
- "@dxos/teleport-extension-gossip": "0.1.48-next.83f55fd",
48
- "@dxos/text-model": "0.1.48-next.83f55fd",
49
- "@dxos/timeframe": "0.1.48-next.83f55fd",
50
- "@dxos/util": "0.1.48-next.83f55fd"
23
+ "@dxos/async": "0.1.48",
24
+ "@dxos/client-protocol": "0.1.48",
25
+ "@dxos/codec-protobuf": "0.1.48",
26
+ "@dxos/config": "0.1.48",
27
+ "@dxos/context": "0.1.48",
28
+ "@dxos/credentials": "0.1.48",
29
+ "@dxos/crypto": "0.1.48",
30
+ "@dxos/debug": "0.1.48",
31
+ "@dxos/document-model": "0.1.48",
32
+ "@dxos/echo-db": "0.1.48",
33
+ "@dxos/echo-pipeline": "0.1.48",
34
+ "@dxos/errors": "0.1.48",
35
+ "@dxos/feed-store": "0.1.48",
36
+ "@dxos/keyring": "0.1.48",
37
+ "@dxos/keys": "0.1.48",
38
+ "@dxos/log": "0.1.48",
39
+ "@dxos/messaging": "0.1.48",
40
+ "@dxos/model-factory": "0.1.48",
41
+ "@dxos/network-manager": "0.1.48",
42
+ "@dxos/node-std": "0.1.48",
43
+ "@dxos/protocols": "0.1.48",
44
+ "@dxos/random-access-storage": "0.1.48",
45
+ "@dxos/rpc": "0.1.48",
46
+ "@dxos/teleport": "0.1.48",
47
+ "@dxos/teleport-extension-gossip": "0.1.48",
48
+ "@dxos/text-model": "0.1.48",
49
+ "@dxos/timeframe": "0.1.48",
50
+ "@dxos/util": "0.1.48"
51
51
  },
52
52
  "devDependencies": {
53
53
  "@types/readable-stream": "^2.3.9",
54
- "@dxos/signal": "0.1.48-next.83f55fd"
54
+ "@dxos/signal": "0.1.48"
55
55
  },
56
56
  "publishConfig": {
57
57
  "access": "public"
@@ -4,8 +4,9 @@
4
4
 
5
5
  import { Event } from '@dxos/async';
6
6
  import { Stream } from '@dxos/codec-protobuf';
7
- import { log, LogEntry as NaturalLogEntry, LogProcessor, shouldLog } from '@dxos/log';
7
+ import { log, LogEntry as NaturalLogEntry, LogProcessor, shouldLog, getContextFromEntry } from '@dxos/log';
8
8
  import { LoggingService, LogEntry, QueryLogsRequest } from '@dxos/protocols/proto/dxos/client/services';
9
+ import { jsonify } from '@dxos/util';
9
10
 
10
11
  /**
11
12
  * Logging service used to spy on logs of the host.
@@ -36,7 +37,13 @@ export class LoggingServiceImpl implements LoggingService {
36
37
  }
37
38
 
38
39
  if (shouldLog(entry, filters)) {
39
- next(jsonify(entry));
40
+ const record = {
41
+ ...entry,
42
+ context: jsonify(getContextFromEntry(entry)),
43
+ } satisfies NaturalLogEntry;
44
+ delete record.meta?.bugcheck;
45
+ delete record.meta?.scope;
46
+ next(record);
40
47
  }
41
48
  };
42
49
 
@@ -52,32 +59,3 @@ export class LoggingServiceImpl implements LoggingService {
52
59
  this._logs.emit(entry);
53
60
  };
54
61
  }
55
-
56
- /**
57
- * Recursively converts an object into a JSON-compatible object.
58
- */
59
- const jsonify = (value: any, handles = new WeakSet<any>()): any => {
60
- if (typeof value === 'function') {
61
- return null;
62
- } else if (typeof value === 'object' && value !== null) {
63
- if (handles.has(value)) {
64
- return null;
65
- }
66
- handles.add(value);
67
-
68
- if (Array.isArray(value)) {
69
- return value.map((x) => jsonify(x, handles));
70
- } else {
71
- if (typeof value.toJSON === 'function') {
72
- return value.toJSON();
73
- }
74
- const res: any = {};
75
- for (const key of Object.keys(value)) {
76
- res[key] = jsonify(value[key], handles);
77
- }
78
- return res;
79
- }
80
- } else {
81
- return value;
82
- }
83
- };