2 var equal = require('ajv/lib/compile/equal');
3 var validate = (function() {
4 var pattern0 = new RegExp('^[0-9]+$');
6 var refVal1 = (function() {
7 var pattern0 = new RegExp('^[0-9]+$');
8 return function validate(data, dataPath, parentData, parentDataProperty, rootData) {
12 if (rootData === undefined) rootData = data;
13 if ((data && typeof data === "object" && !Array.isArray(data))) {
16 for (var key0 in data) {
17 var isAdditional0 = !(false || validate.schema.properties.hasOwnProperty(key0));
21 keyword: 'additionalProperties',
22 dataPath: (dataPath || '') + "",
23 schemaPath: '#/additionalProperties',
25 additionalProperty: '' + key0 + ''
27 message: 'should NOT have additional properties'
29 if (vErrors === null) vErrors = [err];
30 else vErrors.push(err);
34 if (data.topBody !== undefined) {
36 if (!refVal2(data.topBody, (dataPath || '') + '.topBody', data, 'topBody', rootData)) {
37 if (vErrors === null) vErrors = refVal2.errors;
38 else vErrors = vErrors.concat(refVal2.errors);
39 errors = vErrors.length;
41 var valid1 = errors === errs_1;
43 if (data.topJoin !== undefined) {
45 if (!refVal[2](data.topJoin, (dataPath || '') + '.topJoin', data, 'topJoin', rootData)) {
46 if (vErrors === null) vErrors = refVal[2].errors;
47 else vErrors = vErrors.concat(refVal[2].errors);
48 errors = vErrors.length;
50 var valid1 = errors === errs_1;
52 if (data.topLeft !== undefined) {
54 if (!refVal[2](data.topLeft, (dataPath || '') + '.topLeft', data, 'topLeft', rootData)) {
55 if (vErrors === null) vErrors = refVal[2].errors;
56 else vErrors = vErrors.concat(refVal[2].errors);
57 errors = vErrors.length;
59 var valid1 = errors === errs_1;
61 if (data.topRight !== undefined) {
63 if (!refVal[2](data.topRight, (dataPath || '') + '.topRight', data, 'topRight', rootData)) {
64 if (vErrors === null) vErrors = refVal[2].errors;
65 else vErrors = vErrors.concat(refVal[2].errors);
66 errors = vErrors.length;
68 var valid1 = errors === errs_1;
70 if (data.bottomBody !== undefined) {
72 if (!refVal[2](data.bottomBody, (dataPath || '') + '.bottomBody', data, 'bottomBody', rootData)) {
73 if (vErrors === null) vErrors = refVal[2].errors;
74 else vErrors = vErrors.concat(refVal[2].errors);
75 errors = vErrors.length;
77 var valid1 = errors === errs_1;
79 if (data.bottomJoin !== undefined) {
81 if (!refVal[2](data.bottomJoin, (dataPath || '') + '.bottomJoin', data, 'bottomJoin', rootData)) {
82 if (vErrors === null) vErrors = refVal[2].errors;
83 else vErrors = vErrors.concat(refVal[2].errors);
84 errors = vErrors.length;
86 var valid1 = errors === errs_1;
88 if (data.bottomLeft !== undefined) {
90 if (!refVal[2](data.bottomLeft, (dataPath || '') + '.bottomLeft', data, 'bottomLeft', rootData)) {
91 if (vErrors === null) vErrors = refVal[2].errors;
92 else vErrors = vErrors.concat(refVal[2].errors);
93 errors = vErrors.length;
95 var valid1 = errors === errs_1;
97 if (data.bottomRight !== undefined) {
99 if (!refVal[2](data.bottomRight, (dataPath || '') + '.bottomRight', data, 'bottomRight', rootData)) {
100 if (vErrors === null) vErrors = refVal[2].errors;
101 else vErrors = vErrors.concat(refVal[2].errors);
102 errors = vErrors.length;
104 var valid1 = errors === errs_1;
106 if (data.bodyLeft !== undefined) {
108 if (!refVal[2](data.bodyLeft, (dataPath || '') + '.bodyLeft', data, 'bodyLeft', rootData)) {
109 if (vErrors === null) vErrors = refVal[2].errors;
110 else vErrors = vErrors.concat(refVal[2].errors);
111 errors = vErrors.length;
113 var valid1 = errors === errs_1;
115 if (data.bodyRight !== undefined) {
117 if (!refVal[2](data.bodyRight, (dataPath || '') + '.bodyRight', data, 'bodyRight', rootData)) {
118 if (vErrors === null) vErrors = refVal[2].errors;
119 else vErrors = vErrors.concat(refVal[2].errors);
120 errors = vErrors.length;
122 var valid1 = errors === errs_1;
124 if (data.bodyJoin !== undefined) {
126 if (!refVal[2](data.bodyJoin, (dataPath || '') + '.bodyJoin', data, 'bodyJoin', rootData)) {
127 if (vErrors === null) vErrors = refVal[2].errors;
128 else vErrors = vErrors.concat(refVal[2].errors);
129 errors = vErrors.length;
131 var valid1 = errors === errs_1;
133 if (data.joinBody !== undefined) {
135 if (!refVal[2](data.joinBody, (dataPath || '') + '.joinBody', data, 'joinBody', rootData)) {
136 if (vErrors === null) vErrors = refVal[2].errors;
137 else vErrors = vErrors.concat(refVal[2].errors);
138 errors = vErrors.length;
140 var valid1 = errors === errs_1;
142 if (data.joinLeft !== undefined) {
144 if (!refVal[2](data.joinLeft, (dataPath || '') + '.joinLeft', data, 'joinLeft', rootData)) {
145 if (vErrors === null) vErrors = refVal[2].errors;
146 else vErrors = vErrors.concat(refVal[2].errors);
147 errors = vErrors.length;
149 var valid1 = errors === errs_1;
151 if (data.joinRight !== undefined) {
153 if (!refVal[2](data.joinRight, (dataPath || '') + '.joinRight', data, 'joinRight', rootData)) {
154 if (vErrors === null) vErrors = refVal[2].errors;
155 else vErrors = vErrors.concat(refVal[2].errors);
156 errors = vErrors.length;
158 var valid1 = errors === errs_1;
160 if (data.joinJoin !== undefined) {
162 if (!refVal[2](data.joinJoin, (dataPath || '') + '.joinJoin', data, 'joinJoin', rootData)) {
163 if (vErrors === null) vErrors = refVal[2].errors;
164 else vErrors = vErrors.concat(refVal[2].errors);
165 errors = vErrors.length;
167 var valid1 = errors === errs_1;
172 dataPath: (dataPath || '') + "",
173 schemaPath: '#/type',
177 message: 'should be object'
179 if (vErrors === null) vErrors = [err];
180 else vErrors.push(err);
183 validate.errors = vErrors;
191 "$ref": "#/definitions/border"
194 "$ref": "#/definitions/border"
197 "$ref": "#/definitions/border"
200 "$ref": "#/definitions/border"
203 "$ref": "#/definitions/border"
206 "$ref": "#/definitions/border"
209 "$ref": "#/definitions/border"
212 "$ref": "#/definitions/border"
215 "$ref": "#/definitions/border"
218 "$ref": "#/definitions/border"
221 "$ref": "#/definitions/border"
224 "$ref": "#/definitions/border"
227 "$ref": "#/definitions/border"
230 "$ref": "#/definitions/border"
233 "$ref": "#/definitions/border"
236 "additionalProperties": false
238 refVal1.errors = null;
240 var refVal2 = (function() {
241 var pattern0 = new RegExp('^[0-9]+$');
242 return function validate(data, dataPath, parentData, parentDataProperty, rootData) {
246 if (typeof data !== "string") {
249 dataPath: (dataPath || '') + "",
250 schemaPath: '#/type',
254 message: 'should be string'
256 if (vErrors === null) vErrors = [err];
257 else vErrors.push(err);
260 validate.errors = vErrors;
267 refVal2.errors = null;
269 var refVal3 = (function() {
270 var pattern0 = new RegExp('^[0-9]+$');
271 return function validate(data, dataPath, parentData, parentDataProperty, rootData) {
275 if (rootData === undefined) rootData = data;
276 if ((data && typeof data === "object" && !Array.isArray(data))) {
277 var errs__0 = errors;
279 for (var key0 in data) {
280 var isAdditional0 = !(false || pattern0.test(key0));
284 keyword: 'additionalProperties',
285 dataPath: (dataPath || '') + "",
286 schemaPath: '#/additionalProperties',
288 additionalProperty: '' + key0 + ''
290 message: 'should NOT have additional properties'
292 if (vErrors === null) vErrors = [err];
293 else vErrors.push(err);
297 for (var key0 in data) {
298 if (pattern0.test(key0)) {
300 if (!refVal4(data[key0], (dataPath || '') + '[\'' + key0 + '\']', data, key0, rootData)) {
301 if (vErrors === null) vErrors = refVal4.errors;
302 else vErrors = vErrors.concat(refVal4.errors);
303 errors = vErrors.length;
305 var valid1 = errors === errs_1;
311 dataPath: (dataPath || '') + "",
312 schemaPath: '#/type',
316 message: 'should be object'
318 if (vErrors === null) vErrors = [err];
319 else vErrors.push(err);
322 validate.errors = vErrors;
328 "patternProperties": {
330 "$ref": "#/definitions/column"
333 "additionalProperties": false
335 refVal3.errors = null;
337 var refVal4 = (function() {
338 var pattern0 = new RegExp('^[0-9]+$');
339 return function validate(data, dataPath, parentData, parentDataProperty, rootData) {
343 if ((data && typeof data === "object" && !Array.isArray(data))) {
344 var errs__0 = errors;
346 for (var key0 in data) {
347 var isAdditional0 = !(false || key0 == 'alignment' || key0 == 'width' || key0 == 'wrapWord' || key0 == 'truncate' || key0 == 'paddingLeft' || key0 == 'paddingRight');
351 keyword: 'additionalProperties',
352 dataPath: (dataPath || '') + "",
353 schemaPath: '#/additionalProperties',
355 additionalProperty: '' + key0 + ''
357 message: 'should NOT have additional properties'
359 if (vErrors === null) vErrors = [err];
360 else vErrors.push(err);
364 var data1 = data.alignment;
365 if (data1 !== undefined) {
367 if (typeof data1 !== "string") {
370 dataPath: (dataPath || '') + '.alignment',
371 schemaPath: '#/properties/alignment/type',
375 message: 'should be string'
377 if (vErrors === null) vErrors = [err];
378 else vErrors.push(err);
381 var schema1 = validate.schema.properties.alignment.enum;
384 for (var i1 = 0; i1 < schema1.length; i1++)
385 if (equal(data1, schema1[i1])) {
391 dataPath: (dataPath || '') + '.alignment',
392 schemaPath: '#/properties/alignment/enum',
394 allowedValues: schema1
396 message: 'should be equal to one of the allowed values'
398 if (vErrors === null) vErrors = [err];
399 else vErrors.push(err);
402 var valid1 = errors === errs_1;
404 if (data.width !== undefined) {
406 if (typeof data.width !== "number") {
409 dataPath: (dataPath || '') + '.width',
410 schemaPath: '#/properties/width/type',
414 message: 'should be number'
416 if (vErrors === null) vErrors = [err];
417 else vErrors.push(err);
420 var valid1 = errors === errs_1;
422 if (data.wrapWord !== undefined) {
424 if (typeof data.wrapWord !== "boolean") {
427 dataPath: (dataPath || '') + '.wrapWord',
428 schemaPath: '#/properties/wrapWord/type',
432 message: 'should be boolean'
434 if (vErrors === null) vErrors = [err];
435 else vErrors.push(err);
438 var valid1 = errors === errs_1;
440 if (data.truncate !== undefined) {
442 if (typeof data.truncate !== "number") {
445 dataPath: (dataPath || '') + '.truncate',
446 schemaPath: '#/properties/truncate/type',
450 message: 'should be number'
452 if (vErrors === null) vErrors = [err];
453 else vErrors.push(err);
456 var valid1 = errors === errs_1;
458 if (data.paddingLeft !== undefined) {
460 if (typeof data.paddingLeft !== "number") {
463 dataPath: (dataPath || '') + '.paddingLeft',
464 schemaPath: '#/properties/paddingLeft/type',
468 message: 'should be number'
470 if (vErrors === null) vErrors = [err];
471 else vErrors.push(err);
474 var valid1 = errors === errs_1;
476 if (data.paddingRight !== undefined) {
478 if (typeof data.paddingRight !== "number") {
481 dataPath: (dataPath || '') + '.paddingRight',
482 schemaPath: '#/properties/paddingRight/type',
486 message: 'should be number'
488 if (vErrors === null) vErrors = [err];
489 else vErrors.push(err);
492 var valid1 = errors === errs_1;
497 dataPath: (dataPath || '') + "",
498 schemaPath: '#/type',
502 message: 'should be object'
504 if (vErrors === null) vErrors = [err];
505 else vErrors.push(err);
508 validate.errors = vErrors;
517 "enum": ["left", "right", "center"]
535 "additionalProperties": false
537 refVal4.errors = null;
539 return function validate(data, dataPath, parentData, parentDataProperty, rootData) {
540 'use strict'; /*# sourceURL=config.json */
543 if (rootData === undefined) rootData = data;
544 if ((data && typeof data === "object" && !Array.isArray(data))) {
545 var errs__0 = errors;
547 for (var key0 in data) {
548 var isAdditional0 = !(false || key0 == 'border' || key0 == 'columns' || key0 == 'columnDefault' || key0 == 'drawHorizontalLine');
552 keyword: 'additionalProperties',
553 dataPath: (dataPath || '') + "",
554 schemaPath: '#/additionalProperties',
556 additionalProperty: '' + key0 + ''
558 message: 'should NOT have additional properties'
560 if (vErrors === null) vErrors = [err];
561 else vErrors.push(err);
565 if (data.border !== undefined) {
567 if (!refVal1(data.border, (dataPath || '') + '.border', data, 'border', rootData)) {
568 if (vErrors === null) vErrors = refVal1.errors;
569 else vErrors = vErrors.concat(refVal1.errors);
570 errors = vErrors.length;
572 var valid1 = errors === errs_1;
574 if (data.columns !== undefined) {
576 if (!refVal3(data.columns, (dataPath || '') + '.columns', data, 'columns', rootData)) {
577 if (vErrors === null) vErrors = refVal3.errors;
578 else vErrors = vErrors.concat(refVal3.errors);
579 errors = vErrors.length;
581 var valid1 = errors === errs_1;
583 if (data.columnDefault !== undefined) {
585 if (!refVal[4](data.columnDefault, (dataPath || '') + '.columnDefault', data, 'columnDefault', rootData)) {
586 if (vErrors === null) vErrors = refVal[4].errors;
587 else vErrors = vErrors.concat(refVal[4].errors);
588 errors = vErrors.length;
590 var valid1 = errors === errs_1;
592 if (data.drawHorizontalLine !== undefined) {
594 var errs__1 = errors;
596 valid1 = typeof data.drawHorizontalLine == "function";
598 if (errs__1 == errors) {
601 dataPath: (dataPath || '') + '.drawHorizontalLine',
602 schemaPath: '#/properties/drawHorizontalLine/typeof',
606 message: 'should pass "typeof" keyword validation'
608 if (vErrors === null) vErrors = [err];
609 else vErrors.push(err);
612 for (var i1 = errs__1; i1 < errors; i1++) {
613 var ruleErr1 = vErrors[i1];
614 if (ruleErr1.dataPath === undefined) ruleErr1.dataPath = (dataPath || '') + '.drawHorizontalLine';
615 if (ruleErr1.schemaPath === undefined) {
616 ruleErr1.schemaPath = "#/properties/drawHorizontalLine/typeof";
621 var valid1 = errors === errs_1;
626 dataPath: (dataPath || '') + "",
627 schemaPath: '#/type',
631 message: 'should be object'
633 if (vErrors === null) vErrors = [err];
634 else vErrors.push(err);
637 validate.errors = vErrors;
642 "$id": "config.json",
643 "$schema": "http://json-schema.org/draft-07/schema#",
647 "$ref": "#/definitions/borders"
650 "$ref": "#/definitions/columns"
653 "$ref": "#/definitions/column"
655 "drawHorizontalLine": {
659 "additionalProperties": false,
663 "patternProperties": {
665 "$ref": "#/definitions/column"
668 "additionalProperties": false
675 "enum": ["left", "right", "center"]
693 "additionalProperties": false
699 "$ref": "#/definitions/border"
702 "$ref": "#/definitions/border"
705 "$ref": "#/definitions/border"
708 "$ref": "#/definitions/border"
711 "$ref": "#/definitions/border"
714 "$ref": "#/definitions/border"
717 "$ref": "#/definitions/border"
720 "$ref": "#/definitions/border"
723 "$ref": "#/definitions/border"
726 "$ref": "#/definitions/border"
729 "$ref": "#/definitions/border"
732 "$ref": "#/definitions/border"
735 "$ref": "#/definitions/border"
738 "$ref": "#/definitions/border"
741 "$ref": "#/definitions/border"
744 "additionalProperties": false
751 validate.errors = null;
752 module.exports = validate;