({ args })
| 143 | }, |
| 144 | }, |
| 145 | async run({ args }) { |
| 146 | const subcommand = args.subcommand; |
| 147 | |
| 148 | if (!subcommand || subcommand === "") { |
| 149 | console.log(` |
| 150 | ${c.bold("hyperframes browser")} ${c.dim("<subcommand>")} |
| 151 | |
| 152 | Manage the Chrome browser used for rendering. |
| 153 | |
| 154 | ${c.bold("SUBCOMMANDS:")} |
| 155 | ${c.accent("ensure")} ${c.dim("Find or download Chrome for rendering")} |
| 156 | ${c.accent("path")} ${c.dim("Print browser executable path (for scripting)")} |
| 157 | ${c.accent("clear")} ${c.dim("Remove cached Chrome download")} |
| 158 | |
| 159 | ${c.bold("EXAMPLES:")} |
| 160 | ${c.accent("npx hyperframes browser ensure")} ${c.dim("Download Chrome if needed")} |
| 161 | ${c.accent("npx hyperframes browser path")} ${c.dim("Print path for scripts")} |
| 162 | ${c.accent("npx hyperframes browser clear")} ${c.dim("Remove cached browser")} |
| 163 | `); |
| 164 | return; |
| 165 | } |
| 166 | |
| 167 | switch (subcommand) { |
| 168 | case "ensure": |
| 169 | return runEnsure(); |
| 170 | case "path": |
| 171 | return runPath(); |
| 172 | case "clear": |
| 173 | return runClear(); |
| 174 | default: |
| 175 | trackCommandFailure("browser", `Unknown subcommand: ${subcommand}`); |
| 176 | console.error( |
| 177 | `${c.error("Unknown subcommand:")} ${subcommand}\n\nRun ${c.accent("hyperframes browser --help")} for usage.`, |
| 178 | ); |
| 179 | process.exit(1); |
| 180 | } |
| 181 | }, |
| 182 | }); |
nothing calls this directly
no test coverage detected