@dxos/client-services 0.8.4-main.dedc0f3 → 0.8.4-main.ead640a

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dxos/client-services",
3
- "version": "0.8.4-main.dedc0f3",
3
+ "version": "0.8.4-main.ead640a",
4
4
  "description": "DXOS client services implementation",
5
5
  "homepage": "https://dxos.org",
6
6
  "bugs": "https://github.com/dxos/dxos/issues",
@@ -43,52 +43,52 @@
43
43
  "src"
44
44
  ],
45
45
  "dependencies": {
46
- "@automerge/automerge": "3.1.1",
47
- "@automerge/automerge-repo": "2.3.0-alpha.0",
46
+ "@automerge/automerge": "3.1.2",
47
+ "@automerge/automerge-repo": "2.3.1",
48
48
  "@obsidize/tar-browserify": "^5.2.0",
49
49
  "cbor-x": "^1.5.4",
50
50
  "platform": "^1.3.6",
51
- "@dxos/async": "0.8.4-main.dedc0f3",
52
- "@dxos/client-protocol": "0.8.4-main.dedc0f3",
53
- "@dxos/codec-protobuf": "0.8.4-main.dedc0f3",
54
- "@dxos/config": "0.8.4-main.dedc0f3",
55
- "@dxos/context": "0.8.4-main.dedc0f3",
56
- "@dxos/credentials": "0.8.4-main.dedc0f3",
57
- "@dxos/crypto": "0.8.4-main.dedc0f3",
58
- "@dxos/debug": "0.8.4-main.dedc0f3",
59
- "@dxos/echo-db": "0.8.4-main.dedc0f3",
60
- "@dxos/echo-pipeline": "0.8.4-main.dedc0f3",
61
- "@dxos/echo-protocol": "0.8.4-main.dedc0f3",
62
- "@dxos/echo-schema": "0.8.4-main.dedc0f3",
63
- "@dxos/edge-client": "0.8.4-main.dedc0f3",
64
- "@dxos/feed-store": "0.8.4-main.dedc0f3",
65
- "@dxos/invariant": "0.8.4-main.dedc0f3",
66
- "@dxos/indexing": "0.8.4-main.dedc0f3",
67
- "@dxos/keyring": "0.8.4-main.dedc0f3",
68
- "@dxos/keys": "0.8.4-main.dedc0f3",
69
- "@dxos/kv-store": "0.8.4-main.dedc0f3",
70
- "@dxos/lock-file": "0.8.4-main.dedc0f3",
71
- "@dxos/log": "0.8.4-main.dedc0f3",
72
- "@dxos/messaging": "0.8.4-main.dedc0f3",
73
- "@dxos/network-manager": "0.8.4-main.dedc0f3",
74
- "@dxos/node-std": "0.8.4-main.dedc0f3",
75
- "@dxos/protocols": "0.8.4-main.dedc0f3",
76
- "@dxos/random-access-storage": "0.8.4-main.dedc0f3",
77
- "@dxos/rpc": "0.8.4-main.dedc0f3",
78
- "@dxos/teleport": "0.8.4-main.dedc0f3",
79
- "@dxos/teleport-extension-gossip": "0.8.4-main.dedc0f3",
80
- "@dxos/timeframe": "0.8.4-main.dedc0f3",
81
- "@dxos/teleport-extension-object-sync": "0.8.4-main.dedc0f3",
82
- "@dxos/tracing": "0.8.4-main.dedc0f3",
83
- "@dxos/util": "0.8.4-main.dedc0f3",
84
- "@dxos/websocket-rpc": "0.8.4-main.dedc0f3"
51
+ "@dxos/async": "0.8.4-main.ead640a",
52
+ "@dxos/codec-protobuf": "0.8.4-main.ead640a",
53
+ "@dxos/client-protocol": "0.8.4-main.ead640a",
54
+ "@dxos/config": "0.8.4-main.ead640a",
55
+ "@dxos/context": "0.8.4-main.ead640a",
56
+ "@dxos/credentials": "0.8.4-main.ead640a",
57
+ "@dxos/crypto": "0.8.4-main.ead640a",
58
+ "@dxos/debug": "0.8.4-main.ead640a",
59
+ "@dxos/echo-db": "0.8.4-main.ead640a",
60
+ "@dxos/echo": "0.8.4-main.ead640a",
61
+ "@dxos/echo-pipeline": "0.8.4-main.ead640a",
62
+ "@dxos/edge-client": "0.8.4-main.ead640a",
63
+ "@dxos/echo-protocol": "0.8.4-main.ead640a",
64
+ "@dxos/indexing": "0.8.4-main.ead640a",
65
+ "@dxos/feed-store": "0.8.4-main.ead640a",
66
+ "@dxos/invariant": "0.8.4-main.ead640a",
67
+ "@dxos/keyring": "0.8.4-main.ead640a",
68
+ "@dxos/kv-store": "0.8.4-main.ead640a",
69
+ "@dxos/keys": "0.8.4-main.ead640a",
70
+ "@dxos/log": "0.8.4-main.ead640a",
71
+ "@dxos/lock-file": "0.8.4-main.ead640a",
72
+ "@dxos/messaging": "0.8.4-main.ead640a",
73
+ "@dxos/network-manager": "0.8.4-main.ead640a",
74
+ "@dxos/node-std": "0.8.4-main.ead640a",
75
+ "@dxos/random-access-storage": "0.8.4-main.ead640a",
76
+ "@dxos/rpc": "0.8.4-main.ead640a",
77
+ "@dxos/teleport": "0.8.4-main.ead640a",
78
+ "@dxos/protocols": "0.8.4-main.ead640a",
79
+ "@dxos/teleport-extension-gossip": "0.8.4-main.ead640a",
80
+ "@dxos/teleport-extension-object-sync": "0.8.4-main.ead640a",
81
+ "@dxos/timeframe": "0.8.4-main.ead640a",
82
+ "@dxos/tracing": "0.8.4-main.ead640a",
83
+ "@dxos/util": "0.8.4-main.ead640a",
84
+ "@dxos/websocket-rpc": "0.8.4-main.ead640a"
85
85
  },
