Files
Zeke Foppa fead68c308 CI - enforce minimum pnpm package age (#5032)
# Description of Changes

Due to the relatively frequent supply chain attacks on especially npm
packages, we're instituting a minimum package age in the whole repo.

- Globally set a minimum npm package age in CI
- Best-effort set npm package age using `.npmrc` beside any
`package.json`
- Add CI checks that pnpm version and minimum package age values are the
same everywhere

# API and ABI breaking changes

None

# Expected complexity level and risk

2

# Testing

<!-- Describe any testing you've done, and any testing you'd like your
reviewers to do,
so that you're confident that all the changes work as expected! -->

- [x] CI passes
- [x] if I remove a `.npmrc` then `cargo ci lint` fails
- [x] if I change a value in `.npmrc` then `cargo ci lint` fails

---------

Signed-off-by: Zeke Foppa <196249+bfops@users.noreply.github.com>
Co-authored-by: Zeke Foppa <bfops@users.noreply.github.com>
2026-05-16 12:47:56 -07:00
..

Template Tools

Scripts for maintaining template READMEs and metadata in the SpacetimeDB repo. Output is consumed by spacetimedb.com for the templates page.

Scripts

  • generate-readmes Converts quickstart MDX docs to Markdown and writes templates/<slug>/README.md. Discovers mappings by parsing --template X from quickstart files. Templates can override with a quickstart field in .template.json (must point to a file in the quickstarts dir).
  • update-jsons Updates builtWith in each templates/<slug>/.template.json from package.json, Cargo.toml, and .csproj manifests
  • generate Runs both (readmes first, then jsons)

Usage

From this directory:

pnpm install
pnpm run generate

Or individually:

pnpm run generate-readmes
pnpm run update-jsons

When to run

Run after changing quickstart docs (docs/docs/00100-intro/00200-quickstarts/) or adding/renaming templates. Commit the generated READMEs and updated .template.json files.