openspec-stat 1.4.1 → 1.4.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/esm/cli.js CHANGED
@@ -4,7 +4,7 @@ import { runSingleRepoCommand } from "./commands/single.js";
4
4
  import { runMultiRepoCommand } from "./commands/multi.js";
5
5
  import { runInitCommand } from "./commands/init.js";
6
6
  const program = new Command();
7
- program.name('openspec-stat').description("Track team members' OpenSpec proposals and code changes in Git repositories").version("1.4.1").enablePositionalOptions().passThroughOptions();
7
+ program.name('openspec-stat').description("Track team members' OpenSpec proposals and code changes in Git repositories").version("1.4.2").enablePositionalOptions().passThroughOptions();
8
8
 
9
9
  // Default command for single-repository mode (for backward compatibility)
10
10
  program.argument('[repo]', 'Repository path', '.').option('-r, --repo <path>', 'Repository path (alternative)', '.').option('-b, --branches <branches>', 'Branch list, comma-separated').option('--no-interactive', 'Disable interactive branch selection').option('-s, --since <datetime>', 'Start time (default: yesterday 20:00)').option('-u, --until <datetime>', 'End time (default: today 20:00)').option('-a, --author <name>', 'Filter by specific author').option('--json', 'Output in JSON format').option('--csv', 'Output in CSV format').option('--markdown', 'Output in Markdown format').option('-c, --config <path>', 'Configuration file path').option('-v, --verbose', 'Verbose output mode').option('-l, --lang <language>', 'Language for output (en, zh-CN)', 'en').option('--no-fetch', 'Skip fetching remote branches').action(async (repo, options) => {
@@ -122,8 +122,29 @@ export class MultiRepoAnalyzer {
122
122
  const progressSuffix = this.getProgressSuffix(repo.name);
123
123
  const cloneSpinner = this.isQuiet ? undefined : new SpinnerManager(false);
124
124
  this.reportCloneStatus('start', repo.name, progressSuffix, cloneSpinner);
125
- const git = simpleGit();
125
+ const progressReporter = ({
126
+ method,
127
+ stage,
128
+ progress
129
+ }) => {
130
+ if (this.isQuiet) return;
131
+ const pct = Number.isFinite(progress) ? `${progress.toFixed(1)}%` : '';
132
+ const text = `${t('multi.repo.cloning', {
133
+ repo: repo.name
134
+ })}${progressSuffix} ${method} ${stage}${pct ? ` ${pct}` : ''}`;
135
+ if (cloneSpinner) {
136
+ cloneSpinner.update(text);
137
+ } else {
138
+ console.log(chalk.cyan(text));
139
+ }
140
+ };
141
+ const git = simpleGit({
142
+ progress: progressReporter
143
+ });
126
144
  const cloneArgs = [];
145
+
146
+ // Enable git's progress output so simple-git can emit progress events
147
+ cloneArgs.push('--progress');
127
148
  if (repo.cloneOptions?.depth !== null && repo.cloneOptions?.depth !== undefined) {
128
149
  cloneArgs.push(`--depth=${repo.cloneOptions.depth}`);
129
150
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "openspec-stat",
3
- "version": "1.4.1",
3
+ "version": "1.4.2",
4
4
  "description": "Track team members' OpenSpec proposals and code changes in Git repositories",
5
5
  "type": "module",
6
6
  "main": "dist/esm/index.js",