Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

hanc2006
Copy link

see issue #10

@natcl
Copy link
Collaborator

natcl commented Apr 13, 2021

Thanks will try this asap !

@natcl
Copy link
Collaborator

natcl commented Apr 13, 2021

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

@hanc2006
Copy link
Author

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
Copy link
Collaborator

natcl commented Apr 13, 2021

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
Copy link
Author

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

@natcl
Copy link
Collaborator

natcl commented Apr 13, 2021

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants