• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

victorperin / qr-scanner-cli / 3630546792

pending completion
3630546792

Pull #208

github

GitHub
Merge 4d6340e1d into 65b6913c7
Pull Request #208: chore(deps): bump qs from 6.10.1 to 6.11.0

19 of 24 branches covered (79.17%)

Branch coverage included in aggregate %.

73 of 75 relevant lines covered (97.33%)

5.0 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

100.0
/src/cli/execution.ts
1
import yargs from 'yargs'
6✔
2

3
import { scanFromFileOnCli } from '../pipelines/scanFromFile'
6✔
4

5
import { greenBox } from '../infrastructure/boxen'
6✔
6
import flags from './flags'
6✔
7

8
const execution = (args: string[]): Promise<void> | void => {
6✔
9
  const yargsInstance = yargs(args)
6✔
10
    .strict()
11
    .example([
12
      ['qrscanner ./qrCode.jpg', greenBox('This message is written in a QR Code', { margin: 1 })],
13
      ['qrscanner ./qrCode.jpg --clear', '\nThis message is written in a QR Code'],
14
    ])
15
    .command('$0 <file>', 'Scan a QR Code from a file')
16
    .positional('file', {
17
      describe: 'Path to the file to scan',
18
      type: 'string',
19
      demandOption: true,
20
    })
21
    .options(flags)
22
    .help()
23

24
  const argv = yargsInstance.argv
6✔
25

26
  const { _, $0, file, ...flagsTreated } = argv
15✔
27

28
  return scanFromFileOnCli(file, flagsTreated).catch((error: Error) => {
5✔
29
    console.error(error.message)
2✔
30
    return yargsInstance.exit(1, error)
2✔
31
  })
32
}
33

34
export default execution
6✔
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc