manage-database
Advanced tools
Comparing version 0.1.2 to 0.1.3
@@ -5,2 +5,4 @@ 'use strict'; | ||
var DIALECTS = ['postgres', 'mysql']; | ||
module.exports = function (opts) { | ||
@@ -10,9 +12,8 @@ var dialect = opts && opts.dialect || 'mysql'; | ||
try { | ||
provider = require(join('./lib', dialect)); | ||
} catch (e) { | ||
if (DIALECTS.indexOf(dialect) === -1) { | ||
throw new Error('Dialect: ' + dialect + ' is not supported for now. Sorry ;('); | ||
} | ||
provider = require('./' + join('lib', dialect)); | ||
return provider(opts); | ||
}; |
{ | ||
"name": "manage-database", | ||
"version": "0.1.2", | ||
"version": "0.1.3", | ||
"description": "Manage databases", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
5818