cherry-cljs
Advanced tools
Comparing version 0.0.0-alpha.41 to 0.0.0-alpha.42
import { $APP, shadow$provide, $jscomp } from "./compiler.js"; | ||
const shadow_esm_import = function(x) { return import(x) }; | ||
'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;}; | ||
'use strict';var QI=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},SI=function(a){throw $APP.Hm.h(["Unexpected format: ",$APP.t.g(a)].join(""),new $APP.m(null,1,[RI,a],null));},TI=function(a){var b=JSON.parse(a);return $APP.Jd(b)?b:SI(a)},UI=function(a){var b=JSON.parse(a);return $APP.Od(b)?b:SI(a)},VI=function(a){var b=JSON.parse(a);return $APP.Pd(b)?b:SI(a)},WI=function(a){var b=JSON.parse(a);return"number"===typeof b?b:SI(a)},XI= | ||
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)},YI=function(a){return $APP.zd(a)?$APP.A(a):a},ZI=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=TI(a);else{if($APP.Da(isNaN(a)))var d=WI(a);else{var e=$APP.G.h(":",b);var f=e?$APP.Xh(/:?[a-zA-Z0-9]+/,a):e;d=$APP.p(f)?XI(a):a}c=d}return c}catch(g){return a}else return a},dJ=function(a,b){var c=function(){switch(b instanceof $APP.N? | ||
b.Na:null){case "boolean":return TI;case "int":case "long":return UI;case "double":return VI;case "number":return WI;case "symbol":return $APP.ti;case "keyword":return XI;case "string":return $APP.de;case "edn":return $I;case "auto":return ZI;default:return b}}();if("string"===typeof a){try{var d=c.g?c.g(a):c.call(null,a)}catch(e){d=aJ}if($APP.G.h(aJ,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,[bJ,a,cJ,b],null));return d}return a},eJ=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},fJ=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},gJ=function(a,b,c,d,e){d=$APP.p($APP.p(d)?!$APP.zd(d):d)?dJ(e,d):ZI(e);return $APP.p(c)?$APP.jl.D(a,b,c,d):$APP.W.j(a, | ||
b,d)},lJ=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,hJ),f=$APP.J.h(c,iJ);c=$APP.J.h(c,$APP.xn);b=$APP.p(e)?$APP.jl.J(b,hJ,$APP.W,d,e):b;b=$APP.p(f)?$APP.jl.j(b,jJ,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,[iJ,f],null));return $APP.W.j(g,f,d)}):b;return $APP.p(c)?$APP.jl.J(b,kJ,$APP.W,d,c):b},$APP.Pe,a)}, | ||
yJ=function(){var a=process.argv.slice(2),b=new $APP.m(null,1,[jJ,new $APP.m(null,1,[mJ,nJ],null)],null),c=oJ.g(b);b=$APP.p(c)?$APP.Hl.l($APP.T.h([b,$APP.p(c)?lJ(c):null],0)):b;var d=hJ.g(b),e=jJ.g(b),f=pJ.g(b),g=kJ.g(b),k=qJ.g(b),l=$APP.G.h(!0,rJ.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)}():rJ.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)?sJ: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=eJ(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?sJ:null}(),pa=$APP.G.h(":",wa),ic=$APP.Kk.h(sJ,ac)&&pa&&($APP.Da(E)||$APP.G.h(F, | ||
E));wa=function(){var rd=ac;return $APP.p(rd)?rd:ic?tJ: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,[uJ,vJ],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,[rJ,l],null));$APP.p(pa)?(E=fJ(C,E,F,ka),F=Xa,S=$APP.M(pa,$APP.Kc(S)),C=E,E=F,F=null,O=wa):(E=fJ(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(wJ,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,[uJ,vJ],null),$APP.U(S)),E,null],null);F=gJ(C,E, | ||
ka,YI(Qc),Y);Y=$APP.G.h(tJ,wa)&&pa?null:E;ka=$APP.G.h(tJ,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=eJ(f,v,$APP.J.h(dJ,v));b=fJ(b,v,r,y);return $APP.p(a)?$APP.Jk.D(b,$APP.hl,new $APP.Q(null,2,5,$APP.R,[uJ,xJ],null),a):b},AJ=function(){var a=yJ(),b=uJ.g($APP.vd(a));return $APP.W.j(b,zJ,$APP.Xj.h(a,uJ))},BJ=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},FJ= | ||
function(){var a=CJ,b=AJ(),c=$APP.Qe(b),d=$APP.J.h(c,xJ),e=$APP.J.h(c,zJ);$APP.$d.j(function(f,g){f=$APP.Qe(g);var k=$APP.J.h(f,xJ),l=$APP.J.h(f,$APP.jt),n=$APP.J.h(f,DJ),q=BJ(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,EJ,v,$APP.T.h([zJ,y,$APP.Jt,k],0));return l.g?l.g(C):l.call(null,C)}())}return null},null,a)},GJ=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)},$I=function $I(a){switch(arguments.length){case 1:return $I.g(arguments[0]);case 2:return $I.h(arguments[0],arguments[1]);default:throw Error(["Invalid arity: ",$APP.t.g(arguments.length)].join(""));}};$I.g=function(a){return QI(new $APP.m(null,3,[$APP.vr,$APP.tb($APP.II),$APP.xn,$APP.tb($APP.HI),$APP.nq,null],null),a)}; | ||
$I.h=function(a,b){return QI($APP.jl.j($APP.Hl.l($APP.T.h([new $APP.m(null,1,[$APP.xn,$APP.tb($APP.HI)],null),a],0)),$APP.vr,function(c){return $APP.Hl.l($APP.T.h([$APP.tb($APP.II),c],0))}),b)};$I.o=2; | ||
var oJ=new $APP.N(null,"spec","spec",347520401),wJ=new $APP.N(null,"boolean","boolean",-1919418404),zJ=new $APP.N(null,"opts","opts",155075701),nJ=new $APP.N(null,"help","help",-439233446),cJ=new $APP.N(null,"coerce-fn","coerce-fn",-821146515),qJ=new $APP.N(null,"no-keyword-opts","no-keyword-opts",761286018),EJ=new $APP.N(null,"rest-cmds","rest-cmds",-423198324),tJ=new $APP.N(null,"keywords","keywords",1526959054),xJ=new $APP.N(null,"cmds","cmds",-1841503952),jJ=new $APP.N(null,"aliases","aliases", | ||
1346874714),pJ=new $APP.N(null,"collect","collect",-284321549),uJ=new $APP.N("org.babashka","cli","org.babashka/cli",1162430315),aJ=new $APP.N("babashka.cli","error","babashka.cli/error",-939678701),DJ=new $APP.N(null,"cmds-opts","cmds-opts",-390130362),kJ=new $APP.N(null,"exec-args","exec-args",-1860766354),bJ=new $APP.N(null,"input","input",556931961),hJ=new $APP.N(null,"coerce","coerce",1917884504),HJ=new $APP.N(null,"show","show",-576705889),rJ=new $APP.N(null,"closed","closed",-919675359),mJ= | ||
new $APP.N(null,"h","h",1109658740),IJ=new $APP.N(null,"e","e",1381269198),RI=new $APP.N(null,"s","s",1705939918),sJ=new $APP.N(null,"hyphens","hyphens",2113533609),iJ=new $APP.N(null,"alias","alias",-2039751630),vJ=new $APP.N(null,"args","args",1315556576);var CJ=new $APP.Q(null,3,5,$APP.R,[new $APP.m(null,3,[xJ,new $APP.Q(null,1,5,$APP.R,["run"],null),$APP.jt,function(a){a=$APP.Qe(a);a=$APP.J.h(a,zJ);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(""))})},DJ,new $APP.Q(null,1,5,$APP.R,[$APP.$n],null)],null),new $APP.m(null,2,[xJ,new $APP.Q(null, | ||
1,5,$APP.R,["compile"],null),$APP.jt,function(a){a=$APP.Qe(a);a=$APP.J.h(a,EJ);return GJ(a)}],null),new $APP.m(null,2,[xJ,$APP.Zf,$APP.jt,function(a){a=$APP.Qe(a);var b=$APP.J.h(a,EJ),c=$APP.J.h(a,zJ);a=IJ.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(HJ.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=nJ.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)):GJ(b)}],null)],null);try{FJ()}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.41", | ||
"version": "0.0.0-alpha.42", | ||
"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
625342
3531