const fs=require("fs"),path=require("path"),{parseJsonByPath:parseJsonByPath}=require("./utils");function initHxConfig(n){const e=path.resolve(process.env.WORKSPACE_FOLDER,".hbuilderx/launch.json");if(fs.existsSync(e))try{const s=parseJsonByPath(e).configurations||[];n.hxConfig=s.find((n=>"uniCloud"===n.type))}catch(n){return console.error("项目下.hbuilderx/launch.json格式不正确，请检查"),{code:"SYSTEM_ERROR",message:"项目下.hbuilderx/launch.json格式不正确，请检查"}}}module.exports={initHxConfig:initHxConfig};