@dxos/client-services 0.6.2 → 0.6.3-main.0ca5117
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-CFKVGKP3.mjs → chunk-AFSCMOA6.mjs} +56 -35
- package/dist/lib/browser/chunk-AFSCMOA6.mjs.map +7 -0
- package/dist/lib/browser/index.mjs +1 -1
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/packlets/testing/index.mjs +1 -1
- package/dist/lib/node/{chunk-7XBIZ7NK.cjs → chunk-5I354VUW.cjs} +59 -38
- package/dist/lib/node/chunk-5I354VUW.cjs.map +7 -0
- package/dist/lib/node/index.cjs +45 -45
- package/dist/lib/node/meta.json +1 -1
- package/dist/lib/node/packlets/testing/index.cjs +8 -8
- package/dist/types/src/packlets/spaces/data-space-manager.d.ts.map +1 -1
- package/dist/types/src/packlets/spaces/data-space.d.ts +7 -1
- package/dist/types/src/packlets/spaces/data-space.d.ts.map +1 -1
- package/dist/types/src/version.d.ts +1 -1
- package/dist/types/src/version.d.ts.map +1 -1
- package/package.json +36 -36
- package/src/packlets/spaces/data-space-manager.ts +22 -10
- package/src/packlets/spaces/data-space.ts +15 -11
- package/src/packlets/spaces/spaces-service.ts +3 -3
- package/src/version.ts +1 -5
- package/dist/lib/browser/chunk-CFKVGKP3.mjs.map +0 -7
- package/dist/lib/node/chunk-7XBIZ7NK.cjs.map +0 -7
|
@@ -359,7 +359,7 @@ import { SpaceMember } from "@dxos/protocols/proto/dxos/client/services";
|
|
|
359
359
|
import { TRACE_PROCESSOR } from "@dxos/tracing";
|
|
360
360
|
|
|
361
361
|
// packages/sdk/client-services/src/version.ts
|
|
362
|
-
var DXOS_VERSION = "0.6.
|
|
362
|
+
var DXOS_VERSION = "0.6.3-main.0ca5117";
|
|
363
363
|
|
|
364
364
|
// packages/sdk/client-services/src/packlets/services/platform.ts
|
|
365
365
|
import { Platform } from "@dxos/protocols/proto/dxos/client/services";
|
|
@@ -4628,17 +4628,15 @@ var DataSpace = class {
|
|
|
4628
4628
|
};
|
|
4629
4629
|
});
|
|
4630
4630
|
}
|
|
4631
|
-
const root = await this._echoHost.openSpaceRoot(handle.url);
|
|
4631
|
+
const root = await this._echoHost.openSpaceRoot(this.id, handle.url);
|
|
4632
4632
|
this._databaseRoot = root;
|
|
4633
4633
|
if (root.getVersion() !== SpaceDocVersion2.CURRENT) {
|
|
4634
|
-
|
|
4635
|
-
|
|
4636
|
-
|
|
4637
|
-
|
|
4634
|
+
this._state = SpaceState2.REQUIRES_MIGRATION;
|
|
4635
|
+
this.stateUpdate.emit();
|
|
4636
|
+
} else if (this._state !== SpaceState2.READY) {
|
|
4637
|
+
await this._enterReadyState();
|
|
4638
4638
|
} else {
|
|
4639
|
-
|
|
4640
|
-
await this._enterReadyState();
|
|
4641
|
-
}
|
|
4639
|
+
this.stateUpdate.emit();
|
|
4642
4640
|
}
|
|
4643
4641
|
} catch (_) {
|
|
4644
4642
|
_usingCtx.e = _;
|
|
@@ -4655,7 +4653,7 @@ var DataSpace = class {
|
|
|
4655
4653
|
err
|
|
4656
4654
|
}, {
|
|
4657
4655
|
F: __dxlog_file18,
|
|
4658
|
-
L:
|
|
4656
|
+
L: 431,
|
|
4659
4657
|
S: this,
|
|
4660
4658
|
C: (f, a) => f(...a)
|
|
4661
4659
|
});
|
|
@@ -4708,14 +4706,18 @@ var DataSpace = class {
|
|
|
4708
4706
|
credential
|
|
4709
4707
|
}
|
|
4710
4708
|
});
|
|
4711
|
-
|
|
4709
|
+
const timeframe = new Timeframe3([
|
|
4712
4710
|
[
|
|
4713
4711
|
receipt.feedKey,
|
|
4714
4712
|
receipt.seq
|
|
4715
4713
|
]
|
|
4716
|
-
])
|
|
4714
|
+
]);
|
|
4715
|
+
await this.inner.controlPipeline.state.waitUntilTimeframe(timeframe);
|
|
4717
4716
|
await this._echoHost.updateIndexes();
|
|
4718
|
-
return
|
|
4717
|
+
return {
|
|
4718
|
+
credential,
|
|
4719
|
+
timeframe
|
|
4720
|
+
};
|
|
4719
4721
|
}
|
|
4720
4722
|
async activate() {
|
|
4721
4723
|
if (![
|
|
@@ -4741,7 +4743,7 @@ var DataSpace = class {
|
|
|
4741
4743
|
state: SpaceState2[this._state]
|
|
4742
4744
|
}, {
|
|
4743
4745
|
F: __dxlog_file18,
|
|
4744
|
-
L:
|
|
4746
|
+
L: 513,
|
|
4745
4747
|
S: this,
|
|
4746
4748
|
C: (f, a) => f(...a)
|
|
4747
4749
|
});
|
|
@@ -5269,19 +5271,37 @@ var DataSpaceManager = class {
|
|
|
5269
5271
|
credentialProvider: createAuthProvider(this._signingContext.credentialSigner),
|
|
5270
5272
|
credentialAuthenticator: deferFunction2(() => dataSpace.authVerifier.verifier)
|
|
5271
5273
|
},
|
|
5272
|
-
onAuthorizedConnection: (session) => {
|
|
5273
|
-
|
|
5274
|
-
|
|
5275
|
-
|
|
5276
|
-
|
|
5277
|
-
|
|
5278
|
-
|
|
5279
|
-
|
|
5280
|
-
|
|
5274
|
+
onAuthorizedConnection: (session) => queueMicrotask(async () => {
|
|
5275
|
+
try {
|
|
5276
|
+
if (!session.isOpen) {
|
|
5277
|
+
return;
|
|
5278
|
+
}
|
|
5279
|
+
session.addExtension("dxos.mesh.teleport.admission-discovery", new CredentialServerExtension(space));
|
|
5280
|
+
session.addExtension("dxos.mesh.teleport.gossip", gossip.createExtension({
|
|
5281
|
+
remotePeerId: session.remotePeerId
|
|
5282
|
+
}));
|
|
5283
|
+
session.addExtension("dxos.mesh.teleport.notarization", dataSpace.notarizationPlugin.createExtension());
|
|
5284
|
+
await this._echoHost.authorizeDevice(space.key, session.remotePeerId);
|
|
5285
|
+
if (!session.isOpen) {
|
|
5286
|
+
return;
|
|
5287
|
+
}
|
|
5288
|
+
session.addExtension("dxos.mesh.teleport.automerge", this._echoHost.createReplicationExtension());
|
|
5289
|
+
} catch (err) {
|
|
5290
|
+
log16.warn("error on authorized connection", {
|
|
5291
|
+
err
|
|
5292
|
+
}, {
|
|
5293
|
+
F: __dxlog_file19,
|
|
5294
|
+
L: 403,
|
|
5295
|
+
S: this,
|
|
5296
|
+
C: (f, a) => f(...a)
|
|
5297
|
+
});
|
|
5298
|
+
await session.close(err);
|
|
5299
|
+
}
|
|
5300
|
+
}),
|
|
5281
5301
|
onAuthFailure: () => {
|
|
5282
5302
|
log16.warn("auth failure", void 0, {
|
|
5283
5303
|
F: __dxlog_file19,
|
|
5284
|
-
L:
|
|
5304
|
+
L: 408,
|
|
5285
5305
|
S: this,
|
|
5286
5306
|
C: (f, a) => f(...a)
|
|
5287
5307
|
});
|
|
@@ -5314,7 +5334,7 @@ var DataSpaceManager = class {
|
|
|
5314
5334
|
space: space.key
|
|
5315
5335
|
}, {
|
|
5316
5336
|
F: __dxlog_file19,
|
|
5317
|
-
L:
|
|
5337
|
+
L: 435,
|
|
5318
5338
|
S: this,
|
|
5319
5339
|
C: (f, a) => f(...a)
|
|
5320
5340
|
});
|
|
@@ -5325,7 +5345,7 @@ var DataSpaceManager = class {
|
|
|
5325
5345
|
open: this._isOpen
|
|
5326
5346
|
}, {
|
|
5327
5347
|
F: __dxlog_file19,
|
|
5328
|
-
L:
|
|
5348
|
+
L: 438,
|
|
5329
5349
|
S: this,
|
|
5330
5350
|
C: (f, a) => f(...a)
|
|
5331
5351
|
});
|
|
@@ -5344,7 +5364,7 @@ var DataSpaceManager = class {
|
|
|
5344
5364
|
space: space.key
|
|
5345
5365
|
}, {
|
|
5346
5366
|
F: __dxlog_file19,
|
|
5347
|
-
L:
|
|
5367
|
+
L: 446,
|
|
5348
5368
|
S: this,
|
|
5349
5369
|
C: (f, a) => f(...a)
|
|
5350
5370
|
});
|
|
@@ -5385,7 +5405,7 @@ var DataSpaceManager = class {
|
|
|
5385
5405
|
closedSessions
|
|
5386
5406
|
}, {
|
|
5387
5407
|
F: __dxlog_file19,
|
|
5388
|
-
L:
|
|
5408
|
+
L: 482,
|
|
5389
5409
|
S: this,
|
|
5390
5410
|
C: (f, a) => f(...a)
|
|
5391
5411
|
});
|
|
@@ -5400,7 +5420,7 @@ var DataSpaceManager = class {
|
|
|
5400
5420
|
peerId: peerState.peerId
|
|
5401
5421
|
}, {
|
|
5402
5422
|
F: __dxlog_file19,
|
|
5403
|
-
L:
|
|
5423
|
+
L: 496,
|
|
5404
5424
|
S: this,
|
|
5405
5425
|
C: (f, a) => f(...a)
|
|
5406
5426
|
});
|
|
@@ -5540,9 +5560,9 @@ var SpacesServiceImpl = class {
|
|
|
5540
5560
|
const scheduler = new UpdateScheduler(ctx, async () => {
|
|
5541
5561
|
const dataSpaceManager = await this._getDataSpaceManager();
|
|
5542
5562
|
const spaces = Array.from(dataSpaceManager.spaces.values()).map((space) => this._serializeSpace(space));
|
|
5543
|
-
log17("update", {
|
|
5544
|
-
spaces
|
|
5545
|
-
}, {
|
|
5563
|
+
log17("update", () => ({
|
|
5564
|
+
ids: spaces.map((space) => space.id)
|
|
5565
|
+
}), {
|
|
5546
5566
|
F: __dxlog_file20,
|
|
5547
5567
|
L: 115,
|
|
5548
5568
|
S: this,
|
|
@@ -5677,12 +5697,13 @@ var SpacesServiceImpl = class {
|
|
|
5677
5697
|
async createEpoch({ spaceKey, migration, automergeRootUrl }) {
|
|
5678
5698
|
const dataSpaceManager = await this._getDataSpaceManager();
|
|
5679
5699
|
const space = dataSpaceManager.spaces.get(spaceKey) ?? raise2(new SpaceNotFoundError2(spaceKey));
|
|
5680
|
-
const
|
|
5700
|
+
const result = await space.createEpoch({
|
|
5681
5701
|
migration,
|
|
5682
5702
|
newAutomergeRoot: automergeRootUrl
|
|
5683
5703
|
});
|
|
5684
5704
|
return {
|
|
5685
|
-
epochCredential: credential
|
|
5705
|
+
epochCredential: result?.credential,
|
|
5706
|
+
controlTimeframe: result?.timeframe
|
|
5686
5707
|
};
|
|
5687
5708
|
}
|
|
5688
5709
|
async admitContact(request) {
|
|
@@ -7332,4 +7353,4 @@ export {
|
|
|
7332
7353
|
ClientServicesProviderResource,
|
|
7333
7354
|
DiagnosticsCollector
|
|
7334
7355
|
};
|
|
7335
|
-
//# sourceMappingURL=chunk-
|
|
7356
|
+
//# sourceMappingURL=chunk-AFSCMOA6.mjs.map
|