@node-red/nodes 3.1.8 → 4.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.
- package/core/common/21-debug.html +1 -1
- package/core/common/21-debug.js +2 -1
- package/core/common/lib/debug/debug-utils.js +2 -1
- package/core/function/15-change.js +6 -1
- package/core/network/22-websocket.html +206 -2
- package/core/network/22-websocket.js +37 -0
- package/core/network/31-tcpin.js +52 -16
- package/core/parsers/70-CSV.html +39 -4
- package/core/parsers/70-CSV.js +612 -260
- package/core/parsers/70-HTML.html +14 -1
- package/core/parsers/70-HTML.js +11 -0
- package/core/parsers/lib/csv/index.js +324 -0
- package/core/sequence/17-split.html +13 -5
- package/core/sequence/17-split.js +54 -34
- package/locales/de/messages.json +2 -1
- package/locales/en-US/messages.json +15 -5
- package/locales/en-US/network/31-tcpin.html +4 -0
- package/locales/en-US/parsers/70-CSV.html +4 -1
- package/locales/fr/common/91-global-config.html +3 -0
- package/locales/fr/messages.json +18 -5
- package/locales/fr/network/31-tcpin.html +4 -0
- package/locales/fr/parsers/70-CSV.html +3 -1
- package/locales/ja/common/91-global-config.html +1 -1
- package/locales/ja/messages.json +14 -4
- package/locales/ja/network/31-tcpin.html +2 -0
- package/locales/ja/parsers/70-CSV.html +3 -1
- package/locales/ko/messages.json +2 -1
- package/locales/pt-BR/messages.json +2 -1
- package/locales/ru/messages.json +2 -1
- package/locales/zh-CN/messages.json +2 -1
- package/locales/zh-TW/messages.json +2 -1
- package/package.json +1 -1
|
@@ -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.
|
|
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.
|
|
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
|
-
}
|
|
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
|
-
}
|
|
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
|
-
|
|
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
|
|
78
|
-
|
|
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 =
|
|
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 =
|
|
99
|
+
var data = value;
|
|
93
100
|
for (var i=0; i<count-1; i++) {
|
|
94
|
-
msg.
|
|
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.
|
|
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 =
|
|
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 =
|
|
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(
|
|
139
|
+
else if (Array.isArray(value)) { // then split array into messages
|
|
133
140
|
msg.parts.type = "array";
|
|
134
|
-
var count =
|
|
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 =
|
|
147
|
+
var data = value;
|
|
141
148
|
msg.parts.len = node.arraySplt;
|
|
142
149
|
for (var i=0; i<count; i++) {
|
|
143
|
-
|
|
150
|
+
var m = data.slice(pos,pos+node.arraySplt);
|
|
144
151
|
if (node.arraySplt === 1) {
|
|
145
|
-
|
|
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
|
|
161
|
+
else if ((typeof value === "object") && !Buffer.isBuffer(value)) {
|
|
154
162
|
var j = 0;
|
|
155
|
-
var l = Object.keys(
|
|
156
|
-
var pay =
|
|
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.
|
|
168
|
+
RED.util.setMessageProperty(msg,node.property,pay[p]);
|
|
161
169
|
if (node.addname !== "") {
|
|
162
|
-
msg
|
|
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(
|
|
174
|
-
var len = node.buffer.length +
|
|
175
|
-
var buff = Buffer.concat([node.buffer,
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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,
|
|
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,
|
|
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
|
|
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
|
|
package/locales/de/messages.json
CHANGED
|
@@ -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:// oder wss:// 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:// or wss:// 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": "
|
|
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
|
|
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>
|
package/locales/fr/messages.json
CHANGED
|
@@ -94,6 +94,7 @@
|
|
|
94
94
|
},
|
|
95
95
|
"catch": {
|
|
96
96
|
"catch": "catch : tout",
|
|
97
|
+
"catchGroup": "catch: groupe",
|
|
97
98
|
"catchNodes": "catch : __number__",
|
|
98
99
|
"catchUncaught": "catch : non capturé",
|
|
99
100
|
"label": {
|
|
@@ -109,6 +110,7 @@
|
|
|
109
110
|
},
|
|
110
111
|
"status": {
|
|
111
112
|
"status": "statut : tout",
|
|
113
|
+
"statusGroup": "statut: groupe",
|
|
112
114
|
"statusNodes": "statut : __number__",
|
|
113
115
|
"label": {
|
|
114
116
|
"source": "Signaler l'état de",
|
|
@@ -250,7 +252,8 @@
|
|
|
250
252
|
"initialize": "Au démarrage",
|
|
251
253
|
"finalize": "À l'arrêt",
|
|
252
254
|
"outputs": "Sorties",
|
|
253
|
-
"modules": "Modules"
|
|
255
|
+
"modules": "Modules",
|
|
256
|
+
"timeout": "Délai d'attente"
|
|
254
257
|
},
|
|
255
258
|
"text": {
|
|
256
259
|
"initialize": "// Le code ajouté ici sera exécuté une fois\n// à chaque démarrage du noeud.\n",
|
|
@@ -583,7 +586,8 @@
|
|
|
583
586
|
"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
587
|
"path2": "Ce chemin sera relatif à <code>__path__</code>.",
|
|
585
588
|
"url1": "L'URL doit utiliser le schéma ws:// ou wss:// 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."
|
|
589
|
+
"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.",
|
|
590
|
+
"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
591
|
},
|
|
588
592
|
"status": {
|
|
589
593
|
"connected": "__count__ connecté",
|
|
@@ -846,7 +850,13 @@
|
|
|
846
850
|
"newline": "Nouvelle ligne",
|
|
847
851
|
"usestrings": "Analyser les valeurs numériques",
|
|
848
852
|
"include_empty_strings": "Inclure les chaînes vides",
|
|
849
|
-
"include_null_values": "Inclure les valeurs nulles"
|
|
853
|
+
"include_null_values": "Inclure les valeurs nulles",
|
|
854
|
+
"spec": "Analyseur"
|
|
855
|
+
},
|
|
856
|
+
"spec": {
|
|
857
|
+
"rfc": "RFC4180",
|
|
858
|
+
"legacy": "Hérité (Legacy)",
|
|
859
|
+
"legacy_warning": "Le mode hérité sera supprimé dans une prochaine version."
|
|
850
860
|
},
|
|
851
861
|
"placeholder": {
|
|
852
862
|
"columns": "noms de colonnes séparés par des virgules"
|
|
@@ -875,6 +885,7 @@
|
|
|
875
885
|
"once": "envoyer les en-têtes une fois, jusqu'à msg.reset"
|
|
876
886
|
},
|
|
877
887
|
"errors": {
|
|
888
|
+
"bad_template": "Colonnes du modèle mal formées.",
|
|
878
889
|
"csv_js": "Ce noeud ne gère que les chaînes CSV ou les objets js.",
|
|
879
890
|
"obj_csv": "Aucun modèle de colonnes spécifié pour l'objet -> CSV.",
|
|
880
891
|
"bad_csv": "Données CSV mal formées - sortie probablement corrompue."
|
|
@@ -884,12 +895,14 @@
|
|
|
884
895
|
"label": {
|
|
885
896
|
"select": "Sélecteur",
|
|
886
897
|
"output": "Sortie",
|
|
887
|
-
"in": "dans"
|
|
898
|
+
"in": "dans",
|
|
899
|
+
"prefix": "Nom de la propriété pour le contenu HTML"
|
|
888
900
|
},
|
|
889
901
|
"output": {
|
|
890
902
|
"html": "le contenu html des éléments",
|
|
891
903
|
"text": "uniquement le contenu textuel des éléments",
|
|
892
|
-
"attr": "un objet de n'importe quel attribut des éléments"
|
|
904
|
+
"attr": "un objet de n'importe quel attribut des éléments",
|
|
905
|
+
"compl": "un objet pour tous les attributs de tous les éléments ainsi que du contenu HTML"
|
|
893
906
|
},
|
|
894
907
|
"format": {
|
|
895
908
|
"single": "comme un seul message contenant un tableau",
|
|
@@ -30,6 +30,8 @@
|
|
|
30
30
|
avant d'être envoyé.</p>
|
|
31
31
|
<p>Si <code>msg._session</code> n'est pas présent, la charge utile est
|
|
32
32
|
envoyé à <b>tous</b> les clients connectés.</p>
|
|
33
|
+
<p>En mode Répondre à, définir <code>msg.reset = true</code> réinitialisera la connexion
|
|
34
|
+
spécifiée par _session.id ou toutes les connexions si aucun _session.id n'est spécifié.</p>
|
|
33
35
|
<p><b>Remarque</b> : Sur certains systèmes, vous aurez peut-être besoin d'un accès root ou administrateur
|
|
34
36
|
pour accéder aux ports inférieurs à 1024.</p>
|
|
35
37
|
</script>
|
|
@@ -40,6 +42,8 @@
|
|
|
40
42
|
caractères renvoyés dans un tampon fixe, correspondant à un caractère spécifié avant de revenir,
|
|
41
43
|
attendre un délai fixe à partir de la première réponse, puis revenir, s'installer et attender les données, ou envoie puis ferme la connexion
|
|
42
44
|
immédiatement, sans attendre de réponse.</p>
|
|
45
|
+
<p>Dans le cas du mode veille (maintien de la connexion), vous pouvez envoyer <code>msg.reset = true</code> ou <code>msg.reset = "host:port"</code> pour forcer une interruption
|
|
46
|
+
de la connexion et une reconnexion automatique.</p>
|
|
43
47
|
<p>La réponse sortira dans <code>msg.payload</code> en tant que tampon, vous pouvez alors utiliser la fonction .toString().</p>
|
|
44
48
|
<p>Si vous laissez l'hôte ou le port tcp vide, ils doivent être définis à l'aide des propriétés <code>msg.host</code> et <code>msg.port</code> dans chaque message envoyé au noeud.</ p>
|
|
45
49
|
</script>
|
|
@@ -36,7 +36,9 @@
|
|
|
36
36
|
</dl>
|
|
37
37
|
<h3>Détails</h3>
|
|
38
38
|
<p>Le modèle de colonne peut contenir une liste ordonnée de noms de colonnes. Lors de la conversion de CSV en objet, les noms de colonne
|
|
39
|
-
seront utilisés comme noms de propriété. Alternativement, les noms de colonne peuvent être tirés de la première ligne du CSV
|
|
39
|
+
seront utilisés comme noms de propriété. Alternativement, les noms de colonne peuvent être tirés de la première ligne du CSV.
|
|
40
|
+
<p>Lorsque l'analyseur RFC est sélectionné, le modèle de colonne doit être conforme à la norme RFC4180.</p>
|
|
41
|
+
</p>
|
|
40
42
|
<p>Lors de la conversion au format CSV, le modèle de colonnes est utilisé pour identifier les propriétés à extraire de l'objet et dans quel ordre.</p>
|
|
41
43
|
<p>Si le modèle de colonnes est vide, vous pouvez utiliser une simple liste de propriétés séparées par des virgules fournies dans <code>msg.columns</code> pour
|
|
42
44
|
déterminer quoi extraire et dans quel ordre. Si ni l'un ni l'autre n'est présent, toutes les propriétés de l'objet sont sorties dans l'ordre
|
package/locales/ja/messages.json
CHANGED
|
@@ -586,7 +586,8 @@
|
|
|
586
586
|
"path1": "標準では <code>payload</code> がwebsocketから送信、受信されるデータを持ちます。クライアントはJSON形式の文字列としてメッセージ全体を送信、受信するよう設定できます。",
|
|
587
587
|
"path2": "このパスは <code>__path__</code> の相対パスになります。",
|
|
588
588
|
"url1": "URLには ws:// または wss:// スキーマを使用して、存在する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__",
|
|
@@ -849,7 +850,13 @@
|
|
|
849
850
|
"newline": "改行コード",
|
|
850
851
|
"usestrings": "数値を変換する",
|
|
851
852
|
"include_empty_strings": "空の文字を含む",
|
|
852
|
-
"include_null_values": "null値を含む"
|
|
853
|
+
"include_null_values": "null値を含む",
|
|
854
|
+
"spec": "パーサ"
|
|
855
|
+
},
|
|
856
|
+
"spec": {
|
|
857
|
+
"rfc": "RFC4180",
|
|
858
|
+
"legacy": "従来",
|
|
859
|
+
"legacy_warning": "従来モードは将来のリリースで削除される予定です"
|
|
853
860
|
},
|
|
854
861
|
"placeholder": {
|
|
855
862
|
"columns": "コンマ区切りで列名を入力"
|
|
@@ -878,6 +885,7 @@
|
|
|
878
885
|
"once": "ヘッダを一度だけ送信する(msg.resetの受け付けると再送)"
|
|
879
886
|
},
|
|
880
887
|
"errors": {
|
|
888
|
+
"bad_template": "不正な列テンプレート",
|
|
881
889
|
"csv_js": "本ノードが処理できる形式は、CSV文字列またはJSONのみです",
|
|
882
890
|
"obj_csv": "オブジェクトをCSVへ変換する際の列名が設定されていません",
|
|
883
891
|
"bad_csv": "不正なCSVデータ - 出力の修正を試みました"
|
|
@@ -887,12 +895,14 @@
|
|
|
887
895
|
"label": {
|
|
888
896
|
"select": "抽出する要素",
|
|
889
897
|
"output": "出力",
|
|
890
|
-
"in": "対象:"
|
|
898
|
+
"in": "対象:",
|
|
899
|
+
"prefix": "HTMLコンテンツのプロパティ名"
|
|
891
900
|
},
|
|
892
901
|
"output": {
|
|
893
902
|
"html": "要素内のHTML",
|
|
894
903
|
"text": "要素のテキストのみ",
|
|
895
|
-
"attr": "要素の全ての属性"
|
|
904
|
+
"attr": "要素の全ての属性",
|
|
905
|
+
"compl": "要素やHTMLコンテンツの属性オブジェクト"
|
|
896
906
|
},
|
|
897
907
|
"format": {
|
|
898
908
|
"single": "配列化した1つのメッセージ",
|
|
@@ -24,12 +24,14 @@
|
|
|
24
24
|
<p><code>msg.payload</code>のみが送信対象となります。</p>
|
|
25
25
|
<p><code>msg.payload</code>がバイナリデータをBase64エンコーディングの文字列に変換したものの場合、Base64デコードオプションを指定するとデータをバイナリに変換して送信します。</p>
|
|
26
26
|
<p><code>msg._session</code>が存在しない場合、接続している<b>全ての</b>クライアントに送信します。</p>
|
|
27
|
+
<p>応答モードでは、<code>msg.reset = true</code>を設定すると_session.idで指定した接続がリセットされます。もし_session.idを指定しない場合は、全ての接続がリセットされます。</p>
|
|
27
28
|
<p><b>注: </b>1024番より小さな番号のポートをアクセスするにはrootもしくはadministrator権限が必要なシステムもあります。</p>
|
|
28
29
|
</script>
|
|
29
30
|
|
|
30
31
|
<script type="text/html" data-help-name="tcp request">
|
|
31
32
|
<p>シンプルなTCPリクエストノード。<code>msg.payload</code>をサーバのTCPポートに送信し、レスポンスを待ちます。</p>
|
|
32
33
|
<p>サーバに接続、"リクエスト"送信、"レスポンス"受信を行います。固定長の文字数、指定文字へのマッチ、最初のリプライの到着から指定した時間待つ、データの到着待ち、データ送信を行いリプライを待たず接続を即時解除、などから動作を選択できます。</p>
|
|
34
|
+
<p>待機モード(接続を維持)の場合は、<code>msg.reset = true</code>または<code>msg.reset = "host:port"</code>を送信することで、強制的に接続を切断して、自動的に再接続することもできます。</p>
|
|
33
35
|
<p>レスポンスはバッファ形式で<code>msg.payload</code>に出力されます。文字列として扱いには、.toString()を使用してください。</p>
|
|
34
36
|
<p>TCPホストのポート番号設定を空にした場合、本ノードに送信される全てのメッセージにおいて<code>msg.host</code>および<code>msg.port</code>プロパティを設定しなくてはなりません。</p>
|
|
35
37
|
</script>
|
|
@@ -34,7 +34,9 @@
|
|
|
34
34
|
</dd>
|
|
35
35
|
</dl>
|
|
36
36
|
<h3>詳細</h3>
|
|
37
|
-
<p>「列名」にカラム名のリストを指定することができます。CSVからオブジェクトに変換を行う際、カラム名をプロパティ名として使用します。「列名」の代わりに、CSVデータの1
|
|
37
|
+
<p>「列名」にカラム名のリストを指定することができます。CSVからオブジェクトに変換を行う際、カラム名をプロパティ名として使用します。「列名」の代わりに、CSVデータの1行目にカラム名を含めることもできます。
|
|
38
|
+
<p>RFCパーサが選択されている場合、列のテンプレートはRFC4180に準拠する必要があります。</p>
|
|
39
|
+
</p>
|
|
38
40
|
<p>CSVへの変換を行う際には、オブジェクトから取り出すべきプロパティとその順序を「列名」を参照して決めます。</p>
|
|
39
41
|
<p>列名がない場合、本ノードは<code>msg.columns</code>プロパティの単純なコンマ区切りリストを使用して、何をどの順序で抽出するかを決定します。もし存在しない場合、すべてのオブジェクトプロパティを見つけた順序で出力します。</p>
|
|
40
42
|
<p>入力が配列の場合には、「列名」はカラム名を表す行の出力指定がされた場合だけ用います。</p>
|
package/locales/ko/messages.json
CHANGED
|
@@ -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:// 또는 wss:// 스키마를 사용하여, 존재하는 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:// ou wss:// 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__",
|
package/locales/ru/messages.json
CHANGED
|
@@ -475,7 +475,8 @@
|
|
|
475
475
|
"path1": "По умолчанию <code>payload</code> будет содержать данные, которые будут отправлены или получены из websocket. Слушатель может быть настроен на отправку или получение всего объекта сообщения в виде строки в формате JSON.",
|
|
476
476
|
"path2": "Путь будет относительно <code>__path__</code>.",
|
|
477
477
|
"url1": "URL должен использовать схему ws:// или wss:// и указывать на существующего слушателя 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://或者wss://方案并指向现有的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__",
|