@zinn-dev/cli 0.27.0 → 0.28.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 +3 -1
- package/package.json +2 -2
- package/src/routes/label-router.ts +2 -2
- package/src/routes/project-router.ts +21 -11
package/README.md
CHANGED
|
@@ -317,7 +317,9 @@ Use `none` to clear priority. Omitting `--priority` on edits preserves it. Task
|
|
|
317
317
|
|
|
318
318
|
## Activity
|
|
319
319
|
|
|
320
|
-
Zinn keeps an activity log of changes
|
|
320
|
+
Zinn keeps an activity log of task changes such as creating, editing, moving, reordering, archiving, unarchiving and deleting a task, its labels, its relations, and its comments. Project, column, and global label definition changes are recorded too. Each log also says _who_ made the change.
|
|
321
|
+
|
|
322
|
+
Deleting a project records one project deletion rather than separate deletion activity for every cascaded row.
|
|
321
323
|
Note that this data is not yet surfaced by any command yet.
|
|
322
324
|
|
|
323
325
|
When a coding agent performs a mutation with `zinn`, the change is recorded under that agent's name.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zinn-dev/cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.28.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.19.0"
|
|
46
46
|
}
|
|
47
47
|
}
|
|
@@ -45,7 +45,7 @@ export const labelRouter = {
|
|
|
45
45
|
validateUniqueOptions(tokens);
|
|
46
46
|
|
|
47
47
|
const input = labelCreateSchema.parse({ name: positionals[0], ...values });
|
|
48
|
-
const created = label.create(input);
|
|
48
|
+
const created = label.create(input, currentActor());
|
|
49
49
|
|
|
50
50
|
output(presentLabel(created), formatLabel);
|
|
51
51
|
},
|
|
@@ -85,7 +85,7 @@ List all global label definitions.`,
|
|
|
85
85
|
validateUniqueOptions(tokens);
|
|
86
86
|
|
|
87
87
|
const input = labelEditSchema.parse({ labelName: positionals[0], ...values });
|
|
88
|
-
const edited = label.edit(input);
|
|
88
|
+
const edited = label.edit(input, currentActor());
|
|
89
89
|
|
|
90
90
|
output(presentLabel(edited), formatLabel);
|
|
91
91
|
},
|
|
@@ -12,6 +12,7 @@ import {
|
|
|
12
12
|
validateUniqueOptions,
|
|
13
13
|
} from "../lib";
|
|
14
14
|
import { formatTaskList, presentTask } from "../presentation/task-presentation";
|
|
15
|
+
import { currentActor } from "../actor";
|
|
15
16
|
|
|
16
17
|
type PresentedProject = { key: string; name: string };
|
|
17
18
|
type PresentedProjectView = PresentedProject & { tasks: Array<PresentedTask> };
|
|
@@ -58,7 +59,7 @@ export const projectRouter = {
|
|
|
58
59
|
validateUniqueOptions(tokens);
|
|
59
60
|
|
|
60
61
|
try {
|
|
61
|
-
const createdProject = project.create({ key: projectKey, name: values.name });
|
|
62
|
+
const createdProject = project.create({ key: projectKey, name: values.name }, currentActor());
|
|
62
63
|
output(presentProject(createdProject), formatProject);
|
|
63
64
|
} catch (err: any) {
|
|
64
65
|
quit(err?.message ?? "Something went wrong");
|
|
@@ -153,7 +154,7 @@ Example: zinn project view MDR`,
|
|
|
153
154
|
quit("Provide an edit flag: --name");
|
|
154
155
|
}
|
|
155
156
|
|
|
156
|
-
const editedProject = project.edit({ projectKey, name: values.name });
|
|
157
|
+
const editedProject = project.edit({ projectKey, name: values.name }, currentActor());
|
|
157
158
|
output(presentProject(editedProject), formatProject);
|
|
158
159
|
},
|
|
159
160
|
help: `Usage: zinn project edit <project-key> --name <text>
|
|
@@ -192,7 +193,7 @@ Example: zinn project edit MDR --name "Macrodata Refinement"`,
|
|
|
192
193
|
);
|
|
193
194
|
|
|
194
195
|
if (canDelete) {
|
|
195
|
-
const deletedProject = project.delete(projectKey);
|
|
196
|
+
const deletedProject = project.delete(projectKey, currentActor());
|
|
196
197
|
output(presentProject(deletedProject), (p) => `Deleted ${formatProject(p)}`);
|
|
197
198
|
} else {
|
|
198
199
|
output(presentProject(projectMatch), (p) => `Deletion cancelled for ${formatProject(p)}`);
|
|
@@ -219,7 +220,7 @@ Example: zinn project delete MDR`,
|
|
|
219
220
|
}
|
|
220
221
|
|
|
221
222
|
try {
|
|
222
|
-
const createdColumn = column.create({ projectKey, name: columnName });
|
|
223
|
+
const createdColumn = column.create({ projectKey, name: columnName }, currentActor());
|
|
223
224
|
output(presentColumn(createdColumn), formatColumn);
|
|
224
225
|
} catch (err: any) {
|
|
225
226
|
quit(err?.message ?? "Something went wrong");
|
|
@@ -271,11 +272,14 @@ Example: zinn project column list MDR`,
|
|
|
271
272
|
quit("Provide an edit flag: --name");
|
|
272
273
|
}
|
|
273
274
|
|
|
274
|
-
const editedColumn = column.edit(
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
275
|
+
const editedColumn = column.edit(
|
|
276
|
+
{
|
|
277
|
+
projectKey: positionals[0]!,
|
|
278
|
+
columnName: positionals[1]!,
|
|
279
|
+
name: values.name,
|
|
280
|
+
},
|
|
281
|
+
currentActor(),
|
|
282
|
+
);
|
|
279
283
|
output(presentColumn(editedColumn), formatColumn);
|
|
280
284
|
},
|
|
281
285
|
help: `Usage: zinn project column edit <project-key> <column-name> --name <text>
|
|
@@ -314,7 +318,10 @@ Example: zinn project column edit MDR "In Progress" --name "Refining"`,
|
|
|
314
318
|
quit("Only one target column can be specified");
|
|
315
319
|
}
|
|
316
320
|
|
|
317
|
-
orderedColumn = column.order(
|
|
321
|
+
orderedColumn = column.order(
|
|
322
|
+
{ projectKey, columnName, direction, targetColumnName },
|
|
323
|
+
currentActor(),
|
|
324
|
+
);
|
|
318
325
|
break;
|
|
319
326
|
}
|
|
320
327
|
case "first":
|
|
@@ -325,7 +332,10 @@ Example: zinn project column edit MDR "In Progress" --name "Refining"`,
|
|
|
325
332
|
quit(`Order direction "${direction}" does not accept a target column`);
|
|
326
333
|
}
|
|
327
334
|
|
|
328
|
-
orderedColumn = column.order(
|
|
335
|
+
orderedColumn = column.order(
|
|
336
|
+
{ projectKey, columnName, direction },
|
|
337
|
+
currentActor(),
|
|
338
|
+
);
|
|
329
339
|
break;
|
|
330
340
|
}
|
|
331
341
|
default:
|