Function: inspectCommand()
inspectCommand(
args,deps,posture?):Promise<RunResult>
Run the inspect command.
Parameters
args
string[]
The arguments after the inspect subcommand token.
deps
Injected input readers (RunDeps).
posture?
PhiPosture = VALUE_FREE
The resolved PhiPosture (governs only the opt-in unsafe excerpt on a parse-failure diagnostic; the summary itself is always value-free).
Returns
Promise<RunResult>
A RunResult: the value-free structural summary on stdout (human, or JSON under
--json), exit 0; a parse failure is a data error (65), an unreadable file 66, a bad flag 2.
Throws
Never CliError; may propagate a truly unexpected error for the dispatcher to map.
Example
import { inspectCommand } from "@cosyte/cli";
const deps = {
readFile: async () => new TextEncoder().encode('{"resourceType":"Patient"}'),
readStdin: async () => new Uint8Array(),
};
(await inspectCommand(["patient.json", "--json"], deps)).exit; // => 0