You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

cojson-storage-sqlite

Package Overview
Dependencies
Maintainers
1
Versions
190
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cojson-storage-sqlite - npm Package Compare versions

Comparing version

to
0.4.0

10

dist/index.js

@@ -1,2 +0,2 @@

import { cojsonInternals, MAX_RECOMMENDED_TX_SIZE, } from "cojson";
import { cojsonInternals, MAX_RECOMMENDED_TX_SIZE } from "cojson";
import Database from "better-sqlite3";

@@ -216,3 +216,9 @@ export class SQLiteStorage {

: parsedHeader?.ruleset.type === "ownedByGroup"
? [parsedHeader?.ruleset.group]
? [
parsedHeader?.ruleset.group,
...new Set(newContentPieces.flatMap((piece) => Object.keys(piece)
.map((sessionID) => cojsonInternals.accountOrAgentIDfromSessionID(sessionID))
.filter((accountID) => cojsonInternals.isAccountID(accountID) &&
accountID !== theirKnown.id))),
]
: [];

@@ -219,0 +225,0 @@ for (const dependedOnCoValue of dependedOnCoValues) {

6

package.json
{
"name": "cojson-storage-sqlite",
"type": "module",
"version": "0.3.7",
"version": "0.4.0",
"main": "dist/index.js",

@@ -10,3 +10,3 @@ "types": "dist/index.d.ts",

"better-sqlite3": "^8.5.2",
"cojson": "^0.3.5",
"cojson": "^0.4.0",
"typescript": "^5.1.6"

@@ -22,3 +22,3 @@ },

},
"gitHead": "17d17833b2df7ab42f58e4abc8d33f5bb37a8a43"
"gitHead": "b2c8d8c8557c0324ee1c10d0f47441b624647f85"
}

@@ -8,2 +8,3 @@ import {

MAX_RECOMMENDED_TX_SIZE,
AccountID
} from "cojson";

@@ -406,3 +407,20 @@ import {

: parsedHeader?.ruleset.type === "ownedByGroup"
? [parsedHeader?.ruleset.group]
? [
parsedHeader?.ruleset.group,
...new Set(
newContentPieces.flatMap((piece) =>
Object.keys(piece)
.map((sessionID) =>
cojsonInternals.accountOrAgentIDfromSessionID(
sessionID as SessionID
)
)
.filter(
(accountID): accountID is AccountID =>
cojsonInternals.isAccountID(accountID) &&
accountID !== theirKnown.id
)
)
),
]
: [];

@@ -409,0 +427,0 @@

Sorry, the diff of this file is not supported yet