@dxos/client-services 0.3.3-main.e0ded2e → 0.3.3-main.f2ca85a
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-OC4A3Z5C.mjs → chunk-CIMVJJPI.mjs} +27 -13
- package/dist/lib/browser/chunk-CIMVJJPI.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 +71 -57
- 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 +98 -84
- package/dist/lib/node/packlets/testing/index.cjs.map +3 -3
- package/dist/types/src/packlets/services/diagnostics.d.ts +4 -1
- package/dist/types/src/packlets/services/diagnostics.d.ts.map +1 -1
- package/dist/types/src/version.d.ts +1 -1
- package/package.json +35 -35
- package/src/packlets/services/diagnostics.ts +23 -0
- package/src/version.ts +1 -1
- package/dist/lib/browser/chunk-OC4A3Z5C.mjs.map +0 -7
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { type ClientServices } from '@dxos/client-protocol';
|
|
2
2
|
import { type Config, type ConfigProto } from '@dxos/config';
|
|
3
3
|
import { type PublicKey } from '@dxos/keys';
|
|
4
|
-
import { type Device, type Identity, type Metrics, type Space as SpaceProto, SpaceMember } from '@dxos/protocols/proto/dxos/client/services';
|
|
4
|
+
import { type Device, type Identity, type Metrics, type NetworkStatus, type Space as SpaceProto, SpaceMember } from '@dxos/protocols/proto/dxos/client/services';
|
|
5
5
|
import { type SubscribeToFeedsResponse } from '@dxos/protocols/proto/dxos/devtools/host';
|
|
6
|
+
import { type SwarmInfo } from '@dxos/protocols/proto/dxos/devtools/swarm';
|
|
6
7
|
import { type Epoch } from '@dxos/protocols/proto/dxos/halo/credentials';
|
|
7
8
|
import { type Platform } from './platform';
|
|
8
9
|
import { type ServiceContext } from './service-context';
|
|
@@ -19,6 +20,8 @@ export type Diagnostics = {
|
|
|
19
20
|
identity?: Identity;
|
|
20
21
|
devices?: Device[];
|
|
21
22
|
spaces?: SpaceStats[];
|
|
23
|
+
networkStatus?: NetworkStatus;
|
|
24
|
+
swarms?: SwarmInfo[];
|
|
22
25
|
feeds?: Partial<SubscribeToFeedsResponse.Feed>[];
|
|
23
26
|
metrics?: Metrics;
|
|
24
27
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"diagnostics.d.ts","sourceRoot":"","sources":["../../../../../src/packlets/services/diagnostics.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"diagnostics.d.ts","sourceRoot":"","sources":["../../../../../src/packlets/services/diagnostics.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,KAAK,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAE5D,OAAO,EAAE,KAAK,MAAM,EAAE,KAAK,WAAW,EAAE,MAAM,cAAc,CAAC;AAK7D,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,YAAY,CAAC;AAG5C,OAAO,EACL,KAAK,MAAM,EACX,KAAK,QAAQ,EACb,KAAK,OAAO,EACZ,KAAK,aAAa,EAClB,KAAK,KAAK,IAAI,UAAU,EACxB,WAAW,EACZ,MAAM,4CAA4C,CAAC;AACpD,OAAO,EAAE,KAAK,wBAAwB,EAAE,MAAM,0CAA0C,CAAC;AACzF,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,2CAA2C,CAAC;AAC3E,OAAO,EAAE,KAAK,KAAK,EAAE,MAAM,6CAA6C,CAAC;AAEzE,OAAO,EAAe,KAAK,QAAQ,EAAE,MAAM,YAAY,CAAC;AACxD,OAAO,EAAE,KAAK,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAMxD,MAAM,MAAM,WAAW,GAAG;IACxB,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,QAAQ,CAAC;IACnB,MAAM,CAAC,EAAE,WAAW,CAAC;IACrB,MAAM,EAAE;QACN,OAAO,EAAE,MAAM,CAAC;QAChB,OAAO,EAAE;YACP,OAAO,EAAE,MAAM,CAAC;SACjB,CAAC;KACH,CAAC;IACF,QAAQ,CAAC,EAAE,QAAQ,CAAC;IACpB,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;IACnB,MAAM,CAAC,EAAE,UAAU,EAAE,CAAC;IACtB,aAAa,CAAC,EAAE,aAAa,CAAC;IAC9B,MAAM,CAAC,EAAE,SAAS,EAAE,CAAC;IACrB,KAAK,CAAC,EAAE,OAAO,CAAC,wBAAwB,CAAC,IAAI,CAAC,EAAE,CAAC;IACjD,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB,CAAC;AAGF,MAAM,MAAM,UAAU,GAAG;IACvB,GAAG,EAAE,SAAS,CAAC;IACf,UAAU,CAAC,EAAE;QACX,IAAI,EAAE,MAAM,CAAC;KACd,CAAC;IACF,EAAE,CAAC,EAAE;QACH,OAAO,EAAE,MAAM,CAAC;KACjB,CAAC;IACF,OAAO,CAAC,EAAE,UAAU,CAAC,OAAO,GAAG;QAC7B,WAAW,CAAC,EAAE,MAAM,CAAC;KACtB,CAAC;IACF,MAAM,CAAC,EAAE,CAAC,KAAK,GAAG;QAAE,EAAE,CAAC,EAAE,SAAS,CAAA;KAAE,CAAC,EAAE,CAAC;IACxC,OAAO,CAAC,EAAE,WAAW,EAAE,CAAC;IACxB,QAAQ,CAAC,EAAE,UAAU,CAAC,aAAa,CAAC;CACrC,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,iBAAiB,mBACZ,QAAQ,cAAc,CAAC,kBACvB,cAAc,UACtB,MAAM,KACb,QAAQ,WAAW,CA2ErB,CAAC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const DXOS_VERSION = "0.3.3-main.
|
|
1
|
+
export declare const DXOS_VERSION = "0.3.3-main.f2ca85a";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dxos/client-services",
|
|
3
|
-
"version": "0.3.3-main.
|
|
3
|
+
"version": "0.3.3-main.f2ca85a",
|
|
4
4
|
"description": "DXOS client services implementation",
|
|
5
5
|
"homepage": "https://dxos.org",
|
|
6
6
|
"bugs": "https://github.com/dxos/dxos/issues",
|
|
@@ -22,44 +22,44 @@
|
|
|
22
22
|
],
|
|
23
23
|
"dependencies": {
|
|
24
24
|
"platform": "^1.3.6",
|
|
25
|
-
"@dxos/async": "0.3.3-main.
|
|
26
|
-
"@dxos/client-protocol": "0.3.3-main.
|
|
27
|
-
"@dxos/codec-protobuf": "0.3.3-main.
|
|
28
|
-
"@dxos/config": "0.3.3-main.
|
|
29
|
-
"@dxos/context": "0.3.3-main.
|
|
30
|
-
"@dxos/credentials": "0.3.3-main.
|
|
31
|
-
"@dxos/crypto": "0.3.3-main.
|
|
32
|
-
"@dxos/
|
|
33
|
-
"@dxos/
|
|
34
|
-
"@dxos/echo-db": "0.3.3-main.
|
|
35
|
-
"@dxos/echo-pipeline": "0.3.3-main.
|
|
36
|
-
"@dxos/echo-schema": "0.3.3-main.
|
|
37
|
-
"@dxos/
|
|
38
|
-
"@dxos/
|
|
39
|
-
"@dxos/keyring": "0.3.3-main.
|
|
40
|
-
"@dxos/keys": "0.3.3-main.
|
|
41
|
-
"@dxos/lock-file": "0.3.3-main.
|
|
42
|
-
"@dxos/log": "0.3.3-main.
|
|
43
|
-
"@dxos/messaging": "0.3.3-main.
|
|
44
|
-
"@dxos/model-factory": "0.3.3-main.
|
|
45
|
-
"@dxos/network-manager": "0.3.3-main.
|
|
46
|
-
"@dxos/node-std": "0.3.3-main.
|
|
47
|
-
"@dxos/protocols": "0.3.3-main.
|
|
48
|
-
"@dxos/random-access-storage": "0.3.3-main.
|
|
49
|
-
"@dxos/rpc": "0.3.3-main.
|
|
50
|
-
"@dxos/teleport": "0.3.3-main.
|
|
51
|
-
"@dxos/teleport-extension-gossip": "0.3.3-main.
|
|
52
|
-
"@dxos/teleport-extension-object-sync": "0.3.3-main.
|
|
53
|
-
"@dxos/text-model": "0.3.3-main.
|
|
54
|
-
"@dxos/timeframe": "0.3.3-main.
|
|
55
|
-
"@dxos/tracing": "0.3.3-main.
|
|
56
|
-
"@dxos/util": "0.3.3-main.
|
|
57
|
-
"@dxos/websocket-rpc": "0.3.3-main.
|
|
25
|
+
"@dxos/async": "0.3.3-main.f2ca85a",
|
|
26
|
+
"@dxos/client-protocol": "0.3.3-main.f2ca85a",
|
|
27
|
+
"@dxos/codec-protobuf": "0.3.3-main.f2ca85a",
|
|
28
|
+
"@dxos/config": "0.3.3-main.f2ca85a",
|
|
29
|
+
"@dxos/context": "0.3.3-main.f2ca85a",
|
|
30
|
+
"@dxos/credentials": "0.3.3-main.f2ca85a",
|
|
31
|
+
"@dxos/crypto": "0.3.3-main.f2ca85a",
|
|
32
|
+
"@dxos/debug": "0.3.3-main.f2ca85a",
|
|
33
|
+
"@dxos/document-model": "0.3.3-main.f2ca85a",
|
|
34
|
+
"@dxos/echo-db": "0.3.3-main.f2ca85a",
|
|
35
|
+
"@dxos/echo-pipeline": "0.3.3-main.f2ca85a",
|
|
36
|
+
"@dxos/echo-schema": "0.3.3-main.f2ca85a",
|
|
37
|
+
"@dxos/feed-store": "0.3.3-main.f2ca85a",
|
|
38
|
+
"@dxos/invariant": "0.3.3-main.f2ca85a",
|
|
39
|
+
"@dxos/keyring": "0.3.3-main.f2ca85a",
|
|
40
|
+
"@dxos/keys": "0.3.3-main.f2ca85a",
|
|
41
|
+
"@dxos/lock-file": "0.3.3-main.f2ca85a",
|
|
42
|
+
"@dxos/log": "0.3.3-main.f2ca85a",
|
|
43
|
+
"@dxos/messaging": "0.3.3-main.f2ca85a",
|
|
44
|
+
"@dxos/model-factory": "0.3.3-main.f2ca85a",
|
|
45
|
+
"@dxos/network-manager": "0.3.3-main.f2ca85a",
|
|
46
|
+
"@dxos/node-std": "0.3.3-main.f2ca85a",
|
|
47
|
+
"@dxos/protocols": "0.3.3-main.f2ca85a",
|
|
48
|
+
"@dxos/random-access-storage": "0.3.3-main.f2ca85a",
|
|
49
|
+
"@dxos/rpc": "0.3.3-main.f2ca85a",
|
|
50
|
+
"@dxos/teleport": "0.3.3-main.f2ca85a",
|
|
51
|
+
"@dxos/teleport-extension-gossip": "0.3.3-main.f2ca85a",
|
|
52
|
+
"@dxos/teleport-extension-object-sync": "0.3.3-main.f2ca85a",
|
|
53
|
+
"@dxos/text-model": "0.3.3-main.f2ca85a",
|
|
54
|
+
"@dxos/timeframe": "0.3.3-main.f2ca85a",
|
|
55
|
+
"@dxos/tracing": "0.3.3-main.f2ca85a",
|
|
56
|
+
"@dxos/util": "0.3.3-main.f2ca85a",
|
|
57
|
+
"@dxos/websocket-rpc": "0.3.3-main.f2ca85a"
|
|
58
58
|
},
|
|
59
59
|
"devDependencies": {
|
|
60
60
|
"@types/platform": "^1.3.4",
|
|
61
61
|
"@types/readable-stream": "^2.3.9",
|
|
62
|
-
"@dxos/signal": "0.3.3-main.
|
|
62
|
+
"@dxos/signal": "0.3.3-main.f2ca85a"
|
|
63
63
|
},
|
|
64
64
|
"publishConfig": {
|
|
65
65
|
"access": "public"
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
// Copyright 2022 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
+
import { Trigger } from '@dxos/async';
|
|
5
6
|
import { type ClientServices } from '@dxos/client-protocol';
|
|
6
7
|
import { getFirstStreamValue } from '@dxos/codec-protobuf';
|
|
7
8
|
import { type Config, type ConfigProto } from '@dxos/config';
|
|
@@ -16,10 +17,12 @@ import {
|
|
|
16
17
|
type Device,
|
|
17
18
|
type Identity,
|
|
18
19
|
type Metrics,
|
|
20
|
+
type NetworkStatus,
|
|
19
21
|
type Space as SpaceProto,
|
|
20
22
|
SpaceMember,
|
|
21
23
|
} from '@dxos/protocols/proto/dxos/client/services';
|
|
22
24
|
import { type SubscribeToFeedsResponse } from '@dxos/protocols/proto/dxos/devtools/host';
|
|
25
|
+
import { type SwarmInfo } from '@dxos/protocols/proto/dxos/devtools/swarm';
|
|
23
26
|
import { type Epoch } from '@dxos/protocols/proto/dxos/halo/credentials';
|
|
24
27
|
|
|
25
28
|
import { getPlatform, type Platform } from './platform';
|
|
@@ -42,6 +45,8 @@ export type Diagnostics = {
|
|
|
42
45
|
identity?: Identity;
|
|
43
46
|
devices?: Device[];
|
|
44
47
|
spaces?: SpaceStats[];
|
|
48
|
+
networkStatus?: NetworkStatus;
|
|
49
|
+
swarms?: SwarmInfo[];
|
|
45
50
|
feeds?: Partial<SubscribeToFeedsResponse.Feed>[];
|
|
46
51
|
metrics?: Metrics;
|
|
47
52
|
};
|
|
@@ -122,6 +127,24 @@ export const createDiagnostics = async (
|
|
|
122
127
|
timeout: DEFAULT_TIMEOUT,
|
|
123
128
|
}).catch(() => undefined)) ?? {};
|
|
124
129
|
diagnostics.feeds = feeds.map(({ feedKey, bytes, length }) => ({ feedKey, bytes, length }));
|
|
130
|
+
|
|
131
|
+
// Signal servers.
|
|
132
|
+
|
|
133
|
+
const status = await getFirstStreamValue(clientServices.NetworkService!.queryStatus(), {
|
|
134
|
+
timeout: DEFAULT_TIMEOUT,
|
|
135
|
+
}).catch(() => undefined);
|
|
136
|
+
diagnostics.networkStatus = status;
|
|
137
|
+
|
|
138
|
+
// Networking.
|
|
139
|
+
|
|
140
|
+
const swarmInfoDone = new Trigger();
|
|
141
|
+
serviceContext.networkManager.connectionLog?.update.on(async () => {
|
|
142
|
+
const swarms = serviceContext.networkManager.connectionLog?.swarms;
|
|
143
|
+
diagnostics.swarms = swarms;
|
|
144
|
+
await swarmInfoDone.wake();
|
|
145
|
+
});
|
|
146
|
+
|
|
147
|
+
await swarmInfoDone.wait({ timeout: DEFAULT_TIMEOUT });
|
|
125
148
|
}
|
|
126
149
|
|
|
127
150
|
diagnostics.config = config.values;
|
package/src/version.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const DXOS_VERSION = "0.3.3-main.
|
|
1
|
+
export const DXOS_VERSION = "0.3.3-main.f2ca85a";
|