← Roadmap
📝

npm: Write-Through Publish

⏳ Upcoming

A read-only mirror protects you when you install. But the same node can protect you when you ship. Celilo’s npm-cache-node module will grow a publish endpoint, so your own cache becomes your primary publish target — celilo publish points at it instead of npmjs.com, and the cache node decides when and what flows upstream. The node in the middle becomes a real release gateway, not just a passthrough.

Publish to yourself first

The node accepts standard npm publishes at a PUT /publish endpoint, authenticated with an operator token. It stores the tarball locally first and serves it immediately to anyone querying the cache — so a version is usable inside your lab the instant it’s published, before it ever touches the public registry. Your upstream npm credential lives in the cache node’s secret store; individual publishers never hold it.

Forwarding under policy

What reaches npmjs.com is a per-package decision the node makes for you. Security fixes forward immediately; ordinary releases debounce, coalescing a burst of back-to-back publishes into one upstream push. -alpha.* pre-releases are held back entirely — visible to operators pointed at the cache, invisible to the public until an explicit promote. If an integrity check fails, the publish stops at the node and you get notified.

All or nothing

Celilo’s own packages publish as a set — @celilo/cli, @celilo/event-bus, and the rest go out together. The node treats publishes sharing one publish_set_id as one logical release: forward all or none, never a partial set. A half-forwarded release is worse than none — consumers resolve some packages from npmjs and others from the cache, and lockfiles diverge. Atomic forwarding closes that gap.