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

cameri / nostream / 24936061178

25 Apr 2026 05:05PM UTC coverage: 60.798% (-14.1%) from 74.929%
24936061178

Pull #574

github

web-flow
Merge 674e288ba into ddc811d6e
Pull Request #574: feat: migrate nostream scripts to unified CLI/TUI

1538 of 2872 branches covered (53.55%)

Branch coverage included in aggregate %.

711 of 1701 new or added lines in 29 files covered. (41.8%)

105 existing lines in 20 files now uncovered.

3673 of 5699 relevant lines covered (64.45%)

7.47 hits per line

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

91.3
/src/cli/utils/docker.ts
1
import fs from 'fs'
2✔
2
import os from 'os'
2✔
3
import { join } from 'path'
2✔
4

5
import { getProjectPath } from './paths'
2✔
6
import { runCommand } from './process'
2✔
7

8
export type ComposeOptions = {
9
  files: string[]
10
  args: string[]
11
  env?: NodeJS.ProcessEnv
12
}
13

14
export const resolveComposeFile = (filename: string): string => getProjectPath(filename)
2✔
15

16
export const buildComposeArgs = (files: string[], args: string[]): string[] => {
2✔
17
  const out: string[] = []
1✔
18

19
  for (const file of files) {
1✔
20
    const fullPath = resolveComposeFile(file)
2✔
21
    if (fs.existsSync(fullPath)) {
2✔
22
      out.push('-f', fullPath)
1✔
23
    }
24
  }
25

26
  return [...out, ...args]
1✔
27
}
28

29
export const runDockerCompose = async ({ files, args, env }: ComposeOptions): Promise<number> => {
2✔
NEW
30
  const composeArgs = buildComposeArgs(files, args)
×
NEW
31
  return runCommand('docker', ['compose', ...composeArgs], { env })
×
32
}
33

34
export const createPortOverrideComposeFile = (port: number): string => {
2✔
35
  const tempFile = join(os.tmpdir(), `nostream-port-override-${process.pid}-${Date.now()}.yml`)
1✔
36
  const content = [
1✔
37
    'services:',
38
    '  nostream:',
39
    '    environment:',
40
    `      RELAY_PORT: ${port}`,
41
    '    ports:',
42
    `      - 127.0.0.1:${port}:${port}`,
43
  ].join('\n')
44

45
  fs.writeFileSync(tempFile, content, { encoding: 'utf-8' })
1✔
46
  return tempFile
1✔
47
}
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