kavoru 0.4.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 +16 -11
- package/package.json +1 -1
- package/src/args.ts +4 -4
- package/src/cli.ts +1 -1
- package/src/features.ts +663 -640
package/README.md
CHANGED
|
@@ -7,18 +7,23 @@ Scaffold a new [Kavoru](https://github.com/mertthesamael/Kavoru) backend — Ely
|
|
|
7
7
|
After publishing to npm:
|
|
8
8
|
|
|
9
9
|
```bash
|
|
10
|
-
bunx kavoru my-api
|
|
10
|
+
bunx kavoru@latest my-api
|
|
11
11
|
cd my-api
|
|
12
12
|
bun run dev
|
|
13
13
|
```
|
|
14
14
|
|
|
15
|
-
|
|
15
|
+
Always use `@latest` so you get the newest published CLI. Equivalent to `bunx --bun kavoru@latest`.
|
|
16
16
|
|
|
17
|
-
**Stale
|
|
17
|
+
**Stale CLI after a new publish?** Bun caches `bunx` installs under `%TEMP%\bunx-*-kavoru@latest` and does not auto-refresh. Clear the cache, then run `@latest` again:
|
|
18
18
|
|
|
19
19
|
```powershell
|
|
20
20
|
Remove-Item -Recurse -Force "$env:TEMP\bunx-*-kavoru*"
|
|
21
|
-
bunx kavoru@
|
|
21
|
+
bunx kavoru@latest my-api
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
```bash
|
|
25
|
+
rm -rf "${TMPDIR:-/tmp}"/bunx-*-kavoru*
|
|
26
|
+
bunx kavoru@latest my-api
|
|
22
27
|
```
|
|
23
28
|
|
|
24
29
|
### Options
|
|
@@ -57,22 +62,22 @@ Interactive mode (TTY) shows a checkbox menu (↑↓ move, Space toggle, Enter c
|
|
|
57
62
|
|
|
58
63
|
```bash
|
|
59
64
|
# Interactive (prompts for project name + feature toggles)
|
|
60
|
-
bunx kavoru
|
|
65
|
+
bunx kavoru@latest
|
|
61
66
|
|
|
62
67
|
# Current directory
|
|
63
|
-
bunx kavoru .
|
|
68
|
+
bunx kavoru@latest .
|
|
64
69
|
|
|
65
70
|
# Minimal API skeleton
|
|
66
|
-
bunx kavoru my-api --minimal
|
|
71
|
+
bunx kavoru@latest my-api --minimal
|
|
67
72
|
|
|
68
73
|
# Pick specific features
|
|
69
|
-
bunx kavoru my-api --features auth,prisma,otel,sentry
|
|
74
|
+
bunx kavoru@latest my-api --features auth,prisma,otel,sentry
|
|
70
75
|
|
|
71
76
|
# Full stack minus Kafka and Docker
|
|
72
|
-
bunx kavoru my-api --no-features kafka,docker
|
|
77
|
+
bunx kavoru@latest my-api --no-features kafka,docker
|
|
73
78
|
|
|
74
79
|
# Custom template fork (local dev)
|
|
75
|
-
bunx kavoru demo --repo your-user/Kavoru --no-install
|
|
80
|
+
bunx kavoru@latest demo --repo your-user/Kavoru --no-install
|
|
76
81
|
```
|
|
77
82
|
|
|
78
83
|
## Development
|
|
@@ -86,7 +91,7 @@ bun test
|
|
|
86
91
|
bun run src/index.ts my-test-app
|
|
87
92
|
# or
|
|
88
93
|
bun link
|
|
89
|
-
bunx kavoru my-test-app
|
|
94
|
+
bunx kavoru@latest my-test-app
|
|
90
95
|
```
|
|
91
96
|
|
|
92
97
|
## License
|
package/package.json
CHANGED
package/src/args.ts
CHANGED
|
@@ -36,10 +36,10 @@ Features:
|
|
|
36
36
|
auth, prisma, otel, sentry, kafka, websocket, resend, cron, docker
|
|
37
37
|
|
|
38
38
|
Examples:
|
|
39
|
-
bunx kavoru my-api
|
|
40
|
-
bunx kavoru my-api --minimal
|
|
41
|
-
bunx kavoru my-api --features auth,prisma,otel
|
|
42
|
-
bunx kavoru my-api --no-features kafka,docker,resend
|
|
39
|
+
bunx kavoru@latest my-api
|
|
40
|
+
bunx kavoru@latest my-api --minimal
|
|
41
|
+
bunx kavoru@latest my-api --features auth,prisma,otel
|
|
42
|
+
bunx kavoru@latest my-api --no-features kafka,docker,resend
|
|
43
43
|
`;
|
|
44
44
|
|
|
45
45
|
export function parseArgs(argv: string[]): CliOptions {
|
package/src/cli.ts
CHANGED
|
@@ -97,7 +97,7 @@ export async function runCli(options: CliOptions): Promise<void> {
|
|
|
97
97
|
if (!targetArg) {
|
|
98
98
|
const interactive = process.stdin.isTTY && process.stdout.isTTY;
|
|
99
99
|
if (!interactive) {
|
|
100
|
-
throw new Error("Missing project directory. Usage: bunx kavoru <directory>");
|
|
100
|
+
throw new Error("Missing project directory. Usage: bunx kavoru@latest <directory>");
|
|
101
101
|
}
|
|
102
102
|
targetArg = await promptProjectName();
|
|
103
103
|
}
|