From 3f0c4c217a6a7fd1ec584b0c4a71dddacc46b9ab Mon Sep 17 00:00:00 2001 From: bendtherules Date: Fri, 27 Mar 2026 10:12:48 +0530 Subject: [PATCH] feat(build): add logging for spec and code file discovery with warnings when none found - Log the number of specification HTML files found in `SPEC_DIR`. - Emit a warning if no specification HTML files are present. - Log the number of code files found in `CODE_DIR`. - Emit a warning if no code files are present. --- setup/build_graph.mjs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/setup/build_graph.mjs b/setup/build_graph.mjs index 7c1531a..0f382aa 100644 --- a/setup/build_graph.mjs +++ b/setup/build_graph.mjs @@ -11,6 +11,10 @@ import { GRAPH_FILE } from '../constants.mjs'; async function buildGraph() { const graph = new Graph({ multi: true }); const htmlFiles = await glob(path.join(SPEC_DIR, '*.html')); + console.log(`Found ${htmlFiles.length} specification HTML file(s) in ${SPEC_DIR}`); + if (htmlFiles.length === 0) { + console.warn(`Warning: No specification HTML files found in ${SPEC_DIR}`); + } console.log("Processing specification for graph..."); for (const file of htmlFiles) { @@ -66,6 +70,10 @@ async function buildGraph() { console.log("Processing code for graph..."); const jsFiles = await glob(path.join(CODE_DIR, '**/*.mts')); + console.log(`Found ${jsFiles.length} code file(s) in ${CODE_DIR}`); + if (jsFiles.length === 0) { + console.warn(`Warning: No code files found in ${CODE_DIR}`); + } for (const file of jsFiles) { const fileName = path.basename(file);