docs(sdlc): add ISO 29110 audit prep note; keep top-level sdlc notes out of seed and render
This commit is contained in:
@@ -26,12 +26,13 @@ function compact(text) {
|
||||
return text.normalize('NFC').toLocaleLowerCase().replace(/[^\p{L}\p{N}]/gu, '');
|
||||
}
|
||||
|
||||
async function markdownFiles(directory) {
|
||||
// Work products sit in the process folders; top-level files in sdlc/ are notes.
|
||||
async function markdownFiles(directory, depth = 0) {
|
||||
const entries = await fs.readdir(directory, { withFileTypes: true });
|
||||
const results = await Promise.all(entries.map(async (entry) => {
|
||||
const target = path.join(directory, entry.name);
|
||||
if (entry.isDirectory()) return markdownFiles(target);
|
||||
return entry.isFile() && entry.name.endsWith('.md') ? [target] : [];
|
||||
if (entry.isDirectory()) return markdownFiles(target, depth + 1);
|
||||
return depth > 0 && entry.isFile() && entry.name.endsWith('.md') ? [target] : [];
|
||||
}));
|
||||
return results.flat();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user