Skip to content

five-on-it / apps/tools/src/level-files

apps/tools/src/level-files ​

The files the pipeline derives from the scenes, under packages/world/levels/: one <name>.json per scene, its declaration <name>.d.json.ts and the generated registry index.ts. Listing them, writing the registry and the declarations, holding a name to the convention, and the orphans a renamed or deleted scene leaves behind (the export removes them, the gate reports them). The directory is owned by the pipeline: a level file kept for FOI_LEVEL=<path> must live elsewhere.

A declaration says a level file is unknown: TypeScript reads it in place of the JSON (allowArbitraryExtensions), which it would otherwise type literally, megabytes of it for a city (2 GB and over a minute for every workspace that imports the registry, more than a hosted runner has). A level is checked when it is loaded (loadLevel), not by its inferred type.

Variables ​

Functions ​