@fastybird/smart-panel-backend 1.1.0-alpha.3 → 1.1.0-alpha.31
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/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 +20 -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 +32 -3
- package/dist/modules/devices/services/channels.properties.service.js +357 -51
- package/dist/modules/devices/services/channels.properties.service.js.map +1 -1
- package/dist/modules/devices/services/channels.service.d.ts +1 -0
- package/dist/modules/devices/services/channels.service.js +52 -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.d.ts +1 -0
- package/dist/modules/devices/services/devices.service.js +40 -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 +228 -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 +206 -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-metadata.service.d.ts +31 -0
- package/dist/modules/devices/services/property-metadata.service.js +160 -0
- package/dist/modules/devices/services/property-metadata.service.js.map +1 -0
- 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-lock.service.d.ts +3 -1
- package/dist/modules/devices/services/property-value-lock.service.js +13 -2
- package/dist/modules/devices/services/property-value-lock.service.js.map +1 -1
- 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/devices/validators/channel-exists-constraint.validator.d.ts +1 -3
- package/dist/modules/devices/validators/channel-exists-constraint.validator.js +3 -14
- package/dist/modules/devices/validators/channel-exists-constraint.validator.js.map +1 -1
- package/dist/modules/devices/validators/channel-property-exists-constraint.validator.d.ts +1 -3
- package/dist/modules/devices/validators/channel-property-exists-constraint.validator.js +3 -14
- package/dist/modules/devices/validators/channel-property-exists-constraint.validator.js.map +1 -1
- package/dist/modules/devices/validators/device-exists-constraint.validator.js +1 -2
- package/dist/modules/devices/validators/device-exists-constraint.validator.js.map +1 -1
- package/dist/modules/platform/platforms/raspberry.platform.js +5 -10
- package/dist/modules/platform/platforms/raspberry.platform.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 +1168 -61
- package/dist/modules/system/services/privileged-worker.service.d.ts +13 -0
- package/dist/modules/system/services/privileged-worker.service.js +192 -31
- package/dist/modules/system/services/privileged-worker.service.js.map +1 -1
- package/dist/modules/system/services/system.service.d.ts +2 -0
- package/dist/modules/system/services/system.service.js +22 -1
- package/dist/modules/system/services/system.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 +272 -26
- 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 +4 -1
- package/dist/plugins/devices-homekit/listeners/homekit-event.listener.js +39 -4
- package/dist/plugins/devices-homekit/listeners/homekit-event.listener.js.map +1 -1
- package/dist/plugins/devices-homekit/mappers/base.mapper.js +30 -6
- 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/characteristic-write.d.ts +2 -0
- package/dist/plugins/devices-homekit/mappers/characteristic-write.js +17 -0
- package/dist/plugins/devices-homekit/mappers/characteristic-write.js.map +1 -0
- package/dist/plugins/devices-homekit/mappers/homekit-mapper.interface.d.ts +17 -1
- package/dist/plugins/devices-homekit/mappers/thermostat-coordinator.d.ts +7 -0
- package/dist/plugins/devices-homekit/mappers/thermostat-coordinator.js +96 -84
- 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 +36 -3
- package/dist/plugins/devices-shelly-ng/delegates/delegates-manager.service.js +707 -42
- 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 +11 -1
- package/dist/plugins/devices-shelly-ng/delegates/shelly-device.delegate.js +100 -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 +9 -11
- 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 +7 -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 +153 -8
- 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 +51 -0
- package/dist/plugins/devices-shelly-ng/services/poll-placement-diagnostics.service.js +549 -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 +15 -2
- package/dist/plugins/devices-shelly-ng/services/shelly-ng.service.js +140 -35
- 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 -0
- package/dist/plugins/devices-shelly-ng/services/shelly-ws-server.service.js +14 -4
- package/dist/plugins/devices-shelly-ng/services/shelly-ws-server.service.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 +3 -3
|
@@ -17,6 +17,7 @@ const common_1 = require("@nestjs/common");
|
|
|
17
17
|
const swagger_1 = require("@nestjs/swagger");
|
|
18
18
|
const logger_1 = require("../../../common/logger");
|
|
19
19
|
const transform_utils_1 = require("../../../common/utils/transform.utils");
|
|
20
|
+
const platform_service_1 = require("../../../modules/platform/services/platform.service");
|
|
20
21
|
const provider_model_1 = require("../../../modules/remote-access/models/provider.model");
|
|
21
22
|
const api_documentation_decorator_1 = require("../../../modules/swagger/decorators/api-documentation.decorator");
|
|
22
23
|
const roles_guard_1 = require("../../../modules/users/guards/roles.guard");
|
|
@@ -26,18 +27,22 @@ const remote_access_tailscale_constants_1 = require("../remote-access-tailscale.
|
|
|
26
27
|
const tailscale_login_service_1 = require("../services/tailscale-login.service");
|
|
27
28
|
const tailscale_node_managed_service_1 = require("../services/tailscale-node-managed.service");
|
|
28
29
|
const tailscale_provider_service_1 = require("../services/tailscale-provider.service");
|
|
30
|
+
const tailscale_setup_service_1 = require("../services/tailscale-setup.service");
|
|
29
31
|
let StatusController = class StatusController {
|
|
30
|
-
constructor(providerService, nodeManagedService, loginService) {
|
|
32
|
+
constructor(providerService, nodeManagedService, loginService, setupService, platformService) {
|
|
31
33
|
this.providerService = providerService;
|
|
32
34
|
this.nodeManagedService = nodeManagedService;
|
|
33
35
|
this.loginService = loginService;
|
|
36
|
+
this.setupService = setupService;
|
|
37
|
+
this.platformService = platformService;
|
|
34
38
|
this.logger = (0, logger_1.createExtensionLogger)(remote_access_tailscale_constants_1.REMOTE_ACCESS_TAILSCALE_PLUGIN_NAME, 'StatusController');
|
|
35
39
|
}
|
|
36
40
|
async getStatus(res) {
|
|
37
41
|
this.logger.debug('Fetching Tailscale node status');
|
|
38
|
-
const [status, requirements] = await Promise.all([
|
|
42
|
+
const [status, requirements, privilegedWorkerSupport] = await Promise.all([
|
|
39
43
|
this.providerService.getStatus(),
|
|
40
44
|
this.nodeManagedService.evaluateRequirements(),
|
|
45
|
+
this.platformService.getPrivilegedWorkerSupport(),
|
|
41
46
|
]);
|
|
42
47
|
const data = new status_model_1.RemoteAccessTailscalePluginStatusModel();
|
|
43
48
|
data.type = status.type;
|
|
@@ -49,6 +54,11 @@ let StatusController = class StatusController {
|
|
|
49
54
|
data.advisories = (0, transform_utils_1.toInstance)(provider_model_1.RemoteAccessAdvisoryModel, status.advisories);
|
|
50
55
|
data.updatedAt = status.updatedAt;
|
|
51
56
|
data.requirements = (0, transform_utils_1.toInstance)(status_model_1.RemoteAccessTailscalePluginRequirementModel, requirements);
|
|
57
|
+
data.setup = this.buildSetupJobModel();
|
|
58
|
+
const privilegedSetup = new status_model_1.RemoteAccessTailscalePluginPrivilegedSetupModel();
|
|
59
|
+
privilegedSetup.available = privilegedWorkerSupport.supported;
|
|
60
|
+
privilegedSetup.reason = privilegedWorkerSupport.reason;
|
|
61
|
+
data.privilegedSetup = privilegedSetup;
|
|
52
62
|
if (data.state === 'pending-auth') {
|
|
53
63
|
const pending = this.loginService.getPendingInteractiveAuth();
|
|
54
64
|
if (pending) {
|
|
@@ -61,6 +71,19 @@ let StatusController = class StatusController {
|
|
|
61
71
|
response.data = data;
|
|
62
72
|
return response;
|
|
63
73
|
}
|
|
74
|
+
buildSetupJobModel() {
|
|
75
|
+
const lastJob = this.setupService.getLastJob();
|
|
76
|
+
if (!lastJob) {
|
|
77
|
+
return null;
|
|
78
|
+
}
|
|
79
|
+
const model = new status_model_1.RemoteAccessTailscalePluginSetupJobModel();
|
|
80
|
+
model.jobId = lastJob.id;
|
|
81
|
+
model.state = lastJob.status.state;
|
|
82
|
+
model.step = lastJob.status.step ?? null;
|
|
83
|
+
model.message = lastJob.status.message ?? null;
|
|
84
|
+
model.updatedAt = lastJob.status.updatedAt;
|
|
85
|
+
return model;
|
|
86
|
+
}
|
|
64
87
|
};
|
|
65
88
|
exports.StatusController = StatusController;
|
|
66
89
|
__decorate([
|
|
@@ -83,6 +106,8 @@ exports.StatusController = StatusController = __decorate([
|
|
|
83
106
|
(0, roles_guard_1.Roles)(users_constants_1.UserRole.ADMIN, users_constants_1.UserRole.OWNER),
|
|
84
107
|
__metadata("design:paramtypes", [tailscale_provider_service_1.TailscaleProviderService,
|
|
85
108
|
tailscale_node_managed_service_1.TailscaleNodeManagedService,
|
|
86
|
-
tailscale_login_service_1.TailscaleLoginService
|
|
109
|
+
tailscale_login_service_1.TailscaleLoginService,
|
|
110
|
+
tailscale_setup_service_1.TailscaleSetupService,
|
|
111
|
+
platform_service_1.PlatformService])
|
|
87
112
|
], StatusController);
|
|
88
113
|
//# sourceMappingURL=status.controller.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"status.controller.js","sourceRoot":"","sources":["../../../../src/plugins/remote-access-tailscale/controllers/status.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAEA,2CAAsD;AACtD,6CAAwD;AAExD,mDAA+D;AAC/D,2EAAmE;AACnE,yFAG8D;AAC9D,iHAAqG;AACrG,2EAAkE;AAClE,4EAAkE;AAClE,
|
|
1
|
+
{"version":3,"file":"status.controller.js","sourceRoot":"","sources":["../../../../src/plugins/remote-access-tailscale/controllers/status.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAEA,2CAAsD;AACtD,6CAAwD;AAExD,mDAA+D;AAC/D,2EAAmE;AACnE,0FAAsF;AACtF,yFAG8D;AAC9D,iHAAqG;AACrG,2EAAkE;AAClE,4EAAkE;AAClE,yDAMgC;AAChC,4FAG8C;AAC9C,iFAA4E;AAC5E,+FAAyF;AACzF,uFAAkF;AAClF,iFAA4E;AAKrE,IAAM,gBAAgB,GAAtB,MAAM,gBAAgB;IAG5B,YACkB,eAAyC,EACzC,kBAA+C,EAC/C,YAAmC,EACnC,YAAmC,EACnC,eAAgC;QAJhC,oBAAe,GAAf,eAAe,CAA0B;QACzC,uBAAkB,GAAlB,kBAAkB,CAA6B;QAC/C,iBAAY,GAAZ,YAAY,CAAuB;QACnC,iBAAY,GAAZ,YAAY,CAAuB;QACnC,oBAAe,GAAf,eAAe,CAAiB;QAPjC,WAAM,GAAG,IAAA,8BAAqB,EAAC,uEAAmC,EAAE,kBAAkB,CAAC,CAAC;IAQtG,CAAC;IAWE,AAAN,KAAK,CAAC,SAAS,CAA6B,GAAa;QACxD,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,gCAAgC,CAAC,CAAC;QAEpD,MAAM,CAAC,MAAM,EAAE,YAAY,EAAE,uBAAuB,CAAC,GAAG,MAAM,OAAO,CAAC,GAAG,CAAC;YACzE,IAAI,CAAC,eAAe,CAAC,SAAS,EAAE;YAChC,IAAI,CAAC,kBAAkB,CAAC,oBAAoB,EAAE;YAC9C,IAAI,CAAC,eAAe,CAAC,0BAA0B,EAAE;SACjD,CAAC,CAAC;QAEH,MAAM,IAAI,GAAG,IAAI,qDAAsC,EAAE,CAAC;QAC1D,IAAI,CAAC,IAAI,GAAG,MAAM,CAAC,IAAI,CAAC;QACxB,IAAI,CAAC,KAAK,GAAG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ARtC,gBAAgB,CAsF5B"}
|
|
@@ -1,11 +1,28 @@
|
|
|
1
1
|
import { BaseSuccessResponseModel } from '../../../modules/api/models/api-response.model';
|
|
2
2
|
import { RemoteAccessAdvisoryModel, RemoteAccessEndpointModel } from '../../../modules/remote-access/models/provider.model';
|
|
3
3
|
import { RemoteAccessProviderState } from '../../../modules/remote-access/platforms/remote-access-provider.platform';
|
|
4
|
+
import { PrivilegedJobStatus } from '../../../modules/system/services/privileged-worker.service';
|
|
4
5
|
import { TailscaleRequirementCode } from '../services/tailscale-node-managed.service';
|
|
6
|
+
export declare class RemoteAccessTailscalePluginRequirementRemedyModel {
|
|
7
|
+
commands: string[];
|
|
8
|
+
note: string | null;
|
|
9
|
+
}
|
|
5
10
|
export declare class RemoteAccessTailscalePluginRequirementModel {
|
|
6
11
|
code: TailscaleRequirementCode;
|
|
7
12
|
satisfied: boolean;
|
|
8
13
|
message: string;
|
|
14
|
+
remedy: RemoteAccessTailscalePluginRequirementRemedyModel | null;
|
|
15
|
+
}
|
|
16
|
+
export declare class RemoteAccessTailscalePluginSetupJobModel {
|
|
17
|
+
jobId: string;
|
|
18
|
+
state: PrivilegedJobStatus['state'];
|
|
19
|
+
step: string | null;
|
|
20
|
+
message: string | null;
|
|
21
|
+
updatedAt: string;
|
|
22
|
+
}
|
|
23
|
+
export declare class RemoteAccessTailscalePluginPrivilegedSetupModel {
|
|
24
|
+
available: boolean;
|
|
25
|
+
reason: string | null;
|
|
9
26
|
}
|
|
10
27
|
export declare class RemoteAccessTailscalePluginStatusModel {
|
|
11
28
|
type: string;
|
|
@@ -19,6 +36,8 @@ export declare class RemoteAccessTailscalePluginStatusModel {
|
|
|
19
36
|
requirements: RemoteAccessTailscalePluginRequirementModel[];
|
|
20
37
|
authUrl?: string;
|
|
21
38
|
qr?: string;
|
|
39
|
+
setup: RemoteAccessTailscalePluginSetupJobModel | null;
|
|
40
|
+
privilegedSetup: RemoteAccessTailscalePluginPrivilegedSetupModel;
|
|
22
41
|
}
|
|
23
42
|
export declare class RemoteAccessTailscalePluginStatusResponseModel extends BaseSuccessResponseModel<RemoteAccessTailscalePluginStatusModel> {
|
|
24
43
|
data: RemoteAccessTailscalePluginStatusModel;
|
|
@@ -9,7 +9,7 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
9
9
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.RemoteAccessTailscalePluginStatusResponseModel = exports.RemoteAccessTailscalePluginStatusModel = exports.RemoteAccessTailscalePluginRequirementModel = void 0;
|
|
12
|
+
exports.RemoteAccessTailscalePluginStatusResponseModel = exports.RemoteAccessTailscalePluginStatusModel = exports.RemoteAccessTailscalePluginPrivilegedSetupModel = exports.RemoteAccessTailscalePluginSetupJobModel = exports.RemoteAccessTailscalePluginRequirementModel = exports.RemoteAccessTailscalePluginRequirementRemedyModel = void 0;
|
|
13
13
|
const class_transformer_1 = require("class-transformer");
|
|
14
14
|
const class_validator_1 = require("class-validator");
|
|
15
15
|
const swagger_1 = require("@nestjs/swagger");
|
|
@@ -34,6 +34,37 @@ const TAILSCALE_REQUIREMENT_CODES = [
|
|
|
34
34
|
'operator-granted',
|
|
35
35
|
'version-supported',
|
|
36
36
|
];
|
|
37
|
+
const TAILSCALE_SETUP_JOB_STATES = ['running', 'complete', 'failed', 'timeout'];
|
|
38
|
+
let RemoteAccessTailscalePluginRequirementRemedyModel = class RemoteAccessTailscalePluginRequirementRemedyModel {
|
|
39
|
+
};
|
|
40
|
+
exports.RemoteAccessTailscalePluginRequirementRemedyModel = RemoteAccessTailscalePluginRequirementRemedyModel;
|
|
41
|
+
__decorate([
|
|
42
|
+
(0, swagger_1.ApiProperty)({
|
|
43
|
+
description: 'Exact console commands that satisfy this requirement on the detected system',
|
|
44
|
+
type: 'array',
|
|
45
|
+
items: { type: 'string' },
|
|
46
|
+
example: ['sudo systemctl enable --now tailscaled'],
|
|
47
|
+
}),
|
|
48
|
+
(0, class_transformer_1.Expose)(),
|
|
49
|
+
(0, class_validator_1.IsArray)(),
|
|
50
|
+
(0, class_validator_1.IsString)({ each: true }),
|
|
51
|
+
__metadata("design:type", Array)
|
|
52
|
+
], RemoteAccessTailscalePluginRequirementRemedyModel.prototype, "commands", void 0);
|
|
53
|
+
__decorate([
|
|
54
|
+
(0, swagger_1.ApiPropertyOptional)({
|
|
55
|
+
description: 'Vendor or documentation link, present instead of commands when no exact command applies',
|
|
56
|
+
type: 'string',
|
|
57
|
+
nullable: true,
|
|
58
|
+
example: null,
|
|
59
|
+
}),
|
|
60
|
+
(0, class_transformer_1.Expose)(),
|
|
61
|
+
(0, class_validator_1.IsOptional)(),
|
|
62
|
+
(0, class_validator_1.IsString)(),
|
|
63
|
+
__metadata("design:type", String)
|
|
64
|
+
], RemoteAccessTailscalePluginRequirementRemedyModel.prototype, "note", void 0);
|
|
65
|
+
exports.RemoteAccessTailscalePluginRequirementRemedyModel = RemoteAccessTailscalePluginRequirementRemedyModel = __decorate([
|
|
66
|
+
(0, swagger_1.ApiSchema)({ name: 'RemoteAccessTailscalePluginDataRequirementRemedy' })
|
|
67
|
+
], RemoteAccessTailscalePluginRequirementRemedyModel);
|
|
37
68
|
let RemoteAccessTailscalePluginRequirementModel = class RemoteAccessTailscalePluginRequirementModel {
|
|
38
69
|
};
|
|
39
70
|
exports.RemoteAccessTailscalePluginRequirementModel = RemoteAccessTailscalePluginRequirementModel;
|
|
@@ -67,9 +98,112 @@ __decorate([
|
|
|
67
98
|
(0, class_validator_1.IsString)(),
|
|
68
99
|
__metadata("design:type", String)
|
|
69
100
|
], RemoteAccessTailscalePluginRequirementModel.prototype, "message", void 0);
|
|
101
|
+
__decorate([
|
|
102
|
+
(0, swagger_1.ApiPropertyOptional)({
|
|
103
|
+
description: 'Exact console commands that satisfy this requirement; null once it is satisfied',
|
|
104
|
+
type: () => RemoteAccessTailscalePluginRequirementRemedyModel,
|
|
105
|
+
nullable: true,
|
|
106
|
+
}),
|
|
107
|
+
(0, class_transformer_1.Expose)(),
|
|
108
|
+
(0, class_validator_1.IsOptional)(),
|
|
109
|
+
(0, class_validator_1.ValidateNested)(),
|
|
110
|
+
(0, class_transformer_1.Type)(() => RemoteAccessTailscalePluginRequirementRemedyModel),
|
|
111
|
+
__metadata("design:type", RemoteAccessTailscalePluginRequirementRemedyModel)
|
|
112
|
+
], RemoteAccessTailscalePluginRequirementModel.prototype, "remedy", void 0);
|
|
70
113
|
exports.RemoteAccessTailscalePluginRequirementModel = RemoteAccessTailscalePluginRequirementModel = __decorate([
|
|
71
114
|
(0, swagger_1.ApiSchema)({ name: 'RemoteAccessTailscalePluginDataRequirement' })
|
|
72
115
|
], RemoteAccessTailscalePluginRequirementModel);
|
|
116
|
+
let RemoteAccessTailscalePluginSetupJobModel = class RemoteAccessTailscalePluginSetupJobModel {
|
|
117
|
+
};
|
|
118
|
+
exports.RemoteAccessTailscalePluginSetupJobModel = RemoteAccessTailscalePluginSetupJobModel;
|
|
119
|
+
__decorate([
|
|
120
|
+
(0, swagger_1.ApiProperty)({
|
|
121
|
+
name: 'job_id',
|
|
122
|
+
description: 'Identifier of the privileged setup job this status reflects',
|
|
123
|
+
type: 'string',
|
|
124
|
+
example: '3fa1c2f0-9c3e-4c3b-8f0a-8f0a8f0a8f0a',
|
|
125
|
+
}),
|
|
126
|
+
(0, class_transformer_1.Expose)({ name: 'job_id' }),
|
|
127
|
+
(0, class_validator_1.IsString)(),
|
|
128
|
+
__metadata("design:type", String)
|
|
129
|
+
], RemoteAccessTailscalePluginSetupJobModel.prototype, "jobId", void 0);
|
|
130
|
+
__decorate([
|
|
131
|
+
(0, swagger_1.ApiProperty)({
|
|
132
|
+
description: 'Current lifecycle state of the setup job',
|
|
133
|
+
enum: TAILSCALE_SETUP_JOB_STATES,
|
|
134
|
+
example: 'running',
|
|
135
|
+
}),
|
|
136
|
+
(0, class_transformer_1.Expose)(),
|
|
137
|
+
(0, class_validator_1.IsEnum)(TAILSCALE_SETUP_JOB_STATES),
|
|
138
|
+
__metadata("design:type", Object)
|
|
139
|
+
], RemoteAccessTailscalePluginSetupJobModel.prototype, "state", void 0);
|
|
140
|
+
__decorate([
|
|
141
|
+
(0, swagger_1.ApiProperty)({
|
|
142
|
+
description: 'Free-form step label reported by the setup script, null when none was reported yet',
|
|
143
|
+
type: 'string',
|
|
144
|
+
nullable: true,
|
|
145
|
+
example: 'install-package',
|
|
146
|
+
}),
|
|
147
|
+
(0, class_transformer_1.Expose)(),
|
|
148
|
+
(0, class_validator_1.IsOptional)(),
|
|
149
|
+
(0, class_validator_1.IsString)(),
|
|
150
|
+
__metadata("design:type", String)
|
|
151
|
+
], RemoteAccessTailscalePluginSetupJobModel.prototype, "step", void 0);
|
|
152
|
+
__decorate([
|
|
153
|
+
(0, swagger_1.ApiProperty)({
|
|
154
|
+
description: 'Free-form human-readable message reported by the setup script or the worker itself',
|
|
155
|
+
type: 'string',
|
|
156
|
+
nullable: true,
|
|
157
|
+
example: null,
|
|
158
|
+
}),
|
|
159
|
+
(0, class_transformer_1.Expose)(),
|
|
160
|
+
(0, class_validator_1.IsOptional)(),
|
|
161
|
+
(0, class_validator_1.IsString)(),
|
|
162
|
+
__metadata("design:type", String)
|
|
163
|
+
], RemoteAccessTailscalePluginSetupJobModel.prototype, "message", void 0);
|
|
164
|
+
__decorate([
|
|
165
|
+
(0, swagger_1.ApiProperty)({
|
|
166
|
+
name: 'updated_at',
|
|
167
|
+
description: 'ISO 8601 timestamp of the last status tick for this job',
|
|
168
|
+
type: 'string',
|
|
169
|
+
format: 'date-time',
|
|
170
|
+
example: '2026-09-07T12:00:00Z',
|
|
171
|
+
}),
|
|
172
|
+
(0, class_transformer_1.Expose)({ name: 'updated_at' }),
|
|
173
|
+
(0, class_validator_1.IsString)(),
|
|
174
|
+
__metadata("design:type", String)
|
|
175
|
+
], RemoteAccessTailscalePluginSetupJobModel.prototype, "updatedAt", void 0);
|
|
176
|
+
exports.RemoteAccessTailscalePluginSetupJobModel = RemoteAccessTailscalePluginSetupJobModel = __decorate([
|
|
177
|
+
(0, swagger_1.ApiSchema)({ name: 'RemoteAccessTailscalePluginDataSetupJob' })
|
|
178
|
+
], RemoteAccessTailscalePluginSetupJobModel);
|
|
179
|
+
let RemoteAccessTailscalePluginPrivilegedSetupModel = class RemoteAccessTailscalePluginPrivilegedSetupModel {
|
|
180
|
+
};
|
|
181
|
+
exports.RemoteAccessTailscalePluginPrivilegedSetupModel = RemoteAccessTailscalePluginPrivilegedSetupModel;
|
|
182
|
+
__decorate([
|
|
183
|
+
(0, swagger_1.ApiProperty)({
|
|
184
|
+
description: 'Whether a privileged setup job can run on this installation right now',
|
|
185
|
+
type: 'boolean',
|
|
186
|
+
example: true,
|
|
187
|
+
}),
|
|
188
|
+
(0, class_transformer_1.Expose)(),
|
|
189
|
+
(0, class_validator_1.IsBoolean)(),
|
|
190
|
+
__metadata("design:type", Boolean)
|
|
191
|
+
], RemoteAccessTailscalePluginPrivilegedSetupModel.prototype, "available", void 0);
|
|
192
|
+
__decorate([
|
|
193
|
+
(0, swagger_1.ApiProperty)({
|
|
194
|
+
description: 'Why privileged setup is unavailable, null when it is available',
|
|
195
|
+
type: 'string',
|
|
196
|
+
nullable: true,
|
|
197
|
+
example: null,
|
|
198
|
+
}),
|
|
199
|
+
(0, class_transformer_1.Expose)(),
|
|
200
|
+
(0, class_validator_1.IsOptional)(),
|
|
201
|
+
(0, class_validator_1.IsString)(),
|
|
202
|
+
__metadata("design:type", String)
|
|
203
|
+
], RemoteAccessTailscalePluginPrivilegedSetupModel.prototype, "reason", void 0);
|
|
204
|
+
exports.RemoteAccessTailscalePluginPrivilegedSetupModel = RemoteAccessTailscalePluginPrivilegedSetupModel = __decorate([
|
|
205
|
+
(0, swagger_1.ApiSchema)({ name: 'RemoteAccessTailscalePluginDataPrivilegedSetup' })
|
|
206
|
+
], RemoteAccessTailscalePluginPrivilegedSetupModel);
|
|
73
207
|
let RemoteAccessTailscalePluginStatusModel = class RemoteAccessTailscalePluginStatusModel {
|
|
74
208
|
};
|
|
75
209
|
exports.RemoteAccessTailscalePluginStatusModel = RemoteAccessTailscalePluginStatusModel;
|
|
@@ -199,6 +333,29 @@ __decorate([
|
|
|
199
333
|
(0, class_validator_1.IsString)(),
|
|
200
334
|
__metadata("design:type", String)
|
|
201
335
|
], RemoteAccessTailscalePluginStatusModel.prototype, "qr", void 0);
|
|
336
|
+
__decorate([
|
|
337
|
+
(0, swagger_1.ApiPropertyOptional)({
|
|
338
|
+
description: 'Last known privileged setup job, null when none has run since this process started',
|
|
339
|
+
nullable: true,
|
|
340
|
+
type: () => RemoteAccessTailscalePluginSetupJobModel,
|
|
341
|
+
}),
|
|
342
|
+
(0, class_transformer_1.Expose)(),
|
|
343
|
+
(0, class_validator_1.IsOptional)(),
|
|
344
|
+
(0, class_validator_1.ValidateNested)(),
|
|
345
|
+
(0, class_transformer_1.Type)(() => RemoteAccessTailscalePluginSetupJobModel),
|
|
346
|
+
__metadata("design:type", RemoteAccessTailscalePluginSetupJobModel)
|
|
347
|
+
], RemoteAccessTailscalePluginStatusModel.prototype, "setup", void 0);
|
|
348
|
+
__decorate([
|
|
349
|
+
(0, swagger_1.ApiProperty)({
|
|
350
|
+
name: 'privileged_setup',
|
|
351
|
+
description: 'Whether a privileged setup job can run on this installation right now',
|
|
352
|
+
type: () => RemoteAccessTailscalePluginPrivilegedSetupModel,
|
|
353
|
+
}),
|
|
354
|
+
(0, class_transformer_1.Expose)({ name: 'privileged_setup' }),
|
|
355
|
+
(0, class_validator_1.ValidateNested)(),
|
|
356
|
+
(0, class_transformer_1.Type)(() => RemoteAccessTailscalePluginPrivilegedSetupModel),
|
|
357
|
+
__metadata("design:type", RemoteAccessTailscalePluginPrivilegedSetupModel)
|
|
358
|
+
], RemoteAccessTailscalePluginStatusModel.prototype, "privilegedSetup", void 0);
|
|
202
359
|
exports.RemoteAccessTailscalePluginStatusModel = RemoteAccessTailscalePluginStatusModel = __decorate([
|
|
203
360
|
(0, swagger_1.ApiSchema)({ name: 'RemoteAccessTailscalePluginDataStatus' })
|
|
204
361
|
], RemoteAccessTailscalePluginStatusModel);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"status.model.js","sourceRoot":"","sources":["../../../../src/plugins/remote-access-tailscale/models/status.model.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,yDAAiD;AACjD,qDAAmG;AAEnG,6CAA6F;AAE7F,uFAA0F;AAC1F,yFAG8D;
|
|
1
|
+
{"version":3,"file":"status.model.js","sourceRoot":"","sources":["../../../../src/plugins/remote-access-tailscale/models/status.model.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,yDAAiD;AACjD,qDAAmG;AAEnG,6CAA6F;AAE7F,uFAA0F;AAC1F,yFAG8D;AAG9D,4FAA2F;AAG3F,MAAM,6BAA6B,GAAgC;IAClE,aAAa;IACb,eAAe;IACf,gBAAgB;IAChB,cAAc;IACd,kBAAkB;IAClB,YAAY;IACZ,WAAW;IACX,cAAc;IACd,OAAO;CACP,CAAC;AAEF,MAAM,2BAA2B,GAA+B;IAC/D,oBAAoB;IACpB,kBAAkB;IAClB,eAAe;IACf,kBAAkB;IAClB,mBAAmB;CACnB,CAAC;AAEF,MAAM,0BAA0B,GAAmC,CAAC,SAAS,EAAE,UAAU,EAAE,QAAQ,EAAE,SAAS,CAAC,CAAC;AAUzG,IAAM,iDAAiD,GAAvD,MAAM,iDAAiD;CAsB7D,CAAA;AAtBY,8GAAiD;AAU7D;IATC,IAAA,qBAAW,EAAC;QACZ,WAAW,EAAE,6EAA6E;QAC1F,IAAI,EAAE,OAAO;QACb,KAAK,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;QACzB,OAAO,EAAE,CAAC,wCAAwC,CAAC;KACnD,CAAC;IACD,IAAA,0BAAM,GAAE;IACR,IAAA,yBAAO,GAAE;IACT,IAAA,0BAAQ,EAAC,EAAE,IAAI,EAAE,IAAI,EAAE,CAA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|
export declare const TAILSCALE_CLI_MAX_BUFFER_BYTES: number;
|
|
9
9
|
export declare const TAILSCALE_SYSTEMCTL_PROBE_TIMEOUT_MS = 2000;
|
|
10
|
+
export declare const TAILSCALE_STOP_STATUS_TIMEOUT_MS = 2000;
|
|
10
11
|
export declare const TAILSCALE_DEFAULT_LOGIN_SERVER = "https://controlplane.tailscale.com";
|
|
11
12
|
export declare const TAILSCALE_POLL_INTERVAL_TRANSITIONING_MS = 5000;
|
|
12
13
|
export declare const TAILSCALE_POLL_INTERVAL_STABLE_MS = 30000;
|
|
@@ -18,3 +19,5 @@ export declare const TAILSCALE_LOGIN_AUTH_KEY_TIMEOUT_MS = 120000;
|
|
|
18
19
|
export declare const TAILSCALE_LOGIN_INTERACTIVE_TIMEOUT_MS: number;
|
|
19
20
|
export declare const TAILSCALE_LOGIN_FIRST_BLOCK_TIMEOUT_MS = 30000;
|
|
20
21
|
export declare const TAILSCALE_KEY_EXPIRY_ADVISORY_WINDOW_MS: number;
|
|
22
|
+
export declare const TAILSCALE_RECONNECT_BASE_DELAY_MS = 30000;
|
|
23
|
+
export declare const TAILSCALE_RECONNECT_MAX_DELAY_MS: number;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.TAILSCALE_KEY_EXPIRY_ADVISORY_WINDOW_MS = exports.TAILSCALE_LOGIN_FIRST_BLOCK_TIMEOUT_MS = exports.TAILSCALE_LOGIN_INTERACTIVE_TIMEOUT_MS = exports.TAILSCALE_LOGIN_AUTH_KEY_TIMEOUT_MS = exports.TAILSCALE_DATA_SUBDIR = exports.TAILSCALE_SETUP_STATUS_FILENAME = exports.TAILSCALE_SETUP_WORKER_UNIT = exports.REMOTE_ACCESS_TAILSCALE_ALLOW_DEV_ENV = exports.TAILSCALE_POLL_INTERVAL_STABLE_MS = exports.TAILSCALE_POLL_INTERVAL_TRANSITIONING_MS = exports.TAILSCALE_DEFAULT_LOGIN_SERVER = exports.TAILSCALE_SYSTEMCTL_PROBE_TIMEOUT_MS = exports.TAILSCALE_CLI_MAX_BUFFER_BYTES = exports.TAILSCALE_CLI_DEFAULT_TIMEOUT_MS = exports.TAILSCALE_BINARY = exports.TAILSCALE_MIN_VERSION = exports.REMOTE_ACCESS_TAILSCALE_PLUGIN_API_TAG_DESCRIPTION = exports.REMOTE_ACCESS_TAILSCALE_PLUGIN_API_TAG_NAME = exports.REMOTE_ACCESS_TAILSCALE_PLUGIN_NAME = exports.REMOTE_ACCESS_TAILSCALE_PLUGIN_PREFIX = void 0;
|
|
3
|
+
exports.TAILSCALE_RECONNECT_MAX_DELAY_MS = exports.TAILSCALE_RECONNECT_BASE_DELAY_MS = exports.TAILSCALE_KEY_EXPIRY_ADVISORY_WINDOW_MS = exports.TAILSCALE_LOGIN_FIRST_BLOCK_TIMEOUT_MS = exports.TAILSCALE_LOGIN_INTERACTIVE_TIMEOUT_MS = exports.TAILSCALE_LOGIN_AUTH_KEY_TIMEOUT_MS = exports.TAILSCALE_DATA_SUBDIR = exports.TAILSCALE_SETUP_STATUS_FILENAME = exports.TAILSCALE_SETUP_WORKER_UNIT = exports.REMOTE_ACCESS_TAILSCALE_ALLOW_DEV_ENV = exports.TAILSCALE_POLL_INTERVAL_STABLE_MS = exports.TAILSCALE_POLL_INTERVAL_TRANSITIONING_MS = exports.TAILSCALE_DEFAULT_LOGIN_SERVER = exports.TAILSCALE_STOP_STATUS_TIMEOUT_MS = exports.TAILSCALE_SYSTEMCTL_PROBE_TIMEOUT_MS = exports.TAILSCALE_CLI_MAX_BUFFER_BYTES = exports.TAILSCALE_CLI_DEFAULT_TIMEOUT_MS = exports.TAILSCALE_BINARY = exports.TAILSCALE_MIN_VERSION = exports.REMOTE_ACCESS_TAILSCALE_PLUGIN_API_TAG_DESCRIPTION = exports.REMOTE_ACCESS_TAILSCALE_PLUGIN_API_TAG_NAME = exports.REMOTE_ACCESS_TAILSCALE_PLUGIN_NAME = exports.REMOTE_ACCESS_TAILSCALE_PLUGIN_PREFIX = void 0;
|
|
4
4
|
exports.REMOTE_ACCESS_TAILSCALE_PLUGIN_PREFIX = 'remote-access-tailscale';
|
|
5
5
|
exports.REMOTE_ACCESS_TAILSCALE_PLUGIN_NAME = 'remote-access-tailscale-plugin';
|
|
6
6
|
exports.REMOTE_ACCESS_TAILSCALE_PLUGIN_API_TAG_NAME = 'Remote access Tailscale plugin';
|
|
@@ -10,6 +10,7 @@ exports.TAILSCALE_BINARY = 'tailscale';
|
|
|
10
10
|
exports.TAILSCALE_CLI_DEFAULT_TIMEOUT_MS = 15_000;
|
|
11
11
|
exports.TAILSCALE_CLI_MAX_BUFFER_BYTES = 16 * 1024 * 1024;
|
|
12
12
|
exports.TAILSCALE_SYSTEMCTL_PROBE_TIMEOUT_MS = 2_000;
|
|
13
|
+
exports.TAILSCALE_STOP_STATUS_TIMEOUT_MS = 2_000;
|
|
13
14
|
exports.TAILSCALE_DEFAULT_LOGIN_SERVER = 'https://controlplane.tailscale.com';
|
|
14
15
|
exports.TAILSCALE_POLL_INTERVAL_TRANSITIONING_MS = 5_000;
|
|
15
16
|
exports.TAILSCALE_POLL_INTERVAL_STABLE_MS = 30_000;
|
|
@@ -21,4 +22,6 @@ exports.TAILSCALE_LOGIN_AUTH_KEY_TIMEOUT_MS = 120_000;
|
|
|
21
22
|
exports.TAILSCALE_LOGIN_INTERACTIVE_TIMEOUT_MS = 10 * 60 * 1000;
|
|
22
23
|
exports.TAILSCALE_LOGIN_FIRST_BLOCK_TIMEOUT_MS = 30_000;
|
|
23
24
|
exports.TAILSCALE_KEY_EXPIRY_ADVISORY_WINDOW_MS = 14 * 24 * 60 * 60 * 1000;
|
|
25
|
+
exports.TAILSCALE_RECONNECT_BASE_DELAY_MS = 30_000;
|
|
26
|
+
exports.TAILSCALE_RECONNECT_MAX_DELAY_MS = 5 * 60 * 1000;
|
|
24
27
|
//# sourceMappingURL=remote-access-tailscale.constants.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"remote-access-tailscale.constants.js","sourceRoot":"","sources":["../../../src/plugins/remote-access-tailscale/remote-access-tailscale.constants.ts"],"names":[],"mappings":";;;AAAa,QAAA,qCAAqC,GAAG,yBAAyB,CAAC;AAElE,QAAA,mCAAmC,GAAG,gCAAgC,CAAC;AAEvE,QAAA,2CAA2C,GAAG,gCAAgC,CAAC;AAE/E,QAAA,kDAAkD,GAC9D,mHAAmH,CAAC;AASxG,QAAA,qBAAqB,GAAG,QAAQ,CAAC;AAGjC,QAAA,gBAAgB,GAAG,WAAW,CAAC;AAG/B,QAAA,gCAAgC,GAAG,MAAM,CAAC;AAS1C,QAAA,8BAA8B,GAAG,EAAE,GAAG,IAAI,GAAG,IAAI,CAAC;AAGlD,QAAA,oCAAoC,GAAG,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"remote-access-tailscale.constants.js","sourceRoot":"","sources":["../../../src/plugins/remote-access-tailscale/remote-access-tailscale.constants.ts"],"names":[],"mappings":";;;AAAa,QAAA,qCAAqC,GAAG,yBAAyB,CAAC;AAElE,QAAA,mCAAmC,GAAG,gCAAgC,CAAC;AAEvE,QAAA,2CAA2C,GAAG,gCAAgC,CAAC;AAE/E,QAAA,kDAAkD,GAC9D,mHAAmH,CAAC;AASxG,QAAA,qBAAqB,GAAG,QAAQ,CAAC;AAGjC,QAAA,gBAAgB,GAAG,WAAW,CAAC;AAG/B,QAAA,gCAAgC,GAAG,MAAM,CAAC;AAS1C,QAAA,8BAA8B,GAAG,EAAE,GAAG,IAAI,GAAG,IAAI,CAAC;AAGlD,QAAA,oCAAoC,GAAG,KAAK,CAAC;AAQ7C,QAAA,gCAAgC,GAAG,KAAK,CAAC;AAEzC,QAAA,8BAA8B,GAAG,oCAAoC,CAAC;AAGtE,QAAA,wCAAwC,GAAG,KAAK,CAAC;AAGjD,QAAA,iCAAiC,GAAG,MAAM,CAAC;AAQ3C,QAAA,qCAAqC,GAAG,4BAA4B,CAAC;AAGrE,QAAA,2BAA2B,GAAG,2BAA2B,CAAC;AAG1D,QAAA,+BAA+B,GAAG,6BAA6B,CAAC;AAOhE,QAAA,qBAAqB,GAAG,eAAe,CAAC;AAGxC,QAAA,mCAAmC,GAAG,OAAO,CAAC;AAG9C,QAAA,sCAAsC,GAAG,EAAE,GAAG,EAAE,GAAG,IAAI,CAAC;AAYxD,QAAA,sCAAsC,GAAG,MAAM,CAAC;AAGhD,QAAA,uCAAuC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,IAAI,CAAC;AAUnE,QAAA,iCAAiC,GAAG,MAAM,CAAC;AAG3C,QAAA,gCAAgC,GAAG,CAAC,GAAG,EAAE,GAAG,IAAI,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { TailscaleRequirement } from './services/tailscale-node-managed.service';
|
|
2
|
+
export declare class TailscaleRequirementUnsatisfiedException extends Error {
|
|
3
|
+
readonly requirement: TailscaleRequirement;
|
|
4
|
+
constructor(requirement: TailscaleRequirement);
|
|
5
|
+
}
|
|
6
|
+
export type TailscaleSetupUnavailableCode = 'privileged-worker-unavailable' | 'platform-unsupported';
|
|
7
|
+
export declare class TailscaleSetupUnavailableException extends Error {
|
|
8
|
+
readonly code: TailscaleSetupUnavailableCode;
|
|
9
|
+
constructor(message: string, code?: TailscaleSetupUnavailableCode);
|
|
10
|
+
}
|
|
11
|
+
export declare class TailscaleNodeStopFailedException extends Error {
|
|
12
|
+
constructor(message: string);
|
|
13
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.TailscaleNodeStopFailedException = exports.TailscaleSetupUnavailableException = exports.TailscaleRequirementUnsatisfiedException = void 0;
|
|
4
|
+
class TailscaleRequirementUnsatisfiedException extends Error {
|
|
5
|
+
constructor(requirement) {
|
|
6
|
+
super(requirement.message);
|
|
7
|
+
this.requirement = requirement;
|
|
8
|
+
this.name = 'TailscaleRequirementUnsatisfiedException';
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
exports.TailscaleRequirementUnsatisfiedException = TailscaleRequirementUnsatisfiedException;
|
|
12
|
+
class TailscaleSetupUnavailableException extends Error {
|
|
13
|
+
constructor(message, code = 'platform-unsupported') {
|
|
14
|
+
super(message);
|
|
15
|
+
this.code = code;
|
|
16
|
+
this.name = 'TailscaleSetupUnavailableException';
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
exports.TailscaleSetupUnavailableException = TailscaleSetupUnavailableException;
|
|
20
|
+
class TailscaleNodeStopFailedException extends Error {
|
|
21
|
+
constructor(message) {
|
|
22
|
+
super(message);
|
|
23
|
+
this.name = 'TailscaleNodeStopFailedException';
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
exports.TailscaleNodeStopFailedException = TailscaleNodeStopFailedException;
|
|
27
|
+
//# sourceMappingURL=remote-access-tailscale.exceptions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"remote-access-tailscale.exceptions.js","sourceRoot":"","sources":["../../../src/plugins/remote-access-tailscale/remote-access-tailscale.exceptions.ts"],"names":[],"mappings":";;;AAWA,MAAa,wCAAyC,SAAQ,KAAK;IAClE,YAAqB,WAAiC;QACrD,KAAK,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC;QADP,gBAAW,GAAX,WAAW,CAAsB;QAErD,IAAI,CAAC,IAAI,GAAG,0CAA0C,CAAC;IACxD,CAAC;CACD;AALD,4FAKC;AA4BD,MAAa,kCAAmC,SAAQ,KAAK;IAC5D,YACC,OAAe,EACC,OAAsC,sBAAsB;QAE5E,KAAK,CAAC,OAAO,CAAC,CAAC;QAFC,SAAI,GAAJ,IAAI,CAAwD;QAG5E,IAAI,CAAC,IAAI,GAAG,oCAAoC,CAAC;IAClD,CAAC;CACD;AARD,gFAQC;AAYD,MAAa,gCAAiC,SAAQ,KAAK;IAC1D,YAAY,OAAe;QAC1B,KAAK,CAAC,OAAO,CAAC,CAAC;QACf,IAAI,CAAC,IAAI,GAAG,kCAAkC,CAAC;IAChD,CAAC;CACD;AALD,4EAKC"}
|
|
@@ -2,5 +2,5 @@ import { RemoteAccessTailscalePluginLoginDto } from './dto/login.dto';
|
|
|
2
2
|
import { UpdateRemoteAccessTailscalePluginConfigDto } from './dto/update-config.dto';
|
|
3
3
|
import { RemoteAccessTailscalePluginConfigModel } from './models/config.model';
|
|
4
4
|
import { RemoteAccessTailscalePluginInstallModel, RemoteAccessTailscalePluginInstallResponseModel, RemoteAccessTailscalePluginLoginModel, RemoteAccessTailscalePluginLoginResponseModel } from './models/login.model';
|
|
5
|
-
import { RemoteAccessTailscalePluginRequirementModel } from './models/status.model';
|
|
6
|
-
export declare const REMOTE_ACCESS_TAILSCALE_PLUGIN_SWAGGER_EXTRA_MODELS: (typeof RemoteAccessTailscalePluginLoginDto | typeof RemoteAccessTailscalePluginLoginModel | typeof RemoteAccessTailscalePluginLoginResponseModel | typeof RemoteAccessTailscalePluginInstallModel | typeof RemoteAccessTailscalePluginInstallResponseModel | typeof RemoteAccessTailscalePluginConfigModel | typeof RemoteAccessTailscalePluginRequirementModel | typeof UpdateRemoteAccessTailscalePluginConfigDto)[];
|
|
5
|
+
import { RemoteAccessTailscalePluginPrivilegedSetupModel, RemoteAccessTailscalePluginRequirementModel, RemoteAccessTailscalePluginSetupJobModel } from './models/status.model';
|
|
6
|
+
export declare const REMOTE_ACCESS_TAILSCALE_PLUGIN_SWAGGER_EXTRA_MODELS: (typeof RemoteAccessTailscalePluginLoginDto | typeof RemoteAccessTailscalePluginLoginModel | typeof RemoteAccessTailscalePluginLoginResponseModel | typeof RemoteAccessTailscalePluginInstallModel | typeof RemoteAccessTailscalePluginInstallResponseModel | typeof RemoteAccessTailscalePluginConfigModel | typeof RemoteAccessTailscalePluginRequirementModel | typeof RemoteAccessTailscalePluginSetupJobModel | typeof RemoteAccessTailscalePluginPrivilegedSetupModel | typeof UpdateRemoteAccessTailscalePluginConfigDto)[];
|
|
@@ -17,5 +17,7 @@ exports.REMOTE_ACCESS_TAILSCALE_PLUGIN_SWAGGER_EXTRA_MODELS = [
|
|
|
17
17
|
status_model_1.RemoteAccessTailscalePluginRequirementModel,
|
|
18
18
|
login_model_1.RemoteAccessTailscalePluginInstallModel,
|
|
19
19
|
login_model_1.RemoteAccessTailscalePluginLoginModel,
|
|
20
|
+
status_model_1.RemoteAccessTailscalePluginSetupJobModel,
|
|
21
|
+
status_model_1.RemoteAccessTailscalePluginPrivilegedSetupModel,
|
|
20
22
|
];
|
|
21
23
|
//# sourceMappingURL=remote-access-tailscale.openapi.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"remote-access-tailscale.openapi.js","sourceRoot":"","sources":["../../../src/plugins/remote-access-tailscale/remote-access-tailscale.openapi.ts"],"names":[],"mappings":";;;AAQA,+CAAsE;AACtE,+DAAqF;AACrF,wDAA+E;AAC/E,sDAK8B;AAC9B,
|
|
1
|
+
{"version":3,"file":"remote-access-tailscale.openapi.js","sourceRoot":"","sources":["../../../src/plugins/remote-access-tailscale/remote-access-tailscale.openapi.ts"],"names":[],"mappings":";;;AAQA,+CAAsE;AACtE,+DAAqF;AACrF,wDAA+E;AAC/E,sDAK8B;AAC9B,wDAM+B;AAElB,QAAA,mDAAmD,GAAG;IAElE,qDAAsC;IACtC,8DAA0C;IAE1C,+CAAmC;IAEnC,6DAA8C;IAC9C,6DAA+C;IAC/C,2DAA6C;IAE7C,qDAAsC;IACtC,0DAA2C;IAC3C,qDAAuC;IACvC,mDAAqC;IACrC,uDAAwC;IACxC,8DAA+C;CAC/C,CAAC"}
|
|
@@ -76,7 +76,7 @@ Connects this installation to a Tailscale tailnet, a private WireGuard-based mes
|
|
|
76
76
|
## Requirements
|
|
77
77
|
|
|
78
78
|
- \`raspberry\` or \`generic\` platform with systemd and the existing sudoers allowlist (Docker and the Home Assistant add-on are not supported — see the docs for alternatives)
|
|
79
|
-
- The \`tailscale\` package installed and \`tailscaled\` active, with the \`smart-panel\`
|
|
79
|
+
- The \`tailscale\` package installed and \`tailscaled\` active, with the Smart Panel service user (\`smart-panel\` unless changed during installation) granted as the Tailscale operator — without this grant, every action (sign-in, sign-out, Serve/Funnel) is refused. **Set up** applies it automatically; if it's ever lost (e.g. after reinstalling \`tailscaled\`, or the node was signed in by hand as root before **Set up** ever ran), recover it with a single command: \`sudo tailscale set --operator=<service-user>\` (substituting your installation's actual service user)
|
|
80
80
|
|
|
81
81
|
## Configuration
|
|
82
82
|
|
|
@@ -13,6 +13,17 @@
|
|
|
13
13
|
# and always finishes at "complete" with exit 0, regardless of the host OS —
|
|
14
14
|
# it previews the real branching logic without requiring root, apt, systemd
|
|
15
15
|
# or a Debian-family host, so it can run from a Jest spec on any platform.
|
|
16
|
+
#
|
|
17
|
+
# --print-plan [--step=install|daemon|operator] is a separate, read-only mode
|
|
18
|
+
# for TailscaleNodeManagedService's D12 remedy builder: it prints one command
|
|
19
|
+
# per line for the detected ID/VERSION_CODENAME from /etc/os-release and
|
|
20
|
+
# executes nothing at all — no status file, no trap, not even SMART_PANEL_USER
|
|
21
|
+
# defaulted to root's own id (the caller always passes it explicitly). This is
|
|
22
|
+
# what keeps the admin-facing "run this yourself" remedy list from ever
|
|
23
|
+
# drifting out of sync with what the privileged install step above actually
|
|
24
|
+
# runs. An unsupported (non-Debian-family) distribution prints nothing for
|
|
25
|
+
# --step=install — the caller's own signal to fall back to a vendor link
|
|
26
|
+
# instead of a command list.
|
|
16
27
|
set -e
|
|
17
28
|
# Without this, `curl ... | tee ...` reports tee's exit status, not curl's —
|
|
18
29
|
# a failed download would be silently treated as success by the `|| { ... }`
|
|
@@ -23,12 +34,62 @@ STATUS_FILE="${STATUS_FILE:-/var/lib/smart-panel/remote-access/tailscale-setup-s
|
|
|
23
34
|
SMART_PANEL_USER="${SMART_PANEL_USER:-$(id -un)}"
|
|
24
35
|
|
|
25
36
|
DRY_RUN=0
|
|
37
|
+
PRINT_PLAN=0
|
|
38
|
+
PRINT_PLAN_STEP="install"
|
|
26
39
|
for arg in "$@"; do
|
|
27
40
|
case "$arg" in
|
|
28
41
|
--dry-run) DRY_RUN=1 ;;
|
|
42
|
+
--print-plan) PRINT_PLAN=1 ;;
|
|
43
|
+
--step=*) PRINT_PLAN_STEP="${arg#--step=}" ;;
|
|
29
44
|
esac
|
|
30
45
|
done
|
|
31
46
|
|
|
47
|
+
# Read-only, side-effect-free: print the plan and exit before this script
|
|
48
|
+
# ever touches STATUS_FILE or registers the cleanup trap below.
|
|
49
|
+
if [ "$PRINT_PLAN" -eq 1 ]; then
|
|
50
|
+
OS_ID=""
|
|
51
|
+
VERSION_CODENAME=""
|
|
52
|
+
|
|
53
|
+
if [ -f /etc/os-release ]; then
|
|
54
|
+
# shellcheck source=/dev/null
|
|
55
|
+
. /etc/os-release
|
|
56
|
+
OS_ID="${ID:-}"
|
|
57
|
+
VERSION_CODENAME="${VERSION_CODENAME:-}"
|
|
58
|
+
fi
|
|
59
|
+
|
|
60
|
+
case "$PRINT_PLAN_STEP" in
|
|
61
|
+
daemon)
|
|
62
|
+
echo "systemctl enable --now tailscaled"
|
|
63
|
+
;;
|
|
64
|
+
operator)
|
|
65
|
+
echo "tailscale set --operator=${SMART_PANEL_USER}"
|
|
66
|
+
;;
|
|
67
|
+
install)
|
|
68
|
+
case "$OS_ID" in
|
|
69
|
+
raspbian | debian | ubuntu)
|
|
70
|
+
# `sudo` sits on the `tee` side, not the whole pipeline - prefixing the
|
|
71
|
+
# entire line would only elevate `curl` and leave `tee` unable to write
|
|
72
|
+
# these root-owned paths. The caller (TailscaleNodeManagedService) only
|
|
73
|
+
# blind-prefixes `sudo` onto lines that do not already contain a pipe.
|
|
74
|
+
echo "curl -fsSL https://pkgs.tailscale.com/stable/${OS_ID}/${VERSION_CODENAME}.noarmor.gpg | sudo tee /usr/share/keyrings/tailscale-archive-keyring.gpg >/dev/null"
|
|
75
|
+
echo "curl -fsSL https://pkgs.tailscale.com/stable/${OS_ID}/${VERSION_CODENAME}.tailscale-keyring.list | sudo tee /etc/apt/sources.list.d/tailscale.list >/dev/null"
|
|
76
|
+
echo "apt-get update -qq"
|
|
77
|
+
echo "apt-get install -y -qq --no-install-recommends tailscale"
|
|
78
|
+
;;
|
|
79
|
+
*)
|
|
80
|
+
# Unsupported distribution: intentionally prints nothing on
|
|
81
|
+
# stdout — the caller's signal to fall back to a vendor link
|
|
82
|
+
# instead of a command list. A note on stderr only, for a human
|
|
83
|
+
# running this script directly.
|
|
84
|
+
echo "unsupported distribution (ID=${OS_ID:-unknown}); install manually: https://tailscale.com/download/linux" >&2
|
|
85
|
+
;;
|
|
86
|
+
esac
|
|
87
|
+
;;
|
|
88
|
+
esac
|
|
89
|
+
|
|
90
|
+
exit 0
|
|
91
|
+
fi
|
|
92
|
+
|
|
32
93
|
# Writes the canonical `{ state, step, message }` status PrivilegedWorkerService
|
|
33
94
|
# expects, via a temp file + rename so a concurrent read never sees a
|
|
34
95
|
# half-written file. printf %s (never direct interpolation into the format
|
|
@@ -37,6 +37,14 @@ export interface TailscaleVersionInfo {
|
|
|
37
37
|
version: string;
|
|
38
38
|
raw: Record<string, unknown>;
|
|
39
39
|
}
|
|
40
|
+
export interface TailscalePrefs {
|
|
41
|
+
OperatorUser?: string;
|
|
42
|
+
ControlURL?: string;
|
|
43
|
+
Hostname?: string;
|
|
44
|
+
LoggedOut?: boolean;
|
|
45
|
+
WantRunning?: boolean;
|
|
46
|
+
[key: string]: unknown;
|
|
47
|
+
}
|
|
40
48
|
export interface TailscaleServeStatus {
|
|
41
49
|
TCP?: Record<string, {
|
|
42
50
|
HTTPS?: boolean;
|
|
@@ -58,6 +66,7 @@ export declare class TailscaleCliService {
|
|
|
58
66
|
private readonly logger;
|
|
59
67
|
getVersion(): Promise<TailscaleVersionInfo>;
|
|
60
68
|
getStatus(): Promise<TailscaleStatus>;
|
|
69
|
+
getPrefs(): Promise<TailscalePrefs>;
|
|
61
70
|
up(args: readonly string[]): Promise<void>;
|
|
62
71
|
set(args: readonly string[]): Promise<void>;
|
|
63
72
|
down(): Promise<void>;
|
|
@@ -86,6 +86,18 @@ let TailscaleCliService = class TailscaleCliService {
|
|
|
86
86
|
}
|
|
87
87
|
return parsed;
|
|
88
88
|
}
|
|
89
|
+
async getPrefs() {
|
|
90
|
+
const { stdout, stderr, exitCode } = await this.exec(['debug', 'prefs']);
|
|
91
|
+
if (exitCode !== 0) {
|
|
92
|
+
throw this.classify(stdout, stderr, `tailscale debug prefs exited with code ${exitCode}`);
|
|
93
|
+
}
|
|
94
|
+
try {
|
|
95
|
+
return JSON.parse(stdout);
|
|
96
|
+
}
|
|
97
|
+
catch (error) {
|
|
98
|
+
throw new TailscaleCliError('unknown', 'Failed to parse `tailscale debug prefs` output.', error);
|
|
99
|
+
}
|
|
100
|
+
}
|
|
89
101
|
async up(args) {
|
|
90
102
|
await this.runManagementCommand(['up', ...args]);
|
|
91
103
|
}
|