@dxos/client-services 0.6.1 → 0.6.2-main.8a232a5

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.
@@ -30,7 +30,7 @@ __export(testing_exports, {
30
30
  sanitizeInvitation: () => sanitizeInvitation
31
31
  });
32
32
  module.exports = __toCommonJS(testing_exports);
33
- var import_chunk_EPLLMAYG = require("../../chunk-EPLLMAYG.cjs");
33
+ var import_chunk_OLPYDKZW = require("../../chunk-OLPYDKZW.cjs");
34
34
  var import_credentials = require("@dxos/credentials");
35
35
  var import_keys = require("@dxos/keys");
36
36
  var import_async = require("@dxos/async");
@@ -227,7 +227,7 @@ var createInvitation = async (host, options) => {
227
227
  authMethod: import_services.Invitation.AuthMethod.NONE,
228
228
  ...options ?? {}
229
229
  };
230
- if (host instanceof import_chunk_EPLLMAYG.ServiceContext) {
230
+ if (host instanceof import_chunk_OLPYDKZW.ServiceContext) {
231
231
  return host.invitationsManager.createInvitation({
232
232
  kind: import_services.Invitation.Kind.SPACE,
233
233
  ...options
@@ -237,7 +237,7 @@ var createInvitation = async (host, options) => {
237
237
  };
238
238
  var acceptInvitation = (guest, invitation, guestDeviceProfile) => {
239
239
  invitation = sanitizeInvitation(invitation);
240
- if (guest instanceof import_chunk_EPLLMAYG.ServiceContext) {
240
+ if (guest instanceof import_chunk_OLPYDKZW.ServiceContext) {
241
241
  return guest.invitationsManager.acceptInvitation({
242
242
  invitation,
243
243
  deviceProfile: guestDeviceProfile
@@ -247,7 +247,7 @@ var acceptInvitation = (guest, invitation, guestDeviceProfile) => {
247
247
  };
248
248
  var __dxlog_file2 = "/home/runner/work/dxos/dxos/packages/sdk/client-services/src/packlets/testing/test-builder.ts";
249
249
  var createServiceHost = (config, signalManagerContext) => {
250
- return new import_chunk_EPLLMAYG.ClientServicesHost({
250
+ return new import_chunk_OLPYDKZW.ClientServicesHost({
251
251
  config,
252
252
  signalManager: new import_messaging.MemorySignalManager(signalManagerContext),
253
253
  transportFactory: import_network_manager.MemoryTransportFactory
@@ -263,7 +263,7 @@ var createServiceContext = async ({ signalContext = new import_messaging.MemoryS
263
263
  });
264
264
  const level = (0, import_testing.createTestLevel)();
265
265
  await level.open();
266
- return new import_chunk_EPLLMAYG.ServiceContext(storage, level, networkManager, signalManager, {
266
+ return new import_chunk_OLPYDKZW.ServiceContext(storage, level, networkManager, signalManager, {
267
267
  invitationConnectionDefaultParams: {
268
268
  controlHeartbeatInterval: 200
269
269
  },
@@ -370,12 +370,12 @@ var TestPeer = class {
370
370
  });
371
371
  }
372
372
  get dataSpaceManager() {
373
- return this._props.dataSpaceManager ??= new import_chunk_EPLLMAYG.DataSpaceManager(this.spaceManager, this.metadataStore, this.keyring, this.identity, this.feedStore, this.echoHost, this.invitationsManager, this._opts.dataSpaceParams);
373
+ return this._props.dataSpaceManager ??= new import_chunk_OLPYDKZW.DataSpaceManager(this.spaceManager, this.metadataStore, this.keyring, this.identity, this.feedStore, this.echoHost, this.invitationsManager, this._opts.dataSpaceParams);
374
374
  }
375
375
  get invitationsManager() {
376
- return this._props.invitationsManager ??= new import_chunk_EPLLMAYG.InvitationsManager(new import_chunk_EPLLMAYG.InvitationsHandler(this.networkManager), (invitation) => {
376
+ return this._props.invitationsManager ??= new import_chunk_OLPYDKZW.InvitationsManager(new import_chunk_OLPYDKZW.InvitationsHandler(this.networkManager), (invitation) => {
377
377
  if (invitation.kind === import_services2.Invitation.Kind.SPACE) {
378
- return new import_chunk_EPLLMAYG.SpaceInvitationProtocol(this.dataSpaceManager, this.identity, this.keyring, invitation.spaceKey);
378
+ return new import_chunk_OLPYDKZW.SpaceInvitationProtocol(this.dataSpaceManager, this.identity, this.keyring, invitation.spaceKey);
379
379
  } else {
380
380
  throw new Error("not implemented");
381
381
  }
@@ -1,2 +1,2 @@
1
- export declare const DXOS_VERSION = "0.6.1";
1
+ export declare const DXOS_VERSION = "0.6.2-main.8a232a5";
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.6.1",
3
+ "version": "0.6.2-main.8a232a5",
4
4
  "description": "DXOS client services implementation",
5
5
  "homepage": "https://dxos.org",
6
6
  "bugs": "https://github.com/dxos/dxos/issues",
@@ -23,45 +23,45 @@
23
23
  ],
24
24
  "dependencies": {
25
25
  "platform": "^1.3.6",
26
- "@dxos/async": "0.6.1",
27
- "@dxos/automerge": "0.6.1",
28
- "@dxos/codec-protobuf": "0.6.1",
29
- "@dxos/client-protocol": "0.6.1",
30
- "@dxos/config": "0.6.1",
31
- "@dxos/context": "0.6.1",
32
- "@dxos/crypto": "0.6.1",
33
- "@dxos/credentials": "0.6.1",
34
- "@dxos/echo-db": "0.6.1",
35
- "@dxos/debug": "0.6.1",
36
- "@dxos/echo-pipeline": "0.6.1",
37
- "@dxos/echo-schema": "0.6.1",
38
- "@dxos/echo-protocol": "0.6.1",
39
- "@dxos/feed-store": "0.6.1",
40
- "@dxos/indexing": "0.6.1",
41
- "@dxos/invariant": "0.6.1",
42
- "@dxos/keys": "0.6.1",
43
- "@dxos/keyring": "0.6.1",
44
- "@dxos/kv-store": "0.6.1",
45
- "@dxos/lock-file": "0.6.1",
46
- "@dxos/log": "0.6.1",
47
- "@dxos/network-manager": "0.6.1",
48
- "@dxos/node-std": "0.6.1",
49
- "@dxos/protocols": "0.6.1",
50
- "@dxos/messaging": "0.6.1",
51
- "@dxos/random-access-storage": "0.6.1",
52
- "@dxos/rpc": "0.6.1",
53
- "@dxos/teleport": "0.6.1",
54
- "@dxos/teleport-extension-gossip": "0.6.1",
55
- "@dxos/timeframe": "0.6.1",
56
- "@dxos/tracing": "0.6.1",
57
- "@dxos/teleport-extension-object-sync": "0.6.1",
58
- "@dxos/util": "0.6.1",
59
- "@dxos/websocket-rpc": "0.6.1"
26
+ "@dxos/async": "0.6.2-main.8a232a5",
27
+ "@dxos/automerge": "0.6.2-main.8a232a5",
28
+ "@dxos/client-protocol": "0.6.2-main.8a232a5",
29
+ "@dxos/codec-protobuf": "0.6.2-main.8a232a5",
30
+ "@dxos/context": "0.6.2-main.8a232a5",
31
+ "@dxos/credentials": "0.6.2-main.8a232a5",
32
+ "@dxos/crypto": "0.6.2-main.8a232a5",
33
+ "@dxos/config": "0.6.2-main.8a232a5",
34
+ "@dxos/debug": "0.6.2-main.8a232a5",
35
+ "@dxos/echo-pipeline": "0.6.2-main.8a232a5",
36
+ "@dxos/echo-db": "0.6.2-main.8a232a5",
37
+ "@dxos/echo-protocol": "0.6.2-main.8a232a5",
38
+ "@dxos/echo-schema": "0.6.2-main.8a232a5",
39
+ "@dxos/feed-store": "0.6.2-main.8a232a5",
40
+ "@dxos/indexing": "0.6.2-main.8a232a5",
41
+ "@dxos/invariant": "0.6.2-main.8a232a5",
42
+ "@dxos/keys": "0.6.2-main.8a232a5",
43
+ "@dxos/keyring": "0.6.2-main.8a232a5",
44
+ "@dxos/kv-store": "0.6.2-main.8a232a5",
45
+ "@dxos/log": "0.6.2-main.8a232a5",
46
+ "@dxos/messaging": "0.6.2-main.8a232a5",
47
+ "@dxos/network-manager": "0.6.2-main.8a232a5",
48
+ "@dxos/lock-file": "0.6.2-main.8a232a5",
49
+ "@dxos/node-std": "0.6.2-main.8a232a5",
50
+ "@dxos/protocols": "0.6.2-main.8a232a5",
51
+ "@dxos/random-access-storage": "0.6.2-main.8a232a5",
52
+ "@dxos/teleport": "0.6.2-main.8a232a5",
53
+ "@dxos/rpc": "0.6.2-main.8a232a5",
54
+ "@dxos/teleport-extension-gossip": "0.6.2-main.8a232a5",
55
+ "@dxos/teleport-extension-object-sync": "0.6.2-main.8a232a5",
56
+ "@dxos/timeframe": "0.6.2-main.8a232a5",
57
+ "@dxos/tracing": "0.6.2-main.8a232a5",
58
+ "@dxos/util": "0.6.2-main.8a232a5",
59
+ "@dxos/websocket-rpc": "0.6.2-main.8a232a5"
60
60
  },
61
61
  "devDependencies": {
62
62
  "@types/platform": "^1.3.4",
63
63
  "@types/readable-stream": "^2.3.9",
64
- "@dxos/signal": "0.6.1"
64
+ "@dxos/signal": "0.6.2-main.8a232a5"
65
65
  },
66
66
  "publishConfig": {
67
67
  "access": "public"
@@ -5,12 +5,11 @@
5
5
  import { expect } from 'chai';
6
6
 
7
7
  import { asyncTimeout } from '@dxos/async';
8
- import { getHeads } from '@dxos/automerge/automerge';
9
8
  import { AutomergeContext } from '@dxos/echo-db';
10
9
  import { AutomergeHost, DataServiceImpl } from '@dxos/echo-pipeline';
11
10
  import { IndexMetadataStore } from '@dxos/indexing';
12
11
  import { createTestLevel } from '@dxos/kv-store/testing';
13
- import { afterTest, describe, test } from '@dxos/test';
12
+ import { afterTest, describe, openAndClose, test } from '@dxos/test';
14
13
 
15
14
  describe('AutomergeHost', () => {
16
15
  test('automerge context is being synced with host', async () => {
@@ -34,7 +33,7 @@ describe('AutomergeHost', () => {
34
33
 
35
34
  const dataService = new DataServiceImpl({ automergeHost: host, updateIndexes: async () => {} });
36
35
  const client = new AutomergeContext(dataService);
37
- afterTest(() => client.close());
36
+ await openAndClose(client);
38
37
 
39
38
  // Create document in repo.
40
39
  const handle = host.repo.create();
@@ -44,7 +43,7 @@ describe('AutomergeHost', () => {
44
43
  });
45
44
 
46
45
  // Find document in repo.
47
- const doc = client.repo.find(handle.url);
46
+ const doc = client.repo.find<{ text: string }>(handle.url);
48
47
  await asyncTimeout(doc.whenReady(), 1_000);
49
48
  expect(doc.docSync().text).to.equal(text);
50
49
 
@@ -53,7 +52,7 @@ describe('AutomergeHost', () => {
53
52
  doc.change((doc: any) => {
54
53
  doc.text = newText;
55
54
  });
56
- await client.flush({ states: [{ documentId: doc.documentId, heads: getHeads(doc.docSync()) }] });
55
+ await client.flush({ documentIds: [doc.documentId] });
57
56
 
58
57
  await asyncTimeout(handle.whenReady(), 1_000);
59
58
  expect(handle.docSync().text).to.equal(newText);
package/src/version.ts CHANGED
@@ -1,5 +1 @@
1
- //
2
- // Copyright 2023 DXOS.org
3
- //
4
-
5
- export const DXOS_VERSION = '0.6.1'; // {x-release-please-version}
1
+ export const DXOS_VERSION = "0.6.2-main.8a232a5";