in env/secrets/src/secrets.lib.ts [56:78]
public static printTable(title: string, obj: Record<string, string>): string {
try {
const keys = Object.keys(obj);
const maxKeyLength = Math.max(...keys.map(k => k.length));
const maxValueLength = Math.max(...keys.map(k => obj[k].length));
const totalWidth = maxKeyLength + maxValueLength + 7;
let output = "";
output += `\n${title}\n`;
output += "-".repeat(totalWidth) + "\n";
output += `| ${"Key".padEnd(maxKeyLength)} | ${"Value".padEnd(maxValueLength)} |\n`;
output += "-".repeat(totalWidth) + "\n";
keys.forEach(key => {
output += `| ${key.padEnd(maxKeyLength)} | ${obj[key].padEnd(maxValueLength)} |\n`;
});
output += "-".repeat(totalWidth) + "\n";
return output;
} catch (err) {
return '';
}
}