@pebblehouse/odin-cli 0.18.2 → 0.18.3
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 +17 -5
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1418,8 +1418,8 @@ tasksCmd.command("delete <slug> <id>").description("Delete a task").action(async
|
|
|
1418
1418
|
import { Command as Command18 } from "commander";
|
|
1419
1419
|
import { readFileSync as readFileSync13 } from "fs";
|
|
1420
1420
|
var roadmapsCmd = new Command18("roadmaps").description("Manage roadmaps");
|
|
1421
|
-
roadmapsCmd.command("list <slug>").description("List roadmaps for a pebble").option("--status <status>", "Filter by status").action(async (slug, opts) => {
|
|
1422
|
-
const params = {};
|
|
1421
|
+
roadmapsCmd.command("list <slug>").description("List roadmaps for a pebble").option("--status <status>", "Filter by status").option("--all", "Include child roadmaps (default: top-level only)").action(async (slug, opts) => {
|
|
1422
|
+
const params = { nesting: opts.all ? "all" : "top" };
|
|
1423
1423
|
if (opts.status) params.status = opts.status;
|
|
1424
1424
|
const res = await apiRequest(`/pebbles/${slug}/roadmaps`, { params });
|
|
1425
1425
|
process.stdout.write(JSON.stringify(res) + "\n");
|
|
@@ -1430,21 +1430,33 @@ roadmapsCmd.command("get <slug> <id>").description("Get a roadmap by ID (include
|
|
|
1430
1430
|
process.stdout.write(JSON.stringify(res) + "\n");
|
|
1431
1431
|
if (res.error) process.exit(1);
|
|
1432
1432
|
});
|
|
1433
|
-
roadmapsCmd.command("create <slug> <title>").description("Create a roadmap").option("--source <source>", "Source agent", "claude-code").option("--content <content>", "Roadmap content").option("--file <path>", "Read content from file").option("--status <status>", "Roadmap status").action(async (slug, title, opts) => {
|
|
1433
|
+
roadmapsCmd.command("create <slug> <title>").description("Create a roadmap").option("--source <source>", "Source agent", "claude-code").option("--content <content>", "Roadmap content").option("--file <path>", "Read content from file").option("--status <status>", "Roadmap status").option("--parent <id>", "Parent roadmap UUID (nesting is capped at 2 levels)").option("--starts-on <date>", "Start date, YYYY-MM-DD").option("--ends-on <date>", "End date, YYYY-MM-DD").action(async (slug, title, opts) => {
|
|
1434
1434
|
const content = opts.file ? readFileSync13(opts.file, "utf-8") : opts.content ?? "";
|
|
1435
1435
|
const res = await apiRequest(`/pebbles/${slug}/roadmaps`, {
|
|
1436
1436
|
method: "POST",
|
|
1437
|
-
body: {
|
|
1437
|
+
body: {
|
|
1438
|
+
title,
|
|
1439
|
+
source: opts.source,
|
|
1440
|
+
content,
|
|
1441
|
+
status: opts.status,
|
|
1442
|
+
parent_roadmap_id: opts.parent,
|
|
1443
|
+
starts_on: opts.startsOn,
|
|
1444
|
+
ends_on: opts.endsOn
|
|
1445
|
+
}
|
|
1438
1446
|
});
|
|
1439
1447
|
process.stdout.write(JSON.stringify(res) + "\n");
|
|
1440
1448
|
if (res.error) process.exit(1);
|
|
1441
1449
|
});
|
|
1442
|
-
roadmapsCmd.command("update <slug> <id>").description("Update a roadmap").option("--title <title>", "New title").option("--content <content>", "New content").option("--file <path>", "Read content from file").option("--status <status>", "New status").action(async (slug, id, opts) => {
|
|
1450
|
+
roadmapsCmd.command("update <slug> <id>").description("Update a roadmap").option("--title <title>", "New title").option("--content <content>", "New content").option("--file <path>", "Read content from file").option("--status <status>", "New status").option("--parent <id>", 'New parent roadmap UUID, or the literal "null" to promote to top level').option("--starts-on <date>", 'New start date YYYY-MM-DD, or the literal "null" to clear').option("--ends-on <date>", 'New end date YYYY-MM-DD, or the literal "null" to clear').action(async (slug, id, opts) => {
|
|
1443
1451
|
const body = {};
|
|
1444
1452
|
if (opts.title) body.title = opts.title;
|
|
1445
1453
|
if (opts.file) body.content = readFileSync13(opts.file, "utf-8");
|
|
1446
1454
|
else if (opts.content) body.content = opts.content;
|
|
1447
1455
|
if (opts.status) body.status = opts.status;
|
|
1456
|
+
const nullable = (v) => v === void 0 ? void 0 : v === "null" ? null : v;
|
|
1457
|
+
if (opts.parent !== void 0) body.parent_roadmap_id = nullable(opts.parent);
|
|
1458
|
+
if (opts.startsOn !== void 0) body.starts_on = nullable(opts.startsOn);
|
|
1459
|
+
if (opts.endsOn !== void 0) body.ends_on = nullable(opts.endsOn);
|
|
1448
1460
|
const res = await apiRequest(`/pebbles/${slug}/roadmaps/${id}`, {
|
|
1449
1461
|
method: "PUT",
|
|
1450
1462
|
body
|