mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-05-05 06:37:10 -04:00
Added querying and removing plugins.
This commit is contained in:
parent
d9a0ecba53
commit
9a072bf36d
6 changed files with 64 additions and 17 deletions
21
bin/removePlugins.ts
Normal file
21
bin/removePlugins.ts
Normal file
|
@ -0,0 +1,21 @@
|
|||
import {linkInstaller} from "ep_etherpad-lite/static/js/pluginfw/installer";
|
||||
import {persistInstalledPlugins} from "./commonPlugins";
|
||||
if (process.argv.length === 2) {
|
||||
console.error('Expected at least one argument!');
|
||||
process.exit(1);
|
||||
}
|
||||
|
||||
let pluginsToRemove = process.argv.slice(2);
|
||||
|
||||
async function run() {
|
||||
for (const plugin of pluginsToRemove) {
|
||||
console.log(`Removing plugin from etherpad: ${plugin}`)
|
||||
await linkInstaller.uninstallPlugin(plugin);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
(async () => {
|
||||
await run();
|
||||
await persistInstalledPlugins();
|
||||
})();
|
Loading…
Add table
Add a link
Reference in a new issue