@soinlabs/db
Advanced tools
Comparing version 0.0.3 to 0.0.4
31
index.js
@@ -1,3 +0,30 @@ | ||
const sequelize = require('@soinlabs/sequelize') | ||
const Sequelize = require('@soinlabs/sequelize') | ||
module.exports = { ...sequelize } | ||
function init(config) { | ||
switch(config.orm) { | ||
case 'sequelize': | ||
this.sequelize = new Sequelize( | ||
config.database, | ||
config.username, | ||
config.password, | ||
config.options | ||
) | ||
this.Sequelize = Sequelize | ||
this.orm = 'sequelize' | ||
break | ||
default: break | ||
} | ||
} | ||
function model(path) { | ||
let model = null | ||
switch(this.orm) { | ||
case 'sequelize': | ||
model = require(path)(this.sequelize, this.Sequelize) | ||
break | ||
default: break | ||
} | ||
return model | ||
} | ||
module.exports = { ...Sequelize, init, model } |
{ | ||
"name": "@soinlabs/db", | ||
"version": "0.0.3", | ||
"version": "0.0.4", | ||
"main": "index.js", | ||
@@ -5,0 +5,0 @@ "repository": "", |
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
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
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
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
Trivial Package
Supply chain riskPackages less than 10 lines of code are easily copied into your own project and may not warrant the additional supply chain risk of an external dependency.
Found 1 instance in 1 package
1344
27
0
2