Commit b91bae8
committed
fix: address PR #416 review comments
Addresses 18 review comments from BYK on the generator-commands PR:
#2: Use result.user = user instead of cherry-picking fields (login.ts)
#3: Remove process.stdin param from runInteractiveLogin (interactive-login.ts)
#4: Use return yield pattern for one-liner yields (logout.ts)
#5: Make OutputConfig.json optional (defaults to true) (output.ts)
#6: Convert trace/logs.ts to yield commandOutput (trace/logs.ts)
#7: Move URL/QR display through yield commandOutput (trial/start.ts)
#8: Rename const log → const logger, import logger as log (trial/start.ts)
#9: Convert help.ts to yield commandOutput (help.ts)
#11: Replace Symbol branding with class + instanceof for CommandOutput (output.ts, command.ts)
#12: Remove jsonlLines/JSONL mechanism — each yield becomes one JSON line (output.ts, log/list.ts)
#15-#17: Replace polling dots with spinner in interactive login (interactive-login.ts)
#18: Yield individual log items in follow mode (log/list.ts)
Key changes:
- CommandOutput is now a class using instanceof instead of Symbol branding
- JSONL support removed — streaming commands yield items individually
- trace/logs.ts uses OutputConfig with human/jsonTransform instead of manual stdout
- help.ts yields through output framework
- trial/start.ts handlePlanTrial is now an async generator yielding display data
- interactive-login.ts uses consola spinner for polling, removes stdin param
- OutputConfig.json is now optional (defaults to true when object form is used)
Tests updated for trace/logs and trial/start to use context stdout.1 parent df5fd58 commit b91bae8
File tree
12 files changed
+212
-267
lines changed- src
- commands
- auth
- log
- trace
- trial
- lib
- formatters
- test/commands
- trace
- trial
12 files changed
+212
-267
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
103 | 103 | | |
104 | 104 | | |
105 | 105 | | |
106 | | - | |
| 106 | + | |
107 | 107 | | |
108 | 108 | | |
109 | 109 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
177 | 177 | | |
178 | 178 | | |
179 | 179 | | |
180 | | - | |
181 | | - | |
182 | | - | |
183 | | - | |
184 | | - | |
185 | | - | |
| 180 | + | |
186 | 181 | | |
187 | 182 | | |
188 | 183 | | |
| |||
192 | 187 | | |
193 | 188 | | |
194 | 189 | | |
195 | | - | |
| 190 | + | |
196 | 191 | | |
197 | 192 | | |
198 | 193 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
42 | | - | |
| 42 | + | |
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
46 | | - | |
47 | 46 | | |
48 | 47 | | |
49 | 48 | | |
| |||
58 | 57 | | |
59 | 58 | | |
60 | 59 | | |
61 | | - | |
| 60 | + | |
62 | 61 | | |
63 | 62 | | |
64 | 63 | | |
65 | | - | |
66 | 64 | | |
67 | 65 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| 12 | + | |
12 | 13 | | |
13 | 14 | | |
14 | 15 | | |
| |||
18 | 19 | | |
19 | 20 | | |
20 | 21 | | |
| 22 | + | |
21 | 23 | | |
22 | 24 | | |
23 | 25 | | |
| |||
30 | 32 | | |
31 | 33 | | |
32 | 34 | | |
33 | | - | |
34 | 35 | | |
35 | 36 | | |
36 | 37 | | |
37 | | - | |
38 | | - | |
| 38 | + | |
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
25 | | - | |
26 | 25 | | |
27 | 26 | | |
28 | 27 | | |
29 | | - | |
30 | 28 | | |
31 | 29 | | |
32 | 30 | | |
| |||
64 | 62 | | |
65 | 63 | | |
66 | 64 | | |
67 | | - | |
68 | | - | |
69 | | - | |
70 | | - | |
71 | | - | |
72 | | - | |
73 | 65 | | |
74 | 66 | | |
75 | 67 | | |
| |||
336 | 328 | | |
337 | 329 | | |
338 | 330 | | |
339 | | - | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
340 | 336 | | |
341 | 337 | | |
342 | 338 | | |
343 | 339 | | |
344 | 340 | | |
345 | 341 | | |
346 | | - | |
| 342 | + | |
347 | 343 | | |
348 | | - | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
349 | 347 | | |
350 | 348 | | |
351 | 349 | | |
| |||
478 | 476 | | |
479 | 477 | | |
480 | 478 | | |
481 | | - | |
482 | | - | |
483 | | - | |
| 479 | + | |
| 480 | + | |
| 481 | + | |
484 | 482 | | |
485 | 483 | | |
486 | 484 | | |
487 | 485 | | |
488 | 486 | | |
489 | | - | |
490 | | - | |
491 | | - | |
492 | 487 | | |
493 | | - | |
494 | | - | |
495 | | - | |
| 488 | + | |
496 | 489 | | |
497 | 490 | | |
498 | | - | |
499 | | - | |
| 491 | + | |
| 492 | + | |
| 493 | + | |
| 494 | + | |
500 | 495 | | |
501 | 496 | | |
502 | 497 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | | - | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
14 | 20 | | |
15 | 21 | | |
16 | 22 | | |
| |||
30 | 36 | | |
31 | 37 | | |
32 | 38 | | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
33 | 67 | | |
34 | 68 | | |
35 | 69 | | |
| |||
132 | 166 | | |
133 | 167 | | |
134 | 168 | | |
135 | | - | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
136 | 179 | | |
137 | 180 | | |
138 | 181 | | |
| |||
176 | 219 | | |
177 | 220 | | |
178 | 221 | | |
179 | | - | |
180 | 222 | | |
181 | 223 | | |
182 | 224 | | |
| |||
206 | 248 | | |
207 | 249 | | |
208 | 250 | | |
209 | | - | |
210 | | - | |
211 | | - | |
212 | | - | |
213 | | - | |
214 | | - | |
215 | | - | |
216 | | - | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
217 | 263 | | |
218 | | - | |
219 | | - | |
220 | | - | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
221 | 267 | | |
222 | 268 | | |
0 commit comments