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"));