Socket
Socket
Sign inDemoInstall

ftpsync

Package Overview
Dependencies
25
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.1.7 to 0.1.8

37

lib/ftpsync.js

@@ -64,2 +64,7 @@ // Design Notes

if (!settings.pass) { sync.log.warn("Password not set"); }
// sensible defaults
settings.ignore = settings.ignore || [];
settings.connections = settings.connections || 1;
// display the settings

@@ -83,3 +88,3 @@ if (sync.log.verbose) {

sync.log.write('');
callback(err);
return callback(err);
}

@@ -108,3 +113,3 @@ sync.log.info('Setup complete.');

sync.log.write('');
callback(err);
return callback(err);
}

@@ -219,3 +224,3 @@ // store the values for later

sync.log.error('MKDIRs failed.');
callback(err);
return callback(err);
}

@@ -232,3 +237,3 @@ sync.log.info('MKDIRs complete.');

sync.log.error('Additions failed.');
callback(err);
return callback(err);
}

@@ -245,3 +250,3 @@ sync.log.info('Additions complete.');

sync.log.error('Updates failed.');
callback(err);
return callback(err);
}

@@ -258,3 +263,3 @@ sync.log.info('Updates complete.');

sync.log.error('Removals failed.');
callback(err);
return callback(err);
}

@@ -271,3 +276,3 @@ sync.log.info('Removals complete');

sync.log.error('RMDIRs failed.');
callback(err);
return callback(err);
}

@@ -282,3 +287,3 @@ sync.log.info('RMDIRs complete.');

sync.log.error('Commit failed.');
callback(err);
return callback(err);
}

@@ -442,3 +447,3 @@ sync.log.info('Commit complete.');

sync.log.error('MKDIR failed.');
callback(err);
return callback(err);
}

@@ -457,3 +462,3 @@ if (sync.log.verbose) {

sync.log.error('RMDIR failed.');
callback(err);
return callback(err);
}

@@ -469,3 +474,3 @@ if (sync.log.verbose) {

upload: function(file, callback) {
var ftp = new jsftp({
/*var ftp = new jsftp({
host: settings.host,

@@ -475,3 +480,3 @@ port: settings.port,

pass: settings.pass
});
});*/
var local = settings.local + file;

@@ -482,3 +487,3 @@ var remote = settings.remote + file;

sync.log.error('fs.readFile failed.');
callback(err);
return callback(err);
}

@@ -489,3 +494,3 @@ else {

sync.log.error('ftp.put failed.');
callback(err);
return callback(err);
}

@@ -506,3 +511,3 @@ if (sync.log.verbose) {

sync.log.error('Remove failed.');
callback(err);
return callback(err);
}

@@ -588,2 +593,2 @@ if (sync.log.verbose) {

module.exports = exports;
module.exports = exports;
{
"name": "ftpsync",
"version": "0.1.8",
"description": "Intelligent file syncronization over FTP",
"version": "0.1.7",
"homepage": "http://github.com/evanplaice/node-ftpsync",
"keywords": [
"ftp",
"client",
"transfer",
"sync",
"synchronise"
],
"author": {
"name": "Evan Plaice",
"email": "evanplaice@gmail.com",
"url": "http://plus.google.com/+evanplaice"
"url": "http://evanplaice.com"
},
"homepage": "http://github.com/evanplaice/node-ftpsync",
"repository": {

@@ -18,8 +25,3 @@ "type": "git",

},
"licenses": [
{
"type": "MIT",
"url": "https://github.com/evanplaice/node-ftpsync/blob/master/LICENSE-MIT"
}
],
"license": "MIT",
"main": "lib/ftpsync.js",

@@ -29,25 +31,18 @@ "bin": "bin/ftpsync",

"engines": {
"node": ">=0.8.0"
"node": "*"
},
"dependencies": {
"async": ">=0.2.9",
"jsftp": ">=1.1.1",
"touch": ">=0.0.2",
"commander": ">=2.1.0",
"minimatch": "~0.2.12",
"grunt": "~0.4.2"
"async": "^1.5.1",
"commander": "^2.9.0",
"jsftp": "^1.5.3",
"minimatch": "^3.0.0",
"touch": "^1.0.0"
},
"keywords": [
"ftp",
"client",
"transfer",
"sync",
"synchronise"
],
"devDependencies": {
"nodeftpd":"git+https://github.com/addrummond/nodeftpd.git#master",
"grunt-contrib-jshint": "~0.7.2",
"grunt-contrib-clean": "~0.5.0",
"grunt-contrib-nodeunit": "~0.2.2"
"ftpd": "^0.2.12",
"grunt": "^0.4.5",
"grunt-contrib-clean": "^0.7.0",
"grunt-contrib-jshint": "^0.11.3",
"grunt-contrib-nodeunit": "^0.4.1"
}
}

@@ -76,5 +76,22 @@ An FTP synchronization app for NodeJS based on [jsftp](https://npmjs.org/package/jsftp). With an emphasis on speed and simplicity ftpsync aims to fulfull your one-click file deployment needs.

#### new ftpsync(options)
#### Declaring ftpsync
Basic usage example
Creates a new ftpsync instance.
var ftpSync = require('ftpsync');
var options = {
host: 'localhost',
user: 'testuser',
pass: 'password',
local: '/your/local/directory',
remote: 'directoryname'
};
ftpSunc.settings = options;
ftpSync.run(function(err, result) {
... your code ...
};

@@ -93,4 +110,4 @@ - `options{}` an object containing settings for ftpsync.

- `pass` - ftp password (required).
- `localRoot` - the root directory of the local host (default `'./'`).
- `remoteRoot` - the root path of the remote server (default `'./'`).
- `local` - the root directory of the local host (default `'./'`).
- `remote` - the root path of the remote server (default `'./'`).
- `connections` - the max number of concurrent ftp connections (default `1`).

@@ -97,0 +114,0 @@ - `ignore` - the list of file patterns to ignore.

@@ -1,2 +0,2 @@

var ftpd = require('../node_modules/ftpd');
var ftpd = require('ftpd');
var fs = require('fs');

@@ -10,7 +10,4 @@ var path = require('path');

getRoot: function () { return path.normalize(process.cwd() + '/remote'); },
pasvPortRangeStart: 1000,
pasvPortRangeEnd: 2000,
useWriteFile: false,
useReadFile: false,
uploadMaxSlurpSize: 7000
useReadFile: false
});

@@ -17,0 +14,0 @@

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc