( params: CodegenParameters, logLevel: LogLevel = "info", )
| 23 | } from "./codegen/parameters.js"; |
| 24 | |
| 25 | export const codegen = async ( |
| 26 | params: CodegenParameters, |
| 27 | logLevel: LogLevel = "info", |
| 28 | ): Promise<string[]> => { |
| 29 | const initializeContext = new InitializeContext(params, logLevel); |
| 30 | await initialize(initializeContext); |
| 31 | |
| 32 | const preProcessContext = new PreprocessContext(initializeContext); |
| 33 | preprocess(preProcessContext); |
| 34 | |
| 35 | const compileContext = new CompileContext(preProcessContext); |
| 36 | await compile(compileContext); |
| 37 | |
| 38 | const postProcessContext = new PostprocessContext(compileContext); |
| 39 | await postprocess(postProcessContext); |
| 40 | |
| 41 | // Return all modified files |
| 42 | return Object.keys(postProcessContext.filesToContents).map((fileName) => |
| 43 | path.resolve(postProcessContext.parameters.outputFolder, fileName), |
| 44 | ); |
| 45 | }; |
nothing calls this directly
no test coverage detected