var m=(c,r,i)=>new Promise((s,o)=>{var e=t=>{try{n(i.next(t))}catch(p){o(p)}},a=t=>{try{n(i.throw(t))}catch(p){o(p)}},n=t=>t.done?s(t.value):Promise.resolve(t.value).then(e,a);n((i=i.apply(c,r)).next())});var d={name:"artisan",description:"Laravel Artisan Command",generateSpec:(c,r)=>m(void 0,null,function*(){var{stdout:i}=yield r({command:"php",args:["artisan","list","--format=json"]});let s=[];try{JSON.parse(i).commands.map(e=>{s.push({name:e.name,description:e.description,icon:"https://web.tinkerwell.app/img/laravel.3cab6a56.png",args:Object.keys(e.definition.arguments).map(a=>{let n=e.definition.arguments[a];return{name:n.name,description:n.description,isOptional:!n.is_required}}),options:Object.keys(e.definition.options).map(a=>{let n=e.definition.options[a],t=[n.name];return n.shortcut!==""&&t.push(n.shortcut),{name:t,description:n.description}})})})}catch(o){}return{name:"artisan",debounce:!0,subcommands:s}})},f=d;export{f as default};
