I am currently trying to port my flow into an executable using electron-node-red: https://github.com/dceejay/electron-node-red.
I am compiling/building for a windows x64 system using electron packager within the mentioned repository and I have a http request node in the flow that uses basic authentication.
I have followed the following guide: https://nodered.org/docs/creating-nodes/credentials
The credentials can be added, and is stored within the application itself. This works across 3 different computers, both Windows 10 and Windows 7.
The main issue is that when Node-Red begins the service: the flow is loaded, the dashboard is initialised, but the credentials are not automatically converted into a _cred.json for usage in the flow.
Instead, it is required for me to open the editor within the application itself to merely shift/change a minor thing(such as node position), click deploy, and the _cred.json will be generated. Without doing this, I currently am unable to pass basic authentication from startup without touching the editor and clicking deploy.
Now, I know that it is possible to use an API call to post the flow to Node-RED in main.js(electron-node-red).
This is very much doable by doing a POST request using the flowfile directory.
My main question: Is it possible in the future to make this much more simpler? Or is there a simpler way that I currently do not know of? My concern is that moving to different computers may create complications in terms of directories and operating systems. This can definitely be worked around, but it would be much nicer to add this improvement for user benefit.
An example of an improvement would be perhaps a RED.redeploy() function in js, though I know the current deploy.js also uses a POST request.