@zinn-dev/cli 0.13.0 → 0.14.0
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/README.md +2 -0
- package/package.json +1 -1
- package/src/routes/label-router.ts +3 -2
package/README.md
CHANGED
|
@@ -93,6 +93,8 @@ Label names are case-sensitive, and the whitespace from input is trimmed.
|
|
|
93
93
|
|
|
94
94
|
Descriptions default to an empty string and the label colors default to white. Available colors are _red_, _green_, _yellow_, _blue_, _magenta_, _cyan_, _white_, and _gray_.
|
|
95
95
|
|
|
96
|
+
`label create` and `label list` print each label name in its color. `--json` output shows the color as a value instead.
|
|
97
|
+
|
|
96
98
|
Task creation and edits apply content and label changes together, or roll back together on failure.
|
|
97
99
|
Note that label changes also update the task's modification timestamp. Archived tasks can also have their labels edited.
|
|
98
100
|
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { Label } from "@zinn-dev/core";
|
|
2
2
|
import type { RouteDef } from "../types";
|
|
3
3
|
|
|
4
|
-
import { parseArgs } from "node:util";
|
|
4
|
+
import { parseArgs, styleText } from "node:util";
|
|
5
5
|
import { label, labelCreateSchema, labelDeleteSchema } from "@zinn-dev/core";
|
|
6
6
|
|
|
7
7
|
import {
|
|
@@ -19,7 +19,8 @@ function presentLabel(labelMatch: Label): PresentedLabel {
|
|
|
19
19
|
}
|
|
20
20
|
|
|
21
21
|
function formatLabel(presented: PresentedLabel) {
|
|
22
|
-
|
|
22
|
+
const coloredName = styleText(presented.color, presented.name);
|
|
23
|
+
return `${coloredName} | ${presented.description}`;
|
|
23
24
|
}
|
|
24
25
|
|
|
25
26
|
export const labelRouter = {
|