@dxos/client-services 0.1.50-next.53f1631 → 0.1.50

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.
@@ -2130,7 +2130,7 @@ var SpaceInvitationProtocol = class {
2130
2130
  // packages/sdk/client-services/src/packlets/services/service-host.ts
2131
2131
  var import_node_assert12 = __toESM(require("node:assert"));
2132
2132
  var import_async18 = require("@dxos/async");
2133
- var import_client_protocol4 = require("@dxos/client-protocol");
2133
+ var import_client_protocol5 = require("@dxos/client-protocol");
2134
2134
  var import_echo_pipeline4 = require("@dxos/echo-pipeline");
2135
2135
  var import_keys11 = require("@dxos/keys");
2136
2136
  var import_log15 = require("@dxos/log");
@@ -3339,12 +3339,14 @@ var SpacesServiceImpl = class {
3339
3339
  var getChannelId = (channel) => `user-channel/${channel}`;
3340
3340
 
3341
3341
  // packages/sdk/client-services/src/packlets/storage/storage.ts
3342
+ var import_client_protocol4 = require("@dxos/client-protocol");
3342
3343
  var import_errors4 = require("@dxos/errors");
3343
3344
  var import_config = require("@dxos/protocols/proto/dxos/config");
3344
3345
  var import_random_access_storage = require("@dxos/random-access-storage");
3346
+ var import_util8 = require("@dxos/util");
3345
3347
  var StorageDriver = import_config.Runtime.Client.Storage.StorageDriver;
3346
3348
  var createStorageObjects = (config) => {
3347
- const { path = "dxos/storage", storageType, keyStorage, persistent = false } = config != null ? config : {};
3349
+ const { path = (0, import_util8.isNode)() ? import_client_protocol4.DX_DATA : "dxos/storage", storageType, keyStorage, persistent = false } = config != null ? config : {};
3348
3350
  if (persistent && storageType === StorageDriver.RAM) {
3349
3351
  throw new import_errors4.InvalidConfigError("RAM storage cannot be used in persistent mode.");
3350
3352
  }
@@ -3670,7 +3672,7 @@ var ServiceRegistry = class {
3670
3672
  var ClientServicesHost = class {
3671
3673
  constructor({
3672
3674
  config,
3673
- modelFactory = (0, import_client_protocol4.createDefaultModelFactory)(),
3675
+ modelFactory = (0, import_client_protocol5.createDefaultModelFactory)(),
3674
3676
  // TODO(burdon): Create ApolloLink abstraction (see Client).
3675
3677
  transportFactory,
3676
3678
  signalManager,
@@ -3719,7 +3721,7 @@ var ClientServicesHost = class {
3719
3721
  }
3720
3722
  });
3721
3723
  this._loggingService = new LoggingServiceImpl();
3722
- this._serviceRegistry = new ServiceRegistry(import_client_protocol4.clientServiceBundle, {
3724
+ this._serviceRegistry = new ServiceRegistry(import_client_protocol5.clientServiceBundle, {
3723
3725
  SystemService: this._systemService
3724
3726
  });
3725
3727
  }
@@ -3922,11 +3924,11 @@ var LocalClientServices = class {
3922
3924
 
3923
3925
  // packages/sdk/client-services/src/packlets/vault/iframe-host-runtime.ts
3924
3926
  var import_async20 = require("@dxos/async");
3925
- var import_client_protocol6 = require("@dxos/client-protocol");
3927
+ var import_client_protocol7 = require("@dxos/client-protocol");
3926
3928
  var import_log16 = require("@dxos/log");
3927
3929
  var import_messaging2 = require("@dxos/messaging");
3928
3930
  var import_network_manager3 = require("@dxos/network-manager");
3929
- var import_util8 = require("@dxos/util");
3931
+ var import_util9 = require("@dxos/util");
3930
3932
 
3931
3933
  // packages/sdk/client-services/src/packlets/services/client-rpc-server.ts
3932
3934
  var import_codec_protobuf14 = require("@dxos/codec-protobuf");
@@ -3984,7 +3986,7 @@ var ClientRpcServer = class {
3984
3986
  // packages/sdk/client-services/src/packlets/vault/shell-runtime.ts
3985
3987
  var import_node_assert13 = __toESM(require("node:assert"));
3986
3988
  var import_async19 = require("@dxos/async");
3987
- var import_client_protocol5 = require("@dxos/client-protocol");
3989
+ var import_client_protocol6 = require("@dxos/client-protocol");
3988
3990
  var import_iframe = require("@dxos/protocols/proto/dxos/iframe");
3989
3991
  var import_rpc2 = require("@dxos/rpc");
3990
3992
  var ShellRuntimeImpl = class {
@@ -4017,8 +4019,8 @@ var ShellRuntimeImpl = class {
4017
4019
  }
4018
4020
  async open() {
4019
4021
  this._appRpc = (0, import_rpc2.createProtoRpcPeer)({
4020
- requested: import_client_protocol5.appServiceBundle,
4021
- exposed: import_client_protocol5.shellServiceBundle,
4022
+ requested: import_client_protocol6.appServiceBundle,
4023
+ exposed: import_client_protocol6.shellServiceBundle,
4022
4024
  handlers: {
4023
4025
  ShellService: {
4024
4026
  setLayout: async (request) => {
@@ -4108,7 +4110,7 @@ var IFrameHostRuntime = class {
4108
4110
  callSite: (f, a) => f(...a)
4109
4111
  });
4110
4112
  try {
4111
- this._config = await (0, import_util8.getAsyncValue)(this._configProvider);
4113
+ this._config = await (0, import_util9.getAsyncValue)(this._configProvider);
4112
4114
  this._transportFactory = (0, import_network_manager3.createWebRTCTransportFactory)({
4113
4115
  iceServers: this._config.get("runtime.services.ice")
4114
4116
  });
@@ -4122,7 +4124,7 @@ var IFrameHostRuntime = class {
4122
4124
  const middleware = {
4123
4125
  handleCall: async (method, params, handler) => {
4124
4126
  const error = await this._ready.wait({
4125
- timeout: import_client_protocol6.PROXY_CONNECTION_TIMEOUT
4127
+ timeout: import_client_protocol7.PROXY_CONNECTION_TIMEOUT
4126
4128
  });
4127
4129
  if (error) {
4128
4130
  throw error;
@@ -4131,7 +4133,7 @@ var IFrameHostRuntime = class {
4131
4133
  },
4132
4134
  handleStream: async (method, params, handler) => {
4133
4135
  const error = await this._ready.wait({
4134
- timeout: import_client_protocol6.PROXY_CONNECTION_TIMEOUT
4136
+ timeout: import_client_protocol7.PROXY_CONNECTION_TIMEOUT
4135
4137
  });
4136
4138
  if (error) {
4137
4139
  throw error;
@@ -4191,12 +4193,12 @@ __decorate4([
4191
4193
 
4192
4194
  // packages/sdk/client-services/src/packlets/vault/iframe-proxy-runtime.ts
4193
4195
  var import_async21 = require("@dxos/async");
4194
- var import_client_protocol7 = require("@dxos/client-protocol");
4196
+ var import_client_protocol8 = require("@dxos/client-protocol");
4195
4197
  var import_errors5 = require("@dxos/errors");
4196
4198
  var import_log17 = require("@dxos/log");
4197
4199
  var import_network_manager4 = require("@dxos/network-manager");
4198
4200
  var import_rpc3 = require("@dxos/rpc");
4199
- var import_util9 = require("@dxos/util");
4201
+ var import_util10 = require("@dxos/util");
4200
4202
  var IFrameProxyRuntime = class {
4201
4203
  constructor({ config, systemPort, shellPort }) {
4202
4204
  this._id = String(Math.floor(Math.random() * 1e6));
@@ -4213,13 +4215,13 @@ var IFrameProxyRuntime = class {
4213
4215
  }
4214
4216
  async open(origin) {
4215
4217
  var _a;
4216
- this._config = await (0, import_util9.getAsyncValue)(this._configProvider);
4218
+ this._config = await (0, import_util10.getAsyncValue)(this._configProvider);
4217
4219
  this._transportService = new import_network_manager4.WebRTCTransportService({
4218
4220
  iceServers: this._config.get("runtime.services.ice")
4219
4221
  });
4220
4222
  this._systemRpc = (0, import_rpc3.createProtoRpcPeer)({
4221
- requested: import_client_protocol7.workerServiceBundle,
4222
- exposed: import_client_protocol7.iframeServiceBundle,
4223
+ requested: import_client_protocol8.workerServiceBundle,
4224
+ exposed: import_client_protocol8.iframeServiceBundle,
4223
4225
  handlers: {
4224
4226
  BridgeService: this._transportService
4225
4227
  },
@@ -4275,10 +4277,10 @@ var import_network_manager5 = require("@dxos/network-manager");
4275
4277
  // packages/sdk/client-services/src/packlets/vault/worker-session.ts
4276
4278
  var import_node_assert14 = __toESM(require("node:assert"));
4277
4279
  var import_async22 = require("@dxos/async");
4278
- var import_client_protocol8 = require("@dxos/client-protocol");
4280
+ var import_client_protocol9 = require("@dxos/client-protocol");
4279
4281
  var import_log18 = require("@dxos/log");
4280
4282
  var import_rpc4 = require("@dxos/rpc");
4281
- var import_util10 = require("@dxos/util");
4283
+ var import_util11 = require("@dxos/util");
4282
4284
  var __decorate5 = function(decorators, target, key, desc) {
4283
4285
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4284
4286
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
@@ -4292,13 +4294,13 @@ var __decorate5 = function(decorators, target, key, desc) {
4292
4294
  var WorkerSession = class {
4293
4295
  constructor({ serviceHost, systemPort, appPort, shellPort, readySignal }) {
4294
4296
  this._startTrigger = new import_async22.Trigger();
4295
- this.onClose = new import_util10.Callback();
4297
+ this.onClose = new import_util11.Callback();
4296
4298
  (0, import_node_assert14.default)(serviceHost);
4297
4299
  this._serviceHost = serviceHost;
4298
4300
  const middleware = {
4299
4301
  handleCall: async (method, params, handler) => {
4300
4302
  const error = await readySignal.wait({
4301
- timeout: import_client_protocol8.PROXY_CONNECTION_TIMEOUT
4303
+ timeout: import_client_protocol9.PROXY_CONNECTION_TIMEOUT
4302
4304
  });
4303
4305
  if (error) {
4304
4306
  throw error;
@@ -4307,7 +4309,7 @@ var WorkerSession = class {
4307
4309
  },
4308
4310
  handleStream: async (method, params, handler) => {
4309
4311
  const error = await readySignal.wait({
4310
- timeout: import_client_protocol8.PROXY_CONNECTION_TIMEOUT
4312
+ timeout: import_client_protocol9.PROXY_CONNECTION_TIMEOUT
4311
4313
  });
4312
4314
  if (error) {
4313
4315
  throw error;
@@ -4326,8 +4328,8 @@ var WorkerSession = class {
4326
4328
  ...middleware
4327
4329
  });
4328
4330
  this._iframeRpc = (0, import_rpc4.createProtoRpcPeer)({
4329
- requested: import_client_protocol8.iframeServiceBundle,
4330
- exposed: import_client_protocol8.workerServiceBundle,
4331
+ requested: import_client_protocol9.iframeServiceBundle,
4332
+ exposed: import_client_protocol9.workerServiceBundle,
4331
4333
  handlers: {
4332
4334
  WorkerService: {
4333
4335
  start: async (request) => {
@@ -4369,7 +4371,7 @@ var WorkerSession = class {
4369
4371
  this._maybeOpenShell()
4370
4372
  ]);
4371
4373
  await this._startTrigger.wait({
4372
- timeout: import_client_protocol8.PROXY_CONNECTION_TIMEOUT
4374
+ timeout: import_client_protocol9.PROXY_CONNECTION_TIMEOUT
4373
4375
  });
4374
4376
  if (this.lockKey) {
4375
4377
  void this._afterLockReleases(this.lockKey, () => this.close());