runSfJson
runSfJson<
T>(args,options?):Promise<T>
Defined in: packages/simply-cicd-core/src/exec/sfCli.ts:50
Run the Salesforce CLI and parse its --json output.
The caller still passes --json in args — this doesn’t inject it, because which commands
accept it and where it belongs in the argument list varies. What it does replace is the
JSON.parse(stdout) as SomeShape written out at each call site.
Type Parameters
Section titled “Type Parameters”T
Parameters
Section titled “Parameters”string[]
Arguments to pass to sf, including --json.
options?
Section titled “options?”Options
Optional execa options.
Returns
Section titled “Returns”Promise<T>
The parsed payload, typed as the caller asserts.
Throws
Section titled “Throws”If the command’s output isn’t valid JSON.