videodraft 0.19.0 → 0.19.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/index.js +24 -7
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -24,8 +24,8 @@ function readVersionFromDisk() {
|
|
|
24
24
|
}
|
|
25
25
|
}
|
|
26
26
|
function resolveVersion() {
|
|
27
|
-
if ("0.19.
|
|
28
|
-
return "0.19.
|
|
27
|
+
if ("0.19.1") {
|
|
28
|
+
return "0.19.1";
|
|
29
29
|
}
|
|
30
30
|
return readVersionFromDisk();
|
|
31
31
|
}
|
|
@@ -2694,6 +2694,11 @@ var SEED_AUDIO_SAMPLE_RATES = [
|
|
|
2694
2694
|
var SEED_AUDIO_PROMPT_MAX_CHARS = 2048;
|
|
2695
2695
|
var SEED_AUDIO_MAX_REFERENCES = 3;
|
|
2696
2696
|
var UUID_RE = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;
|
|
2697
|
+
function normalizeGeminiOmniResolutionOption(value) {
|
|
2698
|
+
if (typeof value !== "string") return void 0;
|
|
2699
|
+
const normalized = value.trim().toLowerCase();
|
|
2700
|
+
return normalized === "360p" || normalized === "720p" || normalized === "1080p" || normalized === "4k" ? normalized : void 0;
|
|
2701
|
+
}
|
|
2697
2702
|
function inferDubMediaType(source, explicit) {
|
|
2698
2703
|
if (explicit) {
|
|
2699
2704
|
if (explicit === "audio" || explicit === "video") return explicit;
|
|
@@ -2916,7 +2921,7 @@ function estimateVideoModel(opts, duration) {
|
|
|
2916
2921
|
if (seedance25Task) return "seedance-2.5";
|
|
2917
2922
|
const seedanceTask = duration !== void 0 && duration > 10 || referenceVideoCount > 3 || referenceAudioCount > 0 || opts.quality === "mini" || opts.quality === "standard";
|
|
2918
2923
|
if (seedanceTask) return "seedance-2";
|
|
2919
|
-
const veoTask = opts.audio === false || opts.quality === "fast" || opts.quality === "quality" || typeof opts.resolution === "string" && !
|
|
2924
|
+
const veoTask = opts.audio === false || opts.quality === "fast" || opts.quality === "quality" || typeof opts.resolution === "string" && !normalizeGeminiOmniResolutionOption(opts.resolution);
|
|
2920
2925
|
if (veoTask) {
|
|
2921
2926
|
return referenceVideoCount > 0 ? "seedance-2" : "google-veo3.1";
|
|
2922
2927
|
}
|
|
@@ -3318,6 +3323,12 @@ function registerGenerateCommands(program) {
|
|
|
3318
3323
|
)) {
|
|
3319
3324
|
opts.model = "minimax-h3-max";
|
|
3320
3325
|
}
|
|
3326
|
+
if ((!opts.model || opts.model === "gemini-omni-1.1-flash") && opts.resolution) {
|
|
3327
|
+
const normalizedResolution = normalizeGeminiOmniResolutionOption(
|
|
3328
|
+
opts.resolution
|
|
3329
|
+
);
|
|
3330
|
+
if (normalizedResolution) opts.resolution = normalizedResolution;
|
|
3331
|
+
}
|
|
3321
3332
|
if (seed !== void 0 && seed < 0 && opts.model !== "minimax-h3-max") {
|
|
3322
3333
|
throw new CliError(
|
|
3323
3334
|
"--seed must be non-negative unless --model minimax-h3-max is selected.",
|
|
@@ -3433,9 +3444,9 @@ function registerGenerateCommands(program) {
|
|
|
3433
3444
|
EXIT.USAGE
|
|
3434
3445
|
);
|
|
3435
3446
|
}
|
|
3436
|
-
if (opts.resolution && !
|
|
3447
|
+
if (opts.resolution && !normalizeGeminiOmniResolutionOption(opts.resolution)) {
|
|
3437
3448
|
throw new CliError(
|
|
3438
|
-
"gemini-omni-1.1-flash --resolution must be 360p, 720p, 1080p, or
|
|
3449
|
+
"gemini-omni-1.1-flash --resolution must be 360p, 720p, 1080p, or 4k.",
|
|
3439
3450
|
EXIT.USAGE
|
|
3440
3451
|
);
|
|
3441
3452
|
}
|
|
@@ -6189,10 +6200,16 @@ function registerEditCommands(program) {
|
|
|
6189
6200
|
if (opts.quality && !["standard", "pro"].includes(opts.quality)) {
|
|
6190
6201
|
throw new UsageError('--quality must be "standard" or "pro".');
|
|
6191
6202
|
}
|
|
6192
|
-
if (model === "gemini-omni-1.1-flash" && opts.resolution && !
|
|
6203
|
+
if (model === "gemini-omni-1.1-flash" && opts.resolution && !normalizeGeminiOmniResolutionOption(opts.resolution)) {
|
|
6193
6204
|
throw new UsageError(
|
|
6194
|
-
'gemini-omni-1.1-flash --resolution must be "360p", "720p", "1080p", or "
|
|
6205
|
+
'gemini-omni-1.1-flash --resolution must be "360p", "720p", "1080p", or "4k".'
|
|
6206
|
+
);
|
|
6207
|
+
}
|
|
6208
|
+
if ((!model || model === "gemini-omni-1.1-flash") && opts.resolution) {
|
|
6209
|
+
const normalizedResolution = normalizeGeminiOmniResolutionOption(
|
|
6210
|
+
opts.resolution
|
|
6195
6211
|
);
|
|
6212
|
+
if (normalizedResolution) opts.resolution = normalizedResolution;
|
|
6196
6213
|
}
|
|
6197
6214
|
if (opts.preserveAudio && (model === "grok-imagine-video-edit" || model === "gemini-omni-1.1-flash")) {
|
|
6198
6215
|
throw new UsageError(
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "videodraft",
|
|
3
|
-
"version": "0.19.
|
|
3
|
+
"version": "0.19.1",
|
|
4
4
|
"description": "Official VideoDraft CLI — create AI videos, images and audio from your terminal. Agent-friendly: --json everywhere, stable exit codes, async job polling.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|