@gregoriusrippenstein/erlang-red-unittest 0.21.7 → 0.21.9
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/examples/catch/catch all in group except those handler elsewhere (ered).json +1 -0
- package/examples/catch/catch all in group except those handler elsewhere (nred).json +1 -0
- package/examples/debug/handle largish json files as content.json +1 -1
- package/examples/exec/handle multiple process at once (ered).json +1 -1
- package/examples/exec/support timeout specification.json +1 -0
- package/examples/exec/synchronised execution.json +1 -0
- package/examples/file in/basic functionality of being able to read a file.json +1 -1
- package/examples/file in/will accept file name from msg obj.json +1 -1
- package/examples/http/Dynamic Routing.json +1 -1
- package/examples/http/POST & GET have different endpoints.json +1 -1
- package/examples/http/dynamic redirect.json +1 -1
- package/examples/http/have params in the path.json +1 -1
- package/examples/http/http static routing.json +1 -1
- package/examples/http/multiple endpoints don't all get the request.json +1 -1
- package/examples/http/nodes should be able to handle requests.json +1 -1
- package/examples/http/post requests - json content.json +1 -1
- package/examples/http/request parses JSON conent.json +1 -1
- package/examples/http/request, ensure url and method are handled.json +1 -1
- package/examples/http/set content type.json +1 -1
- package/examples/http/support query string on get request.json +1 -1
- package/examples/json/parse example json content.json +1 -1
- package/examples/split/work with binary data as string data.json +1 -0
- package/nodes/ut-assert-debug.js +43 -83
- package/nodes/ut-config.js +5 -2
- package/package.json +1 -1
- package/examples/catch/catch all in group except those handler elsewhere.json +0 -1
- package/examples/exec/handle multiple process at once (nred).json +0 -1
- package/examples/exec/support timeout specification (ered).json +0 -1
- package/examples/exec/support timeout specification (nred).json +0 -1
- package/examples/exec/synchronised execution (ered).json +0 -1
- package/examples/exec/synchronised execution (nred).json +0 -1
- package/examples/split/work with binary data as string data (ered).json +0 -1
- package/examples/split/work with binary data as string data (nred).json +0 -1
package/nodes/ut-assert-debug.js
CHANGED
|
@@ -145,53 +145,32 @@ let createExtraCatchNode = () => {
|
|
|
145
145
|
]
|
|
146
146
|
}
|
|
147
147
|
|
|
148
|
-
let replacedPrivInFileNames = (flowdetails) => {
|
|
149
|
-
const path = require('path');
|
|
150
|
-
const runtime = require("@node-red/runtime");
|
|
151
|
-
|
|
152
|
-
let getHttpServer = (settings) => {
|
|
153
|
-
var port = settings.serverPort;
|
|
154
|
-
if (port === undefined) {
|
|
155
|
-
port = settings.uiPort;
|
|
156
|
-
}
|
|
157
|
-
|
|
158
|
-
var listenPath = 'http' + (settings.https ? 's' : '') + '://' +
|
|
159
|
-
(settings.uiHost == '::' ? 'localhost' : (settings.uiHost == '0.0.0.0' ? '127.0.0.1' : settings.uiHost)) +
|
|
160
|
-
':' + port;
|
|
161
148
|
|
|
162
|
-
|
|
149
|
+
// Groups can be used to disable a set of nodes in a test run. These groups are marked as being not
|
|
150
|
+
// for Node-RED and all nodes contained in the group are disabled before doing the test run.
|
|
151
|
+
let disableNodesNotForNodeRed = (flowdefinition) => {
|
|
152
|
+
let nonNodeRedGrps = flowdefinition.filter(
|
|
153
|
+
d => d.type == "group" && (d.env || []).filter( e => e.name =="ERED_ONLY" && (e.value == "true" || e.value == true) )[0]
|
|
154
|
+
).map(d => d.id)
|
|
155
|
+
|
|
156
|
+
if (nonNodeRedGrps.length == 0) {
|
|
157
|
+
//nothing to do
|
|
158
|
+
return flowdefinition
|
|
159
|
+
} else {
|
|
160
|
+
return flowdefinition.map( d => {
|
|
161
|
+
d.d = (d.g && nonNodeRedGrps.indexOf(d.g) > -1)
|
|
162
|
+
return d
|
|
163
|
+
})
|
|
163
164
|
}
|
|
164
|
-
|
|
165
|
-
let privDir = path.resolve(path.dirname(__filename), "..", "priv")
|
|
166
|
-
let httpServer = getHttpServer(runtime._.settings)
|
|
167
|
-
|
|
168
|
-
flowdetails.forEach( obj => {
|
|
169
|
-
if (obj.type == "inject") {
|
|
170
|
-
obj.props.forEach( prp => {
|
|
171
|
-
if (prp.v) prp.v = prp.v.replaceAll(/\${priv}/g, privDir).replaceAll(/\${host}/g, httpServer)
|
|
172
|
-
})
|
|
173
|
-
} else if (obj.type == "file in") {
|
|
174
|
-
if (obj.filenameType == "str" && obj.filename) obj.filename = obj.filename.replaceAll(/\${priv}/g, privDir)
|
|
175
|
-
} else if (obj.type == "http request") {
|
|
176
|
-
if (obj.url) obj.url = obj.url.replaceAll(/\${host}/g, httpServer)
|
|
177
|
-
} else if (obj.type == "change") {
|
|
178
|
-
obj.rules.forEach(prp => {
|
|
179
|
-
if (prp.tot == "str" && prp.to) {
|
|
180
|
-
prp.to = prp.to.replaceAll(/\${host}/g, httpServer).replaceAll(/\${priv}/g, privDir)
|
|
181
|
-
}
|
|
182
|
-
})
|
|
183
|
-
}
|
|
184
|
-
})
|
|
185
|
-
|
|
186
|
-
return flowdetails
|
|
187
165
|
}
|
|
188
166
|
|
|
167
|
+
// is an entire test for Erlang-Red == then ignore it.
|
|
189
168
|
let isErlangRedOnly = (tabDetails) => {
|
|
190
|
-
return tabDetails.env.filter(d => d.name == "ERED_ONLY")[0]?.value == "true"
|
|
169
|
+
return (tabDetails.env || []).filter(d => d.name == "ERED_ONLY")[0]?.value == "true"
|
|
191
170
|
}
|
|
192
171
|
|
|
193
172
|
let isTestPending = (tabDetails) => {
|
|
194
|
-
return tabDetails.env.filter(d => d.name == "NRED_PENDING")[0]?.value == "true"
|
|
173
|
+
return (tabDetails.env || []).filter(d => d.name == "NRED_PENDING")[0]?.value == "true"
|
|
195
174
|
}
|
|
196
175
|
|
|
197
176
|
// chunkify an array into chunks of `size` size
|
|
@@ -226,7 +205,7 @@ let respondWithCount = (res, count) => {
|
|
|
226
205
|
return null
|
|
227
206
|
}
|
|
228
207
|
|
|
229
|
-
flowDetails =
|
|
208
|
+
flowDetails = disableNodesNotForNodeRed(flowDetails)
|
|
230
209
|
|
|
231
210
|
// add an catch all and trigger a assert false if any exceptions are
|
|
232
211
|
// raised by the test - if there isn't already a catch all node.
|
|
@@ -337,53 +316,32 @@ let createExtraCatchNode = () => {
|
|
|
337
316
|
]
|
|
338
317
|
}
|
|
339
318
|
|
|
340
|
-
let replacedPrivInFileNames = (flowdetails) => {
|
|
341
|
-
const path = require('path');
|
|
342
|
-
const runtime = require("@node-red/runtime");
|
|
343
319
|
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
320
|
+
// Groups can be used to disable a set of nodes in a test run. These groups are marked as being not
|
|
321
|
+
// for Node-RED and all nodes contained in the group are disabled before doing the test run.
|
|
322
|
+
let disableNodesNotForNodeRed = (flowdefinition) => {
|
|
323
|
+
let nonNodeRedGrps = flowdefinition.filter(
|
|
324
|
+
d => d.type == "group" && (d.env || []).filter( e => e.name =="ERED_ONLY" && (e.value == "true" || e.value == true) )[0]
|
|
325
|
+
).map(d => d.id)
|
|
326
|
+
|
|
327
|
+
if (nonNodeRedGrps.length == 0) {
|
|
328
|
+
//nothing to do
|
|
329
|
+
return flowdefinition
|
|
330
|
+
} else {
|
|
331
|
+
return flowdefinition.map( d => {
|
|
332
|
+
d.d = (d.g && nonNodeRedGrps.indexOf(d.g) > -1)
|
|
333
|
+
return d
|
|
334
|
+
})
|
|
355
335
|
}
|
|
356
|
-
|
|
357
|
-
let privDir = path.resolve(path.dirname(__filename), "..", "priv")
|
|
358
|
-
let httpServer = getHttpServer(runtime._.settings)
|
|
359
|
-
|
|
360
|
-
flowdetails.forEach( obj => {
|
|
361
|
-
if (obj.type == "inject") {
|
|
362
|
-
obj.props.forEach( prp => {
|
|
363
|
-
if (prp.v) prp.v = prp.v.replaceAll(/\${priv}/g, privDir).replaceAll(/\${host}/g, httpServer)
|
|
364
|
-
})
|
|
365
|
-
} else if (obj.type == "file in") {
|
|
366
|
-
if (obj.filenameType == "str" && obj.filename) obj.filename = obj.filename.replaceAll(/\${priv}/g, privDir)
|
|
367
|
-
} else if (obj.type == "http request") {
|
|
368
|
-
if (obj.url) obj.url = obj.url.replaceAll(/\${host}/g, httpServer)
|
|
369
|
-
} else if (obj.type == "change") {
|
|
370
|
-
obj.rules.forEach(prp => {
|
|
371
|
-
if (prp.tot == "str" && prp.to) {
|
|
372
|
-
prp.to = prp.to.replaceAll(/\${host}/g, httpServer).replaceAll(/\${priv}/g, privDir)
|
|
373
|
-
}
|
|
374
|
-
})
|
|
375
|
-
}
|
|
376
|
-
})
|
|
377
|
-
|
|
378
|
-
return flowdetails
|
|
379
336
|
}
|
|
380
337
|
|
|
338
|
+
// is an entire test for Erlang-Red == then ignore it.
|
|
381
339
|
let isErlangRedOnly = (tabDetails) => {
|
|
382
|
-
return tabDetails.env.filter(d => d.name == "ERED_ONLY")[0]?.value == "true"
|
|
340
|
+
return (tabDetails.env || []).filter(d => d.name == "ERED_ONLY")[0]?.value == "true"
|
|
383
341
|
}
|
|
384
342
|
|
|
385
343
|
let isTestPending = (tabDetails) => {
|
|
386
|
-
return tabDetails.env.filter(d => d.name == "NRED_PENDING")[0]?.value == "true"
|
|
344
|
+
return (tabDetails.env || []).filter(d => d.name == "NRED_PENDING")[0]?.value == "true"
|
|
387
345
|
}
|
|
388
346
|
|
|
389
347
|
// chunkify an array into chunks of `size` size
|
|
@@ -473,11 +431,11 @@ let respondWithCount = (res, count) => {
|
|
|
473
431
|
}
|
|
474
432
|
|
|
475
433
|
// compute any timeout that is defined for the flow test
|
|
476
|
-
tabDetails.env.filter(d => d.name == "NRED_TIMEOUT").forEach( d => {
|
|
434
|
+
(tabDetails.env || []).filter(d => d.name == "NRED_TIMEOUT").forEach( d => {
|
|
477
435
|
timeoutValues.push(parseInt(d.value) * 1000)
|
|
478
436
|
})
|
|
479
437
|
|
|
480
|
-
flowDetails =
|
|
438
|
+
flowDetails = disableNodesNotForNodeRed(flowDetails)
|
|
481
439
|
|
|
482
440
|
// add an catch all and trigger a assert false if any exceptions are
|
|
483
441
|
// raised by the test - if there isn't already a catch all node.
|
|
@@ -552,6 +510,8 @@ let respondWithCount = (res, count) => {
|
|
|
552
510
|
Promise.all([removeFlow(0)]).then(() => {
|
|
553
511
|
RED.log.debug("unittest: removed all flows")
|
|
554
512
|
runTestsForFileNames(fileIdx+1)
|
|
513
|
+
}).catch(e => {
|
|
514
|
+
/* bravely go there, where no AI would - ignore the exception */
|
|
555
515
|
})
|
|
556
516
|
}, Math.max(...(timeoutValues.concat([5000]))))
|
|
557
517
|
})
|
|
@@ -601,11 +561,11 @@ let respondWithCount = (res, count) => {
|
|
|
601
561
|
}
|
|
602
562
|
|
|
603
563
|
// compute any timeout that is defined for the flow test
|
|
604
|
-
tabDetails.env.filter(d => d.name == "NRED_TIMEOUT").forEach(d => {
|
|
564
|
+
(tabDetails.env || []).filter(d => d.name == "NRED_TIMEOUT").forEach(d => {
|
|
605
565
|
timeoutValues.push(parseInt(d.value) * 1000)
|
|
606
566
|
})
|
|
607
567
|
|
|
608
|
-
flowDetails =
|
|
568
|
+
flowDetails = disableNodesNotForNodeRed(flowDetails)
|
|
609
569
|
|
|
610
570
|
// add an catch all and trigger a assert false if any exceptions are
|
|
611
571
|
// raised by the test - if there isn't already a catch all node.
|
package/nodes/ut-config.js
CHANGED
|
@@ -15,6 +15,9 @@ module.exports = function(RED) {
|
|
|
15
15
|
const path = require('path');
|
|
16
16
|
const runtime = require("@node-red/runtime");
|
|
17
17
|
|
|
18
|
+
// this is taken from the start script for Node-RED
|
|
19
|
+
// https://github.com/node-red/node-red/blob/e4f7fc516cd8da1b4b4d571169cf6937b500bb30/packages/node_modules/node-red/red.js#L466-L481
|
|
20
|
+
// and is used as basis for the getHttpServer function below.
|
|
18
21
|
let getListenPath = (settings) => {
|
|
19
22
|
var port = settings.serverPort;
|
|
20
23
|
if (port === undefined) {
|
|
@@ -50,8 +53,8 @@ module.exports = function(RED) {
|
|
|
50
53
|
try {
|
|
51
54
|
msg.utcfg = {
|
|
52
55
|
"priv": path.resolve(path.dirname(__filename), "..", "priv"),
|
|
53
|
-
|
|
54
|
-
"
|
|
56
|
+
"host": getHttpServer(runtime._.settings),
|
|
57
|
+
"isNodeRed": true
|
|
55
58
|
}
|
|
56
59
|
send(msg);
|
|
57
60
|
done();
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
[{"id":"eb24c92ce5621760","type":"tab","label":"[catch] catch all in group except those handler elsewhere","disabled":false,"info":"","env":[{"name":"NODE_RED_ONLY","value":"true","type":"bool"}]},{"id":"5ea70f167d125afc","type":"group","z":"eb24c92ce5621760","style":{"color":"#a4a4a4","fill":"none","fill-opacity":"1","label":true,"label-position":"nw","stroke":"#999999","stroke-opacity":"1"},"nodes":["a703aaba38a383b9","3bf38b22cdb0fa95","98023732b523561f","e846b7ff5f8f635f","b4a34cf82fc8630d","0fb3435653486c14"],"x":347.85716247558594,"y":426.8214364051819,"w":956.1428375244141,"h":271.46425199508667},{"id":"a703aaba38a383b9","type":"function","z":"eb24c92ce5621760","g":"5ea70f167d125afc","name":"function 22","func":"node.wrnd(\"dd\")\nreturn msg;","outputs":1,"timeout":0,"noerr":0,"initialize":"","finalize":"","libs":[],"x":952.4285736083984,"y":657.2856884002686,"wires":[[]]},{"id":"3bf38b22cdb0fa95","type":"inject","z":"eb24c92ce5621760","g":"5ea70f167d125afc","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":545.2857666015625,"y":657.2856884002686,"wires":[["a703aaba38a383b9"]]},{"id":"98023732b523561f","type":"catch","z":"eb24c92ce5621760","g":"5ea70f167d125afc","name":"","scope":["a703aaba38a383b9"],"uncaught":false,"x":952.4285736083984,"y":604.4285936355591,"wires":[["0fb3435653486c14"]]},{"id":"e846b7ff5f8f635f","type":"catch","z":"eb24c92ce5621760","g":"5ea70f167d125afc","name":"catch all in group except those already dealt with","scope":"group","uncaught":true,"x":553.8571624755859,"y":467.8214364051819,"wires":[["b4a34cf82fc8630d"]]},{"id":"b4a34cf82fc8630d","type":"ut-assert-failure","z":"eb24c92ce5621760","g":"5ea70f167d125afc","name":"","x":936,"y":467.8214364051819,"wires":[]},{"id":"0fb3435653486c14","type":"ut-assert-success","z":"eb24c92ce5621760","g":"5ea70f167d125afc","name":"","msglimit":"==","count":1,"x":1188,"y":467.8214364051819,"wires":[]}]
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
[{"id":"66d522e80730b8d3","type":"tab","label":"[exec] handle multiple process at once (nred)","disabled":false,"info":"this flow demonstrates the ability of the exec node to manage multiple running processes at one time.\n\nexternal processes of `sleep 1000` are started one after another and then are terminated by a separate kill message.\n\nNote: if the timeout is set on the exec node, it will also kill each process individually.","env":[{"name":"NRED_TIMEOUT","value":"15","type":"num"},{"name":"NODE_RED_ONLY","value":"true","type":"bool"}]},{"id":"6f7d310d4b7d4e4a","type":"exec","z":"66d522e80730b8d3","command":"sleep 1000","addpay":"","append":"","useSpawn":"true","timer":"","winHide":false,"oldrc":false,"name":"","x":674,"y":446,"wires":[[],[],["fed2ad2e2ab76c4f"]]},{"id":"80105065b359cff4","type":"inject","z":"66d522e80730b8d3","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":122,"y":152,"wires":[["6f7d310d4b7d4e4a","668cf1bc6d294235","e2ced983ac96bb50","75c3e419cb3fc39c","d928eea624d077fd","b79423133776a2bf","09fc3516b0627ad7"]]},{"id":"e59eae323be9ce44","type":"status","z":"66d522e80730b8d3","name":"","scope":["6f7d310d4b7d4e4a"],"x":676.0000610351562,"y":525.75,"wires":[["dcd73932adca443f"]]},{"id":"dcbb0e596b459bf6","type":"change","z":"66d522e80730b8d3","name":"","rules":[{"p":"pid","pt":"msg","t":"set","to":"$split($$.status.text, \":\")","tot":"jsonata"},{"p":"pid","pt":"msg","t":"set","to":"$$.pid[1]","tot":"jsonata"},{"p":"kill","pt":"msg","t":"set","to":"SIGTERM","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":298,"y":728,"wires":[["86df1075b0dd4406"]]},{"id":"86df1075b0dd4406","type":"delay","z":"66d522e80730b8d3","name":"","pauseType":"delay","timeout":"3","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"allowrate":false,"outputs":1,"x":488,"y":599,"wires":[["6f7d310d4b7d4e4a"]]},{"id":"668cf1bc6d294235","type":"delay","z":"66d522e80730b8d3","name":"","pauseType":"delay","timeout":"1","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"allowrate":false,"outputs":1,"x":488,"y":152,"wires":[["6f7d310d4b7d4e4a"]]},{"id":"e2ced983ac96bb50","type":"delay","z":"66d522e80730b8d3","name":"","pauseType":"delay","timeout":"2","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"allowrate":false,"outputs":1,"x":488,"y":212.5,"wires":[["6f7d310d4b7d4e4a"]]},{"id":"75c3e419cb3fc39c","type":"delay","z":"66d522e80730b8d3","name":"","pauseType":"delay","timeout":"3","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"allowrate":false,"outputs":1,"x":488,"y":273,"wires":[["6f7d310d4b7d4e4a"]]},{"id":"d928eea624d077fd","type":"delay","z":"66d522e80730b8d3","name":"","pauseType":"delay","timeout":"5","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"allowrate":false,"outputs":1,"x":310,"y":385,"wires":[["6f7d310d4b7d4e4a"]]},{"id":"b79423133776a2bf","type":"delay","z":"66d522e80730b8d3","name":"","pauseType":"delay","timeout":"6","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"allowrate":false,"outputs":1,"x":310,"y":446,"wires":[["6f7d310d4b7d4e4a"]]},{"id":"dcd73932adca443f","type":"switch","z":"66d522e80730b8d3","name":"","property":"status.text","propertyType":"msg","rules":[{"t":"neq","v":"Killed","vt":"str"}],"checkall":"true","repair":false,"outputs":1,"x":839,"y":657,"wires":[["dcbb0e596b459bf6","a0eb8b36714d8715"]]},{"id":"09fc3516b0627ad7","type":"delay","z":"66d522e80730b8d3","name":"","pauseType":"delay","timeout":"4","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"allowrate":false,"outputs":1,"x":310,"y":324,"wires":[["6f7d310d4b7d4e4a"]]},{"id":"a0eb8b36714d8715","type":"ut-assert-success","z":"66d522e80730b8d3","name":"","msglimit":">=","count":"7","x":1046,"y":657,"wires":[]},{"id":"fed2ad2e2ab76c4f","type":"ut-assert-success","z":"66d522e80730b8d3","name":"","count":"7","x":1046,"y":459.75,"wires":[]}]
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
[{"id":"9746601768c3b3b6","type":"tab","label":"[exec] support timeout specification (ered)","disabled":false,"info":"the timeout on an exec node be used to stop daemon from running longer than a test case.\n\nIf the message isn't sent by the time the test case is killed, then the test case fails.","env":[{"name":"ERED_TIMEOUT","value":"7","type":"num"},{"name":"ERED_ONLY","value":"true","type":"bool"}]},{"id":"e5752543f573c690","type":"inject","z":"9746601768c3b3b6","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":271,"y":54,"wires":[["bc45ad0c3084eab2"]]},{"id":"bc45ad0c3084eab2","type":"exec","z":"9746601768c3b3b6","command":"sleep 30","addpay":"","append":"","useSpawn":"true","timer":"5","winHide":false,"oldrc":false,"name":"sleep 30 with a timeout of 5 seconds","x":547,"y":364,"wires":[[],[],["0f7ce66536de607a"]]},{"id":"0f7ce66536de607a","type":"ut-assert-values","z":"9746601768c3b3b6","name":"","ignore_failure_if_succeed":false,"rules":[{"t":"eql","p":"payload.code","pt":"msg","to":"15","tot":"num"}],"x":891.888916015625,"y":234.3333740234375,"wires":[[]]}]
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
[{"id":"569ff27317bcc1fd","type":"tab","label":"[exec] support timeout specification (nred)","disabled":false,"info":"the timeout on an exec node be used to stop daemon from running longer than a test case.\n\nIf the message isn't sent by the time the test case is killed, then the test case fails.","env":[{"name":"NRED_TIMEOUT","value":"7","type":"num"},{"name":"NODE_RED_ONLY","value":"true","type":"bool"}]},{"id":"2160c8af613065c2","type":"inject","z":"569ff27317bcc1fd","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":271,"y":54,"wires":[["fe3cdd7fcb5ddaa1"]]},{"id":"fe3cdd7fcb5ddaa1","type":"exec","z":"569ff27317bcc1fd","command":"sleep 30","addpay":"","append":"","useSpawn":"true","timer":"5","winHide":false,"oldrc":false,"name":"sleep 30 with a timeout of 5 seconds","x":547,"y":364,"wires":[[],[],["2f2326fa74d28e95"]]},{"id":"2f2326fa74d28e95","type":"ut-assert-values","z":"569ff27317bcc1fd","name":"","ignore_failure_if_succeed":false,"rules":[{"t":"eql","p":"payload.signal","pt":"msg","to":"SIGTERM","tot":"str"}],"x":879.444580078125,"y":256.888916015625,"wires":[[]]}]
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
[{"id":"c0b1cf6656eac77f","type":"tab","label":"[exec] synchronised execution (ered)","disabled":false,"info":"","env":[{"name":"ERED_TIMEOUT","value":"6","type":"num"},{"name":"ERED_ONLY","value":"true","type":"bool"}]},{"id":"2b4d9ee88eff618b","type":"group","z":"c0b1cf6656eac77f","name":"timeout that triggers after command completion","style":{"label":true},"nodes":["2f9029a33f3688a8","34ecd7044cb107c0","8a49eb330319b071","8e975e9b613ad34b","e59e3353ab52eb1a"],"x":94.75,"y":905,"w":991.25,"h":194},{"id":"b0a28454b231f29c","type":"group","z":"c0b1cf6656eac77f","name":"no time out normal completion","style":{"label":true},"nodes":["34584b1493b966d1","394f2a8574bcae04","1f7e2413bdf97ba6","0eb5e6fe3bbe4a54","8a95a8bbe8ec1711"],"x":181.75,"y":655,"w":889.25,"h":201},{"id":"fb93cca833bb943c","type":"group","z":"c0b1cf6656eac77f","name":"time out kills process, but message queue is flooded","style":{"label":true},"nodes":["3d0fc6b73f545bf1","c149f1afcce104c0","6b2197ef37baacf9","1071c9eb5be5f316","fdd9833ca1fa4e19","e0eb63220a075c77"],"x":240.75,"y":402,"w":789.25,"h":209.88885498046875},{"id":"af09a3c02e5dc779","type":"group","z":"c0b1cf6656eac77f","name":"timout but no flooding of message queue","style":{"label":true},"nodes":["3e608f637baf6d92","6ac13f394822cbdb","2e6aeadb4ff3c225","4a8c801fc0aeda71","d7bce7594d752e58"],"x":287,"y":134,"w":820,"h":232},{"id":"3e608f637baf6d92","type":"exec","z":"c0b1cf6656eac77f","g":"af09a3c02e5dc779","command":"echo dasdasd ; sleep 10","addpay":"","append":"","useSpawn":"false","timer":"4","winHide":false,"oldrc":false,"name":"","x":618.25,"y":313,"wires":[["2e6aeadb4ff3c225"],["4a8c801fc0aeda71"],["d7bce7594d752e58"]]},{"id":"6ac13f394822cbdb","type":"inject","z":"c0b1cf6656eac77f","g":"af09a3c02e5dc779","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":393,"y":314,"wires":[["3e608f637baf6d92"]]},{"id":"3d0fc6b73f545bf1","type":"exec","z":"c0b1cf6656eac77f","g":"fb93cca833bb943c","command":"yes hello","addpay":"","append":"","useSpawn":"false","timer":"2","winHide":false,"oldrc":false,"name":"","x":536,"y":526.5,"wires":[["6b2197ef37baacf9"],["e0eb63220a075c77"],["fdd9833ca1fa4e19"]]},{"id":"c149f1afcce104c0","type":"inject","z":"c0b1cf6656eac77f","g":"fb93cca833bb943c","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":346.75,"y":509.5,"wires":[["3d0fc6b73f545bf1"]]},{"id":"34584b1493b966d1","type":"exec","z":"c0b1cf6656eac77f","g":"b0a28454b231f29c","command":"echo \"Stdout\" ; echo \"stderr\" >&2 ; echo \"done\"","addpay":"","append":"","useSpawn":"false","timer":"","winHide":false,"oldrc":false,"name":"","x":445,"y":801,"wires":[["1f7e2413bdf97ba6"],["8a95a8bbe8ec1711"],["0eb5e6fe3bbe4a54"]]},{"id":"394f2a8574bcae04","type":"inject","z":"c0b1cf6656eac77f","g":"b0a28454b231f29c","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":287.75,"y":709,"wires":[["34584b1493b966d1"]]},{"id":"2f9029a33f3688a8","type":"exec","z":"c0b1cf6656eac77f","g":"2b4d9ee88eff618b","command":"echo \"timeout\" ; echo \"fires later\" >&2 ; echo \"done\"","addpay":"","append":"","useSpawn":"false","timer":"3","winHide":false,"oldrc":false,"name":"","x":459,"y":1045,"wires":[["8e975e9b613ad34b"],["e59e3353ab52eb1a"],["8a49eb330319b071"]]},{"id":"34ecd7044cb107c0","type":"inject","z":"c0b1cf6656eac77f","g":"2b4d9ee88eff618b","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":200.75,"y":982,"wires":[["2f9029a33f3688a8"]]},{"id":"6b2197ef37baacf9","type":"switch","z":"c0b1cf6656eac77f","g":"fb93cca833bb943c","name":"","property":"$length($$.payload)","propertyType":"jsonata","rules":[{"t":"gt","v":"1000","vt":"num"}],"checkall":"true","repair":false,"outputs":1,"x":730,"y":479,"wires":[["1071c9eb5be5f316"]]},{"id":"1071c9eb5be5f316","type":"ut-assert-success","z":"c0b1cf6656eac77f","g":"fb93cca833bb943c","name":"","count":1,"x":913,"y":443,"wires":[]},{"id":"2e6aeadb4ff3c225","type":"ut-assert-values","z":"c0b1cf6656eac77f","g":"af09a3c02e5dc779","name":"","ignore_failure_if_succeed":false,"rules":[{"t":"eql","p":"payload","pt":"msg","to":"dasdasd\\n","tot":"str"}],"x":943,"y":175,"wires":[[]]},{"id":"4a8c801fc0aeda71","type":"ut-assert-values","z":"c0b1cf6656eac77f","g":"af09a3c02e5dc779","name":"","ignore_failure_if_succeed":false,"rules":[{"p":"payload","pt":"msg","t":"eql","to":"","tot":"str"}],"x":945.2221603393555,"y":227.7777910232544,"wires":[[]]},{"id":"d7bce7594d752e58","type":"ut-assert-values","z":"c0b1cf6656eac77f","g":"af09a3c02e5dc779","name":"","ignore_failure_if_succeed":false,"rules":[{"t":"eql","p":"payload.code","pt":"msg","to":"15","tot":"num"}],"x":951,"y":325,"wires":[[]]},{"id":"1f7e2413bdf97ba6","type":"ut-assert-values","z":"c0b1cf6656eac77f","g":"b0a28454b231f29c","name":"","ignore_failure_if_succeed":false,"rules":[{"p":"payload","pt":"msg","t":"eql","to":"Stdout\\ndone\\n","tot":"str"}],"x":821,"y":696,"wires":[[]]},{"id":"0eb5e6fe3bbe4a54","type":"ut-assert-values","z":"c0b1cf6656eac77f","g":"b0a28454b231f29c","name":"","ignore_failure_if_succeed":false,"rules":[{"p":"payload.code","pt":"msg","t":"eql","to":"0","tot":"num"}],"x":925,"y":815,"wires":[[]]},{"id":"8a49eb330319b071","type":"ut-assert-values","z":"c0b1cf6656eac77f","g":"2b4d9ee88eff618b","name":"","ignore_failure_if_succeed":false,"rules":[{"p":"payload.code","pt":"msg","t":"eql","to":"0","tot":"num"}],"x":940,"y":1058,"wires":[[]]},{"id":"8a95a8bbe8ec1711","type":"ut-assert-values","z":"c0b1cf6656eac77f","g":"b0a28454b231f29c","name":"","ignore_failure_if_succeed":false,"rules":[{"p":"payload","pt":"msg","t":"eql","to":"stderr\\n","tot":"str"}],"x":863,"y":755.5,"wires":[[]]},{"id":"8e975e9b613ad34b","type":"ut-assert-values","z":"c0b1cf6656eac77f","g":"2b4d9ee88eff618b","name":"","ignore_failure_if_succeed":false,"rules":[{"p":"payload","pt":"msg","t":"eql","to":"timeout\\ndone\\n","tot":"str"}],"x":832.5,"y":946,"wires":[[]]},{"id":"e59e3353ab52eb1a","type":"ut-assert-values","z":"c0b1cf6656eac77f","g":"2b4d9ee88eff618b","name":"","ignore_failure_if_succeed":false,"rules":[{"p":"payload","pt":"msg","t":"eql","to":"fires later\\n","tot":"str"}],"x":876.25,"y":1002,"wires":[[]]},{"id":"fdd9833ca1fa4e19","type":"ut-assert-values","z":"c0b1cf6656eac77f","g":"fb93cca833bb943c","name":"","ignore_failure_if_succeed":false,"rules":[{"t":"eql","p":"payload.code","pt":"msg","to":"15","tot":"num"}],"x":868.77783203125,"y":570.8888549804688,"wires":[[]]},{"id":"e0eb63220a075c77","type":"ut-assert-success","z":"c0b1cf6656eac77f","g":"fb93cca833bb943c","name":"","msglimit":"==","count":1,"x":914,"y":505,"wires":[]}]
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
[{"id":"fde1d30a505103d6","type":"tab","label":"[exec] synchronised execution (nred)","disabled":false,"info":"This can generate an error message in the console:\n\n```\nerror:RangeError [ERR_CHILD_PROCESS_STDIO_MAXBUFFER]: stdout maxBuffer length exceeded\n```\n\nFor the test the is using `yes hello` - that will create much data.","env":[{"name":"NRED_TIMEOUT","value":"6","type":"num"},{"name":"NODE_RED_ONLY","value":"true","type":"bool"}]},{"id":"a86d14490187ca88","type":"group","z":"fde1d30a505103d6","name":"timeout that triggers after command completion","style":{"label":true},"nodes":["37d5a57aeb3453dd","191b0c041640805e","b54aa3c66c542976","c530420eb67bbb8a","c0d2695b9e2c54d5"],"x":94.75,"y":905,"w":991.25,"h":194},{"id":"5159616a40a5571f","type":"group","z":"fde1d30a505103d6","name":"no time out normal completion","style":{"label":true},"nodes":["58ccb98aa260245f","238537a3a70a5f95","6f3032facfa11b9b","709ac2f03cdc827b","b832ce7f95242497"],"x":181.75,"y":655,"w":889.25,"h":201},{"id":"9a5fcbdcfe3734c2","type":"group","z":"fde1d30a505103d6","name":"time out kills process, but message queue is flooded","style":{"label":true},"nodes":["bf5a3a8c06bf9dcc","6bfe373ba9db26f0","0e10377378a5136f","1742127e22cd9f32","11678b485405eb6e","70c5807ff7837267"],"x":240.75,"y":402,"w":894.138916015625,"h":194.37530612945557},{"id":"9ce6160770d3fa75","type":"group","z":"fde1d30a505103d6","name":"timout but no flooding of message queue","style":{"label":true},"nodes":["5dad697ff1602bb7","4276847ee0f00aeb","95756e7a496ee852","064ff5a2fb85bdb4","85271d6787e3b0e8"],"x":287,"y":134,"w":821.0448837280273,"h":227.5},{"id":"5dad697ff1602bb7","type":"exec","z":"fde1d30a505103d6","g":"9ce6160770d3fa75","command":"echo dasdasd ; sleep 10","addpay":"","append":"","useSpawn":"false","timer":"4","winHide":false,"oldrc":false,"name":"","x":618.25,"y":313,"wires":[["95756e7a496ee852"],["85271d6787e3b0e8"],["064ff5a2fb85bdb4"]]},{"id":"4276847ee0f00aeb","type":"inject","z":"fde1d30a505103d6","g":"9ce6160770d3fa75","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":393,"y":314,"wires":[["5dad697ff1602bb7"]]},{"id":"bf5a3a8c06bf9dcc","type":"exec","z":"fde1d30a505103d6","g":"9a5fcbdcfe3734c2","command":"yes hello","addpay":"","append":"","useSpawn":"false","timer":"2","winHide":false,"oldrc":false,"name":"","x":536,"y":526.5,"wires":[["0e10377378a5136f"],["70c5807ff7837267"],["11678b485405eb6e"]]},{"id":"6bfe373ba9db26f0","type":"inject","z":"fde1d30a505103d6","g":"9a5fcbdcfe3734c2","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":346.75,"y":509.5,"wires":[["bf5a3a8c06bf9dcc"]]},{"id":"58ccb98aa260245f","type":"exec","z":"fde1d30a505103d6","g":"5159616a40a5571f","command":"echo \"Stdout\" ; echo \"stderr\" >&2 ; echo \"done\"","addpay":"","append":"","useSpawn":"false","timer":"","winHide":false,"oldrc":false,"name":"","x":445,"y":801,"wires":[["6f3032facfa11b9b"],["b832ce7f95242497"],["709ac2f03cdc827b"]]},{"id":"238537a3a70a5f95","type":"inject","z":"fde1d30a505103d6","g":"5159616a40a5571f","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":287.75,"y":709,"wires":[["58ccb98aa260245f"]]},{"id":"37d5a57aeb3453dd","type":"exec","z":"fde1d30a505103d6","g":"a86d14490187ca88","command":"echo \"timeout\" ; echo \"fires later\" >&2 ; echo \"done\"","addpay":"","append":"","useSpawn":"false","timer":"3","winHide":false,"oldrc":false,"name":"","x":459,"y":1045,"wires":[["c530420eb67bbb8a"],["c0d2695b9e2c54d5"],["b54aa3c66c542976"]]},{"id":"191b0c041640805e","type":"inject","z":"fde1d30a505103d6","g":"a86d14490187ca88","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":200.75,"y":982,"wires":[["37d5a57aeb3453dd"]]},{"id":"0e10377378a5136f","type":"switch","z":"fde1d30a505103d6","g":"9a5fcbdcfe3734c2","name":"","property":"$length($$.payload)","propertyType":"jsonata","rules":[{"t":"gt","v":"1000","vt":"num"}],"checkall":"true","repair":false,"outputs":1,"x":730,"y":479,"wires":[["1742127e22cd9f32"]]},{"id":"1742127e22cd9f32","type":"ut-assert-success","z":"fde1d30a505103d6","g":"9a5fcbdcfe3734c2","name":"","count":1,"x":913,"y":443,"wires":[]},{"id":"95756e7a496ee852","type":"ut-assert-values","z":"fde1d30a505103d6","g":"9ce6160770d3fa75","name":"","ignore_failure_if_succeed":false,"rules":[{"t":"eql","p":"payload","pt":"msg","to":"dasdasd\\n","tot":"str"}],"x":943,"y":175,"wires":[[]]},{"id":"6f3032facfa11b9b","type":"ut-assert-values","z":"fde1d30a505103d6","g":"5159616a40a5571f","name":"","ignore_failure_if_succeed":false,"rules":[{"p":"payload","pt":"msg","t":"eql","to":"Stdout\\ndone\\n","tot":"str"}],"x":821,"y":696,"wires":[[]]},{"id":"709ac2f03cdc827b","type":"ut-assert-values","z":"fde1d30a505103d6","g":"5159616a40a5571f","name":"","ignore_failure_if_succeed":false,"rules":[{"p":"payload.code","pt":"msg","t":"eql","to":"0","tot":"num"}],"x":925,"y":815,"wires":[[]]},{"id":"b54aa3c66c542976","type":"ut-assert-values","z":"fde1d30a505103d6","g":"a86d14490187ca88","name":"","ignore_failure_if_succeed":false,"rules":[{"p":"payload.code","pt":"msg","t":"eql","to":"0","tot":"num"}],"x":940,"y":1058,"wires":[[]]},{"id":"b832ce7f95242497","type":"ut-assert-values","z":"fde1d30a505103d6","g":"5159616a40a5571f","name":"","ignore_failure_if_succeed":false,"rules":[{"p":"payload","pt":"msg","t":"eql","to":"stderr\\n","tot":"str"}],"x":863,"y":755.5,"wires":[[]]},{"id":"c530420eb67bbb8a","type":"ut-assert-values","z":"fde1d30a505103d6","g":"a86d14490187ca88","name":"","ignore_failure_if_succeed":false,"rules":[{"p":"payload","pt":"msg","t":"eql","to":"timeout\\ndone\\n","tot":"str"}],"x":832.5,"y":946,"wires":[[]]},{"id":"c0d2695b9e2c54d5","type":"ut-assert-values","z":"fde1d30a505103d6","g":"a86d14490187ca88","name":"","ignore_failure_if_succeed":false,"rules":[{"p":"payload","pt":"msg","t":"eql","to":"fires later\\n","tot":"str"}],"x":876.25,"y":1002,"wires":[[]]},{"id":"064ff5a2fb85bdb4","type":"ut-assert-values","z":"fde1d30a505103d6","g":"9ce6160770d3fa75","name":"","ignore_failure_if_succeed":false,"rules":[{"t":"eql","p":"payload.signal","pt":"msg","to":"SIGTERM","tot":"str"}],"x":972.0448837280273,"y":304.8383197784424,"wires":[[]]},{"id":"11678b485405eb6e","type":"ut-assert-values","z":"fde1d30a505103d6","g":"9a5fcbdcfe3734c2","name":"","ignore_failure_if_succeed":false,"rules":[{"t":"eql","p":"payload.code","pt":"msg","to":"ERR_CHILD_PROCESS_STDIO_MAXBUFFER","tot":"str"}],"x":877.1994781494141,"y":555.3753061294556,"wires":[[]]},{"id":"70c5807ff7837267","type":"ut-assert-failure","z":"fde1d30a505103d6","g":"9a5fcbdcfe3734c2","name":"","x":1038.888916015625,"y":503.3333435058594,"wires":[]},{"id":"85271d6787e3b0e8","type":"ut-assert-failure","z":"fde1d30a505103d6","g":"9ce6160770d3fa75","name":"","x":951.1871070861816,"y":237.5085163116455,"wires":[]}]
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
[{"id":"61142eb3e4e54eab","type":"tab","label":"[split] work with binary data as string data (ered)","disabled":false,"info":"## Split\n\nSplit node worked with lists but now also binary data as string.\n\n\n## Erlang-Only \n\nBecause the split accepts an \"array fixed value\" of zero, something that Node-RED does not accept.\n\nThe why the stuff is put together differs also.\n\n## Erlang versions\n\nDifferent versions have different outputs fo the a34790bc9d32225c test case, so setting to pending until a solution is found for dealing with different OTP/Erlang versions.","env":[{"name":"ERED_ONLY","value":"true","type":"bool"},{"name":"ERED_PENDING","value":"true","type":"bool"}]},{"id":"c82f30a56d1a660d","type":"group","z":"61142eb3e4e54eab","name":"tab","style":{"label":true},"nodes":["aa8d437abfb102c3","259c2437c90e9894","79ccf35012bdfc48","2f145767746512d9","426375d5dbd09656"],"x":130,"y":317,"w":307,"h":441},{"id":"56099cc47438c1d8","type":"group","z":"61142eb3e4e54eab","name":"newline","style":{"label":true},"nodes":["f2c8927f6a9bf66d","6ad09bfad9be496a","1e7f8905177e4a51","bbef69370ffefa7d","4870251dc3920d6e"],"x":524,"y":351,"w":278,"h":387},{"id":"1d7b7265606317fe","type":"group","z":"61142eb3e4e54eab","name":"slash-b","style":{"label":true},"nodes":["fba392e7c499fa3a","5e76c482452552f9","8dd97d7c8a42d1a3","7060502f466f75fb","27496740b8f0d9b5","f66b5dfddb7e379e"],"x":887,"y":358,"w":454,"h":386},{"id":"2a69db355acc618b","type":"group","z":"61142eb3e4e54eab","name":"carriage return","style":{"label":true},"nodes":["df4aea65eb3bb87d","0d40744d4078e8e6","15754917e9e1ddf4","c53c69fb06bf9bf2","280dd2d3b3482854","a34790bc9d32225c"],"x":1404,"y":366.5,"w":454,"h":386},{"id":"aa8d437abfb102c3","type":"split","z":"61142eb3e4e54eab","g":"c82f30a56d1a660d","name":"","splt":"\\t","spltType":"str","arraySplt":"0","arraySpltType":"len","stream":false,"addname":"","property":"payload","x":244,"y":447,"wires":[["79ccf35012bdfc48","2f145767746512d9"]]},{"id":"259c2437c90e9894","type":"template","z":"61142eb3e4e54eab","g":"c82f30a56d1a660d","name":"","field":"payload","fieldType":"msg","format":"handlebars","syntax":"plain","template":"\t\ta n\nb b\t\t\nc \t \nd \n\te \n \n\t\td\t\td\t\td\n\t\t","output":"str","x":230,"y":358,"wires":[["aa8d437abfb102c3"]]},{"id":"0c59f7a51d772382","type":"inject","z":"61142eb3e4e54eab","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":899,"y":141,"wires":[["259c2437c90e9894","f2c8927f6a9bf66d","fba392e7c499fa3a","df4aea65eb3bb87d"]]},{"id":"f2c8927f6a9bf66d","type":"template","z":"61142eb3e4e54eab","g":"56099cc47438c1d8","name":"","field":"payload","fieldType":"msg","format":"handlebars","syntax":"mustache","template":"one\ntwo\nthree\nfour\nfive\nsix\n","output":"str","x":610,"y":392,"wires":[["6ad09bfad9be496a"]]},{"id":"6ad09bfad9be496a","type":"split","z":"61142eb3e4e54eab","g":"56099cc47438c1d8","name":"","splt":"\\n","spltType":"str","arraySplt":"0","arraySpltType":"len","stream":false,"addname":"","property":"payload","x":628,"y":475,"wires":[["1e7f8905177e4a51","bbef69370ffefa7d"]]},{"id":"1e7f8905177e4a51","type":"join","z":"61142eb3e4e54eab","g":"56099cc47438c1d8","name":"","mode":"auto","build":"object","property":"payload","propertyType":"msg","key":"topic","joiner":"\\n","joinerType":"str","useparts":false,"accumulate":"false","timeout":"","count":"","reduceRight":false,"x":655,"y":637,"wires":[["4870251dc3920d6e"]]},{"id":"bbef69370ffefa7d","type":"ut-assert-success","z":"61142eb3e4e54eab","g":"56099cc47438c1d8","name":"","count":"7","x":686,"y":581,"wires":[]},{"id":"4870251dc3920d6e","type":"ut-assert-values","z":"61142eb3e4e54eab","g":"56099cc47438c1d8","name":"","ignore_failure_if_succeed":false,"rules":[{"t":"eql","p":"payload","pt":"msg","to":"[\"one\", \"two\", \"three\", \"four\", \"five\", \"six\", \"\"]","tot":"json"}],"x":677,"y":697,"wires":[[]]},{"id":"79ccf35012bdfc48","type":"join","z":"61142eb3e4e54eab","g":"c82f30a56d1a660d","name":"","mode":"auto","build":"object","property":"payload","propertyType":"msg","key":"topic","joiner":"\\n","joinerType":"str","useparts":false,"accumulate":"false","timeout":"","count":"","reduceRight":false,"x":262,"y":640,"wires":[["426375d5dbd09656"]]},{"id":"2f145767746512d9","type":"ut-assert-success","z":"61142eb3e4e54eab","g":"c82f30a56d1a660d","name":"","count":"15","x":321,"y":574,"wires":[]},{"id":"426375d5dbd09656","type":"ut-assert-values","z":"61142eb3e4e54eab","g":"c82f30a56d1a660d","name":"","ignore_failure_if_succeed":false,"rules":[{"t":"eql","p":"payload","pt":"msg","to":"[\"\",\"\",\"a n\\nb b\",\"\",\"\\nc \",\" \\nd \\n\",\"e \\n \\n\",\"\",\"d\",\"\",\"d\",\"\",\"d\\n\",\"\",\"\"]","tot":"json"}],"x":246,"y":717,"wires":[[]]},{"id":"fba392e7c499fa3a","type":"template","z":"61142eb3e4e54eab","g":"1d7b7265606317fe","name":"","field":"payload","fieldType":"msg","format":"handlebars","syntax":"mustache","template":"one\\btwo\\bthree\\bfour\\bfive\\bsix\n","output":"str","x":1023,"y":399,"wires":[["5e76c482452552f9"]]},{"id":"5e76c482452552f9","type":"change","z":"61142eb3e4e54eab","g":"1d7b7265606317fe","name":"replace slash-slash-b with slash-b","rules":[{"t":"set","p":"payload","pt":"msg","to":"$replace($$.payload, \"\\\\b\",\"\\b\")","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":1053,"y":454,"wires":[["8dd97d7c8a42d1a3"]]},{"id":"8dd97d7c8a42d1a3","type":"split","z":"61142eb3e4e54eab","g":"1d7b7265606317fe","name":"","splt":"\\b","spltType":"str","arraySplt":"0","arraySpltType":"len","stream":false,"addname":"","property":"payload","x":1023,"y":533,"wires":[["7060502f466f75fb","27496740b8f0d9b5"]]},{"id":"7060502f466f75fb","type":"ut-assert-success","z":"61142eb3e4e54eab","g":"1d7b7265606317fe","name":"","count":"6","x":1225,"y":605,"wires":[]},{"id":"27496740b8f0d9b5","type":"join","z":"61142eb3e4e54eab","g":"1d7b7265606317fe","name":"","mode":"auto","build":"object","property":"payload","propertyType":"msg","key":"topic","joiner":"\\n","joinerType":"str","useparts":false,"accumulate":"false","timeout":"","count":"","reduceRight":false,"x":1017,"y":618,"wires":[["f66b5dfddb7e379e"]]},{"id":"f66b5dfddb7e379e","type":"ut-assert-values","z":"61142eb3e4e54eab","g":"1d7b7265606317fe","name":"","ignore_failure_if_succeed":false,"rules":[{"t":"eql","p":"payload","pt":"msg","to":"[\"one\",\"two\",\"three\",\"four\",\"five\",\"six\\n\"]","tot":"json"}],"x":1018,"y":703,"wires":[[]]},{"id":"df4aea65eb3bb87d","type":"template","z":"61142eb3e4e54eab","g":"2a69db355acc618b","name":"","field":"payload","fieldType":"msg","format":"handlebars","syntax":"mustache","template":"one\\rtwo\\rthree\\rfour\\rfive\\rsix","output":"str","x":1540,"y":407.5,"wires":[["0d40744d4078e8e6"]]},{"id":"0d40744d4078e8e6","type":"change","z":"61142eb3e4e54eab","g":"2a69db355acc618b","name":"carriage return","rules":[{"t":"set","p":"payload","pt":"msg","to":"$replace($$.payload, \"\\\\r\",\"\\r\")","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":1510,"y":462.5,"wires":[["15754917e9e1ddf4"]]},{"id":"15754917e9e1ddf4","type":"split","z":"61142eb3e4e54eab","g":"2a69db355acc618b","name":"","splt":"\\r","spltType":"str","arraySplt":"0","arraySpltType":"len","stream":false,"addname":"","property":"payload","x":1540,"y":541.5,"wires":[["c53c69fb06bf9bf2","280dd2d3b3482854"]]},{"id":"c53c69fb06bf9bf2","type":"ut-assert-success","z":"61142eb3e4e54eab","g":"2a69db355acc618b","name":"","count":"6","x":1742,"y":613.5,"wires":[]},{"id":"280dd2d3b3482854","type":"join","z":"61142eb3e4e54eab","g":"2a69db355acc618b","name":"","mode":"auto","build":"object","property":"payload","propertyType":"msg","key":"topic","joiner":"\\n","joinerType":"str","useparts":false,"accumulate":"false","timeout":"","count":"","reduceRight":false,"x":1534,"y":626.5,"wires":[["a34790bc9d32225c"]]},{"id":"a34790bc9d32225c","type":"ut-assert-values","z":"61142eb3e4e54eab","g":"2a69db355acc618b","name":"","ignore_failure_if_succeed":false,"rules":[{"t":"eql","p":"payload","pt":"msg","to":"[\"one\",\"two\",\"three\",\"four\",\"five\",\"six\"]","tot":"json"}],"x":1535,"y":711.5,"wires":[[]]}]
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
[{"id":"4230cfd4c21318a5","type":"tab","label":"[split] work with binary data as string data (nred)","disabled":false,"info":"## Split\n\nSplit node worked with lists but now also binary data as string.","env":[{"name":"NODE_RED_ONLY","value":"true","type":"bool"}]},{"id":"6e2bbdf52b55d248","type":"group","z":"4230cfd4c21318a5","name":"tab","style":{"label":true},"nodes":["f3e9b99534abdaba","b94a5012e923bc05","87e64c6518497ee5","d0d31a11e41af27f","2ef249327246a765"],"x":130,"y":317,"w":307,"h":441},{"id":"7b85709fb08516bf","type":"group","z":"4230cfd4c21318a5","name":"newline","style":{"label":true},"nodes":["b129ce48a73de207","58669e63657b7e51","b809df2b8ce61a1f","1e4bc1ce57d62063","d899fb02b4edd622"],"x":524,"y":351,"w":278,"h":387},{"id":"370f9510573c64b4","type":"group","z":"4230cfd4c21318a5","name":"slash-b","style":{"label":true},"nodes":["693a622727e1d4fe","74258593e923ed09","4f9bf5a8b4f877cf","3e7b9a951d74ebff","36288be2f9d17cfd","7af4e62513af2972"],"x":887,"y":358,"w":454,"h":386},{"id":"6975f75691123931","type":"group","z":"4230cfd4c21318a5","name":"carriage return","style":{"label":true},"nodes":["28dcb3e10b92d6eb","9cdf171bd16d363c","71c9729954dfa068","2b917526a55cd39b","2991f7415f8c5223","94315fd38eb3f077"],"x":1404,"y":366.5,"w":454,"h":386},{"id":"f3e9b99534abdaba","type":"split","z":"4230cfd4c21318a5","g":"6e2bbdf52b55d248","name":"","splt":"\\t","spltType":"str","arraySplt":"1","arraySpltType":"len","stream":false,"addname":"","property":"payload","x":244,"y":447,"wires":[["87e64c6518497ee5","d0d31a11e41af27f"]]},{"id":"b94a5012e923bc05","type":"template","z":"4230cfd4c21318a5","g":"6e2bbdf52b55d248","name":"","field":"payload","fieldType":"msg","format":"handlebars","syntax":"plain","template":"\t\ta n\nb b\t\t\nc \t \nd \n\te \n \n\t\td\t\td\t\td\n\t\t","output":"str","x":230,"y":358,"wires":[["f3e9b99534abdaba"]]},{"id":"b371b72078e1d88b","type":"inject","z":"4230cfd4c21318a5","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":899,"y":141,"wires":[["b94a5012e923bc05","b129ce48a73de207","693a622727e1d4fe","28dcb3e10b92d6eb"]]},{"id":"b129ce48a73de207","type":"template","z":"4230cfd4c21318a5","g":"7b85709fb08516bf","name":"","field":"payload","fieldType":"msg","format":"handlebars","syntax":"mustache","template":"one\ntwo\nthree\nfour\nfive\nsix\n","output":"str","x":610,"y":392,"wires":[["58669e63657b7e51"]]},{"id":"58669e63657b7e51","type":"split","z":"4230cfd4c21318a5","g":"7b85709fb08516bf","name":"","splt":"\\n","spltType":"str","arraySplt":"1","arraySpltType":"len","stream":false,"addname":"","property":"payload","x":628,"y":475,"wires":[["b809df2b8ce61a1f","1e4bc1ce57d62063"]]},{"id":"b809df2b8ce61a1f","type":"join","z":"4230cfd4c21318a5","g":"7b85709fb08516bf","name":"","mode":"auto","build":"object","property":"payload","propertyType":"msg","key":"topic","joiner":"\\n","joinerType":"str","useparts":false,"accumulate":"false","timeout":"","count":"","reduceRight":false,"x":655,"y":637,"wires":[["d899fb02b4edd622"]]},{"id":"1e4bc1ce57d62063","type":"ut-assert-success","z":"4230cfd4c21318a5","g":"7b85709fb08516bf","name":"","count":"7","x":686,"y":581,"wires":[]},{"id":"d899fb02b4edd622","type":"ut-assert-values","z":"4230cfd4c21318a5","g":"7b85709fb08516bf","name":"","ignore_failure_if_succeed":false,"rules":[{"t":"eql","p":"payload","pt":"msg","to":"one\\ntwo\\nthree\\nfour\\nfive\\nsix\\n","tot":"str"}],"x":677,"y":697,"wires":[[]]},{"id":"87e64c6518497ee5","type":"join","z":"4230cfd4c21318a5","g":"6e2bbdf52b55d248","name":"","mode":"custom","build":"array","property":"payload","propertyType":"msg","key":"topic","joiner":"\\n","joinerType":"str","useparts":true,"accumulate":false,"timeout":"","count":"","reduceRight":false,"reduceExp":"","reduceInit":"","reduceInitType":"","reduceFixup":"","x":262,"y":636,"wires":[["2ef249327246a765"]]},{"id":"d0d31a11e41af27f","type":"ut-assert-success","z":"4230cfd4c21318a5","g":"6e2bbdf52b55d248","name":"","count":"15","x":321,"y":574,"wires":[]},{"id":"2ef249327246a765","type":"ut-assert-values","z":"4230cfd4c21318a5","g":"6e2bbdf52b55d248","name":"","ignore_failure_if_succeed":false,"rules":[{"t":"eql","p":"payload","pt":"msg","to":"[\"\",\"\",\"a n\\nb b\",\"\",\"\\nc \",\" \\nd \\n\",\"e \\n \\n\",\"\",\"d\",\"\",\"d\",\"\",\"d\\n\",\"\",\"\"]","tot":"json"}],"x":246,"y":717,"wires":[[]]},{"id":"693a622727e1d4fe","type":"template","z":"4230cfd4c21318a5","g":"370f9510573c64b4","name":"","field":"payload","fieldType":"msg","format":"handlebars","syntax":"mustache","template":"one\\btwo\\bthree\\bfour\\bfive\\bsix\n","output":"str","x":1023,"y":399,"wires":[["74258593e923ed09","4f9bf5a8b4f877cf"]]},{"id":"74258593e923ed09","type":"change","z":"4230cfd4c21318a5","d":true,"g":"370f9510573c64b4","name":"replace slash-slash-b with slash-b","rules":[{"t":"set","p":"payload","pt":"msg","to":"$replace($$.payload, \"\\\\b\",\"\\b\")","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":1053,"y":454,"wires":[["4f9bf5a8b4f877cf"]]},{"id":"4f9bf5a8b4f877cf","type":"split","z":"4230cfd4c21318a5","g":"370f9510573c64b4","name":"","splt":"\\b","spltType":"str","arraySplt":"1","arraySpltType":"len","stream":false,"addname":"","property":"payload","x":1023,"y":533,"wires":[["3e7b9a951d74ebff","36288be2f9d17cfd"]]},{"id":"3e7b9a951d74ebff","type":"ut-assert-success","z":"4230cfd4c21318a5","g":"370f9510573c64b4","name":"","count":"6","x":1225,"y":605,"wires":[]},{"id":"36288be2f9d17cfd","type":"join","z":"4230cfd4c21318a5","g":"370f9510573c64b4","name":"","mode":"auto","build":"object","property":"payload","propertyType":"msg","key":"topic","joiner":"\\n","joinerType":"str","useparts":false,"accumulate":"false","timeout":"","count":"","reduceRight":false,"x":1017,"y":618,"wires":[["7af4e62513af2972"]]},{"id":"7af4e62513af2972","type":"ut-assert-values","z":"4230cfd4c21318a5","g":"370f9510573c64b4","name":"","ignore_failure_if_succeed":false,"rules":[{"t":"eql","p":"payload","pt":"msg","to":"one\\btwo\\bthree\\bfour\\bfive\\bsix\\n","tot":"str"}],"x":1018,"y":703,"wires":[[]]},{"id":"28dcb3e10b92d6eb","type":"template","z":"4230cfd4c21318a5","g":"6975f75691123931","name":"","field":"payload","fieldType":"msg","format":"handlebars","syntax":"mustache","template":"one\\rtwo\\rthree\\rfour\\rfive\\rsix","output":"str","x":1540,"y":407.5,"wires":[["9cdf171bd16d363c"]]},{"id":"9cdf171bd16d363c","type":"change","z":"4230cfd4c21318a5","g":"6975f75691123931","name":"carriage return","rules":[{"t":"set","p":"payload","pt":"msg","to":"$replace($$.payload, \"\\\\r\",\"\\r\")","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":1510,"y":462.5,"wires":[["71c9729954dfa068"]]},{"id":"71c9729954dfa068","type":"split","z":"4230cfd4c21318a5","g":"6975f75691123931","name":"","splt":"\\r","spltType":"str","arraySplt":"1","arraySpltType":"len","stream":false,"addname":"","property":"payload","x":1540,"y":541.5,"wires":[["2b917526a55cd39b","2991f7415f8c5223"]]},{"id":"2b917526a55cd39b","type":"ut-assert-success","z":"4230cfd4c21318a5","g":"6975f75691123931","name":"","count":"6","x":1742,"y":613.5,"wires":[]},{"id":"2991f7415f8c5223","type":"join","z":"4230cfd4c21318a5","g":"6975f75691123931","name":"","mode":"auto","build":"object","property":"payload","propertyType":"msg","key":"topic","joiner":"\\n","joinerType":"str","useparts":false,"accumulate":true,"timeout":"","count":"","reduceRight":false,"reduceExp":"","reduceInit":"","reduceInitType":"","reduceFixup":"","x":1534,"y":626.5,"wires":[["94315fd38eb3f077"]]},{"id":"94315fd38eb3f077","type":"ut-assert-values","z":"4230cfd4c21318a5","g":"6975f75691123931","name":"","ignore_failure_if_succeed":false,"rules":[{"t":"eql","p":"payload","pt":"msg","to":"one\\rtwo\\rthree\\rfour\\rfive\\rsix","tot":"str"}],"x":1535,"y":711.5,"wires":[[]]}]
|