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

devicestack

Package Overview
Dependencies
Maintainers
1
Versions
54
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

devicestack - npm Package Compare versions

Comparing version 1.10.1 to 1.10.2

22

lib/deviceguider.js

@@ -232,3 +232,3 @@ var util = require('util'),

async.forEachSeries(toConnect, function(dc, clb) {
self.connect(dc);
self.connect(dc, clb);
}, function(err) {

@@ -367,6 +367,15 @@ if (err && !err.name) {

device = this.currentState.getDevice(deviceOrId);
} else if (deviceOrId.id) {
} else if (deviceOrId.id && !device.connect) {
device = this.currentState.getDevice(deviceOrId.id);
} else if (!deviceOrId.connect) {
device = null;
}
if (!device) {
var err = new Error('Device not found!');
if (this.log) { this.log(err.message); }
if (callback) { callback(err); }
return;
}
if (!this.deviceErrorSubscriptions[device.id]) {

@@ -447,9 +456,12 @@ this.deviceErrorSubscriptions[device.id] = function(err) {

device = this.currentState.getConnectedDevice(deviceOrId);
} else if (deviceOrId.id) {
} else if (deviceOrId.id && !deviceOrId.disconnect) {
device = this.currentState.getDevice(deviceOrId.id);
} else if (!deviceOrId.disconnect) {
device = null;
}
if (!device) {
if (this.log) this.log('Device not connected!');
if (callback) { callback(new Error('Device not connected!')); }
var err = new Error('Device not found!');
if (this.log) { this.log(err.message); }
if (callback) { callback(err); }
return;

@@ -456,0 +468,0 @@ }

@@ -58,3 +58,3 @@ var DeviceGuider = require('../deviceguider'),

}
this.connectDevice(device, callback);
this.connect(device, callback);
};

@@ -77,5 +77,5 @@

var device = this.currentState.getConnectedDeviceByPort(port);
this.disconnectDevice(device, callback);
this.disconnect(device, callback);
};
module.exports = SerialDeviceGuider;
{
"name": "devicestack",
"version": "1.10.1",
"version": "1.10.2",
"description": "This module helps you to represent a device and its protocol.",

@@ -5,0 +5,0 @@ "private": false,

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

## v1.10.1
## v1.10.2
- DeviceGuider: fix callback call for autoconnect

@@ -3,0 +3,0 @@

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