@node-red/nodes 3.0.2 → 3.1.0-beta.1
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/core/common/20-inject.js +48 -29
- package/core/common/24-complete.html +1 -1
- package/core/common/25-catch.html +2 -2
- package/core/common/25-status.html +2 -2
- package/core/common/91-global-config.html +27 -0
- package/core/common/91-global-config.js +7 -0
- package/core/function/10-function.html +12 -8
- package/core/function/15-change.js +1 -1
- package/core/function/16-range.html +1 -0
- package/core/function/16-range.js +6 -2
- package/core/function/80-template.html +2 -1
- package/core/function/89-delay.js +34 -30
- package/core/function/89-trigger.html +8 -1
- package/core/network/05-tls.html +3 -3
- package/core/network/06-httpproxy.html +1 -0
- package/core/network/10-mqtt.html +13 -5
- package/core/network/10-mqtt.js +51 -28
- package/core/network/21-httpin.html +1 -0
- package/core/network/21-httpin.js +12 -3
- package/core/network/21-httprequest.html +1 -0
- package/core/network/21-httprequest.js +5 -0
- package/core/network/31-tcpin.js +1 -1
- package/core/parsers/70-CSV.js +16 -5
- package/core/sequence/17-split.html +6 -1
- package/core/sequence/17-split.js +3 -1
- package/core/sequence/19-batch.html +8 -1
- package/core/storage/10-file.html +0 -0
- package/locales/de/common/20-inject.html +0 -0
- package/locales/de/common/21-debug.html +0 -0
- package/locales/de/common/25-catch.html +0 -0
- package/locales/de/common/25-status.html +0 -0
- package/locales/de/common/60-link.html +0 -0
- package/locales/de/common/90-comment.html +0 -0
- package/locales/de/common/98-unknown.html +0 -0
- package/locales/de/function/10-function.html +0 -0
- package/locales/de/function/10-switch.html +0 -0
- package/locales/de/function/15-change.html +0 -0
- package/locales/de/function/16-range.html +0 -0
- package/locales/de/function/80-template.html +0 -0
- package/locales/de/function/89-delay.html +0 -0
- package/locales/de/function/89-trigger.html +0 -0
- package/locales/de/function/90-exec.html +0 -0
- package/locales/de/messages.json +0 -0
- package/locales/de/network/05-tls.html +0 -0
- package/locales/de/network/06-httpproxy.html +0 -0
- package/locales/de/network/10-mqtt.html +0 -0
- package/locales/de/network/21-httpin.html +0 -0
- package/locales/de/network/21-httprequest.html +0 -0
- package/locales/de/network/22-websocket.html +0 -0
- package/locales/de/network/31-tcpin.html +0 -0
- package/locales/de/network/32-udp.html +0 -0
- package/locales/de/parsers/70-CSV.html +0 -0
- package/locales/de/parsers/70-HTML.html +0 -0
- package/locales/de/parsers/70-JSON.html +0 -0
- package/locales/de/parsers/70-XML.html +0 -0
- package/locales/de/parsers/70-YAML.html +0 -0
- package/locales/de/sequence/17-split.html +0 -0
- package/locales/de/sequence/18-sort.html +0 -0
- package/locales/de/sequence/19-batch.html +0 -0
- package/locales/de/storage/10-file.html +0 -0
- package/locales/de/storage/23-watch.html +0 -0
- package/locales/en-US/common/90-comment.html +1 -1
- package/locales/en-US/common/91-global-config.html +3 -0
- package/locales/en-US/function/16-range.html +3 -0
- package/locales/en-US/function/80-template.html +3 -0
- package/locales/en-US/messages.json +10 -2
- package/locales/en-US/parsers/70-CSV.html +1 -0
- package/locales/ja/common/91-global-config.html +3 -0
- package/locales/ja/function/80-template.html +3 -0
- package/locales/ja/messages.json +14 -5
- package/locales/ja/parsers/70-CSV.html +1 -0
- package/locales/ko/messages.json +0 -0
- package/locales/ru/messages.json +0 -0
- package/package.json +6 -6
package/core/network/10-mqtt.js
CHANGED
|
@@ -295,7 +295,7 @@ module.exports = function(RED) {
|
|
|
295
295
|
/* mute error - it simply isnt JSON, just leave payload as a string */
|
|
296
296
|
}
|
|
297
297
|
}
|
|
298
|
-
} //else {
|
|
298
|
+
} //else {
|
|
299
299
|
//leave as buffer
|
|
300
300
|
//}
|
|
301
301
|
}
|
|
@@ -357,7 +357,7 @@ module.exports = function(RED) {
|
|
|
357
357
|
return;
|
|
358
358
|
}
|
|
359
359
|
done(err);
|
|
360
|
-
});
|
|
360
|
+
});
|
|
361
361
|
} else {
|
|
362
362
|
done();
|
|
363
363
|
}
|
|
@@ -366,6 +366,16 @@ module.exports = function(RED) {
|
|
|
366
366
|
}
|
|
367
367
|
}
|
|
368
368
|
|
|
369
|
+
function updateStatus(node, allNodes) {
|
|
370
|
+
let setStatus = setStatusDisconnected
|
|
371
|
+
if(node.connecting) {
|
|
372
|
+
setStatus = setStatusConnecting
|
|
373
|
+
} else if(node.connected) {
|
|
374
|
+
setStatus = setStatusConnected
|
|
375
|
+
}
|
|
376
|
+
setStatus(node, allNodes)
|
|
377
|
+
}
|
|
378
|
+
|
|
369
379
|
function setStatusDisconnected(node, allNodes) {
|
|
370
380
|
if(allNodes) {
|
|
371
381
|
for (var id in node.users) {
|
|
@@ -459,7 +469,6 @@ module.exports = function(RED) {
|
|
|
459
469
|
if(!opts || typeof opts !== "object") {
|
|
460
470
|
return; //nothing to change, simply return
|
|
461
471
|
}
|
|
462
|
-
const originalBrokerURL = node.brokerurl;
|
|
463
472
|
|
|
464
473
|
//apply property changes (only if the property exists in the opts object)
|
|
465
474
|
setIfHasProperty(opts, node, "url", init);
|
|
@@ -468,13 +477,11 @@ module.exports = function(RED) {
|
|
|
468
477
|
setIfHasProperty(opts, node, "clientid", init);
|
|
469
478
|
setIfHasProperty(opts, node, "autoConnect", init);
|
|
470
479
|
setIfHasProperty(opts, node, "usetls", init);
|
|
471
|
-
setIfHasProperty(opts, node, "usews", init);
|
|
472
480
|
setIfHasProperty(opts, node, "verifyservercert", init);
|
|
473
481
|
setIfHasProperty(opts, node, "compatmode", init);
|
|
474
482
|
setIfHasProperty(opts, node, "protocolVersion", init);
|
|
475
483
|
setIfHasProperty(opts, node, "keepalive", init);
|
|
476
484
|
setIfHasProperty(opts, node, "cleansession", init);
|
|
477
|
-
setIfHasProperty(opts, node, "sessionExpiry", init);
|
|
478
485
|
setIfHasProperty(opts, node, "topicAliasMaximum", init);
|
|
479
486
|
setIfHasProperty(opts, node, "maximumPacketSize", init);
|
|
480
487
|
setIfHasProperty(opts, node, "receiveMaximum", init);
|
|
@@ -484,6 +491,11 @@ module.exports = function(RED) {
|
|
|
484
491
|
} else if (hasProperty(opts, "userProps")) {
|
|
485
492
|
node.userProperties = opts.userProps;
|
|
486
493
|
}
|
|
494
|
+
if (hasProperty(opts, "sessionExpiry")) {
|
|
495
|
+
node.sessionExpiryInterval = opts.sessionExpiry;
|
|
496
|
+
} else if (hasProperty(opts, "sessionExpiryInterval")) {
|
|
497
|
+
node.sessionExpiryInterval = opts.sessionExpiryInterval
|
|
498
|
+
}
|
|
487
499
|
|
|
488
500
|
function createLWT(topic, payload, qos, retain, v5opts, v5SubPropName) {
|
|
489
501
|
let message = undefined;
|
|
@@ -567,9 +579,6 @@ module.exports = function(RED) {
|
|
|
567
579
|
if (typeof node.usetls === 'undefined') {
|
|
568
580
|
node.usetls = false;
|
|
569
581
|
}
|
|
570
|
-
if (typeof node.usews === 'undefined') {
|
|
571
|
-
node.usews = false;
|
|
572
|
-
}
|
|
573
582
|
if (typeof node.verifyservercert === 'undefined') {
|
|
574
583
|
node.verifyservercert = false;
|
|
575
584
|
}
|
|
@@ -698,16 +707,21 @@ module.exports = function(RED) {
|
|
|
698
707
|
if (Object.keys(node.users).length === 1) {
|
|
699
708
|
if(node.autoConnect) {
|
|
700
709
|
node.connect();
|
|
710
|
+
//update nodes status
|
|
711
|
+
setTimeout(function() {
|
|
712
|
+
updateStatus(node, true)
|
|
713
|
+
}, 1)
|
|
701
714
|
}
|
|
702
715
|
}
|
|
703
716
|
};
|
|
704
717
|
|
|
705
|
-
node.deregister = function(mqttNode,done) {
|
|
718
|
+
node.deregister = function(mqttNode, done, autoDisconnect) {
|
|
706
719
|
delete node.users[mqttNode.id];
|
|
707
|
-
if (!node.closing && node.connected && Object.keys(node.users).length === 0) {
|
|
708
|
-
node.disconnect();
|
|
720
|
+
if (autoDisconnect && !node.closing && node.connected && Object.keys(node.users).length === 0) {
|
|
721
|
+
node.disconnect(done);
|
|
722
|
+
} else {
|
|
723
|
+
done();
|
|
709
724
|
}
|
|
710
|
-
done();
|
|
711
725
|
};
|
|
712
726
|
node.canConnect = function() {
|
|
713
727
|
return !node.connected && !node.connecting;
|
|
@@ -782,7 +796,9 @@ module.exports = function(RED) {
|
|
|
782
796
|
|
|
783
797
|
// Send any birth message
|
|
784
798
|
if (node.birthMessage) {
|
|
785
|
-
|
|
799
|
+
setTimeout(() => {
|
|
800
|
+
node.publish(node.birthMessage);
|
|
801
|
+
}, 1);
|
|
786
802
|
}
|
|
787
803
|
});
|
|
788
804
|
node._clientOn("reconnect", function() {
|
|
@@ -839,7 +855,7 @@ module.exports = function(RED) {
|
|
|
839
855
|
let waitEnd = (client, ms) => {
|
|
840
856
|
return new Promise( (resolve, reject) => {
|
|
841
857
|
node.closing = true;
|
|
842
|
-
if(!client) {
|
|
858
|
+
if(!client) {
|
|
843
859
|
resolve();
|
|
844
860
|
} else {
|
|
845
861
|
const t = setTimeout(() => {
|
|
@@ -991,14 +1007,21 @@ module.exports = function(RED) {
|
|
|
991
1007
|
}
|
|
992
1008
|
|
|
993
1009
|
if (topicOK) {
|
|
994
|
-
node.client.publish(msg.topic, msg.payload, options, function(err) {
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
1010
|
+
node.client.publish(msg.topic, msg.payload, options, function (err) {
|
|
1011
|
+
if (done) {
|
|
1012
|
+
done(err)
|
|
1013
|
+
} else if(err) {
|
|
1014
|
+
node.error(err, msg)
|
|
1015
|
+
}
|
|
1016
|
+
})
|
|
998
1017
|
} else {
|
|
999
|
-
const error = new Error(RED._("mqtt.errors.invalid-topic"))
|
|
1000
|
-
error.warn = true
|
|
1001
|
-
done
|
|
1018
|
+
const error = new Error(RED._("mqtt.errors.invalid-topic"))
|
|
1019
|
+
error.warn = true
|
|
1020
|
+
if (done) {
|
|
1021
|
+
done(error)
|
|
1022
|
+
} else {
|
|
1023
|
+
node.warn(error, msg)
|
|
1024
|
+
}
|
|
1002
1025
|
}
|
|
1003
1026
|
}
|
|
1004
1027
|
};
|
|
@@ -1011,7 +1034,7 @@ module.exports = function(RED) {
|
|
|
1011
1034
|
|
|
1012
1035
|
/**
|
|
1013
1036
|
* Add event handlers to the MQTT.js client and track them so that
|
|
1014
|
-
* we do not remove any handlers that the MQTT client uses internally.
|
|
1037
|
+
* we do not remove any handlers that the MQTT client uses internally.
|
|
1015
1038
|
* Use {@link node._clientRemoveListeners `node._clientRemoveListeners`} to remove handlers
|
|
1016
1039
|
* @param {string} event The name of the event
|
|
1017
1040
|
* @param {function} handler The handler for this event
|
|
@@ -1019,11 +1042,11 @@ module.exports = function(RED) {
|
|
|
1019
1042
|
node._clientOn = function(event, handler) {
|
|
1020
1043
|
node.clientListeners.push({event, handler})
|
|
1021
1044
|
node.client.on(event, handler)
|
|
1022
|
-
}
|
|
1045
|
+
}
|
|
1023
1046
|
|
|
1024
1047
|
/**
|
|
1025
|
-
* Remove event handlers from the MQTT.js client & only the events
|
|
1026
|
-
* that we attached in {@link node._clientOn `node._clientOn`}.
|
|
1048
|
+
* Remove event handlers from the MQTT.js client & only the events
|
|
1049
|
+
* that we attached in {@link node._clientOn `node._clientOn`}.
|
|
1027
1050
|
* * If `event` is omitted, then all events matching `handler` are removed
|
|
1028
1051
|
* * If `handler` is omitted, then all events named `event` are removed
|
|
1029
1052
|
* * If both parameters are omitted, then all events are removed
|
|
@@ -1212,7 +1235,7 @@ module.exports = function(RED) {
|
|
|
1212
1235
|
} else {
|
|
1213
1236
|
node.brokerConn.unsubscribe(node.topic,node.id, removed);
|
|
1214
1237
|
}
|
|
1215
|
-
node.brokerConn.deregister(node, done);
|
|
1238
|
+
node.brokerConn.deregister(node, done, removed);
|
|
1216
1239
|
node.brokerConn = null;
|
|
1217
1240
|
} else {
|
|
1218
1241
|
done();
|
|
@@ -1275,9 +1298,9 @@ module.exports = function(RED) {
|
|
|
1275
1298
|
node.status({fill:"green",shape:"dot",text:"node-red:common.status.connected"});
|
|
1276
1299
|
}
|
|
1277
1300
|
node.brokerConn.register(node);
|
|
1278
|
-
node.on('close', function(done) {
|
|
1301
|
+
node.on('close', function(removed, done) {
|
|
1279
1302
|
if (node.brokerConn) {
|
|
1280
|
-
node.brokerConn.deregister(node,done)
|
|
1303
|
+
node.brokerConn.deregister(node, done, removed)
|
|
1281
1304
|
node.brokerConn = null;
|
|
1282
1305
|
} else {
|
|
1283
1306
|
done();
|
|
@@ -46,7 +46,7 @@ module.exports = function(RED) {
|
|
|
46
46
|
isText = true;
|
|
47
47
|
} else if (parsedType.type !== "application") {
|
|
48
48
|
isText = false;
|
|
49
|
-
} else if ((parsedType.subtype !== "octet-stream")
|
|
49
|
+
} else if ((parsedType.subtype !== "octet-stream")
|
|
50
50
|
&& (parsedType.subtype !== "cbor")
|
|
51
51
|
&& (parsedType.subtype !== "x-protobuf")) {
|
|
52
52
|
checkUTF = true;
|
|
@@ -200,6 +200,15 @@ module.exports = function(RED) {
|
|
|
200
200
|
this.callback = function(req,res) {
|
|
201
201
|
var msgid = RED.util.generateId();
|
|
202
202
|
res._msgid = msgid;
|
|
203
|
+
// Since Node 15, req.headers are lazily computed and the property
|
|
204
|
+
// marked as non-enumerable.
|
|
205
|
+
// That means it doesn't show up in the Debug sidebar.
|
|
206
|
+
// This redefines the property causing it to be evaluated *and*
|
|
207
|
+
// marked as enumerable again.
|
|
208
|
+
Object.defineProperty(req, 'headers', {
|
|
209
|
+
value: req.headers,
|
|
210
|
+
enumerable: true
|
|
211
|
+
})
|
|
203
212
|
if (node.method.match(/^(post|delete|put|options|patch)$/)) {
|
|
204
213
|
node.send({_msgid:msgid,req:req,res:createResponseWrapper(node,res),payload:req.body});
|
|
205
214
|
} else if (node.method == "get") {
|
|
@@ -282,7 +291,7 @@ module.exports = function(RED) {
|
|
|
282
291
|
RED.nodes.createNode(this,n);
|
|
283
292
|
var node = this;
|
|
284
293
|
this.headers = n.headers||{};
|
|
285
|
-
this.statusCode = n.statusCode;
|
|
294
|
+
this.statusCode = parseInt(n.statusCode);
|
|
286
295
|
this.on("input",function(msg,_send,done) {
|
|
287
296
|
if (msg.res) {
|
|
288
297
|
var headers = RED.util.cloneMessage(node.headers);
|
|
@@ -323,7 +332,7 @@ module.exports = function(RED) {
|
|
|
323
332
|
}
|
|
324
333
|
}
|
|
325
334
|
}
|
|
326
|
-
var statusCode = node.statusCode || msg.statusCode || 200;
|
|
335
|
+
var statusCode = node.statusCode || parseInt(msg.statusCode) || 200;
|
|
327
336
|
if (typeof msg.payload == "object" && !Buffer.isBuffer(msg.payload)) {
|
|
328
337
|
msg.res._res.status(statusCode).jsonp(msg.payload);
|
|
329
338
|
} else {
|
|
@@ -86,6 +86,7 @@ in your Node-RED user directory (${RED.settings.userDir}).
|
|
|
86
86
|
if (n.paytoqs === true || n.paytoqs === "query") { paytoqs = true; }
|
|
87
87
|
else if (n.paytoqs === "body") { paytobody = true; }
|
|
88
88
|
|
|
89
|
+
node.insecureHTTPParser = n.insecureHTTPParser
|
|
89
90
|
|
|
90
91
|
var prox, noprox;
|
|
91
92
|
if (process.env.http_proxy) { prox = process.env.http_proxy; }
|
|
@@ -434,6 +435,10 @@ in your Node-RED user directory (${RED.settings.userDir}).
|
|
|
434
435
|
formData.append(opt, val);
|
|
435
436
|
} else if (typeof val === 'object' && val.hasOwnProperty('value')) {
|
|
436
437
|
formData.append(opt,val.value,val.options || {});
|
|
438
|
+
} else if (Array.isArray(val)) {
|
|
439
|
+
for (var i=0; i<val.length; i++) {
|
|
440
|
+
formData.append(opt, val[i])
|
|
441
|
+
}
|
|
437
442
|
} else {
|
|
438
443
|
formData.append(opt,JSON.stringify(val));
|
|
439
444
|
}
|
package/core/network/31-tcpin.js
CHANGED
|
@@ -86,7 +86,7 @@ module.exports = function(RED) {
|
|
|
86
86
|
this.topic = n.topic;
|
|
87
87
|
this.stream = (!n.datamode||n.datamode=='stream'); /* stream,single*/
|
|
88
88
|
this.datatype = n.datatype||'buffer'; /* buffer,utf8,base64 */
|
|
89
|
-
this.newline = (n.newline||"").replace(
|
|
89
|
+
this.newline = (n.newline||"").replace(/\\n/g,"\n").replace(/\\r/g,"\r").replace(/\\t/g,"\t");
|
|
90
90
|
this.base64 = n.base64;
|
|
91
91
|
this.trim = n.trim || false;
|
|
92
92
|
this.server = (typeof n.server == 'boolean')?n.server:(n.server == "server");
|
package/core/parsers/70-CSV.js
CHANGED
|
@@ -19,9 +19,9 @@ module.exports = function(RED) {
|
|
|
19
19
|
function CSVNode(n) {
|
|
20
20
|
RED.nodes.createNode(this,n);
|
|
21
21
|
this.template = (n.temp || "");
|
|
22
|
-
this.sep = (n.sep || ',').replace(
|
|
22
|
+
this.sep = (n.sep || ',').replace(/\\t/g,"\t").replace(/\\n/g,"\n").replace(/\\r/g,"\r");
|
|
23
23
|
this.quo = '"';
|
|
24
|
-
this.ret = (n.ret || "\n").replace(
|
|
24
|
+
this.ret = (n.ret || "\n").replace(/\\n/g,"\n").replace(/\\r/g,"\r");
|
|
25
25
|
this.winflag = (this.ret === "\r\n");
|
|
26
26
|
this.lineend = "\n";
|
|
27
27
|
this.multi = n.multi || "one";
|
|
@@ -110,7 +110,12 @@ module.exports = function(RED) {
|
|
|
110
110
|
if (msg.payload[s].hasOwnProperty(p)) {
|
|
111
111
|
/* istanbul ignore else */
|
|
112
112
|
if (typeof msg.payload[s][p] !== "object") {
|
|
113
|
-
|
|
113
|
+
// Fix to honour include null values flag
|
|
114
|
+
//if (typeof msg.payload[s][p] !== "object" || (node.include_null_values === true && msg.payload[s][p] === null)) {
|
|
115
|
+
var q = "";
|
|
116
|
+
if (msg.payload[s][p] !== undefined) {
|
|
117
|
+
q += msg.payload[s][p];
|
|
118
|
+
}
|
|
114
119
|
if (q.indexOf(node.quo) !== -1) { // add double quotes if any quotes
|
|
115
120
|
q = q.replace(/"/g, '""');
|
|
116
121
|
ou += node.quo + q + node.quo + node.sep;
|
|
@@ -130,9 +135,15 @@ module.exports = function(RED) {
|
|
|
130
135
|
ou += node.sep;
|
|
131
136
|
}
|
|
132
137
|
else {
|
|
133
|
-
var
|
|
138
|
+
var tt = template[t];
|
|
139
|
+
if (template[t].indexOf('"') >=0 ) { tt = "'"+tt+"'"; }
|
|
140
|
+
else { tt = '"'+tt+'"'; }
|
|
141
|
+
var p = RED.util.getMessageProperty(msg,'payload["'+s+'"]['+tt+']');
|
|
134
142
|
/* istanbul ignore else */
|
|
135
|
-
if (p ===
|
|
143
|
+
if (p === undefined) { p = ""; }
|
|
144
|
+
// fix to honour include null values flag
|
|
145
|
+
//if (p === null && node.include_null_values !== true) { p = "";}
|
|
146
|
+
p = RED.util.ensureString(p);
|
|
136
147
|
if (p.indexOf(node.quo) !== -1) { // add double quotes if any quotes
|
|
137
148
|
p = p.replace(/"/g, '""');
|
|
138
149
|
ou += node.quo + p + node.quo + node.sep;
|
|
@@ -224,7 +224,12 @@
|
|
|
224
224
|
outputs:1,
|
|
225
225
|
icon: "join.svg",
|
|
226
226
|
label: function() {
|
|
227
|
-
|
|
227
|
+
var nam = this.name||this._("join.join");
|
|
228
|
+
if (this.mode === "custom" && !isNaN(Number(this.count))) {
|
|
229
|
+
nam += " "+this.count;
|
|
230
|
+
if (this.accumulate === true) { nam+= "+"; }
|
|
231
|
+
}
|
|
232
|
+
return nam;
|
|
228
233
|
},
|
|
229
234
|
labelStyle: function() {
|
|
230
235
|
return this.name?"node_label_italic":"";
|
|
@@ -251,7 +251,9 @@ module.exports = function(RED) {
|
|
|
251
251
|
}
|
|
252
252
|
else {
|
|
253
253
|
node.buffer = buff.slice(p,buff.length);
|
|
254
|
-
node.
|
|
254
|
+
if (node.buffer.length > 0) {
|
|
255
|
+
node.pendingDones.push(done);
|
|
256
|
+
}
|
|
255
257
|
}
|
|
256
258
|
if (node.buffer.length == 0) {
|
|
257
259
|
done();
|
|
@@ -107,7 +107,14 @@
|
|
|
107
107
|
outputs:1,
|
|
108
108
|
icon: "batch.svg",
|
|
109
109
|
label: function() {
|
|
110
|
-
|
|
110
|
+
var nam = this.name||this._("batch.batch");
|
|
111
|
+
if (this.mode === "count" && !isNaN(Number(this.count))) {
|
|
112
|
+
nam += " "+this.count;
|
|
113
|
+
}
|
|
114
|
+
if (this.mode === "interval" && !isNaN(Number(this.interval))) {
|
|
115
|
+
nam += " "+this.interval+"s";
|
|
116
|
+
}
|
|
117
|
+
return nam;
|
|
111
118
|
},
|
|
112
119
|
labelStyle: function() {
|
|
113
120
|
return this.name ? "node_label_italic" : "";
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/locales/de/messages.json
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -34,11 +34,14 @@
|
|
|
34
34
|
the range specified within the target range.</p>
|
|
35
35
|
<p><i>Scale and wrap within the target range</i> means that the result will
|
|
36
36
|
be wrapped within the target range.</p>
|
|
37
|
+
<p><i>Scale, but drop if outside input range</i> means that the result will
|
|
38
|
+
be scaled, but any inputs outside of the inout range will be dropped.</p>
|
|
37
39
|
<p>For example an input 0 - 10 mapped to 0 - 100.</p>
|
|
38
40
|
<table style="outline-width:#888 solid thin">
|
|
39
41
|
<tr><th width="80px">mode</th><th width="80px">input</th><th width="80px">output</th></tr>
|
|
40
42
|
<tr><td><center>scale</center></td><td><center>12</center></td><td><center>120</center></td></tr>
|
|
41
43
|
<tr><td><center>limit</center></td><td><center>12</center></td><td><center>100</center></td></tr>
|
|
42
44
|
<tr><td><center>wrap</center></td><td><center>12</center></td><td><center>20</center></td></tr>
|
|
45
|
+
<tr><td><center>drop</center></td><td><center>12</center></td><td><center><i>(no output)</i></center></td></tr>
|
|
43
46
|
</table>
|
|
44
47
|
</script>
|
|
@@ -52,4 +52,7 @@
|
|
|
52
52
|
used to mark the templated sections. For example, to use <code>[[ ]]</code>
|
|
53
53
|
instead, add the following line to the top of the template:</p>
|
|
54
54
|
<pre>{{=[[ ]]=}}</pre>
|
|
55
|
+
<h4>Using environment variables</h4>
|
|
56
|
+
<p>The template node can access environment variables using the syntax:</p>
|
|
57
|
+
<pre>My favourite colour is {{env.COLOUR}}.</pre>
|
|
55
58
|
</script>
|
|
@@ -446,7 +446,9 @@
|
|
|
446
446
|
"staticTopic": "Subscribe to single topic",
|
|
447
447
|
"dynamicTopic": "Dynamic subscription",
|
|
448
448
|
"auto-connect": "Connect automatically",
|
|
449
|
-
"auto-mode-depreciated": "This option is depreciated. Please use the new auto-detect mode."
|
|
449
|
+
"auto-mode-depreciated": "This option is depreciated. Please use the new auto-detect mode.",
|
|
450
|
+
"none": "none",
|
|
451
|
+
"other": "other"
|
|
450
452
|
},
|
|
451
453
|
"sections-label": {
|
|
452
454
|
"birth-message": "Message sent on connection (birth message)",
|
|
@@ -814,7 +816,8 @@
|
|
|
814
816
|
"scale": {
|
|
815
817
|
"payload": "Scale the message property",
|
|
816
818
|
"limit": "Scale and limit to the target range",
|
|
817
|
-
"wrap": "Scale and wrap within the target range"
|
|
819
|
+
"wrap": "Scale and wrap within the target range",
|
|
820
|
+
"drop": "Scale, but drop msg if outside input range"
|
|
818
821
|
},
|
|
819
822
|
"tip": "Tip: This node ONLY works with numbers.",
|
|
820
823
|
"errors": {
|
|
@@ -1124,5 +1127,10 @@
|
|
|
1124
1127
|
"warn": {
|
|
1125
1128
|
"nonumber": "no number found in payload"
|
|
1126
1129
|
}
|
|
1130
|
+
},
|
|
1131
|
+
"global-config": {
|
|
1132
|
+
"label": {
|
|
1133
|
+
"open-conf": "Open Configuration"
|
|
1134
|
+
}
|
|
1127
1135
|
}
|
|
1128
1136
|
}
|
|
@@ -47,5 +47,6 @@
|
|
|
47
47
|
<p>If 'include null values' option is checked, null values will be returned in result, ie. middle value '"1",,3'.</p>
|
|
48
48
|
<p>The node can accept a multi-part input as long as the <code>parts</code> property is set correctly, for example from a file-in node or split node.</p>
|
|
49
49
|
<p>If outputting multiple messages they will have their <code>parts</code> property set and form a complete message sequence.</p>
|
|
50
|
+
<p>If the node is set to only send column headers once, then setting <code>msg.reset</code> to any value will cause the node to resend the headers.</p>
|
|
50
51
|
<p><b>Note:</b> the column template must be comma separated - even if a different separator is chosen for the data.</p>
|
|
51
52
|
</script>
|
|
@@ -48,4 +48,7 @@
|
|
|
48
48
|
<p><b>注: </b>デフォルトでは、<i>mustache</i>形式は置換対象のHTML要素をエスケープします。これを抑止するには<code>{{{三重}}}</code>括弧形式を使います。</p>
|
|
49
49
|
<p>もし、コンテンツの中で<code>{{ }}</code>を出力する必要がある場合は、テンプレートで使われる記号文字を変えることもできます。例えば、<code>[[ ]]</code>を代わりに用いるには、テンプレートの先頭に以下の行を追加します。</p>
|
|
50
50
|
<pre>{{=[[ ]]=}}</pre>
|
|
51
|
+
<h4>環境変数の利用</h4>
|
|
52
|
+
<p>templateノードでは、次の構文を用いると環境変数にアクセスできます:</p>
|
|
53
|
+
<pre>私の好きな色は{{env.COLOUR}}です。</pre>
|
|
51
54
|
</script>
|
package/locales/ja/messages.json
CHANGED
|
@@ -446,7 +446,9 @@
|
|
|
446
446
|
"staticTopic": "1つのトピックを購読",
|
|
447
447
|
"dynamicTopic": "動的な購読",
|
|
448
448
|
"auto-connect": "自動接続",
|
|
449
|
-
"auto-mode-depreciated": "本オプションは非推奨になりました。新しい自動判定モードを使用してください。"
|
|
449
|
+
"auto-mode-depreciated": "本オプションは非推奨になりました。新しい自動判定モードを使用してください。",
|
|
450
|
+
"none": "なし",
|
|
451
|
+
"other": "その他"
|
|
450
452
|
},
|
|
451
453
|
"sections-label": {
|
|
452
454
|
"birth-message": "接続時の送信メッセージ(Birthメッセージ)",
|
|
@@ -554,7 +556,8 @@
|
|
|
554
556
|
},
|
|
555
557
|
"status": {
|
|
556
558
|
"requesting": "要求中"
|
|
557
|
-
}
|
|
559
|
+
},
|
|
560
|
+
"insecureHTTPParser": "厳密なHTTPパース処理を無効化"
|
|
558
561
|
},
|
|
559
562
|
"websocket": {
|
|
560
563
|
"label": {
|
|
@@ -777,8 +780,8 @@
|
|
|
777
780
|
"change": "値の置換",
|
|
778
781
|
"delete": "値の削除",
|
|
779
782
|
"move": "値の移動",
|
|
780
|
-
"toValue": "
|
|
781
|
-
"to": "
|
|
783
|
+
"toValue": "代入する値",
|
|
784
|
+
"to": "移動先",
|
|
782
785
|
"search": "検索する文字列",
|
|
783
786
|
"replace": "置換後の文字列"
|
|
784
787
|
},
|
|
@@ -813,7 +816,8 @@
|
|
|
813
816
|
"scale": {
|
|
814
817
|
"payload": "msg.payloadの値を拡大/縮小",
|
|
815
818
|
"limit": "入力値の範囲外の値を最小値/最大値とし拡大/縮小",
|
|
816
|
-
"wrap": "入力値の範囲外の値を範囲幅で割った余りとし拡大/縮小"
|
|
819
|
+
"wrap": "入力値の範囲外の値を範囲幅で割った余りとし拡大/縮小",
|
|
820
|
+
"drop": "値を拡大/縮小(入力範囲外の時はメッセージを削除)"
|
|
817
821
|
},
|
|
818
822
|
"tip": "注釈: 本ノードは、数値のみ扱うことができます。",
|
|
819
823
|
"errors": {
|
|
@@ -1123,5 +1127,10 @@
|
|
|
1123
1127
|
"warn": {
|
|
1124
1128
|
"nonumber": "ペイロードに数値が含まれていません"
|
|
1125
1129
|
}
|
|
1130
|
+
},
|
|
1131
|
+
"global-config": {
|
|
1132
|
+
"label": {
|
|
1133
|
+
"open-conf": "設定を開く"
|
|
1134
|
+
}
|
|
1126
1135
|
}
|
|
1127
1136
|
}
|
|
@@ -43,5 +43,6 @@
|
|
|
43
43
|
<p>「null値を含む」オプションがチェックされている場合、null値が結果に返されます。つまり「"1",,3」の真ん中の値がnullになります。</p>
|
|
44
44
|
<p>file-inノードやsplitノードが出力するメッセージの様に、<code>parts</code>プロパティが正しく設定されている場合、メッセージ列を入力として受け付けます。</p>
|
|
45
45
|
<p>CSVを複数のメッセージに変換して出力する場合、出力がメッセージ列となるよう<code>parts</code>プロパティを設定します。</p>
|
|
46
|
+
<p>ヘッダを一度だけ送信するよう設定している場合、任意の値を持つ<code>msg.reset</code>を渡すと、再度ヘッダを含めて送信できるようになります。</p>
|
|
46
47
|
<p><b>注:</b> カンマ以外の区切り文字を設定した場合であっても、「列名」はカンマ区切りとしてください。</p>
|
|
47
48
|
</script>
|
package/locales/ko/messages.json
CHANGED
|
File without changes
|
package/locales/ru/messages.json
CHANGED
|
File without changes
|