import path from 'path';
import { upperFirst } from '../utils/string-utils.js';
import { readFile } from './file-reader.js';
export function readJSONFile(filePath) {
    return JSON.parse(readFile(filePath));
}
export function toFilePath(entityName) {
    if (!entityName) {
        throw new Error('The passed entity name must not be nil to be converted to file path.');
    }
    return path.join('.jhipster', `${upperFirst(entityName)}.json`);
}
