@sinet/validation
Advanced tools
Comparing version 1.3.14 to 1.3.15
25
index.js
'use strict'; | ||
var validations = { | ||
'action' : require( './schemas/action' ), | ||
'authentication' : require( './schemas/authentication' ), | ||
'libraries' : require( './schemas/libraries' ), | ||
'lti' : require( './schemas/lti' ), | ||
'mc' : require( './schemas/mc' ), | ||
'observation' : require( './schemas/observation' ), | ||
'user' : require( './schemas/user' ) | ||
}; | ||
var fs = require( 'fs' ); | ||
var path = require( 'path' ); | ||
var schemaBasePath = path.join( __dirname, 'schemas' ); | ||
var schemas = fs.readdirSync( schemaBasePath ); | ||
module.exports = validations; | ||
function validations () { | ||
var returnObj = {}; | ||
schemas.forEach( function ( value ) { | ||
returnObj[ value ] = require( path.join( schemaBasePath, value ) ); | ||
} ); | ||
return returnObj; | ||
} | ||
module.exports = validations(); |
{ | ||
"name": "@sinet/validation", | ||
"version": "1.3.14", | ||
"version": "1.3.15", | ||
"description": "", | ||
@@ -22,9 +22,10 @@ "main": "index.js", | ||
"devDependencies": { | ||
"@sinet/coding-conventions": "^3.0.0", | ||
"eslint": "^3.9.1", | ||
"nsp": "^1.0.3" | ||
"@sinet/coding-conventions" : "^3.0.0", | ||
"eslint" : "^3.9.1", | ||
"nsp" : "^1.0.3" | ||
}, | ||
"dependencies": { | ||
"joi": "^9.0.4" | ||
"joi" : "^9.0.4", | ||
"path" : "^0.12.7" | ||
} | ||
} |
'use strict'; | ||
var Joi = require( 'joi' ); | ||
module.exports = { | ||
'PersonnelId' : Joi.number().integer().required().description( 'The user\'s id' ), | ||
'ClientId' : Joi.number().integer().required().description( 'The id of the school' ), | ||
'DistrictId' : Joi.number().integer().required().description( 'The id of the district' ) | ||
}; | ||
module.exports = require( '../user/credentials' ); |
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
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
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
35527
41
685
2
2
+ Addedpath@^0.12.7
+ Addedinherits@2.0.3(transitive)
+ Addedpath@0.12.7(transitive)
+ Addedprocess@0.11.10(transitive)
+ Addedutil@0.10.4(transitive)