Merge branch 'master' into 5264-fix-sfpath-envvar

This commit is contained in:
Nick O'Leary
2025-10-10 11:20:06 +01:00
committed by GitHub
4 changed files with 14 additions and 3 deletions

View File

@@ -1627,7 +1627,9 @@ RED.nodes = (function() {
if (node.type === "group") {
nns = nns.concat(createExportableNodeSet(node.nodes, { exportedIds, exportedSubflows, exportedConfigNodes }));
}
} else {
} else if (!node.direction) {
// node.direction indicates its a virtual subflow node (input/output/status) that cannot be
// exported so should be skipped over.
var convertedSubflow = convertSubflow(node, { credentials: false });
nns.push(convertedSubflow);
}

View File

@@ -1418,7 +1418,12 @@ RED.view = (function() {
if (quickAddLink?.virtualLink) {
context.virtualLink = true;
}
context.flow = RED.nodes.createExportableNodeSet(RED.nodes.getAllFlowNodes(quickAddLink.node))
if (quickAddLink.node?.type === 'subflow') {
// This is a subflow 'virtual' port node.
context.flow = []
} else {
context.flow = RED.nodes.createExportableNodeSet(RED.nodes.getAllFlowNodes(quickAddLink.node))
}
}
// console.log(context)

View File

@@ -118,7 +118,7 @@ module.exports = function(RED) {
var exp = RED.util.prepareJSONataExpression(p.v, node);
RED.util.evaluateJSONataExpression(exp, msg, (err, newValue) => {
if (err) {
errors.push(err.toString())
errors.push(RED._("inject.errors.invalid-expr",{error:err.message}))
} else {
RED.util.setMessageProperty(msg,property,newValue,true);
}

View File

@@ -171,6 +171,10 @@ async function checkFlowDependencies(flowConfig) {
const checkedSubflows = {};
while (nodes.length > 0) {
let n = nodes.shift();
if (n.d) {
// Ignore disabled nodes
continue
}
if (subflowTypes[n.type] && !checkedSubflows[n.type]) {
checkedSubflows[n.type] = true;
nodes = nodes.concat(subflowTypes[n.type].flow)