@dxos/client-services 0.1.58-main.ffbb8a1 → 0.1.58-next.3349da8
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-YLR3BYMV.mjs → chunk-ARM2DYUZ.mjs} +33 -25
- package/dist/lib/browser/chunk-ARM2DYUZ.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/index.cjs +26 -18
- package/dist/lib/node/index.cjs.map +3 -3
- package/dist/lib/node/meta.json +1 -1
- package/dist/lib/node/packlets/testing/index.cjs +26 -18
- package/dist/lib/node/packlets/testing/index.cjs.map +3 -3
- package/dist/types/src/packlets/invitations/invitations-service.d.ts.map +1 -1
- package/dist/types/src/packlets/spaces/data-space.d.ts.map +1 -1
- package/dist/types/src/version.d.ts +1 -1
- package/package.json +35 -35
- package/src/packlets/invitations/invitations-service.ts +6 -0
- package/src/packlets/spaces/data-space.ts +2 -0
- package/src/version.ts +1 -1
- package/dist/lib/browser/chunk-YLR3BYMV.mjs.map +0 -7
|
@@ -2070,7 +2070,7 @@ import { Event as Event3 } from "@dxos/async";
|
|
|
2070
2070
|
import { Stream as Stream8 } from "@dxos/codec-protobuf";
|
|
2071
2071
|
import { invariant as invariant7 } from "@dxos/invariant";
|
|
2072
2072
|
import { log as log6 } from "@dxos/log";
|
|
2073
|
-
import { QueryInvitationsResponse } from "@dxos/protocols/proto/dxos/client/services";
|
|
2073
|
+
import { Invitation as Invitation4, QueryInvitationsResponse } from "@dxos/protocols/proto/dxos/client/services";
|
|
2074
2074
|
var __dxlog_file8 = "/home/runner/work/dxos/dxos/packages/sdk/client-services/src/packlets/invitations/invitations-service.ts";
|
|
2075
2075
|
var InvitationsServiceImpl = class {
|
|
2076
2076
|
constructor(_invitationsHandler, _getHandler) {
|
|
@@ -2106,6 +2106,9 @@ var InvitationsServiceImpl = class {
|
|
|
2106
2106
|
}, () => {
|
|
2107
2107
|
close();
|
|
2108
2108
|
this._createInvitations.delete(invitation.get().invitationId);
|
|
2109
|
+
if (invitation.get().type !== Invitation4.Type.MULTIUSE) {
|
|
2110
|
+
this._removedCreated.emit(invitation.get());
|
|
2111
|
+
}
|
|
2109
2112
|
});
|
|
2110
2113
|
});
|
|
2111
2114
|
}
|
|
@@ -2128,19 +2131,22 @@ var InvitationsServiceImpl = class {
|
|
|
2128
2131
|
}, () => {
|
|
2129
2132
|
close();
|
|
2130
2133
|
this._acceptInvitations.delete(invitation.get().invitationId);
|
|
2134
|
+
if (invitation.get().type !== Invitation4.Type.MULTIUSE) {
|
|
2135
|
+
this._removedAccepted.emit(invitation.get());
|
|
2136
|
+
}
|
|
2131
2137
|
});
|
|
2132
2138
|
});
|
|
2133
2139
|
}
|
|
2134
2140
|
async authenticate({ invitationId, authCode }) {
|
|
2135
2141
|
log6("authenticating...", void 0, {
|
|
2136
2142
|
F: __dxlog_file8,
|
|
2137
|
-
L:
|
|
2143
|
+
L: 108,
|
|
2138
2144
|
S: this,
|
|
2139
2145
|
C: (f, a) => f(...a)
|
|
2140
2146
|
});
|
|
2141
2147
|
invariant7(invitationId, void 0, {
|
|
2142
2148
|
F: __dxlog_file8,
|
|
2143
|
-
L:
|
|
2149
|
+
L: 109,
|
|
2144
2150
|
S: this,
|
|
2145
2151
|
A: [
|
|
2146
2152
|
"invitationId",
|
|
@@ -2153,7 +2159,7 @@ var InvitationsServiceImpl = class {
|
|
|
2153
2159
|
invitationId
|
|
2154
2160
|
}, {
|
|
2155
2161
|
F: __dxlog_file8,
|
|
2156
|
-
L:
|
|
2162
|
+
L: 112,
|
|
2157
2163
|
S: this,
|
|
2158
2164
|
C: (f, a) => f(...a)
|
|
2159
2165
|
});
|
|
@@ -2164,13 +2170,13 @@ var InvitationsServiceImpl = class {
|
|
|
2164
2170
|
async cancelInvitation({ invitationId }) {
|
|
2165
2171
|
log6("deleting...", void 0, {
|
|
2166
2172
|
F: __dxlog_file8,
|
|
2167
|
-
L:
|
|
2173
|
+
L: 119,
|
|
2168
2174
|
S: this,
|
|
2169
2175
|
C: (f, a) => f(...a)
|
|
2170
2176
|
});
|
|
2171
2177
|
invariant7(invitationId, void 0, {
|
|
2172
2178
|
F: __dxlog_file8,
|
|
2173
|
-
L:
|
|
2179
|
+
L: 120,
|
|
2174
2180
|
S: this,
|
|
2175
2181
|
A: [
|
|
2176
2182
|
"invitationId",
|
|
@@ -2192,7 +2198,7 @@ var InvitationsServiceImpl = class {
|
|
|
2192
2198
|
invitationId
|
|
2193
2199
|
}, {
|
|
2194
2200
|
F: __dxlog_file8,
|
|
2195
|
-
L:
|
|
2201
|
+
L: 132,
|
|
2196
2202
|
S: this,
|
|
2197
2203
|
C: (f, a) => f(...a)
|
|
2198
2204
|
});
|
|
@@ -2255,7 +2261,7 @@ import { createAdmissionCredentials, getCredentialAssertion } from "@dxos/creden
|
|
|
2255
2261
|
import { writeMessages as writeMessages2 } from "@dxos/feed-store";
|
|
2256
2262
|
import { invariant as invariant8 } from "@dxos/invariant";
|
|
2257
2263
|
import { log as log7 } from "@dxos/log";
|
|
2258
|
-
import { Invitation as
|
|
2264
|
+
import { Invitation as Invitation5 } from "@dxos/protocols/proto/dxos/client/services";
|
|
2259
2265
|
var __dxlog_file9 = "/home/runner/work/dxos/dxos/packages/sdk/client-services/src/packlets/invitations/space-invitation-protocol.ts";
|
|
2260
2266
|
var SpaceInvitationProtocol = class {
|
|
2261
2267
|
constructor(_spaceManager, _signingContext, _keyring, _spaceKey) {
|
|
@@ -2272,7 +2278,7 @@ var SpaceInvitationProtocol = class {
|
|
|
2272
2278
|
}
|
|
2273
2279
|
getInvitationContext() {
|
|
2274
2280
|
return {
|
|
2275
|
-
kind:
|
|
2281
|
+
kind: Invitation5.Kind.SPACE,
|
|
2276
2282
|
spaceKey: this._spaceKey
|
|
2277
2283
|
};
|
|
2278
2284
|
}
|
|
@@ -2467,7 +2473,7 @@ import { STORAGE_VERSION } from "@dxos/protocols";
|
|
|
2467
2473
|
import { SpaceMember } from "@dxos/protocols/proto/dxos/client/services";
|
|
2468
2474
|
|
|
2469
2475
|
// packages/sdk/client-services/src/version.ts
|
|
2470
|
-
var DXOS_VERSION = "0.1.58-
|
|
2476
|
+
var DXOS_VERSION = "0.1.58-next.3349da8";
|
|
2471
2477
|
|
|
2472
2478
|
// packages/sdk/client-services/src/packlets/services/platform.ts
|
|
2473
2479
|
var getPlatform = () => {
|
|
@@ -2976,6 +2982,7 @@ var DataSpace = class DataSpace2 {
|
|
|
2976
2982
|
await this._open();
|
|
2977
2983
|
}
|
|
2978
2984
|
async _open() {
|
|
2985
|
+
await this._gossip.open();
|
|
2979
2986
|
await this._notarizationPlugin.open();
|
|
2980
2987
|
await this._inner.spaceState.addCredentialProcessor(this._notarizationPlugin);
|
|
2981
2988
|
await this._inner.open(new Context7());
|
|
@@ -2984,7 +2991,7 @@ var DataSpace = class DataSpace2 {
|
|
|
2984
2991
|
state: SpaceState[this._state]
|
|
2985
2992
|
}, {
|
|
2986
2993
|
F: __dxlog_file12,
|
|
2987
|
-
L:
|
|
2994
|
+
L: 159,
|
|
2988
2995
|
S: this,
|
|
2989
2996
|
C: (f, a) => f(...a)
|
|
2990
2997
|
});
|
|
@@ -3002,7 +3009,7 @@ var DataSpace = class DataSpace2 {
|
|
|
3002
3009
|
state: SpaceState[this._state]
|
|
3003
3010
|
}, {
|
|
3004
3011
|
F: __dxlog_file12,
|
|
3005
|
-
L:
|
|
3012
|
+
L: 173,
|
|
3006
3013
|
S: this,
|
|
3007
3014
|
C: (f, a) => f(...a)
|
|
3008
3015
|
});
|
|
@@ -3013,6 +3020,7 @@ var DataSpace = class DataSpace2 {
|
|
|
3013
3020
|
await this._inner.spaceState.removeCredentialProcessor(this._notarizationPlugin);
|
|
3014
3021
|
await this._notarizationPlugin.close();
|
|
3015
3022
|
await this._presence.destroy();
|
|
3023
|
+
await this._gossip.close();
|
|
3016
3024
|
}
|
|
3017
3025
|
async postMessage(channel, message) {
|
|
3018
3026
|
return this._gossip.postMessage(channel, message);
|
|
@@ -3032,7 +3040,7 @@ var DataSpace = class DataSpace2 {
|
|
|
3032
3040
|
if (err instanceof CancelledError) {
|
|
3033
3041
|
log10("data pipeline initialization cancelled", err, {
|
|
3034
3042
|
F: __dxlog_file12,
|
|
3035
|
-
L:
|
|
3043
|
+
L: 205,
|
|
3036
3044
|
S: this,
|
|
3037
3045
|
C: (f, a) => f(...a)
|
|
3038
3046
|
});
|
|
@@ -3040,7 +3048,7 @@ var DataSpace = class DataSpace2 {
|
|
|
3040
3048
|
}
|
|
3041
3049
|
log10.error("Error initializing data pipeline", err, {
|
|
3042
3050
|
F: __dxlog_file12,
|
|
3043
|
-
L:
|
|
3051
|
+
L: 209,
|
|
3044
3052
|
S: this,
|
|
3045
3053
|
C: (f, a) => f(...a)
|
|
3046
3054
|
});
|
|
@@ -3049,7 +3057,7 @@ var DataSpace = class DataSpace2 {
|
|
|
3049
3057
|
state: SpaceState[this._state]
|
|
3050
3058
|
}, {
|
|
3051
3059
|
F: __dxlog_file12,
|
|
3052
|
-
L:
|
|
3060
|
+
L: 211,
|
|
3053
3061
|
S: this,
|
|
3054
3062
|
C: (f, a) => f(...a)
|
|
3055
3063
|
});
|
|
@@ -3069,7 +3077,7 @@ var DataSpace = class DataSpace2 {
|
|
|
3069
3077
|
state: SpaceState[this._state]
|
|
3070
3078
|
}, {
|
|
3071
3079
|
F: __dxlog_file12,
|
|
3072
|
-
L:
|
|
3080
|
+
L: 227,
|
|
3073
3081
|
S: this,
|
|
3074
3082
|
C: (f, a) => f(...a)
|
|
3075
3083
|
});
|
|
@@ -3080,7 +3088,7 @@ var DataSpace = class DataSpace2 {
|
|
|
3080
3088
|
await cancelWithContext2(this._ctx, this._inner.dataPipeline.ensureEpochInitialized());
|
|
3081
3089
|
log10("waiting for data pipeline to reach target timeframe", void 0, {
|
|
3082
3090
|
F: __dxlog_file12,
|
|
3083
|
-
L:
|
|
3091
|
+
L: 241,
|
|
3084
3092
|
S: this,
|
|
3085
3093
|
C: (f, a) => f(...a)
|
|
3086
3094
|
});
|
|
@@ -3091,7 +3099,7 @@ var DataSpace = class DataSpace2 {
|
|
|
3091
3099
|
this.metrics.dataPipelineReady = /* @__PURE__ */ new Date();
|
|
3092
3100
|
log10("data pipeline ready", void 0, {
|
|
3093
3101
|
F: __dxlog_file12,
|
|
3094
|
-
L:
|
|
3102
|
+
L: 250,
|
|
3095
3103
|
S: this,
|
|
3096
3104
|
C: (f, a) => f(...a)
|
|
3097
3105
|
});
|
|
@@ -3101,7 +3109,7 @@ var DataSpace = class DataSpace2 {
|
|
|
3101
3109
|
state: SpaceState[this._state]
|
|
3102
3110
|
}, {
|
|
3103
3111
|
F: __dxlog_file12,
|
|
3104
|
-
L:
|
|
3112
|
+
L: 254,
|
|
3105
3113
|
S: this,
|
|
3106
3114
|
C: (f, a) => f(...a)
|
|
3107
3115
|
});
|
|
@@ -3117,7 +3125,7 @@ var DataSpace = class DataSpace2 {
|
|
|
3117
3125
|
await this._createWritableFeeds();
|
|
3118
3126
|
log10("writable feeds created", void 0, {
|
|
3119
3127
|
F: __dxlog_file12,
|
|
3120
|
-
L:
|
|
3128
|
+
L: 270,
|
|
3121
3129
|
S: this,
|
|
3122
3130
|
C: (f, a) => f(...a)
|
|
3123
3131
|
});
|
|
@@ -3222,7 +3230,7 @@ var DataSpace = class DataSpace2 {
|
|
|
3222
3230
|
state: SpaceState[this._state]
|
|
3223
3231
|
}, {
|
|
3224
3232
|
F: __dxlog_file12,
|
|
3225
|
-
L:
|
|
3233
|
+
L: 386,
|
|
3226
3234
|
S: this,
|
|
3227
3235
|
C: (f, a) => f(...a)
|
|
3228
3236
|
});
|
|
@@ -3861,7 +3869,7 @@ import { Keyring } from "@dxos/keyring";
|
|
|
3861
3869
|
import { PublicKey as PublicKey9 } from "@dxos/keys";
|
|
3862
3870
|
import { log as log13 } from "@dxos/log";
|
|
3863
3871
|
import { STORAGE_VERSION as STORAGE_VERSION2, trace as trace7 } from "@dxos/protocols";
|
|
3864
|
-
import { Invitation as
|
|
3872
|
+
import { Invitation as Invitation6 } from "@dxos/protocols/proto/dxos/client/services";
|
|
3865
3873
|
import { BlobStore } from "@dxos/teleport-extension-object-sync";
|
|
3866
3874
|
import { trace as Trace2 } from "@dxos/tracing";
|
|
3867
3875
|
import { safeInstanceof } from "@dxos/util";
|
|
@@ -3911,7 +3919,7 @@ var ServiceContext = class ServiceContext2 {
|
|
|
3911
3919
|
});
|
|
3912
3920
|
this.identityManager = new IdentityManager(this.metadataStore, this.keyring, this.feedStore, this.spaceManager);
|
|
3913
3921
|
this.invitations = new InvitationsHandler(this.networkManager);
|
|
3914
|
-
this._handlerFactories.set(
|
|
3922
|
+
this._handlerFactories.set(Invitation6.Kind.DEVICE, () => new DeviceInvitationProtocol(this.keyring, () => this.identityManager.identity ?? failUndefined3(), this._acceptIdentity.bind(this)));
|
|
3915
3923
|
}
|
|
3916
3924
|
async open(ctx) {
|
|
3917
3925
|
await this._checkStorageVersion();
|
|
@@ -4030,7 +4038,7 @@ var ServiceContext = class ServiceContext2 {
|
|
|
4030
4038
|
};
|
|
4031
4039
|
this.dataSpaceManager = new DataSpaceManager(this.spaceManager, this.metadataStore, this.dataServiceSubscriptions, this.keyring, signingContext, this.feedStore);
|
|
4032
4040
|
await this.dataSpaceManager.open();
|
|
4033
|
-
this._handlerFactories.set(
|
|
4041
|
+
this._handlerFactories.set(Invitation6.Kind.SPACE, (invitation) => {
|
|
4034
4042
|
invariant12(this.dataSpaceManager, "dataSpaceManager not initialized yet", {
|
|
4035
4043
|
F: __dxlog_file15,
|
|
4036
4044
|
L: 218,
|
|
@@ -4955,4 +4963,4 @@ export {
|
|
|
4955
4963
|
createDefaultModelFactory,
|
|
4956
4964
|
ClientServicesHost
|
|
4957
4965
|
};
|
|
4958
|
-
//# sourceMappingURL=chunk-
|
|
4966
|
+
//# sourceMappingURL=chunk-ARM2DYUZ.mjs.map
|