UNPKG

@interopio/desktop-cli

Version:

io.Connect Desktop Seed Repository CLI Tools

79 lines 3.07 kB
import { ModificationOperation } from '../services/modification-manager'; /** * Interface defining a component's configuration and metadata */ export interface ComponentConfig { /** Component name (e.g., 'iocd', 'enterprise', etc.) */ name: string; /** Display name for logging and UI */ displayName: string; /** Component version */ version?: string; /** Whether this component is required for the application to function */ required?: boolean; /** Custom paths for component-specific directories */ paths?: { /** Override default component directory */ componentDir?: string; /** Override default modification directory */ modificationDir?: string; /** Custom configuration directory within component */ configDir?: string; }; /** Component-specific modification processing options */ modifications?: { /** Whether to process copy operations for this component */ processCopy?: boolean; }; /** Custom metadata for component-specific processing */ metadata?: Record<string, any>; } /** * Interface for component modification processors */ export interface ComponentProcessor { /** Component configuration */ readonly config: ComponentConfig; /** Get component's base directory */ getComponentDir(): string; /** Get component's modification directory */ getModificationDir(): string; /** Get component's configuration directory */ getConfigDir(): string; /** Scan for all modifications this component needs */ scanModifications(): Promise<ModificationOperation[]>; /** Apply all modifications for this component */ applyModifications(): Promise<void>; /** Validate that all modification sources exist */ validateModifications(): Promise<boolean>; /** Check if component has any modifications */ hasModifications(): Promise<boolean>; } /** * Registry for managing multiple components */ export interface ComponentRegistry { /** Register a component processor */ register(componentName: string, version: string): void; /** Get a component processor by name */ get(componentName: string): ComponentProcessor | undefined; /** Get all registered component processors */ getAll(): ComponentProcessor[]; /** Get all registered component names */ getComponentNames(): string[]; /** Check if a component is registered */ has(componentName: string): boolean; /** Remove a component from registry */ unregister(componentName: string): boolean; /** Apply modifications for all registered components */ applyAllModifications(): Promise<void>; /** Validate modifications for all registered components */ validateAllModifications(): Promise<boolean>; /** Get all components that have modifications */ getComponentsWithModifications(): Promise<ComponentProcessor[]>; } /** * Default component configuration for IOCD */ export declare const DEFAULT_IOCD_CONFIG: ComponentConfig; //# sourceMappingURL=component.d.ts.map