(keyName: string, defaultValue: string[] = [])
| 137 | return defaultValue |
| 138 | } |
| 139 | |
| 140 | function stringArrayConfigValue(keyName: string, defaultValue: string[] = []): string[] { |
| 141 | if (keyName in profile) { |
| 142 | const configValue = profile[keyName] |
| 143 | if (typeof configValue === 'string') { |
| 144 | return [configValue] |
| 145 | } |
| 146 | if (Array.isArray(configValue) && configValue.every(dir => typeof dir === 'string')) { |
| 147 | return configValue |
| 148 | } |
| 149 | logger.warn(`expected string or array of strings for config key ${keyName} but got ${typeof configValue}`) |
| 150 | return defaultValue |
| 151 | } |
| 152 | return defaultValue |
| 153 | } |
| 154 | |
| 155 | function booleanConfigValue(keyName: string, defaultValue = false): boolean { |
nothing calls this directly
no outgoing calls
no test coverage detected