@pebblehouse/odin-cli 0.10.1 → 0.10.2
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 +14 -2
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -464,11 +464,23 @@ plansCmd.command("create <slug> <title>").description("Create a plan").option("-
|
|
|
464
464
|
process.stdout.write(JSON.stringify(res) + "\n");
|
|
465
465
|
if (res.error) process.exit(1);
|
|
466
466
|
});
|
|
467
|
-
plansCmd.command("update <slug> <id>").description("Update a plan").option("--title <title>", "New title").option("--description <description>", "New description").option("--status <status>", "Plan status (active|
|
|
467
|
+
plansCmd.command("update <slug> <id>").description("Update a plan").option("--title <title>", "New title").option("--description <description>", "New description").option("--status <status>", "Plan status (active|done|archived)").option("--bet-id <uuid>", "Link plan to a bet").option("--task-id <uuid>", "Link plan to a task").option("--clear-bet", "Clear the bet link").option("--clear-task", "Clear the task link").action(async (slug, id, opts) => {
|
|
468
|
+
if (opts.betId && opts.clearBet) {
|
|
469
|
+
process.stderr.write("Cannot combine --bet-id with --clear-bet\n");
|
|
470
|
+
process.exit(1);
|
|
471
|
+
}
|
|
472
|
+
if (opts.taskId && opts.clearTask) {
|
|
473
|
+
process.stderr.write("Cannot combine --task-id with --clear-task\n");
|
|
474
|
+
process.exit(1);
|
|
475
|
+
}
|
|
468
476
|
const body = {};
|
|
469
477
|
if (opts.title) body.title = opts.title;
|
|
470
478
|
if (opts.description) body.description = opts.description;
|
|
471
479
|
if (opts.status) body.status = opts.status;
|
|
480
|
+
if (opts.betId) body.bet_id = opts.betId;
|
|
481
|
+
else if (opts.clearBet) body.bet_id = null;
|
|
482
|
+
if (opts.taskId) body.task_id = opts.taskId;
|
|
483
|
+
else if (opts.clearTask) body.task_id = null;
|
|
472
484
|
const res = await apiRequest(`/pebbles/${slug}/plans/${id}`, {
|
|
473
485
|
method: "PUT",
|
|
474
486
|
body
|
|
@@ -495,7 +507,7 @@ plansCmd.command("add-phase <slug> <planId> <title>").description("Add a phase t
|
|
|
495
507
|
process.stdout.write(JSON.stringify(res) + "\n");
|
|
496
508
|
if (res.error) process.exit(1);
|
|
497
509
|
});
|
|
498
|
-
plansCmd.command("update-phase <slug> <planId> <phaseId>").description("Update a phase").option("--title <title>", "Phase title").option("--status <status>", "Phase status (pending|in_progress|
|
|
510
|
+
plansCmd.command("update-phase <slug> <planId> <phaseId>").description("Update a phase").option("--title <title>", "Phase title").option("--status <status>", "Phase status (pending|in_progress|done|skipped)").option("--notes <notes>", "Phase notes").option("--description <description>", "Phase description").action(async (slug, planId, phaseId, opts) => {
|
|
499
511
|
const body = {};
|
|
500
512
|
if (opts.title) body.title = opts.title;
|
|
501
513
|
if (opts.status) body.status = opts.status;
|