homebridge-config-ui-x 5.30.2-beta.0 → 5.30.2-beta.2

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.
Files changed (614) hide show
  1. package/CHANGELOG.md +143 -2
  2. package/dist/app.controller.js +0 -1
  3. package/dist/app.gateway.js +0 -1
  4. package/dist/app.module.js +0 -1
  5. package/dist/app.service.js +0 -1
  6. package/dist/bin/base-platform.js +1 -5
  7. package/dist/bin/config-file.js +45 -0
  8. package/dist/bin/confirm-unknown-node.js +0 -1
  9. package/dist/bin/fork.js +0 -1
  10. package/dist/bin/hb-service.js +114 -136
  11. package/dist/bin/line-buffer.js +36 -0
  12. package/dist/bin/log-file.js +46 -0
  13. package/dist/bin/logger.js +0 -1
  14. package/dist/bin/platforms/darwin.js +0 -1
  15. package/dist/bin/platforms/freebsd.js +3 -1
  16. package/dist/bin/platforms/linux.js +0 -1
  17. package/dist/bin/platforms/nodesource.js +0 -1
  18. package/dist/bin/platforms/win32.js +0 -1
  19. package/dist/bin/shutdown.js +34 -0
  20. package/dist/bin/standalone.js +0 -1
  21. package/dist/core/api.constants.js +0 -1
  22. package/dist/core/auth/auth.controller.js +9 -5
  23. package/dist/core/auth/auth.dto.js +0 -1
  24. package/dist/core/auth/auth.module.js +0 -1
  25. package/dist/core/auth/auth.service.js +68 -18
  26. package/dist/core/auth/guards/admin.guard.js +0 -1
  27. package/dist/core/auth/guards/custom.guard.js +0 -1
  28. package/dist/core/auth/guards/jwt-auth.guard.js +0 -1
  29. package/dist/core/auth/guards/ws-admin-guard.js +0 -1
  30. package/dist/core/auth/guards/ws-log.guard.js +0 -1
  31. package/dist/core/auth/guards/ws-token.js +11 -1
  32. package/dist/core/auth/guards/ws.guard.js +2 -2
  33. package/dist/core/auth/jwt.strategy.js +0 -1
  34. package/dist/core/config/config.interfaces.js +0 -1
  35. package/dist/core/config/config.module.js +0 -1
  36. package/dist/core/config/config.service.js +68 -18
  37. package/dist/core/config/config.startup.js +2 -2
  38. package/dist/core/cors.config.js +2 -2
  39. package/dist/core/feature-flags/feature-flags.registry.js +1 -2
  40. package/dist/core/fs/fs.module.js +0 -1
  41. package/dist/core/fs/json-file-store.service.js +24 -5
  42. package/dist/core/fs/private-file.js +10 -0
  43. package/dist/core/homebridge-ipc/homebridge-ipc.module.js +0 -1
  44. package/dist/core/homebridge-ipc/homebridge-ipc.service.js +10 -4
  45. package/dist/core/logger/logger.module.js +0 -1
  46. package/dist/core/logger/logger.service.js +0 -1
  47. package/dist/core/matter/matter.interfaces.js +0 -1
  48. package/dist/core/node-pty/node-pty.module.js +0 -1
  49. package/dist/core/node-pty/node-pty.service.js +0 -1
  50. package/dist/core/node-version.constants.js +8 -2
  51. package/dist/core/regex.constants.js +2 -1
  52. package/dist/core/scheduler/scheduler.module.js +0 -1
  53. package/dist/core/scheduler/scheduler.service.js +37 -18
  54. package/dist/core/spa/spa.filter.js +7 -5
  55. package/dist/core/ssl/ssl-cert-generator.service.js +2 -2
  56. package/dist/core/static-assets.js +0 -1
  57. package/dist/env-setup.js +0 -1
  58. package/dist/global-defaults.js +0 -1
  59. package/dist/index.js +0 -1
  60. package/dist/main.js +20 -8
  61. package/dist/modules/accessories/accessories.controller.js +0 -1
  62. package/dist/modules/accessories/accessories.dto.js +0 -1
  63. package/dist/modules/accessories/accessories.gateway.js +13 -5
  64. package/dist/modules/accessories/accessories.interfaces.js +0 -1
  65. package/dist/modules/accessories/accessories.module.js +0 -1
  66. package/dist/modules/accessories/accessories.service.js +31 -10
  67. package/dist/modules/backup/backup.controller.js +0 -1
  68. package/dist/modules/backup/backup.gateway.js +0 -1
  69. package/dist/modules/backup/backup.module.js +0 -1
  70. package/dist/modules/backup/backup.service.js +94 -39
  71. package/dist/modules/child-bridges/child-bridges.gateway.js +0 -1
  72. package/dist/modules/child-bridges/child-bridges.interfaces.js +0 -1
  73. package/dist/modules/child-bridges/child-bridges.module.js +0 -1
  74. package/dist/modules/child-bridges/child-bridges.service.js +6 -1
  75. package/dist/modules/config-editor/config-editor.controller.js +8 -5
  76. package/dist/modules/config-editor/config-editor.dto.js +32 -1
  77. package/dist/modules/config-editor/config-editor.module.js +0 -1
  78. package/dist/modules/config-editor/config-editor.service.js +40 -21
  79. package/dist/modules/custom-plugins/custom-plugins.module.js +0 -1
  80. package/dist/modules/custom-plugins/homebridge-deconz/homebridge-deconz.controller.js +0 -1
  81. package/dist/modules/custom-plugins/homebridge-deconz/homebridge-deconz.module.js +0 -1
  82. package/dist/modules/custom-plugins/homebridge-deconz/homebridge-deconz.service.js +0 -1
  83. package/dist/modules/custom-plugins/homebridge-hue/homebridge-hue.controller.js +0 -1
  84. package/dist/modules/custom-plugins/homebridge-hue/homebridge-hue.module.js +0 -1
  85. package/dist/modules/custom-plugins/homebridge-hue/homebridge-hue.service.js +0 -1
  86. package/dist/modules/custom-plugins/plugins-settings-ui/plugins-settings-ui-ticket.module.js +0 -1
  87. package/dist/modules/custom-plugins/plugins-settings-ui/plugins-settings-ui-ticket.service.js +0 -1
  88. package/dist/modules/custom-plugins/plugins-settings-ui/plugins-settings-ui.controller.js +0 -1
  89. package/dist/modules/custom-plugins/plugins-settings-ui/plugins-settings-ui.gateway.js +0 -1
  90. package/dist/modules/custom-plugins/plugins-settings-ui/plugins-settings-ui.module.js +0 -1
  91. package/dist/modules/custom-plugins/plugins-settings-ui/plugins-settings-ui.service.js +19 -9
  92. package/dist/modules/log/log.gateway.js +0 -1
  93. package/dist/modules/log/log.module.js +0 -1
  94. package/dist/modules/log/log.service.js +14 -1
  95. package/dist/modules/platform-tools/docker/docker.controller.js +0 -1
  96. package/dist/modules/platform-tools/docker/docker.interfaces.js +0 -1
  97. package/dist/modules/platform-tools/docker/docker.module.js +0 -1
  98. package/dist/modules/platform-tools/docker/docker.service.js +0 -1
  99. package/dist/modules/platform-tools/hb-service/hb-service.controller.js +0 -1
  100. package/dist/modules/platform-tools/hb-service/hb-service.dto.js +0 -1
  101. package/dist/modules/platform-tools/hb-service/hb-service.module.js +0 -1
  102. package/dist/modules/platform-tools/hb-service/hb-service.service.js +5 -5
  103. package/dist/modules/platform-tools/linux/linux.controller.js +0 -1
  104. package/dist/modules/platform-tools/linux/linux.module.js +0 -1
  105. package/dist/modules/platform-tools/linux/linux.service.js +0 -1
  106. package/dist/modules/platform-tools/platform-tools.module.js +0 -1
  107. package/dist/modules/platform-tools/terminal/terminal.controller.js +0 -1
  108. package/dist/modules/platform-tools/terminal/terminal.gateway.js +0 -1
  109. package/dist/modules/platform-tools/terminal/terminal.interfaces.js +0 -1
  110. package/dist/modules/platform-tools/terminal/terminal.module.js +0 -1
  111. package/dist/modules/platform-tools/terminal/terminal.service.js +12 -2
  112. package/dist/modules/plugins/plugins.controller.js +0 -1
  113. package/dist/modules/plugins/plugins.dto.js +3 -2
  114. package/dist/modules/plugins/plugins.gateway.js +0 -1
  115. package/dist/modules/plugins/plugins.interfaces.js +0 -1
  116. package/dist/modules/plugins/plugins.module.js +0 -1
  117. package/dist/modules/plugins/plugins.service.js +95 -41
  118. package/dist/modules/server/server.controller.js +0 -1
  119. package/dist/modules/server/server.dto.js +0 -1
  120. package/dist/modules/server/server.module.js +0 -1
  121. package/dist/modules/server/server.service.js +36 -24
  122. package/dist/modules/setup-wizard/setup-wizard.controller.js +0 -1
  123. package/dist/modules/setup-wizard/setup-wizard.guard.js +0 -1
  124. package/dist/modules/setup-wizard/setup-wizard.module.js +0 -1
  125. package/dist/modules/status/status.controller.js +0 -1
  126. package/dist/modules/status/status.gateway.js +2 -1
  127. package/dist/modules/status/status.interfaces.js +0 -1
  128. package/dist/modules/status/status.module.js +0 -1
  129. package/dist/modules/status/status.service.js +6 -4
  130. package/dist/modules/update-all/update-all-journal.service.js +0 -1
  131. package/dist/modules/update-all/update-all.controller.js +0 -1
  132. package/dist/modules/update-all/update-all.dto.js +0 -1
  133. package/dist/modules/update-all/update-all.gateway.js +0 -1
  134. package/dist/modules/update-all/update-all.interfaces.js +0 -1
  135. package/dist/modules/update-all/update-all.module.js +0 -1
  136. package/dist/modules/update-all/update-all.service.js +0 -1
  137. package/dist/modules/users/users.controller.js +0 -1
  138. package/dist/modules/users/users.dto.js +4 -1
  139. package/dist/modules/users/users.module.js +0 -1
  140. package/dist/self-check.js +7 -6
  141. package/package.json +17 -49
  142. package/public/3rdpartylicenses.txt +194 -194
  143. package/public/assets/plugin-ui-utils/ui.js +44 -101
  144. package/public/assets/plugin-ui-utils/ui.js.map +1 -1
  145. package/public/chunk-15EsCx-Z.js +5 -0
  146. package/public/chunk-1Rd8WQBU.js +1 -0
  147. package/public/chunk-42HkCgNr.js +1 -0
  148. package/public/chunk-6tDXVMNj.js +76 -0
  149. package/public/chunk-7Fj-5SI9.js +1 -0
  150. package/public/chunk-9R_9jgLS.js +1 -0
  151. package/public/chunk-B9DD-NOW.js +1 -0
  152. package/public/chunk-BEdzGeNq.js +1 -0
  153. package/public/chunk-BFp5x3LU.js +9 -0
  154. package/public/chunk-BG8_utSL.js +1 -0
  155. package/public/chunk-BGCJNqv_.js +1 -0
  156. package/public/chunk-BSed7Etd.js +1 -0
  157. package/public/{chunk-2lPfBxoe.js → chunk-BSmJjio0.js} +1 -1
  158. package/public/chunk-BTyxgAg2.js +1 -0
  159. package/public/chunk-BWOKTWla.js +1 -0
  160. package/public/chunk-BXoeXWQW.js +1 -0
  161. package/public/chunk-Bb_lKu0v.js +1 -0
  162. package/public/{chunk-BfQcJ8YV.js → chunk-BdHKqZZU.js} +2 -2
  163. package/public/chunk-BdZjVx3d.js +1 -0
  164. package/public/chunk-Bgm8r8nC.js +2 -0
  165. package/public/chunk-BhHe-SzR.js +1 -0
  166. package/public/chunk-BmWhiEEe.js +1 -0
  167. package/public/chunk-Bnb44DY8.js +1 -0
  168. package/public/chunk-BnzEm9pJ.js +1 -0
  169. package/public/chunk-Bp1obXOm.js +1 -0
  170. package/public/chunk-BtijKNIl.js +1 -0
  171. package/public/{chunk-Bj5yTF4r.js → chunk-BtrtcShM.js} +1 -1
  172. package/public/chunk-BwyVdV-9.js +1 -0
  173. package/public/chunk-BxaXUmdD.js +1 -0
  174. package/public/chunk-C-N_NvAq.js +1 -0
  175. package/public/chunk-C3BBGRzW.js +1 -0
  176. package/public/chunk-C3GG0q7T.js +1 -0
  177. package/public/chunk-C6jVRc5l.js +1 -0
  178. package/public/chunk-C7PU_BIR.js +1 -0
  179. package/public/chunk-C8U5BNEI.js +4 -0
  180. package/public/chunk-CCdtrNyZ.js +1 -0
  181. package/public/chunk-CDEZRM7K.js +1 -0
  182. package/public/chunk-CEVnr5hg.js +1 -0
  183. package/public/chunk-CGaEjMPx.js +19 -0
  184. package/public/chunk-CNY6XjkP.js +1 -0
  185. package/public/chunk-CQffOLoH.js +1 -0
  186. package/public/chunk-CRJGNpGn.js +1 -0
  187. package/public/chunk-CSOj3Q-d.js +1 -0
  188. package/public/chunk-Cb-YzoWv.js +1 -0
  189. package/public/chunk-CcOHvDdM.js +1 -0
  190. package/public/chunk-CcjdsWzd.js +17 -0
  191. package/public/chunk-CgBgixgq.js +1 -0
  192. package/public/chunk-Cgmkxsr4.js +4 -0
  193. package/public/chunk-Ch6gCD3q.js +67 -0
  194. package/public/chunk-Ci-pgod_.js +1 -0
  195. package/public/chunk-CnIcVydw.js +1 -0
  196. package/public/chunk-CpNs5f5D.js +1 -0
  197. package/public/chunk-CsYF0_Vm.js +1 -0
  198. package/public/chunk-Cubij8dp.js +1 -0
  199. package/public/chunk-CurMGw19.js +1 -0
  200. package/public/chunk-Cy_pL3tk.js +1 -0
  201. package/public/chunk-CzgvV--2.js +1 -0
  202. package/public/chunk-D06N_lJ8.js +1 -0
  203. package/public/{chunk-W4gay8mI.js → chunk-D0Qw6BsN.js} +1 -1
  204. package/public/chunk-DAOoTF9a.js +1 -0
  205. package/public/chunk-DAUteqI6.js +1 -0
  206. package/public/chunk-DDIyBpEd.js +1 -0
  207. package/public/{chunk-Bd12L3Qk.js → chunk-DF_im-nn.js} +5 -5
  208. package/public/{chunk-Cz8jOinu.js → chunk-DJ1hbnzj.js} +3 -3
  209. package/public/chunk-DPG4LhJv.js +1 -0
  210. package/public/chunk-DR8zpuWx.js +1 -0
  211. package/public/chunk-DRxPDglG.js +1 -0
  212. package/public/chunk-DdNy4Qb6.js +1 -0
  213. package/public/chunk-Df62x4Gh.js +1 -0
  214. package/public/chunk-DjaEGU5Q.js +1 -0
  215. package/public/chunk-DmMTYnq_.js +1 -0
  216. package/public/chunk-Dnmp6xZ9.js +1 -0
  217. package/public/chunk-DqIT3COv.js +1 -0
  218. package/public/chunk-DqaU6TAe.js +1 -0
  219. package/public/chunk-Dr8hZndG.js +1 -0
  220. package/public/chunk-DtvAefy-.js +1 -0
  221. package/public/{chunk-4ZyEVV2n.js → chunk-DuV7vWal.js} +1 -1
  222. package/public/chunk-DvnBMwSj.js +1 -0
  223. package/public/chunk-Dy0tE__Y.js +1 -0
  224. package/public/chunk-DyHfbFFj.js +1 -0
  225. package/public/chunk-DywALW6-.js +1 -0
  226. package/public/chunk-DzZGkNL1.js +1 -0
  227. package/public/chunk-Dzc9yFlz.js +1 -0
  228. package/public/chunk-GNKQ0obr.js +1 -0
  229. package/public/chunk-GUch3T0Q.js +1 -0
  230. package/public/chunk-HsOwu8td.js +1 -0
  231. package/public/chunk-Lee5uN7k.js +1 -0
  232. package/public/chunk-OONONljL.js +1 -0
  233. package/public/chunk-W90h2Ztk.js +1 -0
  234. package/public/chunk-YnafuGYL.js +1 -0
  235. package/public/chunk-c_aPvvdP.js +1 -0
  236. package/public/chunk-jCIDbYGs.js +1 -0
  237. package/public/chunk-k2mtmfeX.js +1 -0
  238. package/public/chunk-rgq_J3H8.js +1 -0
  239. package/public/chunk-rzjV6tSn.js +16 -0
  240. package/public/chunk-t8PMBN2B.js +1 -0
  241. package/public/chunk-tYvOv7F0.js +1 -0
  242. package/public/chunk-vhj-hxMx.js +1 -0
  243. package/public/chunk-vvA-Udr_.js +1 -0
  244. package/public/chunk-ykHKW-Dk.js +1 -0
  245. package/public/chunk-zHEPAHUY.js +1 -0
  246. package/public/chunk-zOGgVrAh.js +1 -0
  247. package/public/index.html +1 -1
  248. package/public/main-RL3T2RHW.js +98 -0
  249. package/dist/app.controller.d.ts +0 -6
  250. package/dist/app.controller.js.map +0 -1
  251. package/dist/app.gateway.d.ts +0 -2
  252. package/dist/app.gateway.js.map +0 -1
  253. package/dist/app.module.d.ts +0 -2
  254. package/dist/app.module.js.map +0 -1
  255. package/dist/app.service.d.ts +0 -3
  256. package/dist/app.service.js.map +0 -1
  257. package/dist/bin/base-platform.d.ts +0 -23
  258. package/dist/bin/base-platform.js.map +0 -1
  259. package/dist/bin/confirm-unknown-node.d.ts +0 -2
  260. package/dist/bin/confirm-unknown-node.js.map +0 -1
  261. package/dist/bin/fork.d.ts +0 -1
  262. package/dist/bin/fork.js.map +0 -1
  263. package/dist/bin/hb-service.d.ts +0 -79
  264. package/dist/bin/hb-service.js.map +0 -1
  265. package/dist/bin/logger.d.ts +0 -16
  266. package/dist/bin/logger.js.map +0 -1
  267. package/dist/bin/platforms/darwin.d.ts +0 -30
  268. package/dist/bin/platforms/darwin.js.map +0 -1
  269. package/dist/bin/platforms/freebsd.d.ts +0 -26
  270. package/dist/bin/platforms/freebsd.js.map +0 -1
  271. package/dist/bin/platforms/linux.d.ts +0 -46
  272. package/dist/bin/platforms/linux.js.map +0 -1
  273. package/dist/bin/platforms/nodesource.d.ts +0 -3
  274. package/dist/bin/platforms/nodesource.js.map +0 -1
  275. package/dist/bin/platforms/win32.d.ts +0 -17
  276. package/dist/bin/platforms/win32.js.map +0 -1
  277. package/dist/bin/standalone.d.ts +0 -2
  278. package/dist/bin/standalone.js.map +0 -1
  279. package/dist/core/api.constants.d.ts +0 -1
  280. package/dist/core/api.constants.js.map +0 -1
  281. package/dist/core/auth/auth.controller.d.ts +0 -43
  282. package/dist/core/auth/auth.controller.js.map +0 -1
  283. package/dist/core/auth/auth.dto.d.ts +0 -15
  284. package/dist/core/auth/auth.dto.js.map +0 -1
  285. package/dist/core/auth/auth.module.d.ts +0 -2
  286. package/dist/core/auth/auth.module.js.map +0 -1
  287. package/dist/core/auth/auth.service.d.ts +0 -61
  288. package/dist/core/auth/auth.service.js.map +0 -1
  289. package/dist/core/auth/guards/admin.guard.d.ts +0 -4
  290. package/dist/core/auth/guards/admin.guard.js.map +0 -1
  291. package/dist/core/auth/guards/custom.guard.d.ts +0 -7
  292. package/dist/core/auth/guards/custom.guard.js.map +0 -1
  293. package/dist/core/auth/guards/jwt-auth.guard.d.ts +0 -13
  294. package/dist/core/auth/guards/jwt-auth.guard.js.map +0 -1
  295. package/dist/core/auth/guards/ws-admin-guard.d.ts +0 -10
  296. package/dist/core/auth/guards/ws-admin-guard.js.map +0 -1
  297. package/dist/core/auth/guards/ws-log.guard.d.ts +0 -10
  298. package/dist/core/auth/guards/ws-log.guard.js.map +0 -1
  299. package/dist/core/auth/guards/ws-token.d.ts +0 -1
  300. package/dist/core/auth/guards/ws-token.js.map +0 -1
  301. package/dist/core/auth/guards/ws.guard.d.ts +0 -10
  302. package/dist/core/auth/guards/ws.guard.js.map +0 -1
  303. package/dist/core/auth/jwt.strategy.d.ts +0 -14
  304. package/dist/core/auth/jwt.strategy.js.map +0 -1
  305. package/dist/core/config/config.interfaces.d.ts +0 -147
  306. package/dist/core/config/config.interfaces.js.map +0 -1
  307. package/dist/core/config/config.module.d.ts +0 -2
  308. package/dist/core/config/config.module.js.map +0 -1
  309. package/dist/core/config/config.service.d.ts +0 -173
  310. package/dist/core/config/config.service.js.map +0 -1
  311. package/dist/core/config/config.startup.d.ts +0 -2
  312. package/dist/core/config/config.startup.js.map +0 -1
  313. package/dist/core/cors.config.d.ts +0 -4
  314. package/dist/core/cors.config.js.map +0 -1
  315. package/dist/core/feature-flags/feature-flags.registry.d.ts +0 -6
  316. package/dist/core/feature-flags/feature-flags.registry.js.map +0 -1
  317. package/dist/core/fs/fs.module.d.ts +0 -2
  318. package/dist/core/fs/fs.module.js.map +0 -1
  319. package/dist/core/fs/json-file-store.service.d.ts +0 -12
  320. package/dist/core/fs/json-file-store.service.js.map +0 -1
  321. package/dist/core/homebridge-ipc/homebridge-ipc.module.d.ts +0 -2
  322. package/dist/core/homebridge-ipc/homebridge-ipc.module.js.map +0 -1
  323. package/dist/core/homebridge-ipc/homebridge-ipc.service.d.ts +0 -19
  324. package/dist/core/homebridge-ipc/homebridge-ipc.service.js.map +0 -1
  325. package/dist/core/logger/logger.module.d.ts +0 -2
  326. package/dist/core/logger/logger.module.js.map +0 -1
  327. package/dist/core/logger/logger.service.d.ts +0 -14
  328. package/dist/core/logger/logger.service.js.map +0 -1
  329. package/dist/core/matter/matter.interfaces.d.ts +0 -169
  330. package/dist/core/matter/matter.interfaces.js.map +0 -1
  331. package/dist/core/node-pty/node-pty.module.d.ts +0 -2
  332. package/dist/core/node-pty/node-pty.module.js.map +0 -1
  333. package/dist/core/node-pty/node-pty.service.d.ts +0 -4
  334. package/dist/core/node-pty/node-pty.service.js.map +0 -1
  335. package/dist/core/node-version.constants.d.ts +0 -16
  336. package/dist/core/node-version.constants.js.map +0 -1
  337. package/dist/core/regex.constants.d.ts +0 -48
  338. package/dist/core/regex.constants.js.map +0 -1
  339. package/dist/core/scheduler/scheduler.module.d.ts +0 -2
  340. package/dist/core/scheduler/scheduler.module.js.map +0 -1
  341. package/dist/core/scheduler/scheduler.service.d.ts +0 -20
  342. package/dist/core/scheduler/scheduler.service.js.map +0 -1
  343. package/dist/core/spa/spa.filter.d.ts +0 -4
  344. package/dist/core/spa/spa.filter.js.map +0 -1
  345. package/dist/core/ssl/ssl-cert-generator.service.d.ts +0 -15
  346. package/dist/core/ssl/ssl-cert-generator.service.js.map +0 -1
  347. package/dist/core/static-assets.d.ts +0 -1
  348. package/dist/core/static-assets.js.map +0 -1
  349. package/dist/env-setup.d.ts +0 -1
  350. package/dist/env-setup.js.map +0 -1
  351. package/dist/global-defaults.d.ts +0 -1
  352. package/dist/global-defaults.js.map +0 -1
  353. package/dist/index.d.ts +0 -2
  354. package/dist/index.js.map +0 -1
  355. package/dist/main.d.ts +0 -7
  356. package/dist/main.js.map +0 -1
  357. package/dist/modules/accessories/accessories.controller.d.ts +0 -10
  358. package/dist/modules/accessories/accessories.controller.js.map +0 -1
  359. package/dist/modules/accessories/accessories.dto.d.ts +0 -4
  360. package/dist/modules/accessories/accessories.dto.js.map +0 -1
  361. package/dist/modules/accessories/accessories.gateway.d.ts +0 -9
  362. package/dist/modules/accessories/accessories.gateway.js.map +0 -1
  363. package/dist/modules/accessories/accessories.interfaces.d.ts +0 -10
  364. package/dist/modules/accessories/accessories.interfaces.js.map +0 -1
  365. package/dist/modules/accessories/accessories.module.d.ts +0 -2
  366. package/dist/modules/accessories/accessories.module.js.map +0 -1
  367. package/dist/modules/accessories/accessories.service.d.ts +0 -54
  368. package/dist/modules/accessories/accessories.service.js.map +0 -1
  369. package/dist/modules/backup/backup.controller.d.ts +0 -34
  370. package/dist/modules/backup/backup.controller.js.map +0 -1
  371. package/dist/modules/backup/backup.gateway.d.ts +0 -15
  372. package/dist/modules/backup/backup.gateway.js.map +0 -1
  373. package/dist/modules/backup/backup.module.d.ts +0 -2
  374. package/dist/modules/backup/backup.module.js.map +0 -1
  375. package/dist/modules/backup/backup.service.d.ts +0 -62
  376. package/dist/modules/backup/backup.service.js.map +0 -1
  377. package/dist/modules/child-bridges/child-bridges.gateway.d.ts +0 -17
  378. package/dist/modules/child-bridges/child-bridges.gateway.js.map +0 -1
  379. package/dist/modules/child-bridges/child-bridges.interfaces.d.ts +0 -25
  380. package/dist/modules/child-bridges/child-bridges.interfaces.js.map +0 -1
  381. package/dist/modules/child-bridges/child-bridges.module.d.ts +0 -2
  382. package/dist/modules/child-bridges/child-bridges.module.js.map +0 -1
  383. package/dist/modules/child-bridges/child-bridges.service.d.ts +0 -22
  384. package/dist/modules/child-bridges/child-bridges.service.js.map +0 -1
  385. package/dist/modules/config-editor/config-editor.controller.d.ts +0 -73
  386. package/dist/modules/config-editor/config-editor.controller.js.map +0 -1
  387. package/dist/modules/config-editor/config-editor.dto.d.ts +0 -10
  388. package/dist/modules/config-editor/config-editor.dto.js.map +0 -1
  389. package/dist/modules/config-editor/config-editor.module.d.ts +0 -2
  390. package/dist/modules/config-editor/config-editor.module.js.map +0 -1
  391. package/dist/modules/config-editor/config-editor.service.d.ts +0 -102
  392. package/dist/modules/config-editor/config-editor.service.js.map +0 -1
  393. package/dist/modules/custom-plugins/custom-plugins.module.d.ts +0 -2
  394. package/dist/modules/custom-plugins/custom-plugins.module.js.map +0 -1
  395. package/dist/modules/custom-plugins/homebridge-deconz/homebridge-deconz.controller.d.ts +0 -7
  396. package/dist/modules/custom-plugins/homebridge-deconz/homebridge-deconz.controller.js.map +0 -1
  397. package/dist/modules/custom-plugins/homebridge-deconz/homebridge-deconz.module.d.ts +0 -2
  398. package/dist/modules/custom-plugins/homebridge-deconz/homebridge-deconz.module.js.map +0 -1
  399. package/dist/modules/custom-plugins/homebridge-deconz/homebridge-deconz.service.d.ts +0 -7
  400. package/dist/modules/custom-plugins/homebridge-deconz/homebridge-deconz.service.js.map +0 -1
  401. package/dist/modules/custom-plugins/homebridge-hue/homebridge-hue.controller.d.ts +0 -7
  402. package/dist/modules/custom-plugins/homebridge-hue/homebridge-hue.controller.js.map +0 -1
  403. package/dist/modules/custom-plugins/homebridge-hue/homebridge-hue.module.d.ts +0 -2
  404. package/dist/modules/custom-plugins/homebridge-hue/homebridge-hue.module.js.map +0 -1
  405. package/dist/modules/custom-plugins/homebridge-hue/homebridge-hue.service.d.ts +0 -7
  406. package/dist/modules/custom-plugins/homebridge-hue/homebridge-hue.service.js.map +0 -1
  407. package/dist/modules/custom-plugins/plugins-settings-ui/plugins-settings-ui-ticket.module.d.ts +0 -2
  408. package/dist/modules/custom-plugins/plugins-settings-ui/plugins-settings-ui-ticket.module.js.map +0 -1
  409. package/dist/modules/custom-plugins/plugins-settings-ui/plugins-settings-ui-ticket.service.d.ts +0 -30
  410. package/dist/modules/custom-plugins/plugins-settings-ui/plugins-settings-ui-ticket.service.js.map +0 -1
  411. package/dist/modules/custom-plugins/plugins-settings-ui/plugins-settings-ui.controller.d.ts +0 -17
  412. package/dist/modules/custom-plugins/plugins-settings-ui/plugins-settings-ui.controller.js.map +0 -1
  413. package/dist/modules/custom-plugins/plugins-settings-ui/plugins-settings-ui.gateway.d.ts +0 -7
  414. package/dist/modules/custom-plugins/plugins-settings-ui/plugins-settings-ui.gateway.js.map +0 -1
  415. package/dist/modules/custom-plugins/plugins-settings-ui/plugins-settings-ui.module.d.ts +0 -2
  416. package/dist/modules/custom-plugins/plugins-settings-ui/plugins-settings-ui.module.js.map +0 -1
  417. package/dist/modules/custom-plugins/plugins-settings-ui/plugins-settings-ui.service.d.ts +0 -25
  418. package/dist/modules/custom-plugins/plugins-settings-ui/plugins-settings-ui.service.js.map +0 -1
  419. package/dist/modules/log/log.gateway.d.ts +0 -8
  420. package/dist/modules/log/log.gateway.js.map +0 -1
  421. package/dist/modules/log/log.module.d.ts +0 -2
  422. package/dist/modules/log/log.module.js.map +0 -1
  423. package/dist/modules/log/log.service.d.ts +0 -26
  424. package/dist/modules/log/log.service.js.map +0 -1
  425. package/dist/modules/platform-tools/docker/docker.controller.d.ts +0 -15
  426. package/dist/modules/platform-tools/docker/docker.controller.js.map +0 -1
  427. package/dist/modules/platform-tools/docker/docker.interfaces.d.ts +0 -14
  428. package/dist/modules/platform-tools/docker/docker.interfaces.js.map +0 -1
  429. package/dist/modules/platform-tools/docker/docker.module.d.ts +0 -2
  430. package/dist/modules/platform-tools/docker/docker.module.js.map +0 -1
  431. package/dist/modules/platform-tools/docker/docker.service.d.ts +0 -17
  432. package/dist/modules/platform-tools/docker/docker.service.js.map +0 -1
  433. package/dist/modules/platform-tools/hb-service/hb-service.controller.d.ts +0 -33
  434. package/dist/modules/platform-tools/hb-service/hb-service.controller.js.map +0 -1
  435. package/dist/modules/platform-tools/hb-service/hb-service.dto.d.ts +0 -7
  436. package/dist/modules/platform-tools/hb-service/hb-service.dto.js.map +0 -1
  437. package/dist/modules/platform-tools/hb-service/hb-service.module.d.ts +0 -2
  438. package/dist/modules/platform-tools/hb-service/hb-service.module.js.map +0 -1
  439. package/dist/modules/platform-tools/hb-service/hb-service.service.d.ts +0 -37
  440. package/dist/modules/platform-tools/hb-service/hb-service.service.js.map +0 -1
  441. package/dist/modules/platform-tools/linux/linux.controller.d.ts +0 -17
  442. package/dist/modules/platform-tools/linux/linux.controller.js.map +0 -1
  443. package/dist/modules/platform-tools/linux/linux.module.d.ts +0 -2
  444. package/dist/modules/platform-tools/linux/linux.module.js.map +0 -1
  445. package/dist/modules/platform-tools/linux/linux.service.d.ts +0 -20
  446. package/dist/modules/platform-tools/linux/linux.service.js.map +0 -1
  447. package/dist/modules/platform-tools/platform-tools.module.d.ts +0 -2
  448. package/dist/modules/platform-tools/platform-tools.module.js.map +0 -1
  449. package/dist/modules/platform-tools/terminal/terminal.controller.d.ts +0 -11
  450. package/dist/modules/platform-tools/terminal/terminal.controller.js.map +0 -1
  451. package/dist/modules/platform-tools/terminal/terminal.gateway.d.ts +0 -9
  452. package/dist/modules/platform-tools/terminal/terminal.gateway.js.map +0 -1
  453. package/dist/modules/platform-tools/terminal/terminal.interfaces.d.ts +0 -8
  454. package/dist/modules/platform-tools/terminal/terminal.interfaces.js.map +0 -1
  455. package/dist/modules/platform-tools/terminal/terminal.module.d.ts +0 -2
  456. package/dist/modules/platform-tools/terminal/terminal.module.js.map +0 -1
  457. package/dist/modules/platform-tools/terminal/terminal.service.d.ts +0 -25
  458. package/dist/modules/platform-tools/terminal/terminal.service.js.map +0 -1
  459. package/dist/modules/plugins/plugins.controller.d.ts +0 -35
  460. package/dist/modules/plugins/plugins.controller.js.map +0 -1
  461. package/dist/modules/plugins/plugins.dto.d.ts +0 -11
  462. package/dist/modules/plugins/plugins.dto.js.map +0 -1
  463. package/dist/modules/plugins/plugins.gateway.d.ts +0 -14
  464. package/dist/modules/plugins/plugins.gateway.js.map +0 -1
  465. package/dist/modules/plugins/plugins.interfaces.d.ts +0 -245
  466. package/dist/modules/plugins/plugins.interfaces.js.map +0 -1
  467. package/dist/modules/plugins/plugins.module.d.ts +0 -2
  468. package/dist/modules/plugins/plugins.module.js.map +0 -1
  469. package/dist/modules/plugins/plugins.service.d.ts +0 -140
  470. package/dist/modules/plugins/plugins.service.js.map +0 -1
  471. package/dist/modules/server/server.controller.d.ts +0 -141
  472. package/dist/modules/server/server.controller.js.map +0 -1
  473. package/dist/modules/server/server.dto.d.ts +0 -6
  474. package/dist/modules/server/server.dto.js.map +0 -1
  475. package/dist/modules/server/server.module.d.ts +0 -2
  476. package/dist/modules/server/server.module.js.map +0 -1
  477. package/dist/modules/server/server.service.d.ts +0 -159
  478. package/dist/modules/server/server.service.js.map +0 -1
  479. package/dist/modules/setup-wizard/setup-wizard.controller.d.ts +0 -12
  480. package/dist/modules/setup-wizard/setup-wizard.controller.js.map +0 -1
  481. package/dist/modules/setup-wizard/setup-wizard.guard.d.ts +0 -8
  482. package/dist/modules/setup-wizard/setup-wizard.guard.js.map +0 -1
  483. package/dist/modules/setup-wizard/setup-wizard.module.d.ts +0 -2
  484. package/dist/modules/setup-wizard/setup-wizard.module.js.map +0 -1
  485. package/dist/modules/status/status.controller.d.ts +0 -50
  486. package/dist/modules/status/status.controller.js.map +0 -1
  487. package/dist/modules/status/status.gateway.d.ts +0 -118
  488. package/dist/modules/status/status.gateway.js.map +0 -1
  489. package/dist/modules/status/status.interfaces.d.ts +0 -29
  490. package/dist/modules/status/status.interfaces.js.map +0 -1
  491. package/dist/modules/status/status.module.d.ts +0 -2
  492. package/dist/modules/status/status.module.js.map +0 -1
  493. package/dist/modules/status/status.service.d.ts +0 -148
  494. package/dist/modules/status/status.service.js.map +0 -1
  495. package/dist/modules/update-all/update-all-journal.service.d.ts +0 -21
  496. package/dist/modules/update-all/update-all-journal.service.js.map +0 -1
  497. package/dist/modules/update-all/update-all.controller.d.ts +0 -16
  498. package/dist/modules/update-all/update-all.controller.js.map +0 -1
  499. package/dist/modules/update-all/update-all.dto.d.ts +0 -6
  500. package/dist/modules/update-all/update-all.dto.js.map +0 -1
  501. package/dist/modules/update-all/update-all.gateway.d.ts +0 -17
  502. package/dist/modules/update-all/update-all.gateway.js.map +0 -1
  503. package/dist/modules/update-all/update-all.interfaces.d.ts +0 -47
  504. package/dist/modules/update-all/update-all.interfaces.js.map +0 -1
  505. package/dist/modules/update-all/update-all.module.d.ts +0 -2
  506. package/dist/modules/update-all/update-all.module.js.map +0 -1
  507. package/dist/modules/update-all/update-all.service.d.ts +0 -45
  508. package/dist/modules/update-all/update-all.service.js.map +0 -1
  509. package/dist/modules/users/users.controller.d.ts +0 -17
  510. package/dist/modules/users/users.controller.js.map +0 -1
  511. package/dist/modules/users/users.dto.d.ts +0 -24
  512. package/dist/modules/users/users.dto.js.map +0 -1
  513. package/dist/modules/users/users.module.d.ts +0 -2
  514. package/dist/modules/users/users.module.js.map +0 -1
  515. package/dist/self-check.d.ts +0 -1
  516. package/dist/self-check.js.map +0 -1
  517. package/public/chunk--S1jhj99.js +0 -1
  518. package/public/chunk--gMFCtRT.js +0 -1
  519. package/public/chunk-4Z2wpscr.js +0 -1
  520. package/public/chunk-B1eS6gbf.js +0 -1
  521. package/public/chunk-B7J_DEd0.js +0 -1
  522. package/public/chunk-B8vROI-d.js +0 -1
  523. package/public/chunk-BAd0O4gW.js +0 -1
  524. package/public/chunk-BDfEB4FV.js +0 -1
  525. package/public/chunk-BHjoYDLq.js +0 -1
  526. package/public/chunk-BHqL9R79.js +0 -67
  527. package/public/chunk-BN4U9rSE.js +0 -5
  528. package/public/chunk-BNNhjoI1.js +0 -1
  529. package/public/chunk-BNTbGEn3.js +0 -1
  530. package/public/chunk-BS6w3B6b.js +0 -1
  531. package/public/chunk-BSh28U61.js +0 -1
  532. package/public/chunk-BTzeUSyu.js +0 -1
  533. package/public/chunk-BVLjm6ko.js +0 -1
  534. package/public/chunk-BXiAKjNt.js +0 -1
  535. package/public/chunk-BYOdedtj.js +0 -1
  536. package/public/chunk-BfTHf9ZR.js +0 -1
  537. package/public/chunk-BhET3EFm.js +0 -1
  538. package/public/chunk-BiMFbNon.js +0 -5
  539. package/public/chunk-BnD74hTa.js +0 -17
  540. package/public/chunk-BpJgW0C6.js +0 -1
  541. package/public/chunk-BvSjeiPV.js +0 -1
  542. package/public/chunk-C22edc1p.js +0 -19
  543. package/public/chunk-C3S0LWO6.js +0 -1
  544. package/public/chunk-C3kKXALO.js +0 -73
  545. package/public/chunk-C3m_KISQ.js +0 -1
  546. package/public/chunk-C9-4W5Zl.js +0 -1
  547. package/public/chunk-CBcdhAIC.js +0 -1
  548. package/public/chunk-CDJq7gAj.js +0 -1
  549. package/public/chunk-CFbmYJyv.js +0 -1
  550. package/public/chunk-CGK0YlG1.js +0 -1
  551. package/public/chunk-CI1LdHoy.js +0 -1
  552. package/public/chunk-CKEAYXOK.js +0 -1
  553. package/public/chunk-CKMgGDEh.js +0 -1
  554. package/public/chunk-CLMwnLnr.js +0 -1
  555. package/public/chunk-CNAXW4l0.js +0 -1
  556. package/public/chunk-CPPK7vag.js +0 -1
  557. package/public/chunk-CRHbYauq.js +0 -1
  558. package/public/chunk-CTzWN5x0.js +0 -1
  559. package/public/chunk-CWcFqHcD.js +0 -1
  560. package/public/chunk-CY3RglHz.js +0 -1
  561. package/public/chunk-CaJ4Cj4p.js +0 -1
  562. package/public/chunk-Cegz3sZl.js +0 -1
  563. package/public/chunk-ChPOs7ik.js +0 -1
  564. package/public/chunk-CmUCKS87.js +0 -2
  565. package/public/chunk-Cq53pKFP.js +0 -1
  566. package/public/chunk-CryUwnyL.js +0 -1
  567. package/public/chunk-CsilwAGU.js +0 -1
  568. package/public/chunk-CtJ2jTul.js +0 -1
  569. package/public/chunk-CvZiiTwl.js +0 -1
  570. package/public/chunk-CwoMawBP.js +0 -1
  571. package/public/chunk-CxHMixVG.js +0 -4
  572. package/public/chunk-Cxw2UXlw.js +0 -1
  573. package/public/chunk-D2V9ohsD.js +0 -1
  574. package/public/chunk-D6_ZXQiE.js +0 -1
  575. package/public/chunk-D8Q4-S-g.js +0 -1
  576. package/public/chunk-DBZlqVaK.js +0 -1
  577. package/public/chunk-DJjyNWpq.js +0 -1
  578. package/public/chunk-DJx81Jfs.js +0 -1
  579. package/public/chunk-DMQxJh1E.js +0 -1
  580. package/public/chunk-DX6pXUxn.js +0 -16
  581. package/public/chunk-DZ6Hp7O3.js +0 -1
  582. package/public/chunk-DayDurvx.js +0 -4
  583. package/public/chunk-DbUtF0vQ.js +0 -1
  584. package/public/chunk-Dc28thUM.js +0 -1
  585. package/public/chunk-DcEEgjfF.js +0 -1
  586. package/public/chunk-DeorqTod.js +0 -1
  587. package/public/chunk-DkPKQ4GK.js +0 -1
  588. package/public/chunk-DvWZ5Kpp.js +0 -1
  589. package/public/chunk-DzNtNjfk.js +0 -1
  590. package/public/chunk-DzYzuNcO.js +0 -1
  591. package/public/chunk-GgnTXYnv.js +0 -1
  592. package/public/chunk-Gv2Kz7zp.js +0 -1
  593. package/public/chunk-IhhadhCK.js +0 -1
  594. package/public/chunk-MmCE8UIQ.js +0 -1
  595. package/public/chunk-NvCUgH5M.js +0 -1
  596. package/public/chunk-Q9_TRBaN.js +0 -1
  597. package/public/chunk-T39HTcY1.js +0 -1
  598. package/public/chunk-Utex2JI9.js +0 -1
  599. package/public/chunk-bUh5UWMs.js +0 -1
  600. package/public/chunk-c81Zhm0H.js +0 -1
  601. package/public/chunk-e-si5mXZ.js +0 -1
  602. package/public/chunk-eZh3WMHp.js +0 -1
  603. package/public/chunk-n9Xzwul5.js +0 -1
  604. package/public/chunk-qJ35hU8l.js +0 -1
  605. package/public/chunk-qv2ezFt0.js +0 -1
  606. package/public/chunk-t0uHycPB.js +0 -1
  607. package/public/chunk-tej1sHRm.js +0 -1
  608. package/public/chunk-w0JRhA3J.js +0 -1
  609. package/public/chunk-zMUwZaGi.js +0 -1
  610. package/public/chunk-zZNiignb.js +0 -1
  611. package/public/main-LANTCPD3.js +0 -98
  612. package/scripts/apply-patches.mjs +0 -27
  613. package/scripts/generate-prerelease-notes.mjs +0 -104
  614. package/scripts/verify-monaco-assets.mjs +0 -77
