import fs from 'node:fs';
import path from 'node:path';
const PathNormalizer = {
    normalize(pathStr, assertExists = true, errorMessage) {
        const resolvePath = path.resolve(pathStr);
        if (assertExists && !fs.existsSync(resolvePath)) {
            throw new Error(errorMessage || `Path "${resolvePath}" not found.`);
        }
        return resolvePath;
    }
};
export default PathNormalizer;
