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

ftp-deploy

Package Overview
Dependencies
Maintainers
1
Versions
48
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ftp-deploy - npm Package Compare versions

Comparing version 0.1.1 to 0.2.0

23

ftp-deploy.js

@@ -20,4 +20,6 @@ var fs = require('fs');

var thisDeployer = this;
var toTransfer;
this.toTransfer;
this.transferred = 0;
this.total = 0;
var ftp;

@@ -95,2 +97,3 @@ var localRoot;

} else {
thisDeployer.transferred++;
thisDeployer.emit('uploaded', path.join(currPath, inFilename));

@@ -104,3 +107,3 @@ cb();

function ftpProcessLocation (inPath, cb) {
if (!toTransfer[inPath]) {
if (!thisDeployer.toTransfer[inPath]) {
cb(new Error('Data for ' + inPath + ' not found'));

@@ -114,3 +117,3 @@ } else {

currPath = inPath;
files = toTransfer[inPath];
files = thisDeployer.toTransfer[inPath];
async.forEach(files, ftpPut, function (err) {

@@ -139,4 +142,4 @@ if (err) {

ftp.useList = true;
toTransfer = dirParseSync(localRoot);
thisDeployer.toTransfer = dirParseSync(localRoot);
// Authentication and main processing of files

@@ -148,3 +151,7 @@ ftp.auth(config.username, config.password, function(err) {

// Iterating through all location from the `localRoot` in parallel
var locations = Object.keys(toTransfer);
var locations = Object.keys(thisDeployer.toTransfer);
// store total number of files to transfer
thisDeployer.total = locations.length;
async.forEachSeries(locations, ftpProcessLocation, function() {

@@ -166,3 +173,3 @@ ftp.raw.quit(function(err) {

if (typeof module !== 'undefined' && "exports" in module) {
module.exports = new FtpDeployer();
module.exports = FtpDeployer;
}
{
"name": "ftp-deploy",
"version": "0.1.1",
"version": "0.2.0",
"author": "Rick Bergfalk <rick.bergfalk@gmail.com> (http://rickbergfalk.com/)",

@@ -5,0 +5,0 @@ "description": "Ftp a folder from your local disk to an ftp destination. Does not delete from destination directory. Derived from grunt-ftp-deploy",

@@ -10,4 +10,5 @@ # ftp-deploy

```
var ftpDeploy = require('ftp-deploy');
```js
var FtpDeploy = require('ftp-deploy');
var ftpDeploy = new FtpDeploy();

@@ -49,2 +50,2 @@ var config = {

MIT
MIT
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