@node-red/nodes 3.0.0-beta.1 → 3.0.0-beta.2

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.
@@ -69,7 +69,7 @@
69
69
  outputs:1, // set the number of outputs - 0 to n
70
70
  color: "#ddd", // set icon color
71
71
  // set the icon (held in icons dir below where you save the node)
72
- icon: "myicon.png", // saved in icons/myicon.png
72
+ icon: "myicon.svg", // saved in icons/myicon.svg
73
73
  label: function() { // sets the default label contents
74
74
  return this.name||this.topic||"sample";
75
75
  },
@@ -530,7 +530,6 @@
530
530
  if (type !== 'full') {
531
531
  comp = $("#node-input-typed-complete").typedInput('value');
532
532
  }
533
- console.log('hihi')
534
533
  that.statusType = "auto";
535
534
  that.statusVal = comp;
536
535
  }
@@ -302,7 +302,6 @@
302
302
  return this.name?"node_label_italic":"";
303
303
  },
304
304
  oneditprepare: function() {
305
- console.log("link call oneditprepare")
306
305
  const updateVisibility = function() {
307
306
  const static = $('#node-input-linkType').val() !== "dynamic";
308
307
  if(static) {
@@ -146,13 +146,13 @@
146
146
 
147
147
  function createTypeValueField(row, defaultType){
148
148
  return $('<input/>',{class:"node-input-rule-type-value",type:"text",style:"width: 100%;"}).appendTo(row).typedInput({default:defaultType || 'string',types:[
149
- {value:"string",label:RED._("common.type.string"),hasValue:false,icon:"red/images/typedInput/az.png"},
150
- {value:"number",label:RED._("common.type.number"),hasValue:false,icon:"red/images/typedInput/09.png"},
151
- {value:"boolean",label:RED._("common.type.boolean"),hasValue:false,icon:"red/images/typedInput/bool.png"},
152
- {value:"array",label:RED._("common.type.array"),hasValue:false,icon:"red/images/typedInput/json.png"},
153
- {value:"buffer",label:RED._("common.type.buffer"),hasValue:false,icon:"red/images/typedInput/bin.png"},
154
- {value:"object",label:RED._("common.type.object"),hasValue:false,icon:"red/images/typedInput/json.png"},
155
- {value:"json",label:RED._("common.type.jsonString"),hasValue:false,icon:"red/images/typedInput/json.png"},
149
+ {value:"string",label:RED._("common.type.string"),hasValue:false,icon:"red/images/typedInput/az.svg"},
150
+ {value:"number",label:RED._("common.type.number"),hasValue:false,icon:"red/images/typedInput/09.svg"},
151
+ {value:"boolean",label:RED._("common.type.boolean"),hasValue:false,icon:"red/images/typedInput/bool.svg"},
152
+ {value:"array",label:RED._("common.type.array"),hasValue:false,icon:"red/images/typedInput/json.svg"},
153
+ {value:"buffer",label:RED._("common.type.buffer"),hasValue:false,icon:"red/images/typedInput/bin.svg"},
154
+ {value:"object",label:RED._("common.type.object"),hasValue:false,icon:"red/images/typedInput/json.svg"},
155
+ {value:"json",label:RED._("common.type.jsonString"),hasValue:false,icon:"red/images/typedInput/json.svg"},
156
156
  {value:"undefined",label:RED._("common.type.undefined"),hasValue:false},
157
157
  {value:"null",label:RED._("common.type.null"),hasValue:false}
158
158
  ]});
@@ -247,14 +247,16 @@
247
247
  var row2 = $('<div/>',{style:"display: flex; padding-top: 5px; padding-left: 175px;"}).appendTo(inputRows);
248
248
  var row3 = $('<div/>',{style:"display: flex; padding-top: 5px; align-items: center"}).appendTo(inputRows);
249
249
 
250
+ var row4 = $('<div/>',{style:"visibility: hidden; height: 0px;"}).appendTo(inputRows);
251
+ var textSpan = $("<span/>").appendTo(row4);
250
252
  var selectField = $('<select/>',{style:"width:120px; text-align: center;"}).appendTo(row);
251
- var group0 = $('<optgroup/>', { label: "value rules" }).appendTo(selectField);
253
+ var group0 = $('<optgroup/>', { label: RED._("node-red:switch.label.value-rules") }).appendTo(selectField);
252
254
  for (var d in operators) {
253
255
  if(operators[d].kind === 'V') {
254
256
  group0.append($("<option></option>").val(operators[d].v).text(/^switch/.test(operators[d].t)?node._(operators[d].t):operators[d].t));
255
257
  }
256
258
  }
257
- var group1 = $('<optgroup/>', { label: "sequence rules" }).appendTo(selectField);
259
+ var group1 = $('<optgroup/>', { label: RED._("node-red:switch.label.sequence-rules") }).appendTo(selectField);
258
260
  for (var d in operators) {
259
261
  if(operators[d].kind === 'S') {
260
262
  group1.append($("<option></option>").val(operators[d].v).text(/^switch/.test(operators[d].t)?node._(operators[d].t):operators[d].t));
@@ -340,9 +342,12 @@
340
342
  row3.hide();
341
343
  }
342
344
  var selectedLabel = selectField.find("option:selected").text();
343
- if (selectedLabel.length <= 5) {
345
+
346
+ textSpan.text(selectedLabel);
347
+ var width = textSpan.width();
348
+ if (width <= 30) {
344
349
  selectField.outerWidth(60);
345
- } else if (selectedLabel.length < 12) {
350
+ } else if (width <= 85) {
346
351
  selectField.outerWidth(120);
347
352
  } else {
348
353
  selectField.width("auto")
@@ -453,6 +453,7 @@ module.exports = function(RED) {
453
453
  node.options = {};
454
454
  node.queue = [];
455
455
  node.subscriptions = {};
456
+ node.clientListeners = []
456
457
  /** @type {mqtt.MqttClient}*/ this.client;
457
458
  node.setOptions = function(opts, init) {
458
459
  if(!opts || typeof opts !== "object") {
@@ -718,11 +719,16 @@ module.exports = function(RED) {
718
719
  setStatusConnecting(node, true);
719
720
  try {
720
721
  node.serverProperties = {};
722
+ if(node.client) {
723
+ //belt and braces to avoid left over clients
724
+ node.client.end(true);
725
+ node._clientRemoveListeners();
726
+ }
721
727
  node.client = mqtt.connect(node.brokerurl, node.options);
722
728
  node.client.setMaxListeners(0);
723
- let callbackDone = false; //prevent re-connects causing node.client.on('connect' firing callback multiple times
729
+ let callbackDone = false; //prevent re-connects causing node._clientOn('connect' firing callback multiple times
724
730
  // Register successful connect or reconnect handler
725
- node.client.on('connect', function (connack) {
731
+ node._clientOn('connect', function (connack) {
726
732
  node.closing = false;
727
733
  node.connecting = false;
728
734
  node.connected = true;
@@ -754,7 +760,7 @@ module.exports = function(RED) {
754
760
  }
755
761
  setStatusConnected(node, true);
756
762
  // Remove any existing listeners before resubscribing to avoid duplicates in the event of a re-connection
757
- node.client.removeAllListeners('message');
763
+ node._clientRemoveListeners('message');
758
764
 
759
765
  // Re-subscribe to stored topics
760
766
  for (var s in node.subscriptions) {
@@ -766,7 +772,7 @@ module.exports = function(RED) {
766
772
  if (node.subscriptions[s].hasOwnProperty(r)) {
767
773
  qos = Math.max(qos,node.subscriptions[s][r].qos);
768
774
  _options = node.subscriptions[s][r].options;
769
- node.client.on('message',node.subscriptions[s][r].handler);
775
+ node._clientOn('message',node.subscriptions[s][r].handler);
770
776
  }
771
777
  }
772
778
  _options.qos = _options.qos || qos;
@@ -779,11 +785,11 @@ module.exports = function(RED) {
779
785
  node.publish(node.birthMessage);
780
786
  }
781
787
  });
782
- node.client.on("reconnect", function() {
788
+ node._clientOn("reconnect", function() {
783
789
  setStatusConnecting(node, true);
784
790
  });
785
791
  //Broker Disconnect - V5 event
786
- node.client.on("disconnect", function(packet) {
792
+ node._clientOn("disconnect", function(packet) {
787
793
  //Emitted after receiving disconnect packet from broker. MQTT 5.0 feature.
788
794
  const rc = (packet && packet.properties && packet.reasonCode) || packet.reasonCode;
789
795
  const rs = packet && packet.properties && packet.properties.reasonString || "";
@@ -797,7 +803,7 @@ module.exports = function(RED) {
797
803
  setStatusDisconnected(node, true);
798
804
  });
799
805
  // Register disconnect handlers
800
- node.client.on('close', function () {
806
+ node._clientOn('close', function () {
801
807
  if (node.connected) {
802
808
  node.connected = false;
803
809
  node.log(RED._("mqtt.state.disconnected",{broker:(node.clientid?node.clientid+"@":"")+node.brokerurl}));
@@ -809,7 +815,7 @@ module.exports = function(RED) {
809
815
 
810
816
  // Register connect error handler
811
817
  // The client's own reconnect logic will take care of errors
812
- node.client.on('error', function (error) {
818
+ node._clientOn('error', function (error) {
813
819
  });
814
820
  }catch(err) {
815
821
  console.log(err);
@@ -822,7 +828,7 @@ module.exports = function(RED) {
822
828
  if(node.connected || node.connecting) {
823
829
  setStatusDisconnected(node, true);
824
830
  }
825
- if(node.client) { node.client.removeAllListeners(); }
831
+ if(node.client) { node._clientRemoveListeners(); }
826
832
  node.connecting = false;
827
833
  node.connected = false;
828
834
  callback && typeof callback == "function" && callback();
@@ -836,8 +842,12 @@ module.exports = function(RED) {
836
842
  if(!client) {
837
843
  resolve();
838
844
  } else {
839
- const t = setTimeout(reject, ms);
840
- client.end(() => {
845
+ const t = setTimeout(() => {
846
+ //clean end() has exceeded WAIT_END, lets force end!
847
+ client && client.end(true);
848
+ reject();
849
+ }, ms);
850
+ client.end(() => {
841
851
  clearTimeout(t);
842
852
  resolve()
843
853
  });
@@ -894,7 +904,7 @@ module.exports = function(RED) {
894
904
  };
895
905
  node.subscriptions[topic][ref] = sub;
896
906
  if (node.connected) {
897
- node.client.on('message',sub.handler);
907
+ node._clientOn('message',sub.handler);
898
908
  node.client.subscribe(topic, options);
899
909
  }
900
910
  };
@@ -905,7 +915,7 @@ module.exports = function(RED) {
905
915
  if (sub) {
906
916
  if (sub[ref]) {
907
917
  if(node.client) {
908
- node.client.removeListener('message',sub[ref].handler);
918
+ node._clientRemoveListeners('message',sub[ref].handler);
909
919
  }
910
920
  delete sub[ref];
911
921
  }
@@ -995,13 +1005,40 @@ module.exports = function(RED) {
995
1005
 
996
1006
  node.on('close', function(done) {
997
1007
  node.disconnect(function() {
998
- if(node.client) {
999
- node.client.removeAllListeners();
1000
- }
1001
1008
  done();
1002
1009
  });
1003
1010
  });
1004
1011
 
1012
+ /**
1013
+ * 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.
1015
+ * Use {@link node._clientRemoveListeners `node._clientRemoveListeners`} to remove handlers
1016
+ * @param {string} event The name of the event
1017
+ * @param {function} handler The handler for this event
1018
+ */
1019
+ node._clientOn = function(event, handler) {
1020
+ node.clientListeners.push({event, handler})
1021
+ node.client.on(event, handler)
1022
+ }
1023
+
1024
+ /**
1025
+ * Remove event handlers from the MQTT.js client & only the events
1026
+ * that we attached in {@link node._clientOn `node._clientOn`}.
1027
+ * * If `event` is omitted, then all events matching `handler` are removed
1028
+ * * If `handler` is omitted, then all events named `event` are removed
1029
+ * * If both parameters are omitted, then all events are removed
1030
+ * @param {string} [event] The name of the event (optional)
1031
+ * @param {function} [handler] The handler for this event (optional)
1032
+ */
1033
+ node._clientRemoveListeners = function(event, handler) {
1034
+ node.clientListeners = node.clientListeners.filter((l) => {
1035
+ if (event && event !== l.event) { return true; }
1036
+ if (handler && handler !== l.handler) { return true; }
1037
+ node.client.removeListener(l.event, l.handler)
1038
+ return false; //found and removed, filter out this one
1039
+ })
1040
+ }
1041
+
1005
1042
  }
1006
1043
 
1007
1044
  RED.nodes.registerType("mqtt-broker",MQTTBrokerNode,{
@@ -129,7 +129,7 @@
129
129
  var headerTypes = [
130
130
  {value:"content-type",label:"Content-Type",hasValue: false},
131
131
  {value:"location",label:"Location",hasValue: false},
132
- {value:"other",label:RED._("node-red:httpin.label.other"),icon:"red/images/typedInput/az.png"}
132
+ {value:"other",label:RED._("node-red:httpin.label.other"),icon:"red/images/typedInput/az.svg"}
133
133
  ]
134
134
  var contentTypes = [
135
135
  {value:"application/json",label:"application/json",hasValue: false},
@@ -139,7 +139,7 @@
139
139
  {value:"text/plain",label:"text/plain",hasValue: false},
140
140
  {value:"image/gif",label:"image/gif",hasValue: false},
141
141
  {value:"image/png",label:"image/png",hasValue: false},
142
- {value:"other",label:RED._("node-red:httpin.label.other"),icon:"red/images/typedInput/az.png"}
142
+ {value:"other",label:RED._("node-red:httpin.label.other"),icon:"red/images/typedInput/az.svg"}
143
143
  ];
144
144
 
145
145
  RED.nodes.registerType('http response',{
@@ -180,7 +180,7 @@
180
180
  var propertyValue = $('<input/>',{class:"node-input-header-value",type:"text",style:"width: 100%"})
181
181
  .appendTo(propertyValueCell)
182
182
  .typedInput({types:
183
- header.h === 'content-type'?contentTypes:[{value:"other",label:"other",icon:"red/images/typedInput/az.png"}]
183
+ header.h === 'content-type'?contentTypes:[{value:"other",label:"other",icon:"red/images/typedInput/az.svg"}]
184
184
  });
185
185
 
186
186
  var matchedType = headerTypes.filter(function(ht) {
@@ -223,7 +223,7 @@
223
223
  if (type === 'content-type') {
224
224
  propertyValue.typedInput('types',contentTypes);
225
225
  } else {
226
- propertyValue.typedInput('types',[{value:"other",label:"other",icon:"red/images/typedInput/az.png"}]);
226
+ propertyValue.typedInput('types',[{value:"other",label:"other",icon:"red/images/typedInput/az.svg"}]);
227
227
  }
228
228
  });
229
229
  },
@@ -127,12 +127,14 @@
127
127
  { value: "Cache-Control", label: "Cache-Control", hasValue: false },
128
128
  { value: "User-Agent", label: "User-Agent", hasValue: false },
129
129
  { value: "Location", label: "Location", hasValue: false },
130
- { value: "other", label: "other", hasValue: true, icon: "red/images/typedInput/az.png" },
130
+ { value: "other", label: RED._("node-red:httpin.label.other"),
131
+ hasValue: true, icon: "red/images/typedInput/az.svg" },
131
132
  { value: "msg", label: "msg.", hasValue: true },
132
133
  ]
133
134
  const headerOptions = {};
134
135
  const defaultOptions = [
135
- { value: "other", label: "other", hasValue: true, icon: "red/images/typedInput/az.png" },
136
+ { value: "other", label: RED._("node-red:httpin.label.other"),
137
+ hasValue: true, icon: "red/images/typedInput/az.svg" },
136
138
  { value: "msg", label: "msg.", hasValue: true },
137
139
  ];
138
140
  headerOptions["accept"] = [
@@ -247,7 +247,7 @@
247
247
  var jsonata_or_empty = {
248
248
  value: "jsonata",
249
249
  label: "expression",
250
- icon: "red/images/typedInput/expr.png",
250
+ icon: "red/images/typedInput/expr.svg",
251
251
  validate: function(v) {
252
252
  try{
253
253
  if(v !== "") {
@@ -54,9 +54,10 @@
54
54
  <p>If no response is received within the configured timeout, default 30 seconds, the node
55
55
  will log an error that can be caught using the <code>catch</code> node.</p>
56
56
  <p>When the option <b>Link Type</b> is set to "Dynamic target" <code>msg.target</code> can be used to call a
57
- <code>link in</code> by name. The target <code>link in</code> node must be named.
57
+ <code>link in</code> by name or id.
58
58
  <ul>
59
- <li>If there are 2 <code>link in</code> nodes with the same name, an error will be raised</li>
59
+ <li>If there is a <code>link in</code> nodes with the same id, it will be called</li>
60
+ <li>If there are two or more <code>link in</code> nodes with the same name, an error will be raised</li>
60
61
  <li>A <code>link call</code> cannot call a <code>link in</code> node inside a subflow</li>
61
62
  </ul>
62
63
  </p>
@@ -729,7 +729,9 @@
729
729
  "label": {
730
730
  "property": "Property",
731
731
  "rule": "rule",
732
- "repair": "recreate message sequences"
732
+ "repair": "recreate message sequences",
733
+ "value-rules": "value rules",
734
+ "sequence-rules": "sequence rules"
733
735
  },
734
736
  "previous": "previous value",
735
737
  "and": "and",
@@ -42,9 +42,10 @@
42
42
  <p>本ノードはメッセージを受信すると、メッセージを接続した <code>link in</code> ノードへ渡します。
43
43
  その後、応答を待った後にメッセージを送信します。</o>
44
44
  <p>もし、設定したタイムアウト(デフォルト30秒)以内に応答がない場合は、<code>catch</code> ノードを用いてエラーをログに記録することもできます。</p>
45
- <p><b>リンクの種類</b>で"対象を動的に指定"を選択した場合、<code>link in</code>ノードの名前を<code>msg.target</code>に指定して呼び出すことができます。対象となる<code>link in</code>ノードには、名前を付ける必要があります。
45
+ <p><b>リンクの種類</b>で"対象を動的に指定"を選択した場合、<code>link in</code>ノードのIDもしくは名前を<code>msg.target</code>に指定して呼び出すことができます。
46
46
  <ul>
47
- <li>もし、同じ名前を付けた<code>link in</code>ノードが2つある場合、エラーが発生します。</li>
47
+ <li>同じIDの<code>link in</code>ノードがある場合、それを呼び出します。</li>
48
+ <li>もし、同じ名前を付けた<code>link in</code>ノードが2つ以上ある場合、エラーが発生します。</li>
48
49
  <li><code>link call</code>は、サブフローの中の<code>link in</code>ノードを呼び出すことはできません。</li>
49
50
  </ul>
50
51
  </p>
@@ -86,10 +86,10 @@
86
86
  "failed": "inject処理が失敗しました。詳細はログを確認してください。",
87
87
  "toolong": "時間間隔が大き過ぎます",
88
88
  "invalid-expr": "JSONata式が不正: __error__",
89
- "invalid-jsonata": "__prop__: プロパティ式が不正: __error__",
90
- "invalid-prop": "__prop__: プロパティ式が不正: __error__",
91
- "invalid-json": "__prop__: JSONデータが不正: __error__",
92
- "invalid-repeat": "繰り返し数が不正"
89
+ "invalid-jsonata": "__prop__: プロパティ式が不正: __error__",
90
+ "invalid-prop": "__prop__: プロパティ式が不正: __error__",
91
+ "invalid-json": "__prop__: JSONデータが不正: __error__",
92
+ "invalid-repeat": "繰り返し数が不正"
93
93
  }
94
94
  },
95
95
  "catch": {
@@ -129,6 +129,7 @@
129
129
  "msgprop": "メッセージプロパティ",
130
130
  "msgobj": "msgオブジェクト全体",
131
131
  "autostatus": "デバッグ出力と同じ",
132
+ "messageCount": "メッセージ数をカウント",
132
133
  "to": "出力先",
133
134
  "debtab": "デバッグタブ",
134
135
  "tabcon": "デバッグタブとコンソール",
@@ -206,8 +207,8 @@
206
207
  },
207
208
  "error": {
208
209
  "missing-file": "証明書と秘密鍵のファイルが設定されていません",
209
- "invalid-cert": "証明書が指定されていません",
210
- "invalid-key": "秘密鍵が指定されていません"
210
+ "invalid-cert": "証明書が指定されていません",
211
+ "invalid-key": "秘密鍵が指定されていません"
211
212
  }
212
213
  },
213
214
  "exec": {
@@ -263,8 +264,8 @@
263
264
  "moduleNameReserved": "予約された変数名です: __name__",
264
265
  "inputListener": "コード内で'input'イベントのリスナを設定できません",
265
266
  "non-message-returned": "Functionノードが __type__ 型のメッセージ送信を試みました",
266
- "invalid-js": "JavaScriptコードのエラー",
267
- "missing-module": "モジュール __module__ が存在しません"
267
+ "invalid-js": "JavaScriptコードのエラー",
268
+ "missing-module": "モジュール __module__ が存在しません"
268
269
  }
269
270
  },
270
271
  "template": {
@@ -318,9 +319,9 @@
318
319
  "limit": "limit",
319
320
  "limitTopic": "limit topic",
320
321
  "random": "random",
321
- "rate": "流量",
322
- "random-first": "ランダム最小値",
323
- "random-last": "ランダム最大値",
322
+ "rate": "流量",
323
+ "random-first": "ランダム最小値",
324
+ "random-last": "ランダム最大値",
324
325
  "units": {
325
326
  "second": {
326
327
  "plural": "秒",
@@ -342,11 +343,11 @@
342
343
  },
343
344
  "errors": {
344
345
  "too-many": "delayノード内で保持しているメッセージが多すぎます",
345
- "invalid-timeout": "遅延時間が不正",
346
- "invalid-rate": "流量値が不正",
347
- "invalid-rate-unit": "流量単位時間が不正",
348
- "invalid-random-first": "ランダム最小値が不正",
349
- "invalid-random-last": "ランダム最大値が不正"
346
+ "invalid-timeout": "遅延時間が不正",
347
+ "invalid-rate": "流量値が不正",
348
+ "invalid-rate-unit": "流量単位時間が不正",
349
+ "invalid-random-first": "ランダム最小値が不正",
350
+ "invalid-random-last": "ランダム最大値が不正"
350
351
  }
351
352
  },
352
353
  "trigger": {
@@ -384,8 +385,8 @@
384
385
  "resetMessage": "msg.resetを設定",
385
386
  "resetPayload": "msg.payloadが次の値",
386
387
  "resetprompt": "任意",
387
- "duration": "時間間隔",
388
- "topic": "トピック"
388
+ "duration": "時間間隔",
389
+ "topic": "トピック"
389
390
  }
390
391
  },
391
392
  "comment": {
@@ -443,7 +444,8 @@
443
444
  "action": "動作",
444
445
  "staticTopic": "1つのトピックを購読",
445
446
  "dynamicTopic": "動的な購読",
446
- "auto-connect": "自動接続"
447
+ "auto-connect": "自動接続",
448
+ "auto-mode-depreciated": "本オプションは非推奨になりました。新しい自動判定モードを使用してください。"
447
449
  },
448
450
  "sections-label": {
449
451
  "birth-message": "接続時の送信メッセージ(Birthメッセージ)",
@@ -490,7 +492,7 @@
490
492
  "invalid-action-action": "指定された動作が不正です",
491
493
  "invalid-action-alreadyconnected": "接続する前にブローカから切断してください",
492
494
  "invalid-action-badsubscription": "msg.topicが存在しないか不正です",
493
- "invalid-client-id": "クライアントIDが未指定"
495
+ "invalid-client-id": "クライアントIDが未指定"
494
496
  }
495
497
  },
496
498
  "httpin": {
@@ -581,8 +583,8 @@
581
583
  "send-error": "送信中にエラーが発生しました: ",
582
584
  "missing-conf": "サーバ設定が不足しています",
583
585
  "duplicate-path": "同じパスに対して2つのWebSocketリスナは指定できません: __path__",
584
- "missing-server": "サーバが設定されていません",
585
- "missing-client": "クライアントが設定されていません"
586
+ "missing-server": "サーバが設定されていません",
587
+ "missing-client": "クライアントが設定されていません"
586
588
  }
587
589
  },
588
590
  "watch": {
@@ -611,7 +613,8 @@
611
613
  "ms": "ミリ秒",
612
614
  "chars": "文字",
613
615
  "close": "終了",
614
- "optional": "(任意)"
616
+ "optional": "(任意)",
617
+ "reattach": "区切り文字を再追加"
615
618
  },
616
619
  "type": {
617
620
  "listen": "待ち受け",
@@ -652,8 +655,8 @@
652
655
  "connect-timeout": "接続がタイムアウトしました",
653
656
  "connect-fail": "接続に失敗しました",
654
657
  "bad-string": "文字列への変換に失敗しました",
655
- "invalid-host": "ホスト名が不正",
656
- "invalid-port": "ポートが不正"
658
+ "invalid-host": "ホスト名が不正",
659
+ "invalid-port": "ポートが不正"
657
660
  }
658
661
  },
659
662
  "udp": {
@@ -668,7 +671,7 @@
668
671
  "toport": "ポート",
669
672
  "address": "アドレス",
670
673
  "decode-base64": "Base64形式のペイロードを復号",
671
- "port": "ポート"
674
+ "port": "ポート"
672
675
  },
673
676
  "placeholder": {
674
677
  "interface": "(任意) 使用するローカルインターフェイスもしくはアドレス",
@@ -716,7 +719,7 @@
716
719
  "port-invalid": "udp: ポート番号が不正です",
717
720
  "alreadyused": "udp: 既に__port__番ポートが使用されています",
718
721
  "ifnotfound": "udp: インターフェイス __iface__ がありません",
719
- "invalid-group": "マルチキャストグループが不正"
722
+ "invalid-group": "マルチキャストグループが不正"
720
723
  }
721
724
  },
722
725
  "switch": {
@@ -724,7 +727,9 @@
724
727
  "label": {
725
728
  "property": "プロパティ",
726
729
  "rule": "条件",
727
- "repair": "メッセージ列の補正"
730
+ "repair": "メッセージ列の補正",
731
+ "value-rules": "値ルール",
732
+ "sequence-rules": "列ルール"
728
733
  },
729
734
  "previous": "前回の値",
730
735
  "and": "~",
@@ -732,22 +737,22 @@
732
737
  "stopfirst": "最初に合致した条件で終了",
733
738
  "ignorecase": "大文字、小文字を区別しない",
734
739
  "rules": {
735
- "btwn": "is between",
736
- "cont": "contains",
737
- "regex": "matches regex",
738
- "true": "is true",
739
- "false": "is false",
740
- "null": "is null",
741
- "nnull": "is not null",
742
- "istype": "is of type",
743
- "empty": "is empty",
744
- "nempty": "is not empty",
745
- "head": "head",
746
- "tail": "tail",
747
- "index": "index between",
740
+ "btwn": "範囲内である",
741
+ "cont": "要素に含む",
742
+ "regex": "正規表現にマッチ",
743
+ "true": "trueである",
744
+ "false": "falseである",
745
+ "null": "nullである",
746
+ "nnull": "nullでない",
747
+ "istype": "指定型である",
748
+ "empty": "空である",
749
+ "nempty": "空でない",
750
+ "head": "先頭要素である",
751
+ "tail": "末尾要素である",
752
+ "index": "指定添字範囲要素である",
748
753
  "exp": "JSONata式",
749
754
  "else": "その他",
750
- "hask": "has key"
755
+ "hask": "キーを含む"
751
756
  },
752
757
  "errors": {
753
758
  "invalid-expr": "不正な表現: __error__",
@@ -781,8 +786,8 @@
781
786
  "invalid-json": "対象の値のJSONプロパティが不正",
782
787
  "invalid-expr": "JSONata式が不正: __error__",
783
788
  "no-override": "オブジェクト型でないプロパティを設定できません: __property__",
784
- "invalid-prop": "プロパティ式が不正: __property__",
785
- "invalid-json-data": "JSONデータが不正: __error__"
789
+ "invalid-prop": "プロパティ式が不正: __property__",
790
+ "invalid-json-data": "JSONデータが不正: __error__"
786
791
  }
787
792
  },
788
793
  "range": {
@@ -794,10 +799,10 @@
794
799
  "from": "最小値",
795
800
  "to": "最大値",
796
801
  "roundresult": "小数値を四捨五入し整数値へ変換",
797
- "minin": "入力最小値",
798
- "maxin": "入力最大値",
799
- "minout": "出力最小値",
800
- "maxout": "出力最大値"
802
+ "minin": "入力最小値",
803
+ "maxin": "入力最大値",
804
+ "minout": "出力最小値",
805
+ "maxout": "出力最大値"
801
806
  },
802
807
  "placeholder": {
803
808
  "min": "例) 0",
@@ -1022,8 +1027,8 @@
1022
1027
  "complete": "<code>msg.complete</code> プロパティが設定されたメッセージ受信後",
1023
1028
  "tip": "このモードでは、本ノードが <i>split</i> ノードと組となるか、 <code>msg.parts</code> プロパティが設定されたメッセージを受け取ることが前提となります。",
1024
1029
  "too-many": "joinノード内部で保持しているメッセージが多すぎます",
1025
- "message-prop": "メッセージプロパティ",
1026
- "merge": {
1030
+ "message-prop": "メッセージプロパティ",
1031
+ "merge": {
1027
1032
  "topics-label": "対象トピック",
1028
1033
  "topics": "トピック",
1029
1034
  "topic": "トピック",
@@ -1081,11 +1086,11 @@
1081
1086
  "too-many": "batchノード内で保持しているメッセージが多すぎます",
1082
1087
  "unexpected": "想定外のモード",
1083
1088
  "no-parts": "メッセージにpartsプロパティがありません",
1084
- "error": {
1085
- "invalid-count": "メッセージ数が不正",
1086
- "invalid-overlap": "オーバラップが不正",
1087
- "invalid-interval": "時間間隔が不正"
1088
- }
1089
+ "error": {
1090
+ "invalid-count": "メッセージ数が不正",
1091
+ "invalid-overlap": "オーバラップが不正",
1092
+ "invalid-interval": "時間間隔が不正"
1093
+ }
1089
1094
  },
1090
1095
  "rbe": {
1091
1096
  "rbe": "filter",
@@ -1095,9 +1100,9 @@
1095
1100
  "start": "初期値",
1096
1101
  "name": "名前",
1097
1102
  "septopics": "個別に動作を適用",
1098
- "gap": "変化量",
1099
- "property": "プロパティ",
1100
- "topic": "トピック"
1103
+ "gap": "変化量",
1104
+ "property": "プロパティ",
1105
+ "topic": "トピック"
1101
1106
  },
1102
1107
  "placeholder": {
1103
1108
  "bandgap": "例:10、5%",
@@ -24,7 +24,7 @@
24
24
  <dt class="optional">method <span class="property-type">文字列</span></dt>
25
25
  <dd>ノードの設定で指定していない場合、このプロパティでリクエストに用いるHTTPメソッドを設定します。<code>GET</code>, <code>PUT</code>, <code>POST</code>, <code>PATCH</code>, <code>DELETE</code>のいずれかを指定してください。</dd>
26
26
  <dt class="optional">headers <span class="property-type">オブジェクト</span></dt>
27
- <dd>リクエストのHTTPヘッダを指定します。</dd>
27
+ <dd>リクエストのHTTPヘッダを指定します。注釈: <code>msg.headers</code>のヘッダは、ノード設定のヘッダで上書きされます。</dd>
28
28
  <dt class="optional">cookies <span class="property-type">オブジェクト</span></dt>
29
29
  <dd>設定すると、リクエストと共にクッキーを送ることができます。</dd>
30
30
  <dt class="optional">payload</dt>
@@ -15,11 +15,12 @@
15
15
  -->
16
16
 
17
17
  <script type="text/html" data-help-name="file">
18
- <p><code>msg.payload</code>をファイルに書き出します。書き出しは、ファイルの最後に追記もしくは既存の内容の置き換えを選択できます。この他、ファイルの削除を行うことも可能です。</p>
18
+ <p><code>msg.payload</code>をファイルに書き出します。書き出しは、ファイルの最後に追記もしくは既存の内容の置き換えを選択できます。その他、ファイルの削除を行うことも可能です。</p>
19
19
  <h3>入力</h3>
20
20
  <dl class="message-properties">
21
21
  <dt class="optional">filename <span class="property-type">文字列</span></dt>
22
- <dd>対象ファイル名をノードに設定していない場合、このプロパティでファイルを指定できます</dd>
22
+ <dd>更新するファイルの名前は、ノード設定やメッセージのプロパティで指定できます。デフォルトでは、<code>msg.filename</code>が使われますが、ノード内でカスタマイズすることも可能です。
23
+ </dd>
23
24
  <dt class="optional">encoding <span class="property-type">文字列</span></dt>
24
25
  <dd>エンコーディングをmsgで設定する構成にした際は、この任意のプロパティでエンコーディングを設定できます。</dt>
25
26
  </dl>
@@ -30,7 +31,7 @@
30
31
  <p><code>msg.filename</code>を使う場合、書き込みを行う毎にファイルをクローズします。より良い性能を得るためにはファイル名をノードに設定してください。</p>
31
32
  <p>追記を行う代わりに、ファイル全体を上書きするように設定することもできます。例えば、画像のようなバイナリデータをファイルに書き出す場合は、このオプションを指定し、改行を追記するオプションを指定しないようにします。</p>
32
33
  <p>ファイル出力の際のエンコーディングは、エンコーディングリストから選択できます。</p>
33
- <p>この他、ファイルの削除を行うことも可能です。</p>
34
+ <p>その他、ファイルの削除を行うことも可能です。</p>
34
35
  </script>
35
36
 
36
37
  <script type="text/html" data-help-name="file in">
@@ -38,14 +39,15 @@
38
39
  <h3>入力</h3>
39
40
  <dl class="message-properties">
40
41
  <dt class="optional">filename <span class="property-type">文字列</span></dt>
41
- <dd>読み出し対象のファイル名をノードに設定していない場合、このプロパティでファイルを指定できます</dd>
42
+ <dd>読み込むファイルの名前は、ノード設定やメッセージのプロパティで指定できます。デフォルトでは、<code>msg.filename</code>が使われますが、ノード内でカスタマイズすることも可能です。
43
+ </dd>
42
44
  </dl>
43
45
  <h3>出力</h3>
44
46
  <dl class="message-properties">
45
47
  <dt>payload <span class="property-type">文字列 | バッファ</span></dt>
46
- <dd>ファイルの内容を文字列もしくはバッファで表現します</dd>
48
+ <dd>ファイルの内容を文字列もしくはバッファで表現します。</dd>
47
49
  <dt class="optional">filename <span class="property-type">文字列</span></dt>
48
- <dd>読み出し対象のファイル名をノードに設定していない場合、このプロパティでファイルを指定します</dd>
50
+ <dd>読み出し対象のファイル名をノードに設定していない場合、この任意のプロパティでファイルの名前を指定します。</dd>
49
51
  </dl>
50
52
  <h3>詳細</h3>
51
53
  <p>ファイルネームは絶対パスでの指定を推奨します。絶対パスを指定しない場合は、Node-REDプロセスのワーキングディレクトリからの相対パスとして扱います。</p>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@node-red/nodes",
3
- "version": "3.0.0-beta.1",
3
+ "version": "3.0.0-beta.2",
4
4
  "license": "Apache-2.0",
5
5
  "repository": {
6
6
  "type": "git",