MCPcopy Create free account
hub / github.com/github/awesome-copilot / parseYamlFile

Function parseYamlFile

eng/yaml-parser.mjs:305–314  ·  view source on GitHub ↗

* 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)

Source from the content-addressed store, hash-verified

303 * @returns {object|null} Parsed YAML object or null on error
304 */
305function 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
316export {
317 extractAgentMetadata,

Callers 2

generateToolsDataFunction · 0.90
generateSamplesDataFunction · 0.90

Calls 1

safeFileOperationFunction · 0.70

Tested by

no test coverage detected