diff options
-rw-r--r-- | docs/Gemfile.lock | 8 | ||||
-rw-r--r-- | package.json | 4 | ||||
-rw-r--r-- | src/shared/settings/Settings.ts | 2 | ||||
-rw-r--r-- | src/shared/settings/validate.js | 613 | ||||
-rw-r--r-- | yarn.lock | 36 |
5 files changed, 16 insertions, 647 deletions
diff --git a/docs/Gemfile.lock b/docs/Gemfile.lock index 473b531..535acba 100644 --- a/docs/Gemfile.lock +++ b/docs/Gemfile.lock @@ -201,15 +201,15 @@ GEM rb-fsevent (~> 0.10, >= 0.10.3) rb-inotify (~> 0.9, >= 0.9.10) mercenary (0.3.6) - mini_portile2 (2.5.1) + mini_portile2 (2.7.1) minima (2.5.1) jekyll (>= 3.5, < 5.0) jekyll-feed (~> 0.9) jekyll-seo-tag (~> 2.1) minitest (5.14.1) multipart-post (2.1.1) - nokogiri (1.11.5) - mini_portile2 (~> 2.5.0) + nokogiri (1.13.1) + mini_portile2 (~> 2.7.0) racc (~> 1.4) octokit (4.18.0) faraday (>= 0.9) @@ -217,7 +217,7 @@ GEM pathutil (0.16.2) forwardable-extended (~> 2.6) public_suffix (3.1.1) - racc (1.5.2) + racc (1.6.0) rb-fsevent (0.10.4) rb-inotify (0.10.1) ffi (~> 1.0) diff --git a/package.json b/package.json index 1103fcf..c399a27 100644 --- a/package.json +++ b/package.json @@ -37,7 +37,7 @@ "@types/styled-components": "^5.1.11", "@typescript-eslint/eslint-plugin": "3.9.0", "@typescript-eslint/parser": "3.10.1", - "ajv": "^7.0.2", + "ajv": "^8.9.0", "ajv-cli": "^5.0.0", "css-loader": "^5.2.6", "eslint": "7.30.0", @@ -52,7 +52,7 @@ "jszip": "^3.2.2", "lanthan": "0.0.2", "prettier": "2.3.2", - "prettier-eslint": "12.0.0", + "prettier-eslint": "13.0.0", "react": "17.0.2", "react-dom": "17.0.2", "react-redux": "^7.1.3", diff --git a/src/shared/settings/Settings.ts b/src/shared/settings/Settings.ts index 6c4fa0a..2294c67 100644 --- a/src/shared/settings/Settings.ts +++ b/src/shared/settings/Settings.ts @@ -44,7 +44,7 @@ export default class Settings { if (!valid) { const message = (validate as any) .errors!.map((err: Ajv.ErrorObject) => { - return `'${err.dataPath}' ${err.message}`; + return `'${err.instancePath}' ${err.message}`; }) .join("; "); throw new TypeError(message); diff --git a/src/shared/settings/validate.js b/src/shared/settings/validate.js index 30f7888..b784854 100644 --- a/src/shared/settings/validate.js +++ b/src/shared/settings/validate.js @@ -1,612 +1 @@ -'use strict'; -var equal = require('ajv/lib/compile/equal'); -var validate = (function() { - var pattern0 = new RegExp('.*'); - var refVal = []; - return function validate(data, dataPath, parentData, parentDataProperty, rootData) { - 'use strict'; - var vErrors = null; - var errors = 0; - if ((data && typeof data === "object" && !Array.isArray(data))) { - var errs__0 = errors; - var valid1 = true; - for (var key0 in data) { - var isAdditional0 = !(false || key0 == 'keymaps' || key0 == 'search' || key0 == 'properties' || key0 == 'blacklist'); - if (isAdditional0) { - valid1 = false; - validate.errors = [{ - keyword: 'additionalProperties', - dataPath: (dataPath || '') + "", - schemaPath: '#/additionalProperties', - params: { - additionalProperty: '' + key0 + '' - }, - message: 'should NOT have additional properties' - }]; - return false; - break; - } - } - if (valid1) { - var data1 = data.keymaps; - if (data1 === undefined) { - valid1 = true; - } else { - var errs_1 = errors; - if ((data1 && typeof data1 === "object" && !Array.isArray(data1))) { - var errs__1 = errors; - var valid2 = true; - for (var key1 in data1) { - if (pattern0.test(key1)) { - var data2 = data1[key1]; - var errs_2 = errors; - if ((data2 && typeof data2 === "object" && !Array.isArray(data2))) { - if (true) { - var errs__2 = errors; - var valid3 = true; - if (data2.type === undefined) { - valid3 = false; - validate.errors = [{ - keyword: 'required', - dataPath: (dataPath || '') + '.keymaps[\'' + key1 + '\']', - schemaPath: '#/properties/keymaps/patternProperties/.*/required', - params: { - missingProperty: 'type' - }, - message: 'should have required property \'type\'' - }]; - return false; - } else { - var errs_3 = errors; - if (typeof data2.type !== "string") { - validate.errors = [{ - keyword: 'type', - dataPath: (dataPath || '') + '.keymaps[\'' + key1 + '\'].type', - schemaPath: '#/properties/keymaps/patternProperties/.*/properties/type/type', - params: { - type: 'string' - }, - message: 'should be string' - }]; - return false; - } - var valid3 = errors === errs_3; - } - } - } else { - validate.errors = [{ - keyword: 'type', - dataPath: (dataPath || '') + '.keymaps[\'' + key1 + '\']', - schemaPath: '#/properties/keymaps/patternProperties/.*/type', - params: { - type: 'object' - }, - message: 'should be object' - }]; - return false; - } - var valid2 = errors === errs_2; - if (!valid2) break; - } else valid2 = true; - } - } else { - validate.errors = [{ - keyword: 'type', - dataPath: (dataPath || '') + '.keymaps', - schemaPath: '#/properties/keymaps/type', - params: { - type: 'object' - }, - message: 'should be object' - }]; - return false; - } - var valid1 = errors === errs_1; - } - if (valid1) { - var data1 = data.search; - if (data1 === undefined) { - valid1 = true; - } else { - var errs_1 = errors; - if ((data1 && typeof data1 === "object" && !Array.isArray(data1))) { - if (true) { - var errs__1 = errors; - var valid2 = true; - if (data1.default === undefined) { - valid2 = false; - validate.errors = [{ - keyword: 'required', - dataPath: (dataPath || '') + '.search', - schemaPath: '#/properties/search/required', - params: { - missingProperty: 'default' - }, - message: 'should have required property \'default\'' - }]; - return false; - } else { - var errs_2 = errors; - if (typeof data1.default !== "string") { - validate.errors = [{ - keyword: 'type', - dataPath: (dataPath || '') + '.search.default', - schemaPath: '#/properties/search/properties/default/type', - params: { - type: 'string' - }, - message: 'should be string' - }]; - return false; - } - var valid2 = errors === errs_2; - } - if (valid2) { - var data2 = data1.engines; - if (data2 === undefined) { - valid2 = false; - validate.errors = [{ - keyword: 'required', - dataPath: (dataPath || '') + '.search', - schemaPath: '#/properties/search/required', - params: { - missingProperty: 'engines' - }, - message: 'should have required property \'engines\'' - }]; - return false; - } else { - var errs_2 = errors; - if ((data2 && typeof data2 === "object" && !Array.isArray(data2))) { - var errs__2 = errors; - var valid3 = true; - for (var key2 in data2) { - if (pattern0.test(key2)) { - var errs_3 = errors; - if (typeof data2[key2] !== "string") { - validate.errors = [{ - keyword: 'type', - dataPath: (dataPath || '') + '.search.engines[\'' + key2 + '\']', - schemaPath: '#/properties/search/properties/engines/patternProperties/.*/type', - params: { - type: 'string' - }, - message: 'should be string' - }]; - return false; - } - var valid3 = errors === errs_3; - if (!valid3) break; - } else valid3 = true; - } - } else { - validate.errors = [{ - keyword: 'type', - dataPath: (dataPath || '') + '.search.engines', - schemaPath: '#/properties/search/properties/engines/type', - params: { - type: 'object' - }, - message: 'should be object' - }]; - return false; - } - var valid2 = errors === errs_2; - } - } - } - } else { - validate.errors = [{ - keyword: 'type', - dataPath: (dataPath || '') + '.search', - schemaPath: '#/properties/search/type', - params: { - type: 'object' - }, - message: 'should be object' - }]; - return false; - } - var valid1 = errors === errs_1; - } - if (valid1) { - var data1 = data.properties; - if (data1 === undefined) { - valid1 = true; - } else { - var errs_1 = errors; - if ((data1 && typeof data1 === "object" && !Array.isArray(data1))) { - var errs__1 = errors; - var valid2 = true; - if (data1.hintchars === undefined) { - valid2 = true; - } else { - var errs_2 = errors; - if (typeof data1.hintchars !== "string") { - validate.errors = [{ - keyword: 'type', - dataPath: (dataPath || '') + '.properties.hintchars', - schemaPath: '#/properties/properties/properties/hintchars/type', - params: { - type: 'string' - }, - message: 'should be string' - }]; - return false; - } - var valid2 = errors === errs_2; - } - if (valid2) { - if (data1.smoothscroll === undefined) { - valid2 = true; - } else { - var errs_2 = errors; - if (typeof data1.smoothscroll !== "boolean") { - validate.errors = [{ - keyword: 'type', - dataPath: (dataPath || '') + '.properties.smoothscroll', - schemaPath: '#/properties/properties/properties/smoothscroll/type', - params: { - type: 'boolean' - }, - message: 'should be boolean' - }]; - return false; - } - var valid2 = errors === errs_2; - } - if (valid2) { - if (data1.complete === undefined) { - valid2 = true; - } else { - var errs_2 = errors; - if (typeof data1.complete !== "string") { - validate.errors = [{ - keyword: 'type', - dataPath: (dataPath || '') + '.properties.complete', - schemaPath: '#/properties/properties/properties/complete/type', - params: { - type: 'string' - }, - message: 'should be string' - }]; - return false; - } - var valid2 = errors === errs_2; - } - if (valid2) { - var data2 = data1.colorscheme; - if (data2 === undefined) { - valid2 = true; - } else { - var errs_2 = errors; - if (typeof data2 !== "string") { - validate.errors = [{ - keyword: 'type', - dataPath: (dataPath || '') + '.properties.colorscheme', - schemaPath: '#/properties/properties/properties/colorscheme/type', - params: { - type: 'string' - }, - message: 'should be string' - }]; - return false; - } - var schema2 = validate.schema.properties.properties.properties.colorscheme.enum; - var valid2; - valid2 = false; - for (var i2 = 0; i2 < schema2.length; i2++) - if (equal(data2, schema2[i2])) { - valid2 = true; - break; - } if (!valid2) { - validate.errors = [{ - keyword: 'enum', - dataPath: (dataPath || '') + '.properties.colorscheme', - schemaPath: '#/properties/properties/properties/colorscheme/enum', - params: { - allowedValues: schema2 - }, - message: 'should be equal to one of the allowed values' - }]; - return false; - } - var valid2 = errors === errs_2; - } - } - } - } - } else { - validate.errors = [{ - keyword: 'type', - dataPath: (dataPath || '') + '.properties', - schemaPath: '#/properties/properties/type', - params: { - type: 'object' - }, - message: 'should be object' - }]; - return false; - } - var valid1 = errors === errs_1; - } - if (valid1) { - var data1 = data.blacklist; - if (data1 === undefined) { - valid1 = true; - } else { - var errs_1 = errors; - if (Array.isArray(data1)) { - var errs__1 = errors; - var valid1; - for (var i1 = 0; i1 < data1.length; i1++) { - var data2 = data1[i1]; - var errs_2 = errors; - var errs__2 = errors; - var valid2 = false; - var errs_3 = errors; - if (typeof data2 !== "string") { - var err = { - keyword: 'type', - dataPath: (dataPath || '') + '.blacklist[' + i1 + ']', - schemaPath: '#/properties/blacklist/items/anyOf/0/type', - params: { - type: 'string' - }, - message: 'should be string' - }; - if (vErrors === null) vErrors = [err]; - else vErrors.push(err); - errors++; - } - var valid3 = errors === errs_3; - valid2 = valid2 || valid3; - if (!valid2) { - var errs_3 = errors; - if ((data2 && typeof data2 === "object" && !Array.isArray(data2))) { - if (true) { - var errs__3 = errors; - var valid4 = true; - if (data2.url === undefined) { - valid4 = false; - var err = { - keyword: 'required', - dataPath: (dataPath || '') + '.blacklist[' + i1 + ']', - schemaPath: '#/properties/blacklist/items/anyOf/1/required', - params: { - missingProperty: 'url' - }, - message: 'should have required property \'url\'' - }; - if (vErrors === null) vErrors = [err]; - else vErrors.push(err); - errors++; - } else { - var errs_4 = errors; - if (typeof data2.url !== "string") { - var err = { - keyword: 'type', - dataPath: (dataPath || '') + '.blacklist[' + i1 + '].url', - schemaPath: '#/properties/blacklist/items/anyOf/1/properties/url/type', - params: { - type: 'string' - }, - message: 'should be string' - }; - if (vErrors === null) vErrors = [err]; - else vErrors.push(err); - errors++; - } - var valid4 = errors === errs_4; - } - if (valid4) { - var data3 = data2.keys; - if (data3 === undefined) { - valid4 = false; - var err = { - keyword: 'required', - dataPath: (dataPath || '') + '.blacklist[' + i1 + ']', - schemaPath: '#/properties/blacklist/items/anyOf/1/required', - params: { - missingProperty: 'keys' - }, - message: 'should have required property \'keys\'' - }; - if (vErrors === null) vErrors = [err]; - else vErrors.push(err); - errors++; - } else { - var errs_4 = errors; - if (Array.isArray(data3)) { - var errs__4 = errors; - var valid4; - for (var i4 = 0; i4 < data3.length; i4++) { - var errs_5 = errors; - if (typeof data3[i4] !== "string") { - var err = { - keyword: 'type', - dataPath: (dataPath || '') + '.blacklist[' + i1 + '].keys[' + i4 + ']', - schemaPath: '#/properties/blacklist/items/anyOf/1/properties/keys/items/type', - params: { - type: 'string' - }, - message: 'should be string' - }; - if (vErrors === null) vErrors = [err]; - else vErrors.push(err); - errors++; - } - var valid5 = errors === errs_5; - if (!valid5) break; - } - } else { - var err = { - keyword: 'type', - dataPath: (dataPath || '') + '.blacklist[' + i1 + '].keys', - schemaPath: '#/properties/blacklist/items/anyOf/1/properties/keys/type', - params: { - type: 'array' - }, - message: 'should be array' - }; - if (vErrors === null) vErrors = [err]; - else vErrors.push(err); - errors++; - } - var valid4 = errors === errs_4; - } - } - } - } else { - var err = { - keyword: 'type', - dataPath: (dataPath || '') + '.blacklist[' + i1 + ']', - schemaPath: '#/properties/blacklist/items/anyOf/1/type', - params: { - type: 'object' - }, - message: 'should be object' - }; - if (vErrors === null) vErrors = [err]; - else vErrors.push(err); - errors++; - } - var valid3 = errors === errs_3; - valid2 = valid2 || valid3; - } - if (!valid2) { - var err = { - keyword: 'anyOf', - dataPath: (dataPath || '') + '.blacklist[' + i1 + ']', - schemaPath: '#/properties/blacklist/items/anyOf', - params: {}, - message: 'should match some schema in anyOf' - }; - if (vErrors === null) vErrors = [err]; - else vErrors.push(err); - errors++; - validate.errors = vErrors; - return false; - } else { - errors = errs__2; - if (vErrors !== null) { - if (errs__2) vErrors.length = errs__2; - else vErrors = null; - } - } - var valid2 = errors === errs_2; - if (!valid2) break; - } - } else { - validate.errors = [{ - keyword: 'type', - dataPath: (dataPath || '') + '.blacklist', - schemaPath: '#/properties/blacklist/type', - params: { - type: 'array' - }, - message: 'should be array' - }]; - return false; - } - var valid1 = errors === errs_1; - } - } - } - } - } - } else { - validate.errors = [{ - keyword: 'type', - dataPath: (dataPath || '') + "", - schemaPath: '#/type', - params: { - type: 'object' - }, - message: 'should be object' - }]; - return false; - } - validate.errors = vErrors; - return errors === 0; - }; -})(); -validate.schema = { - "type": "object", - "properties": { - "keymaps": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "properties": { - "type": { - "type": "string" - } - }, - "required": ["type"] - } - } - }, - "search": { - "type": "object", - "properties": { - "default": { - "type": "string" - }, - "engines": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - } - }, - "required": ["default", "engines"] - }, - "properties": { - "type": "object", - "properties": { - "hintchars": { - "type": "string" - }, - "smoothscroll": { - "type": "boolean" - }, - "complete": { - "type": "string" - }, - "colorscheme": { - "type": "string", - "enum": ["system", "light", "dark"] - } - } - }, - "blacklist": { - "type": "array", - "items": { - "anyOf": [{ - "type": "string" - }, { - "type": "object", - "properties": { - "url": { - "type": "string" - }, - "keys": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "required": ["url", "keys"] - }] - } - } - }, - "additionalProperties": false -}; -validate.errors = null; -module.exports = validate;
\ No newline at end of file +"use strict";module.exports = validate20;module.exports.default = validate20;const schema22 = {"type":"object","properties":{"keymaps":{"type":"object","patternProperties":{".*":{"type":"object","properties":{"type":{"type":"string"}},"required":["type"]}}},"search":{"type":"object","properties":{"default":{"type":"string"},"engines":{"type":"object","patternProperties":{".*":{"type":"string"}}}},"required":["default","engines"]},"properties":{"type":"object","properties":{"hintchars":{"type":"string"},"smoothscroll":{"type":"boolean"},"complete":{"type":"string"},"colorscheme":{"type":"string","enum":["system","light","dark"]}}},"blacklist":{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"object","properties":{"url":{"type":"string"},"keys":{"type":"array","items":{"type":"string"}}},"required":["url","keys"]}]}}},"additionalProperties":false};const pattern0 = new RegExp(".*", "u");const func0 = require("ajv/dist/runtime/equal").default;function validate20(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){let vErrors = null;let errors = 0;if(errors === 0){if(data && typeof data == "object" && !Array.isArray(data)){const _errs1 = errors;for(const key0 in data){if(!((((key0 === "keymaps") || (key0 === "search")) || (key0 === "properties")) || (key0 === "blacklist"))){validate20.errors = [{instancePath,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key0},message:"must NOT have additional properties"}];return false;break;}}if(_errs1 === errors){if(data.keymaps !== undefined){let data0 = data.keymaps;const _errs2 = errors;if(errors === _errs2){if(data0 && typeof data0 == "object" && !Array.isArray(data0)){var valid1 = true;for(const key1 in data0){if(pattern0.test(key1)){let data1 = data0[key1];const _errs4 = errors;if(errors === _errs4){if(data1 && typeof data1 == "object" && !Array.isArray(data1)){let missing0;if((data1.type === undefined) && (missing0 = "type")){validate20.errors = [{instancePath:instancePath+"/keymaps/" + key1.replace(/~/g, "~0").replace(/\//g, "~1"),schemaPath:"#/properties/keymaps/patternProperties/.*/required",keyword:"required",params:{missingProperty: missing0},message:"must have required property '"+missing0+"'"}];return false;}else {if(data1.type !== undefined){if(typeof data1.type !== "string"){validate20.errors = [{instancePath:instancePath+"/keymaps/" + key1.replace(/~/g, "~0").replace(/\//g, "~1")+"/type",schemaPath:"#/properties/keymaps/patternProperties/.*/properties/type/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}}}}else {validate20.errors = [{instancePath:instancePath+"/keymaps/" + key1.replace(/~/g, "~0").replace(/\//g, "~1"),schemaPath:"#/properties/keymaps/patternProperties/.*/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}}var valid1 = _errs4 === errors;if(!valid1){break;}}}}else {validate20.errors = [{instancePath:instancePath+"/keymaps",schemaPath:"#/properties/keymaps/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}}var valid0 = _errs2 === errors;}else {var valid0 = true;}if(valid0){if(data.search !== undefined){let data3 = data.search;const _errs8 = errors;if(errors === _errs8){if(data3 && typeof data3 == "object" && !Array.isArray(data3)){let missing1;if(((data3.default === undefined) && (missing1 = "default")) || ((data3.engines === undefined) && (missing1 = "engines"))){validate20.errors = [{instancePath:instancePath+"/search",schemaPath:"#/properties/search/required",keyword:"required",params:{missingProperty: missing1},message:"must have required property '"+missing1+"'"}];return false;}else {if(data3.default !== undefined){const _errs10 = errors;if(typeof data3.default !== "string"){validate20.errors = [{instancePath:instancePath+"/search/default",schemaPath:"#/properties/search/properties/default/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}var valid3 = _errs10 === errors;}else {var valid3 = true;}if(valid3){if(data3.engines !== undefined){let data5 = data3.engines;const _errs12 = errors;if(errors === _errs12){if(data5 && typeof data5 == "object" && !Array.isArray(data5)){var valid4 = true;for(const key2 in data5){if(pattern0.test(key2)){const _errs14 = errors;if(typeof data5[key2] !== "string"){validate20.errors = [{instancePath:instancePath+"/search/engines/" + key2.replace(/~/g, "~0").replace(/\//g, "~1"),schemaPath:"#/properties/search/properties/engines/patternProperties/.*/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}var valid4 = _errs14 === errors;if(!valid4){break;}}}}else {validate20.errors = [{instancePath:instancePath+"/search/engines",schemaPath:"#/properties/search/properties/engines/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}}var valid3 = _errs12 === errors;}else {var valid3 = true;}}}}else {validate20.errors = [{instancePath:instancePath+"/search",schemaPath:"#/properties/search/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}}var valid0 = _errs8 === errors;}else {var valid0 = true;}if(valid0){if(data.properties !== undefined){let data7 = data.properties;const _errs16 = errors;if(errors === _errs16){if(data7 && typeof data7 == "object" && !Array.isArray(data7)){if(data7.hintchars !== undefined){const _errs18 = errors;if(typeof data7.hintchars !== "string"){validate20.errors = [{instancePath:instancePath+"/properties/hintchars",schemaPath:"#/properties/properties/properties/hintchars/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}var valid5 = _errs18 === errors;}else {var valid5 = true;}if(valid5){if(data7.smoothscroll !== undefined){const _errs20 = errors;if(typeof data7.smoothscroll !== "boolean"){validate20.errors = [{instancePath:instancePath+"/properties/smoothscroll",schemaPath:"#/properties/properties/properties/smoothscroll/type",keyword:"type",params:{type: "boolean"},message:"must be boolean"}];return false;}var valid5 = _errs20 === errors;}else {var valid5 = true;}if(valid5){if(data7.complete !== undefined){const _errs22 = errors;if(typeof data7.complete !== "string"){validate20.errors = [{instancePath:instancePath+"/properties/complete",schemaPath:"#/properties/properties/properties/complete/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}var valid5 = _errs22 === errors;}else {var valid5 = true;}if(valid5){if(data7.colorscheme !== undefined){let data11 = data7.colorscheme;const _errs24 = errors;if(typeof data11 !== "string"){validate20.errors = [{instancePath:instancePath+"/properties/colorscheme",schemaPath:"#/properties/properties/properties/colorscheme/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}if(!(((data11 === "system") || (data11 === "light")) || (data11 === "dark"))){validate20.errors = [{instancePath:instancePath+"/properties/colorscheme",schemaPath:"#/properties/properties/properties/colorscheme/enum",keyword:"enum",params:{allowedValues: schema22.properties.properties.properties.colorscheme.enum},message:"must be equal to one of the allowed values"}];return false;}var valid5 = _errs24 === errors;}else {var valid5 = true;}}}}}else {validate20.errors = [{instancePath:instancePath+"/properties",schemaPath:"#/properties/properties/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}}var valid0 = _errs16 === errors;}else {var valid0 = true;}if(valid0){if(data.blacklist !== undefined){let data12 = data.blacklist;const _errs26 = errors;if(errors === _errs26){if(Array.isArray(data12)){var valid6 = true;const len0 = data12.length;for(let i0=0; i0<len0; i0++){let data13 = data12[i0];const _errs28 = errors;const _errs29 = errors;let valid7 = false;const _errs30 = errors;if(typeof data13 !== "string"){const err0 = {instancePath:instancePath+"/blacklist/" + i0,schemaPath:"#/properties/blacklist/items/anyOf/0/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}var _valid0 = _errs30 === errors;valid7 = valid7 || _valid0;if(!valid7){const _errs32 = errors;if(errors === _errs32){if(data13 && typeof data13 == "object" && !Array.isArray(data13)){let missing2;if(((data13.url === undefined) && (missing2 = "url")) || ((data13.keys === undefined) && (missing2 = "keys"))){const err1 = {instancePath:instancePath+"/blacklist/" + i0,schemaPath:"#/properties/blacklist/items/anyOf/1/required",keyword:"required",params:{missingProperty: missing2},message:"must have required property '"+missing2+"'"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}else {if(data13.url !== undefined){const _errs34 = errors;if(typeof data13.url !== "string"){const err2 = {instancePath:instancePath+"/blacklist/" + i0+"/url",schemaPath:"#/properties/blacklist/items/anyOf/1/properties/url/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}var valid8 = _errs34 === errors;}else {var valid8 = true;}if(valid8){if(data13.keys !== undefined){let data15 = data13.keys;const _errs36 = errors;if(errors === _errs36){if(Array.isArray(data15)){var valid9 = true;const len1 = data15.length;for(let i1=0; i1<len1; i1++){const _errs38 = errors;if(typeof data15[i1] !== "string"){const err3 = {instancePath:instancePath+"/blacklist/" + i0+"/keys/" + i1,schemaPath:"#/properties/blacklist/items/anyOf/1/properties/keys/items/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}var valid9 = _errs38 === errors;if(!valid9){break;}}}else {const err4 = {instancePath:instancePath+"/blacklist/" + i0+"/keys",schemaPath:"#/properties/blacklist/items/anyOf/1/properties/keys/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}}var valid8 = _errs36 === errors;}else {var valid8 = true;}}}}else {const err5 = {instancePath:instancePath+"/blacklist/" + i0,schemaPath:"#/properties/blacklist/items/anyOf/1/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}}var _valid0 = _errs32 === errors;valid7 = valid7 || _valid0;}if(!valid7){const err6 = {instancePath:instancePath+"/blacklist/" + i0,schemaPath:"#/properties/blacklist/items/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};if(vErrors === null){vErrors = [err6];}else {vErrors.push(err6);}errors++;validate20.errors = vErrors;return false;}else {errors = _errs29;if(vErrors !== null){if(_errs29){vErrors.length = _errs29;}else {vErrors = null;}}}var valid6 = _errs28 === errors;if(!valid6){break;}}}else {validate20.errors = [{instancePath:instancePath+"/blacklist",schemaPath:"#/properties/blacklist/type",keyword:"type",params:{type: "array"},message:"must be array"}];return false;}}var valid0 = _errs26 === errors;}else {var valid0 = true;}}}}}}else {validate20.errors = [{instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}}validate20.errors = vErrors;return errors === 0;}
\ No newline at end of file @@ -1246,30 +1246,10 @@ ajv@^6.10.0, ajv@^6.12.3, ajv@^6.12.4, ajv@^6.12.5: json-schema-traverse "^0.4.1" uri-js "^4.2.2" -ajv@^7.0.2: - version "7.2.4" - resolved "https://registry.npmjs.org/ajv/-/ajv-7.2.4.tgz" - integrity sha512-nBeQgg/ZZA3u3SYxyaDvpvDtgZ/EZPF547ARgZBrG9Bhu1vKDwAIjtIf+sDtJUKa2zOcEbmRLBRSyMraS/Oy1A== - dependencies: - fast-deep-equal "^3.1.1" - json-schema-traverse "^1.0.0" - require-from-string "^2.0.2" - uri-js "^4.2.2" - -ajv@^8.0.0: - version "8.6.3" - resolved "https://registry.yarnpkg.com/ajv/-/ajv-8.6.3.tgz#11a66527761dc3e9a3845ea775d2d3c0414e8764" - integrity sha512-SMJOdDP6LqTkD0Uq8qLi+gMwSt0imXLSV080qFVwJCpH9U6Mb+SUGHAXM0KNbcBPguytWyvFxcHgMLe2D2XSpw== - dependencies: - fast-deep-equal "^3.1.1" - json-schema-traverse "^1.0.0" - require-from-string "^2.0.2" - uri-js "^4.2.2" - -ajv@^8.0.1: - version "8.6.1" - resolved "https://registry.npmjs.org/ajv/-/ajv-8.6.1.tgz" - integrity sha512-42VLtQUOLefAvKFAQIxIZDaThq6om/PrfP0CYk3/vn+y4BMNkKnbli8ON2QCiHov4KkzOSJ/xSoBJdayiiYvVQ== +ajv@^8.0.0, ajv@^8.0.1, ajv@^8.9.0: + version "8.9.0" + resolved "https://registry.yarnpkg.com/ajv/-/ajv-8.9.0.tgz#738019146638824dea25edcf299dcba1b0e7eb18" + integrity sha512-qOKJyNj/h+OWx7s5DePL6Zu1KeM9jPZhwBqs+7DzP6bGOvqzVCSf0xueYmVuaC/oQ/VtS2zLMLHdQFbkka+XDQ== dependencies: fast-deep-equal "^3.1.1" json-schema-traverse "^1.0.0" @@ -4541,10 +4521,10 @@ prelude-ls@~1.1.2: resolved "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz" integrity sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ= -prettier-eslint@12.0.0: - version "12.0.0" - resolved "https://registry.npmjs.org/prettier-eslint/-/prettier-eslint-12.0.0.tgz" - integrity sha512-N8SGGQwAosISXTNl1E57sBbtnqUGlyRWjcfIUxyD3HF4ynehA9GZ8IfJgiep/OfYvCof/JEpy9ZqSl250Wia7A== +prettier-eslint@13.0.0: + version "13.0.0" + resolved "https://registry.yarnpkg.com/prettier-eslint/-/prettier-eslint-13.0.0.tgz#769f5c04057278d071847d893ebc7b9817594184" + integrity sha512-P5K31qWgUOQCtJL/3tpvEe28KfP49qbr6MTVEXC7I2k7ci55bP3YDr+glhyCdhIzxGCVp2f8eobfQ5so52RIIA== dependencies: "@typescript-eslint/parser" "^3.0.0" common-tags "^1.4.0" |