%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /home2/rezakur1/api.rezakurnia.com/zh-router/node_modules/light-my-request/lib/
Upload File :
Create Path :
Current File : //home2/rezakur1/api.rezakurnia.com/zh-router/node_modules/light-my-request/lib/config-validator.js

// This file is autogenerated by build/build-validation.js, do not edit
/* c8 ignore start */
/* eslint-disable */
"use strict";
module.exports = validate10;
module.exports.default = validate10;
const schema11 = {"type":"object","properties":{"url":{"oneOf":[{"type":"string"},{"type":"object","properties":{"protocol":{"type":"string"},"hostname":{"type":"string"},"pathname":{"type":"string"}},"additionalProperties":true,"required":["pathname"]}]},"path":{"oneOf":[{"type":"string"},{"type":"object","properties":{"protocol":{"type":"string"},"hostname":{"type":"string"},"pathname":{"type":"string"}},"additionalProperties":true,"required":["pathname"]}]},"cookies":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"value":{"type":"string"}},"required":["name","value"],"additionalProperties":true}}]},"headers":{"type":"object","additionalProperties":true},"query":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"string"}]},"simulate":{"type":"object","properties":{"end":{"type":"boolean"},"split":{"type":"boolean"},"error":{"type":"boolean"},"close":{"type":"boolean"}}},"authority":{"type":"string"},"remoteAddress":{"type":"string"},"method":{"type":"string","enum":["ACL","BIND","CHECKOUT","CONNECT","COPY","DELETE","GET","HEAD","LINK","LOCK","M-SEARCH","MERGE","MKACTIVITY","MKCALENDAR","MKCOL","MOVE","NOTIFY","OPTIONS","PATCH","POST","PROPFIND","PROPPATCH","PURGE","PUT","QUERY","REBIND","REPORT","SEARCH","SOURCE","SUBSCRIBE","TRACE","UNBIND","UNLINK","UNLOCK","UNSUBSCRIBE","acl","bind","checkout","connect","copy","delete","get","head","link","lock","m-search","merge","mkactivity","mkcalendar","mkcol","move","notify","options","patch","post","propfind","proppatch","purge","put","query","rebind","report","search","source","subscribe","trace","unbind","unlink","unlock","unsubscribe"]},"validate":{"type":"boolean"}},"additionalProperties":true,"oneOf":[{"required":["url"]},{"required":["path"]}]};

