# worksmith_sftp

> SFTP activites for worksmith

Latest version **0.2.2** (published 2015-07-01) · MIT license · 0 weekly downloads

## Install

```sh
npm install worksmith_sftp
pnpm add worksmith_sftp
yarn add worksmith_sftp
bun add worksmith_sftp
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.2.2 |
| Published | 2015-07-01 |
| First published | 2015-06-09 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | GuideSmiths |
| Maintainers | guidesmiths, peterzentai_gs, feliun |
| Keywords | workflow, worksmith, sftp, whoosh |

## Links

- npm: https://www.npmjs.com/package/worksmith_sftp
- Repository: https://github.com/guidesmiths/worksmith_sftp
- Issues: https://github.com/guidesmiths/worksmith_sftp/issues
- npm.io page: https://npm.io/package/worksmith_sftp

## Dependencies (2)

- [debug](https://npm.io/package/debug.md) ^2.2.0
- [whoosh](https://npm.io/package/whoosh.md) ^0.3.6

## Recent versions

- 0.2.2 (latest) — 2015-07-01
- 0.2.1 — 2015-07-01
- 0.2.0 — 2015-06-09
- 0.1.1 — 2015-06-09

## README

# worksmith_sftp

SFTP activities for [worksmith](http://npmjs.com/package/worksmith)

This package contains the following activities/tasks:

name | description
--- | ---
[connect](#connect-activity) | Connects the underlying sftp client
[disconnect](#disconnect-activity) | Disconnects the underlying sftp client
[command](#command-activity) | Executes the specified sftp command

### connect-activity activity
Connects the underlying sftp client
##### params
name | type | description
--- | --- | ---
config | object | Connection parameters (see [whoosh](http://npmjs.com/package/whoosh))

##### example

```javascript
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
name | type | description
--- | --- | ---
sftp | sftp client | The sftp client (if not specified expected to be in the context 'sftp' property)

##### example

```javascript
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
name | type | description
--- | --- | ---
sftp | sftp client | The sftp client (if not specified expected to be in the context 'sftp' property)
command | string | The command to execute (see [whoosh](http://npmjs.com/package/whoosh))
arguments | array | The array of parameters to pass to the command

##### example

```javascript
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.

---
_Source: https://npm.io/package/worksmith_sftp · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
