@peerbit/shared-log 10.4.0 → 10.4.1-5652381
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/index.d.ts +7 -3
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +19 -8
- package/dist/src/index.js.map +1 -1
- package/dist/src/ranges.d.ts.map +1 -1
- package/dist/src/ranges.js +3 -1
- package/dist/src/ranges.js.map +1 -1
- package/dist/src/replication-domain.d.ts +1 -2
- package/dist/src/replication-domain.d.ts.map +1 -1
- package/package.json +70 -70
- package/src/index.ts +29 -12
- package/src/ranges.ts +5 -1
- package/src/replication-domain.ts +1 -1
package/src/ranges.ts
CHANGED
|
@@ -2370,7 +2370,11 @@ export const matchEntriesInRangeQuery = (range: {
|
|
|
2370
2370
|
}),
|
|
2371
2371
|
]);
|
|
2372
2372
|
|
|
2373
|
-
if
|
|
2373
|
+
// if range2 has length 0 or range 2 is equal to range 1 only make one query
|
|
2374
|
+
if (
|
|
2375
|
+
range.start2 === range.end2 ||
|
|
2376
|
+
(range.start1 === range.start2 && range.end1 === range.end2)
|
|
2377
|
+
) {
|
|
2374
2378
|
return c1;
|
|
2375
2379
|
}
|
|
2376
2380
|
|
|
@@ -26,7 +26,7 @@ export type ReplicationDomainCoverSet<Args> = (
|
|
|
26
26
|
args: Args,
|
|
27
27
|
) => Promise<string[]> | string[]; // minimum set of peers that covers all the data
|
|
28
28
|
|
|
29
|
-
type CoverRange<T extends number | bigint> = {
|
|
29
|
+
export type CoverRange<T extends number | bigint> = {
|
|
30
30
|
offset: T | PublicSignKey;
|
|
31
31
|
length?: T;
|
|
32
32
|
};
|