mirror of
https://github.com/moltbot/moltbot.git
synced 2026-04-26 07:57:40 +00:00
perf: prefilter extension boundary parsing
This commit is contained in:
@@ -83,6 +83,9 @@ export async function collectTypeScriptInventory(params) {
|
||||
let sourceFile = parsedTypeScriptSourceCache.get(cacheKey);
|
||||
if (!sourceFile) {
|
||||
const source = await fs.readFile(filePath, "utf8");
|
||||
if (params.shouldParseSource && !params.shouldParseSource(source, filePath)) {
|
||||
continue;
|
||||
}
|
||||
sourceFile = params.ts.createSourceFile(
|
||||
filePath,
|
||||
source,
|
||||
|
||||
Reference in New Issue
Block a user