@nodaro/cli 1.45.3 → 1.46.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.
- package/dist/index.js +67 -5
- package/dist/index.js.map +1 -1
- package/package.json +4 -4
package/dist/index.js
CHANGED
|
@@ -17,6 +17,7 @@ import checkbox from '@inquirer/checkbox';
|
|
|
17
17
|
import input from '@inquirer/input';
|
|
18
18
|
import { CHARACTER_STYLES } from '@nodaro/shared/entities';
|
|
19
19
|
import { TRANSCRIBE_PROVIDERS, transcribeLaneSupportsWordTimestamps, DIALOGUE_PROVIDERS, dialogueStabilityAccepted, dialogueProviderOf, getDialogueCapabilities, TRANSCRIBE_LANES, DEFAULT_TRANSCRIBE_PROVIDER } from '@nodaro/shared/models';
|
|
20
|
+
import { VOICE_FAVORITE_TYPES } from '@nodaro/shared/pipeline';
|
|
20
21
|
import { OVERLAY_ANCHORS, OVERLAY_PLATFORM_IDS, GENERATE_MASK_LIMITS, DEFAULT_VIDEO_MASK_PROVIDER, VIDEO_MASK_PROVIDERS, VIDEO_MASK_LIMITS, MASK_COMPOSITE_BOUNDS, MASK_COMPOSITE_DEFAULTS, MASK_COMPOSITE_BACKGROUND_FITS, MASK_COMPOSITE_AUDIO_SOURCES, MASK_COMPOSITE_FILLS } from '@nodaro/shared/media';
|
|
21
22
|
import { ALL_CAPTION_STYLES, DEFAULT_CAPTION_LOOK, CAPTION_LOOK_IDS, CAPTION_MAX_WORDS_PER_LINE_MIN, CAPTION_MAX_WORDS_PER_LINE_MAX, SUPPORTED_FONT_NAMES } from '@nodaro/shared/captions';
|
|
22
23
|
import { VIDEO_OVERLAY_PRESET_IDS, VIDEO_OVERLAY_CORNERS, VIDEO_OVERLAY_OUTPUT_ASPECTS, isVideoOverlayPresetId, isVideoOverlayCorner, isVideoOverlayOutputAspect, VIDEO_OVERLAY_FITS } from '@nodaro/shared/video';
|
|
@@ -41,7 +42,7 @@ var require_package = __commonJS({
|
|
|
41
42
|
"package.json"(exports$1, module) {
|
|
42
43
|
module.exports = {
|
|
43
44
|
name: "@nodaro/cli",
|
|
44
|
-
version: "1.
|
|
45
|
+
version: "1.46.0",
|
|
45
46
|
description: "Command-line interface for Nodaro \u2014 list and run workflows, inspect jobs and executions, manage projects from the terminal.",
|
|
46
47
|
type: "module",
|
|
47
48
|
license: "Apache-2.0",
|
|
@@ -82,11 +83,11 @@ var require_package = __commonJS({
|
|
|
82
83
|
"@inquirer/confirm": "^6.0.12",
|
|
83
84
|
"@inquirer/input": "^5.0.12",
|
|
84
85
|
"@inquirer/select": "^5.1.4",
|
|
85
|
-
"@nodaro/sdk": "^2.
|
|
86
|
-
"@nodaro/shared": "^3.
|
|
86
|
+
"@nodaro/sdk": "^2.66.0",
|
|
87
|
+
"@nodaro/shared": "^3.56.0",
|
|
87
88
|
commander: "^12.1.0",
|
|
88
89
|
picocolors: "^1.1.1",
|
|
89
|
-
"@nodaro/prompts": "^1.
|
|
90
|
+
"@nodaro/prompts": "^1.51.0"
|
|
90
91
|
},
|
|
91
92
|
devDependencies: {
|
|
92
93
|
tsup: "^8.5.0",
|
|
@@ -413,7 +414,7 @@ function saveWorkspace(profileName, workspaceId) {
|
|
|
413
414
|
}
|
|
414
415
|
|
|
415
416
|
// src/client.ts
|
|
416
|
-
var CLI_VERSION = "1.
|
|
417
|
+
var CLI_VERSION = "1.46.0" ;
|
|
417
418
|
function buildPublicClient(opts = {}) {
|
|
418
419
|
const { profile } = getProfile(opts.profile);
|
|
419
420
|
return createClient({
|
|
@@ -1429,6 +1430,19 @@ function jobsCommand() {
|
|
|
1429
1430
|
handleError(err);
|
|
1430
1431
|
}
|
|
1431
1432
|
});
|
|
1433
|
+
cmd.command("rename <id> [title]").description("name one of your jobs (one line of plain text, up to 120 characters), or clear its name with --clear").option("--clear", "remove the name").option("--profile <name>").option("--json").action(async (id, title, opts) => {
|
|
1434
|
+
try {
|
|
1435
|
+
if (!opts.clear && (title === void 0 || title.trim() === "")) {
|
|
1436
|
+
throw new Error("give the name, or --clear to remove it");
|
|
1437
|
+
}
|
|
1438
|
+
const client = buildClient(opts.profile);
|
|
1439
|
+
const result = await client.jobs.rename(id, opts.clear ? null : title);
|
|
1440
|
+
if (opts.json) emit(result, opts);
|
|
1441
|
+
else success(result.data.title ? `named job ${id} "${result.data.title}"` : `cleared the name of job ${id}`);
|
|
1442
|
+
} catch (err) {
|
|
1443
|
+
handleError(err);
|
|
1444
|
+
}
|
|
1445
|
+
});
|
|
1432
1446
|
cmd.command("cancel <id>").description("cancel a pending or running job").option("--profile <name>").option("--json").action(async (id, opts) => {
|
|
1433
1447
|
try {
|
|
1434
1448
|
const client = buildClient(opts.profile);
|
|
@@ -3070,6 +3084,54 @@ Examples:
|
|
|
3070
3084
|
handleError(err);
|
|
3071
3085
|
}
|
|
3072
3086
|
});
|
|
3087
|
+
cmd.command("favorites").description("list your favorite voices, newest first (premade, library or clone), with the voice_id to pass to --voice").option("--profile <name>").option("--json").action(async (opts) => {
|
|
3088
|
+
try {
|
|
3089
|
+
const favorites = await buildClient(opts.profile).voices.listFavorites();
|
|
3090
|
+
if (opts.json) {
|
|
3091
|
+
emit(favorites, opts);
|
|
3092
|
+
return;
|
|
3093
|
+
}
|
|
3094
|
+
table(
|
|
3095
|
+
favorites.map((f) => ({ name: f.name, voice_id: f.voiceId, type: f.voiceType, starred: f.createdAt })),
|
|
3096
|
+
["name", "voice_id", "type", "starred"]
|
|
3097
|
+
);
|
|
3098
|
+
dim(`${favorites.length} favorite${favorites.length === 1 ? "" : "s"} \u2014 pass voice_id to --voice / --voices`);
|
|
3099
|
+
} catch (err) {
|
|
3100
|
+
handleError(err);
|
|
3101
|
+
}
|
|
3102
|
+
});
|
|
3103
|
+
cmd.command("favorite <voiceId>").description("star a voice (a premade voice, a Voice Library voice or one of your clones) \u2014 idempotent").requiredOption("--name <name>", "the voice's name, as your favorites list will show it").requiredOption("--type <type>", "what the voice is: premade | library | custom (a library voice starred as premade would render on the wrong path)").option("--preview <url>", "the voice's preview audio URL, if you have it").option("--profile <name>").option("--json").action(async (voiceId, opts) => {
|
|
3104
|
+
try {
|
|
3105
|
+
if (!VOICE_FAVORITE_TYPES.includes(opts.type)) {
|
|
3106
|
+
throw new Error(`--type must be ${VOICE_FAVORITE_TYPES.join(", ")} (got "${opts.type}")`);
|
|
3107
|
+
}
|
|
3108
|
+
const favorite = await buildClient(opts.profile).voices.favorite({
|
|
3109
|
+
voiceId,
|
|
3110
|
+
voiceType: opts.type,
|
|
3111
|
+
name: opts.name,
|
|
3112
|
+
...opts.preview ? { previewUrl: opts.preview } : {}
|
|
3113
|
+
});
|
|
3114
|
+
if (opts.json) {
|
|
3115
|
+
emit(favorite, opts);
|
|
3116
|
+
return;
|
|
3117
|
+
}
|
|
3118
|
+
dim(`Starred ${favorite.name} (${favorite.voiceId}).`);
|
|
3119
|
+
} catch (err) {
|
|
3120
|
+
handleError(err);
|
|
3121
|
+
}
|
|
3122
|
+
});
|
|
3123
|
+
cmd.command("unfavorite <voiceId>").description("unstar a voice \u2014 idempotent").option("--profile <name>").option("--json").action(async (voiceId, opts) => {
|
|
3124
|
+
try {
|
|
3125
|
+
await buildClient(opts.profile).voices.unfavorite(voiceId);
|
|
3126
|
+
if (opts.json) {
|
|
3127
|
+
emit({ success: true, voiceId }, opts);
|
|
3128
|
+
return;
|
|
3129
|
+
}
|
|
3130
|
+
dim(`Unstarred ${voiceId}.`);
|
|
3131
|
+
} catch (err) {
|
|
3132
|
+
handleError(err);
|
|
3133
|
+
}
|
|
3134
|
+
});
|
|
3073
3135
|
const clones = new Command("clones").description("manage the voice clones you already have (list / delete) \u2014 cloning new voices is no longer offered");
|
|
3074
3136
|
clones.command("list").description("list your voice clones").option("--profile <name>").option("--json").action(async (opts) => {
|
|
3075
3137
|
try {
|