* Parse action definitions from meta.yaml * Standard array format: actions: [{ type, name, description, params: [{ name, type, ... }] }]
(yamlContent: string)
| 247 | * Standard array format: actions: [{ type, name, description, params: [{ name, type, ... }] }] |
| 248 | */ |
| 249 | function parseMetaYamlActions(yamlContent: string): AppActionDef[] { |
| 250 | const actions: AppActionDef[] = []; |
| 251 | |
| 252 | // Check for actions: [] (inline empty) |
| 253 | if (/^actions:\s*\[\]\s*$/m.test(yamlContent)) return actions; |
| 254 | |
| 255 | // Find the actions: section |
| 256 | const actionsMatch = yamlContent.match(/^actions:\s*$/m); |
| 257 | if (!actionsMatch) return actions; |
| 258 | |
| 259 | const actionsStart = actionsMatch.index! + actionsMatch[0].length; |
| 260 | const restContent = yamlContent.slice(actionsStart); |
| 261 | |
| 262 | const lines = restContent.split('\n'); |
| 263 | parseStandardActions(lines, actions); |
| 264 | |
| 265 | return actions; |
| 266 | } |
| 267 | |
| 268 | function parseStandardActions(lines: string[], actions: AppActionDef[]): void { |
| 269 | let i = 0; |
no test coverage detected