Socket
Book a DemoInstallSign in
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

latest
Source
npmnpm
Version
0.2.2
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

workflow

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