@dxos/client-services 0.5.1-main.39e0ee2 → 0.5.1-main.3ccf9bd

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_TQ5236LO = require("../../chunk-TQ5236LO.cjs");
33
+ var import_chunk_5A26GOSD = require("../../chunk-5A26GOSD.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_TQ5236LO.ServiceContext) {
230
+ if (host instanceof import_chunk_5A26GOSD.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_TQ5236LO.ServiceContext) {
240
+ if (guest instanceof import_chunk_5A26GOSD.ServiceContext) {
241
241
  return guest.invitationsManager.acceptInvitation({
242
242
  invitation,
243
243
  deviceProfile: guestDeviceProfile
@@ -246,7 +246,7 @@ var acceptInvitation = (guest, invitation, guestDeviceProfile) => {
246
246
  return guest.join(invitation, guestDeviceProfile);
247
247
  };
248
248
  var createServiceHost = (config, signalManagerContext) => {
249
- return new import_chunk_TQ5236LO.ClientServicesHost({
249
+ return new import_chunk_5A26GOSD.ClientServicesHost({
250
250
  config,
251
251
  signalManager: new import_messaging.MemorySignalManager(signalManagerContext),
252
252
  transportFactory: import_network_manager.MemoryTransportFactory
@@ -262,7 +262,7 @@ var createServiceContext = async ({ signalContext = new import_messaging.MemoryS
262
262
  });
263
263
  const level = (0, import_testing.createTestLevel)();
264
264
  await level.open();
265
- return new import_chunk_TQ5236LO.ServiceContext(storage, level, networkManager, signalManager, {
265
+ return new import_chunk_5A26GOSD.ServiceContext(storage, level, networkManager, signalManager, {
266
266
  invitationConnectionDefaultParams: {
267
267
  controlHeartbeatInterval: 200
268
268
  }
@@ -363,12 +363,12 @@ var TestPeer = class {
363
363
  });
364
364
  }
365
365
  get dataSpaceManager() {
366
- return this._props.dataSpaceManager ??= new import_chunk_TQ5236LO.DataSpaceManager(this.spaceManager, this.metadataStore, this.keyring, this.identity, this.feedStore, this.echoHost, this.invitationsManager);
366
+ return this._props.dataSpaceManager ??= new import_chunk_5A26GOSD.DataSpaceManager(this.spaceManager, this.metadataStore, this.keyring, this.identity, this.feedStore, this.echoHost, this.invitationsManager);
367
367
  }
368
368
  get invitationsManager() {
369
- return this._props.invitationsManager ??= new import_chunk_TQ5236LO.InvitationsManager(new import_chunk_TQ5236LO.InvitationsHandler(this.networkManager), (invitation) => {
369
+ return this._props.invitationsManager ??= new import_chunk_5A26GOSD.InvitationsManager(new import_chunk_5A26GOSD.InvitationsHandler(this.networkManager), (invitation) => {
370
370
  if (invitation.kind === import_services2.Invitation.Kind.SPACE) {
371
- return new import_chunk_TQ5236LO.SpaceInvitationProtocol(this.dataSpaceManager, this.identity, this.keyring, invitation.spaceKey);
371
+ return new import_chunk_5A26GOSD.SpaceInvitationProtocol(this.dataSpaceManager, this.identity, this.keyring, invitation.spaceKey);
372
372
  } else {
373
373
  throw new Error("not implemented");
374
374
  }
@@ -1,7 +1,7 @@
1
1
  import { Event } from '@dxos/async';
2
2
  import { type ShellRuntime } from '@dxos/client-protocol';
3
3
  import { type PublicKey } from '@dxos/keys';
4
- import { type AppContextRequest, type LayoutRequest, ShellLayout, type InvitationUrlRequest } from '@dxos/protocols/proto/dxos/iframe';
4
+ import { type AppContextRequest, type LayoutRequest, ShellLayout } from '@dxos/protocols/proto/dxos/iframe';
5
5
  import { type RpcPort } from '@dxos/rpc';
6
6
  /**
7
7
  * Endpoint that handles shell services.
@@ -9,23 +9,15 @@ import { type RpcPort } from '@dxos/rpc';
9
9
  export declare class ShellRuntimeImpl implements ShellRuntime {
10
10
  private readonly _port;
11
11
  readonly layoutUpdate: Event<LayoutRequest>;
12
- readonly invitationUrlUpdate: Event<InvitationUrlRequest>;
13
12
  private _appRpc?;
14
13
  private _layout;
15
- private _spaceKey?;
16
14
  private _invitationCode?;
17
- private _invitationUrl?;
18
- private _deviceInvitationParam;
19
- private _spaceInvitationParam;
15
+ private _spaceKey?;
20
16
  constructor(_port: RpcPort);
21
17
  get layout(): ShellLayout;
22
18
  get invitationCode(): string | undefined;
23
19
  get spaceKey(): PublicKey | undefined;
24
- get invitationUrl(): string;
25
- get deviceInvitationParam(): string;
26
- get spaceInvitationParam(): string;
27
20
  setLayout({ layout, invitationCode, spaceKey }: LayoutRequest): void;
28
- setInvitationUrl({ invitationUrl, deviceInvitationParam, spaceInvitationParam }: InvitationUrlRequest): void;
29
21
  setAppContext(context: AppContextRequest): Promise<void>;
30
22
  open(): Promise<void>;
31
23
  close(): Promise<void>;
@@ -1 +1 @@
1
- {"version":3,"file":"shell-runtime.d.ts","sourceRoot":"","sources":["../../../../../src/packlets/vault/shell-runtime.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AACpC,OAAO,EAA2C,KAAK,YAAY,EAAsB,MAAM,uBAAuB,CAAC;AAEvH,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,YAAY,CAAC;AAC5C,OAAO,EACL,KAAK,iBAAiB,EACtB,KAAK,aAAa,EAClB,WAAW,EACX,KAAK,oBAAoB,EAC1B,MAAM,mCAAmC,CAAC;AAC3C,OAAO,EAAyC,KAAK,OAAO,EAAE,MAAM,WAAW,CAAC;AAEhF;;GAEG;AACH,qBAAa,gBAAiB,YAAW,YAAY;IAevC,OA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CAAC,KAAK;IANlC,QAAQ,CAAC,YAAY,uBAA8B;IACnD,OAAO,CAAC,OAAO,CAAC,CAAiC;IACjD,OAAO,CAAC,OAAO,CAAuB;IACtC,OAAO,CAAC,eAAe,CAAC,CAAS;IACjC,OAAO,CAAC,SAAS,CAAC,CAAY;gBAED,KAAK,EAAE,OAAO;IAE3C,IAAI,MAAM,gBAET;IAED,IAAI,cAAc,uBAEjB;IAED,IAAI,QAAQ,0BAEX;IAED,SAAS,CAAC,EAAE,MAAM,EAAE,cAAc,EAAE,QAAQ,EAAE,EAAE,aAAa;IAOvD,aAAa,CAAC,OAAO,EAAE,iBAAiB;IAMxC,IAAI;IAoBJ,KAAK;CAIZ"}
@@ -1,2 +1,2 @@
1
- export declare const DXOS_VERSION = "0.5.1-main.39e0ee2";
1
+ export declare const DXOS_VERSION = "0.5.1-main.3ccf9bd";
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.5.1-main.39e0ee2",
3
+ "version": "0.5.1-main.3ccf9bd",
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.5.1-main.39e0ee2",
27
- "@dxos/automerge": "0.5.1-main.39e0ee2",
28
- "@dxos/client-protocol": "0.5.1-main.39e0ee2",
29
- "@dxos/context": "0.5.1-main.39e0ee2",
30
- "@dxos/codec-protobuf": "0.5.1-main.39e0ee2",
31
- "@dxos/credentials": "0.5.1-main.39e0ee2",
32
- "@dxos/config": "0.5.1-main.39e0ee2",
33
- "@dxos/debug": "0.5.1-main.39e0ee2",
34
- "@dxos/crypto": "0.5.1-main.39e0ee2",
35
- "@dxos/echo-db": "0.5.1-main.39e0ee2",
36
- "@dxos/echo-pipeline": "0.5.1-main.39e0ee2",
37
- "@dxos/echo-protocol": "0.5.1-main.39e0ee2",
38
- "@dxos/feed-store": "0.5.1-main.39e0ee2",
39
- "@dxos/echo-schema": "0.5.1-main.39e0ee2",
40
- "@dxos/indexing": "0.5.1-main.39e0ee2",
41
- "@dxos/keyring": "0.5.1-main.39e0ee2",
42
- "@dxos/keys": "0.5.1-main.39e0ee2",
43
- "@dxos/invariant": "0.5.1-main.39e0ee2",
44
- "@dxos/lock-file": "0.5.1-main.39e0ee2",
45
- "@dxos/kv-store": "0.5.1-main.39e0ee2",
46
- "@dxos/log": "0.5.1-main.39e0ee2",
47
- "@dxos/messaging": "0.5.1-main.39e0ee2",
48
- "@dxos/network-manager": "0.5.1-main.39e0ee2",
49
- "@dxos/random-access-storage": "0.5.1-main.39e0ee2",
50
- "@dxos/node-std": "0.5.1-main.39e0ee2",
51
- "@dxos/protocols": "0.5.1-main.39e0ee2",
52
- "@dxos/rpc": "0.5.1-main.39e0ee2",
53
- "@dxos/teleport": "0.5.1-main.39e0ee2",
54
- "@dxos/teleport-extension-gossip": "0.5.1-main.39e0ee2",
55
- "@dxos/teleport-extension-object-sync": "0.5.1-main.39e0ee2",
56
- "@dxos/timeframe": "0.5.1-main.39e0ee2",
57
- "@dxos/tracing": "0.5.1-main.39e0ee2",
58
- "@dxos/util": "0.5.1-main.39e0ee2",
59
- "@dxos/websocket-rpc": "0.5.1-main.39e0ee2"
26
+ "@dxos/async": "0.5.1-main.3ccf9bd",
27
+ "@dxos/automerge": "0.5.1-main.3ccf9bd",
28
+ "@dxos/config": "0.5.1-main.3ccf9bd",
29
+ "@dxos/codec-protobuf": "0.5.1-main.3ccf9bd",
30
+ "@dxos/client-protocol": "0.5.1-main.3ccf9bd",
31
+ "@dxos/context": "0.5.1-main.3ccf9bd",
32
+ "@dxos/credentials": "0.5.1-main.3ccf9bd",
33
+ "@dxos/crypto": "0.5.1-main.3ccf9bd",
34
+ "@dxos/debug": "0.5.1-main.3ccf9bd",
35
+ "@dxos/echo-db": "0.5.1-main.3ccf9bd",
36
+ "@dxos/echo-pipeline": "0.5.1-main.3ccf9bd",
37
+ "@dxos/echo-protocol": "0.5.1-main.3ccf9bd",
38
+ "@dxos/echo-schema": "0.5.1-main.3ccf9bd",
39
+ "@dxos/feed-store": "0.5.1-main.3ccf9bd",
40
+ "@dxos/indexing": "0.5.1-main.3ccf9bd",
41
+ "@dxos/invariant": "0.5.1-main.3ccf9bd",
42
+ "@dxos/keyring": "0.5.1-main.3ccf9bd",
43
+ "@dxos/keys": "0.5.1-main.3ccf9bd",
44
+ "@dxos/kv-store": "0.5.1-main.3ccf9bd",
45
+ "@dxos/lock-file": "0.5.1-main.3ccf9bd",
46
+ "@dxos/log": "0.5.1-main.3ccf9bd",
47
+ "@dxos/messaging": "0.5.1-main.3ccf9bd",
48
+ "@dxos/node-std": "0.5.1-main.3ccf9bd",
49
+ "@dxos/protocols": "0.5.1-main.3ccf9bd",
50
+ "@dxos/random-access-storage": "0.5.1-main.3ccf9bd",
51
+ "@dxos/network-manager": "0.5.1-main.3ccf9bd",
52
+ "@dxos/teleport": "0.5.1-main.3ccf9bd",
53
+ "@dxos/rpc": "0.5.1-main.3ccf9bd",
54
+ "@dxos/teleport-extension-gossip": "0.5.1-main.3ccf9bd",
55
+ "@dxos/teleport-extension-object-sync": "0.5.1-main.3ccf9bd",
56
+ "@dxos/timeframe": "0.5.1-main.3ccf9bd",
57
+ "@dxos/tracing": "0.5.1-main.3ccf9bd",
58
+ "@dxos/websocket-rpc": "0.5.1-main.3ccf9bd",
59
+ "@dxos/util": "0.5.1-main.3ccf9bd"
60
60
  },
61
61
  "devDependencies": {
62
62
  "@types/platform": "^1.3.4",
63
63
  "@types/readable-stream": "^2.3.9",
64
- "@dxos/signal": "0.5.1-main.39e0ee2"
64
+ "@dxos/signal": "0.5.1-main.3ccf9bd"
65
65
  },
66
66
  "publishConfig": {
67
67
  "access": "public"
@@ -6,12 +6,7 @@ import { Event } from '@dxos/async';
6
6
  import { appServiceBundle, type AppServiceBundle, type ShellRuntime, shellServiceBundle } from '@dxos/client-protocol';
7
7
  import { invariant } from '@dxos/invariant';
8
8
  import { type PublicKey } from '@dxos/keys';
9
- import {
10
- type AppContextRequest,
11
- type LayoutRequest,
12
- ShellLayout,
13
- type InvitationUrlRequest,
14
- } from '@dxos/protocols/proto/dxos/iframe';
9
+ import { type AppContextRequest, type LayoutRequest, ShellLayout } from '@dxos/protocols/proto/dxos/iframe';
15
10
  import { createProtoRpcPeer, type ProtoRpcPeer, type RpcPort } from '@dxos/rpc';
16
11
 
17
12
  /**
@@ -19,18 +14,10 @@ import { createProtoRpcPeer, type ProtoRpcPeer, type RpcPort } from '@dxos/rpc';
19
14
  */
20
15
  export class ShellRuntimeImpl implements ShellRuntime {
21
16
  readonly layoutUpdate = new Event<LayoutRequest>();
22
- readonly invitationUrlUpdate = new Event<InvitationUrlRequest>();
23
-
24
17
  private _appRpc?: ProtoRpcPeer<AppServiceBundle>;
25
18
  private _layout = ShellLayout.DEFAULT;
26
- private _spaceKey?: PublicKey;
27
-
28
19
  private _invitationCode?: string;
29
- private _invitationUrl? = typeof window !== 'undefined' ? window.location.origin : undefined;
30
-
31
- // TODO(burdon): Change to using underscores (coordinate with @dxos/web-auth).
32
- private _deviceInvitationParam = 'deviceInvitationCode'; // TODO(burdon): device_invitation_code
33
- private _spaceInvitationParam = 'spaceInvitationCode'; // TODO(burdon): space_invitation_code
20
+ private _spaceKey?: PublicKey;
34
21
 
35
22
  constructor(private readonly _port: RpcPort) {}
36
23
 
@@ -46,18 +33,6 @@ export class ShellRuntimeImpl implements ShellRuntime {
46
33
  return this._spaceKey;
47
34
  }
48
35
 
49
- get invitationUrl() {
50
- return this._invitationUrl!;
51
- }
52
-
53
- get deviceInvitationParam() {
54
- return this._deviceInvitationParam;
55
- }
56
-
57
- get spaceInvitationParam() {
58
- return this._spaceInvitationParam;
59
- }
60
-
61
36
  setLayout({ layout, invitationCode, spaceKey }: LayoutRequest) {
62
37
  this._layout = layout;
63
38
  this._invitationCode = invitationCode;
@@ -65,13 +40,6 @@ export class ShellRuntimeImpl implements ShellRuntime {
65
40
  this.layoutUpdate.emit({ layout, invitationCode, spaceKey });
66
41
  }
67
42
 
68
- setInvitationUrl({ invitationUrl, deviceInvitationParam, spaceInvitationParam }: InvitationUrlRequest) {
69
- this._invitationUrl = invitationUrl;
70
- this._deviceInvitationParam = deviceInvitationParam;
71
- this._spaceInvitationParam = spaceInvitationParam;
72
- this.invitationUrlUpdate.emit({ invitationUrl, deviceInvitationParam, spaceInvitationParam });
73
- }
74
-
75
43
  async setAppContext(context: AppContextRequest) {
76
44
  invariant(this._appRpc, 'runtime not open');
77
45
 
@@ -90,12 +58,6 @@ export class ShellRuntimeImpl implements ShellRuntime {
90
58
  this._spaceKey = request.spaceKey;
91
59
  this.layoutUpdate.emit(request);
92
60
  },
93
- setInvitationUrl: async (request) => {
94
- this._invitationUrl = request.invitationUrl;
95
- this._deviceInvitationParam = request.deviceInvitationParam;
96
- this._spaceInvitationParam = request.spaceInvitationParam;
97
- this.invitationUrlUpdate.emit(request);
98
- },
99
61
  },
100
62
  },
101
63
  port: this._port,
package/src/version.ts CHANGED
@@ -1 +1 @@
1
- export const DXOS_VERSION = "0.5.1-main.39e0ee2";
1
+ export const DXOS_VERSION = "0.5.1-main.3ccf9bd";