@node-red/nodes 3.1.0-beta.3 → 3.1.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.
Files changed (45) hide show
  1. package/core/common/25-catch.html +3 -1
  2. package/core/common/25-status.html +9 -1
  3. package/core/common/60-link.html +1 -1
  4. package/core/function/10-function.html +31 -4
  5. package/core/function/10-function.js +23 -4
  6. package/core/function/10-switch.html +5 -1
  7. package/core/function/89-delay.js +1 -0
  8. package/core/network/10-mqtt.html +2 -2
  9. package/core/network/10-mqtt.js +0 -1
  10. package/core/network/21-httprequest.html +1 -1
  11. package/core/network/21-httprequest.js +27 -15
  12. package/core/sequence/17-split.js +3 -0
  13. package/core/storage/10-file.js +16 -4
  14. package/icons/arduino.svg +1 -0
  15. package/icons/bluetooth.svg +1 -0
  16. package/icons/leveldb.svg +1 -0
  17. package/icons/mongodb.svg +1 -0
  18. package/icons/mouse.svg +1 -0
  19. package/icons/rbe.svg +1 -0
  20. package/icons/redis.svg +1 -0
  21. package/locales/de/function/10-function.html +1 -1
  22. package/locales/de/messages.json +2 -1
  23. package/locales/en-US/common/20-inject.html +1 -1
  24. package/locales/en-US/function/10-function.html +1 -1
  25. package/locales/en-US/messages.json +4 -1
  26. package/locales/fr/function/10-function.html +1 -1
  27. package/locales/fr/messages.json +3 -0
  28. package/locales/ja/common/20-inject.html +1 -1
  29. package/locales/ja/function/10-function.html +1 -1
  30. package/locales/ja/messages.json +6 -1
  31. package/locales/ko/function/10-function.html +1 -1
  32. package/locales/pt-BR/function/10-function.html +1 -1
  33. package/locales/pt-BR/messages.json +0 -0
  34. package/locales/ru/function/10-function.html +1 -1
  35. package/locales/ru/messages.json +2 -1
  36. package/locales/zh-CN/function/10-function.html +1 -1
  37. package/locales/zh-TW/function/10-function.html +1 -1
  38. package/package.json +4 -4
  39. package/icons/arduino.png +0 -0
  40. package/icons/bluetooth.png +0 -0
  41. package/icons/leveldb.png +0 -0
  42. package/icons/mongodb.png +0 -0
  43. package/icons/mouse.png +0 -0
  44. package/icons/rbe.png +0 -0
  45. package/icons/redis.png +0 -0
@@ -41,7 +41,9 @@
41
41
  if (this.name) {
42
42
  return this.name;
43
43
  }
