Skip to content

art-registry.mjs

Renders app/src/game/art-registry.json, the one deterministic reading of which art the aliens skin's surfaces need and whether it exists, and checks that reading for drift and stale debt.

Contributor toolingart-registry.mjs

What it does

Resolves every id ART_SURFACES declares against the files ART_SETS carries and the entries ART_DEBT excuses. Assigns each one a status: present, missing, debt, or re-render. Renders that registry into app/src/game/art-registry.json. By default, compares it byte for byte against the file on disk. Also fails on any missing id and on a debt entry that has gone stale. Passing --write writes the registry instead of checking it. Passing --report prints it grouped for a human placing an art order.

Usage

Run through its npm run alias:

bash
npm run art:registry:check

Or directly:

bash
node --import tsx tools/art-registry.mjs

The alias npm run art:registry runs the same command with --write, and npm run art:registry:report runs it with --report.

Options

FlagValueWhat it doesDefault
--reportno valuePrints the registry grouped into new renders, final-style re-renders, and missing entries. Exits 0 regardless of what it finds.Off.
--writeno valueWrites the rendered registry to app/src/game/art-registry.json, overwriting the file on disk.Off. With neither flag, the tool checks instead of writing.

Inputs and outputs

Reads three declarations:

  • ART_SURFACES, from app/src/game/themes/aliens/art-surfaces.mjs
  • ART_SETS, from app/src/game/art-manifest.mjs
  • ART_DEBT, from app/src/game/art-debt.mjs

The slug resolvers in app/src/game/themes/aliens/art.mjs are read as well.

tools/art-registry.mjs — part of Contributor tooling