import { Project , Schema , RuntimeAdapter , Relation } from "@codotype/core" ; param project param runtimeAdapter export async function runGenerator ( params ) { const { project , runtimeAdapter } = params ; await Promise . all ( project . schemas . map ( ( schema ) => runtimeAdapter . forEachSchema ( { schema , project , runtime : runtimeAdapter , } ) ) ) ; await Promise . all ( project . schemas . map ( ( schema ) => { return Promise . all ( schema . relations . map ( ( relation ) => { return runtimeAdapter . forEachRelation ( { schema : schema , relation , project , runtime : runtimeAdapter . runtimeProxy , } ) ; } ) ) ; } ) ) ; await Promise . all ( project . schemas . map ( ( schema ) => { return Promise . all ( schema . referencedBy . map ( ( relation ) => { return runtimeAdapter . forEachReferencedBy ( { schema : schema , relation , project , runtime : runtimeAdapter . runtimeProxy , } ) ; } ) ) ; } ) ) ; await runtimeAdapter . write ( { project , runtime : runtimeAdapter , } ) ; await runtimeAdapter . compileTemplatesInPlace ( ) ; }