package/CHANGELOG.md CHANGED
@@ -9,16 +9,157 @@ All notable changes to `homebridge-config-ui-x` will be documented in this file.
9
9
  ### UI Changes
10
10
 
11
11
  - feat(accessories): show accessories that are not responding, with their HomeKit status (#3124)
12
+ - fix(auth): only serve and delete a wallpaper that is a plain image file name in the storage folder
13
+ - fix(auth): allow dev server origins only in development, so a site on port 8080 can't read a token
14
+ - fix(fs): keep a json file's mode and symlink when saving it, and remove the temp file on failure
15
+ - fix(auth): keep the token signing key private (0600), read it once, and never overwrite it
16
+ - fix(auth): keep the setup wizard closed when auth.json can't be read, and keep its users
17
+ - fix(auth): create auth.json readable by its owner only, as it holds password hashes
18
+ - fix(server): write tls private keys and pfx files readable by their owner only
19
+ - fix(accessories): save and load the room layout of the signed-in user, not the user a socket names
20
+ - fix(status): let only an admin save the shared dashboard layout, and refuse one that is not a list
21
+ - fix(ipc): ignore a null or malformed message from homebridge instead of crashing the ui process
22
+ - fix(accessories): wait for homebridge's accessoryInfoData reply when getting one matter accessory
23
+ - fix(plugins): stop the major update policy offering a beta of homebridge or the ui
24
+ - fix(plugins): check every version given to npm, and refuse cmd.exe characters on windows
25
+ - fix(accessories): never save an empty room layout from a modal left open after leaving the page
26
+ - fix(accessories): take the socket handlers off on stop, so each visit no longer adds another set
27
+ - fix(backup): leave the token signing key out, and restore none of the files a backup leaves out
28
+ - fix(backup): install only plugins with a valid name and version when restoring a backup
29
+ - fix(backup): keep old scheduled backups when today's fails, and never remove other instances' ones
30
+ - fix(backup): remove the temp folder of a backup upload that fails to extract
31
+ - fix(backup): free the restore slot when a restore fails part-way, and allow a config with no bridge
32
+ - fix(config-editor): keep saving when config.json has an older custom restart command
33
+ - fix(config-editor): save the hap and matter settings under the config lock, keeping other saves
34
+ - fix(config): start the ui without ssl, instead of not at all, when an ssl file is missing
35
+ - fix(terminal): ignore terminal input that is not text, which crashed the ui process
36
+ - fix(server): accept only a 12 hex digit id when reading one pairing, not a path
37
+ - fix(feature-flags): keep the hap bridge disable switch on for homebridge 3 and later
38
+ - fix(users): answer 400, not 500, when a password or 2fa field is missing, and require a password
39
+ - fix(auth): start a new user's session version at random, so a deleted user's token can't come back
40
+ - fix(auth): count logins still being checked toward the lockout, so a burst can't get past it
41
+ - fix(auth): take as long to refuse an unknown username as a wrong password
42
+ - fix(plugins): load the plugin list before a ui update reads its install path from it
43
+ - fix(plugins): cache npm's short version list apart from the full lookup, which needs the keywords
44
+ - fix(scheduler): restart a shared child bridge once, cancel every old job, and warn on a bad cron
45
+ - fix(config): read a session timeout typed as text as seconds, not milliseconds
46
+ - fix(config-editor): refuse a hap or matter switch with no true or false, which turned hap off
47
+ - fix(config-editor): refuse a whole config that is not an object, which was saved as an empty list
48
+ - feat(status): say matter failed to start on the dashboard code widget, in place of an empty box
49
+ - feat(plugins): say matter failed to start for a child bridge, not to restart to see the code
50
+ - fix(ui): use browser timer types instead of node.js ones, so a ui spec also builds on its own
51
+ - fix(login): say the account is locked for a while, or the ui can't be reached, not a wrong password
52
+ - fix(platform-tools): reboot or shut down the host only from a click, not again on back or reload
53
+ - fix(power-options): ask before restarting the operating system, as a shut down already does
54
+ - fix(ui): reload after an update on safari and firefox too, which showed a blank page
55
+ - fix(i18n): add the ten texts the ui uses that en.json lacked, and test that none are missing
56
+ - fix(plugins): take the install window's output listener off the socket and free its terminal
57
+ - fix(ui): take seven pages' socket listeners off when they close, so each visit no longer adds one
58
+ - fix(plugins): wait for an npm run to finish before the ui closes, so a restart never cuts it short
59
+ - fix(plugins): give npm 30 minutes, not 5, then kill it if needed so the queue moves on
60
+ - fix(terminal): end a socket's first shell when it starts a second, which got the same keystrokes
61
+ - fix(api): keep the reason a route gives for a 404, as json, not a bare not found
62
+ - fix(server): check cached accessory names before stopping homebridge, and skip a missing cache file
63
+ - fix(server): stop homebridge once, not twice, when resetting a bridge pairing
64
+ - fix(backup): save the ui block as config.json has it on an hbfx restore, not its start-up values
65
+ - fix(config-editor): put a plugin's blocks back where its first block was, not past other plugins
66
+ - fix(custom-plugins): pass on only request messages to a plugin's ui server, never junk or null
67
+ - fix(custom-plugins): answer a plugin's page when its cached accessories can't be read
68
+ - refactor(accessories): let the temperature and mired pipes take a missing value
69
+ - refactor(accessories): read hap tile values through typed helpers, ready for hap-client 5.4.1
70
+ - refactor(accessories): read hap control window values through typed helpers, for hap-client 5.4.1
71
+ - refactor(accessories): type the service-update handler as the list of services it gets
72
+ - fix(accessories): send a slider change made just before closing a control window
73
+ - fix(settings): save a setting typed just before leaving the page, instead of losing it
74
+ - fix(accessories): show a matter fan as on by its mode, and write the mode and speed together
75
+ - fix(plugins): remove a synology @eaDir folder before npm runs, which the check never did since 2020
76
+ - fix(accessories): clean up a socket that leaves during the first load, which stayed attached
77
+ - fix(log): clean up a socket that leaves while the log file is checked, which kept its tail listener
78
+ - fix(accessories): send a matter control once, not a second time when its reply is slow
79
+ - fix(accessories): show a control on one part of a matter device on that part, not the main tile
80
+ - fix(platform-tools): read hb-service startup settings that have no env block, not as empty
81
+ - fix(backup): restore none of the files a backup leaves out from an hbfx backup either
82
+ - fix(plugins): fail an npm run stopped at the time limit, which node-pty reports as exit code 0
83
+ - fix(status): say matter failed to start on the dashboard for the status homebridge really sends
84
+ - fix(custom-plugins): ignore a null or junk message from a plugin's ui server instead of crashing
85
+ - fix(auth): log out only for a 401 from the ui's own server, not from the weather widget's site
86
+ - fix(child-bridges): watch a socket once however often it asks, so each status update arrives once
87
+ - fix(status): keep the dashboard's status updates when the bridges widget is removed or re-made
88
+ - fix(update-all): keep the page's child bridge status updates when the update all window closes
89
+ - fix(status): keep a widget's resize and settings events working after the dashboard is unlocked
90
+ - fix(accessories): undo the accessory info edits when its window is closed with escape
91
+ - fix(plugins): take the json config window's monaco marker listener off when it closes
92
+ - fix(terminal): start a re-attached terminal again when its socket reconnects, not leave it silent
93
+ - fix(plugins): run npm on windows from a user folder with a ! or % in its name, as before
94
+ - fix(plugins): treat an empty version in a plugin update as latest again, not refuse it
95
+ - fix(auth): show a wallpaper uploaded with no file extension, saved as ui-wallpaper
96
+ - fix(auth): write a new signing key through a new temp file, so a leftover one can't make it 0644
97
+ - fix(server): make an existing tls key file private before writing the new key into it
98
+ - fix(auth): check at most two passwords at once, so made-up usernames can't fill the thread pool
99
+ - fix(server): survive a promise rejected with nothing, and end the ui only for a port error
100
+ - fix(accessories): write only a mode a matter fan has, from its mode list, with a new speed
101
+ - fix(accessories): put a matter fan window's switch back by its mode after a failed write
102
+ - fix(spa): read index.html on each request again, so a reload after a ui update gets the new one
103
+ - fix(terminal): end a socket's first shell even when two starts arrive at once
104
+ - fix(ui): add no socket listener for a page that has already closed, instead of throwing
105
+ - fix(login): say something went wrong for a server error, not that the ui can't be reached
106
+ - fix(plugins): keep a custom ui path inside its own plugin, not a folder whose name starts the same
107
+ - fix(platform-tools): fail a log download without colours when the read fails, not hang
108
+ - fix(server): keep the old wallpaper when an upload fails, writing the new one to a temp file first
109
+ - fix(backup): remove old scheduled backups of an older bridge username from the default folder
110
+ - fix(status): let only an admin drag the dashboard accessories, as only an admin's order is saved
111
+ - fix(plugins): save an update preference chosen just before the version window closes
112
+ - fix(plugins): read a beta changelog from the newest beta branch, not the last one by name
113
+ - fix(accessories): show a matter fan as on while its current speed is above 0, whatever its mode
114
+ - fix(plugins): on close, wait only for the npm run in progress and drop the queued ones
115
+ - feat(config): show the masked config in a read-only monaco editor on a big screen
116
+ - fix(config): drop the empty strip left of the line numbers in the config editor
117
+ - feat(config): show the secrets toggle as a lock icon, with the masking notice in its tooltip
12
118
 
13
119
  ### Other Changes
14
120
 
15
121
  - ci: stop running the validate jobs on node.js v20
122
+ - ci: pin the wiki notification action to a commit and keep the npm publish token to the publish job
123
+ - build: stop publishing 134 source maps whose sources are not shipped, and 134 unused type files
124
+ - test: typecheck the server tests and ui tests in ci, and fix the six type errors it found
125
+ - build: stop publishing three build-only scripts, and fix the patches note in claude.md
126
+ - fix(hb-service): on stop, wait for homebridge to end before closing the ui, and never restart it
127
+ - fix(hb-service): only replace a config.json that is not valid json, never one that failed to save
128
+ - fix(hb-service): log to the console when the log file can't be written, instead of crashing
129
+ - fix(hb-service): trim the log safely when the size to keep is over the maximum, from a whole line
130
+ - fix(hb-service): trim the log at start-up too, so a service that restarts often still trims it
131
+ - fix(hb-service): on freebsd, install for the user who ran sudo when no --user is given
132
+ - fix(hb-service): ask before installing an odd node.js major (23, 25), as for any major not tested
133
+ - fix(hb-service): match update-node 22.1 to v22.1.x, not v22.19.0, and 2 to nothing, not v26
134
+ - fix(hb-service): show the log with hb-service view on macos, windows and freebsd
135
+ - ci: pin the third-party actions to a commit
136
+ - chore: add the homepage url to package.json
137
+ - chore: drop the stale maintainers field from package.json
138
+ - refactor(auth): import createGuardrails from otplib instead of the undeclared @otplib/core
139
+ - build: declare socket.io, whose Socket type the accessories service imports
140
+ - build: compile the server for es2024, which node 22 runs in full, instead of the moving esnext
141
+ - ci: name the labeler job labeler, not stale
142
+ - ci: fix the labeler comment that says alpha pull requests get the beta label
143
+ - fix(hb-service): never start homebridge from a restart timer that fires while hb-service stops
144
+ - docs(plugins): put the package queue's comment back on the queue, not on the npm time limit
145
+ - fix(hb-service): keep a config.json that starts with a byte order mark, instead of replacing it
146
+ - test(server): make the wallpaper delete test fail without its fix, using a file not config.json
147
+ - fix(hb-service): write homebridge output that never ends a line, instead of holding it for ever
148
+ - fix(hb-service): keep the newest part of the log for a maximum size of 0, not empty it
149
+ - fix(hb-service): append the kept log when trimming, so a line written meanwhile is not cut
150
+ - test(scheduler): check the old restart jobs on a copy, as the refresh empties the list in place
151
+ - fix(hb-service): keep config.json's owner when saving it as root, as sudo hb-service install does
152
+ - ci: name the release tag the upload-release-assets pin points at, v4.0.0, not the v4.0 branch
153
+ - test(i18n): find a missing key in a ternary, a helper call or a template, not only before translate
154
+ - fix: import types with import type, so each server file builds on its own as the swc dev server needs
155
+ - chore(dev): run the dev server through swc, so nest checks api data in dev as a release does
156
+ - chore(deps): dependency updates
16
157
 
17
158
  ### Homebridge Dependencies
18
159
 
19
- - `@homebridge/hap-client` @ `v5.4.0`
160
+ - `@homebridge/hap-client` @ `v5.4.1-beta`
20
161
  - `@homebridge/node-pty-prebuilt-multiarch` @ `v0.15.0`
21
- - `@homebridge/plugin-ui-utils` @ `v2.3.0`
162
+ - `@homebridge/plugin-ui-utils` @ `v2.3.1-beta`
22
163
 
23
164
  ## v5.30.1 (2026-11-13)
24
165
 
@@ -35,4 +35,3 @@ AppController = __decorate([
35
35
  __metadata("design:paramtypes", [AppService])
36
36
  ], AppController);
37
37
  export { AppController };
38
- //# sourceMappingURL=app.controller.js.map
@@ -19,4 +19,3 @@ AppGateway = __decorate([
19
19
  })
20
20
  ], AppGateway);
