UNPKG

ssh2-exec

Version:

Transparent usage between `child_process.exec` and `ssh2.prototype.exec`

14 lines (11 loc) 393 B
import { Client } from 'ssh2'; import { ExecOptions } from './index.cjs'; import 'node:child_process'; type ExecResolve = { stdout: string; stderr: string; code: number; }; declare function exec(options: ExecOptions): Promise<ExecResolve>; declare function exec(ssh: Client | null, command: string, options?: ExecOptions): Promise<ExecResolve>; export { exec as default, exec };