Commit 81ce0dd
feat(cli) add input dedup, --no-cache flag, and subcommand fallback (#26)
Add `uniqueNames()` to `fetch-list.js` to deduplicate package names
from JSON and text inputs, handling both plain strings and `{name}`
objects. Wire up the existing `--no-cache` CLI flag to actually pass
`{ cache: false }` through to the packument client.
Refactor `importCommand` in `index.js` to gracefully handle missing
subcommands by attempting to load the command's `index.js` module
before falling back to a usage error.
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>1 parent 24a75fc commit 81ce0dd
2 files changed
Lines changed: 62 additions & 11 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
45 | 74 | | |
46 | 75 | | |
47 | 76 | | |
48 | | - | |
| 77 | + | |
49 | 78 | | |
50 | 79 | | |
51 | 80 | | |
52 | 81 | | |
53 | 82 | | |
54 | 83 | | |
55 | | - | |
| 84 | + | |
| 85 | + | |
56 | 86 | | |
57 | | - | |
| 87 | + | |
58 | 88 | | |
59 | 89 | | |
60 | 90 | | |
| |||
211 | 241 | | |
212 | 242 | | |
213 | 243 | | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
214 | 248 | | |
215 | 249 | | |
216 | 250 | | |
| |||
247 | 281 | | |
248 | 282 | | |
249 | 283 | | |
250 | | - | |
| 284 | + | |
251 | 285 | | |
252 | 286 | | |
253 | 287 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
52 | 52 | | |
53 | 53 | | |
54 | 54 | | |
55 | | - | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
56 | 68 | | |
57 | | - | |
58 | | - | |
59 | | - | |
60 | | - | |
61 | | - | |
62 | | - | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
63 | 80 | | |
64 | 81 | | |
65 | 82 | | |
| |||
0 commit comments