Commit Graph

14 Commits

Author SHA1 Message Date
Nick O'Leary aa0225f59f
Apply suggestions from code review 2023-06-21 14:27:32 +01:00
Kilian Hertel 2253417459 adding timeout attribute to function node
- [x] New feature (non-breaking change which adds functionality)

Discussion here:
https://discourse.nodered.org/t/function-node-doesnt-have-timeout-feature/78483

## Proposed changes

Adding a timeout attribute to the function node, so an endless funciton doesnt break the node red server.

## Checklist

- [x] I have read the [contribution guidelines](https://github.com/node-red/node-red/blob/master/CONTRIBUTING.md)
- [x] For non-bugfix PRs, I have discussed this change on the forum/slack team.
- [x] I have run `grunt` to verify the unit tests pass
- [x] I have added suitable unit tests to cover the new/changed functionality
2023-05-22 10:16:37 +02:00
Nick O'Leary be9f9e7b0c
Change default functionExternalModules test 2021-07-15 10:13:21 +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
Nick O'Leary 0566a2d9b1
Fix function node tests use of RED.settings 2021-03-02 00:12:41 +00:00
Nick O'Leary c9c5f7f088
Fix functionExternalModules tests 2021-03-01 21:34:37 +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 9d34abf603
Function node: test modules identified in libs are added to sandbox 2021-02-15 20:59:37 +00:00
Nick O'Leary 23f0cd3a26
Bump for 1.2.8 2021-02-02 13:11:33 +00:00
Nick O'Leary 2db3a4f1ef
Add unit tests for function node init code 2020-09-25 17:11:10 +01:00
Hiroyasu Nishiyama 5b197adf33 update according to comments 2020-05-11 14:37:14 +09:00
Hiroyasu Nishiyama 84d2b8ad6d add support of initialization & finalization to function node 2020-03-07 01:55:45 +09:00
Nick O'Leary f0839571d0
Clone the first message passed to node.send in Function
Also introduces an optional second arg to node.send in the Function
node that can disable that cloning
2019-09-12 22:09:35 +01:00
Nick O'Leary da6db24f9e
Reorganise nodes into new categories 2019-08-21 14:23:23 +01:00