@yousolution/node-red-contrib-you-ftp-sftp 1.8.11 → 1.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/nodes/ftps.html +172 -0
- package/nodes/ftps.js +271 -0
- package/package.json +6 -3
package/nodes/ftps.html
ADDED
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
Copyright 2023 Andrea Trentin.
|
|
3
|
+
|
|
4
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
you may not use this file except in compliance with the License.
|
|
6
|
+
You may obtain a copy of the License at
|
|
7
|
+
|
|
8
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
|
|
10
|
+
Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
See the License for the specific language governing permissions and
|
|
14
|
+
limitations under the License.
|
|
15
|
+
-->
|
|
16
|
+
|
|
17
|
+
<script type="text/x-red" data-template-name="ftps">
|
|
18
|
+
<div class="form-row">
|
|
19
|
+
<label for="node-config-input-host"><i class="fa fa-bookmark"></i> Host</label>
|
|
20
|
+
<input type="text" id="node-config-input-host" placeholder="localhost" style="width: 40%;" />
|
|
21
|
+
<label for="node-config-input-port" style="margin-left: 10px; width: 35px; "> Port</label>
|
|
22
|
+
<input type="text" id="node-config-input-port" placeholder="21" style="width:45px">
|
|
23
|
+
</div>
|
|
24
|
+
<div class="form-row">
|
|
25
|
+
<label for="node-config-input-user"><i class="fa fa-user"></i> User</label>
|
|
26
|
+
<input type="text" id="node-config-input-user" placeholder="anonymous" />
|
|
27
|
+
</div>
|
|
28
|
+
<div class="form-row">
|
|
29
|
+
<label for="node-config-input-password"><i class="fa fa-lock"></i> Password</label>
|
|
30
|
+
<input type="password" id="node-config-input-password">
|
|
31
|
+
</div>
|
|
32
|
+
<div class="form-row">
|
|
33
|
+
<label for="node-config-input-connTimeout"><i class="fa fa-clock-o"></i> Connection Timeout</label>
|
|
34
|
+
<input type="text" id="node-config-input-connTimeout" placeholder="10000">
|
|
35
|
+
</div>
|
|
36
|
+
<div class="form-row">
|
|
37
|
+
<label for="node-config-input-pasvTimeout"><i class="fa fa-clock-o"></i> PASV Timeout</label>
|
|
38
|
+
<input type="text" id="node-config-input-pasvTimeout" placeholder="10000">
|
|
39
|
+
</div>
|
|
40
|
+
<div class="form-row">
|
|
41
|
+
<label for="node-config-input-keepalive"><i class="fa fa-clock-o"></i> Keepalive</label>
|
|
42
|
+
<input type="text" id="node-config-input-keepalive" placeholder="10000">
|
|
43
|
+
</div>
|
|
44
|
+
<div class="form-row">
|
|
45
|
+
<label for="node-input-secure"><i class="fa fa-key"></i> Data connection encryption</label>
|
|
46
|
+
<input type="checkbox" id="node-input-secure" placeholder="once" style="width: 10%; vertical-align: top;">
|
|
47
|
+
<label for="node-config-input-secureOptions" style="width: 20%; vertical-align: top;"> Secure Options</label>
|
|
48
|
+
<input type="text" id="node-config-input-secureOptions" style="width: 35%; vertical-align: top;">
|
|
49
|
+
</div>
|
|
50
|
+
</script>
|
|
51
|
+
|
|
52
|
+
<script type="text/javascript">
|
|
53
|
+
RED.nodes.registerType('ftps', {
|
|
54
|
+
category: 'config',
|
|
55
|
+
color: 'BurlyWood',
|
|
56
|
+
defaults: {
|
|
57
|
+
host: { value: '' },
|
|
58
|
+
port: { value: '' },
|
|
59
|
+
secure: { value: false },
|
|
60
|
+
secureOptions: { value: '' },
|
|
61
|
+
user: { value: '' },
|
|
62
|
+
connTimeout: { value: '' },
|
|
63
|
+
pasvTimeout: { value: '' },
|
|
64
|
+
keepalive: { value: '' },
|
|
65
|
+
password: { value: '', required: true },
|
|
66
|
+
},
|
|
67
|
+
label: function () {
|
|
68
|
+
return this.host;
|
|
69
|
+
},
|
|
70
|
+
});
|
|
71
|
+
</script>
|
|
72
|
+
|
|
73
|
+
<script type="text/x-red" data-template-name="ftps in">
|
|
74
|
+
<div class="form-row">
|
|
75
|
+
<label for="node-input-ftps"><i class="fa fa-user"></i> Add new FTPs Server</label>
|
|
76
|
+
<input type="text" id="node-input-ftps">
|
|
77
|
+
</div>
|
|
78
|
+
<div class="form-row">
|
|
79
|
+
<label for="node-input-operation"><i class="fa fa-wrench"></i> Operation</label>
|
|
80
|
+
<select type="text" id="node-input-operation">
|
|
81
|
+
<option value="list">list</option>
|
|
82
|
+
<option value="get">get</option>
|
|
83
|
+
<option value="put">put</option>
|
|
84
|
+
<option value="delete">delete</option>
|
|
85
|
+
</select>
|
|
86
|
+
</div>
|
|
87
|
+
<div class="form-row">
|
|
88
|
+
<label for="node-input-workdir"><i class="fa fa-folder-open"></i> Working Directory</label>
|
|
89
|
+
<input type="text" id="node-input-workdir" placeholder="Working Directory">
|
|
90
|
+
</div>
|
|
91
|
+
<div class="form-row input-filename-row hidden">
|
|
92
|
+
<label for="node-input-filename"><i class="fa fa-file"></i> Filename</label>
|
|
93
|
+
<input type="text" id="node-input-filename" placeholder="Filename">
|
|
94
|
+
</div>
|
|
95
|
+
<div class="form-row input-fileExtension-row hidden">
|
|
96
|
+
<label for="node-input-fileExtension"><i class="fa fa-file"></i> File Extension</label>
|
|
97
|
+
<input type="text" id="node-input-fileExtension" placeholder="File Extension">
|
|
98
|
+
</div>
|
|
99
|
+
<div class="form-row input-savedir-row hidden">
|
|
100
|
+
<label for="node-input-savedir"><i class="fa fa-folder-open"></i> Save Directory</label>
|
|
101
|
+
<input type="text" id="node-input-savedir" placeholder="Save Directory">
|
|
102
|
+
</div>
|
|
103
|
+
<div class="form-row input-localFilename-row hidden">
|
|
104
|
+
<label for="node-input-localFilename"><i class="fa fa-file"></i> Local Filename</label>
|
|
105
|
+
<input type="text" id="node-input-localFilename" placeholder="Local Filename">
|
|
106
|
+
</div>
|
|
107
|
+
<div class="form-row">
|
|
108
|
+
<label for="node-input-name"><i class="fa fa-tag"></i> Name</label>
|
|
109
|
+
<input type="text" id="node-input-name" placeholder="Name">
|
|
110
|
+
</div>
|
|
111
|
+
</script>
|
|
112
|
+
|
|
113
|
+
<script type="text/x-red" data-help-name="ftp in">
|
|
114
|
+
<h1>FTP Client</h1>
|
|
115
|
+
<p>
|
|
116
|
+
<b>Node config:</b>
|
|
117
|
+
<ul>
|
|
118
|
+
<li><b>PUT</b> - Set <code>msg.payload.filedata</code> to the file contents you want pushed and will be uploaded to {GUID}.FileExtension. If you need more changes file request to github.</li>
|
|
119
|
+
<li><b>GET</b> - Set <code>msg.payload.filename</code> to get the file or will use Workdir + Filename in configuration. Leave configuration blank to set in code.</li>
|
|
120
|
+
<li><b>DELETE</b> - Set <code>msg.payload.filename</code> to delete the file or will use Workdir + Filename in configuration. Leave configuration blank to set in code.</li>
|
|
121
|
+
<li><b>LIST</b> - Uses the workdir</li>
|
|
122
|
+
</ul>
|
|
123
|
+
</p>
|
|
124
|
+
</script>
|
|
125
|
+
|
|
126
|
+
<script type="text/javascript">
|
|
127
|
+
RED.nodes.registerType('ftps in', {
|
|
128
|
+
category: 'storage-input',
|
|
129
|
+
color: 'BurlyWood',
|
|
130
|
+
defaults: {
|
|
131
|
+
ftps: { type: 'ftps', required: true },
|
|
132
|
+
operation: { value: 'list', required: true },
|
|
133
|
+
filename: { value: '' },
|
|
134
|
+
localFilename: { value: '' },
|
|
135
|
+
fileExtension: { value: '.txt' },
|
|
136
|
+
workdir: { value: '' },
|
|
137
|
+
savedir: { value: '' },
|
|
138
|
+
name: { value: '' },
|
|
139
|
+
},
|
|
140
|
+
inputs: 1,
|
|
141
|
+
outputs: 1,
|
|
142
|
+
icon: 'file.png',
|
|
143
|
+
label: function () {
|
|
144
|
+
var ftpsNode = RED.nodes.node(this.ftps);
|
|
145
|
+
return this.name || 'ftps';
|
|
146
|
+
},
|
|
147
|
+
labelStyle: function () {
|
|
148
|
+
return this.name ? 'node_label_italic' : '';
|
|
149
|
+
},
|
|
150
|
+
oneditprepare: function () {
|
|
151
|
+
var filename = $('.input-filename-row');
|
|
152
|
+
var fileExtension = $('.input-fileExtension-row');
|
|
153
|
+
$('#node-input-operation').change(function () {
|
|
154
|
+
var id = $('#node-input-operation option:selected').val();
|
|
155
|
+
console.log(id);
|
|
156
|
+
if (id == 'list') {
|
|
157
|
+
filename.hide();
|
|
158
|
+
fileExtension.hide();
|
|
159
|
+
} else if (id == 'put') {
|
|
160
|
+
filename.show();
|
|
161
|
+
fileExtension.show();
|
|
162
|
+
} else if (id == 'get') {
|
|
163
|
+
filename.show();
|
|
164
|
+
fileExtension.hide();
|
|
165
|
+
} else {
|
|
166
|
+
filename.show();
|
|
167
|
+
fileExtension.hide();
|
|
168
|
+
}
|
|
169
|
+
});
|
|
170
|
+
},
|
|
171
|
+
});
|
|
172
|
+
</script>
|
package/nodes/ftps.js
ADDED
|
@@ -0,0 +1,271 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2015 Atsushi Kojo.
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
**/
|
|
16
|
+
|
|
17
|
+
process.env.NODE_TLS_REJECT_UNAUTHORIZED = '0';
|
|
18
|
+
const ftps = require('basic-ftp');
|
|
19
|
+
|
|
20
|
+
module.exports = function (RED) {
|
|
21
|
+
'use strict';
|
|
22
|
+
// var fs = require('fs');
|
|
23
|
+
|
|
24
|
+
// const ReadableStream = require('stream');
|
|
25
|
+
|
|
26
|
+
function FtpsNode(n) {
|
|
27
|
+
RED.nodes.createNode(this, n);
|
|
28
|
+
// let node = this;
|
|
29
|
+
|
|
30
|
+
this.options = {
|
|
31
|
+
host: n.host || 'localhost',
|
|
32
|
+
port: n.port || 21,
|
|
33
|
+
secure: n.secure || false,
|
|
34
|
+
secureOptions: n.secureOptions,
|
|
35
|
+
user: n.user || 'anonymous',
|
|
36
|
+
password: n.password || 'anonymous@',
|
|
37
|
+
pass: n.password || 'anonymous@',
|
|
38
|
+
connTimeout: n.connTimeout || 10000,
|
|
39
|
+
pasvTimeout: n.pasvTimeout || 10000,
|
|
40
|
+
keepalive: n.keepalive || 10000,
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
RED.nodes.registerType('ftps', FtpsNode);
|
|
45
|
+
|
|
46
|
+
function FtpsInNode(n) {
|
|
47
|
+
RED.nodes.createNode(this, n);
|
|
48
|
+
|
|
49
|
+
this.ftps = n.ftps;
|
|
50
|
+
this.operation = n.operation;
|
|
51
|
+
this.filename = n.filename;
|
|
52
|
+
this.fileExtension = n.fileExtension;
|
|
53
|
+
this.workdir = n.workdir;
|
|
54
|
+
this.ftpsConfig = RED.nodes.getNode(this.ftps);
|
|
55
|
+
|
|
56
|
+
if (this.ftpsConfig) {
|
|
57
|
+
const node = this;
|
|
58
|
+
// console.log("FTP ftpsConfig: " + JSON.stringify(this.ftpsConfig));
|
|
59
|
+
node.on('input', async (msg, send, done) => {
|
|
60
|
+
try {
|
|
61
|
+
node.workdir = node.workdir || msg.workdir || '/';
|
|
62
|
+
node.fileExtension = node.fileExtension || msg.fileExtension || '';
|
|
63
|
+
|
|
64
|
+
/*FTP options*/
|
|
65
|
+
node.ftpsConfig.options.host = msg.host || node.ftpsConfig.options.host;
|
|
66
|
+
node.ftpsConfig.options.port = msg.port || node.ftpsConfig.options.port;
|
|
67
|
+
node.ftpsConfig.options.user = msg.user || node.ftpsConfig.options.user;
|
|
68
|
+
node.ftpsConfig.options.password = msg.password || node.ftpsConfig.options.password;
|
|
69
|
+
node.ftpsConfig.options.pass = msg.pass || msg.password || node.ftpsConfig.options.pass;
|
|
70
|
+
node.ftpsConfig.options.secure = true;
|
|
71
|
+
node.ftpsConfig.options.secureOptions = {
|
|
72
|
+
rejectUnauthorized: false,
|
|
73
|
+
};
|
|
74
|
+
|
|
75
|
+
const client = new ftps.Client();
|
|
76
|
+
client.ftp.verbose = true;
|
|
77
|
+
|
|
78
|
+
try {
|
|
79
|
+
await client.access(node.ftpsConfig.options);
|
|
80
|
+
// console.log(await client.list());
|
|
81
|
+
// await client.uploadFrom('README.md', 'README_FTP.md');
|
|
82
|
+
// await client.downloadTo('README_COPY.md', 'README_FTP.md');
|
|
83
|
+
// await client.remove('prova.txt');
|
|
84
|
+
} catch (err) {
|
|
85
|
+
console.log(err);
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
// const Ftp = new JSFtp(node.ftpsConfig.options);
|
|
89
|
+
switch (node.operation) {
|
|
90
|
+
case 'list':
|
|
91
|
+
console.log('FTP List:' + node.workdir.toString());
|
|
92
|
+
try {
|
|
93
|
+
let data = await client.list(node.workdir);
|
|
94
|
+
msg.payload = data;
|
|
95
|
+
client.close();
|
|
96
|
+
node.send(msg);
|
|
97
|
+
} catch (err) {
|
|
98
|
+
client.close();
|
|
99
|
+
done(err);
|
|
100
|
+
}
|
|
101
|
+
break;
|
|
102
|
+
case 'get':
|
|
103
|
+
const ftpfilename = node.workdir + node.filename;
|
|
104
|
+
if (msg.payload.filename) ftpfilename = msg.payload.filename;
|
|
105
|
+
let str = '';
|
|
106
|
+
console.log('FTP Get:' + ftpfilename);
|
|
107
|
+
|
|
108
|
+
const stream = require('stream');
|
|
109
|
+
const dataStream = new stream.Writable({
|
|
110
|
+
write: function (chunk, encoding, next) {
|
|
111
|
+
str += chunk.toString();
|
|
112
|
+
next();
|
|
113
|
+
},
|
|
114
|
+
});
|
|
115
|
+
try {
|
|
116
|
+
await client.downloadTo(dataStream, ftpfilename);
|
|
117
|
+
node.status({});
|
|
118
|
+
msg.payload = {};
|
|
119
|
+
msg.payload.filedata = str;
|
|
120
|
+
msg.payload.filename = ftpfilename;
|
|
121
|
+
client.close();
|
|
122
|
+
node.send(msg);
|
|
123
|
+
} catch (err) {
|
|
124
|
+
client.close();
|
|
125
|
+
done(err);
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
// Ftp.get(ftpfilename, (err, socket) => {
|
|
129
|
+
// if (err) {
|
|
130
|
+
// // node.error(err, msg);
|
|
131
|
+
// done(err);
|
|
132
|
+
// } else {
|
|
133
|
+
// socket.on('data', (d) => {
|
|
134
|
+
// str += d.toString();
|
|
135
|
+
// });
|
|
136
|
+
|
|
137
|
+
// socket.on('close', (err) => {
|
|
138
|
+
// if (err) {
|
|
139
|
+
// // node.error(err, msg);
|
|
140
|
+
// done(err);
|
|
141
|
+
// }
|
|
142
|
+
|
|
143
|
+
// node.status({});
|
|
144
|
+
// msg.payload = {};
|
|
145
|
+
// msg.payload.filedata = str;
|
|
146
|
+
// msg.payload.filename = ftpfilename;
|
|
147
|
+
// node.send(msg);
|
|
148
|
+
// });
|
|
149
|
+
// socket.resume();
|
|
150
|
+
// }
|
|
151
|
+
// });
|
|
152
|
+
break;
|
|
153
|
+
case 'put':
|
|
154
|
+
let newFile = '';
|
|
155
|
+
if (msg.payload.filename) {
|
|
156
|
+
newFile = msg.payload.filename;
|
|
157
|
+
} else if (node.filename == '') {
|
|
158
|
+
let d = new Date();
|
|
159
|
+
let guid = d.getTime().toString();
|
|
160
|
+
if (node.fileExtension == '') node.fileExtension = '.txt';
|
|
161
|
+
newFile = node.workdir + guid + node.fileExtension;
|
|
162
|
+
} else {
|
|
163
|
+
newFile = node.workdir + node.filename;
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
let msgData = '';
|
|
167
|
+
if (msg.payload.filedata) msgData = msg.payload.filedata;
|
|
168
|
+
else msgData = JSON.stringify(msg.payload);
|
|
169
|
+
|
|
170
|
+
console.log('FTP Put:' + newFile);
|
|
171
|
+
|
|
172
|
+
// let Ftp = new JSFtp(node.ftpsConfig.options);
|
|
173
|
+
|
|
174
|
+
const { Readable } = require('stream');
|
|
175
|
+
const buffer = new Buffer.from(msgData);
|
|
176
|
+
try {
|
|
177
|
+
await client.uploadFrom(Readable.from(buffer), newFile);
|
|
178
|
+
node.status({});
|
|
179
|
+
msg.payload = {};
|
|
180
|
+
msg.payload.filename = newFile;
|
|
181
|
+
client.close();
|
|
182
|
+
node.send(msg);
|
|
183
|
+
} catch (err) {
|
|
184
|
+
client.close();
|
|
185
|
+
done(err);
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
// Ftp.put(buffer, newFile, (err) => {
|
|
189
|
+
// if (err) {
|
|
190
|
+
// // node.error(err, msg);
|
|
191
|
+
// done(err);
|
|
192
|
+
// } else {
|
|
193
|
+
// node.status({});
|
|
194
|
+
// msg.payload = {};
|
|
195
|
+
// msg.payload.filename = newFile;
|
|
196
|
+
// node.send(msg);
|
|
197
|
+
// }
|
|
198
|
+
// });
|
|
199
|
+
break;
|
|
200
|
+
case 'delete':
|
|
201
|
+
let delFile = '';
|
|
202
|
+
if (msg.payload.filename) delFile = msg.payload.filename;
|
|
203
|
+
else delFile = node.workdir + node.filename;
|
|
204
|
+
console.log('FTP Delete:' + delFile);
|
|
205
|
+
try {
|
|
206
|
+
await client.remove(delFile);
|
|
207
|
+
node.status({});
|
|
208
|
+
msg.payload = {};
|
|
209
|
+
msg.payload.filename = delFile;
|
|
210
|
+
client.close();
|
|
211
|
+
node.send(msg);
|
|
212
|
+
} catch (err) {
|
|
213
|
+
client.close();
|
|
214
|
+
done(err);
|
|
215
|
+
}
|
|
216
|
+
// var Ftp = new JSFtp(node.ftpsConfig.options);
|
|
217
|
+
// Ftp.raw('dele', delFile, (err, data) => {
|
|
218
|
+
// if (err) {
|
|
219
|
+
// // node.error(err, msg);
|
|
220
|
+
// done(err);
|
|
221
|
+
// } else {
|
|
222
|
+
// node.status({});
|
|
223
|
+
// msg.payload = {};
|
|
224
|
+
// msg.payload.filename = delFile;
|
|
225
|
+
// node.send(msg);
|
|
226
|
+
// }
|
|
227
|
+
// });
|
|
228
|
+
break;
|
|
229
|
+
}
|
|
230
|
+
} catch (error) {
|
|
231
|
+
console.log('FTP Caught Error:' + error);
|
|
232
|
+
client.close();
|
|
233
|
+
// node.error(error, msg);
|
|
234
|
+
done(error);
|
|
235
|
+
}
|
|
236
|
+
});
|
|
237
|
+
} else {
|
|
238
|
+
this.error('missing ftps configuration');
|
|
239
|
+
}
|
|
240
|
+
}
|
|
241
|
+
RED.nodes.registerType('ftps in', FtpsInNode);
|
|
242
|
+
};
|
|
243
|
+
|
|
244
|
+
// process.env.NODE_TLS_REJECT_UNAUTHORIZED = '0';
|
|
245
|
+
|
|
246
|
+
// const ftp = require('basic-ftp');
|
|
247
|
+
|
|
248
|
+
// example();
|
|
249
|
+
|
|
250
|
+
// async function example() {
|
|
251
|
+
// const client = new ftp.Client();
|
|
252
|
+
// client.ftp.verbose = true;
|
|
253
|
+
// try {
|
|
254
|
+
// await client.access({
|
|
255
|
+
// host: 'localhost',
|
|
256
|
+
// user: 'foo',
|
|
257
|
+
// password: 'pass',
|
|
258
|
+
// secure: true,
|
|
259
|
+
// secureOptions: {
|
|
260
|
+
// rejectUnauthorized: false,
|
|
261
|
+
// },
|
|
262
|
+
// });
|
|
263
|
+
// console.log(await client.list());
|
|
264
|
+
// await client.uploadFrom('README.md', 'README_FTP.md');
|
|
265
|
+
// await client.downloadTo('README_COPY.md', 'README_FTP.md');
|
|
266
|
+
// // await client.remove('prova.txt');
|
|
267
|
+
// } catch (err) {
|
|
268
|
+
// console.log(err);
|
|
269
|
+
// }
|
|
270
|
+
// client.close();
|
|
271
|
+
// }
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@yousolution/node-red-contrib-you-ftp-sftp",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.9.0",
|
|
4
4
|
"description": "A node-red node that support FTP and SFTP file transfer using $() environment variables to control the ftp connection details",
|
|
5
5
|
"main": "sftp.js",
|
|
6
6
|
"scripts": {
|
|
@@ -16,12 +16,14 @@
|
|
|
16
16
|
"node-red",
|
|
17
17
|
"ftp",
|
|
18
18
|
"sftp",
|
|
19
|
+
"ftps",
|
|
19
20
|
"redconnect"
|
|
20
21
|
],
|
|
21
22
|
"node-red": {
|
|
22
23
|
"nodes": {
|
|
23
24
|
"ftp": "nodes/ftp.js",
|
|
24
|
-
"sftp": "nodes/sftp.js"
|
|
25
|
+
"sftp": "nodes/sftp.js",
|
|
26
|
+
"ftps": "nodes/ftps.js"
|
|
25
27
|
}
|
|
26
28
|
},
|
|
27
29
|
"author": "Andrea Trentin [YouSolution]",
|
|
@@ -33,7 +35,8 @@
|
|
|
33
35
|
"dependencies": {
|
|
34
36
|
"ftp": "^0.3.10",
|
|
35
37
|
"jsftp": "git+https://github.com/sergi/jsftp.git",
|
|
36
|
-
"ssh2-sftp-client": "^1.1.0"
|
|
38
|
+
"ssh2-sftp-client": "^1.1.0",
|
|
39
|
+
"basic-ftp": "^5.0.2"
|
|
37
40
|
},
|
|
38
41
|
"devDependencies": {
|
|
39
42
|
"@types/chai": "^4.3.0",
|