diff --git a/content b/content index 2dc23df..cdaa7f9 160000 --- a/content +++ b/content @@ -1 +1 @@ -Subproject commit 2dc23dfe8279e83ccddd4b4dc1095f8c880fb11d +Subproject commit cdaa7f93bde1a33ddbc15bc4fb7415360db5fdb0 diff --git a/src/routes/docs.js b/src/routes/docs.js index f436a3c..a6de0bd 100644 --- a/src/routes/docs.js +++ b/src/routes/docs.js @@ -31,7 +31,43 @@ return null; } } +function filterSecurityAndStabilityKeys(docResult) { + if (!docResult || !docResult.modules) { + return docResult; + } + const filteredModules = {}; + + for (const [key, value] of Object.entries(docResult.modules)) { + // Skip modules whose keys start with 'securityAndStability:' + if (key.startsWith("securityAndStability:")) { + continue; + } + + // For other modules, remove the securityAndStability property if it exists + if (value && typeof value === "object") { + const { securityAndStability, ...moduleWithoutSecurity } = value; + filteredModules[key] = moduleWithoutSecurity; + } else { + filteredModules[key] = value; + } + } + + return { + ...docResult, + modules: filteredModules, + }; +} + +// Helper function to filter security from a single module +function filterModuleSecurityKeys(moduleDoc) { + if (!moduleDoc || typeof moduleDoc !== "object") { + return moduleDoc; + } + + const { securityAndStability, ...moduleWithoutSecurity } = moduleDoc; + return moduleWithoutSecurity; +} // /docs/summary - aggregate crossCuttingSummary from all cached docs router.get("/summary", async (req, res) => { const summaries = []; @@ -105,7 +141,7 @@ pathUrl: qualifyLink("/docs/" + docPath), pathName: docPath, module, - moduleDoc, + moduleDoc: filterModuleSecurityKeys(moduleDoc), }); });