@node-red/nodes 3.0.1 → 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.
Files changed (74) hide show
  1. package/core/common/20-inject.js +48 -29
  2. package/core/common/24-complete.html +1 -1
  3. package/core/common/25-catch.html +2 -2
  4. package/core/common/25-status.html +2 -2
  5. package/core/common/91-global-config.html +27 -0
  6. package/core/common/91-global-config.js +7 -0
  7. package/core/function/10-function.html +12 -8
  8. package/core/function/15-change.js +1 -1
  9. package/core/function/16-range.html +1 -0
  10. package/core/function/16-range.js +6 -2
  11. package/core/function/80-template.html +2 -1
  12. package/core/function/89-delay.js +34 -30
  13. package/core/function/89-trigger.html +8 -1
  14. package/core/network/05-tls.html +3 -3
  15. package/core/network/06-httpproxy.html +1 -0
  16. package/core/network/10-mqtt.html +13 -5
  17. package/core/network/10-mqtt.js +51 -28
  18. package/core/network/21-httpin.html +1 -0
  19. package/core/network/21-httpin.js +12 -3
  20. package/core/network/21-httprequest.html +13 -0
  21. package/core/network/21-httprequest.js +9 -0
  22. package/core/network/31-tcpin.js +1 -1
  23. package/core/parsers/70-CSV.js +16 -5
  24. package/core/sequence/17-split.html +6 -1
  25. package/core/sequence/17-split.js +3 -1
  26. package/core/sequence/19-batch.html +8 -1
  27. package/core/storage/10-file.html +0 -0
  28. package/locales/de/common/20-inject.html +0 -0
  29. package/locales/de/common/21-debug.html +0 -0
  30. package/locales/de/common/25-catch.html +0 -0
  31. package/locales/de/common/25-status.html +0 -0
  32. package/locales/de/common/60-link.html +0 -0
  33. package/locales/de/common/90-comment.html +0 -0
  34. package/locales/de/common/98-unknown.html +0 -0
  35. package/locales/de/function/10-function.html +0 -0
  36. package/locales/de/function/10-switch.html +0 -0
  37. package/locales/de/function/15-change.html +0 -0
  38. package/locales/de/function/16-range.html +0 -0
  39. package/locales/de/function/80-template.html +0 -0
  40. package/locales/de/function/89-delay.html +0 -0
  41. package/locales/de/function/89-trigger.html +0 -0
  42. package/locales/de/function/90-exec.html +0 -0
  43. package/locales/de/messages.json +0 -0
  44. package/locales/de/network/05-tls.html +0 -0
  45. package/locales/de/network/06-httpproxy.html +0 -0
  46. package/locales/de/network/10-mqtt.html +0 -0
  47. package/locales/de/network/21-httpin.html +0 -0
  48. package/locales/de/network/21-httprequest.html +0 -0
  49. package/locales/de/network/22-websocket.html +0 -0
  50. package/locales/de/network/31-tcpin.html +0 -0
  51. package/locales/de/network/32-udp.html +0 -0
  52. package/locales/de/parsers/70-CSV.html +0 -0
  53. package/locales/de/parsers/70-HTML.html +0 -0
  54. package/locales/de/parsers/70-JSON.html +0 -0
  55. package/locales/de/parsers/70-XML.html +0 -0
  56. package/locales/de/parsers/70-YAML.html +0 -0
  57. package/locales/de/sequence/17-split.html +0 -0
  58. package/locales/de/sequence/18-sort.html +0 -0
  59. package/locales/de/sequence/19-batch.html +0 -0
  60. package/locales/de/storage/10-file.html +0 -0
  61. package/locales/de/storage/23-watch.html +0 -0
  62. package/locales/en-US/common/90-comment.html +1 -1
  63. package/locales/en-US/common/91-global-config.html +3 -0
  64. package/locales/en-US/function/16-range.html +3 -0
  65. package/locales/en-US/function/80-template.html +3 -0
  66. package/locales/en-US/messages.json +12 -3
  67. package/locales/en-US/parsers/70-CSV.html +1 -0
  68. package/locales/ja/common/91-global-config.html +3 -0
  69. package/locales/ja/function/80-template.html +3 -0
  70. package/locales/ja/messages.json +14 -5
  71. package/locales/ja/parsers/70-CSV.html +1 -0
  72. package/locales/ko/messages.json +0 -0
  73. package/locales/ru/messages.json +0 -0
  74. package/package.json +7 -7
@@ -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
- node.publish(node.birthMessage);
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
- done && done(err);
996
- return
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(error);
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();
@@ -227,6 +227,7 @@
227
227
  }
228
228
  });
229
229
  },
230
+ sortable: true,
230
231
  removable: true
231
232
  });
232
233
 
