Steveorevo / node-maker

A set of subflows that can be used to quickly create a new Node-RED node, its property panels, and initial behavior.
GNU Lesser General Public License v2.1
21 stars 4 forks source link

Avoid `node-red-` package from being created #9

Closed gorenje closed 12 months ago

gorenje commented 12 months ago

Hi There!

First thing I did was to create a flow without a node name. Inject then caused a package to be created by the name of node-red-.

I put in a fix into the start-node subflow (in the function node):

msg.node_name = env.get('node_name');

/* crash and burn if name not defined */
if (!msg.node_name || msg.node_name=="") {
    node.error(("node name not given"), msg);
    return
}

msg.node_version = env.get('node_version');
msg.node_description = env.get('node_description');
...

Great idea, btw - strangely I also started working on the similar idea but without the designing the UI components. I've taken a slightly different approach by representing an entire node package in Node-RED as nodes.

Steveorevo commented 12 months ago

Excellent, I've incorporated your suggestion to appear in next release.