import path from 'path';
import { readJSONFile } from '../readers/json-file-reader.js';
import JDLObject from '../models/jdl-object.js';
import { convertEntitiesToJDL } from './ndm-to-jdl-entity-converter.js';
export default {
    convertNdmToJDL,
};
export function convertNdmToJDL(directory = '.', ndmFile = 'ndm.ndm2', output = 'ndm.jdl') {
    return getJDLObjectFromSingleApplication(path.join(directory, ndmFile));
}
function getJDLObjectFromSingleApplication(ndmFile, existingJDLObject = new JDLObject()) {
    const ndmFileContent = readJSONFile(path.join(ndmFile));
    return convertEntitiesToJDL(ndmFileContent);
}
