New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.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.5.1 to 0.6.0

35

ftp-deploy.js

@@ -32,3 +32,3 @@ var fs = require('fs');

var authVals;
var stopOnError = true;
var continueOnError = false;

@@ -145,8 +145,9 @@ function canIncludeFile(filePath) {

if (err) {
if (stopOnError) {
cb(err);
emitData.err = err;
thisDeployer.emit('error', emitData); // error event from 0.5.x TODO: either expand error events or remove this
thisDeployer.emit('upload-error', emitData);
if (continueOnError) {
cb();
} else {
emitData.err = err;
thisDeployer.emit('error', emitData);
cb();
cb(err);
}

@@ -161,22 +162,2 @@ } else {

/*
fs.readFile(fullPathName, function (err, fileData) {
if (err) {
cb(err);
} else {
//console.log('FileName', inFilename);
ftp.put(inFilename.replace(/\\/gi, '/'), fileData, function(err) {
if(err) {
//console.error(err);
cb(err);
} else {
thisDeployer.transferred++;
emitData.transferredFileCount = thisDeployer.transferred;
thisDeployer.emit('uploaded', emitData);
cb();
}
});
}
});
*/
}

@@ -215,3 +196,3 @@

remoteRoot = config.remoteRoot;
if (has(config, 'stopOnError')) stopOnError = config.stopOnError;
if (has(config, 'continueOnError')) continueOnError = config.continueOnError;
exclude = config.exclude || exclude;

@@ -218,0 +199,0 @@

{
"name": "ftp-deploy",
"version": "0.5.1",
"version": "0.6.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",

@@ -50,10 +50,10 @@ # ftp-deploy

```
config.stopOnError = false;
config.continueOnError = true;
ftpDeploy.deploy(config, function(err) {
if (err) console.log(err)
if (err) console.log(err) // error authenticating or creating/traversing directory
else console.log('finished');
});
ftpDeploy.on('error', function (data) {
ftpDeploy.on('upload-error', function (data) {
console.log(data.err); // data will also include filename, relativePath, and other goodies

@@ -66,6 +66,11 @@ });

- 0.6.x
- added optional ```continueOnError``` config. When set to true, ftp-deploy continues to upload files after a failed put. When not specified or set to false, the ```.deploy()``` callback is called immediately after a failed put.
- added ```upload-error``` event
- removed ```stopOnError``` config setting in preference of ```continueOnError```
- 0.5.x
- upgraded jsftp from 0.6.x to 1.2.x
- Added stopOnError to configuration. Defaults to true. Stops uploading files if an error occurs. If set to false, ftp-deploy skips over failed file uploads and does not pass the deploy callback with an error. (Note: failing to create a directory will still stop deployment)
- added 'error' events.
- Added ```stopOnError``` to configuration.
- added ```error``` event.
- deprecated paralleluploads config setting (no longer supported by jsftp)

@@ -77,8 +82,8 @@

- 0.3.x
- New config setting **exclude** can be used to exclude folders/files from the ftp deploy process
- New config setting ```exclude``` can be used to exclude folders/files from the ftp deploy process
- 0.2.x
- Requiring ftp-deploy returns the FtpDeploy object, and you will need to instantiate is separately on your own.
- New config setting **paralleluploads**: sets number of parallelUploads (within a specific folder)
- ftpDeploy instance has properties **transferred** and **total**. Useful for determining progress based on file count.
- New config setting ```paralleluploads```: sets number of parallelUploads (within a specific folder)
- ftpDeploy instance has properties ```transferred``` and ```total```. Useful for determining progress based on file count.

@@ -85,0 +90,0 @@

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