@zinn-dev/cli 0.5.0 → 0.6.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 +1 -1
- package/index.ts +8 -21
- package/package.json +2 -5
package/README.md
CHANGED
|
@@ -141,4 +141,4 @@ zinn task move --help
|
|
|
141
141
|
|
|
142
142
|
The short `-h` form works in the same positions.
|
|
143
143
|
|
|
144
|
-
Running `zinn` without a command
|
|
144
|
+
Running `zinn` without a command shows help
|
package/index.ts
CHANGED
|
@@ -1,21 +1,9 @@
|
|
|
1
1
|
#!/usr/bin/env bun
|
|
2
|
-
import { quit } from "./src/lib";
|
|
3
2
|
|
|
4
3
|
const args = process.argv.slice(2);
|
|
5
4
|
|
|
6
|
-
if (args.length === 0) {
|
|
7
|
-
|
|
8
|
-
const tui = await import("@zinn-dev/tui");
|
|
9
|
-
tui.launch();
|
|
10
|
-
} else {
|
|
11
|
-
quit("Direct launch in a non-TTY environment is not supported.");
|
|
12
|
-
}
|
|
13
|
-
} else {
|
|
14
|
-
// TODO: isTTY check for human readable colored and structured formatting like tables
|
|
15
|
-
const firstArg = args[0]!;
|
|
16
|
-
// TODO: root routing with flags
|
|
17
|
-
if (["-h", "--help"].includes(firstArg)) {
|
|
18
|
-
console.info(`ZINN - A kanban workflow in the terminal
|
|
5
|
+
if (args.length === 0 || ["-h", "--help"].includes(args[0]!)) {
|
|
6
|
+
console.info(`ZINN - A kanban workflow in the terminal
|
|
19
7
|
|
|
20
8
|
Usage: zinn <command>
|
|
21
9
|
|
|
@@ -39,11 +27,10 @@ Commands:
|
|
|
39
27
|
task delete
|
|
40
28
|
|
|
41
29
|
Run zinn <namespace> --help or zinn <command> --help for more information.
|
|
42
|
-
Running zinn without a command
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
}
|
|
30
|
+
Running zinn without a command shows this help.`);
|
|
31
|
+
} else {
|
|
32
|
+
const { createRouter } = await import("./src/routes/router");
|
|
33
|
+
const { routes } = await import("./src/routes/routes");
|
|
34
|
+
const router = createRouter(routes);
|
|
35
|
+
router.route(args);
|
|
49
36
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zinn-dev/cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.6.0",
|
|
4
4
|
"description": "A kanban workflow in the terminal.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"bugs": {
|
|
@@ -20,8 +20,6 @@
|
|
|
20
20
|
"kanban",
|
|
21
21
|
"cli",
|
|
22
22
|
"terminal",
|
|
23
|
-
"tui",
|
|
24
|
-
"opentui",
|
|
25
23
|
"bun"
|
|
26
24
|
],
|
|
27
25
|
"module": "index.ts",
|
|
@@ -44,7 +42,6 @@
|
|
|
44
42
|
"access": "public"
|
|
45
43
|
},
|
|
46
44
|
"dependencies": {
|
|
47
|
-
"@zinn-dev/core": "0.5.0"
|
|
48
|
-
"@zinn-dev/tui": "0.0.1"
|
|
45
|
+
"@zinn-dev/core": "0.5.0"
|
|
49
46
|
}
|
|
50
47
|
}
|