@fastybird/smart-panel-backend 1.1.0-alpha.5 → 1.1.0-alpha.50

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 (538) hide show
  1. package/dist/app.module.js +9 -1
  2. package/dist/app.module.js.map +1 -1
  3. package/dist/common/utils/cancellable-exec.utils.d.ts +5 -0
  4. package/dist/common/utils/cancellable-exec.utils.js +34 -0
  5. package/dist/common/utils/cancellable-exec.utils.js.map +1 -0
  6. package/dist/common/utils/remote-access-observation.utils.d.ts +11 -0
  7. package/dist/common/utils/remote-access-observation.utils.js +89 -0
  8. package/dist/common/utils/remote-access-observation.utils.js.map +1 -0
  9. package/dist/dataSource.js +1 -0
  10. package/dist/dataSource.js.map +1 -1
  11. package/dist/migrations/1000000000026-AddHardwareInputCategories.d.ts +7 -0
  12. package/dist/migrations/1000000000026-AddHardwareInputCategories.js +364 -0
  13. package/dist/migrations/1000000000026-AddHardwareInputCategories.js.map +1 -0
  14. package/dist/modules/auth/auth.module.js +4 -0
  15. package/dist/modules/auth/auth.module.js.map +1 -1
  16. package/dist/modules/auth/guards/auth.guard.js +8 -21
  17. package/dist/modules/auth/guards/auth.guard.js.map +1 -1
  18. package/dist/modules/auth/services/token-metadata.service.d.ts +42 -0
  19. package/dist/modules/auth/services/token-metadata.service.js +202 -0
  20. package/dist/modules/auth/services/token-metadata.service.js.map +1 -0
  21. package/dist/modules/auth/services/token-usage.service.d.ts +22 -0
  22. package/dist/modules/auth/services/token-usage.service.js +93 -0
  23. package/dist/modules/auth/services/token-usage.service.js.map +1 -0
  24. package/dist/modules/auth/services/tokens.service.d.ts +10 -3
  25. package/dist/modules/auth/services/tokens.service.js +26 -10
  26. package/dist/modules/auth/services/tokens.service.js.map +1 -1
  27. package/dist/modules/devices/controllers/channels.controller.d.ts +5 -1
  28. package/dist/modules/devices/controllers/channels.controller.js +34 -2
  29. package/dist/modules/devices/controllers/channels.controller.js.map +1 -1
  30. package/dist/modules/devices/controllers/channels.properties.controller.js +21 -4
  31. package/dist/modules/devices/controllers/channels.properties.controller.js.map +1 -1
  32. package/dist/modules/devices/controllers/devices.channels.controller.d.ts +5 -1
  33. package/dist/modules/devices/controllers/devices.channels.controller.js +38 -2
  34. package/dist/modules/devices/controllers/devices.channels.controller.js.map +1 -1
  35. package/dist/modules/devices/controllers/devices.channels.properties.controller.js +21 -4
  36. package/dist/modules/devices/controllers/devices.channels.properties.controller.js.map +1 -1
  37. package/dist/modules/devices/devices.constants.d.ts +6 -0
  38. package/dist/modules/devices/devices.constants.js +6 -0
  39. package/dist/modules/devices/devices.constants.js.map +1 -1
  40. package/dist/modules/devices/devices.module.js +27 -0
  41. package/dist/modules/devices/devices.module.js.map +1 -1
  42. package/dist/modules/devices/devices.openapi.d.ts +3 -1
  43. package/dist/modules/devices/devices.openapi.js +7 -0
  44. package/dist/modules/devices/devices.openapi.js.map +1 -1
  45. package/dist/modules/devices/dto/channel-input-occurrence.dto.d.ts +10 -0
  46. package/dist/modules/devices/dto/channel-input-occurrence.dto.js +99 -0
  47. package/dist/modules/devices/dto/channel-input-occurrence.dto.js.map +1 -0
  48. package/dist/modules/devices/dto/property-command.dto.js +2 -8
  49. package/dist/modules/devices/dto/property-command.dto.js.map +1 -1
  50. package/dist/modules/devices/models/channel-input-capabilities.model.d.ts +20 -0
  51. package/dist/modules/devices/models/channel-input-capabilities.model.js +111 -0
  52. package/dist/modules/devices/models/channel-input-capabilities.model.js.map +1 -0
  53. package/dist/modules/devices/models/channel-input-occurrence.model.d.ts +22 -0
  54. package/dist/modules/devices/models/channel-input-occurrence.model.js +154 -0
  55. package/dist/modules/devices/models/channel-input-occurrence.model.js.map +1 -0
  56. package/dist/modules/devices/services/channel-input-deduplication.service.d.ts +17 -0
  57. package/dist/modules/devices/services/channel-input-deduplication.service.js +88 -0
  58. package/dist/modules/devices/services/channel-input-deduplication.service.js.map +1 -0
  59. package/dist/modules/devices/services/channel-input-occurrences.service.d.ts +21 -0
  60. package/dist/modules/devices/services/channel-input-occurrences.service.js +163 -0
  61. package/dist/modules/devices/services/channel-input-occurrences.service.js.map +1 -0
  62. package/dist/modules/devices/services/channels.properties.service.d.ts +32 -3
  63. package/dist/modules/devices/services/channels.properties.service.js +360 -51
  64. package/dist/modules/devices/services/channels.properties.service.js.map +1 -1
  65. package/dist/modules/devices/services/channels.service.d.ts +1 -0
  66. package/dist/modules/devices/services/channels.service.js +52 -38
  67. package/dist/modules/devices/services/channels.service.js.map +1 -1
  68. package/dist/modules/devices/services/command-latency-trace-collector.service.d.ts +101 -0
  69. package/dist/modules/devices/services/command-latency-trace-collector.service.js +451 -0
  70. package/dist/modules/devices/services/command-latency-trace-collector.service.js.map +1 -0
  71. package/dist/modules/devices/services/device-command-graph.service.d.ts +18 -0
  72. package/dist/modules/devices/services/device-command-graph.service.js +92 -0
  73. package/dist/modules/devices/services/device-command-graph.service.js.map +1 -0
  74. package/dist/modules/devices/services/device-structure-lock.service.d.ts +10 -2
  75. package/dist/modules/devices/services/device-structure-lock.service.js +86 -7
  76. package/dist/modules/devices/services/device-structure-lock.service.js.map +1 -1
  77. package/dist/modules/devices/services/devices.service.d.ts +2 -0
  78. package/dist/modules/devices/services/devices.service.js +78 -64
  79. package/dist/modules/devices/services/devices.service.js.map +1 -1
  80. package/dist/modules/devices/services/module-reset.service.d.ts +3 -1
  81. package/dist/modules/devices/services/module-reset.service.js +21 -16
  82. package/dist/modules/devices/services/module-reset.service.js.map +1 -1
  83. package/dist/modules/devices/services/platform.registry.service.d.ts +2 -2
  84. package/dist/modules/devices/services/platform.registry.service.js.map +1 -1
  85. package/dist/modules/devices/services/property-command-dispatch.service.d.ts +47 -0
  86. package/dist/modules/devices/services/property-command-dispatch.service.js +231 -0
  87. package/dist/modules/devices/services/property-command-dispatch.service.js.map +1 -0
  88. package/dist/modules/devices/services/property-command-window.service.d.ts +71 -0
  89. package/dist/modules/devices/services/property-command-window.service.js +206 -0
  90. package/dist/modules/devices/services/property-command-window.service.js.map +1 -0
  91. package/dist/modules/devices/services/property-command.service.d.ts +26 -7
  92. package/dist/modules/devices/services/property-command.service.js +95 -28
  93. package/dist/modules/devices/services/property-command.service.js.map +1 -1
  94. package/dist/modules/devices/services/property-metadata.service.d.ts +38 -0
  95. package/dist/modules/devices/services/property-metadata.service.js +210 -0
  96. package/dist/modules/devices/services/property-metadata.service.js.map +1 -0
  97. package/dist/modules/devices/services/property-state-coordinator.service.d.ts +4 -0
  98. package/dist/modules/devices/services/property-state-coordinator.service.js +35 -0
  99. package/dist/modules/devices/services/property-state-coordinator.service.js.map +1 -0
  100. package/dist/modules/devices/services/property-value-lock.service.d.ts +4 -1
  101. package/dist/modules/devices/services/property-value-lock.service.js +16 -2
  102. package/dist/modules/devices/services/property-value-lock.service.js.map +1 -1
  103. package/dist/modules/devices/services/property-value.service.d.ts +3 -0
  104. package/dist/modules/devices/services/property-value.service.js +29 -5
  105. package/dist/modules/devices/services/property-value.service.js.map +1 -1
  106. package/dist/modules/devices/utils/device-graph-query.utils.d.ts +3 -0
  107. package/dist/modules/devices/utils/device-graph-query.utils.js +23 -0
  108. package/dist/modules/devices/utils/device-graph-query.utils.js.map +1 -0
  109. package/dist/modules/devices/utils/schema.utils.js +1 -1
  110. package/dist/modules/devices/utils/schema.utils.js.map +1 -1
  111. package/dist/modules/devices/validators/channel-exists-constraint.validator.d.ts +1 -3
  112. package/dist/modules/devices/validators/channel-exists-constraint.validator.js +3 -14
  113. package/dist/modules/devices/validators/channel-exists-constraint.validator.js.map +1 -1
  114. package/dist/modules/devices/validators/channel-property-exists-constraint.validator.d.ts +1 -3
  115. package/dist/modules/devices/validators/channel-property-exists-constraint.validator.js +3 -14
  116. package/dist/modules/devices/validators/channel-property-exists-constraint.validator.js.map +1 -1
  117. package/dist/modules/devices/validators/device-exists-constraint.validator.js +1 -2
  118. package/dist/modules/devices/validators/device-exists-constraint.validator.js.map +1 -1
  119. package/dist/modules/devices/validators/property-command-target-constraint.validator.d.ts +9 -0
  120. package/dist/modules/devices/validators/property-command-target-constraint.validator.js +58 -0
  121. package/dist/modules/devices/validators/property-command-target-constraint.validator.js.map +1 -0
  122. package/dist/modules/mdns/services/mdns.service.js +3 -1
  123. package/dist/modules/mdns/services/mdns.service.js.map +1 -1
  124. package/dist/modules/platform/platforms/abstract.platform.d.ts +2 -1
  125. package/dist/modules/platform/platforms/abstract.platform.js +2 -1
  126. package/dist/modules/platform/platforms/abstract.platform.js.map +1 -1
  127. package/dist/modules/platform/platforms/raspberry.platform.js +5 -10
  128. package/dist/modules/platform/platforms/raspberry.platform.js.map +1 -1
  129. package/dist/modules/platform/utils/linux-network-interface.utils.d.ts +3 -0
  130. package/dist/modules/platform/utils/linux-network-interface.utils.js +48 -0
  131. package/dist/modules/platform/utils/linux-network-interface.utils.js.map +1 -0
  132. package/dist/modules/remote-access/controllers/remote-access.controller.js +11 -6
  133. package/dist/modules/remote-access/controllers/remote-access.controller.js.map +1 -1
  134. package/dist/modules/remote-access/models/provider.model.d.ts +3 -0
  135. package/dist/modules/remote-access/models/provider.model.js +23 -0
  136. package/dist/modules/remote-access/models/provider.model.js.map +1 -1
  137. package/dist/modules/remote-access/models/status.model.d.ts +2 -0
  138. package/dist/modules/remote-access/models/status.model.js +18 -1
  139. package/dist/modules/remote-access/models/status.model.js.map +1 -1
  140. package/dist/modules/remote-access/models/urls.model.d.ts +2 -0
  141. package/dist/modules/remote-access/models/urls.model.js +17 -0
  142. package/dist/modules/remote-access/models/urls.model.js.map +1 -1
  143. package/dist/modules/remote-access/platforms/remote-access-provider.platform.d.ts +18 -1
  144. package/dist/modules/remote-access/remote-access.constants.d.ts +2 -1
  145. package/dist/modules/remote-access/remote-access.constants.js +2 -1
  146. package/dist/modules/remote-access/remote-access.constants.js.map +1 -1
  147. package/dist/modules/remote-access/services/remote-access-proxy-contribution.service.d.ts +1 -0
  148. package/dist/modules/remote-access/services/remote-access-proxy-contribution.service.js +4 -1
  149. package/dist/modules/remote-access/services/remote-access-proxy-contribution.service.js.map +1 -1
  150. package/dist/modules/remote-access/services/remote-access-status.service.d.ts +40 -8
  151. package/dist/modules/remote-access/services/remote-access-status.service.js +314 -65
  152. package/dist/modules/remote-access/services/remote-access-status.service.js.map +1 -1
  153. package/dist/modules/remote-access/services/remote-access-url.service.d.ts +2 -2
  154. package/dist/modules/remote-access/services/remote-access-url.service.js +4 -2
  155. package/dist/modules/remote-access/services/remote-access-url.service.js.map +1 -1
  156. package/dist/modules/spaces/services/module-reset.service.d.ts +5 -1
  157. package/dist/modules/spaces/services/module-reset.service.js +10 -2
  158. package/dist/modules/spaces/services/module-reset.service.js.map +1 -1
  159. package/dist/modules/spaces/services/space-activity.service.d.ts +14 -0
  160. package/dist/modules/spaces/services/space-activity.service.js +56 -0
  161. package/dist/modules/spaces/services/space-activity.service.js.map +1 -0
  162. package/dist/modules/spaces/spaces.module.js +5 -0
  163. package/dist/modules/spaces/spaces.module.js.map +1 -1
  164. package/dist/modules/spaces/subscribers/space-activity.subscriber.d.ts +17 -0
  165. package/dist/modules/spaces/subscribers/space-activity.subscriber.js +89 -0
  166. package/dist/modules/spaces/subscribers/space-activity.subscriber.js.map +1 -0
  167. package/dist/modules/storage/services/storage-write-buffer.d.ts +17 -0
  168. package/dist/modules/storage/services/storage-write-buffer.js +67 -0
  169. package/dist/modules/storage/services/storage-write-buffer.js.map +1 -0
  170. package/dist/modules/storage/services/storage.service.d.ts +9 -2
  171. package/dist/modules/storage/services/storage.service.js +54 -1
  172. package/dist/modules/storage/services/storage.service.js.map +1 -1
  173. package/dist/modules/system/scripts/update-worker.sh +1168 -61
  174. package/dist/modules/system/services/privileged-worker.service.d.ts +3 -0
  175. package/dist/modules/system/services/privileged-worker.service.js +62 -27
  176. package/dist/modules/system/services/privileged-worker.service.js.map +1 -1
  177. package/dist/modules/system/services/system.service.d.ts +2 -0
  178. package/dist/modules/system/services/system.service.js +22 -1
  179. package/dist/modules/system/services/system.service.js.map +1 -1
  180. package/dist/modules/system/services/update-executor.service.d.ts +20 -2
  181. package/dist/modules/system/services/update-executor.service.js +272 -26
  182. package/dist/modules/system/services/update-executor.service.js.map +1 -1
  183. package/dist/modules/websocket/gateway/websocket.gateway.d.ts +4 -1
  184. package/dist/modules/websocket/gateway/websocket.gateway.js +29 -5
  185. package/dist/modules/websocket/gateway/websocket.gateway.js.map +1 -1
  186. package/dist/modules/websocket/services/command-acknowledgement-trace.service.d.ts +143 -0
  187. package/dist/modules/websocket/services/command-acknowledgement-trace.service.js +523 -0
  188. package/dist/modules/websocket/services/command-acknowledgement-trace.service.js.map +1 -0
  189. package/dist/modules/websocket/services/ws-auth.service.js +12 -35
  190. package/dist/modules/websocket/services/ws-auth.service.js.map +1 -1
  191. package/dist/modules/websocket/websocket.module.js +9 -1
  192. package/dist/modules/websocket/websocket.module.js.map +1 -1
  193. package/dist/plugins/devices-home-assistant/devices-home-assistant.openapi.d.ts +2 -2
  194. package/dist/plugins/devices-home-assistant/devices-home-assistant.plugin.d.ts +6 -1
  195. package/dist/plugins/devices-home-assistant/devices-home-assistant.plugin.js +16 -1
  196. package/dist/plugins/devices-home-assistant/devices-home-assistant.plugin.js.map +1 -1
  197. package/dist/plugins/devices-home-assistant/dto/mapping-preview.dto.d.ts +1 -0
  198. package/dist/plugins/devices-home-assistant/dto/mapping-preview.dto.js +11 -0
  199. package/dist/plugins/devices-home-assistant/dto/mapping-preview.dto.js.map +1 -1
  200. package/dist/plugins/devices-home-assistant/mappers/button.entity.mapper.service.d.ts +19 -0
  201. package/dist/plugins/devices-home-assistant/mappers/button.entity.mapper.service.js +51 -0
  202. package/dist/plugins/devices-home-assistant/mappers/button.entity.mapper.service.js.map +1 -0
  203. package/dist/plugins/devices-home-assistant/mappings/definitions/entity-mappings.yaml +56 -7
  204. package/dist/plugins/devices-home-assistant/models/mapping-preview.model.d.ts +1 -0
  205. package/dist/plugins/devices-home-assistant/models/mapping-preview.model.js +11 -0
  206. package/dist/plugins/devices-home-assistant/models/mapping-preview.model.js.map +1 -1
  207. package/dist/plugins/devices-home-assistant/services/device-adoption.service.js +17 -0
  208. package/dist/plugins/devices-home-assistant/services/device-adoption.service.js.map +1 -1
  209. package/dist/plugins/devices-home-assistant/services/ha-mdns-discoverer.service.js +3 -1
  210. package/dist/plugins/devices-home-assistant/services/ha-mdns-discoverer.service.js.map +1 -1
  211. package/dist/plugins/devices-home-assistant/services/home-assistant-raw-event.service.d.ts +27 -0
  212. package/dist/plugins/devices-home-assistant/services/home-assistant-raw-event.service.js +271 -0
  213. package/dist/plugins/devices-home-assistant/services/home-assistant-raw-event.service.js.map +1 -0
  214. package/dist/plugins/devices-home-assistant/services/home-assistant.ws.service.d.ts +2 -2
  215. package/dist/plugins/devices-home-assistant/services/home-assistant.ws.service.js +33 -14
  216. package/dist/plugins/devices-home-assistant/services/home-assistant.ws.service.js.map +1 -1
  217. package/dist/plugins/devices-home-assistant/services/mapping-preview.service.js +24 -4
  218. package/dist/plugins/devices-home-assistant/services/mapping-preview.service.js.map +1 -1
  219. package/dist/plugins/devices-home-assistant/services/state-changed.event.service.d.ts +4 -1
  220. package/dist/plugins/devices-home-assistant/services/state-changed.event.service.js +84 -5
  221. package/dist/plugins/devices-home-assistant/services/state-changed.event.service.js.map +1 -1
  222. package/dist/plugins/devices-home-assistant/services/wizard.service.js +1 -0
  223. package/dist/plugins/devices-home-assistant/services/wizard.service.js.map +1 -1
  224. package/dist/plugins/devices-home-assistant/utils/ha-event.utils.d.ts +2 -0
  225. package/dist/plugins/devices-home-assistant/utils/ha-event.utils.js +50 -0
  226. package/dist/plugins/devices-home-assistant/utils/ha-event.utils.js.map +1 -0
  227. package/dist/plugins/devices-homekit/listeners/homekit-event.listener.d.ts +4 -1
  228. package/dist/plugins/devices-homekit/listeners/homekit-event.listener.js +39 -4
  229. package/dist/plugins/devices-homekit/listeners/homekit-event.listener.js.map +1 -1
  230. package/dist/plugins/devices-homekit/mappers/base.mapper.js +30 -6
  231. package/dist/plugins/devices-homekit/mappers/base.mapper.js.map +1 -1
  232. package/dist/plugins/devices-homekit/mappers/button.mapper.d.ts +15 -0
  233. package/dist/plugins/devices-homekit/mappers/button.mapper.js +143 -0
  234. package/dist/plugins/devices-homekit/mappers/button.mapper.js.map +1 -0
  235. package/dist/plugins/devices-homekit/mappers/characteristic-write.d.ts +2 -0
  236. package/dist/plugins/devices-homekit/mappers/characteristic-write.js +17 -0
  237. package/dist/plugins/devices-homekit/mappers/characteristic-write.js.map +1 -0
  238. package/dist/plugins/devices-homekit/mappers/homekit-mapper.interface.d.ts +17 -1
  239. package/dist/plugins/devices-homekit/mappers/thermostat-coordinator.d.ts +7 -0
  240. package/dist/plugins/devices-homekit/mappers/thermostat-coordinator.js +96 -84
  241. package/dist/plugins/devices-homekit/mappers/thermostat-coordinator.js.map +1 -1
  242. package/dist/plugins/devices-homekit/services/homekit-bridge.service.js +2 -0
  243. package/dist/plugins/devices-homekit/services/homekit-bridge.service.js.map +1 -1
  244. package/dist/plugins/devices-homekit/services/homekit-mapper-registry.service.d.ts +5 -1
  245. package/dist/plugins/devices-homekit/services/homekit-mapper-registry.service.js +42 -0
  246. package/dist/plugins/devices-homekit/services/homekit-mapper-registry.service.js.map +1 -1
  247. package/dist/plugins/devices-homekit/utils/ciao-receive-guard.d.ts +1 -0
  248. package/dist/plugins/devices-homekit/utils/ciao-receive-guard.js +36 -0
  249. package/dist/plugins/devices-homekit/utils/ciao-receive-guard.js.map +1 -0
  250. package/dist/plugins/devices-homey/mappings/definitions/channels.yaml +50 -0
  251. package/dist/plugins/devices-homey/mappings/definitions/devices.yaml +18 -0
  252. package/dist/plugins/devices-homey/mappings/definitions/properties.yaml +55 -0
  253. package/dist/plugins/devices-homey/mappings/device-support.js +10 -0
  254. package/dist/plugins/devices-homey/mappings/device-support.js.map +1 -1
  255. package/dist/plugins/devices-homey/mappings/mapping-loader.service.d.ts +1 -0
  256. package/dist/plugins/devices-homey/mappings/mapping-loader.service.js +66 -8
  257. package/dist/plugins/devices-homey/mappings/mapping-loader.service.js.map +1 -1
  258. package/dist/plugins/devices-homey/models/inventory.model.d.ts +2 -1
  259. package/dist/plugins/devices-homey/models/inventory.model.js +1 -0
  260. package/dist/plugins/devices-homey/models/inventory.model.js.map +1 -1
  261. package/dist/plugins/devices-homey/models/mapping-preview.model.d.ts +1 -0
  262. package/dist/plugins/devices-homey/models/mapping-preview.model.js +1 -0
  263. package/dist/plugins/devices-homey/models/mapping-preview.model.js.map +1 -1
  264. package/dist/plugins/devices-homey/services/homey-mapping-preview.service.js +7 -0
  265. package/dist/plugins/devices-homey/services/homey-mapping-preview.service.js.map +1 -1
  266. package/dist/plugins/devices-homey/services/homey-synchronizer.service.d.ts +3 -1
  267. package/dist/plugins/devices-homey/services/homey-synchronizer.service.js +37 -6
  268. package/dist/plugins/devices-homey/services/homey-synchronizer.service.js.map +1 -1
  269. package/dist/plugins/devices-reterminal/services/reterminal-button.service.d.ts +7 -3
  270. package/dist/plugins/devices-reterminal/services/reterminal-button.service.js +63 -17
  271. package/dist/plugins/devices-reterminal/services/reterminal-button.service.js.map +1 -1
  272. package/dist/plugins/devices-shelly-ng/delegates/delegates-manager.service.d.ts +36 -3
  273. package/dist/plugins/devices-shelly-ng/delegates/delegates-manager.service.js +707 -42
  274. package/dist/plugins/devices-shelly-ng/delegates/delegates-manager.service.js.map +1 -1
  275. package/dist/plugins/devices-shelly-ng/delegates/shelly-device.delegate.d.ts +11 -1
  276. package/dist/plugins/devices-shelly-ng/delegates/shelly-device.delegate.js +100 -10
  277. package/dist/plugins/devices-shelly-ng/delegates/shelly-device.delegate.js.map +1 -1
  278. package/dist/plugins/devices-shelly-ng/devices-shelly-ng.constants.js +3 -2
  279. package/dist/plugins/devices-shelly-ng/devices-shelly-ng.constants.js.map +1 -1
  280. package/dist/plugins/devices-shelly-ng/devices-shelly-ng.plugin.js +2 -0
  281. package/dist/plugins/devices-shelly-ng/devices-shelly-ng.plugin.js.map +1 -1
  282. package/dist/plugins/devices-shelly-ng/mappings/definitions/inputs.yaml +80 -0
  283. package/dist/plugins/devices-shelly-ng/mappings/mapping-loader.service.js +7 -1
  284. package/dist/plugins/devices-shelly-ng/mappings/mapping-loader.service.js.map +1 -1
  285. package/dist/plugins/devices-shelly-ng/mappings/mapping.types.d.ts +6 -3
  286. package/dist/plugins/devices-shelly-ng/mappings/schema/mapping-schema.json +5 -0
  287. package/dist/plugins/devices-shelly-ng/services/device-manager.service.js +153 -8
  288. package/dist/plugins/devices-shelly-ng/services/device-manager.service.js.map +1 -1
  289. package/dist/plugins/devices-shelly-ng/services/poll-placement-diagnostics.service.d.ts +51 -0
  290. package/dist/plugins/devices-shelly-ng/services/poll-placement-diagnostics.service.js +549 -0
  291. package/dist/plugins/devices-shelly-ng/services/poll-placement-diagnostics.service.js.map +1 -0
  292. package/dist/plugins/devices-shelly-ng/services/shelly-ng.service.d.ts +15 -2
  293. package/dist/plugins/devices-shelly-ng/services/shelly-ng.service.js +140 -35
  294. package/dist/plugins/devices-shelly-ng/services/shelly-ng.service.js.map +1 -1
  295. package/dist/plugins/devices-shelly-ng/services/shelly-rpc-client.service.js +3 -0
  296. package/dist/plugins/devices-shelly-ng/services/shelly-rpc-client.service.js.map +1 -1
  297. package/dist/plugins/devices-shelly-ng/services/shelly-ws-server.service.d.ts +1 -0
  298. package/dist/plugins/devices-shelly-ng/services/shelly-ws-server.service.js +14 -4
  299. package/dist/plugins/devices-shelly-ng/services/shelly-ws-server.service.js.map +1 -1
  300. package/dist/plugins/devices-shelly-v1/devices-shelly-v1.constants.d.ts +2 -0
  301. package/dist/plugins/devices-shelly-v1/devices-shelly-v1.constants.js +66 -4
  302. package/dist/plugins/devices-shelly-v1/devices-shelly-v1.constants.js.map +1 -1
  303. package/dist/plugins/devices-shelly-v1/devices-shelly-v1.plugin.js +2 -0
  304. package/dist/plugins/devices-shelly-v1/devices-shelly-v1.plugin.js.map +1 -1
  305. package/dist/plugins/devices-shelly-v1/platforms/shelly-v1.device.platform.js +7 -0
  306. package/dist/plugins/devices-shelly-v1/platforms/shelly-v1.device.platform.js.map +1 -1
  307. package/dist/plugins/devices-shelly-v1/services/device-mapper.service.d.ts +3 -1
  308. package/dist/plugins/devices-shelly-v1/services/device-mapper.service.js +20 -2
  309. package/dist/plugins/devices-shelly-v1/services/device-mapper.service.js.map +1 -1
  310. package/dist/plugins/devices-shelly-v1/services/shelly-v1-input-tracker.service.d.ts +16 -0
  311. package/dist/plugins/devices-shelly-v1/services/shelly-v1-input-tracker.service.js +107 -0
  312. package/dist/plugins/devices-shelly-v1/services/shelly-v1-input-tracker.service.js.map +1 -0
  313. package/dist/plugins/devices-shelly-v1/services/shelly-v1.service.d.ts +7 -1
  314. package/dist/plugins/devices-shelly-v1/services/shelly-v1.service.js +98 -3
  315. package/dist/plugins/devices-shelly-v1/services/shelly-v1.service.js.map +1 -1
  316. package/dist/plugins/devices-third-party/controllers/third-party-inputs.controller.d.ts +17 -0
  317. package/dist/plugins/devices-third-party/controllers/third-party-inputs.controller.js +205 -0
  318. package/dist/plugins/devices-third-party/controllers/third-party-inputs.controller.js.map +1 -0
  319. package/dist/plugins/devices-third-party/devices-third-party.openapi.d.ts +1 -1
  320. package/dist/plugins/devices-third-party/devices-third-party.plugin.js +2 -1
  321. package/dist/plugins/devices-third-party/devices-third-party.plugin.js.map +1 -1
  322. package/dist/plugins/devices-third-party/dto/report-input-occurrence-response.dto.d.ts +5 -0
  323. package/dist/plugins/devices-third-party/dto/report-input-occurrence-response.dto.js +50 -0
  324. package/dist/plugins/devices-third-party/dto/report-input-occurrence-response.dto.js.map +1 -0
  325. package/dist/plugins/devices-third-party/dto/report-input-occurrence.dto.d.ts +8 -0
  326. package/dist/plugins/devices-third-party/dto/report-input-occurrence.dto.js +81 -0
  327. package/dist/plugins/devices-third-party/dto/report-input-occurrence.dto.js.map +1 -0
  328. package/dist/plugins/devices-third-party/platforms/third-party-device.platform.js +19 -4
  329. package/dist/plugins/devices-third-party/platforms/third-party-device.platform.js.map +1 -1
  330. package/dist/plugins/devices-virtual/listeners/virtual-projection.listener.d.ts +2 -0
  331. package/dist/plugins/devices-virtual/listeners/virtual-projection.listener.js +57 -0
  332. package/dist/plugins/devices-virtual/listeners/virtual-projection.listener.js.map +1 -1
  333. package/dist/plugins/devices-virtual/platforms/virtual-device.platform.d.ts +3 -8
  334. package/dist/plugins/devices-virtual/platforms/virtual-device.platform.js +6 -31
  335. package/dist/plugins/devices-virtual/platforms/virtual-device.platform.js.map +1 -1
  336. package/dist/plugins/devices-wled/services/wled-mdns-discoverer.service.js +3 -1
  337. package/dist/plugins/devices-wled/services/wled-mdns-discoverer.service.js.map +1 -1
  338. package/dist/plugins/devices-zigbee2mqtt/devices-zigbee2mqtt.constants.d.ts +3 -0
  339. package/dist/plugins/devices-zigbee2mqtt/devices-zigbee2mqtt.constants.js +41 -5
  340. package/dist/plugins/devices-zigbee2mqtt/devices-zigbee2mqtt.constants.js.map +1 -1
  341. package/dist/plugins/devices-zigbee2mqtt/interfaces/zigbee2mqtt.interface.d.ts +7 -1
  342. package/dist/plugins/devices-zigbee2mqtt/mappings/config-driven.converter.js +16 -15
  343. package/dist/plugins/devices-zigbee2mqtt/mappings/config-driven.converter.js.map +1 -1
  344. package/dist/plugins/devices-zigbee2mqtt/mappings/definitions/remotes.yaml +505 -74
  345. package/dist/plugins/devices-zigbee2mqtt/mappings/schema/mapping-schema.json +3 -3
  346. package/dist/plugins/devices-zigbee2mqtt/mappings/transformers/transformer.types.d.ts +1 -1
  347. package/dist/plugins/devices-zigbee2mqtt/services/base-client-adapter.d.ts +8 -2
  348. package/dist/plugins/devices-zigbee2mqtt/services/base-client-adapter.js +6 -5
  349. package/dist/plugins/devices-zigbee2mqtt/services/base-client-adapter.js.map +1 -1
  350. package/dist/plugins/devices-zigbee2mqtt/services/device-adoption.service.js +18 -11
  351. package/dist/plugins/devices-zigbee2mqtt/services/device-adoption.service.js.map +1 -1
  352. package/dist/plugins/devices-zigbee2mqtt/services/device-mapper.service.d.ts +9 -3
  353. package/dist/plugins/devices-zigbee2mqtt/services/device-mapper.service.js +166 -3
  354. package/dist/plugins/devices-zigbee2mqtt/services/device-mapper.service.js.map +1 -1
  355. package/dist/plugins/devices-zigbee2mqtt/services/mqtt-client-adapter.service.js +5 -2
  356. package/dist/plugins/devices-zigbee2mqtt/services/mqtt-client-adapter.service.js.map +1 -1
  357. package/dist/plugins/devices-zigbee2mqtt/services/zigbee2mqtt.service.d.ts +1 -0
  358. package/dist/plugins/devices-zigbee2mqtt/services/zigbee2mqtt.service.js +44 -4
  359. package/dist/plugins/devices-zigbee2mqtt/services/zigbee2mqtt.service.js.map +1 -1
  360. package/dist/plugins/influx-v1/services/influx-v1-managed.service.js +2 -2
  361. package/dist/plugins/influx-v1/services/influx-v1-managed.service.js.map +1 -1
  362. package/dist/plugins/influx-v2/services/influx-v2-managed.service.js +2 -2
  363. package/dist/plugins/influx-v2/services/influx-v2-managed.service.js.map +1 -1
  364. package/dist/plugins/memory-storage/services/memory-storage-managed.service.js +2 -2
  365. package/dist/plugins/memory-storage/services/memory-storage-managed.service.js.map +1 -1
  366. package/dist/plugins/remote-access-cloudflare-tunnel/controllers/setup.controller.d.ts +19 -0
  367. package/dist/plugins/remote-access-cloudflare-tunnel/controllers/setup.controller.js +159 -0
  368. package/dist/plugins/remote-access-cloudflare-tunnel/controllers/setup.controller.js.map +1 -0
  369. package/dist/plugins/remote-access-cloudflare-tunnel/controllers/status.controller.d.ts +13 -0
  370. package/dist/plugins/remote-access-cloudflare-tunnel/controllers/status.controller.js +99 -0
  371. package/dist/plugins/remote-access-cloudflare-tunnel/controllers/status.controller.js.map +1 -0
  372. package/dist/plugins/remote-access-cloudflare-tunnel/dto/update-config.dto.d.ts +9 -0
  373. package/dist/plugins/remote-access-cloudflare-tunnel/dto/update-config.dto.js +94 -0
  374. package/dist/plugins/remote-access-cloudflare-tunnel/dto/update-config.dto.js.map +1 -0
  375. package/dist/plugins/remote-access-cloudflare-tunnel/models/config.model.d.ts +9 -0
  376. package/dist/plugins/remote-access-cloudflare-tunnel/models/config.model.js +92 -0
  377. package/dist/plugins/remote-access-cloudflare-tunnel/models/config.model.js.map +1 -0
  378. package/dist/plugins/remote-access-cloudflare-tunnel/models/install.model.d.ts +7 -0
  379. package/dist/plugins/remote-access-cloudflare-tunnel/models/install.model.js +48 -0
  380. package/dist/plugins/remote-access-cloudflare-tunnel/models/install.model.js.map +1 -0
  381. package/dist/plugins/remote-access-cloudflare-tunnel/models/status.model.d.ts +44 -0
  382. package/dist/plugins/remote-access-cloudflare-tunnel/models/status.model.js +369 -0
  383. package/dist/plugins/remote-access-cloudflare-tunnel/models/status.model.js.map +1 -0
  384. package/dist/plugins/remote-access-cloudflare-tunnel/remote-access-cloudflare-tunnel.constants.d.ts +24 -0
  385. package/dist/plugins/remote-access-cloudflare-tunnel/remote-access-cloudflare-tunnel.constants.js +27 -0
  386. package/dist/plugins/remote-access-cloudflare-tunnel/remote-access-cloudflare-tunnel.constants.js.map +1 -0
  387. package/dist/plugins/remote-access-cloudflare-tunnel/remote-access-cloudflare-tunnel.exceptions.d.ts +8 -0
  388. package/dist/plugins/remote-access-cloudflare-tunnel/remote-access-cloudflare-tunnel.exceptions.js +19 -0
  389. package/dist/plugins/remote-access-cloudflare-tunnel/remote-access-cloudflare-tunnel.exceptions.js.map +1 -0
  390. package/dist/plugins/remote-access-cloudflare-tunnel/remote-access-cloudflare-tunnel.openapi.d.ts +4 -0
  391. package/dist/plugins/remote-access-cloudflare-tunnel/remote-access-cloudflare-tunnel.openapi.js +20 -0
  392. package/dist/plugins/remote-access-cloudflare-tunnel/remote-access-cloudflare-tunnel.openapi.js.map +1 -0
  393. package/dist/plugins/remote-access-cloudflare-tunnel/remote-access-cloudflare-tunnel.plugin.d.ts +21 -0
  394. package/dist/plugins/remote-access-cloudflare-tunnel/remote-access-cloudflare-tunnel.plugin.js +135 -0
  395. package/dist/plugins/remote-access-cloudflare-tunnel/remote-access-cloudflare-tunnel.plugin.js.map +1 -0
  396. package/dist/plugins/remote-access-cloudflare-tunnel/scripts/cloudflared-setup.sh +185 -0
  397. package/dist/plugins/remote-access-cloudflare-tunnel/services/cloudflare-tunnel-managed.service.d.ts +100 -0
  398. package/dist/plugins/remote-access-cloudflare-tunnel/services/cloudflare-tunnel-managed.service.js +564 -0
  399. package/dist/plugins/remote-access-cloudflare-tunnel/services/cloudflare-tunnel-managed.service.js.map +1 -0
  400. package/dist/plugins/remote-access-cloudflare-tunnel/services/cloudflare-tunnel-provider.service.d.ts +22 -0
  401. package/dist/plugins/remote-access-cloudflare-tunnel/services/cloudflare-tunnel-provider.service.js +43 -0
  402. package/dist/plugins/remote-access-cloudflare-tunnel/services/cloudflare-tunnel-provider.service.js.map +1 -0
  403. package/dist/plugins/remote-access-cloudflare-tunnel/services/cloudflare-tunnel-setup.service.d.ts +38 -0
  404. package/dist/plugins/remote-access-cloudflare-tunnel/services/cloudflare-tunnel-setup.service.js +147 -0
  405. package/dist/plugins/remote-access-cloudflare-tunnel/services/cloudflare-tunnel-setup.service.js.map +1 -0
  406. package/dist/plugins/remote-access-cloudflare-tunnel/services/cloudflared-cli.service.d.ts +15 -0
  407. package/dist/plugins/remote-access-cloudflare-tunnel/services/cloudflared-cli.service.js +55 -0
  408. package/dist/plugins/remote-access-cloudflare-tunnel/services/cloudflared-cli.service.js.map +1 -0
  409. package/dist/plugins/remote-access-cloudflare-tunnel/services/cloudflared-metrics.service.d.ts +8 -0
  410. package/dist/plugins/remote-access-cloudflare-tunnel/services/cloudflared-metrics.service.js +49 -0
  411. package/dist/plugins/remote-access-cloudflare-tunnel/services/cloudflared-metrics.service.js.map +1 -0
  412. package/dist/plugins/remote-access-cloudflare-tunnel/services/cloudflared-process.service.d.ts +27 -0
  413. package/dist/plugins/remote-access-cloudflare-tunnel/services/cloudflared-process.service.js +139 -0
  414. package/dist/plugins/remote-access-cloudflare-tunnel/services/cloudflared-process.service.js.map +1 -0
  415. package/dist/plugins/remote-access-tailscale/controllers/setup.controller.d.ts +11 -6
  416. package/dist/plugins/remote-access-tailscale/controllers/setup.controller.js +115 -25
  417. package/dist/plugins/remote-access-tailscale/controllers/setup.controller.js.map +1 -1
  418. package/dist/plugins/remote-access-tailscale/controllers/status.controller.d.ts +6 -5
  419. package/dist/plugins/remote-access-tailscale/controllers/status.controller.js +26 -16
  420. package/dist/plugins/remote-access-tailscale/controllers/status.controller.js.map +1 -1
  421. package/dist/plugins/remote-access-tailscale/models/status.model.d.ts +16 -0
  422. package/dist/plugins/remote-access-tailscale/models/status.model.js +100 -1
  423. package/dist/plugins/remote-access-tailscale/models/status.model.js.map +1 -1
  424. package/dist/plugins/remote-access-tailscale/remote-access-tailscale.constants.d.ts +3 -0
  425. package/dist/plugins/remote-access-tailscale/remote-access-tailscale.constants.js +4 -1
  426. package/dist/plugins/remote-access-tailscale/remote-access-tailscale.constants.js.map +1 -1
  427. package/dist/plugins/remote-access-tailscale/remote-access-tailscale.exceptions.d.ts +17 -1
  428. package/dist/plugins/remote-access-tailscale/remote-access-tailscale.exceptions.js +33 -1
  429. package/dist/plugins/remote-access-tailscale/remote-access-tailscale.exceptions.js.map +1 -1
  430. package/dist/plugins/remote-access-tailscale/remote-access-tailscale.openapi.d.ts +2 -2
  431. package/dist/plugins/remote-access-tailscale/remote-access-tailscale.openapi.js +1 -0
  432. package/dist/plugins/remote-access-tailscale/remote-access-tailscale.openapi.js.map +1 -1
  433. package/dist/plugins/remote-access-tailscale/remote-access-tailscale.plugin.js +3 -1
  434. package/dist/plugins/remote-access-tailscale/remote-access-tailscale.plugin.js.map +1 -1
  435. package/dist/plugins/remote-access-tailscale/services/tailscale-cli.service.d.ts +8 -4
  436. package/dist/plugins/remote-access-tailscale/services/tailscale-cli.service.js +58 -14
  437. package/dist/plugins/remote-access-tailscale/services/tailscale-cli.service.js.map +1 -1
  438. package/dist/plugins/remote-access-tailscale/services/tailscale-login.service.d.ts +8 -3
  439. package/dist/plugins/remote-access-tailscale/services/tailscale-login.service.js +175 -151
  440. package/dist/plugins/remote-access-tailscale/services/tailscale-login.service.js.map +1 -1
  441. package/dist/plugins/remote-access-tailscale/services/tailscale-node-managed.service.d.ts +54 -7
  442. package/dist/plugins/remote-access-tailscale/services/tailscale-node-managed.service.js +528 -109
  443. package/dist/plugins/remote-access-tailscale/services/tailscale-node-managed.service.js.map +1 -1
  444. package/dist/plugins/remote-access-tailscale/services/tailscale-operation-coordinator.service.d.ts +33 -0
  445. package/dist/plugins/remote-access-tailscale/services/tailscale-operation-coordinator.service.js +167 -0
  446. package/dist/plugins/remote-access-tailscale/services/tailscale-operation-coordinator.service.js.map +1 -0
  447. package/dist/plugins/remote-access-tailscale/services/tailscale-provider.service.d.ts +13 -1
  448. package/dist/plugins/remote-access-tailscale/services/tailscale-provider.service.js +8 -2
  449. package/dist/plugins/remote-access-tailscale/services/tailscale-provider.service.js.map +1 -1
  450. package/dist/plugins/remote-access-tailscale/services/tailscale-serve.service.d.ts +1 -1
  451. package/dist/plugins/remote-access-tailscale/services/tailscale-serve.service.js +7 -6
  452. package/dist/plugins/remote-access-tailscale/services/tailscale-serve.service.js.map +1 -1
  453. package/dist/plugins/remote-access-tailscale/services/tailscale-setup.service.d.ts +1 -3
  454. package/dist/plugins/remote-access-tailscale/services/tailscale-setup.service.js +9 -11
  455. package/dist/plugins/remote-access-tailscale/services/tailscale-setup.service.js.map +1 -1
  456. package/dist/plugins/remote-access-tailscale/utils/tailscale-control.utils.d.ts +5 -0
  457. package/dist/plugins/remote-access-tailscale/utils/tailscale-control.utils.js +36 -0
  458. package/dist/plugins/remote-access-tailscale/utils/tailscale-control.utils.js.map +1 -0
  459. package/dist/plugins/scenes-local/platforms/local-scene.platform.d.ts +3 -1
  460. package/dist/plugins/scenes-local/platforms/local-scene.platform.js +12 -7
  461. package/dist/plugins/scenes-local/platforms/local-scene.platform.js.map +1 -1
  462. package/dist/plugins/simulator/controllers/simulator.controller.d.ts +8 -2
  463. package/dist/plugins/simulator/controllers/simulator.controller.js +102 -2
  464. package/dist/plugins/simulator/controllers/simulator.controller.js.map +1 -1
  465. package/dist/plugins/simulator/dto/simulate-occurrence.dto.d.ts +12 -0
  466. package/dist/plugins/simulator/dto/simulate-occurrence.dto.js +122 -0
  467. package/dist/plugins/simulator/dto/simulate-occurrence.dto.js.map +1 -0
  468. package/dist/plugins/simulator/models/simulator-response.model.d.ts +12 -0
  469. package/dist/plugins/simulator/models/simulator-response.model.js +84 -1
  470. package/dist/plugins/simulator/models/simulator-response.model.js.map +1 -1
  471. package/dist/plugins/simulator/scenarios/definitions/small-apartment.yaml +78 -0
  472. package/dist/plugins/simulator/services/scenario-executor.service.js +3 -1
  473. package/dist/plugins/simulator/services/scenario-executor.service.js.map +1 -1
  474. package/dist/plugins/simulator/services/simulation.service.js +10 -1
  475. package/dist/plugins/simulator/services/simulation.service.js.map +1 -1
  476. package/dist/plugins/simulator/simulator.openapi.d.ts +3 -2
  477. package/dist/plugins/simulator/simulator.openapi.js +5 -0
  478. package/dist/plugins/simulator/simulator.openapi.js.map +1 -1
  479. package/dist/plugins/simulator/simulators/device-simulator.interface.d.ts +2 -0
  480. package/dist/plugins/simulator/simulators/device-simulator.interface.js +83 -0
  481. package/dist/plugins/simulator/simulators/device-simulator.interface.js.map +1 -1
  482. package/dist/plugins/simulator/simulators/index.d.ts +1 -0
  483. package/dist/plugins/simulator/simulators/index.js +1 -0
  484. package/dist/plugins/simulator/simulators/index.js.map +1 -1
  485. package/dist/plugins/simulator/simulators/input-controller.simulator.d.ts +10 -0
  486. package/dist/plugins/simulator/simulators/input-controller.simulator.js +57 -0
  487. package/dist/plugins/simulator/simulators/input-controller.simulator.js.map +1 -0
  488. package/dist/plugins/simulator/simulators/lighting.simulator.js +1 -0
  489. package/dist/plugins/simulator/simulators/lighting.simulator.js.map +1 -1
  490. package/dist/plugins/spaces-home-control/listeners/space-activity.listener.d.ts +6 -7
  491. package/dist/plugins/spaces-home-control/listeners/space-activity.listener.js +19 -44
  492. package/dist/plugins/spaces-home-control/listeners/space-activity.listener.js.map +1 -1
  493. package/dist/plugins/spaces-home-control/listeners/space-climate-state.listener.d.ts +4 -4
  494. package/dist/plugins/spaces-home-control/listeners/space-climate-state.listener.js +9 -22
  495. package/dist/plugins/spaces-home-control/listeners/space-climate-state.listener.js.map +1 -1
  496. package/dist/plugins/spaces-home-control/listeners/space-lighting-state.listener.d.ts +4 -4
  497. package/dist/plugins/spaces-home-control/listeners/space-lighting-state.listener.js +9 -22
  498. package/dist/plugins/spaces-home-control/listeners/space-lighting-state.listener.js.map +1 -1
  499. package/dist/plugins/spaces-home-control/listeners/space-sensor-state.listener.d.ts +4 -4
  500. package/dist/plugins/spaces-home-control/listeners/space-sensor-state.listener.js +9 -22
  501. package/dist/plugins/spaces-home-control/listeners/space-sensor-state.listener.js.map +1 -1
  502. package/dist/plugins/spaces-home-control/services/climate-intent.service.d.ts +3 -1
  503. package/dist/plugins/spaces-home-control/services/climate-intent.service.js +6 -3
  504. package/dist/plugins/spaces-home-control/services/climate-intent.service.js.map +1 -1
  505. package/dist/plugins/spaces-home-control/services/covers-intent.service.d.ts +3 -1
  506. package/dist/plugins/spaces-home-control/services/covers-intent.service.js +6 -3
  507. package/dist/plugins/spaces-home-control/services/covers-intent.service.js.map +1 -1
  508. package/dist/plugins/spaces-home-control/services/lighting-intent.service.d.ts +3 -1
  509. package/dist/plugins/spaces-home-control/services/lighting-intent.service.js +7 -4
  510. package/dist/plugins/spaces-home-control/services/lighting-intent.service.js.map +1 -1
  511. package/dist/plugins/spaces-home-control/services/space-climate-state.service.d.ts +3 -5
  512. package/dist/plugins/spaces-home-control/services/space-climate-state.service.js +9 -12
  513. package/dist/plugins/spaces-home-control/services/space-climate-state.service.js.map +1 -1
  514. package/dist/plugins/spaces-home-control/services/space-lighting-state.service.d.ts +3 -5
  515. package/dist/plugins/spaces-home-control/services/space-lighting-state.service.js +7 -10
  516. package/dist/plugins/spaces-home-control/services/space-lighting-state.service.js.map +1 -1
  517. package/dist/plugins/spaces-home-control/services/space-media-activity.service.d.ts +3 -1
  518. package/dist/plugins/spaces-home-control/services/space-media-activity.service.js +11 -5
  519. package/dist/plugins/spaces-home-control/services/space-media-activity.service.js.map +1 -1
  520. package/dist/plugins/spaces-home-control/services/space-sensor-state.service.d.ts +3 -5
  521. package/dist/plugins/spaces-home-control/services/space-sensor-state.service.js +7 -10
  522. package/dist/plugins/spaces-home-control/services/space-sensor-state.service.js.map +1 -1
  523. package/dist/plugins/spaces-home-control/services/space-state-read.service.d.ts +47 -0
  524. package/dist/plugins/spaces-home-control/services/space-state-read.service.js +262 -0
  525. package/dist/plugins/spaces-home-control/services/space-state-read.service.js.map +1 -0
  526. package/dist/plugins/spaces-home-control/services/space-undo-history.service.d.ts +3 -1
  527. package/dist/plugins/spaces-home-control/services/space-undo-history.service.js +8 -5
  528. package/dist/plugins/spaces-home-control/services/space-undo-history.service.js.map +1 -1
  529. package/dist/plugins/spaces-home-control/spaces-home-control.plugin.js +4 -0
  530. package/dist/plugins/spaces-home-control/spaces-home-control.plugin.js.map +1 -1
  531. package/dist/spec/channels.d.ts +51 -1
  532. package/dist/spec/channels.js +64 -1
  533. package/dist/spec/channels.js.map +1 -1
  534. package/dist/spec/devices.d.ts +155 -2
  535. package/dist/spec/devices.js +161 -2
  536. package/dist/spec/devices.js.map +1 -1
  537. package/dist/tsconfig.build.tsbuildinfo +1 -1
  538. package/package.json +4 -4
