Script types
A script entry declares exactly one variant. The variant is decided by which of four keys is
present: command, extends, serial or parallel.
The same rules are enforced twice: by these types when the config is written, and by Rune when it
is loaded. A fixture test asserts that anything tsc accepts, Rune accepts.
Shared fields
Every variant accepts these.
The command variant
command is handed to a shell, so operators work: tsc --build && node dist/main.js,
jest | tee test.log, cross-env NODE_ENV=test vitest. Rune parses none of it. The shell is
cmd.exe on Windows and /bin/sh elsewhere, or whatever npm_config_script_shell names.
Per-OS commands
Where one command cannot serve every platform, command takes an object. default is required
and is used for any platform without its own entry.
Selection happens at resolution time, from the platform Rune is running on. rune inspect prints
the selected string, not the object.
The extends variant
Resolves another script's command and appends arguments to it. Chains are followed transitively and cycles are rejected by name. See Inheritance and overrides.
The group variants
Members are script names. A group carries no command and no lifecycle options; those belong on
the members. See Groups.
Validation
Every rejection names the script it came from, because a config with thirty entries makes a message about "the shape" useless.
An unknown field is an error rather than a warning. Silent acceptance of retires instead of
retries means the option never takes effect and nothing says so.
Diagnostics go to stderr on every platform. Standard output belongs to the script.