UNPKG

@stacksjs/launchpad

Version:
54 lines 1.62 kB
import { Path } from './path'; import type { SupportedArchitecture, SupportedPlatform } from './types'; /** * Get the installation prefix */ export declare function install_prefix(): Path; /** * Check if a directory is writable */ export declare function writable(dirPath: string): boolean; /** * Get platform string for distribution */ export declare function getPlatform(): SupportedPlatform; /** * Get architecture string for distribution */ export declare function getArchitecture(): SupportedArchitecture; /** * Get the user's default shell */ export declare function getUserShell(): string; /** * Check if a directory is in the PATH */ export declare function isInPath(dirPath: string): boolean; /** * Add a directory to the PATH */ export declare function addToPath(dirPath: string): boolean; /** * Check if a directory is a temporary directory */ export declare function isTemporaryDirectory(dirPath: string): boolean; /** * Find a binary in the system PATH */ export declare function findBinaryInPath(binaryName: string): string | null; /** * Clear the binary path cache */ export declare function clearBinaryPathCache(): void; /** * Find a binary in a specific environment */ export declare function findBinaryInEnvironment(binaryName: string, envPath?: string): string | null; /** * Copy directory structure preserving the layout */ export declare function copyDirectoryStructure(source: string, target: string): Promise<void>; /** * Deduplicate packages by domain, keeping only the latest version */ export declare function deduplicatePackagesByVersion(packages: string[]): string[];