21
21
  export { AppGateway };
22
- //# sourceMappingURL=app.gateway.js.map
@@ -58,4 +58,3 @@ AppModule = __decorate([
58
58
  })
59
59
  ], AppModule);
60
60
  export { AppModule };
61
- //# sourceMappingURL=app.module.js.map
@@ -14,4 +14,3 @@ AppService = __decorate([
14
14
  Injectable()
15
15
  ], AppService);
16
16
  export { AppService };
17
- //# sourceMappingURL=app.service.js.map
@@ -32,10 +32,7 @@ export class BasePlatform {
32
32
  this.hbService.logger.error('This command has not been implemented on this platform.');
33
33
  process.exit(0);
34
34
  }
35
- async viewLogs() {
36
- this.hbService.logger.error('This command has not been implemented on this platform.');
37
- process.exit(0);
38
- }
35
+ async viewLogs() { }
39
36
  async getId() {
40
37
  return {
41
38
  uid: 0,
@@ -51,4 +48,3 @@ export class BasePlatform {
51
48
  process.exit(0);
52
49
  }
53
50
  }
54
- //# sourceMappingURL=base-platform.js.map
@@ -0,0 +1,45 @@
1
+ import { randomBytes } from 'node:crypto';
2
+ import { chown, readFile, realpath, rename, stat, unlink, writeFile } from 'node:fs/promises';
3
+ import process from 'node:process';
4
+ export async function readConfigForCheck(path) {
5
+ const text = (await readFile(path, 'utf8')).replace(/^\uFEFF/, '');
6
+ try {
7
+ const config = JSON.parse(text);
8
+ return config && typeof config === 'object' && !Array.isArray(config)
9
+ ? config
10
+ : undefined;
11
+ }
12
+ catch {
13
+ return undefined;
14
+ }
15
+ }
16
+ export async function writeConfigAtomically(path, config) {
17
+ let target = path;
18
+ let mode;
19
+ let owner;
20
+ try {
21
+ target = await realpath(path);
22
+ const current = await stat(target);
23
+ mode = current.mode & 0o7777;
24
+ owner = { uid: current.uid, gid: current.gid };
25
+ }
26
+ catch (e) {
27
+ if (e?.code !== 'ENOENT') {
28
+ throw e;
29
+ }
30
+ }
31
+ const tmpPath = `${target}.tmp.${process.pid}.${randomBytes(6).toString('hex')}`;
32
+ try {
33
+ await writeFile(tmpPath, `${JSON.stringify(config, null, 4)}\n`, mode === undefined
34
+ ? undefined
35
+ : { mode });
36
+ if (owner && process.getuid?.() === 0) {
37
+ await chown(tmpPath, owner.uid, owner.gid);
38
+ }
39
+ await rename(tmpPath, target);
40
+ }
41
+ catch (e) {
42
+ await unlink(tmpPath).catch(() => undefined);
43
+ throw e;
44
+ }
45
+ }
@@ -14,4 +14,3 @@ export async function confirmUnknownNode(version, logger) {
14
14
  }
15
15
  return confirmed;
16
16
  }
