@companion-module/base 1.99.0-nightly-feat-graphics-overhaul-20251223-212718-d376d60 → 2.0.0-0-nightly-feat-2-0-20260118-171756-ca8ab85
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/CHANGELOG.md +12 -0
- package/README.md +12 -11
- package/assets/manifest.schema.json +1 -1
- package/dist/__mocks__/net.d.ts +31 -0
- package/dist/__mocks__/net.d.ts.map +1 -0
- package/dist/__mocks__/net.js +104 -0
- package/dist/__mocks__/net.js.map +1 -0
- package/dist/__mocks__/util.d.ts +9 -0
- package/dist/__mocks__/util.d.ts.map +1 -0
- package/dist/__mocks__/util.js +39 -0
- package/dist/__mocks__/util.js.map +1 -0
- package/dist/common/json-value.js +1 -2
- package/dist/common/json-value.js.map +1 -1
- package/dist/common/osc.js +1 -2
- package/dist/common/osc.js.map +1 -1
- package/dist/helpers/__tests__/tcp.spec.d.ts +2 -0
- package/dist/helpers/__tests__/tcp.spec.d.ts.map +1 -0
- package/dist/helpers/__tests__/tcp.spec.js +175 -0
- package/dist/helpers/__tests__/tcp.spec.js.map +1 -0
- package/dist/helpers/__tests__/udp.spec.d.ts +2 -0
- package/dist/helpers/__tests__/udp.spec.d.ts.map +1 -0
- package/dist/helpers/__tests__/udp.spec.js +197 -0
- package/dist/helpers/__tests__/udp.spec.js.map +1 -0
- package/dist/helpers/index.js +3 -6
- package/dist/helpers/index.js.map +1 -1
- package/dist/helpers/tcp.d.ts +1 -1
- package/dist/helpers/tcp.d.ts.map +1 -1
- package/dist/helpers/tcp.js +10 -15
- package/dist/helpers/tcp.js.map +1 -1
- package/dist/helpers/telnet.d.ts +1 -1
- package/dist/helpers/telnet.d.ts.map +1 -1
- package/dist/helpers/telnet.js +6 -11
- package/dist/helpers/telnet.js.map +1 -1
- package/dist/helpers/udp.d.ts +1 -1
- package/dist/helpers/udp.d.ts.map +1 -1
- package/dist/helpers/udp.js +7 -12
- package/dist/helpers/udp.js.map +1 -1
- package/dist/host-api/context.d.ts +59 -0
- package/dist/host-api/context.d.ts.map +1 -0
- package/dist/host-api/{api.js → context.js} +5 -3
- package/dist/host-api/context.js.map +1 -0
- package/dist/host-api/main.d.ts +2 -0
- package/dist/host-api/main.d.ts.map +1 -0
- package/dist/host-api/main.js +2 -0
- package/dist/host-api/main.js.map +1 -0
- package/dist/instance-base.js +1 -2
- package/dist/logging.d.ts +21 -0
- package/dist/logging.d.ts.map +1 -0
- package/dist/logging.js +22 -0
- package/dist/logging.js.map +1 -0
- package/dist/main.d.ts +7 -0
- package/dist/main.d.ts.map +1 -0
- package/dist/main.js +8 -0
- package/dist/main.js.map +1 -0
- package/dist/manifest.js +4 -8
- package/dist/manifest.js.map +1 -1
- package/dist/module-api/__tests__/shared-udp-socket.spec.d.ts +2 -0
- package/dist/module-api/__tests__/shared-udp-socket.spec.d.ts.map +1 -0
- package/dist/module-api/__tests__/shared-udp-socket.spec.js +270 -0
- package/dist/module-api/__tests__/shared-udp-socket.spec.js.map +1 -0
- package/dist/module-api/action.js +1 -2
- package/dist/module-api/base.d.ts +4 -33
- package/dist/module-api/base.d.ts.map +1 -1
- package/dist/module-api/base.js +49 -357
- package/dist/module-api/base.js.map +1 -1
- package/dist/module-api/common.d.ts +2 -8
- package/dist/module-api/common.d.ts.map +1 -1
- package/dist/module-api/common.js +1 -2
- package/dist/module-api/config.js +1 -2
- package/dist/module-api/enums.d.ts +0 -1
- package/dist/module-api/enums.d.ts.map +1 -1
- package/dist/module-api/enums.js +4 -7
- package/dist/module-api/enums.js.map +1 -1
- package/dist/module-api/feedback.d.ts +2 -1
- package/dist/module-api/feedback.d.ts.map +1 -1
- package/dist/module-api/feedback.js +1 -2
- package/dist/module-api/http.js +1 -2
- package/dist/module-api/index.d.ts +0 -2
- package/dist/module-api/index.d.ts.map +1 -1
- package/dist/module-api/index.js +12 -17
- package/dist/module-api/index.js.map +1 -1
- package/dist/module-api/input.d.ts +0 -20
- package/dist/module-api/input.d.ts.map +1 -1
- package/dist/module-api/input.js +1 -2
- package/dist/module-api/preset.d.ts +1 -48
- package/dist/module-api/preset.d.ts.map +1 -1
- package/dist/module-api/preset.js +1 -2
- package/dist/module-api/shared-udp-socket.d.ts +3 -4
- package/dist/module-api/shared-udp-socket.d.ts.map +1 -1
- package/dist/module-api/shared-udp-socket.js +18 -25
- package/dist/module-api/shared-udp-socket.js.map +1 -1
- package/dist/module-api/style.js +1 -2
- package/dist/module-api/upgrade.d.ts +7 -3
- package/dist/module-api/upgrade.d.ts.map +1 -1
- package/dist/module-api/upgrade.js +11 -16
- package/dist/module-api/upgrade.js.map +1 -1
- package/dist/module-api/variable.js +1 -2
- package/dist/util.d.ts +10 -0
- package/dist/util.d.ts.map +1 -1
- package/dist/util.js +15 -26
- package/dist/util.js.map +1 -1
- package/generated/validate_manifest.js +961 -1
- package/package.json +25 -36
- package/dist/entrypoint.d.ts +0 -11
- package/dist/entrypoint.d.ts.map +0 -1
- package/dist/entrypoint.js +0 -134
- package/dist/entrypoint.js.map +0 -1
- package/dist/host-api/api.d.ts +0 -402
- package/dist/host-api/api.d.ts.map +0 -1
- package/dist/host-api/api.js.map +0 -1
- package/dist/host-api/ipc-wrapper.d.ts +0 -37
- package/dist/host-api/ipc-wrapper.d.ts.map +0 -1
- package/dist/host-api/ipc-wrapper.js +0 -128
- package/dist/host-api/ipc-wrapper.js.map +0 -1
- package/dist/host-api/versions.d.ts +0 -12
- package/dist/host-api/versions.d.ts.map +0 -1
- package/dist/host-api/versions.js +0 -5
- package/dist/host-api/versions.js.map +0 -1
- package/dist/index.d.ts +0 -8
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js +0 -22
- package/dist/index.js.map +0 -1
- package/dist/internal/actions.d.ts +0 -16
- package/dist/internal/actions.d.ts.map +0 -1
- package/dist/internal/actions.js +0 -223
- package/dist/internal/actions.js.map +0 -1
- package/dist/internal/base.d.ts +0 -11
- package/dist/internal/base.d.ts.map +0 -1
- package/dist/internal/base.js +0 -39
- package/dist/internal/base.js.map +0 -1
- package/dist/internal/feedback.d.ts +0 -20
- package/dist/internal/feedback.d.ts.map +0 -1
- package/dist/internal/feedback.js +0 -307
- package/dist/internal/feedback.js.map +0 -1
- package/dist/internal/upgrade.d.ts +0 -15
- package/dist/internal/upgrade.d.ts.map +0 -1
- package/dist/internal/upgrade.js +0 -174
- package/dist/internal/upgrade.js.map +0 -1
- package/dist/module-api/graphics-composite.d.ts +0 -11
- package/dist/module-api/graphics-composite.d.ts.map +0 -1
- package/dist/module-api/graphics-composite.js +0 -3
- package/dist/module-api/graphics-composite.js.map +0 -1
- package/dist/module-api/graphics.d.ts +0 -95
- package/dist/module-api/graphics.d.ts.map +0 -1
- package/dist/module-api/graphics.js +0 -12
- package/dist/module-api/graphics.js.map +0 -1
- package/lib/debounce-fn/index.d.ts +0 -83
- package/lib/debounce-fn/index.js +0 -78
- package/lib/debounce-fn/license +0 -9
- package/lib/debounce-fn/readme.md +0 -64
|
@@ -1 +1,961 @@
|
|
|
1
|
-
"use strict";module.exports = validate10;module.exports.default = validate10;const schema11 = {"$schema":"http://json-schema.org/draft-07/schema#","type":"object","title":"ModuleManifest","properties":{"$schema":{"type":"string"},"id":{"type":"string","description":"Unique identifier for the module"},"name":{"type":"string","description":"Name of the module"},"shortname":{"type":"string"},"description":{"type":"string","description":"Description of the module "},"version":{"type":"string","description":"Current version of the module"},"isPrerelease":{"type":"boolean","description":"Is this a pre-release version"},"license":{"type":"string","description":"SPDX identifier for license of the module"},"repository":{"type":"string","description":"URL to the source repository"},"bugs":{"type":"string","description":"URL to bug tracker"},"maintainers":{"type":"array","description":"List of active maintiners","uniqueItems":true,"items":{"type":"object","title":"ModuleManifestMaintainer","properties":{"name":{"type":"string"},"email":{"type":"string"},"github":{"type":"string"},"url":{"type":"string"}},"required":["name"],"additionalProperties":false}},"legacyIds":{"type":"array","description":"If the module had a different unique identifier previously, then specify it here","uniqueItems":true,"items":{"type":"string"}},"runtime":{"type":"object","title":"ModuleManifestRuntime","description":"Information on how to execute the module","properties":{"type":{"type":"string","description":"Type of the module. Must be: node18 or node22","enum":["node18","node22"]},"api":{"type":"string","description":"Which host-api does it use. In the future alternate options will be allowed","enum":["nodejs-ipc"]},"apiVersion":{"type":"string","description":"The version of the host-api used"},"entrypoint":{"type":"string","description":"Entrypoint to pass to the runtime. eg index.js"},"permissions":{"type":"object","description":"Permissions required by the module. This is used to inform the user of the permissions required by the module.\nNote: this requires the node22 or newer runtime","properties":{"worker-threads":{"type":"boolean","description":"Enable if the module uses worker threads"},"child-process":{"type":"boolean","description":"Enable if the module uses child processes"},"native-addons":{"type":"boolean","description":"Enable if the module uses native addons"},"filesystem":{"type":"boolean","description":"Enable if the module requires read/write access to the filesystem"}},"additionalProperties":false}},"required":["type","api","apiVersion","entrypoint"]},"manufacturer":{"type":"string"},"products":{"type":"array","uniqueItems":true,"items":{"type":"string"},"minItems":1},"keywords":{"type":"array","uniqueItems":true,"items":{"type":"string"}},"bonjourQueries":{"type":"object","description":"If the device or software for your module supports bonjour announcements, Companion will offer an easy way to watch for these announcements.\nEach query you define must have a matching config field of type 'bonjour-device' with the same name","patternProperties":{"":{"oneOf":[{"$ref":"#/definitions/bonjourQuery"},{"type":"array","items":{"$ref":"#/definitions/bonjourQuery"}}]}}}},"required":["id","name","shortname","description","version","license","repository","bugs","maintainers","legacyIds","runtime","manufacturer","products","keywords"],"definitions":{"bonjourQuery":{"type":"object","title":"ModuleBonjourQuery","description":"","properties":{"type":{"type":"string"},"protocol":{"type":"string","enum":["tcp","udp"]},"port":{"type":"number"},"txt":{"type":"object","description":"Match on any txt values returned in the query. This is useful to filter out devices of the same 'type' that are not supported","patternProperties":{"":{"type":"string"}}}},"required":["type","protocol"]}}};const schema12 = {"type":"object","title":"ModuleBonjourQuery","description":"","properties":{"type":{"type":"string"},"protocol":{"type":"string","enum":["tcp","udp"]},"port":{"type":"number"},"txt":{"type":"object","description":"Match on any txt values returned in the query. This is useful to filter out devices of the same 'type' that are not supported","patternProperties":{"":{"type":"string"}}}},"required":["type","protocol"]};const func0 = require("ajv/dist/runtime/equal").default;const pattern0 = new RegExp("", "u");function validate10(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){let vErrors = null;let errors = 0;if(errors === 0){if(data && typeof data == "object" && !Array.isArray(data)){let missing0;if(((((((((((((((data.id === undefined) && (missing0 = "id")) || ((data.name === undefined) && (missing0 = "name"))) || ((data.shortname === undefined) && (missing0 = "shortname"))) || ((data.description === undefined) && (missing0 = "description"))) || ((data.version === undefined) && (missing0 = "version"))) || ((data.license === undefined) && (missing0 = "license"))) || ((data.repository === undefined) && (missing0 = "repository"))) || ((data.bugs === undefined) && (missing0 = "bugs"))) || ((data.maintainers === undefined) && (missing0 = "maintainers"))) || ((data.legacyIds === undefined) && (missing0 = "legacyIds"))) || ((data.runtime === undefined) && (missing0 = "runtime"))) || ((data.manufacturer === undefined) && (missing0 = "manufacturer"))) || ((data.products === undefined) && (missing0 = "products"))) || ((data.keywords === undefined) && (missing0 = "keywords"))){validate10.errors = [{instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: missing0},message:"must have required property '"+missing0+"'"}];return false;}else {if(data.$schema !== undefined){const _errs1 = errors;if(typeof data.$schema !== "string"){validate10.errors = [{instancePath:instancePath+"/$schema",schemaPath:"#/properties/%24schema/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}var valid0 = _errs1 === errors;}else {var valid0 = true;}if(valid0){if(data.id !== undefined){const _errs3 = errors;if(typeof data.id !== "string"){validate10.errors = [{instancePath:instancePath+"/id",schemaPath:"#/properties/id/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}var valid0 = _errs3 === errors;}else {var valid0 = true;}if(valid0){if(data.name !== undefined){const _errs5 = errors;if(typeof data.name !== "string"){validate10.errors = [{instancePath:instancePath+"/name",schemaPath:"#/properties/name/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}var valid0 = _errs5 === errors;}else {var valid0 = true;}if(valid0){if(data.shortname !== undefined){const _errs7 = errors;if(typeof data.shortname !== "string"){validate10.errors = [{instancePath:instancePath+"/shortname",schemaPath:"#/properties/shortname/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}var valid0 = _errs7 === errors;}else {var valid0 = true;}if(valid0){if(data.description !== undefined){const _errs9 = errors;if(typeof data.description !== "string"){validate10.errors = [{instancePath:instancePath+"/description",schemaPath:"#/properties/description/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}var valid0 = _errs9 === errors;}else {var valid0 = true;}if(valid0){if(data.version !== undefined){const _errs11 = errors;if(typeof data.version !== "string"){validate10.errors = [{instancePath:instancePath+"/version",schemaPath:"#/properties/version/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}var valid0 = _errs11 === errors;}else {var valid0 = true;}if(valid0){if(data.isPrerelease !== undefined){const _errs13 = errors;if(typeof data.isPrerelease !== "boolean"){validate10.errors = [{instancePath:instancePath+"/isPrerelease",schemaPath:"#/properties/isPrerelease/type",keyword:"type",params:{type: "boolean"},message:"must be boolean"}];return false;}var valid0 = _errs13 === errors;}else {var valid0 = true;}if(valid0){if(data.license !== undefined){const _errs15 = errors;if(typeof data.license !== "string"){validate10.errors = [{instancePath:instancePath+"/license",schemaPath:"#/properties/license/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}var valid0 = _errs15 === errors;}else {var valid0 = true;}if(valid0){if(data.repository !== undefined){const _errs17 = errors;if(typeof data.repository !== "string"){validate10.errors = [{instancePath:instancePath+"/repository",schemaPath:"#/properties/repository/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}var valid0 = _errs17 === errors;}else {var valid0 = true;}if(valid0){if(data.bugs !== undefined){const _errs19 = errors;if(typeof data.bugs !== "string"){validate10.errors = [{instancePath:instancePath+"/bugs",schemaPath:"#/properties/bugs/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}var valid0 = _errs19 === errors;}else {var valid0 = true;}if(valid0){if(data.maintainers !== undefined){let data10 = data.maintainers;const _errs21 = errors;if(errors === _errs21){if(Array.isArray(data10)){var valid1 = true;const len0 = data10.length;for(let i0=0; i0<len0; i0++){let data11 = data10[i0];const _errs23 = errors;if(errors === _errs23){if(data11 && typeof data11 == "object" && !Array.isArray(data11)){let missing1;if((data11.name === undefined) && (missing1 = "name")){validate10.errors = [{instancePath:instancePath+"/maintainers/" + i0,schemaPath:"#/properties/maintainers/items/required",keyword:"required",params:{missingProperty: missing1},message:"must have required property '"+missing1+"'"}];return false;}else {const _errs25 = errors;for(const key0 in data11){if(!((((key0 === "name") || (key0 === "email")) || (key0 === "github")) || (key0 === "url"))){validate10.errors = [{instancePath:instancePath+"/maintainers/" + i0,schemaPath:"#/properties/maintainers/items/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key0},message:"must NOT have additional properties"}];return false;break;}}if(_errs25 === errors){if(data11.name !== undefined){const _errs26 = errors;if(typeof data11.name !== "string"){validate10.errors = [{instancePath:instancePath+"/maintainers/" + i0+"/name",schemaPath:"#/properties/maintainers/items/properties/name/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}var valid2 = _errs26 === errors;}else {var valid2 = true;}if(valid2){if(data11.email !== undefined){const _errs28 = errors;if(typeof data11.email !== "string"){validate10.errors = [{instancePath:instancePath+"/maintainers/" + i0+"/email",schemaPath:"#/properties/maintainers/items/properties/email/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}var valid2 = _errs28 === errors;}else {var valid2 = true;}if(valid2){if(data11.github !== undefined){const _errs30 = errors;if(typeof data11.github !== "string"){validate10.errors = [{instancePath:instancePath+"/maintainers/" + i0+"/github",schemaPath:"#/properties/maintainers/items/properties/github/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}var valid2 = _errs30 === errors;}else {var valid2 = true;}if(valid2){if(data11.url !== undefined){const _errs32 = errors;if(typeof data11.url !== "string"){validate10.errors = [{instancePath:instancePath+"/maintainers/" + i0+"/url",schemaPath:"#/properties/maintainers/items/properties/url/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}var valid2 = _errs32 === errors;}else {var valid2 = true;}}}}}}}else {validate10.errors = [{instancePath:instancePath+"/maintainers/" + i0,schemaPath:"#/properties/maintainers/items/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}}var valid1 = _errs23 === errors;if(!valid1){break;}}if(valid1){let i1 = data10.length;let j0;if(i1 > 1){outer0:for(;i1--;){for(j0 = i1; j0--;){if(func0(data10[i1], data10[j0])){validate10.errors = [{instancePath:instancePath+"/maintainers",schemaPath:"#/properties/maintainers/uniqueItems",keyword:"uniqueItems",params:{i: i1, j: j0},message:"must NOT have duplicate items (items ## "+j0+" and "+i1+" are identical)"}];return false;break outer0;}}}}}}else {validate10.errors = [{instancePath:instancePath+"/maintainers",schemaPath:"#/properties/maintainers/type",keyword:"type",params:{type: "array"},message:"must be array"}];return false;}}var valid0 = _errs21 === errors;}else {var valid0 = true;}if(valid0){if(data.legacyIds !== undefined){let data16 = data.legacyIds;const _errs34 = errors;if(errors === _errs34){if(Array.isArray(data16)){var valid4 = true;const len1 = data16.length;for(let i2=0; i2<len1; i2++){const _errs36 = errors;if(typeof data16[i2] !== "string"){validate10.errors = [{instancePath:instancePath+"/legacyIds/" + i2,schemaPath:"#/properties/legacyIds/items/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}var valid4 = _errs36 === errors;if(!valid4){break;}}if(valid4){let i3 = data16.length;let j1;if(i3 > 1){const indices0 = {};for(;i3--;){let item0 = data16[i3];if(typeof item0 !== "string"){continue;}if(typeof indices0[item0] == "number"){j1 = indices0[item0];validate10.errors = [{instancePath:instancePath+"/legacyIds",schemaPath:"#/properties/legacyIds/uniqueItems",keyword:"uniqueItems",params:{i: i3, j: j1},message:"must NOT have duplicate items (items ## "+j1+" and "+i3+" are identical)"}];return false;break;}indices0[item0] = i3;}}}}else {validate10.errors = [{instancePath:instancePath+"/legacyIds",schemaPath:"#/properties/legacyIds/type",keyword:"type",params:{type: "array"},message:"must be array"}];return false;}}var valid0 = _errs34 === errors;}else {var valid0 = true;}if(valid0){if(data.runtime !== undefined){let data18 = data.runtime;const _errs38 = errors;if(errors === _errs38){if(data18 && typeof data18 == "object" && !Array.isArray(data18)){let missing2;if(((((data18.type === undefined) && (missing2 = "type")) || ((data18.api === undefined) && (missing2 = "api"))) || ((data18.apiVersion === undefined) && (missing2 = "apiVersion"))) || ((data18.entrypoint === undefined) && (missing2 = "entrypoint"))){validate10.errors = [{instancePath:instancePath+"/runtime",schemaPath:"#/properties/runtime/required",keyword:"required",params:{missingProperty: missing2},message:"must have required property '"+missing2+"'"}];return false;}else {if(data18.type !== undefined){let data19 = data18.type;const _errs40 = errors;if(typeof data19 !== "string"){validate10.errors = [{instancePath:instancePath+"/runtime/type",schemaPath:"#/properties/runtime/properties/type/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}if(!((data19 === "node18") || (data19 === "node22"))){validate10.errors = [{instancePath:instancePath+"/runtime/type",schemaPath:"#/properties/runtime/properties/type/enum",keyword:"enum",params:{allowedValues: schema11.properties.runtime.properties.type.enum},message:"must be equal to one of the allowed values"}];return false;}var valid6 = _errs40 === errors;}else {var valid6 = true;}if(valid6){if(data18.api !== undefined){let data20 = data18.api;const _errs42 = errors;if(typeof data20 !== "string"){validate10.errors = [{instancePath:instancePath+"/runtime/api",schemaPath:"#/properties/runtime/properties/api/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}if(!(data20 === "nodejs-ipc")){validate10.errors = [{instancePath:instancePath+"/runtime/api",schemaPath:"#/properties/runtime/properties/api/enum",keyword:"enum",params:{allowedValues: schema11.properties.runtime.properties.api.enum},message:"must be equal to one of the allowed values"}];return false;}var valid6 = _errs42 === errors;}else {var valid6 = true;}if(valid6){if(data18.apiVersion !== undefined){const _errs44 = errors;if(typeof data18.apiVersion !== "string"){validate10.errors = [{instancePath:instancePath+"/runtime/apiVersion",schemaPath:"#/properties/runtime/properties/apiVersion/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}var valid6 = _errs44 === errors;}else {var valid6 = true;}if(valid6){if(data18.entrypoint !== undefined){const _errs46 = errors;if(typeof data18.entrypoint !== "string"){validate10.errors = [{instancePath:instancePath+"/runtime/entrypoint",schemaPath:"#/properties/runtime/properties/entrypoint/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}var valid6 = _errs46 === errors;}else {var valid6 = true;}if(valid6){if(data18.permissions !== undefined){let data23 = data18.permissions;const _errs48 = errors;if(errors === _errs48){if(data23 && typeof data23 == "object" && !Array.isArray(data23)){const _errs50 = errors;for(const key1 in data23){if(!((((key1 === "worker-threads") || (key1 === "child-process")) || (key1 === "native-addons")) || (key1 === "filesystem"))){validate10.errors = [{instancePath:instancePath+"/runtime/permissions",schemaPath:"#/properties/runtime/properties/permissions/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key1},message:"must NOT have additional properties"}];return false;break;}}if(_errs50 === errors){if(data23["worker-threads"] !== undefined){const _errs51 = errors;if(typeof data23["worker-threads"] !== "boolean"){validate10.errors = [{instancePath:instancePath+"/runtime/permissions/worker-threads",schemaPath:"#/properties/runtime/properties/permissions/properties/worker-threads/type",keyword:"type",params:{type: "boolean"},message:"must be boolean"}];return false;}var valid7 = _errs51 === errors;}else {var valid7 = true;}if(valid7){if(data23["child-process"] !== undefined){const _errs53 = errors;if(typeof data23["child-process"] !== "boolean"){validate10.errors = [{instancePath:instancePath+"/runtime/permissions/child-process",schemaPath:"#/properties/runtime/properties/permissions/properties/child-process/type",keyword:"type",params:{type: "boolean"},message:"must be boolean"}];return false;}var valid7 = _errs53 === errors;}else {var valid7 = true;}if(valid7){if(data23["native-addons"] !== undefined){const _errs55 = errors;if(typeof data23["native-addons"] !== "boolean"){validate10.errors = [{instancePath:instancePath+"/runtime/permissions/native-addons",schemaPath:"#/properties/runtime/properties/permissions/properties/native-addons/type",keyword:"type",params:{type: "boolean"},message:"must be boolean"}];return false;}var valid7 = _errs55 === errors;}else {var valid7 = true;}if(valid7){if(data23.filesystem !== undefined){const _errs57 = errors;if(typeof data23.filesystem !== "boolean"){validate10.errors = [{instancePath:instancePath+"/runtime/permissions/filesystem",schemaPath:"#/properties/runtime/properties/permissions/properties/filesystem/type",keyword:"type",params:{type: "boolean"},message:"must be boolean"}];return false;}var valid7 = _errs57 === errors;}else {var valid7 = true;}}}}}}else {validate10.errors = [{instancePath:instancePath+"/runtime/permissions",schemaPath:"#/properties/runtime/properties/permissions/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}}var valid6 = _errs48 === errors;}else {var valid6 = true;}}}}}}}else {validate10.errors = [{instancePath:instancePath+"/runtime",schemaPath:"#/properties/runtime/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}}var valid0 = _errs38 === errors;}else {var valid0 = true;}if(valid0){if(data.manufacturer !== undefined){const _errs59 = errors;if(typeof data.manufacturer !== "string"){validate10.errors = [{instancePath:instancePath+"/manufacturer",schemaPath:"#/properties/manufacturer/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}var valid0 = _errs59 === errors;}else {var valid0 = true;}if(valid0){if(data.products !== undefined){let data29 = data.products;const _errs61 = errors;if(errors === _errs61){if(Array.isArray(data29)){if(data29.length < 1){validate10.errors = [{instancePath:instancePath+"/products",schemaPath:"#/properties/products/minItems",keyword:"minItems",params:{limit: 1},message:"must NOT have fewer than 1 items"}];return false;}else {var valid8 = true;const len2 = data29.length;for(let i4=0; i4<len2; i4++){const _errs63 = errors;if(typeof data29[i4] !== "string"){validate10.errors = [{instancePath:instancePath+"/products/" + i4,schemaPath:"#/properties/products/items/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}var valid8 = _errs63 === errors;if(!valid8){break;}}if(valid8){let i5 = data29.length;let j2;if(i5 > 1){const indices1 = {};for(;i5--;){let item1 = data29[i5];if(typeof item1 !== "string"){continue;}if(typeof indices1[item1] == "number"){j2 = indices1[item1];validate10.errors = [{instancePath:instancePath+"/products",schemaPath:"#/properties/products/uniqueItems",keyword:"uniqueItems",params:{i: i5, j: j2},message:"must NOT have duplicate items (items ## "+j2+" and "+i5+" are identical)"}];return false;break;}indices1[item1] = i5;}}}}}else {validate10.errors = [{instancePath:instancePath+"/products",schemaPath:"#/properties/products/type",keyword:"type",params:{type: "array"},message:"must be array"}];return false;}}var valid0 = _errs61 === errors;}else {var valid0 = true;}if(valid0){if(data.keywords !== undefined){let data31 = data.keywords;const _errs65 = errors;if(errors === _errs65){if(Array.isArray(data31)){var valid10 = true;const len3 = data31.length;for(let i6=0; i6<len3; i6++){const _errs67 = errors;if(typeof data31[i6] !== "string"){validate10.errors = [{instancePath:instancePath+"/keywords/" + i6,schemaPath:"#/properties/keywords/items/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}var valid10 = _errs67 === errors;if(!valid10){break;}}if(valid10){let i7 = data31.length;let j3;if(i7 > 1){const indices2 = {};for(;i7--;){let item2 = data31[i7];if(typeof item2 !== "string"){continue;}if(typeof indices2[item2] == "number"){j3 = indices2[item2];validate10.errors = [{instancePath:instancePath+"/keywords",schemaPath:"#/properties/keywords/uniqueItems",keyword:"uniqueItems",params:{i: i7, j: j3},message:"must NOT have duplicate items (items ## "+j3+" and "+i7+" are identical)"}];return false;break;}indices2[item2] = i7;}}}}else {validate10.errors = [{instancePath:instancePath+"/keywords",schemaPath:"#/properties/keywords/type",keyword:"type",params:{type: "array"},message:"must be array"}];return false;}}var valid0 = _errs65 === errors;}else {var valid0 = true;}if(valid0){if(data.bonjourQueries !== undefined){let data33 = data.bonjourQueries;const _errs69 = errors;if(errors === _errs69){if(data33 && typeof data33 == "object" && !Array.isArray(data33)){var valid12 = true;for(const key2 in data33){if(pattern0.test(key2)){let data34 = data33[key2];const _errs71 = errors;const _errs72 = errors;let valid13 = false;let passing0 = null;const _errs73 = errors;const _errs74 = errors;if(errors === _errs74){if(data34 && typeof data34 == "object" && !Array.isArray(data34)){let missing3;if(((data34.type === undefined) && (missing3 = "type")) || ((data34.protocol === undefined) && (missing3 = "protocol"))){const err0 = {instancePath:instancePath+"/bonjourQueries/" + key2.replace(/~/g, "~0").replace(/\//g, "~1"),schemaPath:"#/definitions/bonjourQuery/required",keyword:"required",params:{missingProperty: missing3},message:"must have required property '"+missing3+"'"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}else {if(data34.type !== undefined){const _errs76 = errors;if(typeof data34.type !== "string"){const err1 = {instancePath:instancePath+"/bonjourQueries/" + key2.replace(/~/g, "~0").replace(/\//g, "~1")+"/type",schemaPath:"#/definitions/bonjourQuery/properties/type/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}var valid15 = _errs76 === errors;}else {var valid15 = true;}if(valid15){if(data34.protocol !== undefined){let data36 = data34.protocol;const _errs78 = errors;if(typeof data36 !== "string"){const err2 = {instancePath:instancePath+"/bonjourQueries/" + key2.replace(/~/g, "~0").replace(/\//g, "~1")+"/protocol",schemaPath:"#/definitions/bonjourQuery/properties/protocol/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}if(!((data36 === "tcp") || (data36 === "udp"))){const err3 = {instancePath:instancePath+"/bonjourQueries/" + key2.replace(/~/g, "~0").replace(/\//g, "~1")+"/protocol",schemaPath:"#/definitions/bonjourQuery/properties/protocol/enum",keyword:"enum",params:{allowedValues: schema12.properties.protocol.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}var valid15 = _errs78 === errors;}else {var valid15 = true;}if(valid15){if(data34.port !== undefined){let data37 = data34.port;const _errs80 = errors;if(!((typeof data37 == "number") && (isFinite(data37)))){const err4 = {instancePath:instancePath+"/bonjourQueries/" + key2.replace(/~/g, "~0").replace(/\//g, "~1")+"/port",schemaPath:"#/definitions/bonjourQuery/properties/port/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}var valid15 = _errs80 === errors;}else {var valid15 = true;}if(valid15){if(data34.txt !== undefined){let data38 = data34.txt;const _errs82 = errors;if(errors === _errs82){if(data38 && typeof data38 == "object" && !Array.isArray(data38)){var valid16 = true;for(const key3 in data38){if(pattern0.test(key3)){const _errs84 = errors;if(typeof data38[key3] !== "string"){const err5 = {instancePath:instancePath+"/bonjourQueries/" + key2.replace(/~/g, "~0").replace(/\//g, "~1")+"/txt/" + key3.replace(/~/g, "~0").replace(/\//g, "~1"),schemaPath:"#/definitions/bonjourQuery/properties/txt/patternProperties//type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}var valid16 = _errs84 === errors;if(!valid16){break;}}}}else {const err6 = {instancePath:instancePath+"/bonjourQueries/" + key2.replace(/~/g, "~0").replace(/\//g, "~1")+"/txt",schemaPath:"#/definitions/bonjourQuery/properties/txt/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err6];}else {vErrors.push(err6);}errors++;}}var valid15 = _errs82 === errors;}else {var valid15 = true;}}}}}}else {const err7 = {instancePath:instancePath+"/bonjourQueries/" + key2.replace(/~/g, "~0").replace(/\//g, "~1"),schemaPath:"#/definitions/bonjourQuery/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err7];}else {vErrors.push(err7);}errors++;}}var _valid0 = _errs73 === errors;if(_valid0){valid13 = true;passing0 = 0;}const _errs86 = errors;if(errors === _errs86){if(Array.isArray(data34)){var valid17 = true;const len4 = data34.length;for(let i8=0; i8<len4; i8++){let data40 = data34[i8];const _errs88 = errors;const _errs89 = errors;if(errors === _errs89){if(data40 && typeof data40 == "object" && !Array.isArray(data40)){let missing4;if(((data40.type === undefined) && (missing4 = "type")) || ((data40.protocol === undefined) && (missing4 = "protocol"))){const err8 = {instancePath:instancePath+"/bonjourQueries/" + key2.replace(/~/g, "~0").replace(/\//g, "~1")+"/" + i8,schemaPath:"#/definitions/bonjourQuery/required",keyword:"required",params:{missingProperty: missing4},message:"must have required property '"+missing4+"'"};if(vErrors === null){vErrors = [err8];}else {vErrors.push(err8);}errors++;}else {if(data40.type !== undefined){const _errs91 = errors;if(typeof data40.type !== "string"){const err9 = {instancePath:instancePath+"/bonjourQueries/" + key2.replace(/~/g, "~0").replace(/\//g, "~1")+"/" + i8+"/type",schemaPath:"#/definitions/bonjourQuery/properties/type/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err9];}else {vErrors.push(err9);}errors++;}var valid19 = _errs91 === errors;}else {var valid19 = true;}if(valid19){if(data40.protocol !== undefined){let data42 = data40.protocol;const _errs93 = errors;if(typeof data42 !== "string"){const err10 = {instancePath:instancePath+"/bonjourQueries/" + key2.replace(/~/g, "~0").replace(/\//g, "~1")+"/" + i8+"/protocol",schemaPath:"#/definitions/bonjourQuery/properties/protocol/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err10];}else {vErrors.push(err10);}errors++;}if(!((data42 === "tcp") || (data42 === "udp"))){const err11 = {instancePath:instancePath+"/bonjourQueries/" + key2.replace(/~/g, "~0").replace(/\//g, "~1")+"/" + i8+"/protocol",schemaPath:"#/definitions/bonjourQuery/properties/protocol/enum",keyword:"enum",params:{allowedValues: schema12.properties.protocol.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err11];}else {vErrors.push(err11);}errors++;}var valid19 = _errs93 === errors;}else {var valid19 = true;}if(valid19){if(data40.port !== undefined){let data43 = data40.port;const _errs95 = errors;if(!((typeof data43 == "number") && (isFinite(data43)))){const err12 = {instancePath:instancePath+"/bonjourQueries/" + key2.replace(/~/g, "~0").replace(/\//g, "~1")+"/" + i8+"/port",schemaPath:"#/definitions/bonjourQuery/properties/port/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err12];}else {vErrors.push(err12);}errors++;}var valid19 = _errs95 === errors;}else {var valid19 = true;}if(valid19){if(data40.txt !== undefined){let data44 = data40.txt;const _errs97 = errors;if(errors === _errs97){if(data44 && typeof data44 == "object" && !Array.isArray(data44)){var valid20 = true;for(const key4 in data44){if(pattern0.test(key4)){const _errs99 = errors;if(typeof data44[key4] !== "string"){const err13 = {instancePath:instancePath+"/bonjourQueries/" + key2.replace(/~/g, "~0").replace(/\//g, "~1")+"/" + i8+"/txt/" + key4.replace(/~/g, "~0").replace(/\//g, "~1"),schemaPath:"#/definitions/bonjourQuery/properties/txt/patternProperties//type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err13];}else {vErrors.push(err13);}errors++;}var valid20 = _errs99 === errors;if(!valid20){break;}}}}else {const err14 = {instancePath:instancePath+"/bonjourQueries/" + key2.replace(/~/g, "~0").replace(/\//g, "~1")+"/" + i8+"/txt",schemaPath:"#/definitions/bonjourQuery/properties/txt/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err14];}else {vErrors.push(err14);}errors++;}}var valid19 = _errs97 === errors;}else {var valid19 = true;}}}}}}else {const err15 = {instancePath:instancePath+"/bonjourQueries/" + key2.replace(/~/g, "~0").replace(/\//g, "~1")+"/" + i8,schemaPath:"#/definitions/bonjourQuery/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err15];}else {vErrors.push(err15);}errors++;}}var valid17 = _errs88 === errors;if(!valid17){break;}}}else {const err16 = {instancePath:instancePath+"/bonjourQueries/" + key2.replace(/~/g, "~0").replace(/\//g, "~1"),schemaPath:"#/properties/bonjourQueries/patternProperties//oneOf/1/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err16];}else {vErrors.push(err16);}errors++;}}var _valid0 = _errs86 === errors;if(_valid0 && valid13){valid13 = false;passing0 = [passing0, 1];}else {if(_valid0){valid13 = true;passing0 = 1;}}if(!valid13){const err17 = {instancePath:instancePath+"/bonjourQueries/" + key2.replace(/~/g, "~0").replace(/\//g, "~1"),schemaPath:"#/properties/bonjourQueries/patternProperties//oneOf",keyword:"oneOf",params:{passingSchemas: passing0},message:"must match exactly one schema in oneOf"};if(vErrors === null){vErrors = [err17];}else {vErrors.push(err17);}errors++;validate10.errors = vErrors;return false;}else {errors = _errs72;if(vErrors !== null){if(_errs72){vErrors.length = _errs72;}else {vErrors = null;}}}var valid12 = _errs71 === errors;if(!valid12){break;}}}}else {validate10.errors = [{instancePath:instancePath+"/bonjourQueries",schemaPath:"#/properties/bonjourQueries/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}}var valid0 = _errs69 === errors;}else {var valid0 = true;}}}}}}}}}}}}}}}}}}}else {validate10.errors = [{instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}}validate10.errors = vErrors;return errors === 0;}
|
|
1
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
2
|
+
var __commonJS = (cb, mod) => function __require() {
|
|
3
|
+
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
4
|
+
};
|
|
5
|
+
|
|
6
|
+
// ../../node_modules/fast-deep-equal/index.js
|
|
7
|
+
var require_fast_deep_equal = __commonJS({
|
|
8
|
+
"../../node_modules/fast-deep-equal/index.js"(exports, module) {
|
|
9
|
+
"use strict";
|
|
10
|
+
module.exports = function equal(a, b) {
|
|
11
|
+
if (a === b) return true;
|
|
12
|
+
if (a && b && typeof a == "object" && typeof b == "object") {
|
|
13
|
+
if (a.constructor !== b.constructor) return false;
|
|
14
|
+
var length, i, keys;
|
|
15
|
+
if (Array.isArray(a)) {
|
|
16
|
+
length = a.length;
|
|
17
|
+
if (length != b.length) return false;
|
|
18
|
+
for (i = length; i-- !== 0; )
|
|
19
|
+
if (!equal(a[i], b[i])) return false;
|
|
20
|
+
return true;
|
|
21
|
+
}
|
|
22
|
+
if (a.constructor === RegExp) return a.source === b.source && a.flags === b.flags;
|
|
23
|
+
if (a.valueOf !== Object.prototype.valueOf) return a.valueOf() === b.valueOf();
|
|
24
|
+
if (a.toString !== Object.prototype.toString) return a.toString() === b.toString();
|
|
25
|
+
keys = Object.keys(a);
|
|
26
|
+
length = keys.length;
|
|
27
|
+
if (length !== Object.keys(b).length) return false;
|
|
28
|
+
for (i = length; i-- !== 0; )
|
|
29
|
+
if (!Object.prototype.hasOwnProperty.call(b, keys[i])) return false;
|
|
30
|
+
for (i = length; i-- !== 0; ) {
|
|
31
|
+
var key = keys[i];
|
|
32
|
+
if (!equal(a[key], b[key])) return false;
|
|
33
|
+
}
|
|
34
|
+
return true;
|
|
35
|
+
}
|
|
36
|
+
return a !== a && b !== b;
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
});
|
|
40
|
+
|
|
41
|
+
// ../../node_modules/ajv/dist/runtime/equal.js
|
|
42
|
+
var require_equal = __commonJS({
|
|
43
|
+
"../../node_modules/ajv/dist/runtime/equal.js"(exports) {
|
|
44
|
+
"use strict";
|
|
45
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
46
|
+
var equal = require_fast_deep_equal();
|
|
47
|
+
equal.code = 'require("ajv/dist/runtime/equal").default';
|
|
48
|
+
exports.default = equal;
|
|
49
|
+
}
|
|
50
|
+
});
|
|
51
|
+
|
|
52
|
+
// generated/validate_manifest.js
|
|
53
|
+
var validate = validate20;
|
|
54
|
+
var validate_manifest_default = validate20;
|
|
55
|
+
var schema31 = { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "title": "ModuleManifest", "properties": { "$schema": { "type": "string" }, "id": { "type": "string", "description": "Unique identifier for the module" }, "name": { "type": "string", "description": "Name of the module" }, "shortname": { "type": "string" }, "description": { "type": "string", "description": "Description of the module " }, "version": { "type": "string", "description": "Current version of the module" }, "isPrerelease": { "type": "boolean", "description": "Is this a pre-release version" }, "license": { "type": "string", "description": "SPDX identifier for license of the module" }, "repository": { "type": "string", "description": "URL to the source repository" }, "bugs": { "type": "string", "description": "URL to bug tracker" }, "maintainers": { "type": "array", "description": "List of active maintiners", "uniqueItems": true, "items": { "type": "object", "title": "ModuleManifestMaintainer", "properties": { "name": { "type": "string" }, "email": { "type": "string" }, "github": { "type": "string" }, "url": { "type": "string" } }, "required": ["name"], "additionalProperties": false } }, "legacyIds": { "type": "array", "description": "If the module had a different unique identifier previously, then specify it here", "uniqueItems": true, "items": { "type": "string" } }, "runtime": { "type": "object", "title": "ModuleManifestRuntime", "description": "Information on how to execute the module", "properties": { "type": { "type": "string", "description": "Type of the module. Must be: node18 or node22", "enum": ["node18", "node22"] }, "api": { "type": "string", "description": "Which host-api does it use. In the future alternate options will be allowed", "enum": ["nodejs-ipc"] }, "apiVersion": { "type": "string", "description": "The version of the host-api used" }, "entrypoint": { "type": "string", "description": "Entrypoint to pass to the runtime. eg index.js" }, "permissions": { "type": "object", "description": "Permissions required by the module. This is used to inform the user of the permissions required by the module.\nNote: this requires the node22 or newer runtime", "properties": { "worker-threads": { "type": "boolean", "description": "Enable if the module uses worker threads" }, "child-process": { "type": "boolean", "description": "Enable if the module uses child processes" }, "native-addons": { "type": "boolean", "description": "Enable if the module uses native addons" }, "filesystem": { "type": "boolean", "description": "Enable if the module requires read/write access to the filesystem" } }, "additionalProperties": false } }, "required": ["type", "api", "apiVersion", "entrypoint"] }, "manufacturer": { "type": "string" }, "products": { "type": "array", "uniqueItems": true, "items": { "type": "string" }, "minItems": 1 }, "keywords": { "type": "array", "uniqueItems": true, "items": { "type": "string" } }, "bonjourQueries": { "type": "object", "description": "If the device or software for your module supports bonjour announcements, Companion will offer an easy way to watch for these announcements.\nEach query you define must have a matching config field of type 'bonjour-device' with the same name", "patternProperties": { "": { "oneOf": [{ "$ref": "#/definitions/bonjourQuery" }, { "type": "array", "items": { "$ref": "#/definitions/bonjourQuery" } }] } } } }, "required": ["id", "name", "shortname", "description", "version", "license", "repository", "bugs", "maintainers", "legacyIds", "runtime", "manufacturer", "products", "keywords"], "definitions": { "bonjourQuery": { "type": "object", "title": "ModuleBonjourQuery", "description": "", "properties": { "type": { "type": "string" }, "protocol": { "type": "string", "enum": ["tcp", "udp"] }, "port": { "type": "number" }, "txt": { "type": "object", "description": "Match on any txt values returned in the query. This is useful to filter out devices of the same 'type' that are not supported", "patternProperties": { "": { "type": "string" } } } }, "required": ["type", "protocol"] } } };
|
|
56
|
+
var schema32 = { "type": "object", "title": "ModuleBonjourQuery", "description": "", "properties": { "type": { "type": "string" }, "protocol": { "type": "string", "enum": ["tcp", "udp"] }, "port": { "type": "number" }, "txt": { "type": "object", "description": "Match on any txt values returned in the query. This is useful to filter out devices of the same 'type' that are not supported", "patternProperties": { "": { "type": "string" } } } }, "required": ["type", "protocol"] };
|
|
57
|
+
var func0 = require_equal().default;
|
|
58
|
+
var pattern4 = new RegExp("", "u");
|
|
59
|
+
function validate20(data, { instancePath = "", parentData, parentDataProperty, rootData = data, dynamicAnchors = {} } = {}) {
|
|
60
|
+
let vErrors = null;
|
|
61
|
+
let errors = 0;
|
|
62
|
+
const evaluated0 = validate20.evaluated;
|
|
63
|
+
if (evaluated0.dynamicProps) {
|
|
64
|
+
evaluated0.props = void 0;
|
|
65
|
+
}
|
|
66
|
+
if (evaluated0.dynamicItems) {
|
|
67
|
+
evaluated0.items = void 0;
|
|
68
|
+
}
|
|
69
|
+
if (errors === 0) {
|
|
70
|
+
if (data && typeof data == "object" && !Array.isArray(data)) {
|
|
71
|
+
let missing0;
|
|
72
|
+
if (data.id === void 0 && (missing0 = "id") || data.name === void 0 && (missing0 = "name") || data.shortname === void 0 && (missing0 = "shortname") || data.description === void 0 && (missing0 = "description") || data.version === void 0 && (missing0 = "version") || data.license === void 0 && (missing0 = "license") || data.repository === void 0 && (missing0 = "repository") || data.bugs === void 0 && (missing0 = "bugs") || data.maintainers === void 0 && (missing0 = "maintainers") || data.legacyIds === void 0 && (missing0 = "legacyIds") || data.runtime === void 0 && (missing0 = "runtime") || data.manufacturer === void 0 && (missing0 = "manufacturer") || data.products === void 0 && (missing0 = "products") || data.keywords === void 0 && (missing0 = "keywords")) {
|
|
73
|
+
validate20.errors = [{ instancePath, schemaPath: "#/required", keyword: "required", params: { missingProperty: missing0 }, message: "must have required property '" + missing0 + "'" }];
|
|
74
|
+
return false;
|
|
75
|
+
} else {
|
|
76
|
+
if (data.$schema !== void 0) {
|
|
77
|
+
const _errs1 = errors;
|
|
78
|
+
if (typeof data.$schema !== "string") {
|
|
79
|
+
validate20.errors = [{ instancePath: instancePath + "/$schema", schemaPath: "#/properties/%24schema/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
|
|
80
|
+
return false;
|
|
81
|
+
}
|
|
82
|
+
var valid0 = _errs1 === errors;
|
|
83
|
+
} else {
|
|
84
|
+
var valid0 = true;
|
|
85
|
+
}
|
|
86
|
+
if (valid0) {
|
|
87
|
+
if (data.id !== void 0) {
|
|
88
|
+
const _errs3 = errors;
|
|
89
|
+
if (typeof data.id !== "string") {
|
|
90
|
+
validate20.errors = [{ instancePath: instancePath + "/id", schemaPath: "#/properties/id/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
|
|
91
|
+
return false;
|
|
92
|
+
}
|
|
93
|
+
var valid0 = _errs3 === errors;
|
|
94
|
+
} else {
|
|
95
|
+
var valid0 = true;
|
|
96
|
+
}
|
|
97
|
+
if (valid0) {
|
|
98
|
+
if (data.name !== void 0) {
|
|
99
|
+
const _errs5 = errors;
|
|
100
|
+
if (typeof data.name !== "string") {
|
|
101
|
+
validate20.errors = [{ instancePath: instancePath + "/name", schemaPath: "#/properties/name/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
|
|
102
|
+
return false;
|
|
103
|
+
}
|
|
104
|
+
var valid0 = _errs5 === errors;
|
|
105
|
+
} else {
|
|
106
|
+
var valid0 = true;
|
|
107
|
+
}
|
|
108
|
+
if (valid0) {
|
|
109
|
+
if (data.shortname !== void 0) {
|
|
110
|
+
const _errs7 = errors;
|
|
111
|
+
if (typeof data.shortname !== "string") {
|
|
112
|
+
validate20.errors = [{ instancePath: instancePath + "/shortname", schemaPath: "#/properties/shortname/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
|
|
113
|
+
return false;
|
|
114
|
+
}
|
|
115
|
+
var valid0 = _errs7 === errors;
|
|
116
|
+
} else {
|
|
117
|
+
var valid0 = true;
|
|
118
|
+
}
|
|
119
|
+
if (valid0) {
|
|
120
|
+
if (data.description !== void 0) {
|
|
121
|
+
const _errs9 = errors;
|
|
122
|
+
if (typeof data.description !== "string") {
|
|
123
|
+
validate20.errors = [{ instancePath: instancePath + "/description", schemaPath: "#/properties/description/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
|
|
124
|
+
return false;
|
|
125
|
+
}
|
|
126
|
+
var valid0 = _errs9 === errors;
|
|
127
|
+
} else {
|
|
128
|
+
var valid0 = true;
|
|
129
|
+
}
|
|
130
|
+
if (valid0) {
|
|
131
|
+
if (data.version !== void 0) {
|
|
132
|
+
const _errs11 = errors;
|
|
133
|
+
if (typeof data.version !== "string") {
|
|
134
|
+
validate20.errors = [{ instancePath: instancePath + "/version", schemaPath: "#/properties/version/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
|
|
135
|
+
return false;
|
|
136
|
+
}
|
|
137
|
+
var valid0 = _errs11 === errors;
|
|
138
|
+
} else {
|
|
139
|
+
var valid0 = true;
|
|
140
|
+
}
|
|
141
|
+
if (valid0) {
|
|
142
|
+
if (data.isPrerelease !== void 0) {
|
|
143
|
+
const _errs13 = errors;
|
|
144
|
+
if (typeof data.isPrerelease !== "boolean") {
|
|
145
|
+
validate20.errors = [{ instancePath: instancePath + "/isPrerelease", schemaPath: "#/properties/isPrerelease/type", keyword: "type", params: { type: "boolean" }, message: "must be boolean" }];
|
|
146
|
+
return false;
|
|
147
|
+
}
|
|
148
|
+
var valid0 = _errs13 === errors;
|
|
149
|
+
} else {
|
|
150
|
+
var valid0 = true;
|
|
151
|
+
}
|
|
152
|
+
if (valid0) {
|
|
153
|
+
if (data.license !== void 0) {
|
|
154
|
+
const _errs15 = errors;
|
|
155
|
+
if (typeof data.license !== "string") {
|
|
156
|
+
validate20.errors = [{ instancePath: instancePath + "/license", schemaPath: "#/properties/license/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
|
|
157
|
+
return false;
|
|
158
|
+
}
|
|
159
|
+
var valid0 = _errs15 === errors;
|
|
160
|
+
} else {
|
|
161
|
+
var valid0 = true;
|
|
162
|
+
}
|
|
163
|
+
if (valid0) {
|
|
164
|
+
if (data.repository !== void 0) {
|
|
165
|
+
const _errs17 = errors;
|
|
166
|
+
if (typeof data.repository !== "string") {
|
|
167
|
+
validate20.errors = [{ instancePath: instancePath + "/repository", schemaPath: "#/properties/repository/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
|
|
168
|
+
return false;
|
|
169
|
+
}
|
|
170
|
+
var valid0 = _errs17 === errors;
|
|
171
|
+
} else {
|
|
172
|
+
var valid0 = true;
|
|
173
|
+
}
|
|
174
|
+
if (valid0) {
|
|
175
|
+
if (data.bugs !== void 0) {
|
|
176
|
+
const _errs19 = errors;
|
|
177
|
+
if (typeof data.bugs !== "string") {
|
|
178
|
+
validate20.errors = [{ instancePath: instancePath + "/bugs", schemaPath: "#/properties/bugs/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
|
|
179
|
+
return false;
|
|
180
|
+
}
|
|
181
|
+
var valid0 = _errs19 === errors;
|
|
182
|
+
} else {
|
|
183
|
+
var valid0 = true;
|
|
184
|
+
}
|
|
185
|
+
if (valid0) {
|
|
186
|
+
if (data.maintainers !== void 0) {
|
|
187
|
+
let data10 = data.maintainers;
|
|
188
|
+
const _errs21 = errors;
|
|
189
|
+
if (errors === _errs21) {
|
|
190
|
+
if (Array.isArray(data10)) {
|
|
191
|
+
var valid1 = true;
|
|
192
|
+
const len0 = data10.length;
|
|
193
|
+
for (let i0 = 0; i0 < len0; i0++) {
|
|
194
|
+
let data11 = data10[i0];
|
|
195
|
+
const _errs23 = errors;
|
|
196
|
+
if (errors === _errs23) {
|
|
197
|
+
if (data11 && typeof data11 == "object" && !Array.isArray(data11)) {
|
|
198
|
+
let missing1;
|
|
199
|
+
if (data11.name === void 0 && (missing1 = "name")) {
|
|
200
|
+
validate20.errors = [{ instancePath: instancePath + "/maintainers/" + i0, schemaPath: "#/properties/maintainers/items/required", keyword: "required", params: { missingProperty: missing1 }, message: "must have required property '" + missing1 + "'" }];
|
|
201
|
+
return false;
|
|
202
|
+
} else {
|
|
203
|
+
const _errs25 = errors;
|
|
204
|
+
for (const key0 in data11) {
|
|
205
|
+
if (!(key0 === "name" || key0 === "email" || key0 === "github" || key0 === "url")) {
|
|
206
|
+
validate20.errors = [{ instancePath: instancePath + "/maintainers/" + i0, schemaPath: "#/properties/maintainers/items/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key0 }, message: "must NOT have additional properties" }];
|
|
207
|
+
return false;
|
|
208
|
+
break;
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
if (_errs25 === errors) {
|
|
212
|
+
if (data11.name !== void 0) {
|
|
213
|
+
const _errs26 = errors;
|
|
214
|
+
if (typeof data11.name !== "string") {
|
|
215
|
+
validate20.errors = [{ instancePath: instancePath + "/maintainers/" + i0 + "/name", schemaPath: "#/properties/maintainers/items/properties/name/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
|
|
216
|
+
return false;
|
|
217
|
+
}
|
|
218
|
+
var valid2 = _errs26 === errors;
|
|
219
|
+
} else {
|
|
220
|
+
var valid2 = true;
|
|
221
|
+
}
|
|
222
|
+
if (valid2) {
|
|
223
|
+
if (data11.email !== void 0) {
|
|
224
|
+
const _errs28 = errors;
|
|
225
|
+
if (typeof data11.email !== "string") {
|
|
226
|
+
validate20.errors = [{ instancePath: instancePath + "/maintainers/" + i0 + "/email", schemaPath: "#/properties/maintainers/items/properties/email/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
|
|
227
|
+
return false;
|
|
228
|
+
}
|
|
229
|
+
var valid2 = _errs28 === errors;
|
|
230
|
+
} else {
|
|
231
|
+
var valid2 = true;
|
|
232
|
+
}
|
|
233
|
+
if (valid2) {
|
|
234
|
+
if (data11.github !== void 0) {
|
|
235
|
+
const _errs30 = errors;
|
|
236
|
+
if (typeof data11.github !== "string") {
|
|
237
|
+
validate20.errors = [{ instancePath: instancePath + "/maintainers/" + i0 + "/github", schemaPath: "#/properties/maintainers/items/properties/github/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
|
|
238
|
+
return false;
|
|
239
|
+
}
|
|
240
|
+
var valid2 = _errs30 === errors;
|
|
241
|
+
} else {
|
|
242
|
+
var valid2 = true;
|
|
243
|
+
}
|
|
244
|
+
if (valid2) {
|
|
245
|
+
if (data11.url !== void 0) {
|
|
246
|
+
const _errs32 = errors;
|
|
247
|
+
if (typeof data11.url !== "string") {
|
|
248
|
+
validate20.errors = [{ instancePath: instancePath + "/maintainers/" + i0 + "/url", schemaPath: "#/properties/maintainers/items/properties/url/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
|
|
249
|
+
return false;
|
|
250
|
+
}
|
|
251
|
+
var valid2 = _errs32 === errors;
|
|
252
|
+
} else {
|
|
253
|
+
var valid2 = true;
|
|
254
|
+
}
|
|
255
|
+
}
|
|
256
|
+
}
|
|
257
|
+
}
|
|
258
|
+
}
|
|
259
|
+
}
|
|
260
|
+
} else {
|
|
261
|
+
validate20.errors = [{ instancePath: instancePath + "/maintainers/" + i0, schemaPath: "#/properties/maintainers/items/type", keyword: "type", params: { type: "object" }, message: "must be object" }];
|
|
262
|
+
return false;
|
|
263
|
+
}
|
|
264
|
+
}
|
|
265
|
+
var valid1 = _errs23 === errors;
|
|
266
|
+
if (!valid1) {
|
|
267
|
+
break;
|
|
268
|
+
}
|
|
269
|
+
}
|
|
270
|
+
if (valid1) {
|
|
271
|
+
let i1 = data10.length;
|
|
272
|
+
let j0;
|
|
273
|
+
if (i1 > 1) {
|
|
274
|
+
outer0: for (; i1--; ) {
|
|
275
|
+
for (j0 = i1; j0--; ) {
|
|
276
|
+
if (func0(data10[i1], data10[j0])) {
|
|
277
|
+
validate20.errors = [{ instancePath: instancePath + "/maintainers", schemaPath: "#/properties/maintainers/uniqueItems", keyword: "uniqueItems", params: { i: i1, j: j0 }, message: "must NOT have duplicate items (items ## " + j0 + " and " + i1 + " are identical)" }];
|
|
278
|
+
return false;
|
|
279
|
+
break outer0;
|
|
280
|
+
}
|
|
281
|
+
}
|
|
282
|
+
}
|
|
283
|
+
}
|
|
284
|
+
}
|
|
285
|
+
} else {
|
|
286
|
+
validate20.errors = [{ instancePath: instancePath + "/maintainers", schemaPath: "#/properties/maintainers/type", keyword: "type", params: { type: "array" }, message: "must be array" }];
|
|
287
|
+
return false;
|
|
288
|
+
}
|
|
289
|
+
}
|
|
290
|
+
var valid0 = _errs21 === errors;
|
|
291
|
+
} else {
|
|
292
|
+
var valid0 = true;
|
|
293
|
+
}
|
|
294
|
+
if (valid0) {
|
|
295
|
+
if (data.legacyIds !== void 0) {
|
|
296
|
+
let data16 = data.legacyIds;
|
|
297
|
+
const _errs34 = errors;
|
|
298
|
+
if (errors === _errs34) {
|
|
299
|
+
if (Array.isArray(data16)) {
|
|
300
|
+
var valid4 = true;
|
|
301
|
+
const len1 = data16.length;
|
|
302
|
+
for (let i2 = 0; i2 < len1; i2++) {
|
|
303
|
+
const _errs36 = errors;
|
|
304
|
+
if (typeof data16[i2] !== "string") {
|
|
305
|
+
validate20.errors = [{ instancePath: instancePath + "/legacyIds/" + i2, schemaPath: "#/properties/legacyIds/items/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
|
|
306
|
+
return false;
|
|
307
|
+
}
|
|
308
|
+
var valid4 = _errs36 === errors;
|
|
309
|
+
if (!valid4) {
|
|
310
|
+
break;
|
|
311
|
+
}
|
|
312
|
+
}
|
|
313
|
+
if (valid4) {
|
|
314
|
+
let i3 = data16.length;
|
|
315
|
+
let j1;
|
|
316
|
+
if (i3 > 1) {
|
|
317
|
+
const indices0 = {};
|
|
318
|
+
for (; i3--; ) {
|
|
319
|
+
let item0 = data16[i3];
|
|
320
|
+
if (typeof item0 !== "string") {
|
|
321
|
+
continue;
|
|
322
|
+
}
|
|
323
|
+
if (typeof indices0[item0] == "number") {
|
|
324
|
+
j1 = indices0[item0];
|
|
325
|
+
validate20.errors = [{ instancePath: instancePath + "/legacyIds", schemaPath: "#/properties/legacyIds/uniqueItems", keyword: "uniqueItems", params: { i: i3, j: j1 }, message: "must NOT have duplicate items (items ## " + j1 + " and " + i3 + " are identical)" }];
|
|
326
|
+
return false;
|
|
327
|
+
break;
|
|
328
|
+
}
|
|
329
|
+
indices0[item0] = i3;
|
|
330
|
+
}
|
|
331
|
+
}
|
|
332
|
+
}
|
|
333
|
+
} else {
|
|
334
|
+
validate20.errors = [{ instancePath: instancePath + "/legacyIds", schemaPath: "#/properties/legacyIds/type", keyword: "type", params: { type: "array" }, message: "must be array" }];
|
|
335
|
+
return false;
|
|
336
|
+
}
|
|
337
|
+
}
|
|
338
|
+
var valid0 = _errs34 === errors;
|
|
339
|
+
} else {
|
|
340
|
+
var valid0 = true;
|
|
341
|
+
}
|
|
342
|
+
if (valid0) {
|
|
343
|
+
if (data.runtime !== void 0) {
|
|
344
|
+
let data18 = data.runtime;
|
|
345
|
+
const _errs38 = errors;
|
|
346
|
+
if (errors === _errs38) {
|
|
347
|
+
if (data18 && typeof data18 == "object" && !Array.isArray(data18)) {
|
|
348
|
+
let missing2;
|
|
349
|
+
if (data18.type === void 0 && (missing2 = "type") || data18.api === void 0 && (missing2 = "api") || data18.apiVersion === void 0 && (missing2 = "apiVersion") || data18.entrypoint === void 0 && (missing2 = "entrypoint")) {
|
|
350
|
+
validate20.errors = [{ instancePath: instancePath + "/runtime", schemaPath: "#/properties/runtime/required", keyword: "required", params: { missingProperty: missing2 }, message: "must have required property '" + missing2 + "'" }];
|
|
351
|
+
return false;
|
|
352
|
+
} else {
|
|
353
|
+
if (data18.type !== void 0) {
|
|
354
|
+
let data19 = data18.type;
|
|
355
|
+
const _errs40 = errors;
|
|
356
|
+
if (typeof data19 !== "string") {
|
|
357
|
+
validate20.errors = [{ instancePath: instancePath + "/runtime/type", schemaPath: "#/properties/runtime/properties/type/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
|
|
358
|
+
return false;
|
|
359
|
+
}
|
|
360
|
+
if (!(data19 === "node18" || data19 === "node22")) {
|
|
361
|
+
validate20.errors = [{ instancePath: instancePath + "/runtime/type", schemaPath: "#/properties/runtime/properties/type/enum", keyword: "enum", params: { allowedValues: schema31.properties.runtime.properties.type.enum }, message: "must be equal to one of the allowed values" }];
|
|
362
|
+
return false;
|
|
363
|
+
}
|
|
364
|
+
var valid6 = _errs40 === errors;
|
|
365
|
+
} else {
|
|
366
|
+
var valid6 = true;
|
|
367
|
+
}
|
|
368
|
+
if (valid6) {
|
|
369
|
+
if (data18.api !== void 0) {
|
|
370
|
+
let data20 = data18.api;
|
|
371
|
+
const _errs42 = errors;
|
|
372
|
+
if (typeof data20 !== "string") {
|
|
373
|
+
validate20.errors = [{ instancePath: instancePath + "/runtime/api", schemaPath: "#/properties/runtime/properties/api/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
|
|
374
|
+
return false;
|
|
375
|
+
}
|
|
376
|
+
if (!(data20 === "nodejs-ipc")) {
|
|
377
|
+
validate20.errors = [{ instancePath: instancePath + "/runtime/api", schemaPath: "#/properties/runtime/properties/api/enum", keyword: "enum", params: { allowedValues: schema31.properties.runtime.properties.api.enum }, message: "must be equal to one of the allowed values" }];
|
|
378
|
+
return false;
|
|
379
|
+
}
|
|
380
|
+
var valid6 = _errs42 === errors;
|
|
381
|
+
} else {
|
|
382
|
+
var valid6 = true;
|
|
383
|
+
}
|
|
384
|
+
if (valid6) {
|
|
385
|
+
if (data18.apiVersion !== void 0) {
|
|
386
|
+
const _errs44 = errors;
|
|
387
|
+
if (typeof data18.apiVersion !== "string") {
|
|
388
|
+
validate20.errors = [{ instancePath: instancePath + "/runtime/apiVersion", schemaPath: "#/properties/runtime/properties/apiVersion/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
|
|
389
|
+
return false;
|
|
390
|
+
}
|
|
391
|
+
var valid6 = _errs44 === errors;
|
|
392
|
+
} else {
|
|
393
|
+
var valid6 = true;
|
|
394
|
+
}
|
|
395
|
+
if (valid6) {
|
|
396
|
+
if (data18.entrypoint !== void 0) {
|
|
397
|
+
const _errs46 = errors;
|
|
398
|
+
if (typeof data18.entrypoint !== "string") {
|
|
399
|
+
validate20.errors = [{ instancePath: instancePath + "/runtime/entrypoint", schemaPath: "#/properties/runtime/properties/entrypoint/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
|
|
400
|
+
return false;
|
|
401
|
+
}
|
|
402
|
+
var valid6 = _errs46 === errors;
|
|
403
|
+
} else {
|
|
404
|
+
var valid6 = true;
|
|
405
|
+
}
|
|
406
|
+
if (valid6) {
|
|
407
|
+
if (data18.permissions !== void 0) {
|
|
408
|
+
let data23 = data18.permissions;
|
|
409
|
+
const _errs48 = errors;
|
|
410
|
+
if (errors === _errs48) {
|
|
411
|
+
if (data23 && typeof data23 == "object" && !Array.isArray(data23)) {
|
|
412
|
+
const _errs50 = errors;
|
|
413
|
+
for (const key1 in data23) {
|
|
414
|
+
if (!(key1 === "worker-threads" || key1 === "child-process" || key1 === "native-addons" || key1 === "filesystem")) {
|
|
415
|
+
validate20.errors = [{ instancePath: instancePath + "/runtime/permissions", schemaPath: "#/properties/runtime/properties/permissions/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key1 }, message: "must NOT have additional properties" }];
|
|
416
|
+
return false;
|
|
417
|
+
break;
|
|
418
|
+
}
|
|
419
|
+
}
|
|
420
|
+
if (_errs50 === errors) {
|
|
421
|
+
if (data23["worker-threads"] !== void 0) {
|
|
422
|
+
const _errs51 = errors;
|
|
423
|
+
if (typeof data23["worker-threads"] !== "boolean") {
|
|
424
|
+
validate20.errors = [{ instancePath: instancePath + "/runtime/permissions/worker-threads", schemaPath: "#/properties/runtime/properties/permissions/properties/worker-threads/type", keyword: "type", params: { type: "boolean" }, message: "must be boolean" }];
|
|
425
|
+
return false;
|
|
426
|
+
}
|
|
427
|
+
var valid7 = _errs51 === errors;
|
|
428
|
+
} else {
|
|
429
|
+
var valid7 = true;
|
|
430
|
+
}
|
|
431
|
+
if (valid7) {
|
|
432
|
+
if (data23["child-process"] !== void 0) {
|
|
433
|
+
const _errs53 = errors;
|
|
434
|
+
if (typeof data23["child-process"] !== "boolean") {
|
|
435
|
+
validate20.errors = [{ instancePath: instancePath + "/runtime/permissions/child-process", schemaPath: "#/properties/runtime/properties/permissions/properties/child-process/type", keyword: "type", params: { type: "boolean" }, message: "must be boolean" }];
|
|
436
|
+
return false;
|
|
437
|
+
}
|
|
438
|
+
var valid7 = _errs53 === errors;
|
|
439
|
+
} else {
|
|
440
|
+
var valid7 = true;
|
|
441
|
+
}
|
|
442
|
+
if (valid7) {
|
|
443
|
+
if (data23["native-addons"] !== void 0) {
|
|
444
|
+
const _errs55 = errors;
|
|
445
|
+
if (typeof data23["native-addons"] !== "boolean") {
|
|
446
|
+
validate20.errors = [{ instancePath: instancePath + "/runtime/permissions/native-addons", schemaPath: "#/properties/runtime/properties/permissions/properties/native-addons/type", keyword: "type", params: { type: "boolean" }, message: "must be boolean" }];
|
|
447
|
+
return false;
|
|
448
|
+
}
|
|
449
|
+
var valid7 = _errs55 === errors;
|
|
450
|
+
} else {
|
|
451
|
+
var valid7 = true;
|
|
452
|
+
}
|
|
453
|
+
if (valid7) {
|
|
454
|
+
if (data23.filesystem !== void 0) {
|
|
455
|
+
const _errs57 = errors;
|
|
456
|
+
if (typeof data23.filesystem !== "boolean") {
|
|
457
|
+
validate20.errors = [{ instancePath: instancePath + "/runtime/permissions/filesystem", schemaPath: "#/properties/runtime/properties/permissions/properties/filesystem/type", keyword: "type", params: { type: "boolean" }, message: "must be boolean" }];
|
|
458
|
+
return false;
|
|
459
|
+
}
|
|
460
|
+
var valid7 = _errs57 === errors;
|
|
461
|
+
} else {
|
|
462
|
+
var valid7 = true;
|
|
463
|
+
}
|
|
464
|
+
}
|
|
465
|
+
}
|
|
466
|
+
}
|
|
467
|
+
}
|
|
468
|
+
} else {
|
|
469
|
+
validate20.errors = [{ instancePath: instancePath + "/runtime/permissions", schemaPath: "#/properties/runtime/properties/permissions/type", keyword: "type", params: { type: "object" }, message: "must be object" }];
|
|
470
|
+
return false;
|
|
471
|
+
}
|
|
472
|
+
}
|
|
473
|
+
var valid6 = _errs48 === errors;
|
|
474
|
+
} else {
|
|
475
|
+
var valid6 = true;
|
|
476
|
+
}
|
|
477
|
+
}
|
|
478
|
+
}
|
|
479
|
+
}
|
|
480
|
+
}
|
|
481
|
+
}
|
|
482
|
+
} else {
|
|
483
|
+
validate20.errors = [{ instancePath: instancePath + "/runtime", schemaPath: "#/properties/runtime/type", keyword: "type", params: { type: "object" }, message: "must be object" }];
|
|
484
|
+
return false;
|
|
485
|
+
}
|
|
486
|
+
}
|
|
487
|
+
var valid0 = _errs38 === errors;
|
|
488
|
+
} else {
|
|
489
|
+
var valid0 = true;
|
|
490
|
+
}
|
|
491
|
+
if (valid0) {
|
|
492
|
+
if (data.manufacturer !== void 0) {
|
|
493
|
+
const _errs59 = errors;
|
|
494
|
+
if (typeof data.manufacturer !== "string") {
|
|
495
|
+
validate20.errors = [{ instancePath: instancePath + "/manufacturer", schemaPath: "#/properties/manufacturer/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
|
|
496
|
+
return false;
|
|
497
|
+
}
|
|
498
|
+
var valid0 = _errs59 === errors;
|
|
499
|
+
} else {
|
|
500
|
+
var valid0 = true;
|
|
501
|
+
}
|
|
502
|
+
if (valid0) {
|
|
503
|
+
if (data.products !== void 0) {
|
|
504
|
+
let data29 = data.products;
|
|
505
|
+
const _errs61 = errors;
|
|
506
|
+
if (errors === _errs61) {
|
|
507
|
+
if (Array.isArray(data29)) {
|
|
508
|
+
if (data29.length < 1) {
|
|
509
|
+
validate20.errors = [{ instancePath: instancePath + "/products", schemaPath: "#/properties/products/minItems", keyword: "minItems", params: { limit: 1 }, message: "must NOT have fewer than 1 items" }];
|
|
510
|
+
return false;
|
|
511
|
+
} else {
|
|
512
|
+
var valid8 = true;
|
|
513
|
+
const len2 = data29.length;
|
|
514
|
+
for (let i4 = 0; i4 < len2; i4++) {
|
|
515
|
+
const _errs63 = errors;
|
|
516
|
+
if (typeof data29[i4] !== "string") {
|
|
517
|
+
validate20.errors = [{ instancePath: instancePath + "/products/" + i4, schemaPath: "#/properties/products/items/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
|
|
518
|
+
return false;
|
|
519
|
+
}
|
|
520
|
+
var valid8 = _errs63 === errors;
|
|
521
|
+
if (!valid8) {
|
|
522
|
+
break;
|
|
523
|
+
}
|
|
524
|
+
}
|
|
525
|
+
if (valid8) {
|
|
526
|
+
let i5 = data29.length;
|
|
527
|
+
let j2;
|
|
528
|
+
if (i5 > 1) {
|
|
529
|
+
const indices1 = {};
|
|
530
|
+
for (; i5--; ) {
|
|
531
|
+
let item1 = data29[i5];
|
|
532
|
+
if (typeof item1 !== "string") {
|
|
533
|
+
continue;
|
|
534
|
+
}
|
|
535
|
+
if (typeof indices1[item1] == "number") {
|
|
536
|
+
j2 = indices1[item1];
|
|
537
|
+
validate20.errors = [{ instancePath: instancePath + "/products", schemaPath: "#/properties/products/uniqueItems", keyword: "uniqueItems", params: { i: i5, j: j2 }, message: "must NOT have duplicate items (items ## " + j2 + " and " + i5 + " are identical)" }];
|
|
538
|
+
return false;
|
|
539
|
+
break;
|
|
540
|
+
}
|
|
541
|
+
indices1[item1] = i5;
|
|
542
|
+
}
|
|
543
|
+
}
|
|
544
|
+
}
|
|
545
|
+
}
|
|
546
|
+
} else {
|
|
547
|
+
validate20.errors = [{ instancePath: instancePath + "/products", schemaPath: "#/properties/products/type", keyword: "type", params: { type: "array" }, message: "must be array" }];
|
|
548
|
+
return false;
|
|
549
|
+
}
|
|
550
|
+
}
|
|
551
|
+
var valid0 = _errs61 === errors;
|
|
552
|
+
} else {
|
|
553
|
+
var valid0 = true;
|
|
554
|
+
}
|
|
555
|
+
if (valid0) {
|
|
556
|
+
if (data.keywords !== void 0) {
|
|
557
|
+
let data31 = data.keywords;
|
|
558
|
+
const _errs65 = errors;
|
|
559
|
+
if (errors === _errs65) {
|
|
560
|
+
if (Array.isArray(data31)) {
|
|
561
|
+
var valid10 = true;
|
|
562
|
+
const len3 = data31.length;
|
|
563
|
+
for (let i6 = 0; i6 < len3; i6++) {
|
|
564
|
+
const _errs67 = errors;
|
|
565
|
+
if (typeof data31[i6] !== "string") {
|
|
566
|
+
validate20.errors = [{ instancePath: instancePath + "/keywords/" + i6, schemaPath: "#/properties/keywords/items/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
|
|
567
|
+
return false;
|
|
568
|
+
}
|
|
569
|
+
var valid10 = _errs67 === errors;
|
|
570
|
+
if (!valid10) {
|
|
571
|
+
break;
|
|
572
|
+
}
|
|
573
|
+
}
|
|
574
|
+
if (valid10) {
|
|
575
|
+
let i7 = data31.length;
|
|
576
|
+
let j3;
|
|
577
|
+
if (i7 > 1) {
|
|
578
|
+
const indices2 = {};
|
|
579
|
+
for (; i7--; ) {
|
|
580
|
+
let item2 = data31[i7];
|
|
581
|
+
if (typeof item2 !== "string") {
|
|
582
|
+
continue;
|
|
583
|
+
}
|
|
584
|
+
if (typeof indices2[item2] == "number") {
|
|
585
|
+
j3 = indices2[item2];
|
|
586
|
+
validate20.errors = [{ instancePath: instancePath + "/keywords", schemaPath: "#/properties/keywords/uniqueItems", keyword: "uniqueItems", params: { i: i7, j: j3 }, message: "must NOT have duplicate items (items ## " + j3 + " and " + i7 + " are identical)" }];
|
|
587
|
+
return false;
|
|
588
|
+
break;
|
|
589
|
+
}
|
|
590
|
+
indices2[item2] = i7;
|
|
591
|
+
}
|
|
592
|
+
}
|
|
593
|
+
}
|
|
594
|
+
} else {
|
|
595
|
+
validate20.errors = [{ instancePath: instancePath + "/keywords", schemaPath: "#/properties/keywords/type", keyword: "type", params: { type: "array" }, message: "must be array" }];
|
|
596
|
+
return false;
|
|
597
|
+
}
|
|
598
|
+
}
|
|
599
|
+
var valid0 = _errs65 === errors;
|
|
600
|
+
} else {
|
|
601
|
+
var valid0 = true;
|
|
602
|
+
}
|
|
603
|
+
if (valid0) {
|
|
604
|
+
if (data.bonjourQueries !== void 0) {
|
|
605
|
+
let data33 = data.bonjourQueries;
|
|
606
|
+
const _errs69 = errors;
|
|
607
|
+
if (errors === _errs69) {
|
|
608
|
+
if (data33 && typeof data33 == "object" && !Array.isArray(data33)) {
|
|
609
|
+
var props0 = {};
|
|
610
|
+
for (const key2 in data33) {
|
|
611
|
+
if (pattern4.test(key2)) {
|
|
612
|
+
let data34 = data33[key2];
|
|
613
|
+
const _errs72 = errors;
|
|
614
|
+
let valid13 = false;
|
|
615
|
+
let passing0 = null;
|
|
616
|
+
const _errs73 = errors;
|
|
617
|
+
const _errs74 = errors;
|
|
618
|
+
if (errors === _errs74) {
|
|
619
|
+
if (data34 && typeof data34 == "object" && !Array.isArray(data34)) {
|
|
620
|
+
let missing3;
|
|
621
|
+
if (data34.type === void 0 && (missing3 = "type") || data34.protocol === void 0 && (missing3 = "protocol")) {
|
|
622
|
+
const err0 = { instancePath: instancePath + "/bonjourQueries/" + key2.replace(/~/g, "~0").replace(/\//g, "~1"), schemaPath: "#/definitions/bonjourQuery/required", keyword: "required", params: { missingProperty: missing3 }, message: "must have required property '" + missing3 + "'" };
|
|
623
|
+
if (vErrors === null) {
|
|
624
|
+
vErrors = [err0];
|
|
625
|
+
} else {
|
|
626
|
+
vErrors.push(err0);
|
|
627
|
+
}
|
|
628
|
+
errors++;
|
|
629
|
+
} else {
|
|
630
|
+
if (data34.type !== void 0) {
|
|
631
|
+
const _errs76 = errors;
|
|
632
|
+
if (typeof data34.type !== "string") {
|
|
633
|
+
const err1 = { instancePath: instancePath + "/bonjourQueries/" + key2.replace(/~/g, "~0").replace(/\//g, "~1") + "/type", schemaPath: "#/definitions/bonjourQuery/properties/type/type", keyword: "type", params: { type: "string" }, message: "must be string" };
|
|
634
|
+
if (vErrors === null) {
|
|
635
|
+
vErrors = [err1];
|
|
636
|
+
} else {
|
|
637
|
+
vErrors.push(err1);
|
|
638
|
+
}
|
|
639
|
+
errors++;
|
|
640
|
+
}
|
|
641
|
+
var valid15 = _errs76 === errors;
|
|
642
|
+
} else {
|
|
643
|
+
var valid15 = true;
|
|
644
|
+
}
|
|
645
|
+
if (valid15) {
|
|
646
|
+
if (data34.protocol !== void 0) {
|
|
647
|
+
let data36 = data34.protocol;
|
|
648
|
+
const _errs78 = errors;
|
|
649
|
+
if (typeof data36 !== "string") {
|
|
650
|
+
const err2 = { instancePath: instancePath + "/bonjourQueries/" + key2.replace(/~/g, "~0").replace(/\//g, "~1") + "/protocol", schemaPath: "#/definitions/bonjourQuery/properties/protocol/type", keyword: "type", params: { type: "string" }, message: "must be string" };
|
|
651
|
+
if (vErrors === null) {
|
|
652
|
+
vErrors = [err2];
|
|
653
|
+
} else {
|
|
654
|
+
vErrors.push(err2);
|
|
655
|
+
}
|
|
656
|
+
errors++;
|
|
657
|
+
}
|
|
658
|
+
if (!(data36 === "tcp" || data36 === "udp")) {
|
|
659
|
+
const err3 = { instancePath: instancePath + "/bonjourQueries/" + key2.replace(/~/g, "~0").replace(/\//g, "~1") + "/protocol", schemaPath: "#/definitions/bonjourQuery/properties/protocol/enum", keyword: "enum", params: { allowedValues: schema32.properties.protocol.enum }, message: "must be equal to one of the allowed values" };
|
|
660
|
+
if (vErrors === null) {
|
|
661
|
+
vErrors = [err3];
|
|
662
|
+
} else {
|
|
663
|
+
vErrors.push(err3);
|
|
664
|
+
}
|
|
665
|
+
errors++;
|
|
666
|
+
}
|
|
667
|
+
var valid15 = _errs78 === errors;
|
|
668
|
+
} else {
|
|
669
|
+
var valid15 = true;
|
|
670
|
+
}
|
|
671
|
+
if (valid15) {
|
|
672
|
+
if (data34.port !== void 0) {
|
|
673
|
+
let data37 = data34.port;
|
|
674
|
+
const _errs80 = errors;
|
|
675
|
+
if (!(typeof data37 == "number" && isFinite(data37))) {
|
|
676
|
+
const err4 = { instancePath: instancePath + "/bonjourQueries/" + key2.replace(/~/g, "~0").replace(/\//g, "~1") + "/port", schemaPath: "#/definitions/bonjourQuery/properties/port/type", keyword: "type", params: { type: "number" }, message: "must be number" };
|
|
677
|
+
if (vErrors === null) {
|
|
678
|
+
vErrors = [err4];
|
|
679
|
+
} else {
|
|
680
|
+
vErrors.push(err4);
|
|
681
|
+
}
|
|
682
|
+
errors++;
|
|
683
|
+
}
|
|
684
|
+
var valid15 = _errs80 === errors;
|
|
685
|
+
} else {
|
|
686
|
+
var valid15 = true;
|
|
687
|
+
}
|
|
688
|
+
if (valid15) {
|
|
689
|
+
if (data34.txt !== void 0) {
|
|
690
|
+
let data38 = data34.txt;
|
|
691
|
+
const _errs82 = errors;
|
|
692
|
+
if (errors === _errs82) {
|
|
693
|
+
if (data38 && typeof data38 == "object" && !Array.isArray(data38)) {
|
|
694
|
+
var props1 = {};
|
|
695
|
+
for (const key3 in data38) {
|
|
696
|
+
if (pattern4.test(key3)) {
|
|
697
|
+
if (typeof data38[key3] !== "string") {
|
|
698
|
+
const err5 = { instancePath: instancePath + "/bonjourQueries/" + key2.replace(/~/g, "~0").replace(/\//g, "~1") + "/txt/" + key3.replace(/~/g, "~0").replace(/\//g, "~1"), schemaPath: "#/definitions/bonjourQuery/properties/txt/patternProperties//type", keyword: "type", params: { type: "string" }, message: "must be string" };
|
|
699
|
+
if (vErrors === null) {
|
|
700
|
+
vErrors = [err5];
|
|
701
|
+
} else {
|
|
702
|
+
vErrors.push(err5);
|
|
703
|
+
}
|
|
704
|
+
errors++;
|
|
705
|
+
}
|
|
706
|
+
props1[key3] = true;
|
|
707
|
+
}
|
|
708
|
+
}
|
|
709
|
+
} else {
|
|
710
|
+
const err6 = { instancePath: instancePath + "/bonjourQueries/" + key2.replace(/~/g, "~0").replace(/\//g, "~1") + "/txt", schemaPath: "#/definitions/bonjourQuery/properties/txt/type", keyword: "type", params: { type: "object" }, message: "must be object" };
|
|
711
|
+
if (vErrors === null) {
|
|
712
|
+
vErrors = [err6];
|
|
713
|
+
} else {
|
|
714
|
+
vErrors.push(err6);
|
|
715
|
+
}
|
|
716
|
+
errors++;
|
|
717
|
+
}
|
|
718
|
+
}
|
|
719
|
+
var valid15 = _errs82 === errors;
|
|
720
|
+
} else {
|
|
721
|
+
var valid15 = true;
|
|
722
|
+
}
|
|
723
|
+
}
|
|
724
|
+
}
|
|
725
|
+
}
|
|
726
|
+
}
|
|
727
|
+
} else {
|
|
728
|
+
const err7 = { instancePath: instancePath + "/bonjourQueries/" + key2.replace(/~/g, "~0").replace(/\//g, "~1"), schemaPath: "#/definitions/bonjourQuery/type", keyword: "type", params: { type: "object" }, message: "must be object" };
|
|
729
|
+
if (vErrors === null) {
|
|
730
|
+
vErrors = [err7];
|
|
731
|
+
} else {
|
|
732
|
+
vErrors.push(err7);
|
|
733
|
+
}
|
|
734
|
+
errors++;
|
|
735
|
+
}
|
|
736
|
+
}
|
|
737
|
+
var _valid0 = _errs73 === errors;
|
|
738
|
+
if (_valid0) {
|
|
739
|
+
valid13 = true;
|
|
740
|
+
passing0 = 0;
|
|
741
|
+
var props2 = {};
|
|
742
|
+
props2.type = true;
|
|
743
|
+
props2.protocol = true;
|
|
744
|
+
props2.port = true;
|
|
745
|
+
props2.txt = true;
|
|
746
|
+
}
|
|
747
|
+
const _errs86 = errors;
|
|
748
|
+
if (errors === _errs86) {
|
|
749
|
+
if (Array.isArray(data34)) {
|
|
750
|
+
var valid17 = true;
|
|
751
|
+
const len4 = data34.length;
|
|
752
|
+
for (let i8 = 0; i8 < len4; i8++) {
|
|
753
|
+
let data40 = data34[i8];
|
|
754
|
+
const _errs88 = errors;
|
|
755
|
+
const _errs89 = errors;
|
|
756
|
+
if (errors === _errs89) {
|
|
757
|
+
if (data40 && typeof data40 == "object" && !Array.isArray(data40)) {
|
|
758
|
+
let missing4;
|
|
759
|
+
if (data40.type === void 0 && (missing4 = "type") || data40.protocol === void 0 && (missing4 = "protocol")) {
|
|
760
|
+
const err8 = { instancePath: instancePath + "/bonjourQueries/" + key2.replace(/~/g, "~0").replace(/\//g, "~1") + "/" + i8, schemaPath: "#/definitions/bonjourQuery/required", keyword: "required", params: { missingProperty: missing4 }, message: "must have required property '" + missing4 + "'" };
|
|
761
|
+
if (vErrors === null) {
|
|
762
|
+
vErrors = [err8];
|
|
763
|
+
} else {
|
|
764
|
+
vErrors.push(err8);
|
|
765
|
+
}
|
|
766
|
+
errors++;
|
|
767
|
+
} else {
|
|
768
|
+
if (data40.type !== void 0) {
|
|
769
|
+
const _errs91 = errors;
|
|
770
|
+
if (typeof data40.type !== "string") {
|
|
771
|
+
const err9 = { instancePath: instancePath + "/bonjourQueries/" + key2.replace(/~/g, "~0").replace(/\//g, "~1") + "/" + i8 + "/type", schemaPath: "#/definitions/bonjourQuery/properties/type/type", keyword: "type", params: { type: "string" }, message: "must be string" };
|
|
772
|
+
if (vErrors === null) {
|
|
773
|
+
vErrors = [err9];
|
|
774
|
+
} else {
|
|
775
|
+
vErrors.push(err9);
|
|
776
|
+
}
|
|
777
|
+
errors++;
|
|
778
|
+
}
|
|
779
|
+
var valid19 = _errs91 === errors;
|
|
780
|
+
} else {
|
|
781
|
+
var valid19 = true;
|
|
782
|
+
}
|
|
783
|
+
if (valid19) {
|
|
784
|
+
if (data40.protocol !== void 0) {
|
|
785
|
+
let data42 = data40.protocol;
|
|
786
|
+
const _errs93 = errors;
|
|
787
|
+
if (typeof data42 !== "string") {
|
|
788
|
+
const err10 = { instancePath: instancePath + "/bonjourQueries/" + key2.replace(/~/g, "~0").replace(/\//g, "~1") + "/" + i8 + "/protocol", schemaPath: "#/definitions/bonjourQuery/properties/protocol/type", keyword: "type", params: { type: "string" }, message: "must be string" };
|
|
789
|
+
if (vErrors === null) {
|
|
790
|
+
vErrors = [err10];
|
|
791
|
+
} else {
|
|
792
|
+
vErrors.push(err10);
|
|
793
|
+
}
|
|
794
|
+
errors++;
|
|
795
|
+
}
|
|
796
|
+
if (!(data42 === "tcp" || data42 === "udp")) {
|
|
797
|
+
const err11 = { instancePath: instancePath + "/bonjourQueries/" + key2.replace(/~/g, "~0").replace(/\//g, "~1") + "/" + i8 + "/protocol", schemaPath: "#/definitions/bonjourQuery/properties/protocol/enum", keyword: "enum", params: { allowedValues: schema32.properties.protocol.enum }, message: "must be equal to one of the allowed values" };
|
|
798
|
+
if (vErrors === null) {
|
|
799
|
+
vErrors = [err11];
|
|
800
|
+
} else {
|
|
801
|
+
vErrors.push(err11);
|
|
802
|
+
}
|
|
803
|
+
errors++;
|
|
804
|
+
}
|
|
805
|
+
var valid19 = _errs93 === errors;
|
|
806
|
+
} else {
|
|
807
|
+
var valid19 = true;
|
|
808
|
+
}
|
|
809
|
+
if (valid19) {
|
|
810
|
+
if (data40.port !== void 0) {
|
|
811
|
+
let data43 = data40.port;
|
|
812
|
+
const _errs95 = errors;
|
|
813
|
+
if (!(typeof data43 == "number" && isFinite(data43))) {
|
|
814
|
+
const err12 = { instancePath: instancePath + "/bonjourQueries/" + key2.replace(/~/g, "~0").replace(/\//g, "~1") + "/" + i8 + "/port", schemaPath: "#/definitions/bonjourQuery/properties/port/type", keyword: "type", params: { type: "number" }, message: "must be number" };
|
|
815
|
+
if (vErrors === null) {
|
|
816
|
+
vErrors = [err12];
|
|
817
|
+
} else {
|
|
818
|
+
vErrors.push(err12);
|
|
819
|
+
}
|
|
820
|
+
errors++;
|
|
821
|
+
}
|
|
822
|
+
var valid19 = _errs95 === errors;
|
|
823
|
+
} else {
|
|
824
|
+
var valid19 = true;
|
|
825
|
+
}
|
|
826
|
+
if (valid19) {
|
|
827
|
+
if (data40.txt !== void 0) {
|
|
828
|
+
let data44 = data40.txt;
|
|
829
|
+
const _errs97 = errors;
|
|
830
|
+
if (errors === _errs97) {
|
|
831
|
+
if (data44 && typeof data44 == "object" && !Array.isArray(data44)) {
|
|
832
|
+
var props3 = {};
|
|
833
|
+
for (const key4 in data44) {
|
|
834
|
+
if (pattern4.test(key4)) {
|
|
835
|
+
if (typeof data44[key4] !== "string") {
|
|
836
|
+
const err13 = { instancePath: instancePath + "/bonjourQueries/" + key2.replace(/~/g, "~0").replace(/\//g, "~1") + "/" + i8 + "/txt/" + key4.replace(/~/g, "~0").replace(/\//g, "~1"), schemaPath: "#/definitions/bonjourQuery/properties/txt/patternProperties//type", keyword: "type", params: { type: "string" }, message: "must be string" };
|
|
837
|
+
if (vErrors === null) {
|
|
838
|
+
vErrors = [err13];
|
|
839
|
+
} else {
|
|
840
|
+
vErrors.push(err13);
|
|
841
|
+
}
|
|
842
|
+
errors++;
|
|
843
|
+
}
|
|
844
|
+
props3[key4] = true;
|
|
845
|
+
}
|
|
846
|
+
}
|
|
847
|
+
} else {
|
|
848
|
+
const err14 = { instancePath: instancePath + "/bonjourQueries/" + key2.replace(/~/g, "~0").replace(/\//g, "~1") + "/" + i8 + "/txt", schemaPath: "#/definitions/bonjourQuery/properties/txt/type", keyword: "type", params: { type: "object" }, message: "must be object" };
|
|
849
|
+
if (vErrors === null) {
|
|
850
|
+
vErrors = [err14];
|
|
851
|
+
} else {
|
|
852
|
+
vErrors.push(err14);
|
|
853
|
+
}
|
|
854
|
+
errors++;
|
|
855
|
+
}
|
|
856
|
+
}
|
|
857
|
+
var valid19 = _errs97 === errors;
|
|
858
|
+
} else {
|
|
859
|
+
var valid19 = true;
|
|
860
|
+
}
|
|
861
|
+
}
|
|
862
|
+
}
|
|
863
|
+
}
|
|
864
|
+
}
|
|
865
|
+
} else {
|
|
866
|
+
const err15 = { instancePath: instancePath + "/bonjourQueries/" + key2.replace(/~/g, "~0").replace(/\//g, "~1") + "/" + i8, schemaPath: "#/definitions/bonjourQuery/type", keyword: "type", params: { type: "object" }, message: "must be object" };
|
|
867
|
+
if (vErrors === null) {
|
|
868
|
+
vErrors = [err15];
|
|
869
|
+
} else {
|
|
870
|
+
vErrors.push(err15);
|
|
871
|
+
}
|
|
872
|
+
errors++;
|
|
873
|
+
}
|
|
874
|
+
}
|
|
875
|
+
var valid17 = _errs88 === errors;
|
|
876
|
+
if (!valid17) {
|
|
877
|
+
break;
|
|
878
|
+
}
|
|
879
|
+
}
|
|
880
|
+
} else {
|
|
881
|
+
const err16 = { instancePath: instancePath + "/bonjourQueries/" + key2.replace(/~/g, "~0").replace(/\//g, "~1"), schemaPath: "#/properties/bonjourQueries/patternProperties//oneOf/1/type", keyword: "type", params: { type: "array" }, message: "must be array" };
|
|
882
|
+
if (vErrors === null) {
|
|
883
|
+
vErrors = [err16];
|
|
884
|
+
} else {
|
|
885
|
+
vErrors.push(err16);
|
|
886
|
+
}
|
|
887
|
+
errors++;
|
|
888
|
+
}
|
|
889
|
+
}
|
|
890
|
+
var _valid0 = _errs86 === errors;
|
|
891
|
+
if (_valid0 && valid13) {
|
|
892
|
+
valid13 = false;
|
|
893
|
+
passing0 = [passing0, 1];
|
|
894
|
+
} else {
|
|
895
|
+
if (_valid0) {
|
|
896
|
+
valid13 = true;
|
|
897
|
+
passing0 = 1;
|
|
898
|
+
}
|
|
899
|
+
}
|
|
900
|
+
if (!valid13) {
|
|
901
|
+
const err17 = { instancePath: instancePath + "/bonjourQueries/" + key2.replace(/~/g, "~0").replace(/\//g, "~1"), schemaPath: "#/properties/bonjourQueries/patternProperties//oneOf", keyword: "oneOf", params: { passingSchemas: passing0 }, message: "must match exactly one schema in oneOf" };
|
|
902
|
+
if (vErrors === null) {
|
|
903
|
+
vErrors = [err17];
|
|
904
|
+
} else {
|
|
905
|
+
vErrors.push(err17);
|
|
906
|
+
}
|
|
907
|
+
errors++;
|
|
908
|
+
validate20.errors = vErrors;
|
|
909
|
+
return false;
|
|
910
|
+
} else {
|
|
911
|
+
errors = _errs72;
|
|
912
|
+
if (vErrors !== null) {
|
|
913
|
+
if (_errs72) {
|
|
914
|
+
vErrors.length = _errs72;
|
|
915
|
+
} else {
|
|
916
|
+
vErrors = null;
|
|
917
|
+
}
|
|
918
|
+
}
|
|
919
|
+
}
|
|
920
|
+
props0[key2] = true;
|
|
921
|
+
}
|
|
922
|
+
}
|
|
923
|
+
} else {
|
|
924
|
+
validate20.errors = [{ instancePath: instancePath + "/bonjourQueries", schemaPath: "#/properties/bonjourQueries/type", keyword: "type", params: { type: "object" }, message: "must be object" }];
|
|
925
|
+
return false;
|
|
926
|
+
}
|
|
927
|
+
}
|
|
928
|
+
var valid0 = _errs69 === errors;
|
|
929
|
+
} else {
|
|
930
|
+
var valid0 = true;
|
|
931
|
+
}
|
|
932
|
+
}
|
|
933
|
+
}
|
|
934
|
+
}
|
|
935
|
+
}
|
|
936
|
+
}
|
|
937
|
+
}
|
|
938
|
+
}
|
|
939
|
+
}
|
|
940
|
+
}
|
|
941
|
+
}
|
|
942
|
+
}
|
|
943
|
+
}
|
|
944
|
+
}
|
|
945
|
+
}
|
|
946
|
+
}
|
|
947
|
+
}
|
|
948
|
+
}
|
|
949
|
+
} else {
|
|
950
|
+
validate20.errors = [{ instancePath, schemaPath: "#/type", keyword: "type", params: { type: "object" }, message: "must be object" }];
|
|
951
|
+
return false;
|
|
952
|
+
}
|
|
953
|
+
}
|
|
954
|
+
validate20.errors = vErrors;
|
|
955
|
+
return errors === 0;
|
|
956
|
+
}
|
|
957
|
+
validate20.evaluated = { "props": { "$schema": true, "id": true, "name": true, "shortname": true, "description": true, "version": true, "isPrerelease": true, "license": true, "repository": true, "bugs": true, "maintainers": true, "legacyIds": true, "runtime": true, "manufacturer": true, "products": true, "keywords": true, "bonjourQueries": true }, "dynamicProps": false, "dynamicItems": false };
|
|
958
|
+
export {
|
|
959
|
+
validate_manifest_default as default,
|
|
960
|
+
validate
|
|
961
|
+
};
|