Hi Node-RED team, good afternoon, I have a question related to the lifecycle of nodes in the context of developing custom nodes with external services.
When you delete a node, the flow is as follows:
- The oneditdelete event is fired on the node configuration running in the editor (frontend).
- If you then deploy that flow, the 'close' event is triggered in the node backend, and you can be sure that this node is going to be deleted.
This first flow is okay for me.
In contrast, when you disable and then delete a node, the following occurs:
- The close event is triggered in the node backend after the deploy event.
- After that, if you delete the node, the oneditdelete event is fired on the node configuration running on the editor (frontend) but if you then perform a new deploy of the flow, you won't be notified of the removal again. I think that, since the removed flag indicates both disabling and removal, it should be fired twice anyway.
Therefore, it would be useful to have the close handler called when a disabled node is deleted.
What's your opinion on this?
Thanks