Options
All
  • Public
  • Public/Protected
  • All
Menu

External module "util/spawned"

Index

Type aliases

ErrorFinder

ErrorFinder: function

Type that can react to the exit of a spawned child process, after Node has terminated without reporting an error. This is necessary only for commands that can return a non-zero exit code on success.

returns

whether this result should be considered an error.

Type declaration

    • (code: number, signal: string, log: WritableLog): boolean
    • Parameters

      Returns boolean

Functions

Const SuccessIsReturn0ErrorFinder

  • SuccessIsReturn0ErrorFinder(code: number): boolean
  • Default ErrorFinder that regards return code 0 as success

    Parameters

    • code: number

    Returns boolean

asSpawnCommand

  • asSpawnCommand(sentence: string, options?: SpawnOptions): SpawnCommand
  • Convenient function to create a spawn command from a sentence such as "npm run compile" Does not respect quoted arguments

    Parameters

    • sentence: string
    • Default value options: SpawnOptions = {}

    Returns SpawnCommand

poisonAndWait

  • poisonAndWait(childProcess: ChildProcess): Promise<any>
  • Kill the child process and wait for it to shut down. This can take a while as child processes may have shut down hooks.

    Parameters

    • childProcess: ChildProcess

    Returns Promise<any>

spawnAndWatch

stringifySpawnCommand

watchSpawned

Generated using TypeDoc