diff --git a/.bash_profile b/.bash_profile new file mode 100644 index 0000000..ac94b8c --- /dev/null +++ b/.bash_profile @@ -0,0 +1 @@ +source /nvm.sh diff --git a/config.json b/config.json new file mode 100644 index 0000000..ba30215 --- /dev/null +++ b/config.json @@ -0,0 +1,273 @@ +{ + "platform": "HarmonyHubMatrix", + "ControlUnits": [ + { + "DisplayName": "Living Room", + "Activities": [ + { + "DisplayName": "Play Xbox One", + "DeviceSetupList": [ + { + "DeviceName": "Microsoft Xbox One", + "Input": [] + }, + { + "DeviceName": "LG TV", + "Input": "HDMI1" + }, + { + "DeviceName": "JVC AV Receiver", + "Input": "DVD" + } + ], + "VolumeDevice": "JVC AV Receiver", + "ControlDevice": "Microsoft Xbox One", + "OutputDevice": "LG TV", + "UseMatrix": "true" + }, + { + "DisplayName": "Play Xbox One", + "DeviceSetupList": [ + { + "DeviceName": "Microsoft Xbox One", + "Input": [] + }, + { + "DeviceName": "LG TV", + "Input": "HDMI1" + }, + { + "DeviceName": "JVC AV Receiver", + "Input": "DVD" + } + ], + "VolumeDevice": "JVC AV Receiver", + "ControlDevice": "Microsoft Xbox One", + "OutputDevice": "LG TV", + "UseMatrix": "true" + }, + { + "DisplayName": "Play PS4", + "DeviceSetupList": [ + { + "DeviceName": "Sony PS4", + "Input": [] + }, + { + "DeviceName": [], + "Input": "HDMI1" + }, + { + "DeviceName": [], + "Input": "DVD" + } + ], + "VolumeDevice": "JVC AV Receiver", + "ControlDevice": "Sony PS4", + "OutputDevice": "LG TV", + "UseMatrix": "true" + }, + { + "DisplayName": "Chromecast", + "DeviceSetupList": [ + { + "DeviceName": "LG TV", + "Input": "HDMI1" + }, + { + "DeviceName": "JVC AV Receiver", + "Input": "DVD" + }, + { + "DeviceName": "Chromecast", + "Input": [] + } + ], + "VolumeDevice": "JVC AV Receiver", + "ControlDevice": "Chromecast", + "OutputDevice": "LG TV", + "UseMatrix": "true" + }, + { + "DisplayName": "Apple TV", + "DeviceSetupList": [ + { + "DeviceName": "Apple TV Gen 4", + "Input": [] + }, + { + "DeviceName": "LG TV", + "Input": "HDMI1" + }, + { + "DeviceName": "JVC AV Receiver", + "Input": "DVD" + } + ], + "VolumeDevice": "JVC AV Receiver", + "ControlDevice": "Apple TV Gen 4", + "OutputDevice": "LG TV", + "UseMatrix": "true" + }, + { + "DisplayName": "Listen to Music", + "DeviceSetupList": [ + { + "DeviceName": "JVC AV Receiver", + "Input": "DVD" + } + ], + "VolumeDevice": "JVC AV Receiver", + "ControlDevice": [], + "OutputDevice": [], + "UseMatrix": "false" + } + ] + }, + { + "DisplayName": "Bedroom", + "Activities": [ + { + "DisplayName": "Play Xbox One", + "DeviceSetupList": [ + { + "Device": "Microsoft Xbox One", + "Input": [] + }, + { + "Device": "Vizio TV", + "Input": "HDMI1" + }, + { + "Device": "Harman Kardon AV Receiver", + "Input": "Game" + } + ], + "VolumeDevice": "Harman Kardon AV Receiver", + "ControlDevice": "Microsoft Xbox One", + "OutputDevice": "Vizio TV", + "UseMatrix": "true" + }, + { + "DisplayName": "Play PS4", + "DeviceSetupList": [ + { + "Device": "Sony PS4", + "Input": [] + }, + { + "Device": "Vizio TV", + "Input": "HDMI1" + }, + { + "Device": "Harman Kardon AV Receiver", + "Input": "DVD" + } + ], + "VolumeDevice": "Harman Kardon AV Receiver", + "ControlDevice": "Sony PS4", + "OutputDevice": "LG TV", + "UseMatrix": "true" + }, + { + "DisplayName": "Chromecast", + "DeviceSetupList": [ + { + "Device": "Vizio TV", + "Input": "HDMI1" + }, + { + "Device": "Harman Kardon AV Receiver", + "Input": "Game" + }, + { + "Device": "Chromecast", + "Input": [] + } + ], + "VolumeDevice": "Harman Kardon AV Receiver", + "ControlDevice": "Chromecast", + "OutputDevice": "Vizio TV", + "UseMatrix": "true" + }, + { + "DisplayName": "Apple TV", + "DeviceSetupList": [ + { + "Device": "Apple TV Gen 4", + "Input": [] + }, + { + "Device": "Vizio TV", + "Input": "HDMI1" + }, + { + "Device": "Harman Kardon AV Receiver", + "Input": "Game" + } + ], + "VolumeDevice": "Harman Kardon AV Receiver", + "ControlDevice": "Apple TV Gen 4", + "OutputDevice": "Vizio TV", + "UseMatrix": "true" + } + ] + }, + { + "DisplayName": "Kitchen", + "Activities": [ + { + "DisplayName": "Watch Apple Tv", + "DeviceSetupList": [ + { + "Device": "Apple TV Gen 4", + "Input": [] + }, + { + "Device": "Westinghouse TV", + "Input": "HDMI1" + } + ], + "VolumeDevice": "Westinghouse TV", + "ControlDevice": "Apple TV Gen 4", + "OutputDevice": "Westinghouse TV", + "UseMatrix": "true" + }, + { + "DisplayName": "Play Xbox One", + "DeviceSetupList": [ + { + "Device": "Westinghouse TV", + "Input": "HDMI1" + }, + { + "Device": "Microsoft Xbox One", + "Input": [] + } + ], + "VolumeDevice": "Westinghouse TV", + "ControlDevice": "Microsoft Xbox One", + "OutputDevice": "Westinghouse TV", + "UseMatrix": "true" + }, + { + "DisplayName": "Chromecast", + "DeviceSetupList": [ + { + "Device": "Chromecast", + "Input": [] + }, + { + "Device": "Westinghouse TV", + "Input": "HDMI1" + } + ], + "VolumeDevice": "Westinghouse TV", + "ControlDevice": "Chromecast", + "OutputDevice": "Westinghouse TV", + "UseMatrix": "true" + } + ] + } + ] +} \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index b5b2697..92dac8c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -8,22 +8,741 @@ "version": "7.0.0", "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.0.0.tgz", "integrity": "sha512-OfC2uemaknXr87bdLUkWog7nYuliM9Ij5HUcajsVcMCpQrcLmtxRbVFTIqmcSkSeYRBFBRxs2FiUqFJDLdiebA==", - "dev": true, "requires": { "@babel/highlight": "^7.0.0" } }, + "@babel/core": { + "version": "7.4.5", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.4.5.tgz", + "integrity": "sha512-OvjIh6aqXtlsA8ujtGKfC7LYWksYSX8yQcM8Ay3LuvVeQ63lcOKgoZWVqcpFwkd29aYU9rVx7jxhfhiEDV9MZA==", + "requires": { + "@babel/code-frame": "^7.0.0", + "@babel/generator": "^7.4.4", + "@babel/helpers": "^7.4.4", + "@babel/parser": "^7.4.5", + "@babel/template": "^7.4.4", + "@babel/traverse": "^7.4.5", + "@babel/types": "^7.4.4", + "convert-source-map": "^1.1.0", + "debug": "^4.1.0", + "json5": "^2.1.0", + "lodash": "^4.17.11", + "resolve": "^1.3.2", + "semver": "^5.4.1", + "source-map": "^0.5.0" + }, + "dependencies": { + "debug": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", + "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", + "requires": { + "ms": "^2.1.1" + } + }, + "ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" + } + } + }, + "@babel/generator": { + "version": "7.4.4", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.4.4.tgz", + "integrity": "sha512-53UOLK6TVNqKxf7RUh8NE851EHRxOOeVXKbK2bivdb+iziMyk03Sr4eaE9OELCbyZAAafAKPDwF2TPUES5QbxQ==", + "requires": { + "@babel/types": "^7.4.4", + "jsesc": "^2.5.1", + "lodash": "^4.17.11", + "source-map": "^0.5.0", + "trim-right": "^1.0.1" + } + }, + "@babel/helper-annotate-as-pure": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.0.0.tgz", + "integrity": "sha512-3UYcJUj9kvSLbLbUIfQTqzcy5VX7GRZ/CCDrnOaZorFFM01aXp1+GJwuFGV4NDDoAS+mOUyHcO6UD/RfqOks3Q==", + "requires": { + "@babel/types": "^7.0.0" + } + }, + "@babel/helper-builder-binary-assignment-operator-visitor": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/@babel/helper-builder-binary-assignment-operator-visitor/-/helper-builder-binary-assignment-operator-visitor-7.1.0.tgz", + "integrity": "sha512-qNSR4jrmJ8M1VMM9tibvyRAHXQs2PmaksQF7c1CGJNipfe3D8p+wgNwgso/P2A2r2mdgBWAXljNWR0QRZAMW8w==", + "requires": { + "@babel/helper-explode-assignable-expression": "^7.1.0", + "@babel/types": "^7.0.0" + } + }, + "@babel/helper-call-delegate": { + "version": "7.4.4", + "resolved": "https://registry.npmjs.org/@babel/helper-call-delegate/-/helper-call-delegate-7.4.4.tgz", + "integrity": "sha512-l79boDFJ8S1c5hvQvG+rc+wHw6IuH7YldmRKsYtpbawsxURu/paVy57FZMomGK22/JckepaikOkY0MoAmdyOlQ==", + "requires": { + "@babel/helper-hoist-variables": "^7.4.4", + "@babel/traverse": "^7.4.4", + "@babel/types": "^7.4.4" + } + }, + "@babel/helper-define-map": { + "version": "7.4.4", + "resolved": "https://registry.npmjs.org/@babel/helper-define-map/-/helper-define-map-7.4.4.tgz", + "integrity": "sha512-IX3Ln8gLhZpSuqHJSnTNBWGDE9kdkTEWl21A/K7PQ00tseBwbqCHTvNLHSBd9M0R5rER4h5Rsvj9vw0R5SieBg==", + "requires": { + "@babel/helper-function-name": "^7.1.0", + "@babel/types": "^7.4.4", + "lodash": "^4.17.11" + } + }, + "@babel/helper-explode-assignable-expression": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/@babel/helper-explode-assignable-expression/-/helper-explode-assignable-expression-7.1.0.tgz", + "integrity": "sha512-NRQpfHrJ1msCHtKjbzs9YcMmJZOg6mQMmGRB+hbamEdG5PNpaSm95275VD92DvJKuyl0s2sFiDmMZ+EnnvufqA==", + "requires": { + "@babel/traverse": "^7.1.0", + "@babel/types": "^7.0.0" + } + }, + "@babel/helper-function-name": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.1.0.tgz", + "integrity": "sha512-A95XEoCpb3TO+KZzJ4S/5uW5fNe26DjBGqf1o9ucyLyCmi1dXq/B3c8iaWTfBk3VvetUxl16e8tIrd5teOCfGw==", + "requires": { + "@babel/helper-get-function-arity": "^7.0.0", + "@babel/template": "^7.1.0", + "@babel/types": "^7.0.0" + } + }, + "@babel/helper-get-function-arity": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.0.0.tgz", + "integrity": "sha512-r2DbJeg4svYvt3HOS74U4eWKsUAMRH01Z1ds1zx8KNTPtpTL5JAsdFv8BNyOpVqdFhHkkRDIg5B4AsxmkjAlmQ==", + "requires": { + "@babel/types": "^7.0.0" + } + }, + "@babel/helper-hoist-variables": { + "version": "7.4.4", + "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.4.4.tgz", + "integrity": "sha512-VYk2/H/BnYbZDDg39hr3t2kKyifAm1W6zHRfhx8jGjIHpQEBv9dry7oQ2f3+J703TLu69nYdxsovl0XYfcnK4w==", + "requires": { + "@babel/types": "^7.4.4" + } + }, + "@babel/helper-member-expression-to-functions": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.0.0.tgz", + "integrity": "sha512-avo+lm/QmZlv27Zsi0xEor2fKcqWG56D5ae9dzklpIaY7cQMK5N8VSpaNVPPagiqmy7LrEjK1IWdGMOqPu5csg==", + "requires": { + "@babel/types": "^7.0.0" + } + }, + "@babel/helper-module-imports": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.0.0.tgz", + "integrity": "sha512-aP/hlLq01DWNEiDg4Jn23i+CXxW/owM4WpDLFUbpjxe4NS3BhLVZQ5i7E0ZrxuQ/vwekIeciyamgB1UIYxxM6A==", + "requires": { + "@babel/types": "^7.0.0" + } + }, + "@babel/helper-module-transforms": { + "version": "7.4.4", + "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.4.4.tgz", + "integrity": "sha512-3Z1yp8TVQf+B4ynN7WoHPKS8EkdTbgAEy0nU0rs/1Kw4pDgmvYH3rz3aI11KgxKCba2cn7N+tqzV1mY2HMN96w==", + "requires": { + "@babel/helper-module-imports": "^7.0.0", + "@babel/helper-simple-access": "^7.1.0", + "@babel/helper-split-export-declaration": "^7.4.4", + "@babel/template": "^7.4.4", + "@babel/types": "^7.4.4", + "lodash": "^4.17.11" + } + }, + "@babel/helper-optimise-call-expression": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.0.0.tgz", + "integrity": "sha512-u8nd9NQePYNQV8iPWu/pLLYBqZBa4ZaY1YWRFMuxrid94wKI1QNt67NEZ7GAe5Kc/0LLScbim05xZFWkAdrj9g==", + "requires": { + "@babel/types": "^7.0.0" + } + }, + "@babel/helper-plugin-utils": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.0.0.tgz", + "integrity": "sha512-CYAOUCARwExnEixLdB6sDm2dIJ/YgEAKDM1MOeMeZu9Ld/bDgVo8aiWrXwcY7OBh+1Ea2uUcVRcxKk0GJvW7QA==" + }, + "@babel/helper-regex": { + "version": "7.4.4", + "resolved": "https://registry.npmjs.org/@babel/helper-regex/-/helper-regex-7.4.4.tgz", + "integrity": "sha512-Y5nuB/kESmR3tKjU8Nkn1wMGEx1tjJX076HBMeL3XLQCu6vA/YRzuTW0bbb+qRnXvQGn+d6Rx953yffl8vEy7Q==", + "requires": { + "lodash": "^4.17.11" + } + }, + "@babel/helper-remap-async-to-generator": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/@babel/helper-remap-async-to-generator/-/helper-remap-async-to-generator-7.1.0.tgz", + "integrity": "sha512-3fOK0L+Fdlg8S5al8u/hWE6vhufGSn0bN09xm2LXMy//REAF8kDCrYoOBKYmA8m5Nom+sV9LyLCwrFynA8/slg==", + "requires": { + "@babel/helper-annotate-as-pure": "^7.0.0", + "@babel/helper-wrap-function": "^7.1.0", + "@babel/template": "^7.1.0", + "@babel/traverse": "^7.1.0", + "@babel/types": "^7.0.0" + } + }, + "@babel/helper-replace-supers": { + "version": "7.4.4", + "resolved": "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.4.4.tgz", + "integrity": "sha512-04xGEnd+s01nY1l15EuMS1rfKktNF+1CkKmHoErDppjAAZL+IUBZpzT748x262HF7fibaQPhbvWUl5HeSt1EXg==", + "requires": { + "@babel/helper-member-expression-to-functions": "^7.0.0", + "@babel/helper-optimise-call-expression": "^7.0.0", + "@babel/traverse": "^7.4.4", + "@babel/types": "^7.4.4" + } + }, + "@babel/helper-simple-access": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.1.0.tgz", + "integrity": "sha512-Vk+78hNjRbsiu49zAPALxTb+JUQCz1aolpd8osOF16BGnLtseD21nbHgLPGUwrXEurZgiCOUmvs3ExTu4F5x6w==", + "requires": { + "@babel/template": "^7.1.0", + "@babel/types": "^7.0.0" + } + }, + "@babel/helper-split-export-declaration": { + "version": "7.4.4", + "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.4.4.tgz", + "integrity": "sha512-Ro/XkzLf3JFITkW6b+hNxzZ1n5OQ80NvIUdmHspih1XAhtN3vPTuUFT4eQnela+2MaZ5ulH+iyP513KJrxbN7Q==", + "requires": { + "@babel/types": "^7.4.4" + } + }, + "@babel/helper-wrap-function": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@babel/helper-wrap-function/-/helper-wrap-function-7.2.0.tgz", + "integrity": "sha512-o9fP1BZLLSrYlxYEYyl2aS+Flun5gtjTIG8iln+XuEzQTs0PLagAGSXUcqruJwD5fM48jzIEggCKpIfWTcR7pQ==", + "requires": { + "@babel/helper-function-name": "^7.1.0", + "@babel/template": "^7.1.0", + "@babel/traverse": "^7.1.0", + "@babel/types": "^7.2.0" + } + }, + "@babel/helpers": { + "version": "7.4.4", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.4.4.tgz", + "integrity": "sha512-igczbR/0SeuPR8RFfC7tGrbdTbFL3QTvH6D+Z6zNxnTe//GyqmtHmDkzrqDmyZ3eSwPqB/LhyKoU5DXsp+Vp2A==", + "requires": { + "@babel/template": "^7.4.4", + "@babel/traverse": "^7.4.4", + "@babel/types": "^7.4.4" + } + }, "@babel/highlight": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.0.0.tgz", "integrity": "sha512-UFMC4ZeFC48Tpvj7C8UgLvtkaUuovQX+5xNWrsIoMG8o2z+XFKjKaN9iVmS84dPwVN00W4wPmqvYoZF3EGAsfw==", - "dev": true, "requires": { "chalk": "^2.0.0", "esutils": "^2.0.2", "js-tokens": "^4.0.0" } }, + "@babel/parser": { + "version": "7.4.5", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.4.5.tgz", + "integrity": "sha512-9mUqkL1FF5T7f0WDFfAoDdiMVPWsdD1gZYzSnaXsxUCUqzuch/8of9G3VUSNiZmMBoRxT3neyVsqeiL/ZPcjew==" + }, + "@babel/plugin-proposal-async-generator-functions": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-async-generator-functions/-/plugin-proposal-async-generator-functions-7.2.0.tgz", + "integrity": "sha512-+Dfo/SCQqrwx48ptLVGLdE39YtWRuKc/Y9I5Fy0P1DDBB9lsAHpjcEJQt+4IifuSOSTLBKJObJqMvaO1pIE8LQ==", + "requires": { + "@babel/helper-plugin-utils": "^7.0.0", + "@babel/helper-remap-async-to-generator": "^7.1.0", + "@babel/plugin-syntax-async-generators": "^7.2.0" + } + }, + "@babel/plugin-proposal-json-strings": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-json-strings/-/plugin-proposal-json-strings-7.2.0.tgz", + "integrity": "sha512-MAFV1CA/YVmYwZG0fBQyXhmj0BHCB5egZHCKWIFVv/XCxAeVGIHfos3SwDck4LvCllENIAg7xMKOG5kH0dzyUg==", + "requires": { + "@babel/helper-plugin-utils": "^7.0.0", + "@babel/plugin-syntax-json-strings": "^7.2.0" + } + }, + "@babel/plugin-proposal-object-rest-spread": { + "version": "7.4.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.4.4.tgz", + "integrity": "sha512-dMBG6cSPBbHeEBdFXeQ2QLc5gUpg4Vkaz8octD4aoW/ISO+jBOcsuxYL7bsb5WSu8RLP6boxrBIALEHgoHtO9g==", + "requires": { + "@babel/helper-plugin-utils": "^7.0.0", + "@babel/plugin-syntax-object-rest-spread": "^7.2.0" + } + }, + "@babel/plugin-proposal-optional-catch-binding": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-optional-catch-binding/-/plugin-proposal-optional-catch-binding-7.2.0.tgz", + "integrity": "sha512-mgYj3jCcxug6KUcX4OBoOJz3CMrwRfQELPQ5560F70YQUBZB7uac9fqaWamKR1iWUzGiK2t0ygzjTScZnVz75g==", + "requires": { + "@babel/helper-plugin-utils": "^7.0.0", + "@babel/plugin-syntax-optional-catch-binding": "^7.2.0" + } + }, + "@babel/plugin-proposal-unicode-property-regex": { + "version": "7.4.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-unicode-property-regex/-/plugin-proposal-unicode-property-regex-7.4.4.tgz", + "integrity": "sha512-j1NwnOqMG9mFUOH58JTFsA/+ZYzQLUZ/drqWUqxCYLGeu2JFZL8YrNC9hBxKmWtAuOCHPcRpgv7fhap09Fb4kA==", + "requires": { + "@babel/helper-plugin-utils": "^7.0.0", + "@babel/helper-regex": "^7.4.4", + "regexpu-core": "^4.5.4" + } + }, + "@babel/plugin-syntax-async-generators": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-async-generators/-/plugin-syntax-async-generators-7.2.0.tgz", + "integrity": "sha512-1ZrIRBv2t0GSlcwVoQ6VgSLpLgiN/FVQUzt9znxo7v2Ov4jJrs8RY8tv0wvDmFN3qIdMKWrmMMW6yZ0G19MfGg==", + "requires": { + "@babel/helper-plugin-utils": "^7.0.0" + } + }, + "@babel/plugin-syntax-json-strings": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-json-strings/-/plugin-syntax-json-strings-7.2.0.tgz", + "integrity": "sha512-5UGYnMSLRE1dqqZwug+1LISpA403HzlSfsg6P9VXU6TBjcSHeNlw4DxDx7LgpF+iKZoOG/+uzqoRHTdcUpiZNg==", + "requires": { + "@babel/helper-plugin-utils": "^7.0.0" + } + }, + "@babel/plugin-syntax-object-rest-spread": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-object-rest-spread/-/plugin-syntax-object-rest-spread-7.2.0.tgz", + "integrity": "sha512-t0JKGgqk2We+9may3t0xDdmneaXmyxq0xieYcKHxIsrJO64n1OiMWNUtc5gQK1PA0NpdCRrtZp4z+IUaKugrSA==", + "requires": { + "@babel/helper-plugin-utils": "^7.0.0" + } + }, + "@babel/plugin-syntax-optional-catch-binding": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-optional-catch-binding/-/plugin-syntax-optional-catch-binding-7.2.0.tgz", + "integrity": "sha512-bDe4xKNhb0LI7IvZHiA13kff0KEfaGX/Hv4lMA9+7TEc63hMNvfKo6ZFpXhKuEp+II/q35Gc4NoMeDZyaUbj9w==", + "requires": { + "@babel/helper-plugin-utils": "^7.0.0" + } + }, + "@babel/plugin-syntax-typescript": { + "version": "7.3.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.3.3.tgz", + "integrity": "sha512-dGwbSMA1YhVS8+31CnPR7LB4pcbrzcV99wQzby4uAfrkZPYZlQ7ImwdpzLqi6Z6IL02b8IAL379CaMwo0x5Lag==", + "requires": { + "@babel/helper-plugin-utils": "^7.0.0" + } + }, + "@babel/plugin-transform-arrow-functions": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-arrow-functions/-/plugin-transform-arrow-functions-7.2.0.tgz", + "integrity": "sha512-ER77Cax1+8/8jCB9fo4Ud161OZzWN5qawi4GusDuRLcDbDG+bIGYY20zb2dfAFdTRGzrfq2xZPvF0R64EHnimg==", + "requires": { + "@babel/helper-plugin-utils": "^7.0.0" + } + }, + "@babel/plugin-transform-async-to-generator": { + "version": "7.4.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-async-to-generator/-/plugin-transform-async-to-generator-7.4.4.tgz", + "integrity": "sha512-YiqW2Li8TXmzgbXw+STsSqPBPFnGviiaSp6CYOq55X8GQ2SGVLrXB6pNid8HkqkZAzOH6knbai3snhP7v0fNwA==", + "requires": { + "@babel/helper-module-imports": "^7.0.0", + "@babel/helper-plugin-utils": "^7.0.0", + "@babel/helper-remap-async-to-generator": "^7.1.0" + } + }, + "@babel/plugin-transform-block-scoped-functions": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoped-functions/-/plugin-transform-block-scoped-functions-7.2.0.tgz", + "integrity": "sha512-ntQPR6q1/NKuphly49+QiQiTN0O63uOwjdD6dhIjSWBI5xlrbUFh720TIpzBhpnrLfv2tNH/BXvLIab1+BAI0w==", + "requires": { + "@babel/helper-plugin-utils": "^7.0.0" + } + }, + "@babel/plugin-transform-block-scoping": { + "version": "7.4.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.4.4.tgz", + "integrity": "sha512-jkTUyWZcTrwxu5DD4rWz6rDB5Cjdmgz6z7M7RLXOJyCUkFBawssDGcGh8M/0FTSB87avyJI1HsTwUXp9nKA1PA==", + "requires": { + "@babel/helper-plugin-utils": "^7.0.0", + "lodash": "^4.17.11" + } + }, + "@babel/plugin-transform-classes": { + "version": "7.4.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-classes/-/plugin-transform-classes-7.4.4.tgz", + "integrity": "sha512-/e44eFLImEGIpL9qPxSRat13I5QNRgBLu2hOQJCF7VLy/otSM/sypV1+XaIw5+502RX/+6YaSAPmldk+nhHDPw==", + "requires": { + "@babel/helper-annotate-as-pure": "^7.0.0", + "@babel/helper-define-map": "^7.4.4", + "@babel/helper-function-name": "^7.1.0", + "@babel/helper-optimise-call-expression": "^7.0.0", + "@babel/helper-plugin-utils": "^7.0.0", + "@babel/helper-replace-supers": "^7.4.4", + "@babel/helper-split-export-declaration": "^7.4.4", + "globals": "^11.1.0" + } + }, + "@babel/plugin-transform-computed-properties": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-computed-properties/-/plugin-transform-computed-properties-7.2.0.tgz", + "integrity": "sha512-kP/drqTxY6Xt3NNpKiMomfgkNn4o7+vKxK2DDKcBG9sHj51vHqMBGy8wbDS/J4lMxnqs153/T3+DmCEAkC5cpA==", + "requires": { + "@babel/helper-plugin-utils": "^7.0.0" + } + }, + "@babel/plugin-transform-destructuring": { + "version": "7.4.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.4.4.tgz", + "integrity": "sha512-/aOx+nW0w8eHiEHm+BTERB2oJn5D127iye/SUQl7NjHy0lf+j7h4MKMMSOwdazGq9OxgiNADncE+SRJkCxjZpQ==", + "requires": { + "@babel/helper-plugin-utils": "^7.0.0" + } + }, + "@babel/plugin-transform-dotall-regex": { + "version": "7.4.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-dotall-regex/-/plugin-transform-dotall-regex-7.4.4.tgz", + "integrity": "sha512-P05YEhRc2h53lZDjRPk/OektxCVevFzZs2Gfjd545Wde3k+yFDbXORgl2e0xpbq8mLcKJ7Idss4fAg0zORN/zg==", + "requires": { + "@babel/helper-plugin-utils": "^7.0.0", + "@babel/helper-regex": "^7.4.4", + "regexpu-core": "^4.5.4" + } + }, + "@babel/plugin-transform-duplicate-keys": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-duplicate-keys/-/plugin-transform-duplicate-keys-7.2.0.tgz", + "integrity": "sha512-q+yuxW4DsTjNceUiTzK0L+AfQ0zD9rWaTLiUqHA8p0gxx7lu1EylenfzjeIWNkPy6e/0VG/Wjw9uf9LueQwLOw==", + "requires": { + "@babel/helper-plugin-utils": "^7.0.0" + } + }, + "@babel/plugin-transform-exponentiation-operator": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-exponentiation-operator/-/plugin-transform-exponentiation-operator-7.2.0.tgz", + "integrity": "sha512-umh4hR6N7mu4Elq9GG8TOu9M0bakvlsREEC+ialrQN6ABS4oDQ69qJv1VtR3uxlKMCQMCvzk7vr17RHKcjx68A==", + "requires": { + "@babel/helper-builder-binary-assignment-operator-visitor": "^7.1.0", + "@babel/helper-plugin-utils": "^7.0.0" + } + }, + "@babel/plugin-transform-for-of": { + "version": "7.4.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.4.4.tgz", + "integrity": "sha512-9T/5Dlr14Z9TIEXLXkt8T1DU7F24cbhwhMNUziN3hB1AXoZcdzPcTiKGRn/6iOymDqtTKWnr/BtRKN9JwbKtdQ==", + "requires": { + "@babel/helper-plugin-utils": "^7.0.0" + } + }, + "@babel/plugin-transform-function-name": { + "version": "7.4.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-function-name/-/plugin-transform-function-name-7.4.4.tgz", + "integrity": "sha512-iU9pv7U+2jC9ANQkKeNF6DrPy4GBa4NWQtl6dHB4Pb3izX2JOEvDTFarlNsBj/63ZEzNNIAMs3Qw4fNCcSOXJA==", + "requires": { + "@babel/helper-function-name": "^7.1.0", + "@babel/helper-plugin-utils": "^7.0.0" + } + }, + "@babel/plugin-transform-literals": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-literals/-/plugin-transform-literals-7.2.0.tgz", + "integrity": "sha512-2ThDhm4lI4oV7fVQ6pNNK+sx+c/GM5/SaML0w/r4ZB7sAneD/piDJtwdKlNckXeyGK7wlwg2E2w33C/Hh+VFCg==", + "requires": { + "@babel/helper-plugin-utils": "^7.0.0" + } + }, + "@babel/plugin-transform-member-expression-literals": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-member-expression-literals/-/plugin-transform-member-expression-literals-7.2.0.tgz", + "integrity": "sha512-HiU3zKkSU6scTidmnFJ0bMX8hz5ixC93b4MHMiYebmk2lUVNGOboPsqQvx5LzooihijUoLR/v7Nc1rbBtnc7FA==", + "requires": { + "@babel/helper-plugin-utils": "^7.0.0" + } + }, + "@babel/plugin-transform-modules-amd": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-amd/-/plugin-transform-modules-amd-7.2.0.tgz", + "integrity": "sha512-mK2A8ucqz1qhrdqjS9VMIDfIvvT2thrEsIQzbaTdc5QFzhDjQv2CkJJ5f6BXIkgbmaoax3zBr2RyvV/8zeoUZw==", + "requires": { + "@babel/helper-module-transforms": "^7.1.0", + "@babel/helper-plugin-utils": "^7.0.0" + } + }, + "@babel/plugin-transform-modules-commonjs": { + "version": "7.4.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.4.4.tgz", + "integrity": "sha512-4sfBOJt58sEo9a2BQXnZq+Q3ZTSAUXyK3E30o36BOGnJ+tvJ6YSxF0PG6kERvbeISgProodWuI9UVG3/FMY6iw==", + "requires": { + "@babel/helper-module-transforms": "^7.4.4", + "@babel/helper-plugin-utils": "^7.0.0", + "@babel/helper-simple-access": "^7.1.0" + } + }, + "@babel/plugin-transform-modules-systemjs": { + "version": "7.4.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.4.4.tgz", + "integrity": "sha512-MSiModfILQc3/oqnG7NrP1jHaSPryO6tA2kOMmAQApz5dayPxWiHqmq4sWH2xF5LcQK56LlbKByCd8Aah/OIkQ==", + "requires": { + "@babel/helper-hoist-variables": "^7.4.4", + "@babel/helper-plugin-utils": "^7.0.0" + } + }, + "@babel/plugin-transform-modules-umd": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-umd/-/plugin-transform-modules-umd-7.2.0.tgz", + "integrity": "sha512-BV3bw6MyUH1iIsGhXlOK6sXhmSarZjtJ/vMiD9dNmpY8QXFFQTj+6v92pcfy1iqa8DeAfJFwoxcrS/TUZda6sw==", + "requires": { + "@babel/helper-module-transforms": "^7.1.0", + "@babel/helper-plugin-utils": "^7.0.0" + } + }, + "@babel/plugin-transform-named-capturing-groups-regex": { + "version": "7.4.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-named-capturing-groups-regex/-/plugin-transform-named-capturing-groups-regex-7.4.5.tgz", + "integrity": "sha512-z7+2IsWafTBbjNsOxU/Iv5CvTJlr5w4+HGu1HovKYTtgJ362f7kBcQglkfmlspKKZ3bgrbSGvLfNx++ZJgCWsg==", + "requires": { + "regexp-tree": "^0.1.6" + } + }, + "@babel/plugin-transform-new-target": { + "version": "7.4.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-new-target/-/plugin-transform-new-target-7.4.4.tgz", + "integrity": "sha512-r1z3T2DNGQwwe2vPGZMBNjioT2scgWzK9BCnDEh+46z8EEwXBq24uRzd65I7pjtugzPSj921aM15RpESgzsSuA==", + "requires": { + "@babel/helper-plugin-utils": "^7.0.0" + } + }, + "@babel/plugin-transform-object-super": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-object-super/-/plugin-transform-object-super-7.2.0.tgz", + "integrity": "sha512-VMyhPYZISFZAqAPVkiYb7dUe2AsVi2/wCT5+wZdsNO31FojQJa9ns40hzZ6U9f50Jlq4w6qwzdBB2uwqZ00ebg==", + "requires": { + "@babel/helper-plugin-utils": "^7.0.0", + "@babel/helper-replace-supers": "^7.1.0" + } + }, + "@babel/plugin-transform-parameters": { + "version": "7.4.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.4.4.tgz", + "integrity": "sha512-oMh5DUO1V63nZcu/ZVLQFqiihBGo4OpxJxR1otF50GMeCLiRx5nUdtokd+u9SuVJrvvuIh9OosRFPP4pIPnwmw==", + "requires": { + "@babel/helper-call-delegate": "^7.4.4", + "@babel/helper-get-function-arity": "^7.0.0", + "@babel/helper-plugin-utils": "^7.0.0" + } + }, + "@babel/plugin-transform-property-literals": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-property-literals/-/plugin-transform-property-literals-7.2.0.tgz", + "integrity": "sha512-9q7Dbk4RhgcLp8ebduOpCbtjh7C0itoLYHXd9ueASKAG/is5PQtMR5VJGka9NKqGhYEGn5ITahd4h9QeBMylWQ==", + "requires": { + "@babel/helper-plugin-utils": "^7.0.0" + } + }, + "@babel/plugin-transform-regenerator": { + "version": "7.4.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.4.5.tgz", + "integrity": "sha512-gBKRh5qAaCWntnd09S8QC7r3auLCqq5DI6O0DlfoyDjslSBVqBibrMdsqO+Uhmx3+BlOmE/Kw1HFxmGbv0N9dA==", + "requires": { + "regenerator-transform": "^0.14.0" + } + }, + "@babel/plugin-transform-reserved-words": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-reserved-words/-/plugin-transform-reserved-words-7.2.0.tgz", + "integrity": "sha512-fz43fqW8E1tAB3DKF19/vxbpib1fuyCwSPE418ge5ZxILnBhWyhtPgz8eh1RCGGJlwvksHkyxMxh0eenFi+kFw==", + "requires": { + "@babel/helper-plugin-utils": "^7.0.0" + } + }, + "@babel/plugin-transform-shorthand-properties": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-shorthand-properties/-/plugin-transform-shorthand-properties-7.2.0.tgz", + "integrity": "sha512-QP4eUM83ha9zmYtpbnyjTLAGKQritA5XW/iG9cjtuOI8s1RuL/3V6a3DeSHfKutJQ+ayUfeZJPcnCYEQzaPQqg==", + "requires": { + "@babel/helper-plugin-utils": "^7.0.0" + } + }, + "@babel/plugin-transform-spread": { + "version": "7.2.2", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-spread/-/plugin-transform-spread-7.2.2.tgz", + "integrity": "sha512-KWfky/58vubwtS0hLqEnrWJjsMGaOeSBn90Ezn5Jeg9Z8KKHmELbP1yGylMlm5N6TPKeY9A2+UaSYLdxahg01w==", + "requires": { + "@babel/helper-plugin-utils": "^7.0.0" + } + }, + "@babel/plugin-transform-sticky-regex": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-sticky-regex/-/plugin-transform-sticky-regex-7.2.0.tgz", + "integrity": "sha512-KKYCoGaRAf+ckH8gEL3JHUaFVyNHKe3ASNsZ+AlktgHevvxGigoIttrEJb8iKN03Q7Eazlv1s6cx2B2cQ3Jabw==", + "requires": { + "@babel/helper-plugin-utils": "^7.0.0", + "@babel/helper-regex": "^7.0.0" + } + }, + "@babel/plugin-transform-template-literals": { + "version": "7.4.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-template-literals/-/plugin-transform-template-literals-7.4.4.tgz", + "integrity": "sha512-mQrEC4TWkhLN0z8ygIvEL9ZEToPhG5K7KDW3pzGqOfIGZ28Jb0POUkeWcoz8HnHvhFy6dwAT1j8OzqN8s804+g==", + "requires": { + "@babel/helper-annotate-as-pure": "^7.0.0", + "@babel/helper-plugin-utils": "^7.0.0" + } + }, + "@babel/plugin-transform-typeof-symbol": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-typeof-symbol/-/plugin-transform-typeof-symbol-7.2.0.tgz", + "integrity": "sha512-2LNhETWYxiYysBtrBTqL8+La0jIoQQnIScUJc74OYvUGRmkskNY4EzLCnjHBzdmb38wqtTaixpo1NctEcvMDZw==", + "requires": { + "@babel/helper-plugin-utils": "^7.0.0" + } + }, + "@babel/plugin-transform-typescript": { + "version": "7.4.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-typescript/-/plugin-transform-typescript-7.4.5.tgz", + "integrity": "sha512-RPB/YeGr4ZrFKNwfuQRlMf2lxoCUaU01MTw39/OFE/RiL8HDjtn68BwEPft1P7JN4akyEmjGWAMNldOV7o9V2g==", + "requires": { + "@babel/helper-plugin-utils": "^7.0.0", + "@babel/plugin-syntax-typescript": "^7.2.0" + } + }, + "@babel/plugin-transform-unicode-regex": { + "version": "7.4.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-regex/-/plugin-transform-unicode-regex-7.4.4.tgz", + "integrity": "sha512-il+/XdNw01i93+M9J9u4T7/e/Ue/vWfNZE4IRUQjplu2Mqb/AFTDimkw2tdEdSH50wuQXZAbXSql0UphQke+vA==", + "requires": { + "@babel/helper-plugin-utils": "^7.0.0", + "@babel/helper-regex": "^7.4.4", + "regexpu-core": "^4.5.4" + } + }, + "@babel/preset-env": { + "version": "7.4.5", + "resolved": "https://registry.npmjs.org/@babel/preset-env/-/preset-env-7.4.5.tgz", + "integrity": "sha512-f2yNVXM+FsR5V8UwcFeIHzHWgnhXg3NpRmy0ADvALpnhB0SLbCvrCRr4BLOUYbQNLS+Z0Yer46x9dJXpXewI7w==", + "requires": { + "@babel/helper-module-imports": "^7.0.0", + "@babel/helper-plugin-utils": "^7.0.0", + "@babel/plugin-proposal-async-generator-functions": "^7.2.0", + "@babel/plugin-proposal-json-strings": "^7.2.0", + "@babel/plugin-proposal-object-rest-spread": "^7.4.4", + "@babel/plugin-proposal-optional-catch-binding": "^7.2.0", + "@babel/plugin-proposal-unicode-property-regex": "^7.4.4", + "@babel/plugin-syntax-async-generators": "^7.2.0", + "@babel/plugin-syntax-json-strings": "^7.2.0", + "@babel/plugin-syntax-object-rest-spread": "^7.2.0", + "@babel/plugin-syntax-optional-catch-binding": "^7.2.0", + "@babel/plugin-transform-arrow-functions": "^7.2.0", + "@babel/plugin-transform-async-to-generator": "^7.4.4", + "@babel/plugin-transform-block-scoped-functions": "^7.2.0", + "@babel/plugin-transform-block-scoping": "^7.4.4", + "@babel/plugin-transform-classes": "^7.4.4", + "@babel/plugin-transform-computed-properties": "^7.2.0", + "@babel/plugin-transform-destructuring": "^7.4.4", + "@babel/plugin-transform-dotall-regex": "^7.4.4", + "@babel/plugin-transform-duplicate-keys": "^7.2.0", + "@babel/plugin-transform-exponentiation-operator": "^7.2.0", + "@babel/plugin-transform-for-of": "^7.4.4", + "@babel/plugin-transform-function-name": "^7.4.4", + "@babel/plugin-transform-literals": "^7.2.0", + "@babel/plugin-transform-member-expression-literals": "^7.2.0", + "@babel/plugin-transform-modules-amd": "^7.2.0", + "@babel/plugin-transform-modules-commonjs": "^7.4.4", + "@babel/plugin-transform-modules-systemjs": "^7.4.4", + "@babel/plugin-transform-modules-umd": "^7.2.0", + "@babel/plugin-transform-named-capturing-groups-regex": "^7.4.5", + "@babel/plugin-transform-new-target": "^7.4.4", + "@babel/plugin-transform-object-super": "^7.2.0", + "@babel/plugin-transform-parameters": "^7.4.4", + "@babel/plugin-transform-property-literals": "^7.2.0", + "@babel/plugin-transform-regenerator": "^7.4.5", + "@babel/plugin-transform-reserved-words": "^7.2.0", + "@babel/plugin-transform-shorthand-properties": "^7.2.0", + "@babel/plugin-transform-spread": "^7.2.0", + "@babel/plugin-transform-sticky-regex": "^7.2.0", + "@babel/plugin-transform-template-literals": "^7.4.4", + "@babel/plugin-transform-typeof-symbol": "^7.2.0", + "@babel/plugin-transform-unicode-regex": "^7.4.4", + "@babel/types": "^7.4.4", + "browserslist": "^4.6.0", + "core-js-compat": "^3.1.1", + "invariant": "^2.2.2", + "js-levenshtein": "^1.1.3", + "semver": "^5.5.0" + } + }, + "@babel/preset-typescript": { + "version": "7.3.3", + "resolved": "https://registry.npmjs.org/@babel/preset-typescript/-/preset-typescript-7.3.3.tgz", + "integrity": "sha512-mzMVuIP4lqtn4du2ynEfdO0+RYcslwrZiJHXu4MGaC1ctJiW2fyaeDrtjJGs7R/KebZ1sgowcIoWf4uRpEfKEg==", + "requires": { + "@babel/helper-plugin-utils": "^7.0.0", + "@babel/plugin-transform-typescript": "^7.3.2" + } + }, + "@babel/template": { + "version": "7.4.4", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.4.4.tgz", + "integrity": "sha512-CiGzLN9KgAvgZsnivND7rkA+AeJ9JB0ciPOD4U59GKbQP2iQl+olF1l76kJOupqidozfZ32ghwBEJDhnk9MEcw==", + "requires": { + "@babel/code-frame": "^7.0.0", + "@babel/parser": "^7.4.4", + "@babel/types": "^7.4.4" + } + }, + "@babel/traverse": { + "version": "7.4.5", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.4.5.tgz", + "integrity": "sha512-Vc+qjynwkjRmIFGxy0KYoPj4FdVDxLej89kMHFsWScq999uX+pwcX4v9mWRjW0KcAYTPAuVQl2LKP1wEVLsp+A==", + "requires": { + "@babel/code-frame": "^7.0.0", + "@babel/generator": "^7.4.4", + "@babel/helper-function-name": "^7.1.0", + "@babel/helper-split-export-declaration": "^7.4.4", + "@babel/parser": "^7.4.5", + "@babel/types": "^7.4.4", + "debug": "^4.1.0", + "globals": "^11.1.0", + "lodash": "^4.17.11" + }, + "dependencies": { + "debug": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", + "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", + "requires": { + "ms": "^2.1.1" + } + }, + "ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" + } + } + }, + "@babel/types": { + "version": "7.4.4", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.4.4.tgz", + "integrity": "sha512-dOllgYdnEFOebhkKCjzSVFqw/PmmB8pH6RGOWkY4GsboQNd47b1fBThBSwlHAq9alF9vc1M3+6oqR47R50L0tQ==", + "requires": { + "esutils": "^2.0.2", + "lodash": "^4.17.11", + "to-fast-properties": "^2.0.0" + } + }, "@types/node": { "version": "12.0.7", "resolved": "https://registry.npmjs.org/@types/node/-/node-12.0.7.tgz", @@ -49,7 +768,6 @@ "version": "3.2.1", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "dev": true, "requires": { "color-convert": "^1.9.0" } @@ -145,6 +863,16 @@ "concat-map": "0.0.1" } }, + "browserslist": { + "version": "4.6.2", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.6.2.tgz", + "integrity": "sha512-2neU/V0giQy9h3XMPwLhEY3+Ao0uHSwHvU8Q1Ea6AgLVL1sXbX3dzPrJ8NWe5Hi4PoTkCYXOtVR9rfRLI0J/8Q==", + "requires": { + "caniuse-lite": "^1.0.30000974", + "electron-to-chromium": "^1.3.150", + "node-releases": "^1.1.23" + } + }, "buffer-indexof": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/buffer-indexof/-/buffer-indexof-1.1.1.tgz", @@ -161,6 +889,11 @@ "integrity": "sha1-Jw8HbFpywC9bZaR9+Uxf46J4iS8=", "dev": true }, + "caniuse-lite": { + "version": "1.0.30000974", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30000974.tgz", + "integrity": "sha512-xc3rkNS/Zc3CmpMKuczWEdY2sZgx09BkAxfvkxlAEBTqcMHeL8QnPqhKse+5sRTi3nrw2pJwToD2WvKn1Uhvww==" + }, "caseless": { "version": "0.12.0", "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", @@ -170,7 +903,6 @@ "version": "2.4.2", "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", - "dev": true, "requires": { "ansi-styles": "^3.2.1", "escape-string-regexp": "^1.0.5", @@ -186,7 +918,6 @@ "version": "1.9.3", "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", - "dev": true, "requires": { "color-name": "1.1.3" } @@ -194,8 +925,7 @@ "color-name": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", - "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", - "dev": true + "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=" }, "combined-stream": { "version": "1.0.8", @@ -217,6 +947,36 @@ "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", "dev": true }, + "convert-source-map": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.6.0.tgz", + "integrity": "sha512-eFu7XigvxdZ1ETfbgPBohgyQ/Z++C0eEhTor0qRwBw9unw+L0/6V8wkSuGgzdThkiS5lSpdptOQPD8Ak40a+7A==", + "requires": { + "safe-buffer": "~5.1.1" + } + }, + "core-js-compat": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.1.3.tgz", + "integrity": "sha512-EP018pVhgwsKHz3YoN1hTq49aRe+h017Kjz0NQz3nXV0cCRMvH3fLQl+vEPGr4r4J5sk4sU3tUC7U1aqTCeJeA==", + "requires": { + "browserslist": "^4.6.0", + "core-js-pure": "3.1.3", + "semver": "^6.1.0" + }, + "dependencies": { + "semver": { + "version": "6.1.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.1.1.tgz", + "integrity": "sha512-rWYq2e5iYW+fFe/oPPtYJxYgjBm8sC4rmoGdUOgBB7VnwKt6HrL793l2voH1UlsyYZpJ4g0wfjnTEO1s1NP2eQ==" + } + } + }, + "core-js-pure": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/core-js-pure/-/core-js-pure-3.1.3.tgz", + "integrity": "sha512-k3JWTrcQBKqjkjI0bkfXS0lbpWPxYuHWfMMjC1VDmzU4Q58IwSbuXSo99YO/hUHlw/EB4AlfA2PVxOGkrIq6dA==" + }, "core-util-is": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", @@ -298,6 +1058,11 @@ "safer-buffer": "^2.1.0" } }, + "electron-to-chromium": { + "version": "1.3.158", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.158.tgz", + "integrity": "sha512-wJsJaWsViNQ129XPGmyO5gGs1jPMHr9vffjHAhUje1xZbEzQcqbENdvfyRD9q8UF0TgFQFCCUbaIpJarFbvsIg==" + }, "es-abstract": { "version": "1.13.0", "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.13.0.tgz", @@ -332,11 +1097,16 @@ "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", "dev": true }, + "estree-walker": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-0.6.1.tgz", + "integrity": "sha512-SqmZANLWS0mnatqbSfRP5g8OXZC12Fgg1IwNtLsyHDzJizORW4khDfjPqJZsemPWBB2uqykUah5YpQ6epsqC/w==", + "dev": true + }, "esutils": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.2.tgz", - "integrity": "sha1-Cr9PHKpbyx96nYrMbepPqqBLrJs=", - "dev": true + "integrity": "sha1-Cr9PHKpbyx96nYrMbepPqqBLrJs=" }, "extend": { "version": "3.0.2", @@ -416,6 +1186,11 @@ "path-is-absolute": "^1.0.0" } }, + "globals": { + "version": "11.12.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", + "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==" + }, "graceful-readlink": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/graceful-readlink/-/graceful-readlink-1.0.1.tgz", @@ -491,8 +1266,7 @@ "has-flag": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", - "dev": true + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=" }, "has-symbols": { "version": "1.0.0", @@ -575,6 +1349,14 @@ "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=", "dev": true }, + "invariant": { + "version": "2.2.4", + "resolved": "https://registry.npmjs.org/invariant/-/invariant-2.2.4.tgz", + "integrity": "sha512-phJfQVBuaJM5raOpJjSfkiD6BpbCE4Ns//LaXl6wGYtUBY83nWS6Rf9tXm2e8VaK60JEjYldbPif/A2B1C2gNA==", + "requires": { + "loose-envify": "^1.0.0" + } + }, "ip": { "version": "1.1.5", "resolved": "https://registry.npmjs.org/ip/-/ip-1.1.5.tgz", @@ -616,11 +1398,15 @@ "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=" }, + "js-levenshtein": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/js-levenshtein/-/js-levenshtein-1.1.6.tgz", + "integrity": "sha512-X2BB11YZtrRqY4EnQcLX5Rh373zbK4alC1FW7D7MBhL2gtcC17cTnr6DmfHZeS0s2rTHjUTMMHfG7gO8SSdw+g==" + }, "js-tokens": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", - "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", - "dev": true + "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==" }, "js-yaml": { "version": "3.13.1", @@ -637,6 +1423,11 @@ "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=" }, + "jsesc": { + "version": "2.5.2", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz", + "integrity": "sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==" + }, "json-schema": { "version": "0.2.3", "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.2.3.tgz", @@ -652,6 +1443,21 @@ "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=" }, + "json5": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/json5/-/json5-2.1.0.tgz", + "integrity": "sha512-8Mh9h6xViijj36g7Dxi+Y4S6hNGV96vcJZr/SrlHh1LR/pEn/8j/+qIBbs44YKl69Lrfctp4QD+AdWLTMqEZAQ==", + "requires": { + "minimist": "^1.2.0" + }, + "dependencies": { + "minimist": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", + "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=" + } + } + }, "jsprim": { "version": "1.4.1", "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.1.tgz", @@ -668,6 +1474,14 @@ "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.11.tgz", "integrity": "sha512-cQKh8igo5QUhZ7lg38DYWAxMvjSAKG0A8wGSVimP07SIUEK2UO+arSRKbRZWtelMtN5V0Hkwh5ryOto/SshYIg==" }, + "loose-envify": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz", + "integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==", + "requires": { + "js-tokens": "^3.0.0 || ^4.0.0" + } + }, "mime-db": { "version": "1.40.0", "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.40.0.tgz", @@ -743,6 +1557,14 @@ } } }, + "node-releases": { + "version": "1.1.23", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-1.1.23.tgz", + "integrity": "sha512-uq1iL79YjfYC0WXoHbC/z28q/9pOl8kSHaXdWmAAc8No+bDwqkZbzIJz55g/MUsPgSGm9LZ7QSUbzTcH5tz47w==", + "requires": { + "semver": "^5.3.0" + } + }, "oauth-sign": { "version": "0.9.0", "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.9.0.tgz", @@ -771,14 +1593,18 @@ "path-parse": { "version": "1.0.6", "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.6.tgz", - "integrity": "sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw==", - "dev": true + "integrity": "sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw==" }, "performance-now": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz", "integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=" }, + "private": { + "version": "0.1.8", + "resolved": "https://registry.npmjs.org/private/-/private-0.1.8.tgz", + "integrity": "sha512-VvivMrbvd2nKkiG38qjULzlc+4Vx4wm/whI9pQD35YrARNnhxeiRktSOhSukRLFNlzg6Br/cJPet5J/u19r/mg==" + }, "promise-controller": { "version": "0.3.0", "resolved": "https://registry.npmjs.org/promise-controller/-/promise-controller-0.3.0.tgz", @@ -819,6 +1645,65 @@ "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.2.tgz", "integrity": "sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA==" }, + "regenerate": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/regenerate/-/regenerate-1.4.0.tgz", + "integrity": "sha512-1G6jJVDWrt0rK99kBjvEtziZNCICAuvIPkSiUFIQxVP06RCVpq3dmDo2oi6ABpYaDYaTRr67BEhL8r1wgEZZKg==" + }, + "regenerate-unicode-properties": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/regenerate-unicode-properties/-/regenerate-unicode-properties-8.1.0.tgz", + "integrity": "sha512-LGZzkgtLY79GeXLm8Dp0BVLdQlWICzBnJz/ipWUgo59qBaZ+BHtq51P2q1uVZlppMuUAT37SDk39qUbjTWB7bA==", + "requires": { + "regenerate": "^1.4.0" + } + }, + "regenerator-transform": { + "version": "0.14.0", + "resolved": "https://registry.npmjs.org/regenerator-transform/-/regenerator-transform-0.14.0.tgz", + "integrity": "sha512-rtOelq4Cawlbmq9xuMR5gdFmv7ku/sFoB7sRiywx7aq53bc52b4j6zvH7Te1Vt/X2YveDKnCGUbioieU7FEL3w==", + "requires": { + "private": "^0.1.6" + } + }, + "regexp-tree": { + "version": "0.1.10", + "resolved": "https://registry.npmjs.org/regexp-tree/-/regexp-tree-0.1.10.tgz", + "integrity": "sha512-K1qVSbcedffwuIslMwpe6vGlj+ZXRnGkvjAtFHfDZZZuEdA/h0dxljAPu9vhUo6Rrx2U2AwJ+nSQ6hK+lrP5MQ==" + }, + "regexpu-core": { + "version": "4.5.4", + "resolved": "https://registry.npmjs.org/regexpu-core/-/regexpu-core-4.5.4.tgz", + "integrity": "sha512-BtizvGtFQKGPUcTy56o3nk1bGRp4SZOTYrDtGNlqCQufptV5IkkLN6Emw+yunAJjzf+C9FQFtvq7IoA3+oMYHQ==", + "requires": { + "regenerate": "^1.4.0", + "regenerate-unicode-properties": "^8.0.2", + "regjsgen": "^0.5.0", + "regjsparser": "^0.6.0", + "unicode-match-property-ecmascript": "^1.0.4", + "unicode-match-property-value-ecmascript": "^1.1.0" + } + }, + "regjsgen": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/regjsgen/-/regjsgen-0.5.0.tgz", + "integrity": "sha512-RnIrLhrXCX5ow/E5/Mh2O4e/oa1/jW0eaBKTSy3LaCj+M3Bqvm97GWDp2yUtzIs4LEn65zR2yiYGFqb2ApnzDA==" + }, + "regjsparser": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/regjsparser/-/regjsparser-0.6.0.tgz", + "integrity": "sha512-RQ7YyokLiQBomUJuUG8iGVvkgOLxwyZM8k6d3q5SAXpg4r5TZJZigKFvC6PpD+qQ98bCDC5YelPeA3EucDoNeQ==", + "requires": { + "jsesc": "~0.5.0" + }, + "dependencies": { + "jsesc": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-0.5.0.tgz", + "integrity": "sha1-597mbjXW/Bb3EP6R1c9p9w8IkR0=" + } + } + }, "request": { "version": "2.88.0", "resolved": "https://registry.npmjs.org/request/-/request-2.88.0.tgz", @@ -869,11 +1754,29 @@ "version": "1.11.1", "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.11.1.tgz", "integrity": "sha512-vIpgF6wfuJOZI7KKKSP+HmiKggadPQAdsp5HiC1mvqnfp0gF1vdwgBWZIdrVft9pgqoMFQN+R7BSWZiBxx+BBw==", - "dev": true, "requires": { "path-parse": "^1.0.6" } }, + "rollup-plugin-typescript": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/rollup-plugin-typescript/-/rollup-plugin-typescript-1.0.1.tgz", + "integrity": "sha512-rwJDNn9jv/NsKZuyBb/h0jsclP4CJ58qbvZt2Q9zDIGILF2LtdtvCqMOL+Gq9IVq5MTrTlHZNrn8h7VjQgd8tw==", + "dev": true, + "requires": { + "resolve": "^1.10.0", + "rollup-pluginutils": "^2.5.0" + } + }, + "rollup-pluginutils": { + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/rollup-pluginutils/-/rollup-pluginutils-2.8.1.tgz", + "integrity": "sha512-J5oAoysWar6GuZo0s+3bZ6sVZAC0pfqKz68De7ZgDi5z63jOVZn1uJL/+z1jeKHNbGII8kAyHF5q8LnxSX5lQg==", + "dev": true, + "requires": { + "estree-walker": "^0.6.1" + } + }, "safe-buffer": { "version": "5.1.2", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", @@ -887,8 +1790,12 @@ "semver": { "version": "5.7.0", "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.0.tgz", - "integrity": "sha512-Ya52jSX2u7QKghxeoFGpLwCtGlt7j0oY9DYb5apt9nPlJ42ID+ulTXESnt/qAQcoSERyZ5sl3LDIOw0nAn/5DA==", - "dev": true + "integrity": "sha512-Ya52jSX2u7QKghxeoFGpLwCtGlt7j0oY9DYb5apt9nPlJ42ID+ulTXESnt/qAQcoSERyZ5sl3LDIOw0nAn/5DA==" + }, + "source-map": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", + "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=" }, "sprintf-js": { "version": "1.0.3", @@ -936,7 +1843,6 @@ "version": "5.5.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", - "dev": true, "requires": { "has-flag": "^3.0.0" } @@ -946,6 +1852,11 @@ "resolved": "https://registry.npmjs.org/thunky/-/thunky-1.0.3.tgz", "integrity": "sha512-YwT8pjmNcAXBZqrubu22P4FYsh2D4dxRmnWBOL8Jk8bUcRUtc5326kx32tuTmFDAZtLOGEVNl8POAR8j896Iow==" }, + "to-fast-properties": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", + "integrity": "sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4=" + }, "tough-cookie": { "version": "2.4.3", "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.4.3.tgz", @@ -962,6 +1873,11 @@ } } }, + "trim-right": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/trim-right/-/trim-right-1.0.1.tgz", + "integrity": "sha1-yy4SAwZ+DI3h9hQJS5/kVwTqYAM=" + }, "tslib": { "version": "1.10.0", "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.10.0.tgz", @@ -1025,6 +1941,30 @@ "integrity": "sha512-64HkdiRv1yYZsSe4xC1WVgamNigVYjlssIoaH2HcZF0+ijsk5YK2g0G34w9wJkze8+5ow4STd22AynfO6ZYYLw==", "dev": true }, + "unicode-canonical-property-names-ecmascript": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/unicode-canonical-property-names-ecmascript/-/unicode-canonical-property-names-ecmascript-1.0.4.tgz", + "integrity": "sha512-jDrNnXWHd4oHiTZnx/ZG7gtUTVp+gCcTTKr8L0HjlwphROEW3+Him+IpvC+xcJEFegapiMZyZe02CyuOnRmbnQ==" + }, + "unicode-match-property-ecmascript": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/unicode-match-property-ecmascript/-/unicode-match-property-ecmascript-1.0.4.tgz", + "integrity": "sha512-L4Qoh15vTfntsn4P1zqnHulG0LdXgjSO035fEpdtp6YxXhMT51Q6vgM5lYdG/5X3MjS+k/Y9Xw4SFCY9IkR0rg==", + "requires": { + "unicode-canonical-property-names-ecmascript": "^1.0.4", + "unicode-property-aliases-ecmascript": "^1.0.4" + } + }, + "unicode-match-property-value-ecmascript": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/unicode-match-property-value-ecmascript/-/unicode-match-property-value-ecmascript-1.1.0.tgz", + "integrity": "sha512-hDTHvaBk3RmFzvSl0UVrUmC3PuW9wKVnpoUDYH0JDkSIovzw+J5viQmeYHxVSBptubnr7PbH2e0fnpDRQnQl5g==" + }, + "unicode-property-aliases-ecmascript": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/unicode-property-aliases-ecmascript/-/unicode-property-aliases-ecmascript-1.0.5.tgz", + "integrity": "sha512-L5RAqCfXqAwR3RriF8pM0lU0w4Ryf/GgzONwi6KnL1taJQa7x1TCxdJnILX59WIGOwR57IVxn7Nej0fz1Ny6fw==" + }, "uri-js": { "version": "4.2.2", "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.2.2.tgz", diff --git a/package.json b/package.json index df04236..be44d75 100644 --- a/package.json +++ b/package.json @@ -2,10 +2,10 @@ "name": "homebridge-harmony-control", "version": "1.0.0", "description": "Homebridge platform to control smart home equipment by room.", - "main": "index.js", + "main": "bin/index.js", "scripts": { "build": "tsc", - "test": "echo \"Error: no test specified\" && exit 1" + "prepublishOnly": "npm run build" }, "repository": { "type": "git", @@ -13,11 +13,27 @@ }, "author": "Brandon Watson", "license": "ISC", + "keywords": [ + "homebridge-plugin", + "harmony", + "websocket", + "harmonyhub", + "homekit" + ], + "engines": { + "homebridge": ">=0.4.21", + "node": ">=7.6.0" + }, "devDependencies": { + "rollup-plugin-typescript": "^1.0.1", + "tslib": "^1.10.0", "tslint": "^5.17.0", "typescript": "^3.5.1" }, "dependencies": { + "@babel/core": "^7.4.5", + "@babel/preset-env": "^7.4.5", + "@babel/preset-typescript": "^7.3.3", "@types/node": "^12.0.7", "harmony-websocket": "^1.1.0", "homebridge": "^0.4.50", diff --git a/src/Accessories/ControlUnit.ts b/src/Accessories/ControlUnit.ts new file mode 100644 index 0000000..cd8a0ee --- /dev/null +++ b/src/Accessories/ControlUnit.ts @@ -0,0 +1,82 @@ +import { Activity } from '../Models/Activity'; +import { Matrix } from '../Models/Matrix'; +import { IAccessory } from './IAccessory'; + +let Service: HAPNodeJS.Service; +let Characteristic: HAPNodeJS.Characteristic; +let Api: any; + +export interface IControlUnitProps { + displayName: string, + activities: Array, + matrix: Matrix, + api: any, + log: any, +} + +export class ControlUnit implements IAccessory { + name: string = ""; + private log: any = {}; + private displayName: string = ""; + private televisionService: HAPNodeJS.Service | undefined; + private televisionSpeakerService: HAPNodeJS.Service | undefined; + private informationService: HAPNodeJS.Service | undefined; + + constructor(props: IControlUnitProps) { + this.log = props.log; + Api = props.api; + Service = props.api.hap.Service; + Characteristic = props.api.hap.Characteristic; + this.displayName = props.displayName; + this.name = this.displayName; + + this.configureTvService(); + this.configureTvSpeakerService(); + // this.configureAccessoryInformation(); + } + + private configureTvService(): void { + this.televisionService = new Service.Television( + this.displayName, + 'tvService' + ) + + this.televisionService.setCharacteristic(Characteristic.ConfiguredName, this.displayName); + //@ts-ignore + this.televisionService.setCharacteristic(Characteristic.SleepDiscoveryMode, Characteristic.SleepDiscoveryMode.ALWAYS_DISCOVERABLE); + this.televisionService.setCharacteristic(Characteristic.ActiveIdentifier, 1); + this.televisionService.setCharacteristic(Characteristic.Active, false); + } + + private configureTvSpeakerService(): void { + this.televisionSpeakerService = new Service.TelevisionSpeaker( + this.displayName, + 'tvSpeakerService' + ); + this.televisionSpeakerService.setCharacteristic(Characteristic.Name, this.displayName); + //@ts-ignore + this.televisionSpeakerService.setCharacteristic(Characteristic.Active, Characteristic.Active.Active); + //@ts-ignore + this.televisionSpeakerService.setCharacteristic(Characteristic.VolumeControlType, Characteristic.VolumeControlType.Absolute); + this.televisionSpeakerService.subtype = this.displayName + "Volume"; + if (this.televisionService) { + //@ts-ignore + this.televisionService.addLinkedService(this.televisionSpeakerService); + } + } + + private configureAccessoryInformation(): void { + this.informationService = new Service.AccessoryInformation(this.displayName, 'information'); + this.informationService + .setCharacteristic(Characteristic.Manufacturer, 'Loftux Carwings') + .setCharacteristic(Characteristic.Model, 'Heater-Cooler') + } + + /** + * Called by homebridge to gather services for this accessory. + */ + getServices(): Array { + this.log(`${this.displayName}`) + return ([this.televisionService!, this.televisionSpeakerService!]); + } +} \ No newline at end of file diff --git a/src/Accessories/IAccessory.ts b/src/Accessories/IAccessory.ts new file mode 100644 index 0000000..77c8a8c --- /dev/null +++ b/src/Accessories/IAccessory.ts @@ -0,0 +1,10 @@ +export interface IAccessory { + /** + * Required by homebridge. + */ + name: string, + /** + * Called by homebridge to gather services. + */ + getServices(): Array, +} \ No newline at end of file diff --git a/src/Models/Activity.ts b/src/Models/Activity.ts new file mode 100644 index 0000000..9bf8d25 --- /dev/null +++ b/src/Models/Activity.ts @@ -0,0 +1,69 @@ +import { DeviceSetupItem } from './DeviceSetupItem'; +/** + * Input properties. + */ +export interface IActivityProps { + deviceList: Array, + controlDeviceId: string, + volumeDeviceId: string, + outputDeviceId: string, + displayName: string + useMatrix: boolean, +} + +/** + * Data model class to hold activity related information. + */ +export class Activity { + private _volumeDeviceId: string = ""; + private _outputDeviceId: string = ""; + private _controlDeviceId: string = ""; + private _displayName: string = ""; + private _deviceSetupItems: Array; + private _useMatrix: boolean = false; + + constructor(props: IActivityProps) { + this._controlDeviceId = props.controlDeviceId; + this._outputDeviceId = props.outputDeviceId; + this._volumeDeviceId = props.volumeDeviceId; + this._displayName = props.displayName; + this._deviceSetupItems = props.deviceList; + this._useMatrix = props.useMatrix + } + + /** + * The device associated with main control. + */ + public get controlDeviceId(): string { + return this._controlDeviceId; + }; + + /** + * The device associated with the volume control. + */ + public get volumeDeviceId(): string { + return this._volumeDeviceId + }; + + /** + * The device associated with output. + */ + public outputDeviceId(): string { + return this._outputDeviceId; + }; + + /** + * The display name of the activity. + */ + public get displayName(): string { + return this._displayName; + } + + public get deviceSetupItem(): Array { + return this._deviceSetupItems + } + + public get useMatrix(): boolean { + return this._useMatrix; + } +} \ No newline at end of file diff --git a/src/Models/DeviceSetupItem.ts b/src/Models/DeviceSetupItem.ts new file mode 100644 index 0000000..b9a311a --- /dev/null +++ b/src/Models/DeviceSetupItem.ts @@ -0,0 +1,22 @@ + +export interface IDeviceSetupItemProps { + deviceId: string, + input: string +} + +export class DeviceSetupItem { + private _deviceId: string = ""; + private _input: string = ""; + constructor(props: IDeviceSetupItemProps) { + this._deviceId = props.deviceId; + this._input = props.input; + } + + public get deviceId() { + return this._deviceId; + } + + public get input() { + return this._input; + } +} \ No newline at end of file diff --git a/src/Models/Matrix.ts b/src/Models/Matrix.ts new file mode 100644 index 0000000..dafc2ac --- /dev/null +++ b/src/Models/Matrix.ts @@ -0,0 +1,32 @@ +export interface IMatrixProps { + inputs: Array, + outputs: Array, +} + +export interface Input { + inputNumber: string, + inputDevice: string, +} + +export interface Output { + outputLetter: string, + outputDevice: string, +} + +export class Matrix { + private _inputs: Array = []; + private _outputs: Array = []; + + constructor(props: IMatrixProps) { + this._inputs = props.inputs; + this._outputs = props.outputs; + } + + public get inputs(): Array { + return this._inputs + } + + public get outputs(): Array { + return this._outputs; + } +} \ No newline at end of file diff --git a/src/Types/HAPNodeJS.d.ts b/src/Types/HAPNodeJS.d.ts new file mode 100644 index 0000000..ac9620e --- /dev/null +++ b/src/Types/HAPNodeJS.d.ts @@ -0,0 +1,456 @@ +declare namespace HAPNodeJS { + + export interface uuid { + generate(data: string): string; + isValid(UUID: string): boolean; + unparse(bug: string, offset: number): string; + } + + type EventService = "characteristic-change" | "service-configurationChange" + + export interface IEventEmitterAccessory { + addListener(event: EventService, listener: Function): this; + on(event: EventService, listener: Function): this; + once(event: EventService, listener: Function): this; + removeListener(event: EventService, listener: Function): this; + removeAllListeners(event?: EventService): this; + setMaxListeners(n: number): this; + getMaxListeners(): number; + listeners(event: EventService): Function[]; + emit(event: EventService, ...args: any[]): boolean; + listenerCount(type: string): number; + } + + export interface Service extends IEventEmitterAccessory { + new(displayName: string, UUID: string, subtype: string): Service; + + displayName: string; + UUID: string; + subtype: string; + iid: string; + characteristics: Characteristic[]; + optionalCharacteristics: Characteristic[]; + + addCharacteristic(characteristic: Characteristic | Function): Characteristic; + removeCharacteristic(characteristic: Characteristic): void; + getCharacteristic(name: string | Function): Characteristic; + testCharacteristic(name: string | Function): boolean; + setCharacteristic(name: string | Function, value: CharacteristicValue): Service; + updateCharacteristic(name: string | Function, value: CharacteristicValue): Service; + addOptionalCharacteristic(characteristic: Characteristic | Function): void; + getCharacteristicByIID(iid: string): Characteristic; + + toHAP(opt: any): JSON; + + AccessoryInformation: PredefinedService; + AirPurifier: PredefinedService; + AirQualitySensor: PredefinedService; + BatteryService: PredefinedService; + BridgeConfiguration: PredefinedService; + BridgingState: PredefinedService; + CameraControl: PredefinedService; + CameraRTPStreamManagement: PredefinedService; + CarbonDioxideSensor: PredefinedService; + CarbonMonoxideSensor: PredefinedService; + ContactSensor: PredefinedService; + Door: PredefinedService; + Doorbell: PredefinedService; + Fan: PredefinedService; + Fanv2: PredefinedService; + Faucet: PredefinedService; + FilterMaintenance: PredefinedService; + GarageDoorOpener: PredefinedService; + HeaterCooler: PredefinedService; + HumidifierDehumidifier: PredefinedService; + HumiditySensor: PredefinedService; + InputSource: PredefinedService; + IrrigationSystem: PredefinedService; + LeakSensor: PredefinedService; + LightSensor: PredefinedService; + Lightbulb: PredefinedService; + LockManagement: PredefinedService; + LockMechanism: PredefinedService; + Microphone: PredefinedService; + MotionSensor: PredefinedService; + OccupancySensor: PredefinedService; + Outlet: PredefinedService; + Pairing: PredefinedService; + ProtocolInformation: PredefinedService; + Relay: PredefinedService; + SecuritySystem: PredefinedService; + ServiceLabel: PredefinedService; + Slat: PredefinedService; + SmokeSensor: PredefinedService; + Speaker: PredefinedService; + StatefulProgrammableSwitch: PredefinedService; + StatelessProgrammableSwitch: PredefinedService; + Switch: PredefinedService; + Television: PredefinedService; + TelevisionSpeaker: PredefinedService; + TemperatureSensor: PredefinedService; + Thermostat: PredefinedService; + TimeInformation: PredefinedService; + TunneledBTLEAccessoryService: PredefinedService; + Valve: PredefinedService; + Window: PredefinedService; + WindowCovering: PredefinedService; + } + + export interface PredefinedService { + new(displayName: string, subtype: string): Service; + } + + export interface CameraSource { + + } + + type EventAccessory = "service-configurationChange" | "service-characteristic-change" | "identify" + + export interface IEventEmitterAccessory { + addListener(event: EventAccessory, listener: Function): this; + on(event: EventAccessory, listener: Function): this; + once(event: EventAccessory, listener: Function): this; + removeListener(event: EventAccessory, listener: Function): this; + removeAllListeners(event?: EventAccessory): this; + setMaxListeners(n: number): this; + getMaxListeners(): number; + listeners(event: EventAccessory): Function[]; + emit(event: EventAccessory, ...args: any[]): boolean; + listenerCount(type: string): number; + } + + export interface CharacteristicProps { + format: Characteristic.Formats; + unit: Characteristic.Units, + minValue: number, + maxValue: number, + minStep: number, + perms: Characteristic.Perms[] + } + + type EventCharacteristic = "get" | "set" + type CharacteristicValue = boolean | string | number + + export type CharacteristicGetCallback = (error: Error | null, value: T) => void + export type CharacteristicSetCallback = (error?: Error | null) => void + export type CharacteristicCallback = CharacteristicGetCallback | CharacteristicSetCallback + + export interface IEventEmitterCharacteristic { + addListener(event: EventCharacteristic, listener: CharacteristicCallback): this; + on(event: EventCharacteristic, listener: CharacteristicCallback): this; + once(event: EventCharacteristic, listener: CharacteristicCallback): this; + removeListener(event: EventCharacteristic, listener: CharacteristicCallback): this; + removeAllListeners(event?: EventCharacteristic): this; + setMaxListeners(n: number): this; + getMaxListeners(): number; + listeners(event: EventCharacteristic): CharacteristicCallback[]; + emit(event: EventCharacteristic, ...args: any[]): boolean; + listenerCount(type: string): number; + } + + export interface Characteristic extends IEventEmitterCharacteristic { + new(displayName: string, UUID: string, props?: CharacteristicProps): Characteristic; + + Formats: typeof Characteristic.Formats; + Units: typeof Characteristic.Units; + Perms: typeof Characteristic.Perms; + + setProps(props: CharacteristicProps): Characteristic + getValue(callback?: CharacteristicGetCallback, context?: any, connectionID?: string): void; + setValue(newValue: CharacteristicValue, callback?: CharacteristicSetCallback, context?: any, connectionID?: string): Characteristic; + updateValue(newValue: CharacteristicValue, callback?: () => void, context?: any): Characteristic; + getDefaultValue(): CharacteristicValue; + toHAP(opt: any): JSON; + + AccessoryFlags: Characteristic; + AccessoryIdentifier: Characteristic; + Active: Characteristic; + ActiveIdentifier: Characteristic; + AdministratorOnlyAccess: Characteristic; + AirParticulateDensity: Characteristic; + AirParticulateSize: Characteristic; + AirQuality: Characteristic; + AppMatchingIdentifier: Characteristic; + AudioFeedback: Characteristic; + BatteryLevel: Characteristic; + Brightness: Characteristic; + CarbonDioxideDetected: Characteristic; + CarbonDioxideLevel: Characteristic; + CarbonDioxidePeakLevel: Characteristic; + CarbonMonoxideDetected: Characteristic; + CarbonMonoxideLevel: Characteristic; + CarbonMonoxidePeakLevel: Characteristic; + Category: Characteristic; + ChargingState: Characteristic; + ClosedCaptions: Characteristic; + ColorTemperature: Characteristic; + ConfigureBridgedAccessory: Characteristic; + ConfigureBridgedAccessoryStatus: Characteristic; + ConfiguredName: Characteristic; + ContactSensorState: Characteristic; + CoolingThresholdTemperature: Characteristic; + CurrentAirPurifierState: Characteristic; + CurrentAmbientLightLevel: Characteristic; + CurrentDoorState: Characteristic; + CurrentFanState: Characteristic; + CurrentHeaterCoolerState: Characteristic; + CurrentHeatingCoolingState: Characteristic; + CurrentHorizontalTiltAngle: Characteristic; + CurrentHumidifierDehumidifierState: Characteristic; + CurrentMediaState: Characteristic; + CurrentPosition: Characteristic; + CurrentRelativeHumidity: Characteristic; + CurrentSlatState: Characteristic; + CurrentTemperature: Characteristic; + CurrentTiltAngle: Characteristic; + CurrentTime: Characteristic; + CurrentVerticalTiltAngle: Characteristic; + CurrentVisibilityState: Characteristic; + DayoftheWeek: Characteristic; + DigitalZoom: Characteristic; + DiscoverBridgedAccessories: Characteristic; + DiscoveredBridgedAccessories: Characteristic; + DisplayOrder: Characteristic; + FilterChangeIndication: Characteristic; + FilterLifeLevel: Characteristic; + FirmwareRevision: Characteristic; + HardwareRevision: Characteristic; + HeatingThresholdTemperature: Characteristic; + HoldPosition: Characteristic; + Hue: Characteristic; + Identifier: Characteristic; + Identify: Characteristic; + ImageMirroring: Characteristic; + ImageRotation: Characteristic; + InUse: Characteristic; + InputDeviceType: Characteristic; + InputSourceType: Characteristic; + IsConfigured: Characteristic; + LeakDetected: Characteristic; + LinkQuality: Characteristic; + LockControlPoint: Characteristic; + LockCurrentState: Characteristic; + LockLastKnownAction: Characteristic; + LockManagementAutoSecurityTimeout: Characteristic; + LockPhysicalControls: Characteristic; + LockTargetState: Characteristic; + Logs: Characteristic; + Manufacturer: Characteristic; + Model: Characteristic; + MotionDetected: Characteristic; + Mute: Characteristic; + Name: Characteristic; + NightVision: Characteristic; + NitrogenDioxideDensity: Characteristic; + ObstructionDetected: Characteristic; + OccupancyDetected: Characteristic; + On: Characteristic; + OpticalZoom: Characteristic; + OutletInUse: Characteristic; + OzoneDensity: Characteristic; + PM10Density: Characteristic; + PM2_5Density: Characteristic; + PairSetup: Characteristic; + PairVerify: Characteristic; + PairingFeatures: Characteristic; + PairingPairings: Characteristic; + PictureMode: Characteristic; + PositionState: Characteristic; + PowerModeSelection: Characteristic; + ProgramMode: Characteristic; + ProgrammableSwitchEvent: Characteristic; + ProgrammableSwitchOutputState: Characteristic; + Reachable: Characteristic; + RelativeHumidityDehumidifierThreshold: Characteristic; + RelativeHumidityHumidifierThreshold: Characteristic; + RelayControlPoint: Characteristic; + RelayEnabled: Characteristic; + RelayState: Characteristic; + RemainingDuration: Characteristic; + RemoteKey: Characteristic; + ResetFilterIndication: Characteristic; + RotationDirection: Characteristic; + RotationSpeed: Characteristic; + Saturation: Characteristic; + SecuritySystemAlarmType: Characteristic; + SecuritySystemCurrentState: Characteristic; + SecuritySystemTargetState: Characteristic; + SelectedRTPStreamConfiguration: Characteristic; + SerialNumber: Characteristic; + ServiceLabelIndex: Characteristic; + ServiceLabelNamespace: Characteristic; + SetDuration: Characteristic; + SetupEndpoints: Characteristic; + SlatType: Characteristic; + SleepDiscoveryMode: Characteristic; + SmokeDetected: Characteristic; + SoftwareRevision: Characteristic; + StatusActive: Characteristic; + StatusFault: Characteristic; + StatusJammed: Characteristic; + StatusLowBattery: Characteristic; + StatusTampered: Characteristic; + StreamingStatus: Characteristic; + SulphurDioxideDensity: Characteristic; + SupportedAudioStreamConfiguration: Characteristic; + SupportedRTPConfiguration: Characteristic; + SupportedVideoStreamConfiguration: Characteristic; + SwingMode: Characteristic; + TargetAirPurifierState: Characteristic; + TargetAirQuality: Characteristic; + TargetDoorState: Characteristic; + TargetFanState: Characteristic; + TargetHeaterCoolerState: Characteristic; + TargetHeatingCoolingState: Characteristic; + TargetHorizontalTiltAngle: Characteristic; + TargetHumidifierDehumidifierState: Characteristic; + TargetMediaState: Characteristic; + TargetPosition: Characteristic; + TargetRelativeHumidity: Characteristic; + TargetSlatState: Characteristic; + TargetTemperature: Characteristic; + TargetTiltAngle: Characteristic; + TargetVerticalTiltAngle: Characteristic; + TargetVisibilityState: Characteristic; + TemperatureDisplayUnits: Characteristic; + TimeUpdate: Characteristic; + TunnelConnectionTimeout: Characteristic; + TunneledAccessoryAdvertising: Characteristic; + TunneledAccessoryConnected: Characteristic; + TunneledAccessoryStateNumber: Characteristic; + VOCDensity: Characteristic; + ValveType: Characteristic; + Version: Characteristic; + Volume: Characteristic; + VolumeControlType: Characteristic; + VolumeSelector: Characteristic; + WaterLevel: Characteristic; + } + + + module Characteristic { + export enum Formats { + BOOL, + INT, + FLOAT, + STRING, + ARRAY, // unconfirmed + DICTIONARY, // unconfirmed + UINT8, + UINT16, + UINT32, + UINT64, + DATA, // unconfirmed + TLV8 + } + + export enum Units { + // HomeKit only defines Celsius, for Fahrenheit, it requires iOS app to do the conversion. + CELSIUS, + PERCENTAGE, + ARC_DEGREE, + LUX, + SECONDS + } + + export enum Perms { + READ, + WRITE, + NOTIFY, + HIDDEN + } + } + + export interface PublishInfo { + port: number; + username: string; + pincode: string; + category: number; + } + + export interface Accessory extends IEventEmitterAccessory { + new(displayName: string, UUID: string): Accessory; + displayName: string; + username: string; + pincode: string; + UUID: string; + aid: string; + bridged: boolean; + bridgedAccessories: Accessory[]; + reachable: boolean; + category: Accessory.Categories; + services: Service[]; + cameraSource: CameraSource; + Categories: typeof Accessory.Categories + addService(service: Service | Function): Service; + removeService(service: Service): void; + getService(name: string | Function): Service; + updateReachability(reachable: boolean): void; + addBridgedAccessory(accessory: Accessory, deferUpdate: boolean): Accessory; + addBridgedAccessories(accessories: Accessory[]): void + removeBridgedAccessory(accessory: Accessory, deferUpdate: boolean): void; + removeBridgedAccessories(accessories: Accessory[]): void; + getCharacteristicByIID(iid: string): Characteristic; + getBridgedAccessoryByAID(aid: string): Accessory; + findCharacteristic(aid: string, iid: string): Accessory; + configureCameraSource(cameraSource: CameraSource): void; + toHAP(opt: any): JSON; + publish(info: PublishInfo, allowInsecureRequest: boolean): void; + destroy(): void; + setupURI(): string; + } + + module Accessory { + export enum Categories { + OTHER = 1, + BRIDGE = 2, + FAN = 3, + GARAGE_DOOR_OPENER = 4, + LIGHTBULB = 5, + DOOR_LOCK = 6, + OUTLET = 7, + SWITCH = 8, + THERMOSTAT = 9, + SENSOR = 10, + ALARM_SYSTEM = 11, + SECURITY_SYSTEM = 11, + DOOR = 12, + WINDOW = 13, + WINDOW_COVERING = 14, + PROGRAMMABLE_SWITCH = 15, + RANGE_EXTENDER = 16, + CAMERA = 17, + IP_CAMERA = 17, + VIDEO_DOORBELL = 18, + AIR_PURIFIER = 19, + AIR_HEATER = 20, + AIR_CONDITIONER = 21, + AIR_HUMIDIFIER = 22, + AIR_DEHUMIDIFIER = 23, + APPLE_TV = 24, + SPEAKER = 26, + AIRPORT = 27, + SPRINKLER = 28, + FAUCET = 29, + SHOWER_HEAD = 30, + TELEVISION = 31, + TARGET_CONTROLLER = 32 + } + } + + export interface HAPNodeJS { + init(storagePath?: string): void, + uuid: uuid, + Accessory: Accessory, + Service: Service, + Characteristic: Characteristic + } + + +} + +declare var hapNodeJS: HAPNodeJS.HAPNodeJS; + +declare module "hap-nodejs" { + export = hapNodeJS; +} \ No newline at end of file diff --git a/src/index.ts b/src/index.ts index 6dcc021..efcb074 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,22 +1,111 @@ - -let Service: any, Characteristic: any; +import { ControlUnit } from "./Accessories/ControlUnit"; +import { Activity } from "./Models/Activity"; +import { DeviceSetupItem } from "./Models/DeviceSetupItem"; +import { Input, Output, Matrix } from "./Models/Matrix"; export default function (homebridge: any) { - Service = homebridge.hap.Service; - Characteristic = homebridge.hap.Characteristic; - homebridge.registerPlatform( 'homebridge-harmony-watson', 'HarmonyHubMatrix', - HarmonyMatrixPlatform + HarmonyMatrixPlatform, + true ); }; class HarmonyMatrixPlatform { log: any = {}; + config: any = {}; + api: any; - constructor(log: any, config: any) { + constructor(log: any, config: any, api: any) { + this.log = log; + this.config = config; + this.api = api; this.log('INFO - Registering Harmony Matrix Platform'); + } + /** + * Called by homebridge to gather accessories. + * @param callback + */ + accessories(callback: (accessories: Array) => void) { + //Parse matrix + let configInputs: any = this.config["Matrix"]["Inputs"]; + let configOutputs: any = this.config["Matrix"]["Outputs"]; + let inputs: Array = []; + let outputs: Array = []; + + configInputs.forEach((configInput: any) => { + let inputDevice: string = configInput["InputDevice"]; + let inputNumber: string = configInput["InputNumber"]; + + this.log(`INFO - Added input to matrix '${inputDevice}'`); + + inputs.push({ + inputDevice: inputDevice, + inputNumber: inputNumber + }); + }); + configOutputs.forEach((configOutput: any) => { + let outputDevice: string = configOutput["OutputDevice"]; + let outputLetter: string = configOutput["OutputLetter"]; + + this.log(`INFO - Added output to matrix '${outputDevice}'`); + + outputs.push({ + outputDevice: outputDevice, + outputLetter: outputLetter + }); + + }); + + let matrix = new Matrix({ + inputs: inputs, + outputs: outputs, + }); + + //Parse control units + let configControlUnits: any = this.config["ControlUnits"]; + let controlUnits: Array = []; + configControlUnits.forEach((configControlUnit: any) => { + //Parse activities list + let configActivities: any = configControlUnit["Activities"]; + let activities: Array = []; + configActivities.forEach((configActivity: any) => { + //parse devices + let configDevices: any = configActivity["DeviceSetupList"]; + let devices: Array = []; + configDevices.forEach((configDevice: any) => { + //Add device + devices.push(new DeviceSetupItem({ + deviceId: configDevice["DeviceName"], + input: configDevice["Input"] + })); + this.log(`INFO - Added device '${configDevice["DeviceName"]}' for activity '${configActivity["DisplayName"]}'`); + }); + + //Add activity + activities.push(new Activity({ + volumeDeviceId: configActivity["VolumeDevice"], + controlDeviceId: configActivity["ControlDevice"], + outputDeviceId: configActivity["OutputDevice"], + displayName: configActivity["DisplayName"], + useMatrix: configActivity["UseMatrix"], + deviceList: devices + })); + this.log(`INFO - Added activity '${configActivity["DisplayName"]}'`); + }); + + //Add control unit + controlUnits.push(new ControlUnit({ + displayName: configControlUnit["DisplayName"], + api: this.api, + log: this.log, + activities: activities, + matrix: matrix, + })); + this.log(`INFO - Added ControlUnit`); + }); + callback(controlUnits); } } \ No newline at end of file diff --git a/tslint.json b/tslint.json new file mode 100644 index 0000000..93a4f7a --- /dev/null +++ b/tslint.json @@ -0,0 +1,12 @@ +{ + "defaultSeverity": "error", + "extends": [ + "tslint:recommended" + ], + "jsRules": { + "ordered-imports": false, + "semicolon": true, + }, + "rules": {}, + "rulesDirectory": [] +} \ No newline at end of file