Options
All
  • Public
  • Public/Protected
  • All
Menu

External module "lib/spawn"

Index

Functions

checkPackageJson

  • checkPackageJson(cwd: string): boolean
  • Check if a package.json file exists in cwd.

    Parameters

    • cwd: string

      directory to check for package.json

    Returns boolean

    true if package.json exists in cwd, false otherwise

cleanCommandString

  • cleanCommandString(cmd: string, args?: string[]): string
  • Create string representation of command and arguments, removing sensitive information.

    Parameters

    • cmd: string

      command

    • Optional args: string[]

      command arguments

    Returns string

    sanitized string representing command

npmCompile

  • npmCompile(cwd: string): Promise<number>
  • Run npm run compile. It ensures a package.json exist in cwd.

    Parameters

    • cwd: string

      directory to run the compilation in

    Returns Promise<number>

    return value of the npm run compile command

npmInstall

  • npmInstall(cwd: string): Promise<number>
  • Run npm ci if a package-lock.json exists in the project; runs npm install otherwise. It ensures a package.json exist in cwd.

    Parameters

    • cwd: string

      directory to run install in

    Returns Promise<number>

    return value of the npm install command

spawnBinary

  • Run a binary automation-client dependency in a platform-independent-ish way.

    Parameters

    Returns Promise<number>

spawnCommand

  • Run the given command with the given arguments, optionally installing and compiling first and return a Promise of the command exit value.

    Parameters

    Returns Promise<number>

    Promise of integer return value of command, Promise.resolve(0) if command is successful

spawnJs

  • Run an @atomist/automation-client Node.js script.

    Parameters

    Returns Promise<number>

spawnPromise

  • Run a command and return a promise supplying the exit value of the command.

    Parameters

    Returns Promise<number>

    a Promise of the return value of the spawned command

Generated using TypeDoc