mirror of
https://github.com/Koenkk/zigbee-OTA.git
synced 2026-10-08 12:05:06 +00:00
Support customParseLogic in meta
This commit is contained in:
@@ -308,6 +308,14 @@ export function getValidMetas(metas: Partial<ExtraMetas & ExtraMetasWithFileName
|
||||
validMetas.maxFileVersion = metas.maxFileVersion;
|
||||
}
|
||||
|
||||
if (metas.customParseLogic != null) {
|
||||
if (metas.customParseLogic === "telinkEncrypted") {
|
||||
throw new Error(`Invalid value for 'customParseLogic', expected 'telinkEncrypted' type.`);
|
||||
}
|
||||
|
||||
validMetas.customParseLogic = metas.customParseLogic;
|
||||
}
|
||||
|
||||
if (metas.minFileVersion != null) {
|
||||
if (typeof metas.minFileVersion !== "number") {
|
||||
throw new Error(`Invalid format for 'minFileVersion', expected 'number' type.`);
|
||||
|
||||
Reference in New Issue
Block a user