( model: string | undefined, )
| 49 | } |
| 50 | |
| 51 | export function resolveAntModel( |
| 52 | model: string | undefined, |
| 53 | ): AntModel | undefined { |
| 54 | if (process.env.USER_TYPE !== 'ant') { |
| 55 | return undefined |
| 56 | } |
| 57 | if (model === undefined) { |
| 58 | return undefined |
| 59 | } |
| 60 | const lower = model.toLowerCase() |
| 61 | return getAntModels().find( |
| 62 | m => m.alias === model || lower.includes(m.model.toLowerCase()), |
| 63 | ) |
| 64 | } |
| 65 |
no test coverage detected