function validate10(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){
let vErrors = null;
let errors = 0;
const _errs1 = errors;
let valid0 = false;
let passing0 = null;
const _errs2 = errors;
if(data && typeof data == "object" && !Array.isArray(data)){
let missing0;
if((data.url === undefined) && (missing0 = "url")){
const err0 = {instancePath,schemaPath:"#/oneOf/0/required",keyword:"required",params:{missingProperty: missing0},message:"must have required property '"+missing0+"'"};
if(vErrors === null){
vErrors = [err0];
}
else {
vErrors.push(err0);
}
errors++;
}
}
var _valid0 = _errs2 === errors;
if(_valid0){
valid0 = true;
passing0 = 0;
}
const _errs3 = errors;
if(data && typeof data == "object" && !Array.isArray(data)){
let missing1;
if((data.path === undefined) && (missing1 = "path")){
const err1 = {instancePath,schemaPath:"#/oneOf/1/required",keyword:"required",params:{missingProperty: missing1},message:"must have required property '"+missing1+"'"};
if(vErrors === null){
vErrors = [err1];
}
else {
vErrors.push(err1);
}
errors++;
}
}
var _valid0 = _errs3 === errors;
if(_valid0 && valid0){
valid0 = false;
passing0 = [passing0, 1];
}
else {
if(_valid0){
valid0 = true;
passing0 = 1;
}
}
if(!valid0){
const err2 = {instancePath,schemaPath:"#/oneOf",keyword:"oneOf",params:{passingSchemas: passing0},message:"must match exactly one schema in oneOf"};
if(vErrors === null){
vErrors = [err2];
}
else {
vErrors.push(err2);
}
errors++;
validate10.errors = vErrors;
return false;
}
else {
errors = _errs1;
if(vErrors !== null){
if(_errs1){
vErrors.length = _errs1;
}
else {
vErrors = null;
}
}
}
if(errors === 0){
if(data && typeof data == "object" && !Array.isArray(data)){
if(data.url !== undefined){
let data0 = data.url;
const _errs5 = errors;
const _errs6 = errors;
let valid2 = false;
let passing1 = null;
const _errs7 = errors;
if(typeof data0 !== "string"){
let dataType0 = typeof data0;
let coerced0 = undefined;
if(!(coerced0 !== undefined)){
if(dataType0 == "number" || dataType0 == "boolean"){
coerced0 = "" + data0;
}
else if(data0 === null){
coerced0 = "";
}
else {
const err3 = {instancePath:instancePath+"/url",schemaPath:"#/properties/url/oneOf/0/type",keyword:"type",params:{type: "string"},message:"must be string"};
if(vErrors === null){
vErrors = [err3];
}
else {
vErrors.push(err3);
}
errors++;
}
}
if(coerced0 !== undefined){
data0 = coerced0;
if(data !== undefined){
data["url"] = coerced0;
}
}
}
var _valid1 = _errs7 === errors;
if(_valid1){
valid2 = true;
passing1 = 0;
}
const _errs9 = errors;
if(errors === _errs9){
if(data0 && typeof data0 == "object" && !Array.isArray(data0)){
let missing2;
if((data0.pathname === undefined) && (missing2 = "pathname")){
const err4 = {instancePath:instancePath+"/url",schemaPath:"#/properties/url/oneOf/1/required",keyword:"required",params:{missingProperty: missing2},message:"must have required property '"+missing2+"'"};
if(vErrors === null){
vErrors = [err4];
}
else {
vErrors.push(err4);
}
errors++;
}
else {
if(data0.protocol !== undefined){
let data1 = data0.protocol;
const _errs12 = errors;
if(typeof data1 !== "string"){
let dataType1 = typeof data1;
let coerced1 = undefined;
if(!(coerced1 !== undefined)){
if(dataType1 == "number" || dataType1 == "boolean"){
coerced1 = "" + data1;
}
else if(data1 === null){
coerced1 = "";
}
else {
const err5 = {instancePath:instancePath+"/url/protocol",schemaPath:"#/properties/url/oneOf/1/properties/protocol/type",keyword:"type",params:{type: "string"},message:"must be string"};
if(vErrors === null){
vErrors = [err5];
}
else {
vErrors.push(err5);
}
errors++;
}
}
if(coerced1 !== undefined){
data1 = coerced1;
if(data0 !== undefined){
data0["protocol"] = coerced1;
}
}
}
var valid3 = _errs12 === errors;
}
else {
var valid3 = true;
}
if(valid3){
if(data0.hostname !== undefined){
let data2 = data0.hostname;
const _errs14 = errors;
if(typeof data2 !== "string"){
let dataType2 = typeof data2;
let coerced2 = undefined;
if(!(coerced2 !== undefined)){
if(dataType2 == "number" || dataType2 == "boolean"){
coerced2 = "" + data2;
}
else if(data2 === null){
coerced2 = "";
}
else {
const err6 = {instancePath:instancePath+"/url/hostname",schemaPath:"#/properties/url/oneOf/1/properties/hostname/type",keyword:"type",params:{type: "string"},message:"must be string"};
if(vErrors === null){
vErrors = [err6];
}
else {
vErrors.push(err6);
}
errors++;
}
}
if(coerced2 !== undefined){
data2 = coerced2;
if(data0 !== undefined){
data0["hostname"] = coerced2;
}
}
}
var valid3 = _errs14 === errors;
}
else {
var valid3 = true;
}
if(valid3){
if(data0.pathname !== undefined){
let data3 = data0.pathname;
const _errs16 = errors;
if(typeof data3 !== "string"){
let dataType3 = typeof data3;
let coerced3 = undefined;
if(!(coerced3 !== undefined)){
if(dataType3 == "number" || dataType3 == "boolean"){
coerced3 = "" + data3;
}
else if(data3 === null){
coerced3 = "";
}
else {
const err7 = {instancePath:instancePath+"/url/pathname",schemaPath:"#/properties/url/oneOf/1/properties/pathname/type",keyword:"type",params:{type: "string"},message:"must be string"};
if(vErrors === null){
vErrors = [err7];
}
else {
vErrors.push(err7);
}
errors++;
}
}
if(coerced3 !== undefined){
data3 = coerced3;
if(data0 !== undefined){
data0["pathname"] = coerced3;
}
}
}
var valid3 = _errs16 === errors;
}
else {
var valid3 = true;
}
}
}
}
}
else {
const err8 = {instancePath:instancePath+"/url",schemaPath:"#/properties/url/oneOf/1/type",keyword:"type",params:{type: "object"},message:"must be object"};
if(vErrors === null){
vErrors = [err8];
}
else {
vErrors.push(err8);
}
errors++;
}
}
var _valid1 = _errs9 === errors;
if(_valid1 && valid2){
valid2 = false;
passing1 = [passing1, 1];
}
else {
if(_valid1){
valid2 = true;
passing1 = 1;
}
}
if(!valid2){
const err9 = {instancePath:instancePath+"/url",schemaPath:"#/properties/url/oneOf",keyword:"oneOf",params:{passingSchemas: passing1},message:"must match exactly one schema in oneOf"};
if(vErrors === null){
vErrors = [err9];
}
else {
vErrors.push(err9);
}
errors++;
validate10.errors = vErrors;
return false;
}
else {
errors = _errs6;
if(vErrors !== null){
if(_errs6){
vErrors.length = _errs6;
}
else {
vErrors = null;
}
}
}
var valid1 = _errs5 === errors;
}
else {
var valid1 = true;
}
if(valid1){
if(data.path !== undefined){
let data4 = data.path;
const _errs18 = errors;
const _errs19 = errors;
let valid4 = false;
let passing2 = null;
const _errs20 = errors;
if(typeof data4 !== "string"){
let dataType4 = typeof data4;
let coerced4 = undefined;
if(!(coerced4 !== undefined)){
if(dataType4 == "number" || dataType4 == "boolean"){
coerced4 = "" + data4;
}
else if(data4 === null){
coerced4 = "";
}
else {
const err10 = {instancePath:instancePath+"/path",schemaPath:"#/properties/path/oneOf/0/type",keyword:"type",params:{type: "string"},message:"must be string"};
if(vErrors === null){
vErrors = [err10];
}
else {
vErrors.push(err10);
}
errors++;
}
}
if(coerced4 !== undefined){
data4 = coerced4;
if(data !== undefined){
data["path"] = coerced4;
}
}
}
var _valid2 = _errs20 === errors;
if(_valid2){
valid4 = true;
passing2 = 0;
}
const _errs22 = errors;
if(errors === _errs22){
if(data4 && typeof data4 == "object" && !Array.isArray(data4)){
let missing3;
if((data4.pathname === undefined) && (missing3 = "pathname")){
const err11 = {instancePath:instancePath+"/path",schemaPath:"#/properties/path/oneOf/1/required",keyword:"required",params:{missingProperty: missing3},message:"must have required property '"+missing3+"'"};
if(vErrors === null){
vErrors = [err11];
}
else {
vErrors.push(err11);
}
errors++;
}
else {
if(data4.protocol !== undefined){
let data5 = data4.protocol;
const _errs25 = errors;
if(typeof data5 !== "string"){
let dataType5 = typeof data5;
let coerced5 = undefined;
if(!(coerced5 !== undefined)){
if(dataType5 == "number" || dataType5 == "boolean"){
coerced5 = "" + data5;
}
else if(data5 === null){
coerced5 = "";
}
else {
const err12 = {instancePath:instancePath+"/path/protocol",schemaPath:"#/properties/path/oneOf/1/properties/protocol/type",keyword:"type",params:{type: "string"},message:"must be string"};
if(vErrors === null){
vErrors = [err12];
}
else {
vErrors.push(err12);
}
errors++;
}
}
if(coerced5 !== undefined){
data5 = coerced5;
if(data4 !== undefined){
data4["protocol"] = coerced5;
}
}
}
var valid5 = _errs25 === errors;
}
else {
var valid5 = true;
}
if(valid5){
if(data4.hostname !== undefined){
let data6 = data4.hostname;
const _errs27 = errors;
if(typeof data6 !== "string"){
let dataType6 = typeof data6;
let coerced6 = undefined;
if(!(coerced6 !== undefined)){
if(dataType6 == "number" || dataType6 == "boolean"){
coerced6 = "" + data6;
}
else if(data6 === null){
coerced6 = "";
}
else {
const err13 = {instancePath:instancePath+"/path/hostname",schemaPath:"#/properties/path/oneOf/1/properties/hostname/type",keyword:"type",params:{type: "string"},message:"must be string"};
if(vErrors === null){
vErrors = [err13];
}
else {
vErrors.push(err13);
}
errors++;
}
}
if(coerced6 !== undefined){
data6 = coerced6;
if(data4 !== undefined){
data4["hostname"] = coerced6;
}
}
}
var valid5 = _errs27 === errors;
}
else {
var valid5 = true;
}
if(valid5){
if(data4.pathname !== undefined){
let data7 = data4.pathname;
const _errs29 = errors;
if(typeof data7 !== "string"){
let dataType7 = typeof data7;
let coerced7 = undefined;
if(!(coerced7 !== undefined)){
if(dataType7 == "number" || dataType7 == "boolean"){
coerced7 = "" + data7;
}
else if(data7 === null){
coerced7 = "";
}
else {
const err14 = {instancePath:instancePath+"/path/pathname",schemaPath:"#/properties/path/oneOf/1/properties/pathname/type",keyword:"type",params:{type: "string"},message:"must be string"};
if(vErrors === null){
vErrors = [err14];
}
else {
vErrors.push(err14);
}
errors++;
}
}
if(coerced7 !== undefined){
data7 = coerced7;
if(data4 !== undefined){
data4["pathname"] = coerced7;
}
}
}
var valid5 = _errs29 === errors;
}
else {
var valid5 = true;
}
}
}
}
}
else {
const err15 = {instancePath:instancePath+"/path",schemaPath:"#/properties/path/oneOf/1/type",keyword:"type",params:{type: "object"},message:"must be object"};
if(vErrors === null){
vErrors = [err15];
}
else {
vErrors.push(err15);
}
errors++;
}
}
var _valid2 = _errs22 === errors;
if(_valid2 && valid4){
valid4 = false;
passing2 = [passing2, 1];
}
else {
if(_valid2){
valid4 = true;
passing2 = 1;
}
}
if(!valid4){
const err16 = {instancePath:instancePath+"/path",schemaPath:"#/properties/path/oneOf",keyword:"oneOf",params:{passingSchemas: passing2},message:"must match exactly one schema in oneOf"};
if(vErrors === null){
vErrors = [err16];
}
else {
vErrors.push(err16);
}
errors++;
validate10.errors = vErrors;
return false;
}
else {
errors = _errs19;
if(vErrors !== null){
if(_errs19){
vErrors.length = _errs19;
}
else {
vErrors = null;
}
}
}
var valid1 = _errs18 === errors;
}
else {
var valid1 = true;
}
if(valid1){
if(data.cookies !== undefined){
let data8 = data.cookies;
const _errs31 = errors;
const _errs32 = errors;
let valid6 = false;
const _errs33 = errors;
if(errors === _errs33){
if(!(data8 && typeof data8 == "object" && !Array.isArray(data8))){
const err17 = {instancePath:instancePath+"/cookies",schemaPath:"#/properties/cookies/anyOf/0/type",keyword:"type",params:{type: "object"},message:"must be object"};
if(vErrors === null){
vErrors = [err17];
}
else {
vErrors.push(err17);
}
errors++;
}
}
var _valid3 = _errs33 === errors;
valid6 = valid6 || _valid3;
if(!valid6){
const _errs36 = errors;
if(errors === _errs36){
if(Array.isArray(data8)){
var valid7 = true;
const len0 = data8.length;
for(let i0=0; i0<len0; i0++){
let data9 = data8[i0];
const _errs38 = errors;
if(errors === _errs38){
if(data9 && typeof data9 == "object" && !Array.isArray(data9)){
let missing4;
if(((data9.name === undefined) && (missing4 = "name")) || ((data9.value === undefined) && (missing4 = "value"))){
const err18 = {instancePath:instancePath+"/cookies/" + i0,schemaPath:"#/properties/cookies/anyOf/1/items/required",keyword:"required",params:{missingProperty: missing4},message:"must have required property '"+missing4+"'"};
if(vErrors === null){
vErrors = [err18];
}
else {
vErrors.push(err18);
}
errors++;
}
else {
if(data9.name !== undefined){
let data10 = data9.name;
const _errs41 = errors;
if(typeof data10 !== "string"){
let dataType8 = typeof data10;
let coerced8 = undefined;
if(!(coerced8 !== undefined)){
if(dataType8 == "number" || dataType8 == "boolean"){
coerced8 = "" + data10;
}
else if(data10 === null){
coerced8 = "";
}
else {
const err19 = {instancePath:instancePath+"/cookies/" + i0+"/name",schemaPath:"#/properties/cookies/anyOf/1/items/properties/name/type",keyword:"type",params:{type: "string"},message:"must be string"};
if(vErrors === null){
vErrors = [err19];
}
else {
vErrors.push(err19);
}
errors++;
}
}
if(coerced8 !== undefined){
data10 = coerced8;
if(data9 !== undefined){
data9["name"] = coerced8;
}
}
}
var valid8 = _errs41 === errors;
}
else {
var valid8 = true;
}
if(valid8){
if(data9.value !== undefined){
let data11 = data9.value;
const _errs43 = errors;
if(typeof data11 !== "string"){
let dataType9 = typeof data11;
let coerced9 = undefined;
if(!(coerced9 !== undefined)){
if(dataType9 == "number" || dataType9 == "boolean"){
coerced9 = "" + data11;
}
else if(data11 === null){
coerced9 = "";
}
else {
const err20 = {instancePath:instancePath+"/cookies/" + i0+"/value",schemaPath:"#/properties/cookies/anyOf/1/items/properties/value/type",keyword:"type",params:{type: "string"},message:"must be string"};
if(vErrors === null){
vErrors = [err20];
}
else {
vErrors.push(err20);
}
errors++;
}
}
if(coerced9 !== undefined){
data11 = coerced9;
if(data9 !== undefined){
data9["value"] = coerced9;
}
}
}
var valid8 = _errs43 === errors;
}
else {
var valid8 = true;
}
}
}
}
else {
const err21 = {instancePath:instancePath+"/cookies/" + i0,schemaPath:"#/properties/cookies/anyOf/1/items/type",keyword:"type",params:{type: "object"},message:"must be object"};
if(vErrors === null){
vErrors = [err21];
}
else {
vErrors.push(err21);
}
errors++;
}
}
var valid7 = _errs38 === errors;
if(!valid7){
break;
}
}
}
else {
const err22 = {instancePath:instancePath+"/cookies",schemaPath:"#/properties/cookies/anyOf/1/type",keyword:"type",params:{type: "array"},message:"must be array"};
if(vErrors === null){
vErrors = [err22];
}
else {
vErrors.push(err22);
}
errors++;
}
}
var _valid3 = _errs36 === errors;
valid6 = valid6 || _valid3;
}
if(!valid6){
const err23 = {instancePath:instancePath+"/cookies",schemaPath:"#/properties/cookies/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};
if(vErrors === null){
vErrors = [err23];
}
else {
vErrors.push(err23);
}
errors++;
validate10.errors = vErrors;
return false;
}
else {
errors = _errs32;
if(vErrors !== null){
if(_errs32){
vErrors.length = _errs32;
}
else {
vErrors = null;
}
}
}
var valid1 = _errs31 === errors;
}
else {
var valid1 = true;
}
if(valid1){
if(data.headers !== undefined){
let data12 = data.headers;
const _errs45 = errors;
if(errors === _errs45){
if(!(data12 && typeof data12 == "object" && !Array.isArray(data12))){
validate10.errors = [{instancePath:instancePath+"/headers",schemaPath:"#/properties/headers/type",keyword:"type",params:{type: "object"},message:"must be object"}];
return false;
}
}
var valid1 = _errs45 === errors;
}
else {
var valid1 = true;
}
if(valid1){
if(data.query !== undefined){
let data13 = data.query;
const _errs48 = errors;
const _errs49 = errors;
let valid9 = false;
const _errs50 = errors;
if(errors === _errs50){
if(!(data13 && typeof data13 == "object" && !Array.isArray(data13))){
const err24 = {instancePath:instancePath+"/query",schemaPath:"#/properties/query/anyOf/0/type",keyword:"type",params:{type: "object"},message:"must be object"};
if(vErrors === null){
vErrors = [err24];
}
else {
vErrors.push(err24);
}
errors++;
}
}
var _valid4 = _errs50 === errors;
valid9 = valid9 || _valid4;
if(!valid9){
const _errs53 = errors;
if(typeof data13 !== "string"){
let dataType10 = typeof data13;
let coerced10 = undefined;
if(!(coerced10 !== undefined)){
if(dataType10 == "number" || dataType10 == "boolean"){
coerced10 = "" + data13;
}
else if(data13 === null){
coerced10 = "";
}
else {
const err25 = {instancePath:instancePath+"/query",schemaPath:"#/properties/query/anyOf/1/type",keyword:"type",params:{type: "string"},message:"must be string"};
if(vErrors === null){
vErrors = [err25];
}
else {
vErrors.push(err25);
}
errors++;
}
}
if(coerced10 !== undefined){
data13 = coerced10;
if(data !== undefined){
data["query"] = coerced10;
}
}
}
var _valid4 = _errs53 === errors;
valid9 = valid9 || _valid4;
}
if(!valid9){
const err26 = {instancePath:instancePath+"/query",schemaPath:"#/properties/query/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};
if(vErrors === null){
vErrors = [err26];
}
else {
vErrors.push(err26);
}
errors++;
validate10.errors = vErrors;
return false;
}
else {
errors = _errs49;
if(vErrors !== null){
if(_errs49){
vErrors.length = _errs49;
}
else {
vErrors = null;
}
}
}
var valid1 = _errs48 === errors;
}
else {
var valid1 = true;
}
if(valid1){
if(data.simulate !== undefined){
let data14 = data.simulate;
const _errs55 = errors;
if(errors === _errs55){
if(data14 && typeof data14 == "object" && !Array.isArray(data14)){
if(data14.end !== undefined){
let data15 = data14.end;
const _errs57 = errors;
if(typeof data15 !== "boolean"){
let coerced11 = undefined;
if(!(coerced11 !== undefined)){
if(data15 === "false" || data15 === 0 || data15 === null){
coerced11 = false;
}
else if(data15 === "true" || data15 === 1){
coerced11 = true;
}
else {
validate10.errors = [{instancePath:instancePath+"/simulate/end",schemaPath:"#/properties/simulate/properties/end/type",keyword:"type",params:{type: "boolean"},message:"must be boolean"}];
return false;
}
}
if(coerced11 !== undefined){
data15 = coerced11;
if(data14 !== undefined){
data14["end"] = coerced11;
}
}
}
var valid10 = _errs57 === errors;
}
else {
var valid10 = true;
}
if(valid10){
if(data14.split !== undefined){
let data16 = data14.split;
const _errs59 = errors;
if(typeof data16 !== "boolean"){
let coerced12 = undefined;
if(!(coerced12 !== undefined)){
if(data16 === "false" || data16 === 0 || data16 === null){
coerced12 = false;
}
else if(data16 === "true" || data16 === 1){
coerced12 = true;
}
else {
validate10.errors = [{instancePath:instancePath+"/simulate/split",schemaPath:"#/properties/simulate/properties/split/type",keyword:"type",params:{type: "boolean"},message:"must be boolean"}];
return false;
}
}
if(coerced12 !== undefined){
data16 = coerced12;
if(data14 !== undefined){
data14["split"] = coerced12;
}
}
}
var valid10 = _errs59 === errors;
}
else {
var valid10 = true;
}
if(valid10){
if(data14.error !== undefined){
let data17 = data14.error;
const _errs61 = errors;
if(typeof data17 !== "boolean"){
let coerced13 = undefined;
if(!(coerced13 !== undefined)){
if(data17 === "false" || data17 === 0 || data17 === null){
coerced13 = false;
}
else if(data17 === "true" || data17 === 1){
coerced13 = true;
}
else {
validate10.errors = [{instancePath:instancePath+"/simulate/error",schemaPath:"#/properties/simulate/properties/error/type",keyword:"type",params:{type: "boolean"},message:"must be boolean"}];
return false;
}
}
if(coerced13 !== undefined){
data17 = coerced13;
if(data14 !== undefined){
data14["error"] = coerced13;
}
}
}
var valid10 = _errs61 === errors;
}
else {
var valid10 = true;
}
if(valid10){
if(data14.close !== undefined){
let data18 = data14.close;
const _errs63 = errors;
if(typeof data18 !== "boolean"){
let coerced14 = undefined;
if(!(coerced14 !== undefined)){
if(data18 === "false" || data18 === 0 || data18 === null){
coerced14 = false;
}
else if(data18 === "true" || data18 === 1){
coerced14 = true;
}
else {
validate10.errors = [{instancePath:instancePath+"/simulate/close",schemaPath:"#/properties/simulate/properties/close/type",keyword:"type",params:{type: "boolean"},message:"must be boolean"}];
return false;
}
}
if(coerced14 !== undefined){
data18 = coerced14;
if(data14 !== undefined){
data14["close"] = coerced14;
}
}
}
var valid10 = _errs63 === errors;
}
else {
var valid10 = true;
}
}
}
}
}
else {
validate10.errors = [{instancePath:instancePath+"/simulate",schemaPath:"#/properties/simulate/type",keyword:"type",params:{type: "object"},message:"must be object"}];
return false;
}
}
var valid1 = _errs55 === errors;
}
else {
var valid1 = true;
}
if(valid1){
if(data.authority !== undefined){
let data19 = data.authority;
const _errs65 = errors;
if(typeof data19 !== "string"){
let dataType15 = typeof data19;
let coerced15 = undefined;
if(!(coerced15 !== undefined)){
if(dataType15 == "number" || dataType15 == "boolean"){
coerced15 = "" + data19;
}
else if(data19 === null){
coerced15 = "";
}
else {
validate10.errors = [{instancePath:instancePath+"/authority",schemaPath:"#/properties/authority/type",keyword:"type",params:{type: "string"},message:"must be string"}];
return false;
}
}
if(coerced15 !== undefined){
data19 = coerced15;
if(data !== undefined){
data["authority"] = coerced15;
}
}
}
var valid1 = _errs65 === errors;
}
else {
var valid1 = true;
}
if(valid1){
if(data.remoteAddress !== undefined){
let data20 = data.remoteAddress;
const _errs67 = errors;
if(typeof data20 !== "string"){
let dataType16 = typeof data20;
let coerced16 = undefined;
if(!(coerced16 !== undefined)){
if(dataType16 == "number" || dataType16 == "boolean"){
coerced16 = "" + data20;
}
else if(data20 === null){
coerced16 = "";
}
else {
validate10.errors = [{instancePath:instancePath+"/remoteAddress",schemaPath:"#/properties/remoteAddress/type",keyword:"type",params:{type: "string"},message:"must be string"}];
return false;
}
}
if(coerced16 !== undefined){
data20 = coerced16;
if(data !== undefined){
data["remoteAddress"] = coerced16;
}
}
}
var valid1 = _errs67 === errors;
}
else {
var valid1 = true;
}
if(valid1){
if(data.method !== undefined){
let data21 = data.method;
const _errs69 = errors;
if(typeof data21 !== "string"){
let dataType17 = typeof data21;
let coerced17 = undefined;
if(!(coerced17 !== undefined)){
if(dataType17 == "number" || dataType17 == "boolean"){
coerced17 = "" + data21;
}
else if(data21 === null){
coerced17 = "";
}
else {
validate10.errors = [{instancePath:instancePath+"/method",schemaPath:"#/properties/method/type",keyword:"type",params:{type: "string"},message:"must be string"}];
return false;
}
}
if(coerced17 !== undefined){
data21 = coerced17;
if(data !== undefined){
data["method"] = coerced17;
}
}
}
if(!((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((data21 === "ACL") || (data21 === "BIND")) || (data21 === "CHECKOUT")) || (data21 === "CONNECT")) || (data21 === "COPY")) || (data21 === "DELETE")) || (data21 === "GET")) || (data21 === "HEAD")) || (data21 === "LINK")) || (data21 === "LOCK")) || (data21 === "M-SEARCH")) || (data21 === "MERGE")) || (data21 === "MKACTIVITY")) || (data21 === "MKCALENDAR")) || (data21 === "MKCOL")) || (data21 === "MOVE")) || (data21 === "NOTIFY")) || (data21 === "OPTIONS")) || (data21 === "PATCH")) || (data21 === "POST")) || (data21 === "PROPFIND")) || (data21 === "PROPPATCH")) || (data21 === "PURGE")) || (data21 === "PUT")) || (data21 === "QUERY")) || (data21 === "REBIND")) || (data21 === "REPORT")) || (data21 === "SEARCH")) || (data21 === "SOURCE")) || (data21 === "SUBSCRIBE")) || (data21 === "TRACE")) || (data21 === "UNBIND")) || (data21 === "UNLINK")) || (data21 === "UNLOCK")) || (data21 === "UNSUBSCRIBE")) || (data21 === "acl")) || (data21 === "bind")) || (data21 === "checkout")) || (data21 === "connect")) || (data21 === "copy")) || (data21 === "delete")) || (data21 === "get")) || (data21 === "head")) || (data21 === "link")) || (data21 === "lock")) || (data21 === "m-search")) || (data21 === "merge")) || (data21 === "mkactivity")) || (data21 === "mkcalendar")) || (data21 === "mkcol")) || (data21 === "move")) || (data21 === "notify")) || (data21 === "options")) || (data21 === "patch")) || (data21 === "post")) || (data21 === "propfind")) || (data21 === "proppatch")) || (data21 === "purge")) || (data21 === "put")) || (data21 === "query")) || (data21 === "rebind")) || (data21 === "report")) || (data21 === "search")) || (data21 === "source")) || (data21 === "subscribe")) || (data21 === "trace")) || (data21 === "unbind")) || (data21 === "unlink")) || (data21 === "unlock")) || (data21 === "unsubscribe"))){
validate10.errors = [{instancePath:instancePath+"/method",schemaPath:"#/properties/method/enum",keyword:"enum",params:{allowedValues: schema11.properties.method.enum},message:"must be equal to one of the allowed values"}];
return false;
}
var valid1 = _errs69 === errors;
}
else {
var valid1 = true;
}
if(valid1){
if(data.validate !== undefined){
let data22 = data.validate;
const _errs71 = errors;
if(typeof data22 !== "boolean"){
let coerced18 = undefined;
if(!(coerced18 !== undefined)){
if(data22 === "false" || data22 === 0 || data22 === null){
coerced18 = false;
}
else if(data22 === "true" || data22 === 1){
coerced18 = true;
}
else {
validate10.errors = [{instancePath:instancePath+"/validate",schemaPath:"#/properties/validate/type",keyword:"type",params:{type: "boolean"},message:"must be boolean"}];
return false;
}
}
if(coerced18 !== undefined){
data22 = coerced18;
if(data !== undefined){
data["validate"] = coerced18;
}
}
}
var valid1 = _errs71 === errors;
}
else {
var valid1 = true;
}
}
}
}
}
}
}
}
}
}
}
else {
validate10.errors = [{instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"}];
return false;
}
}
validate10.errors = vErrors;
return errors === 0;
}


Zerion Mini Shell 1.0