ozomer / node-red-contrib-unsafe-function

The fast and furious version of function nodes
1 stars 5 forks source link

node-red-contrib-unsafe-function enhancement #11

Open hanc2006 opened 3 years ago

hanc2006 commented 3 years ago

see issue #10

natcl commented 3 years ago

Thanks will try this asap !

natcl commented 3 years ago

Quick question, do you know if this will break older flows that use the older version of the node ?

hanc2006 commented 3 years ago

The sandbox function code works the same as the original 'node-red-contrib-unsafe-function', so the compatibility is the same. The only difference is that the done() callback function for asynchronous node is not called automatically. The node.done(), or done() must be called explicit. I also added API access from the function using RED.api (https://nodered.org/docs/api/modules/v/1.0/@node-red_runtime.html), as already present for RED.util.

natcl commented 3 years ago

I just tested and noticed the modules folder get creates in the node_modules/node-red-contrib-unsafe-function folder. Shouldn't it be create in the user directory instead ?

hanc2006 commented 3 years ago

For the moment it is the standard behavior, but it is still to be clarified. In the user folder it makes more sense

natcl commented 3 years ago

I think it would make more sense to have it in the userDir this way the user can version it with GIT and it will be compatible with the projects feature.