mirror of
https://github.com/node-red/node-red.git
synced 2023-10-10 13:36:53 +02:00
Get node-red core nodes back to the top of the list
This commit is contained in:
parent
e6ec59092c
commit
f96ce2fd83
@ -305,13 +305,15 @@ function getNodeFiles(disableNodePathScan) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
var nodeList = {};
|
|
||||||
var coreNodeEntry = {
|
var coreNodeEntry = {
|
||||||
name: "node-red",
|
name: "node-red",
|
||||||
version: settings.version,
|
version: settings.version,
|
||||||
nodes: {},
|
nodes: {},
|
||||||
icons: iconList
|
icons: iconList
|
||||||
}
|
}
|
||||||
|
var nodeList = {
|
||||||
|
"node-red": coreNodeEntry
|
||||||
|
};
|
||||||
nodeFiles.forEach(function(node) {
|
nodeFiles.forEach(function(node) {
|
||||||
coreNodeEntry.nodes[node.name] = node;
|
coreNodeEntry.nodes[node.name] = node;
|
||||||
});
|
});
|
||||||
@ -370,11 +372,10 @@ function getNodeFiles(disableNodePathScan) {
|
|||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
});
|
});
|
||||||
nodeList = convertModuleFileListToObject(moduleFiles);
|
nodeList = convertModuleFileListToObject(moduleFiles, nodeList);
|
||||||
} else {
|
} else {
|
||||||
// console.log("node path scan disabled");
|
// console.log("node path scan disabled");
|
||||||
}
|
}
|
||||||
nodeList["node-red"] = coreNodeEntry;
|
|
||||||
return nodeList;
|
return nodeList;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -392,8 +393,8 @@ function getModuleFiles(module) {
|
|||||||
return convertModuleFileListToObject(moduleFiles);
|
return convertModuleFileListToObject(moduleFiles);
|
||||||
}
|
}
|
||||||
|
|
||||||
function convertModuleFileListToObject(moduleFiles) {
|
function convertModuleFileListToObject(moduleFiles,seedObject) {
|
||||||
const nodeList = {};
|
const nodeList = seedObject || {};
|
||||||
moduleFiles.forEach(function(moduleFile) {
|
moduleFiles.forEach(function(moduleFile) {
|
||||||
|
|
||||||
var nodeModuleFiles = getModuleNodeFiles(moduleFile);
|
var nodeModuleFiles = getModuleNodeFiles(moduleFile);
|
||||||
|
Loading…
Reference in New Issue
Block a user