taskchef 4.1.1 → 4.1.3
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/.codex-plugin/plugin.json +1 -1
- package/README.md +8 -9
- package/package.json +1 -1
- package/src/cli.js +9 -18
package/README.md
CHANGED
|
@@ -253,17 +253,16 @@ taskchef project list --workspace <workspace>
|
|
|
253
253
|
taskchef project remove payments --workspace <workspace>
|
|
254
254
|
```
|
|
255
255
|
|
|
256
|
-
Human-readable project listings show one
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
256
|
+
Human-readable project listings show one row per configured GitHub repository.
|
|
257
|
+
Project details repeat on each row so multi-repository projects remain clear.
|
|
258
|
+
A project without a configured repository has one row containing `-` in the
|
|
259
|
+
repository column:
|
|
260
260
|
|
|
261
261
|
```text
|
|
262
|
-
NAME
|
|
263
|
-
notes
|
|
264
|
-
payments
|
|
265
|
-
|
|
266
|
-
└─ repository https://github.com/example/payments-sdk
|
|
262
|
+
NAME KIND GITHUB REPOSITORY PATH
|
|
263
|
+
notes folder - /workspace/notes
|
|
264
|
+
payments git https://github.com/example/payments-api /workspace/payments
|
|
265
|
+
payments git https://github.com/example/payments-sdk /workspace/payments
|
|
267
266
|
```
|
|
268
267
|
|
|
269
268
|
Import projects as a JSON array from a file or standard input:
|
package/package.json
CHANGED
package/src/cli.js
CHANGED
|
@@ -15,8 +15,6 @@ import {
|
|
|
15
15
|
resolveTask,
|
|
16
16
|
} from "./workspace.js";
|
|
17
17
|
|
|
18
|
-
const BLANK_TABLE_CELL = Symbol("blank table cell");
|
|
19
|
-
|
|
20
18
|
async function readStdin() {
|
|
21
19
|
let input = "";
|
|
22
20
|
process.stdin.setEncoding("utf8");
|
|
@@ -90,11 +88,9 @@ function print(value, args, human) {
|
|
|
90
88
|
}
|
|
91
89
|
|
|
92
90
|
function table(headers, rows) {
|
|
93
|
-
const display = (value) =>
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
return String(value);
|
|
97
|
-
};
|
|
91
|
+
const display = (value) => value === null || value === undefined || value === ""
|
|
92
|
+
? "-"
|
|
93
|
+
: String(value);
|
|
98
94
|
const widths = headers.map((header, index) =>
|
|
99
95
|
Math.max(header.length, ...rows.map((row) => display(row[index]).length)));
|
|
100
96
|
const format = (row) => row.map((value, index) => index === row.length - 1
|
|
@@ -104,20 +100,15 @@ function table(headers, rows) {
|
|
|
104
100
|
}
|
|
105
101
|
|
|
106
102
|
function projectRows(projects) {
|
|
107
|
-
return projects.flatMap((project) =>
|
|
108
|
-
[
|
|
103
|
+
return projects.flatMap((project) => {
|
|
104
|
+
const repositories = project.githubRepos.length > 0 ? project.githubRepos : [null];
|
|
105
|
+
return repositories.map((repository) => [
|
|
109
106
|
project.name,
|
|
110
107
|
project.isGitRepository ? "git" : "folder",
|
|
111
|
-
null,
|
|
112
|
-
project.path,
|
|
113
|
-
],
|
|
114
|
-
...project.githubRepos.map((repository, index) => [
|
|
115
|
-
` ${index === project.githubRepos.length - 1 ? "└─" : "├─"} repository`,
|
|
116
|
-
BLANK_TABLE_CELL,
|
|
117
108
|
repository,
|
|
118
|
-
|
|
119
|
-
])
|
|
120
|
-
|
|
109
|
+
project.path,
|
|
110
|
+
]);
|
|
111
|
+
});
|
|
121
112
|
}
|
|
122
113
|
|
|
123
114
|
function sortTasksByCreatedAt(tasks, ascending) {
|