( parsedExprList: Expr[] )
| 43 | }; |
| 44 | |
| 45 | export const batchConvertParsedExprToCELString = async ( |
| 46 | parsedExprList: Expr[] |
| 47 | ): Promise<string[]> => { |
| 48 | try { |
| 49 | const request = create(BatchDeparseRequestSchema, { |
| 50 | expressions: parsedExprList, |
| 51 | }); |
| 52 | const response = await celServiceClientConnect.batchDeparse(request, { |
| 53 | contextValues: createContextValues().set(silentContextKey, true), |
| 54 | }); |
| 55 | return response.expressions; |
| 56 | } catch (error) { |
| 57 | console.error(error); |
| 58 | return Array.from({ length: parsedExprList.length }).map((_) => ""); |
| 59 | } |
| 60 | }; |
no test coverage detected