@dxos/client-services 0.5.9-main.a50ff17 → 0.5.9-main.b06c86b
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-K6NPH6LF.mjs → chunk-2JCI5YEM.mjs} +45 -23
- package/dist/lib/browser/chunk-2JCI5YEM.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-E6AQJD5I.cjs → chunk-HRQTR7UW.cjs} +48 -26
- package/dist/lib/node/chunk-HRQTR7UW.cjs.map +7 -0
- package/dist/lib/node/index.cjs +41 -41
- package/dist/lib/node/meta.json +1 -1
- package/dist/lib/node/packlets/testing/index.cjs +8 -8
- package/dist/types/src/packlets/invitations/invitations-handler.d.ts.map +1 -1
- package/dist/types/src/packlets/spaces/spaces-service.d.ts.map +1 -1
- package/dist/types/src/version.d.ts +1 -1
- package/package.json +36 -36
- package/src/packlets/invitations/invitations-handler.ts +13 -5
- package/src/packlets/spaces/data-space.ts +5 -5
- package/src/packlets/spaces/spaces-service.ts +12 -2
- package/src/version.ts +1 -1
- package/dist/lib/browser/chunk-K6NPH6LF.mjs.map +0 -7
- package/dist/lib/node/chunk-E6AQJD5I.cjs.map +0 -7
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
InvitationsManager,
|
|
8
8
|
ServiceContext,
|
|
9
9
|
SpaceInvitationProtocol
|
|
10
|
-
} from "../../chunk-
|
|
10
|
+
} from "../../chunk-2JCI5YEM.mjs";
|
|
11
11
|
|
|
12
12
|
// packages/sdk/client-services/src/packlets/testing/credential-utils.ts
|
|
13
13
|
import { createCredential } from "@dxos/credentials";
|
|
@@ -26,8 +26,8 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
26
26
|
mod
|
|
27
27
|
));
|
|
28
28
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
-
var
|
|
30
|
-
__export(
|
|
29
|
+
var chunk_HRQTR7UW_exports = {};
|
|
30
|
+
__export(chunk_HRQTR7UW_exports, {
|
|
31
31
|
ClientRpcServer: () => ClientRpcServer,
|
|
32
32
|
ClientServicesHost: () => ClientServicesHost,
|
|
33
33
|
ClientServicesProviderResource: () => ClientServicesProviderResource,
|
|
@@ -66,7 +66,7 @@ __export(chunk_E6AQJD5I_exports, {
|
|
|
66
66
|
subscribeToSpaces: () => subscribeToSpaces,
|
|
67
67
|
subscribeToSwarmInfo: () => subscribeToSwarmInfo
|
|
68
68
|
});
|
|
69
|
-
module.exports = __toCommonJS(
|
|
69
|
+
module.exports = __toCommonJS(chunk_HRQTR7UW_exports);
|
|
70
70
|
var import_async = require("@dxos/async");
|
|
71
71
|
var import_codec_protobuf = require("@dxos/codec-protobuf");
|
|
72
72
|
var import_feed_store = require("@dxos/feed-store");
|
|
@@ -631,7 +631,7 @@ var DevtoolsServiceImpl = class {
|
|
|
631
631
|
});
|
|
632
632
|
}
|
|
633
633
|
};
|
|
634
|
-
var DXOS_VERSION = "0.5.9-main.
|
|
634
|
+
var DXOS_VERSION = "0.5.9-main.b06c86b";
|
|
635
635
|
var getPlatform = () => {
|
|
636
636
|
if (process.browser) {
|
|
637
637
|
if (typeof window !== "undefined") {
|
|
@@ -2934,16 +2934,29 @@ var InvitationsHandler = class {
|
|
|
2934
2934
|
};
|
|
2935
2935
|
}
|
|
2936
2936
|
_logStateUpdate(invitation, actor, newState) {
|
|
2937
|
-
(
|
|
2938
|
-
|
|
2939
|
-
|
|
2940
|
-
|
|
2941
|
-
|
|
2942
|
-
|
|
2943
|
-
|
|
2944
|
-
|
|
2945
|
-
|
|
2946
|
-
|
|
2937
|
+
if (this._isNotTerminal(newState)) {
|
|
2938
|
+
(0, import_log6.log)("invitation state update", {
|
|
2939
|
+
actor: actor?.constructor.name,
|
|
2940
|
+
newState: stateToString(newState),
|
|
2941
|
+
oldState: stateToString(invitation.state)
|
|
2942
|
+
}, {
|
|
2943
|
+
F: __dxlog_file11,
|
|
2944
|
+
L: 439,
|
|
2945
|
+
S: this,
|
|
2946
|
+
C: (f, a) => f(...a)
|
|
2947
|
+
});
|
|
2948
|
+
} else {
|
|
2949
|
+
import_log6.log.info("invitation state update", {
|
|
2950
|
+
actor: actor?.constructor.name,
|
|
2951
|
+
newState: stateToString(newState),
|
|
2952
|
+
oldState: stateToString(invitation.state)
|
|
2953
|
+
}, {
|
|
2954
|
+
F: __dxlog_file11,
|
|
2955
|
+
L: 445,
|
|
2956
|
+
S: this,
|
|
2957
|
+
C: (f, a) => f(...a)
|
|
2958
|
+
});
|
|
2959
|
+
}
|
|
2947
2960
|
}
|
|
2948
2961
|
_isNotTerminal(currentState) {
|
|
2949
2962
|
return ![
|
|
@@ -2958,7 +2971,7 @@ var InvitationsHandler = class {
|
|
|
2958
2971
|
for (let attempt = 1; attempt <= MAX_OTP_ATTEMPTS; attempt++) {
|
|
2959
2972
|
(0, import_log6.log)("guest waiting for authentication code...", void 0, {
|
|
2960
2973
|
F: __dxlog_file11,
|
|
2961
|
-
L:
|
|
2974
|
+
L: 470,
|
|
2962
2975
|
S: this,
|
|
2963
2976
|
C: (f, a) => f(...a)
|
|
2964
2977
|
});
|
|
@@ -2966,7 +2979,7 @@ var InvitationsHandler = class {
|
|
|
2966
2979
|
const authCode = await authenticated.wait(options);
|
|
2967
2980
|
(0, import_log6.log)("sending authentication request", void 0, {
|
|
2968
2981
|
F: __dxlog_file11,
|
|
2969
|
-
L:
|
|
2982
|
+
L: 474,
|
|
2970
2983
|
S: this,
|
|
2971
2984
|
C: (f, a) => f(...a)
|
|
2972
2985
|
});
|
|
@@ -2985,7 +2998,7 @@ var InvitationsHandler = class {
|
|
|
2985
2998
|
attempt
|
|
2986
2999
|
}, {
|
|
2987
3000
|
F: __dxlog_file11,
|
|
2988
|
-
L:
|
|
3001
|
+
L: 485,
|
|
2989
3002
|
S: this,
|
|
2990
3003
|
C: (f, a) => f(...a)
|
|
2991
3004
|
});
|
|
@@ -3003,7 +3016,7 @@ var InvitationsHandler = class {
|
|
|
3003
3016
|
}
|
|
3004
3017
|
(0, import_log6.log)("sending authentication request", void 0, {
|
|
3005
3018
|
F: __dxlog_file11,
|
|
3006
|
-
L:
|
|
3019
|
+
L: 504,
|
|
3007
3020
|
S: this,
|
|
3008
3021
|
C: (f, a) => f(...a)
|
|
3009
3022
|
});
|
|
@@ -4545,7 +4558,6 @@ var DataSpace = class {
|
|
|
4545
4558
|
S: this,
|
|
4546
4559
|
C: (f, a) => f(...a)
|
|
4547
4560
|
});
|
|
4548
|
-
this._echoHost.replicateDocument(rootUrl);
|
|
4549
4561
|
const handle = this._echoHost.automergeRepo.find(rootUrl);
|
|
4550
4562
|
queueMicrotask(async () => {
|
|
4551
4563
|
try {
|
|
@@ -4572,8 +4584,10 @@ var DataSpace = class {
|
|
|
4572
4584
|
const root = await this._echoHost.openSpaceRoot(handle.url);
|
|
4573
4585
|
this._databaseRoot = root;
|
|
4574
4586
|
if (root.getVersion() !== import_echo_protocol.SpaceDocVersion.CURRENT) {
|
|
4575
|
-
this._state
|
|
4576
|
-
|
|
4587
|
+
if (this._state !== import_services12.SpaceState.REQUIRES_MIGRATION) {
|
|
4588
|
+
this._state = import_services12.SpaceState.REQUIRES_MIGRATION;
|
|
4589
|
+
this.stateUpdate.emit();
|
|
4590
|
+
}
|
|
4577
4591
|
} else {
|
|
4578
4592
|
if (this._state !== import_services12.SpaceState.READY) {
|
|
4579
4593
|
await this._enterReadyState();
|
|
@@ -5407,7 +5421,15 @@ var SpacesServiceImpl = class {
|
|
|
5407
5421
|
const subscribeSpaces = () => {
|
|
5408
5422
|
subscriptions.clear();
|
|
5409
5423
|
for (const space of dataSpaceManager.spaces.values()) {
|
|
5410
|
-
|
|
5424
|
+
let lastState;
|
|
5425
|
+
subscriptions.add(space.stateUpdate.on(ctx, () => {
|
|
5426
|
+
if (space.state !== lastState) {
|
|
5427
|
+
scheduler.forceTrigger();
|
|
5428
|
+
} else {
|
|
5429
|
+
scheduler.trigger();
|
|
5430
|
+
}
|
|
5431
|
+
lastState = space.state;
|
|
5432
|
+
}));
|
|
5411
5433
|
subscriptions.add(space.presence.updated.on(ctx, () => scheduler.trigger()));
|
|
5412
5434
|
subscriptions.add(space.automergeSpaceState.onNewEpoch.on(ctx, () => scheduler.trigger()));
|
|
5413
5435
|
subscriptions.add(space.inner.controlPipeline.state.timeframeUpdate.on(ctx, () => scheduler.trigger()));
|
|
@@ -5473,7 +5495,7 @@ var SpacesServiceImpl = class {
|
|
|
5473
5495
|
} else {
|
|
5474
5496
|
(0, import_invariant16.invariant)(!credential.id, "Id on unsigned credentials is not allowed", {
|
|
5475
5497
|
F: __dxlog_file18,
|
|
5476
|
-
L:
|
|
5498
|
+
L: 209,
|
|
5477
5499
|
S: this,
|
|
5478
5500
|
A: [
|
|
5479
5501
|
"!credential.id",
|
|
@@ -5482,7 +5504,7 @@ var SpacesServiceImpl = class {
|
|
|
5482
5504
|
});
|
|
5483
5505
|
(0, import_invariant16.invariant)(this._identityManager.identity, "Identity is not available", {
|
|
5484
5506
|
F: __dxlog_file18,
|
|
5485
|
-
L:
|
|
5507
|
+
L: 210,
|
|
5486
5508
|
S: this,
|
|
5487
5509
|
A: [
|
|
5488
5510
|
"this._identityManager.identity",
|
|
@@ -5492,7 +5514,7 @@ var SpacesServiceImpl = class {
|
|
|
5492
5514
|
const signer = this._identityManager.identity.getIdentityCredentialSigner();
|
|
5493
5515
|
(0, import_invariant16.invariant)(credential.issuer.equals(signer.getIssuer()), void 0, {
|
|
5494
5516
|
F: __dxlog_file18,
|
|
5495
|
-
L:
|
|
5517
|
+
L: 212,
|
|
5496
5518
|
S: this,
|
|
5497
5519
|
A: [
|
|
5498
5520
|
"credential.issuer.equals(signer.getIssuer())",
|
|
@@ -6700,4 +6722,4 @@ ClientServicesHost = _ts_decorate8([
|
|
|
6700
6722
|
subscribeToSpaces,
|
|
6701
6723
|
subscribeToSwarmInfo
|
|
6702
6724
|
});
|
|
6703
|
-
//# sourceMappingURL=chunk-
|
|
6725
|
+
//# sourceMappingURL=chunk-HRQTR7UW.cjs.map
|