MCPcopy Create free account
hub / github.com/hashintel/hash / codegen

Function codegen

libs/@blockprotocol/graph/src/codegen.ts:25–45  ·  view source on GitHub ↗
(
  params: CodegenParameters,
  logLevel: LogLevel = "info",
)

Source from the content-addressed store, hash-verified

23} from "./codegen/parameters.js";
24
25export 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};

Callers

nothing calls this directly

Calls 7

preprocessFunction · 0.85
compileFunction · 0.85
postprocessFunction · 0.85
initializeFunction · 0.50
mapMethod · 0.45
keysMethod · 0.45
resolveMethod · 0.45

Tested by

no test coverage detected