refactor cli
This commit is contained in:
@@ -125,34 +125,15 @@ type VersionChangedListener = (
|
||||
) => void;
|
||||
|
||||
type RunOptions = {
|
||||
/**
|
||||
* Used to output progress messages, e.g. to the status bar.
|
||||
*/
|
||||
progressReporter?: ProgressReporter;
|
||||
/**
|
||||
* Used for responding to interactive output on stdout/stdin.
|
||||
*/
|
||||
onLine?: OnLineCallback;
|
||||
/**
|
||||
* If true, don't print logs to the CodeQL extension log.
|
||||
*/
|
||||
silent?: boolean;
|
||||
/**
|
||||
* If true, run this command in a new process rather than in the CLI server.
|
||||
*/
|
||||
runInNewProcess?: boolean;
|
||||
/**
|
||||
* If runInNewProcess is true, allows cancelling the command. If runInNewProcess
|
||||
* is false or not specified, this option is ignored.
|
||||
*/
|
||||
token?: CancellationToken;
|
||||
progressReporter?: ProgressReporter; // Outputs progress messages (e.g., status bar)
|
||||
onLine?: OnLineCallback; // Handles interactive output on stdout/stdin
|
||||
silent?: boolean; // Suppresses logs in the CodeQL extension log
|
||||
runInNewProcess?: boolean; // Runs command in a new process instead of CLI server
|
||||
token?: CancellationToken; // Enables cancellation (only if `runInNewProcess` is true)
|
||||
};
|
||||
|
||||
type JsonRunOptions = RunOptions & {
|
||||
/**
|
||||
* Whether to add commandline arguments to specify the format as JSON.
|
||||
*/
|
||||
addFormat?: boolean;
|
||||
addFormat?: boolean; // Adds command-line arguments to specify JSON format
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user