mirror of
https://github.com/node-red/node-red.git
synced 2025-03-01 10:36:34 +00:00
Add plugin support to palette manager
This commit is contained in:
@@ -386,7 +386,8 @@ function getModuleInfo(module) {
|
||||
local: moduleConfigs[module].local,
|
||||
user: moduleConfigs[module].user,
|
||||
path: moduleConfigs[module].path,
|
||||
nodes: []
|
||||
nodes: [],
|
||||
plugins: []
|
||||
};
|
||||
if (moduleConfigs[module].dependencies) {
|
||||
m.dependencies = moduleConfigs[module].dependencies;
|
||||
@@ -399,6 +400,14 @@ function getModuleInfo(module) {
|
||||
nodeInfo.version = m.version;
|
||||
m.nodes.push(nodeInfo);
|
||||
}
|
||||
|
||||
let plugins = Object.values(moduleConfigs[module].plugins);
|
||||
plugins.forEach((plugin) => {
|
||||
let nodeInfo = filterNodeInfo(plugin);
|
||||
nodeInfo.version = m.version;
|
||||
m.plugins.push(nodeInfo);
|
||||
});
|
||||
|
||||
return m;
|
||||
} else {
|
||||
return null;
|
||||
|
||||
Reference in New Issue
Block a user