New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@peerbit/shared-log

Package Overview
Dependencies
Maintainers
1
Versions
233
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@peerbit/shared-log - npm Package Compare versions

Comparing version 10.3.0 to 10.3.1-63e24d5

11

dist/src/index.d.ts

@@ -13,3 +13,3 @@ import { PublicSignKey } from "@peerbit/crypto";

import { PIDReplicationController } from "./pid.js";
import { type EntryReplicated, EntryReplicatedU32, EntryReplicatedU64, type ReplicationChange, type ReplicationChanges, ReplicationIntent, type ReplicationRangeIndexable, SyncStatus } from "./ranges.js";
import { type EntryReplicated, EntryReplicatedU32, EntryReplicatedU64, type ReplicationChange, type ReplicationChanges, ReplicationIntent, type ReplicationRangeIndexable } from "./ranges.js";
import { type ReplicationDomainHash, createReplicationDomainHash } from "./replication-domain-hash.js";

@@ -189,5 +189,6 @@ import { type ReplicationDomainTime, createReplicationDomainTime } from "./replication-domain-time.js";

checkDuplicates?: boolean;
rebalance?: boolean;
mergeSegments?: boolean;
announce?: (msg: AllReplicatingSegmentsMessage | AddedReplicationSegmentMessage) => void;
}): Promise<ReplicationRangeIndexable<R>[] | undefined>;
}): Promise<ReplicationRangeIndexable<R>[]>;
unreplicate(rangeOrEntry?: Entry<T> | {

@@ -202,9 +203,9 @@ id: Uint8Array;

startAnnounceReplicating(range: ReplicationRangeIndexable<R>[], options?: {
syncStatus?: SyncStatus;
reset?: boolean;
checkDuplicates?: boolean;
rebalance?: boolean;
announce?: (msg: AllReplicatingSegmentsMessage | AddedReplicationSegmentMessage) => void;
}): Promise<void>;
private removePeerFromGidPeerHistory;
private addPeersToGidPeerHistory;
addPeersToGidPeerHistory(gid: string, publicKeys: Iterable<string>, reset?: boolean): Set<string>;
append(data: T, options?: SharedAppendOptions<T> | undefined): Promise<{

@@ -307,3 +308,3 @@ entry: Entry<T>;

clearCache?: boolean;
}): Promise<void>;
}): Promise<false | undefined>;
waitForPruned(): Promise<void>;

@@ -310,0 +311,0 @@ onReplicationChange(changeOrChanges: ReplicationChanges<ReplicationRangeIndexable<R>> | ReplicationChanges<ReplicationRangeIndexable<R>>[]): Promise<false | undefined>;

