mirror of
https://github.com/Koenkk/zigbee-OTA.git
synced 2026-08-31 18:16:05 +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.`);
|
||||
|
||||
@@ -61,6 +61,7 @@ export interface RepoImageMeta extends ImageInfo, ImageMeta {
|
||||
maxFileVersion?: number;
|
||||
originalUrl?: string;
|
||||
releaseNotes?: string;
|
||||
customParseLogic?: string;
|
||||
}
|
||||
|
||||
export type ExtraMetas = Omit<
|
||||
|
||||
Reference in New Issue
Block a user