@peerbit/shared-log 13.2.4 → 13.2.5
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/src/exchange-heads.d.ts.map +1 -1
- package/dist/src/exchange-heads.js +12 -0
- package/dist/src/exchange-heads.js.map +1 -1
- package/dist/src/index.d.ts +18 -0
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +477 -13
- package/dist/src/index.js.map +1 -1
- package/package.json +17 -16
- package/src/exchange-heads.ts +13 -0
- package/src/index.ts +549 -15
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@peerbit/shared-log",
|
|
3
|
-
"version": "13.2.
|
|
3
|
+
"version": "13.2.5",
|
|
4
4
|
"description": "Shared log",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"type": "module",
|
|
@@ -62,35 +62,35 @@
|
|
|
62
62
|
"pino": "^9.4.0",
|
|
63
63
|
"uint8arrays": "^5.1.0",
|
|
64
64
|
"@peerbit/any-store": "2.2.10",
|
|
65
|
-
"@peerbit/crypto": "3.1.2",
|
|
66
|
-
"@peerbit/blocks": "4.2.1",
|
|
67
|
-
"@peerbit/cache": "3.1.0",
|
|
68
65
|
"@peerbit/blocks-interface": "2.1.0",
|
|
66
|
+
"@peerbit/cache": "3.1.0",
|
|
67
|
+
"@peerbit/blocks": "4.2.1",
|
|
68
|
+
"@peerbit/crypto": "3.1.2",
|
|
69
69
|
"@peerbit/diagnostics": "0.0.1",
|
|
70
|
+
"@peerbit/indexer-interface": "3.0.5",
|
|
70
71
|
"@peerbit/indexer-sqlite3": "3.0.8",
|
|
71
|
-
"@peerbit/log": "6.2.
|
|
72
|
+
"@peerbit/log": "6.2.4",
|
|
72
73
|
"@peerbit/logger": "2.0.1",
|
|
73
|
-
"@peerbit/
|
|
74
|
-
"@peerbit/program": "6.0.33",
|
|
75
|
-
"@peerbit/pubsub": "5.3.0",
|
|
74
|
+
"@peerbit/program": "6.0.34",
|
|
76
75
|
"@peerbit/pubsub-interface": "5.1.5",
|
|
77
76
|
"@peerbit/riblt": "1.2.0",
|
|
78
|
-
"@peerbit/rpc": "6.1.
|
|
79
|
-
"@peerbit/
|
|
80
|
-
"@peerbit/stream-interface": "6.0.11"
|
|
77
|
+
"@peerbit/rpc": "6.1.2",
|
|
78
|
+
"@peerbit/pubsub": "5.3.0",
|
|
79
|
+
"@peerbit/stream-interface": "6.0.11",
|
|
80
|
+
"@peerbit/time": "3.0.0"
|
|
81
81
|
},
|
|
82
82
|
"optionalDependencies": {
|
|
83
|
-
"@peerbit/
|
|
84
|
-
"@peerbit/
|
|
83
|
+
"@peerbit/native-backbone": "0.1.4",
|
|
84
|
+
"@peerbit/shared-log-rust": "0.1.2"
|
|
85
85
|
},
|
|
86
86
|
"devDependencies": {
|
|
87
87
|
"@types/libsodium-wrappers": "^0.7.14",
|
|
88
88
|
"@types/pidusage": "^2.0.5",
|
|
89
89
|
"uuid": "^10.0.0",
|
|
90
|
-
"@peerbit/test-utils": "3.1.4",
|
|
91
90
|
"@peerbit/any-store-rust": "0.1.1",
|
|
92
|
-
"@peerbit/indexer-rust": "1.0.
|
|
93
|
-
"peerbit": "
|
|
91
|
+
"@peerbit/indexer-rust": "1.0.3",
|
|
92
|
+
"@peerbit/test-utils": "3.1.5",
|
|
93
|
+
"peerbit": "5.3.5"
|
|
94
94
|
},
|
|
95
95
|
"repository": {
|
|
96
96
|
"type": "git",
|
|
@@ -113,6 +113,7 @@
|
|
|
113
113
|
"benchmark:sync-catchup": "node --loader ts-node/esm ./benchmark/sync-catchup.ts",
|
|
114
114
|
"benchmark:sync-phase-profile": "node --loader ts-node/esm ./benchmark/sync-phase-profile.ts",
|
|
115
115
|
"test": "aegir test --target node",
|
|
116
|
+
"test:shared-log-rust-core": "npm run build && PEERBIT_SHARED_LOG_RUST_CORE=1 aegir test -t node --grep '^(?!.*(does not fetch missing entries from remotes|will prune once reaching max replicas|repairs when joiner request responses are dropped|time out when pending IHave are never resolved|does not confirm checked prune from a shallow-only entry|replication degree update ))(append delivery options |join |replicate |(u32-simple|u64-iblt) (replication references |replication replication (one way|two way) |redundancy only sends entries once|canReplicate |replication degree |start/stop replicate on connect|sync ))'",
|
|
116
117
|
"lint": "aegir lint",
|
|
117
118
|
"test:cov": "aegir test -t node --cov"
|
|
118
119
|
}
|
package/src/exchange-heads.ts
CHANGED
|
@@ -779,6 +779,19 @@ class PreparedRawExchangeEntry<T> extends Entry<T> {
|
|
|
779
779
|
return this.hash === other.hash || this.materialize().equals(other);
|
|
780
780
|
}
|
|
781
781
|
|
|
782
|
+
/**
|
|
783
|
+
* Read boundary: when this lazy head is resolved from the entry-index cache
|
|
784
|
+
* a consumer is about to read it, so decode into a full {@link EntryV0}
|
|
785
|
+
* whose meta/payload/signature fields are populated. The entry index caches
|
|
786
|
+
* the returned entry, replacing this hollow wrapper, so subsequent reads and
|
|
787
|
+
* `EntryV0.equals` see the canonical entry. Only reached on the read path;
|
|
788
|
+
* the wire/sync fusion path never resolves cached heads, so laziness there
|
|
789
|
+
* is preserved.
|
|
790
|
+
*/
|
|
791
|
+
override toMaterialized(): Entry<T> {
|
|
792
|
+
return this.materialize();
|
|
793
|
+
}
|
|
794
|
+
|
|
782
795
|
toSignable(): Entry<T> {
|
|
783
796
|
return this.materialize().toSignable();
|
|
784
797
|
}
|