Free, Open Source, Self-Hosted WhatsApp API Gateway
TypeScript apibotgatewayself-hostedwhatsappwhatsapp-apiwhatsapp-automationwhatsapp-botwhatsapp-gatewaywhatsapp-gateway-apiwhatsapp-webwhatsapp-web-api
refactor(plugins): remove unused loader members
Yudhi Armyndharis3f6afebfd856
diff --git a/src/core/plugins/plugin-loader.service.ts b/src/core/plugins/plugin-loader.service.tsindex ab5aa2e17..45c4d4675 100644--- a/src/core/plugins/plugin-loader.service.ts+++ b/src/core/plugins/plugin-loader.service.ts@@ -504,10 +504,6 @@ export class PluginLoaderService implements OnModuleInit, OnApplicationBootstrapreturn this.getAllPlugins().filter(p => p.manifest.type === type);}- getEnabledPlugins(): PluginInstance[] {- return this.getAllPlugins().filter(p => p.status === PluginStatus.ENABLED);- }-isPluginEnabled(pluginId: string): boolean {const plugin = this.plugins.get(pluginId);return plugin?.status === PluginStatus.ENABLED;diff --git a/src/core/plugins/plugin-package-scanner.ts b/src/core/plugins/plugin-package-scanner.tsindex fbea21727..071f5b543 100644--- a/src/core/plugins/plugin-package-scanner.ts+++ b/src/core/plugins/plugin-package-scanner.ts@@ -76,15 +76,11 @@ export class PluginPackageScanner {) {}/**- * The loader's onModuleInit: load built-in plugins (programmatic registration point), then every- * user plugin package found on disk — the configured directory first, the legacy tree in addition —+ * The loader's onModuleInit: load every user plugin package found on disk — the configured directory first, the legacy tree in addition —* and report registry entries whose code the scan did not find.*/scanAtBoot(): void {- // Load built-in plugins first (synchronous registration)- this.loadBuiltInPlugins();-- // Then load user plugins if directory exists+ // User plugins, if the directory exists. Built-in plugins register themselves programmatically.if (fs.existsSync(this.pluginsDir)) {this.loadPluginsFromDirectory(this.pluginsDir);}@@ -140,14 +136,6 @@ export class PluginPackageScanner {);}- private loadBuiltInPlugins(): void {- // Built-in plugins are registered programmatically- // This will be used by Phase 4 to register engine plugins- this.logger.debug('Built-in plugins loading point (Phase 4)', {- action: 'builtin_plugins_init',- });- }-private loadPluginsFromDirectory(dir: string): void {// Reconcile any interrupted-update leftovers BEFORE scanning, so a crash mid-swap can't make a// plugin silently vanish while its registry entry still claims it is installed.