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 = {
|
||||
name: "node-red",
|
||||
version: settings.version,
|
||||
nodes: {},
|
||||
icons: iconList
|
||||
}
|
||||
var nodeList = {
|
||||
"node-red": coreNodeEntry
|
||||
};
|
||||
nodeFiles.forEach(function(node) {
|
||||
coreNodeEntry.nodes[node.name] = node;
|
||||
});
|
||||
@ -370,11 +372,10 @@ function getNodeFiles(disableNodePathScan) {
|
||||
}
|
||||
return true;
|
||||
});
|
||||
nodeList = convertModuleFileListToObject(moduleFiles);
|
||||
nodeList = convertModuleFileListToObject(moduleFiles, nodeList);
|
||||
} else {
|
||||
// console.log("node path scan disabled");
|
||||
}
|
||||
nodeList["node-red"] = coreNodeEntry;
|
||||
return nodeList;
|
||||
}
|
||||
|
||||
@ -392,8 +393,8 @@ function getModuleFiles(module) {
|
||||
return convertModuleFileListToObject(moduleFiles);
|
||||
}
|
||||
|
||||
function convertModuleFileListToObject(moduleFiles) {
|
||||
const nodeList = {};
|
||||
function convertModuleFileListToObject(moduleFiles,seedObject) {
|
||||
const nodeList = seedObject || {};
|
||||
moduleFiles.forEach(function(moduleFile) {
|
||||
|
||||
var nodeModuleFiles = getModuleNodeFiles(moduleFile);
|
||||
|
Loading…
Reference in New Issue
Block a user