@prave/cli 1.4.3 → 1.4.5
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 +27 -0
- package/dist/index.js +7 -1
- package/package.json +2 -2
package/dist/commands/run.js
CHANGED
|
@@ -452,3 +452,30 @@ function safeJson(text) {
|
|
|
452
452
|
return null;
|
|
453
453
|
}
|
|
454
454
|
}
|
|
455
|
+
/**
|
|
456
|
+
* `prave run trigger <slug>` — fire a single ad-hoc execution outside
|
|
457
|
+
* the cron schedule. Refused with 409 when another execution is in
|
|
458
|
+
* flight (same single-flight guard the dashboard's "Run now" button
|
|
459
|
+
* uses). Returns immediately after enqueueing — tail with
|
|
460
|
+
* `prave run logs <slug>` after a few seconds.
|
|
461
|
+
*/
|
|
462
|
+
export async function runTriggerCommand(slug) {
|
|
463
|
+
if (!(await requireAuth('prave run trigger')))
|
|
464
|
+
return;
|
|
465
|
+
const spinner = ora(`Triggering ${slug}…`).start();
|
|
466
|
+
try {
|
|
467
|
+
await api.post(`/api/v1/runs/${encodeURIComponent(slug)}/trigger`, undefined, true);
|
|
468
|
+
spinner.succeed(`Triggered ${chalk.bold(slug)} — log will appear in a few seconds.`);
|
|
469
|
+
console.log(chalk.dim(` Tail it with `) +
|
|
470
|
+
chalk.cyan(`prave run logs ${slug}`) +
|
|
471
|
+
chalk.dim(` (or watch the dashboard).`));
|
|
472
|
+
}
|
|
473
|
+
catch (err) {
|
|
474
|
+
if (err instanceof ApiError && err.status === 409) {
|
|
475
|
+
spinner.warn(`An execution is already in flight for ${slug} — wait for it to finish, then re-run.`);
|
|
476
|
+
return;
|
|
477
|
+
}
|
|
478
|
+
spinner.fail(err.message);
|
|
479
|
+
process.exit(1);
|
|
480
|
+
}
|
|
481
|
+
}
|
package/dist/index.js
CHANGED
|
@@ -15,7 +15,7 @@ import { mcpInstallCommand } from './commands/mcp-install.js';
|
|
|
15
15
|
import { mcpServerCommand } from './commands/mcp-server.js';
|
|
16
16
|
import { optimizeCommand } from './commands/optimize.js';
|
|
17
17
|
import { overviewCommand } from './commands/overview.js';
|
|
18
|
-
import { runDeployCommand, runListCommand, runLogsCommand, } from './commands/run.js';
|
|
18
|
+
import { runDeployCommand, runListCommand, runLogsCommand, runTriggerCommand, } from './commands/run.js';
|
|
19
19
|
import { searchCommand } from './commands/search.js';
|
|
20
20
|
import { settingsCommand } from './commands/settings.js';
|
|
21
21
|
import { syncCommand } from './commands/sync.js';
|
|
@@ -171,6 +171,10 @@ run
|
|
|
171
171
|
.command('logs <slug>')
|
|
172
172
|
.description('Print the latest execution log for a scheduled run.')
|
|
173
173
|
.action(runLogsCommand);
|
|
174
|
+
run
|
|
175
|
+
.command('trigger <slug>')
|
|
176
|
+
.description('Fire a one-shot execution outside the cron schedule. Refused with 409 if another execution is already in flight. Tail with `prave run logs <slug>` afterwards.')
|
|
177
|
+
.action(runTriggerCommand);
|
|
174
178
|
program
|
|
175
179
|
.command('mcp install')
|
|
176
180
|
.alias('mcp-install')
|
|
@@ -217,6 +221,8 @@ program
|
|
|
217
221
|
'',
|
|
218
222
|
'Runs (scheduled cron on Prave)',
|
|
219
223
|
' prave run deploy # bundle cwd, upload, open wizard',
|
|
224
|
+
' prave run update <slug> # re-upload bundle for an existing run',
|
|
225
|
+
' prave run trigger <slug> # fire one execution outside the cron',
|
|
220
226
|
' prave run list # your scheduled runs',
|
|
221
227
|
' prave run logs <slug> # tail latest execution log',
|
|
222
228
|
'',
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@prave/cli",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.5",
|
|
4
4
|
"description": "Prave CLI — discover, install, version, test, and ship Claude Skills. The developer platform for the complete Skill lifecycle.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"keywords": [
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
"ora": "^8.0.1",
|
|
55
55
|
"tar": "^7.4.3",
|
|
56
56
|
"undici": "^6.18.0",
|
|
57
|
-
"@prave/shared": "1.4.
|
|
57
|
+
"@prave/shared": "1.4.5"
|
|
58
58
|
},
|
|
59
59
|
"devDependencies": {
|
|
60
60
|
"@types/node": "^20.12.7",
|