@dxos/echo-pipeline 0.3.2-main.220594a → 0.3.2-main.3d933cf
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-ULPX2BNM.mjs → chunk-7IXNAFKL.mjs} +22 -22
- package/dist/lib/browser/chunk-7IXNAFKL.mjs.map +7 -0
- package/dist/lib/browser/index.mjs +1 -1
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/testing/index.mjs +1 -1
- package/dist/lib/browser/testing/index.mjs.map +2 -2
- package/dist/lib/node/index.cjs +21 -21
- package/dist/lib/node/index.cjs.map +2 -2
- package/dist/lib/node/meta.json +1 -1
- package/dist/lib/node/testing/index.cjs +21 -21
- package/dist/lib/node/testing/index.cjs.map +2 -2
- package/dist/types/src/common/codec.d.ts +1 -1
- package/dist/types/src/common/codec.d.ts.map +1 -1
- package/dist/types/src/common/feeds.d.ts +2 -2
- package/dist/types/src/common/feeds.d.ts.map +1 -1
- package/dist/types/src/db-host/data-service-host.d.ts +4 -4
- package/dist/types/src/db-host/data-service-host.d.ts.map +1 -1
- package/dist/types/src/db-host/data-service.d.ts +3 -3
- package/dist/types/src/db-host/data-service.d.ts.map +1 -1
- package/dist/types/src/db-host/database-host.d.ts +5 -5
- package/dist/types/src/db-host/database-host.d.ts.map +1 -1
- package/dist/types/src/db-host/snapshot-manager.d.ts +3 -3
- package/dist/types/src/db-host/snapshot-manager.d.ts.map +1 -1
- package/dist/types/src/db-host/snapshot-store.d.ts +2 -2
- package/dist/types/src/db-host/snapshot-store.d.ts.map +1 -1
- package/dist/types/src/metadata/metadata-store.d.ts +3 -3
- package/dist/types/src/metadata/metadata-store.d.ts.map +1 -1
- package/dist/types/src/pipeline/index.d.ts +1 -1
- package/dist/types/src/pipeline/index.d.ts.map +1 -1
- package/dist/types/src/pipeline/message-selector.d.ts +2 -2
- package/dist/types/src/pipeline/message-selector.d.ts.map +1 -1
- package/dist/types/src/pipeline/pipeline.d.ts +2 -2
- package/dist/types/src/pipeline/pipeline.d.ts.map +1 -1
- package/dist/types/src/pipeline/timeframe-clock.d.ts +2 -2
- package/dist/types/src/pipeline/timeframe-clock.d.ts.map +1 -1
- package/dist/types/src/space/auth.d.ts +2 -2
- package/dist/types/src/space/auth.d.ts.map +1 -1
- package/dist/types/src/space/control-pipeline.d.ts +6 -6
- package/dist/types/src/space/control-pipeline.d.ts.map +1 -1
- package/dist/types/src/space/data-pipeline.d.ts +6 -6
- package/dist/types/src/space/data-pipeline.d.ts.map +1 -1
- package/dist/types/src/space/space-manager.d.ts +9 -9
- package/dist/types/src/space/space-manager.d.ts.map +1 -1
- package/dist/types/src/space/space-protocol.d.ts +6 -6
- package/dist/types/src/space/space-protocol.d.ts.map +1 -1
- package/dist/types/src/space/space.d.ts +12 -12
- package/dist/types/src/space/space.d.ts.map +1 -1
- package/dist/types/src/testing/database-test-rig.d.ts +2 -2
- package/dist/types/src/testing/database-test-rig.d.ts.map +1 -1
- package/dist/types/src/testing/test-agent-builder.d.ts +4 -4
- package/dist/types/src/testing/test-agent-builder.d.ts.map +1 -1
- package/dist/types/src/testing/util.d.ts +2 -2
- package/dist/types/src/testing/util.d.ts.map +1 -1
- package/package.json +31 -31
- package/src/common/codec.ts +1 -1
- package/src/common/feeds.ts +2 -2
- package/src/db-host/data-service-host.ts +6 -6
- package/src/db-host/data-service.ts +8 -8
- package/src/db-host/database-host.ts +5 -5
- package/src/db-host/snapshot-manager.ts +3 -3
- package/src/db-host/snapshot-store.test.ts +1 -1
- package/src/db-host/snapshot-store.ts +2 -2
- package/src/metadata/metadata-store.ts +7 -7
- package/src/pipeline/index.ts +1 -1
- package/src/pipeline/message-selector.ts +2 -2
- package/src/pipeline/pipeline-stress.test.ts +3 -3
- package/src/pipeline/pipeline.test.ts +1 -1
- package/src/pipeline/pipeline.ts +2 -2
- package/src/pipeline/timeframe-clock.ts +2 -2
- package/src/space/auth.ts +2 -2
- package/src/space/control-pipeline.test.ts +1 -1
- package/src/space/control-pipeline.ts +8 -8
- package/src/space/data-pipeline.ts +17 -12
- package/src/space/space-manager.ts +9 -9
- package/src/space/space-protocol.ts +10 -10
- package/src/space/space.ts +12 -12
- package/src/testing/database-test-rig.ts +5 -5
- package/src/testing/test-agent-builder.ts +5 -5
- package/src/testing/util.ts +3 -3
- package/src/tests/database-unit.test.ts +1 -1
- package/src/tests/database.test.ts +1 -1
- package/dist/lib/browser/chunk-ULPX2BNM.mjs.map +0 -7
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dxos/echo-pipeline",
|
|
3
|
-
"version": "0.3.2-main.
|
|
3
|
+
"version": "0.3.2-main.3d933cf",
|
|
4
4
|
"description": "ECHO database.",
|
|
5
5
|
"homepage": "https://dxos.org",
|
|
6
6
|
"bugs": "https://github.com/dxos/dxos/issues",
|
|
@@ -20,36 +20,36 @@
|
|
|
20
20
|
],
|
|
21
21
|
"dependencies": {
|
|
22
22
|
"crc-32": "^1.2.2",
|
|
23
|
-
"@dxos/async": "0.3.2-main.
|
|
24
|
-
"@dxos/codec-protobuf": "0.3.2-main.
|
|
25
|
-
"@dxos/context": "0.3.2-main.
|
|
26
|
-
"@dxos/credentials": "0.3.2-main.
|
|
27
|
-
"@dxos/crypto": "0.3.2-main.
|
|
28
|
-
"@dxos/debug": "0.3.2-main.
|
|
29
|
-
"@dxos/document-model": "0.3.2-main.
|
|
30
|
-
"@dxos/echo-db": "0.3.2-main.
|
|
31
|
-
"@dxos/feed-store": "0.3.2-main.
|
|
32
|
-
"@dxos/hypercore": "0.3.2-main.
|
|
33
|
-
"@dxos/invariant": "0.3.2-main.
|
|
34
|
-
"@dxos/keyring": "0.3.2-main.
|
|
35
|
-
"@dxos/keys": "0.3.2-main.
|
|
36
|
-
"@dxos/log": "0.3.2-main.
|
|
37
|
-
"@dxos/messaging": "0.3.2-main.
|
|
38
|
-
"@dxos/model-factory": "0.3.2-main.
|
|
39
|
-
"@dxos/network-manager": "0.3.2-main.
|
|
40
|
-
"@dxos/node-std": "0.3.2-main.
|
|
41
|
-
"@dxos/protocols": "0.3.2-main.
|
|
42
|
-
"@dxos/random-access-storage": "0.3.2-main.
|
|
43
|
-
"@dxos/rpc": "0.3.2-main.
|
|
44
|
-
"@dxos/teleport": "0.3.2-main.
|
|
45
|
-
"@dxos/teleport-extension-gossip": "0.3.2-main.
|
|
46
|
-
"@dxos/teleport-extension-object-sync": "0.3.2-main.
|
|
47
|
-
"@dxos/teleport-extension-replicator": "0.3.2-main.
|
|
48
|
-
"@dxos/text-model": "0.3.2-main.
|
|
49
|
-
"@dxos/timeframe": "0.3.2-main.
|
|
50
|
-
"@dxos/tracing": "0.3.2-main.
|
|
51
|
-
"@dxos/typings": "0.3.2-main.
|
|
52
|
-
"@dxos/util": "0.3.2-main.
|
|
23
|
+
"@dxos/async": "0.3.2-main.3d933cf",
|
|
24
|
+
"@dxos/codec-protobuf": "0.3.2-main.3d933cf",
|
|
25
|
+
"@dxos/context": "0.3.2-main.3d933cf",
|
|
26
|
+
"@dxos/credentials": "0.3.2-main.3d933cf",
|
|
27
|
+
"@dxos/crypto": "0.3.2-main.3d933cf",
|
|
28
|
+
"@dxos/debug": "0.3.2-main.3d933cf",
|
|
29
|
+
"@dxos/document-model": "0.3.2-main.3d933cf",
|
|
30
|
+
"@dxos/echo-db": "0.3.2-main.3d933cf",
|
|
31
|
+
"@dxos/feed-store": "0.3.2-main.3d933cf",
|
|
32
|
+
"@dxos/hypercore": "0.3.2-main.3d933cf",
|
|
33
|
+
"@dxos/invariant": "0.3.2-main.3d933cf",
|
|
34
|
+
"@dxos/keyring": "0.3.2-main.3d933cf",
|
|
35
|
+
"@dxos/keys": "0.3.2-main.3d933cf",
|
|
36
|
+
"@dxos/log": "0.3.2-main.3d933cf",
|
|
37
|
+
"@dxos/messaging": "0.3.2-main.3d933cf",
|
|
38
|
+
"@dxos/model-factory": "0.3.2-main.3d933cf",
|
|
39
|
+
"@dxos/network-manager": "0.3.2-main.3d933cf",
|
|
40
|
+
"@dxos/node-std": "0.3.2-main.3d933cf",
|
|
41
|
+
"@dxos/protocols": "0.3.2-main.3d933cf",
|
|
42
|
+
"@dxos/random-access-storage": "0.3.2-main.3d933cf",
|
|
43
|
+
"@dxos/rpc": "0.3.2-main.3d933cf",
|
|
44
|
+
"@dxos/teleport": "0.3.2-main.3d933cf",
|
|
45
|
+
"@dxos/teleport-extension-gossip": "0.3.2-main.3d933cf",
|
|
46
|
+
"@dxos/teleport-extension-object-sync": "0.3.2-main.3d933cf",
|
|
47
|
+
"@dxos/teleport-extension-replicator": "0.3.2-main.3d933cf",
|
|
48
|
+
"@dxos/text-model": "0.3.2-main.3d933cf",
|
|
49
|
+
"@dxos/timeframe": "0.3.2-main.3d933cf",
|
|
50
|
+
"@dxos/tracing": "0.3.2-main.3d933cf",
|
|
51
|
+
"@dxos/typings": "0.3.2-main.3d933cf",
|
|
52
|
+
"@dxos/util": "0.3.2-main.3d933cf"
|
|
53
53
|
},
|
|
54
54
|
"devDependencies": {
|
|
55
55
|
"fast-check": "~3.3.0",
|
package/src/common/codec.ts
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
// Copyright 2022 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import { Codec } from '@dxos/codec-protobuf';
|
|
5
|
+
import { type Codec } from '@dxos/codec-protobuf';
|
|
6
6
|
import { createCodecEncoding } from '@dxos/hypercore';
|
|
7
7
|
import { schema } from '@dxos/protocols';
|
|
8
8
|
import type { FeedMessage } from '@dxos/protocols/proto/dxos/echo/feed';
|
package/src/common/feeds.ts
CHANGED
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
// Copyright 2022 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import { FeedWriter } from '@dxos/feed-store';
|
|
5
|
+
import { type FeedWriter } from '@dxos/feed-store';
|
|
6
6
|
import { invariant } from '@dxos/invariant';
|
|
7
|
-
import { MaybePromise } from '@dxos/util';
|
|
7
|
+
import { type MaybePromise } from '@dxos/util';
|
|
8
8
|
|
|
9
9
|
/**
|
|
10
10
|
* Maps the written arguments onto a different message type.
|
|
@@ -4,14 +4,14 @@
|
|
|
4
4
|
|
|
5
5
|
import { Stream } from '@dxos/codec-protobuf';
|
|
6
6
|
import { Context } from '@dxos/context';
|
|
7
|
-
import { tagMutationsInBatch, ItemDemuxer, ItemManager, setMetadataOnObject } from '@dxos/echo-db';
|
|
8
|
-
import { FeedWriter } from '@dxos/feed-store';
|
|
7
|
+
import { tagMutationsInBatch, type ItemDemuxer, type ItemManager, setMetadataOnObject } from '@dxos/echo-db';
|
|
8
|
+
import { type FeedWriter } from '@dxos/feed-store';
|
|
9
9
|
import { invariant } from '@dxos/invariant';
|
|
10
|
-
import { PublicKey } from '@dxos/keys';
|
|
10
|
+
import { type PublicKey } from '@dxos/keys';
|
|
11
11
|
import { log } from '@dxos/log';
|
|
12
|
-
import { DataMessage } from '@dxos/protocols/proto/dxos/echo/feed';
|
|
13
|
-
import { EchoObjectBatch } from '@dxos/protocols/proto/dxos/echo/object';
|
|
14
|
-
import { EchoEvent, MutationReceipt, WriteRequest } from '@dxos/protocols/proto/dxos/echo/service';
|
|
12
|
+
import { type DataMessage } from '@dxos/protocols/proto/dxos/echo/feed';
|
|
13
|
+
import { type EchoObjectBatch } from '@dxos/protocols/proto/dxos/echo/object';
|
|
14
|
+
import { EchoEvent, type MutationReceipt, type WriteRequest } from '@dxos/protocols/proto/dxos/echo/service';
|
|
15
15
|
import { ComplexMap } from '@dxos/util';
|
|
16
16
|
|
|
17
17
|
/**
|
|
@@ -2,22 +2,22 @@
|
|
|
2
2
|
// Copyright 2021 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import { Stream } from '@dxos/codec-protobuf';
|
|
5
|
+
import { type Stream } from '@dxos/codec-protobuf';
|
|
6
6
|
import { raise } from '@dxos/debug';
|
|
7
7
|
import { invariant } from '@dxos/invariant';
|
|
8
8
|
import { PublicKey } from '@dxos/keys';
|
|
9
9
|
import { log } from '@dxos/log';
|
|
10
10
|
import {
|
|
11
|
-
DataService,
|
|
12
|
-
MutationReceipt,
|
|
13
|
-
SubscribeRequest,
|
|
14
|
-
EchoEvent,
|
|
15
|
-
WriteRequest,
|
|
16
|
-
FlushRequest,
|
|
11
|
+
type DataService,
|
|
12
|
+
type MutationReceipt,
|
|
13
|
+
type SubscribeRequest,
|
|
14
|
+
type EchoEvent,
|
|
15
|
+
type WriteRequest,
|
|
16
|
+
type FlushRequest,
|
|
17
17
|
} from '@dxos/protocols/proto/dxos/echo/service';
|
|
18
18
|
import { ComplexMap } from '@dxos/util';
|
|
19
19
|
|
|
20
|
-
import { DataServiceHost } from './data-service-host';
|
|
20
|
+
import { type DataServiceHost } from './data-service-host';
|
|
21
21
|
|
|
22
22
|
// TODO(burdon): Clear on close.
|
|
23
23
|
export class DataServiceSubscriptions {
|
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
// Copyright 2023 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import { EchoProcessor, ItemDemuxer, ItemManager } from '@dxos/echo-db';
|
|
6
|
-
import { FeedWriter } from '@dxos/feed-store';
|
|
7
|
-
import { ModelFactory } from '@dxos/model-factory';
|
|
8
|
-
import { DataMessage } from '@dxos/protocols/proto/dxos/echo/feed';
|
|
9
|
-
import { EchoSnapshot } from '@dxos/protocols/proto/dxos/echo/snapshot';
|
|
5
|
+
import { type EchoProcessor, ItemDemuxer, type ItemManager } from '@dxos/echo-db';
|
|
6
|
+
import { type FeedWriter } from '@dxos/feed-store';
|
|
7
|
+
import { type ModelFactory } from '@dxos/model-factory';
|
|
8
|
+
import { type DataMessage } from '@dxos/protocols/proto/dxos/echo/feed';
|
|
9
|
+
import { type EchoSnapshot } from '@dxos/protocols/proto/dxos/echo/snapshot';
|
|
10
10
|
|
|
11
11
|
import { DataServiceHost } from './data-service-host';
|
|
12
12
|
|
|
@@ -2,14 +2,14 @@
|
|
|
2
2
|
// Copyright 2023 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import { Context, cancelWithContext } from '@dxos/context';
|
|
5
|
+
import { type Context, cancelWithContext } from '@dxos/context';
|
|
6
6
|
import { PublicKey } from '@dxos/keys';
|
|
7
7
|
import { schema } from '@dxos/protocols';
|
|
8
8
|
import { BlobMeta } from '@dxos/protocols/proto/dxos/echo/blob';
|
|
9
9
|
import { SpaceSnapshot } from '@dxos/protocols/proto/dxos/echo/snapshot';
|
|
10
|
-
import { BlobStore, BlobSync } from '@dxos/teleport-extension-object-sync';
|
|
10
|
+
import { type BlobStore, type BlobSync } from '@dxos/teleport-extension-object-sync';
|
|
11
11
|
|
|
12
|
-
import { SnapshotStore } from './snapshot-store';
|
|
12
|
+
import { type SnapshotStore } from './snapshot-store';
|
|
13
13
|
|
|
14
14
|
const SpaceSnapshot = schema.getCodecForType('dxos.echo.snapshot.SpaceSnapshot');
|
|
15
15
|
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
import expect from 'expect';
|
|
6
6
|
|
|
7
7
|
import { PublicKey } from '@dxos/keys';
|
|
8
|
-
import { SpaceSnapshot } from '@dxos/protocols/proto/dxos/echo/snapshot';
|
|
8
|
+
import { type SpaceSnapshot } from '@dxos/protocols/proto/dxos/echo/snapshot';
|
|
9
9
|
import { createStorage } from '@dxos/random-access-storage';
|
|
10
10
|
import { describe, test } from '@dxos/test';
|
|
11
11
|
import { Timeframe } from '@dxos/timeframe';
|
|
@@ -4,9 +4,9 @@
|
|
|
4
4
|
|
|
5
5
|
import { subtleCrypto } from '@dxos/crypto';
|
|
6
6
|
import { schema } from '@dxos/protocols';
|
|
7
|
-
import { StoredSnapshotInfo } from '@dxos/protocols/proto/dxos/devtools/host';
|
|
7
|
+
import { type StoredSnapshotInfo } from '@dxos/protocols/proto/dxos/devtools/host';
|
|
8
8
|
import { SpaceSnapshot } from '@dxos/protocols/proto/dxos/echo/snapshot';
|
|
9
|
-
import { Directory } from '@dxos/random-access-storage';
|
|
9
|
+
import { type Directory } from '@dxos/random-access-storage';
|
|
10
10
|
|
|
11
11
|
const SpaceSnapshot = schema.getCodecForType('dxos.echo.snapshot.SpaceSnapshot');
|
|
12
12
|
/**
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
import CRC32 from 'crc-32';
|
|
6
6
|
|
|
7
7
|
import { synchronized, Event } from '@dxos/async';
|
|
8
|
-
import { Codec } from '@dxos/codec-protobuf';
|
|
8
|
+
import { type Codec } from '@dxos/codec-protobuf';
|
|
9
9
|
import { invariant } from '@dxos/invariant';
|
|
10
10
|
import { PublicKey } from '@dxos/keys';
|
|
11
11
|
import { log } from '@dxos/log';
|
|
@@ -13,14 +13,14 @@ import { DataCorruptionError, STORAGE_VERSION, schema } from '@dxos/protocols';
|
|
|
13
13
|
import { SpaceState } from '@dxos/protocols/proto/dxos/client/services';
|
|
14
14
|
import {
|
|
15
15
|
EchoMetadata,
|
|
16
|
-
SpaceMetadata,
|
|
17
|
-
IdentityRecord,
|
|
18
|
-
SpaceCache,
|
|
19
|
-
ControlPipelineSnapshot,
|
|
16
|
+
type SpaceMetadata,
|
|
17
|
+
type IdentityRecord,
|
|
18
|
+
type SpaceCache,
|
|
19
|
+
type ControlPipelineSnapshot,
|
|
20
20
|
LargeSpaceMetadata,
|
|
21
21
|
} from '@dxos/protocols/proto/dxos/echo/metadata';
|
|
22
|
-
import { Directory, File } from '@dxos/random-access-storage';
|
|
23
|
-
import { Timeframe } from '@dxos/timeframe';
|
|
22
|
+
import { type Directory, type File } from '@dxos/random-access-storage';
|
|
23
|
+
import { type Timeframe } from '@dxos/timeframe';
|
|
24
24
|
import { ComplexMap, arrayToBuffer, forEachAsync, isNotNullOrUndefined } from '@dxos/util';
|
|
25
25
|
|
|
26
26
|
export interface AddSpaceOptions {
|
package/src/pipeline/index.ts
CHANGED
|
@@ -2,12 +2,12 @@
|
|
|
2
2
|
// Copyright 2020 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import { FeedBlock, FeedBlockSelector } from '@dxos/feed-store';
|
|
5
|
+
import { type FeedBlock, type FeedBlockSelector } from '@dxos/feed-store';
|
|
6
6
|
import { invariant } from '@dxos/invariant';
|
|
7
7
|
import { log } from '@dxos/log';
|
|
8
8
|
import type { FeedMessage } from '@dxos/protocols/proto/dxos/echo/feed';
|
|
9
9
|
|
|
10
|
-
import { TimeframeClock } from './timeframe-clock';
|
|
10
|
+
import { type TimeframeClock } from './timeframe-clock';
|
|
11
11
|
|
|
12
12
|
/**
|
|
13
13
|
* The MessageSelector makes sure that we read in a trusted order.
|
|
@@ -7,11 +7,11 @@ import * as fc from 'fast-check';
|
|
|
7
7
|
import { inspect } from 'util';
|
|
8
8
|
|
|
9
9
|
import { asyncTimeout } from '@dxos/async';
|
|
10
|
-
import { FeedStore, FeedWrapper } from '@dxos/feed-store';
|
|
10
|
+
import { type FeedStore, type FeedWrapper } from '@dxos/feed-store';
|
|
11
11
|
import { PublicKey } from '@dxos/keys';
|
|
12
12
|
import { log } from '@dxos/log';
|
|
13
|
-
import { FeedMessageBlock } from '@dxos/protocols';
|
|
14
|
-
import { FeedMessage } from '@dxos/protocols/proto/dxos/echo/feed';
|
|
13
|
+
import { type FeedMessageBlock } from '@dxos/protocols';
|
|
14
|
+
import { type FeedMessage } from '@dxos/protocols/proto/dxos/echo/feed';
|
|
15
15
|
import { describe, test } from '@dxos/test';
|
|
16
16
|
import { Timeframe } from '@dxos/timeframe';
|
|
17
17
|
import { range } from '@dxos/util';
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
import expect from 'expect';
|
|
6
6
|
|
|
7
7
|
import { Event, sleep } from '@dxos/async';
|
|
8
|
-
import { FeedMessage } from '@dxos/protocols/proto/dxos/echo/feed';
|
|
8
|
+
import { type FeedMessage } from '@dxos/protocols/proto/dxos/echo/feed';
|
|
9
9
|
import { describe, test, afterTest } from '@dxos/test';
|
|
10
10
|
import { Timeframe } from '@dxos/timeframe';
|
|
11
11
|
import { range } from '@dxos/util';
|
package/src/pipeline/pipeline.ts
CHANGED
|
@@ -5,11 +5,11 @@
|
|
|
5
5
|
import { Event, sleepWithContext, synchronized, Trigger } from '@dxos/async';
|
|
6
6
|
import { Context, rejectOnDispose } from '@dxos/context';
|
|
7
7
|
import { failUndefined } from '@dxos/debug';
|
|
8
|
-
import { FeedSetIterator, FeedWrapper, FeedWriter } from '@dxos/feed-store';
|
|
8
|
+
import { FeedSetIterator, type FeedWrapper, type FeedWriter } from '@dxos/feed-store';
|
|
9
9
|
import { invariant } from '@dxos/invariant';
|
|
10
10
|
import { PublicKey } from '@dxos/keys';
|
|
11
11
|
import { log } from '@dxos/log';
|
|
12
|
-
import { FeedMessageBlock } from '@dxos/protocols';
|
|
12
|
+
import { type FeedMessageBlock } from '@dxos/protocols';
|
|
13
13
|
import type { FeedMessage } from '@dxos/protocols/proto/dxos/echo/feed';
|
|
14
14
|
import { Timeframe } from '@dxos/timeframe';
|
|
15
15
|
import { ComplexMap } from '@dxos/util';
|
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
|
|
5
5
|
import { Event } from '@dxos/async';
|
|
6
6
|
import { timed } from '@dxos/debug';
|
|
7
|
-
import { FeedIndex } from '@dxos/feed-store';
|
|
8
|
-
import { PublicKey } from '@dxos/keys';
|
|
7
|
+
import { type FeedIndex } from '@dxos/feed-store';
|
|
8
|
+
import { type PublicKey } from '@dxos/keys';
|
|
9
9
|
import { log } from '@dxos/log';
|
|
10
10
|
import { Timeframe } from '@dxos/timeframe';
|
|
11
11
|
|
package/src/space/auth.ts
CHANGED
|
@@ -8,8 +8,8 @@ import { randomBytes } from '@dxos/crypto';
|
|
|
8
8
|
import { invariant } from '@dxos/invariant';
|
|
9
9
|
import { log } from '@dxos/log';
|
|
10
10
|
import { schema } from '@dxos/protocols';
|
|
11
|
-
import { AuthService } from '@dxos/protocols/proto/dxos/mesh/teleport/auth';
|
|
12
|
-
import { ExtensionContext, RpcExtension } from '@dxos/teleport';
|
|
11
|
+
import { type AuthService } from '@dxos/protocols/proto/dxos/mesh/teleport/auth';
|
|
12
|
+
import { type ExtensionContext, RpcExtension } from '@dxos/teleport';
|
|
13
13
|
|
|
14
14
|
export type AuthProvider = (nonce: Uint8Array) => Promise<Uint8Array | undefined>;
|
|
15
15
|
|
|
@@ -7,7 +7,7 @@ import expect from 'expect';
|
|
|
7
7
|
import { CredentialGenerator, createCredential } from '@dxos/credentials';
|
|
8
8
|
import { FeedFactory, FeedStore } from '@dxos/feed-store';
|
|
9
9
|
import { Keyring } from '@dxos/keyring';
|
|
10
|
-
import { PublicKey } from '@dxos/keys';
|
|
10
|
+
import { type PublicKey } from '@dxos/keys';
|
|
11
11
|
import { log } from '@dxos/log';
|
|
12
12
|
import type { FeedMessage } from '@dxos/protocols/proto/dxos/echo/feed';
|
|
13
13
|
import { AdmittedFeed } from '@dxos/protocols/proto/dxos/halo/credentials';
|
|
@@ -4,20 +4,20 @@
|
|
|
4
4
|
|
|
5
5
|
import { DeferredTask, sleepWithContext, trackLeaks } from '@dxos/async';
|
|
6
6
|
import { Context } from '@dxos/context';
|
|
7
|
-
import { SpaceStateMachine, SpaceState, MemberInfo, FeedInfo } from '@dxos/credentials';
|
|
8
|
-
import { FeedWrapper } from '@dxos/feed-store';
|
|
7
|
+
import { SpaceStateMachine, type SpaceState, type MemberInfo, type FeedInfo } from '@dxos/credentials';
|
|
8
|
+
import { type FeedWrapper } from '@dxos/feed-store';
|
|
9
9
|
import { PublicKey } from '@dxos/keys';
|
|
10
10
|
import { log } from '@dxos/log';
|
|
11
|
-
import { FeedMessageBlock } from '@dxos/protocols';
|
|
11
|
+
import { type FeedMessageBlock } from '@dxos/protocols';
|
|
12
12
|
import type { FeedMessage } from '@dxos/protocols/proto/dxos/echo/feed';
|
|
13
|
-
import { ControlPipelineSnapshot } from '@dxos/protocols/proto/dxos/echo/metadata';
|
|
14
|
-
import { AdmittedFeed, Credential } from '@dxos/protocols/proto/dxos/halo/credentials';
|
|
13
|
+
import { type ControlPipelineSnapshot } from '@dxos/protocols/proto/dxos/echo/metadata';
|
|
14
|
+
import { AdmittedFeed, type Credential } from '@dxos/protocols/proto/dxos/halo/credentials';
|
|
15
15
|
import { Timeframe } from '@dxos/timeframe';
|
|
16
16
|
import { TimeSeriesCounter, TimeUsageCounter, trace } from '@dxos/tracing';
|
|
17
|
-
import { AsyncCallback, Callback, tracer } from '@dxos/util';
|
|
17
|
+
import { type AsyncCallback, Callback, tracer } from '@dxos/util';
|
|
18
18
|
|
|
19
|
-
import { MetadataStore } from '../metadata';
|
|
20
|
-
import { Pipeline, PipelineAccessor } from '../pipeline';
|
|
19
|
+
import { type MetadataStore } from '../metadata';
|
|
20
|
+
import { Pipeline, type PipelineAccessor } from '../pipeline';
|
|
21
21
|
|
|
22
22
|
export type ControlPipelineParams = {
|
|
23
23
|
spaceKey: PublicKey;
|
|
@@ -4,25 +4,30 @@
|
|
|
4
4
|
|
|
5
5
|
import { Event, scheduleTask, sleep, synchronized, trackLeaks } from '@dxos/async';
|
|
6
6
|
import { Context } from '@dxos/context';
|
|
7
|
-
import {
|
|
7
|
+
import {
|
|
8
|
+
type CredentialProcessor,
|
|
9
|
+
type FeedInfo,
|
|
10
|
+
type SpecificCredential,
|
|
11
|
+
checkCredentialType,
|
|
12
|
+
} from '@dxos/credentials';
|
|
8
13
|
import { getStateMachineFromItem, ItemManager, TYPE_PROPERTIES } from '@dxos/echo-db';
|
|
9
|
-
import { FeedWriter } from '@dxos/feed-store';
|
|
14
|
+
import { type FeedWriter } from '@dxos/feed-store';
|
|
10
15
|
import { invariant } from '@dxos/invariant';
|
|
11
|
-
import { PublicKey } from '@dxos/keys';
|
|
16
|
+
import { type PublicKey } from '@dxos/keys';
|
|
12
17
|
import { log, omit } from '@dxos/log';
|
|
13
|
-
import { ModelFactory } from '@dxos/model-factory';
|
|
14
|
-
import { CancelledError, DataPipelineProcessed } from '@dxos/protocols';
|
|
15
|
-
import { DataMessage } from '@dxos/protocols/proto/dxos/echo/feed';
|
|
16
|
-
import { SpaceCache } from '@dxos/protocols/proto/dxos/echo/metadata';
|
|
17
|
-
import { ObjectSnapshot } from '@dxos/protocols/proto/dxos/echo/model/document';
|
|
18
|
-
import { SpaceSnapshot } from '@dxos/protocols/proto/dxos/echo/snapshot';
|
|
19
|
-
import { Credential, Epoch } from '@dxos/protocols/proto/dxos/halo/credentials';
|
|
18
|
+
import { type ModelFactory } from '@dxos/model-factory';
|
|
19
|
+
import { CancelledError, type DataPipelineProcessed } from '@dxos/protocols';
|
|
20
|
+
import { type DataMessage } from '@dxos/protocols/proto/dxos/echo/feed';
|
|
21
|
+
import { type SpaceCache } from '@dxos/protocols/proto/dxos/echo/metadata';
|
|
22
|
+
import { type ObjectSnapshot } from '@dxos/protocols/proto/dxos/echo/model/document';
|
|
23
|
+
import { type SpaceSnapshot } from '@dxos/protocols/proto/dxos/echo/snapshot';
|
|
24
|
+
import { type Credential, type Epoch } from '@dxos/protocols/proto/dxos/halo/credentials';
|
|
20
25
|
import { Timeframe } from '@dxos/timeframe';
|
|
21
26
|
import { TimeSeriesCounter, TimeUsageCounter, trace } from '@dxos/tracing';
|
|
22
27
|
import { tracer } from '@dxos/util';
|
|
23
28
|
|
|
24
|
-
import { DatabaseHost, SnapshotManager } from '../db-host';
|
|
25
|
-
import { MetadataStore } from '../metadata';
|
|
29
|
+
import { DatabaseHost, type SnapshotManager } from '../db-host';
|
|
30
|
+
import { type MetadataStore } from '../metadata';
|
|
26
31
|
import { Pipeline } from '../pipeline';
|
|
27
32
|
|
|
28
33
|
export interface PipelineFactory {
|
|
@@ -4,22 +4,22 @@
|
|
|
4
4
|
|
|
5
5
|
import { synchronized, trackLeaks } from '@dxos/async';
|
|
6
6
|
import { failUndefined } from '@dxos/debug';
|
|
7
|
-
import { FeedStore } from '@dxos/feed-store';
|
|
7
|
+
import { type FeedStore } from '@dxos/feed-store';
|
|
8
8
|
import { PublicKey } from '@dxos/keys';
|
|
9
9
|
import { log } from '@dxos/log';
|
|
10
|
-
import { ModelFactory } from '@dxos/model-factory';
|
|
11
|
-
import { NetworkManager } from '@dxos/network-manager';
|
|
10
|
+
import { type ModelFactory } from '@dxos/model-factory';
|
|
11
|
+
import { type NetworkManager } from '@dxos/network-manager';
|
|
12
12
|
import { trace } from '@dxos/protocols';
|
|
13
13
|
import type { FeedMessage } from '@dxos/protocols/proto/dxos/echo/feed';
|
|
14
|
-
import { SpaceMetadata } from '@dxos/protocols/proto/dxos/echo/metadata';
|
|
15
|
-
import { Teleport } from '@dxos/teleport';
|
|
16
|
-
import { BlobStore } from '@dxos/teleport-extension-object-sync';
|
|
14
|
+
import { type SpaceMetadata } from '@dxos/protocols/proto/dxos/echo/metadata';
|
|
15
|
+
import { type Teleport } from '@dxos/teleport';
|
|
16
|
+
import { type BlobStore } from '@dxos/teleport-extension-object-sync';
|
|
17
17
|
import { ComplexMap } from '@dxos/util';
|
|
18
18
|
|
|
19
19
|
import { Space } from './space';
|
|
20
|
-
import { SpaceProtocol, SwarmIdentity } from './space-protocol';
|
|
21
|
-
import { SnapshotManager, SnapshotStore } from '../db-host';
|
|
22
|
-
import { MetadataStore } from '../metadata';
|
|
20
|
+
import { SpaceProtocol, type SwarmIdentity } from './space-protocol';
|
|
21
|
+
import { SnapshotManager, type SnapshotStore } from '../db-host';
|
|
22
|
+
import { type MetadataStore } from '../metadata';
|
|
23
23
|
|
|
24
24
|
export type SpaceManagerParams = {
|
|
25
25
|
feedStore: FeedStore<FeedMessage>;
|
|
@@ -2,26 +2,26 @@
|
|
|
2
2
|
// Copyright 2022 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import { Event } from '@dxos/async';
|
|
5
|
+
import { type Event } from '@dxos/async';
|
|
6
6
|
import { discoveryKey, subtleCrypto } from '@dxos/crypto';
|
|
7
|
-
import { FeedWrapper } from '@dxos/feed-store';
|
|
7
|
+
import { type FeedWrapper } from '@dxos/feed-store';
|
|
8
8
|
import { PublicKey } from '@dxos/keys';
|
|
9
9
|
import { log, logInfo } from '@dxos/log';
|
|
10
10
|
import {
|
|
11
11
|
MMSTTopology,
|
|
12
|
-
NetworkManager,
|
|
13
|
-
SwarmConnection,
|
|
14
|
-
WireProtocol,
|
|
15
|
-
WireProtocolParams,
|
|
16
|
-
WireProtocolProvider,
|
|
12
|
+
type NetworkManager,
|
|
13
|
+
type SwarmConnection,
|
|
14
|
+
type WireProtocol,
|
|
15
|
+
type WireProtocolParams,
|
|
16
|
+
type WireProtocolProvider,
|
|
17
17
|
} from '@dxos/network-manager';
|
|
18
18
|
import type { FeedMessage } from '@dxos/protocols/proto/dxos/echo/feed';
|
|
19
|
-
import { MuxerStats, Teleport } from '@dxos/teleport';
|
|
20
|
-
import { BlobStore, BlobSync } from '@dxos/teleport-extension-object-sync';
|
|
19
|
+
import { type MuxerStats, Teleport } from '@dxos/teleport';
|
|
20
|
+
import { type BlobStore, BlobSync } from '@dxos/teleport-extension-object-sync';
|
|
21
21
|
import { ReplicatorExtension } from '@dxos/teleport-extension-replicator';
|
|
22
22
|
import { ComplexMap } from '@dxos/util';
|
|
23
23
|
|
|
24
|
-
import { AuthExtension, AuthProvider, AuthVerifier } from './auth';
|
|
24
|
+
import { AuthExtension, type AuthProvider, type AuthVerifier } from './auth';
|
|
25
25
|
|
|
26
26
|
export const MOCK_AUTH_PROVIDER: AuthProvider = async (nonce: Uint8Array) => Buffer.from('mock');
|
|
27
27
|
export const MOCK_AUTH_VERIFIER: AuthVerifier = async (nonce: Uint8Array, credential: Uint8Array) => true;
|
package/src/space/space.ts
CHANGED
|
@@ -3,25 +3,25 @@
|
|
|
3
3
|
//
|
|
4
4
|
|
|
5
5
|
import { Event, synchronized, trackLeaks, Lock } from '@dxos/async';
|
|
6
|
-
import { Context } from '@dxos/context';
|
|
7
|
-
import { FeedInfo } from '@dxos/credentials';
|
|
8
|
-
import { FeedOptions, FeedWrapper } from '@dxos/feed-store';
|
|
6
|
+
import { type Context } from '@dxos/context';
|
|
7
|
+
import { type FeedInfo } from '@dxos/credentials';
|
|
8
|
+
import { type FeedOptions, type FeedWrapper } from '@dxos/feed-store';
|
|
9
9
|
import { invariant } from '@dxos/invariant';
|
|
10
|
-
import { PublicKey } from '@dxos/keys';
|
|
10
|
+
import { type PublicKey } from '@dxos/keys';
|
|
11
11
|
import { log, logInfo } from '@dxos/log';
|
|
12
|
-
import { ModelFactory } from '@dxos/model-factory';
|
|
12
|
+
import { type ModelFactory } from '@dxos/model-factory';
|
|
13
13
|
import type { FeedMessage } from '@dxos/protocols/proto/dxos/echo/feed';
|
|
14
|
-
import { AdmittedFeed, Credential } from '@dxos/protocols/proto/dxos/halo/credentials';
|
|
15
|
-
import { Timeframe } from '@dxos/timeframe';
|
|
14
|
+
import { AdmittedFeed, type Credential } from '@dxos/protocols/proto/dxos/halo/credentials';
|
|
15
|
+
import { type Timeframe } from '@dxos/timeframe';
|
|
16
16
|
import { trace } from '@dxos/tracing';
|
|
17
|
-
import { AsyncCallback, Callback } from '@dxos/util';
|
|
17
|
+
import { type AsyncCallback, Callback } from '@dxos/util';
|
|
18
18
|
|
|
19
19
|
import { ControlPipeline } from './control-pipeline';
|
|
20
20
|
import { DataPipeline } from './data-pipeline';
|
|
21
|
-
import { SpaceProtocol } from './space-protocol';
|
|
22
|
-
import { SnapshotManager } from '../db-host';
|
|
23
|
-
import { MetadataStore } from '../metadata';
|
|
24
|
-
import { PipelineAccessor } from '../pipeline';
|
|
21
|
+
import { type SpaceProtocol } from './space-protocol';
|
|
22
|
+
import { type SnapshotManager } from '../db-host';
|
|
23
|
+
import { type MetadataStore } from '../metadata';
|
|
24
|
+
import { type PipelineAccessor } from '../pipeline';
|
|
25
25
|
|
|
26
26
|
// TODO(burdon): Factor out?
|
|
27
27
|
type FeedProvider = (feedKey: PublicKey, opts?: FeedOptions) => Promise<FeedWrapper<FeedMessage>>;
|
|
@@ -5,14 +5,14 @@
|
|
|
5
5
|
import { Event, Trigger } from '@dxos/async';
|
|
6
6
|
import { DocumentModel } from '@dxos/document-model';
|
|
7
7
|
import { DatabaseProxy, ItemManager, createModelMutation, encodeModelMutation } from '@dxos/echo-db';
|
|
8
|
-
import { WriteOptions, WriteReceipt } from '@dxos/feed-store';
|
|
8
|
+
import { type WriteOptions, type WriteReceipt } from '@dxos/feed-store';
|
|
9
9
|
import { invariant } from '@dxos/invariant';
|
|
10
10
|
import { PublicKey } from '@dxos/keys';
|
|
11
11
|
import { ModelFactory } from '@dxos/model-factory';
|
|
12
|
-
import { FeedMessageBlock, schema } from '@dxos/protocols';
|
|
13
|
-
import { FeedMessage } from '@dxos/protocols/proto/dxos/echo/feed';
|
|
14
|
-
import { EchoSnapshot, SpaceSnapshot } from '@dxos/protocols/proto/dxos/echo/snapshot';
|
|
15
|
-
import { Epoch } from '@dxos/protocols/proto/dxos/halo/credentials';
|
|
12
|
+
import { type FeedMessageBlock, schema } from '@dxos/protocols';
|
|
13
|
+
import { type FeedMessage } from '@dxos/protocols/proto/dxos/echo/feed';
|
|
14
|
+
import { type EchoSnapshot, type SpaceSnapshot } from '@dxos/protocols/proto/dxos/echo/snapshot';
|
|
15
|
+
import { type Epoch } from '@dxos/protocols/proto/dxos/halo/credentials';
|
|
16
16
|
import { TextModel } from '@dxos/text-model';
|
|
17
17
|
import { Timeframe } from '@dxos/timeframe';
|
|
18
18
|
import { ComplexMap, isNotNullOrUndefined } from '@dxos/util';
|
|
@@ -5,16 +5,16 @@
|
|
|
5
5
|
import { Context } from '@dxos/context';
|
|
6
6
|
import { CredentialGenerator } from '@dxos/credentials';
|
|
7
7
|
import { DocumentModel } from '@dxos/document-model';
|
|
8
|
-
import { FeedStore } from '@dxos/feed-store';
|
|
9
|
-
import { Keyring } from '@dxos/keyring';
|
|
8
|
+
import { type FeedStore } from '@dxos/feed-store';
|
|
9
|
+
import { type Keyring } from '@dxos/keyring';
|
|
10
10
|
import { PublicKey } from '@dxos/keys';
|
|
11
11
|
import { MemorySignalManager, MemorySignalManagerContext, WebsocketSignalManager } from '@dxos/messaging';
|
|
12
12
|
import { ModelFactory } from '@dxos/model-factory';
|
|
13
13
|
import { createSimplePeerTransportFactory, MemoryTransportFactory, NetworkManager } from '@dxos/network-manager';
|
|
14
14
|
import type { FeedMessage } from '@dxos/protocols/proto/dxos/echo/feed';
|
|
15
|
-
import { SpaceMetadata } from '@dxos/protocols/proto/dxos/echo/metadata';
|
|
15
|
+
import { type SpaceMetadata } from '@dxos/protocols/proto/dxos/echo/metadata';
|
|
16
16
|
import { AdmittedFeed } from '@dxos/protocols/proto/dxos/halo/credentials';
|
|
17
|
-
import { createStorage, Storage, StorageType } from '@dxos/random-access-storage';
|
|
17
|
+
import { createStorage, type Storage, StorageType } from '@dxos/random-access-storage';
|
|
18
18
|
import { Gossip, Presence } from '@dxos/teleport-extension-gossip';
|
|
19
19
|
import { BlobStore } from '@dxos/teleport-extension-object-sync';
|
|
20
20
|
import { ComplexMap } from '@dxos/util';
|
|
@@ -22,7 +22,7 @@ import { ComplexMap } from '@dxos/util';
|
|
|
22
22
|
import { TestFeedBuilder } from './test-feed-builder';
|
|
23
23
|
import { SnapshotStore } from '../db-host';
|
|
24
24
|
import { MetadataStore } from '../metadata';
|
|
25
|
-
import { MOCK_AUTH_PROVIDER, MOCK_AUTH_VERIFIER, Space, SpaceManager, SpaceProtocol } from '../space';
|
|
25
|
+
import { MOCK_AUTH_PROVIDER, MOCK_AUTH_VERIFIER, type Space, SpaceManager, SpaceProtocol } from '../space';
|
|
26
26
|
|
|
27
27
|
export type NetworkManagerProvider = () => NetworkManager;
|
|
28
28
|
|
package/src/testing/util.ts
CHANGED
|
@@ -8,11 +8,11 @@ import { DatabaseProxy, ItemManager } from '@dxos/echo-db';
|
|
|
8
8
|
import { MockFeedWriter } from '@dxos/feed-store/testing';
|
|
9
9
|
import { PublicKey } from '@dxos/keys';
|
|
10
10
|
import { ModelFactory } from '@dxos/model-factory';
|
|
11
|
-
import { DataMessage } from '@dxos/protocols/proto/dxos/echo/feed';
|
|
11
|
+
import { type DataMessage } from '@dxos/protocols/proto/dxos/echo/feed';
|
|
12
12
|
import { Timeframe } from '@dxos/timeframe';
|
|
13
13
|
|
|
14
|
-
import { DatabaseHost, DataServiceHost, DataServiceImpl, DataServiceSubscriptions } from '../db-host';
|
|
15
|
-
import { DataPipeline } from '../space';
|
|
14
|
+
import { DatabaseHost, type DataServiceHost, DataServiceImpl, DataServiceSubscriptions } from '../db-host';
|
|
15
|
+
import { type DataPipeline } from '../space';
|
|
16
16
|
|
|
17
17
|
export const createMemoryDatabase = async (modelFactory: ModelFactory) => {
|
|
18
18
|
const feed = new MockFeedWriter<DataMessage>();
|
|
@@ -9,7 +9,7 @@ import { createModelMutation, DatabaseProxy, encodeModelMutation, genesisMutatio
|
|
|
9
9
|
import { TestBuilder as FeedTestBuilder } from '@dxos/feed-store/testing';
|
|
10
10
|
import { PublicKey } from '@dxos/keys';
|
|
11
11
|
import { ModelFactory } from '@dxos/model-factory';
|
|
12
|
-
import { DataMessage } from '@dxos/protocols/proto/dxos/echo/feed';
|
|
12
|
+
import { type DataMessage } from '@dxos/protocols/proto/dxos/echo/feed';
|
|
13
13
|
import { test } from '@dxos/test';
|
|
14
14
|
|
|
15
15
|
import { createMappedFeedWriter } from '../common';
|