MCPcopy Create free account
hub / github.com/dmno-dev/bumpy / formatLevel

Function formatLevel

packages/bumpy/src/prompts/bump-select.ts:319–341  ·  view source on GitHub ↗
(level: BumpLevel, focused: boolean)

Source from the content-addressed store, hash-verified

317}
318
319function formatLevel(level: BumpLevel, focused: boolean): string {
320 if (!focused) {
321 if (level === 'skip') return pc.dim('·');
322 if (level === 'none') return pc.dim('none');
323 if (level === 'major') return pc.red(level);
324 if (level === 'minor') return pc.yellow(level);
325 return pc.green(level);
326 }
327
328 // Show the level selector when focused
329 const parts = LEVELS.map((l) => {
330 if (l === level) {
331 if (l === 'skip') return pc.bold(pc.dim('[skip]'));
332 if (l === 'none') return pc.bold(pc.dim('[none]'));
333 if (l === 'major') return pc.bold(pc.red(`[${l}]`));
334 if (l === 'minor') return pc.bold(pc.yellow(`[${l}]`));
335 return pc.bold(pc.green(`[${l}]`));
336 }
337 return pc.dim(l);
338 });
339
340 return `◄ ${parts.join(pc.dim(' · '))} ►`;
341}

Callers 1

formatRowFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…