@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.
- package/dist/commands/run.js +45 -26
- package/dist/index.js +1 -1
- package/package.json +1 -1
package/dist/commands/run.js
CHANGED
|
@@ -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
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
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
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
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.
|
|
10
|
+
.version('1.1.1');
|
|
11
11
|
program
|
|
12
12
|
.command('init')
|
|
13
13
|
.description('Save your Vorec API key')
|