cherry-cljs
Advanced tools
Comparing version 0.0.0-alpha.39 to 0.0.0-alpha.40
import { $APP, shadow$provide, $jscomp } from "./compiler.js"; | ||
const shadow_esm_import = function(x) { return import(x) }; | ||
'use strict';var bG=function(a,b){return $APP.q($APP.q(b)?$APP.Kk.h(b,""):b)?$APP.Oq(a,new $APP.np(new $APP.mp(b,$APP.E(b)))):null},dG=function(a){throw $APP.Hm.h(["Unexpected format: ",$APP.t.g(a)].join(""),new $APP.m(null,1,[cG,a],null));},eG=function(a){var b=JSON.parse(a);return $APP.Kd(b)?b:dG(a)},fG=function(a){var b=JSON.parse(a);return $APP.Od(b)?b:dG(a)},gG=function(a){var b=JSON.parse(a);return $APP.Pd(b)?b:dG(a)},hG=function(a){var b=JSON.parse(a);return"number"===typeof b?b:dG(a)},iG= | ||
function(a){return $APP.G.h(":",0<a.length?a.charAt(0):null)?$APP.ii.g($APP.Zh.h(a,1)):$APP.ii.g(a)},jG=function(a){return $APP.zd(a)?$APP.B(a):a},kG=function(a){if("string"===typeof a)try{var b=0<a.length?a.charAt(0):null;if($APP.G.h("true",a)||$APP.G.h("false",a))var c=eG(a);else{if($APP.Da(isNaN(a)))var d=hG(a);else{var e=$APP.G.h(":",b);var f=e?$APP.Xh(/:?[a-zA-Z0-9]+/,a):e;d=$APP.q(f)?iG(a):a}c=d}return c}catch(g){return a}else return a},pG=function(a,b){var c=function(){switch(b instanceof $APP.N? | ||
b.Na:null){case "boolean":return eG;case "int":case "long":return fG;case "double":return gG;case "number":return hG;case "symbol":return $APP.ti;case "keyword":return iG;case "string":return $APP.de;case "edn":return lG;case "auto":return kG;default:return b}}();if("string"===typeof a){try{var d=c.g?c.g(a):c.call(null,a)}catch(e){d=mG}if($APP.G.h(mG,d))throw $APP.Hm.h(["Coerce failure: cannot transform input ",$APP.dm.l($APP.T.h([a],0)),b instanceof $APP.N?" to ":" with ",$APP.t.g(b instanceof $APP.N? | ||
$APP.Jh(b):b)].join(""),new $APP.m(null,2,[nG,a,oG,b],null));return d}return a},qG=function(a,b,c){a=$APP.J.h(a,b);c=$APP.q(a)?a:$APP.zd(c)?$APP.pd(c):null;return $APP.q(c)?$APP.zd(c)?$APP.Pk.h($APP.oe,c):c:null},rG=function(a,b,c,d){return $APP.Kk.h(b,c)?$APP.jl.j(a,b,function(e){return null==e?$APP.q(d)?d.h?d.h(e,!0):d.call(null,e,!0):!0:$APP.q(d)?d.h?d.h(e,!0):d.call(null,e,!0):e}):a},sG=function(a,b,c,d,e){d=$APP.q($APP.q(d)?!$APP.zd(d):d)?pG(e,d):kG(e);return $APP.q(c)?$APP.jl.F(a,b,c,d):$APP.W.j(a, | ||
b,d)},xG=function(a){return $APP.$d.j(function(b,c){var d=$APP.H.j(c,0,null);c=$APP.H.j(c,1,null);c=$APP.Qe(c);var e=$APP.J.h(c,tG),f=$APP.J.h(c,uG);c=$APP.J.h(c,$APP.xn);b=$APP.q(e)?$APP.jl.J(b,tG,$APP.W,d,e):b;b=$APP.q(f)?$APP.jl.j(b,vG,function(g){if($APP.Rd(g,f))throw $APP.Hm.h(["Conflicting alias ",$APP.t.g(f)," between ",$APP.t.g($APP.J.h(g,f))," and ",$APP.t.g(d)].join(""),new $APP.m(null,1,[uG,f],null));return $APP.W.j(g,f,d)}):b;return $APP.q(c)?$APP.jl.J(b,wG,$APP.W,d,c):b},$APP.Pe,a)}, | ||
KG=function(){var a=process.argv.slice(2),b=new $APP.m(null,1,[vG,new $APP.m(null,1,[yG,zG],null)],null),c=AG.g(b);b=$APP.q(c)?$APP.Hl.l($APP.T.h([b,$APP.q(c)?xG(c):null],0)):b;var d=tG.g(b),e=vG.g(b),f=BG.g(b),g=wG.g(b),h=CG.g(b),k=$APP.G.h(!0,DG.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)}():DG.g(b);a=$APP.Uh(function(A){var D=$APP.q(h)?null:0==A.lastIndexOf(":",0);return!($APP.q(D)?D:0== | ||
A.lastIndexOf("-",0))},a);var n=$APP.H.j(a,0,null),p=$APP.H.j(a,1,null);a=function(){var A=$APP.z(n);return null==A?null:$APP.U(A)}();var r=function(){for(var A=$APP.q(g)?g:$APP.Pe,D=null,F=null,O=$APP.q(h)?EG:null,S=$APP.z(p);;){if($APP.Da(S))return new $APP.Q(null,3,5,$APP.R,[A,D,F],null);var X=$APP.B(S),ka=qG(f,D,$APP.J.h(d,D)),va=0<X.length?X.charAt(0):null,zb=$APP.G.h(va,"-"),Qb=function(){var ld=O;return $APP.q(ld)?ld:zb?EG:null}(),na=$APP.G.h(":",va),Xb=$APP.Kk.h(EG,Qb)&&na&&($APP.Da(D)||$APP.G.h(F, | ||
D));va=function(){var ld=Qb;return $APP.q(ld)?ld:Xb?FG:null}();if(zb||Xb){var Va=(na=0==X.lastIndexOf("--",0))&&$APP.G.h("--",X);if(Va){var Fd=$APP.C(S);return new $APP.Q(null,3,5,$APP.R,[function(){var ld=A;return Fd?$APP.Jk.F(ld,$APP.hl,new $APP.Q(null,2,5,$APP.R,[GG,HG],null),$APP.U(Fd)):ld}(),D,F],null)}Va=na?$APP.Zh.h(X,2):$APP.So(X,/^(:|-|)/,"");na=na?$APP.Xo(Va,/=/):new $APP.Q(null,1,5,$APP.R,[Va],null);Va=$APP.H.j(na,0,null);na=$APP.H.j(na,1,null);Va=$APP.ii.g(Va);Va=$APP.J.j(e,Va,Va);if($APP.q($APP.q(k)? | ||
$APP.Da($APP.J.h(k,Va)):k))throw $APP.Hm.h(["Unknown option ",$APP.t.g(X)].join(""),new $APP.m(null,1,[DG,k],null));$APP.q(na)?(D=rG(A,D,F,ka),F=Va,S=$APP.M(na,$APP.Kc(S)),A=D,D=F,F=null,O=va):(D=rG(A,D,F,ka),X=Va,S=$APP.C(S),A=D,D=X,O=va)}else{var Lc=$APP.J.h(d,D);if(Va=$APP.G.h(IG,Lc)&&$APP.Da(F)&&$APP.Kk.h(X,"true")&&$APP.Kk.h(X,"false")||$APP.G.h(F,D)&&$APP.Da(ka))return new $APP.Q(null,3,5,$APP.R,[$APP.Jk.F(A,$APP.hl,new $APP.Q(null,2,5,$APP.R,[GG,HG],null),$APP.U(S)),D,null],null);F=sG(A,D, | ||
ka,jG(Lc),X);X=$APP.G.h(FG,va)&&na?null:D;ka=$APP.G.h(FG,va)&&na?null:D;S=$APP.C(S);A=F;D=X;F=ka;O=va}}}();b=$APP.H.j(r,0,null);var v=$APP.H.j(r,1,null);r=$APP.H.j(r,2,null);var y=qG(f,v,$APP.J.h(pG,v));b=rG(b,v,r,y);return $APP.q(a)?$APP.Jk.F(b,$APP.hl,new $APP.Q(null,2,5,$APP.R,[GG,JG],null),a):b},MG=function(){var a=KG(),b=GG.g($APP.vd(a));return $APP.W.j(b,LG,$APP.Zj.h(a,GG))},NG=function(a,b){var c=$APP.Af($APP.E(a),b);b=$APP.H.j(c,0,null);c=$APP.H.j(c,1,null);return $APP.G.h(b,a)?c:null},RG= | ||
function(){var a=OG,b=MG(),c=$APP.Qe(b),d=$APP.J.h(c,JG),e=$APP.J.h(c,LG);$APP.$d.j(function(f,g){f=$APP.Qe(g);var h=$APP.J.h(f,JG),k=$APP.J.h(f,$APP.Bs),n=$APP.J.h(f,PG),p=NG(h,d);if($APP.q(p)){var r=function(){var A=null==p?null:$APP.z(p);return null==A?null:$APP.U(A)}();f=$APP.q($APP.q(r)?n:r)?function(){var A=$APP.E(r),D=$APP.E(n);return new $APP.Q(null,2,5,$APP.R,[$APP.yf.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.H.j(f,0,null);f=$APP.H.j(f,1,null); | ||
var y=$APP.q(f)?$APP.Hl.l($APP.T.h([e,f],0)):e;return $APP.Wc(function(){var A=$APP.W.l(c,QG,v,$APP.T.h([LG,y,$APP.at,h],0));return k.g?k.g(A):k.call(null,A)}())}return null},null,a)},SG=function(a){return $APP.$d.j(function(b,c){return Promise.resolve(b).then(function(){$APP.im.l($APP.T.h(["[cherry] Compiling CLJS file:",c],0));return $APP.Ut(new $APP.m(null,1,[$APP.St,c],null))}).then(function(d){d=$APP.Qe(d);d=$APP.J.h(d,$APP.Tt);$APP.im.l($APP.T.h(["[cherry] Wrote JS file:",d],0));return d})}, | ||
null,a)},lG=function lG(a){switch(arguments.length){case 1:return lG.g(arguments[0]);case 2:return lG.h(arguments[0],arguments[1]);default:throw Error(["Invalid arity: ",$APP.t.g(arguments.length)].join(""));}};lG.g=function(a){return bG(new $APP.m(null,3,[$APP.Nq,$APP.tb($APP.UF),$APP.xn,$APP.tb($APP.TF),$APP.Fp,null],null),a)}; | ||
lG.h=function(a,b){return bG($APP.jl.j($APP.Hl.l($APP.T.h([new $APP.m(null,1,[$APP.xn,$APP.tb($APP.TF)],null),a],0)),$APP.Nq,function(c){return $APP.Hl.l($APP.T.h([$APP.tb($APP.UF),c],0))}),b)};lG.v=2; | ||
var AG=new $APP.N(null,"spec","spec",347520401),IG=new $APP.N(null,"boolean","boolean",-1919418404),LG=new $APP.N(null,"opts","opts",155075701),zG=new $APP.N(null,"help","help",-439233446),oG=new $APP.N(null,"coerce-fn","coerce-fn",-821146515),CG=new $APP.N(null,"no-keyword-opts","no-keyword-opts",761286018),QG=new $APP.N(null,"rest-cmds","rest-cmds",-423198324),FG=new $APP.N(null,"keywords","keywords",1526959054),JG=new $APP.N(null,"cmds","cmds",-1841503952),vG=new $APP.N(null,"aliases","aliases", | ||
1346874714),BG=new $APP.N(null,"collect","collect",-284321549),GG=new $APP.N("org.babashka","cli","org.babashka/cli",1162430315),mG=new $APP.N("babashka.cli","error","babashka.cli/error",-939678701),PG=new $APP.N(null,"cmds-opts","cmds-opts",-390130362),wG=new $APP.N(null,"exec-args","exec-args",-1860766354),nG=new $APP.N(null,"input","input",556931961),tG=new $APP.N(null,"coerce","coerce",1917884504),TG=new $APP.N(null,"show","show",-576705889),DG=new $APP.N(null,"closed","closed",-919675359),yG= | ||
new $APP.N(null,"h","h",1109658740),UG=new $APP.N(null,"e","e",1381269198),cG=new $APP.N(null,"s","s",1705939918),EG=new $APP.N(null,"hyphens","hyphens",2113533609),uG=new $APP.N(null,"alias","alias",-2039751630),HG=new $APP.N(null,"args","args",1315556576);var OG=new $APP.Q(null,3,5,$APP.R,[new $APP.m(null,3,[JG,new $APP.Q(null,1,5,$APP.R,["run"],null),$APP.Bs,function(a){a=$APP.Qe(a);a=$APP.J.h(a,LG);a=$APP.Qe(a);a=$APP.J.h(a,$APP.$n);$APP.im.l($APP.T.h(["[cherry] Running",a],0));return $APP.Ut(new $APP.m(null,1,[$APP.St,a],null)).then(function(b){b=$APP.Qe(b);b=$APP.J.h(b,$APP.Tt);return shadow_esm_import([$APP.t.g(process.cwd()),"/",$APP.t.g(b)].join(""))})},PG,new $APP.Q(null,1,5,$APP.R,[$APP.$n],null)],null),new $APP.m(null,2,[JG,new $APP.Q(null, | ||
1,5,$APP.R,["compile"],null),$APP.Bs,function(a){a=$APP.Qe(a);a=$APP.J.h(a,QG);return SG(a)}],null),new $APP.m(null,2,[JG,$APP.Zf,$APP.Bs,function(a){a=$APP.Qe(a);var b=$APP.J.h(a,QG),c=$APP.J.h(a,LG);a=UG.g(c);if($APP.q(a)){a=$APP.Lt(a);var d=$APP.Nt.mkdtempSync(".tmp"),e=[$APP.t.g(d),"/cherry.mjs"].join("");$APP.Nt.writeFileSync(e,a,"utf-8");$APP.q(TG.g(c))&&$APP.im.l($APP.T.h([a],0));return shadow_esm_import([$APP.t.g(process.cwd()),"/",e].join("")).finally(function(){return $APP.Nt.rmSync(d,{force:!0, | ||
recursive:!0})})}return $APP.q(function(){var f=zG.g(c);return $APP.q(f)?f:$APP.G.h("help",$APP.B(b))||$APP.yd(b)}())?$APP.im.l($APP.T.h(["Cherry v0.0.0\n\nUsage:\n\nrun \x3cfile.cljs\x3e Compile and run a file\ncompile \x3cfile.cljs\x3e ... Compile file(s)\nhelp Print this help"],0)):SG(b)}],null)],null);try{RG()}catch(a){throw console.error("An error occurred when calling (cherry.internal.cli/init)"),a;}; | ||
'use strict';var LI=function(a,b){return $APP.p($APP.p(b)?$APP.Kk.h(b,""):b)?$APP.wr(a,new $APP.Wp(new $APP.Vp(b,$APP.D(b)))):null},NI=function(a){throw $APP.Hm.h(["Unexpected format: ",$APP.t.g(a)].join(""),new $APP.m(null,1,[MI,a],null));},OI=function(a){var b=JSON.parse(a);return $APP.Jd(b)?b:NI(a)},PI=function(a){var b=JSON.parse(a);return $APP.Od(b)?b:NI(a)},QI=function(a){var b=JSON.parse(a);return $APP.Pd(b)?b:NI(a)},RI=function(a){var b=JSON.parse(a);return"number"===typeof b?b:NI(a)},SI= | ||
function(a){return $APP.G.h(":",0<a.length?a.charAt(0):null)?$APP.ii.g($APP.Zh.h(a,1)):$APP.ii.g(a)},TI=function(a){return $APP.zd(a)?$APP.A(a):a},UI=function(a){if("string"===typeof a)try{var b=0<a.length?a.charAt(0):null;if($APP.G.h("true",a)||$APP.G.h("false",a))var c=OI(a);else{if($APP.Da(isNaN(a)))var d=RI(a);else{var e=$APP.G.h(":",b);var f=e?$APP.Xh(/:?[a-zA-Z0-9]+/,a):e;d=$APP.p(f)?SI(a):a}c=d}return c}catch(g){return a}else return a},ZI=function(a,b){var c=function(){switch(b instanceof $APP.N? | ||
b.Na:null){case "boolean":return OI;case "int":case "long":return PI;case "double":return QI;case "number":return RI;case "symbol":return $APP.ti;case "keyword":return SI;case "string":return $APP.de;case "edn":return VI;case "auto":return UI;default:return b}}();if("string"===typeof a){try{var d=c.g?c.g(a):c.call(null,a)}catch(e){d=WI}if($APP.G.h(WI,d))throw $APP.Hm.h(["Coerce failure: cannot transform input ",$APP.dm.l($APP.T.h([a],0)),b instanceof $APP.N?" to ":" with ",$APP.t.g(b instanceof $APP.N? | ||
$APP.Jh(b):b)].join(""),new $APP.m(null,2,[XI,a,YI,b],null));return d}return a},$I=function(a,b,c){a=$APP.J.h(a,b);c=$APP.p(a)?a:$APP.zd(c)?$APP.od(c):null;return $APP.p(c)?$APP.zd(c)?$APP.Pk.h($APP.oe,c):c:null},aJ=function(a,b,c,d){return $APP.Kk.h(b,c)?$APP.jl.j(a,b,function(e){return null==e?$APP.p(d)?d.h?d.h(e,!0):d.call(null,e,!0):!0:$APP.p(d)?d.h?d.h(e,!0):d.call(null,e,!0):e}):a},bJ=function(a,b,c,d,e){d=$APP.p($APP.p(d)?!$APP.zd(d):d)?ZI(e,d):UI(e);return $APP.p(c)?$APP.jl.D(a,b,c,d):$APP.W.j(a, | ||
b,d)},gJ=function(a){return $APP.$d.j(function(b,c){var d=$APP.H.j(c,0,null);c=$APP.H.j(c,1,null);c=$APP.Qe(c);var e=$APP.J.h(c,cJ),f=$APP.J.h(c,dJ);c=$APP.J.h(c,$APP.xn);b=$APP.p(e)?$APP.jl.J(b,cJ,$APP.W,d,e):b;b=$APP.p(f)?$APP.jl.j(b,eJ,function(g){if($APP.Rd(g,f))throw $APP.Hm.h(["Conflicting alias ",$APP.t.g(f)," between ",$APP.t.g($APP.J.h(g,f))," and ",$APP.t.g(d)].join(""),new $APP.m(null,1,[dJ,f],null));return $APP.W.j(g,f,d)}):b;return $APP.p(c)?$APP.jl.J(b,fJ,$APP.W,d,c):b},$APP.Pe,a)}, | ||
tJ=function(){var a=process.argv.slice(2),b=new $APP.m(null,1,[eJ,new $APP.m(null,1,[hJ,iJ],null)],null),c=jJ.g(b);b=$APP.p(c)?$APP.Hl.l($APP.T.h([b,$APP.p(c)?gJ(c):null],0)):b;var d=cJ.g(b),e=eJ.g(b),f=kJ.g(b),g=fJ.g(b),k=lJ.g(b),l=$APP.G.h(!0,mJ.g(b))?function(){var C=null==c?null:$APP.yh(c);C=null==C?null:$APP.X.h(C,$APP.yh(e));C=null==C?null:$APP.X.h(C,$APP.yh(d));return null==C?null:$APP.Hh(C)}():mJ.g(b);a=$APP.Uh(function(C){var E=$APP.p(k)?null:0==C.lastIndexOf(":",0);return!($APP.p(E)?E:0== | ||
C.lastIndexOf("-",0))},a);var n=$APP.H.j(a,0,null),q=$APP.H.j(a,1,null);a=function(){var C=$APP.z(n);return null==C?null:$APP.U(C)}();var r=function(){for(var C=$APP.p(g)?g:$APP.Pe,E=null,F=null,O=$APP.p(k)?nJ:null,S=$APP.z(q);;){if($APP.Da(S))return new $APP.Q(null,3,5,$APP.R,[C,E,F],null);var Y=$APP.A(S),ka=$I(f,E,$APP.J.h(d,E)),wa=0<Y.length?Y.charAt(0):null,Cb=$APP.G.h(wa,"-"),ac=function(){var rd=O;return $APP.p(rd)?rd:Cb?nJ:null}(),pa=$APP.G.h(":",wa),ic=$APP.Kk.h(nJ,ac)&&pa&&($APP.Da(E)||$APP.G.h(F, | ||
E));wa=function(){var rd=ac;return $APP.p(rd)?rd:ic?oJ:null}();if(Cb||ic){var Xa=(pa=0==Y.lastIndexOf("--",0))&&$APP.G.h("--",Y);if(Xa){var Md=$APP.B(S);return new $APP.Q(null,3,5,$APP.R,[function(){var rd=C;return Md?$APP.Jk.D(rd,$APP.hl,new $APP.Q(null,2,5,$APP.R,[pJ,qJ],null),$APP.U(Md)):rd}(),E,F],null)}Xa=pa?$APP.Zh.h(Y,2):$APP.Oo(Y,/^(:|-|)/,"");pa=pa?$APP.To(Xa,/=/):new $APP.Q(null,1,5,$APP.R,[Xa],null);Xa=$APP.H.j(pa,0,null);pa=$APP.H.j(pa,1,null);Xa=$APP.ii.g(Xa);Xa=$APP.J.j(e,Xa,Xa);if($APP.p($APP.p(l)? | ||
$APP.Da($APP.J.h(l,Xa)):l))throw $APP.Hm.h(["Unknown option ",$APP.t.g(Y)].join(""),new $APP.m(null,1,[mJ,l],null));$APP.p(pa)?(E=aJ(C,E,F,ka),F=Xa,S=$APP.M(pa,$APP.Kc(S)),C=E,E=F,F=null,O=wa):(E=aJ(C,E,F,ka),Y=Xa,S=$APP.B(S),C=E,E=Y,O=wa)}else{var Qc=$APP.J.h(d,E);if(Xa=$APP.G.h(rJ,Qc)&&$APP.Da(F)&&$APP.Kk.h(Y,"true")&&$APP.Kk.h(Y,"false")||$APP.G.h(F,E)&&$APP.Da(ka))return new $APP.Q(null,3,5,$APP.R,[$APP.Jk.D(C,$APP.hl,new $APP.Q(null,2,5,$APP.R,[pJ,qJ],null),$APP.U(S)),E,null],null);F=bJ(C,E, | ||
ka,TI(Qc),Y);Y=$APP.G.h(oJ,wa)&&pa?null:E;ka=$APP.G.h(oJ,wa)&&pa?null:E;S=$APP.B(S);C=F;E=Y;F=ka;O=wa}}}();b=$APP.H.j(r,0,null);var v=$APP.H.j(r,1,null);r=$APP.H.j(r,2,null);var y=$I(f,v,$APP.J.h(ZI,v));b=aJ(b,v,r,y);return $APP.p(a)?$APP.Jk.D(b,$APP.hl,new $APP.Q(null,2,5,$APP.R,[pJ,sJ],null),a):b},vJ=function(){var a=tJ(),b=pJ.g($APP.vd(a));return $APP.W.j(b,uJ,$APP.Zj.h(a,pJ))},wJ=function(a,b){var c=$APP.zf($APP.D(a),b);b=$APP.H.j(c,0,null);c=$APP.H.j(c,1,null);return $APP.G.h(b,a)?c:null},AJ= | ||
function(){var a=xJ,b=vJ(),c=$APP.Qe(b),d=$APP.J.h(c,sJ),e=$APP.J.h(c,uJ);$APP.$d.j(function(f,g){f=$APP.Qe(g);var k=$APP.J.h(f,sJ),l=$APP.J.h(f,$APP.jt),n=$APP.J.h(f,yJ),q=wJ(k,d);if($APP.p(q)){var r=function(){var C=null==q?null:$APP.z(q);return null==C?null:$APP.U(C)}();f=$APP.p($APP.p(r)?n:r)?function(){var C=$APP.D(r),E=$APP.D(n);return new $APP.Q(null,2,5,$APP.R,[$APP.yf.h(C<E?C:E,r),$APP.Kh(n,r)],null)}():new $APP.Q(null,2,5,$APP.R,[r,null],null);var v=$APP.H.j(f,0,null);f=$APP.H.j(f,1,null); | ||
var y=$APP.p(f)?$APP.Hl.l($APP.T.h([e,f],0)):e;return $APP.Wc(function(){var C=$APP.W.l(c,zJ,v,$APP.T.h([uJ,y,$APP.Jt,k],0));return l.g?l.g(C):l.call(null,C)}())}return null},null,a)},BJ=function(a){return $APP.$d.j(function(b,c){return Promise.resolve(b).then(function(){$APP.im.l($APP.T.h(["[cherry] Compiling CLJS file:",c],0));return $APP.Cu(new $APP.m(null,1,[$APP.Au,c],null))}).then(function(d){d=$APP.Qe(d);d=$APP.J.h(d,$APP.Bu);$APP.im.l($APP.T.h(["[cherry] Wrote JS file:",d],0));return d})}, | ||
null,a)},VI=function VI(a){switch(arguments.length){case 1:return VI.g(arguments[0]);case 2:return VI.h(arguments[0],arguments[1]);default:throw Error(["Invalid arity: ",$APP.t.g(arguments.length)].join(""));}};VI.g=function(a){return LI(new $APP.m(null,3,[$APP.vr,$APP.tb($APP.DI),$APP.xn,$APP.tb($APP.CI),$APP.nq,null],null),a)}; | ||
VI.h=function(a,b){return LI($APP.jl.j($APP.Hl.l($APP.T.h([new $APP.m(null,1,[$APP.xn,$APP.tb($APP.CI)],null),a],0)),$APP.vr,function(c){return $APP.Hl.l($APP.T.h([$APP.tb($APP.DI),c],0))}),b)};VI.v=2; | ||
var jJ=new $APP.N(null,"spec","spec",347520401),rJ=new $APP.N(null,"boolean","boolean",-1919418404),uJ=new $APP.N(null,"opts","opts",155075701),iJ=new $APP.N(null,"help","help",-439233446),YI=new $APP.N(null,"coerce-fn","coerce-fn",-821146515),lJ=new $APP.N(null,"no-keyword-opts","no-keyword-opts",761286018),zJ=new $APP.N(null,"rest-cmds","rest-cmds",-423198324),oJ=new $APP.N(null,"keywords","keywords",1526959054),sJ=new $APP.N(null,"cmds","cmds",-1841503952),eJ=new $APP.N(null,"aliases","aliases", | ||
1346874714),kJ=new $APP.N(null,"collect","collect",-284321549),pJ=new $APP.N("org.babashka","cli","org.babashka/cli",1162430315),WI=new $APP.N("babashka.cli","error","babashka.cli/error",-939678701),yJ=new $APP.N(null,"cmds-opts","cmds-opts",-390130362),fJ=new $APP.N(null,"exec-args","exec-args",-1860766354),XI=new $APP.N(null,"input","input",556931961),cJ=new $APP.N(null,"coerce","coerce",1917884504),CJ=new $APP.N(null,"show","show",-576705889),mJ=new $APP.N(null,"closed","closed",-919675359),hJ= | ||
new $APP.N(null,"h","h",1109658740),DJ=new $APP.N(null,"e","e",1381269198),MI=new $APP.N(null,"s","s",1705939918),nJ=new $APP.N(null,"hyphens","hyphens",2113533609),dJ=new $APP.N(null,"alias","alias",-2039751630),qJ=new $APP.N(null,"args","args",1315556576);var xJ=new $APP.Q(null,3,5,$APP.R,[new $APP.m(null,3,[sJ,new $APP.Q(null,1,5,$APP.R,["run"],null),$APP.jt,function(a){a=$APP.Qe(a);a=$APP.J.h(a,uJ);a=$APP.Qe(a);a=$APP.J.h(a,$APP.$n);$APP.im.l($APP.T.h(["[cherry] Running",a],0));return $APP.Cu(new $APP.m(null,1,[$APP.Au,a],null)).then(function(b){b=$APP.Qe(b);b=$APP.J.h(b,$APP.Bu);return shadow_esm_import([$APP.t.g(process.cwd()),"/",$APP.t.g(b)].join(""))})},yJ,new $APP.Q(null,1,5,$APP.R,[$APP.$n],null)],null),new $APP.m(null,2,[sJ,new $APP.Q(null, | ||
1,5,$APP.R,["compile"],null),$APP.jt,function(a){a=$APP.Qe(a);a=$APP.J.h(a,zJ);return BJ(a)}],null),new $APP.m(null,2,[sJ,$APP.Zf,$APP.jt,function(a){a=$APP.Qe(a);var b=$APP.J.h(a,zJ),c=$APP.J.h(a,uJ);a=DJ.g(c);if($APP.p(a)){a=$APP.tu(a);var d=$APP.vu.mkdtempSync(".tmp"),e=[$APP.t.g(d),"/cherry.mjs"].join("");$APP.vu.writeFileSync(e,a,"utf-8");$APP.p(CJ.g(c))&&$APP.im.l($APP.T.h([a],0));return shadow_esm_import([$APP.t.g(process.cwd()),"/",e].join("")).finally(function(){return $APP.vu.rmSync(d,{force:!0, | ||
recursive:!0})})}return $APP.p(function(){var f=iJ.g(c);return $APP.p(f)?f:$APP.G.h("help",$APP.A(b))||$APP.yd(b)}())?$APP.im.l($APP.T.h(["Cherry v0.0.0\n\nUsage:\n\nrun \x3cfile.cljs\x3e Compile and run a file\ncompile \x3cfile.cljs\x3e ... Compile file(s)\nhelp Print this help"],0)):BJ(b)}],null)],null);try{AJ()}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.39", | ||
"version": "0.0.0-alpha.40", | ||
"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
624484
3528