mirror of
https://github.com/clockworklabs/SpacetimeDB.git
synced 2026-06-27 00:13:33 -04:00
fead68c308
# 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>
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 Xfrom quickstart files. Templates can override with aquickstartfield in.template.json(must point to a file in the quickstarts dir). - update-jsons – Updates
builtWithin eachtemplates/<slug>/.template.jsonfrom 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.