Skip to content

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.

T

string[]

Arguments to pass to sf, including --json.

Options

Optional execa options.

Promise<T>

The parsed payload, typed as the caller asserts.

If the command’s output isn’t valid JSON.