Include module property in plugin metadata

This commit is contained in:
Nick O'Leary 2024-03-21 17:04:03 +00:00
parent 4cc1a5d846
commit 2531a5283a
No known key found for this signature in database
GPG Key ID: 4F2157149161A6C9
2 changed files with 3 additions and 33 deletions

View File

@ -68,7 +68,8 @@ function filterNodeInfo(n) {
r.plugins = n.plugins.map(p => { r.plugins = n.plugins.map(p => {
return { return {
id: p.id, id: p.id,
type: p.type type: p.type,
module: p.module
} }
}); });
} }

View File

@ -115,38 +115,7 @@ test-module-config`)
let pluginList = plugins.getPluginList(); let pluginList = plugins.getPluginList();
JSON.stringify(pluginList).should.eql(JSON.stringify( JSON.stringify(pluginList).should.eql(JSON.stringify(
[ [{"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":[]}]
{
"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": []
}
]
)) ))
}) })
}) })