@dxos/teleport-extension-replicator 0.1.58-main.f5feb2a → 0.1.58-main.f69fa2f
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/package.json +15 -15
- package/src/stress.test.ts +13 -3
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dxos/teleport-extension-replicator",
|
|
3
|
-
"version": "0.1.58-main.
|
|
3
|
+
"version": "0.1.58-main.f69fa2f",
|
|
4
4
|
"description": "Replicator extension for teleport.",
|
|
5
5
|
"homepage": "https://dxos.org",
|
|
6
6
|
"bugs": "https://github.com/dxos/dxos/issues",
|
|
@@ -16,25 +16,25 @@
|
|
|
16
16
|
"src"
|
|
17
17
|
],
|
|
18
18
|
"dependencies": {
|
|
19
|
-
"@dxos/async": "0.1.58-main.
|
|
20
|
-
"@dxos/context": "0.1.58-main.
|
|
21
|
-
"@dxos/debug": "0.1.58-main.
|
|
22
|
-
"@dxos/feed-store": "0.1.58-main.
|
|
23
|
-
"@dxos/invariant": "0.1.58-main.
|
|
24
|
-
"@dxos/keys": "0.1.58-main.
|
|
25
|
-
"@dxos/log": "0.1.58-main.
|
|
26
|
-
"@dxos/node-std": "0.1.58-main.
|
|
27
|
-
"@dxos/protocols": "0.1.58-main.
|
|
28
|
-
"@dxos/rpc": "0.1.58-main.
|
|
29
|
-
"@dxos/teleport": "0.1.58-main.
|
|
30
|
-
"@dxos/util": "0.1.58-main.
|
|
19
|
+
"@dxos/async": "0.1.58-main.f69fa2f",
|
|
20
|
+
"@dxos/context": "0.1.58-main.f69fa2f",
|
|
21
|
+
"@dxos/debug": "0.1.58-main.f69fa2f",
|
|
22
|
+
"@dxos/feed-store": "0.1.58-main.f69fa2f",
|
|
23
|
+
"@dxos/invariant": "0.1.58-main.f69fa2f",
|
|
24
|
+
"@dxos/keys": "0.1.58-main.f69fa2f",
|
|
25
|
+
"@dxos/log": "0.1.58-main.f69fa2f",
|
|
26
|
+
"@dxos/node-std": "0.1.58-main.f69fa2f",
|
|
27
|
+
"@dxos/protocols": "0.1.58-main.f69fa2f",
|
|
28
|
+
"@dxos/rpc": "0.1.58-main.f69fa2f",
|
|
29
|
+
"@dxos/teleport": "0.1.58-main.f69fa2f",
|
|
30
|
+
"@dxos/util": "0.1.58-main.f69fa2f"
|
|
31
31
|
},
|
|
32
32
|
"devDependencies": {
|
|
33
33
|
"add": "^2.0.6",
|
|
34
34
|
"fast-check": "~3.3.0",
|
|
35
35
|
"typescript": "^5.2.2",
|
|
36
|
-
"@dxos/keyring": "0.1.58-main.
|
|
37
|
-
"@dxos/random-access-storage": "0.1.58-main.
|
|
36
|
+
"@dxos/keyring": "0.1.58-main.f69fa2f",
|
|
37
|
+
"@dxos/random-access-storage": "0.1.58-main.f69fa2f"
|
|
38
38
|
},
|
|
39
39
|
"publishConfig": {
|
|
40
40
|
"access": "public"
|
package/src/stress.test.ts
CHANGED
|
@@ -27,7 +27,10 @@ class TestAgent {
|
|
|
27
27
|
|
|
28
28
|
readonly replicator = new ReplicatorExtension().setOptions({ upload: true });
|
|
29
29
|
|
|
30
|
-
constructor(
|
|
30
|
+
constructor(
|
|
31
|
+
readonly keyring: Keyring,
|
|
32
|
+
readonly peer: Teleport,
|
|
33
|
+
) {
|
|
31
34
|
peer.addExtension('dxos.mesh.teleport.replicator', this.replicator);
|
|
32
35
|
}
|
|
33
36
|
|
|
@@ -82,7 +85,10 @@ const assertState = async (model: Model, real: Real) => {
|
|
|
82
85
|
};
|
|
83
86
|
|
|
84
87
|
class OpenFeedCommand implements fc.AsyncCommand<Model, Real> {
|
|
85
|
-
constructor(
|
|
88
|
+
constructor(
|
|
89
|
+
readonly agent: AgentName,
|
|
90
|
+
readonly feedKey: PublicKey,
|
|
91
|
+
) {}
|
|
86
92
|
|
|
87
93
|
toString = () => `OpenFeedCommand(${this.agent}, ${this.feedKey.truncate()})`;
|
|
88
94
|
|
|
@@ -105,7 +111,11 @@ class OpenFeedCommand implements fc.AsyncCommand<Model, Real> {
|
|
|
105
111
|
}
|
|
106
112
|
|
|
107
113
|
class WriteToFeedCommand implements fc.AsyncCommand<Model, Real> {
|
|
108
|
-
constructor(
|
|
114
|
+
constructor(
|
|
115
|
+
readonly agent: AgentName,
|
|
116
|
+
readonly feedKey: PublicKey,
|
|
117
|
+
readonly count: number,
|
|
118
|
+
) {}
|
|
109
119
|
|
|
110
120
|
toString = () => `WriteToFeedCommand(${this.agent}, ${this.feedKey.truncate()}, ${this.count})`;
|
|
111
121
|
|