Comparing version 10.0.1 to 10.0.2
@@ -0,1 +1,5 @@ | ||
#### 10.0.2 | ||
* Prefer arrow callbacks - Fixes #304 (Thanks @ururk) | ||
#### 10.0.1 | ||
@@ -2,0 +6,0 @@ |
@@ -187,3 +187,3 @@ "use strict"; | ||
const connection = this.getConnection(); | ||
return new Promise(function (resolve, reject) { | ||
return new Promise((resolve, reject) => { | ||
connection.shell((err, res) => { | ||
@@ -215,3 +215,3 @@ if (err) { | ||
const connection = this.getConnection(); | ||
return new Promise(function (resolve, reject) { | ||
return new Promise((resolve, reject) => { | ||
connection.sftp((err, res) => { | ||
@@ -262,3 +262,3 @@ if (err) { | ||
} | ||
channel.on('data', function (chunk) { | ||
channel.on('data', (chunk) => { | ||
if (options.onStdout) | ||
@@ -268,3 +268,3 @@ options.onStdout(chunk); | ||
}); | ||
channel.stderr.on('data', function (chunk) { | ||
channel.stderr.on('data', (chunk) => { | ||
if (options.onStderr) | ||
@@ -280,7 +280,7 @@ options.onStderr(chunk); | ||
let signal = null; | ||
channel.on('exit', function (code_, signal_) { | ||
channel.on('exit', (code_, signal_) => { | ||
code = code_ || null; | ||
signal = signal_ || null; | ||
}); | ||
channel.on('close', function () { | ||
channel.on('close', () => { | ||
resolve({ | ||
@@ -378,3 +378,3 @@ code: code != null ? code : null, | ||
const putFile = (retry) => { | ||
return new Promise(function (resolve, reject) { | ||
return new Promise((resolve, reject) => { | ||
sftp.fastPut(localFile, unixifyPath(remoteFile), transferOptions || {}, err => { | ||
@@ -381,0 +381,0 @@ if (err == null) { |
{ | ||
"name": "node-ssh", | ||
"version": "10.0.1", | ||
"version": "10.0.2", | ||
"description": "SS2 with Promises", | ||
@@ -5,0 +5,0 @@ "main": "lib/cjs/index.js", |
@@ -107,4 +107,8 @@ Node-SSH - SSH2 with Promises | ||
declare type Config = ConnectConfig & { | ||
host?: string; | ||
port?: number; | ||
username?: string; | ||
password?: string; | ||
privateKey?: string; | ||
passphrase?: string; | ||
tryKeyboard?: boolean; | ||
@@ -111,0 +115,0 @@ onKeyboardInteractive?: ( |
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
41944
270