diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..c13a36a --- /dev/null +++ b/.editorconfig @@ -0,0 +1,6 @@ +root = true + +[*.{js,json}] +charset = utf-8 +indent_style = space +indent_size = 2 \ No newline at end of file diff --git a/README.md b/README.md index f2fce16..620cc5b 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,24 @@ -This app adds support for Sensative Strips in Homey. +This app adds support for the Sensative Strips family of products in Homey. + +## Supported devices with most common parameters: +* Strips Guard (door/window sensor) +* Strips Drip +* Strips Comfort + +## Supported Languages: +* English +* Dutch Release notes ------------- + +**2.0.0:** +* Support for notification command class for Strips Guard. + Using this instead of the binary sensor command class should fix an issue with devices with firmware 0.7 or older. +* Add tamper alarm capability for Strips Guard +* Preliminary support for Strips Drip and Strips Comfort +* Upgraded to Homey SDK 2.0 + **1.0.3:** * Z-Wave configuration parameters should be properly initialized upon inclusion now. * Requires Homey 1.0.3 firmware due to an issue in combination with 1.0.1 and 1.0.2 firmwares. diff --git a/app.js b/app.js index 327b21a..641ba20 100644 --- a/app.js +++ b/app.js @@ -1,6 +1,7 @@ 'use strict'; const Homey = require('homey'); +const Log = require('homey-log').Log; class SensativeZwave extends Homey.App { diff --git a/app.json b/app.json index 4c80292..bbff8d5 100644 --- a/app.json +++ b/app.json @@ -19,7 +19,7 @@ "small": "/assets/images/small.png" }, "version": "2.0.0", - "compatibility": ">=1.5.0", + "compatibility": "1.x >=1.5.0", "tags": { "en": [ "security", @@ -60,8 +60,8 @@ { "id": "1101011", "name": { - "en": "Strips-Contact", - "nl": "Strips-Contact" + "en": "Strips Guard", + "nl": "Strips Guard" }, "zwave": { "manufacturerId": 410, @@ -88,7 +88,7 @@ { "id": 1, "size": 1, - "value": 0 + "value": 1 }, { "id": 2, @@ -100,6 +100,7 @@ "class": "sensor", "capabilities": [ "alarm_contact", + "alarm_tamper", "measure_battery", "alarm_battery" ], @@ -109,10 +110,13 @@ }, "settings": [ { - "id": 1, - "value": "0", - "_size": 1, + "id": "report_type", + "value": "1", "type": "dropdown", + "zwave": { + "index": 1, + "size": 1 + }, "values": [ { "id": "0", @@ -120,22 +124,32 @@ "en": "Binary Sensor", "nl": "Binary Sensor" } + }, + { + "id": "1", + "label": { + "en": "Notification", + "nl": "Notification" + } } ], "label": { "en": "Notification type", - "nl": "Rapportagetype" + "nl": "Notificatietype" }, "hint": { - "en": "Notification type. Only binary sensor is currently supported.", - "nl": "Notificatietype. Enkel binary sensor wordt momenteel ondersteund." + "en": "Z-Wave command class used for reporting contact sensor events. Notification is typically best.", + "nl": "Z-Wave command class die gebruikt wordt voor rapportages van de contactsensor. Notification heeft meestal de voorkeur." } }, { - "id": 2, + "id": "led_indication", "type": "checkbox", - "_size": 1, "value": true, + "zwave": { + "index": 2, + "size": 1 + }, "label": { "en": "LED indication", "nl": "led-indicatie" @@ -148,17 +162,17 @@ ] }, { - "id": "1102012", + "id": "1102011", "name": { - "en": "Strips-Multi-Sensor", - "nl": "Strips-Multi-Sensor" + "en": "Strips Drip/Comfort", + "nl": "Strips Drip/Comfort" }, "zwave": { "manufacturerId": 410, "productTypeId": 3, "productId": 10, "learnmode": { - "image": "/drivers/1102012/assets/wakeup.svg", + "image": "/drivers/1102011/assets/wakeup.svg", "instruction": { "en": "Place the round magnet at the rounded edge. When the LED blinks, move the magnet away. Repeat 3 times within 10 seconds.", "nl": "Plaats de ronde magneet op de afgeronde zijde. Haal de magneet weer weg als de LED knippert. Herhaal 3 keer binnen 10 seconden." @@ -179,23 +193,51 @@ "capabilities": [ "measure_temperature", "measure_luminance", - "measure_moisture", + "measure_humidity", "alarm_heat", "alarm_water", "measure_battery", "alarm_battery" ], "images": { - "large": "/drivers/1102012/assets/images/large.jpg", - "small": "/drivers/1102012/assets/images/small.jpg" + "large": "/drivers/1102011/assets/images/large.jpg", + "small": "/drivers/1102011/assets/images/small.jpg" }, "settings": [ { "id": 10, + "value": 40000, + "label": { + "en": "High ambient light report level", + "nl": "High ambient light report level" + }, + "hint": { + "en": "3 to 64000", + "nl": "3 tot 64000" + }, + "_size": 4, + "type": "number" + }, + { + "id": 11, + "value": 5000, + "label": { + "en": "Low ambient light report level (Must be significantly lower than parameter 10)", + "nl": "Low ambient light report level (Must be significantly lower than parameter 10)" + }, + "hint": { + "en": "1 to 42000", + "nl": "1 tot 42000" + }, + "_size": 4, + "type": "number" + }, + { + "id": 12, "value": true, "label": { "en": "Leakage alarm", - "nl": "Lekkage alarm" + "nl": "Lekkage-alarm" }, "hint": { "en": "0: Off\r\n1: On", @@ -205,43 +247,57 @@ "type": "checkbox" }, { - "id": 11, - "value": 25, + "id": 13, + "value": 10, "label": { "en": "Leakage alarm level", "nl": "Lekkage alarm level" }, "hint": { - "en": "1 to 100\r\n(1= almost dry, 100= soaking wet)", - "nl": "1 tot 100\r\n(1= Bijna droog, 100= Erg nat)" + "en": "1 to 100\r\n(1= almost dry, 100= wet)", + "nl": "1 tot 100\r\n(1= Bijna droog, 100= nat)" }, "_size": 1, "type": "number" }, { - "id": 12, + "id": 14, "value": 0, "label": { "en": "Moisture reporting period", - "nl": "Vochtigheid rapportage periode" + "nl": "Vochtigheid rapportageperiode" }, "hint": { - "en": "0-240: Number of hours between moisture reports", - "nl": "0-240: Aantal uren tussen vochyigheids rapportage" + "en": "0-120: Number of hours between moisture reports", + "nl": "0-120: Aantal uren tussen vochtigheidsrapportage" }, "_size": 1, "type": "number" }, + { + "id": 2, + "value": true, + "label": { + "en": "LED alarm event reporting", + "nl": "LED alarm event rapportage" + }, + "hint": { + "en": "0: Off\r\n1: On", + "nl": "0: Uit\r\n1: Aan" + }, + "_size": 1, + "type": "checkbox" + }, { "id": 3, "value": 1, "label": { - "en": "Temperature reporting mode", - "nl": "Temperatuur rapportage modus" + "en": "Temperature & Light reporting frequency", + "nl": "Temperatuur & Light rapportage frequency" }, "hint": { - "en": "0: Off\r\n1: Normal\r\n2: High Accuracy", - "nl": "0: Uit\r\n1: Normaal\r\n2: Secuur" + "en": "1: Normal\r\n2: Frequent", + "nl": "1: Normaal\r\n2: Frequent" }, "_size": 1, "type": "number" @@ -250,12 +306,12 @@ "id": 4, "value": true, "label": { - "en": "Temperature reporting unit", - "nl": "Temperatuur rapportage eenheid" + "en": "Temperature reporting (Does not affect temperature alarms)", + "nl": "Temperatuur rapportage (Does not affect temperature alarms)" }, "hint": { - "en": "0: Celcius\r\n1: Fahrenheit", - "nl": "0: Celcius\r\n1: Fahrenheit" + "en": "0: Off\r\n1: On", + "nl": "0: Uit\r\n1: Aan" }, "_size": 1, "type": "checkbox" @@ -264,43 +320,43 @@ "id": 5, "value": true, "label": { - "en": "High Temperature alarm", - "nl": "Hoge temperatuur alarm" + "en": "Temperature reporting unit", + "nl": "Temperatuur rapportage eenheid" }, "hint": { - "en": "0: Off\r\n1: On", - "nl": "0: Uit\r\n1: Aan" + "en": "0: Celcius\r\n1: Fahrenheit", + "nl": "0: Celcius\r\n1: Fahrenheit" }, "_size": 1, "type": "checkbox" }, { "id": 6, - "value": 60, + "value": false, "label": { - "en": "High Temperature alarm level", - "nl": "Hoge Temperatuur alarm nivo" + "en": "Temperature alarms", + "nl": "temperatuur alarms" }, "hint": { - "en": "-20 to + 60 degree C", - "nl": "-20 tot + 60 degree C" + "en": "0: Off\r\n1: On", + "nl": "0: Uit\r\n1: Aan" }, "_size": 1, - "type": "number" + "type": "checkbox" }, { "id": 7, - "value": true, + "value": 60, "label": { - "en": "Low Temperature alarm", - "nl": "Lage Temperatuur alarm" + "en": "High Temperature alarm level", + "nl": "Hoge Temperatuur alarm niveau" }, "hint": { - "en": "0: Off\r\n1: On", - "nl": "0: Uit\r\n1: Aan" + "en": "-20 to +60 degrees Celcius", + "nl": "-20 tot +60 graden Celsius" }, "_size": 1, - "type": "checkbox" + "type": "number" }, { "id": 8, @@ -310,28 +366,28 @@ "nl": "Laag Temperatuur alarm nivo" }, "hint": { - "en": "-20 to + 60 degree C", - "nl": "-20 tot + 60 degree C" + "en": "-20 to +60 degrees Celcius", + "nl": "-20 tot +60 graden Celcius" }, "_size": 1, "type": "number" }, { "id": 9, - "value": true, + "value": 1, "label": { "en": "Ambient light reporting", "nl": "Omgevingslicht rapportage" }, "hint": { - "en": "0: Off\r\n1: On", - "nl": "0: Uit\r\n1: Aan" + "en": "0: Off\r\n1: On\r\n2: Report only when levels defined in parameter 10 & 11 are passed.", + "nl": "0: Uit\r\n1: Aan\r\n2: Report only when levels defined in parameter 10 & 11 are passed." }, "_size": 1, - "type": "checkbox" + "type": "number" } ] } ], "flow": {} -} +} \ No newline at end of file diff --git a/config/drivers/1101011.json b/config/drivers/1101011.json deleted file mode 100644 index 5119de9..0000000 --- a/config/drivers/1101011.json +++ /dev/null @@ -1,80 +0,0 @@ -{ - "id": "1101011", - "name": { - "en": "Strips-Contact", - "nl": "Strips-Contact" - }, - "zwave": { - "manufacturerId": 410, - "productTypeId": 3, - "productId": 3, - "learnmode": { - "image": "/drivers/1101011/assets/wakeup.svg", - "instruction": { - "en": "Place the round magnet at the rounded edge. When the LED blinks, move the magnet away. Repeat 3 times within 10 seconds.", - "nl": "Plaats de ronde magneet op de afgeronde zijde. Haal de magneet weer weg als de LED knippert. Herhaal 3 keer binnen 10 seconden." - } - }, - "associationGroups": [1], - "associationGroupsOptions": { - "1": { - "hint": { - "en": "Z-Wave Plus Lifeline" - } - } - }, - "defaultConfiguration": [{ - "id": 1, - "size": 1, - "value": 0 - }, - { - "id": 2, - "size": 1, - "value": 1 - } - ] - }, - "class": "sensor", - "capabilities": ["alarm_contact", "measure_battery", "alarm_battery"], - "images": { - "large": "/drivers/1101011/assets/images/large.jpg", - "small": "/drivers/1101011/assets/images/small.jpg" - }, - "settings": [{ - "id": 1, - "value": "0", - "_size": 1, - "type": "dropdown", - "values": [{ - "id": "0", - "label": { - "en": "Binary Sensor", - "nl": "Binary Sensor" - } - }], - "label": { - "en": "Notification type", - "nl": "Rapportagetype" - }, - "hint": { - "en": "Notification type. Only binary sensor is currently supported.", - "nl": "Notificatietype. Enkel binary sensor wordt momenteel ondersteund." - } - }, - { - "id": 2, - "type": "checkbox", - "_size": 1, - "value": true, - "label": { - "en": "LED indication", - "nl": "led-indicatie" - }, - "hint": { - "en": "When enabled, the LED on Strips will flash shortly when the door/window is opened.", - "nl": "Wanneer ingeschakeld zal de led op Strips kort oplichten als de deur of het raam wordt geopened." - } - } - ] -} diff --git a/config/drivers/1102012..json b/config/drivers/1102012..json deleted file mode 100644 index 2dba937..0000000 --- a/config/drivers/1102012..json +++ /dev/null @@ -1,175 +0,0 @@ -{ - "id": "1102012", - "name": { - "en": "Strips-Multi-Sensor", - "nl": "Strips-Multi-Sensor" - }, - "zwave": { - "manufacturerId": 410, - "productTypeId": 3, - "productId": 10, - "learnmode": { - "image": "/drivers/1102012/assets/wakeup.svg", - "instruction": { - "en": "Place the round magnet at the rounded edge. When the LED blinks, move the magnet away. Repeat 3 times within 10 seconds.", - "nl": "Plaats de ronde magneet op de afgeronde zijde. Haal de magneet weer weg als de LED knippert. Herhaal 3 keer binnen 10 seconden." - } - }, - "associationGroups": [1], - "associationGroupsOptions": { - "1": { - "hint": { - "en": "Z-Wave Plus Lifeline" - } - } - } - }, - "class": "sensor", - "capabilities": ["measure_temperature", "measure_luminance", "measure_moisture", "alarm_heat", "alarm_water", "measure_battery", "alarm_battery"], - "images": { - "large": "/drivers/1102012/assets/images/large.jpg", - "small": "/drivers/1102012/assets/images/small.jpg" - }, - "settings": [{ - "id": 10, - "value": true, - "label": { - "en": "Leakage alarm", - "nl": "Lekkage alarm" - }, - "hint": { - "en": "0: Off\r\n1: On", - "nl": "0: Uit\r\n1: Aan" - }, - "_size": 1, - "type": "checkbox" - }, - { - "id": 11, - "value": 25, - "label": { - "en": "Leakage alarm level", - "nl": "Lekkage alarm level" - }, - "hint": { - "en": "1 to 100\r\n(1= almost dry, 100= soaking wet)", - "nl": "1 tot 100\r\n(1= Bijna droog, 100= Erg nat)" - }, - "_size": 1, - "type": "number" - }, - { - "id": 12, - "value": 0, - "label": { - "en": "Moisture reporting period", - "nl": "Vochtigheid rapportage periode" - }, - "hint": { - "en": "0-240: Number of hours between moisture reports", - "nl": "0-240: Aantal uren tussen vochyigheids rapportage" - }, - "_size": 1, - "type": "number" - }, - { - "id": 3, - "value": 1, - "label": { - "en": "Temperature reporting mode", - "nl": "Temperatuur rapportage modus" - }, - "hint": { - "en": "0: Off\r\n1: Normal\r\n2: High Accuracy", - "nl": "0: Uit\r\n1: Normaal\r\n2: Secuur" - }, - "_size": 1, - "type": "number" - }, - { - "id": 4, - "value": true, - "label": { - "en": "Temperature reporting unit", - "nl": "Temperatuur rapportage eenheid" - }, - "hint": { - "en": "0: Celcius\r\n1: Fahrenheit", - "nl": "0: Celcius\r\n1: Fahrenheit" - }, - "_size": 1, - "type": "checkbox" - }, - { - "id": 5, - "value": true, - "label": { - "en": "High Temperature alarm", - "nl": "Hoge temperatuur alarm" - }, - "hint": { - "en": "0: Off\r\n1: On", - "nl": "0: Uit\r\n1: Aan" - }, - "_size": 1, - "type": "checkbox" - }, - { - "id": 6, - "value": 60, - "label": { - "en": "High Temperature alarm level", - "nl": "Hoge Temperatuur alarm nivo" - }, - "hint": { - "en": "-20 to + 60 degree C", - "nl": "-20 tot + 60 degree C" - }, - "_size": 1, - "type": "number" - }, - { - "id": 7, - "value": true, - "label": { - "en": "Low Temperature alarm", - "nl": "Lage Temperatuur alarm" - }, - "hint": { - "en": "0: Off\r\n1: On", - "nl": "0: Uit\r\n1: Aan" - - }, - "_size": 1, - "type": "checkbox" - }, - { - "id": 8, - "value": -20, - "label": { - "en": "Low Temperature alarm level", - "nl": "Laag Temperatuur alarm nivo" - }, - "hint": { - "en": "-20 to + 60 degree C", - "nl": "-20 tot + 60 degree C" - }, - "_size": 1, - "type": "number" - }, - { - "id": 9, - "value": true, - "label": { - "en": "Ambient light reporting", - "nl": "Omgevingslicht rapportage" - }, - "hint": { - "en": "0: Off\r\n1: On", - "nl": "0: Uit\r\n1: Aan" - }, - "_size": 1, - "type": "checkbox" - } - ] -} diff --git a/drivers/1101011/device.js b/drivers/1101011/device.js index dbf6208..2ed2442 100644 --- a/drivers/1101011/device.js +++ b/drivers/1101011/device.js @@ -2,13 +2,81 @@ const ZwaveDevice = require('homey-meshdriver').ZwaveDevice; +const i18n = { + settings: { + notificationTypeChangedSaveMessage: { + en: 'Notification type changed. In order to ensure continued proper operation, the Strips needs to be woken up manually.', + nl: 'Notificatietype gewijzigd. Voor correct functioneren moet de Strips handmatig wakker gemaakt worden.' + } + } +}; + +function tamperReportParser(report) { + if (report && report['Notification Type'] === 'Home Security' && report.hasOwnProperty('Event (Parsed)')) { + if (report['Event (Parsed)'] === 'Tampering, Invalid Code') { + return true; + } + if (report['Event'] === 254) { + return false; + } + } + return null; +} + class StripsMaZw extends ZwaveDevice { onMeshInit() { - //this.enableDebug(); - //this.printNode(); - this.registerCapability('alarm_contact', 'NOTIFICATION'); - this.registerCapability('alarm_battery', 'BATTERY'); + this.registerSetting('report_type', value => new Buffer([parseInt(value)])); + this.registerSetting('led_indication', value => new Buffer([value ? 1 : 0])); + + const settings = this.getSettings(); + this.registerAlarmContactCapability(settings.report_type); this.registerCapability('measure_battery', 'BATTERY'); + this.registerOptionalCapabilities(); + } + + /** + * Register capabilities which may not be advertised on the node when it was registed using an older version of the driver. + * At first glance, registering these unconditionally doesn't appear to be a problem, but warning messages about unobserved + * rejected promises were appearing when the node was being removed. Apparently in future versions this will cause the app + * to crash, so this is just to be on the safe side... + */ + registerOptionalCapabilities() { + const capabilities = this.getCapabilities(); + + if (capabilities.includes('alarm_battery')) { + this.registerCapability('alarm_battery', 'BATTERY'); + } + + if (capabilities.includes('alarm_tamper')) { + this.registerCapability('alarm_tamper', 'NOTIFICATION', { reportParser: tamperReportParser }); + } + } + + async onSettings(oldSettings, newSettings, changedKeysArr) { + let result = await super.onSettings(oldSettings, newSettings, changedKeysArr); + + if (changedKeysArr.includes('report_type')) { + this.registerAlarmContactCapability(newSettings.report_type); + return i18n.settings.notificationTypeChangedSaveMessage; + } + + return result; + } + + registerAlarmContactCapability(notificationType) { + switch (notificationType) { + case '0': + this.log('Using SENSOR_BINARY command class'); + this.registerCapability('alarm_contact', 'SENSOR_BINARY'); + break; + default: + this.log('No valid notification type set.') + case '1': + this.log('Using NOTIFICATION command class') + this.registerCapability('alarm_contact', 'NOTIFICATION'); + break; + } } } + module.exports = StripsMaZw; diff --git a/drivers/1102012/assets/icon.svg b/drivers/1102011/assets/icon.svg similarity index 100% rename from drivers/1102012/assets/icon.svg rename to drivers/1102011/assets/icon.svg diff --git a/drivers/1102012/assets/images/large.jpg b/drivers/1102011/assets/images/large.jpg similarity index 100% rename from drivers/1102012/assets/images/large.jpg rename to drivers/1102011/assets/images/large.jpg diff --git a/drivers/1102012/assets/images/small.jpg b/drivers/1102011/assets/images/small.jpg similarity index 100% rename from drivers/1102012/assets/images/small.jpg rename to drivers/1102011/assets/images/small.jpg diff --git a/drivers/1102012/assets/wakeup.svg b/drivers/1102011/assets/wakeup.svg similarity index 100% rename from drivers/1102012/assets/wakeup.svg rename to drivers/1102011/assets/wakeup.svg diff --git a/drivers/1102012/device.js b/drivers/1102011/device.js similarity index 87% rename from drivers/1102012/device.js rename to drivers/1102011/device.js index 9ea6929..fa400ad 100644 --- a/drivers/1102012/device.js +++ b/drivers/1102011/device.js @@ -2,7 +2,7 @@ const ZwaveDevice = require('homey-meshdriver').ZwaveDevice; -class Strips-Multi-sensor extends ZwaveDevice { +class StripsMultiSensor extends ZwaveDevice { onMeshInit() { //this.enableDebug(); //this.printNode(); @@ -15,4 +15,4 @@ class Strips-Multi-sensor extends ZwaveDevice { this.registerCapability('measure_battery', 'BATTERY'); } } -module.exports = Strips-Multi-sensor; +module.exports = StripsMultiSensor; \ No newline at end of file diff --git a/locales/en.json b/locales/en.json index 9e26dfe..22dd7db 100644 --- a/locales/en.json +++ b/locales/en.json @@ -1 +1,3 @@ -{} \ No newline at end of file +{ + "requireWakeUpWarning": "Notifications may stop functioning until the device has been woken up." +} \ No newline at end of file diff --git a/node_modules/.bin/raven b/node_modules/.bin/raven index 91e62fa..f9a6282 100644 --- a/node_modules/.bin/raven +++ b/node_modules/.bin/raven @@ -1 +1,15 @@ -../raven/bin/raven \ No newline at end of file +#!/bin/sh +basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") + +case `uname` in + *CYGWIN*) basedir=`cygpath -w "$basedir"`;; +esac + +if [ -x "$basedir/node" ]; then + "$basedir/node" "$basedir/../raven/bin/raven" "$@" + ret=$? +else + node "$basedir/../raven/bin/raven" "$@" + ret=$? +fi +exit $ret diff --git a/node_modules/.bin/raven.cmd b/node_modules/.bin/raven.cmd new file mode 100644 index 0000000..2916959 --- /dev/null +++ b/node_modules/.bin/raven.cmd @@ -0,0 +1,7 @@ +@IF EXIST "%~dp0\node.exe" ( + "%~dp0\node.exe" "%~dp0\..\raven\bin\raven" %* +) ELSE ( + @SETLOCAL + @SET PATHEXT=%PATHEXT:;.JS;=;% + node "%~dp0\..\raven\bin\raven" %* +) \ No newline at end of file diff --git a/node_modules/.bin/uuid b/node_modules/.bin/uuid index b3e45bc..f3bfcf4 100644 --- a/node_modules/.bin/uuid +++ b/node_modules/.bin/uuid @@ -1 +1,15 @@ -../uuid/bin/uuid \ No newline at end of file +#!/bin/sh +basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") + +case `uname` in + *CYGWIN*) basedir=`cygpath -w "$basedir"`;; +esac + +if [ -x "$basedir/node" ]; then + "$basedir/node" "$basedir/../uuid/bin/uuid" "$@" + ret=$? +else + node "$basedir/../uuid/bin/uuid" "$@" + ret=$? +fi +exit $ret diff --git a/node_modules/.bin/uuid.cmd b/node_modules/.bin/uuid.cmd new file mode 100644 index 0000000..da52d68 --- /dev/null +++ b/node_modules/.bin/uuid.cmd @@ -0,0 +1,7 @@ +@IF EXIST "%~dp0\node.exe" ( + "%~dp0\node.exe" "%~dp0\..\uuid\bin\uuid" %* +) ELSE ( + @SETLOCAL + @SET PATHEXT=%PATHEXT:;.JS;=;% + node "%~dp0\..\uuid\bin\uuid" %* +) \ No newline at end of file diff --git a/node_modules/almost-equal/package.json b/node_modules/almost-equal/package.json index 05756a2..6a39a30 100644 --- a/node_modules/almost-equal/package.json +++ b/node_modules/almost-equal/package.json @@ -21,7 +21,7 @@ "_resolved": "https://registry.npmjs.org/almost-equal/-/almost-equal-1.1.0.tgz", "_shasum": "f851c631138757994276aa2efbe8dfa3066cccdd", "_spec": "almost-equal@^1.1.0", - "_where": "/Users/robinbolscher/Development/apps/com.osram.lightify.zigbee/node_modules/mumath", + "_where": "D:\\Projects\\Homey\\com.sensative\\node_modules\\mumath", "author": { "name": "Mikola Lysenko" }, diff --git a/node_modules/color-space/hpluv.js b/node_modules/color-space/hpluv.js new file mode 100644 index 0000000..eab3e30 --- /dev/null +++ b/node_modules/color-space/hpluv.js @@ -0,0 +1,32 @@ +/** + * A uniform wrapper for hpluv. + * // http://www.hsluv.org/ + * + * @module color-space/hpluv + */ +'use strict' + +var xyz = require('./xyz'); +var lchuv = require('./lchuv'); +var _hsluv = require('hsluv'); + +module.exports = { + name: 'hpluv', + min: [0,0,0], + max: [360,100,100], + channel: ['hue', 'saturation', 'lightness'], + alias: ['HPLuv', 'HuSLp'], + + lchuv: _hsluv.hpluvToLch, + xyz: function(arg){return lchuv.xyz(_hsluv.hpluvToLch(arg));}, + + //a shorter way to convert to husl + hsluv: function(arg){ + return _hsluv.lchToHsluv( _hsluv.hpluvToLch(arg)); + } + +}; + +//extend lchuv, xyz +lchuv.hpluv = _hsluv.lchToHpluv; +xyz.hpluv = function(arg){return _hsluv.lchToHpluv(xyz.lchuv(arg));}; diff --git a/node_modules/color-space/hsluv.js b/node_modules/color-space/hsluv.js new file mode 100644 index 0000000..0ac1714 --- /dev/null +++ b/node_modules/color-space/hsluv.js @@ -0,0 +1,37 @@ +/** + * A uniform wrapper for hsluv. + * // http://www.hsluv.org/ + * + * @module color-space/hsluv + */ +'use strict' + +var xyz = require('./xyz'); +var lchuv = require('./lchuv'); +var _hsluv = require('hsluv'); + + +module.exports = { + name: 'hsluv', + min: [0,0,0], + max: [360,100,100], + channel: ['hue', 'saturation', 'lightness'], + alias: ['HSLuv', 'HuSL'], + + lchuv: _hsluv.hsluvToLch, + + xyz: function(arg){ + return lchuv.xyz(_hsluv.hsluvToLch(arg)); + }, + + //a shorter way to convert to hpluv + hpluv: function(arg){ + return _hsluv.lchToHpluv( _hsluv.hsluvToLch(arg)); + } +}; + +//extend lchuv, xyz +lchuv.hsluv = _hsluv.lchToHsluv; +xyz.hsluv = function(arg){ + return _hsluv.lchToHsluv(xyz.lchuv(arg)); +}; diff --git a/node_modules/color-space/hsp.js b/node_modules/color-space/hsp.js new file mode 100644 index 0000000..2a27eb1 --- /dev/null +++ b/node_modules/color-space/hsp.js @@ -0,0 +1,154 @@ +/** + * @module color-space/hsp + */ +'use strict' + +var rgb = require('./rgb'), + Pr = 0.299, + Pg = 0.587, + Pb = 0.114; + +module.exports = { + name: 'hsp', + min: [0, 0, 0], + max: [360, 100, 255], + channel: ['hue', 'saturation', 'perceived_brightness'], + alias: ['HSP'], + + rgb: function (hsp) { + var h = hsp[0]/360.0, + s = hsp[1]/100.0, + p = hsp[2], + r, g, b, part, + minOverMax = 1.0 - s; + + if (minOverMax > 0.0) { + if (h < 1.0 / 6.0) { // R>G>B + h = 6.0 * (h - 0.0 / 6.0); + part = 1.0 + h * (1.0 / minOverMax - 1.0); + b = p / Math.sqrt(Pr / minOverMax / minOverMax + Pg * part * part + Pb); + r = (b) / minOverMax; + g = (b) + h * ((r) - (b)); + } else if (h < 2.0 / 6.0) { // G>R>B + h = 6.0 * (-h + 2.0 / 6.0); + part = 1.0 + h * (1.0 / minOverMax - 1.0); + b = p / Math.sqrt(Pg / minOverMax / minOverMax + Pr * part * part + Pb); + g = (b) / minOverMax; + r = (b) + h * ((g) - (b)); + } else if (h < 3.0 / 6.0) { // G>B>R + h = 6.0 * (h - 2.0 / 6.0); + part = 1.0 + h * (1.0 / minOverMax - 1.0); + r = p / Math.sqrt(Pg / minOverMax / minOverMax + Pb * part * part + Pr); + g = (r) / minOverMax; + b = (r) + h * ((g) - (r)); + } else if (h < 4.0 / 6.0) { // B>G>R + h = 6.0 * (-h + 4.0 / 6.0); + part = 1.0 + h * (1.0 / minOverMax - 1.0); + r = p / Math.sqrt(Pb / minOverMax / minOverMax + Pg * part * part + Pr); + b = (r) / minOverMax; + g = (r) + h * ((b) - (r)); + } else if (h < 5.0 / 6.0) { // B>R>G + h = 6.0 * (h - 4.0 / 6.0); + part = 1.0 + h * (1.0 / minOverMax - 1.0); + g = p / Math.sqrt(Pb / minOverMax / minOverMax + Pr * part * part + Pg); + b = (g) / minOverMax; + r = (g) + h * ((b) - (g)); + } else { // R>B>G + h = 6.0 * (-h + 6.0 / 6.0); + part = 1.0 + h * (1.0 / minOverMax - 1.0); + g = p / Math.sqrt(Pr / minOverMax / minOverMax + Pb * part * part + Pg); + r = (g) / minOverMax; + b = (g) + h * ((r) - (g)); + } + } else { + if (h < 1.0 / 6.0) { // R>G>B + h = 6.0 * (h - 0.0 / 6.0); + r = Math.sqrt(p * p / (Pr + Pg * h * h)); + g = (r) * h; + b = 0.0; + } else if (h < 2.0 / 6.0) { // G>R>B + h = 6.0 * (-h + 2.0 / 6.0); + g = Math.sqrt(p * p / (Pg + Pr * h * h)); + r = (g) * h; + b = 0.0; + } else if (h < 3.0 / 6.0) { // G>B>R + h = 6.0 * (h - 2.0 / 6.0); + g = Math.sqrt(p * p / (Pg + Pb * h * h)); + b = (g) * h; + r = 0.0; + } else if (h < 4.0 / 6.0) { // B>G>R + h = 6.0 * (-h + 4.0 / 6.0); + b = Math.sqrt(p * p / (Pb + Pg * h * h)); + g = (b) * h; + r = 0.0; + } else if (h < 5.0 / 6.0) { // B>R>G + h = 6.0 * (h - 4.0 / 6.0); + b = Math.sqrt(p * p / (Pb + Pr * h * h)); + r = (b) * h; + g = 0.0; + } else { // R>B>G + h = 6.0 * (-h + 6.0 / 6.0); + r = Math.sqrt(p * p / (Pr + Pb * h * h)); + b = (r) * h; + g = 0.0; + } + } + + return [Math.round(r), Math.round(g), Math.round(b)]; + } + + +}; + + +//append rgb +rgb.hsp = function (rgb) { + var r = parseInt(rgb[0], 10), + g = parseInt(rgb[1], 10), + b = parseInt(rgb[2], 10), + h, s, p; + + // Calculate the Perceived brightness + p = Math.sqrt(r * r * Pr + g * g * Pg + b * b * Pb); + + // Calculate the Hue and Saturation + if (r === g && r === b) { + h = 0.0; + s = 0.0; + } else { + // R is largest + if (r >= g && r >= b) { + if (b >= g) { + h = 6.0 / 6.0 - 1.0 / 6.0 * (b - g) / (r - g); + s = 1.0 - g / r; + } else { + h = 0.0 / 6.0 + 1.0 / 6.0 * (g - b) / (r - b); + s = 1.0 - b / r; + } + } + + // G is largest + if (g >= r && g >= b) { + if (r >= b) { + h = 2.0 / 6.0 - 1.0 / 6.0 * (r - b) / (g - b); + s = 1 - b / g; + } else { + h = 2.0 / 6.0 + 1.0 / 6.0 * (b - r) / (g - r); + s = 1.0 - r / g; + } + } + + // B is largest + if (b >= r && b >= g) { + if (g >= r) { + h = 4.0 / 6.0 - 1.0 / 6.0 * (g - r) / (b - r); + s = 1.0 - r / b; + } else { + h = 4.0 / 6.0 + 1.0 / 6.0 * (r - g) / (b - g); + s = 1.0 - g / b; + } + } + } + + return [Math.round(h*360.0), s*100.0, Math.round(p)]; +}; diff --git a/node_modules/color-space/husl.js b/node_modules/color-space/husl.js deleted file mode 100644 index 3535397..0000000 --- a/node_modules/color-space/husl.js +++ /dev/null @@ -1,37 +0,0 @@ -/** - * A uniform wrapper for husl. - * // http://www.boronine.com/husl/ - * - * @module color-space/husl - */ -'use strict' - -var xyz = require('./xyz'); -var lchuv = require('./lchuv'); -var _husl = require('husl'); - - -module.exports = { - name: 'husl', - min: [0,0,0], - max: [360,100,100], - channel: ['hue', 'saturation', 'lightness'], - alias: ['HuSL'], - - lchuv: _husl._conv.husl.lch, - - xyz: function(arg){ - return lchuv.xyz(_husl._conv.husl.lch(arg)); - }, - - //a shorter way to convert to huslp - huslp: function(arg){ - return _husl._conv.lch.huslp( _husl._conv.husl.lch(arg)); - } -}; - -//extend lchuv, xyz -lchuv.husl = _husl._conv.lch.husl; -xyz.husl = function(arg){ - return _husl._conv.lch.husl(xyz.lchuv(arg)); -}; diff --git a/node_modules/color-space/huslp.js b/node_modules/color-space/huslp.js deleted file mode 100644 index f6ddca0..0000000 --- a/node_modules/color-space/huslp.js +++ /dev/null @@ -1,31 +0,0 @@ -/** - * A uniform wrapper for huslp. - * // http://www.boronine.com/husl/ - * - * @module color-space/huslp - */ -'use strict' - -var xyz = require('./xyz'); -var lchuv = require('./lchuv'); -var _husl = require('husl'); - -module.exports = { - name: 'huslp', - min: [0,0,0], - max: [360,100,100], - channel: ['hue', 'saturation', 'lightness'], - alias: ['HuSLp'], - - lchuv: _husl._conv.huslp.lch, - xyz: function(arg){return lchuv.xyz(_husl._conv.huslp.lch(arg));}, - - //a shorter way to convert to husl - husl: function(arg){ - return _husl._conv.lch.husl( _husl._conv.huslp.lch(arg)); - } -}; - -//extend lchuv, xyz -lchuv.huslp = _husl._conv.lch.huslp; -xyz.huslp = function(arg){return _husl._conv.lch.huslp(xyz.lchuv(arg));}; diff --git a/node_modules/color-space/index.js b/node_modules/color-space/index.js index de7b78a..2c50580 100644 --- a/node_modules/color-space/index.js +++ b/node_modules/color-space/index.js @@ -35,14 +35,16 @@ var spaces = { lchab: require('./lchab'), luv: require('./luv'), lchuv: require('./lchuv'), - husl: require('./husl'), - huslp: require('./huslp'), + hsluv: require('./hsluv'), + hpluv: require('./hpluv'), cubehelix: require('./cubehelix'), coloroid: require('./coloroid'), hcg: require('./hcg'), + hcy: require('./hcy'), tsl: require('./tsl'), yes: require('./yes'), - osaucs: require('./osaucs') + osaucs: require('./osaucs'), + hsp: require('./hsp') }; diff --git a/node_modules/color-space/package.json b/node_modules/color-space/package.json index bc493f6..c273ba4 100644 --- a/node_modules/color-space/package.json +++ b/node_modules/color-space/package.json @@ -1,8 +1,8 @@ { "_from": "color-space@^1.14.7", - "_id": "color-space@1.14.7", + "_id": "color-space@1.16.0", "_inBundle": false, - "_integrity": "sha1-t/WjF3lCe7JfmSemlBDYDC6qpxs=", + "_integrity": "sha512-A6WMiFzunQ8KEPFmj02OnnoUnqhmSaHaZ/0LVFcPTdlvm8+3aMJ5x1HRHy3bDHPkovkf4sS0f4wsVvwk71fKkg==", "_location": "/color-space", "_phantomChildren": {}, "_requested": { @@ -18,21 +18,21 @@ "_requiredBy": [ "/homey-meshdriver" ], - "_resolved": "https://registry.npmjs.org/color-space/-/color-space-1.14.7.tgz", - "_shasum": "b7f5a31779427bb25f9927a69410d80c2eaaa71b", + "_resolved": "https://registry.npmjs.org/color-space/-/color-space-1.16.0.tgz", + "_shasum": "611781bca41cd8582a1466fd9e28a7d3d89772a2", "_spec": "color-space@^1.14.7", - "_where": "/Users/robinbolscher/Development/apps/com.osram.lightify.zigbee/node_modules/homey-meshdriver", + "_where": "D:\\Projects\\Homey\\com.sensative\\node_modules\\homey-meshdriver", "author": { "name": "Deema Yvanow", "email": "dfcreative@gmail.com" }, "bugs": { - "url": "https://github.com/dfcreative/color-space/issues" + "url": "https://github.com/colorjs/color-space/issues" }, "bundleDependencies": false, "dependencies": { - "husl": "^5.0.0", - "mumath": "^3.0.0" + "hsluv": "^0.0.3", + "mumath": "^3.3.4" }, "deprecated": false, "description": "Color space conversions and data", @@ -47,7 +47,7 @@ "*.js", "dist" ], - "homepage": "https://github.com/dfcreative/color-space#readme", + "homepage": "https://github.com/colorjs/color-space#readme", "keywords": [ "color", "colour", @@ -59,6 +59,7 @@ "luv", "lch", "cie", + "hsluv", "husl", "color-convert", "gamut", @@ -69,20 +70,21 @@ "coloroid", "cubehelix", "munsell", - "hcg" + "hcg", + "hsp" ], "license": "MIT", "main": "./index.js", "name": "color-space", "repository": { "type": "git", - "url": "git+ssh://git@github.com/dfcreative/color-space.git" + "url": "git+ssh://git@github.com/colorjs/color-space.git" }, "scripts": { "build": "browserify --standalone colorSpace ./index.js > dist/color-space.js", "min": "ccjs dist/color-space.js --language_in=ECMASCRIPT5 > dist/color-space.min.js && cat dist/color-space.min.js | gzip-size | pretty-bytes", "test": "mocha", - "watch": "watchify -r ./index:../index -r husl -r assert -r mumath -r queried -d -o test/bundle.js" + "watch": "watchify -r ./index:../index -r hsluv -r assert -r mumath -r queried -d -o test/bundle.js" }, - "version": "1.14.7" + "version": "1.16.0" } diff --git a/node_modules/color-space/readme.md b/node_modules/color-space/readme.md index ed9dc0e..de219f1 100644 --- a/node_modules/color-space/readme.md +++ b/node_modules/color-space/readme.md @@ -1,8 +1,8 @@ -# Color-space [![Build Status](https://travis-ci.org/scijs/color-space.svg?branch=master)](https://travis-ci.org/scijs/color-space) [![stable](http://badges.github.io/stability-badges/dist/stable.svg)](http://github.com/badges/stability-badges) +# Color-space [![Build Status](https://travis-ci.org/colorjs/color-space.svg?branch=master)](https://travis-ci.org/colorjs/color-space) [![stable](https://img.shields.io/badge/stability-stable-brightgreen.svg)](http://github.com/badges/stability-badges) [![OpenCollective](https://opencollective.com/color-space/backers/badge.svg)](#backers) [![OpenCollective](https://opencollective.com/color-space/sponsors/badge.svg)](#sponsors) - + -Conversions and data for color spaces. [Demo](http://scijs.github.io/color-space). +Conversions and data for color spaces. [Demo](http://colorjs.github.io/color-space). ## Usage @@ -54,8 +54,8 @@ rgb.hsl([200,230,100]); * [x] [LCHab](https://en.wikipedia.org/wiki/Lab_color_space#Cylindrical_representation:_CIELCh_or_CIEHLC) * [x] [LUV](http://en.wikipedia.org/wiki/CIELUV) * [x] [LCHuv](http://en.wikipedia.org/wiki/CIELUV#Cylindrical_representation) -* [x] [HuSL](http://www.boronine.com/husl/) -* [x] [HuSLp](http://www.boronine.com/husl/) +* [x] [HSLuv](http://www.hsluv.org/) +* [x] [HPLuv](http://www.hsluv.org/) * [x] [LABHunter](http://en.wikipedia.org/wiki/Lab_color_space#Hunter_Lab) * [x] [YUV](https://en.wikipedia.org/?title=YUV) * [x] [YIQ](https://en.wikipedia.org/?title=YIQ) @@ -87,7 +87,7 @@ rgb.hsl([200,230,100]); * [ ] [PhotoYCC](http://www5.informatik.tu-muenchen.de/lehre/vorlesungen/graphik/info/csc/COL_34.htm) * [x] [HCG](https://github.com/acterhd/hcg-legacy) * [ ] [HCL](http://www.chilliant.com/rgb2hsv.html) -* [ ] [HSP](http://alienryderflex.com/hsp.html) +* [x] [HSP](http://alienryderflex.com/hsp.html) * [ ] [HCY](http://chilliant.blogspot.ca/2012/08/rgbhcy-in-hlsl.html) * [x] [YES](http://www.atlantis-press.com/php/download_paper.php?id=198) — computationally effective color space for face recognition. * [ ] [British Standard Colour](http://www.britishstandardcolour.com/) @@ -105,6 +105,78 @@ The goal of project is to provide the most complete set of color spaces with max Thanks to all the color scientists, who devoted their lives to color research and delivered their knowledge to us, for now we can trust them and use their formulas and their code. +### Backers + +Support us with a monthly donation and help us continue our activities. [[Become a backer](https://opencollective.com/color-space#backer)] + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +### Sponsors + +Become a sponsor and get your logo on our README on Github with a link to your site. [[Become a sponsor](https://opencollective.com/color-space#sponsor)] + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ## Related diff --git a/node_modules/cookie/package.json b/node_modules/cookie/package.json index 33600c2..30c355e 100644 --- a/node_modules/cookie/package.json +++ b/node_modules/cookie/package.json @@ -1,65 +1,47 @@ { - "_args": [ - [ - "cookie@0.3.1", - "/home/rob/Downloads/com.hue.zigbee/node_modules/raven" - ] - ], "_from": "cookie@0.3.1", "_id": "cookie@0.3.1", - "_inCache": true, - "_installable": true, + "_inBundle": false, + "_integrity": "sha1-5+Ch+e9DtMi6klxcWpboBtFoc7s=", "_location": "/cookie", - "_npmOperationalInternal": { - "host": "packages-12-west.internal.npmjs.com", - "tmp": "tmp/cookie-0.3.1.tgz_1464323556714_0.6435900838114321" - }, - "_npmUser": { - "email": "doug@somethingdoug.com", - "name": "dougwilson" - }, - "_npmVersion": "1.4.28", "_phantomChildren": {}, "_requested": { - "name": "cookie", + "type": "version", + "registry": true, "raw": "cookie@0.3.1", + "name": "cookie", + "escapedName": "cookie", "rawSpec": "0.3.1", - "scope": null, - "spec": "0.3.1", - "type": "version" + "saveSpec": null, + "fetchSpec": "0.3.1" }, "_requiredBy": [ "/raven" ], "_resolved": "https://registry.npmjs.org/cookie/-/cookie-0.3.1.tgz", "_shasum": "e7e0a1f9ef43b4c8ba925c5c5a96e806d16873bb", - "_shrinkwrap": null, "_spec": "cookie@0.3.1", - "_where": "/home/rob/Downloads/com.hue.zigbee/node_modules/raven", + "_where": "D:\\Projects\\Homey\\com.sensative\\node_modules\\raven", "author": { - "email": "shtylman@gmail.com", - "name": "Roman Shtylman" + "name": "Roman Shtylman", + "email": "shtylman@gmail.com" }, "bugs": { "url": "https://github.com/jshttp/cookie/issues" }, + "bundleDependencies": false, "contributors": [ { - "email": "doug@somethingdoug.com", - "name": "Douglas Christopher Wilson" + "name": "Douglas Christopher Wilson", + "email": "doug@somethingdoug.com" } ], - "dependencies": {}, + "deprecated": false, "description": "HTTP server cookie parsing and serialization", "devDependencies": { "istanbul": "0.4.3", "mocha": "1.21.5" }, - "directories": {}, - "dist": { - "shasum": "e7e0a1f9ef43b4c8ba925c5c5a96e806d16873bb", - "tarball": "https://registry.npmjs.org/cookie/-/cookie-0.3.1.tgz" - }, "engines": { "node": ">= 0.6" }, @@ -69,22 +51,13 @@ "README.md", "index.js" ], - "gitHead": "e3c77d497d66c8b8d4b677b8954c1b192a09f0b3", - "homepage": "https://github.com/jshttp/cookie", + "homepage": "https://github.com/jshttp/cookie#readme", "keywords": [ "cookie", "cookies" ], "license": "MIT", - "maintainers": [ - { - "email": "doug@somethingdoug.com", - "name": "dougwilson" - } - ], "name": "cookie", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", "repository": { "type": "git", "url": "git+https://github.com/jshttp/cookie.git" diff --git a/node_modules/homey-meshdriver/.gitignore b/node_modules/homey-log/build/.npmignore similarity index 73% rename from node_modules/homey-meshdriver/.gitignore rename to node_modules/homey-log/build/.npmignore index 07e6e47..bb5c8c1 100644 --- a/node_modules/homey-meshdriver/.gitignore +++ b/node_modules/homey-log/build/.npmignore @@ -1 +1,2 @@ /node_modules +.idea \ No newline at end of file diff --git a/node_modules/homey-log/build/CONTRIBUTING.md b/node_modules/homey-log/build/CONTRIBUTING.md new file mode 100644 index 0000000..1319dd9 --- /dev/null +++ b/node_modules/homey-log/build/CONTRIBUTING.md @@ -0,0 +1,53 @@ +# Contributing to Athom and Homey + +First off all, thank you for taking the time to contribute! + +The following is a set of guidelines for contributing to Athom and its packages, which are hosted in the [Athom Organization](https://github.com/athombv) on GitHub. These are just guidelines, not rules. Use your best judgment, and feel free to contact us if you have any questions. + +Please join our [community slack](https://slack.athom.com), if you have not done so already. +We also have a [forum](https://forum.athom.com) for general discussions. + + +## Before submitting a bug or feature request + +* **Have you actually read the error message**? +* Have you searched for similar issues? +* Have you updated homey, all apps, and the development tools (if applicable)? +* Have you checked that it's not a problem with one of the apps you're using, rather than Homey itself? +* Have you looked at what's involved in fixing/implementing this? + +Capable programmers should always attempt to investigate and fix problems themselves before asking for others to help. Submit a pull request instead of an issue! + +Regular support is provided through our [support staff](support@athom.com). + +## A great bug report contains + +* Context – what were you trying to achieve? +* Detailed steps to reproduce the error from scratch. Try isolating the minimal amount of code needed to reproduce the error. +* Any applicable log files or ID's. +* Evidence you've looked into solving the problem and ideally, a theory on the cause and a possible solution. + +## A great feature request contains + +* The current situation. +* How and why the current situation is problematic. +* A detailed proposal or pull request that demonstrates how the problem could be solved. +* A use case – who needs this feature and why? +* Any caveats. + +## A great pull request contains + +* Minimal changes. Only submit code relevant to the current issue. Other changes should go in new pull requests. +* Minimal commits. Please squash to a single commit before sending your pull request. +* No conflicts. Please rebase off the latest master before submitting. +* Code conforming to the existing conventions and formats. i.e. Please don't reformat whitespace. +* Passing tests in the test folder (if applicable). Use existing tests as a reference. +* Relevant documentation. + +## Speeding up your pull request +Merging pull requests takes time. While we always try to merge your pull request as soon as possible, there are certain things you can do to speed up this process. + +* Ask developers to review your code changes and post their feedback. +* Ask users to test your changes and post their feedback. +* Keep your changes to the minimal required amount, and dedicated to one issue/feature only. +* If your PR introduces new features or more than just a small fix, please sign our [Contributor License Agreement](https://go.athom.com/cla). diff --git a/node_modules/homey-log/build/LICENSE b/node_modules/homey-log/build/LICENSE new file mode 100644 index 0000000..9cecc1d --- /dev/null +++ b/node_modules/homey-log/build/LICENSE @@ -0,0 +1,674 @@ + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +them if you wish), that you receive source code or can get it if you +want it, that you can change the software or use pieces of it in new +free programs, and that you know you can do these things. + + To protect your rights, we need to prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. You must make sure that they, too, receive +or can get the source code. And you must show them these terms so they +know their rights. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey verbatim copies of the Program's source code as you +receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Use with the GNU Affero General Public License. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU Affero General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the special requirements of the GNU Affero General Public License, +section 13, concerning interaction through a network will apply to the +combination as such. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + + Each version is given a distinguishing version number. If the +Program specifies that a certain numbered version of the GNU General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY +OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE +USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF +DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD +PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), +EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF +SUCH DAMAGES. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +state the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + {one line to give the program's name and a brief idea of what it does.} + Copyright (C) {year} {name of author} + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . + +Also add information on how to contact you by electronic and paper mail. + + If the program does terminal interaction, make it output a short +notice like this when it starts in an interactive mode: + + {project} Copyright (C) {year} {fullname} + This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, your program's commands +might be different; for a GUI interface, you would use an "about box". + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU GPL, see +. + + The GNU General Public License does not permit incorporating your program +into proprietary programs. If your program is a subroutine library, you +may consider it more useful to permit linking proprietary applications with +the library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. But first, please read +. diff --git a/node_modules/homey-log/build/README.md b/node_modules/homey-log/build/README.md new file mode 100644 index 0000000..0194c2d --- /dev/null +++ b/node_modules/homey-log/build/README.md @@ -0,0 +1,52 @@ +# homey-log + +This module can be plugged into a Homey app to send logs to [Sentry](http://sentry.io/). + +## Installation + +``` +npm install homey-log +``` + +## Usage + +In your `env.json`, add your Sentry URL: + +```javascript +{ + "HOMEY_LOG_URL": "https://foo:bar@sentry.io/123456" +} +``` + +In your app.js, include the library: + +```javascript +const Log = require('homey-log').Log; +... +throw new Error("Whoops"); +``` + +### Notes + +* When your app crashes due to an uncaughtException, this will automatically be sent to Sentry. +* As of Homey v1.0.3, when running your app using `athom project --run`, logging is disabled. + +### Methods + +#### Log.init( String url ); +Set the URL manually, when not provided using your `env.json`. Not recommended due to security! + +#### Log.setTags( Object tags ); +Set a custom object of 'tags'. Tags that are already set are `appId`, `appVersion` and `homeyVersion` + +#### Log.setExtra( Object extra ); +Set a custom object of 'extra' parameters + +#### Log.setUser( Object user ); +Set a custom object of 'user' data - do not include sensitive data! + +#### Log.captureMessage( String message ) +Send a message to Sentry + +#### Log.captureException( Error err ) +Send an Error object to Sentry diff --git a/node_modules/homey-log/build/index.js b/node_modules/homey-log/build/index.js new file mode 100644 index 0000000..d948f55 --- /dev/null +++ b/node_modules/homey-log/build/index.js @@ -0,0 +1,3 @@ +'use strict'; + +module.exports.Log = require('./lib/Log.js'); \ No newline at end of file diff --git a/node_modules/homey-log/build/lib/Log.js b/node_modules/homey-log/build/lib/Log.js new file mode 100644 index 0000000..6003da4 --- /dev/null +++ b/node_modules/homey-log/build/lib/Log.js @@ -0,0 +1,143 @@ +'use strict'; + +const raven = require('raven'); + +class Log { + + constructor() { + + this._capturedExceptions = []; + this._capturedMessages = []; + + if( typeof global.Homey === 'undefined' ) { + try { + this._homey = require('homey'); + } catch( err ) { + console.error(err) + return console.error('Error: Homey not found'); + } + } else { + this._homey = global.Homey; + } + + if( typeof this._homey === 'undefined' ) + return console.error('Error: Homey not found'); + + if( typeof this._homey.env.HOMEY_LOG_URL === 'string' ) { + this.init( this._homey.env.HOMEY_LOG_URL ); + } + + } + + _log() { + console.log.bind( null, Log.logTime(), '[homey-log]' ).apply( null, arguments ); + } + + init( url, opts ) { + + if( process.env.DEBUG === '1' && this._homey.env.HOMEY_LOG_FORCE !== '1' ) + return this._log('App is running in debug mode, disabling log'); + + this._client = new raven.Client( url, opts ); + + this._client.patchGlobal(); + + this.setTags({ + appId : this._homey.manifest.id, + appVersion : this._homey.manifest.version, + homeyVersion : this._homey.version + }); + + this._log(`App ${this._homey.manifest.id} v${this._homey.manifest.version} logging...`); + + return this; + + } + + setTags( tags ) { + if( this._client ) { + this._client.setTagsContext(tags); + } + + return this; + } + + setExtra( extra ) { + if( this._client ) { + this._client.setExtraContext(extra); + } + + return this; + } + + setUser( user ) { + if( this._client ) { + this._client.setUserContext(user); + } + + return this; + } + + captureMessage( message, options, callback) { + this._log('captureMessage:', message); + + if( this._capturedMessages.indexOf( message ) > -1 ) { + this._log('Prevented sending a duplicate message'); + return this; + } + + this._capturedMessages.push( message ) + + if( this._client ) { + this._client.captureMessage( + message, + options && options.constructor.name === 'Object' ? Object.assign({}, options) : options, + callback + ); + } + + return this; + } + + captureException( err, options, callback) { + this._log('captureException:', err); + + if( this._capturedExceptions.indexOf( err ) > -1 ) { + this._log('Prevented sending a duplicate log'); + return this; + } + + this._capturedExceptions.push( err ) + + if( this._client ) { + this._client.captureException( + err, + options && options.constructor.name === 'Object' ? Object.assign({}, options) : options, + callback + ); + } + + return this; + } + + static logTime() { + + let date = new Date(); + + let mm = date.getMonth()+1; + mm = (mm<10?"0"+mm:mm); + let dd = date.getDate(); + dd = (dd<10?"0"+dd:dd); + let hh = date.getHours(); + hh = (hh<10?"0"+hh:hh); + let min = date.getMinutes(); + min = (min<10?"0"+min:min); + let sec = date.getSeconds(); + sec = (sec<10?"0"+sec:sec); + + return `${date.getFullYear()}-${mm}-${dd} ${hh}:${min}:${sec}`; + } + +} + +module.exports = new Log(); diff --git a/node_modules/homey-log/build/package.json b/node_modules/homey-log/build/package.json new file mode 100644 index 0000000..65fd00d --- /dev/null +++ b/node_modules/homey-log/build/package.json @@ -0,0 +1,26 @@ +{ + "name": "homey-log", + "version": "1.0.4", + "description": "", + "main": "index.js", + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + }, + "repository": { + "type": "git", + "url": "git+https://WeeJewel@github.com/athombv/node-homey-log.git" + }, + "author": "", + "license": "ISC", + "bugs": { + "url": "https://github.com/athombv/node-homey-log/issues" + }, + "homepage": "https://github.com/athombv/node-homey-log#readme", + "dependencies": { + "raven": "^0.12.3" + }, + "config": { + "npmPublishTagProduction": "latest", + "npmPublishTagStaging": "beta" + } +} diff --git a/node_modules/homey-log/node_modules/.bin/raven b/node_modules/homey-log/node_modules/.bin/raven deleted file mode 100644 index 91e62fa..0000000 --- a/node_modules/homey-log/node_modules/.bin/raven +++ /dev/null @@ -1 +0,0 @@ -../raven/bin/raven \ No newline at end of file diff --git a/node_modules/homey-log/node_modules/raven/.eslintignore b/node_modules/homey-log/node_modules/raven/.eslintignore deleted file mode 100644 index 404abb2..0000000 --- a/node_modules/homey-log/node_modules/raven/.eslintignore +++ /dev/null @@ -1 +0,0 @@ -coverage/ diff --git a/node_modules/homey-log/node_modules/raven/.eslintrc b/node_modules/homey-log/node_modules/raven/.eslintrc deleted file mode 100644 index 248f817..0000000 --- a/node_modules/homey-log/node_modules/raven/.eslintrc +++ /dev/null @@ -1,64 +0,0 @@ -{ - "env": { - "node": true, - "mocha": true, - }, - "rules": { - "block-scoped-var": 2, - "dot-notation": [ - 2, - { - "allowKeywords": true - } - ], - "eqeqeq": [ - 2, - "allow-null" - ], - "guard-for-in": 2, - "new-cap": 2, - "no-caller": 2, - "no-cond-assign": [ - 2, - "except-parens" - ], - "no-debugger": 2, - "no-empty": 2, - "no-eval": 2, - "no-extend-native": 2, - "no-extra-parens": 2, - "no-irregular-whitespace": 2, - "no-iterator": 2, - "no-loop-func": 2, - "no-multi-str": 2, - "no-new": 2, - "no-proto": 2, - "no-script-url": 2, - "no-sequences": 2, - "no-shadow": 2, - "no-undef": 2, - "no-unused-vars": [ - 2, - {"args": "none"} - ], - "no-with": 2, - "quotes": [ - 2, - "single", - "avoid-escape" - ], - "semi": [ - 0, - "never" - ], - "strict": [ - 2, - "global" - ], - "valid-typeof": 2, - "wrap-iife": [ - 2, - "inside" - ] - } -} diff --git a/node_modules/homey-log/node_modules/raven/.gitmodules b/node_modules/homey-log/node_modules/raven/.gitmodules deleted file mode 100644 index 1e6464a..0000000 --- a/node_modules/homey-log/node_modules/raven/.gitmodules +++ /dev/null @@ -1,3 +0,0 @@ -[submodule "docs/_sentryext"] - path = docs/_sentryext - url = https://github.com/getsentry/sentry-doc-support diff --git a/node_modules/homey-log/node_modules/raven/.npmignore b/node_modules/homey-log/node_modules/raven/.npmignore deleted file mode 100644 index c4f7f8c..0000000 --- a/node_modules/homey-log/node_modules/raven/.npmignore +++ /dev/null @@ -1,8 +0,0 @@ -test -working -.travis.yml -README.md -History.md -Makefile -test/ -working/ \ No newline at end of file diff --git a/node_modules/homey-log/node_modules/raven/AUTHORS b/node_modules/homey-log/node_modules/raven/AUTHORS deleted file mode 100644 index 9b60c17..0000000 --- a/node_modules/homey-log/node_modules/raven/AUTHORS +++ /dev/null @@ -1 +0,0 @@ -https://github.com/mattrobenolt/raven-node/graphs/contributors diff --git a/node_modules/homey-log/node_modules/raven/History.md b/node_modules/homey-log/node_modules/raven/History.md deleted file mode 100644 index 798b0cc..0000000 --- a/node_modules/homey-log/node_modules/raven/History.md +++ /dev/null @@ -1,160 +0,0 @@ -# 0.12.2 - 11/17/2016 - * Check if `require.main.filename` is defined before passing to `path.dirname` [See #233] - * Add `colno` property to report column number from stack trace [See #235] -# 0.12.1 - 8/4/2016 - * Fix bug where `environment` option was not actually being transmitted to Sentry [See #185] -# 0.12.0 - 8/1/2016 - * Add `environment` config option and `setRelease` method [See #179] - * No longer passes `process.env` values [See #182] - * Connect/Express middleware now attempts to attach `req.user` as User interface [See #177] - * Use json-stringify-safe to prevent circular refs [See #182] - -# 0.11.0 - 5/5/2016 - * `captureError` renamed to `captureException` to match raven-js (alias exists for backwards compat) - * `parsers.parseError` now coerces Error type to string. [See #155] - -# 0.10.0 - 1/24/2016 - * Now supports global context for extra data, tags, user [See #141] - * Added `setUserContext`, `setExtraContext`, `setTagsContext` - -# 0.9.0 - 11/23/2015 - * Always coerce req.body to string. [See 2061d4efbf269c5e2096f2b7b55f5af2249c4aa7] - * Allow passing options to HTTP transports. [See #123] - * Fixed tests for node 4.0/5.0 - * Don't send a body for GET/HEAD requests unless one has been passed. [See 0476a6e9818135b8b258b0be0724c369fe30e3c7] - -# 0.8.1 - 06/15/2015 - * Fixed a missing `domain` import in the Express/Connect middleware [See #120] - -# 0.8.0 - 06/15/2015 - * Drop support for node 0.6 - * Remove `SENTRY_SITE` environment variable usage - * Fixed `express deprecated req.host: Use req.hostname instead` warning [See #101] - * Allow passing custom `ca` options for an https request [See #110 #108] - * Use newer API endpoint [See #105] - * Added support for Sentry's new Releases feature - * Update Express/Connect middleware to support domains [See #116] - -# 0.7.3 - 03/05/2015 - * When calling `captureError` without an Error, generate a fake `Error` object to pull stacktrace from. [See #87] - * Prevent `patchGlobal` from causing recursion [See #84] - * Fixed issues arond capturing tags. - * Removed deprecated `site` parameter. - * Allow explicitly declaring the `culprit` [See #107] - * Publicly export out the various parsers [See #111] - * Support for iojs and node 0.12 - -# 0.7.2 - 09/09/2014 - * Added `dataCallback` option to Client configuration. See: https://github.com/getsentry/raven-node#pre-processing-data - -# 0.7.1 - 08/24/2014 - * Fixed package.json to not install junk from `optionalDependencies`. TIL `optionalDependencies` are still installed. [See #89] - -# 0.7.0 - 06/24/2014 - * Moved from mattrobenolt/raven-node into getsentry/raven-node - * Bumped to sentry protocol version 5 - * Capture all properties off of an Error object and send them along as as `extra` [See #72] - * Better feature detection support for capturing request parameters. Adds support for use in Koa. [See #78 #79] - -# 0.6.3 - 04/02/2014 - * Fix another issue that was breaking when running Raven from the REPL [See #66] - * Add additional meta data on the error callbacks [See #67 #73] - -# 0.6.2 - 02/14/2014 - * Allow overriding the logger name for an individual event - * Update lsmod to not break when running Raven from the REPL - * Added a `raven` bin so you can run `raven test [DSN]` - -# 0.6.1 - 01/23/2014 - * Use lsmod for getting the list of installed modules [See #55] - * Parse cookies on the http request always [See #56] - * Use `stack-trace` to assist in capturing stacks. This should fix compat with the New Relic plugin [See #57] - -# 0.6.0 - 11/9/2013 - * Updated sentry protocol to version 4 (Requires Sentry 6.0+ now) - * Module names now include the full path - * Attach client IP address to env object - -# 0.5.6 - 11/8/2013 - * Include module and function name in stacktrace culprit - -# 0.5.5 - 11/8/2013 - * Only record exceptions for 500 status codes from Connect middleware - -# 0.5.4 - 10/13/2013 - * Fix DSN parser when using Sentry at a non-root URL, thanks @rcoup [See #44] - -# 0.5.3 - 10/4/2013 - * Bump raw-stacktrace version - -# 0.5.2 - 9/10/2013 - * Fix compatibilities with CoffeeScript [Fixes #47] [Fixes #50] - * Doesnt chose on circular references - -# 0.5.1 - 5/1/2013 - * Add support for third party transports, thanks @crankycoder - -# 0.5.0 - 4/8/2013 - * Remove NODE_ENV entirely, fixes many issues since people have different opinions on wtf this means - * Several fixes in collecting a better stack trace, thanks @azylman - * Pass exception through to the patchGlobal callback, thanks @ktmud [See #28] - * Official 0.10 support! - * Other misc things. https://github.com/mattrobenolt/raven-node/compare/v0.4.7...v0.5.0 - -# 0.4.7 - 1/13/2013 - * Actually disable when NODE_ENV does not equal 'production' [Fixes #25] - -# 0.4.6 - 1/13/2013 - * Added `platform=node` to payload for Sentry 5.1 - -# 0.4.5 - 12/05/2012 - * Resolve `node_modules` path properly [Fixes #23] - -# 0.4.4 - 11/10/2012 - * Prevent 'error' event from bubbling up due to no listeners [See #22] - * Augment 'error' event emitter with an actual Error object [See #22] - -# 0.4.3 - 10/02/2012 - * Allow a callback to be given to `patchGlobal()` [Fixes #19] - * Removed old `patch_global()` alias - -# 0.4.2 - 9/29/2012 - * Added test coverage to `patchGlobal()` - * Quit using my own deprecated `get_ident()` method inside `patchGlobal` - * Send string errors as a normal message to prevent Sentry server from crying [Fixes #18] - -# 0.4.1 - 9/3/2012 - * patchGlobal() was actually broken. :( Thanks @ligthyear [Fixes #17] - -# 0.4.0 - 8/14/2012 - * Silence and disable Raven/Sentry when using a non-existent or falsey DSN value - -# 0.3.0 - 6/23/2012 - * Separate transports out into their own module for portability - * Added UDP transport [Fixes #10] - * Ignore sub-transports, such as gevent+https, raven sees it as just https - -# 0.2.4 - 6/16/2012 - * Added parsing DSNs with non-standard port. [Fixes #4] - * Added BSD license - -# 0.2.3 - 3/30/2012 - * Prevent any potentially odd stack traces from causing Raven to crash. [Fixes #2] - -# 0.2.2 - 3/22/2012 - * raven.Client now emits `logged` and `error` events. - -# 0.2.1 - 3/22/2012 - * Fixed connect/express middleware, thanks Almad! - -# 0.2.0 - 3/18/2012 - * Renamed all methods to follow `client.capture*()` pattern. (Sorry if you were already using it!) - * All `npm` installed modules are shoved into Sentry for debugging - * Toggle actual sending based on `NODE_ENV` variable. Check README for information. - * Fixes for more types of stack traces. - * Added `client.captureQuery()` - * Support for `SENTRY_DSN`, `SENTRY_NAME`, and `SENTRY_SITE` enviornment variables - * More test coverage - -# 0.1.0 - 3/17/2012 - * Initial release diff --git a/node_modules/homey-log/node_modules/raven/LICENSE b/node_modules/homey-log/node_modules/raven/LICENSE deleted file mode 100644 index 77d737d..0000000 --- a/node_modules/homey-log/node_modules/raven/LICENSE +++ /dev/null @@ -1,9 +0,0 @@ -Copyright (c) 2013, Matt Robenolt -All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - -* Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. -* Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/node_modules/homey-log/node_modules/raven/README.md b/node_modules/homey-log/node_modules/raven/README.md deleted file mode 100644 index cee68da..0000000 --- a/node_modules/homey-log/node_modules/raven/README.md +++ /dev/null @@ -1,9 +0,0 @@ -# raven-node [![Build Status](https://travis-ci.org/getsentry/raven-node.svg?branch=master)](https://travis-ci.org/getsentry/raven-node) - -raven-node is a Node.js client for [Sentry](https://getsentry.com/). - -## Resources - -* [Documentation](https://docs.getsentry.com/hosted/clients/node/) -* [Bug Tracker](https://github.com/getsentry/raven-node/issues) -* [IRC](irc://chat.freenode.net/sentry) (chat.freenode.net, #sentry) diff --git a/node_modules/homey-log/node_modules/raven/bin/raven b/node_modules/homey-log/node_modules/raven/bin/raven deleted file mode 100644 index 8207d8c..0000000 --- a/node_modules/homey-log/node_modules/raven/bin/raven +++ /dev/null @@ -1,59 +0,0 @@ -#!/usr/bin/env node - -var os = require('os'); -var raven = require('../'); - -function usage() { - var path = require('path'); - console.log('usage:', path.basename(process.argv[1]), 'test [SENTRY_DSN]'); -} - -if (process.argv[2] !== 'test') { - usage(); - process.exit(1); -} - -var dsn = process.argv.slice(3).join(' ') || process.env.SENTRY_DSN; -if (!dsn) { - usage(); - console.log(); - console.log('Error: No configuration detected!'); - console.log('You must either pass a DSN to the command or set the SENTRY_DSN environment variable.'); - process.exit(1); -} - -console.log('Using DSN configuration:'); -console.log(' ', dsn); -console.log(); - -var client = new raven.Client(dsn); - -console.log('Sending a test message...'); - -client.on('logged', function(result) { - console.log('success!'); - console.log('Event ID was', client.getIdent(result)); -}); -client.on('error', function(err) { - console.log('error!'); - throw err; -}); - -try { - test -} catch (ex) { - client.captureException(ex, { - message: 'This is a test message generated using ``raven test``', - level: 'info', - logger: 'sentry.test', - culprit: 'bin:raven at main', - request: { - method: 'GET', - url: 'http://example.com' - }, - extra: { - user: process.getuid && process.getuid(), - loadavg: os.loadavg() - } - }); -} \ No newline at end of file diff --git a/node_modules/homey-log/node_modules/raven/coverage/coverage.json b/node_modules/homey-log/node_modules/raven/coverage/coverage.json deleted file mode 100644 index 06d8122..0000000 --- a/node_modules/homey-log/node_modules/raven/coverage/coverage.json +++ /dev/null @@ -1 +0,0 @@ -{"/Users/lewis/dev/raven-node/index.js":{"path":"/Users/lewis/dev/raven-node/index.js","s":{"1":1,"2":1,"3":1,"4":1,"5":1,"6":1,"7":1},"b":{},"f":{},"fnMap":{},"statementMap":{"1":{"start":{"line":3,"column":0},"end":{"line":3,"column":41}},"2":{"start":{"line":4,"column":0},"end":{"line":4,"column":46}},"3":{"start":{"line":5,"column":0},"end":{"line":7,"column":2}},"4":{"start":{"line":9,"column":0},"end":{"line":9,"column":70}},"5":{"start":{"line":10,"column":0},"end":{"line":10,"column":56}},"6":{"start":{"line":11,"column":0},"end":{"line":11,"column":50}},"7":{"start":{"line":14,"column":0},"end":{"line":14,"column":33}}},"branchMap":{}},"/Users/lewis/dev/raven-node/lib/client.js":{"path":"/Users/lewis/dev/raven-node/lib/client.js","s":{"1":1,"2":1,"3":1,"4":1,"5":1,"6":1,"7":1,"8":1,"9":1,"10":1,"11":1,"12":1,"13":1,"14":66,"15":2,"16":2,"17":66,"18":1,"19":1,"20":66,"21":66,"22":66,"23":66,"24":66,"25":66,"26":66,"27":66,"28":66,"29":66,"30":66,"31":66,"32":2,"33":66,"34":64,"35":66,"36":66,"37":66,"38":1,"39":66,"40":1,"41":66,"42":4,"43":66,"44":2,"45":0,"46":2,"47":2,"48":1,"49":2,"50":29,"51":29,"52":12,"53":12,"54":12,"55":29,"56":29,"57":29,"58":29,"59":29,"60":29,"61":29,"62":0,"63":29,"64":29,"65":29,"66":29,"67":29,"68":29,"69":29,"70":2,"71":29,"72":2,"73":29,"74":29,"75":0,"76":29,"77":2,"78":29,"79":27,"80":2,"81":2,"82":24,"83":24,"84":24,"85":24,"86":23,"87":23,"88":5,"89":0,"90":0,"91":5,"92":5,"93":5,"94":5,"95":12,"96":1,"97":12,"98":1,"99":1,"100":11,"101":12,"102":12,"103":12,"104":12,"105":12,"106":0,"107":0,"108":0,"109":0,"110":0,"111":0,"112":0,"113":1,"114":1,"115":1,"116":1,"117":1,"118":0,"119":0,"120":1,"121":1,"122":1,"123":1,"124":1,"125":0,"126":1,"127":1,"128":1,"129":0,"130":0,"131":1,"132":1,"133":1,"134":1,"135":1,"136":3,"137":2,"138":2,"139":3,"140":3,"141":3,"142":3,"143":2,"144":1,"145":3,"146":0,"147":0,"148":3,"149":3,"150":3,"151":3,"152":3,"153":1,"154":2,"155":3,"156":0,"157":0,"158":0,"159":4,"160":4,"161":4,"162":4,"163":0,"164":4,"165":2,"166":2,"167":0,"168":0,"169":0,"170":0,"171":0,"172":0,"173":0,"174":0,"175":0,"176":0,"177":0,"178":0,"179":1,"180":1,"181":1,"182":4,"183":4,"184":4,"185":4,"186":4,"187":0,"188":0,"189":0,"190":0,"191":0,"192":0,"193":1,"194":1,"195":66,"196":0,"197":66,"198":66,"199":1,"200":1,"201":1,"202":1,"203":1,"204":1,"205":1,"206":1,"207":6,"208":6,"209":4,"210":3,"211":1,"212":1,"213":3,"214":0,"215":0,"216":3,"217":1,"218":1,"219":1,"220":2,"221":2,"222":2,"223":3,"224":3,"225":1,"226":1,"227":1,"228":1,"229":1,"230":1,"231":0,"232":0,"233":0,"234":0,"235":0,"236":0,"237":0},"b":{"1":[2,64],"2":[1,65],"3":[66,50],"4":[66,64,63],"5":[66,66],"6":[66,65],"7":[66,63,62],"8":[66,64,63],"9":[66,66],"10":[2,64],"11":[64,2],"12":[64,64],"13":[1,65],"14":[1,65],"15":[0,2],"16":[1,1],"17":[2,1],"18":[12,17],"19":[29,1,28],"20":[29,29],"21":[0,29],"22":[29,28],"23":[29,29],"24":[2,27],"25":[2,27],"26":[0,29],"27":[2,27],"28":[29,2],"29":[27,2],"30":[0,5],"31":[5,5],"32":[5,5],"33":[1,11],"34":[1,11],"35":[12,11],"36":[11,7],"37":[0,0],"38":[0,0],"39":[0,0],"40":[1,0],"41":[1,1],"42":[0,1],"43":[1,0],"44":[1,0],"45":[0,0],"46":[2,1],"47":[3,2],"48":[2,1],"49":[0,0],"50":[1,2],"51":[0,0],"52":[4,0],"53":[0,0,0,0],"54":[0,0],"55":[0,66],"56":[3,1],"57":[1,2],"58":[1,1],"59":[0,0],"60":[0,0],"61":[0,0]},"f":{"1":67,"2":66,"3":4,"4":2,"5":29,"6":29,"7":2,"8":24,"9":23,"10":5,"11":12,"12":12,"13":0,"14":1,"15":1,"16":0,"17":3,"18":3,"19":3,"20":0,"21":0,"22":4,"23":4,"24":2,"25":2,"26":0,"27":0,"28":0,"29":0,"30":1,"31":4,"32":4,"33":0,"34":0,"35":0,"36":66,"37":6,"38":4,"39":1,"40":0,"41":1,"42":1,"43":1,"44":0},"fnMap":{"1":{"name":"Raven","line":15,"loc":{"start":{"line":15,"column":0},"end":{"line":15,"column":17}}},"2":{"name":"config","line":20,"loc":{"start":{"line":20,"column":10},"end":{"line":20,"column":40}}},"3":{"name":"(anonymous_3)","line":65,"loc":{"start":{"line":65,"column":21},"end":{"line":65,"column":36}}},"4":{"name":"install","line":72,"loc":{"start":{"line":72,"column":11},"end":{"line":72,"column":38}}},"5":{"name":"generateEventId","line":84,"loc":{"start":{"line":84,"column":19},"end":{"line":84,"column":46}}},"6":{"name":"process","line":88,"loc":{"start":{"line":88,"column":11},"end":{"line":88,"column":49}}},"7":{"name":"(anonymous_7)","line":133,"loc":{"start":{"line":133,"column":17},"end":{"line":133,"column":29}}},"8":{"name":"send","line":139,"loc":{"start":{"line":139,"column":8},"end":{"line":139,"column":34}}},"9":{"name":"(anonymous_9)","line":144,"loc":{"start":{"line":144,"column":26},"end":{"line":144,"column":47}}},"10":{"name":"captureMessage","line":157,"loc":{"start":{"line":157,"column":18},"end":{"line":157,"column":63}}},"11":{"name":"captureException","line":170,"loc":{"start":{"line":170,"column":20},"end":{"line":170,"column":63}}},"12":{"name":"(anonymous_12)","line":187,"loc":{"start":{"line":187,"column":36},"end":{"line":187,"column":50}}},"13":{"name":"captureQuery","line":194,"loc":{"start":{"line":194,"column":16},"end":{"line":194,"column":65}}},"14":{"name":"(anonymous_14)","line":213,"loc":{"start":{"line":213,"column":11},"end":{"line":213,"column":39}}},"15":{"name":"(anonymous_15)","line":225,"loc":{"start":{"line":225,"column":8},"end":{"line":225,"column":40}}},"16":{"name":"(anonymous_16)","line":237,"loc":{"start":{"line":237,"column":14},"end":{"line":237,"column":29}}},"17":{"name":"(anonymous_17)","line":259,"loc":{"start":{"line":259,"column":16},"end":{"line":259,"column":41}}},"18":{"name":"(anonymous_18)","line":265,"loc":{"start":{"line":265,"column":18},"end":{"line":265,"column":30}}},"19":{"name":"setContext","line":287,"loc":{"start":{"line":287,"column":14},"end":{"line":287,"column":39}}},"20":{"name":"mergeContext","line":296,"loc":{"start":{"line":296,"column":16},"end":{"line":296,"column":43}}},"21":{"name":"getContext","line":301,"loc":{"start":{"line":301,"column":14},"end":{"line":301,"column":36}}},"22":{"name":"(anonymous_22)","line":305,"loc":{"start":{"line":305,"column":21},"end":{"line":305,"column":55}}},"23":{"name":"(anonymous_23)","line":308,"loc":{"start":{"line":308,"column":27},"end":{"line":308,"column":43}}},"24":{"name":"(anonymous_24)","line":325,"loc":{"start":{"line":325,"column":19},"end":{"line":325,"column":39}}},"25":{"name":"(anonymous_25)","line":336,"loc":{"start":{"line":336,"column":25},"end":{"line":336,"column":45}}},"26":{"name":"(anonymous_26)","line":340,"loc":{"start":{"line":340,"column":18},"end":{"line":340,"column":30}}},"27":{"name":"(anonymous_27)","line":342,"loc":{"start":{"line":342,"column":11},"end":{"line":342,"column":37}}},"28":{"name":"(anonymous_28)","line":347,"loc":{"start":{"line":347,"column":16},"end":{"line":347,"column":28}}},"29":{"name":"(anonymous_29)","line":349,"loc":{"start":{"line":349,"column":11},"end":{"line":349,"column":42}}},"30":{"name":"getIdent","line":366,"loc":{"start":{"line":366,"column":12},"end":{"line":366,"column":38}}},"31":{"name":"captureError","line":370,"loc":{"start":{"line":370,"column":16},"end":{"line":370,"column":40}}},"32":{"name":"(anonymous_32)","line":374,"loc":{"start":{"line":374,"column":15},"end":{"line":374,"column":29}}},"33":{"name":"setUserContext","line":379,"loc":{"start":{"line":379,"column":18},"end":{"line":379,"column":44}}},"34":{"name":"setExtraContext","line":383,"loc":{"start":{"line":383,"column":19},"end":{"line":383,"column":46}}},"35":{"name":"setTagsContext","line":387,"loc":{"start":{"line":387,"column":18},"end":{"line":387,"column":44}}},"36":{"name":"Client","line":395,"loc":{"start":{"line":395,"column":0},"end":{"line":395,"column":30}}},"37":{"name":"registerExceptionHandler","line":412,"loc":{"start":{"line":412,"column":0},"end":{"line":412,"column":46}}},"38":{"name":"(anonymous_38)","line":414,"loc":{"start":{"line":414,"column":34},"end":{"line":414,"column":49}}},"39":{"name":"onLogged","line":416,"loc":{"start":{"line":416,"column":21},"end":{"line":416,"column":41}}},"40":{"name":"onError","line":421,"loc":{"start":{"line":421,"column":20},"end":{"line":421,"column":39}}},"41":{"name":"registerRejectionHandler","line":443,"loc":{"start":{"line":443,"column":0},"end":{"line":443,"column":46}}},"42":{"name":"(anonymous_42)","line":444,"loc":{"start":{"line":444,"column":35},"end":{"line":444,"column":53}}},"43":{"name":"(anonymous_43)","line":445,"loc":{"start":{"line":445,"column":50},"end":{"line":445,"column":69}}},"44":{"name":"patchGlobal","line":452,"loc":{"start":{"line":452,"column":0},"end":{"line":452,"column":33}}}},"statementMap":{"1":{"start":{"line":3,"column":0},"end":{"line":3,"column":47}},"2":{"start":{"line":4,"column":0},"end":{"line":4,"column":35}},"3":{"start":{"line":5,"column":0},"end":{"line":5,"column":27}},"4":{"start":{"line":6,"column":0},"end":{"line":6,"column":31}},"5":{"start":{"line":7,"column":0},"end":{"line":7,"column":32}},"6":{"start":{"line":8,"column":0},"end":{"line":8,"column":41}},"7":{"start":{"line":9,"column":0},"end":{"line":9,"column":31}},"8":{"start":{"line":10,"column":0},"end":{"line":10,"column":31}},"9":{"start":{"line":11,"column":0},"end":{"line":11,"column":31}},"10":{"start":{"line":13,"column":0},"end":{"line":13,"column":26}},"11":{"start":{"line":15,"column":0},"end":{"line":15,"column":19}},"12":{"start":{"line":17,"column":0},"end":{"line":17,"column":46}},"13":{"start":{"line":19,"column":0},"end":{"line":361,"column":3}},"14":{"start":{"line":21,"column":4},"end":{"line":25,"column":5}},"15":{"start":{"line":23,"column":6},"end":{"line":23,"column":35}},"16":{"start":{"line":24,"column":6},"end":{"line":24,"column":19}},"17":{"start":{"line":26,"column":4},"end":{"line":30,"column":5}},"18":{"start":{"line":28,"column":6},"end":{"line":28,"column":20}},"19":{"start":{"line":29,"column":6},"end":{"line":29,"column":35}},"20":{"start":{"line":31,"column":4},"end":{"line":31,"column":28}},"21":{"start":{"line":33,"column":4},"end":{"line":33,"column":23}},"22":{"start":{"line":34,"column":4},"end":{"line":34,"column":35}},"23":{"start":{"line":35,"column":4},"end":{"line":35,"column":84}},"24":{"start":{"line":36,"column":4},"end":{"line":36,"column":46}},"25":{"start":{"line":37,"column":4},"end":{"line":37,"column":72}},"26":{"start":{"line":38,"column":4},"end":{"line":38,"column":71}},"27":{"start":{"line":39,"column":4},"end":{"line":39,"column":83}},"28":{"start":{"line":41,"column":4},"end":{"line":41,"column":43}},"29":{"start":{"line":42,"column":4},"end":{"line":42,"column":45}},"30":{"start":{"line":43,"column":4},"end":{"line":43,"column":57}},"31":{"start":{"line":45,"column":4},"end":{"line":47,"column":5}},"32":{"start":{"line":46,"column":6},"end":{"line":46,"column":70}},"33":{"start":{"line":49,"column":4},"end":{"line":52,"column":5}},"34":{"start":{"line":51,"column":6},"end":{"line":51,"column":35}},"35":{"start":{"line":55,"column":4},"end":{"line":55,"column":31}},"36":{"start":{"line":57,"column":4},"end":{"line":57,"column":49}},"37":{"start":{"line":58,"column":4},"end":{"line":60,"column":5}},"38":{"start":{"line":59,"column":6},"end":{"line":59,"column":40}},"39":{"start":{"line":61,"column":4},"end":{"line":63,"column":5}},"40":{"start":{"line":62,"column":6},"end":{"line":62,"column":42}},"41":{"start":{"line":65,"column":4},"end":{"line":67,"column":7}},"42":{"start":{"line":66,"column":6},"end":{"line":66,"column":79}},"43":{"start":{"line":69,"column":4},"end":{"line":69,"column":16}},"44":{"start":{"line":73,"column":4},"end":{"line":75,"column":5}},"45":{"start":{"line":74,"column":6},"end":{"line":74,"column":16}},"46":{"start":{"line":77,"column":4},"end":{"line":77,"column":39}},"47":{"start":{"line":78,"column":4},"end":{"line":80,"column":5}},"48":{"start":{"line":79,"column":6},"end":{"line":79,"column":41}},"49":{"start":{"line":81,"column":4},"end":{"line":81,"column":16}},"50":{"start":{"line":85,"column":4},"end":{"line":85,"column":36}},"51":{"start":{"line":90,"column":4},"end":{"line":94,"column":5}},"52":{"start":{"line":91,"column":6},"end":{"line":91,"column":18}},"53":{"start":{"line":92,"column":6},"end":{"line":92,"column":23}},"54":{"start":{"line":93,"column":6},"end":{"line":93,"column":39}},"55":{"start":{"line":96,"column":4},"end":{"line":96,"column":75}},"56":{"start":{"line":97,"column":4},"end":{"line":97,"column":88}},"57":{"start":{"line":98,"column":4},"end":{"line":98,"column":88}},"58":{"start":{"line":99,"column":4},"end":{"line":99,"column":92}},"59":{"start":{"line":101,"column":4},"end":{"line":101,"column":40}},"60":{"start":{"line":102,"column":4},"end":{"line":102,"column":57}},"61":{"start":{"line":104,"column":4},"end":{"line":106,"column":5}},"62":{"start":{"line":105,"column":6},"end":{"line":105,"column":42}},"63":{"start":{"line":108,"column":4},"end":{"line":108,"column":64}},"64":{"start":{"line":109,"column":4},"end":{"line":109,"column":53}},"65":{"start":{"line":110,"column":4},"end":{"line":110,"column":30}},"66":{"start":{"line":111,"column":4},"end":{"line":111,"column":62}},"67":{"start":{"line":112,"column":4},"end":{"line":112,"column":41}},"68":{"start":{"line":113,"column":4},"end":{"line":113,"column":29}},"69":{"start":{"line":116,"column":4},"end":{"line":118,"column":5}},"70":{"start":{"line":117,"column":6},"end":{"line":117,"column":36}},"71":{"start":{"line":120,"column":4},"end":{"line":122,"column":5}},"72":{"start":{"line":121,"column":6},"end":{"line":121,"column":41}},"73":{"start":{"line":124,"column":4},"end":{"line":124,"column":26}},"74":{"start":{"line":125,"column":4},"end":{"line":125,"column":43}},"75":{"start":{"line":125,"column":24},"end":{"line":125,"column":43}},"76":{"start":{"line":126,"column":4},"end":{"line":126,"column":82}},"77":{"start":{"line":126,"column":63},"end":{"line":126,"column":82}},"78":{"start":{"line":128,"column":4},"end":{"line":136,"column":5}},"79":{"start":{"line":129,"column":6},"end":{"line":129,"column":28}},"80":{"start":{"line":133,"column":6},"end":{"line":135,"column":12}},"81":{"start":{"line":134,"column":8},"end":{"line":134,"column":26}},"82":{"start":{"line":140,"column":4},"end":{"line":140,"column":20}},"83":{"start":{"line":141,"column":4},"end":{"line":141,"column":36}},"84":{"start":{"line":142,"column":4},"end":{"line":142,"column":34}},"85":{"start":{"line":144,"column":4},"end":{"line":154,"column":7}},"86":{"start":{"line":145,"column":6},"end":{"line":151,"column":12}},"87":{"start":{"line":153,"column":6},"end":{"line":153,"column":63}},"88":{"start":{"line":158,"column":4},"end":{"line":163,"column":5}},"89":{"start":{"line":159,"column":6},"end":{"line":159,"column":18}},"90":{"start":{"line":160,"column":6},"end":{"line":160,"column":18}},"91":{"start":{"line":162,"column":6},"end":{"line":162,"column":28}},"92":{"start":{"line":164,"column":4},"end":{"line":164,"column":41}},"93":{"start":{"line":165,"column":4},"end":{"line":165,"column":66}},"94":{"start":{"line":167,"column":4},"end":{"line":167,"column":19}},"95":{"start":{"line":171,"column":4},"end":{"line":176,"column":5}},"96":{"start":{"line":175,"column":6},"end":{"line":175,"column":27}},"97":{"start":{"line":178,"column":4},"end":{"line":183,"column":5}},"98":{"start":{"line":179,"column":6},"end":{"line":179,"column":18}},"99":{"start":{"line":180,"column":6},"end":{"line":180,"column":18}},"100":{"start":{"line":182,"column":6},"end":{"line":182,"column":28}},"101":{"start":{"line":185,"column":4},"end":{"line":185,"column":20}},"102":{"start":{"line":186,"column":4},"end":{"line":186,"column":41}},"103":{"start":{"line":187,"column":4},"end":{"line":189,"column":7}},"104":{"start":{"line":188,"column":6},"end":{"line":188,"column":36}},"105":{"start":{"line":191,"column":4},"end":{"line":191,"column":19}},"106":{"start":{"line":195,"column":4},"end":{"line":200,"column":5}},"107":{"start":{"line":196,"column":6},"end":{"line":196,"column":18}},"108":{"start":{"line":197,"column":6},"end":{"line":197,"column":18}},"109":{"start":{"line":199,"column":6},"end":{"line":199,"column":28}},"110":{"start":{"line":202,"column":4},"end":{"line":202,"column":41}},"111":{"start":{"line":203,"column":4},"end":{"line":203,"column":73}},"112":{"start":{"line":205,"column":4},"end":{"line":205,"column":19}},"113":{"start":{"line":214,"column":4},"end":{"line":217,"column":5}},"114":{"start":{"line":215,"column":6},"end":{"line":215,"column":17}},"115":{"start":{"line":216,"column":6},"end":{"line":216,"column":15}},"116":{"start":{"line":222,"column":4},"end":{"line":222,"column":51}},"117":{"start":{"line":226,"column":4},"end":{"line":229,"column":5}},"118":{"start":{"line":227,"column":6},"end":{"line":227,"column":21}},"119":{"start":{"line":228,"column":6},"end":{"line":228,"column":19}},"120":{"start":{"line":231,"column":4},"end":{"line":231,"column":37}},"121":{"start":{"line":233,"column":4},"end":{"line":233,"column":39}},"122":{"start":{"line":235,"column":4},"end":{"line":235,"column":20}},"123":{"start":{"line":236,"column":4},"end":{"line":240,"column":5}},"124":{"start":{"line":237,"column":6},"end":{"line":239,"column":8}},"125":{"start":{"line":238,"column":8},"end":{"line":238,"column":61}},"126":{"start":{"line":242,"column":4},"end":{"line":242,"column":34}},"127":{"start":{"line":243,"column":4},"end":{"line":243,"column":40}},"128":{"start":{"line":245,"column":4},"end":{"line":249,"column":5}},"129":{"start":{"line":246,"column":6},"end":{"line":248,"column":7}},"130":{"start":{"line":247,"column":8},"end":{"line":247,"column":43}},"131":{"start":{"line":250,"column":4},"end":{"line":250,"column":39}},"132":{"start":{"line":251,"column":4},"end":{"line":251,"column":29}},"133":{"start":{"line":252,"column":4},"end":{"line":252,"column":29}},"134":{"start":{"line":254,"column":4},"end":{"line":254,"column":36}},"135":{"start":{"line":256,"column":4},"end":{"line":256,"column":19}},"136":{"start":{"line":260,"column":4},"end":{"line":263,"column":5}},"137":{"start":{"line":261,"column":6},"end":{"line":261,"column":21}},"138":{"start":{"line":262,"column":6},"end":{"line":262,"column":19}},"139":{"start":{"line":264,"column":4},"end":{"line":264,"column":20}},"140":{"start":{"line":265,"column":4},"end":{"line":272,"column":6}},"141":{"start":{"line":266,"column":6},"end":{"line":266,"column":29}},"142":{"start":{"line":267,"column":6},"end":{"line":271,"column":7}},"143":{"start":{"line":268,"column":8},"end":{"line":268,"column":44}},"144":{"start":{"line":270,"column":8},"end":{"line":270,"column":36}},"145":{"start":{"line":275,"column":4},"end":{"line":279,"column":5}},"146":{"start":{"line":276,"column":6},"end":{"line":278,"column":7}},"147":{"start":{"line":277,"column":8},"end":{"line":277,"column":43}},"148":{"start":{"line":280,"column":4},"end":{"line":280,"column":39}},"149":{"start":{"line":281,"column":4},"end":{"line":281,"column":29}},"150":{"start":{"line":282,"column":4},"end":{"line":282,"column":29}},"151":{"start":{"line":284,"column":4},"end":{"line":284,"column":19}},"152":{"start":{"line":288,"column":4},"end":{"line":292,"column":5}},"153":{"start":{"line":289,"column":6},"end":{"line":289,"column":40}},"154":{"start":{"line":291,"column":6},"end":{"line":291,"column":32}},"155":{"start":{"line":293,"column":4},"end":{"line":293,"column":16}},"156":{"start":{"line":297,"column":4},"end":{"line":297,"column":35}},"157":{"start":{"line":298,"column":4},"end":{"line":298,"column":16}},"158":{"start":{"line":302,"column":4},"end":{"line":302,"column":77}},"159":{"start":{"line":306,"column":4},"end":{"line":306,"column":38}},"160":{"start":{"line":307,"column":4},"end":{"line":313,"column":5}},"161":{"start":{"line":308,"column":6},"end":{"line":310,"column":8}},"162":{"start":{"line":309,"column":8},"end":{"line":309,"column":40}},"163":{"start":{"line":312,"column":6},"end":{"line":312,"column":36}},"164":{"start":{"line":315,"column":4},"end":{"line":315,"column":16}},"165":{"start":{"line":326,"column":4},"end":{"line":326,"column":60}},"166":{"start":{"line":337,"column":4},"end":{"line":337,"column":66}},"167":{"start":{"line":341,"column":4},"end":{"line":341,"column":20}},"168":{"start":{"line":342,"column":4},"end":{"line":344,"column":6}},"169":{"start":{"line":343,"column":6},"end":{"line":343,"column":35}},"170":{"start":{"line":348,"column":4},"end":{"line":348,"column":20}},"171":{"start":{"line":349,"column":4},"end":{"line":359,"column":6}},"172":{"start":{"line":350,"column":6},"end":{"line":350,"column":74}},"173":{"start":{"line":353,"column":6},"end":{"line":353,"column":41}},"174":{"start":{"line":353,"column":24},"end":{"line":353,"column":41}},"175":{"start":{"line":355,"column":6},"end":{"line":355,"column":45}},"176":{"start":{"line":356,"column":6},"end":{"line":356,"column":55}},"177":{"start":{"line":357,"column":6},"end":{"line":357,"column":27}},"178":{"start":{"line":358,"column":6},"end":{"line":358,"column":23}},"179":{"start":{"line":365,"column":0},"end":{"line":391,"column":3}},"180":{"start":{"line":367,"column":4},"end":{"line":367,"column":83}},"181":{"start":{"line":368,"column":4},"end":{"line":368,"column":18}},"182":{"start":{"line":371,"column":4},"end":{"line":371,"column":87}},"183":{"start":{"line":372,"column":4},"end":{"line":372,"column":56}},"184":{"start":{"line":375,"column":4},"end":{"line":375,"column":86}},"185":{"start":{"line":376,"column":4},"end":{"line":376,"column":39}},"186":{"start":{"line":377,"column":4},"end":{"line":377,"column":16}},"187":{"start":{"line":380,"column":4},"end":{"line":380,"column":113}},"188":{"start":{"line":381,"column":4},"end":{"line":381,"column":16}},"189":{"start":{"line":384,"column":4},"end":{"line":384,"column":114}},"190":{"start":{"line":385,"column":4},"end":{"line":385,"column":16}},"191":{"start":{"line":388,"column":4},"end":{"line":388,"column":113}},"192":{"start":{"line":389,"column":4},"end":{"line":389,"column":16}},"193":{"start":{"line":392,"column":0},"end":{"line":392,"column":53}},"194":{"start":{"line":395,"column":0},"end":{"line":399,"column":1}},"195":{"start":{"line":396,"column":2},"end":{"line":396,"column":40}},"196":{"start":{"line":396,"column":29},"end":{"line":396,"column":40}},"197":{"start":{"line":397,"column":2},"end":{"line":397,"column":34}},"198":{"start":{"line":398,"column":2},"end":{"line":398,"column":62}},"199":{"start":{"line":400,"column":0},"end":{"line":400,"column":33}},"200":{"start":{"line":404,"column":0},"end":{"line":404,"column":34}},"201":{"start":{"line":405,"column":0},"end":{"line":405,"column":32}},"202":{"start":{"line":406,"column":0},"end":{"line":406,"column":42}},"203":{"start":{"line":407,"column":0},"end":{"line":407,"column":61}},"204":{"start":{"line":408,"column":0},"end":{"line":408,"column":66}},"205":{"start":{"line":410,"column":0},"end":{"line":410,"column":33}},"206":{"start":{"line":412,"column":0},"end":{"line":441,"column":1}},"207":{"start":{"line":413,"column":2},"end":{"line":413,"column":21}},"208":{"start":{"line":414,"column":2},"end":{"line":440,"column":5}},"209":{"start":{"line":415,"column":4},"end":{"line":436,"column":5}},"210":{"start":{"line":416,"column":6},"end":{"line":419,"column":8}},"211":{"start":{"line":417,"column":8},"end":{"line":417,"column":23}},"212":{"start":{"line":418,"column":8},"end":{"line":418,"column":22}},"213":{"start":{"line":421,"column":6},"end":{"line":424,"column":8}},"214":{"start":{"line":422,"column":8},"end":{"line":422,"column":23}},"215":{"start":{"line":423,"column":8},"end":{"line":423,"column":23}},"216":{"start":{"line":426,"column":6},"end":{"line":430,"column":7}},"217":{"start":{"line":427,"column":8},"end":{"line":427,"column":50}},"218":{"start":{"line":428,"column":8},"end":{"line":428,"column":48}},"219":{"start":{"line":429,"column":8},"end":{"line":429,"column":30}},"220":{"start":{"line":432,"column":6},"end":{"line":432,"column":38}},"221":{"start":{"line":433,"column":6},"end":{"line":433,"column":36}},"222":{"start":{"line":435,"column":6},"end":{"line":435,"column":20}},"223":{"start":{"line":438,"column":4},"end":{"line":438,"column":47}},"224":{"start":{"line":439,"column":4},"end":{"line":439,"column":63}},"225":{"start":{"line":443,"column":0},"end":{"line":450,"column":1}},"226":{"start":{"line":444,"column":2},"end":{"line":449,"column":5}},"227":{"start":{"line":445,"column":4},"end":{"line":447,"column":7}},"228":{"start":{"line":446,"column":6},"end":{"line":446,"column":33}},"229":{"start":{"line":448,"column":4},"end":{"line":448,"column":64}},"230":{"start":{"line":452,"column":0},"end":{"line":465,"column":1}},"231":{"start":{"line":454,"column":2},"end":{"line":460,"column":3}},"232":{"start":{"line":455,"column":4},"end":{"line":455,"column":16}},"233":{"start":{"line":456,"column":4},"end":{"line":456,"column":26}},"234":{"start":{"line":458,"column":9},"end":{"line":460,"column":3}},"235":{"start":{"line":459,"column":4},"end":{"line":459,"column":32}},"236":{"start":{"line":462,"column":2},"end":{"line":462,"column":56}},"237":{"start":{"line":464,"column":2},"end":{"line":464,"column":39}}},"branchMap":{"1":{"line":21,"type":"if","locations":[{"start":{"line":21,"column":4},"end":{"line":21,"column":4}},{"start":{"line":21,"column":4},"end":{"line":21,"column":4}}]},"2":{"line":26,"type":"if","locations":[{"start":{"line":26,"column":4},"end":{"line":26,"column":4}},{"start":{"line":26,"column":4},"end":{"line":26,"column":4}}]},"3":{"line":31,"type":"binary-expr","locations":[{"start":{"line":31,"column":14},"end":{"line":31,"column":21}},{"start":{"line":31,"column":25},"end":{"line":31,"column":27}}]},"4":{"line":35,"type":"binary-expr","locations":[{"start":{"line":35,"column":16},"end":{"line":35,"column":28}},{"start":{"line":35,"column":32},"end":{"line":35,"column":55}},{"start":{"line":35,"column":59},"end":{"line":35,"column":83}}]},"5":{"line":36,"type":"binary-expr","locations":[{"start":{"line":36,"column":16},"end":{"line":36,"column":28}},{"start":{"line":36,"column":32},"end":{"line":36,"column":45}}]},"6":{"line":37,"type":"binary-expr","locations":[{"start":{"line":37,"column":21},"end":{"line":37,"column":38}},{"start":{"line":37,"column":42},"end":{"line":37,"column":71}}]},"7":{"line":38,"type":"binary-expr","locations":[{"start":{"line":38,"column":19},"end":{"line":38,"column":34}},{"start":{"line":38,"column":38},"end":{"line":38,"column":64}},{"start":{"line":38,"column":68},"end":{"line":38,"column":70}}]},"8":{"line":39,"type":"binary-expr","locations":[{"start":{"line":39,"column":23},"end":{"line":39,"column":42}},{"start":{"line":39,"column":46},"end":{"line":39,"column":76}},{"start":{"line":39,"column":80},"end":{"line":39,"column":82}}]},"9":{"line":41,"type":"binary-expr","locations":[{"start":{"line":41,"column":22},"end":{"line":41,"column":36}},{"start":{"line":41,"column":40},"end":{"line":41,"column":42}}]},"10":{"line":45,"type":"if","locations":[{"start":{"line":45,"column":4},"end":{"line":45,"column":4}},{"start":{"line":45,"column":4},"end":{"line":45,"column":4}}]},"11":{"line":49,"type":"if","locations":[{"start":{"line":49,"column":4},"end":{"line":49,"column":4}},{"start":{"line":49,"column":4},"end":{"line":49,"column":4}}]},"12":{"line":51,"type":"binary-expr","locations":[{"start":{"line":51,"column":16},"end":{"line":51,"column":26}},{"start":{"line":51,"column":30},"end":{"line":51,"column":34}}]},"13":{"line":58,"type":"if","locations":[{"start":{"line":58,"column":4},"end":{"line":58,"column":4}},{"start":{"line":58,"column":4},"end":{"line":58,"column":4}}]},"14":{"line":61,"type":"if","locations":[{"start":{"line":61,"column":4},"end":{"line":61,"column":4}},{"start":{"line":61,"column":4},"end":{"line":61,"column":4}}]},"15":{"line":73,"type":"if","locations":[{"start":{"line":73,"column":4},"end":{"line":73,"column":4}},{"start":{"line":73,"column":4},"end":{"line":73,"column":4}}]},"16":{"line":78,"type":"if","locations":[{"start":{"line":78,"column":4},"end":{"line":78,"column":4}},{"start":{"line":78,"column":4},"end":{"line":78,"column":4}}]},"17":{"line":78,"type":"binary-expr","locations":[{"start":{"line":78,"column":8},"end":{"line":78,"column":12}},{"start":{"line":78,"column":16},"end":{"line":78,"column":39}}]},"18":{"line":90,"type":"if","locations":[{"start":{"line":90,"column":4},"end":{"line":90,"column":4}},{"start":{"line":90,"column":4},"end":{"line":90,"column":4}}]},"19":{"line":96,"type":"binary-expr","locations":[{"start":{"line":96,"column":24},"end":{"line":96,"column":37}},{"start":{"line":96,"column":41},"end":{"line":96,"column":68}},{"start":{"line":96,"column":72},"end":{"line":96,"column":74}}]},"20":{"line":102,"type":"binary-expr","locations":[{"start":{"line":102,"column":25},"end":{"line":102,"column":43}},{"start":{"line":102,"column":47},"end":{"line":102,"column":56}}]},"21":{"line":104,"type":"if","locations":[{"start":{"line":104,"column":4},"end":{"line":104,"column":4}},{"start":{"line":104,"column":4},"end":{"line":104,"column":4}}]},"22":{"line":108,"type":"binary-expr","locations":[{"start":{"line":108,"column":25},"end":{"line":108,"column":43}},{"start":{"line":108,"column":47},"end":{"line":108,"column":63}}]},"23":{"line":109,"type":"binary-expr","locations":[{"start":{"line":109,"column":20},"end":{"line":109,"column":33}},{"start":{"line":109,"column":37},"end":{"line":109,"column":52}}]},"24":{"line":116,"type":"if","locations":[{"start":{"line":116,"column":4},"end":{"line":116,"column":4}},{"start":{"line":116,"column":4},"end":{"line":116,"column":4}}]},"25":{"line":120,"type":"if","locations":[{"start":{"line":120,"column":4},"end":{"line":120,"column":4}},{"start":{"line":120,"column":4},"end":{"line":120,"column":4}}]},"26":{"line":125,"type":"if","locations":[{"start":{"line":125,"column":4},"end":{"line":125,"column":4}},{"start":{"line":125,"column":4},"end":{"line":125,"column":4}}]},"27":{"line":126,"type":"if","locations":[{"start":{"line":126,"column":4},"end":{"line":126,"column":4}},{"start":{"line":126,"column":4},"end":{"line":126,"column":4}}]},"28":{"line":126,"type":"binary-expr","locations":[{"start":{"line":126,"column":8},"end":{"line":126,"column":31}},{"start":{"line":126,"column":35},"end":{"line":126,"column":61}}]},"29":{"line":128,"type":"if","locations":[{"start":{"line":128,"column":4},"end":{"line":128,"column":4}},{"start":{"line":128,"column":4},"end":{"line":128,"column":4}}]},"30":{"line":158,"type":"if","locations":[{"start":{"line":158,"column":4},"end":{"line":158,"column":4}},{"start":{"line":158,"column":4},"end":{"line":158,"column":4}}]},"31":{"line":158,"type":"binary-expr","locations":[{"start":{"line":158,"column":8},"end":{"line":158,"column":11}},{"start":{"line":158,"column":15},"end":{"line":158,"column":43}}]},"32":{"line":162,"type":"binary-expr","locations":[{"start":{"line":162,"column":15},"end":{"line":162,"column":21}},{"start":{"line":162,"column":25},"end":{"line":162,"column":27}}]},"33":{"line":171,"type":"if","locations":[{"start":{"line":171,"column":4},"end":{"line":171,"column":4}},{"start":{"line":171,"column":4},"end":{"line":171,"column":4}}]},"34":{"line":178,"type":"if","locations":[{"start":{"line":178,"column":4},"end":{"line":178,"column":4}},{"start":{"line":178,"column":4},"end":{"line":178,"column":4}}]},"35":{"line":178,"type":"binary-expr","locations":[{"start":{"line":178,"column":8},"end":{"line":178,"column":11}},{"start":{"line":178,"column":15},"end":{"line":178,"column":43}}]},"36":{"line":182,"type":"binary-expr","locations":[{"start":{"line":182,"column":15},"end":{"line":182,"column":21}},{"start":{"line":182,"column":25},"end":{"line":182,"column":27}}]},"37":{"line":195,"type":"if","locations":[{"start":{"line":195,"column":4},"end":{"line":195,"column":4}},{"start":{"line":195,"column":4},"end":{"line":195,"column":4}}]},"38":{"line":195,"type":"binary-expr","locations":[{"start":{"line":195,"column":8},"end":{"line":195,"column":11}},{"start":{"line":195,"column":15},"end":{"line":195,"column":43}}]},"39":{"line":199,"type":"binary-expr","locations":[{"start":{"line":199,"column":15},"end":{"line":199,"column":21}},{"start":{"line":199,"column":25},"end":{"line":199,"column":27}}]},"40":{"line":214,"type":"if","locations":[{"start":{"line":214,"column":4},"end":{"line":214,"column":4}},{"start":{"line":214,"column":4},"end":{"line":214,"column":4}}]},"41":{"line":214,"type":"binary-expr","locations":[{"start":{"line":214,"column":8},"end":{"line":214,"column":13}},{"start":{"line":214,"column":17},"end":{"line":214,"column":42}}]},"42":{"line":226,"type":"if","locations":[{"start":{"line":226,"column":4},"end":{"line":226,"column":4}},{"start":{"line":226,"column":4},"end":{"line":226,"column":4}}]},"43":{"line":226,"type":"binary-expr","locations":[{"start":{"line":226,"column":8},"end":{"line":226,"column":13}},{"start":{"line":226,"column":17},"end":{"line":226,"column":46}}]},"44":{"line":236,"type":"if","locations":[{"start":{"line":236,"column":4},"end":{"line":236,"column":4}},{"start":{"line":236,"column":4},"end":{"line":236,"column":4}}]},"45":{"line":246,"type":"if","locations":[{"start":{"line":246,"column":6},"end":{"line":246,"column":6}},{"start":{"line":246,"column":6},"end":{"line":246,"column":6}}]},"46":{"line":260,"type":"if","locations":[{"start":{"line":260,"column":4},"end":{"line":260,"column":4}},{"start":{"line":260,"column":4},"end":{"line":260,"column":4}}]},"47":{"line":260,"type":"binary-expr","locations":[{"start":{"line":260,"column":8},"end":{"line":260,"column":13}},{"start":{"line":260,"column":17},"end":{"line":260,"column":46}}]},"48":{"line":267,"type":"if","locations":[{"start":{"line":267,"column":6},"end":{"line":267,"column":6}},{"start":{"line":267,"column":6},"end":{"line":267,"column":6}}]},"49":{"line":276,"type":"if","locations":[{"start":{"line":276,"column":6},"end":{"line":276,"column":6}},{"start":{"line":276,"column":6},"end":{"line":276,"column":6}}]},"50":{"line":288,"type":"if","locations":[{"start":{"line":288,"column":4},"end":{"line":288,"column":4}},{"start":{"line":288,"column":4},"end":{"line":288,"column":4}}]},"51":{"line":302,"type":"cond-expr","locations":[{"start":{"line":302,"column":27},"end":{"line":302,"column":54}},{"start":{"line":302,"column":57},"end":{"line":302,"column":76}}]},"52":{"line":307,"type":"if","locations":[{"start":{"line":307,"column":4},"end":{"line":307,"column":4}},{"start":{"line":307,"column":4},"end":{"line":307,"column":4}}]},"53":{"line":350,"type":"binary-expr","locations":[{"start":{"line":350,"column":19},"end":{"line":350,"column":29}},{"start":{"line":350,"column":33},"end":{"line":350,"column":47}},{"start":{"line":350,"column":51},"end":{"line":350,"column":66}},{"start":{"line":350,"column":70},"end":{"line":350,"column":73}}]},"54":{"line":353,"type":"if","locations":[{"start":{"line":353,"column":6},"end":{"line":353,"column":6}},{"start":{"line":353,"column":6},"end":{"line":353,"column":6}}]},"55":{"line":396,"type":"if","locations":[{"start":{"line":396,"column":2},"end":{"line":396,"column":2}},{"start":{"line":396,"column":2},"end":{"line":396,"column":2}}]},"56":{"line":415,"type":"if","locations":[{"start":{"line":415,"column":4},"end":{"line":415,"column":4}},{"start":{"line":415,"column":4},"end":{"line":415,"column":4}}]},"57":{"line":426,"type":"if","locations":[{"start":{"line":426,"column":6},"end":{"line":426,"column":6}},{"start":{"line":426,"column":6},"end":{"line":426,"column":6}}]},"58":{"line":446,"type":"binary-expr","locations":[{"start":{"line":446,"column":6},"end":{"line":446,"column":8}},{"start":{"line":446,"column":12},"end":{"line":446,"column":32}}]},"59":{"line":454,"type":"if","locations":[{"start":{"line":454,"column":2},"end":{"line":454,"column":2}},{"start":{"line":454,"column":2},"end":{"line":454,"column":2}}]},"60":{"line":458,"type":"if","locations":[{"start":{"line":458,"column":9},"end":{"line":458,"column":9}},{"start":{"line":458,"column":9},"end":{"line":458,"column":9}}]},"61":{"line":462,"type":"binary-expr","locations":[{"start":{"line":462,"column":2},"end":{"line":462,"column":28}},{"start":{"line":462,"column":33},"end":{"line":462,"column":54}}]}}},"/Users/lewis/dev/raven-node/lib/parsers.js":{"path":"/Users/lewis/dev/raven-node/lib/parsers.js","s":{"1":1,"2":1,"3":1,"4":1,"5":1,"6":7,"7":7,"8":7,"9":1,"10":21,"11":21,"12":21,"13":21,"14":21,"15":21,"16":21,"17":7,"18":7,"19":4,"20":4,"21":21,"22":1,"23":1,"24":21,"25":21,"26":21,"27":21,"28":21,"29":1,"30":1,"31":1,"32":1,"33":1,"34":1,"35":27,"36":27,"37":27,"38":27,"39":27,"40":27,"41":27,"42":27,"43":27,"44":27,"45":27,"46":5,"47":4,"48":27,"49":1,"50":27,"51":27,"52":27,"53":27,"54":27,"55":26,"56":2,"57":4,"58":4,"59":26,"60":4,"61":26,"62":27},"b":{"1":[7,1],"2":[21,0],"3":[21,2],"4":[7,0],"5":[4,3],"6":[7,5,4],"7":[4,1],"8":[1,20],"9":[1,1],"10":[21,0],"11":[21,20],"12":[1,1],"13":[27,26],"14":[27,18,15],"15":[27,12,11,3],"16":[6,21],"17":[27,24,23],"18":[23,21],"19":[27,26],"20":[27,26],"21":[26,0],"22":[27,25],"23":[5,22],"24":[4,1],"25":[1,26],"26":[27,6],"27":[27,25],"28":[25,23],"29":[26,1],"30":[2,24],"31":[4,0],"32":[4,22]},"f":{"1":7,"2":21,"3":21,"4":1,"5":27},"fnMap":{"1":{"name":"parseText","line":9,"loc":{"start":{"line":9,"column":27},"end":{"line":9,"column":63}}},"2":{"name":"parseError","line":16,"loc":{"start":{"line":16,"column":28},"end":{"line":16,"column":65}}},"3":{"name":"(anonymous_3)","line":17,"loc":{"start":{"line":17,"column":24},"end":{"line":17,"column":42}}},"4":{"name":"parseQuery","line":56,"loc":{"start":{"line":56,"column":28},"end":{"line":56,"column":71}}},"5":{"name":"parseRequest","line":66,"loc":{"start":{"line":66,"column":30},"end":{"line":66,"column":65}}}},"statementMap":{"1":{"start":{"line":3,"column":0},"end":{"line":3,"column":31}},"2":{"start":{"line":4,"column":0},"end":{"line":4,"column":31}},"3":{"start":{"line":5,"column":0},"end":{"line":5,"column":47}},"4":{"start":{"line":7,"column":0},"end":{"line":7,"column":31}},"5":{"start":{"line":9,"column":0},"end":{"line":14,"column":2}},"6":{"start":{"line":10,"column":2},"end":{"line":10,"column":24}},"7":{"start":{"line":11,"column":2},"end":{"line":11,"column":27}},"8":{"start":{"line":13,"column":2},"end":{"line":13,"column":16}},"9":{"start":{"line":16,"column":0},"end":{"line":54,"column":2}},"10":{"start":{"line":17,"column":2},"end":{"line":53,"column":5}},"11":{"start":{"line":18,"column":4},"end":{"line":18,"column":29}},"12":{"start":{"line":19,"column":4},"end":{"line":21,"column":5}},"13":{"start":{"line":20,"column":6},"end":{"line":20,"column":69}},"14":{"start":{"line":22,"column":4},"end":{"line":28,"column":7}},"15":{"start":{"line":31,"column":4},"end":{"line":31,"column":24}},"16":{"start":{"line":32,"column":4},"end":{"line":39,"column":5}},"17":{"start":{"line":33,"column":6},"end":{"line":38,"column":7}},"18":{"start":{"line":34,"column":8},"end":{"line":37,"column":9}},"19":{"start":{"line":35,"column":10},"end":{"line":35,"column":50}},"20":{"start":{"line":36,"column":10},"end":{"line":36,"column":42}},"21":{"start":{"line":40,"column":4},"end":{"line":43,"column":5}},"22":{"start":{"line":41,"column":6},"end":{"line":41,"column":40}},"23":{"start":{"line":42,"column":6},"end":{"line":42,"column":43}},"24":{"start":{"line":45,"column":4},"end":{"line":50,"column":5}},"25":{"start":{"line":46,"column":6},"end":{"line":49,"column":7}},"26":{"start":{"line":47,"column":8},"end":{"line":47,"column":71}},"27":{"start":{"line":48,"column":8},"end":{"line":48,"column":14}},"28":{"start":{"line":52,"column":4},"end":{"line":52,"column":15}},"29":{"start":{"line":56,"column":0},"end":{"line":64,"column":2}},"30":{"start":{"line":57,"column":2},"end":{"line":57,"column":24}},"31":{"start":{"line":58,"column":2},"end":{"line":58,"column":25}},"32":{"start":{"line":59,"column":2},"end":{"line":62,"column":4}},"33":{"start":{"line":63,"column":2},"end":{"line":63,"column":16}},"34":{"start":{"line":66,"column":0},"end":{"line":191,"column":2}},"35":{"start":{"line":67,"column":2},"end":{"line":67,"column":24}},"36":{"start":{"line":75,"column":2},"end":{"line":75,"column":48}},"37":{"start":{"line":83,"column":2},"end":{"line":83,"column":26}},"38":{"start":{"line":91,"column":2},"end":{"line":91,"column":69}},"39":{"start":{"line":99,"column":2},"end":{"line":99,"column":107}},"40":{"start":{"line":107,"column":2},"end":{"line":107,"column":47}},"41":{"start":{"line":110,"column":2},"end":{"line":110,"column":50}},"42":{"start":{"line":118,"column":2},"end":{"line":118,"column":74}},"43":{"start":{"line":126,"column":2},"end":{"line":126,"column":51}},"44":{"start":{"line":134,"column":2},"end":{"line":134,"column":22}},"45":{"start":{"line":135,"column":2},"end":{"line":139,"column":3}},"46":{"start":{"line":136,"column":4},"end":{"line":138,"column":5}},"47":{"start":{"line":137,"column":6},"end":{"line":137,"column":29}},"48":{"start":{"line":141,"column":2},"end":{"line":144,"column":3}},"49":{"start":{"line":143,"column":4},"end":{"line":143,"column":27}},"50":{"start":{"line":152,"column":2},"end":{"line":152,"column":58}},"51":{"start":{"line":155,"column":2},"end":{"line":162,"column":4}},"52":{"start":{"line":165,"column":2},"end":{"line":165,"column":24}},"53":{"start":{"line":171,"column":2},"end":{"line":171,"column":16}},"54":{"start":{"line":172,"column":2},"end":{"line":188,"column":3}},"55":{"start":{"line":173,"column":4},"end":{"line":181,"column":5}},"56":{"start":{"line":176,"column":6},"end":{"line":180,"column":7}},"57":{"start":{"line":177,"column":8},"end":{"line":179,"column":9}},"58":{"start":{"line":178,"column":10},"end":{"line":178,"column":36}},"59":{"start":{"line":183,"column":4},"end":{"line":185,"column":5}},"60":{"start":{"line":184,"column":6},"end":{"line":184,"column":27}},"61":{"start":{"line":187,"column":4},"end":{"line":187,"column":23}},"62":{"start":{"line":190,"column":2},"end":{"line":190,"column":16}}},"branchMap":{"1":{"line":10,"type":"binary-expr","locations":[{"start":{"line":10,"column":11},"end":{"line":10,"column":17}},{"start":{"line":10,"column":21},"end":{"line":10,"column":23}}]},"2":{"line":19,"type":"if","locations":[{"start":{"line":19,"column":4},"end":{"line":19,"column":4}},{"start":{"line":19,"column":4},"end":{"line":19,"column":4}}]},"3":{"line":20,"type":"binary-expr","locations":[{"start":{"line":20,"column":38},"end":{"line":20,"column":49}},{"start":{"line":20,"column":53},"end":{"line":20,"column":67}}]},"4":{"line":33,"type":"if","locations":[{"start":{"line":33,"column":6},"end":{"line":33,"column":6}},{"start":{"line":33,"column":6},"end":{"line":33,"column":6}}]},"5":{"line":34,"type":"if","locations":[{"start":{"line":34,"column":8},"end":{"line":34,"column":8}},{"start":{"line":34,"column":8},"end":{"line":34,"column":8}}]},"6":{"line":34,"type":"binary-expr","locations":[{"start":{"line":34,"column":12},"end":{"line":34,"column":26}},{"start":{"line":34,"column":30},"end":{"line":34,"column":47}},{"start":{"line":34,"column":51},"end":{"line":34,"column":66}}]},"7":{"line":35,"type":"binary-expr","locations":[{"start":{"line":35,"column":28},"end":{"line":35,"column":43}},{"start":{"line":35,"column":47},"end":{"line":35,"column":49}}]},"8":{"line":40,"type":"if","locations":[{"start":{"line":40,"column":4},"end":{"line":40,"column":4}},{"start":{"line":40,"column":4},"end":{"line":40,"column":4}}]},"9":{"line":41,"type":"binary-expr","locations":[{"start":{"line":41,"column":21},"end":{"line":41,"column":33}},{"start":{"line":41,"column":37},"end":{"line":41,"column":39}}]},"10":{"line":46,"type":"if","locations":[{"start":{"line":46,"column":6},"end":{"line":46,"column":6}},{"start":{"line":46,"column":6},"end":{"line":46,"column":6}}]},"11":{"line":47,"type":"binary-expr","locations":[{"start":{"line":47,"column":25},"end":{"line":47,"column":39}},{"start":{"line":47,"column":43},"end":{"line":47,"column":70}}]},"12":{"line":57,"type":"binary-expr","locations":[{"start":{"line":57,"column":11},"end":{"line":57,"column":17}},{"start":{"line":57,"column":21},"end":{"line":57,"column":23}}]},"13":{"line":67,"type":"binary-expr","locations":[{"start":{"line":67,"column":11},"end":{"line":67,"column":17}},{"start":{"line":67,"column":21},"end":{"line":67,"column":23}}]},"14":{"line":75,"type":"binary-expr","locations":[{"start":{"line":75,"column":16},"end":{"line":75,"column":27}},{"start":{"line":75,"column":31},"end":{"line":75,"column":41}},{"start":{"line":75,"column":45},"end":{"line":75,"column":47}}]},"15":{"line":91,"type":"binary-expr","locations":[{"start":{"line":91,"column":13},"end":{"line":91,"column":25}},{"start":{"line":91,"column":29},"end":{"line":91,"column":37}},{"start":{"line":91,"column":41},"end":{"line":91,"column":53}},{"start":{"line":91,"column":57},"end":{"line":91,"column":68}}]},"16":{"line":99,"type":"cond-expr","locations":[{"start":{"line":99,"column":90},"end":{"line":99,"column":97}},{"start":{"line":99,"column":100},"end":{"line":99,"column":106}}]},"17":{"line":99,"type":"binary-expr","locations":[{"start":{"line":99,"column":17},"end":{"line":99,"column":41}},{"start":{"line":99,"column":45},"end":{"line":99,"column":55}},{"start":{"line":99,"column":59},"end":{"line":99,"column":87}}]},"18":{"line":99,"type":"binary-expr","locations":[{"start":{"line":99,"column":60},"end":{"line":99,"column":70}},{"start":{"line":99,"column":74},"end":{"line":99,"column":76}}]},"19":{"line":107,"type":"binary-expr","locations":[{"start":{"line":107,"column":20},"end":{"line":107,"column":35}},{"start":{"line":107,"column":39},"end":{"line":107,"column":46}}]},"20":{"line":118,"type":"binary-expr","locations":[{"start":{"line":118,"column":14},"end":{"line":118,"column":23}},{"start":{"line":118,"column":27},"end":{"line":118,"column":73}}]},"21":{"line":118,"type":"binary-expr","locations":[{"start":{"line":118,"column":43},"end":{"line":118,"column":54}},{"start":{"line":118,"column":58},"end":{"line":118,"column":60}}]},"22":{"line":126,"type":"binary-expr","locations":[{"start":{"line":126,"column":29},"end":{"line":126,"column":43}},{"start":{"line":126,"column":47},"end":{"line":126,"column":49}}]},"23":{"line":135,"type":"if","locations":[{"start":{"line":135,"column":2},"end":{"line":135,"column":2}},{"start":{"line":135,"column":2},"end":{"line":135,"column":2}}]},"24":{"line":136,"type":"if","locations":[{"start":{"line":136,"column":4},"end":{"line":136,"column":4}},{"start":{"line":136,"column":4},"end":{"line":136,"column":4}}]},"25":{"line":141,"type":"if","locations":[{"start":{"line":141,"column":2},"end":{"line":141,"column":2}},{"start":{"line":141,"column":2},"end":{"line":141,"column":2}}]},"26":{"line":141,"type":"binary-expr","locations":[{"start":{"line":141,"column":6},"end":{"line":141,"column":10}},{"start":{"line":141,"column":14},"end":{"line":141,"column":58}}]},"27":{"line":152,"type":"binary-expr","locations":[{"start":{"line":152,"column":11},"end":{"line":152,"column":17}},{"start":{"line":152,"column":21},"end":{"line":152,"column":57}}]},"28":{"line":152,"type":"binary-expr","locations":[{"start":{"line":152,"column":22},"end":{"line":152,"column":36}},{"start":{"line":152,"column":40},"end":{"line":152,"column":42}}]},"29":{"line":172,"type":"if","locations":[{"start":{"line":172,"column":2},"end":{"line":172,"column":2}},{"start":{"line":172,"column":2},"end":{"line":172,"column":2}}]},"30":{"line":173,"type":"if","locations":[{"start":{"line":173,"column":4},"end":{"line":173,"column":4}},{"start":{"line":173,"column":4},"end":{"line":173,"column":4}}]},"31":{"line":177,"type":"if","locations":[{"start":{"line":177,"column":8},"end":{"line":177,"column":8}},{"start":{"line":177,"column":8},"end":{"line":177,"column":8}}]},"32":{"line":183,"type":"if","locations":[{"start":{"line":183,"column":4},"end":{"line":183,"column":4}},{"start":{"line":183,"column":4},"end":{"line":183,"column":4}}]}}},"/Users/lewis/dev/raven-node/lib/utils.js":{"path":"/Users/lewis/dev/raven-node/lib/utils.js","s":{"1":1,"2":1,"3":1,"4":1,"5":1,"6":1,"7":1,"8":1,"9":1,"10":1,"11":1,"12":1,"13":19,"14":0,"15":0,"16":1,"17":0,"18":0,"19":0,"20":0,"21":0,"22":0,"23":1,"24":24,"25":24,"26":24,"27":24,"28":24,"29":24,"30":1,"31":73,"32":4,"33":69,"34":69,"35":69,"36":2,"37":69,"38":1,"39":68,"40":68,"41":68,"42":68,"43":68,"44":1,"45":1,"46":24,"47":23,"48":1,"49":1,"50":1,"51":29,"52":1,"53":29,"54":1,"55":1,"56":283,"57":283,"58":0,"59":1,"60":1,"61":286,"62":285,"63":286,"64":286,"65":286,"66":286,"67":194,"68":92,"69":92,"70":1,"71":1,"72":1,"73":1,"74":1,"75":91,"76":1,"77":25,"78":25,"79":1,"80":24,"81":24,"82":3,"83":21,"84":21,"85":21,"86":283,"87":283,"88":283,"89":283,"90":283,"91":65,"92":65,"93":0,"94":65,"95":218,"96":0,"97":0,"98":0,"99":0,"100":218,"101":218,"102":218,"103":218,"104":218,"105":218,"106":218,"107":21,"108":1,"109":218,"110":218,"111":218,"112":1,"113":1},"b":{"1":[0,19],"2":[19,0],"3":[1,0],"4":[0,0],"5":[4,69],"6":[2,67],"7":[1,68],"8":[68,65,0],"9":[23,1],"10":[24,2],"11":[23,1],"12":[23,1],"13":[1,28],"14":[283,91],"15":[91,91],"16":[1,1,0],"17":[285,1],"18":[194,92],"19":[1,91],"20":[1,0],"21":[1,24],"22":[3,21],"23":[24,24,24,21],"24":[283,0],"25":[283,283,65],"26":[283,218],"27":[283,0],"28":[65,218],"29":[0,65],"30":[0,218],"31":[0,0],"32":[218,0],"33":[21,197]},"f":{"1":1,"2":19,"3":0,"4":24,"5":73,"6":24,"7":29,"8":283,"9":286,"10":25,"11":283,"12":218,"13":218},"fnMap":{"1":{"name":"disableConsoleAlerts","line":19,"loc":{"start":{"line":19,"column":38},"end":{"line":19,"column":70}}},"2":{"name":"consoleAlert","line":23,"loc":{"start":{"line":23,"column":30},"end":{"line":23,"column":57}}},"3":{"name":"(anonymous_3)","line":30,"loc":{"start":{"line":30,"column":41},"end":{"line":30,"column":59}}},"4":{"name":"getAuthHeader","line":42,"loc":{"start":{"line":42,"column":31},"end":{"line":42,"column":84}}},"5":{"name":"parseDSN","line":51,"loc":{"start":{"line":51,"column":26},"end":{"line":51,"column":49}}},"6":{"name":"getCulprit","line":83,"loc":{"start":{"line":83,"column":28},"end":{"line":83,"column":55}}},"7":{"name":"getModules","line":91,"loc":{"start":{"line":91,"column":28},"end":{"line":91,"column":50}}},"8":{"name":"getFunction","line":101,"loc":{"start":{"line":101,"column":0},"end":{"line":101,"column":27}}},"9":{"name":"getModule","line":115,"loc":{"start":{"line":115,"column":0},"end":{"line":115,"column":35}}},"10":{"name":"parseStack","line":138,"loc":{"start":{"line":138,"column":0},"end":{"line":138,"column":29}}},"11":{"name":"(anonymous_11)","line":159,"loc":{"start":{"line":159,"column":23},"end":{"line":159,"column":46}}},"12":{"name":"(anonymous_12)","line":186,"loc":{"start":{"line":186,"column":32},"end":{"line":186,"column":54}}},"13":{"name":"parseLines","line":196,"loc":{"start":{"line":196,"column":4},"end":{"line":196,"column":31}}}},"statementMap":{"1":{"start":{"line":3,"column":0},"end":{"line":3,"column":23}},"2":{"start":{"line":4,"column":0},"end":{"line":4,"column":25}},"3":{"start":{"line":5,"column":0},"end":{"line":5,"column":41}},"4":{"start":{"line":6,"column":0},"end":{"line":6,"column":27}},"5":{"start":{"line":7,"column":0},"end":{"line":7,"column":29}},"6":{"start":{"line":8,"column":0},"end":{"line":8,"column":40}},"7":{"start":{"line":10,"column":0},"end":{"line":10,"column":54}},"8":{"start":{"line":12,"column":0},"end":{"line":15,"column":2}},"9":{"start":{"line":17,"column":0},"end":{"line":17,"column":23}},"10":{"start":{"line":19,"column":0},"end":{"line":21,"column":2}},"11":{"start":{"line":20,"column":2},"end":{"line":20,"column":24}},"12":{"start":{"line":23,"column":0},"end":{"line":28,"column":2}},"13":{"start":{"line":24,"column":2},"end":{"line":27,"column":3}},"14":{"start":{"line":25,"column":4},"end":{"line":25,"column":30}},"15":{"start":{"line":26,"column":4},"end":{"line":26,"column":60}},"16":{"start":{"line":30,"column":0},"end":{"line":40,"column":2}},"17":{"start":{"line":31,"column":2},"end":{"line":38,"column":3}},"18":{"start":{"line":32,"column":4},"end":{"line":32,"column":30}},"19":{"start":{"line":33,"column":4},"end":{"line":37,"column":5}},"20":{"start":{"line":34,"column":6},"end":{"line":36,"column":7}},"21":{"start":{"line":35,"column":8},"end":{"line":35,"column":34}},"22":{"start":{"line":39,"column":2},"end":{"line":39,"column":16}},"23":{"start":{"line":42,"column":0},"end":{"line":49,"column":2}},"24":{"start":{"line":43,"column":2},"end":{"line":43,"column":43}},"25":{"start":{"line":44,"column":2},"end":{"line":44,"column":47}},"26":{"start":{"line":45,"column":2},"end":{"line":45,"column":58}},"27":{"start":{"line":46,"column":2},"end":{"line":46,"column":38}},"28":{"start":{"line":47,"column":2},"end":{"line":47,"column":44}},"29":{"start":{"line":48,"column":2},"end":{"line":48,"column":27}},"30":{"start":{"line":51,"column":0},"end":{"line":81,"column":2}},"31":{"start":{"line":52,"column":2},"end":{"line":55,"column":3}},"32":{"start":{"line":54,"column":4},"end":{"line":54,"column":17}},"33":{"start":{"line":56,"column":2},"end":{"line":80,"column":3}},"34":{"start":{"line":57,"column":4},"end":{"line":63,"column":10}},"35":{"start":{"line":65,"column":4},"end":{"line":67,"column":5}},"36":{"start":{"line":66,"column":6},"end":{"line":66,"column":58}},"37":{"start":{"line":69,"column":4},"end":{"line":71,"column":5}},"38":{"start":{"line":70,"column":6},"end":{"line":70,"column":43}},"39":{"start":{"line":73,"column":4},"end":{"line":73,"column":49}},"40":{"start":{"line":74,"column":4},"end":{"line":74,"column":57}},"41":{"start":{"line":75,"column":4},"end":{"line":75,"column":60}},"42":{"start":{"line":76,"column":4},"end":{"line":76,"column":75}},"43":{"start":{"line":77,"column":4},"end":{"line":77,"column":20}},"44":{"start":{"line":79,"column":4},"end":{"line":79,"column":50}},"45":{"start":{"line":83,"column":0},"end":{"line":88,"column":2}},"46":{"start":{"line":84,"column":2},"end":{"line":86,"column":3}},"47":{"start":{"line":85,"column":4},"end":{"line":85,"column":68}},"48":{"start":{"line":87,"column":2},"end":{"line":87,"column":21}},"49":{"start":{"line":90,"column":0},"end":{"line":90,"column":16}},"50":{"start":{"line":91,"column":0},"end":{"line":96,"column":2}},"51":{"start":{"line":92,"column":2},"end":{"line":94,"column":3}},"52":{"start":{"line":93,"column":4},"end":{"line":93,"column":26}},"53":{"start":{"line":95,"column":2},"end":{"line":95,"column":21}},"54":{"start":{"line":99,"column":0},"end":{"line":99,"column":25}},"55":{"start":{"line":101,"column":0},"end":{"line":111,"column":1}},"56":{"start":{"line":102,"column":2},"end":{"line":110,"column":3}},"57":{"start":{"line":103,"column":4},"end":{"line":104,"column":73}},"58":{"start":{"line":109,"column":4},"end":{"line":109,"column":25}},"59":{"start":{"line":113,"column":0},"end":{"line":113,"column":94}},"60":{"start":{"line":115,"column":0},"end":{"line":136,"column":1}},"61":{"start":{"line":116,"column":2},"end":{"line":116,"column":31}},"62":{"start":{"line":116,"column":13},"end":{"line":116,"column":31}},"63":{"start":{"line":119,"column":2},"end":{"line":119,"column":44}},"64":{"start":{"line":120,"column":2},"end":{"line":120,"column":36}},"65":{"start":{"line":121,"column":2},"end":{"line":121,"column":49}},"66":{"start":{"line":122,"column":2},"end":{"line":125,"column":3}},"67":{"start":{"line":124,"column":4},"end":{"line":124,"column":68}},"68":{"start":{"line":128,"column":2},"end":{"line":128,"column":44}},"69":{"start":{"line":129,"column":2},"end":{"line":134,"column":3}},"70":{"start":{"line":130,"column":4},"end":{"line":130,"column":66}},"71":{"start":{"line":131,"column":4},"end":{"line":131,"column":30}},"72":{"start":{"line":131,"column":16},"end":{"line":131,"column":30}},"73":{"start":{"line":132,"column":4},"end":{"line":132,"column":19}},"74":{"start":{"line":133,"column":4},"end":{"line":133,"column":18}},"75":{"start":{"line":135,"column":2},"end":{"line":135,"column":14}},"76":{"start":{"line":138,"column":0},"end":{"line":202,"column":1}},"77":{"start":{"line":139,"column":2},"end":{"line":140,"column":17}},"78":{"start":{"line":142,"column":2},"end":{"line":144,"column":3}},"79":{"start":{"line":143,"column":4},"end":{"line":143,"column":22}},"80":{"start":{"line":146,"column":2},"end":{"line":146,"column":36}},"81":{"start":{"line":149,"column":2},"end":{"line":152,"column":3}},"82":{"start":{"line":151,"column":4},"end":{"line":151,"column":22}},"83":{"start":{"line":154,"column":2},"end":{"line":154,"column":31}},"84":{"start":{"line":157,"column":2},"end":{"line":157,"column":18}},"85":{"start":{"line":159,"column":2},"end":{"line":201,"column":5}},"86":{"start":{"line":160,"column":4},"end":{"line":165,"column":95}},"87":{"start":{"line":168,"column":4},"end":{"line":168,"column":76}},"88":{"start":{"line":171,"column":4},"end":{"line":171,"column":65}},"89":{"start":{"line":171,"column":24},"end":{"line":171,"column":65}},"90":{"start":{"line":174,"column":4},"end":{"line":178,"column":5}},"91":{"start":{"line":175,"column":6},"end":{"line":175,"column":28}},"92":{"start":{"line":176,"column":6},"end":{"line":176,"column":40}},"93":{"start":{"line":176,"column":29},"end":{"line":176,"column":40}},"94":{"start":{"line":177,"column":6},"end":{"line":177,"column":13}},"95":{"start":{"line":180,"column":4},"end":{"line":184,"column":5}},"96":{"start":{"line":181,"column":6},"end":{"line":181,"column":40}},"97":{"start":{"line":182,"column":6},"end":{"line":182,"column":40}},"98":{"start":{"line":182,"column":29},"end":{"line":182,"column":40}},"99":{"start":{"line":183,"column":6},"end":{"line":183,"column":13}},"100":{"start":{"line":186,"column":4},"end":{"line":194,"column":7}},"101":{"start":{"line":187,"column":6},"end":{"line":191,"column":7}},"102":{"start":{"line":188,"column":8},"end":{"line":188,"column":43}},"103":{"start":{"line":189,"column":8},"end":{"line":189,"column":37}},"104":{"start":{"line":190,"column":8},"end":{"line":190,"column":32}},"105":{"start":{"line":192,"column":6},"end":{"line":192,"column":28}},"106":{"start":{"line":193,"column":6},"end":{"line":193,"column":40}},"107":{"start":{"line":193,"column":29},"end":{"line":193,"column":40}},"108":{"start":{"line":196,"column":4},"end":{"line":200,"column":5}},"109":{"start":{"line":197,"column":6},"end":{"line":197,"column":108}},"110":{"start":{"line":198,"column":6},"end":{"line":198,"column":51}},"111":{"start":{"line":199,"column":6},"end":{"line":199,"column":86}},"112":{"start":{"line":205,"column":0},"end":{"line":205,"column":39}},"113":{"start":{"line":206,"column":0},"end":{"line":206,"column":37}}},"branchMap":{"1":{"line":24,"type":"if","locations":[{"start":{"line":24,"column":2},"end":{"line":24,"column":2}},{"start":{"line":24,"column":2},"end":{"line":24,"column":2}}]},"2":{"line":24,"type":"binary-expr","locations":[{"start":{"line":24,"column":6},"end":{"line":24,"column":19}},{"start":{"line":24,"column":23},"end":{"line":24,"column":46}}]},"3":{"line":30,"type":"binary-expr","locations":[{"start":{"line":30,"column":24},"end":{"line":30,"column":37}},{"start":{"line":30,"column":41},"end":{"line":40,"column":1}}]},"4":{"line":34,"type":"if","locations":[{"start":{"line":34,"column":6},"end":{"line":34,"column":6}},{"start":{"line":34,"column":6},"end":{"line":34,"column":6}}]},"5":{"line":52,"type":"if","locations":[{"start":{"line":52,"column":2},"end":{"line":52,"column":2}},{"start":{"line":52,"column":2},"end":{"line":52,"column":2}}]},"6":{"line":65,"type":"if","locations":[{"start":{"line":65,"column":4},"end":{"line":65,"column":4}},{"start":{"line":65,"column":4},"end":{"line":65,"column":4}}]},"7":{"line":69,"type":"if","locations":[{"start":{"line":69,"column":4},"end":{"line":69,"column":4}},{"start":{"line":69,"column":4},"end":{"line":69,"column":4}}]},"8":{"line":76,"type":"binary-expr","locations":[{"start":{"line":76,"column":20},"end":{"line":76,"column":33}},{"start":{"line":76,"column":37},"end":{"line":76,"column":67}},{"start":{"line":76,"column":71},"end":{"line":76,"column":74}}]},"9":{"line":84,"type":"if","locations":[{"start":{"line":84,"column":2},"end":{"line":84,"column":2}},{"start":{"line":84,"column":2},"end":{"line":84,"column":2}}]},"10":{"line":84,"type":"binary-expr","locations":[{"start":{"line":84,"column":6},"end":{"line":84,"column":18}},{"start":{"line":84,"column":22},"end":{"line":84,"column":36}}]},"11":{"line":85,"type":"binary-expr","locations":[{"start":{"line":85,"column":12},"end":{"line":85,"column":24}},{"start":{"line":85,"column":28},"end":{"line":85,"column":31}}]},"12":{"line":85,"type":"binary-expr","locations":[{"start":{"line":85,"column":45},"end":{"line":85,"column":59}},{"start":{"line":85,"column":63},"end":{"line":85,"column":66}}]},"13":{"line":92,"type":"if","locations":[{"start":{"line":92,"column":2},"end":{"line":92,"column":2}},{"start":{"line":92,"column":2},"end":{"line":92,"column":2}}]},"14":{"line":103,"type":"binary-expr","locations":[{"start":{"line":103,"column":11},"end":{"line":103,"column":33}},{"start":{"line":104,"column":6},"end":{"line":104,"column":72}}]},"15":{"line":104,"type":"binary-expr","locations":[{"start":{"line":104,"column":34},"end":{"line":104,"column":54}},{"start":{"line":104,"column":58},"end":{"line":104,"column":71}}]},"16":{"line":113,"type":"binary-expr","locations":[{"start":{"line":113,"column":18},"end":{"line":113,"column":30}},{"start":{"line":113,"column":34},"end":{"line":113,"column":69}},{"start":{"line":113,"column":73},"end":{"line":113,"column":86}}]},"17":{"line":116,"type":"if","locations":[{"start":{"line":116,"column":2},"end":{"line":116,"column":2}},{"start":{"line":116,"column":2},"end":{"line":116,"column":2}}]},"18":{"line":122,"type":"if","locations":[{"start":{"line":122,"column":2},"end":{"line":122,"column":2}},{"start":{"line":122,"column":2},"end":{"line":122,"column":2}}]},"19":{"line":129,"type":"if","locations":[{"start":{"line":129,"column":2},"end":{"line":129,"column":2}},{"start":{"line":129,"column":2},"end":{"line":129,"column":2}}]},"20":{"line":131,"type":"if","locations":[{"start":{"line":131,"column":4},"end":{"line":131,"column":4}},{"start":{"line":131,"column":4},"end":{"line":131,"column":4}}]},"21":{"line":142,"type":"if","locations":[{"start":{"line":142,"column":2},"end":{"line":142,"column":2}},{"start":{"line":142,"column":2},"end":{"line":142,"column":2}}]},"22":{"line":149,"type":"if","locations":[{"start":{"line":149,"column":2},"end":{"line":149,"column":2}},{"start":{"line":149,"column":2},"end":{"line":149,"column":2}}]},"23":{"line":149,"type":"binary-expr","locations":[{"start":{"line":149,"column":6},"end":{"line":149,"column":12}},{"start":{"line":149,"column":16},"end":{"line":149,"column":37}},{"start":{"line":149,"column":41},"end":{"line":149,"column":54}},{"start":{"line":149,"column":58},"end":{"line":149,"column":79}}]},"24":{"line":161,"type":"binary-expr","locations":[{"start":{"line":161,"column":20},"end":{"line":161,"column":38}},{"start":{"line":161,"column":42},"end":{"line":161,"column":44}}]},"25":{"line":165,"type":"binary-expr","locations":[{"start":{"line":165,"column":21},"end":{"line":165,"column":36}},{"start":{"line":165,"column":40},"end":{"line":165,"column":65}},{"start":{"line":165,"column":69},"end":{"line":165,"column":94}}]},"26":{"line":168,"type":"binary-expr","locations":[{"start":{"line":168,"column":19},"end":{"line":168,"column":30}},{"start":{"line":168,"column":34},"end":{"line":168,"column":75}}]},"27":{"line":171,"type":"if","locations":[{"start":{"line":171,"column":4},"end":{"line":171,"column":4}},{"start":{"line":171,"column":4},"end":{"line":171,"column":4}}]},"28":{"line":174,"type":"if","locations":[{"start":{"line":174,"column":4},"end":{"line":174,"column":4}},{"start":{"line":174,"column":4},"end":{"line":174,"column":4}}]},"29":{"line":176,"type":"if","locations":[{"start":{"line":176,"column":6},"end":{"line":176,"column":6}},{"start":{"line":176,"column":6},"end":{"line":176,"column":6}}]},"30":{"line":180,"type":"if","locations":[{"start":{"line":180,"column":4},"end":{"line":180,"column":4}},{"start":{"line":180,"column":4},"end":{"line":180,"column":4}}]},"31":{"line":182,"type":"if","locations":[{"start":{"line":182,"column":6},"end":{"line":182,"column":6}},{"start":{"line":182,"column":6},"end":{"line":182,"column":6}}]},"32":{"line":187,"type":"if","locations":[{"start":{"line":187,"column":6},"end":{"line":187,"column":6}},{"start":{"line":187,"column":6},"end":{"line":187,"column":6}}]},"33":{"line":193,"type":"if","locations":[{"start":{"line":193,"column":6},"end":{"line":193,"column":6}},{"start":{"line":193,"column":6},"end":{"line":193,"column":6}}]}}},"/Users/lewis/dev/raven-node/lib/transports.js":{"path":"/Users/lewis/dev/raven-node/lib/transports.js","s":{"1":1,"2":1,"3":1,"4":1,"5":1,"6":1,"7":1,"8":1,"9":1,"10":1,"11":1,"12":22,"13":22,"14":0,"15":0,"16":22,"17":21,"18":21,"19":18,"20":18,"21":3,"22":3,"23":3,"24":3,"25":3,"26":3,"27":3,"28":3,"29":3,"30":3,"31":21,"32":21,"33":21,"34":22,"35":22,"36":1,"37":1,"38":1,"39":1,"40":22,"41":1,"42":1,"43":1,"44":1,"45":1,"46":1,"47":1,"48":1,"49":1,"50":1,"51":1},"b":{"1":[1,1],"2":[22,0],"3":[0,0],"4":[18,3],"5":[21,21],"6":[18,3],"7":[3,0],"8":[1,0],"9":[1,1],"10":[1,1]},"f":{"1":0,"2":1,"3":22,"4":21,"5":42,"6":1,"7":1},"fnMap":{"1":{"name":"Transport","line":6,"loc":{"start":{"line":6,"column":0},"end":{"line":6,"column":21}}},"2":{"name":"HTTPTransport","line":11,"loc":{"start":{"line":11,"column":0},"end":{"line":11,"column":32}}},"3":{"name":"(anonymous_3)","line":17,"loc":{"start":{"line":17,"column":31},"end":{"line":17,"column":80}}},"4":{"name":"(anonymous_4)","line":31,"loc":{"start":{"line":31,"column":44},"end":{"line":31,"column":59}}},"5":{"name":"(anonymous_5)","line":49,"loc":{"start":{"line":49,"column":15},"end":{"line":49,"column":27}}},"6":{"name":"(anonymous_6)","line":55,"loc":{"start":{"line":55,"column":18},"end":{"line":55,"column":31}}},"7":{"name":"HTTPSTransport","line":67,"loc":{"start":{"line":67,"column":0},"end":{"line":67,"column":33}}}},"statementMap":{"1":{"start":{"line":3,"column":0},"end":{"line":3,"column":31}},"2":{"start":{"line":4,"column":0},"end":{"line":4,"column":27}},"3":{"start":{"line":6,"column":0},"end":{"line":6,"column":23}},"4":{"start":{"line":7,"column":0},"end":{"line":7,"column":46}},"5":{"start":{"line":9,"column":0},"end":{"line":9,"column":27}},"6":{"start":{"line":11,"column":0},"end":{"line":15,"column":1}},"7":{"start":{"line":12,"column":2},"end":{"line":12,"column":24}},"8":{"start":{"line":13,"column":2},"end":{"line":13,"column":24}},"9":{"start":{"line":14,"column":2},"end":{"line":14,"column":31}},"10":{"start":{"line":16,"column":0},"end":{"line":16,"column":40}},"11":{"start":{"line":17,"column":0},"end":{"line":63,"column":2}},"12":{"start":{"line":18,"column":2},"end":{"line":25,"column":4}},"13":{"start":{"line":26,"column":2},"end":{"line":30,"column":3}},"14":{"start":{"line":27,"column":4},"end":{"line":29,"column":5}},"15":{"start":{"line":28,"column":6},"end":{"line":28,"column":39}},"16":{"start":{"line":31,"column":2},"end":{"line":52,"column":5}},"17":{"start":{"line":32,"column":4},"end":{"line":32,"column":28}},"18":{"start":{"line":33,"column":4},"end":{"line":47,"column":5}},"19":{"start":{"line":34,"column":6},"end":{"line":34,"column":37}},"20":{"start":{"line":35,"column":6},"end":{"line":35,"column":30}},"21":{"start":{"line":37,"column":6},"end":{"line":37,"column":49}},"22":{"start":{"line":38,"column":6},"end":{"line":38,"column":74}},"23":{"start":{"line":39,"column":6},"end":{"line":39,"column":23}},"24":{"start":{"line":40,"column":6},"end":{"line":40,"column":36}},"25":{"start":{"line":41,"column":6},"end":{"line":41,"column":24}},"26":{"start":{"line":42,"column":6},"end":{"line":42,"column":30}},"27":{"start":{"line":43,"column":6},"end":{"line":43,"column":33}},"28":{"start":{"line":44,"column":6},"end":{"line":44,"column":26}},"29":{"start":{"line":45,"column":6},"end":{"line":45,"column":30}},"30":{"start":{"line":46,"column":6},"end":{"line":46,"column":18}},"31":{"start":{"line":49,"column":4},"end":{"line":49,"column":30}},"32":{"start":{"line":50,"column":4},"end":{"line":50,"column":25}},"33":{"start":{"line":51,"column":4},"end":{"line":51,"column":24}},"34":{"start":{"line":54,"column":2},"end":{"line":54,"column":22}},"35":{"start":{"line":55,"column":2},"end":{"line":61,"column":5}},"36":{"start":{"line":56,"column":4},"end":{"line":56,"column":28}},"37":{"start":{"line":57,"column":4},"end":{"line":60,"column":5}},"38":{"start":{"line":58,"column":6},"end":{"line":58,"column":18}},"39":{"start":{"line":59,"column":6},"end":{"line":59,"column":21}},"40":{"start":{"line":62,"column":2},"end":{"line":62,"column":19}},"41":{"start":{"line":65,"column":0},"end":{"line":65,"column":29}},"42":{"start":{"line":67,"column":0},"end":{"line":71,"column":1}},"43":{"start":{"line":68,"column":2},"end":{"line":68,"column":25}},"44":{"start":{"line":69,"column":2},"end":{"line":69,"column":25}},"45":{"start":{"line":70,"column":2},"end":{"line":70,"column":31}},"46":{"start":{"line":72,"column":0},"end":{"line":72,"column":45}},"47":{"start":{"line":74,"column":0},"end":{"line":74,"column":42}},"48":{"start":{"line":75,"column":0},"end":{"line":75,"column":44}},"49":{"start":{"line":76,"column":0},"end":{"line":76,"column":37}},"50":{"start":{"line":77,"column":0},"end":{"line":77,"column":45}},"51":{"start":{"line":78,"column":0},"end":{"line":78,"column":47}}},"branchMap":{"1":{"line":14,"type":"binary-expr","locations":[{"start":{"line":14,"column":17},"end":{"line":14,"column":24}},{"start":{"line":14,"column":28},"end":{"line":14,"column":30}}]},"2":{"line":23,"type":"binary-expr","locations":[{"start":{"line":23,"column":10},"end":{"line":23,"column":25}},{"start":{"line":23,"column":29},"end":{"line":23,"column":45}}]},"3":{"line":27,"type":"if","locations":[{"start":{"line":27,"column":4},"end":{"line":27,"column":4}},{"start":{"line":27,"column":4},"end":{"line":27,"column":4}}]},"4":{"line":33,"type":"if","locations":[{"start":{"line":33,"column":4},"end":{"line":33,"column":4}},{"start":{"line":33,"column":4},"end":{"line":33,"column":4}}]},"5":{"line":33,"type":"binary-expr","locations":[{"start":{"line":33,"column":8},"end":{"line":33,"column":29}},{"start":{"line":33,"column":33},"end":{"line":33,"column":53}}]},"6":{"line":35,"type":"binary-expr","locations":[{"start":{"line":35,"column":6},"end":{"line":35,"column":8}},{"start":{"line":35,"column":12},"end":{"line":35,"column":29}}]},"7":{"line":46,"type":"binary-expr","locations":[{"start":{"line":46,"column":6},"end":{"line":46,"column":8}},{"start":{"line":46,"column":12},"end":{"line":46,"column":17}}]},"8":{"line":57,"type":"if","locations":[{"start":{"line":57,"column":4},"end":{"line":57,"column":4}},{"start":{"line":57,"column":4},"end":{"line":57,"column":4}}]},"9":{"line":58,"type":"binary-expr","locations":[{"start":{"line":58,"column":6},"end":{"line":58,"column":8}},{"start":{"line":58,"column":12},"end":{"line":58,"column":17}}]},"10":{"line":70,"type":"binary-expr","locations":[{"start":{"line":70,"column":17},"end":{"line":70,"column":24}},{"start":{"line":70,"column":28},"end":{"line":70,"column":30}}]}}},"/Users/lewis/dev/raven-node/lib/middleware/connect.js":{"path":"/Users/lewis/dev/raven-node/lib/middleware/connect.js","s":{"1":1,"2":1,"3":0,"4":1,"5":0,"6":0,"7":1,"8":0,"9":0,"10":1},"b":{"1":[0,0],"2":[0,0]},"f":{"1":0,"2":0,"3":0},"fnMap":{"1":{"name":"(anonymous_1)","line":6,"loc":{"start":{"line":6,"column":24},"end":{"line":6,"column":42}}},"2":{"name":"(anonymous_2)","line":12,"loc":{"start":{"line":12,"column":33},"end":{"line":12,"column":51}}},"3":{"name":"(anonymous_3)","line":19,"loc":{"start":{"line":19,"column":35},"end":{"line":19,"column":53}}}},"statementMap":{"1":{"start":{"line":3,"column":0},"end":{"line":3,"column":33}},"2":{"start":{"line":6,"column":0},"end":{"line":8,"column":2}},"3":{"start":{"line":7,"column":2},"end":{"line":7,"column":48}},"4":{"start":{"line":12,"column":0},"end":{"line":15,"column":2}},"5":{"start":{"line":13,"column":2},"end":{"line":13,"column":78}},"6":{"start":{"line":14,"column":2},"end":{"line":14,"column":31}},"7":{"start":{"line":19,"column":0},"end":{"line":22,"column":2}},"8":{"start":{"line":20,"column":2},"end":{"line":20,"column":78}},"9":{"start":{"line":21,"column":2},"end":{"line":21,"column":33}},"10":{"start":{"line":24,"column":0},"end":{"line":24,"column":35}}},"branchMap":{"1":{"line":13,"type":"cond-expr","locations":[{"start":{"line":13,"column":44},"end":{"line":13,"column":50}},{"start":{"line":13,"column":53},"end":{"line":13,"column":77}}]},"2":{"line":20,"type":"cond-expr","locations":[{"start":{"line":20,"column":44},"end":{"line":20,"column":50}},{"start":{"line":20,"column":53},"end":{"line":20,"column":77}}]}}}} \ No newline at end of file diff --git a/node_modules/homey-log/node_modules/raven/coverage/lcov-report/base.css b/node_modules/homey-log/node_modules/raven/coverage/lcov-report/base.css deleted file mode 100644 index 29737bc..0000000 --- a/node_modules/homey-log/node_modules/raven/coverage/lcov-report/base.css +++ /dev/null @@ -1,213 +0,0 @@ -body, html { - margin:0; padding: 0; - height: 100%; -} -body { - font-family: Helvetica Neue, Helvetica, Arial; - font-size: 14px; - color:#333; -} -.small { font-size: 12px; } -*, *:after, *:before { - -webkit-box-sizing:border-box; - -moz-box-sizing:border-box; - box-sizing:border-box; - } -h1 { font-size: 20px; margin: 0;} -h2 { font-size: 14px; } -pre { - font: 12px/1.4 Consolas, "Liberation Mono", Menlo, Courier, monospace; - margin: 0; - padding: 0; - -moz-tab-size: 2; - -o-tab-size: 2; - tab-size: 2; -} -a { color:#0074D9; text-decoration:none; } -a:hover { text-decoration:underline; } -.strong { font-weight: bold; } -.space-top1 { padding: 10px 0 0 0; } -.pad2y { padding: 20px 0; } -.pad1y { padding: 10px 0; } -.pad2x { padding: 0 20px; } -.pad2 { padding: 20px; } -.pad1 { padding: 10px; } -.space-left2 { padding-left:55px; } -.space-right2 { padding-right:20px; } -.center { text-align:center; } -.clearfix { display:block; } -.clearfix:after { - content:''; - display:block; - height:0; - clear:both; - visibility:hidden; - } -.fl { float: left; } -@media only screen and (max-width:640px) { - .col3 { width:100%; max-width:100%; } - .hide-mobile { display:none!important; } -} - -.quiet { - color: #7f7f7f; - color: rgba(0,0,0,0.5); -} -.quiet a { opacity: 0.7; } - -.fraction { - font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; - font-size: 10px; - color: #555; - background: #E8E8E8; - padding: 4px 5px; - border-radius: 3px; - vertical-align: middle; -} - -div.path a:link, div.path a:visited { color: #333; } -table.coverage { - border-collapse: collapse; - margin: 10px 0 0 0; - padding: 0; -} - -table.coverage td { - margin: 0; - padding: 0; - vertical-align: top; -} -table.coverage td.line-count { - text-align: right; - padding: 0 5px 0 20px; -} -table.coverage td.line-coverage { - text-align: right; - padding-right: 10px; - min-width:20px; -} - -table.coverage td span.cline-any { - display: inline-block; - padding: 0 5px; - width: 100%; -} -.missing-if-branch { - display: inline-block; - margin-right: 5px; - border-radius: 3px; - position: relative; - padding: 0 4px; - background: #333; - color: yellow; -} - -.skip-if-branch { - display: none; - margin-right: 10px; - position: relative; - padding: 0 4px; - background: #ccc; - color: white; -} -.missing-if-branch .typ, .skip-if-branch .typ { - color: inherit !important; -} -.coverage-summary { - border-collapse: collapse; - width: 100%; -} -.coverage-summary tr { border-bottom: 1px solid #bbb; } -.keyline-all { border: 1px solid #ddd; } -.coverage-summary td, .coverage-summary th { padding: 10px; } -.coverage-summary tbody { border: 1px solid #bbb; } -.coverage-summary td { border-right: 1px solid #bbb; } -.coverage-summary td:last-child { border-right: none; } -.coverage-summary th { - text-align: left; - font-weight: normal; - white-space: nowrap; -} -.coverage-summary th.file { border-right: none !important; } -.coverage-summary th.pct { } -.coverage-summary th.pic, -.coverage-summary th.abs, -.coverage-summary td.pct, -.coverage-summary td.abs { text-align: right; } -.coverage-summary td.file { white-space: nowrap; } -.coverage-summary td.pic { min-width: 120px !important; } -.coverage-summary tfoot td { } - -.coverage-summary .sorter { - height: 10px; - width: 7px; - display: inline-block; - margin-left: 0.5em; - background: url(sort-arrow-sprite.png) no-repeat scroll 0 0 transparent; -} -.coverage-summary .sorted .sorter { - background-position: 0 -20px; -} -.coverage-summary .sorted-desc .sorter { - background-position: 0 -10px; -} -.status-line { height: 10px; } -/* dark red */ -.red.solid, .status-line.low, .low .cover-fill { background:#C21F39 } -.low .chart { border:1px solid #C21F39 } -/* medium red */ -.cstat-no, .fstat-no, .cbranch-no, .cbranch-no { background:#F6C6CE } -/* light red */ -.low, .cline-no { background:#FCE1E5 } -/* light green */ -.high, .cline-yes { background:rgb(230,245,208) } -/* medium green */ -.cstat-yes { background:rgb(161,215,106) } -/* dark green */ -.status-line.high, .high .cover-fill { background:rgb(77,146,33) } -.high .chart { border:1px solid rgb(77,146,33) } -/* dark yellow (gold) */ -.medium .chart { border:1px solid #f9cd0b; } -.status-line.medium, .medium .cover-fill { background: #f9cd0b; } -/* light yellow */ -.medium { background: #fff4c2; } -/* light gray */ -span.cline-neutral { background: #eaeaea; } - -.cbranch-no { background: yellow !important; color: #111; } - -.cstat-skip { background: #ddd; color: #111; } -.fstat-skip { background: #ddd; color: #111 !important; } -.cbranch-skip { background: #ddd !important; color: #111; } - - -.cover-fill, .cover-empty { - display:inline-block; - height: 12px; -} -.chart { - line-height: 0; -} -.cover-empty { - background: white; -} -.cover-full { - border-right: none !important; -} -pre.prettyprint { - border: none !important; - padding: 0 !important; - margin: 0 !important; -} -.com { color: #999 !important; } -.ignore-none { color: #999; font-weight: normal; } - -.wrapper { - min-height: 100%; - height: auto !important; - height: 100%; - margin: 0 auto -48px; -} -.footer, .push { - height: 48px; -} diff --git a/node_modules/homey-log/node_modules/raven/coverage/lcov-report/index.html b/node_modules/homey-log/node_modules/raven/coverage/lcov-report/index.html deleted file mode 100644 index 0004f70..0000000 --- a/node_modules/homey-log/node_modules/raven/coverage/lcov-report/index.html +++ /dev/null @@ -1,119 +0,0 @@ - - - - Code coverage report for All files - - - - - - - -
-
-

- / -

-
-
- 85% - Statements - 408/480 -
-
- 78.42% - Branches - 229/292 -
-
- 75% - Functions - 54/72 -
-
- 85.74% - Lines - 403/470 -
-
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
FileStatementsBranchesFunctionsLines
raven-node/
100%7/7100%0/0100%0/0100%7/7
raven-node/lib/
85.53%396/46379.51%229/28878.26%54/6986.31%391/453
raven-node/lib/middleware/
50%5/100%0/40%0/350%5/10
-
-
- - - - - - - diff --git a/node_modules/homey-log/node_modules/raven/coverage/lcov-report/prettify.css b/node_modules/homey-log/node_modules/raven/coverage/lcov-report/prettify.css deleted file mode 100644 index b317a7c..0000000 --- a/node_modules/homey-log/node_modules/raven/coverage/lcov-report/prettify.css +++ /dev/null @@ -1 +0,0 @@ -.pln{color:#000}@media screen{.str{color:#080}.kwd{color:#008}.com{color:#800}.typ{color:#606}.lit{color:#066}.pun,.opn,.clo{color:#660}.tag{color:#008}.atn{color:#606}.atv{color:#080}.dec,.var{color:#606}.fun{color:red}}@media print,projection{.str{color:#060}.kwd{color:#006;font-weight:bold}.com{color:#600;font-style:italic}.typ{color:#404;font-weight:bold}.lit{color:#044}.pun,.opn,.clo{color:#440}.tag{color:#006;font-weight:bold}.atn{color:#404}.atv{color:#060}}pre.prettyprint{padding:2px;border:1px solid #888}ol.linenums{margin-top:0;margin-bottom:0}li.L0,li.L1,li.L2,li.L3,li.L5,li.L6,li.L7,li.L8{list-style-type:none}li.L1,li.L3,li.L5,li.L7,li.L9{background:#eee} diff --git a/node_modules/homey-log/node_modules/raven/coverage/lcov-report/prettify.js b/node_modules/homey-log/node_modules/raven/coverage/lcov-report/prettify.js deleted file mode 100644 index ef51e03..0000000 --- a/node_modules/homey-log/node_modules/raven/coverage/lcov-report/prettify.js +++ /dev/null @@ -1 +0,0 @@ -window.PR_SHOULD_USE_CONTINUATION=true;(function(){var h=["break,continue,do,else,for,if,return,while"];var u=[h,"auto,case,char,const,default,double,enum,extern,float,goto,int,long,register,short,signed,sizeof,static,struct,switch,typedef,union,unsigned,void,volatile"];var p=[u,"catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof"];var l=[p,"alignof,align_union,asm,axiom,bool,concept,concept_map,const_cast,constexpr,decltype,dynamic_cast,explicit,export,friend,inline,late_check,mutable,namespace,nullptr,reinterpret_cast,static_assert,static_cast,template,typeid,typename,using,virtual,where"];var x=[p,"abstract,boolean,byte,extends,final,finally,implements,import,instanceof,null,native,package,strictfp,super,synchronized,throws,transient"];var R=[x,"as,base,by,checked,decimal,delegate,descending,dynamic,event,fixed,foreach,from,group,implicit,in,interface,internal,into,is,lock,object,out,override,orderby,params,partial,readonly,ref,sbyte,sealed,stackalloc,string,select,uint,ulong,unchecked,unsafe,ushort,var"];var r="all,and,by,catch,class,else,extends,false,finally,for,if,in,is,isnt,loop,new,no,not,null,of,off,on,or,return,super,then,true,try,unless,until,when,while,yes";var w=[p,"debugger,eval,export,function,get,null,set,undefined,var,with,Infinity,NaN"];var s="caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END";var I=[h,"and,as,assert,class,def,del,elif,except,exec,finally,from,global,import,in,is,lambda,nonlocal,not,or,pass,print,raise,try,with,yield,False,True,None"];var f=[h,"alias,and,begin,case,class,def,defined,elsif,end,ensure,false,in,module,next,nil,not,or,redo,rescue,retry,self,super,then,true,undef,unless,until,when,yield,BEGIN,END"];var H=[h,"case,done,elif,esac,eval,fi,function,in,local,set,then,until"];var A=[l,R,w,s+I,f,H];var e=/^(DIR|FILE|vector|(de|priority_)?queue|list|stack|(const_)?iterator|(multi)?(set|map)|bitset|u?(int|float)\d*)/;var C="str";var z="kwd";var j="com";var O="typ";var G="lit";var L="pun";var F="pln";var m="tag";var E="dec";var J="src";var P="atn";var n="atv";var N="nocode";var M="(?:^^\\.?|[+-]|\\!|\\!=|\\!==|\\#|\\%|\\%=|&|&&|&&=|&=|\\(|\\*|\\*=|\\+=|\\,|\\-=|\\->|\\/|\\/=|:|::|\\;|<|<<|<<=|<=|=|==|===|>|>=|>>|>>=|>>>|>>>=|\\?|\\@|\\[|\\^|\\^=|\\^\\^|\\^\\^=|\\{|\\||\\|=|\\|\\||\\|\\|=|\\~|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\\s*";function k(Z){var ad=0;var S=false;var ac=false;for(var V=0,U=Z.length;V122)){if(!(al<65||ag>90)){af.push([Math.max(65,ag)|32,Math.min(al,90)|32])}if(!(al<97||ag>122)){af.push([Math.max(97,ag)&~32,Math.min(al,122)&~32])}}}}af.sort(function(av,au){return(av[0]-au[0])||(au[1]-av[1])});var ai=[];var ap=[NaN,NaN];for(var ar=0;arat[0]){if(at[1]+1>at[0]){an.push("-")}an.push(T(at[1]))}}an.push("]");return an.join("")}function W(al){var aj=al.source.match(new RegExp("(?:\\[(?:[^\\x5C\\x5D]|\\\\[\\s\\S])*\\]|\\\\u[A-Fa-f0-9]{4}|\\\\x[A-Fa-f0-9]{2}|\\\\[0-9]+|\\\\[^ux0-9]|\\(\\?[:!=]|[\\(\\)\\^]|[^\\x5B\\x5C\\(\\)\\^]+)","g"));var ah=aj.length;var an=[];for(var ak=0,am=0;ak=2&&ai==="["){aj[ak]=X(ag)}else{if(ai!=="\\"){aj[ak]=ag.replace(/[a-zA-Z]/g,function(ao){var ap=ao.charCodeAt(0);return"["+String.fromCharCode(ap&~32,ap|32)+"]"})}}}}return aj.join("")}var aa=[];for(var V=0,U=Z.length;V=0;){S[ac.charAt(ae)]=Y}}var af=Y[1];var aa=""+af;if(!ag.hasOwnProperty(aa)){ah.push(af);ag[aa]=null}}ah.push(/[\0-\uffff]/);V=k(ah)})();var X=T.length;var W=function(ah){var Z=ah.sourceCode,Y=ah.basePos;var ad=[Y,F];var af=0;var an=Z.match(V)||[];var aj={};for(var ae=0,aq=an.length;ae=5&&"lang-"===ap.substring(0,5);if(am&&!(ai&&typeof ai[1]==="string")){am=false;ap=J}if(!am){aj[ag]=ap}}var ab=af;af+=ag.length;if(!am){ad.push(Y+ab,ap)}else{var al=ai[1];var ak=ag.indexOf(al);var ac=ak+al.length;if(ai[2]){ac=ag.length-ai[2].length;ak=ac-al.length}var ar=ap.substring(5);B(Y+ab,ag.substring(0,ak),W,ad);B(Y+ab+ak,al,q(ar,al),ad);B(Y+ab+ac,ag.substring(ac),W,ad)}}ah.decorations=ad};return W}function i(T){var W=[],S=[];if(T.tripleQuotedStrings){W.push([C,/^(?:\'\'\'(?:[^\'\\]|\\[\s\S]|\'{1,2}(?=[^\']))*(?:\'\'\'|$)|\"\"\"(?:[^\"\\]|\\[\s\S]|\"{1,2}(?=[^\"]))*(?:\"\"\"|$)|\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$))/,null,"'\""])}else{if(T.multiLineStrings){W.push([C,/^(?:\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$)|\`(?:[^\\\`]|\\[\s\S])*(?:\`|$))/,null,"'\"`"])}else{W.push([C,/^(?:\'(?:[^\\\'\r\n]|\\.)*(?:\'|$)|\"(?:[^\\\"\r\n]|\\.)*(?:\"|$))/,null,"\"'"])}}if(T.verbatimStrings){S.push([C,/^@\"(?:[^\"]|\"\")*(?:\"|$)/,null])}var Y=T.hashComments;if(Y){if(T.cStyleComments){if(Y>1){W.push([j,/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,null,"#"])}else{W.push([j,/^#(?:(?:define|elif|else|endif|error|ifdef|include|ifndef|line|pragma|undef|warning)\b|[^\r\n]*)/,null,"#"])}S.push([C,/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h|[a-z]\w*)>/,null])}else{W.push([j,/^#[^\r\n]*/,null,"#"])}}if(T.cStyleComments){S.push([j,/^\/\/[^\r\n]*/,null]);S.push([j,/^\/\*[\s\S]*?(?:\*\/|$)/,null])}if(T.regexLiterals){var X=("/(?=[^/*])(?:[^/\\x5B\\x5C]|\\x5C[\\s\\S]|\\x5B(?:[^\\x5C\\x5D]|\\x5C[\\s\\S])*(?:\\x5D|$))+/");S.push(["lang-regex",new RegExp("^"+M+"("+X+")")])}var V=T.types;if(V){S.push([O,V])}var U=(""+T.keywords).replace(/^ | $/g,"");if(U.length){S.push([z,new RegExp("^(?:"+U.replace(/[\s,]+/g,"|")+")\\b"),null])}W.push([F,/^\s+/,null," \r\n\t\xA0"]);S.push([G,/^@[a-z_$][a-z_$@0-9]*/i,null],[O,/^(?:[@_]?[A-Z]+[a-z][A-Za-z_$@0-9]*|\w+_t\b)/,null],[F,/^[a-z_$][a-z_$@0-9]*/i,null],[G,new RegExp("^(?:0x[a-f0-9]+|(?:\\d(?:_\\d+)*\\d*(?:\\.\\d*)?|\\.\\d\\+)(?:e[+\\-]?\\d+)?)[a-z]*","i"),null,"0123456789"],[F,/^\\[\s\S]?/,null],[L,/^.[^\s\w\.$@\'\"\`\/\#\\]*/,null]);return g(W,S)}var K=i({keywords:A,hashComments:true,cStyleComments:true,multiLineStrings:true,regexLiterals:true});function Q(V,ag){var U=/(?:^|\s)nocode(?:\s|$)/;var ab=/\r\n?|\n/;var ac=V.ownerDocument;var S;if(V.currentStyle){S=V.currentStyle.whiteSpace}else{if(window.getComputedStyle){S=ac.defaultView.getComputedStyle(V,null).getPropertyValue("white-space")}}var Z=S&&"pre"===S.substring(0,3);var af=ac.createElement("LI");while(V.firstChild){af.appendChild(V.firstChild)}var W=[af];function ae(al){switch(al.nodeType){case 1:if(U.test(al.className)){break}if("BR"===al.nodeName){ad(al);if(al.parentNode){al.parentNode.removeChild(al)}}else{for(var an=al.firstChild;an;an=an.nextSibling){ae(an)}}break;case 3:case 4:if(Z){var am=al.nodeValue;var aj=am.match(ab);if(aj){var ai=am.substring(0,aj.index);al.nodeValue=ai;var ah=am.substring(aj.index+aj[0].length);if(ah){var ak=al.parentNode;ak.insertBefore(ac.createTextNode(ah),al.nextSibling)}ad(al);if(!ai){al.parentNode.removeChild(al)}}}break}}function ad(ak){while(!ak.nextSibling){ak=ak.parentNode;if(!ak){return}}function ai(al,ar){var aq=ar?al.cloneNode(false):al;var ao=al.parentNode;if(ao){var ap=ai(ao,1);var an=al.nextSibling;ap.appendChild(aq);for(var am=an;am;am=an){an=am.nextSibling;ap.appendChild(am)}}return aq}var ah=ai(ak.nextSibling,0);for(var aj;(aj=ah.parentNode)&&aj.nodeType===1;){ah=aj}W.push(ah)}for(var Y=0;Y=S){ah+=2}if(V>=ap){Z+=2}}}var t={};function c(U,V){for(var S=V.length;--S>=0;){var T=V[S];if(!t.hasOwnProperty(T)){t[T]=U}else{if(window.console){console.warn("cannot override language handler %s",T)}}}}function q(T,S){if(!(T&&t.hasOwnProperty(T))){T=/^\s*]*(?:>|$)/],[j,/^<\!--[\s\S]*?(?:-\->|$)/],["lang-",/^<\?([\s\S]+?)(?:\?>|$)/],["lang-",/^<%([\s\S]+?)(?:%>|$)/],[L,/^(?:<[%?]|[%?]>)/],["lang-",/^]*>([\s\S]+?)<\/xmp\b[^>]*>/i],["lang-js",/^]*>([\s\S]*?)(<\/script\b[^>]*>)/i],["lang-css",/^]*>([\s\S]*?)(<\/style\b[^>]*>)/i],["lang-in.tag",/^(<\/?[a-z][^<>]*>)/i]]),["default-markup","htm","html","mxml","xhtml","xml","xsl"]);c(g([[F,/^[\s]+/,null," \t\r\n"],[n,/^(?:\"[^\"]*\"?|\'[^\']*\'?)/,null,"\"'"]],[[m,/^^<\/?[a-z](?:[\w.:-]*\w)?|\/?>$/i],[P,/^(?!style[\s=]|on)[a-z](?:[\w:-]*\w)?/i],["lang-uq.val",/^=\s*([^>\'\"\s]*(?:[^>\'\"\s\/]|\/(?=\s)))/],[L,/^[=<>\/]+/],["lang-js",/^on\w+\s*=\s*\"([^\"]+)\"/i],["lang-js",/^on\w+\s*=\s*\'([^\']+)\'/i],["lang-js",/^on\w+\s*=\s*([^\"\'>\s]+)/i],["lang-css",/^style\s*=\s*\"([^\"]+)\"/i],["lang-css",/^style\s*=\s*\'([^\']+)\'/i],["lang-css",/^style\s*=\s*([^\"\'>\s]+)/i]]),["in.tag"]);c(g([],[[n,/^[\s\S]+/]]),["uq.val"]);c(i({keywords:l,hashComments:true,cStyleComments:true,types:e}),["c","cc","cpp","cxx","cyc","m"]);c(i({keywords:"null,true,false"}),["json"]);c(i({keywords:R,hashComments:true,cStyleComments:true,verbatimStrings:true,types:e}),["cs"]);c(i({keywords:x,cStyleComments:true}),["java"]);c(i({keywords:H,hashComments:true,multiLineStrings:true}),["bsh","csh","sh"]);c(i({keywords:I,hashComments:true,multiLineStrings:true,tripleQuotedStrings:true}),["cv","py"]);c(i({keywords:s,hashComments:true,multiLineStrings:true,regexLiterals:true}),["perl","pl","pm"]);c(i({keywords:f,hashComments:true,multiLineStrings:true,regexLiterals:true}),["rb"]);c(i({keywords:w,cStyleComments:true,regexLiterals:true}),["js"]);c(i({keywords:r,hashComments:3,cStyleComments:true,multilineStrings:true,tripleQuotedStrings:true,regexLiterals:true}),["coffee"]);c(g([],[[C,/^[\s\S]+/]]),["regex"]);function d(V){var U=V.langExtension;try{var S=a(V.sourceNode);var T=S.sourceCode;V.sourceCode=T;V.spans=S.spans;V.basePos=0;q(U,T)(V);D(V)}catch(W){if("console" in window){console.log(W&&W.stack?W.stack:W)}}}function y(W,V,U){var S=document.createElement("PRE");S.innerHTML=W;if(U){Q(S,U)}var T={langExtension:V,numberLines:U,sourceNode:S};d(T);return S.innerHTML}function b(ad){function Y(af){return document.getElementsByTagName(af)}var ac=[Y("pre"),Y("code"),Y("xmp")];var T=[];for(var aa=0;aa=0){var ah=ai.match(ab);var am;if(!ah&&(am=o(aj))&&"CODE"===am.tagName){ah=am.className.match(ab)}if(ah){ah=ah[1]}var al=false;for(var ak=aj.parentNode;ak;ak=ak.parentNode){if((ak.tagName==="pre"||ak.tagName==="code"||ak.tagName==="xmp")&&ak.className&&ak.className.indexOf("prettyprint")>=0){al=true;break}}if(!al){var af=aj.className.match(/\blinenums\b(?::(\d+))?/);af=af?af[1]&&af[1].length?+af[1]:true:false;if(af){Q(aj,af)}S={langExtension:ah,sourceNode:aj,numberLines:af};d(S)}}}if(X]*(?:>|$)/],[PR.PR_COMMENT,/^<\!--[\s\S]*?(?:-\->|$)/],[PR.PR_PUNCTUATION,/^(?:<[%?]|[%?]>)/],["lang-",/^<\?([\s\S]+?)(?:\?>|$)/],["lang-",/^<%([\s\S]+?)(?:%>|$)/],["lang-",/^]*>([\s\S]+?)<\/xmp\b[^>]*>/i],["lang-handlebars",/^]*type\s*=\s*['"]?text\/x-handlebars-template['"]?\b[^>]*>([\s\S]*?)(<\/script\b[^>]*>)/i],["lang-js",/^]*>([\s\S]*?)(<\/script\b[^>]*>)/i],["lang-css",/^]*>([\s\S]*?)(<\/style\b[^>]*>)/i],["lang-in.tag",/^(<\/?[a-z][^<>]*>)/i],[PR.PR_DECLARATION,/^{{[#^>/]?\s*[\w.][^}]*}}/],[PR.PR_DECLARATION,/^{{&?\s*[\w.][^}]*}}/],[PR.PR_DECLARATION,/^{{{>?\s*[\w.][^}]*}}}/],[PR.PR_COMMENT,/^{{![^}]*}}/]]),["handlebars","hbs"]);PR.registerLangHandler(PR.createSimpleLexer([[PR.PR_PLAIN,/^[ \t\r\n\f]+/,null," \t\r\n\f"]],[[PR.PR_STRING,/^\"(?:[^\n\r\f\\\"]|\\(?:\r\n?|\n|\f)|\\[\s\S])*\"/,null],[PR.PR_STRING,/^\'(?:[^\n\r\f\\\']|\\(?:\r\n?|\n|\f)|\\[\s\S])*\'/,null],["lang-css-str",/^url\(([^\)\"\']*)\)/i],[PR.PR_KEYWORD,/^(?:url|rgb|\!important|@import|@page|@media|@charset|inherit)(?=[^\-\w]|$)/i,null],["lang-css-kw",/^(-?(?:[_a-z]|(?:\\[0-9a-f]+ ?))(?:[_a-z0-9\-]|\\(?:\\[0-9a-f]+ ?))*)\s*:/i],[PR.PR_COMMENT,/^\/\*[^*]*\*+(?:[^\/*][^*]*\*+)*\//],[PR.PR_COMMENT,/^(?:)/],[PR.PR_LITERAL,/^(?:\d+|\d*\.\d+)(?:%|[a-z]+)?/i],[PR.PR_LITERAL,/^#(?:[0-9a-f]{3}){1,2}/i],[PR.PR_PLAIN,/^-?(?:[_a-z]|(?:\\[\da-f]+ ?))(?:[_a-z\d\-]|\\(?:\\[\da-f]+ ?))*/i],[PR.PR_PUNCTUATION,/^[^\s\w\'\"]+/]]),["css"]);PR.registerLangHandler(PR.createSimpleLexer([],[[PR.PR_KEYWORD,/^-?(?:[_a-z]|(?:\\[\da-f]+ ?))(?:[_a-z\d\-]|\\(?:\\[\da-f]+ ?))*/i]]),["css-kw"]);PR.registerLangHandler(PR.createSimpleLexer([],[[PR.PR_STRING,/^[^\)\"\']+/]]),["css-str"]); diff --git a/node_modules/homey-log/node_modules/raven/coverage/lcov-report/raven-node/index.html b/node_modules/homey-log/node_modules/raven/coverage/lcov-report/raven-node/index.html deleted file mode 100644 index fd416a4..0000000 --- a/node_modules/homey-log/node_modules/raven/coverage/lcov-report/raven-node/index.html +++ /dev/null @@ -1,93 +0,0 @@ - - - - Code coverage report for raven-node/ - - - - - - - -
-
-

- all files raven-node/ -

-
-
- 100% - Statements - 7/7 -
-
- 100% - Branches - 0/0 -
-
- 100% - Functions - 0/0 -
-
- 100% - Lines - 7/7 -
-
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
FileStatementsBranchesFunctionsLines
index.js
100%7/7100%0/0100%0/0100%7/7
-
-
- - - - - - - diff --git a/node_modules/homey-log/node_modules/raven/coverage/lcov-report/raven-node/index.js.html b/node_modules/homey-log/node_modules/raven/coverage/lcov-report/raven-node/index.js.html deleted file mode 100644 index db71c6a..0000000 --- a/node_modules/homey-log/node_modules/raven/coverage/lcov-report/raven-node/index.js.html +++ /dev/null @@ -1,107 +0,0 @@ - - - - Code coverage report for raven-node/index.js - - - - - - - -
-
-

- all files / raven-node/ index.js -

-
-
- 100% - Statements - 7/7 -
-
- 100% - Branches - 0/0 -
-
- 100% - Functions - 0/0 -
-
- 100% - Lines - 7/7 -
-
-
-
-

-
-
1 -2 -3 -4 -5 -6 -7 -8 -9 -10 -11 -12 -13 -14 -15  -  - - - -  -  -  - - - -  -  - - 
'use strict';
- 
-module.exports = require('./lib/client');
-module.exports.utils = require('./lib/utils');
-module.exports.middleware = {
-  connect: require('./lib/middleware/connect')
-};
-// friendly alias for "raven.middleware.express"
-module.exports.middleware.express = module.exports.middleware.connect;
-module.exports.transports = require('./lib/transports');
-module.exports.parsers = require('./lib/parsers');
- 
-// To infinity and beyond
-Error.stackTraceLimit = Infinity;
- 
-
-
- - - - - - - diff --git a/node_modules/homey-log/node_modules/raven/coverage/lcov-report/raven-node/lib/client.js.html b/node_modules/homey-log/node_modules/raven/coverage/lcov-report/raven-node/lib/client.js.html deleted file mode 100644 index e6f9237..0000000 --- a/node_modules/homey-log/node_modules/raven/coverage/lcov-report/raven-node/lib/client.js.html +++ /dev/null @@ -1,1460 +0,0 @@ - - - - Code coverage report for raven-node/lib/client.js - - - - - - - -
-
-

- all files / raven-node/lib/ client.js -

-
-
- 78.48% - Statements - 186/237 -
-
- 73.44% - Branches - 94/128 -
-
- 70.45% - Functions - 31/44 -
-
- 79.4% - Lines - 185/233 -
-
-
-
-

-
-
1 -2 -3 -4 -5 -6 -7 -8 -9 -10 -11 -12 -13 -14 -15 -16 -17 -18 -19 -20 -21 -22 -23 -24 -25 -26 -27 -28 -29 -30 -31 -32 -33 -34 -35 -36 -37 -38 -39 -40 -41 -42 -43 -44 -45 -46 -47 -48 -49 -50 -51 -52 -53 -54 -55 -56 -57 -58 -59 -60 -61 -62 -63 -64 -65 -66 -67 -68 -69 -70 -71 -72 -73 -74 -75 -76 -77 -78 -79 -80 -81 -82 -83 -84 -85 -86 -87 -88 -89 -90 -91 -92 -93 -94 -95 -96 -97 -98 -99 -100 -101 -102 -103 -104 -105 -106 -107 -108 -109 -110 -111 -112 -113 -114 -115 -116 -117 -118 -119 -120 -121 -122 -123 -124 -125 -126 -127 -128 -129 -130 -131 -132 -133 -134 -135 -136 -137 -138 -139 -140 -141 -142 -143 -144 -145 -146 -147 -148 -149 -150 -151 -152 -153 -154 -155 -156 -157 -158 -159 -160 -161 -162 -163 -164 -165 -166 -167 -168 -169 -170 -171 -172 -173 -174 -175 -176 -177 -178 -179 -180 -181 -182 -183 -184 -185 -186 -187 -188 -189 -190 -191 -192 -193 -194 -195 -196 -197 -198 -199 -200 -201 -202 -203 -204 -205 -206 -207 -208 -209 -210 -211 -212 -213 -214 -215 -216 -217 -218 -219 -220 -221 -222 -223 -224 -225 -226 -227 -228 -229 -230 -231 -232 -233 -234 -235 -236 -237 -238 -239 -240 -241 -242 -243 -244 -245 -246 -247 -248 -249 -250 -251 -252 -253 -254 -255 -256 -257 -258 -259 -260 -261 -262 -263 -264 -265 -266 -267 -268 -269 -270 -271 -272 -273 -274 -275 -276 -277 -278 -279 -280 -281 -282 -283 -284 -285 -286 -287 -288 -289 -290 -291 -292 -293 -294 -295 -296 -297 -298 -299 -300 -301 -302 -303 -304 -305 -306 -307 -308 -309 -310 -311 -312 -313 -314 -315 -316 -317 -318 -319 -320 -321 -322 -323 -324 -325 -326 -327 -328 -329 -330 -331 -332 -333 -334 -335 -336 -337 -338 -339 -340 -341 -342 -343 -344 -345 -346 -347 -348 -349 -350 -351 -352 -353 -354 -355 -356 -357 -358 -359 -360 -361 -362 -363 -364 -365 -366 -367 -368 -369 -370 -371 -372 -373 -374 -375 -376 -377 -378 -379 -380 -381 -382 -383 -384 -385 -386 -387 -388 -389 -390 -391 -392 -393 -394 -395 -396 -397 -398 -399 -400 -401 -402 -403 -404 -405 -406 -407 -408 -409 -410 -411 -412 -413 -414 -415 -416 -417 -418 -419 -420 -421 -422 -423 -424 -425 -426 -427 -428 -429 -430 -431 -432 -433 -434 -435 -436 -437 -438 -439 -440 -441 -442 -443 -444 -445 -446 -447 -448 -449 -450 -451 -452 -453 -454 -455 -456 -457 -458 -459 -460 -461 -462 -463 -464 -465 -466  -  - - - - - - - - - -  - -  - -  - -  - -  -66× -  - - -  -66× -  - - -  -66× -  -66× -66× -66× -66× -66× -66× -66× -  -66× -66× -66× -  -66× - -  -  -66× -  -64× -  -  -  -66× -  -66× -66× - -  -66× - -  -  -66× - -  -  -66× -  -  -  - -  -  -  - - - -  - -  -  -  -29× -  -  -  -  -29× -12× -12× -12× -  -  -29× -29× -29× -29× -  -29× -29× -  -29× -  -  -  -29× -29× -29× -29× -29× -29× -  -  -29× - -  -  -29× - -  -  -29× -29× -29× -  -29× -27× -  -  -  - - -  -  -  -  -  -24× -24× -24× -  -24× -23× -  -  -  -  -  -  -  -23× -  -  -  -  - -  -  -  - -  - - -  - -  -  -  -12× -  -  -  - -  -  -12× - - -  -11× -  -  -12× -12× -12× -12× -  -  -12× -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  - - - -  -  -  -  -  - -  -  -  - -  -  -  -  - -  - -  - - - -  -  -  -  - - -  - -  -  -  -  - - - -  - -  - -  -  -  - - - -  - - - - - -  - -  -  -  -  - -  -  -  -  - - - -  - -  -  -  - - -  - -  - -  -  -  -  -  -  -  -  -  -  -  -  - - - - -  -  -  -  -  - -  -  -  -  -  -  -  -  -  -  - -  -  -  -  -  -  -  -  -  -  - -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  - -  - - -  -  - - -  -  - - - -  -  -  -  -  -  -  -  -  -  -  -  -  -  - -  -  - -66× -66× -66× -  - -  -  -  - - - - - -  - -  - - - - - - - -  -  - -  -  -  -  - - - - -  -  - - -  - -  -  - - -  -  -  - - - - -  - -  -  -  - -  -  -  -  -  -  -  -  -  -  -  -  -  - 
'use strict';
- 
-var stringify = require('json-stringify-safe');
-var parsers = require('./parsers');
-var zlib = require('zlib');
-var utils = require('./utils');
-var uuid = require('node-uuid');
-var transports = require('./transports');
-var nodeUtil = require('util'); // nodeUtil to avoid confusion with "utils"
-var events = require('events');
-var domain = require('domain');
- 
-var extend = utils.extend;
- 
-function Raven() {}
- 
-nodeUtil.inherits(Raven, events.EventEmitter);
- 
-extend(Raven.prototype, {
-  config: function config(dsn, options) {
-    if (arguments.length === 0) {
-      // no arguments, use default from environment
-      dsn = process.env.SENTRY_DSN;
-      options = {};
-    }
-    if (typeof dsn === 'object') {
-      // They must only be passing through options
-      options = dsn;
-      dsn = process.env.SENTRY_DSN;
-    }
-    options = options || {};
- 
-    this.raw_dsn = dsn;
-    this.dsn = utils.parseDSN(dsn);
-    this.name = options.name || process.env.SENTRY_NAME || require('os').hostname();
-    this.root = options.root || process.cwd();
-    this.transport = options.transport || transports[this.dsn.protocol];
-    this.release = options.release || process.env.SENTRY_RELEASE || '';
-    this.environment = options.environment || process.env.SENTRY_ENVIRONMENT || '';
- 
-    this.loggerName = options.logger || '';
-    this.dataCallback = options.dataCallback;
-    this.shouldSendCallback = options.shouldSendCallback;
- 
-    if (!this.dsn) {
-      utils.consoleAlert('no DSN provided, error reporting disabled');
-    }
- 
-    if (this.dsn.protocol === 'https') {
-      // In case we want to provide our own SSL certificates / keys
-      this.ca = options.ca || null;
-    }
- 
-    // enabled if a dsn is set
-    this._enabled = !!this.dsn;
- 
-    var globalContext = this._globalContext = {};
-    if (options.tags) {
-      globalContext.tags = options.tags;
-    }
-    if (options.extra) {
-      globalContext.extra = options.extra;
-    }
- 
-    this.on('error', function (err) {
-      utils.consoleAlert('failed to send exception to sentry: ' + err.message);
-    });
- 
-    return this;
-  },
- 
-  install: function install(opts, cb) {
-    Iif (typeof opts === 'function') {
-      cb = opts;
-    }
- 
-    registerExceptionHandler(this, cb);
-    if (opts && opts.unhandledRejection) {
-      registerRejectionHandler(this, cb);
-    }
-    return this;
-  },
- 
-  generateEventId: function generateEventId() {
-    return uuid().replace(/-/g, '');
-  },
- 
-  process: function process(eventId, kwargs, cb) {
-    // prod codepaths shouldn't hit this branch, for testing
-    if (typeof eventId === 'object') {
-      cb = kwargs;
-      kwargs = eventId;
-      eventId = this.generateEventId();
-    }
- 
-    var domainContext = domain.active && domain.active.sentryContext || {};
-    kwargs.user = extend({}, this._globalContext.user, domainContext.user, kwargs.user);
-    kwargs.tags = extend({}, this._globalContext.tags, domainContext.tags, kwargs.tags);
-    kwargs.extra = extend({}, this._globalContext.extra, domainContext.extra, kwargs.extra);
- 
-    kwargs.modules = utils.getModules();
-    kwargs.server_name = kwargs.server_name || this.name;
- 
-    Iif (typeof process.version !== 'undefined') {
-      kwargs.extra.node = process.version;
-    }
- 
-    kwargs.environment = kwargs.environment || this.environment;
-    kwargs.logger = kwargs.logger || this.loggerName;
-    kwargs.event_id = eventId;
-    kwargs.timestamp = new Date().toISOString().split('.')[0];
-    kwargs.project = this.dsn.project_id;
-    kwargs.platform = 'node';
- 
-    // Only include release information if it is set
-    if (this.release) {
-      kwargs.release = this.release;
-    }
- 
-    if (this.dataCallback) {
-      kwargs = this.dataCallback(kwargs);
-    }
- 
-    var shouldSend = true;
-    Iif (!this._enabled) shouldSend = false;
-    if (this.shouldSendCallback && !this.shouldSendCallback()) shouldSend = false;
- 
-    if (shouldSend) {
-      this.send(kwargs, cb);
-    } else {
-      // wish there was a good way to communicate to cb why we didn't send; worth considering cb api change?
-      // avoiding setImmediate here because node 0.8
-      setTimeout(function () {
-        cb(null, eventId);
-      }, 0);
-    }
-  },
- 
-  send: function send(kwargs, cb) {
-    var self = this;
-    var skwargs = stringify(kwargs);
-    var eventId = kwargs.event_id;
- 
-    zlib.deflate(skwargs, function (err, buff) {
-      var message = buff.toString('base64'),
-          timestamp = new Date().getTime(),
-          headers = {
-            'X-Sentry-Auth': utils.getAuthHeader(timestamp, self.dsn.public_key, self.dsn.private_key),
-            'Content-Type': 'application/octet-stream',
-            'Content-Length': message.length
-          };
- 
-      self.transport.send(self, message, headers, eventId, cb);
-    });
-  },
- 
-  captureMessage: function captureMessage(message, kwargs, cb) {
-    Iif (!cb && typeof kwargs === 'function') {
-      cb = kwargs;
-      kwargs = {};
-    } else {
-      kwargs = kwargs || {};
-    }
-    var eventId = this.generateEventId();
-    this.process(eventId, parsers.parseText(message, kwargs), cb);
- 
-    return eventId;
-  },
- 
-  captureException: function captureException(err, kwargs, cb) {
-    if (!(err instanceof Error)) {
-      // This handles when someone does:
-      //   throw "something awesome";
-      // We synthesize an Error here so we can extract a (rough) stack trace.
-      err = new Error(err);
-    }
- 
-    if (!cb && typeof kwargs === 'function') {
-      cb = kwargs;
-      kwargs = {};
-    } else {
-      kwargs = kwargs || {};
-    }
- 
-    var self = this;
-    var eventId = this.generateEventId();
-    parsers.parseError(err, kwargs, function (kw) {
-      self.process(eventId, kw, cb);
-    });
- 
-    return eventId;
-  },
- 
-  captureQuery: function captureQuery(query, engine, kwargs, cb) {
-    if (!cb && typeof kwargs === 'function') {
-      cb = kwargs;
-      kwargs = {};
-    } else {
-      kwargs = kwargs || {};
-    }
- 
-    var eventId = this.generateEventId();
-    this.process(eventId, parsers.parseQuery(query, engine, kwargs), cb);
- 
-    return eventId;
-  },
- 
-  /* The onErr param here is sort of ugly and won't typically be used
-   * but it lets us write the requestHandler middleware in terms of this function.
-   * We could consider getting rid of it and just duplicating the domain
-   * instantiation etc logic in the requestHandler middleware
-   */
-  context: function (ctx, func, onErr) {
-    Eif (!func && typeof ctx === 'function') {
-      func = ctx;
-      ctx = {};
-    }
- 
-    // todo/note: raven-js takes an args param to do apply(this, args)
-    // i don't think it's correct/necessary to bind this to the wrap call
-    // and i don't know if we need to support the args param; it's undocumented
-    return this.wrap(ctx, func, onErr).apply(null);
-  },
- 
-  wrap: function (options, func, onErr) {
-    Iif (!func && typeof options === 'function') {
-      func = options;
-      options = {};
-    }
- 
-    var wrapDomain = domain.create();
-    // todo: better property name than sentryContext, maybe __raven__ or sth?
-    wrapDomain.sentryContext = options;
- 
-    var self = this;
-    Eif (typeof onErr !== 'function') {
-      onErr = function (err) {
-        self.captureException(err, wrapDomain.sentryContext);
-      };
-    }
- 
-    wrapDomain.on('error', onErr);
-    var wrapped = wrapDomain.bind(func);
- 
-    for (var property in func) {
-      if ({}.hasOwnProperty.call(func, property)) {
-        wrapped[property] = func[property];
-      }
-    }
-    wrapped.prototype = func.prototype;
-    wrapped.__raven__ = true;
-    wrapped.__inner__ = func;
-    // note: domain.bind sets wrapped.domain, but it's not documented, unsure if we should rely on that
-    wrapped.__domain__ = wrapDomain;
- 
-    return wrapped;
-  },
- 
-  interceptErr: function (options, func) {
-    if (!func && typeof options === 'function') {
-      func = options;
-      options = {};
-    }
-    var self = this;
-    var wrapped = function () {
-      var err = arguments[0];
-      if (err instanceof Error) {
-        self.captureException(err, options);
-      } else {
-        func.apply(null, arguments);
-      }
-    };
- 
-    // repetitive with wrap
-    for (var property in func) {
-      if ({}.hasOwnProperty.call(func, property)) {
-        wrapped[property] = func[property];
-      }
-    }
-    wrapped.prototype = func.prototype;
-    wrapped.__raven__ = true;
-    wrapped.__inner__ = func;
- 
-    return wrapped;
-  },
- 
-  setContext: function setContext(ctx) {
-    if (domain.active) {
-      domain.active.sentryContext = ctx;
-    } else {
-      this._globalContext = ctx;
-    }
-    return this;
-  },
- 
-  mergeContext: function mergeContext(ctx) {
-    extend(this.getContext(), ctx);
-    return this;
-  },
- 
-  getContext: function getContext() {
-    return domain.active ? domain.active.sentryContext : this._globalContext;
-  },
- 
-  setCallbackHelper: function (propertyName, callback) {
-    var original = this[propertyName];
-    Eif (typeof callback === 'function') {
-      this[propertyName] = function (data) {
-        return callback(data, original);
-      };
-    } else {
-      this[propertyName] = callback;
-    }
- 
-    return this;
-  },
- 
-  /*
-   * Set the dataCallback option
-   *
-   * @param {function} callback The callback to run which allows the
-   *                            data blob to be mutated before sending
-   * @return {Raven}
-   */
-  setDataCallback: function (callback) {
-    return this.setCallbackHelper('dataCallback', callback);
-  },
- 
-  /*
-   * Set the shouldSendCallback option
-   *
-   * @param {function} callback The callback to run which allows
-   *                            introspecting the blob before sending
-   * @return {Raven}
-   */
-  setShouldSendCallback: function (callback) {
-    return this.setCallbackHelper('shouldSendCallback', callback);
-  },
- 
-  requestHandler: function () {
-    var self = this;
-    return function (req, res, next) {
-      self.context({}, next, next);
-    };
-  },
- 
-  errorHandler: function () {
-    var self = this;
-    return function (err, req, res, next) {
-      var status = err.status || err.statusCode || err.status_code || 500;
- 
-      // skip anything not marked as an internal server error
-      if (status < 500) return next(err);
- 
-      var kwargs = parsers.parseRequest(req);
-      var eventId = self.captureException(err, kwargs);
-      res.sentry = eventId;
-      return next(err);
-    };
-  }
-});
- 
- 
-// Deprecations
-extend(Raven.prototype, {
-  getIdent: function getIdent(result) {
-    utils.consoleAlert('getIdent has been deprecated and will be removed in v2.0');
-    return result;
-  },
-  captureError: function captureError() {
-    utils.consoleAlert('captureError has been deprecated and will be removed in v2.0');
-    return this.captureException.apply(this, arguments);
-  },
-  patchGlobal: function (cb) {
-    utils.consoleAlert('patchGlobal has been deprecated and will be removed in v2.0');
-    registerExceptionHandler(this, cb);
-    return this;
-  },
-  setUserContext: function setUserContext() {
-    utils.consoleAlert('setUserContext has been deprecated and will be removed in v2.0; use setContext instead');
-    return this;
-  },
-  setExtraContext: function setExtraContext() {
-    utils.consoleAlert('setExtraContext has been deprecated and will be removed in v2.0; use setContext instead');
-    return this;
-  },
-  setTagsContext: function setTagsContext() {
-    utils.consoleAlert('setTagsContext has been deprecated and will be removed in v2.0; use setContext instead');
-    return this;
-  },
-});
-Raven.prototype.get_ident = Raven.prototype.getIdent;
- 
-// Maintain old API compat, need to make sure arguments length is preserved
-function Client(dsn, options) {
-  Iif (dsn instanceof Client) return dsn;
-  var ravenInstance = new Raven();
-  return ravenInstance.config.apply(ravenInstance, arguments);
-}
-nodeUtil.inherits(Client, Raven);
- 
-// Singleton-by-default but not strictly enforced
-// todo these extra export props are sort of an adhoc mess, better way to manage?
-var defaultInstance = new Raven();
-defaultInstance.Client = Client;
-defaultInstance.patchGlobal = patchGlobal;
-defaultInstance.version = require('../package.json').version;
-defaultInstance.disableConsoleAlerts = utils.disableConsoleAlerts;
- 
-module.exports = defaultInstance;
- 
-function registerExceptionHandler(client, cb) {
-  var called = false;
-  process.on('uncaughtException', function (err) {
-    if (cb) { // bind event listeners only if a callback was supplied
-      var onLogged = function onLogged() {
-        called = false;
-        cb(true, err);
-      };
- 
-      var onError = function onError() {
-        called = false;
-        cb(false, err);
-      };
- 
-      if (called) {
-        client.removeListener('logged', onLogged);
-        client.removeListener('error', onError);
-        return cb(false, err);
-      }
- 
-      client.once('logged', onLogged);
-      client.once('error', onError);
- 
-      called = true;
-    }
- 
-    var eventId = client.captureException(err);
-    return utils.consoleAlert('uncaughtException: ' + eventId);
-  });
-}
- 
-function registerRejectionHandler(client, cb) {
-  process.on('unhandledRejection', function (reason) {
-    var eventId = client.captureException(reason, function (sendErr) {
-      cb && cb(!sendErr, reason);
-    });
-    return utils.consoleAlert('unhandledRejection: ' + eventId);
-  });
-}
- 
-function patchGlobal(client, cb) {
-  // handle when the first argument is the callback, with no client specified
-  if (typeof client === 'function') {
-    cb = client;
-    client = new Client();
-    // first argument is a string DSN
-  } else if (typeof client === 'string') {
-    client = new Client(client);
-  }
-  // at the end, if we still don't have a Client, let's make one!
-  !(client instanceof Raven) && (client = new Client());
- 
-  registerExceptionHandler(client, cb);
-}
- 
-
-
- - - - - - - diff --git a/node_modules/homey-log/node_modules/raven/coverage/lcov-report/raven-node/lib/index.html b/node_modules/homey-log/node_modules/raven/coverage/lcov-report/raven-node/lib/index.html deleted file mode 100644 index 107598e..0000000 --- a/node_modules/homey-log/node_modules/raven/coverage/lcov-report/raven-node/lib/index.html +++ /dev/null @@ -1,132 +0,0 @@ - - - - Code coverage report for raven-node/lib/ - - - - - - - -
-
-

- all files raven-node/lib/ -

-
-
- 85.53% - Statements - 396/463 -
-
- 79.51% - Branches - 229/288 -
-
- 78.26% - Functions - 54/69 -
-
- 86.31% - Lines - 391/453 -
-
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
FileStatementsBranchesFunctionsLines
client.js
78.48%186/23773.44%94/12870.45%31/4479.4%185/233
parsers.js
100%62/6292.75%64/69100%5/5100%62/62
transports.js
96.08%49/5175%15/2085.71%6/796.08%49/51
utils.js
87.61%99/11378.87%56/7192.31%12/1388.79%95/107
-
-
- - - - - - - diff --git a/node_modules/homey-log/node_modules/raven/coverage/lcov-report/raven-node/lib/middleware/connect.js.html b/node_modules/homey-log/node_modules/raven/coverage/lcov-report/raven-node/lib/middleware/connect.js.html deleted file mode 100644 index 99d9adf..0000000 --- a/node_modules/homey-log/node_modules/raven/coverage/lcov-report/raven-node/lib/middleware/connect.js.html +++ /dev/null @@ -1,137 +0,0 @@ - - - - Code coverage report for raven-node/lib/middleware/connect.js - - - - - - - -
-
-

- all files / raven-node/lib/middleware/ connect.js -

-
-
- 50% - Statements - 5/10 -
-
- 0% - Branches - 0/4 -
-
- 0% - Functions - 0/3 -
-
- 50% - Lines - 5/10 -
-
-
-
-

-
-
1 -2 -3 -4 -5 -6 -7 -8 -9 -10 -11 -12 -13 -14 -15 -16 -17 -18 -19 -20 -21 -22 -23 -24 -25  -  - -  -  - -  -  -  -  -  - -  -  -  -  -  -  - -  -  -  -  - - 
'use strict';
- 
-var Raven = require('../client');
- 
-// Legacy support
-var connectMiddleware = function (client) {
-  return connectMiddleware.errorHandler(client);
-};
- 
-// Error handler. This should be the last item listed in middleware, but
-// before any other error handlers.
-connectMiddleware.errorHandler = function (client) {
-  client = client instanceof Raven.Client ? client : new Raven.Client(client);
-  return client.errorHandler();
-};
- 
-// Ensures asynchronous exceptions are routed to the errorHandler. This
-// should be the **first** item listed in middleware.
-connectMiddleware.requestHandler = function (client) {
-  client = client instanceof Raven.Client ? client : new Raven.Client(client);
-  return client.requestHandler();
-};
- 
-module.exports = connectMiddleware;
- 
-
-
- - - - - - - diff --git a/node_modules/homey-log/node_modules/raven/coverage/lcov-report/raven-node/lib/middleware/index.html b/node_modules/homey-log/node_modules/raven/coverage/lcov-report/raven-node/lib/middleware/index.html deleted file mode 100644 index ede89e3..0000000 --- a/node_modules/homey-log/node_modules/raven/coverage/lcov-report/raven-node/lib/middleware/index.html +++ /dev/null @@ -1,93 +0,0 @@ - - - - Code coverage report for raven-node/lib/middleware/ - - - - - - - -
-
-

- all files raven-node/lib/middleware/ -

-
-
- 50% - Statements - 5/10 -
-
- 0% - Branches - 0/4 -
-
- 0% - Functions - 0/3 -
-
- 50% - Lines - 5/10 -
-
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
FileStatementsBranchesFunctionsLines
connect.js
50%5/100%0/40%0/350%5/10
-
-
- - - - - - - diff --git a/node_modules/homey-log/node_modules/raven/coverage/lcov-report/raven-node/lib/parsers.js.html b/node_modules/homey-log/node_modules/raven/coverage/lcov-report/raven-node/lib/parsers.js.html deleted file mode 100644 index 0ddbc2b..0000000 --- a/node_modules/homey-log/node_modules/raven/coverage/lcov-report/raven-node/lib/parsers.js.html +++ /dev/null @@ -1,638 +0,0 @@ - - - - Code coverage report for raven-node/lib/parsers.js - - - - - - - -
-
-

- all files / raven-node/lib/ parsers.js -

-
-
- 100% - Statements - 62/62 -
-
- 92.75% - Branches - 64/69 -
-
- 100% - Functions - 5/5 -
-
- 100% - Lines - 62/62 -
-
-
-
-

-
-
1 -2 -3 -4 -5 -6 -7 -8 -9 -10 -11 -12 -13 -14 -15 -16 -17 -18 -19 -20 -21 -22 -23 -24 -25 -26 -27 -28 -29 -30 -31 -32 -33 -34 -35 -36 -37 -38 -39 -40 -41 -42 -43 -44 -45 -46 -47 -48 -49 -50 -51 -52 -53 -54 -55 -56 -57 -58 -59 -60 -61 -62 -63 -64 -65 -66 -67 -68 -69 -70 -71 -72 -73 -74 -75 -76 -77 -78 -79 -80 -81 -82 -83 -84 -85 -86 -87 -88 -89 -90 -91 -92 -93 -94 -95 -96 -97 -98 -99 -100 -101 -102 -103 -104 -105 -106 -107 -108 -109 -110 -111 -112 -113 -114 -115 -116 -117 -118 -119 -120 -121 -122 -123 -124 -125 -126 -127 -128 -129 -130 -131 -132 -133 -134 -135 -136 -137 -138 -139 -140 -141 -142 -143 -144 -145 -146 -147 -148 -149 -150 -151 -152 -153 -154 -155 -156 -157 -158 -159 -160 -161 -162 -163 -164 -165 -166 -167 -168 -169 -170 -171 -172 -173 -174 -175 -176 -177 -178 -179 -180 -181 -182 -183 -184 -185 -186 -187 -188 -189 -190 -191 -192  -  - - - -  - -  - - - -  - -  -  - -21× -21× -21× -21× -  -21× -  -  -  -  -  -  -  -  -21× -21× - - - - -  -  -  -21× - - -  -  -21× -21× -21× -21× -  -  -  -21× -  -  -  - - - - -  -  -  - -  -  - -27× -  -  -  -  -  -  -  -27× -  -  -  -  -  -  -  -27× -  -  -  -  -  -  -  -27× -  -  -  -  -  -  -  -27× -  -  -  -  -  -  -  -27× -  -  -27× -  -  -  -  -  -  -  -27× -  -  -  -  -  -  -  -27× -  -  -  -  -  -  -  -27× -27× - - -  -  -  -27× -  - -  -  -  -  -  -  -  -  -27× -  -  -27× -  -  -  -  -  -  -  -  -  -27× -  -  -  -  -  -27× -27× -26× -  -  - - - -  -  -  -  -26× - -  -  -26× -  -  -27× -  - 
'use strict';
- 
-var cookie = require('cookie');
-var urlParser = require('url');
-var stringify = require('json-stringify-safe');
- 
-var utils = require('./utils');
- 
-module.exports.parseText = function parseText(message, kwargs) {
-  kwargs = kwargs || {};
-  kwargs.message = message;
- 
-  return kwargs;
-};
- 
-module.exports.parseError = function parseError(err, kwargs, cb) {
-  utils.parseStack(err, function (frames) {
-    var name = err.name + '';
-    Eif (typeof kwargs.message === 'undefined') {
-      kwargs.message = name + ': ' + (err.message || '<no message>');
-    }
-    kwargs.exception = [{
-      type: name,
-      value: err.message,
-      stacktrace: {
-        frames: frames
-      }
-    }];
- 
-    // Save additional error properties to `extra` under the error type (e.g. `extra.AttributeError`)
-    var extraErrorProps;
-    for (var key in err) {
-      Eif (err.hasOwnProperty(key)) {
-        if (key !== 'name' && key !== 'message' && key !== 'stack') {
-          extraErrorProps = extraErrorProps || {};
-          extraErrorProps[key] = err[key];
-        }
-      }
-    }
-    if (extraErrorProps) {
-      kwargs.extra = kwargs.extra || {};
-      kwargs.extra[name] = extraErrorProps;
-    }
- 
-    for (var n = frames.length - 1; n >= 0; n--) {
-      Eif (frames[n].in_app) {
-        kwargs.culprit = kwargs.culprit || utils.getCulprit(frames[n]);
-        break;
-      }
-    }
- 
-    cb(kwargs);
-  });
-};
- 
-module.exports.parseQuery = function parseQuery(query, engine, kwargs) {
-  kwargs = kwargs || {};
-  kwargs.message = query;
-  kwargs.query = {
-    query: query,
-    engine: engine
-  };
-  return kwargs;
-};
- 
-module.exports.parseRequest = function parseRequest(req, kwargs) {
-  kwargs = kwargs || {};
- 
-  // headers:
-  //
-  //   node: req.headers
-  //   express: req.headers
-  //   koa: req.header
-  //
-  var headers = req.headers || req.header || {};
- 
-  // method:
-  //
-  //   node: req.method
-  //   express: req.method
-  //   koa: req.method
-  //
-  var method = req.method;
- 
-  // host:
-  //
-  //   node: req.headers.host
-  //   express: req.hostname in > 4 and req.host in < 4
-  //   koa: req.host
-  //
-  var host = req.hostname || req.host || headers.host || '<no host>';
- 
-  // protocol:
-  //
-  //   node: <n/a>
-  //   express: req.protocol
-  //   koa: req.protocol
-  //
-  var protocol = req.protocol === 'https' || req.secure || (req.socket || {}).encrypted ? 'https' : 'http';
- 
-  // url (including path and query string):
-  //
-  //   node: req.originalUrl
-  //   express: req.originalUrl
-  //   koa: req.url
-  //
-  var originalUrl = req.originalUrl || req.url;
- 
-  // absolute url
-  var url = protocol + '://' + host + originalUrl;
- 
-  // query string
-  //
-  //   node: req.url (raw)
-  //   express: req.query
-  //   koa: req.query
-  //
-  var query = req.query || urlParser.parse(originalUrl || '', true).query;
- 
-  // cookies:
-  //
-  //   node: req.headers.cookie
-  //   express: req.headers.cookie
-  //   koa: req.headers.cookie
-  //
-  var cookies = cookie.parse(headers.cookie || '');
- 
-  // body data:
-  //
-  //   node: req.body
-  //   express: req.body
-  //   koa: req.body
-  //
-  var data = req.body;
-  if (['GET', 'HEAD'].indexOf(method) === -1) {
-    if (typeof data === 'undefined') {
-      data = '<unavailable>';
-    }
-  }
- 
-  if (data && {}.toString.call(data) !== '[object String]') {
-    // Make sure the request body is a string
-    data = stringify(data);
-  }
- 
-  // client ip:
-  //
-  //   node: req.connection.remoteAddress
-  //   express: req.ip
-  //   koa: req.ip
-  //
-  var ip = req.ip || (req.connection || {}).remoteAddress;
- 
-  // http interface
-  var http = {
-    method: method,
-    query_string: query,
-    headers: headers,
-    cookies: cookies,
-    data: data,
-    url: url
-  };
- 
-  // expose http interface
-  kwargs.request = http;
- 
-  // user
-  //
-  // typically found on req.user according to Express and Passport
- 
-  var user = {};
-  if (!kwargs.user) {
-    if (req.user) {
-      // shallow copy is okay because we are only modifying top-level
-      // object (req.user)
-      for (var key in req.user) {
-        Eif ({}.hasOwnProperty.call(req.user, key)) {
-          user[key] = req.user[key];
-        }
-      }
-    }
- 
-    if (ip) {
-      user.ip_address = ip;
-    }
- 
-    kwargs.user = user;
-  }
- 
-  return kwargs;
-};
- 
-
-
- - - - - - - diff --git a/node_modules/homey-log/node_modules/raven/coverage/lcov-report/raven-node/lib/transports.js.html b/node_modules/homey-log/node_modules/raven/coverage/lcov-report/raven-node/lib/transports.js.html deleted file mode 100644 index c4cbea7..0000000 --- a/node_modules/homey-log/node_modules/raven/coverage/lcov-report/raven-node/lib/transports.js.html +++ /dev/null @@ -1,299 +0,0 @@ - - - - Code coverage report for raven-node/lib/transports.js - - - - - - - -
-
-

- all files / raven-node/lib/ transports.js -

-
-
- 96.08% - Statements - 49/51 -
-
- 75% - Branches - 15/20 -
-
- 85.71% - Functions - 6/7 -
-
- 96.08% - Lines - 49/51 -
-
-
-
-

-
-
1 -2 -3 -4 -5 -6 -7 -8 -9 -10 -11 -12 -13 -14 -15 -16 -17 -18 -19 -20 -21 -22 -23 -24 -25 -26 -27 -28 -29 -30 -31 -32 -33 -34 -35 -36 -37 -38 -39 -40 -41 -42 -43 -44 -45 -46 -47 -48 -49 -50 -51 -52 -53 -54 -55 -56 -57 -58 -59 -60 -61 -62 -63 -64 -65 -66 -67 -68 -69 -70 -71 -72 -73 -74 -75 -76 -77 -78 -79  -  - - -  - - -  - -  - - - - -  - - -22× -  -  -  -  -  -  -  -22× -  -  -  -  -22× -21× -21× -18× -18× -  - - - - - - - - - - -  -  -21× -21× -21× -  -  -22× -22× - - - - -  -  -22× -  -  - -  - - - - -  - -  - - - - - - 
'use strict';
- 
-var events = require('events');
-var util = require('util');
- 
-function Transport() {}
-util.inherits(Transport, events.EventEmitter);
- 
-var http = require('http');
- 
-function HTTPTransport(options) {
-  this.defaultPort = 80;
-  this.transport = http;
-  this.options = options || {};
-}
-util.inherits(HTTPTransport, Transport);
-HTTPTransport.prototype.send = function (client, message, headers, eventId, cb) {
-  var options = {
-    hostname: client.dsn.host,
-    path: client.dsn.path + 'api/' + client.dsn.project_id + '/store/',
-    headers: headers,
-    method: 'POST',
-    port: client.dsn.port || this.defaultPort,
-    ca: client.ca
-  };
-  for (var key in this.options) {
-    if (this.options.hasOwnProperty(key)) {
-      options[key] = this.options[key];
-    }
-  }
-  var req = this.transport.request(options, function (res) {
-    res.setEncoding('utf8');
-    if (res.statusCode >= 200 && res.statusCode < 300) {
-      client.emit('logged', eventId);
-      cb && cb(null, eventId);
-    } else {
-      var reason = res.headers['x-sentry-error'];
-      var e = new Error('HTTP Error (' + res.statusCode + '): ' + reason);
-      e.response = res;
-      e.statusCode = res.statusCode;
-      e.reason = reason;
-      e.sendMessage = message;
-      e.requestHeaders = headers;
-      e.eventId = eventId;
-      client.emit('error', e);
-      cb && cb(e);
-    }
-    // force the socket to drain
-    var noop = function () {};
-    res.on('data', noop);
-    res.on('end', noop);
-  });
- 
-  var cbFired = false;
-  req.on('error', function (e) {
-    client.emit('error', e);
-    Eif (!cbFired) {
-      cb && cb(e);
-      cbFired = true;
-    }
-  });
-  req.end(message);
-};
- 
-var https = require('https');
- 
-function HTTPSTransport(options) {
-  this.defaultPort = 443;
-  this.transport = https;
-  this.options = options || {};
-}
-util.inherits(HTTPSTransport, HTTPTransport);
- 
-module.exports.http = new HTTPTransport();
-module.exports.https = new HTTPSTransport();
-module.exports.Transport = Transport;
-module.exports.HTTPTransport = HTTPTransport;
-module.exports.HTTPSTransport = HTTPSTransport;
- 
-
-
- - - - - - - diff --git a/node_modules/homey-log/node_modules/raven/coverage/lcov-report/raven-node/lib/utils.js.html b/node_modules/homey-log/node_modules/raven/coverage/lcov-report/raven-node/lib/utils.js.html deleted file mode 100644 index 7d66608..0000000 --- a/node_modules/homey-log/node_modules/raven/coverage/lcov-report/raven-node/lib/utils.js.html +++ /dev/null @@ -1,683 +0,0 @@ - - - - Code coverage report for raven-node/lib/utils.js - - - - - - - -
-
-

- all files / raven-node/lib/ utils.js -

-
-
- 87.61% - Statements - 99/113 -
-
- 78.87% - Branches - 56/71 -
-
- 92.31% - Functions - 12/13 -
-
- 88.79% - Lines - 95/107 -
-
-
-
-

-
-
1 -2 -3 -4 -5 -6 -7 -8 -9 -10 -11 -12 -13 -14 -15 -16 -17 -18 -19 -20 -21 -22 -23 -24 -25 -26 -27 -28 -29 -30 -31 -32 -33 -34 -35 -36 -37 -38 -39 -40 -41 -42 -43 -44 -45 -46 -47 -48 -49 -50 -51 -52 -53 -54 -55 -56 -57 -58 -59 -60 -61 -62 -63 -64 -65 -66 -67 -68 -69 -70 -71 -72 -73 -74 -75 -76 -77 -78 -79 -80 -81 -82 -83 -84 -85 -86 -87 -88 -89 -90 -91 -92 -93 -94 -95 -96 -97 -98 -99 -100 -101 -102 -103 -104 -105 -106 -107 -108 -109 -110 -111 -112 -113 -114 -115 -116 -117 -118 -119 -120 -121 -122 -123 -124 -125 -126 -127 -128 -129 -130 -131 -132 -133 -134 -135 -136 -137 -138 -139 -140 -141 -142 -143 -144 -145 -146 -147 -148 -149 -150 -151 -152 -153 -154 -155 -156 -157 -158 -159 -160 -161 -162 -163 -164 -165 -166 -167 -168 -169 -170 -171 -172 -173 -174 -175 -176 -177 -178 -179 -180 -181 -182 -183 -184 -185 -186 -187 -188 -189 -190 -191 -192 -193 -194 -195 -196 -197 -198 -199 -200 -201 -202 -203 -204 -205 -206 -207  -  - - - - - - -  - -  - -  -  -  -  - -  - - -  -  - -19× -  -  -  -  -  - -  -  -  -  -  -  -  -  -  -  -  - -24× -24× -24× -24× -24× -24× -  -  - -73× -  - -  -69× -69× -  -  -  -  -  -  -  -69× - -  -  -69× - -  -  -68× -68× -68× -68× -68× -  - -  -  -  - -24× -23× -  - -  -  - - -29× - -  -29× -  -  -  - -  - -283× -283× -  -  -  -  -  -  -  -  -  - -  - -286× -  -  -286× -286× -286× -286× -  -194× -  -  -  -92× -92× - - - - -  -91× -  -  - -25× -  -  -25× - -  -  -24× -  -  -24× -  - -  -  -21× -  -  -21× -  -21× -283× -  -  -  -  -  -  -  -283× -  -  -283× -  -  -283× -65× -65× -65× -  -  -218× -  -  -  -  -  -218× -218× -218× -218× -218× -  -218× -218× -  -  - -218× -218× -218× -  -  -  -  -  - - - 
'use strict';
- 
-var fs = require('fs');
-var url = require('url');
-var transports = require('./transports');
-var path = require('path');
-var lsmod = require('lsmod');
-var stacktrace = require('stack-trace');
- 
-var ravenVersion = require('../package.json').version;
- 
-var protocolMap = {
-  http: 80,
-  https: 443
-};
- 
-var consoleAlerts = {};
- 
-module.exports.disableConsoleAlerts = function disableConsoleAlerts() {
-  consoleAlerts = false;
-};
- 
-module.exports.consoleAlert = function consoleAlert(msg) {
-  Iif (consoleAlerts && !(msg in consoleAlerts)) {
-    consoleAlerts[msg] = true;
-    console.log('raven@' + ravenVersion + ' alert: ' + msg);
-  }
-};
- 
-module.exports.extend = Object.assign || function (target) {
-  for (var i = 1; i < arguments.length; i++) {
-    var source = arguments[i];
-    for (var key in source) {
-      if (Object.prototype.hasOwnProperty.call(source, key)) {
-        target[key] = source[key];
-      }
-    }
-  }
-  return target;
-};
- 
-module.exports.getAuthHeader = function getAuthHeader(timestamp, apiKey, apiSecret) {
-  var header = ['Sentry sentry_version=5'];
-  header.push('sentry_timestamp=' + timestamp);
-  header.push('sentry_client=raven-node/' + ravenVersion);
-  header.push('sentry_key=' + apiKey);
-  header.push('sentry_secret=' + apiSecret);
-  return header.join(', ');
-};
- 
-module.exports.parseDSN = function parseDSN(dsn) {
-  if (!dsn) {
-    // Let a falsey value return false explicitly
-    return false;
-  }
-  try {
-    var parsed = url.parse(dsn),
-        response = {
-          protocol: parsed.protocol.slice(0, -1),
-          public_key: parsed.auth.split(':')[0],
-          private_key: parsed.auth.split(':')[1],
-          host: parsed.host.split(':')[0]
-        };
- 
-    if (~response.protocol.indexOf('+')) {
-      response.protocol = response.protocol.split('+')[1];
-    }
- 
-    if (!transports.hasOwnProperty(response.protocol)) {
-      throw new Error('Invalid transport');
-    }
- 
-    var index = parsed.pathname.lastIndexOf('/');
-    response.path = parsed.pathname.substr(0, index + 1);
-    response.project_id = parsed.pathname.substr(index + 1);
-    response.port = ~~parsed.port || protocolMap[response.protocol] || 443;
-    return response;
-  } catch (e) {
-    throw new Error('Invalid Sentry DSN: ' + dsn);
-  }
-};
- 
-module.exports.getCulprit = function getCulprit(frame) {
-  if (frame.module || frame.function) {
-    return (frame.module || '?') + ' at ' + (frame.function || '?');
-  }
-  return '<unknown>';
-};
- 
-var moduleCache;
-module.exports.getModules = function getModules() {
-  if (!moduleCache) {
-    moduleCache = lsmod();
-  }
-  return moduleCache;
-};
- 
- 
-var LINES_OF_CONTEXT = 7;
- 
-function getFunction(line) {
-  try {
-    return line.getFunctionName() ||
-      line.getTypeName() + '.' + (line.getMethodName() || '<anonymous>');
-  } catch (e) {
-    // This seems to happen sometimes when using 'use strict',
-    // stemming from `getTypeName`.
-    // [TypeError: Cannot read property 'constructor' of undefined]
-    return '<anonymous>';
-  }
-}
- 
-var mainModule = (require.main && path.dirname(require.main.filename) || process.cwd()) + '/';
- 
-function getModule(filename, base) {
-  if (!base) base = mainModule;
- 
-  // It's specifically a module
-  var file = path.basename(filename, '.js');
-  filename = path.dirname(filename);
-  var n = filename.lastIndexOf('/node_modules/');
-  if (n > -1) {
-    // /node_modules/ is 14 chars
-    return filename.substr(n + 14).replace(/\//g, '.') + ':' + file;
-  }
-  // Let's see if it's a part of the main module
-  // To be a part of main module, it has to share the same base
-  n = (filename + '/').lastIndexOf(base, 0);
-  if (n === 0) {
-    var module = filename.substr(base.length).replace(/\//g, '.');
-    Eif (module) module += ':';
-    module += file;
-    return module;
-  }
-  return file;
-}
- 
-function parseStack(err, cb) {
-  var frames = [],
-      cache = {};
- 
-  if (!err) {
-    return cb(frames);
-  }
- 
-  var stack = stacktrace.parse(err);
- 
-  // check to make sure that the stack is what we need it to be.
-  if (!stack || !Array.isArray(stack) || !stack.length || !stack[0].getFileName) {
-    // lol, stack is fucked
-    return cb(frames);
-  }
- 
-  var callbacks = stack.length;
- 
-  // Sentry requires the stack trace to be from oldest to newest
-  stack.reverse();
- 
-  return stack.forEach(function (line, index) {
-    var frame = {
-          filename: line.getFileName() || '',
-          lineno: line.getLineNumber(),
-          'function': getFunction(line),
-        },
-        isInternal = line.isNative() || frame.filename[0] !== '/' && frame.filename[0] !== '.';
- 
-    // in_app is all that's not an internal Node function or a module within node_modules
-    frame.in_app = !isInternal && !~frame.filename.indexOf('node_modules/');
- 
-    // Extract a module name based on the filename
-    Eif (frame.filename) frame.module = getModule(frame.filename);
- 
-    // internal Node files are not full path names. Ignore them.
-    if (isInternal) {
-      frames[index] = frame;
-      Iif (--callbacks === 0) cb(frames);
-      return;
-    }
- 
-    Iif (frame.filename in cache) {
-      parseLines(cache[frame.filename]);
-      if (--callbacks === 0) cb(frames);
-      return;
-    }
- 
-    fs.readFile(frame.filename, function (_err, file) {
-      Eif (!_err) {
-        file = file.toString().split('\n');
-        cache[frame.filename] = file;
-        parseLines(file, frame);
-      }
-      frames[index] = frame;
-      if (--callbacks === 0) cb(frames);
-    });
- 
-    function parseLines(lines) {
-      frame.pre_context = lines.slice(Math.max(0, frame.lineno - (LINES_OF_CONTEXT + 1)), frame.lineno - 1);
-      frame.context_line = lines[frame.lineno - 1];
-      frame.post_context = lines.slice(frame.lineno, frame.lineno + LINES_OF_CONTEXT);
-    }
-  });
-}
- 
-// expose basically for testing because I don't know what I'm doing
-module.exports.parseStack = parseStack;
-module.exports.getModule = getModule;
- 
-
-
- - - - - - - diff --git a/node_modules/homey-log/node_modules/raven/coverage/lcov-report/sort-arrow-sprite.png b/node_modules/homey-log/node_modules/raven/coverage/lcov-report/sort-arrow-sprite.png deleted file mode 100644 index 03f704a..0000000 Binary files a/node_modules/homey-log/node_modules/raven/coverage/lcov-report/sort-arrow-sprite.png and /dev/null differ diff --git a/node_modules/homey-log/node_modules/raven/coverage/lcov-report/sorter.js b/node_modules/homey-log/node_modules/raven/coverage/lcov-report/sorter.js deleted file mode 100644 index 6c5034e..0000000 --- a/node_modules/homey-log/node_modules/raven/coverage/lcov-report/sorter.js +++ /dev/null @@ -1,158 +0,0 @@ -var addSorting = (function () { - "use strict"; - var cols, - currentSort = { - index: 0, - desc: false - }; - - // returns the summary table element - function getTable() { return document.querySelector('.coverage-summary'); } - // returns the thead element of the summary table - function getTableHeader() { return getTable().querySelector('thead tr'); } - // returns the tbody element of the summary table - function getTableBody() { return getTable().querySelector('tbody'); } - // returns the th element for nth column - function getNthColumn(n) { return getTableHeader().querySelectorAll('th')[n]; } - - // loads all columns - function loadColumns() { - var colNodes = getTableHeader().querySelectorAll('th'), - colNode, - cols = [], - col, - i; - - for (i = 0; i < colNodes.length; i += 1) { - colNode = colNodes[i]; - col = { - key: colNode.getAttribute('data-col'), - sortable: !colNode.getAttribute('data-nosort'), - type: colNode.getAttribute('data-type') || 'string' - }; - cols.push(col); - if (col.sortable) { - col.defaultDescSort = col.type === 'number'; - colNode.innerHTML = colNode.innerHTML + ''; - } - } - return cols; - } - // attaches a data attribute to every tr element with an object - // of data values keyed by column name - function loadRowData(tableRow) { - var tableCols = tableRow.querySelectorAll('td'), - colNode, - col, - data = {}, - i, - val; - for (i = 0; i < tableCols.length; i += 1) { - colNode = tableCols[i]; - col = cols[i]; - val = colNode.getAttribute('data-value'); - if (col.type === 'number') { - val = Number(val); - } - data[col.key] = val; - } - return data; - } - // loads all row data - function loadData() { - var rows = getTableBody().querySelectorAll('tr'), - i; - - for (i = 0; i < rows.length; i += 1) { - rows[i].data = loadRowData(rows[i]); - } - } - // sorts the table using the data for the ith column - function sortByIndex(index, desc) { - var key = cols[index].key, - sorter = function (a, b) { - a = a.data[key]; - b = b.data[key]; - return a < b ? -1 : a > b ? 1 : 0; - }, - finalSorter = sorter, - tableBody = document.querySelector('.coverage-summary tbody'), - rowNodes = tableBody.querySelectorAll('tr'), - rows = [], - i; - - if (desc) { - finalSorter = function (a, b) { - return -1 * sorter(a, b); - }; - } - - for (i = 0; i < rowNodes.length; i += 1) { - rows.push(rowNodes[i]); - tableBody.removeChild(rowNodes[i]); - } - - rows.sort(finalSorter); - - for (i = 0; i < rows.length; i += 1) { - tableBody.appendChild(rows[i]); - } - } - // removes sort indicators for current column being sorted - function removeSortIndicators() { - var col = getNthColumn(currentSort.index), - cls = col.className; - - cls = cls.replace(/ sorted$/, '').replace(/ sorted-desc$/, ''); - col.className = cls; - } - // adds sort indicators for current column being sorted - function addSortIndicators() { - getNthColumn(currentSort.index).className += currentSort.desc ? ' sorted-desc' : ' sorted'; - } - // adds event listeners for all sorter widgets - function enableUI() { - var i, - el, - ithSorter = function ithSorter(i) { - var col = cols[i]; - - return function () { - var desc = col.defaultDescSort; - - if (currentSort.index === i) { - desc = !currentSort.desc; - } - sortByIndex(i, desc); - removeSortIndicators(); - currentSort.index = i; - currentSort.desc = desc; - addSortIndicators(); - }; - }; - for (i =0 ; i < cols.length; i += 1) { - if (cols[i].sortable) { - // add the click event handler on the th so users - // dont have to click on those tiny arrows - el = getNthColumn(i).querySelector('.sorter').parentElement; - if (el.addEventListener) { - el.addEventListener('click', ithSorter(i)); - } else { - el.attachEvent('onclick', ithSorter(i)); - } - } - } - } - // adds sorting functionality to the UI - return function () { - if (!getTable()) { - return; - } - cols = loadColumns(); - loadData(cols); - addSortIndicators(); - enableUI(); - }; -})(); - -window.addEventListener('load', addSorting); diff --git a/node_modules/homey-log/node_modules/raven/coverage/lcov.info b/node_modules/homey-log/node_modules/raven/coverage/lcov.info deleted file mode 100644 index 4e1dc6b..0000000 --- a/node_modules/homey-log/node_modules/raven/coverage/lcov.info +++ /dev/null @@ -1,960 +0,0 @@ -TN: -SF:/Users/lewis/dev/raven-node/index.js -FNF:0 -FNH:0 -DA:3,1 -DA:4,1 -DA:5,1 -DA:9,1 -DA:10,1 -DA:11,1 -DA:14,1 -LF:7 -LH:7 -BRF:0 -BRH:0 -end_of_record -TN: -SF:/Users/lewis/dev/raven-node/lib/client.js -FN:15,Raven -FN:20,config -FN:65,(anonymous_3) -FN:72,install -FN:84,generateEventId -FN:88,process -FN:133,(anonymous_7) -FN:139,send -FN:144,(anonymous_9) -FN:157,captureMessage -FN:170,captureException -FN:187,(anonymous_12) -FN:194,captureQuery -FN:213,(anonymous_14) -FN:225,(anonymous_15) -FN:237,(anonymous_16) -FN:259,(anonymous_17) -FN:265,(anonymous_18) -FN:287,setContext -FN:296,mergeContext -FN:301,getContext -FN:305,(anonymous_22) -FN:308,(anonymous_23) -FN:325,(anonymous_24) -FN:336,(anonymous_25) -FN:340,(anonymous_26) -FN:342,(anonymous_27) -FN:347,(anonymous_28) -FN:349,(anonymous_29) -FN:366,getIdent -FN:370,captureError -FN:374,(anonymous_32) -FN:379,setUserContext -FN:383,setExtraContext -FN:387,setTagsContext -FN:395,Client -FN:412,registerExceptionHandler -FN:414,(anonymous_38) -FN:416,onLogged -FN:421,onError -FN:443,registerRejectionHandler -FN:444,(anonymous_42) -FN:445,(anonymous_43) -FN:452,patchGlobal -FNF:44 -FNH:31 -FNDA:67,Raven -FNDA:66,config -FNDA:4,(anonymous_3) -FNDA:2,install -FNDA:29,generateEventId -FNDA:29,process -FNDA:2,(anonymous_7) -FNDA:24,send -FNDA:23,(anonymous_9) -FNDA:5,captureMessage -FNDA:12,captureException -FNDA:12,(anonymous_12) -FNDA:0,captureQuery -FNDA:1,(anonymous_14) -FNDA:1,(anonymous_15) -FNDA:0,(anonymous_16) -FNDA:3,(anonymous_17) -FNDA:3,(anonymous_18) -FNDA:3,setContext -FNDA:0,mergeContext -FNDA:0,getContext -FNDA:4,(anonymous_22) -FNDA:4,(anonymous_23) -FNDA:2,(anonymous_24) -FNDA:2,(anonymous_25) -FNDA:0,(anonymous_26) -FNDA:0,(anonymous_27) -FNDA:0,(anonymous_28) -FNDA:0,(anonymous_29) -FNDA:1,getIdent -FNDA:4,captureError -FNDA:4,(anonymous_32) -FNDA:0,setUserContext -FNDA:0,setExtraContext -FNDA:0,setTagsContext -FNDA:66,Client -FNDA:6,registerExceptionHandler -FNDA:4,(anonymous_38) -FNDA:1,onLogged -FNDA:0,onError -FNDA:1,registerRejectionHandler -FNDA:1,(anonymous_42) -FNDA:1,(anonymous_43) -FNDA:0,patchGlobal -DA:3,1 -DA:4,1 -DA:5,1 -DA:6,1 -DA:7,1 -DA:8,1 -DA:9,1 -DA:10,1 -DA:11,1 -DA:13,1 -DA:15,1 -DA:17,1 -DA:19,1 -DA:21,66 -DA:23,2 -DA:24,2 -DA:26,66 -DA:28,1 -DA:29,1 -DA:31,66 -DA:33,66 -DA:34,66 -DA:35,66 -DA:36,66 -DA:37,66 -DA:38,66 -DA:39,66 -DA:41,66 -DA:42,66 -DA:43,66 -DA:45,66 -DA:46,2 -DA:49,66 -DA:51,64 -DA:55,66 -DA:57,66 -DA:58,66 -DA:59,1 -DA:61,66 -DA:62,1 -DA:65,66 -DA:66,4 -DA:69,66 -DA:73,2 -DA:74,0 -DA:77,2 -DA:78,2 -DA:79,1 -DA:81,2 -DA:85,29 -DA:90,29 -DA:91,12 -DA:92,12 -DA:93,12 -DA:96,29 -DA:97,29 -DA:98,29 -DA:99,29 -DA:101,29 -DA:102,29 -DA:104,29 -DA:105,0 -DA:108,29 -DA:109,29 -DA:110,29 -DA:111,29 -DA:112,29 -DA:113,29 -DA:116,29 -DA:117,2 -DA:120,29 -DA:121,2 -DA:124,29 -DA:125,29 -DA:126,29 -DA:128,29 -DA:129,27 -DA:133,2 -DA:134,2 -DA:140,24 -DA:141,24 -DA:142,24 -DA:144,24 -DA:145,23 -DA:153,23 -DA:158,5 -DA:159,0 -DA:160,0 -DA:162,5 -DA:164,5 -DA:165,5 -DA:167,5 -DA:171,12 -DA:175,1 -DA:178,12 -DA:179,1 -DA:180,1 -DA:182,11 -DA:185,12 -DA:186,12 -DA:187,12 -DA:188,12 -DA:191,12 -DA:195,0 -DA:196,0 -DA:197,0 -DA:199,0 -DA:202,0 -DA:203,0 -DA:205,0 -DA:214,1 -DA:215,1 -DA:216,1 -DA:222,1 -DA:226,1 -DA:227,0 -DA:228,0 -DA:231,1 -DA:233,1 -DA:235,1 -DA:236,1 -DA:237,1 -DA:238,0 -DA:242,1 -DA:243,1 -DA:245,1 -DA:246,0 -DA:247,0 -DA:250,1 -DA:251,1 -DA:252,1 -DA:254,1 -DA:256,1 -DA:260,3 -DA:261,2 -DA:262,2 -DA:264,3 -DA:265,3 -DA:266,3 -DA:267,3 -DA:268,2 -DA:270,1 -DA:275,3 -DA:276,0 -DA:277,0 -DA:280,3 -DA:281,3 -DA:282,3 -DA:284,3 -DA:288,3 -DA:289,1 -DA:291,2 -DA:293,3 -DA:297,0 -DA:298,0 -DA:302,0 -DA:306,4 -DA:307,4 -DA:308,4 -DA:309,4 -DA:312,0 -DA:315,4 -DA:326,2 -DA:337,2 -DA:341,0 -DA:342,0 -DA:343,0 -DA:348,0 -DA:349,0 -DA:350,0 -DA:353,0 -DA:355,0 -DA:356,0 -DA:357,0 -DA:358,0 -DA:365,1 -DA:367,1 -DA:368,1 -DA:371,4 -DA:372,4 -DA:375,4 -DA:376,4 -DA:377,4 -DA:380,0 -DA:381,0 -DA:384,0 -DA:385,0 -DA:388,0 -DA:389,0 -DA:392,1 -DA:395,1 -DA:396,66 -DA:397,66 -DA:398,66 -DA:400,1 -DA:404,1 -DA:405,1 -DA:406,1 -DA:407,1 -DA:408,1 -DA:410,1 -DA:412,1 -DA:413,6 -DA:414,6 -DA:415,4 -DA:416,3 -DA:417,1 -DA:418,1 -DA:421,3 -DA:422,0 -DA:423,0 -DA:426,3 -DA:427,1 -DA:428,1 -DA:429,1 -DA:432,2 -DA:433,2 -DA:435,2 -DA:438,3 -DA:439,3 -DA:443,1 -DA:444,1 -DA:445,1 -DA:446,1 -DA:448,1 -DA:452,1 -DA:454,0 -DA:455,0 -DA:456,0 -DA:458,0 -DA:459,0 -DA:462,0 -DA:464,0 -LF:233 -LH:185 -BRDA:21,1,0,2 -BRDA:21,1,1,64 -BRDA:26,2,0,1 -BRDA:26,2,1,65 -BRDA:31,3,0,66 -BRDA:31,3,1,50 -BRDA:35,4,0,66 -BRDA:35,4,1,64 -BRDA:35,4,2,63 -BRDA:36,5,0,66 -BRDA:36,5,1,66 -BRDA:37,6,0,66 -BRDA:37,6,1,65 -BRDA:38,7,0,66 -BRDA:38,7,1,63 -BRDA:38,7,2,62 -BRDA:39,8,0,66 -BRDA:39,8,1,64 -BRDA:39,8,2,63 -BRDA:41,9,0,66 -BRDA:41,9,1,66 -BRDA:45,10,0,2 -BRDA:45,10,1,64 -BRDA:49,11,0,64 -BRDA:49,11,1,2 -BRDA:51,12,0,64 -BRDA:51,12,1,64 -BRDA:58,13,0,1 -BRDA:58,13,1,65 -BRDA:61,14,0,1 -BRDA:61,14,1,65 -BRDA:73,15,0,0 -BRDA:73,15,1,2 -BRDA:78,16,0,1 -BRDA:78,16,1,1 -BRDA:78,17,0,2 -BRDA:78,17,1,1 -BRDA:90,18,0,12 -BRDA:90,18,1,17 -BRDA:96,19,0,29 -BRDA:96,19,1,1 -BRDA:96,19,2,28 -BRDA:102,20,0,29 -BRDA:102,20,1,29 -BRDA:104,21,0,0 -BRDA:104,21,1,29 -BRDA:108,22,0,29 -BRDA:108,22,1,28 -BRDA:109,23,0,29 -BRDA:109,23,1,29 -BRDA:116,24,0,2 -BRDA:116,24,1,27 -BRDA:120,25,0,2 -BRDA:120,25,1,27 -BRDA:125,26,0,0 -BRDA:125,26,1,29 -BRDA:126,27,0,2 -BRDA:126,27,1,27 -BRDA:126,28,0,29 -BRDA:126,28,1,2 -BRDA:128,29,0,27 -BRDA:128,29,1,2 -BRDA:158,30,0,0 -BRDA:158,30,1,5 -BRDA:158,31,0,5 -BRDA:158,31,1,5 -BRDA:162,32,0,5 -BRDA:162,32,1,5 -BRDA:171,33,0,1 -BRDA:171,33,1,11 -BRDA:178,34,0,1 -BRDA:178,34,1,11 -BRDA:178,35,0,12 -BRDA:178,35,1,11 -BRDA:182,36,0,11 -BRDA:182,36,1,7 -BRDA:195,37,0,0 -BRDA:195,37,1,0 -BRDA:195,38,0,0 -BRDA:195,38,1,0 -BRDA:199,39,0,0 -BRDA:199,39,1,0 -BRDA:214,40,0,1 -BRDA:214,40,1,0 -BRDA:214,41,0,1 -BRDA:214,41,1,1 -BRDA:226,42,0,0 -BRDA:226,42,1,1 -BRDA:226,43,0,1 -BRDA:226,43,1,0 -BRDA:236,44,0,1 -BRDA:236,44,1,0 -BRDA:246,45,0,0 -BRDA:246,45,1,0 -BRDA:260,46,0,2 -BRDA:260,46,1,1 -BRDA:260,47,0,3 -BRDA:260,47,1,2 -BRDA:267,48,0,2 -BRDA:267,48,1,1 -BRDA:276,49,0,0 -BRDA:276,49,1,0 -BRDA:288,50,0,1 -BRDA:288,50,1,2 -BRDA:302,51,0,0 -BRDA:302,51,1,0 -BRDA:307,52,0,4 -BRDA:307,52,1,0 -BRDA:350,53,0,0 -BRDA:350,53,1,0 -BRDA:350,53,2,0 -BRDA:350,53,3,0 -BRDA:353,54,0,0 -BRDA:353,54,1,0 -BRDA:396,55,0,0 -BRDA:396,55,1,66 -BRDA:415,56,0,3 -BRDA:415,56,1,1 -BRDA:426,57,0,1 -BRDA:426,57,1,2 -BRDA:446,58,0,1 -BRDA:446,58,1,1 -BRDA:454,59,0,0 -BRDA:454,59,1,0 -BRDA:458,60,0,0 -BRDA:458,60,1,0 -BRDA:462,61,0,0 -BRDA:462,61,1,0 -BRF:128 -BRH:94 -end_of_record -TN: -SF:/Users/lewis/dev/raven-node/lib/parsers.js -FN:9,parseText -FN:16,parseError -FN:17,(anonymous_3) -FN:56,parseQuery -FN:66,parseRequest -FNF:5 -FNH:5 -FNDA:7,parseText -FNDA:21,parseError -FNDA:21,(anonymous_3) -FNDA:1,parseQuery -FNDA:27,parseRequest -DA:3,1 -DA:4,1 -DA:5,1 -DA:7,1 -DA:9,1 -DA:10,7 -DA:11,7 -DA:13,7 -DA:16,1 -DA:17,21 -DA:18,21 -DA:19,21 -DA:20,21 -DA:22,21 -DA:31,21 -DA:32,21 -DA:33,7 -DA:34,7 -DA:35,4 -DA:36,4 -DA:40,21 -DA:41,1 -DA:42,1 -DA:45,21 -DA:46,21 -DA:47,21 -DA:48,21 -DA:52,21 -DA:56,1 -DA:57,1 -DA:58,1 -DA:59,1 -DA:63,1 -DA:66,1 -DA:67,27 -DA:75,27 -DA:83,27 -DA:91,27 -DA:99,27 -DA:107,27 -DA:110,27 -DA:118,27 -DA:126,27 -DA:134,27 -DA:135,27 -DA:136,5 -DA:137,4 -DA:141,27 -DA:143,1 -DA:152,27 -DA:155,27 -DA:165,27 -DA:171,27 -DA:172,27 -DA:173,26 -DA:176,2 -DA:177,4 -DA:178,4 -DA:183,26 -DA:184,4 -DA:187,26 -DA:190,27 -LF:62 -LH:62 -BRDA:10,1,0,7 -BRDA:10,1,1,1 -BRDA:19,2,0,21 -BRDA:19,2,1,0 -BRDA:20,3,0,21 -BRDA:20,3,1,2 -BRDA:33,4,0,7 -BRDA:33,4,1,0 -BRDA:34,5,0,4 -BRDA:34,5,1,3 -BRDA:34,6,0,7 -BRDA:34,6,1,5 -BRDA:34,6,2,4 -BRDA:35,7,0,4 -BRDA:35,7,1,1 -BRDA:40,8,0,1 -BRDA:40,8,1,20 -BRDA:41,9,0,1 -BRDA:41,9,1,1 -BRDA:46,10,0,21 -BRDA:46,10,1,0 -BRDA:47,11,0,21 -BRDA:47,11,1,20 -BRDA:57,12,0,1 -BRDA:57,12,1,1 -BRDA:67,13,0,27 -BRDA:67,13,1,26 -BRDA:75,14,0,27 -BRDA:75,14,1,18 -BRDA:75,14,2,15 -BRDA:91,15,0,27 -BRDA:91,15,1,12 -BRDA:91,15,2,11 -BRDA:91,15,3,3 -BRDA:99,16,0,6 -BRDA:99,16,1,21 -BRDA:99,17,0,27 -BRDA:99,17,1,24 -BRDA:99,17,2,23 -BRDA:99,18,0,23 -BRDA:99,18,1,21 -BRDA:107,19,0,27 -BRDA:107,19,1,26 -BRDA:118,20,0,27 -BRDA:118,20,1,26 -BRDA:118,21,0,26 -BRDA:118,21,1,0 -BRDA:126,22,0,27 -BRDA:126,22,1,25 -BRDA:135,23,0,5 -BRDA:135,23,1,22 -BRDA:136,24,0,4 -BRDA:136,24,1,1 -BRDA:141,25,0,1 -BRDA:141,25,1,26 -BRDA:141,26,0,27 -BRDA:141,26,1,6 -BRDA:152,27,0,27 -BRDA:152,27,1,25 -BRDA:152,28,0,25 -BRDA:152,28,1,23 -BRDA:172,29,0,26 -BRDA:172,29,1,1 -BRDA:173,30,0,2 -BRDA:173,30,1,24 -BRDA:177,31,0,4 -BRDA:177,31,1,0 -BRDA:183,32,0,4 -BRDA:183,32,1,22 -BRF:69 -BRH:64 -end_of_record -TN: -SF:/Users/lewis/dev/raven-node/lib/utils.js -FN:19,disableConsoleAlerts -FN:23,consoleAlert -FN:30,(anonymous_3) -FN:42,getAuthHeader -FN:51,parseDSN -FN:83,getCulprit -FN:91,getModules -FN:101,getFunction -FN:115,getModule -FN:138,parseStack -FN:159,(anonymous_11) -FN:186,(anonymous_12) -FN:196,parseLines -FNF:13 -FNH:12 -FNDA:1,disableConsoleAlerts -FNDA:19,consoleAlert -FNDA:0,(anonymous_3) -FNDA:24,getAuthHeader -FNDA:73,parseDSN -FNDA:24,getCulprit -FNDA:29,getModules -FNDA:283,getFunction -FNDA:286,getModule -FNDA:25,parseStack -FNDA:283,(anonymous_11) -FNDA:218,(anonymous_12) -FNDA:218,parseLines -DA:3,1 -DA:4,1 -DA:5,1 -DA:6,1 -DA:7,1 -DA:8,1 -DA:10,1 -DA:12,1 -DA:17,1 -DA:19,1 -DA:20,1 -DA:23,1 -DA:24,19 -DA:25,0 -DA:26,0 -DA:30,1 -DA:31,0 -DA:32,0 -DA:33,0 -DA:34,0 -DA:35,0 -DA:39,0 -DA:42,1 -DA:43,24 -DA:44,24 -DA:45,24 -DA:46,24 -DA:47,24 -DA:48,24 -DA:51,1 -DA:52,73 -DA:54,4 -DA:56,69 -DA:57,69 -DA:65,69 -DA:66,2 -DA:69,69 -DA:70,1 -DA:73,68 -DA:74,68 -DA:75,68 -DA:76,68 -DA:77,68 -DA:79,1 -DA:83,1 -DA:84,24 -DA:85,23 -DA:87,1 -DA:90,1 -DA:91,1 -DA:92,29 -DA:93,1 -DA:95,29 -DA:99,1 -DA:101,1 -DA:102,283 -DA:103,283 -DA:109,0 -DA:113,1 -DA:115,1 -DA:116,286 -DA:119,286 -DA:120,286 -DA:121,286 -DA:122,286 -DA:124,194 -DA:128,92 -DA:129,92 -DA:130,1 -DA:131,1 -DA:132,1 -DA:133,1 -DA:135,91 -DA:138,1 -DA:139,25 -DA:142,25 -DA:143,1 -DA:146,24 -DA:149,24 -DA:151,3 -DA:154,21 -DA:157,21 -DA:159,21 -DA:160,283 -DA:168,283 -DA:171,283 -DA:174,283 -DA:175,65 -DA:176,65 -DA:177,65 -DA:180,218 -DA:181,0 -DA:182,0 -DA:183,0 -DA:186,218 -DA:187,218 -DA:188,218 -DA:189,218 -DA:190,218 -DA:192,218 -DA:193,218 -DA:196,1 -DA:197,218 -DA:198,218 -DA:199,218 -DA:205,1 -DA:206,1 -LF:107 -LH:95 -BRDA:24,1,0,0 -BRDA:24,1,1,19 -BRDA:24,2,0,19 -BRDA:24,2,1,0 -BRDA:30,3,0,1 -BRDA:30,3,1,0 -BRDA:34,4,0,0 -BRDA:34,4,1,0 -BRDA:52,5,0,4 -BRDA:52,5,1,69 -BRDA:65,6,0,2 -BRDA:65,6,1,67 -BRDA:69,7,0,1 -BRDA:69,7,1,68 -BRDA:76,8,0,68 -BRDA:76,8,1,65 -BRDA:76,8,2,0 -BRDA:84,9,0,23 -BRDA:84,9,1,1 -BRDA:84,10,0,24 -BRDA:84,10,1,2 -BRDA:85,11,0,23 -BRDA:85,11,1,1 -BRDA:85,12,0,23 -BRDA:85,12,1,1 -BRDA:92,13,0,1 -BRDA:92,13,1,28 -BRDA:103,14,0,283 -BRDA:103,14,1,91 -BRDA:104,15,0,91 -BRDA:104,15,1,91 -BRDA:113,16,0,1 -BRDA:113,16,1,1 -BRDA:113,16,2,0 -BRDA:116,17,0,285 -BRDA:116,17,1,1 -BRDA:122,18,0,194 -BRDA:122,18,1,92 -BRDA:129,19,0,1 -BRDA:129,19,1,91 -BRDA:131,20,0,1 -BRDA:131,20,1,0 -BRDA:142,21,0,1 -BRDA:142,21,1,24 -BRDA:149,22,0,3 -BRDA:149,22,1,21 -BRDA:149,23,0,24 -BRDA:149,23,1,24 -BRDA:149,23,2,24 -BRDA:149,23,3,21 -BRDA:161,24,0,283 -BRDA:161,24,1,0 -BRDA:165,25,0,283 -BRDA:165,25,1,283 -BRDA:165,25,2,65 -BRDA:168,26,0,283 -BRDA:168,26,1,218 -BRDA:171,27,0,283 -BRDA:171,27,1,0 -BRDA:174,28,0,65 -BRDA:174,28,1,218 -BRDA:176,29,0,0 -BRDA:176,29,1,65 -BRDA:180,30,0,0 -BRDA:180,30,1,218 -BRDA:182,31,0,0 -BRDA:182,31,1,0 -BRDA:187,32,0,218 -BRDA:187,32,1,0 -BRDA:193,33,0,21 -BRDA:193,33,1,197 -BRF:71 -BRH:56 -end_of_record -TN: -SF:/Users/lewis/dev/raven-node/lib/transports.js -FN:6,Transport -FN:11,HTTPTransport -FN:17,(anonymous_3) -FN:31,(anonymous_4) -FN:49,(anonymous_5) -FN:55,(anonymous_6) -FN:67,HTTPSTransport -FNF:7 -FNH:6 -FNDA:0,Transport -FNDA:1,HTTPTransport -FNDA:22,(anonymous_3) -FNDA:21,(anonymous_4) -FNDA:42,(anonymous_5) -FNDA:1,(anonymous_6) -FNDA:1,HTTPSTransport -DA:3,1 -DA:4,1 -DA:6,1 -DA:7,1 -DA:9,1 -DA:11,1 -DA:12,1 -DA:13,1 -DA:14,1 -DA:16,1 -DA:17,1 -DA:18,22 -DA:26,22 -DA:27,0 -DA:28,0 -DA:31,22 -DA:32,21 -DA:33,21 -DA:34,18 -DA:35,18 -DA:37,3 -DA:38,3 -DA:39,3 -DA:40,3 -DA:41,3 -DA:42,3 -DA:43,3 -DA:44,3 -DA:45,3 -DA:46,3 -DA:49,21 -DA:50,21 -DA:51,21 -DA:54,22 -DA:55,22 -DA:56,1 -DA:57,1 -DA:58,1 -DA:59,1 -DA:62,22 -DA:65,1 -DA:67,1 -DA:68,1 -DA:69,1 -DA:70,1 -DA:72,1 -DA:74,1 -DA:75,1 -DA:76,1 -DA:77,1 -DA:78,1 -LF:51 -LH:49 -BRDA:14,1,0,1 -BRDA:14,1,1,1 -BRDA:23,2,0,22 -BRDA:23,2,1,0 -BRDA:27,3,0,0 -BRDA:27,3,1,0 -BRDA:33,4,0,18 -BRDA:33,4,1,3 -BRDA:33,5,0,21 -BRDA:33,5,1,21 -BRDA:35,6,0,18 -BRDA:35,6,1,3 -BRDA:46,7,0,3 -BRDA:46,7,1,0 -BRDA:57,8,0,1 -BRDA:57,8,1,0 -BRDA:58,9,0,1 -BRDA:58,9,1,1 -BRDA:70,10,0,1 -BRDA:70,10,1,1 -BRF:20 -BRH:15 -end_of_record -TN: -SF:/Users/lewis/dev/raven-node/lib/middleware/connect.js -FN:6,(anonymous_1) -FN:12,(anonymous_2) -FN:19,(anonymous_3) -FNF:3 -FNH:0 -FNDA:0,(anonymous_1) -FNDA:0,(anonymous_2) -FNDA:0,(anonymous_3) -DA:3,1 -DA:6,1 -DA:7,0 -DA:12,1 -DA:13,0 -DA:14,0 -DA:19,1 -DA:20,0 -DA:21,0 -DA:24,1 -LF:10 -LH:5 -BRDA:13,1,0,0 -BRDA:13,1,1,0 -BRDA:20,2,0,0 -BRDA:20,2,1,0 -BRF:4 -BRH:0 -end_of_record diff --git a/node_modules/homey-log/node_modules/raven/docs/coffeescript.rst b/node_modules/homey-log/node_modules/raven/docs/coffeescript.rst deleted file mode 100644 index 9190999..0000000 --- a/node_modules/homey-log/node_modules/raven/docs/coffeescript.rst +++ /dev/null @@ -1,24 +0,0 @@ -CoffeeScript -============ - -In order to use raven-node with coffee-script or another library which overwrites -Error.prepareStackTrace you might run into the exception "Traceback does not -support Error.prepareStackTrace being defined already." - -In order to not have raven-node (and the underlying raw-stacktrace library) require -Traceback you can pass your own stackFunction in the options. For example: - -.. code-block:: coffeescript - - client = new raven.Client('___DSN___', { - stackFunction: {{ Your stack function }} - }); - - -So for example: - -.. code-block:: coffeescript - - client = new raven.Client('___DSN___', { - stackFunction: Error.prepareStackTrace - }); diff --git a/node_modules/homey-log/node_modules/raven/docs/conf.py b/node_modules/homey-log/node_modules/raven/docs/conf.py deleted file mode 100644 index a38571e..0000000 --- a/node_modules/homey-log/node_modules/raven/docs/conf.py +++ /dev/null @@ -1,249 +0,0 @@ -# -*- coding: utf-8 -*- -# -# raven-node documentation build configuration file, created by -# sphinx-quickstart on Mon Jan 21 21:04:27 2013. -# -# This file is execfile()d with the current directory set to its containing dir. -# -# Note that not all possible configuration values are present in this -# autogenerated file. -# -# All configuration values have a default; values that are commented out -# serve to show the default. - -import sys, os, datetime - -# If extensions (or modules to document with autodoc) are in another directory, -# add these directories to sys.path here. If the directory is relative to the -# documentation root, use os.path.abspath to make it absolute, like shown here. -#sys.path.insert(0, os.path.abspath('.')) - -# -- General configuration ----------------------------------------------------- - -# If your documentation needs a minimal Sphinx version, state it here. -#needs_sphinx = '1.0' - -# Add any Sphinx extension module names here, as strings. They can be extensions -# coming with Sphinx (named 'sphinx.ext.*') or your custom ones. -extensions = [] - -# Add any paths that contain templates here, relative to this directory. -templates_path = ['_templates'] - -# The suffix of source filenames. -source_suffix = '.rst' - -# The encoding of source files. -#source_encoding = 'utf-8-sig' - -# The master toctree document. -master_doc = 'index' - -# General information about the project. -project = u'raven-node' -copyright = u'%s, Sentry' % datetime.date.today().year - -# The version info for the project you're documenting, acts as replacement for -# |version| and |release|, also used in various other places throughout the -# built documents. -# - -import json -# The full version, including alpha/beta/rc tags. -release = json.load(open('../package.json'))['version'] -# The short X.Y version. -version = release.rsplit('.', 1)[0] - -# The language for content autogenerated by Sphinx. Refer to documentation -# for a list of supported languages. -#language = None - -# There are two options for replacing |today|: either, you set today to some -# non-false value, then it is used: -#today = '' -# Else, today_fmt is used as the format for a strftime call. -#today_fmt = '%B %d, %Y' - -# List of patterns, relative to source directory, that match files and -# directories to ignore when looking for source files. -exclude_patterns = ['_build'] - -# The reST default role (used for this markup: `text`) to use for all documents. -#default_role = None - -# If true, '()' will be appended to :func: etc. cross-reference text. -#add_function_parentheses = True - -# If true, the current module name will be prepended to all description -# unit titles (such as .. function::). -#add_module_names = True - -# If true, sectionauthor and moduleauthor directives will be shown in the -# output. They are ignored by default. -#show_authors = False - -# The name of the Pygments (syntax highlighting) style to use. -pygments_style = 'sphinx' - -# A list of ignored prefixes for module index sorting. -#modindex_common_prefix = [] - - -# -- Options for HTML output --------------------------------------------------- - -# The theme to use for HTML and HTML Help pages. See the documentation for -# a list of builtin themes. -html_theme = 'default' - -# Theme options are theme-specific and customize the look and feel of a theme -# further. For a list of options available for each theme, see the -# documentation. -#html_theme_options = {} - -# Add any paths that contain custom themes here, relative to this directory. -#html_theme_path = [] - -# The name for this set of Sphinx documents. If None, it defaults to -# " v documentation". -#html_title = None - -# A shorter title for the navigation bar. Default is the same as html_title. -#html_short_title = None - -# The name of an image file (relative to this directory) to place at the top -# of the sidebar. -#html_logo = None - -# The name of an image file (within the static path) to use as favicon of the -# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32 -# pixels large. -#html_favicon = None - -# Add any paths that contain custom static files (such as style sheets) here, -# relative to this directory. They are copied after the builtin static files, -# so a file named "default.css" will overwrite the builtin "default.css". -html_static_path = ['_static'] - -# If not '', a 'Last updated on:' timestamp is inserted at every page bottom, -# using the given strftime format. -#html_last_updated_fmt = '%b %d, %Y' - -# If true, SmartyPants will be used to convert quotes and dashes to -# typographically correct entities. -#html_use_smartypants = True - -# Custom sidebar templates, maps document names to template names. -#html_sidebars = {} - -# Additional templates that should be rendered to pages, maps page names to -# template names. -#html_additional_pages = {} - -# If false, no module index is generated. -#html_domain_indices = True - -# If false, no index is generated. -#html_use_index = True - -# If true, the index is split into individual pages for each letter. -#html_split_index = False - -# If true, links to the reST sources are added to the pages. -#html_show_sourcelink = True - -# If true, "Created using Sphinx" is shown in the HTML footer. Default is True. -#html_show_sphinx = True - -# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True. -#html_show_copyright = True - -# If true, an OpenSearch description file will be output, and all pages will -# contain a tag referring to it. The value of this option must be the -# base URL from which the finished HTML is served. -#html_use_opensearch = '' - -# This is the file name suffix for HTML files (e.g. ".xhtml"). -#html_file_suffix = None - -# Output file base name for HTML help builder. -htmlhelp_basename = 'raven-nodedoc' - - -# -- Options for LaTeX output -------------------------------------------------- - -latex_elements = { -# The paper size ('letterpaper' or 'a4paper'). -#'papersize': 'letterpaper', - -# The font size ('10pt', '11pt' or '12pt'). -#'pointsize': '10pt', - -# Additional stuff for the LaTeX preamble. -#'preamble': '', -} - -# Grouping the document tree into LaTeX files. List of tuples -# (source start file, target name, title, author, documentclass [howto/manual]). -latex_documents = [ - ('index', 'raven-node.tex', u'raven-node Documentation', - u'Matt Robenolt', 'manual'), -] - -# The name of an image file (relative to this directory) to place at the top of -# the title page. -#latex_logo = None - -# For "manual" documents, if this is true, then toplevel headings are parts, -# not chapters. -#latex_use_parts = False - -# If true, show page references after internal links. -#latex_show_pagerefs = False - -# If true, show URL addresses after external links. -#latex_show_urls = False - -# Documents to append as an appendix to all manuals. -#latex_appendices = [] - -# If false, no module index is generated. -#latex_domain_indices = True - - -# -- Options for manual page output -------------------------------------------- - -# One entry per manual page. List of tuples -# (source start file, name, description, authors, manual section). -man_pages = [ - ('index', 'raven-node', u'raven-node Documentation', - [u'Sentry'], 1) -] - -# If true, show URL addresses after external links. -#man_show_urls = False - - -# -- Options for Texinfo output ------------------------------------------------ - -# Grouping the document tree into Texinfo files. List of tuples -# (source start file, target name, title, author, -# dir menu entry, description, category) -texinfo_documents = [ - ('index', 'raven-node', u'raven-node Documentation', - u'Sentry', 'raven-node', 'One line description of project.', - 'Miscellaneous'), -] - -# Documents to append as an appendix to all manuals. -#texinfo_appendices = [] - -# If false, no module index is generated. -#texinfo_domain_indices = True - -# How to display URL addresses: 'footnote', 'no', or 'inline'. -#texinfo_show_urls = 'footnote' - -if os.environ.get('SENTRY_FEDERATED_DOCS') != '1': - sys.path.insert(0, os.path.abspath('_sentryext')) - import sentryext - sentryext.activate() diff --git a/node_modules/homey-log/node_modules/raven/docs/config.rst b/node_modules/homey-log/node_modules/raven/docs/config.rst deleted file mode 100644 index 0bfd274..0000000 --- a/node_modules/homey-log/node_modules/raven/docs/config.rst +++ /dev/null @@ -1,117 +0,0 @@ -Configuration -============= - -Configuration is passed as the second argument of the ``raven.Client`` constructor: - -.. code-block:: javascript - - var raven = require("raven"); - - new raven.Client(String dsn[, Object options]) - -Optional settings ------------------ - -.. describe:: logger - - The name of the logger used by Sentry. Default: ``''`` - - .. code-block:: javascript - - { - logger: 'default' - } - -.. describe:: release - - Track the version of your application in Sentry. - - .. code-block:: javascript - - { - release: '721e41770371db95eee98ca2707686226b993eda' - } - -.. describe:: environment - - Track the environment name inside Sentry. - - .. code-block:: javascript - - { - environment: 'staging' - } - -.. describe:: tags - - Additional tags to assign to each event. - - .. code-block:: javascript - - { - tags: {git_commit: 'c0deb10c4'} - } - -.. describe:: extra - - Arbitrary data to associate with the event. - - .. code-block:: javascript - - { - extra: {planet: {name: 'Earth'}} - } - -.. describe:: dataCallback - - A function that allows mutation of the data payload right before being - sent to Sentry. - - .. code-block:: javascript - - { - dataCallback: function(data) { - // add a user context - data.user = { - id: 1337, - name: 'janedoe', - email: 'janedoe@example.com' - }; - return data; - } - } - -.. describe:: transport - - Override the default HTTP data transport handler. - - .. code-block:: javascript - - { - transport: function (options) { - // send data - } - } - - Please see the raven-node source code to see `how transports are implemented - `__. - -Environment Variables ---------------------- - -.. describe:: SENTRY_DSN - - Optionally declare the DSN to use for the client through the environment. Initializing the client in your app won't require setting the DSN. - -.. describe:: SENTRY_NAME - - Optionally set the name for the client to use. `What is name? - `__ - -.. describe:: SENTRY_RELEASE - - Optionally set the application release version for the client to use, this is usually a Git SHA hash. - -.. describe:: SENTRY_ENVIRONMENT - - Optionally set the environment name, e.g. "staging", "production". diff --git a/node_modules/homey-log/node_modules/raven/docs/index.rst b/node_modules/homey-log/node_modules/raven/docs/index.rst deleted file mode 100644 index 1541afd..0000000 --- a/node_modules/homey-log/node_modules/raven/docs/index.rst +++ /dev/null @@ -1,109 +0,0 @@ -.. sentry:edition:: self - - raven-node - ========== - -.. sentry:edition:: hosted, on-premise - - .. class:: platform-node - - Node.js - ======= - -raven-node is a Sentry's officially supported Node.js SDK. - -**Note**: If you're using JavaScript in the browser, you'll need -`raven-js `_. - -Installation ------------- - -Raven is distributed via ``npm``: - -.. code-block:: bash - - $ npm install raven --save - -Configuring the Client ----------------------- - -Next you need to initialize the Raven client and configure it to use your `Sentry DSN -`_: - -.. code-block:: javascript - - var raven = require('raven'); - var client = new raven.Client('___DSN___'); - -You can optionally pass an object of configuration options as the 2nd argument to `Client`. For -more information, see :doc:`config`. - -Reporting Errors ----------------- - -To get started passing errors to Raven, it is recommended to initialize Raven's global error handler using -``patchGlobal``. This will cause any uncaught exception which would bubble up to the Node runtime to be -captured and processed by Raven. - -.. code-block:: javascript - - client.patchGlobal(); - -Additionally, you can manually capture and report potentially problematic code with ``try...catch`` and - ``captureException``: - -.. code-block:: javascript - - try { - doSomething(a[0]) - } catch(e) { - client.captureException(e) - } - -The ``captureException`` method optionally takes an object of configuration options as the 2nd argument. For more information, and to learn about other methods provided by the Raven API, see :doc:`usage`. - -Adding Context --------------- - -While a user is logged in, you can tell Sentry to associate errors with -user data. This data is then submitted with each error which allows you -to figure out which users are affected. - -.. code-block:: javascript - - client.setUserContext({ - email: 'matt@example.com', - id: '123' - }) - -If at any point, the user becomes unauthenticated, you can call -``client.setUserContext()`` with no arguments to remove their data. - -Other similar methods are ``client.setExtraContext`` and -``client.setTagsContext``. See :ref:`raven-node-additional-context` for more info. - -Middleware and Integrations ---------------------------- - -If you're using Node.js with a web server framework/library like Connect, Express, or Koa, it is recommended -to configure one of Raven's server middleware integrations. See doc:`integrations/index`. - -Deep Dive ---------- - -For more detailed information about how to get most out of Raven.js there -is additional documentation available that covers all the rest: - -.. toctree:: - :maxdepth: 2 - :titlesonly: - - config - usage - integrations/index - coffeescript - -Resources: - -* `Bug Tracker `_ -* `Github Project `_ diff --git a/node_modules/homey-log/node_modules/raven/docs/integrations/connect.rst b/node_modules/homey-log/node_modules/raven/docs/integrations/connect.rst deleted file mode 100644 index cda7563..0000000 --- a/node_modules/homey-log/node_modules/raven/docs/integrations/connect.rst +++ /dev/null @@ -1,33 +0,0 @@ -Connect -======= - -.. code-block:: javascript - - var connect = require('connect'); - var raven = require('raven'); - - function mainHandler(req, res) { - throw new Error('Broke!'); - } - - function onError(err, req, res, next) { - // The error id is attached to `res.sentry` to be returned - // and optionally displayed to the user for support. - res.statusCode = 500; - res.end(res.sentry+'\n'); - } - - connect( - // The request handler be the first item - raven.middleware.connect.requestHandler('___DSN___'), - - connect.bodyParser(), - connect.cookieParser(), - mainHandler, - - // The error handler must be before any other error middleware - raven.middleware.connect.errorHandler('___DSN___'), - - // Optional fallthrough error handler - onError, - ).listen(3000); diff --git a/node_modules/homey-log/node_modules/raven/docs/integrations/express.rst b/node_modules/homey-log/node_modules/raven/docs/integrations/express.rst deleted file mode 100644 index e5abc0a..0000000 --- a/node_modules/homey-log/node_modules/raven/docs/integrations/express.rst +++ /dev/null @@ -1,29 +0,0 @@ -Express -======= - -.. code-block:: javascript - - var app = require('express')(); - var raven = require('raven'); - - function onError(err, req, res, next) { - // The error id is attached to `res.sentry` to be returned - // and optionally displayed to the user for support. - res.statusCode = 500; - res.end(res.sentry+'\n'); - } - - // The request handler must be the first item - app.use(raven.middleware.express.requestHandler('{{ SENTRY_DSN }}')); - - app.get('/', function mainHandler(req, res) { - throw new Error('Broke!'); - }); - - // The error handler must be before any other error middleware - app.use(raven.middleware.express.errorHandler('{{ SENTRY_DSN }}')); - - // Optional fallthrough error handler - app.use(onError); - - app.listen(3000); diff --git a/node_modules/homey-log/node_modules/raven/docs/integrations/index.rst b/node_modules/homey-log/node_modules/raven/docs/integrations/index.rst deleted file mode 100644 index b2fcb57..0000000 --- a/node_modules/homey-log/node_modules/raven/docs/integrations/index.rst +++ /dev/null @@ -1,9 +0,0 @@ -Integrations -============ - -.. toctree:: - :maxdepth: 1 - - connect - express - koa diff --git a/node_modules/homey-log/node_modules/raven/docs/integrations/koa.rst b/node_modules/homey-log/node_modules/raven/docs/integrations/koa.rst deleted file mode 100644 index d7cd386..0000000 --- a/node_modules/homey-log/node_modules/raven/docs/integrations/koa.rst +++ /dev/null @@ -1,16 +0,0 @@ -Koa -=== - -.. code-block:: javascript - - var koa = require('koa'); - var raven = require('raven'); - - var app = koa(); - var sentry = new raven.Client('___DSN___'); - - app.on('error', function(err) { - sentry.captureException(err); - }); - - app.listen(3000); diff --git a/node_modules/homey-log/node_modules/raven/docs/make.bat b/node_modules/homey-log/node_modules/raven/docs/make.bat deleted file mode 100644 index 4e6d1ee..0000000 --- a/node_modules/homey-log/node_modules/raven/docs/make.bat +++ /dev/null @@ -1,190 +0,0 @@ -@ECHO OFF - -REM Command file for Sphinx documentation - -if "%SPHINXBUILD%" == "" ( - set SPHINXBUILD=sphinx-build -) -set BUILDDIR=_build -set ALLSPHINXOPTS=-d %BUILDDIR%/doctrees %SPHINXOPTS% . -set I18NSPHINXOPTS=%SPHINXOPTS% . -if NOT "%PAPER%" == "" ( - set ALLSPHINXOPTS=-D latex_paper_size=%PAPER% %ALLSPHINXOPTS% - set I18NSPHINXOPTS=-D latex_paper_size=%PAPER% %I18NSPHINXOPTS% -) - -if "%1" == "" goto help - -if "%1" == "help" ( - :help - echo.Please use `make ^` where ^ is one of - echo. html to make standalone HTML files - echo. dirhtml to make HTML files named index.html in directories - echo. singlehtml to make a single large HTML file - echo. pickle to make pickle files - echo. json to make JSON files - echo. htmlhelp to make HTML files and a HTML help project - echo. qthelp to make HTML files and a qthelp project - echo. devhelp to make HTML files and a Devhelp project - echo. epub to make an epub - echo. latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter - echo. text to make text files - echo. man to make manual pages - echo. texinfo to make Texinfo files - echo. gettext to make PO message catalogs - echo. changes to make an overview over all changed/added/deprecated items - echo. linkcheck to check all external links for integrity - echo. doctest to run all doctests embedded in the documentation if enabled - goto end -) - -if "%1" == "clean" ( - for /d %%i in (%BUILDDIR%\*) do rmdir /q /s %%i - del /q /s %BUILDDIR%\* - goto end -) - -if "%1" == "html" ( - %SPHINXBUILD% -b html %ALLSPHINXOPTS% %BUILDDIR%/html - if errorlevel 1 exit /b 1 - echo. - echo.Build finished. The HTML pages are in %BUILDDIR%/html. - goto end -) - -if "%1" == "dirhtml" ( - %SPHINXBUILD% -b dirhtml %ALLSPHINXOPTS% %BUILDDIR%/dirhtml - if errorlevel 1 exit /b 1 - echo. - echo.Build finished. The HTML pages are in %BUILDDIR%/dirhtml. - goto end -) - -if "%1" == "singlehtml" ( - %SPHINXBUILD% -b singlehtml %ALLSPHINXOPTS% %BUILDDIR%/singlehtml - if errorlevel 1 exit /b 1 - echo. - echo.Build finished. The HTML pages are in %BUILDDIR%/singlehtml. - goto end -) - -if "%1" == "pickle" ( - %SPHINXBUILD% -b pickle %ALLSPHINXOPTS% %BUILDDIR%/pickle - if errorlevel 1 exit /b 1 - echo. - echo.Build finished; now you can process the pickle files. - goto end -) - -if "%1" == "json" ( - %SPHINXBUILD% -b json %ALLSPHINXOPTS% %BUILDDIR%/json - if errorlevel 1 exit /b 1 - echo. - echo.Build finished; now you can process the JSON files. - goto end -) - -if "%1" == "htmlhelp" ( - %SPHINXBUILD% -b htmlhelp %ALLSPHINXOPTS% %BUILDDIR%/htmlhelp - if errorlevel 1 exit /b 1 - echo. - echo.Build finished; now you can run HTML Help Workshop with the ^ -.hhp project file in %BUILDDIR%/htmlhelp. - goto end -) - -if "%1" == "qthelp" ( - %SPHINXBUILD% -b qthelp %ALLSPHINXOPTS% %BUILDDIR%/qthelp - if errorlevel 1 exit /b 1 - echo. - echo.Build finished; now you can run "qcollectiongenerator" with the ^ -.qhcp project file in %BUILDDIR%/qthelp, like this: - echo.^> qcollectiongenerator %BUILDDIR%\qthelp\raven-node.qhcp - echo.To view the help file: - echo.^> assistant -collectionFile %BUILDDIR%\qthelp\raven-node.ghc - goto end -) - -if "%1" == "devhelp" ( - %SPHINXBUILD% -b devhelp %ALLSPHINXOPTS% %BUILDDIR%/devhelp - if errorlevel 1 exit /b 1 - echo. - echo.Build finished. - goto end -) - -if "%1" == "epub" ( - %SPHINXBUILD% -b epub %ALLSPHINXOPTS% %BUILDDIR%/epub - if errorlevel 1 exit /b 1 - echo. - echo.Build finished. The epub file is in %BUILDDIR%/epub. - goto end -) - -if "%1" == "latex" ( - %SPHINXBUILD% -b latex %ALLSPHINXOPTS% %BUILDDIR%/latex - if errorlevel 1 exit /b 1 - echo. - echo.Build finished; the LaTeX files are in %BUILDDIR%/latex. - goto end -) - -if "%1" == "text" ( - %SPHINXBUILD% -b text %ALLSPHINXOPTS% %BUILDDIR%/text - if errorlevel 1 exit /b 1 - echo. - echo.Build finished. The text files are in %BUILDDIR%/text. - goto end -) - -if "%1" == "man" ( - %SPHINXBUILD% -b man %ALLSPHINXOPTS% %BUILDDIR%/man - if errorlevel 1 exit /b 1 - echo. - echo.Build finished. The manual pages are in %BUILDDIR%/man. - goto end -) - -if "%1" == "texinfo" ( - %SPHINXBUILD% -b texinfo %ALLSPHINXOPTS% %BUILDDIR%/texinfo - if errorlevel 1 exit /b 1 - echo. - echo.Build finished. The Texinfo files are in %BUILDDIR%/texinfo. - goto end -) - -if "%1" == "gettext" ( - %SPHINXBUILD% -b gettext %I18NSPHINXOPTS% %BUILDDIR%/locale - if errorlevel 1 exit /b 1 - echo. - echo.Build finished. The message catalogs are in %BUILDDIR%/locale. - goto end -) - -if "%1" == "changes" ( - %SPHINXBUILD% -b changes %ALLSPHINXOPTS% %BUILDDIR%/changes - if errorlevel 1 exit /b 1 - echo. - echo.The overview file is in %BUILDDIR%/changes. - goto end -) - -if "%1" == "linkcheck" ( - %SPHINXBUILD% -b linkcheck %ALLSPHINXOPTS% %BUILDDIR%/linkcheck - if errorlevel 1 exit /b 1 - echo. - echo.Link check complete; look for any errors in the above output ^ -or in %BUILDDIR%/linkcheck/output.txt. - goto end -) - -if "%1" == "doctest" ( - %SPHINXBUILD% -b doctest %ALLSPHINXOPTS% %BUILDDIR%/doctest - if errorlevel 1 exit /b 1 - echo. - echo.Testing of doctests in the sources finished, look at the ^ -results in %BUILDDIR%/doctest/output.txt. - goto end -) - -:end diff --git a/node_modules/homey-log/node_modules/raven/docs/sentry-doc-config.json b/node_modules/homey-log/node_modules/raven/docs/sentry-doc-config.json deleted file mode 100644 index ac1c0ef..0000000 --- a/node_modules/homey-log/node_modules/raven/docs/sentry-doc-config.json +++ /dev/null @@ -1,42 +0,0 @@ -{ - "support_level": "production", - "platforms": { - "node": { - "name": "Node.js", - "type": "language", - "doc_link": "", - "wizard": [ - "index#installation", - "index#configuring-the-client", - "index#reporting-errors" - ] - }, - "node.express": { - "name": "Express", - "type": "framework", - "doc_link": "integrations/express/", - "wizard": [ - "index#installation", - "integrations/express#express" - ] - }, - "node.koa": { - "name": "Koa", - "type": "framework", - "doc_link": "integrations/koa/", - "wizard": [ - "index#installation", - "integrations/koa#koa" - ] - }, - "node.connect": { - "name": "Connect", - "type": "framework", - "doc_link": "integrations/connect/", - "wizard": [ - "index#installation", - "integrations/connect#connect" - ] - } - } -} diff --git a/node_modules/homey-log/node_modules/raven/docs/usage.rst b/node_modules/homey-log/node_modules/raven/docs/usage.rst deleted file mode 100644 index 7f33b86..0000000 --- a/node_modules/homey-log/node_modules/raven/docs/usage.rst +++ /dev/null @@ -1,201 +0,0 @@ -Usage -===== - -Capturing Errors ----------------- - -.. code-block:: javascript - - try { - doSomething(a[0]) - } catch (err) { - client.captureException(err) - } - -Capturing Messages ------------------- - -.. code-block:: javascript - - client.captureMessage('Broken!') - -.. _raven-node-additional-context: - -Optional Attributes -------------------- - -All optional attributes are passed as part of the options to ``captureException`` and ``captureMessage``. - -.. describe:: extra - - Additional context for this event. Must be a mapping. Children can be any native JSON type. - - .. code-block:: javascript - - { - extra: {'key': 'value'} - } - - You can also set extra data globally to be merged in with future events with ``setExtraContext``: - - .. code-block:: javascript - - client.setExtraContext({ foo: "bar" }) - -.. describe:: tags - - Tags to index with this event. Must be a mapping of strings. - - .. code-block:: javascript - - { - tags: {'key': 'value'} - } - - You can also set tags globally to be merged in with future exceptions events with ``setTagsContext``: - - .. code-block:: javascript - - client.setTagsContext({ key: "value" }); - -.. describe:: fingerprint - - The fingerprint for grouping this event. - - .. code-block:: javascript - - { - // dont group events from the same NODE_ENV together - fingerprint: ['{{ default }}', process.env.NODE_ENV] - } - -.. describe:: level - - The level of the event. Defaults to ``error``. - - .. code-block:: javascript - - { - level: 'warning' - } - - Sentry is aware of the following levels: - - * debug (the least serious) - * info - * warning - * error - * fatal (the most serious) - -Tracking Users --------------- - -While a user is logged in, you can tell Sentry to associate errors with -user data. - -.. code-block:: javascript - - client.setUserContext({ - email: 'matt@example.com', - id: '123' - }) - -If at any point, the user becomes unauthenticated, you can call -``client.setUserContext()`` with no arguments to remove their data. *This -would only really be useful in a large web app where the user logs in/out -without a page reload.* - -This data is generally submitted with each error or message and allows you -to figure out which errors are affected by problems. - -Event IDs ---------- - -To make referencing an event easy (both by the developer and customer), you can grab -the event ID using a callback: - - -.. code-block:: javascript - - client.captureMessage('Hello, world!', function(result) { - console.log(client.getIdent(result)); - }); - -.. code-block:: javascript - - client.captureException(new Error('Broke!'), function(result) { - console.log(client.getIdent(result)); - }); - - -.. note:: - - ``captureMessage`` will also return the result directly without the need for a callback, - such as: ``var result = client.captureMessage('Hello, world!');`` - -Global Error Handler --------------------- - -It is recommended that you install the global error handler, which will ensure any exceptions -that are unhandled will get reported: - -.. code-block:: javascript - - client.patchGlobal(); - // or - raven.patchGlobal(client); - // or - raven.patchGlobal('___DSN___'); - -Generally you don't want to leave the process running after receiving an -`uncaughtException` (http://nodejs.org/api/process.html#process_event_uncaughtexception), -so an optional callback is provided to allow you to hook in something like: - -.. code-block:: javascript - - client.patchGlobal(function() { - console.log('Bye, bye, world.'); - process.exit(1); - }); - -The callback is called **after** the event has been sent to the Sentry server. - -Events ------- - -If you really care if the event was logged or errored out, Client emits two events, `logged` and `error`: - -.. code-block:: javascript - - client.on('logged', function(){ - console.log('Yay, it worked!'); - }); - - client.on('error', function(e){ - // The event contains information about the failure: - // e.reason -- raw response body - // e.statusCode -- response status code - // e.response -- raw http response object - - console.log('uh oh, couldnt record the event'); - }) - - client.captureMessage('Boom'); - -Configuring the HTTP Transport ------------------------------- - -.. code-block:: javascript - - var client = new raven.Client('___DSN___', { - transport: new raven.transports.HTTPSTransport({rejectUnauthorized: false}) - }); - -Disable Raven -------------- - -Passing any falsey value as the DSN will disable sending events upstream: - -.. code-block:: javascript - - client = new raven.Client(process.env.NODE_ENV === 'production' && '___DSN___') diff --git a/node_modules/homey-log/node_modules/raven/index.js b/node_modules/homey-log/node_modules/raven/index.js deleted file mode 100644 index 1e9a597..0000000 --- a/node_modules/homey-log/node_modules/raven/index.js +++ /dev/null @@ -1,14 +0,0 @@ -'use strict'; - -module.exports = require('./lib/client'); -module.exports.utils = require('./lib/utils'); -module.exports.middleware = { - connect: require('./lib/middleware/connect') -}; -// friendly alias for "raven.middleware.express" -module.exports.middleware.express = module.exports.middleware.connect; -module.exports.transports = require('./lib/transports'); -module.exports.parsers = require('./lib/parsers'); - -// To infinity and beyond -Error.stackTraceLimit = Infinity; diff --git a/node_modules/homey-log/node_modules/raven/lib/client.js b/node_modules/homey-log/node_modules/raven/lib/client.js deleted file mode 100644 index 1bffb76..0000000 --- a/node_modules/homey-log/node_modules/raven/lib/client.js +++ /dev/null @@ -1,261 +0,0 @@ -'use strict'; - -var stringify = require('json-stringify-safe'); -var parsers = require('./parsers'); -var zlib = require('zlib'); -var utils = require('./utils'); -var uuid = require('uuid'); -var transports = require('./transports'); -var node_util = require('util'); // node_util to avoid confusion with "utils" -var events = require('events'); - -module.exports.version = require('../package.json').version; - -var extend = Object.assign || function(target) { - for (var i = 1; i < arguments.length; i++) { - var source = arguments[i]; - for (var key in source) { - if (Object.prototype.hasOwnProperty.call(source, key)) { - target[key] = source[key]; - } - } - } - return target; -}; - -var Client = function Client(dsn, options) { - if (arguments.length === 0) { - // no arguments, use default from environment - dsn = process.env.SENTRY_DSN; - options = {}; - } - if (typeof dsn === 'object') { - // They must only be passing through options - options = dsn; - dsn = process.env.SENTRY_DSN; - } - options = options || {}; - - this.raw_dsn = dsn; - this.dsn = utils.parseDSN(dsn); - this.name = options.name || process.env.SENTRY_NAME || require('os').hostname(); - this.root = options.root || process.cwd(); - this.transport = options.transport || transports[this.dsn.protocol]; - this.release = options.release || process.env.SENTRY_RELEASE || ''; - this.environment = options.environment || process.env.SENTRY_ENVIRONMENT || ''; - - this.loggerName = options.logger || ''; - this.dataCallback = options.dataCallback; - - if (this.dsn.protocol === 'https') { - // In case we want to provide our own SSL certificates / keys - this.ca = options.ca || null; - } - - // enabled if a dsn is set - this._enabled = !!this.dsn; - - var globalContext = this._globalContext = {}; - if (options.tags) { - globalContext.tags = options.tags; - } - if (options.extra) { - globalContext.extra = options.extra; - } - - this.on('error', function(e) {}); // noop -}; -node_util.inherits(Client, events.EventEmitter); -var proto = Client.prototype; - -module.exports.Client = Client; - -proto.getIdent = - proto.get_ident = function getIdent(result) { - return result.id; - }; - -proto.process = function process(kwargs) { - kwargs.modules = utils.getModules(); - kwargs.server_name = kwargs.server_name || this.name; - - if (typeof process.version !== 'undefined') { - kwargs.extra.node = process.version; - } - - kwargs.environment = kwargs.environment || this.environment; - kwargs.extra = extend({}, this._globalContext.extra, kwargs.extra); - kwargs.tags = extend({}, this._globalContext.tags, kwargs.tags); - - kwargs.logger = kwargs.logger || this.loggerName; - kwargs.event_id = uuid().replace(/-/g, ''); - kwargs.timestamp = new Date().toISOString().split('.')[0]; - kwargs.project = this.dsn.project_id; - kwargs.platform = 'node'; - - if (this._globalContext.user) { - kwargs.user = this._globalContext.user || kwargs.user; - } - - // Only include release information if it is set - if (this.release) { - kwargs.release = this.release; - } - - var ident = { - id: kwargs.event_id - }; - - if (this.dataCallback) { - kwargs = this.dataCallback(kwargs); - } - - // this will happen asynchronously. We don't care about it's response. - this._enabled && this.send(kwargs, ident); - - return ident; -}; - -proto.send = function send(kwargs, ident) { - var self = this; - - var skwargs = stringify(kwargs); - - zlib.deflate(skwargs, function(err, buff) { - var message = buff.toString('base64'), - timestamp = new Date().getTime(), - headers = { - 'X-Sentry-Auth': utils.getAuthHeader(timestamp, self.dsn.public_key, self.dsn.private_key), - 'Content-Type': 'application/octet-stream', - 'Content-Length': message.length - }; - - self.transport.send(self, message, headers, ident); - }); -}; - -proto.captureMessage = function captureMessage(message, kwargs, cb) { - if (!cb && typeof kwargs === 'function') { - cb = kwargs; - kwargs = {}; - } else { - kwargs = kwargs || {}; - } - var result = this.process(parsers.parseText(message, kwargs)); - cb && cb(result); - return result; -}; - -proto.captureException = function captureError(err, kwargs, cb) { - if (!(err instanceof Error)) { - // This handles when someone does: - // throw "something awesome"; - // We synthesize an Error here so we can extract a (rough) stack trace. - err = new Error(err); - } - - var self = this; - if (!cb && typeof kwargs === 'function') { - cb = kwargs; - kwargs = {}; - } else { - kwargs = kwargs || {}; - } - parsers.parseError(err, kwargs, function(kw) { - var result = self.process(kw); - cb && cb(result); - }); -}; -proto.captureError = proto.captureException; // legacy alias - -proto.captureQuery = function captureQuery(query, engine, kwargs, cb) { - if (!cb && typeof kwargs === 'function') { - cb = kwargs; - kwargs = {}; - } else { - kwargs = kwargs || {}; - } - var result = this.process(parsers.parseQuery(query, engine, kwargs)); - cb && cb(result); - return result; -}; - -/* - * Set/clear a user to be sent along with the payload. - * - * @param {object} user An object representing user data [optional] - * @return {Raven} - */ -proto.setUserContext = function setUserContext(user) { - this._globalContext.user = user; -}; - -/* - * Merge extra attributes to be sent along with the payload. - * - * @param {object} extra An object representing extra data [optional] - * @return {Raven} - */ -proto.setExtraContext = function setExtraContext(extra) { - this._globalContext.extra = extend({}, this._globalContext.extra, extra); - return this; -}; - -/* - * Merge tags to be sent along with the payload. - * - * @param {object} tags An object representing tags [optional] - * @return {Raven} - */ -proto.setTagsContext = function setTagsContext(tags) { - this._globalContext.tags = extend({}, this._globalContext.tags, tags); - return this; -}; - -proto.patchGlobal = function patchGlobal(cb) { - module.exports.patchGlobal(this, cb); - return this; -}; - -module.exports.patchGlobal = function patchGlobal(client, cb) { - // handle when the first argument is the callback, with no client specified - if (typeof client === 'function') { - cb = client; - client = new Client(); - // first argument is a string DSN - } else if (typeof client === 'string') { - client = new Client(client); - } - // at the end, if we still don't have a Client, let's make one! - !(client instanceof Client) && (client = new Client()); - - var called = false; - process.on('uncaughtException', function(err) { - if (cb) { // bind event listeners only if a callback was supplied - var onLogged = function onLogged() { - called = false; - cb(true, err); - }; - - var onError = function onError() { - called = false; - cb(false, err); - }; - - if (called) { - client.removeListener('logged', onLogged); - client.removeListener('error', onError); - return cb(false, err); - } - - client.once('logged', onLogged); - client.once('error', onError); - } - - called = true; - - client.captureError(err, function(result) { - node_util.log('uncaughtException: ' + client.getIdent(result)); - }); - }); -}; diff --git a/node_modules/homey-log/node_modules/raven/lib/middleware/connect.js b/node_modules/homey-log/node_modules/raven/lib/middleware/connect.js deleted file mode 100644 index c2a7ba0..0000000 --- a/node_modules/homey-log/node_modules/raven/lib/middleware/connect.js +++ /dev/null @@ -1,40 +0,0 @@ -'use strict'; - -var raven = require('../client'); -var parsers = require('../parsers'); - -// Legacy support -var connectMiddleware = function(client) { - return connectMiddleware.errorHandler(client); -}; - -// Error handler. This should be the last item listed in middleware, but -// before any other error handlers. -connectMiddleware.errorHandler = function(client) { - client = client instanceof raven.Client ? client : new raven.Client(client); - return function(err, req, res, next) { - var status = err.status || err.statusCode || err.status_code || 500; - - // skip anything not marked as an internal server error - if (status < 500) return next(err); - - var kwargs = parsers.parseRequest(req); - client.captureError(err, kwargs, function(result) { - res.sentry = client.getIdent(result); - next(err, req, res); - }); - }; -}; - -// Ensures asynchronous exceptions are routed to the errorHandler. This -// should be the **first** item listed in middleware. -connectMiddleware.requestHandler = function(client) { - var domain = require('domain'); - return function(req, res, next) { - var reqDomain = domain.create(); - reqDomain.on('error', next); - return reqDomain.run(next); - }; -}; - -module.exports = connectMiddleware; \ No newline at end of file diff --git a/node_modules/homey-log/node_modules/raven/lib/parsers.js b/node_modules/homey-log/node_modules/raven/lib/parsers.js deleted file mode 100644 index 444b58a..0000000 --- a/node_modules/homey-log/node_modules/raven/lib/parsers.js +++ /dev/null @@ -1,191 +0,0 @@ -'use strict'; - -var cookie = require('cookie'); -var urlParser = require('url'); -var stringify = require('json-stringify-safe'); - -var utils = require('./utils'); - -module.exports.parseText = function parseText(message, kwargs) { - kwargs = kwargs || {}; - kwargs.message = message; - - return kwargs; -}; - -module.exports.parseError = function parseError(err, kwargs, cb) { - utils.parseStack(err, function(frames) { - var name = err.name + ''; - if (typeof kwargs.message === 'undefined') { - kwargs.message = name + ': ' + (err.message || ''); - } - kwargs.exception = [{ - type: name, - value: err.message, - stacktrace: { - frames: frames - } - }]; - - // Save additional error properties to `extra` under the error type (e.g. `extra.AttributeError`) - var extraErrorProps; - for (var key in err) { - if (err.hasOwnProperty(key)) { - if (key !== 'name' && key !== 'message' && key !== 'stack') { - extraErrorProps = extraErrorProps || {}; - extraErrorProps[key] = err[key]; - } - } - } - if (extraErrorProps) { - kwargs.extra = kwargs.extra || {}; - kwargs.extra[name] = extraErrorProps; - } - - for (var n = frames.length - 1; n >= 0; n--) { - if (frames[n].in_app) { - kwargs.culprit = kwargs.culprit || utils.getCulprit(frames[n]); - break; - } - } - - cb(kwargs); - }); -}; - -module.exports.parseQuery = function parseQuery(query, engine, kwargs) { - kwargs = kwargs || {}; - kwargs.message = query; - kwargs.query = { - query: query, - engine: engine - }; - return kwargs; -}; - -module.exports.parseRequest = function parseRequest(req, kwargs) { - kwargs = kwargs || {}; - - // headers: - // - // node: req.headers - // express: req.headers - // koa: req.header - // - var headers = req.headers || req.header || {}; - - // method: - // - // node: req.method - // express: req.method - // koa: req.method - // - var method = req.method; - - // host: - // - // node: req.headers.host - // express: req.hostname in > 4 and req.host in < 4 - // koa: req.host - // - var host = req.hostname || req.host || headers.host || ''; - - // protocol: - // - // node: - // express: req.protocol - // koa: req.protocol - // - var protocol = 'https' === req.protocol || true === req.secure || true === (req.socket || {}).encrypted ? 'https' : 'http'; - - // url (including path and query string): - // - // node: req.originalUrl - // express: req.originalUrl - // koa: req.url - // - var originalUrl = req.originalUrl || req.url; - - // absolute url - var url = protocol + '://' + host + originalUrl; - - // query string - // - // node: req.url (raw) - // express: req.query - // koa: req.query - // - var query = req.query || urlParser.parse(originalUrl || '', true).query; - - // cookies: - // - // node: req.headers.cookie - // express: req.headers.cookie - // koa: req.headers.cookie - // - var cookies = cookie.parse(headers.cookie || ''); - - // body data: - // - // node: req.body - // express: req.body - // koa: req.body - // - var data = req.body; - if (['GET', 'HEAD'].indexOf(method) === -1) { - if (typeof data === 'undefined') { - data = ''; - } - } - - if (data && {}.toString.call(data) !== '[object String]') { - // Make sure the request body is a string - data = stringify(data); - } - - // client ip: - // - // node: req.connection.remoteAddress - // express: req.ip - // koa: req.ip - // - var ip = req.ip || (req.connection || {}).remoteAddress; - - // http interface - var http = { - method: method, - query_string: query, - headers: headers, - cookies: cookies, - data: data, - url: url - }; - - // expose http interface - kwargs.request = http; - - // user - // - // typically found on req.user according to Express and Passport - - var user = {}; - if (!kwargs.user) { - if (req.user) { - // shallow copy is okay because we are only modifying top-level - // object (req.user) - for (var key in req.user) { - if ({}.hasOwnProperty.call(req.user, key)) { - user[key] = req.user[key]; - } - } - } - - if (ip) { - user.ip_address = ip; - } - - kwargs.user = user; - } - - return kwargs; -}; diff --git a/node_modules/homey-log/node_modules/raven/lib/transports.js b/node_modules/homey-log/node_modules/raven/lib/transports.js deleted file mode 100644 index 5464224..0000000 --- a/node_modules/homey-log/node_modules/raven/lib/transports.js +++ /dev/null @@ -1,90 +0,0 @@ -'use strict'; - -var events = require('events'); -var util = require('util'); - -function Transport() {} -util.inherits(Transport, events.EventEmitter); - -var http = require('http'); - -function HTTPTransport(options) { - this.defaultPort = 80; - this.transport = http; - this.options = options || {}; -} -util.inherits(HTTPTransport, Transport); -HTTPTransport.prototype.send = function(client, message, headers, ident) { - var options = { - hostname: client.dsn.host, - path: client.dsn.path + 'api/' + client.dsn.project_id + '/store/', - headers: headers, - method: 'POST', - port: client.dsn.port || this.defaultPort, - ca: client.ca - }; - for (var key in this.options) { - if (this.options.hasOwnProperty(key)) { - options[key] = this.options[key]; - } - } - var req = this.transport.request(options, function(res) { - res.setEncoding('utf8'); - if (res.statusCode >= 200 && res.statusCode < 300) { - client.emit('logged', ident); - } else { - var reason = res.headers['x-sentry-error']; - var e = new Error('HTTP Error (' + res.statusCode + '): ' + reason); - e.response = res; - e.statusCode = res.statusCode; - e.reason = reason; - e.sendMessage = message; - e.requestHeaders = headers; - e.ident = ident; - client.emit('error', e); - } - // force the socket to drain - var noop = function() {}; - res.on('data', noop); - res.on('end', noop); - }); - req.on('error', function(e) { - client.emit('error', e); - }); - req.end(message); -}; - -var https = require('https'); - -function HTTPSTransport(options) { - this.defaultPort = 443; - this.transport = https; - this.options = options || {}; -} -util.inherits(HTTPSTransport, HTTPTransport); - -var dgram = require('dgram'); - -function UDPTransport() { - this.defaultPort = 12345; -} -util.inherits(UDPTransport, Transport); -UDPTransport.prototype.send = function(client, message, headers, ident) { - message = new Buffer(headers['X-Sentry-Auth'] + '\n\n' + message); - - var udp = dgram.createSocket('udp4'); - udp.send(message, 0, message.length, client.dsn.port || this.defaultPort, client.dsn.host, function(e, bytes) { - if (e) { - return client.emit('error', e); - } - client.emit('logged', ident); - udp.close(); - }); -}; - -module.exports.http = new HTTPTransport(); -module.exports.https = new HTTPSTransport(); -module.exports.udp = new UDPTransport(); -module.exports.Transport = Transport; -module.exports.HTTPTransport = HTTPTransport; -module.exports.HTTPSTransport = HTTPSTransport; \ No newline at end of file diff --git a/node_modules/homey-log/node_modules/raven/lib/utils.js b/node_modules/homey-log/node_modules/raven/lib/utils.js deleted file mode 100644 index d9cceb7..0000000 --- a/node_modules/homey-log/node_modules/raven/lib/utils.js +++ /dev/null @@ -1,183 +0,0 @@ -'use strict'; - -var raven = require('./client'); -var fs = require('fs'); -var url = require('url'); -var transports = require('./transports'); -var path = require('path'); -var lsmod = require('lsmod'); -var stacktrace = require('stack-trace'); - -var protocolMap = { - http: 80, - https: 443 -}; - -module.exports.getAuthHeader = function getAuthHeader(timestamp, api_key, api_secret) { - var header = ['Sentry sentry_version=5']; - header.push('sentry_timestamp=' + timestamp); - header.push('sentry_client=raven-node/' + raven.version); - header.push('sentry_key=' + api_key); - header.push('sentry_secret=' + api_secret); - return header.join(', '); -}; - -module.exports.parseDSN = function parseDSN(dsn) { - if (!dsn) { - // Let a falsey value return false explicitly - return false; - } - try { - var parsed = url.parse(dsn), - response = { - protocol: parsed.protocol.slice(0, -1), - public_key: parsed.auth.split(':')[0], - private_key: parsed.auth.split(':')[1], - host: parsed.host.split(':')[0] - }; - - if (~response.protocol.indexOf('+')) { - response.protocol = response.protocol.split('+')[1]; - } - - if (!transports.hasOwnProperty(response.protocol)) { - throw new Error('Invalid transport'); - } - - var index = parsed.pathname.lastIndexOf('/'); - response.path = parsed.pathname.substr(0, index + 1); - response.project_id = parsed.pathname.substr(index + 1); - response.port = ~~parsed.port || protocolMap[response.protocol] || 443; - return response; - } catch (e) { - throw new Error('Invalid Sentry DSN: ' + dsn); - } -}; - -module.exports.getCulprit = function getCulprit(frame) { - if (frame.module || frame.function) - return (frame.module || '?') + ' at ' + (frame.function || '?'); - return ''; -}; - -var module_cache; -module.exports.getModules = function getModules() { - if (module_cache) { - return module_cache; - } - - return module_cache = lsmod(); -}; - - -var LINES_OF_CONTEXT = 7; - -function getFunction(line) { - try { - return line.getFunctionName() || - line.getTypeName() + '.' + (line.getMethodName() || ''); - } catch (e) { - // This seems to happen sometimes when using 'use strict', - // stemming from `getTypeName`. - // [TypeError: Cannot read property 'constructor' of undefined] - return ''; - } -} - -var main_module = (require.main && require.main.filename && path.dirname(require.main.filename) || process.cwd()) + '/'; - -function getModule(filename, base) { - if (!base) base = main_module; - - // It's specifically a module - var file = path.basename(filename, '.js'); - filename = path.dirname(filename); - var n = filename.lastIndexOf('/node_modules/'); - if (n > -1) { - // /node_modules/ is 14 chars - return filename.substr(n + 14).replace(/\//g, '.') + ':' + file; - } - // Let's see if it's a part of the main module - // To be a part of main module, it has to share the same base - n = (filename + '/').lastIndexOf(base, 0); - if (n === 0) { - var module = filename.substr(base.length).replace(/\//g, '.'); - if (module) module += ':'; - module += file; - return module - } - return file; -} - -function parseStack(err, cb) { - var frames = [], - cache = {} - - if (!err) { - return cb(frames); - } - - var stack = stacktrace.parse(err); - - // check to make sure that the stack is what we need it to be. - if (!stack || !Array.isArray(stack) || !stack.length || !stack[0].getFileName) { - // lol, stack is fucked - return cb(frames); - } - - var callbacks = stack.length; - - // Sentry requires the stack trace to be from oldest to newest - stack.reverse(); - - stack.forEach(function(line, index) { - var frame = { - filename: line.getFileName() || '', - lineno: line.getLineNumber(), - colno: line.getColumnNumber(), - 'function': getFunction(line), - }, - isInternal = line.isNative() || - frame.filename[0] !== '/' && - frame.filename[0] !== '.'; - - // in_app is all that's not an internal Node function or a module within node_modules - frame.in_app = !isInternal && !~frame.filename.indexOf('node_modules/'); - - // Extract a module name based on the filename - if (frame.filename) frame.module = getModule(frame.filename); - - // internal Node files are not full path names. Ignore them. - if (isInternal) { - frames[index] = frame; - if (--callbacks === 0) cb(frames); - return; - } - - if (frame.filename in cache) { - parseLines(cache[frame.filename]); - if (--callbacks === 0) cb(frames); - return; - } - - fs.readFile(frame.filename, function(_err, file) { - if (!_err) { - file = file.toString().split('\n'); - cache[frame.filename] = file; - parseLines(file, frame); - } - frames[index] = frame; - if (--callbacks === 0) cb(frames); - }); - - function parseLines(lines) { - frame.pre_context = lines.slice(Math.max(0, frame.lineno - (LINES_OF_CONTEXT + 1)), frame.lineno - 1); - frame.context_line = lines[frame.lineno - 1]; - frame.post_context = lines.slice(frame.lineno, frame.lineno + LINES_OF_CONTEXT); - } - }); -} - -// expose basically for testing because I don't know what I'm doing -module.exports.parseStack = parseStack; -module.exports.getModule = getModule; diff --git a/node_modules/homey-log/node_modules/raven/node_modules/.bin/uuid b/node_modules/homey-log/node_modules/raven/node_modules/.bin/uuid deleted file mode 100644 index b3e45bc..0000000 --- a/node_modules/homey-log/node_modules/raven/node_modules/.bin/uuid +++ /dev/null @@ -1 +0,0 @@ -../uuid/bin/uuid \ No newline at end of file diff --git a/node_modules/homey-log/node_modules/raven/node_modules/cookie/HISTORY.md b/node_modules/homey-log/node_modules/raven/node_modules/cookie/HISTORY.md deleted file mode 100644 index 5bd6485..0000000 --- a/node_modules/homey-log/node_modules/raven/node_modules/cookie/HISTORY.md +++ /dev/null @@ -1,118 +0,0 @@ -0.3.1 / 2016-05-26 -================== - - * Fix `sameSite: true` to work with draft-7 clients - - `true` now sends `SameSite=Strict` instead of `SameSite` - -0.3.0 / 2016-05-26 -================== - - * Add `sameSite` option - - Replaces `firstPartyOnly` option, never implemented by browsers - * Improve error message when `encode` is not a function - * Improve error message when `expires` is not a `Date` - -0.2.4 / 2016-05-20 -================== - - * perf: enable strict mode - * perf: use for loop in parse - * perf: use string concatination for serialization - -0.2.3 / 2015-10-25 -================== - - * Fix cookie `Max-Age` to never be a floating point number - -0.2.2 / 2015-09-17 -================== - - * Fix regression when setting empty cookie value - - Ease the new restriction, which is just basic header-level validation - * Fix typo in invalid value errors - -0.2.1 / 2015-09-17 -================== - - * Throw on invalid values provided to `serialize` - - Ensures the resulting string is a valid HTTP header value - -0.2.0 / 2015-08-13 -================== - - * Add `firstPartyOnly` option - * Throw better error for invalid argument to parse - * perf: hoist regular expression - -0.1.5 / 2015-09-17 -================== - - * Fix regression when setting empty cookie value - - Ease the new restriction, which is just basic header-level validation - * Fix typo in invalid value errors - -0.1.4 / 2015-09-17 -================== - - * Throw better error for invalid argument to parse - * Throw on invalid values provided to `serialize` - - Ensures the resulting string is a valid HTTP header value - -0.1.3 / 2015-05-19 -================== - - * Reduce the scope of try-catch deopt - * Remove argument reassignments - -0.1.2 / 2014-04-16 -================== - - * Remove unnecessary files from npm package - -0.1.1 / 2014-02-23 -================== - - * Fix bad parse when cookie value contained a comma - * Fix support for `maxAge` of `0` - -0.1.0 / 2013-05-01 -================== - - * Add `decode` option - * Add `encode` option - -0.0.6 / 2013-04-08 -================== - - * Ignore cookie parts missing `=` - -0.0.5 / 2012-10-29 -================== - - * Return raw cookie value if value unescape errors - -0.0.4 / 2012-06-21 -================== - - * Use encode/decodeURIComponent for cookie encoding/decoding - - Improve server/client interoperability - -0.0.3 / 2012-06-06 -================== - - * Only escape special characters per the cookie RFC - -0.0.2 / 2012-06-01 -================== - - * Fix `maxAge` option to not throw error - -0.0.1 / 2012-05-28 -================== - - * Add more tests - -0.0.0 / 2012-05-28 -================== - - * Initial release diff --git a/node_modules/homey-log/node_modules/raven/node_modules/cookie/LICENSE b/node_modules/homey-log/node_modules/raven/node_modules/cookie/LICENSE deleted file mode 100644 index 058b6b4..0000000 --- a/node_modules/homey-log/node_modules/raven/node_modules/cookie/LICENSE +++ /dev/null @@ -1,24 +0,0 @@ -(The MIT License) - -Copyright (c) 2012-2014 Roman Shtylman -Copyright (c) 2015 Douglas Christopher Wilson - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -'Software'), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - diff --git a/node_modules/homey-log/node_modules/raven/node_modules/cookie/README.md b/node_modules/homey-log/node_modules/raven/node_modules/cookie/README.md deleted file mode 100644 index db0d078..0000000 --- a/node_modules/homey-log/node_modules/raven/node_modules/cookie/README.md +++ /dev/null @@ -1,220 +0,0 @@ -# cookie - -[![NPM Version][npm-image]][npm-url] -[![NPM Downloads][downloads-image]][downloads-url] -[![Node.js Version][node-version-image]][node-version-url] -[![Build Status][travis-image]][travis-url] -[![Test Coverage][coveralls-image]][coveralls-url] - -Basic HTTP cookie parser and serializer for HTTP servers. - -## Installation - -```sh -$ npm install cookie -``` - -## API - -```js -var cookie = require('cookie'); -``` - -### cookie.parse(str, options) - -Parse an HTTP `Cookie` header string and returning an object of all cookie name-value pairs. -The `str` argument is the string representing a `Cookie` header value and `options` is an -optional object containing additional parsing options. - -```js -var cookies = cookie.parse('foo=bar; equation=E%3Dmc%5E2'); -// { foo: 'bar', equation: 'E=mc^2' } -``` - -#### Options - -`cookie.parse` accepts these properties in the options object. - -##### decode - -Specifies a function that will be used to decode a cookie's value. Since the value of a cookie -has a limited character set (and must be a simple string), this function can be used to decode -a previously-encoded cookie value into a JavaScript string or other object. - -The default function is the global `decodeURIComponent`, which will decode any URL-encoded -sequences into their byte representations. - -**note** if an error is thrown from this function, the original, non-decoded cookie value will -be returned as the cookie's value. - -### cookie.serialize(name, value, options) - -Serialize a cookie name-value pair into a `Set-Cookie` header string. The `name` argument is the -name for the cookie, the `value` argument is the value to set the cookie to, and the `options` -argument is an optional object containing additional serialization options. - -```js -var setCookie = cookie.serialize('foo', 'bar'); -// foo=bar -``` - -#### Options - -`cookie.serialize` accepts these properties in the options object. - -##### domain - -Specifies the value for the [`Domain` `Set-Cookie` attribute][rfc-6266-5.2.3]. By default, no -domain is set, and most clients will consider the cookie to apply to only the current domain. - -##### encode - -Specifies a function that will be used to encode a cookie's value. Since value of a cookie -has a limited character set (and must be a simple string), this function can be used to encode -a value into a string suited for a cookie's value. - -The default function is the global `ecodeURIComponent`, which will encode a JavaScript string -into UTF-8 byte sequences and then URL-encode any that fall outside of the cookie range. - -##### expires - -Specifies the `Date` object to be the value for the [`Expires` `Set-Cookie` attribute][rfc-6266-5.2.1]. -By default, no expiration is set, and most clients will consider this a "non-persistent cookie" and -will delete it on a condition like exiting a web browser application. - -**note** the [cookie storage model specification][rfc-6266-5.3] states that if both `expires` and -`magAge` are set, then `maxAge` takes precedence, but it is possiblke not all clients by obey this, -so if both are set, they should point to the same date and time. - -##### httpOnly - -Specifies the `boolean` value for the [`HttpOnly` `Set-Cookie` attribute][rfc-6266-5.2.6]. When truthy, -the `HttpOnly` attribute is set, otherwise it is not. By default, the `HttpOnly` attribute is not set. - -**note** be careful when setting this to `true`, as compliant clients will not allow client-side -JavaScript to see the cookie in `document.cookie`. - -##### maxAge - -Specifies the `number` (in seconds) to be the value for the [`Max-Age` `Set-Cookie` attribute][rfc-6266-5.2.2]. -The given number will be converted to an integer by rounding down. By default, no maximum age is set. - -**note** the [cookie storage model specification][rfc-6266-5.3] states that if both `expires` and -`magAge` are set, then `maxAge` takes precedence, but it is possiblke not all clients by obey this, -so if both are set, they should point to the same date and time. - -##### path - -Specifies the value for the [`Path` `Set-Cookie` attribute][rfc-6266-5.2.4]. By default, the path -is considered the ["default path"][rfc-6266-5.1.4]. By default, no maximum age is set, and most -clients will consider this a "non-persistent cookie" and will delete it on a condition like exiting -a web browser application. - -##### sameSite - -Specifies the `boolean` or `string` to be the value for the [`SameSite` `Set-Cookie` attribute][draft-west-first-party-cookies-07]. - - - `true` will set the `SameSite` attribute to `Strict` for strict same site enforcement. - - `false` will not set the `SameSite` attribute. - - `'lax'` will set the `SameSite` attribute to `Lax` for lax same site enforcement. - - `'strict'` will set the `SameSite` attribute to `Strict` for strict same site enforcement. - -More information about the different enforcement levels can be found in the specification -https://tools.ietf.org/html/draft-west-first-party-cookies-07#section-4.1.1 - -**note** This is an attribute that has not yet been fully standardized, and may change in the future. -This also means many clients may ignore this attribute until they understand it. - -##### secure - -Specifies the `boolean` value for the [`Secure` `Set-Cookie` attribute][rfc-6266-5.2.5]. When truthy, -the `Secure` attribute is set, otherwise it is not. By default, the `Secure` attribute is not set. - -**note** be careful when setting this to `true`, as compliant clients will not send the cookie back to -the server in the future if the browser does not have an HTTPS connection. - -## Example - -The following example uses this module in conjunction with the Node.js core HTTP server -to prompt a user for their name and display it back on future visits. - -```js -var cookie = require('cookie'); -var escapeHtml = require('escape-html'); -var http = require('http'); -var url = require('url'); - -function onRequest(req, res) { - // Parse the query string - var query = url.parse(req.url, true, true).query; - - if (query && query.name) { - // Set a new cookie with the name - res.setHeader('Set-Cookie', cookie.serialize('name', String(query.name), { - httpOnly: true, - maxAge: 60 * 60 * 24 * 7 // 1 week - })); - - // Redirect back after setting cookie - res.statusCode = 302; - res.setHeader('Location', req.headers.referer || '/'); - res.end(); - return; - } - - // Parse the cookies on the request - var cookies = cookie.parse(req.headers.cookie || ''); - - // Get the visitor name set in the cookie - var name = cookies.name; - - res.setHeader('Content-Type', 'text/html; charset=UTF-8'); - - if (name) { - res.write('

Welcome back, ' + escapeHtml(name) + '!

'); - } else { - res.write('

Hello, new visitor!

'); - } - - res.write('
'); - res.write(' '); - res.end(' values - * - * @param {string} str - * @param {object} [options] - * @return {object} - * @public - */ - -function parse(str, options) { - if (typeof str !== 'string') { - throw new TypeError('argument str must be a string'); - } - - var obj = {} - var opt = options || {}; - var pairs = str.split(pairSplitRegExp); - var dec = opt.decode || decode; - - for (var i = 0; i < pairs.length; i++) { - var pair = pairs[i]; - var eq_idx = pair.indexOf('='); - - // skip things that don't look like key=value - if (eq_idx < 0) { - continue; - } - - var key = pair.substr(0, eq_idx).trim() - var val = pair.substr(++eq_idx, pair.length).trim(); - - // quoted values - if ('"' == val[0]) { - val = val.slice(1, -1); - } - - // only assign once - if (undefined == obj[key]) { - obj[key] = tryDecode(val, dec); - } - } - - return obj; -} - -/** - * Serialize data into a cookie header. - * - * Serialize the a name value pair into a cookie string suitable for - * http headers. An optional options object specified cookie parameters. - * - * serialize('foo', 'bar', { httpOnly: true }) - * => "foo=bar; httpOnly" - * - * @param {string} name - * @param {string} val - * @param {object} [options] - * @return {string} - * @public - */ - -function serialize(name, val, options) { - var opt = options || {}; - var enc = opt.encode || encode; - - if (typeof enc !== 'function') { - throw new TypeError('option encode is invalid'); - } - - if (!fieldContentRegExp.test(name)) { - throw new TypeError('argument name is invalid'); - } - - var value = enc(val); - - if (value && !fieldContentRegExp.test(value)) { - throw new TypeError('argument val is invalid'); - } - - var str = name + '=' + value; - - if (null != opt.maxAge) { - var maxAge = opt.maxAge - 0; - if (isNaN(maxAge)) throw new Error('maxAge should be a Number'); - str += '; Max-Age=' + Math.floor(maxAge); - } - - if (opt.domain) { - if (!fieldContentRegExp.test(opt.domain)) { - throw new TypeError('option domain is invalid'); - } - - str += '; Domain=' + opt.domain; - } - - if (opt.path) { - if (!fieldContentRegExp.test(opt.path)) { - throw new TypeError('option path is invalid'); - } - - str += '; Path=' + opt.path; - } - - if (opt.expires) { - if (typeof opt.expires.toUTCString !== 'function') { - throw new TypeError('option expires is invalid'); - } - - str += '; Expires=' + opt.expires.toUTCString(); - } - - if (opt.httpOnly) { - str += '; HttpOnly'; - } - - if (opt.secure) { - str += '; Secure'; - } - - if (opt.sameSite) { - var sameSite = typeof opt.sameSite === 'string' - ? opt.sameSite.toLowerCase() : opt.sameSite; - - switch (sameSite) { - case true: - str += '; SameSite=Strict'; - break; - case 'lax': - str += '; SameSite=Lax'; - break; - case 'strict': - str += '; SameSite=Strict'; - break; - default: - throw new TypeError('option sameSite is invalid'); - } - } - - return str; -} - -/** - * Try decoding a string using a decoding function. - * - * @param {string} str - * @param {function} decode - * @private - */ - -function tryDecode(str, decode) { - try { - return decode(str); - } catch (e) { - return str; - } -} diff --git a/node_modules/homey-log/node_modules/raven/node_modules/cookie/package.json b/node_modules/homey-log/node_modules/raven/node_modules/cookie/package.json deleted file mode 100644 index bb3556a..0000000 --- a/node_modules/homey-log/node_modules/raven/node_modules/cookie/package.json +++ /dev/null @@ -1,72 +0,0 @@ -{ - "name": "cookie", - "description": "HTTP server cookie parsing and serialization", - "version": "0.3.1", - "author": { - "name": "Roman Shtylman", - "email": "shtylman@gmail.com" - }, - "contributors": [ - { - "name": "Douglas Christopher Wilson", - "email": "doug@somethingdoug.com" - } - ], - "license": "MIT", - "keywords": [ - "cookie", - "cookies" - ], - "repository": { - "type": "git", - "url": "git+https://github.com/jshttp/cookie.git" - }, - "devDependencies": { - "istanbul": "0.4.3", - "mocha": "1.21.5" - }, - "files": [ - "HISTORY.md", - "LICENSE", - "README.md", - "index.js" - ], - "engines": { - "node": ">= 0.6" - }, - "scripts": { - "test": "mocha --reporter spec --bail --check-leaks test/", - "test-ci": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter spec --check-leaks test/", - "test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot --check-leaks test/" - }, - "gitHead": "e3c77d497d66c8b8d4b677b8954c1b192a09f0b3", - "bugs": { - "url": "https://github.com/jshttp/cookie/issues" - }, - "homepage": "https://github.com/jshttp/cookie", - "_id": "cookie@0.3.1", - "_shasum": "e7e0a1f9ef43b4c8ba925c5c5a96e806d16873bb", - "_from": "cookie@0.3.1", - "_npmVersion": "1.4.28", - "_npmUser": { - "name": "dougwilson", - "email": "doug@somethingdoug.com" - }, - "maintainers": [ - { - "name": "dougwilson", - "email": "doug@somethingdoug.com" - } - ], - "dist": { - "shasum": "e7e0a1f9ef43b4c8ba925c5c5a96e806d16873bb", - "tarball": "https://registry.npmjs.org/cookie/-/cookie-0.3.1.tgz" - }, - "_npmOperationalInternal": { - "host": "packages-12-west.internal.npmjs.com", - "tmp": "tmp/cookie-0.3.1.tgz_1464323556714_0.6435900838114321" - }, - "directories": {}, - "_resolved": "https://registry.npmjs.org/cookie/-/cookie-0.3.1.tgz", - "readme": "ERROR: No README data found!" -} diff --git a/node_modules/homey-log/node_modules/raven/node_modules/json-stringify-safe/.npmignore b/node_modules/homey-log/node_modules/raven/node_modules/json-stringify-safe/.npmignore deleted file mode 100644 index 17d6b36..0000000 --- a/node_modules/homey-log/node_modules/raven/node_modules/json-stringify-safe/.npmignore +++ /dev/null @@ -1 +0,0 @@ -/*.tgz diff --git a/node_modules/homey-log/node_modules/raven/node_modules/json-stringify-safe/CHANGELOG.md b/node_modules/homey-log/node_modules/raven/node_modules/json-stringify-safe/CHANGELOG.md deleted file mode 100644 index 42bcb60..0000000 --- a/node_modules/homey-log/node_modules/raven/node_modules/json-stringify-safe/CHANGELOG.md +++ /dev/null @@ -1,14 +0,0 @@ -## Unreleased -- Fixes stringify to only take ancestors into account when checking - circularity. - It previously assumed every visited object was circular which led to [false - positives][issue9]. - Uses the tiny serializer I wrote for [Must.js][must] a year and a half ago. -- Fixes calling the `replacer` function in the proper context (`thisArg`). -- Fixes calling the `cycleReplacer` function in the proper context (`thisArg`). -- Speeds serializing by a factor of - Big-O(h-my-god-it-linearly-searched-every-object) it had ever seen. Searching - only the ancestors for a circular references speeds up things considerably. - -[must]: https://github.com/moll/js-must -[issue9]: https://github.com/isaacs/json-stringify-safe/issues/9 diff --git a/node_modules/homey-log/node_modules/raven/node_modules/json-stringify-safe/LICENSE b/node_modules/homey-log/node_modules/raven/node_modules/json-stringify-safe/LICENSE deleted file mode 100644 index 19129e3..0000000 --- a/node_modules/homey-log/node_modules/raven/node_modules/json-stringify-safe/LICENSE +++ /dev/null @@ -1,15 +0,0 @@ -The ISC License - -Copyright (c) Isaac Z. Schlueter and Contributors - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR -IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/node_modules/homey-log/node_modules/raven/node_modules/json-stringify-safe/Makefile b/node_modules/homey-log/node_modules/raven/node_modules/json-stringify-safe/Makefile deleted file mode 100644 index 36088c7..0000000 --- a/node_modules/homey-log/node_modules/raven/node_modules/json-stringify-safe/Makefile +++ /dev/null @@ -1,35 +0,0 @@ -NODE_OPTS = -TEST_OPTS = - -love: - @echo "Feel like makin' love." - -test: - @node $(NODE_OPTS) ./node_modules/.bin/_mocha -R dot $(TEST_OPTS) - -spec: - @node $(NODE_OPTS) ./node_modules/.bin/_mocha -R spec $(TEST_OPTS) - -autotest: - @node $(NODE_OPTS) ./node_modules/.bin/_mocha -R dot --watch $(TEST_OPTS) - -autospec: - @node $(NODE_OPTS) ./node_modules/.bin/_mocha -R spec --watch $(TEST_OPTS) - -pack: - @file=$$(npm pack); echo "$$file"; tar tf "$$file" - -publish: - npm publish - -tag: - git tag "v$$(node -e 'console.log(require("./package").version)')" - -clean: - rm -f *.tgz - npm prune --production - -.PHONY: love -.PHONY: test spec autotest autospec -.PHONY: pack publish tag -.PHONY: clean diff --git a/node_modules/homey-log/node_modules/raven/node_modules/json-stringify-safe/README.md b/node_modules/homey-log/node_modules/raven/node_modules/json-stringify-safe/README.md deleted file mode 100644 index a11f302..0000000 --- a/node_modules/homey-log/node_modules/raven/node_modules/json-stringify-safe/README.md +++ /dev/null @@ -1,52 +0,0 @@ -# json-stringify-safe - -Like JSON.stringify, but doesn't throw on circular references. - -## Usage - -Takes the same arguments as `JSON.stringify`. - -```javascript -var stringify = require('json-stringify-safe'); -var circularObj = {}; -circularObj.circularRef = circularObj; -circularObj.list = [ circularObj, circularObj ]; -console.log(stringify(circularObj, null, 2)); -``` - -Output: - -```json -{ - "circularRef": "[Circular]", - "list": [ - "[Circular]", - "[Circular]" - ] -} -``` - -## Details - -``` -stringify(obj, serializer, indent, decycler) -``` - -The first three arguments are the same as to JSON.stringify. The last -is an argument that's only used when the object has been seen already. - -The default `decycler` function returns the string `'[Circular]'`. -If, for example, you pass in `function(k,v){}` (return nothing) then it -will prune cycles. If you pass in `function(k,v){ return {foo: 'bar'}}`, -then cyclical objects will always be represented as `{"foo":"bar"}` in -the result. - -``` -stringify.getSerialize(serializer, decycler) -``` - -Returns a serializer that can be used elsewhere. This is the actual -function that's passed to JSON.stringify. - -**Note** that the function returned from `getSerialize` is stateful for now, so -do **not** use it more than once. diff --git a/node_modules/homey-log/node_modules/raven/node_modules/json-stringify-safe/package.json b/node_modules/homey-log/node_modules/raven/node_modules/json-stringify-safe/package.json deleted file mode 100644 index 42b371f..0000000 --- a/node_modules/homey-log/node_modules/raven/node_modules/json-stringify-safe/package.json +++ /dev/null @@ -1,68 +0,0 @@ -{ - "name": "json-stringify-safe", - "version": "5.0.1", - "description": "Like JSON.stringify, but doesn't blow up on circular refs.", - "keywords": [ - "json", - "stringify", - "circular", - "safe" - ], - "homepage": "https://github.com/isaacs/json-stringify-safe", - "bugs": { - "url": "https://github.com/isaacs/json-stringify-safe/issues" - }, - "author": { - "name": "Isaac Z. Schlueter", - "email": "i@izs.me", - "url": "http://blog.izs.me" - }, - "contributors": [ - { - "name": "Andri Möll", - "email": "andri@dot.ee", - "url": "http://themoll.com" - } - ], - "license": "ISC", - "repository": { - "type": "git", - "url": "git://github.com/isaacs/json-stringify-safe.git" - }, - "main": "stringify.js", - "scripts": { - "test": "node test.js" - }, - "devDependencies": { - "mocha": ">= 2.1.0 < 3", - "must": ">= 0.12 < 0.13", - "sinon": ">= 1.12.2 < 2" - }, - "gitHead": "3890dceab3ad14f8701e38ca74f38276abc76de5", - "_id": "json-stringify-safe@5.0.1", - "_shasum": "1296a2d58fd45f19a0f6ce01d65701e2c735b6eb", - "_from": "json-stringify-safe@5.0.1", - "_npmVersion": "2.10.0", - "_nodeVersion": "2.0.1", - "_npmUser": { - "name": "isaacs", - "email": "isaacs@npmjs.com" - }, - "dist": { - "shasum": "1296a2d58fd45f19a0f6ce01d65701e2c735b6eb", - "tarball": "http://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz" - }, - "maintainers": [ - { - "name": "isaacs", - "email": "i@izs.me" - }, - { - "name": "moll", - "email": "andri@dot.ee" - } - ], - "directories": {}, - "_resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", - "readme": "ERROR: No README data found!" -} diff --git a/node_modules/homey-log/node_modules/raven/node_modules/json-stringify-safe/stringify.js b/node_modules/homey-log/node_modules/raven/node_modules/json-stringify-safe/stringify.js deleted file mode 100644 index 124a452..0000000 --- a/node_modules/homey-log/node_modules/raven/node_modules/json-stringify-safe/stringify.js +++ /dev/null @@ -1,27 +0,0 @@ -exports = module.exports = stringify -exports.getSerialize = serializer - -function stringify(obj, replacer, spaces, cycleReplacer) { - return JSON.stringify(obj, serializer(replacer, cycleReplacer), spaces) -} - -function serializer(replacer, cycleReplacer) { - var stack = [], keys = [] - - if (cycleReplacer == null) cycleReplacer = function(key, value) { - if (stack[0] === value) return "[Circular ~]" - return "[Circular ~." + keys.slice(0, stack.indexOf(value)).join(".") + "]" - } - - return function(key, value) { - if (stack.length > 0) { - var thisPos = stack.indexOf(this) - ~thisPos ? stack.splice(thisPos + 1) : stack.push(this) - ~thisPos ? keys.splice(thisPos, Infinity, key) : keys.push(key) - if (~stack.indexOf(value)) value = cycleReplacer.call(this, key, value) - } - else stack.push(value) - - return replacer == null ? value : replacer.call(this, key, value) - } -} diff --git a/node_modules/homey-log/node_modules/raven/node_modules/json-stringify-safe/test/mocha.opts b/node_modules/homey-log/node_modules/raven/node_modules/json-stringify-safe/test/mocha.opts deleted file mode 100644 index 2544e58..0000000 --- a/node_modules/homey-log/node_modules/raven/node_modules/json-stringify-safe/test/mocha.opts +++ /dev/null @@ -1,2 +0,0 @@ ---recursive ---require must diff --git a/node_modules/homey-log/node_modules/raven/node_modules/json-stringify-safe/test/stringify_test.js b/node_modules/homey-log/node_modules/raven/node_modules/json-stringify-safe/test/stringify_test.js deleted file mode 100644 index 5b32583..0000000 --- a/node_modules/homey-log/node_modules/raven/node_modules/json-stringify-safe/test/stringify_test.js +++ /dev/null @@ -1,246 +0,0 @@ -var Sinon = require("sinon") -var stringify = require("..") -function jsonify(obj) { return JSON.stringify(obj, null, 2) } - -describe("Stringify", function() { - it("must stringify circular objects", function() { - var obj = {name: "Alice"} - obj.self = obj - var json = stringify(obj, null, 2) - json.must.eql(jsonify({name: "Alice", self: "[Circular ~]"})) - }) - - it("must stringify circular objects with intermediaries", function() { - var obj = {name: "Alice"} - obj.identity = {self: obj} - var json = stringify(obj, null, 2) - json.must.eql(jsonify({name: "Alice", identity: {self: "[Circular ~]"}})) - }) - - it("must stringify circular objects deeper", function() { - var obj = {name: "Alice", child: {name: "Bob"}} - obj.child.self = obj.child - - stringify(obj, null, 2).must.eql(jsonify({ - name: "Alice", - child: {name: "Bob", self: "[Circular ~.child]"} - })) - }) - - it("must stringify circular objects deeper with intermediaries", function() { - var obj = {name: "Alice", child: {name: "Bob"}} - obj.child.identity = {self: obj.child} - - stringify(obj, null, 2).must.eql(jsonify({ - name: "Alice", - child: {name: "Bob", identity: {self: "[Circular ~.child]"}} - })) - }) - - it("must stringify circular objects in an array", function() { - var obj = {name: "Alice"} - obj.self = [obj, obj] - - stringify(obj, null, 2).must.eql(jsonify({ - name: "Alice", self: ["[Circular ~]", "[Circular ~]"] - })) - }) - - it("must stringify circular objects deeper in an array", function() { - var obj = {name: "Alice", children: [{name: "Bob"}, {name: "Eve"}]} - obj.children[0].self = obj.children[0] - obj.children[1].self = obj.children[1] - - stringify(obj, null, 2).must.eql(jsonify({ - name: "Alice", - children: [ - {name: "Bob", self: "[Circular ~.children.0]"}, - {name: "Eve", self: "[Circular ~.children.1]"} - ] - })) - }) - - it("must stringify circular arrays", function() { - var obj = [] - obj.push(obj) - obj.push(obj) - var json = stringify(obj, null, 2) - json.must.eql(jsonify(["[Circular ~]", "[Circular ~]"])) - }) - - it("must stringify circular arrays with intermediaries", function() { - var obj = [] - obj.push({name: "Alice", self: obj}) - obj.push({name: "Bob", self: obj}) - - stringify(obj, null, 2).must.eql(jsonify([ - {name: "Alice", self: "[Circular ~]"}, - {name: "Bob", self: "[Circular ~]"} - ])) - }) - - it("must stringify repeated objects in objects", function() { - var obj = {} - var alice = {name: "Alice"} - obj.alice1 = alice - obj.alice2 = alice - - stringify(obj, null, 2).must.eql(jsonify({ - alice1: {name: "Alice"}, - alice2: {name: "Alice"} - })) - }) - - it("must stringify repeated objects in arrays", function() { - var alice = {name: "Alice"} - var obj = [alice, alice] - var json = stringify(obj, null, 2) - json.must.eql(jsonify([{name: "Alice"}, {name: "Alice"}])) - }) - - it("must call given decycler and use its output", function() { - var obj = {} - obj.a = obj - obj.b = obj - - var decycle = Sinon.spy(function() { return decycle.callCount }) - var json = stringify(obj, null, 2, decycle) - json.must.eql(jsonify({a: 1, b: 2}, null, 2)) - - decycle.callCount.must.equal(2) - decycle.thisValues[0].must.equal(obj) - decycle.args[0][0].must.equal("a") - decycle.args[0][1].must.equal(obj) - decycle.thisValues[1].must.equal(obj) - decycle.args[1][0].must.equal("b") - decycle.args[1][1].must.equal(obj) - }) - - it("must call replacer and use its output", function() { - var obj = {name: "Alice", child: {name: "Bob"}} - - var replacer = Sinon.spy(bangString) - var json = stringify(obj, replacer, 2) - json.must.eql(jsonify({name: "Alice!", child: {name: "Bob!"}})) - - replacer.callCount.must.equal(4) - replacer.args[0][0].must.equal("") - replacer.args[0][1].must.equal(obj) - replacer.thisValues[1].must.equal(obj) - replacer.args[1][0].must.equal("name") - replacer.args[1][1].must.equal("Alice") - replacer.thisValues[2].must.equal(obj) - replacer.args[2][0].must.equal("child") - replacer.args[2][1].must.equal(obj.child) - replacer.thisValues[3].must.equal(obj.child) - replacer.args[3][0].must.equal("name") - replacer.args[3][1].must.equal("Bob") - }) - - it("must call replacer after describing circular references", function() { - var obj = {name: "Alice"} - obj.self = obj - - var replacer = Sinon.spy(bangString) - var json = stringify(obj, replacer, 2) - json.must.eql(jsonify({name: "Alice!", self: "[Circular ~]!"})) - - replacer.callCount.must.equal(3) - replacer.args[0][0].must.equal("") - replacer.args[0][1].must.equal(obj) - replacer.thisValues[1].must.equal(obj) - replacer.args[1][0].must.equal("name") - replacer.args[1][1].must.equal("Alice") - replacer.thisValues[2].must.equal(obj) - replacer.args[2][0].must.equal("self") - replacer.args[2][1].must.equal("[Circular ~]") - }) - - it("must call given decycler and use its output for nested objects", - function() { - var obj = {} - obj.a = obj - obj.b = {self: obj} - - var decycle = Sinon.spy(function() { return decycle.callCount }) - var json = stringify(obj, null, 2, decycle) - json.must.eql(jsonify({a: 1, b: {self: 2}})) - - decycle.callCount.must.equal(2) - decycle.args[0][0].must.equal("a") - decycle.args[0][1].must.equal(obj) - decycle.args[1][0].must.equal("self") - decycle.args[1][1].must.equal(obj) - }) - - it("must use decycler's output when it returned null", function() { - var obj = {a: "b"} - obj.self = obj - obj.selves = [obj, obj] - - function decycle() { return null } - stringify(obj, null, 2, decycle).must.eql(jsonify({ - a: "b", - self: null, - selves: [null, null] - })) - }) - - it("must use decycler's output when it returned undefined", function() { - var obj = {a: "b"} - obj.self = obj - obj.selves = [obj, obj] - - function decycle() {} - stringify(obj, null, 2, decycle).must.eql(jsonify({ - a: "b", - selves: [null, null] - })) - }) - - it("must throw given a decycler that returns a cycle", function() { - var obj = {} - obj.self = obj - var err - function identity(key, value) { return value } - try { stringify(obj, null, 2, identity) } catch (ex) { err = ex } - err.must.be.an.instanceof(TypeError) - }) - - describe(".getSerialize", function() { - it("must stringify circular objects", function() { - var obj = {a: "b"} - obj.circularRef = obj - obj.list = [obj, obj] - - var json = JSON.stringify(obj, stringify.getSerialize(), 2) - json.must.eql(jsonify({ - "a": "b", - "circularRef": "[Circular ~]", - "list": ["[Circular ~]", "[Circular ~]"] - })) - }) - - // This is the behavior as of Mar 3, 2015. - // The serializer function keeps state inside the returned function and - // so far I'm not sure how to not do that. JSON.stringify's replacer is not - // called _after_ serialization. - xit("must return a function that could be called twice", function() { - var obj = {name: "Alice"} - obj.self = obj - - var json - var serializer = stringify.getSerialize() - - json = JSON.stringify(obj, serializer, 2) - json.must.eql(jsonify({name: "Alice", self: "[Circular ~]"})) - - json = JSON.stringify(obj, serializer, 2) - json.must.eql(jsonify({name: "Alice", self: "[Circular ~]"})) - }) - }) -}) - -function bangString(key, value) { - return typeof value == "string" ? value + "!" : value -} diff --git a/node_modules/homey-log/node_modules/raven/node_modules/lsmod/.npmignore b/node_modules/homey-log/node_modules/raven/node_modules/lsmod/.npmignore deleted file mode 100644 index 3c3629e..0000000 --- a/node_modules/homey-log/node_modules/raven/node_modules/lsmod/.npmignore +++ /dev/null @@ -1 +0,0 @@ -node_modules diff --git a/node_modules/homey-log/node_modules/raven/node_modules/lsmod/.travis.yml b/node_modules/homey-log/node_modules/raven/node_modules/lsmod/.travis.yml deleted file mode 100644 index 9400c11..0000000 --- a/node_modules/homey-log/node_modules/raven/node_modules/lsmod/.travis.yml +++ /dev/null @@ -1,5 +0,0 @@ -language: node_js -node_js: - - "0.6" - - "0.8" - - "0.10" diff --git a/node_modules/homey-log/node_modules/raven/node_modules/lsmod/README.md b/node_modules/homey-log/node_modules/raven/node_modules/lsmod/README.md deleted file mode 100644 index d54c5d3..0000000 --- a/node_modules/homey-log/node_modules/raven/node_modules/lsmod/README.md +++ /dev/null @@ -1,26 +0,0 @@ -# lsmod [![Build Status](https://secure.travis-ci.org/defunctzombie/node-lsmod.png?branch=master)](https://travis-ci.org/defunctzombie/node-lsmod) - -lsmod fetches the list of modules and the versions loaded by the entry file for your node.js app. - -## use - -```javascript -var lsmod = require('lsmod'); - -// get an object with module version information -var modules = lsmod(); - -// modules is an object `key:version` -{ - express: '3.0.5', - hbs: '2.0.1' -} -``` - -Note that the version is the actual installed version and not the dependency version string. - -## install via [npm](https://npmjs.org) - -``` -npm install lsmod -``` diff --git a/node_modules/homey-log/node_modules/raven/node_modules/lsmod/index.js b/node_modules/homey-log/node_modules/raven/node_modules/lsmod/index.js deleted file mode 100644 index 42a9be6..0000000 --- a/node_modules/homey-log/node_modules/raven/node_modules/lsmod/index.js +++ /dev/null @@ -1,55 +0,0 @@ -// builtin -var fs = require('fs'); -var path = require('path'); - -// node 0.6 support -fs.existsSync = fs.existsSync || path.existsSync; - -// main_paths are the paths where our mainprog will be able to load from -// we store these to avoid grabbing the modules that were loaded as a result -// of a dependency module loading its dependencies, we only care about deps our -// mainprog loads -var main_paths = require.main && require.main.paths || []; - -module.exports = function() { - var paths = Object.keys(require.cache || []); - - // module information - var infos = {}; - - // paths we have already inspected to avoid traversing again - var seen = {}; - - paths.forEach(function(p) { - var dir = p; - - (function updir() { - var orig = dir; - dir = path.dirname(orig); - - if (!dir || orig === dir || seen[orig]) { - return; - } - else if (main_paths.indexOf(dir) < 0) { - return updir(); - } - - var pkgfile = path.join(orig, 'package.json'); - var exists = fs.existsSync(pkgfile); - - seen[orig] = true; - - // travel up the tree if no package.json here - if (!exists) { - return updir(); - } - - try { - var info = JSON.parse(fs.readFileSync(pkgfile, 'utf8')); - infos[info.name] = info.version; - } catch (e) {}; - })(); - }); - - return infos; -}; diff --git a/node_modules/homey-log/node_modules/raven/node_modules/lsmod/package.json b/node_modules/homey-log/node_modules/raven/node_modules/lsmod/package.json deleted file mode 100644 index b74dd94..0000000 --- a/node_modules/homey-log/node_modules/raven/node_modules/lsmod/package.json +++ /dev/null @@ -1,56 +0,0 @@ -{ - "name": "lsmod", - "version": "1.0.0", - "description": "fetch list of modules and versions installed for the project root", - "main": "index.js", - "scripts": { - "test": "mocha --ui qunit" - }, - "repository": { - "type": "git", - "url": "git://github.com/shtylman/node-lsmod.git" - }, - "keywords": [ - "modules", - "runtime" - ], - "devDependencies": { - "mocha": "1.7.4" - }, - "author": { - "name": "Roman Shtylman", - "email": "shtylman@gmail.com" - }, - "license": "MIT", - "gitHead": "2348f08779ffc6c4f4da09e115d7cba824d559df", - "bugs": { - "url": "https://github.com/shtylman/node-lsmod/issues" - }, - "homepage": "https://github.com/shtylman/node-lsmod#readme", - "_id": "lsmod@1.0.0", - "_shasum": "9a00f76dca36eb23fa05350afe1b585d4299e64b", - "_from": "lsmod@1.0.0", - "_npmVersion": "3.8.6", - "_nodeVersion": "6.0.0", - "_npmUser": { - "name": "defunctzombie", - "email": "shtylman@gmail.com" - }, - "dist": { - "shasum": "9a00f76dca36eb23fa05350afe1b585d4299e64b", - "tarball": "https://registry.npmjs.org/lsmod/-/lsmod-1.0.0.tgz" - }, - "maintainers": [ - { - "name": "defunctzombie", - "email": "shtylman@gmail.com" - } - ], - "_npmOperationalInternal": { - "host": "packages-12-west.internal.npmjs.com", - "tmp": "tmp/lsmod-1.0.0.tgz_1462744301549_0.14080407982692122" - }, - "directories": {}, - "_resolved": "https://registry.npmjs.org/lsmod/-/lsmod-1.0.0.tgz", - "readme": "ERROR: No README data found!" -} diff --git a/node_modules/homey-log/node_modules/raven/node_modules/lsmod/test.js b/node_modules/homey-log/node_modules/raven/node_modules/lsmod/test.js deleted file mode 100644 index 5d7e5f3..0000000 --- a/node_modules/homey-log/node_modules/raven/node_modules/lsmod/test.js +++ /dev/null @@ -1,19 +0,0 @@ -// mocha puts itself as main, we don't want that -require.main.paths.shift(); -require.main.paths.shift(); - -var assert = require('assert'); -var lsmod = require('./'); - -test('basic', function() { - var modules = lsmod(); - - // our own module is not present because it is not in node_modules - assert.equal(modules.lsmod, undefined); - - // mocha is the only thing we have - assert.equal(modules.mocha, '1.7.4'); - - // diff is a dep of mocha and we should not get it as a result - assert.equal(modules.diff, undefined); -}); diff --git a/node_modules/homey-log/node_modules/raven/node_modules/stack-trace/.npmignore b/node_modules/homey-log/node_modules/raven/node_modules/stack-trace/.npmignore deleted file mode 100644 index b59f7e3..0000000 --- a/node_modules/homey-log/node_modules/raven/node_modules/stack-trace/.npmignore +++ /dev/null @@ -1 +0,0 @@ -test/ \ No newline at end of file diff --git a/node_modules/homey-log/node_modules/raven/node_modules/stack-trace/License b/node_modules/homey-log/node_modules/raven/node_modules/stack-trace/License deleted file mode 100644 index 11ec094..0000000 --- a/node_modules/homey-log/node_modules/raven/node_modules/stack-trace/License +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2011 Felix Geisendörfer (felix@debuggable.com) - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. diff --git a/node_modules/homey-log/node_modules/raven/node_modules/stack-trace/Makefile b/node_modules/homey-log/node_modules/raven/node_modules/stack-trace/Makefile deleted file mode 100644 index a7ce31d..0000000 --- a/node_modules/homey-log/node_modules/raven/node_modules/stack-trace/Makefile +++ /dev/null @@ -1,11 +0,0 @@ -SHELL := /bin/bash - -test: - @./test/run.js - -release: - git push - git push --tags - npm publish . - -.PHONY: test diff --git a/node_modules/homey-log/node_modules/raven/node_modules/stack-trace/Readme.md b/node_modules/homey-log/node_modules/raven/node_modules/stack-trace/Readme.md deleted file mode 100644 index fcd1b97..0000000 --- a/node_modules/homey-log/node_modules/raven/node_modules/stack-trace/Readme.md +++ /dev/null @@ -1,98 +0,0 @@ -# stack-trace - -Get v8 stack traces as an array of CallSite objects. - -## Install - -``` bash -npm install stack-trace -``` - -## Usage - -The stack-trace module makes it easy for you to capture the current stack: - -``` javascript -var stackTrace = require('stack-trace'); -var trace = stackTrace.get(); - -require('assert').strictEqual(trace[0].getFileName(), __filename); -``` - -However, sometimes you have already popped the stack you are interested in, -and all you have left is an `Error` object. This module can help: - -``` javascript -var stackTrace = require('stack-trace'); -var err = new Error('something went wrong'); -var trace = stackTrace.parse(err); - -require('assert').strictEqual(trace[0].getFileName(), __filename); -``` - -Please note that parsing the `Error#stack` property is not perfect, only -certain properties can be retrieved with it as noted in the API docs below. - -## Long stack traces - -stack-trace works great with [long-stack-traces][], when parsing an `err.stack` -that has crossed the event loop boundary, a `CallSite` object returning -`'----------------------------------------'` for `getFileName()` is created. -All other methods of the event loop boundary call site return `null`. - -[long-stack-traces]: https://github.com/tlrobinson/long-stack-traces - -## API - -### stackTrace.get([belowFn]) - -Returns an array of `CallSite` objects, where element `0` is the current call -site. - -When passing a function on the current stack as the `belowFn` parameter, the -returned array will only include `CallSite` objects below this function. - -### stackTrace.parse(err) - -Parses the `err.stack` property of an `Error` object into an array compatible -with those returned by `stackTrace.get()`. However, only the following methods -are implemented on the returned `CallSite` objects. - -* getTypeName -* getFunctionName -* getMethodName -* getFileName -* getLineNumber -* getColumnNumber -* isNative - -Note: Except `getFunctionName()`, all of the above methods return exactly the -same values as you would get from `stackTrace.get()`. `getFunctionName()` -is sometimes a little different, but still useful. - -### CallSite - -The official v8 CallSite object API can be found [here][v8stackapi]. A quick -excerpt: - -> A CallSite object defines the following methods: -> -> * **getThis**: returns the value of this -> * **getTypeName**: returns the type of this as a string. This is the name of the function stored in the constructor field of this, if available, otherwise the object's [[Class]] internal property. -> * **getFunction**: returns the current function -> * **getFunctionName**: returns the name of the current function, typically its name property. If a name property is not available an attempt will be made to try to infer a name from the function's context. -> * **getMethodName**: returns the name of the property of this or one of its prototypes that holds the current function -> * **getFileName**: if this function was defined in a script returns the name of the script -> * **getLineNumber**: if this function was defined in a script returns the current line number -> * **getColumnNumber**: if this function was defined in a script returns the current column number -> * **getEvalOrigin**: if this function was created using a call to eval returns a CallSite object representing the location where eval was called -> * **isToplevel**: is this a toplevel invocation, that is, is this the global object? -> * **isEval**: does this call take place in code defined by a call to eval? -> * **isNative**: is this call in native V8 code? -> * **isConstructor**: is this a constructor call? - -[v8stackapi]: http://code.google.com/p/v8/wiki/JavaScriptStackTraceApi - -## License - -stack-trace is licensed under the MIT license. diff --git a/node_modules/homey-log/node_modules/raven/node_modules/stack-trace/lib/stack-trace.js b/node_modules/homey-log/node_modules/raven/node_modules/stack-trace/lib/stack-trace.js deleted file mode 100644 index a7c38aa..0000000 --- a/node_modules/homey-log/node_modules/raven/node_modules/stack-trace/lib/stack-trace.js +++ /dev/null @@ -1,111 +0,0 @@ -exports.get = function(belowFn) { - var oldLimit = Error.stackTraceLimit; - Error.stackTraceLimit = Infinity; - - var dummyObject = {}; - - var v8Handler = Error.prepareStackTrace; - Error.prepareStackTrace = function(dummyObject, v8StackTrace) { - return v8StackTrace; - }; - Error.captureStackTrace(dummyObject, belowFn || exports.get); - - var v8StackTrace = dummyObject.stack; - Error.prepareStackTrace = v8Handler; - Error.stackTraceLimit = oldLimit; - - return v8StackTrace; -}; - -exports.parse = function(err) { - if (!err.stack) { - return []; - } - - var self = this; - var lines = err.stack.split('\n').slice(1); - - return lines - .map(function(line) { - if (line.match(/^\s*[-]{4,}$/)) { - return self._createParsedCallSite({ - fileName: line, - lineNumber: null, - functionName: null, - typeName: null, - methodName: null, - columnNumber: null, - 'native': null, - }); - } - - var lineMatch = line.match(/at (?:(.+)\s+)?\(?(?:(.+?):(\d+):(\d+)|([^)]+))\)?/); - if (!lineMatch) { - return; - } - - var object = null; - var method = null; - var functionName = null; - var typeName = null; - var methodName = null; - var isNative = (lineMatch[5] === 'native'); - - if (lineMatch[1]) { - var methodMatch = lineMatch[1].match(/([^\.]+)(?:\.(.+))?/); - object = methodMatch[1]; - method = methodMatch[2]; - functionName = lineMatch[1]; - typeName = 'Object'; - } - - if (method) { - typeName = object; - methodName = method; - } - - if (method === '') { - methodName = null; - functionName = ''; - } - - var properties = { - fileName: lineMatch[2] || null, - lineNumber: parseInt(lineMatch[3], 10) || null, - functionName: functionName, - typeName: typeName, - methodName: methodName, - columnNumber: parseInt(lineMatch[4], 10) || null, - 'native': isNative, - }; - - return self._createParsedCallSite(properties); - }) - .filter(function(callSite) { - return !!callSite; - }); -}; - -exports._createParsedCallSite = function(properties) { - var methods = {}; - for (var property in properties) { - var prefix = 'get'; - if (property === 'native') { - prefix = 'is'; - } - var method = prefix + property.substr(0, 1).toUpperCase() + property.substr(1); - - (function(property) { - methods[method] = function() { - return properties[property]; - } - })(property); - } - - var callSite = Object.create(methods); - for (var property in properties) { - callSite[property] = properties[property]; - } - - return callSite; -}; diff --git a/node_modules/homey-log/node_modules/raven/node_modules/stack-trace/package.json b/node_modules/homey-log/node_modules/raven/node_modules/stack-trace/package.json deleted file mode 100644 index da3503c..0000000 --- a/node_modules/homey-log/node_modules/raven/node_modules/stack-trace/package.json +++ /dev/null @@ -1,56 +0,0 @@ -{ - "author": { - "name": "Felix Geisendörfer", - "email": "felix@debuggable.com", - "url": "http://debuggable.com/" - }, - "name": "stack-trace", - "description": "Get v8 stack traces as an array of CallSite objects.", - "version": "0.0.9", - "homepage": "https://github.com/felixge/node-stack-trace", - "repository": { - "type": "git", - "url": "git://github.com/felixge/node-stack-trace.git" - }, - "main": "./lib/stack-trace", - "engines": { - "node": "*" - }, - "dependencies": {}, - "devDependencies": { - "far": "0.0.3", - "long-stack-traces": "0.1.2" - }, - "bugs": { - "url": "https://github.com/felixge/node-stack-trace/issues" - }, - "_id": "stack-trace@0.0.9", - "dist": { - "shasum": "a8f6eaeca90674c333e7c43953f275b451510695", - "tarball": "https://registry.npmjs.org/stack-trace/-/stack-trace-0.0.9.tgz" - }, - "_from": "stack-trace@0.0.9", - "_npmVersion": "1.3.24", - "_npmUser": { - "name": "sebastianhoitz", - "email": "hoitz@komola.de" - }, - "maintainers": [ - { - "name": "felixge", - "email": "felix@debuggable.com" - }, - { - "name": "tim-smart", - "email": "tim@fostle.com" - }, - { - "name": "sebastianhoitz", - "email": "hoitz@komola.de" - } - ], - "directories": {}, - "_shasum": "a8f6eaeca90674c333e7c43953f275b451510695", - "_resolved": "https://registry.npmjs.org/stack-trace/-/stack-trace-0.0.9.tgz", - "readme": "ERROR: No README data found!" -} diff --git a/node_modules/homey-log/node_modules/raven/node_modules/uuid/.npmignore b/node_modules/homey-log/node_modules/raven/node_modules/uuid/.npmignore deleted file mode 100644 index fd4f2b0..0000000 --- a/node_modules/homey-log/node_modules/raven/node_modules/uuid/.npmignore +++ /dev/null @@ -1,2 +0,0 @@ -node_modules -.DS_Store diff --git a/node_modules/homey-log/node_modules/raven/node_modules/uuid/.travis.yml b/node_modules/homey-log/node_modules/raven/node_modules/uuid/.travis.yml deleted file mode 100644 index d1b90db..0000000 --- a/node_modules/homey-log/node_modules/raven/node_modules/uuid/.travis.yml +++ /dev/null @@ -1,4 +0,0 @@ -language: node_js -node_js: - - "4" - - "6" diff --git a/node_modules/homey-log/node_modules/raven/node_modules/uuid/AUTHORS b/node_modules/homey-log/node_modules/raven/node_modules/uuid/AUTHORS deleted file mode 100644 index 5a10523..0000000 --- a/node_modules/homey-log/node_modules/raven/node_modules/uuid/AUTHORS +++ /dev/null @@ -1,5 +0,0 @@ -Robert Kieffer -Christoph Tavan -AJ ONeal -Vincent Voyer -Roman Shtylman diff --git a/node_modules/homey-log/node_modules/raven/node_modules/uuid/HISTORY.md b/node_modules/homey-log/node_modules/raven/node_modules/uuid/HISTORY.md deleted file mode 100644 index 716a039..0000000 --- a/node_modules/homey-log/node_modules/raven/node_modules/uuid/HISTORY.md +++ /dev/null @@ -1,24 +0,0 @@ -# 3.0.0 (2016-11-17) - - * remove .parse and .unparse - -# 2.0.0 - - * Removed uuid.BufferClass - -# 1.4.0 - - * Improved module context detection - * Removed public RNG functions - -# 1.3.2 - - * Improve tests and handling of v1() options (Issue #24) - * Expose RNG option to allow for perf testing with different generators - -# 1.3.0 - - * Support for version 1 ids, thanks to [@ctavan](https://github.com/ctavan)! - * Support for node.js crypto API - * De-emphasizing performance in favor of a) cryptographic quality PRNGs where available and b) more manageable code - diff --git a/node_modules/homey-log/node_modules/raven/node_modules/uuid/LICENSE.md b/node_modules/homey-log/node_modules/raven/node_modules/uuid/LICENSE.md deleted file mode 100644 index 652609b..0000000 --- a/node_modules/homey-log/node_modules/raven/node_modules/uuid/LICENSE.md +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2010-2012 Robert Kieffer - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/node_modules/homey-log/node_modules/raven/node_modules/uuid/README.md b/node_modules/homey-log/node_modules/raven/node_modules/uuid/README.md deleted file mode 100644 index def14ba..0000000 --- a/node_modules/homey-log/node_modules/raven/node_modules/uuid/README.md +++ /dev/null @@ -1,130 +0,0 @@ -# uuid [![Build Status](https://secure.travis-ci.org/kelektiv/node-uuid.svg?branch=master)](http://travis-ci.org/kelektiv/node-uuid) # - -Simple, fast generation of [RFC4122](http://www.ietf.org/rfc/rfc4122.txt) UUIDS. - -Features: - -* Generate RFC4122 version 1 or version 4 UUIDs -* Runs in node.js and browsers -* Cryptographically strong random number generation on supporting platforms -* Small footprint (Want something smaller? [Check this out](https://gist.github.com/982883) out!) - -## Quickstart - nodejs - -```shell -npm install uuid -``` - -```javascript -const uuid = require('uuid'); - -// Generate a v4 (random) id -uuid() // -> '110ec58a-a0f2-4ac4-8393-c866d813b8d1' - -// Generate a v1 (time-based) id -uuid.v1(); // -> '6c84fb90-12c4-11e1-840d-7b25c5ee775a' -``` - -## Quickstart - browser - -** Not recommende for production or even semi-production use. Use a bundling tool instead (i.e. webpack, browserify, rollup, etc)** - -[wzrd.in](https://github.com/jfhbrook/wzrd.in) will serve up any npm module after performing basic bundling and minification. - -```html - -``` - -## API - -### uuid(...) - -Generate a V4 uuid. See uuid.v4 documentation below. - -### uuid.v1([`options` [, `buffer` [, `offset`]]]) - -Generate and return a RFC4122 v1 (timestamp-based) UUID. - -* `options` - (Object) Optional uuid state to apply. Properties may include: - - * `node` - (Array) Node id as Array of 6 bytes (per 4.1.6). Default: Randomly generated ID. See note 1. - * `clockseq` - (Number between 0 - 0x3fff) RFC clock sequence. Default: An internally maintained clockseq is used. - * `msecs` - (Number | Date) Time in milliseconds since unix Epoch. Default: The current time is used. - * `nsecs` - (Number between 0-9999) additional time, in 100-nanosecond units. Ignored if `msecs` is unspecified. Default: internal uuid counter is used, as per 4.2.1.2. - -* `buffer` - (Array | Buffer) Array or buffer where UUID bytes are to be written. -* `offset` - (Number) Starting index in `buffer` at which to begin writing. - -Returns `buffer`, if specified, otherwise the string form of the UUID - -Notes: - -1. The randomly generated node id is only guaranteed to stay constant for the lifetime of the current JS runtime. (Future versions of this module may use persistent storage mechanisms to extend this guarantee.) - -Example: Generate string UUID with fully-specified options - -```javascript -uuid.v1({ - node: [0x01, 0x23, 0x45, 0x67, 0x89, 0xab], - clockseq: 0x1234, - msecs: new Date('2011-11-01').getTime(), - nsecs: 5678 -}); // -> "710b962e-041c-11e1-9234-0123456789ab" -``` - -Example: In-place generation of two binary IDs - -```javascript -// Generate two ids in an array -const arr = new Array(32); // -> [] -uuid.v1(null, arr, 0); // -> [02 a2 ce 90 14 32 11 e1 85 58 0b 48 8e 4f c1 15] -uuid.v1(null, arr, 16); // -> [02 a2 ce 90 14 32 11 e1 85 58 0b 48 8e 4f c1 15 02 a3 1c b0 14 32 11 e1 85 58 0b 48 8e 4f c1 15] - -// Optionally use uuid.unparse() to get stringify the ids -uuid.unparse(buffer); // -> '02a2ce90-1432-11e1-8558-0b488e4fc115' -uuid.unparse(buffer, 16) // -> '02a31cb0-1432-11e1-8558-0b488e4fc115' -``` - -### uuid.v4([`options` [, `buffer` [, `offset`]]]) - -Generate and return a RFC4122 v4 UUID. - -* `options` - (Object) Optional uuid state to apply. Properties may include: - - * `random` - (Number[16]) Array of 16 numbers (0-255) to use in place of randomly generated values - * `rng` - (Function) Random # generator to use. Set to one of the built-in generators - `uuid.mathRNG` (all platforms), `uuid.nodeRNG` (node.js only), `uuid.whatwgRNG` (WebKit only) - or a custom function that returns an array[16] of byte values. - -* `buffer` - (Array | Buffer) Array or buffer where UUID bytes are to be written. -* `offset` - (Number) Starting index in `buffer` at which to begin writing. - -Returns `buffer`, if specified, otherwise the string form of the UUID - -Example: Generate string UUID with fully-specified options - -```javascript -uuid.v4({ - random: [ - 0x10, 0x91, 0x56, 0xbe, 0xc4, 0xfb, 0xc1, 0xea, - 0x71, 0xb4, 0xef, 0xe1, 0x67, 0x1c, 0x58, 0x36 - ] -}); -// -> "109156be-c4fb-41ea-b1b4-efe1671c5836" -``` - -Example: Generate two IDs in a single buffer - -```javascript -const buffer = new Array(32); // (or 'new Buffer' in node.js) -uuid.v4(null, buffer, 0); -uuid.v4(null, buffer, 16); -``` - -## Testing - -``` -npm test -``` - -## Legacy node-uuid package - -The code for the legacy node-uuid package is available in the `node-uuid` branch. diff --git a/node_modules/homey-log/node_modules/raven/node_modules/uuid/bin/uuid b/node_modules/homey-log/node_modules/raven/node_modules/uuid/bin/uuid deleted file mode 100644 index f732e99..0000000 --- a/node_modules/homey-log/node_modules/raven/node_modules/uuid/bin/uuid +++ /dev/null @@ -1,26 +0,0 @@ -#!/usr/bin/env node - -var path = require('path'); -var uuid = require(path.join(__dirname, '..')); - -var arg = process.argv[2]; - -if ('--help' === arg) { - console.log('\n USAGE: uuid [version] [options]\n\n'); - console.log(' options:\n'); - console.log(' --help Display this message and exit\n'); - process.exit(0); -} - -if (null == arg) { - console.log(uuid()); - process.exit(0); -} - -if ('v1' !== arg && 'v4' !== arg) { - console.error('Version must be RFC4122 version 1 or version 4, denoted as "v1" or "v4"'); - process.exit(1); -} - -console.log(uuid[arg]()); -process.exit(0); diff --git a/node_modules/homey-log/node_modules/raven/node_modules/uuid/lib/rng-browser.js b/node_modules/homey-log/node_modules/raven/node_modules/uuid/lib/rng-browser.js deleted file mode 100644 index 82ffaf6..0000000 --- a/node_modules/homey-log/node_modules/raven/node_modules/uuid/lib/rng-browser.js +++ /dev/null @@ -1,32 +0,0 @@ - -var rng; - -var crypto = global.crypto || global.msCrypto; // for IE 11 -if (crypto && crypto.getRandomValues) { - // WHATWG crypto-based RNG - http://wiki.whatwg.org/wiki/Crypto - // Moderately fast, high quality - var _rnds8 = new Uint8Array(16); - rng = function whatwgRNG() { - crypto.getRandomValues(_rnds8); - return _rnds8; - }; -} - -if (!rng) { - // Math.random()-based (RNG) - // - // If all else fails, use Math.random(). It's fast, but is of unspecified - // quality. - var _rnds = new Array(16); - rng = function() { - for (var i = 0, r; i < 16; i++) { - if ((i & 0x03) === 0) r = Math.random() * 0x100000000; - _rnds[i] = r >>> ((i & 0x03) << 3) & 0xff; - } - - return _rnds; - }; -} - -module.exports = rng; - diff --git a/node_modules/homey-log/node_modules/raven/node_modules/uuid/lib/rng.js b/node_modules/homey-log/node_modules/raven/node_modules/uuid/lib/rng.js deleted file mode 100644 index 3977f79..0000000 --- a/node_modules/homey-log/node_modules/raven/node_modules/uuid/lib/rng.js +++ /dev/null @@ -1,4 +0,0 @@ -var rb = require('crypto').randomBytes; -module.exports = function() { - return rb(16); -}; diff --git a/node_modules/homey-log/node_modules/raven/node_modules/uuid/package.json b/node_modules/homey-log/node_modules/raven/node_modules/uuid/package.json deleted file mode 100644 index b4c0a87..0000000 --- a/node_modules/homey-log/node_modules/raven/node_modules/uuid/package.json +++ /dev/null @@ -1,93 +0,0 @@ -{ - "name": "uuid", - "version": "3.0.0", - "description": "RFC4122 (v1 and v4) generator", - "keywords": [ - "uuid", - "guid", - "rfc4122" - ], - "license": "MIT", - "main": "./uuid.js", - "bin": { - "uuid": "./bin/uuid" - }, - "devDependencies": { - "mocha": "3.1.2" - }, - "scripts": { - "test": "mocha test/test.js" - }, - "browser": { - "./lib/rng.js": "./lib/rng-browser.js" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/kelektiv/node-uuid.git" - }, - "contributors": [ - { - "name": "Robert Kieffer", - "email": "robert@broofa.com" - }, - { - "name": "Christoph Tavan", - "email": "dev@tavan.de" - }, - { - "name": "AJ ONeal", - "email": "coolaj86@gmail.com" - }, - { - "name": "Vincent Voyer", - "email": "vincent@zeroload.net" - }, - { - "name": "Roman Shtylman", - "email": "shtylman@gmail.com" - } - ], - "gitHead": "923fe4a7893c2057b608c0c74743ad5512599072", - "bugs": { - "url": "https://github.com/kelektiv/node-uuid/issues" - }, - "homepage": "https://github.com/kelektiv/node-uuid#readme", - "_id": "uuid@3.0.0", - "_shasum": "6728fc0459c450d796a99c31837569bdf672d728", - "_from": "uuid@3.0.0", - "_npmVersion": "3.10.3", - "_nodeVersion": "6.7.0", - "_npmUser": { - "name": "defunctzombie", - "email": "shtylman@gmail.com" - }, - "dist": { - "shasum": "6728fc0459c450d796a99c31837569bdf672d728", - "tarball": "https://registry.npmjs.org/uuid/-/uuid-3.0.0.tgz" - }, - "maintainers": [ - { - "name": "broofa", - "email": "robert@broofa.com" - }, - { - "name": "tim-smart", - "email": "tim@fostle.com" - }, - { - "name": "vvo", - "email": "vincent.voyer@gmail.com" - }, - { - "name": "defunctzombie", - "email": "shtylman@gmail.com" - } - ], - "_npmOperationalInternal": { - "host": "packages-18-east.internal.npmjs.com", - "tmp": "tmp/uuid-3.0.0.tgz_1479448535568_0.9578766466584057" - }, - "directories": {}, - "_resolved": "https://registry.npmjs.org/uuid/-/uuid-3.0.0.tgz", - "readme": "ERROR: No README data found!" -} diff --git a/node_modules/homey-log/node_modules/raven/node_modules/uuid/test/mocha.opts b/node_modules/homey-log/node_modules/raven/node_modules/uuid/test/mocha.opts deleted file mode 100644 index 5d6a311..0000000 --- a/node_modules/homey-log/node_modules/raven/node_modules/uuid/test/mocha.opts +++ /dev/null @@ -1,3 +0,0 @@ ---ui qunit ---reporter spec ---check-leaks diff --git a/node_modules/homey-log/node_modules/raven/node_modules/uuid/test/test.js b/node_modules/homey-log/node_modules/raven/node_modules/uuid/test/test.js deleted file mode 100644 index ec33bec..0000000 --- a/node_modules/homey-log/node_modules/raven/node_modules/uuid/test/test.js +++ /dev/null @@ -1,96 +0,0 @@ -var assert = require('assert'); - -var uuid = require('../'); - -// Verify ordering of v1 ids created with explicit times -var TIME = 1321644961388; // 2011-11-18 11:36:01.388-08:00 - -function compare(name, ids) { - test(name, function() { - // avoid .map for older browsers - for (var i=0 ; i 10k ids created in 1ms', function() { - // Verify throw if too many ids created - var thrown = false; - try { - uuid.v1({msecs: TIME, nsecs: 10000}); - } catch (e) { - thrown = true; - } - assert(thrown, 'Exception thrown when > 10K ids created in 1 ms'); -}); - -test('clock regression by msec', function() { - // Verify clock regression bumps clockseq - var uidt = uuid.v1({msecs: TIME}); - var uidtb = uuid.v1({msecs: TIME - 1}); - assert( - parseInt(uidtb.split('-')[3], 16) - parseInt(uidt.split('-')[3], 16) === 1, - 'Clock regression by msec increments the clockseq' - ); -}); - -test('clock regression by nsec', function() { - // Verify clock regression bumps clockseq - var uidtn = uuid.v1({msecs: TIME, nsecs: 10}); - var uidtnb = uuid.v1({msecs: TIME, nsecs: 9}); - assert( - parseInt(uidtnb.split('-')[3], 16) - parseInt(uidtn.split('-')[3], 16) === 1, - 'Clock regression by nsec increments the clockseq' - ); -}); - -test('explicit options product expected id', function() { - // Verify explicit options produce expected id - var id = uuid.v1({ - msecs: 1321651533573, - nsecs: 5432, - clockseq: 0x385c, - node: [ 0x61, 0xcd, 0x3c, 0xbb, 0x32, 0x10 ] - }); - assert(id == 'd9428888-122b-11e1-b85c-61cd3cbb3210', 'Explicit options produce expected id'); -}); - -test('ids spanning 1ms boundary are 100ns apart', function() { - // Verify adjacent ids across a msec boundary are 1 time unit apart - var u0 = uuid.v1({msecs: TIME, nsecs: 9999}); - var u1 = uuid.v1({msecs: TIME + 1, nsecs: 0}); - - var before = u0.split('-')[0], after = u1.split('-')[0]; - var dt = parseInt(after, 16) - parseInt(before, 16); - assert(dt === 1, 'Ids spanning 1ms boundary are 100ns apart'); -}); diff --git a/node_modules/homey-log/node_modules/raven/node_modules/uuid/uuid.js b/node_modules/homey-log/node_modules/raven/node_modules/uuid/uuid.js deleted file mode 100644 index a1f28f7..0000000 --- a/node_modules/homey-log/node_modules/raven/node_modules/uuid/uuid.js +++ /dev/null @@ -1,157 +0,0 @@ -// Unique ID creation requires a high quality random # generator. We feature -// detect to determine the best RNG source, normalizing to a function that -// returns 128-bits of randomness, since that's what's usually required -var _rng = require('./lib/rng'); - -// Maps for number <-> hex string conversion -var _byteToHex = []; -var _hexToByte = {}; -for (var i = 0; i < 256; ++i) { - _byteToHex[i] = (i + 0x100).toString(16).substr(1); - _hexToByte[_byteToHex[i]] = i; -} - -function buff_to_string(buf, offset) { - var i = offset || 0; - var bth = _byteToHex; - return bth[buf[i++]] + bth[buf[i++]] + - bth[buf[i++]] + bth[buf[i++]] + '-' + - bth[buf[i++]] + bth[buf[i++]] + '-' + - bth[buf[i++]] + bth[buf[i++]] + '-' + - bth[buf[i++]] + bth[buf[i++]] + '-' + - bth[buf[i++]] + bth[buf[i++]] + - bth[buf[i++]] + bth[buf[i++]] + - bth[buf[i++]] + bth[buf[i++]]; -} - -// **`v1()` - Generate time-based UUID** -// -// Inspired by https://github.com/LiosK/UUID.js -// and http://docs.python.org/library/uuid.html - -// random #'s we need to init node and clockseq -var _seedBytes = _rng(); - -// Per 4.5, create and 48-bit node id, (47 random bits + multicast bit = 1) -var _nodeId = [ - _seedBytes[0] | 0x01, - _seedBytes[1], _seedBytes[2], _seedBytes[3], _seedBytes[4], _seedBytes[5] -]; - -// Per 4.2.2, randomize (14 bit) clockseq -var _clockseq = (_seedBytes[6] << 8 | _seedBytes[7]) & 0x3fff; - -// Previous uuid creation time -var _lastMSecs = 0, _lastNSecs = 0; - -// See https://github.com/broofa/node-uuid for API details -function v1(options, buf, offset) { - var i = buf && offset || 0; - var b = buf || []; - - options = options || {}; - - var clockseq = options.clockseq !== undefined ? options.clockseq : _clockseq; - - // UUID timestamps are 100 nano-second units since the Gregorian epoch, - // (1582-10-15 00:00). JSNumbers aren't precise enough for this, so - // time is handled internally as 'msecs' (integer milliseconds) and 'nsecs' - // (100-nanoseconds offset from msecs) since unix epoch, 1970-01-01 00:00. - var msecs = options.msecs !== undefined ? options.msecs : new Date().getTime(); - - // Per 4.2.1.2, use count of uuid's generated during the current clock - // cycle to simulate higher resolution clock - var nsecs = options.nsecs !== undefined ? options.nsecs : _lastNSecs + 1; - - // Time since last uuid creation (in msecs) - var dt = (msecs - _lastMSecs) + (nsecs - _lastNSecs)/10000; - - // Per 4.2.1.2, Bump clockseq on clock regression - if (dt < 0 && options.clockseq === undefined) { - clockseq = clockseq + 1 & 0x3fff; - } - - // Reset nsecs if clock regresses (new clockseq) or we've moved onto a new - // time interval - if ((dt < 0 || msecs > _lastMSecs) && options.nsecs === undefined) { - nsecs = 0; - } - - // Per 4.2.1.2 Throw error if too many uuids are requested - if (nsecs >= 10000) { - throw new Error('uuid.v1(): Can\'t create more than 10M uuids/sec'); - } - - _lastMSecs = msecs; - _lastNSecs = nsecs; - _clockseq = clockseq; - - // Per 4.1.4 - Convert from unix epoch to Gregorian epoch - msecs += 12219292800000; - - // `time_low` - var tl = ((msecs & 0xfffffff) * 10000 + nsecs) % 0x100000000; - b[i++] = tl >>> 24 & 0xff; - b[i++] = tl >>> 16 & 0xff; - b[i++] = tl >>> 8 & 0xff; - b[i++] = tl & 0xff; - - // `time_mid` - var tmh = (msecs / 0x100000000 * 10000) & 0xfffffff; - b[i++] = tmh >>> 8 & 0xff; - b[i++] = tmh & 0xff; - - // `time_high_and_version` - b[i++] = tmh >>> 24 & 0xf | 0x10; // include version - b[i++] = tmh >>> 16 & 0xff; - - // `clock_seq_hi_and_reserved` (Per 4.2.2 - include variant) - b[i++] = clockseq >>> 8 | 0x80; - - // `clock_seq_low` - b[i++] = clockseq & 0xff; - - // `node` - var node = options.node || _nodeId; - for (var n = 0; n < 6; ++n) { - b[i + n] = node[n]; - } - - return buf ? buf : buff_to_string(b); -} - -// **`v4()` - Generate random UUID** - -// See https://github.com/broofa/node-uuid for API details -function v4(options, buf, offset) { - // Deprecated - 'format' argument, as supported in v1.2 - var i = buf && offset || 0; - - if (typeof(options) == 'string') { - buf = options == 'binary' ? new Array(16) : null; - options = null; - } - options = options || {}; - - var rnds = options.random || (options.rng || _rng)(); - - // Per 4.4, set bits for version and `clock_seq_hi_and_reserved` - rnds[6] = (rnds[6] & 0x0f) | 0x40; - rnds[8] = (rnds[8] & 0x3f) | 0x80; - - // Copy bytes to buffer, if provided - if (buf) { - for (var ii = 0; ii < 16; ++ii) { - buf[i + ii] = rnds[ii]; - } - } - - return buf || buff_to_string(rnds); -} - -// Export public API -var uuid = v4; -uuid.v1 = v1; -uuid.v4 = v4; - -module.exports = uuid; diff --git a/node_modules/homey-log/node_modules/raven/package.json b/node_modules/homey-log/node_modules/raven/package.json deleted file mode 100644 index 4e526c7..0000000 --- a/node_modules/homey-log/node_modules/raven/package.json +++ /dev/null @@ -1,102 +0,0 @@ -{ - "name": "raven", - "description": "A standalone (Node.js) client for Sentry", - "keywords": [ - "raven", - "sentry", - "python", - "errors", - "debugging", - "exceptions" - ], - "version": "0.12.3", - "repository": { - "type": "git", - "url": "git://github.com/getsentry/raven-node.git" - }, - "author": { - "name": "Matt Robenolt", - "email": "matt@ydekproductions.com" - }, - "license": "BSD-2-Clause", - "main": "index", - "bin": { - "raven": "./bin/raven" - }, - "scripts": { - "pretest": "npm install && npm run lint", - "test": "NODE_ENV=test istanbul cover _mocha -- --reporter dot && NODE_ENV=test node_modules/coffee-script/bin/coffee ./test/run.coffee", - "lint": "node_modules/eslint/bin/eslint.js ." - }, - "engines": { - "node": ">= 0.8.0" - }, - "dependencies": { - "cookie": "0.3.1", - "json-stringify-safe": "5.0.1", - "lsmod": "1.0.0", - "uuid": "3.0.0", - "stack-trace": "0.0.9" - }, - "devDependencies": { - "coffee-script": "~1.10.0", - "connect": "*", - "eslint": "1.10.3", - "express": "*", - "glob": "~3.1.13", - "istanbul": "^0.4.3", - "koa": "*", - "mocha": "*", - "mock-udp": "*", - "nock": "~0.28.2", - "should": "~3.3.1" - }, - "contributors": [ - { - "name": "https://github.com/mattrobenolt/raven-node/graphs/contributors" - } - ], - "gitHead": "a20ee752eb8bf49414f20982bc6d7d3e2ffc8764", - "bugs": { - "url": "https://github.com/getsentry/raven-node/issues" - }, - "homepage": "https://github.com/getsentry/raven-node#readme", - "_id": "raven@0.12.3", - "_shasum": "1a70f04a2240d291d83603b40162c4bada71325c", - "_from": "raven@>=0.12.3 <0.13.0", - "_npmVersion": "3.10.8", - "_nodeVersion": "6.9.0", - "_npmUser": { - "name": "lewisjellis", - "email": "me@lewisjellis.com" - }, - "dist": { - "shasum": "1a70f04a2240d291d83603b40162c4bada71325c", - "tarball": "https://registry.npmjs.org/raven/-/raven-0.12.3.tgz" - }, - "maintainers": [ - { - "name": "benvinegar", - "email": "ben@benv.ca" - }, - { - "name": "lewisjellis", - "email": "me@lewisjellis.com" - }, - { - "name": "mattrobenolt", - "email": "m@robenolt.com" - }, - { - "name": "zeeg", - "email": "dcramer@gmail.com" - } - ], - "_npmOperationalInternal": { - "host": "packages-18-east.internal.npmjs.com", - "tmp": "tmp/raven-0.12.3.tgz_1479761932406_0.9727930543012917" - }, - "directories": {}, - "_resolved": "https://registry.npmjs.org/raven/-/raven-0.12.3.tgz", - "readme": "ERROR: No README data found!" -} diff --git a/node_modules/homey-log/package.json b/node_modules/homey-log/package.json index c096e35..40d7934 100644 --- a/node_modules/homey-log/package.json +++ b/node_modules/homey-log/package.json @@ -1,45 +1,32 @@ { - "_args": [ - [ - "git+https://github.com/athombv/node-homey-log.git", - "/home/rob/Downloads/com.hue.zigbee" - ] - ], - "_from": "git+https://github.com/athombv/node-homey-log.git", - "_id": "homey-log@1.0.4", - "_inCache": true, - "_installable": true, + "_from": "homey-log@^1.0.1", + "_id": "homey-log@1.0.5", + "_inBundle": false, + "_integrity": "sha1-k2RU5iM5u3wxO3+m5htZasohSL8=", "_location": "/homey-log", "_phantomChildren": {}, "_requested": { - "hosted": { - "directUrl": "https://raw.githubusercontent.com/athombv/node-homey-log/master/package.json", - "gitUrl": "git://github.com/athombv/node-homey-log.git", - "httpsUrl": "git+https://github.com/athombv/node-homey-log.git", - "shortcut": "github:athombv/node-homey-log", - "ssh": "git@github.com:athombv/node-homey-log.git", - "sshUrl": "git+ssh://git@github.com/athombv/node-homey-log.git", - "type": "github" - }, - "name": null, - "raw": "git+https://github.com/athombv/node-homey-log.git", - "rawSpec": "git+https://github.com/athombv/node-homey-log.git", - "scope": null, - "spec": "git+https://github.com/athombv/node-homey-log.git", - "type": "hosted" + "type": "range", + "registry": true, + "raw": "homey-log@^1.0.1", + "name": "homey-log", + "escapedName": "homey-log", + "rawSpec": "^1.0.1", + "saveSpec": null, + "fetchSpec": "^1.0.1" }, "_requiredBy": [ "/" ], - "_resolved": "git+https://github.com/athombv/node-homey-log.git#94c0395993f0304e059f446fce5d8dc14d019783", - "_shasum": "20ec410527b287ad0063d0c8d56d4296188aca0f", - "_shrinkwrap": null, - "_spec": "git+https://github.com/athombv/node-homey-log.git", - "_where": "/home/rob/Downloads/com.hue.zigbee", + "_resolved": "https://registry.npmjs.org/homey-log/-/homey-log-1.0.5.tgz", + "_shasum": "936454e62339bb7c313b7fa6e61b596aca2148bf", + "_spec": "homey-log@^1.0.1", + "_where": "D:\\Projects\\Homey\\com.sensative", "author": "", "bugs": { "url": "https://github.com/athombv/node-homey-log/issues" }, + "bundleDependencies": false, "config": { "npmPublishTagProduction": "latest", "npmPublishTagStaging": "beta" @@ -47,16 +34,12 @@ "dependencies": { "raven": "^0.12.3" }, + "deprecated": false, "description": "This module can be plugged into a Homey app to send logs to [Sentry](http://sentry.io/).", - "devDependencies": {}, - "gitHead": "94c0395993f0304e059f446fce5d8dc14d019783", "homepage": "https://github.com/athombv/node-homey-log#readme", "license": "ISC", "main": "index.js", "name": "homey-log", - "optionalDependencies": {}, - "readme": "# homey-log\n\nThis module can be plugged into a Homey app to send logs to [Sentry](http://sentry.io/).\n\n## Installation\n\n```\nnpm install homey-log\n```\n\n## Usage\n\nIn your `env.json`, add your Sentry URL:\n\n```javascript\n{\n\t\"HOMEY_LOG_URL\": \"https://foo:bar@sentry.io/123456\"\n}\n```\n\nIn your app.js, include the library:\n\n```javascript\nconst Log = require('homey-log').Log;\n...\nthrow new Error(\"Whoops\");\n```\n\n### Notes\n\n* When your app crashes due to an uncaughtException, this will automatically be sent to Sentry.\n* As of Homey v1.0.3, when running your app using `athom project --run`, logging is disabled.\n\n### Methods\n\n#### Log.init( String url );\nSet the URL manually, when not provided using your `env.json`. Not recommended due to security!\n\n#### Log.setTags( Object tags );\nSet a custom object of 'tags'. Tags that are already set are `appId`, `appVersion` and `homeyVersion`\n\n#### Log.setExtra( Object extra );\nSet a custom object of 'extra' parameters\n\n#### Log.setUser( Object user );\nSet a custom object of 'user' data - do not include sensitive data!\n\n#### Log.captureMessage( String message )\nSend a message to Sentry\n\n#### Log.captureException( Error err )\nSend an Error object to Sentry\n", - "readmeFilename": "README.md", "repository": { "type": "git", "url": "git+https://WeeJewel@github.com/athombv/node-homey-log.git" @@ -64,5 +47,5 @@ "scripts": { "test": "echo \"Error: no test specified\" && exit 1" }, - "version": "1.0.4" + "version": "1.0.5" } diff --git a/node_modules/homey-meshdriver/.npmignore b/node_modules/homey-meshdriver/.npmignore deleted file mode 100644 index b7c0514..0000000 --- a/node_modules/homey-meshdriver/.npmignore +++ /dev/null @@ -1,3 +0,0 @@ -/build -/archive -/docs diff --git a/node_modules/homey-meshdriver/assets/driver/zigbee/device.js b/node_modules/homey-meshdriver/assets/driver/zigbee/device.js new file mode 100644 index 0000000..285ef2f --- /dev/null +++ b/node_modules/homey-meshdriver/assets/driver/zigbee/device.js @@ -0,0 +1,13 @@ +'use strict'; + +const ZwaveDevice = require('homey-meshdriver').ZigBeeDevice; + +class MyDevice extends ZigBeeDevice { + + onMeshInit() { + this.log('MyDevice has been inited'); + } + +} + +module.exports = MyDevice; \ No newline at end of file diff --git a/node_modules/homey-meshdriver/assets/driver/zwave/device.js b/node_modules/homey-meshdriver/assets/driver/zwave/device.js new file mode 100644 index 0000000..35ecace --- /dev/null +++ b/node_modules/homey-meshdriver/assets/driver/zwave/device.js @@ -0,0 +1,13 @@ +'use strict'; + +const ZwaveDevice = require('homey-meshdriver').ZwaveDevice; + +class MyDevice extends ZwaveDevice { + + onMeshInit() { + this.log('MyDevice has been inited'); + } + +} + +module.exports = MyDevice; \ No newline at end of file diff --git a/node_modules/homey-meshdriver/docs/MeshDevice.html b/node_modules/homey-meshdriver/docs/MeshDevice.html deleted file mode 100644 index 6638ba9..0000000 --- a/node_modules/homey-meshdriver/docs/MeshDevice.html +++ /dev/null @@ -1,406 +0,0 @@ - - - - - JSDoc: Class: MeshDevice - - - - - - - - - - -
- -

Class: MeshDevice

- - - - - - -
- -
- -

MeshDevice()

- - -
- -
-
- - - - - - -

new MeshDevice()

- - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - -

Methods

- - - - - - - -

disableDebug()

- - - - - - -
-

Disable debugging to the console

-
- - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - -

enableDebug()

- - - - - - -
-

Enable debugging to the console

-
- - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - -

onDeleted()

- - - - - - -
-

Remove all listeners and intervals from node

-
- - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - -
- -
- - - - -
- - - -
- -
- Documentation generated by JSDoc 3.5.3 on Thu Oct 26 2017 15:16:44 GMT+0200 (CEST) -
- - - - - \ No newline at end of file diff --git a/node_modules/homey-meshdriver/docs/MeshDevice.js.html b/node_modules/homey-meshdriver/docs/MeshDevice.js.html deleted file mode 100644 index fbad55a..0000000 --- a/node_modules/homey-meshdriver/docs/MeshDevice.js.html +++ /dev/null @@ -1,105 +0,0 @@ - - - - - JSDoc: Source: MeshDevice.js - - - - - - - - - - -
- -

Source: MeshDevice.js

- - - - - - -
-
-
'use strict';
-
-const Homey = require('homey');
-
-class MeshDevice extends Homey.Device {
-	
-	onInit( protocolId ) {
-		super.onInit();
-		
-		this._protocolId = protocolId;
-		this._debugEnabled = false;
-		
-		if( this._protocolId === 'zwave' )
-			this._manager = Homey.ManagerZwave;
-		
-		if( this._protocolId === 'zigbee' )
-			this._manager = Homey.ManagerZigBee;
-				
-		this._manager.getNode( this )
-			.then( node => {
-				this.node = node;
-				
-				process.nextTick(() => {
-					this.emit('__meshInit');
-				});
-			})
-			.catch( err => {
-				this.error( err );
-				this.setUnavailable( err );
-			});
-	}
-	
-	_debug() {
-		if( this._debugEnabled ) {
-			this.log.bind( this, '[dbg]' ).apply( this, arguments );
-		}
-	}
-	
-	/**
-	 * Enable debugging to the console
-	 */
-	enableDebug() {
-		this._debugEnabled = true;
-	}
-	
-	/**
-	 * Disable debugging to the console
-	 */
-	disableDebug() {
-		this._debugEnabled = false;
-	}
-	
-}
-
-module.exports = MeshDevice;
-
-
- - - - -
- - - -
- -
- Documentation generated by JSDoc 3.5.0 on Mon Jul 10 2017 20:12:19 GMT+0200 (CEST) -
- - - - - diff --git a/node_modules/homey-meshdriver/docs/Util.html b/node_modules/homey-meshdriver/docs/Util.html deleted file mode 100644 index e4a4db7..0000000 --- a/node_modules/homey-meshdriver/docs/Util.html +++ /dev/null @@ -1,987 +0,0 @@ - - - - - JSDoc: Class: Util - - - - - - - - - - -
- -

Class: Util

- - - - - - -
- -
- -

Util()

- - -
- -
-
- - - - - - -

new Util()

- - - - - - -
-

Utility class with several color and range conversion methods.

-
- - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - -

Methods

- - - - - - - -

(static) convertHSVToCIE() → {CIE}

- - - - - - -
-

Method that converts colors from the HSV (or HSL) color space to the CIE (1931) color space (the latter is used by -some ZigBee clusters).

-
- - - - - - - - - -
Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
TypeDescription
- - -HSV - - - -

HSV color object

- - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - -
Returns:
- - -
-
    -
  • CIE color space object
  • -
-
- - - -
-
- Type -
-
- -CIE - - -
-
- - - - - - - - - - - - - -

(static) convertHSVToRGB() → {RGB}

- - - - - - -
-

Method that converts colors from the HSV (or HSL) color space to the RGB color space.

-
- - - - - - - - - -
Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
TypeDescription
- - -HSV - - - -

HSV color object

- - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - -
Returns:
- - -
-
    -
  • RGB color object
  • -
-
- - - -
-
- Type -
-
- -RGB - - -
-
- - - - - - - - - - - - - -

(static) convertRGBToCIE() → {CIE|Error}

- - - - - - -
-

Method that converts colors from the RGB color space to the CIE (1931) color space (the latter is used by some -ZigBee clusters).

-
- - - - - - - - - -
Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
TypeDescription
- - -RGB - - - -

RGB color object

- - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - -
Returns:
- - -
-
    -
  • CIE color space object
  • -
-
- - - -
-
- Type -
-
- -CIE -| - -Error - - -
-
- - - - - - - - - - - - - -

(static) convertRGBToHSV() → {HSV}

- - - - - - -
-

Method that converts colors from the RGB color space to the HSV color space.

-
- - - - - - - - - -
Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
TypeDescription
- - -RGB - - - -

RGB color object

- - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - -
Returns:
- - -
-
    -
  • HSV color object
  • -
-
- - - -
-
- Type -
-
- -HSV - - -
-
- - - - - - - - - - - - - -

(static) mapValueRange(inputStart, inputEnd, outputStart, outputEnd, input) → {number}

- - - - - - -
-

Map a range of values to a different range of values.

-
- - - - - - - - - -
Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
inputStart - -
inputEnd - -
outputStart - -
outputEnd - -
input - -
- - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - -
Returns:
- - - - -
-
- Type -
-
- -number - - -
-
- - - - - - - - - - - - - -
- -
- - - - -
- - - -
- -
- Documentation generated by JSDoc 3.5.3 on Thu Oct 26 2017 15:16:44 GMT+0200 (CEST) -
- - - - - \ No newline at end of file diff --git a/node_modules/homey-meshdriver/docs/ZigBeeDevice.html b/node_modules/homey-meshdriver/docs/ZigBeeDevice.html deleted file mode 100644 index fc9a708..0000000 --- a/node_modules/homey-meshdriver/docs/ZigBeeDevice.html +++ /dev/null @@ -1,3061 +0,0 @@ - - - - - JSDoc: Class: ZigBeeDevice - - - - - - - - - - -
- -

Class: ZigBeeDevice

- - - - - - -
- -
- -

ZigBeeDevice()

- - -
- -
-
- - - - - - -

new ZigBeeDevice()

- - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - -
- - -

Extends

- - - - - - - - - - - - - - - - - - - - - - -

Methods

- - - - - - - -

disableDebug()

- - - - - - -
-

Disable debugging to the console

-
- - - - - - - - - - - - - -
- - - - - - -
Inherited From:
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - -

enableDebug()

- - - - - - -
-

Enable debugging to the console

-
- - - - - - - - - - - - - -
- - - - - - -
Inherited From:
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - -

getClusterEndpoint(clusterName)

- - - - - - -
-

Method that searches for the first occurrence of a clusterName in a device's endpoints and returns the endpoint id.

-
- - - - - - - - - -
Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
clusterName - - -string - - - -
- - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - -

onDeleted()

- - - - - - -
-

Remove all listeners and intervals from node

-
- - - - - - - - - - - - - -
- - - - - - -
Inherited From:
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - -

printNode()

- - - - - - -
-

Print the current Node information with Endpoints and Clusters

-
- - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - -

(async) registerAttrReportListener(clusterId, attrId, minInt, maxInt, repChange, triggerFn, endpointIdopt) → {Promise}

- - - - - - -
-

Register an attribute report listener, which is called when a report has been received for the provided endpoint -cluster and attribute combination.

-
- - - - - - - - - -
Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeAttributesDefaultDescription
clusterId - - -string - - - - - - - - - - - -

The ID of the cluster (e.g. genBasic)

attrId - - -string - - - - - - - - - - - -

The ID of the attribute (e.g. onOff)

minInt - - -number - - - - - - - - - - - -

The minimal reporting interval in seconds (e.g. 10 (seconds))

maxInt - - -number - - - - - - - - - - - -

The maximal reporting interval in seconds (e.g. 300 (seconds))

repChange - - -number - - - - - - - - - - - - null - -

Reportable change; the attribute should report its value when the value is changed more than this setting, for attributes of analog data type this argument is mandatory.

triggerFn - - -function - - - - - - - - - - - -

Function that will be called when attribute report data is received

endpointId - - -number - - - - - - <optional>
- - - - - -
- - 0 - -

The endpoint index (e.g. 0)

- - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - -
Returns:
- - -
-

Resolves if configuration succeeded

-
- - - -
-
- Type -
-
- -Promise - - -
-
- - - - - - - - - - - - - -

registerCapability(capabilityId, clusterId, userOptsopt)

- - - - - - -
-

Register a Homey Capability with a Cluster.

-
- - - - - - - - - -
Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeAttributesDescription
capabilityId - - -string - - - - - - - - - -

The Homey capability id (e.g. onoff)

clusterId - - -string - - - - - - - - - -

The Cluster id (e.g. genBasic)

userOpts - - -Object - - - - - - <optional>
- - - - - -

The object with options for this capability/cluster combination. These will extend system options, if available (/lib/zigbee/system/)

-
Properties
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeAttributesDefaultDescription
get - - -string - - - - - - <optional>
- - - - - -
- -

The command to get a value (e.g. onOff)

getParser - - -string - - - - - - <optional>
- - - - - -
- -

The function that is called when a GET request is made. Should return an Object.

getOpts - - -Object - - - - - - - - - - - - -
Properties
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeAttributesDescription
getOnStart - - -Boolean - - - - - - <optional>
- - - - - -

Get the value on App start

getOnOnline - - -Boolean - - - - - - <optional>
- - - - - -

Get the value when the device is marked as online

pollInterval - - -Number -| - -string - - - - - - <optional>
- - - - - -

Interval (in ms) to poll with a GET request. When provided a string, the device's setting with the string as ID will be used (e.g. poll_interval)

- -
set - - -string - - - - - - <optional>
- - - - - -
- -

The command to set a value (e.g. on)

setParser - - -function - - - - - - <optional>
- - - - - -
- -

The function that is called when a SET request is made. Should return an Object.

-
Properties
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeAttributesDescription
value - - -* - - - - - - <optional>
- - - - - -

The value of the Homey capability

opts - - -Object - - - - - - <optional>
- - - - - -

Options for the capability command

- -
report - - -string - - - - - - <optional>
- - - - - -
- -

The command to report a value (e.g. onOff)

reportParser - - -function - - - - - - <optional>
- - - - - -
- -

The function that is called when a REPORT request is made. Should return an Object.

-
Properties
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeAttributesDescription
report - - -Object - - - - - - <optional>
- - - - - -

The report object

- -
endpoint - - -number - - - - - - <optional>
- - - - - -
- - 0 - -

An index to identify the endpoint to use for this capability

- -
- - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - -

registerMultipleCapabilities(capabilitiesOpts, fn)

- - - - - - -
-

Register multiple Homey Capabilities with a Cluster. When a capability is changed, the event will be debounced -with the other capabilities in the capabilitiesOpts array.

-
- - - - - - - - - -
Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
capabilitiesOpts - - -Array.<Object> - - - - -
Properties
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeAttributesDescription
capability - - -string - - - - - - - - - -
cluster - - -string - - - - - - - - - -
opts - - -Object - - - - - - <optional>
- - - - - -

The object with options for this capability/cluster combination. These will extend system options, if available (/lib/zigbee/system/)

-
Properties
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeAttributesDefaultDescription
get - - -string - - - - - - <optional>
- - - - - -
- -

The command to get a value (e.g. onOff)

getParser - - -string - - - - - - <optional>
- - - - - -
- -

The function that is called when a GET request is made. Should return an Object.

getOpts - - -Object - - - - - - <optional>
- - - - - -
- - -
Properties
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeAttributesDescription
getOnStart - - -Boolean - - - - - - <optional>
- - - - - -

Get the value on App start

getOnOnline - - -Boolean - - - - - - <optional>
- - - - - -

Get the value when the device is marked as online

pollInterval - - -Number -| - -string - - - - - - <optional>
- - - - - -

Interval to poll with a GET request. When provided a string, the device's setting with the string as ID will be used (e.g. poll_interval)

- -
set - - -string - - - - - - <optional>
- - - - - -
- -

The command to set a value (e.g. on)

setParser - - -function - - - - - - <optional>
- - - - - -
- -

The function that is called when a SET request is made. Should return an Object.

-
Properties
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeAttributesDescription
value - - -* - - - - - - <optional>
- - - - - -

The value of the Homey capability

opts - - -Object - - - - - - <optional>
- - - - - -

Options for the capability command

- -
report - - -string - - - - - - <optional>
- - - - - -
- -

The command to report a value (e.g. onOff)

reportParser - - -function - - - - - - <optional>
- - - - - -
- -

The function that is called when a REPORT request is made. Should return an Object.

-
Properties
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeAttributesDescription
report - - -Object - - - - - - <optional>
- - - - - -

The report object

- -
endpoint - - -number - - - - - - <optional>
- - - - - -
- - 0 - -

An index to identify the endpoint to use for this capability

- -
- -
fn - - -function - - - -
- - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - -

registerReportListener(clusterId, commandId, triggerFn, endpointIdopt)

- - - - - - -
-

Register a endpoint command listener, which is called when a command has been received from the provided endpoint -cluster combination.

-
- - - - - - - - - -
Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeAttributesDefaultDescription
clusterId - - -string - - - - - - - - - - - -

The ID of the cluster (e.g. genBasic)

commandId - - -string - - - - - - - - - - - -

The ID of the Command (e.g. onOff)

triggerFn - - -function - - - - - - - - - - - - -
Properties
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
rawReport - - -Object - - - -

The raw report

parsedReport - - -Object - - - -

The parsed report (parsed by the first available reportParser method)

- -
endpointId - - -number - - - - - - <optional>
- - - - - -
- - 0 - -

The endpoint index (e.g. 0)

- - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - -
- -
- - - - -
- - - -
- -
- Documentation generated by JSDoc 3.5.3 on Thu Oct 26 2017 15:16:44 GMT+0200 (CEST) -
- - - - - \ No newline at end of file diff --git a/node_modules/homey-meshdriver/docs/ZwaveDevice.html b/node_modules/homey-meshdriver/docs/ZwaveDevice.html deleted file mode 100644 index d0c9151..0000000 --- a/node_modules/homey-meshdriver/docs/ZwaveDevice.html +++ /dev/null @@ -1,2634 +0,0 @@ - - - - - JSDoc: Class: ZwaveDevice - - - - - - - - - - -
- -

Class: ZwaveDevice

- - - - - - -
- -
- -

ZwaveDevice()

- - -
- -
-
- - - - - - -

new ZwaveDevice()

- - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - -
- - -

Extends

- - - - - - - - - - - - - - - - - - - - - - -

Methods

- - - - - - - -

(async) configurationSet(options, value) → {Promise.<*>}

- - - - - - -
-

Wrapper for CONFIGURATION_SET. Provide options.id and/or options.index and options.size. By default -options.useSettingParser is true, then the value will first be parsed by the registered setting parser or the -system parser before sending. It will only be able to use the registered setting parser if options.id is provided.

-
- - - - - - - - - -
Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
options - - -
Properties
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeAttributesDefaultDescription
index - - - - - - - - - -
size - - - - - - - - - -
id - - - - - - - - - -
useSettingParser - - - - <optional>
- - - - - -
- - true - -
- -
value - -
- - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - -
Returns:
- - - - -
-
- Type -
-
- -Promise.<*> - - -
-
- - - - - - - - - - - - - -

disableDebug()

- - - - - - -
-

Disable debugging to the console

-
- - - - - - - - - - - - - -
- - - - - - -
Inherited From:
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - -

enableDebug()

- - - - - - -
-

Enable debugging to the console

-
- - - - - - - - - - - - - -
- - - - - - -
Inherited From:
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - -

getManifestSetting(id) → {Object|Error}

- - - - - - -
-

Get a specific setting object from the manifest

-
- - - - - - - - - -
Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
id - -

Setting id to retrieve

- - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - -
Returns:
- - - - -
-
- Type -
-
- -Object -| - -Error - - -
-
- - - - - - - - - - - - - -

getManifestSettings() → {Array}

- - - - - - -
-

Method that flattens possibly nested settings and returns a flat settings array.

-
- - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - -
Returns:
- - - - -
-
- Type -
-
- -Array - - -
-
- - - - - - - - - - - - - -

hasCommandClass(commandClassId) → {boolean}

- - - - - - -
-

Method that will check if the node has the provided command class

-
- - - - - - - - - -
Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
commandClassId - - -string - - - -

For example: SWITCH_BINARY

- - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - -
Returns:
- - - - -
-
- Type -
-
- -boolean - - -
-
- - - - - - - - - - - - - -

onDeleted()

- - - - - - -
-

Remove all listeners and intervals from node

-
- - - - - - - - - - - - - -
- - - - - - -
Inherited From:
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - -

(async) onSettings(oldSettings, newSettings, changedKeysArr) → {Promise.<T>}

- - - - - - -
-

Method that handles changing settings for Z-Wave devices. It iterates over the changed settings and executes -a CONFIGURATION_SET in sync. If all succeed, it will resolve, if one or more fail it will reject with an error -of concatenated error messages (to see which settings failed if more than one).

-
- - - - - - - - - -
Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
oldSettings - -
newSettings - -
changedKeysArr - -
- - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - -
Returns:
- - - - -
-
- Type -
-
- -Promise.<T> - - -
-
- - - - - - - - - - - - - -

printNode()

- - - - - - -
-

Print the current Node information with Command Classes and their versions

-
- - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - -

registerCapability(capabilityId, commandClassId, optsopt)

- - - - - - -
-

Register a Homey Capability with a Command Class. -Multiple parser methods can be provided by appending a version, e.g. getParserV3. This will make sure that the highest matching version will be used, falling back to getParser.

-
- - - - - - - - - -
Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeAttributesDescription
capabilityId - - -string - - - - - - - - - -

The Homey capability id (e.g. onoff)

commandClassId - - -string - - - - - - - - - -

The command class id (e.g. BASIC)

opts - - -Object - - - - - - <optional>
- - - - - -

The object with options for this capability/commandclass combination. These will extend system options, if available (/lib/zwave/system/)

-
Properties
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeAttributesDescription
get - - -String - - - - - - <optional>
- - - - - -

The command to get a value (e.g. BASIC_GET)

getParser - - -String - - - - - - <optional>
- - - - - -

The function that is called when a GET request is made. Should return an Object.

getOpts - - -Object - - - - - - - - - - -
Properties
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeAttributesDescription
getOnStart - - -Boolean - - - - - - <optional>
- - - - - -

Get the value on App start

getOnOnline - - -Boolean - - - - - - <optional>
- - - - - -

Get the value when the device is marked as online

pollInterval - - -Number -| - -String - - - - - - <optional>
- - - - - -

Interval (in ms) to poll with a GET request. When provided a string, the device's setting with the string as ID will be used (e.g. poll_interval)

- -
set - - -String - - - - - - <optional>
- - - - - -

The command to set a value (e.g. BASIC_SET)

setParser - - -function - - - - - - <optional>
- - - - - -

The function that is called when a SET request is made. Should return an Object.

-
Properties
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeAttributesDescription
value - - -Mixed - - - - - - <optional>
- - - - - -

The value of the Homey capability

opts - - -Object - - - - - - <optional>
- - - - - -

Options for the capability command

- -
report - - -String - - - - - - <optional>
- - - - - -

The command to report a value (e.g. BASIC_REPORT)

reportParser - - -function - - - - - - <optional>
- - - - - -

The function that is called when a REPORT request is made. Should return an Object.

-
Properties
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeAttributesDescription
report - - -Object - - - - - - <optional>
- - - - - -

The report object

- -
multiChannelNodeId - - -Number - - - - - - <optional>
- - - - - -

An ID to use a MultiChannel Node for this capability

- -
- - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - -

registerReportListener(commandClassId, commandId, triggerFn)

- - - - - - -
-

Register a report listener, which is called when a report has been received.

-
- - - - - - - - - -
Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
commandClassId - - -string - - - -

The ID of the Command Class (e.g. BASIC)

commandId - - -string - - - -

The ID of the Command (e.g. BASIC_REPORT)

triggerFn - - -function - - - - -
Properties
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
report - - -Object - - - -

The received report

- -
- - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - -

registerSetting(settingId, parserFn)

- - - - - - -
-

Register a setting parser, which is called when a setting has changed.

-
- - - - - - - - - -
Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
settingId - - -string - - - -

The setting ID, as specified in /app.json

parserFn - - -function - - - -

The parser function, must return a Buffer

-
Properties
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
value - - -Mixed - - - -

The setting value

zwaveObj - - -Mixed - - - -

The setting's zwave object as defined in /app.json

- -
- - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - -
- -
- - - - -
- - - -
- -
- Documentation generated by JSDoc 3.5.3 on Thu Oct 26 2017 15:16:44 GMT+0200 (CEST) -
- - - - - \ No newline at end of file diff --git a/node_modules/homey-meshdriver/docs/ZwaveDevice.js.html b/node_modules/homey-meshdriver/docs/ZwaveDevice.js.html deleted file mode 100644 index c00cb32..0000000 --- a/node_modules/homey-meshdriver/docs/ZwaveDevice.js.html +++ /dev/null @@ -1,470 +0,0 @@ - - - - - JSDoc: Source: ZwaveDevice.js - - - - - - - - - - -
- -

Source: ZwaveDevice.js

- - - - - - -
-
-
'use strict';
-
-const MeshDevice = require('../MeshDevice.js');
-
-const Homey = require('homey');
-
-const SYSTEM_CAPABILITIES = [
-	'onoff'	
-];
-
-/**
- * Foo
- */
-class ZwaveDevice extends MeshDevice {
-
-	/*
-		Homey methods
-	*/
-	
-	onInit() {
-		super.onInit('zwave');
-		
-		this._capabilities = {};
-		this._settings = {};
-		this._reportListeners = {};
-		this._pollIntervals = {};
-		this._pollIntervalsKeys = {};
-		
-		this.once('__meshInit', () => {
-			this.log('ZwaveDevice has been inited');
-			this.onMeshInit && this.onMeshInit();
-		});
-	}
-	
-	printNode() {
-		this.log('------------------------------------------');
-
-		// log the entire Node
-		this.log('Node:', this.getData().token);
-		this.log('- Battery:', this.node.battery);
-
-		Object.keys(this.node.CommandClass).forEach(commandClassId => {
-			this.log('- CommandClass:', commandClassId);
-			this.log('-- Version:', this.node.CommandClass[commandClassId].version);
-			this.log('-- Commands:');
-
-			Object.keys(this.node.CommandClass[commandClassId]).forEach(key => {
-				if (typeof this.node.CommandClass[commandClassId][key] === 'function' && key === key.toUpperCase()) {
-					this.log('---', key);
-				}
-			});
-		});
-
-		if (this.node.MultiChannelNodes) {
-			Object.keys(this.node.MultiChannelNodes).forEach(multiChannelNodeId => {
-				this.log('- MultiChannelNode:', multiChannelNodeId);
-
-				Object.keys(this.node.MultiChannelNodes[multiChannelNodeId].CommandClass).forEach(commandClassId => {
-					this.log('-- CommandClass:', commandClassId);
-					this.log('--- Version:',
-						this.node.MultiChannelNodes[multiChannelNodeId].CommandClass[commandClassId].version);
-					this.log('--- Commands:');
-
-					Object
-						.keys(this.node.MultiChannelNodes[multiChannelNodeId].CommandClass[commandClassId])
-						.forEach(key => {
-							if (typeof this.node.MultiChannelNodes[multiChannelNodeId].CommandClass[commandClassId][key]
-								=== 'function' && key === key.toUpperCase()) {
-								this.log('----', key);
-							}
-						});
-				});
-			});
-		}
-
-		this.log('------------------------------------------');
-		this.log('');
-
-		Object.keys(this.node.CommandClass).forEach(commandClassId => {
-			this.node.CommandClass[commandClassId].on('report', function () {
-				this.log(`node.CommandClass['${commandClassId}'].on('report')`, 'arguments:', arguments);
-			}.bind(this));
-		});
-
-		if (this.node.MultiChannelNodes) {
-			Object.keys(this.node.MultiChannelNodes).forEach(multiChannelNodeId => {
-				Object.keys(this.node.MultiChannelNodes[multiChannelNodeId].CommandClass).forEach(commandClassId => {
-					this.node.MultiChannelNodes[multiChannelNodeId].CommandClass[commandClassId].on('report', function () {
-						this.log(`node.MultiChannelNodes['${multiChannelNodeId}'].
-						CommandClass['${commandClassId}'].on('report')`, 'arguments:', arguments);
-					}.bind(this));
-				});
-			});
-		}
-	}
-	
-	onSettings( oldSettings, newSettings, changedKeysArr ) {
-		
-		for( let i = 0; i < changedKeysArr.length; i++ ) {
-			let changedKey = changedKeysArr[i];
-			let newValue = newSettings[changedKey];
-			
-			// check for poll interval
-			if( this._pollIntervalsKeys[ changedKey ] ) {
-				this._setPollInterval(
-					this._pollIntervalsKeys[ changedKey ].capabilityId,
-					this._pollIntervalsKeys[ changedKey ].commandClassId,
-					newValue
-				);
-				continue;
-			}
-			
-			let manifestSetting;
-			let manifest = this.getDriver().getManifest();
-			if( manifest && manifest.settings ) {
-				for( let j = 0; j < manifest.settings.length; j++ ) {
-					let setting = manifest.settings[j];
-					if( setting.id !== changedKey ) continue;
-					manifestSetting = setting.zwave;
-				}
-			}
-			
-			if( typeof manifestSetting === 'undefined' ) continue;
-			
-			// get the parser
-			let parser = this._settings[changedKey] || this._systemSettingParser;
-			if( typeof parser !== 'function' )
-				return Promise.reject( new Error('invalid_parser') );
-			
-			let parsedValue = parser( newValue, manifestSetting );
-			if( parsedValue instanceof Error )
-				return Promise.reject( parsedValue );
-			
-			if( !Buffer.isBuffer(parsedValue) )
-				return Promise.reject( new Error('invalid_buffer') );
-				
-			if( parsedValue.length !== manifestSetting.size )
-				return Promise.reject( new Error('invalid_buffer_length') );
-							
-			this.node.CommandClass.COMMAND_CLASS_CONFIGURATION.CONFIGURATION_SET({
-				'Parameter Number': manifestSetting.index,
-				'Level': {
-					'Size': parsedValue.length,
-					'Default': false,
-				},
-				'Configuration Value': parsedValue,
-			}, ( err, result ) => {
-				if( err ) return this._debug('CONFIGURATION_SET', err);
-			});
-			
-		}
-			
-		return Promise.resolve();
-	}
-	
-	/*
-		Private methods
-	*/
-	
-	_systemSettingParser( newValue, manifestSetting ) {
-		
-		if( typeof newValue === 'boolean' ) {
-			return new Buffer([ (newValue === true ) ? 1 : 0]);
-		}
-		
-		if( typeof newValue === 'number' || parseInt(newSettingsObj[changedKey], 10).toString() === newSettingsObj[changedKey] ) {
-			if( manifestSetting.signed === false ) {
-
-				try {
-					let buf = new Buffer(manifestSetting.size);
-						buf.writeUIntBE(newValue, 0, manifestSetting.size);
-					return buf;
-				} catch( err ) {
-					return err;
-				}
-
-			} else {
-
-				try {
-					let buf = new Buffer(manifestSetting.size);
-						buf.writeIntBE(newValue, 0, manifestSetting.size);
-					return buf;
-				} catch( err ) {
-					return err;
-				}
-
-			}
-		}
-	}
-	
-	_registerCapabilityGet( capabilityId, commandClassId ) {
-		
-		let capabilityGetObj = this._getCapabilityObj('get', capabilityId, commandClassId);
-		if( capabilityGetObj instanceof Error ) return capabilityGetObj;
-		
-		// get initial value on start if null, unless it's an offline battery device and the getOnWakeUp flag is also set
-		if( capabilityGetObj.opts.getOnStart
-		 && this.getCapabilityValue( capabilityId ) === null
-		 && !(this.node.battery && this.node.online === false && capabilityGetObj.opts.getOnWakeUp === true) ) {
-			this._getCapabilityValue( capabilityId, commandClassId );
-		}
-		
-		if( capabilityGetObj.opts.getOnOnline ) {
-			this.node.on('online', () => {
-				this._debug(`Node online, getting commandClassId '${commandClassId}' for capabilityId '${capabilityId}'`);
-				this._getCapabilityValue( capabilityId, commandClassId );
-			});
-		}
-		
-		if( capabilityGetObj.opts.pollInterval ) {
-			
-			let pollInterval;			
-				
-			if( typeof capabilityGetObj.opts.pollInterval === 'number' ) {
-				pollInterval = capabilityGetObj.opts.pollInterval;
-			}
-			
-			if( typeof capabilityGetObj.opts.pollInterval === 'string' ) {
-				pollInterval = this.getSetting( capabilityGetObj.opts.pollInterval );
-				this._pollIntervalsKeys[ capabilityGetObj.opts.pollInterval ] = {
-					capabilityId: capabilityId,
-					commandClassId: commandClassId
-				}
-			}
-			
-			this._setPollInterval( capabilityId, commandClassId, pollInterval );
-			
-		}
-				
-	}
-	
-	_setPollInterval( capabilityId, commandClassId, pollInterval ) {
-				
-		this._pollIntervals[ capabilityId ] = this._pollIntervals[ capabilityId ] || {};
-		
-		if( this._pollIntervals[ capabilityId ][ commandClassId ] )
-			clearInterval(this._pollIntervals[ capabilityId ][ commandClassId ]);
-			
-		if( pollInterval < 1 ) return;
-		
-		this._pollIntervals[ capabilityId ][ commandClassId ] = setInterval(() => {
-			this._debug(`Polling commandClassId '${commandClassId}' for capabilityId '${capabilityId}'`);
-			this._getCapabilityValue( capabilityId, commandClassId );					
-		}, pollInterval);
-		
-	}
-	
-	_getCapabilityValue( capabilityId, commandClassId ) {
-		
-		let capabilityGetObj = this._getCapabilityObj('get', capabilityId, commandClassId);
-		if( capabilityGetObj instanceof Error ) return capabilityGetObj;
-			
-		let parsedPayload = {};
-		
-		if( typeof capabilityGetObj.parser === 'function' ) {
-			parsedPayload = capabilityGetObj.parser();
-			if( parsedPayload instanceof Error ) return this.error( parsedPayload );
-		}
-					
-		try {
-			let commandClass = capabilityGetObj.node.CommandClass[ `COMMAND_CLASS_${capabilityGetObj.commandClassId}` ];
-			let command = commandClass[ capabilityGetObj.commandId ];
-							
-			return command.call( command, parsedPayload, ( err, payload ) => {
-				if( err ) return this.error( err );
-				return this._onReport( capabilityId, payload );
-			});
-		} catch( err ) {
-			return this.error( err );
-		}
-		
-	}
-	
-	_registerCapabilitySet( capabilityId, commandClassId ) {
-		
-		let capabilitySetObj = this._getCapabilityObj('set', capabilityId, commandClassId);
-		if( capabilitySetObj instanceof Error ) return capabilitySetObj;
-				
-		this.registerCapabilityListener( capabilityId, ( value, opts ) => {
-			
-			if( typeof capabilitySetObj.parser !== 'function' ) return Promise.reject( new Error('missing_parser') );
-			
-			let parsedPayload = capabilitySetObj.parser( value, opts );
-			if( parsedPayload instanceof Error ) return Promise.reject( parsedPayload );
-			
-			try {
-				let commandClass = capabilitySetObj.node.CommandClass[ `COMMAND_CLASS_${capabilitySetObj.commandClassId}` ];
-				let command = commandClass[ capabilitySetObj.commandId ];
-				
-				return command.call( command, parsedPayload );
-			} catch( err ) {
-				return Promise.reject( err );
-			}
-			
-		});
-		
-	}
-	
-	_registerCapabilityRealtime( capabilityId, commandClassId ) {
-		
-		let capabilityReportObj = this._getCapabilityObj('report', capabilityId, commandClassId);
-		if( capabilityReportObj instanceof Error ) return capabilityReportObj;
-				
-		let commandClass = capabilityReportObj.node.CommandClass[ `COMMAND_CLASS_${capabilityReportObj.commandClassId}` ];
-		if( typeof commandClass === 'undefined' ) return this.error('Invalid commandClass:', capabilityReportObj.commandClassId);
-			
-		commandClass.on('report', ( command, payload ) => {
-			if( command.name !== capabilityReportObj.commandId ) return;
-			
-			let parsedPayload = this._onReport( capabilityId, payload );
-			if( parsedPayload instanceof Error ) return;
-			
-			if( this._reportListeners[ commandClassId ]
-			 && this._reportListeners[ commandClassId ][ command.name ] ) {
-				 this._reportListeners[ commandClassId ][ command.name ]( payload, parsedPayload );
-			 }
-		});
-	}
-	
-	_onReport( capabilityId, payload ) {
-		
-		let capabilityReportObj = this._getCapabilityObj('report', capabilityId);
-		if( capabilityReportObj instanceof Error ) return capabilityReportObj;
-		if( typeof capabilityReportObj.parser !== 'function' ) return;
-				
-		let parsedPayload = capabilityReportObj.parser( payload );
-		if( parsedPayload instanceof Error ) return;
-		if( parsedPayload === null ) return;
-				
-		this.setCapabilityValue( capabilityId, parsedPayload );
-		
-		return parsedPayload;
-		
-		
-	}
-	
-	_getCapabilityObj( commandType, capabilityId, commandClassId ) {
-				
-		let capability = this._capabilities[ capabilityId ];
-		let commandClass;
-		
-		if( typeof commandClassId !== 'undefined' ) {
-			commandClass = capability[ commandClassId ];
-		} else {		
-			for( let commandClassId in capability ) {
-				commandClass = capability[ commandClassId ];
-			}
-		}
-		
-		if( typeof commandClass === 'undefined' )
-			return new Error('missing_zwave_capability');				
-			
-		let commandId = commandClass[ commandType ];
-		let parser = commandClass[`${commandType}Parser`] || null;
-		let opts = commandClass[`${commandType}Opts`] || {};		
-		let node = this.node;
-		
-		if( typeof commandClass.multiChannelNodeId === 'number' ) {
-			node = this.node.MultiChannelNodes[ commandClass.multiChannelNodeId ];
-			if( typeof node === 'undefined' )
-				throw new Error(`Invalid multiChannelNodeId ${multiChannelNodeId} for capabilityId ${capabilityId} and commandClassId ${commandClassId}`);
-		}
-					
-		if( typeof commandId === 'string' ) return {
-			commandClassId	: commandClassId,
-			commandId		: commandId,
-			parser			: parser,
-			opts			: opts,
-			node			: node
-		}
-		
-		return new Error('missing_zwave_capability');		
-		
-	}
-	
-	/*
-		Public methods
-	*/
-	
-	registerCapability( capabilityId, commandClassId, userOpts ) {
-		
-		// register the Z-Wave capability listener
-		this._capabilities[ capabilityId ] = this._capabilities[ capabilityId ] || {};
-		this._capabilities[ capabilityId ][ commandClassId ] = this._capabilities[ capabilityId ][ commandClassId ] || {};
-		
-		// merge systemOpts & userOpts
-		let systemOpts = {};
-		try {
-			systemOpts = require(`./system/capabilities/${capabilityId}/${commandClassId}.js`);
-		} catch( err ) {
-			if( err.code !== 'MODULE_NOT_FOUND' ) {
-				process.nextTick(() => {
-					throw err;
-				});
-			}
-		}
-		
-		this._capabilities[ capabilityId ][ commandClassId ] = Object.assign(
-			systemOpts || {},
-			userOpts || {}
-		);
-		
-		// register get/set/realtime
-		this._registerCapabilityRealtime( capabilityId, commandClassId );
-		this._registerCapabilitySet( capabilityId, commandClassId );
-		this._registerCapabilityGet( capabilityId, commandClassId );
-	}
-	
-	registerSetting( settingId, parserFn ) {
-		this._settings[ settingId ] = parserFn;
-	}
-	
-	registerReportListener( commandClassId, commandId, triggerFn ) {
-		this._reportListeners[ commandClassId ] = this._reportListeners[ commandClassId ] || {};
-		this._reportListeners[ commandClassId ][ commandId ] = triggerFn;
-	}
-	
-}
-
-module.exports = ZwaveDevice;
-
-
- - - - -
- - - -
- -
- Documentation generated by JSDoc 3.5.0 on Mon Jul 10 2017 18:57:48 GMT+0200 (CEST) -
- - - - - diff --git a/node_modules/homey-meshdriver/docs/ZwaveLockDevice.html b/node_modules/homey-meshdriver/docs/ZwaveLockDevice.html deleted file mode 100644 index 1b3d8f8..0000000 --- a/node_modules/homey-meshdriver/docs/ZwaveLockDevice.html +++ /dev/null @@ -1,2724 +0,0 @@ - - - - - JSDoc: Class: ZwaveLockDevice - - - - - - - - - - -
- -

Class: ZwaveLockDevice

- - - - - - -
- -
- -

ZwaveLockDevice()

- -

The ZwaveLockDevice class has built-in functionality for the lockJammed FlowCardTrigger. Note: this FlowCardAction -will only be triggered if the NOTIFICATION command class is registered for the 'locked' capability.

- - -
- -
-
- - - - -

Constructor

- - - -

new ZwaveLockDevice()

- - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - -
Example
- -
// device.js
-const ZwaveLockDevice = require('homey-meshdriver').ZwaveLockDevice;
-
-class myDevice extends ZwaveLockDevice {
-
- async onMeshInit() {
-     await super.onMeshInit();
-     this.registerCapability('locked', 'DOOR_LOCK');
-     this.registerCapability('locked', 'NOTIFICATION');
-     this.registerCapability('measure_battery', 'BATTERY');
- }
-}
-
-// app.json (or see zwave/system/flows.json)
-flow: {
-     triggers: [
-         {
-             "id": "lockJammed",
-             "title": {
-                 "en": "The lock is jammed",
-                 "nl": "Het slot is geblokkeerd"
-             },
-             "hint": {
-                 "en": "While trying to close the lock something obstructed the lock from closing completely.",
-                 "nl": "Tijdens het sluiten van het slot blokkeerde er iets waardoor het slot niet kon worden gesloten."
-             },
-             "args": [
-                 {
-                     "name": "device",
-                     "type": "device",
-                     "filter": "<driver_id>"
-                 }
-             ]
-         }
-     ]
-}
- - - - -
- - -

Extends

- - - - - - - - - - - - - - - - - - - - - - -

Methods

- - - - - - - -

(async) configurationSet(options, value) → {Promise.<*>}

- - - - - - -
-

Wrapper for CONFIGURATION_SET. Provide options.id and/or options.index and options.size. By default -options.useSettingParser is true, then the value will first be parsed by the registered setting parser or the -system parser before sending. It will only be able to use the registered setting parser if options.id is provided.

-
- - - - - - - - - -
Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
options - - -
Properties
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeAttributesDefaultDescription
index - - - - - - - - - -
size - - - - - - - - - -
id - - - - - - - - - -
useSettingParser - - - - <optional>
- - - - - -
- - true - -
- -
value - -
- - - - - - -
- - - - - - -
Inherited From:
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - -
Returns:
- - - - -
-
- Type -
-
- -Promise.<*> - - -
-
- - - - - - - - - - - - - -

disableDebug()

- - - - - - -
-

Disable debugging to the console

-
- - - - - - - - - - - - - -
- - - - - - -
Inherited From:
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - -

enableDebug()

- - - - - - -
-

Enable debugging to the console

-
- - - - - - - - - - - - - -
- - - - - - -
Inherited From:
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - -

getManifestSetting(id) → {Object|Error}

- - - - - - -
-

Get a specific setting object from the manifest

-
- - - - - - - - - -
Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
id - -

Setting id to retrieve

- - - - - - -
- - - - - - -
Inherited From:
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - -
Returns:
- - - - -
-
- Type -
-
- -Object -| - -Error - - -
-
- - - - - - - - - - - - - -

getManifestSettings() → {Array}

- - - - - - -
-

Method that flattens possibly nested settings and returns a flat settings array.

-
- - - - - - - - - - - - - -
- - - - - - -
Inherited From:
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - -
Returns:
- - - - -
-
- Type -
-
- -Array - - -
-
- - - - - - - - - - - - - -

hasCommandClass(commandClassId) → {boolean}

- - - - - - -
-

Method that will check if the node has the provided command class

-
- - - - - - - - - -
Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
commandClassId - - -string - - - -

For example: SWITCH_BINARY

- - - - - - -
- - - - - - -
Inherited From:
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - -
Returns:
- - - - -
-
- Type -
-
- -boolean - - -
-
- - - - - - - - - - - - - -

onDeleted()

- - - - - - -
-

Remove all listeners and intervals from node

-
- - - - - - - - - - - - - -
- - - - - - -
Inherited From:
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - -

(async) onSettings(oldSettings, newSettings, changedKeysArr) → {Promise.<T>}

- - - - - - -
-

Method that handles changing settings for Z-Wave devices. It iterates over the changed settings and executes -a CONFIGURATION_SET in sync. If all succeed, it will resolve, if one or more fail it will reject with an error -of concatenated error messages (to see which settings failed if more than one).

-
- - - - - - - - - -
Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
oldSettings - -
newSettings - -
changedKeysArr - -
- - - - - - -
- - - - - - -
Inherited From:
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - -
Returns:
- - - - -
-
- Type -
-
- -Promise.<T> - - -
-
- - - - - - - - - - - - - -

printNode()

- - - - - - -
-

Print the current Node information with Command Classes and their versions

-
- - - - - - - - - - - - - -
- - - - - - -
Inherited From:
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - -

registerCapability(capabilityId, commandClassId, optsopt)

- - - - - - -
-

Register a Homey Capability with a Command Class. -Multiple parser methods can be provided by appending a version, e.g. getParserV3. This will make sure that the highest matching version will be used, falling back to getParser.

-
- - - - - - - - - -
Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeAttributesDescription
capabilityId - - -string - - - - - - - - - -

The Homey capability id (e.g. onoff)

commandClassId - - -string - - - - - - - - - -

The command class id (e.g. BASIC)

opts - - -Object - - - - - - <optional>
- - - - - -

The object with options for this capability/commandclass combination. These will extend system options, if available (/lib/zwave/system/)

-
Properties
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeAttributesDescription
get - - -String - - - - - - <optional>
- - - - - -

The command to get a value (e.g. BASIC_GET)

getParser - - -String - - - - - - <optional>
- - - - - -

The function that is called when a GET request is made. Should return an Object.

getOpts - - -Object - - - - - - - - - - -
Properties
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeAttributesDescription
getOnStart - - -Boolean - - - - - - <optional>
- - - - - -

Get the value on App start

getOnOnline - - -Boolean - - - - - - <optional>
- - - - - -

Get the value when the device is marked as online

pollInterval - - -Number -| - -String - - - - - - <optional>
- - - - - -

Interval (in ms) to poll with a GET request. When provided a string, the device's setting with the string as ID will be used (e.g. poll_interval)

- -
set - - -String - - - - - - <optional>
- - - - - -

The command to set a value (e.g. BASIC_SET)

setParser - - -function - - - - - - <optional>
- - - - - -

The function that is called when a SET request is made. Should return an Object.

-
Properties
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeAttributesDescription
value - - -Mixed - - - - - - <optional>
- - - - - -

The value of the Homey capability

opts - - -Object - - - - - - <optional>
- - - - - -

Options for the capability command

- -
report - - -String - - - - - - <optional>
- - - - - -

The command to report a value (e.g. BASIC_REPORT)

reportParser - - -function - - - - - - <optional>
- - - - - -

The function that is called when a REPORT request is made. Should return an Object.

-
Properties
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeAttributesDescription
report - - -Object - - - - - - <optional>
- - - - - -

The report object

- -
multiChannelNodeId - - -Number - - - - - - <optional>
- - - - - -

An ID to use a MultiChannel Node for this capability

- -
- - - - - - -
- - - - - - -
Inherited From:
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - -

registerReportListener(commandClassId, commandId, triggerFn)

- - - - - - -
-

Register a report listener, which is called when a report has been received.

-
- - - - - - - - - -
Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
commandClassId - - -string - - - -

The ID of the Command Class (e.g. BASIC)

commandId - - -string - - - -

The ID of the Command (e.g. BASIC_REPORT)

triggerFn - - -function - - - - -
Properties
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
report - - -Object - - - -

The received report

- -
- - - - - - -
- - - - - - -
Inherited From:
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - -

registerSetting(settingId, parserFn)

- - - - - - -
-

Register a setting parser, which is called when a setting has changed.

-
- - - - - - - - - -
Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
settingId - - -string - - - -

The setting ID, as specified in /app.json

parserFn - - -function - - - -

The parser function, must return a Buffer

-
Properties
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
value - - -Mixed - - - -

The setting value

zwaveObj - - -Mixed - - - -

The setting's zwave object as defined in /app.json

- -
- - - - - - -
- - - - - - -
Inherited From:
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - -
- -
- - - - -
- - - -
- -
- Documentation generated by JSDoc 3.5.3 on Thu Oct 26 2017 15:16:44 GMT+0200 (CEST) -
- - - - - \ No newline at end of file diff --git a/node_modules/homey-meshdriver/docs/ZwaveMeteringDevice.html b/node_modules/homey-meshdriver/docs/ZwaveMeteringDevice.html deleted file mode 100644 index 6e5bc8a..0000000 --- a/node_modules/homey-meshdriver/docs/ZwaveMeteringDevice.html +++ /dev/null @@ -1,2722 +0,0 @@ - - - - - JSDoc: Class: ZwaveMeteringDevice - - - - - - - - - - -
- -

Class: ZwaveMeteringDevice

- - - - - - -
- -
- -

ZwaveMeteringDevice()

- -

The ZwaveMeteringDevice class has built-in functionality for the METER_RESET FlowCardAction.

- - -
- -
-
- - - - -

Constructor

- - - -

new ZwaveMeteringDevice()

- - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - -
Example
- -
// device.js
-const ZwaveMeteringDevice = require('homey-meshdriver').ZwaveMeteringDevice;
-
-class myDevice extends ZwaveMeteringDevice {
-
- async onMeshInit() {
-     await super.onMeshInit();
-     this.registerCapability('measure_power', 'METER');
-     this.registerCapability('meter_power', 'METER');
- }
-}
-
-// app.json (or see zwave/system/flows.json)
-flow: {
-     actions: [
-         {
-             "id": "resetMeter",
-             "title": {
-                 "en": "Reset meter values",
-                 "nl": "Meter waarden opnieuw instellen"
-             },
-             "hint": {
-                 "en": "Reset the accumulated power usage value (kWh), note that this can not be reversed.",
-                 "nl": "Stel geaccumuleerde stroomverbruik waarde (kWh) opnieuw in, dit kan niet worden teruggedraaid."
-             },
-             "args": [
-                 {
-                     "name": "device",
-                     "type": "device",
-                     "filter": "<driver_id>"
-                 }
-             ]
-         }
-     ]
-}
- - - - -
- - -

Extends

- - - - - - - - - - - - - - - - - - - - - - -

Methods

- - - - - - - -

(async) configurationSet(options, value) → {Promise.<*>}

- - - - - - -
-

Wrapper for CONFIGURATION_SET. Provide options.id and/or options.index and options.size. By default -options.useSettingParser is true, then the value will first be parsed by the registered setting parser or the -system parser before sending. It will only be able to use the registered setting parser if options.id is provided.

-
- - - - - - - - - -
Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
options - - -
Properties
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeAttributesDefaultDescription
index - - - - - - - - - -
size - - - - - - - - - -
id - - - - - - - - - -
useSettingParser - - - - <optional>
- - - - - -
- - true - -
- -
value - -
- - - - - - -
- - - - - - -
Inherited From:
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - -
Returns:
- - - - -
-
- Type -
-
- -Promise.<*> - - -
-
- - - - - - - - - - - - - -

disableDebug()

- - - - - - -
-

Disable debugging to the console

-
- - - - - - - - - - - - - -
- - - - - - -
Inherited From:
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - -

enableDebug()

- - - - - - -
-

Enable debugging to the console

-
- - - - - - - - - - - - - -
- - - - - - -
Inherited From:
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - -

getManifestSetting(id) → {Object|Error}

- - - - - - -
-

Get a specific setting object from the manifest

-
- - - - - - - - - -
Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
id - -

Setting id to retrieve

- - - - - - -
- - - - - - -
Inherited From:
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - -
Returns:
- - - - -
-
- Type -
-
- -Object -| - -Error - - -
-
- - - - - - - - - - - - - -

getManifestSettings() → {Array}

- - - - - - -
-

Method that flattens possibly nested settings and returns a flat settings array.

-
- - - - - - - - - - - - - -
- - - - - - -
Inherited From:
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - -
Returns:
- - - - -
-
- Type -
-
- -Array - - -
-
- - - - - - - - - - - - - -

hasCommandClass(commandClassId) → {boolean}

- - - - - - -
-

Method that will check if the node has the provided command class

-
- - - - - - - - - -
Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
commandClassId - - -string - - - -

For example: SWITCH_BINARY

- - - - - - -
- - - - - - -
Inherited From:
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - -
Returns:
- - - - -
-
- Type -
-
- -boolean - - -
-
- - - - - - - - - - - - - -

onDeleted()

- - - - - - -
-

Remove all listeners and intervals from node

-
- - - - - - - - - - - - - -
- - - - - - -
Inherited From:
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - -

(async) onSettings(oldSettings, newSettings, changedKeysArr) → {Promise.<T>}

- - - - - - -
-

Method that handles changing settings for Z-Wave devices. It iterates over the changed settings and executes -a CONFIGURATION_SET in sync. If all succeed, it will resolve, if one or more fail it will reject with an error -of concatenated error messages (to see which settings failed if more than one).

-
- - - - - - - - - -
Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
oldSettings - -
newSettings - -
changedKeysArr - -
- - - - - - -
- - - - - - -
Inherited From:
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - -
Returns:
- - - - -
-
- Type -
-
- -Promise.<T> - - -
-
- - - - - - - - - - - - - -

printNode()

- - - - - - -
-

Print the current Node information with Command Classes and their versions

-
- - - - - - - - - - - - - -
- - - - - - -
Inherited From:
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - -

registerCapability(capabilityId, commandClassId, optsopt)

- - - - - - -
-

Register a Homey Capability with a Command Class. -Multiple parser methods can be provided by appending a version, e.g. getParserV3. This will make sure that the highest matching version will be used, falling back to getParser.

-
- - - - - - - - - -
Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeAttributesDescription
capabilityId - - -string - - - - - - - - - -

The Homey capability id (e.g. onoff)

commandClassId - - -string - - - - - - - - - -

The command class id (e.g. BASIC)

opts - - -Object - - - - - - <optional>
- - - - - -

The object with options for this capability/commandclass combination. These will extend system options, if available (/lib/zwave/system/)

-
Properties
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeAttributesDescription
get - - -String - - - - - - <optional>
- - - - - -

The command to get a value (e.g. BASIC_GET)

getParser - - -String - - - - - - <optional>
- - - - - -

The function that is called when a GET request is made. Should return an Object.

getOpts - - -Object - - - - - - - - - - -
Properties
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeAttributesDescription
getOnStart - - -Boolean - - - - - - <optional>
- - - - - -

Get the value on App start

getOnOnline - - -Boolean - - - - - - <optional>
- - - - - -

Get the value when the device is marked as online

pollInterval - - -Number -| - -String - - - - - - <optional>
- - - - - -

Interval (in ms) to poll with a GET request. When provided a string, the device's setting with the string as ID will be used (e.g. poll_interval)

- -
set - - -String - - - - - - <optional>
- - - - - -

The command to set a value (e.g. BASIC_SET)

setParser - - -function - - - - - - <optional>
- - - - - -

The function that is called when a SET request is made. Should return an Object.

-
Properties
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeAttributesDescription
value - - -Mixed - - - - - - <optional>
- - - - - -

The value of the Homey capability

opts - - -Object - - - - - - <optional>
- - - - - -

Options for the capability command

- -
report - - -String - - - - - - <optional>
- - - - - -

The command to report a value (e.g. BASIC_REPORT)

reportParser - - -function - - - - - - <optional>
- - - - - -

The function that is called when a REPORT request is made. Should return an Object.

-
Properties
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeAttributesDescription
report - - -Object - - - - - - <optional>
- - - - - -

The report object

- -
multiChannelNodeId - - -Number - - - - - - <optional>
- - - - - -

An ID to use a MultiChannel Node for this capability

- -
- - - - - - -
- - - - - - -
Inherited From:
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - -

registerReportListener(commandClassId, commandId, triggerFn)

- - - - - - -
-

Register a report listener, which is called when a report has been received.

-
- - - - - - - - - -
Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
commandClassId - - -string - - - -

The ID of the Command Class (e.g. BASIC)

commandId - - -string - - - -

The ID of the Command (e.g. BASIC_REPORT)

triggerFn - - -function - - - - -
Properties
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
report - - -Object - - - -

The received report

- -
- - - - - - -
- - - - - - -
Inherited From:
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - -

registerSetting(settingId, parserFn)

- - - - - - -
-

Register a setting parser, which is called when a setting has changed.

-
- - - - - - - - - -
Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
settingId - - -string - - - -

The setting ID, as specified in /app.json

parserFn - - -function - - - -

The parser function, must return a Buffer

-
Properties
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
value - - -Mixed - - - -

The setting value

zwaveObj - - -Mixed - - - -

The setting's zwave object as defined in /app.json

- -
- - - - - - -
- - - - - - -
Inherited From:
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - -
- -
- - - - -
- - - -
- -
- Documentation generated by JSDoc 3.5.3 on Thu Oct 26 2017 15:16:44 GMT+0200 (CEST) -
- - - - - \ No newline at end of file diff --git a/node_modules/homey-meshdriver/docs/fonts/OpenSans-Bold-webfont.eot b/node_modules/homey-meshdriver/docs/fonts/OpenSans-Bold-webfont.eot deleted file mode 100644 index 5d20d91..0000000 Binary files a/node_modules/homey-meshdriver/docs/fonts/OpenSans-Bold-webfont.eot and /dev/null differ diff --git a/node_modules/homey-meshdriver/docs/fonts/OpenSans-Bold-webfont.svg b/node_modules/homey-meshdriver/docs/fonts/OpenSans-Bold-webfont.svg deleted file mode 100644 index 3ed7be4..0000000 --- a/node_modules/homey-meshdriver/docs/fonts/OpenSans-Bold-webfont.svg +++ /dev/null @@ -1,1830 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/node_modules/homey-meshdriver/docs/fonts/OpenSans-Bold-webfont.woff b/node_modules/homey-meshdriver/docs/fonts/OpenSans-Bold-webfont.woff deleted file mode 100644 index 1205787..0000000 Binary files a/node_modules/homey-meshdriver/docs/fonts/OpenSans-Bold-webfont.woff and /dev/null differ diff --git a/node_modules/homey-meshdriver/docs/fonts/OpenSans-BoldItalic-webfont.eot b/node_modules/homey-meshdriver/docs/fonts/OpenSans-BoldItalic-webfont.eot deleted file mode 100644 index 1f639a1..0000000 Binary files a/node_modules/homey-meshdriver/docs/fonts/OpenSans-BoldItalic-webfont.eot and /dev/null differ diff --git a/node_modules/homey-meshdriver/docs/fonts/OpenSans-BoldItalic-webfont.svg b/node_modules/homey-meshdriver/docs/fonts/OpenSans-BoldItalic-webfont.svg deleted file mode 100644 index 6a2607b..0000000 --- a/node_modules/homey-meshdriver/docs/fonts/OpenSans-BoldItalic-webfont.svg +++ /dev/null @@ -1,1830 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/node_modules/homey-meshdriver/docs/fonts/OpenSans-BoldItalic-webfont.woff b/node_modules/homey-meshdriver/docs/fonts/OpenSans-BoldItalic-webfont.woff deleted file mode 100644 index ed760c0..0000000 Binary files a/node_modules/homey-meshdriver/docs/fonts/OpenSans-BoldItalic-webfont.woff and /dev/null differ diff --git a/node_modules/homey-meshdriver/docs/fonts/OpenSans-Italic-webfont.eot b/node_modules/homey-meshdriver/docs/fonts/OpenSans-Italic-webfont.eot deleted file mode 100644 index 0c8a0ae..0000000 Binary files a/node_modules/homey-meshdriver/docs/fonts/OpenSans-Italic-webfont.eot and /dev/null differ diff --git a/node_modules/homey-meshdriver/docs/fonts/OpenSans-Italic-webfont.svg b/node_modules/homey-meshdriver/docs/fonts/OpenSans-Italic-webfont.svg deleted file mode 100644 index e1075dc..0000000 --- a/node_modules/homey-meshdriver/docs/fonts/OpenSans-Italic-webfont.svg +++ /dev/null @@ -1,1830 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/node_modules/homey-meshdriver/docs/fonts/OpenSans-Italic-webfont.woff b/node_modules/homey-meshdriver/docs/fonts/OpenSans-Italic-webfont.woff deleted file mode 100644 index ff652e6..0000000 Binary files a/node_modules/homey-meshdriver/docs/fonts/OpenSans-Italic-webfont.woff and /dev/null differ diff --git a/node_modules/homey-meshdriver/docs/fonts/OpenSans-Light-webfont.eot b/node_modules/homey-meshdriver/docs/fonts/OpenSans-Light-webfont.eot deleted file mode 100644 index 1486840..0000000 Binary files a/node_modules/homey-meshdriver/docs/fonts/OpenSans-Light-webfont.eot and /dev/null differ diff --git a/node_modules/homey-meshdriver/docs/fonts/OpenSans-Light-webfont.svg b/node_modules/homey-meshdriver/docs/fonts/OpenSans-Light-webfont.svg deleted file mode 100644 index 11a472c..0000000 --- a/node_modules/homey-meshdriver/docs/fonts/OpenSans-Light-webfont.svg +++ /dev/null @@ -1,1831 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/node_modules/homey-meshdriver/docs/fonts/OpenSans-Light-webfont.woff b/node_modules/homey-meshdriver/docs/fonts/OpenSans-Light-webfont.woff deleted file mode 100644 index e786074..0000000 Binary files a/node_modules/homey-meshdriver/docs/fonts/OpenSans-Light-webfont.woff and /dev/null differ diff --git a/node_modules/homey-meshdriver/docs/fonts/OpenSans-LightItalic-webfont.eot b/node_modules/homey-meshdriver/docs/fonts/OpenSans-LightItalic-webfont.eot deleted file mode 100644 index 8f44592..0000000 Binary files a/node_modules/homey-meshdriver/docs/fonts/OpenSans-LightItalic-webfont.eot and /dev/null differ diff --git a/node_modules/homey-meshdriver/docs/fonts/OpenSans-LightItalic-webfont.svg b/node_modules/homey-meshdriver/docs/fonts/OpenSans-LightItalic-webfont.svg deleted file mode 100644 index 431d7e3..0000000 --- a/node_modules/homey-meshdriver/docs/fonts/OpenSans-LightItalic-webfont.svg +++ /dev/null @@ -1,1835 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/node_modules/homey-meshdriver/docs/fonts/OpenSans-LightItalic-webfont.woff b/node_modules/homey-meshdriver/docs/fonts/OpenSans-LightItalic-webfont.woff deleted file mode 100644 index 43e8b9e..0000000 Binary files a/node_modules/homey-meshdriver/docs/fonts/OpenSans-LightItalic-webfont.woff and /dev/null differ diff --git a/node_modules/homey-meshdriver/docs/fonts/OpenSans-Regular-webfont.eot b/node_modules/homey-meshdriver/docs/fonts/OpenSans-Regular-webfont.eot deleted file mode 100644 index 6bbc3cf..0000000 Binary files a/node_modules/homey-meshdriver/docs/fonts/OpenSans-Regular-webfont.eot and /dev/null differ diff --git a/node_modules/homey-meshdriver/docs/fonts/OpenSans-Regular-webfont.svg b/node_modules/homey-meshdriver/docs/fonts/OpenSans-Regular-webfont.svg deleted file mode 100644 index 25a3952..0000000 --- a/node_modules/homey-meshdriver/docs/fonts/OpenSans-Regular-webfont.svg +++ /dev/null @@ -1,1831 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/node_modules/homey-meshdriver/docs/fonts/OpenSans-Regular-webfont.woff b/node_modules/homey-meshdriver/docs/fonts/OpenSans-Regular-webfont.woff deleted file mode 100644 index e231183..0000000 Binary files a/node_modules/homey-meshdriver/docs/fonts/OpenSans-Regular-webfont.woff and /dev/null differ diff --git a/node_modules/homey-meshdriver/docs/global.html b/node_modules/homey-meshdriver/docs/global.html deleted file mode 100644 index 44d61c7..0000000 --- a/node_modules/homey-meshdriver/docs/global.html +++ /dev/null @@ -1,878 +0,0 @@ - - - - - JSDoc: Global - - - - - - - - - - -
- -

Global

- - - - - - -
- -
- -

- - -
- -
-
- - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - -
- - - - - - - - - - - - - - - - -

Methods

- - - - - - - -

calculateZwaveDimDuration(duration) → {number}

- - - - - - -
-

Calculate a duration value for SWITCH_MULTILEVEL and SWITCH_BINARY from an input value in milliseconds. Below 127 -the value is in seconds, above the value is in minutes. Hence, above 127 some rounding might occur. If a value larger -than 254 is entered it will be maxed at 254 (longest duration possible).

-
- - - - - - - - - -
Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
duration - - -number - - - -

Dim duration in milliseconds

- - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - -
Returns:
- - -
-

Range 0 - 254 (short to long)

-
- - - -
-
- Type -
-
- -number - - -
-
- - - - - - - - - - - - - -

determineAndSaveState(value)

- - - - - - -
-

Based on the windowcoverings_state value this method calculates and stores the corresponding SWITCH_BINARY value, -taking into account the possible invertWindowCoveringsDirection setting.

-
- - - - - - - - - -
Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
value - - -string - - - -

windowcoverings_state value ('down'/'up' or 'idle')

- - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - -

Type Definitions

- - - -

CIE

- - - - - - -
Type:
-
    -
  • - -Object - - -
  • -
- - - - - -
Properties:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
x - - -number - - - -

CIE x (small x) value, range 0 - 0.8 (for ZigBee X multiply by 65279)

y - - -number - - - -

CIE y (small y) value, range 0 - 0.9 (for ZigBee Y multiply by 65279)

- - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - -

HSV

- - - - - - -
Type:
-
    -
  • - -Object - - -
  • -
- - - - - -
Properties:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
hue - - -number - - - -

Hue value, range 0 - 1.

saturation - - -number - - - -

Saturation value, range 0 - 1.

value - - -number - - - -

Value (brightness) value, range 0 - 1.

- - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - -

RGB

- - - - - - -
Type:
-
    -
  • - -Object - - -
  • -
- - - - - -
Properties:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
red - - -number - - - -

Red value, range 0 - 255.

green - - -number - - - -

Green value, range 0 - 255.

blue - - -number - - - -

Blue value, range 0 - 255.

- - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - -
- -
- - - - -
- - - -
- -
- Documentation generated by JSDoc 3.5.3 on Thu Oct 26 2017 15:16:44 GMT+0200 (CEST) -
- - - - - \ No newline at end of file diff --git a/node_modules/homey-meshdriver/docs/index.html b/node_modules/homey-meshdriver/docs/index.html deleted file mode 100644 index 0dee563..0000000 --- a/node_modules/homey-meshdriver/docs/index.html +++ /dev/null @@ -1,65 +0,0 @@ - - - - - JSDoc: Home - - - - - - - - - - -
- -

Home

- - - - - - - - -

- - - - - - - - - - - - - - - - - - - - -
- - - -
- -
- Documentation generated by JSDoc 3.5.3 on Thu Oct 26 2017 15:16:44 GMT+0200 (CEST) -
- - - - - \ No newline at end of file diff --git a/node_modules/homey-meshdriver/docs/module.exports.html b/node_modules/homey-meshdriver/docs/module.exports.html deleted file mode 100644 index 2d1b00e..0000000 --- a/node_modules/homey-meshdriver/docs/module.exports.html +++ /dev/null @@ -1,164 +0,0 @@ - - - - - JSDoc: Class: exports - - - - - - - - - - -
- -

Class: exports

- - - - - - -
- -
- -

exports()

- -

Util -Utility class with several color and range conversion methods.

- - -
- -
-
- - - - -

Constructor

- - - -

new exports()

- - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - -
- -
- - - - -
- - - -
- -
- Documentation generated by JSDoc 3.5.3 on Mon Sep 25 2017 11:47:13 GMT+0200 (CEST) -
- - - - - \ No newline at end of file diff --git a/node_modules/homey-meshdriver/docs/scripts/linenumber.js b/node_modules/homey-meshdriver/docs/scripts/linenumber.js deleted file mode 100644 index 8d52f7e..0000000 --- a/node_modules/homey-meshdriver/docs/scripts/linenumber.js +++ /dev/null @@ -1,25 +0,0 @@ -/*global document */ -(function() { - var source = document.getElementsByClassName('prettyprint source linenums'); - var i = 0; - var lineNumber = 0; - var lineId; - var lines; - var totalLines; - var anchorHash; - - if (source && source[0]) { - anchorHash = document.location.hash.substring(1); - lines = source[0].getElementsByTagName('li'); - totalLines = lines.length; - - for (; i < totalLines; i++) { - lineNumber++; - lineId = 'line' + lineNumber; - lines[i].id = lineId; - if (lineId === anchorHash) { - lines[i].className += ' selected'; - } - } - } -})(); diff --git a/node_modules/homey-meshdriver/docs/scripts/prettify/Apache-License-2.0.txt b/node_modules/homey-meshdriver/docs/scripts/prettify/Apache-License-2.0.txt deleted file mode 100644 index d645695..0000000 --- a/node_modules/homey-meshdriver/docs/scripts/prettify/Apache-License-2.0.txt +++ /dev/null @@ -1,202 +0,0 @@ - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/node_modules/homey-meshdriver/docs/scripts/prettify/lang-css.js b/node_modules/homey-meshdriver/docs/scripts/prettify/lang-css.js deleted file mode 100644 index 041e1f5..0000000 --- a/node_modules/homey-meshdriver/docs/scripts/prettify/lang-css.js +++ /dev/null @@ -1,2 +0,0 @@ -PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\f\r ]+/,null," \t\r\n "]],[["str",/^"(?:[^\n\f\r"\\]|\\(?:\r\n?|\n|\f)|\\[\S\s])*"/,null],["str",/^'(?:[^\n\f\r'\\]|\\(?:\r\n?|\n|\f)|\\[\S\s])*'/,null],["lang-css-str",/^url\(([^"')]*)\)/i],["kwd",/^(?:url|rgb|!important|@import|@page|@media|@charset|inherit)(?=[^\w-]|$)/i,null],["lang-css-kw",/^(-?(?:[_a-z]|\\[\da-f]+ ?)(?:[\w-]|\\\\[\da-f]+ ?)*)\s*:/i],["com",/^\/\*[^*]*\*+(?:[^*/][^*]*\*+)*\//],["com", -/^(?:<\!--|--\>)/],["lit",/^(?:\d+|\d*\.\d+)(?:%|[a-z]+)?/i],["lit",/^#[\da-f]{3,6}/i],["pln",/^-?(?:[_a-z]|\\[\da-f]+ ?)(?:[\w-]|\\\\[\da-f]+ ?)*/i],["pun",/^[^\s\w"']+/]]),["css"]);PR.registerLangHandler(PR.createSimpleLexer([],[["kwd",/^-?(?:[_a-z]|\\[\da-f]+ ?)(?:[\w-]|\\\\[\da-f]+ ?)*/i]]),["css-kw"]);PR.registerLangHandler(PR.createSimpleLexer([],[["str",/^[^"')]+/]]),["css-str"]); diff --git a/node_modules/homey-meshdriver/docs/scripts/prettify/prettify.js b/node_modules/homey-meshdriver/docs/scripts/prettify/prettify.js deleted file mode 100644 index eef5ad7..0000000 --- a/node_modules/homey-meshdriver/docs/scripts/prettify/prettify.js +++ /dev/null @@ -1,28 +0,0 @@ -var q=null;window.PR_SHOULD_USE_CONTINUATION=!0; -(function(){function L(a){function m(a){var f=a.charCodeAt(0);if(f!==92)return f;var b=a.charAt(1);return(f=r[b])?f:"0"<=b&&b<="7"?parseInt(a.substring(1),8):b==="u"||b==="x"?parseInt(a.substring(2),16):a.charCodeAt(1)}function e(a){if(a<32)return(a<16?"\\x0":"\\x")+a.toString(16);a=String.fromCharCode(a);if(a==="\\"||a==="-"||a==="["||a==="]")a="\\"+a;return a}function h(a){for(var f=a.substring(1,a.length-1).match(/\\u[\dA-Fa-f]{4}|\\x[\dA-Fa-f]{2}|\\[0-3][0-7]{0,2}|\\[0-7]{1,2}|\\[\S\s]|[^\\]/g),a= -[],b=[],o=f[0]==="^",c=o?1:0,i=f.length;c122||(d<65||j>90||b.push([Math.max(65,j)|32,Math.min(d,90)|32]),d<97||j>122||b.push([Math.max(97,j)&-33,Math.min(d,122)&-33]))}}b.sort(function(a,f){return a[0]-f[0]||f[1]-a[1]});f=[];j=[NaN,NaN];for(c=0;ci[0]&&(i[1]+1>i[0]&&b.push("-"),b.push(e(i[1])));b.push("]");return b.join("")}function y(a){for(var f=a.source.match(/\[(?:[^\\\]]|\\[\S\s])*]|\\u[\dA-Fa-f]{4}|\\x[\dA-Fa-f]{2}|\\\d+|\\[^\dux]|\(\?[!:=]|[()^]|[^()[\\^]+/g),b=f.length,d=[],c=0,i=0;c=2&&a==="["?f[c]=h(j):a!=="\\"&&(f[c]=j.replace(/[A-Za-z]/g,function(a){a=a.charCodeAt(0);return"["+String.fromCharCode(a&-33,a|32)+"]"}));return f.join("")}for(var t=0,s=!1,l=!1,p=0,d=a.length;p=5&&"lang-"===b.substring(0,5))&&!(o&&typeof o[1]==="string"))c=!1,b="src";c||(r[f]=b)}i=d;d+=f.length;if(c){c=o[1];var j=f.indexOf(c),k=j+c.length;o[2]&&(k=f.length-o[2].length,j=k-c.length);b=b.substring(5);B(l+i,f.substring(0,j),e,p);B(l+i+j,c,C(b,c),p);B(l+i+k,f.substring(k),e,p)}else p.push(l+i,b)}a.e=p}var h={},y;(function(){for(var e=a.concat(m), -l=[],p={},d=0,g=e.length;d=0;)h[n.charAt(k)]=r;r=r[1];n=""+r;p.hasOwnProperty(n)||(l.push(r),p[n]=q)}l.push(/[\S\s]/);y=L(l)})();var t=m.length;return e}function u(a){var m=[],e=[];a.tripleQuotedStrings?m.push(["str",/^(?:'''(?:[^'\\]|\\[\S\s]|''?(?=[^']))*(?:'''|$)|"""(?:[^"\\]|\\[\S\s]|""?(?=[^"]))*(?:"""|$)|'(?:[^'\\]|\\[\S\s])*(?:'|$)|"(?:[^"\\]|\\[\S\s])*(?:"|$))/,q,"'\""]):a.multiLineStrings?m.push(["str",/^(?:'(?:[^'\\]|\\[\S\s])*(?:'|$)|"(?:[^"\\]|\\[\S\s])*(?:"|$)|`(?:[^\\`]|\\[\S\s])*(?:`|$))/, -q,"'\"`"]):m.push(["str",/^(?:'(?:[^\n\r'\\]|\\.)*(?:'|$)|"(?:[^\n\r"\\]|\\.)*(?:"|$))/,q,"\"'"]);a.verbatimStrings&&e.push(["str",/^@"(?:[^"]|"")*(?:"|$)/,q]);var h=a.hashComments;h&&(a.cStyleComments?(h>1?m.push(["com",/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,q,"#"]):m.push(["com",/^#(?:(?:define|elif|else|endif|error|ifdef|include|ifndef|line|pragma|undef|warning)\b|[^\n\r]*)/,q,"#"]),e.push(["str",/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h|[a-z]\w*)>/,q])):m.push(["com",/^#[^\n\r]*/, -q,"#"]));a.cStyleComments&&(e.push(["com",/^\/\/[^\n\r]*/,q]),e.push(["com",/^\/\*[\S\s]*?(?:\*\/|$)/,q]));a.regexLiterals&&e.push(["lang-regex",/^(?:^^\.?|[!+-]|!=|!==|#|%|%=|&|&&|&&=|&=|\(|\*|\*=|\+=|,|-=|->|\/|\/=|:|::|;|<|<<|<<=|<=|=|==|===|>|>=|>>|>>=|>>>|>>>=|[?@[^]|\^=|\^\^|\^\^=|{|\||\|=|\|\||\|\|=|~|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\s*(\/(?=[^*/])(?:[^/[\\]|\\[\S\s]|\[(?:[^\\\]]|\\[\S\s])*(?:]|$))+\/)/]);(h=a.types)&&e.push(["typ",h]);a=(""+a.keywords).replace(/^ | $/g, -"");a.length&&e.push(["kwd",RegExp("^(?:"+a.replace(/[\s,]+/g,"|")+")\\b"),q]);m.push(["pln",/^\s+/,q," \r\n\t\xa0"]);e.push(["lit",/^@[$_a-z][\w$@]*/i,q],["typ",/^(?:[@_]?[A-Z]+[a-z][\w$@]*|\w+_t\b)/,q],["pln",/^[$_a-z][\w$@]*/i,q],["lit",/^(?:0x[\da-f]+|(?:\d(?:_\d+)*\d*(?:\.\d*)?|\.\d\+)(?:e[+-]?\d+)?)[a-z]*/i,q,"0123456789"],["pln",/^\\[\S\s]?/,q],["pun",/^.[^\s\w"-$'./@\\`]*/,q]);return x(m,e)}function D(a,m){function e(a){switch(a.nodeType){case 1:if(k.test(a.className))break;if("BR"===a.nodeName)h(a), -a.parentNode&&a.parentNode.removeChild(a);else for(a=a.firstChild;a;a=a.nextSibling)e(a);break;case 3:case 4:if(p){var b=a.nodeValue,d=b.match(t);if(d){var c=b.substring(0,d.index);a.nodeValue=c;(b=b.substring(d.index+d[0].length))&&a.parentNode.insertBefore(s.createTextNode(b),a.nextSibling);h(a);c||a.parentNode.removeChild(a)}}}}function h(a){function b(a,d){var e=d?a.cloneNode(!1):a,f=a.parentNode;if(f){var f=b(f,1),g=a.nextSibling;f.appendChild(e);for(var h=g;h;h=g)g=h.nextSibling,f.appendChild(h)}return e} -for(;!a.nextSibling;)if(a=a.parentNode,!a)return;for(var a=b(a.nextSibling,0),e;(e=a.parentNode)&&e.nodeType===1;)a=e;d.push(a)}var k=/(?:^|\s)nocode(?:\s|$)/,t=/\r\n?|\n/,s=a.ownerDocument,l;a.currentStyle?l=a.currentStyle.whiteSpace:window.getComputedStyle&&(l=s.defaultView.getComputedStyle(a,q).getPropertyValue("white-space"));var p=l&&"pre"===l.substring(0,3);for(l=s.createElement("LI");a.firstChild;)l.appendChild(a.firstChild);for(var d=[l],g=0;g=0;){var h=m[e];A.hasOwnProperty(h)?window.console&&console.warn("cannot override language handler %s",h):A[h]=a}}function C(a,m){if(!a||!A.hasOwnProperty(a))a=/^\s*=o&&(h+=2);e>=c&&(a+=2)}}catch(w){"console"in window&&console.log(w&&w.stack?w.stack:w)}}var v=["break,continue,do,else,for,if,return,while"],w=[[v,"auto,case,char,const,default,double,enum,extern,float,goto,int,long,register,short,signed,sizeof,static,struct,switch,typedef,union,unsigned,void,volatile"], -"catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof"],F=[w,"alignof,align_union,asm,axiom,bool,concept,concept_map,const_cast,constexpr,decltype,dynamic_cast,explicit,export,friend,inline,late_check,mutable,namespace,nullptr,reinterpret_cast,static_assert,static_cast,template,typeid,typename,using,virtual,where"],G=[w,"abstract,boolean,byte,extends,final,finally,implements,import,instanceof,null,native,package,strictfp,super,synchronized,throws,transient"], -H=[G,"as,base,by,checked,decimal,delegate,descending,dynamic,event,fixed,foreach,from,group,implicit,in,interface,internal,into,is,lock,object,out,override,orderby,params,partial,readonly,ref,sbyte,sealed,stackalloc,string,select,uint,ulong,unchecked,unsafe,ushort,var"],w=[w,"debugger,eval,export,function,get,null,set,undefined,var,with,Infinity,NaN"],I=[v,"and,as,assert,class,def,del,elif,except,exec,finally,from,global,import,in,is,lambda,nonlocal,not,or,pass,print,raise,try,with,yield,False,True,None"], -J=[v,"alias,and,begin,case,class,def,defined,elsif,end,ensure,false,in,module,next,nil,not,or,redo,rescue,retry,self,super,then,true,undef,unless,until,when,yield,BEGIN,END"],v=[v,"case,done,elif,esac,eval,fi,function,in,local,set,then,until"],K=/^(DIR|FILE|vector|(de|priority_)?queue|list|stack|(const_)?iterator|(multi)?(set|map)|bitset|u?(int|float)\d*)/,N=/\S/,O=u({keywords:[F,H,w,"caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END"+ -I,J,v],hashComments:!0,cStyleComments:!0,multiLineStrings:!0,regexLiterals:!0}),A={};k(O,["default-code"]);k(x([],[["pln",/^[^]*(?:>|$)/],["com",/^<\!--[\S\s]*?(?:--\>|$)/],["lang-",/^<\?([\S\s]+?)(?:\?>|$)/],["lang-",/^<%([\S\s]+?)(?:%>|$)/],["pun",/^(?:<[%?]|[%?]>)/],["lang-",/^]*>([\S\s]+?)<\/xmp\b[^>]*>/i],["lang-js",/^]*>([\S\s]*?)(<\/script\b[^>]*>)/i],["lang-css",/^]*>([\S\s]*?)(<\/style\b[^>]*>)/i],["lang-in.tag",/^(<\/?[a-z][^<>]*>)/i]]), -["default-markup","htm","html","mxml","xhtml","xml","xsl"]);k(x([["pln",/^\s+/,q," \t\r\n"],["atv",/^(?:"[^"]*"?|'[^']*'?)/,q,"\"'"]],[["tag",/^^<\/?[a-z](?:[\w-.:]*\w)?|\/?>$/i],["atn",/^(?!style[\s=]|on)[a-z](?:[\w:-]*\w)?/i],["lang-uq.val",/^=\s*([^\s"'>]*(?:[^\s"'/>]|\/(?=\s)))/],["pun",/^[/<->]+/],["lang-js",/^on\w+\s*=\s*"([^"]+)"/i],["lang-js",/^on\w+\s*=\s*'([^']+)'/i],["lang-js",/^on\w+\s*=\s*([^\s"'>]+)/i],["lang-css",/^style\s*=\s*"([^"]+)"/i],["lang-css",/^style\s*=\s*'([^']+)'/i],["lang-css", -/^style\s*=\s*([^\s"'>]+)/i]]),["in.tag"]);k(x([],[["atv",/^[\S\s]+/]]),["uq.val"]);k(u({keywords:F,hashComments:!0,cStyleComments:!0,types:K}),["c","cc","cpp","cxx","cyc","m"]);k(u({keywords:"null,true,false"}),["json"]);k(u({keywords:H,hashComments:!0,cStyleComments:!0,verbatimStrings:!0,types:K}),["cs"]);k(u({keywords:G,cStyleComments:!0}),["java"]);k(u({keywords:v,hashComments:!0,multiLineStrings:!0}),["bsh","csh","sh"]);k(u({keywords:I,hashComments:!0,multiLineStrings:!0,tripleQuotedStrings:!0}), -["cv","py"]);k(u({keywords:"caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END",hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["perl","pl","pm"]);k(u({keywords:J,hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["rb"]);k(u({keywords:w,cStyleComments:!0,regexLiterals:!0}),["js"]);k(u({keywords:"all,and,by,catch,class,else,extends,false,finally,for,if,in,is,isnt,loop,new,no,not,null,of,off,on,or,return,super,then,true,try,unless,until,when,while,yes", -hashComments:3,cStyleComments:!0,multilineStrings:!0,tripleQuotedStrings:!0,regexLiterals:!0}),["coffee"]);k(x([],[["str",/^[\S\s]+/]]),["regex"]);window.prettyPrintOne=function(a,m,e){var h=document.createElement("PRE");h.innerHTML=a;e&&D(h,e);E({g:m,i:e,h:h});return h.innerHTML};window.prettyPrint=function(a){function m(){for(var e=window.PR_SHOULD_USE_CONTINUATION?l.now()+250:Infinity;p=0){var k=k.match(g),f,b;if(b= -!k){b=n;for(var o=void 0,c=b.firstChild;c;c=c.nextSibling)var i=c.nodeType,o=i===1?o?b:c:i===3?N.test(c.nodeValue)?b:o:o;b=(f=o===b?void 0:o)&&"CODE"===f.tagName}b&&(k=f.className.match(g));k&&(k=k[1]);b=!1;for(o=n.parentNode;o;o=o.parentNode)if((o.tagName==="pre"||o.tagName==="code"||o.tagName==="xmp")&&o.className&&o.className.indexOf("prettyprint")>=0){b=!0;break}b||((b=(b=n.className.match(/\blinenums\b(?::(\d+))?/))?b[1]&&b[1].length?+b[1]:!0:!1)&&D(n,b),d={g:k,h:n,i:b},E(d))}}p th:last-child { border-right: 1px solid #ddd; } - -.ancestors, .attribs { color: #999; } -.ancestors a, .attribs a -{ - color: #999 !important; - text-decoration: none; -} - -.clear -{ - clear: both; -} - -.important -{ - font-weight: bold; - color: #950B02; -} - -.yes-def { - text-indent: -1000px; -} - -.type-signature { - color: #aaa; -} - -.name, .signature { - font-family: Consolas, Monaco, 'Andale Mono', monospace; -} - -.details { margin-top: 14px; border-left: 2px solid #DDD; } -.details dt { width: 120px; float: left; padding-left: 10px; padding-top: 6px; } -.details dd { margin-left: 70px; } -.details ul { margin: 0; } -.details ul { list-style-type: none; } -.details li { margin-left: 30px; padding-top: 6px; } -.details pre.prettyprint { margin: 0 } -.details .object-value { padding-top: 0; } - -.description { - margin-bottom: 1em; - margin-top: 1em; -} - -.code-caption -{ - font-style: italic; - font-size: 107%; - margin: 0; -} - -.prettyprint -{ - border: 1px solid #ddd; - width: 80%; - overflow: auto; -} - -.prettyprint.source { - width: inherit; -} - -.prettyprint code -{ - font-size: 100%; - line-height: 18px; - display: block; - padding: 4px 12px; - margin: 0; - background-color: #fff; - color: #4D4E53; -} - -.prettyprint code span.line -{ - display: inline-block; -} - -.prettyprint.linenums -{ - padding-left: 70px; - -webkit-user-select: none; - -moz-user-select: none; - -ms-user-select: none; - user-select: none; -} - -.prettyprint.linenums ol -{ - padding-left: 0; -} - -.prettyprint.linenums li -{ - border-left: 3px #ddd solid; -} - -.prettyprint.linenums li.selected, -.prettyprint.linenums li.selected * -{ - background-color: lightyellow; -} - -.prettyprint.linenums li * -{ - -webkit-user-select: text; - -moz-user-select: text; - -ms-user-select: text; - user-select: text; -} - -.params .name, .props .name, .name code { - color: #4D4E53; - font-family: Consolas, Monaco, 'Andale Mono', monospace; - font-size: 100%; -} - -.params td.description > p:first-child, -.props td.description > p:first-child -{ - margin-top: 0; - padding-top: 0; -} - -.params td.description > p:last-child, -.props td.description > p:last-child -{ - margin-bottom: 0; - padding-bottom: 0; -} - -.disabled { - color: #454545; -} diff --git a/node_modules/homey-meshdriver/docs/styles/prettify-jsdoc.css b/node_modules/homey-meshdriver/docs/styles/prettify-jsdoc.css deleted file mode 100644 index 5a2526e..0000000 --- a/node_modules/homey-meshdriver/docs/styles/prettify-jsdoc.css +++ /dev/null @@ -1,111 +0,0 @@ -/* JSDoc prettify.js theme */ - -/* plain text */ -.pln { - color: #000000; - font-weight: normal; - font-style: normal; -} - -/* string content */ -.str { - color: #006400; - font-weight: normal; - font-style: normal; -} - -/* a keyword */ -.kwd { - color: #000000; - font-weight: bold; - font-style: normal; -} - -/* a comment */ -.com { - font-weight: normal; - font-style: italic; -} - -/* a type name */ -.typ { - color: #000000; - font-weight: normal; - font-style: normal; -} - -/* a literal value */ -.lit { - color: #006400; - font-weight: normal; - font-style: normal; -} - -/* punctuation */ -.pun { - color: #000000; - font-weight: bold; - font-style: normal; -} - -/* lisp open bracket */ -.opn { - color: #000000; - font-weight: bold; - font-style: normal; -} - -/* lisp close bracket */ -.clo { - color: #000000; - font-weight: bold; - font-style: normal; -} - -/* a markup tag name */ -.tag { - color: #006400; - font-weight: normal; - font-style: normal; -} - -/* a markup attribute name */ -.atn { - color: #006400; - font-weight: normal; - font-style: normal; -} - -/* a markup attribute value */ -.atv { - color: #006400; - font-weight: normal; - font-style: normal; -} - -/* a declaration */ -.dec { - color: #000000; - font-weight: bold; - font-style: normal; -} - -/* a variable name */ -.var { - color: #000000; - font-weight: normal; - font-style: normal; -} - -/* a function name */ -.fun { - color: #000000; - font-weight: bold; - font-style: normal; -} - -/* Specify class=linenums on a pre to get line numbering */ -ol.linenums { - margin-top: 0; - margin-bottom: 0; -} diff --git a/node_modules/homey-meshdriver/docs/styles/prettify-tomorrow.css b/node_modules/homey-meshdriver/docs/styles/prettify-tomorrow.css deleted file mode 100644 index b6f92a7..0000000 --- a/node_modules/homey-meshdriver/docs/styles/prettify-tomorrow.css +++ /dev/null @@ -1,132 +0,0 @@ -/* Tomorrow Theme */ -/* Original theme - https://github.com/chriskempson/tomorrow-theme */ -/* Pretty printing styles. Used with prettify.js. */ -/* SPAN elements with the classes below are added by prettyprint. */ -/* plain text */ -.pln { - color: #4d4d4c; } - -@media screen { - /* string content */ - .str { - color: #718c00; } - - /* a keyword */ - .kwd { - color: #8959a8; } - - /* a comment */ - .com { - color: #8e908c; } - - /* a type name */ - .typ { - color: #4271ae; } - - /* a literal value */ - .lit { - color: #f5871f; } - - /* punctuation */ - .pun { - color: #4d4d4c; } - - /* lisp open bracket */ - .opn { - color: #4d4d4c; } - - /* lisp close bracket */ - .clo { - color: #4d4d4c; } - - /* a markup tag name */ - .tag { - color: #c82829; } - - /* a markup attribute name */ - .atn { - color: #f5871f; } - - /* a markup attribute value */ - .atv { - color: #3e999f; } - - /* a declaration */ - .dec { - color: #f5871f; } - - /* a variable name */ - .var { - color: #c82829; } - - /* a function name */ - .fun { - color: #4271ae; } } -/* Use higher contrast and text-weight for printable form. */ -@media print, projection { - .str { - color: #060; } - - .kwd { - color: #006; - font-weight: bold; } - - .com { - color: #600; - font-style: italic; } - - .typ { - color: #404; - font-weight: bold; } - - .lit { - color: #044; } - - .pun, .opn, .clo { - color: #440; } - - .tag { - color: #006; - font-weight: bold; } - - .atn { - color: #404; } - - .atv { - color: #060; } } -/* Style */ -/* -pre.prettyprint { - background: white; - font-family: Consolas, Monaco, 'Andale Mono', monospace; - font-size: 12px; - line-height: 1.5; - border: 1px solid #ccc; - padding: 10px; } -*/ - -/* Specify class=linenums on a pre to get line numbering */ -ol.linenums { - margin-top: 0; - margin-bottom: 0; } - -/* IE indents via margin-left */ -li.L0, -li.L1, -li.L2, -li.L3, -li.L4, -li.L5, -li.L6, -li.L7, -li.L8, -li.L9 { - /* */ } - -/* Alternate shading for lines */ -li.L1, -li.L3, -li.L5, -li.L7, -li.L9 { - /* */ } diff --git a/node_modules/homey-meshdriver/docs/zwave_ZwaveDevice.js.html b/node_modules/homey-meshdriver/docs/zwave_ZwaveDevice.js.html deleted file mode 100644 index bb41b6d..0000000 --- a/node_modules/homey-meshdriver/docs/zwave_ZwaveDevice.js.html +++ /dev/null @@ -1,515 +0,0 @@ - - - - - JSDoc: Source: zwave/ZwaveDevice.js - - - - - - - - - - -
- -

Source: zwave/ZwaveDevice.js

- - - - - - -
-
-
'use strict';
-
-const MeshDevice = require('../MeshDevice.js');
-
-const Homey = require('homey');
-
-const SYSTEM_CAPABILITIES = [
-	'onoff'	
-];
-
-/**
- * Foo
- */
-class ZwaveDevice extends MeshDevice {
-
-	/*
-	 *	Homey methods
-	*/
-	
-	/**
-	 * @private
-	 */
-	onInit() {
-		super.onInit('zwave');
-		
-		this._capabilities = {};
-		this._settings = {};
-		this._reportListeners = {};
-		this._pollIntervals = {};
-		this._pollIntervalsKeys = {};
-		
-		this.once('__meshInit', () => {
-			this.log('ZwaveDevice has been inited');
-			this.onMeshInit && this.onMeshInit();
-		});
-	}
-	
-	onSettings( oldSettings, newSettings, changedKeysArr ) {
-		
-		for( let i = 0; i < changedKeysArr.length; i++ ) {
-			let changedKey = changedKeysArr[i];
-			let newValue = newSettings[changedKey];
-			
-			// check for poll interval
-			if( this._pollIntervalsKeys[ changedKey ] ) {
-				this._setPollInterval(
-					this._pollIntervalsKeys[ changedKey ].capabilityId,
-					this._pollIntervalsKeys[ changedKey ].commandClassId,
-					newValue
-				);
-				continue;
-			}
-			
-			let manifestSetting;
-			let manifest = this.getDriver().getManifest();
-			if( manifest && manifest.settings ) {
-				for( let j = 0; j < manifest.settings.length; j++ ) {
-					let setting = manifest.settings[j];
-					if( setting.id !== changedKey ) continue;
-					manifestSetting = setting.zwave;
-				}
-			}
-			
-			if( typeof manifestSetting === 'undefined' ) continue;
-			
-			// get the parser
-			let parser = this._settings[changedKey] || this._systemSettingParser;
-			if( typeof parser !== 'function' )
-				return Promise.reject( new Error('invalid_parser') );
-			
-			let parsedValue = parser( newValue, manifestSetting );
-			if( parsedValue instanceof Error )
-				return Promise.reject( parsedValue );
-			
-			if( !Buffer.isBuffer(parsedValue) )
-				return Promise.reject( new Error('invalid_buffer') );
-				
-			if( parsedValue.length !== manifestSetting.size )
-				return Promise.reject( new Error('invalid_buffer_length') );
-							
-			this.node.CommandClass.COMMAND_CLASS_CONFIGURATION.CONFIGURATION_SET({
-				'Parameter Number': manifestSetting.index,
-				'Level': {
-					'Size': parsedValue.length,
-					'Default': false,
-				},
-				'Configuration Value': parsedValue,
-			}, ( err, result ) => {
-				if( err ) return this._debug('CONFIGURATION_SET', err);
-			});
-			
-		}
-			
-		return Promise.resolve();
-	}
-	
-	/*
-		Private methods
-	*/
-	
-	_systemSettingParser( newValue, manifestSetting ) {
-		
-		if( typeof newValue === 'boolean' ) {
-			return new Buffer([ (newValue === true ) ? 1 : 0]);
-		}
-		
-		if( typeof newValue === 'number' || parseInt(newSettingsObj[changedKey], 10).toString() === newSettingsObj[changedKey] ) {
-			if( manifestSetting.signed === false ) {
-
-				try {
-					let buf = new Buffer(manifestSetting.size);
-						buf.writeUIntBE(newValue, 0, manifestSetting.size);
-					return buf;
-				} catch( err ) {
-					return err;
-				}
-
-			} else {
-
-				try {
-					let buf = new Buffer(manifestSetting.size);
-						buf.writeIntBE(newValue, 0, manifestSetting.size);
-					return buf;
-				} catch( err ) {
-					return err;
-				}
-
-			}
-		}
-	}
-	
-	_registerCapabilityGet( capabilityId, commandClassId ) {
-		
-		let capabilityGetObj = this._getCapabilityObj('get', capabilityId, commandClassId);
-		if( capabilityGetObj instanceof Error ) return capabilityGetObj;
-		
-		// get initial value on start if null, unless it's an offline battery device and the getOnWakeUp flag is also set
-		if( capabilityGetObj.opts.getOnStart
-		 && this.getCapabilityValue( capabilityId ) === null
-		 && !(this.node.battery && this.node.online === false && capabilityGetObj.opts.getOnWakeUp === true) ) {
-			this._getCapabilityValue( capabilityId, commandClassId );
-		}
-		
-		if( capabilityGetObj.opts.getOnOnline ) {
-			this.node.on('online', () => {
-				this._debug(`Node online, getting commandClassId '${commandClassId}' for capabilityId '${capabilityId}'`);
-				this._getCapabilityValue( capabilityId, commandClassId );
-			});
-		}
-		
-		if( capabilityGetObj.opts.pollInterval ) {
-			
-			let pollInterval;			
-				
-			if( typeof capabilityGetObj.opts.pollInterval === 'number' ) {
-				pollInterval = capabilityGetObj.opts.pollInterval;
-			}
-			
-			if( typeof capabilityGetObj.opts.pollInterval === 'string' ) {
-				pollInterval = this.getSetting( capabilityGetObj.opts.pollInterval );
-				this._pollIntervalsKeys[ capabilityGetObj.opts.pollInterval ] = {
-					capabilityId: capabilityId,
-					commandClassId: commandClassId
-				}
-			}
-			
-			this._setPollInterval( capabilityId, commandClassId, pollInterval );
-			
-		}
-				
-	}
-	
-	_setPollInterval( capabilityId, commandClassId, pollInterval ) {
-				
-		this._pollIntervals[ capabilityId ] = this._pollIntervals[ capabilityId ] || {};
-		
-		if( this._pollIntervals[ capabilityId ][ commandClassId ] )
-			clearInterval(this._pollIntervals[ capabilityId ][ commandClassId ]);
-			
-		if( pollInterval < 1 ) return;
-		
-		this._pollIntervals[ capabilityId ][ commandClassId ] = setInterval(() => {
-			this._debug(`Polling commandClassId '${commandClassId}' for capabilityId '${capabilityId}'`);
-			this._getCapabilityValue( capabilityId, commandClassId );					
-		}, pollInterval);
-		
-	}
-	
-	_getCapabilityValue( capabilityId, commandClassId ) {
-		
-		let capabilityGetObj = this._getCapabilityObj('get', capabilityId, commandClassId);
-		if( capabilityGetObj instanceof Error ) return capabilityGetObj;
-			
-		let parsedPayload = {};
-		
-		if( typeof capabilityGetObj.parser === 'function' ) {
-			parsedPayload = capabilityGetObj.parser();
-			if( parsedPayload instanceof Error ) return this.error( parsedPayload );
-		}
-					
-		try {
-			let commandClass = capabilityGetObj.node.CommandClass[ `COMMAND_CLASS_${capabilityGetObj.commandClassId}` ];
-			let command = commandClass[ capabilityGetObj.commandId ];
-							
-			return command.call( command, parsedPayload, ( err, payload ) => {
-				if( err ) return this.error( err );
-				return this._onReport( capabilityId, payload );
-			});
-		} catch( err ) {
-			return this.error( err );
-		}
-		
-	}
-	
-	_registerCapabilitySet( capabilityId, commandClassId ) {
-		
-		let capabilitySetObj = this._getCapabilityObj('set', capabilityId, commandClassId);
-		if( capabilitySetObj instanceof Error ) return capabilitySetObj;
-				
-		this.registerCapabilityListener( capabilityId, ( value, opts ) => {
-			
-			if( typeof capabilitySetObj.parser !== 'function' ) return Promise.reject( new Error('missing_parser') );
-			
-			let parsedPayload = capabilitySetObj.parser( value, opts );
-			if( parsedPayload instanceof Error ) return Promise.reject( parsedPayload );
-			
-			try {
-				let commandClass = capabilitySetObj.node.CommandClass[ `COMMAND_CLASS_${capabilitySetObj.commandClassId}` ];
-				let command = commandClass[ capabilitySetObj.commandId ];
-				
-				return command.call( command, parsedPayload );
-			} catch( err ) {
-				return Promise.reject( err );
-			}
-			
-		});
-		
-	}
-	
-	_registerCapabilityRealtime( capabilityId, commandClassId ) {
-		
-		let capabilityReportObj = this._getCapabilityObj('report', capabilityId, commandClassId);
-		if( capabilityReportObj instanceof Error ) return capabilityReportObj;
-				
-		let commandClass = capabilityReportObj.node.CommandClass[ `COMMAND_CLASS_${capabilityReportObj.commandClassId}` ];
-		if( typeof commandClass === 'undefined' ) return this.error('Invalid commandClass:', capabilityReportObj.commandClassId);
-			
-		commandClass.on('report', ( command, payload ) => {
-			if( command.name !== capabilityReportObj.commandId ) return;
-			
-			let parsedPayload = this._onReport( capabilityId, payload );
-			if( parsedPayload instanceof Error ) return;
-			
-			if( this._reportListeners[ commandClassId ]
-			 && this._reportListeners[ commandClassId ][ command.name ] ) {
-				 this._reportListeners[ commandClassId ][ command.name ]( payload, parsedPayload );
-			 }
-		});
-	}
-	
-	_onReport( capabilityId, payload ) {
-		
-		let capabilityReportObj = this._getCapabilityObj('report', capabilityId);
-		if( capabilityReportObj instanceof Error ) return capabilityReportObj;
-		if( typeof capabilityReportObj.parser !== 'function' ) return;
-				
-		let parsedPayload = capabilityReportObj.parser( payload );
-		if( parsedPayload instanceof Error ) return;
-		if( parsedPayload === null ) return;
-				
-		this.setCapabilityValue( capabilityId, parsedPayload );
-		
-		return parsedPayload;
-		
-		
-	}
-	
-	_getCapabilityObj( commandType, capabilityId, commandClassId ) {
-				
-		let capability = this._capabilities[ capabilityId ];
-		let commandClass;
-		
-		if( typeof commandClassId !== 'undefined' ) {
-			commandClass = capability[ commandClassId ];
-		} else {		
-			for( let commandClassId in capability ) {
-				commandClass = capability[ commandClassId ];
-			}
-		}
-		
-		if( typeof commandClass === 'undefined' )
-			return new Error('missing_zwave_capability');				
-			
-		let commandId = commandClass[ commandType ];
-		let parser = commandClass[`${commandType}Parser`] || null;
-		let opts = commandClass[`${commandType}Opts`] || {};		
-		let node = this.node;
-		
-		if( typeof commandClass.multiChannelNodeId === 'number' ) {
-			node = this.node.MultiChannelNodes[ commandClass.multiChannelNodeId ];
-			if( typeof node === 'undefined' )
-				throw new Error(`Invalid multiChannelNodeId ${multiChannelNodeId} for capabilityId ${capabilityId} and commandClassId ${commandClassId}`);
-		}
-					
-		if( typeof commandId === 'string' ) return {
-			commandClassId	: commandClassId,
-			commandId		: commandId,
-			parser			: parser,
-			opts			: opts,
-			node			: node
-		}
-		
-		return new Error('missing_zwave_capability');		
-		
-	}
-	
-	/*
-	 * Public methods
-	 */
-	
-	/**
-	 * Register a Homey Capability with a Command Class.
-	 * @param {string} capabilityId - The Homey capability id (e.g. `onoff`)
-	 * @param {string} commandClassId - The command class id (e.g. `BASIC`)
-	 * @param {Object} [opts]
-	 * @param {String} [opts.get] - The command to get a value (e.g. `BASIC_GET`)
-	 * @param {String} [opts.getParser] - The function that is called when a GET request is made. Should return an Object.
-	 * @param {Object} [opts.getOpts
-	 * @param {Boolean} [opts.getOpts.getOnStart] - Get the value on App start
-	 * @param {Boolean} [opts.getOpts.getOnOnline] - Get the value when the device is marked as online
-	 * @param {Number|String} [opts.getOpts.pollInterval] - Interval to poll with a GET request. When provided a string, the device's setting with the string as ID will be used (e.g. `poll_interval`)
-	 * @param {String} [opts.set] - The command to set a value (e.g. `BASIC_SET`)
-	 * @param {Function} [opts.setParser] - The function that is called when a SET request is made. Should return an Object.
-	 * @param {Mixed} [opts.setParser.value] - The value of the Homey capability
-	 * @param {Object} [opts.setParser.opts] - Options for the capability command
-	 * @param {String} [opts.report] - The command to report a value (e.g. `BASIC_REPORT`)
-	 * @param {Function} [opts.reportParser] - The function that is called when a REPORT request is made. Should return an Object.
-	 * @param {Object} [opts.reportParser.report] - The report object
-	 * @param {Number} [opts.multiChannelNodeId] - An ID to use a MultiChannel Node for this capability
-	 */
-	registerCapability( capabilityId, commandClassId, userOpts ) {
-		
-		// register the Z-Wave capability listener
-		this._capabilities[ capabilityId ] = this._capabilities[ capabilityId ] || {};
-		this._capabilities[ capabilityId ][ commandClassId ] = this._capabilities[ capabilityId ][ commandClassId ] || {};
-		
-		// merge systemOpts & userOpts
-		let systemOpts = {};
-		try {
-			systemOpts = require(`./system/capabilities/${capabilityId}/${commandClassId}.js`);
-		} catch( err ) {
-			if( err.code !== 'MODULE_NOT_FOUND' ) {
-				process.nextTick(() => {
-					throw err;
-				});
-			}
-		}
-		
-		this._capabilities[ capabilityId ][ commandClassId ] = Object.assign(
-			systemOpts || {},
-			userOpts || {}
-		);
-		
-		// register get/set/realtime
-		this._registerCapabilityRealtime( capabilityId, commandClassId );
-		this._registerCapabilitySet( capabilityId, commandClassId );
-		this._registerCapabilityGet( capabilityId, commandClassId );
-	}
-	
-	
-	/**
-	 * Register a setting parser, which is called when a setting has changed.
-	 * @param {string} settingId - The setting ID, as specified in `/app.json`
-	 * @param {Function} parserFn - The parser function, must return a Buffer
-	 * @param {Mixed} parserFn.value - The setting value
-	 * @param {Mixed} parserFn.zwaveObj - The setting's `zwave` object as defined in `/app.json`
-	 */
-	registerSetting( settingId, parserFn ) {
-		this._settings[ settingId ] = parserFn;
-	}
-	
-	
-	
-	/**
-	 * Register a report listener, which is called when a report has been received.
-	 * @param {string} commandClassId - The ID of the Command Class (e.g. `BASIC`)
-	 * @param {string} commandId - The ID of the Command (e.g. `BASIC_REPORT`)
-	 * @param {Function} triggerFn
-	 * @param {Object} triggerFn.rawReport - The raw report
-	 * @param {Object} triggerFn.parsedReport - The parsed report (parsed by the first available `reportParser` method)
-	 */
-	registerReportListener( commandClassId, commandId, triggerFn ) {
-		this._reportListeners[ commandClassId ] = this._reportListeners[ commandClassId ] || {};
-		this._reportListeners[ commandClassId ][ commandId ] = triggerFn;
-	}
-	
-	
-	/**
-	 * Print the current Node information with Command Classes and their versions
-	 */
-	printNode() {
-		this.log('------------------------------------------');
-
-		// log the entire Node
-		this.log('Node:', this.getData().token);
-		this.log('- Battery:', this.node.battery);
-
-		Object.keys(this.node.CommandClass).forEach(commandClassId => {
-			this.log('- CommandClass:', commandClassId);
-			this.log('-- Version:', this.node.CommandClass[commandClassId].version);
-			this.log('-- Commands:');
-
-			Object.keys(this.node.CommandClass[commandClassId]).forEach(key => {
-				if (typeof this.node.CommandClass[commandClassId][key] === 'function' && key === key.toUpperCase()) {
-					this.log('---', key);
-				}
-			});
-		});
-
-		if (this.node.MultiChannelNodes) {
-			Object.keys(this.node.MultiChannelNodes).forEach(multiChannelNodeId => {
-				this.log('- MultiChannelNode:', multiChannelNodeId);
-
-				Object.keys(this.node.MultiChannelNodes[multiChannelNodeId].CommandClass).forEach(commandClassId => {
-					this.log('-- CommandClass:', commandClassId);
-					this.log('--- Version:',
-						this.node.MultiChannelNodes[multiChannelNodeId].CommandClass[commandClassId].version);
-					this.log('--- Commands:');
-
-					Object
-						.keys(this.node.MultiChannelNodes[multiChannelNodeId].CommandClass[commandClassId])
-						.forEach(key => {
-							if (typeof this.node.MultiChannelNodes[multiChannelNodeId].CommandClass[commandClassId][key]
-								=== 'function' && key === key.toUpperCase()) {
-								this.log('----', key);
-							}
-						});
-				});
-			});
-		}
-
-		this.log('------------------------------------------');
-		this.log('');
-
-		Object.keys(this.node.CommandClass).forEach(commandClassId => {
-			this.node.CommandClass[commandClassId].on('report', function () {
-				this.log(`node.CommandClass['${commandClassId}'].on('report')`, 'arguments:', arguments);
-			}.bind(this));
-		});
-
-		if (this.node.MultiChannelNodes) {
-			Object.keys(this.node.MultiChannelNodes).forEach(multiChannelNodeId => {
-				Object.keys(this.node.MultiChannelNodes[multiChannelNodeId].CommandClass).forEach(commandClassId => {
-					this.node.MultiChannelNodes[multiChannelNodeId].CommandClass[commandClassId].on('report', function () {
-						this.log(`node.MultiChannelNodes['${multiChannelNodeId}'].
-						CommandClass['${commandClassId}'].on('report')`, 'arguments:', arguments);
-					}.bind(this));
-				});
-			});
-		}
-	}
-	
-}
-
-module.exports = ZwaveDevice;
-
-
- - - - -
- - - -
- -
- Documentation generated by JSDoc 3.5.0 on Mon Jul 10 2017 20:12:19 GMT+0200 (CEST) -
- - - - - diff --git a/node_modules/homey-meshdriver/lib/color-space/LICENSE b/node_modules/homey-meshdriver/lib/color-space/LICENSE deleted file mode 100644 index 00d2e13..0000000 --- a/node_modules/homey-meshdriver/lib/color-space/LICENSE +++ /dev/null @@ -1,24 +0,0 @@ -This is free and unencumbered software released into the public domain. - -Anyone is free to copy, modify, publish, use, compile, sell, or -distribute this software, either in source code form or as a compiled -binary, for any purpose, commercial or non-commercial, and by any -means. - -In jurisdictions that recognize copyright laws, the author or authors -of this software dedicate any and all copyright interest in the -software to the public domain. We make this dedication for the benefit -of the public at large and to the detriment of our heirs and -successors. We intend this dedication to be an overt act of -relinquishment in perpetuity of all present and future rights to this -software under copyright law. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR -OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, -ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -OTHER DEALINGS IN THE SOFTWARE. - -For more information, please refer to \ No newline at end of file diff --git a/node_modules/homey-meshdriver/lib/color-space/ciecam.js b/node_modules/homey-meshdriver/lib/color-space/ciecam.js deleted file mode 100644 index bc8fd81..0000000 --- a/node_modules/homey-meshdriver/lib/color-space/ciecam.js +++ /dev/null @@ -1,28 +0,0 @@ -/** - * CIECAM02 http://en.wikipedia.org/wiki/CIECAM02 - * - * @todo add transforms - * - * @module cam - */ -'use strict' - -var xyz = require('./xyz'); - - -var cam = module.exports = { - name: 'cam', - - alias: ['ciecam', 'ciecam02'], -}; - - -//extend xyz -xyz.cam = function(xyz){ - var x = xyz[0], y = xyz[1], z = xyz[2]; - //TODO -}; - -cam.xyz = function () { - -} diff --git a/node_modules/homey-meshdriver/lib/color-space/cmy.js b/node_modules/homey-meshdriver/lib/color-space/cmy.js deleted file mode 100644 index 495db22..0000000 --- a/node_modules/homey-meshdriver/lib/color-space/cmy.js +++ /dev/null @@ -1,54 +0,0 @@ -/** - * @module color-space/cmy - */ -'use strict' - -var rgb = require('./rgb'); - -var cmy = module.exports = { - name: 'cmy', - min: [0,0,0], - max: [100,100,100], - channel: ['cyan', 'magenta', 'yellow'], - alias: ['CMY'] -}; - - -/** - * CMY to RGB - * - * @param {Array} cmy Channels - * - * @return {Array} RGB channels - */ -cmy.rgb = function(cmy) { - var c = cmy[0] / 100, - m = cmy[1] / 100, - y = cmy[2] / 100; - - return [ - (1 - c) * 255, - (1 - m) * 255, - (1 - y) * 255 - ]; -}; - - -/** - * RGB to CMY - * - * @param {Array} rgb channels - * - * @return {Array} CMY channels - */ -rgb.cmy = function(rgb) { - var r = rgb[0] / 255, - g = rgb[1] / 255, - b = rgb[2] / 255; - - return [ - (1-r) * 100 || 0, - (1-g) * 100 || 0, - (1-b) * 100 || 0 - ]; -}; diff --git a/node_modules/homey-meshdriver/lib/color-space/cmyk.js b/node_modules/homey-meshdriver/lib/color-space/cmyk.js deleted file mode 100644 index 831b1e8..0000000 --- a/node_modules/homey-meshdriver/lib/color-space/cmyk.js +++ /dev/null @@ -1,42 +0,0 @@ -/** - * @module color-space/cmyk - */ -'use strict' - -var rgb = require('./rgb'); - -module.exports = { - name: 'cmyk', - min: [0,0,0,0], - max: [100,100,100,100], - channel: ['cyan', 'magenta', 'yellow', 'black'], - alias: ['CMYK'], - - rgb: function(cmyk) { - var c = cmyk[0] / 100, - m = cmyk[1] / 100, - y = cmyk[2] / 100, - k = cmyk[3] / 100, - r, g, b; - - r = 1 - Math.min(1, c * (1 - k) + k); - g = 1 - Math.min(1, m * (1 - k) + k); - b = 1 - Math.min(1, y * (1 - k) + k); - return [r * 255, g * 255, b * 255]; - } -}; - - -//extend rgb -rgb.cmyk = function(rgb) { - var r = rgb[0] / 255, - g = rgb[1] / 255, - b = rgb[2] / 255, - c, m, y, k; - - k = Math.min(1 - r, 1 - g, 1 - b); - c = (1 - r - k) / (1 - k) || 0; - m = (1 - g - k) / (1 - k) || 0; - y = (1 - b - k) / (1 - k) || 0; - return [c * 100, m * 100, y * 100, k * 100]; -}; diff --git a/node_modules/homey-meshdriver/lib/color-space/coloroid.js b/node_modules/homey-meshdriver/lib/color-space/coloroid.js deleted file mode 100644 index 84aa48e..0000000 --- a/node_modules/homey-meshdriver/lib/color-space/coloroid.js +++ /dev/null @@ -1,281 +0,0 @@ - -/** - * Architects and visual constructors hungarian color space. - * - * http://hej.sze.hu/ARC/ARC-030520-A/arc030520a.pdf - * - * @module color-space/coloroid - */ -'use strict' - -var xyy = require('./xyy'); -var xyz = require('./xyz'); - - -/** - * Main color space object - */ -var coloroid = { - name: 'coloroid', - alias: ['ATV'], - - //hue, saturation, luminosity - //note that hue values are ids, not the numbers - not every value is possible - //e.g. 38 will be rounded to 36 - channel: ['A','T','V'], - min: [10, 0, 0], - max: [76, 100, 100] -}; - - -/** - * Coloroid table - * Regression of values is almost impossible, as hues don’t correlate - * Even angle values are picked very inconsistently, based on aesthetical evaluation. - * - * - tgф, ctgф are removed, ф is searched instead - * - eλ = xλ + yλ + zλ - * - λ is removed as not used - */ -coloroid.table = [ - //A angle eλ xλ yλ - [ 10, 59.0, 1.724349, 0.44987, 0.53641 ], - [ 11, 55.3, 1.740844, 0.46248, 0.52444 ], - [ 12, 51.7, 1.754985, 0.47451, 0.51298 ], - [ 13, 48.2, 1.767087, 0.48601, 0.50325 ], - [ 14, 44.8, 1.775953, 0.49578, 0.49052 ], - [ 15, 41.5, 1.785073, 0.50790, 0.43035 ], - [ 16, 38.2, 1.791104, 0.51874, 0.46934 ], - [ 20, 34.9, 1.794831, 0.52980, 0.45783 ], - [ 21, 31.5, 1.798664, 0.54137, 0.44559 ], - [ 22, 28.0, 1.794819, 0.55367, 0.43253 ], - [ 23, 24.4, 1.789610, 0.56680, 0.41811 ], - [ 24, 20.6, 1.809483, 0.58128, 0.40176 ], - [ 25, 16.6, 1.760983, 0.59766, 0.38300 ], - [ 26, 12.3, 1.723443, 0.61653, 0.36061 ], - [ 30, 7.7, 1.652891, 0.63896, 0.33358 ], - [ 31, 2.8, 1.502607, 0.66619, 0.29930 ], - [ 32, -2.5, 1.072500, 0.70061, 0.26753 ], - [ 33, -8.4, 1.136637, 0.63925, 0.22631 ], - [ 34, -19.8, 1.232286, 0.53962, 0.19721 ], - [ 35, -31.6, 1.310120, 0.50340, 0.17495 ], - [ 40, -43.2, 1.376610, 0.46041, 0.15603 ], - [ 41, -54.6, 1.438692, 0.42386, 0.13846 ], - [ 42, -65.8, 1.501582, 0.38991, 0.12083 ], - [ 43, -76.8, 1.570447, 0.35586, 0.10328 ], - [ 44, -86.8, 1.645583, 0.32195, 0.08496 ], - [ 45, -95.8, 1.732083, 0.28657, 0.05155 ], - [ 46, -108.4, 1.915753, 0.22202, 0.01771 ], - [ 50, -117.2, 2.146310, 0.15664, 0.05227 ], - [ 51, -124.7, 1.649939, 0.12736, 0.09020 ], - [ 52, -131.8, 1.273415, 0.10813, 0.12506 ], - [ 53, -138.5, 1.080809, 0.09414, 0.15741 ], - [ 54, -145.1, 0.957076, 0.03249, 0.18958 ], - [ 55, -152.0, 0.868976, 0.07206, 0.24109 ], - [ 56, -163.4, 0.771731, 0.05787, 0.30378 ], - [ 60, -177.2, 0.697108, 0.04353, 0.35696 ], - [ 61, 171.6, 0.655803, 0.03291, 0.41971 ], - [ 62, 152.4, 0.623958, 0.02240, 0.49954 ], - [ 63, 148.4, 0.596037, 0.01196, 0.60321 ], - [ 64, 136.8, 0.607413, 0.00425, 0.73542 ], - [ 65, 125.4, 0.659923, 0.01099, 0.83391 ], - [ 66, 114.2, 0.859517, 0.08050, 0.77474 ], - [ 70, 103.2, 1.195683, 0.20259, 0.70460 ], - [ 71, 93.2, 1.407534, 0.28807, 0.65230 ], - [ 72, 84.2, 1.532829, 0.34422, 0.61930 ], - [ 73, 77.3, 1.603792, 0.37838, 0.59533 ], - [ 74, 71.6, 1.649448, 0.40290, 0.57716 ], - [ 75, 66.9, 1.681080, 0.42141, 0.56222 ], - [ 76, 62.8, 1.704979, 0.43647, 0.54895 ] -]; - - -/** -Coloroid table source -Some negative angle typos are fixed. -Angle typo on the A=62 is fixed. -xλ typo on A=73 is fixed. - - -Beware, tg/ctg values don’t agree with angle. -Also don’t trust the calculated eλ = xλ + yλ + zλ. -Also, unfortunately, some values might be wrong, as coloroid range looks uneven. - -A λ ф tg ф ctg ф xλ yλ zλ xλ yλ eλ - -10 570.83 59.0 0.6009 0.775745 0.946572 0.002032 0.44987 0.54895 1.724349 -11 572.64 55.3 0.6924 0.805130 0.933804 0.001910 0.46248 0.53641 1.740845 -12 574.38 51.7 0.7898 0.832782 0.920395 0.001808 0.47451 0.52444 1.754986 -13 576.06 48.2 1.1180 0.8941 0.858841 0.906482 0.001764 0.48601 0.51298 1.767088 -14 577.50 44.8 0.9330 1.0070 0.880488 0.893741 0.001724 0.49578 0.50325 1.775953 -15 579.31 41.5 0.8847 0.906652 0.876749 0.001672 0.50790 0.49052 1.785074 -16 580.95 38.2 0.7869 0.929124 0.860368 0.001612 0.51874 0.43035 1.791104 -20 582.65 34.9 0.6976 0.950909 0.842391 0.001531 0.52980 0.46934 1.794831 -21 584.46 31.5 0.6128 0.972454 0.824779 0.001431 0.54137 0.45783 1.798665 -22 586.43 28.0 0.5317 0.993753 0.799758 0.001308 0.55367 0.44559 1.794822 -23 588.59 24.4 0.4536 1.014350 0.774090 0.001170 0.56680 0.43253 1.789610 -24 591.06 20.6 0.3759 1.034402 0.774014 0.001067 0.58128 0.41811 1.779484 -25 594.00 16.6 0.2974 1.052466 0.707496 0.001021 0.59766 0.40176 1.760984 -26 597.74 12.3 0.2180 1.062544 0.660001 0.000898 0.61653 0.38300 1.723444 -30 602.72 7.7 0.1352 1.056125 0.596070 0.000696 0.63896 0.36061 1.652892 -31 610.14 2.8 0.0489 1.001027 0.501245 0.000335 0.66619 0.33358 1.502608 -32 625.00 -2.5 -0.0435 0.751400 0.321000 0.000100 0.70061 0.29930 1.072500 -33 -492.79 -8.4 -0.1477 0.726603 0.304093 0.105941 0.63925 0.26753 1.136638 -34 -495.28 -19.8 -0.3600 0.689620 0.278886 0.263780 0.53962 0.22631 1.232286 -35 -498.45 -31.6 -0.6152 0.659523 0.258373 0.392224 0.50340 0.19721 1.310122 -40 -502.69 -43.2 -0.9391 0.633815 0.240851 0.501944 0.46041 0.17495 1.376610 -41 -509.12 -54.6 -0.7107 0.609810 0.224490 0.604392 0.42386 0.15603 1.438692 -42 -520.40 -65.8 -0.4494 0.585492 0.207915 0.708175 0.38991 0.13846 1.501583 -43 -536.31 -76.8 -0.2345 0.558865 0.189767 0.821815 0.35586 0.12083 1.570447 -44 -548.11 -86.8 -0.0559 0.529811 0.169965 0.945807 0.32195 0.10328 1.645584 -45 -555.96 -95.8 -0.1016 0.496364 0.147168 1.088551 0.28657 0.08496 1.732085 -46 -564.18 -108.4 0.3327 0.425346 0.098764 1.391643 0.22202 0.05155 1.915754 -50 450.00 -117.2 0.5141 0.336200 0.038000 1.772110 0.15664 0.01771 2.146310 -51 468.71 -124.7 0.6924 0.210174 0.086198 1.353567 0.12736 0.05227 1.649940 -52 475.44 -131.8 0.8941 0.137734 0.114770 1.020911 0.10813 0.09020 1.273415 -53 479.00 -138.5 0.8847 0.101787 0.135067 0.843955 0.09414 0.12506 1.080809 -54 482.04 -145.1 0.6976 0.079004 0.150709 0.727363 0.03249 0.15741 0.957577 -55 484.29 -152.0 0.5317 0.062658 0.164626 0.641692 0.07206 0.18958 0.868977 -56 487.31 -163.4 0.2981 0.044691 0.185949 0.541091 0.05787 0.24109 0.771732 -60 490.40 -177.2 0.0489 0.030372 0.211659 0.455077 0.04353 0.30378 0.697110 -61 492.72 171.6 -0.1477 0.021655 0.234022 0.400126 0.03291 0.35696 0.655804 -62 495.28 125.4 -0.3600 0.013989 0.261843 0.348126 0.02240 0.41971 0.623969 -63 498.45 148.4 -0.6152 0.007215 0.301137 0.287685 0.01196 0.49954 0.596037 -64 502.69 136.8 -0.9391 -1.0650 0.002586 0.366425 0.238402 0.00425 0.60321 0.607414 -65 509.12 125.4 -1.4070 -0.7107 0.007260 0.485346 0.167317 0.01099 0.73542 0.659924 -66 520.40 114.2 -0.4494 0.066010 0.717274 0.076233 0.08050 0.83391 0.859523 -70 536.31 103.2 -0.2345 0.242272 0.926325 0.027086 0.20259 0.77474 1.195684 -71 548.11 93.2 -0.0559 0.406663 0.990587 0.010284 0.28807 0.70460 1.410097 -72 555.96 84.2 0.1016 0.527646 0.999862 0.005321 0.34422 0.65230 1.532830 -73 560.74 77.3 0.2254 0.606873 0.993224 0.003695 0.37838 0.61930 1.603793 -74 564.18 71.6 0.3327 0.664599 0.981981 0.002868 0.40290 0.59533 1.649449 -75 566.78 66.9 0.4265 0.708358 0.970252 0.002470 0.42141 0.57716 1.681081 -76 568.92 62.8 0.5140 0.744182 0.958592 0.002205 0.43647 0.56222 1.704981 -*/ - - - - -/** Create angle-sorted table */ -var table = coloroid.table; -var angleTable = [].concat(table.slice(-13),table.slice(0, -13)); - - -/** - * Some precalculations - * 2° D65 whitepoint is used - */ -var i = 'D65'; -var o = 2; - -var Xn = xyz.whitepoint[o][i][0]; -var Yn = xyz.whitepoint[o][i][1]; -var Zn = xyz.whitepoint[o][i][2]; - -var y0 = Xn / (Xn + Yn + Zn); -var x0 = Yn / (Xn + Yn + Zn); -var ew = (Xn + Yn + Zn) / 100; - - - -/** - * From xyY to coloroid - * - * @param {Array} arg xyY tuple - * - * @return {Array} ATV coloroid channels - */ -xyy.coloroid = function (arg) { - var x = arg[0], y = arg[1], Y = arg[2]; - - //coloroid luminocity is the same as hunter-lab lightness (the easier part) - var V = 10 * Math.sqrt(Y); - - //get the hue angle, -π ... +π - var angle = Math.atan2(y - y0, x - x0) * 180 / Math.PI; - var row; - - //find the closest row in the table - var prev = angleTable.length - 1; - for (var i = 0; i < angleTable.length; i++) { - if (angle > angleTable[i][1]) { - break; - } - prev = i; - } - //round instead of ceil - row = Math.abs(angleTable[i+1][1] - angle) > Math.abs(angleTable[prev][1] - angle) ? angleTable[i+1] : angleTable[prev]; - - //get hue id - var A = row[0]; - - //calc saturation - var yl = row[4], el = row[2], xl = row[3]; - - //yl should be scaled to 0..100; - var Yl = yl * el * 100; - - var T = 100 * Y*(x0*ew - x*ew) / (100*(x*el - xl*el) + Yl*(x0*ew - x*ew)); - // var T = 100 * Y*(1 - y*ew) / (100*(y*el - yl*el) + Yl*(1 - y*ew)); - - return [A, T, V]; -}; - - - - - -/** - * Backwise - from coloroid to xyY - * - * @param {Array} arg Coloroid values - * - * @return {Array} xyY values - */ -coloroid.xyy = function (arg) { - var A = arg[0], T = arg[1], V = arg[2]; - - //find the closest row in the table - var row; - for (var i = 0; i < table.length; i++) { - if (A <= table[i][0]) { - row = table[i]; - break; - } - } - - var yl = row[4], el = row[2], xl = row[3]; - - var Y = V*V / 100; - - var Yl = yl * el * 100; - - var x = (100*Y*x0*ew + 100*xl*el*T - Yl*T*x0*ew) / (100*T*el - Yl*T*ew + 100*Y*ew); - var y = (100*Y + 100*T*yl*el - Yl*T) / (Y*ew*100 + T*100*el - T*Yl*ew); - - // var x = (100*Y*ew*x0 + 100*T*el*xl - T*Yl*ew*x0) / (100*T*el - T*Yl*ew + 100*Y*ew); - // var y = 100*Y / (100*T*el + 100*T*ew*Yl + 100*ew*Y); - - // var x = (ew*x0*(V*V - 100*T*row[6]) + 100*T*el*xl) / (ew*(V*V - 100*T*row[6]) + 100*T*el); - // var y = V*V/(ew*(V*V + 100*T*row[6]) + 100*T*el); - - return [x,y,Y]; -}; - - - -/** Proper transformation to a XYZ (via xyY) */ -xyz.coloroid = function (arg) { - return xyy.coloroid(xyz.xyy(arg)); -}; -coloroid.xyz = function (arg) { - return xyy.xyz(coloroid.xyy(arg)); -}; - - - -module.exports = coloroid; - - - - diff --git a/node_modules/homey-meshdriver/lib/color-space/cubehelix.js b/node_modules/homey-meshdriver/lib/color-space/cubehelix.js deleted file mode 100644 index aa87912..0000000 --- a/node_modules/homey-meshdriver/lib/color-space/cubehelix.js +++ /dev/null @@ -1,78 +0,0 @@ -/** - * Cubehelix http://astron-soc.in/bulletin/11June/289392011.pdf - * - * @module color-space/cubehelix - */ -'use strict' - -var rgb = require('./rgb'); -var clamp = require('mumath/clamp'); - - -var cubehelix = module.exports = { - name: 'cubehelix', - channel: ['fraction'], - min: [0], - max: [1] -}; - - -/** Default options for space */ -var defaults = cubehelix.defaults = { - //0..3 - start: 0, - //-10..10 - rotation: 0.5, - //0..1+ - hue: 1, - //0..2 - gamma: 1 -}; - - -/** - * Transform cubehelix level to RGB - * - * @param {Number} fraction 0..1 cubehelix level - * @param {Object} options Mapping options, overrides defaults - * - * @return {Array} rgb tuple - */ -cubehelix.rgb = function(fraction, options) { - options = options || {}; - - if (fraction.length) fraction = fraction[0]; - - var start = options.start !== undefined ? options.start : defaults.start; - var rotation = options.rotation !== undefined ? options.rotation : defaults.rotation; - var gamma = options.gamma !== undefined ? options.gamma : defaults.gamma; - var hue = options.hue !== undefined ? options.hue : defaults.hue; - - var angle = 2 * Math.PI * (start/3 + 1.0 + rotation * fraction); - - fraction = Math.pow(fraction, gamma); - - var amp = hue * fraction * (1-fraction)/2.0; - - var r = fraction + amp*(-0.14861*Math.cos(angle)+1.78277*Math.sin(angle)); - var g = fraction + amp*(-0.29227*Math.cos(angle)-0.90649*Math.sin(angle)); - var b = fraction + amp*(+1.97294*Math.cos(angle)); - - r = clamp(r, 0, 1); - g = clamp(g, 0, 1); - b = clamp(b, 0, 1); - - return [r * 255, g * 255, b * 255]; -}; - - -/** - * RGB to cubehelix - * - * @param {Array} rgb RGB values - * - * @return {Array} cubehelix fraction(s) - */ -rgb.cubehelix = function(rgb) { - //TODO - there is no backwise conversion yet -}; diff --git a/node_modules/homey-meshdriver/lib/color-space/hcg.js b/node_modules/homey-meshdriver/lib/color-space/hcg.js deleted file mode 100644 index 4cf5449..0000000 --- a/node_modules/homey-meshdriver/lib/color-space/hcg.js +++ /dev/null @@ -1,171 +0,0 @@ -/** - * @module color-space/hcg - */ -'use strict' - -var rgb = require('./rgb'); -var hsl = require('./hsl'); -var hsv = require('./hsv'); -var hwb = require('./hwb'); -var mod = require('mumath/mod'); - - -module.exports = { - name: 'hcg', - min: [0,0,0], - max: [360,100,100], - channel: ['hue', 'chroma', 'gray'], - alias: ['HCG', 'HSG'], - - rgb: function(hcg) { - var h = hcg[0] / 360; - var c = hcg[1] / 100; - var g = hcg[2] / 100; - if (c === 0.0) { - return [g * 255, g * 255, g * 255]; - } - var hi = mod(h, 1) * 6; - var v = mod(hi, 1); - var pure = [0, 0, 0]; - var w = 1 - v; - switch (Math.floor(hi)) { - case 0: - pure[0] = 1; pure[1] = v; pure[2] = 0; break; - case 1: - pure[0] = w; pure[1] = 1; pure[2] = 0; break; - case 2: - pure[0] = 0; pure[1] = 1; pure[2] = v; break; - case 3: - pure[0] = 0; pure[1] = w; pure[2] = 1; break; - case 4: - pure[0] = v; pure[1] = 0; pure[2] = 1; break; - default: - pure[0] = 1; pure[1] = 0; pure[2] = w; - } - var mg = (1.0 - c) * g; - var rgb = [ - (c * pure[0] + mg) * 255, - (c * pure[1] + mg) * 255, - (c * pure[2] + mg) * 255 - ]; - return rgb; - }, - - hsl: function(hcg) { - var c = hcg[1] / 100; - var g = hcg[2] / 100; - var l = g * (1.0 - c) + 0.5 * c; - var s = 0; - if (l < 1.0 && l > 0.0) { - if (l < 0.5) { - s = c / (2 * l); - } else { - s = c / (2 * (1 - l)); - } - } - return [hcg[0], s * 100, l * 100]; - }, - - hsv: function(hcg){ - var c = hcg[1] / 100; - var g = hcg[2] / 100; - var v = c + g * (1.0 - c); - var res; - if (v > 0.0) { - var f = c / v; - res = [hcg[0], f * 100, v * 100]; - } else { - res = [hcg[0], 0, v * 100]; - } - return res; - }, - - hwb: function(hcg){ - var c = hcg[1] / 100; - var g = hcg[2] / 100; - var v = c + g * (1.0 - c); - return [hcg[0], (v - c) * 100, (1 - v) * 100]; - } -}; - - -//append rgb -rgb.hcg = function(rgb) { - var r = rgb[0] / 255; - var g = rgb[1] / 255; - var b = rgb[2] / 255; - var max = Math.max(Math.max(r, g), b); - var min = Math.min(Math.min(r, g), b); - var chroma = (max - min); - var grayscale; - var hue; - if (chroma < 1) { - grayscale = min / (1 - chroma); - } else { - grayscale = 0; - } - if (chroma > 0) { - if (max === r) { - hue = mod((g - b) / chroma, 6); - } else - if (max === g) { - hue = 2 + (b - r) / chroma; - } else { - hue = 4 + (r - g) / chroma; - } - hue /= 6; - hue = mod(hue, 1); - } else { - hue = 0; - } - return [hue * 360, chroma * 100, grayscale * 100]; -}; - -//extend hsl -hsl.hcg = function(hsl) { - var s = hsl[1] / 100; - var l = hsl[2] / 100; - var c = 0; - if (l < 0.5) { - c = 2.0 * s * l; - } else { - c = 2.0 * s * (1.0 - l); - } - var res; - if (c < 1.0) { - var f = (l - 0.5 * c) / (1.0 - c); - res = [hsl[0], c * 100, f * 100]; - } else { - res = [hsl[0], c * 100, 0]; - } - return res; -}; - -//extend hsv -hsv.hcg = function(hsv){ - var s = hsv[1] / 100; - var v = hsv[2] / 100; - var c = s * v; - var res; - if (c < 1.0) { - var f = (v - c) / (1 - c); - res = [hsv[0], c * 100, f * 100]; - } else { - res = [hsv[0], c * 100, 0]; - } - return res; -} - - -//extend hwb -hwb.hcg = function(hwb){ - var w = hwb[1] / 100; - var b = hwb[2] / 100; - var v = 1 - b; - var c = v - w; - var g = 0; - if (c < 1) { - g = (v - c) / (1 - c); - } - return [hwb[0], c * 100, g * 100]; -} diff --git a/node_modules/homey-meshdriver/lib/color-space/hcy.js b/node_modules/homey-meshdriver/lib/color-space/hcy.js deleted file mode 100644 index 188b55e..0000000 --- a/node_modules/homey-meshdriver/lib/color-space/hcy.js +++ /dev/null @@ -1,88 +0,0 @@ -/** - * HSV optimized for shaders - * http://chilliant.blogspot.ca/2012/08/rgbhcy-in-hlsl.html - * - * @module color-space/hcy - */ -'use strict' - -var rgb = require('./rgb'); - -var loop = require('mumath/mod'); -var clamp = require('mumath/clamp'); - - -var hcy = module.exports = { - name: 'hcy', - min: [0,0,0], - max: [360,100,255], - channel: ['hue', 'chroma', 'luminance'], - alias: ['HCY'] -}; - - -/** - * HCY to RGB - * - * @param {Array} hcy Channel values - * - * @return {Array} RGB channel values - */ -hcy.rgb = function (hcy) { - var h = loop(hcy[0], 0, 360) * Math.PI / 180; - var s = clamp(hcy[1], 0, 100) / 100; - var i = clamp(hcy[2], 0, 255) / 255; - - var pi3 = Math.PI / 3; - - var r, g, b; - if (h < (2 * pi3) ) { - b = i * ( 1 - s ); - r = i * (1 + ( s * Math.cos(h) / Math.cos(pi3 - h) )); - g = i * (1 + ( s * ( 1 - Math.cos(h) / Math.cos(pi3 - h) ))); - } - else if (h < (4 * pi3) ) { - h = h - 2 * pi3; - r = i * ( 1 - s ); - g = i * (1 + ( s * Math.cos(h) / Math.cos(pi3 - h) )); - b = i * (1 + ( s * ( 1 - Math.cos(h) / Math.cos(pi3 - h) ))); - } - else { - h = h - 4 * pi3; - g = i * ( 1 - s ); - b = i * (1 + ( s * Math.cos(h) / Math.cos(pi3 - h) )); - r = i * (1 + ( s * ( 1 - Math.cos(h) / Math.cos(pi3 - h) ))); - } - - return [r * 255, g * 255, b * 255]; -}; - - -/** - * RGB to HCY - * - * @param {Array} rgb Channel values - * - * @return {Array} HCY channel values - */ -rgb.hcy = function (rgb) { - var sum = rgb[0] + rgb[1] + rgb[2]; - - var r = rgb[0] / sum; - var g = rgb[1] / sum; - var b = rgb[2] / sum; - - var h = Math.acos( - ( 0.5 * ((r - g) + (r - b)) ) / - Math.sqrt( (r - g)*(r - g) + (r - b)*(g - b) ) - ); - if (b > g) { - h = 2 * Math.PI - h; - } - - var s = 1 - 3 * Math.min(r, g, b); - - var i = sum / 3; - - return [h * 180 / Math.PI, s * 100, i]; -}; diff --git a/node_modules/homey-meshdriver/lib/color-space/hsi.js b/node_modules/homey-meshdriver/lib/color-space/hsi.js deleted file mode 100644 index a6ddf15..0000000 --- a/node_modules/homey-meshdriver/lib/color-space/hsi.js +++ /dev/null @@ -1,88 +0,0 @@ -/** - * http://www.cse.usf.edu/~mshreve/rgb-to-hsi - * http://web.archive.org/web/20130124054245/http://web2.clarkson.edu/class/image_process/RGB_to_HSI.pdf - * - * @module color-space/hsl - */ -'use strict' - -var rgb = require('./rgb'); - -var loop = require('mumath/mod'); -var clamp = require('mumath/clamp'); - - -var hsi = module.exports = { - name: 'hsi', - min: [0,0,0], - max: [360,100,255], - channel: ['hue', 'saturation', 'intensity'], - alias: ['HSI'] -}; - - -/** - * HSI to RGB - * - * @param {Array} hsi Channel values - * - * @return {Array} RGB channel values - */ -hsi.rgb = function (hsi) { - var h = loop(hsi[0], 0, 360) * Math.PI / 180; - var s = clamp(hsi[1], 0, 100) / 100; - var i = clamp(hsi[2], 0, 255) / 255; - - var pi3 = Math.PI / 3; - - var r, g, b; - if (h < (2 * pi3) ) { - b = i * ( 1 - s ); - r = i * (1 + ( s * Math.cos(h) / Math.cos(pi3 - h) )); - g = i * (1 + ( s * ( 1 - Math.cos(h) / Math.cos(pi3 - h) ))); - } - else if (h < (4 * pi3) ) { - h = h - 2 * pi3; - r = i * ( 1 - s ); - g = i * (1 + ( s * Math.cos(h) / Math.cos(pi3 - h) )); - b = i * (1 + ( s * ( 1 - Math.cos(h) / Math.cos(pi3 - h) ))); - } - else { - h = h - 4 * pi3; - g = i * ( 1 - s ); - b = i * (1 + ( s * Math.cos(h) / Math.cos(pi3 - h) )); - r = i * (1 + ( s * ( 1 - Math.cos(h) / Math.cos(pi3 - h) ))); - } - - return [r * 255, g * 255, b * 255]; -}; - - -/** - * RGB to HSI - * - * @param {Array} rgb Channel values - * - * @return {Array} HSI channel values - */ -rgb.hsi = function (rgb) { - var sum = rgb[0] + rgb[1] + rgb[2]; - - var r = rgb[0] / sum; - var g = rgb[1] / sum; - var b = rgb[2] / sum; - - var h = Math.acos( - ( 0.5 * ((r - g) + (r - b)) ) / - Math.sqrt( (r - g)*(r - g) + (r - b)*(g - b) ) - ); - if (b > g) { - h = 2 * Math.PI - h; - } - - var s = 1 - 3 * Math.min(r, g, b); - - var i = sum / 3; - - return [h * 180 / Math.PI, s * 100, i]; -}; diff --git a/node_modules/homey-meshdriver/lib/color-space/hsl.js b/node_modules/homey-meshdriver/lib/color-space/hsl.js deleted file mode 100644 index 066b26f..0000000 --- a/node_modules/homey-meshdriver/lib/color-space/hsl.js +++ /dev/null @@ -1,107 +0,0 @@ -/** - * @module color-space/hsl - */ -'use strict' - -var rgb = require('./rgb'); - -module.exports = { - name: 'hsl', - min: [0,0,0], - max: [360,100,100], - channel: ['hue', 'saturation', 'lightness'], - alias: ['HSL'], - - rgb: function(hsl) { - var h = hsl[0] / 360, - s = hsl[1] / 100, - l = hsl[2] / 100, - t1, t2, t3, rgb, val; - - if (s === 0) { - val = l * 255; - return [val, val, val]; - } - - if (l < 0.5) { - t2 = l * (1 + s); - } - else { - t2 = l + s - l * s; - } - t1 = 2 * l - t2; - - rgb = [0, 0, 0]; - for (var i = 0; i < 3; i++) { - t3 = h + 1 / 3 * - (i - 1); - if (t3 < 0) { - t3++; - } - else if (t3 > 1) { - t3--; - } - - if (6 * t3 < 1) { - val = t1 + (t2 - t1) * 6 * t3; - } - else if (2 * t3 < 1) { - val = t2; - } - else if (3 * t3 < 2) { - val = t1 + (t2 - t1) * (2 / 3 - t3) * 6; - } - else { - val = t1; - } - - rgb[i] = val * 255; - } - - return rgb; - } -}; - - -//extend rgb -rgb.hsl = function(rgb) { - var r = rgb[0]/255, - g = rgb[1]/255, - b = rgb[2]/255, - min = Math.min(r, g, b), - max = Math.max(r, g, b), - delta = max - min, - h, s, l; - - if (max === min) { - h = 0; - } - else if (r === max) { - h = (g - b) / delta; - } - else if (g === max) { - h = 2 + (b - r) / delta; - } - else if (b === max) { - h = 4 + (r - g)/ delta; - } - - h = Math.min(h * 60, 360); - - if (h < 0) { - h += 360; - } - - l = (min + max) / 2; - - if (max === min) { - s = 0; - } - else if (l <= 0.5) { - s = delta / (max + min); - } - else { - s = delta / (2 - max - min); - } - - return [h, s * 100, l * 100]; -}; diff --git a/node_modules/homey-meshdriver/lib/color-space/hsv.js b/node_modules/homey-meshdriver/lib/color-space/hsv.js deleted file mode 100644 index 7601172..0000000 --- a/node_modules/homey-meshdriver/lib/color-space/hsv.js +++ /dev/null @@ -1,116 +0,0 @@ -/** - * @module color-space/hsv - */ -'use strict' - -var rgb = require('./rgb'); -var hsl = require('./hsl'); - -module.exports = { - name: 'hsv', - min: [0,0,0], - max: [360,100,100], - channel: ['hue', 'saturation', 'value'], - alias: ['HSV', 'HSB'], - - rgb: function(hsv) { - var h = hsv[0] / 60, - s = hsv[1] / 100, - v = hsv[2] / 100, - hi = Math.floor(h) % 6; - - var f = h - Math.floor(h), - p = 255 * v * (1 - s), - q = 255 * v * (1 - (s * f)), - t = 255 * v * (1 - (s * (1 - f))); - v *= 255; - - switch(hi) { - case 0: - return [v, t, p]; - case 1: - return [q, v, p]; - case 2: - return [p, v, t]; - case 3: - return [p, q, v]; - case 4: - return [t, p, v]; - case 5: - return [v, p, q]; - } - }, - - hsl: function(hsv) { - var h = hsv[0], - s = hsv[1] / 100, - v = hsv[2] / 100, - sl, l; - - l = (2 - s) * v; - sl = s * v; - sl /= (l <= 1) ? l : 2 - l; - sl = sl || 0; - l /= 2; - - return [h, sl * 100, l * 100]; - } -}; - - -//append rgb -rgb.hsv = function(rgb) { - var r = rgb[0], - g = rgb[1], - b = rgb[2], - min = Math.min(r, g, b), - max = Math.max(r, g, b), - delta = max - min, - h, s, v; - - if (max === 0) { - s = 0; - } - else { - s = (delta/max * 100); - } - - if (max === min) { - h = 0; - } - else if (r === max) { - h = (g - b) / delta; - } - else if (g === max) { - h = 2 + (b - r) / delta; - } - else if (b === max) { - h = 4 + (r - g) / delta; - } - - h = Math.min(h * 60, 360); - - if (h < 0) { - h += 360; - } - - v = ((max / 255) * 1000) / 10; - - return [h, s, v]; -}; - - - -//extend hsl -hsl.hsv = function(hsl) { - var h = hsl[0], - s = hsl[1] / 100, - l = hsl[2] / 100, - sv, v; - l *= 2; - s *= (l <= 1) ? l : 2 - l; - v = (l + s) / 2; - sv = (2 * s) / (l + s) || 0; - - return [h, sv * 100, v * 100]; -}; diff --git a/node_modules/homey-meshdriver/lib/color-space/husl.js b/node_modules/homey-meshdriver/lib/color-space/husl.js deleted file mode 100644 index 3535397..0000000 --- a/node_modules/homey-meshdriver/lib/color-space/husl.js +++ /dev/null @@ -1,37 +0,0 @@ -/** - * A uniform wrapper for husl. - * // http://www.boronine.com/husl/ - * - * @module color-space/husl - */ -'use strict' - -var xyz = require('./xyz'); -var lchuv = require('./lchuv'); -var _husl = require('husl'); - - -module.exports = { - name: 'husl', - min: [0,0,0], - max: [360,100,100], - channel: ['hue', 'saturation', 'lightness'], - alias: ['HuSL'], - - lchuv: _husl._conv.husl.lch, - - xyz: function(arg){ - return lchuv.xyz(_husl._conv.husl.lch(arg)); - }, - - //a shorter way to convert to huslp - huslp: function(arg){ - return _husl._conv.lch.huslp( _husl._conv.husl.lch(arg)); - } -}; - -//extend lchuv, xyz -lchuv.husl = _husl._conv.lch.husl; -xyz.husl = function(arg){ - return _husl._conv.lch.husl(xyz.lchuv(arg)); -}; diff --git a/node_modules/homey-meshdriver/lib/color-space/huslp.js b/node_modules/homey-meshdriver/lib/color-space/huslp.js deleted file mode 100644 index f6ddca0..0000000 --- a/node_modules/homey-meshdriver/lib/color-space/huslp.js +++ /dev/null @@ -1,31 +0,0 @@ -/** - * A uniform wrapper for huslp. - * // http://www.boronine.com/husl/ - * - * @module color-space/huslp - */ -'use strict' - -var xyz = require('./xyz'); -var lchuv = require('./lchuv'); -var _husl = require('husl'); - -module.exports = { - name: 'huslp', - min: [0,0,0], - max: [360,100,100], - channel: ['hue', 'saturation', 'lightness'], - alias: ['HuSLp'], - - lchuv: _husl._conv.huslp.lch, - xyz: function(arg){return lchuv.xyz(_husl._conv.huslp.lch(arg));}, - - //a shorter way to convert to husl - husl: function(arg){ - return _husl._conv.lch.husl( _husl._conv.huslp.lch(arg)); - } -}; - -//extend lchuv, xyz -lchuv.huslp = _husl._conv.lch.huslp; -xyz.huslp = function(arg){return _husl._conv.lch.huslp(xyz.lchuv(arg));}; diff --git a/node_modules/homey-meshdriver/lib/color-space/hwb.js b/node_modules/homey-meshdriver/lib/color-space/hwb.js deleted file mode 100644 index 85264c2..0000000 --- a/node_modules/homey-meshdriver/lib/color-space/hwb.js +++ /dev/null @@ -1,111 +0,0 @@ -/** - * @module color-space/hwb - */ -'use strict' - -var rgb = require('./rgb'); -var hsv = require('./hsv'); -var hsl = require('./hsl'); - - -var hwb = module.exports = { - name: 'hwb', - min: [0,0,0], - max: [360,100,100], - channel: ['hue', 'whiteness', 'blackness'], - alias: ['HWB'], - - // http://dev.w3.org/csswg/css-color/#hwb-to-rgb - rgb: function(hwb) { - var h = hwb[0] / 360, - wh = hwb[1] / 100, - bl = hwb[2] / 100, - ratio = wh + bl, - i, v, f, n; - - var r, g, b; - - // wh + bl cant be > 1 - if (ratio > 1) { - wh /= ratio; - bl /= ratio; - } - - i = Math.floor(6 * h); - v = 1 - bl; - f = 6 * h - i; - - //if it is even - if ((i & 0x01) !== 0) { - f = 1 - f; - } - - n = wh + f * (v - wh); // linear interpolation - - switch (i) { - default: - case 6: - case 0: r = v; g = n; b = wh; break; - case 1: r = n; g = v; b = wh; break; - case 2: r = wh; g = v; b = n; break; - case 3: r = wh; g = n; b = v; break; - case 4: r = n; g = wh; b = v; break; - case 5: r = v; g = wh; b = n; break; - } - - return [r * 255, g * 255, b * 255]; - }, - - - // http://alvyray.com/Papers/CG/HWB_JGTv208.pdf - hsv: function(arg){ - var h = arg[0], w = arg[1], b = arg[2], s, v; - - //if w+b > 100% - take proportion (how many times ) - if (w + b >= 100){ - s = 0; - v = 100 * w/(w+b); - } - - //by default - take wiki formula - else { - s = 100-(w/(1-b/100)); - v = 100-b; - } - - - return [h, s, v]; - }, - - hsl: function(arg){ - return hsv.hsl(hwb.hsv(arg)); - } -}; - - -//extend rgb -rgb.hwb = function(val) { - var r = val[0], - g = val[1], - b = val[2], - h = rgb.hsl(val)[0], - w = 1/255 * Math.min(r, Math.min(g, b)); - - b = 1 - 1/255 * Math.max(r, Math.max(g, b)); - - return [h, w * 100, b * 100]; -}; - - - -//keep proper hue on 0 values (conversion to rgb loses hue on zero-lightness) -hsv.hwb = function(arg){ - var h = arg[0], s = arg[1], v = arg[2]; - return [h, v === 0 ? 0 : (v * (1-s/100)), 100 - v]; -}; - - -//extend hsl with proper conversions -hsl.hwb = function(arg){ - return hsv.hwb(hsl.hsv(arg)); -}; diff --git a/node_modules/homey-meshdriver/lib/color-space/index.js b/node_modules/homey-meshdriver/lib/color-space/index.js deleted file mode 100644 index de7b78a..0000000 --- a/node_modules/homey-meshdriver/lib/color-space/index.js +++ /dev/null @@ -1,86 +0,0 @@ -/** - * Color space data and conversions - * - * @module color-space - * - */ -'use strict'; - - -/** Exported spaces */ -var spaces = { - rgb: require('./rgb'), - hsl: require('./hsl'), - hsv: require('./hsv'), - hsi: require('./hsi'), - hwb: require('./hwb'), - cmyk: require('./cmyk'), - cmy: require('./cmy'), - xyz: require('./xyz'), - xyy: require('./xyy'), - yiq: require('./yiq'), - yuv: require('./yuv'), - ydbdr: require('./ydbdr'), - ycgco: require('./ycgco'), - ypbpr: require('./ypbpr'), - ycbcr: require('./ycbcr'), - xvycc: require('./xvycc'), - yccbccrc: require('./yccbccrc'), - ucs: require('./ucs'), - uvw: require('./uvw'), - jpeg: require('./jpeg'), - lab: require('./lab'), - labh: require('./labh'), - lms: require('./lms'), - lchab: require('./lchab'), - luv: require('./luv'), - lchuv: require('./lchuv'), - husl: require('./husl'), - huslp: require('./huslp'), - cubehelix: require('./cubehelix'), - coloroid: require('./coloroid'), - hcg: require('./hcg'), - tsl: require('./tsl'), - yes: require('./yes'), - osaucs: require('./osaucs') -}; - - - -//build absent convertors from each to every space -var fromSpace; -for (var fromSpaceName in spaces) { - fromSpace = spaces[fromSpaceName]; - for (var toSpaceName in spaces) { - if (!fromSpace[toSpaceName]) fromSpace[toSpaceName] = getConvertor(fromSpaceName, toSpaceName); - } -} - - -/** return converter through xyz/rgb space */ -function getConvertor(fromSpaceName, toSpaceName){ - var fromSpace = spaces[fromSpaceName]; - - //create straight converter - if (fromSpaceName === toSpaceName) { - return function (a) { - return a; - }; - } - - //create xyz converter, if available - else if (fromSpace.xyz && spaces.xyz[toSpaceName]) { - return function(arg){ - return spaces.xyz[toSpaceName](fromSpace.xyz(arg)); - }; - } - //create rgb converter - else if (fromSpace.rgb && spaces.rgb[toSpaceName]) { - return function(arg){ - return spaces.rgb[toSpaceName](fromSpace.rgb(arg)); - }; - } -} - - -module.exports = spaces; diff --git a/node_modules/homey-meshdriver/lib/color-space/jpeg.js b/node_modules/homey-meshdriver/lib/color-space/jpeg.js deleted file mode 100644 index 98bf371..0000000 --- a/node_modules/homey-meshdriver/lib/color-space/jpeg.js +++ /dev/null @@ -1,56 +0,0 @@ -/** - * https://en.wikipedia.org/wiki/YCbCr#JPEG_conversion - * - * JPEG conversion without head/footroom - * - * @module color-space/jpeg - */ -'use strict' - -var rgb = require('./rgb'); - -var jpeg = module.exports = { - name: 'jpeg', - min: [0, 0, 0], - max: [255, 255, 255], - channel: ['Y','Cb','Cr'], - alias: ['JPEG'] -}; - - -/** - * JPEG to RGB - * transform through analog form - * - * @param {Array} jpeg RGB values - * - * @return {Array} JPEG values - */ -jpeg.rgb = function (arr) { - var y = arr[0], cb = arr[1], cr = arr[2]; - - return [ - y + 1.402 * (cr - 128), - y - 0.34414 * (cb - 128) - 0.71414 * (cr - 128), - y + 1.772 * (cb - 128) - ] -}; - - -/** - * RGB to JPEG - * transform through analog form - * - * @param {Array} jpeg JPEG values - * - * @return {Array} RGB values - */ -rgb.jpeg = function(arr) { - var r = arr[0], g = arr[1], b = arr[2]; - - return [ - 0.299 * r + 0.587 * g + 0.114 * b, - 128 - 0.168736 * r - 0.331264 * g + 0.5 * b, - 128 + 0.5 * r - 0.418688 * g - 0.081312 * b - ] -}; diff --git a/node_modules/homey-meshdriver/lib/color-space/lab.js b/node_modules/homey-meshdriver/lib/color-space/lab.js deleted file mode 100644 index 2a2c13d..0000000 --- a/node_modules/homey-meshdriver/lib/color-space/lab.js +++ /dev/null @@ -1,60 +0,0 @@ -/** - * CIE LAB space model - * - * @module color-space/lab - */ -'use strict' - -var xyz = require('./xyz'); - -module.exports = { - name: 'lab', - min: [0,-100,-100], - max: [100,100,100], - channel: ['lightness', 'a', 'b'], - alias: ['LAB', 'cielab'], - - xyz: function(lab) { - var l = lab[0], - a = lab[1], - b = lab[2], - x, y, z, y2; - - if (l <= 8) { - y = (l * 100) / 903.3; - y2 = (7.787 * (y / 100)) + (16 / 116); - } else { - y = 100 * Math.pow((l + 16) / 116, 3); - y2 = Math.pow(y / 100, 1/3); - } - - x = x / 95.047 <= 0.008856 ? x = (95.047 * ((a / 500) + y2 - (16 / 116))) / 7.787 : 95.047 * Math.pow((a / 500) + y2, 3); - - z = z / 108.883 <= 0.008859 ? z = (108.883 * (y2 - (b / 200) - (16 / 116))) / 7.787 : 108.883 * Math.pow(y2 - (b / 200), 3); - - return [x, y, z]; - } -}; - - -//extend xyz -xyz.lab = function(xyz){ - var x = xyz[0], - y = xyz[1], - z = xyz[2], - l, a, b; - - x /= 95.047; - y /= 100; - z /= 108.883; - - x = x > 0.008856 ? Math.pow(x, 1/3) : (7.787 * x) + (16 / 116); - y = y > 0.008856 ? Math.pow(y, 1/3) : (7.787 * y) + (16 / 116); - z = z > 0.008856 ? Math.pow(z, 1/3) : (7.787 * z) + (16 / 116); - - l = (116 * y) - 16; - a = 500 * (x - y); - b = 200 * (y - z); - - return [l, a, b]; -}; diff --git a/node_modules/homey-meshdriver/lib/color-space/labh.js b/node_modules/homey-meshdriver/lib/color-space/labh.js deleted file mode 100644 index beaf3d7..0000000 --- a/node_modules/homey-meshdriver/lib/color-space/labh.js +++ /dev/null @@ -1,44 +0,0 @@ -/** - * Hunter-lab space. - * - * @module color-space/labh - */ -'use strict' - -var xyz = require('./xyz'); - -module.exports = { - name: 'labh', - - //mins/maxes are taken from colormine - //FIXME: check whether mins/maxes correct - min: [0,-128,-128], - max: [100,128,128], - channel: ['lightness', 'a', 'b'], - alias: ['LABh', 'hunter-lab', 'hlab'], - - //maths are taken from EasyRGB - xyz: function(lab) { - var l = lab[0], a = lab[1], b = lab[2]; - - var _y = l / 10; - var _x = a / 17.5 * l / 10; - var _z = b / 7 * l / 10; - - var y = _y * _y; - var x = ( _x + y ) / 1.02; - var z = -( _z - y ) / 0.847; - - return [x,y,z]; - } -}; - -//extend xyz -xyz.labh = function(xyz){ - var x = xyz[0], y = xyz[1], z = xyz[2]; - var l = 10 * Math.sqrt( y ); - var a = y === 0 ? 0 : 17.5 * ((( 1.02 * x ) - y ) / Math.sqrt( y ) ); - var b = y === 0 ? 0 : 7 * ( ( y - ( 0.847 * z ) ) / Math.sqrt( y ) ); - - return [l, a, b]; -}; diff --git a/node_modules/homey-meshdriver/lib/color-space/lchab.js b/node_modules/homey-meshdriver/lib/color-space/lchab.js deleted file mode 100644 index 7800508..0000000 --- a/node_modules/homey-meshdriver/lib/color-space/lchab.js +++ /dev/null @@ -1,56 +0,0 @@ -/** - * Cylindrical LAB - * - * @module color-space/lchab - */ -'use strict' - -var xyz = require('./xyz'); -var lab = require('./lab'); - - -//cylindrical lab -var lchab = module.exports = { - name: 'lchab', - min: [0,0,0], - max: [100,100,360], - channel: ['lightness', 'chroma', 'hue'], - alias: ['LCHab', 'cielch', 'LCH', 'HLC', 'LSH'], - - xyz: function(arg) { - return lab.xyz(lchab.lab(arg)); - }, - - lab: function(lch) { - var l = lch[0], - c = lch[1], - h = lch[2], - a, b, hr; - - hr = h / 360 * 2 * Math.PI; - a = c * Math.cos(hr); - b = c * Math.sin(hr); - return [l, a, b]; - } -}; - - -//extend lab -lab.lchab = function(lab) { - var l = lab[0], - a = lab[1], - b = lab[2], - hr, h, c; - - hr = Math.atan2(b, a); - h = hr * 360 / 2 / Math.PI; - if (h < 0) { - h += 360; - } - c = Math.sqrt(a * a + b * b); - return [l, c, h]; -}; - -xyz.lchab = function(arg){ - return lab.lchab(xyz.lab(arg)); -}; diff --git a/node_modules/homey-meshdriver/lib/color-space/lchuv.js b/node_modules/homey-meshdriver/lib/color-space/lchuv.js deleted file mode 100644 index b21f6e8..0000000 --- a/node_modules/homey-meshdriver/lib/color-space/lchuv.js +++ /dev/null @@ -1,51 +0,0 @@ -/** - * Cylindrical CIE LUV - * - * @module color-space/lchuv - */ -'use strict' - -var luv = require('./luv'); -var xyz = require('./xyz'); - -//cylindrical luv -var lchuv = module.exports = { - name: 'lchuv', - channel: ['lightness', 'chroma', 'hue'], - alias: ['LCHuv', 'cielchuv'], - min: [0,0,0], - max: [100,100,360], - - luv: function(luv){ - var l = luv[0], - c = luv[1], - h = luv[2], - u, v, hr; - - hr = h / 360 * 2 * Math.PI; - u = c * Math.cos(hr); - v = c * Math.sin(hr); - return [l, u, v]; - }, - - xyz: function(arg) { - return luv.xyz(lchuv.luv(arg)); - } -}; - -luv.lchuv = function(luv){ - var l = luv[0], u = luv[1], v = luv[2]; - - var c = Math.sqrt(u*u + v*v); - var hr = Math.atan2(v,u); - var h = hr * 360 / 2 / Math.PI; - if (h < 0) { - h += 360; - } - - return [l,c,h] -}; - -xyz.lchuv = function(arg){ - return luv.lchuv(xyz.luv(arg)); -}; diff --git a/node_modules/homey-meshdriver/lib/color-space/lms.js b/node_modules/homey-meshdriver/lib/color-space/lms.js deleted file mode 100644 index 918daff..0000000 --- a/node_modules/homey-meshdriver/lib/color-space/lms.js +++ /dev/null @@ -1,84 +0,0 @@ -/** - * A responsivity of cones color space. - * Used for CAT - chromatic adaptation transform. - * - * http://en.wikipedia.org/wiki/LMS_color_space - * http://www.mathworks.com/matlabcentral/fileexchange/28790-colorspace-transformations - * - * @todo xyz -> lms - * @todo tests - * - * @module color-space/lms - */ -'use strict' - -var xyz = require('./xyz'); - -var lms = module.exports = { - name: 'lms', - min: [0,0,0], - max: [100,100,100], - channel: ['long', 'medium', 'short'], - - - //transform matrices - matrix: { - HPE: [ - 0.38971, 0.68898,-0.07868, - -0.22981, 1.18340, 0.04641, - 0.00000, 0.00000, 1.00000], - VONKRIES: [ - 0.4002, 0.7076, -0.0808, - -0.2263, 1.1653, 0.0457, - 0.00000,0.00000, 0.9182], - BFD: [ - 0.8951, 0.2664,-0.1614, - -0.7502, 1.7135, 0.0367, - 0.0389,-0.0686, 1.0296], - CAT97: [ - 0.8562, 0.3372,-0.1934, - -0.8360, 1.8327, 0.0033, - 0.0357,-0.00469,1.0112], - CAT00: [ - 0.7982, 0.3389,-0.1371, - -0.5918, 1.5512, 0.0406, - 0.0008, 0.0239, 0.9753], - CAT02: [ - 0.7328, 0.4296,-0.1624, - -0.7036, 1.6975, 0.0061, - 0.0030, 0.0136, 0.9834] - } -}; - - -lms.xyz = function(arg, matrix){ - var l = arg[0], m = arg[1], s = arg[2]; - - if (!matrix) { - matrix = [ - 1.096123820835514, -0.278869000218287, +0.182745179382773, - 0.454369041975359, + 0.473533154307412, +0.072097803717229, - -0.009627608738429, -0.005698031216113, +1.015325639954543 - ]; - } - - return [ - l * matrix[0] + m * matrix[1] + s * matrix[2], - l * matrix[3] + m * matrix[4] + s * matrix[5], - l * matrix[6] + m * matrix[7] + s * matrix[8] - ]; -}; - -xyz.lms = function(arg, matrix) { - var x = arg[0], y = arg[1], z = arg[2]; - - if (!matrix) { - matrix = lms.matrix.CAT02 - } - - return [ - x * matrix[0] + y * matrix[1] + z * matrix[2], - x * matrix[3] + y * matrix[4] + z * matrix[5], - x * matrix[6] + y * matrix[7] + z * matrix[8] - ]; -}; diff --git a/node_modules/homey-meshdriver/lib/color-space/luv.js b/node_modules/homey-meshdriver/lib/color-space/luv.js deleted file mode 100644 index f2a088e..0000000 --- a/node_modules/homey-meshdriver/lib/color-space/luv.js +++ /dev/null @@ -1,100 +0,0 @@ -/** - * CIE LUV (C'est la vie) - * - * @module color-space/luv - */ -'use strict' - -var xyz = require('./xyz'); - -module.exports = { - name: 'luv', - //NOTE: luv has no rigidly defined limits - //easyrgb fails to get proper coords - //boronine states no rigid limits - //colorMine refers this ones: - min: [0,-134,-140], - max: [100,224,122], - channel: ['lightness', 'u', 'v'], - alias: ['LUV', 'cieluv', 'cie1976'], - - xyz: function(arg, i, o){ - var _u, _v, l, u, v, x, y, z, xn, yn, zn, un, vn; - l = arg[0], u = arg[1], v = arg[2]; - - if (l === 0) return [0,0,0]; - - //get constants - //var e = 0.008856451679035631; //(6/29)^3 - var k = 0.0011070564598794539; //(3/29)^3 - - //get illuminant/observer - i = i || 'D65'; - o = o || 2; - - xn = xyz.whitepoint[o][i][0]; - yn = xyz.whitepoint[o][i][1]; - zn = xyz.whitepoint[o][i][2]; - - un = (4 * xn) / (xn + (15 * yn) + (3 * zn)); - vn = (9 * yn) / (xn + (15 * yn) + (3 * zn)); - // un = 0.19783000664283; - // vn = 0.46831999493879; - - - _u = u / (13 * l) + un || 0; - _v = v / (13 * l) + vn || 0; - - y = l > 8 ? yn * Math.pow( (l + 16) / 116 , 3) : yn * l * k; - - //wikipedia method - x = y * 9 * _u / (4 * _v) || 0; - z = y * (12 - 3 * _u - 20 * _v) / (4 * _v) || 0; - - //boronine method - //https://github.com/boronine/husl/blob/master/husl.coffee#L201 - // x = 0 - (9 * y * _u) / ((_u - 4) * _v - _u * _v); - // z = (9 * y - (15 * _v * y) - (_v * x)) / (3 * _v); - - return [x, y, z]; - } -}; - -// http://www.brucelindbloom.com/index.html?Equations.html -// https://github.com/boronine/husl/blob/master/husl.coffee -//i - illuminant -//o - observer -xyz.luv = function(arg, i, o) { - var _u, _v, l, u, v, x, y, z, xn, yn, zn, un, vn; - - //get constants - var e = 0.008856451679035631; //(6/29)^3 - var k = 903.2962962962961; //(29/3)^3 - - //get illuminant/observer coords - i = i || 'D65'; - o = o || 2; - - xn = xyz.whitepoint[o][i][0]; - yn = xyz.whitepoint[o][i][1]; - zn = xyz.whitepoint[o][i][2]; - - un = (4 * xn) / (xn + (15 * yn) + (3 * zn)); - vn = (9 * yn) / (xn + (15 * yn) + (3 * zn)); - - - x = arg[0], y = arg[1], z = arg[2]; - - - _u = (4 * x) / (x + (15 * y) + (3 * z)) || 0; - _v = (9 * y) / (x + (15 * y) + (3 * z)) || 0; - - var yr = y/yn; - - l = yr <= e ? k * yr : 116 * Math.pow(yr, 1/3) - 16; - - u = 13 * l * (_u - un); - v = 13 * l * (_v - vn); - - return [l, u, v]; -}; diff --git a/node_modules/homey-meshdriver/lib/color-space/munsell.js b/node_modules/homey-meshdriver/lib/color-space/munsell.js deleted file mode 100644 index 3dc48d9..0000000 --- a/node_modules/homey-meshdriver/lib/color-space/munsell.js +++ /dev/null @@ -1,31 +0,0 @@ -/** - * @module color-space/munsell - */ -'use strict' - -var munsell = { - name: 'munsell', - alias: [], - min: [], - max: [], - - //hue, value, chroma - channel: ['H', 'V', 'C'] -} - -/** - * http://www.pp.bme.hu/ar/article/view/2395/1500 - */ -munsell.coloroid = function (cv) { - var c = arg[0], vm = arg[1]; - - var a,t,v; - - //coloroid chroma / munsell chroma - t = kav * Math.pow(c, 2/3); - - v = 10 * Math.sqrt(1.2219*vm - 0.23111*vm*vm + 0.23951*vm*vm*vm - 0.021009*vm*vm*vm*vm + 0.0008404*vm*vm*vm*vm*vm); -}; - - -module.exports = munsell; diff --git a/node_modules/homey-meshdriver/lib/color-space/osaucs.js b/node_modules/homey-meshdriver/lib/color-space/osaucs.js deleted file mode 100644 index c3ebd79..0000000 --- a/node_modules/homey-meshdriver/lib/color-space/osaucs.js +++ /dev/null @@ -1,77 +0,0 @@ -/** - * OSA-UCS - * - * @module color-space/osa-ucs - */ -'use strict' - -var xyz = require('./xyz'); - - -var osaucs = { - name: 'osaucs', - alias: ['OSA-UCS'], - channel: ['L', 'j', 'g'], - min: [-10, -6, -10], - max: [8, 12, 6] -}; - - -/** - * There’s no analytical solution to this - */ -osaucs.xyz = function (arg) { - var x, y, z; - - throw 'Unimplemented'; - //http://www.researchgate.net/publication/259253763_Comparison_of_the_performance_of_inverse_transformation_methods_from_OSA-UCS_to_CIEXYZ - - return [x, y, z]; -}; - - -/** - * Transform to xyz osaucs - * - * @param {Array} arg Input xyz array - * - * @return {Array} Ljg array - */ -xyz.osaucs = function (arg) { - var X = arg[0], Y = arg[1], Z = arg[2]; - - var x = X / (X + Y + Z); - var y = Y / (X + Y + Z); - - //FIXME: there might be a typo, wiki states 1.8103 as a constant value - var K = 4.4934*x*x + 4.3034*y*y - 4.276*x*y - 1.3744*x - 2.56439*y + 1.8103; - var Y0 = K*Y; - - var L_ = 5.9*(Math.pow(Y0, 1/3) - 2/3 + 0.042*Math.pow(Math.max(Y0, 30) - 30, 1/3)); - var L = (L_ - 14.3993) / Math.sqrt(2); - - var C = L_ / (5.9 * (Math.pow(Y0, 1/3) - 2/3)); - - var R = 0.7790*X + 0.4194*Y - 0.1648*Z; - var G = -0.4493*X + 1.3265*Y + 0.0927*Z; - var B = -0.1149*X + 0.3394*Y + 0.7170*Z; - - R = Math.pow(R, 1/3) || 0; - G = Math.pow(G, 1/3) || 0; - B = Math.pow(B, 1/3) || 0; - - var a = -13.7*R + 17.7*G - 4*B; - var b = 1.7*R + 8*G - 9.7*B; - - var g = C*a; - var j = C*b; - - //polar form - // var p = Math.sqrt(j*j + g*g); - // var phi = Math.atan2(j, g); - - return [L, j, g]; -}; - - -module.exports = osaucs; diff --git a/node_modules/homey-meshdriver/lib/color-space/package.json b/node_modules/homey-meshdriver/lib/color-space/package.json deleted file mode 100644 index 66bc76f..0000000 --- a/node_modules/homey-meshdriver/lib/color-space/package.json +++ /dev/null @@ -1,143 +0,0 @@ -{ - "_args": [ - [ - { - "raw": "color-space", - "scope": null, - "escapedName": "color-space", - "name": "color-space", - "rawSpec": "", - "spec": "latest", - "type": "tag" - }, - "C:\\HomeyApps" - ] - ], - "_from": "color-space@latest", - "_id": "color-space@1.14.7", - "_inCache": true, - "_location": "/color-space", - "_nodeVersion": "6.2.0", - "_npmOperationalInternal": { - "host": "packages-12-west.internal.npmjs.com", - "tmp": "tmp/color-space-1.14.7.tgz_1479849925619_0.0891853088978678" - }, - "_npmUser": { - "name": "dfcreative", - "email": "df.creative@gmail.com" - }, - "_npmVersion": "3.7.2", - "_phantomChildren": {}, - "_requested": { - "raw": "color-space", - "scope": null, - "escapedName": "color-space", - "name": "color-space", - "rawSpec": "", - "spec": "latest", - "type": "tag" - }, - "_requiredBy": [ - "#USER" - ], - "_resolved": "https://registry.npmjs.org/color-space/-/color-space-1.14.7.tgz", - "_shasum": "b7f5a31779427bb25f9927a69410d80c2eaaa71b", - "_shrinkwrap": null, - "_spec": "color-space", - "_where": "C:\\HomeyApps", - "author": { - "name": "Deema Yvanow", - "email": "dfcreative@gmail.com" - }, - "bugs": { - "url": "https://github.com/dfcreative/color-space/issues" - }, - "dependencies": { - "husl": "^5.0.0", - "mumath": "^3.0.0" - }, - "description": "Color space conversions and data", - "devDependencies": { - "almost-equal": "^1.1.0", - "closurecompiler": "^1.x", - "gzip-size": "^3.0.0", - "mocha": "latest", - "queried": "^1.4.1" - }, - "directories": {}, - "dist": { - "shasum": "b7f5a31779427bb25f9927a69410d80c2eaaa71b", - "tarball": "https://registry.npmjs.org/color-space/-/color-space-1.14.7.tgz" - }, - "files": [ - "*.js", - "dist" - ], - "gitHead": "81a71873870f3d6c6d92d0105a310989f087114b", - "homepage": "https://github.com/dfcreative/color-space#readme", - "keywords": [ - "color", - "colour", - "rgb", - "hsl", - "hsv", - "lab", - "lch", - "luv", - "lch", - "cie", - "husl", - "color-convert", - "gamut", - "color-conversions", - "color-space", - "color-translation", - "color-data", - "coloroid", - "cubehelix", - "munsell", - "hcg" - ], - "license": "MIT", - "main": "./index.js", - "maintainers": [ - { - "name": "dfcreative", - "email": "df.creative@gmail.com" - }, - { - "name": "hughsk", - "email": "hughskennedy@gmail.com" - }, - { - "name": "jaspervdg", - "email": "th.v.d.gronde@hccnet.nl" - }, - { - "name": "mikolalysenko", - "email": "mikolalysenko@gmail.com" - }, - { - "name": "rreusser", - "email": "rsreusser@gmail.com" - }, - { - "name": "substack", - "email": "substack@gmail.com" - } - ], - "name": "color-space", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git+ssh://git@github.com/dfcreative/color-space.git" - }, - "scripts": { - "build": "browserify --standalone colorSpace ./index.js > dist/color-space.js", - "min": "ccjs dist/color-space.js --language_in=ECMASCRIPT5 > dist/color-space.min.js && cat dist/color-space.min.js | gzip-size | pretty-bytes", - "test": "mocha", - "watch": "watchify -r ./index:../index -r husl -r assert -r mumath -r queried -d -o test/bundle.js" - }, - "version": "1.14.7" -} diff --git a/node_modules/homey-meshdriver/lib/color-space/readme.md b/node_modules/homey-meshdriver/lib/color-space/readme.md deleted file mode 100644 index ed9dc0e..0000000 --- a/node_modules/homey-meshdriver/lib/color-space/readme.md +++ /dev/null @@ -1,123 +0,0 @@ -# Color-space [![Build Status](https://travis-ci.org/scijs/color-space.svg?branch=master)](https://travis-ci.org/scijs/color-space) [![stable](http://badges.github.io/stability-badges/dist/stable.svg)](http://github.com/badges/stability-badges) - - - -Conversions and data for color spaces. [Demo](http://scijs.github.io/color-space). - - -## Usage - -[![npm install color-space](https://nodei.co/npm/color-space.png?mini=true)](https://npmjs.org/package/color-space/) - -```js -var space = require('color-space'); - -//convert lab to lch -var result = space.lab.lch([80,50,60]); -``` - -You can require a separate space to reduce size significantly: - -```js -var rgb = require('color-space/rgb'); -var hsl = require('color-space/hsl'); - -//convert rgb to hsl -rgb.hsl([200,230,100]); -``` - - -## API - - -```js -.(array); -.name //space name -.min //channel minimums -.max //channel maximums -.channel //channel names -.alias //alias space names -``` - -## Spaces - -* [x] [RGB](https://en.wikipedia.org/wiki/CIE_1931_color_space#CIE_RGB_colour_space) — additive color model based on red, green and blue primary colors. -* [x] [HSL](https://en.wikipedia.org/wiki/HSL_and_HSV) — cylindrical-coordinates representation of RGB. -* [x] [HSV, HSB](https://en.wikipedia.org/wiki/HSL_and_HSV) -* [x] [HWB](http://dev.w3.org/csswg/css-color/#the-hwb-notation) -* [x] [HSI](https://en.wikipedia.org/wiki/HSL_and_HSV) — used for computer vision due to better separation of shapes in an image, comparing to HSL/HSB. -* [x] [CMYK](https://en.wikipedia.org/wiki/CMYK_color_model) -* [x] [CMY](https://en.wikipedia.org/wiki/CMYK_color_model) -* [x] [XYZ](http://en.wikipedia.org/wiki/CIE_1931_color_space) -* [x] [XYY (YXY)](https://en.wikipedia.org/wiki/CIE_1931_color_space#CIE_xy_chromaticity_diagram_and_the_CIE_xyY_color_space) -* [x] [LAB](http://en.wikipedia.org/wiki/Lab_color_space) -* [x] [LCHab](https://en.wikipedia.org/wiki/Lab_color_space#Cylindrical_representation:_CIELCh_or_CIEHLC) -* [x] [LUV](http://en.wikipedia.org/wiki/CIELUV) -* [x] [LCHuv](http://en.wikipedia.org/wiki/CIELUV#Cylindrical_representation) -* [x] [HuSL](http://www.boronine.com/husl/) -* [x] [HuSLp](http://www.boronine.com/husl/) -* [x] [LABHunter](http://en.wikipedia.org/wiki/Lab_color_space#Hunter_Lab) -* [x] [YUV](https://en.wikipedia.org/?title=YUV) -* [x] [YIQ](https://en.wikipedia.org/?title=YIQ) -* [x] [YCgCo](https://en.wikipedia.org/wiki/YCgCo) -* [x] [YDbDr](https://en.wikipedia.org/wiki/YDbDr) -* [x] [YPbPr](https://en.wikipedia.org/wiki/YPbPr) -* [x] [YCbCr](https://en.wikipedia.org/wiki/YCbCr) -* [x] [YcCbcCrc](https://en.wikipedia.org/wiki/YCbCr#ITU-R_BT.2020_conversion) -* [x] [JPEG](https://en.wikipedia.org/wiki/YCbCr#JPEG_conversion) -* [x] [XvYCC](https://en.wikipedia.org/wiki/XvYCC) -* [x] [UCS](https://en.wikipedia.org/wiki/CIE_1960_color_space) -* [x] [UVW](https://en.wikipedia.org/wiki/CIE_1964_color_space) -* [ ] [Munsell](https://en.wikipedia.org/wiki/Munsell_color_system) -* [ ] [NCS](https://en.wikipedia.org/wiki/Natural_Color_System) -* [ ] [PMS](https://en.wikipedia.org/wiki/Pantone) -* [ ] [RAL](https://en.wikipedia.org/wiki/RAL_colour_standard) -* [ ] [TSL](https://en.wikipedia.org/wiki/TSL_color_space) -* [ ] [RG](https://en.wikipedia.org/wiki/RG_color_space) -* [ ] [RGK](https://en.wikipedia.org/wiki/RG_color_space) -* [x] [Coloroid](https://en.wikipedia.org/wiki/Coloroid) — color space for architects and visual constructors, Hungarian Standard MSZ 7300 since 2000. -* [ ] [OSA-UCS](https://en.wikipedia.org/wiki/OSA-UCS) — accurately reprsenting uniform color differences, developed by the Optical Society of America’s Committee on Uniform Color Scales. -* [ ] [HKS](https://en.wikipedia.org/wiki/HKS_(colour_system)) -* [x] [LMS](http://en.wikipedia.org/wiki/LMS_color_space) — represents sensitivity of the human eye to Long, Medium and Short wavelengths. -* [x] [Cubehelix](https://www.mrao.cam.ac.uk/~dag/CUBEHELIX/) — colormaps for data visualization. -* [ ] [Gray](http://dev.w3.org/csswg/css-color/#grays) -* [ ] [CIECAM02](https://en.wikipedia.org/wiki/CIECAM02) -* [ ] [US Federal Standard 595](https://en.wikipedia.org/wiki/Federal_Standard_595) -* [ ] [Toyo](http://mytoyocolor.com/) -* [ ] [PhotoYCC](http://www5.informatik.tu-muenchen.de/lehre/vorlesungen/graphik/info/csc/COL_34.htm) -* [x] [HCG](https://github.com/acterhd/hcg-legacy) -* [ ] [HCL](http://www.chilliant.com/rgb2hsv.html) -* [ ] [HSP](http://alienryderflex.com/hsp.html) -* [ ] [HCY](http://chilliant.blogspot.ca/2012/08/rgbhcy-in-hlsl.html) -* [x] [YES](http://www.atlantis-press.com/php/download_paper.php?id=198) — computationally effective color space for face recognition. -* [ ] [British Standard Colour](http://www.britishstandardcolour.com/) -* [ ] [RG chromacity](https://en.wikipedia.org/wiki/Rg_chromaticity) -* [ ] [CIE DSH](https://en.wikipedia.org/wiki/Rg_chromaticity) -* [ ] [HSM](http://seer.ufrgs.br/rita/article/viewFile/rita_v16_n2_p141/7428) - -## Contribute - -Please fork, add color space with basic _conversions_ to/from XYZ or RGB and _tests_. -The goal of project is to provide the most complete set of color spaces with maximally minimal uniform API. - - -## Credits - -Thanks to all the color scientists, who devoted their lives to color research and delivered their knowledge to us, for now we can trust them and use their formulas and their code. - - -## Related - -* [colormap](https://github.com/bpostlethwaite/colormap) — collection of colormaps to map colors of images/data. A replacement for visualising spaces like cubehelix. -* [color-spectrum](https://www.npmjs.com/package/color-spectrum) — convert spectrum to a color. -* [color-interpolate](https://www.npmjs.com/package/color-interpolate) — interpolate between color values. -* [color-tool](https://www.npmjs.com/package/color-tool) — color picker based on color-space. - - -## Similar projects - -* [color-convert](https://github.com/harthur/color-convert) -* [chromatist](https://github.com/jrus/chromatist) -* [spectra](https://github.com/avp/spectra) -* [colorspaces.js](https://github.com/boronine/colorspaces.js) - diff --git a/node_modules/homey-meshdriver/lib/color-space/rgb.js b/node_modules/homey-meshdriver/lib/color-space/rgb.js deleted file mode 100644 index 5c62358..0000000 --- a/node_modules/homey-meshdriver/lib/color-space/rgb.js +++ /dev/null @@ -1,14 +0,0 @@ -/** - * RGB space. - * - * @module color-space/rgb - */ -'use strict' - -module.exports = { - name: 'rgb', - min: [0,0,0], - max: [255,255,255], - channel: ['red', 'green', 'blue'], - alias: ['RGB'] -}; diff --git a/node_modules/homey-meshdriver/lib/color-space/tsl.js b/node_modules/homey-meshdriver/lib/color-space/tsl.js deleted file mode 100644 index f71d3d8..0000000 --- a/node_modules/homey-meshdriver/lib/color-space/tsl.js +++ /dev/null @@ -1,86 +0,0 @@ -/** - * https://en.wikipedia.org/wiki/TSL_color_space - * http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.86.6037&rep=rep1&type=pdf - * - * Tint, Saturation, Lightness - * - * @module color-space/tsl - */ -'use strict' - -var rgb = require('./rgb'); - -var tsl = module.exports = { - name: 'tsl', - min: [0,0,0], - max: [1, 1, 1], - channel: ['tint','saturation','lightness'] -}; - - -/** - * TSL to RGB - * - * @param {Array} tsl RGB values - * - * @return {Array} TSL values - */ -tsl.rgb = function(tsl) { - var T = tsl[0], - S = tsl[1], - L = tsl[2]; - - //wikipedia solution - /* - // var x = - 1 / Math.tan(Math.PI * 2 * T); - var x = -Math.sin(2*Math.PI*T); - if ( x != 0 ) x = Math.cos(2*Math.PI*T)/x; - - var g = T > .5 ? -S * Math.sqrt( 5 / (9 * (x*x + 1)) ) : - T < .5 ? S * Math.sqrt( 5 / (9 * (x*x + 1)) ) : 0; - var r = T === 0 ? 0.7453559 * S : (x * g + 1/3); - - var R = k * r, G = k * g, B = k * (1 - r - g); - */ - - var x = Math.tan(2 * Math.PI * (T - 1/4)); - x *= x; - - var r = Math.sqrt(5 * S*S / (9 * (1/x + 1))) + 1/3; - var g = Math.sqrt(5 * S*S / (9 * (x + 1))) + 1/3; - - var k = L / (.185 * r + .473 * g + .114); - - var B = k * (1 - r - g); - var G = k * g; - var R = k * r; - - return [ - R * 255, G * 255, B * 255 - ]; -}; - - -/** - * RGB to TSL - * - * @param {Array} tsl TSL values - * - * @return {Array} RGB values - */ -rgb.tsl = function(rgb) { - var r = rgb[0] / 255, - g = rgb[1] / 255, - b = rgb[2] / 255; - - var r_ = (r / (r + g + b) || 0) - 1/3, - g_ = (g / (r + g + b) || 0) - 1/3; - var T = g_ > 0 ? .5 * Math.atan(r_/ g_) / Math.PI + .25 : - g_ < 0 ? .5 * Math.atan(r_/ g_) / Math.PI + .75 : 0; - - var S = Math.sqrt(9/5 * (r_*r_ + g_*g_)); - - var L = (r * 0.299) + (g * 0.587) + (b * 0.114); - - return [T, S, L]; -}; diff --git a/node_modules/homey-meshdriver/lib/color-space/ucs.js b/node_modules/homey-meshdriver/lib/color-space/ucs.js deleted file mode 100644 index 00d718f..0000000 --- a/node_modules/homey-meshdriver/lib/color-space/ucs.js +++ /dev/null @@ -1,58 +0,0 @@ -/** - * https://en.wikipedia.org/wiki/CIE_1960_color_space - * - * Obsolete color space - * - * @module color-space/ucs - */ -'use strict' - -var xyz = require('./xyz'); - -var ucs = module.exports = { - name: 'ucs', - min: [0,0,0], - max: [100, 100, 100], - channel: ['U','V','W'], - alias: ['UCS', 'cie1960'] -}; - - -/** - * UCS to XYZ - * - * @param {Array} ucs XYZ values - * - * @return {Array} UCS values - */ -ucs.xyz = function(ucs) { - var u = ucs[0], - v = ucs[1], - w = ucs[2]; - - return [ - 1.5 * u, - v, - 1.5 * u - 3 * v + 2 * w - ]; -}; - - -/** - * XYZ to UCS - * - * @param {Array} ucs UCS values - * - * @return {Array} XYZ values - */ -xyz.ucs = function(xyz) { - var x = xyz[0], - y = xyz[1], - z = xyz[2]; - - return [ - x * 2/3, - y, - 0.5 * (-x + 3*y + z) - ]; -}; diff --git a/node_modules/homey-meshdriver/lib/color-space/uvw.js b/node_modules/homey-meshdriver/lib/color-space/uvw.js deleted file mode 100644 index ac67905..0000000 --- a/node_modules/homey-meshdriver/lib/color-space/uvw.js +++ /dev/null @@ -1,114 +0,0 @@ -/** - * https://en.wikipedia.org/wiki/CIE_1964_color_space - * - * Very similar to LUV, but w and v are calculated a bit differently. - * - * @module color-space/uvw - */ -'use strict' - -var ucs = require('./ucs'); -var xyz = require('./xyz'); - -var uvw = module.exports = { - name: 'uvw', - min: [-134, -140, 0], - max: [224, 122, 100], - channel: ['U','V','W'], - alias: ['UVW', 'cieuvw', 'cie1964'] -}; - - -/** - * UVW to XYZ - */ -uvw.xyz = function (arg, i, o) { - var _u, _v, w, u, v, x, y, z, xn, yn, zn, un, vn; - u = arg[0], v = arg[1], w = arg[2]; - - if (w === 0) return [0,0,0]; - - //get illuminant/observer - i = i || 'D65'; - o = o || 2; - - xn = xyz.whitepoint[o][i][0]; - yn = xyz.whitepoint[o][i][1]; - zn = xyz.whitepoint[o][i][2]; - - un = (4 * xn) / (xn + (15 * yn) + (3 * zn)); - vn = (6 * yn) / (xn + (15 * yn) + (3 * zn)); - - y = Math.pow((w + 17) / 25, 3); - - _u = u / (13 * w) + un || 0; - _v = v / (13 * w) + vn || 0; - - x = (6 / 4) * y * _u / _v; - z = y * (2 / _v - 0.5 * _u / _v - 5); - - return [x, y, z]; -}; - - -/** - * XYZ to UVW - * - * @return {Array} An UVW array - */ -xyz.uvw = function (arr, i, o) { - var x = arr[0], y = arr[1], z = arr[2], xn, yn, zn, un, vn; - - //find out normal source u v - i = i || 'D65'; - o = o || 2; - - xn = xyz.whitepoint[o][i][0]; - yn = xyz.whitepoint[o][i][1]; - zn = xyz.whitepoint[o][i][2]; - - un = (4 * xn) / (xn + (15 * yn) + (3 * zn)); - vn = (6 * yn) / (xn + (15 * yn) + (3 * zn)); - - var _u = 4 * x / (x + 15 * y + 3 * z) || 0; - var _v = 6 * y / (x + 15 * y + 3 * z) || 0; - - //calc values - var w = 25 * Math.pow(y, 1/3) - 17; - var u = 13 * w * (_u - un); - var v = 13 * w * (_v - vn); - - return [u, v, w]; -}; - - - -/** - * UVW to UCS - * - * @param {Array} uvw UCS values - * - * @return {Array} UVW values - */ -uvw.ucs = function(uvw) { - //find chromacity variables -}; - - -/** - * UCS to UVW - * - * @param {Array} uvw UVW values - * - * @return {Array} UCS values - */ -ucs.uvw = function(ucs) { - // //find chromacity variables - // var u = U / (U + V + W); - // var v = V / (U + V + W); - - // //find 1964 UVW - // w = 25 * Math.pow(y, 1/3) - 17; - // u = 13 * w * (u - un); - // v = 13 * w * (v - vn); -}; diff --git a/node_modules/homey-meshdriver/lib/color-space/xvycc.js b/node_modules/homey-meshdriver/lib/color-space/xvycc.js deleted file mode 100644 index 31e71a8..0000000 --- a/node_modules/homey-meshdriver/lib/color-space/xvycc.js +++ /dev/null @@ -1,87 +0,0 @@ -/** - * https://en.wikipedia.org/wiki/XvYCC - * - * Sony xvYCC is extended YCbCr - * - * It uses same transformation as - * SD: ITU-R BT.601 - * HD: ITU-R BT.709 - * - * But have extended mins/maxes, which (may) result in negative rgb values - * - * https://web.archive.org/web/20130524104850/http://www.sony.net/SonyInfo/technology/technology/theme/xvycc_01.html - * - * //TODO: look for a spec (120$) - there are xvYCC ←→ XYZ conversion formulas - * - * @module color-space/xvycc - */ -'use strict' - -var rgb = require('./rgb'); -var ypbpr = require('./ypbpr'); - -var xvycc = module.exports = { - name: 'xvycc', - min: [0, 0, 0], - max: [255, 255, 255], - channel: ['Y','Cb','Cr'], - alias: ['xvYCC'] -}; - - -/** - * From analog to digital form. - * Simple scale to min/max ranges - * - * @return {Array} Resulting digitized form - */ -ypbpr.xvycc = function (ypbpr) { - var y = ypbpr[0], pb = ypbpr[1], pr = ypbpr[2]; - - return [ - 16 + 219 * y, - 128 + 224 * pb, - 128 + 224 * pr - ]; -} - - -/** - * From digital to analog form. - * Scale to min/max ranges - */ -xvycc.ypbpr = function (xvycc) { - var y = xvycc[0], cb = xvycc[1], cr = xvycc[2]; - - return [ - (y - 16) / 219, - (cb - 128) / 224, - (cr - 128) / 224 - ]; -} - - -/** - * xvYCC to RGB - * transform through analog form - * - * @param {Array} xvycc RGB values - * - * @return {Array} xvYCC values - */ -xvycc.rgb = function (arr, kb, kr) { - return ypbpr.rgb(xvycc.ypbpr(arr), kb, kr); -}; - - -/** - * RGB to xvYCC - * transform through analog form - * - * @param {Array} xvycc xvYCC values - * - * @return {Array} RGB values - */ -rgb.xvycc = function(arr, kb, kr) { - return ypbpr.xvycc(rgb.ypbpr(arr, kb, kr)); -}; diff --git a/node_modules/homey-meshdriver/lib/color-space/xyy.js b/node_modules/homey-meshdriver/lib/color-space/xyy.js deleted file mode 100644 index b825095..0000000 --- a/node_modules/homey-meshdriver/lib/color-space/xyy.js +++ /dev/null @@ -1,39 +0,0 @@ -/** - * Additional xyY space, where xy are relative chromacity params - * - * @module color-space/xyy - */ -'use strict' - -var xyz = require('./xyz'); - -var xyy = { - name: 'xyy', - min: [0,0,0], - max: [1,1,100], - channel: ['x','y','Y'], - alias: ['xyY', 'Yxy', 'yxy'] -}; - -xyy.xyz = function(arg) { - var X, Y, Z, x, y; - x = arg[0]; y = arg[1]; Y = arg[2]; - if (y === 0) { - return [0, 0, 0]; - } - X = x * Y / y; - Z = (1 - x - y) * Y / y; - return [X, Y, Z]; -}; - -xyz.xyy = function(arg) { - var sum, X, Y, Z; - X = arg[0]; Y = arg[1]; Z = arg[2]; - sum = X + Y + Z; - if (sum === 0) { - return [0, 0, Y]; - } - return [X / sum, Y / sum, Y]; -}; - -module.exports = xyy; diff --git a/node_modules/homey-meshdriver/lib/color-space/xyz.js b/node_modules/homey-meshdriver/lib/color-space/xyz.js deleted file mode 100644 index dda3ede..0000000 --- a/node_modules/homey-meshdriver/lib/color-space/xyz.js +++ /dev/null @@ -1,144 +0,0 @@ -/** - * CIE XYZ - * - * @module color-space/xyz - */ -'use strict' - -var rgb = require('./rgb'); - -var xyz = { - name: 'xyz', - min: [0,0,0], - channel: ['X','Y','Z'], - alias: ['XYZ', 'ciexyz', 'cie1931'] -}; - - -/** - * Whitepoint reference values with observer/illuminant - * - * http://en.wikipedia.org/wiki/Standard_illuminant - */ -xyz.whitepoint = { - //1931 2° - 2: { - //incadescent - A:[109.85, 100, 35.585], - // B:[], - C: [98.074, 100, 118.232], - D50: [96.422, 100, 82.521], - D55: [95.682, 100, 92.149], - //daylight - D65: [95.045592705167, 100, 108.9057750759878], - D75: [94.972, 100, 122.638], - //flourescent - // F1: [], - F2: [99.187, 100, 67.395], - // F3: [], - // F4: [], - // F5: [], - // F6:[], - F7: [95.044, 100, 108.755], - // F8: [], - // F9: [], - // F10: [], - F11: [100.966, 100, 64.370], - // F12: [], - E: [100,100,100] - }, - - //1964 10° - 10: { - //incadescent - A:[111.144, 100, 35.200], - C: [97.285, 100, 116.145], - D50: [96.720, 100, 81.427], - D55: [95.799, 100, 90.926], - //daylight - D65: [94.811, 100, 107.304], - D75: [94.416, 100, 120.641], - //flourescent - F2: [103.280, 100, 69.026], - F7: [95.792, 100, 107.687], - F11: [103.866, 100, 65.627], - E: [100,100,100] - } -}; - - -/** - * Top values are the whitepoint’s top values, default are D65 - */ -xyz.max = xyz.whitepoint[2].D65; - - -/** - * Transform xyz to rgb - * - * @param {Array} xyz Array of xyz values - * - * @return {Array} RGB values - */ -xyz.rgb = function (_xyz, white) { - //FIXME: make sure we have to divide like this. Probably we have to replace matrix as well then - white = white || xyz.whitepoint[2].E; - - var x = _xyz[0] / white[0], - y = _xyz[1] / white[1], - z = _xyz[2] / white[2], - r, g, b; - - // assume sRGB - // http://www.brucelindbloom.com/index.html?Eqn_RGB_XYZ_Matrix.html - r = (x * 3.240969941904521) + (y * -1.537383177570093) + (z * -0.498610760293); - g = (x * -0.96924363628087) + (y * 1.87596750150772) + (z * 0.041555057407175); - b = (x * 0.055630079696993) + (y * -0.20397695888897) + (z * 1.056971514242878); - - r = r > 0.0031308 ? ((1.055 * Math.pow(r, 1.0 / 2.4)) - 0.055) - : r = (r * 12.92); - - g = g > 0.0031308 ? ((1.055 * Math.pow(g, 1.0 / 2.4)) - 0.055) - : g = (g * 12.92); - - b = b > 0.0031308 ? ((1.055 * Math.pow(b, 1.0 / 2.4)) - 0.055) - : b = (b * 12.92); - - r = Math.min(Math.max(0, r), 1); - g = Math.min(Math.max(0, g), 1); - b = Math.min(Math.max(0, b), 1); - - return [r * 255, g * 255, b * 255]; -} - - - -/** - * RGB to XYZ - * - * @param {Array} rgb RGB channels - * - * @return {Array} XYZ channels - */ -rgb.xyz = function(rgb, white) { - var r = rgb[0] / 255, - g = rgb[1] / 255, - b = rgb[2] / 255; - - // assume sRGB - r = r > 0.04045 ? Math.pow(((r + 0.055) / 1.055), 2.4) : (r / 12.92); - g = g > 0.04045 ? Math.pow(((g + 0.055) / 1.055), 2.4) : (g / 12.92); - b = b > 0.04045 ? Math.pow(((b + 0.055) / 1.055), 2.4) : (b / 12.92); - - var x = (r * 0.41239079926595) + (g * 0.35758433938387) + (b * 0.18048078840183); - var y = (r * 0.21263900587151) + (g * 0.71516867876775) + (b * 0.072192315360733); - var z = (r * 0.019330818715591) + (g * 0.11919477979462) + (b * 0.95053215224966); - - white = white || xyz.whitepoint[2].E; - - return [x * white[0], y * white[1], z * white[2]]; -}; - - - -module.exports = xyz; diff --git a/node_modules/homey-meshdriver/lib/color-space/ycbcr.js b/node_modules/homey-meshdriver/lib/color-space/ycbcr.js deleted file mode 100644 index 6ff5fed..0000000 --- a/node_modules/homey-meshdriver/lib/color-space/ycbcr.js +++ /dev/null @@ -1,78 +0,0 @@ -/** - * https://en.wikipedia.org/?title=YCbCr - * - * YCbCr is a digital form of YPbPr conversion - * Thence limits are [16...235], according to the ITU-R BT.709 or ITU-R BT.601 - * - * @module color-space/ycbcr - */ -'use strict' - -var rgb = require('./rgb'); -var ypbpr = require('./ypbpr'); - -var ycbcr = module.exports = { - name: 'ycbcr', - min: [16, 16, 16], - max: [235, 240, 240], - channel: ['Y','Cb','Cr'], - alias: ['YCbCr', 'YCC'] -}; - - -/** - * From analog to digital form. - * Simple scale to min/max ranges - * - * @return {Array} Resulting digitized form - */ -ypbpr.ycbcr = function (ypbpr) { - var y = ypbpr[0], pb = ypbpr[1], pr = ypbpr[2]; - - return [ - 16 + 219 * y, - 128 + 224 * pb, - 128 + 224 * pr - ]; -} - - -/** - * From digital to analog form. - * Scale to min/max ranges - */ -ycbcr.ypbpr = function (ycbcr) { - var y = ycbcr[0], cb = ycbcr[1], cr = ycbcr[2]; - - return [ - (y - 16) / 219, - (cb - 128) / 224, - (cr - 128) / 224 - ]; -} - - -/** - * YCbCr to RGB - * transform through analog form - * - * @param {Array} ycbcr RGB values - * - * @return {Array} YCbCr values - */ -ycbcr.rgb = function (arr, kb, kr) { - return ypbpr.rgb(ycbcr.ypbpr(arr), kb, kr); -}; - - -/** - * RGB to YCbCr - * transform through analog form - * - * @param {Array} ycbcr YCbCr values - * - * @return {Array} RGB values - */ -rgb.ycbcr = function(arr, kb, kr) { - return ypbpr.ycbcr(rgb.ypbpr(arr, kb, kr)); -}; diff --git a/node_modules/homey-meshdriver/lib/color-space/yccbccrc.js b/node_modules/homey-meshdriver/lib/color-space/yccbccrc.js deleted file mode 100644 index cd9fa26..0000000 --- a/node_modules/homey-meshdriver/lib/color-space/yccbccrc.js +++ /dev/null @@ -1,41 +0,0 @@ -/** - * YcCbcCrc is ITU-R BT.2020 - * - * @module color-space/yccbccrc - */ -'use strict' - -var rgb = require('./rgb'); -var ypbpr = require('./ypbpr'); - -var yccbccrc = module.exports = { - name: 'yccbccrc', - min: [0, -0.5, -0.5], - max: [1, 0.5, 0.5], - channel: ['Yc','Cbc','Crc'], - alias: ['YcCbcCrc'] -}; - - -/** - * YcCbcCrc to RGB - * - * @param {Array} yccbccrc RGB values - * - * @return {Array} YcCbcCrc values - */ -yccbccrc.rgb = function(yccbccrc) { - return ypbpr.rgb(yccbccrc, 0.0593, 0.2627); -}; - - -/** - * RGB to YcCbcCrc - * - * @param {Array} yccbccrc YcCbcCrc values - * - * @return {Array} RGB values - */ -rgb.yccbccrc = function(arr) { - return rgb.ypbpr(arr, 0.0593, 0.2627); -}; diff --git a/node_modules/homey-meshdriver/lib/color-space/ycgco.js b/node_modules/homey-meshdriver/lib/color-space/ycgco.js deleted file mode 100644 index 52c2997..0000000 --- a/node_modules/homey-meshdriver/lib/color-space/ycgco.js +++ /dev/null @@ -1,56 +0,0 @@ -/** - * https://en.wikipedia.org/?title=YCgCo - * - * @module color-space/ycgco - */ -'use strict' - -var rgb = require('./rgb'); - -var ycgco = module.exports = { - name: 'ycgco', - min: [0, -0.5, -0.5], - max: [1, 0.5, 0.5], - channel: ['Y','Cg','Co'], - alias: ['YCgCo'] -}; - - -/** - * YCgCo to RGB - * transform through analog form - * - * @param {Array} ycgco RGB values - * - * @return {Array} YCgCo values - */ -ycgco.rgb = function (arr) { - var y = arr[0], cg = arr[1], co = arr[2]; - - var tmp = y - cg; - - return [ - (tmp + co)*255, - (y + cg)*255, - (tmp - co)*255 - ]; -}; - - -/** - * RGB to YCgCo - * transform through analog form - * - * @param {Array} ycgco YCgCo values - * - * @return {Array} RGB values - */ -rgb.ycgco = function(arr) { - var r = arr[0]/255, g = arr[1]/255, b = arr[2]/255; - - return [ - 0.25*r + 0.5*g + 0.25*b, - -0.25*r + 0.5*g - 0.25*b, - 0.5*r - 0.5*b - ]; -}; diff --git a/node_modules/homey-meshdriver/lib/color-space/ydbdr.js b/node_modules/homey-meshdriver/lib/color-space/ydbdr.js deleted file mode 100644 index 00942a3..0000000 --- a/node_modules/homey-meshdriver/lib/color-space/ydbdr.js +++ /dev/null @@ -1,71 +0,0 @@ -/** - * https://en.wikipedia.org/?title=YDbDr - * - * @module color-space/ydbdr - */ -'use strict' - -var rgb = require('./rgb'); -var yuv = require('./yuv'); - -var ydbdr = module.exports = { - name: 'ydbdr', - min: [0,-1.333,-1.333], - max: [1, 1.333, 1.333], - channel: ['Y','Db','Dr'], - alias: ['YDbDr'] -}; - - -/** - * YDbDr to RGB - * - * @param {Array} ydbdr RGB values - * - * @return {Array} YDbDr values - */ -ydbdr.rgb = function(ydbdr) { - var y = ydbdr[0], db = ydbdr[1], dr = ydbdr[2]; - - var r = y + 0.000092303716148*db - 0.525912630661865*dr; - var g = y - 0.129132898890509*db + 0.267899328207599*dr; - var b = y + 0.664679059978955*db - 0.000079202543533*dr; - - return [r*255, g*255, b*255]; -}; - - -/** - * RGB to YDbDr - * - * @param {Array} ydbdr YDbDr values - * - * @return {Array} RGB values - */ -rgb.ydbdr = function(rgb) { - var r = rgb[0]/255, g = rgb[1]/255, b = rgb[2]/255; - return [ - 0.299*r + 0.587*g + 0.114*b, - -0.450*r - 0.883*g + 1.333*b, - -1.333*r + 1.116*g + 0.217*b - ]; -}; - - -/** - * To YUV - */ -yuv.ydbdr = function (yuv) { - return [ - yuv[0], 3.059*yuv[1], -2.169*yuv[2] - ] -}; - -/** - * From YUV - */ -ydbdr.yuv = function (ydbdr) { - return [ - ydbdr[0], ydbdr[1] / 3.059, -ydbdr[2] / 2.169 - ] -}; diff --git a/node_modules/homey-meshdriver/lib/color-space/yes.js b/node_modules/homey-meshdriver/lib/color-space/yes.js deleted file mode 100644 index 636a2aa..0000000 --- a/node_modules/homey-meshdriver/lib/color-space/yes.js +++ /dev/null @@ -1,49 +0,0 @@ -/** - * YES color space - * http://www.atlantis-press.com/php/download_paper.php?id=198 - * - * @module color-space/yes - */ -'use strict' - -var rgb = require('./rgb'); - -var yes = module.exports = { - name: 'yes', - min: [0,0,0], - max: [1,1,1], - channel: ['luminance', 'e-factor', 's-factor'] -}; - - -yes.rgb = function(arg){ - var y = arg[0], e = arg[1], s = arg[2]; - - var m = [ - 1, 1.431, .126, - 1, -.569, .126, - 1, .431, -1.874 - ]; - - var r = y * m[0] + e * m[1] + s * m[2], - g = y * m[3] + e * m[4] + s * m[5], - b = y * m[6] + e * m[7] + s * m[8]; - - return [r*255, g*255, b*255]; -}; - -rgb.yes = function(arg) { - var r = arg[0] / 255, g = arg[1] / 255, b = arg[2] / 255; - - var m = [ - .253, .684, .063, - .500, -.50, .0, - .250, .250, -.5 - ]; - - return [ - r * m[0] + g * m[1] + b * m[2], - r * m[3] + g * m[4] + b * m[5], - r * m[6] + g * m[7] + b * m[8] - ]; -}; diff --git a/node_modules/homey-meshdriver/lib/color-space/yiq.js b/node_modules/homey-meshdriver/lib/color-space/yiq.js deleted file mode 100644 index 6825ca6..0000000 --- a/node_modules/homey-meshdriver/lib/color-space/yiq.js +++ /dev/null @@ -1,50 +0,0 @@ -/** - * YIQ https://en.wikipedia.org/?title=YIQ - * - * @module color-space/yiq - */ -'use strict' - -var rgb = require('./rgb'); - -var yiq = module.exports = { - name: 'yiq', - min: [0,-0.5957,-0.5226], - max: [1, 0.5957, 0.5226], - channel: ['Y','I','Q'], - alias: ['YIQ'] -}; - -yiq.rgb = function(yiq) { - var y = yiq[0], - i = yiq[1], - q = yiq[2], - r, g, b; - - r = (y * 1) + (i * 0.956) + (q * 0.621); - g = (y * 1) + (i * -0.272) + (q * -0.647); - b = (y * 1) + (i * -1.108) + (q * 1.705); - - r = Math.min(Math.max(0, r), 1); - g = Math.min(Math.max(0, g), 1); - b = Math.min(Math.max(0, b), 1); - - return [r * 255, g * 255, b * 255]; -}; - - -//extend rgb -rgb.yiq = function(rgb) { - var r = rgb[0] / 255, - g = rgb[1] / 255, - b = rgb[2] / 255; - - - var y = (r * 0.299) + (g * 0.587) + (b * 0.114); - var i = 0, q = 0; - if (r !== g || g !== b) { - i = (r * 0.596) + (g * -0.275) + (b * -0.321); - q = (r * 0.212) + (g * -0.528) + (b * 0.311); - } - return [y, i, q]; -}; diff --git a/node_modules/homey-meshdriver/lib/color-space/ypbpr.js b/node_modules/homey-meshdriver/lib/color-space/ypbpr.js deleted file mode 100644 index 0806851..0000000 --- a/node_modules/homey-meshdriver/lib/color-space/ypbpr.js +++ /dev/null @@ -1,65 +0,0 @@ -/** - * https://en.wikipedia.org/?title=YPbPr - * - * YPbPr is analog form of YCbCr - * hence limits are [0..1] - * - * Default conversion is ITU-R BT.709 - * - * @module color-space/ypbpr - */ -'use strict' - -var rgb = require('./rgb'); - -var ypbpr = module.exports = { - name: 'ypbpr', - min: [0,-0.5,-0.5], - max: [1, 0.5, 0.5], - channel: ['Y','Pb','Pr'], - alias: ['YPbPr', 'Y/PB/PR', 'YPRPB', 'PRPBY', 'PBPRY', 'Y/Pb/Pr', 'YPrPb', 'PrPbY', 'PbPrY', 'Y/R-Y/B-Y', 'Y(R-Y)(B-Y)', 'R-Y', 'B-Y'] -}; - - -/** - * YPbPr to RGB - * - * @param {Array} ypbpr RGB values - * - * @return {Array} YPbPr values - */ -ypbpr.rgb = function(ypbpr, kb, kr) { - var y = ypbpr[0], pb = ypbpr[1], pr = ypbpr[2]; - - //default conversion is ITU-R BT.709 - kb = kb || 0.0722; - kr = kr || 0.2126; - - var r = y + 2 * pr * (1 - kr); - var b = y + 2 * pb * (1 - kb); - var g = (y - kr * r - kb * b) / (1 - kr - kb); - - return [r*255,g*255,b*255]; -}; - - -/** - * RGB to YPbPr - * - * @param {Array} ypbpr YPbPr values - * - * @return {Array} RGB values - */ -rgb.ypbpr = function(rgb, kb, kr) { - var r = rgb[0]/255, g = rgb[1]/255, b = rgb[2]/255; - - //ITU-R BT.709 - kb = kb || 0.0722; - kr = kr || 0.2126; - - var y = kr*r + (1 - kr - kb)*g + kb*b; - var pb = 0.5 * (b - y) / (1 - kb); - var pr = 0.5 * (r - y) / (1 - kr); - - return [y, pb, pr]; -}; diff --git a/node_modules/homey-meshdriver/lib/color-space/yuv.js b/node_modules/homey-meshdriver/lib/color-space/yuv.js deleted file mode 100644 index a33236f..0000000 --- a/node_modules/homey-meshdriver/lib/color-space/yuv.js +++ /dev/null @@ -1,48 +0,0 @@ -/** - * YUV https://en.wikipedia.org/?title=YUV - * - * @module color-space/yuv - */ -'use strict' - -var rgb = require('./rgb'); - -var yuv = module.exports = { - name: 'yuv', - min: [0,-0.5,-0.5], - max: [1, 0.5, 0.5], - channel: ['Y','U','V'], - alias: ['YUV', 'EBU'], - -}; - -yuv.rgb = function(yuv) { - var y = yuv[0], - u = yuv[1], - v = yuv[2], - r, g, b; - - r = (y * 1) + (u * 0) + (v * 1.13983); - g = (y * 1) + (u * -0.39465) + (v * -0.58060); - b = (y * 1) + (u * 2.02311) + (v * 0); - - r = Math.min(Math.max(0, r), 1); - g = Math.min(Math.max(0, g), 1); - b = Math.min(Math.max(0, b), 1); - - return [r * 255, g * 255, b * 255]; -} - - -//extend rgb -rgb.yuv = function(rgb) { - var r = rgb[0] / 255, - g = rgb[1] / 255, - b = rgb[2] / 255; - - var y = (r * 0.299) + (g * 0.587) + (b * 0.114); - var u = (r * -0.14713) + (g * -0.28886) + (b * 0.436); - var v = (r * 0.615) + (g * -0.51499) + (b * -0.10001); - - return [y, u, v]; -}; diff --git a/node_modules/homey-meshdriver/lib/util/cie_rgb_color_space_conversion.js b/node_modules/homey-meshdriver/lib/util/cie_rgb_color_space_conversion.js deleted file mode 100644 index 08f5a37..0000000 --- a/node_modules/homey-meshdriver/lib/util/cie_rgb_color_space_conversion.js +++ /dev/null @@ -1,148 +0,0 @@ - -/* -With these functions you can convert the CIE color space to the RGB color space and vice versa. - -The developer documentation for Philips Hue provides the formulas used in the code below: -https://developers.meethue.com/documentation/color-conversions-rgb-xy - -I've used the formulas and Objective-C example code and transfered it to JavaScript. - - -Examples: - -var rgb = cie_to_rgb(0.6611, 0.2936) -var cie = rgb_to_cie(255, 39, 60) - ------------------------------------------------------------------------------------- - -The MIT License (MIT) - -Copyright (c) 2017 www.usolved.net -Published under https://github.com/usolved/cie-rgb-converter - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -*/ - - - - -/** - * Converts CIE color space to RGB color space - * @param {Number} x - * @param {Number} y - * @param {Number} brightness - Ranges from 1 to 254 - * @return {Array} Array that contains the color values for red, green and blue - */ -function cie_to_rgb(x, y, brightness) -{ - //Set to maximum brightness if no custom value was given (Not the slick ECMAScript 6 way for compatibility reasons) - if (brightness === undefined) { - brightness = 254; - } - - var z = 1.0 - x - y; - var Y = (brightness / 254).toFixed(2); - var X = (Y / y) * x; - var Z = (Y / y) * z; - - //Convert to RGB using Wide RGB D65 conversion - var red = X * 1.656492 - Y * 0.354851 - Z * 0.255038; - var green = -X * 0.707196 + Y * 1.655397 + Z * 0.036152; - var blue = X * 0.051713 - Y * 0.121364 + Z * 1.011530; - - //If red, green or blue is larger than 1.0 set it back to the maximum of 1.0 - if (red > blue && red > green && red > 1.0) { - - green = green / red; - blue = blue / red; - red = 1.0; - } - else if (green > blue && green > red && green > 1.0) { - - red = red / green; - blue = blue / green; - green = 1.0; - } - else if (blue > red && blue > green && blue > 1.0) { - - red = red / blue; - green = green / blue; - blue = 1.0; - } - - //Reverse gamma correction - red = red <= 0.0031308 ? 12.92 * red : (1.0 + 0.055) * Math.pow(red, (1.0 / 2.4)) - 0.055; - green = green <= 0.0031308 ? 12.92 * green : (1.0 + 0.055) * Math.pow(green, (1.0 / 2.4)) - 0.055; - blue = blue <= 0.0031308 ? 12.92 * blue : (1.0 + 0.055) * Math.pow(blue, (1.0 / 2.4)) - 0.055; - - - //Convert normalized decimal to decimal - red = Math.min(Math.max(Math.round(red * 255), 0), 255); - green = Math.min(Math.max(Math.round(green * 255), 0), 255); - blue = Math.min(Math.max(Math.round(blue * 255), 0), 255); - - if (isNaN(red)) - red = 0; - - if (isNaN(green)) - green = 0; - - if (isNaN(blue)) - blue = 0; - - return [red, green, blue]; -} - - -/** - * Converts RGB color space to CIE color space - * @param {Number} red - * @param {Number} green - * @param {Number} blue - * @return {Array} Array that contains the CIE color values for x and y - */ -function rgb_to_cie(red, green, blue) -{ - //Apply a gamma correction to the RGB values, which makes the color more vivid and more the like the color displayed on the screen of your device - var red = (red > 0.04045) ? Math.pow((red + 0.055) / (1.0 + 0.055), 2.4) : (red / 12.92); - var green = (green > 0.04045) ? Math.pow((green + 0.055) / (1.0 + 0.055), 2.4) : (green / 12.92); - var blue = (blue > 0.04045) ? Math.pow((blue + 0.055) / (1.0 + 0.055), 2.4) : (blue / 12.92); - - //RGB values to XYZ using the Wide RGB D65 conversion formula - var X = red * 0.664511 + green * 0.154324 + blue * 0.162028; - var Y = red * 0.283881 + green * 0.668433 + blue * 0.047685; - var Z = red * 0.000088 + green * 0.072310 + blue * 0.986039; - - //Calculate the xy values from the XYZ values - var x = (X / (X + Y + Z)).toFixed(4); - var y = (Y / (X + Y + Z)).toFixed(4); - - if (isNaN(x)) - x = 0; - - if (isNaN(y)) - y = 0; - - - return [x, y]; -} - -module.exports = { - cie_to_rgb, rgb_to_cie -} \ No newline at end of file diff --git a/node_modules/homey-meshdriver/lib/zigbee/ZigBeeDevice.js b/node_modules/homey-meshdriver/lib/zigbee/ZigBeeDevice.js index 12c8604..97c4006 100644 --- a/node_modules/homey-meshdriver/lib/zigbee/ZigBeeDevice.js +++ b/node_modules/homey-meshdriver/lib/zigbee/ZigBeeDevice.js @@ -5,6 +5,23 @@ const MeshDevice = require('../MeshDevice.js'); // TODO battery node online event +const i18n = { + error: { + unknown: { + en: 'Unknown error', + nl: 'Onbekend probleem', + }, + invalid_ieeeaddr: { + en: 'Device not found in network', + nl: 'Apparaat niet gevonden in netwerk', + }, + left_network: { + en: 'Device has left the network, please remove and re-pair', + nl: 'Apparaat heeft het netwerk verlaten, verwijder en voeg opnieuw toe', + }, + }, +}; + /** * @extends MeshDevice */ @@ -32,7 +49,7 @@ class ZigBeeDevice extends MeshDevice { this.once('__meshInit', () => { this.log('ZigBeeDevice has been inited'); this.onMeshInit && this.onMeshInit(); - this._initReportListener(); + this._initNodeListeners(); }); } @@ -43,7 +60,12 @@ class ZigBeeDevice extends MeshDevice { /** * @private */ - _initReportListener() { + _initNodeListeners() { + + // Start listening for incoming leave events (once device has left network it can not return) + this.node.on('leave', () => { + this.setUnavailable(this.__(i18n.error.left_network)); + }); // Start listening for incoming reports this.node.on('report', report => { @@ -151,9 +173,7 @@ class ZigBeeDevice extends MeshDevice { const capabilitySetObj = this._getCapabilityObj('set', capabilityId, clusterId); if (capabilitySetObj instanceof Error) return capabilitySetObj; - this.registerCapabilityListener(capabilityId, async (value, opts) => { - return await this._registerCapabilityListenerHandler(capabilitySetObj, capabilityId, value, opts); - }); + this.registerCapabilityListener(capabilityId, async (value, opts) => await this._registerCapabilityListenerHandler(capabilitySetObj, capabilityId, value, opts)); } /** @@ -173,7 +193,7 @@ class ZigBeeDevice extends MeshDevice { // Loop all changed capabilities for (const capabilityId of Object.keys(valueObj)) { - const capabilityObj = capabilitiesOpts.find(x => x.capability = capabilityId); + const capabilityObj = capabilitiesOpts.find(x => x.capability === capabilityId); const clusterId = capabilityObj.cluster; const value = valueObj[capabilityId]; const opts = optsObj[capabilityId]; @@ -211,7 +231,7 @@ class ZigBeeDevice extends MeshDevice { let commandId = capabilitySetObj.commandId; if (typeof capabilitySetObj.commandId === 'function') commandId = capabilitySetObj.commandId(value, opts); - let parsedPayload = await capabilitySetObj.parser.call(this, value, opts); + const parsedPayload = await capabilitySetObj.parser.call(this, value, opts); if (parsedPayload instanceof Error) return Promise.reject(parsedPayload); if (parsedPayload === null) return Promise.resolve(); @@ -241,7 +261,7 @@ class ZigBeeDevice extends MeshDevice { systemOpts = Homey.util.recursiveDeepCopy(require(`./system/capabilities/${capabilityId}/${clusterId}.js`)); // Bind correct scope - for (let i in systemOpts) { + for (const i in systemOpts) { if (systemOpts.hasOwnProperty(i) && typeof systemOpts[i] === 'function') { systemOpts[i] = systemOpts[i].bind(this); } @@ -384,7 +404,7 @@ class ZigBeeDevice extends MeshDevice { capabilitiesOpts.forEach(capabilityObj => { const capabilityId = capabilityObj.capability; const clusterId = capabilityObj.cluster; - let userOpts = capabilityObj.opts || {}; + const userOpts = capabilityObj.opts || {}; // Register the ZigBee capability listener this._capabilities[capabilityId] = this._capabilities[capabilityId] || {}; @@ -484,7 +504,7 @@ class ZigBeeDevice extends MeshDevice { } catch (err) { this.error(`registerReportListener() -> error could not bind ${bindObj.clusterId} cluster on endpoint ${bindObj.endpointId}`, err); if (this._bindRequests.length > 0) return this._bindCluster(); - else this.bindingInProcess = false; + this.bindingInProcess = false; return; } @@ -507,7 +527,7 @@ class ZigBeeDevice extends MeshDevice { // If queue not empty continue, else mark as done if (this._bindRequests.length > 0) return this._bindCluster(); - else this.bindingInProcess = false; + this.bindingInProcess = false; } /** @@ -553,28 +573,28 @@ class ZigBeeDevice extends MeshDevice { alreadyConfigured.repChange === repChange) { this.log(`registerAttrReportListener() -> already configured attr reporting ${reportId}`); return true; - } else { + } - // If was registered before unregister it first - this.unsetStoreValue(reportId); + // If was registered before unregister it first + this.unsetStoreValue(reportId); - return new Promise((resolve, reject) => { - // Add to queue - this._configureReportRequests.push({ - reportId, - endpointId, - clusterId, - attrId, - minInt, - maxInt, - repChange, - promise: { resolve, reject } - }); + return new Promise((resolve, reject) => { + // Add to queue + this._configureReportRequests.push({ + reportId, + endpointId, + clusterId, + attrId, + minInt, + maxInt, + repChange, + promise: { resolve, reject }, + }); + + // If not already binding start the binding process + if (!this.configureReportInProcess) this._configureReport(); + }); - // If not already binding start the binding process - if (!this.configureReportInProcess) this._configureReport(); - }) - } } /** @@ -611,7 +631,7 @@ class ZigBeeDevice extends MeshDevice { // If queue not empty continue, else mark as done if (this._configureReportRequests.length > 0) return this._configureReport(); - else this.configureReportInProcess = false; + this.configureReportInProcess = false; } /** diff --git a/node_modules/homey-meshdriver/lib/zigbee/system/capabilities/light_temperature/lightingColorCtrl.js b/node_modules/homey-meshdriver/lib/zigbee/system/capabilities/light_temperature/lightingColorCtrl.js index 8a64212..2aaba54 100644 --- a/node_modules/homey-meshdriver/lib/zigbee/system/capabilities/light_temperature/lightingColorCtrl.js +++ b/node_modules/homey-meshdriver/lib/zigbee/system/capabilities/light_temperature/lightingColorCtrl.js @@ -1,6 +1,6 @@ 'use strict'; -const util = require('./../../../../ZigBeeDevice'); +const util = require('./../../../../util'); module.exports = { set: 'moveToColorTemp', diff --git a/node_modules/homey-meshdriver/lib/zigbee/system/capabilities/measure_power/seMetering.js b/node_modules/homey-meshdriver/lib/zigbee/system/capabilities/measure_power/seMetering.js new file mode 100644 index 0000000..1b0c96a --- /dev/null +++ b/node_modules/homey-meshdriver/lib/zigbee/system/capabilities/measure_power/seMetering.js @@ -0,0 +1,14 @@ +'use strict'; + +module.exports = { + get: 'instantaneousDemand', + reportParser(value) { + const instantaneousDemandFactor = this.instantaneousDemandFactor || 1 + if (value < 0) return; + return value / instantaneousDemandfactor; + }, + report: 'instantaneousDemand', + getOpts: { + getOnStart: true, + }, +}; diff --git a/node_modules/homey-meshdriver/lib/zwave/ZwaveDevice.js b/node_modules/homey-meshdriver/lib/zwave/ZwaveDevice.js index 758f2f9..92b1588 100644 --- a/node_modules/homey-meshdriver/lib/zwave/ZwaveDevice.js +++ b/node_modules/homey-meshdriver/lib/zwave/ZwaveDevice.js @@ -3,13 +3,20 @@ const Homey = require('homey'); const MeshDevice = require('../MeshDevice.js'); +const commandClassParsers = { + NOTIFICATION: payload => require('./system/commandclasses/NOTIFICATION')(payload), + METER: payload => require('./system/commandclasses/METER')(payload), + SENSOR_ALARM: payload => require('./system/commandclasses/SENSOR_ALARM')(payload), + SENSOR_MULTILEVEL: payload => require('./system/commandclasses/SENSOR_MULTILEVEL')(payload), +}; + const i18n = { settings: { offlineNodeSaveMessage: { en: 'Settings will be saved during the next wakeup of this battery device.', - nl: 'Instelling zullen worden opgeslagen bij volgende wakeup van dit apparaat.' - } - } + nl: 'Instelling zullen worden opgeslagen bij volgende wakeup van dit apparaat.', + }, + }, }; // TODO alarm_fire capability parser @@ -81,21 +88,29 @@ class ZwaveDevice extends MeshDevice { const manifest = this.getDriver().getManifest(); if (!manifest || !manifest.settings) return this.manifestSettings = []; - const flattenSettings = (settings) => { - return settings.reduce((manifestSettings, setting) => { - if (setting.type === 'group') { - return manifestSettings.concat(flattenSettings(setting.children)); - } - manifestSettings.push(setting); - return manifestSettings; - }, []); - }; + const flattenSettings = (settings) => settings.reduce((manifestSettings, setting) => { + if (setting.type === 'group') { + return manifestSettings.concat(flattenSettings(setting.children)); + } + manifestSettings.push(setting); + return manifestSettings; + }, []); this.manifestSettings = flattenSettings(manifest.settings); } return this.manifestSettings; } + /** + * Method that refreshes the capability value once. If you want to poll this value please use + * the parameter getOpts.pollInterval at {@link ZwaveDevice#registerCapability} + * @param {String} capabilityId, the string id of the Homey capability + * @param {String} commandClassId, the Z-Wave command class used for this request + */ + refreshCapabilityValue(capabilityId, commandClassId) { + return this._getCapabilityValue(capabilityId, commandClassId); + } + /** * Get a specific setting object from the manifest * @param id - Setting id to retrieve @@ -120,7 +135,7 @@ class ZwaveDevice extends MeshDevice { let changeSettingError = ''; // Loop all changed settings - for (let changedKey of changedKeysArr) { + for (const changedKey of changedKeysArr) { const newValue = newSettings[changedKey]; // check for poll interval @@ -136,20 +151,29 @@ class ZwaveDevice extends MeshDevice { // Get manifest setting object and execute configuration set const manifestSetting = (this.getManifestSettings().find(setting => setting.id === changedKey) || {}).zwave; - // Do not try to handle non-zwave settings - if (typeof manifestSetting === 'undefined') continue; + // Non z-wave settings: see if there is a function to execute, otherwise do nothing. + if (typeof manifestSetting === 'undefined') { + + if (this._settings.hasOwnProperty(changedKey)) { + const parser = this._settings[changedKey]; + + if (typeof parser === 'function') parser.call(this, newValue); + } + continue; + } try { - this.log(`configurationSet() -> ${changedKey}:${newSettings[changedKey]}, ${manifestSetting.index}, ${manifestSetting.size}`); + this.log(`configurationSet() -> ${changedKey}: ${newSettings[changedKey]}, ${manifestSetting.index}, ${manifestSetting.size}`); await this.configurationSet({ id: changedKey, index: manifestSetting.index, size: manifestSetting.size, + signed: (manifestSetting.hasOwnProperty('signed')) ? manifestSetting.signed : true, }, newSettings[changedKey]); } catch (err) { this.error(`failed_to_set_${changedKey}_to_${newValue}_size_${manifestSetting.size}`, err); - let errorString = changeSettingError + `failed_to_set_${changedKey}_to_${newValue}_size_${manifestSetting.size}`; - if (changeSettingError.length > 0) errorString = '_' + errorString; + let errorString = `${changeSettingError}failed_to_set_${changedKey}_to_${newValue}_size_${manifestSetting.size}`; + if (changeSettingError.length > 0) errorString = `_${errorString}`; changeSettingError = errorString; } } @@ -168,27 +192,26 @@ class ZwaveDevice extends MeshDevice { _composeCustomSaveMessage(oldSettings, newSettings, changedKeysArr) { // Provide user with proper feedback after clicking save - if (this.node.battery === true && this.node.online === false) { - let saveMessage = i18n.settings.offlineNodeSaveMessage; - if (typeof this.customSaveMessage === 'function') { - let message = this.customSaveMessage(oldSettings, newSettings, changedKeysArr); - - if (typeof message !== 'object') { - this._debug('Save message\'s return value is an invalid object'); - } else if (!message.hasOwnProperty('en')) { - this._debug('A custom save message needs at least the english translation'); - } else { - saveMessage = message; - } - } else if (typeof this.customSaveMessage === 'object') { - if (!this.customSaveMessage.hasOwnProperty('en')) { - this._debug('A custom save message needs at least the english translation'); - } else { - saveMessage = this.customSaveMessage; - } + let saveMessage = null; + if (this.node.battery === true && this.node.online === false) saveMessage = i18n.settings.offlineNodeSaveMessage; + if (typeof this.customSaveMessage === 'function') { + const message = this.customSaveMessage(oldSettings, newSettings, changedKeysArr); + + if (typeof message !== 'object' && typeof message !== 'string') { + this._debug('Save message\'s return value is not an object nor a string'); + } else if (typeof message === 'object' && !message.hasOwnProperty('en')) { + this._debug('A custom save message needs at least the english translation'); + } else { + saveMessage = message; + } + } else if (typeof this.customSaveMessage === 'object') { + if (!this.customSaveMessage.hasOwnProperty('en')) { + this._debug('A custom save message needs at least the english translation'); + } else { + saveMessage = this.customSaveMessage; } - return saveMessage; } + return saveMessage; } /** @@ -199,6 +222,7 @@ class ZwaveDevice extends MeshDevice { * @param options.index * @param options.size * @param options.id + * @param [options.signed] * @param [options.useSettingParser=true] * @param value * @returns {Promise.<*>} @@ -206,7 +230,7 @@ class ZwaveDevice extends MeshDevice { async configurationSet(options = {}, value) { if (!options.hasOwnProperty('index') && !options.hasOwnProperty('id')) return Promise.reject(new Error('missing_setting_index_or_id')); if (options.hasOwnProperty('index') && !options.hasOwnProperty('size')) return Promise.reject(new Error('missing_setting_size')); - if (options.hasOwnProperty('id') && !options.hasOwnProperty('size') && !options.hasOwnProperty('index')) { + if (options.hasOwnProperty('id') && (!options.hasOwnProperty('size') || !options.hasOwnProperty('index') || !options.hasOwnProperty('signed'))) { // Fetch information from manifest by setting id const settingObj = this.getManifestSetting(options.id); @@ -219,7 +243,10 @@ class ZwaveDevice extends MeshDevice { } options.index = settingObj.zwave.index; options.size = settingObj.zwave.size; - if (settingObj.zwave.hasOwnProperty('signed')) options.signed = settingObj.zwave.signed; + + if (!options.hasOwnProperty('signed')) { + options.signed = (settingObj.zwave.hasOwnProperty('signed')) ? settingObj.zwave.signed : true; + } } // Check if device has command class @@ -248,11 +275,22 @@ class ZwaveDevice extends MeshDevice { }, 'Configuration Value': parsedValue || value, }, (err, result) => { + const parsedBufValue = parsedValue.toString('hex').toUpperCase(); + let parsedDecValue; + + try { + if (!options.hasOwnProperty('signed') || options.signed === true) parsedDecValue = parsedValue.readIntBE(0, options.size); + else parsedDecValue = parsedValue.readUIntBE(0, options.size); + } catch (error) { + this.error('failed to read the buffer value', error); + parsedDecValue = 'N/A'; + } + if (err) { - this.error(`configurationSet() -> failed to set configuration parameter ${options.index}, size: ${options.size} to ${value} (parsed: ${parsedValue})`); + this.error(`configurationSet() -> failed to set configuration parameter ${options.index}, size: ${options.size} to ${value} (parsed: ${parsedDecValue} / 0x${parsedBufValue})`); return reject(err); } - this.log(`configurationSet() -> successful set ${options.index}, size: ${options.size} to ${value} (parsed: ${parsedValue})`); + this.log(`configurationSet() -> successfully set ${options.index}, size: ${options.size} to ${value} (parsed: ${parsedDecValue} / 0x${parsedBufValue})`); return resolve(result); }); @@ -261,6 +299,29 @@ class ZwaveDevice extends MeshDevice { }); } + /** + * Method that retrieves the value of a configuration parameter from the node. + * @param {Object} options + * @param {number} options.index - Parameter index + * @returns {*} + */ + async configurationGet(options = {}) { + if (!options.hasOwnProperty('index')) return Promise.reject(new Error('missing_index')); + if (this.node.battery === true && this.node.online === false) return Promise.reject(new Error('cannot_get_parameter_from_battery_node')); + + // Check if device has command class + const commandClassConfiguration = this.getCommandClass('CONFIGURATION'); + if (commandClassConfiguration instanceof Error || + typeof commandClassConfiguration.CONFIGURATION_GET !== 'function') { + this.error('Missing COMMAND_CLASS_CONFIGURATION'); + return Promise.reject(new Error('missing_command_class_configuration')); + } + + return commandClassConfiguration.CONFIGURATION_GET({ + 'Parameter Number': options.index, + }); + } + /* Private methods */ @@ -277,15 +338,35 @@ class ZwaveDevice extends MeshDevice { * @private */ _parseSetting(settingObj = {}, value) { + let parser, + customParser; // get the parser - const parser = this._settings[settingObj.id] || this._systemSettingParser; + if (typeof this._settings[settingObj.id] !== 'undefined') { + parser = this._settings[settingObj.id]; + customParser = true; + } else { + parser = this._systemSettingParser; + } + if (typeof parser !== 'function') return new Error('invalid_parser'); // Parse and check value - const parsedValue = parser.call(this, value, settingObj); + let parsedValue = parser.call(this, value, settingObj); if (parsedValue instanceof Error) return parsedValue; - if (!Buffer.isBuffer(parsedValue)) return new Error('invalid_buffer'); + if (!Buffer.isBuffer(parsedValue)) { + + if (customParser) { + parsedValue = this._systemSettingParser(parsedValue, settingObj); + + if (!Buffer.isBuffer(parsedValue)) { + return new Error('invalid_buffer'); + } + } else { + return new Error('invalid_buffer'); + } + } + if (parsedValue.length !== settingObj.size) return new Error('invalid_buffer_length'); return parsedValue; } @@ -365,13 +446,14 @@ class ZwaveDevice extends MeshDevice { if (capabilityGetObj.opts.pollInterval) { let pollInterval; + const pollMultiplication = capabilityGetObj.opts.pollMultiplication || 1; if (typeof capabilityGetObj.opts.pollInterval === 'number') { - pollInterval = capabilityGetObj.opts.pollInterval; + pollInterval = (capabilityGetObj.opts.pollInterval * pollMultiplication); } if (typeof capabilityGetObj.opts.pollInterval === 'string') { - pollInterval = this.getSetting(capabilityGetObj.opts.pollInterval); + pollInterval = (this.getSetting(capabilityGetObj.opts.pollInterval) * pollMultiplication); this._pollIntervalsKeys[capabilityGetObj.opts.pollInterval] = { capabilityId, commandClassId, @@ -454,8 +536,9 @@ class ZwaveDevice extends MeshDevice { try { const commandClass = capabilitySetObj.node.CommandClass[`COMMAND_CLASS_${capabilitySetObj.commandClassId}`]; const command = commandClass[capabilitySetObj.commandId]; - - return command.call(command, parsedPayload); + const commandSetPromise = command.call(command, parsedPayload); + if (this.node.battery === true && this.node.online === false) return Promise.resolve('TRANSMIT_QUEUED'); + return commandSetPromise; } catch (err) { return Promise.reject(err); } @@ -496,7 +579,10 @@ class ZwaveDevice extends MeshDevice { if (capabilityReportObj instanceof Error) return capabilityReportObj; if (typeof capabilityReportObj.parser !== 'function') return new Error('Missing report parser'); - const parsedPayload = capabilityReportObj.parser.call(this, payload); + // parse the payload using a built-in Command Class parser + const commandClassParsedPayload = this._parseCommandClassPayload(commandClassId, payload); + + const parsedPayload = capabilityReportObj.parser.call(this, commandClassParsedPayload); if (parsedPayload instanceof Error) return parsedPayload; if (parsedPayload === null) return parsedPayload; @@ -505,6 +591,16 @@ class ZwaveDevice extends MeshDevice { return parsedPayload; } + /** + * Extend a Command Class payload with parsed values, as provided by the Z-Wave specification + * @private + */ + _parseCommandClassPayload(commandClassId, payload) { + const parser = commandClassParsers[commandClassId]; + if (parser) return parser(payload); + return payload; + } + /** * @private */ @@ -583,6 +679,7 @@ class ZwaveDevice extends MeshDevice { * @param {Boolean} [opts.getOpts.getOnStart] - Get the value on App start * @param {Boolean} [opts.getOpts.getOnOnline] - Get the value when the device is marked as online * @param {Number|String} [opts.getOpts.pollInterval] - Interval (in ms) to poll with a GET request. When provided a string, the device's setting with the string as ID will be used (e.g. `poll_interval`) + * @param {Number} [opts.getOpts.pollMultiplication] - Multiplication factor for the pollInterval key, must be a number. (e.g. 1000 to convert to seconds, 60.000 for minutes, 3600000 for hours) * @param {String} [opts.set] - The command to set a value (e.g. `BASIC_SET`) * @param {Function} [opts.setParser] - The function that is called when a SET request is made. Should return an Object. * @param {Mixed} [opts.setParser.value] - The value of the Homey capability @@ -644,6 +741,7 @@ class ZwaveDevice extends MeshDevice { try { return require(`./system/capabilities/${capabilityId}/${this.getClass()}/${commandClassId}.js`); } catch (err) { + if (err.code !== 'MODULE_NOT_FOUND') this.error(err); return null; } } @@ -651,7 +749,7 @@ class ZwaveDevice extends MeshDevice { /** * Register a setting parser, which is called when a setting has changed. * @param {string} settingId - The setting ID, as specified in `/app.json` - * @param {Function} parserFn - The parser function, must return a Buffer + * @param {Function} parserFn - The parser function, must return a Buffer, number or boolean * @param {Mixed} parserFn.value - The setting value * @param {Mixed} parserFn.zwaveObj - The setting's `zwave` object as defined in `/app.json` */ @@ -659,6 +757,36 @@ class ZwaveDevice extends MeshDevice { this._settings[settingId] = parserFn; } + /** + * Register a multi channel report listener, which is called when a report has been received. + * @param {number} multiChannelNodeId - The multi channel node id + * @param {string} commandClassId - The ID of the Command Class (e.g. `BASIC`) + * @param {string} commandId - The ID of the Command (e.g. `BASIC_REPORT`) + * @param {Function} triggerFn + * @param {Object} triggerFn.report - The received report + */ + registerMultiChannelReportListener(multiChannelNodeId, commandClassId, commandId, triggerFn) { + // Check for valid multi channel nodes + if (!this.node.MultiChannelNodes || + !this.node.MultiChannelNodes[multiChannelNodeId] || + (Array.isArray(this.node.MultiChannelNodes) && this.node.MultiChannelNodes.length === 0)) { + return this.error('Invalid multi channel node', multiChannelNodeId); + } + + const commandClass = this.node.MultiChannelNodes[multiChannelNodeId].CommandClass[`COMMAND_CLASS_${commandClassId}`]; + if (typeof commandClass === 'undefined') return this.error('Invalid commandClass:', commandClassId); + + this._reportListeners[commandClassId] = this._reportListeners[commandClassId] || {}; + this._reportListeners[commandClassId][`${multiChannelNodeId}_${commandId}`] = triggerFn; + + commandClass.on('report', (command, payload) => { + if (command.name !== commandId) return; + if (typeof this._reportListeners[commandClassId][`${multiChannelNodeId}_${command.name}`] === 'function') { + this._reportListeners[commandClassId][`${multiChannelNodeId}_${command.name}`](payload); + } + }); + } + /** * Register a report listener, which is called when a report has been received. * @param {string} commandClassId - The ID of the Command Class (e.g. `BASIC`) @@ -669,12 +797,49 @@ class ZwaveDevice extends MeshDevice { registerReportListener(commandClassId, commandId, triggerFn) { const commandClass = this.node.CommandClass[`COMMAND_CLASS_${commandClassId}`]; if (typeof commandClass === 'undefined') return this.error('Invalid commandClass:', commandClassId); + let previousSequence; this._reportListeners[commandClassId] = this._reportListeners[commandClassId] || {}; this._reportListeners[commandClassId][commandId] = triggerFn; commandClass.on('report', (command, payload) => { if (command.name !== commandId) return; + + // Catch central scene echos and (sometimes) failing parser + if (command.name === 'CENTRAL_SCENE_NOTIFICATION') { + + if (typeof previousSequence !== 'undefined' && payload.hasOwnProperty('Sequence Number') && payload['Sequence Number'] === previousSequence) return; + previousSequence = payload['Sequence Number']; + + if (payload.hasOwnProperty('Properties1') && + payload.Properties1.hasOwnProperty('Key Attributes') && + typeof payload.Properties1['Key Attributes'] === 'number') { + switch (payload.Properties1['Key Attributes']) { + case 0: + payload.Properties1['Key Attributes'] = 'Key Pressed 1 time'; + break; + case 1: + payload.Properties1['Key Attributes'] = 'Key Released'; + break; + case 2: + payload.Properties1['Key Attributes'] = 'Key Held Down'; + break; + case 3: + payload.Properties1['Key Attributes'] = 'Key Pressed 2 times'; + break; + case 4: + payload.Properties1['Key Attributes'] = 'Key Pressed 3 times'; + break; + case 5: + payload.Properties1['Key Attributes'] = 'Key Pressed 4 times'; + break; + case 6: + payload.Properties1['Key Attributes'] = 'Key Pressed 5 times'; + break; + } + } + } + if (this._reportListeners[commandClassId] && this._reportListeners[commandClassId][command.name]) { this._reportListeners[commandClassId][command.name](payload); @@ -705,6 +870,7 @@ class ZwaveDevice extends MeshDevice { // log the entire Node this.log('Node:', this.getData().token); this.log('- Battery:', this.node.battery); + this.log('- DeviceClassGeneric:', this.node.deviceClassGeneric); Object.keys(this.node.CommandClass).forEach(commandClassId => { this.log('- CommandClass:', commandClassId); @@ -721,6 +887,7 @@ class ZwaveDevice extends MeshDevice { if (this.node.MultiChannelNodes) { Object.keys(this.node.MultiChannelNodes).forEach(multiChannelNodeId => { this.log('- MultiChannelNode:', multiChannelNodeId); + this.log('- DeviceClassGeneric:', this.node.MultiChannelNodes[multiChannelNodeId].deviceClassGeneric); Object.keys(this.node.MultiChannelNodes[multiChannelNodeId].CommandClass).forEach(commandClassId => { this.log('-- CommandClass:', commandClassId); diff --git a/node_modules/homey-meshdriver/lib/zwave/ZwaveMeteringDevice.js b/node_modules/homey-meshdriver/lib/zwave/ZwaveMeteringDevice.js index d45cbc5..5a3eee5 100644 --- a/node_modules/homey-meshdriver/lib/zwave/ZwaveMeteringDevice.js +++ b/node_modules/homey-meshdriver/lib/zwave/ZwaveMeteringDevice.js @@ -1,10 +1,9 @@ 'use strict'; -const Homey = require('homey'); const ZwaveDevice = require('./ZwaveDevice'); /** - * The ZwaveMeteringDevice class has built-in functionality for the METER_RESET FlowCardAction. + * The ZwaveMeteringDevice class. Warning, the METER_RESET FlowCardAction should not be used, remove the FlowCard from your app manifest * @extends ZwaveDevice * @example * @@ -20,51 +19,10 @@ const ZwaveDevice = require('./ZwaveDevice'); * } * } * - * // app.json (or see zwave/system/flows.json) - * flow: { - * actions: [ - * { - * "id": "resetMeter", - * "title": { - * "en": "Reset meter values", - * "nl": "Meter waarden opnieuw instellen" - * }, - * "hint": { - * "en": "Reset the accumulated power usage value (kWh), note that this can not be reversed.", - * "nl": "Stel geaccumuleerde stroomverbruik waarde (kWh) opnieuw in, dit kan niet worden teruggedraaid." - * }, - * "args": [ - * { - * "name": "device", - * "type": "device", - * "filter": "" - * } - * ] - * } - * ] - * } */ class ZwaveMeteringDevice extends ZwaveDevice { async onMeshInit() { - - // If node has CC METER and METER_RESET functionality - const commandClassMeter = this.getCommandClass('METER'); - if (!(commandClassMeter instanceof Error) && commandClassMeter.METER_RESET === 'function') { - - // Register FlowCardAction - const resetMeterFlowAction = new Homey.FlowCardAction('resetMeter'); - resetMeterFlowAction.register(); - - // Check if flow card is registered in app manifest - if (!(resetMeterFlowAction instanceof Error)) { - resetMeterFlowAction.registerRunListener(() => { - commandClassMeter.METER_RESET({}, (err, result) => { - if (err || result !== 'TRANSMIT_COMPLETE_OK') return Promise.reject(err || result); - return Promise.resolve(); - }); - }); - } else this.error('missing_resetMeter_flow_card_in_manifest'); - } + this.log('WARNING: the METER_RESET FlowCardAction should not be used, remove the FlowCard from your app manifest.'); } } diff --git a/node_modules/homey-meshdriver/lib/zwave/system/capabilities/alarm_battery/BATTERY.js b/node_modules/homey-meshdriver/lib/zwave/system/capabilities/alarm_battery/BATTERY.js deleted file mode 100644 index 87414e4..0000000 --- a/node_modules/homey-meshdriver/lib/zwave/system/capabilities/alarm_battery/BATTERY.js +++ /dev/null @@ -1,10 +0,0 @@ -'use strict'; - -module.exports = { - report: 'BATTERY_REPORT', - reportParser: report => { - if (report && report.hasOwnProperty('Battery Level')) { - return report['Battery Level'] === 'battery low warning'; - } - }, -}; diff --git a/node_modules/homey-meshdriver/lib/zwave/system/capabilities/alarm_siren/NOTIFICATION.js b/node_modules/homey-meshdriver/lib/zwave/system/capabilities/alarm_siren/NOTIFICATION.js deleted file mode 100644 index 3a75bbf..0000000 --- a/node_modules/homey-meshdriver/lib/zwave/system/capabilities/alarm_siren/NOTIFICATION.js +++ /dev/null @@ -1,24 +0,0 @@ -'use strict'; - -module.exports = { - get: 'NOTIFICATION_GET', - getParser: () => ({ - 'V1 Alarm Type': 0, - 'Notification Type': 'Siren', - Event: 8, - }), - report: 'NOTIFICATION_REPORT', - reportParser: report => { - if (report && report['Notification Type'] === 'Siren' && report.hasOwnProperty('Event (Parsed)')) { - - if (report['Event:'] === '1' ) { - return true; - } - - if (report['Event:'] === '0' ) { - return false; - } - } - return null; - }, -}; diff --git a/node_modules/homey-meshdriver/lib/zwave/system/capabilities/alarm_tamper/NOTIFICATION.js b/node_modules/homey-meshdriver/lib/zwave/system/capabilities/alarm_tamper/NOTIFICATION.js index a1951fb..9c5fb3b 100644 --- a/node_modules/homey-meshdriver/lib/zwave/system/capabilities/alarm_tamper/NOTIFICATION.js +++ b/node_modules/homey-meshdriver/lib/zwave/system/capabilities/alarm_tamper/NOTIFICATION.js @@ -1,31 +1,33 @@ 'use strict'; module.exports = { - get: 'NOTIFICATION_GET', - getOpts: { - getOnOnline: true, - }, - getParser: () => ({ - 'V1 Alarm Type': 0, - Event: 3, - 'Notification Type': 'Home Security', - }), - report: 'NOTIFICATION_REPORT', - reportParser: report => { - if (report && report['Notification Type'] === 'Home Security' && report.hasOwnProperty('Event (Parsed)')) { + get: 'NOTIFICATION_GET', + getOpts: { + getOnOnline: true, + }, + getParser: () => ({ + 'V1 Alarm Type': 0, + Event: 3, + 'Notification Type': 'Home Security', + }), + report: 'NOTIFICATION_REPORT', + reportParser: report => { + if ((report && report['Notification Type'] === 'Home Security' || + report['Notification Type'] === 'Burglar') && + report.hasOwnProperty('Event (Parsed)')) { - if (report['Event (Parsed)'] === 'Tampering, Product covering removed' || - report['Event (Parsed)'] === 'Tampering, Invalid Code' || - report['Event (Parsed)'] === 'Tampering, Product Moved') { - return true; - } - if (report['Event (Parsed)'] === 'Event inactive' && (!report.hasOwnProperty('Event Parameter') || - report['Event Parameter'][0] === 3 || - report['Event Parameter'][0] === 4 || - report['Event Parameter'][0] === 9)) { - return false; - } - } - return null; - }, + if (report['Event (Parsed)'] === 'Tampering, Product covering removed' || + report['Event (Parsed)'] === 'Tampering, Invalid Code' || + report['Event (Parsed)'] === 'Tampering, Product Moved') { + return true; + } + if (report['Event (Parsed)'] === 'Event inactive' && (!report.hasOwnProperty('Event Parameter') || + report['Event Parameter'][0] === 3 || + report['Event Parameter'][0] === 4 || + report['Event Parameter'][0] === 9)) { + return false; + } + } + return null; + }, }; diff --git a/node_modules/homey-meshdriver/lib/zwave/system/capabilities/dim/BASIC.js b/node_modules/homey-meshdriver/lib/zwave/system/capabilities/dim/BASIC.js new file mode 100644 index 0000000..1837805 --- /dev/null +++ b/node_modules/homey-meshdriver/lib/zwave/system/capabilities/dim/BASIC.js @@ -0,0 +1,21 @@ +'use strict'; + +module.exports = { + get: 'BASIC_GET', + set: 'BASIC_SET', + setParser(value) { + if (this.hasCapability('onoff')) this.setCapabilityValue('onoff', value > 0); + return { + Value: Math.round(value * 99), + }; + }, + report: 'BASIC_REPORT', + reportParser(report) { + if (report && report.hasOwnProperty('Value')) { + if (this.hasCapability('onoff')) this.setCapabilityValue('onoff', report.Value > 0); + if (report.Value > 99) return 1; + return report.Value / 99; + } + return null; + } +}; diff --git a/node_modules/homey-meshdriver/lib/zwave/system/capabilities/dim/SWITCH_MULTILEVEL.js b/node_modules/homey-meshdriver/lib/zwave/system/capabilities/dim/SWITCH_MULTILEVEL.js index c194a57..407ee69 100644 --- a/node_modules/homey-meshdriver/lib/zwave/system/capabilities/dim/SWITCH_MULTILEVEL.js +++ b/node_modules/homey-meshdriver/lib/zwave/system/capabilities/dim/SWITCH_MULTILEVEL.js @@ -2,7 +2,8 @@ const util = require('./../../../../util'); -const FACTORY_DEFAULT_DIMMING_DURATION = 'Factory default'; +const FACTORY_DEFAULT_DIMMING_DURATION_V2 = 'Factory default'; +const FACTORY_DEFAULT_DIMMING_DURATION_V4 = 'Default'; module.exports = { get: 'SWITCH_MULTILEVEL_GET', @@ -17,7 +18,15 @@ module.exports = { }; }, setParserV2(value, options) { - const duration = (options.hasOwnProperty('duration') ? util.calculateZwaveDimDuration(options.duration) : FACTORY_DEFAULT_DIMMING_DURATION); + const duration = (options.hasOwnProperty('duration') ? util.calculateZwaveDimDuration(options.duration) : FACTORY_DEFAULT_DIMMING_DURATION_V2); + if (this.hasCapability('onoff')) this.setCapabilityValue('onoff', value > 0); + return { + Value: Math.round(value * 99), + 'Dimming Duration': duration, + }; + }, + setParserV4(value, options) { + const duration = (options.hasOwnProperty('duration') ? util.calculateZwaveDimDuration(options.duration) : FACTORY_DEFAULT_DIMMING_DURATION_V4); if (this.hasCapability('onoff')) this.setCapabilityValue('onoff', value > 0); return { Value: Math.round(value * 99), diff --git a/node_modules/homey-meshdriver/lib/zwave/system/capabilities/dim/windowcoverings/SWITCH_MULTILEVEL.js b/node_modules/homey-meshdriver/lib/zwave/system/capabilities/dim/windowcoverings/SWITCH_MULTILEVEL.js index 7d480f4..2c5c23d 100644 --- a/node_modules/homey-meshdriver/lib/zwave/system/capabilities/dim/windowcoverings/SWITCH_MULTILEVEL.js +++ b/node_modules/homey-meshdriver/lib/zwave/system/capabilities/dim/windowcoverings/SWITCH_MULTILEVEL.js @@ -1,14 +1,19 @@ 'use strict'; -const util = require('./../../../../util'); +const util = require('./../../../../../util'); -const FACTORY_DEFAULT_DIMMING_DURATION = 'Factory Default'; +const INVERT_WINDOW_COVERINGS_DIRECTION = 'invertWindowCoveringsDirection'; +const FACTORY_DEFAULT_DIMMING_DURATION_V2 = 'Factory default'; +const FACTORY_DEFAULT_DIMMING_DURATION_V4 = 'Default'; module.exports = { get: 'SWITCH_MULTILEVEL_GET', set: 'SWITCH_MULTILEVEL_SET', + getOpts: { + getOnStart: true, + }, setParserV1(value) { - const invertDirection = !!this.getSetting('invertWindowCoveringsDirection'); + const invertDirection = !!this.getSetting(INVERT_WINDOW_COVERINGS_DIRECTION); if (value >= 1) { if (invertDirection) value = 0; @@ -19,9 +24,9 @@ module.exports = { }; }, setParserV2(value, options) { - const duration = (options.hasOwnProperty('duration') ? util.calculateZwaveDimDuration(options.duration) : FACTORY_DEFAULT_DIMMING_DURATION); + const duration = (options.hasOwnProperty('duration') ? util.calculateZwaveDimDuration(options.duration) : FACTORY_DEFAULT_DIMMING_DURATION_V2); - const invertDirection = !!this.getSetting('invertWindowCoveringsDirection'); + const invertDirection = !!this.getSetting(INVERT_WINDOW_COVERINGS_DIRECTION); if (value >= 1) { if (invertDirection) value = 0; @@ -33,9 +38,17 @@ module.exports = { 'Dimming Duration': duration, }; }, + setParserV4(value, options) { + const duration = (options.hasOwnProperty('duration') ? util.calculateZwaveDimDuration(options.duration) : FACTORY_DEFAULT_DIMMING_DURATION_V4); + if (this.hasCapability('onoff')) this.setCapabilityValue('onoff', value > 0); + return { + Value: Math.round(value * 99), + 'Dimming Duration': duration, + }; + }, report: 'SWITCH_MULTILEVEL_REPORT', reportParserV1(report) { - const invertDirection = !!this.getSetting('invertWindowCoveringsDirection'); + const invertDirection = !!this.getSetting(INVERT_WINDOW_COVERINGS_DIRECTION); if (report && report.hasOwnProperty('Value (Raw)')) { if (report['Value (Raw)'][0] === 255) return invertDirection ? 0 : 1; @@ -44,7 +57,7 @@ module.exports = { return null; }, reportParserV4(report) { - const invertDirection = !!this.getSetting('invertWindowCoveringsDirection'); + const invertDirection = !!this.getSetting(INVERT_WINDOW_COVERINGS_DIRECTION); if (report && report.hasOwnProperty('Current Value (Raw)')) { if (report['Current Value (Raw)'][0] === 255) return invertDirection ? 0 : 1; diff --git a/node_modules/homey-meshdriver/lib/zwave/system/capabilities/measure_current/METER.js b/node_modules/homey-meshdriver/lib/zwave/system/capabilities/measure_current/METER.js index 0bfe5f0..9a62d03 100644 --- a/node_modules/homey-meshdriver/lib/zwave/system/capabilities/measure_current/METER.js +++ b/node_modules/homey-meshdriver/lib/zwave/system/capabilities/measure_current/METER.js @@ -1,7 +1,37 @@ 'use strict'; +/** + const exampleReport = { + 'Properties1 (Raw)': '', + Properties1: + { + 'Scale bit 2': true, + 'Meter Type': 'Electric meter', + 'Rate Type': 'Import', + 'Meter Type (Parsed)': { value: 'Electric meter' }, + 'Rate Type (Parsed)': { value: 'Import' }, + }, + 'Properties2 (Raw)': '', + Properties2: { + Size: 4, + 'Scale bits 10': 1, + Precision: 1, + }, + 'Meter Value': '', + 'Delta Time (Raw)': '', + 'Delta Time': 0, + 'Previous Meter Value': '', + 'Scale 2 (Raw)': '', + 'Scale 2': 0, + 'Meter Value (Parsed)': 15.9, + }; + */ + module.exports = { get: 'METER_GET', + getOpts: { + getOnStart: true, + }, getParserV3: () => ({ Properties1: { Scale: 5, @@ -16,7 +46,7 @@ module.exports = { }), report: 'METER_REPORT', reportParserV3: report => { - if(report && + if (report && report.hasOwnProperty('Properties1') && report.Properties1.hasOwnProperty('Meter Type') && (report.Properties1['Meter Type'] === 'Electric meter' || report.Properties1['Meter Type'] === 1) && @@ -29,4 +59,20 @@ module.exports = { } return null; }, + reportParserV4: report => { + if (report && + report.hasOwnProperty('Properties1') && + report.Properties1.hasOwnProperty('Meter Type') && + (report.Properties1['Meter Type'] === 'Electric meter' || report.Properties1['Meter Type'] === 1) && + report.Properties1.hasOwnProperty('Scale bit 2') && + report.Properties1['Scale bit 2'] === true && + report.hasOwnProperty('Properties2') && + report.Properties2.hasOwnProperty('Scale bits 10') && + report.Properties2['Scale bits 10'] === 1 && + report.hasOwnProperty('Scale 2') && + report['Scale 2'] === 0) { + return report['Meter Value (Parsed)']; + } + return null; + }, }; diff --git a/node_modules/homey-meshdriver/lib/zwave/system/capabilities/measure_moisture/SENSOR_MULTILEVEL.js b/node_modules/homey-meshdriver/lib/zwave/system/capabilities/measure_moisture/SENSOR_MULTILEVEL.js deleted file mode 100644 index 9d68647..0000000 --- a/node_modules/homey-meshdriver/lib/zwave/system/capabilities/measure_moisture/SENSOR_MULTILEVEL.js +++ /dev/null @@ -1,18 +0,0 @@ -'use strict'; - -module.exports = { - get: 'SENSOR_MULTILEVEL_GET', - getParser: () => ({ - 'Sensor Type': 'Moisture (v5)', - Properties1: { - Scale: 0, - }, - }), - report: 'SENSOR_MULTILEVEL_REPORT', - reportParser: report => { - if (report && report.hasOwnProperty('Sensor Type') && report.hasOwnProperty('Sensor Value (Parsed)')) { - if (report['Sensor Type'] === 'Moisture (v5)') return report['Sensor Value (Parsed)']; - } - return null; - }, -}; diff --git a/node_modules/homey-meshdriver/lib/zwave/system/capabilities/measure_power/METER.js b/node_modules/homey-meshdriver/lib/zwave/system/capabilities/measure_power/METER.js index 3064fb6..6d8431a 100644 --- a/node_modules/homey-meshdriver/lib/zwave/system/capabilities/measure_power/METER.js +++ b/node_modules/homey-meshdriver/lib/zwave/system/capabilities/measure_power/METER.js @@ -1,11 +1,38 @@ 'use strict'; +/** + const exampleReport = { + 'Properties1 (Raw)': '', + Properties1: + { + 'Scale bit 2': false, + 'Meter Type': 'Electric meter', + 'Rate Type': 'Import', + 'Meter Type (Parsed)': { value: 'Electric meter' }, + 'Rate Type (Parsed)': { value: 'Import' }, + }, + 'Properties2 (Raw)': '', + Properties2: { + Size: 4, + 'Scale bits 10': 2, + Precision: 1, + }, + 'Meter Value': '', + 'Delta Time (Raw)': '', + 'Delta Time': 0, + 'Previous Meter Value': '', + 'Scale 2 (Raw)': '', + 'Scale 2': 0, + 'Meter Value (Parsed)': 36.2, + }; + */ + module.exports = { get: 'METER_GET', getOpts: { getOnStart: true, }, - getParserV2: () => ({ + getParserV3: () => ({ Properties1: { Scale: 2, }, @@ -55,4 +82,20 @@ module.exports = { } return null; }, + reportParserV4: report => { + if (report && + report.hasOwnProperty('Properties1') && + report.Properties1.hasOwnProperty('Meter Type') && + (report.Properties1['Meter Type'] === 'Electric meter' || report.Properties1['Meter Type'] === 1) && + report.Properties1.hasOwnProperty('Scale bit 2') && + report.Properties1['Scale bit 2'] === false && + report.hasOwnProperty('Properties2') && + report.Properties2.hasOwnProperty('Scale bits 10') && + report.Properties2['Scale bits 10'] === 2 && + report.hasOwnProperty('Scale 2') && + report['Scale 2'] === 0) { + return report['Meter Value (Parsed)']; + } + return null; + }, }; diff --git a/node_modules/homey-meshdriver/lib/zwave/system/capabilities/measure_rain/SENSOR_MULTILEVEL.js b/node_modules/homey-meshdriver/lib/zwave/system/capabilities/measure_rain/SENSOR_MULTILEVEL.js deleted file mode 100644 index f6ebacb..0000000 --- a/node_modules/homey-meshdriver/lib/zwave/system/capabilities/measure_rain/SENSOR_MULTILEVEL.js +++ /dev/null @@ -1,11 +0,0 @@ -'use strict'; - -module.exports = { - report: 'SENSOR_MULTILEVEL_REPORT', - reportParser: report => { - if (report.hasOwnProperty('Sensor Type') && report.hasOwnProperty('Sensor Value (Parsed)')) { - if (report['Sensor Type'] === 'Rain rate (version 2)') return report['Sensor Value (Parsed)']; - } - return null; - }, -}; diff --git a/node_modules/homey-meshdriver/lib/zwave/system/capabilities/measure_voltage/METER.js b/node_modules/homey-meshdriver/lib/zwave/system/capabilities/measure_voltage/METER.js index 4b54718..1efed80 100644 --- a/node_modules/homey-meshdriver/lib/zwave/system/capabilities/measure_voltage/METER.js +++ b/node_modules/homey-meshdriver/lib/zwave/system/capabilities/measure_voltage/METER.js @@ -1,7 +1,36 @@ 'use strict'; +/** + const exampleReport = { + 'Properties1 (Raw)': '', + Properties1: { + 'Scale bit 2': true, + 'Meter Type': 'Electric meter', + 'Rate Type': 'Import', + 'Meter Type (Parsed)': { value: 'Electric meter' }, + 'Rate Type (Parsed)': { value: 'Import' }, + }, + 'Properties2 (Raw)': '', + Properties2: { + Size: 4, + 'Scale bits 10': 0, + Precision: 1, + }, + 'Meter Value': '', + 'Delta Time (Raw)': '', + 'Delta Time': 0, + 'Previous Meter Value': '', + 'Scale 2 (Raw)': '', + 'Scale 2': 0, + 'Meter Value (Parsed)': 232, + }; + */ + module.exports = { get: 'METER_GET', + getOpts: { + getOnStart: true, + }, getParserV3: () => ({ Properties1: { Scale: 4, @@ -16,7 +45,7 @@ module.exports = { }), report: 'METER_REPORT', reportParserV3: report => { - if(report && + if (report && report.hasOwnProperty('Properties1') && report.Properties1.hasOwnProperty('Meter Type') && (report.Properties1['Meter Type'] === 'Electric meter' || report.Properties1['Meter Type'] === 1) && @@ -29,4 +58,20 @@ module.exports = { } return null; }, + reportParserV4: report => { + if (report && + report.hasOwnProperty('Properties1') && + report.Properties1.hasOwnProperty('Meter Type') && + (report.Properties1['Meter Type'] === 'Electric meter' || report.Properties1['Meter Type'] === 1) && + report.Properties1.hasOwnProperty('Scale bit 2') && + report.Properties1['Scale bit 2'] === true && + report.hasOwnProperty('Properties2') && + report.Properties2.hasOwnProperty('Scale bits 10') && + report.Properties2['Scale bits 10'] === 0 && + report.hasOwnProperty('Scale 2') && + report['Scale 2'] === 0) { + return report['Meter Value (Parsed)']; + } + return null; + }, }; diff --git a/node_modules/homey-meshdriver/lib/zwave/system/capabilities/meter_power.export/METER.js b/node_modules/homey-meshdriver/lib/zwave/system/capabilities/meter_power.export/METER.js new file mode 100644 index 0000000..01be31b --- /dev/null +++ b/node_modules/homey-meshdriver/lib/zwave/system/capabilities/meter_power.export/METER.js @@ -0,0 +1,62 @@ +'use strict'; + +module.exports = { + get: 'METER_GET', + getOpts: { + getOnStart: true, + }, + getParserV2: () => ({ + Properties1: { + Scale: 0, + }, + }), + getParserV4: () => ({ + Properties1: { + 'Rate Type': 'Export', + Scale: 0, + }, + 'Scale 2': 0, + }), + report: 'METER_REPORT', + reportParserV1: report => { + if (report && + report.hasOwnProperty('Meter Type') && + (report['Meter Type'] === 'Electric meter' || report['Meter Type'] === 1) && + report.hasOwnProperty('Properties1') && + report.Properties1.hasOwnProperty('Scale') && + report.Properties1.Scale === 0) { + return report['Meter Value (Parsed)']; + } + return null; + }, + reportParserV2: report => { + if (report && + report.hasOwnProperty('Properties1') && + report.Properties1.hasOwnProperty('Meter Type') && + (report.Properties1['Meter Type'] === 'Electric meter' || report.Properties1['Meter Type'] === 1) && + report.Properties1.hasOwnProperty('Rate Type') && + report.Properties1['Rate Type'] === 'Export' && + report.hasOwnProperty('Properties2') && + report.Properties2.hasOwnProperty('Scale') && + report.Properties2.Scale === 0) { + return report['Meter Value (Parsed)']; + } + return null; + }, + reportParserV3: report => { + if (report && + report.hasOwnProperty('Properties1') && + report.Properties1.hasOwnProperty('Meter Type') && + (report.Properties1['Meter Type'] === 'Electric meter' || report.Properties1['Meter Type'] === 1) && + report.Properties1.hasOwnProperty('Scale bit 2') && + report.Properties1['Scale bit 2'] === false && + report.Properties1.hasOwnProperty('Rate Type') && + report.Properties1['Rate Type'] === 'Export' && + report.hasOwnProperty('Properties2') && + report.Properties2.hasOwnProperty('Scale bits 10') && + report.Properties2['Scale bits 10'] === 0) { + return report['Meter Value (Parsed)']; + } + return null; + }, +}; diff --git a/node_modules/homey-meshdriver/lib/zwave/system/capabilities/meter_power.import/METER.js b/node_modules/homey-meshdriver/lib/zwave/system/capabilities/meter_power.import/METER.js new file mode 100644 index 0000000..f2959e0 --- /dev/null +++ b/node_modules/homey-meshdriver/lib/zwave/system/capabilities/meter_power.import/METER.js @@ -0,0 +1,62 @@ +'use strict'; + +module.exports = { + get: 'METER_GET', + getOpts: { + getOnStart: true, + }, + getParserV2: () => ({ + Properties1: { + Scale: 0, + }, + }), + getParserV4: () => ({ + Properties1: { + 'Rate Type': 'Import', + Scale: 0, + }, + 'Scale 2': 0, + }), + report: 'METER_REPORT', + reportParserV1: report => { + if (report && + report.hasOwnProperty('Meter Type') && + (report['Meter Type'] === 'Electric meter' || report['Meter Type'] === 1) && + report.hasOwnProperty('Properties1') && + report.Properties1.hasOwnProperty('Scale') && + report.Properties1.Scale === 0) { + return report['Meter Value (Parsed)']; + } + return null; + }, + reportParserV2: report => { + if (report && + report.hasOwnProperty('Properties1') && + report.Properties1.hasOwnProperty('Meter Type') && + (report.Properties1['Meter Type'] === 'Electric meter' || report.Properties1['Meter Type'] === 1) && + report.Properties1.hasOwnProperty('Rate Type') && + report.Properties1['Rate Type'] === 'Import' && + report.hasOwnProperty('Properties2') && + report.Properties2.hasOwnProperty('Scale') && + report.Properties2.Scale === 0) { + return report['Meter Value (Parsed)']; + } + return null; + }, + reportParserV3: report => { + if (report && + report.hasOwnProperty('Properties1') && + report.Properties1.hasOwnProperty('Meter Type') && + (report.Properties1['Meter Type'] === 'Electric meter' || report.Properties1['Meter Type'] === 1) && + report.Properties1.hasOwnProperty('Scale bit 2') && + report.Properties1['Scale bit 2'] === false && + report.Properties1.hasOwnProperty('Rate Type') && + report.Properties1['Rate Type'] === 'Import' && + report.hasOwnProperty('Properties2') && + report.Properties2.hasOwnProperty('Scale bits 10') && + report.Properties2['Scale bits 10'] === 0) { + return report['Meter Value (Parsed)']; + } + return null; + }, +}; diff --git a/node_modules/homey-meshdriver/lib/zwave/system/capabilities/meter_power/METER.js b/node_modules/homey-meshdriver/lib/zwave/system/capabilities/meter_power/METER.js index b194e1a..6c4c421 100644 --- a/node_modules/homey-meshdriver/lib/zwave/system/capabilities/meter_power/METER.js +++ b/node_modules/homey-meshdriver/lib/zwave/system/capabilities/meter_power/METER.js @@ -1,11 +1,37 @@ 'use strict'; +/** + const exampleReport = { + 'Properties1 (Raw)': '', + Properties1: { + 'Scale bit 2': false, + 'Meter Type': 'Electric meter', + 'Rate Type': 'Import', + 'Meter Type (Parsed)': { value: 'Electric meter' }, + 'Rate Type (Parsed)': { value: 'Import' }, + }, + 'Properties2 (Raw)': '', + Properties2: { + Size: 4, + 'Scale bits 10': 0, + Precision: 1, + }, + 'Meter Value': '', + 'Delta Time (Raw)': '', + 'Delta Time': 0, + 'Previous Meter Value': '', + 'Scale 2 (Raw)': '', + 'Scale 2': 0, + 'Meter Value (Parsed)': 0.1, + }; + */ + module.exports = { get: 'METER_GET', getOpts: { getOnStart: true, }, - getParserV2: () => ({ + getParserV3: () => ({ Properties1: { Scale: 0, }, @@ -55,4 +81,20 @@ module.exports = { } return null; }, + reportParserV4: report => { + if (report && + report.hasOwnProperty('Properties1') && + report.Properties1.hasOwnProperty('Meter Type') && + (report.Properties1['Meter Type'] === 'Electric meter' || report.Properties1['Meter Type'] === 1) && + report.Properties1.hasOwnProperty('Scale bit 2') && + report.Properties1['Scale bit 2'] === false && + report.hasOwnProperty('Properties2') && + report.Properties2.hasOwnProperty('Scale bits 10') && + report.Properties2['Scale bits 10'] === 0 && + report.hasOwnProperty('Scale 2') && + report['Scale 2'] === 0) { + return report['Meter Value (Parsed)']; + } + return null; + }, }; diff --git a/node_modules/homey-meshdriver/lib/zwave/system/capabilities/meter_rain/METER.js b/node_modules/homey-meshdriver/lib/zwave/system/capabilities/meter_rain/METER.js deleted file mode 100644 index ad940ee..0000000 --- a/node_modules/homey-meshdriver/lib/zwave/system/capabilities/meter_rain/METER.js +++ /dev/null @@ -1,27 +0,0 @@ -'use strict'; -//reports total m3 per m2 measured -module.exports = { - get: 'METER_GET', - getParser: () => ({ - return { - 'Sensor Type': 'Water meter', - 'Properties1': { - 'Scale' : 0, - 'Rate Type': 'Import' - }, - 'Scale 2': 0 - }; - }), - report: 'METER_REPORT', - reportParser: report => { - if (report.hasOwnProperty('Properties1') - && report.Properties1.hasOwnProperty('Meter Type') - && report.Properties1['Meter Type'] === "Water meter" - && report.hasOwnProperty('Properties2') - && report.Properties2.hasOwnProperty('Scale bits 10') - && report.Properties2['Scale bits 10'] === 0) { - return report['Meter Value (Parsed)']; - } - return null; - }, -}; diff --git a/node_modules/homey-meshdriver/lib/zwave/system/capabilities/onoff/BASIC.js b/node_modules/homey-meshdriver/lib/zwave/system/capabilities/onoff/BASIC.js index 1922b36..7778e5c 100644 --- a/node_modules/homey-meshdriver/lib/zwave/system/capabilities/onoff/BASIC.js +++ b/node_modules/homey-meshdriver/lib/zwave/system/capabilities/onoff/BASIC.js @@ -8,7 +8,7 @@ module.exports = { }), report: 'BASIC_REPORT', reportParser(report) { - if (report && report.hasOwnProperty('Value')) return report.Value === 255; + if (report && report.hasOwnProperty('Value')) return report.Value > 0; return null; }, }; diff --git a/node_modules/homey-meshdriver/lib/zwave/system/capabilities/onoff/SWITCH_BINARY.js b/node_modules/homey-meshdriver/lib/zwave/system/capabilities/onoff/SWITCH_BINARY.js index ac31394..e4d6a51 100644 --- a/node_modules/homey-meshdriver/lib/zwave/system/capabilities/onoff/SWITCH_BINARY.js +++ b/node_modules/homey-meshdriver/lib/zwave/system/capabilities/onoff/SWITCH_BINARY.js @@ -7,22 +7,32 @@ const FACTORY_DEFAULT_DIMMING_DURATION = 'Default'; module.exports = { get: 'SWITCH_BINARY_GET', set: 'SWITCH_BINARY_SET', + getOpts: { + getOnStart: true, + }, setParserV1: value => ({ 'Switch Value': (value) ? 'on/enable' : 'off/disable', }), setParserV2(value, options) { const duration = (options.hasOwnProperty('duration') ? util.calculateZwaveDimDuration(options.duration) : FACTORY_DEFAULT_DIMMING_DURATION); return { - 'Switch Value': (value) ? 'on/enable' : 'off/disable', - 'Dimming Duration': duration, + 'Target Value': (value) ? 'on/enable' : 'off/disable', + 'Duration': duration, }; }, report: 'SWITCH_BINARY_REPORT', - reportParser: report => { + reportParserV1: report => { if (report && report.hasOwnProperty('Value')) { if (report.Value === 'on/enable') return true; else if (report.Value === 'off/disable') return false; } return null; }, + reportParserV2: report => { + if (report && report.hasOwnProperty('Current Value')) { + if (report['Current Value'] === 'on/enable') return true; + else if (report['Current Value'] === 'off/disable') return false; + } + return null; + }, }; diff --git a/node_modules/homey-meshdriver/lib/zwave/system/capabilities/powerFactor/METER.js b/node_modules/homey-meshdriver/lib/zwave/system/capabilities/powerFactor/METER.js new file mode 100644 index 0000000..478a7be --- /dev/null +++ b/node_modules/homey-meshdriver/lib/zwave/system/capabilities/powerFactor/METER.js @@ -0,0 +1,77 @@ +'use strict'; + +/** + const exampleReport = { + 'Properties1 (Raw)': '', + Properties1: { + 'Scale bit 2': true, + 'Meter Type': 'Electric meter', + 'Rate Type': 'Import', + 'Meter Type (Parsed)': { value: 'Electric meter' }, + 'Rate Type (Parsed)': { value: 'Import' }, + }, + 'Properties2 (Raw)': '', + Properties2: { + Size: 4, + 'Scale bits 10': 2, + Precision: 1, + }, + 'Meter Value': '', + 'Delta Time (Raw)': '', + 'Delta Time': 0, + 'Previous Meter Value': '', + 'Scale 2 (Raw)': '', + 'Scale 2': 0, + 'Meter Value (Parsed)': 1000, + }; + */ + +module.exports = { + get: 'METER_GET', + getOpts: { + getOnStart: true, + }, + getParserV3: () => ({ + Properties1: { + Scale: 6, + }, + }), + getParserV4: () => ({ + Properties1: { + 'Rate Type': 'Import', + Scale: 6, + }, + 'Scale 2': 0, + }), + report: 'METER_REPORT', + reportParserV3: report => { + if (report && + report.hasOwnProperty('Properties1') && + report.Properties1.hasOwnProperty('Meter Type') && + (report.Properties1['Meter Type'] === 'Electric meter' || report.Properties1['Meter Type'] === 1) && + report.Properties1.hasOwnProperty('Scale bit 2') && + report.Properties1['Scale bit 2'] === true && + report.hasOwnProperty('Properties2') && + report.Properties2.hasOwnProperty('Scale bits 10') && + report.Properties2['Scale bits 10'] === 2) { + return report['Meter Value (Parsed)']; + } + return null; + }, + reportParserV4: report => { + if (report && + report.hasOwnProperty('Properties1') && + report.Properties1.hasOwnProperty('Meter Type') && + (report.Properties1['Meter Type'] === 'Electric meter' || report.Properties1['Meter Type'] === 1) && + report.Properties1.hasOwnProperty('Scale bit 2') && + report.Properties1['Scale bit 2'] === true && + report.hasOwnProperty('Properties2') && + report.Properties2.hasOwnProperty('Scale bits 10') && + report.Properties2['Scale bits 10'] === 2 && + report.hasOwnProperty('Scale 2') && + report['Scale 2'] === 0) { + return report['Meter Value (Parsed)']; + } + return null; + }, +}; diff --git a/node_modules/homey-meshdriver/lib/zwave/system/capabilities/powerReactive/METER.js b/node_modules/homey-meshdriver/lib/zwave/system/capabilities/powerReactive/METER.js new file mode 100644 index 0000000..0eb8ec5 --- /dev/null +++ b/node_modules/homey-meshdriver/lib/zwave/system/capabilities/powerReactive/METER.js @@ -0,0 +1,78 @@ +'use strict'; + +/** + const exampleReport = { + 'Properties1 (Raw)': '', + Properties1: { + 'Scale bit 2': true, + 'Meter Type': 'Electric meter', + 'Rate Type': 'Import', + 'Meter Type (Parsed)': { value: 'Electric meter' }, + 'Rate Type (Parsed)': { value: 'Import' }, + }, + 'Properties2 (Raw)': '', + Properties2: { + Size: 4, + 'Scale bits 10': 3, + Precision: 1, + }, + 'Meter Value': '', + 'Delta Time (Raw)': '', + 'Delta Time': 0, + 'Previous Meter Value': '', + 'Scale 2 (Raw)': '', + 'Scale 2': 0, + 'Meter Value (Parsed)': 0.1, + 'Previous Meter Value (Parsed)': 0, + }; + */ + +module.exports = { + get: 'METER_GET', + getOpts: { + getOnStart: true, + }, + getParserV3: () => ({ + Properties1: { + Scale: 7, + }, + }), + getParserV4: () => ({ + Properties1: { + 'Rate Type': 'Import', + Scale: 7, + }, + 'Scale 2': 0, + }), + report: 'METER_REPORT', + reportParserV3: report => { + if (report && + report.hasOwnProperty('Properties1') && + report.Properties1.hasOwnProperty('Meter Type') && + (report.Properties1['Meter Type'] === 'Electric meter' || report.Properties1['Meter Type'] === 1) && + report.Properties1.hasOwnProperty('Scale bit 2') && + report.Properties1['Scale bit 2'] === true && + report.hasOwnProperty('Properties2') && + report.Properties2.hasOwnProperty('Scale bits 10') && + report.Properties2['Scale bits 10'] === 3) { + return report['Meter Value (Parsed)']; + } + return null; + }, + reportParserV4: report => { + if (report && + report.hasOwnProperty('Properties1') && + report.Properties1.hasOwnProperty('Meter Type') && + (report.Properties1['Meter Type'] === 'Electric meter' || report.Properties1['Meter Type'] === 1) && + report.Properties1.hasOwnProperty('Scale bit 2') && + report.Properties1['Scale bit 2'] === true && + report.hasOwnProperty('Properties2') && + report.Properties2.hasOwnProperty('Scale bits 10') && + report.Properties2['Scale bits 10'] === 3 && + report.hasOwnProperty('Scale 2') && + report['Scale 2'] === 0) { + return report['Meter Value (Parsed)']; + } + return null; + }, +}; diff --git a/node_modules/homey-meshdriver/lib/zwave/system/capabilities/powerTotalApparent/METER.js b/node_modules/homey-meshdriver/lib/zwave/system/capabilities/powerTotalApparent/METER.js new file mode 100644 index 0000000..6f1a21e --- /dev/null +++ b/node_modules/homey-meshdriver/lib/zwave/system/capabilities/powerTotalApparent/METER.js @@ -0,0 +1,77 @@ +'use strict'; + +/** + const exampleReport = { + 'Properties1 (Raw)': '', + Properties1: + { + 'Scale bit 2': false, + 'Meter Type': 'Electric meter', + 'Rate Type': 'Import', + 'Meter Type (Parsed)': { value: 'Electric meter' }, + 'Rate Type (Parsed)': { value: 'Import' }, + }, + 'Properties2 (Raw)': '', + Properties2: { + Size: 4, + 'Scale bits 10': 1, + Precision: 1, + }, + 'Meter Value': '', + 'Delta Time (Raw)': '', + 'Delta Time': 0, + 'Previous Meter Value': '', + 'Scale 2 (Raw)': '', + 'Scale 2': 0, + 'Meter Value (Parsed)': 0.1, + }; + */ +module.exports = { + get: 'METER_GET', + getOpts: { + getOnStart: true, + }, + getParserV3: () => ({ + Properties1: { + Scale: 1, + }, + }), + getParserV4: () => ({ + Properties1: { + 'Rate Type': 'Import', + Scale: 1, + }, + 'Scale 2': 0, + }), + report: 'METER_REPORT', + reportParserV3: report => { + if (report && + report.hasOwnProperty('Properties1') && + report.Properties1.hasOwnProperty('Meter Type') && + (report.Properties1['Meter Type'] === 'Electric meter' || report.Properties1['Meter Type'] === 1) && + report.Properties1.hasOwnProperty('Scale bit 2') && + report.Properties1['Scale bit 2'] === false && + report.hasOwnProperty('Properties2') && + report.Properties2.hasOwnProperty('Scale bits 10') && + report.Properties2['Scale bits 10'] === 1) { + return report['Meter Value (Parsed)']; + } + return null; + }, + reportParserV4: report => { + if (report && + report.hasOwnProperty('Properties1') && + report.Properties1.hasOwnProperty('Meter Type') && + (report.Properties1['Meter Type'] === 'Electric meter' || report.Properties1['Meter Type'] === 1) && + report.Properties1.hasOwnProperty('Scale bit 2') && + report.Properties1['Scale bit 2'] === false && + report.hasOwnProperty('Properties2') && + report.Properties2.hasOwnProperty('Scale bits 10') && + report.Properties2['Scale bits 10'] === 1 && + report.hasOwnProperty('Scale 2') && + report['Scale 2'] === 0) { + return report['Meter Value (Parsed)']; + } + return null; + }, +}; diff --git a/node_modules/homey-meshdriver/lib/zwave/system/capabilities/powerTotalReactive/METER.js b/node_modules/homey-meshdriver/lib/zwave/system/capabilities/powerTotalReactive/METER.js new file mode 100644 index 0000000..8aa8e8d --- /dev/null +++ b/node_modules/homey-meshdriver/lib/zwave/system/capabilities/powerTotalReactive/METER.js @@ -0,0 +1,74 @@ +'use strict'; + +/** + const exampleReport = { + 'Properties1 (Raw)': '', + Properties1: + { + 'Scale bit 2': true, + 'Meter Type': 'Electric meter', + 'Rate Type': 'Import', + 'Meter Type (Parsed)': { value: 'Electric meter' }, + 'Rate Type (Parsed)': { value: 'Import' }, + }, + 'Properties2 (Raw)': '', + Properties2: { + Size: 4, + 'Scale bits 10': 3, + Precision: 1, + }, + 'Meter Value': '', + 'Delta Time (Raw)': '', + 'Delta Time': 0, + 'Previous Meter Value': '', + 'Scale 2 (Raw)': '', + 'Scale 2': 1, + 'Meter Value (Parsed)': 0, + 'Previous Meter Value (Parsed)': 0, + }; + */ + +module.exports = { + get: 'METER_GET', + getOpts: { + getOnStart: true, + }, + getParserV4: () => ({ + Properties1: { + 'Rate Type': 'Import', + Scale: 7, + }, + 'Scale 2': 1, + }), + report: 'METER_REPORT', + reportParserV3: report => { + if (report && + report.hasOwnProperty('Properties1') && + report.Properties1.hasOwnProperty('Meter Type') && + (report.Properties1['Meter Type'] === 'Electric meter' || report.Properties1['Meter Type'] === 1) && + report.Properties1.hasOwnProperty('Scale bit 2') && + report.Properties1['Scale bit 2'] === true && + report.hasOwnProperty('Properties2') && + report.Properties2.hasOwnProperty('Scale bits 10') && + report.Properties2['Scale bits 10'] === 3) { + return report['Meter Value (Parsed)']; + } + return null; + }, + reportParserV4: report => { + if (report && + report.hasOwnProperty('Properties1') && + report.Properties1.hasOwnProperty('Meter Type') && + (report.Properties1['Meter Type'] === 'Electric meter' || report.Properties1['Meter Type'] === 1) && + report.Properties1.hasOwnProperty('Scale bit 2') && + report.Properties1['Scale bit 2'] === true && + report.hasOwnProperty('Properties2') && + report.Properties2.hasOwnProperty('Scale bits 10') && + report.Properties2['Scale bits 10'] === 3 && + report.hasOwnProperty('Scale 2') && + report['Scale 2'] === 1) { + return report['Meter Value (Parsed)']; + } + return null; + }, +}; diff --git a/node_modules/homey-meshdriver/lib/zwave/system/capabilities/target_temperature/THERMOSTAT_SETPOINT.js b/node_modules/homey-meshdriver/lib/zwave/system/capabilities/target_temperature/THERMOSTAT_SETPOINT.js index d97a7ec..fa9f165 100644 --- a/node_modules/homey-meshdriver/lib/zwave/system/capabilities/target_temperature/THERMOSTAT_SETPOINT.js +++ b/node_modules/homey-meshdriver/lib/zwave/system/capabilities/target_temperature/THERMOSTAT_SETPOINT.js @@ -2,7 +2,10 @@ module.exports = { get: 'THERMOSTAT_SETPOINT_GET', - getParser: ({ + getOpts: { + getOnStart: true, + }, + getParser: () => ({ Level: { 'Setpoint Type': 'Heating 1', }, diff --git a/node_modules/homey-meshdriver/lib/zwave/system/capabilities/windowcoverings_tilt_set/SWITCH_MULTILEVEL.js b/node_modules/homey-meshdriver/lib/zwave/system/capabilities/windowcoverings_tilt_set/SWITCH_MULTILEVEL.js new file mode 100644 index 0000000..a4d66d4 --- /dev/null +++ b/node_modules/homey-meshdriver/lib/zwave/system/capabilities/windowcoverings_tilt_set/SWITCH_MULTILEVEL.js @@ -0,0 +1,68 @@ +'use strict'; + +const util = require('./../../../../../util'); + +const INVERT_WINDOW_COVERINGS_TILT_DIRECTION = 'invertWindowCoveringsTiltDirection'; +const FACTORY_DEFAULT_DIMMING_DURATION_V2 = 'Factory default'; +const FACTORY_DEFAULT_DIMMING_DURATION_V4 = 'Default'; + +module.exports = { + get: 'SWITCH_MULTILEVEL_GET', + set: 'SWITCH_MULTILEVEL_SET', + getOpts: { + getOnStart: true, + }, + setParserV1(value) { + const invertDirection = !!this.getSetting(INVERT_WINDOW_COVERINGS_TILT_DIRECTION); + + if (value >= 1) { + if (invertDirection) value = 0; + else value = 0.99; + } + return { + Value: invertDirection ? Math.round((1 - value) * 100) : Math.round(value * 100), + }; + }, + setParserV2(value, options) { + const duration = (options.hasOwnProperty('duration') ? util.calculateZwaveDimDuration(options.duration) : FACTORY_DEFAULT_DIMMING_DURATION_V2); + + const invertDirection = !!this.getSetting(INVERT_WINDOW_COVERINGS_TILT_DIRECTION); + + if (value >= 1) { + if (invertDirection) value = 0; + else value = 0.99; + } + + return { + Value: invertDirection ? Math.round((1 - value) * 100) : Math.round(value * 100), + 'Dimming Duration': duration, + }; + }, + setParserV4(value, options) { + const duration = (options.hasOwnProperty('duration') ? util.calculateZwaveDimDuration(options.duration) : FACTORY_DEFAULT_DIMMING_DURATION_V4); + if (this.hasCapability('onoff')) this.setCapabilityValue('onoff', value > 0); + return { + Value: Math.round(value * 99), + 'Dimming Duration': duration, + }; + }, + report: 'SWITCH_MULTILEVEL_REPORT', + reportParserV1(report) { + const invertDirection = !!this.getSetting(INVERT_WINDOW_COVERINGS_TILT_DIRECTION); + + if (report && report.hasOwnProperty('Value (Raw)')) { + if (report['Value (Raw)'][0] === 255) return invertDirection ? 0 : 1; + return invertDirection ? (100 - report['Value (Raw)'][0]) / 99 : report['Value (Raw)'][0] / 99; + } + return null; + }, + reportParserV4(report) { + const invertDirection = !!this.getSetting(INVERT_WINDOW_COVERINGS_TILT_DIRECTION); + + if (report && report.hasOwnProperty('Current Value (Raw)')) { + if (report['Current Value (Raw)'][0] === 255) return invertDirection ? 0 : 1; + return invertDirection ? (100 - report['Current Value (Raw)'][0]) / 99 : report['Current Value (Raw)'][0] / 99; + } + return null; + }, +}; diff --git a/node_modules/homey-meshdriver/lib/zwave/system/commandclasses/METER/defines.json b/node_modules/homey-meshdriver/lib/zwave/system/commandclasses/METER/defines.json new file mode 100644 index 0000000..c8ca497 --- /dev/null +++ b/node_modules/homey-meshdriver/lib/zwave/system/commandclasses/METER/defines.json @@ -0,0 +1,91 @@ +{ + + "Rate Type": { + "0": "Reserved", + "1": "Import", + "2": "Export", + "3": "Reserved" + }, + + "Meter Scale": { + "Electric meter": { + "0": "kWh", + "1": "kVARh", + "2": "%", + "3": "Pulse count", + "4": "kVAR", + "5": "Voltage (V)", + "6": "Amperes (A)", + "7": "kW" + }, + "Gas and water meter": { + "0": "Cubic meter", + "1": "Cubic feet", + "2": "US gallon", + "3": "Pulse count", + "4": "IMP gallon", + "5": "Liter", + "6": "kPa", + "7": "Centum cubic feet", + "8": "Cubic meter per hour", + "9": "Liter per hour", + "10": "kWh", + "11": "MWh", + "12": "KW", + "13": "Hours" + }, + "Heating and Cooling Meter": { + "0": "Cubic meter (m3)", + "1": "Metric Ton (tonne) (t)", + "2": "Cubic meter per hour (m3/h)", + "3": "Liter per hour (l/h)", + "4": "kW", + "5": "MW", + "6": "kWh", + "7": "MWh", + "8": "Giga Joule (GJ)", + "9": "Giga Calorie (Gcal)", + "10": "Celsius (Co)", + "11": "Fahrenheit (oF)", + "12": "Hours" + }, + "Electric Sub-Meter": { + "0": "kWh", + "1": "kVAh", + "2": "W", + "3": "Pulse Count", + "4": "V", + "5": "A", + "6": "Power Factor (%)" + } + }, + + "Meter Type": { + "1": "Single-E electric meter", + "2": "Gas meter", + "3": "Water meter", + "4": "Twin-E electric meter", + "5": "3P Single Direct electric meter", + "6": "3P Single ECT electric meter", + "7": "1 Phase Direct Electricity Meter", + "8": "Heating meter", + "9": "Cooling meter", + "10": "Combined Heating and Cooling Meter", + "11": "Electric Sub-Meter" + }, + + "Meter Type Scale Map": { + "Single-E electric meter": "Electric meter", + "Gas meter": "Gas and water meter", + "Water meter": "Gas and water meter", + "Twin-E electric meter": "Electric meter", + "3P Single Direct electric meter": "Electric meter", + "3P Single ECT electric meter": "Electric meter", + "1 Phase Direct Electricity Meter": "Electric meter", + "Heating meter": "Heating and Cooling Meter", + "Cooling meter": "Heating and Cooling Meter", + "Combined Heating and Cooling Meter": "Heating and Cooling Meter", + "Electric Sub-Meter": "Electric Sub-Meter" + } + +} \ No newline at end of file diff --git a/node_modules/homey-meshdriver/lib/zwave/system/commandclasses/METER/index.js b/node_modules/homey-meshdriver/lib/zwave/system/commandclasses/METER/index.js new file mode 100644 index 0000000..a4ecb36 --- /dev/null +++ b/node_modules/homey-meshdriver/lib/zwave/system/commandclasses/METER/index.js @@ -0,0 +1,54 @@ +'use strict'; + +const defines = require('./defines.json'); + +module.exports = payload => { + + // replace Meter Type + try { + if( payload['Properties1'] && typeof payload['Properties1']['Meter Type'] !== 'undefined' ) { + payload['Properties1']['Meter Type (Parsed)'] = { + value: payload['Properties1']['Meter Type'], + name: defines['Meter Type'][ payload['Properties1']['Meter Type'] ] + } + } + } catch(e) {} + + // replace Rate Type + try { + if( payload['Properties1'] && typeof payload['Properties1']['Rate Type'] !== 'undefined' ) { + payload['Properties1']['Rate Type (Parsed)'] = { + value: payload['Properties1']['Rate Type'], + name: defines['Rate Type'][ payload['Properties1']['Rate Type'] ] + } + } + } catch(e) {} + + // replace Scale + try { + if( payload['Properties2'] && typeof payload['Properties2']['Scale'] !== 'undefined' ) { + payload['Properties2']['Scale (Parsed)'] = { + value: payload['Properties2']['Scale'], + name: defines['Meter Scale'][ defines['Meter Type Scale Map'][ payload['Properties1']['Meter Type'].name ] ][ payload['Properties2']['Scale'] ] + } + } + } catch(e) {} + + try { + if( typeof payload['Meter Value'] !== 'undefined' ) { + payload['Meter Value (Parsed)'] = payload['Meter Value'].readIntBE(0, payload['Properties2']['Size']); + payload['Meter Value (Parsed)'] /= Math.pow(10, payload['Properties2']['Precision']); + } + } catch(e) {} + + // parse value + try { + if( typeof payload['Previous Meter Value'] !== 'undefined' ) { + payload['Previous Meter Value (Parsed)'] = payload['Previous Meter Value'].readIntBE(0, payload['Properties2']['Size']); + payload['Previous Meter Value (Parsed)'] /= Math.pow(10, payload['Properties2']['Precision']); + } + } catch(e) {} + + return payload; + +} \ No newline at end of file diff --git a/node_modules/homey-meshdriver/lib/zwave/system/commandclasses/NOTIFICATION/events.json b/node_modules/homey-meshdriver/lib/zwave/system/commandclasses/NOTIFICATION/events.json new file mode 100644 index 0000000..ba811e5 --- /dev/null +++ b/node_modules/homey-meshdriver/lib/zwave/system/commandclasses/NOTIFICATION/events.json @@ -0,0 +1,624 @@ +{ + "1": { + "0": { + "push": "Event inactive", + "pull": "Previous Events cleared", + "version": 4 + }, + "1": { + "name": "Smoke detected", + "version": "2" + }, + "2": { + "name": "Smoke detected, Unknown Location", + "version": 2 + }, + "3": { + "name": "Smoke Alarm Test", + "version": 3 + }, + "4": { + "name": "Replacement Required", + "version": 5 + }, + "254": { + "name": "Unknown Event", + "version": 2 + } + }, + "2": { + "0": { + "push": "Event inactive", + "pull": "Previous Events cleared", + "version": 4 + }, + "1": { + "name": "Carbon monoxide detected", + "version": 2 + }, + "2": { + "name": "Carbon monoxide detected, Unknown Location", + "version": 2 + }, + "3": { + "name": "Carbon monoxide Test", + "version": 5 + }, + "4": { + "name": "Replacement Required", + "version": 5 + }, + "254": { + "name": "Unknown Event", + "version": 2 + } + }, + "3": { + "0": { + "push": "Event inactive", + "pull": "Previous Events cleared", + "version": 4 + }, + "1": { + "name": "Carbon dioxide detected", + "version": 2 + }, + "2": { + "name": "Carbon dioxide detected, Unknown Location", + "version": 2 + }, + "3": { + "name": "Carbon dioxide Test", + "version": 5 + }, + "4": { + "name": "Replacement Required", + "version": 5 + }, + "254": { + "name": "Unknown Event", + "version": 2 + } + }, + "4": { + "0": { + "push": "Event inactive", + "pull": "Previous Events cleared", + "version": 4 + }, + "1": { + "name": "Overheat detected", + "version": 2 + }, + "2": { + "name": "Overheat detected, Unknown Location", + "version": 2 + }, + "3": { + "name": "Rapid Temperature Rise", + "version": 2 + }, + "4": { + "name": "Rapid Temperature Rise, Unknown Location", + "version": 2 + }, + "5": { + "name": "Under heat detected", + "version": 2 + }, + "6": { + "name": "Under heat detected, Unknown Location", + "version": 2 + }, + "254": { + "name": "Unknown Event", + "version": 2 + } + }, + "5": { + "0": { + "push": "Event inactive", + "pull": "Previous Events cleared", + "version": 4 + }, + "1": { + "name": "Water Leak detected", + "version": 2 + }, + "2": { + "name": "Water Leak detected, Unknown Location", + "version": 2 + }, + "3": { + "name": "Water Level Dropped", + "version": 2 + }, + "4": { + "name": "Water Level Dropped, Unknown Location", + "version": 2 + }, + "5": { + "name": "Replace Water Filter", + "version": 2 + }, + "254": { + "name": "Unknown Event", + "version": 2 + } + }, + "6": { + "0": { + "push": "Event inactive", + "pull": "Previous Events cleared", + "version": 4 + }, + "1": { + "name": "Manual Lock Operation", + "version": 2 + }, + "2": { + "name": "Manual Unlock Operation", + "version": 2 + }, + "3": { + "name": "RF Lock Operation", + "version": 2 + }, + "4": { + "name": "RF Unlock Operation", + "version": 2 + }, + "5": { + "name": "Keypad Lock Operation", + "version": 2 + }, + "6": { + "name": "Keypad Unlock Operation", + "version": 2 + }, + "7": { + "name": "Manual Not Fully Locked Operation", + "version": 3 + }, + "8": { + "name": "RF Not Fully Locked Operation", + "version": 3 + }, + "9": { + "name": "Auto Lock Locked Operation", + "version": 3 + }, + "10": { + "name": "Auto Lock Not Fully Operation", + "version": 3 + }, + "11": { + "name": "Lock Jammed", + "version": 3 + }, + "12": { + "name": "All user codes deleted", + "version": 3 + }, + "13": { + "name": "Single user code deleted", + "version": 3 + }, + "14": { + "name": "New user code deleted", + "version": 3 + }, + "15": { + "name": "New user code not added due to duplicate code", + "version": 3 + }, + "16": { + "name": "Keypad temporary disabled", + "version": 3 + }, + "17": { + "name": "Keypad busy", + "version": 3 + }, + "18": { + "name": "New Program code Entered - Unique code for lock configuration", + "version": 3 + }, + "19": { + "name": "Manually Enter user Access code exceeds code limit", + "version": 3 + }, + "20": { + "name": "Unlock By RF with invalid user code", + "version": 3 + }, + "21": { + "name": "Locked By RF with invalid user codes", + "version": 3 + }, + "22": { + "name": "Window/Door is open", + "version": 3 + }, + "23": { + "name": "Window/Door is closed", + "version": 3 + }, + "64": { + "name": "Barrier performing Initialization process", + "version": 4 + }, + "65": { + "name": "Barrier Operation (Open / Close) force has been exceeded", + "version": 4 + }, + "66": { + "name": "Barrier motor has exceeded manufacturer's operational time limit", + "version": 4 + }, + "67": { + "name": "Barrier operation has exceeded physical mechanical limits", + "version": 4 + }, + "68": { + "name": "Barrier unable to perform requested operation due to UL requirements", + "version": 4 + }, + "68": { + "name": "Barrier Unattended operation has been disabled per UL requirements", + "version": 4 + }, + "69": { + "name": "Barrier failed to perform Requested operation, device malfunction", + "version": 4 + }, + "70": { + "name": "Barrier Vacation Mode", + "version": 4 + }, + "71": { + "name": "Barrier Safety Beam Obstacle", + "version": 4 + }, + "72": { + "name": "Barrier Sensor Not Detected / Supervisory Error", + "version": 4 + }, + "73": { + "name": "Barrier Sensor Low Battery Warning", + "version": 4 + }, + "74": { + "name": "Barrier detected short in Wall Station wires", + "version": 4 + }, + "75": { + "name": "Barrier associated with non-Z-wave remote control", + "version": 4 + }, + "254": { + "name": "Unknown Event", + "version": 2 + } + }, + + "7": { + "0": { + "push": "Event inactive", + "pull": "Previous Events cleared", + "version": 4 + }, + "1": { + "name": "Intrusion", + "version": 2 + }, + "2": { + "name": "Intrusion, Unknown Location", + "version": 2 + }, + "3": { + "name": "Tampering, Product covering removed", + "version": 2 + }, + "4": { + "name": "Tampering, Invalid Code", + "version": 2 + }, + "5": { + "name": "Glass Breakage", + "version": 2 + }, + "6": { + "name": "Glass Breakage, Unknown Location", + "version": 2 + }, + "7": { + "name": "Motion Detection", + "version": 2 + }, + "8": { + "name": "Motion Detection, Unknown Location", + "version": 4 + }, + "254": { + "name": "Unknown Event", + "version": 2 + } + }, + + "8": { + "0": { + "push": "Event inactive", + "pull": "Previous Events cleared", + "version": 4 + }, + "1": { + "name": "Power has been applied", + "version": 2 + }, + "2": { + "name": "AC mains disconnected", + "version": 2 + }, + "3": { + "name": "AC mains reconnected", + "version": 2 + }, + "4": { + "name": "Surge detected", + "version": 2 + }, + "5": { + "name": "Voltage Drop/Drift", + "version": 2 + }, + "6": { + "name": "Over-current detected", + "version": 3 + }, + "7": { + "name": "Over-voltage detected", + "version": 3 + }, + "8": { + "name": "Over-load detected", + "version": 3 + }, + "9": { + "name": "Load error", + "version": 3 + }, + "10": { + "name": "Replace battery soon", + "version": 3 + }, + "11": { + "name": "Replace battery now", + "version": 3 + }, + "12": { + "name": "Battery is charging", + "version": 4 + }, + "13": { + "name": "Battery is fully charged", + "version": 4 + }, + "14": { + "name": "Charge battery soon", + "version": 4 + }, + "15": { + "name": "Charge battery now!", + "version": 4 + }, + "254": { + "name": "Unknown Event", + "version": 2 + } + }, + "9": { + "0": { + "push": "Event inactive", + "pull": "Previous Events cleared", + "version": 4 + }, + "1": { + "name": "System hardware failure", + "version": 2 + }, + "2": { + "name": "System software failure", + "version": 2 + }, + "3": { + "name": "System hardware failure with manufacturer proprietary failure code", + "version": 3 + }, + "4": { + "name": "System software failure with manufacturer proprietary failure code", + "version": 3 + }, + "254": { + "name": "Unknown Event", + "version": 2 + } + }, + "10": { + "0": { + "push": "Event inactive", + "pull": "Previous Events cleared", + "version": 4 + }, + "1": { + "name": "Contact Police", + "version": 2 + }, + "2": { + "name": "Contact Fire Service", + "version": 2 + }, + "3": { + "name": "Contact Medical Service", + "version": 2 + }, + "254": { + "name": "Unknown Event", + "version": 2 + } + }, + "11": { + "0": { + "push": "Event inactive", + "pull": "Previous Events cleared", + "version": 4 + }, + "1": { + "name": "Wake Up Alert", + "version": 2 + }, + "2": { + "name": "Timer Ended", + "version": 3 + }, + "3": { + "name": "Time remaining", + "version": 4 + }, + "254": { + "name": "Unknown Event", + "version": 2 + } + }, + "12": { + "0": { + "push": "Event inactive", + "pull": "Previous Events cleared", + "version": 4 + }, + "1": { + "name": "Program Started", + "version": 4 + }, + "2": { + "name": "Program in progress", + "version": 4 + }, + "3": { + "name": "Program completed", + "version": 4 + }, + "4": { + "name": "Replace main filter", + "version": 4 + }, + "5": { + "name": "Failure to set target temperature", + "version": 4 + }, + "6": { + "name": "Supplying water", + "version": 4 + }, + "7": { + "name": "Water supply failure", + "version": 4 + }, + "8": { + "name": "Boiling", + "version": 4 + }, + "9": { + "name": "Boiling failure", + "version": 4 + }, + "10": { + "name": "Washing", + "version": 4 + }, + "11": { + "name": "Washing failure", + "version": 4 + }, + "12": { + "name": "Rinsing", + "version": 4 + }, + "13": { + "name": "Rinsing failure", + "version": 4 + }, + "14": { + "name": "Draining", + "version": 4 + }, + "15": { + "name": "Draining failure", + "version": 4 + }, + "16": { + "name": "Spinning", + "version": 4 + }, + "17": { + "name": "Spinning failure", + "version": 4 + }, + "18": { + "name": "Drying", + "version": 4 + }, + "19": { + "name": "Drying failure", + "version": 4 + }, + "20": { + "name": "Fan failure", + "version": 4 + }, + "21": { + "name": "Compressor failure", + "version": 4 + }, + "254": { + "name": "Unknown Event", + "version": 4 + } + }, + "13": { + "0": { + "push": "Event inactive", + "pull": "Previous Events cleared", + "version": 4 + }, + "1": { + "name": "Leaving Bed", + "version": 4 + }, + "2": { + "name": "Sitting on bed", + "version": 4 + }, + "3": { + "name": "Lying on bed", + "version": 4 + }, + "4": { + "name": "Posture changed", + "version": 4 + }, + "5": { + "name": "Sitting on edge of bed", + "version": 4 + }, + "6": { + "name": "Volatile Organic Compound level", + "version": 4 + }, + "254": { + "name": "Unknown Event", + "version": 4 + } + } + +} \ No newline at end of file diff --git a/node_modules/homey-meshdriver/lib/zwave/system/commandclasses/NOTIFICATION/index.js b/node_modules/homey-meshdriver/lib/zwave/system/commandclasses/NOTIFICATION/index.js new file mode 100644 index 0000000..4f95376 --- /dev/null +++ b/node_modules/homey-meshdriver/lib/zwave/system/commandclasses/NOTIFICATION/index.js @@ -0,0 +1,32 @@ +'use strict'; + +const events = require('./events.json'); + +module.exports = payload => { + + let eventNotificationType = payload['Notification Type (Raw)']; + if( Buffer.isBuffer(eventNotificationType) && eventNotificationType.length ) + eventNotificationType = eventNotificationType[0].toString() + + let eventCode = payload['Event (Raw)']; + if( Buffer.isBuffer(eventCode) && eventCode.length ) + eventCode = eventCode[0].toString() + + if( events[ eventNotificationType ] + && events[ eventNotificationType ][ eventCode ] ) { + + let name = null; + if( events[ eventNotificationType ][ eventCode ].name ) { + name = events[ eventNotificationType ][ eventCode ].name + } else if( events[ eventNotificationType ][ eventCode ].push ) { + name = events[ eventNotificationType ][ eventCode ].push + } else if( events[ eventNotificationType ][ eventCode ].pull ) { + name = events[ eventNotificationType ][ eventCode ].pull + } + + payload['Event (Parsed 2)'] = name; + } + + return payload; + +} \ No newline at end of file diff --git a/node_modules/homey-meshdriver/lib/zwave/system/commandclasses/SENSOR_ALARM/index.js b/node_modules/homey-meshdriver/lib/zwave/system/commandclasses/SENSOR_ALARM/index.js new file mode 100644 index 0000000..bf19af7 --- /dev/null +++ b/node_modules/homey-meshdriver/lib/zwave/system/commandclasses/SENSOR_ALARM/index.js @@ -0,0 +1,28 @@ +'use strict'; + +module.exports = payload => { + + let alarms = { + '0': 'General Purpose Alarm', + '1': 'Smoke Alarm', + '2': 'CO Alarm', + '3': 'CO2 Alarm', + '4': 'Heat Alarm', + '5': 'Water Leak Alarm' + } + + if( typeof payload['Bit Mask'] !== 'undefined' ) { + payload['Bit Mask (Parsed)'] = {}; + + for( let alarmValue in alarms ) { + payload['Bit Mask (Parsed)'][ alarms[alarmValue] ] = getBitBE( payload['Bit Mask'][0], parseInt(alarmValue) ); + } + } + + return payload; + +} + +function getBitBE( value, position, size ){ + return !!((1 << position ) & value); +} \ No newline at end of file diff --git a/node_modules/homey-meshdriver/lib/zwave/system/commandclasses/SENSOR_MULTILEVEL/index.js b/node_modules/homey-meshdriver/lib/zwave/system/commandclasses/SENSOR_MULTILEVEL/index.js new file mode 100644 index 0000000..e713331 --- /dev/null +++ b/node_modules/homey-meshdriver/lib/zwave/system/commandclasses/SENSOR_MULTILEVEL/index.js @@ -0,0 +1,14 @@ +'use strict'; + +module.exports = payload => { + + if( typeof payload['Sensor Value'] != 'undefined' ) { + try { + payload['Sensor Value (Parsed)'] = payload['Sensor Value'].readIntBE(0, payload['Level']['Size']); + payload['Sensor Value (Parsed)'] /= Math.pow(10, payload['Level']['Precision']); + } catch( err ) {} + } + + return payload; + +} \ No newline at end of file diff --git a/node_modules/homey-meshdriver/lib/zwave/system/settings.json b/node_modules/homey-meshdriver/lib/zwave/system/settings.json index a237f25..a575b4f 100644 --- a/node_modules/homey-meshdriver/lib/zwave/system/settings.json +++ b/node_modules/homey-meshdriver/lib/zwave/system/settings.json @@ -8,5 +8,15 @@ "nl": "Keer rolluik beweging om" }, "value": false + }, + { + "id": "invertWindowCoveringsTiltDirection", + "zwaveDevice": "ZwaveWindowCoveringsDevice", + "type": "checkbox", + "label": { + "en": "Invert slats tilt direction", + "nl": "Draai lamelrichting om" + }, + "value": false } ] \ No newline at end of file diff --git a/node_modules/homey-meshdriver/package-lock.json b/node_modules/homey-meshdriver/package-lock.json deleted file mode 100644 index eede7b8..0000000 --- a/node_modules/homey-meshdriver/package-lock.json +++ /dev/null @@ -1,1246 +0,0 @@ -{ - "name": "homey-meshdriver", - "version": "1.2.4", - "lockfileVersion": 1, - "requires": true, - "dependencies": { - "abbrev": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.0.tgz", - "integrity": "sha1-0FVMIlZjbi9W58LlrRg/hZQo2B8=", - "dev": true - }, - "almost-equal": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/almost-equal/-/almost-equal-1.1.0.tgz", - "integrity": "sha1-+FHGMROHV5lCdqou++jfowZszN0=" - }, - "ansi-regex": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", - "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", - "dev": true - }, - "ansi-styles": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", - "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=", - "dev": true - }, - "argparse": { - "version": "1.0.9", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.9.tgz", - "integrity": "sha1-c9g7wmP4bpf4zE9rrhsOkKfSLIY=", - "dev": true, - "requires": { - "sprintf-js": "1.0.3" - } - }, - "array-find-index": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/array-find-index/-/array-find-index-1.0.2.tgz", - "integrity": "sha1-3wEKoSh+Fku9pvlyOwqWoexBh6E=", - "dev": true - }, - "async": { - "version": "1.5.2", - "resolved": "https://registry.npmjs.org/async/-/async-1.5.2.tgz", - "integrity": "sha1-7GphrlZIDAw8skHJVhjiCJL5Zyo=", - "dev": true - }, - "babylon": { - "version": "7.0.0-beta.16", - "resolved": "https://registry.npmjs.org/babylon/-/babylon-7.0.0-beta.16.tgz", - "integrity": "sha1-RIzu3uwKXvVrYoEuNVa/NsW7l4E=", - "dev": true - }, - "balanced-match": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", - "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=", - "dev": true - }, - "bluebird": { - "version": "3.5.0", - "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.5.0.tgz", - "integrity": "sha1-eRQg1/VR7qKJdFOop3ZT+WYG1nw=", - "dev": true - }, - "body-parser": { - "version": "1.14.2", - "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.14.2.tgz", - "integrity": "sha1-EBXLH+LEQ4WCWVgdtTMy+NDPUPk=", - "dev": true, - "requires": { - "bytes": "2.2.0", - "content-type": "1.0.2", - "debug": "2.2.0", - "depd": "1.1.0", - "http-errors": "1.3.1", - "iconv-lite": "0.4.13", - "on-finished": "2.3.0", - "qs": "5.2.0", - "raw-body": "2.1.7", - "type-is": "1.6.15" - }, - "dependencies": { - "iconv-lite": { - "version": "0.4.13", - "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.13.tgz", - "integrity": "sha1-H4irpKsLFQjoMSrMOTRfNumS4vI=", - "dev": true - }, - "qs": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/qs/-/qs-5.2.0.tgz", - "integrity": "sha1-qfMRQq9GjLcrJbMBNrokVoNJFr4=", - "dev": true - } - } - }, - "brace-expansion": { - "version": "1.1.8", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.8.tgz", - "integrity": "sha1-wHshHHyVLsH479Uad+8NHTmQopI=", - "dev": true, - "requires": { - "balanced-match": "1.0.0", - "concat-map": "0.0.1" - } - }, - "builtin-modules": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-1.1.1.tgz", - "integrity": "sha1-Jw8HbFpywC9bZaR9+Uxf46J4iS8=", - "dev": true - }, - "bytes": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/bytes/-/bytes-2.2.0.tgz", - "integrity": "sha1-/TVGSkA/b5EXwt42Cez/nK4ABYg=", - "dev": true - }, - "camelcase": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-2.1.1.tgz", - "integrity": "sha1-fB0W1nmhu+WcoCys7PsBHiAfWh8=", - "dev": true - }, - "camelcase-keys": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/camelcase-keys/-/camelcase-keys-2.1.0.tgz", - "integrity": "sha1-MIvur/3ygRkFHvodkyITyRuPkuc=", - "dev": true, - "requires": { - "camelcase": "2.1.1", - "map-obj": "1.0.1" - } - }, - "catharsis": { - "version": "0.8.9", - "resolved": "https://registry.npmjs.org/catharsis/-/catharsis-0.8.9.tgz", - "integrity": "sha1-mMyJDKZS3S7w5ws3klMQ/56Q/Is=", - "dev": true, - "requires": { - "underscore-contrib": "0.3.0" - } - }, - "chalk": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", - "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", - "dev": true, - "requires": { - "ansi-styles": "2.2.1", - "escape-string-regexp": "1.0.5", - "has-ansi": "2.0.0", - "strip-ansi": "3.0.1", - "supports-color": "2.0.0" - } - }, - "coffee-script": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/coffee-script/-/coffee-script-1.10.0.tgz", - "integrity": "sha1-EpOLz5vhlI+gBvkuDEyegXBRCMA=", - "dev": true - }, - "color-space": { - "version": "1.14.7", - "resolved": "https://registry.npmjs.org/color-space/-/color-space-1.14.7.tgz", - "integrity": "sha1-t/WjF3lCe7JfmSemlBDYDC6qpxs=", - "requires": { - "husl": "5.0.3", - "mumath": "3.3.4" - } - }, - "colors": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/colors/-/colors-1.1.2.tgz", - "integrity": "sha1-FopHAXVran9RoSzgyXv6KMCE7WM=", - "dev": true - }, - "concat-map": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", - "dev": true - }, - "content-type": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.2.tgz", - "integrity": "sha1-t9ETrueo3Se9IRM8TcJSnfFyHu0=", - "dev": true - }, - "cross-spawn": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-3.0.1.tgz", - "integrity": "sha1-ElYDfsufDF9549bvE14wdwGEuYI=", - "dev": true, - "requires": { - "lru-cache": "4.1.1", - "which": "1.2.14" - } - }, - "currently-unhandled": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/currently-unhandled/-/currently-unhandled-0.4.1.tgz", - "integrity": "sha1-mI3zP+qxke95mmE2nddsF635V+o=", - "dev": true, - "requires": { - "array-find-index": "1.0.2" - } - }, - "dateformat": { - "version": "1.0.12", - "resolved": "https://registry.npmjs.org/dateformat/-/dateformat-1.0.12.tgz", - "integrity": "sha1-nxJLZ1lMk3/3BpMuSmQsyo27/uk=", - "dev": true, - "requires": { - "get-stdin": "4.0.1", - "meow": "3.7.0" - } - }, - "debug": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.2.0.tgz", - "integrity": "sha1-+HBX6ZWxofauaklgZkE3vFbwOdo=", - "dev": true, - "requires": { - "ms": "0.7.1" - } - }, - "decamelize": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", - "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=", - "dev": true - }, - "depd": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.0.tgz", - "integrity": "sha1-4b2Cxqq2ztlluXuIsX7T5SjKGMM=", - "dev": true - }, - "ee-first": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", - "integrity": "sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0=", - "dev": true - }, - "error-ex": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.1.tgz", - "integrity": "sha1-+FWobOYa3E6GIcPNoh56dhLDqNw=", - "dev": true, - "requires": { - "is-arrayish": "0.2.1" - } - }, - "escape-string-regexp": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", - "dev": true - }, - "esprima": { - "version": "2.7.3", - "resolved": "https://registry.npmjs.org/esprima/-/esprima-2.7.3.tgz", - "integrity": "sha1-luO3DVd59q1JzQMmc9HDEnZ7pYE=", - "dev": true - }, - "eventemitter2": { - "version": "0.4.14", - "resolved": "https://registry.npmjs.org/eventemitter2/-/eventemitter2-0.4.14.tgz", - "integrity": "sha1-j2G3XN4BKy6esoTUVFWDtWQ7Yas=", - "dev": true - }, - "exit": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/exit/-/exit-0.1.2.tgz", - "integrity": "sha1-BjJjj42HfMghB9MKD/8aF8uhzQw=", - "dev": true - }, - "faye-websocket": { - "version": "0.10.0", - "resolved": "https://registry.npmjs.org/faye-websocket/-/faye-websocket-0.10.0.tgz", - "integrity": "sha1-TkkvjQTftviQA1B/btvy1QHnxvQ=", - "dev": true, - "requires": { - "websocket-driver": "0.6.5" - } - }, - "find-up": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-1.1.2.tgz", - "integrity": "sha1-ay6YIrGizgpgq2TWEOzK1TyyTQ8=", - "dev": true, - "requires": { - "path-exists": "2.1.0", - "pinkie-promise": "2.0.1" - } - }, - "findup-sync": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/findup-sync/-/findup-sync-0.3.0.tgz", - "integrity": "sha1-N5MKpdgWt3fANEXhlmzGeQpMCxY=", - "dev": true, - "requires": { - "glob": "5.0.15" - }, - "dependencies": { - "glob": { - "version": "5.0.15", - "resolved": "https://registry.npmjs.org/glob/-/glob-5.0.15.tgz", - "integrity": "sha1-G8k2ueAvSmA/zCIuz3Yz0wuLk7E=", - "dev": true, - "requires": { - "inflight": "1.0.6", - "inherits": "2.0.3", - "minimatch": "3.0.4", - "once": "1.4.0", - "path-is-absolute": "1.0.1" - } - } - } - }, - "fs.realpath": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", - "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", - "dev": true - }, - "gaze": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/gaze/-/gaze-1.1.2.tgz", - "integrity": "sha1-hHIkZ3rbiHDWeSV+0ziP22HkAQU=", - "dev": true, - "requires": { - "globule": "1.2.0" - } - }, - "get-stdin": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-4.0.1.tgz", - "integrity": "sha1-uWjGsKBDhDJJAui/Gl3zJXmkUP4=", - "dev": true - }, - "getobject": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/getobject/-/getobject-0.1.0.tgz", - "integrity": "sha1-BHpEl4n6Fg0Bj1SG7ZEyC27HiFw=", - "dev": true - }, - "glob": { - "version": "7.0.6", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.0.6.tgz", - "integrity": "sha1-IRuvr0nlJbjNkyYNFKsTYVKz9Xo=", - "dev": true, - "requires": { - "fs.realpath": "1.0.0", - "inflight": "1.0.6", - "inherits": "2.0.3", - "minimatch": "3.0.4", - "once": "1.4.0", - "path-is-absolute": "1.0.1" - } - }, - "globule": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/globule/-/globule-1.2.0.tgz", - "integrity": "sha1-HcScaCLdnoovoAuiopUAboZkvQk=", - "dev": true, - "requires": { - "glob": "7.1.2", - "lodash": "4.17.4", - "minimatch": "3.0.4" - }, - "dependencies": { - "glob": { - "version": "7.1.2", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.2.tgz", - "integrity": "sha512-MJTUg1kjuLeQCJ+ccE4Vpa6kKVXkPYJ2mOCQyUuKLcLQsdrMCpBPUi8qVE6+YuaJkozeA9NusTAw3hLr8Xe5EQ==", - "dev": true, - "requires": { - "fs.realpath": "1.0.0", - "inflight": "1.0.6", - "inherits": "2.0.3", - "minimatch": "3.0.4", - "once": "1.4.0", - "path-is-absolute": "1.0.1" - } - }, - "lodash": { - "version": "4.17.4", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.4.tgz", - "integrity": "sha1-eCA6TRwyiuHYbcpkYONptX9AVa4=", - "dev": true - } - } - }, - "graceful-fs": { - "version": "4.1.11", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.11.tgz", - "integrity": "sha1-Dovf5NHduIVNZOBOp8AOKgJuVlg=", - "dev": true - }, - "grunt": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/grunt/-/grunt-1.0.1.tgz", - "integrity": "sha1-6HeHZOlEsY8yuw8QuQeEdcnftWs=", - "dev": true, - "requires": { - "coffee-script": "1.10.0", - "dateformat": "1.0.12", - "eventemitter2": "0.4.14", - "exit": "0.1.2", - "findup-sync": "0.3.0", - "glob": "7.0.6", - "grunt-cli": "1.2.0", - "grunt-known-options": "1.1.0", - "grunt-legacy-log": "1.0.0", - "grunt-legacy-util": "1.0.0", - "iconv-lite": "0.4.18", - "js-yaml": "3.5.5", - "minimatch": "3.0.4", - "nopt": "3.0.6", - "path-is-absolute": "1.0.1", - "rimraf": "2.2.8" - }, - "dependencies": { - "grunt-cli": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/grunt-cli/-/grunt-cli-1.2.0.tgz", - "integrity": "sha1-VisRnrsGndtGSs4oRVAb6Xs1tqg=", - "dev": true, - "requires": { - "findup-sync": "0.3.0", - "grunt-known-options": "1.1.0", - "nopt": "3.0.6", - "resolve": "1.1.7" - } - } - } - }, - "grunt-contrib-watch": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/grunt-contrib-watch/-/grunt-contrib-watch-1.0.0.tgz", - "integrity": "sha1-hKGnodar0m7VaEE0lscxM+mQAY8=", - "dev": true, - "requires": { - "async": "1.5.2", - "gaze": "1.1.2", - "lodash": "3.10.1", - "tiny-lr": "0.2.1" - } - }, - "grunt-jsdoc": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/grunt-jsdoc/-/grunt-jsdoc-2.1.0.tgz", - "integrity": "sha1-jCrlCAygnRjXre+Hl2eNRkIaPjo=", - "dev": true, - "requires": { - "cross-spawn": "3.0.1", - "jsdoc": "3.5.3" - } - }, - "grunt-known-options": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/grunt-known-options/-/grunt-known-options-1.1.0.tgz", - "integrity": "sha1-pCdO6zL6dl2lp6OxcSYXzjsUQUk=", - "dev": true - }, - "grunt-legacy-log": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/grunt-legacy-log/-/grunt-legacy-log-1.0.0.tgz", - "integrity": "sha1-+4bxgJhHvAfcR4Q/ns1srLYt8tU=", - "dev": true, - "requires": { - "colors": "1.1.2", - "grunt-legacy-log-utils": "1.0.0", - "hooker": "0.2.3", - "lodash": "3.10.1", - "underscore.string": "3.2.3" - } - }, - "grunt-legacy-log-utils": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/grunt-legacy-log-utils/-/grunt-legacy-log-utils-1.0.0.tgz", - "integrity": "sha1-p7ji0Ps1taUPSvmG/BEnSevJbz0=", - "dev": true, - "requires": { - "chalk": "1.1.3", - "lodash": "4.3.0" - }, - "dependencies": { - "lodash": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.3.0.tgz", - "integrity": "sha1-79nEpuxT87BUEkKZFcPkgk5NJaQ=", - "dev": true - } - } - }, - "grunt-legacy-util": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/grunt-legacy-util/-/grunt-legacy-util-1.0.0.tgz", - "integrity": "sha1-OGqnjcbtUJhsKxiVcmWxtIq7m4Y=", - "dev": true, - "requires": { - "async": "1.5.2", - "exit": "0.1.2", - "getobject": "0.1.0", - "hooker": "0.2.3", - "lodash": "4.3.0", - "underscore.string": "3.2.3", - "which": "1.2.14" - }, - "dependencies": { - "lodash": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.3.0.tgz", - "integrity": "sha1-79nEpuxT87BUEkKZFcPkgk5NJaQ=", - "dev": true - } - } - }, - "has-ansi": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz", - "integrity": "sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE=", - "dev": true, - "requires": { - "ansi-regex": "2.1.1" - } - }, - "hooker": { - "version": "0.2.3", - "resolved": "https://registry.npmjs.org/hooker/-/hooker-0.2.3.tgz", - "integrity": "sha1-uDT3I8xKJCqmWWNFnfbZhMXT2Vk=", - "dev": true - }, - "hosted-git-info": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.5.0.tgz", - "integrity": "sha512-pNgbURSuab90KbTqvRPsseaTxOJCZBD0a7t+haSN33piP9cCM4l0CqdzAif2hUqm716UovKB2ROmiabGAKVXyg==", - "dev": true - }, - "http-errors": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.3.1.tgz", - "integrity": "sha1-GX4izevUGYWF6GlO9nhhl7ke2UI=", - "dev": true, - "requires": { - "inherits": "2.0.3", - "statuses": "1.3.1" - } - }, - "husl": { - "version": "5.0.3", - "resolved": "https://registry.npmjs.org/husl/-/husl-5.0.3.tgz", - "integrity": "sha1-7icqr/G+vkDfNYjtAHtw3n5nl4g=" - }, - "iconv-lite": { - "version": "0.4.18", - "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.18.tgz", - "integrity": "sha512-sr1ZQph3UwHTR0XftSbK85OvBbxe/abLGzEnPENCQwmHf7sck8Oyu4ob3LgBxWWxRoM+QszeUyl7jbqapu2TqA==", - "dev": true - }, - "indent-string": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-2.1.0.tgz", - "integrity": "sha1-ji1INIdCEhtKghi3oTfppSBJ3IA=", - "dev": true, - "requires": { - "repeating": "2.0.1" - } - }, - "inflight": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", - "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", - "dev": true, - "requires": { - "once": "1.4.0", - "wrappy": "1.0.2" - } - }, - "inherits": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", - "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=", - "dev": true - }, - "is-arrayish": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", - "integrity": "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0=", - "dev": true - }, - "is-builtin-module": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-builtin-module/-/is-builtin-module-1.0.0.tgz", - "integrity": "sha1-VAVy0096wxGfj3bDDLwbHgN6/74=", - "dev": true, - "requires": { - "builtin-modules": "1.1.1" - } - }, - "is-finite": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-finite/-/is-finite-1.0.2.tgz", - "integrity": "sha1-zGZ3aVYCvlUO8R6LSqYwU0K20Ko=", - "dev": true, - "requires": { - "number-is-nan": "1.0.1" - } - }, - "is-utf8": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/is-utf8/-/is-utf8-0.2.1.tgz", - "integrity": "sha1-Sw2hRCEE0bM2NA6AeX6GXPOffXI=", - "dev": true - }, - "isexe": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", - "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", - "dev": true - }, - "js-yaml": { - "version": "3.5.5", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.5.5.tgz", - "integrity": "sha1-A3fDgBfKvHMisNH7zSWkkWQfL74=", - "dev": true, - "requires": { - "argparse": "1.0.9", - "esprima": "2.7.3" - } - }, - "js2xmlparser": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/js2xmlparser/-/js2xmlparser-3.0.0.tgz", - "integrity": "sha1-P7YOqgicVED5MZ9RdgzNB+JJlzM=", - "dev": true, - "requires": { - "xmlcreate": "1.0.2" - } - }, - "jsdoc": { - "version": "3.5.3", - "resolved": "https://registry.npmjs.org/jsdoc/-/jsdoc-3.5.3.tgz", - "integrity": "sha512-K9mjBmCm2P62kqJ5UU6Zj7zZnJoLxZBzgLm2yVv98tqLHYSpIvxUkM+dGBua+yUsvOhXsAh232a/joE+86D4CQ==", - "dev": true, - "requires": { - "babylon": "7.0.0-beta.16", - "bluebird": "3.5.0", - "catharsis": "0.8.9", - "escape-string-regexp": "1.0.5", - "js2xmlparser": "3.0.0", - "klaw": "2.0.0", - "marked": "0.3.6", - "mkdirp": "0.5.1", - "requizzle": "0.2.1", - "strip-json-comments": "2.0.1", - "taffydb": "2.6.2", - "underscore": "1.8.3" - } - }, - "klaw": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/klaw/-/klaw-2.0.0.tgz", - "integrity": "sha1-WcEo4Nxc5BAgEVEZTuucv4WGUPY=", - "dev": true, - "requires": { - "graceful-fs": "4.1.11" - } - }, - "livereload-js": { - "version": "2.2.2", - "resolved": "https://registry.npmjs.org/livereload-js/-/livereload-js-2.2.2.tgz", - "integrity": "sha1-bIclfmSKtHW8JOoldFftzB+NC8I=", - "dev": true - }, - "load-json-file": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-1.1.0.tgz", - "integrity": "sha1-lWkFcI1YtLq0wiYbBPWfMcmTdMA=", - "dev": true, - "requires": { - "graceful-fs": "4.1.11", - "parse-json": "2.2.0", - "pify": "2.3.0", - "pinkie-promise": "2.0.1", - "strip-bom": "2.0.0" - } - }, - "lodash": { - "version": "3.10.1", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-3.10.1.tgz", - "integrity": "sha1-W/Rejkm6QYnhfUgnid/RW9FAt7Y=", - "dev": true - }, - "loud-rejection": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/loud-rejection/-/loud-rejection-1.6.0.tgz", - "integrity": "sha1-W0b4AUft7leIcPCG0Eghz5mOVR8=", - "dev": true, - "requires": { - "currently-unhandled": "0.4.1", - "signal-exit": "3.0.2" - } - }, - "lru-cache": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.1.tgz", - "integrity": "sha512-q4spe4KTfsAS1SUHLO0wz8Qiyf1+vMIAgpRYioFYDMNqKfHQbg+AVDH3i4fvpl71/P1L0dBl+fQi+P37UYf0ew==", - "dev": true, - "requires": { - "pseudomap": "1.0.2", - "yallist": "2.1.2" - } - }, - "map-obj": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/map-obj/-/map-obj-1.0.1.tgz", - "integrity": "sha1-2TPOuSBdgr3PSIb2dCvcK03qFG0=", - "dev": true - }, - "marked": { - "version": "0.3.6", - "resolved": "https://registry.npmjs.org/marked/-/marked-0.3.6.tgz", - "integrity": "sha1-ssbGGPzOzk74bE/Gy4p8v1rtqNc=", - "dev": true - }, - "media-typer": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", - "integrity": "sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g=", - "dev": true - }, - "meow": { - "version": "3.7.0", - "resolved": "https://registry.npmjs.org/meow/-/meow-3.7.0.tgz", - "integrity": "sha1-cstmi0JSKCkKu/qFaJJYcwioAfs=", - "dev": true, - "requires": { - "camelcase-keys": "2.1.0", - "decamelize": "1.2.0", - "loud-rejection": "1.6.0", - "map-obj": "1.0.1", - "minimist": "1.2.0", - "normalize-package-data": "2.4.0", - "object-assign": "4.1.1", - "read-pkg-up": "1.0.1", - "redent": "1.0.0", - "trim-newlines": "1.0.0" - } - }, - "mime-db": { - "version": "1.27.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.27.0.tgz", - "integrity": "sha1-gg9XIpa70g7CXtVeW13oaeVDbrE=", - "dev": true - }, - "mime-types": { - "version": "2.1.15", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.15.tgz", - "integrity": "sha1-pOv1BkCUVpI3uM9wBGd20J/JKu0=", - "dev": true, - "requires": { - "mime-db": "1.27.0" - } - }, - "minimatch": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", - "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", - "dev": true, - "requires": { - "brace-expansion": "1.1.8" - } - }, - "minimist": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", - "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", - "dev": true - }, - "mkdirp": { - "version": "0.5.1", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", - "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", - "dev": true, - "requires": { - "minimist": "0.0.8" - }, - "dependencies": { - "minimist": { - "version": "0.0.8", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", - "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=", - "dev": true - } - } - }, - "ms": { - "version": "0.7.1", - "resolved": "https://registry.npmjs.org/ms/-/ms-0.7.1.tgz", - "integrity": "sha1-nNE8A62/8ltl7/3nzoZO6VIBcJg=", - "dev": true - }, - "mumath": { - "version": "3.3.4", - "resolved": "https://registry.npmjs.org/mumath/-/mumath-3.3.4.tgz", - "integrity": "sha1-SNSg8P2MrU57Mglu6JsWGmPTC78=", - "requires": { - "almost-equal": "1.1.0" - } - }, - "nopt": { - "version": "3.0.6", - "resolved": "https://registry.npmjs.org/nopt/-/nopt-3.0.6.tgz", - "integrity": "sha1-xkZdvwirzU2zWTF/eaxopkayj/k=", - "dev": true, - "requires": { - "abbrev": "1.1.0" - } - }, - "normalize-package-data": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.4.0.tgz", - "integrity": "sha512-9jjUFbTPfEy3R/ad/2oNbKtW9Hgovl5O1FvFWKkKblNXoN/Oou6+9+KKohPK13Yc3/TyunyWhJp6gvRNR/PPAw==", - "dev": true, - "requires": { - "hosted-git-info": "2.5.0", - "is-builtin-module": "1.0.0", - "semver": "5.3.0", - "validate-npm-package-license": "3.0.1" - } - }, - "number-is-nan": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz", - "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=", - "dev": true - }, - "object-assign": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", - "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=", - "dev": true - }, - "on-finished": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.3.0.tgz", - "integrity": "sha1-IPEzZIGwg811M3mSoWlxqi2QaUc=", - "dev": true, - "requires": { - "ee-first": "1.1.1" - } - }, - "once": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", - "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", - "dev": true, - "requires": { - "wrappy": "1.0.2" - } - }, - "parse-json": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-2.2.0.tgz", - "integrity": "sha1-9ID0BDTvgHQfhGkJn43qGPVaTck=", - "dev": true, - "requires": { - "error-ex": "1.3.1" - } - }, - "parseurl": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.1.tgz", - "integrity": "sha1-yKuMkiO6NIiKpkopeyiFO+wY2lY=", - "dev": true - }, - "path-exists": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-2.1.0.tgz", - "integrity": "sha1-D+tsZPD8UY2adU3V77YscCJ2H0s=", - "dev": true, - "requires": { - "pinkie-promise": "2.0.1" - } - }, - "path-is-absolute": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", - "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", - "dev": true - }, - "path-type": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/path-type/-/path-type-1.1.0.tgz", - "integrity": "sha1-WcRPfuSR2nBNpBXaWkBwuk+P5EE=", - "dev": true, - "requires": { - "graceful-fs": "4.1.11", - "pify": "2.3.0", - "pinkie-promise": "2.0.1" - } - }, - "pify": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", - "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", - "dev": true - }, - "pinkie": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/pinkie/-/pinkie-2.0.4.tgz", - "integrity": "sha1-clVrgM+g1IqXToDnckjoDtT3+HA=", - "dev": true - }, - "pinkie-promise": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/pinkie-promise/-/pinkie-promise-2.0.1.tgz", - "integrity": "sha1-ITXW36ejWMBprJsXh3YogihFD/o=", - "dev": true, - "requires": { - "pinkie": "2.0.4" - } - }, - "pseudomap": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.2.tgz", - "integrity": "sha1-8FKijacOYYkX7wqKw0wa5aaChrM=", - "dev": true - }, - "qs": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/qs/-/qs-5.1.0.tgz", - "integrity": "sha1-TZMuXH6kEcynajEtOaYGIA/VDNk=", - "dev": true - }, - "raw-body": { - "version": "2.1.7", - "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.1.7.tgz", - "integrity": "sha1-rf6s4uT7MJgFgBTQjActzFl1h3Q=", - "dev": true, - "requires": { - "bytes": "2.4.0", - "iconv-lite": "0.4.13", - "unpipe": "1.0.0" - }, - "dependencies": { - "bytes": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/bytes/-/bytes-2.4.0.tgz", - "integrity": "sha1-fZcZb51br39pNeJZhVSe3SpsIzk=", - "dev": true - }, - "iconv-lite": { - "version": "0.4.13", - "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.13.tgz", - "integrity": "sha1-H4irpKsLFQjoMSrMOTRfNumS4vI=", - "dev": true - } - } - }, - "read-pkg": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-1.1.0.tgz", - "integrity": "sha1-9f+qXs0pyzHAR0vKfXVra7KePyg=", - "dev": true, - "requires": { - "load-json-file": "1.1.0", - "normalize-package-data": "2.4.0", - "path-type": "1.1.0" - } - }, - "read-pkg-up": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-1.0.1.tgz", - "integrity": "sha1-nWPBMnbAZZGNV/ACpX9AobZD+wI=", - "dev": true, - "requires": { - "find-up": "1.1.2", - "read-pkg": "1.1.0" - } - }, - "redent": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/redent/-/redent-1.0.0.tgz", - "integrity": "sha1-z5Fqsf1fHxbfsggi3W7H9zDCr94=", - "dev": true, - "requires": { - "indent-string": "2.1.0", - "strip-indent": "1.0.1" - } - }, - "repeating": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/repeating/-/repeating-2.0.1.tgz", - "integrity": "sha1-UhTFOpJtNVJwdSf7q0FdvAjQbdo=", - "dev": true, - "requires": { - "is-finite": "1.0.2" - } - }, - "requizzle": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/requizzle/-/requizzle-0.2.1.tgz", - "integrity": "sha1-aUPDUwxNmn5G8c3dUcFY/GcM294=", - "dev": true, - "requires": { - "underscore": "1.6.0" - }, - "dependencies": { - "underscore": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.6.0.tgz", - "integrity": "sha1-izixDKze9jM3uLJOT/htRa6lKag=", - "dev": true - } - } - }, - "resolve": { - "version": "1.1.7", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.1.7.tgz", - "integrity": "sha1-IDEU2CrSxe2ejgQRs5ModeiJ6Xs=", - "dev": true - }, - "rimraf": { - "version": "2.2.8", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.2.8.tgz", - "integrity": "sha1-5Dm+Kq7jJzIZUnMPmaiSnk/FBYI=", - "dev": true - }, - "semver": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.3.0.tgz", - "integrity": "sha1-myzl094C0XxgEq0yaqa00M9U+U8=", - "dev": true - }, - "signal-exit": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz", - "integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=", - "dev": true - }, - "spdx-correct": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-1.0.2.tgz", - "integrity": "sha1-SzBz2TP/UfORLwOsVRlJikFQ20A=", - "dev": true, - "requires": { - "spdx-license-ids": "1.2.2" - } - }, - "spdx-expression-parse": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-1.0.4.tgz", - "integrity": "sha1-m98vIOH0DtRH++JzJmGR/O1RYmw=", - "dev": true - }, - "spdx-license-ids": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-1.2.2.tgz", - "integrity": "sha1-yd96NCRZSt5r0RkA1ZZpbcBrrFc=", - "dev": true - }, - "sprintf-js": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", - "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=", - "dev": true - }, - "statuses": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.3.1.tgz", - "integrity": "sha1-+vUbnrdKrvOzrPStX2Gr8ky3uT4=", - "dev": true - }, - "strip-ansi": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", - "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", - "dev": true, - "requires": { - "ansi-regex": "2.1.1" - } - }, - "strip-bom": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-2.0.0.tgz", - "integrity": "sha1-YhmoVhZSBJHzV4i9vxRHqZx+aw4=", - "dev": true, - "requires": { - "is-utf8": "0.2.1" - } - }, - "strip-indent": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-1.0.1.tgz", - "integrity": "sha1-DHlipq3vp7vUrDZkYKY4VSrhoKI=", - "dev": true, - "requires": { - "get-stdin": "4.0.1" - } - }, - "strip-json-comments": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", - "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=", - "dev": true - }, - "supports-color": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", - "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=", - "dev": true - }, - "taffydb": { - "version": "2.6.2", - "resolved": "https://registry.npmjs.org/taffydb/-/taffydb-2.6.2.tgz", - "integrity": "sha1-fLy2S1oUG2ou/CxdLGe04VCyomg=", - "dev": true - }, - "tiny-lr": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/tiny-lr/-/tiny-lr-0.2.1.tgz", - "integrity": "sha1-s/26gC5dVqM8L28QeUsy5Hescp0=", - "dev": true, - "requires": { - "body-parser": "1.14.2", - "debug": "2.2.0", - "faye-websocket": "0.10.0", - "livereload-js": "2.2.2", - "parseurl": "1.3.1", - "qs": "5.1.0" - } - }, - "trim-newlines": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/trim-newlines/-/trim-newlines-1.0.0.tgz", - "integrity": "sha1-WIeWa7WCpFA6QetST301ARgVphM=", - "dev": true - }, - "type-is": { - "version": "1.6.15", - "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.15.tgz", - "integrity": "sha1-yrEPtJCeRByChC6v4a1kbIGARBA=", - "dev": true, - "requires": { - "media-typer": "0.3.0", - "mime-types": "2.1.15" - } - }, - "underscore": { - "version": "1.8.3", - "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.8.3.tgz", - "integrity": "sha1-Tz+1OxBuYJf8+ctBCfKl6b36UCI=", - "dev": true - }, - "underscore-contrib": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/underscore-contrib/-/underscore-contrib-0.3.0.tgz", - "integrity": "sha1-ZltmwkeD+PorGMn4y7Dix9SMJsc=", - "dev": true, - "requires": { - "underscore": "1.6.0" - }, - "dependencies": { - "underscore": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.6.0.tgz", - "integrity": "sha1-izixDKze9jM3uLJOT/htRa6lKag=", - "dev": true - } - } - }, - "underscore.string": { - "version": "3.2.3", - "resolved": "https://registry.npmjs.org/underscore.string/-/underscore.string-3.2.3.tgz", - "integrity": "sha1-gGmSYzZl1eX8tNsfs6hi62jp5to=", - "dev": true - }, - "unpipe": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", - "integrity": "sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw=", - "dev": true - }, - "validate-npm-package-license": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.1.tgz", - "integrity": "sha1-KAS6vnEq0zeUWaz74kdGqywwP7w=", - "dev": true, - "requires": { - "spdx-correct": "1.0.2", - "spdx-expression-parse": "1.0.4" - } - }, - "websocket-driver": { - "version": "0.6.5", - "resolved": "https://registry.npmjs.org/websocket-driver/-/websocket-driver-0.6.5.tgz", - "integrity": "sha1-XLJVbOuF9Dc8bYI4qmkchFThOjY=", - "dev": true, - "requires": { - "websocket-extensions": "0.1.1" - } - }, - "websocket-extensions": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/websocket-extensions/-/websocket-extensions-0.1.1.tgz", - "integrity": "sha1-domUmcGEtu91Q3fC27DNbLVdKec=", - "dev": true - }, - "which": { - "version": "1.2.14", - "resolved": "https://registry.npmjs.org/which/-/which-1.2.14.tgz", - "integrity": "sha1-mofEN48D6CfOyvGs31bHNsAcFOU=", - "dev": true, - "requires": { - "isexe": "2.0.0" - } - }, - "wrappy": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", - "dev": true - }, - "xmlcreate": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/xmlcreate/-/xmlcreate-1.0.2.tgz", - "integrity": "sha1-+mv3YqYKQT+z3Y9LA8WyaSONMI8=", - "dev": true - }, - "yallist": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-2.1.2.tgz", - "integrity": "sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI=", - "dev": true - } - } -} diff --git a/node_modules/homey-meshdriver/package.json b/node_modules/homey-meshdriver/package.json index ec1a1cd..9875c3a 100644 --- a/node_modules/homey-meshdriver/package.json +++ b/node_modules/homey-meshdriver/package.json @@ -1,24 +1,48 @@ { - "name": "homey-meshdriver", - "version": "1.2.4", - "description": "", - "main": "index.js", - "scripts": { - "test": "echo \"Error: no test specified\" && exit 1", - "updateDocs": "npm install --only=dev; grunt jsdoc" + "_from": "git+https://github.com/athombv/node-homey-meshdriver.git", + "_id": "homey-meshdriver@1.2.7", + "_inBundle": false, + "_location": "/homey-meshdriver", + "_phantomChildren": {}, + "_requested": { + "type": "git", + "raw": "homey-meshdriver@git+https://github.com/athombv/node-homey-meshdriver.git", + "name": "homey-meshdriver", + "escapedName": "homey-meshdriver", + "rawSpec": "git+https://github.com/athombv/node-homey-meshdriver.git", + "saveSpec": "git+https://github.com/athombv/node-homey-meshdriver.git", + "fetchSpec": "https://github.com/athombv/node-homey-meshdriver.git", + "gitCommittish": null }, + "_requiredBy": [ + "#USER", + "/" + ], + "_resolved": "git+https://github.com/athombv/node-homey-meshdriver.git#588a09ed1caf91bbe9e1a048bd30b1c328baa73b", + "_spec": "homey-meshdriver@git+https://github.com/athombv/node-homey-meshdriver.git", + "_where": "D:\\Projects\\Homey\\com.sensative", "author": "", - "license": "ISC", - "devDependencies": { - "grunt": "^1.0.1", - "grunt-contrib-watch": "^1.0.0", - "grunt-jsdoc": "^2.1.0" - }, + "bundleDependencies": false, "config": { "npmPublishTagProduction": "latest", "npmPublishTagStaging": "beta" }, "dependencies": { "color-space": "^1.14.7" - } + }, + "deprecated": false, + "description": "This module is used to make the creation of Z-Wave & ZigBee apps easier.", + "devDependencies": { + "grunt": "^1.0.1", + "grunt-contrib-watch": "^1.0.0", + "grunt-jsdoc": "^2.2.1" + }, + "license": "ISC", + "main": "index.js", + "name": "homey-meshdriver", + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1", + "updateDocs": "npm install --only=dev; grunt jsdoc" + }, + "version": "1.2.7" } diff --git a/node_modules/hsluv/README.md b/node_modules/hsluv/README.md new file mode 100644 index 0000000..b03c468 --- /dev/null +++ b/node_modules/hsluv/README.md @@ -0,0 +1,74 @@ +# HSLuv - Human-friendly HSL + +## Installation + +Client-side: download [the latest hsluv.min.js](https://github.com/hsluv/hsluv/tree/master/javascript/dist). + +Once this module is loaded in the browser, you can access it via the +global ``window.hsluv``. + +Server-side: ``npm install hsluv``. + +## Usage + +Most functions take tuples, ie: Javascript arrays with three elements. Make sure you are using +`func([a,b,c])` and not `func(a,b,c)`. If you are getting NaN for output then this is probably +the problem. + +**hsluvToHex([hue, saturation, lightness])** + +*hue* is a number between 0 and 360, *saturation* and *lightness* are +numbers between 0 and 100. This function returns the resulting color as +a hex string. + +**hsluvToRgb([hue, saturation, lightness])** + +Like above, but returns an array of 3 numbers between 0 and 1, for the +r, g, and b channel. + +**hexToHsluv(hex)** + +Takes a hex string and returns the HSLuv color as array that contains +the hue (0-360), saturation (0-100) and lightness (0-100) channel. +_Note:_ The result can have rounding errors. For example saturation can +be 100.00000000000007 + +**rgbToHsluv([red, green, blue])** + +Like above, but *red*, *green* and *blue* are passed as numbers between +0 and 1. + +Use **hpluvToHex**, **hpluvToRgb**, **hexToHpluv** and **rgbToHpluv** for +the pastel variant (HPLuv). Note that HPLuv does not contain all the colors +of RGB, so converting arbitrary RGB to it may generate invalid HPLuv colors. + +For advance use cases, additional functions are avalible: + +**hsluvToLch**, **lchToHsluv** + +**hpluvToLch**, **lchToHpluv** + +**rgbToXyz**, **xyzToRgb** + +**rgbToLch**, **lchToRgb** + +**luvToXyz**, **xyzToLuv** + +**lchToLuv**, **luvToLch** + +Also available for [Stylus](http://stylus-lang.com/). See +[here](https://github.com/hsluv/hsluv-stylus). + +## Changelog + +### 0.0.3 + +- Expose intermediate functions in the public API. + +### 0.0.2 + +- Improve packaging and minification. + +### 0.0.1 + +- Initial release under the name HSLuv. Old releases can be found [here](https://www.npmjs.com/package/husl). diff --git a/node_modules/hsluv/hsluv.js b/node_modules/hsluv/hsluv.js new file mode 100644 index 0000000..270b9bb --- /dev/null +++ b/node_modules/hsluv/hsluv.js @@ -0,0 +1,329 @@ +// Generated by Haxe 3.4.4 +var hsluv = hsluv || {}; +hsluv.Geometry = function() { }; +hsluv.Geometry.intersectLineLine = function(a,b) { + var x = (a.intercept - b.intercept) / (b.slope - a.slope); + var y = a.slope * x + a.intercept; + return { x : x, y : y}; +}; +hsluv.Geometry.distanceFromOrigin = function(point) { + return Math.sqrt(Math.pow(point.x,2) + Math.pow(point.y,2)); +}; +hsluv.Geometry.distanceLineFromOrigin = function(line) { + return Math.abs(line.intercept) / Math.sqrt(Math.pow(line.slope,2) + 1); +}; +hsluv.Geometry.perpendicularThroughPoint = function(line,point) { + var slope = -1 / line.slope; + var intercept = point.y - slope * point.x; + return { slope : slope, intercept : intercept}; +}; +hsluv.Geometry.angleFromOrigin = function(point) { + return Math.atan2(point.y,point.x); +}; +hsluv.Geometry.normalizeAngle = function(angle) { + var m = 2 * Math.PI; + return (angle % m + m) % m; +}; +hsluv.Geometry.lengthOfRayUntilIntersect = function(theta,line) { + return line.intercept / (Math.sin(theta) - line.slope * Math.cos(theta)); +}; +hsluv.Hsluv = function() { }; +hsluv.Hsluv.getBounds = function(L) { + var result = []; + var sub1 = Math.pow(L + 16,3) / 1560896; + var sub2 = sub1 > hsluv.Hsluv.epsilon ? sub1 : L / hsluv.Hsluv.kappa; + var _g = 0; + while(_g < 3) { + var c = _g++; + var m1 = hsluv.Hsluv.m[c][0]; + var m2 = hsluv.Hsluv.m[c][1]; + var m3 = hsluv.Hsluv.m[c][2]; + var _g1 = 0; + while(_g1 < 2) { + var t = _g1++; + var top1 = (284517 * m1 - 94839 * m3) * sub2; + var top2 = (838422 * m3 + 769860 * m2 + 731718 * m1) * L * sub2 - 769860 * t * L; + var bottom = (632260 * m3 - 126452 * m2) * sub2 + 126452 * t; + result.push({ slope : top1 / bottom, intercept : top2 / bottom}); + } + } + return result; +}; +hsluv.Hsluv.maxSafeChromaForL = function(L) { + var bounds = hsluv.Hsluv.getBounds(L); + var min = Infinity; + var _g = 0; + while(_g < bounds.length) { + var bound = bounds[_g]; + ++_g; + var length = hsluv.Geometry.distanceLineFromOrigin(bound); + min = Math.min(min,length); + } + return min; +}; +hsluv.Hsluv.maxChromaForLH = function(L,H) { + var hrad = H / 360 * Math.PI * 2; + var bounds = hsluv.Hsluv.getBounds(L); + var min = Infinity; + var _g = 0; + while(_g < bounds.length) { + var bound = bounds[_g]; + ++_g; + var length = hsluv.Geometry.lengthOfRayUntilIntersect(hrad,bound); + if(length >= 0) { + min = Math.min(min,length); + } + } + return min; +}; +hsluv.Hsluv.dotProduct = function(a,b) { + var sum = 0; + var _g1 = 0; + var _g = a.length; + while(_g1 < _g) { + var i = _g1++; + sum += a[i] * b[i]; + } + return sum; +}; +hsluv.Hsluv.fromLinear = function(c) { + if(c <= 0.0031308) { + return 12.92 * c; + } else { + return 1.055 * Math.pow(c,0.416666666666666685) - 0.055; + } +}; +hsluv.Hsluv.toLinear = function(c) { + if(c > 0.04045) { + return Math.pow((c + 0.055) / 1.055,2.4); + } else { + return c / 12.92; + } +}; +hsluv.Hsluv.xyzToRgb = function(tuple) { + return [hsluv.Hsluv.fromLinear(hsluv.Hsluv.dotProduct(hsluv.Hsluv.m[0],tuple)),hsluv.Hsluv.fromLinear(hsluv.Hsluv.dotProduct(hsluv.Hsluv.m[1],tuple)),hsluv.Hsluv.fromLinear(hsluv.Hsluv.dotProduct(hsluv.Hsluv.m[2],tuple))]; +}; +hsluv.Hsluv.rgbToXyz = function(tuple) { + var rgbl = [hsluv.Hsluv.toLinear(tuple[0]),hsluv.Hsluv.toLinear(tuple[1]),hsluv.Hsluv.toLinear(tuple[2])]; + return [hsluv.Hsluv.dotProduct(hsluv.Hsluv.minv[0],rgbl),hsluv.Hsluv.dotProduct(hsluv.Hsluv.minv[1],rgbl),hsluv.Hsluv.dotProduct(hsluv.Hsluv.minv[2],rgbl)]; +}; +hsluv.Hsluv.yToL = function(Y) { + if(Y <= hsluv.Hsluv.epsilon) { + return Y / hsluv.Hsluv.refY * hsluv.Hsluv.kappa; + } else { + return 116 * Math.pow(Y / hsluv.Hsluv.refY,0.333333333333333315) - 16; + } +}; +hsluv.Hsluv.lToY = function(L) { + if(L <= 8) { + return hsluv.Hsluv.refY * L / hsluv.Hsluv.kappa; + } else { + return hsluv.Hsluv.refY * Math.pow((L + 16) / 116,3); + } +}; +hsluv.Hsluv.xyzToLuv = function(tuple) { + var X = tuple[0]; + var Y = tuple[1]; + var Z = tuple[2]; + var divider = X + 15 * Y + 3 * Z; + var varU = 4 * X; + var varV = 9 * Y; + if(divider != 0) { + varU /= divider; + varV /= divider; + } else { + varU = NaN; + varV = NaN; + } + var L = hsluv.Hsluv.yToL(Y); + if(L == 0) { + return [0,0,0]; + } + var U = 13 * L * (varU - hsluv.Hsluv.refU); + var V = 13 * L * (varV - hsluv.Hsluv.refV); + return [L,U,V]; +}; +hsluv.Hsluv.luvToXyz = function(tuple) { + var L = tuple[0]; + var U = tuple[1]; + var V = tuple[2]; + if(L == 0) { + return [0,0,0]; + } + var varU = U / (13 * L) + hsluv.Hsluv.refU; + var varV = V / (13 * L) + hsluv.Hsluv.refV; + var Y = hsluv.Hsluv.lToY(L); + var X = 0 - 9 * Y * varU / ((varU - 4) * varV - varU * varV); + var Z = (9 * Y - 15 * varV * Y - varV * X) / (3 * varV); + return [X,Y,Z]; +}; +hsluv.Hsluv.luvToLch = function(tuple) { + var L = tuple[0]; + var U = tuple[1]; + var V = tuple[2]; + var C = Math.sqrt(U * U + V * V); + var H; + if(C < 0.00000001) { + H = 0; + } else { + var Hrad = Math.atan2(V,U); + H = Hrad * 180.0 / Math.PI; + if(H < 0) { + H = 360 + H; + } + } + return [L,C,H]; +}; +hsluv.Hsluv.lchToLuv = function(tuple) { + var L = tuple[0]; + var C = tuple[1]; + var H = tuple[2]; + var Hrad = H / 360.0 * 2 * Math.PI; + var U = Math.cos(Hrad) * C; + var V = Math.sin(Hrad) * C; + return [L,U,V]; +}; +hsluv.Hsluv.hsluvToLch = function(tuple) { + var H = tuple[0]; + var S = tuple[1]; + var L = tuple[2]; + if(L > 99.9999999) { + return [100,0,H]; + } + if(L < 0.00000001) { + return [0,0,H]; + } + var max = hsluv.Hsluv.maxChromaForLH(L,H); + var C = max / 100 * S; + return [L,C,H]; +}; +hsluv.Hsluv.lchToHsluv = function(tuple) { + var L = tuple[0]; + var C = tuple[1]; + var H = tuple[2]; + if(L > 99.9999999) { + return [H,0,100]; + } + if(L < 0.00000001) { + return [H,0,0]; + } + var max = hsluv.Hsluv.maxChromaForLH(L,H); + var S = C / max * 100; + return [H,S,L]; +}; +hsluv.Hsluv.hpluvToLch = function(tuple) { + var H = tuple[0]; + var S = tuple[1]; + var L = tuple[2]; + if(L > 99.9999999) { + return [100,0,H]; + } + if(L < 0.00000001) { + return [0,0,H]; + } + var max = hsluv.Hsluv.maxSafeChromaForL(L); + var C = max / 100 * S; + return [L,C,H]; +}; +hsluv.Hsluv.lchToHpluv = function(tuple) { + var L = tuple[0]; + var C = tuple[1]; + var H = tuple[2]; + if(L > 99.9999999) { + return [H,0,100]; + } + if(L < 0.00000001) { + return [H,0,0]; + } + var max = hsluv.Hsluv.maxSafeChromaForL(L); + var S = C / max * 100; + return [H,S,L]; +}; +hsluv.Hsluv.rgbToHex = function(tuple) { + var h = "#"; + var _g = 0; + while(_g < 3) { + var i = _g++; + var chan = tuple[i]; + var c = Math.round(chan * 255); + var digit2 = c % 16; + var digit1 = (c - digit2) / 16 | 0; + h += hsluv.Hsluv.hexChars.charAt(digit1) + hsluv.Hsluv.hexChars.charAt(digit2); + } + return h; +}; +hsluv.Hsluv.hexToRgb = function(hex) { + hex = hex.toLowerCase(); + var ret = []; + var _g = 0; + while(_g < 3) { + var i = _g++; + var digit1 = hsluv.Hsluv.hexChars.indexOf(hex.charAt(i * 2 + 1)); + var digit2 = hsluv.Hsluv.hexChars.indexOf(hex.charAt(i * 2 + 2)); + var n = digit1 * 16 + digit2; + ret.push(n / 255.0); + } + return ret; +}; +hsluv.Hsluv.lchToRgb = function(tuple) { + return hsluv.Hsluv.xyzToRgb(hsluv.Hsluv.luvToXyz(hsluv.Hsluv.lchToLuv(tuple))); +}; +hsluv.Hsluv.rgbToLch = function(tuple) { + return hsluv.Hsluv.luvToLch(hsluv.Hsluv.xyzToLuv(hsluv.Hsluv.rgbToXyz(tuple))); +}; +hsluv.Hsluv.hsluvToRgb = function(tuple) { + return hsluv.Hsluv.lchToRgb(hsluv.Hsluv.hsluvToLch(tuple)); +}; +hsluv.Hsluv.rgbToHsluv = function(tuple) { + return hsluv.Hsluv.lchToHsluv(hsluv.Hsluv.rgbToLch(tuple)); +}; +hsluv.Hsluv.hpluvToRgb = function(tuple) { + return hsluv.Hsluv.lchToRgb(hsluv.Hsluv.hpluvToLch(tuple)); +}; +hsluv.Hsluv.rgbToHpluv = function(tuple) { + return hsluv.Hsluv.lchToHpluv(hsluv.Hsluv.rgbToLch(tuple)); +}; +hsluv.Hsluv.hsluvToHex = function(tuple) { + return hsluv.Hsluv.rgbToHex(hsluv.Hsluv.hsluvToRgb(tuple)); +}; +hsluv.Hsluv.hpluvToHex = function(tuple) { + return hsluv.Hsluv.rgbToHex(hsluv.Hsluv.hpluvToRgb(tuple)); +}; +hsluv.Hsluv.hexToHsluv = function(s) { + return hsluv.Hsluv.rgbToHsluv(hsluv.Hsluv.hexToRgb(s)); +}; +hsluv.Hsluv.hexToHpluv = function(s) { + return hsluv.Hsluv.rgbToHpluv(hsluv.Hsluv.hexToRgb(s)); +}; +hsluv.Hsluv.m = [[3.240969941904521,-1.537383177570093,-0.498610760293],[-0.96924363628087,1.87596750150772,0.041555057407175],[0.055630079696993,-0.20397695888897,1.056971514242878]]; +hsluv.Hsluv.minv = [[0.41239079926595,0.35758433938387,0.18048078840183],[0.21263900587151,0.71516867876775,0.072192315360733],[0.019330818715591,0.11919477979462,0.95053215224966]]; +hsluv.Hsluv.refY = 1.0; +hsluv.Hsluv.refU = 0.19783000664283; +hsluv.Hsluv.refV = 0.46831999493879; +hsluv.Hsluv.kappa = 903.2962962; +hsluv.Hsluv.epsilon = 0.0088564516; +hsluv.Hsluv.hexChars = "0123456789abcdef"; +var root = { + "hsluvToRgb": hsluv.Hsluv.hsluvToRgb, + "rgbToHsluv": hsluv.Hsluv.rgbToHsluv, + "hpluvToRgb": hsluv.Hsluv.hpluvToRgb, + "rgbToHpluv": hsluv.Hsluv.rgbToHpluv, + "hsluvToHex": hsluv.Hsluv.hsluvToHex, + "hexToHsluv": hsluv.Hsluv.hexToHsluv, + "hpluvToHex": hsluv.Hsluv.hpluvToHex, + "hexToHpluv": hsluv.Hsluv.hexToHpluv, + "lchToHpluv": hsluv.Hsluv.lchToHpluv, + "hpluvToLch": hsluv.Hsluv.hpluvToLch, + "lchToHsluv": hsluv.Hsluv.lchToHsluv, + "hsluvToLch": hsluv.Hsluv.hsluvToLch, + "lchToLuv": hsluv.Hsluv.lchToLuv, + "luvToLch": hsluv.Hsluv.luvToLch, + "xyzToLuv": hsluv.Hsluv.xyzToLuv, + "luvToXyz": hsluv.Hsluv.luvToXyz, + "xyzToRgb": hsluv.Hsluv.xyzToRgb, + "rgbToXyz": hsluv.Hsluv.rgbToXyz, + "lchToRgb": hsluv.Hsluv.lchToRgb, + "rgbToLch": hsluv.Hsluv.rgbToLch +}; + +module.exports = root; diff --git a/node_modules/hsluv/package.json b/node_modules/hsluv/package.json new file mode 100644 index 0000000..c4af574 --- /dev/null +++ b/node_modules/hsluv/package.json @@ -0,0 +1,56 @@ +{ + "_from": "hsluv@^0.0.3", + "_id": "hsluv@0.0.3", + "_inBundle": false, + "_integrity": "sha1-gpEH2vtKn4tSoYCe0C4JHq3mdUw=", + "_location": "/hsluv", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "hsluv@^0.0.3", + "name": "hsluv", + "escapedName": "hsluv", + "rawSpec": "^0.0.3", + "saveSpec": null, + "fetchSpec": "^0.0.3" + }, + "_requiredBy": [ + "/color-space" + ], + "_resolved": "https://registry.npmjs.org/hsluv/-/hsluv-0.0.3.tgz", + "_shasum": "829107dafb4a9f8b52a1809ed02e091eade6754c", + "_spec": "hsluv@^0.0.3", + "_where": "D:\\Projects\\Homey\\com.sensative\\node_modules\\color-space", + "author": { + "name": "Alexei Boronine", + "email": "alexei@boronine.com" + }, + "bugs": { + "url": "https://github.com/hsluv/hsluv/issues" + }, + "bundleDependencies": false, + "deprecated": false, + "description": "Human-friendly HSL", + "files": [ + "hsluv.js" + ], + "homepage": "http://www.hsluv.org", + "keywords": [ + "color", + "color space", + "CIE", + "RGB", + "HSL", + "HSLuv", + "HPLuv" + ], + "license": "MIT", + "main": "hsluv.js", + "name": "hsluv", + "repository": { + "type": "git", + "url": "git+ssh://git@github.com/hsluv/hsluv.git" + }, + "version": "0.0.3" +} diff --git a/node_modules/husl/README.md b/node_modules/husl/README.md deleted file mode 100644 index 64a9df2..0000000 --- a/node_modules/husl/README.md +++ /dev/null @@ -1,59 +0,0 @@ -[![Build Status](https://travis-ci.org/husl-colors/husl.svg?branch=master)](https://travis-ci.org/husl-colors/husl) - -[Explanation, demo, ports etc.](http://www.husl-colors.org) - -# Usage - -Client-side: include [husl.js](https://raw.githubusercontent.com/husl-colors/husl/master/husl.js) or [husl.min.js](https://raw.githubusercontent.com/husl-colors/husl/master/husl.min.js) in your webpage, access it as a global ``HUSL`` object or as a jQuery plugin with ``$.husl``. - -Server-side: ``npm install husl``. - -**husl.toHex(hue, saturation, lightness)** - -*hue* is a number between 0 and 360, *saturation* and *lightness* are numbers between 0 and 100. This function returns the resulting color as a hex string. - -**husl.toRGB(hue, saturation, lightness)** - -Like above, but returns an array of 3 numbers between 0 and 1, for each RGB channel. - -**husl.fromHex(hex)** - -Takes a hex string and returns the HUSL color as defined above. - -**husl.fromRGB(red, green, blue)** - -Like above, but *red*, *green* and *blue* are passed as numbers between 0 and 1. - -Use **husl.p.toHex**, **husl.p.toRGB**, **husl.p.fromHex** and **husl.p.fromRGB** for the pastel variant (HUSLp). - -HUSL can also be used as a [Stylus](http://learnboost.github.com/stylus/) plugin. See [here](https://github.com/husl-colors/husl-stylus). - -# Versioning - -This repo contains the canonical implementation of HUSL, its source code being HUSL's informal specification. Following [semantic versioning](http://semver.org/), the major version must be incremented whenever the color math changes. These changes can be tested for with snapshot files. - -# Testing - -Run `npm install` and `npm test`. Try `coffee test/snapshot.coffee` to generate a JSON file of the entire gamut to be used for debugging and regression tests. The format of the file is as follows: - - { - "#000000": { - rgb: [ 0, 0, 0 ], - xyz: [ 0, 0, 0 ], - luv: [ 0, 0, 0 ], - lch: [ 0, 0, 0 ], - husl: [ 0, 0, 0 ], - huslp: [ 0, 0, 0 ] - }, - ... - } - -# License - -Copyright (C) 2014 Alexei Boronine - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/husl/husl.js b/node_modules/husl/husl.js deleted file mode 100644 index d705905..0000000 --- a/node_modules/husl/husl.js +++ /dev/null @@ -1,430 +0,0 @@ -// Generated by CoffeeScript 1.9.1 -(function() { - var L_to_Y, Y_to_L, conv, distanceFromPole, dotProduct, epsilon, fromLinear, getBounds, intersectLineLine, kappa, lengthOfRayUntilIntersect, m, m_inv, maxChromaForLH, maxSafeChromaForL, refU, refV, refX, refY, refZ, rgbPrepare, root, round, toLinear; - - m = { - R: [3.240969941904521, -1.537383177570093, -0.498610760293], - G: [-0.96924363628087, 1.87596750150772, 0.041555057407175], - B: [0.055630079696993, -0.20397695888897, 1.056971514242878] - }; - - m_inv = { - X: [0.41239079926595, 0.35758433938387, 0.18048078840183], - Y: [0.21263900587151, 0.71516867876775, 0.072192315360733], - Z: [0.019330818715591, 0.11919477979462, 0.95053215224966] - }; - - refX = 0.95045592705167; - - refY = 1.0; - - refZ = 1.089057750759878; - - refU = 0.19783000664283; - - refV = 0.46831999493879; - - kappa = 903.2962962; - - epsilon = 0.0088564516; - - getBounds = function(L) { - var bottom, channel, j, k, len1, len2, m1, m2, m3, ref, ref1, ref2, ret, sub1, sub2, t, top1, top2; - sub1 = Math.pow(L + 16, 3) / 1560896; - sub2 = sub1 > epsilon ? sub1 : L / kappa; - ret = []; - ref = ['R', 'G', 'B']; - for (j = 0, len1 = ref.length; j < len1; j++) { - channel = ref[j]; - ref1 = m[channel], m1 = ref1[0], m2 = ref1[1], m3 = ref1[2]; - ref2 = [0, 1]; - for (k = 0, len2 = ref2.length; k < len2; k++) { - t = ref2[k]; - top1 = (284517 * m1 - 94839 * m3) * sub2; - top2 = (838422 * m3 + 769860 * m2 + 731718 * m1) * L * sub2 - 769860 * t * L; - bottom = (632260 * m3 - 126452 * m2) * sub2 + 126452 * t; - ret.push([top1 / bottom, top2 / bottom]); - } - } - return ret; - }; - - intersectLineLine = function(line1, line2) { - return (line1[1] - line2[1]) / (line2[0] - line1[0]); - }; - - distanceFromPole = function(point) { - return Math.sqrt(Math.pow(point[0], 2) + Math.pow(point[1], 2)); - }; - - lengthOfRayUntilIntersect = function(theta, line) { - var b1, len, m1; - m1 = line[0], b1 = line[1]; - len = b1 / (Math.sin(theta) - m1 * Math.cos(theta)); - if (len < 0) { - return null; - } - return len; - }; - - maxSafeChromaForL = function(L) { - var b1, j, len1, lengths, m1, ref, ref1, x; - lengths = []; - ref = getBounds(L); - for (j = 0, len1 = ref.length; j < len1; j++) { - ref1 = ref[j], m1 = ref1[0], b1 = ref1[1]; - x = intersectLineLine([m1, b1], [-1 / m1, 0]); - lengths.push(distanceFromPole([x, b1 + x * m1])); - } - return Math.min.apply(Math, lengths); - }; - - maxChromaForLH = function(L, H) { - var hrad, j, l, len1, lengths, line, ref; - hrad = H / 360 * Math.PI * 2; - lengths = []; - ref = getBounds(L); - for (j = 0, len1 = ref.length; j < len1; j++) { - line = ref[j]; - l = lengthOfRayUntilIntersect(hrad, line); - if (l !== null) { - lengths.push(l); - } - } - return Math.min.apply(Math, lengths); - }; - - dotProduct = function(a, b) { - var i, j, ref, ret; - ret = 0; - for (i = j = 0, ref = a.length - 1; 0 <= ref ? j <= ref : j >= ref; i = 0 <= ref ? ++j : --j) { - ret += a[i] * b[i]; - } - return ret; - }; - - round = function(num, places) { - var n; - n = Math.pow(10, places); - return Math.round(num * n) / n; - }; - - fromLinear = function(c) { - if (c <= 0.0031308) { - return 12.92 * c; - } else { - return 1.055 * Math.pow(c, 1 / 2.4) - 0.055; - } - }; - - toLinear = function(c) { - var a; - a = 0.055; - if (c > 0.04045) { - return Math.pow((c + a) / (1 + a), 2.4); - } else { - return c / 12.92; - } - }; - - rgbPrepare = function(tuple) { - var ch, j, k, len1, len2, n, results; - tuple = (function() { - var j, len1, results; - results = []; - for (j = 0, len1 = tuple.length; j < len1; j++) { - n = tuple[j]; - results.push(round(n, 3)); - } - return results; - })(); - for (j = 0, len1 = tuple.length; j < len1; j++) { - ch = tuple[j]; - if (ch < -0.0001 || ch > 1.0001) { - throw new Error("Illegal rgb value: " + ch); - } - if (ch < 0) { - ch = 0; - } - if (ch > 1) { - ch = 1; - } - } - results = []; - for (k = 0, len2 = tuple.length; k < len2; k++) { - ch = tuple[k]; - results.push(Math.round(ch * 255)); - } - return results; - }; - - conv = { - 'xyz': {}, - 'luv': {}, - 'lch': {}, - 'husl': {}, - 'huslp': {}, - 'rgb': {}, - 'hex': {} - }; - - conv.xyz.rgb = function(tuple) { - var B, G, R; - R = fromLinear(dotProduct(m.R, tuple)); - G = fromLinear(dotProduct(m.G, tuple)); - B = fromLinear(dotProduct(m.B, tuple)); - return [R, G, B]; - }; - - conv.rgb.xyz = function(tuple) { - var B, G, R, X, Y, Z, rgbl; - R = tuple[0], G = tuple[1], B = tuple[2]; - rgbl = [toLinear(R), toLinear(G), toLinear(B)]; - X = dotProduct(m_inv.X, rgbl); - Y = dotProduct(m_inv.Y, rgbl); - Z = dotProduct(m_inv.Z, rgbl); - return [X, Y, Z]; - }; - - Y_to_L = function(Y) { - if (Y <= epsilon) { - return (Y / refY) * kappa; - } else { - return 116 * Math.pow(Y / refY, 1 / 3) - 16; - } - }; - - L_to_Y = function(L) { - if (L <= 8) { - return refY * L / kappa; - } else { - return refY * Math.pow((L + 16) / 116, 3); - } - }; - - conv.xyz.luv = function(tuple) { - var L, U, V, X, Y, Z, varU, varV; - X = tuple[0], Y = tuple[1], Z = tuple[2]; - varU = (4 * X) / (X + (15 * Y) + (3 * Z)); - varV = (9 * Y) / (X + (15 * Y) + (3 * Z)); - L = Y_to_L(Y); - if (L === 0) { - return [0, 0, 0]; - } - U = 13 * L * (varU - refU); - V = 13 * L * (varV - refV); - return [L, U, V]; - }; - - conv.luv.xyz = function(tuple) { - var L, U, V, X, Y, Z, varU, varV; - L = tuple[0], U = tuple[1], V = tuple[2]; - if (L === 0) { - return [0, 0, 0]; - } - varU = U / (13 * L) + refU; - varV = V / (13 * L) + refV; - Y = L_to_Y(L); - X = 0 - (9 * Y * varU) / ((varU - 4) * varV - varU * varV); - Z = (9 * Y - (15 * varV * Y) - (varV * X)) / (3 * varV); - return [X, Y, Z]; - }; - - conv.luv.lch = function(tuple) { - var C, H, Hrad, L, U, V; - L = tuple[0], U = tuple[1], V = tuple[2]; - C = Math.pow(Math.pow(U, 2) + Math.pow(V, 2), 1 / 2); - Hrad = Math.atan2(V, U); - H = Hrad * 360 / 2 / Math.PI; - if (H < 0) { - H = 360 + H; - } - return [L, C, H]; - }; - - conv.lch.luv = function(tuple) { - var C, H, Hrad, L, U, V; - L = tuple[0], C = tuple[1], H = tuple[2]; - Hrad = H / 360 * 2 * Math.PI; - U = Math.cos(Hrad) * C; - V = Math.sin(Hrad) * C; - return [L, U, V]; - }; - - conv.husl.lch = function(tuple) { - var C, H, L, S, max; - H = tuple[0], S = tuple[1], L = tuple[2]; - if (L > 99.9999999) { - return [100, 0, H]; - } - if (L < 0.00000001) { - return [0, 0, H]; - } - max = maxChromaForLH(L, H); - C = max / 100 * S; - return [L, C, H]; - }; - - conv.lch.husl = function(tuple) { - var C, H, L, S, max; - L = tuple[0], C = tuple[1], H = tuple[2]; - if (L > 99.9999999) { - return [H, 0, 100]; - } - if (L < 0.00000001) { - return [H, 0, 0]; - } - max = maxChromaForLH(L, H); - S = C / max * 100; - return [H, S, L]; - }; - - conv.huslp.lch = function(tuple) { - var C, H, L, S, max; - H = tuple[0], S = tuple[1], L = tuple[2]; - if (L > 99.9999999) { - return [100, 0, H]; - } - if (L < 0.00000001) { - return [0, 0, H]; - } - max = maxSafeChromaForL(L); - C = max / 100 * S; - return [L, C, H]; - }; - - conv.lch.huslp = function(tuple) { - var C, H, L, S, max; - L = tuple[0], C = tuple[1], H = tuple[2]; - if (L > 99.9999999) { - return [H, 0, 100]; - } - if (L < 0.00000001) { - return [H, 0, 0]; - } - max = maxSafeChromaForL(L); - S = C / max * 100; - return [H, S, L]; - }; - - conv.rgb.hex = function(tuple) { - var ch, hex, j, len1; - hex = "#"; - tuple = rgbPrepare(tuple); - for (j = 0, len1 = tuple.length; j < len1; j++) { - ch = tuple[j]; - ch = ch.toString(16); - if (ch.length === 1) { - ch = "0" + ch; - } - hex += ch; - } - return hex; - }; - - conv.hex.rgb = function(hex) { - var b, g, j, len1, n, r, ref, results; - if (hex.charAt(0) === "#") { - hex = hex.substring(1, 7); - } - r = hex.substring(0, 2); - g = hex.substring(2, 4); - b = hex.substring(4, 6); - ref = [r, g, b]; - results = []; - for (j = 0, len1 = ref.length; j < len1; j++) { - n = ref[j]; - results.push(parseInt(n, 16) / 255); - } - return results; - }; - - conv.lch.rgb = function(tuple) { - return conv.xyz.rgb(conv.luv.xyz(conv.lch.luv(tuple))); - }; - - conv.rgb.lch = function(tuple) { - return conv.luv.lch(conv.xyz.luv(conv.rgb.xyz(tuple))); - }; - - conv.husl.rgb = function(tuple) { - return conv.lch.rgb(conv.husl.lch(tuple)); - }; - - conv.rgb.husl = function(tuple) { - return conv.lch.husl(conv.rgb.lch(tuple)); - }; - - conv.huslp.rgb = function(tuple) { - return conv.lch.rgb(conv.huslp.lch(tuple)); - }; - - conv.rgb.huslp = function(tuple) { - return conv.lch.huslp(conv.rgb.lch(tuple)); - }; - - root = {}; - - root.fromRGB = function(R, G, B) { - return conv.rgb.husl([R, G, B]); - }; - - root.fromHex = function(hex) { - return conv.rgb.husl(conv.hex.rgb(hex)); - }; - - root.toRGB = function(H, S, L) { - return conv.husl.rgb([H, S, L]); - }; - - root.toHex = function(H, S, L) { - return conv.rgb.hex(conv.husl.rgb([H, S, L])); - }; - - root.p = {}; - - root.p.toRGB = function(H, S, L) { - return conv.xyz.rgb(conv.luv.xyz(conv.lch.luv(conv.huslp.lch([H, S, L])))); - }; - - root.p.toHex = function(H, S, L) { - return conv.rgb.hex(conv.xyz.rgb(conv.luv.xyz(conv.lch.luv(conv.huslp.lch([H, S, L]))))); - }; - - root.p.fromRGB = function(R, G, B) { - return conv.lch.huslp(conv.luv.lch(conv.xyz.luv(conv.rgb.xyz([R, G, B])))); - }; - - root.p.fromHex = function(hex) { - return conv.lch.huslp(conv.luv.lch(conv.xyz.luv(conv.rgb.xyz(conv.hex.rgb(hex))))); - }; - - root._conv = conv; - - root._round = round; - - root._rgbPrepare = rgbPrepare; - - root._getBounds = getBounds; - - root._maxChromaForLH = maxChromaForLH; - - root._maxSafeChromaForL = maxSafeChromaForL; - - if (!((typeof module !== "undefined" && module !== null) || (typeof jQuery !== "undefined" && jQuery !== null) || (typeof requirejs !== "undefined" && requirejs !== null))) { - this.HUSL = root; - } - - if (typeof module !== "undefined" && module !== null) { - module.exports = root; - } - - if (typeof jQuery !== "undefined" && jQuery !== null) { - jQuery.husl = root; - } - - if ((typeof requirejs !== "undefined" && requirejs !== null) && (typeof define !== "undefined" && define !== null)) { - define(root); - } - -}).call(this); diff --git a/node_modules/husl/package.json b/node_modules/husl/package.json deleted file mode 100644 index ecc2670..0000000 --- a/node_modules/husl/package.json +++ /dev/null @@ -1,63 +0,0 @@ -{ - "_from": "husl@^5.0.0", - "_id": "husl@5.0.3", - "_inBundle": false, - "_integrity": "sha1-7icqr/G+vkDfNYjtAHtw3n5nl4g=", - "_location": "/husl", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "husl@^5.0.0", - "name": "husl", - "escapedName": "husl", - "rawSpec": "^5.0.0", - "saveSpec": null, - "fetchSpec": "^5.0.0" - }, - "_requiredBy": [ - "/color-space" - ], - "_resolved": "https://registry.npmjs.org/husl/-/husl-5.0.3.tgz", - "_shasum": "ee272aaff1bebe40df3588ed007b70de7e679788", - "_spec": "husl@^5.0.0", - "_where": "/Users/robinbolscher/Development/apps/com.osram.lightify.zigbee/node_modules/color-space", - "author": { - "name": "Alexei Boronine", - "email": "alexei@boronine.com" - }, - "bugs": { - "url": "https://github.com/husl-colors/husl/issues" - }, - "bundleDependencies": false, - "deprecated": "Project renamed to HSLuv", - "description": "Replacement for the HSL color space", - "devDependencies": { - "coffee-script": "*", - "mocha": "*", - "uglify-js": "*", - "underscore": "*" - }, - "files": [ - "husl.js" - ], - "homepage": "http://www.husl-colors.org", - "keywords": [ - "color", - "color space", - "CIE", - "RGB", - "HUSL", - "HSL" - ], - "main": "husl.js", - "name": "husl", - "repository": { - "type": "git", - "url": "git+ssh://git@github.com/husl-colors/husl.git" - }, - "scripts": { - "test": "mocha --compilers coffee:coffee-script/register" - }, - "version": "5.0.3" -} diff --git a/node_modules/json-stringify-safe/package.json b/node_modules/json-stringify-safe/package.json index 6819706..587ec3e 100644 --- a/node_modules/json-stringify-safe/package.json +++ b/node_modules/json-stringify-safe/package.json @@ -1,66 +1,50 @@ { - "_args": [ - [ - "json-stringify-safe@5.0.1", - "/home/rob/Downloads/com.hue.zigbee/node_modules/raven" - ] - ], "_from": "json-stringify-safe@5.0.1", "_id": "json-stringify-safe@5.0.1", - "_inCache": true, - "_installable": true, + "_inBundle": false, + "_integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=", "_location": "/json-stringify-safe", - "_nodeVersion": "2.0.1", - "_npmUser": { - "email": "isaacs@npmjs.com", - "name": "isaacs" - }, - "_npmVersion": "2.10.0", "_phantomChildren": {}, "_requested": { - "name": "json-stringify-safe", + "type": "version", + "registry": true, "raw": "json-stringify-safe@5.0.1", + "name": "json-stringify-safe", + "escapedName": "json-stringify-safe", "rawSpec": "5.0.1", - "scope": null, - "spec": "5.0.1", - "type": "version" + "saveSpec": null, + "fetchSpec": "5.0.1" }, "_requiredBy": [ "/raven" ], "_resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", "_shasum": "1296a2d58fd45f19a0f6ce01d65701e2c735b6eb", - "_shrinkwrap": null, "_spec": "json-stringify-safe@5.0.1", - "_where": "/home/rob/Downloads/com.hue.zigbee/node_modules/raven", + "_where": "D:\\Projects\\Homey\\com.sensative\\node_modules\\raven", "author": { - "email": "i@izs.me", "name": "Isaac Z. Schlueter", + "email": "i@izs.me", "url": "http://blog.izs.me" }, "bugs": { "url": "https://github.com/isaacs/json-stringify-safe/issues" }, + "bundleDependencies": false, "contributors": [ { - "email": "andri@dot.ee", "name": "Andri Möll", + "email": "andri@dot.ee", "url": "http://themoll.com" } ], - "dependencies": {}, + "deprecated": false, "description": "Like JSON.stringify, but doesn't blow up on circular refs.", "devDependencies": { "mocha": ">= 2.1.0 < 3", "must": ">= 0.12 < 0.13", "sinon": ">= 1.12.2 < 2" }, - "directories": {}, - "dist": { - "shasum": "1296a2d58fd45f19a0f6ce01d65701e2c735b6eb", - "tarball": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz" - }, - "gitHead": "3890dceab3ad14f8701e38ca74f38276abc76de5", "homepage": "https://github.com/isaacs/json-stringify-safe", "keywords": [ "json", @@ -70,19 +54,7 @@ ], "license": "ISC", "main": "stringify.js", - "maintainers": [ - { - "email": "i@izs.me", - "name": "isaacs" - }, - { - "email": "andri@dot.ee", - "name": "moll" - } - ], "name": "json-stringify-safe", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", "repository": { "type": "git", "url": "git://github.com/isaacs/json-stringify-safe.git" diff --git a/node_modules/lsmod/package.json b/node_modules/lsmod/package.json index 936ec2b..24fba39 100644 --- a/node_modules/lsmod/package.json +++ b/node_modules/lsmod/package.json @@ -1,60 +1,40 @@ { - "_args": [ - [ - "lsmod@1.0.0", - "/home/rob/Downloads/com.hue.zigbee/node_modules/raven" - ] - ], "_from": "lsmod@1.0.0", "_id": "lsmod@1.0.0", - "_inCache": true, - "_installable": true, + "_inBundle": false, + "_integrity": "sha1-mgD3bco26yP6BTUK/htYXUKZ5ks=", "_location": "/lsmod", - "_nodeVersion": "6.0.0", - "_npmOperationalInternal": { - "host": "packages-12-west.internal.npmjs.com", - "tmp": "tmp/lsmod-1.0.0.tgz_1462744301549_0.14080407982692122" - }, - "_npmUser": { - "email": "shtylman@gmail.com", - "name": "defunctzombie" - }, - "_npmVersion": "3.8.6", "_phantomChildren": {}, "_requested": { - "name": "lsmod", + "type": "version", + "registry": true, "raw": "lsmod@1.0.0", + "name": "lsmod", + "escapedName": "lsmod", "rawSpec": "1.0.0", - "scope": null, - "spec": "1.0.0", - "type": "version" + "saveSpec": null, + "fetchSpec": "1.0.0" }, "_requiredBy": [ "/raven" ], "_resolved": "https://registry.npmjs.org/lsmod/-/lsmod-1.0.0.tgz", "_shasum": "9a00f76dca36eb23fa05350afe1b585d4299e64b", - "_shrinkwrap": null, "_spec": "lsmod@1.0.0", - "_where": "/home/rob/Downloads/com.hue.zigbee/node_modules/raven", + "_where": "D:\\Projects\\Homey\\com.sensative\\node_modules\\raven", "author": { - "email": "shtylman@gmail.com", - "name": "Roman Shtylman" + "name": "Roman Shtylman", + "email": "shtylman@gmail.com" }, "bugs": { "url": "https://github.com/shtylman/node-lsmod/issues" }, - "dependencies": {}, + "bundleDependencies": false, + "deprecated": false, "description": "fetch list of modules and versions installed for the project root", "devDependencies": { "mocha": "1.7.4" }, - "directories": {}, - "dist": { - "shasum": "9a00f76dca36eb23fa05350afe1b585d4299e64b", - "tarball": "https://registry.npmjs.org/lsmod/-/lsmod-1.0.0.tgz" - }, - "gitHead": "2348f08779ffc6c4f4da09e115d7cba824d559df", "homepage": "https://github.com/shtylman/node-lsmod#readme", "keywords": [ "modules", @@ -62,15 +42,7 @@ ], "license": "MIT", "main": "index.js", - "maintainers": [ - { - "email": "shtylman@gmail.com", - "name": "defunctzombie" - } - ], "name": "lsmod", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", "repository": { "type": "git", "url": "git://github.com/shtylman/node-lsmod.git" diff --git a/node_modules/mumath/package.json b/node_modules/mumath/package.json index 5221c0a..3aefe3f 100644 --- a/node_modules/mumath/package.json +++ b/node_modules/mumath/package.json @@ -1,5 +1,5 @@ { - "_from": "mumath@^3.0.0", + "_from": "mumath@^3.3.4", "_id": "mumath@3.3.4", "_inBundle": false, "_integrity": "sha1-SNSg8P2MrU57Mglu6JsWGmPTC78=", @@ -8,20 +8,20 @@ "_requested": { "type": "range", "registry": true, - "raw": "mumath@^3.0.0", + "raw": "mumath@^3.3.4", "name": "mumath", "escapedName": "mumath", - "rawSpec": "^3.0.0", + "rawSpec": "^3.3.4", "saveSpec": null, - "fetchSpec": "^3.0.0" + "fetchSpec": "^3.3.4" }, "_requiredBy": [ "/color-space" ], "_resolved": "https://registry.npmjs.org/mumath/-/mumath-3.3.4.tgz", "_shasum": "48d4a0f0fd8cad4e7b32096ee89b161a63d30bbf", - "_spec": "mumath@^3.0.0", - "_where": "/Users/robinbolscher/Development/apps/com.osram.lightify.zigbee/node_modules/color-space", + "_spec": "mumath@^3.3.4", + "_where": "D:\\Projects\\Homey\\com.sensative\\node_modules\\color-space", "author": { "name": "dfcreative" }, diff --git a/node_modules/raven/package.json b/node_modules/raven/package.json index 845c430..34a383e 100644 --- a/node_modules/raven/package.json +++ b/node_modules/raven/package.json @@ -1,45 +1,30 @@ { - "_args": [ - [ - "raven@^0.12.3", - "/home/rob/Downloads/com.hue.zigbee/node_modules/homey-log" - ] - ], - "_from": "raven@>=0.12.3 <0.13.0", + "_from": "raven@^0.12.3", "_id": "raven@0.12.3", - "_inCache": true, - "_installable": true, + "_inBundle": false, + "_integrity": "sha1-GnDwSiJA0pHYNgO0AWLEutpxMlw=", "_location": "/raven", - "_nodeVersion": "6.9.0", - "_npmOperationalInternal": { - "host": "packages-18-east.internal.npmjs.com", - "tmp": "tmp/raven-0.12.3.tgz_1479761932406_0.9727930543012917" - }, - "_npmUser": { - "email": "me@lewisjellis.com", - "name": "lewisjellis" - }, - "_npmVersion": "3.10.8", "_phantomChildren": {}, "_requested": { - "name": "raven", + "type": "range", + "registry": true, "raw": "raven@^0.12.3", + "name": "raven", + "escapedName": "raven", "rawSpec": "^0.12.3", - "scope": null, - "spec": ">=0.12.3 <0.13.0", - "type": "range" + "saveSpec": null, + "fetchSpec": "^0.12.3" }, "_requiredBy": [ "/homey-log" ], "_resolved": "https://registry.npmjs.org/raven/-/raven-0.12.3.tgz", "_shasum": "1a70f04a2240d291d83603b40162c4bada71325c", - "_shrinkwrap": null, "_spec": "raven@^0.12.3", - "_where": "/home/rob/Downloads/com.hue.zigbee/node_modules/homey-log", + "_where": "D:\\Projects\\Homey\\com.sensative\\node_modules\\homey-log", "author": { - "email": "matt@ydekproductions.com", - "name": "Matt Robenolt" + "name": "Matt Robenolt", + "email": "matt@ydekproductions.com" }, "bin": { "raven": "./bin/raven" @@ -47,6 +32,7 @@ "bugs": { "url": "https://github.com/getsentry/raven-node/issues" }, + "bundleDependencies": false, "contributors": [ { "name": "https://github.com/mattrobenolt/raven-node/graphs/contributors" @@ -59,6 +45,7 @@ "stack-trace": "0.0.9", "uuid": "3.0.0" }, + "deprecated": false, "description": "A standalone (Node.js) client for Sentry", "devDependencies": { "coffee-script": "~1.10.0", @@ -73,15 +60,9 @@ "nock": "~0.28.2", "should": "~3.3.1" }, - "directories": {}, - "dist": { - "shasum": "1a70f04a2240d291d83603b40162c4bada71325c", - "tarball": "https://registry.npmjs.org/raven/-/raven-0.12.3.tgz" - }, "engines": { "node": ">= 0.8.0" }, - "gitHead": "a20ee752eb8bf49414f20982bc6d7d3e2ffc8764", "homepage": "https://github.com/getsentry/raven-node#readme", "keywords": [ "raven", @@ -93,27 +74,7 @@ ], "license": "BSD-2-Clause", "main": "index", - "maintainers": [ - { - "email": "ben@benv.ca", - "name": "benvinegar" - }, - { - "email": "me@lewisjellis.com", - "name": "lewisjellis" - }, - { - "email": "m@robenolt.com", - "name": "mattrobenolt" - }, - { - "email": "dcramer@gmail.com", - "name": "zeeg" - } - ], "name": "raven", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", "repository": { "type": "git", "url": "git://github.com/getsentry/raven-node.git" diff --git a/node_modules/stack-trace/package.json b/node_modules/stack-trace/package.json index 0382725..a418a32 100644 --- a/node_modules/stack-trace/package.json +++ b/node_modules/stack-trace/package.json @@ -1,78 +1,49 @@ { - "_args": [ - [ - "stack-trace@0.0.9", - "/home/rob/Downloads/com.hue.zigbee/node_modules/raven" - ] - ], "_from": "stack-trace@0.0.9", "_id": "stack-trace@0.0.9", - "_inCache": true, - "_installable": true, + "_inBundle": false, + "_integrity": "sha1-qPbq7KkGdMMz58Q5U/J1tFFRBpU=", "_location": "/stack-trace", - "_npmUser": { - "email": "hoitz@komola.de", - "name": "sebastianhoitz" - }, - "_npmVersion": "1.3.24", "_phantomChildren": {}, "_requested": { - "name": "stack-trace", + "type": "version", + "registry": true, "raw": "stack-trace@0.0.9", + "name": "stack-trace", + "escapedName": "stack-trace", "rawSpec": "0.0.9", - "scope": null, - "spec": "0.0.9", - "type": "version" + "saveSpec": null, + "fetchSpec": "0.0.9" }, "_requiredBy": [ "/raven" ], "_resolved": "https://registry.npmjs.org/stack-trace/-/stack-trace-0.0.9.tgz", "_shasum": "a8f6eaeca90674c333e7c43953f275b451510695", - "_shrinkwrap": null, "_spec": "stack-trace@0.0.9", - "_where": "/home/rob/Downloads/com.hue.zigbee/node_modules/raven", + "_where": "D:\\Projects\\Homey\\com.sensative\\node_modules\\raven", "author": { - "email": "felix@debuggable.com", "name": "Felix Geisendörfer", + "email": "felix@debuggable.com", "url": "http://debuggable.com/" }, "bugs": { "url": "https://github.com/felixge/node-stack-trace/issues" }, + "bundleDependencies": false, "dependencies": {}, + "deprecated": false, "description": "Get v8 stack traces as an array of CallSite objects.", "devDependencies": { "far": "0.0.3", "long-stack-traces": "0.1.2" }, - "directories": {}, - "dist": { - "shasum": "a8f6eaeca90674c333e7c43953f275b451510695", - "tarball": "https://registry.npmjs.org/stack-trace/-/stack-trace-0.0.9.tgz" - }, "engines": { "node": "*" }, "homepage": "https://github.com/felixge/node-stack-trace", "main": "./lib/stack-trace", - "maintainers": [ - { - "email": "felix@debuggable.com", - "name": "felixge" - }, - { - "email": "tim@fostle.com", - "name": "tim-smart" - }, - { - "email": "hoitz@komola.de", - "name": "sebastianhoitz" - } - ], "name": "stack-trace", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", "repository": { "type": "git", "url": "git://github.com/felixge/node-stack-trace.git" diff --git a/node_modules/uuid/package.json b/node_modules/uuid/package.json index 12644a6..5bc4f86 100644 --- a/node_modules/uuid/package.json +++ b/node_modules/uuid/package.json @@ -1,42 +1,27 @@ { - "_args": [ - [ - "uuid@3.0.0", - "/home/rob/Downloads/com.hue.zigbee/node_modules/raven" - ] - ], "_from": "uuid@3.0.0", "_id": "uuid@3.0.0", - "_inCache": true, - "_installable": true, + "_inBundle": false, + "_integrity": "sha1-Zyj8BFnEUNeWqZwxg3VpvfZy1yg=", "_location": "/uuid", - "_nodeVersion": "6.7.0", - "_npmOperationalInternal": { - "host": "packages-18-east.internal.npmjs.com", - "tmp": "tmp/uuid-3.0.0.tgz_1479448535568_0.9578766466584057" - }, - "_npmUser": { - "email": "shtylman@gmail.com", - "name": "defunctzombie" - }, - "_npmVersion": "3.10.3", "_phantomChildren": {}, "_requested": { - "name": "uuid", + "type": "version", + "registry": true, "raw": "uuid@3.0.0", + "name": "uuid", + "escapedName": "uuid", "rawSpec": "3.0.0", - "scope": null, - "spec": "3.0.0", - "type": "version" + "saveSpec": null, + "fetchSpec": "3.0.0" }, "_requiredBy": [ "/raven" ], "_resolved": "https://registry.npmjs.org/uuid/-/uuid-3.0.0.tgz", "_shasum": "6728fc0459c450d796a99c31837569bdf672d728", - "_shrinkwrap": null, "_spec": "uuid@3.0.0", - "_where": "/home/rob/Downloads/com.hue.zigbee/node_modules/raven", + "_where": "D:\\Projects\\Homey\\com.sensative\\node_modules\\raven", "bin": { "uuid": "./bin/uuid" }, @@ -46,39 +31,34 @@ "bugs": { "url": "https://github.com/kelektiv/node-uuid/issues" }, + "bundleDependencies": false, "contributors": [ { - "email": "robert@broofa.com", - "name": "Robert Kieffer" + "name": "Robert Kieffer", + "email": "robert@broofa.com" }, { - "email": "dev@tavan.de", - "name": "Christoph Tavan" + "name": "Christoph Tavan", + "email": "dev@tavan.de" }, { - "email": "coolaj86@gmail.com", - "name": "AJ ONeal" + "name": "AJ ONeal", + "email": "coolaj86@gmail.com" }, { - "email": "vincent@zeroload.net", - "name": "Vincent Voyer" + "name": "Vincent Voyer", + "email": "vincent@zeroload.net" }, { - "email": "shtylman@gmail.com", - "name": "Roman Shtylman" + "name": "Roman Shtylman", + "email": "shtylman@gmail.com" } ], - "dependencies": {}, + "deprecated": false, "description": "RFC4122 (v1 and v4) generator", "devDependencies": { "mocha": "3.1.2" }, - "directories": {}, - "dist": { - "shasum": "6728fc0459c450d796a99c31837569bdf672d728", - "tarball": "https://registry.npmjs.org/uuid/-/uuid-3.0.0.tgz" - }, - "gitHead": "923fe4a7893c2057b608c0c74743ad5512599072", "homepage": "https://github.com/kelektiv/node-uuid#readme", "keywords": [ "uuid", @@ -87,27 +67,7 @@ ], "license": "MIT", "main": "./uuid.js", - "maintainers": [ - { - "email": "robert@broofa.com", - "name": "broofa" - }, - { - "email": "tim@fostle.com", - "name": "tim-smart" - }, - { - "email": "vincent.voyer@gmail.com", - "name": "vvo" - }, - { - "email": "shtylman@gmail.com", - "name": "defunctzombie" - } - ], "name": "uuid", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", "repository": { "type": "git", "url": "git+https://github.com/kelektiv/node-uuid.git" diff --git a/package-lock.json b/package-lock.json index 105a053..93fd5be 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,11 +1,86 @@ { - "name": "com.sensative", - "version": 2.0.0", - "lockfileVersion": 1, - "requires": true, - "dependencies": { - "homey-meshdriver": { - "version": "git+https://github.com/athombv/node-homey-meshdriver.git#d5f7804745ca5d14750d8aa65bb37709034a5470" - } - } + "name": "com.sensative", + "version": "2.0.0", + "lockfileVersion": 1, + "requires": true, + "dependencies": { + "almost-equal": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/almost-equal/-/almost-equal-1.1.0.tgz", + "integrity": "sha1-+FHGMROHV5lCdqou++jfowZszN0=" + }, + "color-space": { + "version": "1.16.0", + "resolved": "https://registry.npmjs.org/color-space/-/color-space-1.16.0.tgz", + "integrity": "sha512-A6WMiFzunQ8KEPFmj02OnnoUnqhmSaHaZ/0LVFcPTdlvm8+3aMJ5x1HRHy3bDHPkovkf4sS0f4wsVvwk71fKkg==", + "requires": { + "hsluv": "0.0.3", + "mumath": "3.3.4" + } + }, + "cookie": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.3.1.tgz", + "integrity": "sha1-5+Ch+e9DtMi6klxcWpboBtFoc7s=" + }, + "homey-log": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/homey-log/-/homey-log-1.0.5.tgz", + "integrity": "sha1-k2RU5iM5u3wxO3+m5htZasohSL8=", + "requires": { + "raven": "0.12.3" + } + }, + "homey-meshdriver": { + "version": "git+https://github.com/athombv/node-homey-meshdriver.git#588a09ed1caf91bbe9e1a048bd30b1c328baa73b", + "requires": { + "color-space": "1.16.0" + } + }, + "hsluv": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/hsluv/-/hsluv-0.0.3.tgz", + "integrity": "sha1-gpEH2vtKn4tSoYCe0C4JHq3mdUw=" + }, + "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=" + }, + "lsmod": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/lsmod/-/lsmod-1.0.0.tgz", + "integrity": "sha1-mgD3bco26yP6BTUK/htYXUKZ5ks=" + }, + "mumath": { + "version": "3.3.4", + "resolved": "https://registry.npmjs.org/mumath/-/mumath-3.3.4.tgz", + "integrity": "sha1-SNSg8P2MrU57Mglu6JsWGmPTC78=", + "requires": { + "almost-equal": "1.1.0" + } + }, + "raven": { + "version": "0.12.3", + "resolved": "https://registry.npmjs.org/raven/-/raven-0.12.3.tgz", + "integrity": "sha1-GnDwSiJA0pHYNgO0AWLEutpxMlw=", + "requires": { + "cookie": "0.3.1", + "json-stringify-safe": "5.0.1", + "lsmod": "1.0.0", + "stack-trace": "0.0.9", + "uuid": "3.0.0" + } + }, + "stack-trace": { + "version": "0.0.9", + "resolved": "https://registry.npmjs.org/stack-trace/-/stack-trace-0.0.9.tgz", + "integrity": "sha1-qPbq7KkGdMMz58Q5U/J1tFFRBpU=" + }, + "uuid": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.0.0.tgz", + "integrity": "sha1-Zyj8BFnEUNeWqZwxg3VpvfZy1yg=" + } + } } diff --git a/package.json b/package.json index 74f2870..1868113 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "com.sensative", "version": "2.0.0", - "description": "This app adds support for the Z-wave Sensative strips (http://www.sensative.com/).", + "description": "This app adds support for the Z-wave Sensative strips family (http://www.sensative.com/).", "main": "app.js", "requires": true, "dependencies": { @@ -22,5 +22,5 @@ "bugs": { "url": "https://github.com/Thorarin/com.sensative/issues" }, - "homepage": "nog te doen" + "homepage": "https://github.com/Thorarin/com.sensative/" }