Comparing version 3.0.1 to 3.0.2
@@ -82,3 +82,4 @@ module.exports = | ||
var _require5 = __webpack_require__(28), | ||
validateConfig = _require5.validateConfig; | ||
validateConfig = _require5.validateConfig, | ||
validateConnectConfig = _require5.validateConnectConfig; | ||
@@ -96,3 +97,3 @@ configs.Promise = __webpack_require__(30); | ||
validateConfig(config); | ||
validateConnectConfig(config); | ||
@@ -1001,2 +1002,9 @@ var environment = config.environment, | ||
var configSchema = Joi.object().keys({ | ||
secret: Joi.string().required(), | ||
environment: Joi.string().required().valid(['live', 'sandbox']), | ||
clientApplicationKey: Joi.string().required(), | ||
userIdentifier: Joi.string().required() | ||
}).required(); | ||
var connectConfigSchema = Joi.object().keys({ | ||
environment: Joi.string().required().valid(['live', 'sandbox', 'test']), | ||
@@ -1016,4 +1024,13 @@ privateKey: Joi.object().required(), | ||
var validateConnectConfig = function validateConnectConfig(config) { | ||
var result = Joi.validate(config, connectConfigSchema); | ||
if (!isNil(result.error)) { | ||
throw new Error(pluck('message', result.error.details)); | ||
} | ||
}; | ||
module.exports = { | ||
validateConfig: validateConfig | ||
validateConfig: validateConfig, | ||
validateConnectConfig: validateConnectConfig | ||
}; | ||
@@ -1020,0 +1037,0 @@ |
{ | ||
"name": "cadu", | ||
"version": "3.0.1", | ||
"version": "3.0.2", | ||
"description": "A JavaScript library to interface with CADU", | ||
@@ -29,3 +29,3 @@ "main": "src/client.js", | ||
"jsonwebtoken": "^8.5.1", | ||
"mappersmith": "^2.34.0", | ||
"mappersmith": "2.42.0", | ||
"moment": "2.19.3", | ||
@@ -32,0 +32,0 @@ "ramda": "0.25.0", |
Sorry, the diff of this file is not supported yet
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
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
142440
2777
1
+ Addedmappersmith@2.42.0(transitive)
- Removedmappersmith@2.44.0(transitive)
Updatedmappersmith@2.42.0