🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

@rjsf/validator-ajv8

Package Overview
Dependencies
Maintainers
2
Versions
107
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@rjsf/validator-ajv8 - npm Package Compare versions

Comparing version

to
5.7.1

dist/compileSchemaValidators.cjs.development.js

15

dist/index.d.ts

@@ -51,15 +51,2 @@ import * as _rjsf_utils from '@rjsf/utils';

/** The function used to compile a schema into an output file in the form that allows it to be used as a precompiled
* validator. The main reasons for using a precompiled validator is reducing code size, improving validation speed and,
* most importantly, avoiding dynamic code compilation when prohibited by a browser's Content Security Policy. For more
* information about AJV code compilation see: https://ajv.js.org/standalone.html
*
* @param schema - The schema to be compiled into a set of precompiled validators functions
* @param output - The name of the file into which the precompiled validator functions will be generated
* @param [options={}] - The set of `CustomValidatorOptionsType` information used to alter the AJV validator used for
* compiling the schema. They are the same options that are passed to the `customizeValidator()` function in
* order to modify the behavior of the regular AJV-based validator.
*/
declare function compileSchemaValidators<S extends StrictRJSFSchema = RJSFSchema>(schema: S, output: string, options?: CustomValidatorOptionsType): void;
/** Creates and returns a `ValidatorType` interface that is implemented with a precompiled validator. If a `localizer`

@@ -80,2 +67,2 @@ * is provided, it is used to translate the messages generated by the underlying AJV validation.

export { CompiledValidateFunction, CustomValidatorOptionsType, Localizer, ValidatorFunctions, compileSchemaValidators, createPrecompiledValidator, customizeValidator, _default as default };
export { CompiledValidateFunction, CustomValidatorOptionsType, Localizer, ValidatorFunctions, createPrecompiledValidator, customizeValidator, _default as default };

@@ -5,5 +5,5 @@

if (process.env.NODE_ENV === 'production') {
module.exports = require('./validator-ajv8.cjs.production.min.js')
module.exports = require('./index.cjs.production.min.js')
} else {
module.exports = require('./validator-ajv8.cjs.development.js')
module.exports = require('./index.cjs.development.js')
}

@@ -1,2 +0,2 @@

import { ADDITIONAL_PROPERTY_FLAG, RJSF_ADDITONAL_PROPERTIES_FLAG, toErrorSchema, getDefaultFormState, createErrorHandler, unwrapErrorHandler, validationDataMerge, getUiOptions, PROPERTIES_KEY, toErrorList, ID_KEY, withIdRefPrefix, ROOT_SCHEMA_PREFIX, schemaParser, hashForSchema } from '@rjsf/utils';
import { ADDITIONAL_PROPERTY_FLAG, RJSF_ADDITONAL_PROPERTIES_FLAG, toErrorSchema, getDefaultFormState, createErrorHandler, unwrapErrorHandler, validationDataMerge, getUiOptions, PROPERTIES_KEY, toErrorList, ID_KEY, withIdRefPrefix, ROOT_SCHEMA_PREFIX, hashForSchema } from '@rjsf/utils';
import Ajv from 'ajv';

@@ -6,4 +6,2 @@ import addFormats from 'ajv-formats';

import get from 'lodash-es/get';
import fs from 'fs';
import standaloneCode from 'ajv/dist/standalone';
import isEqual from 'lodash-es/isEqual';

@@ -344,42 +342,2 @@

/** The function used to compile a schema into an output file in the form that allows it to be used as a precompiled
* validator. The main reasons for using a precompiled validator is reducing code size, improving validation speed and,
* most importantly, avoiding dynamic code compilation when prohibited by a browser's Content Security Policy. For more
* information about AJV code compilation see: https://ajv.js.org/standalone.html
*
* @param schema - The schema to be compiled into a set of precompiled validators functions
* @param output - The name of the file into which the precompiled validator functions will be generated
* @param [options={}] - The set of `CustomValidatorOptionsType` information used to alter the AJV validator used for
* compiling the schema. They are the same options that are passed to the `customizeValidator()` function in
* order to modify the behavior of the regular AJV-based validator.
*/
function compileSchemaValidators(schema, output, options) {
if (options === void 0) {
options = {};
}
console.log('parsing the schema');
var schemaMaps = schemaParser(schema);
var schemas = Object.values(schemaMaps);
var _options = options,
additionalMetaSchemas = _options.additionalMetaSchemas,
customFormats = _options.customFormats,
_options$ajvOptionsOv = _options.ajvOptionsOverrides,
ajvOptionsOverrides = _options$ajvOptionsOv === void 0 ? {} : _options$ajvOptionsOv,
ajvFormatOptions = _options.ajvFormatOptions,
AjvClass = _options.AjvClass;
// Allow users to turn off the `lines: true` feature in their own overrides, but NOT the `source: true`
var compileOptions = _extends({}, ajvOptionsOverrides, {
code: _extends({
lines: true
}, ajvOptionsOverrides.code, {
source: true
}),
schemas: schemas
});
var ajv = createAjvInstance(additionalMetaSchemas, customFormats, compileOptions, ajvFormatOptions, AjvClass);
var moduleCode = standaloneCode(ajv);
console.log("writing " + output);
fs.writeFileSync(output, moduleCode);
}
/** `ValidatorType` implementation that uses an AJV 8 precompiled validator as created by the

@@ -524,3 +482,3 @@ * `compileSchemaValidators()` function provided by the `@rjsf/validator-ajv8` library.

export { compileSchemaValidators, createPrecompiledValidator, customizeValidator, index as default };
export { createPrecompiledValidator, customizeValidator, index as default };
//# sourceMappingURL=validator-ajv8.esm.js.map
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@rjsf/utils'), require('ajv'), require('ajv-formats'), require('lodash-es/isObject'), require('lodash-es/get'), require('fs'), require('ajv/dist/standalone'), require('lodash-es/isEqual')) :
typeof define === 'function' && define.amd ? define(['exports', '@rjsf/utils', 'ajv', 'ajv-formats', 'lodash-es/isObject', 'lodash-es/get', 'fs', 'ajv/dist/standalone', 'lodash-es/isEqual'], factory) :
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global["@rjsf/validator-ajv8"] = {}, global.utils, global.Ajv, global.addFormats, global.isObject, global.get, global.fs, global.standaloneCode, global.isEqual));
})(this, (function (exports, utils, Ajv, addFormats, isObject, get, fs, standaloneCode, isEqual) { 'use strict';
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@rjsf/utils'), require('ajv'), require('ajv-formats'), require('lodash-es/isObject'), require('lodash-es/get'), require('lodash-es/isEqual')) :
typeof define === 'function' && define.amd ? define(['exports', '@rjsf/utils', 'ajv', 'ajv-formats', 'lodash-es/isObject', 'lodash-es/get', 'lodash-es/isEqual'], factory) :
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global["@rjsf/validator-ajv8"] = {}, global.utils, global.Ajv, global.addFormats, global.isObject, global.get, global.isEqual));
})(this, (function (exports, utils, Ajv, addFormats, isObject, get, isEqual) { 'use strict';

@@ -13,4 +13,2 @@ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }

var get__default = /*#__PURE__*/_interopDefaultLegacy(get);
var fs__default = /*#__PURE__*/_interopDefaultLegacy(fs);
var standaloneCode__default = /*#__PURE__*/_interopDefaultLegacy(standaloneCode);
var isEqual__default = /*#__PURE__*/_interopDefaultLegacy(isEqual);

