(client: BazelClient, moduleName: string)
| 63 | } |
| 64 | |
| 65 | async function getHotreloadTargetByModuleName(client: BazelClient, moduleName: string): Promise<string> { |
| 66 | const targets = await client.query(`filter(${moduleName}_hotreload, kind('valdi_hotreload rule', //...))`); |
| 67 | if (targets.length === 0) { |
| 68 | throw new CliError(`No hotreload target found for module: ${moduleName}`); |
| 69 | } |
| 70 | |
| 71 | return targets[0]?.trim() ?? ''; |
| 72 | } |
| 73 | |
| 74 | async function valdiHotreload(argv: ArgumentsResolver<CommandParameters>) { |
| 75 | const client = new BazelClient(); |
no test coverage detected