@dxos/client-services 0.3.3-main.44bdbf7 → 0.3.3-main.619fab4

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.
@@ -2420,21 +2420,9 @@ var SpaceInvitationProtocol = class {
2420
2420
  import { Stream as Stream9 } from "@dxos/codec-protobuf";
2421
2421
  import { raise } from "@dxos/debug";
2422
2422
  import { parseMethodName, RpcPeer } from "@dxos/rpc";
2423
- import { MapCounter, trace as trace5 } from "@dxos/tracing";
2424
- function _ts_decorate3(decorators, target, key, desc) {
2425
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
2426
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
2427
- r = Reflect.decorate(decorators, target, key, desc);
2428
- else
2429
- for (var i = decorators.length - 1; i >= 0; i--)
2430
- if (d = decorators[i])
2431
- r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
2432
- return c > 3 && r && Object.defineProperty(target, key, r), r;
2433
- }
2434
- var ClientRpcServer = class ClientRpcServer2 {
2423
+ var ClientRpcServer = class {
2435
2424
  constructor(params) {
2436
2425
  this._handlerCache = /* @__PURE__ */ new Map();
2437
- this._callMetrics = new MapCounter();
2438
2426
  const { serviceRegistry, handleCall, handleStream, ...rpcOptions } = params;
2439
2427
  this._handleCall = handleCall;
2440
2428
  this._handleStream = handleStream;
@@ -2444,7 +2432,6 @@ var ClientRpcServer = class ClientRpcServer2 {
2444
2432
  callHandler: (method, params2) => {
2445
2433
  const [serviceName, methodName] = parseMethodName(method);
2446
2434
  const handler = (method2, params3) => this._getServiceHandler(serviceName).call(method2, params3);
2447
- this._callMetrics.inc(`${serviceName}.${methodName} request`);
2448
2435
  if (this._handleCall) {
2449
2436
  return this._handleCall(methodName, params2, handler);
2450
2437
  } else {
@@ -2454,21 +2441,14 @@ var ClientRpcServer = class ClientRpcServer2 {
2454
2441
  streamHandler: (method, params2) => {
2455
2442
  const [serviceName, methodName] = parseMethodName(method);
2456
2443
  const handler = (method2, params3) => this._getServiceHandler(serviceName).callStream(method2, params3);
2457
- this._callMetrics.inc(`${serviceName}.${methodName} request stream`);
2458
2444
  if (this._handleStream) {
2459
- return Stream9.map(Stream9.unwrapPromise(this._handleStream(methodName, params2, handler)), (data) => {
2460
- this._callMetrics.inc(`${serviceName}.${methodName} response stream`);
2461
- return data;
2462
- });
2445
+ return Stream9.unwrapPromise(this._handleStream(methodName, params2, handler));
2463
2446
  } else {
2464
2447
  return handler(methodName, params2);
2465
2448
  }
2466
2449
  }
2467
2450
  });
2468
2451
  }
2469
- get _services() {
2470
- return Object.keys(this._serviceRegistry.services);
2471
- }
2472
2452
  async open() {
2473
2453
  await this._rpcPeer.open();
2474
2454
  }
@@ -2487,15 +2467,6 @@ var ClientRpcServer = class ClientRpcServer2 {
2487
2467
  return this._handlerCache.get(serviceName);
2488
2468
  }
2489
2469
  };
2490
- _ts_decorate3([
2491
- trace5.metricsCounter()
2492
- ], ClientRpcServer.prototype, "_callMetrics", void 0);
2493
- _ts_decorate3([
2494
- trace5.info()
2495
- ], ClientRpcServer.prototype, "_services", null);
2496
- ClientRpcServer = _ts_decorate3([
2497
- trace5.resource()
2498
- ], ClientRpcServer);
2499
2470
 
2500
2471
  // packages/sdk/client-services/src/packlets/services/diagnostics.ts
2501
2472
  import { Trigger as Trigger4 } from "@dxos/async";
@@ -2537,7 +2508,7 @@ var getPlatform = () => {
2537
2508
  };
2538
2509
 
2539
2510
  // packages/sdk/client-services/src/version.ts
2540
- var DXOS_VERSION = "0.3.3-main.44bdbf7";
2511
+ var DXOS_VERSION = "0.3.3-main.619fab4";
2541
2512
 
2542
2513
  // packages/sdk/client-services/src/packlets/services/diagnostics.ts
2543
2514
  var __dxlog_file10 = "/home/runner/work/dxos/dxos/packages/sdk/client-services/src/packlets/services/diagnostics.ts";
@@ -2682,7 +2653,7 @@ import { CancelledError, SystemError } from "@dxos/protocols";
2682
2653
  import { SpaceState } from "@dxos/protocols/proto/dxos/client/services";
2683
2654
  import { AdmittedFeed as AdmittedFeed3 } from "@dxos/protocols/proto/dxos/halo/credentials";
2684
2655
  import { Timeframe as Timeframe2 } from "@dxos/timeframe";
2685
- import { trace as trace6 } from "@dxos/tracing";
2656
+ import { trace as trace5 } from "@dxos/tracing";
2686
2657
  import { ComplexSet as ComplexSet3 } from "@dxos/util";
2687
2658
 
2688
2659
  // packages/sdk/client-services/src/packlets/spaces/notarization-plugin.ts
@@ -2954,7 +2925,7 @@ var NotarizationTeleportExtension = class extends RpcExtension2 {
2954
2925
  };
2955
2926
 
2956
2927
  // packages/sdk/client-services/src/packlets/spaces/data-space.ts
2957
- function _ts_decorate4(decorators, target, key, desc) {
2928
+ function _ts_decorate3(decorators, target, key, desc) {
2958
2929
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
2959
2930
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
2960
2931
  r = Reflect.decorate(decorators, target, key, desc);
@@ -3286,32 +3257,32 @@ var DataSpace = class DataSpace2 {
3286
3257
  this.stateUpdate.emit();
3287
3258
  }
3288
3259
  };
3289
- _ts_decorate4([
3260
+ _ts_decorate3([
3290
3261
  synchronized
3291
3262
  ], DataSpace.prototype, "open", null);
3292
- _ts_decorate4([
3263
+ _ts_decorate3([
3293
3264
  synchronized
3294
3265
  ], DataSpace.prototype, "close", null);
3295
- _ts_decorate4([
3296
- trace6.span({
3266
+ _ts_decorate3([
3267
+ trace5.span({
3297
3268
  showInBrowserTimeline: true
3298
3269
  })
3299
3270
  ], DataSpace.prototype, "initializeDataPipeline", null);
3300
- _ts_decorate4([
3301
- trace6.span({
3271
+ _ts_decorate3([
3272
+ trace5.span({
3302
3273
  showInBrowserTimeline: true
3303
3274
  })
3304
3275
  ], DataSpace.prototype, "_initializeAndReadControlPipeline", null);
3305
- _ts_decorate4([
3276
+ _ts_decorate3([
3306
3277
  timed(1e4)
3307
3278
  ], DataSpace.prototype, "_createWritableFeeds", null);
3308
- _ts_decorate4([
3279
+ _ts_decorate3([
3309
3280
  synchronized
3310
3281
  ], DataSpace.prototype, "activate", null);
3311
- _ts_decorate4([
3282
+ _ts_decorate3([
3312
3283
  synchronized
3313
3284
  ], DataSpace.prototype, "deactivate", null);
3314
- DataSpace = _ts_decorate4([
3285
+ DataSpace = _ts_decorate3([
3315
3286
  trackLeaks("open", "close")
3316
3287
  ], DataSpace);
3317
3288
 
@@ -3322,7 +3293,7 @@ import { getCredentialAssertion as getCredentialAssertion2 } from "@dxos/credent
3322
3293
  import { invariant as invariant11 } from "@dxos/invariant";
3323
3294
  import { PublicKey as PublicKey9 } from "@dxos/keys";
3324
3295
  import { log as log11 } from "@dxos/log";
3325
- import { trace as trace7 } from "@dxos/protocols";
3296
+ import { trace as trace6 } from "@dxos/protocols";
3326
3297
  import { SpaceState as SpaceState2 } from "@dxos/protocols/proto/dxos/client/services";
3327
3298
  import { Gossip, Presence } from "@dxos/teleport-extension-gossip";
3328
3299
  import { ComplexMap as ComplexMap3, deferFunction as deferFunction2, forEachAsync } from "@dxos/util";
@@ -3397,7 +3368,7 @@ var spaceGenesis = async (keyring, signingContext, space) => {
3397
3368
  };
3398
3369
 
3399
3370
  // packages/sdk/client-services/src/packlets/spaces/data-space-manager.ts
3400
- function _ts_decorate5(decorators, target, key, desc) {
3371
+ function _ts_decorate4(decorators, target, key, desc) {
3401
3372
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3402
3373
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
3403
3374
  r = Reflect.decorate(decorators, target, key, desc);
@@ -3433,7 +3404,7 @@ var DataSpaceManager = class DataSpaceManager2 {
3433
3404
  S: this,
3434
3405
  C: (f, a) => f(...a)
3435
3406
  });
3436
- log11.trace("dxos.echo.data-space-manager.open", trace7.begin({
3407
+ log11.trace("dxos.echo.data-space-manager.open", trace6.begin({
3437
3408
  id: this._instanceId
3438
3409
  }), {
3439
3410
  F: __dxlog_file13,
@@ -3479,7 +3450,7 @@ var DataSpaceManager = class DataSpaceManager2 {
3479
3450
  space.initializeDataPipelineAsync();
3480
3451
  }
3481
3452
  }
3482
- log11.trace("dxos.echo.data-space-manager.open", trace7.end({
3453
+ log11.trace("dxos.echo.data-space-manager.open", trace6.end({
3483
3454
  id: this._instanceId
3484
3455
  }), {
3485
3456
  F: __dxlog_file13,
@@ -3713,19 +3684,19 @@ var DataSpaceManager = class DataSpaceManager2 {
3713
3684
  return dataSpace;
3714
3685
  }
3715
3686
  };
3716
- _ts_decorate5([
3687
+ _ts_decorate4([
3717
3688
  synchronized2
3718
3689
  ], DataSpaceManager.prototype, "open", null);
3719
- _ts_decorate5([
3690
+ _ts_decorate4([
3720
3691
  synchronized2
3721
3692
  ], DataSpaceManager.prototype, "close", null);
3722
- _ts_decorate5([
3693
+ _ts_decorate4([
3723
3694
  synchronized2
3724
3695
  ], DataSpaceManager.prototype, "createSpace", null);
3725
- _ts_decorate5([
3696
+ _ts_decorate4([
3726
3697
  synchronized2
3727
3698
  ], DataSpaceManager.prototype, "acceptSpace", null);
3728
- DataSpaceManager = _ts_decorate5([
3699
+ DataSpaceManager = _ts_decorate4([
3729
3700
  trackLeaks2("open", "close")
3730
3701
  ], DataSpaceManager);
3731
3702
 
@@ -3961,12 +3932,12 @@ import { invariant as invariant13 } from "@dxos/invariant";
3961
3932
  import { Keyring } from "@dxos/keyring";
3962
3933
  import { PublicKey as PublicKey10 } from "@dxos/keys";
3963
3934
  import { log as log13 } from "@dxos/log";
3964
- import { InvalidStorageVersionError, STORAGE_VERSION as STORAGE_VERSION2, trace as trace8 } from "@dxos/protocols";
3935
+ import { InvalidStorageVersionError, STORAGE_VERSION as STORAGE_VERSION2, trace as trace7 } from "@dxos/protocols";
3965
3936
  import { Invitation as Invitation6 } from "@dxos/protocols/proto/dxos/client/services";
3966
3937
  import { BlobStore } from "@dxos/teleport-extension-object-sync";
3967
3938
  import { trace as Trace2 } from "@dxos/tracing";
3968
3939
  import { safeInstanceof } from "@dxos/util";
3969
- function _ts_decorate6(decorators, target, key, desc) {
3940
+ function _ts_decorate5(decorators, target, key, desc) {
3970
3941
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3971
3942
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
3972
3943
  r = Reflect.decorate(decorators, target, key, desc);
@@ -4021,7 +3992,7 @@ var ServiceContext = class ServiceContext2 {
4021
3992
  S: this,
4022
3993
  C: (f, a) => f(...a)
4023
3994
  });
4024
- log13.trace("dxos.sdk.service-context.open", trace8.begin({
3995
+ log13.trace("dxos.sdk.service-context.open", trace7.begin({
4025
3996
  id: this._instanceId
4026
3997
  }), {
4027
3998
  F: __dxlog_file15,
@@ -4037,7 +4008,7 @@ var ServiceContext = class ServiceContext2 {
4037
4008
  if (this.identityManager.identity) {
4038
4009
  await this._initialize(ctx);
4039
4010
  }
4040
- log13.trace("dxos.sdk.service-context.open", trace8.end({
4011
+ log13.trace("dxos.sdk.service-context.open", trace7.end({
4041
4012
  id: this._instanceId
4042
4013
  }), {
4043
4014
  F: __dxlog_file15,
@@ -4200,13 +4171,13 @@ var ServiceContext = class ServiceContext2 {
4200
4171
  await identity.space.spaceState.addCredentialProcessor(this._deviceSpaceSync);
4201
4172
  }
4202
4173
  };
4203
- _ts_decorate6([
4174
+ _ts_decorate5([
4204
4175
  Trace2.span()
4205
4176
  ], ServiceContext.prototype, "open", null);
4206
- _ts_decorate6([
4177
+ _ts_decorate5([
4207
4178
  Trace2.span()
4208
4179
  ], ServiceContext.prototype, "_initialize", null);
4209
- ServiceContext = _ts_decorate6([
4180
+ ServiceContext = _ts_decorate5([
4210
4181
  safeInstanceof("dxos.client-services.ServiceContext"),
4211
4182
  Trace2.resource()
4212
4183
  ], ServiceContext);
@@ -4239,7 +4210,7 @@ var ServiceRegistry = class {
4239
4210
  import { asyncTimeout, Trigger as Trigger7 } from "@dxos/async";
4240
4211
  import { RESOURCE_LOCK_TIMEOUT } from "@dxos/client-protocol";
4241
4212
  import { log as log14, logInfo } from "@dxos/log";
4242
- function _ts_decorate7(decorators, target, key, desc) {
4213
+ function _ts_decorate6(decorators, target, key, desc) {
4243
4214
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4244
4215
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
4245
4216
  r = Reflect.decorate(decorators, target, key, desc);
@@ -4352,7 +4323,7 @@ var Lock = class {
4352
4323
  });
4353
4324
  }
4354
4325
  };
4355
- _ts_decorate7([
4326
+ _ts_decorate6([
4356
4327
  logInfo
4357
4328
  ], Lock.prototype, "lockKey", null);
4358
4329
  var isLocked = (lockPath) => {
@@ -4421,7 +4392,7 @@ import { log as log16 } from "@dxos/log";
4421
4392
  import { WebsocketSignalManager } from "@dxos/messaging";
4422
4393
  import { ModelFactory } from "@dxos/model-factory";
4423
4394
  import { createSimplePeerTransportFactory, NetworkManager } from "@dxos/network-manager";
4424
- import { trace as trace9 } from "@dxos/protocols";
4395
+ import { trace as trace8 } from "@dxos/protocols";
4425
4396
  import { SystemStatus } from "@dxos/protocols/proto/dxos/client/services";
4426
4397
  import { TextModel } from "@dxos/text-model";
4427
4398
  import { TRACE_PROCESSOR, trace as Trace3 } from "@dxos/tracing";
@@ -4675,7 +4646,7 @@ var SystemServiceImpl = class {
4675
4646
  };
4676
4647
 
4677
4648
  // packages/sdk/client-services/src/packlets/services/service-host.ts
4678
- function _ts_decorate8(decorators, target, key, desc) {
4649
+ function _ts_decorate7(decorators, target, key, desc) {
4679
4650
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4680
4651
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
4681
4652
  r = Reflect.decorate(decorators, target, key, desc);
@@ -4845,7 +4816,7 @@ var ClientServicesHost = class ClientServicesHost2 {
4845
4816
  return;
4846
4817
  }
4847
4818
  const traceId = PublicKey11.random().toHex();
4848
- log16.trace("dxos.client-services.host.open", trace9.begin({
4819
+ log16.trace("dxos.client-services.host.open", trace8.begin({
4849
4820
  id: traceId
4850
4821
  }), {
4851
4822
  F: __dxlog_file17,
@@ -4944,7 +4915,7 @@ var ClientServicesHost = class ClientServicesHost2 {
4944
4915
  S: this,
4945
4916
  C: (f, a) => f(...a)
4946
4917
  });
4947
- log16.trace("dxos.client-services.host.open", trace9.end({
4918
+ log16.trace("dxos.client-services.host.open", trace8.end({
4948
4919
  id: traceId
4949
4920
  }), {
4950
4921
  F: __dxlog_file17,
@@ -4985,7 +4956,7 @@ var ClientServicesHost = class ClientServicesHost2 {
4985
4956
  }
4986
4957
  async reset() {
4987
4958
  const traceId = PublicKey11.random().toHex();
4988
- log16.trace("dxos.sdk.client-services-host.reset", trace9.begin({
4959
+ log16.trace("dxos.sdk.client-services-host.reset", trace8.begin({
4989
4960
  id: traceId
4990
4961
  }), {
4991
4962
  F: __dxlog_file17,
@@ -5007,7 +4978,7 @@ var ClientServicesHost = class ClientServicesHost2 {
5007
4978
  S: this,
5008
4979
  C: (f, a) => f(...a)
5009
4980
  });
5010
- log16.trace("dxos.sdk.client-services-host.reset", trace9.end({
4981
+ log16.trace("dxos.sdk.client-services-host.reset", trace8.end({
5011
4982
  id: traceId
5012
4983
  }), {
5013
4984
  F: __dxlog_file17,
@@ -5037,21 +5008,21 @@ var ClientServicesHost = class ClientServicesHost2 {
5037
5008
  return identity;
5038
5009
  }
5039
5010
  };
5040
- _ts_decorate8([
5011
+ _ts_decorate7([
5041
5012
  Trace3.info()
5042
5013
  ], ClientServicesHost.prototype, "_opening", void 0);
5043
- _ts_decorate8([
5014
+ _ts_decorate7([
5044
5015
  Trace3.info()
5045
5016
  ], ClientServicesHost.prototype, "_open", void 0);
5046
- _ts_decorate8([
5017
+ _ts_decorate7([
5047
5018
  synchronized3,
5048
5019
  Trace3.span()
5049
5020
  ], ClientServicesHost.prototype, "open", null);
5050
- _ts_decorate8([
5021
+ _ts_decorate7([
5051
5022
  synchronized3,
5052
5023
  Trace3.span()
5053
5024
  ], ClientServicesHost.prototype, "close", null);
5054
- ClientServicesHost = _ts_decorate8([
5025
+ ClientServicesHost = _ts_decorate7([
5055
5026
  Trace3.resource()
5056
5027
  ], ClientServicesHost);
5057
5028
 
@@ -5088,4 +5059,4 @@ export {
5088
5059
  createDefaultModelFactory,
5089
5060
  ClientServicesHost
5090
5061
  };
5091
- //# sourceMappingURL=chunk-FNZ5TTSX.mjs.map
5062
+ //# sourceMappingURL=chunk-UY5GQLN6.mjs.map