Something went wrong. Try again.
[READ-ONLY] Mirror of https://github.com/Aquaticat/Monochromatic. TypeScript and Rust monorepo: Claude Code and Pi coding-agent plugins, a m
Something went wrong. Try again.
# @monochromatic-dev/dev-script-task-util
CLI utilities for mise task orchestration:
a command executor with `allowFailure` support,
a file append helper,
a make-style dependency checker,
a `tsc` wrapper that filters `node_modules` diagnostics,
and an `oxlint` wrapper that augments diagnostics while preserving every finding and exit status.
## Orchestration regression tests
`src/build-and-test.unit.test.ts` verifies the generated root `buildAndTest` task
through real mise subprocesses with disposable build and test fixtures.
It checks that tests still run after build failure,
that either phase failing makes the aggregate fail,
and that explicitly tolerant tasks remain tolerant.
This suite consumes generated `mise.toml` rather than a bundled TypeScript function:
the configuration is the artifact under test.
Relative imports supply test-only fixture helpers.
```sh
# Repository root
mise run buildAndTest -- package/dev-script/task-util/src/build-and-test.unit.test.ts
```
## Binaries
### task-command
Wraps command execution to work around task runner limitations where tasks with
`allowFailure: true` can't be dependencies.
Controls exit codes while preserving
all output and errors.
```sh
# Exit with the command's exit code
task-command -- oxlint
# Always exit with 0 regardless of command result
task-command --allowFailure -- oxlint
task-command -a -- oxlint
# Execute through the shell (enables pipes, &&, etc.)
task-command --shell -- "echo hello && echo world"
task-command -s -- "echo hello && echo world"
# Set a timeout in milliseconds
task-command --timeout 5000 -- npm test
task-command -t 5000 -- npm test
# Combine flags
task-command -a -s -- "oxlint && dprint check"
```
The `--` separator is required to distinguish script flags from command arguments.
### task-append
Appends text lines to a file.
Validates that the target file exists and has write
permissions before appending.
```sh
# Append a single line
task-append "new line" --to output.md
# Append multiple lines as separate arguments
task…