better-ajv-errors
Advanced tools
@@ -50,2 +50,2 @@ "use strict"; | ||
| exports.default = _default; | ||
| module.exports = exports["default"]; | ||
| module.exports = exports.default; |
@@ -40,2 +40,2 @@ "use strict"; | ||
| module.exports = exports["default"]; | ||
| module.exports = exports.default; |
@@ -57,2 +57,2 @@ "use strict"; | ||
| exports.default = AdditionalPropValidationError; | ||
| module.exports = exports["default"]; | ||
| module.exports = exports.default; |
@@ -74,2 +74,2 @@ "use strict"; | ||
| exports.default = BaseValidationError; | ||
| module.exports = exports["default"]; | ||
| module.exports = exports.default; |
@@ -49,2 +49,2 @@ "use strict"; | ||
| exports.default = DefaultValidationError; | ||
| module.exports = exports["default"]; | ||
| module.exports = exports.default; |
@@ -87,2 +87,2 @@ "use strict"; | ||
| exports.default = EnumValidationError; | ||
| module.exports = exports["default"]; | ||
| module.exports = exports.default; |
@@ -62,2 +62,2 @@ "use strict"; | ||
| exports.default = RequiredValidationError; | ||
| module.exports = exports["default"]; | ||
| module.exports = exports.default; |
@@ -13,2 +13,4 @@ "use strict"; | ||
| function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } | ||
| const JSON_POINTERS_REGEX = /\/[\w_-]+(\/\d+)?/g; // Make a tree of errors from ajv errors array | ||
@@ -92,3 +94,3 @@ | ||
| const error = errors[0]; | ||
| return [new _validationErrors.EnumValidationError(Object.assign({}, error, { | ||
| return [new _validationErrors.EnumValidationError(_extends({}, error, { | ||
| params: { | ||
@@ -95,0 +97,0 @@ allowedValues |
@@ -41,2 +41,2 @@ "use strict"; | ||
| exports.default = _default; | ||
| module.exports = exports["default"]; | ||
| module.exports = exports.default; |
@@ -37,2 +37,2 @@ "use strict"; | ||
| module.exports = exports["default"]; | ||
| module.exports = exports.default; |
@@ -12,2 +12,4 @@ "use strict"; | ||
| function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } | ||
| class AdditionalPropValidationError extends _base.default { | ||
@@ -34,3 +36,3 @@ constructor(...args) { | ||
| } = this.options; | ||
| return Object.assign({}, this.getLocation(`${dataPath}/${params.additionalProperty}`), { | ||
| return _extends({}, this.getLocation(`${dataPath}/${params.additionalProperty}`), { | ||
| error: `Property ${params.additionalProperty} is not expected to be here` | ||
@@ -43,2 +45,2 @@ }); | ||
| exports.default = AdditionalPropValidationError; | ||
| module.exports = exports["default"]; | ||
| module.exports = exports.default; |
@@ -58,2 +58,2 @@ "use strict"; | ||
| exports.default = BaseValidationError; | ||
| module.exports = exports["default"]; | ||
| module.exports = exports.default; |
@@ -12,2 +12,4 @@ "use strict"; | ||
| function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } | ||
| class DefaultValidationError extends _base.default { | ||
@@ -29,3 +31,3 @@ print() { | ||
| } = this.options; | ||
| return Object.assign({}, this.getLocation(), { | ||
| return _extends({}, this.getLocation(), { | ||
| error: `${dataPath}: ${keyword} ${message}` | ||
@@ -38,2 +40,2 @@ }); | ||
| exports.default = DefaultValidationError; | ||
| module.exports = exports["default"]; | ||
| module.exports = exports.default; |
@@ -6,4 +6,2 @@ "use strict"; | ||
| require("core-js/modules/es6.array.sort"); | ||
| var _chalk = _interopRequireDefault(require("chalk")); | ||
@@ -19,2 +17,4 @@ | ||
| function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } | ||
| class EnumValidationError extends _base.default { | ||
@@ -40,3 +40,4 @@ print() { | ||
| const bestMatch = this.findBestMatch(); | ||
| const output = Object.assign({}, this.getLocation(), { | ||
| const output = _extends({}, this.getLocation(), { | ||
| error: `${dataPath} ${message}: ${params.allowedValues.join(', ')}` | ||
@@ -76,2 +77,2 @@ }); | ||
| exports.default = EnumValidationError; | ||
| module.exports = exports["default"]; | ||
| module.exports = exports.default; |
@@ -12,2 +12,4 @@ "use strict"; | ||
| function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } | ||
| class RequiredValidationError extends _base.default { | ||
@@ -38,3 +40,3 @@ getLocation(dataPath = this.options.dataPath) { | ||
| } = this.options; | ||
| return Object.assign({}, this.getLocation(), { | ||
| return _extends({}, this.getLocation(), { | ||
| error: `${dataPath} ${message}` | ||
@@ -47,2 +49,2 @@ }); | ||
| exports.default = RequiredValidationError; | ||
| module.exports = exports["default"]; | ||
| module.exports = exports.default; |
+8
-8
| { | ||
| "name": "better-ajv-errors", | ||
| "version": "0.5.5", | ||
| "version": "0.5.6", | ||
| "description": "JSON Schema validation for Human", | ||
@@ -35,3 +35,3 @@ "repository": "torifat/better-ajv-errors", | ||
| "@babel/cli": "^7.0.0", | ||
| "@babel/core": "7.0.0", | ||
| "@babel/core": "7.0.1", | ||
| "@babel/plugin-syntax-object-rest-spread": "^7.0.0", | ||
@@ -42,11 +42,11 @@ "@babel/plugin-transform-runtime": "^7.0.0", | ||
| "babel-core": "^7.0.0-bridge.0", | ||
| "babel-jest": "^23.4.2", | ||
| "babel-plugin-add-module-exports": "^0.2.1", | ||
| "codecov": "^3.0.4", | ||
| "eslint": "^5.4.0", | ||
| "babel-jest": "^23.6.0", | ||
| "babel-plugin-add-module-exports": "^1.0.0", | ||
| "codecov": "^3.1.0", | ||
| "eslint": "^5.5.0", | ||
| "eslint-config-prettier": "^3.0.1", | ||
| "eslint-plugin-jest": "^21.22.0", | ||
| "flow-bin": "^0.79.1", | ||
| "flow-bin": "^0.80.0", | ||
| "husky": "^0.14.3", | ||
| "jest": "^23.5.0", | ||
| "jest": "^23.6.0", | ||
| "jest-fixtures": "^0.6.0", | ||
@@ -53,0 +53,0 @@ "prettier": "^1.14.2", |
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
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
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
43782
3.51%977
0.93%