@bridgething/catalog 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/blend.d.ts +17 -0
- package/dist/blend.d.ts.map +1 -0
- package/dist/blend.js +27 -0
- package/dist/blend.js.map +1 -0
- package/dist/generated/schema.v1.validator.d.mts +6 -0
- package/dist/generated/schema.v1.validator.mjs +1436 -0
- package/dist/index.d.ts +7 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +6 -0
- package/dist/index.js.map +1 -0
- package/dist/resolve.d.ts +55 -0
- package/dist/resolve.d.ts.map +1 -0
- package/dist/resolve.js +142 -0
- package/dist/resolve.js.map +1 -0
- package/dist/sources.d.ts +45 -0
- package/dist/sources.d.ts.map +1 -0
- package/dist/sources.js +95 -0
- package/dist/sources.js.map +1 -0
- package/dist/types.d.ts +55 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +2 -0
- package/dist/types.js.map +1 -0
- package/dist/validate.d.ts +9 -0
- package/dist/validate.d.ts.map +1 -0
- package/dist/validate.js +57 -0
- package/dist/validate.js.map +1 -0
- package/dist/versions.d.ts +5 -0
- package/dist/versions.d.ts.map +1 -0
- package/dist/versions.js +19 -0
- package/dist/versions.js.map +1 -0
- package/package.json +30 -0
- package/schema.v1.json +236 -0
|
@@ -0,0 +1,1436 @@
|
|
|
1
|
+
// generated by packages/catalog/scripts/compile-validator.ts from schema.v1.json; do not edit.
|
|
2
|
+
var __commonJS = (cb, mod) => () => (mod || cb((mod = { exports: {} }).exports, mod), mod.exports);
|
|
3
|
+
|
|
4
|
+
// ../../node_modules/.bun/ajv-formats@3.0.1/node_modules/ajv-formats/dist/formats.js
|
|
5
|
+
var require_formats = __commonJS(function(exports) {
|
|
6
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
+
exports.formatNames = exports.fastFormats = exports.fullFormats = undefined;
|
|
8
|
+
function fmtDef(validate, compare) {
|
|
9
|
+
return { validate, compare };
|
|
10
|
+
}
|
|
11
|
+
exports.fullFormats = {
|
|
12
|
+
date: fmtDef(date, compareDate),
|
|
13
|
+
time: fmtDef(getTime(true), compareTime),
|
|
14
|
+
"date-time": fmtDef(getDateTime(true), compareDateTime),
|
|
15
|
+
"iso-time": fmtDef(getTime(), compareIsoTime),
|
|
16
|
+
"iso-date-time": fmtDef(getDateTime(), compareIsoDateTime),
|
|
17
|
+
duration: /^P(?!$)((\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?|(\d+W)?)$/,
|
|
18
|
+
uri,
|
|
19
|
+
"uri-reference": /^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'"()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,
|
|
20
|
+
"uri-template": /^(?:(?:[^\x00-\x20"'<>%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i,
|
|
21
|
+
url: /^(?:https?|ftp):\/\/(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)(?:\.(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)*(?:\.(?:[a-z\u{00a1}-\u{ffff}]{2,})))(?::\d{2,5})?(?:\/[^\s]*)?$/iu,
|
|
22
|
+
email: /^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i,
|
|
23
|
+
hostname: /^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i,
|
|
24
|
+
ipv4: /^(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)$/,
|
|
25
|
+
ipv6: /^((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))$/i,
|
|
26
|
+
regex,
|
|
27
|
+
uuid: /^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,
|
|
28
|
+
"json-pointer": /^(?:\/(?:[^~/]|~0|~1)*)*$/,
|
|
29
|
+
"json-pointer-uri-fragment": /^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,
|
|
30
|
+
"relative-json-pointer": /^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/,
|
|
31
|
+
byte,
|
|
32
|
+
int32: { type: "number", validate: validateInt32 },
|
|
33
|
+
int64: { type: "number", validate: validateInt64 },
|
|
34
|
+
float: { type: "number", validate: validateNumber },
|
|
35
|
+
double: { type: "number", validate: validateNumber },
|
|
36
|
+
password: true,
|
|
37
|
+
binary: true
|
|
38
|
+
};
|
|
39
|
+
exports.fastFormats = {
|
|
40
|
+
...exports.fullFormats,
|
|
41
|
+
date: fmtDef(/^\d\d\d\d-[0-1]\d-[0-3]\d$/, compareDate),
|
|
42
|
+
time: fmtDef(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i, compareTime),
|
|
43
|
+
"date-time": fmtDef(/^\d\d\d\d-[0-1]\d-[0-3]\dt(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i, compareDateTime),
|
|
44
|
+
"iso-time": fmtDef(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i, compareIsoTime),
|
|
45
|
+
"iso-date-time": fmtDef(/^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i, compareIsoDateTime),
|
|
46
|
+
uri: /^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/)?[^\s]*$/i,
|
|
47
|
+
"uri-reference": /^(?:(?:[a-z][a-z0-9+\-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i,
|
|
48
|
+
email: /^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i
|
|
49
|
+
};
|
|
50
|
+
exports.formatNames = Object.keys(exports.fullFormats);
|
|
51
|
+
function isLeapYear(year) {
|
|
52
|
+
return year % 4 === 0 && (year % 100 !== 0 || year % 400 === 0);
|
|
53
|
+
}
|
|
54
|
+
var DATE = /^(\d\d\d\d)-(\d\d)-(\d\d)$/;
|
|
55
|
+
var DAYS = [0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
|
|
56
|
+
function date(str) {
|
|
57
|
+
const matches = DATE.exec(str);
|
|
58
|
+
if (!matches)
|
|
59
|
+
return false;
|
|
60
|
+
const year = +matches[1];
|
|
61
|
+
const month = +matches[2];
|
|
62
|
+
const day = +matches[3];
|
|
63
|
+
return month >= 1 && month <= 12 && day >= 1 && day <= (month === 2 && isLeapYear(year) ? 29 : DAYS[month]);
|
|
64
|
+
}
|
|
65
|
+
function compareDate(d1, d2) {
|
|
66
|
+
if (!(d1 && d2))
|
|
67
|
+
return;
|
|
68
|
+
if (d1 > d2)
|
|
69
|
+
return 1;
|
|
70
|
+
if (d1 < d2)
|
|
71
|
+
return -1;
|
|
72
|
+
return 0;
|
|
73
|
+
}
|
|
74
|
+
var TIME = /^(\d\d):(\d\d):(\d\d(?:\.\d+)?)(z|([+-])(\d\d)(?::?(\d\d))?)?$/i;
|
|
75
|
+
function getTime(strictTimeZone) {
|
|
76
|
+
return function time(str) {
|
|
77
|
+
const matches = TIME.exec(str);
|
|
78
|
+
if (!matches)
|
|
79
|
+
return false;
|
|
80
|
+
const hr = +matches[1];
|
|
81
|
+
const min = +matches[2];
|
|
82
|
+
const sec = +matches[3];
|
|
83
|
+
const tz = matches[4];
|
|
84
|
+
const tzSign = matches[5] === "-" ? -1 : 1;
|
|
85
|
+
const tzH = +(matches[6] || 0);
|
|
86
|
+
const tzM = +(matches[7] || 0);
|
|
87
|
+
if (tzH > 23 || tzM > 59 || strictTimeZone && !tz)
|
|
88
|
+
return false;
|
|
89
|
+
if (hr <= 23 && min <= 59 && sec < 60)
|
|
90
|
+
return true;
|
|
91
|
+
const utcMin = min - tzM * tzSign;
|
|
92
|
+
const utcHr = hr - tzH * tzSign - (utcMin < 0 ? 1 : 0);
|
|
93
|
+
return (utcHr === 23 || utcHr === -1) && (utcMin === 59 || utcMin === -1) && sec < 61;
|
|
94
|
+
};
|
|
95
|
+
}
|
|
96
|
+
function compareTime(s1, s2) {
|
|
97
|
+
if (!(s1 && s2))
|
|
98
|
+
return;
|
|
99
|
+
const t1 = new Date("2020-01-01T" + s1).valueOf();
|
|
100
|
+
const t2 = new Date("2020-01-01T" + s2).valueOf();
|
|
101
|
+
if (!(t1 && t2))
|
|
102
|
+
return;
|
|
103
|
+
return t1 - t2;
|
|
104
|
+
}
|
|
105
|
+
function compareIsoTime(t1, t2) {
|
|
106
|
+
if (!(t1 && t2))
|
|
107
|
+
return;
|
|
108
|
+
const a1 = TIME.exec(t1);
|
|
109
|
+
const a2 = TIME.exec(t2);
|
|
110
|
+
if (!(a1 && a2))
|
|
111
|
+
return;
|
|
112
|
+
t1 = a1[1] + a1[2] + a1[3];
|
|
113
|
+
t2 = a2[1] + a2[2] + a2[3];
|
|
114
|
+
if (t1 > t2)
|
|
115
|
+
return 1;
|
|
116
|
+
if (t1 < t2)
|
|
117
|
+
return -1;
|
|
118
|
+
return 0;
|
|
119
|
+
}
|
|
120
|
+
var DATE_TIME_SEPARATOR = /t|\s/i;
|
|
121
|
+
function getDateTime(strictTimeZone) {
|
|
122
|
+
const time = getTime(strictTimeZone);
|
|
123
|
+
return function date_time(str) {
|
|
124
|
+
const dateTime = str.split(DATE_TIME_SEPARATOR);
|
|
125
|
+
return dateTime.length === 2 && date(dateTime[0]) && time(dateTime[1]);
|
|
126
|
+
};
|
|
127
|
+
}
|
|
128
|
+
function compareDateTime(dt1, dt2) {
|
|
129
|
+
if (!(dt1 && dt2))
|
|
130
|
+
return;
|
|
131
|
+
const d1 = new Date(dt1).valueOf();
|
|
132
|
+
const d2 = new Date(dt2).valueOf();
|
|
133
|
+
if (!(d1 && d2))
|
|
134
|
+
return;
|
|
135
|
+
return d1 - d2;
|
|
136
|
+
}
|
|
137
|
+
function compareIsoDateTime(dt1, dt2) {
|
|
138
|
+
if (!(dt1 && dt2))
|
|
139
|
+
return;
|
|
140
|
+
const [d1, t1] = dt1.split(DATE_TIME_SEPARATOR);
|
|
141
|
+
const [d2, t2] = dt2.split(DATE_TIME_SEPARATOR);
|
|
142
|
+
const res = compareDate(d1, d2);
|
|
143
|
+
if (res === undefined)
|
|
144
|
+
return;
|
|
145
|
+
return res || compareTime(t1, t2);
|
|
146
|
+
}
|
|
147
|
+
var NOT_URI_FRAGMENT = /\/|:/;
|
|
148
|
+
var URI = /^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\?(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i;
|
|
149
|
+
function uri(str) {
|
|
150
|
+
return NOT_URI_FRAGMENT.test(str) && URI.test(str);
|
|
151
|
+
}
|
|
152
|
+
var BYTE = /^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/gm;
|
|
153
|
+
function byte(str) {
|
|
154
|
+
BYTE.lastIndex = 0;
|
|
155
|
+
return BYTE.test(str);
|
|
156
|
+
}
|
|
157
|
+
var MIN_INT32 = -(2 ** 31);
|
|
158
|
+
var MAX_INT32 = 2 ** 31 - 1;
|
|
159
|
+
function validateInt32(value) {
|
|
160
|
+
return Number.isInteger(value) && value <= MAX_INT32 && value >= MIN_INT32;
|
|
161
|
+
}
|
|
162
|
+
function validateInt64(value) {
|
|
163
|
+
return Number.isInteger(value);
|
|
164
|
+
}
|
|
165
|
+
function validateNumber() {
|
|
166
|
+
return true;
|
|
167
|
+
}
|
|
168
|
+
var Z_ANCHOR = /[^\\]\\Z/;
|
|
169
|
+
function regex(str) {
|
|
170
|
+
if (Z_ANCHOR.test(str))
|
|
171
|
+
return false;
|
|
172
|
+
try {
|
|
173
|
+
new RegExp(str);
|
|
174
|
+
return true;
|
|
175
|
+
} catch (e) {
|
|
176
|
+
return false;
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
});
|
|
180
|
+
|
|
181
|
+
// ../../node_modules/.bun/ajv@8.20.0/node_modules/ajv/dist/runtime/ucs2length.js
|
|
182
|
+
var require_ucs2length = __commonJS(function(exports) {
|
|
183
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
184
|
+
function ucs2length(str) {
|
|
185
|
+
const len = str.length;
|
|
186
|
+
let length = 0;
|
|
187
|
+
let pos = 0;
|
|
188
|
+
let value;
|
|
189
|
+
while (pos < len) {
|
|
190
|
+
length++;
|
|
191
|
+
value = str.charCodeAt(pos++);
|
|
192
|
+
if (value >= 55296 && value <= 56319 && pos < len) {
|
|
193
|
+
value = str.charCodeAt(pos);
|
|
194
|
+
if ((value & 64512) === 56320)
|
|
195
|
+
pos++;
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
return length;
|
|
199
|
+
}
|
|
200
|
+
exports.default = ucs2length;
|
|
201
|
+
ucs2length.code = 'require("ajv/dist/runtime/ucs2length").default';
|
|
202
|
+
});
|
|
203
|
+
|
|
204
|
+
// scripts/.compile-validator/validator.cjs
|
|
205
|
+
var require_validator = __commonJS(function(exports, module) {
|
|
206
|
+
module.exports = validate20;
|
|
207
|
+
module.exports.default = validate20;
|
|
208
|
+
var schema32 = { type: "object", additionalProperties: false, required: ["name", "description", "homepage", "icon"], properties: { name: { type: "string", minLength: 1, maxLength: 100, description: "Display name of this catalog source." }, description: { type: "string", minLength: 1, maxLength: 300 }, homepage: { type: ["string", "null"], format: "uri" }, icon: { type: ["string", "null"], format: "uri", description: "Square source icon for the companion's source list." } } };
|
|
209
|
+
var schema40 = { type: "object", additionalProperties: false, required: ["name", "url", "description", "attested"], properties: { name: { type: "string", minLength: 1, maxLength: 100 }, url: { type: "string", format: "uri", description: "A catalog.v1 manifest URL the companion can subscribe to." }, description: { type: ["string", "null"], maxLength: 300 }, attested: { type: "boolean", description: "True if the publishing source vouches for this URL. Editorial signal, not a trust boundary." } } };
|
|
210
|
+
var formats0 = require_formats().fullFormats.uri;
|
|
211
|
+
var formats2 = require_formats().fullFormats["date-time"];
|
|
212
|
+
var func1 = require_ucs2length().default;
|
|
213
|
+
var schema33 = { type: "object", additionalProperties: false, required: ["id", "name", "description", "author", "icon", "homepage", "source", "versions"], properties: { id: { $ref: "#/$defs/Uuid" }, name: { type: "string", minLength: 1, maxLength: 100, description: "Display name." }, description: { type: "string", minLength: 1, maxLength: 300, description: "One-line tagline for store cards." }, author: { type: "string", minLength: 1, maxLength: 100 }, icon: { type: ["string", "null"], format: "uri", description: "Hosted square icon. The publish step extracts the bundle's icon and uploads it; null until then." }, homepage: { type: ["string", "null"], format: "uri" }, source: { type: ["string", "null"], format: "uri", description: "Repository or source URL, for users who want to check it themselves." }, versions: { type: "array", minItems: 1, items: { $ref: "#/$defs/AppVersion" }, description: "Published versions, newest-first. The companion installs the newest version compatible with the connected device." } } };
|
|
214
|
+
var formats8 = /^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i;
|
|
215
|
+
var schema35 = { type: "object", additionalProperties: false, required: ["version", "released_at", "download", "permissions", "min_libbridgething_version", "changelog"], properties: { version: { $ref: "#/$defs/Version" }, released_at: { type: "string", format: "date-time" }, download: { $ref: "#/$defs/Download" }, permissions: { type: "array", items: { type: "string", minLength: 1 }, uniqueItems: true, description: "Permission catalog keys this version requests (net.fetch, geo, ...). Shown at install, informational, never a gate." }, role: { enum: ["standard", "launcher"], description: "Mirrors the bundle manifest's role. A launcher can take the device's launcher slot and replace the built-in hub. Absent means standard." }, provides_overlay: { type: "boolean", description: "Whether this version ships an overlay the device can inject over every webapp. Absent means it does not." }, min_libbridgething_version: { $ref: "#/$defs/Semver" }, changelog: { type: ["string", "null"], description: "Markdown changelog for this version." } } };
|
|
216
|
+
var pattern4 = new RegExp("^[A-Za-z0-9](?:[A-Za-z0-9.+\\-]*[A-Za-z0-9])?$", "u");
|
|
217
|
+
var pattern6 = new RegExp("^[0-9]+\\.[0-9]+\\.[0-9]+(?:[.+\\-][0-9A-Za-z.\\-]+)?$", "u");
|
|
218
|
+
var pattern5 = new RegExp("^[a-f0-9]{64}$", "u");
|
|
219
|
+
function validate23(data, { instancePath = "", parentData, parentDataProperty, rootData = data, dynamicAnchors = {} } = {}) {
|
|
220
|
+
let vErrors = null;
|
|
221
|
+
let errors = 0;
|
|
222
|
+
const evaluated0 = validate23.evaluated;
|
|
223
|
+
if (evaluated0.dynamicProps) {
|
|
224
|
+
evaluated0.props = undefined;
|
|
225
|
+
}
|
|
226
|
+
if (evaluated0.dynamicItems) {
|
|
227
|
+
evaluated0.items = undefined;
|
|
228
|
+
}
|
|
229
|
+
if (data && typeof data == "object" && !Array.isArray(data)) {
|
|
230
|
+
if (data.url === undefined) {
|
|
231
|
+
const err0 = { instancePath, schemaPath: "#/required", keyword: "required", params: { missingProperty: "url" }, message: "must have required property '" + "url" + "'" };
|
|
232
|
+
if (vErrors === null) {
|
|
233
|
+
vErrors = [err0];
|
|
234
|
+
} else {
|
|
235
|
+
vErrors.push(err0);
|
|
236
|
+
}
|
|
237
|
+
errors++;
|
|
238
|
+
}
|
|
239
|
+
if (data.size === undefined) {
|
|
240
|
+
const err1 = { instancePath, schemaPath: "#/required", keyword: "required", params: { missingProperty: "size" }, message: "must have required property '" + "size" + "'" };
|
|
241
|
+
if (vErrors === null) {
|
|
242
|
+
vErrors = [err1];
|
|
243
|
+
} else {
|
|
244
|
+
vErrors.push(err1);
|
|
245
|
+
}
|
|
246
|
+
errors++;
|
|
247
|
+
}
|
|
248
|
+
if (data.sha256 === undefined) {
|
|
249
|
+
const err2 = { instancePath, schemaPath: "#/required", keyword: "required", params: { missingProperty: "sha256" }, message: "must have required property '" + "sha256" + "'" };
|
|
250
|
+
if (vErrors === null) {
|
|
251
|
+
vErrors = [err2];
|
|
252
|
+
} else {
|
|
253
|
+
vErrors.push(err2);
|
|
254
|
+
}
|
|
255
|
+
errors++;
|
|
256
|
+
}
|
|
257
|
+
for (const key0 in data) {
|
|
258
|
+
if (!(key0 === "url" || key0 === "size" || key0 === "sha256")) {
|
|
259
|
+
const err3 = { instancePath, schemaPath: "#/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key0 }, message: "must NOT have additional properties" };
|
|
260
|
+
if (vErrors === null) {
|
|
261
|
+
vErrors = [err3];
|
|
262
|
+
} else {
|
|
263
|
+
vErrors.push(err3);
|
|
264
|
+
}
|
|
265
|
+
errors++;
|
|
266
|
+
}
|
|
267
|
+
}
|
|
268
|
+
if (data.url !== undefined) {
|
|
269
|
+
let data0 = data.url;
|
|
270
|
+
if (typeof data0 === "string") {
|
|
271
|
+
if (!formats0(data0)) {
|
|
272
|
+
const err4 = { instancePath: instancePath + "/url", schemaPath: "#/properties/url/format", keyword: "format", params: { format: "uri" }, message: 'must match format "' + "uri" + '"' };
|
|
273
|
+
if (vErrors === null) {
|
|
274
|
+
vErrors = [err4];
|
|
275
|
+
} else {
|
|
276
|
+
vErrors.push(err4);
|
|
277
|
+
}
|
|
278
|
+
errors++;
|
|
279
|
+
}
|
|
280
|
+
} else {
|
|
281
|
+
const err5 = { instancePath: instancePath + "/url", schemaPath: "#/properties/url/type", keyword: "type", params: { type: "string" }, message: "must be string" };
|
|
282
|
+
if (vErrors === null) {
|
|
283
|
+
vErrors = [err5];
|
|
284
|
+
} else {
|
|
285
|
+
vErrors.push(err5);
|
|
286
|
+
}
|
|
287
|
+
errors++;
|
|
288
|
+
}
|
|
289
|
+
}
|
|
290
|
+
if (data.size !== undefined) {
|
|
291
|
+
let data1 = data.size;
|
|
292
|
+
if (!(typeof data1 == "number" && (!(data1 % 1) && !isNaN(data1)))) {
|
|
293
|
+
const err6 = { instancePath: instancePath + "/size", schemaPath: "#/properties/size/type", keyword: "type", params: { type: "integer" }, message: "must be integer" };
|
|
294
|
+
if (vErrors === null) {
|
|
295
|
+
vErrors = [err6];
|
|
296
|
+
} else {
|
|
297
|
+
vErrors.push(err6);
|
|
298
|
+
}
|
|
299
|
+
errors++;
|
|
300
|
+
}
|
|
301
|
+
if (typeof data1 == "number") {
|
|
302
|
+
if (data1 < 0 || isNaN(data1)) {
|
|
303
|
+
const err7 = { instancePath: instancePath + "/size", schemaPath: "#/properties/size/minimum", keyword: "minimum", params: { comparison: ">=", limit: 0 }, message: "must be >= 0" };
|
|
304
|
+
if (vErrors === null) {
|
|
305
|
+
vErrors = [err7];
|
|
306
|
+
} else {
|
|
307
|
+
vErrors.push(err7);
|
|
308
|
+
}
|
|
309
|
+
errors++;
|
|
310
|
+
}
|
|
311
|
+
}
|
|
312
|
+
}
|
|
313
|
+
if (data.sha256 !== undefined) {
|
|
314
|
+
let data2 = data.sha256;
|
|
315
|
+
if (typeof data2 === "string") {
|
|
316
|
+
if (!pattern5.test(data2)) {
|
|
317
|
+
const err8 = { instancePath: instancePath + "/sha256", schemaPath: "#/$defs/Sha256/pattern", keyword: "pattern", params: { pattern: "^[a-f0-9]{64}$" }, message: 'must match pattern "' + "^[a-f0-9]{64}$" + '"' };
|
|
318
|
+
if (vErrors === null) {
|
|
319
|
+
vErrors = [err8];
|
|
320
|
+
} else {
|
|
321
|
+
vErrors.push(err8);
|
|
322
|
+
}
|
|
323
|
+
errors++;
|
|
324
|
+
}
|
|
325
|
+
} else {
|
|
326
|
+
const err9 = { instancePath: instancePath + "/sha256", schemaPath: "#/$defs/Sha256/type", keyword: "type", params: { type: "string" }, message: "must be string" };
|
|
327
|
+
if (vErrors === null) {
|
|
328
|
+
vErrors = [err9];
|
|
329
|
+
} else {
|
|
330
|
+
vErrors.push(err9);
|
|
331
|
+
}
|
|
332
|
+
errors++;
|
|
333
|
+
}
|
|
334
|
+
}
|
|
335
|
+
} else {
|
|
336
|
+
const err10 = { instancePath, schemaPath: "#/type", keyword: "type", params: { type: "object" }, message: "must be object" };
|
|
337
|
+
if (vErrors === null) {
|
|
338
|
+
vErrors = [err10];
|
|
339
|
+
} else {
|
|
340
|
+
vErrors.push(err10);
|
|
341
|
+
}
|
|
342
|
+
errors++;
|
|
343
|
+
}
|
|
344
|
+
validate23.errors = vErrors;
|
|
345
|
+
return errors === 0;
|
|
346
|
+
}
|
|
347
|
+
validate23.evaluated = { props: true, dynamicProps: false, dynamicItems: false };
|
|
348
|
+
function validate22(data, { instancePath = "", parentData, parentDataProperty, rootData = data, dynamicAnchors = {} } = {}) {
|
|
349
|
+
let vErrors = null;
|
|
350
|
+
let errors = 0;
|
|
351
|
+
const evaluated0 = validate22.evaluated;
|
|
352
|
+
if (evaluated0.dynamicProps) {
|
|
353
|
+
evaluated0.props = undefined;
|
|
354
|
+
}
|
|
355
|
+
if (evaluated0.dynamicItems) {
|
|
356
|
+
evaluated0.items = undefined;
|
|
357
|
+
}
|
|
358
|
+
if (data && typeof data == "object" && !Array.isArray(data)) {
|
|
359
|
+
if (data.version === undefined) {
|
|
360
|
+
const err0 = { instancePath, schemaPath: "#/required", keyword: "required", params: { missingProperty: "version" }, message: "must have required property '" + "version" + "'" };
|
|
361
|
+
if (vErrors === null) {
|
|
362
|
+
vErrors = [err0];
|
|
363
|
+
} else {
|
|
364
|
+
vErrors.push(err0);
|
|
365
|
+
}
|
|
366
|
+
errors++;
|
|
367
|
+
}
|
|
368
|
+
if (data.released_at === undefined) {
|
|
369
|
+
const err1 = { instancePath, schemaPath: "#/required", keyword: "required", params: { missingProperty: "released_at" }, message: "must have required property '" + "released_at" + "'" };
|
|
370
|
+
if (vErrors === null) {
|
|
371
|
+
vErrors = [err1];
|
|
372
|
+
} else {
|
|
373
|
+
vErrors.push(err1);
|
|
374
|
+
}
|
|
375
|
+
errors++;
|
|
376
|
+
}
|
|
377
|
+
if (data.download === undefined) {
|
|
378
|
+
const err2 = { instancePath, schemaPath: "#/required", keyword: "required", params: { missingProperty: "download" }, message: "must have required property '" + "download" + "'" };
|
|
379
|
+
if (vErrors === null) {
|
|
380
|
+
vErrors = [err2];
|
|
381
|
+
} else {
|
|
382
|
+
vErrors.push(err2);
|
|
383
|
+
}
|
|
384
|
+
errors++;
|
|
385
|
+
}
|
|
386
|
+
if (data.permissions === undefined) {
|
|
387
|
+
const err3 = { instancePath, schemaPath: "#/required", keyword: "required", params: { missingProperty: "permissions" }, message: "must have required property '" + "permissions" + "'" };
|
|
388
|
+
if (vErrors === null) {
|
|
389
|
+
vErrors = [err3];
|
|
390
|
+
} else {
|
|
391
|
+
vErrors.push(err3);
|
|
392
|
+
}
|
|
393
|
+
errors++;
|
|
394
|
+
}
|
|
395
|
+
if (data.min_libbridgething_version === undefined) {
|
|
396
|
+
const err4 = { instancePath, schemaPath: "#/required", keyword: "required", params: { missingProperty: "min_libbridgething_version" }, message: "must have required property '" + "min_libbridgething_version" + "'" };
|
|
397
|
+
if (vErrors === null) {
|
|
398
|
+
vErrors = [err4];
|
|
399
|
+
} else {
|
|
400
|
+
vErrors.push(err4);
|
|
401
|
+
}
|
|
402
|
+
errors++;
|
|
403
|
+
}
|
|
404
|
+
if (data.changelog === undefined) {
|
|
405
|
+
const err5 = { instancePath, schemaPath: "#/required", keyword: "required", params: { missingProperty: "changelog" }, message: "must have required property '" + "changelog" + "'" };
|
|
406
|
+
if (vErrors === null) {
|
|
407
|
+
vErrors = [err5];
|
|
408
|
+
} else {
|
|
409
|
+
vErrors.push(err5);
|
|
410
|
+
}
|
|
411
|
+
errors++;
|
|
412
|
+
}
|
|
413
|
+
for (const key0 in data) {
|
|
414
|
+
if (!(key0 === "version" || key0 === "released_at" || key0 === "download" || key0 === "permissions" || key0 === "role" || key0 === "provides_overlay" || key0 === "min_libbridgething_version" || key0 === "changelog")) {
|
|
415
|
+
const err6 = { instancePath, schemaPath: "#/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key0 }, message: "must NOT have additional properties" };
|
|
416
|
+
if (vErrors === null) {
|
|
417
|
+
vErrors = [err6];
|
|
418
|
+
} else {
|
|
419
|
+
vErrors.push(err6);
|
|
420
|
+
}
|
|
421
|
+
errors++;
|
|
422
|
+
}
|
|
423
|
+
}
|
|
424
|
+
if (data.version !== undefined) {
|
|
425
|
+
let data0 = data.version;
|
|
426
|
+
if (typeof data0 === "string") {
|
|
427
|
+
if (func1(data0) > 100) {
|
|
428
|
+
const err7 = { instancePath: instancePath + "/version", schemaPath: "#/$defs/Version/maxLength", keyword: "maxLength", params: { limit: 100 }, message: "must NOT have more than 100 characters" };
|
|
429
|
+
if (vErrors === null) {
|
|
430
|
+
vErrors = [err7];
|
|
431
|
+
} else {
|
|
432
|
+
vErrors.push(err7);
|
|
433
|
+
}
|
|
434
|
+
errors++;
|
|
435
|
+
}
|
|
436
|
+
if (func1(data0) < 1) {
|
|
437
|
+
const err8 = { instancePath: instancePath + "/version", schemaPath: "#/$defs/Version/minLength", keyword: "minLength", params: { limit: 1 }, message: "must NOT have fewer than 1 characters" };
|
|
438
|
+
if (vErrors === null) {
|
|
439
|
+
vErrors = [err8];
|
|
440
|
+
} else {
|
|
441
|
+
vErrors.push(err8);
|
|
442
|
+
}
|
|
443
|
+
errors++;
|
|
444
|
+
}
|
|
445
|
+
if (!pattern4.test(data0)) {
|
|
446
|
+
const err9 = { instancePath: instancePath + "/version", schemaPath: "#/$defs/Version/pattern", keyword: "pattern", params: { pattern: "^[A-Za-z0-9](?:[A-Za-z0-9.+\\-]*[A-Za-z0-9])?$" }, message: 'must match pattern "' + "^[A-Za-z0-9](?:[A-Za-z0-9.+\\-]*[A-Za-z0-9])?$" + '"' };
|
|
447
|
+
if (vErrors === null) {
|
|
448
|
+
vErrors = [err9];
|
|
449
|
+
} else {
|
|
450
|
+
vErrors.push(err9);
|
|
451
|
+
}
|
|
452
|
+
errors++;
|
|
453
|
+
}
|
|
454
|
+
} else {
|
|
455
|
+
const err10 = { instancePath: instancePath + "/version", schemaPath: "#/$defs/Version/type", keyword: "type", params: { type: "string" }, message: "must be string" };
|
|
456
|
+
if (vErrors === null) {
|
|
457
|
+
vErrors = [err10];
|
|
458
|
+
} else {
|
|
459
|
+
vErrors.push(err10);
|
|
460
|
+
}
|
|
461
|
+
errors++;
|
|
462
|
+
}
|
|
463
|
+
}
|
|
464
|
+
if (data.released_at !== undefined) {
|
|
465
|
+
let data1 = data.released_at;
|
|
466
|
+
if (typeof data1 === "string") {
|
|
467
|
+
if (!formats2.validate(data1)) {
|
|
468
|
+
const err11 = { instancePath: instancePath + "/released_at", schemaPath: "#/properties/released_at/format", keyword: "format", params: { format: "date-time" }, message: 'must match format "' + "date-time" + '"' };
|
|
469
|
+
if (vErrors === null) {
|
|
470
|
+
vErrors = [err11];
|
|
471
|
+
} else {
|
|
472
|
+
vErrors.push(err11);
|
|
473
|
+
}
|
|
474
|
+
errors++;
|
|
475
|
+
}
|
|
476
|
+
} else {
|
|
477
|
+
const err12 = { instancePath: instancePath + "/released_at", schemaPath: "#/properties/released_at/type", keyword: "type", params: { type: "string" }, message: "must be string" };
|
|
478
|
+
if (vErrors === null) {
|
|
479
|
+
vErrors = [err12];
|
|
480
|
+
} else {
|
|
481
|
+
vErrors.push(err12);
|
|
482
|
+
}
|
|
483
|
+
errors++;
|
|
484
|
+
}
|
|
485
|
+
}
|
|
486
|
+
if (data.download !== undefined) {
|
|
487
|
+
if (!validate23(data.download, { instancePath: instancePath + "/download", parentData: data, parentDataProperty: "download", rootData, dynamicAnchors })) {
|
|
488
|
+
vErrors = vErrors === null ? validate23.errors : vErrors.concat(validate23.errors);
|
|
489
|
+
errors = vErrors.length;
|
|
490
|
+
}
|
|
491
|
+
}
|
|
492
|
+
if (data.permissions !== undefined) {
|
|
493
|
+
let data3 = data.permissions;
|
|
494
|
+
if (Array.isArray(data3)) {
|
|
495
|
+
const len0 = data3.length;
|
|
496
|
+
for (let i0 = 0;i0 < len0; i0++) {
|
|
497
|
+
let data4 = data3[i0];
|
|
498
|
+
if (typeof data4 === "string") {
|
|
499
|
+
if (func1(data4) < 1) {
|
|
500
|
+
const err13 = { instancePath: instancePath + "/permissions/" + i0, schemaPath: "#/properties/permissions/items/minLength", keyword: "minLength", params: { limit: 1 }, message: "must NOT have fewer than 1 characters" };
|
|
501
|
+
if (vErrors === null) {
|
|
502
|
+
vErrors = [err13];
|
|
503
|
+
} else {
|
|
504
|
+
vErrors.push(err13);
|
|
505
|
+
}
|
|
506
|
+
errors++;
|
|
507
|
+
}
|
|
508
|
+
} else {
|
|
509
|
+
const err14 = { instancePath: instancePath + "/permissions/" + i0, schemaPath: "#/properties/permissions/items/type", keyword: "type", params: { type: "string" }, message: "must be string" };
|
|
510
|
+
if (vErrors === null) {
|
|
511
|
+
vErrors = [err14];
|
|
512
|
+
} else {
|
|
513
|
+
vErrors.push(err14);
|
|
514
|
+
}
|
|
515
|
+
errors++;
|
|
516
|
+
}
|
|
517
|
+
}
|
|
518
|
+
let i1 = data3.length;
|
|
519
|
+
let j0;
|
|
520
|
+
if (i1 > 1) {
|
|
521
|
+
const indices0 = {};
|
|
522
|
+
for (;i1--; ) {
|
|
523
|
+
let item0 = data3[i1];
|
|
524
|
+
if (typeof item0 !== "string") {
|
|
525
|
+
continue;
|
|
526
|
+
}
|
|
527
|
+
if (typeof indices0[item0] == "number") {
|
|
528
|
+
j0 = indices0[item0];
|
|
529
|
+
const err15 = { instancePath: instancePath + "/permissions", schemaPath: "#/properties/permissions/uniqueItems", keyword: "uniqueItems", params: { i: i1, j: j0 }, message: "must NOT have duplicate items (items ## " + j0 + " and " + i1 + " are identical)" };
|
|
530
|
+
if (vErrors === null) {
|
|
531
|
+
vErrors = [err15];
|
|
532
|
+
} else {
|
|
533
|
+
vErrors.push(err15);
|
|
534
|
+
}
|
|
535
|
+
errors++;
|
|
536
|
+
break;
|
|
537
|
+
}
|
|
538
|
+
indices0[item0] = i1;
|
|
539
|
+
}
|
|
540
|
+
}
|
|
541
|
+
} else {
|
|
542
|
+
const err16 = { instancePath: instancePath + "/permissions", schemaPath: "#/properties/permissions/type", keyword: "type", params: { type: "array" }, message: "must be array" };
|
|
543
|
+
if (vErrors === null) {
|
|
544
|
+
vErrors = [err16];
|
|
545
|
+
} else {
|
|
546
|
+
vErrors.push(err16);
|
|
547
|
+
}
|
|
548
|
+
errors++;
|
|
549
|
+
}
|
|
550
|
+
}
|
|
551
|
+
if (data.role !== undefined) {
|
|
552
|
+
let data5 = data.role;
|
|
553
|
+
if (!(data5 === "standard" || data5 === "launcher")) {
|
|
554
|
+
const err17 = { instancePath: instancePath + "/role", schemaPath: "#/properties/role/enum", keyword: "enum", params: { allowedValues: schema35.properties.role.enum }, message: "must be equal to one of the allowed values" };
|
|
555
|
+
if (vErrors === null) {
|
|
556
|
+
vErrors = [err17];
|
|
557
|
+
} else {
|
|
558
|
+
vErrors.push(err17);
|
|
559
|
+
}
|
|
560
|
+
errors++;
|
|
561
|
+
}
|
|
562
|
+
}
|
|
563
|
+
if (data.provides_overlay !== undefined) {
|
|
564
|
+
if (typeof data.provides_overlay !== "boolean") {
|
|
565
|
+
const err18 = { instancePath: instancePath + "/provides_overlay", schemaPath: "#/properties/provides_overlay/type", keyword: "type", params: { type: "boolean" }, message: "must be boolean" };
|
|
566
|
+
if (vErrors === null) {
|
|
567
|
+
vErrors = [err18];
|
|
568
|
+
} else {
|
|
569
|
+
vErrors.push(err18);
|
|
570
|
+
}
|
|
571
|
+
errors++;
|
|
572
|
+
}
|
|
573
|
+
}
|
|
574
|
+
if (data.min_libbridgething_version !== undefined) {
|
|
575
|
+
let data7 = data.min_libbridgething_version;
|
|
576
|
+
if (typeof data7 === "string") {
|
|
577
|
+
if (!pattern6.test(data7)) {
|
|
578
|
+
const err19 = { instancePath: instancePath + "/min_libbridgething_version", schemaPath: "#/$defs/Semver/pattern", keyword: "pattern", params: { pattern: "^[0-9]+\\.[0-9]+\\.[0-9]+(?:[.+\\-][0-9A-Za-z.\\-]+)?$" }, message: 'must match pattern "' + "^[0-9]+\\.[0-9]+\\.[0-9]+(?:[.+\\-][0-9A-Za-z.\\-]+)?$" + '"' };
|
|
579
|
+
if (vErrors === null) {
|
|
580
|
+
vErrors = [err19];
|
|
581
|
+
} else {
|
|
582
|
+
vErrors.push(err19);
|
|
583
|
+
}
|
|
584
|
+
errors++;
|
|
585
|
+
}
|
|
586
|
+
} else {
|
|
587
|
+
const err20 = { instancePath: instancePath + "/min_libbridgething_version", schemaPath: "#/$defs/Semver/type", keyword: "type", params: { type: "string" }, message: "must be string" };
|
|
588
|
+
if (vErrors === null) {
|
|
589
|
+
vErrors = [err20];
|
|
590
|
+
} else {
|
|
591
|
+
vErrors.push(err20);
|
|
592
|
+
}
|
|
593
|
+
errors++;
|
|
594
|
+
}
|
|
595
|
+
}
|
|
596
|
+
if (data.changelog !== undefined) {
|
|
597
|
+
let data8 = data.changelog;
|
|
598
|
+
if (typeof data8 !== "string" && data8 !== null) {
|
|
599
|
+
const err21 = { instancePath: instancePath + "/changelog", schemaPath: "#/properties/changelog/type", keyword: "type", params: { type: schema35.properties.changelog.type }, message: "must be string,null" };
|
|
600
|
+
if (vErrors === null) {
|
|
601
|
+
vErrors = [err21];
|
|
602
|
+
} else {
|
|
603
|
+
vErrors.push(err21);
|
|
604
|
+
}
|
|
605
|
+
errors++;
|
|
606
|
+
}
|
|
607
|
+
}
|
|
608
|
+
} else {
|
|
609
|
+
const err22 = { instancePath, schemaPath: "#/type", keyword: "type", params: { type: "object" }, message: "must be object" };
|
|
610
|
+
if (vErrors === null) {
|
|
611
|
+
vErrors = [err22];
|
|
612
|
+
} else {
|
|
613
|
+
vErrors.push(err22);
|
|
614
|
+
}
|
|
615
|
+
errors++;
|
|
616
|
+
}
|
|
617
|
+
validate22.errors = vErrors;
|
|
618
|
+
return errors === 0;
|
|
619
|
+
}
|
|
620
|
+
validate22.evaluated = { props: true, dynamicProps: false, dynamicItems: false };
|
|
621
|
+
function validate21(data, { instancePath = "", parentData, parentDataProperty, rootData = data, dynamicAnchors = {} } = {}) {
|
|
622
|
+
let vErrors = null;
|
|
623
|
+
let errors = 0;
|
|
624
|
+
const evaluated0 = validate21.evaluated;
|
|
625
|
+
if (evaluated0.dynamicProps) {
|
|
626
|
+
evaluated0.props = undefined;
|
|
627
|
+
}
|
|
628
|
+
if (evaluated0.dynamicItems) {
|
|
629
|
+
evaluated0.items = undefined;
|
|
630
|
+
}
|
|
631
|
+
if (data && typeof data == "object" && !Array.isArray(data)) {
|
|
632
|
+
if (data.id === undefined) {
|
|
633
|
+
const err0 = { instancePath, schemaPath: "#/required", keyword: "required", params: { missingProperty: "id" }, message: "must have required property '" + "id" + "'" };
|
|
634
|
+
if (vErrors === null) {
|
|
635
|
+
vErrors = [err0];
|
|
636
|
+
} else {
|
|
637
|
+
vErrors.push(err0);
|
|
638
|
+
}
|
|
639
|
+
errors++;
|
|
640
|
+
}
|
|
641
|
+
if (data.name === undefined) {
|
|
642
|
+
const err1 = { instancePath, schemaPath: "#/required", keyword: "required", params: { missingProperty: "name" }, message: "must have required property '" + "name" + "'" };
|
|
643
|
+
if (vErrors === null) {
|
|
644
|
+
vErrors = [err1];
|
|
645
|
+
} else {
|
|
646
|
+
vErrors.push(err1);
|
|
647
|
+
}
|
|
648
|
+
errors++;
|
|
649
|
+
}
|
|
650
|
+
if (data.description === undefined) {
|
|
651
|
+
const err2 = { instancePath, schemaPath: "#/required", keyword: "required", params: { missingProperty: "description" }, message: "must have required property '" + "description" + "'" };
|
|
652
|
+
if (vErrors === null) {
|
|
653
|
+
vErrors = [err2];
|
|
654
|
+
} else {
|
|
655
|
+
vErrors.push(err2);
|
|
656
|
+
}
|
|
657
|
+
errors++;
|
|
658
|
+
}
|
|
659
|
+
if (data.author === undefined) {
|
|
660
|
+
const err3 = { instancePath, schemaPath: "#/required", keyword: "required", params: { missingProperty: "author" }, message: "must have required property '" + "author" + "'" };
|
|
661
|
+
if (vErrors === null) {
|
|
662
|
+
vErrors = [err3];
|
|
663
|
+
} else {
|
|
664
|
+
vErrors.push(err3);
|
|
665
|
+
}
|
|
666
|
+
errors++;
|
|
667
|
+
}
|
|
668
|
+
if (data.icon === undefined) {
|
|
669
|
+
const err4 = { instancePath, schemaPath: "#/required", keyword: "required", params: { missingProperty: "icon" }, message: "must have required property '" + "icon" + "'" };
|
|
670
|
+
if (vErrors === null) {
|
|
671
|
+
vErrors = [err4];
|
|
672
|
+
} else {
|
|
673
|
+
vErrors.push(err4);
|
|
674
|
+
}
|
|
675
|
+
errors++;
|
|
676
|
+
}
|
|
677
|
+
if (data.homepage === undefined) {
|
|
678
|
+
const err5 = { instancePath, schemaPath: "#/required", keyword: "required", params: { missingProperty: "homepage" }, message: "must have required property '" + "homepage" + "'" };
|
|
679
|
+
if (vErrors === null) {
|
|
680
|
+
vErrors = [err5];
|
|
681
|
+
} else {
|
|
682
|
+
vErrors.push(err5);
|
|
683
|
+
}
|
|
684
|
+
errors++;
|
|
685
|
+
}
|
|
686
|
+
if (data.source === undefined) {
|
|
687
|
+
const err6 = { instancePath, schemaPath: "#/required", keyword: "required", params: { missingProperty: "source" }, message: "must have required property '" + "source" + "'" };
|
|
688
|
+
if (vErrors === null) {
|
|
689
|
+
vErrors = [err6];
|
|
690
|
+
} else {
|
|
691
|
+
vErrors.push(err6);
|
|
692
|
+
}
|
|
693
|
+
errors++;
|
|
694
|
+
}
|
|
695
|
+
if (data.versions === undefined) {
|
|
696
|
+
const err7 = { instancePath, schemaPath: "#/required", keyword: "required", params: { missingProperty: "versions" }, message: "must have required property '" + "versions" + "'" };
|
|
697
|
+
if (vErrors === null) {
|
|
698
|
+
vErrors = [err7];
|
|
699
|
+
} else {
|
|
700
|
+
vErrors.push(err7);
|
|
701
|
+
}
|
|
702
|
+
errors++;
|
|
703
|
+
}
|
|
704
|
+
for (const key0 in data) {
|
|
705
|
+
if (!(key0 === "id" || key0 === "name" || key0 === "description" || key0 === "author" || key0 === "icon" || key0 === "homepage" || key0 === "source" || key0 === "versions")) {
|
|
706
|
+
const err8 = { instancePath, schemaPath: "#/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key0 }, message: "must NOT have additional properties" };
|
|
707
|
+
if (vErrors === null) {
|
|
708
|
+
vErrors = [err8];
|
|
709
|
+
} else {
|
|
710
|
+
vErrors.push(err8);
|
|
711
|
+
}
|
|
712
|
+
errors++;
|
|
713
|
+
}
|
|
714
|
+
}
|
|
715
|
+
if (data.id !== undefined) {
|
|
716
|
+
let data0 = data.id;
|
|
717
|
+
if (typeof data0 === "string") {
|
|
718
|
+
if (!formats8.test(data0)) {
|
|
719
|
+
const err9 = { instancePath: instancePath + "/id", schemaPath: "#/$defs/Uuid/format", keyword: "format", params: { format: "uuid" }, message: 'must match format "' + "uuid" + '"' };
|
|
720
|
+
if (vErrors === null) {
|
|
721
|
+
vErrors = [err9];
|
|
722
|
+
} else {
|
|
723
|
+
vErrors.push(err9);
|
|
724
|
+
}
|
|
725
|
+
errors++;
|
|
726
|
+
}
|
|
727
|
+
} else {
|
|
728
|
+
const err10 = { instancePath: instancePath + "/id", schemaPath: "#/$defs/Uuid/type", keyword: "type", params: { type: "string" }, message: "must be string" };
|
|
729
|
+
if (vErrors === null) {
|
|
730
|
+
vErrors = [err10];
|
|
731
|
+
} else {
|
|
732
|
+
vErrors.push(err10);
|
|
733
|
+
}
|
|
734
|
+
errors++;
|
|
735
|
+
}
|
|
736
|
+
}
|
|
737
|
+
if (data.name !== undefined) {
|
|
738
|
+
let data1 = data.name;
|
|
739
|
+
if (typeof data1 === "string") {
|
|
740
|
+
if (func1(data1) > 100) {
|
|
741
|
+
const err11 = { instancePath: instancePath + "/name", schemaPath: "#/properties/name/maxLength", keyword: "maxLength", params: { limit: 100 }, message: "must NOT have more than 100 characters" };
|
|
742
|
+
if (vErrors === null) {
|
|
743
|
+
vErrors = [err11];
|
|
744
|
+
} else {
|
|
745
|
+
vErrors.push(err11);
|
|
746
|
+
}
|
|
747
|
+
errors++;
|
|
748
|
+
}
|
|
749
|
+
if (func1(data1) < 1) {
|
|
750
|
+
const err12 = { instancePath: instancePath + "/name", schemaPath: "#/properties/name/minLength", keyword: "minLength", params: { limit: 1 }, message: "must NOT have fewer than 1 characters" };
|
|
751
|
+
if (vErrors === null) {
|
|
752
|
+
vErrors = [err12];
|
|
753
|
+
} else {
|
|
754
|
+
vErrors.push(err12);
|
|
755
|
+
}
|
|
756
|
+
errors++;
|
|
757
|
+
}
|
|
758
|
+
} else {
|
|
759
|
+
const err13 = { instancePath: instancePath + "/name", schemaPath: "#/properties/name/type", keyword: "type", params: { type: "string" }, message: "must be string" };
|
|
760
|
+
if (vErrors === null) {
|
|
761
|
+
vErrors = [err13];
|
|
762
|
+
} else {
|
|
763
|
+
vErrors.push(err13);
|
|
764
|
+
}
|
|
765
|
+
errors++;
|
|
766
|
+
}
|
|
767
|
+
}
|
|
768
|
+
if (data.description !== undefined) {
|
|
769
|
+
let data2 = data.description;
|
|
770
|
+
if (typeof data2 === "string") {
|
|
771
|
+
if (func1(data2) > 300) {
|
|
772
|
+
const err14 = { instancePath: instancePath + "/description", schemaPath: "#/properties/description/maxLength", keyword: "maxLength", params: { limit: 300 }, message: "must NOT have more than 300 characters" };
|
|
773
|
+
if (vErrors === null) {
|
|
774
|
+
vErrors = [err14];
|
|
775
|
+
} else {
|
|
776
|
+
vErrors.push(err14);
|
|
777
|
+
}
|
|
778
|
+
errors++;
|
|
779
|
+
}
|
|
780
|
+
if (func1(data2) < 1) {
|
|
781
|
+
const err15 = { instancePath: instancePath + "/description", schemaPath: "#/properties/description/minLength", keyword: "minLength", params: { limit: 1 }, message: "must NOT have fewer than 1 characters" };
|
|
782
|
+
if (vErrors === null) {
|
|
783
|
+
vErrors = [err15];
|
|
784
|
+
} else {
|
|
785
|
+
vErrors.push(err15);
|
|
786
|
+
}
|
|
787
|
+
errors++;
|
|
788
|
+
}
|
|
789
|
+
} else {
|
|
790
|
+
const err16 = { instancePath: instancePath + "/description", schemaPath: "#/properties/description/type", keyword: "type", params: { type: "string" }, message: "must be string" };
|
|
791
|
+
if (vErrors === null) {
|
|
792
|
+
vErrors = [err16];
|
|
793
|
+
} else {
|
|
794
|
+
vErrors.push(err16);
|
|
795
|
+
}
|
|
796
|
+
errors++;
|
|
797
|
+
}
|
|
798
|
+
}
|
|
799
|
+
if (data.author !== undefined) {
|
|
800
|
+
let data3 = data.author;
|
|
801
|
+
if (typeof data3 === "string") {
|
|
802
|
+
if (func1(data3) > 100) {
|
|
803
|
+
const err17 = { instancePath: instancePath + "/author", schemaPath: "#/properties/author/maxLength", keyword: "maxLength", params: { limit: 100 }, message: "must NOT have more than 100 characters" };
|
|
804
|
+
if (vErrors === null) {
|
|
805
|
+
vErrors = [err17];
|
|
806
|
+
} else {
|
|
807
|
+
vErrors.push(err17);
|
|
808
|
+
}
|
|
809
|
+
errors++;
|
|
810
|
+
}
|
|
811
|
+
if (func1(data3) < 1) {
|
|
812
|
+
const err18 = { instancePath: instancePath + "/author", schemaPath: "#/properties/author/minLength", keyword: "minLength", params: { limit: 1 }, message: "must NOT have fewer than 1 characters" };
|
|
813
|
+
if (vErrors === null) {
|
|
814
|
+
vErrors = [err18];
|
|
815
|
+
} else {
|
|
816
|
+
vErrors.push(err18);
|
|
817
|
+
}
|
|
818
|
+
errors++;
|
|
819
|
+
}
|
|
820
|
+
} else {
|
|
821
|
+
const err19 = { instancePath: instancePath + "/author", schemaPath: "#/properties/author/type", keyword: "type", params: { type: "string" }, message: "must be string" };
|
|
822
|
+
if (vErrors === null) {
|
|
823
|
+
vErrors = [err19];
|
|
824
|
+
} else {
|
|
825
|
+
vErrors.push(err19);
|
|
826
|
+
}
|
|
827
|
+
errors++;
|
|
828
|
+
}
|
|
829
|
+
}
|
|
830
|
+
if (data.icon !== undefined) {
|
|
831
|
+
let data4 = data.icon;
|
|
832
|
+
if (typeof data4 !== "string" && data4 !== null) {
|
|
833
|
+
const err20 = { instancePath: instancePath + "/icon", schemaPath: "#/properties/icon/type", keyword: "type", params: { type: schema33.properties.icon.type }, message: "must be string,null" };
|
|
834
|
+
if (vErrors === null) {
|
|
835
|
+
vErrors = [err20];
|
|
836
|
+
} else {
|
|
837
|
+
vErrors.push(err20);
|
|
838
|
+
}
|
|
839
|
+
errors++;
|
|
840
|
+
}
|
|
841
|
+
if (typeof data4 === "string") {
|
|
842
|
+
if (!formats0(data4)) {
|
|
843
|
+
const err21 = { instancePath: instancePath + "/icon", schemaPath: "#/properties/icon/format", keyword: "format", params: { format: "uri" }, message: 'must match format "' + "uri" + '"' };
|
|
844
|
+
if (vErrors === null) {
|
|
845
|
+
vErrors = [err21];
|
|
846
|
+
} else {
|
|
847
|
+
vErrors.push(err21);
|
|
848
|
+
}
|
|
849
|
+
errors++;
|
|
850
|
+
}
|
|
851
|
+
}
|
|
852
|
+
}
|
|
853
|
+
if (data.homepage !== undefined) {
|
|
854
|
+
let data5 = data.homepage;
|
|
855
|
+
if (typeof data5 !== "string" && data5 !== null) {
|
|
856
|
+
const err22 = { instancePath: instancePath + "/homepage", schemaPath: "#/properties/homepage/type", keyword: "type", params: { type: schema33.properties.homepage.type }, message: "must be string,null" };
|
|
857
|
+
if (vErrors === null) {
|
|
858
|
+
vErrors = [err22];
|
|
859
|
+
} else {
|
|
860
|
+
vErrors.push(err22);
|
|
861
|
+
}
|
|
862
|
+
errors++;
|
|
863
|
+
}
|
|
864
|
+
if (typeof data5 === "string") {
|
|
865
|
+
if (!formats0(data5)) {
|
|
866
|
+
const err23 = { instancePath: instancePath + "/homepage", schemaPath: "#/properties/homepage/format", keyword: "format", params: { format: "uri" }, message: 'must match format "' + "uri" + '"' };
|
|
867
|
+
if (vErrors === null) {
|
|
868
|
+
vErrors = [err23];
|
|
869
|
+
} else {
|
|
870
|
+
vErrors.push(err23);
|
|
871
|
+
}
|
|
872
|
+
errors++;
|
|
873
|
+
}
|
|
874
|
+
}
|
|
875
|
+
}
|
|
876
|
+
if (data.source !== undefined) {
|
|
877
|
+
let data6 = data.source;
|
|
878
|
+
if (typeof data6 !== "string" && data6 !== null) {
|
|
879
|
+
const err24 = { instancePath: instancePath + "/source", schemaPath: "#/properties/source/type", keyword: "type", params: { type: schema33.properties.source.type }, message: "must be string,null" };
|
|
880
|
+
if (vErrors === null) {
|
|
881
|
+
vErrors = [err24];
|
|
882
|
+
} else {
|
|
883
|
+
vErrors.push(err24);
|
|
884
|
+
}
|
|
885
|
+
errors++;
|
|
886
|
+
}
|
|
887
|
+
if (typeof data6 === "string") {
|
|
888
|
+
if (!formats0(data6)) {
|
|
889
|
+
const err25 = { instancePath: instancePath + "/source", schemaPath: "#/properties/source/format", keyword: "format", params: { format: "uri" }, message: 'must match format "' + "uri" + '"' };
|
|
890
|
+
if (vErrors === null) {
|
|
891
|
+
vErrors = [err25];
|
|
892
|
+
} else {
|
|
893
|
+
vErrors.push(err25);
|
|
894
|
+
}
|
|
895
|
+
errors++;
|
|
896
|
+
}
|
|
897
|
+
}
|
|
898
|
+
}
|
|
899
|
+
if (data.versions !== undefined) {
|
|
900
|
+
let data7 = data.versions;
|
|
901
|
+
if (Array.isArray(data7)) {
|
|
902
|
+
if (data7.length < 1) {
|
|
903
|
+
const err26 = { instancePath: instancePath + "/versions", schemaPath: "#/properties/versions/minItems", keyword: "minItems", params: { limit: 1 }, message: "must NOT have fewer than 1 items" };
|
|
904
|
+
if (vErrors === null) {
|
|
905
|
+
vErrors = [err26];
|
|
906
|
+
} else {
|
|
907
|
+
vErrors.push(err26);
|
|
908
|
+
}
|
|
909
|
+
errors++;
|
|
910
|
+
}
|
|
911
|
+
const len0 = data7.length;
|
|
912
|
+
for (let i0 = 0;i0 < len0; i0++) {
|
|
913
|
+
if (!validate22(data7[i0], { instancePath: instancePath + "/versions/" + i0, parentData: data7, parentDataProperty: i0, rootData, dynamicAnchors })) {
|
|
914
|
+
vErrors = vErrors === null ? validate22.errors : vErrors.concat(validate22.errors);
|
|
915
|
+
errors = vErrors.length;
|
|
916
|
+
}
|
|
917
|
+
}
|
|
918
|
+
} else {
|
|
919
|
+
const err27 = { instancePath: instancePath + "/versions", schemaPath: "#/properties/versions/type", keyword: "type", params: { type: "array" }, message: "must be array" };
|
|
920
|
+
if (vErrors === null) {
|
|
921
|
+
vErrors = [err27];
|
|
922
|
+
} else {
|
|
923
|
+
vErrors.push(err27);
|
|
924
|
+
}
|
|
925
|
+
errors++;
|
|
926
|
+
}
|
|
927
|
+
}
|
|
928
|
+
} else {
|
|
929
|
+
const err28 = { instancePath, schemaPath: "#/type", keyword: "type", params: { type: "object" }, message: "must be object" };
|
|
930
|
+
if (vErrors === null) {
|
|
931
|
+
vErrors = [err28];
|
|
932
|
+
} else {
|
|
933
|
+
vErrors.push(err28);
|
|
934
|
+
}
|
|
935
|
+
errors++;
|
|
936
|
+
}
|
|
937
|
+
validate21.errors = vErrors;
|
|
938
|
+
return errors === 0;
|
|
939
|
+
}
|
|
940
|
+
validate21.evaluated = { props: true, dynamicProps: false, dynamicItems: false };
|
|
941
|
+
function validate20(data, { instancePath = "", parentData, parentDataProperty, rootData = data, dynamicAnchors = {} } = {}) {
|
|
942
|
+
let vErrors = null;
|
|
943
|
+
let errors = 0;
|
|
944
|
+
const evaluated0 = validate20.evaluated;
|
|
945
|
+
if (evaluated0.dynamicProps) {
|
|
946
|
+
evaluated0.props = undefined;
|
|
947
|
+
}
|
|
948
|
+
if (evaluated0.dynamicItems) {
|
|
949
|
+
evaluated0.items = undefined;
|
|
950
|
+
}
|
|
951
|
+
if (data && typeof data == "object" && !Array.isArray(data)) {
|
|
952
|
+
if (data.schema === undefined) {
|
|
953
|
+
const err0 = { instancePath, schemaPath: "#/required", keyword: "required", params: { missingProperty: "schema" }, message: "must have required property '" + "schema" + "'" };
|
|
954
|
+
if (vErrors === null) {
|
|
955
|
+
vErrors = [err0];
|
|
956
|
+
} else {
|
|
957
|
+
vErrors.push(err0);
|
|
958
|
+
}
|
|
959
|
+
errors++;
|
|
960
|
+
}
|
|
961
|
+
if (data.updated_at === undefined) {
|
|
962
|
+
const err1 = { instancePath, schemaPath: "#/required", keyword: "required", params: { missingProperty: "updated_at" }, message: "must have required property '" + "updated_at" + "'" };
|
|
963
|
+
if (vErrors === null) {
|
|
964
|
+
vErrors = [err1];
|
|
965
|
+
} else {
|
|
966
|
+
vErrors.push(err1);
|
|
967
|
+
}
|
|
968
|
+
errors++;
|
|
969
|
+
}
|
|
970
|
+
if (data.repo === undefined) {
|
|
971
|
+
const err2 = { instancePath, schemaPath: "#/required", keyword: "required", params: { missingProperty: "repo" }, message: "must have required property '" + "repo" + "'" };
|
|
972
|
+
if (vErrors === null) {
|
|
973
|
+
vErrors = [err2];
|
|
974
|
+
} else {
|
|
975
|
+
vErrors.push(err2);
|
|
976
|
+
}
|
|
977
|
+
errors++;
|
|
978
|
+
}
|
|
979
|
+
if (data.apps === undefined) {
|
|
980
|
+
const err3 = { instancePath, schemaPath: "#/required", keyword: "required", params: { missingProperty: "apps" }, message: "must have required property '" + "apps" + "'" };
|
|
981
|
+
if (vErrors === null) {
|
|
982
|
+
vErrors = [err3];
|
|
983
|
+
} else {
|
|
984
|
+
vErrors.push(err3);
|
|
985
|
+
}
|
|
986
|
+
errors++;
|
|
987
|
+
}
|
|
988
|
+
if (data.recommended_sources === undefined) {
|
|
989
|
+
const err4 = { instancePath, schemaPath: "#/required", keyword: "required", params: { missingProperty: "recommended_sources" }, message: "must have required property '" + "recommended_sources" + "'" };
|
|
990
|
+
if (vErrors === null) {
|
|
991
|
+
vErrors = [err4];
|
|
992
|
+
} else {
|
|
993
|
+
vErrors.push(err4);
|
|
994
|
+
}
|
|
995
|
+
errors++;
|
|
996
|
+
}
|
|
997
|
+
for (const key0 in data) {
|
|
998
|
+
if (!(key0 === "$schema" || key0 === "schema" || key0 === "updated_at" || key0 === "repo" || key0 === "apps" || key0 === "recommended_sources")) {
|
|
999
|
+
const err5 = { instancePath, schemaPath: "#/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key0 }, message: "must NOT have additional properties" };
|
|
1000
|
+
if (vErrors === null) {
|
|
1001
|
+
vErrors = [err5];
|
|
1002
|
+
} else {
|
|
1003
|
+
vErrors.push(err5);
|
|
1004
|
+
}
|
|
1005
|
+
errors++;
|
|
1006
|
+
}
|
|
1007
|
+
}
|
|
1008
|
+
if (data.$schema !== undefined) {
|
|
1009
|
+
let data0 = data.$schema;
|
|
1010
|
+
if (typeof data0 === "string") {
|
|
1011
|
+
if (!formats0(data0)) {
|
|
1012
|
+
const err6 = { instancePath: instancePath + "/$schema", schemaPath: "#/properties/%24schema/format", keyword: "format", params: { format: "uri" }, message: 'must match format "' + "uri" + '"' };
|
|
1013
|
+
if (vErrors === null) {
|
|
1014
|
+
vErrors = [err6];
|
|
1015
|
+
} else {
|
|
1016
|
+
vErrors.push(err6);
|
|
1017
|
+
}
|
|
1018
|
+
errors++;
|
|
1019
|
+
}
|
|
1020
|
+
} else {
|
|
1021
|
+
const err7 = { instancePath: instancePath + "/$schema", schemaPath: "#/properties/%24schema/type", keyword: "type", params: { type: "string" }, message: "must be string" };
|
|
1022
|
+
if (vErrors === null) {
|
|
1023
|
+
vErrors = [err7];
|
|
1024
|
+
} else {
|
|
1025
|
+
vErrors.push(err7);
|
|
1026
|
+
}
|
|
1027
|
+
errors++;
|
|
1028
|
+
}
|
|
1029
|
+
}
|
|
1030
|
+
if (data.schema !== undefined) {
|
|
1031
|
+
let data1 = data.schema;
|
|
1032
|
+
if (typeof data1 !== "string") {
|
|
1033
|
+
const err8 = { instancePath: instancePath + "/schema", schemaPath: "#/properties/schema/type", keyword: "type", params: { type: "string" }, message: "must be string" };
|
|
1034
|
+
if (vErrors === null) {
|
|
1035
|
+
vErrors = [err8];
|
|
1036
|
+
} else {
|
|
1037
|
+
vErrors.push(err8);
|
|
1038
|
+
}
|
|
1039
|
+
errors++;
|
|
1040
|
+
}
|
|
1041
|
+
if (data1 !== "catalog.v1") {
|
|
1042
|
+
const err9 = { instancePath: instancePath + "/schema", schemaPath: "#/properties/schema/const", keyword: "const", params: { allowedValue: "catalog.v1" }, message: "must be equal to constant" };
|
|
1043
|
+
if (vErrors === null) {
|
|
1044
|
+
vErrors = [err9];
|
|
1045
|
+
} else {
|
|
1046
|
+
vErrors.push(err9);
|
|
1047
|
+
}
|
|
1048
|
+
errors++;
|
|
1049
|
+
}
|
|
1050
|
+
}
|
|
1051
|
+
if (data.updated_at !== undefined) {
|
|
1052
|
+
let data2 = data.updated_at;
|
|
1053
|
+
if (typeof data2 === "string") {
|
|
1054
|
+
if (!formats2.validate(data2)) {
|
|
1055
|
+
const err10 = { instancePath: instancePath + "/updated_at", schemaPath: "#/properties/updated_at/format", keyword: "format", params: { format: "date-time" }, message: 'must match format "' + "date-time" + '"' };
|
|
1056
|
+
if (vErrors === null) {
|
|
1057
|
+
vErrors = [err10];
|
|
1058
|
+
} else {
|
|
1059
|
+
vErrors.push(err10);
|
|
1060
|
+
}
|
|
1061
|
+
errors++;
|
|
1062
|
+
}
|
|
1063
|
+
} else {
|
|
1064
|
+
const err11 = { instancePath: instancePath + "/updated_at", schemaPath: "#/properties/updated_at/type", keyword: "type", params: { type: "string" }, message: "must be string" };
|
|
1065
|
+
if (vErrors === null) {
|
|
1066
|
+
vErrors = [err11];
|
|
1067
|
+
} else {
|
|
1068
|
+
vErrors.push(err11);
|
|
1069
|
+
}
|
|
1070
|
+
errors++;
|
|
1071
|
+
}
|
|
1072
|
+
}
|
|
1073
|
+
if (data.repo !== undefined) {
|
|
1074
|
+
let data3 = data.repo;
|
|
1075
|
+
if (data3 && typeof data3 == "object" && !Array.isArray(data3)) {
|
|
1076
|
+
if (data3.name === undefined) {
|
|
1077
|
+
const err12 = { instancePath: instancePath + "/repo", schemaPath: "#/$defs/Repo/required", keyword: "required", params: { missingProperty: "name" }, message: "must have required property '" + "name" + "'" };
|
|
1078
|
+
if (vErrors === null) {
|
|
1079
|
+
vErrors = [err12];
|
|
1080
|
+
} else {
|
|
1081
|
+
vErrors.push(err12);
|
|
1082
|
+
}
|
|
1083
|
+
errors++;
|
|
1084
|
+
}
|
|
1085
|
+
if (data3.description === undefined) {
|
|
1086
|
+
const err13 = { instancePath: instancePath + "/repo", schemaPath: "#/$defs/Repo/required", keyword: "required", params: { missingProperty: "description" }, message: "must have required property '" + "description" + "'" };
|
|
1087
|
+
if (vErrors === null) {
|
|
1088
|
+
vErrors = [err13];
|
|
1089
|
+
} else {
|
|
1090
|
+
vErrors.push(err13);
|
|
1091
|
+
}
|
|
1092
|
+
errors++;
|
|
1093
|
+
}
|
|
1094
|
+
if (data3.homepage === undefined) {
|
|
1095
|
+
const err14 = { instancePath: instancePath + "/repo", schemaPath: "#/$defs/Repo/required", keyword: "required", params: { missingProperty: "homepage" }, message: "must have required property '" + "homepage" + "'" };
|
|
1096
|
+
if (vErrors === null) {
|
|
1097
|
+
vErrors = [err14];
|
|
1098
|
+
} else {
|
|
1099
|
+
vErrors.push(err14);
|
|
1100
|
+
}
|
|
1101
|
+
errors++;
|
|
1102
|
+
}
|
|
1103
|
+
if (data3.icon === undefined) {
|
|
1104
|
+
const err15 = { instancePath: instancePath + "/repo", schemaPath: "#/$defs/Repo/required", keyword: "required", params: { missingProperty: "icon" }, message: "must have required property '" + "icon" + "'" };
|
|
1105
|
+
if (vErrors === null) {
|
|
1106
|
+
vErrors = [err15];
|
|
1107
|
+
} else {
|
|
1108
|
+
vErrors.push(err15);
|
|
1109
|
+
}
|
|
1110
|
+
errors++;
|
|
1111
|
+
}
|
|
1112
|
+
for (const key1 in data3) {
|
|
1113
|
+
if (!(key1 === "name" || key1 === "description" || key1 === "homepage" || key1 === "icon")) {
|
|
1114
|
+
const err16 = { instancePath: instancePath + "/repo", schemaPath: "#/$defs/Repo/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key1 }, message: "must NOT have additional properties" };
|
|
1115
|
+
if (vErrors === null) {
|
|
1116
|
+
vErrors = [err16];
|
|
1117
|
+
} else {
|
|
1118
|
+
vErrors.push(err16);
|
|
1119
|
+
}
|
|
1120
|
+
errors++;
|
|
1121
|
+
}
|
|
1122
|
+
}
|
|
1123
|
+
if (data3.name !== undefined) {
|
|
1124
|
+
let data4 = data3.name;
|
|
1125
|
+
if (typeof data4 === "string") {
|
|
1126
|
+
if (func1(data4) > 100) {
|
|
1127
|
+
const err17 = { instancePath: instancePath + "/repo/name", schemaPath: "#/$defs/Repo/properties/name/maxLength", keyword: "maxLength", params: { limit: 100 }, message: "must NOT have more than 100 characters" };
|
|
1128
|
+
if (vErrors === null) {
|
|
1129
|
+
vErrors = [err17];
|
|
1130
|
+
} else {
|
|
1131
|
+
vErrors.push(err17);
|
|
1132
|
+
}
|
|
1133
|
+
errors++;
|
|
1134
|
+
}
|
|
1135
|
+
if (func1(data4) < 1) {
|
|
1136
|
+
const err18 = { instancePath: instancePath + "/repo/name", schemaPath: "#/$defs/Repo/properties/name/minLength", keyword: "minLength", params: { limit: 1 }, message: "must NOT have fewer than 1 characters" };
|
|
1137
|
+
if (vErrors === null) {
|
|
1138
|
+
vErrors = [err18];
|
|
1139
|
+
} else {
|
|
1140
|
+
vErrors.push(err18);
|
|
1141
|
+
}
|
|
1142
|
+
errors++;
|
|
1143
|
+
}
|
|
1144
|
+
} else {
|
|
1145
|
+
const err19 = { instancePath: instancePath + "/repo/name", schemaPath: "#/$defs/Repo/properties/name/type", keyword: "type", params: { type: "string" }, message: "must be string" };
|
|
1146
|
+
if (vErrors === null) {
|
|
1147
|
+
vErrors = [err19];
|
|
1148
|
+
} else {
|
|
1149
|
+
vErrors.push(err19);
|
|
1150
|
+
}
|
|
1151
|
+
errors++;
|
|
1152
|
+
}
|
|
1153
|
+
}
|
|
1154
|
+
if (data3.description !== undefined) {
|
|
1155
|
+
let data5 = data3.description;
|
|
1156
|
+
if (typeof data5 === "string") {
|
|
1157
|
+
if (func1(data5) > 300) {
|
|
1158
|
+
const err20 = { instancePath: instancePath + "/repo/description", schemaPath: "#/$defs/Repo/properties/description/maxLength", keyword: "maxLength", params: { limit: 300 }, message: "must NOT have more than 300 characters" };
|
|
1159
|
+
if (vErrors === null) {
|
|
1160
|
+
vErrors = [err20];
|
|
1161
|
+
} else {
|
|
1162
|
+
vErrors.push(err20);
|
|
1163
|
+
}
|
|
1164
|
+
errors++;
|
|
1165
|
+
}
|
|
1166
|
+
if (func1(data5) < 1) {
|
|
1167
|
+
const err21 = { instancePath: instancePath + "/repo/description", schemaPath: "#/$defs/Repo/properties/description/minLength", keyword: "minLength", params: { limit: 1 }, message: "must NOT have fewer than 1 characters" };
|
|
1168
|
+
if (vErrors === null) {
|
|
1169
|
+
vErrors = [err21];
|
|
1170
|
+
} else {
|
|
1171
|
+
vErrors.push(err21);
|
|
1172
|
+
}
|
|
1173
|
+
errors++;
|
|
1174
|
+
}
|
|
1175
|
+
} else {
|
|
1176
|
+
const err22 = { instancePath: instancePath + "/repo/description", schemaPath: "#/$defs/Repo/properties/description/type", keyword: "type", params: { type: "string" }, message: "must be string" };
|
|
1177
|
+
if (vErrors === null) {
|
|
1178
|
+
vErrors = [err22];
|
|
1179
|
+
} else {
|
|
1180
|
+
vErrors.push(err22);
|
|
1181
|
+
}
|
|
1182
|
+
errors++;
|
|
1183
|
+
}
|
|
1184
|
+
}
|
|
1185
|
+
if (data3.homepage !== undefined) {
|
|
1186
|
+
let data6 = data3.homepage;
|
|
1187
|
+
if (typeof data6 !== "string" && data6 !== null) {
|
|
1188
|
+
const err23 = { instancePath: instancePath + "/repo/homepage", schemaPath: "#/$defs/Repo/properties/homepage/type", keyword: "type", params: { type: schema32.properties.homepage.type }, message: "must be string,null" };
|
|
1189
|
+
if (vErrors === null) {
|
|
1190
|
+
vErrors = [err23];
|
|
1191
|
+
} else {
|
|
1192
|
+
vErrors.push(err23);
|
|
1193
|
+
}
|
|
1194
|
+
errors++;
|
|
1195
|
+
}
|
|
1196
|
+
if (typeof data6 === "string") {
|
|
1197
|
+
if (!formats0(data6)) {
|
|
1198
|
+
const err24 = { instancePath: instancePath + "/repo/homepage", schemaPath: "#/$defs/Repo/properties/homepage/format", keyword: "format", params: { format: "uri" }, message: 'must match format "' + "uri" + '"' };
|
|
1199
|
+
if (vErrors === null) {
|
|
1200
|
+
vErrors = [err24];
|
|
1201
|
+
} else {
|
|
1202
|
+
vErrors.push(err24);
|
|
1203
|
+
}
|
|
1204
|
+
errors++;
|
|
1205
|
+
}
|
|
1206
|
+
}
|
|
1207
|
+
}
|
|
1208
|
+
if (data3.icon !== undefined) {
|
|
1209
|
+
let data7 = data3.icon;
|
|
1210
|
+
if (typeof data7 !== "string" && data7 !== null) {
|
|
1211
|
+
const err25 = { instancePath: instancePath + "/repo/icon", schemaPath: "#/$defs/Repo/properties/icon/type", keyword: "type", params: { type: schema32.properties.icon.type }, message: "must be string,null" };
|
|
1212
|
+
if (vErrors === null) {
|
|
1213
|
+
vErrors = [err25];
|
|
1214
|
+
} else {
|
|
1215
|
+
vErrors.push(err25);
|
|
1216
|
+
}
|
|
1217
|
+
errors++;
|
|
1218
|
+
}
|
|
1219
|
+
if (typeof data7 === "string") {
|
|
1220
|
+
if (!formats0(data7)) {
|
|
1221
|
+
const err26 = { instancePath: instancePath + "/repo/icon", schemaPath: "#/$defs/Repo/properties/icon/format", keyword: "format", params: { format: "uri" }, message: 'must match format "' + "uri" + '"' };
|
|
1222
|
+
if (vErrors === null) {
|
|
1223
|
+
vErrors = [err26];
|
|
1224
|
+
} else {
|
|
1225
|
+
vErrors.push(err26);
|
|
1226
|
+
}
|
|
1227
|
+
errors++;
|
|
1228
|
+
}
|
|
1229
|
+
}
|
|
1230
|
+
}
|
|
1231
|
+
} else {
|
|
1232
|
+
const err27 = { instancePath: instancePath + "/repo", schemaPath: "#/$defs/Repo/type", keyword: "type", params: { type: "object" }, message: "must be object" };
|
|
1233
|
+
if (vErrors === null) {
|
|
1234
|
+
vErrors = [err27];
|
|
1235
|
+
} else {
|
|
1236
|
+
vErrors.push(err27);
|
|
1237
|
+
}
|
|
1238
|
+
errors++;
|
|
1239
|
+
}
|
|
1240
|
+
}
|
|
1241
|
+
if (data.apps !== undefined) {
|
|
1242
|
+
let data8 = data.apps;
|
|
1243
|
+
if (Array.isArray(data8)) {
|
|
1244
|
+
const len0 = data8.length;
|
|
1245
|
+
for (let i0 = 0;i0 < len0; i0++) {
|
|
1246
|
+
if (!validate21(data8[i0], { instancePath: instancePath + "/apps/" + i0, parentData: data8, parentDataProperty: i0, rootData, dynamicAnchors })) {
|
|
1247
|
+
vErrors = vErrors === null ? validate21.errors : vErrors.concat(validate21.errors);
|
|
1248
|
+
errors = vErrors.length;
|
|
1249
|
+
}
|
|
1250
|
+
}
|
|
1251
|
+
} else {
|
|
1252
|
+
const err28 = { instancePath: instancePath + "/apps", schemaPath: "#/properties/apps/type", keyword: "type", params: { type: "array" }, message: "must be array" };
|
|
1253
|
+
if (vErrors === null) {
|
|
1254
|
+
vErrors = [err28];
|
|
1255
|
+
} else {
|
|
1256
|
+
vErrors.push(err28);
|
|
1257
|
+
}
|
|
1258
|
+
errors++;
|
|
1259
|
+
}
|
|
1260
|
+
}
|
|
1261
|
+
if (data.recommended_sources !== undefined) {
|
|
1262
|
+
let data10 = data.recommended_sources;
|
|
1263
|
+
if (Array.isArray(data10)) {
|
|
1264
|
+
const len1 = data10.length;
|
|
1265
|
+
for (let i1 = 0;i1 < len1; i1++) {
|
|
1266
|
+
let data11 = data10[i1];
|
|
1267
|
+
if (data11 && typeof data11 == "object" && !Array.isArray(data11)) {
|
|
1268
|
+
if (data11.name === undefined) {
|
|
1269
|
+
const err29 = { instancePath: instancePath + "/recommended_sources/" + i1, schemaPath: "#/$defs/RecommendedSource/required", keyword: "required", params: { missingProperty: "name" }, message: "must have required property '" + "name" + "'" };
|
|
1270
|
+
if (vErrors === null) {
|
|
1271
|
+
vErrors = [err29];
|
|
1272
|
+
} else {
|
|
1273
|
+
vErrors.push(err29);
|
|
1274
|
+
}
|
|
1275
|
+
errors++;
|
|
1276
|
+
}
|
|
1277
|
+
if (data11.url === undefined) {
|
|
1278
|
+
const err30 = { instancePath: instancePath + "/recommended_sources/" + i1, schemaPath: "#/$defs/RecommendedSource/required", keyword: "required", params: { missingProperty: "url" }, message: "must have required property '" + "url" + "'" };
|
|
1279
|
+
if (vErrors === null) {
|
|
1280
|
+
vErrors = [err30];
|
|
1281
|
+
} else {
|
|
1282
|
+
vErrors.push(err30);
|
|
1283
|
+
}
|
|
1284
|
+
errors++;
|
|
1285
|
+
}
|
|
1286
|
+
if (data11.description === undefined) {
|
|
1287
|
+
const err31 = { instancePath: instancePath + "/recommended_sources/" + i1, schemaPath: "#/$defs/RecommendedSource/required", keyword: "required", params: { missingProperty: "description" }, message: "must have required property '" + "description" + "'" };
|
|
1288
|
+
if (vErrors === null) {
|
|
1289
|
+
vErrors = [err31];
|
|
1290
|
+
} else {
|
|
1291
|
+
vErrors.push(err31);
|
|
1292
|
+
}
|
|
1293
|
+
errors++;
|
|
1294
|
+
}
|
|
1295
|
+
if (data11.attested === undefined) {
|
|
1296
|
+
const err32 = { instancePath: instancePath + "/recommended_sources/" + i1, schemaPath: "#/$defs/RecommendedSource/required", keyword: "required", params: { missingProperty: "attested" }, message: "must have required property '" + "attested" + "'" };
|
|
1297
|
+
if (vErrors === null) {
|
|
1298
|
+
vErrors = [err32];
|
|
1299
|
+
} else {
|
|
1300
|
+
vErrors.push(err32);
|
|
1301
|
+
}
|
|
1302
|
+
errors++;
|
|
1303
|
+
}
|
|
1304
|
+
for (const key2 in data11) {
|
|
1305
|
+
if (!(key2 === "name" || key2 === "url" || key2 === "description" || key2 === "attested")) {
|
|
1306
|
+
const err33 = { instancePath: instancePath + "/recommended_sources/" + i1, schemaPath: "#/$defs/RecommendedSource/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key2 }, message: "must NOT have additional properties" };
|
|
1307
|
+
if (vErrors === null) {
|
|
1308
|
+
vErrors = [err33];
|
|
1309
|
+
} else {
|
|
1310
|
+
vErrors.push(err33);
|
|
1311
|
+
}
|
|
1312
|
+
errors++;
|
|
1313
|
+
}
|
|
1314
|
+
}
|
|
1315
|
+
if (data11.name !== undefined) {
|
|
1316
|
+
let data12 = data11.name;
|
|
1317
|
+
if (typeof data12 === "string") {
|
|
1318
|
+
if (func1(data12) > 100) {
|
|
1319
|
+
const err34 = { instancePath: instancePath + "/recommended_sources/" + i1 + "/name", schemaPath: "#/$defs/RecommendedSource/properties/name/maxLength", keyword: "maxLength", params: { limit: 100 }, message: "must NOT have more than 100 characters" };
|
|
1320
|
+
if (vErrors === null) {
|
|
1321
|
+
vErrors = [err34];
|
|
1322
|
+
} else {
|
|
1323
|
+
vErrors.push(err34);
|
|
1324
|
+
}
|
|
1325
|
+
errors++;
|
|
1326
|
+
}
|
|
1327
|
+
if (func1(data12) < 1) {
|
|
1328
|
+
const err35 = { instancePath: instancePath + "/recommended_sources/" + i1 + "/name", schemaPath: "#/$defs/RecommendedSource/properties/name/minLength", keyword: "minLength", params: { limit: 1 }, message: "must NOT have fewer than 1 characters" };
|
|
1329
|
+
if (vErrors === null) {
|
|
1330
|
+
vErrors = [err35];
|
|
1331
|
+
} else {
|
|
1332
|
+
vErrors.push(err35);
|
|
1333
|
+
}
|
|
1334
|
+
errors++;
|
|
1335
|
+
}
|
|
1336
|
+
} else {
|
|
1337
|
+
const err36 = { instancePath: instancePath + "/recommended_sources/" + i1 + "/name", schemaPath: "#/$defs/RecommendedSource/properties/name/type", keyword: "type", params: { type: "string" }, message: "must be string" };
|
|
1338
|
+
if (vErrors === null) {
|
|
1339
|
+
vErrors = [err36];
|
|
1340
|
+
} else {
|
|
1341
|
+
vErrors.push(err36);
|
|
1342
|
+
}
|
|
1343
|
+
errors++;
|
|
1344
|
+
}
|
|
1345
|
+
}
|
|
1346
|
+
if (data11.url !== undefined) {
|
|
1347
|
+
let data13 = data11.url;
|
|
1348
|
+
if (typeof data13 === "string") {
|
|
1349
|
+
if (!formats0(data13)) {
|
|
1350
|
+
const err37 = { instancePath: instancePath + "/recommended_sources/" + i1 + "/url", schemaPath: "#/$defs/RecommendedSource/properties/url/format", keyword: "format", params: { format: "uri" }, message: 'must match format "' + "uri" + '"' };
|
|
1351
|
+
if (vErrors === null) {
|
|
1352
|
+
vErrors = [err37];
|
|
1353
|
+
} else {
|
|
1354
|
+
vErrors.push(err37);
|
|
1355
|
+
}
|
|
1356
|
+
errors++;
|
|
1357
|
+
}
|
|
1358
|
+
} else {
|
|
1359
|
+
const err38 = { instancePath: instancePath + "/recommended_sources/" + i1 + "/url", schemaPath: "#/$defs/RecommendedSource/properties/url/type", keyword: "type", params: { type: "string" }, message: "must be string" };
|
|
1360
|
+
if (vErrors === null) {
|
|
1361
|
+
vErrors = [err38];
|
|
1362
|
+
} else {
|
|
1363
|
+
vErrors.push(err38);
|
|
1364
|
+
}
|
|
1365
|
+
errors++;
|
|
1366
|
+
}
|
|
1367
|
+
}
|
|
1368
|
+
if (data11.description !== undefined) {
|
|
1369
|
+
let data14 = data11.description;
|
|
1370
|
+
if (typeof data14 !== "string" && data14 !== null) {
|
|
1371
|
+
const err39 = { instancePath: instancePath + "/recommended_sources/" + i1 + "/description", schemaPath: "#/$defs/RecommendedSource/properties/description/type", keyword: "type", params: { type: schema40.properties.description.type }, message: "must be string,null" };
|
|
1372
|
+
if (vErrors === null) {
|
|
1373
|
+
vErrors = [err39];
|
|
1374
|
+
} else {
|
|
1375
|
+
vErrors.push(err39);
|
|
1376
|
+
}
|
|
1377
|
+
errors++;
|
|
1378
|
+
}
|
|
1379
|
+
if (typeof data14 === "string") {
|
|
1380
|
+
if (func1(data14) > 300) {
|
|
1381
|
+
const err40 = { instancePath: instancePath + "/recommended_sources/" + i1 + "/description", schemaPath: "#/$defs/RecommendedSource/properties/description/maxLength", keyword: "maxLength", params: { limit: 300 }, message: "must NOT have more than 300 characters" };
|
|
1382
|
+
if (vErrors === null) {
|
|
1383
|
+
vErrors = [err40];
|
|
1384
|
+
} else {
|
|
1385
|
+
vErrors.push(err40);
|
|
1386
|
+
}
|
|
1387
|
+
errors++;
|
|
1388
|
+
}
|
|
1389
|
+
}
|
|
1390
|
+
}
|
|
1391
|
+
if (data11.attested !== undefined) {
|
|
1392
|
+
if (typeof data11.attested !== "boolean") {
|
|
1393
|
+
const err41 = { instancePath: instancePath + "/recommended_sources/" + i1 + "/attested", schemaPath: "#/$defs/RecommendedSource/properties/attested/type", keyword: "type", params: { type: "boolean" }, message: "must be boolean" };
|
|
1394
|
+
if (vErrors === null) {
|
|
1395
|
+
vErrors = [err41];
|
|
1396
|
+
} else {
|
|
1397
|
+
vErrors.push(err41);
|
|
1398
|
+
}
|
|
1399
|
+
errors++;
|
|
1400
|
+
}
|
|
1401
|
+
}
|
|
1402
|
+
} else {
|
|
1403
|
+
const err42 = { instancePath: instancePath + "/recommended_sources/" + i1, schemaPath: "#/$defs/RecommendedSource/type", keyword: "type", params: { type: "object" }, message: "must be object" };
|
|
1404
|
+
if (vErrors === null) {
|
|
1405
|
+
vErrors = [err42];
|
|
1406
|
+
} else {
|
|
1407
|
+
vErrors.push(err42);
|
|
1408
|
+
}
|
|
1409
|
+
errors++;
|
|
1410
|
+
}
|
|
1411
|
+
}
|
|
1412
|
+
} else {
|
|
1413
|
+
const err43 = { instancePath: instancePath + "/recommended_sources", schemaPath: "#/properties/recommended_sources/type", keyword: "type", params: { type: "array" }, message: "must be array" };
|
|
1414
|
+
if (vErrors === null) {
|
|
1415
|
+
vErrors = [err43];
|
|
1416
|
+
} else {
|
|
1417
|
+
vErrors.push(err43);
|
|
1418
|
+
}
|
|
1419
|
+
errors++;
|
|
1420
|
+
}
|
|
1421
|
+
}
|
|
1422
|
+
} else {
|
|
1423
|
+
const err44 = { instancePath, schemaPath: "#/type", keyword: "type", params: { type: "object" }, message: "must be object" };
|
|
1424
|
+
if (vErrors === null) {
|
|
1425
|
+
vErrors = [err44];
|
|
1426
|
+
} else {
|
|
1427
|
+
vErrors.push(err44);
|
|
1428
|
+
}
|
|
1429
|
+
errors++;
|
|
1430
|
+
}
|
|
1431
|
+
validate20.errors = vErrors;
|
|
1432
|
+
return errors === 0;
|
|
1433
|
+
}
|
|
1434
|
+
validate20.evaluated = { props: true, dynamicProps: false, dynamicItems: false };
|
|
1435
|
+
});
|
|
1436
|
+
export default require_validator();
|