@node-red/nodes 4.1.0-beta.2 → 4.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.
@@ -248,8 +248,9 @@
248
248
  errors.push(RED._("node-red:inject.errors.invalid-json", { prop: 'msg.'+v[i].p, error: e.message }))
249
249
  }
250
250
  } else if (v[i].vt === "num"){
251
- if (!/^[+-]?[0-9]*\.?[0-9]*([eE][-+]?[0-9]+)?$/.test(v[i].v)) {
252
- errors.push(RED._("node-red:inject.errors.invalid-prop", { prop: 'msg.'+v[i].p, error: v[i].v }))
251
+ const numValidation = RED.utils.validateTypedProperty(v[i].v, 'num', { prop: 'msg.'+v[i].p });
252
+ if (numValidation !== true) {
253
+ errors.push(numValidation || RED._("node-red:inject.errors.invalid-prop", { prop: 'msg.'+v[i].p, error: v[i].v }))
253
254
  }
254
255
  }
255
256
  }
@@ -91,7 +91,13 @@ module.exports = function(RED) {
91
91
  const opts = isWindows ? { ...node.spawnOpt, shell: true } : node.spawnOpt
92
92
  /* istanbul ignore else */
93
93
  node.debug(cmd+" ["+arg+"]");
94
- child = spawn(cmd,arg,opts);
94
+ if (opts.shell) {
95
+ // When called with shell: true, passing in separate args is deprecated in Node 24
96
+ // so we need to join the command and args into a single string.
97
+ child = spawn([cmd].concat(arg).join(" "), opts);
98
+ } else {
99
+ child = spawn(cmd,arg,opts);
100
+ }
95
101
  node.status({fill:"blue",shape:"dot",text:"pid:"+child.pid});
96
102
  var unknownCommand = (child.pid === undefined);
97
103
  if (node.timer !== 0) {
@@ -30,8 +30,8 @@ module.exports = function(RED) {
30
30
  var rawDataRoutes = new Set();
31
31
 
32
32
  function rawBodyParser(req, res, next) {
33
- if (req.skipRawBodyParser) { next(); } // don't parse this if told to skip
34
- if (req._body) { return next(); }
33
+ if (req.skipRawBodyParser || req._body || req.readableEnded) return next();
34
+
35
35
  req.body = "";
36
36
  req._body = true;
37
37
 
@@ -323,7 +323,9 @@ module.exports = function(RED) {
323
323
  if (this.upload) {
324
324
  var mp = multer({ storage: multer.memoryStorage() }).any();
325
325
  multipartParser = function(req,res,next) {
326
+ if(req.readableEnded || req._body) return next();
326
327
  mp(req,res,function(err) {
328
+ req._body = true;
327
329
  next(err);
328
330
  })
329
331
  };
@@ -1,5 +1,5 @@
1
1
  <script type="text/html" data-help-name="rbe">
2
- <p>Report by Exception (RBE) node - only passes on data if the payload has changed.
2
+ <p>filter node - only passes on data if the payload has changed.
3
3
  It can also block unless, or ignore if the value changes by a specified amount (Dead- and Narrowband mode).</p>
4
4
  <h3>Inputs</h3>
5
5
  <dl class="message-properties">
@@ -12,7 +12,7 @@
12
12
  </dt>
13
13
  <dd>if specified the function will work on a per topic basis. This property can be set by configuration.</dd>
14
14
  <dt class="optional">reset<span class="property-type">any</span></dt>
15
- <dd>if set clears the stored value for the specified msg.topic, or
15
+ <dd>if set clears the stored value for the specified <code>msg.topic</code>, or
16
16
  all topics if msg.topic is not specified.</dd>
17
17
  </dl>
18
18
  <h3>Outputs</h3>
@@ -1,7 +1,7 @@
1
1
  <!-- Source revision: https://github.com/node-red/node-red-nodes/commit/467907776088422882076f46d85e25601449564d -->
2
2
 
3
3
  <script type="text/html" data-help-name="rbe">
4
- <p>Report by Exception(例外データの報告)ノード - ペイロードの値が変化した場合だけデータを送信。</p>
4
+ <p>filterノード - ペイロードの値が変化した場合だけデータを送信。</p>
5
5
  <p>値が指定した量変化するまでブロックすることもできます- 不感帯(deadband)モード。</p>
6
6
  <h3>入力</h3> <dl class="message-properties">
7
7
  <dt>payload
@@ -12,7 +12,7 @@
12
12
  </dt>
13
13
  <dd>指定すると、トピックごとに動作します。</dd>
14
14
  <dt class="optional">reset<span class="property-type">任意</span></dt>
15
- <dd>値を設定すると、保存した値をクリアします。msg.topicを指定した場合は対応する値、指定しなければ全てのトピックが対象となります。</dd>
15
+ <dd>値を設定すると、保存した値をクリアします。<code>msg.topic</code>を指定した場合は対応する値、指定しなければ全てのトピックが対象となります。</dd>
16
16
  </dl>
17
17
  <h3>出力</h3>
18
18
  <dl class="message-properties">
@@ -516,6 +516,7 @@
516
516
  "doc": "ドキュメント",
517
517
  "return": "出力形式",
518
518
  "upload": "ファイルのアップロード",
519
+ "parsing": "リクエストボティをパースしない",
519
520
  "status": "ステータスコード",
520
521
  "headers": "ヘッダ",
521
522
  "other": "その他",
@@ -563,7 +564,8 @@
563
564
  "timeout-isnan": "タイムアウト値が数値ではないため無視します",
564
565
  "timeout-isnegative": "タイムアウト値が負数のため無視します",
565
566
  "invalid-payload": "不正なペイロード",
566
- "invalid-url": "URLが不正"
567
+ "invalid-url": "URLが不正",
568
+ "rejectunauthorized-invalid": "msg.rejectUnauthorizedは真偽値である必要があります"
567
569
  },
568
570
  "status": {
569
571
  "requesting": "要求中"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@node-red/nodes",
3
- "version": "4.1.0-beta.2",
3
+ "version": "4.1.0",
4
4
  "license": "Apache-2.0",
5
5
  "repository": {
6
6
  "type": "git",
@@ -26,7 +26,7 @@
26
26
  "cors": "2.8.5",
27
27
  "cronosjs": "1.7.1",
28
28
  "denque": "2.1.0",
29
- "form-data": "4.0.2",
29
+ "form-data": "4.0.4",
30
30
  "fs-extra": "11.3.0",
31
31
  "got": "12.6.1",
32
32
  "hash-sum": "2.0.0",
@@ -36,10 +36,10 @@
36
36
  "js-yaml": "4.1.0",
37
37
  "media-typer": "1.1.0",
38
38
  "mqtt": "5.11.0",
39
- "multer": "2.0.1",
39
+ "multer": "2.0.2",
40
40
  "mustache": "4.2.0",
41
41
  "node-watch": "0.7.4",
42
- "on-headers": "1.0.2",
42
+ "on-headers": "1.1.0",
43
43
  "raw-body": "3.0.0",
44
44
  "tough-cookie": "5.1.2",
45
45
  "uuid": "9.0.1",