Commit 9358a86
committed
feat(dlx): add CLI-style option names for cognitive consistency
Add option names that align with npm/npx/pnpm CLI flags:
DlxPackageOptions:
- yes: Skip confirmation prompts (aligns with npx --yes/-y)
- force: Force reinstallation (already existed)
- quiet: Suppress output (aligns with npx -q, pnpm -s) - reserved for future use
- call: Shell command to execute (aligns with npx --call) - reserved for future use
DlxBinaryOptions:
- yes: Skip confirmation prompts (aligns with npx --yes/-y)
- force: Force re-download (already existed)
- quiet: Suppress output - reserved for future use
Logic updates:
- Map yes flag to force behavior in both functions
- yes = true implies force = true (auto-approve/skip prompts)
This provides cognitive consistency between programmatic API and CLI tools,
making the API more intuitive for users familiar with npx/pnpm.1 parent 13522d4 commit 9358a86
2 files changed
Lines changed: 71 additions & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
40 | | - | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
41 | 43 | | |
42 | | - | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
43 | 48 | | |
44 | | - | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
45 | 53 | | |
46 | | - | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
47 | 58 | | |
48 | | - | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
49 | 64 | | |
50 | | - | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
51 | 81 | | |
52 | 82 | | |
53 | 83 | | |
| |||
367 | 397 | | |
368 | 398 | | |
369 | 399 | | |
370 | | - | |
| 400 | + | |
371 | 401 | | |
372 | 402 | | |
373 | 403 | | |
| 404 | + | |
374 | 405 | | |
375 | 406 | | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
376 | 410 | | |
377 | 411 | | |
378 | 412 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
96 | 96 | | |
97 | 97 | | |
98 | 98 | | |
| 99 | + | |
99 | 100 | | |
100 | 101 | | |
| 102 | + | |
101 | 103 | | |
102 | 104 | | |
103 | 105 | | |
| |||
117 | 119 | | |
118 | 120 | | |
119 | 121 | | |
| 122 | + | |
120 | 123 | | |
121 | 124 | | |
| 125 | + | |
122 | 126 | | |
123 | 127 | | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
124 | 147 | | |
125 | 148 | | |
126 | 149 | | |
| |||
449 | 472 | | |
450 | 473 | | |
451 | 474 | | |
| 475 | + | |
452 | 476 | | |
453 | 477 | | |
454 | 478 | | |
| |||
458 | 482 | | |
459 | 483 | | |
460 | 484 | | |
461 | | - | |
462 | | - | |
| 485 | + | |
| 486 | + | |
| 487 | + | |
| 488 | + | |
463 | 489 | | |
464 | 490 | | |
465 | | - | |
| 491 | + | |
| 492 | + | |
466 | 493 | | |
467 | 494 | | |
468 | 495 | | |
| |||
0 commit comments