@flatkey-ai/cli 0.2.8 → 0.2.9
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/package.json +1 -1
- package/src/api.js +8 -0
- package/src/cli.js +1 -1
- package/src/help.js +2 -0
package/package.json
CHANGED
package/src/api.js
CHANGED
|
@@ -97,6 +97,7 @@ export function planVideoRequest(options) {
|
|
|
97
97
|
resolution,
|
|
98
98
|
quality: resolution,
|
|
99
99
|
fps: parseOptionalInteger(options.fps),
|
|
100
|
+
generate_audio: parseOptionalBoolean(options.generate_audio) ?? true,
|
|
100
101
|
temp_url: true,
|
|
101
102
|
images: !isSeedanceModel(model) && imageUrls.length > 0 ? imageUrls : undefined,
|
|
102
103
|
});
|
|
@@ -363,6 +364,13 @@ function parseOptionalFloat(value) {
|
|
|
363
364
|
return Number.parseFloat(value);
|
|
364
365
|
}
|
|
365
366
|
|
|
367
|
+
function parseOptionalBoolean(value) {
|
|
368
|
+
if (value === undefined) return undefined;
|
|
369
|
+
if (value === true || value === "true") return true;
|
|
370
|
+
if (value === false || value === "false") return false;
|
|
371
|
+
throw new Error(`Invalid boolean value: ${value}. Allowed values: true, false`);
|
|
372
|
+
}
|
|
373
|
+
|
|
366
374
|
function optionValue(options, ...keys) {
|
|
367
375
|
for (const key of keys) {
|
|
368
376
|
if (options[key] !== undefined) return options[key];
|
package/src/cli.js
CHANGED
|
@@ -40,7 +40,7 @@ const COMMAND_OPTIONS = {
|
|
|
40
40
|
"text generate": new Set(["model", "prompt"]),
|
|
41
41
|
version: new Set([]),
|
|
42
42
|
video: new Set([]),
|
|
43
|
-
"video generate": new Set(["aspect", "duration", "first_frame", "first_frame_url", "fps", "image", "image_url", "last_frame", "last_frame_url", "model", "prompt", "ratio", "resolution", "video_url"]),
|
|
43
|
+
"video generate": new Set(["aspect", "duration", "first_frame", "first_frame_url", "fps", "generate_audio", "image", "image_url", "last_frame", "last_frame_url", "model", "prompt", "ratio", "resolution", "video_url"]),
|
|
44
44
|
};
|
|
45
45
|
|
|
46
46
|
export function parseArgv(argv) {
|
package/src/help.js
CHANGED
|
@@ -218,6 +218,7 @@ Options:
|
|
|
218
218
|
--duration <seconds> Video duration
|
|
219
219
|
--ratio <value> 16:9, 9:16, 4:3, 3:4, 21:9, or 1:1
|
|
220
220
|
--resolution <value> 480p, 720p, or 1080p
|
|
221
|
+
--generate-audio <true|false> Generate audio, default true
|
|
221
222
|
--image <file> Upload local reference image, repeatable
|
|
222
223
|
--image-url <url> Add reference image URL, repeatable
|
|
223
224
|
--first-frame <file> Upload local first frame image
|
|
@@ -235,6 +236,7 @@ Options:
|
|
|
235
236
|
--duration <seconds> Video duration
|
|
236
237
|
--ratio <value> 16:9, 9:16, 4:3, 3:4, 21:9, or 1:1
|
|
237
238
|
--resolution <value> 480p, 720p, or 1080p
|
|
239
|
+
--generate-audio <true|false> Generate audio, default true
|
|
238
240
|
--image <file> Upload local reference image, repeatable
|
|
239
241
|
--image-url <url> Add reference image URL, repeatable
|
|
240
242
|
--first-frame <file> Upload local first frame image
|