sequelize-seed
Advanced tools
Comparing version
{ | ||
"name": "sequelize-seed", | ||
"version": "0.0.1", | ||
"version": "0.0.2", | ||
"description": "", | ||
@@ -15,2 +15,2 @@ "main": "index.js", | ||
} | ||
} | ||
} |
@@ -18,4 +18,4 @@ const fs = require('fs'); | ||
_import(path) { | ||
let definition = require(path); | ||
_import(path_str) { | ||
let definition = require(path_str); | ||
let model = definition(Model, {}); | ||
@@ -25,13 +25,13 @@ this.models[model.name] = model; | ||
import(path) { | ||
let isDirectory = fs.lstatSync(path).isDirectory(); | ||
import(path_str) { | ||
let isDirectory = fs.lstatSync(path_str).isDirectory(); | ||
if (!isDirectory) return this._import(path); | ||
if (!isDirectory) return this._import(path_str); | ||
fs | ||
.readdirSync(path) | ||
.readdirSync(path_str) | ||
.filter(function (file) { | ||
return (file.indexOf('.') !== 0) && (file !== 'index.js') && (file.slice(-3) === '.js'); | ||
}) | ||
.forEach(file => this._import(path.resolve(path, file))); | ||
.forEach(file => this._import(path.resolve(path_str, file))); | ||
} | ||
@@ -38,0 +38,0 @@ } |
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
3213
0.91%