/** * Abstract interfaces that must be implemented by adapters */ import type { ExpozrConfig, HostConfig, Inventory, Cargo, LoadOptions, LoadedCargo } from "./types"; /** * Abstract base class for bundler adapters */ export declare abstract class ExpozrAdapter { /** * Create a expozr plugin for the specific bundler */ abstract createExpozrPlugin(config: ExpozrConfig): any; /** * Create a host plugin for the specific bundler */ abstract createHostPlugin(config: HostConfig): any; /** * Generate an inventory manifest from expozr configuration */ abstract generateInventory(config: ExpozrConfig): Promise; /** * Get the bundler name this adapter supports */ abstract get bundlerName(): string; /** * Get the version of the bundler this adapter supports */ abstract get supportedVersions(): string[]; } /** * Interface for cache implementations */ export interface CacheManager { /** * Get an item from cache */ get(key: string): Promise; /** * Set an item in cache */ set(key: string, value: T, ttl?: number): Promise; /** * Check if an item exists in cache */ has(key: string): Promise; /** * Remove an item from cache */ delete(key: string): Promise; /** * Clear all cache */ clear(): Promise; /** * Get cache size */ size(): Promise; } /** * Interface for dependency resolvers */ export interface DependencyResolver { /** * Resolve dependencies for a cargo */ resolveDependencies(cargo: Cargo): Promise>; /** * Check if dependencies are satisfied */ checkDependencies(cargo: Cargo): Promise; /** * Get missing dependencies */ getMissingDependencies(cargo: Cargo): Promise; } /** * Interface for expozr discovery */ export interface ExpozrDiscovery { /** * Discover expozrs from a catalog */ discoverExpozrs(catalogUrl: string): Promise; /** * Get expozr information */ getExpozrInfo(expozrUrl: string): Promise; /** * Check if a expozr is available */ isExpozrAvailable(expozrUrl: string): Promise; } /** * Interface for the main ExpozrNavigator (runtime loader) */ export interface IExpozrNavigator { /** * Load a cargo from a expozr */ loadCargo(expozr: string, cargo: string, options?: LoadOptions): Promise>; /** * Get inventory from a expozr */ getInventory(expozr: string): Promise; /** * Preload cargo from expozrs */ preload(expozr: string, cargo?: string[]): Promise; /** * Get the cache manager */ getCache(): CacheManager; /** * Get loaded expozrs */ getLoadedExpozrs(): string[]; /** * Get loaded cargo */ getLoadedCargo(): Record; /** * Clear all caches and loaded modules */ reset(): Promise; } /** * Interface for configuration helpers */ export interface ConfigManager { /** * Load configuration from file */ loadConfig(configPath: string): Promise; /** * Validate configuration */ validateConfig(config: T, schema: any): Promise; /** * Merge configurations */ mergeConfigs(...configs: Partial[]): T; } /** * Event types for the Expozr ecosystem */ export interface ExpozrEvents { "expozr:loaded": { expozr: string; inventory: Inventory; }; "cargo:loading": { expozr: string; cargo: string; }; "cargo:loaded": { expozr: string; cargo: string; module: any; }; "cargo:error": { expozr: string; cargo: string; error: Error; }; "cache:hit": { key: string; }; "cache:miss": { key: string; }; "navigator:reset": {}; } /** * Interface for event emitter */ export interface EventEmitter { on(event: K, listener: (data: ExpozrEvents[K]) => void): void; off(event: K, listener: (data: ExpozrEvents[K]) => void): void; emit(event: K, data: ExpozrEvents[K]): void; } //# sourceMappingURL=interfaces.d.ts.map