@zinn-dev/cli 0.22.0 → 0.23.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 +10 -0
- package/index.ts +1 -0
- package/package.json +2 -2
- package/src/routes/project-router.ts +43 -0
package/README.md
CHANGED
|
@@ -50,6 +50,16 @@ Add another column at the end of the board:
|
|
|
50
50
|
zinn project column create MDR "Boardlog"
|
|
51
51
|
```
|
|
52
52
|
|
|
53
|
+
Rename a column:
|
|
54
|
+
|
|
55
|
+
```sh
|
|
56
|
+
zinn project column edit MDR "In Progress" --name "Refining"
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
Columns are matched by name, and matching is case-insenstivie. Names are trimmed and they cannot be blank.
|
|
60
|
+
Since columns are case-insensitive, you cannot have two columns with only different casing such as `todo` and `Todo`. However, you are free to change the casing of an existing column.
|
|
61
|
+
Tasks stay in the renamed column.
|
|
62
|
+
|
|
53
63
|
`zinn project delete MDR` asks for confirmation, then permanently deletes the project and all of its columns and tasks.
|
|
54
64
|
|
|
55
65
|
## Create and read tasks
|
package/index.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zinn-dev/cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.23.0",
|
|
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.16.0"
|
|
46
46
|
}
|
|
47
47
|
}
|
|
@@ -212,8 +212,51 @@ Example: zinn project delete MDR`,
|
|
|
212
212
|
help: `Usage: zinn project column create <project-key> <column-name>
|
|
213
213
|
|
|
214
214
|
Add a column at the end of a project's board.
|
|
215
|
+
Names are trimmed, must contain printable text on a single line, and must be unique within the project regardless of casing.
|
|
215
216
|
|
|
216
217
|
Example: zinn project column create MDR "Boardlog"`,
|
|
218
|
+
},
|
|
219
|
+
edit: {
|
|
220
|
+
run: (args: Array<string>) => {
|
|
221
|
+
const { values, positionals, tokens } = parseArgs({
|
|
222
|
+
args,
|
|
223
|
+
options: { name: { type: "string" } },
|
|
224
|
+
allowPositionals: true,
|
|
225
|
+
strict: true,
|
|
226
|
+
tokens: true,
|
|
227
|
+
});
|
|
228
|
+
|
|
229
|
+
validatePositionalCount(
|
|
230
|
+
positionals,
|
|
231
|
+
2,
|
|
232
|
+
"Both the project key and the column name must be specified",
|
|
233
|
+
);
|
|
234
|
+
validateUniqueOptions(tokens);
|
|
235
|
+
|
|
236
|
+
if (values.name === undefined) {
|
|
237
|
+
quit("Provide an edit flag: --name");
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
const editedColumn = column.edit({
|
|
241
|
+
projectKey: positionals[0]!,
|
|
242
|
+
columnName: positionals[1]!,
|
|
243
|
+
name: values.name,
|
|
244
|
+
});
|
|
245
|
+
const columnProject = project.getById(editedColumn.project_id)!;
|
|
246
|
+
const presentedColumn = { project: columnProject.key, name: editedColumn.name };
|
|
247
|
+
|
|
248
|
+
output(presentedColumn, (c) => `${c.project} | ${c.name}`);
|
|
249
|
+
},
|
|
250
|
+
help: `Usage: zinn project column edit <project-key> <column-name> --name <text>
|
|
251
|
+
|
|
252
|
+
Rename a column.
|
|
253
|
+
The --name flag is required.
|
|
254
|
+
|
|
255
|
+
Columns are matched by name, and matching is case-insensitive.
|
|
256
|
+
Names are trimmed, and must remain unique within the same project.
|
|
257
|
+
Changing only the casing of a column's own name is allowed.
|
|
258
|
+
|
|
259
|
+
Example: zinn project column edit MDR "In Progress" --name "Refining"`,
|
|
217
260
|
},
|
|
218
261
|
list: {
|
|
219
262
|
run: (args: Array<string>) => {
|