17
- //# sourceMappingURL=confirm-unknown-node.js.map
package/dist/bin/fork.js CHANGED
@@ -9,4 +9,3 @@ process.on('disconnect', () => {
9
9
  process.exit();
10
10
  });
11
11
  import('../main.js');
12
- //# sourceMappingURL=fork.js.map
@@ -1,13 +1,11 @@
1
1
  #!/usr/bin/env node
2
- import { Buffer } from 'node:buffer';
3
2
  import { execFileSync, execSync, fork } from 'node:child_process';
4
3
  import { randomInt } from 'node:crypto';
5
4
  import { chownSync, createReadStream, createWriteStream, existsSync } from 'node:fs';
6
- import { mkdtemp, open, readFile, rename, stat } from 'node:fs/promises';
5
+ import { mkdtemp, readFile, rename, stat } from 'node:fs/promises';
7
6
  import { arch, cpus, homedir, platform, release, tmpdir, type } from 'node:os';
8
7
  import { dirname, join, resolve } from 'node:path';
9
8
  import process from 'node:process';
10
- import { StringDecoder } from 'node:string_decoder';
11
9
  import { fileURLToPath } from 'node:url';
12
10
  import axios from 'axios';
13
11
  import { program } from 'commander';
@@ -18,14 +16,18 @@ import { networkInterfaceDefault, networkInterfaces } from 'systeminformation';
18
16
  import { Tail } from 'tail';
