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

cameri / nostream / 24938906007

25 Apr 2026 07:33PM UTC coverage: 63.509% (-12.0%) from 75.491%
24938906007

push

github

web-flow
feat: migrate nostream scripts to unified CLI/TUI (#574)

* chore(deps): add CLI and import/export dependencies

* feat(import-export): support JSON array workflows

* feat(cli): add nostream CLI and replace shell scripts

* docs(ci): update docs and checks for CLI workflow

* chore: sync package-lock with package.json

* feat: add CLI management commands and config tooling

* feat(cli): update TUI to include stop menu and remove unused formatting and validation utilities

* feat(tests): ensure test reports directory is created after build in pretest:unit

* feat(cli): add JSON output support for info and config commands; remove legacy wrapper scripts

* feat(cli): enhance setup and info commands with JSON output and secret management

* feat(cli): refactor setup prompts and error handling in runSetup function

* feat(cli): update CLI version to match package.json and refactor import statements in tests

* fix: update integration test scripts to use npm and npx for compatibility

* docs: update CONTRIBUTING.md to include unified CLI commands for development operations

* feat(docker): update docker compose commands to use CLI for improved consistency

* fix: update CLI commands to use pnpm for consistency

* chore: remove outdated development quick start instructions from README

* fix: update CLI commands to use pnpm for consistency

* feat: introduce unified nostream CLI/TUI to replace legacy shell wrappers

* fix: correct consistency issues in CLI/TUI after pnpm migration

---------

Co-authored-by: Ricardo Cabral <me@ricardocabral.io>

1620 of 2880 branches covered (56.25%)

Branch coverage included in aggregate %.

735 of 1701 new or added lines in 29 files covered. (43.21%)

3838 of 5714 relevant lines covered (67.17%)

18.98 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 TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc