fix(dashboard): dont use crypto randomUUID
Some checks failed
Build and Publish Docker Image / build-and-push (push) Failing after 2m38s

use nanoid for jrpc request id generation instead

Co-authored-by: Ona <no-reply@ona.com>
This commit is contained in:
2025-10-30 00:13:08 +00:00
parent 4478cdbcb3
commit fb1fa642af
6 changed files with 40 additions and 43 deletions

View File

@@ -4,7 +4,6 @@ export const ZIGBEE_DEVICE = {
deskLamp: "desk_lamp",
livingRoomFloorLamp: "living_room_floor_lamp",
} as const
export type ZigbeeDeviceName = (typeof ZIGBEE_DEVICE)[keyof typeof ZIGBEE_DEVICE]
export type ZigbeeDeviceStates = {
[ZIGBEE_DEVICE.deskLamp]: {
@@ -26,6 +25,8 @@ export type ZigbeeDeviceStates = {
}
}
export const ALL_ZIGBEE_DEVICE_NAMES: ZigbeeDeviceName[] = Object.values(ZIGBEE_DEVICE)
export type ZigbeeDeviceName = keyof ZigbeeDeviceStates
export type ZigbeeDeviceState = ZigbeeDeviceStates[keyof ZigbeeDeviceStates]
export type ZigbeeDeviceState<DeviceName extends ZigbeeDeviceName = ZigbeeDeviceName> = ZigbeeDeviceStates[DeviceName]
export const ALL_ZIGBEE_DEVICE_NAMES: ZigbeeDeviceName[] = Object.values(ZIGBEE_DEVICE)