11import { readFile } from 'node:fs/promises' ;
2- import GeneratorCodeConfiguration from '../generator/GeneratorCodeConfiguration .js' ;
3- import GeneratorTestConfiguration from '../generator/GeneratorTestConfiguration .js' ;
2+ import CodeGeneratorConfiguration from '../generator/CodeGeneratorConfiguration .js' ;
3+ import TestGeneratorConfiguration from '../generator/TestGeneratorConfiguration .js' ;
44import ParsedConfiguration from '../parser/ParsedConfiguration.js' ;
55
66/**
@@ -14,10 +14,10 @@ export default class ConfigurationConvertor {
1414 * Returns the code configuration for the generator.
1515 * @param {ParsedConfiguration } parsedConfiguration - the parsed configuration.
1616 * @param {string } defaultCodeFile - the file with the default code.
17- * @return {GeneratorCodeConfiguration } the code configuration for the generator.
17+ * @return {CodeGeneratorConfiguration } the code configuration for the generator.
1818 * @throws Error if the default code file is not readable.
1919 */
20- static async getGeneratorCodeConfiguration ( parsedConfiguration , defaultCodeFile ) {
20+ static async getCodeGeneratorConfiguration ( parsedConfiguration , defaultCodeFile ) {
2121
2222 if ( ( typeof defaultCodeFile ) !== "string" ) {
2323 throw new Error ( "The default code file is not a string." ) ;
@@ -27,8 +27,7 @@ export default class ConfigurationConvertor {
2727 let defaultCode = await readFile ( defaultCodeFile , { encoding : 'utf8' } ) ;
2828 defaultCode = defaultCode . replace ( / \n / g, "\n " ) . replace ( / \n \n / g, "\n\n" ) ;
2929
30- return new GeneratorCodeConfiguration (
31- parsedConfiguration . path ,
30+ return new CodeGeneratorConfiguration (
3231 parsedConfiguration . name ,
3332 parsedConfiguration . link ,
3433 defaultCode
@@ -41,10 +40,10 @@ export default class ConfigurationConvertor {
4140 /**
4241 * Returns the test configuration for the generator.
4342 * @param {ParsedConfiguration } parsedConfiguration - the parsed configuration.
44- * @return {GeneratorTestConfiguration } the test configuration for the generator.
43+ * @return {TestGeneratorConfiguration } the test configuration for the generator.
4544 */
46- static getGeneratorTestConfiguration ( parsedConfiguration ) {
47- return new GeneratorTestConfiguration (
45+ static getTestGeneratorConfiguration ( parsedConfiguration ) {
46+ return new TestGeneratorConfiguration (
4847 parsedConfiguration . path ,
4948 parsedConfiguration . name ,
5049 parsedConfiguration . testConfigurations
0 commit comments