UNPKG

ai-commit-report-generator-cli

Version:

An AI-powered CLI tool that generates weekly reports from your Git activity

38 lines (37 loc) 1.09 kB
"use strict"; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); exports.ProgressService = void 0; const cli_progress_1 = __importDefault(require("cli-progress")); class CliProgressBar { constructor(description) { this.bar = new cli_progress_1.default.SingleBar({ format: `${description} [{bar}] {percentage}% | {value}/{total}`, barCompleteChar: '\u2588', barIncompleteChar: '\u2591', clearOnComplete: true }); } start(total) { this.bar.start(total, 0); } increment() { this.bar.increment(); } stop() { this.bar.stop(); } } class NoOpProgressBar { start() { } increment() { } stop() { } } class ProgressService { static createProgressBar(description, enabled = true) { return enabled ? new CliProgressBar(description) : new NoOpProgressBar(); } } exports.ProgressService = ProgressService;