cherry-cljs
Advanced tools
Comparing version 0.0.0-alpha.35 to 0.0.0-alpha.36
import { $APP, shadow$provide, $jscomp } from "./transpiler.js"; | ||
const shadow_esm_import = function(x) { return import(x) }; | ||
'use strict';var LF=function(a,b){return $APP.t($APP.t(b)?$APP.Ik.h(b,""):b)?$APP.Oq(a,new $APP.np(new $APP.mp(b,$APP.G(b)))):null},NF=function(a){throw $APP.Fm.h(["Unexpected format: ",$APP.u.g(a)].join(""),new $APP.q(null,1,[MF,a],null));},OF=function(a){var b=JSON.parse(a);return $APP.Jd(b)?b:NF(a)},PF=function(a){var b=JSON.parse(a);return $APP.Nd(b)?b:NF(a)},QF=function(a){var b=JSON.parse(a);return $APP.Od(b)?b:NF(a)},RF=function(a){var b=JSON.parse(a);return"number"===typeof b?b:NF(a)},SF= | ||
function(a){return $APP.H.h(":",0<a.length?a.charAt(0):null)?$APP.ii.g($APP.Zh.h(a,1)):$APP.ii.g(a)},TF=function(a){return $APP.yd(a)?$APP.C(a):a},UF=function(a){if("string"===typeof a)try{var b=0<a.length?a.charAt(0):null;if($APP.H.h("true",a)||$APP.H.h("false",a))var c=OF(a);else{if($APP.Ca(isNaN(a)))var d=RF(a);else{var e=$APP.H.h(":",b);var f=e?$APP.Xh(/:?[a-zA-Z0-9]+/,a):e;d=$APP.t(f)?SF(a):a}c=d}return c}catch(g){return a}else return a},ZF=function(a,b){var c=function(){switch(b instanceof $APP.P? | ||
b.Na:null){case "boolean":return OF;case "int":case "long":return PF;case "double":return QF;case "number":return RF;case "symbol":return $APP.ti;case "keyword":return SF;case "string":return $APP.ce;case "edn":return VF;case "auto":return UF;default:return b}}();if("string"===typeof a){try{var d=c.g?c.g(a):c.call(null,a)}catch(e){d=WF}if($APP.H.h(WF,d))throw $APP.Fm.h(["Coerce failure: cannot transform input ",$APP.bm.l($APP.U.h([a],0)),b instanceof $APP.P?" to ":" with ",$APP.u.g(b instanceof $APP.P? | ||
$APP.Jh(b):b)].join(""),new $APP.q(null,2,[XF,a,YF,b],null));return d}return a},$F=function(a,b,c){a=$APP.K.h(a,b);c=$APP.t(a)?a:$APP.yd(c)?$APP.od(c):null;return $APP.t(c)?$APP.yd(c)?$APP.Nk.h($APP.ne,c):c:null},aG=function(a,b,c,d){return $APP.Ik.h(b,c)?$APP.hl.j(a,b,function(e){return null==e?$APP.t(d)?d.h?d.h(e,!0):d.call(null,e,!0):!0:$APP.t(d)?d.h?d.h(e,!0):d.call(null,e,!0):e}):a},bG=function(a,b,c,d,e){d=$APP.t($APP.t(d)?!$APP.yd(d):d)?ZF(e,d):UF(e);return $APP.t(c)?$APP.hl.F(a,b,c,d):$APP.X.j(a, | ||
b,d)},gG=function(a){return $APP.Zd.j(function(b,c){var d=$APP.I.j(c,0,null);c=$APP.I.j(c,1,null);c=$APP.Pe(c);var e=$APP.K.h(c,cG),f=$APP.K.h(c,dG);c=$APP.K.h(c,$APP.vn);b=$APP.t(e)?$APP.hl.J(b,cG,$APP.X,d,e):b;b=$APP.t(f)?$APP.hl.j(b,eG,function(g){if($APP.Qd(g,f))throw $APP.Fm.h(["Conflicting alias ",$APP.u.g(f)," between ",$APP.u.g($APP.K.h(g,f))," and ",$APP.u.g(d)].join(""),new $APP.q(null,1,[dG,f],null));return $APP.X.j(g,f,d)}):b;return $APP.t(c)?$APP.hl.J(b,fG,$APP.X,d,c):b},$APP.Oe,a)}, | ||
tG=function(){var a=process.argv.slice(2),b=new $APP.q(null,1,[eG,new $APP.q(null,1,[hG,iG],null)],null),c=jG.g(b);b=$APP.t(c)?$APP.Fl.l($APP.U.h([b,$APP.t(c)?gG(c):null],0)):b;var d=cG.g(b),e=eG.g(b),f=kG.g(b),g=fG.g(b),h=lG.g(b),l=$APP.H.h(!0,mG.g(b))?function(){var A=null==c?null:$APP.yh(c);A=null==A?null:$APP.Y.h(A,$APP.yh(e));A=null==A?null:$APP.Y.h(A,$APP.yh(d));return null==A?null:$APP.Hh(A)}():mG.g(b);a=$APP.Uh(function(A){var D=$APP.t(h)?null:0==A.lastIndexOf(":",0);return!($APP.t(D)?D:0== | ||
A.lastIndexOf("-",0))},a);var n=$APP.I.j(a,0,null),p=$APP.I.j(a,1,null);a=function(){var A=$APP.B(n);return null==A?null:$APP.Zf(A)}();var r=function(){for(var A=$APP.t(g)?g:$APP.Oe,D=null,F=null,O=$APP.t(h)?nG:null,S=$APP.B(p);;){if($APP.Ca(S))return new $APP.R(null,3,5,$APP.T,[A,D,F],null);var W=$APP.C(S),ka=$F(f,D,$APP.K.h(d,D)),va=0<W.length?W.charAt(0):null,yb=$APP.H.h(va,"-"),Qb=function(){var jd=O;return $APP.t(jd)?jd:yb?nG:null}(),na=$APP.H.h(":",va),Xb=$APP.Ik.h(nG,Qb)&&na&&($APP.Ca(D)|| | ||
$APP.H.h(F,D));va=function(){var jd=Qb;return $APP.t(jd)?jd:Xb?oG:null}();if(yb||Xb){var Ua=(na=0==W.lastIndexOf("--",0))&&$APP.H.h("--",W);if(Ua){var Fd=$APP.E(S);return new $APP.R(null,3,5,$APP.T,[function(){var jd=A;return Fd?$APP.Hk.F(jd,$APP.fl,new $APP.R(null,2,5,$APP.T,[pG,qG],null),$APP.Zf(Fd)):jd}(),D,F],null)}Ua=na?$APP.Zh.h(W,2):$APP.To(W,/^(:|-|)/,"");na=na?$APP.Xo(Ua,/=/):new $APP.R(null,1,5,$APP.T,[Ua],null);Ua=$APP.I.j(na,0,null);na=$APP.I.j(na,1,null);Ua=$APP.ii.g(Ua);Ua=$APP.K.j(e, | ||
Ua,Ua);if($APP.t($APP.t(l)?$APP.Ca($APP.K.h(l,Ua)):l))throw $APP.Fm.h(["Unknown option ",$APP.u.g(W)].join(""),new $APP.q(null,1,[mG,l],null));$APP.t(na)?(D=aG(A,D,F,ka),F=Ua,S=$APP.N(na,$APP.Jc(S)),A=D,D=F,F=null,O=va):(D=aG(A,D,F,ka),W=Ua,S=$APP.E(S),A=D,D=W,O=va)}else{var Kc=$APP.K.h(d,D);if(Ua=$APP.H.h(rG,Kc)&&$APP.Ca(F)&&$APP.Ik.h(W,"true")&&$APP.Ik.h(W,"false")||$APP.H.h(F,D)&&$APP.Ca(ka))return new $APP.R(null,3,5,$APP.T,[$APP.Hk.F(A,$APP.fl,new $APP.R(null,2,5,$APP.T,[pG,qG],null),$APP.Zf(S)), | ||
D,null],null);F=bG(A,D,ka,TF(Kc),W);W=$APP.H.h(oG,va)&&na?null:D;ka=$APP.H.h(oG,va)&&na?null:D;S=$APP.E(S);A=F;D=W;F=ka;O=va}}}();b=$APP.I.j(r,0,null);var v=$APP.I.j(r,1,null);r=$APP.I.j(r,2,null);var y=$F(f,v,$APP.K.h(ZF,v));b=aG(b,v,r,y);return $APP.t(a)?$APP.Hk.F(b,$APP.fl,new $APP.R(null,2,5,$APP.T,[pG,sG],null),a):b},vG=function(){var a=tG(),b=pG.g($APP.ud(a));return $APP.X.j(b,uG,$APP.Zj.h(a,pG))},wG=function(a,b){var c=$APP.zf($APP.G(a),b);b=$APP.I.j(c,0,null);c=$APP.I.j(c,1,null);return $APP.H.h(b, | ||
a)?c:null},AG=function(){var a=xG,b=vG(),c=$APP.Pe(b),d=$APP.K.h(c,sG),e=$APP.K.h(c,uG);$APP.Zd.j(function(f,g){f=$APP.Pe(g);var h=$APP.K.h(f,sG),l=$APP.K.h(f,$APP.Cs),n=$APP.K.h(f,yG),p=wG(h,d);if($APP.t(p)){var r=function(){var A=null==p?null:$APP.B(p);return null==A?null:$APP.Zf(A)}();f=$APP.t($APP.t(r)?n:r)?function(){var A=$APP.G(r),D=$APP.G(n);return new $APP.R(null,2,5,$APP.T,[$APP.xf.h(A<D?A:D,r),$APP.Kh(n,r)],null)}():new $APP.R(null,2,5,$APP.T,[r,null],null);var v=$APP.I.j(f,0,null);f=$APP.I.j(f, | ||
1,null);var y=$APP.t(f)?$APP.Fl.l($APP.U.h([e,f],0)):e;return $APP.Vc(function(){var A=$APP.X.l(c,zG,v,$APP.U.h([uG,y,$APP.bt,h],0));return l.g?l.g(A):l.call(null,A)}())}return null},null,a)},BG=function(a){a=$APP.B(a);for(var b=null,c=0,d=0;;)if(d<c){var e=b.ca(null,d);$APP.gm.l($APP.U.h(["Transpiling CLJS file:",e],0));e=$APP.Ut(new $APP.q(null,1,[$APP.Rt,e],null));e=$APP.Pe(e);e=$APP.K.h(e,$APP.St);$APP.gm.l($APP.U.h(["Wrote JS file:",e],0));d+=1}else if(a=$APP.B(a))$APP.Hd(a)?(c=$APP.gc(a),a= | ||
$APP.hc(a),b=c,c=$APP.G(c)):(e=$APP.C(a),$APP.gm.l($APP.U.h(["Transpiling CLJS file:",e],0)),b=$APP.Ut(new $APP.q(null,1,[$APP.Rt,e],null)),b=$APP.Pe(b),b=$APP.K.h(b,$APP.St),$APP.gm.l($APP.U.h(["Wrote JS file:",b],0)),a=$APP.E(a),b=null,c=0),d=0;else return null},VF=function VF(a){switch(arguments.length){case 1:return VF.g(arguments[0]);case 2:return VF.h(arguments[0],arguments[1]);default:throw Error(["Invalid arity: ",$APP.u.g(arguments.length)].join(""));}}; | ||
VF.g=function(a){return LF(new $APP.q(null,3,[$APP.Nq,$APP.sb($APP.CF),$APP.vn,$APP.sb($APP.BF),$APP.Fp,null],null),a)};VF.h=function(a,b){return LF($APP.hl.j($APP.Fl.l($APP.U.h([new $APP.q(null,1,[$APP.vn,$APP.sb($APP.BF)],null),a],0)),$APP.Nq,function(c){return $APP.Fl.l($APP.U.h([$APP.sb($APP.CF),c],0))}),b)};VF.v=2; | ||
var jG=new $APP.P(null,"spec","spec",347520401),rG=new $APP.P(null,"boolean","boolean",-1919418404),uG=new $APP.P(null,"opts","opts",155075701),iG=new $APP.P(null,"help","help",-439233446),YF=new $APP.P(null,"coerce-fn","coerce-fn",-821146515),lG=new $APP.P(null,"no-keyword-opts","no-keyword-opts",761286018),zG=new $APP.P(null,"rest-cmds","rest-cmds",-423198324),oG=new $APP.P(null,"keywords","keywords",1526959054),sG=new $APP.P(null,"cmds","cmds",-1841503952),eG=new $APP.P(null,"aliases","aliases", | ||
1346874714),kG=new $APP.P(null,"collect","collect",-284321549),pG=new $APP.P("org.babashka","cli","org.babashka/cli",1162430315),WF=new $APP.P("babashka.cli","error","babashka.cli/error",-939678701),yG=new $APP.P(null,"cmds-opts","cmds-opts",-390130362),fG=new $APP.P(null,"exec-args","exec-args",-1860766354),XF=new $APP.P(null,"input","input",556931961),cG=new $APP.P(null,"coerce","coerce",1917884504),CG=new $APP.P(null,"show","show",-576705889),mG=new $APP.P(null,"closed","closed",-919675359),hG= | ||
new $APP.P(null,"h","h",1109658740),DG=new $APP.P(null,"e","e",1381269198),MF=new $APP.P(null,"s","s",1705939918),nG=new $APP.P(null,"hyphens","hyphens",2113533609),dG=new $APP.P(null,"alias","alias",-2039751630),qG=new $APP.P(null,"args","args",1315556576);var xG=new $APP.R(null,3,5,$APP.T,[new $APP.q(null,3,[sG,new $APP.R(null,1,5,$APP.T,["run"],null),$APP.Cs,function(a){a=$APP.Pe(a);a=$APP.K.h(a,uG);a=$APP.Pe(a);a=$APP.K.h(a,$APP.zo);a=$APP.Ut(new $APP.q(null,1,[$APP.Rt,a],null));a=$APP.Pe(a);a=$APP.K.h(a,$APP.St);return shadow_esm_import([$APP.u.g(process.cwd()),"/",$APP.u.g(a)].join(""))},yG,new $APP.R(null,1,5,$APP.T,[$APP.zo],null)],null),new $APP.q(null,2,[sG,new $APP.R(null,1,5,$APP.T,["transpile"],null),$APP.Cs,function(a){a=$APP.Pe(a);a=$APP.K.h(a, | ||
zG);return BG(a)}],null),new $APP.q(null,2,[sG,$APP.Yf,$APP.Cs,function(a){a=$APP.Pe(a);var b=$APP.K.h(a,zG),c=$APP.K.h(a,uG);a=DG.g(c);if($APP.t(a)){a=$APP.Qt(a);var d=$APP.Tt.mkdtempSync(".tmp"),e=[$APP.u.g(d),"/cherry.mjs"].join("");$APP.Tt.writeFileSync(e,a,"utf-8");$APP.t(CG.g(c))&&$APP.gm.l($APP.U.h([a],0));return shadow_esm_import([$APP.u.g(process.cwd()),"/",e].join("")).finally(function(){return $APP.Tt.rmSync(d,{force:!0,recursive:!0})})}return $APP.t(function(){var f=iG.g(c);return $APP.t(f)? | ||
f:$APP.H.h("help",$APP.C(b))||$APP.xd(b)}())?$APP.gm.l($APP.U.h(["Cherry v0.0.0\n\nUsage:\n\nrun \x3cfile.cljs\x3e Transpile and run a file\ntranspile \x3cfile.cljs\x3e ... Transpile file(s)\nhelp Print this help"],0)):BG(b)}],null)],null);try{AG()}catch(a){throw console.error("An error occurred when calling (cherry.internal.cli/init)"),a;}; | ||
'use strict';var OF=function(a,b){return $APP.t($APP.t(b)?$APP.Ik.h(b,""):b)?$APP.Lq(a,new $APP.kp(new $APP.jp(b,$APP.G(b)))):null},QF=function(a){throw $APP.Fm.h(["Unexpected format: ",$APP.u.g(a)].join(""),new $APP.q(null,1,[PF,a],null));},RF=function(a){var b=JSON.parse(a);return $APP.Jd(b)?b:QF(a)},SF=function(a){var b=JSON.parse(a);return $APP.Nd(b)?b:QF(a)},TF=function(a){var b=JSON.parse(a);return $APP.Od(b)?b:QF(a)},UF=function(a){var b=JSON.parse(a);return"number"===typeof b?b:QF(a)},VF= | ||
function(a){return $APP.H.h(":",0<a.length?a.charAt(0):null)?$APP.ii.g($APP.Zh.h(a,1)):$APP.ii.g(a)},WF=function(a){return $APP.yd(a)?$APP.C(a):a},XF=function(a){if("string"===typeof a)try{var b=0<a.length?a.charAt(0):null;if($APP.H.h("true",a)||$APP.H.h("false",a))var c=RF(a);else{if($APP.Ca(isNaN(a)))var d=UF(a);else{var e=$APP.H.h(":",b);var f=e?$APP.Xh(/:?[a-zA-Z0-9]+/,a):e;d=$APP.t(f)?VF(a):a}c=d}return c}catch(g){return a}else return a},bG=function(a,b){var c=function(){switch(b instanceof $APP.N? | ||
b.Na:null){case "boolean":return RF;case "int":case "long":return SF;case "double":return TF;case "number":return UF;case "symbol":return $APP.ti;case "keyword":return VF;case "string":return $APP.ce;case "edn":return YF;case "auto":return XF;default:return b}}();if("string"===typeof a){try{var d=c.g?c.g(a):c.call(null,a)}catch(e){d=ZF}if($APP.H.h(ZF,d))throw $APP.Fm.h(["Coerce failure: cannot transform input ",$APP.bm.l($APP.T.h([a],0)),b instanceof $APP.N?" to ":" with ",$APP.u.g(b instanceof $APP.N? | ||
$APP.Jh(b):b)].join(""),new $APP.q(null,2,[$F,a,aG,b],null));return d}return a},cG=function(a,b,c){a=$APP.K.h(a,b);c=$APP.t(a)?a:$APP.yd(c)?$APP.od(c):null;return $APP.t(c)?$APP.yd(c)?$APP.Nk.h($APP.ne,c):c:null},dG=function(a,b,c,d){return $APP.Ik.h(b,c)?$APP.hl.j(a,b,function(e){return null==e?$APP.t(d)?d.h?d.h(e,!0):d.call(null,e,!0):!0:$APP.t(d)?d.h?d.h(e,!0):d.call(null,e,!0):e}):a},eG=function(a,b,c,d,e){d=$APP.t($APP.t(d)?!$APP.yd(d):d)?bG(e,d):XF(e);return $APP.t(c)?$APP.hl.F(a,b,c,d):$APP.X.j(a, | ||
b,d)},jG=function(a){return $APP.Zd.j(function(b,c){var d=$APP.I.j(c,0,null);c=$APP.I.j(c,1,null);c=$APP.Qe(c);var e=$APP.K.h(c,fG),f=$APP.K.h(c,gG);c=$APP.K.h(c,$APP.vn);b=$APP.t(e)?$APP.hl.J(b,fG,$APP.X,d,e):b;b=$APP.t(f)?$APP.hl.j(b,hG,function(g){if($APP.Qd(g,f))throw $APP.Fm.h(["Conflicting alias ",$APP.u.g(f)," between ",$APP.u.g($APP.K.h(g,f))," and ",$APP.u.g(d)].join(""),new $APP.q(null,1,[gG,f],null));return $APP.X.j(g,f,d)}):b;return $APP.t(c)?$APP.hl.J(b,iG,$APP.X,d,c):b},$APP.Pe,a)}, | ||
wG=function(){var a=process.argv.slice(2),b=new $APP.q(null,1,[hG,new $APP.q(null,1,[kG,lG],null)],null),c=mG.g(b);b=$APP.t(c)?$APP.Fl.l($APP.T.h([b,$APP.t(c)?jG(c):null],0)):b;var d=fG.g(b),e=hG.g(b),f=nG.g(b),g=iG.g(b),h=oG.g(b),l=$APP.H.h(!0,pG.g(b))?function(){var A=null==c?null:$APP.yh(c);A=null==A?null:$APP.Y.h(A,$APP.yh(e));A=null==A?null:$APP.Y.h(A,$APP.yh(d));return null==A?null:$APP.Hh(A)}():pG.g(b);a=$APP.Uh(function(A){var D=$APP.t(h)?null:0==A.lastIndexOf(":",0);return!($APP.t(D)?D:0== | ||
A.lastIndexOf("-",0))},a);var n=$APP.I.j(a,0,null),p=$APP.I.j(a,1,null);a=function(){var A=$APP.B(n);return null==A?null:$APP.U(A)}();var r=function(){for(var A=$APP.t(g)?g:$APP.Pe,D=null,F=null,O=$APP.t(h)?qG:null,S=$APP.B(p);;){if($APP.Ca(S))return new $APP.Q(null,3,5,$APP.R,[A,D,F],null);var W=$APP.C(S),ka=cG(f,D,$APP.K.h(d,D)),va=0<W.length?W.charAt(0):null,yb=$APP.H.h(va,"-"),Qb=function(){var jd=O;return $APP.t(jd)?jd:yb?qG:null}(),na=$APP.H.h(":",va),Xb=$APP.Ik.h(qG,Qb)&&na&&($APP.Ca(D)||$APP.H.h(F, | ||
D));va=function(){var jd=Qb;return $APP.t(jd)?jd:Xb?rG:null}();if(yb||Xb){var Ua=(na=0==W.lastIndexOf("--",0))&&$APP.H.h("--",W);if(Ua){var Ed=$APP.E(S);return new $APP.Q(null,3,5,$APP.R,[function(){var jd=A;return Ed?$APP.Hk.F(jd,$APP.fl,new $APP.Q(null,2,5,$APP.R,[sG,tG],null),$APP.U(Ed)):jd}(),D,F],null)}Ua=na?$APP.Zh.h(W,2):$APP.Qo(W,/^(:|-|)/,"");na=na?$APP.Uo(Ua,/=/):new $APP.Q(null,1,5,$APP.R,[Ua],null);Ua=$APP.I.j(na,0,null);na=$APP.I.j(na,1,null);Ua=$APP.ii.g(Ua);Ua=$APP.K.j(e,Ua,Ua);if($APP.t($APP.t(l)? | ||
$APP.Ca($APP.K.h(l,Ua)):l))throw $APP.Fm.h(["Unknown option ",$APP.u.g(W)].join(""),new $APP.q(null,1,[pG,l],null));$APP.t(na)?(D=dG(A,D,F,ka),F=Ua,S=$APP.qe(na,$APP.Jc(S)),A=D,D=F,F=null,O=va):(D=dG(A,D,F,ka),W=Ua,S=$APP.E(S),A=D,D=W,O=va)}else{var Kc=$APP.K.h(d,D);if(Ua=$APP.H.h(uG,Kc)&&$APP.Ca(F)&&$APP.Ik.h(W,"true")&&$APP.Ik.h(W,"false")||$APP.H.h(F,D)&&$APP.Ca(ka))return new $APP.Q(null,3,5,$APP.R,[$APP.Hk.F(A,$APP.fl,new $APP.Q(null,2,5,$APP.R,[sG,tG],null),$APP.U(S)),D,null],null);F=eG(A,D, | ||
ka,WF(Kc),W);W=$APP.H.h(rG,va)&&na?null:D;ka=$APP.H.h(rG,va)&&na?null:D;S=$APP.E(S);A=F;D=W;F=ka;O=va}}}();b=$APP.I.j(r,0,null);var v=$APP.I.j(r,1,null);r=$APP.I.j(r,2,null);var y=cG(f,v,$APP.K.h(bG,v));b=dG(b,v,r,y);return $APP.t(a)?$APP.Hk.F(b,$APP.fl,new $APP.Q(null,2,5,$APP.R,[sG,vG],null),a):b},yG=function(){var a=wG(),b=sG.g($APP.ud(a));return $APP.X.j(b,xG,$APP.Zj.h(a,sG))},zG=function(a,b){var c=$APP.Af($APP.G(a),b);b=$APP.I.j(c,0,null);c=$APP.I.j(c,1,null);return $APP.H.h(b,a)?c:null},DG= | ||
function(){var a=AG,b=yG(),c=$APP.Qe(b),d=$APP.K.h(c,vG),e=$APP.K.h(c,xG);$APP.Zd.j(function(f,g){f=$APP.Qe(g);var h=$APP.K.h(f,vG),l=$APP.K.h(f,$APP.zs),n=$APP.K.h(f,BG),p=zG(h,d);if($APP.t(p)){var r=function(){var A=null==p?null:$APP.B(p);return null==A?null:$APP.U(A)}();f=$APP.t($APP.t(r)?n:r)?function(){var A=$APP.G(r),D=$APP.G(n);return new $APP.Q(null,2,5,$APP.R,[$APP.zf.h(A<D?A:D,r),$APP.Kh(n,r)],null)}():new $APP.Q(null,2,5,$APP.R,[r,null],null);var v=$APP.I.j(f,0,null);f=$APP.I.j(f,1,null); | ||
var y=$APP.t(f)?$APP.Fl.l($APP.T.h([e,f],0)):e;return $APP.Vc(function(){var A=$APP.X.l(c,CG,v,$APP.T.h([xG,y,$APP.Zs,h],0));return l.g?l.g(A):l.call(null,A)}())}return null},null,a)},EG=function(a){a=$APP.B(a);for(var b=null,c=0,d=0;;)if(d<c){var e=b.ca(null,d);$APP.gm.l($APP.T.h(["Transpiling CLJS file:",e],0));e=$APP.Rt(new $APP.q(null,1,[$APP.Ot,e],null));e=$APP.Qe(e);e=$APP.K.h(e,$APP.Pt);$APP.gm.l($APP.T.h(["Wrote JS file:",e],0));d+=1}else if(a=$APP.B(a))$APP.Hd(a)?(c=$APP.gc(a),a=$APP.hc(a), | ||
b=c,c=$APP.G(c)):(e=$APP.C(a),$APP.gm.l($APP.T.h(["Transpiling CLJS file:",e],0)),b=$APP.Rt(new $APP.q(null,1,[$APP.Ot,e],null)),b=$APP.Qe(b),b=$APP.K.h(b,$APP.Pt),$APP.gm.l($APP.T.h(["Wrote JS file:",b],0)),a=$APP.E(a),b=null,c=0),d=0;else return null},YF=function YF(a){switch(arguments.length){case 1:return YF.g(arguments[0]);case 2:return YF.h(arguments[0],arguments[1]);default:throw Error(["Invalid arity: ",$APP.u.g(arguments.length)].join(""));}}; | ||
YF.g=function(a){return OF(new $APP.q(null,3,[$APP.Kq,$APP.sb($APP.FF),$APP.vn,$APP.sb($APP.EF),$APP.Cp,null],null),a)};YF.h=function(a,b){return OF($APP.hl.j($APP.Fl.l($APP.T.h([new $APP.q(null,1,[$APP.vn,$APP.sb($APP.EF)],null),a],0)),$APP.Kq,function(c){return $APP.Fl.l($APP.T.h([$APP.sb($APP.FF),c],0))}),b)};YF.v=2; | ||
var mG=new $APP.N(null,"spec","spec",347520401),uG=new $APP.N(null,"boolean","boolean",-1919418404),xG=new $APP.N(null,"opts","opts",155075701),lG=new $APP.N(null,"help","help",-439233446),aG=new $APP.N(null,"coerce-fn","coerce-fn",-821146515),oG=new $APP.N(null,"no-keyword-opts","no-keyword-opts",761286018),CG=new $APP.N(null,"rest-cmds","rest-cmds",-423198324),rG=new $APP.N(null,"keywords","keywords",1526959054),vG=new $APP.N(null,"cmds","cmds",-1841503952),hG=new $APP.N(null,"aliases","aliases", | ||
1346874714),nG=new $APP.N(null,"collect","collect",-284321549),sG=new $APP.N("org.babashka","cli","org.babashka/cli",1162430315),ZF=new $APP.N("babashka.cli","error","babashka.cli/error",-939678701),BG=new $APP.N(null,"cmds-opts","cmds-opts",-390130362),iG=new $APP.N(null,"exec-args","exec-args",-1860766354),$F=new $APP.N(null,"input","input",556931961),fG=new $APP.N(null,"coerce","coerce",1917884504),FG=new $APP.N(null,"show","show",-576705889),pG=new $APP.N(null,"closed","closed",-919675359),kG= | ||
new $APP.N(null,"h","h",1109658740),GG=new $APP.N(null,"e","e",1381269198),PF=new $APP.N(null,"s","s",1705939918),qG=new $APP.N(null,"hyphens","hyphens",2113533609),gG=new $APP.N(null,"alias","alias",-2039751630),tG=new $APP.N(null,"args","args",1315556576);var AG=new $APP.Q(null,3,5,$APP.R,[new $APP.q(null,3,[vG,new $APP.Q(null,1,5,$APP.R,["run"],null),$APP.zs,function(a){a=$APP.Qe(a);a=$APP.K.h(a,xG);a=$APP.Qe(a);a=$APP.K.h(a,$APP.Yn);a=$APP.Rt(new $APP.q(null,1,[$APP.Ot,a],null));a=$APP.Qe(a);a=$APP.K.h(a,$APP.Pt);return shadow_esm_import([$APP.u.g(process.cwd()),"/",$APP.u.g(a)].join(""))},BG,new $APP.Q(null,1,5,$APP.R,[$APP.Yn],null)],null),new $APP.q(null,2,[vG,new $APP.Q(null,1,5,$APP.R,["transpile"],null),$APP.zs,function(a){a=$APP.Qe(a);a=$APP.K.h(a, | ||
CG);return EG(a)}],null),new $APP.q(null,2,[vG,$APP.Zf,$APP.zs,function(a){a=$APP.Qe(a);var b=$APP.K.h(a,CG),c=$APP.K.h(a,xG);a=GG.g(c);if($APP.t(a)){a=$APP.Nt(a);var d=$APP.Qt.mkdtempSync(".tmp"),e=[$APP.u.g(d),"/cherry.mjs"].join("");$APP.Qt.writeFileSync(e,a,"utf-8");$APP.t(FG.g(c))&&$APP.gm.l($APP.T.h([a],0));return shadow_esm_import([$APP.u.g(process.cwd()),"/",e].join("")).finally(function(){return $APP.Qt.rmSync(d,{force:!0,recursive:!0})})}return $APP.t(function(){var f=lG.g(c);return $APP.t(f)? | ||
f:$APP.H.h("help",$APP.C(b))||$APP.xd(b)}())?$APP.gm.l($APP.T.h(["Cherry v0.0.0\n\nUsage:\n\nrun \x3cfile.cljs\x3e Transpile and run a file\ntranspile \x3cfile.cljs\x3e ... Transpile file(s)\nhelp Print this help"],0)):EG(b)}],null)],null);try{DG()}catch(a){throw console.error("An error occurred when calling (cherry.internal.cli/init)"),a;}; | ||
export { $APP, shadow$provide, $jscomp }; |
@@ -5,3 +5,3 @@ { | ||
"sideEffects": false, | ||
"version": "0.0.0-alpha.35", | ||
"version": "0.0.0-alpha.36", | ||
"files": [ | ||
@@ -8,0 +8,0 @@ "cljs.core.js", |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
594794
3358