From b2f53589419cf17e5dceec8d310ef616e8c21c40 Mon Sep 17 00:00:00 2001 From: Ackermann Yuriy <1636116+herrjemand@users.noreply.github.com> Date: Mon, 6 Apr 2020 18:55:43 +0300 Subject: [PATCH 01/22] Updated packages. Moved from noble to @abandonware/noble --- index.js | 6 +++--- package.json | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/index.js b/index.js index c3cf3f8..b036f44 100644 --- a/index.js +++ b/index.js @@ -8,13 +8,13 @@ if (os.platform() === 'win32') { if (!(ver[0] > 10 || (ver[0] === 10 && ver[1] > 0) || (ver[0] === 10 && ver[1] === 0 && ver[2] >= 15063))) { - module.exports = require('noble'); + module.exports = require('@abandonware/noble') } else { - const Noble = require('noble/lib/noble'); + const Noble = require('@abandonware/noble/lib/noble'); const winrtBindings = require('./lib/binding.js'); var nobleInstance = new Noble(winrtBindings); module.exports = nobleInstance; } } else { - module.exports = require('noble'); + module.exports = require('@abandonware/noble'); } diff --git a/package.json b/package.json index 5046541..a1914b2 100644 --- a/package.json +++ b/package.json @@ -16,11 +16,11 @@ "node": ">=6.14.2" }, "dependencies": { + "@abandonware/noble": "git+https://github.com/abandonware/noble.git", + "bindings": "~1.3.0", "napi-thread-safe-callback": "0.0.6", - "noble": "^1.9.1", - "node-addon-api": "1.6.2", - "prebuild-install": "^5.0.0", - "bindings": "~1.3.0" + "node-addon-api": "^2.0.0", + "prebuild-install": "^5.0.0" }, "scripts": { "install": "prebuild-install --force || node-gyp rebuild", From 9d41f1b56722dbfed1307868863edaf625ef1253 Mon Sep 17 00:00:00 2001 From: Ackermann Yuriy <1636116+herrjemand@users.noreply.github.com> Date: Mon, 6 Apr 2020 18:56:11 +0300 Subject: [PATCH 02/22] Updated bindings to the later version of MSVS --- binding.gyp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/binding.gyp b/binding.gyp index e31647a..d3eb019 100644 --- a/binding.gyp +++ b/binding.gyp @@ -13,8 +13,8 @@ 'AdditionalOptions': ['/await', '/std:c++latest'], }, }, - 'msvs_target_platform_version':'10.0.15063.0', - 'msvs_target_platform_minversion':'10.0.15063.0', + 'msvs_target_platform_version':'10.0.17763.0', + 'msvs_target_platform_minversion':'10.0.17763.0', 'conditions': [ ['OS=="win"', { 'defines': [ '_HAS_EXCEPTIONS=1' ] }] ], From da4a5f5fe3a8c87e172c8470e8b1bd328d36d759 Mon Sep 17 00:00:00 2001 From: Ackermann Yuriy <1636116+herrjemand@users.noreply.github.com> Date: Mon, 6 Apr 2020 18:57:27 +0300 Subject: [PATCH 03/22] Fixed Write function requiring 5 arguments. withoutResponse is optional --- src/noble_winrt.cc | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/src/noble_winrt.cc b/src/noble_winrt.cc index 5062263..111e78f 100644 --- a/src/noble_winrt.cc +++ b/src/noble_winrt.cc @@ -162,13 +162,19 @@ Napi::Value NobleWinrt::Read(const Napi::CallbackInfo& info) Napi::Value NobleWinrt::Write(const Napi::CallbackInfo& info) { CHECK_MANAGER() - ARG5(String, String, String, Buffer, Boolean) - auto uuid = info[0].As().Utf8Value(); - auto service = napiToUuid(info[1].As()); + ARG4(String, String, String, Buffer) // Technically 5, but practically withoutResponse can be NULL/Undefined + auto uuid = info[0].As().Utf8Value(); + auto service = napiToUuid(info[1].As()); auto characteristic = napiToUuid(info[2].As()); - auto data = napiToData(info[3].As>()); - auto withoutResponse = info[4].As().Value(); + auto data = napiToData(info[3].As>()); + + auto withoutResponse = false; + if(info[4] && !(info[4].IsNull() || info[4].IsUndefined())) { + withoutResponse = info[4].As().Value(); + } + manager->Write(uuid, service, characteristic, data, withoutResponse); + return Napi::Value(); } From a504aa8b97b7e1bc9439eddb3bbaa2cc12ea9f9b Mon Sep 17 00:00:00 2001 From: Ackermann Yuriy <1636116+herrjemand@users.noreply.github.com> Date: Mon, 6 Apr 2020 18:57:47 +0300 Subject: [PATCH 04/22] :lipstick: --- lib/binding.js | 2 +- src/ble_manager.cc | 8 +++++--- src/callbacks.cc | 16 +++++++++------- 3 files changed, 15 insertions(+), 11 deletions(-) diff --git a/lib/binding.js b/lib/binding.js index ec8436e..cb864c5 100644 --- a/lib/binding.js +++ b/lib/binding.js @@ -1,5 +1,5 @@ const events = require('events'); -const util = require('util'); +const util = require('util'); const NobleWinrt = require('bindings')('noble_winrt').NobleWinrt; diff --git a/src/ble_manager.cc b/src/ble_manager.cc index 5b5e3fc..a5ca273 100644 --- a/src/ble_manager.cc +++ b/src/ble_manager.cc @@ -49,9 +49,11 @@ template auto bind2(O* object, M method return; \ } \ auto _commStatus = _result.Status(); \ + auto _protError = _result.ProtocolError(); \ if (_commStatus != GattCommunicationStatus::Success) \ { \ LOGE("communication status: %d", _commStatus); \ + LOGE("protocol error: %d", _protError); \ return; \ } @@ -72,10 +74,10 @@ BLEManager::BLEManager(const Napi::Value& receiver, const Napi::Function& callba auto onRadio = std::bind(&BLEManager::OnRadio, this, std::placeholders::_1); mWatcher.Start(onRadio); mAdvertismentWatcher.ScanningMode(BluetoothLEScanningMode::Active); - auto onReceived = bind2(this, &BLEManager::OnScanResult); + auto onReceived = bind2(this, &BLEManager::OnScanResult); mReceivedRevoker = mAdvertismentWatcher.Received(winrt::auto_revoke, onReceived); - auto onStopped = bind2(this, &BLEManager::OnScanStopped); - mStoppedRevoker = mAdvertismentWatcher.Stopped(winrt::auto_revoke, onStopped); + auto onStopped = bind2(this, &BLEManager::OnScanStopped); + mStoppedRevoker = mAdvertismentWatcher.Stopped(winrt::auto_revoke, onStopped); } const char* adapterStateToString(AdapterState state) diff --git a/src/callbacks.cc b/src/callbacks.cc index 247f6d8..2d40090 100644 --- a/src/callbacks.cc +++ b/src/callbacks.cc @@ -94,14 +94,16 @@ void Emit::ScanState(bool start) void Emit::Scan(const std::string& uuid, int rssi, const Peripheral& peripheral) { - auto address = peripheral.address; - auto addressType = peripheral.addressType; - auto connectable = peripheral.connectable; - auto name = peripheral.name; - auto txPowerLevel = peripheral.txPowerLevel; + auto address = peripheral.address; + auto addressType = peripheral.addressType; + auto connectable = peripheral.connectable; + auto name = peripheral.name; + auto txPowerLevel = peripheral.txPowerLevel; auto manufacturerData = peripheral.manufacturerData; - auto serviceData = peripheral.serviceData; - auto serviceUuids = peripheral.serviceUuids; + auto serviceData = peripheral.serviceData; + auto serviceUuids = peripheral.serviceUuids; + + // wprintf(L"name %s", name); mCallback->call([uuid, rssi, address, addressType, connectable, name, txPowerLevel, manufacturerData, serviceData, serviceUuids](Napi::Env env, std::vector& args) { From 69f0cf129ad5f2c338ef0fd860c26da342042f03 Mon Sep 17 00:00:00 2001 From: Ackermann Yuriy <1636116+herrjemand@users.noreply.github.com> Date: Mon, 6 Apr 2020 18:58:05 +0300 Subject: [PATCH 05/22] Added packagelock --- package-lock.json | 791 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 791 insertions(+) create mode 100644 package-lock.json diff --git a/package-lock.json b/package-lock.json new file mode 100644 index 0000000..b6379f4 --- /dev/null +++ b/package-lock.json @@ -0,0 +1,791 @@ +{ + "name": "noble-winrt", + "version": "0.0.4", + "lockfileVersion": 1, + "requires": true, + "dependencies": { + "@abandonware/bluetooth-hci-socket": { + "version": "0.5.3-5", + "resolved": "https://registry.npmjs.org/@abandonware/bluetooth-hci-socket/-/bluetooth-hci-socket-0.5.3-5.tgz", + "integrity": "sha512-q9DupPXYcqLyLFrmJqYDaqXoN0fOR4qOZA39dJbEeu1M583Ghr5Bn+JlEAnA6l88DJSBZiyjtCgItDeUfuRwMA==", + "optional": true, + "requires": { + "debug": "^4.1.1", + "nan": "^2.14.0", + "node-pre-gyp": "^0.14.0", + "usb": "^1.6.2" + } + }, + "@abandonware/noble": { + "version": "git+https://github.com/abandonware/noble.git#fef35bd53771ca72aef5e0a5e1d08ea471f9ec0a", + "from": "git+https://github.com/abandonware/noble.git", + "requires": { + "@abandonware/bluetooth-hci-socket": "^0.5.3-5", + "debug": "^4.1.1", + "napi-thread-safe-callback": "0.0.6", + "node-addon-api": "^2.0.0" + }, + "dependencies": { + "node-addon-api": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-2.0.0.tgz", + "integrity": "sha512-ASCL5U13as7HhOExbT6OlWJJUV/lLzL2voOSP1UVehpRD8FbSrSDjfScK/KwAvVTI5AS6r4VwbOMlIqtvRidnA==" + } + } + }, + "abbrev": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz", + "integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==", + "optional": true + }, + "ansi-regex": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", + "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=" + }, + "aproba": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/aproba/-/aproba-1.2.0.tgz", + "integrity": "sha512-Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw==" + }, + "are-we-there-yet": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-1.1.5.tgz", + "integrity": "sha512-5hYdAkZlcG8tOLujVDTgCT+uPX0VnpAH28gWsLfzpXYm7wP6mp5Q/gYyR7YQ0cKVJcXJnl3j2kpBan13PtQf6w==", + "requires": { + "delegates": "^1.0.0", + "readable-stream": "^2.0.6" + } + }, + "balanced-match": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", + "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=", + "optional": true + }, + "base64-js": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.3.1.tgz", + "integrity": "sha512-mLQ4i2QO1ytvGWFWmcngKO//JXAQueZvwEKtjgQFM4jIK0kU+ytMfplL8j+n5mspOfjHwoAg+9yhb7BwAHm36g==" + }, + "bindings": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/bindings/-/bindings-1.3.1.tgz", + "integrity": "sha512-i47mqjF9UbjxJhxGf+pZ6kSxrnI3wBLlnGI2ArWJ4r0VrvDS7ZYXkprq/pLaBWYq4GM0r4zdHY+NNRqEMU7uew==" + }, + "bl": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/bl/-/bl-4.0.2.tgz", + "integrity": "sha512-j4OH8f6Qg2bGuWfRiltT2HYGx0e1QcBTrK9KAHNMwMZdQnDZFk0ZSYIpADjYCB3U12nicC5tVJwSIhwOWjb4RQ==", + "requires": { + "buffer": "^5.5.0", + "inherits": "^2.0.4", + "readable-stream": "^3.4.0" + }, + "dependencies": { + "readable-stream": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", + "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", + "requires": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + } + } + } + }, + "brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "optional": true, + "requires": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "buffer": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.5.0.tgz", + "integrity": "sha512-9FTEDjLjwoAkEwyMGDjYJQN2gfRgOKBKRfiglhvibGbpeeU/pQn1bJxQqm32OD/AIeEuHxU9roxXxg34Byp/Ww==", + "requires": { + "base64-js": "^1.0.2", + "ieee754": "^1.1.4" + } + }, + "chownr": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/chownr/-/chownr-1.1.4.tgz", + "integrity": "sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg==" + }, + "code-point-at": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz", + "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=" + }, + "concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", + "optional": true + }, + "console-control-strings": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/console-control-strings/-/console-control-strings-1.1.0.tgz", + "integrity": "sha1-PXz0Rk22RG6mRL9LOVB/mFEAjo4=" + }, + "core-util-is": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", + "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=" + }, + "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" + } + }, + "decompress-response": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-4.2.1.tgz", + "integrity": "sha512-jOSne2qbyE+/r8G1VU+G/82LBs2Fs4LAsTiLSHOCOMZQl2OKZ6i8i4IyHemTe+/yIXOtTcRQMzPcgyhoFlqPkw==", + "requires": { + "mimic-response": "^2.0.0" + } + }, + "deep-extend": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz", + "integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==" + }, + "delegates": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delegates/-/delegates-1.0.0.tgz", + "integrity": "sha1-hMbhWbgZBP3KWaDvRM2HDTElD5o=" + }, + "detect-libc": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-1.0.3.tgz", + "integrity": "sha1-+hN8S9aY7fVc1c0CrFWfkaTEups=" + }, + "end-of-stream": { + "version": "1.4.4", + "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz", + "integrity": "sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==", + "requires": { + "once": "^1.4.0" + } + }, + "expand-template": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/expand-template/-/expand-template-2.0.3.tgz", + "integrity": "sha512-XYfuKMvj4O35f/pOXLObndIRvyQ+/+6AhODh+OKWj9S9498pHHn/IMszH+gt0fBCRWMNfk1ZSp5x3AifmnI2vg==" + }, + "file-uri-to-path": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz", + "integrity": "sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw==", + "optional": true + }, + "fs-constants": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs-constants/-/fs-constants-1.0.0.tgz", + "integrity": "sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow==" + }, + "fs-minipass": { + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-1.2.7.tgz", + "integrity": "sha512-GWSSJGFy4e9GUeCcbIkED+bgAoFyj7XF1mV8rma3QW4NIqX9Kyx79N/PF61H5udOV3aY1IaMLs6pGbH71nlCTA==", + "optional": true, + "requires": { + "minipass": "^2.6.0" + } + }, + "fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", + "optional": true + }, + "gauge": { + "version": "2.7.4", + "resolved": "https://registry.npmjs.org/gauge/-/gauge-2.7.4.tgz", + "integrity": "sha1-LANAXHU4w51+s3sxcCLjJfsBi/c=", + "requires": { + "aproba": "^1.0.3", + "console-control-strings": "^1.0.0", + "has-unicode": "^2.0.0", + "object-assign": "^4.1.0", + "signal-exit": "^3.0.0", + "string-width": "^1.0.1", + "strip-ansi": "^3.0.1", + "wide-align": "^1.1.0" + } + }, + "github-from-package": { + "version": "0.0.0", + "resolved": "https://registry.npmjs.org/github-from-package/-/github-from-package-0.0.0.tgz", + "integrity": "sha1-l/tdlr/eiXMxPyDoKI75oWf6ZM4=" + }, + "glob": { + "version": "7.1.6", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz", + "integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==", + "optional": true, + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + }, + "has-unicode": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/has-unicode/-/has-unicode-2.0.1.tgz", + "integrity": "sha1-4Ob+aijPUROIVeCG0Wkedx3iqLk=" + }, + "iconv-lite": { + "version": "0.4.24", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", + "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", + "optional": true, + "requires": { + "safer-buffer": ">= 2.1.2 < 3" + } + }, + "ieee754": { + "version": "1.1.13", + "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.1.13.tgz", + "integrity": "sha512-4vf7I2LYV/HaWerSo3XmlMkp5eZ83i+/CDluXi/IGTs/O1sejBNhTtnxzmRZfvOUqj7lZjqHkeTvpgSFDlWZTg==" + }, + "ignore-walk": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/ignore-walk/-/ignore-walk-3.0.3.tgz", + "integrity": "sha512-m7o6xuOaT1aqheYHKf8W6J5pYH85ZI9w077erOzLje3JsB1gkafkAhHHY19dqjulgIZHFm32Cp5uNZgcQqdJKw==", + "optional": true, + "requires": { + "minimatch": "^3.0.4" + } + }, + "inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", + "optional": true, + "requires": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" + }, + "ini": { + "version": "1.3.5", + "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.5.tgz", + "integrity": "sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw==" + }, + "is-fullwidth-code-point": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", + "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", + "requires": { + "number-is-nan": "^1.0.0" + } + }, + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" + }, + "mimic-response": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-2.1.0.tgz", + "integrity": "sha512-wXqjST+SLt7R009ySCglWBCFpjUygmCIfD790/kVbiGmUgfYGuB14PiTd5DwVxSV4NcYHjzMkoj5LjQZwTQLEA==" + }, + "minimatch": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", + "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", + "optional": true, + "requires": { + "brace-expansion": "^1.1.7" + } + }, + "minimist": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", + "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==" + }, + "minipass": { + "version": "2.9.0", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-2.9.0.tgz", + "integrity": "sha512-wxfUjg9WebH+CUDX/CdbRlh5SmfZiy/hpkxaRI16Y9W56Pa75sWgd/rvFilSgrauD9NyFymP/+JFV3KwzIsJeg==", + "optional": true, + "requires": { + "safe-buffer": "^5.1.2", + "yallist": "^3.0.0" + } + }, + "minizlib": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/minizlib/-/minizlib-1.3.3.tgz", + "integrity": "sha512-6ZYMOEnmVsdCeTJVE0W9ZD+pVnE8h9Hma/iOwwRDsdQoePpoX56/8B6z3P9VNwppJuBKNRuFDRNRqRWexT9G9Q==", + "optional": true, + "requires": { + "minipass": "^2.9.0" + } + }, + "mkdirp": { + "version": "0.5.3", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.3.tgz", + "integrity": "sha512-P+2gwrFqx8lhew375MQHHeTlY8AuOJSrGf0R5ddkEndUkmwpgUob/vQuBD1V22/Cw1/lJr4x+EjllSezBThzBg==", + "requires": { + "minimist": "^1.2.5" + } + }, + "ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" + }, + "nan": { + "version": "2.14.0", + "resolved": "https://registry.npmjs.org/nan/-/nan-2.14.0.tgz", + "integrity": "sha512-INOFj37C7k3AfaNTtX8RhsTw7qRy7eLET14cROi9+5HAVbbHuIWUHEauBv5qT4Av2tWasiTY1Jw6puUNqRJXQg==", + "optional": true + }, + "napi-build-utils": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/napi-build-utils/-/napi-build-utils-1.0.2.tgz", + "integrity": "sha512-ONmRUqK7zj7DWX0D9ADe03wbwOBZxNAfF20PlGfCWQcD3+/MakShIHrMqx9YwPTfxDdF1zLeL+RGZiR9kGMLdg==" + }, + "napi-thread-safe-callback": { + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/napi-thread-safe-callback/-/napi-thread-safe-callback-0.0.6.tgz", + "integrity": "sha512-X7uHCOCdY4u0yamDxDrv3jF2NtYc8A1nvPzBQgvpoSX+WB3jAe2cVNsY448V1ucq7Whf9Wdy02HEUoLW5rJKWg==" + }, + "needle": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/needle/-/needle-2.4.1.tgz", + "integrity": "sha512-x/gi6ijr4B7fwl6WYL9FwlCvRQKGlUNvnceho8wxkwXqN8jvVmmmATTmZPRRG7b/yC1eode26C2HO9jl78Du9g==", + "optional": true, + "requires": { + "debug": "^3.2.6", + "iconv-lite": "^0.4.4", + "sax": "^1.2.4" + }, + "dependencies": { + "debug": { + "version": "3.2.6", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz", + "integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==", + "optional": true, + "requires": { + "ms": "^2.1.1" + } + } + } + }, + "node-abi": { + "version": "2.15.0", + "resolved": "https://registry.npmjs.org/node-abi/-/node-abi-2.15.0.tgz", + "integrity": "sha512-FeLpTS0F39U7hHZU1srAK4Vx+5AHNVOTP+hxBNQknR/54laTHSFIJkDWDqiquY1LeLUgTfPN7sLPhMubx0PLAg==", + "requires": { + "semver": "^5.4.1" + } + }, + "node-addon-api": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-2.0.0.tgz", + "integrity": "sha512-ASCL5U13as7HhOExbT6OlWJJUV/lLzL2voOSP1UVehpRD8FbSrSDjfScK/KwAvVTI5AS6r4VwbOMlIqtvRidnA==" + }, + "node-pre-gyp": { + "version": "0.14.0", + "resolved": "https://registry.npmjs.org/node-pre-gyp/-/node-pre-gyp-0.14.0.tgz", + "integrity": "sha512-+CvDC7ZttU/sSt9rFjix/P05iS43qHCOOGzcr3Ry99bXG7VX953+vFyEuph/tfqoYu8dttBkE86JSKBO2OzcxA==", + "optional": true, + "requires": { + "detect-libc": "^1.0.2", + "mkdirp": "^0.5.1", + "needle": "^2.2.1", + "nopt": "^4.0.1", + "npm-packlist": "^1.1.6", + "npmlog": "^4.0.2", + "rc": "^1.2.7", + "rimraf": "^2.6.1", + "semver": "^5.3.0", + "tar": "^4.4.2" + } + }, + "noop-logger": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/noop-logger/-/noop-logger-0.1.1.tgz", + "integrity": "sha1-lKKxYzxPExdVMAfYlm/Q6EG2pMI=" + }, + "nopt": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/nopt/-/nopt-4.0.3.tgz", + "integrity": "sha512-CvaGwVMztSMJLOeXPrez7fyfObdZqNUK1cPAEzLHrTybIua9pMdmmPR5YwtfNftIOMv3DPUhFaxsZMNTQO20Kg==", + "optional": true, + "requires": { + "abbrev": "1", + "osenv": "^0.1.4" + } + }, + "npm-bundled": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/npm-bundled/-/npm-bundled-1.1.1.tgz", + "integrity": "sha512-gqkfgGePhTpAEgUsGEgcq1rqPXA+tv/aVBlgEzfXwA1yiUJF7xtEt3CtVwOjNYQOVknDk0F20w58Fnm3EtG0fA==", + "optional": true, + "requires": { + "npm-normalize-package-bin": "^1.0.1" + } + }, + "npm-normalize-package-bin": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/npm-normalize-package-bin/-/npm-normalize-package-bin-1.0.1.tgz", + "integrity": "sha512-EPfafl6JL5/rU+ot6P3gRSCpPDW5VmIzX959Ob1+ySFUuuYHWHekXpwdUZcKP5C+DS4GEtdJluwBjnsNDl+fSA==", + "optional": true + }, + "npm-packlist": { + "version": "1.4.8", + "resolved": "https://registry.npmjs.org/npm-packlist/-/npm-packlist-1.4.8.tgz", + "integrity": "sha512-5+AZgwru5IevF5ZdnFglB5wNlHG1AOOuw28WhUq8/8emhBmLv6jX5by4WJCh7lW0uSYZYS6DXqIsyZVIXRZU9A==", + "optional": true, + "requires": { + "ignore-walk": "^3.0.1", + "npm-bundled": "^1.0.1", + "npm-normalize-package-bin": "^1.0.1" + } + }, + "npmlog": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/npmlog/-/npmlog-4.1.2.tgz", + "integrity": "sha512-2uUqazuKlTaSI/dC8AzicUck7+IrEaOnN/e0jd3Xtt1KcGpwx30v50mL7oPyr/h9bL3E4aZccVwpwP+5W9Vjkg==", + "requires": { + "are-we-there-yet": "~1.1.2", + "console-control-strings": "~1.1.0", + "gauge": "~2.7.3", + "set-blocking": "~2.0.0" + } + }, + "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=" + }, + "object-assign": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", + "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=" + }, + "once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", + "requires": { + "wrappy": "1" + } + }, + "os-homedir": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz", + "integrity": "sha1-/7xJiDNuDoM94MFox+8VISGqf7M=", + "optional": true + }, + "os-tmpdir": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", + "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=", + "optional": true + }, + "osenv": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/osenv/-/osenv-0.1.5.tgz", + "integrity": "sha512-0CWcCECdMVc2Rw3U5w9ZjqX6ga6ubk1xDVKxtBQPK7wis/0F2r9T6k4ydGYhecl7YUBxBVxhL5oisPsNxAPe2g==", + "optional": true, + "requires": { + "os-homedir": "^1.0.0", + "os-tmpdir": "^1.0.0" + } + }, + "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=", + "optional": true + }, + "prebuild-install": { + "version": "5.3.3", + "resolved": "https://registry.npmjs.org/prebuild-install/-/prebuild-install-5.3.3.tgz", + "integrity": "sha512-GV+nsUXuPW2p8Zy7SarF/2W/oiK8bFQgJcncoJ0d7kRpekEA0ftChjfEaF9/Y+QJEc/wFR7RAEa8lYByuUIe2g==", + "requires": { + "detect-libc": "^1.0.3", + "expand-template": "^2.0.3", + "github-from-package": "0.0.0", + "minimist": "^1.2.0", + "mkdirp": "^0.5.1", + "napi-build-utils": "^1.0.1", + "node-abi": "^2.7.0", + "noop-logger": "^0.1.1", + "npmlog": "^4.0.1", + "pump": "^3.0.0", + "rc": "^1.2.7", + "simple-get": "^3.0.3", + "tar-fs": "^2.0.0", + "tunnel-agent": "^0.6.0", + "which-pm-runs": "^1.0.0" + } + }, + "process-nextick-args": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", + "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==" + }, + "pump": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", + "integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==", + "requires": { + "end-of-stream": "^1.1.0", + "once": "^1.3.1" + } + }, + "rc": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/rc/-/rc-1.2.8.tgz", + "integrity": "sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==", + "requires": { + "deep-extend": "^0.6.0", + "ini": "~1.3.0", + "minimist": "^1.2.0", + "strip-json-comments": "~2.0.1" + } + }, + "readable-stream": { + "version": "2.3.7", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", + "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "rimraf": { + "version": "2.7.1", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.7.1.tgz", + "integrity": "sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==", + "optional": true, + "requires": { + "glob": "^7.1.3" + } + }, + "safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" + }, + "safer-buffer": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", + "optional": true + }, + "sax": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/sax/-/sax-1.2.4.tgz", + "integrity": "sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw==", + "optional": true + }, + "semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==" + }, + "set-blocking": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", + "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=" + }, + "signal-exit": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz", + "integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=" + }, + "simple-concat": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/simple-concat/-/simple-concat-1.0.0.tgz", + "integrity": "sha1-c0TLuLbib7J9ZrL8hvn21Zl1IcY=" + }, + "simple-get": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/simple-get/-/simple-get-3.1.0.tgz", + "integrity": "sha512-bCR6cP+aTdScaQCnQKbPKtJOKDp/hj9EDLJo3Nw4y1QksqaovlW/bnptB6/c1e+qmNIDHRK+oXFDdEqBT8WzUA==", + "requires": { + "decompress-response": "^4.2.0", + "once": "^1.3.1", + "simple-concat": "^1.0.0" + } + }, + "string-width": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", + "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", + "requires": { + "code-point-at": "^1.0.0", + "is-fullwidth-code-point": "^1.0.0", + "strip-ansi": "^3.0.0" + } + }, + "string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "requires": { + "safe-buffer": "~5.1.0" + } + }, + "strip-ansi": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", + "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", + "requires": { + "ansi-regex": "^2.0.0" + } + }, + "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=" + }, + "tar": { + "version": "4.4.13", + "resolved": "https://registry.npmjs.org/tar/-/tar-4.4.13.tgz", + "integrity": "sha512-w2VwSrBoHa5BsSyH+KxEqeQBAllHhccyMFVHtGtdMpF4W7IRWfZjFiQceJPChOeTsSDVUpER2T8FA93pr0L+QA==", + "optional": true, + "requires": { + "chownr": "^1.1.1", + "fs-minipass": "^1.2.5", + "minipass": "^2.8.6", + "minizlib": "^1.2.1", + "mkdirp": "^0.5.0", + "safe-buffer": "^5.1.2", + "yallist": "^3.0.3" + } + }, + "tar-fs": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-2.0.0.tgz", + "integrity": "sha512-vaY0obB6Om/fso8a8vakQBzwholQ7v5+uy+tF3Ozvxv1KNezmVQAiWtcNmMHFSFPqL3dJA8ha6gdtFbfX9mcxA==", + "requires": { + "chownr": "^1.1.1", + "mkdirp": "^0.5.1", + "pump": "^3.0.0", + "tar-stream": "^2.0.0" + } + }, + "tar-stream": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-2.1.2.tgz", + "integrity": "sha512-UaF6FoJ32WqALZGOIAApXx+OdxhekNMChu6axLJR85zMMjXKWFGjbIRe+J6P4UnRGg9rAwWvbTT0oI7hD/Un7Q==", + "requires": { + "bl": "^4.0.1", + "end-of-stream": "^1.4.1", + "fs-constants": "^1.0.0", + "inherits": "^2.0.3", + "readable-stream": "^3.1.1" + }, + "dependencies": { + "readable-stream": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", + "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", + "requires": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + } + } + } + }, + "tunnel-agent": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", + "integrity": "sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0=", + "requires": { + "safe-buffer": "^5.0.1" + } + }, + "usb": { + "version": "1.6.2", + "resolved": "https://registry.npmjs.org/usb/-/usb-1.6.2.tgz", + "integrity": "sha512-KcovLXRQuH63iEtnqXyDQGOi5dXHpLM5lZBIUsqSJQToua8nL2sVCieQTkzQBfLe5mCuvk40MgKciI61lgevWw==", + "optional": true, + "requires": { + "bindings": "^1.4.0", + "nan": "2.13.2", + "prebuild-install": "^5.3.3" + }, + "dependencies": { + "bindings": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/bindings/-/bindings-1.5.0.tgz", + "integrity": "sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ==", + "optional": true, + "requires": { + "file-uri-to-path": "1.0.0" + } + }, + "nan": { + "version": "2.13.2", + "resolved": "https://registry.npmjs.org/nan/-/nan-2.13.2.tgz", + "integrity": "sha512-TghvYc72wlMGMVMluVo9WRJc0mB8KxxF/gZ4YYFy7V2ZQX9l7rgbPg7vjS9mt6U5HXODVFVI2bOduCzwOMv/lw==", + "optional": true + } + } + }, + "util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=" + }, + "which-pm-runs": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/which-pm-runs/-/which-pm-runs-1.0.0.tgz", + "integrity": "sha1-Zws6+8VS4LVd9rd4DKdGFfI60cs=" + }, + "wide-align": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.3.tgz", + "integrity": "sha512-QGkOQc8XL6Bt5PwnsExKBPuMKBxnGxWWW3fU55Xt4feHozMUhdUMaBCk290qpm/wG5u/RSKzwdAC4i51YigihA==", + "requires": { + "string-width": "^1.0.2 || 2" + } + }, + "wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" + }, + "yallist": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz", + "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==", + "optional": true + } + } +} From 72b40e801d4110b04d2ca35cf03668694afc9655 Mon Sep 17 00:00:00 2001 From: Ackermann Yuriy <1636116+herrjemand@users.noreply.github.com> Date: Mon, 20 Apr 2020 12:12:56 +0300 Subject: [PATCH 06/22] Added async error processing --- .gitignore | 5 +- src/ble_manager.cc | 203 +++++++++++++++++++++++++++++---------------- 2 files changed, 135 insertions(+), 73 deletions(-) diff --git a/.gitignore b/.gitignore index e89a005..43980fb 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,5 @@ build/* -node_modules/* +node_modules/ +.vscode/ +.vs/ +bin/ \ No newline at end of file diff --git a/src/ble_manager.cc b/src/ble_manager.cc index a5ca273..aef5ccb 100644 --- a/src/ble_manager.cc +++ b/src/ble_manager.cc @@ -24,7 +24,7 @@ template auto bind2(O* object, M method return std::bind(method, object, std::placeholders::_1, std::placeholders::_2, args...); } -#define LOGE(message, ...) printf(__FUNCTION__ ": " message "\n", __VA_ARGS__) +#define LOGE(message, ...) printf("WINRT BLE API::BLE MANAGER:: " __FUNCTION__ ": " message "\n", __VA_ARGS__) #define CHECK_DEVICE() \ if (mDeviceMap.find(uuid) == mDeviceMap.end()) \ @@ -42,21 +42,27 @@ template auto bind2(O* object, M method } \ BluetoothLEDevice& _device = *peripheral.device; -#define CHECK_RESULT(_result) \ - if (!_result) \ - { \ - LOGE("result is null"); \ - return; \ - } \ - auto _commStatus = _result.Status(); \ - auto _protError = _result.ProtocolError(); \ - if (_commStatus != GattCommunicationStatus::Success) \ - { \ - LOGE("communication status: %d", _commStatus); \ - LOGE("protocol error: %d", _protError); \ - return; \ +template +bool CHECK_RESULT(T _result) +{ + if (!_result) + { + LOGE("result is null"); + return false; + } else { + auto _commStatus = _result.Status(); + auto _protError = _result.ProtocolError(); + if (_commStatus != GattCommunicationStatus::Success) + { + LOGE("ommunication status: %d", _commStatus); + LOGE("protocol error: %d", _protError); + return false; + } } + return true; +} + #define FOR(object, vector) \ auto& _vector = vector; \ if (!_vector) \ @@ -272,25 +278,32 @@ void BLEManager::OnServicesDiscovered(IAsyncOperation AsyncStatus status, const std::string uuid, const std::vector serviceUUIDs) { + std::vector serviceUuids; if (status == AsyncStatus::Completed) { GattDeviceServicesResult& result = asyncOp.GetResults(); - CHECK_RESULT(result); - std::vector serviceUuids; - FOR(service, result.Services()) + if(CHECK_RESULT(result)) { - auto id = service.Uuid(); - if (inFilter(serviceUUIDs, id)) + FOR(service, result.Services()) { - serviceUuids.push_back(toStr(id)); + auto id = service.Uuid(); + if (inFilter(serviceUUIDs, id)) + { + serviceUuids.push_back(toStr(id)); + } } } - mEmit.ServicesDiscovered(uuid, serviceUuids); + else + { + LOGE("GattDeviceServicesResult:: failed to discover any services."); + } } else { - LOGE("status: %d", status); + LOGE("AsyncStatus failed: %d", status); } + + mEmit.ServicesDiscovered(uuid, serviceUuids); } bool BLEManager::DiscoverIncludedServices(const std::string& uuid, const winrt::guid& serviceUuid, @@ -321,25 +334,32 @@ void BLEManager::OnIncludedServicesDiscovered(IAsyncOperation serviceUUIDs) { + std::vector servicesUuids; if (status == AsyncStatus::Completed) { auto& result = asyncOp.GetResults(); - CHECK_RESULT(result); - std::vector servicesUuids; - FOR(service, result.Services()) + if(CHECK_RESULT(result)) { - auto id = service.Uuid(); - if (inFilter(serviceUUIDs, id)) + FOR(service, result.Services()) { - servicesUuids.push_back(toStr(id)); + auto id = service.Uuid(); + if (inFilter(serviceUUIDs, id)) + { + servicesUuids.push_back(toStr(id)); + } } } - mEmit.IncludedServicesDiscovered(uuid, serviceId, servicesUuids); + else + { + LOGE("GattDeviceServicesResult:: Failed to discover included services."); + } } else { - LOGE("status: %d", status); + LOGE("AsyncStatus status: %d", status); } + + mEmit.IncludedServicesDiscovered(uuid, serviceId, servicesUuids); } bool BLEManager::DiscoverCharacteristics(const std::string& uuid, const winrt::guid& serviceUuid, @@ -370,26 +390,33 @@ void BLEManager::OnCharacteristicsDiscovered(IAsyncOperation characteristicUUIDs) { + std::vector>> characteristicsUuids; if (status == AsyncStatus::Completed) { auto& result = asyncOp.GetResults(); - CHECK_RESULT(result); - std::vector>> characteristicsUuids; - FOR(characteristic, result.Characteristics()) + if(CHECK_RESULT(result)) { - auto id = characteristic.Uuid(); - if (inFilter(characteristicUUIDs, id)) + FOR(characteristic, result.Characteristics()) { - auto props = characteristic.CharacteristicProperties(); - characteristicsUuids.push_back({ toStr(id), toPropertyArray(props) }); + auto id = characteristic.Uuid(); + if (inFilter(characteristicUUIDs, id)) + { + auto props = characteristic.CharacteristicProperties(); + characteristicsUuids.push_back({ toStr(id), toPropertyArray(props) }); + } } } - mEmit.CharacteristicsDiscovered(uuid, serviceId, characteristicsUuids); + else + { + LOGE("GattCharacteristicsResult:: Failed to discover any characteristics."); + } } else { - LOGE("status: %d", status); + LOGE("AsyncStatus status: %d", status); } + + mEmit.CharacteristicsDiscovered(uuid, serviceId, characteristicsUuids); } bool BLEManager::Read(const std::string& uuid, const winrt::guid& serviceUuid, @@ -421,27 +448,35 @@ void BLEManager::OnRead(IAsyncOperation asyncOp, AsyncStatus sta const std::string uuid, const std::string serviceId, const std::string characteristicId) { + Data data(0); if (status == AsyncStatus::Completed) { GattReadResult& result = asyncOp.GetResults(); - CHECK_RESULT(result); - auto& value = result.Value(); - if (value) + if(CHECK_RESULT(result)) { - auto& reader = DataReader::FromBuffer(value); - Data data(reader.UnconsumedBufferLength()); - reader.ReadBytes(data); - mEmit.Read(uuid, serviceId, characteristicId, data, false); + auto& value = result.Value(); + if (value) + { + auto& reader = DataReader::FromBuffer(value); + Data data(reader.UnconsumedBufferLength()); + reader.ReadBytes(data); + } + else + { + LOGE("GattReadResult::Value is null"); + } } else { - LOGE("value is null"); + LOGE("GattReadResult:: failed to read"); } } else { - LOGE("status: %d", status); + LOGE("AsyncStatus failed: %d", status); } + + mEmit.Read(uuid, serviceId, characteristicId, data, false); } bool BLEManager::Write(const std::string& uuid, const winrt::guid& serviceUuid, @@ -627,21 +662,28 @@ void BLEManager::OnDescriptorsDiscovered(IAsyncOperation const std::string serviceId, const std::string characteristicId) { + std::vector descriptorUuids; if (status == AsyncStatus::Completed) { auto& result = asyncOp.GetResults(); - CHECK_RESULT(result); - std::vector descriptorUuids; - FOR(descriptor, result.Descriptors()) + if(CHECK_RESULT(result)) { - descriptorUuids.push_back(toStr(descriptor.Uuid())); + FOR(descriptor, result.Descriptors()) + { + descriptorUuids.push_back(toStr(descriptor.Uuid())); + } + } + else + { + LOGE("GattDescriptorsResult:: Failed to discover any descryptors."); } - mEmit.DescriptorsDiscovered(uuid, serviceId, characteristicId, descriptorUuids); } else { - LOGE("status: %d", status); + LOGE("AsyncStatus failed: %d", status); } + + mEmit.DescriptorsDiscovered(uuid, serviceId, characteristicId, descriptorUuids); } bool BLEManager::ReadValue(const std::string& uuid, const winrt::guid& serviceUuid, @@ -675,27 +717,36 @@ void BLEManager::OnReadValue(IAsyncOperation asyncOp, AsyncStatu const std::string uuid, const std::string serviceId, const std::string characteristicId, const std::string descriptorId) { + Data data(0); if (status == AsyncStatus::Completed) { GattReadResult& result = asyncOp.GetResults(); - CHECK_RESULT(result); - auto& value = result.Value(); - if (value) + if(CHECK_RESULT(result)) { - auto& reader = DataReader::FromBuffer(value); - Data data(reader.UnconsumedBufferLength()); - reader.ReadBytes(data); - mEmit.ReadValue(uuid, serviceId, characteristicId, descriptorId, data); + auto& value = result.Value(); + if (value) + { + auto& reader = DataReader::FromBuffer(value); + Data data(reader.UnconsumedBufferLength()); + reader.ReadBytes(data); + mEmit.ReadValue(uuid, serviceId, characteristicId, descriptorId, data); + } + else + { + LOGE("GattReadResult::Value is null"); + } } else { - LOGE("value is null"); + LOGE("GattReadResult:: failed to read"); } } else { - LOGE("status: %d", status); + LOGE("AsyncStatus failed: %d", status); } + + mEmit.ReadValue(uuid, serviceId, characteristicId, descriptorId, data); } bool BLEManager::WriteValue(const std::string& uuid, const winrt::guid& serviceUuid, @@ -755,27 +806,35 @@ bool BLEManager::ReadHandle(const std::string& uuid, int handle) void BLEManager::OnReadHandle(IAsyncOperation asyncOp, AsyncStatus status, const std::string uuid, const int handle) { + Data data(0); if (status == AsyncStatus::Completed) { GattReadResult& result = asyncOp.GetResults(); - CHECK_RESULT(result); - auto& value = result.Value(); - if (value) + if(CHECK_RESULT(result)) { - auto& reader = DataReader::FromBuffer(value); - Data data(reader.UnconsumedBufferLength()); - reader.ReadBytes(data); - mEmit.ReadHandle(uuid, handle, data); + auto& value = result.Value(); + if (value) + { + auto& reader = DataReader::FromBuffer(value); + Data data(reader.UnconsumedBufferLength()); + reader.ReadBytes(data); + } + else + { + LOGE("GattReadResult::Value is null"); + } } else { - LOGE("value is null"); + LOGE("GattReadResult:: failed to read"); } } else { - LOGE("status: %d", status); + LOGE("AsyncStatus failed: %d", status); } + + mEmit.ReadHandle(uuid, handle, data); } bool BLEManager::WriteHandle(const std::string& uuid, int handle, Data data) From 54ec5f4e8848864b969bed5baaaed52205dd2304 Mon Sep 17 00:00:00 2001 From: Ackermann Yuriy <1636116+herrjemand@users.noreply.github.com> Date: Mon, 20 Apr 2020 12:25:59 +0300 Subject: [PATCH 07/22] Bumped version up --- package-lock.json | 2 +- package.json | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index b6379f4..856f07d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "noble-winrt", - "version": "0.0.4", + "version": "0.0.5", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index a1914b2..6b8043c 100644 --- a/package.json +++ b/package.json @@ -1,11 +1,12 @@ { "name": "noble-winrt", "description": "Noble (Node.js Bluetooth LE) bindings for Windows 10", - "version": "0.0.4", + "version": "0.0.5", "author": "gv@timeular.com", + "contributors": ["Yuriy Ackermann "], "license": "MIT", "repository": { - "url": "https://github.com/Timeular/noble-winrt.git" + "url": "https://github.com/fido-alliance/noble-winrt.git" }, "main": "index.js", "gypfile": true, From b31a167b0f65e3dceb70717ce6f390abd8d0f573 Mon Sep 17 00:00:00 2001 From: Ackermann Yuriy <1636116+herrjemand@users.noreply.github.com> Date: Thu, 14 May 2020 11:52:34 +0300 Subject: [PATCH 08/22] Fixed missin outscope returns --- src/ble_manager.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/ble_manager.cc b/src/ble_manager.cc index aef5ccb..a21e449 100644 --- a/src/ble_manager.cc +++ b/src/ble_manager.cc @@ -460,6 +460,7 @@ void BLEManager::OnRead(IAsyncOperation asyncOp, AsyncStatus sta auto& reader = DataReader::FromBuffer(value); Data data(reader.UnconsumedBufferLength()); reader.ReadBytes(data); + mEmit.Read(uuid, serviceId, characteristicId, data, false); } else { @@ -818,6 +819,7 @@ void BLEManager::OnReadHandle(IAsyncOperation asyncOp, AsyncStat auto& reader = DataReader::FromBuffer(value); Data data(reader.UnconsumedBufferLength()); reader.ReadBytes(data); + mEmit.ReadHandle(uuid, handle, data); } else { From 10900646f245aca2086e9b2420e2f8d48ef78042 Mon Sep 17 00:00:00 2001 From: Ackermann Yuriy <1636116+herrjemand@users.noreply.github.com> Date: Wed, 27 May 2020 22:16:27 +0300 Subject: [PATCH 09/22] Bumped version up --- package-lock.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package-lock.json b/package-lock.json index 856f07d..22f9e98 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "noble-winrt", - "version": "0.0.5", + "version": "0.0.6", "lockfileVersion": 1, "requires": true, "dependencies": { From eb20bd72343f7ce6476a4cc5d0bd477d58ff8aaa Mon Sep 17 00:00:00 2001 From: Ackermann Yuriy <1636116+herrjemand@users.noreply.github.com> Date: Wed, 27 May 2020 22:42:07 +0300 Subject: [PATCH 10/22] Bumped version up. 0.0.6 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 6b8043c..53c8b01 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "noble-winrt", "description": "Noble (Node.js Bluetooth LE) bindings for Windows 10", - "version": "0.0.5", + "version": "0.0.6", "author": "gv@timeular.com", "contributors": ["Yuriy Ackermann "], "license": "MIT", From ea08d0eea5cb3cd71a205ca654171debcdf32598 Mon Sep 17 00:00:00 2001 From: Ackermann Yuriy <1636116+herrjemand@users.noreply.github.com> Date: Wed, 17 Jun 2020 23:57:31 +0300 Subject: [PATCH 11/22] Fixed name issue --- src/ble_manager.cc | 4 ++-- src/callbacks.cc | 1 - src/peripheral_winrt.cc | 2 ++ 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/ble_manager.cc b/src/ble_manager.cc index a21e449..f1432db 100644 --- a/src/ble_manager.cc +++ b/src/ble_manager.cc @@ -280,7 +280,7 @@ void BLEManager::OnServicesDiscovered(IAsyncOperation { std::vector serviceUuids; if (status == AsyncStatus::Completed) - { + { GattDeviceServicesResult& result = asyncOp.GetResults(); if(CHECK_RESULT(result)) { @@ -293,7 +293,7 @@ void BLEManager::OnServicesDiscovered(IAsyncOperation } } } - else + else { LOGE("GattDeviceServicesResult:: failed to discover any services."); } diff --git a/src/callbacks.cc b/src/callbacks.cc index 2d40090..c1a39e6 100644 --- a/src/callbacks.cc +++ b/src/callbacks.cc @@ -103,7 +103,6 @@ void Emit::Scan(const std::string& uuid, int rssi, const Peripheral& peripheral) auto serviceData = peripheral.serviceData; auto serviceUuids = peripheral.serviceUuids; - // wprintf(L"name %s", name); mCallback->call([uuid, rssi, address, addressType, connectable, name, txPowerLevel, manufacturerData, serviceData, serviceUuids](Napi::Env env, std::vector& args) { diff --git a/src/peripheral_winrt.cc b/src/peripheral_winrt.cc index 89be76e..3be52b8 100644 --- a/src/peripheral_winrt.cc +++ b/src/peripheral_winrt.cc @@ -38,6 +38,8 @@ void PeripheralWinrt::Update(const int rssiValue, const BluetoothLEAdvertisement if (!localName.empty()) { name = localName; + } else { + name = "UNKNOWN " + address; } manufacturerData.clear(); From e62846288af90f317a8fb399e7560884d69ad54c Mon Sep 17 00:00:00 2001 From: Ackermann Yuriy <1636116+herrjemand@users.noreply.github.com> Date: Wed, 19 Aug 2020 15:38:22 +0300 Subject: [PATCH 12/22] Added default name value --- src/peripheral.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/peripheral.h b/src/peripheral.h index 2c67cdb..dcb2601 100644 --- a/src/peripheral.h +++ b/src/peripheral.h @@ -15,7 +15,7 @@ class Peripheral std::string address = "unknown"; AddressType addressType = UNKNOWN; bool connectable = false; - std::string name; + std::string name = "unknown"; int txPowerLevel; Data manufacturerData; std::vector> serviceData; From a255d64ba1cc23c960c3f531e17d39ccde1b0329 Mon Sep 17 00:00:00 2001 From: Ackermann Yuriy <1636116+herrjemand@users.noreply.github.com> Date: Wed, 19 Aug 2020 15:38:41 +0300 Subject: [PATCH 13/22] Updated noble --- package-lock.json | 27 ++++++++++----------------- package.json | 4 +++- 2 files changed, 13 insertions(+), 18 deletions(-) diff --git a/package-lock.json b/package-lock.json index 22f9e98..16ef3ee 100644 --- a/package-lock.json +++ b/package-lock.json @@ -17,20 +17,13 @@ } }, "@abandonware/noble": { - "version": "git+https://github.com/abandonware/noble.git#fef35bd53771ca72aef5e0a5e1d08ea471f9ec0a", + "version": "git+https://github.com/abandonware/noble.git#faf81280bda6c7d39d7c8e92a6562d860fbe0f9e", "from": "git+https://github.com/abandonware/noble.git", "requires": { "@abandonware/bluetooth-hci-socket": "^0.5.3-5", "debug": "^4.1.1", "napi-thread-safe-callback": "0.0.6", "node-addon-api": "^2.0.0" - }, - "dependencies": { - "node-addon-api": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-2.0.0.tgz", - "integrity": "sha512-ASCL5U13as7HhOExbT6OlWJJUV/lLzL2voOSP1UVehpRD8FbSrSDjfScK/KwAvVTI5AS6r4VwbOMlIqtvRidnA==" - } } }, "abbrev": { @@ -358,9 +351,9 @@ "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" }, "nan": { - "version": "2.14.0", - "resolved": "https://registry.npmjs.org/nan/-/nan-2.14.0.tgz", - "integrity": "sha512-INOFj37C7k3AfaNTtX8RhsTw7qRy7eLET14cROi9+5HAVbbHuIWUHEauBv5qT4Av2tWasiTY1Jw6puUNqRJXQg==", + "version": "2.14.1", + "resolved": "https://registry.npmjs.org/nan/-/nan-2.14.1.tgz", + "integrity": "sha512-isWHgVjnFjh2x2yuJ/tj3JbwoHu3UC2dX5G/88Cm24yB6YopVgxvBObDY7n5xW6ExmFhJpSEQqFPvq9zaXc8Jw==", "optional": true }, "napi-build-utils": { @@ -374,9 +367,9 @@ "integrity": "sha512-X7uHCOCdY4u0yamDxDrv3jF2NtYc8A1nvPzBQgvpoSX+WB3jAe2cVNsY448V1ucq7Whf9Wdy02HEUoLW5rJKWg==" }, "needle": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/needle/-/needle-2.4.1.tgz", - "integrity": "sha512-x/gi6ijr4B7fwl6WYL9FwlCvRQKGlUNvnceho8wxkwXqN8jvVmmmATTmZPRRG7b/yC1eode26C2HO9jl78Du9g==", + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/needle/-/needle-2.5.0.tgz", + "integrity": "sha512-o/qITSDR0JCyCKEQ1/1bnUXMmznxabbwi/Y4WwJElf+evwJNFNwIDMCCt5IigFVxgeGBJESLohGtIS9gEzo1fA==", "optional": true, "requires": { "debug": "^3.2.6", @@ -731,9 +724,9 @@ } }, "usb": { - "version": "1.6.2", - "resolved": "https://registry.npmjs.org/usb/-/usb-1.6.2.tgz", - "integrity": "sha512-KcovLXRQuH63iEtnqXyDQGOi5dXHpLM5lZBIUsqSJQToua8nL2sVCieQTkzQBfLe5mCuvk40MgKciI61lgevWw==", + "version": "1.6.3", + "resolved": "https://registry.npmjs.org/usb/-/usb-1.6.3.tgz", + "integrity": "sha512-23KYMjaWydACd8wgGKMQ4MNwFspAT6Xeim4/9Onqe5Rz/nMb4TM/WHL+qPT0KNFxzNKzAs63n1xQWGEtgaQ2uw==", "optional": true, "requires": { "bindings": "^1.4.0", diff --git a/package.json b/package.json index 53c8b01..34fc854 100644 --- a/package.json +++ b/package.json @@ -3,7 +3,9 @@ "description": "Noble (Node.js Bluetooth LE) bindings for Windows 10", "version": "0.0.6", "author": "gv@timeular.com", - "contributors": ["Yuriy Ackermann "], + "contributors": [ + "Yuriy Ackermann " + ], "license": "MIT", "repository": { "url": "https://github.com/fido-alliance/noble-winrt.git" From 3a18d4dde5e28bc81afe02990da4a7b36be9a4f0 Mon Sep 17 00:00:00 2001 From: Ackermann Yuriy <1636116+herrjemand@users.noreply.github.com> Date: Wed, 19 Aug 2020 15:39:06 +0300 Subject: [PATCH 14/22] Added additional logging --- src/ble_manager.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/ble_manager.cc b/src/ble_manager.cc index f1432db..3f4b301 100644 --- a/src/ble_manager.cc +++ b/src/ble_manager.cc @@ -521,7 +521,10 @@ void BLEManager::OnWrite(IAsyncOperation asyncOp, AsyncStatus s } else { - LOGE("status: %d", status); + auto errorCode = asyncOp.ErrorCode().value; + + LOGE("status lol: %d", status); + LOGE("GattWriteError: %d", errorCode); } } From 802e724b19869c111b1ff83e696c0dafa9e7257f Mon Sep 17 00:00:00 2001 From: Ackermann Yuriy <1636116+herrjemand@users.noreply.github.com> Date: Wed, 19 Aug 2020 15:39:40 +0300 Subject: [PATCH 15/22] More logging --- src/callbacks.cc | 1 + src/peripheral_winrt.cc | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/src/callbacks.cc b/src/callbacks.cc index c1a39e6..5728297 100644 --- a/src/callbacks.cc +++ b/src/callbacks.cc @@ -98,6 +98,7 @@ void Emit::Scan(const std::string& uuid, int rssi, const Peripheral& peripheral) auto addressType = peripheral.addressType; auto connectable = peripheral.connectable; auto name = peripheral.name; + printf("CHECKING NAME ::SCAN: %s \n", name.c_str()); auto txPowerLevel = peripheral.txPowerLevel; auto manufacturerData = peripheral.manufacturerData; auto serviceData = peripheral.serviceData; diff --git a/src/peripheral_winrt.cc b/src/peripheral_winrt.cc index 3be52b8..1d64571 100644 --- a/src/peripheral_winrt.cc +++ b/src/peripheral_winrt.cc @@ -35,10 +35,14 @@ PeripheralWinrt::~PeripheralWinrt() void PeripheralWinrt::Update(const int rssiValue, const BluetoothLEAdvertisement& advertisment) { std::string localName = ws2s(advertisment.LocalName().c_str()); + printf("CHECKING NAME ::UPDATE: %s \n", localName.c_str()); + if (!localName.empty()) { + printf("NAME IS NOT EMPTY\n"); name = localName; } else { + printf("NAME IS EMPTY\n"); name = "UNKNOWN " + address; } From bbc39c437a2c9df5de33cf02e902def73ee5e611 Mon Sep 17 00:00:00 2001 From: Ackermann Yuriy <1636116+herrjemand@users.noreply.github.com> Date: Wed, 19 Aug 2020 15:39:55 +0300 Subject: [PATCH 16/22] Bumped version up --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 34fc854..711f0e9 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "noble-winrt", "description": "Noble (Node.js Bluetooth LE) bindings for Windows 10", - "version": "0.0.6", + "version": "0.0.7", "author": "gv@timeular.com", "contributors": [ "Yuriy Ackermann " From 52f0ec763ac9d66ca065a61eca93399d860ada7e Mon Sep 17 00:00:00 2001 From: Ackermann Yuriy <1636116+herrjemand@users.noreply.github.com> Date: Mon, 7 Dec 2020 23:56:36 +0200 Subject: [PATCH 17/22] Removed loggers --- src/callbacks.cc | 1 - src/peripheral_winrt.cc | 4 ---- 2 files changed, 5 deletions(-) diff --git a/src/callbacks.cc b/src/callbacks.cc index 5728297..c1a39e6 100644 --- a/src/callbacks.cc +++ b/src/callbacks.cc @@ -98,7 +98,6 @@ void Emit::Scan(const std::string& uuid, int rssi, const Peripheral& peripheral) auto addressType = peripheral.addressType; auto connectable = peripheral.connectable; auto name = peripheral.name; - printf("CHECKING NAME ::SCAN: %s \n", name.c_str()); auto txPowerLevel = peripheral.txPowerLevel; auto manufacturerData = peripheral.manufacturerData; auto serviceData = peripheral.serviceData; diff --git a/src/peripheral_winrt.cc b/src/peripheral_winrt.cc index 1d64571..3be52b8 100644 --- a/src/peripheral_winrt.cc +++ b/src/peripheral_winrt.cc @@ -35,14 +35,10 @@ PeripheralWinrt::~PeripheralWinrt() void PeripheralWinrt::Update(const int rssiValue, const BluetoothLEAdvertisement& advertisment) { std::string localName = ws2s(advertisment.LocalName().c_str()); - printf("CHECKING NAME ::UPDATE: %s \n", localName.c_str()); - if (!localName.empty()) { - printf("NAME IS NOT EMPTY\n"); name = localName; } else { - printf("NAME IS EMPTY\n"); name = "UNKNOWN " + address; } From 51e2ee898101e97fbff59782929fdece0bebf1c9 Mon Sep 17 00:00:00 2001 From: Ackermann Yuriy <1636116+herrjemand@users.noreply.github.com> Date: Tue, 8 Dec 2020 00:05:59 +0200 Subject: [PATCH 18/22] Update dependencies --- package-lock.json | 85 ++++++++++++++++++++++++----------------------- package.json | 4 +-- 2 files changed, 45 insertions(+), 44 deletions(-) diff --git a/package-lock.json b/package-lock.json index 16ef3ee..5f72949 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,24 +1,25 @@ { "name": "noble-winrt", - "version": "0.0.6", + "version": "0.1.0", "lockfileVersion": 1, "requires": true, "dependencies": { "@abandonware/bluetooth-hci-socket": { - "version": "0.5.3-5", - "resolved": "https://registry.npmjs.org/@abandonware/bluetooth-hci-socket/-/bluetooth-hci-socket-0.5.3-5.tgz", - "integrity": "sha512-q9DupPXYcqLyLFrmJqYDaqXoN0fOR4qOZA39dJbEeu1M583Ghr5Bn+JlEAnA6l88DJSBZiyjtCgItDeUfuRwMA==", + "version": "0.5.3-6", + "resolved": "https://registry.npmjs.org/@abandonware/bluetooth-hci-socket/-/bluetooth-hci-socket-0.5.3-6.tgz", + "integrity": "sha512-LwZtu31vgcm6T4GRtHDCye1JZepvjfqW418DYccgcu4podXbBoogkt4NhRP6rnoOxY+49F1Do7oK5K8fModxuw==", "optional": true, "requires": { - "debug": "^4.1.1", - "nan": "^2.14.0", - "node-pre-gyp": "^0.14.0", - "usb": "^1.6.2" + "debug": "^4.2.0", + "nan": "^2.14.1", + "node-pre-gyp": "^0.15.0", + "usb": "^1.6.3" } }, "@abandonware/noble": { - "version": "git+https://github.com/abandonware/noble.git#faf81280bda6c7d39d7c8e92a6562d860fbe0f9e", - "from": "git+https://github.com/abandonware/noble.git", + "version": "1.9.2-10", + "resolved": "https://registry.npmjs.org/@abandonware/noble/-/noble-1.9.2-10.tgz", + "integrity": "sha512-V43V5kDlDCfM8PK88QTqFZU+UmJheuwJS0sH4X8pu3ZnlH1cF2CXaskO+tjUE6POmB+EFLNKfm8dSnJOkWohjQ==", "requires": { "@abandonware/bluetooth-hci-socket": "^0.5.3-5", "debug": "^4.1.1", @@ -58,9 +59,9 @@ "optional": true }, "base64-js": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.3.1.tgz", - "integrity": "sha512-mLQ4i2QO1ytvGWFWmcngKO//JXAQueZvwEKtjgQFM4jIK0kU+ytMfplL8j+n5mspOfjHwoAg+9yhb7BwAHm36g==" + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", + "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==" }, "bindings": { "version": "1.3.1", @@ -68,9 +69,9 @@ "integrity": "sha512-i47mqjF9UbjxJhxGf+pZ6kSxrnI3wBLlnGI2ArWJ4r0VrvDS7ZYXkprq/pLaBWYq4GM0r4zdHY+NNRqEMU7uew==" }, "bl": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/bl/-/bl-4.0.2.tgz", - "integrity": "sha512-j4OH8f6Qg2bGuWfRiltT2HYGx0e1QcBTrK9KAHNMwMZdQnDZFk0ZSYIpADjYCB3U12nicC5tVJwSIhwOWjb4RQ==", + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/bl/-/bl-4.0.3.tgz", + "integrity": "sha512-fs4G6/Hu4/EE+F75J8DuN/0IpQqNjAdC7aEQv7Qt8MHGUH7Ckv2MwTEEeN9QehD0pfIDkMI1bkHYkKy7xHyKIg==", "requires": { "buffer": "^5.5.0", "inherits": "^2.0.4", @@ -100,12 +101,12 @@ } }, "buffer": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.5.0.tgz", - "integrity": "sha512-9FTEDjLjwoAkEwyMGDjYJQN2gfRgOKBKRfiglhvibGbpeeU/pQn1bJxQqm32OD/AIeEuHxU9roxXxg34Byp/Ww==", + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", + "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", "requires": { - "base64-js": "^1.0.2", - "ieee754": "^1.1.4" + "base64-js": "^1.3.1", + "ieee754": "^1.1.13" } }, "chownr": { @@ -135,11 +136,11 @@ "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=" }, "debug": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", - "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.1.tgz", + "integrity": "sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ==", "requires": { - "ms": "^2.1.1" + "ms": "2.1.2" } }, "decompress-response": { @@ -253,9 +254,9 @@ } }, "ieee754": { - "version": "1.1.13", - "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.1.13.tgz", - "integrity": "sha512-4vf7I2LYV/HaWerSo3XmlMkp5eZ83i+/CDluXi/IGTs/O1sejBNhTtnxzmRZfvOUqj7lZjqHkeTvpgSFDlWZTg==" + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", + "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==" }, "ignore-walk": { "version": "3.0.3", @@ -351,9 +352,9 @@ "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" }, "nan": { - "version": "2.14.1", - "resolved": "https://registry.npmjs.org/nan/-/nan-2.14.1.tgz", - "integrity": "sha512-isWHgVjnFjh2x2yuJ/tj3JbwoHu3UC2dX5G/88Cm24yB6YopVgxvBObDY7n5xW6ExmFhJpSEQqFPvq9zaXc8Jw==", + "version": "2.14.2", + "resolved": "https://registry.npmjs.org/nan/-/nan-2.14.2.tgz", + "integrity": "sha512-M2ufzIiINKCuDfBSAUr1vWQ+vuVcA9kqx8JJUsbQi6yf1uGRyb7HfpdfUr5qLXf3B/t8dPvcjhKMmlfnP47EzQ==", "optional": true }, "napi-build-utils": { @@ -367,9 +368,9 @@ "integrity": "sha512-X7uHCOCdY4u0yamDxDrv3jF2NtYc8A1nvPzBQgvpoSX+WB3jAe2cVNsY448V1ucq7Whf9Wdy02HEUoLW5rJKWg==" }, "needle": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/needle/-/needle-2.5.0.tgz", - "integrity": "sha512-o/qITSDR0JCyCKEQ1/1bnUXMmznxabbwi/Y4WwJElf+evwJNFNwIDMCCt5IigFVxgeGBJESLohGtIS9gEzo1fA==", + "version": "2.5.2", + "resolved": "https://registry.npmjs.org/needle/-/needle-2.5.2.tgz", + "integrity": "sha512-LbRIwS9BfkPvNwNHlsA41Q29kL2L/6VaOJ0qisM5lLWsTV3nP15abO5ITL6L81zqFhzjRKDAYjpcBcwM0AVvLQ==", "optional": true, "requires": { "debug": "^3.2.6", @@ -378,9 +379,9 @@ }, "dependencies": { "debug": { - "version": "3.2.6", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz", - "integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==", + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", + "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", "optional": true, "requires": { "ms": "^2.1.1" @@ -402,14 +403,14 @@ "integrity": "sha512-ASCL5U13as7HhOExbT6OlWJJUV/lLzL2voOSP1UVehpRD8FbSrSDjfScK/KwAvVTI5AS6r4VwbOMlIqtvRidnA==" }, "node-pre-gyp": { - "version": "0.14.0", - "resolved": "https://registry.npmjs.org/node-pre-gyp/-/node-pre-gyp-0.14.0.tgz", - "integrity": "sha512-+CvDC7ZttU/sSt9rFjix/P05iS43qHCOOGzcr3Ry99bXG7VX953+vFyEuph/tfqoYu8dttBkE86JSKBO2OzcxA==", + "version": "0.15.0", + "resolved": "https://registry.npmjs.org/node-pre-gyp/-/node-pre-gyp-0.15.0.tgz", + "integrity": "sha512-7QcZa8/fpaU/BKenjcaeFF9hLz2+7S9AqyXFhlH/rilsQ/hPZKK32RtR5EQHJElgu+q5RfbJ34KriI79UWaorA==", "optional": true, "requires": { "detect-libc": "^1.0.2", - "mkdirp": "^0.5.1", - "needle": "^2.2.1", + "mkdirp": "^0.5.3", + "needle": "^2.5.0", "nopt": "^4.0.1", "npm-packlist": "^1.1.6", "npmlog": "^4.0.2", diff --git a/package.json b/package.json index 711f0e9..af36a73 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "noble-winrt", "description": "Noble (Node.js Bluetooth LE) bindings for Windows 10", - "version": "0.0.7", + "version": "0.1.0", "author": "gv@timeular.com", "contributors": [ "Yuriy Ackermann " @@ -19,7 +19,7 @@ "node": ">=6.14.2" }, "dependencies": { - "@abandonware/noble": "git+https://github.com/abandonware/noble.git", + "@abandonware/noble": "^1.9.2-10", "bindings": "~1.3.0", "napi-thread-safe-callback": "0.0.6", "node-addon-api": "^2.0.0", From a31a0c89016e74de5aad4551743d71336253302c Mon Sep 17 00:00:00 2001 From: Ackermann Yuriy <1636116+herrjemand@users.noreply.github.com> Date: Tue, 8 Dec 2020 00:09:37 +0200 Subject: [PATCH 19/22] Updated package --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index af36a73..a151335 100644 --- a/package.json +++ b/package.json @@ -4,11 +4,11 @@ "version": "0.1.0", "author": "gv@timeular.com", "contributors": [ - "Yuriy Ackermann " + "Yuriy Ackermann @herrjemand" ], "license": "MIT", "repository": { - "url": "https://github.com/fido-alliance/noble-winrt.git" + "url": "https://github.com/Timeular/noble-winrt.git" }, "main": "index.js", "gypfile": true, From 6d084836e85b934d5d3e5e0b6ad1b4b1574436d0 Mon Sep 17 00:00:00 2001 From: Ackermann Yuriy <1636116+herrjemand@users.noreply.github.com> Date: Mon, 20 Sep 2021 23:18:17 +0300 Subject: [PATCH 20/22] Renamed CHECK_RESULT to CheckResult. Removed lol --- src/ble_manager.cc | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/ble_manager.cc b/src/ble_manager.cc index 3f4b301..e9f5203 100644 --- a/src/ble_manager.cc +++ b/src/ble_manager.cc @@ -43,7 +43,7 @@ template auto bind2(O* object, M method BluetoothLEDevice& _device = *peripheral.device; template -bool CHECK_RESULT(T _result) +bool CheckResult(T _result) { if (!_result) { @@ -282,7 +282,7 @@ void BLEManager::OnServicesDiscovered(IAsyncOperation if (status == AsyncStatus::Completed) { GattDeviceServicesResult& result = asyncOp.GetResults(); - if(CHECK_RESULT(result)) + if(CheckResult(result)) { FOR(service, result.Services()) { @@ -338,7 +338,7 @@ void BLEManager::OnIncludedServicesDiscovered(IAsyncOperation asyncOp, AsyncStatus sta if (status == AsyncStatus::Completed) { GattReadResult& result = asyncOp.GetResults(); - if(CHECK_RESULT(result)) + if(CheckResult(result)) { auto& value = result.Value(); if (value) @@ -523,7 +523,7 @@ void BLEManager::OnWrite(IAsyncOperation asyncOp, AsyncStatus s { auto errorCode = asyncOp.ErrorCode().value; - LOGE("status lol: %d", status); + LOGE("Write:Status: %d", status); LOGE("GattWriteError: %d", errorCode); } } @@ -670,7 +670,7 @@ void BLEManager::OnDescriptorsDiscovered(IAsyncOperation if (status == AsyncStatus::Completed) { auto& result = asyncOp.GetResults(); - if(CHECK_RESULT(result)) + if(CheckResult(result)) { FOR(descriptor, result.Descriptors()) { @@ -725,7 +725,7 @@ void BLEManager::OnReadValue(IAsyncOperation asyncOp, AsyncStatu if (status == AsyncStatus::Completed) { GattReadResult& result = asyncOp.GetResults(); - if(CHECK_RESULT(result)) + if(CheckResult(result)) { auto& value = result.Value(); if (value) @@ -793,7 +793,7 @@ void BLEManager::OnWriteValue(IAsyncOperation asyncOp, AsyncSta } else { - LOGE("status: %d", status); + LOGE("WriteValue:Status: %d", status); } } @@ -814,7 +814,7 @@ void BLEManager::OnReadHandle(IAsyncOperation asyncOp, AsyncStat if (status == AsyncStatus::Completed) { GattReadResult& result = asyncOp.GetResults(); - if(CHECK_RESULT(result)) + if(CheckResult(result)) { auto& value = result.Value(); if (value) From d5458ab76a11ba75ee26b6d4e06f1b34d302d1e4 Mon Sep 17 00:00:00 2001 From: Ackermann Yuriy <1636116+herrjemand@users.noreply.github.com> Date: Mon, 20 Sep 2021 23:18:43 +0300 Subject: [PATCH 21/22] Updated packages --- package-lock.json | 169 ++++++++++++++++++++++++++++------------------ package.json | 2 +- 2 files changed, 103 insertions(+), 68 deletions(-) diff --git a/package-lock.json b/package-lock.json index 5f72949..bc5cced 100644 --- a/package-lock.json +++ b/package-lock.json @@ -5,26 +5,33 @@ "requires": true, "dependencies": { "@abandonware/bluetooth-hci-socket": { - "version": "0.5.3-6", - "resolved": "https://registry.npmjs.org/@abandonware/bluetooth-hci-socket/-/bluetooth-hci-socket-0.5.3-6.tgz", - "integrity": "sha512-LwZtu31vgcm6T4GRtHDCye1JZepvjfqW418DYccgcu4podXbBoogkt4NhRP6rnoOxY+49F1Do7oK5K8fModxuw==", + "version": "0.5.3-7", + "resolved": "https://registry.npmjs.org/@abandonware/bluetooth-hci-socket/-/bluetooth-hci-socket-0.5.3-7.tgz", + "integrity": "sha512-CaGDBeXEooRjaVJlgmnaWeI+MXlEBVN9705tp2GHCF2IFARH3h15lqf6eHjqFsdpQOiMWiBa/QZUAOGjzBrhmA==", "optional": true, "requires": { - "debug": "^4.2.0", - "nan": "^2.14.1", - "node-pre-gyp": "^0.15.0", + "debug": "^4.3.1", + "nan": "^2.14.2", + "node-pre-gyp": "^0.17.0", "usb": "^1.6.3" } }, "@abandonware/noble": { - "version": "1.9.2-10", - "resolved": "https://registry.npmjs.org/@abandonware/noble/-/noble-1.9.2-10.tgz", - "integrity": "sha512-V43V5kDlDCfM8PK88QTqFZU+UmJheuwJS0sH4X8pu3ZnlH1cF2CXaskO+tjUE6POmB+EFLNKfm8dSnJOkWohjQ==", + "version": "1.9.2-14", + "resolved": "https://registry.npmjs.org/@abandonware/noble/-/noble-1.9.2-14.tgz", + "integrity": "sha512-zSHu2gHs6TpCS3QRzvOpOsKkiGW7MZzhjtmScTj1EjaK2DMpSkfZrmGdSB1z34nOZuVeo+2XnYzyHbcg0tb1Cg==", "requires": { - "@abandonware/bluetooth-hci-socket": "^0.5.3-5", - "debug": "^4.1.1", + "@abandonware/bluetooth-hci-socket": "^0.5.3-7", + "debug": "^4.3.1", "napi-thread-safe-callback": "0.0.6", - "node-addon-api": "^2.0.0" + "node-addon-api": "^3.2.0" + }, + "dependencies": { + "node-addon-api": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-3.2.1.tgz", + "integrity": "sha512-mmcei9JghVNDYydghQmeDX8KoAm0FAiYyIcUt/N4nhyAipB17pllZQDOJD2fotxABnt4Mdz+dKTO7eftLg4d0A==" + } } }, "abbrev": { @@ -53,9 +60,9 @@ } }, "balanced-match": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", - "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", "optional": true }, "base64-js": { @@ -136,9 +143,9 @@ "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=" }, "debug": { - "version": "4.3.1", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.1.tgz", - "integrity": "sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ==", + "version": "4.3.2", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.2.tgz", + "integrity": "sha512-mOp8wKcvj7XxC78zLgw/ZA+6TSgkoE2C/ienthhRD298T7UNwAg9diBpLRxC0mOezLl4B0xV7M0cCO6P/O0Xhw==", "requires": { "ms": "2.1.2" } @@ -226,9 +233,9 @@ "integrity": "sha1-l/tdlr/eiXMxPyDoKI75oWf6ZM4=" }, "glob": { - "version": "7.1.6", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz", - "integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==", + "version": "7.1.7", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.7.tgz", + "integrity": "sha512-OvD9ENzPLbegENnYP5UUfJIirTg4+XwMWGaQfQTY0JenxNvvIKP3U3/tAQSPIu/lHxXYSZmpXlUHeqAIdKzBLQ==", "optional": true, "requires": { "fs.realpath": "^1.0.0", @@ -259,9 +266,9 @@ "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==" }, "ignore-walk": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/ignore-walk/-/ignore-walk-3.0.3.tgz", - "integrity": "sha512-m7o6xuOaT1aqheYHKf8W6J5pYH85ZI9w077erOzLje3JsB1gkafkAhHHY19dqjulgIZHFm32Cp5uNZgcQqdJKw==", + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/ignore-walk/-/ignore-walk-3.0.4.tgz", + "integrity": "sha512-PY6Ii8o1jMRA1z4F2hRkH/xN59ox43DavKvD3oDpfurRlOJyAHpifIwpbdv1n4jt4ov0jSpw3kQ4GhJnpBL6WQ==", "optional": true, "requires": { "minimatch": "^3.0.4" @@ -283,9 +290,9 @@ "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" }, "ini": { - "version": "1.3.5", - "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.5.tgz", - "integrity": "sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw==" + "version": "1.3.8", + "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz", + "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==" }, "is-fullwidth-code-point": { "version": "1.0.0", @@ -352,9 +359,9 @@ "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" }, "nan": { - "version": "2.14.2", - "resolved": "https://registry.npmjs.org/nan/-/nan-2.14.2.tgz", - "integrity": "sha512-M2ufzIiINKCuDfBSAUr1vWQ+vuVcA9kqx8JJUsbQi6yf1uGRyb7HfpdfUr5qLXf3B/t8dPvcjhKMmlfnP47EzQ==", + "version": "2.15.0", + "resolved": "https://registry.npmjs.org/nan/-/nan-2.15.0.tgz", + "integrity": "sha512-8ZtvEnA2c5aYCZYd1cvgdnU6cqwixRoYg70xPLWUws5ORTa/lnw+u4amixRS/Ac5U5mQVgp9pnlSUnbNWFaWZQ==", "optional": true }, "napi-build-utils": { @@ -368,9 +375,9 @@ "integrity": "sha512-X7uHCOCdY4u0yamDxDrv3jF2NtYc8A1nvPzBQgvpoSX+WB3jAe2cVNsY448V1ucq7Whf9Wdy02HEUoLW5rJKWg==" }, "needle": { - "version": "2.5.2", - "resolved": "https://registry.npmjs.org/needle/-/needle-2.5.2.tgz", - "integrity": "sha512-LbRIwS9BfkPvNwNHlsA41Q29kL2L/6VaOJ0qisM5lLWsTV3nP15abO5ITL6L81zqFhzjRKDAYjpcBcwM0AVvLQ==", + "version": "2.9.1", + "resolved": "https://registry.npmjs.org/needle/-/needle-2.9.1.tgz", + "integrity": "sha512-6R9fqJ5Zcmf+uYaFgdIHmLwNldn5HbK8L5ybn7Uz+ylX/rnOsSp1AHcvQSrCaFN+qNM1wpymHqD7mVasEOlHGQ==", "optional": true, "requires": { "debug": "^3.2.6", @@ -403,21 +410,32 @@ "integrity": "sha512-ASCL5U13as7HhOExbT6OlWJJUV/lLzL2voOSP1UVehpRD8FbSrSDjfScK/KwAvVTI5AS6r4VwbOMlIqtvRidnA==" }, "node-pre-gyp": { - "version": "0.15.0", - "resolved": "https://registry.npmjs.org/node-pre-gyp/-/node-pre-gyp-0.15.0.tgz", - "integrity": "sha512-7QcZa8/fpaU/BKenjcaeFF9hLz2+7S9AqyXFhlH/rilsQ/hPZKK32RtR5EQHJElgu+q5RfbJ34KriI79UWaorA==", + "version": "0.17.0", + "resolved": "https://registry.npmjs.org/node-pre-gyp/-/node-pre-gyp-0.17.0.tgz", + "integrity": "sha512-abzZt1hmOjkZez29ppg+5gGqdPLUuJeAEwVPtHYEJgx0qzttCbcKFpxrCQn2HYbwCv2c+7JwH4BgEzFkUGpn4A==", "optional": true, "requires": { - "detect-libc": "^1.0.2", - "mkdirp": "^0.5.3", - "needle": "^2.5.0", - "nopt": "^4.0.1", - "npm-packlist": "^1.1.6", - "npmlog": "^4.0.2", - "rc": "^1.2.7", - "rimraf": "^2.6.1", - "semver": "^5.3.0", - "tar": "^4.4.2" + "detect-libc": "^1.0.3", + "mkdirp": "^0.5.5", + "needle": "^2.5.2", + "nopt": "^4.0.3", + "npm-packlist": "^1.4.8", + "npmlog": "^4.1.2", + "rc": "^1.2.8", + "rimraf": "^2.7.1", + "semver": "^5.7.1", + "tar": "^4.4.13" + }, + "dependencies": { + "mkdirp": { + "version": "0.5.5", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.5.tgz", + "integrity": "sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ==", + "optional": true, + "requires": { + "minimist": "^1.2.5" + } + } } }, "noop-logger": { @@ -436,9 +454,9 @@ } }, "npm-bundled": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/npm-bundled/-/npm-bundled-1.1.1.tgz", - "integrity": "sha512-gqkfgGePhTpAEgUsGEgcq1rqPXA+tv/aVBlgEzfXwA1yiUJF7xtEt3CtVwOjNYQOVknDk0F20w58Fnm3EtG0fA==", + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/npm-bundled/-/npm-bundled-1.1.2.tgz", + "integrity": "sha512-x5DHup0SuyQcmL3s7Rx/YQ8sbw/Hzg0rj48eN0dV7hf5cmQq5PXIeioroH3raV1QC1yh3uTYuMThvEQF3iKgGQ==", "optional": true, "requires": { "npm-normalize-package-bin": "^1.0.1" @@ -667,18 +685,35 @@ "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=" }, "tar": { - "version": "4.4.13", - "resolved": "https://registry.npmjs.org/tar/-/tar-4.4.13.tgz", - "integrity": "sha512-w2VwSrBoHa5BsSyH+KxEqeQBAllHhccyMFVHtGtdMpF4W7IRWfZjFiQceJPChOeTsSDVUpER2T8FA93pr0L+QA==", + "version": "4.4.19", + "resolved": "https://registry.npmjs.org/tar/-/tar-4.4.19.tgz", + "integrity": "sha512-a20gEsvHnWe0ygBY8JbxoM4w3SJdhc7ZAuxkLqh+nvNQN2IOt0B5lLgM490X5Hl8FF0dl0tOf2ewFYAlIFgzVA==", "optional": true, "requires": { - "chownr": "^1.1.1", - "fs-minipass": "^1.2.5", - "minipass": "^2.8.6", - "minizlib": "^1.2.1", - "mkdirp": "^0.5.0", - "safe-buffer": "^5.1.2", - "yallist": "^3.0.3" + "chownr": "^1.1.4", + "fs-minipass": "^1.2.7", + "minipass": "^2.9.0", + "minizlib": "^1.3.3", + "mkdirp": "^0.5.5", + "safe-buffer": "^5.2.1", + "yallist": "^3.1.1" + }, + "dependencies": { + "mkdirp": { + "version": "0.5.5", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.5.tgz", + "integrity": "sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ==", + "optional": true, + "requires": { + "minimist": "^1.2.5" + } + }, + "safe-buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", + "optional": true + } } }, "tar-fs": { @@ -725,13 +760,13 @@ } }, "usb": { - "version": "1.6.3", - "resolved": "https://registry.npmjs.org/usb/-/usb-1.6.3.tgz", - "integrity": "sha512-23KYMjaWydACd8wgGKMQ4MNwFspAT6Xeim4/9Onqe5Rz/nMb4TM/WHL+qPT0KNFxzNKzAs63n1xQWGEtgaQ2uw==", + "version": "1.7.2", + "resolved": "https://registry.npmjs.org/usb/-/usb-1.7.2.tgz", + "integrity": "sha512-SfVSItgsD9+YfEpcK1UZ8tQ7e8GdxQ0xoQtB773omNBKTVj3IuFJNKjwSnpE58FGcV4tUoKLHmBMc018RUY5SA==", "optional": true, "requires": { "bindings": "^1.4.0", - "nan": "2.13.2", + "node-addon-api": "3.0.2", "prebuild-install": "^5.3.3" }, "dependencies": { @@ -744,10 +779,10 @@ "file-uri-to-path": "1.0.0" } }, - "nan": { - "version": "2.13.2", - "resolved": "https://registry.npmjs.org/nan/-/nan-2.13.2.tgz", - "integrity": "sha512-TghvYc72wlMGMVMluVo9WRJc0mB8KxxF/gZ4YYFy7V2ZQX9l7rgbPg7vjS9mt6U5HXODVFVI2bOduCzwOMv/lw==", + "node-addon-api": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-3.0.2.tgz", + "integrity": "sha512-+D4s2HCnxPd5PjjI0STKwncjXTUKKqm74MDMz9OPXavjsGmjkvwgLtA5yoxJUdmpj52+2u+RrXgPipahKczMKg==", "optional": true } } diff --git a/package.json b/package.json index a151335..ee8a4c1 100644 --- a/package.json +++ b/package.json @@ -19,7 +19,7 @@ "node": ">=6.14.2" }, "dependencies": { - "@abandonware/noble": "^1.9.2-10", + "@abandonware/noble": "^1.9.2-14", "bindings": "~1.3.0", "napi-thread-safe-callback": "0.0.6", "node-addon-api": "^2.0.0", From 96b41d91dfc734d43936ffd09dac2ce8ab2aa146 Mon Sep 17 00:00:00 2001 From: Ackermann Yuriy <1636116+herrjemand@users.noreply.github.com> Date: Mon, 20 Sep 2021 23:19:20 +0300 Subject: [PATCH 22/22] Bumped version up --- package-lock.json | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package-lock.json b/package-lock.json index bc5cced..bbb737e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "noble-winrt", - "version": "0.1.0", + "version": "0.2.0", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index ee8a4c1..8cd17e2 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "noble-winrt", "description": "Noble (Node.js Bluetooth LE) bindings for Windows 10", - "version": "0.1.0", + "version": "0.2.0", "author": "gv@timeular.com", "contributors": [ "Yuriy Ackermann @herrjemand"