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

Function runConfigEnvSet

src/cli/commands/config.ts:223–240  ·  view source on GitHub ↗
(key: string, value: string)

Source from the content-addressed store, hash-verified

221}
222
223export const runConfigEnvSet = async (key: string, value: string): Promise<number> => {
224 const normalizedKey = key.trim()
225
226 if (!isSupportedEnvKey(normalizedKey)) {
227 logError(`Unsupported env key: ${normalizedKey}`)
228 return 1
229 }
230
231 const issue = validateEnvPair(normalizedKey, value)
232 if (issue) {
233 logError(issue)
234 return 1
235 }
236
237 upsertEnvValue(normalizedKey, value)
238 logInfo(`Updated ${normalizedKey}`)
239 return 0
240}
241
242export const runConfigEnvValidate = async (): Promise<number> => {
243 const values = readEnvValues()

Callers 1

index.tsFile · 0.90

Calls 5

isSupportedEnvKeyFunction · 0.90
logErrorFunction · 0.90
validateEnvPairFunction · 0.90
upsertEnvValueFunction · 0.90
logInfoFunction · 0.90

Tested by

no test coverage detected