import path from 'node:path';
/**
 * Normalize a file path to use forward slashes (for consistent JSON output).
 */
export function normalizePath(filePath) {
    return filePath.replace(/\\/g, '/');
}
/**
 * Resolve a path relative to the project directory.
 */
export function resolveFromProject(projectDir, ...segments) {
    return normalizePath(path.resolve(projectDir, ...segments));
}
/**
 * Make a path relative to the project directory.
 */
export function makeRelative(projectDir, absolutePath) {
    return normalizePath(path.relative(projectDir, absolutePath));
}
/**
 * Get the output directory path from the project dir and config output_dir setting.
 */
export function getOutputDir(projectDir, outputDir = '.hex') {
    return resolveFromProject(projectDir, outputDir);
}
/**
 * Split text into lines, handling both Unix and Windows line endings.
 */
export function splitLines(text) {
    return text.split(/\r?\n/);
}
//# sourceMappingURL=paths.js.map