@dxos/client-services 0.5.9-main.bdf733d → 0.5.9-main.cb71230
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-KNGR7BYM.mjs → chunk-HSM5JUN6.mjs} +43 -22
- package/dist/lib/browser/{chunk-KNGR7BYM.mjs.map → chunk-HSM5JUN6.mjs.map} +3 -3
- 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-WWHTBQNR.cjs → chunk-4OGPGXOU.cjs} +46 -25
- package/dist/lib/node/{chunk-WWHTBQNR.cjs.map → chunk-4OGPGXOU.cjs.map} +3 -3
- package/dist/lib/node/index.cjs +42 -42
- 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.d.ts +1 -0
- package/dist/types/src/packlets/spaces/data-space.d.ts.map +1 -1
- package/dist/types/src/packlets/spaces/spaces-service.d.ts +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/spaces/data-space.ts +14 -0
- package/src/packlets/spaces/spaces-service.ts +2 -2
- package/src/version.ts +1 -1
|
@@ -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_4OGPGXOU_exports = {};
|
|
30
|
+
__export(chunk_4OGPGXOU_exports, {
|
|
31
31
|
ClientRpcServer: () => ClientRpcServer,
|
|
32
32
|
ClientServicesHost: () => ClientServicesHost,
|
|
33
33
|
ClientServicesProviderResource: () => ClientServicesProviderResource,
|
|
@@ -67,7 +67,7 @@ __export(chunk_WWHTBQNR_exports, {
|
|
|
67
67
|
subscribeToSpaces: () => subscribeToSpaces,
|
|
68
68
|
subscribeToSwarmInfo: () => subscribeToSwarmInfo
|
|
69
69
|
});
|
|
70
|
-
module.exports = __toCommonJS(
|
|
70
|
+
module.exports = __toCommonJS(chunk_4OGPGXOU_exports);
|
|
71
71
|
var import_async = require("@dxos/async");
|
|
72
72
|
var import_codec_protobuf = require("@dxos/codec-protobuf");
|
|
73
73
|
var import_feed_store = require("@dxos/feed-store");
|
|
@@ -611,7 +611,7 @@ var DevtoolsServiceImpl = class {
|
|
|
611
611
|
});
|
|
612
612
|
}
|
|
613
613
|
};
|
|
614
|
-
var DXOS_VERSION = "0.5.9-main.
|
|
614
|
+
var DXOS_VERSION = "0.5.9-main.cb71230";
|
|
615
615
|
var getPlatform = () => {
|
|
616
616
|
if (process.browser) {
|
|
617
617
|
if (typeof window !== "undefined") {
|
|
@@ -3935,7 +3935,7 @@ var DataSpace = class {
|
|
|
3935
3935
|
state: import_services11.SpaceState[this._state]
|
|
3936
3936
|
}, {
|
|
3937
3937
|
F: __dxlog_file14,
|
|
3938
|
-
L:
|
|
3938
|
+
L: 143,
|
|
3939
3939
|
S: this,
|
|
3940
3940
|
C: (f, a) => f(...a)
|
|
3941
3941
|
});
|
|
@@ -3988,7 +3988,7 @@ var DataSpace = class {
|
|
|
3988
3988
|
state: import_services11.SpaceState[this._state]
|
|
3989
3989
|
}, {
|
|
3990
3990
|
F: __dxlog_file14,
|
|
3991
|
-
L:
|
|
3991
|
+
L: 206,
|
|
3992
3992
|
S: this,
|
|
3993
3993
|
C: (f, a) => f(...a)
|
|
3994
3994
|
});
|
|
@@ -4006,7 +4006,7 @@ var DataSpace = class {
|
|
|
4006
4006
|
state: import_services11.SpaceState[this._state]
|
|
4007
4007
|
}, {
|
|
4008
4008
|
F: __dxlog_file14,
|
|
4009
|
-
L:
|
|
4009
|
+
L: 220,
|
|
4010
4010
|
S: this,
|
|
4011
4011
|
C: (f, a) => f(...a)
|
|
4012
4012
|
});
|
|
@@ -4038,7 +4038,7 @@ var DataSpace = class {
|
|
|
4038
4038
|
if (err instanceof import_protocols9.CancelledError || err instanceof import_context9.ContextDisposedError) {
|
|
4039
4039
|
(0, import_log10.log)("data pipeline initialization cancelled", err, {
|
|
4040
4040
|
F: __dxlog_file14,
|
|
4041
|
-
L:
|
|
4041
|
+
L: 253,
|
|
4042
4042
|
S: this,
|
|
4043
4043
|
C: (f, a) => f(...a)
|
|
4044
4044
|
});
|
|
@@ -4046,7 +4046,7 @@ var DataSpace = class {
|
|
|
4046
4046
|
}
|
|
4047
4047
|
import_log10.log.error("Error initializing data pipeline", err, {
|
|
4048
4048
|
F: __dxlog_file14,
|
|
4049
|
-
L:
|
|
4049
|
+
L: 257,
|
|
4050
4050
|
S: this,
|
|
4051
4051
|
C: (f, a) => f(...a)
|
|
4052
4052
|
});
|
|
@@ -4055,7 +4055,7 @@ var DataSpace = class {
|
|
|
4055
4055
|
state: import_services11.SpaceState[this._state]
|
|
4056
4056
|
}, {
|
|
4057
4057
|
F: __dxlog_file14,
|
|
4058
|
-
L:
|
|
4058
|
+
L: 259,
|
|
4059
4059
|
S: this,
|
|
4060
4060
|
C: (f, a) => f(...a)
|
|
4061
4061
|
});
|
|
@@ -4075,7 +4075,7 @@ var DataSpace = class {
|
|
|
4075
4075
|
state: import_services11.SpaceState[this._state]
|
|
4076
4076
|
}, {
|
|
4077
4077
|
F: __dxlog_file14,
|
|
4078
|
-
L:
|
|
4078
|
+
L: 275,
|
|
4079
4079
|
S: this,
|
|
4080
4080
|
C: (f, a) => f(...a)
|
|
4081
4081
|
});
|
|
@@ -4085,7 +4085,7 @@ var DataSpace = class {
|
|
|
4085
4085
|
await (0, import_context9.cancelWithContext)(this._ctx, this.automergeSpaceState.ensureEpochInitialized());
|
|
4086
4086
|
(0, import_log10.log)("data pipeline ready", void 0, {
|
|
4087
4087
|
F: __dxlog_file14,
|
|
4088
|
-
L:
|
|
4088
|
+
L: 287,
|
|
4089
4089
|
S: this,
|
|
4090
4090
|
C: (f, a) => f(...a)
|
|
4091
4091
|
});
|
|
@@ -4095,7 +4095,7 @@ var DataSpace = class {
|
|
|
4095
4095
|
state: import_services11.SpaceState[this._state]
|
|
4096
4096
|
}, {
|
|
4097
4097
|
F: __dxlog_file14,
|
|
4098
|
-
L:
|
|
4098
|
+
L: 291,
|
|
4099
4099
|
S: this,
|
|
4100
4100
|
C: (f, a) => f(...a)
|
|
4101
4101
|
});
|
|
@@ -4111,7 +4111,7 @@ var DataSpace = class {
|
|
|
4111
4111
|
await this._createWritableFeeds();
|
|
4112
4112
|
(0, import_log10.log)("writable feeds created", void 0, {
|
|
4113
4113
|
F: __dxlog_file14,
|
|
4114
|
-
L:
|
|
4114
|
+
L: 307,
|
|
4115
4115
|
S: this,
|
|
4116
4116
|
C: (f, a) => f(...a)
|
|
4117
4117
|
});
|
|
@@ -4174,7 +4174,7 @@ var DataSpace = class {
|
|
|
4174
4174
|
rootUrl
|
|
4175
4175
|
}, {
|
|
4176
4176
|
F: __dxlog_file14,
|
|
4177
|
-
L:
|
|
4177
|
+
L: 373,
|
|
4178
4178
|
S: this,
|
|
4179
4179
|
C: (f, a) => f(...a)
|
|
4180
4180
|
});
|
|
@@ -4204,7 +4204,7 @@ var DataSpace = class {
|
|
|
4204
4204
|
rootUrl
|
|
4205
4205
|
}, {
|
|
4206
4206
|
F: __dxlog_file14,
|
|
4207
|
-
L:
|
|
4207
|
+
L: 400,
|
|
4208
4208
|
S: this,
|
|
4209
4209
|
C: (f, a) => f(...a)
|
|
4210
4210
|
});
|
|
@@ -4219,7 +4219,7 @@ var DataSpace = class {
|
|
|
4219
4219
|
err
|
|
4220
4220
|
}, {
|
|
4221
4221
|
F: __dxlog_file14,
|
|
4222
|
-
L:
|
|
4222
|
+
L: 406,
|
|
4223
4223
|
S: this,
|
|
4224
4224
|
C: (f, a) => f(...a)
|
|
4225
4225
|
});
|
|
@@ -4274,7 +4274,7 @@ var DataSpace = class {
|
|
|
4274
4274
|
const newRoot = this._echoHost.automergeRepo.create(rootHandle.docSync());
|
|
4275
4275
|
(0, import_invariant12.invariant)(typeof newRoot.url === "string" && newRoot.url.length > 0, void 0, {
|
|
4276
4276
|
F: __dxlog_file14,
|
|
4277
|
-
L:
|
|
4277
|
+
L: 456,
|
|
4278
4278
|
S: this,
|
|
4279
4279
|
A: [
|
|
4280
4280
|
"typeof newRoot.url === 'string' && newRoot.url.length > 0",
|
|
@@ -4293,7 +4293,7 @@ var DataSpace = class {
|
|
|
4293
4293
|
{
|
|
4294
4294
|
import_log10.log.info("Fragmenting", void 0, {
|
|
4295
4295
|
F: __dxlog_file14,
|
|
4296
|
-
L:
|
|
4296
|
+
L: 468,
|
|
4297
4297
|
S: this,
|
|
4298
4298
|
C: (f, a) => f(...a)
|
|
4299
4299
|
});
|
|
@@ -4305,7 +4305,7 @@ var DataSpace = class {
|
|
|
4305
4305
|
const otherObjects = objects.filter(([key]) => key !== properties?.[0]);
|
|
4306
4306
|
(0, import_invariant12.invariant)(properties, "Properties not found", {
|
|
4307
4307
|
F: __dxlog_file14,
|
|
4308
|
-
L:
|
|
4308
|
+
L: 478,
|
|
4309
4309
|
S: this,
|
|
4310
4310
|
A: [
|
|
4311
4311
|
"properties",
|
|
@@ -4321,7 +4321,7 @@ var DataSpace = class {
|
|
|
4321
4321
|
const newRoot = this._echoHost.automergeRepo.create(newSpaceDoc);
|
|
4322
4322
|
(0, import_invariant12.invariant)(typeof newRoot.url === "string" && newRoot.url.length > 0, void 0, {
|
|
4323
4323
|
F: __dxlog_file14,
|
|
4324
|
-
L:
|
|
4324
|
+
L: 483,
|
|
4325
4325
|
S: this,
|
|
4326
4326
|
A: [
|
|
4327
4327
|
"typeof newRoot.url === 'string' && newRoot.url.length > 0",
|
|
@@ -4349,6 +4349,25 @@ var DataSpace = class {
|
|
|
4349
4349
|
};
|
|
4350
4350
|
}
|
|
4351
4351
|
break;
|
|
4352
|
+
case import_services11.CreateEpochRequest.Migration.REPLACE_AUTOMERGE_ROOT:
|
|
4353
|
+
{
|
|
4354
|
+
(0, import_invariant12.invariant)(options.newAutomergeRoot, void 0, {
|
|
4355
|
+
F: __dxlog_file14,
|
|
4356
|
+
L: 513,
|
|
4357
|
+
S: this,
|
|
4358
|
+
A: [
|
|
4359
|
+
"options.newAutomergeRoot",
|
|
4360
|
+
""
|
|
4361
|
+
]
|
|
4362
|
+
});
|
|
4363
|
+
epoch = {
|
|
4364
|
+
previousId: this._automergeSpaceState.lastEpoch?.id,
|
|
4365
|
+
number: (this._automergeSpaceState.lastEpoch?.subject.assertion.number ?? -1) + 1,
|
|
4366
|
+
timeframe: this._automergeSpaceState.lastEpoch?.subject.assertion.timeframe ?? new import_timeframe2.Timeframe(),
|
|
4367
|
+
automergeRoot: options.newAutomergeRoot
|
|
4368
|
+
};
|
|
4369
|
+
}
|
|
4370
|
+
break;
|
|
4352
4371
|
}
|
|
4353
4372
|
if (!epoch) {
|
|
4354
4373
|
return;
|
|
@@ -4370,6 +4389,7 @@ var DataSpace = class {
|
|
|
4370
4389
|
receipt.seq
|
|
4371
4390
|
]
|
|
4372
4391
|
]));
|
|
4392
|
+
await this._echoHost.updateIndexes();
|
|
4373
4393
|
}
|
|
4374
4394
|
async activate() {
|
|
4375
4395
|
if (this._state !== import_services11.SpaceState.INACTIVE) {
|
|
@@ -4390,7 +4410,7 @@ var DataSpace = class {
|
|
|
4390
4410
|
state: import_services11.SpaceState[this._state]
|
|
4391
4411
|
}, {
|
|
4392
4412
|
F: __dxlog_file14,
|
|
4393
|
-
L:
|
|
4413
|
+
L: 566,
|
|
4394
4414
|
S: this,
|
|
4395
4415
|
C: (f, a) => f(...a)
|
|
4396
4416
|
});
|
|
@@ -5173,11 +5193,12 @@ var SpacesServiceImpl = class {
|
|
|
5173
5193
|
}
|
|
5174
5194
|
}
|
|
5175
5195
|
}
|
|
5176
|
-
async createEpoch({ spaceKey, migration }) {
|
|
5196
|
+
async createEpoch({ spaceKey, migration, automergeRootUrl }) {
|
|
5177
5197
|
const dataSpaceManager = await this._getDataSpaceManager();
|
|
5178
5198
|
const space = dataSpaceManager.spaces.get(spaceKey) ?? (0, import_debug5.raise)(new import_protocols12.SpaceNotFoundError(spaceKey));
|
|
5179
5199
|
await space.createEpoch({
|
|
5180
|
-
migration
|
|
5200
|
+
migration,
|
|
5201
|
+
newAutomergeRoot: automergeRootUrl
|
|
5181
5202
|
});
|
|
5182
5203
|
}
|
|
5183
5204
|
_serializeSpace(space) {
|
|
@@ -6390,4 +6411,4 @@ ClientServicesHost = _ts_decorate8([
|
|
|
6390
6411
|
subscribeToSpaces,
|
|
6391
6412
|
subscribeToSwarmInfo
|
|
6392
6413
|
});
|
|
6393
|
-
//# sourceMappingURL=chunk-
|
|
6414
|
+
//# sourceMappingURL=chunk-4OGPGXOU.cjs.map
|