Socket
Socket
Sign inDemoInstall

node-sftp-deploy-i

Package Overview
Dependencies
44
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    node-sftp-deploy-i

Upload and deploy files from SFTP with username & password


Version published
Weekly downloads
8
Maintainers
1
Created
Weekly downloads
 

Readme

Source

node-sftp-deploy improved

Upload and deploy files from SFTP with username & password.

This is a copy of node-sftp-deploy package with some fixes and improvements. In addition to features provided by node-sftp-deploy it allows to:

  • specify a regexp pattern to filter files to be uploaded
  • upload files in particular order (by specifying a sorting function for files)
  • use caching (uploaded files md5 hashes are stored locally and file upload is skipped if trying to upload same file).

Install

npm install --save node-sftp-deploy-i

Usage

var sftp = require('node-sftp-deploy-i');

// to upload html files after all others
var sortingFunction = function (a, b) {
    return path.extname(a.path).toLowerCase() === ".html" ? 1 : -1;
};

sftp({
    "host": "10.10.10.10",
    "port": "20",
    "user": "user",
    "pass": "pass",
    "remotePath": "",
    "sourcePath": "./",
    "includePattern":  /.*\.(js|css|html)$/,  // optional, upload only js css and html files
    "sort": sortingFunction,                          // optional
    "cacheFile": "cache.json" //optional
});

//Support Promise
sftp(sftpConfig).then(function(){
    //Success Callback
});

Keywords

FAQs

Last updated on 01 Feb 2017

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

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