refactor: split remaining monitor runtime helpers

This commit is contained in:
Peter Steinberger
2026-03-17 21:27:14 -07:00
parent 4e94f3aa02
commit b86bc9de95
19 changed files with 1825 additions and 1676 deletions

View File

@@ -99,7 +99,8 @@ function readExportStatements(path: string): string[] {
return sourceFile.statements.flatMap((statement) => {
if (!ts.isExportDeclaration(statement)) {
if (!statement.modifiers?.some((modifier) => modifier.kind === ts.SyntaxKind.ExportKeyword)) {
const modifiers = ts.canHaveModifiers(statement) ? ts.getModifiers(statement) : undefined;
if (!modifiers?.some((modifier) => modifier.kind === ts.SyntaxKind.ExportKeyword)) {
return [];
}
return [statement.getText(sourceFile).replaceAll(/\s+/g, " ").trim()];