I haven't done this, but I guess you could package it as a module which can then be installed into each machine and updated via npm as usual. Put in a github repository rather than publishing to npm of course since, presumably, it will only be of use to you. Packaging a Subflow as a module : Node-RED
But reading that link I fear you are overestimating my skills.
I'm not sure what is going on with me, but I do not feel confident enough to want to go down that path. Yeah, ok, so that means what I want to do can't be done.
Andrew, have you considered moving away from subflows?
As you have multiple node-reds, you could elect one (the important one) to be a "master" (with ONE COPY of your important nodes & functions) on a regular flow TAB.
Then using HTTP or some other transport, call the remote code.
Example...
NODE-RED1 - TAB "shared functions" (Master Flows)
HTTP IN "/calculate-colour" → <some nodes> → HTTP Response
NODE-RED2
<some nodes> → HTTP Request to "/calculate-colour" → <some nodes, use result>
NODE-RED3
<some nodes> → HTTP Request to "/calculate-colour" → <some nodes, use result>
NODE-RED4
<some nodes> → HTTP Request to "/calculate-colour" → <some nodes, use result>
This way, all you code is in one place (on NODE-RED1) - no need to update subflows in multiple places.
That's true. But if there is a critical part that "must always be 'up"' then it's a viable option. Since if there is a critical element to your setup, the failure of that is more critical than some globally shared functionality.
And believe me, I am having the devil's own trying to work out where this line is....
I get that I may never REALLY NEED this stuff, but my curiosity is painful at best.
I am (just now) having a big discussion about push buttons and what they say.
Do they say/display the state or do they show what will happen when they are pressed.