@staff0rd/assist 0.89.1 → 0.89.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 +8 -6
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -6,7 +6,7 @@ import { Command } from "commander";
|
|
|
6
6
|
// package.json
|
|
7
7
|
var package_default = {
|
|
8
8
|
name: "@staff0rd/assist",
|
|
9
|
-
version: "0.89.
|
|
9
|
+
version: "0.89.2",
|
|
10
10
|
type: "module",
|
|
11
11
|
main: "dist/index.js",
|
|
12
12
|
bin: {
|
|
@@ -2250,6 +2250,11 @@ function printVerboseDetails(item) {
|
|
|
2250
2250
|
}
|
|
2251
2251
|
console.log();
|
|
2252
2252
|
}
|
|
2253
|
+
function filterItems(items, options2) {
|
|
2254
|
+
if (options2.status) return items.filter((i) => i.status === options2.status);
|
|
2255
|
+
if (!options2.all) return items.filter((i) => i.status !== "done");
|
|
2256
|
+
return items;
|
|
2257
|
+
}
|
|
2253
2258
|
async function list2(options2) {
|
|
2254
2259
|
const backlogPath = getBacklogPath();
|
|
2255
2260
|
if (!existsSync14(backlogPath)) {
|
|
@@ -2260,10 +2265,7 @@ async function list2(options2) {
|
|
|
2260
2265
|
);
|
|
2261
2266
|
return;
|
|
2262
2267
|
}
|
|
2263
|
-
|
|
2264
|
-
if (options2.status) {
|
|
2265
|
-
items = items.filter((item) => item.status === options2.status);
|
|
2266
|
-
}
|
|
2268
|
+
const items = filterItems(loadBacklog(), options2);
|
|
2267
2269
|
if (items.length === 0) {
|
|
2268
2270
|
console.log(chalk27.dim("Backlog is empty."));
|
|
2269
2271
|
return;
|
|
@@ -2460,7 +2462,7 @@ async function web(options2) {
|
|
|
2460
2462
|
function registerBacklog(program2) {
|
|
2461
2463
|
const backlogCommand = program2.command("backlog").description("Manage a backlog of work items").action(() => web({ port: "3000" }));
|
|
2462
2464
|
backlogCommand.command("init").description("Create an empty assist.backlog.yml").action(init6);
|
|
2463
|
-
backlogCommand.command("list").description("List all backlog items").option("--status <type>", "Filter by status (todo, in-progress, done)").option("-v, --verbose", "Show all item details").action(list2);
|
|
2465
|
+
backlogCommand.command("list").description("List all backlog items").option("--status <type>", "Filter by status (todo, in-progress, done)").option("-a, --all", "Include done items").option("-v, --verbose", "Show all item details").action(list2);
|
|
2464
2466
|
backlogCommand.command("add").description("Add a new backlog item").action(add);
|
|
2465
2467
|
backlogCommand.command("start <id>").description("Set a backlog item to in-progress").action(start);
|
|
2466
2468
|
backlogCommand.command("done <id>").description("Set a backlog item to done").action(done);
|