mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2026-09-28 12:41:45 +02:00
feat(core): Support community packages in scaling-mode (#10228)
This commit is contained in:
@@ -10,6 +10,7 @@ import { Push } from '@/push';
|
||||
import { TestWebhooks } from '@/TestWebhooks';
|
||||
import { OrchestrationService } from '@/services/orchestration.service';
|
||||
import { WorkflowRepository } from '@/databases/repositories/workflow.repository';
|
||||
import { CommunityPackagesService } from '@/services/communityPackages.service';
|
||||
|
||||
// eslint-disable-next-line complexity
|
||||
export async function handleCommandMessageMain(messageString: string) {
|
||||
@@ -77,6 +78,20 @@ export async function handleCommandMessageMain(messageString: string) {
|
||||
}
|
||||
await Container.get(ExternalSecretsManager).reloadAllProviders();
|
||||
break;
|
||||
case 'community-package-install':
|
||||
case 'community-package-update':
|
||||
case 'community-package-uninstall':
|
||||
if (!debounceMessageReceiver(message, 200)) {
|
||||
return message;
|
||||
}
|
||||
const { packageName, packageVersion } = message.payload;
|
||||
const communityPackagesService = Container.get(CommunityPackagesService);
|
||||
if (message.command === 'community-package-uninstall') {
|
||||
await communityPackagesService.removeNpmPackage(packageName);
|
||||
} else {
|
||||
await communityPackagesService.installOrUpdateNpmPackage(packageName, packageVersion);
|
||||
}
|
||||
break;
|
||||
|
||||
case 'add-webhooks-triggers-and-pollers': {
|
||||
if (!debounceMessageReceiver(message, 100)) {
|
||||
|
||||
Reference in New Issue
Block a user