@dxos/client-services 0.4.10-main.7ab08e9 → 0.4.10-main.93fda5f
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-LAJ3V2AH.mjs → chunk-ULO2U4N6.mjs} +19 -81
- package/dist/lib/browser/{chunk-LAJ3V2AH.mjs.map → chunk-ULO2U4N6.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-ZVSJIOW6.cjs → chunk-4TLGRMKO.cjs} +27 -89
- package/dist/lib/node/chunk-4TLGRMKO.cjs.map +7 -0
- package/dist/lib/node/index.cjs +37 -37
- package/dist/lib/node/meta.json +1 -1
- package/dist/lib/node/packlets/testing/index.cjs +6 -6
- 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 +34 -34
- package/src/packlets/services/service-host.ts +2 -2
- package/src/packlets/spaces/data-space.ts +2 -51
- package/src/version.ts +1 -1
- package/dist/lib/node/chunk-ZVSJIOW6.cjs.map +0 -7
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dxos/client-services",
|
|
3
|
-
"version": "0.4.10-main.
|
|
3
|
+
"version": "0.4.10-main.93fda5f",
|
|
4
4
|
"description": "DXOS client services implementation",
|
|
5
5
|
"homepage": "https://dxos.org",
|
|
6
6
|
"bugs": "https://github.com/dxos/dxos/issues",
|
|
@@ -22,43 +22,43 @@
|
|
|
22
22
|
],
|
|
23
23
|
"dependencies": {
|
|
24
24
|
"platform": "^1.3.6",
|
|
25
|
-
"@dxos/
|
|
26
|
-
"@dxos/
|
|
27
|
-
"@dxos/client-protocol": "0.4.10-main.
|
|
28
|
-
"@dxos/
|
|
29
|
-
"@dxos/
|
|
30
|
-
"@dxos/context": "0.4.10-main.
|
|
31
|
-
"@dxos/
|
|
32
|
-
"@dxos/
|
|
33
|
-
"@dxos/debug": "0.4.10-main.
|
|
34
|
-
"@dxos/echo-
|
|
35
|
-
"@dxos/echo-
|
|
36
|
-
"@dxos/echo-
|
|
37
|
-
"@dxos/feed-store": "0.4.10-main.
|
|
38
|
-
"@dxos/indexing": "0.4.10-main.
|
|
39
|
-
"@dxos/invariant": "0.4.10-main.
|
|
40
|
-
"@dxos/keyring": "0.4.10-main.
|
|
41
|
-
"@dxos/
|
|
42
|
-
"@dxos/
|
|
43
|
-
"@dxos/
|
|
44
|
-
"@dxos/
|
|
45
|
-
"@dxos/
|
|
46
|
-
"@dxos/node-std": "0.4.10-main.
|
|
47
|
-
"@dxos/
|
|
48
|
-
"@dxos/
|
|
49
|
-
"@dxos/
|
|
50
|
-
"@dxos/teleport": "0.4.10-main.
|
|
51
|
-
"@dxos/teleport-extension-gossip": "0.4.10-main.
|
|
52
|
-
"@dxos/
|
|
53
|
-
"@dxos/
|
|
54
|
-
"@dxos/tracing": "0.4.10-main.
|
|
55
|
-
"@dxos/util": "0.4.10-main.
|
|
56
|
-
"@dxos/websocket-rpc": "0.4.10-main.
|
|
25
|
+
"@dxos/automerge": "0.4.10-main.93fda5f",
|
|
26
|
+
"@dxos/async": "0.4.10-main.93fda5f",
|
|
27
|
+
"@dxos/client-protocol": "0.4.10-main.93fda5f",
|
|
28
|
+
"@dxos/config": "0.4.10-main.93fda5f",
|
|
29
|
+
"@dxos/codec-protobuf": "0.4.10-main.93fda5f",
|
|
30
|
+
"@dxos/context": "0.4.10-main.93fda5f",
|
|
31
|
+
"@dxos/credentials": "0.4.10-main.93fda5f",
|
|
32
|
+
"@dxos/crypto": "0.4.10-main.93fda5f",
|
|
33
|
+
"@dxos/debug": "0.4.10-main.93fda5f",
|
|
34
|
+
"@dxos/echo-pipeline": "0.4.10-main.93fda5f",
|
|
35
|
+
"@dxos/echo-schema": "0.4.10-main.93fda5f",
|
|
36
|
+
"@dxos/echo-db": "0.4.10-main.93fda5f",
|
|
37
|
+
"@dxos/feed-store": "0.4.10-main.93fda5f",
|
|
38
|
+
"@dxos/indexing": "0.4.10-main.93fda5f",
|
|
39
|
+
"@dxos/invariant": "0.4.10-main.93fda5f",
|
|
40
|
+
"@dxos/keyring": "0.4.10-main.93fda5f",
|
|
41
|
+
"@dxos/log": "0.4.10-main.93fda5f",
|
|
42
|
+
"@dxos/messaging": "0.4.10-main.93fda5f",
|
|
43
|
+
"@dxos/network-manager": "0.4.10-main.93fda5f",
|
|
44
|
+
"@dxos/keys": "0.4.10-main.93fda5f",
|
|
45
|
+
"@dxos/lock-file": "0.4.10-main.93fda5f",
|
|
46
|
+
"@dxos/node-std": "0.4.10-main.93fda5f",
|
|
47
|
+
"@dxos/protocols": "0.4.10-main.93fda5f",
|
|
48
|
+
"@dxos/rpc": "0.4.10-main.93fda5f",
|
|
49
|
+
"@dxos/random-access-storage": "0.4.10-main.93fda5f",
|
|
50
|
+
"@dxos/teleport-extension-object-sync": "0.4.10-main.93fda5f",
|
|
51
|
+
"@dxos/teleport-extension-gossip": "0.4.10-main.93fda5f",
|
|
52
|
+
"@dxos/timeframe": "0.4.10-main.93fda5f",
|
|
53
|
+
"@dxos/teleport": "0.4.10-main.93fda5f",
|
|
54
|
+
"@dxos/tracing": "0.4.10-main.93fda5f",
|
|
55
|
+
"@dxos/util": "0.4.10-main.93fda5f",
|
|
56
|
+
"@dxos/websocket-rpc": "0.4.10-main.93fda5f"
|
|
57
57
|
},
|
|
58
58
|
"devDependencies": {
|
|
59
59
|
"@types/platform": "^1.3.4",
|
|
60
60
|
"@types/readable-stream": "^2.3.9",
|
|
61
|
-
"@dxos/signal": "0.4.10-main.
|
|
61
|
+
"@dxos/signal": "0.4.10-main.93fda5f"
|
|
62
62
|
},
|
|
63
63
|
"publishConfig": {
|
|
64
64
|
"access": "public"
|
|
@@ -6,8 +6,8 @@ import { Event, synchronized } from '@dxos/async';
|
|
|
6
6
|
import { Properties, clientServiceBundle, defaultKey, type ClientServices } from '@dxos/client-protocol';
|
|
7
7
|
import { type Config } from '@dxos/config';
|
|
8
8
|
import { Context } from '@dxos/context';
|
|
9
|
-
import { DataServiceImpl
|
|
10
|
-
import { getAutomergeObjectCore, getRawDoc, type TypedObject } from '@dxos/echo-schema';
|
|
9
|
+
import { DataServiceImpl } from '@dxos/echo-pipeline';
|
|
10
|
+
import { getAutomergeObjectCore, getRawDoc, type SpaceDoc, type TypedObject } from '@dxos/echo-schema';
|
|
11
11
|
import { IndexServiceImpl } from '@dxos/indexing';
|
|
12
12
|
import { invariant } from '@dxos/invariant';
|
|
13
13
|
import { PublicKey } from '@dxos/keys';
|
|
@@ -6,15 +6,7 @@ import { Event, asyncTimeout, scheduleTask, sleep, synchronized, trackLeaks } fr
|
|
|
6
6
|
import { AUTH_TIMEOUT } from '@dxos/client-protocol';
|
|
7
7
|
import { cancelWithContext, Context, ContextDisposedError } from '@dxos/context';
|
|
8
8
|
import { timed, warnAfterTimeout } from '@dxos/debug';
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
type MetadataStore,
|
|
12
|
-
type Space,
|
|
13
|
-
createMappedFeedWriter,
|
|
14
|
-
type AutomergeHost,
|
|
15
|
-
type SpaceDoc,
|
|
16
|
-
} from '@dxos/echo-pipeline';
|
|
17
|
-
import { AutomergeDocumentLoaderImpl } from '@dxos/echo-pipeline';
|
|
9
|
+
import { type MetadataStore, type Space, createMappedFeedWriter, type AutomergeHost } from '@dxos/echo-pipeline';
|
|
18
10
|
import { type FeedStore } from '@dxos/feed-store';
|
|
19
11
|
import { failedInvariant, invariant } from '@dxos/invariant';
|
|
20
12
|
import { type Keyring } from '@dxos/keyring';
|
|
@@ -34,7 +26,7 @@ import { type GossipMessage } from '@dxos/protocols/proto/dxos/mesh/teleport/gos
|
|
|
34
26
|
import { type Gossip, type Presence } from '@dxos/teleport-extension-gossip';
|
|
35
27
|
import { Timeframe } from '@dxos/timeframe';
|
|
36
28
|
import { trace } from '@dxos/tracing';
|
|
37
|
-
import { ComplexSet
|
|
29
|
+
import { ComplexSet } from '@dxos/util';
|
|
38
30
|
|
|
39
31
|
import { AutomergeSpaceState } from './automerge-space-state';
|
|
40
32
|
import { type SigningContext } from './data-space-manager';
|
|
@@ -445,47 +437,6 @@ export class DataSpace {
|
|
|
445
437
|
};
|
|
446
438
|
}
|
|
447
439
|
break;
|
|
448
|
-
case CreateEpochRequest.Migration.FRAGMENT_AUTOMERGE_ROOT:
|
|
449
|
-
{
|
|
450
|
-
log.info('Fragmenting');
|
|
451
|
-
|
|
452
|
-
const currentRootUrl = this._automergeSpaceState.rootUrl;
|
|
453
|
-
const rootHandle = this._automergeHost.repo.find<SpaceDoc>(currentRootUrl as any);
|
|
454
|
-
await cancelWithContext(this._ctx, asyncTimeout(rootHandle.whenReady(), 10_000));
|
|
455
|
-
|
|
456
|
-
// Find properties object.
|
|
457
|
-
const objects = Object.entries((rootHandle.docSync() as SpaceDoc).objects!);
|
|
458
|
-
const properties = objects.find(([_, value]) => value.system.type?.itemId === TYPE_PROPERTIES);
|
|
459
|
-
const otherObjects = objects.filter(([key]) => key !== properties?.[0]);
|
|
460
|
-
invariant(properties, 'Properties not found');
|
|
461
|
-
|
|
462
|
-
// Create a new space doc with the properties object.
|
|
463
|
-
const newSpaceDoc: SpaceDoc = { ...rootHandle.docSync(), objects: Object.fromEntries([properties]) };
|
|
464
|
-
const newRoot = this._automergeHost.repo.create(newSpaceDoc);
|
|
465
|
-
invariant(typeof newRoot.url === 'string' && newRoot.url.length > 0);
|
|
466
|
-
|
|
467
|
-
// Create new automerge documents for all objects.
|
|
468
|
-
const docLoader = new AutomergeDocumentLoaderImpl(this.key, this._automergeHost.repo);
|
|
469
|
-
await docLoader.loadSpaceRootDocHandle(this._ctx, { rootUrl: newRoot.url });
|
|
470
|
-
|
|
471
|
-
otherObjects.forEach(([key, value]) => {
|
|
472
|
-
const handle = docLoader.createDocumentForObject(key);
|
|
473
|
-
handle.change((doc: any) => {
|
|
474
|
-
assignDeep(doc, ['objects', key], value);
|
|
475
|
-
});
|
|
476
|
-
});
|
|
477
|
-
|
|
478
|
-
// TODO(mykola): Delete old root.
|
|
479
|
-
|
|
480
|
-
// TODO(dmaretskyi): Unify epoch construction.
|
|
481
|
-
epoch = {
|
|
482
|
-
previousId: this._automergeSpaceState.lastEpoch?.id,
|
|
483
|
-
number: (this._automergeSpaceState.lastEpoch?.subject.assertion.number ?? -1) + 1,
|
|
484
|
-
timeframe: this._automergeSpaceState.lastEpoch?.subject.assertion.timeframe ?? new Timeframe(),
|
|
485
|
-
automergeRoot: newRoot.url,
|
|
486
|
-
};
|
|
487
|
-
}
|
|
488
|
-
break;
|
|
489
440
|
}
|
|
490
441
|
|
|
491
442
|
if (!epoch) {
|
package/src/version.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const DXOS_VERSION = "0.4.10-main.
|
|
1
|
+
export const DXOS_VERSION = "0.4.10-main.93fda5f";
|