( logging: boolean, translate: Translate, csvValues: any[], validateRow?: ValidateRowFunction )
| 88 | } |
| 89 | |
| 90 | export async function CheckCSVValidation( |
| 91 | logging: boolean, |
| 92 | translate: Translate, |
| 93 | csvValues: any[], |
| 94 | validateRow?: ValidateRowFunction |
| 95 | ): Promise<void> { |
| 96 | const logger = makeLogger(logging); |
| 97 | if (!validateRow) { |
| 98 | return; |
| 99 | } |
| 100 | try { |
| 101 | await Promise.all(csvValues.map(validateRow)); |
| 102 | } catch (error) { |
| 103 | logger.error("CheckCSVValidation", { csvValues }, error); |
| 104 | throw translate("csv.parsing.failedValidateRow"); |
| 105 | } |
| 106 | } |
| 107 | |
| 108 | export async function GetCSVItems( |
| 109 | logging: boolean, |
no test coverage detected