sync: update from private repo (402599f)
CI / build-and-test (push) Has been cancelled

This commit is contained in:
oss-sync
2026-06-04 13:41:33 +00:00
parent 57685d995c
commit c526adddc2
28 changed files with 2092 additions and 2727 deletions
+9 -2
View File
@@ -143,6 +143,13 @@ function isBlockedDocsSubpath(relFromDocs: string): boolean {
});
}
function sanitizeListedDescription(description: string): string {
const referencesInternalDoc = BLOCKED_DOCS_SUBPATHS.some((blocked) =>
description.includes(blocked.replace(/\/$/, '')),
);
return referencesInternalDoc ? '(description omitted: internal reference)' : description;
}
/**
* Map a symbolic doc name to a concrete file path under an allow-listed root.
* Returns null on invalid names, attempted traversal, or blocked internal docs.
@@ -306,7 +313,7 @@ function extractMarkdownDescription(filePath: string): string {
}
if (line.startsWith('#')) continue;
// Use this line as description
return line.slice(0, 140);
return sanitizeListedDescription(line.slice(0, 140));
}
} catch {
// ignore
@@ -326,7 +333,7 @@ function extractPieceDescription(filePath: string): string {
.split('\n')
.map((s) => s.trim())
.find((s) => s.length > 0);
return (first ?? '(no description)').slice(0, 140);
return sanitizeListedDescription((first ?? '(no description)').slice(0, 140));
}
} catch {
// ignore