@pebblehouse/odin-cli 0.2.2 → 0.2.4
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 +15 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -329,6 +329,18 @@ plansCmd.command("create <slug> <title>").description("Create a plan").option("-
|
|
|
329
329
|
process.stdout.write(JSON.stringify(res) + "\n");
|
|
330
330
|
if (res.error) process.exit(1);
|
|
331
331
|
});
|
|
332
|
+
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|completed|archived)").action(async (slug, id, opts) => {
|
|
333
|
+
const body = {};
|
|
334
|
+
if (opts.title) body.title = opts.title;
|
|
335
|
+
if (opts.description) body.description = opts.description;
|
|
336
|
+
if (opts.status) body.status = opts.status;
|
|
337
|
+
const res = await apiRequest(`/pebbles/${slug}/plans/${id}`, {
|
|
338
|
+
method: "PUT",
|
|
339
|
+
body
|
|
340
|
+
});
|
|
341
|
+
process.stdout.write(JSON.stringify(res) + "\n");
|
|
342
|
+
if (res.error) process.exit(1);
|
|
343
|
+
});
|
|
332
344
|
plansCmd.command("delete <slug> <id>").description("Delete a plan").action(async (slug, id) => {
|
|
333
345
|
const res = await apiRequest(`/pebbles/${slug}/plans/${id}`, {
|
|
334
346
|
method: "DELETE"
|
|
@@ -562,6 +574,9 @@ program.addCommand(conversationsCmd);
|
|
|
562
574
|
program.addCommand(specsCmd);
|
|
563
575
|
program.addCommand(executionsCmd);
|
|
564
576
|
program.addCommand(versionsCmd);
|
|
577
|
+
process.on("exit", () => {
|
|
578
|
+
process.stderr.write("\n\n\n\n\n");
|
|
579
|
+
});
|
|
565
580
|
program.parseAsync(process.argv).catch((err) => {
|
|
566
581
|
console.error(err instanceof Error ? err.message : err);
|
|
567
582
|
process.exit(1);
|