Function runCliScript

  • Runs a script path as if it had been run directly, as much as possible.

    Parameters

    • path: string
    • cliScriptFilePath: string

      This should just be __filename (for CJS) or import.meta.filename (for ESM).

    • binName: undefined | string

      This should be the bin name of the package that is calling this function. Set to undefined if there isn't one.

    Returns Promise<void>