Hooking into Node-Red deploy

Hello,
I hope I've got the right cattegory for this.

We've got a product where we use Node-Red for programming it.
Now the storage of this device is read-only by design. So naturally when I press deploy in Node-Red it gives me an error that it can't save. This is not a really big issue: I just make it read-write temporarily and voila.

But what I would really want is some kind of way to hook into the the deploy button in some kind of way.
I'd imagine a "pre_deploy" and "post_deploy" function I could, for example, plug into settings.js. In there I could set my device read-write in the pre, and read-only in the post.

Is there a way to make this happen? I haven't really found anything yet coming close to this particular issue.

For future google-searchers: at this moment this is not possible, but a kind user on Slack pointed me towards the Storage API: https://nodered.org/docs/api/storage/

Personally I'm using this to achieve what I want.

Otherwise known as the key developer... @knolleary

2 Likes