Skip to content
TypeWire

@tahanabavi/typewire-cli

documents v0.0.0

Command-line tools for TypeWire contracts — contract test runner, scaffolding, and reports.

Exit codes

CodeMeaning
0Success
1Findings — tests failed, contracts have problems
2Misconfiguration — the config is missing, invalid, or unreadable

A CI job that gates on findings needs to tell "your contracts have problems" apart from "your pipeline is broken".

Exports

ExportPurpose
defineConfig(config)Type-safe config helper; accepts an object or a function
defineTypeFetchTestConfig(config)Deprecated alias for the pre-2.0 flat shape
loadTypeWireConfig(options)Find, merge and validate the config yourself
requireTypeFetch(config, command)The typefetch section, or an error naming the command
TypeWireConfigErrorCarries exitCode: 2
runCli(argv)Run the CLI programmatically
writeReportFiles(report, path)Write a report as .md, .html or .json

License

MIT © Taha Nabavi ↗