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

Tribally-Games / game-base / 19161155764

07 Nov 2025 07:17AM UTC coverage: 91.137% (-6.2%) from 97.297%
19161155764

push

github

web-flow
feat: cli for converting wav png and jpg to webp etc (#2)

113 of 149 new or added lines in 4 files covered. (75.84%)

473 of 519 relevant lines covered (91.14%)

23.97 hits per line

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

33.33
/src/cli/utils/commandCheck.ts
1
import chalk from "chalk"
26✔
2
import commandExists from "command-exists"
43✔
3

4
export async function checkCommands(): Promise<void> {
10✔
5
  const cwebpExists = await checkCommand("cwebp")
50✔
6
  const opusencExists = await checkCommand("opusenc")
54✔
7

8
  if (!cwebpExists || !opusencExists) {
35✔
NEW
9
    process.exit(1)
×
10
  }
1✔
11
}
12

13
async function checkCommand(command: string): Promise<boolean> {
12✔
14
  try {
9✔
15
    await commandExists(command)
33✔
16
    return true
11✔
NEW
17
  } catch {
×
NEW
18
    console.error(chalk.red(`✗ ${command} not found`))
×
19

NEW
20
    if (command === "cwebp") {
×
NEW
21
      console.error(chalk.yellow("\nTo install cwebp:"))
×
NEW
22
      console.error(chalk.gray("  macOS:   brew install webp"))
×
NEW
23
      console.error(chalk.gray("  Ubuntu:  sudo apt-get install webp"))
×
NEW
24
      console.error(
×
NEW
25
        chalk.gray(
×
NEW
26
          "  More:    https://web.dev/articles/codelab-serve-images-webp",
×
NEW
27
        ),
×
NEW
28
      )
×
NEW
29
    } else if (command === "opusenc") {
×
NEW
30
      console.error(chalk.yellow("\nTo install opusenc:"))
×
NEW
31
      console.error(chalk.gray("  macOS:   brew install opus-tools"))
×
NEW
32
      console.error(chalk.gray("  Ubuntu:  sudo apt-get install opus-tools"))
×
NEW
33
      console.error(
×
NEW
34
        chalk.gray("  More:    https://formulae.brew.sh/formula/opus-tools"),
×
NEW
35
      )
×
NEW
36
    }
×
NEW
37
    console.error()
×
38

NEW
39
    return false
×
40
  }
41
}
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

© 2026 Coveralls, Inc