* Parse a generic YAML file (used for tools.yml and other config files) * @param {string} filePath - Path to the YAML file * @returns {object|null} Parsed YAML object or null on error
(filePath)
| 303 | * @returns {object|null} Parsed YAML object or null on error |
| 304 | */ |
| 305 | function parseYamlFile(filePath) { |
| 306 | return safeFileOperation( |
| 307 | () => { |
| 308 | const content = fs.readFileSync(filePath, "utf8"); |
| 309 | return yaml.load(content, { schema: yaml.JSON_SCHEMA }); |
| 310 | }, |
| 311 | filePath, |
| 312 | null |
| 313 | ); |
| 314 | } |
| 315 | |
| 316 | export { |
| 317 | extractAgentMetadata, |
no test coverage detected