
Company News
Socket Joins New OpenJS Program to Fund Node.js Security Work
Socket is joining the OpenJS Security Stewardship Program to fund Node.js vulnerability research, maintainer remediation, and security releases.
@profullstack/synconfig
Advanced tools
Sync a tool's config files with its cloud: an allowlisted snapshot, a digest, optimistic revisions, and the server half to store them. Extracted from moshcode's settings sync; myna is the second user.
Sync a tool's config files with the tool's own cloud. Also published as
@profullstack/syncfg, the same package under the short name.
A tool declares which files leave the machine and which never do. It takes them as one snapshot and saves it under a revision; another machine loads it. Whole files, never keys: a config file is edited by hand and by the tool, and merging two edits of one file is a guess, while a snapshot is a fact. Extracted from moshcode's settings sync; myna is the second user.
path NUL length NUL content NUL. The server answers an unchanged save
with the revision it already holds.null. The last ten are kept.sync.json) with per-file digests, so a
load refuses to overwrite a file edited locally since the last sync
unless forced, and a dry run shows the plan.import { createClient, save, load, status, syncOnce, autosync, type SyncPolicy } from "@profullstack/synconfig";
const policy: SyncPolicy = {
files: [{ path: "settings.json", json: true }, { path: "openprofile.md" }],
dirs: [{ path: "skills", suffixes: [".md"] }],
never: ["vault.json", "cloud.json", "sync.json"],
neverSuffixes: [".log", ".pid"],
};
const ctx = {
rootDir: "/home/me/.config/tool",
policy,
client: createClient({ baseUrl: "https://tool.example/api", token }),
api: "https://tool.example/api",
host: os.hostname(),
app: "tool 1.2.3",
};
await save(ctx); // { status: "saved" | "unchanged" | "conflict" | "empty", revision, ... }
await load(ctx, { dryRun: true }); // { status: "planned", plan: [{ path, status: "new" | "changed" | "same" }] }
await load(ctx); // "loaded" | "same" | "empty" | "local_changes"
await status(ctx); // { marker, drifted, serverRevision, behind }
autosync({ everyMs: 300_000, tick: () => syncOnce(ctx).then(() => {}) });
The pure pieces are exported too: collectSnapshot, validateSnapshot,
planApply, applyFiles, localDrift, digestFiles, markerFor,
loadMarker, saveMarker, isSyncable, normalizeRel.
Three framework-free handlers over a store you implement for your database.
import { handleGet, handlePut, handleRevisions, type SnapshotStore } from "@profullstack/synconfig/server";
const store: SnapshotStore = {
latest: async (userId) => ...,
insert: async (userId, entry, ifRevision) => ..., // max+1 under a precondition on max, in one statement
list: async (userId, limit) => ...,
};
app.get("/v1/synconfig", async (req) => reply(await handleGet(store, user.id)));
app.put("/v1/synconfig", async (req) => reply(await handlePut(store, user.id, await req.json())));
app.get("/v1/synconfig/revisions", async (req) => reply(await handleRevisions(store, user.id)));
memoryStore() is the reference implementation and what the tests use.
The server does not know the tool's policy, only the shape and size of a
snapshot, so a tool can start syncing a new file without a redeploy.
PUT <path> { snapshot: { version: 1, host, app, files: { "a.json": { content } } }, ifRevision: 3 | null }
200 { ok, revision, digest, savedAt, unchanged? } 409 { ok: false, error, revision }
GET <path> 200 { ok, revision, digest, savedAt, host, version, size, snapshot } 404 when empty
GET <path>/revisions 200 { ok, revisions: [{ revision, digest, savedAt, host, version, size }] }
Limits by default: 64 KB per file, 256 KB per snapshot, 64 files.
FAQs
Sync a tool's config files with its cloud: an allowlisted snapshot, a digest, optimistic revisions, and the server half to store them. Extracted from moshcode's settings sync; myna is the second user.
The npm package @profullstack/synconfig receives a total of 546 weekly downloads. As such, @profullstack/synconfig popularity was classified as not popular.
We found that @profullstack/synconfig 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.

Company News
Socket is joining the OpenJS Security Stewardship Program to fund Node.js vulnerability research, maintainer remediation, and security releases.

Security News
Two compromised GitHub Actions were re-enabled with malicious tags intact, exposing thousands of downstream repositories to Mini Shai-Hulud.

Research
/Security News
A malicious Firefox extension fetches its payload after installation to evade detection, steal Google session cookies, and automate account takeover.