CogniPrep's app/sitemap.ts returned 375 URLs this morning. Grouping them by where the code got them from:
Source URLs
readdirSync(app/employers) 132
blogPostMeta 99
ALL_PROVIDERS 56
CHEATING_GUIDES 56
AC_GUIDES 7
TEST_TYPES 5
INTERVIEW_GUIDES 5
typed out by hand 15
Six of those are TypeScript registries that other parts of the app also read, which is the arrangement you want: a provider that exists has a page, a search entry, a landing card and a sitemap row, all from one array, and the tests assert that parity. The 15 hand-written entries are the top-level pages.
The interesting one is the first row, because it is the only group the code discovers rather than reads:
const employersDir = join ( process . cwd (), ' app ' , ' employers ' ); const employerSlugs = readdirSync ( employersDir , { withFileTypes : true }) . filter (( entry ) => entry . isDirectory ()) . map (( entry ) => entry .…