Add inspect subcommand: read-only stats for v2 map files

Reads the map JSON, optionally loads --atlas-dir paths for name
resolution, and prints the inspector report to stdout. Missing
file, bad JSON, and missing --atlas-dir paths all produce
labelled stderr errors with exit 1.
This commit is contained in:
Axel Meyer
2026-05-23 16:59:07 +02:00
parent 530bceaddd
commit eb255480a1
3 changed files with 131 additions and 0 deletions

View File

@@ -33,6 +33,7 @@ function run(argv, { out, err }) {
encode: require('./commands/encode'),
decode: require('./commands/decode'),
build: require('./commands/build'),
inspect: require('./commands/inspect'),
};
const handler = handlers[head];
if (!handler) {