Add opts.includeModuleConfig to createCompleteNodeSet

This commit is contained in:
GogoVega 2024-11-01 14:23:50 +01:00
parent 1fd4fbc299
commit c7fd2e3cdf
No known key found for this signature in database
GPG Key ID: E1E048B63AC5AC2B
2 changed files with 5 additions and 2 deletions

View File

@ -1564,6 +1564,7 @@ RED.nodes = (function() {
// Create the Flow JSON for the current configuration
// opts.credentials (whether to include (known) credentials) - default: true
// opts.dimensions (whether to include node dimensions) - default: false
// opts.includeModuleConfig (whether to include modules) - default: false
function createCompleteNodeSet(opts) {
var nns = [];
var i;
@ -1595,7 +1596,9 @@ RED.nodes = (function() {
RED.nodes.eachNode(function(n) {
nns.push(convertNode(n, opts));
})
updateGlobalConfigModuleList(nns)
if (opts?.includeModuleConfig) {
updateGlobalConfigModuleList(nns);
}
return nns;
}

View File

@ -747,7 +747,7 @@ RED.clipboard = (function() {
nodes.unshift(parentNode);
nodes = RED.nodes.createExportableNodeSet(nodes, { includeModuleConfig: true });
} else if (type === 'full') {
nodes = RED.nodes.createCompleteNodeSet({ credentials: false });
nodes = RED.nodes.createCompleteNodeSet({ credentials: false, includeModuleConfig: true });
}
if (nodes !== null) {
if (format === "red-ui-clipboard-dialog-export-fmt-full") {