19
17
  import { extract } from 'tar';
20
18
  import { check as tcpCheck } from 'tcp-port-used';
21
- import { isNodeMajorKnown, isNodeMajorSupported, pickNodeUpdate } from '../core/node-version.constants.js';
19
+ import { findRequestedNodeVersion, isNodeMajorKnown, isNodeMajorSupported, pickNodeUpdate } from '../core/node-version.constants.js';
22
20
  import { RE_COLON, RE_NON_SCOPED, RE_PLUGIN_NAME, RE_SCOPED, RE_SERVICE_NAME } from '../core/regex.constants.js';
21
+ import { readConfigForCheck, writeConfigAtomically } from './config-file.js';
23
22
  import { confirmUnknownNode } from './confirm-unknown-node.js';
23
+ import { LineBuffer } from './line-buffer.js';
24
+ import { openLogFile, truncateLogFile } from './log-file.js';
24
25
  import { Logger } from './logger.js';
25
26
  import { DarwinInstaller } from './platforms/darwin.js';
26
27
  import { FreeBSDInstaller } from './platforms/freebsd.js';
27
28
  import { LinuxInstaller } from './platforms/linux.js';
28
29
  import { Win32Installer } from './platforms/win32.js';
30
+ import { gracefulShutdown } from './shutdown.js';
29
31
  process.title = 'hb-service';
