Commit Graph

191 Commits

Author SHA1 Message Date
Nick O'Leary 439af2a325
Fix rule focus when switch 'otherwise' rule is used
Fixes #3182
2021-10-12 17:25:13 +01:00
Nick O'Leary 4adad6e424
Merge pull request #3166 from node-red/output-discarded-rate-limit
Delay node: add option to send intermediate messages on separate output
2021-10-06 17:34:44 +01:00
Nick O'Leary 6c96cde73c
Copy previous rule type when adding rule to switch node 2021-10-05 10:34:46 +01:00
Nick O'Leary 1c18641699
Delay node: add option to send intermediate messages on separate output 2021-10-04 13:00:24 +01:00
Nick O'Leary 81a278dd8c
Merge pull request #3156 from node-red/change-clone
Add option to deep-clone properties in Change node
2021-10-04 10:54:52 +01:00
Nick O'Leary 7fffc1a36d
Merge pull request #3069 from node-red/delay-push-to-front
Add push to front of rate limit queue.
2021-09-30 10:44:14 +01:00
Nick O'Leary aa5fad6628
Add deep copy option to Change node 'set' action 2021-09-30 09:49:51 +01:00
Nick O'Leary b0f1fad4e2
Change label for 'set' change node action to make it clearer 2021-09-29 19:43:30 +01:00
Dave Conway-Jones ef1b3aa7f5
Add comment to info docs re queue depth limit setting 2021-08-18 14:05:42 +01:00
Nick O'Leary 064f3eb3bc
Fix RBE node handling of default topi property
Fixes #3087
2021-07-26 14:36:09 +01:00
Nick O'Leary 68fb5089f8
Fix msg.reset handling in Delay node
Fixes #3074
2021-07-21 11:32:45 +01:00
Nick O'Leary b2dc1d8b23
Ensure default module export is exposed in Function node 2021-07-20 14:42:43 +01:00
Dave Conway-Jones a2b95dbb39
delay node - change lifo property to toFront
add info to sidebar
add tests
2021-07-16 11:31:21 +01:00
Nick O'Leary eb3330d145
Fix vertical sizing of function node edit dialog 2021-07-16 09:44:56 +01:00
Dave Conway-Jones d820f55358
Add push to front of rate limit queue.
(moved random delay to top to group with other delay types.
Tests and docs to follow
2021-07-15 22:15:46 +01:00
Nick O'Leary 66a704af55
Fallback to 'require' if on node < 12.17 2021-07-15 15:38:07 +01:00
Nick O'Leary 2cc1973f62
Enable functionExternalModules by default 2021-07-15 10:07:52 +01:00
Nick O'Leary eb4625a0b9
Merge pull request #3064 from node-red/revert-external-modules-dir
Move externalModules back into the user dir
2021-07-15 09:56:23 +01:00
Nick O'Leary 395b499856
Fix async loading of modules in function node 2021-07-14 21:10:59 +01:00
Nick O'Leary cce6a47f11
Rework function module screen 2021-07-14 20:23:01 +01:00
Nick O'Leary 7fd17b4ec0
Add RED.import to support importing ES6 modules 2021-07-14 19:18:39 +01:00
Dave Conway-Jones 41c8ca8ab4
Delay node updates to added flush control for queuing 2021-07-08 12:13:23 +01:00
Nick O'Leary 42992c64ec
Merge branch 'pr_3026' into dev 2021-07-02 09:22:35 +01:00
Nick O'Leary 2baff243ed
Rename exec node hideWin option 2021-07-02 09:22:08 +01:00
Nick O'Leary 2cda49fc38
Reduce z-Index of Function expand buttons to prevent overlap
Part of #3019
2021-06-23 14:16:36 +01:00
Nathanaël Lécaudé 2f0631809d exec node: modify test 2021-06-16 17:09:21 -04:00
Nathanaël Lécaudé 91ab3bd972 exec node: add windowsHide option to hide windows under Windows 2021-06-16 17:00:00 -04:00
Nick O'Leary 7c02e4d66a
Merge branch 'master' into dev 2021-06-02 15:40:56 +01:00
Nick O'Leary 12698dc347
Add full ast parsing in Function node to spot node.done calls
Fixes #2998
2021-06-02 12:32:44 +01:00
Hiroyasu Nishiyama 4dbebefb45 fix handling empty rules 2021-05-23 10:01:45 +09:00
Nick O'Leary a9164e63ab
Merge branch 'dev' into pr_2971 2021-05-18 16:30:13 +01:00
Nick O'Leary 6b43a23c4b
Merge branch 'master' into dev 2021-05-14 21:18:32 +01:00
Nick O'Leary 90761fd840
Fix 'SyntaxError' in Function node when last line of on-stop is a comment 2021-05-13 17:23:25 +01:00
Nick O'Leary 71ba73b38f
Merge branch 'master' into dev 2021-05-04 11:19:05 +01:00
Steve-Mcl c475536388 provide extra libs and call to refresh 2021-04-29 18:00:23 +01:00
Steve-Mcl 5bba50f01f refactor node.libs to a function getLibsList
- preparation for monaco integration
2021-04-29 16:56:16 +01:00
Dave Conway-Jones 9ee8c1c791
Give delay node random mina nd max more space so you can see complete value 2021-04-29 10:36:13 +01:00
Nick O'Leary bbac49ff38
Ensure function expand button is above vertical scrollbar
Fixes #2955
2021-04-26 10:18:25 +01:00
Dave Conway-Jones 93971537b4
add rate option to queue and timed modes. so a simple check box instead. 2021-04-22 11:02:34 +01:00
Dave Conway-Jones 87e816a7f5
Delay node - Make msg.rate an optional override 2021-04-22 10:26:35 +01:00
Dave Conway-Jones 0f45b1da48
Try to make delay modes consistent as regards flush
behaviour is different. May cause minor breakage.
if flush arrives with payload that is now included with the flushed data so no data is lost. Previously any payload was dropped.
2021-04-22 09:43:54 +01:00
Kazuhito Yokoi a20049c82a
Delay node enhancements (#2294)
* Remove unused messages in message catalog

* Support msg.rate in delay node

* Support nodeMessageBufferMaxLength in delay node

* Add logging function for queue size

* Support msg.nodeMessageBufferMaxLength

* Revert "Support msg.nodeMessageBufferMaxLength"

This reverts commit cc72f892f7.

* Improve logging function for delay node

* Add support for Messaging API to delay node

* Add documentation about msg.rate in delay node

* Add test cases for msg.rate in delay node

Co-authored-by: Dave Conway-Jones <dceejay@users.noreply.github.com>
2021-04-22 09:01:28 +01:00
Dave Conway-Jones 73063df11b
Pull in RBE node and push out tail 2021-04-19 13:09:13 +01:00
Kazuhito Yokoi 39274b0c5d
Add Japanese translations for Node-RED v1.3.1 (#2930) 2021-04-12 14:15:07 +01:00
Nick O'Leary 142a5f7ca1
Fix change node form validation 2021-04-08 16:21:03 +01:00
Kristian Heljas 7b8ed487e9
Function node: add `node.outputCount` property to sandbox (#2918)
* Function node: add `node.outputs` property to sandbox

https://discourse.nodered.org/t/expose-configured-output-count-to-function-node-i-can-pr/43848

* style: indetation for function node sanbox code

I guess this was unintentionally unindented in d51aefa156 (diff-24cd715c3b7405ea194bfdc0dc2a350ceb2f5d18696b8163c3e40105b981a666)

* Function node: tests for accessing node properties

consistently tests that `node.id`, `node.name` and `node.outputs`
are available in `init()`, `func()` and `finalize()` methods.

* Function node: rename `node.outputs` to `node.outputCount`

https://discourse.nodered.org/t/expose-configured-output-count-to-function-node-i-can-pr/43848/9?u=kristian
2021-04-08 14:52:02 +01:00
Kazuhito Yokoi a157580b22 Add Japanese translations for Node-RED v1.3 2021-04-08 20:06:35 +09:00
Nick O'Leary e3b70b10d1
Add property validate to Change node rule set
Closes #2911
2021-04-06 17:26:06 +01:00
Nick O'Leary f0f2eefb59
Merge branch 'pr_2908' into dev 2021-03-31 23:50:30 +01:00
Nick O'Leary bdb548ffdc
Exec node: remove addpayValue and reuse addpay to track appending property 2021-03-31 23:50:00 +01:00
Nick O'Leary 8da00c0872
Fix Switch node handling of hasKey rule when property is undefined 2021-03-30 21:37:39 +01:00
Nick O'Leary 082bac8c3a
Handle invalid regex set dynamically in Switch node
Fixes #2905
2021-03-22 21:06:59 +00:00
Kazuhito Yokoi 89485971fa Use RED.util.getMessageProperty() to check message property 2021-03-22 20:48:01 +09:00
Kazuhito Yokoi cb72d5100e Remove type for typedInput in exec node 2021-03-22 20:24:12 +09:00
Kazuhito Yokoi f103533852 Support typedInput in msg.payload field of exec node 2021-03-22 16:19:55 +09:00
Hiroyasu Nishiyama 7e40cb5331 update i18n and Japanese message for nodes 2021-03-03 10:07:33 +09:00
Nick O'Leary c9c5f7f088
Fix functionExternalModules tests 2021-03-01 21:34:37 +00:00
Nick O'Leary c3adc956d7
Add functionExternalModules to settings and default to false 2021-03-01 18:24:16 +00:00
Nick O'Leary d5f4f987f2
Add 'node' object to Function close scope 2021-02-17 14:41:50 +00:00
Nick O'Leary 11475b0c38
Move function expand buttons to overlap editor and save space 2021-02-17 14:41:25 +00:00
Nick O'Leary 137fa98903
Move name field above tab bar in Function node 2021-02-17 12:04:38 +00:00
Nick O'Leary 785c349adc
Prevent function module overwriting built-in sandbox properties 2021-02-16 13:58:59 +00:00
Nick O'Leary 6336ab121e
Merge branch 'dev' into function-modules 2021-02-13 00:21:27 +00:00
Nick O'Leary a94c19a6cf
Fix up loading of freshly installed modules in Function node 2021-02-12 22:40:30 +00:00
Nick O'Leary 9c09ee3b71
Rework Function node module integration 2021-02-12 18:14:13 +00:00
Nick O'Leary 438d51d26e
Allow nested msg properties in msg/flow/global expressions (#2822)
* Allow nested msg properties in msg/flow/global expressions

* Remove typo in RED.utils

Co-authored-by: Nick O'Leary <knolleary@users.noreply.github.com>
2021-01-27 20:32:52 +00:00
Hiroyasu Nishiyama 4a1d66f210 update UI, Runtime API, metadata handling, and others 2021-01-27 22:27:54 +09:00
Nathanaël Lécaudé 2b28ae3402
Add settings.execMaxBufferSize to control buffer size of exec node (#2819)
Co-authored-by: Dave Conway-Jones <dceejay@users.noreply.github.com>
closes #2817
2021-01-14 14:38:39 +00:00
Dave Conway-Jones aa47bae2ad
Exec node - don't append msg.payload to command by default (#2818)
* exec change default to not append payload
2021-01-13 10:12:19 +00:00
Hiroyasu Nishiyama d51aefa156 initial support for npm module installation 2021-01-11 19:32:16 +09:00
Nick O'Leary f5fcf23678
Merge branch 'pr_2751' into dev 2020-12-07 13:58:53 +00:00
Nick O'Leary b80a7459cf
Merge pull request #2733 from node-red-hitachi/delay-node-mapi
Messaging API support in Delay node
2020-12-07 13:53:51 +00:00
Dave Conway-Jones 78f1cb8a66
ensure trigger timestamp option sends .now()
To close #2771
2020-12-01 23:05:22 +00:00
Nick O'Leary 6ea978d83d
Prevent needless retention of node status messages 2020-11-16 21:05:13 +00:00
Kunihiko Toumura f038069fe2 Messaging API support in Trigger node 2020-11-05 15:09:41 +09:00
Kunihiko Toumura dc1ab7e331 Add support for Messaging API to delay node 2020-10-26 16:52:18 +09:00
Nick O'Leary 2962c4372c
Support setting trigger loop interval with msg.delay 2020-09-29 17:47:09 +01:00
Nick O'Leary cf84ec78fa
Allow trigger node delay to be overridden with msg.delay 2020-09-28 21:10:23 +01:00
Nick O'Leary 4b8d07f301
Merge branch 'pr_2644' into dev 2020-09-25 17:11:39 +01:00
Nick O'Leary 2db3a4f1ef
Add unit tests for function node init code 2020-09-25 17:11:10 +01:00
Kunihiko Toumura 77bd7541ca new-style callback function (template node) 2020-07-14 19:05:41 +09:00
Kunihiko Toumura ca46bc5366 new-style callback function (range node) 2020-07-14 19:02:41 +09:00
cinhcet 0601833387 msgid added in vm to avoid unneccesary if statement 2020-07-08 19:09:07 +02:00
cinhcet 5d7a625883 expose send, status, log, warn, error, debug, trace, name, id in setup code of function node 2020-07-08 01:30:29 +02:00
Nick O'Leary 7a3ead8f3b
Merge branch 'dev' 2020-06-30 17:46:43 +01:00
Nick O'Leary 362554ad3b
Switch JSONata expr does not require msg.parts.count 2020-06-29 09:32:52 +01:00
Dave Conway-Jones 5596d2df8e
catch tiny possible escape for "\n " in exec command node label. 2020-06-22 22:41:22 +01:00
johanneskropf d9548a2891
moved check for shell 2020-06-12 17:14:11 +02:00
johanneskropf d25e027201
moved building of execOpt object to line 36 2020-06-12 17:10:31 +02:00
johanneskropf 06adf3d346
use bash as shell for exec command if on linux
This relates to:
https://github.com/node-red/node-red/issues/2604
and
https://discourse.nodered.org/t/exec-node-timeout-not-working-in-exec-mode/28040
and is a possible workaround for most issues related to kill described there.
This has only been tested on linux where this change applies so it would most definitely need more testing on windows/mac and maybe linux distributions where there is no bash(?).
2020-06-10 11:24:56 +02:00
Dave Conway-Jones cb218a57f1
Merge branch 'dev' of https://github.com/node-red/node-red into dev 2020-06-05 11:22:42 +01:00
Dave Conway-Jones ba8649117d
ensure trigger node detects changes to number of outputs 2020-06-05 11:22:38 +01:00
Nick O'Leary 20daebd965
Ignore whitespace when checking function setup/close code 2020-06-05 10:36:49 +01:00
Nick O'Leary 4b54a81dfd
Add test cases for setMessageProperty with non-object properties 2020-06-01 13:13:14 +01:00
Nick O'Leary 132254b3a5
Merge branch 'dev' into pr_2439 2020-06-01 11:56:19 +01:00
Dave Conway-Jones 8a798e620a
Ensure delay node rate limit timer is cleared on reset 2020-05-30 15:18:15 +01:00
Nick O'Leary 7969dd431f
[function] Make the function node top-level async
This allows you to use 'await' in a function node without
having to wrap it in another promise/async function.
2020-05-22 20:49:18 +01:00
Nick O'Leary 22e7ddcb1d
Merge branch 'dev' into pr_2490 2020-05-22 15:43:17 +01:00
Nick O'Leary 5d81cec00c
Merge branch 'pr_2498' into dev 2020-05-22 15:22:12 +01:00
Nick O'Leary 9512450d7c
Reduce duplicated code in Function node html 2020-05-22 14:57:28 +01:00