@dxos/client-services 0.4.7-main.85d9ee7 → 0.4.7-main.aa6dc1f
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.
- package/dist/lib/browser/{chunk-KESTWAZ5.mjs → chunk-HVCUCBHI.mjs} +36 -22
- package/dist/lib/browser/{chunk-KESTWAZ5.mjs.map → chunk-HVCUCBHI.mjs.map} +3 -3
- package/dist/lib/browser/index.mjs +5 -3
- package/dist/lib/browser/index.mjs.map +2 -2
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/packlets/testing/index.mjs +4 -2
- package/dist/lib/browser/packlets/testing/index.mjs.map +3 -3
- package/dist/lib/node/{chunk-RG6HMYQS.cjs → chunk-Z5XDOC7V.cjs} +38 -24
- package/dist/lib/node/{chunk-RG6HMYQS.cjs.map → chunk-Z5XDOC7V.cjs.map} +3 -3
- package/dist/lib/node/index.cjs +41 -39
- package/dist/lib/node/index.cjs.map +2 -2
- package/dist/lib/node/meta.json +1 -1
- package/dist/lib/node/packlets/testing/index.cjs +11 -9
- package/dist/lib/node/packlets/testing/index.cjs.map +3 -3
- package/dist/types/src/packlets/logging/logging-service.d.ts +1 -0
- package/dist/types/src/packlets/logging/logging-service.d.ts.map +1 -1
- package/dist/types/src/packlets/services/service-context.d.ts +2 -0
- package/dist/types/src/packlets/services/service-context.d.ts.map +1 -1
- package/dist/types/src/packlets/vault/shared-worker-connection.d.ts.map +1 -1
- package/dist/types/src/version.d.ts +1 -1
- package/package.json +35 -35
- package/src/packlets/logging/logging-service.ts +9 -2
- package/src/packlets/services/automerge-host.test.ts +1 -1
- package/src/packlets/services/service-context.ts +7 -1
- package/src/packlets/testing/test-builder.ts +1 -1
- package/src/packlets/vault/shared-worker-connection.ts +3 -1
- package/src/version.ts +1 -1
|
@@ -2671,7 +2671,7 @@ var getPlatform = () => {
|
|
|
2671
2671
|
};
|
|
2672
2672
|
|
|
2673
2673
|
// packages/sdk/client-services/src/version.ts
|
|
2674
|
-
var DXOS_VERSION = "0.4.7-main.
|
|
2674
|
+
var DXOS_VERSION = "0.4.7-main.aa6dc1f";
|
|
2675
2675
|
|
|
2676
2676
|
// packages/sdk/client-services/src/packlets/services/diagnostics.ts
|
|
2677
2677
|
var __dxlog_file10 = "/home/runner/work/dxos/dxos/packages/sdk/client-services/src/packlets/services/diagnostics.ts";
|
|
@@ -4245,6 +4245,7 @@ import { Context as Context9 } from "@dxos/context";
|
|
|
4245
4245
|
import { getCredentialAssertion as getCredentialAssertion3 } from "@dxos/credentials";
|
|
4246
4246
|
import { failUndefined as failUndefined2 } from "@dxos/debug";
|
|
4247
4247
|
import { valueEncoding, MetadataStore, SpaceManager, DataServiceSubscriptions, SnapshotStore, AutomergeHost } from "@dxos/echo-pipeline";
|
|
4248
|
+
import { IndexMetadataStore } from "@dxos/echo-schema";
|
|
4248
4249
|
import { FeedFactory, FeedStore } from "@dxos/feed-store";
|
|
4249
4250
|
import { invariant as invariant13 } from "@dxos/invariant";
|
|
4250
4251
|
import { Keyring } from "@dxos/keyring";
|
|
@@ -4278,6 +4279,9 @@ var ServiceContext = class {
|
|
|
4278
4279
|
this._handlerFactories = /* @__PURE__ */ new Map();
|
|
4279
4280
|
this._instanceId = PublicKey10.random().toHex();
|
|
4280
4281
|
this.metadataStore = new MetadataStore(storage.createDirectory("metadata"));
|
|
4282
|
+
this.indexMetadata = new IndexMetadataStore({
|
|
4283
|
+
directory: storage.createDirectory("index-metadata")
|
|
4284
|
+
});
|
|
4281
4285
|
this.snapshotStore = new SnapshotStore(storage.createDirectory("snapshots"));
|
|
4282
4286
|
this.blobStore = new BlobStore(storage.createDirectory("blobs"));
|
|
4283
4287
|
this.keyring = new Keyring(storage.createDirectory("keyring"));
|
|
@@ -4300,7 +4304,10 @@ var ServiceContext = class {
|
|
|
4300
4304
|
snapshotStore: this.snapshotStore
|
|
4301
4305
|
});
|
|
4302
4306
|
this.identityManager = new IdentityManager(this.metadataStore, this.keyring, this.feedStore, this.spaceManager, this._runtimeParams);
|
|
4303
|
-
this.automergeHost = new AutomergeHost(
|
|
4307
|
+
this.automergeHost = new AutomergeHost({
|
|
4308
|
+
directory: storage.createDirectory("automerge"),
|
|
4309
|
+
metadata: this.indexMetadata
|
|
4310
|
+
});
|
|
4304
4311
|
this.invitations = new InvitationsHandler(this.networkManager);
|
|
4305
4312
|
this._handlerFactories.set(Invitation6.Kind.DEVICE, () => new DeviceInvitationProtocol(this.keyring, () => this.identityManager.identity ?? failUndefined2(), this._acceptIdentity.bind(this)));
|
|
4306
4313
|
}
|
|
@@ -4308,7 +4315,7 @@ var ServiceContext = class {
|
|
|
4308
4315
|
await this._checkStorageVersion();
|
|
4309
4316
|
log13("opening...", void 0, {
|
|
4310
4317
|
F: __dxlog_file15,
|
|
4311
|
-
L:
|
|
4318
|
+
L: 152,
|
|
4312
4319
|
S: this,
|
|
4313
4320
|
C: (f, a) => f(...a)
|
|
4314
4321
|
});
|
|
@@ -4316,7 +4323,7 @@ var ServiceContext = class {
|
|
|
4316
4323
|
id: this._instanceId
|
|
4317
4324
|
}), {
|
|
4318
4325
|
F: __dxlog_file15,
|
|
4319
|
-
L:
|
|
4326
|
+
L: 153,
|
|
4320
4327
|
S: this,
|
|
4321
4328
|
C: (f, a) => f(...a)
|
|
4322
4329
|
});
|
|
@@ -4332,13 +4339,13 @@ var ServiceContext = class {
|
|
|
4332
4339
|
id: this._instanceId
|
|
4333
4340
|
}), {
|
|
4334
4341
|
F: __dxlog_file15,
|
|
4335
|
-
L:
|
|
4342
|
+
L: 163,
|
|
4336
4343
|
S: this,
|
|
4337
4344
|
C: (f, a) => f(...a)
|
|
4338
4345
|
});
|
|
4339
4346
|
log13("opened", void 0, {
|
|
4340
4347
|
F: __dxlog_file15,
|
|
4341
|
-
L:
|
|
4348
|
+
L: 164,
|
|
4342
4349
|
S: this,
|
|
4343
4350
|
C: (f, a) => f(...a)
|
|
4344
4351
|
});
|
|
@@ -4346,7 +4353,7 @@ var ServiceContext = class {
|
|
|
4346
4353
|
async close() {
|
|
4347
4354
|
log13("closing...", void 0, {
|
|
4348
4355
|
F: __dxlog_file15,
|
|
4349
|
-
L:
|
|
4356
|
+
L: 168,
|
|
4350
4357
|
S: this,
|
|
4351
4358
|
C: (f, a) => f(...a)
|
|
4352
4359
|
});
|
|
@@ -4364,7 +4371,7 @@ var ServiceContext = class {
|
|
|
4364
4371
|
await this.metadataStore.close();
|
|
4365
4372
|
log13("closed", void 0, {
|
|
4366
4373
|
F: __dxlog_file15,
|
|
4367
|
-
L:
|
|
4374
|
+
L: 181,
|
|
4368
4375
|
S: this,
|
|
4369
4376
|
C: (f, a) => f(...a)
|
|
4370
4377
|
});
|
|
@@ -4378,7 +4385,7 @@ var ServiceContext = class {
|
|
|
4378
4385
|
const factory = this._handlerFactories.get(invitation.kind);
|
|
4379
4386
|
invariant13(factory, `Unknown invitation kind: ${invitation.kind}`, {
|
|
4380
4387
|
F: __dxlog_file15,
|
|
4381
|
-
L:
|
|
4388
|
+
L: 192,
|
|
4382
4389
|
S: this,
|
|
4383
4390
|
A: [
|
|
4384
4391
|
"factory",
|
|
@@ -4410,7 +4417,7 @@ var ServiceContext = class {
|
|
|
4410
4417
|
async _initialize(ctx) {
|
|
4411
4418
|
log13("initializing spaces...", void 0, {
|
|
4412
4419
|
F: __dxlog_file15,
|
|
4413
|
-
L:
|
|
4420
|
+
L: 223,
|
|
4414
4421
|
S: this,
|
|
4415
4422
|
C: (f, a) => f(...a)
|
|
4416
4423
|
});
|
|
@@ -4433,7 +4440,7 @@ var ServiceContext = class {
|
|
|
4433
4440
|
this._handlerFactories.set(Invitation6.Kind.SPACE, (invitation) => {
|
|
4434
4441
|
invariant13(this.dataSpaceManager, "dataSpaceManager not initialized yet", {
|
|
4435
4442
|
F: __dxlog_file15,
|
|
4436
|
-
L:
|
|
4443
|
+
L: 248,
|
|
4437
4444
|
S: this,
|
|
4438
4445
|
A: [
|
|
4439
4446
|
"this.dataSpaceManager",
|
|
@@ -4457,7 +4464,7 @@ var ServiceContext = class {
|
|
|
4457
4464
|
details: assertion
|
|
4458
4465
|
}, {
|
|
4459
4466
|
F: __dxlog_file15,
|
|
4460
|
-
L:
|
|
4467
|
+
L: 264,
|
|
4461
4468
|
S: this,
|
|
4462
4469
|
C: (f, a) => f(...a)
|
|
4463
4470
|
});
|
|
@@ -4468,7 +4475,7 @@ var ServiceContext = class {
|
|
|
4468
4475
|
details: assertion
|
|
4469
4476
|
}, {
|
|
4470
4477
|
F: __dxlog_file15,
|
|
4471
|
-
L:
|
|
4478
|
+
L: 268,
|
|
4472
4479
|
S: this,
|
|
4473
4480
|
C: (f, a) => f(...a)
|
|
4474
4481
|
});
|
|
@@ -4479,7 +4486,7 @@ var ServiceContext = class {
|
|
|
4479
4486
|
details: assertion
|
|
4480
4487
|
}, {
|
|
4481
4488
|
F: __dxlog_file15,
|
|
4482
|
-
L:
|
|
4489
|
+
L: 273,
|
|
4483
4490
|
S: this,
|
|
4484
4491
|
C: (f, a) => f(...a)
|
|
4485
4492
|
});
|
|
@@ -4490,7 +4497,7 @@ var ServiceContext = class {
|
|
|
4490
4497
|
} catch (err) {
|
|
4491
4498
|
log13.catch(err, void 0, {
|
|
4492
4499
|
F: __dxlog_file15,
|
|
4493
|
-
L:
|
|
4500
|
+
L: 279,
|
|
4494
4501
|
S: this,
|
|
4495
4502
|
C: (f, a) => f(...a)
|
|
4496
4503
|
});
|
|
@@ -4716,7 +4723,7 @@ import { DocumentModel as DocumentModel2 } from "@dxos/document-model";
|
|
|
4716
4723
|
import { DataServiceImpl } from "@dxos/echo-pipeline";
|
|
4717
4724
|
import { getRawDoc, getAutomergeObjectCore } from "@dxos/echo-schema";
|
|
4718
4725
|
import { invariant as invariant15 } from "@dxos/invariant";
|
|
4719
|
-
import { PublicKey as
|
|
4726
|
+
import { PublicKey as PublicKey12 } from "@dxos/keys";
|
|
4720
4727
|
import { log as log16 } from "@dxos/log";
|
|
4721
4728
|
import { WebsocketSignalManager } from "@dxos/messaging";
|
|
4722
4729
|
import { ModelFactory } from "@dxos/model-factory";
|
|
@@ -4813,13 +4820,15 @@ var DevicesServiceImpl = class {
|
|
|
4813
4820
|
// packages/sdk/client-services/src/packlets/logging/logging-service.ts
|
|
4814
4821
|
import { Event as Event7 } from "@dxos/async";
|
|
4815
4822
|
import { Stream as Stream12 } from "@dxos/codec-protobuf";
|
|
4823
|
+
import { PublicKey as PublicKey11 } from "@dxos/keys";
|
|
4816
4824
|
import { getContextFromEntry, log as log15 } from "@dxos/log";
|
|
4817
4825
|
import { QueryLogsRequest } from "@dxos/protocols/proto/dxos/client/services";
|
|
4818
|
-
import { jsonify, numericalValues, tracer } from "@dxos/util";
|
|
4826
|
+
import { getDebugName, jsonify, numericalValues, tracer } from "@dxos/util";
|
|
4819
4827
|
var LoggingServiceImpl = class {
|
|
4820
4828
|
constructor() {
|
|
4821
4829
|
this._logs = new Event7();
|
|
4822
|
-
this._started =
|
|
4830
|
+
this._started = Date.now();
|
|
4831
|
+
this._sessionId = PublicKey11.random().toHex();
|
|
4823
4832
|
this._logProcessor = (_config, entry2) => {
|
|
4824
4833
|
this._logs.emit(entry2);
|
|
4825
4834
|
};
|
|
@@ -4895,7 +4904,12 @@ var LoggingServiceImpl = class {
|
|
|
4895
4904
|
meta: {
|
|
4896
4905
|
// TODO(dmaretskyi): Fix proto.
|
|
4897
4906
|
file: entry2.meta?.F ?? "",
|
|
4898
|
-
line: entry2.meta?.L ?? 0
|
|
4907
|
+
line: entry2.meta?.L ?? 0,
|
|
4908
|
+
scope: {
|
|
4909
|
+
hostSessionId: this._sessionId,
|
|
4910
|
+
uptimeSeconds: (Date.now() - this._started) / 1e3,
|
|
4911
|
+
name: getDebugName(entry2.meta?.S)
|
|
4912
|
+
}
|
|
4899
4913
|
}
|
|
4900
4914
|
};
|
|
4901
4915
|
try {
|
|
@@ -5177,7 +5191,7 @@ var ClientServicesHost = class {
|
|
|
5177
5191
|
if (this._open) {
|
|
5178
5192
|
return;
|
|
5179
5193
|
}
|
|
5180
|
-
const traceId =
|
|
5194
|
+
const traceId = PublicKey12.random().toHex();
|
|
5181
5195
|
log16.trace("dxos.client-services.host.open", trace9.begin({
|
|
5182
5196
|
id: traceId
|
|
5183
5197
|
}), {
|
|
@@ -5317,7 +5331,7 @@ var ClientServicesHost = class {
|
|
|
5317
5331
|
});
|
|
5318
5332
|
}
|
|
5319
5333
|
async reset() {
|
|
5320
|
-
const traceId =
|
|
5334
|
+
const traceId = PublicKey12.random().toHex();
|
|
5321
5335
|
log16.trace("dxos.sdk.client-services-host.reset", trace9.begin({
|
|
5322
5336
|
id: traceId
|
|
5323
5337
|
}), {
|
|
@@ -5429,4 +5443,4 @@ export {
|
|
|
5429
5443
|
createDefaultModelFactory,
|
|
5430
5444
|
ClientServicesHost
|
|
5431
5445
|
};
|
|
5432
|
-
//# sourceMappingURL=chunk-
|
|
5446
|
+
//# sourceMappingURL=chunk-HVCUCBHI.mjs.map
|