Socket
Socket
Sign inDemoInstall

linux-device

Package Overview
Dependencies
132
Maintainers
1
Versions
39
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 2.0.11 to 2.0.12

12

lib/DeviceHandle.js

@@ -112,11 +112,9 @@ "use strict";

if(tty.isatty(this.fd)) {
this[kSource].isTTY = true;
if(this[kSource].readable) {
this[kSource].inStream = new tty.ReadStream(this.fd);
this[kSource].inStream.setRawMode(true);
}
if(this[kSource].writable) {
this[kSource].outStream = new tty.WriteStream(this.fd);
}
//write uses writeRepeated instead of a stream
} else {
this[kSource].isTTY = false;
const fstat = await fs.fstat(this.fd);

@@ -287,4 +285,4 @@ if(fstat.isFile() || fstat.isCharacterDevice() || fstat.isBlockDevice() ) {

if(!this[kSource].writable) throw new Error('not_writable');
if(chunk.interval && chunk.repetitions) {
return await FH.writeRepeated(this.fd, chunk, chunk.interval, chunk.repetitions); //retain chunks
if(this[kSource].isTTY || (chunk.interval && chunk.repetitions) ) {
return await FH.writeRepeated(this.fd, chunk, chunk.interval || 0, chunk.repetitions || 1); //retain chunks
} else {

@@ -291,0 +289,0 @@ return util.promisify(this[kSource].outStream.write).call(this[kSource].outStream, chunk, encoding); //retain chunk

{
"name": "linux-device",
"version": "2.0.11",
"version": "2.0.12",
"description": "Native addon to communicate with linux devices (can also be used for sockets or FIFOs)",

@@ -5,0 +5,0 @@ "main": "index.js",

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc