MCPcopy Create free account
hub / github.com/Snapchat/Valdi / getHotreloadTargetByModuleName

Function getHotreloadTargetByModuleName

npm_modules/cli/src/commands/hotreload.ts:65–72  ·  view source on GitHub ↗
(client: BazelClient, moduleName: string)

Source from the content-addressed store, hash-verified

63}
64
65async 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
74async function valdiHotreload(argv: ArgumentsResolver<CommandParameters>) {
75 const client = new BazelClient();

Callers 1

valdiHotreloadFunction · 0.85

Calls 2

queryMethod · 0.80
trimMethod · 0.45

Tested by

no test coverage detected