30
32
  const __filename = fileURLToPath(import.meta.url);
31
33
  const __dirname = dirname(__filename);
@@ -46,6 +48,8 @@ export class HomebridgeServiceHelper {
46
48
  homebridgeBinary;
47
49
  homebridge;
48
50
  homebridgeOpts = ['-I'];
51
+ shuttingDown = false;
52
+ closeUi;
49
53
  homebridgeCustomEnv = {};
50
54
  uiBinary;
51
55
  stdout;
@@ -253,7 +257,14 @@ export class HomebridgeServiceHelper {
253
257
  return;
254
258
  }
255
259
  this.logger.debug(`Logging to ${this.logPath}.`);
256
- this.logFile = createWriteStream(this.logPath, { flags: 'a' });
260
+ const stdoutWrite = process.stdout.write.bind(process.stdout);
261
+ const stderrWrite = process.stderr.write.bind(process.stderr);
262
+ this.logFile = openLogFile(this.logPath, (e) => {
263
+ process.stdout.write = stdoutWrite;
264
+ process.stderr.write = stderrWrite;
265
+ this.logFile = process.stdout;
266
+ this.logger.warn(`Could not write the log file ${this.logPath} (${e.message}). Logging to the console instead.`);
267
+ });
257
268
  process.stdout.write = process.stderr.write = this.logFile.write.bind(this.logFile);
258
269
  }
