@vorec/cli 0.10.0 → 0.11.0

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.
@@ -64,6 +64,15 @@ export async function runCommand(manifestPath, opts) {
64
64
  const ext = videoPath.split('.').pop()?.toLowerCase() || 'mp4';
65
65
  const mimeMap = { mp4: 'video/mp4', webm: 'video/webm', mov: 'video/quicktime', mkv: 'video/x-matroska' };
66
66
  const contentType = mimeMap[ext] || 'video/mp4';
67
+ // Get real video duration from file (ffprobe)
68
+ if (!videoDuration) {
69
+ try {
70
+ const { execSync } = await import('node:child_process');
71
+ const probe = execSync(`ffprobe -v error -show_entries format=duration -of csv=p=0 "${videoPath}"`, { encoding: 'utf-8' });
72
+ videoDuration = parseFloat(probe.trim()) || 0;
73
+ }
74
+ catch { /* ffprobe not available or failed — duration stays 0 */ }
75
+ }
67
76
  // Step 2: Create project + upload
68
77
  const spinner = ora('Creating project...').start();
69
78
  const createResult = await apiCall('create-project', {
@@ -87,7 +96,7 @@ export async function runCommand(manifestPath, opts) {
87
96
  await apiCall('confirm-upload', {
88
97
  projectId: createResult.projectId,
89
98
  storage_key: createResult.storage_key,
90
- video_duration: videoDuration || undefined,
99
+ video_duration: videoDuration > 0 ? videoDuration : undefined,
91
100
  video_width: videoWidth,
92
101
  video_height: videoHeight,
93
102
  });
package/dist/index.js CHANGED
@@ -7,7 +7,7 @@ import { statusCommand } from './commands/status.js';
7
7
  const program = new Command()
8
8
  .name('vorec')
9
9
  .description('Turn screen recordings into narrated tutorials')
10
- .version('0.10.0');
10
+ .version('0.11.0');
11
11
  program
12
12
  .command('init')
13
13
  .description('Save your Vorec API key')
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vorec/cli",
3
- "version": "0.10.0",
3
+ "version": "0.11.0",
4
4
  "description": "Turn screen recordings into narrated tutorials — CLI for AI coding agents",
5
5
  "type": "module",
6
6
  "bin": {