Comparing version 4.1.0 to 4.2.0
@@ -0,1 +1,6 @@ | ||
#### 4.2.0 | ||
- Fix a typo in README | ||
- Add support for passing direct options to `ssh2.exec` | ||
#### 4.1.0 | ||
@@ -2,0 +7,0 @@ |
@@ -162,2 +162,4 @@ 'use strict'; | ||
(0, _assert2.default)(!options.stream || ['stdout', 'stderr', 'both'].indexOf(options.stream) !== -1, 'options.stream must be among "stdout", "stderr" and "both"'); | ||
(0, _assert2.default)(!options.options || _typeof(options.options) === 'object', 'options.options must be an object'); | ||
var output = yield this.execCommand([command].concat((0, _shellEscape2.default)(parameters)).join(' '), options); | ||
@@ -194,2 +196,3 @@ if (!options.stream || options.stream === 'stdout') { | ||
(0, _assert2.default)(!options.stdin || typeof options.stdin === 'string', 'options.stdin must be a string'); | ||
(0, _assert2.default)(!options.options || _typeof(options.options) === 'object', 'options.options must be an object'); | ||
@@ -216,3 +219,3 @@ if (options.cwd) { | ||
}); | ||
}, reject)); | ||
}, reject), options.options || {}); | ||
}); | ||
@@ -219,0 +222,0 @@ }); |
{ | ||
"name": "node-ssh", | ||
"version": "4.1.0", | ||
"version": "4.2.0", | ||
"description": "SS2 with Promises", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
@@ -71,4 +71,4 @@ Node-SSH - SSH2 with Promises | ||
} | ||
}).then(function(successful) { | ||
console.log('the directory transfer was', successful ? 'successful' : 'unsuccessful') | ||
}).then(function(status) { | ||
console.log('the directory transfer was', status ? 'successful' : 'unsuccessful') | ||
console.log('failed transfers', failed.join(', ')) | ||
@@ -83,3 +83,3 @@ console.log('successful transfers', successful.join(', ')) | ||
// Command with escaped params | ||
ssh.exec('hh_client', ['--json'], { cwd: '/var/www', stream: 'stdout' }).then(function(result) { | ||
ssh.exec('hh_client', ['--json'], { cwd: '/var/www', stream: 'stdout', options: { pty: true } }).then(function(result) { | ||
console.log('STDOUT: ' + result) | ||
@@ -98,4 +98,4 @@ }) | ||
mkdir(path: string): Promise<string> | ||
exec(command: string, parameters: Array<string>, options: { cwd?: string, stdin?: string, stream?: 'stdout' | 'stderr', 'both' } = {}): Promise<Object | string> | ||
execCommand(command: string, options: { cwd: string, stdin: string } = {}): Promise<{ stdout: string, stderr: string, signal: ?string, code: number }> | ||
exec(command: string, parameters: Array<string>, options: { cwd?: string, options?: Object, stdin?: string, stream?: 'stdout' | 'stderr', 'both' } = {}): Promise<Object | string> | ||
execCommand(command: string, options: { cwd: string, stdin: string } = {}): Promise<{ stdout: string, options?: Object, stderr: string, signal: ?string, code: number }> | ||
putFile(localFile: string, remoteFile: string, sftp: ?Object = null, opts: ?Object = null): Promise<void> | ||
@@ -102,0 +102,0 @@ getFile(localFile: string, remoteFile: string, sftp: ?Object = null, opts: ?Object = null): Promise<void> |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
32461
507