@fastybird/smart-panel-backend 1.1.0-alpha.2 → 1.1.0-alpha.20
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.
- package/dist/app.module.js +8 -0
- package/dist/app.module.js.map +1 -1
- package/dist/common/filters/conflict-exception.filter.d.ts +6 -0
- package/dist/common/filters/conflict-exception.filter.js +59 -0
- package/dist/common/filters/conflict-exception.filter.js.map +1 -0
- package/dist/common/filters/global-error.filter.js +1 -4
- package/dist/common/filters/global-error.filter.js.map +1 -1
- package/dist/common/filters/global-filters.d.ts +3 -0
- package/dist/common/filters/global-filters.js +22 -0
- package/dist/common/filters/global-filters.js.map +1 -0
- package/dist/common/filters/unprocessable-entity-exception.filter.d.ts +1 -0
- package/dist/common/filters/unprocessable-entity-exception.filter.js +15 -3
- package/dist/common/filters/unprocessable-entity-exception.filter.js.map +1 -1
- package/dist/common/utils/transform.utils.js +3 -0
- package/dist/common/utils/transform.utils.js.map +1 -1
- package/dist/dataSource.js +1 -0
- package/dist/dataSource.js.map +1 -1
- package/dist/main.js +2 -7
- package/dist/main.js.map +1 -1
- package/dist/migrations/1000000000026-AddHardwareInputCategories.d.ts +7 -0
- package/dist/migrations/1000000000026-AddHardwareInputCategories.js +364 -0
- package/dist/migrations/1000000000026-AddHardwareInputCategories.js.map +1 -0
- package/dist/modules/devices/controllers/channels.controller.d.ts +5 -1
- package/dist/modules/devices/controllers/channels.controller.js +34 -2
- package/dist/modules/devices/controllers/channels.controller.js.map +1 -1
- package/dist/modules/devices/controllers/channels.properties.controller.js +21 -4
- package/dist/modules/devices/controllers/channels.properties.controller.js.map +1 -1
- package/dist/modules/devices/controllers/devices.channels.controller.d.ts +5 -1
- package/dist/modules/devices/controllers/devices.channels.controller.js +38 -2
- package/dist/modules/devices/controllers/devices.channels.controller.js.map +1 -1
- package/dist/modules/devices/controllers/devices.channels.properties.controller.js +21 -4
- package/dist/modules/devices/controllers/devices.channels.properties.controller.js.map +1 -1
- package/dist/modules/devices/devices.constants.d.ts +6 -0
- package/dist/modules/devices/devices.constants.js +6 -0
- package/dist/modules/devices/devices.constants.js.map +1 -1
- package/dist/modules/devices/devices.module.js +18 -0
- package/dist/modules/devices/devices.module.js.map +1 -1
- package/dist/modules/devices/devices.openapi.d.ts +3 -1
- package/dist/modules/devices/devices.openapi.js +7 -0
- package/dist/modules/devices/devices.openapi.js.map +1 -1
- package/dist/modules/devices/dto/channel-input-occurrence.dto.d.ts +10 -0
- package/dist/modules/devices/dto/channel-input-occurrence.dto.js +99 -0
- package/dist/modules/devices/dto/channel-input-occurrence.dto.js.map +1 -0
- package/dist/modules/devices/models/channel-input-capabilities.model.d.ts +20 -0
- package/dist/modules/devices/models/channel-input-capabilities.model.js +111 -0
- package/dist/modules/devices/models/channel-input-capabilities.model.js.map +1 -0
- package/dist/modules/devices/models/channel-input-occurrence.model.d.ts +22 -0
- package/dist/modules/devices/models/channel-input-occurrence.model.js +154 -0
- package/dist/modules/devices/models/channel-input-occurrence.model.js.map +1 -0
- package/dist/modules/devices/services/channel-input-deduplication.service.d.ts +17 -0
- package/dist/modules/devices/services/channel-input-deduplication.service.js +88 -0
- package/dist/modules/devices/services/channel-input-deduplication.service.js.map +1 -0
- package/dist/modules/devices/services/channel-input-occurrences.service.d.ts +21 -0
- package/dist/modules/devices/services/channel-input-occurrences.service.js +163 -0
- package/dist/modules/devices/services/channel-input-occurrences.service.js.map +1 -0
- package/dist/modules/devices/services/channels.properties.service.d.ts +27 -3
- package/dist/modules/devices/services/channels.properties.service.js +304 -28
- package/dist/modules/devices/services/channels.properties.service.js.map +1 -1
- package/dist/modules/devices/services/channels.service.js +42 -38
- package/dist/modules/devices/services/channels.service.js.map +1 -1
- package/dist/modules/devices/services/command-latency-trace-collector.service.d.ts +101 -0
- package/dist/modules/devices/services/command-latency-trace-collector.service.js +451 -0
- package/dist/modules/devices/services/command-latency-trace-collector.service.js.map +1 -0
- package/dist/modules/devices/services/device-structure-lock.service.d.ts +10 -2
- package/dist/modules/devices/services/device-structure-lock.service.js +86 -7
- package/dist/modules/devices/services/device-structure-lock.service.js.map +1 -1
- package/dist/modules/devices/services/devices.service.js +37 -33
- package/dist/modules/devices/services/devices.service.js.map +1 -1
- package/dist/modules/devices/services/module-reset.service.d.ts +3 -1
- package/dist/modules/devices/services/module-reset.service.js +21 -16
- package/dist/modules/devices/services/module-reset.service.js.map +1 -1
- package/dist/modules/devices/services/property-command-dispatch.service.d.ts +45 -0
- package/dist/modules/devices/services/property-command-dispatch.service.js +227 -0
- package/dist/modules/devices/services/property-command-dispatch.service.js.map +1 -0
- package/dist/modules/devices/services/property-command-window.service.d.ts +71 -0
- package/dist/modules/devices/services/property-command-window.service.js +204 -0
- package/dist/modules/devices/services/property-command-window.service.js.map +1 -0
- package/dist/modules/devices/services/property-command.service.d.ts +20 -3
- package/dist/modules/devices/services/property-command.service.js +56 -10
- package/dist/modules/devices/services/property-command.service.js.map +1 -1
- package/dist/modules/devices/services/property-state-coordinator.service.d.ts +4 -0
- package/dist/modules/devices/services/property-state-coordinator.service.js +35 -0
- package/dist/modules/devices/services/property-state-coordinator.service.js.map +1 -0
- package/dist/modules/devices/services/property-value.service.d.ts +1 -0
- package/dist/modules/devices/services/property-value.service.js +4 -0
- package/dist/modules/devices/services/property-value.service.js.map +1 -1
- package/dist/modules/devices/utils/schema.utils.js +1 -1
- package/dist/modules/devices/utils/schema.utils.js.map +1 -1
- package/dist/modules/platform/services/platform.service.d.ts +13 -4
- package/dist/modules/platform/services/platform.service.js +57 -35
- package/dist/modules/platform/services/platform.service.js.map +1 -1
- package/dist/modules/remote-access/dto/update-config.dto.js +5 -0
- package/dist/modules/remote-access/dto/update-config.dto.js.map +1 -1
- package/dist/modules/remote-access/validators/is-remote-access-url.validator.js +5 -2
- package/dist/modules/remote-access/validators/is-remote-access-url.validator.js.map +1 -1
- package/dist/modules/system/scripts/update-worker.sh +668 -59
- package/dist/modules/system/services/privileged-worker.service.d.ts +10 -0
- package/dist/modules/system/services/privileged-worker.service.js +137 -11
- package/dist/modules/system/services/privileged-worker.service.js.map +1 -1
- package/dist/modules/system/services/update-executor.service.d.ts +20 -2
- package/dist/modules/system/services/update-executor.service.js +256 -25
- package/dist/modules/system/services/update-executor.service.js.map +1 -1
- package/dist/modules/websocket/gateway/websocket.gateway.d.ts +4 -1
- package/dist/modules/websocket/gateway/websocket.gateway.js +28 -5
- package/dist/modules/websocket/gateway/websocket.gateway.js.map +1 -1
- package/dist/modules/websocket/services/command-acknowledgement-trace.service.d.ts +143 -0
- package/dist/modules/websocket/services/command-acknowledgement-trace.service.js +523 -0
- package/dist/modules/websocket/services/command-acknowledgement-trace.service.js.map +1 -0
- package/dist/modules/websocket/websocket.module.js +9 -1
- package/dist/modules/websocket/websocket.module.js.map +1 -1
- package/dist/plugins/devices-home-assistant/devices-home-assistant.openapi.d.ts +2 -2
- package/dist/plugins/devices-home-assistant/devices-home-assistant.plugin.d.ts +6 -1
- package/dist/plugins/devices-home-assistant/devices-home-assistant.plugin.js +16 -1
- package/dist/plugins/devices-home-assistant/devices-home-assistant.plugin.js.map +1 -1
- package/dist/plugins/devices-home-assistant/dto/mapping-preview.dto.d.ts +1 -0
- package/dist/plugins/devices-home-assistant/dto/mapping-preview.dto.js +11 -0
- package/dist/plugins/devices-home-assistant/dto/mapping-preview.dto.js.map +1 -1
- package/dist/plugins/devices-home-assistant/mappers/button.entity.mapper.service.d.ts +19 -0
- package/dist/plugins/devices-home-assistant/mappers/button.entity.mapper.service.js +51 -0
- package/dist/plugins/devices-home-assistant/mappers/button.entity.mapper.service.js.map +1 -0
- package/dist/plugins/devices-home-assistant/mappings/definitions/entity-mappings.yaml +56 -7
- package/dist/plugins/devices-home-assistant/models/mapping-preview.model.d.ts +1 -0
- package/dist/plugins/devices-home-assistant/models/mapping-preview.model.js +11 -0
- package/dist/plugins/devices-home-assistant/models/mapping-preview.model.js.map +1 -1
- package/dist/plugins/devices-home-assistant/services/device-adoption.service.js +17 -0
- package/dist/plugins/devices-home-assistant/services/device-adoption.service.js.map +1 -1
- package/dist/plugins/devices-home-assistant/services/home-assistant-raw-event.service.d.ts +27 -0
- package/dist/plugins/devices-home-assistant/services/home-assistant-raw-event.service.js +271 -0
- package/dist/plugins/devices-home-assistant/services/home-assistant-raw-event.service.js.map +1 -0
- package/dist/plugins/devices-home-assistant/services/home-assistant.ws.service.d.ts +2 -2
- package/dist/plugins/devices-home-assistant/services/home-assistant.ws.service.js +33 -14
- package/dist/plugins/devices-home-assistant/services/home-assistant.ws.service.js.map +1 -1
- package/dist/plugins/devices-home-assistant/services/mapping-preview.service.js +24 -4
- package/dist/plugins/devices-home-assistant/services/mapping-preview.service.js.map +1 -1
- package/dist/plugins/devices-home-assistant/services/state-changed.event.service.d.ts +4 -1
- package/dist/plugins/devices-home-assistant/services/state-changed.event.service.js +84 -5
- package/dist/plugins/devices-home-assistant/services/state-changed.event.service.js.map +1 -1
- package/dist/plugins/devices-home-assistant/services/wizard.service.js +1 -0
- package/dist/plugins/devices-home-assistant/services/wizard.service.js.map +1 -1
- package/dist/plugins/devices-home-assistant/utils/ha-event.utils.d.ts +2 -0
- package/dist/plugins/devices-home-assistant/utils/ha-event.utils.js +50 -0
- package/dist/plugins/devices-home-assistant/utils/ha-event.utils.js.map +1 -0
- package/dist/plugins/devices-homekit/listeners/homekit-event.listener.d.ts +2 -0
- package/dist/plugins/devices-homekit/listeners/homekit-event.listener.js +28 -1
- package/dist/plugins/devices-homekit/listeners/homekit-event.listener.js.map +1 -1
- package/dist/plugins/devices-homekit/mappers/base.mapper.js +27 -4
- package/dist/plugins/devices-homekit/mappers/base.mapper.js.map +1 -1
- package/dist/plugins/devices-homekit/mappers/button.mapper.d.ts +15 -0
- package/dist/plugins/devices-homekit/mappers/button.mapper.js +143 -0
- package/dist/plugins/devices-homekit/mappers/button.mapper.js.map +1 -0
- package/dist/plugins/devices-homekit/mappers/homekit-mapper.interface.d.ts +16 -0
- package/dist/plugins/devices-homekit/mappers/thermostat-coordinator.d.ts +7 -0
- package/dist/plugins/devices-homekit/mappers/thermostat-coordinator.js +84 -73
- package/dist/plugins/devices-homekit/mappers/thermostat-coordinator.js.map +1 -1
- package/dist/plugins/devices-homekit/services/homekit-mapper-registry.service.d.ts +5 -1
- package/dist/plugins/devices-homekit/services/homekit-mapper-registry.service.js +42 -0
- package/dist/plugins/devices-homekit/services/homekit-mapper-registry.service.js.map +1 -1
- package/dist/plugins/devices-homey/mappings/definitions/channels.yaml +50 -0
- package/dist/plugins/devices-homey/mappings/definitions/devices.yaml +18 -0
- package/dist/plugins/devices-homey/mappings/definitions/properties.yaml +55 -0
- package/dist/plugins/devices-homey/mappings/device-support.js +10 -0
- package/dist/plugins/devices-homey/mappings/device-support.js.map +1 -1
- package/dist/plugins/devices-homey/mappings/mapping-loader.service.d.ts +1 -0
- package/dist/plugins/devices-homey/mappings/mapping-loader.service.js +66 -8
- package/dist/plugins/devices-homey/mappings/mapping-loader.service.js.map +1 -1
- package/dist/plugins/devices-homey/models/inventory.model.d.ts +2 -1
- package/dist/plugins/devices-homey/models/inventory.model.js +1 -0
- package/dist/plugins/devices-homey/models/inventory.model.js.map +1 -1
- package/dist/plugins/devices-homey/models/mapping-preview.model.d.ts +1 -0
- package/dist/plugins/devices-homey/models/mapping-preview.model.js +1 -0
- package/dist/plugins/devices-homey/models/mapping-preview.model.js.map +1 -1
- package/dist/plugins/devices-homey/services/homey-mapping-preview.service.js +7 -0
- package/dist/plugins/devices-homey/services/homey-mapping-preview.service.js.map +1 -1
- package/dist/plugins/devices-homey/services/homey-synchronizer.service.d.ts +3 -1
- package/dist/plugins/devices-homey/services/homey-synchronizer.service.js +37 -6
- package/dist/plugins/devices-homey/services/homey-synchronizer.service.js.map +1 -1
- package/dist/plugins/devices-reterminal/services/reterminal-button.service.d.ts +7 -3
- package/dist/plugins/devices-reterminal/services/reterminal-button.service.js +63 -17
- package/dist/plugins/devices-reterminal/services/reterminal-button.service.js.map +1 -1
- package/dist/plugins/devices-shelly-ng/delegates/delegates-manager.service.d.ts +38 -3
- package/dist/plugins/devices-shelly-ng/delegates/delegates-manager.service.js +840 -134
- package/dist/plugins/devices-shelly-ng/delegates/delegates-manager.service.js.map +1 -1
- package/dist/plugins/devices-shelly-ng/delegates/shelly-device.delegate.d.ts +15 -1
- package/dist/plugins/devices-shelly-ng/delegates/shelly-device.delegate.js +117 -10
- package/dist/plugins/devices-shelly-ng/delegates/shelly-device.delegate.js.map +1 -1
- package/dist/plugins/devices-shelly-ng/devices-shelly-ng.constants.js +11 -13
- package/dist/plugins/devices-shelly-ng/devices-shelly-ng.constants.js.map +1 -1
- package/dist/plugins/devices-shelly-ng/devices-shelly-ng.plugin.js +2 -0
- package/dist/plugins/devices-shelly-ng/devices-shelly-ng.plugin.js.map +1 -1
- package/dist/plugins/devices-shelly-ng/mappings/definitions/inputs.yaml +80 -0
- package/dist/plugins/devices-shelly-ng/mappings/mapping-loader.service.js +11 -1
- package/dist/plugins/devices-shelly-ng/mappings/mapping-loader.service.js.map +1 -1
- package/dist/plugins/devices-shelly-ng/mappings/mapping.types.d.ts +6 -3
- package/dist/plugins/devices-shelly-ng/mappings/schema/mapping-schema.json +5 -0
- package/dist/plugins/devices-shelly-ng/services/device-manager.service.js +130 -7
- package/dist/plugins/devices-shelly-ng/services/device-manager.service.js.map +1 -1
- package/dist/plugins/devices-shelly-ng/services/poll-placement-diagnostics.service.d.ts +48 -0
- package/dist/plugins/devices-shelly-ng/services/poll-placement-diagnostics.service.js +457 -0
- package/dist/plugins/devices-shelly-ng/services/poll-placement-diagnostics.service.js.map +1 -0
- package/dist/plugins/devices-shelly-ng/services/shelly-ng.service.d.ts +12 -2
- package/dist/plugins/devices-shelly-ng/services/shelly-ng.service.js +86 -28
- package/dist/plugins/devices-shelly-ng/services/shelly-ng.service.js.map +1 -1
- package/dist/plugins/devices-shelly-ng/services/shelly-rpc-client.service.js +3 -0
- package/dist/plugins/devices-shelly-ng/services/shelly-rpc-client.service.js.map +1 -1
- package/dist/plugins/devices-shelly-ng/services/shelly-ws-server.service.d.ts +1 -1
- package/dist/plugins/devices-shelly-ng/services/shelly-ws-server.service.js +18 -13
- package/dist/plugins/devices-shelly-ng/services/shelly-ws-server.service.js.map +1 -1
- package/dist/plugins/devices-shelly-ng/utils/transform.utils.d.ts +2 -0
- package/dist/plugins/devices-shelly-ng/utils/transform.utils.js +14 -1
- package/dist/plugins/devices-shelly-ng/utils/transform.utils.js.map +1 -1
- package/dist/plugins/devices-shelly-v1/devices-shelly-v1.constants.d.ts +2 -0
- package/dist/plugins/devices-shelly-v1/devices-shelly-v1.constants.js +66 -4
- package/dist/plugins/devices-shelly-v1/devices-shelly-v1.constants.js.map +1 -1
- package/dist/plugins/devices-shelly-v1/devices-shelly-v1.plugin.js +2 -0
- package/dist/plugins/devices-shelly-v1/devices-shelly-v1.plugin.js.map +1 -1
- package/dist/plugins/devices-shelly-v1/platforms/shelly-v1.device.platform.js +7 -0
- package/dist/plugins/devices-shelly-v1/platforms/shelly-v1.device.platform.js.map +1 -1
- package/dist/plugins/devices-shelly-v1/services/device-mapper.service.d.ts +3 -1
- package/dist/plugins/devices-shelly-v1/services/device-mapper.service.js +20 -2
- package/dist/plugins/devices-shelly-v1/services/device-mapper.service.js.map +1 -1
- package/dist/plugins/devices-shelly-v1/services/shelly-v1-input-tracker.service.d.ts +16 -0
- package/dist/plugins/devices-shelly-v1/services/shelly-v1-input-tracker.service.js +107 -0
- package/dist/plugins/devices-shelly-v1/services/shelly-v1-input-tracker.service.js.map +1 -0
- package/dist/plugins/devices-shelly-v1/services/shelly-v1.service.d.ts +7 -1
- package/dist/plugins/devices-shelly-v1/services/shelly-v1.service.js +98 -3
- package/dist/plugins/devices-shelly-v1/services/shelly-v1.service.js.map +1 -1
- package/dist/plugins/devices-third-party/controllers/third-party-inputs.controller.d.ts +17 -0
- package/dist/plugins/devices-third-party/controllers/third-party-inputs.controller.js +205 -0
- package/dist/plugins/devices-third-party/controllers/third-party-inputs.controller.js.map +1 -0
- package/dist/plugins/devices-third-party/devices-third-party.openapi.d.ts +1 -1
- package/dist/plugins/devices-third-party/devices-third-party.plugin.js +2 -1
- package/dist/plugins/devices-third-party/devices-third-party.plugin.js.map +1 -1
- package/dist/plugins/devices-third-party/dto/report-input-occurrence-response.dto.d.ts +5 -0
- package/dist/plugins/devices-third-party/dto/report-input-occurrence-response.dto.js +50 -0
- package/dist/plugins/devices-third-party/dto/report-input-occurrence-response.dto.js.map +1 -0
- package/dist/plugins/devices-third-party/dto/report-input-occurrence.dto.d.ts +8 -0
- package/dist/plugins/devices-third-party/dto/report-input-occurrence.dto.js +81 -0
- package/dist/plugins/devices-third-party/dto/report-input-occurrence.dto.js.map +1 -0
- package/dist/plugins/devices-third-party/platforms/third-party-device.platform.js +19 -4
- package/dist/plugins/devices-third-party/platforms/third-party-device.platform.js.map +1 -1
- package/dist/plugins/devices-virtual/listeners/virtual-projection.listener.d.ts +2 -0
- package/dist/plugins/devices-virtual/listeners/virtual-projection.listener.js +57 -0
- package/dist/plugins/devices-virtual/listeners/virtual-projection.listener.js.map +1 -1
- package/dist/plugins/devices-zigbee2mqtt/devices-zigbee2mqtt.constants.d.ts +3 -0
- package/dist/plugins/devices-zigbee2mqtt/devices-zigbee2mqtt.constants.js +41 -5
- package/dist/plugins/devices-zigbee2mqtt/devices-zigbee2mqtt.constants.js.map +1 -1
- package/dist/plugins/devices-zigbee2mqtt/interfaces/zigbee2mqtt.interface.d.ts +7 -1
- package/dist/plugins/devices-zigbee2mqtt/mappings/config-driven.converter.js +16 -15
- package/dist/plugins/devices-zigbee2mqtt/mappings/config-driven.converter.js.map +1 -1
- package/dist/plugins/devices-zigbee2mqtt/mappings/definitions/remotes.yaml +505 -74
- package/dist/plugins/devices-zigbee2mqtt/mappings/schema/mapping-schema.json +3 -3
- package/dist/plugins/devices-zigbee2mqtt/mappings/transformers/transformer.types.d.ts +1 -1
- package/dist/plugins/devices-zigbee2mqtt/services/base-client-adapter.d.ts +8 -2
- package/dist/plugins/devices-zigbee2mqtt/services/base-client-adapter.js +6 -5
- package/dist/plugins/devices-zigbee2mqtt/services/base-client-adapter.js.map +1 -1
- package/dist/plugins/devices-zigbee2mqtt/services/device-adoption.service.js +18 -11
- package/dist/plugins/devices-zigbee2mqtt/services/device-adoption.service.js.map +1 -1
- package/dist/plugins/devices-zigbee2mqtt/services/device-mapper.service.d.ts +9 -3
- package/dist/plugins/devices-zigbee2mqtt/services/device-mapper.service.js +166 -3
- package/dist/plugins/devices-zigbee2mqtt/services/device-mapper.service.js.map +1 -1
- package/dist/plugins/devices-zigbee2mqtt/services/mqtt-client-adapter.service.js +5 -2
- package/dist/plugins/devices-zigbee2mqtt/services/mqtt-client-adapter.service.js.map +1 -1
- package/dist/plugins/devices-zigbee2mqtt/services/zigbee2mqtt.service.d.ts +1 -0
- package/dist/plugins/devices-zigbee2mqtt/services/zigbee2mqtt.service.js +44 -4
- package/dist/plugins/devices-zigbee2mqtt/services/zigbee2mqtt.service.js.map +1 -1
- package/dist/plugins/remote-access-cloudflare-tunnel/controllers/setup.controller.d.ts +17 -0
- package/dist/plugins/remote-access-cloudflare-tunnel/controllers/setup.controller.js +147 -0
- package/dist/plugins/remote-access-cloudflare-tunnel/controllers/setup.controller.js.map +1 -0
- package/dist/plugins/remote-access-cloudflare-tunnel/controllers/status.controller.d.ts +15 -0
- package/dist/plugins/remote-access-cloudflare-tunnel/controllers/status.controller.js +98 -0
- package/dist/plugins/remote-access-cloudflare-tunnel/controllers/status.controller.js.map +1 -0
- package/dist/plugins/remote-access-cloudflare-tunnel/dto/update-config.dto.d.ts +9 -0
- package/dist/plugins/remote-access-cloudflare-tunnel/dto/update-config.dto.js +94 -0
- package/dist/plugins/remote-access-cloudflare-tunnel/dto/update-config.dto.js.map +1 -0
- package/dist/plugins/remote-access-cloudflare-tunnel/models/config.model.d.ts +9 -0
- package/dist/plugins/remote-access-cloudflare-tunnel/models/config.model.js +92 -0
- package/dist/plugins/remote-access-cloudflare-tunnel/models/config.model.js.map +1 -0
- package/dist/plugins/remote-access-cloudflare-tunnel/models/install.model.d.ts +7 -0
- package/dist/plugins/remote-access-cloudflare-tunnel/models/install.model.js +48 -0
- package/dist/plugins/remote-access-cloudflare-tunnel/models/install.model.js.map +1 -0
- package/dist/plugins/remote-access-cloudflare-tunnel/models/status.model.d.ts +42 -0
- package/dist/plugins/remote-access-cloudflare-tunnel/models/status.model.js +352 -0
- package/dist/plugins/remote-access-cloudflare-tunnel/models/status.model.js.map +1 -0
- package/dist/plugins/remote-access-cloudflare-tunnel/remote-access-cloudflare-tunnel.constants.d.ts +24 -0
- package/dist/plugins/remote-access-cloudflare-tunnel/remote-access-cloudflare-tunnel.constants.js +27 -0
- package/dist/plugins/remote-access-cloudflare-tunnel/remote-access-cloudflare-tunnel.constants.js.map +1 -0
- package/dist/plugins/remote-access-cloudflare-tunnel/remote-access-cloudflare-tunnel.exceptions.d.ts +8 -0
- package/dist/plugins/remote-access-cloudflare-tunnel/remote-access-cloudflare-tunnel.exceptions.js +19 -0
- package/dist/plugins/remote-access-cloudflare-tunnel/remote-access-cloudflare-tunnel.exceptions.js.map +1 -0
- package/dist/plugins/remote-access-cloudflare-tunnel/remote-access-cloudflare-tunnel.openapi.d.ts +4 -0
- package/dist/plugins/remote-access-cloudflare-tunnel/remote-access-cloudflare-tunnel.openapi.js +20 -0
- package/dist/plugins/remote-access-cloudflare-tunnel/remote-access-cloudflare-tunnel.openapi.js.map +1 -0
- package/dist/plugins/remote-access-cloudflare-tunnel/remote-access-cloudflare-tunnel.plugin.d.ts +21 -0
- package/dist/plugins/remote-access-cloudflare-tunnel/remote-access-cloudflare-tunnel.plugin.js +135 -0
- package/dist/plugins/remote-access-cloudflare-tunnel/remote-access-cloudflare-tunnel.plugin.js.map +1 -0
- package/dist/plugins/remote-access-cloudflare-tunnel/scripts/cloudflared-setup.sh +185 -0
- package/dist/plugins/remote-access-cloudflare-tunnel/services/cloudflare-tunnel-managed.service.d.ts +82 -0
- package/dist/plugins/remote-access-cloudflare-tunnel/services/cloudflare-tunnel-managed.service.js +507 -0
- package/dist/plugins/remote-access-cloudflare-tunnel/services/cloudflare-tunnel-managed.service.js.map +1 -0
- package/dist/plugins/remote-access-cloudflare-tunnel/services/cloudflare-tunnel-provider.service.d.ts +10 -0
- package/dist/plugins/remote-access-cloudflare-tunnel/services/cloudflare-tunnel-provider.service.js +37 -0
- package/dist/plugins/remote-access-cloudflare-tunnel/services/cloudflare-tunnel-provider.service.js.map +1 -0
- package/dist/plugins/remote-access-cloudflare-tunnel/services/cloudflare-tunnel-setup.service.d.ts +38 -0
- package/dist/plugins/remote-access-cloudflare-tunnel/services/cloudflare-tunnel-setup.service.js +147 -0
- package/dist/plugins/remote-access-cloudflare-tunnel/services/cloudflare-tunnel-setup.service.js.map +1 -0
- package/dist/plugins/remote-access-cloudflare-tunnel/services/cloudflared-cli.service.d.ts +15 -0
- package/dist/plugins/remote-access-cloudflare-tunnel/services/cloudflared-cli.service.js +67 -0
- package/dist/plugins/remote-access-cloudflare-tunnel/services/cloudflared-cli.service.js.map +1 -0
- package/dist/plugins/remote-access-cloudflare-tunnel/services/cloudflared-metrics.service.d.ts +8 -0
- package/dist/plugins/remote-access-cloudflare-tunnel/services/cloudflared-metrics.service.js +46 -0
- package/dist/plugins/remote-access-cloudflare-tunnel/services/cloudflared-metrics.service.js.map +1 -0
- package/dist/plugins/remote-access-cloudflare-tunnel/services/cloudflared-process.service.d.ts +27 -0
- package/dist/plugins/remote-access-cloudflare-tunnel/services/cloudflared-process.service.js +139 -0
- package/dist/plugins/remote-access-cloudflare-tunnel/services/cloudflared-process.service.js.map +1 -0
- package/dist/plugins/remote-access-tailscale/controllers/setup.controller.d.ts +1 -0
- package/dist/plugins/remote-access-tailscale/controllers/setup.controller.js +26 -10
- package/dist/plugins/remote-access-tailscale/controllers/setup.controller.js.map +1 -1
- package/dist/plugins/remote-access-tailscale/controllers/status.controller.d.ts +6 -1
- package/dist/plugins/remote-access-tailscale/controllers/status.controller.js +28 -3
- package/dist/plugins/remote-access-tailscale/controllers/status.controller.js.map +1 -1
- package/dist/plugins/remote-access-tailscale/models/status.model.d.ts +19 -0
- package/dist/plugins/remote-access-tailscale/models/status.model.js +158 -1
- package/dist/plugins/remote-access-tailscale/models/status.model.js.map +1 -1
- package/dist/plugins/remote-access-tailscale/remote-access-tailscale.constants.d.ts +3 -0
- package/dist/plugins/remote-access-tailscale/remote-access-tailscale.constants.js +4 -1
- package/dist/plugins/remote-access-tailscale/remote-access-tailscale.constants.js.map +1 -1
- package/dist/plugins/remote-access-tailscale/remote-access-tailscale.exceptions.d.ts +13 -0
- package/dist/plugins/remote-access-tailscale/remote-access-tailscale.exceptions.js +27 -0
- package/dist/plugins/remote-access-tailscale/remote-access-tailscale.exceptions.js.map +1 -0
- package/dist/plugins/remote-access-tailscale/remote-access-tailscale.openapi.d.ts +2 -2
- package/dist/plugins/remote-access-tailscale/remote-access-tailscale.openapi.js +2 -0
- package/dist/plugins/remote-access-tailscale/remote-access-tailscale.openapi.js.map +1 -1
- package/dist/plugins/remote-access-tailscale/remote-access-tailscale.plugin.js +1 -1
- package/dist/plugins/remote-access-tailscale/scripts/tailscale-setup.sh +61 -0
- package/dist/plugins/remote-access-tailscale/services/tailscale-cli.service.d.ts +9 -0
- package/dist/plugins/remote-access-tailscale/services/tailscale-cli.service.js +12 -0
- package/dist/plugins/remote-access-tailscale/services/tailscale-cli.service.js.map +1 -1
- package/dist/plugins/remote-access-tailscale/services/tailscale-login.service.d.ts +1 -0
- package/dist/plugins/remote-access-tailscale/services/tailscale-login.service.js +27 -2
- package/dist/plugins/remote-access-tailscale/services/tailscale-login.service.js.map +1 -1
- package/dist/plugins/remote-access-tailscale/services/tailscale-node-managed.service.d.ts +31 -1
- package/dist/plugins/remote-access-tailscale/services/tailscale-node-managed.service.js +316 -30
- package/dist/plugins/remote-access-tailscale/services/tailscale-node-managed.service.js.map +1 -1
- package/dist/plugins/remote-access-tailscale/services/tailscale-serve.service.d.ts +8 -3
- package/dist/plugins/remote-access-tailscale/services/tailscale-serve.service.js +39 -12
- package/dist/plugins/remote-access-tailscale/services/tailscale-serve.service.js.map +1 -1
- package/dist/plugins/remote-access-tailscale/services/tailscale-setup.service.d.ts +14 -5
- package/dist/plugins/remote-access-tailscale/services/tailscale-setup.service.js +51 -16
- package/dist/plugins/remote-access-tailscale/services/tailscale-setup.service.js.map +1 -1
- package/dist/plugins/scenes-local/platforms/local-scene.platform.d.ts +3 -1
- package/dist/plugins/scenes-local/platforms/local-scene.platform.js +12 -7
- package/dist/plugins/scenes-local/platforms/local-scene.platform.js.map +1 -1
- package/dist/plugins/simulator/controllers/simulator.controller.d.ts +8 -2
- package/dist/plugins/simulator/controllers/simulator.controller.js +102 -2
- package/dist/plugins/simulator/controllers/simulator.controller.js.map +1 -1
- package/dist/plugins/simulator/dto/simulate-occurrence.dto.d.ts +12 -0
- package/dist/plugins/simulator/dto/simulate-occurrence.dto.js +122 -0
- package/dist/plugins/simulator/dto/simulate-occurrence.dto.js.map +1 -0
- package/dist/plugins/simulator/models/simulator-response.model.d.ts +12 -0
- package/dist/plugins/simulator/models/simulator-response.model.js +84 -1
- package/dist/plugins/simulator/models/simulator-response.model.js.map +1 -1
- package/dist/plugins/simulator/scenarios/definitions/small-apartment.yaml +78 -0
- package/dist/plugins/simulator/services/scenario-executor.service.js +3 -1
- package/dist/plugins/simulator/services/scenario-executor.service.js.map +1 -1
- package/dist/plugins/simulator/services/simulation.service.js +10 -1
- package/dist/plugins/simulator/services/simulation.service.js.map +1 -1
- package/dist/plugins/simulator/simulator.openapi.d.ts +3 -2
- package/dist/plugins/simulator/simulator.openapi.js +5 -0
- package/dist/plugins/simulator/simulator.openapi.js.map +1 -1
- package/dist/plugins/simulator/simulators/device-simulator.interface.d.ts +2 -0
- package/dist/plugins/simulator/simulators/device-simulator.interface.js +83 -0
- package/dist/plugins/simulator/simulators/device-simulator.interface.js.map +1 -1
- package/dist/plugins/simulator/simulators/index.d.ts +1 -0
- package/dist/plugins/simulator/simulators/index.js +1 -0
- package/dist/plugins/simulator/simulators/index.js.map +1 -1
- package/dist/plugins/simulator/simulators/input-controller.simulator.d.ts +10 -0
- package/dist/plugins/simulator/simulators/input-controller.simulator.js +57 -0
- package/dist/plugins/simulator/simulators/input-controller.simulator.js.map +1 -0
- package/dist/plugins/simulator/simulators/lighting.simulator.js +1 -0
- package/dist/plugins/simulator/simulators/lighting.simulator.js.map +1 -1
- package/dist/plugins/spaces-home-control/services/climate-intent.service.d.ts +3 -1
- package/dist/plugins/spaces-home-control/services/climate-intent.service.js +6 -3
- package/dist/plugins/spaces-home-control/services/climate-intent.service.js.map +1 -1
- package/dist/plugins/spaces-home-control/services/covers-intent.service.d.ts +3 -1
- package/dist/plugins/spaces-home-control/services/covers-intent.service.js +6 -3
- package/dist/plugins/spaces-home-control/services/covers-intent.service.js.map +1 -1
- package/dist/plugins/spaces-home-control/services/lighting-intent.service.d.ts +3 -1
- package/dist/plugins/spaces-home-control/services/lighting-intent.service.js +7 -4
- package/dist/plugins/spaces-home-control/services/lighting-intent.service.js.map +1 -1
- package/dist/plugins/spaces-home-control/services/space-media-activity.service.d.ts +3 -1
- package/dist/plugins/spaces-home-control/services/space-media-activity.service.js +11 -5
- package/dist/plugins/spaces-home-control/services/space-media-activity.service.js.map +1 -1
- package/dist/plugins/spaces-home-control/services/space-undo-history.service.d.ts +3 -1
- package/dist/plugins/spaces-home-control/services/space-undo-history.service.js +8 -5
- package/dist/plugins/spaces-home-control/services/space-undo-history.service.js.map +1 -1
- package/dist/spec/channels.d.ts +51 -1
- package/dist/spec/channels.js +64 -1
- package/dist/spec/channels.js.map +1 -1
- package/dist/spec/devices.d.ts +155 -2
- package/dist/spec/devices.js +161 -2
- package/dist/spec/devices.js.map +1 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +2 -2
|
@@ -7,12 +7,14 @@ export interface PrivilegedJobSpec {
|
|
|
7
7
|
statusFile: string;
|
|
8
8
|
timeoutMs?: number;
|
|
9
9
|
mapStatus?: (raw: Record<string, unknown>) => Partial<PrivilegedJobStatus> | null;
|
|
10
|
+
redact?: (line: string) => string;
|
|
10
11
|
}
|
|
11
12
|
export interface PrivilegedJobStatus {
|
|
12
13
|
id: string;
|
|
13
14
|
state: 'running' | 'complete' | 'failed' | 'timeout';
|
|
14
15
|
step?: string;
|
|
15
16
|
message?: string;
|
|
17
|
+
stderr?: string;
|
|
16
18
|
updatedAt: string;
|
|
17
19
|
}
|
|
18
20
|
type StatusHandler = (status: PrivilegedJobStatus) => void;
|
|
@@ -27,9 +29,17 @@ export declare class PrivilegedWorkerService {
|
|
|
27
29
|
}>;
|
|
28
30
|
getStatus(id: string): PrivilegedJobStatus | null;
|
|
29
31
|
onStatus(id: string, handler: StatusHandler): () => void;
|
|
32
|
+
private getCapturedStderr;
|
|
33
|
+
private buildFailureMessage;
|
|
34
|
+
private buildGenericFailureMessage;
|
|
30
35
|
private startPolling;
|
|
36
|
+
private stopUnit;
|
|
37
|
+
private isUnitActive;
|
|
38
|
+
private handleTimeout;
|
|
31
39
|
private logInvalidStatusOnce;
|
|
32
40
|
private finishJob;
|
|
41
|
+
private notifyHandlers;
|
|
33
42
|
private stopPolling;
|
|
43
|
+
private schedulePrune;
|
|
34
44
|
}
|
|
35
45
|
export {};
|
|
@@ -20,6 +20,10 @@ const system_constants_1 = require("../system.constants");
|
|
|
20
20
|
const system_exceptions_1 = require("../system.exceptions");
|
|
21
21
|
const STATUS_POLL_INTERVAL_MS = 3_000;
|
|
22
22
|
const DEFAULT_TIMEOUT_MS = 10 * 60 * 1000;
|
|
23
|
+
const STDERR_CAPTURE_LIMIT_BYTES = 4 * 1024;
|
|
24
|
+
const IS_ACTIVE_PROBE_TIMEOUT_MS = 2_000;
|
|
25
|
+
const STOP_ATTEMPT_TIMEOUT_MS = 15_000;
|
|
26
|
+
const PRUNE_AFTER_MS = 5 * 60_000;
|
|
23
27
|
const VALID_TICK_STATES = new Set(['running', 'complete', 'failed']);
|
|
24
28
|
function isValidTickState(value) {
|
|
25
29
|
return typeof value === 'string' && VALID_TICK_STATES.has(value);
|
|
@@ -40,6 +44,11 @@ let PrivilegedWorkerService = class PrivilegedWorkerService {
|
|
|
40
44
|
throw new system_exceptions_1.PrivilegedWorkerUnavailableException(`Privileged workers are not supported on this platform (${this.platformService.getPlatformType()}).`);
|
|
41
45
|
}
|
|
42
46
|
if (this.busyUnits.has(spec.unit)) {
|
|
47
|
+
const busyJobId = this.busyUnits.get(spec.unit);
|
|
48
|
+
const busyRecord = busyJobId ? this.jobs.get(busyJobId) : undefined;
|
|
49
|
+
if (busyRecord?.lastStatus.state === 'timeout') {
|
|
50
|
+
throw new system_exceptions_1.PrivilegedWorkerUnavailableException(`Privileged worker unit "${spec.unit}" timed out previously and is still running after a stop attempt; it cannot be reused until the process is confirmed stopped.`);
|
|
51
|
+
}
|
|
43
52
|
throw new system_exceptions_1.PrivilegedWorkerUnavailableException(`Privileged worker unit "${spec.unit}" is already busy.`);
|
|
44
53
|
}
|
|
45
54
|
const id = (0, node_crypto_1.randomUUID)();
|
|
@@ -54,22 +63,34 @@ let PrivilegedWorkerService = class PrivilegedWorkerService {
|
|
|
54
63
|
lastStatus: { id, state: 'running', updatedAt: new Date().toISOString() },
|
|
55
64
|
handlers: new Set(),
|
|
56
65
|
mapStatus: spec.mapStatus,
|
|
66
|
+
redact: spec.redact,
|
|
67
|
+
stderrBuffer: Buffer.alloc(0),
|
|
57
68
|
loggedInvalidStatus: false,
|
|
69
|
+
pruneTimer: null,
|
|
58
70
|
};
|
|
59
71
|
this.jobs.set(id, record);
|
|
60
72
|
this.busyUnits.set(spec.unit, id);
|
|
61
73
|
try {
|
|
62
74
|
const setenvArgs = Object.entries(spec.env ?? {}).flatMap(([key, value]) => ['--setenv', `${key}=${value}`]);
|
|
63
|
-
const child = (0, node_child_process_1.spawn)('sudo', ['-n', 'systemd-run', '--scope', `--unit=${spec.unit}`, ...setenvArgs, 'bash', spec.script, ...spec.args], { detached: true, stdio: 'ignore' });
|
|
75
|
+
const child = (0, node_child_process_1.spawn)('sudo', ['-n', 'systemd-run', '--scope', `--unit=${spec.unit}`, ...setenvArgs, 'bash', spec.script, ...spec.args], { detached: true, stdio: ['ignore', 'ignore', 'pipe'] });
|
|
76
|
+
child.stderr?.unref?.();
|
|
77
|
+
child.stderr?.on('data', (chunk) => {
|
|
78
|
+
if (record.stderrBuffer.length >= STDERR_CAPTURE_LIMIT_BYTES) {
|
|
79
|
+
return;
|
|
80
|
+
}
|
|
81
|
+
record.stderrBuffer = Buffer.concat([record.stderrBuffer, chunk]).subarray(0, STDERR_CAPTURE_LIMIT_BYTES);
|
|
82
|
+
});
|
|
64
83
|
child.on('error', (error) => {
|
|
65
84
|
if (record.lastStatus.state !== 'running') {
|
|
66
85
|
return;
|
|
67
86
|
}
|
|
68
|
-
|
|
87
|
+
const stderr = this.getCapturedStderr(record);
|
|
88
|
+
this.logger.error(`Privileged worker unit "${spec.unit}" failed to spawn: ${error.message}${stderr ? ` (${stderr})` : ''}`);
|
|
69
89
|
this.finishJob(record, {
|
|
70
90
|
id,
|
|
71
91
|
state: 'failed',
|
|
72
|
-
message: error.message,
|
|
92
|
+
message: this.buildFailureMessage(error.message, stderr),
|
|
93
|
+
stderr,
|
|
73
94
|
updatedAt: new Date().toISOString(),
|
|
74
95
|
});
|
|
75
96
|
});
|
|
@@ -81,11 +102,13 @@ let PrivilegedWorkerService = class PrivilegedWorkerService {
|
|
|
81
102
|
return;
|
|
82
103
|
}
|
|
83
104
|
const reason = signal ? `was terminated by signal ${signal}` : `exited with code ${code}`;
|
|
84
|
-
|
|
105
|
+
const stderr = this.getCapturedStderr(record);
|
|
106
|
+
this.logger.error(`Privileged worker unit "${spec.unit}" ${reason} before reporting completion${stderr ? ` (${stderr})` : ''}`);
|
|
85
107
|
this.finishJob(record, {
|
|
86
108
|
id,
|
|
87
109
|
state: 'failed',
|
|
88
|
-
message: `Worker process ${reason}`,
|
|
110
|
+
message: this.buildGenericFailureMessage(`Worker process ${reason} before reporting completion`, stderr),
|
|
111
|
+
stderr,
|
|
89
112
|
updatedAt: new Date().toISOString(),
|
|
90
113
|
});
|
|
91
114
|
});
|
|
@@ -124,11 +147,34 @@ let PrivilegedWorkerService = class PrivilegedWorkerService {
|
|
|
124
147
|
record.handlers.delete(handler);
|
|
125
148
|
};
|
|
126
149
|
}
|
|
150
|
+
getCapturedStderr(record) {
|
|
151
|
+
if (record.stderrBuffer.length === 0) {
|
|
152
|
+
return undefined;
|
|
153
|
+
}
|
|
154
|
+
const text = record.stderrBuffer.toString('utf-8');
|
|
155
|
+
const redact = record.redact;
|
|
156
|
+
if (!redact) {
|
|
157
|
+
return text;
|
|
158
|
+
}
|
|
159
|
+
return text
|
|
160
|
+
.split('\n')
|
|
161
|
+
.map((line) => redact(line))
|
|
162
|
+
.join('\n');
|
|
163
|
+
}
|
|
164
|
+
buildFailureMessage(summary, stderr) {
|
|
165
|
+
const detail = stderr ? ` (${stderr})` : '';
|
|
166
|
+
return `The smart-panel user cannot start privileged jobs: ${summary}${detail}. Re-run \`sudo smart-panel-service install\`, or add the sudoers grant from the installation guide.`;
|
|
167
|
+
}
|
|
168
|
+
buildGenericFailureMessage(summary, stderr) {
|
|
169
|
+
const detail = stderr ? ` (${stderr})` : '';
|
|
170
|
+
return `${summary}${detail}.`;
|
|
171
|
+
}
|
|
127
172
|
startPolling(record) {
|
|
128
173
|
record.pollTimer = setInterval(() => {
|
|
129
174
|
if (Date.now() - record.startedAt > record.timeoutMs) {
|
|
130
|
-
|
|
131
|
-
|
|
175
|
+
clearInterval(record.pollTimer);
|
|
176
|
+
record.pollTimer = null;
|
|
177
|
+
void this.handleTimeout(record);
|
|
132
178
|
return;
|
|
133
179
|
}
|
|
134
180
|
if (!(0, fs_1.existsSync)(record.statusFile)) {
|
|
@@ -157,14 +203,79 @@ let PrivilegedWorkerService = class PrivilegedWorkerService {
|
|
|
157
203
|
updatedAt: new Date().toISOString(),
|
|
158
204
|
};
|
|
159
205
|
record.lastStatus = status;
|
|
160
|
-
|
|
161
|
-
handler(status);
|
|
162
|
-
}
|
|
206
|
+
this.notifyHandlers(record, status);
|
|
163
207
|
if (status.state === 'complete' || status.state === 'failed') {
|
|
164
208
|
this.stopPolling(record);
|
|
165
209
|
}
|
|
166
210
|
}, STATUS_POLL_INTERVAL_MS);
|
|
167
211
|
}
|
|
212
|
+
stopUnit(unit) {
|
|
213
|
+
return new Promise((resolve) => {
|
|
214
|
+
let settled = false;
|
|
215
|
+
let timer = null;
|
|
216
|
+
const settle = () => {
|
|
217
|
+
if (settled) {
|
|
218
|
+
return;
|
|
219
|
+
}
|
|
220
|
+
settled = true;
|
|
221
|
+
if (timer) {
|
|
222
|
+
clearTimeout(timer);
|
|
223
|
+
timer = null;
|
|
224
|
+
}
|
|
225
|
+
resolve();
|
|
226
|
+
};
|
|
227
|
+
try {
|
|
228
|
+
const child = (0, node_child_process_1.spawn)('sudo', ['-n', 'systemd-run', '--scope', '--quiet', `--unit=${unit}-stop`, 'systemctl', 'stop', unit], { stdio: 'ignore' });
|
|
229
|
+
child.on('exit', settle);
|
|
230
|
+
child.on('error', settle);
|
|
231
|
+
timer = setTimeout(settle, STOP_ATTEMPT_TIMEOUT_MS);
|
|
232
|
+
timer.unref();
|
|
233
|
+
child.unref();
|
|
234
|
+
}
|
|
235
|
+
catch {
|
|
236
|
+
settle();
|
|
237
|
+
}
|
|
238
|
+
});
|
|
239
|
+
}
|
|
240
|
+
isUnitActive(unit) {
|
|
241
|
+
return new Promise((resolve) => {
|
|
242
|
+
(0, node_child_process_1.execFile)('systemctl', ['is-active', unit], { timeout: IS_ACTIVE_PROBE_TIMEOUT_MS }, (error, stdout) => {
|
|
243
|
+
if (error) {
|
|
244
|
+
resolve(false);
|
|
245
|
+
return;
|
|
246
|
+
}
|
|
247
|
+
resolve((stdout ?? '').trim() === 'active');
|
|
248
|
+
});
|
|
249
|
+
});
|
|
250
|
+
}
|
|
251
|
+
async handleTimeout(record) {
|
|
252
|
+
this.logger.error(`Privileged worker unit "${record.unit}" timed out after ${record.timeoutMs}ms`);
|
|
253
|
+
await this.stopUnit(record.unit);
|
|
254
|
+
const stillActive = await this.isUnitActive(record.unit);
|
|
255
|
+
const stderr = this.getCapturedStderr(record);
|
|
256
|
+
if (record.lastStatus.state !== 'running') {
|
|
257
|
+
return;
|
|
258
|
+
}
|
|
259
|
+
if (stillActive) {
|
|
260
|
+
this.logger.error(`Privileged worker unit "${record.unit}" is still running after a timeout stop attempt; keeping it reserved.`);
|
|
261
|
+
const status = {
|
|
262
|
+
id: record.id,
|
|
263
|
+
state: 'timeout',
|
|
264
|
+
message: `Privileged worker unit "${record.unit}" timed out and is still running after a stop attempt; it remains reserved until confirmed stopped.`,
|
|
265
|
+
stderr,
|
|
266
|
+
updatedAt: new Date().toISOString(),
|
|
267
|
+
};
|
|
268
|
+
record.lastStatus = status;
|
|
269
|
+
this.notifyHandlers(record, status);
|
|
270
|
+
return;
|
|
271
|
+
}
|
|
272
|
+
this.finishJob(record, {
|
|
273
|
+
id: record.id,
|
|
274
|
+
state: 'timeout',
|
|
275
|
+
stderr,
|
|
276
|
+
updatedAt: new Date().toISOString(),
|
|
277
|
+
});
|
|
278
|
+
}
|
|
168
279
|
logInvalidStatusOnce(record, reason) {
|
|
169
280
|
if (record.loggedInvalidStatus) {
|
|
170
281
|
return;
|
|
@@ -177,10 +288,13 @@ let PrivilegedWorkerService = class PrivilegedWorkerService {
|
|
|
177
288
|
return;
|
|
178
289
|
}
|
|
179
290
|
record.lastStatus = status;
|
|
291
|
+
this.notifyHandlers(record, status);
|
|
292
|
+
this.stopPolling(record);
|
|
293
|
+
}
|
|
294
|
+
notifyHandlers(record, status) {
|
|
180
295
|
for (const handler of [...record.handlers]) {
|
|
181
296
|
handler(status);
|
|
182
297
|
}
|
|
183
|
-
this.stopPolling(record);
|
|
184
298
|
}
|
|
185
299
|
stopPolling(record) {
|
|
186
300
|
if (record.pollTimer) {
|
|
@@ -189,7 +303,19 @@ let PrivilegedWorkerService = class PrivilegedWorkerService {
|
|
|
189
303
|
}
|
|
190
304
|
if (this.busyUnits.get(record.unit) === record.id) {
|
|
191
305
|
this.busyUnits.delete(record.unit);
|
|
306
|
+
this.schedulePrune(record);
|
|
307
|
+
}
|
|
308
|
+
}
|
|
309
|
+
schedulePrune(record) {
|
|
310
|
+
if (record.pruneTimer) {
|
|
311
|
+
return;
|
|
192
312
|
}
|
|
313
|
+
record.pruneTimer = setTimeout(() => {
|
|
314
|
+
record.pruneTimer = null;
|
|
315
|
+
record.handlers.clear();
|
|
316
|
+
this.jobs.delete(record.id);
|
|
317
|
+
}, PRUNE_AFTER_MS);
|
|
318
|
+
record.pruneTimer.unref();
|
|
193
319
|
}
|
|
194
320
|
};
|
|
195
321
|
exports.PrivilegedWorkerService = PrivilegedWorkerService;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"privileged-worker.service.js","sourceRoot":"","sources":["../../../../src/modules/system/services/privileged-worker.service.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2BAA8C;AAC9C,2DAA2C;AAC3C,6CAAyC;AAEzC,2CAA4C;AAE5C,mDAA+D;AAC/D,+EAA2E;AAC3E,0DAAyD;AACzD,4DAA4E;AA2D5E,MAAM,uBAAuB,GAAG,KAAK,CAAC;AACtC,MAAM,kBAAkB,GAAG,EAAE,GAAG,EAAE,GAAG,IAAI,CAAC;AAK1C,MAAM,iBAAiB,GAAwB,IAAI,GAAG,CAAC,CAAC,SAAS,EAAE,UAAU,EAAE,QAAQ,CAAC,CAAC,CAAC;AAE1F,SAAS,gBAAgB,CAAC,KAAc;IACvC,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,iBAAiB,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;AAClE,CAAC;AAED,SAAS,gBAAgB,CAAC,KAAc;IACvC,OAAO,OAAO,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,SAAS,CAAC;AACtD,CAAC;AAqBM,IAAM,uBAAuB,GA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CAAC,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,MAAM,CAAC,EAAE,EAAE,CAAC;YACnD,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;QACpC,CAAC;IACF,CAAC;CACD,CAAA;AA1SY,0DAAuB;kCAAvB,uBAAuB;IADnC,IAAA,mBAAU,GAAE;qCAOkC,kCAAe;GANjD,uBAAuB,CA0SnC"}
|
|
1
|
+
{"version":3,"file":"privileged-worker.service.js","sourceRoot":"","sources":["../../../../src/modules/system/services/privileged-worker.service.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2BAA8C;AAC9C,2DAAqD;AACrD,6CAAyC;AAEzC,2CAA4C;AAE5C,mDAA+D;AAC/D,+EAA2E;AAC3E,0DAAyD;AACzD,4DAA4E;AAoF5E,MAAM,uBAAuB,GAAG,KAAK,CAAC;AACtC,MAAM,kBAAkB,GAAG,EAAE,GAAG,EAAE,GAAG,IAAI,CAAC;AAG1C,MAAM,0BAA0B,GAAG,CAAC,GAAG,IAAI,CAAC;AAG5C,MAAM,0BAA0B,GAAG,KAAK,CAAC;AAEzC,MAAM,uBAAuB,GAAG,MAAM,CAAC;AASvC,MAAM,cAAc,GAAG,CAAC,GAAG,MAAM,CAAC;AAKlC,MAAM,iBAAiB,GAAwB,IAAI,GAAG,CAAC,CAAC,SAAS,EAAE,UAAU,EAAE,QAAQ,CAAC,CAAC,CAAC;AAE1F,SAAS,gBAAgB,CAAC,KAAc;IACvC,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,iBAAiB,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;AAClE,CAAC;AAED,SAAS,gBAAgB,CAAC,KAAc;IACvC,OAAO,OAAO,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,SAAS,CAAC;AACtD,CAAC;AA2BM,IAAM,uBAAuB,GAA7B,MAAM,uBAAuB;IAMnC,YAA6B,eAAgC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AC;QAC5B,CAAC;IACF,CAAC;IASO,aAAa,CAAC,MAAiB;QACtC,IAAI,MAAM,CAAC,UAAU,EAAE,CAAC;YACvB,OAAO;QACR,CAAC;QAED,MAAM,CAAC,UAAU,GAAG,UAAU,CAAC,GAAG,EAAE;YACnC,MAAM,CAAC,UAAU,GAAG,IAAI,CAAC;YACzB,MAAM,CAAC,QAAQ,CAAC,KAAK,EAAE,CAAC;YACxB,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;QAC7B,CAAC,EAAE,cAAc,CAAC,CAAC;QAEnB,MAAM,CAAC,UAAU,CAAC,KAAK,EAAE,CAAC;IAC3B,CAAC;CACD,CAAA;AAniBY,0DAAuB;kCAAvB,uBAAuB;IADnC,IAAA,mBAAU,GAAE;qCAOkC,kCAAe;GANjD,uBAAuB,CAmiBnC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { OnModuleInit } from '@nestjs/common';
|
|
1
|
+
import { OnModuleDestroy, OnModuleInit } from '@nestjs/common';
|
|
2
2
|
import { NotificationsService } from '../../notifications/services/notifications.service';
|
|
3
3
|
import { UpdatePhase, UpdateStatusType } from '../system.constants';
|
|
4
4
|
import { PrivilegedWorkerService } from './privileged-worker.service';
|
|
@@ -11,19 +11,37 @@ export interface UpdateProgressFile {
|
|
|
11
11
|
completedAt?: string;
|
|
12
12
|
error?: string;
|
|
13
13
|
}
|
|
14
|
-
export declare class UpdateExecutorService implements OnModuleInit {
|
|
14
|
+
export declare class UpdateExecutorService implements OnModuleDestroy, OnModuleInit {
|
|
15
15
|
private readonly updateService;
|
|
16
16
|
private readonly privilegedWorker;
|
|
17
17
|
private readonly notifications;
|
|
18
18
|
private readonly logger;
|
|
19
19
|
private progressHighWaterMark;
|
|
20
|
+
private observerGeneration;
|
|
21
|
+
private observerAttemptId;
|
|
22
|
+
private observerTask;
|
|
23
|
+
private readonly observerTimers;
|
|
20
24
|
constructor(updateService: UpdateService, privilegedWorker: PrivilegedWorkerService, notifications: NotificationsService);
|
|
21
25
|
onModuleInit(): Promise<void>;
|
|
26
|
+
onModuleDestroy(): void;
|
|
27
|
+
private readAttempt;
|
|
28
|
+
private isAttemptUnresolved;
|
|
29
|
+
private isObserverCurrent;
|
|
30
|
+
private isAttemptOwnerAlive;
|
|
31
|
+
private readStatusFile;
|
|
32
|
+
private waitForObserverPoll;
|
|
33
|
+
private waitForAttemptSettlement;
|
|
34
|
+
private reconcileCompletedAttempt;
|
|
35
|
+
private observeLiveAttempt;
|
|
36
|
+
private reconcileLiveAttempt;
|
|
22
37
|
private checkPendingUpdateStatus;
|
|
38
|
+
private processPendingStatus;
|
|
39
|
+
private cleanupPendingStatus;
|
|
23
40
|
startUpdate(targetVersion: string): Promise<void>;
|
|
24
41
|
private watchUpdateJob;
|
|
25
42
|
private writeStatusFile;
|
|
26
43
|
private failUpdate;
|
|
27
44
|
private reportUpdateSucceeded;
|
|
28
45
|
private logHandlerFailure;
|
|
46
|
+
private getLocalHealthUrl;
|
|
29
47
|
}
|