import { RedisModuleOpts, RedisModuleName } from '../types'; /** Module metadata for download/build */ interface ModuleMeta { /** GitHub repo in format owner/repo */ repo: string; /** The .so file name produced by the build */ binaryName: string; /** Build command to run after cloning/extracting */ buildCommand: string; /** Path within the build directory to find the binary */ binaryPath: string; /** Whether the module requires Rust/Cargo to build */ requiresRust: boolean; } export interface RedisModuleBinaryCache { [key: string]: string; } export default class RedisModuleBinary { static cache: RedisModuleBinaryCache; /** * Get a cache key for a module */ static getCacheKey(name: RedisModuleName, version: string): string; /** * Check if the module binary is already cached */ static getCachePath(name: RedisModuleName, version: string): string | undefined; /** * Probe if the provided system module path exists */ static getSystemPath(systemModule: string): Promise; /** * Get the default download directory for modules */ static getDefaultDownloadDir(): string; /** * Check if the Redis version is 8+ (modules are built-in) * @param redisVersion The Redis version string */ static isModuleBuiltIn(redisVersion: string): boolean; /** * Resolve the path for a module binary. * Order: systemModule -> cache -> download/build */ static getPath(opts: RedisModuleOpts): Promise; /** * Download and build a module from source */ static downloadAndBuild(name: RedisModuleName, version: string, downloadDir: string, meta: ModuleMeta): Promise; /** * Download module source from GitHub */ static downloadSource(repo: string, version: string, moduleDir: string): Promise; /** * Download a file via HTTP(S) with redirect support */ static httpDownload(downloadUrl: string, destination: string): Promise; /** * Ensure Rust/Cargo is installed (required for building RedisJSON) */ static ensureRustInstalled(): Promise; } export {}; //# sourceMappingURL=RedisModuleBinary.d.ts.map