@dxos/client-services 0.1.56-main.e47dfd1 → 0.1.56-main.ec96785

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":"spaces-service.d.ts","sourceRoot":"","sources":["../../../../../src/packlets/spaces/spaces-service.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAG9C,OAAO,EAAE,wBAAwB,EAAE,YAAY,EAAsB,MAAM,qBAAqB,CAAC;AAIjG,OAAO,EACL,kBAAkB,EAClB,kBAAkB,EAClB,uBAAuB,EACvB,mBAAmB,EACnB,KAAK,EAGL,aAAa,EACb,wBAAwB,EACxB,kBAAkB,EAClB,uBAAuB,EACxB,MAAM,4CAA4C,CAAC;AACpD,OAAO,EAAE,UAAU,EAAE,MAAM,6CAA6C,CAAC;AACzE,OAAO,EAAE,aAAa,EAAE,MAAM,iDAAiD,CAAC;AAChF,OAAO,EAAE,QAAQ,EAAY,MAAM,YAAY,CAAC;AAEhD,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAE9C,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAExD,qBAAa,iBAAkB,YAAW,aAAa;IAEnD,OAAO,CAAC,QAAQ,CAAC,gBAAgB;IACjC,OAAO,CAAC,QAAQ,CAAC,aAAa;IAC9B,OAAO,CAAC,QAAQ,CAAC,yBAAyB;IAC1C,OAAO,CAAC,QAAQ,CAAC,oBAAoB;gBAHpB,gBAAgB,EAAE,eAAe,EACjC,aAAa,EAAE,YAAY,EAC3B,yBAAyB,EAAE,wBAAwB,EACnD,oBAAoB,EAAE,QAAQ,CAAC,OAAO,CAAC,gBAAgB,CAAC,CAAC;IAGtE,WAAW,IAAI,OAAO,CAAC,KAAK,CAAC;IAU7B,WAAW,CAAC,EAAE,QAAQ,EAAE,KAAK,EAAE,EAAE,kBAAkB;IAmBzD,WAAW,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oB;gBAHpB,gBAAgB,EAAE,eAAe,EACjC,aAAa,EAAE,YAAY,EAC3B,yBAAyB,EAAE,wBAAwB,EACnD,oBAAoB,EAAE,QAAQ,CAAC,OAAO,CAAC,gBAAgB,CAAC,CAAC;IAGtE,WAAW,IAAI,OAAO,CAAC,KAAK,CAAC;IAU7B,WAAW,CAAC,EAAE,QAAQ,EAAE,KAAK,EAAE,EAAE,kBAAkB;IAmBzD,WAAW,IAAI,MAAM,CAAC,mBAAmB,CAAC;IAmDpC,WAAW,CAAC,EAAE,QAAQ,EAAE,OAAO,EAAE,OAAO,EAAE,EAAE,kBAAkB;IAMpE,iBAAiB,CAAC,EAAE,QAAQ,EAAE,OAAO,EAAE,EAAE,wBAAwB;IAajE,gBAAgB,CAAC,EAAE,QAAQ,EAAE,EAAE,uBAAuB,GAAG,MAAM,CAAC,UAAU,CAAC;IAcrE,gBAAgB,CAAC,EAAE,QAAQ,EAAE,WAAW,EAAE,EAAE,uBAAuB;IAOnE,WAAW,CAAC,EAAE,QAAQ,EAAE,EAAE,kBAAkB;IAMlD,OAAO,CAAC,eAAe;CA4CxB"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dxos/client-services",
3
- "version": "0.1.56-main.e47dfd1",
3
+ "version": "0.1.56-main.ec96785",
4
4
  "description": "DXOS client services implementation",
5
5
  "homepage": "https://dxos.org",
6
6
  "bugs": "https://github.com/dxos/dxos/issues",
@@ -22,40 +22,40 @@
22
22
  ],
