import { PluginLoaderFactory } from '../factory'; import type { PluginLoadOption, PluginLoadType } from '../typing'; export class PluginLoader { public static async load(options: PluginLoadOption[]): Promise { await Promise.allSettled(options.map((option) => PluginLoaderFactory.get(option.type)?.load(option))); } public static async loadDependencies(type: PluginLoadType, dependencies: Record): Promise { await PluginLoaderFactory.get(type)?.loadDependencies(dependencies); } }