86
86
  "devDependencies": {
87
87
  "@types/platform": "^1.3.4",
88
88
  "@types/readable-stream": "^2.3.9",
89
89
  "get-port-please": "^3.1.1",
90
- "@dxos/test-utils": "0.8.4-main.dedc0f3",
91
- "@dxos/signal": "0.8.4-main.dedc0f3"
90
+ "@dxos/signal": "0.8.4-main.ead640a",
91
+ "@dxos/test-utils": "0.8.4-main.ead640a"
92
92
  },
93
93
  "publishConfig": {
94
94
  "access": "public"
@@ -25,7 +25,17 @@ export class EdgeAgentServiceImpl implements EdgeAgentService {
25
25
  queryEdgeStatus(): Stream<QueryEdgeStatusResponse> {
26
26
  return new Stream(({ ctx, next }) => {
27
27
  const update = () => {
28
- next({ status: this._edgeConnection?.status ?? EdgeStatus.NOT_CONNECTED });
28
+ next({
29
+ status: this._edgeConnection?.status ?? {
30
+ state: EdgeStatus.ConnectionState.NOT_CONNECTED,
31
+ rtt: 0,
32
+ uptime: 0,
33
+ rateBytesUp: 0,
34
+ rateBytesDown: 0,
35
+ messagesSent: 0,
36
+ messagesReceived: 0,
37
+ },
38
+ });
29
39
  };
30
40
 
31
41
  this._edgeConnection?.statusChanged.on(ctx, update);
@@ -44,7 +44,7 @@ export class DevicesServiceImpl implements DevicesService {
44
44
  presence = Device.PresenceState.ONLINE;
45
45
  } else if (profile.os?.toUpperCase() === 'EDGE') {
46
46
  presence =
47
- this._edgeConnection?.status === EdgeStatus.CONNECTED
47
+ this._edgeConnection?.status.state === EdgeStatus.ConnectionState.CONNECTED
48
48
  ? Device.PresenceState.ONLINE
49
49
  : Device.PresenceState.OFFLINE;
50
50
  } else {
@@ -109,16 +109,16 @@ describe('identity/identity', () => {
109
109
 
110
110
  test('edge feed replicator', async () => {
111
111
  let replicationStarted = false;
112
- let status = EdgeStatus.NOT_CONNECTED;
112
+ let status = EdgeStatus.ConnectionState.NOT_CONNECTED;
113
113
  const listeners: Array<() => void> = [];
114
114
  const setup = await setupIdentity({
115
115
  edgeConnection: {
116
116
  statusChanged: new Event(),
117
117
  get status() {
118
- return status;
118
+ return { state: status };
119
119
  },
120
120
  onReconnected: (listener) => {
121
- if (status === EdgeStatus.CONNECTED) {
121
+ if (status === EdgeStatus.ConnectionState.CONNECTED) {
122
122
  listener();
123
123
  } else {
124
124
  listeners.push(listener);
@@ -138,7 +138,7 @@ describe('identity/identity', () => {
138
138
 
139
139
  await writeGenesisCredential(setup);
140
140
  listeners.forEach((callback) => callback());
141
- status = EdgeStatus.CONNECTED;
141
+ status = EdgeStatus.ConnectionState.CONNECTED;
142
142
 
143
143
  await expect.poll(() => replicationStarted).toBeTruthy();
144
144
  });
@@ -408,6 +408,12 @@ export class ClientServicesHost {
408
408
  this._resetting = true;
409
409
  this._statusUpdate.emit();
410
410
  await this._serviceContext?.close();
411
+ // Clear LevelDB contents to remove all persisted Echo/Automerge/index data.
412
+ try {
413
+ await this._level!.clear();
414
+ } catch (err) {
415
+ log.warn('failed to clear leveldb during reset', { err });
416
+ }
411
417
  await this._storage!.reset();
412
418
  log.info('reset');
413
419
  log.trace('dxos.sdk.client-services-host.reset', trace.end({ id: traceId }));
@@ -15,6 +15,7 @@ import {
15
15
  createAdmissionCredentials,
16
16
  getCredentialAssertion,
17
17
  } from '@dxos/credentials';
18
+ import { ObjectId, getTypeReference } from '@dxos/echo/internal';
18
19
  import {
19
20
  AuthStatus,
20
21
  CredentialServerExtension,
@@ -37,7 +38,6 @@ import {
37
38
  createIdFromSpaceKey,
38
39
  encodeReference,
39
40
  } from '@dxos/echo-protocol';
40
- import { ObjectId, getTypeReference } from '@dxos/echo-schema';
41
41
  import type { EdgeConnection, EdgeHttpClient } from '@dxos/edge-client';
42
42
  import { type FeedStore, writeMessages } from '@dxos/feed-store';
43
43
  import { assertArgument, assertState, failedInvariant, invariant } from '@dxos/invariant';
@@ -45,7 +45,7 @@ describe('EdgeFeedReplicator', () => {
45
45
  const { endpoint, admitConnection, messageSink } = await createEdge();
46
46
  const { messenger } = await createClient(endpoint);
47
47
  admitConnection.wake();
48
- await expect.poll(() => messenger.status).toBe(EdgeStatus.CONNECTED);
48
+ await expect.poll(() => messenger.status.state).toBe(EdgeStatus.ConnectionState.CONNECTED);
49
49
 
50
50
  await attachReplicator(messenger);
51
51
  await expect.poll(() => messageSink.length).toEqual(1);
@@ -87,7 +87,7 @@ export class EdgeFeedReplicator extends Resource {
87
87
 
88
88
  private async _handleReconnect(): Promise<void> {
89
89
  await this._resetConnection();
90
- if (this._messenger.status === EdgeStatus.CONNECTED) {
90
+ if (this._messenger.status.state === EdgeStatus.ConnectionState.CONNECTED) {
91
91
  this._startReplication();
92
92
  }
93
93
  }
package/src/version.ts CHANGED
@@ -1 +1 @@
1
- export const DXOS_VERSION = "0.8.4-main.dedc0f3";
1
+ export const DXOS_VERSION = "0.8.4-main.ead640a";