"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.getRunStatuses = getRunStatuses;
exports.formatStatuses = formatStatuses;
const path_1 = require("path");
const core_1 = require("@vsaf/core");
function getRunStatuses(projectPath) {
    const storeDir = (0, path_1.join)(projectPath, '.vsaf', 'storage');
    const store = new core_1.RunStore(storeDir);
    return store.listAll();
}
function formatStatuses(runs) {
    if (runs.length === 0)
        return 'No workflow runs found.';
    const lines = runs.map(r => {
        const icon = r.status === 'completed' ? '✓' : r.status === 'failed' ? '✗' : '●';
        return `${icon} ${r.runId}  ${r.workflow.padEnd(20)} ${r.status.padEnd(10)} ${r.startedAt}`;
    });
    return lines.join('\n');
}
//# sourceMappingURL=status.js.map