Comparing version 2.0.0 to 2.0.1
{ | ||
"name": "node-ssh", | ||
"version": "2.0.0", | ||
"version": "2.0.1", | ||
"description": "SS2 with Promises", | ||
@@ -5,0 +5,0 @@ "main": "Dist/SSH.js", |
@@ -25,2 +25,16 @@ // @Compiler-Transpile "true" | ||
return new Promise((resolve, reject) => { | ||
if (typeof config.username !== 'string') { | ||
throw new Error('No username provided') | ||
} else if (typeof config.host !== 'string') { | ||
throw new Error('No host provided') | ||
} | ||
if (config.privateKey) { | ||
if (Path.isAbsolute(config.privateKey)) { | ||
try { | ||
config.privateKey = FS.readFileSync(config.privateKey) | ||
} catch (err) { | ||
throw new Error('Unable to read private key') | ||
} | ||
} | ||
} | ||
this.connection.on('error', reject) | ||
@@ -27,0 +41,0 @@ this.connection.on('ready', () => { |
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
18589
454
0