@dxos/client-services 0.3.11-main.df1e30a → 0.3.11-main.e19f39d
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-NA7EQA7E.mjs → chunk-LUXAN22G.mjs} +15 -9
- package/dist/lib/browser/chunk-LUXAN22G.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/{chunk-LTQYCVFH.cjs → chunk-45NL4DNZ.cjs} +67 -61
- package/dist/lib/node/chunk-45NL4DNZ.cjs.map +7 -0
- package/dist/lib/node/index.cjs +37 -37
- package/dist/lib/node/meta.json +1 -1
- package/dist/lib/node/packlets/testing/index.cjs +8 -8
- package/dist/types/src/packlets/network/network-service.d.ts.map +1 -1
- package/dist/types/src/packlets/services/diagnostics.d.ts +1 -2
- package/dist/types/src/packlets/services/diagnostics.d.ts.map +1 -1
- package/dist/types/src/packlets/services/platform.d.ts +1 -14
- package/dist/types/src/packlets/services/platform.d.ts.map +1 -1
- package/dist/types/src/packlets/system/system-service.d.ts +2 -1
- package/dist/types/src/packlets/system/system-service.d.ts.map +1 -1
- package/dist/types/src/version.d.ts +1 -1
- package/package.json +35 -35
- package/src/packlets/network/network-service.ts +1 -0
- package/src/packlets/services/diagnostics.ts +2 -1
- package/src/packlets/services/platform.ts +7 -19
- package/src/packlets/system/system-service.ts +6 -0
- package/src/version.ts +1 -1
- package/dist/lib/browser/chunk-NA7EQA7E.mjs.map +0 -7
- package/dist/lib/node/chunk-LTQYCVFH.cjs.map +0 -7
|
@@ -31,7 +31,7 @@ __export(testing_exports, {
|
|
|
31
31
|
syncItemsLocal: () => syncItemsLocal
|
|
32
32
|
});
|
|
33
33
|
module.exports = __toCommonJS(testing_exports);
|
|
34
|
-
var
|
|
34
|
+
var import_chunk_45NL4DNZ = require("../../chunk-45NL4DNZ.cjs");
|
|
35
35
|
var import_credentials = require("@dxos/credentials");
|
|
36
36
|
var import_keys = require("@dxos/keys");
|
|
37
37
|
var import_async = require("@dxos/async");
|
|
@@ -209,7 +209,7 @@ var createInvitation = (host, options) => {
|
|
|
209
209
|
authMethod: import_services.Invitation.AuthMethod.NONE,
|
|
210
210
|
...options ?? {}
|
|
211
211
|
};
|
|
212
|
-
if (host instanceof
|
|
212
|
+
if (host instanceof import_chunk_45NL4DNZ.ServiceContext) {
|
|
213
213
|
const hostHandler = host.getInvitationHandler({
|
|
214
214
|
kind: import_services.Invitation.Kind.SPACE,
|
|
215
215
|
...options
|
|
@@ -220,7 +220,7 @@ var createInvitation = (host, options) => {
|
|
|
220
220
|
};
|
|
221
221
|
var acceptInvitation = (guest, invitation) => {
|
|
222
222
|
invitation = sanitizeInvitation(invitation);
|
|
223
|
-
if (guest instanceof
|
|
223
|
+
if (guest instanceof import_chunk_45NL4DNZ.ServiceContext) {
|
|
224
224
|
const guestHandler = guest.getInvitationHandler({
|
|
225
225
|
kind: invitation.kind
|
|
226
226
|
});
|
|
@@ -229,7 +229,7 @@ var acceptInvitation = (guest, invitation) => {
|
|
|
229
229
|
return guest.join(invitation);
|
|
230
230
|
};
|
|
231
231
|
var createServiceHost = (config, signalManagerContext) => {
|
|
232
|
-
return new
|
|
232
|
+
return new import_chunk_45NL4DNZ.ClientServicesHost({
|
|
233
233
|
config,
|
|
234
234
|
signalManager: new import_messaging.MemorySignalManager(signalManagerContext),
|
|
235
235
|
transportFactory: import_network_manager.MemoryTransportFactory
|
|
@@ -243,8 +243,8 @@ var createServiceContext = ({ signalContext = new import_messaging.MemorySignalM
|
|
|
243
243
|
signalManager,
|
|
244
244
|
transportFactory: import_network_manager.MemoryTransportFactory
|
|
245
245
|
});
|
|
246
|
-
const modelFactory = (0,
|
|
247
|
-
return new
|
|
246
|
+
const modelFactory = (0, import_chunk_45NL4DNZ.createDefaultModelFactory)();
|
|
247
|
+
return new import_chunk_45NL4DNZ.ServiceContext(storage, networkManager, signalManager, modelFactory);
|
|
248
248
|
};
|
|
249
249
|
var createPeers = async (numPeers) => {
|
|
250
250
|
const signalContext = new import_messaging.MemorySignalManagerContext();
|
|
@@ -328,7 +328,7 @@ var TestPeer = class {
|
|
|
328
328
|
feedStore: this.feedStore,
|
|
329
329
|
networkManager: this.networkManager,
|
|
330
330
|
metadataStore: this.metadataStore,
|
|
331
|
-
modelFactory: (0,
|
|
331
|
+
modelFactory: (0, import_chunk_45NL4DNZ.createDefaultModelFactory)(),
|
|
332
332
|
snapshotStore: this.snapshotStore,
|
|
333
333
|
blobStore: this.blobStore
|
|
334
334
|
});
|
|
@@ -340,7 +340,7 @@ var TestPeer = class {
|
|
|
340
340
|
return this._props.automergeHost ??= new import_echo_pipeline.AutomergeHost(this.storage.createDirectory("automerge"));
|
|
341
341
|
}
|
|
342
342
|
get dataSpaceManager() {
|
|
343
|
-
return this._props.dataSpaceManager ??= new
|
|
343
|
+
return this._props.dataSpaceManager ??= new import_chunk_45NL4DNZ.DataSpaceManager(this.spaceManager, this.metadataStore, new import_echo_pipeline.DataServiceSubscriptions(), this.keyring, this.identity, this.feedStore, this.automergeHost);
|
|
344
344
|
}
|
|
345
345
|
async createIdentity() {
|
|
346
346
|
this._props.signingContext ??= await createSigningContext(this.keyring);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"network-service.d.ts","sourceRoot":"","sources":["../../../../../src/packlets/network/network-service.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAC9C,OAAO,EAAE,KAAK,aAAa,EAAE,MAAM,iBAAiB,CAAC;AACrD,OAAO,EAAE,KAAK,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EACL,KAAK,cAAc,EACnB,KAAK,aAAa,EAClB,KAAK,mBAAmB,EACzB,MAAM,4CAA4C,CAAC;AAEpD,qBAAa,kBAAmB,YAAW,cAAc;IAC3C,OAAO,CAAC,QAAQ,CAAC,cAAc;IAAkB,OAAO,CAAC,QAAQ,CAAC,aAAa;gBAA9D,cAAc,EAAE,cAAc,EAAmB,aAAa,EAAE,aAAa;IAE1G,WAAW;
|
|
1
|
+
{"version":3,"file":"network-service.d.ts","sourceRoot":"","sources":["../../../../../src/packlets/network/network-service.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAC9C,OAAO,EAAE,KAAK,aAAa,EAAE,MAAM,iBAAiB,CAAC;AACrD,OAAO,EAAE,KAAK,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EACL,KAAK,cAAc,EACnB,KAAK,aAAa,EAClB,KAAK,mBAAmB,EACzB,MAAM,4CAA4C,CAAC;AAEpD,qBAAa,kBAAmB,YAAW,cAAc;IAC3C,OAAO,CAAC,QAAQ,CAAC,cAAc;IAAkB,OAAO,CAAC,QAAQ,CAAC,aAAa;gBAA9D,cAAc,EAAE,cAAc,EAAmB,aAAa,EAAE,aAAa;IAE1G,WAAW;IAqBL,YAAY,CAAC,OAAO,EAAE,mBAAmB;CAGhD"}
|
|
@@ -1,11 +1,10 @@
|
|
|
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 NetworkStatus, 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, type Platform, SpaceMember } from '@dxos/protocols/proto/dxos/client/services';
|
|
5
5
|
import { type SubscribeToFeedsResponse } from '@dxos/protocols/proto/dxos/devtools/host';
|
|
6
6
|
import { type SwarmInfo } from '@dxos/protocols/proto/dxos/devtools/swarm';
|
|
7
7
|
import { type Epoch } from '@dxos/protocols/proto/dxos/halo/credentials';
|
|
8
|
-
import { type Platform } from './platform';
|
|
9
8
|
import { type ServiceContext } from './service-context';
|
|
10
9
|
export type Diagnostics = {
|
|
11
10
|
created: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"diagnostics.d.ts","sourceRoot":"","sources":["../../../../../src/packlets/services/diagnostics.ts"],"names":[],"mappings":"AAIA,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;
|
|
1
|
+
{"version":3,"file":"diagnostics.d.ts","sourceRoot":"","sources":["../../../../../src/packlets/services/diagnostics.ts"],"names":[],"mappings":"AAIA,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,KAAK,QAAQ,EACb,WAAW,EACZ,MAAM,4CAA4C,CAAC;AACpD,OAAO,EAAE,KAAK,wBAAwB,EAAE,MAAM,0CAA0C,CAAC;AACzF,OAAO,EAAE,KAAK,SAAS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AAE,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,CAqFrB,CAAC"}
|
|
@@ -1,16 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
type: 'browser' | 'shared-worker' | 'node';
|
|
3
|
-
userAgent?: string;
|
|
4
|
-
platform?: string;
|
|
5
|
-
runtime?: string;
|
|
6
|
-
uptime?: number;
|
|
7
|
-
memory?: {
|
|
8
|
-
rss: number;
|
|
9
|
-
heapTotal: number;
|
|
10
|
-
heapUsed: number;
|
|
11
|
-
external: number;
|
|
12
|
-
arrayBuffers: number;
|
|
13
|
-
};
|
|
14
|
-
};
|
|
1
|
+
import { Platform } from '@dxos/protocols/proto/dxos/client/services';
|
|
15
2
|
export declare const getPlatform: () => Platform;
|
|
16
3
|
//# sourceMappingURL=platform.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"platform.d.ts","sourceRoot":"","sources":["../../../../../src/packlets/services/platform.ts"],"names":[],"mappings":"AAIA,
|
|
1
|
+
{"version":3,"file":"platform.d.ts","sourceRoot":"","sources":["../../../../../src/packlets/services/platform.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,QAAQ,EAAE,MAAM,4CAA4C,CAAC;AAEtE,eAAO,MAAM,WAAW,QAAO,QA6B9B,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { type Event } from '@dxos/async';
|
|
2
2
|
import { Stream } from '@dxos/codec-protobuf';
|
|
3
3
|
import { type Config } from '@dxos/config';
|
|
4
|
-
import { GetDiagnosticsRequest, type SystemService, type SystemStatus, type UpdateStatusRequest, type QueryStatusRequest, type QueryStatusResponse } from '@dxos/protocols/proto/dxos/client/services';
|
|
4
|
+
import { GetDiagnosticsRequest, type SystemService, type SystemStatus, type UpdateStatusRequest, type QueryStatusRequest, type QueryStatusResponse, type Platform } from '@dxos/protocols/proto/dxos/client/services';
|
|
5
5
|
import { type MaybePromise } from '@dxos/util';
|
|
6
6
|
import { type Diagnostics } from '../services';
|
|
7
7
|
export type SystemServiceOptions = {
|
|
@@ -28,6 +28,7 @@ export declare class SystemServiceImpl implements SystemService {
|
|
|
28
28
|
timestamp: Date;
|
|
29
29
|
diagnostics: any;
|
|
30
30
|
}>;
|
|
31
|
+
getPlatform(): Promise<Platform>;
|
|
31
32
|
updateStatus({ status }: UpdateStatusRequest): Promise<void>;
|
|
32
33
|
queryStatus({ interval }?: QueryStatusRequest): Stream<QueryStatusResponse>;
|
|
33
34
|
reset(): Promise<void>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"system-service.d.ts","sourceRoot":"","sources":["../../../../../src/packlets/system/system-service.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,KAAK,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAC9C,OAAO,EAAE,KAAK,MAAM,EAAE,MAAM,cAAc,CAAC;AAC3C,OAAO,EACL,qBAAqB,EACrB,KAAK,aAAa,EAClB,KAAK,YAAY,EACjB,KAAK,mBAAmB,EACxB,KAAK,kBAAkB,EACvB,KAAK,mBAAmB,
|
|
1
|
+
{"version":3,"file":"system-service.d.ts","sourceRoot":"","sources":["../../../../../src/packlets/system/system-service.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,KAAK,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAC9C,OAAO,EAAE,KAAK,MAAM,EAAE,MAAM,cAAc,CAAC;AAC3C,OAAO,EACL,qBAAqB,EACrB,KAAK,aAAa,EAClB,KAAK,YAAY,EACjB,KAAK,mBAAmB,EACxB,KAAK,kBAAkB,EACvB,KAAK,mBAAmB,EACxB,KAAK,QAAQ,E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
|
|
1
|
-
export declare const DXOS_VERSION = "0.3.11-main.
|
|
1
|
+
export declare const DXOS_VERSION = "0.3.11-main.e19f39d";
|
|
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.11-main.
|
|
3
|
+
"version": "0.3.11-main.e19f39d",
|
|
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/
|
|
26
|
-
"@dxos/
|
|
27
|
-
"@dxos/
|
|
28
|
-
"@dxos/
|
|
29
|
-
"@dxos/
|
|
30
|
-
"@dxos/
|
|
31
|
-
"@dxos/
|
|
32
|
-
"@dxos/
|
|
33
|
-
"@dxos/
|
|
34
|
-
"@dxos/echo-db": "0.3.11-main.
|
|
35
|
-
"@dxos/
|
|
36
|
-
"@dxos/
|
|
37
|
-
"@dxos/
|
|
38
|
-
"@dxos/
|
|
39
|
-
"@dxos/
|
|
40
|
-
"@dxos/
|
|
41
|
-
"@dxos/
|
|
42
|
-
"@dxos/
|
|
43
|
-
"@dxos/
|
|
44
|
-
"@dxos/
|
|
45
|
-
"@dxos/
|
|
46
|
-
"@dxos/node-std": "0.3.11-main.
|
|
47
|
-
"@dxos/
|
|
48
|
-
"@dxos/
|
|
49
|
-
"@dxos/
|
|
50
|
-
"@dxos/
|
|
51
|
-
"@dxos/teleport-extension-gossip": "0.3.11-main.
|
|
52
|
-
"@dxos/teleport-extension-object-sync": "0.3.11-main.
|
|
53
|
-
"@dxos/text-model": "0.3.11-main.
|
|
54
|
-
"@dxos/timeframe": "0.3.11-main.
|
|
55
|
-
"@dxos/tracing": "0.3.11-main.
|
|
56
|
-
"@dxos/util": "0.3.11-main.
|
|
57
|
-
"@dxos/websocket-rpc": "0.3.11-main.
|
|
25
|
+
"@dxos/async": "0.3.11-main.e19f39d",
|
|
26
|
+
"@dxos/codec-protobuf": "0.3.11-main.e19f39d",
|
|
27
|
+
"@dxos/client-protocol": "0.3.11-main.e19f39d",
|
|
28
|
+
"@dxos/credentials": "0.3.11-main.e19f39d",
|
|
29
|
+
"@dxos/config": "0.3.11-main.e19f39d",
|
|
30
|
+
"@dxos/context": "0.3.11-main.e19f39d",
|
|
31
|
+
"@dxos/crypto": "0.3.11-main.e19f39d",
|
|
32
|
+
"@dxos/debug": "0.3.11-main.e19f39d",
|
|
33
|
+
"@dxos/document-model": "0.3.11-main.e19f39d",
|
|
34
|
+
"@dxos/echo-db": "0.3.11-main.e19f39d",
|
|
35
|
+
"@dxos/echo-pipeline": "0.3.11-main.e19f39d",
|
|
36
|
+
"@dxos/echo-schema": "0.3.11-main.e19f39d",
|
|
37
|
+
"@dxos/feed-store": "0.3.11-main.e19f39d",
|
|
38
|
+
"@dxos/invariant": "0.3.11-main.e19f39d",
|
|
39
|
+
"@dxos/keys": "0.3.11-main.e19f39d",
|
|
40
|
+
"@dxos/lock-file": "0.3.11-main.e19f39d",
|
|
41
|
+
"@dxos/log": "0.3.11-main.e19f39d",
|
|
42
|
+
"@dxos/keyring": "0.3.11-main.e19f39d",
|
|
43
|
+
"@dxos/messaging": "0.3.11-main.e19f39d",
|
|
44
|
+
"@dxos/network-manager": "0.3.11-main.e19f39d",
|
|
45
|
+
"@dxos/model-factory": "0.3.11-main.e19f39d",
|
|
46
|
+
"@dxos/node-std": "0.3.11-main.e19f39d",
|
|
47
|
+
"@dxos/protocols": "0.3.11-main.e19f39d",
|
|
48
|
+
"@dxos/random-access-storage": "0.3.11-main.e19f39d",
|
|
49
|
+
"@dxos/rpc": "0.3.11-main.e19f39d",
|
|
50
|
+
"@dxos/teleport": "0.3.11-main.e19f39d",
|
|
51
|
+
"@dxos/teleport-extension-gossip": "0.3.11-main.e19f39d",
|
|
52
|
+
"@dxos/teleport-extension-object-sync": "0.3.11-main.e19f39d",
|
|
53
|
+
"@dxos/text-model": "0.3.11-main.e19f39d",
|
|
54
|
+
"@dxos/timeframe": "0.3.11-main.e19f39d",
|
|
55
|
+
"@dxos/tracing": "0.3.11-main.e19f39d",
|
|
56
|
+
"@dxos/util": "0.3.11-main.e19f39d",
|
|
57
|
+
"@dxos/websocket-rpc": "0.3.11-main.e19f39d"
|
|
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.11-main.
|
|
62
|
+
"@dxos/signal": "0.3.11-main.e19f39d"
|
|
63
63
|
},
|
|
64
64
|
"publishConfig": {
|
|
65
65
|
"access": "public"
|
|
@@ -19,6 +19,7 @@ export class NetworkServiceImpl implements NetworkService {
|
|
|
19
19
|
const update = () => {
|
|
20
20
|
next({
|
|
21
21
|
swarm: this.networkManager.connectionState,
|
|
22
|
+
connectionInfo: this.networkManager.connectionLog?.swarms,
|
|
22
23
|
signaling: this.signalManager.getStatus().map(({ host, state }) => ({ server: host, state })),
|
|
23
24
|
});
|
|
24
25
|
};
|
|
@@ -18,13 +18,14 @@ import {
|
|
|
18
18
|
type Metrics,
|
|
19
19
|
type NetworkStatus,
|
|
20
20
|
type Space as SpaceProto,
|
|
21
|
+
type Platform,
|
|
21
22
|
SpaceMember,
|
|
22
23
|
} from '@dxos/protocols/proto/dxos/client/services';
|
|
23
24
|
import { type SubscribeToFeedsResponse } from '@dxos/protocols/proto/dxos/devtools/host';
|
|
24
25
|
import { type SwarmInfo } from '@dxos/protocols/proto/dxos/devtools/swarm';
|
|
25
26
|
import { type Epoch } from '@dxos/protocols/proto/dxos/halo/credentials';
|
|
26
27
|
|
|
27
|
-
import { getPlatform
|
|
28
|
+
import { getPlatform } from './platform';
|
|
28
29
|
import { type ServiceContext } from './service-context';
|
|
29
30
|
import { DXOS_VERSION } from '../../version';
|
|
30
31
|
import { type DataSpace } from '../spaces';
|
|
@@ -2,20 +2,7 @@
|
|
|
2
2
|
// Copyright 2022 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
type: 'browser' | 'shared-worker' | 'node';
|
|
7
|
-
userAgent?: string;
|
|
8
|
-
platform?: string;
|
|
9
|
-
runtime?: string;
|
|
10
|
-
uptime?: number;
|
|
11
|
-
memory?: {
|
|
12
|
-
rss: number;
|
|
13
|
-
heapTotal: number;
|
|
14
|
-
heapUsed: number;
|
|
15
|
-
external: number;
|
|
16
|
-
arrayBuffers: number;
|
|
17
|
-
};
|
|
18
|
-
};
|
|
5
|
+
import { Platform } from '@dxos/protocols/proto/dxos/client/services';
|
|
19
6
|
|
|
20
7
|
export const getPlatform = (): Platform => {
|
|
21
8
|
if ((process as any).browser) {
|
|
@@ -23,14 +10,14 @@ export const getPlatform = (): Platform => {
|
|
|
23
10
|
// Browser.
|
|
24
11
|
const { userAgent } = window.navigator;
|
|
25
12
|
return {
|
|
26
|
-
type:
|
|
13
|
+
type: Platform.PLATFORM_TYPE.BROWSER,
|
|
27
14
|
userAgent,
|
|
28
15
|
uptime: Math.floor((Date.now() - window.performance.timeOrigin) / 1_000),
|
|
29
16
|
};
|
|
30
17
|
} else {
|
|
31
18
|
// Shared worker.
|
|
32
19
|
return {
|
|
33
|
-
type:
|
|
20
|
+
type: Platform.PLATFORM_TYPE.SHARED_WORKER,
|
|
34
21
|
uptime: Math.floor((Date.now() - performance.timeOrigin) / 1_000),
|
|
35
22
|
};
|
|
36
23
|
}
|
|
@@ -38,9 +25,10 @@ export const getPlatform = (): Platform => {
|
|
|
38
25
|
// Node.
|
|
39
26
|
const { platform, version, arch } = process;
|
|
40
27
|
return {
|
|
41
|
-
type:
|
|
42
|
-
platform
|
|
43
|
-
|
|
28
|
+
type: Platform.PLATFORM_TYPE.NODE,
|
|
29
|
+
platform,
|
|
30
|
+
arch,
|
|
31
|
+
runtime: version,
|
|
44
32
|
uptime: Math.floor(process.uptime()),
|
|
45
33
|
memory: process.memoryUsage(),
|
|
46
34
|
};
|
|
@@ -12,10 +12,12 @@ import {
|
|
|
12
12
|
type UpdateStatusRequest,
|
|
13
13
|
type QueryStatusRequest,
|
|
14
14
|
type QueryStatusResponse,
|
|
15
|
+
type Platform,
|
|
15
16
|
} from '@dxos/protocols/proto/dxos/client/services';
|
|
16
17
|
import { jsonKeyReplacer, type MaybePromise } from '@dxos/util';
|
|
17
18
|
|
|
18
19
|
import { type Diagnostics } from '../services';
|
|
20
|
+
import { getPlatform } from '../services/platform';
|
|
19
21
|
|
|
20
22
|
export type SystemServiceOptions = {
|
|
21
23
|
config?: Config;
|
|
@@ -73,6 +75,10 @@ export class SystemServiceImpl implements SystemService {
|
|
|
73
75
|
};
|
|
74
76
|
}
|
|
75
77
|
|
|
78
|
+
async getPlatform(): Promise<Platform> {
|
|
79
|
+
return getPlatform();
|
|
80
|
+
}
|
|
81
|
+
|
|
76
82
|
async updateStatus({ status }: UpdateStatusRequest) {
|
|
77
83
|
await this._onUpdateStatus(status);
|
|
78
84
|
}
|
package/src/version.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const DXOS_VERSION = "0.3.11-main.
|
|
1
|
+
export const DXOS_VERSION = "0.3.11-main.e19f39d";
|