@@ -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 {
@@ -91,6 +91,11 @@
91
91
  <label for="node-input-senderr" style="width: auto" data-i18n="httpin.senderr"></label>
92
92
  </div>
93
93
 
94
+ <div class="form-row">
95
+ <input type="checkbox" id="node-input-insecureHTTPParser" style="display: inline-block; width: auto; vertical-align: top;">
96
+ <label for="node-input-insecureHTTPParser", style="width: auto;" data-i18n="httpin.insecureHTTPParser"></label>
97
+ </div>
98
+
94
99
 
95
100
  <div class="form-row">
96
101
  <label for="node-input-ret"><i class="fa fa-arrow-left"></i> <span data-i18n="httpin.label.return"></span></label>
@@ -227,6 +232,7 @@
227
232
  persist: {value:false},
228
233
  proxy: {type:"http proxy",required: false,
229
234
  label:RED._("node-red:httpin.proxy-config") },
235
+ insecureHTTPParser: {value: false},
230
236
  authType: {value: ""},
231
237
  senderr: {value: false},
232
238
  headers: { value: [] }
@@ -338,6 +344,12 @@
338
344
  } else {
339
345
  $("#node-input-useProxy").prop("checked", false);
340
346
  }
347
+
348
+ if (node.insecureHTTPParser) {
349
+ $("node-intput-insecureHTTPParser").prop("checked", true)
350
+ } else {
351
+ $("node-intput-insecureHTTPParser").prop("checked", false)
352
+ }
341
353
  updateProxyOptions();
342
354
  $("#node-input-useProxy").on("click", function() {
343
355
  updateProxyOptions();
@@ -405,6 +417,7 @@
405
417
  });
406
418
 
407
419
  },
420
+ sortable: true,
408
421
  removable: true
409
422
  });
410
423
  if (node.headers) {
@@ -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; }
@@ -244,6 +245,10 @@ in your Node-RED user directory (${RED.settings.userDir}).
244
245
  delete options.headers[h];
245
246
  }
246
247
  })
248
+
249
+ if (node.insecureHTTPParser) {
250
+ options.insecureHTTPParser = true
251
+ }
247
252
  }
248
253
  ],
249
254
  beforeRedirect: [
@@ -430,6 +435,10 @@ in your Node-RED user directory (${RED.settings.userDir}).
430
435
  formData.append(opt, val);
431
436
  } else if (typeof val === 'object' && val.hasOwnProperty('value')) {
432
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
+ }
433
442
  } else {
434
443
  formData.append(opt,JSON.stringify(val));
435
444
  }
@@ -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("\\n","\n").replace("\\r","\r").replace("\\t","\t");
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");
@@ -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("\\t","\t").replace("\\n","\n").replace("\\r","\r");
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("\\n","\n").replace("\\r","\r");
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
- var q = "" + msg.payload[s][p];
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 p = RED.util.ensureString(RED.util.getMessageProperty(msg,"payload["+s+"]['"+template[t]+"']"));
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 === "undefined") { 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
- return this.name||this._("join.join");
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.pendingDones.push(done);
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
- return this.name||this._("batch.batch");;
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
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
@@ -18,5 +18,5 @@
18
18
  <p>A node you can use to add comments to your flows.</p>
19
19
  <h3>Details</h3>
20
20
  <p>The edit panel will accept Markdown syntax. The text will be rendered into
21
- this information side panel.</p>
21
+ the information side panel.</p>
22
22
  </script>
@@ -0,0 +1,3 @@
1
+ <script type="text/html" data-help-name="global-config">
2
+ <p>A node for holding global configuration of flows.</p>
3
+ </script>
@@ -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)",
@@ -554,7 +556,8 @@
554
556
  },
555
557
  "status": {
556
558
  "requesting": "requesting"
557
- }
559
+ },
560
+ "insecureHTTPParser": "Disable strict HTTP parsing"
558
561
  },
559
562
  "websocket": {
560
563
  "label": {
@@ -813,7 +816,8 @@
813
816
  "scale": {
814
817
  "payload": "Scale the message property",
815
818
  "limit": "Scale and limit to the target range",
816
- "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"
817
821
  },
818
822
  "tip": "Tip: This node ONLY works with numbers.",
819
823
  "errors": {
@@ -1123,5 +1127,10 @@
1123
1127
  "warn": {
1124
1128
  "nonumber": "no number found in payload"
1125
1129
  }
1130
+ },
1131
+ "global-config": {
1132
+ "label": {
1133
+ "open-conf": "Open Configuration"
1134
+ }
1126
1135
  }
1127
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>
@@ -0,0 +1,3 @@
1
+ <script type="text/html" data-help-name="global-config">
2
+ <p>大域的なフローの設定を保持するノード。大域的な環境変数の定義を含みます。</p>
3
+ </script>p
@@ -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>