@dxos/client-services 0.3.11-main.d8b8a39 → 0.3.11-main.d8f9aa0

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.
@@ -31,7 +31,7 @@ __export(testing_exports, {
31
31
  syncItemsLocal: () => syncItemsLocal
32
32
  });
33
33
  module.exports = __toCommonJS(testing_exports);
34
- var import_chunk_H5EXDUBC = require("../../chunk-H5EXDUBC.cjs");
34
+ var import_chunk_L6XRQW63 = require("../../chunk-L6XRQW63.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 import_chunk_H5EXDUBC.ServiceContext) {
212
+ if (host instanceof import_chunk_L6XRQW63.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 import_chunk_H5EXDUBC.ServiceContext) {
223
+ if (guest instanceof import_chunk_L6XRQW63.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 import_chunk_H5EXDUBC.ClientServicesHost({
232
+ return new import_chunk_L6XRQW63.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, import_chunk_H5EXDUBC.createDefaultModelFactory)();
247
- return new import_chunk_H5EXDUBC.ServiceContext(storage, networkManager, signalManager, modelFactory);
246
+ const modelFactory = (0, import_chunk_L6XRQW63.createDefaultModelFactory)();
247
+ return new import_chunk_L6XRQW63.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, import_chunk_H5EXDUBC.createDefaultModelFactory)(),
331
+ modelFactory: (0, import_chunk_L6XRQW63.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 import_chunk_H5EXDUBC.DataSpaceManager(this.spaceManager, this.metadataStore, new import_echo_pipeline.DataServiceSubscriptions(), this.keyring, this.identity, this.feedStore, this.automergeHost);
343
+ return this._props.dataSpaceManager ??= new import_chunk_L6XRQW63.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);
@@ -24,6 +24,10 @@ export type Diagnostics = {
24
24
  swarms?: SwarmInfo[];
25
25
  feeds?: Partial<SubscribeToFeedsResponse.Feed>[];
26
26
  metrics?: Metrics;
27
+ storage?: {
28
+ file: string;
29
+ count: number;
30
+ }[];
27
31
  };
28
32
  export type SpaceStats = {
29
33
  key: PublicKey;
@@ -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;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,wBAAw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,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,CAqFrB,CAAC"}
@@ -1,2 +1,2 @@
1
- export declare const DXOS_VERSION = "0.3.11-main.d8b8a39";
1
+ export declare const DXOS_VERSION = "0.3.11-main.d8f9aa0";
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.d8b8a39",
3
+ "version": "0.3.11-main.d8f9aa0",
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.11-main.d8b8a39",
26
- "@dxos/client-protocol": "0.3.11-main.d8b8a39",
27
- "@dxos/config": "0.3.11-main.d8b8a39",
28
- "@dxos/credentials": "0.3.11-main.d8b8a39",
29
- "@dxos/context": "0.3.11-main.d8b8a39",
30
- "@dxos/codec-protobuf": "0.3.11-main.d8b8a39",
31
- "@dxos/crypto": "0.3.11-main.d8b8a39",
32
- "@dxos/debug": "0.3.11-main.d8b8a39",
33
- "@dxos/document-model": "0.3.11-main.d8b8a39",
34
- "@dxos/echo-db": "0.3.11-main.d8b8a39",
35
- "@dxos/echo-pipeline": "0.3.11-main.d8b8a39",
36
- "@dxos/echo-schema": "0.3.11-main.d8b8a39",
37
- "@dxos/feed-store": "0.3.11-main.d8b8a39",
38
- "@dxos/invariant": "0.3.11-main.d8b8a39",
39
- "@dxos/keyring": "0.3.11-main.d8b8a39",
40
- "@dxos/lock-file": "0.3.11-main.d8b8a39",
41
- "@dxos/log": "0.3.11-main.d8b8a39",
42
- "@dxos/messaging": "0.3.11-main.d8b8a39",
43
- "@dxos/model-factory": "0.3.11-main.d8b8a39",
44
- "@dxos/keys": "0.3.11-main.d8b8a39",
45
- "@dxos/network-manager": "0.3.11-main.d8b8a39",
46
- "@dxos/node-std": "0.3.11-main.d8b8a39",
47
- "@dxos/protocols": "0.3.11-main.d8b8a39",
48
- "@dxos/rpc": "0.3.11-main.d8b8a39",
49
- "@dxos/teleport": "0.3.11-main.d8b8a39",
50
- "@dxos/random-access-storage": "0.3.11-main.d8b8a39",
51
- "@dxos/teleport-extension-object-sync": "0.3.11-main.d8b8a39",
52
- "@dxos/teleport-extension-gossip": "0.3.11-main.d8b8a39",
53
- "@dxos/tracing": "0.3.11-main.d8b8a39",
54
- "@dxos/timeframe": "0.3.11-main.d8b8a39",
55
- "@dxos/text-model": "0.3.11-main.d8b8a39",
56
- "@dxos/util": "0.3.11-main.d8b8a39",
57
- "@dxos/websocket-rpc": "0.3.11-main.d8b8a39"
25
+ "@dxos/async": "0.3.11-main.d8f9aa0",
26
+ "@dxos/client-protocol": "0.3.11-main.d8f9aa0",
27
+ "@dxos/codec-protobuf": "0.3.11-main.d8f9aa0",
28
+ "@dxos/config": "0.3.11-main.d8f9aa0",
29
+ "@dxos/context": "0.3.11-main.d8f9aa0",
30
+ "@dxos/crypto": "0.3.11-main.d8f9aa0",
31
+ "@dxos/debug": "0.3.11-main.d8f9aa0",
32
+ "@dxos/credentials": "0.3.11-main.d8f9aa0",
33
+ "@dxos/echo-db": "0.3.11-main.d8f9aa0",
34
+ "@dxos/echo-pipeline": "0.3.11-main.d8f9aa0",
35
+ "@dxos/document-model": "0.3.11-main.d8f9aa0",
36
+ "@dxos/feed-store": "0.3.11-main.d8f9aa0",
37
+ "@dxos/invariant": "0.3.11-main.d8f9aa0",
38
+ "@dxos/keyring": "0.3.11-main.d8f9aa0",
39
+ "@dxos/lock-file": "0.3.11-main.d8f9aa0",
40
+ "@dxos/echo-schema": "0.3.11-main.d8f9aa0",
41
+ "@dxos/keys": "0.3.11-main.d8f9aa0",
42
+ "@dxos/log": "0.3.11-main.d8f9aa0",
43
+ "@dxos/messaging": "0.3.11-main.d8f9aa0",
44
+ "@dxos/model-factory": "0.3.11-main.d8f9aa0",
45
+ "@dxos/network-manager": "0.3.11-main.d8f9aa0",
46
+ "@dxos/random-access-storage": "0.3.11-main.d8f9aa0",
47
+ "@dxos/node-std": "0.3.11-main.d8f9aa0",
48
+ "@dxos/protocols": "0.3.11-main.d8f9aa0",
49
+ "@dxos/rpc": "0.3.11-main.d8f9aa0",
50
+ "@dxos/teleport": "0.3.11-main.d8f9aa0",
51
+ "@dxos/teleport-extension-gossip": "0.3.11-main.d8f9aa0",
52
+ "@dxos/teleport-extension-object-sync": "0.3.11-main.d8f9aa0",
53
+ "@dxos/text-model": "0.3.11-main.d8f9aa0",
54
+ "@dxos/timeframe": "0.3.11-main.d8f9aa0",
55
+ "@dxos/tracing": "0.3.11-main.d8f9aa0",
56
+ "@dxos/util": "0.3.11-main.d8f9aa0",
57
+ "@dxos/websocket-rpc": "0.3.11-main.d8f9aa0"
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.d8b8a39"
62
+ "@dxos/signal": "0.3.11-main.d8f9aa0"
63
63
  },
64
64
  "publishConfig": {
65
65
  "access": "public"
@@ -48,6 +48,7 @@ export type Diagnostics = {
48
48
  swarms?: SwarmInfo[];
49
49
  feeds?: Partial<SubscribeToFeedsResponse.Feed>[];
50
50
  metrics?: Metrics;
51
+ storage?: { file: string; count: number }[];
51
52
  };
52
53
 
53
54
  // TODO(burdon): Normalize for ECHO/HALO.
@@ -95,6 +96,23 @@ export const createDiagnostics = async (
95
96
  }).catch(() => undefined);
96
97
  }
97
98
 
99
+ if (typeof navigator !== 'undefined' && navigator.storage) {
100
+ const map = new Map();
101
+ const dir = await navigator.storage.getDirectory();
102
+ for await (const filename of (dir as any)?.keys()) {
103
+ const idx = filename.indexOf('-', filename.indexOf('-') + 1);
104
+ if (idx === -1) {
105
+ continue;
106
+ }
107
+
108
+ map.set(filename.slice(0, idx), (map.get(filename.slice(0, idx)) ?? 0) + 1);
109
+ }
110
+
111
+ diagnostics.storage = Array.from(map.entries())
112
+ .sort((a, b) => b[1] - a[1])
113
+ .map(([file, count]) => ({ file, count }));
114
+ }
115
+
98
116
  const identity = serviceContext.identityManager.identity;
99
117
  if (identity) {
100
118
  // Identity.
@@ -41,7 +41,7 @@ export class SpacesServiceImpl implements SpacesService {
41
41
 
42
42
  async createSpace(): Promise<Space> {
43
43
  if (!this._identityManager.identity) {
44
- throw new Error('This device has no HALO identity available. See https://docs.dxos.org/guide/halo');
44
+ throw new Error('This device has no HALO identity available. See https://docs.dxos.org/guide/platform/halo');
45
45
  }
46
46
 
47
47
  const dataSpaceManager = await this._getDataSpaceManager();
package/src/version.ts CHANGED
@@ -1 +1 @@
1
- export const DXOS_VERSION = "0.3.11-main.d8b8a39";
1
+ export const DXOS_VERSION = "0.3.11-main.d8f9aa0";