Skip to content

createProjectForFiles

reference
1 min readUpdated

Kind: Function

Source: atloria-monorepo/libs/parser-core/src/openapi/schema-resolver.ts

Build a ts-morph Project scoped to specific files + their import graph (the DTOs those files reference), NOT the whole repo. This is the memory-bounded path for OpenAPI resolution: the framework parse already loaded the repo once, so globbing the entire tree here would load a SECOND full project (a memory doubler that OOMs large monorepos). Loading only the controller files and resolving their dependencies keeps the second project to the API surface.

Signature

ts
function createProjectForFiles(rootDir: string, filePaths: string[]): Project

Parameters

NameType
rootDirstring
filePathsstring[]

Returns: Project

Was this page helpful?

Download as PDF