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

Function readEnvSecret

src/cli/commands/setup.ts:32–44  ·  view source on GitHub ↗
(content: string)

Source from the content-addressed store, hash-verified

30}
31
32const readEnvSecret = (content: string): string | undefined => {
33 for (const line of content.split(/\r?\n/)) {
34 const trimmed = line.trim()
35 if (!trimmed || trimmed.startsWith('#') || !trimmed.startsWith('SECRET=')) {
36 continue
37 }
38
39 const [rawValue] = trimmed.slice('SECRET='.length).split('#', 1)
40 return rawValue.trim()
41 }
42
43 return undefined
44}
45
46const needsSecretReplacement = (secret: string | undefined): boolean => {
47 return !secret || secret === SECRET_PLACEHOLDER

Callers 1

ensureEnvFileFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected