@companion-module/base 2.1.3 → 2.2.0-nightly-main-20260902-210244-eaa0afd

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