static-php-cli/assets/chunks/CliGenerator.BBdriT-M.js

3 lines
34 KiB
JavaScript
Raw Normal View History

import{d as we,s as w,h as D,v as G,o as g,c as x,j as e,t as n,F as N,E as O,a2 as m,a3 as R,a4 as Y,e as I,a5 as f,a as ge,a6 as F,p as xe,l as me,_ as he}from"./framework.gjrnbxUT.js";const ye={support:{BSD:"wip"},type:"external","arg-type":"custom",source:"amqp","lib-depends":["librabbitmq"],"ext-depends-windows":["openssl"]},ve={type:"external",source:"apcu"},fe={type:"builtin"},ze={type:"builtin","arg-type-unix":"with-prefix","arg-type-windows":"with","lib-depends":["bzip2"]},Se={type:"builtin"},De={type:"builtin"},Be={notes:!0,type:"builtin","arg-type":"with","lib-depends":["curl"],"ext-depends-windows":["zlib","openssl"]},ke={type:"builtin","arg-type":"custom","lib-suggests":["qdbm"]},qe={support:{BSD:"wip"},type:"builtin","arg-type":"custom","arg-type-windows":"with","lib-depends":["libxml2","zlib"],"ext-depends-windows":["xml"]},Ee={type:"external",source:"ext-ds"},We={support:{Windows:"wip",BSD:"wip",Darwin:"wip",Linux:"wip"},type:"wip"},Ce={support:{Windows:"wip",BSD:"wip"},notes:!0,type:"external",source:"ext-event","arg-type":"custom","lib-depends":["libevent"],"ext-depends":["openssl"],"ext-suggests":["sockets"]},Ie={type:"builtin"},Pe={support:{Linux:"no",BSD:"wip"},notes:!0,"arg-type":"custom",type:"builtin","lib-depends-unix":["libffi"],"lib-depends-windows":["libffi-win"]},_e={type:"builtin"},Ue={type:"builtin"},Le={type:"builtin","lib-suggests":["openssl"]},$e={support:{BSD:"wip"},notes:!0,type:"builtin","arg-type":"custom","arg-type-windows":"with","lib-depends":["zlib","libpng"],"ext-depends":["zlib"],"lib-suggests":["libavif","libwebp","libjpeg","freetype"]},Ne={support:{Windows:"wip",BSD:"wip"},type:"builtin","arg-type":"with-prefix","lib-depends":["gettext"]},Oe={support:{Windows:"wip",BSD:"no",Linux:"no"},notes:!0,type:"external","arg-type":"custom",source:"ext-glfw","lib-depends":["glfw"],"lib-depends-windows":[]},Ve={support:{Windows:"wip",BSD:"wip"},type:"builtin","arg-type":"with-prefix","lib-depends":["gmp"]},Ae={support:{BSD:"wip"},type:"external",source:"ext-gmssl","lib-depends":["gmssl"]},Te={support:{Windows:"wip",BSD:"wip"},type:"external",source:"grpc","arg-type-unix":"custom","cpp-extension":!0,"lib-depends":["grpc"]},je={support:{BSD:"wip"},type:"builtin","arg-type":"with-prefix","arg-type-windows":"with","lib-depends-unix":["libiconv"],"lib-depends-windows":["libiconv-win"]},Ge={support:{BSD:"wip"},type:"external",source:"igbinary","ext-suggests":["session","apcu"]},Xe={support:{Windows:"wip",BSD:"wip"},type:"external",source:"ext-imagick","arg-type":"custom","lib-depends":["imagemagick"]},Me={support:{Windows:"wip",BSD:"wip"},notes:!0,type:"builtin","arg-type":"custom","lib-depends":["imap"],"ext-suggests":["openssl"]},He={support:{Windows:"no",BSD:"wip",Darwin:"no"},type:"external",source:"inotify"},Re={support:{Windows:"no",BSD:"wip"},type:"builtin","lib-depends":["icu"]},Fe={support:{Windows:"wip",BSD:"wip"},type:"builtin","arg-type":"with-prefix","lib-depends":["ldap"],"lib-suggests":["gmp","libsodium"],"ext-suggests":["openssl"]},Ze={support:{BSD:"wip"},type:"builtin","arg-type":"none","ext-depends":["xml"]},Qe={type:"builtin","arg-type":"custom","ext-depends":["mbstring"],"lib-depends":["onig"]},Ke={type:"builtin","arg-type":"custom"},Ye={type:"wip",support:{Windows:"no",BSD:"no",Darwin:"no",Linux:"no"},notes:!0},Je={support:{Windows:"wip",BSD:"wip"},type:"external",source:"ext-memcache","arg-type":"custom","lib-depends":["zlib"],"ext-depends":["session"]},ei={support:{Windows:"wip",BSD:"wip",Linux:"no"},type:"external",source:"memcached","arg-type":"custom","cpp-extension":!0,"lib-depends":["libmemcached"],"ext-depends":["session","zlib"]},ii={support:{BSD:"wip",Windows:"wip"},type:"external",source:"mongodb","arg-type":"custom","lib-suggests":["icu","openssl","zstd","zlib"]},si={support:{BSD:"wip"},type:"external",source:"msgpack","arg-type-unix":"with","arg-type-win":"enable"},li={type:"builtin","arg-type":"with","ext-depends":["mysqlnd"]},ti={type:"builtin","arg-type-windows":"with","lib-depends":["zlib"]},ni={type:"wip",support:{Windows:"wip",BSD:"no",Darwin:"no",Linux
`);let l=[];return p.forEach(s=>{s.indexOf("=")>=1&&l.push(s)})," "+l.map(s=>'-I "'+s+'"').join(" ")}),C=w(""),H=(p,l)=>p.includes(C.value)?l===0?p.substring(0,p.indexOf(C.value)):l===1?C.value:p.substring(p.indexOf(C.value)+C.value.length):l===0?p:"",ae=p=>{let l;v.value.indexOf("all")!==-1&&p.target.value==="all"?v.value=["all"]:(l=v.value.indexOf("all"))!==-1&&p.target.value!=="all"&&v.value.splice(l,1),K.value=v.value.map(s=>"--build-"+s).join(" ")},de=p=>{const l=new Set,s=r=>{let u=[];if(c.value==="linux"){if(u=t.value[r]["ext-depends-linux"]??t.value[r]["ext-depends-unix"]??t.value[r]["ext-depends"]??[],u.length===0)return}else if(c.value==="macos"){if(u=t.value[r]["ext-depends-macos"]??t.value[r]["ext-depends-unix"]??t.value[r]["ext-depends"]??[],u.length===0)return}else if(c.value==="windows"&&(u=t.value[r]["ext-depends-windows"]??t.value[r]["ext-depends"]??[],u.length===0))return;u.forEach(b=>{l.add(b),s(b)})};return p.forEach(r=>{s(r)}),Array.from(l)},ue=D(()=>`${j.value} download --all --with-php=${U.value}${P.value?" --prefer-pre-built":""}${k.value?" --debug":""}`),pe=D(()=>`${j.value} download --with-php=${U.value} --for-extensions "${Q.value}"${P.value?" --prefer-pre-built":""}${k.value?" --debug":""}`),ce=D(()=>`${j.value} install-pkg upx${k.value?" --debug":""}`),re=D(()=>`${j.value} build ${K.value} "${Q.value}"${ne.value}${k.value?" --debug":""}${L.value?" --enable-zts":""}${W.value?" --with-upx-pack":""}${oe.value}`),be=p=>{const l=new Set,s=u=>{let b=[];if(c.value==="linux"){if(b=a.value[u]["lib-depends-linux"]??a.value[u]["lib-depends-unix"]??a.value[u]["lib-depends"]??[],b.length===0)return}else if(c.value==="macos"){if(b=a.value[u]["lib-depends-macos"]??a.value[u]["lib-depends-unix"]??a.value[u]["lib-depends"]??[],b.length===0)return}else if(c.value==="windows"&&(b=a.value[u]["lib-depends-windows"]??a.value[u]["lib-depends"]??[],b.length===0))return;b.forEach(q=>{l.add(q),s(q)})},r=u=>{let b=[];if(c.value==="linux"){if(b=t.value[u]["lib-depends-linux"]??t.value[u]["lib-depends-unix"]??t.value[u]["lib-depends"]??[],b.length===0)return}else if(c.value==="macos"){if(b=t.value[u]["lib-depends-macos"]??t.value[u]["lib-depends-unix"]??t.value[u]["lib-depends"]??[],b.length===0)return}else if(c.value==="windows"&&(b=t.value[u]["lib-depends-windows"]??t.value[u]["lib-depends"]??[],b.length===0))return;b.forEach(q=>{l.add(q),s(q)})};return p.forEach(u=>{r(u)}),Array.from(l)};return G(c,()=>y.value=[]),G(c,()=>W.value=0),G(y,p=>{X.value=de(p),X.value.forEach(s=>{y.value.indexOf(s)===-1&&y.value.push(s)}),y.value.sort(),console.log("检测到变化!"),console.log(p);const l=sl({ext:t.value,lib:a.value,os:c.value},y.value);h.value=l.libs.sort(),B.value=[],V.value=be(l.exts),V.value.forEach(s=>{B.value.indexOf(s)===-1&&B.value.push(s)})}),(p,l)=>(g(),x("div",null,[e("h2",null,n(o[i.lang].selectedSystem),1),e("div",ol,[(g(),x(N,null,O(z,(s,r)=>e("span",{key:r,style:{"margin-right":"8px"}},[m(e("input",{type:"radio",id:"os-"+s.os,value:s.os,disabled:s.disabled===!0,"onUpdate:modelValue":l[0]||(l[0]=u=>c.value=u)},null,8,al),[[f,c.value]]),e("label",{for:"os-"+s.os},n(s.label),9,dl)])),64))]),e("div",ul,[m(e("select",{"onUpdate:modelValue":l[1]||(l[1]=s=>T.value=s)},[pl,e("option",{value:"aarch64",disabled:c.value==="windows"},"aarch64",8,cl)],512),[[R,T.value]])]),e("h2",null,n(o[i.lang].selectExt)+n(y.value.length>0?" ("+y.value.length+")":""),1),e("div",rl,[m(e("input",{class:"input","onUpdate:modelValue":l[2]||(l[2]=s=>C.value=s),placeholder:"Highlight search..."},null,512),[[Y,C.value]]),bl,(g(!0),x(N,null,O(d.value,s=>(g(),x("div",wl,[e("span",null,[m(e("input",{type:"checkbox",id:s,value:s,"onUpdate:modelValue":l[3]||(l[3]=r=>y.value=r),disabled:X.value.indexOf(s)!==-1},null,8,gl),[[F,y.value]]),e("label",{for:s},[e("span",null,n(H(s,0)),1),e("span",ml,n(H(s,1)),1),e("span",null,n(H(s,2)),1)],8,xl)])]))),256))]),c.value!=="windows"?(g(),x("div",{key:0,class:"my-btn",onClick:te},n(o[i.lang].selectCommon),1)):I("",!0),e("div",{class:"my-btn",onClick:l[4]||(l[4]=s=>y.value=[])},n(o[i.lang].selectNone),1),