Custom node subscribed to flow restart event

What is the current state / solution for this problem?

  • What is the recommended way to develop a node, that has dependencies?
  • Is there a (new) way since 2021 that allows to detect if a:
    • complete deploy
    • partial deploy
    • flow restart
    • node-red service restart

is happening? And affecting the node itself, or the "child-nodes" which are depending on it?

(More about it here...)