(options: { showSecrets?: boolean } = {})
| 183 | } |
| 184 | |
| 185 | export const runConfigEnvList = async (options: { showSecrets?: boolean } = {}): Promise<number> => { |
| 186 | const values = readEnvValues() |
| 187 | const entries = Object.entries(values).sort(([a], [b]) => a.localeCompare(b)) |
| 188 | |
| 189 | if (entries.length === 0) { |
| 190 | logInfo('No .env entries found') |
| 191 | return 0 |
| 192 | } |
| 193 | |
| 194 | for (const [key, value] of entries) { |
| 195 | const displayValue = options.showSecrets || !isSecretEnvKey(key) ? value : maskSecretValue(value) |
| 196 | logInfo(`${key}=${displayValue}`) |
| 197 | } |
| 198 | |
| 199 | return 0 |
| 200 | } |
| 201 | |
| 202 | export const runConfigEnvGet = async (key: string, options: { showSecrets?: boolean } = {}): Promise<number> => { |
| 203 | const normalizedKey = key.trim() |
no test coverage detected