Socket
Socket
Sign inDemoInstall

mysql-ssh

Package Overview
Dependencies
19
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.0.5 to 1.0.6

20

mysql.js

@@ -12,5 +12,13 @@ #!/usr/bin/env node

/**
* @var ssh2.Connection _conn The SSH connection
*/
_conn: null,
/**
* @var mysql2.Connection _conn The MySQL connection
*/
_sql: null,
/**
* @param obj sshConfig SSH Configuration as defined by ssh2 package

@@ -32,7 +40,7 @@ * @param obj dbConfig MySQL Configuration as defined by mysql(2) package

if (err) {
tunnel._conn.end()
tunnel.close()
var msg = err.reason == 'CONNECT_FAILED'
? 'Connection failed.'
: err
return reject(err)
return reject(msg)
}

@@ -44,4 +52,4 @@

var sql = mysql.createConnection(dbConfig)
resolve(sql)
tunnel._sql = mysql.createConnection(dbConfig)
resolve(tunnel._sql)
}

@@ -54,2 +62,6 @@ )

close: function() {
if ('end' in tunnel._sql) {
tunnel._sql.end(function(err) {})
}
if ('end' in tunnel._conn) {

@@ -56,0 +68,0 @@ tunnel._conn.end()

2

package.json

@@ -9,3 +9,3 @@ {

"name": "mysql-ssh",
"version": "1.0.5",
"version": "1.0.6",
"description": "Execute mysql commands over an ssh tunnel.",

@@ -12,0 +12,0 @@ "main": "mysql.js",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc