UNPKG

firewalla-mcp-server

Version:

Model Context Protocol (MCP) server for Firewalla MSP API - Provides real-time network monitoring, security analysis, and firewall management through 28 specialized tools compatible with any MCP client

173 lines 4.24 kB
/** * Cross-platform utility functions for handling platform-specific operations */ /** * Platform types supported by the application */ export type PlatformType = 'windows' | 'mac' | 'linux' | 'unknown'; /** * Get the current platform type */ export declare function getPlatform(): PlatformType; /** * Check if running on Windows */ export declare function isWindows(): boolean; /** * Check if running on macOS */ export declare function isMac(): boolean; /** * Check if running on Linux */ export declare function isLinux(): boolean; /** * Check if running on Unix-like system (macOS or Linux) */ export declare function isUnix(): boolean; /** * Normalize file paths for cross-platform compatibility */ export declare function normalizePath(path: string): string; /** * Join paths in a cross-platform way */ export declare function joinPaths(...paths: string[]): string; /** * Resolve paths in a cross-platform way */ export declare function resolvePath(...paths: string[]): string; /** * Get the appropriate path separator for the current platform */ export declare function getPathSeparator(): string; /** * Convert Unix-style paths to platform-specific paths */ export declare function toPlatformPath(unixPath: string): string; /** * Convert platform-specific paths to Unix-style paths */ export declare function toUnixPath(platformPath: string): string; /** * Get platform-specific temporary directory */ export declare function getTempDir(): string; /** * Get platform-specific home directory */ export declare function getHomeDir(): string; /** * Get platform-specific config directory */ export declare function getConfigDir(): string; /** * Get platform-specific data directory */ export declare function getDataDir(): string; /** * Get platform-specific cache directory */ export declare function getCacheDir(): string; /** * Get platform-specific log directory */ export declare function getLogDir(): string; /** * Environment variable utilities */ export declare const env: { /** * Get environment variable with platform-aware defaults */ get(key: string, defaultValue?: string): string | undefined; /** * Set environment variable (for testing purposes) */ set(key: string, value: string): void; /** * Get PATH environment variable entries */ getPath(): string[]; /** * Check if a command is available in PATH */ hasCommand(command: string): boolean; }; /** * Platform-specific file system utilities */ export declare const fs: { /** * Get file extension for executable files */ getExecutableExtension(): string; /** * Get script extension for the platform */ getScriptExtension(): string; /** * Check if a filename is hidden (starts with dot on Unix, has hidden attribute on Windows) */ isHiddenFile(filename: string): boolean; /** * Get case sensitivity of the file system */ isCaseSensitive(): boolean; }; /** * Platform-specific command utilities */ export declare const commands: { /** * Get the shell command for the platform */ getShell(): string; /** * Get shell flag for executing commands */ getShellFlag(): string; /** * Get command to list directory contents */ getListCommand(): string; /** * Get command to copy files */ getCopyCommand(): string; /** * Get command to move files */ getMoveCommand(): string; /** * Get command to remove files */ getRemoveCommand(): string; /** * Get command to create directories */ getMkdirCommand(): string; }; /** * Platform information */ export declare const platformInfo: { type: PlatformType; isWindows: boolean; isMac: boolean; isLinux: boolean; isUnix: boolean; separator: string; shell: string; tempDir: string; homeDir: string; configDir: string; dataDir: string; cacheDir: string; logDir: string; }; /** * Logging function that respects platform conventions */ export declare function platformLog(message: string, level?: 'info' | 'warn' | 'error'): void; //# sourceMappingURL=platform.d.ts.map