def getPlugins(self): def _pluginNameToResponse(name): p = plugin.getPlugin(name) return { 'name': p.displayName, 'description': p.description, 'url': p.url, 'version': p.version } return { 'all': {name: _pluginNameToResponse(name) for name in plugin.allPlugins()}, 'loaded': plugin.loadedPlugins() }
def getPlugins(self): def _pluginNameToResponse(name): p = plugin.getPlugin(name) return { 'name': p.displayName, 'description': p.description, 'url': p.url, 'version': p.version } return { 'all': { name: _pluginNameToResponse(name) for name in plugin.allPlugins() }, 'loaded': plugin.loadedPlugins() }
def getPlugins(self): def _pluginNameToResponse(name): p = plugin.getPlugin(name) return { 'name': p.displayName, 'description': p.description, 'url': p.url, 'version': p.version } plugins = { 'all': {name: _pluginNameToResponse(name) for name in plugin.allPlugins()}, 'enabled': Setting().get(SettingKey.PLUGINS_ENABLED), 'loaded': plugin.loadedPlugins() } failureInfo = { plugin: ''.join(traceback.format_exception(*exc_info)) for plugin, exc_info in six.iteritems(plugin.getPluginFailureInfo()) } if failureInfo: plugins['failed'] = failureInfo return plugins
def _collectPluginDependencies(): packages = {} for pluginName in allPlugins(): plugin = getPlugin(pluginName) packages.update(plugin.npmPackages()) return packages
def testAllPlugins(registry): allPlugins = plugin.allPlugins() assert set(allPlugins) == {'plugin1', 'plugin2', 'plugin3', 'plugin4'}
def testAllPlugins(registry): allPlugins = plugin.allPlugins() assert sorted(allPlugins) == ['plugin1', 'plugin2', 'plugin3', 'plugin4']