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

Function main

npm_modules/cli/src/index.ts:7–25  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

5import { version } from '../package.json';
6
7function main() {
8 void yargs(hideBin(process.argv))
9 .completion()
10 .commandDir('commands', {
11 extensions: ['js', 'ts'],
12 })
13 .demandCommand(1, 'Need at least one command to execute')
14 .recommendCommands()
15 .strict()
16 .option('debug', {
17 describe: 'Run with debug logging',
18 type: 'boolean',
19 default: false,
20 })
21 .version('version', 'Show version number', version)
22 .scriptName('valdi')
23 .wrap(yargs.terminalWidth())
24 .help().argv;
25}
26
27main();

Callers 1

index.tsFile · 0.70

Calls 2

versionMethod · 0.80
wrapMethod · 0.45

Tested by

no test coverage detected