unifi-access
Advanced tools
Comparing version 1.0.2 to 1.0.3
@@ -223,9 +223,9 @@ /* Copyright(C) 2019-2024, HJD (https://github.com/hjdhjd). All rights reserved. | ||
// Retrieve the list of doors from all the floors the user has configured. | ||
this._doors = this._bootstrap?.floors.flatMap(x => x.doors) ?? null; | ||
this._doors = this._bootstrap?.floors?.filter(x => x).flatMap(x => x.doors) ?? null; | ||
// Retrieve the list of devices from all the doors the user has configured. | ||
this._devices = this._doors?.map(x => x.device_groups).flat(2) ?? null; | ||
this._devices = this._doors?.filter(x => x).map(x => x.device_groups).flat(2) ?? null; | ||
// Set the list of floors as a convenience. | ||
this._floors = this._bootstrap?.floors ?? null; | ||
// We're good. Now connect to the event listener API. | ||
if (!(await this.launchEventsWs())) { | ||
// If we're boostrapped, connect to the event listener API. Otherwise, we're done. | ||
if (!this._bootstrap || !(await this.launchEventsWs())) { | ||
return retry ? this.bootstrapController(false) : false; | ||
@@ -232,0 +232,0 @@ } |
{ | ||
"name": "unifi-access", | ||
"type": "module", | ||
"version": "1.0.2", | ||
"version": "1.0.3", | ||
"displayName": "UniFi Access API", | ||
@@ -57,6 +57,6 @@ "description": "A soon-to-be-almost-complete implementation of the UniFi Access API.", | ||
"@stylistic/eslint-plugin": "1.7.0", | ||
"@types/node": "20.11.28", | ||
"@types/node": "20.12.2", | ||
"@types/ws": "8.5.10", | ||
"@typescript-eslint/eslint-plugin": "7.2.0", | ||
"@typescript-eslint/parser": "7.2.0", | ||
"@typescript-eslint/eslint-plugin": "7.4.0", | ||
"@typescript-eslint/parser": "7.4.0", | ||
"eslint": "8.57.0", | ||
@@ -66,3 +66,3 @@ "rimraf": "5.0.5", | ||
"typedoc-plugin-markdown": "3.17.1", | ||
"typescript": "5.4.2" | ||
"typescript": "5.4.3" | ||
}, | ||
@@ -69,0 +69,0 @@ "dependencies": { |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
85316