@rootintf/protocol-subverseinfo 2.0.3-api.4 → 2.1.1-api.5
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/subverseinfo.cjs.js +178 -32
- package/dist/subverseinfo.es.mjs +178 -32
- package/package.json +2 -2
- package/schema/schema_SubverseInfo.json +11 -6
- package/src/subverseinfo.ts +1 -4
- package/src/validate-esm.mjs +1 -1
- package/tests/subverseinfo.spec.mjs +6 -9
package/dist/subverseinfo.cjs.js
CHANGED
|
@@ -87,8 +87,8 @@ function validate19(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
87
87
|
if (valid0) {
|
|
88
88
|
if (data.subverse_info !== undefined) {
|
|
89
89
|
const _errs9 = errors;
|
|
90
|
-
if ("
|
|
91
|
-
validate19.errors = [{ instancePath: instancePath + "/subverse_info", schemaPath: "definitions#/definitions/_v/const", keyword: "const", params: { allowedValue: "
|
|
90
|
+
if ("5" !== data.subverse_info) {
|
|
91
|
+
validate19.errors = [{ instancePath: instancePath + "/subverse_info", schemaPath: "definitions#/definitions/_v/const", keyword: "const", params: { allowedValue: "5" }, message: "must be equal to constant" }];
|
|
92
92
|
return false;
|
|
93
93
|
}
|
|
94
94
|
var valid0 = _errs9 === errors;
|
|
@@ -110,7 +110,7 @@ function validate21(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
110
110
|
evaluated0.props = undefined;
|
|
111
111
|
} if (evaluated0.dynamicItems) {
|
|
112
112
|
evaluated0.items = undefined;
|
|
113
|
-
} {
|
|
113
|
+
} const _errs2 = errors; if (errors === _errs2) {
|
|
114
114
|
if (data && typeof data == "object" && !Array.isArray(data)) {
|
|
115
115
|
let missing0;
|
|
116
116
|
if (((data.uri === undefined) && (missing0 = "uri")) || ((data.name === undefined) && (missing0 = "name"))) {
|
|
@@ -148,7 +148,7 @@ function validate21(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
148
148
|
validate21.errors = [{ instancePath, schemaPath: "definitions#/definitions/unique-id/type", keyword: "type", params: { type: "object" }, message: "must be object" }];
|
|
149
149
|
return false;
|
|
150
150
|
}
|
|
151
|
-
} {
|
|
151
|
+
} if (errors === 0) {
|
|
152
152
|
if (data && typeof data == "object" && !Array.isArray(data)) {
|
|
153
153
|
if (data.favicon !== undefined) {
|
|
154
154
|
const _errs8 = errors;
|
|
@@ -165,25 +165,99 @@ function validate21(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
165
165
|
if (data.hyperport !== undefined) {
|
|
166
166
|
let data3 = data.hyperport;
|
|
167
167
|
const _errs10 = errors;
|
|
168
|
-
|
|
168
|
+
const _errs12 = errors;
|
|
169
|
+
let valid5 = false;
|
|
170
|
+
let passing0 = null;
|
|
171
|
+
const _errs13 = errors;
|
|
172
|
+
if (typeof data3 !== "string") {
|
|
173
|
+
const err0 = { instancePath: instancePath + "/hyperport", schemaPath: "definitions#/definitions/hyperport/oneOf/0/type", keyword: "type", params: { type: "string" }, message: "must be string" };
|
|
174
|
+
if (vErrors === null) {
|
|
175
|
+
vErrors = [err0];
|
|
176
|
+
}
|
|
177
|
+
else {
|
|
178
|
+
vErrors.push(err0);
|
|
179
|
+
}
|
|
180
|
+
errors++;
|
|
181
|
+
}
|
|
182
|
+
var _valid0 = _errs13 === errors;
|
|
183
|
+
if (_valid0) {
|
|
184
|
+
valid5 = true;
|
|
185
|
+
passing0 = 0;
|
|
186
|
+
}
|
|
187
|
+
const _errs15 = errors;
|
|
188
|
+
if (errors === _errs15) {
|
|
169
189
|
if (data3 && typeof data3 == "object" && !Array.isArray(data3)) {
|
|
170
190
|
let missing1;
|
|
171
191
|
if (((data3.uri === undefined) && (missing1 = "uri")) || ((data3.port === undefined) && (missing1 = "port"))) {
|
|
172
|
-
|
|
173
|
-
|
|
192
|
+
const err1 = { instancePath: instancePath + "/hyperport", schemaPath: "definitions#/definitions/hyperport/oneOf/1/required", keyword: "required", params: { missingProperty: missing1 }, message: "must have required property '" + missing1 + "'" };
|
|
193
|
+
if (vErrors === null) {
|
|
194
|
+
vErrors = [err1];
|
|
195
|
+
}
|
|
196
|
+
else {
|
|
197
|
+
vErrors.push(err1);
|
|
198
|
+
}
|
|
199
|
+
errors++;
|
|
174
200
|
}
|
|
175
201
|
else {
|
|
176
202
|
if (data3.uri !== undefined) {
|
|
177
203
|
if (typeof data3.uri !== "string") {
|
|
178
|
-
|
|
179
|
-
|
|
204
|
+
const err2 = { instancePath: instancePath + "/hyperport/uri", schemaPath: "definitions#/definitions/hyperport/oneOf/1/properties/uri/type", keyword: "type", params: { type: "string" }, message: "must be string" };
|
|
205
|
+
if (vErrors === null) {
|
|
206
|
+
vErrors = [err2];
|
|
207
|
+
}
|
|
208
|
+
else {
|
|
209
|
+
vErrors.push(err2);
|
|
210
|
+
}
|
|
211
|
+
errors++;
|
|
180
212
|
}
|
|
181
213
|
}
|
|
182
214
|
}
|
|
183
215
|
}
|
|
184
216
|
else {
|
|
185
|
-
|
|
186
|
-
|
|
217
|
+
const err3 = { instancePath: instancePath + "/hyperport", schemaPath: "definitions#/definitions/hyperport/oneOf/1/type", keyword: "type", params: { type: "object" }, message: "must be object" };
|
|
218
|
+
if (vErrors === null) {
|
|
219
|
+
vErrors = [err3];
|
|
220
|
+
}
|
|
221
|
+
else {
|
|
222
|
+
vErrors.push(err3);
|
|
223
|
+
}
|
|
224
|
+
errors++;
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
var _valid0 = _errs15 === errors;
|
|
228
|
+
if (_valid0 && valid5) {
|
|
229
|
+
valid5 = false;
|
|
230
|
+
passing0 = [passing0, 1];
|
|
231
|
+
}
|
|
232
|
+
else {
|
|
233
|
+
if (_valid0) {
|
|
234
|
+
valid5 = true;
|
|
235
|
+
passing0 = 1;
|
|
236
|
+
var props0 = {};
|
|
237
|
+
props0.uri = true;
|
|
238
|
+
}
|
|
239
|
+
}
|
|
240
|
+
if (!valid5) {
|
|
241
|
+
const err4 = { instancePath: instancePath + "/hyperport", schemaPath: "definitions#/definitions/hyperport/oneOf", keyword: "oneOf", params: { passingSchemas: passing0 }, message: "must match exactly one schema in oneOf" };
|
|
242
|
+
if (vErrors === null) {
|
|
243
|
+
vErrors = [err4];
|
|
244
|
+
}
|
|
245
|
+
else {
|
|
246
|
+
vErrors.push(err4);
|
|
247
|
+
}
|
|
248
|
+
errors++;
|
|
249
|
+
validate21.errors = vErrors;
|
|
250
|
+
return false;
|
|
251
|
+
}
|
|
252
|
+
else {
|
|
253
|
+
errors = _errs12;
|
|
254
|
+
if (vErrors !== null) {
|
|
255
|
+
if (_errs12) {
|
|
256
|
+
vErrors.length = _errs12;
|
|
257
|
+
}
|
|
258
|
+
else {
|
|
259
|
+
vErrors = null;
|
|
260
|
+
}
|
|
187
261
|
}
|
|
188
262
|
}
|
|
189
263
|
var valid3 = _errs10 === errors;
|
|
@@ -194,12 +268,12 @@ function validate21(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
194
268
|
if (valid3) {
|
|
195
269
|
if (data.info !== undefined) {
|
|
196
270
|
let data5 = data.info;
|
|
197
|
-
const
|
|
271
|
+
const _errs19 = errors;
|
|
198
272
|
if (!(data5 && typeof data5 == "object" && !Array.isArray(data5))) {
|
|
199
273
|
validate21.errors = [{ instancePath: instancePath + "/info", schemaPath: "definitions#/definitions/info/type", keyword: "type", params: { type: "object" }, message: "must be object" }];
|
|
200
274
|
return false;
|
|
201
275
|
}
|
|
202
|
-
var valid3 =
|
|
276
|
+
var valid3 = _errs19 === errors;
|
|
203
277
|
}
|
|
204
278
|
else {
|
|
205
279
|
var valid3 = true;
|
|
@@ -217,7 +291,7 @@ function validate24(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
217
291
|
evaluated0.props = undefined;
|
|
218
292
|
} if (evaluated0.dynamicItems) {
|
|
219
293
|
evaluated0.items = undefined;
|
|
220
|
-
} {
|
|
294
|
+
} const _errs2 = errors; if (errors === _errs2) {
|
|
221
295
|
if (data && typeof data == "object" && !Array.isArray(data)) {
|
|
222
296
|
let missing0;
|
|
223
297
|
if (((data.uri === undefined) && (missing0 = "uri")) || ((data.name === undefined) && (missing0 = "name"))) {
|
|
@@ -255,7 +329,7 @@ function validate24(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
255
329
|
validate24.errors = [{ instancePath, schemaPath: "definitions#/definitions/unique-id/type", keyword: "type", params: { type: "object" }, message: "must be object" }];
|
|
256
330
|
return false;
|
|
257
331
|
}
|
|
258
|
-
} {
|
|
332
|
+
} if (errors === 0) {
|
|
259
333
|
if (data && typeof data == "object" && !Array.isArray(data)) {
|
|
260
334
|
if (data.favicon !== undefined) {
|
|
261
335
|
const _errs8 = errors;
|
|
@@ -272,25 +346,99 @@ function validate24(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
272
346
|
if (data.hyperport !== undefined) {
|
|
273
347
|
let data3 = data.hyperport;
|
|
274
348
|
const _errs10 = errors;
|
|
275
|
-
|
|
349
|
+
const _errs12 = errors;
|
|
350
|
+
let valid5 = false;
|
|
351
|
+
let passing0 = null;
|
|
352
|
+
const _errs13 = errors;
|
|
353
|
+
if (typeof data3 !== "string") {
|
|
354
|
+
const err0 = { instancePath: instancePath + "/hyperport", schemaPath: "definitions#/definitions/hyperport/oneOf/0/type", keyword: "type", params: { type: "string" }, message: "must be string" };
|
|
355
|
+
if (vErrors === null) {
|
|
356
|
+
vErrors = [err0];
|
|
357
|
+
}
|
|
358
|
+
else {
|
|
359
|
+
vErrors.push(err0);
|
|
360
|
+
}
|
|
361
|
+
errors++;
|
|
362
|
+
}
|
|
363
|
+
var _valid0 = _errs13 === errors;
|
|
364
|
+
if (_valid0) {
|
|
365
|
+
valid5 = true;
|
|
366
|
+
passing0 = 0;
|
|
367
|
+
}
|
|
368
|
+
const _errs15 = errors;
|
|
369
|
+
if (errors === _errs15) {
|
|
276
370
|
if (data3 && typeof data3 == "object" && !Array.isArray(data3)) {
|
|
277
371
|
let missing1;
|
|
278
372
|
if (((data3.uri === undefined) && (missing1 = "uri")) || ((data3.port === undefined) && (missing1 = "port"))) {
|
|
279
|
-
|
|
280
|
-
|
|
373
|
+
const err1 = { instancePath: instancePath + "/hyperport", schemaPath: "definitions#/definitions/hyperport/oneOf/1/required", keyword: "required", params: { missingProperty: missing1 }, message: "must have required property '" + missing1 + "'" };
|
|
374
|
+
if (vErrors === null) {
|
|
375
|
+
vErrors = [err1];
|
|
376
|
+
}
|
|
377
|
+
else {
|
|
378
|
+
vErrors.push(err1);
|
|
379
|
+
}
|
|
380
|
+
errors++;
|
|
281
381
|
}
|
|
282
382
|
else {
|
|
283
383
|
if (data3.uri !== undefined) {
|
|
284
384
|
if (typeof data3.uri !== "string") {
|
|
285
|
-
|
|
286
|
-
|
|
385
|
+
const err2 = { instancePath: instancePath + "/hyperport/uri", schemaPath: "definitions#/definitions/hyperport/oneOf/1/properties/uri/type", keyword: "type", params: { type: "string" }, message: "must be string" };
|
|
386
|
+
if (vErrors === null) {
|
|
387
|
+
vErrors = [err2];
|
|
388
|
+
}
|
|
389
|
+
else {
|
|
390
|
+
vErrors.push(err2);
|
|
391
|
+
}
|
|
392
|
+
errors++;
|
|
287
393
|
}
|
|
288
394
|
}
|
|
289
395
|
}
|
|
290
396
|
}
|
|
291
397
|
else {
|
|
292
|
-
|
|
293
|
-
|
|
398
|
+
const err3 = { instancePath: instancePath + "/hyperport", schemaPath: "definitions#/definitions/hyperport/oneOf/1/type", keyword: "type", params: { type: "object" }, message: "must be object" };
|
|
399
|
+
if (vErrors === null) {
|
|
400
|
+
vErrors = [err3];
|
|
401
|
+
}
|
|
402
|
+
else {
|
|
403
|
+
vErrors.push(err3);
|
|
404
|
+
}
|
|
405
|
+
errors++;
|
|
406
|
+
}
|
|
407
|
+
}
|
|
408
|
+
var _valid0 = _errs15 === errors;
|
|
409
|
+
if (_valid0 && valid5) {
|
|
410
|
+
valid5 = false;
|
|
411
|
+
passing0 = [passing0, 1];
|
|
412
|
+
}
|
|
413
|
+
else {
|
|
414
|
+
if (_valid0) {
|
|
415
|
+
valid5 = true;
|
|
416
|
+
passing0 = 1;
|
|
417
|
+
var props0 = {};
|
|
418
|
+
props0.uri = true;
|
|
419
|
+
}
|
|
420
|
+
}
|
|
421
|
+
if (!valid5) {
|
|
422
|
+
const err4 = { instancePath: instancePath + "/hyperport", schemaPath: "definitions#/definitions/hyperport/oneOf", keyword: "oneOf", params: { passingSchemas: passing0 }, message: "must match exactly one schema in oneOf" };
|
|
423
|
+
if (vErrors === null) {
|
|
424
|
+
vErrors = [err4];
|
|
425
|
+
}
|
|
426
|
+
else {
|
|
427
|
+
vErrors.push(err4);
|
|
428
|
+
}
|
|
429
|
+
errors++;
|
|
430
|
+
validate24.errors = vErrors;
|
|
431
|
+
return false;
|
|
432
|
+
}
|
|
433
|
+
else {
|
|
434
|
+
errors = _errs12;
|
|
435
|
+
if (vErrors !== null) {
|
|
436
|
+
if (_errs12) {
|
|
437
|
+
vErrors.length = _errs12;
|
|
438
|
+
}
|
|
439
|
+
else {
|
|
440
|
+
vErrors = null;
|
|
441
|
+
}
|
|
294
442
|
}
|
|
295
443
|
}
|
|
296
444
|
var valid3 = _errs10 === errors;
|
|
@@ -301,12 +449,12 @@ function validate24(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
301
449
|
if (valid3) {
|
|
302
450
|
if (data.info !== undefined) {
|
|
303
451
|
let data5 = data.info;
|
|
304
|
-
const
|
|
452
|
+
const _errs19 = errors;
|
|
305
453
|
if (!(data5 && typeof data5 == "object" && !Array.isArray(data5))) {
|
|
306
454
|
validate24.errors = [{ instancePath: instancePath + "/info", schemaPath: "definitions#/definitions/info/type", keyword: "type", params: { type: "object" }, message: "must be object" }];
|
|
307
455
|
return false;
|
|
308
456
|
}
|
|
309
|
-
var valid3 =
|
|
457
|
+
var valid3 = _errs19 === errors;
|
|
310
458
|
}
|
|
311
459
|
else {
|
|
312
460
|
var valid3 = true;
|
|
@@ -705,8 +853,8 @@ function validate20(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
705
853
|
if (valid0) {
|
|
706
854
|
if (data.subverse_info !== undefined) {
|
|
707
855
|
const _errs42 = errors;
|
|
708
|
-
if ("
|
|
709
|
-
validate20.errors = [{ instancePath: instancePath + "/subverse_info", schemaPath: "definitions#/definitions/_v/const", keyword: "const", params: { allowedValue: "
|
|
856
|
+
if ("5" !== data.subverse_info) {
|
|
857
|
+
validate20.errors = [{ instancePath: instancePath + "/subverse_info", schemaPath: "definitions#/definitions/_v/const", keyword: "const", params: { allowedValue: "5" }, message: "must be equal to constant" }];
|
|
710
858
|
return false;
|
|
711
859
|
}
|
|
712
860
|
var valid0 = _errs42 === errors;
|
|
@@ -1102,8 +1250,8 @@ function validate27(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
1102
1250
|
if (valid0) {
|
|
1103
1251
|
if (data.subverse_info !== undefined) {
|
|
1104
1252
|
const _errs44 = errors;
|
|
1105
|
-
if ("
|
|
1106
|
-
validate27.errors = [{ instancePath: instancePath + "/subverse_info", schemaPath: "definitions#/definitions/_v/const", keyword: "const", params: { allowedValue: "
|
|
1253
|
+
if ("5" !== data.subverse_info) {
|
|
1254
|
+
validate27.errors = [{ instancePath: instancePath + "/subverse_info", schemaPath: "definitions#/definitions/_v/const", keyword: "const", params: { allowedValue: "5" }, message: "must be equal to constant" }];
|
|
1107
1255
|
return false;
|
|
1108
1256
|
}
|
|
1109
1257
|
var valid0 = _errs44 === errors;
|
|
@@ -1693,7 +1841,7 @@ function requireJsonMsg_cjs () {
|
|
|
1693
1841
|
|
|
1694
1842
|
//-------------------------------------------------------------------------------------------------
|
|
1695
1843
|
const LOGR_ = bitlogr.LOGR.get_instance();
|
|
1696
|
-
const logr_ = LOGR_.create({ labels: bitlogr.l_array(['VALIDATION'
|
|
1844
|
+
const logr_ = LOGR_.create({ labels: bitlogr.l_array(['VALIDATION']) });
|
|
1697
1845
|
const l_ = logr_.l;
|
|
1698
1846
|
// console.log('File location:', import.meta.url, '[Implementation]');
|
|
1699
1847
|
//-------------------------------------------------------------------------------------------------
|
|
@@ -1775,12 +1923,10 @@ function requireJsonMsg_cjs () {
|
|
|
1775
1923
|
|
|
1776
1924
|
var jsonMsg_cjsExports = requireJsonMsg_cjs();
|
|
1777
1925
|
|
|
1778
|
-
const kstr_VERSION = "
|
|
1926
|
+
const kstr_VERSION = "5";
|
|
1779
1927
|
// TODO: use RFC3339 "timestamp"? https://ajv.js.org/json-type-definition.html
|
|
1780
1928
|
//-------------------------------------------------------------------------------------------------
|
|
1781
1929
|
LOGR.get_instance();
|
|
1782
|
-
const obj_labels_shift_ = l_LL_(jsonMsg_cjsExports.logr.lref.get(), 2); // VALIDATION : 4
|
|
1783
|
-
jsonMsg_cjsExports.logr.lref.set(obj_labels_shift_);
|
|
1784
1930
|
const l_ = jsonMsg_cjsExports.logr.l;
|
|
1785
1931
|
//-------------------------------------------------------------------------------------------------
|
|
1786
1932
|
// const regex_IOI= new RegExp('\\bquery\\s*\\{\\s*IOI\\s*\\(\\s*pkg\\s*:\\s*"([^"]*)"\\s*\\)\\s*\\{.*heartbeat\\s*\\}\\s*\\}');
|
package/dist/subverseinfo.es.mjs
CHANGED
|
@@ -85,8 +85,8 @@ function validate19(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
85
85
|
if (valid0) {
|
|
86
86
|
if (data.subverse_info !== undefined) {
|
|
87
87
|
const _errs9 = errors;
|
|
88
|
-
if ("
|
|
89
|
-
validate19.errors = [{ instancePath: instancePath + "/subverse_info", schemaPath: "definitions#/definitions/_v/const", keyword: "const", params: { allowedValue: "
|
|
88
|
+
if ("5" !== data.subverse_info) {
|
|
89
|
+
validate19.errors = [{ instancePath: instancePath + "/subverse_info", schemaPath: "definitions#/definitions/_v/const", keyword: "const", params: { allowedValue: "5" }, message: "must be equal to constant" }];
|
|
90
90
|
return false;
|
|
91
91
|
}
|
|
92
92
|
var valid0 = _errs9 === errors;
|
|
@@ -108,7 +108,7 @@ function validate21(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
108
108
|
evaluated0.props = undefined;
|
|
109
109
|
} if (evaluated0.dynamicItems) {
|
|
110
110
|
evaluated0.items = undefined;
|
|
111
|
-
} {
|
|
111
|
+
} const _errs2 = errors; if (errors === _errs2) {
|
|
112
112
|
if (data && typeof data == "object" && !Array.isArray(data)) {
|
|
113
113
|
let missing0;
|
|
114
114
|
if (((data.uri === undefined) && (missing0 = "uri")) || ((data.name === undefined) && (missing0 = "name"))) {
|
|
@@ -146,7 +146,7 @@ function validate21(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
146
146
|
validate21.errors = [{ instancePath, schemaPath: "definitions#/definitions/unique-id/type", keyword: "type", params: { type: "object" }, message: "must be object" }];
|
|
147
147
|
return false;
|
|
148
148
|
}
|
|
149
|
-
} {
|
|
149
|
+
} if (errors === 0) {
|
|
150
150
|
if (data && typeof data == "object" && !Array.isArray(data)) {
|
|
151
151
|
if (data.favicon !== undefined) {
|
|
152
152
|
const _errs8 = errors;
|
|
@@ -163,25 +163,99 @@ function validate21(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
163
163
|
if (data.hyperport !== undefined) {
|
|
164
164
|
let data3 = data.hyperport;
|
|
165
165
|
const _errs10 = errors;
|
|
166
|
-
|
|
166
|
+
const _errs12 = errors;
|
|
167
|
+
let valid5 = false;
|
|
168
|
+
let passing0 = null;
|
|
169
|
+
const _errs13 = errors;
|
|
170
|
+
if (typeof data3 !== "string") {
|
|
171
|
+
const err0 = { instancePath: instancePath + "/hyperport", schemaPath: "definitions#/definitions/hyperport/oneOf/0/type", keyword: "type", params: { type: "string" }, message: "must be string" };
|
|
172
|
+
if (vErrors === null) {
|
|
173
|
+
vErrors = [err0];
|
|
174
|
+
}
|
|
175
|
+
else {
|
|
176
|
+
vErrors.push(err0);
|
|
177
|
+
}
|
|
178
|
+
errors++;
|
|
179
|
+
}
|
|
180
|
+
var _valid0 = _errs13 === errors;
|
|
181
|
+
if (_valid0) {
|
|
182
|
+
valid5 = true;
|
|
183
|
+
passing0 = 0;
|
|
184
|
+
}
|
|
185
|
+
const _errs15 = errors;
|
|
186
|
+
if (errors === _errs15) {
|
|
167
187
|
if (data3 && typeof data3 == "object" && !Array.isArray(data3)) {
|
|
168
188
|
let missing1;
|
|
169
189
|
if (((data3.uri === undefined) && (missing1 = "uri")) || ((data3.port === undefined) && (missing1 = "port"))) {
|
|
170
|
-
|
|
171
|
-
|
|
190
|
+
const err1 = { instancePath: instancePath + "/hyperport", schemaPath: "definitions#/definitions/hyperport/oneOf/1/required", keyword: "required", params: { missingProperty: missing1 }, message: "must have required property '" + missing1 + "'" };
|
|
191
|
+
if (vErrors === null) {
|
|
192
|
+
vErrors = [err1];
|
|
193
|
+
}
|
|
194
|
+
else {
|
|
195
|
+
vErrors.push(err1);
|
|
196
|
+
}
|
|
197
|
+
errors++;
|
|
172
198
|
}
|
|
173
199
|
else {
|
|
174
200
|
if (data3.uri !== undefined) {
|
|
175
201
|
if (typeof data3.uri !== "string") {
|
|
176
|
-
|
|
177
|
-
|
|
202
|
+
const err2 = { instancePath: instancePath + "/hyperport/uri", schemaPath: "definitions#/definitions/hyperport/oneOf/1/properties/uri/type", keyword: "type", params: { type: "string" }, message: "must be string" };
|
|
203
|
+
if (vErrors === null) {
|
|
204
|
+
vErrors = [err2];
|
|
205
|
+
}
|
|
206
|
+
else {
|
|
207
|
+
vErrors.push(err2);
|
|
208
|
+
}
|
|
209
|
+
errors++;
|
|
178
210
|
}
|
|
179
211
|
}
|
|
180
212
|
}
|
|
181
213
|
}
|
|
182
214
|
else {
|
|
183
|
-
|
|
184
|
-
|
|
215
|
+
const err3 = { instancePath: instancePath + "/hyperport", schemaPath: "definitions#/definitions/hyperport/oneOf/1/type", keyword: "type", params: { type: "object" }, message: "must be object" };
|
|
216
|
+
if (vErrors === null) {
|
|
217
|
+
vErrors = [err3];
|
|
218
|
+
}
|
|
219
|
+
else {
|
|
220
|
+
vErrors.push(err3);
|
|
221
|
+
}
|
|
222
|
+
errors++;
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
var _valid0 = _errs15 === errors;
|
|
226
|
+
if (_valid0 && valid5) {
|
|
227
|
+
valid5 = false;
|
|
228
|
+
passing0 = [passing0, 1];
|
|
229
|
+
}
|
|
230
|
+
else {
|
|
231
|
+
if (_valid0) {
|
|
232
|
+
valid5 = true;
|
|
233
|
+
passing0 = 1;
|
|
234
|
+
var props0 = {};
|
|
235
|
+
props0.uri = true;
|
|
236
|
+
}
|
|
237
|
+
}
|
|
238
|
+
if (!valid5) {
|
|
239
|
+
const err4 = { instancePath: instancePath + "/hyperport", schemaPath: "definitions#/definitions/hyperport/oneOf", keyword: "oneOf", params: { passingSchemas: passing0 }, message: "must match exactly one schema in oneOf" };
|
|
240
|
+
if (vErrors === null) {
|
|
241
|
+
vErrors = [err4];
|
|
242
|
+
}
|
|
243
|
+
else {
|
|
244
|
+
vErrors.push(err4);
|
|
245
|
+
}
|
|
246
|
+
errors++;
|
|
247
|
+
validate21.errors = vErrors;
|
|
248
|
+
return false;
|
|
249
|
+
}
|
|
250
|
+
else {
|
|
251
|
+
errors = _errs12;
|
|
252
|
+
if (vErrors !== null) {
|
|
253
|
+
if (_errs12) {
|
|
254
|
+
vErrors.length = _errs12;
|
|
255
|
+
}
|
|
256
|
+
else {
|
|
257
|
+
vErrors = null;
|
|
258
|
+
}
|
|
185
259
|
}
|
|
186
260
|
}
|
|
187
261
|
var valid3 = _errs10 === errors;
|
|
@@ -192,12 +266,12 @@ function validate21(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
192
266
|
if (valid3) {
|
|
193
267
|
if (data.info !== undefined) {
|
|
194
268
|
let data5 = data.info;
|
|
195
|
-
const
|
|
269
|
+
const _errs19 = errors;
|
|
196
270
|
if (!(data5 && typeof data5 == "object" && !Array.isArray(data5))) {
|
|
197
271
|
validate21.errors = [{ instancePath: instancePath + "/info", schemaPath: "definitions#/definitions/info/type", keyword: "type", params: { type: "object" }, message: "must be object" }];
|
|
198
272
|
return false;
|
|
199
273
|
}
|
|
200
|
-
var valid3 =
|
|
274
|
+
var valid3 = _errs19 === errors;
|
|
201
275
|
}
|
|
202
276
|
else {
|
|
203
277
|
var valid3 = true;
|
|
@@ -215,7 +289,7 @@ function validate24(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
215
289
|
evaluated0.props = undefined;
|
|
216
290
|
} if (evaluated0.dynamicItems) {
|
|
217
291
|
evaluated0.items = undefined;
|
|
218
|
-
} {
|
|
292
|
+
} const _errs2 = errors; if (errors === _errs2) {
|
|
219
293
|
if (data && typeof data == "object" && !Array.isArray(data)) {
|
|
220
294
|
let missing0;
|
|
221
295
|
if (((data.uri === undefined) && (missing0 = "uri")) || ((data.name === undefined) && (missing0 = "name"))) {
|
|
@@ -253,7 +327,7 @@ function validate24(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
253
327
|
validate24.errors = [{ instancePath, schemaPath: "definitions#/definitions/unique-id/type", keyword: "type", params: { type: "object" }, message: "must be object" }];
|
|
254
328
|
return false;
|
|
255
329
|
}
|
|
256
|
-
} {
|
|
330
|
+
} if (errors === 0) {
|
|
257
331
|
if (data && typeof data == "object" && !Array.isArray(data)) {
|
|
258
332
|
if (data.favicon !== undefined) {
|
|
259
333
|
const _errs8 = errors;
|
|
@@ -270,25 +344,99 @@ function validate24(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
270
344
|
if (data.hyperport !== undefined) {
|
|
271
345
|
let data3 = data.hyperport;
|
|
272
346
|
const _errs10 = errors;
|
|
273
|
-
|
|
347
|
+
const _errs12 = errors;
|
|
348
|
+
let valid5 = false;
|
|
349
|
+
let passing0 = null;
|
|
350
|
+
const _errs13 = errors;
|
|
351
|
+
if (typeof data3 !== "string") {
|
|
352
|
+
const err0 = { instancePath: instancePath + "/hyperport", schemaPath: "definitions#/definitions/hyperport/oneOf/0/type", keyword: "type", params: { type: "string" }, message: "must be string" };
|
|
353
|
+
if (vErrors === null) {
|
|
354
|
+
vErrors = [err0];
|
|
355
|
+
}
|
|
356
|
+
else {
|
|
357
|
+
vErrors.push(err0);
|
|
358
|
+
}
|
|
359
|
+
errors++;
|
|
360
|
+
}
|
|
361
|
+
var _valid0 = _errs13 === errors;
|
|
362
|
+
if (_valid0) {
|
|
363
|
+
valid5 = true;
|
|
364
|
+
passing0 = 0;
|
|
365
|
+
}
|
|
366
|
+
const _errs15 = errors;
|
|
367
|
+
if (errors === _errs15) {
|
|
274
368
|
if (data3 && typeof data3 == "object" && !Array.isArray(data3)) {
|
|
275
369
|
let missing1;
|
|
276
370
|
if (((data3.uri === undefined) && (missing1 = "uri")) || ((data3.port === undefined) && (missing1 = "port"))) {
|
|
277
|
-
|
|
278
|
-
|
|
371
|
+
const err1 = { instancePath: instancePath + "/hyperport", schemaPath: "definitions#/definitions/hyperport/oneOf/1/required", keyword: "required", params: { missingProperty: missing1 }, message: "must have required property '" + missing1 + "'" };
|
|
372
|
+
if (vErrors === null) {
|
|
373
|
+
vErrors = [err1];
|
|
374
|
+
}
|
|
375
|
+
else {
|
|
376
|
+
vErrors.push(err1);
|
|
377
|
+
}
|
|
378
|
+
errors++;
|
|
279
379
|
}
|
|
280
380
|
else {
|
|
281
381
|
if (data3.uri !== undefined) {
|
|
282
382
|
if (typeof data3.uri !== "string") {
|
|
283
|
-
|
|
284
|
-
|
|
383
|
+
const err2 = { instancePath: instancePath + "/hyperport/uri", schemaPath: "definitions#/definitions/hyperport/oneOf/1/properties/uri/type", keyword: "type", params: { type: "string" }, message: "must be string" };
|
|
384
|
+
if (vErrors === null) {
|
|
385
|
+
vErrors = [err2];
|
|
386
|
+
}
|
|
387
|
+
else {
|
|
388
|
+
vErrors.push(err2);
|
|
389
|
+
}
|
|
390
|
+
errors++;
|
|
285
391
|
}
|
|
286
392
|
}
|
|
287
393
|
}
|
|
288
394
|
}
|
|
289
395
|
else {
|
|
290
|
-
|
|
291
|
-
|
|
396
|
+
const err3 = { instancePath: instancePath + "/hyperport", schemaPath: "definitions#/definitions/hyperport/oneOf/1/type", keyword: "type", params: { type: "object" }, message: "must be object" };
|
|
397
|
+
if (vErrors === null) {
|
|
398
|
+
vErrors = [err3];
|
|
399
|
+
}
|
|
400
|
+
else {
|
|
401
|
+
vErrors.push(err3);
|
|
402
|
+
}
|
|
403
|
+
errors++;
|
|
404
|
+
}
|
|
405
|
+
}
|
|
406
|
+
var _valid0 = _errs15 === errors;
|
|
407
|
+
if (_valid0 && valid5) {
|
|
408
|
+
valid5 = false;
|
|
409
|
+
passing0 = [passing0, 1];
|
|
410
|
+
}
|
|
411
|
+
else {
|
|
412
|
+
if (_valid0) {
|
|
413
|
+
valid5 = true;
|
|
414
|
+
passing0 = 1;
|
|
415
|
+
var props0 = {};
|
|
416
|
+
props0.uri = true;
|
|
417
|
+
}
|
|
418
|
+
}
|
|
419
|
+
if (!valid5) {
|
|
420
|
+
const err4 = { instancePath: instancePath + "/hyperport", schemaPath: "definitions#/definitions/hyperport/oneOf", keyword: "oneOf", params: { passingSchemas: passing0 }, message: "must match exactly one schema in oneOf" };
|
|
421
|
+
if (vErrors === null) {
|
|
422
|
+
vErrors = [err4];
|
|
423
|
+
}
|
|
424
|
+
else {
|
|
425
|
+
vErrors.push(err4);
|
|
426
|
+
}
|
|
427
|
+
errors++;
|
|
428
|
+
validate24.errors = vErrors;
|
|
429
|
+
return false;
|
|
430
|
+
}
|
|
431
|
+
else {
|
|
432
|
+
errors = _errs12;
|
|
433
|
+
if (vErrors !== null) {
|
|
434
|
+
if (_errs12) {
|
|
435
|
+
vErrors.length = _errs12;
|
|
436
|
+
}
|
|
437
|
+
else {
|
|
438
|
+
vErrors = null;
|
|
439
|
+
}
|
|
292
440
|
}
|
|
293
441
|
}
|
|
294
442
|
var valid3 = _errs10 === errors;
|
|
@@ -299,12 +447,12 @@ function validate24(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
299
447
|
if (valid3) {
|
|
300
448
|
if (data.info !== undefined) {
|
|
301
449
|
let data5 = data.info;
|
|
302
|
-
const
|
|
450
|
+
const _errs19 = errors;
|
|
303
451
|
if (!(data5 && typeof data5 == "object" && !Array.isArray(data5))) {
|
|
304
452
|
validate24.errors = [{ instancePath: instancePath + "/info", schemaPath: "definitions#/definitions/info/type", keyword: "type", params: { type: "object" }, message: "must be object" }];
|
|
305
453
|
return false;
|
|
306
454
|
}
|
|
307
|
-
var valid3 =
|
|
455
|
+
var valid3 = _errs19 === errors;
|
|
308
456
|
}
|
|
309
457
|
else {
|
|
310
458
|
var valid3 = true;
|
|
@@ -703,8 +851,8 @@ function validate20(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
703
851
|
if (valid0) {
|
|
704
852
|
if (data.subverse_info !== undefined) {
|
|
705
853
|
const _errs42 = errors;
|
|
706
|
-
if ("
|
|
707
|
-
validate20.errors = [{ instancePath: instancePath + "/subverse_info", schemaPath: "definitions#/definitions/_v/const", keyword: "const", params: { allowedValue: "
|
|
854
|
+
if ("5" !== data.subverse_info) {
|
|
855
|
+
validate20.errors = [{ instancePath: instancePath + "/subverse_info", schemaPath: "definitions#/definitions/_v/const", keyword: "const", params: { allowedValue: "5" }, message: "must be equal to constant" }];
|
|
708
856
|
return false;
|
|
709
857
|
}
|
|
710
858
|
var valid0 = _errs42 === errors;
|
|
@@ -1100,8 +1248,8 @@ function validate27(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
1100
1248
|
if (valid0) {
|
|
1101
1249
|
if (data.subverse_info !== undefined) {
|
|
1102
1250
|
const _errs44 = errors;
|
|
1103
|
-
if ("
|
|
1104
|
-
validate27.errors = [{ instancePath: instancePath + "/subverse_info", schemaPath: "definitions#/definitions/_v/const", keyword: "const", params: { allowedValue: "
|
|
1251
|
+
if ("5" !== data.subverse_info) {
|
|
1252
|
+
validate27.errors = [{ instancePath: instancePath + "/subverse_info", schemaPath: "definitions#/definitions/_v/const", keyword: "const", params: { allowedValue: "5" }, message: "must be equal to constant" }];
|
|
1105
1253
|
return false;
|
|
1106
1254
|
}
|
|
1107
1255
|
var valid0 = _errs44 === errors;
|
|
@@ -1691,7 +1839,7 @@ function requireJsonMsg_cjs () {
|
|
|
1691
1839
|
|
|
1692
1840
|
//-------------------------------------------------------------------------------------------------
|
|
1693
1841
|
const LOGR_ = bitlogr.LOGR.get_instance();
|
|
1694
|
-
const logr_ = LOGR_.create({ labels: bitlogr.l_array(['VALIDATION'
|
|
1842
|
+
const logr_ = LOGR_.create({ labels: bitlogr.l_array(['VALIDATION']) });
|
|
1695
1843
|
const l_ = logr_.l;
|
|
1696
1844
|
// console.log('File location:', import.meta.url, '[Implementation]');
|
|
1697
1845
|
//-------------------------------------------------------------------------------------------------
|
|
@@ -1773,12 +1921,10 @@ function requireJsonMsg_cjs () {
|
|
|
1773
1921
|
|
|
1774
1922
|
var jsonMsg_cjsExports = requireJsonMsg_cjs();
|
|
1775
1923
|
|
|
1776
|
-
const kstr_VERSION = "
|
|
1924
|
+
const kstr_VERSION = "5";
|
|
1777
1925
|
// TODO: use RFC3339 "timestamp"? https://ajv.js.org/json-type-definition.html
|
|
1778
1926
|
//-------------------------------------------------------------------------------------------------
|
|
1779
1927
|
LOGR.get_instance();
|
|
1780
|
-
const obj_labels_shift_ = l_LL_(jsonMsg_cjsExports.logr.lref.get(), 2); // VALIDATION : 4
|
|
1781
|
-
jsonMsg_cjsExports.logr.lref.set(obj_labels_shift_);
|
|
1782
1928
|
const l_ = jsonMsg_cjsExports.logr.l;
|
|
1783
1929
|
//-------------------------------------------------------------------------------------------------
|
|
1784
1930
|
// const regex_IOI= new RegExp('\\bquery\\s*\\{\\s*IOI\\s*\\(\\s*pkg\\s*:\\s*"([^"]*)"\\s*\\)\\s*\\{.*heartbeat\\s*\\}\\s*\\}');
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rootintf/protocol-subverseinfo",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.1.1-api.5",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "dist/subverseinfo.cjs.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
"homepage": "https://gitlab.com/interface-x/npm-protocol-subverseinfo.git#readme",
|
|
26
26
|
"dependencies": {
|
|
27
27
|
"@knev/bitlogr": "^3.1.3",
|
|
28
|
-
"@rootintf/json-msg": "^2.1.
|
|
28
|
+
"@rootintf/json-msg": "^2.1.7",
|
|
29
29
|
"ajv": "^8.17.1",
|
|
30
30
|
"uuid": "^11.0.3"
|
|
31
31
|
},
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
"$schema" : "https://json-schema.org/draft/2019-09/schema",
|
|
8
8
|
"definitions" : {
|
|
9
9
|
"_v" : {
|
|
10
|
-
"const": "
|
|
10
|
+
"const": "5"
|
|
11
11
|
},
|
|
12
12
|
"unique-id" : {
|
|
13
13
|
"type" : "object",
|
|
@@ -21,11 +21,16 @@
|
|
|
21
21
|
"type" : "object"
|
|
22
22
|
},
|
|
23
23
|
"hyperport" : {
|
|
24
|
-
"
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
24
|
+
"oneOf" : [
|
|
25
|
+
{ "type" : "string" },
|
|
26
|
+
{
|
|
27
|
+
"type" : "object",
|
|
28
|
+
"required" : [ "uri", "port" ],
|
|
29
|
+
"properties" : {
|
|
30
|
+
"uri" : { "type" : "string" }
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
]
|
|
29
34
|
},
|
|
30
35
|
"verse-header" : {
|
|
31
36
|
"type" : "object",
|
package/src/subverseinfo.ts
CHANGED
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
import { LOGR, l_LL } from '@knev/bitlogr';
|
|
10
10
|
import { JSON_Msg, JSON_MsgEffect, logr as logr_ } from '@rootintf/json-msg';
|
|
11
11
|
|
|
12
|
-
const kstr_VERSION= "
|
|
12
|
+
const kstr_VERSION= "5";
|
|
13
13
|
// windows: $ certutil -hashfile schema/schema_Slogr_json_msg_.json Slogr_json_msg_ODO: needs to be a canonical text file: line endings, encoding, whitespace, sorting, redundant data, comments
|
|
14
14
|
const kstr_SubverseInfo_uri= "SubverseInfo:SHA256:f1fb09af477be5fbb7d014ff738fa62637680dacf0ca85ec76d2891518d6efaa";
|
|
15
15
|
|
|
@@ -18,9 +18,6 @@ const kstr_SubverseInfo_uri= "SubverseInfo:SHA256:f1fb09af477be5fbb7d014ff738fa6
|
|
|
18
18
|
//-------------------------------------------------------------------------------------------------
|
|
19
19
|
|
|
20
20
|
const LOGR_= LOGR.get_instance();
|
|
21
|
-
|
|
22
|
-
const obj_labels_shift_= l_LL(logr_.lref.get(), 2); // VALIDATION : 4
|
|
23
|
-
logr_.lref.set(obj_labels_shift_);
|
|
24
21
|
const l_= logr_.l;
|
|
25
22
|
|
|
26
23
|
//-------------------------------------------------------------------------------------------------
|
package/src/validate-esm.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";export const definitions_SubverseInfo = validate18;const schema21 = {"$id":"https://root-interface.se/protocols/SubverseInfo/definitions","$schema":"https://json-schema.org/draft/2019-09/schema","definitions":{"_v":{"const":"4"},"unique-id":{"type":"object","required":["uri","name"],"properties":{"uri":{"type":"string"},"name":{"type":"string"}}},"info":{"type":"object"},"hyperport":{"type":"object","required":["uri","port"],"properties":{"uri":{"type":"string"}}},"verse-header":{"type":"object","allOf":[{"$ref":"definitions#/definitions/unique-id"}],"required":[],"properties":{"favicon":{"type":"string"},"hyperport":{"$ref":"definitions#/definitions/hyperport"},"info":{"$ref":"definitions#/definitions/info"}}},"instances":{"type":"array","items":{"type":"object","allOf":[{"$ref":"definitions#/definitions/verse-header"}],"properties":{},"unevaluatedProperties":false}},"platforms":{"type":"array","items":{"type":"object","required":["id"],"properties":{"id":{"type":"string"},"archs":{"type":"array","items":{"type":"string"}},"agents":{"type":"array","items":{"type":"string"}}}}},"protocols":{"type":"array","items":{"type":"object","required":["id","attr"],"properties":{"id":{"type":"string"},"name":{"type":"string"},"version":{"type":"string"},"attr":{"type":"string"},"url":{"type":"string"}}}}}};function validate18(data, {instancePath="", parentData, parentDataProperty, rootData=data, dynamicAnchors={}}={}){/*# sourceURL="https://root-interface.se/protocols/SubverseInfo/definitions" */;validate18.errors = null;return true;}validate18.evaluated = {"dynamicProps":false,"dynamicItems":false};export const schema_SubverseInfo_query = validate19;const schema22 = {"$id":"https://root-interface.se/protocols/SubverseInfo/query","$schema":"https://json-schema.org/draft/2019-09/schema","type":"object","required":["query","subverse_info"],"properties":{"query":{"type":"object","required":["name","graphql","ttl_msec"],"properties":{"name":{"type":"string"},"graphql":{"type":"string"},"ttl_msec":{"type":"integer"},"unevaluatedProperties":false}},"subverse_info":{"$ref":"definitions#/definitions/_v"}}};const schema23 = {"const":"4"};function validate19(data, {instancePath="", parentData, parentDataProperty, rootData=data, dynamicAnchors={}}={}){/*# sourceURL="https://root-interface.se/protocols/SubverseInfo/query" */;let vErrors = null;let errors = 0;const evaluated0 = validate19.evaluated;if(evaluated0.dynamicProps){evaluated0.props = undefined;}if(evaluated0.dynamicItems){evaluated0.items = undefined;}if(errors === 0){if(data && typeof data == "object" && !Array.isArray(data)){let missing0;if(((data.query === undefined) && (missing0 = "query")) || ((data.subverse_info === undefined) && (missing0 = "subverse_info"))){validate19.errors = [{instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: missing0},message:"must have required property '"+missing0+"'"}];return false;}else {if(data.query !== undefined){let data0 = data.query;const _errs1 = errors;if(errors === _errs1){if(data0 && typeof data0 == "object" && !Array.isArray(data0)){let missing1;if((((data0.name === undefined) && (missing1 = "name")) || ((data0.graphql === undefined) && (missing1 = "graphql"))) || ((data0.ttl_msec === undefined) && (missing1 = "ttl_msec"))){validate19.errors = [{instancePath:instancePath+"/query",schemaPath:"#/properties/query/required",keyword:"required",params:{missingProperty: missing1},message:"must have required property '"+missing1+"'"}];return false;}else {if(data0.name !== undefined){const _errs3 = errors;if(typeof data0.name !== "string"){validate19.errors = [{instancePath:instancePath+"/query/name",schemaPath:"#/properties/query/properties/name/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}var valid1 = _errs3 === errors;}else {var valid1 = true;}if(valid1){if(data0.graphql !== undefined){const _errs5 = errors;if(typeof data0.graphql !== "string"){validate19.errors = [{instancePath:instancePath+"/query/graphql",schemaPath:"#/properties/query/properties/graphql/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}var valid1 = _errs5 === errors;}else {var valid1 = true;}if(valid1){if(data0.ttl_msec !== undefined){let data3 = data0.ttl_msec;const _errs7 = errors;if(!(((typeof data3 == "number") && (!(data3 % 1) && !isNaN(data3))) && (isFinite(data3)))){validate19.errors = [{instancePath:instancePath+"/query/ttl_msec",schemaPath:"#/properties/query/properties/ttl_msec/type",keyword:"type",params:{type: "integer"},message:"must be integer"}];return false;}var valid1 = _errs7 === errors;}else {var valid1 = true;}if(valid1){if(data0.unevaluatedProperties !== undefined){var valid1 = false;validate19.errors = [{instancePath:instancePath+"/query/unevaluatedProperties",schemaPath:"#/properties/query/properties/unevaluatedProperties/false schema",keyword:"false schema",params:{},message:"boolean schema is false"}];return false;}else {var valid1 = true;}}}}}}else {validate19.errors = [{instancePath:instancePath+"/query",schemaPath:"#/properties/query/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}}var valid0 = _errs1 === errors;}else {var valid0 = true;}if(valid0){if(data.subverse_info !== undefined){const _errs9 = errors;if("4" !== data.subverse_info){validate19.errors = [{instancePath:instancePath+"/subverse_info",schemaPath:"definitions#/definitions/_v/const",keyword:"const",params:{allowedValue: "4"},message:"must be equal to constant"}];return false;}var valid0 = _errs9 === errors;}else {var valid0 = true;}}}}else {validate19.errors = [{instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}}validate19.errors = vErrors;return errors === 0;}validate19.evaluated = {"props":{"query":true,"subverse_info":true},"dynamicProps":false,"dynamicItems":false};export const schema_SubverseInfo_subverse = validate20;const schema24 = {"$id":"https://root-interface.se/protocols/SubverseInfo/subverse","$schema":"https://json-schema.org/draft/2019-09/schema","type":"object","required":["expanse","subverse_info"],"properties":{"expanse":{"type":"object","required":["subverse","protocols"],"not":{"required":["instances"]},"properties":{"subverse":{"type":"object","allOf":[{"$ref":"definitions#/definitions/verse-header"}],"required":[],"properties":{"map-uri":{"type":"string"},"instances":{"$ref":"definitions#/definitions/instances"}},"unevaluatedProperties":false},"platforms":{"$ref":"definitions#/definitions/platforms"},"protocols":{"$ref":"definitions#/definitions/protocols"}}},"subverse_info":{"$ref":"definitions#/definitions/_v"}}};const schema34 = {"type":"array","items":{"type":"object","required":["id"],"properties":{"id":{"type":"string"},"archs":{"type":"array","items":{"type":"string"}},"agents":{"type":"array","items":{"type":"string"}}}}};const schema35 = {"type":"array","items":{"type":"object","required":["id","attr"],"properties":{"id":{"type":"string"},"name":{"type":"string"},"version":{"type":"string"},"attr":{"type":"string"},"url":{"type":"string"}}}};const schema25 = {"type":"object","allOf":[{"$ref":"definitions#/definitions/unique-id"}],"required":[],"properties":{"favicon":{"type":"string"},"hyperport":{"$ref":"definitions#/definitions/hyperport"},"info":{"$ref":"definitions#/definitions/info"}}};const schema26 = {"type":"object","required":["uri","name"],"properties":{"uri":{"type":"string"},"name":{"type":"string"}}};const schema27 = {"type":"object","required":["uri","port"],"properties":{"uri":{"type":"string"}}};const schema28 = {"type":"object"};function validate21(data, {instancePath="", parentData, parentDataProperty, rootData=data, dynamicAnchors={}}={}){let vErrors = null;let errors = 0;const evaluated0 = validate21.evaluated;if(evaluated0.dynamicProps){evaluated0.props = undefined;}if(evaluated0.dynamicItems){evaluated0.items = undefined;}const _errs2 = errors;if(errors === _errs2){if(data && typeof data == "object" && !Array.isArray(data)){let missing0;if(((data.uri === undefined) && (missing0 = "uri")) || ((data.name === undefined) && (missing0 = "name"))){validate21.errors = [{instancePath,schemaPath:"definitions#/definitions/unique-id/required",keyword:"required",params:{missingProperty: missing0},message:"must have required property '"+missing0+"'"}];return false;}else {if(data.uri !== undefined){const _errs4 = errors;if(typeof data.uri !== "string"){validate21.errors = [{instancePath:instancePath+"/uri",schemaPath:"definitions#/definitions/unique-id/properties/uri/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}var valid2 = _errs4 === errors;}else {var valid2 = true;}if(valid2){if(data.name !== undefined){const _errs6 = errors;if(typeof data.name !== "string"){validate21.errors = [{instancePath:instancePath+"/name",schemaPath:"definitions#/definitions/unique-id/properties/name/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}var valid2 = _errs6 === errors;}else {var valid2 = true;}}}}else {validate21.errors = [{instancePath,schemaPath:"definitions#/definitions/unique-id/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}}if(errors === 0){if(data && typeof data == "object" && !Array.isArray(data)){if(data.favicon !== undefined){const _errs8 = errors;if(typeof data.favicon !== "string"){validate21.errors = [{instancePath:instancePath+"/favicon",schemaPath:"#/properties/favicon/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}var valid3 = _errs8 === errors;}else {var valid3 = true;}if(valid3){if(data.hyperport !== undefined){let data3 = data.hyperport;const _errs10 = errors;const _errs11 = errors;if(errors === _errs11){if(data3 && typeof data3 == "object" && !Array.isArray(data3)){let missing1;if(((data3.uri === undefined) && (missing1 = "uri")) || ((data3.port === undefined) && (missing1 = "port"))){validate21.errors = [{instancePath:instancePath+"/hyperport",schemaPath:"definitions#/definitions/hyperport/required",keyword:"required",params:{missingProperty: missing1},message:"must have required property '"+missing1+"'"}];return false;}else {if(data3.uri !== undefined){if(typeof data3.uri !== "string"){validate21.errors = [{instancePath:instancePath+"/hyperport/uri",schemaPath:"definitions#/definitions/hyperport/properties/uri/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}}}}else {validate21.errors = [{instancePath:instancePath+"/hyperport",schemaPath:"definitions#/definitions/hyperport/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}}var valid3 = _errs10 === errors;}else {var valid3 = true;}if(valid3){if(data.info !== undefined){let data5 = data.info;const _errs15 = errors;if(!(data5 && typeof data5 == "object" && !Array.isArray(data5))){validate21.errors = [{instancePath:instancePath+"/info",schemaPath:"definitions#/definitions/info/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}var valid3 = _errs15 === errors;}else {var valid3 = true;}}}}else {validate21.errors = [{instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}}validate21.errors = vErrors;return errors === 0;}validate21.evaluated = {"props":{"favicon":true,"hyperport":true,"info":true,"uri":true,"name":true},"dynamicProps":false,"dynamicItems":false};const schema29 = {"type":"array","items":{"type":"object","allOf":[{"$ref":"definitions#/definitions/verse-header"}],"properties":{},"unevaluatedProperties":false}};function validate24(data, {instancePath="", parentData, parentDataProperty, rootData=data, dynamicAnchors={}}={}){let vErrors = null;let errors = 0;const evaluated0 = validate24.evaluated;if(evaluated0.dynamicProps){evaluated0.props = undefined;}if(evaluated0.dynamicItems){evaluated0.items = undefined;}const _errs2 = errors;if(errors === _errs2){if(data && typeof data == "object" && !Array.isArray(data)){let missing0;if(((data.uri === undefined) && (missing0 = "uri")) || ((data.name === undefined) && (missing0 = "name"))){validate24.errors = [{instancePath,schemaPath:"definitions#/definitions/unique-id/required",keyword:"required",params:{missingProperty: missing0},message:"must have required property '"+missing0+"'"}];return false;}else {if(data.uri !== undefined){const _errs4 = errors;if(typeof data.uri !== "string"){validate24.errors = [{instancePath:instancePath+"/uri",schemaPath:"definitions#/definitions/unique-id/properties/uri/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}var valid2 = _errs4 === errors;}else {var valid2 = true;}if(valid2){if(data.name !== undefined){const _errs6 = errors;if(typeof data.name !== "string"){validate24.errors = [{instancePath:instancePath+"/name",schemaPath:"definitions#/definitions/unique-id/properties/name/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}var valid2 = _errs6 === errors;}else {var valid2 = true;}}}}else {validate24.errors = [{instancePath,schemaPath:"definitions#/definitions/unique-id/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}}if(errors === 0){if(data && typeof data == "object" && !Array.isArray(data)){if(data.favicon !== undefined){const _errs8 = errors;if(typeof data.favicon !== "string"){validate24.errors = [{instancePath:instancePath+"/favicon",schemaPath:"#/properties/favicon/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}var valid3 = _errs8 === errors;}else {var valid3 = true;}if(valid3){if(data.hyperport !== undefined){let data3 = data.hyperport;const _errs10 = errors;const _errs11 = errors;if(errors === _errs11){if(data3 && typeof data3 == "object" && !Array.isArray(data3)){let missing1;if(((data3.uri === undefined) && (missing1 = "uri")) || ((data3.port === undefined) && (missing1 = "port"))){validate24.errors = [{instancePath:instancePath+"/hyperport",schemaPath:"definitions#/definitions/hyperport/required",keyword:"required",params:{missingProperty: missing1},message:"must have required property '"+missing1+"'"}];return false;}else {if(data3.uri !== undefined){if(typeof data3.uri !== "string"){validate24.errors = [{instancePath:instancePath+"/hyperport/uri",schemaPath:"definitions#/definitions/hyperport/properties/uri/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}}}}else {validate24.errors = [{instancePath:instancePath+"/hyperport",schemaPath:"definitions#/definitions/hyperport/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}}var valid3 = _errs10 === errors;}else {var valid3 = true;}if(valid3){if(data.info !== undefined){let data5 = data.info;const _errs15 = errors;if(!(data5 && typeof data5 == "object" && !Array.isArray(data5))){validate24.errors = [{instancePath:instancePath+"/info",schemaPath:"definitions#/definitions/info/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}var valid3 = _errs15 === errors;}else {var valid3 = true;}}}}else {validate24.errors = [{instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}}validate24.errors = vErrors;return errors === 0;}validate24.evaluated = {"props":{"favicon":true,"hyperport":true,"info":true,"uri":true,"name":true},"dynamicProps":false,"dynamicItems":false};function validate23(data, {instancePath="", parentData, parentDataProperty, rootData=data, dynamicAnchors={}}={}){let vErrors = null;let errors = 0;const evaluated0 = validate23.evaluated;if(evaluated0.dynamicProps){evaluated0.props = undefined;}if(evaluated0.dynamicItems){evaluated0.items = undefined;}if(errors === 0){if(Array.isArray(data)){var valid0 = true;const len0 = data.length;for(let i0=0; i0<len0; i0++){let data0 = data[i0];const _errs1 = errors;if(!(validate24(data0, {instancePath:instancePath+"/" + i0,parentData:data,parentDataProperty:i0,rootData,dynamicAnchors}))){vErrors = vErrors === null ? validate24.errors : vErrors.concat(validate24.errors);errors = vErrors.length;}if(errors === _errs1){if(data0 && typeof data0 == "object" && !Array.isArray(data0)){for(const key0 in data0){if(((((key0 !== "favicon") && (key0 !== "hyperport")) && (key0 !== "info")) && (key0 !== "uri")) && (key0 !== "name")){validate23.errors = [{instancePath:instancePath+"/" + i0,schemaPath:"#/items/unevaluatedProperties",keyword:"unevaluatedProperties",params:{unevaluatedProperty: key0},message:"must NOT have unevaluated properties"}];return false;break;}}}else {validate23.errors = [{instancePath:instancePath+"/" + i0,schemaPath:"#/items/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}}var valid0 = _errs1 === errors;if(!valid0){break;}}}else {validate23.errors = [{instancePath,schemaPath:"#/type",keyword:"type",params:{type: "array"},message:"must be array"}];return false;}}validate23.errors = vErrors;return errors === 0;}validate23.evaluated = {"items":true,"dynamicProps":false,"dynamicItems":false};function validate20(data, {instancePath="", parentData, parentDataProperty, rootData=data, dynamicAnchors={}}={}){/*# sourceURL="https://root-interface.se/protocols/SubverseInfo/subverse" */;let vErrors = null;let errors = 0;const evaluated0 = validate20.evaluated;if(evaluated0.dynamicProps){evaluated0.props = undefined;}if(evaluated0.dynamicItems){evaluated0.items = undefined;}if(errors === 0){if(data && typeof data == "object" && !Array.isArray(data)){let missing0;if(((data.expanse === undefined) && (missing0 = "expanse")) || ((data.subverse_info === undefined) && (missing0 = "subverse_info"))){validate20.errors = [{instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: missing0},message:"must have required property '"+missing0+"'"}];return false;}else {if(data.expanse !== undefined){let data0 = data.expanse;const _errs1 = errors;const _errs3 = errors;const _errs4 = errors;if(data0 && typeof data0 == "object" && !Array.isArray(data0)){let missing1;if((data0.instances === undefined) && (missing1 = "instances")){const err0 = {};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}}var valid1 = _errs4 === errors;if(valid1){validate20.errors = [{instancePath:instancePath+"/expanse",schemaPath:"#/properties/expanse/not",keyword:"not",params:{},message:"must NOT be valid"}];return false;}else {errors = _errs3;if(vErrors !== null){if(_errs3){vErrors.length = _errs3;}else {vErrors = null;}}}if(errors === _errs1){if(data0 && typeof data0 == "object" && !Array.isArray(data0)){let missing2;if(((data0.subverse === undefined) && (missing2 = "subverse")) || ((data0.protocols === undefined) && (missing2 = "protocols"))){validate20.errors = [{instancePath:instancePath+"/expanse",schemaPath:"#/properties/expanse/required",keyword:"required",params:{missingProperty: missing2},message:"must have required property '"+missing2+"'"}];return false;}else {if(data0.subverse !== undefined){let data1 = data0.subverse;const _errs5 = errors;if(!(validate21(data1, {instancePath:instancePath+"/expanse/subverse",parentData:data0,parentDataProperty:"subverse",rootData,dynamicAnchors}))){vErrors = vErrors === null ? validate21.errors : vErrors.concat(validate21.errors);errors = vErrors.length;}if(errors === _errs5){if(data1 && typeof data1 == "object" && !Array.isArray(data1)){if(data1["map-uri"] !== undefined){const _errs8 = errors;if(typeof data1["map-uri"] !== "string"){validate20.errors = [{instancePath:instancePath+"/expanse/subverse/map-uri",schemaPath:"#/properties/expanse/properties/subverse/properties/map-uri/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}var valid4 = _errs8 === errors;}else {var valid4 = true;}if(valid4){if(data1.instances !== undefined){const _errs10 = errors;if(!(validate23(data1.instances, {instancePath:instancePath+"/expanse/subverse/instances",parentData:data1,parentDataProperty:"instances",rootData,dynamicAnchors}))){vErrors = vErrors === null ? validate23.errors : vErrors.concat(validate23.errors);errors = vErrors.length;}var valid4 = _errs10 === errors;}else {var valid4 = true;}if(valid4){for(const key0 in data1){if(((((((key0 !== "map-uri") && (key0 !== "instances")) && (key0 !== "favicon")) && (key0 !== "hyperport")) && (key0 !== "info")) && (key0 !== "uri")) && (key0 !== "name")){validate20.errors = [{instancePath:instancePath+"/expanse/subverse",schemaPath:"#/properties/expanse/properties/subverse/unevaluatedProperties",keyword:"unevaluatedProperties",params:{unevaluatedProperty: key0},message:"must NOT have unevaluated properties"}];return false;break;}}}}}else {validate20.errors = [{instancePath:instancePath+"/expanse/subverse",schemaPath:"#/properties/expanse/properties/subverse/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}}var valid2 = _errs5 === errors;}else {var valid2 = true;}if(valid2){if(data0.platforms !== undefined){let data4 = data0.platforms;const _errs12 = errors;const _errs13 = errors;if(errors === _errs13){if(Array.isArray(data4)){var valid6 = true;const len0 = data4.length;for(let i0=0; i0<len0; i0++){let data5 = data4[i0];const _errs15 = errors;if(errors === _errs15){if(data5 && typeof data5 == "object" && !Array.isArray(data5)){let missing3;if((data5.id === undefined) && (missing3 = "id")){validate20.errors = [{instancePath:instancePath+"/expanse/platforms/" + i0,schemaPath:"definitions#/definitions/platforms/items/required",keyword:"required",params:{missingProperty: missing3},message:"must have required property '"+missing3+"'"}];return false;}else {if(data5.id !== undefined){const _errs17 = errors;if(typeof data5.id !== "string"){validate20.errors = [{instancePath:instancePath+"/expanse/platforms/" + i0+"/id",schemaPath:"definitions#/definitions/platforms/items/properties/id/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}var valid7 = _errs17 === errors;}else {var valid7 = true;}if(valid7){if(data5.archs !== undefined){let data7 = data5.archs;const _errs19 = errors;if(errors === _errs19){if(Array.isArray(data7)){var valid8 = true;const len1 = data7.length;for(let i1=0; i1<len1; i1++){const _errs21 = errors;if(typeof data7[i1] !== "string"){validate20.errors = [{instancePath:instancePath+"/expanse/platforms/" + i0+"/archs/" + i1,schemaPath:"definitions#/definitions/platforms/items/properties/archs/items/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}var valid8 = _errs21 === errors;if(!valid8){break;}}}else {validate20.errors = [{instancePath:instancePath+"/expanse/platforms/" + i0+"/archs",schemaPath:"definitions#/definitions/platforms/items/properties/archs/type",keyword:"type",params:{type: "array"},message:"must be array"}];return false;}}var valid7 = _errs19 === errors;}else {var valid7 = true;}if(valid7){if(data5.agents !== undefined){let data9 = data5.agents;const _errs23 = errors;if(errors === _errs23){if(Array.isArray(data9)){var valid9 = true;const len2 = data9.length;for(let i2=0; i2<len2; i2++){const _errs25 = errors;if(typeof data9[i2] !== "string"){validate20.errors = [{instancePath:instancePath+"/expanse/platforms/" + i0+"/agents/" + i2,schemaPath:"definitions#/definitions/platforms/items/properties/agents/items/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}var valid9 = _errs25 === errors;if(!valid9){break;}}}else {validate20.errors = [{instancePath:instancePath+"/expanse/platforms/" + i0+"/agents",schemaPath:"definitions#/definitions/platforms/items/properties/agents/type",keyword:"type",params:{type: "array"},message:"must be array"}];return false;}}var valid7 = _errs23 === errors;}else {var valid7 = true;}}}}}else {validate20.errors = [{instancePath:instancePath+"/expanse/platforms/" + i0,schemaPath:"definitions#/definitions/platforms/items/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}}var valid6 = _errs15 === errors;if(!valid6){break;}}}else {validate20.errors = [{instancePath:instancePath+"/expanse/platforms",schemaPath:"definitions#/definitions/platforms/type",keyword:"type",params:{type: "array"},message:"must be array"}];return false;}}var valid2 = _errs12 === errors;}else {var valid2 = true;}if(valid2){if(data0.protocols !== undefined){let data11 = data0.protocols;const _errs27 = errors;const _errs28 = errors;if(errors === _errs28){if(Array.isArray(data11)){var valid11 = true;const len3 = data11.length;for(let i3=0; i3<len3; i3++){let data12 = data11[i3];const _errs30 = errors;if(errors === _errs30){if(data12 && typeof data12 == "object" && !Array.isArray(data12)){let missing4;if(((data12.id === undefined) && (missing4 = "id")) || ((data12.attr === undefined) && (missing4 = "attr"))){validate20.errors = [{instancePath:instancePath+"/expanse/protocols/" + i3,schemaPath:"definitions#/definitions/protocols/items/required",keyword:"required",params:{missingProperty: missing4},message:"must have required property '"+missing4+"'"}];return false;}else {if(data12.id !== undefined){const _errs32 = errors;if(typeof data12.id !== "string"){validate20.errors = [{instancePath:instancePath+"/expanse/protocols/" + i3+"/id",schemaPath:"definitions#/definitions/protocols/items/properties/id/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}var valid12 = _errs32 === errors;}else {var valid12 = true;}if(valid12){if(data12.name !== undefined){const _errs34 = errors;if(typeof data12.name !== "string"){validate20.errors = [{instancePath:instancePath+"/expanse/protocols/" + i3+"/name",schemaPath:"definitions#/definitions/protocols/items/properties/name/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}var valid12 = _errs34 === errors;}else {var valid12 = true;}if(valid12){if(data12.version !== undefined){const _errs36 = errors;if(typeof data12.version !== "string"){validate20.errors = [{instancePath:instancePath+"/expanse/protocols/" + i3+"/version",schemaPath:"definitions#/definitions/protocols/items/properties/version/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}var valid12 = _errs36 === errors;}else {var valid12 = true;}if(valid12){if(data12.attr !== undefined){const _errs38 = errors;if(typeof data12.attr !== "string"){validate20.errors = [{instancePath:instancePath+"/expanse/protocols/" + i3+"/attr",schemaPath:"definitions#/definitions/protocols/items/properties/attr/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}var valid12 = _errs38 === errors;}else {var valid12 = true;}if(valid12){if(data12.url !== undefined){const _errs40 = errors;if(typeof data12.url !== "string"){validate20.errors = [{instancePath:instancePath+"/expanse/protocols/" + i3+"/url",schemaPath:"definitions#/definitions/protocols/items/properties/url/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}var valid12 = _errs40 === errors;}else {var valid12 = true;}}}}}}}else {validate20.errors = [{instancePath:instancePath+"/expanse/protocols/" + i3,schemaPath:"definitions#/definitions/protocols/items/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}}var valid11 = _errs30 === errors;if(!valid11){break;}}}else {validate20.errors = [{instancePath:instancePath+"/expanse/protocols",schemaPath:"definitions#/definitions/protocols/type",keyword:"type",params:{type: "array"},message:"must be array"}];return false;}}var valid2 = _errs27 === errors;}else {var valid2 = true;}}}}}else {validate20.errors = [{instancePath:instancePath+"/expanse",schemaPath:"#/properties/expanse/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}}var valid0 = _errs1 === errors;}else {var valid0 = true;}if(valid0){if(data.subverse_info !== undefined){const _errs42 = errors;if("4" !== data.subverse_info){validate20.errors = [{instancePath:instancePath+"/subverse_info",schemaPath:"definitions#/definitions/_v/const",keyword:"const",params:{allowedValue: "4"},message:"must be equal to constant"}];return false;}var valid0 = _errs42 === errors;}else {var valid0 = true;}}}}else {validate20.errors = [{instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}}validate20.errors = vErrors;return errors === 0;}validate20.evaluated = {"props":{"expanse":true,"subverse_info":true},"dynamicProps":false,"dynamicItems":false};export const schema_SubverseInfo_instances = validate27;const schema37 = {"$id":"https://root-interface.se/protocols/SubverseInfo/instances","$schema":"https://json-schema.org/draft/2019-09/schema","type":"object","required":["expanse","subverse_info"],"properties":{"expanse":{"type":"object","required":["instances"],"properties":{"instances":{"$ref":"definitions#/definitions/instances"},"subverse":{"type":"object","allOf":[{"$ref":"definitions#/definitions/unique-id"}],"unevaluatedProperties":false},"platforms":{"$ref":"definitions#/definitions/platforms"},"protocols":{"$ref":"definitions#/definitions/protocols"}}},"subverse_info":{"$ref":"definitions#/definitions/_v"}}};function validate28(data, {instancePath="", parentData, parentDataProperty, rootData=data, dynamicAnchors={}}={}){let vErrors = null;let errors = 0;const evaluated0 = validate28.evaluated;if(evaluated0.dynamicProps){evaluated0.props = undefined;}if(evaluated0.dynamicItems){evaluated0.items = undefined;}if(errors === 0){if(Array.isArray(data)){var valid0 = true;const len0 = data.length;for(let i0=0; i0<len0; i0++){let data0 = data[i0];const _errs1 = errors;if(!(validate24(data0, {instancePath:instancePath+"/" + i0,parentData:data,parentDataProperty:i0,rootData,dynamicAnchors}))){vErrors = vErrors === null ? validate24.errors : vErrors.concat(validate24.errors);errors = vErrors.length;}if(errors === _errs1){if(data0 && typeof data0 == "object" && !Array.isArray(data0)){for(const key0 in data0){if(((((key0 !== "favicon") && (key0 !== "hyperport")) && (key0 !== "info")) && (key0 !== "uri")) && (key0 !== "name")){validate28.errors = [{instancePath:instancePath+"/" + i0,schemaPath:"#/items/unevaluatedProperties",keyword:"unevaluatedProperties",params:{unevaluatedProperty: key0},message:"must NOT have unevaluated properties"}];return false;break;}}}else {validate28.errors = [{instancePath:instancePath+"/" + i0,schemaPath:"#/items/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}}var valid0 = _errs1 === errors;if(!valid0){break;}}}else {validate28.errors = [{instancePath,schemaPath:"#/type",keyword:"type",params:{type: "array"},message:"must be array"}];return false;}}validate28.errors = vErrors;return errors === 0;}validate28.evaluated = {"items":true,"dynamicProps":false,"dynamicItems":false};function validate27(data, {instancePath="", parentData, parentDataProperty, rootData=data, dynamicAnchors={}}={}){/*# sourceURL="https://root-interface.se/protocols/SubverseInfo/instances" */;let vErrors = null;let errors = 0;const evaluated0 = validate27.evaluated;if(evaluated0.dynamicProps){evaluated0.props = undefined;}if(evaluated0.dynamicItems){evaluated0.items = undefined;}if(errors === 0){if(data && typeof data == "object" && !Array.isArray(data)){let missing0;if(((data.expanse === undefined) && (missing0 = "expanse")) || ((data.subverse_info === undefined) && (missing0 = "subverse_info"))){validate27.errors = [{instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: missing0},message:"must have required property '"+missing0+"'"}];return false;}else {if(data.expanse !== undefined){let data0 = data.expanse;const _errs1 = errors;if(errors === _errs1){if(data0 && typeof data0 == "object" && !Array.isArray(data0)){let missing1;if((data0.instances === undefined) && (missing1 = "instances")){validate27.errors = [{instancePath:instancePath+"/expanse",schemaPath:"#/properties/expanse/required",keyword:"required",params:{missingProperty: missing1},message:"must have required property '"+missing1+"'"}];return false;}else {if(data0.instances !== undefined){const _errs3 = errors;if(!(validate28(data0.instances, {instancePath:instancePath+"/expanse/instances",parentData:data0,parentDataProperty:"instances",rootData,dynamicAnchors}))){vErrors = vErrors === null ? validate28.errors : vErrors.concat(validate28.errors);errors = vErrors.length;}var valid1 = _errs3 === errors;}else {var valid1 = true;}if(valid1){if(data0.subverse !== undefined){let data2 = data0.subverse;const _errs4 = errors;const _errs7 = errors;if(errors === _errs7){if(data2 && typeof data2 == "object" && !Array.isArray(data2)){let missing2;if(((data2.uri === undefined) && (missing2 = "uri")) || ((data2.name === undefined) && (missing2 = "name"))){validate27.errors = [{instancePath:instancePath+"/expanse/subverse",schemaPath:"definitions#/definitions/unique-id/required",keyword:"required",params:{missingProperty: missing2},message:"must have required property '"+missing2+"'"}];return false;}else {if(data2.uri !== undefined){const _errs9 = errors;if(typeof data2.uri !== "string"){validate27.errors = [{instancePath:instancePath+"/expanse/subverse/uri",schemaPath:"definitions#/definitions/unique-id/properties/uri/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}var valid4 = _errs9 === errors;}else {var valid4 = true;}if(valid4){if(data2.name !== undefined){const _errs11 = errors;if(typeof data2.name !== "string"){validate27.errors = [{instancePath:instancePath+"/expanse/subverse/name",schemaPath:"definitions#/definitions/unique-id/properties/name/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}var valid4 = _errs11 === errors;}else {var valid4 = true;}}}}else {validate27.errors = [{instancePath:instancePath+"/expanse/subverse",schemaPath:"definitions#/definitions/unique-id/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}}if(errors === _errs4){if(data2 && typeof data2 == "object" && !Array.isArray(data2)){for(const key0 in data2){if((key0 !== "uri") && (key0 !== "name")){validate27.errors = [{instancePath:instancePath+"/expanse/subverse",schemaPath:"#/properties/expanse/properties/subverse/unevaluatedProperties",keyword:"unevaluatedProperties",params:{unevaluatedProperty: key0},message:"must NOT have unevaluated properties"}];return false;break;}}}else {validate27.errors = [{instancePath:instancePath+"/expanse/subverse",schemaPath:"#/properties/expanse/properties/subverse/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}}var valid1 = _errs4 === errors;}else {var valid1 = true;}if(valid1){if(data0.platforms !== undefined){let data5 = data0.platforms;const _errs14 = errors;const _errs15 = errors;if(errors === _errs15){if(Array.isArray(data5)){var valid6 = true;const len0 = data5.length;for(let i0=0; i0<len0; i0++){let data6 = data5[i0];const _errs17 = errors;if(errors === _errs17){if(data6 && typeof data6 == "object" && !Array.isArray(data6)){let missing3;if((data6.id === undefined) && (missing3 = "id")){validate27.errors = [{instancePath:instancePath+"/expanse/platforms/" + i0,schemaPath:"definitions#/definitions/platforms/items/required",keyword:"required",params:{missingProperty: missing3},message:"must have required property '"+missing3+"'"}];return false;}else {if(data6.id !== undefined){const _errs19 = errors;if(typeof data6.id !== "string"){validate27.errors = [{instancePath:instancePath+"/expanse/platforms/" + i0+"/id",schemaPath:"definitions#/definitions/platforms/items/properties/id/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}var valid7 = _errs19 === errors;}else {var valid7 = true;}if(valid7){if(data6.archs !== undefined){let data8 = data6.archs;const _errs21 = errors;if(errors === _errs21){if(Array.isArray(data8)){var valid8 = true;const len1 = data8.length;for(let i1=0; i1<len1; i1++){const _errs23 = errors;if(typeof data8[i1] !== "string"){validate27.errors = [{instancePath:instancePath+"/expanse/platforms/" + i0+"/archs/" + i1,schemaPath:"definitions#/definitions/platforms/items/properties/archs/items/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}var valid8 = _errs23 === errors;if(!valid8){break;}}}else {validate27.errors = [{instancePath:instancePath+"/expanse/platforms/" + i0+"/archs",schemaPath:"definitions#/definitions/platforms/items/properties/archs/type",keyword:"type",params:{type: "array"},message:"must be array"}];return false;}}var valid7 = _errs21 === errors;}else {var valid7 = true;}if(valid7){if(data6.agents !== undefined){let data10 = data6.agents;const _errs25 = errors;if(errors === _errs25){if(Array.isArray(data10)){var valid9 = true;const len2 = data10.length;for(let i2=0; i2<len2; i2++){const _errs27 = errors;if(typeof data10[i2] !== "string"){validate27.errors = [{instancePath:instancePath+"/expanse/platforms/" + i0+"/agents/" + i2,schemaPath:"definitions#/definitions/platforms/items/properties/agents/items/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}var valid9 = _errs27 === errors;if(!valid9){break;}}}else {validate27.errors = [{instancePath:instancePath+"/expanse/platforms/" + i0+"/agents",schemaPath:"definitions#/definitions/platforms/items/properties/agents/type",keyword:"type",params:{type: "array"},message:"must be array"}];return false;}}var valid7 = _errs25 === errors;}else {var valid7 = true;}}}}}else {validate27.errors = [{instancePath:instancePath+"/expanse/platforms/" + i0,schemaPath:"definitions#/definitions/platforms/items/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}}var valid6 = _errs17 === errors;if(!valid6){break;}}}else {validate27.errors = [{instancePath:instancePath+"/expanse/platforms",schemaPath:"definitions#/definitions/platforms/type",keyword:"type",params:{type: "array"},message:"must be array"}];return false;}}var valid1 = _errs14 === errors;}else {var valid1 = true;}if(valid1){if(data0.protocols !== undefined){let data12 = data0.protocols;const _errs29 = errors;const _errs30 = errors;if(errors === _errs30){if(Array.isArray(data12)){var valid11 = true;const len3 = data12.length;for(let i3=0; i3<len3; i3++){let data13 = data12[i3];const _errs32 = errors;if(errors === _errs32){if(data13 && typeof data13 == "object" && !Array.isArray(data13)){let missing4;if(((data13.id === undefined) && (missing4 = "id")) || ((data13.attr === undefined) && (missing4 = "attr"))){validate27.errors = [{instancePath:instancePath+"/expanse/protocols/" + i3,schemaPath:"definitions#/definitions/protocols/items/required",keyword:"required",params:{missingProperty: missing4},message:"must have required property '"+missing4+"'"}];return false;}else {if(data13.id !== undefined){const _errs34 = errors;if(typeof data13.id !== "string"){validate27.errors = [{instancePath:instancePath+"/expanse/protocols/" + i3+"/id",schemaPath:"definitions#/definitions/protocols/items/properties/id/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}var valid12 = _errs34 === errors;}else {var valid12 = true;}if(valid12){if(data13.name !== undefined){const _errs36 = errors;if(typeof data13.name !== "string"){validate27.errors = [{instancePath:instancePath+"/expanse/protocols/" + i3+"/name",schemaPath:"definitions#/definitions/protocols/items/properties/name/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}var valid12 = _errs36 === errors;}else {var valid12 = true;}if(valid12){if(data13.version !== undefined){const _errs38 = errors;if(typeof data13.version !== "string"){validate27.errors = [{instancePath:instancePath+"/expanse/protocols/" + i3+"/version",schemaPath:"definitions#/definitions/protocols/items/properties/version/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}var valid12 = _errs38 === errors;}else {var valid12 = true;}if(valid12){if(data13.attr !== undefined){const _errs40 = errors;if(typeof data13.attr !== "string"){validate27.errors = [{instancePath:instancePath+"/expanse/protocols/" + i3+"/attr",schemaPath:"definitions#/definitions/protocols/items/properties/attr/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}var valid12 = _errs40 === errors;}else {var valid12 = true;}if(valid12){if(data13.url !== undefined){const _errs42 = errors;if(typeof data13.url !== "string"){validate27.errors = [{instancePath:instancePath+"/expanse/protocols/" + i3+"/url",schemaPath:"definitions#/definitions/protocols/items/properties/url/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}var valid12 = _errs42 === errors;}else {var valid12 = true;}}}}}}}else {validate27.errors = [{instancePath:instancePath+"/expanse/protocols/" + i3,schemaPath:"definitions#/definitions/protocols/items/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}}var valid11 = _errs32 === errors;if(!valid11){break;}}}else {validate27.errors = [{instancePath:instancePath+"/expanse/protocols",schemaPath:"definitions#/definitions/protocols/type",keyword:"type",params:{type: "array"},message:"must be array"}];return false;}}var valid1 = _errs29 === errors;}else {var valid1 = true;}}}}}}else {validate27.errors = [{instancePath:instancePath+"/expanse",schemaPath:"#/properties/expanse/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}}var valid0 = _errs1 === errors;}else {var valid0 = true;}if(valid0){if(data.subverse_info !== undefined){const _errs44 = errors;if("4" !== data.subverse_info){validate27.errors = [{instancePath:instancePath+"/subverse_info",schemaPath:"definitions#/definitions/_v/const",keyword:"const",params:{allowedValue: "4"},message:"must be equal to constant"}];return false;}var valid0 = _errs44 === errors;}else {var valid0 = true;}}}}else {validate27.errors = [{instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}}validate27.errors = vErrors;return errors === 0;}validate27.evaluated = {"props":{"expanse":true,"subverse_info":true},"dynamicProps":false,"dynamicItems":false};
|
|
1
|
+
"use strict";export const definitions_SubverseInfo = validate18;const schema21 = {"$id":"https://root-interface.se/protocols/SubverseInfo/definitions","$schema":"https://json-schema.org/draft/2019-09/schema","definitions":{"_v":{"const":"5"},"unique-id":{"type":"object","required":["uri","name"],"properties":{"uri":{"type":"string"},"name":{"type":"string"}}},"info":{"type":"object"},"hyperport":{"oneOf":[{"type":"string"},{"type":"object","required":["uri","port"],"properties":{"uri":{"type":"string"}}}]},"verse-header":{"type":"object","allOf":[{"$ref":"definitions#/definitions/unique-id"}],"required":[],"properties":{"favicon":{"type":"string"},"hyperport":{"$ref":"definitions#/definitions/hyperport"},"info":{"$ref":"definitions#/definitions/info"}}},"instances":{"type":"array","items":{"type":"object","allOf":[{"$ref":"definitions#/definitions/verse-header"}],"properties":{},"unevaluatedProperties":false}},"platforms":{"type":"array","items":{"type":"object","required":["id"],"properties":{"id":{"type":"string"},"archs":{"type":"array","items":{"type":"string"}},"agents":{"type":"array","items":{"type":"string"}}}}},"protocols":{"type":"array","items":{"type":"object","required":["id","attr"],"properties":{"id":{"type":"string"},"name":{"type":"string"},"version":{"type":"string"},"attr":{"type":"string"},"url":{"type":"string"}}}}}};function validate18(data, {instancePath="", parentData, parentDataProperty, rootData=data, dynamicAnchors={}}={}){/*# sourceURL="https://root-interface.se/protocols/SubverseInfo/definitions" */;validate18.errors = null;return true;}validate18.evaluated = {"dynamicProps":false,"dynamicItems":false};export const schema_SubverseInfo_query = validate19;const schema22 = {"$id":"https://root-interface.se/protocols/SubverseInfo/query","$schema":"https://json-schema.org/draft/2019-09/schema","type":"object","required":["query","subverse_info"],"properties":{"query":{"type":"object","required":["name","graphql","ttl_msec"],"properties":{"name":{"type":"string"},"graphql":{"type":"string"},"ttl_msec":{"type":"integer"},"unevaluatedProperties":false}},"subverse_info":{"$ref":"definitions#/definitions/_v"}}};const schema23 = {"const":"5"};function validate19(data, {instancePath="", parentData, parentDataProperty, rootData=data, dynamicAnchors={}}={}){/*# sourceURL="https://root-interface.se/protocols/SubverseInfo/query" */;let vErrors = null;let errors = 0;const evaluated0 = validate19.evaluated;if(evaluated0.dynamicProps){evaluated0.props = undefined;}if(evaluated0.dynamicItems){evaluated0.items = undefined;}if(errors === 0){if(data && typeof data == "object" && !Array.isArray(data)){let missing0;if(((data.query === undefined) && (missing0 = "query")) || ((data.subverse_info === undefined) && (missing0 = "subverse_info"))){validate19.errors = [{instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: missing0},message:"must have required property '"+missing0+"'"}];return false;}else {if(data.query !== undefined){let data0 = data.query;const _errs1 = errors;if(errors === _errs1){if(data0 && typeof data0 == "object" && !Array.isArray(data0)){let missing1;if((((data0.name === undefined) && (missing1 = "name")) || ((data0.graphql === undefined) && (missing1 = "graphql"))) || ((data0.ttl_msec === undefined) && (missing1 = "ttl_msec"))){validate19.errors = [{instancePath:instancePath+"/query",schemaPath:"#/properties/query/required",keyword:"required",params:{missingProperty: missing1},message:"must have required property '"+missing1+"'"}];return false;}else {if(data0.name !== undefined){const _errs3 = errors;if(typeof data0.name !== "string"){validate19.errors = [{instancePath:instancePath+"/query/name",schemaPath:"#/properties/query/properties/name/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}var valid1 = _errs3 === errors;}else {var valid1 = true;}if(valid1){if(data0.graphql !== undefined){const _errs5 = errors;if(typeof data0.graphql !== "string"){validate19.errors = [{instancePath:instancePath+"/query/graphql",schemaPath:"#/properties/query/properties/graphql/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}var valid1 = _errs5 === errors;}else {var valid1 = true;}if(valid1){if(data0.ttl_msec !== undefined){let data3 = data0.ttl_msec;const _errs7 = errors;if(!(((typeof data3 == "number") && (!(data3 % 1) && !isNaN(data3))) && (isFinite(data3)))){validate19.errors = [{instancePath:instancePath+"/query/ttl_msec",schemaPath:"#/properties/query/properties/ttl_msec/type",keyword:"type",params:{type: "integer"},message:"must be integer"}];return false;}var valid1 = _errs7 === errors;}else {var valid1 = true;}if(valid1){if(data0.unevaluatedProperties !== undefined){var valid1 = false;validate19.errors = [{instancePath:instancePath+"/query/unevaluatedProperties",schemaPath:"#/properties/query/properties/unevaluatedProperties/false schema",keyword:"false schema",params:{},message:"boolean schema is false"}];return false;}else {var valid1 = true;}}}}}}else {validate19.errors = [{instancePath:instancePath+"/query",schemaPath:"#/properties/query/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}}var valid0 = _errs1 === errors;}else {var valid0 = true;}if(valid0){if(data.subverse_info !== undefined){const _errs9 = errors;if("5" !== data.subverse_info){validate19.errors = [{instancePath:instancePath+"/subverse_info",schemaPath:"definitions#/definitions/_v/const",keyword:"const",params:{allowedValue: "5"},message:"must be equal to constant"}];return false;}var valid0 = _errs9 === errors;}else {var valid0 = true;}}}}else {validate19.errors = [{instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}}validate19.errors = vErrors;return errors === 0;}validate19.evaluated = {"props":{"query":true,"subverse_info":true},"dynamicProps":false,"dynamicItems":false};export const schema_SubverseInfo_subverse = validate20;const schema24 = {"$id":"https://root-interface.se/protocols/SubverseInfo/subverse","$schema":"https://json-schema.org/draft/2019-09/schema","type":"object","required":["expanse","subverse_info"],"properties":{"expanse":{"type":"object","required":["subverse","protocols"],"not":{"required":["instances"]},"properties":{"subverse":{"type":"object","allOf":[{"$ref":"definitions#/definitions/verse-header"}],"required":[],"properties":{"map-uri":{"type":"string"},"instances":{"$ref":"definitions#/definitions/instances"}},"unevaluatedProperties":false},"platforms":{"$ref":"definitions#/definitions/platforms"},"protocols":{"$ref":"definitions#/definitions/protocols"}}},"subverse_info":{"$ref":"definitions#/definitions/_v"}}};const schema34 = {"type":"array","items":{"type":"object","required":["id"],"properties":{"id":{"type":"string"},"archs":{"type":"array","items":{"type":"string"}},"agents":{"type":"array","items":{"type":"string"}}}}};const schema35 = {"type":"array","items":{"type":"object","required":["id","attr"],"properties":{"id":{"type":"string"},"name":{"type":"string"},"version":{"type":"string"},"attr":{"type":"string"},"url":{"type":"string"}}}};const schema25 = {"type":"object","allOf":[{"$ref":"definitions#/definitions/unique-id"}],"required":[],"properties":{"favicon":{"type":"string"},"hyperport":{"$ref":"definitions#/definitions/hyperport"},"info":{"$ref":"definitions#/definitions/info"}}};const schema26 = {"type":"object","required":["uri","name"],"properties":{"uri":{"type":"string"},"name":{"type":"string"}}};const schema27 = {"oneOf":[{"type":"string"},{"type":"object","required":["uri","port"],"properties":{"uri":{"type":"string"}}}]};const schema28 = {"type":"object"};function validate21(data, {instancePath="", parentData, parentDataProperty, rootData=data, dynamicAnchors={}}={}){let vErrors = null;let errors = 0;const evaluated0 = validate21.evaluated;if(evaluated0.dynamicProps){evaluated0.props = undefined;}if(evaluated0.dynamicItems){evaluated0.items = undefined;}const _errs2 = errors;if(errors === _errs2){if(data && typeof data == "object" && !Array.isArray(data)){let missing0;if(((data.uri === undefined) && (missing0 = "uri")) || ((data.name === undefined) && (missing0 = "name"))){validate21.errors = [{instancePath,schemaPath:"definitions#/definitions/unique-id/required",keyword:"required",params:{missingProperty: missing0},message:"must have required property '"+missing0+"'"}];return false;}else {if(data.uri !== undefined){const _errs4 = errors;if(typeof data.uri !== "string"){validate21.errors = [{instancePath:instancePath+"/uri",schemaPath:"definitions#/definitions/unique-id/properties/uri/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}var valid2 = _errs4 === errors;}else {var valid2 = true;}if(valid2){if(data.name !== undefined){const _errs6 = errors;if(typeof data.name !== "string"){validate21.errors = [{instancePath:instancePath+"/name",schemaPath:"definitions#/definitions/unique-id/properties/name/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}var valid2 = _errs6 === errors;}else {var valid2 = true;}}}}else {validate21.errors = [{instancePath,schemaPath:"definitions#/definitions/unique-id/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}}if(errors === 0){if(data && typeof data == "object" && !Array.isArray(data)){if(data.favicon !== undefined){const _errs8 = errors;if(typeof data.favicon !== "string"){validate21.errors = [{instancePath:instancePath+"/favicon",schemaPath:"#/properties/favicon/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}var valid3 = _errs8 === errors;}else {var valid3 = true;}if(valid3){if(data.hyperport !== undefined){let data3 = data.hyperport;const _errs10 = errors;const _errs12 = errors;let valid5 = false;let passing0 = null;const _errs13 = errors;if(typeof data3 !== "string"){const err0 = {instancePath:instancePath+"/hyperport",schemaPath:"definitions#/definitions/hyperport/oneOf/0/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}var _valid0 = _errs13 === errors;if(_valid0){valid5 = true;passing0 = 0;}const _errs15 = errors;if(errors === _errs15){if(data3 && typeof data3 == "object" && !Array.isArray(data3)){let missing1;if(((data3.uri === undefined) && (missing1 = "uri")) || ((data3.port === undefined) && (missing1 = "port"))){const err1 = {instancePath:instancePath+"/hyperport",schemaPath:"definitions#/definitions/hyperport/oneOf/1/required",keyword:"required",params:{missingProperty: missing1},message:"must have required property '"+missing1+"'"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}else {if(data3.uri !== undefined){if(typeof data3.uri !== "string"){const err2 = {instancePath:instancePath+"/hyperport/uri",schemaPath:"definitions#/definitions/hyperport/oneOf/1/properties/uri/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}}}}else {const err3 = {instancePath:instancePath+"/hyperport",schemaPath:"definitions#/definitions/hyperport/oneOf/1/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}}var _valid0 = _errs15 === errors;if(_valid0 && valid5){valid5 = false;passing0 = [passing0, 1];}else {if(_valid0){valid5 = true;passing0 = 1;var props0 = {};props0.uri = true;}}if(!valid5){const err4 = {instancePath:instancePath+"/hyperport",schemaPath:"definitions#/definitions/hyperport/oneOf",keyword:"oneOf",params:{passingSchemas: passing0},message:"must match exactly one schema in oneOf"};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;validate21.errors = vErrors;return false;}else {errors = _errs12;if(vErrors !== null){if(_errs12){vErrors.length = _errs12;}else {vErrors = null;}}}var valid3 = _errs10 === errors;}else {var valid3 = true;}if(valid3){if(data.info !== undefined){let data5 = data.info;const _errs19 = errors;if(!(data5 && typeof data5 == "object" && !Array.isArray(data5))){validate21.errors = [{instancePath:instancePath+"/info",schemaPath:"definitions#/definitions/info/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}var valid3 = _errs19 === errors;}else {var valid3 = true;}}}}else {validate21.errors = [{instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}}validate21.errors = vErrors;return errors === 0;}validate21.evaluated = {"props":{"favicon":true,"hyperport":true,"info":true,"uri":true,"name":true},"dynamicProps":false,"dynamicItems":false};const schema29 = {"type":"array","items":{"type":"object","allOf":[{"$ref":"definitions#/definitions/verse-header"}],"properties":{},"unevaluatedProperties":false}};function validate24(data, {instancePath="", parentData, parentDataProperty, rootData=data, dynamicAnchors={}}={}){let vErrors = null;let errors = 0;const evaluated0 = validate24.evaluated;if(evaluated0.dynamicProps){evaluated0.props = undefined;}if(evaluated0.dynamicItems){evaluated0.items = undefined;}const _errs2 = errors;if(errors === _errs2){if(data && typeof data == "object" && !Array.isArray(data)){let missing0;if(((data.uri === undefined) && (missing0 = "uri")) || ((data.name === undefined) && (missing0 = "name"))){validate24.errors = [{instancePath,schemaPath:"definitions#/definitions/unique-id/required",keyword:"required",params:{missingProperty: missing0},message:"must have required property '"+missing0+"'"}];return false;}else {if(data.uri !== undefined){const _errs4 = errors;if(typeof data.uri !== "string"){validate24.errors = [{instancePath:instancePath+"/uri",schemaPath:"definitions#/definitions/unique-id/properties/uri/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}var valid2 = _errs4 === errors;}else {var valid2 = true;}if(valid2){if(data.name !== undefined){const _errs6 = errors;if(typeof data.name !== "string"){validate24.errors = [{instancePath:instancePath+"/name",schemaPath:"definitions#/definitions/unique-id/properties/name/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}var valid2 = _errs6 === errors;}else {var valid2 = true;}}}}else {validate24.errors = [{instancePath,schemaPath:"definitions#/definitions/unique-id/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}}if(errors === 0){if(data && typeof data == "object" && !Array.isArray(data)){if(data.favicon !== undefined){const _errs8 = errors;if(typeof data.favicon !== "string"){validate24.errors = [{instancePath:instancePath+"/favicon",schemaPath:"#/properties/favicon/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}var valid3 = _errs8 === errors;}else {var valid3 = true;}if(valid3){if(data.hyperport !== undefined){let data3 = data.hyperport;const _errs10 = errors;const _errs12 = errors;let valid5 = false;let passing0 = null;const _errs13 = errors;if(typeof data3 !== "string"){const err0 = {instancePath:instancePath+"/hyperport",schemaPath:"definitions#/definitions/hyperport/oneOf/0/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}var _valid0 = _errs13 === errors;if(_valid0){valid5 = true;passing0 = 0;}const _errs15 = errors;if(errors === _errs15){if(data3 && typeof data3 == "object" && !Array.isArray(data3)){let missing1;if(((data3.uri === undefined) && (missing1 = "uri")) || ((data3.port === undefined) && (missing1 = "port"))){const err1 = {instancePath:instancePath+"/hyperport",schemaPath:"definitions#/definitions/hyperport/oneOf/1/required",keyword:"required",params:{missingProperty: missing1},message:"must have required property '"+missing1+"'"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}else {if(data3.uri !== undefined){if(typeof data3.uri !== "string"){const err2 = {instancePath:instancePath+"/hyperport/uri",schemaPath:"definitions#/definitions/hyperport/oneOf/1/properties/uri/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}}}}else {const err3 = {instancePath:instancePath+"/hyperport",schemaPath:"definitions#/definitions/hyperport/oneOf/1/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}}var _valid0 = _errs15 === errors;if(_valid0 && valid5){valid5 = false;passing0 = [passing0, 1];}else {if(_valid0){valid5 = true;passing0 = 1;var props0 = {};props0.uri = true;}}if(!valid5){const err4 = {instancePath:instancePath+"/hyperport",schemaPath:"definitions#/definitions/hyperport/oneOf",keyword:"oneOf",params:{passingSchemas: passing0},message:"must match exactly one schema in oneOf"};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;validate24.errors = vErrors;return false;}else {errors = _errs12;if(vErrors !== null){if(_errs12){vErrors.length = _errs12;}else {vErrors = null;}}}var valid3 = _errs10 === errors;}else {var valid3 = true;}if(valid3){if(data.info !== undefined){let data5 = data.info;const _errs19 = errors;if(!(data5 && typeof data5 == "object" && !Array.isArray(data5))){validate24.errors = [{instancePath:instancePath+"/info",schemaPath:"definitions#/definitions/info/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}var valid3 = _errs19 === errors;}else {var valid3 = true;}}}}else {validate24.errors = [{instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}}validate24.errors = vErrors;return errors === 0;}validate24.evaluated = {"props":{"favicon":true,"hyperport":true,"info":true,"uri":true,"name":true},"dynamicProps":false,"dynamicItems":false};function validate23(data, {instancePath="", parentData, parentDataProperty, rootData=data, dynamicAnchors={}}={}){let vErrors = null;let errors = 0;const evaluated0 = validate23.evaluated;if(evaluated0.dynamicProps){evaluated0.props = undefined;}if(evaluated0.dynamicItems){evaluated0.items = undefined;}if(errors === 0){if(Array.isArray(data)){var valid0 = true;const len0 = data.length;for(let i0=0; i0<len0; i0++){let data0 = data[i0];const _errs1 = errors;if(!(validate24(data0, {instancePath:instancePath+"/" + i0,parentData:data,parentDataProperty:i0,rootData,dynamicAnchors}))){vErrors = vErrors === null ? validate24.errors : vErrors.concat(validate24.errors);errors = vErrors.length;}if(errors === _errs1){if(data0 && typeof data0 == "object" && !Array.isArray(data0)){for(const key0 in data0){if(((((key0 !== "favicon") && (key0 !== "hyperport")) && (key0 !== "info")) && (key0 !== "uri")) && (key0 !== "name")){validate23.errors = [{instancePath:instancePath+"/" + i0,schemaPath:"#/items/unevaluatedProperties",keyword:"unevaluatedProperties",params:{unevaluatedProperty: key0},message:"must NOT have unevaluated properties"}];return false;break;}}}else {validate23.errors = [{instancePath:instancePath+"/" + i0,schemaPath:"#/items/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}}var valid0 = _errs1 === errors;if(!valid0){break;}}}else {validate23.errors = [{instancePath,schemaPath:"#/type",keyword:"type",params:{type: "array"},message:"must be array"}];return false;}}validate23.errors = vErrors;return errors === 0;}validate23.evaluated = {"items":true,"dynamicProps":false,"dynamicItems":false};function validate20(data, {instancePath="", parentData, parentDataProperty, rootData=data, dynamicAnchors={}}={}){/*# sourceURL="https://root-interface.se/protocols/SubverseInfo/subverse" */;let vErrors = null;let errors = 0;const evaluated0 = validate20.evaluated;if(evaluated0.dynamicProps){evaluated0.props = undefined;}if(evaluated0.dynamicItems){evaluated0.items = undefined;}if(errors === 0){if(data && typeof data == "object" && !Array.isArray(data)){let missing0;if(((data.expanse === undefined) && (missing0 = "expanse")) || ((data.subverse_info === undefined) && (missing0 = "subverse_info"))){validate20.errors = [{instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: missing0},message:"must have required property '"+missing0+"'"}];return false;}else {if(data.expanse !== undefined){let data0 = data.expanse;const _errs1 = errors;const _errs3 = errors;const _errs4 = errors;if(data0 && typeof data0 == "object" && !Array.isArray(data0)){let missing1;if((data0.instances === undefined) && (missing1 = "instances")){const err0 = {};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}}var valid1 = _errs4 === errors;if(valid1){validate20.errors = [{instancePath:instancePath+"/expanse",schemaPath:"#/properties/expanse/not",keyword:"not",params:{},message:"must NOT be valid"}];return false;}else {errors = _errs3;if(vErrors !== null){if(_errs3){vErrors.length = _errs3;}else {vErrors = null;}}}if(errors === _errs1){if(data0 && typeof data0 == "object" && !Array.isArray(data0)){let missing2;if(((data0.subverse === undefined) && (missing2 = "subverse")) || ((data0.protocols === undefined) && (missing2 = "protocols"))){validate20.errors = [{instancePath:instancePath+"/expanse",schemaPath:"#/properties/expanse/required",keyword:"required",params:{missingProperty: missing2},message:"must have required property '"+missing2+"'"}];return false;}else {if(data0.subverse !== undefined){let data1 = data0.subverse;const _errs5 = errors;if(!(validate21(data1, {instancePath:instancePath+"/expanse/subverse",parentData:data0,parentDataProperty:"subverse",rootData,dynamicAnchors}))){vErrors = vErrors === null ? validate21.errors : vErrors.concat(validate21.errors);errors = vErrors.length;}if(errors === _errs5){if(data1 && typeof data1 == "object" && !Array.isArray(data1)){if(data1["map-uri"] !== undefined){const _errs8 = errors;if(typeof data1["map-uri"] !== "string"){validate20.errors = [{instancePath:instancePath+"/expanse/subverse/map-uri",schemaPath:"#/properties/expanse/properties/subverse/properties/map-uri/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}var valid4 = _errs8 === errors;}else {var valid4 = true;}if(valid4){if(data1.instances !== undefined){const _errs10 = errors;if(!(validate23(data1.instances, {instancePath:instancePath+"/expanse/subverse/instances",parentData:data1,parentDataProperty:"instances",rootData,dynamicAnchors}))){vErrors = vErrors === null ? validate23.errors : vErrors.concat(validate23.errors);errors = vErrors.length;}var valid4 = _errs10 === errors;}else {var valid4 = true;}if(valid4){for(const key0 in data1){if(((((((key0 !== "map-uri") && (key0 !== "instances")) && (key0 !== "favicon")) && (key0 !== "hyperport")) && (key0 !== "info")) && (key0 !== "uri")) && (key0 !== "name")){validate20.errors = [{instancePath:instancePath+"/expanse/subverse",schemaPath:"#/properties/expanse/properties/subverse/unevaluatedProperties",keyword:"unevaluatedProperties",params:{unevaluatedProperty: key0},message:"must NOT have unevaluated properties"}];return false;break;}}}}}else {validate20.errors = [{instancePath:instancePath+"/expanse/subverse",schemaPath:"#/properties/expanse/properties/subverse/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}}var valid2 = _errs5 === errors;}else {var valid2 = true;}if(valid2){if(data0.platforms !== undefined){let data4 = data0.platforms;const _errs12 = errors;const _errs13 = errors;if(errors === _errs13){if(Array.isArray(data4)){var valid6 = true;const len0 = data4.length;for(let i0=0; i0<len0; i0++){let data5 = data4[i0];const _errs15 = errors;if(errors === _errs15){if(data5 && typeof data5 == "object" && !Array.isArray(data5)){let missing3;if((data5.id === undefined) && (missing3 = "id")){validate20.errors = [{instancePath:instancePath+"/expanse/platforms/" + i0,schemaPath:"definitions#/definitions/platforms/items/required",keyword:"required",params:{missingProperty: missing3},message:"must have required property '"+missing3+"'"}];return false;}else {if(data5.id !== undefined){const _errs17 = errors;if(typeof data5.id !== "string"){validate20.errors = [{instancePath:instancePath+"/expanse/platforms/" + i0+"/id",schemaPath:"definitions#/definitions/platforms/items/properties/id/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}var valid7 = _errs17 === errors;}else {var valid7 = true;}if(valid7){if(data5.archs !== undefined){let data7 = data5.archs;const _errs19 = errors;if(errors === _errs19){if(Array.isArray(data7)){var valid8 = true;const len1 = data7.length;for(let i1=0; i1<len1; i1++){const _errs21 = errors;if(typeof data7[i1] !== "string"){validate20.errors = [{instancePath:instancePath+"/expanse/platforms/" + i0+"/archs/" + i1,schemaPath:"definitions#/definitions/platforms/items/properties/archs/items/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}var valid8 = _errs21 === errors;if(!valid8){break;}}}else {validate20.errors = [{instancePath:instancePath+"/expanse/platforms/" + i0+"/archs",schemaPath:"definitions#/definitions/platforms/items/properties/archs/type",keyword:"type",params:{type: "array"},message:"must be array"}];return false;}}var valid7 = _errs19 === errors;}else {var valid7 = true;}if(valid7){if(data5.agents !== undefined){let data9 = data5.agents;const _errs23 = errors;if(errors === _errs23){if(Array.isArray(data9)){var valid9 = true;const len2 = data9.length;for(let i2=0; i2<len2; i2++){const _errs25 = errors;if(typeof data9[i2] !== "string"){validate20.errors = [{instancePath:instancePath+"/expanse/platforms/" + i0+"/agents/" + i2,schemaPath:"definitions#/definitions/platforms/items/properties/agents/items/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}var valid9 = _errs25 === errors;if(!valid9){break;}}}else {validate20.errors = [{instancePath:instancePath+"/expanse/platforms/" + i0+"/agents",schemaPath:"definitions#/definitions/platforms/items/properties/agents/type",keyword:"type",params:{type: "array"},message:"must be array"}];return false;}}var valid7 = _errs23 === errors;}else {var valid7 = true;}}}}}else {validate20.errors = [{instancePath:instancePath+"/expanse/platforms/" + i0,schemaPath:"definitions#/definitions/platforms/items/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}}var valid6 = _errs15 === errors;if(!valid6){break;}}}else {validate20.errors = [{instancePath:instancePath+"/expanse/platforms",schemaPath:"definitions#/definitions/platforms/type",keyword:"type",params:{type: "array"},message:"must be array"}];return false;}}var valid2 = _errs12 === errors;}else {var valid2 = true;}if(valid2){if(data0.protocols !== undefined){let data11 = data0.protocols;const _errs27 = errors;const _errs28 = errors;if(errors === _errs28){if(Array.isArray(data11)){var valid11 = true;const len3 = data11.length;for(let i3=0; i3<len3; i3++){let data12 = data11[i3];const _errs30 = errors;if(errors === _errs30){if(data12 && typeof data12 == "object" && !Array.isArray(data12)){let missing4;if(((data12.id === undefined) && (missing4 = "id")) || ((data12.attr === undefined) && (missing4 = "attr"))){validate20.errors = [{instancePath:instancePath+"/expanse/protocols/" + i3,schemaPath:"definitions#/definitions/protocols/items/required",keyword:"required",params:{missingProperty: missing4},message:"must have required property '"+missing4+"'"}];return false;}else {if(data12.id !== undefined){const _errs32 = errors;if(typeof data12.id !== "string"){validate20.errors = [{instancePath:instancePath+"/expanse/protocols/" + i3+"/id",schemaPath:"definitions#/definitions/protocols/items/properties/id/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}var valid12 = _errs32 === errors;}else {var valid12 = true;}if(valid12){if(data12.name !== undefined){const _errs34 = errors;if(typeof data12.name !== "string"){validate20.errors = [{instancePath:instancePath+"/expanse/protocols/" + i3+"/name",schemaPath:"definitions#/definitions/protocols/items/properties/name/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}var valid12 = _errs34 === errors;}else {var valid12 = true;}if(valid12){if(data12.version !== undefined){const _errs36 = errors;if(typeof data12.version !== "string"){validate20.errors = [{instancePath:instancePath+"/expanse/protocols/" + i3+"/version",schemaPath:"definitions#/definitions/protocols/items/properties/version/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}var valid12 = _errs36 === errors;}else {var valid12 = true;}if(valid12){if(data12.attr !== undefined){const _errs38 = errors;if(typeof data12.attr !== "string"){validate20.errors = [{instancePath:instancePath+"/expanse/protocols/" + i3+"/attr",schemaPath:"definitions#/definitions/protocols/items/properties/attr/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}var valid12 = _errs38 === errors;}else {var valid12 = true;}if(valid12){if(data12.url !== undefined){const _errs40 = errors;if(typeof data12.url !== "string"){validate20.errors = [{instancePath:instancePath+"/expanse/protocols/" + i3+"/url",schemaPath:"definitions#/definitions/protocols/items/properties/url/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}var valid12 = _errs40 === errors;}else {var valid12 = true;}}}}}}}else {validate20.errors = [{instancePath:instancePath+"/expanse/protocols/" + i3,schemaPath:"definitions#/definitions/protocols/items/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}}var valid11 = _errs30 === errors;if(!valid11){break;}}}else {validate20.errors = [{instancePath:instancePath+"/expanse/protocols",schemaPath:"definitions#/definitions/protocols/type",keyword:"type",params:{type: "array"},message:"must be array"}];return false;}}var valid2 = _errs27 === errors;}else {var valid2 = true;}}}}}else {validate20.errors = [{instancePath:instancePath+"/expanse",schemaPath:"#/properties/expanse/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}}var valid0 = _errs1 === errors;}else {var valid0 = true;}if(valid0){if(data.subverse_info !== undefined){const _errs42 = errors;if("5" !== data.subverse_info){validate20.errors = [{instancePath:instancePath+"/subverse_info",schemaPath:"definitions#/definitions/_v/const",keyword:"const",params:{allowedValue: "5"},message:"must be equal to constant"}];return false;}var valid0 = _errs42 === errors;}else {var valid0 = true;}}}}else {validate20.errors = [{instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}}validate20.errors = vErrors;return errors === 0;}validate20.evaluated = {"props":{"expanse":true,"subverse_info":true},"dynamicProps":false,"dynamicItems":false};export const schema_SubverseInfo_instances = validate27;const schema37 = {"$id":"https://root-interface.se/protocols/SubverseInfo/instances","$schema":"https://json-schema.org/draft/2019-09/schema","type":"object","required":["expanse","subverse_info"],"properties":{"expanse":{"type":"object","required":["instances"],"properties":{"instances":{"$ref":"definitions#/definitions/instances"},"subverse":{"type":"object","allOf":[{"$ref":"definitions#/definitions/unique-id"}],"unevaluatedProperties":false},"platforms":{"$ref":"definitions#/definitions/platforms"},"protocols":{"$ref":"definitions#/definitions/protocols"}}},"subverse_info":{"$ref":"definitions#/definitions/_v"}}};function validate28(data, {instancePath="", parentData, parentDataProperty, rootData=data, dynamicAnchors={}}={}){let vErrors = null;let errors = 0;const evaluated0 = validate28.evaluated;if(evaluated0.dynamicProps){evaluated0.props = undefined;}if(evaluated0.dynamicItems){evaluated0.items = undefined;}if(errors === 0){if(Array.isArray(data)){var valid0 = true;const len0 = data.length;for(let i0=0; i0<len0; i0++){let data0 = data[i0];const _errs1 = errors;if(!(validate24(data0, {instancePath:instancePath+"/" + i0,parentData:data,parentDataProperty:i0,rootData,dynamicAnchors}))){vErrors = vErrors === null ? validate24.errors : vErrors.concat(validate24.errors);errors = vErrors.length;}if(errors === _errs1){if(data0 && typeof data0 == "object" && !Array.isArray(data0)){for(const key0 in data0){if(((((key0 !== "favicon") && (key0 !== "hyperport")) && (key0 !== "info")) && (key0 !== "uri")) && (key0 !== "name")){validate28.errors = [{instancePath:instancePath+"/" + i0,schemaPath:"#/items/unevaluatedProperties",keyword:"unevaluatedProperties",params:{unevaluatedProperty: key0},message:"must NOT have unevaluated properties"}];return false;break;}}}else {validate28.errors = [{instancePath:instancePath+"/" + i0,schemaPath:"#/items/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}}var valid0 = _errs1 === errors;if(!valid0){break;}}}else {validate28.errors = [{instancePath,schemaPath:"#/type",keyword:"type",params:{type: "array"},message:"must be array"}];return false;}}validate28.errors = vErrors;return errors === 0;}validate28.evaluated = {"items":true,"dynamicProps":false,"dynamicItems":false};function validate27(data, {instancePath="", parentData, parentDataProperty, rootData=data, dynamicAnchors={}}={}){/*# sourceURL="https://root-interface.se/protocols/SubverseInfo/instances" */;let vErrors = null;let errors = 0;const evaluated0 = validate27.evaluated;if(evaluated0.dynamicProps){evaluated0.props = undefined;}if(evaluated0.dynamicItems){evaluated0.items = undefined;}if(errors === 0){if(data && typeof data == "object" && !Array.isArray(data)){let missing0;if(((data.expanse === undefined) && (missing0 = "expanse")) || ((data.subverse_info === undefined) && (missing0 = "subverse_info"))){validate27.errors = [{instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: missing0},message:"must have required property '"+missing0+"'"}];return false;}else {if(data.expanse !== undefined){let data0 = data.expanse;const _errs1 = errors;if(errors === _errs1){if(data0 && typeof data0 == "object" && !Array.isArray(data0)){let missing1;if((data0.instances === undefined) && (missing1 = "instances")){validate27.errors = [{instancePath:instancePath+"/expanse",schemaPath:"#/properties/expanse/required",keyword:"required",params:{missingProperty: missing1},message:"must have required property '"+missing1+"'"}];return false;}else {if(data0.instances !== undefined){const _errs3 = errors;if(!(validate28(data0.instances, {instancePath:instancePath+"/expanse/instances",parentData:data0,parentDataProperty:"instances",rootData,dynamicAnchors}))){vErrors = vErrors === null ? validate28.errors : vErrors.concat(validate28.errors);errors = vErrors.length;}var valid1 = _errs3 === errors;}else {var valid1 = true;}if(valid1){if(data0.subverse !== undefined){let data2 = data0.subverse;const _errs4 = errors;const _errs7 = errors;if(errors === _errs7){if(data2 && typeof data2 == "object" && !Array.isArray(data2)){let missing2;if(((data2.uri === undefined) && (missing2 = "uri")) || ((data2.name === undefined) && (missing2 = "name"))){validate27.errors = [{instancePath:instancePath+"/expanse/subverse",schemaPath:"definitions#/definitions/unique-id/required",keyword:"required",params:{missingProperty: missing2},message:"must have required property '"+missing2+"'"}];return false;}else {if(data2.uri !== undefined){const _errs9 = errors;if(typeof data2.uri !== "string"){validate27.errors = [{instancePath:instancePath+"/expanse/subverse/uri",schemaPath:"definitions#/definitions/unique-id/properties/uri/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}var valid4 = _errs9 === errors;}else {var valid4 = true;}if(valid4){if(data2.name !== undefined){const _errs11 = errors;if(typeof data2.name !== "string"){validate27.errors = [{instancePath:instancePath+"/expanse/subverse/name",schemaPath:"definitions#/definitions/unique-id/properties/name/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}var valid4 = _errs11 === errors;}else {var valid4 = true;}}}}else {validate27.errors = [{instancePath:instancePath+"/expanse/subverse",schemaPath:"definitions#/definitions/unique-id/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}}if(errors === _errs4){if(data2 && typeof data2 == "object" && !Array.isArray(data2)){for(const key0 in data2){if((key0 !== "uri") && (key0 !== "name")){validate27.errors = [{instancePath:instancePath+"/expanse/subverse",schemaPath:"#/properties/expanse/properties/subverse/unevaluatedProperties",keyword:"unevaluatedProperties",params:{unevaluatedProperty: key0},message:"must NOT have unevaluated properties"}];return false;break;}}}else {validate27.errors = [{instancePath:instancePath+"/expanse/subverse",schemaPath:"#/properties/expanse/properties/subverse/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}}var valid1 = _errs4 === errors;}else {var valid1 = true;}if(valid1){if(data0.platforms !== undefined){let data5 = data0.platforms;const _errs14 = errors;const _errs15 = errors;if(errors === _errs15){if(Array.isArray(data5)){var valid6 = true;const len0 = data5.length;for(let i0=0; i0<len0; i0++){let data6 = data5[i0];const _errs17 = errors;if(errors === _errs17){if(data6 && typeof data6 == "object" && !Array.isArray(data6)){let missing3;if((data6.id === undefined) && (missing3 = "id")){validate27.errors = [{instancePath:instancePath+"/expanse/platforms/" + i0,schemaPath:"definitions#/definitions/platforms/items/required",keyword:"required",params:{missingProperty: missing3},message:"must have required property '"+missing3+"'"}];return false;}else {if(data6.id !== undefined){const _errs19 = errors;if(typeof data6.id !== "string"){validate27.errors = [{instancePath:instancePath+"/expanse/platforms/" + i0+"/id",schemaPath:"definitions#/definitions/platforms/items/properties/id/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}var valid7 = _errs19 === errors;}else {var valid7 = true;}if(valid7){if(data6.archs !== undefined){let data8 = data6.archs;const _errs21 = errors;if(errors === _errs21){if(Array.isArray(data8)){var valid8 = true;const len1 = data8.length;for(let i1=0; i1<len1; i1++){const _errs23 = errors;if(typeof data8[i1] !== "string"){validate27.errors = [{instancePath:instancePath+"/expanse/platforms/" + i0+"/archs/" + i1,schemaPath:"definitions#/definitions/platforms/items/properties/archs/items/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}var valid8 = _errs23 === errors;if(!valid8){break;}}}else {validate27.errors = [{instancePath:instancePath+"/expanse/platforms/" + i0+"/archs",schemaPath:"definitions#/definitions/platforms/items/properties/archs/type",keyword:"type",params:{type: "array"},message:"must be array"}];return false;}}var valid7 = _errs21 === errors;}else {var valid7 = true;}if(valid7){if(data6.agents !== undefined){let data10 = data6.agents;const _errs25 = errors;if(errors === _errs25){if(Array.isArray(data10)){var valid9 = true;const len2 = data10.length;for(let i2=0; i2<len2; i2++){const _errs27 = errors;if(typeof data10[i2] !== "string"){validate27.errors = [{instancePath:instancePath+"/expanse/platforms/" + i0+"/agents/" + i2,schemaPath:"definitions#/definitions/platforms/items/properties/agents/items/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}var valid9 = _errs27 === errors;if(!valid9){break;}}}else {validate27.errors = [{instancePath:instancePath+"/expanse/platforms/" + i0+"/agents",schemaPath:"definitions#/definitions/platforms/items/properties/agents/type",keyword:"type",params:{type: "array"},message:"must be array"}];return false;}}var valid7 = _errs25 === errors;}else {var valid7 = true;}}}}}else {validate27.errors = [{instancePath:instancePath+"/expanse/platforms/" + i0,schemaPath:"definitions#/definitions/platforms/items/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}}var valid6 = _errs17 === errors;if(!valid6){break;}}}else {validate27.errors = [{instancePath:instancePath+"/expanse/platforms",schemaPath:"definitions#/definitions/platforms/type",keyword:"type",params:{type: "array"},message:"must be array"}];return false;}}var valid1 = _errs14 === errors;}else {var valid1 = true;}if(valid1){if(data0.protocols !== undefined){let data12 = data0.protocols;const _errs29 = errors;const _errs30 = errors;if(errors === _errs30){if(Array.isArray(data12)){var valid11 = true;const len3 = data12.length;for(let i3=0; i3<len3; i3++){let data13 = data12[i3];const _errs32 = errors;if(errors === _errs32){if(data13 && typeof data13 == "object" && !Array.isArray(data13)){let missing4;if(((data13.id === undefined) && (missing4 = "id")) || ((data13.attr === undefined) && (missing4 = "attr"))){validate27.errors = [{instancePath:instancePath+"/expanse/protocols/" + i3,schemaPath:"definitions#/definitions/protocols/items/required",keyword:"required",params:{missingProperty: missing4},message:"must have required property '"+missing4+"'"}];return false;}else {if(data13.id !== undefined){const _errs34 = errors;if(typeof data13.id !== "string"){validate27.errors = [{instancePath:instancePath+"/expanse/protocols/" + i3+"/id",schemaPath:"definitions#/definitions/protocols/items/properties/id/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}var valid12 = _errs34 === errors;}else {var valid12 = true;}if(valid12){if(data13.name !== undefined){const _errs36 = errors;if(typeof data13.name !== "string"){validate27.errors = [{instancePath:instancePath+"/expanse/protocols/" + i3+"/name",schemaPath:"definitions#/definitions/protocols/items/properties/name/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}var valid12 = _errs36 === errors;}else {var valid12 = true;}if(valid12){if(data13.version !== undefined){const _errs38 = errors;if(typeof data13.version !== "string"){validate27.errors = [{instancePath:instancePath+"/expanse/protocols/" + i3+"/version",schemaPath:"definitions#/definitions/protocols/items/properties/version/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}var valid12 = _errs38 === errors;}else {var valid12 = true;}if(valid12){if(data13.attr !== undefined){const _errs40 = errors;if(typeof data13.attr !== "string"){validate27.errors = [{instancePath:instancePath+"/expanse/protocols/" + i3+"/attr",schemaPath:"definitions#/definitions/protocols/items/properties/attr/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}var valid12 = _errs40 === errors;}else {var valid12 = true;}if(valid12){if(data13.url !== undefined){const _errs42 = errors;if(typeof data13.url !== "string"){validate27.errors = [{instancePath:instancePath+"/expanse/protocols/" + i3+"/url",schemaPath:"definitions#/definitions/protocols/items/properties/url/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}var valid12 = _errs42 === errors;}else {var valid12 = true;}}}}}}}else {validate27.errors = [{instancePath:instancePath+"/expanse/protocols/" + i3,schemaPath:"definitions#/definitions/protocols/items/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}}var valid11 = _errs32 === errors;if(!valid11){break;}}}else {validate27.errors = [{instancePath:instancePath+"/expanse/protocols",schemaPath:"definitions#/definitions/protocols/type",keyword:"type",params:{type: "array"},message:"must be array"}];return false;}}var valid1 = _errs29 === errors;}else {var valid1 = true;}}}}}}else {validate27.errors = [{instancePath:instancePath+"/expanse",schemaPath:"#/properties/expanse/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}}var valid0 = _errs1 === errors;}else {var valid0 = true;}if(valid0){if(data.subverse_info !== undefined){const _errs44 = errors;if("5" !== data.subverse_info){validate27.errors = [{instancePath:instancePath+"/subverse_info",schemaPath:"definitions#/definitions/_v/const",keyword:"const",params:{allowedValue: "5"},message:"must be equal to constant"}];return false;}var valid0 = _errs44 === errors;}else {var valid0 = true;}}}}else {validate27.errors = [{instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}}validate27.errors = vErrors;return errors === 0;}validate27.evaluated = {"props":{"expanse":true,"subverse_info":true},"dynamicProps":false,"dynamicItems":false};
|
|
@@ -20,7 +20,7 @@ import {
|
|
|
20
20
|
|
|
21
21
|
import { LOGR, l_LL } from '@knev/bitlogr';
|
|
22
22
|
|
|
23
|
-
const kstr_VERSION = "
|
|
23
|
+
const kstr_VERSION = "5"
|
|
24
24
|
|
|
25
25
|
//-------------------------------------------------------------------------------------------------
|
|
26
26
|
|
|
@@ -198,10 +198,7 @@ describe("Validate expanse;", function () {
|
|
|
198
198
|
name : "",
|
|
199
199
|
uri : "",
|
|
200
200
|
favicon : "",
|
|
201
|
-
"hyperport" :
|
|
202
|
-
"uri" : "",
|
|
203
|
-
"port" : {}
|
|
204
|
-
},
|
|
201
|
+
"hyperport" : "",
|
|
205
202
|
info : {
|
|
206
203
|
"key" : "value"
|
|
207
204
|
}
|
|
@@ -420,9 +417,9 @@ const json_subverse_DCL = {
|
|
|
420
417
|
"graphql": "query { expanse { name map logo(width: 200, height: 200) { link } platforms { name archs agents } protocols { name attr } } }",
|
|
421
418
|
"ttl_msec": 5000
|
|
422
419
|
},
|
|
423
|
-
"subverse_info":
|
|
420
|
+
"subverse_info": kstr_VERSION
|
|
424
421
|
},
|
|
425
|
-
"subverse_info":
|
|
422
|
+
"subverse_info": kstr_VERSION
|
|
426
423
|
}
|
|
427
424
|
|
|
428
425
|
const json_instances_oncyber = {
|
|
@@ -464,9 +461,9 @@ const json_instances_oncyber = {
|
|
|
464
461
|
"graphql": "query { expanse { name map logo(width: 200, height: 200) { link } platforms { name archs agents } protocols { name attr } } }",
|
|
465
462
|
"ttl_msec": 5000
|
|
466
463
|
},
|
|
467
|
-
"subverse_info":
|
|
464
|
+
"subverse_info": kstr_VERSION
|
|
468
465
|
},
|
|
469
|
-
"subverse_info":
|
|
466
|
+
"subverse_info": kstr_VERSION
|
|
470
467
|
};
|
|
471
468
|
|
|
472
469
|
describe("Validate raw;", function () {
|