Socket
Socket
Sign inDemoInstall

cordova-sftp-plugin

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cordova-sftp-plugin - npm Package Compare versions

Comparing version 1.1.0 to 2.0.0

23

package.json
{
"name": "cordova-sftp-plugin",
"version": "1.1.0",
"version": "2.0.0",
"description": "Cordova SFTP Upload And Download",

@@ -25,7 +25,14 @@ "cordova": {

],
"scripts": {
"jslint": "eslint ./www/"
},
"engines": {
"cordovaDependencies": {
"1.1.0": {
"cordova" : ">=7.0.0",
"1.1.0": {
"cordova": ">=7.0.0",
"cordova-ios": ">=4.4.0"
},
"2.0.0": {
"cordova": ">=9.0.0",
"cordova-ios": ">=4.4.0"
}

@@ -39,3 +46,11 @@ }

},
"homepage": "https://github.com/jjdltc/jjdltc-cordova-plugin-sftp#readme"
"homepage": "https://github.com/jjdltc/jjdltc-cordova-plugin-sftp#readme",
"devDependencies": {
"husky": "^4.2.5"
},
"husky": {
"hooks": {
"pre-commit": "npm run jslint"
}
}
}

78

README.md

@@ -0,11 +1,12 @@

SFTP Upload/Download Plugin
===
Cordova plugin to __Download__ and __Upload__ files from a __SFTP__ server.
Cordova plugin to **Download**/**Upload** files from/to a **SFTP** server.
This plugin is build on top of:
- [JSch](http://www.jcraft.com/jsch/ "In case you want to be curious") library for __Android__.
- [NMSSH](http://cocoadocs.org/docsets/NMSSH/2.2.7/index.html "In case you want to be curious") framework for __iOS__.
- [JSch](http://www.jcraft.com/jsch/ "In case you want to be curious") library for **Android**.
- [NMSSH](http://cocoadocs.org/docsets/NMSSH/2.2.7/index.html "In case you want to be curious") framework for **iOS**.
__Contributors are welcome.__
**Contributors are welcome.**

@@ -19,5 +20,5 @@ Platforms supported

---
`cordova plugin add cordova-sftp-plugin`
```
cordova plugin add cordova-sftp-plugin
```
Easy Use

@@ -27,3 +28,3 @@ ---

There is a base Object `JJsftp` expose in `window` that should be initialized with the `host`, `user` and `password` for the server
```
```javascript
var mySftp = new JJsftp("host", "user", "password");

@@ -67,37 +68,37 @@ ```

* `SFTPActionConnected`
* __Desc__: Fire on sftp channel connect
* __Extra event attributes__: none
* `SFTPActionStart`
* __Desc__: Fire when an action is about to start in a file
* __Extra event attributes__:
* `from`- string : Path of the source
* `SFTPActionConnected(data)` - Fire on sftp channel connect
* **data** - object:
* `id` - string: UDID related to that connection (**Android Only**)
* `SFTPActionStart(data)` - Fire when an action is about to start in a file
* **data** - object:
* `from` - string : Path of the source
* `to` - string : Path of the target
* `size` - long : Size of the element
* `SFTPActionProgress`
* __Desc__: fire to inform the % of down/up load in the ACTUAL file
* __Extra event attributes__:
* `id` - string: UDID related to that connection (**Android Only**)
* `SFTPActionProgress(data)` - fire to inform the % of down/up load in the **_actual_** file
* **data** - object:
* `percent` - int : % of actual file progress
* `SFTPActionEnd`
* __Desc__: fire whe the ACTUAL action over a file end
* __Extra event attributes__: none
* `SFTPActionListProgress`
* __Desc__: Fire after an action (Up/Down) is executed over a file, giving the actual file (index in list) and total files in list
* __Extra event attributes__:
* `id` - string: UDID related to that connection (**Android Only**)
* `SFTPActionEnd(data)` - fire when the **_actual_** action over a file end
* **data** - object:
* `id` - string: UDID related to that connection (**Android Only**)
* `SFTPActionListProgress(data)` - Fire after an action (Up/Down) is executed over a file, giving the actual file (index in list) and total files in list
* **data** - object:
* `progress` - int : Actual element index in list
* `total` - int : Total count of elements in list
* `SFTPActionListEnd`
* __Desc__: Fire at end of action list to inform the # of file rech it
* __Extra event attributes__:
* `id` - string: UDID related to that connection (**Android Only**)
* `SFTPActionListEnd(data)` - Fire at end of action list to inform the # of file reach it
* **data** - object:
* `all` - boolean : true if all action were made it
* `SFTPActionDisconnected`
* __Desc__: Fire on sftp channel disconnect
* __Extra event attributes__: none
* `SFTPActionCancell`
* __Desc__: Fire on cancel async action
* __Extra event attributes__: none
* `id` - string: UDID related to that connection (**Android Only**)
* `SFTPActionDisconnected(data)` - Fire on sftp channel disconnect
* **data** - object:
* `id` - string: UDID related to that connection (**Android Only**)
* `SFTPActionCancell(data)` - Fire on cancel async action
* **data** - object:
* `id` - string: UDID related to that connection (**Android Only**)
### Use Example
To Download
```
```javascript
var sftp = new JJsftp("host", "user", "password"),

@@ -123,5 +124,5 @@ localPath = "String/Path/To/Place/The/Download"

#### Know Issues
- `upload` does not work on __iOS__ (Yet)
- `cancel` does not work on __iOS__ (Yet), therefore `SFTPActionCancell` is never trigger.
#### Know Issues
- `upload` does not work on **iOS** (Yet)
- `cancel` does not work on **iOS** (Yet), therefore `SFTPActionCancell` is never trigger.

@@ -132,4 +133,3 @@ There is a big TODO list, but in resume

* No Connection Break The App (Should The plugin warning the user or just don't do anything)
* ~~Only receive the absolute platfomr path (Without file://), should be replace in plugin don't force the user to replace it~~
* Events just send a simple string object, need to be parse by user, should be the as many as need witouth the need to parse it
* Events just send a simple string object, need to be parse by user, should be the as many as need without the need to parse it
* Write a better documentation

@@ -136,0 +136,0 @@ * Propose new utils features (I think maybe in a fetch directory will be util) without lose the perspective of the plugin (Upload - Download via SFTP)

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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