259
270
  async readConfig() {
@@ -268,27 +279,14 @@ export class HomebridgeServiceHelper {
268
279
  const uiConfigBlock = currentConfig.platforms?.find((x) => x.platform === 'config');
269
280
  const maxSize = uiConfigBlock?.log?.maxSize ?? 1000000;
270
281
  const truncateSize = uiConfigBlock?.log?.truncateSize ?? 200000;
271
- if (maxSize < 0) {
272
- return;
273
- }
274
- const logStats = await stat(this.logPath);
275
- if (logStats.size < maxSize) {
276
- return;
277
- }
278
- const logStartPosition = logStats.size - truncateSize;
279
- const logBuffer = Buffer.alloc(truncateSize);
280
- const logFileHandle = await open(this.logPath, 'a+');
281
282
  const corked = this.logFile && typeof this.logFile.cork === 'function';
282
283
  if (corked) {
283
284
  this.logFile.cork();
284
285
  }
285
286
  try {
286
- await logFileHandle.read(logBuffer, 0, truncateSize, logStartPosition);
287
- await logFileHandle.truncate();
288
- await logFileHandle.write(logBuffer);
287
+ await truncateLogFile(this.logPath, maxSize, truncateSize);
289
288
  }
290
289
  finally {
291
- await logFileHandle.close();
292
290
  if (corked) {
293
291
  this.logFile.uncork();
294
292
  }
@@ -312,6 +310,7 @@ export class HomebridgeServiceHelper {
312
310
  try {
313
311
  await this.storagePathCheck();
314
312
  await this.startLog();
313
+ await this.truncateLog();
315
314
  await this.configCheck();
316
315
  this.logger.debug(`OS: ${type()} ${release()} ${arch()}.`);
317
316
  this.logger.debug(`Node.js ${process.version} ${process.execPath}.`);
@@ -342,23 +341,26 @@ export class HomebridgeServiceHelper {
342
341
  }
343
342
  startExitHandler() {
344
343
  const exitHandler = () => {
345
- this.logger.debug('Stopping services...');
346
- try {
347
- this.homebridge.kill();
344
+ if (this.shuttingDown) {
345
+ return;
348
346
  }
349
- catch (e) { }
350
- setTimeout(() => {
351
- try {
352
- this.homebridge.kill('SIGKILL');
353
- }
354
- catch (e) { }
355
- process.exit(1282);
356
- }, 7000);
347
+ this.shuttingDown = true;
348
+ this.logger.debug('Stopping services...');
349
+ void gracefulShutdown({
350
+ child: this.homebridge,
351
+ closeUi: this.closeUi,
352
+ log: message => this.logger.warn(message),
353
+ }).finally(() => {
354
+ process.exit(0);
355
+ });
357
356
  };
358
357
  process.on('SIGTERM', exitHandler);
359
358
  process.on('SIGINT', exitHandler);
360
359
  }
361
360
  runHomebridge() {
361
+ if (this.shuttingDown) {
362
+ return;
363
+ }
362
364
  if (!this.homebridgeBinary || !pathExistsSync(this.homebridgeBinary)) {
363
365
  this.logger.error('Could not find Homebridge. Make sure you have installed Homebridge using the -g flag then restart.');
364
366
  this.logger.error('npm install -g homebridge');
@@ -401,57 +403,21 @@ export class HomebridgeServiceHelper {
401
403
  this.ipcService.setHomebridgeVersion(this.homebridgePackage.version, this.homebridgeModulePath);
402
404
  }
403
405
  this.logger.success(`Started Homebridge v${this.homebridgePackage.version} with PID: ${this.homebridge.pid}.`);
404
- const outDecoder = new StringDecoder('utf8');
405
- const errDecoder = new StringDecoder('utf8');
406
- let outBuf = '';
407
- let errBuf = '';
408
- const flushLines = (key) => {
409
- const buf = key === 'out'
410
- ? outBuf
411
- : errBuf;
412
- let consumed = 0;
413
- let idx = buf.indexOf('\n', consumed);
414
- while (idx !== -1) {
415
- this.logFile.write(buf.slice(consumed, idx + 1));
416
- consumed = idx + 1;
417
- idx = buf.indexOf('\n', consumed);
418
- }
419
- const remainder = buf.slice(consumed);
420
- if (key === 'out') {
421
- outBuf = remainder;
422
- }
423
- else {
424
- errBuf = remainder;
425
- }
426
- };
427
- this.homebridge.stdout.on('data', (data) => {
428
- outBuf += outDecoder.write(data);
429
- flushLines('out');
430
- });
431
- this.homebridge.stderr.on('data', (data) => {
432
- errBuf += errDecoder.write(data);
433
- flushLines('err');
434
- });
406
+ const out = new LineBuffer(text => this.logFile.write(text));
407
+ const err = new LineBuffer(text => this.logFile.write(text));
408
+ this.homebridge.stdout.on('data', data => out.push(data));
409
+ this.homebridge.stderr.on('data', data => err.push(data));
435
410
  this.homebridge.on('close', (code, signal) => {
436
- outBuf += outDecoder.end();
437
- errBuf += errDecoder.end();
438
- if (outBuf) {
439
- this.logFile.write(outBuf.endsWith('\n')
440
- ? outBuf
441
- : `${outBuf}\n`);
442
- outBuf = '';
443
- }
444
- if (errBuf) {
445
- this.logFile.write(errBuf.endsWith('\n')
446
- ? errBuf
447
- : `${errBuf}\n`);
448
- errBuf = '';
449
- }
411
+ out.end();
412
+ err.end();
450
413
  this.handleHomebridgeClose(code, signal);
451
414
  });
452
415
  }
453
416
  handleHomebridgeClose(code, signal) {
454
417
  this.logger.log(`Homebridge process ended. Code: ${code}, signal: ${signal}.`);
418
+ if (this.shuttingDown) {
419
+ return;
420
+ }
455
421
  this.checkForStaleHomebridgeProcess();
456
422
  this.refreshHomebridgePackage();
457
423
  setTimeout(() => {
@@ -464,6 +430,7 @@ export class HomebridgeServiceHelper {
464
430
  const main = await import('../main.js');
465
431
  const ui = await main.app;
466
432
  this.ipcService = ui.get(main.HomebridgeIpcService);
433
+ this.closeUi = main.shutdownUi;
467
434
  }
468
435
  catch (e) {
469
436
  this.logger.log('The user interface threw an unhandled error.');
@@ -592,68 +559,15 @@ export class HomebridgeServiceHelper {
592
559
  await this.createDefaultConfig();
593
560
  restartRequired = true;
594
561
  }
562
+ let currentConfig;
595
563
  try {
596
- const currentConfig = await this.readConfig();
597
- if (!Array.isArray(currentConfig.platforms)) {
598
- currentConfig.platforms = [];
599
- }
600
- let uiConfigBlock = currentConfig.platforms.find((x) => x.platform === 'config');
601
- if (!uiConfigBlock) {
602
- this.logger.log(`Adding missing UI platform block to ${process.env.UIX_CONFIG_PATH}.`);
603
- uiConfigBlock = await this.createDefaultUiConfig();
604
- currentConfig.platforms.push(uiConfigBlock);
605
- saveRequired = true;
606
- restartRequired = true;
607
- }
608
- if (this.action !== 'install' && typeof uiConfigBlock.port !== 'number') {
609
- uiConfigBlock.port = await this.getLastKnownUiPort();
610
- this.logger.log(`Added missing port number to UI config: ${uiConfigBlock.port}.`);
611
- saveRequired = true;
612
- restartRequired = true;
613
- }
614
- if (this.action === 'install') {
615
- if (uiConfigBlock.port !== this.uiPort) {
616
- uiConfigBlock.port = this.uiPort;
617
- this.logger.warn(`Homebridge UI port in ${process.env.UIX_CONFIG_PATH} changed to: ${this.uiPort}.`);
618
- }
619
- delete uiConfigBlock.restart;
620
- delete uiConfigBlock.sudo;
621
- delete uiConfigBlock.log;
622
- saveRequired = true;
623
- }
624
- if (typeof uiConfigBlock.port !== 'number') {
625
- uiConfigBlock.port = await this.getLastKnownUiPort();
626
- this.logger.log(`Added missing port number to UI config: ${uiConfigBlock.port}.`);
627
- saveRequired = true;
628
- restartRequired = true;
629
- }
630
- if (!currentConfig.bridge) {
631
- currentConfig.bridge = await this.generateBridgeConfig();
632
- this.logger.log('Added missing Homebridge bridge section to the config.json.');
633
- saveRequired = true;
634
- }
635
- if (!currentConfig.bridge.port) {
636
- currentConfig.bridge.port = await this.generatePort();
637
- this.logger.log(`Added port to the Homebridge bridge section of the config.json: ${currentConfig.bridge.port}.`);
638
- saveRequired = true;
639
- }
640
- if ((uiConfigBlock && currentConfig.bridge.port === uiConfigBlock.port) || currentConfig.bridge.port === 8080) {
641
- currentConfig.bridge.port = await this.generatePort();
642
- this.logger.log(`Bridge port must not be the same as the UI port. Changing bridge port to: ${currentConfig.bridge.port}.`);
643
- saveRequired = true;
644
- }
645
- if (currentConfig.plugins && Array.isArray(currentConfig.plugins)) {
646
- if (!currentConfig.plugins.includes('homebridge-config-ui-x')) {
647
- currentConfig.plugins.push('homebridge-config-ui-x');
648
- this.logger.log('Added Homebridge UI to the plugins array in the config.json.');
649
- saveRequired = true;
650
- }
651
- }
652
- if (saveRequired) {
653
- await writeJson(process.env.UIX_CONFIG_PATH, currentConfig, { spaces: 4 });
654
- }
564
+ currentConfig = await readConfigForCheck(process.env.UIX_CONFIG_PATH);
655
565
  }
656
566
  catch (e) {
567
+ this.logger.error(`Could not read ${process.env.UIX_CONFIG_PATH}: ${e.message}. It was left as it is.`);
568
+ process.exit(1);
569
+ }
570
+ if (!currentConfig) {
657
571
  const backupFile = resolve(this.storagePath, `config.json.invalid.${Date.now().toString()}`);
658
572
  this.logger.warn(`${process.env.UIX_CONFIG_PATH} does not contain valid JSON.`);
659
573
  this.logger.warn(`Invalid config.json file has been backed up to ${backupFile}.`);
@@ -661,6 +575,71 @@ export class HomebridgeServiceHelper {
661
575
  await this.createDefaultConfig();
662
576
  restartRequired = true;
663
577
  }
578
+ if (currentConfig) {
579
+ try {
580
+ if (!Array.isArray(currentConfig.platforms)) {
581
+ currentConfig.platforms = [];
582
+ }
583
+ let uiConfigBlock = currentConfig.platforms.find((x) => x.platform === 'config');
584
+ if (!uiConfigBlock) {
585
+ this.logger.log(`Adding missing UI platform block to ${process.env.UIX_CONFIG_PATH}.`);
586
+ uiConfigBlock = await this.createDefaultUiConfig();
587
+ currentConfig.platforms.push(uiConfigBlock);
588
+ saveRequired = true;
589
+ restartRequired = true;
590
+ }
591
+ if (this.action !== 'install' && typeof uiConfigBlock.port !== 'number') {
592
+ uiConfigBlock.port = await this.getLastKnownUiPort();
593
+ this.logger.log(`Added missing port number to UI config: ${uiConfigBlock.port}.`);
594
+ saveRequired = true;
595
+ restartRequired = true;
596
+ }
597
+ if (this.action === 'install') {
598
+ if (uiConfigBlock.port !== this.uiPort) {
599
+ uiConfigBlock.port = this.uiPort;
600
+ this.logger.warn(`Homebridge UI port in ${process.env.UIX_CONFIG_PATH} changed to: ${this.uiPort}.`);
601
+ }
602
+ delete uiConfigBlock.restart;
603
+ delete uiConfigBlock.sudo;
604
+ delete uiConfigBlock.log;
605
+ saveRequired = true;
606
+ }
607
+ if (typeof uiConfigBlock.port !== 'number') {
608
+ uiConfigBlock.port = await this.getLastKnownUiPort();
609
+ this.logger.log(`Added missing port number to UI config: ${uiConfigBlock.port}.`);
610
+ saveRequired = true;
611
+ restartRequired = true;
612
+ }
613
+ if (!currentConfig.bridge) {
614
+ currentConfig.bridge = await this.generateBridgeConfig();
615
+ this.logger.log('Added missing Homebridge bridge section to the config.json.');
616
+ saveRequired = true;
617
+ }
618
+ if (!currentConfig.bridge.port) {
619
+ currentConfig.bridge.port = await this.generatePort();
620
+ this.logger.log(`Added port to the Homebridge bridge section of the config.json: ${currentConfig.bridge.port}.`);
621
+ saveRequired = true;
622
+ }
623
+ if ((uiConfigBlock && currentConfig.bridge.port === uiConfigBlock.port) || currentConfig.bridge.port === 8080) {
624
+ currentConfig.bridge.port = await this.generatePort();
625
+ this.logger.log(`Bridge port must not be the same as the UI port. Changing bridge port to: ${currentConfig.bridge.port}.`);
626
+ saveRequired = true;
627
+ }
628
+ if (currentConfig.plugins && Array.isArray(currentConfig.plugins)) {
629
+ if (!currentConfig.plugins.includes('homebridge-config-ui-x')) {
630
+ currentConfig.plugins.push('homebridge-config-ui-x');
631
+ this.logger.log('Added Homebridge UI to the plugins array in the config.json.');
632
+ saveRequired = true;
633
+ }
634
+ }
635
+ if (saveRequired) {
636
+ await writeConfigAtomically(process.env.UIX_CONFIG_PATH, currentConfig);
637
+ }
638
+ }
639
+ catch (e) {
640
+ this.logger.error(`Could not update ${process.env.UIX_CONFIG_PATH}: ${e.message}. It was left as it is.`);
641
+ }
642
+ }
664
643
  if (restartRequired && this.action === 'run' && await this.isRaspbianImage()) {
665
644
  this.logger.log('Restarting process after port number update.');
666
645
  process.exit(1);
@@ -908,7 +887,7 @@ export class HomebridgeServiceHelper {
908
887
  return { update: false };
909
888
  }
910
889
  if (requestedVersion) {
911
- const wantedVersion = versionList.find(x => x.version.startsWith(`v${requestedVersion}`));
890
+ const wantedVersion = findRequestedNodeVersion(versionList, requestedVersion);
912
891
  if (wantedVersion) {
913
892
  if (!gte(wantedVersion.version, '22.12.0')) {
914
893
  this.logger.error('Refusing to install Node.js version lower than v22.12.0.');
@@ -1074,4 +1053,3 @@ function bootstrap() {
1074
1053
  return new HomebridgeServiceHelper();
1075
1054
  }
1076
1055
  bootstrap();
1077
- //# sourceMappingURL=hb-service.js.map