sftp-promises
Advanced tools
Comparing version 1.1.0 to 1.1.1
12
index.js
@@ -1,4 +0,2 @@ | ||
var Client = require('ssh2').Client; | ||
var MODES = require('ssh2').SFTP_OPEN_MODE; | ||
// var Promise = require('bluebird'); | ||
var Client = require('ssh2').Client;; | ||
@@ -16,7 +14,13 @@ var statToAttrs = function (stats) { | ||
function sftpClient(config) { | ||
if (!(this instanceof sftpClient)) { | ||
return new sftpClient(config); | ||
} | ||
this.config = config; | ||
this.config = config || {}; | ||
} | ||
sftpClient.prototype.MODES = require('ssh2').SFTP_OPEN_MODE; | ||
sftpClient.prototype.CODES = require('ssh2').SFTP_STATUS_CODE; | ||
sftpClient.prototype.sftpCmd = function sftpCmd(cmd) { | ||
@@ -23,0 +27,0 @@ var self = this; |
{ | ||
"name": "sftp-promises", | ||
"version": "1.1.0", | ||
"version": "1.1.1", | ||
"description": "SFTP Promise wrapper for ssh2 SFTP commands", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
# sftp-promises | ||
SFTP Promise Wrapper for ssh2 | ||
[] | ||
>SFTP Promise Wrapper for ssh2 | ||
Support basic SFTP transaction with promises, specifically for fronting SFTP with a web based API using something like Koa | ||
@@ -5,0 +8,0 @@ |
@@ -22,3 +22,3 @@ var fs = require('fs'); | ||
// read in test.dat to buffer | ||
var buffer = fs.readFileSync('test/test.dat'); | ||
var buffer = fs.readFileSync('test/fixtures/test.dat'); | ||
@@ -54,3 +54,3 @@ describe('stat dir and file', function(){ | ||
this.timeout(0) | ||
var val = yield sftp.put('test/test.dat', '/tmp/test.dat'); | ||
var val = yield sftp.put('test/fixtures/test.dat', '/tmp/test.dat'); | ||
val.should.be.true; | ||
@@ -57,0 +57,0 @@ }) |
198820
275
38