@dxos/client-services 0.4.4 → 0.4.5-main.60c9234

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_DZARJVRB = require("../../chunk-DZARJVRB.cjs");
34
+ var import_chunk_G6IFLZAA = require("../../chunk-G6IFLZAA.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_DZARJVRB.ServiceContext) {
212
+ if (host instanceof import_chunk_G6IFLZAA.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_DZARJVRB.ServiceContext) {
223
+ if (guest instanceof import_chunk_G6IFLZAA.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_DZARJVRB.ClientServicesHost({
232
+ return new import_chunk_G6IFLZAA.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_DZARJVRB.createDefaultModelFactory)();
247
- return new import_chunk_DZARJVRB.ServiceContext(storage, networkManager, signalManager, modelFactory);
246
+ const modelFactory = (0, import_chunk_G6IFLZAA.createDefaultModelFactory)();
247
+ return new import_chunk_G6IFLZAA.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_DZARJVRB.createDefaultModelFactory)(),
331
+ modelFactory: (0, import_chunk_G6IFLZAA.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_DZARJVRB.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_G6IFLZAA.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);
@@ -8,7 +8,7 @@ export declare class IdentityServiceImpl implements IdentityService {
8
8
  private readonly _identityManager;
9
9
  private readonly _keyring;
10
10
  private readonly _onProfileUpdate?;
11
- constructor(_createIdentity: (params: CreateIdentityOptions, useAutomerge: boolean) => Promise<Identity>, _identityManager: IdentityManager, _keyring: Keyring, _onProfileUpdate?: ((profile: ProfileDocument | undefined) => Promise<void>) | undefined);
11
+ constructor(_createIdentity: (params: CreateIdentityOptions) => Promise<Identity>, _identityManager: IdentityManager, _keyring: Keyring, _onProfileUpdate?: ((profile: ProfileDocument | undefined) => Promise<void>) | undefined);
12
12
  createIdentity(request: CreateIdentityRequest): Promise<Identity>;
13
13
  recoverIdentity(request: RecoverIdentityRequest): Promise<Identity>;
14
14
  queryIdentity(): Stream<QueryIdentityResponse>;
@@ -1 +1 @@
1
- {"version":3,"file":"identity-service.d.ts","sourceRoot":"","sources":["../../../../../src/packlets/identity/identity-service.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAI9C,OAAO,EAAE,KAAK,OAAO,EAAE,MAAM,eAAe,CAAC;AAC7C,OAAO,EACL,KAAK,qBAAqB,EAC1B,KAAK,QAAQ,EACb,KAAK,eAAe,EACpB,KAAK,qBAAqB,EAC1B,KAAK,sBAAsB,EAC3B,KAAK,uBAAuB,EAC7B,MAAM,4CAA4C,CAAC;AACpD,OAAO,EAAE,KAAK,YAAY,EAAE,KAAK,eAAe,EAAE,MAAM,6CAA6C,CAAC;AAEtG,OAAO,EAAE,KAAK,qBAAqB,EAAE,KAAK,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAItF,qBAAa,mBAAoB,YAAW,eAAe;IAEvD,OAAO,CAAC,QAAQ,CAAC,eAAe;IAChC,OAAO,CAAC,QAAQ,CAAC,gBAAgB;IACjC,OAAO,CAAC,QAAQ,CAAC,QAAQ;IACzB,OAAO,CAAC,QAAQ,CAAC,gBAAgB,CAAC;gBAHjB,eAAe,EAAE,CAAC,MAAM,EAAE,qBAAqB,EAAE,YAAY,EAAE,OAAO,KAAK,OAAO,CAAC,QAAQ,CAAC,EAC5F,gBAAgB,EAAE,eAAe,EACjC,QAAQ,EAAE,OAAO,EACjB,gBAAgB,CAAC,aAAY,eAAe,GAAG,SAAS,KAAK,QAAQ,IAAI,CAAC,a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B,aAAa,EACb,OAAO,EAEP,OAAO,EACP,SAAS,GACV,GAAE,wBAA6B;IAiDhC,IAAI,MAAM,YAET;IAED,IAAI,MAAM,uBAET;IAED,IAAI,OAAO,mBAEV;IAED,IAAI,eAAe,oCAElB;IAED,IAAI,WAAW,sDAEd;IAED,IAAI,QAAQ,4BAEX;IAED;;;;OAIG;IACH,UAAU,CAAC,EAAE,MAAM,EAAE,GAAG,OAAO,EAAE,EAAE,iBAAiB;IAiC9C,IAAI,CAAC,GAAG,EAAE,OAAO;IA6FjB,KAAK;IAgBL,KAAK;YAYG,eAAe;CAiC9B"}
1
+ {"version":3,"file":"service-host.d.ts","sourceRoot":"","sources":["../../../../../src/packlets/services/service-host.ts"],"names":[],"mappings":"AAKA,OAAO,EAAuB,KAAK,cAAc,EAA0B,MAAM,uBAAuB,CAAC;AACzG,OAAO,EAAE,KAAK,MAAM,EAAE,MAAM,cAAc,CAAC;AAC3C,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAOxC,OAAO,EAAE,KAAK,aAAa,EAA0B,MAAM,iBAAiB,CAAC;AAC7E,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACnD,OAAO,EAAoD,KAAK,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAGhH,OAAO,EAAE,KAAK,OAAO,EAAE,MAAM,6BAA6B,CAAC;AAO3D,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACnD,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAarD,eAAO,MAAM,yBAAyB,oBAErC,CAAC;AAEF,MAAM,MAAM,wBAAwB,GAAG;IACrC;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,YAAY,CAAC,EAAE,YAAY,CAAC;IAC5B,gBAAgB,CAAC,EAAE,gBAAgB,CAAC;IACpC,aAAa,CAAC,EAAE,aAAa,CAAC;IAC9B,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,O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,IAAI,MAAM,uBAET;IAED,IAAI,OAAO,mBAEV;IAED,IAAI,eAAe,oCAElB;IAED,IAAI,WAAW,sDAEd;IAED,IAAI,QAAQ,4BAEX;IAED;;;;OAIG;IACH,UAAU,CAAC,EAAE,MAAM,EAAE,GAAG,OAAO,EAAE,EAAE,iBAAiB;IAiC9C,IAAI,CAAC,GAAG,EAAE,OAAO;IA6FjB,KAAK;IAgBL,KAAK;YAYG,eAAe;CAqB9B"}
@@ -1,2 +1,2 @@
1
- export declare const DXOS_VERSION = "0.4.4";
1
+ export declare const DXOS_VERSION = "0.4.5-main.60c9234";
2
2
  //# sourceMappingURL=version.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"version.d.ts","sourceRoot":"","sources":["../../../src/version.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,YAAY,UAAU,CAAC"}
1
+ {"version":3,"file":"version.d.ts","sourceRoot":"","sources":["../../../src/version.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,YAAY,uBAAuB,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dxos/client-services",
3
- "version": "0.4.4",
3
+ "version": "0.4.5-main.60c9234",
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.4.4",
26
- "@dxos/client-protocol": "0.4.4",
27
- "@dxos/codec-protobuf": "0.4.4",
28
- "@dxos/config": "0.4.4",
29
- "@dxos/crypto": "0.4.4",
30
- "@dxos/debug": "0.4.4",
31
- "@dxos/context": "0.4.4",
32
- "@dxos/credentials": "0.4.4",
33
- "@dxos/echo-db": "0.4.4",
34
- "@dxos/document-model": "0.4.4",
35
- "@dxos/echo-pipeline": "0.4.4",
36
- "@dxos/echo-schema": "0.4.4",
37
- "@dxos/feed-store": "0.4.4",
38
- "@dxos/invariant": "0.4.4",
39
- "@dxos/keys": "0.4.4",
40
- "@dxos/keyring": "0.4.4",
41
- "@dxos/lock-file": "0.4.4",
42
- "@dxos/log": "0.4.4",
43
- "@dxos/messaging": "0.4.4",
44
- "@dxos/model-factory": "0.4.4",
45
- "@dxos/network-manager": "0.4.4",
46
- "@dxos/node-std": "0.4.4",
47
- "@dxos/protocols": "0.4.4",
48
- "@dxos/random-access-storage": "0.4.4",
49
- "@dxos/rpc": "0.4.4",
50
- "@dxos/teleport": "0.4.4",
51
- "@dxos/teleport-extension-gossip": "0.4.4",
52
- "@dxos/teleport-extension-object-sync": "0.4.4",
53
- "@dxos/text-model": "0.4.4",
54
- "@dxos/timeframe": "0.4.4",
55
- "@dxos/util": "0.4.4",
56
- "@dxos/tracing": "0.4.4",
57
- "@dxos/websocket-rpc": "0.4.4"
25
+ "@dxos/codec-protobuf": "0.4.5-main.60c9234",
26
+ "@dxos/async": "0.4.5-main.60c9234",
27
+ "@dxos/client-protocol": "0.4.5-main.60c9234",
28
+ "@dxos/config": "0.4.5-main.60c9234",
29
+ "@dxos/context": "0.4.5-main.60c9234",
30
+ "@dxos/credentials": "0.4.5-main.60c9234",
31
+ "@dxos/crypto": "0.4.5-main.60c9234",
32
+ "@dxos/debug": "0.4.5-main.60c9234",
33
+ "@dxos/echo-db": "0.4.5-main.60c9234",
34
+ "@dxos/document-model": "0.4.5-main.60c9234",
35
+ "@dxos/echo-schema": "0.4.5-main.60c9234",
36
+ "@dxos/feed-store": "0.4.5-main.60c9234",
37
+ "@dxos/echo-pipeline": "0.4.5-main.60c9234",
38
+ "@dxos/invariant": "0.4.5-main.60c9234",
39
+ "@dxos/keys": "0.4.5-main.60c9234",
40
+ "@dxos/keyring": "0.4.5-main.60c9234",
41
+ "@dxos/lock-file": "0.4.5-main.60c9234",
42
+ "@dxos/messaging": "0.4.5-main.60c9234",
43
+ "@dxos/model-factory": "0.4.5-main.60c9234",
44
+ "@dxos/network-manager": "0.4.5-main.60c9234",
45
+ "@dxos/node-std": "0.4.5-main.60c9234",
46
+ "@dxos/log": "0.4.5-main.60c9234",
47
+ "@dxos/random-access-storage": "0.4.5-main.60c9234",
48
+ "@dxos/teleport": "0.4.5-main.60c9234",
49
+ "@dxos/protocols": "0.4.5-main.60c9234",
50
+ "@dxos/rpc": "0.4.5-main.60c9234",
51
+ "@dxos/teleport-extension-object-sync": "0.4.5-main.60c9234",
52
+ "@dxos/text-model": "0.4.5-main.60c9234",
53
+ "@dxos/teleport-extension-gossip": "0.4.5-main.60c9234",
54
+ "@dxos/timeframe": "0.4.5-main.60c9234",
55
+ "@dxos/tracing": "0.4.5-main.60c9234",
56
+ "@dxos/websocket-rpc": "0.4.5-main.60c9234",
57
+ "@dxos/util": "0.4.5-main.60c9234"
58
58
  },
59
59
  "devDependencies": {
60
60
  "@types/platform": "^1.3.4",
61
61
  "@types/readable-stream": "^2.3.9",
62
- "@dxos/signal": "0.4.4"
62
+ "@dxos/signal": "0.4.5-main.60c9234"
63
63
  },
64
64
  "publishConfig": {
65
65
  "access": "public"
@@ -19,18 +19,16 @@ import { type Presentation, type ProfileDocument } from '@dxos/protocols/proto/d
19
19
 
20
20
  import { type CreateIdentityOptions, type IdentityManager } from './identity-manager';
21
21
 
22
- const CREATE_PROFILE_WITH_AUTOMERGE_DEFAULT = true;
23
-
24
22
  export class IdentityServiceImpl implements IdentityService {
25
23
  constructor(
26
- private readonly _createIdentity: (params: CreateIdentityOptions, useAutomerge: boolean) => Promise<Identity>,
24
+ private readonly _createIdentity: (params: CreateIdentityOptions) => Promise<Identity>,
27
25
  private readonly _identityManager: IdentityManager,
28
26
  private readonly _keyring: Keyring,
29
27
  private readonly _onProfileUpdate?: (profile: ProfileDocument | undefined) => Promise<void>,
30
28
  ) {}
31
29
 
32
30
  async createIdentity(request: CreateIdentityRequest): Promise<Identity> {
33
- await this._createIdentity(request.profile ?? {}, request.useAutomerge ?? CREATE_PROFILE_WITH_AUTOMERGE_DEFAULT);
31
+ await this._createIdentity(request.profile ?? {});
34
32
  return this._getIdentity()!;
35
33
  }
36
34
 
@@ -8,7 +8,7 @@ import { type Config } from '@dxos/config';
8
8
  import { Context } from '@dxos/context';
9
9
  import { DocumentModel } from '@dxos/document-model';
10
10
  import { DataServiceImpl } from '@dxos/echo-pipeline';
11
- import { type TypedObject, base, getRawDoc } from '@dxos/echo-schema';
11
+ import { type TypedObject, base, getRawDoc, type SpaceDoc } from '@dxos/echo-schema';
12
12
  import { invariant } from '@dxos/invariant';
13
13
  import { PublicKey } from '@dxos/keys';
14
14
  import { log } from '@dxos/log';
@@ -17,10 +17,10 @@ import { ModelFactory } from '@dxos/model-factory';
17
17
  import { createSimplePeerTransportFactory, NetworkManager, type TransportFactory } from '@dxos/network-manager';
18
18
  import { trace } from '@dxos/protocols';
19
19
  import { SystemStatus } from '@dxos/protocols/proto/dxos/client/services';
20
- import { type EchoObject } from '@dxos/protocols/proto/dxos/echo/object';
21
20
  import { type Storage } from '@dxos/random-access-storage';
22
21
  import { TextModel } from '@dxos/text-model';
23
22
  import { TRACE_PROCESSOR, trace as Trace } from '@dxos/tracing';
23
+ import { assignDeep } from '@dxos/util';
24
24
  import { WebsocketRpcClient } from '@dxos/websocket-rpc';
25
25
 
26
26
  import { createDiagnostics } from './diagnostics';
@@ -42,21 +42,6 @@ export const createDefaultModelFactory = () => {
42
42
  return new ModelFactory().registerModel(DocumentModel).registerModel(TextModel);
43
43
  };
44
44
 
45
- // TODO(wittjosiah): Factor out.
46
- const createGenesisMutationFromTypedObject = (obj: TypedObject): EchoObject => {
47
- const snapshot = obj[base]._createSnapshot();
48
-
49
- return {
50
- objectId: obj[base]._id,
51
- genesis: {
52
- modelType: obj[base]._modelConstructor.meta.type,
53
- },
54
- snapshot: {
55
- model: snapshot,
56
- },
57
- };
58
- };
59
-
60
45
  export type ClientServicesHostParams = {
61
46
  /**
62
47
  * Can be omitted if `initialize` is later called.
@@ -260,7 +245,7 @@ export class ClientServicesHost {
260
245
  SystemService: this._systemService,
261
246
 
262
247
  IdentityService: new IdentityServiceImpl(
263
- (params, useAutomerge) => this._createIdentity(params, useAutomerge),
248
+ (params) => this._createIdentity(params),
264
249
  this._serviceContext.identityManager,
265
250
  this._serviceContext.keyring,
266
251
  (profile) => this._serviceContext.broadcastProfileUpdate(profile),
@@ -351,36 +336,24 @@ export class ClientServicesHost {
351
336
  await this._callbacks?.onReset?.();
352
337
  }
353
338
 
354
- private async _createIdentity(params: CreateIdentityOptions, useAutomerge: boolean) {
339
+ private async _createIdentity(params: CreateIdentityOptions) {
355
340
  const identity = await this._serviceContext.createIdentity(params);
356
341
 
357
342
  // Setup default space.
358
343
  await this._serviceContext.initialized.wait();
359
344
  const space = await this._serviceContext.dataSpaceManager!.createSpace();
360
345
 
361
- const obj: TypedObject = new Properties(undefined, { automerge: useAutomerge });
346
+ const obj: TypedObject = new Properties(undefined);
362
347
  obj[defaultKey] = identity.identityKey.toHex();
363
348
 
364
- if (!useAutomerge) {
365
- await this._serviceRegistry.services.DataService!.write({
366
- spaceKey: space.key,
367
- batch: {
368
- objects: [createGenesisMutationFromTypedObject(obj)],
369
- },
370
- });
371
- await this._serviceRegistry.services.DataService!.flush({ spaceKey: space.key });
372
- } else {
373
- // TODO(dmaretskyi): Refactor this.
374
- const automergeIndex = space.automergeSpaceState.rootUrl;
375
- invariant(automergeIndex);
376
- const document = await this._serviceContext.automergeHost.repo.find(automergeIndex as any);
377
- await document.whenReady();
378
-
379
- document.change((doc: any) => {
380
- doc.objects ??= {};
381
- doc.objects[obj[base]._id] = getRawDoc(obj).handle.docSync();
382
- });
383
- }
349
+ const automergeIndex = space.automergeSpaceState.rootUrl;
350
+ invariant(automergeIndex);
351
+ const document = await this._serviceContext.automergeHost.repo.find<SpaceDoc>(automergeIndex as any);
352
+ await document.whenReady();
353
+
354
+ document.change((doc: SpaceDoc) => {
355
+ assignDeep(doc, ['objects', obj[base]._id], getRawDoc(obj).handle.docSync());
356
+ });
384
357
 
385
358
  return identity;
386
359
  }
@@ -143,7 +143,7 @@ export class DataSpaceManager {
143
143
 
144
144
  const automergeRoot = this._automergeHost.repo.create();
145
145
  automergeRoot.change((doc: any) => {
146
- doc.experimental_spaceKey = spaceKey.toHex();
146
+ doc.access = { spaceKey: spaceKey.toHex() };
147
147
  });
148
148
 
149
149
  const space = await this._constructSpace(metadata);
@@ -391,9 +391,9 @@ export class DataSpace {
391
391
  }
392
392
 
393
393
  const doc = handle.docSync() ?? failedInvariant();
394
- if (!doc.experimental_spaceKey) {
394
+ if (!doc.access?.spaceKey) {
395
395
  handle.change((doc: any) => {
396
- doc.experimental_spaceKey = this.key.toHex();
396
+ doc.access = { spaceKey: this.key.toHex() };
397
397
  });
398
398
  }
399
399
  } catch (err) {
package/src/version.ts CHANGED
@@ -1,5 +1 @@
1
- //
2
- // Copyright 2023 DXOS.org
3
- //
4
-
5
- export const DXOS_VERSION = '0.4.4'; // {x-release-please-version}
1
+ export const DXOS_VERSION = "0.4.5-main.60c9234";