@companion-module/base 2.0.3 → 2.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [2.0.4](https://github.com/bitfocus/companion-module-base/compare/companion-module-base-v2.0.3...companion-module-base-v2.0.4) (2026-04-19)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Bug Fixes
|
|
7
|
+
|
|
8
|
+
* type field should be required in manifest ([d452454](https://github.com/bitfocus/companion-module-base/commit/d452454c5ddce1ec1c8ccf61339ff8959dd0b9ef))
|
|
9
|
+
|
|
3
10
|
## [2.0.3](https://github.com/bitfocus/companion-module-base/compare/companion-module-base-v2.0.2...companion-module-base-v2.0.3) (2026-03-18)
|
|
4
11
|
|
|
5
12
|
|
package/generated/manifest.d.ts
CHANGED
|
@@ -52,7 +52,7 @@ var require_equal = __commonJS({
|
|
|
52
52
|
// generated/validate_manifest.js
|
|
53
53
|
var validate = validate20;
|
|
54
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" }, "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", "enum": ["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" }, "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": ["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"] } } };
|
|
55
|
+
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", "enum": ["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" }, "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"] } } };
|
|
56
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" } } }, "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"] };
|
|
57
57
|
var func0 = require_equal().default;
|
|
58
58
|
var pattern4 = new RegExp("", "u");
|
|
@@ -69,7 +69,7 @@ function validate20(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
69
69
|
if (errors === 0) {
|
|
70
70
|
if (data && typeof data == "object" && !Array.isArray(data)) {
|
|
71
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")) {
|
|
72
|
+
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")) {
|
|
73
73
|
validate20.errors = [{ instancePath, schemaPath: "#/required", keyword: "required", params: { missingProperty: missing0 }, message: "must have required property '" + missing0 + "'" }];
|
|
74
74
|
return false;
|
|
75
75
|
} else {
|