Project in Node-red for Code Nodes. Store code in files

We have a project in Node-red. We have some code nodes with a 10-30 lines of code and some nodes with hundreds of lines. Some of the nodes are hooked together so like requesting data from the database, calculating, etc.

I played a bit with NodeRed project. I was surplices that content of the code nodes are stored in the flow.json. I think it would have been very node to have a folder called code_nodes/<id>.js so it would be easier to modify the code directly. Maybe I could test this flows in some capacity too.

Maybe this exists, I just been looking the wrong direction? I could also use custom nodes but I would have liked the code to be somehow readable from the GUI as my boss would like to be able to change it without too much of a build process.

Any suggestion

Is this supposed to be in the Node-Red editor? Theoretically, you could build a VS Code plugin that works with the flow.json file (maybe such a solution already exists).

The purpose of the function node is to provide flexibility and easy access to code where needed. It wraps the code in a Node.js VM to isolate it.

Someone did create an alternate node that allows code to be loaded from files - not sure if it is being maintained.

Of course, you also have several other options.

You can use settings.js to import code which can then be accessed via global context.

In addition, as @Aaqu has said, you can create plugins that make functions available. I've moved various common functions into Editor and Runtime plugins in UIBUILDER.

I don't want to use node red editor. I want to use one locally like Zed.

How did you create the screenshot? Which tool is this

I did a bit more looking around and figured I could use the flow.json and create tool myself to extract the data.

I found a tool now which does this

A demo video

6 prmts to claude code max built me ​​a tool for editing flow json

It is also a tool to edit flow.json. I think that this is the way to go. Too bad projects in node red don't help with this (and is almost useless).