• 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

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

5
import { getConfigBaseDir, getDefaultSettingsFilePath, getProjectPath, getSettingsFilePath } from './paths'
2✔
6

7
export const ensureNotRoot = (): void => {
2✔
NEW
8
  if (typeof process.geteuid === 'function' && process.geteuid() === 0) {
×
NEW
9
    throw new Error('Nostream should not be run as root.')
×
10
  }
11
}
12

13
export const ensureConfigBootstrap = (): void => {
2✔
NEW
14
  const configDir = getConfigBaseDir()
×
NEW
15
  const settingsFile = getSettingsFilePath()
×
NEW
16
  const defaultsFile = getDefaultSettingsFilePath()
×
17

NEW
18
  if (!fs.existsSync(configDir)) {
×
NEW
19
    fs.mkdirSync(configDir, { recursive: true })
×
20
  }
21

NEW
22
  if (!fs.existsSync(settingsFile)) {
×
NEW
23
    fs.copyFileSync(defaultsFile, settingsFile)
×
24
  }
25
}
26

27
export const ensureTorDataDir = (): void => {
2✔
NEW
28
  fs.mkdirSync(getProjectPath('.nostr', 'tor', 'data'), { recursive: true })
×
29
}
30

31
export const ensureI2PDataDir = (): void => {
2✔
NEW
32
  fs.mkdirSync(getProjectPath('.nostr', 'i2p', 'data'), { recursive: true })
×
33
}
34

35
export const getTorHostnamePath = (): string => getProjectPath('.nostr', 'tor', 'data', 'nostream', 'hostname')
2✔
36

37
export const getOnionKeyPath = (): string =>
2✔
NEW
38
  join(process.env.NOSTR_CONFIG_DIR ?? join(homedir(), '.nostr'), 'v3_onion_private_key')
×
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