@vorec/cli 1.1.0 → 1.1.1

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.
@@ -62,23 +62,36 @@ export async function runCommand(manifestPath, opts) {
62
62
  }
63
63
  // Step 2: Create project + upload
64
64
  const spinner = ora('Creating project...').start();
65
- const createResult = await apiCall('create-project', {
66
- title: manifest.title,
67
- contentType,
68
- fileSize,
69
- actions: trackedActions.map(a => ({
70
- type: a.interaction_type || a.type,
71
- timestamp: a.timestamp,
72
- coordinates: a.coordinates,
73
- target: a.target,
74
- description: a.description,
75
- context: a.context,
76
- typed_text: a.typed_text,
77
- selected_value: a.selected_value,
78
- })),
79
- });
80
- spinner.text = 'Uploading video...';
81
- await uploadVideo(createResult.upload_url, videoPath, contentType);
65
+ let createResult;
66
+ try {
67
+ createResult = await apiCall('create-project', {
68
+ title: manifest.title,
69
+ contentType,
70
+ fileSize,
71
+ actions: trackedActions.map(a => ({
72
+ type: a.interaction_type || a.type,
73
+ timestamp: a.timestamp,
74
+ coordinates: a.coordinates,
75
+ target: a.target,
76
+ description: a.description,
77
+ context: a.context,
78
+ typed_text: a.typed_text,
79
+ selected_value: a.selected_value,
80
+ })),
81
+ });
82
+ }
83
+ catch (err) {
84
+ spinner.fail(err.message);
85
+ process.exit(1);
86
+ }
87
+ try {
88
+ spinner.text = 'Uploading video...';
89
+ await uploadVideo(createResult.upload_url, videoPath, contentType);
90
+ }
91
+ catch (err) {
92
+ spinner.fail(`Upload failed: ${err.message}`);
93
+ process.exit(1);
94
+ }
82
95
  // Upload thumbnail if available
83
96
  let thumbnailKey;
84
97
  if (thumbPath) {
@@ -94,15 +107,21 @@ export async function runCommand(manifestPath, opts) {
94
107
  }
95
108
  catch { /* thumbnail upload failed — not critical */ }
96
109
  }
97
- spinner.text = 'Confirming upload...';
98
- await apiCall('confirm-upload', {
99
- projectId: createResult.projectId,
100
- storage_key: createResult.storage_key,
101
- video_duration: videoDuration > 0 ? videoDuration : undefined,
102
- video_width: videoWidth,
103
- video_height: videoHeight,
104
- thumbnail_key: thumbnailKey,
105
- });
110
+ try {
111
+ spinner.text = 'Confirming upload...';
112
+ await apiCall('confirm-upload', {
113
+ projectId: createResult.projectId,
114
+ storage_key: createResult.storage_key,
115
+ video_duration: videoDuration > 0 ? videoDuration : undefined,
116
+ video_width: videoWidth,
117
+ video_height: videoHeight,
118
+ thumbnail_key: thumbnailKey,
119
+ });
120
+ }
121
+ catch (err) {
122
+ spinner.fail(`Confirm failed: ${err.message}`);
123
+ process.exit(1);
124
+ }
106
125
  saveProjectState({
107
126
  projectId: createResult.projectId,
108
127
  storageKey: createResult.storage_key,
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('1.1.0');
10
+ .version('1.1.1');
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": "1.1.0",
3
+ "version": "1.1.1",
4
4
  "description": "Turn screen recordings into narrated tutorials — CLI for AI coding agents",
5
5
  "type": "module",
6
6
  "bin": {