UNPKG

@typecad/jlcpcb-parts

Version:

Intelligent fuzzy search for JLCPCB electrical components with CLI interface

66 lines 2.48 kB
import { DataManager } from '../data/DataManager.js'; import { ComponentSearchEngine } from '../scoring/SearchEngine.js'; import { Logger, LogLevel } from '../cli/Logger.js'; /** * Application class that initializes and coordinates all components */ export declare class Application { private readonly dataManager; private readonly parameterParser; private readonly fuzzyScorer; private readonly searchEngine; private readonly cli; private readonly logger; /** * Creates a new Application instance * @param csvUrl - URL to download the CSV file from * @param localCsvFileName - Name of the CSV file to save * @param cacheDir - Directory to store cache files (used when useSharedCache is false) * @param cacheExpirationHours - Number of hours before cache expires * @param programName - Name of the program for CLI display * @param logLevel - Minimum log level to display in the console * @param useSharedCache - Whether to use shared cache directory (default: true) */ constructor(csvUrl?: string, localCsvFileName?: string, cacheDir?: string, cacheExpirationHours?: number, programName?: string, logLevel?: LogLevel, useSharedCache?: boolean); /** * Runs the application with the provided command-line arguments * @param args - Command-line arguments (process.argv) * @returns Promise that resolves when the application completes */ run(args: string[]): Promise<void>; /** * Performs cleanup operations before shutdown */ shutdown(): Promise<void>; /** * Gets the logger instance * @returns The logger instance */ getLogger(): Logger; /** * Gets the search engine instance * @returns The search engine instance */ getSearchEngine(): ComponentSearchEngine; /** * Gets the data manager instance * @returns The data manager instance */ getDataManager(): DataManager; } /** * Creates and runs the application * @param args - Command-line arguments (process.argv) * @param options - Application options * @returns Promise that resolves when the application completes */ export declare function runApplication(args: string[], options?: { csvUrl?: string; localCsvFileName?: string; cacheDir?: string; cacheExpirationHours?: number; programName?: string; logLevel?: LogLevel; useSharedCache?: boolean; }): Promise<void>; //# sourceMappingURL=index.d.ts.map