Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

qcloud-iotexplorer-bluetooth-adapter

Package Overview
Dependencies
Maintainers
5
Versions
164
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

qcloud-iotexplorer-bluetooth-adapter - npm Package Compare versions

Comparing version 0.11.2-alpha.0 to 0.12.0

2

lib/miniprogram/BlueToothAdapter4Mp.js

@@ -1,2 +0,2 @@

"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.BlueToothAdapter4Mp=void 0;var tslib_1=require("tslib"),base_1=require("../base"),qcloud_iotexplorer_appdev_sdk_1=require("qcloud-iotexplorer-appdev-sdk"),_a=qcloud_iotexplorer_appdev_sdk_1.AppDevSdk.utils,arrayBufferToHexStringArray=_a.arrayBufferToHexStringArray,hexToArrayBuffer=_a.hexToArrayBuffer,parseAdvertisData=function(e){var t=tslib_1.__assign({},e);if(t.advertisData)try{t.advertisData=arrayBufferToHexStringArray(t.advertisData)}catch(e){console.error("Parse bluetoothe device advertisData fail",e)}return t},BlueToothAdapter4Mp=function(e){function t(t){var o=t.bluetoothApi,n=tslib_1.__rest(t,["bluetoothApi"]),s=e.call(this,tslib_1.__assign({bluetoothApi:o},n))||this;return s._h5ChanelOpened=!1,s._localDiscoveringInUse=!1,s._h5DiscoveringInUse=!1,s._cleanupTimer=null,s._currentProductId="",s.handleH5WsMessage=null,s.deviceDelayDisconnectQueue=[],s._mpBleConnectionStateCache={},s._h5Websocket&&"function"==typeof s._h5Websocket.on&&(s.on("adapterStateChange",(function(e){var t=e.available,o=e.discovering;s.response2BlueToothChanel("onBluetoothAdapterStateChange",{available:t,discovering:o})})),s._h5Websocket.on("message",(function(e){var t=e.data,o=e.reqId;return tslib_1.__awaiter(s,void 0,void 0,(function(){var e,n,s,r,i,c,a,l,u,h,d,p,v,_,g,f,D,y=this;return tslib_1.__generator(this,(function(C){switch(C.label){case 0:if(console.log("bluetooth ws on message",t),"function"==typeof this.handleH5WsMessage)try{if(this.handleH5WsMessage({data:t,reqId:o}))return console.log("h5 message already handled by handleH5WsMessage implement."),[2]}catch(e){console.error("call handleH5WsMessage error",e)}switch(e=t.action,n=t.payload,e){case"reportDeviceConnectStatus":return[3,1];case"syncDeviceConnectStatus":return[3,2];case"bindDevice":return[3,3];case"registryDevice":return[3,7];case"connect":return[3,11];case"disconnect":return[3,12];case"init":return[3,13];case"callApi":return[3,17]}return[3,32];case 1:return s=n.connected,r=n.explorerDeviceId,i=n.deviceId,this.onDeviceConnectStatusChange({connected:s,explorerDeviceId:r,deviceId:i}),[3,32];case 2:c=n.devices,(_=void 0===c?[]:c).forEach((function(e){var t=e.deviceId,o=e.connected,n=y._mpBleConnectionStateCache[t]||!1;n!==o&&(console.log("[syncDeviceConnectStatus] deviceId="+t+",","h5.connected="+o+", actualConnected="+n),y.response2BlueToothChanel("onBLEConnectionStateChange",{deviceId:t,connected:n}))})),C.label=3;case 3:return C.trys.push([3,5,,6]),l=n.deviceName,u=n.productId,[4,this._actions.bindDevice({productId:this.devMode&&u?u:this._currentProductId,deviceName:l})];case 4:return C.sent(),this.response2BlueToothChanel("response",{code:0},o),[3,6];case 5:return a=C.sent(),this.response2BlueToothChanel("response",a,o),[3,6];case 6:return[3,32];case 7:return C.trys.push([7,9,,10]),l=n.deviceName,u=n.productId,[4,this._actions.registerDevice({productId:this.devMode&&u?u:this._currentProductId,deviceName:l})];case 8:return C.sent(),this.response2BlueToothChanel("response",{code:0},o),[3,10];case 9:return h=C.sent(),this.response2BlueToothChanel("response",h,o),[3,10];case 10:return[3,32];case 11:return console.log("h5chanel opened"),this._h5ChanelOpened=!0,[3,32];case 12:return console.log("h5chanel closed"),this._h5ChanelOpened=!1,this._h5DiscoveringInUse&&this.stopBluetoothDevicesDiscovery(!0),[3,32];case 13:return C.trys.push([13,15,,16]),[4,this.init()];case 14:return C.sent(),this.response2BlueToothChanel("response",{code:0},o),[3,16];case 15:return d=C.sent(),this.response2BlueToothChanel("response",d,o),[3,16];case 16:return[3,32];case 17:p=n.api,v=n.params,C.label=18;case 18:switch(C.trys.push([18,30,,31]),console.log("call api",p,v),p){case"createBLEConnection":return[3,19];case"getBluetoothDevices":return[3,21];case"writeBLECharacteristicValue":return[3,23];case"startBluetoothDevicesDiscovery":return[3,25];case"stopBluetoothDevicesDiscovery":return[3,27]}return[3,29];case 19:return this.tryCancelDisconnectDevice(v.deviceId),[4,this._bluetoothApi.createBLEConnection(v)];case 20:return C.sent(),this.response2BlueToothChanel("response",{},o),[2];case 21:return[4,this.getBluetoothDevices()];case 22:return _=C.sent(),this.response2BlueToothChanel("response",{devices:_.map(parseAdvertisData)},o),[2];case 23:return g=v.value,console.log("calling writeBLECharacteristicValue",tslib_1.__assign(tslib_1.__assign({},v),{value:hexToArrayBuffer(g)})),[4,this._bluetoothApi.writeBLECharacteristicValue(tslib_1.__assign(tslib_1.__assign({},v),{value:hexToArrayBuffer(g)}))];case 24:return f=C.sent(),this.response2BlueToothChanel("response",f,o),[2];case 25:return[4,this.startBluetoothDevicesDiscovery(!0)];case 26:return f=C.sent(),this.response2BlueToothChanel("response",f,o),[2];case 27:return[4,this.stopBluetoothDevicesDiscovery(!0)];case 28:return f=C.sent(),this.response2BlueToothChanel("response",f,o),[2];case 29:return[3,31];case 30:return D=C.sent(),console.error("[BlueToothAdapter4Mp] call bluetoothApi fail",D),this.response2BlueToothChanel("response",this._normalizeError(D),o),[3,31];case 31:return wx[p]&&wx[p](tslib_1.__assign(tslib_1.__assign({},v),{success:function(e){console.log("[BlueToothAdapter4Mp] call wx api success",e),y.response2BlueToothChanel("response",e,o)},fail:function(e){console.log("call api fail",e),y.response2BlueToothChanel("response",y._normalizeError(e),o)}})),[3,32];case 32:return[2]}}))}))}))),s}return tslib_1.__extends(t,e),t.prototype.tryCancelDisconnectDevice=function(e){var t=this.deviceDelayDisconnectQueue.findIndex((function(t){return t.deviceId===e}));if(t>-1){var o=this.deviceDelayDisconnectQueue[t];return clearTimeout(o.timer),this.deviceDelayDisconnectQueue.splice(t,1),console.log("Cancel disconnect device: "+e),!0}return console.log("Try cancel disconnect device: "+e+", but not found in queue, maybe it's already disconnected"),!1},t.prototype.disconnectDevice=function(e,t){var o=this,n=e.deviceId,s=e.explorerDeviceId;void 0===t&&(t=0),console.log("call disconnectDevice",{deviceId:n,explorerDeviceId:s});var r=this._deviceConnectStatusStore.get({deviceId:n,explorerDeviceId:s});if(null==r?void 0:r.connected)if(t>0){var i=setTimeout((function(){console.log("execute closeBLEConnection for deviceId: "+n+" after "+t+"ms"),o._bluetoothApi.closeBLEConnection({deviceId:n})}),t);console.log("Will disconnect device: "+n+" after "+t+"ms..."),this.deviceDelayDisconnectQueue.push({deviceId:n,timer:i})}else this._bluetoothApi.closeBLEConnection({deviceId:n});else console.log("call disconnectDevice, but device maybe not connected",r,this._deviceConnectStatusStore.getAll())},t.prototype.setCurrentProduct=function(e){this._currentProductId=e},t.prototype.startBluetoothDevicesDiscovery=function(t){return void 0===t&&(t=!1),t?this._h5DiscoveringInUse=!0:this._localDiscoveringInUse=!0,e.prototype.startBluetoothDevicesDiscovery.call(this)},t.prototype.stopBluetoothDevicesDiscovery=function(t){if(void 0===t&&(t=!1),console.log("try call stopBluetoothDevicesDiscovery,\n isFromH5: "+t+", _h5DiscoveringInUse: "+this._h5DiscoveringInUse+",\n _localDiscoveringInUse: "+this._localDiscoveringInUse),t?this._h5DiscoveringInUse=!1:this._localDiscoveringInUse=!1,this._h5DiscoveringInUse||!this._localDiscoveringInUse)return e.prototype.stopBluetoothDevicesDiscovery.call(this)},t.prototype.response2BlueToothChanel=function(e,t,o){return void 0===t&&(t={}),void 0===o&&(o=""),tslib_1.__awaiter(this,void 0,void 0,(function(){var n;return tslib_1.__generator(this,(function(s){switch(s.label){case 0:return s.trys.push([0,2,,3]),this._h5ChanelOpened?(console.log("response2BlueToothChanel",e,t),[4,this._h5Websocket.send("Response",{action:e,payload:t},{reqId:o})]):(console.log("h5 chanel not opened"),[2]);case 1:return s.sent(),[3,3];case 2:return n=s.sent(),console.warn("try send bluetooth message fail",n),[3,3];case 3:return[2]}}))}))},t.prototype.startCleanupTimer=function(){var e=this;clearTimeout(this._cleanupTimer),console.log("start cleanup timer"),this._cleanupTimer=setTimeout((function(){var t=e._deviceAdapterStore.getAll().filter((function(e){return e.isConnected}));console.log("bluetooth searching or deviceMap not empty, reset cleanup timer",e._discovering,t),e._h5ChanelOpened||e._discovering||t.length?e.startCleanupTimer():e.cleanup()}),3e4)},t.prototype.init=function(){return tslib_1.__awaiter(this,void 0,void 0,(function(){var t=this;return tslib_1.__generator(this,(function(o){return[2,e.prototype.init.call(this).then((function(){return t.startCleanupTimer()}))]}))}))},t.prototype.onBleConnectionStateChange=function(t){var o=t.deviceId,n=t.connected;return this.response2BlueToothChanel("onBLEConnectionStateChange",{deviceId:o,connected:n}),this._mpBleConnectionStateCache[o]=n,e.prototype.onBleConnectionStateChange.call(this,{deviceId:o,connected:n})},t.prototype.onBLECharacteristicValueChange=function(t){var o=t.deviceId,n=t.serviceId,s=t.characteristicId,r=t.value;return this.response2BlueToothChanel("onBLECharacteristicValueChange",{deviceId:o,serviceId:n,characteristicId:s,value:arrayBufferToHexStringArray(r)}),e.prototype.onBLECharacteristicValueChange.call(this,{deviceId:o,serviceId:n,characteristicId:s,value:r})},t.prototype.onBluetoothDeviceFound=function(t){return tslib_1.__awaiter(this,void 0,void 0,(function(){var o;return tslib_1.__generator(this,(function(n){switch(n.label){case 0:return[4,e.prototype.onBluetoothDeviceFound.call(this,t)];case 1:return o=n.sent(),this.response2BlueToothChanel("onBluetoothDeviceFound",{devices:o.map(parseAdvertisData)}),[2]}}))}))},t.prototype.startSearch=function(t){return tslib_1.__awaiter(this,void 0,void 0,(function(){return tslib_1.__generator(this,(function(o){switch(o.label){case 0:return[4,e.prototype.startSearch.call(this,t)];case 1:return o.sent(),this.startCleanupTimer(),[2]}}))}))},t.prototype.searchDevice=function(t){return tslib_1.__awaiter(this,void 0,void 0,(function(){var o;return tslib_1.__generator(this,(function(n){switch(n.label){case 0:return[4,e.prototype.searchDevice.call(this,t)];case 1:return o=n.sent(),this.startCleanupTimer(),[2,o]}}))}))},t.prototype.cleanup=function(t){e.prototype.cleanup.call(this,t),this._mpBleConnectionStateCache={}},t}(base_1.BlueToothAdapter);exports.BlueToothAdapter4Mp=BlueToothAdapter4Mp;
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.BlueToothAdapter4Mp=void 0;var tslib_1=require("tslib"),base_1=require("../base"),qcloud_iotexplorer_appdev_sdk_1=require("qcloud-iotexplorer-appdev-sdk"),_a=qcloud_iotexplorer_appdev_sdk_1.AppDevSdk.utils,arrayBufferToHexStringArray=_a.arrayBufferToHexStringArray,hexToArrayBuffer=_a.hexToArrayBuffer,parseAdvertisData=function(e){var t=tslib_1.__assign({},e);if(t.advertisData)try{t.advertisData=arrayBufferToHexStringArray(t.advertisData)}catch(e){console.error("Parse bluetoothe device advertisData fail",e)}return t},BlueToothAdapter4Mp=function(e){function t(t){var o=t.bluetoothApi,n=tslib_1.__rest(t,["bluetoothApi"]),s=e.call(this,tslib_1.__assign({bluetoothApi:o},n))||this;return s._h5ChanelOpened=!1,s._localDiscoveringInUse=!1,s._h5DiscoveringInUse=!1,s._cleanupTimer=null,s._currentProductId="",s.handleH5WsMessage=null,s.deviceDelayDisconnectQueue=[],s._mpBleConnectionStateCache={},s._h5Websocket&&"function"==typeof s._h5Websocket.on&&(s.on("adapterStateChange",(function(e){var t=e.available,o=e.discovering;s.response2BlueToothChanel("onBluetoothAdapterStateChange",{available:t,discovering:o})})),s._h5Websocket.on("message",(function(e){var t=e.data,o=e.reqId;return tslib_1.__awaiter(s,void 0,void 0,(function(){var e,n,s,r,i,c,a,l,u,h,d,p,v,_,g,f,D,y=this;return tslib_1.__generator(this,(function(C){switch(C.label){case 0:if(console.log("bluetooth ws on message",t),"function"==typeof this.handleH5WsMessage)try{if(this.handleH5WsMessage({data:t,reqId:o}))return console.log("h5 message already handled by handleH5WsMessage implement."),[2]}catch(e){console.error("call handleH5WsMessage error",e)}switch(e=t.action,n=t.payload,e){case"reportDeviceConnectStatus":return[3,1];case"syncDeviceConnectStatus":return[3,2];case"bindDevice":return[3,3];case"registryDevice":return[3,7];case"connect":return[3,11];case"disconnect":return[3,12];case"init":return[3,13];case"callApi":return[3,17]}return[3,32];case 1:return s=n.connected,r=n.explorerDeviceId,i=n.deviceId,this.onDeviceConnectStatusChange({connected:s,explorerDeviceId:r,deviceId:i}),[3,32];case 2:c=n.devices,(_=void 0===c?[]:c).forEach((function(e){var t=e.deviceId,o=e.connected,n=y._mpBleConnectionStateCache[t]||!1;n!==o&&(console.log("[syncDeviceConnectStatus] deviceId="+t+",","h5.connected="+o+", actualConnected="+n),y.response2BlueToothChanel("onBLEConnectionStateChange",{deviceId:t,connected:n}))})),C.label=3;case 3:return C.trys.push([3,5,,6]),l=n.deviceName,u=n.productId,[4,this._actions.bindDevice({productId:this.devMode&&u?u:this._currentProductId,deviceName:l})];case 4:return C.sent(),this.response2BlueToothChanel("response",{code:0},o),[3,6];case 5:return a=C.sent(),this.response2BlueToothChanel("response",a,o),[3,6];case 6:return[3,32];case 7:return C.trys.push([7,9,,10]),l=n.deviceName,u=n.productId,[4,this._actions.registerDevice({productId:this.devMode&&u?u:this._currentProductId,deviceName:l})];case 8:return C.sent(),this.response2BlueToothChanel("response",{code:0},o),[3,10];case 9:return h=C.sent(),this.response2BlueToothChanel("response",h,o),[3,10];case 10:return[3,32];case 11:return console.log("h5chanel opened"),this._h5ChanelOpened=!0,[3,32];case 12:return console.log("h5chanel closed"),this._h5ChanelOpened=!1,this._h5DiscoveringInUse&&this.stopBluetoothDevicesDiscovery(!0),[3,32];case 13:return C.trys.push([13,15,,16]),[4,this.init()];case 14:return C.sent(),this.response2BlueToothChanel("response",{code:0},o),[3,16];case 15:return d=C.sent(),this.response2BlueToothChanel("response",d,o),[3,16];case 16:return[3,32];case 17:p=n.api,v=n.params,C.label=18;case 18:switch(C.trys.push([18,30,,31]),console.log("call api",p,v),p){case"createBLEConnection":return[3,19];case"getBluetoothDevices":return[3,21];case"writeBLECharacteristicValue":return[3,23];case"startBluetoothDevicesDiscovery":return[3,25];case"stopBluetoothDevicesDiscovery":return[3,27]}return[3,29];case 19:return this.tryCancelDisconnectDevice(v.deviceId),[4,this._bluetoothApi.createBLEConnection(v)];case 20:return C.sent(),this.response2BlueToothChanel("response",{},o),[2];case 21:return[4,this.getBluetoothDevices()];case 22:return _=C.sent(),this.response2BlueToothChanel("response",{devices:_.map(parseAdvertisData)},o),[2];case 23:return g=v.value,console.log("calling writeBLECharacteristicValue",tslib_1.__assign(tslib_1.__assign({},v),{value:hexToArrayBuffer(g)})),[4,this._bluetoothApi.writeBLECharacteristicValue(tslib_1.__assign(tslib_1.__assign({},v),{value:hexToArrayBuffer(g)}))];case 24:return f=C.sent(),this.response2BlueToothChanel("response",f,o),[2];case 25:return[4,this.startBluetoothDevicesDiscovery(!0)];case 26:return f=C.sent(),this.response2BlueToothChanel("response",f,o),[2];case 27:return[4,this.stopBluetoothDevicesDiscovery(!0)];case 28:return f=C.sent(),this.response2BlueToothChanel("response",f,o),[2];case 29:return[3,31];case 30:return D=C.sent(),console.error("[BlueToothAdapter4Mp] call bluetoothApi fail",D),this.response2BlueToothChanel("response",this._normalizeError(D),o),[2];case 31:return wx[p]&&wx[p](tslib_1.__assign(tslib_1.__assign({},v),{success:function(e){console.log("[BlueToothAdapter4Mp] call wx api success",e),y.response2BlueToothChanel("response",e,o)},fail:function(e){console.log("call api fail",e),y.response2BlueToothChanel("response",y._normalizeError(e),o)}})),[3,32];case 32:return[2]}}))}))}))),s}return tslib_1.__extends(t,e),t.prototype.tryCancelDisconnectDevice=function(e){var t=this.deviceDelayDisconnectQueue.findIndex((function(t){return t.deviceId===e}));if(t>-1){var o=this.deviceDelayDisconnectQueue[t];return clearTimeout(o.timer),this.deviceDelayDisconnectQueue.splice(t,1),console.log("Cancel disconnect device: "+e),!0}return console.log("Try cancel disconnect device: "+e+", but not found in queue, maybe it's already disconnected"),!1},t.prototype.disconnectDevice=function(e,t){var o=this,n=e.deviceId,s=e.explorerDeviceId;void 0===t&&(t=0),console.log("call disconnectDevice",{deviceId:n,explorerDeviceId:s});var r=this._deviceConnectStatusStore.get({deviceId:n,explorerDeviceId:s});if(null==r?void 0:r.connected)if(t>0){var i=setTimeout((function(){console.log("execute closeBLEConnection for deviceId: "+n+" after "+t+"ms"),o._bluetoothApi.closeBLEConnection({deviceId:n})}),t);console.log("Will disconnect device: "+n+" after "+t+"ms..."),this.deviceDelayDisconnectQueue.push({deviceId:n,timer:i})}else this._bluetoothApi.closeBLEConnection({deviceId:n});else console.log("call disconnectDevice, but device maybe not connected",r,this._deviceConnectStatusStore.getAll())},t.prototype.setCurrentProduct=function(e){this._currentProductId=e},t.prototype.startBluetoothDevicesDiscovery=function(t){return void 0===t&&(t=!1),t?this._h5DiscoveringInUse=!0:this._localDiscoveringInUse=!0,e.prototype.startBluetoothDevicesDiscovery.call(this)},t.prototype.stopBluetoothDevicesDiscovery=function(t){if(void 0===t&&(t=!1),console.log("try call stopBluetoothDevicesDiscovery,\n isFromH5: "+t+", _h5DiscoveringInUse: "+this._h5DiscoveringInUse+",\n _localDiscoveringInUse: "+this._localDiscoveringInUse),t?this._h5DiscoveringInUse=!1:this._localDiscoveringInUse=!1,this._h5DiscoveringInUse||!this._localDiscoveringInUse)return e.prototype.stopBluetoothDevicesDiscovery.call(this)},t.prototype.response2BlueToothChanel=function(e,t,o){return void 0===t&&(t={}),void 0===o&&(o=""),tslib_1.__awaiter(this,void 0,void 0,(function(){var n;return tslib_1.__generator(this,(function(s){switch(s.label){case 0:return s.trys.push([0,2,,3]),this._h5ChanelOpened?(console.log("response2BlueToothChanel",e,t),[4,this._h5Websocket.send("Response",{action:e,payload:t},{reqId:o})]):(console.log("h5 chanel not opened"),[2]);case 1:return s.sent(),[3,3];case 2:return n=s.sent(),console.warn("try send bluetooth message fail",n),[3,3];case 3:return[2]}}))}))},t.prototype.startCleanupTimer=function(){var e=this;clearTimeout(this._cleanupTimer),console.log("start cleanup timer"),this._cleanupTimer=setTimeout((function(){var t=e._deviceAdapterStore.getAll().filter((function(e){return e.isConnected}));console.log("bluetooth searching or deviceMap not empty, reset cleanup timer",e._discovering,t),e._h5ChanelOpened||e._discovering||t.length?e.startCleanupTimer():e.cleanup()}),3e4)},t.prototype.init=function(){return tslib_1.__awaiter(this,void 0,void 0,(function(){var t=this;return tslib_1.__generator(this,(function(o){return[2,e.prototype.init.call(this).then((function(){return t.startCleanupTimer()}))]}))}))},t.prototype.onBleConnectionStateChange=function(t){var o=t.deviceId,n=t.connected;return this.response2BlueToothChanel("onBLEConnectionStateChange",{deviceId:o,connected:n}),this._mpBleConnectionStateCache[o]=n,e.prototype.onBleConnectionStateChange.call(this,{deviceId:o,connected:n})},t.prototype.onBLECharacteristicValueChange=function(t){var o=t.deviceId,n=t.serviceId,s=t.characteristicId,r=t.value;return this.response2BlueToothChanel("onBLECharacteristicValueChange",{deviceId:o,serviceId:n,characteristicId:s,value:arrayBufferToHexStringArray(r)}),e.prototype.onBLECharacteristicValueChange.call(this,{deviceId:o,serviceId:n,characteristicId:s,value:r})},t.prototype.onBluetoothDeviceFound=function(t){return tslib_1.__awaiter(this,void 0,void 0,(function(){var o;return tslib_1.__generator(this,(function(n){switch(n.label){case 0:return[4,e.prototype.onBluetoothDeviceFound.call(this,t)];case 1:return o=n.sent(),this.response2BlueToothChanel("onBluetoothDeviceFound",{devices:o.map(parseAdvertisData)}),[2]}}))}))},t.prototype.startSearch=function(t){return tslib_1.__awaiter(this,void 0,void 0,(function(){return tslib_1.__generator(this,(function(o){switch(o.label){case 0:return[4,e.prototype.startSearch.call(this,t)];case 1:return o.sent(),this.startCleanupTimer(),[2]}}))}))},t.prototype.searchDevice=function(t){return tslib_1.__awaiter(this,void 0,void 0,(function(){var o;return tslib_1.__generator(this,(function(n){switch(n.label){case 0:return[4,e.prototype.searchDevice.call(this,t)];case 1:return o=n.sent(),this.startCleanupTimer(),[2,o]}}))}))},t.prototype.cleanup=function(t){e.prototype.cleanup.call(this,t),this._mpBleConnectionStateCache={}},t}(base_1.BlueToothAdapter);exports.BlueToothAdapter4Mp=BlueToothAdapter4Mp;
//# sourceMappingURL=BlueToothAdapter4Mp.js.map
{
"name": "qcloud-iotexplorer-bluetooth-adapter",
"version": "0.11.2-alpha.0",
"version": "0.12.0",
"description": "",

@@ -17,6 +17,6 @@ "main": "lib/index.js",

"dependencies": {
"event-emitter-for-miniprogram": "^0.11.0-alpha.0",
"event-emitter-for-miniprogram": "^0.11.0",
"lodash.uniqwith": "^4.5.0",
"qcloud-iotexplorer-appdev-sdk": "^2.2.1-alpha.0",
"qcloud-iotexplorer-common-libs": "^0.11.1-alpha.0",
"qcloud-iotexplorer-appdev-sdk": "^2.3.0",
"qcloud-iotexplorer-common-libs": "^0.12.0",
"tslib": "^2.0.1"

@@ -27,3 +27,3 @@ },

},
"gitHead": "632c146c29217f586da47f75b48bbbba41dabe35"
"gitHead": "2521e5f3f2e3f7882fcbd994303c325f5d28a93c"
}

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc