ozomer / node-red-contrib-unsafe-function Goto Github PK
View Code? Open in Web Editor NEWThe fast and furious version of function nodes
The fast and furious version of function nodes
Hello !
Would you be interested in a PR that would add external file support ? (being able to load a js file from disk instead of executing the code in the node's editor window) If so would you be willing to discuss implementation details ?
Thanks !
Hi @ozomer , I was inspired by your project and I started adding new features. What I have done so far:
UI
TABS
The new node interface is composed as follows:
FUNCTION TAB
The function tab works the same way as the original one, with the ability to format the code (using js-beautify).
PACKAGES TAB
With this tab you can install and uninstall NPM modules.
MODULES TAB
This tab lists all the JavaScript modules created by the user. You can create, edit, format code, and delete a module directly from the web interface.
editor
Toolbar options: back, format code, save module, delete module
What do you think about it?
This may be "as designed" but it was a bit confusing. And I run Node-red in a bit different manner, so this could be my fault.
I run my node-red admin tool not as a global install but from a directory where I control the arguments to the config folder.
example
mkdir ~/NodeRed yarn init -y . yarn add node-red yarn add node-red-admin mkdir config
I run node red once, stop it set the password, and restart.
yarn node-red -u config -v
~/NodeRed <- parent project that hosts all my node-red junk
~/NodeRed/config <- node red flow project as edited by node-red
I i go into the NodeRed/config directory and install a package - (I installed https://www.npmjs.com/package/rss-node-mongo)
and then created an unsafe function to import it.
I could not import the module from within that unsafe function
but when I added it to the ~/NodeRed project it worked fine.
I've never deployed my node-red projects as they are all for personal use or home projects or whatever and I prefer to keep the admin tool running for my needs. BUT ... I think unsafe function would break in this context, not being able to find the module, and would need the module installed as a global.
Thoughts?
Under node-red 0.20 env.get doesn't seem to work, not sure if it's supported yet though ?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.