
Research
5 Malicious Chrome Extensions Enable Session Hijacking in Enterprise HR and ERP Systems
Five coordinated Chrome extensions enable session hijacking and block security controls across enterprise HR and ERP platforms.
@loro-dev/flock-sqlite
Advanced tools
SQLite-backed Flock CRDT replica for Node, browsers, and Cloudflare Workers.
SQLite-backed implementation of the Flock CRDT surface. This package mirrors the TypeScript bindings while persisting state through unisqlite and stays wire-compatible with the MoonBit-backed bindings.
import { Flock } from "@loro-dev/flock-sqlite";
const flock = await Flock.open({ path: "flock.db" });
await flock.put(["doc", 1], { title: "hello" });
const bundle = await flock.exportJson();
const replica = await Flock.fromJson({ path: "replica.db", bundle });
console.log(await replica.get(["doc", 1])); // { title: "hello" }
await flock.close();
await replica.close();
See prd/003-flock-sqlite.md for the intended semantics (memcomparable keys, export/import, digest, and cross-platform SQLite adapters).
When running in browsers with multiple tabs open on the same database, unisqlite elects a single tab as the writable host. @loro-dev/flock-sqlite exposes that role so applications can avoid redundant work (e.g. multiple sync links or duplicated persistence pipelines):
const flock = await Flock.open({ path: "flock.db" });
if (flock.getRole() === "host") {
// Start background sync / persistence only on the host tab.
}
const unsubscribe = flock.subscribeRoleChange((role) => {
if (role === "host") {
// Became host.
} else if (role === "participant") {
// Lost host.
} else {
// "unknown": initializing/closing; treat conservatively.
}
});
In the same multi-tab scenario, writes/imports are logically host-only:
put/delete/importJson/... and broadcasts a commit to every tab.Subscription events carry clocks so consumers can reason about ordering and incremental sync:
flock.subscribe((batch) => {
for (const event of batch.events) {
console.log(event.key, event.clock);
}
});
For unit testing (or non-browser runtimes), you can inject the multi-tab environment dependencies instead of relying on BroadcastChannel, real timers, or browser-driven role transitions:
import { Flock, type FlockTransportFactory, type FlockRoleProvider, type FlockRuntime } from "@loro-dev/flock-sqlite";
const transportFactory: FlockTransportFactory = (name) => /* ... */;
const roleProvider: FlockRoleProvider = /* ... */;
const runtime: FlockRuntime = /* ... */;
const flock = await Flock.open({
path: ":memory:",
multiTab: { transportFactory, roleProvider, runtime, tabId: "tab-a" },
});
This makes the multi-instance routing logic fully testable in Vitest with in-memory SQLite, without Playwright.
txn() and autoDebounceCommit() only batch local write events initiated by this instance (i.e. commits with origin === this tab and source === "local"). Commits broadcast from other tabs are never buffered and always flow to subscribers immediately.
This adapter relies on unisqlite platform drivers. Install the matching peers for your environment:
better-sqlite3broadcast-channel and @sqlite.org/sqlite-wasm (when loading WASM from npm/CDN)FAQs
SQLite-backed Flock CRDT replica for Node, browsers, and Cloudflare Workers.
The npm package @loro-dev/flock-sqlite receives a total of 521 weekly downloads. As such, @loro-dev/flock-sqlite popularity was classified as not popular.
We found that @loro-dev/flock-sqlite demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Research
Five coordinated Chrome extensions enable session hijacking and block security controls across enterprise HR and ERP platforms.

Research
Node.js patched a crash bug where AsyncLocalStorage could cause stack overflows to bypass error handlers and terminate production servers.

Research
/Security News
A malicious Chrome extension steals newly created MEXC API keys, exfiltrates them to Telegram, and enables full account takeover with trading and withdrawal rights.