/** * Copyright (c) Microsoft Corporation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ import type { LoadedPlugin } from './types.js'; import type { FullConfig } from '../config.js'; /** * Plugin loader class that discovers and loads plugins from the filesystem. */ export declare class PluginLoader { private readonly _config; private readonly _pluginsPath; private _loadedPlugins; constructor(config: FullConfig); /** * Get the plugins directory path. */ get pluginsPath(): string; /** * Get all loaded plugins. */ get loadedPlugins(): LoadedPlugin[]; /** * Get only enabled plugins. */ get enabledPlugins(): LoadedPlugin[]; /** * Discover and load all plugins from the plugins directory. */ loadPlugins(): Promise; /** * Cleanup all loaded plugins. */ cleanup(): Promise; /** * Reload a specific plugin by name. */ reloadPlugin(pluginName: string): Promise; /** * Discover plugin directories in the plugins folder. */ private _discoverPluginDirectories; /** * Load a plugin from the given directory. */ private _loadPlugin; /** * Check if a plugin is enabled based on configuration. */ private _isPluginEnabled; }