var l=(d,a,s)=>new Promise((r,t)=>{var i=n=>{try{o(s.next(n))}catch(c){t(c)}},e=n=>{try{o(s.throw(n))}catch(c){t(c)}},o=n=>n.done?r(n.value):Promise.resolve(n.value).then(i,e);o((s=s.apply(d,a)).next())});var p={name:"bin-console",description:"Symfony bin/console command",generateSpec:(d,a)=>l(void 0,null,function*(){let{stdout:s}=yield a({command:"php",args:["bin/console","list","--format=json"]}),r=[];try{r=JSON.parse(s).commands.map(i=>({name:i.name,description:i.description,icon:"https://cdn.iconscout.com/icon/free/png-128/symfony-282493.png",hidden:i.hidden||!1,args:Object.values(i.definition.arguments).map(e=>({name:e.name,description:e.description,isOptional:!e.is_required})),options:Object.values(i.definition.options).map(e=>{let o=[e.name];e.shortcut!==""&&o.push(e.shortcut);let n=[];return e.accept_value&&n.push({name:"arg",isVariadic:e.is_multiple,isOptional:!e.is_value_required}),{name:o,args:n,description:e.description}})}))}catch(t){console.error(t)}return{name:"bin-console",subcommands:r}})},u=p;export{u as default};
