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

@duffcloudservices/cms-core

v0.1.1

Published

Shared types and utilities for DCS CMS framework packages

Readme

@duffcloudservices/cms-core

Shared types and utilities for DCS CMS framework packages.

Overview

This package provides the foundation that all framework-specific CMS packages depend on:

  • Types: TypeScript definitions for content.yaml, seo.yaml, and pages.yaml
  • Content utilities: Functions to resolve text keys across global and page-specific content
  • SEO utilities: Functions to resolve and merge SEO configuration
  • YAML loaders: Functions to load and parse DCS configuration files
  • Runtime fetching: Functions to fetch content from the DCS API (premium tier)

Installation

pnpm add @duffcloudservices/cms-core

Usage

Content Resolution

import { resolveTextKey, getPageContent } from '@duffcloudservices/cms-core'
import type { ContentConfiguration } from '@duffcloudservices/cms-core'

const content: ContentConfiguration = {
  version: 1,
  global: {
    'nav.home': 'Home',
    'footer.copyright': '© 2026 Company',
  },
  pages: {
    home: {
      'hero.title': 'Welcome',
      'hero.subtitle': 'Build amazing things',
    },
  },
}

// Resolve a single key
const title = resolveTextKey(content, 'home', 'hero.title') // 'Welcome'
const nav = resolveTextKey(content, 'home', 'nav.home') // 'Home' (from global)

// Get all content for a page (merged)
const homeContent = getPageContent(content, 'home')
// { 'nav.home': 'Home', 'footer.copyright': '...', 'hero.title': '...', ... }

SEO Resolution

import { resolveSeoForPage, buildMetaTags } from '@duffcloudservices/cms-core'
import type { SeoConfiguration } from '@duffcloudservices/cms-core'

const seo: SeoConfiguration = {
  version: 1,
  global: {
    siteName: 'My Site',
    defaultTitle: 'My Site',
    titleTemplate: '%s | My Site',
  },
  pages: {
    home: {
      title: 'Welcome',
      description: 'The homepage of My Site',
    },
  },
}

// Resolve SEO for a page
const resolved = resolveSeoForPage(seo, 'home')
// { title: 'Welcome | My Site', description: '...', ... }

// Build meta tags array
const tags = buildMetaTags(resolved)
// [{ name: 'description', content: '...' }, { property: 'og:title', ... }]

YAML Loading (Build-time)

import { loadContentYaml, loadSeoYaml } from '@duffcloudservices/cms-core'

const content = await loadContentYaml('.dcs/content.yaml')
const seo = await loadSeoYaml('.dcs/seo.yaml')

Runtime Fetching (Premium)

import { fetchRuntimeContent } from '@duffcloudservices/cms-core'

// Premium tier only - returns null for non-premium sites
const content = await fetchRuntimeContent('my-site-slug', {
  apiBaseUrl: 'https://api.duffcloudservices.com',
})

Framework Packages

This core package is used by:

  • @duffcloudservices/cms-vue - Vue 3 composables + Vite plugins
  • @duffcloudservices/cms-react - React hooks + Vite plugins
  • @duffcloudservices/cms-angular - Angular services + build scripts
  • @duffcloudservices/cms-astro - Astro integration

License

MIT