@dxos/client-services 0.3.9-main.f8fc6b9 → 0.3.9-next.35264cb
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-F2XXOT7U.mjs → chunk-7MLIZXJG.mjs} +26 -25
- package/dist/lib/browser/chunk-7MLIZXJG.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-ZZBDK4AA.cjs → chunk-5S4LILTZ.cjs} +29 -28
- package/dist/lib/node/{chunk-ZZBDK4AA.cjs.map → chunk-5S4LILTZ.cjs.map} +3 -3
- package/dist/lib/node/index.cjs +37 -37
- package/dist/lib/node/meta.json +1 -1
- package/dist/lib/node/packlets/testing/index.cjs +8 -8
- package/dist/types/src/packlets/services/automerge-host.test.d.ts +2 -0
- package/dist/types/src/packlets/services/automerge-host.test.d.ts.map +1 -0
- package/dist/types/src/packlets/services/service-context.d.ts.map +1 -1
- package/dist/types/src/packlets/spaces/data-space.d.ts +2 -2
- 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/services/automerge-host.test.ts +56 -0
- package/src/packlets/services/service-context.ts +1 -0
- package/src/packlets/spaces/data-space-manager.ts +1 -1
- package/src/packlets/spaces/data-space.ts +5 -6
- package/src/version.ts +1 -1
- package/dist/lib/browser/chunk-F2XXOT7U.mjs.map +0 -7
|
@@ -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_5S4LILTZ_exports = {};
|
|
30
|
+
__export(chunk_5S4LILTZ_exports, {
|
|
31
31
|
ClientRpcServer: () => ClientRpcServer,
|
|
32
32
|
ClientServicesHost: () => ClientServicesHost,
|
|
33
33
|
DataSpace: () => DataSpace,
|
|
@@ -60,7 +60,7 @@ __export(chunk_ZZBDK4AA_exports, {
|
|
|
60
60
|
subscribeToSpaces: () => subscribeToSpaces,
|
|
61
61
|
subscribeToSwarmInfo: () => subscribeToSwarmInfo
|
|
62
62
|
});
|
|
63
|
-
module.exports = __toCommonJS(
|
|
63
|
+
module.exports = __toCommonJS(chunk_5S4LILTZ_exports);
|
|
64
64
|
var import_async = require("@dxos/async");
|
|
65
65
|
var import_codec_protobuf = require("@dxos/codec-protobuf");
|
|
66
66
|
var import_feed_store = require("@dxos/feed-store");
|
|
@@ -2649,7 +2649,7 @@ var getPlatform = () => {
|
|
|
2649
2649
|
};
|
|
2650
2650
|
}
|
|
2651
2651
|
};
|
|
2652
|
-
var DXOS_VERSION = "0.3.9-
|
|
2652
|
+
var DXOS_VERSION = "0.3.9-next.35264cb";
|
|
2653
2653
|
var __dxlog_file10 = "/home/runner/work/dxos/dxos/packages/sdk/client-services/src/packlets/services/diagnostics.ts";
|
|
2654
2654
|
var DEFAULT_TIMEOUT = 1e3;
|
|
2655
2655
|
var createDiagnostics = async (clientServices, serviceContext, config) => {
|
|
@@ -3061,7 +3061,6 @@ var DataSpace = class DataSpace2 {
|
|
|
3061
3061
|
this._ctx = new import_context6.Context();
|
|
3062
3062
|
this._notarizationPlugin = new NotarizationPlugin();
|
|
3063
3063
|
this._cache = void 0;
|
|
3064
|
-
this._automergeHost = void 0;
|
|
3065
3064
|
this._automergeSpaceState = new AutomergeSpaceState();
|
|
3066
3065
|
this._state = import_services7.SpaceState.CLOSED;
|
|
3067
3066
|
this.error = void 0;
|
|
@@ -3076,6 +3075,7 @@ var DataSpace = class DataSpace2 {
|
|
|
3076
3075
|
this._metadataStore = params.metadataStore;
|
|
3077
3076
|
this._signingContext = params.signingContext;
|
|
3078
3077
|
this._callbacks = params.callbacks ?? {};
|
|
3078
|
+
this._automergeHost = params.automergeHost;
|
|
3079
3079
|
this.authVerifier = new TrustedKeySetAuthVerifier({
|
|
3080
3080
|
trustedKeysProvider: () => new import_util4.ComplexSet(import_keys7.PublicKey.hash, Array.from(this._inner.spaceState.members.values()).filter((member) => !member.removed).map((member) => member.key)),
|
|
3081
3081
|
update: this._inner.stateUpdate,
|
|
@@ -3087,7 +3087,7 @@ var DataSpace = class DataSpace2 {
|
|
|
3087
3087
|
state: import_services7.SpaceState[this._state]
|
|
3088
3088
|
}, {
|
|
3089
3089
|
F: __dxlog_file12,
|
|
3090
|
-
L:
|
|
3090
|
+
L: 137,
|
|
3091
3091
|
S: this,
|
|
3092
3092
|
C: (f, a) => f(...a)
|
|
3093
3093
|
});
|
|
@@ -3134,7 +3134,7 @@ var DataSpace = class DataSpace2 {
|
|
|
3134
3134
|
state: import_services7.SpaceState[this._state]
|
|
3135
3135
|
}, {
|
|
3136
3136
|
F: __dxlog_file12,
|
|
3137
|
-
L:
|
|
3137
|
+
L: 189,
|
|
3138
3138
|
S: this,
|
|
3139
3139
|
C: (f, a) => f(...a)
|
|
3140
3140
|
});
|
|
@@ -3152,7 +3152,7 @@ var DataSpace = class DataSpace2 {
|
|
|
3152
3152
|
state: import_services7.SpaceState[this._state]
|
|
3153
3153
|
}, {
|
|
3154
3154
|
F: __dxlog_file12,
|
|
3155
|
-
L:
|
|
3155
|
+
L: 203,
|
|
3156
3156
|
S: this,
|
|
3157
3157
|
C: (f, a) => f(...a)
|
|
3158
3158
|
});
|
|
@@ -3184,7 +3184,7 @@ var DataSpace = class DataSpace2 {
|
|
|
3184
3184
|
if (err instanceof import_protocols6.CancelledError) {
|
|
3185
3185
|
(0, import_log9.log)("data pipeline initialization cancelled", err, {
|
|
3186
3186
|
F: __dxlog_file12,
|
|
3187
|
-
L:
|
|
3187
|
+
L: 236,
|
|
3188
3188
|
S: this,
|
|
3189
3189
|
C: (f, a) => f(...a)
|
|
3190
3190
|
});
|
|
@@ -3192,7 +3192,7 @@ var DataSpace = class DataSpace2 {
|
|
|
3192
3192
|
}
|
|
3193
3193
|
import_log9.log.error("Error initializing data pipeline", err, {
|
|
3194
3194
|
F: __dxlog_file12,
|
|
3195
|
-
L:
|
|
3195
|
+
L: 240,
|
|
3196
3196
|
S: this,
|
|
3197
3197
|
C: (f, a) => f(...a)
|
|
3198
3198
|
});
|
|
@@ -3201,7 +3201,7 @@ var DataSpace = class DataSpace2 {
|
|
|
3201
3201
|
state: import_services7.SpaceState[this._state]
|
|
3202
3202
|
}, {
|
|
3203
3203
|
F: __dxlog_file12,
|
|
3204
|
-
L:
|
|
3204
|
+
L: 242,
|
|
3205
3205
|
S: this,
|
|
3206
3206
|
C: (f, a) => f(...a)
|
|
3207
3207
|
});
|
|
@@ -3221,7 +3221,7 @@ var DataSpace = class DataSpace2 {
|
|
|
3221
3221
|
state: import_services7.SpaceState[this._state]
|
|
3222
3222
|
}, {
|
|
3223
3223
|
F: __dxlog_file12,
|
|
3224
|
-
L:
|
|
3224
|
+
L: 258,
|
|
3225
3225
|
S: this,
|
|
3226
3226
|
C: (f, a) => f(...a)
|
|
3227
3227
|
});
|
|
@@ -3232,7 +3232,7 @@ var DataSpace = class DataSpace2 {
|
|
|
3232
3232
|
await (0, import_context6.cancelWithContext)(this._ctx, this._inner.dataPipeline.ensureEpochInitialized());
|
|
3233
3233
|
(0, import_log9.log)("waiting for data pipeline to reach target timeframe", void 0, {
|
|
3234
3234
|
F: __dxlog_file12,
|
|
3235
|
-
L:
|
|
3235
|
+
L: 272,
|
|
3236
3236
|
S: this,
|
|
3237
3237
|
C: (f, a) => f(...a)
|
|
3238
3238
|
});
|
|
@@ -3243,7 +3243,7 @@ var DataSpace = class DataSpace2 {
|
|
|
3243
3243
|
this.metrics.dataPipelineReady = /* @__PURE__ */ new Date();
|
|
3244
3244
|
(0, import_log9.log)("data pipeline ready", void 0, {
|
|
3245
3245
|
F: __dxlog_file12,
|
|
3246
|
-
L:
|
|
3246
|
+
L: 281,
|
|
3247
3247
|
S: this,
|
|
3248
3248
|
C: (f, a) => f(...a)
|
|
3249
3249
|
});
|
|
@@ -3253,7 +3253,7 @@ var DataSpace = class DataSpace2 {
|
|
|
3253
3253
|
state: import_services7.SpaceState[this._state]
|
|
3254
3254
|
}, {
|
|
3255
3255
|
F: __dxlog_file12,
|
|
3256
|
-
L:
|
|
3256
|
+
L: 285,
|
|
3257
3257
|
S: this,
|
|
3258
3258
|
C: (f, a) => f(...a)
|
|
3259
3259
|
});
|
|
@@ -3269,7 +3269,7 @@ var DataSpace = class DataSpace2 {
|
|
|
3269
3269
|
await this._createWritableFeeds();
|
|
3270
3270
|
(0, import_log9.log)("writable feeds created", void 0, {
|
|
3271
3271
|
F: __dxlog_file12,
|
|
3272
|
-
L:
|
|
3272
|
+
L: 301,
|
|
3273
3273
|
S: this,
|
|
3274
3274
|
C: (f, a) => f(...a)
|
|
3275
3275
|
});
|
|
@@ -3351,12 +3351,12 @@ var DataSpace = class DataSpace2 {
|
|
|
3351
3351
|
}
|
|
3352
3352
|
break;
|
|
3353
3353
|
case import_services7.CreateEpochRequest.Migration.INIT_AUTOMERGE: {
|
|
3354
|
-
const document = this._automergeHost
|
|
3354
|
+
const document = this._automergeHost.repo.create();
|
|
3355
3355
|
epoch = {
|
|
3356
3356
|
previousId: this._automergeSpaceState.lastEpoch?.id,
|
|
3357
3357
|
number: (this._automergeSpaceState.lastEpoch?.subject.assertion.number ?? -1) + 1,
|
|
3358
3358
|
timeframe: this._automergeSpaceState.lastEpoch?.subject.assertion.timeframe ?? new import_timeframe2.Timeframe(),
|
|
3359
|
-
automergeRoot: document
|
|
3359
|
+
automergeRoot: document.url
|
|
3360
3360
|
};
|
|
3361
3361
|
}
|
|
3362
3362
|
}
|
|
@@ -3409,7 +3409,7 @@ var DataSpace = class DataSpace2 {
|
|
|
3409
3409
|
state: import_services7.SpaceState[this._state]
|
|
3410
3410
|
}, {
|
|
3411
3411
|
F: __dxlog_file12,
|
|
3412
|
-
L:
|
|
3412
|
+
L: 450,
|
|
3413
3413
|
S: this,
|
|
3414
3414
|
C: (f, a) => f(...a)
|
|
3415
3415
|
});
|
|
@@ -4153,6 +4153,7 @@ var ServiceContext = class ServiceContext2 {
|
|
|
4153
4153
|
if (this._deviceSpaceSync && this.identityManager.identity) {
|
|
4154
4154
|
await this.identityManager.identity.space.spaceState.removeCredentialProcessor(this._deviceSpaceSync);
|
|
4155
4155
|
}
|
|
4156
|
+
await this.automergeHost.close();
|
|
4156
4157
|
await this.dataSpaceManager?.close();
|
|
4157
4158
|
await this.identityManager.close();
|
|
4158
4159
|
await this.spaceManager.close();
|
|
@@ -4163,7 +4164,7 @@ var ServiceContext = class ServiceContext2 {
|
|
|
4163
4164
|
await this.metadataStore.close();
|
|
4164
4165
|
(0, import_log13.log)("closed", void 0, {
|
|
4165
4166
|
F: __dxlog_file15,
|
|
4166
|
-
L:
|
|
4167
|
+
L: 162,
|
|
4167
4168
|
S: this,
|
|
4168
4169
|
C: (f, a) => f(...a)
|
|
4169
4170
|
});
|
|
@@ -4177,7 +4178,7 @@ var ServiceContext = class ServiceContext2 {
|
|
|
4177
4178
|
const factory = this._handlerFactories.get(invitation.kind);
|
|
4178
4179
|
(0, import_invariant13.invariant)(factory, `Unknown invitation kind: ${invitation.kind}`, {
|
|
4179
4180
|
F: __dxlog_file15,
|
|
4180
|
-
L:
|
|
4181
|
+
L: 173,
|
|
4181
4182
|
S: this,
|
|
4182
4183
|
A: [
|
|
4183
4184
|
"factory",
|
|
@@ -4209,7 +4210,7 @@ var ServiceContext = class ServiceContext2 {
|
|
|
4209
4210
|
async _initialize(ctx) {
|
|
4210
4211
|
(0, import_log13.log)("initializing spaces...", void 0, {
|
|
4211
4212
|
F: __dxlog_file15,
|
|
4212
|
-
L:
|
|
4213
|
+
L: 204,
|
|
4213
4214
|
S: this,
|
|
4214
4215
|
C: (f, a) => f(...a)
|
|
4215
4216
|
});
|
|
@@ -4232,7 +4233,7 @@ var ServiceContext = class ServiceContext2 {
|
|
|
4232
4233
|
this._handlerFactories.set(import_services10.Invitation.Kind.SPACE, (invitation) => {
|
|
4233
4234
|
(0, import_invariant13.invariant)(this.dataSpaceManager, "dataSpaceManager not initialized yet", {
|
|
4234
4235
|
F: __dxlog_file15,
|
|
4235
|
-
L:
|
|
4236
|
+
L: 228,
|
|
4236
4237
|
S: this,
|
|
4237
4238
|
A: [
|
|
4238
4239
|
"this.dataSpaceManager",
|
|
@@ -4256,7 +4257,7 @@ var ServiceContext = class ServiceContext2 {
|
|
|
4256
4257
|
details: assertion
|
|
4257
4258
|
}, {
|
|
4258
4259
|
F: __dxlog_file15,
|
|
4259
|
-
L:
|
|
4260
|
+
L: 244,
|
|
4260
4261
|
S: this,
|
|
4261
4262
|
C: (f, a) => f(...a)
|
|
4262
4263
|
});
|
|
@@ -4267,7 +4268,7 @@ var ServiceContext = class ServiceContext2 {
|
|
|
4267
4268
|
details: assertion
|
|
4268
4269
|
}, {
|
|
4269
4270
|
F: __dxlog_file15,
|
|
4270
|
-
L:
|
|
4271
|
+
L: 248,
|
|
4271
4272
|
S: this,
|
|
4272
4273
|
C: (f, a) => f(...a)
|
|
4273
4274
|
});
|
|
@@ -4278,7 +4279,7 @@ var ServiceContext = class ServiceContext2 {
|
|
|
4278
4279
|
details: assertion
|
|
4279
4280
|
}, {
|
|
4280
4281
|
F: __dxlog_file15,
|
|
4281
|
-
L:
|
|
4282
|
+
L: 253,
|
|
4282
4283
|
S: this,
|
|
4283
4284
|
C: (f, a) => f(...a)
|
|
4284
4285
|
});
|
|
@@ -4289,7 +4290,7 @@ var ServiceContext = class ServiceContext2 {
|
|
|
4289
4290
|
} catch (err) {
|
|
4290
4291
|
import_log13.log.catch(err, void 0, {
|
|
4291
4292
|
F: __dxlog_file15,
|
|
4292
|
-
L:
|
|
4293
|
+
L: 259,
|
|
4293
4294
|
S: this,
|
|
4294
4295
|
C: (f, a) => f(...a)
|
|
4295
4296
|
});
|
|
@@ -5069,4 +5070,4 @@ ClientServicesHost = _ts_decorate8([
|
|
|
5069
5070
|
subscribeToSpaces,
|
|
5070
5071
|
subscribeToSwarmInfo
|
|
5071
5072
|
});
|
|
5072
|
-
//# sourceMappingURL=chunk-
|
|
5073
|
+
//# sourceMappingURL=chunk-5S4LILTZ.cjs.map
|