Global

Type Definitions

Bookmark

Source:
Properties:
Name Type Attributes Description
file string

Path within the project to the file

line number

Line number (1-based) in file when bookmark was constructed

text string

Text marked by bookmark

children Array.<Bookmark> <optional>

Child bookmarks

peg object <optional>

Persistent location identity within Git repository

Properties
Name Type Description
commit string

Commit in which bookmarked line exists

line number

Line number within peg.commit version of file

Type:
  • Object

Casefile

Source:
Properties:
Name Type Attributes Description
path string <nullable>
bookmarks Array.<Bookmark>
Type:
  • Object

Change

Range of 1-based line numbers in both sides of a diff representing a change

Source:
Properties:
Name Type Description
baseStart number

1-based line number in base version to delete or before which to insert

baseEnd number

1-based line number of the first line not to delete; for pure insertion, this equals baseStart

currentStart number

1-based line number in current version to add or mark position of deletion

currentEnd number

1-based line number in current version marking the first line not to insert; for pure deletion, this equals currentStart

Type:
  • object

CommandRunnerFunc(kwargsopt) → {Promise.<*>}

Source:

The resolved value can be the output of kwargs.exit, kwargs.makeResult, or the value kwargs.result (in that order of precedence). If the child process exits with a non-zero exit code and kwargs.exit is not given, this Promise will reject with an error where err.code === 'ChildProcessFailure' and err.exitCode contains the child process's exit code. This Promise will also reject, with err.code === 'Timeout', if the child process runs for longer than the allowed period.

Parameters:
Name Type Attributes Description
kwargs object <optional>
Properties
Name Type Attributes Description
opts Object.<string, (string|true)> <optional>

Options for the tool invocation; the - property is special: its value is treated as a list of single letter, non-argument options; option rendering for child_process.spawn's argument array is controlled by opts.optStyle passed to createCommandRunner

args Array.<string> <optional>

Positional arguments to pass after the options in the argument array to child_process.spawn

stdout function | Writable <optional>

A function to consume strings from STDOUT of the child process OR a writable stream to which STDOUT of the child process will be piped

feedStdin function <optional>

A callback function that receives the STDIN stream of the child process when it is available; input to the child process may be written or piped into the STDIN stream

exit function <optional>

Called with the child process's exit code when the process exits; its return value is the resolved value of this function

makeResult function <optional>

Called if no kwargs.exit given and the child process exits with code 0; its return value is the resolved value of this function

result function <optional>

Value to which this function resolves if the child process exits with code 0 and neither kwargs.exit nor kwargs.makeResult are given

cwd string <optional>

Initial current directory in which to launch the child process

env Object.<string, string> <optional>

Environment variables to pass to the child process; if not given, the environment variables passed to createCommandRunner are used or, if those were not given, process.env is used

logger Object <optional>

A console-like logger to use for logging errors; defaults to the opts.logger passed to createCommandRunner or, if that was not given, to console

Returns:
Type
Promise.<*>

ImmediateContent

Provide content as a string

Source:
Properties:
Name Type Description
immediate string

The text to process

Type:
  • object

OnDiskContent

Indicate content stored on the disk

Source:
Properties:
Name Type Description
path string

Path to the file containing the content

Type:
  • object

TextContent

Source:
Type:

ToolkitRunnerFunc(subcommand, kwargsopt) → {Promise.<*>}

Source:

See CommandRunnerFunc for description of params and return value

Parameters:
Name Type Attributes Description
subcommand string

The name of the subcommand, passed as the first argument to the program

kwargs object <optional>
Properties
Name Type Attributes Description
opts Object.<string, string> <optional>
args Array.<string> <optional>
stdout function | Writable <optional>
feedStdin function <optional>
exit function <optional>
makeResult function <optional>
result function <optional>
cwd string <optional>
env Object.<string, string> <optional>
logger Object <optional>
Returns:
Type
Promise.<*>

Events

execute

Source:
See:

This event is emitted to the opts.tracer given in a call to CommandRunner when the resulting CommandRunnerFunc or ToolkitRunnerFunc is called. The event is emitted before child_process.spawn is called. The parameters of the event correspond to the arguments to child_process.spawn.

Parameters:
Name Type Description
program string

The name of the program to be passed to child_process.spawn

arguments Array.<string>

The array of arguments to be passed to child_process.spawn

options object

The options object to be passed to child_process.spawn

executing

Source:
See:

This event is emitted to the opts.tracer given in a call to CommandRunner when the resulting CommandRunnerFunc or ToolkitRunnerFunc is called. This event is emitted from the synchronous context in which child_process.spawn is called, allowing manipulation of the stdin, stdout, and stderr streams before they are connected to the processing defined for the tool.

Parameters:
Name Type Description
props object
Properties
Name Type Description
program string

The name of the program passed to child_process.spawn

arguments Array.<string>

The array of arguments passed to child_process.spawn

options object

The options object passed to child_process.spawn

process ChildProcess

The ChildProcess returned by child_process.spawn