({ args })
| 145 | }, |
| 146 | }, |
| 147 | async run({ args }) { |
| 148 | const rating = parseRating(args.rating); |
| 149 | if (rating === null) { |
| 150 | console.error(c.error("Rating must be between 1 and 5")); |
| 151 | process.exit(1); |
| 152 | } |
| 153 | |
| 154 | if (!shouldTrack()) { |
| 155 | console.log(c.dim("Telemetry is disabled. Feedback not sent.")); |
| 156 | return; |
| 157 | } |
| 158 | |
| 159 | const comment = normalizeComment(args.comment); |
| 160 | const doctorSummary = await getDoctorSummary(); |
| 161 | |
| 162 | // The standalone command runs separately from `render`, so it has no real |
| 163 | // elapsed time to report. Omit it rather than recording a fake duration. |
| 164 | trackRenderFeedback({ rating, comment, doctorSummary }); |
| 165 | |
| 166 | await flush(); |
| 167 | console.log(c.dim("Thanks for the feedback!")); |
| 168 | |
| 169 | if (args["file-issue"] === true) { |
| 170 | await fileGithubIssue({ |
| 171 | rating, |
| 172 | comment, |
| 173 | rawDir: args.dir, |
| 174 | yes: args.yes === true, |
| 175 | doctorSummary, |
| 176 | }); |
| 177 | } |
| 178 | }, |
| 179 | }); |
nothing calls this directly
no test coverage detected