MCPcopy Index your code
hub / github.com/cameri/nostream / ensureConfigBootstrap

Function ensureConfigBootstrap

src/cli/utils/bootstrap.ts:13–25  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

11}
12
13export const ensureConfigBootstrap = (): void => {
14 const configDir = getConfigBaseDir()
15 const settingsFile = getSettingsFilePath()
16 const defaultsFile = getDefaultSettingsFilePath()
17
18 if (!fs.existsSync(configDir)) {
19 fs.mkdirSync(configDir, { recursive: true })
20 }
21
22 if (!fs.existsSync(settingsFile)) {
23 fs.copyFileSync(defaultsFile, settingsFile)
24 }
25}
26
27export const ensureTorDataDir = (): void => {
28 fs.mkdirSync(getProjectPath('.nostr', 'tor', 'data'), { recursive: true })

Callers 2

runStartFunction · 0.90
runSetupFunction · 0.90

Calls 3

getConfigBaseDirFunction · 0.90
getSettingsFilePathFunction · 0.90

Tested by

no test coverage detected