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

@squeezecms/schema

v0.1.3

Published

Define Squeeze CMS content schemas in TypeScript and push them with the squeeze-schema CLI.

Readme

@squeezecms/schema

Schema format for Squeeze sites: define your content types in code (squeeze.config.ts) and push them to the API.

npm i -D @squeezecms/schema

ESM-only; needs Node 20.19+ (or 22.12+), where require() of ES modules works for CommonJS projects.

Defining a schema

// squeeze.config.ts
import { defineField, defineSchema, defineType } from '@squeezecms/schema';

export default defineSchema({
  types: [
    defineType({
      name: 'post',
      title: 'Blogpost',
      icon: 'article',
      fields: [
        defineField({
          name: 'title',
          title: 'Titel',
          type: 'text',
          required: true
        }),
        defineField({
          name: 'slug',
          title: 'Slug',
          type: 'slug',
          source: 'title'
        })
      ]
    })
  ]
});

Field types: text, slug, richtext, number, boolean, date, select, image, file, reference, array, object, blocks. Every field can be required and translatable.

icon sets the type's icon in the dashboard, one of TYPE_ICONS: document, article, page, person, people, box, cart, tag, folder, calendar, image, star, pin, chat, link, gear. Without it the dashboard guesses from the type name (author → person).

Pushing

# Once (CI/deploy): idempotent, versioned
npx squeeze-schema push --token $SQUEEZE_TOKEN

# During development: push on every save
npx squeeze-schema watch --token $SQUEEZE_TOKEN

The token is a schema push key (sqz_push_) for the site; create one in the dashboard under API-sleutels. The key determines the site.

| Flag | Env var | Default | | ---------- | ----------------- | ---------------------------- | | --token | SQUEEZE_TOKEN | required | | --api | SQUEEZE_API_URL | https://api.squeezecms.com | | --config | | ./squeeze.config.ts |

The config may be .ts, .mjs, .js or .json; TypeScript is loaded with jiti, no build step needed.

A push that removes a type, or a field, that still has content is refused: the CLI lists what would be dropped and how many documents are affected. push --force applies it anyway: documents of removed types are unpublished and kept (they come back as drafts when the type returns, e.g. via a schema rollback); values of removed fields are stripped from every document for good. watch does not accept --force.

Developing this package

Point the CLI at a local API:

npm run build --workspace @squeezecms/schema
node packages/schema/dist/cli.js push --api http://localhost:8080 --token sqz_push_...

Releases are tagged schema-v<version>; see the repository README.