node-scp
Advanced tools
Comparing version 0.0.17 to 0.0.18
@@ -5,2 +5,16 @@ # Changelog | ||
### [0.0.18](https://github.com/maitrungduc1410/node-scp-async/compare/v0.0.16...v0.0.18) (2022-07-09) | ||
### Features | ||
* add support for passing options to uploadFile, downloadFile and mkdir ([3769ece](https://github.com/maitrungduc1410/node-scp-async/commit/3769ece84dcdb8830e9b18e3ec84a0fa4e10e903)) | ||
### [0.0.17](https://github.com/maitrungduc1410/node-scp-async/compare/v0.0.16...v0.0.17) (2021-11-08) | ||
### Features | ||
* allow passing options to `uploadFile`, `downloadFile` and `mkdir` | ||
### [0.0.16](https://github.com/maitrungduc1410/node-scp-async/compare/v0.0.15...v0.0.16) (2021-11-08) | ||
@@ -7,0 +21,0 @@ |
@@ -138,3 +138,2 @@ "use strict"; | ||
return [2 /*return*/, new Promise(function (resolve, reject) { | ||
console.log('......', options) | ||
_this.sftpWrapper.fastPut(localPath, remotePath, options, function (err) { | ||
@@ -141,0 +140,0 @@ if (err) { |
@@ -5,3 +5,3 @@ { | ||
"description": "Lightweight, fast and secure SCP function for NodeJS", | ||
"version": "0.0.17", | ||
"version": "0.0.18", | ||
"main": "lib/index.js", | ||
@@ -8,0 +8,0 @@ "types": "lib/index.d.ts", |
@@ -49,3 +49,7 @@ # New SCP module for NodeJS | ||
}).then(client => { | ||
client.uploadFile('./test.txt', '/workspace/test.txt') | ||
client.uploadFile( | ||
'./test.txt', | ||
'/workspace/test.txt', | ||
// options?: TransferOptions | ||
) | ||
.then(response => { | ||
@@ -76,3 +80,7 @@ client.close() // remember to close connection after you finish | ||
}) | ||
await client.uploadFile('./test.txt', '/workspace/test.txt') | ||
await client.uploadFile( | ||
'./test.txt', | ||
'/workspace/test.txt', | ||
// options?: TransferOptions | ||
) | ||
// you can perform upload multiple times | ||
@@ -106,3 +114,7 @@ await client.uploadFile('./test1.txt', '/workspace/test1.txt') | ||
}).then(client => { | ||
client.downloadFile('/workspace/test.txt', './test.txt') | ||
client.downloadFile( | ||
'/workspace/test.txt', | ||
'./test.txt', | ||
// options?: TransferOptions | ||
) | ||
.then(response => { | ||
@@ -133,3 +145,7 @@ client.close() // remember to close connection after you finish | ||
}) | ||
await client.downloadFile('/workspace/test.txt', './test.txt') | ||
await client.downloadFile( | ||
'/workspace/test.txt', | ||
'./test.txt', | ||
// options?: TransferOptions | ||
) | ||
client.close() // remember to close connection after you finish | ||
@@ -267,3 +283,6 @@ } catch(e) { | ||
}).then(client => { | ||
client.mkdir('/server/path') | ||
client.mkdir( | ||
'/server/path', | ||
// attributes?: InputAttributes | ||
) | ||
.then(response => { | ||
@@ -294,3 +313,6 @@ client.close() // remember to close connection after you finish | ||
}) | ||
await client.mkdir('/server/path') | ||
await client.mkdir( | ||
'/server/path', | ||
// attributes: InputAttributes | ||
) | ||
client.close() // remember to close connection after you finish | ||
@@ -297,0 +319,0 @@ } catch (e) { |
95791
730
13
1689