@node-red/nodes 4.0.0-beta.4 → 4.0.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.
|
@@ -108,12 +108,13 @@ in your Node-RED user directory (${RED.settings.userDir}).
|
|
|
108
108
|
if (n.proxy && proxyConfig) {
|
|
109
109
|
proxyOptions.env = {
|
|
110
110
|
no_proxy: (proxyConfig.noproxy || []).join(','),
|
|
111
|
-
http_proxy: (proxyConfig.url)
|
|
111
|
+
http_proxy: (proxyConfig.url),
|
|
112
|
+
https_proxy: (proxyConfig.url)
|
|
112
113
|
}
|
|
113
114
|
}
|
|
114
115
|
return getProxyForUrl(url, proxyOptions)
|
|
115
116
|
}
|
|
116
|
-
let prox = getProxy(nodeUrl
|
|
117
|
+
let prox = nodeUrl ? getProxy(nodeUrl) : null
|
|
117
118
|
|
|
118
119
|
let timingLog = false;
|
|
119
120
|
if (RED.settings.hasOwnProperty("httpRequestTimingLog")) {
|
|
@@ -534,9 +535,7 @@ in your Node-RED user directory (${RED.settings.userDir}).
|
|
|
534
535
|
opts.headers[clSet] = opts.headers['content-length'];
|
|
535
536
|
delete opts.headers['content-length'];
|
|
536
537
|
}
|
|
537
|
-
|
|
538
|
-
opts.headers['user-agent'] = 'Mozilla/5.0 (Node-RED)';
|
|
539
|
-
}
|
|
538
|
+
|
|
540
539
|
if (proxyUrl) {
|
|
541
540
|
const match = proxyUrl.match(/^(https?:\/\/)?(.+)?:([0-9]+)?/i);
|
|
542
541
|
if (match) {
|
|
@@ -566,7 +565,7 @@ in your Node-RED user directory (${RED.settings.userDir}).
|
|
|
566
565
|
//need both incase of http -> https redirect
|
|
567
566
|
opts.agent = {
|
|
568
567
|
http: new HttpProxyAgent(proxyOptions),
|
|
569
|
-
https: new
|
|
568
|
+
https: new HttpsProxyAgent(proxyOptions)
|
|
570
569
|
};
|
|
571
570
|
|
|
572
571
|
} else {
|
|
@@ -16,6 +16,10 @@
|
|
|
16
16
|
|
|
17
17
|
<script type="text/html" data-template-name="split">
|
|
18
18
|
<!-- <div class="form-row"><span data-i18n="[html]split.intro"></span></div> -->
|
|
19
|
+
<div class="form-row">
|
|
20
|
+
<label for="node-input-name"><i class="fa fa-tag"></i> <span data-i18n="node-red:common.label.name"></span></label>
|
|
21
|
+
<input type="text" id="node-input-name" data-i18n="[placeholder]node-red:common.label.name">
|
|
22
|
+
</div>
|
|
19
23
|
<div class="form-row">
|
|
20
24
|
<label for="node-input-property"><i class="fa fa-forward"></i> <span data-i18n="split.split"></span></label>
|
|
21
25
|
<input type="text" id="node-input-property" style="width:70%;"/>
|
|
@@ -43,10 +47,6 @@
|
|
|
43
47
|
<label for="node-input-addname-cb" style="width:auto;" data-i18n="split.addname"></label>
|
|
44
48
|
<input type="text" id="node-input-addname" style="width:70%">
|
|
45
49
|
</div>
|
|
46
|
-
<div class="form-row">
|
|
47
|
-
<label for="node-input-name"><i class="fa fa-tag"></i> <span data-i18n="node-red:common.label.name"></span></label>
|
|
48
|
-
<input type="text" id="node-input-name" data-i18n="[placeholder]node-red:common.label.name">
|
|
49
|
-
</div>
|
|
50
50
|
</script>
|
|
51
51
|
|
|
52
52
|
<script type="text/javascript">
|
|
@@ -122,6 +122,10 @@
|
|
|
122
122
|
|
|
123
123
|
|
|
124
124
|
<script type="text/html" data-template-name="join">
|
|
125
|
+
<div class="form-row">
|
|
126
|
+
<label for="node-input-name"><i class="fa fa-tag"></i> <span data-i18n="common.label.name"></span></label>
|
|
127
|
+
<input type="text" id="node-input-name" data-i18n="[placeholder]common.label.name">
|
|
128
|
+
</div>
|
|
125
129
|
<div class="form-row">
|
|
126
130
|
<label data-i18n="join.mode.mode"></label>
|
|
127
131
|
<select id="node-input-mode" style="width:200px;">
|
|
@@ -157,6 +161,12 @@
|
|
|
157
161
|
<input type="text" id="node-input-joiner" style="width:70%">
|
|
158
162
|
<input type="hidden" id="node-input-joinerType">
|
|
159
163
|
</div>
|
|
164
|
+
|
|
165
|
+
<div class="form-row">
|
|
166
|
+
<input type="checkbox" id="node-input-useparts" style="margin-left:8px; margin-right:8px; vertical-align:baseline; width:auto;">
|
|
167
|
+
<label for="node-input-useparts" style="width:auto;" data-i18n="join.useparts"></label>
|
|
168
|
+
</div>
|
|
169
|
+
|
|
160
170
|
<div class="form-row node-row-trigger" id="trigger-row">
|
|
161
171
|
<label style="width:auto;" data-i18n="join.send"></label>
|
|
162
172
|
<ul>
|
|
@@ -195,10 +205,6 @@
|
|
|
195
205
|
<label for="node-input-reduceRight" style="width:70%;" data-i18n="join.reduce.right" style="margin-left:10px;"/>
|
|
196
206
|
</div>
|
|
197
207
|
</div>
|
|
198
|
-
<div class="form-row">
|
|
199
|
-
<label for="node-input-name"><i class="fa fa-tag"></i> <span data-i18n="common.label.name"></span></label>
|
|
200
|
-
<input type="text" id="node-input-name" data-i18n="[placeholder]common.label.name">
|
|
201
|
-
</div>
|
|
202
208
|
<div class="form-tips form-tips-auto hide" data-i18n="[html]join.tip"></div>
|
|
203
209
|
</script>
|
|
204
210
|
|
|
@@ -234,6 +240,7 @@
|
|
|
234
240
|
},
|
|
235
241
|
joiner: { value:"\\n"},
|
|
236
242
|
joinerType: { value:"str"},
|
|
243
|
+
useparts: { value:false },
|
|
237
244
|
accumulate: { value:"false" },
|
|
238
245
|
timeout: {value:""},
|
|
239
246
|
count: {value:""},
|
|
@@ -259,6 +266,12 @@
|
|
|
259
266
|
},
|
|
260
267
|
oneditprepare: function() {
|
|
261
268
|
var node = this;
|
|
269
|
+
$("#node-input-useparts").on("change", function(e) {
|
|
270
|
+
if (node.useparts === undefined) {
|
|
271
|
+
node.useparts = true;
|
|
272
|
+
$("#node-input-useparts").attr('checked', true);
|
|
273
|
+
}
|
|
274
|
+
});
|
|
262
275
|
|
|
263
276
|
$("#node-input-mode").on("change", function(e) {
|
|
264
277
|
var val = $(this).val();
|
|
@@ -444,6 +444,8 @@ module.exports = function(RED) {
|
|
|
444
444
|
this.count = Number(n.count || 0);
|
|
445
445
|
this.joiner = n.joiner||"";
|
|
446
446
|
this.joinerType = n.joinerType||"str";
|
|
447
|
+
if (n.useparts === undefined) { this.useparts = true; }
|
|
448
|
+
else { this.useparts = n.useparts || false; }
|
|
447
449
|
|
|
448
450
|
this.reduce = (this.mode === "reduce");
|
|
449
451
|
if (this.reduce) {
|
|
@@ -611,7 +613,7 @@ module.exports = function(RED) {
|
|
|
611
613
|
return;
|
|
612
614
|
}
|
|
613
615
|
|
|
614
|
-
if (node.mode === 'custom' && msg.hasOwnProperty('parts')) {
|
|
616
|
+
if (node.mode === 'custom' && msg.hasOwnProperty('parts') && node.useparts === false ) {
|
|
615
617
|
if (msg.parts.hasOwnProperty('parts')) {
|
|
616
618
|
msg.parts = { parts: msg.parts.parts };
|
|
617
619
|
}
|
|
@@ -20,12 +20,26 @@
|
|
|
20
20
|
<dt class="optional">delay <span class="property-type">number</span></dt>
|
|
21
21
|
<dd>Legt die Verzögerung in Millisekunden fest, die auf die Nachricht angewendet werden soll.
|
|
22
22
|
Zur Nutzung dieser Option muss <i>Verzög. mit msg.delay überschreibbar</i> aktiviert sein.</dd>
|
|
23
|
+
<dt class="optional">rate <span class="property-type">number</span></dt>
|
|
24
|
+
<dd>Setzt die Verzögerung in Millisekunden zwischen den Nachrichten. Diese Node überschreibt die
|
|
25
|
+
bestehende Verzögerung die in der Node konfiguration, wenn die empfangende Nachricht <code>msg.rate</code>
|
|
26
|
+
in Millisekunden enthält. Dies trifft nur zu, wenn in der Node konfiguriert ist, das empfangene
|
|
27
|
+
Nachrichten den konfigurierten Wert überschreiben können.</dd>
|
|
23
28
|
<dt class="optional">reset</dt>
|
|
24
29
|
<dd>Wenn bei der empfangenen Nachricht diese Eigenschaft auf einen beliebigen Wert gesetzt ist,
|
|
25
30
|
werden alle im Node gepufferten Nachrichten gelöscht.</dd>
|
|
26
31
|
<dt class="optional">flush</dt>
|
|
27
32
|
<dd>Wenn bei der empfangenen Nachricht diese Eigenschaft auf einen beliebigen Wert gesetzt ist,
|
|
28
33
|
werden alle im Node gepufferten Nachrichten sofort gesendet.</dd>
|
|
34
|
+
<dt class="optional">flush</dt>
|
|
35
|
+
<dd>Wenn bei der empfangenen Nachricht diese Eigenschaft auf einen numerischen Wert gesetzt ist,
|
|
36
|
+
wird diese Anzahl an Nachrichten sofort gesendet. Wenn ein anderer Typ gesetzt ist (z.B. Boolean),
|
|
37
|
+
werden alle in der Node gepufferten Nachrichten gesendet.</dd>
|
|
38
|
+
<dt class="optional">toFront</dt>
|
|
39
|
+
<dd>Wenn diese Eigenschaft im Ratenbegrenzungsmodus für die empfangene Nachricht auf den booleschen Wert
|
|
40
|
+
<code>true</code> gesetzt ist, Anschließend wird die Nachricht an den Anfang der Warteschlange verschoben
|
|
41
|
+
und als nächstes freigegeben. Dies kann in Kombination mit <code>msg.flush=1</code> verwendet werden, um sofort erneut zu senden.
|
|
42
|
+
</dd>
|
|
29
43
|
</dl>
|
|
30
44
|
<h3>Details</h3>
|
|
31
45
|
<p>Wenn Verzögerung als Nachrichtenaktion eingestellt ist, kann die Verzögerungszeit ein fixer Wert,
|
|
@@ -1046,6 +1046,7 @@
|
|
|
1046
1046
|
"joinedUsing": "joined using",
|
|
1047
1047
|
"send": "Send the message:",
|
|
1048
1048
|
"afterCount": "After a number of message parts",
|
|
1049
|
+
"useparts": "Use existing msg.parts property",
|
|
1049
1050
|
"count": "count",
|
|
1050
1051
|
"subsequent": "and every subsequent message.",
|
|
1051
1052
|
"afterTimeout": "After a timeout following the first message",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@node-red/nodes",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.1",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
"raw-body": "2.5.2",
|
|
44
44
|
"tough-cookie": "4.1.4",
|
|
45
45
|
"uuid": "9.0.1",
|
|
46
|
-
"ws": "7.5.
|
|
46
|
+
"ws": "7.5.10",
|
|
47
47
|
"xml2js": "0.6.2",
|
|
48
48
|
"iconv-lite": "0.6.3"
|
|
49
49
|
}
|