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[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 || validate.schema.properties[key0]);
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])) {
392 dataPath: (dataPath || '') + '.alignment',
393 schemaPath: '#/properties/alignment/enum',
395 allowedValues: schema1
397 message: 'should be equal to one of the allowed values'
399 if (vErrors === null) vErrors = [err];
400 else vErrors.push(err);
403 var valid1 = errors === errs_1;
405 if (data.width !== undefined) {
407 if (typeof data.width !== "number") {
410 dataPath: (dataPath || '') + '.width',
411 schemaPath: '#/properties/width/type',
415 message: 'should be number'
417 if (vErrors === null) vErrors = [err];
418 else vErrors.push(err);
421 var valid1 = errors === errs_1;
423 if (data.wrapWord !== undefined) {
425 if (typeof data.wrapWord !== "boolean") {
428 dataPath: (dataPath || '') + '.wrapWord',
429 schemaPath: '#/properties/wrapWord/type',
433 message: 'should be boolean'
435 if (vErrors === null) vErrors = [err];
436 else vErrors.push(err);
439 var valid1 = errors === errs_1;
441 if (data.truncate !== undefined) {
443 if (typeof data.truncate !== "number") {
446 dataPath: (dataPath || '') + '.truncate',
447 schemaPath: '#/properties/truncate/type',
451 message: 'should be number'
453 if (vErrors === null) vErrors = [err];
454 else vErrors.push(err);
457 var valid1 = errors === errs_1;
459 if (data.paddingLeft !== undefined) {
461 if (typeof data.paddingLeft !== "number") {
464 dataPath: (dataPath || '') + '.paddingLeft',
465 schemaPath: '#/properties/paddingLeft/type',
469 message: 'should be number'
471 if (vErrors === null) vErrors = [err];
472 else vErrors.push(err);
475 var valid1 = errors === errs_1;
477 if (data.paddingRight !== undefined) {
479 if (typeof data.paddingRight !== "number") {
482 dataPath: (dataPath || '') + '.paddingRight',
483 schemaPath: '#/properties/paddingRight/type',
487 message: 'should be number'
489 if (vErrors === null) vErrors = [err];
490 else vErrors.push(err);
493 var valid1 = errors === errs_1;
498 dataPath: (dataPath || '') + "",
499 schemaPath: '#/type',
503 message: 'should be object'
505 if (vErrors === null) vErrors = [err];
506 else vErrors.push(err);
509 validate.errors = vErrors;
518 "enum": ["left", "right", "center"]
536 "additionalProperties": false
538 refVal4.errors = null;
540 return function validate(data, dataPath, parentData, parentDataProperty, rootData) {
541 'use strict'; /*# sourceURL=config.json */
544 if (rootData === undefined) rootData = data;
545 if ((data && typeof data === "object" && !Array.isArray(data))) {
546 var errs__0 = errors;
548 for (var key0 in data) {
549 var isAdditional0 = !(false || key0 == 'border' || key0 == 'columns' || key0 == 'columnDefault' || key0 == 'drawHorizontalLine');
553 keyword: 'additionalProperties',
554 dataPath: (dataPath || '') + "",
555 schemaPath: '#/additionalProperties',
557 additionalProperty: '' + key0 + ''
559 message: 'should NOT have additional properties'
561 if (vErrors === null) vErrors = [err];
562 else vErrors.push(err);
566 if (data.border !== undefined) {
568 if (!refVal1(data.border, (dataPath || '') + '.border', data, 'border', rootData)) {
569 if (vErrors === null) vErrors = refVal1.errors;
570 else vErrors = vErrors.concat(refVal1.errors);
571 errors = vErrors.length;
573 var valid1 = errors === errs_1;
575 if (data.columns !== undefined) {
577 if (!refVal3(data.columns, (dataPath || '') + '.columns', data, 'columns', rootData)) {
578 if (vErrors === null) vErrors = refVal3.errors;
579 else vErrors = vErrors.concat(refVal3.errors);
580 errors = vErrors.length;
582 var valid1 = errors === errs_1;
584 if (data.columnDefault !== undefined) {
586 if (!refVal[4](data.columnDefault, (dataPath || '') + '.columnDefault', data, 'columnDefault', rootData)) {
587 if (vErrors === null) vErrors = refVal[4].errors;
588 else vErrors = vErrors.concat(refVal[4].errors);
589 errors = vErrors.length;
591 var valid1 = errors === errs_1;
593 if (data.drawHorizontalLine !== undefined) {
595 var errs__1 = errors;
597 valid1 = typeof data.drawHorizontalLine == "function";
599 if (errs__1 == errors) {
602 dataPath: (dataPath || '') + '.drawHorizontalLine',
603 schemaPath: '#/properties/drawHorizontalLine/typeof',
607 message: 'should pass "typeof" keyword validation'
609 if (vErrors === null) vErrors = [err];
610 else vErrors.push(err);
613 for (var i1 = errs__1; i1 < errors; i1++) {
614 var ruleErr1 = vErrors[i1];
615 if (ruleErr1.dataPath === undefined) ruleErr1.dataPath = (dataPath || '') + '.drawHorizontalLine';
616 if (ruleErr1.schemaPath === undefined) {
617 ruleErr1.schemaPath = "#/properties/drawHorizontalLine/typeof";
622 var valid1 = errors === errs_1;
627 dataPath: (dataPath || '') + "",
628 schemaPath: '#/type',
632 message: 'should be object'
634 if (vErrors === null) vErrors = [err];
635 else vErrors.push(err);
638 validate.errors = vErrors;
643 "$id": "config.json",
644 "$schema": "http://json-schema.org/draft-06/schema#",
648 "$ref": "#/definitions/borders"
651 "$ref": "#/definitions/columns"
654 "$ref": "#/definitions/column"
656 "drawHorizontalLine": {
660 "additionalProperties": false,
664 "patternProperties": {
666 "$ref": "#/definitions/column"
669 "additionalProperties": false
676 "enum": ["left", "right", "center"]
694 "additionalProperties": false
700 "$ref": "#/definitions/border"
703 "$ref": "#/definitions/border"
706 "$ref": "#/definitions/border"
709 "$ref": "#/definitions/border"
712 "$ref": "#/definitions/border"
715 "$ref": "#/definitions/border"
718 "$ref": "#/definitions/border"
721 "$ref": "#/definitions/border"
724 "$ref": "#/definitions/border"
727 "$ref": "#/definitions/border"
730 "$ref": "#/definitions/border"
733 "$ref": "#/definitions/border"
736 "$ref": "#/definitions/border"
739 "$ref": "#/definitions/border"
742 "$ref": "#/definitions/border"
745 "additionalProperties": false
752 validate.errors = null;
753 module.exports = validate;