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

sftp-ws

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

sftp-ws - npm Package Compare versions

Comparing version 0.7.0 to 0.7.1

26

lib/fs-sources.js

@@ -260,10 +260,13 @@ var __extends = (this && this.__extends) || function (d, b) {

try {
if (this.finished) {
if (!this.ended) {
this.ended = true;
process.nextTick(function () { return _super.prototype.emit.call(_this, 'end'); });
}
// don't do anyting if already reading data or already ended
if (this.busy || this.ended)
return;
// if finished and no queued data, schedule the 'end' event
if (this.finished && this.queue.length == 0) {
this.ended = true;
process.nextTick(function () { return _super.prototype.emit.call(_this, 'end'); });
return;
}
if (!this.busy && this.queue.length < 4) {
// read more data unless the queue is full
if (this.queue.length < 4) {
var slice = this.blob.slice(this.pos, this.pos + 0x8000);

@@ -283,8 +286,11 @@ this.pos += slice.size;

BlobDataSource.prototype.read = function () {
this.flush();
// if not readable, don't return anything
if (!this.readable)
return null;
// get next chunk
var chunk = this.queue.shift();
if (!chunk) {
chunk = null;
// if no more chunks are available, become unreadable
if (this.queue.length == 0)
this.readable = false;
}
this.flush();
return chunk;

@@ -291,0 +297,0 @@ };

{
"name": "sftp-ws",
"version": "0.7.0",
"version": "0.7.1",
"description": "SFTP over WebSockets - client and server library",

@@ -5,0 +5,0 @@ "main": "./lib/sftp.js",

@@ -83,6 +83,2 @@ sftp-ws

// url and credentials
var url = "ws://nuane.com/sftp";
var options = { username: "guest", password: "none" };
// url, credentials and options

@@ -89,0 +85,0 @@ var url = "ws://nuane.com/sftp";

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