Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/guidesmiths/worksmith_sftp
SFTP activities for worksmith
https://github.com/guidesmiths/worksmith_sftp
hacktoberfest
Last synced: 22 days ago
JSON representation
SFTP activities for worksmith
- Host: GitHub
- URL: https://github.com/guidesmiths/worksmith_sftp
- Owner: guidesmiths
- License: mit
- Created: 2015-06-09T08:54:31.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2023-01-10T06:51:22.000Z (about 2 years ago)
- Last Synced: 2024-12-18T09:45:26.643Z (29 days ago)
- Topics: hacktoberfest
- Language: JavaScript
- Size: 11.7 KB
- Stars: 0
- Watchers: 12
- Forks: 0
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
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.