import { Table } from "@cliffy/table"; import type { DatabaseSync } from "node:sqlite"; import { getRecipesList } from "../services.ts"; export default (db: DatabaseSync) => { const recipes = getRecipesList(db); const cells = recipes.map((recipe) => [ recipe.id as string, recipe.name as string, recipe.url as string, recipe.createdAt as string, ]); const table = new Table(["ID", "Name", "URL", "Created At"], ...cells); console.log(table.border().toString()); };