When multiple people work on a NodeRED project, maintaining flows.js, even with the projects feature is a headache, at least for my team.
So I was thinking if the persistence location would be a directory of Json files, one per tab/flow, things would be easier. Including to see when/who changed a flow.
Is there a better way or is this planned?
If not I’d give it a shot and report back on success
Short answer - I don't know as I haven't really thought about it....
Is this a storage plugin ? - which 100% of your team then have to use. (no mix and match).
but I would say naming of files ? Is this just for files ? (eg on cloud we use database not files).
I would prototype it as storage plugin to see how well I can get it to work
it would then require all team members to use that. which shouldn’t be too big an issue since they most likely will use the same repo for all of NodeRED
later: consider merging it into the standard
getting started: on save the storage api gets the “whole beauty” of the Json structure. When the “chop it up” flag is set (to be decided if that flag is in config or the existence of file/dir) the flow is broken into pieces: tabs, subflows, config nodes and saved to files if the existing file content hasn’t changed (that step might be skipped since git is pretty good at ignoring non-changes)
on load check for the existence of individual flows, merge them and hand them over to the UI