mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-04-20 23:46:14 -04:00
pluginfw: In-line formatPluginsWithVersion()
There's only one caller of the function, so move the logic to where it is used.
This commit is contained in:
parent
cd1d322af4
commit
746cc8cc34
2 changed files with 6 additions and 6 deletions
|
@ -44,6 +44,7 @@ const db = require('./db/DB');
|
||||||
const express = require('./hooks/express');
|
const express = require('./hooks/express');
|
||||||
const hooks = require('../static/js/pluginfw/hooks');
|
const hooks = require('../static/js/pluginfw/hooks');
|
||||||
const npm = require('npm/lib/npm.js');
|
const npm = require('npm/lib/npm.js');
|
||||||
|
const pluginDefs = require('../static/js/pluginfw/plugin_defs');
|
||||||
const plugins = require('../static/js/pluginfw/plugins');
|
const plugins = require('../static/js/pluginfw/plugins');
|
||||||
const settings = require('./utils/Settings');
|
const settings = require('./utils/Settings');
|
||||||
const util = require('util');
|
const util = require('util');
|
||||||
|
@ -120,7 +121,11 @@ exports.start = async () => {
|
||||||
await util.promisify(npm.load)();
|
await util.promisify(npm.load)();
|
||||||
await db.init();
|
await db.init();
|
||||||
await plugins.update();
|
await plugins.update();
|
||||||
console.info(`Installed plugins: ${plugins.formatPluginsWithVersion()}`);
|
const installedPlugins = Object.values(pluginDefs.plugins)
|
||||||
|
.filter((plugin) => plugin.package.name !== 'ep_etherpad-lite')
|
||||||
|
.map((plugin) => `${plugin.package.name}@${plugin.package.version}`)
|
||||||
|
.join(', ');
|
||||||
|
console.info(`Installed plugins: ${installedPlugins}`);
|
||||||
console.debug(`Installed parts:\n${plugins.formatParts()}`);
|
console.debug(`Installed parts:\n${plugins.formatParts()}`);
|
||||||
console.debug(`Installed hooks:\n${plugins.formatHooks()}`);
|
console.debug(`Installed hooks:\n${plugins.formatHooks()}`);
|
||||||
await hooks.aCallAll('loadSettings', {settings});
|
await hooks.aCallAll('loadSettings', {settings});
|
||||||
|
|
|
@ -15,11 +15,6 @@ exports.prefix = 'ep_';
|
||||||
|
|
||||||
exports.formatPlugins = () => Object.keys(defs.plugins).join(', ');
|
exports.formatPlugins = () => Object.keys(defs.plugins).join(', ');
|
||||||
|
|
||||||
exports.formatPluginsWithVersion = () => Object.values(defs.plugins)
|
|
||||||
.filter((plugin) => plugin.package.name !== 'ep_etherpad-lite')
|
|
||||||
.map((plugin) => `${plugin.package.name}@${plugin.package.version}`)
|
|
||||||
.join(', ');
|
|
||||||
|
|
||||||
exports.formatParts = () => defs.parts.map((part) => part.full_name).join('\n');
|
exports.formatParts = () => defs.parts.map((part) => part.full_name).join('\n');
|
||||||
|
|
||||||
exports.formatHooks = (hookSetName) => {
|
exports.formatHooks = (hookSetName) => {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue