import f from"node:path";import{CONFIG_FILE_NAME as n}from"../../../constants/common.js";const o=async(a,r)=>{if(!a.match(/(\.ya?ml|\.json)$/)||f.posix.basename(a)===n||await r.isPathIgnored(a))return!1;const s=r.fs.getFileInfo(a);if(!s)return!1;try{const{data:e}=await r.cache.load(s.realRelativePath,"yaml");return!!e?.asyncapi}catch{return!1}};export{o as isAsyncapiDoc};