23
23
  "dependencies": {
24
24
  "tiny-invariant": "^1.3.1",
25
- "@dxos/async": "0.1.56-main.e47dfd1",
26
- "@dxos/client-protocol": "0.1.56-main.e47dfd1",
27
- "@dxos/codec-protobuf": "0.1.56-main.e47dfd1",
28
- "@dxos/config": "0.1.56-main.e47dfd1",
29
- "@dxos/context": "0.1.56-main.e47dfd1",
30
- "@dxos/credentials": "0.1.56-main.e47dfd1",
31
- "@dxos/crypto": "0.1.56-main.e47dfd1",
32
- "@dxos/debug": "0.1.56-main.e47dfd1",
33
- "@dxos/document-model": "0.1.56-main.e47dfd1",
34
- "@dxos/echo-db": "0.1.56-main.e47dfd1",
35
- "@dxos/echo-pipeline": "0.1.56-main.e47dfd1",
36
- "@dxos/errors": "0.1.56-main.e47dfd1",
37
- "@dxos/feed-store": "0.1.56-main.e47dfd1",
38
- "@dxos/keyring": "0.1.56-main.e47dfd1",
39
- "@dxos/keys": "0.1.56-main.e47dfd1",
40
- "@dxos/lock-file": "0.1.56-main.e47dfd1",
41
- "@dxos/log": "0.1.56-main.e47dfd1",
42
- "@dxos/messaging": "0.1.56-main.e47dfd1",
43
- "@dxos/model-factory": "0.1.56-main.e47dfd1",
44
- "@dxos/network-manager": "0.1.56-main.e47dfd1",
45
- "@dxos/node-std": "0.1.56-main.e47dfd1",
46
- "@dxos/protocols": "0.1.56-main.e47dfd1",
47
- "@dxos/random-access-storage": "0.1.56-main.e47dfd1",
48
- "@dxos/rpc": "0.1.56-main.e47dfd1",
49
- "@dxos/teleport": "0.1.56-main.e47dfd1",
50
- "@dxos/teleport-extension-gossip": "0.1.56-main.e47dfd1",
51
- "@dxos/teleport-extension-object-sync": "0.1.56-main.e47dfd1",
52
- "@dxos/text-model": "0.1.56-main.e47dfd1",
53
- "@dxos/timeframe": "0.1.56-main.e47dfd1",
54
- "@dxos/util": "0.1.56-main.e47dfd1"
25
+ "@dxos/async": "0.1.56-main.ec96785",
26
+ "@dxos/client-protocol": "0.1.56-main.ec96785",
27
+ "@dxos/codec-protobuf": "0.1.56-main.ec96785",
28
+ "@dxos/config": "0.1.56-main.ec96785",
29
+ "@dxos/context": "0.1.56-main.ec96785",
30
+ "@dxos/credentials": "0.1.56-main.ec96785",
31
+ "@dxos/crypto": "0.1.56-main.ec96785",
32
+ "@dxos/debug": "0.1.56-main.ec96785",
33
+ "@dxos/document-model": "0.1.56-main.ec96785",
34
+ "@dxos/echo-db": "0.1.56-main.ec96785",
35
+ "@dxos/echo-pipeline": "0.1.56-main.ec96785",
36
+ "@dxos/errors": "0.1.56-main.ec96785",
37
+ "@dxos/feed-store": "0.1.56-main.ec96785",
38
+ "@dxos/keyring": "0.1.56-main.ec96785",
39
+ "@dxos/keys": "0.1.56-main.ec96785",
40
+ "@dxos/lock-file": "0.1.56-main.ec96785",
41
+ "@dxos/log": "0.1.56-main.ec96785",
42
+ "@dxos/messaging": "0.1.56-main.ec96785",
43
+ "@dxos/model-factory": "0.1.56-main.ec96785",
44
+ "@dxos/network-manager": "0.1.56-main.ec96785",
45
+ "@dxos/node-std": "0.1.56-main.ec96785",
46
+ "@dxos/protocols": "0.1.56-main.ec96785",
47
+ "@dxos/random-access-storage": "0.1.56-main.ec96785",
48
+ "@dxos/rpc": "0.1.56-main.ec96785",
49
+ "@dxos/teleport": "0.1.56-main.ec96785",
50
+ "@dxos/teleport-extension-gossip": "0.1.56-main.ec96785",
51
+ "@dxos/teleport-extension-object-sync": "0.1.56-main.ec96785",
52
+ "@dxos/text-model": "0.1.56-main.ec96785",
53
+ "@dxos/timeframe": "0.1.56-main.ec96785",
54
+ "@dxos/util": "0.1.56-main.ec96785"
55
55
  },
56
56
  "devDependencies": {
57
57
  "@types/readable-stream": "^2.3.9",
58
- "@dxos/signal": "0.1.56-main.e47dfd1"
58
+ "@dxos/signal": "0.1.56-main.ec96785"
59
59
  },
60
60
  "publishConfig": {
61
61
  "access": "public"
@@ -185,7 +185,7 @@ export class DataSpaceManager {
185
185
  localPeerId: this._signingContext.deviceKey,
186
186
  });
187
187
  const presence = new Presence({
188
- announceInterval: 500,
188
+ announceInterval: 1_000,
189
189
  offlineTimeout: 5_000, // TODO(burdon): Config.
190
190
  identityKey: this._signingContext.identityKey,
191
191
  gossip,
@@ -185,19 +185,25 @@ export class SpacesServiceImpl implements SpacesService {
185
185
  targetDataTimeframe: space.dataPipeline.pipelineState?.targetTimeframe,
186
186
  totalDataTimeframe: space.dataPipeline.pipelineState?.endTimeframe,
187
187
  },
188
- members: Array.from(space.inner.spaceState.members.values()).map((member) => ({
189
- identity: {
190
- identityKey: member.key,
191
- profile: {
192
- displayName: member.assertion.profile?.displayName ?? humanize(member.key),
188
+ members: Array.from(space.inner.spaceState.members.values()).map((member) => {
189
+ const peers = space.presence.getPeersOnline().filter(({ identityKey }) => identityKey.equals(member.key));
190
+ const isMe = this._identityManager.identity?.identityKey.equals(member.key);
191
+
192
+ if (isMe) {
193
+ peers.push(space.presence.getLocalState());
194
+ }
195
+
196
+ return {
197
+ identity: {
198
+ identityKey: member.key,
199
+ profile: {
200
+ displayName: member.assertion.profile?.displayName ?? humanize(member.key),
201
+ },
193
202
  },
194
- },
195
- presence:
196
- this._identityManager.identity?.identityKey.equals(member.key) ||
197
- space.presence.getPeersOnline().filter(({ identityKey }) => identityKey.equals(member.key)).length > 0
198
- ? SpaceMember.PresenceState.ONLINE
199
- : SpaceMember.PresenceState.OFFLINE,
200
- })),
203
+ presence: isMe || peers.length > 0 ? SpaceMember.PresenceState.ONLINE : SpaceMember.PresenceState.OFFLINE,
204
+ peerStates: peers,
205
+ };
206
+ }),
201
207
  creator: space.inner.spaceState.creator?.key,
202
208
  cache: space.cache,
203
209
  metrics: space.metrics,