New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@psdk/device-ble-taro

Package Overview
Dependencies
Maintainers
1
Versions
100
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@psdk/device-ble-taro - npm Package Compare versions

Comparing version 0.2.57 to 0.2.58

2

build/connected.d.ts

@@ -8,2 +8,3 @@ import { ConnectedDevice, ConnectionState, ReadOptions } from "@psdk/frame-father";

private dataOfRead;
private notifyCallback?;
constructor(options: {

@@ -13,2 +14,3 @@ device: Taro.onBluetoothDeviceFound.CallbackResultBlueToothDevice;

});
notify(callback: (value: Taro.onBLECharacteristicValueChange.CallbackResult) => Promise<void>): void;
private doListen;

@@ -15,0 +17,0 @@ private realRead;

30

build/connected.js

@@ -27,18 +27,24 @@ "use strict";

}
notify(callback) {
this.notifyCallback = callback;
}
doListen() {
taro_1.default.onBLECharacteristicValueChange(value => {
this.dataOfRead.push(value);
});
taro_1.default.onBLECharacteristicValueChange((value) => __awaiter(this, void 0, void 0, function* () {
// this.dataOfRead.push(value)
if (this.notifyCallback) {
yield this.notifyCallback(value);
}
}));
taro_1.default.onBLEConnectionStateChange(value => {
this._connectionState = value.connected ? frame_father_1.ConnectionState.CONNECTED : frame_father_1.ConnectionState.DISCONNECTED;
});
// Taro.notifyBLECharacteristicValueChange({
// deviceId: this.device.deviceId,
// serviceId: this.readPair.service.uuid,
// characteristicId: this.readPair.characteristic.uuid,
// state: true,
// success: result => console.log(result),
// // @ts-ignore
// fail: (e) => console.error(e),
// });
taro_1.default.notifyBLECharacteristicValueChange({
deviceId: this.device.deviceId,
serviceId: this.scpair.service.uuid,
characteristicId: this.scpair.read.uuid,
state: true,
success: result => console.log(result),
// @ts-ignore
fail: (e) => console.error(e),
});
}

@@ -45,0 +51,0 @@ realRead() {

@@ -267,3 +267,3 @@ "use strict";

write: characteristic,
read: properties.read ? characteristic : null,
read: properties.notify ? characteristic : null,
};

@@ -284,3 +284,3 @@ }

// @ts-ignore
return properties.write && (properties.read);
return properties.write && (properties.notify);
});

@@ -309,3 +309,3 @@ if (pickedCharacteristic) {

const properties = characteristic.properties;
return (properties.read);
return (properties.notify);
});

@@ -312,0 +312,0 @@ if (writeCharacteristic && readCharacteristic) {

{
"name": "@psdk/device-ble-taro",
"version": "0.2.57",
"version": "0.2.58",
"description": "psdk",

@@ -49,4 +49,4 @@ "main": "build/index.js",

"dependencies": {
"@psdk/device-bluetooth-traits": "0.2.57",
"@psdk/frame-father": "0.2.57",
"@psdk/device-bluetooth-traits": "0.2.58",
"@psdk/frame-father": "0.2.58",
"await-timeout": "^1.1.1"

@@ -58,3 +58,3 @@ },

],
"gitHead": "9f9f4a756c4cddbfd4a81300ea7fd66a4c28b0fb"
"gitHead": "0af603c67f29dde30d53226ba732565150126a8d"
}

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