@node-red/nodes 2.2.0 → 2.2.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.
@@ -7,6 +7,7 @@ module.exports = function(RED) {
7
7
  var debuglength = RED.settings.debugMaxLength || 1000;
8
8
  var useColors = RED.settings.debugUseColors || false;
9
9
  util.inspect.styles.boolean = "red";
10
+ const { hasOwnProperty } = Object.prototype;
10
11
 
11
12
  function DebugNode(n) {
12
13
  var hasEditExpression = (n.targetType === "jsonata");
@@ -107,7 +108,7 @@ module.exports = function(RED) {
107
108
  }
108
109
  })
109
110
  this.on("input", function(msg, send, done) {
110
- if (msg.hasOwnProperty("status") && msg.status.hasOwnProperty("source") && msg.status.source.hasOwnProperty("id") && (msg.status.source.id === node.id)) {
111
+ if (hasOwnProperty.call(msg, "status") && hasOwnProperty.call(msg.status, "source") && hasOwnProperty.call(msg.status.source, "id") && (msg.status.source.id === node.id)) {
111
112
  done();
112
113
  return;
113
114
  }
@@ -118,17 +119,17 @@ module.exports = function(RED) {
118
119
  var st = (typeof output === 'string') ? output : util.inspect(output);
119
120
  var fill = "grey";
120
121
  var shape = "dot";
121
- if (typeof output === 'object' && output.hasOwnProperty("fill") && output.hasOwnProperty("shape") && output.hasOwnProperty("text")) {
122
+ if (typeof output === 'object' && hasOwnProperty.call(output, "fill") && hasOwnProperty.call(output, "shape") && hasOwnProperty.call(output, "text")) {
122
123
  fill = output.fill;
123
124
  shape = output.shape;
124
125
  st = output.text;
125
126
  }
126
127
  if (node.statusType === "auto") {
127
- if (msg.hasOwnProperty("error")) {
128
+ if (hasOwnProperty.call(msg, "error")) {
128
129
  fill = "red";
129
130
  st = msg.error.message;
130
131
  }
131
- if (msg.hasOwnProperty("status")) {
132
+ if (hasOwnProperty.call(msg, "status")) {
132
133
  fill = msg.status.fill || "grey";
133
134
  shape = msg.status.shape || "ring";
134
135
  st = msg.status.text || "";
@@ -194,7 +195,7 @@ module.exports = function(RED) {
194
195
 
195
196
  function sendDebug(msg) {
196
197
  // don't put blank errors in sidebar (but do add to logs)
197
- //if ((msg.msg === "") && (msg.hasOwnProperty("level")) && (msg.level === 20)) { return; }
198
+ //if ((msg.msg === "") && (hasOwnProperty.call(msg, "level")) && (msg.level === 20)) { return; }
198
199
  msg = RED.util.encodeObject(msg,{maxLength:debuglength});
199
200
  RED.comms.publish("debug",msg);
200
201
  }
@@ -115,7 +115,7 @@
115
115
  timeoutUnits: {value:"seconds"},
116
116
  rate: {value:"1", required:true, validate:function(v) { return RED.validators.number(v) && (v >= 0); }},
117
117
  nbRateUnits: {value:"1", required:false,
118
- validate:function(v) { return RED.validators.number(v) && (v >= 0); }},
118
+ validate:function(v) { return v === undefined || (RED.validators.number(v) && (v >= 0)); }},
119
119
  rateUnits: {value: "second"},
120
120
  randomFirst: {value:"1", required:true, validate:function(v) { return RED.validators.number(v) && (v >= 0); }},
121
121
  randomLast: {value:"5", required:true, validate:function(v) { return RED.validators.number(v) && (v >= 0); }},
@@ -291,8 +291,8 @@
291
291
  "hour": "時間",
292
292
  "days": "日",
293
293
  "day": "日",
294
- "between": "頻度",
295
- "and": "回/",
294
+ "between": "範囲",
295
+ "and": "",
296
296
  "rate": "流量",
297
297
  "msgper": "メッセージ/",
298
298
  "queuemsg": "中間メッセージをキューに追加",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@node-red/nodes",
3
- "version": "2.2.0",
3
+ "version": "2.2.1",
4
4
  "license": "Apache-2.0",
5
5
  "repository": {
6
6
  "type": "git",
@@ -17,12 +17,12 @@
17
17
  "dependencies": {
18
18
  "acorn": "8.7.0",
19
19
  "acorn-walk": "8.2.0",
20
- "ajv": "8.9.0",
20
+ "ajv": "8.10.0",
21
21
  "body-parser": "1.19.1",
22
22
  "cheerio": "1.0.0-rc.10",
23
23
  "content-type": "1.0.4",
24
24
  "cookie-parser": "1.4.6",
25
- "cookie": "0.4.1",
25
+ "cookie": "0.4.2",
26
26
  "cors": "2.8.5",
27
27
  "cronosjs": "1.7.1",
28
28
  "denque": "2.0.1",
@@ -36,11 +36,11 @@
36
36
  "is-utf8": "0.2.1",
37
37
  "js-yaml": "3.14.1",
38
38
  "media-typer": "1.1.0",
39
- "mqtt": "4.3.4",
39
+ "mqtt": "4.3.5",
40
40
  "multer": "1.4.4",
41
41
  "mustache": "4.2.0",
42
42
  "on-headers": "1.0.2",
43
- "raw-body": "2.4.2",
43
+ "raw-body": "2.4.3",
44
44
  "tough-cookie": "4.0.0",
45
45
  "uuid": "8.3.2",
46
46
  "ws": "7.5.6",