chore: update product list
Node.js CI / Lint and Test (push) Successful in 1m39s

This commit is contained in:
2025-08-25 16:28:40 -07:00
parent dc34fbeafd
commit 7d92047c40
3 changed files with 134 additions and 12 deletions
+22
View File
@@ -0,0 +1,22 @@
import { products } from "./src/app/config/products";
const repos: { name:string}[] = [];
let page = 1
let productReq = await fetch(`https://git.nhcarrigan.com/api/v1/orgs/nhcarrigan/repos?limit=50&page=${page}`);
let productRes: { name: string }[] = await productReq.json();
repos.push(...productRes);
while (productRes.length >= 50) {
page++;
productReq = await fetch(`https://git.nhcarrigan.com/api/v1/orgs/nhcarrigan/repos?limit=50&page=${page}`);
productRes = await productReq.json();
repos.push(...productRes);
}
console.log(`Auditing ${repos.length} repositories.`);
const excludedProducts = repos.filter(product => products.findIndex(p => p.name.toLowerCase().replace(/\s/g, "-") === product.name) === -1);
console.log("The following products do not appear to be listed in the directory.");
console.log(excludedProducts.map(product => product.name).join("\n"));