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