@@ -10,6 +10,2 @@ import type { Cache } from "@peerbit/cache";

}
export declare enum SyncStatus {
Unsynced = 0,
Synced = 1
}
export declare const shouldAssigneToRangeBoundary: (leaders: Map<string, {

@@ -16,0 +12,0 @@ intersecting: boolean;

@@ -13,2 +13,3 @@ import { Cache } from "@peerbit/cache";

import { SimpleSyncronizer } from "./simple.js";
export declare const logger: import("pino").Logger<never>;
type NumberOrBigint = number | bigint;

@@ -15,0 +16,0 @@ declare class SymbolSerialized implements SSymbol {

@@ -14,2 +14,3 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {

import {} from "@peerbit/indexer-interface";
import { logger as loggerFn } from "@peerbit/logger";
import { DecoderWrapper, EncoderWrapper } from "@peerbit/riblt";

@@ -22,2 +23,3 @@ import { SilentDelivery } from "@peerbit/stream-interface";

import { SimpleSyncronizer } from "./simple.js";
export const logger = loggerFn({ module: "shared-log" });
const coerceBigInt = (value) => typeof value === "bigint" ? value : BigInt(value);

@@ -379,3 +381,14 @@ class SymbolSerialized {

}
decoder.try_decode();
try {
decoder.try_decode();
}
catch (error) {
if (error?.message === "Invalid degree") {
logger.error(error?.message);
return false;
}
else {
throw error;
}
}
count += message.symbols.length;

@@ -382,0 +395,0 @@ if (decoder.decoded()) {

{
"name": "@peerbit/shared-log",
"version": "10.3.0",
"description": "Shared log",
"sideEffects": false,
"type": "module",
"types": "./dist/src/index.d.ts",
"typesVersions": {
"*": {
"*": [
"*",
"dist/*",
"dist/src/*",
"dist/src/*/index"
],
"src/*": [
"*",
"dist/*",
"dist/src/*",
"dist/src/*/index"
]
}
},
"files": [
"src",
"dist",
"!dist/e2e",
"!dist/test",
"!**/*.tsbuildinfo"
],
"exports": {
".": {
"types": "./dist/src/index.d.ts",
"import": "./dist/src/index.js"
}
},
"eslintConfig": {
"extends": "peerbit",
"parserOptions": {
"project": true,
"sourceType": "module"
},
"ignorePatterns": [
"!.aegir.js",
"test/ts-use",
"*.d.ts"
]
},
"publishConfig": {
"access": "public"
},
"scripts": {
"clean": "aegir clean",
"build": "aegir build --no-bundle",
"test": "aegir test --target node",
"lint": "aegir lint"
},
"author": "dao.xyz",
"license": "MIT",
"dependencies": {
"@dao-xyz/borsh": "^5.2.3",
"@peerbit/logger": "1.0.3",
"@peerbit/program": "5.1.1",
"@peerbit/log": "4.0.26",
"@peerbit/rpc": "5.0.24",
"@peerbit/time": "2.0.7",
"@peerbit/riblt": "1.0.4"
},
"devDependencies": {
"@peerbit/test-utils": "^2.1.14"
}
"name": "@peerbit/shared-log",
"version": "10.3.1-63e24d5",
"description": "Shared log",
"sideEffects": false,
"type": "module",
"types": "./dist/src/index.d.ts",
"typesVersions": {
"*": {
"*": [
"*",
"dist/*",
"dist/src/*",
"dist/src/*/index"
],
"src/*": [
"*",
"dist/*",
"dist/src/*",
"dist/src/*/index"
]
}
},
"files": [
"src",
"dist",
"!dist/e2e",
"!dist/test",
"!**/*.tsbuildinfo"
],
"exports": {
".": {
"types": "./dist/src/index.d.ts",
"import": "./dist/src/index.js"
}
},
"eslintConfig": {
"extends": "peerbit",
"parserOptions": {
"project": true,
"sourceType": "module"
},
"ignorePatterns": [
"!.aegir.js",
"test/ts-use",
"*.d.ts"
]
},
"publishConfig": {
"access": "public"
},
"scripts": {
"clean": "aegir clean",
"build": "aegir build --no-bundle",
"test": "aegir test --target node",
"lint": "aegir lint"
},
"author": "dao.xyz",
"license": "MIT",
"dependencies": {
"@dao-xyz/borsh": "^5.2.3",
"@peerbit/logger": "1.0.3-63e24d5",
"@peerbit/program": "5.1.1-63e24d5",
"@peerbit/log": "4.0.27-63e24d5",
"@peerbit/rpc": "5.0.25-63e24d5",
"@peerbit/time": "2.0.7-63e24d5",
"@peerbit/riblt": "1.0.4-63e24d5"
},
"devDependencies": {
"@peerbit/test-utils": "2.1.15-63e24d5"
}
}

@@ -16,5 +16,4 @@ import { field, variant } from "@dao-xyz/borsh";

super();
this.message = message;
}
}

@@ -46,7 +46,2 @@ import { deserialize, field, serialize, variant, vec } from "@dao-xyz/borsh";

export enum SyncStatus {
Unsynced = 0,
Synced = 1,
}
const min = (a: number | bigint, b: number | bigint) => (a < b ? a : b);

@@ -1901,3 +1896,2 @@

/* let missingForCursors: NumberFromType<R>[] = [] */
let uniqueVisited = new Set<string>();

@@ -1967,2 +1961,3 @@ for (let i = 0; i < cursor.length; i++) {

} */
return leaders;

@@ -2283,2 +2278,5 @@ };

(result) => {
if (result.size === 0) {
return;
}
return fn([...result.values()]);

@@ -2457,8 +2455,2 @@ },

const entries = await iterator.all(); // TODO choose right batch sizes here for optimal memory usage / speed
/* const grouped = await groupByGidSync(entries.map((x) => x.value));
for (const [gid, entries] of grouped.entries()) {
yield { gid, entries };
} */
for (const entry of entries) {

@@ -2465,0 +2457,0 @@ yield entry.value;

@@ -6,2 +6,3 @@ import { field, variant, vec } from "@dao-xyz/borsh";

import type { Entry, Log } from "@peerbit/log";
import { logger as loggerFn } from "@peerbit/logger";
import { DecoderWrapper, EncoderWrapper } from "@peerbit/riblt";

@@ -21,2 +22,4 @@ import type { RPC, RequestContext } from "@peerbit/rpc";

export const logger = loggerFn({ module: "shared-log" });
type NumberOrBigint = number | bigint;

@@ -475,3 +478,12 @@

}
decoder.try_decode();
try {
decoder.try_decode();
} catch (error: any) {
if (error?.message === "Invalid degree") {
logger.error(error?.message);
return false;
} else {
throw error;
}
}
count += message.symbols.length;

@@ -478,0 +490,0 @@

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc