npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@velora-cms/content-service

v0.14.0

Published

Immutable content versioning service for Velora CMS

Readme

@velora-cms/content-service

The content versioning engine at the core of Velora CMS: every save is an insert, never an update, so nothing is ever silently overwritten. This package implements that rule on top of @velora-cms/db-adapter and is what @velora-cms/server runs on for every content read and write.

npm install @velora-cms/content-service

Who this is for

If you're building a Velora site, you don't need this package — talk to a running server through @velora-cms/client instead. content-service is for people extending the server itself, or building tooling that needs to drive content versioning directly against a DatabaseAdapter (a custom import pipeline, a migration script, a test harness).

What's in it

ContentService — create, save, and publish content, always by inserting a new ContentVersion row rather than mutating one:

import { ContentService } from "@velora-cms/content-service";
import { PostgreSQLAdapter } from "@velora-cms/db-adapter";

const adapter = new PostgreSQLAdapter();
await adapter.connect({ connectionString: process.env.DATABASE_URL });

const content = new ContentService(adapter);

// createContent inserts the node AND its first ContentVersion (version 1).
const { node, version } = await content.createContent({
  documentTypeId: "...",
  parentId: null,
  path: "/hello-world",
  depth: 0,
  sortOrder: 0,
  locale: "en",
  isDefaultLocale: true,
  data: { title: "Hello, world" },
  createdBy: "user-id",
});

// saveContent NEVER updates the row above — it always inserts version 2,
// 3, 4... and leaves node.currentVersion pointing wherever it was.
await content.saveContent(node.id, { title: "Hello, world (edited)" }, "user-id");

Also exported: DocumentTypeService (define and manage document types, refusing to delete a type still referenced by content) and SnapshotService (point-in-time content snapshots), plus the field validation helpers (validateField, validateFieldsAgainstDocumentType) and error types (ContentValidationError, TreeRulesViolationError, and others) that createContent/saveContent throw.

Relationship to the rest of Velora

content-service depends on @velora-cms/api-schemas for its types and @velora-cms/db-adapter for storage — it never issues raw SQL itself, the same rule plugins follow. @velora-cms/server is its only real consumer today; it wires ContentService up to the public and admin HTTP routes. If you want content over HTTP rather than this in-process API, use @velora-cms/client or the REST/GraphQL API directly.

Source & support

Source: velora-starter. Docs: https://docs.velora-cms.com. Apache-2.0.