in src/index.ts [9:25]
export function getResources(template: Template) {
const types = new Array<[string, string]>();
let width = 0;
for (const [logical, resource] of Object.entries(template.Resources ?? {})) {
const type = resource.Type;
types.push([type, logical]);
if (type.length > width) {
width = type.length;
}
}
const lines = new Array<string>();
const sorted = types.sort((l, r) => l[0].localeCompare(r[0]));
for (const [type, logical] of sorted) {
lines.push(`${type.padEnd(width)} ${logical}`);
}
return lines;
}