usage.ts ×6

Frontier kind: Code frontier

unlabeled · c_a7a563aca05f

61 tests · 2494 LOC · 18 files · introduces 0 tests · 38 LOC · 1 file

Introduces — evidence that enters the hierarchy at this concept

Code
6 ranges38 lines · 1 files
Tests
0 tests

Contains — complete concept membership

All code (extent)
456 ranges2494 lines · 18 files · Browse complete extent
All tests (intent)
61 testsBrowse complete intent

Neighbourhood graph

The orange circle is the focus. Violet and green circles are every ancestor and descendant, broader and narrower, at any distance; blue squares and pink diamonds are the introduced files and exact introduced tests of every visible concept, not only the focus's. Arrows point from broader to narrower concepts and bridge only concepts omitted from this view. Undirected links show source or test introduction. Concept and file size follows LOC; exact test nodes use test-count units.

Introduced files, introduced tests, and structurally relevant concept specialization

In the embedded map, ordinary wheel input scrolls the page; use the visible controls to zoom and drag to pan. Open the full-screen map for canvas navigation: wheel pans, Ctrl/Command plus wheel zooms, and arrow keys pan when this region is focused. On touch screens, open the full-screen map to pan or pinch. If JavaScript or WebGL is unavailable, use the native relationship evidence on this page.

Graph controls are ready.

Interactive rendering requires JavaScript and WebGL. Use the native relationship evidence on this page while the interactive map is unavailable.

Native relationship evidence

Every exact file and test below is linked only from the concept that introduces it.

Introduced tests

Every collected test enters the hierarchy at exactly one concept.

No tests are introduced at this concept. Its intent tests are introduced by other concepts.

Introduced code

Every collected source range enters the hierarchy at exactly one concept.

1 file ranked by introduced lines: 38 introduced LOC across 6 ranges. Expand a file to inspect source; the > gutter marks introduced lines.

lib/usage.ts 38 introduced LOC · 6 ranges

Open complete file

243 // TODO(@bcoe): why isn't commands[0][2] an object with a named property?
244 if (commands.length > 1 || (commands.length === 1 && !commands[0][2])) {
245 > ui.div(__('Commands:')); usage.ts
246 >
247 > const context = yargs.getInternalMethods().getContext();
248 > const parentCommands = context.commands.length
249 > ? `${context.commands.join(' ')} `
250 > : '';
251 >
252 > if (
253 > yargs.getInternalMethods().getParserConfiguration()['sort-commands'] ===
254 > true
255 > ) {
256 commands = commands.sort((a, b) => a[0].localeCompare(b[0]));
257 }
258 > usage.ts
259 > const prefix = base$0 ? `${base$0} ` : '';
260 >
261 > commands.forEach(command => {
262 > const commandString = `${prefix}${parentCommands}${command[0].replace(
263 > /^\$0 ?/,
264 > ''
265 > )}`; // drop $0 from default commands.
266 > ui.span(
267 > {
268 > text: commandString,
269 > padding: [0, 2, 0, 2],
270 > width:
271 > maxWidth(commands, theWrap, `${base$0}${parentCommands}`) + 4,
272 > },
273 > {text: command[1]}
274 > );
275 > const hints = [];
276 > if (command[2]) hints.push(`[${__('default')}]`);
277 > if (command[3] && command[3].length) {
278 hints.push(`[${__('aliases:')} ${command[3].join(', ')}]`);
279 }
280 > if (command[4]) { usage.ts
281 if (typeof command[4] === 'string') {
282 hints.push(`[${__('deprecated: %s', command[4])}]`);
285 }
286 }
287 > if (hints.length) { usage.ts
288 ui.div({
289 text: hints.join(' '),
291 align: 'right',
292 });
293 > } else { usage.ts
294 ui.div();
295 }
296 > }); usage.ts
297 >
298 > ui.div();
299 > }
300
301 // perform some cleanup on the keys array, making it