I was wondering if there is any way to add an existing node red node into a custom node. An example would be something like the tcp in node or the debug node. These nodes could be "wired" internally inside of the custom node. For context I am working on a node to connect cameras to a robot for position and ai reading. The robot already has a custom add in developed. I know that it is best to have a custom node that has a very specific function and one function only but for the sake of simplicity for a user it would be best to incorporate a few nodes into this custom node.
I have tried using new RED.nodes.createNode(debugNode)
and similar extensions of that class. Documentation for these classes is extremely hard to find.
After some unorthodox methods of trying to do this the way that ended up working was to convert the flow to raw json and build a JavaScript function that could interpret that json. Hope this helps anyone doing something similar.