@@ -0,0 +1,564 @@
1
+ "use strict";
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
8
+ var __metadata = (this && this.__metadata) || function (k, v) {
9
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.CloudflareTunnelManagedService = void 0;
13
+ exports.compareCloudflaredVersions = compareCloudflaredVersions;
14
+ const path_1 = require("path");
15
+ const common_1 = require("@nestjs/common");
16
+ const config_1 = require("@nestjs/config");
17
+ const event_emitter_1 = require("@nestjs/event-emitter");
18
+ const logger_1 = require("../../../common/logger");
19
+ const cancellable_exec_utils_1 = require("../../../common/utils/cancellable-exec.utils");
20
+ const config_utils_1 = require("../../../common/utils/config.utils");
21
+ const remote_access_observation_utils_1 = require("../../../common/utils/remote-access-observation.utils");
22
+ const config_service_1 = require("../../../modules/config/services/config.service");
23
+ const base_managed_extension_service_1 = require("../../../modules/extensions/services/base-managed-extension.service");
24
+ const platform_constants_1 = require("../../../modules/platform/platform.constants");
25
+ const platform_service_1 = require("../../../modules/platform/services/platform.service");
26
+ const remote_access_constants_1 = require("../../../modules/remote-access/remote-access.constants");
27
+ const config_model_1 = require("../models/config.model");
28
+ const remote_access_cloudflare_tunnel_constants_1 = require("../remote-access-cloudflare-tunnel.constants");
29
+ const remote_access_cloudflare_tunnel_exceptions_1 = require("../remote-access-cloudflare-tunnel.exceptions");
30
+ const cloudflared_cli_service_1 = require("./cloudflared-cli.service");
31
+ const cloudflared_metrics_service_1 = require("./cloudflared-metrics.service");
32
+ const cloudflared_process_service_1 = require("./cloudflared-process.service");
33
+ const UNEVALUATED_MESSAGE = 'Not evaluated: the platform requirement is not satisfied.';
34
+ const BLOCKING_ORDER = [
35
+ 'platform-supported',
36
+ 'binary-installed',
37
+ 'version-supported',
38
+ 'token-configured',
39
+ ];
40
+ function compareCloudflaredVersions(a, b) {
41
+ const toParts = (v) => v.split('.').map((segment) => parseInt(segment, 10) || 0);
42
+ const partsA = toParts(a);
43
+ const partsB = toParts(b);
44
+ for (let i = 0; i < Math.max(partsA.length, partsB.length); i++) {
45
+ const diff = (partsA[i] ?? 0) - (partsB[i] ?? 0);
46
+ if (diff !== 0) {
47
+ return diff;
48
+ }
49
+ }
50
+ return 0;
51
+ }
52
+ let CloudflareTunnelManagedService = class CloudflareTunnelManagedService extends base_managed_extension_service_1.BaseManagedExtensionService {
53
+ constructor(cliService, processService, metricsService, configService, nestConfigService, platformService, eventEmitter) {
54
+ super();
55
+ this.cliService = cliService;
56
+ this.processService = processService;
57
+ this.metricsService = metricsService;
58
+ this.configService = configService;
59
+ this.nestConfigService = nestConfigService;
60
+ this.platformService = platformService;
61
+ this.eventEmitter = eventEmitter;
62
+ this.logger = (0, logger_1.createExtensionLogger)(remote_access_cloudflare_tunnel_constants_1.REMOTE_ACCESS_CLOUDFLARE_TUNNEL_PLUGIN_NAME, 'CloudflareTunnelManagedService');
63
+ this.owner = { kind: 'plugin', type: remote_access_cloudflare_tunnel_constants_1.REMOTE_ACCESS_CLOUDFLARE_TUNNEL_PLUGIN_NAME };
64
+ this.serviceId = 'tunnel';
65
+ this.activationPolicy = 'owner-enabled';
66
+ this.generation = 0;
67
+ this.observations = new remote_access_observation_utils_1.RemoteAccessObservation();
68
+ this.requirementObservations = new remote_access_observation_utils_1.RemoteAccessObservation();
69
+ this.pollTimer = null;
70
+ this.lastStatus = null;
71
+ this.lastError = null;
72
+ this.pluginConfig = null;
73
+ this.requirementsCache = null;
74
+ this.lastKnownVersion = null;
75
+ }
76
+ async start() {
77
+ await this.withLock(async () => {
78
+ if (this.state === 'started') {
79
+ return;
80
+ }
81
+ const generation = ++this.generation;
82
+ this.observations.invalidate();
83
+ this.requirementObservations.invalidate();
84
+ this.state = 'starting';
85
+ this.pluginConfig = null;
86
+ const config = this.getPluginConfig();
87
+ this.logger.log('Starting Cloudflare Tunnel service');
88
+ try {
89
+ const requirements = await this.refreshRequirements();
90
+ if (generation !== this.generation) {
91
+ return;
92
+ }
93
+ if (this.requirementsSatisfied(requirements)) {
94
+ this.processService.start({
95
+ token: config.tunnelToken ?? '',
96
+ protocol: config.protocol,
97
+ metricsAddress: this.getMetricsAddress(),
98
+ });
99
+ }
100
+ }
101
+ catch (error) {
102
+ this.logger.warn('Failed to evaluate Cloudflare Tunnel requirements during start', {
103
+ message: error instanceof Error ? error.message : String(error),
104
+ });
105
+ }
106
+ this.schedulePoll(0);
107
+ this.state = 'started';
108
+ this.logger.log('Cloudflare Tunnel service started');
109
+ });
110
+ }
111
+ async stop() {
112
+ this.generation++;
113
+ this.observations.invalidate();
114
+ this.requirementObservations.invalidate();
115
+ this.clearPoll();
116
+ await this.withLock(async () => {
117
+ if (this.state === 'stopped') {
118
+ return;
119
+ }
120
+ this.state = 'stopping';
121
+ this.clearPoll();
122
+ try {
123
+ await this.processService.stop();
124
+ this.state = 'stopped';
125
+ }
126
+ catch (error) {
127
+ const message = error instanceof Error ? error.message : String(error);
128
+ this.state = 'error';
129
+ this.lastError = message;
130
+ this.logger.error('Failed to stop the Cloudflare Tunnel process', { message });
131
+ await this.emitStatus();
132
+ throw new remote_access_cloudflare_tunnel_exceptions_1.CloudflareTunnelStopFailedException(message);
133
+ }
134
+ await this.emitStatus();
135
+ this.logger.log('Cloudflare Tunnel service stopped');
136
+ });
137
+ }
138
+ async emitStatus() {
139
+ const generation = this.generation;
140
+ const snapshot = this.state === 'stopped' || this.state === 'stopping' || this.state === 'error'
141
+ ? {
142
+ status: this.buildStatus(this.state === 'error' ? 'error' : 'disconnected', this.lastError ?? 'The tunnel service is stopped.'),
143
+ metadata: { requirements: this.getRequirements() },
144
+ }
145
+ : await this.getStatusSnapshot();
146
+ if (generation !== this.generation) {
147
+ return;
148
+ }
149
+ const status = snapshot.status;
150
+ this.lastStatus = status;
151
+ this.eventEmitter.emit(remote_access_constants_1.EventType.PROVIDER_OBSERVATION, snapshot);
152
+ }
153
+ async onConfigChanged() {
154
+ this.generation++;
155
+ this.observations.invalidate();
156
+ this.requirementObservations.invalidate();
157
+ const previous = this.pluginConfig;
158
+ this.pluginConfig = null;
159
+ const next = this.getPluginConfig();
160
+ const tokenChanged = !previous || previous.tunnelToken !== next.tunnelToken;
161
+ const protocolChanged = !previous || previous.protocol !== next.protocol;
162
+ if (tokenChanged || protocolChanged) {
163
+ this.logger.log('Cloudflare Tunnel token or protocol changed, restart required');
164
+ return { restartRequired: true };
165
+ }
166
+ await this.emitStatus().catch((error) => {
167
+ this.logger.debug('Failed to emit status after a Cloudflare Tunnel config change', {
168
+ message: error instanceof Error ? error.message : String(error),
169
+ });
170
+ });
171
+ return { restartRequired: false };
172
+ }
173
+ async isHealthy() {
174
+ return (await this.computeStatus()).state === 'connected';
175
+ }
176
+ async factoryReset() {
177
+ try {
178
+ await this.stop();
179
+ return { success: true };
180
+ }
181
+ catch (error) {
182
+ return { success: false, reason: error instanceof Error ? error.message : 'Unknown error' };
183
+ }
184
+ }
185
+ getRequirements() {
186
+ return this.requirementsCache ?? [];
187
+ }
188
+ async refreshRequirements(signal) {
189
+ const generation = this.generation;
190
+ const requirements = await this.requirementObservations.run((readSignal) => this.evaluateRequirementsLive(readSignal), signal);
191
+ signal?.throwIfAborted();
192
+ if (generation === this.generation) {
193
+ this.requirementsCache = requirements;
194
+ }
195
+ return requirements;
196
+ }
197
+ requirementsSatisfied(requirements) {
198
+ return requirements.length > 0 && requirements.every((requirement) => requirement.satisfied);
199
+ }
200
+ async evaluateRequirementsLive(signal) {
201
+ const platform = await this.evaluatePlatformSupported();
202
+ signal?.throwIfAborted();
203
+ if (!platform.satisfied) {
204
+ return this.attachRemedies([
205
+ platform,
206
+ this.unevaluatedRequirement('binary-installed'),
207
+ this.unevaluatedRequirement('version-supported'),
208
+ this.unevaluatedRequirement('token-configured'),
209
+ ], signal);
210
+ }
211
+ const { binary, version } = await this.evaluateBinaryAndVersion(signal);
212
+ const token = this.evaluateTokenConfigured();
213
+ return this.attachRemedies([platform, binary, version, token], signal);
214
+ }
215
+ unevaluatedRequirement(code) {
216
+ return { code, satisfied: false, message: UNEVALUATED_MESSAGE };
217
+ }
218
+ async attachRemedies(requirements, signal) {
219
+ let installRemedyPromise = null;
220
+ const getInstallRemedy = () => {
221
+ installRemedyPromise ??= this.buildInstallRemedy(signal);
222
+ return installRemedyPromise;
223
+ };
224
+ return Promise.all(requirements.map((requirement) => this.finalizeRequirement(requirement, getInstallRemedy)));
225
+ }
226
+ async finalizeRequirement(requirement, getInstallRemedy) {
227
+ if (requirement.satisfied) {
228
+ return { ...requirement, remedy: null };
229
+ }
230
+ const remedy = requirement.code === 'binary-installed' || requirement.code === 'version-supported'
231
+ ? await getInstallRemedy()
232
+ : this.buildFixedRemedy(requirement.code);
233
+ return { ...requirement, remedy };
234
+ }
235
+ buildFixedRemedy(code) {
236
+ switch (code) {
237
+ case 'token-configured':
238
+ return { commands: [], note: 'Paste the tunnel token in the setup wizard' };
239
+ case 'platform-supported':
240
+ default:
241
+ return { commands: [], note: remote_access_cloudflare_tunnel_constants_1.CLOUDFLARE_TUNNEL_DOCUMENTATION_URL };
242
+ }
243
+ }
244
+ async buildInstallRemedy(signal) {
245
+ try {
246
+ const stdout = await this.runSetupScriptPrintPlan(signal);
247
+ const lines = stdout
248
+ .split('\n')
249
+ .map((line) => line.trim())
250
+ .filter((line) => line.length > 0);
251
+ if (lines.length === 0) {
252
+ return { commands: [], note: remote_access_cloudflare_tunnel_constants_1.CLOUDFLARE_TUNNEL_VENDOR_DOWNLOAD_URL };
253
+ }
254
+ return {
255
+ commands: lines.map((line) => (line.includes('|') ? line : `sudo ${line}`)),
256
+ note: null,
257
+ };
258
+ }
259
+ catch (error) {
260
+ this.logger.debug('Failed to build the install remedy from cloudflared-setup.sh --print-plan', {
261
+ message: error instanceof Error ? error.message : String(error),
262
+ });
263
+ return { commands: [], note: remote_access_cloudflare_tunnel_constants_1.CLOUDFLARE_TUNNEL_VENDOR_DOWNLOAD_URL };
264
+ }
265
+ }
266
+ async runSetupScriptPrintPlan(signal) {
267
+ const script = (0, path_1.join)(__dirname, '..', 'scripts', 'cloudflared-setup.sh');
268
+ return (await (0, cancellable_exec_utils_1.cancellableExecFile)('bash', [script, '--print-plan'], signal, remote_access_cloudflare_tunnel_constants_1.CLOUDFLARE_TUNNEL_PRINT_PLAN_TIMEOUT_MS)).stdout;
269
+ }
270
+ async evaluatePlatformSupported() {
271
+ const platformType = await this.platformService.getPlatformTypeAsync();
272
+ if (platformType === platform_constants_1.PlatformType.RASPBERRY || platformType === platform_constants_1.PlatformType.GENERIC) {
273
+ return { code: 'platform-supported', satisfied: true, message: `Platform '${platformType}' is supported.` };
274
+ }
275
+ return {
276
+ code: 'platform-supported',
277
+ satisfied: false,
278
+ message: `Cloudflare Tunnel is not supported on the '${platformType}' platform.`,
279
+ };
280
+ }
281
+ async evaluateBinaryAndVersion(signal) {
282
+ try {
283
+ const info = await this.cliService.getVersion(signal);
284
+ signal?.throwIfAborted();
285
+ this.lastKnownVersion = info.version;
286
+ const supported = compareCloudflaredVersions(info.version, remote_access_cloudflare_tunnel_constants_1.CLOUDFLARED_MIN_VERSION) >= 0;
287
+ return {
288
+ binary: { code: 'binary-installed', satisfied: true, message: `cloudflared ${info.version} is installed.` },
289
+ version: {
290
+ code: 'version-supported',
291
+ satisfied: supported,
292
+ message: supported
293
+ ? `cloudflared ${info.version} meets the minimum supported version ${remote_access_cloudflare_tunnel_constants_1.CLOUDFLARED_MIN_VERSION}.`
294
+ : `cloudflared ${info.version} is older than the minimum supported version ${remote_access_cloudflare_tunnel_constants_1.CLOUDFLARED_MIN_VERSION}.`,
295
+ },
296
+ };
297
+ }
298
+ catch (error) {
299
+ const notInstalled = error instanceof cloudflared_cli_service_1.CloudflaredCliError && error.kind === 'not-installed';
300
+ return {
301
+ binary: {
302
+ code: 'binary-installed',
303
+ satisfied: false,
304
+ message: notInstalled
305
+ ? 'cloudflared is not installed.'
306
+ : 'Failed to determine whether cloudflared is installed.',
307
+ },
308
+ version: {
309
+ code: 'version-supported',
310
+ satisfied: false,
311
+ message: 'Cannot verify the cloudflared version before it is installed.',
312
+ },
313
+ };
314
+ }
315
+ }
316
+ evaluateTokenConfigured() {
317
+ const config = this.getPluginConfig();
318
+ const satisfied = typeof config.tunnelToken === 'string' && config.tunnelToken.trim().length > 0;
319
+ return {
320
+ code: 'token-configured',
321
+ satisfied,
322
+ message: satisfied
323
+ ? 'A Cloudflare tunnel token is configured.'
324
+ : 'Paste the tunnel token from the Cloudflare Zero Trust dashboard',
325
+ };
326
+ }
327
+ firstBlockingRequirement(requirements) {
328
+ for (const code of BLOCKING_ORDER) {
329
+ const requirement = requirements.find((candidate) => candidate.code === code);
330
+ if (requirement && !requirement.satisfied) {
331
+ return requirement;
332
+ }
333
+ }
334
+ return null;
335
+ }
336
+ stateForRequirementCode(code) {
337
+ switch (code) {
338
+ case 'platform-supported':
339
+ return 'unsupported';
340
+ case 'token-configured':
341
+ return 'setup-required';
342
+ case 'binary-installed':
343
+ case 'version-supported':
344
+ default:
345
+ return 'not-installed';
346
+ }
347
+ }
348
+ async computeStatus(options) {
349
+ return (await this.getStatusSnapshot(options)).status;
350
+ }
351
+ async awaitObservationIdle() {
352
+ await Promise.all([this.observations.awaitIdle(), this.requirementObservations.awaitIdle()]);
353
+ }
354
+ async getStatusSnapshot(options) {
355
+ const generation = this.generation;
356
+ try {
357
+ const snapshot = await this.observations.run(async (signal) => {
358
+ const requirements = await this.refreshRequirements(signal);
359
+ const status = await this.collectStatus(requirements, signal);
360
+ signal.throwIfAborted();
361
+ return { status, metadata: { requirements } };
362
+ }, options?.signal);
363
+ if (generation === this.generation) {
364
+ return snapshot;
365
+ }
366
+ }
367
+ catch (error) {
368
+ if (generation === this.generation && this.isPollable()) {
369
+ return {
370
+ status: this.buildStatus('error', error instanceof Error ? error.message : 'The status observation failed.'),
371
+ metadata: { requirements: this.getRequirements() },
372
+ };
373
+ }
374
+ }
375
+ return {
376
+ status: this.buildStatus(this.state === 'error' ? 'error' : 'disconnected', this.lastError ?? 'The observation was superseded by a lifecycle action.'),
377
+ metadata: { requirements: this.getRequirements() },
378
+ };
379
+ }
380
+ async collectStatus(requirements, signal) {
381
+ if (this.state === 'stopped' || this.state === 'stopping') {
382
+ return this.buildStatus('disconnected', 'The tunnel service is stopped.');
383
+ }
384
+ if (this.state === 'error') {
385
+ return this.buildStatus('error', this.lastError ?? 'The Cloudflare Tunnel service failed.');
386
+ }
387
+ const blocking = this.firstBlockingRequirement(requirements);
388
+ if (blocking) {
389
+ return this.buildStatus(this.stateForRequirementCode(blocking.code), blocking.message);
390
+ }
391
+ if (!this.processService.isRunning()) {
392
+ const lastLine = this.processService.getLastStderrLine();
393
+ const exit = this.processService.getLastExit();
394
+ const message = lastLine ??
395
+ (exit
396
+ ? `cloudflared exited unexpectedly${exit.code !== null ? ` (code ${exit.code})` : ''}.`
397
+ : 'cloudflared is not running.');
398
+ return this.buildStatus('error', message);
399
+ }
400
+ const ready = await this.metricsService.fetchReady(this.getMetricsAddress(), signal);
401
+ if (ready) {
402
+ return this.buildStatus('connected', undefined, ready);
403
+ }
404
+ const startedAt = this.processService.getStartedAt();
405
+ const withinGrace = startedAt !== null && Date.now() - startedAt < remote_access_cloudflare_tunnel_constants_1.CLOUDFLARED_READY_GRACE_MS;
406
+ if (withinGrace) {
407
+ return this.buildStatus('connecting', 'Waiting for the tunnel to become ready.');
408
+ }
409
+ const message = this.processService.getLastStderrLine() ?? 'Cloudflared did not become ready in time.';
410
+ return this.buildStatus('error', message);
411
+ }
412
+ isPollable() {
413
+ return this.state === 'starting' || this.state === 'started';
414
+ }
415
+ schedulePoll(delayMs) {
416
+ this.clearPoll();
417
+ if (!this.isPollable()) {
418
+ return;
419
+ }
420
+ this.pollTimer = setTimeout(() => {
421
+ void this.pollTick();
422
+ }, delayMs);
423
+ this.pollTimer.unref?.();
424
+ }
425
+ clearPoll() {
426
+ if (this.pollTimer) {
427
+ clearTimeout(this.pollTimer);
428
+ this.pollTimer = null;
429
+ }
430
+ }
431
+ async pollTick() {
432
+ const generation = this.generation;
433
+ try {
434
+ let snapshot = await this.getStatusSnapshot();
435
+ if (!this.isPollable() || generation !== this.generation) {
436
+ return;
437
+ }
438
+ if (this.state === 'started' &&
439
+ !this.processService.isRunning() &&
440
+ this.requirementsSatisfied(snapshot.metadata.requirements)) {
441
+ const config = this.getPluginConfig();
442
+ this.processService.start({
443
+ token: config.tunnelToken ?? '',
444
+ protocol: config.protocol,
445
+ metricsAddress: this.getMetricsAddress(),
446
+ });
447
+ snapshot = await this.getStatusSnapshot({ fresh: true });
448
+ }
449
+ if (!this.isPollable() || generation !== this.generation) {
450
+ return;
451
+ }
452
+ const status = snapshot.status;
453
+ if (this.hasStatusChanged(this.lastStatus, status)) {
454
+ this.lastStatus = status;
455
+ this.eventEmitter.emit(remote_access_constants_1.EventType.PROVIDER_OBSERVATION, snapshot);
456
+ }
457
+ this.schedulePoll(status.state === 'connecting'
458
+ ? remote_access_cloudflare_tunnel_constants_1.CLOUDFLARED_POLL_INTERVAL_TRANSITIONING_MS
459
+ : remote_access_cloudflare_tunnel_constants_1.CLOUDFLARED_POLL_INTERVAL_STABLE_MS);
460
+ }
461
+ catch (error) {
462
+ if (!this.isPollable() || generation !== this.generation) {
463
+ return;
464
+ }
465
+ this.logger.error('Cloudflare Tunnel status poll failed', {
466
+ message: error instanceof Error ? error.message : String(error),
467
+ });
468
+ this.schedulePoll(remote_access_cloudflare_tunnel_constants_1.CLOUDFLARED_POLL_INTERVAL_STABLE_MS);
469
+ }
470
+ }
471
+ hasStatusChanged(previous, next) {
472
+ if (!previous) {
473
+ return true;
474
+ }
475
+ return (previous.state !== next.state ||
476
+ previous.message !== next.message ||
477
+ JSON.stringify(previous.endpoints) !== JSON.stringify(next.endpoints) ||
478
+ JSON.stringify(previous.details) !== JSON.stringify(next.details) ||
479
+ JSON.stringify(previous.proxyAddresses) !== JSON.stringify(next.proxyAddresses) ||
480
+ JSON.stringify(previous.advisories) !== JSON.stringify(next.advisories));
481
+ }
482
+ buildStatus(state, message, ready = null) {
483
+ const config = this.getPluginConfig();
484
+ const connected = state === 'connected';
485
+ return {
486
+ type: remote_access_cloudflare_tunnel_constants_1.REMOTE_ACCESS_CLOUDFLARE_TUNNEL_PLUGIN_NAME,
487
+ state,
488
+ endpoints: connected ? this.buildEndpoints(config) : [],
489
+ message,
490
+ details: this.buildDetails(config, ready),
491
+ proxyAddresses: connected ? ['127.0.0.1', '::1'] : [],
492
+ advisories: this.buildAdvisories(state, config),
493
+ updatedAt: new Date().toISOString(),
494
+ };
495
+ }
496
+ buildEndpoints(config) {
497
+ if (!config.publicHostname) {
498
+ return [];
499
+ }
500
+ return [{ url: `https://${config.publicHostname}`, scope: 'public', https: true, label: 'Cloudflare Tunnel' }];
501
+ }
502
+ buildDetails(config, ready) {
503
+ return {
504
+ hostname: config.publicHostname,
505
+ connector_id: ready?.connectorId ?? null,
506
+ ready_connections: ready?.readyConnections ?? null,
507
+ version: this.lastKnownVersion,
508
+ };
509
+ }
510
+ buildAdvisories(state, config) {
511
+ const advisories = [];
512
+ if (this.lastKnownVersion && compareCloudflaredVersions(this.lastKnownVersion, remote_access_cloudflare_tunnel_constants_1.CLOUDFLARED_MIN_VERSION) < 0) {
513
+ advisories.push({
514
+ code: 'version-unsupported',
515
+ severity: 'warning',
516
+ message: `cloudflared ${this.lastKnownVersion} is older than the minimum supported version ${remote_access_cloudflare_tunnel_constants_1.CLOUDFLARED_MIN_VERSION}. Upgrade the cloudflared package.`,
517
+ });
518
+ }
519
+ if (state === 'connected') {
520
+ advisories.push({
521
+ code: 'public-exposure',
522
+ severity: 'warning',
523
+ message: 'This installation is reachable from the internet; only the Smart Panel login protects it unless Cloudflare Access is configured.',
524
+ });
525
+ if (!config.publicHostname) {
526
+ advisories.push({
527
+ code: 'hostname-not-configured',
528
+ severity: 'info',
529
+ message: 'The tunnel is connected, but no public hostname is configured yet — no endpoint is published.',
530
+ });
531
+ }
532
+ }
533
+ return advisories;
534
+ }
535
+ getMetricsAddress() {
536
+ return (0, config_utils_1.getEnvValue)(this.nestConfigService, remote_access_cloudflare_tunnel_constants_1.REMOTE_ACCESS_CLOUDFLARE_METRICS_ADDRESS_ENV, remote_access_cloudflare_tunnel_constants_1.CLOUDFLARED_METRICS_ADDRESS);
537
+ }
538
+ getPluginConfig() {
539
+ if (!this.pluginConfig) {
540
+ try {
541
+ this.pluginConfig = this.configService.getPluginConfig(remote_access_cloudflare_tunnel_constants_1.REMOTE_ACCESS_CLOUDFLARE_TUNNEL_PLUGIN_NAME);
542
+ }
543
+ catch (error) {
544
+ this.logger.warn('Failed to load the Cloudflare Tunnel plugin configuration, using defaults', {
545
+ message: error instanceof Error ? error.message : String(error),
546
+ });
547
+ this.pluginConfig = new config_model_1.RemoteAccessCloudflareTunnelPluginConfigModel();
548
+ }
549
+ }
550
+ return this.pluginConfig;
551
+ }
552
+ };
553
+ exports.CloudflareTunnelManagedService = CloudflareTunnelManagedService;
554
+ exports.CloudflareTunnelManagedService = CloudflareTunnelManagedService = __decorate([
555
+ (0, common_1.Injectable)(),
556
+ __metadata("design:paramtypes", [cloudflared_cli_service_1.CloudflaredCliService,
557
+ cloudflared_process_service_1.CloudflaredProcessService,
558
+ cloudflared_metrics_service_1.CloudflaredMetricsService,
559
+ config_service_1.ConfigService,
560
+ config_1.ConfigService,
561
+ platform_service_1.PlatformService,
562
+ event_emitter_1.EventEmitter2])
563
+ ], CloudflareTunnelManagedService);
564
+ //# sourceMappingURL=cloudflare-tunnel-managed.service.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cloudflare-tunnel-managed.service.js","sourceRoot":"","sources":["../../../../src/plugins/remote-access-cloudflare-tunnel/services/cloudflare-tunnel-managed.service.ts"],"names":[],"mappings":";;;;;;;;;;;;AAmFA,gEAcC;AAjGD,+BAA4B;AAE5B,2CAA4C;AAC5C,2CAAoE;AACpE,yDAAsD;AAEtD,mDAA+D;AAC/D,yFAAmF;AACnF,qEAAiE;AACjE,2GAAgG;AAChG,oFAAgF;AAChF,wHAAkH;AAElH,qFAA4E;AAC5E,0FAAsF;AAOtF,oGAA4G;AAC5G,yDAAuF;AACvF,4GAWsD;AACtD,8GAAoG;AAEpG,uEAAuF;AACvF,+EAA0E;AAC1E,+EAA0E;AAiC1E,MAAM,mBAAmB,GA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YAAY,GAAG,IAAI,4DAA6C,EAAE,CAAC;YACzE,CAAC;QACF,CAAC;QAED,OAAO,IAAI,CAAC,YAAY,CAAC;IAC1B,CAAC;CACD,CAAA;AAhuBY,wEAA8B;yCAA9B,8BAA8B;IAD1C,IAAA,mBAAU,GAAE;qCA2BkB,+CAAqB;QACjB,uDAAyB;QACzB,uDAAyB;QAC1B,8BAAa;QACT,sBAAiB;QACnB,kCAAe;QAClB,6BAAa;GAhCjC,8BAA8B,CAguB1C"}
@@ -0,0 +1,22 @@
1
+ import { IRemoteAccessProvider, RemoteAccessProviderCapabilities, RemoteAccessProviderKind, RemoteAccessProviderStatus } from '../../../modules/remote-access/platforms/remote-access-provider.platform';
2
+ import { CloudflareTunnelManagedService } from './cloudflare-tunnel-managed.service';
3
+ export declare class CloudflareTunnelProviderService implements IRemoteAccessProvider {
4
+ private readonly tunnelManagedService;
5
+ readonly type = "remote-access-cloudflare-tunnel-plugin";
6
+ readonly kind: RemoteAccessProviderKind;
7
+ readonly capabilities: RemoteAccessProviderCapabilities;
8
+ constructor(tunnelManagedService: CloudflareTunnelManagedService);
9
+ awaitObservationIdle(): Promise<void>;
10
+ getSnapshot(options?: {
11
+ signal?: AbortSignal;
12
+ fresh?: boolean;
13
+ }): Promise<{
14
+ status: RemoteAccessProviderStatus;
15
+ metadata: import("./cloudflare-tunnel-managed.service").CloudflareTunnelObservationMetadata;
16
+ }>;
17
+ getStatus(options?: {
18
+ signal?: AbortSignal;
19
+ fresh?: boolean;
20
+ }): Promise<RemoteAccessProviderStatus>;
21
+ }
22
+ export type { CloudflareTunnelObservationMetadata } from './cloudflare-tunnel-managed.service';