mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-01-19 14:13:34 +01:00
Upgrade live-plugin-manager to 1.0.0 (#6396)
* Upgrade the live-plugin-manager * Fix migration scripts to skip checking for the system directory of live-plugin-manager * Updated lockfile * Improved handling of install. --------- Co-authored-by: yacchin1205 <968739+yacchin1205@users.noreply.github.com> Co-authored-by: SamTV12345 <40429738+samtv12345@users.noreply.github.com>
This commit is contained in:
parent
0b0d882477
commit
3a1ef560ec
6 changed files with 4984 additions and 3903 deletions
|
@ -90,13 +90,6 @@ const remove = (plugins: string[])=>{
|
||||||
|
|
||||||
let action = args[0];
|
let action = args[0];
|
||||||
|
|
||||||
if (!possibleActions.includes(action)) {
|
|
||||||
// This is the old plugin install via install-plugins
|
|
||||||
console.warn("Using legacy plugin install. Please update to the new command `pnpm run plugins install <your-plugin>`")
|
|
||||||
install()
|
|
||||||
process.exit(0)
|
|
||||||
}
|
|
||||||
|
|
||||||
switch (action) {
|
switch (action) {
|
||||||
case "install":
|
case "install":
|
||||||
install();
|
install();
|
||||||
|
|
|
@ -25,7 +25,7 @@
|
||||||
"test-admin": "pnpm --filter ep_etherpad-lite run test-admin",
|
"test-admin": "pnpm --filter ep_etherpad-lite run test-admin",
|
||||||
"test-admin:ui": "pnpm --filter ep_etherpad-lite run test-admin:ui",
|
"test-admin:ui": "pnpm --filter ep_etherpad-lite run test-admin:ui",
|
||||||
"plugins": "pnpm --filter bin run plugins",
|
"plugins": "pnpm --filter bin run plugins",
|
||||||
"install-plugins": "pnpm --filter bin run plugins",
|
"install-plugins": "pnpm --filter bin run plugins i",
|
||||||
"remove-plugins": "pnpm --filter bin run remove-plugins",
|
"remove-plugins": "pnpm --filter bin run remove-plugins",
|
||||||
"list-plugins": "pnpm --filter bin run list-plugins"
|
"list-plugins": "pnpm --filter bin run list-plugins"
|
||||||
},
|
},
|
||||||
|
|
8869
pnpm-lock.yaml
8869
pnpm-lock.yaml
File diff suppressed because it is too large
Load diff
|
@ -51,7 +51,7 @@
|
||||||
"jsonminify": "0.4.2",
|
"jsonminify": "0.4.2",
|
||||||
"jsonwebtoken": "^9.0.2",
|
"jsonwebtoken": "^9.0.2",
|
||||||
"languages4translatewiki": "0.1.3",
|
"languages4translatewiki": "0.1.3",
|
||||||
"live-plugin-manager": "^0.20.0",
|
"live-plugin-manager": "^1.0.0",
|
||||||
"lodash.clonedeep": "4.5.0",
|
"lodash.clonedeep": "4.5.0",
|
||||||
"log4js": "^6.9.1",
|
"log4js": "^6.9.1",
|
||||||
"measured-core": "^2.0.0",
|
"measured-core": "^2.0.0",
|
||||||
|
|
|
@ -100,6 +100,10 @@ export const checkForMigration = async () => {
|
||||||
|
|
||||||
for (let file of files){
|
for (let file of files){
|
||||||
const moduleName = path.basename(file);
|
const moduleName = path.basename(file);
|
||||||
|
if (moduleName === '.versions') {
|
||||||
|
// Skip the directory using live-plugin-manager
|
||||||
|
continue;
|
||||||
|
}
|
||||||
try {
|
try {
|
||||||
await fs.access(path.join(node_modules, moduleName), fs.constants.F_OK);
|
await fs.access(path.join(node_modules, moduleName), fs.constants.F_OK);
|
||||||
logger.debug(`plugin ${moduleName} already exists in node_modules`);
|
logger.debug(`plugin ${moduleName} already exists in node_modules`);
|
||||||
|
|
|
@ -129,8 +129,7 @@ exports.getPackages = async () => {
|
||||||
if (!plugin.name.startsWith(exports.prefix)) {
|
if (!plugin.name.startsWith(exports.prefix)) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
plugin.realPath = await fs.realpath(plugin.location);
|
plugin.path = plugin.realPath = plugin.location;
|
||||||
plugin.path = plugin.realPath;
|
|
||||||
newDependencies[plugin.name] = plugin;
|
newDependencies[plugin.name] = plugin;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue