Skip to content

Commit

Permalink
Include module property in plugin metadata
Browse files Browse the repository at this point in the history
  • Loading branch information
knolleary committed Mar 21, 2024
1 parent 4cc1a5d commit 2531a52
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 33 deletions.
3 changes: 2 additions & 1 deletion packages/node_modules/@node-red/registry/lib/registry.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,8 @@ function filterNodeInfo(n) {
r.plugins = n.plugins.map(p => {
return {
id: p.id,
type: p.type
type: p.type,
module: p.module
}
});
}
Expand Down
33 changes: 1 addition & 32 deletions test/unit/@node-red/registry/lib/plugins_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -115,38 +115,7 @@ test-module-config`)

let pluginList = plugins.getPluginList();
JSON.stringify(pluginList).should.eql(JSON.stringify(
[
{
"id": "test-module/test-set",
"enabled": true,
"local": false,
"user": false,
"plugins": [
{
"type": "foo",
"id": "a-plugin",
"module": "test-module"
},
{
"type": "bar",
"id": "a-plugin2",
"module": "test-module"
},
{
"type": "foo",
"id": "a-plugin3",
"module": "test-module"
}
]
},
{
"id": "test-module/test-disabled-set",
"enabled": false,
"local": false,
"user": false,
"plugins": []
}
]
[{"id":"test-module/test-set","enabled":true,"local":false,"user":false,"plugins":[{"id":"a-plugin","type":"foo","module":"test-module"},{"id":"a-plugin2","type":"bar","module":"test-module"},{"id":"a-plugin3","type":"foo","module":"test-module"}]},{"id":"test-module/test-disabled-set","enabled":false,"local":false,"user":false,"plugins":[]}]
))
})
})
Expand Down

0 comments on commit 2531a52

Please sign in to comment.