(configYaml: string)
| 71 | } |
| 72 | |
| 73 | export function parseBlock(configYaml: string): Block { |
| 74 | try { |
| 75 | const parsed = YAML.parse(configYaml); |
| 76 | const result = blockSchema.parse(parsed); |
| 77 | return result; |
| 78 | } catch (e: any) { |
| 79 | throw new Error(`Failed to parse block: ${formatZodError(e)}`); |
| 80 | } |
| 81 | } |
| 82 | |
| 83 | export const TEMPLATE_VAR_REGEX = /\${{[\s]*([^}\s]+)[\s]*}}/g; |
| 84 |
nothing calls this directly
no test coverage detected