From 20e13dbe42f43d333b1b0fa81c645d80e32f8662 Mon Sep 17 00:00:00 2001 From: Michael Henke Date: Thu, 15 Nov 2018 18:58:15 -0800 Subject: [PATCH] Work in Progress --- .npmignore | 5 + lib/Bloomsky.d.ts | 5 +- lib/Bloomsky.js | 1000 +++++++++++++++---------- lib/PlatformAccessory.d.ts | 6 +- lib/Session.d.ts | 1 - lib/Station.d.ts | 1 - package-lock.json | 49 +- package.json | 13 +- src/Bloomsky.ts | 441 +++++++---- src/PlatformAccessory.ts | 99 +-- src/homebridge.d.ts | 40 +- src/test/test.spec.ts | 271 ------- test.spec.ts | 276 +++++++ tsconfig.json | 4 +- yarn.lock | 1411 ++++++++++++++++++++++++++---------- 15 files changed, 2345 insertions(+), 1277 deletions(-) delete mode 100644 src/test/test.spec.ts create mode 100644 test.spec.ts diff --git a/.npmignore b/.npmignore index ef77972..71cba64 100644 --- a/.npmignore +++ b/.npmignore @@ -1,5 +1,6 @@ local-only/ *.jpg +*.jpeg package-lock.json .git/ @@ -34,3 +35,7 @@ tslint.json npm-debug.log snapshot-error.txt persist/ + +src/ +testing-config/ +*.code-workspace diff --git a/lib/Bloomsky.d.ts b/lib/Bloomsky.d.ts index 022da7b..45e5cd1 100644 --- a/lib/Bloomsky.d.ts +++ b/lib/Bloomsky.d.ts @@ -1,8 +1,7 @@ -/// +import API from "./homebridge"; import { FFMPEG } from "./Ffmpeg"; -import { API } from "./homebridge"; -import { PlatformAccessory } from "./PlatformAccessory"; import { IStation } from "./Station"; +import { PlatformAccessory } from "./PlatformAccessory"; export { Bloomsky }; export default class Bloomsky { static Accessory: PlatformAccessory; diff --git a/lib/Bloomsky.js b/lib/Bloomsky.js index d0775f1..0ec8592 100644 --- a/lib/Bloomsky.js +++ b/lib/Bloomsky.js @@ -1,411 +1,629 @@ "use strict"; -var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { +var __awaiter = + (this && this.__awaiter) || + function (thisArg, _arguments, P, generator) { return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done + ? resolve(result.value) + : new P(function (resolve) { + resolve(result.value); + }).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); }); -}; -var __generator = (this && this.__generator) || function (thisArg, body) { - var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; - return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; - function verb(n) { return function (v) { return step([n, v]); }; } + }; +var __generator = + (this && this.__generator) || + function (thisArg, body) { + var _ = { + label: 0, + sent: function () { + if (t[0] & 1) throw t[1]; + return t[1]; + }, + trys: [], + ops: [], + }, + f, + y, + t, + g; + return ( + (g = { next: verb(0), throw: verb(1), return: verb(2) }), + typeof Symbol === "function" && + (g[Symbol.iterator] = function () { + return this; + }), + g + ); + function verb(n) { + return function (v) { + return step([n, v]); + }; + } function step(op) { - if (f) throw new TypeError("Generator is already executing."); - while (_) try { - if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; - if (y = 0, t) op = [op[0] & 2, t.value]; - switch (op[0]) { - case 0: case 1: t = op; break; - case 4: _.label++; return { value: op[1], done: false }; - case 5: _.label++; y = op[1]; op = [0]; continue; - case 7: op = _.ops.pop(); _.trys.pop(); continue; - default: - if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } - if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } - if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } - if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } - if (t[2]) _.ops.pop(); - _.trys.pop(); continue; - } - op = body.call(thisArg, _); - } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } - if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; + if (f) throw new TypeError("Generator is already executing."); + while (_) + try { + if ( + ((f = 1), + y && + (t = + op[0] & 2 + ? y["return"] + : op[0] + ? y["throw"] || ((t = y["return"]) && t.call(y), 0) + : y.next) && + !(t = t.call(y, op[1])).done) + ) + return t; + if (((y = 0), t)) op = [op[0] & 2, t.value]; + switch (op[0]) { + case 0: + case 1: + t = op; + break; + case 4: + _.label++; + return { value: op[1], done: false }; + case 5: + _.label++; + y = op[1]; + op = [0]; + continue; + case 7: + op = _.ops.pop(); + _.trys.pop(); + continue; + default: + if ( + !((t = _.trys), (t = t.length > 0 && t[t.length - 1])) && + (op[0] === 6 || op[0] === 2) + ) { + _ = 0; + continue; + } + if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { + _.label = op[1]; + break; + } + if (op[0] === 6 && _.label < t[1]) { + _.label = t[1]; + t = op; + break; + } + if (t && _.label < t[2]) { + _.label = t[2]; + _.ops.push(op); + break; + } + if (t[2]) _.ops.pop(); + _.trys.pop(); + continue; + } + op = body.call(thisArg, _); + } catch (e) { + op = [6, e]; + y = 0; + } finally { + f = t = 0; + } + if (op[0] & 5) throw op[1]; + return { value: op[0] ? op[1] : void 0, done: true }; } -}; + }; Object.defineProperty(exports, "__esModule", { value: true }); +var Client = require("typed-rest-client"); var fs = require("fs"); var http = require("http"); -var Client = require("typed-rest-client"); var Ffmpeg_1 = require("./Ffmpeg"); var Bloomsky = /** @class */ (function () { - // Platform constructor - // config may be null - // api may be null if launched from old homebridge version - function Bloomsky(log, config, api) { - if (Bloomsky.Accessory === undefined) { - throw Error("Accessory undefined"); - } - if (Bloomsky.Service === undefined) { - throw Error("Service undefined"); - } - if (Bloomsky.Characteristic === undefined) { - throw Error("Characteristic undefined"); - } - if (Bloomsky.Hap === undefined) { - throw Error("Hap undefined"); - } - if (Bloomsky.UUIDGen === undefined) { - throw Error("UUIDGen undefined"); - } - this.log = log; - this.accessories = []; - this.apiKey = config.apiKey; - this.apiUrl = config.apiUrl || "https://api.bloomsky.com/api/skydata/"; - this.vcodec = config.vcodec || "libx264"; - this.latestData = []; - this.debug = config.debug; - this.log("Bloomsky Init"); - var platform = this; - if (api) { - // Save the API object as plugin needs to register new accessory via this object - platform.api = api; - // Listen to event "didFinishLaunching", this means homebridge already finished loading cached accessories. - // Platform Plugin should only register new accessory that doesn't exist in homebridge after this event. - // Or start discover new accessories. - platform.api.on("didFinishLaunching", function () { - platform.log("didFinishLaunching"); - platform.updateData().catch(function (clientError) { platform.log(clientError); }); - }.bind(this)); - platform.api.on("publishCameraAccessories", function () { - platform.log("publishCameraAccessories"); - }); - } - else { - platform.updateData().catch(function (clientError) { platform.log(clientError); }); - } + // Platform constructor + // config may be null + // api may be null if launched from old homebridge version + function Bloomsky(log, config, api) { + if (Bloomsky.Accessory === undefined) { + throw Error("Accessory undefined"); } - // Function invoked when homebridge tries to restore cached accessory. - // Developer can configure accessory here (like setup event handler). - // Update current value. - Bloomsky.prototype.configureAccessory = function (accessory) { - if (this.debug) { - this.log("configuring accessory... " + accessory.displayName); - } - var platform = this; - var ffmpeg = this.getFfmpegForStationWithUuid(accessory.UUID); + if (Bloomsky.Service === undefined) { + throw Error("Service undefined"); + } + if (Bloomsky.Characteristic === undefined) { + throw Error("Characteristic undefined"); + } + if (Bloomsky.Hap === undefined) { + throw Error("Hap undefined"); + } + if (Bloomsky.UUIDGen === undefined) { + throw Error("UUIDGen undefined"); + } + this.log = log; + this.accessories = []; + this.apiKey = config.apiKey; + this.apiUrl = config.apiUrl || "https://api.bloomsky.com/api/skydata/"; + this.vcodec = config.vcodec || "libx264"; + this.latestData = []; + this.debug = config.debug; + this.log("Bloomsky Init"); + var platform = this; + if (api) { + // Save the API object as plugin needs to register new accessory via this object + platform.api = api; + // Listen to event "didFinishLaunching", this means homebridge already finished loading cached accessories. + // Platform Plugin should only register new accessory that doesn't exist in homebridge after this event. + // Or start discover new accessories. + platform.api.on( + "didFinishLaunching", + function () { + platform.log("didFinishLaunching"); + platform.updateData().catch(function (clientError) { + platform.log(clientError); + }); + }.bind(this) + ); + platform.api.on("publishCameraAccessories", function () { + platform.log("publishCameraAccessories"); + }); + } else { + platform.updateData().catch(function (clientError) { + platform.log(clientError); + }); + } + } + // Function invoked when homebridge tries to restore cached accessory. + // Developer can configure accessory here (like setup event handler). + // Update current value. + Bloomsky.prototype.configureAccessory = function (accessory) { + if (this.debug) { + this.log("configuring accessory... " + accessory.displayName); + } + var platform = this; + var ffmpeg = this.getFfmpegForStationWithUuid(accessory.UUID); + try { + accessory.configureCameraSource(ffmpeg); + } catch (_a) { + accessory.cameraSource = ffmpeg; + } + for (var index in ffmpeg.services) { + if (ffmpeg.hasOwnProperty(index)) { + var service = ffmpeg.services[index]; try { - accessory.configureCameraSource(ffmpeg); - } - catch (_a) { - accessory.cameraSource = ffmpeg; - } - for (var index in ffmpeg.services) { - if (ffmpeg.hasOwnProperty(index)) { - var service = ffmpeg.services[index]; - try { - accessory.removeService(service); - } - catch (_b) { - if (this.debug) { - this.log("unable to remove existing camera service"); - } - } - finally { - accessory.addService(service); - if (this.debug) { - this.log("added camera service: " + service.displayName); - } - } - } - } - // Do not add any existing services... but this is a good place to add services to earlier registered accessories - this.accessories.push(accessory); - // Set the accessory to reachable if plugin can currently process the accessory, - // otherwise set to false and update the reachability later by invoking - // accessory.updateReachability() - if (this.latestData != null && this.latestData.length > 0) { - if (this.debug) { - this.log("Configure Accessory " + accessory.displayName); - } - var stations = platform.latestData - .filter(function (station) { return accessory.UUID === Bloomsky.UUIDGen.generate(station.DeviceID); }); - accessory.reachable = stations.length === 1 && stations[0] !== undefined; - if (accessory.reachable) { - this.updateAccessory(stations[0]); - } - } - else { - if (this.debug) { - this.log("Can't Configure Accessory " + accessory.displayName); - } - accessory.reachable = false; - } - }; - // add accessory dynamically from outside event - Bloomsky.prototype.addAccessory = function (station) { + accessory.removeService(service); + } catch (_b) { + if (this.debug) { + this.log("unable to remove existing camera service"); + } + } finally { + accessory.addService(service); + if (this.debug) { + this.log("added camera service: " + service.displayName); + } + } + } + } + // Do not add any existing services... but this is a good place to add services to earlier registered accessories + this.accessories.push(accessory); + // Set the accessory to reachable if plugin can currently process the accessory, + // otherwise set to false and update the reachability later by invoking + // accessory.updateReachability() + if (this.latestData != null && this.latestData.length > 0) { + if (this.debug) { + this.log("Configure Accessory " + accessory.displayName); + } + var stations = platform.latestData.filter(function (station) { + return accessory.UUID === Bloomsky.UUIDGen.generate(station.DeviceID); + }); + accessory.reachable = stations.length === 1 && stations[0] !== undefined; + if (accessory.reachable) { + this.updateAccessory(stations[0]); + } + } else { + if (this.debug) { + this.log("Can't Configure Accessory " + accessory.displayName); + } + accessory.reachable = false; + } + }; + // add accessory dynamically from outside event + Bloomsky.prototype.addAccessory = function (station) { + if (this.debug) { + this.log("Add Accessory: " + station.DeviceID); + } + var uuid = Bloomsky.UUIDGen.generate(station.DeviceID); + var newAccessory = new Bloomsky.Accessory(station.DeviceName, uuid); + var cameraSource = this.getFfmpegForStationWithUuid(uuid); + var countBefore = newAccessory.services.length; + newAccessory.configureCameraSource(cameraSource); + if (cameraSource.services.length === 0) { + throw Error("Camera Control came without services..."); + } else { + for (var _i = 0, _a = newAccessory.services; _i < _a.length; _i++) { + var service = _a[_i]; if (this.debug) { - this.log("Add Accessory: " + station.DeviceID); - } - var uuid = Bloomsky.UUIDGen.generate(station.DeviceID); - var newAccessory = new Bloomsky.Accessory(station.DeviceName, uuid, Bloomsky.Accessory.Categories.CAMERA); - var cameraSource = this.getFfmpegForStationWithUuid(uuid); - var countBefore = newAccessory.services.length; - newAccessory.configureCameraSource(cameraSource); - if (cameraSource.services.length === 0) { - throw Error("Camera Control came without services..."); + this.log( + service.UUID + + (service.subtype !== undefined ? "." + service.subtype : "") + ); } - else { - for (var _i = 0, _a = newAccessory.services; _i < _a.length; _i++) { - var service = _a[_i]; - if (this.debug) { - this.log(service.UUID + (service.subtype !== undefined ? "." + service.subtype : "")); - } - } - } - if (newAccessory.services.length <= countBefore - || newAccessory.cameraSource !== cameraSource - || newAccessory.services.length < cameraSource.services.length) { - throw Error("Camera Control Service Registration failed... +" + (cameraSource.services.length - countBefore)); - } - else { + } + } + if (newAccessory.services.length <= countBefore) { + throw Error( + "Camera Control Service Registration failed... +" + + (cameraSource.services.length - countBefore) + ); + // } else if ( + // newAccessory.cameraSource !== cameraSource || + // newAccessory.services.length < cameraSource.services.length + // ) { + // throw Error( + // "Camera Control Service Registration failed... +" + + // (cameraSource.services.length - countBefore) + // ); + } else { + if (this.debug) { + this.log( + "Registered " + + (cameraSource.services.length - countBefore) + + " Camera Control Services" + ); + } + } + newAccessory + .addService(Bloomsky.Service.TemperatureSensor, "Temperature") + .getCharacteristic(Bloomsky.Characteristic.CurrentTemperature) + .updateValue(station.Data.Temperature); + newAccessory + .addService(Bloomsky.Service.LightSensor, "Luminance") + .getCharacteristic(Bloomsky.Characteristic.CurrentAmbientLightLevel) + .updateValue(station.Data.Luminance); + newAccessory + .addService(Bloomsky.Service.HumiditySensor, "Humidity") + .getCharacteristic(Bloomsky.Characteristic.CurrentRelativeHumidity) + .updateValue(station.Data.Humidity); + newAccessory + .addService(Bloomsky.Service.MotionSensor, "Rain") + .getCharacteristic(Bloomsky.Characteristic.MotionDetected) + .updateValue(station.Data.Rain); + newAccessory + .addService(Bloomsky.Service.OccupancySensor, "Night") + .getCharacteristic(Bloomsky.Characteristic.OccupancyDetected) + .updateValue(station.Data.Night); + // I only have a Sky 1 model so I can only make a guess about the battery level + // for this specific model. + if (station.Data.DeviceType === "SKY1") { + // clamp battery level between 0 and 100 + var batteryLevel = Math.max( + 0, + Math.min(100, (100 / 2600) * station.Data.Voltage) + ); + var batteryService = newAccessory.addService( + Bloomsky.Service.BatteryService, + "Battery" + ); + batteryService + .getCharacteristic(Bloomsky.Characteristic.BatteryLevel) + .updateValue(batteryLevel); + batteryService + .getCharacteristic(Bloomsky.Characteristic.ChargingState) + .updateValue(2); + batteryService + .getCharacteristic(Bloomsky.Characteristic.StatusLowBattery) + .updateValue(batteryLevel < 20); + } + var informationService = newAccessory.getService( + Bloomsky.Service.AccessoryInformation + ); + if (!informationService) { + informationService = newAccessory.addService( + Bloomsky.Service.AccessoryInformation, + station.DeviceName + ); + } + informationService + .getCharacteristic(Bloomsky.Characteristic.Manufacturer) + .updateValue("Bloomsky"); + informationService + .getCharacteristic(Bloomsky.Characteristic.Model) + .updateValue(station.Data.DeviceType); + informationService + .getCharacteristic(Bloomsky.Characteristic.SerialNumber) + .updateValue(station.DeviceID); + informationService + .getCharacteristic(Bloomsky.Characteristic.Identify) + .updateValue(false); + informationService + .getCharacteristic(Bloomsky.Characteristic.Name) + .updateValue(station.DeviceName); + informationService + .getCharacteristic(Bloomsky.Characteristic.FirmwareRevision) + .updateValue(station.Data.DeviceType); + if (this.debug) { + this.accessories.push(newAccessory); + } + this.log("new accessory pushed..."); + if (this.api !== undefined) { + // https://github.com/nfarina/homebridge/wiki/Supporting-IP-Camera + this.api.publishCameraAccessories( + "homebridge-bloomsky", + this.accessories + ); + } else { + throw TypeError("this.api UNDEFINED!!!"); + } + if (this.debug) { + this.log("new accessory registered..."); + } + if (this.debug) { + var output = ""; + for (var property in newAccessory) { + if (newAccessory.hasOwnProperty(property)) { + output += property + ": " + newAccessory[property] + "; "; + } + } + this.log(output); + } + }; + // add accessory dynamically from outside event + Bloomsky.prototype.updateAccessory = function (station) { + if (this.debug) { + this.log("Update Accessory"); + } + var platform = this; + var stationUuid = Bloomsky.UUIDGen.generate(station.DeviceID); + var accessory = platform.accessories.filter(function (anyAccessory) { + return anyAccessory.UUID === stationUuid; + })[0]; + accessory + .getService(Bloomsky.Service.TemperatureSensor) + .getCharacteristic(Bloomsky.Characteristic.CurrentTemperature) + .updateValue(station.Data.Temperature); + accessory + .getService(Bloomsky.Service.LightSensor) + .getCharacteristic(Bloomsky.Characteristic.CurrentAmbientLightLevel) + .updateValue(station.Data.Luminance); + accessory + .getService(Bloomsky.Service.HumiditySensor) + .getCharacteristic(Bloomsky.Characteristic.CurrentRelativeHumidity) + .updateValue(station.Data.Humidity); + accessory + .getService(Bloomsky.Service.MotionSensor) + .getCharacteristic(Bloomsky.Characteristic.MotionDetected) + .updateValue(station.Data.Rain); + accessory + .getService(Bloomsky.Service.OccupancySensor) + .getCharacteristic(Bloomsky.Characteristic.OccupancyDetected) + .updateValue(station.Data.Night); + var informationService = accessory.getService( + Bloomsky.Service.AccessoryInformation + ); + informationService + .getCharacteristic(Bloomsky.Characteristic.Manufacturer) + .updateValue("Bloomsky"); + informationService + .getCharacteristic(Bloomsky.Characteristic.Model) + .updateValue(station.Data.DeviceType); + informationService + .getCharacteristic(Bloomsky.Characteristic.SerialNumber) + .updateValue(station.DeviceID); + informationService + .getCharacteristic(Bloomsky.Characteristic.Identify) + .updateValue(false); + informationService + .getCharacteristic(Bloomsky.Characteristic.Name) + .updateValue(station.DeviceName); + informationService + .getCharacteristic(Bloomsky.Characteristic.FirmwareRevision) + .updateValue(station.Data.DeviceType); + // I only have a Sky 1 model so I can only make a guess about the battery level + // for this specific model. + if (station.Data.DeviceType === "SKY1") { + // clamp battery level between 0 and 100 + var batteryLevel = Math.max( + 0, + Math.min(100, (100 / 2600) * station.Data.Voltage) + ); + var batteryService = accessory.getService( + Bloomsky.Service.BatteryService + ); + batteryService + .getCharacteristic(Bloomsky.Characteristic.BatteryLevel) + .updateValue(batteryLevel); + batteryService + .getCharacteristic(Bloomsky.Characteristic.ChargingState) + .updateValue(2); + batteryService + .getCharacteristic(Bloomsky.Characteristic.StatusLowBattery) + .updateValue(batteryLevel < 20); + } + var file = fs.createWriteStream( + this.temporaryFilenameForStationUuid(accessory.UUID) + ); + file.on("finish", function () { + file.close(); + if (platform.debug) { + platform.log("temporary file updated..."); + } + }); + http.get(station.Data.ImageURL, function (response) { + response.pipe(file); + platform.log("temporary file written"); + }); + }; + // remove accessory dynamically from outside event + Bloomsky.prototype.removeAccessory = function () { + if (this.debug) { + this.log("Remove Accessory"); + } + if (this.api !== undefined) { + this.api.unregisterPlatformAccessories( + "homebridge-bloomsky", + "Bloomsky", + this.accessories + ); + } + this.accessories = []; + }; + Bloomsky.prototype.temporaryFilenameForStationUuid = function (uuid) { + return uuid + ".jpg"; + }; + Bloomsky.prototype.getFfmpegForStationWithUuid = function (uuid) { + var filename = this.temporaryFilenameForStationUuid(uuid); + var ffmpeg = new Ffmpeg_1.FFMPEG( + Bloomsky.UUIDGen, + Bloomsky.Hap, + { + name: uuid, + videoConfig: { + debug: this.debug, + maxHeight: 640, + maxStreams: 1, + maxWidth: 640, + source: "-loop 1 -i " + filename, + vcodec: this.vcodec, + }, + }, + this.log, + "ffmpeg", + filename + ); + return ffmpeg; + }; + Bloomsky.prototype.updateData = function () { + return __awaiter(this, void 0, void 0, function () { + var platform_1, requestOptions, client, response, error; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + if (!(this.apiKey === undefined)) return [3 /*break*/, 1]; if (this.debug) { - this.log("Registered " + - (cameraSource.services.length - countBefore) + - " Camera Control Services"); + this.log("Skipping updating data..."); } - } - newAccessory.addService(Bloomsky.Service.TemperatureSensor, "Temperature") - .getCharacteristic(Bloomsky.Characteristic.CurrentTemperature).updateValue(station.Data.Temperature); - newAccessory.addService(Bloomsky.Service.LightSensor, "Luminance") - .getCharacteristic(Bloomsky.Characteristic.CurrentAmbientLightLevel).updateValue(station.Data.Luminance); - newAccessory.addService(Bloomsky.Service.HumiditySensor, "Humidity") - .getCharacteristic(Bloomsky.Characteristic.CurrentRelativeHumidity).updateValue(station.Data.Humidity); - newAccessory.addService(Bloomsky.Service.MotionSensor, "Rain") - .getCharacteristic(Bloomsky.Characteristic.MotionDetected).updateValue(station.Data.Rain); - newAccessory.addService(Bloomsky.Service.OccupancySensor, "Night") - .getCharacteristic(Bloomsky.Characteristic.OccupancyDetected).updateValue(station.Data.Night); - // I only have a Sky 1 model so I can only make a guess about the battery level - // for this specific model. - if (station.Data.DeviceType === "SKY1") { - // clamp battery level between 0 and 100 - var batteryLevel = Math.max(0, Math.min(100, (100 / 2600) * station.Data.Voltage)); - var batteryService = newAccessory.addService(Bloomsky.Service.BatteryService, "Battery"); - batteryService.getCharacteristic(Bloomsky.Characteristic.BatteryLevel).updateValue(batteryLevel); - batteryService.getCharacteristic(Bloomsky.Characteristic.ChargingState).updateValue(2); - batteryService.getCharacteristic(Bloomsky.Characteristic.StatusLowBattery).updateValue(batteryLevel < 20); - } - var informationService = newAccessory.getService(Bloomsky.Service.AccessoryInformation); - if (!informationService) { - informationService = newAccessory.addService(Bloomsky.Service.AccessoryInformation, station.DeviceName); - } - informationService.getCharacteristic(Bloomsky.Characteristic.Manufacturer).updateValue("Bloomsky"); - informationService.getCharacteristic(Bloomsky.Characteristic.Model).updateValue(station.Data.DeviceType); - informationService.getCharacteristic(Bloomsky.Characteristic.SerialNumber).updateValue(station.DeviceID); - informationService.getCharacteristic(Bloomsky.Characteristic.Identify).updateValue(false); - informationService.getCharacteristic(Bloomsky.Characteristic.Name).updateValue(station.DeviceName); - informationService.getCharacteristic(Bloomsky.Characteristic.FirmwareRevision).updateValue(station.Data.DeviceType); - if (this.debug) { - this.accessories.push(newAccessory); - } - this.log("new accessory pushed..."); - if (this.api !== undefined) { - // https://github.com/nfarina/homebridge/wiki/Supporting-IP-Camera - this.api.publishCameraAccessories("homebridge-bloomsky", this.accessories); - } - else { - throw TypeError("this.api UNDEFINED!!!"); - } - if (this.debug) { - this.log("new accessory registered..."); - } - if (this.debug) { - var output = ""; - for (var property in newAccessory) { - if (newAccessory.hasOwnProperty(property)) { - output += property + ": " + newAccessory[property] + "; "; - } + return [3 /*break*/, 3]; + case 1: + platform_1 = this; + requestOptions = { + additionalHeaders: { Authorization: this.apiKey }, + }; + client = new Client.RestClient("NodeJS"); + if (platform_1.debug) { + this.log("updateData"); } - this.log(output); - } - }; - // add accessory dynamically from outside event - Bloomsky.prototype.updateAccessory = function (station) { - if (this.debug) { - this.log("Update Accessory"); - } - var platform = this; - var stationUuid = Bloomsky.UUIDGen.generate(station.DeviceID); - var accessory = platform.accessories - .filter(function (anyAccessory) { return anyAccessory.UUID === stationUuid; })[0]; - accessory.getService(Bloomsky.Service.TemperatureSensor) - .getCharacteristic(Bloomsky.Characteristic.CurrentTemperature).updateValue(station.Data.Temperature); - accessory.getService(Bloomsky.Service.LightSensor) - .getCharacteristic(Bloomsky.Characteristic.CurrentAmbientLightLevel).updateValue(station.Data.Luminance); - accessory.getService(Bloomsky.Service.HumiditySensor) - .getCharacteristic(Bloomsky.Characteristic.CurrentRelativeHumidity).updateValue(station.Data.Humidity); - accessory.getService(Bloomsky.Service.MotionSensor) - .getCharacteristic(Bloomsky.Characteristic.MotionDetected).updateValue(station.Data.Rain); - accessory.getService(Bloomsky.Service.OccupancySensor) - .getCharacteristic(Bloomsky.Characteristic.OccupancyDetected).updateValue(station.Data.Night); - var informationService = accessory.getService(Bloomsky.Service.AccessoryInformation); - informationService.getCharacteristic(Bloomsky.Characteristic.Manufacturer).updateValue("Bloomsky"); - informationService.getCharacteristic(Bloomsky.Characteristic.Model).updateValue(station.Data.DeviceType); - informationService.getCharacteristic(Bloomsky.Characteristic.SerialNumber).updateValue(station.DeviceID); - informationService.getCharacteristic(Bloomsky.Characteristic.Identify).updateValue(false); - informationService.getCharacteristic(Bloomsky.Characteristic.Name).updateValue(station.DeviceName); - informationService.getCharacteristic(Bloomsky.Characteristic.FirmwareRevision).updateValue(station.Data.DeviceType); - // I only have a Sky 1 model so I can only make a guess about the battery level - // for this specific model. - if (station.Data.DeviceType === "SKY1") { - // clamp battery level between 0 and 100 - var batteryLevel = Math.max(0, Math.min(100, (100 / 2600) * station.Data.Voltage)); - var batteryService = accessory.getService(Bloomsky.Service.BatteryService); - batteryService.getCharacteristic(Bloomsky.Characteristic.BatteryLevel).updateValue(batteryLevel); - batteryService.getCharacteristic(Bloomsky.Characteristic.ChargingState).updateValue(2); - batteryService.getCharacteristic(Bloomsky.Characteristic.StatusLowBattery).updateValue(batteryLevel < 20); - } - var file = fs.createWriteStream(this.temporaryFilenameForStationUuid(accessory.UUID)); - file.on("finish", function () { - file.close(); - if (platform.debug) { - platform.log("temporary file updated..."); - } - }); - http.get(station.Data.ImageURL, function (response) { - response.pipe(file); - platform.log("temporary file written"); - }); - }; - // remove accessory dynamically from outside event - Bloomsky.prototype.removeAccessory = function () { - if (this.debug) { - this.log("Remove Accessory"); - } - if (this.api !== undefined) { - this.api.unregisterPlatformAccessories("homebridge-bloomsky", "Bloomsky", this.accessories); - } - this.accessories = []; - }; - Bloomsky.prototype.temporaryFilenameForStationUuid = function (uuid) { - return uuid + ".jpg"; - }; - Bloomsky.prototype.getFfmpegForStationWithUuid = function (uuid) { - var filename = this.temporaryFilenameForStationUuid(uuid); - var ffmpeg = new Ffmpeg_1.FFMPEG(Bloomsky.UUIDGen, Bloomsky.Hap, { - name: uuid, - videoConfig: { - debug: this.debug, - maxHeight: 640, - maxStreams: 1, - maxWidth: 640, - source: "-loop 1 -i " + filename, - vcodec: this.vcodec, - }, - }, this.log, "ffmpeg", filename); - return ffmpeg; - }; - Bloomsky.prototype.updateData = function () { - return __awaiter(this, void 0, void 0, function () { - var platform_1, requestOptions, client, response, error; - return __generator(this, function (_a) { - switch (_a.label) { - case 0: - if (!(this.apiKey === undefined)) return [3 /*break*/, 1]; - if (this.debug) { - this.log("Skipping updating data..."); - } - return [3 /*break*/, 3]; - case 1: - platform_1 = this; - requestOptions = { - additionalHeaders: { Authorization: this.apiKey }, - }; - client = new Client.RestClient("NodeJS"); - if (platform_1.debug) { - this.log("updateData"); - } - return [4 /*yield*/, client.get(this.apiUrl + "?unit=intl", requestOptions).catch(function (clientError) { - if (platform_1.debug) { - platform_1.log(clientError); - } - })]; - case 2: - response = _a.sent(); - error = response; - if (error !== undefined && error.detail) { - platform_1.log(error.detail); - } - else if (response != null) { - if (response.result != null) { - platform_1.latestData = response.result; - } - if (response != null && platform_1.latestData.length > 0) { - if (platform_1.accessories.length > 0) { - platform_1.updateExistingAccessories(); - } - platform_1.registerNewAccessories(); - platform_1.updateAccessoriesReachability(); - } - } - platform_1.timeout = setTimeout(function () { - platform_1.updateData().catch(function (clientError) { platform_1.log(clientError); }); - }.bind(platform_1), platform_1.debug ? 30000 : 150000); // 2.5 minutes, 10 seconds for debugging - platform_1.timeout.unref(); - _a.label = 3; - case 3: return [2 /*return*/]; + return [ + 4 /*yield*/, + client + .get(this.apiUrl + "?unit=intl", requestOptions) + .catch(function (clientError) { + if (platform_1.debug) { + platform_1.log(clientError); + } + }), + ]; + case 2: + response = _a.sent(); + error = response; + if (error !== undefined && error.detail) { + platform_1.log(error.detail); + } else if (response != null) { + if (response.result != null) { + platform_1.latestData = response.result; + } + if (response != null && platform_1.latestData.length > 0) { + if (platform_1.accessories.length > 0) { + platform_1.updateExistingAccessories(); } - }); - }); - }; - Bloomsky.prototype.stationNeedsToBeRegistered = function (station) { - if (this.debug) { - this.log("stationNeedsToBeRegistered: " + station); - } - var stationUuid = Bloomsky.UUIDGen.generate(station.DeviceID).valueOf(); - return this.accessories.filter(function (accessory) { return accessory.UUID.valueOf() === stationUuid; }).length === 0; - }; - Bloomsky.prototype.updateExistingAccessories = function () { - var _this = this; - if (this.debug) { - this.log("updateExistingAccessories"); - } - var platform = this; - if (this.debug) { - this.log(platform.latestData.toString()); - } - var registeredAccessories = platform.latestData.filter(function (station) { return !_this.stationNeedsToBeRegistered(station); }); - for (var i = 0, len = registeredAccessories.length; i < len; i++) { - var station = registeredAccessories[i]; - platform.updateAccessory(station); - } - }; - Bloomsky.prototype.registerNewAccessories = function () { - var _this = this; - if (this.debug) { - this.log("registerNewAccessories"); - } - var platform = this; - if (platform.latestData.length === 0) { - return; - } - var unregisteredAccessories = platform.latestData.filter(function (station) { return _this.stationNeedsToBeRegistered(station); }); - for (var i = 0, len = unregisteredAccessories.length; i < len; i++) { - platform.addAccessory(unregisteredAccessories[i]); - } - }; - Bloomsky.prototype.updateAccessoriesReachability = function () { - if (this.debug) { - this.log("Update Reachability"); - } - for (var _i = 0, _a = this.accessories; _i < _a.length; _i++) { - var accessory = _a[_i]; - // accessory.updateReachability(this.latestData != null); // Reachability update is no longer being supported - accessory.reachable = this.latestData != null; - } - }; - return Bloomsky; -}()); + platform_1.registerNewAccessories(); + platform_1.updateAccessoriesReachability(); + } + } + platform_1.timeout = setTimeout( + function () { + platform_1.updateData().catch(function (clientError) { + platform_1.log(clientError); + }); + }.bind(platform_1), + platform_1.debug ? 30000 : 150000 + ); // 2.5 minutes, 10 seconds for debugging + platform_1.timeout.unref(); + _a.label = 3; + case 3: + return [2 /*return*/]; + } + }); + }); + }; + Bloomsky.prototype.stationNeedsToBeRegistered = function (station) { + if (this.debug) { + this.log("stationNeedsToBeRegistered: " + station); + } + var stationUuid = Bloomsky.UUIDGen.generate(station.DeviceID).valueOf(); + return ( + this.accessories.filter(function (accessory) { + return accessory.UUID.valueOf() === stationUuid; + }).length === 0 + ); + }; + Bloomsky.prototype.updateExistingAccessories = function () { + var _this = this; + if (this.debug) { + this.log("updateExistingAccessories"); + } + var platform = this; + if (this.debug) { + this.log(platform.latestData.toString()); + } + var registeredAccessories = platform.latestData.filter(function (station) { + return !_this.stationNeedsToBeRegistered(station); + }); + for (var i = 0, len = registeredAccessories.length; i < len; i++) { + var station = registeredAccessories[i]; + platform.updateAccessory(station); + } + }; + Bloomsky.prototype.registerNewAccessories = function () { + var _this = this; + if (this.debug) { + this.log("registerNewAccessories"); + } + var platform = this; + if (platform.latestData.length === 0) { + return; + } + var unregisteredAccessories = platform.latestData.filter(function ( + station + ) { + return _this.stationNeedsToBeRegistered(station); + }); + for (var i = 0, len = unregisteredAccessories.length; i < len; i++) { + platform.addAccessory(unregisteredAccessories[i]); + } + }; + Bloomsky.prototype.updateAccessoriesReachability = function () { + if (this.debug) { + this.log("Update Reachability"); + } + for (var _i = 0, _a = this.accessories; _i < _a.length; _i++) { + var accessory = _a[_i]; + // accessory.updateReachability(this.latestData != null); // Reachability update is no longer being supported + accessory.reachable = this.latestData != null; + } + }; + return Bloomsky; +})(); exports.Bloomsky = Bloomsky; exports.default = Bloomsky; diff --git a/lib/PlatformAccessory.d.ts b/lib/PlatformAccessory.d.ts index d1ac970..efeadaa 100644 --- a/lib/PlatformAccessory.d.ts +++ b/lib/PlatformAccessory.d.ts @@ -13,11 +13,11 @@ declare interface PlatformAccessory extends HAPNodeJS.Accessory { Categories: typeof HAPNodeJS.Accessory.Categories; new (displayName: string, category: string): PlatformAccessory; new (displayName: string, uuid: string, subtype: number): PlatformAccessory; - addService(service: HAPNodeJS.Service | Function): HAPNodeJS.Service; - addService(service: HAPNodeJS.Service, displayName: string): HAPNodeJS.Service; + addService(service: HAPNodeJS.Service | Function | HAPNodeJS.PredefinedService): HAPNodeJS.Service; + addService(service: HAPNodeJS.Service | HAPNodeJS.PredefinedService, displayName: string): HAPNodeJS.Service; removeService(service: HAPNodeJS.Service): HAPNodeJS.Service; removeService(service: HAPNodeJS.Service, displayName: string): HAPNodeJS.Service; - getService(service: HAPNodeJS.Service): HAPNodeJS.Service; + getService(service: HAPNodeJS.Service | HAPNodeJS.PredefinedService): HAPNodeJS.Service; getService(name: string): HAPNodeJS.Service; updateReachability(reachable: boolean): void; addBridgedAccessory(accessory: HAPNodeJS.Accessory, deferUpdate: boolean): HAPNodeJS.Accessory; diff --git a/lib/Session.d.ts b/lib/Session.d.ts index 8d165cb..4c1326f 100644 --- a/lib/Session.d.ts +++ b/lib/Session.d.ts @@ -1,4 +1,3 @@ -/// declare class SessionInfo { address: any; video_port: any; diff --git a/lib/Station.d.ts b/lib/Station.d.ts index f94605e..8e44c52 100644 --- a/lib/Station.d.ts +++ b/lib/Station.d.ts @@ -1,4 +1,3 @@ -/// import { URL } from "url"; export declare interface IStation { DeviceID: string; diff --git a/package-lock.json b/package-lock.json index cfffe47..2723f07 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "homebridge-bloomsky", - "version": "1.1.10", + "version": "1.1.14", "lockfileVersion": 1, "requires": true, "dependencies": { @@ -381,8 +381,7 @@ "assertion-error": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-1.1.0.tgz", - "integrity": "sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw==", - "dev": true + "integrity": "sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw==" }, "async-wait-until": { "version": "1.2.4", @@ -495,7 +494,6 @@ "version": "4.2.0", "resolved": "https://registry.npmjs.org/chai/-/chai-4.2.0.tgz", "integrity": "sha512-XQU3bhBukrOsQCuwZndwGcCVQHyZi53fQ6Ys1Fym7E4olpIqqZZhhoFJoaKVvV17lWQoXYwgWN2nF5crA8J2jw==", - "dev": true, "requires": { "assertion-error": "^1.1.0", "check-error": "^1.0.2", @@ -521,8 +519,7 @@ "check-error": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/check-error/-/check-error-1.0.2.tgz", - "integrity": "sha1-V00xLt2Iu13YkS6Sht1sCu1KrII=", - "dev": true + "integrity": "sha1-V00xLt2Iu13YkS6Sht1sCu1KrII=" }, "child_process": { "version": "1.0.2", @@ -599,7 +596,6 @@ "version": "3.0.1", "resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-3.0.1.tgz", "integrity": "sha512-+QeIQyN5ZuO+3Uk5DYh6/1eKO0m0YmJFGNmFHGACpf1ClL1nmlV/p4gNgbl2pJGxgXb4faqo6UE+M5ACEMyVcw==", - "dev": true, "requires": { "type-detect": "^4.0.0" } @@ -607,8 +603,7 @@ "deep-equal": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/deep-equal/-/deep-equal-1.0.1.tgz", - "integrity": "sha1-9dJgKStmDghO/0zbyfCK0yR0SLU=", - "dev": true + "integrity": "sha1-9dJgKStmDghO/0zbyfCK0yR0SLU=" }, "diff": { "version": "3.5.0", @@ -728,8 +723,7 @@ "get-func-name": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/get-func-name/-/get-func-name-2.0.0.tgz", - "integrity": "sha1-6td0q+5y4gQJQzoGY2YCPdaIekE=", - "dev": true + "integrity": "sha1-6td0q+5y4gQJQzoGY2YCPdaIekE=" }, "glob": { "version": "7.1.2", @@ -920,8 +914,7 @@ "json-stringify-safe": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", - "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=", - "dev": true + "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=" }, "load-bmfont": { "version": "1.4.0", @@ -941,8 +934,7 @@ "lodash": { "version": "4.17.11", "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.11.tgz", - "integrity": "sha512-cQKh8igo5QUhZ7lg38DYWAxMvjSAKG0A8wGSVimP07SIUEK2UO+arSRKbRZWtelMtN5V0Hkwh5ryOto/SshYIg==", - "dev": true + "integrity": "sha512-cQKh8igo5QUhZ7lg38DYWAxMvjSAKG0A8wGSVimP07SIUEK2UO+arSRKbRZWtelMtN5V0Hkwh5ryOto/SshYIg==" }, "make-error": { "version": "1.3.5", @@ -1081,7 +1073,6 @@ "version": "9.6.1", "resolved": "https://registry.npmjs.org/nock/-/nock-9.6.1.tgz", "integrity": "sha512-EDgl/WgNQ0C1BZZlASOQkQdE6tAWXJi8QQlugqzN64JJkvZ7ILijZuG24r4vCC7yOfnm6HKpne5AGExLGCeBWg==", - "dev": true, "requires": { "chai": "^4.1.2", "debug": "^3.1.0", @@ -1098,7 +1089,6 @@ "version": "3.2.6", "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz", "integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==", - "dev": true, "requires": { "ms": "^2.1.1" } @@ -1106,14 +1096,12 @@ "ms": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", - "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==", - "dev": true + "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==" }, "semver": { "version": "5.6.0", "resolved": "https://registry.npmjs.org/semver/-/semver-5.6.0.tgz", - "integrity": "sha512-RS9R6R35NYgQn++fkDWaOmqGoj4Ek9gGs+DPxNUZKuwE183xjJroKvyo1IzVFeXvUrvmALy6FWD5xrdJT25gMg==", - "dev": true + "integrity": "sha512-RS9R6R35NYgQn++fkDWaOmqGoj4Ek9gGs+DPxNUZKuwE183xjJroKvyo1IzVFeXvUrvmALy6FWD5xrdJT25gMg==" } } }, @@ -1200,8 +1188,7 @@ "pathval": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/pathval/-/pathval-1.1.0.tgz", - "integrity": "sha1-uULm1L3mUwBe9rcTYd74cn0GReA=", - "dev": true + "integrity": "sha1-uULm1L3mUwBe9rcTYd74cn0GReA=" }, "phin": { "version": "2.9.3", @@ -1235,8 +1222,7 @@ "propagate": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/propagate/-/propagate-1.0.0.tgz", - "integrity": "sha1-AMLa7t2iDofjeCs0Stuhzd1q1wk=", - "dev": true + "integrity": "sha1-AMLa7t2iDofjeCs0Stuhzd1q1wk=" }, "prr": { "version": "1.0.1", @@ -1259,8 +1245,7 @@ "qs": { "version": "6.5.2", "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.2.tgz", - "integrity": "sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA==", - "dev": true + "integrity": "sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA==" }, "readable-stream": { "version": "2.3.6", @@ -1505,20 +1490,17 @@ "tunnel": { "version": "0.0.4", "resolved": "http://registry.npmjs.org/tunnel/-/tunnel-0.0.4.tgz", - "integrity": "sha1-LTeFoVjBdMmhbcLARuxfxfF0IhM=", - "dev": true + "integrity": "sha1-LTeFoVjBdMmhbcLARuxfxfF0IhM=" }, "type-detect": { "version": "4.0.8", "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz", - "integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==", - "dev": true + "integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==" }, "typed-rest-client": { "version": "1.0.11", "resolved": "https://registry.npmjs.org/typed-rest-client/-/typed-rest-client-1.0.11.tgz", "integrity": "sha512-Iz2/p1EkJp8laAIlW/4h+3u+eJqmslosrX2wK1ofM74fCnRpM/EAPM+psjcQKomlNQrInKLPp/JYnsH4ZuzhQQ==", - "dev": true, "requires": { "nock": "9.6.1", "tunnel": "0.0.4", @@ -1534,8 +1516,7 @@ "underscore": { "version": "1.8.3", "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.8.3.tgz", - "integrity": "sha1-Tz+1OxBuYJf8+ctBCfKl6b36UCI=", - "dev": true + "integrity": "sha1-Tz+1OxBuYJf8+ctBCfKl6b36UCI=" }, "utif": { "version": "2.0.1", diff --git a/package.json b/package.json index 46c77af..4276292 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "homebridge-bloomsky", - "version": "1.1.13", + "version": "1.2", "description": "Homebridge plugin for Bloomsky weather stations", "main": "index.js", "devDependencies": { @@ -14,15 +14,16 @@ "chai": "^4.2.0", "hap-nodejs": "^0.4.47", "homebridge": ">=0.4.42", - "mocha": "^5.2.0", + "mocha": "^7.1.2", "mocha-logger": "^1.0.6", + "tern": "^0.22.3", "ts-node": "^7.0.1", "tslint": "^5.11.0", - "typescript": "^3.1.3", - "tern": "^0.22.3" + "typescript": "^3.1.3" }, "scripts": { - "test": "mocha -r ts-node/register src/test/**/*.spec.ts" + "test": "mocha -r ts-node/register **/*.spec.ts", + "standalone": "node standalone.js" }, "repository": { "type": "git", @@ -48,7 +49,7 @@ "engines": { "node": ">=6.2.2", "homebridge": ">=0.4.42", - "npm" : ">=6.4.1" + "npm": ">=6.4.1" }, "optionalDependencies": {} } diff --git a/src/Bloomsky.ts b/src/Bloomsky.ts index 7837346..47af4dc 100644 --- a/src/Bloomsky.ts +++ b/src/Bloomsky.ts @@ -1,16 +1,16 @@ +import * as Client from "typed-rest-client"; import * as fs from "fs"; import * as http from "http"; -import * as Client from "typed-rest-client"; -import { IHeaders } from "typed-rest-client/Interfaces"; + +import API from "./homebridge"; import { FFMPEG } from "./Ffmpeg"; -import { API } from "./homebridge"; -import { PlatformAccessory } from "./PlatformAccessory"; +import { IHeaders } from "typed-rest-client/Interfaces"; import { IStation } from "./Station"; +import { PlatformAccessory } from "./PlatformAccessory"; export { Bloomsky }; export default class Bloomsky { - public static Accessory: PlatformAccessory; public static Service: HAPNodeJS.Service; public static Characteristic: HAPNodeJS.Characteristic; @@ -33,12 +33,21 @@ export default class Bloomsky { // config may be null // api may be null if launched from old homebridge version constructor(log: (text: string) => void, config: any, api: API) { - - if (Bloomsky.Accessory === undefined) { throw Error("Accessory undefined"); } - if (Bloomsky.Service === undefined) { throw Error("Service undefined"); } - if (Bloomsky.Characteristic === undefined) { throw Error("Characteristic undefined"); } - if (Bloomsky.Hap === undefined) { throw Error("Hap undefined"); } - if (Bloomsky.UUIDGen === undefined) { throw Error("UUIDGen undefined"); } + if (Bloomsky.Accessory === undefined) { + throw Error("Accessory undefined"); + } + if (Bloomsky.Service === undefined) { + throw Error("Service undefined"); + } + if (Bloomsky.Characteristic === undefined) { + throw Error("Characteristic undefined"); + } + if (Bloomsky.Hap === undefined) { + throw Error("Hap undefined"); + } + if (Bloomsky.UUIDGen === undefined) { + throw Error("UUIDGen undefined"); + } this.log = log; this.accessories = [] as PlatformAccessory[]; @@ -60,19 +69,24 @@ export default class Bloomsky { // Platform Plugin should only register new accessory that doesn't exist in homebridge after this event. // Or start discover new accessories. - platform.api.on("didFinishLaunching", function() { - platform.log("didFinishLaunching"); + platform.api.on( + "didFinishLaunching", + function () { + platform.log("didFinishLaunching"); - platform.updateData().catch((clientError) => { platform.log(clientError); }); + platform.updateData().catch((clientError) => { + platform.log(clientError); + }); + }.bind(this) + ); - }.bind(this)); - - platform.api.on("publishCameraAccessories", function() { + platform.api.on("publishCameraAccessories", function () { platform.log("publishCameraAccessories"); }); - } else { - platform.updateData().catch((clientError) => { platform.log(clientError); }); + platform.updateData().catch((clientError) => { + platform.log(clientError); + }); } } @@ -80,8 +94,9 @@ export default class Bloomsky { // Developer can configure accessory here (like setup event handler). // Update current value. public configureAccessory(accessory: PlatformAccessory) { - - if (this.debug) { this.log("configuring accessory... " + accessory.displayName); } + if (this.debug) { + this.log("configuring accessory... " + accessory.displayName); + } const platform = this; const ffmpeg = this.getFfmpegForStationWithUuid(accessory.UUID); @@ -98,10 +113,14 @@ export default class Bloomsky { try { accessory.removeService(service); } catch { - if (this.debug) { this.log("unable to remove existing camera service"); } + if (this.debug) { + this.log("unable to remove existing camera service"); + } } finally { accessory.addService(service); - if (this.debug) { this.log("added camera service: " + service.displayName); } + if (this.debug) { + this.log("added camera service: " + service.displayName); + } } } } @@ -113,9 +132,13 @@ export default class Bloomsky { // otherwise set to false and update the reachability later by invoking // accessory.updateReachability() if (this.latestData != null && this.latestData.length > 0) { - if (this.debug) { this.log("Configure Accessory " + accessory.displayName); } - const stations = platform.latestData - .filter((station) => accessory.UUID === Bloomsky.UUIDGen.generate(station.DeviceID)); + if (this.debug) { + this.log("Configure Accessory " + accessory.displayName); + } + const stations = platform.latestData.filter( + (station) => + accessory.UUID === Bloomsky.UUIDGen.generate(station.DeviceID) + ); accessory.reachable = stations.length === 1 && stations[0] !== undefined; @@ -123,95 +146,155 @@ export default class Bloomsky { this.updateAccessory(stations[0]); } } else { - if (this.debug) { this.log("Can't Configure Accessory " + accessory.displayName); } + if (this.debug) { + this.log("Can't Configure Accessory " + accessory.displayName); + } accessory.reachable = false; } } // add accessory dynamically from outside event public addAccessory(station: IStation) { - - if (this.debug) { this.log("Add Accessory: " + station.DeviceID); } + if (this.debug) { + this.log("Add Accessory: " + station.DeviceID); + } const uuid = Bloomsky.UUIDGen.generate(station.DeviceID); - const newAccessory = new Bloomsky.Accessory(station.DeviceName, uuid, Bloomsky.Accessory.Categories.CAMERA); + const newAccessory = new Bloomsky.Accessory(station.DeviceName, uuid); const cameraSource = this.getFfmpegForStationWithUuid(uuid); const countBefore = newAccessory.services.length; newAccessory.configureCameraSource(cameraSource); if (cameraSource.services.length === 0) { - throw Error ("Camera Control came without services..."); + throw Error("Camera Control came without services..."); } else { for (const service of newAccessory.services) { - if (this.debug) { this.log(service.UUID + (service.subtype !== undefined ? "." + service.subtype : "")); } + if (this.debug) { + this.log( + service.UUID + + (service.subtype !== undefined ? "." + service.subtype : "") + ); + } } } - if (newAccessory.services.length <= countBefore - || newAccessory.cameraSource !== cameraSource - || newAccessory.services.length < cameraSource.services.length - ) { - throw Error ("Camera Control Service Registration failed... +" + (cameraSource.services.length - countBefore)); + if ( + newAccessory.services.length <= countBefore || + newAccessory.cameraSource !== cameraSource || + newAccessory.services.length < cameraSource.services.length + ) { + throw Error( + "Camera Control Service Registration failed... +" + + (cameraSource.services.length - countBefore) + ); } else { if (this.debug) { - this.log("Registered " + - (cameraSource.services.length - countBefore) + - " Camera Control Services"); + this.log( + "Registered " + + (cameraSource.services.length - countBefore) + + " Camera Control Services" + ); } } - newAccessory.addService(Bloomsky.Service.TemperatureSensor, "Temperature") - .getCharacteristic(Bloomsky.Characteristic.CurrentTemperature).updateValue(station.Data.Temperature); + newAccessory + .addService(Bloomsky.Service.TemperatureSensor, "Temperature") + .getCharacteristic(Bloomsky.Characteristic.CurrentTemperature) + .updateValue(station.Data.Temperature); - newAccessory.addService(Bloomsky.Service.LightSensor, "Luminance") - .getCharacteristic(Bloomsky.Characteristic.CurrentAmbientLightLevel).updateValue(station.Data.Luminance); + newAccessory + .addService(Bloomsky.Service.LightSensor, "Luminance") + .getCharacteristic(Bloomsky.Characteristic.CurrentAmbientLightLevel) + .updateValue(station.Data.Luminance); - newAccessory.addService(Bloomsky.Service.HumiditySensor, "Humidity") - .getCharacteristic(Bloomsky.Characteristic.CurrentRelativeHumidity).updateValue(station.Data.Humidity); + newAccessory + .addService(Bloomsky.Service.HumiditySensor, "Humidity") + .getCharacteristic(Bloomsky.Characteristic.CurrentRelativeHumidity) + .updateValue(station.Data.Humidity); - newAccessory.addService(Bloomsky.Service.MotionSensor, "Rain") - .getCharacteristic(Bloomsky.Characteristic.MotionDetected).updateValue(station.Data.Rain); + newAccessory + .addService(Bloomsky.Service.MotionSensor, "Rain") + .getCharacteristic(Bloomsky.Characteristic.MotionDetected) + .updateValue(station.Data.Rain); - newAccessory.addService(Bloomsky.Service.OccupancySensor, "Night") - .getCharacteristic(Bloomsky.Characteristic.OccupancyDetected).updateValue(station.Data.Night); + newAccessory + .addService(Bloomsky.Service.OccupancySensor, "Night") + .getCharacteristic(Bloomsky.Characteristic.OccupancyDetected) + .updateValue(station.Data.Night); // I only have a Sky 1 model so I can only make a guess about the battery level // for this specific model. if (station.Data.DeviceType === "SKY1") { - // clamp battery level between 0 and 100 - const batteryLevel = Math.max(0, Math.min(100, (100 / 2600) * station.Data.Voltage)); - - const batteryService = newAccessory.addService(Bloomsky.Service.BatteryService, "Battery"); - batteryService.getCharacteristic(Bloomsky.Characteristic.BatteryLevel).updateValue(batteryLevel); - batteryService.getCharacteristic(Bloomsky.Characteristic.ChargingState).updateValue(2); - batteryService.getCharacteristic(Bloomsky.Characteristic.StatusLowBattery).updateValue(batteryLevel < 20); + // clamp battery level between 0 and 100 + const batteryLevel = Math.max( + 0, + Math.min(100, (100 / 2600) * station.Data.Voltage) + ); + + const batteryService = newAccessory.addService( + Bloomsky.Service.BatteryService, + "Battery" + ); + batteryService + .getCharacteristic(Bloomsky.Characteristic.BatteryLevel) + .updateValue(batteryLevel); + batteryService + .getCharacteristic(Bloomsky.Characteristic.ChargingState) + .updateValue(2); + batteryService + .getCharacteristic(Bloomsky.Characteristic.StatusLowBattery) + .updateValue(batteryLevel < 20); } - let informationService = newAccessory.getService(Bloomsky.Service.AccessoryInformation); + let informationService = newAccessory.getService( + Bloomsky.Service.AccessoryInformation + ); if (!informationService) { - informationService = newAccessory.addService(Bloomsky.Service.AccessoryInformation, station.DeviceName); + informationService = newAccessory.addService( + Bloomsky.Service.AccessoryInformation, + station.DeviceName + ); } - informationService.getCharacteristic(Bloomsky.Characteristic.Manufacturer).updateValue("Bloomsky"); - informationService.getCharacteristic(Bloomsky.Characteristic.Model).updateValue( station.Data.DeviceType); - informationService.getCharacteristic(Bloomsky.Characteristic.SerialNumber).updateValue(station.DeviceID); - informationService.getCharacteristic(Bloomsky.Characteristic.Identify).updateValue(false); - informationService.getCharacteristic(Bloomsky.Characteristic.Name).updateValue(station.DeviceName); - informationService.getCharacteristic(Bloomsky.Characteristic.FirmwareRevision).updateValue(station.Data.DeviceType); + informationService + .getCharacteristic(Bloomsky.Characteristic.Manufacturer) + .updateValue("Bloomsky"); + informationService + .getCharacteristic(Bloomsky.Characteristic.Model) + .updateValue(station.Data.DeviceType); + informationService + .getCharacteristic(Bloomsky.Characteristic.SerialNumber) + .updateValue(station.DeviceID); + informationService + .getCharacteristic(Bloomsky.Characteristic.Identify) + .updateValue(false); + informationService + .getCharacteristic(Bloomsky.Characteristic.Name) + .updateValue(station.DeviceName); + informationService + .getCharacteristic(Bloomsky.Characteristic.FirmwareRevision) + .updateValue(station.Data.DeviceType); - if (this.debug) { this.accessories.push(newAccessory); } + if (this.debug) { + this.accessories.push(newAccessory); + } this.log("new accessory pushed..."); - if (this.api !== undefined ) { + if (this.api !== undefined) { // https://github.com/nfarina/homebridge/wiki/Supporting-IP-Camera - this.api.publishCameraAccessories("homebridge-bloomsky", this.accessories); + this.api.publishCameraAccessories( + "homebridge-bloomsky", + this.accessories + ); } else { throw TypeError("this.api UNDEFINED!!!"); } - if (this.debug) { this.log("new accessory registered..."); } + if (this.debug) { + this.log("new accessory registered..."); + } if (this.debug) { let output = ""; @@ -226,54 +309,96 @@ export default class Bloomsky { // add accessory dynamically from outside event public updateAccessory(station: IStation) { - if (this.debug) { this.log("Update Accessory"); } + if (this.debug) { + this.log("Update Accessory"); + } const platform = this; const stationUuid = Bloomsky.UUIDGen.generate(station.DeviceID); - const accessory = platform.accessories - .filter((anyAccessory) => anyAccessory.UUID === stationUuid)[0] as PlatformAccessory; - - accessory.getService(Bloomsky.Service.TemperatureSensor) - .getCharacteristic(Bloomsky.Characteristic.CurrentTemperature).updateValue(station.Data.Temperature); - - accessory.getService(Bloomsky.Service.LightSensor) - .getCharacteristic(Bloomsky.Characteristic.CurrentAmbientLightLevel).updateValue(station.Data.Luminance); - - accessory.getService(Bloomsky.Service.HumiditySensor) - .getCharacteristic(Bloomsky.Characteristic.CurrentRelativeHumidity).updateValue(station.Data.Humidity); - - accessory.getService(Bloomsky.Service.MotionSensor) - .getCharacteristic(Bloomsky.Characteristic.MotionDetected).updateValue(station.Data.Rain); - - accessory.getService(Bloomsky.Service.OccupancySensor) - .getCharacteristic(Bloomsky.Characteristic.OccupancyDetected).updateValue(station.Data.Night); - - const informationService = accessory.getService(Bloomsky.Service.AccessoryInformation); - informationService.getCharacteristic(Bloomsky.Characteristic.Manufacturer).updateValue("Bloomsky"); - informationService.getCharacteristic(Bloomsky.Characteristic.Model).updateValue( station.Data.DeviceType); - informationService.getCharacteristic(Bloomsky.Characteristic.SerialNumber).updateValue(station.DeviceID); - informationService.getCharacteristic(Bloomsky.Characteristic.Identify).updateValue(false); - informationService.getCharacteristic(Bloomsky.Characteristic.Name).updateValue(station.DeviceName); - informationService.getCharacteristic(Bloomsky.Characteristic.FirmwareRevision).updateValue(station.Data.DeviceType); + const accessory = platform.accessories.filter( + (anyAccessory) => anyAccessory.UUID === stationUuid + )[0] as PlatformAccessory; + + accessory + .getService(Bloomsky.Service.TemperatureSensor) + .getCharacteristic(Bloomsky.Characteristic.CurrentTemperature) + .updateValue(station.Data.Temperature); + + accessory + .getService(Bloomsky.Service.LightSensor) + .getCharacteristic(Bloomsky.Characteristic.CurrentAmbientLightLevel) + .updateValue(station.Data.Luminance); + + accessory + .getService(Bloomsky.Service.HumiditySensor) + .getCharacteristic(Bloomsky.Characteristic.CurrentRelativeHumidity) + .updateValue(station.Data.Humidity); + + accessory + .getService(Bloomsky.Service.MotionSensor) + .getCharacteristic(Bloomsky.Characteristic.MotionDetected) + .updateValue(station.Data.Rain); + + accessory + .getService(Bloomsky.Service.OccupancySensor) + .getCharacteristic(Bloomsky.Characteristic.OccupancyDetected) + .updateValue(station.Data.Night); + + const informationService = accessory.getService( + Bloomsky.Service.AccessoryInformation + ); + informationService + .getCharacteristic(Bloomsky.Characteristic.Manufacturer) + .updateValue("Bloomsky"); + informationService + .getCharacteristic(Bloomsky.Characteristic.Model) + .updateValue(station.Data.DeviceType); + informationService + .getCharacteristic(Bloomsky.Characteristic.SerialNumber) + .updateValue(station.DeviceID); + informationService + .getCharacteristic(Bloomsky.Characteristic.Identify) + .updateValue(false); + informationService + .getCharacteristic(Bloomsky.Characteristic.Name) + .updateValue(station.DeviceName); + informationService + .getCharacteristic(Bloomsky.Characteristic.FirmwareRevision) + .updateValue(station.Data.DeviceType); // I only have a Sky 1 model so I can only make a guess about the battery level // for this specific model. if (station.Data.DeviceType === "SKY1") { - // clamp battery level between 0 and 100 - const batteryLevel = Math.max(0, Math.min(100, (100 / 2600) * station.Data.Voltage)); - - const batteryService = accessory.getService(Bloomsky.Service.BatteryService); - batteryService.getCharacteristic(Bloomsky.Characteristic.BatteryLevel).updateValue(batteryLevel); - batteryService.getCharacteristic(Bloomsky.Characteristic.ChargingState).updateValue(2); - batteryService.getCharacteristic(Bloomsky.Characteristic.StatusLowBattery).updateValue(batteryLevel < 20); + // clamp battery level between 0 and 100 + const batteryLevel = Math.max( + 0, + Math.min(100, (100 / 2600) * station.Data.Voltage) + ); + + const batteryService = accessory.getService( + Bloomsky.Service.BatteryService + ); + batteryService + .getCharacteristic(Bloomsky.Characteristic.BatteryLevel) + .updateValue(batteryLevel); + batteryService + .getCharacteristic(Bloomsky.Characteristic.ChargingState) + .updateValue(2); + batteryService + .getCharacteristic(Bloomsky.Characteristic.StatusLowBattery) + .updateValue(batteryLevel < 20); } - const file = fs.createWriteStream(this.temporaryFilenameForStationUuid(accessory.UUID)); - file.on("finish", function() { + const file = fs.createWriteStream( + this.temporaryFilenameForStationUuid(accessory.UUID) + ); + file.on("finish", function () { file.close(); - if (platform.debug) { platform.log("temporary file updated..."); } + if (platform.debug) { + platform.log("temporary file updated..."); + } }); - http.get(station.Data.ImageURL, function(response) { + http.get(station.Data.ImageURL, function (response) { response.pipe(file); platform.log("temporary file written"); }); @@ -281,10 +406,16 @@ export default class Bloomsky { // remove accessory dynamically from outside event public removeAccessory() { - if (this.debug) { this.log("Remove Accessory"); } + if (this.debug) { + this.log("Remove Accessory"); + } if (this.api !== undefined) { - this.api.unregisterPlatformAccessories("homebridge-bloomsky", "Bloomsky", this.accessories); + this.api.unregisterPlatformAccessories( + "homebridge-bloomsky", + "Bloomsky", + this.accessories + ); } this.accessories = [] as PlatformAccessory[]; } @@ -296,24 +427,33 @@ export default class Bloomsky { public getFfmpegForStationWithUuid(uuid: string): FFMPEG { const filename = this.temporaryFilenameForStationUuid(uuid); - const ffmpeg = new FFMPEG(Bloomsky.UUIDGen, Bloomsky.Hap, { - name: uuid, - videoConfig: { - debug : this.debug, - maxHeight: 640, - maxStreams: 1, - maxWidth: 640, - source: "-loop 1 -i " + filename, - vcodec : this.vcodec, + const ffmpeg = new FFMPEG( + Bloomsky.UUIDGen, + Bloomsky.Hap, + { + name: uuid, + videoConfig: { + debug: this.debug, + maxHeight: 640, + maxStreams: 1, + maxWidth: 640, + source: "-loop 1 -i " + filename, + vcodec: this.vcodec, + }, }, - }, this.log, "ffmpeg", filename); + this.log, + "ffmpeg", + filename + ); return ffmpeg; } private async updateData() { if (this.apiKey === undefined) { - if (this.debug) { this.log("Skipping updating data..."); } + if (this.debug) { + this.log("Skipping updating data..."); + } } else { const platform = this; @@ -323,11 +463,17 @@ export default class Bloomsky { const client = new Client.RestClient("NodeJS"); - if (platform.debug) { this.log("updateData"); } + if (platform.debug) { + this.log("updateData"); + } - const response = await client.get(this.apiUrl + "?unit=intl", requestOptions).catch((clientError) => { - if (platform.debug) { platform.log(clientError); } - }); + const response = await client + .get(this.apiUrl + "?unit=intl", requestOptions) + .catch((clientError) => { + if (platform.debug) { + platform.log(clientError); + } + }); const error: any = response as any; if (error !== undefined && error.detail) { @@ -338,7 +484,6 @@ export default class Bloomsky { } if (response != null && platform.latestData.length > 0) { - if (platform.accessories.length > 0) { platform.updateExistingAccessories(); } @@ -347,52 +492,72 @@ export default class Bloomsky { } } - platform.timeout = setTimeout(function() { - platform.updateData().catch((clientError) => { platform.log(clientError); }); - }.bind(platform), - platform.debug ? 30000 : 150000); // 2.5 minutes, 10 seconds for debugging + platform.timeout = setTimeout( + function () { + platform.updateData().catch((clientError) => { + platform.log(clientError); + }); + }.bind(platform), + platform.debug ? 30000 : 150000 + ); // 2.5 minutes, 10 seconds for debugging platform.timeout.unref(); } } private stationNeedsToBeRegistered(station: IStation) { - if (this.debug) { this.log ("stationNeedsToBeRegistered: " + station); } + if (this.debug) { + this.log("stationNeedsToBeRegistered: " + station); + } const stationUuid = Bloomsky.UUIDGen.generate(station.DeviceID).valueOf(); - return this.accessories.filter((accessory) => accessory.UUID.valueOf() === stationUuid).length === 0; + return ( + this.accessories.filter( + (accessory) => accessory.UUID.valueOf() === stationUuid + ).length === 0 + ); } private updateExistingAccessories() { - if (this.debug) { this.log("updateExistingAccessories"); } + if (this.debug) { + this.log("updateExistingAccessories"); + } const platform = this; if (this.debug) { this.log(platform.latestData.toString()); } - const registeredAccessories = platform.latestData.filter((station) => !this.stationNeedsToBeRegistered(station)); + const registeredAccessories = platform.latestData.filter( + (station) => !this.stationNeedsToBeRegistered(station) + ); for (let i = 0, len = registeredAccessories.length; i < len; i++) { - const station = registeredAccessories[i]; - platform.updateAccessory(station); + const station = registeredAccessories[i]; + platform.updateAccessory(station); } } private registerNewAccessories() { - if (this.debug) { this.log("registerNewAccessories"); } + if (this.debug) { + this.log("registerNewAccessories"); + } const platform = this; if (platform.latestData.length === 0) { return; } - const unregisteredAccessories = platform.latestData.filter((station) => this.stationNeedsToBeRegistered(station)); + const unregisteredAccessories = platform.latestData.filter((station) => + this.stationNeedsToBeRegistered(station) + ); for (let i = 0, len = unregisteredAccessories.length; i < len; i++) { - platform.addAccessory(unregisteredAccessories[i]); + platform.addAccessory(unregisteredAccessories[i]); } } private updateAccessoriesReachability() { - if (this.debug) { this.log("Update Reachability"); } + if (this.debug) { + this.log("Update Reachability"); + } for (const accessory of this.accessories) { // accessory.updateReachability(this.latestData != null); // Reachability update is no longer being supported accessory.reachable = this.latestData != null; diff --git a/src/PlatformAccessory.ts b/src/PlatformAccessory.ts index b8f3043..a018c5d 100644 --- a/src/PlatformAccessory.ts +++ b/src/PlatformAccessory.ts @@ -1,49 +1,66 @@ -import { EventEmitter } from "events"; import * as hap from "hap-nodejs"; +import { EventEmitter } from "events"; + // tslint:disable-next-line:interface-name declare interface PlatformAccessory extends HAPNodeJS.Accessory { - displayName: string; - username: string; - pincode: string; - UUID: string; - aid: string; - bridged: boolean; - bridgedAccessories: HAPNodeJS.Accessory[]; - reachable: boolean; - category: HAPNodeJS.Accessory.Categories; - services: HAPNodeJS.Service[]; - cameraSource: HAPNodeJS.CameraSource; - Categories: typeof HAPNodeJS.Accessory.Categories; + displayName: string; + username: string; + pincode: string; + UUID: string; + aid: string; + bridged: boolean; + bridgedAccessories: HAPNodeJS.Accessory[]; + reachable: boolean; + category: HAPNodeJS.Accessory.Categories; + services: HAPNodeJS.Service[]; + cameraSource: HAPNodeJS.CameraSource; + Categories: typeof HAPNodeJS.Accessory.Categories; - // tslint:disable-next-line:no-misused-new - new (displayName: string, category: string): PlatformAccessory; - // tslint:disable-next-line:unified-signatures - new (displayName: string, uuid: string, subtype: number): PlatformAccessory; - // tslint:disable-next-line:ban-types - addService(service: HAPNodeJS.Service | Function): HAPNodeJS.Service; - addService(service: HAPNodeJS.Service, displayName: string): HAPNodeJS.Service; - // tslint:disable-next-line:unified-signatures - // addService(category: HAPNodeJS.Accessory.Categories, displayName: string): HAPNodeJS.Service; - removeService(service: HAPNodeJS.Service): HAPNodeJS.Service; - // tslint:disable-next-line:unified-signatures - removeService(service: HAPNodeJS.Service, displayName: string): HAPNodeJS.Service; - getService(service: HAPNodeJS.Service): HAPNodeJS.Service; - // tslint:disable-next-line:unified-signatures - getService(name: string): HAPNodeJS.Service; - updateReachability(reachable: boolean): void; - addBridgedAccessory(accessory: HAPNodeJS.Accessory, deferUpdate: boolean): HAPNodeJS.Accessory; - addBridgedAccessories(accessories: HAPNodeJS.Accessory[]): void; - removeBridgedAccessory(accessory: HAPNodeJS.Accessory, deferUpdate: boolean): void; - removeBridgedAccessories(accessories: HAPNodeJS.Accessory[]): void; - getCharacteristicByIID(iid: string): HAPNodeJS.Characteristic; - getBridgedAccessoryByAID(aid: string): HAPNodeJS.Accessory; - findCharacteristic(aid: string, iid: string): HAPNodeJS.Accessory; - configureCameraSource(cameraSource: HAPNodeJS.CameraSource): void; - toHAP(opt: any): JSON; - publish(info: HAPNodeJS.PublishInfo, allowInsecureRequest: boolean): void; - destroy(): void; - setupURI(): string; + // tslint:disable-next-line:no-misused-new + new (displayName: string, category: string): PlatformAccessory; + // tslint:disable-next-line:unified-signatures + new (displayName: string, uuid: string, subtype: number): PlatformAccessory; + // tslint:disable-next-line:ban-types + addService( + service: HAPNodeJS.Service | Function | HAPNodeJS.PredefinedService + ): HAPNodeJS.Service; + addService( + service: HAPNodeJS.Service | HAPNodeJS.PredefinedService, + displayName: string + ): HAPNodeJS.Service; + // tslint:disable-next-line:unified-signatures + // addService(category: HAPNodeJS.Accessory.Categories, displayName: string): HAPNodeJS.Service; + removeService(service: HAPNodeJS.Service): HAPNodeJS.Service; + // tslint:disable-next-line:unified-signatures + removeService( + service: HAPNodeJS.Service, + displayName: string + ): HAPNodeJS.Service; + getService( + service: HAPNodeJS.Service | HAPNodeJS.PredefinedService + ): HAPNodeJS.Service; + // tslint:disable-next-line:unified-signatures + getService(name: string): HAPNodeJS.Service; + updateReachability(reachable: boolean): void; + addBridgedAccessory( + accessory: HAPNodeJS.Accessory, + deferUpdate: boolean + ): HAPNodeJS.Accessory; + addBridgedAccessories(accessories: HAPNodeJS.Accessory[]): void; + removeBridgedAccessory( + accessory: HAPNodeJS.Accessory, + deferUpdate: boolean + ): void; + removeBridgedAccessories(accessories: HAPNodeJS.Accessory[]): void; + getCharacteristicByIID(iid: string): HAPNodeJS.Characteristic; + getBridgedAccessoryByAID(aid: string): HAPNodeJS.Accessory; + findCharacteristic(aid: string, iid: string): HAPNodeJS.Accessory; + configureCameraSource(cameraSource: HAPNodeJS.CameraSource): void; + toHAP(opt: any): JSON; + publish(info: HAPNodeJS.PublishInfo, allowInsecureRequest: boolean): void; + destroy(): void; + setupURI(): string; } export { PlatformAccessory }; diff --git a/src/homebridge.d.ts b/src/homebridge.d.ts index c118d9d..bb6b1e8 100644 --- a/src/homebridge.d.ts +++ b/src/homebridge.d.ts @@ -1,25 +1,41 @@ import { EventEmitter } from "events"; declare class API extends EventEmitter { - constructor(); + constructor(); - public accessory(name: any): any; + public accessory(name: any): any; - public platform(name: any): any; + public platform(name: any): any; - public publishCameraAccessories(pluginName: any, accessories: any): void; + public publishCameraAccessories(pluginName: any, accessories: any): void; - public registerAccessory( - pluginName: any, accessoryName: any, constructor: any, configurationRequestHandler: any): void; + public registerAccessory( + pluginName: any, + accessoryName: any, + constructor: any, + configurationRequestHandler: any + ): void; - public registerPlatform(pluginName: any, platformName: any, constructor: any, dynamic: any): void; + public registerPlatform( + pluginName: any, + platformName: any, + constructor: any, + dynamic: any + ): void; - public registerPlatformAccessories(pluginName: any, platformName: any, accessories: any): void; + public registerPlatformAccessories( + pluginName: any, + platformName: any, + accessories: any + ): void; - public unregisterPlatformAccessories(pluginName: any, platformName: any, accessories: any): void; - - public updatePlatformAccessories(accessories: any): void; + public unregisterPlatformAccessories( + pluginName: any, + platformName: any, + accessories: any + ): void; + public updatePlatformAccessories(accessories: any): void; } -export { API }; +export default API; diff --git a/src/test/test.spec.ts b/src/test/test.spec.ts deleted file mode 100644 index 423e70c..0000000 --- a/src/test/test.spec.ts +++ /dev/null @@ -1,271 +0,0 @@ -import * as waitUntil from "async-wait-until"; -import { expect } from "chai"; -import { EventEmitter } from "events"; -import * as fs from "fs"; -import * as hap from "hap-nodejs"; -import { API } from "homebridge"; -import * as ip from "ip"; -import "mocha"; -import * as mlog from "mocha-logger"; -import { Bloomsky } from "../Bloomsky"; -import FFMPEG from "../Ffmpeg"; -import { PlatformAccessory } from "../PlatformAccessory"; -import { StreamRequest } from "../StreamRequest"; - -const mockHomebridge = { - accessory: {} as PlatformAccessory, - api: new API(), - config: { - apiKey: "this-is-not-a-valid-api-key==", - // tslint:disable-next-line:max-line-length - apiUrl : "https://gist.githubusercontent.com/aphex3k/d7d9b6399fc8701a32ff4fb87bdd91dc/raw/40b030a8b6b70f95bae3b38106609dfda47c0c46/api-result.json", - debug : true, - useIntl : true, - }, - hap, - log(logText: string) { mlog.log(logText); }, - registerPlatform(a: any, b: any, c: any, d: boolean) { return d === true; }, - version: "2.2", -}; - -describe("Mock Homebridge", () => { - it("should provide mock functionality", () => { - - expect(mockHomebridge).to.not.be.equal(null); - expect(mockHomebridge).to.not.be.equal(undefined); - - expect(mockHomebridge.version).to.not.be.equal(null); - expect(mockHomebridge.version).to.not.be.equal(undefined); - - expect(mockHomebridge.hap).to.not.be.equal(null); - expect(mockHomebridge.hap).to.not.be.equal(undefined); - - expect(mockHomebridge.registerPlatform).to.not.be.equal(null); - expect(mockHomebridge.registerPlatform).to.not.be.equal(undefined); - - expect(mockHomebridge.log).to.not.be.equal(null); - expect(mockHomebridge.log).to.not.be.equal(undefined); - - expect(mockHomebridge.config).to.not.be.equal(null); - expect(mockHomebridge.config).to.not.be.equal(undefined); - - expect(mockHomebridge.config.apiUrl).to.not.be.equal(null); - expect(mockHomebridge.config.apiUrl).to.not.be.equal(undefined); - - expect(mockHomebridge.config.useIntl).to.be.equal(true); - - expect(mockHomebridge.hap.uuid).to.not.be.equal(null); - expect(mockHomebridge.hap.uuid).to.not.be.equal(undefined); - }); -}); - -describe("Bloomsky", () => { - - const mock = mockHomebridge; - - it("should have a mock instance", function() { - expect(mock).to.not.be.equal(null); - expect(mock).to.not.be.equal(undefined); - }); - - Bloomsky.Accessory = mock.accessory; - Bloomsky.Service = hap.Service; - Bloomsky.Characteristic = hap.Characteristic; - Bloomsky.UUIDGen = hap.uuid; - Bloomsky.Hap = hap; - - const bloomsky = new Bloomsky(mock.log, mock.config, mock.api); - - it("constructor should create a new instance", function() { - expect(bloomsky).to.not.be.equal(null); - expect(bloomsky).to.not.be.equal(undefined); - }); - - it("should know about no accessories before loading from api", function() { - expect(bloomsky.accessories.length).to.be.equal(0); - }); - - it("should calculate a matching UUID for input", function() { - expect(Bloomsky.UUIDGen).to.not.be.equal(null); - expect(Bloomsky.UUIDGen).to.not.be.equal(undefined); - - const uuid = Bloomsky.UUIDGen.generate("test"); // a94a8fe5-ccb1-49ba-a1c4-c0873d391e98 - expect(uuid).to.not.be.equal(null); - expect(uuid).to.be.equal("a94a8fe5-ccb1-49ba-a1c4-c0873d391e98"); - }); - - // it("should know about exactly one accessory after loading from api", async function() { - // this.timeout(10000); - - // // since we are not testing in a full blown homebridge environment, trigger - // // didFinishLaunching event manually - // (mock.api as EventEmitter).emit("didFinishLaunching"); - - // try { - // const result = await waitUntil(() => { - // return bloomsky.accessories.length > 0; - // }, 10000); // ms - - // expect(bloomsky.accessories.length).to.be.equal(1); - // } catch (error) { - // expect(bloomsky.accessories.length).to.be.equal(1); - // } - - // const accessory = bloomsky.accessories[0]; - - // expect(accessory.UUID).to.be.equal("8d993ccd-f628-4e26-a170-a949ee2a3870"); - // }); - - // it("should only know about exactly one camera accessory", function() { - // const accessory = bloomsky.accessories[0]; - - // expect(accessory.category).to.not.be.equal(HAPNodeJS.Accessory.Categories.OTHER); - // expect(accessory.category).to.be.equal(HAPNodeJS.Accessory.Categories.CAMERA); - // expect(accessory.reachable).to.be.equal(true); - // }); - - // it("should know about an accessory with services attached", function() { - // const accessory = bloomsky.accessories[0]; - - // const temp = accessory.getService(Bloomsky.Service.TemperatureSensor); - // expect(temp).to.not.be.equal(undefined); - // expect(temp.UUID).to.be.equal(Bloomsky.Service.TemperatureSensor.UUID); - - // const light = accessory.getService(Bloomsky.Service.LightSensor); - // expect(light).to.not.be.equal(undefined); - // expect(light.UUID).to.be.equal(Bloomsky.Service.LightSensor.UUID); - - // const humidity = accessory.getService(Bloomsky.Service.HumiditySensor); - // expect(humidity).to.not.be.equal(undefined); - // expect(humidity.UUID).to.be.equal(Bloomsky.Service.HumiditySensor.UUID); - - // const motion = accessory.getService(Bloomsky.Service.MotionSensor); - // expect(motion).to.not.be.equal(undefined); - // expect(motion.UUID).to.be.equal(Bloomsky.Service.MotionSensor.UUID); - - // const night = accessory.getService(Bloomsky.Service.OccupancySensor); - // expect(night).to.not.be.equal(undefined); - // expect(night.UUID).to.be.equal(Bloomsky.Service.OccupancySensor.UUID); - - // const info = accessory.getService(Bloomsky.Service.AccessoryInformation); - // expect(info).to.not.be.equal(undefined); - // expect(info.UUID).to.be.equal(Bloomsky.Service.AccessoryInformation.UUID); - - // const battery = accessory.getService(Bloomsky.Service.BatteryService); - // expect(battery).to.not.be.equal(undefined); - // expect(battery.UUID).to.be.equal(Bloomsky.Service.BatteryService.UUID); - // }); - - // it("should have an accessory with a camera stream controller configured", function() { - // const accessory = bloomsky.accessories[0]; - - // expect(accessory.cameraSource).to.not.be.equal(undefined); - - // const cameraSource = accessory.cameraSource as FFMPEG; - - // expect(cameraSource.createCameraControlService).to.not.be.equal(undefined); - // expect(cameraSource.handleCloseConnection).to.not.be.equal(undefined); - // expect(cameraSource.handleSnapshotRequest).to.not.be.equal(undefined); - // expect(cameraSource.handleStreamRequest).to.not.be.equal(undefined); - // expect(cameraSource.prepareStream).to.not.be.equal(undefined); - // }); - - // it("should have one accessory that can handle snapshot requests", async function() { - - // this.timeout(10000); - - // try { - // const result = await waitUntil(() => { - // const testFilename = "8d993ccd-f628-4e26-a170-a949ee2a3870.jpg"; - // return fs.existsSync(testFilename) && fs.statSync(testFilename).size > 0; - // }, 3000); // ms - // } catch (error) { - // mock.log("the camera image should have been cached by now..."); - // expect(error).to.be.equal(undefined); - // } - - // const accessory = bloomsky.accessories[0]; - // const cameraSource = accessory.cameraSource as FFMPEG; - - // expect(cameraSource.createCameraControlService).to.not.be.equal(undefined); - - // const createCameraControlService = function() { cameraSource.createCameraControlService(); }; - // expect(createCameraControlService).to.not.throw(); - - // const handleSnapshotRequest = function() { - // cameraSource.handleSnapshotRequest({ - // height: 720, - // width: 1280, - // }, - // function(error, buffer) { - // if (error !== undefined) { - // mock.log(error); - // } - // expect(error).to.be.equal(undefined); - // expect(buffer.length).to.be.greaterThan(0); - // }); - // }; - // expect(handleSnapshotRequest).to.not.throw(); - // }); - - // it("should have one accessory that can handle stream requests", async function() { - - // this.timeout(10000); - - // try { - // const result = await waitUntil(() => { - // const testFilename = "8d993ccd-f628-4e26-a170-a949ee2a3870.jpg"; - // return fs.existsSync(testFilename) && fs.statSync(testFilename).size > 0; - // }, 3000); // ms - // } catch (error) { - // mock.log("the camera image should have been cached by now..."); - // expect(error).to.be.equal(undefined); - // } - - // const accessory = bloomsky.accessories[0]; - // const cameraSource = accessory.cameraSource as FFMPEG; - // const testSessionId = Bloomsky.UUIDGen.generate("testSessionId"); - // const request: StreamRequest = { - // audio: undefined, - // sessionID: testSessionId, - // targetAddress: ip.address(), - // type: "start", - // video: { - // fps: 30, - // height: 640, - // max_bit_rate: 600, - // port: 12345, - // srtp_key: Uint8Array.from(new Set([1, 2, 3, 4])), - // srtp_salt: Uint8Array.from(new Set([1, 2, 3, 4])), - // ssrc: 123, - // width: 640, - // }, - // }; - - // const prepareStream = function() { - // cameraSource.prepareStream(request, function(response) { - // mock.log("Stream Prepared"); - // }); - // }; - // expect(prepareStream).to.not.throw(); - - // const handleStreamRequest = function() { - // cameraSource.handleStreamRequest(request); - // }; - // expect(handleStreamRequest).to.not.throw(); - - // mock.log("waiting for stream..."); - // try { - // const result = await waitUntil(() => { - // return false; - // }, 550); // ms - // } catch (error) { - // mock.log("closing stream..."); - // } - - // const handleCloseConnection = function() { - // cameraSource.handleCloseConnection(testSessionId); - // }; - // expect(handleCloseConnection).to.not.throw(); - // }); -}); diff --git a/test.spec.ts b/test.spec.ts new file mode 100644 index 0000000..d4e44f5 --- /dev/null +++ b/test.spec.ts @@ -0,0 +1,276 @@ +import "mocha"; + +import * as fs from "fs"; +import * as hap from "hap-nodejs"; +import * as ip from "ip"; +import * as mlog from "mocha-logger"; +import * as waitUntil from "async-wait-until"; + +import API from "./src/homebridge"; +import { Bloomsky } from "./src/Bloomsky"; +import { EventEmitter } from "events"; +import FFMPEG from "./src/Ffmpeg"; +import { PlatformAccessory } from "./src/PlatformAccessory"; +import { StreamRequest } from "./src/StreamRequest"; +import { expect } from "chai"; + +const mockHomebridge = { + accessory: {} as PlatformAccessory, + api: new API(), + config: { + apiKey: "this-is-not-a-valid-api-key==", + // tslint:disable-next-line:max-line-length + apiUrl: + "https://gist.githubusercontent.com/aphex3k/d7d9b6399fc8701a32ff4fb87bdd91dc/raw/40b030a8b6b70f95bae3b38106609dfda47c0c46/api-result.json", + debug: true, + useIntl: true, + }, + hap, + log(logText: string) { + mlog.log(logText); + }, + registerPlatform(a: any, b: any, c: any, d: boolean) { + return d === true; + }, + version: "2.2", +}; + +describe("Mock Homebridge", () => { + it("should provide mock functionality", () => { + expect(mockHomebridge).to.not.be.equal(null); + expect(mockHomebridge).to.not.be.equal(undefined); + + expect(mockHomebridge.version).to.not.be.equal(null); + expect(mockHomebridge.version).to.not.be.equal(undefined); + + expect(mockHomebridge.hap).to.not.be.equal(null); + expect(mockHomebridge.hap).to.not.be.equal(undefined); + + expect(mockHomebridge.registerPlatform).to.not.be.equal(null); + expect(mockHomebridge.registerPlatform).to.not.be.equal(undefined); + + expect(mockHomebridge.log).to.not.be.equal(null); + expect(mockHomebridge.log).to.not.be.equal(undefined); + + expect(mockHomebridge.config).to.not.be.equal(null); + expect(mockHomebridge.config).to.not.be.equal(undefined); + + expect(mockHomebridge.config.apiUrl).to.not.be.equal(null); + expect(mockHomebridge.config.apiUrl).to.not.be.equal(undefined); + + expect(mockHomebridge.config.useIntl).to.be.equal(true); + + expect(mockHomebridge.hap.uuid).to.not.be.equal(null); + expect(mockHomebridge.hap.uuid).to.not.be.equal(undefined); + }); +}); + +describe("Bloomsky", () => { + const mock = mockHomebridge; + + it("should have a mock instance", function () { + expect(mock).to.not.be.equal(null); + expect(mock).to.not.be.equal(undefined); + }); + + Bloomsky.Accessory = mock.accessory; + Bloomsky.Service = hap.Service; + Bloomsky.Characteristic = hap.Characteristic; + Bloomsky.UUIDGen = hap.uuid; + Bloomsky.Hap = hap; + + const bloomsky = new Bloomsky(mock.log, mock.config, mock.api); + + it("constructor should create a new instance", function () { + expect(bloomsky).to.not.be.equal(null); + expect(bloomsky).to.not.be.equal(undefined); + }); + + it("should know about no accessories before loading from api", function () { + expect(bloomsky.accessories.length).to.be.equal(0); + }); + + it("should calculate a matching UUID for input", function () { + expect(Bloomsky.UUIDGen).to.not.be.equal(null); + expect(Bloomsky.UUIDGen).to.not.be.equal(undefined); + + const uuid = Bloomsky.UUIDGen.generate("test"); // a94a8fe5-ccb1-49ba-a1c4-c0873d391e98 + expect(uuid).to.not.be.equal(null); + expect(uuid).to.be.equal("a94a8fe5-ccb1-49ba-a1c4-c0873d391e98"); + }); + + // it("should know about exactly one accessory after loading from api", async function() { + // this.timeout(10000); + + // // since we are not testing in a full blown homebridge environment, trigger + // // didFinishLaunching event manually + // (mock.api as EventEmitter).emit("didFinishLaunching"); + + // try { + // const result = await waitUntil(() => { + // return bloomsky.accessories.length > 0; + // }, 10000); // ms + + // expect(bloomsky.accessories.length).to.be.equal(1); + // } catch (error) { + // expect(bloomsky.accessories.length).to.be.equal(1); + // } + + // const accessory = bloomsky.accessories[0]; + + // expect(accessory.UUID).to.be.equal("8d993ccd-f628-4e26-a170-a949ee2a3870"); + // }); + + // it("should only know about exactly one camera accessory", function() { + // const accessory = bloomsky.accessories[0]; + + // expect(accessory.category).to.not.be.equal(HAPNodeJS.Accessory.Categories.OTHER); + // expect(accessory.category).to.be.equal(HAPNodeJS.Accessory.Categories.CAMERA); + // expect(accessory.reachable).to.be.equal(true); + // }); + + // it("should know about an accessory with services attached", function() { + // const accessory = bloomsky.accessories[0]; + + // const temp = accessory.getService(Bloomsky.Service.TemperatureSensor); + // expect(temp).to.not.be.equal(undefined); + // expect(temp.UUID).to.be.equal(Bloomsky.Service.TemperatureSensor.UUID); + + // const light = accessory.getService(Bloomsky.Service.LightSensor); + // expect(light).to.not.be.equal(undefined); + // expect(light.UUID).to.be.equal(Bloomsky.Service.LightSensor.UUID); + + // const humidity = accessory.getService(Bloomsky.Service.HumiditySensor); + // expect(humidity).to.not.be.equal(undefined); + // expect(humidity.UUID).to.be.equal(Bloomsky.Service.HumiditySensor.UUID); + + // const motion = accessory.getService(Bloomsky.Service.MotionSensor); + // expect(motion).to.not.be.equal(undefined); + // expect(motion.UUID).to.be.equal(Bloomsky.Service.MotionSensor.UUID); + + // const night = accessory.getService(Bloomsky.Service.OccupancySensor); + // expect(night).to.not.be.equal(undefined); + // expect(night.UUID).to.be.equal(Bloomsky.Service.OccupancySensor.UUID); + + // const info = accessory.getService(Bloomsky.Service.AccessoryInformation); + // expect(info).to.not.be.equal(undefined); + // expect(info.UUID).to.be.equal(Bloomsky.Service.AccessoryInformation.UUID); + + // const battery = accessory.getService(Bloomsky.Service.BatteryService); + // expect(battery).to.not.be.equal(undefined); + // expect(battery.UUID).to.be.equal(Bloomsky.Service.BatteryService.UUID); + // }); + + // it("should have an accessory with a camera stream controller configured", function() { + // const accessory = bloomsky.accessories[0]; + + // expect(accessory.cameraSource).to.not.be.equal(undefined); + + // const cameraSource = accessory.cameraSource as FFMPEG; + + // expect(cameraSource.createCameraControlService).to.not.be.equal(undefined); + // expect(cameraSource.handleCloseConnection).to.not.be.equal(undefined); + // expect(cameraSource.handleSnapshotRequest).to.not.be.equal(undefined); + // expect(cameraSource.handleStreamRequest).to.not.be.equal(undefined); + // expect(cameraSource.prepareStream).to.not.be.equal(undefined); + // }); + + // it("should have one accessory that can handle snapshot requests", async function() { + + // this.timeout(10000); + + // try { + // const result = await waitUntil(() => { + // const testFilename = "8d993ccd-f628-4e26-a170-a949ee2a3870.jpg"; + // return fs.existsSync(testFilename) && fs.statSync(testFilename).size > 0; + // }, 3000); // ms + // } catch (error) { + // mock.log("the camera image should have been cached by now..."); + // expect(error).to.be.equal(undefined); + // } + + // const accessory = bloomsky.accessories[0]; + // const cameraSource = accessory.cameraSource as FFMPEG; + + // expect(cameraSource.createCameraControlService).to.not.be.equal(undefined); + + // const createCameraControlService = function() { cameraSource.createCameraControlService(); }; + // expect(createCameraControlService).to.not.throw(); + + // const handleSnapshotRequest = function() { + // cameraSource.handleSnapshotRequest({ + // height: 720, + // width: 1280, + // }, + // function(error, buffer) { + // if (error !== undefined) { + // mock.log(error); + // } + // expect(error).to.be.equal(undefined); + // expect(buffer.length).to.be.greaterThan(0); + // }); + // }; + // expect(handleSnapshotRequest).to.not.throw(); + // }); + + // it("should have one accessory that can handle stream requests", async function() { + + // this.timeout(10000); + + // try { + // const result = await waitUntil(() => { + // const testFilename = "8d993ccd-f628-4e26-a170-a949ee2a3870.jpg"; + // return fs.existsSync(testFilename) && fs.statSync(testFilename).size > 0; + // }, 3000); // ms + // } catch (error) { + // mock.log("the camera image should have been cached by now..."); + // expect(error).to.be.equal(undefined); + // } + + // const accessory = bloomsky.accessories[0]; + // const cameraSource = accessory.cameraSource as FFMPEG; + // const testSessionId = Bloomsky.UUIDGen.generate("testSessionId"); + // const request: StreamRequest = { + // audio: undefined, + // sessionID: testSessionId, + // targetAddress: ip.address(), + // type: "start", + // video: { + // fps: 30, + // height: 640, + // max_bit_rate: 600, + // port: 12345, + // srtp_key: Uint8Array.from(new Set([1, 2, 3, 4])), + // srtp_salt: Uint8Array.from(new Set([1, 2, 3, 4])), + // ssrc: 123, + // width: 640, + // }, + // }; + + // const prepareStream = function() { + // cameraSource.prepareStream(request, function(response) { + // mock.log("Stream Prepared"); + // }); + // }; + // expect(prepareStream).to.not.throw(); + + // const handleStreamRequest = function() { + // cameraSource.handleStreamRequest(request); + // }; + // expect(handleStreamRequest).to.not.throw(); + + // mock.log("waiting for stream..."); + // try { + // const result = await waitUntil(() => { + // return false; + // }, 550); // ms + // } catch (error) { + // mock.log("closing stream..."); + // } + + // const handleCloseConnection = function() { + // cameraSource.handleCloseConnection(testSessionId); + // }; + // expect(handleCloseConnection).to.not.throw(); + // }); +}); diff --git a/tsconfig.json b/tsconfig.json index 72878f5..4546ef8 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -5,10 +5,10 @@ "strict": true, "noImplicitAny": false, "target": "ES5", - "lib": [ "es2017" ], + "lib": ["es2017"], "baseUrl": ".", "allowJs": false }, "include": ["src"], - "exclude": ["node_modules", "src/test", "test"], + "exclude": ["node_modules", "src/test", "test"] } diff --git a/yarn.lock b/yarn.lock index b8deb1f..55abfdf 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2,13 +2,34 @@ # yarn lockfile v1 +"@babel/code-frame@^7.0.0": + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.8.3.tgz#33e25903d7481181534e12ec0a25f16b6fcf419e" + integrity sha512-a9gxpmdXtZEInkCSHUJDLHZVBgb1QS0jhss4cPP93EW7s+uC5bikET2twEF3KV+7rDblJcmNvTR7VJejqd2C2g== + dependencies: + "@babel/highlight" "^7.8.3" + +"@babel/helper-validator-identifier@^7.9.0": + version "7.9.5" + resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.9.5.tgz#90977a8e6fbf6b431a7dc31752eee233bf052d80" + integrity sha512-/8arLKUFq882w4tWGj9JYzRpAlZgiWUJ+dtteNTDqrRBz9Iguck9Rn3ykuBDoUwh2TO4tSAJlrxDUOXWklJe4g== + +"@babel/highlight@^7.8.3": + version "7.9.0" + resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.9.0.tgz#4e9b45ccb82b79607271b2979ad82c7b68163079" + integrity sha512-lJZPilxX7Op3Nv/2cvFdnlepPXDxi29wxteT57Q965oc5R9v86ztx0jfxVrTcBk8C2kcPkkDa2Z4T3ZsPPVWsQ== + dependencies: + "@babel/helper-validator-identifier" "^7.9.0" + chalk "^2.0.0" + js-tokens "^4.0.0" + "@babel/polyfill@^7.0.0": - version "7.0.0" - resolved "https://registry.yarnpkg.com/@babel/polyfill/-/polyfill-7.0.0.tgz#c8ff65c9ec3be6a1ba10113ebd40e8750fb90bff" - integrity sha512-dnrMRkyyr74CRelJwvgnnSUDh2ge2NCTyHVwpOdvRMHtJUyxLtMAfhBN3s64pY41zdw0kgiLPh6S20eb1NcX6Q== + version "7.8.7" + resolved "https://registry.yarnpkg.com/@babel/polyfill/-/polyfill-7.8.7.tgz#151ec24c7135481336168c3bd8b8bf0cf91c032f" + integrity sha512-LeSfP9bNZH2UOZgcGcZ0PIHUt1ZuHub1L3CVmEyqLxCeDLm4C5Gi8jRH8ZX2PNpDhQCo0z6y/+DIs2JlliXW8w== dependencies: - core-js "^2.5.7" - regenerator-runtime "^0.11.1" + core-js "^2.6.5" + regenerator-runtime "^0.13.4" "@jimp/bmp@^0.5.4": version "0.5.4" @@ -263,9 +284,14 @@ core-js "^2.5.7" "@types/chai@^4.1.6": - version "4.1.7" - resolved "https://registry.yarnpkg.com/@types/chai/-/chai-4.1.7.tgz#1b8e33b61a8c09cbe1f85133071baa0dbf9fa71a" - integrity sha512-2Y8uPt0/jwjhQ6EiluT0XCri1Dbplr0ZxfFXUz+ye13gaqE8u5gL5ppao1JrUYr9cIip5S6MvQzBS7Kke7U9VA== + version "4.2.11" + resolved "https://registry.yarnpkg.com/@types/chai/-/chai-4.2.11.tgz#d3614d6c5f500142358e6ed24e1bf16657536c50" + integrity sha512-t7uW6eFafjO+qJ3BIV2gGUyZs27egcNRkUdalkud+Qa3+kg//f129iuOFivHDXQ+vnU3fDXuwgv0cqMCbcE8sw== + +"@types/color-name@^1.1.1": + version "1.1.1" + resolved "https://registry.yarnpkg.com/@types/color-name/-/color-name-1.1.1.tgz#1c1261bbeaa10a8055bbc5d8ab84b7b2afc846a0" + integrity sha512-rr+OQyAjxze7GgWrSaJwydHStIhHq2lvY3BOC2Mj7KnzI7XK0Uw1TOOdI9lDoajEbSWLiYgoo4f1R51erQfhPQ== "@types/debug@0.0.31": version "0.0.31" @@ -280,49 +306,75 @@ "@types/node" "*" "@types/mocha@^5.2.5": - version "5.2.5" - resolved "https://registry.yarnpkg.com/@types/mocha/-/mocha-5.2.5.tgz#8a4accfc403c124a0bafe8a9fc61a05ec1032073" - integrity sha512-lAVp+Kj54ui/vLUFxsJTMtWvZraZxum3w3Nwkble2dNuV5VnPA+Mi2oGX9XYJAaIvZi3tn3cbjS/qcJXRb6Bww== + version "5.2.7" + resolved "https://registry.yarnpkg.com/@types/mocha/-/mocha-5.2.7.tgz#315d570ccb56c53452ff8638738df60726d5b6ea" + integrity sha512-NYrtPht0wGzhwe9+/idPaBB+TqkY9AhTvOLMkThm0IoEfLaiVQZwBwyJ5puCkO3AUCWrmcoePjp2mbFocKy4SQ== + +"@types/node@*": + version "14.0.4" + resolved "https://registry.yarnpkg.com/@types/node/-/node-14.0.4.tgz#43a63fc5edce226bed106b31b875165256271107" + integrity sha512-k3NqigXWRzQZVBDS5D1U70A5E8Qk4Kh+Ha/x4M8Bt9pF0X05eggfnC9+63Usc9Q928hRUIpIhTQaXsZwZBl4Ew== -"@types/node@*", "@types/node@^10.12.0": - version "10.12.4" - resolved "https://registry.yarnpkg.com/@types/node/-/node-10.12.4.tgz#292a86dcfffac3a9f8073f6e29b71c05bbc65c0d" - integrity sha512-0aFZiYCvoxyKP/Mg6PvqBb2UtWGIPf63r6rOAvRBrgyJOfanbL60yUH2U4FSpg+Yn6FW+JVYWtzn6hLTy745Fg== +"@types/node@^10.12.0": + version "10.17.24" + resolved "https://registry.yarnpkg.com/@types/node/-/node-10.17.24.tgz#c57511e3a19c4b5e9692bb2995c40a3a52167944" + integrity sha512-5SCfvCxV74kzR3uWgTYiGxrd69TbT1I6+cMx1A5kEly/IVveJBimtAMlXiEyVFn5DvUFewQWxOOiJhlxeQwxgA== "@types/sharp@^0.21.0": - version "0.21.0" - resolved "https://registry.yarnpkg.com/@types/sharp/-/sharp-0.21.0.tgz#e364b345c70e5924a5c626aaccaa236e0cfc2455" - integrity sha512-BmsCha5/lx2Afz2zwNo9F2txlkZ9HQf49N94lzSFmj5Oc7NfRMZguwVIhytb65qdY2zNF+azovzDNso6JUZpOw== + version "0.21.3" + resolved "https://registry.yarnpkg.com/@types/sharp/-/sharp-0.21.3.tgz#82f89f99536557e397c0c46f5ea50dcc1529fe35" + integrity sha512-wgCw1OO/iQ3w13WVRhx1fHoo5NDHq+444wqTnKcAWA9YMj1a9stoLlfLjW1mJJkFG1aRjeKd9KYhiYOJ3H7qEg== dependencies: "@types/node" "*" acorn@^5.4.0: - version "5.7.3" - resolved "https://registry.yarnpkg.com/acorn/-/acorn-5.7.3.tgz#67aa231bf8812974b85235a96771eb6bd07ea279" - integrity sha512-T/zvzYRfbVojPWahDsE5evJdHb3oJoQfFbsrKM7w5Zcs++Tr257tia3BmMP8XYVjp1S9RZXQMh7gao96BlqZOw== + version "5.7.4" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-5.7.4.tgz#3e8d8a9947d0599a1796d10225d7432f4a4acf5e" + integrity sha512-1D++VG7BhrtvQpNbBzovKNc1FLGGEE/oGe7b9xJm/RFHMBeUaUGpluV9RLjZa47YFdPcDAenEYuq9pQPcMdLJg== -ansi-regex@^2.0.0: - version "2.1.1" - resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-2.1.1.tgz#c3b33ab5ee360d86e0e628f0468ae7ef27d654df" - integrity sha1-w7M6te42DYbg5ijwRorn7yfWVN8= +ansi-colors@3.2.3: + version "3.2.3" + resolved "https://registry.yarnpkg.com/ansi-colors/-/ansi-colors-3.2.3.tgz#57d35b8686e851e2cc04c403f1c00203976a1813" + integrity sha512-LEHHyuhlPY3TmuUYMh2oz89lTShfvgbmzaBcxve9t/9Wuy7Dwf4yoAKcND7KFT1HAQfqZ12qtc+DUrBMeKF9nw== + +ansi-regex@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-3.0.0.tgz#ed0317c322064f79466c02966bddb605ab37d998" + integrity sha1-7QMXwyIGT3lGbAKWa922Bas32Zg= -ansi-styles@^2.2.1: - version "2.2.1" - resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-2.2.1.tgz#b432dd3358b634cf75e1e4664368240533c1ddbe" - integrity sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4= +ansi-regex@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-4.1.0.tgz#8b9f8f08cf1acb843756a839ca8c7e3168c51997" + integrity sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg== -ansi-styles@^3.2.1: +ansi-styles@^3.2.0, ansi-styles@^3.2.1: version "3.2.1" resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-3.2.1.tgz#41fbb20243e50b12be0f04b8dedbf07520ce841d" integrity sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA== dependencies: color-convert "^1.9.0" +ansi-styles@^4.1.0: + version "4.2.1" + resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-4.2.1.tgz#90ae75c424d008d2624c5bf29ead3177ebfcf359" + integrity sha512-9VGjrMsG1vePxcSweQsN20KY/c4zN0h9fLjqAbwbPfahM3t+NL+M9HC8xeXG2I8pX5NoamTGNuomEUFI7fcUjA== + dependencies: + "@types/color-name" "^1.1.1" + color-convert "^2.0.1" + any-base@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/any-base/-/any-base-1.1.0.tgz#ae101a62bc08a597b4c9ab5b7089d456630549fe" integrity sha512-uMgjozySS8adZZYePpaWs8cxB9/kdzmpX6SgJZ+wbz1K5eYk5QMYDVJaZKhxyIHUdnnJkfR7SVgStgH7LkGUyg== +anymatch@~3.1.1: + version "3.1.1" + resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-3.1.1.tgz#c55ecf02185e2469259399310c173ce31233b142" + integrity sha512-mM8522psRCqzV+6LhomX5wgp25YVibjh8Wj23I5RPkPppSVSjyKD2A2mBJmWGa+KN7f2D6LNh9jkBCeyLktzjg== + dependencies: + normalize-path "^3.0.0" + picomatch "^2.0.4" + argparse@^1.0.7: version "1.0.10" resolved "https://registry.yarnpkg.com/argparse/-/argparse-1.0.10.tgz#bcd6791ea5ae09725e17e5ad988134cd40b3d911" @@ -330,10 +382,15 @@ argparse@^1.0.7: dependencies: sprintf-js "~1.0.2" -array-flatten@^2.1.0: - version "2.1.1" - resolved "https://registry.yarnpkg.com/array-flatten/-/array-flatten-2.1.1.tgz#426bb9da84090c1838d812c8150af20a8331e296" - integrity sha1-Qmu52oQJDBg42BLIFQryCoMx4pY= +array-filter@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/array-filter/-/array-filter-1.0.0.tgz#baf79e62e6ef4c2a4c0b831232daffec251f9d83" + integrity sha1-uveeYubvTCpMC4MSMtr/7CUfnYM= + +array-flatten@^2.1.2: + version "2.1.2" + resolved "https://registry.yarnpkg.com/array-flatten/-/array-flatten-2.1.2.tgz#24ef80a28c1a893617e2149b0c6d0d788293b099" + integrity sha512-hNfzcOV8W4NdualtqBFPyVO+54DSJuZGY9qT4pRroB6S9e3iiido2ISIC5h9R2sPJ8H3FHCIiEnsv1lPXO3KtQ== arrify@^1.0.0: version "1.0.1" @@ -350,14 +407,12 @@ async-wait-until@^1.2.4: resolved "https://registry.yarnpkg.com/async-wait-until/-/async-wait-until-1.2.4.tgz#55a6c29145b8037742a629b0ae0b69b5e2988404" integrity sha512-H7ZR3cu1THxrJiDgevu+PgbyT0o5P/9nsCZj70ckruJCMWt/UOQmGo65wKWvEQN69MJk140x5/Z01ZQjzfwyOw== -babel-code-frame@^6.22.0: - version "6.26.0" - resolved "https://registry.yarnpkg.com/babel-code-frame/-/babel-code-frame-6.26.0.tgz#63fd43f7dc1e3bb7ce35947db8fe369a3f58c74b" - integrity sha1-Y/1D99weO7fONZR9uP42mj9Yx0s= +available-typed-arrays@^1.0.0, available-typed-arrays@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/available-typed-arrays/-/available-typed-arrays-1.0.2.tgz#6b098ca9d8039079ee3f77f7b783c4480ba513f5" + integrity sha512-XWX3OX8Onv97LMk/ftVyBibpGwY5a8SmuxZPzeOxqmuEqUCOM9ZE+uIaD1VNJ5QnvU2UQusvmKbuM1FR8QWGfQ== dependencies: - chalk "^1.1.3" - esutils "^2.0.2" - js-tokens "^3.0.2" + array-filter "^1.0.0" balanced-match@^1.0.0: version "1.0.0" @@ -365,30 +420,29 @@ balanced-match@^1.0.0: integrity sha1-ibTRmasr7kneFk6gK4nORi1xt2c= base64-js@^1.0.2: - version "1.3.0" - resolved "https://registry.yarnpkg.com/base64-js/-/base64-js-1.3.0.tgz#cab1e6118f051095e58b5281aea8c1cd22bfc0e3" - integrity sha512-ccav/yGvoa80BQDljCxsmmQ3Xvx60/UpBIij5QN21W3wBi/hhIC9OoO+KLpu9IJTS9j4DRVJ3aDDF9cMSoa2lw== + version "1.3.1" + resolved "https://registry.yarnpkg.com/base64-js/-/base64-js-1.3.1.tgz#58ece8cb75dd07e71ed08c736abc5fac4dbf8df1" + integrity sha512-mLQ4i2QO1ytvGWFWmcngKO//JXAQueZvwEKtjgQFM4jIK0kU+ytMfplL8j+n5mspOfjHwoAg+9yhb7BwAHm36g== -bindings@^1.2.1, bindings@~1.3.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/bindings/-/bindings-1.3.0.tgz#b346f6ecf6a95f5a815c5839fc7cdb22502f1ed7" - integrity sha512-DpLh5EzMR2kzvX1KIlVC0VkC3iZtHKTgdtZ0a3pglBZdaQFjt5S9g9xd1lE+YvXyfd6mtCeRnrUfOLYiTMlNSw== +binary-extensions@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-2.0.0.tgz#23c0df14f6a88077f5f986c0d167ec03c3d5537c" + integrity sha512-Phlt0plgpIIBOGTT/ehfFnbNlfsDEiqmzE2KRXoX1bLIlir4X/MR+zSyBEkL05ffWgnRSf/DXv+WrUAVr93/ow== bmp-js@^0.1.0: version "0.1.0" resolved "https://registry.yarnpkg.com/bmp-js/-/bmp-js-0.1.0.tgz#e05a63f796a6c1ff25f4771ec7adadc148c07233" integrity sha1-4Fpj95amwf8l9Hcex62twUjAcjM= -bonjour-hap@^3.5.1: - version "3.5.1" - resolved "https://registry.yarnpkg.com/bonjour-hap/-/bonjour-hap-3.5.1.tgz#2519201bd0b302e0d399f9d6619015d7d6d6443e" - integrity sha512-JqJXX5+i1NRGt8GyIPb+nBNjwrHbWe5Pb+HSuRMG/B62tPRHQ4Jyv3yX7hy1pHfRrV2OhnWpd+ljBtMb24R5rA== +bonjour-hap@^3.5.1, bonjour-hap@~3.5.8: + version "3.5.10" + resolved "https://registry.yarnpkg.com/bonjour-hap/-/bonjour-hap-3.5.10.tgz#a9cd35dabf8eb75e9bfc54871d19d0c4ee41ed4e" + integrity sha512-vaqa4uUST8K5rj9QGe6GaSJ+6rQ24KzgkjdyZvoTpbKBti5xL/m8H9Dp9VmPdo434OAetqU5PKAn5izucrKEBA== dependencies: - array-flatten "^2.1.0" - deep-equal "^1.0.1" - dns-equal "^1.0.0" - dns-txt "^2.0.2" - multicast-dns "^6.0.1" + array-flatten "^2.1.2" + deep-equal "^2.0.2" + ip "^1.1.5" + multicast-dns "^7.2.2" multicast-dns-service-types "^1.1.0" brace-expansion@^1.1.7: @@ -399,6 +453,13 @@ brace-expansion@^1.1.7: balanced-match "^1.0.0" concat-map "0.0.1" +braces@~3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/braces/-/braces-3.0.2.tgz#3454e1a462ee8d599e236df336cd9ea4f8afe107" + integrity sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A== + dependencies: + fill-range "^7.0.1" + browser-stdout@1.3.1: version "1.3.1" resolved "https://registry.yarnpkg.com/browser-stdout/-/browser-stdout-1.3.1.tgz#baa559ee14ced73452229bad7326467c61fabd60" @@ -414,20 +475,15 @@ buffer-from@^1.0.0, buffer-from@^1.1.0: resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.1.1.tgz#32713bc028f75c02fdb710d7c7bcec1f2c6070ef" integrity sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A== -buffer-indexof@^1.0.0: - version "1.1.1" - resolved "https://registry.yarnpkg.com/buffer-indexof/-/buffer-indexof-1.1.1.tgz#52fabcc6a606d1a00302802648ef68f639da268c" - integrity sha512-4/rOEg86jivtPTeOUUT61jJO1Ya1TrR/OkqCSZDyq84WJh3LuuiphBYJN+fm5xufIk4XAFcEwte/8WzC8If/1g== - buffer-shims@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/buffer-shims/-/buffer-shims-1.0.0.tgz#9978ce317388c649ad8793028c3477ef044a8b51" integrity sha1-mXjOMXOIxkmth5MCjDR37wRKi1E= buffer@^5.2.0: - version "5.2.1" - resolved "https://registry.yarnpkg.com/buffer/-/buffer-5.2.1.tgz#dd57fa0f109ac59c602479044dca7b8b3d0b71d6" - integrity sha512-c+Ko0loDaFfuPWiL02ls9Xd3GO3cPVmUobQ6t3rXNUk304u6hGq+8N/kFi+QEIKhzK3uwolVhLzszmfLmMLnqg== + version "5.6.0" + resolved "https://registry.yarnpkg.com/buffer/-/buffer-5.6.0.tgz#a31749dc7d81d84db08abf937b6b8c4033f62786" + integrity sha512-/gDYp/UtU0eA1ys8bOs9J6a+E/KWIY+DZ+Q2WESNUA0jFRsJOc0SNUO6xJ5SGA1xueg3NL65W6s+NY5l9cunuw== dependencies: base64-js "^1.0.2" ieee754 "^1.1.4" @@ -437,7 +493,12 @@ builtin-modules@^1.1.1: resolved "https://registry.yarnpkg.com/builtin-modules/-/builtin-modules-1.1.1.tgz#270f076c5a72c02f5b65a47df94c5fe3a278892f" integrity sha1-Jw8HbFpywC9bZaR9+Uxf46J4iS8= -chai@^4.1.2, chai@^4.2.0: +camelcase@^5.0.0: + version "5.3.1" + resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-5.3.1.tgz#e3c9b31569e106811df242f715725a1f4c494320" + integrity sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg== + +chai@^4.2.0: version "4.2.0" resolved "https://registry.yarnpkg.com/chai/-/chai-4.2.0.tgz#760aa72cf20e3795e84b12877ce0e83737aa29e5" integrity sha512-XQU3bhBukrOsQCuwZndwGcCVQHyZi53fQ6Ys1Fym7E4olpIqqZZhhoFJoaKVvV17lWQoXYwgWN2nF5crA8J2jw== @@ -449,26 +510,23 @@ chai@^4.1.2, chai@^4.2.0: pathval "^1.1.0" type-detect "^4.0.5" -chalk@^1.1.1, chalk@^1.1.3: - version "1.1.3" - resolved "https://registry.yarnpkg.com/chalk/-/chalk-1.1.3.tgz#a8115c55e4a702fe4d150abd3872822a7e09fc98" - integrity sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg= - dependencies: - ansi-styles "^2.2.1" - escape-string-regexp "^1.0.2" - has-ansi "^2.0.0" - strip-ansi "^3.0.0" - supports-color "^2.0.0" - -chalk@^2.3.0: - version "2.4.1" - resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.1.tgz#18c49ab16a037b6eb0152cc83e3471338215b66e" - integrity sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ== +chalk@^2.0.0, chalk@^2.3.0, chalk@^2.4.2: + version "2.4.2" + resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.2.tgz#cd42541677a54333cf541a49108c1432b44c9424" + integrity sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ== dependencies: ansi-styles "^3.2.1" escape-string-regexp "^1.0.5" supports-color "^5.3.0" +chalk@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/chalk/-/chalk-3.0.0.tgz#3f73c2bf526591f574cc492c51e2456349f844e4" + integrity sha512-4D3B6Wf41KOYRFdszmDqMCGq5VV/uMAB273JILmO+3jAlh8X4qDtdtgCR3fxtbLEMzSx22QdhnDcJvu2u1fVwg== + dependencies: + ansi-styles "^4.1.0" + supports-color "^7.1.0" + check-error@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/check-error/-/check-error-1.0.2.tgz#574d312edd88bb5dd8912e9286dd6c0aed4aac82" @@ -479,6 +537,30 @@ child_process@^1.0.2: resolved "https://registry.yarnpkg.com/child_process/-/child_process-1.0.2.tgz#b1f7e7fc73d25e7fd1d455adc94e143830182b5a" integrity sha1-sffn/HPSXn/R1FWtyU4UODAYK1o= +chokidar@3.3.0: + version "3.3.0" + resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-3.3.0.tgz#12c0714668c55800f659e262d4962a97faf554a6" + integrity sha512-dGmKLDdT3Gdl7fBUe8XK+gAtGmzy5Fn0XkkWQuYxGIgWVPPse2CxFA5mtrlD0TOHaHjEUqkWNyP1XdHoJES/4A== + dependencies: + anymatch "~3.1.1" + braces "~3.0.2" + glob-parent "~5.1.0" + is-binary-path "~2.1.0" + is-glob "~4.0.1" + normalize-path "~3.0.0" + readdirp "~3.2.0" + optionalDependencies: + fsevents "~2.1.1" + +cliui@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/cliui/-/cliui-5.0.0.tgz#deefcfdb2e800784aa34f46fa08e06851c7bbbc5" + integrity sha512-PYeGSEmmHM6zvoef2w8TPzlrnNpXIjTipYK780YswmIP9vjxmd6Y2a3CB2Ks6/AU8NHjZugXvo8w3oWM2qnwXA== + dependencies: + string-width "^3.1.0" + strip-ansi "^5.2.0" + wrap-ansi "^5.1.0" + color-convert@^1.9.0: version "1.9.3" resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-1.9.3.tgz#bb71850690e1f136567de629d2d5471deda4c1e8" @@ -486,51 +568,53 @@ color-convert@^1.9.0: dependencies: color-name "1.1.3" +color-convert@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-2.0.1.tgz#72d3a68d598c9bdb3af2ad1e84f21d896abd4de3" + integrity sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ== + dependencies: + color-name "~1.1.4" + color-name@1.1.3: version "1.1.3" resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.3.tgz#a7d0558bd89c42f795dd42328f740831ca53bc25" integrity sha1-p9BVi9icQveV3UIyj3QIMcpTvCU= +color-name@~1.1.4: + version "1.1.4" + resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.4.tgz#c2a09a87acbde69543de6f63fa3995c826c536a2" + integrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA== + commander@2.15.1: version "2.15.1" resolved "https://registry.yarnpkg.com/commander/-/commander-2.15.1.tgz#df46e867d0fc2aec66a34662b406a9ccafff5b0f" integrity sha512-VlfT9F3V0v+jr4yxPc5gg9s62/fIVWsd2Bk2iD435um1NlGMYdVCq+MjcXnhYq2icNOizHr1kK+5TI6H0Hy0ag== -commander@2.8.1: - version "2.8.1" - resolved "https://registry.yarnpkg.com/commander/-/commander-2.8.1.tgz#06be367febfda0c330aa1e2a072d3dc9762425d4" - integrity sha1-Br42f+v9oMMwqh4qBy09yXYkJdQ= - dependencies: - graceful-readlink ">= 1.0.0" +commander@5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/commander/-/commander-5.0.0.tgz#dbf1909b49e5044f8fdaf0adc809f0c0722bdfd0" + integrity sha512-JrDGPAKjMGSP1G0DUoaceEJ3DZgAfr/q6X7FVk4+U5KxUSKviYGM2k6zWkfyyBHy5rAtzgYJFa1ro2O9PtoxwQ== commander@^2.12.1: - version "2.19.0" - resolved "https://registry.yarnpkg.com/commander/-/commander-2.19.0.tgz#f6198aa84e5b83c46054b94ddedbfed5ee9ff12a" - integrity sha512-6tvAOO+D6OENvRAh524Dh9jcfKTYDQAqvqezbCW82xj5X0pSrcpxtvRKHLG0yBY6SD7PSDrJaj+0AiOcKVd1Xg== + version "2.20.3" + resolved "https://registry.yarnpkg.com/commander/-/commander-2.20.3.tgz#fd485e84c03eb4881c20722ba48035e8531aeb33" + integrity sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ== concat-map@0.0.1: version "0.0.1" resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" integrity sha1-2Klr13/Wjfd5OnMDajug1UBdR3s= -core-js@^2.5.7: - version "2.5.7" - resolved "https://registry.yarnpkg.com/core-js/-/core-js-2.5.7.tgz#f972608ff0cead68b841a16a932d0b183791814e" - integrity sha512-RszJCAxg/PP6uzXVXL6BsxSXx/B05oJAQ2vkJRjyjrEcNVycaqOmNb5OTxZPE3xa5gwZduqza6L9JOCenh/Ecw== +core-js@^2.5.7, core-js@^2.6.5: + version "2.6.11" + resolved "https://registry.yarnpkg.com/core-js/-/core-js-2.6.11.tgz#38831469f9922bded8ee21c9dc46985e0399308c" + integrity sha512-5wjnpaT/3dV+XB4borEsnAYQchn00XSgTAWKDkEqv+K8KevjbzmofK6hfJ9TZIlpj2N0xQpazy7PiRQiWHqzWg== core-util-is@~1.0.0: version "1.0.2" resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7" integrity sha1-tf1UIgqivFq1eqtxQMlAdUUDwac= -curve25519-n@^1.2.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/curve25519-n/-/curve25519-n-1.4.0.tgz#b1b419bdb5885f274efe87b2534713332b644172" - integrity sha512-ihQ3M/Aj9PVbsNwuul1/PNnyFurl9ejZGJWw/361+SS9hEFLiM2ttde+BXiu3ooc4AQiIx2y1gEcGLTpLRAjKg== - dependencies: - bindings "~1.3.0" - nan "^2.10.0" - debug@3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/debug/-/debug-3.1.0.tgz#5bb5a0672628b64149566ba16819e61518c67261" @@ -538,6 +622,13 @@ debug@3.1.0: dependencies: ms "2.0.0" +debug@3.2.6: + version "3.2.6" + resolved "https://registry.yarnpkg.com/debug/-/debug-3.2.6.tgz#e83d17de16d8a7efb7717edbe5fb10135eee629b" + integrity sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ== + dependencies: + ms "^2.1.1" + debug@^2.2.0: version "2.6.9" resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f" @@ -545,13 +636,23 @@ debug@^2.2.0: dependencies: ms "2.0.0" -debug@^3.1.0: - version "3.2.6" - resolved "https://registry.yarnpkg.com/debug/-/debug-3.2.6.tgz#e83d17de16d8a7efb7717edbe5fb10135eee629b" - integrity sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ== +debug@^4.1.1: + version "4.1.1" + resolved "https://registry.yarnpkg.com/debug/-/debug-4.1.1.tgz#3b72260255109c6b589cee050f1d516139664791" + integrity sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw== dependencies: ms "^2.1.1" +decamelize@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-1.2.0.tgz#f6534d15148269b20352e7bee26f501f9a191290" + integrity sha1-9lNNFRSCabIDUue+4m9QH5oZEpA= + +decimal.js@^10.2.0: + version "10.2.0" + resolved "https://registry.yarnpkg.com/decimal.js/-/decimal.js-10.2.0.tgz#39466113a9e036111d02f82489b5fd6b0b5ed231" + integrity sha512-vDPw+rDgn3bZe1+F/pyEwb1oMG2XTlRVgAa6B4KccTEpYgF8w6eQllVbQcfIJnZyvzFtFpxnpGtx8dd7DJp/Rw== + decimal.js@^7.2.3: version "7.5.1" resolved "https://registry.yarnpkg.com/decimal.js/-/decimal.js-7.5.1.tgz#cf4cf5eeb9faa24fc4ee6af361faebb7bfcca2ce" @@ -564,48 +665,60 @@ deep-eql@^3.0.1: dependencies: type-detect "^4.0.0" -deep-equal@^1.0.0, deep-equal@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/deep-equal/-/deep-equal-1.0.1.tgz#f5d260292b660e084eff4cdbc9f08ad3247448b5" - integrity sha1-9dJgKStmDghO/0zbyfCK0yR0SLU= +deep-equal@^2.0.2: + version "2.0.3" + resolved "https://registry.yarnpkg.com/deep-equal/-/deep-equal-2.0.3.tgz#cad1c15277ad78a5c01c49c2dee0f54de8a6a7b0" + integrity sha512-Spqdl4H+ky45I9ByyJtXteOm9CaIrPmnIPmOhrkKGNYWeDgCvJ8jNYVCTjChxW4FqGuZnLHADc8EKRMX6+CgvA== + dependencies: + es-abstract "^1.17.5" + es-get-iterator "^1.1.0" + is-arguments "^1.0.4" + is-date-object "^1.0.2" + is-regex "^1.0.5" + isarray "^2.0.5" + object-is "^1.1.2" + object-keys "^1.1.1" + object.assign "^4.1.0" + regexp.prototype.flags "^1.3.0" + side-channel "^1.0.2" + which-boxed-primitive "^1.0.1" + which-collection "^1.0.1" + which-typed-array "^1.1.2" + +define-properties@^1.1.2, define-properties@^1.1.3: + version "1.1.3" + resolved "https://registry.yarnpkg.com/define-properties/-/define-properties-1.1.3.tgz#cf88da6cbee26fe6db7094f61d870cbd84cee9f1" + integrity sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ== + dependencies: + object-keys "^1.0.12" -diff@3.5.0, diff@^3.1.0, diff@^3.2.0: +diff@3.5.0, diff@^3.1.0: version "3.5.0" resolved "https://registry.yarnpkg.com/diff/-/diff-3.5.0.tgz#800c0dd1e0a8bfbc95835c202ad220fe317e5a12" integrity sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA== -dns-equal@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/dns-equal/-/dns-equal-1.0.0.tgz#b39e7f1da6eb0a75ba9c17324b34753c47e0654d" - integrity sha1-s55/HabrCnW6nBcySzR1PEfgZU0= - -dns-packet@^1.3.1: - version "1.3.1" - resolved "https://registry.yarnpkg.com/dns-packet/-/dns-packet-1.3.1.tgz#12aa426981075be500b910eedcd0b47dd7deda5a" - integrity sha512-0UxfQkMhYAUaZI+xrNZOz/as5KgDU0M/fQ9b6SpkyLbk3GEswDi6PADJVaYJradtRVsRIlF1zLyOodbcTCDzUg== - dependencies: - ip "^1.1.0" - safe-buffer "^5.0.1" +diff@^4.0.1: + version "4.0.2" + resolved "https://registry.yarnpkg.com/diff/-/diff-4.0.2.tgz#60f3aecb89d5fae520c11aa19efc2bb982aade7d" + integrity sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A== -dns-txt@^2.0.2: - version "2.0.2" - resolved "https://registry.yarnpkg.com/dns-txt/-/dns-txt-2.0.2.tgz#b91d806f5d27188e4ab3e7d107d881a1cc4642b6" - integrity sha1-uR2Ab10nGI5Ks+fRB9iBocxGQrY= +dns-packet@^4.0.0: + version "4.2.0" + resolved "https://registry.yarnpkg.com/dns-packet/-/dns-packet-4.2.0.tgz#3fd6f5ff5a4ec3194ed0b15312693ffe8776b343" + integrity sha512-bn1AKpfkFbm0MIioOMHZ5qJzl2uypdBwI4nYNsqvhjsegBhcKJUlCrMPWLx6JEezRjxZmxhtIz/FkBEur2l8Cw== dependencies: - buffer-indexof "^1.0.0" + ip "^1.1.5" + safe-buffer "^5.1.1" dom-walk@^0.1.0: - version "0.1.1" - resolved "https://registry.yarnpkg.com/dom-walk/-/dom-walk-0.1.1.tgz#672226dc74c8f799ad35307df936aba11acd6018" - integrity sha1-ZyIm3HTI95mtNTB9+TaroRrNYBg= + version "0.1.2" + resolved "https://registry.yarnpkg.com/dom-walk/-/dom-walk-0.1.2.tgz#0c548bef048f4d1f2a97249002236060daa3fd84" + integrity sha512-6QvTW9mrGeIegrFXdtQi9pk7O/nSK6lSdXW2eqUspN5LWD7UTji2Fqw5V2YLjBpHEoU9Xl/eUWNpDeZvoyOv2w== -ed25519-hap@^0.0.5: - version "0.0.5" - resolved "https://registry.yarnpkg.com/ed25519-hap/-/ed25519-hap-0.0.5.tgz#90325fd3d489efcc6a81a7948758a1ca644af0d8" - integrity sha512-6RPUW9BdnUjYz5lGjRfM0sOMa8d43sjWFFchGJhGKkevoZvB0oVp1ES9oDUK+QJoJO8EoJlgawNsxG2yvlMbYg== - dependencies: - bindings "^1.2.1" - nan "^2.10.0" +emoji-regex@^7.0.1: + version "7.0.3" + resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-7.0.3.tgz#933a04052860c85e83c122479c4748a8e4c72156" + integrity sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA== enhanced-resolve@^2.2.2: version "2.3.0" @@ -624,7 +737,46 @@ errno@^0.1.3: dependencies: prr "~1.0.1" -escape-string-regexp@1.0.5, escape-string-regexp@^1.0.2, escape-string-regexp@^1.0.5: +es-abstract@^1.17.0-next.1, es-abstract@^1.17.4, es-abstract@^1.17.5: + version "1.17.5" + resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.17.5.tgz#d8c9d1d66c8981fb9200e2251d799eee92774ae9" + integrity sha512-BR9auzDbySxOcfog0tLECW8l28eRGpDpU3Dm3Hp4q/N+VtLTmyj4EUN088XZWQDW/hzj6sYRDXeOFsaAODKvpg== + dependencies: + es-to-primitive "^1.2.1" + function-bind "^1.1.1" + has "^1.0.3" + has-symbols "^1.0.1" + is-callable "^1.1.5" + is-regex "^1.0.5" + object-inspect "^1.7.0" + object-keys "^1.1.1" + object.assign "^4.1.0" + string.prototype.trimleft "^2.1.1" + string.prototype.trimright "^2.1.1" + +es-get-iterator@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/es-get-iterator/-/es-get-iterator-1.1.0.tgz#bb98ad9d6d63b31aacdc8f89d5d0ee57bcb5b4c8" + integrity sha512-UfrmHuWQlNMTs35e1ypnvikg6jCz3SK8v8ImvmDsh36fCVUR1MqoFDiyn0/k52C8NqO3YsO8Oe0azeesNuqSsQ== + dependencies: + es-abstract "^1.17.4" + has-symbols "^1.0.1" + is-arguments "^1.0.4" + is-map "^2.0.1" + is-set "^2.0.1" + is-string "^1.0.5" + isarray "^2.0.5" + +es-to-primitive@^1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/es-to-primitive/-/es-to-primitive-1.2.1.tgz#e55cd4c9cdc188bcefb03b366c736323fc5c898a" + integrity sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA== + dependencies: + is-callable "^1.1.4" + is-date-object "^1.0.1" + is-symbol "^1.0.2" + +escape-string-regexp@1.0.5, escape-string-regexp@^1.0.5: version "1.0.5" resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" integrity sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ= @@ -634,43 +786,89 @@ esprima@^4.0.0: resolved "https://registry.yarnpkg.com/esprima/-/esprima-4.0.1.tgz#13b04cdb3e6c5d19df91ab6987a8695619b0aa71" integrity sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A== -esutils@^2.0.2: - version "2.0.2" - resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.2.tgz#0abf4f1caa5bcb1f7a9d8acc6dea4faaa04bac9b" - integrity sha1-Cr9PHKpbyx96nYrMbepPqqBLrJs= - exif-parser@^0.1.12: version "0.1.12" resolved "https://registry.yarnpkg.com/exif-parser/-/exif-parser-0.1.12.tgz#58a9d2d72c02c1f6f02a0ef4a9166272b7760922" integrity sha1-WKnS1ywCwfbwKg70qRZicrd2CSI= +fast-srp-hap@2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/fast-srp-hap/-/fast-srp-hap-2.0.1.tgz#00cbd4f92cbd031ca6437b64ae81bab6d3aeb4f8" + integrity sha512-dClwnyfRd3BZxu3KAdhvAayozq7fLazXGlDc4HAHJV1M+olqGKAT52pygXQu5UiDSHxz/WB3KRvsojqQ5zmXOA== + fast-srp-hap@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/fast-srp-hap/-/fast-srp-hap-1.0.1.tgz#377124d196bc6a5157aae5b37bf5fa35bb4ad2d9" - integrity sha1-N3Ek0Za8alFXquWze/X6NbtK0tk= + version "1.2.0" + resolved "https://registry.yarnpkg.com/fast-srp-hap/-/fast-srp-hap-1.2.0.tgz#99f558c20c171786966ce70d21f3d4004b484928" + integrity sha512-WgC3eJEaQo94pq6Ua+l4zdceMLkDXvhZ4OpyQsFdlTFDH7GwJ6fikr+C/mkKzaIxbnODkqee8cOd0KjuW2ebKQ== file-type@^9.0.0: version "9.0.0" resolved "https://registry.yarnpkg.com/file-type/-/file-type-9.0.0.tgz#a68d5ad07f486414dfb2c8866f73161946714a18" integrity sha512-Qe/5NJrgIOlwijpq3B7BEpzPFcgzggOTagZmkXQY4LA6bsXKTUstK7Wp12lEJ/mLKTpvIZxmIuRcLYWT6ov9lw== -for-each@^0.3.2: - version "0.3.3" - resolved "https://registry.yarnpkg.com/for-each/-/for-each-0.3.3.tgz#69b447e88a0a5d32c3e7084f3f1710034b21376e" - integrity sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw== +fill-range@^7.0.1: + version "7.0.1" + resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-7.0.1.tgz#1919a6a7c75fe38b2c7c77e5198535da9acdda40" + integrity sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ== + dependencies: + to-regex-range "^5.0.1" + +find-up@3.0.0, find-up@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/find-up/-/find-up-3.0.0.tgz#49169f1d7993430646da61ecc5ae355c21c97b73" + integrity sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg== dependencies: - is-callable "^1.1.3" + locate-path "^3.0.0" + +flat@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/flat/-/flat-4.1.0.tgz#090bec8b05e39cba309747f1d588f04dbaf98db2" + integrity sha512-Px/TiLIznH7gEDlPXcUD4KnBusa6kR6ayRUVcnEAbreRIuhkqow/mun59BuRXwoYk7ZQOLW1ZM05ilIvK38hFw== + dependencies: + is-buffer "~2.0.3" + +foreach@^2.0.5: + version "2.0.5" + resolved "https://registry.yarnpkg.com/foreach/-/foreach-2.0.5.tgz#0bee005018aeb260d0a3af3ae658dd0136ec1b99" + integrity sha1-C+4AUBiusmDQo6865ljdATbsG5k= fs.realpath@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" integrity sha1-FQStJSMVjKpA20onh8sBQRmU6k8= +fsevents@~2.1.1: + version "2.1.3" + resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.1.3.tgz#fb738703ae8d2f9fe900c33836ddebee8b97f23e" + integrity sha512-Auw9a4AxqWpa9GUfj370BMPzzyncfBABW8Mab7BGWBYDj4Isgq+cDKtx0i6u9jcX9pQDnswsaaOTgTmA5pEjuQ== + +function-bind@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.1.tgz#a56899d3ea3c9bab874bb9773b7c5ede92f4895d" + integrity sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A== + +futoin-hkdf@~1.3.2: + version "1.3.2" + resolved "https://registry.yarnpkg.com/futoin-hkdf/-/futoin-hkdf-1.3.2.tgz#cd9a09153e3db7d166b9717f872991a4950430cd" + integrity sha512-3EVi3ETTyJg5PSXlxLCaUVVn0pSbDf62L3Gwxne7Uq+d8adOSNWQAad4gg7WToHkcgnCJb3Wlb1P8r4Evj4GPw== + +get-caller-file@^2.0.1: + version "2.0.5" + resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-2.0.5.tgz#4f94412a82db32f36e3b0b9741f8a97feb031f7e" + integrity sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg== + get-func-name@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/get-func-name/-/get-func-name-2.0.0.tgz#ead774abee72e20409433a066366023dd6887a41" integrity sha1-6td0q+5y4gQJQzoGY2YCPdaIekE= +glob-parent@~5.1.0: + version "5.1.1" + resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-5.1.1.tgz#b6c1ef417c4e5663ea498f1c45afac6916bbc229" + integrity sha512-FnI+VGOpnlGHWZxthPGR+QhR78fuiK0sNLkHQv+bL9fQi57lNNdquIbna/WrfROrolq8GK5Ek6BiMwqL/voRYQ== + dependencies: + is-glob "^4.0.1" + glob@7.1.2: version "7.1.2" resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.2.tgz#c19c9df9a028702d678612384a6552404c636d15" @@ -683,7 +881,7 @@ glob@7.1.2: once "^1.3.0" path-is-absolute "^1.0.0" -glob@^7.1.1: +glob@7.1.3: version "7.1.3" resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.3.tgz#3960832d3f1574108342dafd3a67b332c0969df1" integrity sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ== @@ -695,6 +893,18 @@ glob@^7.1.1: once "^1.3.0" path-is-absolute "^1.0.0" +glob@^7.1.1: + version "7.1.6" + resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.6.tgz#141f33b81a7c2492e125594307480c46679278a6" + integrity sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA== + dependencies: + fs.realpath "^1.0.0" + inflight "^1.0.4" + inherits "2" + minimatch "^3.0.4" + once "^1.3.0" + path-is-absolute "^1.0.0" + global@~4.3.0: version "4.3.2" resolved "https://registry.yarnpkg.com/global/-/global-4.3.2.tgz#e76989268a6c74c38908b1305b10fc0e394e9d0f" @@ -704,68 +914,92 @@ global@~4.3.0: process "~0.5.1" graceful-fs@^4.1.2: - version "4.1.15" - resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.1.15.tgz#ffb703e1066e8a0eeaa4c8b80ba9253eeefbfb00" - integrity sha512-6uHUhOPEBgQ24HM+r6b/QwWfZq+yiFcipKFrOFiBEnWdy5sdzYoi+pJeQaPI5qOLRFqWmAXUPQNsielzdLoecA== - -"graceful-readlink@>= 1.0.0": - version "1.0.1" - resolved "https://registry.yarnpkg.com/graceful-readlink/-/graceful-readlink-1.0.1.tgz#4cafad76bc62f02fa039b2f94e9a3dd3a391a725" - integrity sha1-TK+tdrxi8C+gObL5Tpo906ORpyU= + version "4.2.4" + resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.4.tgz#2256bde14d3632958c465ebc96dc467ca07a29fb" + integrity sha512-WjKPNJF79dtJAVniUlGGWHYGz2jWxT6VhN/4m1NdkbZ2nOsEF+cI1Edgql5zCRhs/VsQYRvrXctxktVXZUkixw== growl@1.10.5: version "1.10.5" resolved "https://registry.yarnpkg.com/growl/-/growl-1.10.5.tgz#f2735dc2283674fa67478b10181059355c369e5e" integrity sha512-qBr4OuELkhPenW6goKVXiv47US3clb3/IbuWF9KNKEijAy9oeHxU9IgzjvJhHkUzhaj7rOUD7+YGWqUjLp5oSA== -hap-nodejs@0.4.47, hap-nodejs@^0.4.47: - version "0.4.47" - resolved "https://registry.yarnpkg.com/hap-nodejs/-/hap-nodejs-0.4.47.tgz#77004b0e521d373cc20285d610d3ba619e2b7342" - integrity sha512-R+wybsxAP/R/NT3WazdY7ErAgyee1zRqvpHgTUkR5mkQHp88z46hcm50kVkFEYRHlpLclBBCqioP6EksHIOsbw== +hap-nodejs@^0.4.47: + version "0.4.53" + resolved "https://registry.yarnpkg.com/hap-nodejs/-/hap-nodejs-0.4.53.tgz#86e263a54b7f90f6c6246b8d96870eff40eaa5a9" + integrity sha512-6i7m/sugXm/6jP9fLaGUbOtmvxvzcYCfyZFK9dv6kLeavCJparlIn50g+6hc6ljxq0d7Q1mH+pawCPUEq4ZC8Q== dependencies: bonjour-hap "^3.5.1" buffer-shims "^1.0.0" - curve25519-n "^1.2.0" debug "^2.2.0" decimal.js "^7.2.3" - ed25519-hap "^0.0.5" fast-srp-hap "^1.0.1" ip "^1.1.3" node-persist "^0.0.11" - -has-ansi@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/has-ansi/-/has-ansi-2.0.0.tgz#34f5049ce1ecdf2b0649af3ef24e45ed35416d91" - integrity sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE= - dependencies: - ansi-regex "^2.0.0" + tweetnacl "^1.0.1" + +hap-nodejs@^0.7.3: + version "0.7.3" + resolved "https://registry.yarnpkg.com/hap-nodejs/-/hap-nodejs-0.7.3.tgz#aef573b743f3ac0c8bc36254ddf23ddda95fe947" + integrity sha512-kCPwdRizCPJk43eTSMtW2LtCh+it8rTYW7aGkhW8qFKPS4z5JQilpggvVJvdfmSy5l+L5F0/UyKwkeM/KsdrHA== + dependencies: + bonjour-hap "~3.5.8" + debug "^4.1.1" + decimal.js "^10.2.0" + fast-srp-hap "2.0.1" + futoin-hkdf "~1.3.2" + ip "^1.1.3" + node-persist "^0.0.11" + tweetnacl "^1.0.3" has-flag@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-3.0.0.tgz#b5d454dc2199ae225699f3467e5a07f3b955bafd" integrity sha1-tdRU3CGZriJWmfNGfloH87lVuv0= +has-flag@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-4.0.0.tgz#944771fd9c81c81265c4d6941860da06bb59479b" + integrity sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ== + +has-symbols@^1.0.0, has-symbols@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/has-symbols/-/has-symbols-1.0.1.tgz#9f5214758a44196c406d9bd76cebf81ec2dd31e8" + integrity sha512-PLcsoqu++dmEIZB+6totNFKq/7Do+Z0u4oT0zKOJNl3lYK6vGwwu2hjHs+68OEZbTjiUE9bgOABXbP/GvrS0Kg== + +has@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/has/-/has-1.0.3.tgz#722d7cbfc1f6aa8241f16dd814e011e1f41e8796" + integrity sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw== + dependencies: + function-bind "^1.1.1" + he@1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/he/-/he-1.1.1.tgz#93410fd21b009735151f8868c2f271f3427e23fd" integrity sha1-k0EP0hsAlzUVH4howvJx80J+I/0= +he@1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/he/-/he-1.2.0.tgz#84ae65fa7eafb165fddb61566ae14baf05664f0f" + integrity sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw== + homebridge@>=0.4.42: - version "0.4.45" - resolved "https://registry.yarnpkg.com/homebridge/-/homebridge-0.4.45.tgz#d24008d048da573061b8b524f7161d4eb4f84563" - integrity sha512-zcyI0r4qF2hPmqrP5y45bz7sar3EdQSiqydXFuuTHeXmE4qnGZaxo+/4n3GYK22Yvp/wWBH3yxmm0ZGr+JyChQ== + version "1.1.0" + resolved "https://registry.yarnpkg.com/homebridge/-/homebridge-1.1.0.tgz#f3e96657d482baaa978e80e886dbc9e52c0c9a75" + integrity sha512-OMs+1A2G6lkMOrAk0o1nmj8S3XkhwrInVwRDiyLB3aHRQS02KQ/Egv1stV9vDhjib86v3y3MLHIYYzbxKHLjPA== dependencies: - chalk "^1.1.1" - commander "2.8.1" - hap-nodejs "0.4.47" - node-persist "^0.0.8" - qrcode-terminal "^0.11.0" - semver "5.0.3" + chalk "^3.0.0" + commander "5.0.0" + hap-nodejs "^0.7.3" + node-persist "^0.0.11" + qrcode-terminal "^0.12.0" + semver "^7.3.2" + source-map-support "^0.5.19" ieee754@^1.1.4: - version "1.1.12" - resolved "https://registry.yarnpkg.com/ieee754/-/ieee754-1.1.12.tgz#50bf24e5b9c8bb98af4964c941cdb0918da7b60b" - integrity sha512-GguP+DRY+pJ3soyIiGPTvdiVXjZ+DbXOxGpXn3eMvNW4x4irjqXm4wHKscC+TfxSJ0yw/S1F24tqdMNsMZTiLA== + version "1.1.13" + resolved "https://registry.yarnpkg.com/ieee754/-/ieee754-1.1.13.tgz#ec168558e95aa181fd87d37f55c32bbcb6708b84" + integrity sha512-4vf7I2LYV/HaWerSo3XmlMkp5eZ83i+/CDluXi/IGTs/O1sejBNhTtnxzmRZfvOUqj7lZjqHkeTvpgSFDlWZTg== inflight@^1.0.4: version "1.0.6" @@ -776,30 +1010,148 @@ inflight@^1.0.4: wrappy "1" inherits@2, inherits@~2.0.3: - version "2.0.3" - resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de" - integrity sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4= + version "2.0.4" + resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c" + integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== -ip@^1.1.0, ip@^1.1.3, ip@^1.1.5: +ip@^1.1.3, ip@^1.1.5: version "1.1.5" resolved "https://registry.yarnpkg.com/ip/-/ip-1.1.5.tgz#bdded70114290828c0a039e72ef25f5aaec4354a" integrity sha1-vd7XARQpCCjAoDnnLvJfWq7ENUo= -is-callable@^1.1.3: - version "1.1.4" - resolved "https://registry.yarnpkg.com/is-callable/-/is-callable-1.1.4.tgz#1e1adf219e1eeb684d691f9d6a05ff0d30a24d75" - integrity sha512-r5p9sxJjYnArLjObpjA4xu5EKI3CuKHkJXMhT7kwbpUyIFD1n5PMAsoPvWnvtZiNz7LjkYDRZhd7FlI0eMijEA== +is-arguments@^1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/is-arguments/-/is-arguments-1.0.4.tgz#3faf966c7cba0ff437fb31f6250082fcf0448cf3" + integrity sha512-xPh0Rmt8NE65sNzvyUmWgI1tz3mKq74lGA0mL8LYZcoIzKOzDh6HmrYm3d18k60nHerC8A9Km8kYu87zfSFnLA== -is-function@^1.0.1: +is-bigint@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-bigint/-/is-bigint-1.0.0.tgz#73da8c33208d00f130e9b5e15d23eac9215601c4" + integrity sha512-t5mGUXC/xRheCK431ylNiSkGGpBp8bHENBcENTkDT6ppwPzEVxNGZRvgvmOEfbWkFhA7D2GEuE2mmQTr78sl2g== + +is-binary-path@~2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/is-binary-path/-/is-binary-path-2.1.0.tgz#ea1f7f3b80f064236e83470f86c09c254fb45b09" + integrity sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw== + dependencies: + binary-extensions "^2.0.0" + +is-boolean-object@^1.0.0: version "1.0.1" - resolved "https://registry.yarnpkg.com/is-function/-/is-function-1.0.1.tgz#12cfb98b65b57dd3d193a3121f5f6e2f437602b5" - integrity sha1-Es+5i2W1fdPRk6MSH19uL0N2ArU= + resolved "https://registry.yarnpkg.com/is-boolean-object/-/is-boolean-object-1.0.1.tgz#10edc0900dd127697a92f6f9807c7617d68ac48e" + integrity sha512-TqZuVwa/sppcrhUCAYkGBk7w0yxfQQnxq28fjkO53tnK9FQXmdwz2JS5+GjsWQ6RByES1K40nI+yDic5c9/aAQ== + +is-buffer@~2.0.3: + version "2.0.4" + resolved "https://registry.yarnpkg.com/is-buffer/-/is-buffer-2.0.4.tgz#3e572f23c8411a5cfd9557c849e3665e0b290623" + integrity sha512-Kq1rokWXOPXWuaMAqZiJW4XxsmD9zGx9q4aePabbn3qCRGedtH7Cm+zV8WETitMfu1wdh+Rvd6w5egwSngUX2A== + +is-callable@^1.1.4, is-callable@^1.1.5: + version "1.1.5" + resolved "https://registry.yarnpkg.com/is-callable/-/is-callable-1.1.5.tgz#f7e46b596890456db74e7f6e976cb3273d06faab" + integrity sha512-ESKv5sMCJB2jnHTWZ3O5itG+O128Hsus4K4Qh1h2/cgn2vbgnLSVqfV46AeJA9D5EeeLa9w81KUXMtn34zhX+Q== + +is-date-object@^1.0.1, is-date-object@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/is-date-object/-/is-date-object-1.0.2.tgz#bda736f2cd8fd06d32844e7743bfa7494c3bfd7e" + integrity sha512-USlDT524woQ08aoZFzh3/Z6ch9Y/EWXEHQ/AaRN0SkKq4t2Jw2R2339tSXmwuVoY7LLlBCbOIlx2myP/L5zk0g== + +is-extglob@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-2.1.1.tgz#a88c02535791f02ed37c76a1b9ea9773c833f8c2" + integrity sha1-qIwCU1eR8C7TfHahueqXc8gz+MI= + +is-fullwidth-code-point@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz#a3b30a5c4f199183167aaab93beefae3ddfb654f" + integrity sha1-o7MKXE8ZkYMWeqq5O+764937ZU8= + +is-function@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/is-function/-/is-function-1.0.2.tgz#4f097f30abf6efadac9833b17ca5dc03f8144e08" + integrity sha512-lw7DUp0aWXYg+CBCN+JKkcE0Q2RayZnSvnZBlwgxHBQhqt5pZNVy4Ri7H9GmmXkdu7LUthszM+Tor1u/2iBcpQ== + +is-glob@^4.0.1, is-glob@~4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-4.0.1.tgz#7567dbe9f2f5e2467bc77ab83c4a29482407a5dc" + integrity sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg== + dependencies: + is-extglob "^2.1.1" + +is-map@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/is-map/-/is-map-2.0.1.tgz#520dafc4307bb8ebc33b813de5ce7c9400d644a1" + integrity sha512-T/S49scO8plUiAOA2DBTBG3JHpn1yiw0kRp6dgiZ0v2/6twi5eiB0rHtHFH9ZIrvlWc6+4O+m4zg5+Z833aXgw== + +is-number-object@^1.0.3: + version "1.0.4" + resolved "https://registry.yarnpkg.com/is-number-object/-/is-number-object-1.0.4.tgz#36ac95e741cf18b283fc1ddf5e83da798e3ec197" + integrity sha512-zohwelOAur+5uXtk8O3GPQ1eAcu4ZX3UwxQhUlfFFMNpUd83gXgjbhJh6HmB6LUNV/ieOLQuDwJO3dWJosUeMw== + +is-number@^7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/is-number/-/is-number-7.0.0.tgz#7535345b896734d5f80c4d06c50955527a14f12b" + integrity sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng== + +is-regex@^1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/is-regex/-/is-regex-1.0.5.tgz#39d589a358bf18967f726967120b8fc1aed74eae" + integrity sha512-vlKW17SNq44owv5AQR3Cq0bQPEb8+kF3UKZ2fiZNOWtztYE5i0CzCZxFDwO58qAOWtxdBRVO/V5Qin1wjCqFYQ== + dependencies: + has "^1.0.3" + +is-set@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/is-set/-/is-set-2.0.1.tgz#d1604afdab1724986d30091575f54945da7e5f43" + integrity sha512-eJEzOtVyenDs1TMzSQ3kU3K+E0GUS9sno+F0OBT97xsgcJsF9nXMBtkT9/kut5JEpM7oL7X/0qxR17K3mcwIAA== + +is-string@^1.0.4, is-string@^1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/is-string/-/is-string-1.0.5.tgz#40493ed198ef3ff477b8c7f92f644ec82a5cd3a6" + integrity sha512-buY6VNRjhQMiF1qWDouloZlQbRhDPCebwxSjxMjxgemYT46YMd2NR0/H+fBhEfWX4A/w9TBJ+ol+okqJKFE6vQ== + +is-symbol@^1.0.2: + version "1.0.3" + resolved "https://registry.yarnpkg.com/is-symbol/-/is-symbol-1.0.3.tgz#38e1014b9e6329be0de9d24a414fd7441ec61937" + integrity sha512-OwijhaRSgqvhm/0ZdAcXNZt9lYdKFpcRDT5ULUuYXPoT794UNOdU+gpT6Rzo7b4V2HUl/op6GqY894AZwv9faQ== + dependencies: + has-symbols "^1.0.1" + +is-typed-array@^1.1.3: + version "1.1.3" + resolved "https://registry.yarnpkg.com/is-typed-array/-/is-typed-array-1.1.3.tgz#a4ff5a5e672e1a55f99c7f54e59597af5c1df04d" + integrity sha512-BSYUBOK/HJibQ30wWkWold5txYwMUXQct9YHAQJr8fSwvZoiglcqB0pd7vEN23+Tsi9IUEjztdOSzl4qLVYGTQ== + dependencies: + available-typed-arrays "^1.0.0" + es-abstract "^1.17.4" + foreach "^2.0.5" + has-symbols "^1.0.1" + +is-weakmap@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/is-weakmap/-/is-weakmap-2.0.1.tgz#5008b59bdc43b698201d18f62b37b2ca243e8cf2" + integrity sha512-NSBR4kH5oVj1Uwvv970ruUkCV7O1mzgVFO4/rev2cLRda9Tm9HrL70ZPut4rOHgY0FNrUu9BCbXA2sdQ+x0chA== + +is-weakset@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/is-weakset/-/is-weakset-2.0.1.tgz#e9a0af88dbd751589f5e50d80f4c98b780884f83" + integrity sha512-pi4vhbhVHGLxohUw7PhGsueT4vRGFoXhP7+RGN0jKIv9+8PWYCQTqtADngrxOm2g46hoH0+g8uZZBzMrvVGDmw== + +isarray@^2.0.5: + version "2.0.5" + resolved "https://registry.yarnpkg.com/isarray/-/isarray-2.0.5.tgz#8af1e4c1221244cc62459faf38940d4e644a5723" + integrity sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw== isarray@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11" integrity sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE= +isexe@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10" + integrity sha1-6PvzdNxVb/iUehDcsFctYz8s+hA= + jimp@^0.5.6: version "0.5.6" resolved "https://registry.yarnpkg.com/jimp/-/jimp-0.5.6.tgz#dd114decd060927ae439f2e0980df619c179f912" @@ -812,28 +1164,23 @@ jimp@^0.5.6: core-js "^2.5.7" jpeg-js@^0.3.4: - version "0.3.4" - resolved "https://registry.yarnpkg.com/jpeg-js/-/jpeg-js-0.3.4.tgz#dc2ba501ee3d58b7bb893c5d1fab47294917e7e7" - integrity sha512-6IzjQxvnlT8UlklNmDXIJMWxijULjqGrzgqc0OG7YadZdvm7KPQ1j0ehmQQHckgEWOfgpptzcnWgESovxudpTA== + version "0.3.7" + resolved "https://registry.yarnpkg.com/jpeg-js/-/jpeg-js-0.3.7.tgz#471a89d06011640592d314158608690172b1028d" + integrity sha512-9IXdWudL61npZjvLuVe/ktHiA41iE8qFyLB+4VDTblEsWBzeg8WQTlktdUK4CdncUqtUgUg0bbOmTE2bKBKaBQ== -js-tokens@^3.0.2: - version "3.0.2" - resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-3.0.2.tgz#9866df395102130e38f7f996bceb65443209c25b" - integrity sha1-mGbfOVECEw449/mWvOtlRDIJwls= +js-tokens@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499" + integrity sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ== -js-yaml@^3.7.0: - version "3.12.0" - resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.12.0.tgz#eaed656ec8344f10f527c6bfa1b6e2244de167d1" - integrity sha512-PIt2cnwmPfL4hKNwqeiuz4bKfnzHTBv6HyVgjahA6mPLwPDzjDWrplJBMjHUFxku/N3FlmrbyPclad+I+4mJ3A== +js-yaml@3.13.1, js-yaml@^3.13.1: + version "3.13.1" + resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.13.1.tgz#aff151b30bfdfa8e49e05da22e7415e9dfa37847" + integrity sha512-YfbcO7jXDdyj0DGxYVSlSeQNHbD7XPWvrVWeVUujrQEoZzWJIRrCPoyk6kL6IAjAG2IolMK4T0hNUe0HOUs5Jw== dependencies: argparse "^1.0.7" esprima "^4.0.0" -json-stringify-safe@^5.0.1: - version "5.0.1" - resolved "https://registry.yarnpkg.com/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz#1296a2d58fd45f19a0f6ce01d65701e2c735b6eb" - integrity sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus= - load-bmfont@^1.3.1, load-bmfont@^1.4.0: version "1.4.0" resolved "https://registry.yarnpkg.com/load-bmfont/-/load-bmfont-1.4.0.tgz#75f17070b14a8c785fe7f5bee2e6fd4f98093b6b" @@ -848,15 +1195,30 @@ load-bmfont@^1.3.1, load-bmfont@^1.4.0: xhr "^2.0.1" xtend "^4.0.0" -lodash@^4.17.5: - version "4.17.11" - resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.11.tgz#b39ea6229ef607ecd89e2c8df12536891cac9b8d" - integrity sha512-cQKh8igo5QUhZ7lg38DYWAxMvjSAKG0A8wGSVimP07SIUEK2UO+arSRKbRZWtelMtN5V0Hkwh5ryOto/SshYIg== +locate-path@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-3.0.0.tgz#dbec3b3ab759758071b58fe59fc41871af21400e" + integrity sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A== + dependencies: + p-locate "^3.0.0" + path-exists "^3.0.0" + +lodash@^4.17.15: + version "4.17.15" + resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.15.tgz#b447f6670a0455bbfeedd11392eff330ea097548" + integrity sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A== + +log-symbols@3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/log-symbols/-/log-symbols-3.0.0.tgz#f3a08516a5dea893336a7dee14d18a1cfdab77c4" + integrity sha512-dSkNGuI7iG3mfvDzUuYZyvk5dD9ocYCYzNU6CYDE6+Xqd+gwme6Z00NS3dUh8mq/73HaEtT7m6W+yUPtU6BZnQ== + dependencies: + chalk "^2.4.2" make-error@^1.1.1: - version "1.3.5" - resolved "https://registry.yarnpkg.com/make-error/-/make-error-1.3.5.tgz#efe4e81f6db28cadd605c70f29c831b58ef776c8" - integrity sha512-c3sIjNUow0+8swNwVpqoH4YCShKNFkMaw6oH1mNS2haDZQqkeZFlHS3dhoeEbKKmJB4vXpJucU6oH75aDYeE9g== + version "1.3.6" + resolved "https://registry.yarnpkg.com/make-error/-/make-error-1.3.6.tgz#2eb2e37ea9b67c4891f684a1394799af484cf7a2" + integrity sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw== memory-fs@^0.3.0: version "0.3.0" @@ -890,22 +1252,24 @@ minimist@0.0.8: resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.8.tgz#857fcabfc3397d2625b8228262e86aa7a011b05d" integrity sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0= -minimist@^1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.0.tgz#a35008b20f41383eec1fb914f4cd5df79a264284" - integrity sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ= +minimist@^1.2.0, minimist@^1.2.5: + version "1.2.5" + resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.5.tgz#67d66014b66a6a8aaa0c083c5fd58df4e4e97602" + integrity sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw== -mkdirp@0.5.1, mkdirp@^0.5.0, mkdirp@^0.5.1, mkdirp@~0.5.1: +mkdirp@0.5.1: version "0.5.1" resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.1.tgz#30057438eac6cf7f8c4767f38648d6697d75c903" integrity sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM= dependencies: minimist "0.0.8" -mkdirp@~0.3.5: - version "0.3.5" - resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.3.5.tgz#de3e5f8961c88c787ee1368df849ac4413eca8d7" - integrity sha1-3j5fiWHIjHh+4TaN+EmsRBPsqNc= +mkdirp@0.5.5, mkdirp@^0.5.1, mkdirp@~0.5.1: + version "0.5.5" + resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.5.tgz#d91cefd62d1436ca0f41620e251288d420099def" + integrity sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ== + dependencies: + minimist "^1.2.5" mocha-logger@^1.0.6: version "1.0.6" @@ -914,7 +1278,7 @@ mocha-logger@^1.0.6: dependencies: mocha "^5.1.1" -mocha@^5.1.1, mocha@^5.2.0: +mocha@^5.1.1: version "5.2.0" resolved "https://registry.yarnpkg.com/mocha/-/mocha-5.2.0.tgz#6d8ae508f59167f940f2b5b3c4a612ae50c90ae6" integrity sha512-2IUgKDhc3J7Uug+FxMXuqIyYzH7gJjXECKe/w43IGgQHTSj3InJi+yAA7T24L9bQMRKiUEHxEX37G5JpVUGLcQ== @@ -931,48 +1295,71 @@ mocha@^5.1.1, mocha@^5.2.0: mkdirp "0.5.1" supports-color "5.4.0" +mocha@^7.1.2: + version "7.1.2" + resolved "https://registry.yarnpkg.com/mocha/-/mocha-7.1.2.tgz#8e40d198acf91a52ace122cd7599c9ab857b29e6" + integrity sha512-o96kdRKMKI3E8U0bjnfqW4QMk12MwZ4mhdBTf+B5a1q9+aq2HRnj+3ZdJu0B/ZhJeK78MgYuv6L8d/rA5AeBJA== + dependencies: + ansi-colors "3.2.3" + browser-stdout "1.3.1" + chokidar "3.3.0" + debug "3.2.6" + diff "3.5.0" + escape-string-regexp "1.0.5" + find-up "3.0.0" + glob "7.1.3" + growl "1.10.5" + he "1.2.0" + js-yaml "3.13.1" + log-symbols "3.0.0" + minimatch "3.0.4" + mkdirp "0.5.5" + ms "2.1.1" + node-environment-flags "1.0.6" + object.assign "4.1.0" + strip-json-comments "2.0.1" + supports-color "6.0.0" + which "1.3.1" + wide-align "1.1.3" + yargs "13.3.2" + yargs-parser "13.1.2" + yargs-unparser "1.6.0" + ms@2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8" integrity sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g= -ms@^2.1.1: +ms@2.1.1: version "2.1.1" resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.1.tgz#30a5864eb3ebb0a66f2ebe6d727af06a09d86e0a" integrity sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg== +ms@^2.1.1: + version "2.1.2" + resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009" + integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w== + multicast-dns-service-types@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/multicast-dns-service-types/-/multicast-dns-service-types-1.1.0.tgz#899f11d9686e5e05cb91b35d5f0e63b773cfc901" integrity sha1-iZ8R2WhuXgXLkbNdXw5jt3PPyQE= -multicast-dns@^6.0.1: - version "6.2.3" - resolved "https://registry.yarnpkg.com/multicast-dns/-/multicast-dns-6.2.3.tgz#a0ec7bd9055c4282f790c3c82f4e28db3b31b229" - integrity sha512-ji6J5enbMyGRHIAkAOu3WdV8nggqviKCEKtXcOqfphZZtQrmHKycfynJ2V7eVPUA4NhJ6V7Wf4TmGbTwKE9B6g== +multicast-dns@^7.2.2: + version "7.2.2" + resolved "https://registry.yarnpkg.com/multicast-dns/-/multicast-dns-7.2.2.tgz#5731da04f47d1e435ac457e5ac7b4b39d866a5a1" + integrity sha512-XqSMeO8EWV/nOXOpPV8ztIpNweVfE1dSpz6SQvDPp71HD74lMXjt4m/mWB1YBMG0kHtOodxRWc5WOb/UNN1A5g== dependencies: - dns-packet "^1.3.1" + dns-packet "^4.0.0" thunky "^1.0.2" -nan@^2.10.0: - version "2.11.1" - resolved "https://registry.yarnpkg.com/nan/-/nan-2.11.1.tgz#90e22bccb8ca57ea4cd37cc83d3819b52eea6766" - integrity sha512-iji6k87OSXa0CcrLl9z+ZiYSuR2o+c0bGuNmXdrhTQTakxytAFsC56SArGYoiHlJlFoHSnvmhpceZJaXkVuOtA== - -nock@9.6.1: - version "9.6.1" - resolved "https://registry.yarnpkg.com/nock/-/nock-9.6.1.tgz#d96e099be9bc1d0189a77f4490bbbb265c381b49" - integrity sha512-EDgl/WgNQ0C1BZZlASOQkQdE6tAWXJi8QQlugqzN64JJkvZ7ILijZuG24r4vCC7yOfnm6HKpne5AGExLGCeBWg== - dependencies: - chai "^4.1.2" - debug "^3.1.0" - deep-equal "^1.0.0" - json-stringify-safe "^5.0.1" - lodash "^4.17.5" - mkdirp "^0.5.0" - propagate "^1.0.0" - qs "^6.5.1" - semver "^5.5.0" +node-environment-flags@1.0.6: + version "1.0.6" + resolved "https://registry.yarnpkg.com/node-environment-flags/-/node-environment-flags-1.0.6.tgz#a30ac13621f6f7d674260a54dede048c3982c088" + integrity sha512-5Evy2epuL+6TM0lCQGpFIj6KwiEsGh1SrHUhTbNX+sLbBtjidPZFAnVK9y5yU1+h//RitLbRHTIMyxQPtxMdHw== + dependencies: + object.getownpropertydescriptors "^2.0.3" + semver "^5.7.0" node-persist@^0.0.11: version "0.0.11" @@ -982,23 +1369,56 @@ node-persist@^0.0.11: mkdirp "~0.5.1" q "~1.1.1" -node-persist@^0.0.8: - version "0.0.8" - resolved "https://registry.yarnpkg.com/node-persist/-/node-persist-0.0.8.tgz#a56c739bc6ffd9ceef19c0e8d89597917f089249" - integrity sha1-pWxzm8b/2c7vGcDo2JWXkX8Ikkk= - dependencies: - mkdirp "~0.3.5" - q "~1.1.1" +normalize-path@^3.0.0, normalize-path@~3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-3.0.0.tgz#0dcd69ff23a1c9b11fd0978316644a0388216a65" + integrity sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA== object-assign@^4.0.1: version "4.1.1" resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" integrity sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM= +object-inspect@^1.7.0: + version "1.7.0" + resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.7.0.tgz#f4f6bd181ad77f006b5ece60bd0b6f398ff74a67" + integrity sha512-a7pEHdh1xKIAgTySUGgLMx/xwDZskN1Ud6egYYN3EdRW4ZMPNEDUTF+hwy2LUC+Bl+SyLXANnwz/jyh/qutKUw== + +object-is@^1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/object-is/-/object-is-1.1.2.tgz#c5d2e87ff9e119f78b7a088441519e2eec1573b6" + integrity sha512-5lHCz+0uufF6wZ7CRFWJN3hp8Jqblpgve06U5CMQ3f//6iDjPr2PEo9MWCjEssDsa+UZEL4PkFpr+BMop6aKzQ== + dependencies: + define-properties "^1.1.3" + es-abstract "^1.17.5" + +object-keys@^1.0.11, object-keys@^1.0.12, object-keys@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/object-keys/-/object-keys-1.1.1.tgz#1c47f272df277f3b1daf061677d9c82e2322c60e" + integrity sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA== + +object.assign@4.1.0, object.assign@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/object.assign/-/object.assign-4.1.0.tgz#968bf1100d7956bb3ca086f006f846b3bc4008da" + integrity sha512-exHJeq6kBKj58mqGyTQ9DFvrZC/eR6OwxzoM9YRoGBqrXYonaFyGiFMuc9VZrXf7DarreEwMpurG3dd+CNyW5w== + dependencies: + define-properties "^1.1.2" + function-bind "^1.1.1" + has-symbols "^1.0.0" + object-keys "^1.0.11" + +object.getownpropertydescriptors@^2.0.3: + version "2.1.0" + resolved "https://registry.yarnpkg.com/object.getownpropertydescriptors/-/object.getownpropertydescriptors-2.1.0.tgz#369bf1f9592d8ab89d712dced5cb81c7c5352649" + integrity sha512-Z53Oah9A3TdLoblT7VKJaTDdXdT+lQO+cNpKVnya5JDe9uLvzu1YyY1yFDFrcxrlRgWrEFH0jJtD/IbuwjcEVg== + dependencies: + define-properties "^1.1.3" + es-abstract "^1.17.0-next.1" + omggif@^1.0.9: - version "1.0.9" - resolved "https://registry.yarnpkg.com/omggif/-/omggif-1.0.9.tgz#dcb7024dacd50c52b4d303f04802c91c057c765f" - integrity sha1-3LcCTazVDFK00wPwSALJHAV8dl8= + version "1.0.10" + resolved "https://registry.yarnpkg.com/omggif/-/omggif-1.0.10.tgz#ddaaf90d4a42f532e9e7cb3a95ecdd47f17c7b19" + integrity sha512-LMJTtvgc/nugXj0Vcrrs68Mn2D1r0zf630VNtqtpI1FEO7e+O9FP4gqs9AcnBaSEeoHIPm28u6qgPR0oyEpGSw== once@^1.3.0: version "1.4.0" @@ -1012,10 +1432,29 @@ optional@^0.1.4: resolved "https://registry.yarnpkg.com/optional/-/optional-0.1.4.tgz#cdb1a9bedc737d2025f690ceeb50e049444fd5b3" integrity sha512-gtvrrCfkE08wKcgXaVwQVgwEQ8vel2dc5DDBn9RLQZ3YtmtkBss6A2HY6BnJH4N/4Ku97Ri/SF8sNWE2225WJw== +p-limit@^2.0.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-2.3.0.tgz#3dd33c647a214fdfffd835933eb086da0dc21db1" + integrity sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w== + dependencies: + p-try "^2.0.0" + +p-locate@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-3.0.0.tgz#322d69a05c0264b25997d9f40cd8a891ab0064a4" + integrity sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ== + dependencies: + p-limit "^2.0.0" + +p-try@^2.0.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/p-try/-/p-try-2.2.0.tgz#cb2868540e313d61de58fafbe35ce9004d5540e6" + integrity sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ== + pako@^1.0.5: - version "1.0.6" - resolved "https://registry.yarnpkg.com/pako/-/pako-1.0.6.tgz#0101211baa70c4bca4a0f63f2206e97b7dfaf258" - integrity sha512-lQe48YPsMJAig+yngZ87Lus+NF+3mtu7DVOBu6b/gHO1YpKwIj5AWjZ/TOS7i46HD/UixzWb1zeWDZfGZ3iYcg== + version "1.0.11" + resolved "https://registry.yarnpkg.com/pako/-/pako-1.0.11.tgz#6c9599d340d54dfd3946380252a35705a6b992bf" + integrity sha512-4hLB8Py4zZce5s4yd9XzopqwVv/yGNhV1Bl8NTmCq1763HeK2+EwVTv+leGeL13Dnh2wfbqowVPXCIO0z4taYw== parse-bmfont-ascii@^1.0.3: version "1.0.6" @@ -1036,19 +1475,21 @@ parse-bmfont-xml@^1.1.4: xml2js "^0.4.5" parse-headers@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/parse-headers/-/parse-headers-2.0.1.tgz#6ae83a7aa25a9d9b700acc28698cd1f1ed7e9536" - integrity sha1-aug6eqJanZtwCswoaYzR8e1+lTY= - dependencies: - for-each "^0.3.2" - trim "0.0.1" + version "2.0.3" + resolved "https://registry.yarnpkg.com/parse-headers/-/parse-headers-2.0.3.tgz#5e8e7512383d140ba02f0c7aa9f49b4399c92515" + integrity sha512-QhhZ+DCCit2Coi2vmAKbq5RGTRcQUOE2+REgv8vdyu7MnYx2eZztegqtTx99TZ86GTIwqiy3+4nQTWZ2tgmdCA== + +path-exists@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-3.0.0.tgz#ce0ebeaa5f78cb18925ea7d810d7b59b010fd515" + integrity sha1-zg6+ql94yxiSXqfYENe1mwEP1RU= path-is-absolute@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f" integrity sha1-F0uSaHNVNP+8es5r9TpanhtcX18= -path-parse@^1.0.5: +path-parse@^1.0.6: version "1.0.6" resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.6.tgz#d62dbb5679405d72c4737ec58600e9ddcf06d24c" integrity sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw== @@ -1063,6 +1504,11 @@ phin@^2.9.1: resolved "https://registry.yarnpkg.com/phin/-/phin-2.9.3.tgz#f9b6ac10a035636fb65dfc576aaaa17b8743125c" integrity sha512-CzFr90qM24ju5f88quFC/6qohjC144rehe5n6DH900lgXmUe86+xCKc10ev56gRKC4/BkHUoG4uSiQgBiIXwDA== +picomatch@^2.0.4: + version "2.2.2" + resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.2.2.tgz#21f333e9b6b8eaff02468f5146ea406d345f4dad" + integrity sha512-q0M/9eZHzmr0AulXyPwNfZjtwZ/RBZlbN3K3CErVrk50T2ASYI7Bye0EvekFY3IP1Nt2DHu0re+V2ZHIpMkuWg== + pixelmatch@^4.0.2: version "4.0.2" resolved "https://registry.yarnpkg.com/pixelmatch/-/pixelmatch-4.0.2.tgz#8f47dcec5011b477b67db03c243bc1f3085e8854" @@ -1071,25 +1517,20 @@ pixelmatch@^4.0.2: pngjs "^3.0.0" pngjs@^3.0.0, pngjs@^3.3.3: - version "3.3.3" - resolved "https://registry.yarnpkg.com/pngjs/-/pngjs-3.3.3.tgz#85173703bde3edac8998757b96e5821d0966a21b" - integrity sha512-1n3Z4p3IOxArEs1VRXnZ/RXdfEniAUS9jb68g58FIXMNkPJeZd+Qh4Uq7/e0LVxAQGos1eIUrqrt4FpjdnEd+Q== + version "3.4.0" + resolved "https://registry.yarnpkg.com/pngjs/-/pngjs-3.4.0.tgz#99ca7d725965fb655814eaf65f38f12bbdbf555f" + integrity sha512-NCrCHhWmnQklfH4MtJMRjZ2a8c80qXeMlQMv2uVp9ISJMTt562SbGd6n2oq0PaPgKm7Z6pL9E2UlLIhC+SHL3w== process-nextick-args@~2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-2.0.0.tgz#a37d732f4271b4ab1ad070d35508e8290788ffaa" - integrity sha512-MtEC1TqN0EU5nephaJ4rAtThHtC86dNN9qCuEhtshvpVBkAW5ZO7BASN9REnF9eoXGcRub+pFuKEpOHE+HbEMw== + version "2.0.1" + resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-2.0.1.tgz#7820d9b16120cc55ca9ae7792680ae7dba6d7fe2" + integrity sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag== process@~0.5.1: version "0.5.2" resolved "https://registry.yarnpkg.com/process/-/process-0.5.2.tgz#1638d8a8e34c2f440a91db95ab9aeb677fc185cf" integrity sha1-FjjYqONML0QKkduVq5rrZ3/Bhc8= -propagate@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/propagate/-/propagate-1.0.0.tgz#00c2daeedda20e87e3782b344adba1cddd6ad709" - integrity sha1-AMLa7t2iDofjeCs0Stuhzd1q1wk= - prr@~1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/prr/-/prr-1.0.1.tgz#d3fc114ba06995a45ec6893f484ceb1d78f5f476" @@ -1100,20 +1541,20 @@ q@~1.1.1: resolved "https://registry.yarnpkg.com/q/-/q-1.1.2.tgz#6357e291206701d99f197ab84e57e8ad196f2a89" integrity sha1-Y1fikSBnAdmfGXq4TlforRlvKok= -qrcode-terminal@^0.11.0: - version "0.11.0" - resolved "https://registry.yarnpkg.com/qrcode-terminal/-/qrcode-terminal-0.11.0.tgz#ffc6c28a2fc0bfb47052b47e23f4f446a5fbdb9e" - integrity sha1-/8bCii/Av7RwUrR+I/T0RqX7254= +qrcode-terminal@^0.12.0: + version "0.12.0" + resolved "https://registry.yarnpkg.com/qrcode-terminal/-/qrcode-terminal-0.12.0.tgz#bb5b699ef7f9f0505092a3748be4464fe71b5819" + integrity sha512-EXtzRZmC+YGmGlDFbXKxQiMZNwCLEO6BANKXG4iCtSIM0yqc/pappSx3RIKr4r0uh5JsBckOXeKrB3Iz7mdQpQ== -qs@^6.5.1: - version "6.5.2" - resolved "https://registry.yarnpkg.com/qs/-/qs-6.5.2.tgz#cb3ae806e8740444584ef154ce8ee98d403f3e36" - integrity sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA== +qs@^6.9.1: + version "6.9.4" + resolved "https://registry.yarnpkg.com/qs/-/qs-6.9.4.tgz#9090b290d1f91728d3c22e54843ca44aea5ab687" + integrity sha512-A1kFqHekCTM7cz0udomYUoYNWjBebHm/5wzU/XqrBRBNWectVH0QIiN+NEcZ0Dte5hvzHwbr8+XQmguPhJ6WdQ== readable-stream@^2.0.1: - version "2.3.6" - resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.6.tgz#b11c27d88b8ff1fbe070643cf94b0c79ae1b0aaf" - integrity sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw== + version "2.3.7" + resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.7.tgz#1eca1cf711aef814c04f62252a36a62f6cb23b57" + integrity sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw== dependencies: core-util-is "~1.0.0" inherits "~2.0.3" @@ -1123,10 +1564,35 @@ readable-stream@^2.0.1: string_decoder "~1.1.1" util-deprecate "~1.0.1" -regenerator-runtime@^0.11.1: - version "0.11.1" - resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.11.1.tgz#be05ad7f9bf7d22e056f9726cee5017fbf19e2e9" - integrity sha512-MguG95oij0fC3QV3URf4V2SDYGJhJnJGqvIIgdECeODCT98wSWDAJ94SSuVpYQUoTcGUIL6L4yNB7j1DFFHSBg== +readdirp@~3.2.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-3.2.0.tgz#c30c33352b12c96dfb4b895421a49fd5a9593839" + integrity sha512-crk4Qu3pmXwgxdSgGhgA/eXiJAPQiX4GMOZZMXnqKxHX7TaoL+3gQVo/WeuAiogr07DpnfjIMpXXa+PAIvwPGQ== + dependencies: + picomatch "^2.0.4" + +regenerator-runtime@^0.13.4: + version "0.13.5" + resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.13.5.tgz#d878a1d094b4306d10b9096484b33ebd55e26697" + integrity sha512-ZS5w8CpKFinUzOwW3c83oPeVXoNsrLsaCoLtJvAClH135j/R77RuymhiSErhm2lKcwSCIpmvIWSbDkIfAqKQlA== + +regexp.prototype.flags@^1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/regexp.prototype.flags/-/regexp.prototype.flags-1.3.0.tgz#7aba89b3c13a64509dabcf3ca8d9fbb9bdf5cb75" + integrity sha512-2+Q0C5g951OlYlJz6yu5/M33IcsESLlLfsyIaLJaG4FA2r4yP8MvVMJUUP/fVBkSpbbbZlS5gynbEWLipiiXiQ== + dependencies: + define-properties "^1.1.3" + es-abstract "^1.17.0-next.1" + +require-directory@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/require-directory/-/require-directory-2.1.1.tgz#8c64ad5fd30dab1c976e2344ffe7f792a6a6df42" + integrity sha1-jGStX9MNqxyXbiNE/+f3kqam30I= + +require-main-filename@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/require-main-filename/-/require-main-filename-2.0.0.tgz#d0b329ecc7cc0f61649f62215be69af54aa8989b" + integrity sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg== resolve-from@2.0.0: version "2.0.0" @@ -1134,13 +1600,18 @@ resolve-from@2.0.0: integrity sha1-lICrIOlP+h2egKgEx+oUdhGWa1c= resolve@^1.3.2: - version "1.8.1" - resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.8.1.tgz#82f1ec19a423ac1fbd080b0bab06ba36e84a7a26" - integrity sha512-AicPrAC7Qu1JxPCZ9ZgCZlY35QgFnNqc+0LtbRNxnVw4TXvjQ72wnuL9JQcEBgXkI9JM8MsT9kaQoHcpCRJOYA== + version "1.17.0" + resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.17.0.tgz#b25941b54968231cc2d1bb76a79cb7f2c0bf8444" + integrity sha512-ic+7JYiV8Vi2yzQGFWOkiZD5Z9z7O2Zhm9XMaTxdJExKasieFCr+yXZ/WmXsckHiKl12ar0y6XiXDx3m4RHn1w== dependencies: - path-parse "^1.0.5" + path-parse "^1.0.6" -safe-buffer@^5.0.1, safe-buffer@~5.1.0, safe-buffer@~5.1.1: +safe-buffer@^5.1.1: + version "5.2.1" + resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.1.tgz#1eaf9fa9bdb1fdd4ec75f58f9cdb4e6b7827eec6" + integrity sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ== + +safe-buffer@~5.1.0, safe-buffer@~5.1.1: version "5.1.2" resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d" integrity sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g== @@ -1150,20 +1621,33 @@ sax@>=0.6.0: resolved "https://registry.yarnpkg.com/sax/-/sax-1.2.4.tgz#2816234e2378bddc4e5354fab5caa895df7100d9" integrity sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw== -semver@5.0.3: - version "5.0.3" - resolved "https://registry.yarnpkg.com/semver/-/semver-5.0.3.tgz#77466de589cd5d3c95f138aa78bc569a3cb5d27a" - integrity sha1-d0Zt5YnNXTyV8TiqeLxWmjy10no= +semver@^5.3.0, semver@^5.7.0: + version "5.7.1" + resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.1.tgz#a954f931aeba508d307bbf069eff0c01c96116f7" + integrity sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ== -semver@^5.3.0, semver@^5.5.0: - version "5.6.0" - resolved "https://registry.yarnpkg.com/semver/-/semver-5.6.0.tgz#7e74256fbaa49c75aa7c7a205cc22799cac80004" - integrity sha512-RS9R6R35NYgQn++fkDWaOmqGoj4Ek9gGs+DPxNUZKuwE183xjJroKvyo1IzVFeXvUrvmALy6FWD5xrdJT25gMg== +semver@^7.3.2: + version "7.3.2" + resolved "https://registry.yarnpkg.com/semver/-/semver-7.3.2.tgz#604962b052b81ed0786aae84389ffba70ffd3938" + integrity sha512-OrOb32TeeambH6UrhtShmF7CRDqhL6/5XpPNp2DuRH6+9QLw/orhp72j87v8Qa1ScDkvrrBNpZcDejAirJmfXQ== + +set-blocking@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/set-blocking/-/set-blocking-2.0.0.tgz#045f9782d011ae9a6803ddd382b24392b3d890f7" + integrity sha1-BF+XgtARrppoA93TgrJDkrPYkPc= -source-map-support@^0.5.6: - version "0.5.9" - resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.9.tgz#41bc953b2534267ea2d605bccfa7bfa3111ced5f" - integrity sha512-gR6Rw4MvUlYy83vP0vxoVNzM6t8MUXqNuRsuBmBHQDu1Fh6X015FrLdgoDKcNdkwGubozq0P4N0Q37UyFVr1EA== +side-channel@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/side-channel/-/side-channel-1.0.2.tgz#df5d1abadb4e4bf4af1cd8852bf132d2f7876947" + integrity sha512-7rL9YlPHg7Ancea1S96Pa8/QWb4BtXL/TZvS6B8XFetGBeuhAsfmUspK6DokBeZ64+Kj9TCNRD/30pVz1BvQNA== + dependencies: + es-abstract "^1.17.0-next.1" + object-inspect "^1.7.0" + +source-map-support@^0.5.19, source-map-support@^0.5.6: + version "0.5.19" + resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.19.tgz#a98b62f86dcaf4f67399648c085291ab9e8fed61" + integrity sha512-Wonm7zOCIJzBGQdB+thsPar0kYuCIzYvxZwlBa87yi/Mdjv7Tip2cyVbLj5o0cFPN4EVkuTwb3GDDyUx2DGnGw== dependencies: buffer-from "^1.0.0" source-map "^0.6.0" @@ -1178,6 +1662,57 @@ sprintf-js@~1.0.2: resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.0.3.tgz#04e6926f662895354f3dd015203633b857297e2c" integrity sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw= +"string-width@^1.0.2 || 2": + version "2.1.1" + resolved "https://registry.yarnpkg.com/string-width/-/string-width-2.1.1.tgz#ab93f27a8dc13d28cac815c462143a6d9012ae9e" + integrity sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw== + dependencies: + is-fullwidth-code-point "^2.0.0" + strip-ansi "^4.0.0" + +string-width@^3.0.0, string-width@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/string-width/-/string-width-3.1.0.tgz#22767be21b62af1081574306f69ac51b62203961" + integrity sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w== + dependencies: + emoji-regex "^7.0.1" + is-fullwidth-code-point "^2.0.0" + strip-ansi "^5.1.0" + +string.prototype.trimend@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/string.prototype.trimend/-/string.prototype.trimend-1.0.1.tgz#85812a6b847ac002270f5808146064c995fb6913" + integrity sha512-LRPxFUaTtpqYsTeNKaFOw3R4bxIzWOnbQ837QfBylo8jIxtcbK/A/sMV7Q+OAV/vWo+7s25pOE10KYSjaSO06g== + dependencies: + define-properties "^1.1.3" + es-abstract "^1.17.5" + +string.prototype.trimleft@^2.1.1: + version "2.1.2" + resolved "https://registry.yarnpkg.com/string.prototype.trimleft/-/string.prototype.trimleft-2.1.2.tgz#4408aa2e5d6ddd0c9a80739b087fbc067c03b3cc" + integrity sha512-gCA0tza1JBvqr3bfAIFJGqfdRTyPae82+KTnm3coDXkZN9wnuW3HjGgN386D7hfv5CHQYCI022/rJPVlqXyHSw== + dependencies: + define-properties "^1.1.3" + es-abstract "^1.17.5" + string.prototype.trimstart "^1.0.0" + +string.prototype.trimright@^2.1.1: + version "2.1.2" + resolved "https://registry.yarnpkg.com/string.prototype.trimright/-/string.prototype.trimright-2.1.2.tgz#c76f1cef30f21bbad8afeb8db1511496cfb0f2a3" + integrity sha512-ZNRQ7sY3KroTaYjRS6EbNiiHrOkjihL9aQE/8gfQ4DtAC/aEBRHFJa44OmoWxGGqXuJlfKkZW4WcXErGr+9ZFg== + dependencies: + define-properties "^1.1.3" + es-abstract "^1.17.5" + string.prototype.trimend "^1.0.0" + +string.prototype.trimstart@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/string.prototype.trimstart/-/string.prototype.trimstart-1.0.1.tgz#14af6d9f34b053f7cfc89b72f8f2ee14b9039a54" + integrity sha512-XxZn+QpvrBI1FOcg6dIpxUPgWCPuNXvMD72aaRaUQv1eD4e/Qy8i/hFTe0BUmD60p/QA6bh1avmuPTfNjqVWRw== + dependencies: + define-properties "^1.1.3" + es-abstract "^1.17.5" + string_decoder@~1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.1.1.tgz#9cf1611ba62685d7030ae9e4ba34149c3af03fc8" @@ -1185,12 +1720,24 @@ string_decoder@~1.1.1: dependencies: safe-buffer "~5.1.0" -strip-ansi@^3.0.0: - version "3.0.1" - resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-3.0.1.tgz#6a385fb8853d952d5ff05d0e8aaf94278dc63dcf" - integrity sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8= +strip-ansi@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-4.0.0.tgz#a8479022eb1ac368a871389b635262c505ee368f" + integrity sha1-qEeQIusaw2iocTibY1JixQXuNo8= dependencies: - ansi-regex "^2.0.0" + ansi-regex "^3.0.0" + +strip-ansi@^5.0.0, strip-ansi@^5.1.0, strip-ansi@^5.2.0: + version "5.2.0" + resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-5.2.0.tgz#8c9a536feb6afc962bdfa5b104a5091c1ad9c0ae" + integrity sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA== + dependencies: + ansi-regex "^4.1.0" + +strip-json-comments@2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-2.0.1.tgz#3c531942e908c2697c0ec344858c286c7ca0a60a" + integrity sha1-PFMZQukIwml8DsNEhYwobHygpgo= supports-color@5.4.0: version "5.4.0" @@ -1199,10 +1746,12 @@ supports-color@5.4.0: dependencies: has-flag "^3.0.0" -supports-color@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-2.0.0.tgz#535d045ce6b6363fa40117084629995e9df324c7" - integrity sha1-U10EXOa2Nj+kARcIRimZXp3zJMc= +supports-color@6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-6.0.0.tgz#76cfe742cf1f41bb9b1c29ad03068c05b4c0e40a" + integrity sha512-on9Kwidc1IUQo+bQdhi8+Tijpo0e1SS6RoGo2guUwn5vdaxw8RXOF9Vb2ws+ihWOmh4JnCJOvaziZWP1VABaLg== + dependencies: + has-flag "^3.0.0" supports-color@^5.3.0: version "5.5.0" @@ -1211,10 +1760,17 @@ supports-color@^5.3.0: dependencies: has-flag "^3.0.0" +supports-color@^7.1.0: + version "7.1.0" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-7.1.0.tgz#68e32591df73e25ad1c4b49108a2ec507962bfd1" + integrity sha512-oRSIpR8pxT1Wr2FquTNnGet79b3BWljqOuoW/h4oBhxJ/HUbX5nX6JSruTkvXDCFMwDPvsaTTbvMLKZWSy0R5g== + dependencies: + has-flag "^4.0.0" + tapable@^0.2.3: - version "0.2.8" - resolved "https://registry.yarnpkg.com/tapable/-/tapable-0.2.8.tgz#99372a5c999bf2df160afc0d74bed4f47948cd22" - integrity sha1-mTcqXJmb8t8WCvwNdL7U9HlIzSI= + version "0.2.9" + resolved "https://registry.yarnpkg.com/tapable/-/tapable-0.2.9.tgz#af2d8bbc9b04f74ee17af2b4d9048f807acd18a8" + integrity sha512-2wsvQ+4GwBvLPLWsNfLCDYGsW6xb7aeC6utq2Qh0PFwgEy7K7dsma9Jsmb2zSQj7GvYAyUGSntLtsv++GmgL1A== tern@^0.22.3: version "0.22.3" @@ -1228,24 +1784,26 @@ tern@^0.22.3: resolve-from "2.0.0" thunky@^1.0.2: - version "1.0.3" - resolved "https://registry.yarnpkg.com/thunky/-/thunky-1.0.3.tgz#f5df732453407b09191dae73e2a8cc73f381a826" - integrity sha512-YwT8pjmNcAXBZqrubu22P4FYsh2D4dxRmnWBOL8Jk8bUcRUtc5326kx32tuTmFDAZtLOGEVNl8POAR8j896Iow== + version "1.1.0" + resolved "https://registry.yarnpkg.com/thunky/-/thunky-1.1.0.tgz#5abaf714a9405db0504732bbccd2cedd9ef9537d" + integrity sha512-eHY7nBftgThBqOyHGVN+l8gF0BucP09fMo0oO/Lb0w1OF80dJv+lDVpXG60WMQvkcxAkNybKsrEIE3ZtKGmPrA== timm@^1.6.1: - version "1.6.1" - resolved "https://registry.yarnpkg.com/timm/-/timm-1.6.1.tgz#5f8aafc932248c76caf2c6af60542a32d3c30701" - integrity sha512-hqDTYi/bWuDxL2i6T3v6nrvkAQ/1Bc060GSkVEQZp02zTSTB4CHSKsOkliequCftQaNRcjRqUZmpGWs5FfhrNg== + version "1.6.2" + resolved "https://registry.yarnpkg.com/timm/-/timm-1.6.2.tgz#dfd8c6719f7ba1fcfc6295a32670a1c6d166c0bd" + integrity sha512-IH3DYDL1wMUwmIlVmMrmesw5lZD6N+ZOAFWEyLrtpoL9Bcrs9u7M/vyOnHzDD2SMs4irLkVjqxZbHrXStS/Nmw== tinycolor2@^1.4.1: version "1.4.1" resolved "https://registry.yarnpkg.com/tinycolor2/-/tinycolor2-1.4.1.tgz#f4fad333447bc0b07d4dc8e9209d8f39a8ac77e8" integrity sha1-9PrTM0R7wLB9TcjpIJ2POaisd+g= -trim@0.0.1: - version "0.0.1" - resolved "https://registry.yarnpkg.com/trim/-/trim-0.0.1.tgz#5858547f6b290757ee95cccc666fb50084c460dd" - integrity sha1-WFhUf2spB1fulczMZm+1AITEYN0= +to-regex-range@^5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/to-regex-range/-/to-regex-range-5.0.1.tgz#1648c44aae7c8d988a326018ed72f5b4dd0392e4" + integrity sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ== + dependencies: + is-number "^7.0.0" ts-node@^7.0.1: version "7.0.1" @@ -1262,39 +1820,45 @@ ts-node@^7.0.1: yn "^2.0.0" tslib@^1.8.0, tslib@^1.8.1: - version "1.9.3" - resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.9.3.tgz#d7e4dd79245d85428c4d7e4822a79917954ca286" - integrity sha512-4krF8scpejhaOgqzBEcGM7yDIEfi0/8+8zDRZhNZZ2kjmHJ4hv3zCbQWxoJGz1iw5U0Jl0nma13xzHXcncMavQ== + version "1.13.0" + resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.13.0.tgz#c881e13cc7015894ed914862d276436fa9a47043" + integrity sha512-i/6DQjL8Xf3be4K/E6Wgpekn5Qasl1usyw++dAA35Ue5orEn65VIxOA+YvNNl9HV3qv70T7CNwjODHZrLwvd1Q== tslint@^5.11.0: - version "5.11.0" - resolved "https://registry.yarnpkg.com/tslint/-/tslint-5.11.0.tgz#98f30c02eae3cde7006201e4c33cb08b48581eed" - integrity sha1-mPMMAurjzecAYgHkwzywi0hYHu0= + version "5.20.1" + resolved "https://registry.yarnpkg.com/tslint/-/tslint-5.20.1.tgz#e401e8aeda0152bc44dd07e614034f3f80c67b7d" + integrity sha512-EcMxhzCFt8k+/UP5r8waCf/lzmeSyVlqxqMEDQE7rWYiQky8KpIBz1JAoYXfROHrPZ1XXd43q8yQnULOLiBRQg== dependencies: - babel-code-frame "^6.22.0" + "@babel/code-frame" "^7.0.0" builtin-modules "^1.1.1" chalk "^2.3.0" commander "^2.12.1" - diff "^3.2.0" + diff "^4.0.1" glob "^7.1.1" - js-yaml "^3.7.0" + js-yaml "^3.13.1" minimatch "^3.0.4" + mkdirp "^0.5.1" resolve "^1.3.2" semver "^5.3.0" tslib "^1.8.0" - tsutils "^2.27.2" + tsutils "^2.29.0" -tsutils@^2.27.2: +tsutils@^2.29.0: version "2.29.0" resolved "https://registry.yarnpkg.com/tsutils/-/tsutils-2.29.0.tgz#32b488501467acbedd4b85498673a0812aca0b99" integrity sha512-g5JVHCIJwzfISaXpXE1qvNalca5Jwob6FjI4AoPlqMusJ6ftFE7IkkFoMhVLRgK+4Kx3gkzb8UZK5t5yTTvEmA== dependencies: tslib "^1.8.1" -tunnel@0.0.4: - version "0.0.4" - resolved "https://registry.yarnpkg.com/tunnel/-/tunnel-0.0.4.tgz#2d3785a158c174c9a16dc2c046ec5fc5f1742213" - integrity sha1-LTeFoVjBdMmhbcLARuxfxfF0IhM= +tunnel@0.0.6: + version "0.0.6" + resolved "https://registry.yarnpkg.com/tunnel/-/tunnel-0.0.6.tgz#72f1314b34a5b192db012324df2cc587ca47f92c" + integrity sha512-1h/Lnq9yajKY2PEbBadPXj3VxsDDu844OnaAo52UVmIzIvwwtBPIuNvkjuzBlTWpfJyUbG3ez0KSBibQkj4ojg== + +tweetnacl@^1.0.1, tweetnacl@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/tweetnacl/-/tweetnacl-1.0.3.tgz#ac0af71680458d8a6378d0d0d050ab1407d35596" + integrity sha512-6rt+RN7aOi1nGMyC4Xa5DdYiukl2UWCbcJft7YhxReBGQD7OAM8Pbxw6YMo4r2diNEA8FEmu32YOn9rhaiE5yw== type-detect@^4.0.0, type-detect@^4.0.5: version "4.0.8" @@ -1302,18 +1866,18 @@ type-detect@^4.0.0, type-detect@^4.0.5: integrity sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g== typed-rest-client@^1.0.9: - version "1.0.11" - resolved "https://registry.yarnpkg.com/typed-rest-client/-/typed-rest-client-1.0.11.tgz#de27fb2437cb0f94c3589b3e509caa3b80dbf24a" - integrity sha512-Iz2/p1EkJp8laAIlW/4h+3u+eJqmslosrX2wK1ofM74fCnRpM/EAPM+psjcQKomlNQrInKLPp/JYnsH4ZuzhQQ== + version "1.7.3" + resolved "https://registry.yarnpkg.com/typed-rest-client/-/typed-rest-client-1.7.3.tgz#1beb263b86b14d34596f6127c6172dd5fd652e7b" + integrity sha512-CwTpx/TkRHGZoHkJhBcp4X8K3/WtlzSHVQR0OIFnt10j4tgy4ypgq/SrrgVpA1s6tAL49Q6J3R5C0Cgfh2ddqA== dependencies: - nock "9.6.1" - tunnel "0.0.4" + qs "^6.9.1" + tunnel "0.0.6" underscore "1.8.3" typescript@^3.1.3: - version "3.1.6" - resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.1.6.tgz#b6543a83cfc8c2befb3f4c8fba6896f5b0c9be68" - integrity sha512-tDMYfVtvpb96msS1lDX9MEdHrW4yOuZ4Kdc4Him9oU796XldPYF/t2+uKoX0BBa0hXXwDlqYQbXY5Rzjzc5hBA== + version "3.9.3" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.9.3.tgz#d3ac8883a97c26139e42df5e93eeece33d610b8a" + integrity sha512-D/wqnB2xzNFIcoBG9FG8cXRDjiqSTbG2wd8DMZeQyJlP1vfTkIxH4GKveWaEBYySKIg+USu+E+EDIR47SqnaMQ== underscore@1.8.3: version "1.8.3" @@ -1332,6 +1896,67 @@ util-deprecate@~1.0.1: resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf" integrity sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8= +which-boxed-primitive@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/which-boxed-primitive/-/which-boxed-primitive-1.0.1.tgz#cbe8f838ebe91ba2471bb69e9edbda67ab5a5ec1" + integrity sha512-7BT4TwISdDGBgaemWU0N0OU7FeAEJ9Oo2P1PHRm/FCWoEi2VLWC9b6xvxAA3C/NMpxg3HXVgi0sMmGbNUbNepQ== + dependencies: + is-bigint "^1.0.0" + is-boolean-object "^1.0.0" + is-number-object "^1.0.3" + is-string "^1.0.4" + is-symbol "^1.0.2" + +which-collection@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/which-collection/-/which-collection-1.0.1.tgz#70eab71ebbbd2aefaf32f917082fc62cdcb70906" + integrity sha512-W8xeTUwaln8i3K/cY1nGXzdnVZlidBcagyNFtBdD5kxnb4TvGKR7FfSIS3mYpwWS1QUCutfKz8IY8RjftB0+1A== + dependencies: + is-map "^2.0.1" + is-set "^2.0.1" + is-weakmap "^2.0.1" + is-weakset "^2.0.1" + +which-module@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/which-module/-/which-module-2.0.0.tgz#d9ef07dce77b9902b8a3a8fa4b31c3e3f7e6e87a" + integrity sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho= + +which-typed-array@^1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/which-typed-array/-/which-typed-array-1.1.2.tgz#e5f98e56bda93e3dac196b01d47c1156679c00b2" + integrity sha512-KT6okrd1tE6JdZAy3o2VhMoYPh3+J6EMZLyrxBQsZflI1QCZIxMrIYLkosd8Twf+YfknVIHmYQPgJt238p8dnQ== + dependencies: + available-typed-arrays "^1.0.2" + es-abstract "^1.17.5" + foreach "^2.0.5" + function-bind "^1.1.1" + has-symbols "^1.0.1" + is-typed-array "^1.1.3" + +which@1.3.1: + version "1.3.1" + resolved "https://registry.yarnpkg.com/which/-/which-1.3.1.tgz#a45043d54f5805316da8d62f9f50918d3da70b0a" + integrity sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ== + dependencies: + isexe "^2.0.0" + +wide-align@1.1.3: + version "1.1.3" + resolved "https://registry.yarnpkg.com/wide-align/-/wide-align-1.1.3.tgz#ae074e6bdc0c14a431e804e624549c633b000457" + integrity sha512-QGkOQc8XL6Bt5PwnsExKBPuMKBxnGxWWW3fU55Xt4feHozMUhdUMaBCk290qpm/wG5u/RSKzwdAC4i51YigihA== + dependencies: + string-width "^1.0.2 || 2" + +wrap-ansi@^5.1.0: + version "5.1.0" + resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-5.1.0.tgz#1fd1f67235d5b6d0fee781056001bfb694c03b09" + integrity sha512-QC1/iN/2/RPVJ5jYK8BGttj5z83LmSKmvbvrXPNCLZSEb32KKVDJDl/MOt2N01qU2H/FkzEa9PKto1BqDjtd7Q== + dependencies: + ansi-styles "^3.2.0" + string-width "^3.0.0" + strip-ansi "^5.0.0" + wrappy@1: version "1.0.2" resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" @@ -1353,22 +1978,60 @@ xml-parse-from-string@^1.0.0: integrity sha1-qQKekp09vN7RafPG4oI42VpdWig= xml2js@^0.4.5: - version "0.4.19" - resolved "https://registry.yarnpkg.com/xml2js/-/xml2js-0.4.19.tgz#686c20f213209e94abf0d1bcf1efaa291c7827a7" - integrity sha512-esZnJZJOiJR9wWKMyuvSE1y6Dq5LCuJanqhxslH2bxM6duahNZ+HMpCLhBQGZkbX6xRf8x1Y2eJlgt2q3qo49Q== + version "0.4.23" + resolved "https://registry.yarnpkg.com/xml2js/-/xml2js-0.4.23.tgz#a0c69516752421eb2ac758ee4d4ccf58843eac66" + integrity sha512-ySPiMjM0+pLDftHgXY4By0uswI3SPKLDw/i3UXbnO8M/p28zqexCUoPmQFrYD+/1BzhGJSs2i1ERWKJAtiLrug== dependencies: sax ">=0.6.0" - xmlbuilder "~9.0.1" + xmlbuilder "~11.0.0" -xmlbuilder@~9.0.1: - version "9.0.7" - resolved "https://registry.yarnpkg.com/xmlbuilder/-/xmlbuilder-9.0.7.tgz#132ee63d2ec5565c557e20f4c22df9aca686b10d" - integrity sha1-Ey7mPS7FVlxVfiD0wi35rKaGsQ0= +xmlbuilder@~11.0.0: + version "11.0.1" + resolved "https://registry.yarnpkg.com/xmlbuilder/-/xmlbuilder-11.0.1.tgz#be9bae1c8a046e76b31127726347d0ad7002beb3" + integrity sha512-fDlsI/kFEx7gLvbecc0/ohLG50fugQp8ryHzMTuW9vSa1GJ0XYWKnhsUx7oie3G98+r56aTQIUB4kht42R3JvA== xtend@^4.0.0: - version "4.0.1" - resolved "https://registry.yarnpkg.com/xtend/-/xtend-4.0.1.tgz#a5c6d532be656e23db820efb943a1f04998d63af" - integrity sha1-pcbVMr5lbiPbgg77lDofBJmNY68= + version "4.0.2" + resolved "https://registry.yarnpkg.com/xtend/-/xtend-4.0.2.tgz#bb72779f5fa465186b1f438f674fa347fdb5db54" + integrity sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ== + +y18n@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/y18n/-/y18n-4.0.0.tgz#95ef94f85ecc81d007c264e190a120f0a3c8566b" + integrity sha512-r9S/ZyXu/Xu9q1tYlpsLIsa3EeLXXk0VwlxqTcFRfg9EhMW+17kbt9G0NrgCmhGb5vT2hyhJZLfDGx+7+5Uj/w== + +yargs-parser@13.1.2, yargs-parser@^13.1.2: + version "13.1.2" + resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-13.1.2.tgz#130f09702ebaeef2650d54ce6e3e5706f7a4fb38" + integrity sha512-3lbsNRf/j+A4QuSZfDRA7HRSfWrzO0YjqTJd5kjAq37Zep1CEgaYmrH9Q3GwPiB9cHyd1Y1UwggGhJGoxipbzg== + dependencies: + camelcase "^5.0.0" + decamelize "^1.2.0" + +yargs-unparser@1.6.0: + version "1.6.0" + resolved "https://registry.yarnpkg.com/yargs-unparser/-/yargs-unparser-1.6.0.tgz#ef25c2c769ff6bd09e4b0f9d7c605fb27846ea9f" + integrity sha512-W9tKgmSn0DpSatfri0nx52Joq5hVXgeLiqR/5G0sZNDoLZFOr/xjBUDcShCOGNsBnEMNo1KAMBkTej1Hm62HTw== + dependencies: + flat "^4.1.0" + lodash "^4.17.15" + yargs "^13.3.0" + +yargs@13.3.2, yargs@^13.3.0: + version "13.3.2" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-13.3.2.tgz#ad7ffefec1aa59565ac915f82dccb38a9c31a2dd" + integrity sha512-AX3Zw5iPruN5ie6xGRIDgqkT+ZhnRlZMLMHAs8tg7nRruy2Nb+i5o9bwghAogtM08q1dpr2LVoS8KSTMYpWXUw== + dependencies: + cliui "^5.0.0" + find-up "^3.0.0" + get-caller-file "^2.0.1" + require-directory "^2.1.1" + require-main-filename "^2.0.0" + set-blocking "^2.0.0" + string-width "^3.0.0" + which-module "^2.0.0" + y18n "^4.0.0" + yargs-parser "^13.1.2" yn@^2.0.0: version "2.0.0"