Comparing version 0.2.5 to 0.2.6
@@ -16,2 +16,4 @@ var spawn = require('child_process').spawn, | ||
** // protocol is added on beginning of host, ex : sftp://domain.com in this case | ||
** port: '28', // optional | ||
** // port is added at the end of the host, ex : sftp://domain.com:28 in this case | ||
** } | ||
@@ -34,3 +36,3 @@ ** | ||
}; | ||
var opts = _.pick(_.extend(defaults, options), 'host', 'username', 'password'); | ||
var opts = _.pick(_.extend(defaults, options), 'host', 'username', 'password', 'port'); | ||
if (!opts.host) throw new Error('You need to set a host.'); | ||
@@ -41,2 +43,4 @@ if (!opts.username) throw new Error('You need to set an username.'); | ||
opts.host = options.protocol + '://' + options.host; | ||
if (opts.port) | ||
opts.host = opts.host + ':' + opts.port; | ||
this.options = opts; | ||
@@ -115,2 +119,2 @@ }; | ||
module.exports = FTP; | ||
module.exports = FTP; |
{ | ||
"name": "ftps", | ||
"version": "0.2.5", | ||
"version": "0.2.6", | ||
"author": { | ||
@@ -5,0 +5,0 @@ "name" : "Sébastien Chopin" , |
@@ -29,2 +29,4 @@ node-ftps | ||
// protocol is added on beginning of host, ex : sftp://domain.com in this case | ||
port: 22 // optional | ||
// port is added to the end of the host, ex: sftp://domain.com:22 in this case | ||
}); | ||
@@ -31,0 +33,0 @@ // Do some amazing things |
6591
107
85