/** * Node.js 适配器实现 - 完整的 .ui18n 目录和安全功能 * * 支持框架逻辑中的"有后台网站"和"本地软件"场景 * 提供完整的文件系统、加密和性能监控功能 */ import { StorageAdapter, SecurityAdapter, PerformanceAdapter, NetworkAdapter, UI18nAdapters, PerformanceReport, MemoryUsage, SystemInfo, RequestOptions, TranslationResult } from './types'; /** * Node.js 存储适配器 - 真实的 .ui18n 目录管理 */ export declare class NodeStorageAdapter implements StorageAdapter { private readonly UI18N_DIR; private readonly LOCALES_DIR; private readonly CONFIG_FILE; ensureUI18nDirectory(basePath?: string): Promise; readTranslationFile(language: string, basePath?: string): Promise | null>; writeTranslationFile(language: string, data: Record, basePath?: string): Promise; listAvailableLanguages(basePath?: string): Promise; readConfig(basePath?: string): Promise | null>; writeConfig(config: Record, basePath?: string): Promise; } /** * Node.js 安全适配器 - 真实的加密和密钥管理 */ export declare class NodeSecurityAdapter implements SecurityAdapter { private readonly ENCRYPTION_ALGORITHM; private readonly KEY_LENGTH; storeApiKey(key: string, provider: string): Promise; getApiKey(provider: string): Promise; encryptData(data: string): Promise; decryptData(encryptedData: string): Promise; generateChecksum(data: string): Promise; verifyChecksum(data: string, checksum: string): Promise; private getOrCreateMasterKey; private ensureKeysDirectory; } /** * Node.js 性能适配器 - V8性能监控 */ export declare class NodePerformanceAdapter implements PerformanceAdapter { private sessions; startProfiling(sessionId: string): Promise; endProfiling(sessionId: string): Promise; recordMetric(name: string, value: number, tags?: Record): Promise; getMemoryUsage(): Promise; getSystemInfo(): Promise; private generateRecommendations; } /** * Node.js 网络适配器 - HTTP/HTTPS请求 */ export declare class NodeNetworkAdapter implements NetworkAdapter { request(options: RequestOptions): Promise; translateWithAI(text: string, fromLang: string, toLang: string, apiKey: string): Promise; checkNetworkHealth(): Promise; } /** * Node.js 适配器工厂 */ export declare function createNodeAdapters(): UI18nAdapters; //# sourceMappingURL=node.d.ts.map