@zinn-dev/cli 0.35.0 → 0.36.1
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
CHANGED
|
@@ -11,6 +11,10 @@ bun add --global @zinn-dev/cli
|
|
|
11
11
|
Zinn stores projects and tasks in the shared local database at `~/.zinn/data/zinn.sqlite`.
|
|
12
12
|
Set `ZINN_DIR` to use another Zinn directory and keep using the same value for commands that should share that database.
|
|
13
13
|
|
|
14
|
+
## Concurrent access
|
|
15
|
+
|
|
16
|
+
Commands on the same machine can share a database on a local filesystem. Zinn waits up to 30 seconds each time the database is locked by another command. If the lock is still held after that wait, the command fails. The command's total running time can exceed 30 seconds. Zinn also briefly retries specific initialization races internally. Initialization errors include the underlying message and code. Existing settings are preserved when several commands initialize the directory together.
|
|
17
|
+
|
|
14
18
|
## Start a project
|
|
15
19
|
|
|
16
20
|
Create a project with a key and optionally provide a name and description:
|
|
@@ -22,7 +26,7 @@ zinn project create MDR --name "Macrodata Refinement" --description "Refine macr
|
|
|
22
26
|
Project keys are stored in **uppercase**. You can create a project without a project name, like `zinn project create MDR`, which will just default to having the key as the project name too.
|
|
23
27
|
Intetionally empty or whitespace project names are rejected.
|
|
24
28
|
|
|
25
|
-
Project descriptions are optional and may contain multiple lines.
|
|
29
|
+
Project descriptions are optional and may contain multiple lines. An omitted, empty or whitespace-only description is stored as `null`. Text containing a non-whitespace character is preserved exactly, including leading and trailing whitespace; the same rule applies to task and label descriptions. Clear an existing description with `zinn project edit <project-key> --description ""`. Project list, view and mutation text show truncated inline description previews. Project JSON includes the full description or `null`.
|
|
26
30
|
|
|
27
31
|
Each project starts with _Backlog_, _TODO_, _In Progress_, _Review_, and _Done_ columns.
|
|
28
32
|
|
|
@@ -152,7 +156,7 @@ For adding or removing multiple labels at the same time, repeat `--label` on cre
|
|
|
152
156
|
Each value is considered as the label name: `--label "needs review"`, so if you have commas, then they are considered parts of names.
|
|
153
157
|
Label names preserve their stored casing, but matching and uniqueness are case-insensitive. For example, `BUG` can match to a label stored as `Bug`, `Bug` or `bug`, but all three canno exist at the same time as three different label entries. Changing only the casing of an existing label is allowed. Whitespace around label names is trimmed.
|
|
154
158
|
|
|
155
|
-
Descriptions default
|
|
159
|
+
Descriptions are `null` by default, and empty or whitespace-only strings are also interpreted as `null`. Clear a label description with `zinn label edit <name> --description ""`. Label colors default to white. Available colors are _red_, _green_, _yellow_, _blue_, _magenta_, _cyan_, _white_, and _gray_.
|
|
156
160
|
|
|
157
161
|
`label create`, `label edit` and `label list` print each label name in its color. When color is off (see [Scripting and JSON output](#scripting-and-json-output)), they name the color instead, such as `bug | red | Broken`. `--json` output always shows the color as a value.
|
|
158
162
|
|
|
@@ -223,7 +227,7 @@ zinn task edit MDR-1 --description "Complete refinement before the waffle party"
|
|
|
223
227
|
zinn task edit MDR-1 --title "Meet the quarterly refinement quota" --description ""
|
|
224
228
|
```
|
|
225
229
|
|
|
226
|
-
Only the explicitly specified fields are modified and the rest are untouched.
|
|
230
|
+
Only the explicitly specified fields are modified and the rest are untouched. Use `--description ""` to clear a description. It is stored and returned in JSON as `null`. If a description during task creation is omitted, it is treated as `null` by default, and if a _falsy_ value is provided, then it's also interpreted as `null`.
|
|
227
231
|
|
|
228
232
|
At least one flag is required and task titles cannot be blank. Archived tasks can be edited without unarchiving them. Supplying unchanged values does not change the modification timestamp.
|
|
229
233
|
Use `--title="--example"` when a value begins with a dash.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zinn-dev/cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.36.1",
|
|
4
4
|
"description": "A kanban workflow in the terminal.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"bugs": {
|
|
@@ -42,6 +42,6 @@
|
|
|
42
42
|
"access": "public"
|
|
43
43
|
},
|
|
44
44
|
"dependencies": {
|
|
45
|
-
"@zinn-dev/core": "0.
|
|
45
|
+
"@zinn-dev/core": "0.25.1"
|
|
46
46
|
}
|
|
47
47
|
}
|
|
@@ -26,7 +26,7 @@ function formatLabel(presented: PresentedLabel) {
|
|
|
26
26
|
? styleOutputText(presented.color, presented.name)
|
|
27
27
|
: `${presented.name} | ${presented.color}`;
|
|
28
28
|
|
|
29
|
-
if (presented.description
|
|
29
|
+
if (presented.description == null) {
|
|
30
30
|
return name;
|
|
31
31
|
}
|
|
32
32
|
|
|
@@ -57,8 +57,10 @@ export const labelRouter = {
|
|
|
57
57
|
|
|
58
58
|
Create a global label. Names preserve casing, but uniqueness is case-insensitive.
|
|
59
59
|
Names are trimmed and cannot be blank.
|
|
60
|
-
Description
|
|
61
|
-
|
|
60
|
+
Description is optional.
|
|
61
|
+
|
|
62
|
+
Color defaults to white.
|
|
63
|
+
Valid colors: red, green, yellow, blue, magenta, cyan, white, gray.
|
|
62
64
|
|
|
63
65
|
Example: zinn label create bug --description "Unexpected behavior" --color red`,
|
|
64
66
|
},
|
|
@@ -96,7 +98,7 @@ List all global label definitions.`,
|
|
|
96
98
|
help: `Usage: zinn label edit <name> [--name <text>] [--description <text>] [--color <color>]
|
|
97
99
|
|
|
98
100
|
Change specified fields.
|
|
99
|
-
Provide at least one edit flag. Use --description ""
|
|
101
|
+
Provide at least one edit flag. Use --description "" to clear the description.
|
|
100
102
|
|
|
101
103
|
Names are matched and kept unique case-insensitively while preserving their casing.
|
|
102
104
|
Names are trimmed. Changing only the casing is allowed.
|
|
@@ -168,7 +168,7 @@ Example: zinn project view MDR`,
|
|
|
168
168
|
help: `Usage: zinn project edit <project-key> [--name <text>] [--description <text>]
|
|
169
169
|
|
|
170
170
|
Change the supplied project fields. At least one edit flag is required.
|
|
171
|
-
Use --description "" to clear the description
|
|
171
|
+
Use --description "" to clear the description.
|
|
172
172
|
Omitted fields are preserved. Unchanged values leave the timestamp unchanged.
|
|
173
173
|
|
|
174
174
|
Example: zinn project edit MDR --name "Macrodata Refinement"`,
|
|
@@ -291,7 +291,7 @@ Example: zinn task view MDR-1`,
|
|
|
291
291
|
|
|
292
292
|
Change the supplied fields and preserve everything else.
|
|
293
293
|
Use --priority none to clear priority.
|
|
294
|
-
Provide at least one edit flag. Use --description ""
|
|
294
|
+
Provide at least one edit flag. Use --description "" to clear the description.
|
|
295
295
|
|
|
296
296
|
Repeat --add-label or --remove-label for multiple existing labels.
|
|
297
297
|
Label names are matched case-insensitively.
|