@node-red/nodes 3.1.7 → 4.0.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.
@@ -19,13 +19,13 @@ module.exports = function(RED) {
19
19
 
20
20
  function sendArray(node,msg,array,send) {
21
21
  for (var i = 0; i < array.length-1; i++) {
22
- msg.payload = array[i];
22
+ RED.util.setMessageProperty(msg,node.property,array[i]);
23
23
  msg.parts.index = node.c++;
24
24
  if (node.stream !== true) { msg.parts.count = array.length; }
25
25
  send(RED.util.cloneMessage(msg));
26
26
  }
27
27
  if (node.stream !== true) {
28
- msg.payload = array[i];
28
+ RED.util.setMessageProperty(msg,node.property,array[i]);
29
29
  msg.parts.index = node.c++;
30
30
  msg.parts.count = array.length;
31
31
  send(RED.util.cloneMessage(msg));
@@ -40,10 +40,12 @@ module.exports = function(RED) {
40
40
  node.stream = n.stream;
41
41
  node.spltType = n.spltType || "str";
42
42
  node.addname = n.addname || "";
43
+ node.property = n.property||"payload";
43
44
  try {
44
45
  if (node.spltType === "str") {
45
46
  this.splt = (n.splt || "\\n").replace(/\\n/g,"\n").replace(/\\r/g,"\r").replace(/\\t/g,"\t").replace(/\\e/g,"\e").replace(/\\f/g,"\f").replace(/\\0/g,"\0");
46
- } else if (node.spltType === "bin") {
47
+ }
48
+ else if (node.spltType === "bin") {
47
49
  var spltArray = JSON.parse(n.splt);
48
50
  if (Array.isArray(spltArray)) {
49
51
  this.splt = Buffer.from(spltArray);
@@ -51,7 +53,8 @@ module.exports = function(RED) {
51
53
  throw new Error("not an array");
52
54
  }
53
55
  this.spltBuffer = spltArray;
54
- } else if (node.spltType === "len") {
56
+ }
57
+ else if (node.spltType === "len") {
55
58
  this.splt = parseInt(n.splt);
56
59
  if (isNaN(this.splt) || this.splt < 1) {
57
60
  throw new Error("invalid split length: "+n.splt);
@@ -69,18 +72,22 @@ module.exports = function(RED) {
69
72
  node.buffer = Buffer.from([]);
70
73
  node.pendingDones = [];
71
74
  this.on("input", function(msg, send, done) {
72
- if (msg.hasOwnProperty("payload")) {
75
+ var value = RED.util.getMessageProperty(msg,node.property);
76
+ if (value !== undefined) {
73
77
  if (msg.hasOwnProperty("parts")) { msg.parts = { parts:msg.parts }; } // push existing parts to a stack
74
78
  else { msg.parts = {}; }
75
79
  msg.parts.id = RED.util.generateId(); // generate a random id
80
+ if (node.property !== "payload") {
81
+ msg.parts.property = node.property;
82
+ }
76
83
  delete msg._msgid;
77
- if (typeof msg.payload === "string") { // Split String into array
78
- msg.payload = (node.remainder || "") + msg.payload;
84
+ if (typeof value === "string") { // Split String into array
85
+ value = (node.remainder || "") + value;
79
86
  msg.parts.type = "string";
80
87
  if (node.spltType === "len") {
81
88
  msg.parts.ch = "";
82
89
  msg.parts.len = node.splt;
83
- var count = msg.payload.length/node.splt;
90
+ var count = value.length/node.splt;
84
91
  if (Math.floor(count) !== count) {
85
92
  count = Math.ceil(count);
86
93
  }
@@ -89,9 +96,9 @@ module.exports = function(RED) {
89
96
  node.c = 0;
90
97
  }
91
98
  var pos = 0;
92
- var data = msg.payload;
99
+ var data = value;
93
100
  for (var i=0; i<count-1; i++) {
94
- msg.payload = data.substring(pos,pos+node.splt);
101
+ RED.util.setMessageProperty(msg,node.property,data.substring(pos,pos+node.splt));
95
102
  msg.parts.index = node.c++;
96
103
  pos += node.splt;
97
104
  send(RED.util.cloneMessage(msg));
@@ -102,7 +109,7 @@ module.exports = function(RED) {
102
109
  }
103
110
  node.remainder = data.substring(pos);
104
111
  if ((node.stream !== true) || (node.remainder.length === node.splt)) {
105
- msg.payload = node.remainder;
112
+ RED.util.setMessageProperty(msg,node.property,node.remainder);
106
113
  msg.parts.index = node.c++;
107
114
  send(RED.util.cloneMessage(msg));
108
115
  node.pendingDones.forEach(d => d());
@@ -119,47 +126,48 @@ module.exports = function(RED) {
119
126
  if (!node.spltBufferString) {
120
127
  node.spltBufferString = node.splt.toString();
121
128
  }
122
- a = msg.payload.split(node.spltBufferString);
129
+ a = value.split(node.spltBufferString);
123
130
  msg.parts.ch = node.spltBuffer; // pass the split char to other end for rejoin
124
131
  } else if (node.spltType === "str") {
125
- a = msg.payload.split(node.splt);
132
+ a = value.split(node.splt);
126
133
  msg.parts.ch = node.splt; // pass the split char to other end for rejoin
127
134
  }
128
135
  sendArray(node,msg,a,send);
129
136
  done();
130
137
  }
131
138
  }
132
- else if (Array.isArray(msg.payload)) { // then split array into messages
139
+ else if (Array.isArray(value)) { // then split array into messages
133
140
  msg.parts.type = "array";
134
- var count = msg.payload.length/node.arraySplt;
141
+ var count = value.length/node.arraySplt;
135
142
  if (Math.floor(count) !== count) {
136
143
  count = Math.ceil(count);
137
144
  }
138
145
  msg.parts.count = count;
139
146
  var pos = 0;
140
- var data = msg.payload;
147
+ var data = value;
141
148
  msg.parts.len = node.arraySplt;
142
149
  for (var i=0; i<count; i++) {
143
- msg.payload = data.slice(pos,pos+node.arraySplt);
150
+ var m = data.slice(pos,pos+node.arraySplt);
144
151
  if (node.arraySplt === 1) {
145
- msg.payload = msg.payload[0];
152
+ m = m[0];
146
153
  }
154
+ RED.util.setMessageProperty(msg,node.property,m);
147
155
  msg.parts.index = i;
148
156
  pos += node.arraySplt;
149
157
  send(RED.util.cloneMessage(msg));
150
158
  }
151
159
  done();
152
160
  }
153
- else if ((typeof msg.payload === "object") && !Buffer.isBuffer(msg.payload)) {
161
+ else if ((typeof value === "object") && !Buffer.isBuffer(value)) {
154
162
  var j = 0;
155
- var l = Object.keys(msg.payload).length;
156
- var pay = msg.payload;
163
+ var l = Object.keys(value).length;
164
+ var pay = value;
157
165
  msg.parts.type = "object";
158
166
  for (var p in pay) {
159
167
  if (pay.hasOwnProperty(p)) {
160
- msg.payload = pay[p];
168
+ RED.util.setMessageProperty(msg,node.property,pay[p]);
161
169
  if (node.addname !== "") {
162
- msg[node.addname] = p;
170
+ RED.util.setMessageProperty(msg,node.addname,p);
163
171
  }
164
172
  msg.parts.key = p;
165
173
  msg.parts.index = j;
@@ -170,9 +178,9 @@ module.exports = function(RED) {
170
178
  }
171
179
  done();
172
180
  }
173
- else if (Buffer.isBuffer(msg.payload)) {
174
- var len = node.buffer.length + msg.payload.length;
175
- var buff = Buffer.concat([node.buffer, msg.payload], len);
181
+ else if (Buffer.isBuffer(value)) {
182
+ var len = node.buffer.length + value.length;
183
+ var buff = Buffer.concat([node.buffer, value], len);
176
184
  msg.parts.type = "buffer";
177
185
  if (node.spltType === "len") {
178
186
  var count = buff.length/node.splt;
@@ -186,7 +194,7 @@ module.exports = function(RED) {
186
194
  var pos = 0;
187
195
  msg.parts.len = node.splt;
188
196
  for (var i=0; i<count-1; i++) {
189
- msg.payload = buff.slice(pos,pos+node.splt);
197
+ RED.util.setMessageProperty(msg,node.property,buff.slice(pos,pos+node.splt));
190
198
  msg.parts.index = node.c++;
191
199
  pos += node.splt;
192
200
  send(RED.util.cloneMessage(msg));
@@ -197,7 +205,7 @@ module.exports = function(RED) {
197
205
  }
198
206
  node.buffer = buff.slice(pos);
199
207
  if ((node.stream !== true) || (node.buffer.length === node.splt)) {
200
- msg.payload = node.buffer;
208
+ RED.util.setMessageProperty(msg,node.property,node.buffer);
201
209
  msg.parts.index = node.c++;
202
210
  send(RED.util.cloneMessage(msg));
203
211
  node.pendingDones.forEach(d => d());
@@ -230,7 +238,7 @@ module.exports = function(RED) {
230
238
  var i = 0, p = 0;
231
239
  pos = buff.indexOf(node.splt);
232
240
  while (pos > -1) {
233
- msg.payload = buff.slice(p,pos);
241
+ RED.util.setMessageProperty(msg,node.property,buff.slice(p,pos));
234
242
  msg.parts.index = node.c++;
235
243
  send(RED.util.cloneMessage(msg));
236
244
  i++;
@@ -242,7 +250,7 @@ module.exports = function(RED) {
242
250
  node.pendingDones = [];
243
251
  }
244
252
  if ((node.stream !== true) && (p < buff.length)) {
245
- msg.payload = buff.slice(p,buff.length);
253
+ RED.util.setMessageProperty(msg,node.property,buff.slice(p,buff.length));
246
254
  msg.parts.index = node.c++;
247
255
  msg.parts.count = node.c++;
248
256
  send(RED.util.cloneMessage(msg));
@@ -298,7 +306,6 @@ module.exports = function(RED) {
298
306
  return exp
299
307
  }
300
308
 
301
-
302
309
  function reduceMessageGroup(node,msgInfos,exp,fixup,count,accumulator,done) {
303
310
  var msgInfo = msgInfos.shift();
304
311
  exp.assign("I", msgInfo.msg.parts.index);
@@ -330,6 +337,7 @@ module.exports = function(RED) {
330
337
  }
331
338
  });
332
339
  }
340
+
333
341
  function reduceAndSendGroup(node, group, done) {
334
342
  var is_right = node.reduce_right;
335
343
  var flag = is_right ? -1 : 1;
@@ -515,13 +523,13 @@ module.exports = function(RED) {
515
523
  if (typeof group.joinChar !== 'string') {
516
524
  groupJoinChar = group.joinChar.toString();
517
525
  }
518
- RED.util.setMessageProperty(group.msg,node.property,group.payload.join(groupJoinChar));
526
+ RED.util.setMessageProperty(group.msg,group?.prop||"payload",group.payload.join(groupJoinChar));
519
527
  }
520
528
  else {
521
529
  if (node.propertyType === 'full') {
522
530
  group.msg = RED.util.cloneMessage(group.msg);
523
531
  }
524
- RED.util.setMessageProperty(group.msg,node.property,group.payload);
532
+ RED.util.setMessageProperty(group.msg,group?.prop||"payload",group.payload);
525
533
  }
526
534
  if (group.msg.hasOwnProperty('parts') && group.msg.parts.hasOwnProperty('parts')) {
527
535
  group.msg.parts = group.msg.parts.parts;
@@ -589,7 +597,7 @@ module.exports = function(RED) {
589
597
  }
590
598
 
591
599
  if (node.mode === 'auto' && (!msg.hasOwnProperty("parts")||!msg.parts.hasOwnProperty("id"))) {
592
- // if a blank reset messag erest it all.
600
+ // if a blank reset message reset it all.
593
601
  if (msg.hasOwnProperty("reset")) {
594
602
  if (inflight && inflight.hasOwnProperty("partId") && inflight[partId].timeout) {
595
603
  clearTimeout(inflight[partId].timeout);
@@ -603,6 +611,15 @@ module.exports = function(RED) {
603
611
  return;
604
612
  }
605
613
 
614
+ if (node.mode === 'custom' && msg.hasOwnProperty('parts')) {
615
+ if (msg.parts.hasOwnProperty('parts')) {
616
+ msg.parts = { parts: msg.parts.parts };
617
+ }
618
+ else {
619
+ delete msg.parts;
620
+ }
621
+ }
622
+
606
623
  var payloadType;
607
624
  var propertyKey;
608
625
  var targetCount;
@@ -618,6 +635,7 @@ module.exports = function(RED) {
618
635
  propertyKey = msg.parts.key;
619
636
  arrayLen = msg.parts.len;
620
637
  propertyIndex = msg.parts.index;
638
+ property = RED.util.getMessageProperty(msg,msg.parts.property||"payload");
621
639
  }
622
640
  else if (node.mode === 'reduce') {
623
641
  return processReduceMessageQueue({msg, send, done});
@@ -719,6 +737,8 @@ module.exports = function(RED) {
719
737
  completeSend(partId)
720
738
  }, node.timer)
721
739
  }
740
+ if (node.mode === "auto") { inflight[partId].prop = msg.parts.property; }
741
+ else { inflight[partId].prop = node.property; }
722
742
  }
723
743
  inflight[partId].dones.push(done);
724
744
 
@@ -516,7 +516,8 @@
516
516
  "path1": "Standardmäßig enthält <code>payload</code> die Daten, die über einen WebSocket gesendet oder von einem WebSocket empfangen werden. Der Empfänger (Listener) kann so konfiguriert werden, dass er das gesamte Nachrichtenobjekt als eine JSON-formatierte Zeichenfolge (string) sendet oder empfängt.",
517
517
  "path2": "Dieser Pfad ist relativ zu <code>__path__</code>.",
518
518
  "url1": "URL sollte ws:&#47;&#47; oder wss:&#47;&#47; Schema verwenden und auf einen vorhandenen WebSocket-Listener verweisen.",
519
- "url2": "Standardmäßig enthält <code>payload</code> die Daten, die über einen WebSocket gesendet oder von einem WebSocket empfangen werden. Der Client kann so konfiguriert werden, dass er das gesamte Nachrichtenobjekt als eine JSON-formatierte Zeichenfolge (string) sendet oder empfängt."
519
+ "url2": "Standardmäßig enthält <code>payload</code> die Daten, die über einen WebSocket gesendet oder von einem WebSocket empfangen werden. Der Client kann so konfiguriert werden, dass er das gesamte Nachrichtenobjekt als eine JSON-formatierte Zeichenfolge (string) sendet oder empfängt.",
520
+ "headers": "Header werden nur während des Protokollaktualisierungsmechanismus übermittelt, von HTTP auf das WS/WSS-Protokoll."
520
521
  },
521
522
  "status": {
522
523
  "connected": "Verbunden __count__",
@@ -586,7 +586,8 @@
586
586
  "path1": "By default, <code>payload</code> will contain the data to be sent over, or received from a websocket. The listener can be configured to send or receive the entire message object as a JSON formatted string.",
587
587
  "path2": "This path will be relative to <code>__path__</code>.",
588
588
  "url1": "URL should use ws:&#47;&#47; or wss:&#47;&#47; scheme and point to an existing websocket listener.",
589
- "url2": "By default, <code>payload</code> will contain the data to be sent over, or received from a websocket. The client can be configured to send or receive the entire message object as a JSON formatted string."
589
+ "url2": "By default, <code>payload</code> will contain the data to be sent over, or received from a websocket. The client can be configured to send or receive the entire message object as a JSON formatted string.",
590
+ "headers": "Headers are only submitted during the Protocol upgrade mechanism, from HTTP to the WS/WSS Protocol."
590
591
  },
591
592
  "status": {
592
593
  "connected": "connected __count__",
@@ -849,7 +850,13 @@
849
850
  "newline": "Newline",
850
851
  "usestrings": "parse numerical values",
851
852
  "include_empty_strings": "include empty strings",
852
- "include_null_values": "include null values"
853
+ "include_null_values": "include null values",
854
+ "spec": "Parser"
855
+ },
856
+ "spec": {
857
+ "rfc": "RFC4180",
858
+ "legacy": "Legacy",
859
+ "legacy_warning": "Legacy mode will be removed in a future release."
853
860
  },
854
861
  "placeholder": {
855
862
  "columns": "comma-separated column names"
@@ -878,6 +885,7 @@
878
885
  "once": "send headers once, until msg.reset"
879
886
  },
880
887
  "errors": {
888
+ "bad_template": "Malformed columns template.",
881
889
  "csv_js": "This node only handles CSV strings or js objects.",
882
890
  "obj_csv": "No columns template specified for object -> CSV.",
883
891
  "bad_csv": "Malformed CSV data - output probably corrupt."
@@ -887,12 +895,14 @@
887
895
  "label": {
888
896
  "select": "Selector",
889
897
  "output": "Output",
890
- "in": "in"
898
+ "in": "in",
899
+ "prefix": "Property name for HTML content"
891
900
  },
892
901
  "output": {
893
902
  "html": "the html content of the elements",
894
903
  "text": "only the text content of the elements",
895
- "attr": "an object of any attributes of the elements"
904
+ "attr": "an object of any attributes of the elements",
905
+ "compl": "an object of any attributes of the elements and html contents"
896
906
  },
897
907
  "format": {
898
908
  "single": "as a single message containing an array",
@@ -1001,7 +1011,7 @@
1001
1011
  "tip": "Tip: The filename should be an absolute path, otherwise it will be relative to the working directory of the Node-RED process."
1002
1012
  },
1003
1013
  "split": {
1004
- "split": "split",
1014
+ "split": "Split",
1005
1015
  "intro": "Split <code>msg.payload</code> based on type:",
1006
1016
  "object": "<b>Object</b>",
1007
1017
  "objectSend": "Send a message for each key/value pair",
@@ -30,6 +30,8 @@
30
30
  before being sent.</p>
31
31
  <p>If <code>msg._session</code> is not present the payload is
32
32
  sent to <b>all</b> connected clients.</p>
33
+ <p>In Reply-to mode, setting <code>msg.reset = true</code> will reset the connection
34
+ specified by _session.id, or all connections if no _session.id is specified.</p>
33
35
  <p><b>Note: </b>On some systems you may need root or administrator access
34
36
  to access ports below 1024.</p>
35
37
  </script>
@@ -40,6 +42,8 @@
40
42
  returned characters into a fixed buffer, match a specified character before returning,
41
43
  wait a fixed timeout from first reply and then return, sit and wait for data, or send then close the connection
42
44
  immediately, without waiting for a reply.</p>
45
+ <p>If in sit and wait mode (remain connected) you can send <code>msg.reset = true</code> or <code>msg.reset = "host:port"</code> to force a break in
46
+ the connection and an automatic reconnection.</p>
43
47
  <p>The response will be output in <code>msg.payload</code> as a buffer, so you may want to .toString() it.</p>
44
48
  <p>If you leave tcp host or port blank they must be set by using the <code>msg.host</code> and <code>msg.port</code> properties in every message sent to the node.</p>
45
49
  </script>
@@ -36,7 +36,9 @@
36
36
  </dl>
37
37
  <h3>Details</h3>
38
38
  <p>The column template can contain an ordered list of column names. When converting CSV to an object, the column names
39
- will be used as the property names. Alternatively, the column names can be taken from the first row of the CSV.</p>
39
+ will be used as the property names. Alternatively, the column names can be taken from the first row of the CSV.
40
+ <p>When the RFC parser is selected, the column template must be compliant with RFC4180.</p>
41
+ </p>
40
42
  <p>When converting to CSV, the columns template is used to identify which properties to extract from the object and in what order.</p>
41
43
  <p>If the columns template is blank then you can use a simple comma separated list of properties supplied in <code>msg.columns</code> to
42
44
  determine what to extract and in what order. If neither are present then all the object properties are output in the order
@@ -49,4 +51,5 @@
49
51
  <p>If outputting multiple messages they will have their <code>parts</code> property set and form a complete message sequence.</p>
50
52
  <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>
51
53
  <p><b>Note:</b> the column template must be comma separated - even if a different separator is chosen for the data.</p>
54
+ <p><b>Note:</b> in RFC mode, catchable errors will be thrown for malformed CSV headers and invalid input payload data</p>
52
55
  </script>
@@ -583,7 +583,8 @@
583
583
  "path1": "Par défaut, <code>payload</code> contiendra les données à envoyer ou à recevoir d'un websocket. L'écouteur peut être configuré pour envoyer ou recevoir l'intégralité de l'objet message sous forme de chaîne au format JSON.",
584
584
  "path2": "Ce chemin sera relatif à <code>__path__</code>.",
585
585
  "url1": "L'URL doit utiliser le schéma ws:&#47;&#47; ou wss:&#47;&#47; et pointer vers un écouteur websocket existant.",
586
- "url2": "Par défaut, <code>payload</code> contiendra les données à envoyer ou à recevoir d'un websocket. Le client peut être configuré pour envoyer ou recevoir l'intégralité de l'objet message sous forme de chaîne au format JSON."
586
+ "url2": "Par défaut, <code>payload</code> contiendra les données à envoyer ou à recevoir d'un websocket. Le client peut être configuré pour envoyer ou recevoir l'intégralité de l'objet message sous forme de chaîne au format JSON.",
587
+ "headers": "Les en-têtes ne sont soumis que lors du mécanisme de mise à niveau du protocole, de HTTP vers le protocole WS/WSS."
587
588
  },
588
589
  "status": {
589
590
  "connected": "__count__ connecté",
@@ -586,7 +586,8 @@
586
586
  "path1": "標準では <code>payload</code> がwebsocketから送信、受信されるデータを持ちます。クライアントはJSON形式の文字列としてメッセージ全体を送信、受信するよう設定できます。",
587
587
  "path2": "このパスは <code>__path__</code> の相対パスになります。",
588
588
  "url1": "URLには ws:&#47;&#47; または wss:&#47;&#47; スキーマを使用して、存在するwebsocketリスナを設定してください。",
589
- "url2": "標準では <code>payload</code> がwebsocketから送信、受信されるデータを持ちます。クライアントはJSON形式の文字列としてメッセージ全体を送信、受信するよう設定できます。"
589
+ "url2": "標準では <code>payload</code> がwebsocketから送信、受信されるデータを持ちます。クライアントはJSON形式の文字列としてメッセージ全体を送信、受信するよう設定できます。",
590
+ "headers": "ヘッダーは、HTTP から WS/WSS プロトコルへのプロトコル アップグレード メカニズム中にのみ送信されます。"
590
591
  },
591
592
  "status": {
592
593
  "connected": "接続数 __count__",
@@ -451,7 +451,8 @@
451
451
  "path1": "표준으로는 <code>payload</code> 가 websocket에서 송신, 수신된 데이터를 기다립니다. 클라이언트는 JSON형식의 문자열로 메세지전체를 송신, 수신하도록 설정할 수 있습니다.",
452
452
  "path2": "This path will be relative to <code>__path__</code>.",
453
453
  "url1": "URL에는 ws:&#47;&#47; 또는 wss:&#47;&#47; 스키마를 사용하여, 존재하는 websocket리스너를 설정해 주세요.",
454
- "url2": "표준으로는 <code>payload</code> 가 websocket에서 송신,수신될 데이터를 기다립니다.클라이언트는 JSON형식의 문자열로 메세지전체를 송신, 수신하도록 설정할 수 있습니다."
454
+ "url2": "표준으로는 <code>payload</code> 가 websocket에서 송신,수신될 데이터를 기다립니다.클라이언트는 JSON형식의 문자열로 메세지전체를 송신, 수신하도록 설정할 수 있습니다.",
455
+ "headers": "헤더는 HTTP에서 WS/WSS 프로토콜로 프로토콜 업그레이드 메커니즘 중에만 제출됩니다."
455
456
  },
456
457
  "status": {
457
458
  "connected": "접속 수 __count__",
@@ -573,7 +573,8 @@
573
573
  "path1": "Por padrão, a <code>carga útil</code> conterá os dados a serem enviados ou recebidos de um websocket. O ouvinte pode ser configurado para enviar ou receber todo o objeto de mensagem como uma cadeia de caracteres formatada em JSON.",
574
574
  "path2": "Este caminho será relativo a <code>__path__</code>.",
575
575
  "url1": "A URL deve usar o esquema ws:&#47;&#47; ou wss:&#47;&#47; e apontar para um ouvinte de websocket existente.",
576
- "url2": "Por padrão, <code>carga útil</code> conterá os dados a serem enviados ou recebidos de um websocket. O cliente pode ser configurado para enviar ou receber todo o objeto de mensagem como uma cadeia de caracteres formatada em JSON."
576
+ "url2": "Por padrão, <code>carga útil</code> conterá os dados a serem enviados ou recebidos de um websocket. O cliente pode ser configurado para enviar ou receber todo o objeto de mensagem como uma cadeia de caracteres formatada em JSON.",
577
+ "headers": "Os cabeçalhos são enviados apenas durante o mecanismo de atualização do protocolo, do HTTP para o protocolo WS/WSS."
577
578
  },
578
579
  "status": {
579
580
  "connected": "conectado __count__",
@@ -475,7 +475,8 @@
475
475
  "path1": "По умолчанию <code>payload</code> будет содержать данные, которые будут отправлены или получены из websocket. Слушатель может быть настроен на отправку или получение всего объекта сообщения в виде строки в формате JSON.",
476
476
  "path2": "Путь будет относительно <code>__path__</code>.",
477
477
  "url1": "URL должен использовать схему ws:&#47;&#47; или wss:&#47;&#47; и указывать на существующего слушателя websocket.",
478
- "url2": "По умолчанию <code>payload</code> будет содержать данные, которые будут отправлены или получены из websocket. Клиент может быть настроен на отправку или получение всего объекта сообщения в виде строки в формате JSON."
478
+ "url2": "По умолчанию <code>payload</code> будет содержать данные, которые будут отправлены или получены из websocket. Клиент может быть настроен на отправку или получение всего объекта сообщения в виде строки в формате JSON.",
479
+ "headers": "Заголовки передаются только во время механизма обновления протокола с HTTP на протокол WS/WSS."
479
480
  },
480
481
  "status": {
481
482
  "connected": "подключен __count__",
@@ -576,7 +576,8 @@
576
576
  "path1": "默认情况下,<code>payload</code>将包含要发送或从Websocket接收的数据。侦听器可以配置为以JSON格式的字符串发送或接收整个消息对象.",
577
577
  "path2": "这条路径将相对于 <code>__path__</code>.",
578
578
  "url1": "URL 应该使用ws:&#47;&#47;或者wss:&#47;&#47;方案并指向现有的websocket侦听器.",
579
- "url2": "默认情况下,<code>payload</code> 将包含要发送或从Websocket接收的数据。可以将客户端配置为以JSON格式的字符串发送或接收整个消息对象."
579
+ "url2": "默认情况下,<code>payload</code> 将包含要发送或从Websocket接收的数据。可以将客户端配置为以JSON格式的字符串发送或接收整个消息对象.",
580
+ "headers": "标头仅在协议升级机制期间提交,从 HTTP 到 WS/WSS 协议."
580
581
  },
581
582
  "status": {
582
583
  "connected": "已连接数量 __count__",
@@ -471,7 +471,8 @@
471
471
  "path1": "預設情況下,<code>payload</code>將包含要發送或從Websocket接收的資料。偵聽器可以配置為以JSON格式的字串發送或接收整個消息物件.",
472
472
  "path2": "這條路徑將相對於 <code>__path__</code>.",
473
473
  "url1": "URL 應該使用ws:&#47;&#47;或者wss:&#47;&#47;方案並指向現有的websocket監聽器.",
474
- "url2": "預設情況下,<code>payload</code> 將包含要發送或從Websocket接收的資料。可以將使用者端配置為以JSON格式的字串發送或接收整個消息物件."
474
+ "url2": "預設情況下,<code>payload</code> 將包含要發送或從Websocket接收的資料。可以將使用者端配置為以JSON格式的字串發送或接收整個消息物件.",
475
+ "headers": "標頭僅在協定升級機制期間提交,從 HTTP 到 WS/WSS 協定."
475
476
  },
476
477
  "status": {
477
478
  "connected": "連接數 __count__",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@node-red/nodes",
3
- "version": "3.1.7",
3
+ "version": "4.0.0-beta.1",
4
4
  "license": "Apache-2.0",
5
5
  "repository": {
6
6
  "type": "git",