bunli 0.6.1 → 0.7.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 +14 -5
- package/dist/cli.js +879 -70
- package/dist/commands/build.d.ts +1 -1
- package/dist/commands/dev.d.ts +2 -2
- package/dist/commands/doctor/completions.d.ts +8 -0
- package/dist/commands/doctor.d.ts +2 -0
- package/dist/commands/generate.d.ts +3 -2
- package/dist/commands/init.d.ts +1 -1
- package/dist/commands/release.d.ts +1 -1
- package/dist/commands/test.d.ts +1 -1
- package/package.json +5 -4
package/README.md
CHANGED
|
@@ -35,7 +35,6 @@ Development options:
|
|
|
35
35
|
- `--watch, -w` - Watch for changes (default: true)
|
|
36
36
|
- `--inspect, -i` - Enable debugger
|
|
37
37
|
- `--port, -p` - Debugger port (default: 9229)
|
|
38
|
-
- `--commandsDir` - Commands directory for codegen (default: commands)
|
|
39
38
|
- `--generate` - Enable/disable code generation (default: true)
|
|
40
39
|
- `--clearScreen` - Clear screen on reload (default: true)
|
|
41
40
|
|
|
@@ -72,16 +71,20 @@ bunli generate
|
|
|
72
71
|
# Generate types and watch for changes
|
|
73
72
|
bunli generate --watch
|
|
74
73
|
|
|
75
|
-
#
|
|
76
|
-
bunli generate --
|
|
74
|
+
# Explicit command discovery entry
|
|
75
|
+
bunli generate --entry ./src/cli.ts
|
|
76
|
+
|
|
77
|
+
# Optional fallback directory
|
|
78
|
+
bunli generate --directory ./src/commands
|
|
77
79
|
|
|
78
80
|
# Custom output file
|
|
79
81
|
bunli generate --output ./types/commands.gen.ts
|
|
80
82
|
```
|
|
81
83
|
|
|
82
84
|
Generate options:
|
|
83
|
-
- `--
|
|
84
|
-
- `--
|
|
85
|
+
- `--entry, -e` - CLI entry file used for command discovery
|
|
86
|
+
- `--directory` - Optional fallback command source directory
|
|
87
|
+
- `--output, -o` - Output file path (default: ./.bunli/commands.gen.ts)
|
|
85
88
|
- `--watch, -w` - Watch for changes and regenerate
|
|
86
89
|
|
|
87
90
|
The generator creates type-safe command definitions with:
|
|
@@ -96,6 +99,7 @@ The generator creates type-safe command definitions with:
|
|
|
96
99
|
- `bunli dev` - Run CLI in development mode with hot reloading
|
|
97
100
|
- `bunli build` - Build your CLI for production
|
|
98
101
|
- `bunli generate` - Generate TypeScript definitions from commands
|
|
102
|
+
- `bunli doctor completions` - Validate generated completion metadata
|
|
99
103
|
- `bunli test` - Run tests with Bun test runner
|
|
100
104
|
- `bunli release` - Release your CLI package
|
|
101
105
|
|
|
@@ -236,6 +240,11 @@ import { defineConfig } from 'bunli'
|
|
|
236
240
|
export default defineConfig({
|
|
237
241
|
name: 'my-cli',
|
|
238
242
|
version: '1.0.0',
|
|
243
|
+
|
|
244
|
+
commands: {
|
|
245
|
+
entry: './src/cli.ts',
|
|
246
|
+
directory: './src/commands' // optional fallback hint
|
|
247
|
+
},
|
|
239
248
|
|
|
240
249
|
build: {
|
|
241
250
|
entry: './src/cli.ts',
|