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

@springtree/eva-contentful-cli

v1.2.1

Published

NPM scripts for EVA project that use Contentful

Readme

eva-contentful-cli

:evergreen_tree: Purpose

A command-line tool that copies STEP values from EVA into the field validations of Contentful content types. STEP values are product attributes that EVA gets from the STEP product information system.

The tool reads all content types in the master environment of a Contentful space. If a content type has one of the fields below, the tool adds the values to the in validation of that field:

| Field | Values added | | ------------------ | ------------------------------------------------------------------- | | stepMainCategory | The STEP main categories from EVA | | stepSubCategory | The STEP sub categories from EVA | | ancientRitual | The rituals from EVA, plus the concept collections in the code | | locale | The fixed list of locales in the code |

| Field | Value | | ---------------- | --------------------- | | Customer | Rituals | | Project | Not recorded yet | | Production owner | Not recorded yet |

The package is public on npm as @springtree/eva-contentful-cli.

:seedling: Getting started

You need these four values:

  • An EVA token with permission to read STEP data.
  • A Contentful management token with write access to the space.
  • The Contentful space ID.
  • The EVA domain, without https://.

The package requires Node.js 24 or later. Run it with npx:

npx @springtree/eva-contentful-cli -c {CONTENTFUL_TOKEN} -e {EVA_EMPLOYEE_TOKEN} -s {CONTENTFUL_SPACE_ID} -d {EVA_DOMAIN}

NOTE: The tool updates and publishes the content types in the master environment at once. There is no dry run.

The tool only adds values. It merges the new values with the existing list, removes duplicates and sorts the result. It never removes a value.

Upgrading from 1.2.0

The arguments are unchanged. What is different:

  • Node.js 24 or later is required.
  • contentful-management is upgraded from 7 to 12 and uses the plain client.
  • The tool waits for every content type to finish. An unexpected error now reaches the command line error handler instead of being lost.
  • A failed update is logged and that content type is not published. A failed publish is logged too.
  • The "field not found" message shows the content type ID. It showed undefined before.

Command line arguments

| Argument | Required | Description | | -------------------- | -------- | ------------------------------------------------- | | -e, --eva | Yes | EVA token with permission to read STEP data | | -c, --contentful | Yes | Contentful management token | | -s, --space | Yes | Contentful space ID to update | | -d, --domain | Yes | EVA domain, without the https:// prefix | | -h, --help | No | Show the help message and stop |

Example result

After a run, the locale field of a content type looks like this:

{
  "id": "locale",
  "name": "Locale",
  "type": "Symbol",
  "localized": false,
  "required": true,
  "validations": [
    {
      "in": [
        "bg_BG",
        "da-DK",
        "de-AT",
        "de-CH",
        "de-DE",
        "el_GR",
        "en-AT",
        "en-BE",
        ...
      ]
    }
  ],
  "disabled": false,
  "omitted": false
}

:hammer: Development

# Use the Node.js version in .nvmrc (24)
fnm use   # or: nvm use

# Install the dependencies from the lockfile
npm ci

# Run the CLI from the working copy
node lib/cli.js -c {CONTENTFUL_TOKEN} -e {EVA_EMPLOYEE_TOKEN} -s {CONTENTFUL_SPACE_ID} -d {EVA_DOMAIN}

The locale list and the concept collections are in lib/contentful-fn.js. To add a locale or a collection, edit that file.

NOTE: The repository has no tests and no linter. A run from the working copy changes the real Contentful space, the same as a run with npx.

:cool: Technology stack

:twisted_rightwards_arrows: Branch strategy and protection

The default branch is master. It is the only long-lived branch. Every push to it updates the release pull request (see Deploying).

The organization ruleset protects master:

  • No direct pushes. All changes go through a pull request, merged by squash or rebase. History stays linear, and nobody can force-push or delete the branch.
  • The four supply-chain checks (supply-chain / secrets, supply-chain / licences, supply-chain / code and supply-chain / quarantine) run on every pull request. They block merging when an admin turns on enforcement for this repository.
  • Changes to the policy files (.github/CODEOWNERS, .github/workflows/compliance.yml and licence-exemptions.json) need a review from @springtreesolutions/springtree-admins (see .github/CODEOWNERS).

:pencil: Commit messages

Commits follow Conventional Commits. release-please reads them to choose the next version and to write the changelog:

| Commit | Release | | ------------------------------- | ------- | | fix: or perf: | Patch | | feat: | Minor | | A BREAKING CHANGE: footer | Major | | Other types, such as docs: | None |

Nothing checks the format. A commit with a wrong message does not cause a release.

:lock: Compliance

This repository is gated by SpringTree's shared supply-chain workflow (.github/workflows/compliance.yml), which runs four checks on every pull request and a full-history scan weekly:

| Gate | Refuses | | ------------ | ------------------------------------------------------- | | secrets | a credential committed anywhere in the scanned range | | licences | a dependency whose licence is not on the allow-list | | code | a code pattern the ruleset classes as a security defect | | quarantine | missing or incorrect package-cooldown configuration |

A red gate is fixed here, in this repository. The springtree-ci-workflows README documents each gate and its inputs.

Packages younger than seven days are refused (min-release-age in .npmrc). That window is a management decision recorded in the secure development standard, not a local preference. Raise it there first.

:mag: Before you push

git config core.hooksPath .githooks   # once per clone
brew install gitleaks                 # once per machine

The hook scans the commits you are about to push for secrets. If gitleaks is not installed, the hook refuses the push. It is feedback, not enforcement: --no-verify skips it and CI does not. Skipping is break-glass.

:up: Deploying

The package is published to npm as @springtree/eva-contentful-cli by GitHub Actions using release-please (.github/workflows/release.yml). Nothing is published by hand.

  1. Every merge to master updates a single release pull request with the version bump and changelog since the last release (release-please-config.json, current version in .release-please-manifest.json)
  2. Merging the release pull request creates the tag and GitHub release
  3. The same workflow then publishes the package under the latest dist-tag

Pull requests to master are checked by .github/workflows/build.yml, which installs the dependencies with npm ci and does not publish.

Publishing uses npm trusted publishing (OIDC), so there is no npm token. The package has a trusted publisher on npmjs.com for this repository, workflow release.yml and environment npm-publish. That GitHub environment only allows deployments from master, so no other branch can publish.