mirror of
https://github.com/Koenkk/zigbee-OTA.git
synced 2026-06-24 11:16:34 +00:00
fix: dedupe by manufacturer (#984)
This commit is contained in:
@@ -1 +1 @@
|
|||||||
{"updates":[{"createdAt":"2024-10-02T07:03:19.229Z","updatedAt":"2025-06-30T12:51:52.972Z","fileSize":446260,"md5":"d73eeb002f5539b6c441e375f269ca96","binaryUrl":"https://firmware.meethue.com/storage/100b-11f/16786434/15fd8c5a-88fd-4d14-83cb-6ec08239cdfd/100B-011F-01002402-ConfLightBLE-ModuLumV3-EFR32MG21.zigbee","version":16786434,"versionName":"36.2","releaseNotes":""},{"createdAt":"2025-09-12T14:31:03.290Z","updatedAt":"2025-09-12T14:31:03.326Z","fileSize":448166,"md5":"9226406429ef79c1ba89638a9211fe3f","binaryUrl":"https://firmware.meethue.com/storage/100b-11f/16786948/2156b806-4611-4193-b61f-7e25f1f9754d/100B-011F-01002604-ConfLightBLE-ModuLumV3-EFR32MG21.zigbee","version":16786948,"versionName":"38.4","releaseNotes":""}]}
|
{"updates":[{"createdAt":"2025-10-06T07:16:08.719Z","updatedAt":"2025-10-06T07:16:42.475Z","fileSize":447238,"md5":"8820a470f80c7797270733b23128d1ec","binaryUrl":"https://firmware.meethue.com/storage/100b-11f/16786436/b5545252-8519-40eb-a15b-fd7cdc5c72eb/100B-011F-01002404-ConfLightBLE-ModuLumV3-EFR32MG21.zigbee","version":16786436,"versionName":"36.4","releaseNotes":""},{"createdAt":"2025-09-12T14:31:03.290Z","updatedAt":"2025-09-12T14:31:03.326Z","fileSize":448166,"md5":"9226406429ef79c1ba89638a9211fe3f","binaryUrl":"https://firmware.meethue.com/storage/100b-11f/16786948/2156b806-4611-4193-b61f-7e25f1f9754d/100B-011F-01002604-ConfLightBLE-ModuLumV3-EFR32MG21.zigbee","version":16786948,"versionName":"38.4","releaseNotes":""}]}
|
||||||
1
.cache/Hue_100b-128.json
Normal file
1
.cache/Hue_100b-128.json
Normal file
@@ -0,0 +1 @@
|
|||||||
|
{"updates":[{"createdAt":"2025-09-29T13:56:07.368Z","updatedAt":"2025-09-29T13:56:07.404Z","fileSize":933786,"md5":"a9a0991e659256ba4b0dde54be7202dc","binaryUrl":"https://firmware.meethue.com/storage/100b-128/16780034/774857fa-f2d3-4d94-8ee0-ff32fb671857/100B-0128-01000B02-Chime-EFR32MG21.zigbee","version":16780034,"versionName":"11.2","releaseNotes":""}]}
|
||||||
1
.cache/Hue_100b-12a.json
Normal file
1
.cache/Hue_100b-12a.json
Normal file
@@ -0,0 +1 @@
|
|||||||
|
{"updates":[{"createdAt":"2025-11-24T08:47:06.046Z","updatedAt":"2025-11-24T08:47:06.083Z","fileSize":1062460,"md5":"848d79016af600f51630e2ffe718fe25","binaryUrl":"https://firmware.meethue.com/storage/100b-12a/16779008/229a7fd1-9d41-459a-bba8-807cae8ae333/100B-012A-01000700-Light-SiMG301.zigbee","version":16779008,"versionName":"7.0","releaseNotes":""}]}
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"$schema": "https://biomejs.dev/schemas/2.1.3/schema.json",
|
"$schema": "https://biomejs.dev/schemas/2.3.10/schema.json",
|
||||||
"vcs": {
|
"vcs": {
|
||||||
"enabled": true,
|
"enabled": true,
|
||||||
"clientKind": "git",
|
"clientKind": "git",
|
||||||
@@ -33,8 +33,8 @@
|
|||||||
"noExportsInTest": "off"
|
"noExportsInTest": "off"
|
||||||
},
|
},
|
||||||
"style": {
|
"style": {
|
||||||
"noNonNullAssertion": "warn",
|
"noNonNullAssertion": "off",
|
||||||
"noParameterAssign": "warn",
|
"noParameterAssign": "off",
|
||||||
"useNamingConvention": {
|
"useNamingConvention": {
|
||||||
"level": "error",
|
"level": "error",
|
||||||
"options": {
|
"options": {
|
||||||
|
|||||||
Binary file not shown.
BIN
images/Hue/100B-0128-01000B02-Chime-EFR32MG21.zigbee
Normal file
BIN
images/Hue/100B-0128-01000B02-Chime-EFR32MG21.zigbee
Normal file
Binary file not shown.
Binary file not shown.
BIN
images/Hue/100B-012A-01000700-Light-SiMG301.zigbee
Normal file
BIN
images/Hue/100B-012A-01000700-Light-SiMG301.zigbee
Normal file
Binary file not shown.
1695
index.json
1695
index.json
File diff suppressed because it is too large
Load Diff
305
index1.json
305
index1.json
@@ -1,16 +1,4 @@
|
|||||||
[
|
[
|
||||||
{
|
|
||||||
"fileName": "100B-0111-01001A00-ConfLight-ModuLum-EFR32MG13.zigbee",
|
|
||||||
"fileVersion": 16783872,
|
|
||||||
"fileSize": 477412,
|
|
||||||
"url": "https://raw.githubusercontent.com/Koenkk/zigbee-OTA/master/images1/Hue/100B-0111-01001A00-ConfLight-ModuLum-EFR32MG13.zigbee",
|
|
||||||
"imageType": 273,
|
|
||||||
"manufacturerCode": 4107,
|
|
||||||
"sha512": "06c95d8ebf5814909fe95e1de31309a708f1018674eee7f844569abf99befa88cd352d7e8c3a7b001e488732e2246ca34ba69f1f507ac32bcf2df1d64eeef8ba",
|
|
||||||
"otaHeaderString": "",
|
|
||||||
"originalUrl": "https://firmware.meethue.com/storage/100b-111/16783872/3f5056e2-e060-4cc4-8f29-28056efc5e6b/100B-0111-01001A00-ConfLight-ModuLum-EFR32MG13.zigbee",
|
|
||||||
"releaseNotes": "Various improvements"
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"fileName": "GL-C-008P_V17A1_OTAV7_20210303--V1-4.ota",
|
"fileName": "GL-C-008P_V17A1_OTAV7_20210303--V1-4.ota",
|
||||||
"fileVersion": 7,
|
"fileVersion": 7,
|
||||||
@@ -33,39 +21,6 @@
|
|||||||
"otaHeaderString": "OM15082-WIN-JN5180--ENCRYPTED000",
|
"otaHeaderString": "OM15082-WIN-JN5180--ENCRYPTED000",
|
||||||
"modelId": "lumi.sensor_smoke.acn03"
|
"modelId": "lumi.sensor_smoke.acn03"
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"fileName": "100B-0121-02003B19-Switch-EFR32MG22-40xf.zigbee",
|
|
||||||
"fileVersion": 33569561,
|
|
||||||
"fileSize": 185770,
|
|
||||||
"url": "https://raw.githubusercontent.com/Koenkk/zigbee-OTA/master/images1/Hue/100B-0121-02003B19-Switch-EFR32MG22-40xf.zigbee",
|
|
||||||
"imageType": 289,
|
|
||||||
"manufacturerCode": 4107,
|
|
||||||
"sha512": "b117d19666222b0b1962585f1e47e525c643d3d784fa3a59c0299cd1533a3799a1c72553c7964708879fe0131d4c5cb9fcc5af681d8059d18e6f47b942a5e4fb",
|
|
||||||
"otaHeaderString": "",
|
|
||||||
"originalUrl": "https://otau.meethue.com/storage/ZGB_100B_0121/f28229fd-c450-4d0c-ada4-21f855674e06/100B-0121-02003B19-Switch-EFR32MG22-40xf.zigbee"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"fileName": "Sensor-ATmega_6.1.1.27575_0012.sbl-ota",
|
|
||||||
"fileVersion": 1107323831,
|
|
||||||
"fileSize": 240760,
|
|
||||||
"url": "https://raw.githubusercontent.com/Koenkk/zigbee-OTA/master/images1/Hue/Sensor-ATmega_6.1.1.27575_0012.sbl-ota",
|
|
||||||
"imageType": 269,
|
|
||||||
"manufacturerCode": 4107,
|
|
||||||
"sha512": "10e549c55d262b2f227b75817f6620be407f537e04ac08db4dbebdf53e8d460299a2cda248b3be13476757d61a1c79b632963c4f126cd26b7c18ea6a2ab4ac59",
|
|
||||||
"otaHeaderString": "",
|
|
||||||
"originalUrl": "https://otau.meethue.com/storage/ZGB_100B_010D/bd3f218f-190b-4498-b6b3-69aea563fd9d/Sensor-ATmega_6.1.1.27575_0012.sbl-ota"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"fileName": "Switch-ATmega_6.1.1.28573_0012.sbl-ota",
|
|
||||||
"fileVersion": 1107324829,
|
|
||||||
"fileSize": 240760,
|
|
||||||
"url": "https://raw.githubusercontent.com/Koenkk/zigbee-OTA/master/images1/Hue/Switch-ATmega_6.1.1.28573_0012.sbl-ota",
|
|
||||||
"imageType": 265,
|
|
||||||
"manufacturerCode": 4107,
|
|
||||||
"sha512": "d20057d6c4e61d4ccdd3947b8a8c9bf9e126a26c080b9ce3e6839a0615b912c6f93246a60c55a44f2c8b8ec49f5041f46ac38b8a3c0a1c6ab44f062cc62089cf",
|
|
||||||
"otaHeaderString": "",
|
|
||||||
"originalUrl": "https://otau.meethue.com/storage/ZGB_100B_0109/0e1147ca-9b7e-4de1-b282-8b81c3c8e030/Switch-ATmega_6.1.1.28573_0012.sbl-ota"
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"fileName": "10039874-1.0-TRADFRI-motion-sensor-2-2.0.022.ota.ota.signed",
|
"fileName": "10039874-1.0-TRADFRI-motion-sensor-2-2.0.022.ota.ota.signed",
|
||||||
"fileVersion": 537011747,
|
"fileVersion": 537011747,
|
||||||
@@ -1733,39 +1688,6 @@
|
|||||||
"modelId": "RBSH-TRV0-ZB-EU",
|
"modelId": "RBSH-TRV0-ZB-EU",
|
||||||
"releaseNotes": "1. A fault has been resolved that caused the radiator thermostat to sometimes enter an endless loop during auto-calibration"
|
"releaseNotes": "1. A fault has been resolved that caused the radiator thermostat to sometimes enter an endless loop during auto-calibration"
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"fileName": "100B-0120-01002402-ConfLightBLE-PortableV3-EFR32MG21.zigbee",
|
|
||||||
"fileVersion": 16786434,
|
|
||||||
"fileSize": 400336,
|
|
||||||
"url": "https://raw.githubusercontent.com/Koenkk/zigbee-OTA/master/images1/Hue/100B-0120-01002402-ConfLightBLE-PortableV3-EFR32MG21.zigbee",
|
|
||||||
"imageType": 288,
|
|
||||||
"manufacturerCode": 4107,
|
|
||||||
"sha512": "4c61e5be6488454554dbc62006d63111a121ad864c42827d7dba634630ade6b3098167b92b271a0ff3793223943df4ed2cf08d55dfdc3c56b7a91b552d8a8912",
|
|
||||||
"otaHeaderString": "",
|
|
||||||
"originalUrl": "https://otau.meethue.com/storage/ZGB_100B_0120/ca5124f9-b9b5-4474-ba8d-3f431d713eb7/100B-0120-01002402-ConfLightBLE-PortableV3-EFR32MG21.zigbee"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"fileName": "100B-0123-01000C02-PixelLumXL-EFR32MG21.zigbee",
|
|
||||||
"fileVersion": 16780290,
|
|
||||||
"fileSize": 423298,
|
|
||||||
"url": "https://raw.githubusercontent.com/Koenkk/zigbee-OTA/master/images1/Hue/100B-0123-01000C02-PixelLumXL-EFR32MG21.zigbee",
|
|
||||||
"imageType": 291,
|
|
||||||
"manufacturerCode": 4107,
|
|
||||||
"sha512": "a4317039a4fa26845b743d8ab2aa037b3589b4506e35e9462f1a1475351ab7eee74c3705ea9b1bff92d7f76cb72011a13d92423d65bebfbcc7524b57e0a04e29",
|
|
||||||
"otaHeaderString": "",
|
|
||||||
"originalUrl": "https://otau.meethue.com/storage/ZGB_100B_0123/567ce2cd-671c-4072-8485-2b19d250e9c7/100B-0123-01000C02-PixelLumXL-EFR32MG21.zigbee"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"fileName": "100B-0127-01000D02-MSD-EFR32MG21.zigbee",
|
|
||||||
"fileVersion": 16780546,
|
|
||||||
"fileSize": 477268,
|
|
||||||
"url": "https://raw.githubusercontent.com/Koenkk/zigbee-OTA/master/images1/Hue/100B-0127-01000D02-MSD-EFR32MG21.zigbee",
|
|
||||||
"imageType": 295,
|
|
||||||
"manufacturerCode": 4107,
|
|
||||||
"sha512": "9d7e340b79e0a82e16a7873760762e374be8b96267c4f643aedfdac7f4710bbce66beef51b1d4e353743a09cdbb22474508f419f124aae937d2bdd71cbc780d3",
|
|
||||||
"otaHeaderString": "",
|
|
||||||
"originalUrl": "https://firmware.meethue.com/storage/100b-127/16780546/96200b09-9d10-4272-adeb-b89203fffc41/100B-0127-01000D02-MSD-EFR32MG21.zigbee"
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"fileName": "EntrySensor_4.0.2.zigbee",
|
"fileName": "EntrySensor_4.0.2.zigbee",
|
||||||
"fileVersion": 262146,
|
"fileVersion": 262146,
|
||||||
@@ -1839,111 +1761,6 @@
|
|||||||
"sha512": "3c40fc67cc0fa3e1203fbab939456614f402a4a95670208572d6b3cf948ee4ab978a5431a94f581ae627f8bdaf896eb16d1bff2f72cb226a170b4e4af2b4c9d1",
|
"sha512": "3c40fc67cc0fa3e1203fbab939456614f402a4a95670208572d6b3cf948ee4ab978a5431a94f581ae627f8bdaf896eb16d1bff2f72cb226a170b4e4af2b4c9d1",
|
||||||
"otaHeaderString": "Telink OTA Sample Usage"
|
"otaHeaderString": "Telink OTA Sample Usage"
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"fileName": "100B-0129-01000D06-Light-EFR32MG26.zigbee",
|
|
||||||
"fileVersion": 16780550,
|
|
||||||
"fileSize": 833604,
|
|
||||||
"originalUrl": "https://firmware.meethue.com/storage/100b-129/16780550/d44f751c-9def-4483-aeb9-940f59ed3aa1/100B-0129-01000D06-Light-EFR32MG26.zigbee",
|
|
||||||
"url": "https://raw.githubusercontent.com/Koenkk/zigbee-OTA/master/images1/Hue/100B-0129-01000D06-Light-EFR32MG26.zigbee",
|
|
||||||
"imageType": 297,
|
|
||||||
"manufacturerCode": 4107,
|
|
||||||
"sha512": "c21b60bca9276fb9c1cecfe4b61b91a4cc90ca9a48cd75c93fb2ed8fc33853e81b0f4e618afbc7ba6538b7a868669765698611c3db2430389aa5fae86c28c5d3",
|
|
||||||
"otaHeaderString": ""
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"fileName": "100B-010C-01002800-ConfLight-Lamps_0012.zigbee",
|
|
||||||
"fileVersion": 16787456,
|
|
||||||
"fileSize": 266684,
|
|
||||||
"url": "https://raw.githubusercontent.com/Koenkk/zigbee-OTA/master/images1/Hue/100B-010C-01002800-ConfLight-Lamps_0012.zigbee",
|
|
||||||
"imageType": 268,
|
|
||||||
"manufacturerCode": 4107,
|
|
||||||
"sha512": "30c754504fed42ce12b4243fbf70a8207675f02cba1efbe2e454270049b472e400578c316602978deadb39166b196cb21aaf0f5cbb527fd2491fd78d4a14b620",
|
|
||||||
"otaHeaderString": "",
|
|
||||||
"originalUrl": "https://otau.meethue.com/storage/ZGB_100B_010C/9ee7aed8-faed-43eb-b7f7-712a5b578dba/100B-010C-01002800-ConfLight-Lamps_0012.zigbee",
|
|
||||||
"minFileVersion": 16783874
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"fileName": "100B-010E-01002600-ConfLight-ModuLum_0012.zigbee",
|
|
||||||
"fileVersion": 16786944,
|
|
||||||
"fileSize": 269002,
|
|
||||||
"url": "https://raw.githubusercontent.com/Koenkk/zigbee-OTA/master/images1/Hue/100B-010E-01002600-ConfLight-ModuLum_0012.zigbee",
|
|
||||||
"imageType": 270,
|
|
||||||
"manufacturerCode": 4107,
|
|
||||||
"sha512": "f22b61f43ec9a98991825ba492d5373c1e617d62508fa538ef0ae6b5e51ec3419e2b9b15328770918b06391bf3b0adb18d747251bb615e189c43171abf0b3f07",
|
|
||||||
"otaHeaderString": "",
|
|
||||||
"originalUrl": "https://otau.meethue.com/storage/ZGB_100B_010E/05e4122d-0d51-41df-91af-7d1aae4cc0a0/100B-010E-01002600-ConfLight-ModuLum_0012.zigbee",
|
|
||||||
"minFileVersion": 16783620
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"fileName": "100B-010F-01001700-ConfLight-LedStrips_0012.zigbee",
|
|
||||||
"fileVersion": 16783104,
|
|
||||||
"fileSize": 250762,
|
|
||||||
"url": "https://raw.githubusercontent.com/Koenkk/zigbee-OTA/master/images1/Hue/100B-010F-01001700-ConfLight-LedStrips_0012.zigbee",
|
|
||||||
"imageType": 271,
|
|
||||||
"manufacturerCode": 4107,
|
|
||||||
"sha512": "34a42cd9185602bf76559425d2e4655ec33c2fe3159a09d866cd3425a0d56535ee9a807b86b21a66083fc7578287538c7e1b8e9aebd53923269aedb99b6090f7",
|
|
||||||
"otaHeaderString": "",
|
|
||||||
"originalUrl": "https://otau.meethue.com/storage/ZGB_100B_010F/0ed8b3ac-0870-486e-9f8b-5ba6e9b035a1/100B-010F-01001700-ConfLight-LedStrips_0012.zigbee",
|
|
||||||
"minFileVersion": 16779778
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"fileName": "ConnectedLamp-Atmel-Target_0012.sbl-ota",
|
|
||||||
"fileVersion": 1124103171,
|
|
||||||
"fileSize": 256696,
|
|
||||||
"url": "https://raw.githubusercontent.com/Koenkk/zigbee-OTA/master/images1/Hue/ConnectedLamp-Atmel-Target_0012.sbl-ota",
|
|
||||||
"imageType": 260,
|
|
||||||
"manufacturerCode": 4107,
|
|
||||||
"sha512": "eb9e81b28ea8128831c0f656e65be2821b6d06207bd44adbc31b050ed41e3656edc10e1c0a27cf73a2817c257208f9002c3e219913903ecdaacf7857f799b001",
|
|
||||||
"otaHeaderString": "",
|
|
||||||
"originalUrl": "https://otau.meethue.com/storage/ZGB_100B_0104/33cbfd3d-3b58-43e2-a6a0-1e6fe50f2bee/ConnectedLamp-Atmel-Target_0012.sbl-ota",
|
|
||||||
"minFileVersion": 1107326256
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"fileName": "ConnectedLamp-TI-Target_0012.sbl-ota",
|
|
||||||
"fileVersion": 1124103171,
|
|
||||||
"fileSize": 258104,
|
|
||||||
"url": "https://raw.githubusercontent.com/Koenkk/zigbee-OTA/master/images1/Hue/ConnectedLamp-TI-Target_0012.sbl-ota",
|
|
||||||
"imageType": 256,
|
|
||||||
"manufacturerCode": 4107,
|
|
||||||
"sha512": "c63a1eb02ac030f3a76d9e81a4d48695796457d263bb1dae483688134e550d9846c37a3fd0eab2d4670f12f11b79691a5cf2789af0dbd90d703512496190a0a5",
|
|
||||||
"otaHeaderString": "",
|
|
||||||
"originalUrl": "https://otau.meethue.com/storage/ZGB_100B_0100/2dcfe6e6-0177-4c81-a1d9-4d2bd2ea1fb7/ConnectedLamp-TI-Target_0012.sbl-ota"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"fileName": "LivingColors-Hue-Target_0012.sbl-ota",
|
|
||||||
"fileVersion": 1124103171,
|
|
||||||
"fileSize": 258104,
|
|
||||||
"url": "https://raw.githubusercontent.com/Koenkk/zigbee-OTA/master/images1/Hue/LivingColors-Hue-Target_0012.sbl-ota",
|
|
||||||
"imageType": 259,
|
|
||||||
"manufacturerCode": 4107,
|
|
||||||
"sha512": "f1c9b5f0cc779bcf01fb1f7e5bffc0112aa82e60972dad9264f87484a571d13710572c2f5fedf1dd2b5deb62fa45d4c0e41d107e2fd2fb544fb5a9235d21ee3a",
|
|
||||||
"otaHeaderString": "",
|
|
||||||
"originalUrl": "https://otau.meethue.com/storage/ZGB_100B_0103/e14480ff-2661-4abb-8dfd-275b77d876c2/LivingColors-Hue-Target_0012.sbl-ota"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"fileName": "ModuLum-ATmega_0012.sbl-ota",
|
|
||||||
"fileVersion": 1124103171,
|
|
||||||
"fileSize": 256696,
|
|
||||||
"url": "https://raw.githubusercontent.com/Koenkk/zigbee-OTA/master/images1/Hue/ModuLum-ATmega_0012.sbl-ota",
|
|
||||||
"imageType": 267,
|
|
||||||
"manufacturerCode": 4107,
|
|
||||||
"sha512": "9c5b28be12dd8299774f0d0515131156ee9882f683537553fcf878198b4da198270c79a5dab0cfb81b80e35db055dff850835da4e069d27a7e8eb2de0d461d1b",
|
|
||||||
"otaHeaderString": "",
|
|
||||||
"originalUrl": "https://otau.meethue.com/storage/ZGB_100B_010B/1cfec25a-f2f5-4e84-a80f-96548a95d6c3/ModuLum-ATmega_0012.sbl-ota",
|
|
||||||
"minFileVersion": 1107326256
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"fileName": "WhiteLamp-Atmel-Target_0012.sbl-ota",
|
|
||||||
"fileVersion": 1124103171,
|
|
||||||
"fileSize": 256696,
|
|
||||||
"url": "https://raw.githubusercontent.com/Koenkk/zigbee-OTA/master/images1/Hue/WhiteLamp-Atmel-Target_0012.sbl-ota",
|
|
||||||
"imageType": 261,
|
|
||||||
"manufacturerCode": 4107,
|
|
||||||
"sha512": "aacf086c482e149e916a12a344d0d2a2b1489e47f5d4d5ef9d9ebb308b976c5d8d266a19792a53ee64a108d8f39b56c800815191d4454311124fe85fe32392a2",
|
|
||||||
"otaHeaderString": "",
|
|
||||||
"originalUrl": "https://otau.meethue.com/storage/ZGB_100B_0105/a74b4fe6-805b-4113-8f08-2f6585cb8f5d/WhiteLamp-Atmel-Target_0012.sbl-ota",
|
|
||||||
"minFileVersion": 1107326256
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"fileName": "PSoC4_1246-0100-01280128.0002_(4CA01CD1).ota",
|
"fileName": "PSoC4_1246-0100-01280128.0002_(4CA01CD1).ota",
|
||||||
"fileVersion": 284,
|
"fileVersion": 284,
|
||||||
@@ -3029,17 +2846,6 @@
|
|||||||
"sha512": "5aa0a6156c8fe672b0fdfcc6e97bb21244cc5497ca86b75c2d371db85c0712334f88886a0903723f9230c21c6f3ee3a19a0e6ebdcdfc2ac5390fd4c8830be402",
|
"sha512": "5aa0a6156c8fe672b0fdfcc6e97bb21244cc5497ca86b75c2d371db85c0712334f88886a0903723f9230c21c6f3ee3a19a0e6ebdcdfc2ac5390fd4c8830be402",
|
||||||
"otaHeaderString": "<22>w}6@`>@\u0013p@\u0001<30>6@<40>\u0015@ <20>@<40><>"
|
"otaHeaderString": "<22>w}6@`>@\u0013p@\u0001<30>6@<40>\u0015@ <20>@<40><>"
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"fileName": "100B-0118-01001A02-PixelLum-EFR32MG21.zigbee",
|
|
||||||
"fileVersion": 16783874,
|
|
||||||
"fileSize": 461188,
|
|
||||||
"originalUrl": "https://otau.meethue.com/storage/ZGB_100B_0118/c2cb7044-da81-4fd0-b9e8-de64070e793c/100B-0118-01001A02-PixelLum-EFR32MG21.zigbee",
|
|
||||||
"url": "https://raw.githubusercontent.com/Koenkk/zigbee-OTA/master/images1/Hue/100B-0118-01001A02-PixelLum-EFR32MG21.zigbee",
|
|
||||||
"imageType": 280,
|
|
||||||
"manufacturerCode": 4107,
|
|
||||||
"sha512": "916714904a78a01074593aa8438ce7cfbe59a1166f3b0c87d72dc8dfcae5f7e0b57370effd6e5bc897f1a7d8d7b45a48fde68f4c22b7c8404077347f62e3a9d8",
|
|
||||||
"otaHeaderString": ""
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"fileName": "6565-0215-10053001-ts0201_tz3000_zed.zigbee",
|
"fileName": "6565-0215-10053001-ts0201_tz3000_zed.zigbee",
|
||||||
"fileVersion": 268775425,
|
"fileVersion": 268775425,
|
||||||
@@ -3052,5 +2858,116 @@
|
|||||||
"manufacturerName": [
|
"manufacturerName": [
|
||||||
"Slacky-DIY"
|
"Slacky-DIY"
|
||||||
]
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fileName": "100B-0111-01001A00-ConfLight-ModuLum-EFR32MG13.zigbee",
|
||||||
|
"fileVersion": 16783872,
|
||||||
|
"fileSize": 477412,
|
||||||
|
"url": "https://raw.githubusercontent.com/Koenkk/zigbee-OTA/master/images1/Hue/100B-0111-01001A00-ConfLight-ModuLum-EFR32MG13.zigbee",
|
||||||
|
"imageType": 273,
|
||||||
|
"manufacturerCode": 4107,
|
||||||
|
"sha512": "06c95d8ebf5814909fe95e1de31309a708f1018674eee7f844569abf99befa88cd352d7e8c3a7b001e488732e2246ca34ba69f1f507ac32bcf2df1d64eeef8ba",
|
||||||
|
"otaHeaderString": "",
|
||||||
|
"originalUrl": "https://firmware.meethue.com/storage/100b-111/16783872/3f5056e2-e060-4cc4-8f29-28056efc5e6b/100B-0111-01001A00-ConfLight-ModuLum-EFR32MG13.zigbee",
|
||||||
|
"releaseNotes": "Various improvements"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fileName": "100B-0121-02003B19-Switch-EFR32MG22-40xf.zigbee",
|
||||||
|
"fileVersion": 33569561,
|
||||||
|
"fileSize": 185770,
|
||||||
|
"url": "https://raw.githubusercontent.com/Koenkk/zigbee-OTA/master/images1/Hue/100B-0121-02003B19-Switch-EFR32MG22-40xf.zigbee",
|
||||||
|
"imageType": 289,
|
||||||
|
"manufacturerCode": 4107,
|
||||||
|
"sha512": "b117d19666222b0b1962585f1e47e525c643d3d784fa3a59c0299cd1533a3799a1c72553c7964708879fe0131d4c5cb9fcc5af681d8059d18e6f47b942a5e4fb",
|
||||||
|
"otaHeaderString": "",
|
||||||
|
"originalUrl": "https://otau.meethue.com/storage/ZGB_100B_0121/f28229fd-c450-4d0c-ada4-21f855674e06/100B-0121-02003B19-Switch-EFR32MG22-40xf.zigbee"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fileName": "Sensor-ATmega_6.1.1.27575_0012.sbl-ota",
|
||||||
|
"fileVersion": 1107323831,
|
||||||
|
"fileSize": 240760,
|
||||||
|
"url": "https://raw.githubusercontent.com/Koenkk/zigbee-OTA/master/images1/Hue/Sensor-ATmega_6.1.1.27575_0012.sbl-ota",
|
||||||
|
"imageType": 269,
|
||||||
|
"manufacturerCode": 4107,
|
||||||
|
"sha512": "10e549c55d262b2f227b75817f6620be407f537e04ac08db4dbebdf53e8d460299a2cda248b3be13476757d61a1c79b632963c4f126cd26b7c18ea6a2ab4ac59",
|
||||||
|
"otaHeaderString": "",
|
||||||
|
"originalUrl": "https://otau.meethue.com/storage/ZGB_100B_010D/bd3f218f-190b-4498-b6b3-69aea563fd9d/Sensor-ATmega_6.1.1.27575_0012.sbl-ota"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fileName": "Switch-ATmega_6.1.1.28573_0012.sbl-ota",
|
||||||
|
"fileVersion": 1107324829,
|
||||||
|
"fileSize": 240760,
|
||||||
|
"url": "https://raw.githubusercontent.com/Koenkk/zigbee-OTA/master/images1/Hue/Switch-ATmega_6.1.1.28573_0012.sbl-ota",
|
||||||
|
"imageType": 265,
|
||||||
|
"manufacturerCode": 4107,
|
||||||
|
"sha512": "d20057d6c4e61d4ccdd3947b8a8c9bf9e126a26c080b9ce3e6839a0615b912c6f93246a60c55a44f2c8b8ec49f5041f46ac38b8a3c0a1c6ab44f062cc62089cf",
|
||||||
|
"otaHeaderString": "",
|
||||||
|
"originalUrl": "https://otau.meethue.com/storage/ZGB_100B_0109/0e1147ca-9b7e-4de1-b282-8b81c3c8e030/Switch-ATmega_6.1.1.28573_0012.sbl-ota"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fileName": "100B-0120-01002402-ConfLightBLE-PortableV3-EFR32MG21.zigbee",
|
||||||
|
"fileVersion": 16786434,
|
||||||
|
"fileSize": 400336,
|
||||||
|
"url": "https://raw.githubusercontent.com/Koenkk/zigbee-OTA/master/images1/Hue/100B-0120-01002402-ConfLightBLE-PortableV3-EFR32MG21.zigbee",
|
||||||
|
"imageType": 288,
|
||||||
|
"manufacturerCode": 4107,
|
||||||
|
"sha512": "4c61e5be6488454554dbc62006d63111a121ad864c42827d7dba634630ade6b3098167b92b271a0ff3793223943df4ed2cf08d55dfdc3c56b7a91b552d8a8912",
|
||||||
|
"otaHeaderString": "",
|
||||||
|
"originalUrl": "https://otau.meethue.com/storage/ZGB_100B_0120/ca5124f9-b9b5-4474-ba8d-3f431d713eb7/100B-0120-01002402-ConfLightBLE-PortableV3-EFR32MG21.zigbee"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fileName": "100B-0123-01000C02-PixelLumXL-EFR32MG21.zigbee",
|
||||||
|
"fileVersion": 16780290,
|
||||||
|
"fileSize": 423298,
|
||||||
|
"url": "https://raw.githubusercontent.com/Koenkk/zigbee-OTA/master/images1/Hue/100B-0123-01000C02-PixelLumXL-EFR32MG21.zigbee",
|
||||||
|
"imageType": 291,
|
||||||
|
"manufacturerCode": 4107,
|
||||||
|
"sha512": "a4317039a4fa26845b743d8ab2aa037b3589b4506e35e9462f1a1475351ab7eee74c3705ea9b1bff92d7f76cb72011a13d92423d65bebfbcc7524b57e0a04e29",
|
||||||
|
"otaHeaderString": "",
|
||||||
|
"originalUrl": "https://otau.meethue.com/storage/ZGB_100B_0123/567ce2cd-671c-4072-8485-2b19d250e9c7/100B-0123-01000C02-PixelLumXL-EFR32MG21.zigbee"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fileName": "100B-0127-01000D02-MSD-EFR32MG21.zigbee",
|
||||||
|
"fileVersion": 16780546,
|
||||||
|
"fileSize": 477268,
|
||||||
|
"url": "https://raw.githubusercontent.com/Koenkk/zigbee-OTA/master/images1/Hue/100B-0127-01000D02-MSD-EFR32MG21.zigbee",
|
||||||
|
"imageType": 295,
|
||||||
|
"manufacturerCode": 4107,
|
||||||
|
"sha512": "9d7e340b79e0a82e16a7873760762e374be8b96267c4f643aedfdac7f4710bbce66beef51b1d4e353743a09cdbb22474508f419f124aae937d2bdd71cbc780d3",
|
||||||
|
"otaHeaderString": "",
|
||||||
|
"originalUrl": "https://firmware.meethue.com/storage/100b-127/16780546/96200b09-9d10-4272-adeb-b89203fffc41/100B-0127-01000D02-MSD-EFR32MG21.zigbee"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fileName": "ConnectedLamp-TI-Target_0012.sbl-ota",
|
||||||
|
"fileVersion": 1124103171,
|
||||||
|
"fileSize": 258104,
|
||||||
|
"url": "https://raw.githubusercontent.com/Koenkk/zigbee-OTA/master/images1/Hue/ConnectedLamp-TI-Target_0012.sbl-ota",
|
||||||
|
"imageType": 256,
|
||||||
|
"manufacturerCode": 4107,
|
||||||
|
"sha512": "c63a1eb02ac030f3a76d9e81a4d48695796457d263bb1dae483688134e550d9846c37a3fd0eab2d4670f12f11b79691a5cf2789af0dbd90d703512496190a0a5",
|
||||||
|
"otaHeaderString": "",
|
||||||
|
"originalUrl": "https://otau.meethue.com/storage/ZGB_100B_0100/2dcfe6e6-0177-4c81-a1d9-4d2bd2ea1fb7/ConnectedLamp-TI-Target_0012.sbl-ota"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fileName": "LivingColors-Hue-Target_0012.sbl-ota",
|
||||||
|
"fileVersion": 1124103171,
|
||||||
|
"fileSize": 258104,
|
||||||
|
"url": "https://raw.githubusercontent.com/Koenkk/zigbee-OTA/master/images1/Hue/LivingColors-Hue-Target_0012.sbl-ota",
|
||||||
|
"imageType": 259,
|
||||||
|
"manufacturerCode": 4107,
|
||||||
|
"sha512": "f1c9b5f0cc779bcf01fb1f7e5bffc0112aa82e60972dad9264f87484a571d13710572c2f5fedf1dd2b5deb62fa45d4c0e41d107e2fd2fb544fb5a9235d21ee3a",
|
||||||
|
"otaHeaderString": "",
|
||||||
|
"originalUrl": "https://otau.meethue.com/storage/ZGB_100B_0103/e14480ff-2661-4abb-8dfd-275b77d876c2/LivingColors-Hue-Target_0012.sbl-ota"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fileName": "100B-0118-01001A02-PixelLum-EFR32MG21.zigbee",
|
||||||
|
"fileVersion": 16783874,
|
||||||
|
"fileSize": 461188,
|
||||||
|
"originalUrl": "https://otau.meethue.com/storage/ZGB_100B_0118/c2cb7044-da81-4fd0-b9e8-de64070e793c/100B-0118-01001A02-PixelLum-EFR32MG21.zigbee",
|
||||||
|
"url": "https://raw.githubusercontent.com/Koenkk/zigbee-OTA/master/images1/Hue/100B-0118-01001A02-PixelLum-EFR32MG21.zigbee",
|
||||||
|
"imageType": 280,
|
||||||
|
"manufacturerCode": 4107,
|
||||||
|
"sha512": "916714904a78a01074593aa8438ce7cfbe59a1166f3b0c87d72dc8dfcae5f7e0b57370effd6e5bc897f1a7d8d7b45a48fde68f4c22b7c8404077347f62e3a9d8",
|
||||||
|
"otaHeaderString": ""
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
@@ -16,6 +16,7 @@
|
|||||||
"clean": "rm -rf dist coverage *.tsbuildinfo",
|
"clean": "rm -rf dist coverage *.tsbuildinfo",
|
||||||
"start": "node ./dist/index.js",
|
"start": "node ./dist/index.js",
|
||||||
"check": "biome check",
|
"check": "biome check",
|
||||||
|
"check:w": "biome check --write",
|
||||||
"test": "vitest run --config ./tests/vitest.config.mts",
|
"test": "vitest run --config ./tests/vitest.config.mts",
|
||||||
"test:coverage": "vitest run --config ./tests/vitest.config.mts --coverage",
|
"test:coverage": "vitest run --config ./tests/vitest.config.mts --coverage",
|
||||||
"test:watch": "vitest watch --config ./tests/vitest.config.mts"
|
"test:watch": "vitest watch --config ./tests/vitest.config.mts"
|
||||||
|
|||||||
@@ -39,9 +39,9 @@ const DEVICE_TYPE_IDS: string[] = [
|
|||||||
"100b-125",
|
"100b-125",
|
||||||
// '100b-126',
|
// '100b-126',
|
||||||
"100b-127",
|
"100b-127",
|
||||||
// '100b-128',
|
"100b-128",
|
||||||
"100b-129",
|
"100b-129",
|
||||||
// '100b-12a',
|
"100b-12a",
|
||||||
// '100b-12b',
|
// '100b-12b',
|
||||||
// '100b-12c',
|
// '100b-12c',
|
||||||
// '100b-12d',
|
// '100b-12d',
|
||||||
@@ -92,14 +92,21 @@ export async function download(): Promise<void> {
|
|||||||
|
|
||||||
writeCacheJson(cacheFileName, page);
|
writeCacheJson(cacheFileName, page);
|
||||||
|
|
||||||
const image = getLatestImage(page.updates, sortByVersion);
|
page.updates.sort(sortByVersion);
|
||||||
|
|
||||||
if (!image) {
|
let previousImage: (typeof page.updates)[number] | undefined;
|
||||||
continue;
|
|
||||||
|
for (const image of page.updates) {
|
||||||
|
const firmwareFileName = image.binaryUrl.split("/").pop()!;
|
||||||
|
|
||||||
|
await processFirmwareImage(NAME, firmwareFileName, image.binaryUrl, {
|
||||||
|
releaseNotes: image.versionName
|
||||||
|
? `Version: ${image.versionName}${image.releaseNotes ? ` | ${image.releaseNotes}` : ""}`
|
||||||
|
: image.releaseNotes || undefined,
|
||||||
|
minFileVersion: previousImage?.version,
|
||||||
|
});
|
||||||
|
|
||||||
|
previousImage = image;
|
||||||
}
|
}
|
||||||
|
|
||||||
const firmwareFileName = image.binaryUrl.split("/").pop()!;
|
|
||||||
|
|
||||||
await processFirmwareImage(NAME, firmwareFileName, image.binaryUrl, {releaseNotes: image.releaseNotes || undefined});
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -16,9 +16,9 @@ type GatewayImageJson = {
|
|||||||
};
|
};
|
||||||
type DeviceImageJson = {
|
type DeviceImageJson = {
|
||||||
fw_binary_url: string;
|
fw_binary_url: string;
|
||||||
// biome-ignore lint/style/useNamingConvention: <explanation>
|
// biome-ignore lint/style/useNamingConvention: API
|
||||||
fw_file_version_LSB: number;
|
fw_file_version_LSB: number;
|
||||||
// biome-ignore lint/style/useNamingConvention: <explanation>
|
// biome-ignore lint/style/useNamingConvention: API
|
||||||
fw_file_version_MSB: number;
|
fw_file_version_MSB: number;
|
||||||
fw_filesize: number;
|
fw_filesize: number;
|
||||||
fw_image_type: number;
|
fw_image_type: number;
|
||||||
|
|||||||
@@ -156,7 +156,7 @@ export function findMatchImage(
|
|||||||
extraMetas.hardwareVersionMin === i.hardwareVersionMin &&
|
extraMetas.hardwareVersionMin === i.hardwareVersionMin &&
|
||||||
extraMetas.hardwareVersionMax === i.hardwareVersionMax &&
|
extraMetas.hardwareVersionMax === i.hardwareVersionMax &&
|
||||||
i.modelId === extraMetas.modelId &&
|
i.modelId === extraMetas.modelId &&
|
||||||
(!i.manufacturerName || (extraMetas.manufacturerName && primitivesArrayEquals(i.manufacturerName, extraMetas.manufacturerName))),
|
(!i.manufacturerName || extraMetas.manufacturerName?.some((v) => i.manufacturerName!.includes(v))),
|
||||||
);
|
);
|
||||||
|
|
||||||
return [imageIndex, imageIndex === -1 ? undefined : imageList[imageIndex]];
|
return [imageIndex, imageIndex === -1 ? undefined : imageList[imageIndex]];
|
||||||
@@ -198,6 +198,21 @@ export function getLatestImage<T>(list: T[] | undefined, compareFn: (a: T, b: T)
|
|||||||
return sortedList.slice(0, sortedList.length > 1 && process.env.PREV ? -1 : undefined).pop();
|
return sortedList.slice(0, sortedList.length > 1 && process.env.PREV ? -1 : undefined).pop();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** Check if has image in same base path (manufacturer), either by SHA or by spec matching */
|
||||||
|
export function hasManufacturerImage(list: RepoImageMeta[], image: RepoImageMeta, extraManufacturerName: string[] | undefined): boolean {
|
||||||
|
const imageBasePath = path.posix.dirname(image.url);
|
||||||
|
|
||||||
|
return list.some(
|
||||||
|
(i) =>
|
||||||
|
path.posix.dirname(i.url) === imageBasePath &&
|
||||||
|
(i.sha512 === image.sha512 ||
|
||||||
|
(i.fileVersion === image.fileVersion &&
|
||||||
|
i.imageType === image.imageType &&
|
||||||
|
i.manufacturerCode === image.manufacturerCode &&
|
||||||
|
(!i.manufacturerName || extraManufacturerName?.some((v) => i.manufacturerName!.includes(v))))),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
export enum ParsedImageStatus {
|
export enum ParsedImageStatus {
|
||||||
New = 0,
|
New = 0,
|
||||||
Newer = 1,
|
Newer = 1,
|
||||||
@@ -337,6 +352,23 @@ export function addImageToPrev(
|
|||||||
): void {
|
): void {
|
||||||
console.log(`${logPrefix} Base manifest has higher version. Adding to prev instead.`);
|
console.log(`${logPrefix} Base manifest has higher version. Adding to prev instead.`);
|
||||||
|
|
||||||
|
const newMetas: RepoImageMeta = {
|
||||||
|
fileName: firmwareFileName,
|
||||||
|
fileVersion: parsedImage.fileVersion,
|
||||||
|
fileSize: parsedImage.totalImageSize,
|
||||||
|
originalUrl,
|
||||||
|
url: getRepoFirmwareFileUrl(manufacturer, firmwareFileName, PREV_IMAGES_DIR),
|
||||||
|
imageType: parsedImage.imageType,
|
||||||
|
manufacturerCode: parsedImage.manufacturerCode,
|
||||||
|
sha512: computeSHA512(firmwareBuffer),
|
||||||
|
otaHeaderString: parsedImage.otaHeaderString.replaceAll("\u0000", ""),
|
||||||
|
...extraMetas,
|
||||||
|
};
|
||||||
|
|
||||||
|
if (hasManufacturerImage(prevManifest, newMetas, extraMetas.manufacturerName)) {
|
||||||
|
throw new Error("Image already present for manufacturer");
|
||||||
|
}
|
||||||
|
|
||||||
if (isNewer) {
|
if (isNewer) {
|
||||||
console.log(`${logPrefix} Removing prev image.`);
|
console.log(`${logPrefix} Removing prev image.`);
|
||||||
prevManifest.splice(prevMatchIndex, 1);
|
prevManifest.splice(prevMatchIndex, 1);
|
||||||
@@ -348,18 +380,7 @@ export function addImageToPrev(
|
|||||||
}
|
}
|
||||||
|
|
||||||
onBeforeManifestPush();
|
onBeforeManifestPush();
|
||||||
prevManifest.push({
|
prevManifest.push(newMetas);
|
||||||
fileName: firmwareFileName,
|
|
||||||
fileVersion: parsedImage.fileVersion,
|
|
||||||
fileSize: parsedImage.totalImageSize,
|
|
||||||
originalUrl,
|
|
||||||
url: getRepoFirmwareFileUrl(manufacturer, firmwareFileName, PREV_IMAGES_DIR),
|
|
||||||
imageType: parsedImage.imageType,
|
|
||||||
manufacturerCode: parsedImage.manufacturerCode,
|
|
||||||
sha512: computeSHA512(firmwareBuffer),
|
|
||||||
otaHeaderString: parsedImage.otaHeaderString.replaceAll("\u0000", ""),
|
|
||||||
...extraMetas,
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export function addImageToBase(
|
export function addImageToBase(
|
||||||
@@ -379,6 +400,23 @@ export function addImageToBase(
|
|||||||
extraMetas: ExtraMetas,
|
extraMetas: ExtraMetas,
|
||||||
onBeforeManifestPush: () => void,
|
onBeforeManifestPush: () => void,
|
||||||
): void {
|
): void {
|
||||||
|
const newMetas: RepoImageMeta = {
|
||||||
|
fileName: firmwareFileName,
|
||||||
|
fileVersion: parsedImage.fileVersion,
|
||||||
|
fileSize: parsedImage.totalImageSize,
|
||||||
|
originalUrl,
|
||||||
|
url: getRepoFirmwareFileUrl(manufacturer, firmwareFileName, BASE_IMAGES_DIR),
|
||||||
|
imageType: parsedImage.imageType,
|
||||||
|
manufacturerCode: parsedImage.manufacturerCode,
|
||||||
|
sha512: computeSHA512(firmwareBuffer),
|
||||||
|
otaHeaderString: parsedImage.otaHeaderString.replaceAll("\u0000", ""),
|
||||||
|
...extraMetas,
|
||||||
|
};
|
||||||
|
|
||||||
|
if (hasManufacturerImage(baseManifest, newMetas, extraMetas.manufacturerName)) {
|
||||||
|
throw new Error("Image already present for manufacturer");
|
||||||
|
}
|
||||||
|
|
||||||
if (isNewer) {
|
if (isNewer) {
|
||||||
console.log(`${logPrefix} Base manifest has older version ${baseMatch.fileVersion}. Replacing with ${parsedImage.fileVersion}.`);
|
console.log(`${logPrefix} Base manifest has older version ${baseMatch.fileVersion}. Replacing with ${parsedImage.fileVersion}.`);
|
||||||
|
|
||||||
@@ -421,16 +459,5 @@ export function addImageToBase(
|
|||||||
}
|
}
|
||||||
|
|
||||||
onBeforeManifestPush();
|
onBeforeManifestPush();
|
||||||
baseManifest.push({
|
baseManifest.push(newMetas);
|
||||||
fileName: firmwareFileName,
|
|
||||||
fileVersion: parsedImage.fileVersion,
|
|
||||||
fileSize: parsedImage.totalImageSize,
|
|
||||||
originalUrl,
|
|
||||||
url: getRepoFirmwareFileUrl(manufacturer, firmwareFileName, BASE_IMAGES_DIR),
|
|
||||||
imageType: parsedImage.imageType,
|
|
||||||
manufacturerCode: parsedImage.manufacturerCode,
|
|
||||||
sha512: computeSHA512(firmwareBuffer),
|
|
||||||
otaHeaderString: parsedImage.otaHeaderString.replaceAll("\u0000", ""),
|
|
||||||
...extraMetas,
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|||||||
46
src/find_matches.ts
Normal file
46
src/find_matches.ts
Normal file
@@ -0,0 +1,46 @@
|
|||||||
|
import {BASE_INDEX_MANIFEST_FILENAME, PREV_INDEX_MANIFEST_FILENAME, readManifest} from "./common";
|
||||||
|
import type {RepoImageMeta} from "./types";
|
||||||
|
|
||||||
|
const USAGE = `Usage: tsx src/find_matches.ts <BASE|PREV> <imageType> <manufacturerCode> [modelId] [manufacturerName]
|
||||||
|
Examples:
|
||||||
|
- tsx src/find_matches.ts BASE 287 4107
|
||||||
|
- tsx src/find_matches.ts BASE 287 4107 "abcd" "efgh"
|
||||||
|
`;
|
||||||
|
|
||||||
|
function getImageMetas(
|
||||||
|
imageList: RepoImageMeta[],
|
||||||
|
imageType: number,
|
||||||
|
manufacturerCode: number,
|
||||||
|
modelId: string | undefined,
|
||||||
|
manufacturerName: string | undefined,
|
||||||
|
): RepoImageMeta[] | undefined {
|
||||||
|
return imageList
|
||||||
|
.filter(
|
||||||
|
(i) =>
|
||||||
|
i.imageType === imageType &&
|
||||||
|
i.manufacturerCode === manufacturerCode &&
|
||||||
|
(!i.modelId || !modelId || i.modelId === modelId) &&
|
||||||
|
(!i.manufacturerName || !manufacturerName || i.manufacturerName.includes(manufacturerName)),
|
||||||
|
)
|
||||||
|
.sort((a, b) => a.fileVersion - b.fileVersion);
|
||||||
|
}
|
||||||
|
|
||||||
|
function main(): void {
|
||||||
|
const args = process.argv.slice(2);
|
||||||
|
|
||||||
|
if (args.length < 2) {
|
||||||
|
throw new Error(USAGE);
|
||||||
|
}
|
||||||
|
|
||||||
|
const manifestName = args[0] === "PREV" ? PREV_INDEX_MANIFEST_FILENAME : BASE_INDEX_MANIFEST_FILENAME;
|
||||||
|
const imageType = Number(args[1]);
|
||||||
|
const manufacturerCode = Number(args[2]);
|
||||||
|
const modelId = args[3];
|
||||||
|
const manufacturerName = args[4] || undefined;
|
||||||
|
const manifest = readManifest(manifestName);
|
||||||
|
const matches = getImageMetas(manifest, imageType, manufacturerCode, modelId, manufacturerName);
|
||||||
|
|
||||||
|
console.log(matches);
|
||||||
|
}
|
||||||
|
|
||||||
|
main();
|
||||||
@@ -8,7 +8,7 @@ export const CACERTS_DIR = "cacerts";
|
|||||||
export const CACERTS_CONCAT_FILEPATH = "cacerts.pem";
|
export const CACERTS_CONCAT_FILEPATH = "cacerts.pem";
|
||||||
|
|
||||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||||
export function concatCaCerts(github: Octokit, core: typeof CoreApi, context: Context): void {
|
export function concatCaCerts(_github: Octokit, core: typeof CoreApi, _context: Context): void {
|
||||||
let pemContents = "";
|
let pemContents = "";
|
||||||
|
|
||||||
for (const pem of readdirSync(CACERTS_DIR)) {
|
for (const pem of readdirSync(CACERTS_DIR)) {
|
||||||
|
|||||||
@@ -76,7 +76,7 @@ function parseSubElements(otaData: Buffer, totalImageSize: number): OtaSubElemen
|
|||||||
return elements;
|
return elements;
|
||||||
}
|
}
|
||||||
|
|
||||||
export function identifyStacks(github: Octokit, core: typeof CoreApi, context: Context): void {
|
export function identifyStacks(_github: Octokit, core: typeof CoreApi, _context: Context): void {
|
||||||
try {
|
try {
|
||||||
const firmwareList: FirmwareStack[] = [];
|
const firmwareList: FirmwareStack[] = [];
|
||||||
const baseManifest = readManifest(BASE_INDEX_MANIFEST_FILENAME);
|
const baseManifest = readManifest(BASE_INDEX_MANIFEST_FILENAME);
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import type {Octokit} from "@octokit/rest";
|
|||||||
|
|
||||||
import {ALL_AUTODL_MANUFACTURERS, CACHE_DIR} from "./common.js";
|
import {ALL_AUTODL_MANUFACTURERS, CACHE_DIR} from "./common.js";
|
||||||
|
|
||||||
export async function overwriteCache(github: Octokit, core: typeof CoreApi, context: Context, manufacturersCSV?: string): Promise<void> {
|
export async function overwriteCache(_github: Octokit, core: typeof CoreApi, _context: Context, manufacturersCSV?: string): Promise<void> {
|
||||||
if (!existsSync(CACHE_DIR)) {
|
if (!existsSync(CACHE_DIR)) {
|
||||||
mkdirSync(CACHE_DIR, {recursive: true});
|
mkdirSync(CACHE_DIR, {recursive: true});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -61,9 +61,9 @@ function get3rdPartyDir(meta: RepoImageMeta): string | undefined {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async function download3rdParties(
|
async function download3rdParties(
|
||||||
github: Octokit,
|
_github: Octokit,
|
||||||
core: typeof CoreApi,
|
core: typeof CoreApi,
|
||||||
context: Context,
|
_context: Context,
|
||||||
/* v8 ignore next */ outDirFinder = get3rdPartyDir,
|
/* v8 ignore next */ outDirFinder = get3rdPartyDir,
|
||||||
): Promise<void> {
|
): Promise<void> {
|
||||||
if (!process.env.NODE_EXTRA_CA_CERTS) {
|
if (!process.env.NODE_EXTRA_CA_CERTS) {
|
||||||
@@ -213,7 +213,7 @@ async function download3rdParties(
|
|||||||
core.info(`Prev manifest now contains ${prevManifest.length} images.`);
|
core.info(`Prev manifest now contains ${prevManifest.length} images.`);
|
||||||
}
|
}
|
||||||
|
|
||||||
function checkImagesAgainstManifests(github: Octokit, core: typeof CoreApi, context: Context, removeNotInManifest: boolean): void {
|
function checkImagesAgainstManifests(_github: Octokit, core: typeof CoreApi, _context: Context, removeNotInManifest: boolean): void {
|
||||||
for (const [manifestName, imagesDir, moveDir] of [
|
for (const [manifestName, imagesDir, moveDir] of [
|
||||||
[PREV_INDEX_MANIFEST_FILENAME, PREV_IMAGES_DIR, NOT_IN_PREV_MANIFEST_IMAGES_DIR],
|
[PREV_INDEX_MANIFEST_FILENAME, PREV_IMAGES_DIR, NOT_IN_PREV_MANIFEST_IMAGES_DIR],
|
||||||
[BASE_INDEX_MANIFEST_FILENAME, BASE_IMAGES_DIR, NOT_IN_BASE_MANIFEST_IMAGES_DIR],
|
[BASE_INDEX_MANIFEST_FILENAME, BASE_IMAGES_DIR, NOT_IN_BASE_MANIFEST_IMAGES_DIR],
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import type {Octokit} from "@octokit/rest";
|
|||||||
|
|
||||||
import {ALL_AUTODL_MANUFACTURERS, BASE_INDEX_MANIFEST_FILENAME, CACHE_DIR, PREV_INDEX_MANIFEST_FILENAME, TMP_DIR, writeManifest} from "./common.js";
|
import {ALL_AUTODL_MANUFACTURERS, BASE_INDEX_MANIFEST_FILENAME, CACHE_DIR, PREV_INDEX_MANIFEST_FILENAME, TMP_DIR, writeManifest} from "./common.js";
|
||||||
|
|
||||||
export async function runAutodl(github: Octokit, core: typeof CoreApi, context: Context, manufacturersCSV?: string): Promise<void> {
|
export async function runAutodl(_github: Octokit, core: typeof CoreApi, _context: Context, manufacturersCSV?: string): Promise<void> {
|
||||||
const manufacturers = manufacturersCSV ? manufacturersCSV.trim().split(",") : ALL_AUTODL_MANUFACTURERS;
|
const manufacturers = manufacturersCSV ? manufacturersCSV.trim().split(",") : ALL_AUTODL_MANUFACTURERS;
|
||||||
|
|
||||||
core.info("Setup...");
|
core.info("Setup...");
|
||||||
|
|||||||
72
src/z2m_find_match.ts
Normal file
72
src/z2m_find_match.ts
Normal file
@@ -0,0 +1,72 @@
|
|||||||
|
/**
|
||||||
|
* Helper script to quickly retrieve an image meta in the same manner as Zigbee2MQTT.
|
||||||
|
*/
|
||||||
|
import {BASE_INDEX_MANIFEST_FILENAME, PREV_INDEX_MANIFEST_FILENAME, readManifest} from "./common.js";
|
||||||
|
import type {ImageHeader, RepoImageMeta} from "./types.js";
|
||||||
|
|
||||||
|
const USAGE = `Usage: tsx src/z2m_find_match.ts <BASE|PREV> <current> [device] [extraMetas]
|
||||||
|
Example: tsx src/z2m_find_match.ts BASE '{"imageType": 287, "manufacturerCode": 4107, "fileVersion": 16786436}' '{"modelID": "", "manufacturerName": "Philips"}'
|
||||||
|
Formats:
|
||||||
|
current: '{"imageType": number, "fileVersion": number, "manufacturerCode": number, "hardwareVersion": number | undefined}'
|
||||||
|
device [optional]: '{"modelID": string, "manufacturerName": string}'
|
||||||
|
extraMetas [optional]: '{"modelId": string, "otaHeaderString": string, "hardwareVersionMin": number | undefined, "hardwareVersionMax": number | undefined, "manufacturerName": string | undefined}'
|
||||||
|
`;
|
||||||
|
|
||||||
|
// #region Z2M
|
||||||
|
interface ImageInfo {
|
||||||
|
imageType: ImageHeader["imageType"];
|
||||||
|
fileVersion: ImageHeader["fileVersion"];
|
||||||
|
manufacturerCode: ImageHeader["manufacturerCode"];
|
||||||
|
hardwareVersion?: number;
|
||||||
|
}
|
||||||
|
|
||||||
|
interface Device {
|
||||||
|
modelID: string;
|
||||||
|
manufacturerName: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
type ExtraMetas = Pick<RepoImageMeta, "modelId" | "otaHeaderString" | "hardwareVersionMin" | "hardwareVersionMax"> & {
|
||||||
|
manufacturerName?: string;
|
||||||
|
};
|
||||||
|
|
||||||
|
function getImageMeta(imageList: RepoImageMeta[], current: ImageInfo, device: Device, extraMetas: ExtraMetas): RepoImageMeta | undefined {
|
||||||
|
return imageList.find(
|
||||||
|
(i) =>
|
||||||
|
i.imageType === current.imageType &&
|
||||||
|
i.manufacturerCode === current.manufacturerCode &&
|
||||||
|
(i.minFileVersion === undefined || current.fileVersion >= i.minFileVersion) &&
|
||||||
|
(i.maxFileVersion === undefined || current.fileVersion <= i.maxFileVersion) &&
|
||||||
|
// let extra metas override the match from device.modelID, same for manufacturerName
|
||||||
|
(!i.modelId || i.modelId === device.modelID || i.modelId === extraMetas.modelId) &&
|
||||||
|
(!i.manufacturerName ||
|
||||||
|
i.manufacturerName.includes(device.manufacturerName!) ||
|
||||||
|
i.manufacturerName.includes(extraMetas.manufacturerName!)) &&
|
||||||
|
(!extraMetas.otaHeaderString || i.otaHeaderString === extraMetas.otaHeaderString) &&
|
||||||
|
(i.hardwareVersionMin === undefined ||
|
||||||
|
(current.hardwareVersion !== undefined && current.hardwareVersion >= i.hardwareVersionMin) ||
|
||||||
|
(extraMetas.hardwareVersionMin !== undefined && extraMetas.hardwareVersionMin >= i.hardwareVersionMin)) &&
|
||||||
|
(i.hardwareVersionMax === undefined ||
|
||||||
|
(current.hardwareVersion !== undefined && current.hardwareVersion <= i.hardwareVersionMax) ||
|
||||||
|
(extraMetas.hardwareVersionMax !== undefined && extraMetas.hardwareVersionMax <= i.hardwareVersionMax)),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
// #endregion Z2M
|
||||||
|
|
||||||
|
function main(): void {
|
||||||
|
const args = process.argv.slice(2);
|
||||||
|
|
||||||
|
if (args.length < 2) {
|
||||||
|
throw new Error(USAGE);
|
||||||
|
}
|
||||||
|
|
||||||
|
const manifestName = args[0] === "PREV" ? PREV_INDEX_MANIFEST_FILENAME : BASE_INDEX_MANIFEST_FILENAME;
|
||||||
|
const current = JSON.parse(args[1]);
|
||||||
|
const device = args[2] ? JSON.parse(args[2]) : {};
|
||||||
|
const extraMetas = args[3] ? JSON.parse(args[3]) : {};
|
||||||
|
const manifest = readManifest(manifestName);
|
||||||
|
const match = getImageMeta(manifest, current, device, extraMetas);
|
||||||
|
|
||||||
|
console.log(match);
|
||||||
|
}
|
||||||
|
|
||||||
|
main();
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
import {existsSync, readFileSync, rmSync} from "node:fs";
|
import {existsSync, readFileSync, rmSync, writeFileSync} from "node:fs";
|
||||||
import path from "node:path";
|
import path from "node:path";
|
||||||
import type CoreApi from "@actions/core";
|
import type CoreApi from "@actions/core";
|
||||||
import type {Context} from "@actions/github/lib/context";
|
import type {Context} from "@actions/github/lib/context";
|
||||||
@@ -141,7 +141,6 @@ describe("Github Workflow: Check OTA PR", () => {
|
|||||||
addImageToPrevSpy.mockRestore();
|
addImageToPrevSpy.mockRestore();
|
||||||
rmSync(BASE_IMAGES_TEST_DIR_PATH, {recursive: true, force: true});
|
rmSync(BASE_IMAGES_TEST_DIR_PATH, {recursive: true, force: true});
|
||||||
rmSync(PREV_IMAGES_TEST_DIR_PATH, {recursive: true, force: true});
|
rmSync(PREV_IMAGES_TEST_DIR_PATH, {recursive: true, force: true});
|
||||||
rmSync(IMAGES_TEST_DIR, {recursive: true, force: true});
|
|
||||||
});
|
});
|
||||||
|
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
@@ -453,16 +452,71 @@ Text after end tag`);
|
|||||||
it("success without extra metas with matching type-manuf present", async () => {
|
it("success without extra metas with matching type-manuf present", async () => {
|
||||||
filePaths = [useImage(IMAGE_V14_2_COPY), useImage(IMAGE_V14_2)];
|
filePaths = [useImage(IMAGE_V14_2_COPY), useImage(IMAGE_V14_2)];
|
||||||
const newContext = withBody(`\`\`\`json [{"fileName": "${IMAGE_V14_2_COPY}", "manufacturerName": ["lixee"]}] \`\`\``);
|
const newContext = withBody(`\`\`\`json [{"fileName": "${IMAGE_V14_2_COPY}", "manufacturerName": ["lixee"]}] \`\`\``);
|
||||||
|
// manip SHA512 so it doesn't match on that point in `hasManufacturerImage`
|
||||||
|
const f = readFileSync(filePaths[0].filename);
|
||||||
|
f[f.byteLength - 1] = 0xff;
|
||||||
|
writeFileSync(filePaths[0].filename, f);
|
||||||
|
|
||||||
// @ts-expect-error mock
|
// @ts-expect-error mock
|
||||||
await checkOtaPR(github, core, newContext);
|
await checkOtaPR(github, core, newContext);
|
||||||
|
|
||||||
|
const metaCopy = {
|
||||||
|
...IMAGE_V14_2_MANUF_METAS,
|
||||||
|
sha512: "071be434a1c4ef95da68bfcfc0fdff9fb23729b16df50c4d6b70612414e39caacb1fd856c3849df6e99509a15ef8088cfdcd74c7f1f44d2048bac8fb5421ee64",
|
||||||
|
};
|
||||||
|
|
||||||
expect(readManifestSpy).toHaveBeenCalledWith(common.BASE_INDEX_MANIFEST_FILENAME);
|
expect(readManifestSpy).toHaveBeenCalledWith(common.BASE_INDEX_MANIFEST_FILENAME);
|
||||||
expect(readManifestSpy).toHaveBeenCalledWith(common.PREV_INDEX_MANIFEST_FILENAME);
|
expect(readManifestSpy).toHaveBeenCalledWith(common.PREV_INDEX_MANIFEST_FILENAME);
|
||||||
expect(addImageToBaseSpy).toHaveBeenCalledTimes(2);
|
expect(addImageToBaseSpy).toHaveBeenCalledTimes(2);
|
||||||
expect(addImageToPrevSpy).toHaveBeenCalledTimes(0);
|
expect(addImageToPrevSpy).toHaveBeenCalledTimes(0);
|
||||||
expect(writeManifestSpy).toHaveBeenCalledTimes(2);
|
expect(writeManifestSpy).toHaveBeenCalledTimes(2);
|
||||||
expect(writeManifestSpy).toHaveBeenCalledWith(common.BASE_INDEX_MANIFEST_FILENAME, [IMAGE_V14_2_MANUF_METAS, IMAGE_V14_2_METAS]);
|
expect(writeManifestSpy).toHaveBeenCalledWith(common.BASE_INDEX_MANIFEST_FILENAME, [metaCopy, IMAGE_V14_2_METAS]);
|
||||||
|
});
|
||||||
|
|
||||||
|
it("failure with SHA-matching image present", async () => {
|
||||||
|
filePaths = [useImage(IMAGE_V14_2_COPY), useImage(IMAGE_V14_2)];
|
||||||
|
const newContext = withBody(`\`\`\`json [{"fileName": "${IMAGE_V14_2_COPY}", "manufacturerName": ["lixee"]}] \`\`\``);
|
||||||
|
|
||||||
|
await expect(async () => {
|
||||||
|
// @ts-expect-error mock
|
||||||
|
await checkOtaPR(github, core, newContext);
|
||||||
|
}).rejects.toThrow(`[${path.join(BASE_IMAGES_TEST_DIR_PATH, IMAGE_V14_2)}] Image already present for manufacturer`);
|
||||||
|
|
||||||
|
expect(readManifestSpy).toHaveBeenCalledWith(common.BASE_INDEX_MANIFEST_FILENAME);
|
||||||
|
expect(readManifestSpy).toHaveBeenCalledWith(common.PREV_INDEX_MANIFEST_FILENAME);
|
||||||
|
expect(addImageToBaseSpy).toHaveBeenCalledTimes(2);
|
||||||
|
expect(addImageToPrevSpy).toHaveBeenCalledTimes(0);
|
||||||
|
expect(writeManifestSpy).toHaveBeenCalledTimes(0);
|
||||||
|
expect(baseManifest).toStrictEqual([IMAGE_V14_2_MANUF_METAS]);
|
||||||
|
});
|
||||||
|
|
||||||
|
it("failure with spec-matching image present", async () => {
|
||||||
|
filePaths = [useImage(IMAGE_V14_2_COPY), useImage(IMAGE_V14_2)];
|
||||||
|
// bypass initial "conflict" match by using random `minFileVersion`
|
||||||
|
const newContext = withBody(`\`\`\`json [{"fileName": "${IMAGE_V14_2_COPY}", "minFileVersion": 1}] \`\`\``);
|
||||||
|
// manip SHA512 so it doesn't match on that point in `hasManufacturerImage`
|
||||||
|
const f = readFileSync(filePaths[0].filename);
|
||||||
|
f[f.byteLength - 1] = 0xff;
|
||||||
|
writeFileSync(filePaths[0].filename, f);
|
||||||
|
|
||||||
|
await expect(async () => {
|
||||||
|
// @ts-expect-error mock
|
||||||
|
await checkOtaPR(github, core, newContext);
|
||||||
|
}).rejects.toThrow(`[${path.join(BASE_IMAGES_TEST_DIR_PATH, IMAGE_V14_2)}] Image already present for manufacturer`);
|
||||||
|
|
||||||
|
const metaCopy = {
|
||||||
|
...IMAGE_V14_2_METAS,
|
||||||
|
sha512: "071be434a1c4ef95da68bfcfc0fdff9fb23729b16df50c4d6b70612414e39caacb1fd856c3849df6e99509a15ef8088cfdcd74c7f1f44d2048bac8fb5421ee64",
|
||||||
|
fileName: IMAGE_V14_2_COPY,
|
||||||
|
minFileVersion: 1,
|
||||||
|
url: IMAGE_V14_2_METAS.url.replace(IMAGE_V14_2, IMAGE_V14_2_COPY),
|
||||||
|
};
|
||||||
|
expect(readManifestSpy).toHaveBeenCalledWith(common.BASE_INDEX_MANIFEST_FILENAME);
|
||||||
|
expect(readManifestSpy).toHaveBeenCalledWith(common.PREV_INDEX_MANIFEST_FILENAME);
|
||||||
|
expect(addImageToBaseSpy).toHaveBeenCalledTimes(2);
|
||||||
|
expect(addImageToPrevSpy).toHaveBeenCalledTimes(0);
|
||||||
|
expect(writeManifestSpy).toHaveBeenCalledTimes(0);
|
||||||
|
expect(baseManifest).toStrictEqual([metaCopy]);
|
||||||
});
|
});
|
||||||
|
|
||||||
it("success with newer than current but minFileVersion keeps both", async () => {
|
it("success with newer than current but minFileVersion keeps both", async () => {
|
||||||
|
|||||||
@@ -141,10 +141,8 @@ describe("Github Workflow: Re-Process All Images", () => {
|
|||||||
|
|
||||||
const withOldMetas = (metas: RepoImageMeta): RepoImageMeta => {
|
const withOldMetas = (metas: RepoImageMeta): RepoImageMeta => {
|
||||||
const oldMetas = structuredClone(metas);
|
const oldMetas = structuredClone(metas);
|
||||||
// biome-ignore lint/performance/noDelete: <explanation>
|
|
||||||
delete oldMetas.originalUrl;
|
delete oldMetas.originalUrl;
|
||||||
// @ts-expect-error mock
|
// @ts-expect-error mock
|
||||||
// biome-ignore lint/performance/noDelete: <explanation>
|
|
||||||
delete oldMetas.sha512;
|
delete oldMetas.sha512;
|
||||||
|
|
||||||
return oldMetas;
|
return oldMetas;
|
||||||
@@ -185,8 +183,6 @@ describe("Github Workflow: Re-Process All Images", () => {
|
|||||||
rmSync(NOT_IN_BASE_MANIFEST_IMAGES_DIR, {recursive: true, force: true});
|
rmSync(NOT_IN_BASE_MANIFEST_IMAGES_DIR, {recursive: true, force: true});
|
||||||
renameSync(NOT_IN_BASE_MANIFEST_IMAGES_DIR_TMP, NOT_IN_BASE_MANIFEST_IMAGES_DIR);
|
renameSync(NOT_IN_BASE_MANIFEST_IMAGES_DIR_TMP, NOT_IN_BASE_MANIFEST_IMAGES_DIR);
|
||||||
}
|
}
|
||||||
|
|
||||||
rmSync(IMAGES_TEST_DIR, {recursive: true, force: true});
|
|
||||||
});
|
});
|
||||||
|
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
@@ -393,7 +389,6 @@ describe("Github Workflow: Re-Process All Images", () => {
|
|||||||
// @ts-expect-error override
|
// @ts-expect-error override
|
||||||
{fileName: newName, url: `${baseUrl}${encodeURIComponent(newName)}`},
|
{fileName: newName, url: `${baseUrl}${encodeURIComponent(newName)}`},
|
||||||
);
|
);
|
||||||
// biome-ignore lint/performance/noDelete: <explanation>
|
|
||||||
delete outManifestMetas.originalUrl;
|
delete outManifestMetas.originalUrl;
|
||||||
expect(writeManifestSpy).toHaveBeenNthCalledWith(2, common.BASE_INDEX_MANIFEST_FILENAME, [outManifestMetas]);
|
expect(writeManifestSpy).toHaveBeenNthCalledWith(2, common.BASE_INDEX_MANIFEST_FILENAME, [outManifestMetas]);
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -116,7 +116,6 @@ describe("Process Firmware Image", () => {
|
|||||||
setTimeoutSpy.mockRestore();
|
setTimeoutSpy.mockRestore();
|
||||||
rmSync(BASE_IMAGES_TEST_DIR_PATH, {recursive: true, force: true});
|
rmSync(BASE_IMAGES_TEST_DIR_PATH, {recursive: true, force: true});
|
||||||
rmSync(PREV_IMAGES_TEST_DIR_PATH, {recursive: true, force: true});
|
rmSync(PREV_IMAGES_TEST_DIR_PATH, {recursive: true, force: true});
|
||||||
rmSync(IMAGES_TEST_DIR, {recursive: true, force: true});
|
|
||||||
});
|
});
|
||||||
|
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
|
|||||||
Reference in New Issue
Block a user