var m=(p,o,t)=>new Promise((r,a)=>{var i=n=>{try{s(t.next(n))}catch(c){a(c)}},e=n=>{try{s(t.throw(n))}catch(c){a(c)}},s=n=>n.done?r(n.value):Promise.resolve(n.value).then(i,e);s((t=t.apply(p,o)).next())});var u={name:"please",description:"Statamic Please command",generateSpec:(p,o)=>m(void 0,null,function*(){let{stdout:t}=yield o({command:"php",args:["please","list","--format=json"]}),r=[];try{JSON.parse(t).commands.map(i=>{r.push({name:i.name,description:i.description,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 s=[e.name];return e.shortcut!==""&&s.push(e.shortcut),{name:s,description:e.description}})})})}catch(a){console.error(a)}return{name:"please",debounce:!0,subcommands:r}})},l=u;export{l as default};
