/** * 判断当前是否为 Windows 平台 */ export declare function isWindows(): boolean; /** * 获取平台对应的命令名 * 通过指定 shell 执行命令时,Windows 会自动解析 .cmd 后缀, * 无需手动添加后缀,直接返回命令名即可。 */ export declare function getPlatformCommand(command: string): string; /** * 运行命令(继承标准输入输出) * 通过指定 shell 确保在 Windows/macOS/Linux 上都能正确执行 */ export declare function runCommand(command: string, options?: { cwd?: string; }): void; /** * 运行命令并注入额外环境变量(继承标准输入输出) * 通过 execSync 的 env 选项传递环境变量,确保跨平台兼容 */ export declare function runCommandWithEnv(command: string, extraEnv: Record, options?: { cwd?: string; }): void; /** * 静默运行命令并返回输出 * 通过指定 shell 确保在 Windows/macOS/Linux 上都能正确执行 */ export declare function runCommandQuiet(command: string, options?: { cwd?: string; }): string; /** * 校验版本号格式是否合法,防止命令注入 * 只允许数字、点、连字符和字母(如 1.0.0、1.0.0-beta.1) */ export declare function validateVersion(version: string): boolean; //# sourceMappingURL=system.d.ts.map