44
- if (this.scope) {
44
+ if (this.scope === "group") {
45
+ return this._("catch.catchGroup");
46
+ } else if (Array.isArray(this.scope)) {
45
47
  return this._("catch.catchNodes",{number:this.scope.length});
46
48
  }
47
49
  return this.uncaught?this._("catch.catchUncaught"):this._("catch.catch")
@@ -33,7 +33,15 @@
33
33
  outputs:1,
34
34
  icon: "status.svg",
35
35
  label: function() {
36
- return this.name||(this.scope?this._("status.statusNodes",{number:this.scope.length}):this._("status.status"));
36
+ if (this.name) {
37
+ return this.name;
38
+ }
39
+ if (this.scope === "group") {
40
+ return this._("status.statusGroup");
41
+ } else if (Array.isArray(this.scope)) {
42
+ return this._("status.statusNodes",{number:this.scope.length});
43
+ }
44
+ return this._("status.status")
37
45
  },
38
46
  labelStyle: function() {
39
47
  return this.name?"node_label_italic":"";
@@ -28,7 +28,7 @@
28
28
  <input type="text" id="node-input-name" data-i18n="[placeholder]common.label.name">
29
29
  </div>
30
30
  <div class="form-row">
31
- <label for="node-input-timeout"><span data-i18n="exec.label.timeout"></span></label>
31
+ <label for="node-input-timeout"><i class="fa fa-clock-o"></i> <span data-i18n="exec.label.timeout"></span></label>
32
32
  <input type="text" id="node-input-timeout" placeholder="30" style="width: 70px; margin-right: 5px;"><span data-i18n="inject.seconds"></span>
33
33
  </div>
34
34
  <div class="form-row">
@@ -77,9 +77,15 @@
77
77
  <div id="func-tabs-content" style="min-height: calc(100% - 95px);">
78
78
 
79
79
  <div id="func-tab-config" style="display:none">
80
- <div class="form-row">
81
- <label for="node-input-outputs"><i class="fa fa-random"></i> <span data-i18n="function.label.outputs"></span></label>
82
- <input id="node-input-outputs" style="width: 60px;" value="1">
80
+ <div>
81
+ <div class="form-row" style="display: inline-block; margin-right: 50px;">
82
+ <label for="node-input-outputs"><i class="fa fa-random"></i> <span data-i18n="function.label.outputs"></span></label>
83
+ <input id="node-input-outputs" style="width: 60px;" value="1">
84
+ </div>
85
+ <div class="form-row" style="display: inline-block;">
86
+ <label for="node-input-timeout"><i class="fa fa-clock-o"></i> <span data-i18n="function.label.timeout"></span></label>
87
+ <input id="node-input-timeout" style="width: 60px;" data-i18n="[placeholder]join.seconds">
88
+ </div>
83
89
  </div>
84
90
 
85
91
  <div class="form-row node-input-libs-row hide" style="margin-bottom: 0px;">
@@ -360,6 +366,7 @@
360
366
  name: {value:"_DEFAULT_"},
361
367
  func: {value:"\nreturn msg;"},
362
368
  outputs: {value:1},
369
+ timeout:{value:RED.settings.functionTimeout || 0},
363
370
  noerr: {value:0,required:true,
364
371
  validate: function(v, opt) {
365
372
  if (!v) {
@@ -464,6 +471,26 @@
464
471
  }
465
472
  });
466
473
 
474
+ // 4294967 is max in node.js timeout.
475
+ $( "#node-input-timeout" ).spinner({
476
+ min: 0,
477
+ max: 4294967,
478
+ change: function(event, ui) {
479
+ var value = this.value;
480
+ if(value == ""){
481
+ value = 0;
482
+ }
483
+ else
484
+ {
485
+ value = parseInt(value);
486
+ }
487
+ value = isNaN(value) ? 1 : value;
488
+ value = Math.max(value, parseInt($(this).attr("aria-valuemin")));
489
+ value = Math.min(value, parseInt($(this).attr("aria-valuemax")));
490
+ if (value !== this.value) { $(this).spinner("value", value); }
491
+ }
492
+ });
493
+
467
494
  var buildEditor = function(id, stateId, focus, value, defaultValue, extraLibs, offset) {
468
495
  var editor = RED.editor.createEditor({
469
496
  id: id,
@@ -503,7 +530,7 @@
503
530
  editor:this.editor, // the field name the main text body goes to
504
531
  mode:"ace/mode/nrjavascript",
505
532
  fields:[
506
- 'name', 'outputs',
533
+ 'name', 'outputs', 'timeout',
507
534
  {
508
535
  name: 'initialize',
509
536
  get: function() {
@@ -96,6 +96,13 @@ module.exports = function(RED) {
96
96
  node.name = n.name;
97
97
  node.func = n.func;
98
98
  node.outputs = n.outputs;
99
+ node.timeout = n.timeout*1000;
100
+ if(node.timeout>0){
101
+ node.timeoutOptions = {
102
+ timeout:node.timeout,
103
+ breakOnSigint:true
104
+ }
105
+ }
99
106
  node.ini = n.initialize ? n.initialize.trim() : "";
100
107
  node.fin = n.finalize ? n.finalize.trim() : "";
101
108
  node.libs = n.libs || [];
@@ -362,6 +369,10 @@ module.exports = function(RED) {
362
369
  })(__initSend__);`;
363
370
  iniOpt = createVMOpt(node, " setup");
364
371
  iniScript = new vm.Script(iniText, iniOpt);
372
+ if(node.timeout>0){
373
+ iniOpt.timeout = node.timeout;
374
+ iniOpt.breakOnSigint = true;
375
+ }
365
376
  }
366
377
  node.script = vm.createScript(functionText, createVMOpt(node, ""));
367
378
  if (node.fin && (node.fin !== "")) {
@@ -385,6 +396,10 @@ module.exports = function(RED) {
385
396
  })();`;
386
397
  finOpt = createVMOpt(node, " cleanup");
387
398
  finScript = new vm.Script(finText, finOpt);
399
+ if(node.timeout>0){
400
+ finOpt.timeout = node.timeout;
401
+ finOpt.breakOnSigint = true;
402
+ }
388
403
  }
389
404
  var promise = Promise.resolve();
390
405
  if (iniScript) {
@@ -396,9 +411,12 @@ module.exports = function(RED) {
396
411
  var start = process.hrtime();
397
412
  context.msg = msg;
398
413
  context.__send__ = send;
399
- context.__done__ = done;
400
-
401
- node.script.runInContext(context);
414
+ context.__done__ = done;
415
+ var opts = {};
416
+ if (node.timeout>0){
417
+ opts = node.timeoutOptions;
418
+ }
419
+ node.script.runInContext(context,opts);
402
420
  context.results.then(function(results) {
403
421
  sendResults(node,send,msg._msgid,results,false);
404
422
  if (handleNodeDoneCall) {
@@ -503,7 +521,8 @@ module.exports = function(RED) {
503
521
  RED.nodes.registerType("function",FunctionNode, {
504
522
  dynamicModuleList: "libs",
505
523
  settings: {
506
- functionExternalModules: { value: true, exportable: true }
524
+ functionExternalModules: { value: true, exportable: true },
525
+ functionTimeout: { value:0, exportable: true }
507
526
  }
508
527
  });
509
528
  RED.library.register("functions");
@@ -217,7 +217,11 @@
217
217
  if (i > 0) {
218
218
  var lastRule = $("#node-input-rule-container").editableList('getItemAt',i-1);
219
219
  var exportedRule = exportRule(lastRule.element);
220
- opt.r.vt = exportedRule.vt;
220
+ if (exportedRule.t === "istype") {
221
+ opt.r.vt = (exportedRule.vt === "number") ? "num" : "str";
222
+ } else {
223
+ opt.r.vt = exportedRule.vt;
224
+ }
221
225
  opt.r.v = "";
222
226
  // We could copy the value over as well and preselect it (see the 'activeElement' code below)
223
227
  // But not sure that feels right. Is copying over the last value 'expected' behaviour?
@@ -229,6 +229,7 @@ module.exports = function(RED) {
229
229
  node.on("input", function(msg, send, done) {
230
230
  if (!node.drop) {
231
231
  var m = RED.util.cloneMessage(msg);
232
+ delete m.flush;
232
233
  if (Object.keys(m).length > 1) {
233
234
  if (node.intervalID !== -1) {
234
235
  if (node.allowrate && m.hasOwnProperty("rate") && !isNaN(parseFloat(m.rate)) && node.rate !== m.rate) {
@@ -492,12 +492,12 @@
492
492
  let ok = true;
493
493
  if ($("#node-config-input-clientid").length) {
494
494
  // Currently editing the node
495
- let needClientId = !$("#node-config-input-cleansession").is(":checked") || !$("#node-config-input-autoUnsubscribe").is(":checked")
495
+ let needClientId = !$("#node-config-input-cleansession").is(":checked")
496
496
  if (needClientId) {
497
497
  ok = (v||"").length > 0;
498
498
  }
499
499
  } else {
500
- let needClientId = !(this.cleansession===undefined || this.cleansession) || this.autoUnsubscribe;
500
+ let needClientId = !(this.cleansession===undefined || this.cleansession)
501
501
  if (needClientId) {
502
502
  ok = (v||"").length > 0;
503
503
  }
@@ -24,7 +24,6 @@ module.exports = function(RED) {
24
24
  "text/css":"string",
25
25
  "text/html":"string",
26
26
  "text/plain":"string",
27
- "text/html":"string",
28
27
  "application/json":"json",
29
28
  "application/octet-stream":"buffer",
30
29
  "application/pdf":"buffer",
@@ -93,7 +93,7 @@
93
93
 
94
94
  <div class="form-row">
95
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>
96
+ <label for="node-input-insecureHTTPParser" style="width: auto;" data-i18n="httpin.insecureHTTPParser"></label>
97
97
  </div>
98
98
 
99
99
 
@@ -23,6 +23,8 @@ module.exports = async function(RED) {
23
23
  const { v4: uuid } = require('uuid');
24
24
  const crypto = require('crypto');
25
25
  const URL = require("url").URL
26
+ const http = require("http")
27
+ const https = require("https")
26
28
  var mustache = require("mustache");
27
29
  var querystring = require("querystring");
28
30
  var cookie = require("cookie");
@@ -65,16 +67,27 @@ in your Node-RED user directory (${RED.settings.userDir}).
65
67
  function HTTPRequest(n) {
66
68
  RED.nodes.createNode(this,n);
67
69
  checkNodeAgentPatch();
68
- var node = this;
69
- var nodeUrl = n.url;
70
- var isTemplatedUrl = (nodeUrl||"").indexOf("{{") != -1;
71
- var nodeMethod = n.method || "GET";
72
- var paytoqs = false;
73
- var paytobody = false;
74
- var redirectList = [];
75
- var sendErrorsToCatch = n.senderr;
70
+ const node = this;
71
+ const nodeUrl = n.url;
72
+ const isTemplatedUrl = (nodeUrl||"").indexOf("{{") != -1;
73
+ const nodeMethod = n.method || "GET";
74
+ let paytoqs = false;
75
+ let paytobody = false;
76
+ let redirectList = [];
77
+ const sendErrorsToCatch = n.senderr;
76
78
  node.headers = n.headers || [];
77
- var nodeHTTPPersistent = n["persist"];
79
+ const useKeepAlive = n["persist"];
80
+ let agents = null
81
+ if (useKeepAlive) {
82
+ agents = {
83
+ http: new http.Agent({ keepAlive: true }),
84
+ https: new https.Agent({ keepAlive: true })
85
+ }
86
+ node.on('close', function () {
87
+ agents.http.destroy()
88
+ agents.https.destroy()
89
+ })
90
+ }
78
91
  if (n.tls) {
79
92
  var tlsNode = RED.nodes.getNode(n.tls);
80
93
  }
@@ -439,10 +452,6 @@ in your Node-RED user directory (${RED.settings.userDir}).
439
452
  formData.append(opt, val);
440
453
  } else if (typeof val === 'object' && val.hasOwnProperty('value')) {
441
454
  formData.append(opt,val.value,val.options || {});
442
- } else if (Array.isArray(val)) {
443
- for (var i=0; i<val.length; i++) {
444
- formData.append(opt, val[i])
445
- }
446
455
  } else {
447
456
  formData.append(opt,JSON.stringify(val));
448
457
  }
@@ -560,12 +569,14 @@ in your Node-RED user directory (${RED.settings.userDir}).
560
569
  opts.agent = {
561
570
  http: new HttpProxyAgent(proxyOptions),
562
571
  https: new HttpsProxyAgent(proxyOptions)
563
- };
564
-
572
+ }
565
573
  } else {
566
574
  node.warn("Bad proxy url: "+ prox);
567
575
  }
568
576
  }
577
+ if (useKeepAlive && !opts.agent) {
578
+ opts.agent = agents
579
+ }
569
580
  if (tlsNode) {
570
581
  opts.https = {};
571
582
  tlsNode.addTLSOptions(opts.https);
@@ -622,6 +633,7 @@ in your Node-RED user directory (${RED.settings.userDir}).
622
633
  msg.payload = msg.payload.toString('utf8'); // txt
623
634
 
624
635
  if (node.ret === "obj") {
636
+ if (msg.statusCode == 204){msg.payload= "{}"};
625
637
  try { msg.payload = JSON.parse(msg.payload); } // obj
626
638
  catch(e) { node.warn(RED._("httpin.errors.json-error")); }
627
639
  }
@@ -629,6 +629,9 @@ module.exports = function(RED) {
629
629
  joinChar = node.joiner;
630
630
  if (n.count === "" && msg.hasOwnProperty('parts')) {
631
631
  targetCount = msg.parts.count || 0;
632
+ if (msg.parts.hasOwnProperty('id')) {
633
+ partId = msg.parts.id;
634
+ }
632
635
  }
633
636
  if (node.build === 'object') {
634
637
  propertyKey = RED.util.getMessageProperty(msg,node.key);
@@ -68,9 +68,15 @@ module.exports = function(RED) {
68
68
  node.error(err,msg);
69
69
  return done();
70
70
  } else {
71
- filename = value;
71
+ if (typeof value !== 'string' && value !== null && value !== undefined) {
72
+ value = value.toString();
73
+ }
74
+ processMsg2(msg,nodeSend,value,done);
72
75
  }
73
76
  });
77
+ }
78
+
79
+ function processMsg2(msg,nodeSend,filename,done) {
74
80
  filename = filename || "";
75
81
  msg.filename = filename;
76
82
  var fullFilename = filename;
@@ -275,7 +281,6 @@ module.exports = function(RED) {
275
281
  }
276
282
  RED.nodes.registerType("file",FileNode);
277
283
 
278
-
279
284
  function FileInNode(n) {
280
285
  // Read a file
281
286
  RED.nodes.createNode(this,n);
@@ -311,9 +316,15 @@ module.exports = function(RED) {
311
316
  node.error(err,msg);
312
317
  return done();
313
318
  } else {
314
- filename = (value || "").replace(/\t|\r|\n/g,'');
319
+ if (typeof value !== 'string' && value !== null && value !== undefined) {
320
+ value = value.toString();
321
+ }
322
+ processMsg2(msg, nodeSend, (value || "").replace(/\t|\r|\n/g,''), nodeDone);
315
323
  }
316
324
  });
325
+ });
326
+
327
+ function processMsg2(msg, nodeSend, filename, nodeDone) {
317
328
  filename = filename || "";
318
329
  var fullFilename = filename;
319
330
  if (filename && RED.settings.fileWorkingDirectory && !path.isAbsolute(filename)) {
@@ -434,7 +445,8 @@ module.exports = function(RED) {
434
445
  nodeDone();
435
446
  });
436
447
  }
437
- });
448
+ }
449
+
438
450
  this.on('close', function() {
439
451
  node.status({});
440
452
  });
@@ -0,0 +1 @@
1
+ <svg width="40" height="60" viewBox="0, 0, 40, 60" xmlns="http://www.w3.org/2000/svg"><g fill="none" stroke="#fff"><path d="m9.7884 22.379c-5.2427-0.41732-9.6475 5.7885-7.4975 10.585 2.0949 5.2041 9.9782 6.6154 13.727 2.4477 3.633-3.5613 5.0332-9.0411 9.4821-11.853 4.5205-3.0872 11.797-0.172 12.68 5.3144 0.86 5.2537-4.8017 10.364-9.9231 8.8205-3.7873-0.85449-6.5051-4.0905-8.0487-7.4975-1.9019-3.2526-4.3882-6.7257-8.2693-7.6077-0.6891-0.15656-1.4003-0.21831-2.1059-0.21721z" stroke-width="3.3"/><path d="m6.7012 29.821h6.6154" stroke-width="1.4"/><path d="m26.988 29.821h5.5128m-2.8115-2.7564v5.5128" stroke-width="1.8"/></g></svg>
@@ -0,0 +1 @@
1
+ <svg width="40" height="60" viewBox="0, 0, 40, 60" xmlns="http://www.w3.org/2000/svg"><path d="m8.3474 17.75 22.298 22.444-10.747 13.013v-46.497l10.747 12.428-22.298 21.859" fill="none" stroke="#fff" stroke-width="4"/></svg>
@@ -0,0 +1 @@
1
+ <svg width="40" height="60" viewBox="0, 0, 40, 60" xmlns="http://www.w3.org/2000/svg"><path d="m2.7078 12.986c0 7.7994-0.36386 21.569 0 32.545s35.118 9.8751 34.848 0c-0.26959-9.8751 0-24.82 0-32.545 0-7.7243-34.848-7.7995-34.848 0z" fill="none" stroke="#fff"/><g fill="#fff"><path d="m3.8741 13.406v8.955c0.021834 3.5781 19.543 5.0789 25.575 3.2543 0 0 0.02229-2.6683 0.02998-2.6673l5.5325 0.7238c0.64508 0.0844 1.1345-0.74597 1.134-1.3284v-8.573l-0.99896 0.93349-15.217-2.2765c4.5883 2.1798 9.808 4.1312 9.808 4.1312-9.3667 3.1562-25.846-0.31965-25.864-3.1525z"/><path d="m3.886 26.607v8.1052c3.2188 6.1087 29.901 5.8574 32.272 0v-8.1052c-3.3598 4.6685-29.204 5.1534-32.272 0z"/><path d="m4.0032 39.082v7.1522c2.556 7.4622 28.918 7.6072 32.272 0v-7.1522c-3.2345 4.9471-29.087 5.359-32.272 0z"/></g></svg>
@@ -0,0 +1 @@
1
+ <svg width="40" height="60" viewBox="0, 0, 40, 60" xmlns="http://www.w3.org/2000/svg"><path d="m23.515 13.831c-4.7594-5.8789-2.6084-5.7751-7.3474 0-8.0368 10.477-8.3322 24.431 2.5476 32.935 0.13181 2.0418 0.46056 4.9803 0.46056 4.9803h1.315s0.32875-2.9219 0.46017-4.9803c2.8458-2.2339 16.799-14.619 2.5641-32.935z" fill="#fff"/></svg>
@@ -0,0 +1 @@
1
+ <svg width="40" height="60" viewBox="0, 0, 40, 60" xmlns="http://www.w3.org/2000/svg"><g fill="none" stroke="#fff" stroke-width="3"><path d="m6 30c6 5 24 4 29-0.07"/><path d="m21 33 0.1-19c0.02-4 4-3 4-6s-4-2-4-5"/><path d="m6 22c0-11 29-10 29 0v21c0 18-29 19-29 0s4e-7 -11 0-21z"/></g></svg>
package/icons/rbe.svg ADDED
@@ -0,0 +1 @@
1
+ <svg width="40" height="60" viewBox="0, 0, 40, 60" xmlns="http://www.w3.org/2000/svg"><path d="m29 12s0.1 30 0.05 31-3 5-7 5-19 0.04-19 0.04c6-4 9-5 17-5 0 0 4-0.1 4-2 0-2 8e-3 -29 8e-3 -29z" fill="#fff"/><path d="m12 47s-0.1-30-0.05-31 3-5 7-5 19-0.04 19-0.04c-6 4-9 5-17 5 0 0-4 0.1-4 2 0 2-8e-3 29-8e-3 29z" fill="#fff"/></svg>
@@ -0,0 +1 @@
1
+ <svg width="40" height="60" viewBox="0, 0, 40, 60" xmlns="http://www.w3.org/2000/svg"><g fill="none" stroke="#fff" stroke-width="3"><path class="cls-4" d="m17.639 30.221c-1.7087-0.88225-12.465-5.6284-14.414-6.636-1.9492-1.0075-1.9868-1.7073-0.075164-2.5188 1.9117-0.81145 12.643-5.3861 14.91-6.2738 2.2675-0.8877 3.0517-0.91493 4.9785-0.14704 1.9267 0.76789 12.026 5.1329 13.923 5.8898 1.8966 0.75699 1.9843 1.386 0.02631 2.4861-1.958 1.1001-12.1 5.6611-14.285 6.8729s-3.355 1.2091-5.0636 0.32685z"/><path class="cls-4" d="m32.23 25.251c2.8239 1.2039 4.155 1.764 4.7307 1.9938 1.8966 0.75699 1.9843 1.386 0.0263 2.4861s-12.1 5.6611-14.285 6.8729c-2.1848 1.2117-3.3548 1.209-5.0634 0.32676-1.7087-0.88225-12.465-5.6284-14.414-6.636-1.9492-1.0075-1.9868-1.7073-0.075164-2.5188 10.883-4.6196-9.1087 3.8612 4.9598-2.1076"/><path class="cls-4" d="m32.23 31.961c2.8239 1.2039 4.155 1.764 4.7307 1.9938 1.8966 0.75699 1.9843 1.386 0.0263 2.4861s-12.1 5.6611-14.285 6.8729c-2.1848 1.2117-3.3548 1.209-5.0634 0.32676-1.7087-0.88225-12.465-5.6284-14.414-6.636-1.9492-1.0075-1.9868-1.7073-0.075164-2.5188 10.883-4.6196-9.1087 3.8612 4.9598-2.1076"/></g></svg>
@@ -25,7 +25,7 @@
25
25
  <p>Wenn ein promise-Objekt aus dem Start-Code zurückgegeben wird,
26
26
  beginnt danach die reguläre Verarbeitung der Eingangsnachrichten.</p>
27
27
  <h3>Details</h3>
28
- <p>Siehe <a target="_blank" href="http://nodered.org/docs/writing-functions.html">Onlinedokumentation</a>
28
+ <p>Siehe <a target="_blank" href="https://nodered.org/docs/writing-functions.html">Onlinedokumentation</a>
29
29
  für weitere Informationen zum Schreiben von Funktionen.</p>
30
30
  <h4><b>Nachrichten senden</b></h4>
31
31
  <p>Die Funktion kann die Nachrichten zurückgeben, die sie an die nächsten Nodes im Flow weitergeben möchte,
@@ -216,7 +216,8 @@
216
216
  "initialize": "Start",
217
217
  "finalize": "Stopp",
218
218
  "outputs": "Ausgänge",
219
- "modules": "Module"
219
+ "modules": "Module",
220
+ "timeout": "Timeout"
220
221
  },
221
222
  "text": {
222
223
  "initialize": "// Der Code hier wird ausgeführt,\n// wenn der Node gestartet wird\n",
@@ -36,5 +36,5 @@ greater than one day you should consider using a scheduler node that can cope wi
36
36
  <p><b>Note</b>: The <i>"Interval between times"</i> and <i>"at a specific time"</i> options use the standard cron system.
37
37
  This means that 20 minutes will be at the next hour, 20 minutes past and 40 minutes past - not in 20 minutes time.
38
38
  If you want every 20 minutes from now - use the <i>"interval"</i> option.</p>
39
- <p><b>Note</b>: To include a newline in a string you must use a Function node to create the payload.</p>
39
+ <p><b>Note</b>: To include a newline in a string you must use the Function or Template node to create the payload.</p>
40
40
  </script>
@@ -26,7 +26,7 @@
26
26
  <p>If the On Start code returns a Promise object, the node will not start handling messages
27
27
  until the promise is resolved.</p>
28
28
  <h3>Details</h3>
29
- <p>See the <a target="_blank" href="http://nodered.org/docs/writing-functions.html">online documentation</a>
29
+ <p>See the <a target="_blank" href="https://nodered.org/docs/writing-functions.html">online documentation</a>
30
30
  for more information on writing functions.</p>
31
31
  <h4>Sending messages</h4>
32
32
  <p>The function can either return the messages it wants to pass on to the next nodes
@@ -94,6 +94,7 @@
94
94
  },
95
95
  "catch": {
96
96
  "catch": "catch: all",
97
+ "catchGroup": "catch: group",
97
98
  "catchNodes": "catch: __number__",
98
99
  "catchUncaught": "catch: uncaught",
99
100
  "label": {
@@ -109,6 +110,7 @@
109
110
  },
110
111
  "status": {
111
112
  "status": "status: all",
113
+ "statusGroup": "status: group",
112
114
  "statusNodes": "status: __number__",
113
115
  "label": {
114
116
  "source": "Report status from",
@@ -250,7 +252,8 @@
250
252
  "initialize": "On Start",
251
253
  "finalize": "On Stop",
252
254
  "outputs": "Outputs",
253
- "modules": "Modules"
255
+ "modules": "Modules",
256
+ "timeout": "Timeout"
254
257
  },
255
258
  "text": {
256
259
  "initialize": "// Code added here will be run once\n// whenever the node is started.\n",
@@ -26,7 +26,7 @@
26
26
  <p>Si le code 'Au démarrage' renvoie un objet Promise (promesse), le noeud ne commencera pas à gérer les messages
27
27
  jusqu'à ce que la promesse soit résolue.</p>
28
28
  <h3>Détails</h3>
29
- <p>Voir la <a target="_blank" href="http://nodered.org/docs/writing-functions.html">documentation en ligne</a>
29
+ <p>Voir la <a target="_blank" href="https://nodered.org/docs/writing-functions.html">documentation en ligne</a>
30
30
  pour plus d'informations sur les fonctions d'écriture.</p>
31
31
  <h4>Envoi de messages</h4>
32
32
  <p>La fonction peut envoyer les messages qu'elle souhaite transmettre aux noeuds suivants
@@ -103,6 +103,7 @@
103
103
  },
104
104
  "scope": {
105
105
  "all": "tous les noeuds",
106
+ "group": "dans le même groupe",
106
107
  "selected": "noeuds sélectionnés"
107
108
  }
108
109
  },
@@ -115,6 +116,7 @@
115
116
  },
116
117
  "scope": {
117
118
  "all": "tous les noeuds",
119
+ "group": "dans le même groupe",
118
120
  "selected": "noeuds sélectionnés"
119
121
  }
120
122
  },
@@ -414,6 +416,7 @@
414
416
  "port": "Port",
415
417
  "keepalive": "Rester en vie",
416
418
  "cleansession": "Utiliser une session propre",
419
+ "autoUnsubscribe": "Se désabonner automatiquement lors de la déconnexion",
417
420
  "cleanstart": "Utiliser un démarrage propre",
418
421
  "use-tls": "Utiliser TLS",
419
422
  "tls-config": "Configuration TLS",
@@ -30,5 +30,5 @@
30
30
  <p>また、フロー開始の際に一度だけメッセージを送出させることもできます。</p>
31
31
  <p>「<i>時間間隔</i>」に指定可能な値の最大値は、約596時間(もしくは24日)です。一日より長い間隔を扱いたい場合は、電源停止や再起動にも対応可能なスケジューラノードの利用を検討すると良いでしょう。</p>
32
32
  <p><b>注</b>:「<i>指定した時間間隔、日時</i>」と「<i>指定した日時</i>」オプションは標準的なcronシステムを内部で利用します。したがって「20分」という指定は、その時点から20分後ではなく、毎時きっかり、20分、40分を意味します。現時刻から20分毎を指定するには「<i>指定した時間間隔</i>」オプションを用います。</p>
33
- <p><b>注</b>: 文字列に改行を含めたい場合は、functionノードを使ってペイロードを設定してください。</p>
33
+ <p><b>注</b>: 文字列に改行を含めたい場合は、functionノードまたはtemplateノードを使ってペイロードを設定してください。</p>
34
34
  </script>
@@ -22,7 +22,7 @@
22
22
  <p><b>初期化処理</b>タブにはノードの開始時に実行されるコードを、<b>終了処理</b>タブにはノードの終了時に実行されるコードを指定します。</p>
23
23
  <p>初期化処理タブの返却値としてPromiseオブジェクトを返却すると、入力メッセージの処理を開始する前にその完了を待ちます。</p>
24
24
  <h3>詳細</h3>
25
- <p>コードの書き方の詳細については、<a target="_blank" href="http://nodered.org/docs/writing-functions.html">オンラインドキュメント</a>を参照してください。</p>
25
+ <p>コードの書き方の詳細については、<a target="_blank" href="https://nodered.org/docs/writing-functions.html">オンラインドキュメント</a>を参照してください。</p>
26
26
  <h4>メッセージの送信</h4>
27
27
  <p>フロー内の次ノードにメッセージを渡すためには、メッセージを返却するか<code>node.send(messages)</code>を呼び出します。</p>
28
28
  <p>返却/sendの対象は次のとおりです:</p>
@@ -94,6 +94,7 @@
94
94
  },
95
95
  "catch": {
96
96
  "catch": "catch: 全て",
97
+ "catchGroup": "catch: グループ",
97
98
  "catchNodes": "catch: __number__",
98
99
  "catchUncaught": "catch: 未補足",
99
100
  "label": {
@@ -103,11 +104,13 @@
103
104
  },
104
105
  "scope": {
105
106
  "all": "全てのノード",
107
+ "group": "同一グループ内",
106
108
  "selected": "選択したノード"
107
109
  }
108
110
  },
109
111
  "status": {
110
112
  "status": "status: 全て",
113
+ "statusGroup": "status: グループ",
111
114
  "statusNodes": "status: __number__",
112
115
  "label": {
113
116
  "source": "ステータス取得元",
@@ -115,6 +118,7 @@
115
118
  },
116
119
  "scope": {
117
120
  "all": "全てのノード",
121
+ "group": "同一グループ内",
118
122
  "selected": "選択したノード"
119
123
  }
120
124
  },
@@ -248,7 +252,8 @@
248
252
  "initialize": "初期化処理",
249
253
  "finalize": "終了処理",
250
254
  "outputs": "出力数",
251
- "modules": "モジュール"
255
+ "modules": "モジュール",
256
+ "timeout": "タイムアウト"
252
257
  },
253
258
  "text": {
254
259
  "initialize": "// ここに記述したコードは、ノードをデプロイした時に\n// 一度だけ実行されます。\n",
@@ -20,7 +20,7 @@
20
20
  <p><code>msg</code>오브젝트는<code>msg.payload</code>프로퍼티에 메시지 본체를 유지하는 것이 관례입니다.</p>
21
21
  <p>보통 코드는 메시지 오브젝트(혹은 여러 메시지 객체)를 반환합니다.후속 플로우의 실행을 정지하고 싶은 경우에는, 오브젝트를 반환하지 않아도 상관없습니다.</p>
22
22
  <h3>상세</h3>
23
- <p>코드 쓰는 방식에 대한 자세한 내용은, <a target="_blank" href="http://nodered.org/docs/writing-functions.html">공식 홈페이지</a>를 참조해 주세요.</p>
23
+ <p>코드 쓰는 방식에 대한 자세한 내용은, <a target="_blank" href="https://nodered.org/docs/writing-functions.html">공식 홈페이지</a>를 참조해 주세요.</p>
24
24
  <h4>메세지 송신</h4>
25
25
  <p>플로우 내의 다음 노드에 메세지를 전달하기 위해서는, 메세지를 반환하거나, <code>node.send(messages)</code>를 호출합니다.</p>
26
26
  <p>반환/send 대상은 다음과 같습니다:</p>
@@ -26,7 +26,7 @@
26
26
  <p>Se o código <b>On Start</b> retornar um objeto do tipo promessa, o nó não começará a tratar as mensagens
27
27
  até que a promessa seja resolvida.</p>
28
28
  <h3>Detalhes</h3>
29
- <p>Consulte a <a target="_blank" href="http://nodered.org/docs/writing-functions.html">documentação online</a>
29
+ <p>Consulte a <a target="_blank" href="https://nodered.org/docs/writing-functions.html">documentação online</a>
30
30
  para obter maiores informações sobre funções de escrita.</p>
31
31
  <h4>Enviando mensagens</h4>
32
32
  <p>A função pode retornar as mensagens que deseja passar para os próximos nós
File without changes
@@ -36,7 +36,7 @@
36
36
 
37
37
  <h3>Подробности</h3>
38
38
  <p>
39
- Смотрите <a target="_blank" href="http://nodered.org/docs/writing-functions.html">онлайн-документацию</a> для получения дополнительной информации по написанию функций.
39
+ Смотрите <a target="_blank" href="https://nodered.org/docs/writing-functions.html">онлайн-документацию</a> для получения дополнительной информации по написанию функций.
40
40
  </p>
41
41
 
42
42
  <h4>Отправка сообщений</h4>
@@ -212,7 +212,8 @@
212
212
  "function": "Функция",
213
213
  "initialize": "Настройка",
214
214
  "finalize": "Закрытие",
215
- "outputs": "Выходы"
215
+ "outputs": "Выходы",
216
+ "timeout":"Время ожидания"
216
217
  },
217
218
  "text": {
218
219
  "initialize": "// Добавленный здесь код будет исполняться\n// однократно при развертывании узла.\n",
@@ -20,7 +20,7 @@
20
20
  <p>通常,<code>msg</code>对象将消息正文保留在<code>msg.payload</code>属性中。</p>
21
21
  <p>该函数一般会返回一个消息对象(或多个消息对象),但也可以为了停止流而什么都不返回。</p>
22
22
  <h3>详细</h3>
23
- <p>请参见<a target="_blank" href="http://nodered.org/docs/writing-functions.html">在线文档</a>来获得更多有关编写函数的信息。</p>
23
+ <p>请参见<a target="_blank" href="https://nodered.org/docs/writing-functions.html">在线文档</a>来获得更多有关编写函数的信息。</p>
24
24
  <h4>传送消息</h4>
25
25
  <p>要将消息传递到流中的下一个节点,请返回消息或调用<code>node.send(messages)</code>。</p>
26
26
  <p>它将返回/send:</p>
@@ -20,7 +20,7 @@
20
20
  <p>通常,<code>msg</code>對象將消息正文保留在<code>msg.payload</code>屬性中。</p>
21
21
  <p>該函數一般會返回一個消息對象(或多個消息對象),但也可以爲了停止流程而什麽都不返回。</p>
22
22
  <h3>詳細</h3>
23
- <p>請參見<a target="_blank" href="http://nodered.org/docs/writing-functions.html">在線文檔</a>來獲得更多有關編寫函數的信息。</p>
23
+ <p>請參見<a target="_blank" href="https://nodered.org/docs/writing-functions.html">在線文檔</a>來獲得更多有關編寫函數的信息。</p>
24
24
  <h4>傳送消息</h4>
25
25
  <p>要將消息傳遞到流程中的下一個節點,請返回消息或調用<code>node.send(messages)</code>。</p>
26
26
  <p>它將返回/send:</p>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@node-red/nodes",
3
- "version": "3.1.0-beta.3",
3
+ "version": "3.1.0",
4
4
  "license": "Apache-2.0",
5
5
  "repository": {
6
6
  "type": "git",
@@ -38,13 +38,13 @@
38
38
  "mqtt": "4.3.7",
39
39
  "multer": "1.4.5-lts.1",
40
40
  "mustache": "4.2.0",
41
- "node-watch": "0.7.3",
41
+ "node-watch": "0.7.4",
42
42
  "on-headers": "1.0.2",
43
43
  "raw-body": "2.5.2",
44
- "tough-cookie": "4.1.2",
44
+ "tough-cookie": "4.1.3",
45
45
  "uuid": "9.0.0",
46
46
  "ws": "7.5.6",
47
- "xml2js": "0.6.0",
47
+ "xml2js": "0.6.2",
48
48
  "iconv-lite": "0.6.3"
49
49
  }
50
50
  }
package/icons/arduino.png DELETED
Binary file
Binary file
package/icons/leveldb.png DELETED
Binary file
package/icons/mongodb.png DELETED
Binary file
package/icons/mouse.png DELETED
Binary file
package/icons/rbe.png DELETED
Binary file
package/icons/redis.png DELETED
Binary file