in src/PluginInfo/PluginInfoProvider.js [60:84]
function getAllHelper (absPath, provider) {
if (!fs.existsSync(absPath)) {
return [];
}
// If dir itself is a plugin, return it in an array with one element.
if (fs.existsSync(path.join(absPath, 'plugin.xml'))) {
return [provider.get(absPath)];
}
// Match normal and scoped plugins
const pluginXmlPaths = glob.sync('{,@*/}*/plugin.xml', {
cwd: absPath,
nodir: true,
absolute: true
}).map(path.normalize);
return pluginXmlPaths.map(pluginXmlPath => {
try {
return provider.get(path.dirname(pluginXmlPath));
} catch (err) {
events.emit('warn', `Error parsing ${pluginXmlPath}:\n${err.stack}`);
return null;
}
}).filter(p => p);
}