(keyName: string, defaultValue?: string)
| 124 | |
| 125 | function stringConfigValue(keyName: string): string |
| 126 | function stringConfigValue(keyName: string, defaultValue: string): string |
| 127 | function stringConfigValue(keyName: string, defaultValue?: string): string | undefined { |
| 128 | if (keyName in profile) { |
| 129 | const configValue = profile[keyName] |
| 130 | if (typeof configValue === 'string') { |
| 131 | return configValue |
| 132 | } |
| 133 | logger.warn(`expected string value for config key ${keyName} but got ${typeof profile[keyName]}`) |
| 134 | return defaultValue |
| 135 | } |
| 136 | logger.trace(`key ${keyName} not found in ${description.profileName} config`) |
| 137 | return defaultValue |
| 138 | } |
| 139 | |
| 140 | function stringArrayConfigValue(keyName: string, defaultValue: string[] = []): string[] { |
nothing calls this directly
no outgoing calls
no test coverage detected