/** * 适配器工厂 - 根据运行环境自动选择合适的适配器 * * 实现框架逻辑中的环境自适应: * - 浏览器环境:localStorage + 受限安全 + Fetch API * - Node.js环境:文件系统 + 完整加密 + HTTP模块 * - Edge环境:混合模式(未来扩展) */ import { UI18nAdapters, PlatformType, AdapterFactory } from './types'; /** * 自动检测当前运行环境 */ export declare function detectPlatform(): PlatformType; /** * 统一适配器工厂 */ export declare class UniversalAdapterFactory implements AdapterFactory { createAdapters(platform?: PlatformType): Promise; private createNodeAdapters; private createBrowserAdapters; private createEdgeAdapters; } /** * 全局适配器工厂实例 */ export declare const adapterFactory: UniversalAdapterFactory; /** * 便捷函数:创建当前环境的适配器 */ export declare function createAdapters(platform?: PlatformType): Promise; /** * 便捷函数:检查特定适配器是否可用 */ export declare function isAdapterAvailable(adapterType: keyof UI18nAdapters, platform?: PlatformType): Promise; /** * 适配器能力检测 */ export interface AdapterCapabilities { fileSystem: boolean; encryption: boolean; nodeModules: boolean; webAPIs: boolean; networkCORS: boolean; } /** * 检测当前环境的适配器能力 */ export declare function getAdapterCapabilities(platform?: PlatformType): AdapterCapabilities; /** * 环境兼容性检查 */ export declare function checkEnvironmentCompatibility(): { platform: PlatformType; capabilities: AdapterCapabilities; warnings: string[]; recommendations: string[]; }; //# sourceMappingURL=factory.d.ts.map