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

worksmith_sftp

Package Overview
Dependencies
Maintainers
3
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

worksmith_sftp

SFTP activites for worksmith

  • 0.2.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
3
Created
Source

worksmith_sftp

SFTP activities for worksmith

This package contains the following activities/tasks:

namedescription
connectConnects the underlying sftp client
disconnectDisconnects the underlying sftp client
commandExecutes the specified sftp command

connect-activity activity

Connects the underlying sftp client

params
nametypedescription
configobjectConnection parameters (see whoosh)
example
var worksmith = require('worksmith')
worksmith.use('sftp', require('worksmith_sftp'))
var workflow = worksmith({task:'sequence', items : [{
    task:'sftp/connect',
    config: {
        hostname: 'sftp.example.com',
        port: 22,
        username: 'fred',
        password: 'secret'
    },
    resultTo: 'sftp'
}])

disconnect activity

Disconnects the underlying sftp client

params
nametypedescription
sftpsftp clientThe sftp client (if not specified expected to be in the context 'sftp' property)
example
var worksmith = require('worksmith')
worksmith.use('sftp', require('worksmith_sftp'))
var workflow = worksmith({task:'sequence', items : [{
    task:'sftp/connect',
    config: {
        hostname: 'sftp.example.com',
        port: 22,
        username: 'fred',
        password: 'secret'
    },
    resultTo: 'sftp'
}, {
    task: 'sftp/disconnect',
    sftp: '@sftp'
}])

command activity

Executes the specified sftp command

params
nametypedescription
sftpsftp clientThe sftp client (if not specified expected to be in the context 'sftp' property)
commandstringThe command to execute (see whoosh)
argumentsarrayThe array of parameters to pass to the command
example
var worksmith = require('worksmith')
worksmith.use('sftp', require('worksmith_sftp'))
var workflow = worksmith({task:'sequence', items : [{
    task:'sftp/connect',
    config: {
        hostname: 'sftp.example.com',
        port: 22,
        username: 'fred',
        password: 'secret'
    },
    resultTo: 'sftp'
}, {
    task: 'sftp/command',
    command: 'stat',
    arguments: ['.']
}, {
    task: 'sftp/disconnect',
    sftp: '@sftp'
}])

Running tests

You need an sftp server running on localhost:10022 for the tests to pass. If you have docker and docker-compose installed simply run docker-compose up in the route of this project.

Keywords

FAQs

Package last updated on 01 Jul 2015

Did you know?

Socket

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc