@rootintf/protocol-subverseinfo 1.0.13-api.2 → 2.0.1-api.4
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/ajv-gen-validate.d.cts +1 -0
- package/dist/subverseinfo.cjs.js +1386 -155
- package/dist/subverseinfo.d.ts +16 -0
- package/dist/subverseinfo.es.mjs +1385 -155
- package/dist/validate-esm.d.mts +70 -0
- package/package.json +9 -3
- package/rollup.config.mjs +15 -4
- package/schema/schema_SubverseInfo.json +30 -3
- package/src/ajv-gen-validate.cjs +3 -4
- package/src/declarations.d.ts +1 -0
- package/src/subverseinfo.ts +123 -0
- package/src/validate-esm.mjs +1 -1
- package/tests/subverseinfo.spec.mjs +300 -266
- package/tsconfig.json +115 -0
- package/schema/schema_expanse_instances.json +0 -17
- package/src/subverseinfo.mjs +0 -146
package/dist/subverseinfo.cjs.js
CHANGED
|
@@ -1,6 +1,1125 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
const schema_SubverseInfo_query = validate19;function validate19(data, {instancePath="", parentData, parentDataProperty, rootData=data, dynamicAnchors={}}={}){let vErrors = null;let errors = 0;const evaluated0 = validate19.evaluated;if(evaluated0.dynamicProps){evaluated0.props = undefined;}if(evaluated0.dynamicItems){evaluated0.items = undefined;}{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(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("2" !== data.subverse_info){validate19.errors = [{instancePath:instancePath+"/subverse_info",schemaPath:"definitions#/definitions/_v/const",keyword:"const",params:{allowedValue: "2"},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};const schema_SubverseInfo_expanse = validate20;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;}{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(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;{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};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;}{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(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;{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;}}}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={}}={}){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;if(errors === _errs1){if(data0 && typeof data0 == "object" && !Array.isArray(data0)){let missing1;if(((data0.subverse === undefined) && (missing1 = "subverse")) || ((data0.protocols === undefined) && (missing1 = "protocols"))){validate20.errors = [{instancePath:instancePath+"/expanse",schemaPath:"#/properties/expanse/required",keyword:"required",params:{missingProperty: missing1},message:"must have required property '"+missing1+"'"}];return false;}else {if(data0.subverse !== undefined){let data1 = data0.subverse;const _errs3 = 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 === _errs3){if(data1 && typeof data1 == "object" && !Array.isArray(data1)){if(data1["map-uri"] !== undefined){const _errs6 = 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 valid3 = _errs6 === errors;}else {var valid3 = true;}if(valid3){if(data1.instances !== undefined){const _errs8 = 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 valid3 = _errs8 === errors;}else {var valid3 = true;}if(valid3){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;}}}}}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 valid1 = _errs3 === errors;}else {var valid1 = true;}if(valid1){if(data0.platforms !== undefined){let data4 = data0.platforms;const _errs10 = errors;const _errs11 = errors;if(errors === _errs11){if(Array.isArray(data4)){var valid5 = true;const len0 = data4.length;for(let i0=0; i0<len0; i0++){let data5 = data4[i0];const _errs13 = errors;if(errors === _errs13){if(data5 && typeof data5 == "object" && !Array.isArray(data5)){let missing2;if((data5.id === undefined) && (missing2 = "id")){validate20.errors = [{instancePath:instancePath+"/expanse/platforms/" + i0,schemaPath:"definitions#/definitions/platforms/items/required",keyword:"required",params:{missingProperty: missing2},message:"must have required property '"+missing2+"'"}];return false;}else {if(data5.id !== undefined){const _errs15 = 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 valid6 = _errs15 === errors;}else {var valid6 = true;}if(valid6){if(data5.archs !== undefined){let data7 = data5.archs;const _errs17 = errors;if(errors === _errs17){if(Array.isArray(data7)){var valid7 = true;const len1 = data7.length;for(let i1=0; i1<len1; i1++){const _errs19 = 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 valid7 = _errs19 === errors;if(!valid7){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 valid6 = _errs17 === errors;}else {var valid6 = true;}if(valid6){if(data5.agents !== undefined){let data9 = data5.agents;const _errs21 = errors;if(errors === _errs21){if(Array.isArray(data9)){var valid8 = true;const len2 = data9.length;for(let i2=0; i2<len2; i2++){const _errs23 = 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 valid8 = _errs23 === errors;if(!valid8){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 valid6 = _errs21 === errors;}else {var valid6 = 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 valid5 = _errs13 === errors;if(!valid5){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 valid1 = _errs10 === errors;}else {var valid1 = true;}if(valid1){if(data0.protocols !== undefined){let data11 = data0.protocols;const _errs25 = errors;const _errs26 = errors;if(errors === _errs26){if(Array.isArray(data11)){var valid10 = true;const len3 = data11.length;for(let i3=0; i3<len3; i3++){let data12 = data11[i3];const _errs28 = errors;if(errors === _errs28){if(data12 && typeof data12 == "object" && !Array.isArray(data12)){let missing3;if(((data12.id === undefined) && (missing3 = "id")) || ((data12.attr === undefined) && (missing3 = "attr"))){validate20.errors = [{instancePath:instancePath+"/expanse/protocols/" + i3,schemaPath:"definitions#/definitions/protocols/items/required",keyword:"required",params:{missingProperty: missing3},message:"must have required property '"+missing3+"'"}];return false;}else {if(data12.id !== undefined){const _errs30 = 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 valid11 = _errs30 === errors;}else {var valid11 = true;}if(valid11){if(data12.name !== undefined){const _errs32 = 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 valid11 = _errs32 === errors;}else {var valid11 = true;}if(valid11){if(data12.version !== undefined){const _errs34 = 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 valid11 = _errs34 === errors;}else {var valid11 = true;}if(valid11){if(data12.attr !== undefined){const _errs36 = 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 valid11 = _errs36 === errors;}else {var valid11 = true;}if(valid11){if(data12.url !== undefined){const _errs38 = 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 valid11 = _errs38 === errors;}else {var valid11 = 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 valid10 = _errs28 === errors;if(!valid10){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 valid1 = _errs25 === errors;}else {var valid1 = 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 _errs40 = errors;if("2" !== data.subverse_info){validate20.errors = [{instancePath:instancePath+"/subverse_info",schemaPath:"definitions#/definitions/_v/const",keyword:"const",params:{allowedValue: "2"},message:"must be equal to constant"}];return false;}var valid0 = _errs40 === 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};
|
|
3
|
+
const schema_SubverseInfo_query = validate19;
|
|
4
|
+
function validate19(data, { instancePath = "", parentData, parentDataProperty, rootData = data, dynamicAnchors = {} } = {}) { let vErrors = null; let errors = 0; const evaluated0 = validate19.evaluated; if (evaluated0.dynamicProps) {
|
|
5
|
+
evaluated0.props = undefined;
|
|
6
|
+
} if (evaluated0.dynamicItems) {
|
|
7
|
+
evaluated0.items = undefined;
|
|
8
|
+
} {
|
|
9
|
+
if (data && typeof data == "object" && !Array.isArray(data)) {
|
|
10
|
+
let missing0;
|
|
11
|
+
if (((data.query === undefined) && (missing0 = "query")) || ((data.subverse_info === undefined) && (missing0 = "subverse_info"))) {
|
|
12
|
+
validate19.errors = [{ instancePath, schemaPath: "#/required", keyword: "required", params: { missingProperty: missing0 }, message: "must have required property '" + missing0 + "'" }];
|
|
13
|
+
return false;
|
|
14
|
+
}
|
|
15
|
+
else {
|
|
16
|
+
if (data.query !== undefined) {
|
|
17
|
+
let data0 = data.query;
|
|
18
|
+
const _errs1 = errors;
|
|
19
|
+
{
|
|
20
|
+
if (data0 && typeof data0 == "object" && !Array.isArray(data0)) {
|
|
21
|
+
let missing1;
|
|
22
|
+
if ((((data0.name === undefined) && (missing1 = "name")) || ((data0.graphql === undefined) && (missing1 = "graphql"))) || ((data0.ttl_msec === undefined) && (missing1 = "ttl_msec"))) {
|
|
23
|
+
validate19.errors = [{ instancePath: instancePath + "/query", schemaPath: "#/properties/query/required", keyword: "required", params: { missingProperty: missing1 }, message: "must have required property '" + missing1 + "'" }];
|
|
24
|
+
return false;
|
|
25
|
+
}
|
|
26
|
+
else {
|
|
27
|
+
if (data0.name !== undefined) {
|
|
28
|
+
const _errs3 = errors;
|
|
29
|
+
if (typeof data0.name !== "string") {
|
|
30
|
+
validate19.errors = [{ instancePath: instancePath + "/query/name", schemaPath: "#/properties/query/properties/name/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
|
|
31
|
+
return false;
|
|
32
|
+
}
|
|
33
|
+
var valid1 = _errs3 === errors;
|
|
34
|
+
}
|
|
35
|
+
else {
|
|
36
|
+
var valid1 = true;
|
|
37
|
+
}
|
|
38
|
+
if (valid1) {
|
|
39
|
+
if (data0.graphql !== undefined) {
|
|
40
|
+
const _errs5 = errors;
|
|
41
|
+
if (typeof data0.graphql !== "string") {
|
|
42
|
+
validate19.errors = [{ instancePath: instancePath + "/query/graphql", schemaPath: "#/properties/query/properties/graphql/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
|
|
43
|
+
return false;
|
|
44
|
+
}
|
|
45
|
+
var valid1 = _errs5 === errors;
|
|
46
|
+
}
|
|
47
|
+
else {
|
|
48
|
+
var valid1 = true;
|
|
49
|
+
}
|
|
50
|
+
if (valid1) {
|
|
51
|
+
if (data0.ttl_msec !== undefined) {
|
|
52
|
+
let data3 = data0.ttl_msec;
|
|
53
|
+
const _errs7 = errors;
|
|
54
|
+
if (!(((typeof data3 == "number") && (!(data3 % 1) && !isNaN(data3))) && (isFinite(data3)))) {
|
|
55
|
+
validate19.errors = [{ instancePath: instancePath + "/query/ttl_msec", schemaPath: "#/properties/query/properties/ttl_msec/type", keyword: "type", params: { type: "integer" }, message: "must be integer" }];
|
|
56
|
+
return false;
|
|
57
|
+
}
|
|
58
|
+
var valid1 = _errs7 === errors;
|
|
59
|
+
}
|
|
60
|
+
else {
|
|
61
|
+
var valid1 = true;
|
|
62
|
+
}
|
|
63
|
+
if (valid1) {
|
|
64
|
+
if (data0.unevaluatedProperties !== undefined) {
|
|
65
|
+
var valid1 = false;
|
|
66
|
+
validate19.errors = [{ instancePath: instancePath + "/query/unevaluatedProperties", schemaPath: "#/properties/query/properties/unevaluatedProperties/false schema", keyword: "false schema", params: {}, message: "boolean schema is false" }];
|
|
67
|
+
return false;
|
|
68
|
+
}
|
|
69
|
+
else {
|
|
70
|
+
var valid1 = true;
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
else {
|
|
78
|
+
validate19.errors = [{ instancePath: instancePath + "/query", schemaPath: "#/properties/query/type", keyword: "type", params: { type: "object" }, message: "must be object" }];
|
|
79
|
+
return false;
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
var valid0 = _errs1 === errors;
|
|
83
|
+
}
|
|
84
|
+
else {
|
|
85
|
+
var valid0 = true;
|
|
86
|
+
}
|
|
87
|
+
if (valid0) {
|
|
88
|
+
if (data.subverse_info !== undefined) {
|
|
89
|
+
const _errs9 = errors;
|
|
90
|
+
if ("4" !== data.subverse_info) {
|
|
91
|
+
validate19.errors = [{ instancePath: instancePath + "/subverse_info", schemaPath: "definitions#/definitions/_v/const", keyword: "const", params: { allowedValue: "4" }, message: "must be equal to constant" }];
|
|
92
|
+
return false;
|
|
93
|
+
}
|
|
94
|
+
var valid0 = _errs9 === errors;
|
|
95
|
+
}
|
|
96
|
+
else {
|
|
97
|
+
var valid0 = true;
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
else {
|
|
103
|
+
validate19.errors = [{ instancePath, schemaPath: "#/type", keyword: "type", params: { type: "object" }, message: "must be object" }];
|
|
104
|
+
return false;
|
|
105
|
+
}
|
|
106
|
+
} validate19.errors = vErrors; return errors === 0; }
|
|
107
|
+
validate19.evaluated = { "props": { "query": true, "subverse_info": true }, "dynamicProps": false, "dynamicItems": false };
|
|
108
|
+
const schema_SubverseInfo_subverse = validate20;
|
|
109
|
+
function validate21(data, { instancePath = "", parentData, parentDataProperty, rootData = data, dynamicAnchors = {} } = {}) { let vErrors = null; let errors = 0; const evaluated0 = validate21.evaluated; if (evaluated0.dynamicProps) {
|
|
110
|
+
evaluated0.props = undefined;
|
|
111
|
+
} if (evaluated0.dynamicItems) {
|
|
112
|
+
evaluated0.items = undefined;
|
|
113
|
+
} {
|
|
114
|
+
if (data && typeof data == "object" && !Array.isArray(data)) {
|
|
115
|
+
let missing0;
|
|
116
|
+
if (((data.uri === undefined) && (missing0 = "uri")) || ((data.name === undefined) && (missing0 = "name"))) {
|
|
117
|
+
validate21.errors = [{ instancePath, schemaPath: "definitions#/definitions/unique-id/required", keyword: "required", params: { missingProperty: missing0 }, message: "must have required property '" + missing0 + "'" }];
|
|
118
|
+
return false;
|
|
119
|
+
}
|
|
120
|
+
else {
|
|
121
|
+
if (data.uri !== undefined) {
|
|
122
|
+
const _errs4 = errors;
|
|
123
|
+
if (typeof data.uri !== "string") {
|
|
124
|
+
validate21.errors = [{ instancePath: instancePath + "/uri", schemaPath: "definitions#/definitions/unique-id/properties/uri/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
|
|
125
|
+
return false;
|
|
126
|
+
}
|
|
127
|
+
var valid2 = _errs4 === errors;
|
|
128
|
+
}
|
|
129
|
+
else {
|
|
130
|
+
var valid2 = true;
|
|
131
|
+
}
|
|
132
|
+
if (valid2) {
|
|
133
|
+
if (data.name !== undefined) {
|
|
134
|
+
const _errs6 = errors;
|
|
135
|
+
if (typeof data.name !== "string") {
|
|
136
|
+
validate21.errors = [{ instancePath: instancePath + "/name", schemaPath: "definitions#/definitions/unique-id/properties/name/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
|
|
137
|
+
return false;
|
|
138
|
+
}
|
|
139
|
+
var valid2 = _errs6 === errors;
|
|
140
|
+
}
|
|
141
|
+
else {
|
|
142
|
+
var valid2 = true;
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
else {
|
|
148
|
+
validate21.errors = [{ instancePath, schemaPath: "definitions#/definitions/unique-id/type", keyword: "type", params: { type: "object" }, message: "must be object" }];
|
|
149
|
+
return false;
|
|
150
|
+
}
|
|
151
|
+
} {
|
|
152
|
+
if (data && typeof data == "object" && !Array.isArray(data)) {
|
|
153
|
+
if (data.favicon !== undefined) {
|
|
154
|
+
const _errs8 = errors;
|
|
155
|
+
if (typeof data.favicon !== "string") {
|
|
156
|
+
validate21.errors = [{ instancePath: instancePath + "/favicon", schemaPath: "#/properties/favicon/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
|
|
157
|
+
return false;
|
|
158
|
+
}
|
|
159
|
+
var valid3 = _errs8 === errors;
|
|
160
|
+
}
|
|
161
|
+
else {
|
|
162
|
+
var valid3 = true;
|
|
163
|
+
}
|
|
164
|
+
if (valid3) {
|
|
165
|
+
if (data.hyperport !== undefined) {
|
|
166
|
+
let data3 = data.hyperport;
|
|
167
|
+
const _errs10 = errors;
|
|
168
|
+
{
|
|
169
|
+
if (data3 && typeof data3 == "object" && !Array.isArray(data3)) {
|
|
170
|
+
let missing1;
|
|
171
|
+
if (((data3.uri === undefined) && (missing1 = "uri")) || ((data3.port === undefined) && (missing1 = "port"))) {
|
|
172
|
+
validate21.errors = [{ instancePath: instancePath + "/hyperport", schemaPath: "definitions#/definitions/hyperport/required", keyword: "required", params: { missingProperty: missing1 }, message: "must have required property '" + missing1 + "'" }];
|
|
173
|
+
return false;
|
|
174
|
+
}
|
|
175
|
+
else {
|
|
176
|
+
if (data3.uri !== undefined) {
|
|
177
|
+
if (typeof data3.uri !== "string") {
|
|
178
|
+
validate21.errors = [{ instancePath: instancePath + "/hyperport/uri", schemaPath: "definitions#/definitions/hyperport/properties/uri/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
|
|
179
|
+
return false;
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
else {
|
|
185
|
+
validate21.errors = [{ instancePath: instancePath + "/hyperport", schemaPath: "definitions#/definitions/hyperport/type", keyword: "type", params: { type: "object" }, message: "must be object" }];
|
|
186
|
+
return false;
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
var valid3 = _errs10 === errors;
|
|
190
|
+
}
|
|
191
|
+
else {
|
|
192
|
+
var valid3 = true;
|
|
193
|
+
}
|
|
194
|
+
if (valid3) {
|
|
195
|
+
if (data.info !== undefined) {
|
|
196
|
+
let data5 = data.info;
|
|
197
|
+
const _errs15 = errors;
|
|
198
|
+
if (!(data5 && typeof data5 == "object" && !Array.isArray(data5))) {
|
|
199
|
+
validate21.errors = [{ instancePath: instancePath + "/info", schemaPath: "definitions#/definitions/info/type", keyword: "type", params: { type: "object" }, message: "must be object" }];
|
|
200
|
+
return false;
|
|
201
|
+
}
|
|
202
|
+
var valid3 = _errs15 === errors;
|
|
203
|
+
}
|
|
204
|
+
else {
|
|
205
|
+
var valid3 = true;
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
else {
|
|
211
|
+
validate21.errors = [{ instancePath, schemaPath: "#/type", keyword: "type", params: { type: "object" }, message: "must be object" }];
|
|
212
|
+
return false;
|
|
213
|
+
}
|
|
214
|
+
} validate21.errors = vErrors; return errors === 0; }
|
|
215
|
+
validate21.evaluated = { "props": { "favicon": true, "hyperport": true, "info": true, "uri": true, "name": true }, "dynamicProps": false, "dynamicItems": false };
|
|
216
|
+
function validate24(data, { instancePath = "", parentData, parentDataProperty, rootData = data, dynamicAnchors = {} } = {}) { let vErrors = null; let errors = 0; const evaluated0 = validate24.evaluated; if (evaluated0.dynamicProps) {
|
|
217
|
+
evaluated0.props = undefined;
|
|
218
|
+
} if (evaluated0.dynamicItems) {
|
|
219
|
+
evaluated0.items = undefined;
|
|
220
|
+
} {
|
|
221
|
+
if (data && typeof data == "object" && !Array.isArray(data)) {
|
|
222
|
+
let missing0;
|
|
223
|
+
if (((data.uri === undefined) && (missing0 = "uri")) || ((data.name === undefined) && (missing0 = "name"))) {
|
|
224
|
+
validate24.errors = [{ instancePath, schemaPath: "definitions#/definitions/unique-id/required", keyword: "required", params: { missingProperty: missing0 }, message: "must have required property '" + missing0 + "'" }];
|
|
225
|
+
return false;
|
|
226
|
+
}
|
|
227
|
+
else {
|
|
228
|
+
if (data.uri !== undefined) {
|
|
229
|
+
const _errs4 = errors;
|
|
230
|
+
if (typeof data.uri !== "string") {
|
|
231
|
+
validate24.errors = [{ instancePath: instancePath + "/uri", schemaPath: "definitions#/definitions/unique-id/properties/uri/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
|
|
232
|
+
return false;
|
|
233
|
+
}
|
|
234
|
+
var valid2 = _errs4 === errors;
|
|
235
|
+
}
|
|
236
|
+
else {
|
|
237
|
+
var valid2 = true;
|
|
238
|
+
}
|
|
239
|
+
if (valid2) {
|
|
240
|
+
if (data.name !== undefined) {
|
|
241
|
+
const _errs6 = errors;
|
|
242
|
+
if (typeof data.name !== "string") {
|
|
243
|
+
validate24.errors = [{ instancePath: instancePath + "/name", schemaPath: "definitions#/definitions/unique-id/properties/name/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
|
|
244
|
+
return false;
|
|
245
|
+
}
|
|
246
|
+
var valid2 = _errs6 === errors;
|
|
247
|
+
}
|
|
248
|
+
else {
|
|
249
|
+
var valid2 = true;
|
|
250
|
+
}
|
|
251
|
+
}
|
|
252
|
+
}
|
|
253
|
+
}
|
|
254
|
+
else {
|
|
255
|
+
validate24.errors = [{ instancePath, schemaPath: "definitions#/definitions/unique-id/type", keyword: "type", params: { type: "object" }, message: "must be object" }];
|
|
256
|
+
return false;
|
|
257
|
+
}
|
|
258
|
+
} {
|
|
259
|
+
if (data && typeof data == "object" && !Array.isArray(data)) {
|
|
260
|
+
if (data.favicon !== undefined) {
|
|
261
|
+
const _errs8 = errors;
|
|
262
|
+
if (typeof data.favicon !== "string") {
|
|
263
|
+
validate24.errors = [{ instancePath: instancePath + "/favicon", schemaPath: "#/properties/favicon/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
|
|
264
|
+
return false;
|
|
265
|
+
}
|
|
266
|
+
var valid3 = _errs8 === errors;
|
|
267
|
+
}
|
|
268
|
+
else {
|
|
269
|
+
var valid3 = true;
|
|
270
|
+
}
|
|
271
|
+
if (valid3) {
|
|
272
|
+
if (data.hyperport !== undefined) {
|
|
273
|
+
let data3 = data.hyperport;
|
|
274
|
+
const _errs10 = errors;
|
|
275
|
+
{
|
|
276
|
+
if (data3 && typeof data3 == "object" && !Array.isArray(data3)) {
|
|
277
|
+
let missing1;
|
|
278
|
+
if (((data3.uri === undefined) && (missing1 = "uri")) || ((data3.port === undefined) && (missing1 = "port"))) {
|
|
279
|
+
validate24.errors = [{ instancePath: instancePath + "/hyperport", schemaPath: "definitions#/definitions/hyperport/required", keyword: "required", params: { missingProperty: missing1 }, message: "must have required property '" + missing1 + "'" }];
|
|
280
|
+
return false;
|
|
281
|
+
}
|
|
282
|
+
else {
|
|
283
|
+
if (data3.uri !== undefined) {
|
|
284
|
+
if (typeof data3.uri !== "string") {
|
|
285
|
+
validate24.errors = [{ instancePath: instancePath + "/hyperport/uri", schemaPath: "definitions#/definitions/hyperport/properties/uri/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
|
|
286
|
+
return false;
|
|
287
|
+
}
|
|
288
|
+
}
|
|
289
|
+
}
|
|
290
|
+
}
|
|
291
|
+
else {
|
|
292
|
+
validate24.errors = [{ instancePath: instancePath + "/hyperport", schemaPath: "definitions#/definitions/hyperport/type", keyword: "type", params: { type: "object" }, message: "must be object" }];
|
|
293
|
+
return false;
|
|
294
|
+
}
|
|
295
|
+
}
|
|
296
|
+
var valid3 = _errs10 === errors;
|
|
297
|
+
}
|
|
298
|
+
else {
|
|
299
|
+
var valid3 = true;
|
|
300
|
+
}
|
|
301
|
+
if (valid3) {
|
|
302
|
+
if (data.info !== undefined) {
|
|
303
|
+
let data5 = data.info;
|
|
304
|
+
const _errs15 = errors;
|
|
305
|
+
if (!(data5 && typeof data5 == "object" && !Array.isArray(data5))) {
|
|
306
|
+
validate24.errors = [{ instancePath: instancePath + "/info", schemaPath: "definitions#/definitions/info/type", keyword: "type", params: { type: "object" }, message: "must be object" }];
|
|
307
|
+
return false;
|
|
308
|
+
}
|
|
309
|
+
var valid3 = _errs15 === errors;
|
|
310
|
+
}
|
|
311
|
+
else {
|
|
312
|
+
var valid3 = true;
|
|
313
|
+
}
|
|
314
|
+
}
|
|
315
|
+
}
|
|
316
|
+
}
|
|
317
|
+
else {
|
|
318
|
+
validate24.errors = [{ instancePath, schemaPath: "#/type", keyword: "type", params: { type: "object" }, message: "must be object" }];
|
|
319
|
+
return false;
|
|
320
|
+
}
|
|
321
|
+
} validate24.errors = vErrors; return errors === 0; }
|
|
322
|
+
validate24.evaluated = { "props": { "favicon": true, "hyperport": true, "info": true, "uri": true, "name": true }, "dynamicProps": false, "dynamicItems": false };
|
|
323
|
+
function validate23(data, { instancePath = "", parentData, parentDataProperty, rootData = data, dynamicAnchors = {} } = {}) { let vErrors = null; let errors = 0; const evaluated0 = validate23.evaluated; if (evaluated0.dynamicProps) {
|
|
324
|
+
evaluated0.props = undefined;
|
|
325
|
+
} if (evaluated0.dynamicItems) {
|
|
326
|
+
evaluated0.items = undefined;
|
|
327
|
+
} if (errors === 0) {
|
|
328
|
+
if (Array.isArray(data)) {
|
|
329
|
+
var valid0 = true;
|
|
330
|
+
const len0 = data.length;
|
|
331
|
+
for (let i0 = 0; i0 < len0; i0++) {
|
|
332
|
+
let data0 = data[i0];
|
|
333
|
+
const _errs1 = errors;
|
|
334
|
+
if (!(validate24(data0, { instancePath: instancePath + "/" + i0, parentData: data, parentDataProperty: i0, rootData, dynamicAnchors }))) {
|
|
335
|
+
vErrors = vErrors === null ? validate24.errors : vErrors.concat(validate24.errors);
|
|
336
|
+
errors = vErrors.length;
|
|
337
|
+
}
|
|
338
|
+
if (errors === _errs1) {
|
|
339
|
+
if (data0 && typeof data0 == "object" && !Array.isArray(data0)) {
|
|
340
|
+
for (const key0 in data0) {
|
|
341
|
+
if (((((key0 !== "favicon") && (key0 !== "hyperport")) && (key0 !== "info")) && (key0 !== "uri")) && (key0 !== "name")) {
|
|
342
|
+
validate23.errors = [{ instancePath: instancePath + "/" + i0, schemaPath: "#/items/unevaluatedProperties", keyword: "unevaluatedProperties", params: { unevaluatedProperty: key0 }, message: "must NOT have unevaluated properties" }];
|
|
343
|
+
return false;
|
|
344
|
+
}
|
|
345
|
+
}
|
|
346
|
+
}
|
|
347
|
+
else {
|
|
348
|
+
validate23.errors = [{ instancePath: instancePath + "/" + i0, schemaPath: "#/items/type", keyword: "type", params: { type: "object" }, message: "must be object" }];
|
|
349
|
+
return false;
|
|
350
|
+
}
|
|
351
|
+
}
|
|
352
|
+
var valid0 = _errs1 === errors;
|
|
353
|
+
if (!valid0) {
|
|
354
|
+
break;
|
|
355
|
+
}
|
|
356
|
+
}
|
|
357
|
+
}
|
|
358
|
+
else {
|
|
359
|
+
validate23.errors = [{ instancePath, schemaPath: "#/type", keyword: "type", params: { type: "array" }, message: "must be array" }];
|
|
360
|
+
return false;
|
|
361
|
+
}
|
|
362
|
+
} validate23.errors = vErrors; return errors === 0; }
|
|
363
|
+
validate23.evaluated = { "items": true, "dynamicProps": false, "dynamicItems": false };
|
|
364
|
+
function validate20(data, { instancePath = "", parentData, parentDataProperty, rootData = data, dynamicAnchors = {} } = {}) { let vErrors = null; let errors = 0; const evaluated0 = validate20.evaluated; if (evaluated0.dynamicProps) {
|
|
365
|
+
evaluated0.props = undefined;
|
|
366
|
+
} if (evaluated0.dynamicItems) {
|
|
367
|
+
evaluated0.items = undefined;
|
|
368
|
+
} if (errors === 0) {
|
|
369
|
+
if (data && typeof data == "object" && !Array.isArray(data)) {
|
|
370
|
+
let missing0;
|
|
371
|
+
if (((data.expanse === undefined) && (missing0 = "expanse")) || ((data.subverse_info === undefined) && (missing0 = "subverse_info"))) {
|
|
372
|
+
validate20.errors = [{ instancePath, schemaPath: "#/required", keyword: "required", params: { missingProperty: missing0 }, message: "must have required property '" + missing0 + "'" }];
|
|
373
|
+
return false;
|
|
374
|
+
}
|
|
375
|
+
else {
|
|
376
|
+
if (data.expanse !== undefined) {
|
|
377
|
+
let data0 = data.expanse;
|
|
378
|
+
const _errs1 = errors;
|
|
379
|
+
const _errs3 = errors;
|
|
380
|
+
const _errs4 = errors;
|
|
381
|
+
if (data0 && typeof data0 == "object" && !Array.isArray(data0)) {
|
|
382
|
+
if ((data0.instances === undefined) && ("instances")) {
|
|
383
|
+
const err0 = {};
|
|
384
|
+
if (vErrors === null) {
|
|
385
|
+
vErrors = [err0];
|
|
386
|
+
}
|
|
387
|
+
else {
|
|
388
|
+
vErrors.push(err0);
|
|
389
|
+
}
|
|
390
|
+
errors++;
|
|
391
|
+
}
|
|
392
|
+
}
|
|
393
|
+
var valid1 = _errs4 === errors;
|
|
394
|
+
if (valid1) {
|
|
395
|
+
validate20.errors = [{ instancePath: instancePath + "/expanse", schemaPath: "#/properties/expanse/not", keyword: "not", params: {}, message: "must NOT be valid" }];
|
|
396
|
+
return false;
|
|
397
|
+
}
|
|
398
|
+
else {
|
|
399
|
+
errors = _errs3;
|
|
400
|
+
if (vErrors !== null) {
|
|
401
|
+
if (_errs3) {
|
|
402
|
+
vErrors.length = _errs3;
|
|
403
|
+
}
|
|
404
|
+
else {
|
|
405
|
+
vErrors = null;
|
|
406
|
+
}
|
|
407
|
+
}
|
|
408
|
+
}
|
|
409
|
+
if (errors === _errs1) {
|
|
410
|
+
if (data0 && typeof data0 == "object" && !Array.isArray(data0)) {
|
|
411
|
+
let missing2;
|
|
412
|
+
if (((data0.subverse === undefined) && (missing2 = "subverse")) || ((data0.protocols === undefined) && (missing2 = "protocols"))) {
|
|
413
|
+
validate20.errors = [{ instancePath: instancePath + "/expanse", schemaPath: "#/properties/expanse/required", keyword: "required", params: { missingProperty: missing2 }, message: "must have required property '" + missing2 + "'" }];
|
|
414
|
+
return false;
|
|
415
|
+
}
|
|
416
|
+
else {
|
|
417
|
+
if (data0.subverse !== undefined) {
|
|
418
|
+
let data1 = data0.subverse;
|
|
419
|
+
const _errs5 = errors;
|
|
420
|
+
if (!(validate21(data1, { instancePath: instancePath + "/expanse/subverse", parentData: data0, parentDataProperty: "subverse", rootData, dynamicAnchors }))) {
|
|
421
|
+
vErrors = vErrors === null ? validate21.errors : vErrors.concat(validate21.errors);
|
|
422
|
+
errors = vErrors.length;
|
|
423
|
+
}
|
|
424
|
+
if (errors === _errs5) {
|
|
425
|
+
if (data1 && typeof data1 == "object" && !Array.isArray(data1)) {
|
|
426
|
+
if (data1["map-uri"] !== undefined) {
|
|
427
|
+
const _errs8 = errors;
|
|
428
|
+
if (typeof data1["map-uri"] !== "string") {
|
|
429
|
+
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" }];
|
|
430
|
+
return false;
|
|
431
|
+
}
|
|
432
|
+
var valid4 = _errs8 === errors;
|
|
433
|
+
}
|
|
434
|
+
else {
|
|
435
|
+
var valid4 = true;
|
|
436
|
+
}
|
|
437
|
+
if (valid4) {
|
|
438
|
+
if (data1.instances !== undefined) {
|
|
439
|
+
const _errs10 = errors;
|
|
440
|
+
if (!(validate23(data1.instances, { instancePath: instancePath + "/expanse/subverse/instances", parentData: data1, parentDataProperty: "instances", rootData, dynamicAnchors }))) {
|
|
441
|
+
vErrors = vErrors === null ? validate23.errors : vErrors.concat(validate23.errors);
|
|
442
|
+
errors = vErrors.length;
|
|
443
|
+
}
|
|
444
|
+
var valid4 = _errs10 === errors;
|
|
445
|
+
}
|
|
446
|
+
else {
|
|
447
|
+
var valid4 = true;
|
|
448
|
+
}
|
|
449
|
+
if (valid4) {
|
|
450
|
+
for (const key0 in data1) {
|
|
451
|
+
if (((((((key0 !== "map-uri") && (key0 !== "instances")) && (key0 !== "favicon")) && (key0 !== "hyperport")) && (key0 !== "info")) && (key0 !== "uri")) && (key0 !== "name")) {
|
|
452
|
+
validate20.errors = [{ instancePath: instancePath + "/expanse/subverse", schemaPath: "#/properties/expanse/properties/subverse/unevaluatedProperties", keyword: "unevaluatedProperties", params: { unevaluatedProperty: key0 }, message: "must NOT have unevaluated properties" }];
|
|
453
|
+
return false;
|
|
454
|
+
}
|
|
455
|
+
}
|
|
456
|
+
}
|
|
457
|
+
}
|
|
458
|
+
}
|
|
459
|
+
else {
|
|
460
|
+
validate20.errors = [{ instancePath: instancePath + "/expanse/subverse", schemaPath: "#/properties/expanse/properties/subverse/type", keyword: "type", params: { type: "object" }, message: "must be object" }];
|
|
461
|
+
return false;
|
|
462
|
+
}
|
|
463
|
+
}
|
|
464
|
+
var valid2 = _errs5 === errors;
|
|
465
|
+
}
|
|
466
|
+
else {
|
|
467
|
+
var valid2 = true;
|
|
468
|
+
}
|
|
469
|
+
if (valid2) {
|
|
470
|
+
if (data0.platforms !== undefined) {
|
|
471
|
+
let data4 = data0.platforms;
|
|
472
|
+
const _errs12 = errors;
|
|
473
|
+
const _errs13 = errors;
|
|
474
|
+
if (errors === _errs13) {
|
|
475
|
+
if (Array.isArray(data4)) {
|
|
476
|
+
var valid6 = true;
|
|
477
|
+
const len0 = data4.length;
|
|
478
|
+
for (let i0 = 0; i0 < len0; i0++) {
|
|
479
|
+
let data5 = data4[i0];
|
|
480
|
+
const _errs15 = errors;
|
|
481
|
+
if (errors === _errs15) {
|
|
482
|
+
if (data5 && typeof data5 == "object" && !Array.isArray(data5)) {
|
|
483
|
+
let missing3;
|
|
484
|
+
if ((data5.id === undefined) && (missing3 = "id")) {
|
|
485
|
+
validate20.errors = [{ instancePath: instancePath + "/expanse/platforms/" + i0, schemaPath: "definitions#/definitions/platforms/items/required", keyword: "required", params: { missingProperty: missing3 }, message: "must have required property '" + missing3 + "'" }];
|
|
486
|
+
return false;
|
|
487
|
+
}
|
|
488
|
+
else {
|
|
489
|
+
if (data5.id !== undefined) {
|
|
490
|
+
const _errs17 = errors;
|
|
491
|
+
if (typeof data5.id !== "string") {
|
|
492
|
+
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" }];
|
|
493
|
+
return false;
|
|
494
|
+
}
|
|
495
|
+
var valid7 = _errs17 === errors;
|
|
496
|
+
}
|
|
497
|
+
else {
|
|
498
|
+
var valid7 = true;
|
|
499
|
+
}
|
|
500
|
+
if (valid7) {
|
|
501
|
+
if (data5.archs !== undefined) {
|
|
502
|
+
let data7 = data5.archs;
|
|
503
|
+
const _errs19 = errors;
|
|
504
|
+
if (errors === _errs19) {
|
|
505
|
+
if (Array.isArray(data7)) {
|
|
506
|
+
var valid8 = true;
|
|
507
|
+
const len1 = data7.length;
|
|
508
|
+
for (let i1 = 0; i1 < len1; i1++) {
|
|
509
|
+
const _errs21 = errors;
|
|
510
|
+
if (typeof data7[i1] !== "string") {
|
|
511
|
+
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" }];
|
|
512
|
+
return false;
|
|
513
|
+
}
|
|
514
|
+
var valid8 = _errs21 === errors;
|
|
515
|
+
if (!valid8) {
|
|
516
|
+
break;
|
|
517
|
+
}
|
|
518
|
+
}
|
|
519
|
+
}
|
|
520
|
+
else {
|
|
521
|
+
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" }];
|
|
522
|
+
return false;
|
|
523
|
+
}
|
|
524
|
+
}
|
|
525
|
+
var valid7 = _errs19 === errors;
|
|
526
|
+
}
|
|
527
|
+
else {
|
|
528
|
+
var valid7 = true;
|
|
529
|
+
}
|
|
530
|
+
if (valid7) {
|
|
531
|
+
if (data5.agents !== undefined) {
|
|
532
|
+
let data9 = data5.agents;
|
|
533
|
+
const _errs23 = errors;
|
|
534
|
+
if (errors === _errs23) {
|
|
535
|
+
if (Array.isArray(data9)) {
|
|
536
|
+
var valid9 = true;
|
|
537
|
+
const len2 = data9.length;
|
|
538
|
+
for (let i2 = 0; i2 < len2; i2++) {
|
|
539
|
+
const _errs25 = errors;
|
|
540
|
+
if (typeof data9[i2] !== "string") {
|
|
541
|
+
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" }];
|
|
542
|
+
return false;
|
|
543
|
+
}
|
|
544
|
+
var valid9 = _errs25 === errors;
|
|
545
|
+
if (!valid9) {
|
|
546
|
+
break;
|
|
547
|
+
}
|
|
548
|
+
}
|
|
549
|
+
}
|
|
550
|
+
else {
|
|
551
|
+
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" }];
|
|
552
|
+
return false;
|
|
553
|
+
}
|
|
554
|
+
}
|
|
555
|
+
var valid7 = _errs23 === errors;
|
|
556
|
+
}
|
|
557
|
+
else {
|
|
558
|
+
var valid7 = true;
|
|
559
|
+
}
|
|
560
|
+
}
|
|
561
|
+
}
|
|
562
|
+
}
|
|
563
|
+
}
|
|
564
|
+
else {
|
|
565
|
+
validate20.errors = [{ instancePath: instancePath + "/expanse/platforms/" + i0, schemaPath: "definitions#/definitions/platforms/items/type", keyword: "type", params: { type: "object" }, message: "must be object" }];
|
|
566
|
+
return false;
|
|
567
|
+
}
|
|
568
|
+
}
|
|
569
|
+
var valid6 = _errs15 === errors;
|
|
570
|
+
if (!valid6) {
|
|
571
|
+
break;
|
|
572
|
+
}
|
|
573
|
+
}
|
|
574
|
+
}
|
|
575
|
+
else {
|
|
576
|
+
validate20.errors = [{ instancePath: instancePath + "/expanse/platforms", schemaPath: "definitions#/definitions/platforms/type", keyword: "type", params: { type: "array" }, message: "must be array" }];
|
|
577
|
+
return false;
|
|
578
|
+
}
|
|
579
|
+
}
|
|
580
|
+
var valid2 = _errs12 === errors;
|
|
581
|
+
}
|
|
582
|
+
else {
|
|
583
|
+
var valid2 = true;
|
|
584
|
+
}
|
|
585
|
+
if (valid2) {
|
|
586
|
+
if (data0.protocols !== undefined) {
|
|
587
|
+
let data11 = data0.protocols;
|
|
588
|
+
const _errs27 = errors;
|
|
589
|
+
const _errs28 = errors;
|
|
590
|
+
if (errors === _errs28) {
|
|
591
|
+
if (Array.isArray(data11)) {
|
|
592
|
+
var valid11 = true;
|
|
593
|
+
const len3 = data11.length;
|
|
594
|
+
for (let i3 = 0; i3 < len3; i3++) {
|
|
595
|
+
let data12 = data11[i3];
|
|
596
|
+
const _errs30 = errors;
|
|
597
|
+
if (errors === _errs30) {
|
|
598
|
+
if (data12 && typeof data12 == "object" && !Array.isArray(data12)) {
|
|
599
|
+
let missing4;
|
|
600
|
+
if (((data12.id === undefined) && (missing4 = "id")) || ((data12.attr === undefined) && (missing4 = "attr"))) {
|
|
601
|
+
validate20.errors = [{ instancePath: instancePath + "/expanse/protocols/" + i3, schemaPath: "definitions#/definitions/protocols/items/required", keyword: "required", params: { missingProperty: missing4 }, message: "must have required property '" + missing4 + "'" }];
|
|
602
|
+
return false;
|
|
603
|
+
}
|
|
604
|
+
else {
|
|
605
|
+
if (data12.id !== undefined) {
|
|
606
|
+
const _errs32 = errors;
|
|
607
|
+
if (typeof data12.id !== "string") {
|
|
608
|
+
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" }];
|
|
609
|
+
return false;
|
|
610
|
+
}
|
|
611
|
+
var valid12 = _errs32 === errors;
|
|
612
|
+
}
|
|
613
|
+
else {
|
|
614
|
+
var valid12 = true;
|
|
615
|
+
}
|
|
616
|
+
if (valid12) {
|
|
617
|
+
if (data12.name !== undefined) {
|
|
618
|
+
const _errs34 = errors;
|
|
619
|
+
if (typeof data12.name !== "string") {
|
|
620
|
+
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" }];
|
|
621
|
+
return false;
|
|
622
|
+
}
|
|
623
|
+
var valid12 = _errs34 === errors;
|
|
624
|
+
}
|
|
625
|
+
else {
|
|
626
|
+
var valid12 = true;
|
|
627
|
+
}
|
|
628
|
+
if (valid12) {
|
|
629
|
+
if (data12.version !== undefined) {
|
|
630
|
+
const _errs36 = errors;
|
|
631
|
+
if (typeof data12.version !== "string") {
|
|
632
|
+
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" }];
|
|
633
|
+
return false;
|
|
634
|
+
}
|
|
635
|
+
var valid12 = _errs36 === errors;
|
|
636
|
+
}
|
|
637
|
+
else {
|
|
638
|
+
var valid12 = true;
|
|
639
|
+
}
|
|
640
|
+
if (valid12) {
|
|
641
|
+
if (data12.attr !== undefined) {
|
|
642
|
+
const _errs38 = errors;
|
|
643
|
+
if (typeof data12.attr !== "string") {
|
|
644
|
+
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" }];
|
|
645
|
+
return false;
|
|
646
|
+
}
|
|
647
|
+
var valid12 = _errs38 === errors;
|
|
648
|
+
}
|
|
649
|
+
else {
|
|
650
|
+
var valid12 = true;
|
|
651
|
+
}
|
|
652
|
+
if (valid12) {
|
|
653
|
+
if (data12.url !== undefined) {
|
|
654
|
+
const _errs40 = errors;
|
|
655
|
+
if (typeof data12.url !== "string") {
|
|
656
|
+
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" }];
|
|
657
|
+
return false;
|
|
658
|
+
}
|
|
659
|
+
var valid12 = _errs40 === errors;
|
|
660
|
+
}
|
|
661
|
+
else {
|
|
662
|
+
var valid12 = true;
|
|
663
|
+
}
|
|
664
|
+
}
|
|
665
|
+
}
|
|
666
|
+
}
|
|
667
|
+
}
|
|
668
|
+
}
|
|
669
|
+
}
|
|
670
|
+
else {
|
|
671
|
+
validate20.errors = [{ instancePath: instancePath + "/expanse/protocols/" + i3, schemaPath: "definitions#/definitions/protocols/items/type", keyword: "type", params: { type: "object" }, message: "must be object" }];
|
|
672
|
+
return false;
|
|
673
|
+
}
|
|
674
|
+
}
|
|
675
|
+
var valid11 = _errs30 === errors;
|
|
676
|
+
if (!valid11) {
|
|
677
|
+
break;
|
|
678
|
+
}
|
|
679
|
+
}
|
|
680
|
+
}
|
|
681
|
+
else {
|
|
682
|
+
validate20.errors = [{ instancePath: instancePath + "/expanse/protocols", schemaPath: "definitions#/definitions/protocols/type", keyword: "type", params: { type: "array" }, message: "must be array" }];
|
|
683
|
+
return false;
|
|
684
|
+
}
|
|
685
|
+
}
|
|
686
|
+
var valid2 = _errs27 === errors;
|
|
687
|
+
}
|
|
688
|
+
else {
|
|
689
|
+
var valid2 = true;
|
|
690
|
+
}
|
|
691
|
+
}
|
|
692
|
+
}
|
|
693
|
+
}
|
|
694
|
+
}
|
|
695
|
+
else {
|
|
696
|
+
validate20.errors = [{ instancePath: instancePath + "/expanse", schemaPath: "#/properties/expanse/type", keyword: "type", params: { type: "object" }, message: "must be object" }];
|
|
697
|
+
return false;
|
|
698
|
+
}
|
|
699
|
+
}
|
|
700
|
+
var valid0 = _errs1 === errors;
|
|
701
|
+
}
|
|
702
|
+
else {
|
|
703
|
+
var valid0 = true;
|
|
704
|
+
}
|
|
705
|
+
if (valid0) {
|
|
706
|
+
if (data.subverse_info !== undefined) {
|
|
707
|
+
const _errs42 = errors;
|
|
708
|
+
if ("4" !== data.subverse_info) {
|
|
709
|
+
validate20.errors = [{ instancePath: instancePath + "/subverse_info", schemaPath: "definitions#/definitions/_v/const", keyword: "const", params: { allowedValue: "4" }, message: "must be equal to constant" }];
|
|
710
|
+
return false;
|
|
711
|
+
}
|
|
712
|
+
var valid0 = _errs42 === errors;
|
|
713
|
+
}
|
|
714
|
+
else {
|
|
715
|
+
var valid0 = true;
|
|
716
|
+
}
|
|
717
|
+
}
|
|
718
|
+
}
|
|
719
|
+
}
|
|
720
|
+
else {
|
|
721
|
+
validate20.errors = [{ instancePath, schemaPath: "#/type", keyword: "type", params: { type: "object" }, message: "must be object" }];
|
|
722
|
+
return false;
|
|
723
|
+
}
|
|
724
|
+
} validate20.errors = vErrors; return errors === 0; }
|
|
725
|
+
validate20.evaluated = { "props": { "expanse": true, "subverse_info": true }, "dynamicProps": false, "dynamicItems": false };
|
|
726
|
+
const schema_SubverseInfo_instances = validate27;
|
|
727
|
+
function validate28(data, { instancePath = "", parentData, parentDataProperty, rootData = data, dynamicAnchors = {} } = {}) { let vErrors = null; let errors = 0; const evaluated0 = validate28.evaluated; if (evaluated0.dynamicProps) {
|
|
728
|
+
evaluated0.props = undefined;
|
|
729
|
+
} if (evaluated0.dynamicItems) {
|
|
730
|
+
evaluated0.items = undefined;
|
|
731
|
+
} if (errors === 0) {
|
|
732
|
+
if (Array.isArray(data)) {
|
|
733
|
+
var valid0 = true;
|
|
734
|
+
const len0 = data.length;
|
|
735
|
+
for (let i0 = 0; i0 < len0; i0++) {
|
|
736
|
+
let data0 = data[i0];
|
|
737
|
+
const _errs1 = errors;
|
|
738
|
+
if (!(validate24(data0, { instancePath: instancePath + "/" + i0, parentData: data, parentDataProperty: i0, rootData, dynamicAnchors }))) {
|
|
739
|
+
vErrors = vErrors === null ? validate24.errors : vErrors.concat(validate24.errors);
|
|
740
|
+
errors = vErrors.length;
|
|
741
|
+
}
|
|
742
|
+
if (errors === _errs1) {
|
|
743
|
+
if (data0 && typeof data0 == "object" && !Array.isArray(data0)) {
|
|
744
|
+
for (const key0 in data0) {
|
|
745
|
+
if (((((key0 !== "favicon") && (key0 !== "hyperport")) && (key0 !== "info")) && (key0 !== "uri")) && (key0 !== "name")) {
|
|
746
|
+
validate28.errors = [{ instancePath: instancePath + "/" + i0, schemaPath: "#/items/unevaluatedProperties", keyword: "unevaluatedProperties", params: { unevaluatedProperty: key0 }, message: "must NOT have unevaluated properties" }];
|
|
747
|
+
return false;
|
|
748
|
+
}
|
|
749
|
+
}
|
|
750
|
+
}
|
|
751
|
+
else {
|
|
752
|
+
validate28.errors = [{ instancePath: instancePath + "/" + i0, schemaPath: "#/items/type", keyword: "type", params: { type: "object" }, message: "must be object" }];
|
|
753
|
+
return false;
|
|
754
|
+
}
|
|
755
|
+
}
|
|
756
|
+
var valid0 = _errs1 === errors;
|
|
757
|
+
if (!valid0) {
|
|
758
|
+
break;
|
|
759
|
+
}
|
|
760
|
+
}
|
|
761
|
+
}
|
|
762
|
+
else {
|
|
763
|
+
validate28.errors = [{ instancePath, schemaPath: "#/type", keyword: "type", params: { type: "array" }, message: "must be array" }];
|
|
764
|
+
return false;
|
|
765
|
+
}
|
|
766
|
+
} validate28.errors = vErrors; return errors === 0; }
|
|
767
|
+
validate28.evaluated = { "items": true, "dynamicProps": false, "dynamicItems": false };
|
|
768
|
+
function validate27(data, { instancePath = "", parentData, parentDataProperty, rootData = data, dynamicAnchors = {} } = {}) { let vErrors = null; let errors = 0; const evaluated0 = validate27.evaluated; if (evaluated0.dynamicProps) {
|
|
769
|
+
evaluated0.props = undefined;
|
|
770
|
+
} if (evaluated0.dynamicItems) {
|
|
771
|
+
evaluated0.items = undefined;
|
|
772
|
+
} if (errors === 0) {
|
|
773
|
+
if (data && typeof data == "object" && !Array.isArray(data)) {
|
|
774
|
+
let missing0;
|
|
775
|
+
if (((data.expanse === undefined) && (missing0 = "expanse")) || ((data.subverse_info === undefined) && (missing0 = "subverse_info"))) {
|
|
776
|
+
validate27.errors = [{ instancePath, schemaPath: "#/required", keyword: "required", params: { missingProperty: missing0 }, message: "must have required property '" + missing0 + "'" }];
|
|
777
|
+
return false;
|
|
778
|
+
}
|
|
779
|
+
else {
|
|
780
|
+
if (data.expanse !== undefined) {
|
|
781
|
+
let data0 = data.expanse;
|
|
782
|
+
const _errs1 = errors;
|
|
783
|
+
if (errors === _errs1) {
|
|
784
|
+
if (data0 && typeof data0 == "object" && !Array.isArray(data0)) {
|
|
785
|
+
let missing1;
|
|
786
|
+
if ((data0.instances === undefined) && (missing1 = "instances")) {
|
|
787
|
+
validate27.errors = [{ instancePath: instancePath + "/expanse", schemaPath: "#/properties/expanse/required", keyword: "required", params: { missingProperty: missing1 }, message: "must have required property '" + missing1 + "'" }];
|
|
788
|
+
return false;
|
|
789
|
+
}
|
|
790
|
+
else {
|
|
791
|
+
if (data0.instances !== undefined) {
|
|
792
|
+
const _errs3 = errors;
|
|
793
|
+
if (!(validate28(data0.instances, { instancePath: instancePath + "/expanse/instances", parentData: data0, parentDataProperty: "instances", rootData, dynamicAnchors }))) {
|
|
794
|
+
vErrors = vErrors === null ? validate28.errors : vErrors.concat(validate28.errors);
|
|
795
|
+
errors = vErrors.length;
|
|
796
|
+
}
|
|
797
|
+
var valid1 = _errs3 === errors;
|
|
798
|
+
}
|
|
799
|
+
else {
|
|
800
|
+
var valid1 = true;
|
|
801
|
+
}
|
|
802
|
+
if (valid1) {
|
|
803
|
+
if (data0.subverse !== undefined) {
|
|
804
|
+
let data2 = data0.subverse;
|
|
805
|
+
const _errs4 = errors;
|
|
806
|
+
const _errs7 = errors;
|
|
807
|
+
if (errors === _errs7) {
|
|
808
|
+
if (data2 && typeof data2 == "object" && !Array.isArray(data2)) {
|
|
809
|
+
let missing2;
|
|
810
|
+
if (((data2.uri === undefined) && (missing2 = "uri")) || ((data2.name === undefined) && (missing2 = "name"))) {
|
|
811
|
+
validate27.errors = [{ instancePath: instancePath + "/expanse/subverse", schemaPath: "definitions#/definitions/unique-id/required", keyword: "required", params: { missingProperty: missing2 }, message: "must have required property '" + missing2 + "'" }];
|
|
812
|
+
return false;
|
|
813
|
+
}
|
|
814
|
+
else {
|
|
815
|
+
if (data2.uri !== undefined) {
|
|
816
|
+
const _errs9 = errors;
|
|
817
|
+
if (typeof data2.uri !== "string") {
|
|
818
|
+
validate27.errors = [{ instancePath: instancePath + "/expanse/subverse/uri", schemaPath: "definitions#/definitions/unique-id/properties/uri/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
|
|
819
|
+
return false;
|
|
820
|
+
}
|
|
821
|
+
var valid4 = _errs9 === errors;
|
|
822
|
+
}
|
|
823
|
+
else {
|
|
824
|
+
var valid4 = true;
|
|
825
|
+
}
|
|
826
|
+
if (valid4) {
|
|
827
|
+
if (data2.name !== undefined) {
|
|
828
|
+
const _errs11 = errors;
|
|
829
|
+
if (typeof data2.name !== "string") {
|
|
830
|
+
validate27.errors = [{ instancePath: instancePath + "/expanse/subverse/name", schemaPath: "definitions#/definitions/unique-id/properties/name/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
|
|
831
|
+
return false;
|
|
832
|
+
}
|
|
833
|
+
var valid4 = _errs11 === errors;
|
|
834
|
+
}
|
|
835
|
+
else {
|
|
836
|
+
var valid4 = true;
|
|
837
|
+
}
|
|
838
|
+
}
|
|
839
|
+
}
|
|
840
|
+
}
|
|
841
|
+
else {
|
|
842
|
+
validate27.errors = [{ instancePath: instancePath + "/expanse/subverse", schemaPath: "definitions#/definitions/unique-id/type", keyword: "type", params: { type: "object" }, message: "must be object" }];
|
|
843
|
+
return false;
|
|
844
|
+
}
|
|
845
|
+
}
|
|
846
|
+
if (errors === _errs4) {
|
|
847
|
+
if (data2 && typeof data2 == "object" && !Array.isArray(data2)) {
|
|
848
|
+
for (const key0 in data2) {
|
|
849
|
+
if ((key0 !== "uri") && (key0 !== "name")) {
|
|
850
|
+
validate27.errors = [{ instancePath: instancePath + "/expanse/subverse", schemaPath: "#/properties/expanse/properties/subverse/unevaluatedProperties", keyword: "unevaluatedProperties", params: { unevaluatedProperty: key0 }, message: "must NOT have unevaluated properties" }];
|
|
851
|
+
return false;
|
|
852
|
+
}
|
|
853
|
+
}
|
|
854
|
+
}
|
|
855
|
+
else {
|
|
856
|
+
validate27.errors = [{ instancePath: instancePath + "/expanse/subverse", schemaPath: "#/properties/expanse/properties/subverse/type", keyword: "type", params: { type: "object" }, message: "must be object" }];
|
|
857
|
+
return false;
|
|
858
|
+
}
|
|
859
|
+
}
|
|
860
|
+
var valid1 = _errs4 === errors;
|
|
861
|
+
}
|
|
862
|
+
else {
|
|
863
|
+
var valid1 = true;
|
|
864
|
+
}
|
|
865
|
+
if (valid1) {
|
|
866
|
+
if (data0.platforms !== undefined) {
|
|
867
|
+
let data5 = data0.platforms;
|
|
868
|
+
const _errs14 = errors;
|
|
869
|
+
const _errs15 = errors;
|
|
870
|
+
if (errors === _errs15) {
|
|
871
|
+
if (Array.isArray(data5)) {
|
|
872
|
+
var valid6 = true;
|
|
873
|
+
const len0 = data5.length;
|
|
874
|
+
for (let i0 = 0; i0 < len0; i0++) {
|
|
875
|
+
let data6 = data5[i0];
|
|
876
|
+
const _errs17 = errors;
|
|
877
|
+
if (errors === _errs17) {
|
|
878
|
+
if (data6 && typeof data6 == "object" && !Array.isArray(data6)) {
|
|
879
|
+
let missing3;
|
|
880
|
+
if ((data6.id === undefined) && (missing3 = "id")) {
|
|
881
|
+
validate27.errors = [{ instancePath: instancePath + "/expanse/platforms/" + i0, schemaPath: "definitions#/definitions/platforms/items/required", keyword: "required", params: { missingProperty: missing3 }, message: "must have required property '" + missing3 + "'" }];
|
|
882
|
+
return false;
|
|
883
|
+
}
|
|
884
|
+
else {
|
|
885
|
+
if (data6.id !== undefined) {
|
|
886
|
+
const _errs19 = errors;
|
|
887
|
+
if (typeof data6.id !== "string") {
|
|
888
|
+
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" }];
|
|
889
|
+
return false;
|
|
890
|
+
}
|
|
891
|
+
var valid7 = _errs19 === errors;
|
|
892
|
+
}
|
|
893
|
+
else {
|
|
894
|
+
var valid7 = true;
|
|
895
|
+
}
|
|
896
|
+
if (valid7) {
|
|
897
|
+
if (data6.archs !== undefined) {
|
|
898
|
+
let data8 = data6.archs;
|
|
899
|
+
const _errs21 = errors;
|
|
900
|
+
if (errors === _errs21) {
|
|
901
|
+
if (Array.isArray(data8)) {
|
|
902
|
+
var valid8 = true;
|
|
903
|
+
const len1 = data8.length;
|
|
904
|
+
for (let i1 = 0; i1 < len1; i1++) {
|
|
905
|
+
const _errs23 = errors;
|
|
906
|
+
if (typeof data8[i1] !== "string") {
|
|
907
|
+
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" }];
|
|
908
|
+
return false;
|
|
909
|
+
}
|
|
910
|
+
var valid8 = _errs23 === errors;
|
|
911
|
+
if (!valid8) {
|
|
912
|
+
break;
|
|
913
|
+
}
|
|
914
|
+
}
|
|
915
|
+
}
|
|
916
|
+
else {
|
|
917
|
+
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" }];
|
|
918
|
+
return false;
|
|
919
|
+
}
|
|
920
|
+
}
|
|
921
|
+
var valid7 = _errs21 === errors;
|
|
922
|
+
}
|
|
923
|
+
else {
|
|
924
|
+
var valid7 = true;
|
|
925
|
+
}
|
|
926
|
+
if (valid7) {
|
|
927
|
+
if (data6.agents !== undefined) {
|
|
928
|
+
let data10 = data6.agents;
|
|
929
|
+
const _errs25 = errors;
|
|
930
|
+
if (errors === _errs25) {
|
|
931
|
+
if (Array.isArray(data10)) {
|
|
932
|
+
var valid9 = true;
|
|
933
|
+
const len2 = data10.length;
|
|
934
|
+
for (let i2 = 0; i2 < len2; i2++) {
|
|
935
|
+
const _errs27 = errors;
|
|
936
|
+
if (typeof data10[i2] !== "string") {
|
|
937
|
+
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" }];
|
|
938
|
+
return false;
|
|
939
|
+
}
|
|
940
|
+
var valid9 = _errs27 === errors;
|
|
941
|
+
if (!valid9) {
|
|
942
|
+
break;
|
|
943
|
+
}
|
|
944
|
+
}
|
|
945
|
+
}
|
|
946
|
+
else {
|
|
947
|
+
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" }];
|
|
948
|
+
return false;
|
|
949
|
+
}
|
|
950
|
+
}
|
|
951
|
+
var valid7 = _errs25 === errors;
|
|
952
|
+
}
|
|
953
|
+
else {
|
|
954
|
+
var valid7 = true;
|
|
955
|
+
}
|
|
956
|
+
}
|
|
957
|
+
}
|
|
958
|
+
}
|
|
959
|
+
}
|
|
960
|
+
else {
|
|
961
|
+
validate27.errors = [{ instancePath: instancePath + "/expanse/platforms/" + i0, schemaPath: "definitions#/definitions/platforms/items/type", keyword: "type", params: { type: "object" }, message: "must be object" }];
|
|
962
|
+
return false;
|
|
963
|
+
}
|
|
964
|
+
}
|
|
965
|
+
var valid6 = _errs17 === errors;
|
|
966
|
+
if (!valid6) {
|
|
967
|
+
break;
|
|
968
|
+
}
|
|
969
|
+
}
|
|
970
|
+
}
|
|
971
|
+
else {
|
|
972
|
+
validate27.errors = [{ instancePath: instancePath + "/expanse/platforms", schemaPath: "definitions#/definitions/platforms/type", keyword: "type", params: { type: "array" }, message: "must be array" }];
|
|
973
|
+
return false;
|
|
974
|
+
}
|
|
975
|
+
}
|
|
976
|
+
var valid1 = _errs14 === errors;
|
|
977
|
+
}
|
|
978
|
+
else {
|
|
979
|
+
var valid1 = true;
|
|
980
|
+
}
|
|
981
|
+
if (valid1) {
|
|
982
|
+
if (data0.protocols !== undefined) {
|
|
983
|
+
let data12 = data0.protocols;
|
|
984
|
+
const _errs29 = errors;
|
|
985
|
+
const _errs30 = errors;
|
|
986
|
+
if (errors === _errs30) {
|
|
987
|
+
if (Array.isArray(data12)) {
|
|
988
|
+
var valid11 = true;
|
|
989
|
+
const len3 = data12.length;
|
|
990
|
+
for (let i3 = 0; i3 < len3; i3++) {
|
|
991
|
+
let data13 = data12[i3];
|
|
992
|
+
const _errs32 = errors;
|
|
993
|
+
if (errors === _errs32) {
|
|
994
|
+
if (data13 && typeof data13 == "object" && !Array.isArray(data13)) {
|
|
995
|
+
let missing4;
|
|
996
|
+
if (((data13.id === undefined) && (missing4 = "id")) || ((data13.attr === undefined) && (missing4 = "attr"))) {
|
|
997
|
+
validate27.errors = [{ instancePath: instancePath + "/expanse/protocols/" + i3, schemaPath: "definitions#/definitions/protocols/items/required", keyword: "required", params: { missingProperty: missing4 }, message: "must have required property '" + missing4 + "'" }];
|
|
998
|
+
return false;
|
|
999
|
+
}
|
|
1000
|
+
else {
|
|
1001
|
+
if (data13.id !== undefined) {
|
|
1002
|
+
const _errs34 = errors;
|
|
1003
|
+
if (typeof data13.id !== "string") {
|
|
1004
|
+
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" }];
|
|
1005
|
+
return false;
|
|
1006
|
+
}
|
|
1007
|
+
var valid12 = _errs34 === errors;
|
|
1008
|
+
}
|
|
1009
|
+
else {
|
|
1010
|
+
var valid12 = true;
|
|
1011
|
+
}
|
|
1012
|
+
if (valid12) {
|
|
1013
|
+
if (data13.name !== undefined) {
|
|
1014
|
+
const _errs36 = errors;
|
|
1015
|
+
if (typeof data13.name !== "string") {
|
|
1016
|
+
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" }];
|
|
1017
|
+
return false;
|
|
1018
|
+
}
|
|
1019
|
+
var valid12 = _errs36 === errors;
|
|
1020
|
+
}
|
|
1021
|
+
else {
|
|
1022
|
+
var valid12 = true;
|
|
1023
|
+
}
|
|
1024
|
+
if (valid12) {
|
|
1025
|
+
if (data13.version !== undefined) {
|
|
1026
|
+
const _errs38 = errors;
|
|
1027
|
+
if (typeof data13.version !== "string") {
|
|
1028
|
+
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" }];
|
|
1029
|
+
return false;
|
|
1030
|
+
}
|
|
1031
|
+
var valid12 = _errs38 === errors;
|
|
1032
|
+
}
|
|
1033
|
+
else {
|
|
1034
|
+
var valid12 = true;
|
|
1035
|
+
}
|
|
1036
|
+
if (valid12) {
|
|
1037
|
+
if (data13.attr !== undefined) {
|
|
1038
|
+
const _errs40 = errors;
|
|
1039
|
+
if (typeof data13.attr !== "string") {
|
|
1040
|
+
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" }];
|
|
1041
|
+
return false;
|
|
1042
|
+
}
|
|
1043
|
+
var valid12 = _errs40 === errors;
|
|
1044
|
+
}
|
|
1045
|
+
else {
|
|
1046
|
+
var valid12 = true;
|
|
1047
|
+
}
|
|
1048
|
+
if (valid12) {
|
|
1049
|
+
if (data13.url !== undefined) {
|
|
1050
|
+
const _errs42 = errors;
|
|
1051
|
+
if (typeof data13.url !== "string") {
|
|
1052
|
+
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" }];
|
|
1053
|
+
return false;
|
|
1054
|
+
}
|
|
1055
|
+
var valid12 = _errs42 === errors;
|
|
1056
|
+
}
|
|
1057
|
+
else {
|
|
1058
|
+
var valid12 = true;
|
|
1059
|
+
}
|
|
1060
|
+
}
|
|
1061
|
+
}
|
|
1062
|
+
}
|
|
1063
|
+
}
|
|
1064
|
+
}
|
|
1065
|
+
}
|
|
1066
|
+
else {
|
|
1067
|
+
validate27.errors = [{ instancePath: instancePath + "/expanse/protocols/" + i3, schemaPath: "definitions#/definitions/protocols/items/type", keyword: "type", params: { type: "object" }, message: "must be object" }];
|
|
1068
|
+
return false;
|
|
1069
|
+
}
|
|
1070
|
+
}
|
|
1071
|
+
var valid11 = _errs32 === errors;
|
|
1072
|
+
if (!valid11) {
|
|
1073
|
+
break;
|
|
1074
|
+
}
|
|
1075
|
+
}
|
|
1076
|
+
}
|
|
1077
|
+
else {
|
|
1078
|
+
validate27.errors = [{ instancePath: instancePath + "/expanse/protocols", schemaPath: "definitions#/definitions/protocols/type", keyword: "type", params: { type: "array" }, message: "must be array" }];
|
|
1079
|
+
return false;
|
|
1080
|
+
}
|
|
1081
|
+
}
|
|
1082
|
+
var valid1 = _errs29 === errors;
|
|
1083
|
+
}
|
|
1084
|
+
else {
|
|
1085
|
+
var valid1 = true;
|
|
1086
|
+
}
|
|
1087
|
+
}
|
|
1088
|
+
}
|
|
1089
|
+
}
|
|
1090
|
+
}
|
|
1091
|
+
}
|
|
1092
|
+
else {
|
|
1093
|
+
validate27.errors = [{ instancePath: instancePath + "/expanse", schemaPath: "#/properties/expanse/type", keyword: "type", params: { type: "object" }, message: "must be object" }];
|
|
1094
|
+
return false;
|
|
1095
|
+
}
|
|
1096
|
+
}
|
|
1097
|
+
var valid0 = _errs1 === errors;
|
|
1098
|
+
}
|
|
1099
|
+
else {
|
|
1100
|
+
var valid0 = true;
|
|
1101
|
+
}
|
|
1102
|
+
if (valid0) {
|
|
1103
|
+
if (data.subverse_info !== undefined) {
|
|
1104
|
+
const _errs44 = errors;
|
|
1105
|
+
if ("4" !== data.subverse_info) {
|
|
1106
|
+
validate27.errors = [{ instancePath: instancePath + "/subverse_info", schemaPath: "definitions#/definitions/_v/const", keyword: "const", params: { allowedValue: "4" }, message: "must be equal to constant" }];
|
|
1107
|
+
return false;
|
|
1108
|
+
}
|
|
1109
|
+
var valid0 = _errs44 === errors;
|
|
1110
|
+
}
|
|
1111
|
+
else {
|
|
1112
|
+
var valid0 = true;
|
|
1113
|
+
}
|
|
1114
|
+
}
|
|
1115
|
+
}
|
|
1116
|
+
}
|
|
1117
|
+
else {
|
|
1118
|
+
validate27.errors = [{ instancePath, schemaPath: "#/type", keyword: "type", params: { type: "object" }, message: "must be object" }];
|
|
1119
|
+
return false;
|
|
1120
|
+
}
|
|
1121
|
+
} validate27.errors = vErrors; return errors === 0; }
|
|
1122
|
+
validate27.evaluated = { "props": { "expanse": true, "subverse_info": true }, "dynamicProps": false, "dynamicItems": false };
|
|
4
1123
|
|
|
5
1124
|
// console.log('OUT', __name({variableName}) );
|
|
6
1125
|
|
|
@@ -118,7 +1237,115 @@ function requireJsonMsg_cjs () {
|
|
|
118
1237
|
if (hasRequiredJsonMsg_cjs) return jsonMsg_cjs;
|
|
119
1238
|
hasRequiredJsonMsg_cjs = 1;
|
|
120
1239
|
|
|
121
|
-
const schema_Msg = validate18;
|
|
1240
|
+
const schema_Msg = validate18;
|
|
1241
|
+
function validate18(data, { instancePath = "", parentData, parentDataProperty, rootData = data, dynamicAnchors = {} } = {}) { let vErrors = null; let errors = 0; const evaluated0 = validate18.evaluated; if (evaluated0.dynamicProps) {
|
|
1242
|
+
evaluated0.props = undefined;
|
|
1243
|
+
} if (evaluated0.dynamicItems) {
|
|
1244
|
+
evaluated0.items = undefined;
|
|
1245
|
+
} {
|
|
1246
|
+
if (data && typeof data == "object" && !Array.isArray(data)) {
|
|
1247
|
+
let missing0;
|
|
1248
|
+
if ((((data.id === undefined) && (missing0 = "id")) || ((data.referer === undefined) && (missing0 = "referer"))) || ((data.dt === undefined) && (missing0 = "dt"))) {
|
|
1249
|
+
validate18.errors = [{ instancePath, schemaPath: "#/required", keyword: "required", params: { missingProperty: missing0 }, message: "must have required property '" + missing0 + "'" }];
|
|
1250
|
+
return false;
|
|
1251
|
+
}
|
|
1252
|
+
else {
|
|
1253
|
+
if (data.id !== undefined) {
|
|
1254
|
+
const _errs1 = errors;
|
|
1255
|
+
if (typeof data.id !== "string") {
|
|
1256
|
+
validate18.errors = [{ instancePath: instancePath + "/id", schemaPath: "#/properties/id/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
|
|
1257
|
+
return false;
|
|
1258
|
+
}
|
|
1259
|
+
var valid0 = _errs1 === errors;
|
|
1260
|
+
}
|
|
1261
|
+
else {
|
|
1262
|
+
var valid0 = true;
|
|
1263
|
+
}
|
|
1264
|
+
if (valid0) {
|
|
1265
|
+
if (data.dt !== undefined) {
|
|
1266
|
+
const _errs3 = errors;
|
|
1267
|
+
if (typeof data.dt !== "string") {
|
|
1268
|
+
validate18.errors = [{ instancePath: instancePath + "/dt", schemaPath: "#/properties/dt/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
|
|
1269
|
+
return false;
|
|
1270
|
+
}
|
|
1271
|
+
var valid0 = _errs3 === errors;
|
|
1272
|
+
}
|
|
1273
|
+
else {
|
|
1274
|
+
var valid0 = true;
|
|
1275
|
+
}
|
|
1276
|
+
}
|
|
1277
|
+
}
|
|
1278
|
+
}
|
|
1279
|
+
else {
|
|
1280
|
+
validate18.errors = [{ instancePath, schemaPath: "#/type", keyword: "type", params: { type: "object" }, message: "must be object" }];
|
|
1281
|
+
return false;
|
|
1282
|
+
}
|
|
1283
|
+
} validate18.errors = vErrors; return errors === 0; }
|
|
1284
|
+
validate18.evaluated = { "props": { "id": true, "dt": true }, "dynamicProps": false, "dynamicItems": false };
|
|
1285
|
+
const schema_MsgEffect = validate19;
|
|
1286
|
+
function validate19(data, { instancePath = "", parentData, parentDataProperty, rootData = data, dynamicAnchors = {} } = {}) { let vErrors = null; let errors = 0; const evaluated0 = validate19.evaluated; if (evaluated0.dynamicProps) {
|
|
1287
|
+
evaluated0.props = undefined;
|
|
1288
|
+
} if (evaluated0.dynamicItems) {
|
|
1289
|
+
evaluated0.items = undefined;
|
|
1290
|
+
} {
|
|
1291
|
+
if (data && typeof data == "object" && !Array.isArray(data)) {
|
|
1292
|
+
let missing0;
|
|
1293
|
+
if ((data._cause === undefined) && (missing0 = "_cause")) {
|
|
1294
|
+
validate19.errors = [{ instancePath, schemaPath: "#/required", keyword: "required", params: { missingProperty: missing0 }, message: "must have required property '" + missing0 + "'" }];
|
|
1295
|
+
return false;
|
|
1296
|
+
}
|
|
1297
|
+
}
|
|
1298
|
+
else {
|
|
1299
|
+
validate19.errors = [{ instancePath, schemaPath: "#/type", keyword: "type", params: { type: "object" }, message: "must be object" }];
|
|
1300
|
+
return false;
|
|
1301
|
+
}
|
|
1302
|
+
} validate19.errors = vErrors; return errors === 0; }
|
|
1303
|
+
validate19.evaluated = { "dynamicProps": false, "dynamicItems": false };
|
|
1304
|
+
const schema_MsgAckEffect = validate20;
|
|
1305
|
+
function validate20(data, { instancePath = "", parentData, parentDataProperty, rootData = data, dynamicAnchors = {} } = {}) { let vErrors = null; let errors = 0; const evaluated0 = validate20.evaluated; if (evaluated0.dynamicProps) {
|
|
1306
|
+
evaluated0.props = undefined;
|
|
1307
|
+
} if (evaluated0.dynamicItems) {
|
|
1308
|
+
evaluated0.items = undefined;
|
|
1309
|
+
} {
|
|
1310
|
+
if (data && typeof data == "object" && !Array.isArray(data)) {
|
|
1311
|
+
let missing0;
|
|
1312
|
+
if ((data.ack === undefined) && (missing0 = "ack")) {
|
|
1313
|
+
validate20.errors = [{ instancePath, schemaPath: "#/required", keyword: "required", params: { missingProperty: missing0 }, message: "must have required property '" + missing0 + "'" }];
|
|
1314
|
+
return false;
|
|
1315
|
+
}
|
|
1316
|
+
else {
|
|
1317
|
+
if (data.ack !== undefined) {
|
|
1318
|
+
let data0 = data.ack;
|
|
1319
|
+
{
|
|
1320
|
+
if (data0 && typeof data0 == "object" && !Array.isArray(data0)) {
|
|
1321
|
+
let missing1;
|
|
1322
|
+
if ((data0.ok === undefined) && (missing1 = "ok")) {
|
|
1323
|
+
validate20.errors = [{ instancePath: instancePath + "/ack", schemaPath: "#/properties/ack/required", keyword: "required", params: { missingProperty: missing1 }, message: "must have required property '" + missing1 + "'" }];
|
|
1324
|
+
return false;
|
|
1325
|
+
}
|
|
1326
|
+
else {
|
|
1327
|
+
if (data0.ok !== undefined) {
|
|
1328
|
+
if (typeof data0.ok !== "boolean") {
|
|
1329
|
+
validate20.errors = [{ instancePath: instancePath + "/ack/ok", schemaPath: "#/properties/ack/properties/ok/type", keyword: "type", params: { type: "boolean" }, message: "must be boolean" }];
|
|
1330
|
+
return false;
|
|
1331
|
+
}
|
|
1332
|
+
}
|
|
1333
|
+
}
|
|
1334
|
+
}
|
|
1335
|
+
else {
|
|
1336
|
+
validate20.errors = [{ instancePath: instancePath + "/ack", schemaPath: "#/properties/ack/type", keyword: "type", params: { type: "object" }, message: "must be object" }];
|
|
1337
|
+
return false;
|
|
1338
|
+
}
|
|
1339
|
+
}
|
|
1340
|
+
}
|
|
1341
|
+
}
|
|
1342
|
+
}
|
|
1343
|
+
else {
|
|
1344
|
+
validate20.errors = [{ instancePath, schemaPath: "#/type", keyword: "type", params: { type: "object" }, message: "must be object" }];
|
|
1345
|
+
return false;
|
|
1346
|
+
}
|
|
1347
|
+
} validate20.errors = vErrors; return errors === 0; }
|
|
1348
|
+
validate20.evaluated = { "props": { "ack": true }, "dynamicProps": false, "dynamicItems": false };
|
|
122
1349
|
|
|
123
1350
|
const byteToHex = [];
|
|
124
1351
|
for (let i = 0; i < 256; ++i) {
|
|
@@ -162,10 +1389,7 @@ function requireJsonMsg_cjs () {
|
|
|
162
1389
|
const randomUUID = typeof crypto !== 'undefined' && crypto.randomUUID && crypto.randomUUID.bind(crypto);
|
|
163
1390
|
var native = { randomUUID };
|
|
164
1391
|
|
|
165
|
-
function
|
|
166
|
-
if (native.randomUUID && true && !options) {
|
|
167
|
-
return native.randomUUID();
|
|
168
|
-
}
|
|
1392
|
+
function _v4(options, buf, offset) {
|
|
169
1393
|
options = options || {};
|
|
170
1394
|
const rnds = options.random ?? options.rng?.() ?? rng();
|
|
171
1395
|
if (rnds.length < 16) {
|
|
@@ -175,6 +1399,12 @@ function requireJsonMsg_cjs () {
|
|
|
175
1399
|
rnds[8] = (rnds[8] & 0x3f) | 0x80;
|
|
176
1400
|
return unsafeStringify(rnds);
|
|
177
1401
|
}
|
|
1402
|
+
function v4(options, buf, offset) {
|
|
1403
|
+
if (native.randomUUID && true && !options) {
|
|
1404
|
+
return native.randomUUID();
|
|
1405
|
+
}
|
|
1406
|
+
return _v4(options);
|
|
1407
|
+
}
|
|
178
1408
|
|
|
179
1409
|
// console.log('OUT', __name({variableName}) );
|
|
180
1410
|
|
|
@@ -269,170 +1499,171 @@ function requireJsonMsg_cjs () {
|
|
|
269
1499
|
|
|
270
1500
|
})();
|
|
271
1501
|
|
|
272
|
-
let LOGR_= LOGR.get_instance();
|
|
273
|
-
const log_= LOGR_.log;
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
VALIDATION : 0b1 << 0,
|
|
1502
|
+
let LOGR_ = LOGR.get_instance();
|
|
1503
|
+
const log_ = LOGR_.log;
|
|
1504
|
+
const l_ = {
|
|
1505
|
+
VALIDATION: 0b1 << 0,
|
|
277
1506
|
};
|
|
278
|
-
LOGR_.labels= l_;
|
|
279
|
-
|
|
1507
|
+
LOGR_.labels = l_;
|
|
280
1508
|
// TODO: use RFC3339 "timestamp"? https://ajv.js.org/json-type-definition.html
|
|
281
|
-
|
|
282
1509
|
// "module" pattern to avoid "static" and "#" private : https://stackoverflow.com/a/1479341/298545
|
|
283
|
-
var JSON_Msg = (function() {
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
1510
|
+
var JSON_Msg = (function () {
|
|
1511
|
+
return {
|
|
1512
|
+
merge: function (json) {
|
|
1513
|
+
return Object.assign({
|
|
1514
|
+
id: v4(),
|
|
1515
|
+
referer: null,
|
|
1516
|
+
dt: new Date().toISOString()
|
|
1517
|
+
}, json || {});
|
|
1518
|
+
},
|
|
1519
|
+
validate: function (json) {
|
|
1520
|
+
const b_valid = schema_Msg(json);
|
|
1521
|
+
if (!b_valid)
|
|
1522
|
+
log_(l_.VALIDATION, () => ['JSON_Msg: validate: ', schema_Msg.errors]);
|
|
1523
|
+
return b_valid;
|
|
1524
|
+
},
|
|
1525
|
+
// TODO: requires a separate ajv module require, and JTD specific schema
|
|
1526
|
+
// https://ajv.js.org/guide/getting-started.html#parsing-and-serializing-json
|
|
1527
|
+
// static #ajv_parse_= ajv.compileParser(this.#schema_json_Msg);
|
|
1528
|
+
// static parse(json) {
|
|
1529
|
+
// return this.#ajv_parse_(json);
|
|
1530
|
+
// }
|
|
1531
|
+
};
|
|
305
1532
|
})();
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
1533
|
+
var JSON_MsgEffect = (function () {
|
|
1534
|
+
return {
|
|
1535
|
+
create_with_cause_merge: function (msg_cause, json) {
|
|
1536
|
+
const _cause = msg_cause;
|
|
1537
|
+
return Object.assign(JSON_Msg.merge(json), { _cause });
|
|
1538
|
+
},
|
|
1539
|
+
validate: function (json) {
|
|
1540
|
+
if (!JSON_Msg.validate(json))
|
|
1541
|
+
return false;
|
|
1542
|
+
const b_valid = schema_MsgEffect(json);
|
|
1543
|
+
if (!b_valid)
|
|
1544
|
+
log_(l_.VALIDATION, () => ['JSON_MsgEffect: validate: ', schema_MsgEffect.errors]);
|
|
1545
|
+
return b_valid;
|
|
1546
|
+
}
|
|
1547
|
+
};
|
|
321
1548
|
})();
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
}
|
|
1549
|
+
var JSON_MsgAck = (function () {
|
|
1550
|
+
return {
|
|
1551
|
+
create_with_cause_Ok: function (msg_cause, b_ok = true) {
|
|
1552
|
+
return JSON_MsgEffect.create_with_cause_merge(msg_cause, {
|
|
1553
|
+
ack: {
|
|
1554
|
+
"ok": b_ok,
|
|
1555
|
+
},
|
|
1556
|
+
});
|
|
1557
|
+
},
|
|
1558
|
+
create_with_cause_Expired: function (msg_cause) {
|
|
1559
|
+
return JSON_MsgEffect.create_with_cause_merge(msg_cause, {
|
|
1560
|
+
ack: {
|
|
1561
|
+
"ok": false,
|
|
1562
|
+
"expired": true
|
|
1563
|
+
},
|
|
1564
|
+
});
|
|
1565
|
+
},
|
|
1566
|
+
validate: function (json) {
|
|
1567
|
+
if (!JSON_MsgEffect.validate(json))
|
|
1568
|
+
return false;
|
|
1569
|
+
const b_valid = schema_MsgAckEffect(json);
|
|
1570
|
+
if (!b_valid)
|
|
1571
|
+
log_(l_.VALIDATION, () => ['JSON_MsgAckEffect: validate: ', schema_MsgAckEffect.errors]);
|
|
1572
|
+
return b_valid;
|
|
1573
|
+
}
|
|
1574
|
+
};
|
|
349
1575
|
})();
|
|
350
1576
|
|
|
351
1577
|
jsonMsg_cjs.JSON_Msg = JSON_Msg;
|
|
352
|
-
jsonMsg_cjs.
|
|
353
|
-
jsonMsg_cjs.
|
|
1578
|
+
jsonMsg_cjs.JSON_MsgAck = JSON_MsgAck;
|
|
1579
|
+
jsonMsg_cjs.JSON_MsgEffect = JSON_MsgEffect;
|
|
354
1580
|
jsonMsg_cjs.l = l_;
|
|
355
1581
|
return jsonMsg_cjs;
|
|
356
1582
|
}
|
|
357
1583
|
|
|
358
1584
|
var jsonMsg_cjsExports = requireJsonMsg_cjs();
|
|
359
1585
|
|
|
360
|
-
let LOGR_= LOGR.get_instance();
|
|
361
|
-
const log_ = LOGR_.log;
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
};
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
1586
|
+
let LOGR_ = LOGR.get_instance();
|
|
1587
|
+
const log_ = LOGR_.log;
|
|
1588
|
+
Object.assign(jsonMsg_cjsExports.l, l_LL_(jsonMsg_cjsExports.l, 2)); // VALIDATION : 4
|
|
1589
|
+
const l_ = {
|
|
1590
|
+
VALIDATION: 0b1 << 2, //4
|
|
1591
|
+
};
|
|
1592
|
+
LOGR_.labels = l_;
|
|
1593
|
+
LOGR_.toggled = {
|
|
1594
|
+
// VALIDATION : true
|
|
1595
|
+
};
|
|
1596
|
+
const kstr_VERSION = "4";
|
|
1597
|
+
// TODO: use RFC3339 "timestamp"? https://ajv.js.org/json-type-definition.html
|
|
1598
|
+
// const regex_IOI= new RegExp('\\bquery\\s*\\{\\s*IOI\\s*\\(\\s*pkg\\s*:\\s*"([^"]*)"\\s*\\)\\s*\\{.*heartbeat\\s*\\}\\s*\\}');
|
|
1599
|
+
var JSON_MsgSubverseInfo_query = (function () {
|
|
1600
|
+
return {
|
|
1601
|
+
merge: function (json) {
|
|
1602
|
+
let json_msg = jsonMsg_cjsExports.JSON_Msg.merge(json);
|
|
1603
|
+
json_msg["subverse_info"] = kstr_VERSION;
|
|
1604
|
+
return json_msg;
|
|
1605
|
+
},
|
|
1606
|
+
validate: function (json, _pkg = {}) {
|
|
1607
|
+
// if (! JSON_Msg.validate(json))
|
|
1608
|
+
// return false;
|
|
1609
|
+
if (!schema_SubverseInfo_query(json)) {
|
|
1610
|
+
log_(l_.VALIDATION, () => ['schema_SubverseInfo_query_: validate: ', schema_SubverseInfo_query.errors]);
|
|
1611
|
+
return false;
|
|
1612
|
+
}
|
|
1613
|
+
// const str_graphql = json["discovery"]["graphql"];
|
|
1614
|
+
// const regex_match= str_graphql.match(regex_IOI);
|
|
1615
|
+
// if (regex_match === null || regex_match.length !== 2)
|
|
1616
|
+
// return false;
|
|
1617
|
+
// if (pkg !== regex_match[1])
|
|
1618
|
+
// return false;
|
|
1619
|
+
return true;
|
|
1620
|
+
}
|
|
1621
|
+
};
|
|
1622
|
+
})();
|
|
1623
|
+
var JSON_MsgSubverseInfo_subverse = (function () {
|
|
1624
|
+
return {
|
|
1625
|
+
create_with_cause_merge: function (msg_cause, json) {
|
|
1626
|
+
let json_msgeffect = jsonMsg_cjsExports.JSON_MsgEffect.create_with_cause_merge(msg_cause, json);
|
|
1627
|
+
json_msgeffect["subverse_info"] = kstr_VERSION;
|
|
1628
|
+
return json_msgeffect;
|
|
1629
|
+
},
|
|
1630
|
+
validate: function (json_msg) {
|
|
1631
|
+
// if (! JSON_Msg_msg.validate(json))
|
|
1632
|
+
// return false;
|
|
1633
|
+
if (json_msg._cause)
|
|
1634
|
+
if (!JSON_MsgSubverseInfo_query.validate(json_msg._cause))
|
|
1635
|
+
return false;
|
|
1636
|
+
if (!schema_SubverseInfo_subverse(json_msg)) {
|
|
1637
|
+
log_(l_.VALIDATION, () => ['JSON_SubverseInfo_expanse: validate: ', schema_SubverseInfo_subverse.errors]);
|
|
1638
|
+
return false;
|
|
1639
|
+
}
|
|
1640
|
+
return true;
|
|
1641
|
+
}
|
|
1642
|
+
};
|
|
1643
|
+
})();
|
|
1644
|
+
var JSON_MsgSubverseInfo_instances = (function () {
|
|
1645
|
+
return {
|
|
1646
|
+
create_with_cause_merge: function (msg_cause, json) {
|
|
1647
|
+
let json_msgeffect = jsonMsg_cjsExports.JSON_MsgEffect.create_with_cause_merge(msg_cause, json);
|
|
1648
|
+
json_msgeffect["subverse_info"] = kstr_VERSION;
|
|
1649
|
+
return json_msgeffect;
|
|
1650
|
+
},
|
|
1651
|
+
validate: function (json_msg) {
|
|
1652
|
+
// if (! JSON_Msg_msg.validate(json))
|
|
1653
|
+
// return false;
|
|
1654
|
+
if (json_msg._cause)
|
|
1655
|
+
if (!JSON_MsgSubverseInfo_query.validate(json_msg._cause))
|
|
1656
|
+
return false;
|
|
1657
|
+
if (!schema_SubverseInfo_instances(json_msg)) {
|
|
1658
|
+
log_(l_.VALIDATION, () => ['JSON_SubverseInfo_instances: validate: ', schema_SubverseInfo_instances.errors]);
|
|
1659
|
+
return false;
|
|
1660
|
+
}
|
|
1661
|
+
return true;
|
|
1662
|
+
}
|
|
1663
|
+
};
|
|
434
1664
|
})();
|
|
435
1665
|
|
|
436
|
-
exports.
|
|
1666
|
+
exports.JSON_MsgSubverseInfo_instances = JSON_MsgSubverseInfo_instances;
|
|
437
1667
|
exports.JSON_MsgSubverseInfo_query = JSON_MsgSubverseInfo_query;
|
|
1668
|
+
exports.JSON_MsgSubverseInfo_subverse = JSON_MsgSubverseInfo_subverse;
|
|
438
1669
|
exports.l = l_;
|