@@ -351,42 +349,2 @@

/** The function used to compile a schema into an output file in the form that allows it to be used as a precompiled
* validator. The main reasons for using a precompiled validator is reducing code size, improving validation speed and,
* most importantly, avoiding dynamic code compilation when prohibited by a browser's Content Security Policy. For more
* information about AJV code compilation see: https://ajv.js.org/standalone.html
*
* @param schema - The schema to be compiled into a set of precompiled validators functions
* @param output - The name of the file into which the precompiled validator functions will be generated
* @param [options={}] - The set of `CustomValidatorOptionsType` information used to alter the AJV validator used for
* compiling the schema. They are the same options that are passed to the `customizeValidator()` function in
* order to modify the behavior of the regular AJV-based validator.
*/
function compileSchemaValidators(schema, output, options) {
if (options === void 0) {
options = {};
}
console.log('parsing the schema');
var schemaMaps = utils.schemaParser(schema);
var schemas = Object.values(schemaMaps);
var _options = options,
additionalMetaSchemas = _options.additionalMetaSchemas,
customFormats = _options.customFormats,
_options$ajvOptionsOv = _options.ajvOptionsOverrides,
ajvOptionsOverrides = _options$ajvOptionsOv === void 0 ? {} : _options$ajvOptionsOv,
ajvFormatOptions = _options.ajvFormatOptions,
AjvClass = _options.AjvClass;
// Allow users to turn off the `lines: true` feature in their own overrides, but NOT the `source: true`
var compileOptions = _extends({}, ajvOptionsOverrides, {
code: _extends({
lines: true
}, ajvOptionsOverrides.code, {
source: true
}),
schemas: schemas
});
var ajv = createAjvInstance(additionalMetaSchemas, customFormats, compileOptions, ajvFormatOptions, AjvClass);
var moduleCode = standaloneCode__default["default"](ajv);
console.log("writing " + output);
fs__default["default"].writeFileSync(output, moduleCode);
}
/** `ValidatorType` implementation that uses an AJV 8 precompiled validator as created by the

@@ -531,3 +489,2 @@ * `compileSchemaValidators()` function provided by the `@rjsf/validator-ajv8` library.

exports.compileSchemaValidators = compileSchemaValidators;
exports.createPrecompiledValidator = createPrecompiledValidator;

@@ -534,0 +491,0 @@ exports.customizeValidator = customizeValidator;

@@ -1,2 +0,2 @@

!function(r,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("@rjsf/utils"),require("ajv"),require("ajv-formats"),require("lodash-es/isObject"),require("lodash-es/get"),require("fs"),require("ajv/dist/standalone"),require("lodash-es/isEqual")):"function"==typeof define&&define.amd?define(["exports","@rjsf/utils","ajv","ajv-formats","lodash-es/isObject","lodash-es/get","fs","ajv/dist/standalone","lodash-es/isEqual"],e):e((r="undefined"!=typeof globalThis?globalThis:r||self)["@rjsf/validator-ajv8"]={},r.utils,r.Ajv,r.addFormats,r.isObject,r.get,r.fs,r.standaloneCode,r.isEqual)}(this,(function(r,e,a,t,i,o,s,n,l){"use strict";function d(r){return r&&"object"==typeof r&&"default"in r?r:{default:r}}var c=d(a),u=d(t),h=d(i),f=d(o),v=d(s),m=d(n),p=d(l);function g(){return g=Object.assign?Object.assign.bind():function(r){for(var e=1;e<arguments.length;e++){var a=arguments[e];for(var t in a)Object.prototype.hasOwnProperty.call(a,t)&&(r[t]=a[t])}return r},g.apply(this,arguments)}var j={allErrors:!0,multipleOfPrecision:8,strict:!1,verbose:!0},y=/^(#?([0-9A-Fa-f]{3}){1,2}\b|aqua|black|blue|fuchsia|gray|green|lime|maroon|navy|olive|orange|purple|red|silver|teal|white|yellow|(rgb\(\s*\b([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\b\s*,\s*\b([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\b\s*,\s*\b([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\b\s*\))|(rgb\(\s*(\d?\d%|100%)+\s*,\s*(\d?\d%|100%)+\s*,\s*(\d?\d%|100%)+\s*\)))$/,E=/^data:([a-z]+\/[a-z0-9-+.]+)?;(?:name=(.*);)?base64,(.*)$/;function b(r,a,t,i,o){void 0===t&&(t={}),void 0===o&&(o=c.default);var s=new o(g({},j,t));return i?u.default(s,i):!1!==i&&u.default(s),s.addFormat("data-url",E),s.addFormat("color",y),s.addKeyword(e.ADDITIONAL_PROPERTY_FLAG),s.addKeyword(e.RJSF_ADDITONAL_PROPERTIES_FLAG),Array.isArray(r)&&s.addMetaSchema(r),h.default(a)&&Object.keys(a).forEach((function(r){s.addFormat(r,a[r])})),s}var w=["instancePath","keyword","params","schemaPath","parentSchema"];function O(r,a,t,i,o,s,n){var l=a.validationError,d=function(r,a){return void 0===r&&(r=[]),r.map((function(r){var t=r.instancePath,i=r.keyword,o=r.params,s=r.schemaPath,n=r.parentSchema,l=function(r,e){if(null==r)return{};var a,t,i={},o=Object.keys(r);for(t=0;t<o.length;t++)e.indexOf(a=o[t])>=0||(i[a]=r[a]);return i}(r,w).message,d=void 0===l?"":l,c=t.replace(/\//g,"."),u=(c+" "+d).trim();if("missingProperty"in o){var h=o.missingProperty,v=e.getUiOptions(f.default(a,""+(c=c?c+"."+o.missingProperty:o.missingProperty).replace(/^\./,""))).title;if(v)d=d.replace(h,v);else{var m=f.default(n,[e.PROPERTIES_KEY,h,"title"]);m&&(d=d.replace(h,m))}u=d}else{var p=e.getUiOptions(f.default(a,""+c.replace(/^\./,""))).title;if(p)u=("'"+p+"' "+d).trim();else{var g=null==n?void 0:n.title;g&&(u=("'"+g+"' "+d).trim())}}return{name:i,property:c,message:d,params:o,stack:u,schemaPath:s}}))}(a.errors,n);l&&(d=[].concat(d,[{stack:l.message}])),"function"==typeof s&&(d=s(d,n));var c=e.toErrorSchema(d);if(l&&(c=g({},c,{$schema:{__errors:[l.message]}})),"function"!=typeof o)return{errors:d,errorSchema:c};var u=e.getDefaultFormState(r,i,t,i,!0),h=o(u,e.createErrorHandler(u),n),v=e.unwrapErrorHandler(h);return e.validationDataMerge({errors:d,errorSchema:c},v)}var S=function(){function r(r,e){this.ajv=void 0,this.localizer=void 0,this.ajv=b(r.additionalMetaSchemas,r.customFormats,r.ajvOptionsOverrides,r.ajvFormatOptions,r.AjvClass),this.localizer=e}var a=r.prototype;return a.toErrorList=function(r,a){return void 0===a&&(a=[]),e.toErrorList(r,a)},a.rawValidation=function(r,a){var t,i,o=void 0;r[e.ID_KEY]&&(t=this.ajv.getSchema(r[e.ID_KEY]));try{void 0===t&&(t=this.ajv.compile(r)),t(a)}catch(r){o=r}return t&&("function"==typeof this.localizer&&this.localizer(t.errors),i=t.errors||void 0,t.errors=null),{errors:i,validationError:o}},a.validateFormData=function(r,e,a,t,i){return O(this,this.rawValidation(e,r),r,e,a,t,i)},a.isValid=function(r,a,t){var i,o=null!=(i=t[e.ID_KEY])?i:e.ROOT_SCHEMA_PREFIX;try{void 0===this.ajv.getSchema(o)&&this.ajv.addSchema(t,o);var s,n=e.withIdRefPrefix(r);return n[e.ID_KEY]&&(s=this.ajv.getSchema(n[e.ID_KEY])),void 0===s&&(s=this.ajv.compile(n)),s(a)}catch(r){return console.warn("Error encountered compiling schema:",r),!1}finally{this.ajv.removeSchema(o)}},r}();function P(r,e){return void 0===r&&(r={}),new S(r,e)}var F=function(){function r(r,e,a){this.rootSchema=void 0,this.validateFns=void 0,this.mainValidator=void 0,this.localizer=void 0,this.rootSchema=e,this.validateFns=r,this.localizer=a,this.mainValidator=this.getValidator(e)}var a=r.prototype;return a.getValidator=function(r){var a=f.default(r,e.ID_KEY)||e.hashForSchema(r),t=this.validateFns[a];if(!t)throw new Error('No precompiled validator function was found for the given schema for "'+a+'"');return t},a.toErrorList=function(r,a){return void 0===a&&(a=[]),e.toErrorList(r,a)},a.rawValidation=function(r,e){if(!p.default(r,this.rootSchema))throw new Error("The schema associated with the precompiled schema differs from the schema provided for validation");this.mainValidator(e),"function"==typeof this.localizer&&this.localizer(this.mainValidator.errors);var a=this.mainValidator.errors||void 0;return this.mainValidator.errors=null,{errors:a}},a.validateFormData=function(r,e,a,t,i){return O(this,this.rawValidation(e,r),r,e,a,t,i)},a.isValid=function(r,e,a){if(!p.default(a,this.rootSchema))throw new Error("The schema associated with the precompiled validator differs from the rootSchema provided for validation");return this.getValidator(r)(e)},r}(),V=P();r.compileSchemaValidators=function(r,a,t){void 0===t&&(t={}),console.log("parsing the schema");var i=e.schemaParser(r),o=Object.values(i),s=t.ajvOptionsOverrides,n=void 0===s?{}:s,l=t.ajvFormatOptions,d=t.AjvClass,c=b(t.additionalMetaSchemas,t.customFormats,g({},n,{code:g({lines:!0},n.code,{source:!0}),schemas:o}),l,d),u=m.default(c);console.log("writing "+a),v.default.writeFileSync(a,u)},r.createPrecompiledValidator=function(r,e,a){return new F(r,e,a)},r.customizeValidator=P,r.default=V,Object.defineProperty(r,"__esModule",{value:!0})}));
!function(r,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("@rjsf/utils"),require("ajv"),require("ajv-formats"),require("lodash-es/isObject"),require("lodash-es/get"),require("lodash-es/isEqual")):"function"==typeof define&&define.amd?define(["exports","@rjsf/utils","ajv","ajv-formats","lodash-es/isObject","lodash-es/get","lodash-es/isEqual"],e):e((r="undefined"!=typeof globalThis?globalThis:r||self)["@rjsf/validator-ajv8"]={},r.utils,r.Ajv,r.addFormats,r.isObject,r.get,r.isEqual)}(this,(function(r,e,t,a,i,o,s){"use strict";function n(r){return r&&"object"==typeof r&&"default"in r?r:{default:r}}var l=n(t),d=n(a),c=n(i),u=n(o),h=n(s);function f(){return f=Object.assign?Object.assign.bind():function(r){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var a in t)Object.prototype.hasOwnProperty.call(t,a)&&(r[a]=t[a])}return r},f.apply(this,arguments)}var v={allErrors:!0,multipleOfPrecision:8,strict:!1,verbose:!0},m=/^(#?([0-9A-Fa-f]{3}){1,2}\b|aqua|black|blue|fuchsia|gray|green|lime|maroon|navy|olive|orange|purple|red|silver|teal|white|yellow|(rgb\(\s*\b([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\b\s*,\s*\b([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\b\s*,\s*\b([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\b\s*\))|(rgb\(\s*(\d?\d%|100%)+\s*,\s*(\d?\d%|100%)+\s*,\s*(\d?\d%|100%)+\s*\)))$/,p=/^data:([a-z]+\/[a-z0-9-+.]+)?;(?:name=(.*);)?base64,(.*)$/,g=["instancePath","keyword","params","schemaPath","parentSchema"];function y(r,t,a,i,o,s,n){var l=t.validationError,d=function(r,t){return void 0===r&&(r=[]),r.map((function(r){var a=r.instancePath,i=r.keyword,o=r.params,s=r.schemaPath,n=r.parentSchema,l=function(r,e){if(null==r)return{};var t,a,i={},o=Object.keys(r);for(a=0;a<o.length;a++)e.indexOf(t=o[a])>=0||(i[t]=r[t]);return i}(r,g).message,d=void 0===l?"":l,c=a.replace(/\//g,"."),h=(c+" "+d).trim();if("missingProperty"in o){var f=o.missingProperty,v=e.getUiOptions(u.default(t,""+(c=c?c+"."+o.missingProperty:o.missingProperty).replace(/^\./,""))).title;if(v)d=d.replace(f,v);else{var m=u.default(n,[e.PROPERTIES_KEY,f,"title"]);m&&(d=d.replace(f,m))}h=d}else{var p=e.getUiOptions(u.default(t,""+c.replace(/^\./,""))).title;if(p)h=("'"+p+"' "+d).trim();else{var y=null==n?void 0:n.title;y&&(h=("'"+y+"' "+d).trim())}}return{name:i,property:c,message:d,params:o,stack:h,schemaPath:s}}))}(t.errors,n);l&&(d=[].concat(d,[{stack:l.message}])),"function"==typeof s&&(d=s(d,n));var c=e.toErrorSchema(d);if(l&&(c=f({},c,{$schema:{__errors:[l.message]}})),"function"!=typeof o)return{errors:d,errorSchema:c};var h=e.getDefaultFormState(r,i,a,i,!0),v=o(h,e.createErrorHandler(h),n),m=e.unwrapErrorHandler(v);return e.validationDataMerge({errors:d,errorSchema:c},m)}var j=function(){function r(r,t){this.ajv=void 0,this.localizer=void 0,this.ajv=function(r,t,a,i,o){void 0===a&&(a={}),void 0===o&&(o=l.default);var s=new o(f({},v,a));return i?d.default(s,i):!1!==i&&d.default(s),s.addFormat("data-url",p),s.addFormat("color",m),s.addKeyword(e.ADDITIONAL_PROPERTY_FLAG),s.addKeyword(e.RJSF_ADDITONAL_PROPERTIES_FLAG),Array.isArray(r)&&s.addMetaSchema(r),c.default(t)&&Object.keys(t).forEach((function(r){s.addFormat(r,t[r])})),s}(r.additionalMetaSchemas,r.customFormats,r.ajvOptionsOverrides,r.ajvFormatOptions,r.AjvClass),this.localizer=t}var t=r.prototype;return t.toErrorList=function(r,t){return void 0===t&&(t=[]),e.toErrorList(r,t)},t.rawValidation=function(r,t){var a,i,o=void 0;r[e.ID_KEY]&&(a=this.ajv.getSchema(r[e.ID_KEY]));try{void 0===a&&(a=this.ajv.compile(r)),a(t)}catch(r){o=r}return a&&("function"==typeof this.localizer&&this.localizer(a.errors),i=a.errors||void 0,a.errors=null),{errors:i,validationError:o}},t.validateFormData=function(r,e,t,a,i){return y(this,this.rawValidation(e,r),r,e,t,a,i)},t.isValid=function(r,t,a){var i,o=null!=(i=a[e.ID_KEY])?i:e.ROOT_SCHEMA_PREFIX;try{void 0===this.ajv.getSchema(o)&&this.ajv.addSchema(a,o);var s,n=e.withIdRefPrefix(r);return n[e.ID_KEY]&&(s=this.ajv.getSchema(n[e.ID_KEY])),void 0===s&&(s=this.ajv.compile(n)),s(t)}catch(r){return console.warn("Error encountered compiling schema:",r),!1}finally{this.ajv.removeSchema(o)}},r}();function E(r,e){return void 0===r&&(r={}),new j(r,e)}var b=function(){function r(r,e,t){this.rootSchema=void 0,this.validateFns=void 0,this.mainValidator=void 0,this.localizer=void 0,this.rootSchema=e,this.validateFns=r,this.localizer=t,this.mainValidator=this.getValidator(e)}var t=r.prototype;return t.getValidator=function(r){var t=u.default(r,e.ID_KEY)||e.hashForSchema(r),a=this.validateFns[t];if(!a)throw new Error('No precompiled validator function was found for the given schema for "'+t+'"');return a},t.toErrorList=function(r,t){return void 0===t&&(t=[]),e.toErrorList(r,t)},t.rawValidation=function(r,e){if(!h.default(r,this.rootSchema))throw new Error("The schema associated with the precompiled schema differs from the schema provided for validation");this.mainValidator(e),"function"==typeof this.localizer&&this.localizer(this.mainValidator.errors);var t=this.mainValidator.errors||void 0;return this.mainValidator.errors=null,{errors:t}},t.validateFormData=function(r,e,t,a,i){return y(this,this.rawValidation(e,r),r,e,t,a,i)},t.isValid=function(r,e,t){if(!h.default(t,this.rootSchema))throw new Error("The schema associated with the precompiled validator differs from the rootSchema provided for validation");return this.getValidator(r)(e)},r}(),w=E();r.createPrecompiledValidator=function(r,e,t){return new b(r,e,t)},r.customizeValidator=E,r.default=w,Object.defineProperty(r,"__esModule",{value:!0})}));
//# sourceMappingURL=validator-ajv8.umd.production.min.js.map
{
"name": "@rjsf/validator-ajv8",
"version": "5.7.0",
"version": "5.7.1",
"main": "dist/index.js",

@@ -16,3 +16,4 @@ "module": "dist/validator-ajv8.esm.js",

"scripts": {
"build": "rimraf dist && dts build --rollupTypes --format cjs,esm,umd",
"build": "rimraf dist && dts build --rollupTypes --format esm,umd && npm run build:compiler",
"build:compiler": "dts build --noClean --rollupTypes --format cjs --entry ./src/index.ts --entry ./src/compileSchemaValidators.ts",
"cs-check": "prettier -l \"{src,test}/**/*.ts?(x)\"",

@@ -39,3 +40,3 @@ "cs-format": "prettier \"{src,test}/**/*.ts?(x)\" --write",

"peerDependencies": {
"@rjsf/utils": "5.6.x"
"@rjsf/utils": "5.7.x"
},

@@ -49,3 +50,3 @@ "devDependencies": {

"@babel/preset-react": "^7.18.6",
"@rjsf/utils": "^5.7.0",
"@rjsf/utils": "^5.7.1",
"@types/jest-expect-message": "^1.1.0",

@@ -80,3 +81,3 @@ "@types/json-schema": "^7.0.11",

"license": "Apache-2.0",
"gitHead": "109ff6d01ef2e35c1a4b81738d0df27c5044d472"
"gitHead": "24f0089c70d63df7411cf558a684de1e286b713c"
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet