cherry-cljs
Advanced tools
Comparing version 0.0.0-alpha.25 to 0.0.0-alpha.26
import { $APP, shadow$provide, $jscomp } from "./transpiler.js"; | ||
const shadow_esm_import = function(x) { return import(x) }; | ||
'use strict';var YD=function(a){var b=/=/;a="/(?:)/"===$APP.y.g(b)?$APP.ke.h($APP.Vf($APP.Q("",$APP.ei.h($APP.y,$APP.F(a)))),""):$APP.Vf($APP.y.g(a).split(b));if(1<$APP.I(a))a:for(;;)if(""===$APP.td(a))a=$APP.ud(a);else break a;return a},ZD=function(a,b){return $APP.u($APP.u(b)?$APP.Ek.h(b,""):b)?$APP.Pp(a,new $APP.mo(new $APP.lo(b,$APP.I(b)))):null},aE=function(a){throw $APP.Bm.h(["Unexpected format: ",$APP.y.g(a)].join(""),new $APP.r(null,1,[$D,a],null));},bE=function(a){var b=JSON.parse(a);return $APP.Gd(b)? | ||
b:aE(a)},cE=function(a){var b=JSON.parse(a);return $APP.Kd(b)?b:aE(a)},dE=function(a){var b=JSON.parse(a);return $APP.Ld(b)?b:aE(a)},eE=function(a){var b=JSON.parse(a);return"number"===typeof b?b:aE(a)},fE=function(a){return $APP.J.h(":",0<a.length?a.charAt(0):null)?$APP.fi.g($APP.Vh.h(a,1)):$APP.fi.g(a)},gE=function(a){return $APP.wd(a)?$APP.G(a):a},hE=function(a){if("string"===typeof a)try{var b=0<a.length?a.charAt(0):null;if($APP.J.h("true",a)||$APP.J.h("false",a))var c=bE(a);else{if($APP.Ca(isNaN(a)))var d= | ||
eE(a);else{var e=$APP.J.h(":",b);var f=e?$APP.Th(/:?[a-zA-Z0-9]+/,a):e;d=$APP.u(f)?fE(a):a}c=d}return c}catch(g){return a}else return a},mE=function(a,b){var c=function(){switch(b instanceof $APP.R?b.Ba:null){case "boolean":return bE;case "int":case "long":return cE;case "double":return dE;case "number":return eE;case "symbol":return $APP.qi;case "keyword":return fE;case "string":return $APP.$d;case "edn":return iE;case "auto":return hE;default:return b}}();if("string"===typeof a){try{var d=c.g?c.g(a): | ||
c.call(null,a)}catch(e){d=jE}if($APP.J.h(jE,d))throw $APP.Bm.h(["Coerce failure: cannot transform input ",$APP.Yl.l($APP.W.h([a],0)),b instanceof $APP.R?" to ":" with ",$APP.y.g(b instanceof $APP.R?$APP.Fh(b):b)].join(""),new $APP.r(null,2,[kE,a,lE,b],null));return d}return a},nE=function(a,b,c){a=$APP.O.h(a,b);c=$APP.u(a)?a:$APP.wd(c)?$APP.md(c):null;return $APP.u(c)?$APP.wd(c)?$APP.Jk.h($APP.ke,c):c:null},oE=function(a,b,c,d){return $APP.Ek.h(b,c)?$APP.dl.j(a,b,function(e){return null==e?$APP.u(d)? | ||
d.h?d.h(e,!0):d.call(null,e,!0):!0:$APP.u(d)?d.h?d.h(e,!0):d.call(null,e,!0):e}):a},pE=function(a,b,c,d,e){d=$APP.u($APP.u(d)?!$APP.wd(d):d)?mE(e,d):hE(e);return $APP.u(c)?$APP.dl.G(a,b,c,d):$APP.X.j(a,b,d)},uE=function(a){return $APP.Wd.j(function(b,c){var d=$APP.K.j(c,0,null);c=$APP.K.j(c,1,null);c=$APP.Le(c);var e=$APP.O.h(c,qE),f=$APP.O.h(c,rE);c=$APP.O.h(c,$APP.rn);b=$APP.u(e)?$APP.dl.J(b,qE,$APP.X,d,e):b;b=$APP.u(f)?$APP.dl.j(b,sE,function(g){if($APP.Nd(g,f))throw $APP.Bm.h(["Conflicting alias ", | ||
$APP.y.g(f)," between ",$APP.y.g($APP.O.h(g,f))," and ",$APP.y.g(d)].join(""),new $APP.r(null,1,[rE,f],null));return $APP.X.j(g,f,d)}):b;return $APP.u(c)?$APP.dl.J(b,tE,$APP.X,d,c):b},$APP.Ke,a)},HE=function(){var a=process.argv.slice(2),b=new $APP.r(null,1,[sE,new $APP.r(null,1,[vE,wE],null)],null),c=xE.g(b);b=$APP.u(c)?$APP.Bl.l($APP.W.h([b,$APP.u(c)?uE(c):null],0)):b;var d=qE.g(b),e=sE.g(b),f=yE.g(b),g=tE.g(b),h=zE.g(b),l=$APP.J.h(!0,AE.g(b))?function(){var z=null==c?null:$APP.uh(c);z=null==z? | ||
null:$APP.Y.h(z,$APP.uh(e));z=null==z?null:$APP.Y.h(z,$APP.uh(d));return null==z?null:$APP.Dh(z)}():AE.g(b);a=$APP.Qh(function(z){var B=$APP.u(h)?null:0==z.lastIndexOf(":",0);return!($APP.u(B)?B:0==z.lastIndexOf("-",0))},a);var m=$APP.K.j(a,0,null),n=$APP.K.j(a,1,null);a=function(){var z=$APP.F(m);return null==z?null:$APP.Vf(z)}();var q=function(){for(var z=$APP.u(g)?g:$APP.Ke,B=null,C=null,M=$APP.u(h)?BE:null,T=$APP.F(n);;){if($APP.Ca(T))return new $APP.U(null,3,5,$APP.V,[z,B,C],null);var ba=$APP.G(T), | ||
pa=nE(f,B,$APP.O.h(d,B)),xa=0<ba.length?ba.charAt(0):null,pb=$APP.J.h(xa,"-"),Gb=function(){var Pc=M;return $APP.u(Pc)?Pc:pb?BE:null}(),ja=$APP.J.h(":",xa),Pb=$APP.Ek.h(BE,Gb)&&ja&&($APP.Ca(B)||$APP.J.h(C,B));xa=function(){var Pc=Gb;return $APP.u(Pc)?Pc:Pb?CE:null}();if(pb||Pb){var Pa=(ja=0==ba.lastIndexOf("--",0))&&$APP.J.h("--",ba);if(Pa){var ld=$APP.H(T);return new $APP.U(null,3,5,$APP.V,[function(){var Pc=z;return ld?$APP.Dk.G(Pc,$APP.bl,new $APP.U(null,2,5,$APP.V,[DE,EE],null),$APP.Vf(ld)):Pc}(), | ||
B,C],null)}Pa=ja?$APP.Vh.h(ba,2):$APP.Vn(ba,/^(:|-|)/,"");ja=ja?YD(Pa):new $APP.U(null,1,5,$APP.V,[Pa],null);Pa=$APP.K.j(ja,0,null);ja=$APP.K.j(ja,1,null);Pa=$APP.fi.g(Pa);Pa=$APP.O.j(e,Pa,Pa);if($APP.u($APP.u(l)?$APP.Ca($APP.O.h(l,Pa)):l))throw $APP.Bm.h(["Unknown option ",$APP.y.g(ba)].join(""),new $APP.r(null,1,[AE,l],null));$APP.u(ja)?(B=oE(z,B,C,pa),C=Pa,T=$APP.Q(ja,$APP.Hc(T)),z=B,B=C,C=null,M=xa):(B=oE(z,B,C,pa),ba=Pa,T=$APP.H(T),z=B,B=ba,M=xa)}else{var zc=$APP.O.h(d,B);if(Pa=$APP.J.h(FE,zc)&& | ||
$APP.Ca(C)&&$APP.Ek.h(ba,"true")&&$APP.Ek.h(ba,"false")||$APP.J.h(C,B)&&$APP.Ca(pa))return new $APP.U(null,3,5,$APP.V,[$APP.Dk.G(z,$APP.bl,new $APP.U(null,2,5,$APP.V,[DE,EE],null),$APP.Vf(T)),B,null],null);C=pE(z,B,pa,gE(zc),ba);ba=$APP.J.h(CE,xa)&&ja?null:B;pa=$APP.J.h(CE,xa)&&ja?null:B;T=$APP.H(T);z=C;B=ba;C=pa;M=xa}}}();b=$APP.K.j(q,0,null);var t=$APP.K.j(q,1,null);q=$APP.K.j(q,2,null);var w=nE(f,t,$APP.O.h(mE,t));b=oE(b,t,q,w);return $APP.u(a)?$APP.Dk.G(b,$APP.bl,new $APP.U(null,2,5,$APP.V,[DE, | ||
GE],null),a):b},JE=function(){var a=HE(),b=DE.g($APP.sd(a));return $APP.X.j(b,IE,$APP.Vj.h(a,DE))},KE=function(a,b){var c=$APP.vf($APP.I(a),b);b=$APP.K.j(c,0,null);c=$APP.K.j(c,1,null);return $APP.J.h(b,a)?c:null},OE=function(){var a=LE,b=JE(),c=$APP.Le(b),d=$APP.O.h(c,GE),e=$APP.O.h(c,IE);$APP.Wd.j(function(f,g){f=$APP.Le(g);var h=$APP.O.h(f,GE),l=$APP.O.h(f,$APP.Er),m=$APP.O.h(f,ME),n=KE(h,d);if($APP.u(n)){var q=function(){var z=null==n?null:$APP.F(n);return null==z?null:$APP.Vf(z)}();f=$APP.u($APP.u(q)? | ||
m:q)?function(){var z=$APP.I(q),B=$APP.I(m);return new $APP.U(null,2,5,$APP.V,[$APP.uf.h(z<B?z:B,q),$APP.Gh(m,q)],null)}():new $APP.U(null,2,5,$APP.V,[q,null],null);var t=$APP.K.j(f,0,null);f=$APP.K.j(f,1,null);var w=$APP.u(f)?$APP.Bl.l($APP.W.h([e,f],0)):e;return $APP.Tc(function(){var z=$APP.X.l(c,NE,t,$APP.W.h([IE,w,$APP.KB,h],0));return l.g?l.g(z):l.call(null,z)}())}return null},null,a)},PE=function(a){a=$APP.F(a);for(var b=null,c=0,d=0;;)if(d<c){var e=b.$(null,d);$APP.cm.l($APP.W.h(["Transpiling CLJS file:", | ||
e],0));e=$APP.Ns(new $APP.r(null,1,[$APP.Ks,e],null));e=$APP.Le(e);e=$APP.O.h(e,$APP.Ls);$APP.cm.l($APP.W.h(["Wrote JS file:",e],0));d+=1}else if(a=$APP.F(a))$APP.Ed(a)?(c=$APP.dc(a),a=$APP.ec(a),b=c,c=$APP.I(c)):(e=$APP.G(a),$APP.cm.l($APP.W.h(["Transpiling CLJS file:",e],0)),b=$APP.Ns(new $APP.r(null,1,[$APP.Ks,e],null)),b=$APP.Le(b),b=$APP.O.h(b,$APP.Ls),$APP.cm.l($APP.W.h(["Wrote JS file:",b],0)),a=$APP.H(a),b=null,c=0),d=0;else return null},iE=function iE(a){switch(arguments.length){case 1:return iE.g(arguments[0]); | ||
case 2:return iE.h(arguments[0],arguments[1]);default:throw Error(["Invalid arity: ",$APP.y.g(arguments.length)].join(""));}};iE.g=function(a){return ZD(new $APP.r(null,3,[$APP.Op,$APP.qb($APP.OD),$APP.rn,$APP.qb($APP.ND),$APP.Go,null],null),a)};iE.h=function(a,b){return ZD($APP.dl.j($APP.Bl.l($APP.W.h([new $APP.r(null,1,[$APP.rn,$APP.qb($APP.ND)],null),a],0)),$APP.Op,function(c){return $APP.Bl.l($APP.W.h([$APP.qb($APP.OD),c],0))}),b)};iE.v=2; | ||
var xE=new $APP.R(null,"spec","spec",347520401),FE=new $APP.R(null,"boolean","boolean",-1919418404),IE=new $APP.R(null,"opts","opts",155075701),wE=new $APP.R(null,"help","help",-439233446),lE=new $APP.R(null,"coerce-fn","coerce-fn",-821146515),zE=new $APP.R(null,"no-keyword-opts","no-keyword-opts",761286018),NE=new $APP.R(null,"rest-cmds","rest-cmds",-423198324),CE=new $APP.R(null,"keywords","keywords",1526959054),GE=new $APP.R(null,"cmds","cmds",-1841503952),sE=new $APP.R(null,"aliases","aliases", | ||
1346874714),yE=new $APP.R(null,"collect","collect",-284321549),DE=new $APP.R("org.babashka","cli","org.babashka/cli",1162430315),jE=new $APP.R("babashka.cli","error","babashka.cli/error",-939678701),ME=new $APP.R(null,"cmds-opts","cmds-opts",-390130362),tE=new $APP.R(null,"exec-args","exec-args",-1860766354),kE=new $APP.R(null,"input","input",556931961),qE=new $APP.R(null,"coerce","coerce",1917884504),QE=new $APP.R(null,"show","show",-576705889),AE=new $APP.R(null,"closed","closed",-919675359),vE= | ||
new $APP.R(null,"h","h",1109658740),RE=new $APP.R(null,"e","e",1381269198),$D=new $APP.R(null,"s","s",1705939918),BE=new $APP.R(null,"hyphens","hyphens",2113533609),rE=new $APP.R(null,"alias","alias",-2039751630),EE=new $APP.R(null,"args","args",1315556576);var LE=new $APP.U(null,3,5,$APP.V,[new $APP.r(null,3,[GE,new $APP.U(null,1,5,$APP.V,["run"],null),$APP.Er,function(a){a=$APP.Le(a);a=$APP.O.h(a,IE);a=$APP.Le(a);a=$APP.O.h(a,$APP.yo);a=$APP.Ns(new $APP.r(null,1,[$APP.Ks,a],null));a=$APP.Le(a);a=$APP.O.h(a,$APP.Ls);return shadow_esm_import([$APP.y.g(process.cwd()),"/",$APP.y.g(a)].join(""))},ME,new $APP.U(null,1,5,$APP.V,[$APP.yo],null)],null),new $APP.r(null,2,[GE,new $APP.U(null,1,5,$APP.V,["transpile"],null),$APP.Er,PE],null),new $APP.r(null,2, | ||
[GE,$APP.Uf,$APP.Er,function(a){a=$APP.Le(a);var b=$APP.O.h(a,NE),c=$APP.O.h(a,IE);a=RE.g(c);if($APP.u(a)){a=$APP.Js(a);var d=$APP.Ms.mkdtempSync(".tmp"),e=[$APP.y.g(d),"/cherry.mjs"].join("");$APP.Ms.writeFileSync(e,a,"utf-8");$APP.u(QE.g(c))&&$APP.cm.l($APP.W.h([a],0));return shadow_esm_import([$APP.y.g(process.cwd()),"/",e].join("")).finally(function(){return $APP.Ms.rmSync(d,{force:!0,recursive:!0})})}return $APP.u(function(){var f=wE.g(c);return $APP.u(f)?f:$APP.J.h("help",$APP.G(b))||$APP.vd(b)}())? | ||
$APP.cm.l($APP.W.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)):PE(b)}],null)],null);try{OE()}catch(a){throw console.error("An error occurred when calling (cherry.internal.cli/init)"),a;}; | ||
'use strict';var rE=function(a){var b=/=/;a="/(?:)/"===$APP.w.g(b)?$APP.ke.h($APP.Vf($APP.P("",$APP.ei.h($APP.w,$APP.E(a)))),""):$APP.Vf($APP.w.g(a).split(b));if(1<$APP.H(a))a:for(;;)if(""===$APP.td(a))a=$APP.ud(a);else break a;return a},sE=function(a,b){return $APP.t($APP.t(b)?$APP.Ek.h(b,""):b)?$APP.Pp(a,new $APP.mo(new $APP.lo(b,$APP.H(b)))):null},uE=function(a){throw $APP.Bm.h(["Unexpected format: ",$APP.w.g(a)].join(""),new $APP.r(null,1,[tE,a],null));},vE=function(a){var b=JSON.parse(a);return $APP.Gd(b)? | ||
b:uE(a)},wE=function(a){var b=JSON.parse(a);return $APP.Kd(b)?b:uE(a)},xE=function(a){var b=JSON.parse(a);return $APP.Ld(b)?b:uE(a)},yE=function(a){var b=JSON.parse(a);return"number"===typeof b?b:uE(a)},zE=function(a){return $APP.I.h(":",0<a.length?a.charAt(0):null)?$APP.fi.g($APP.Vh.h(a,1)):$APP.fi.g(a)},AE=function(a){return $APP.wd(a)?$APP.F(a):a},BE=function(a){if("string"===typeof a)try{var b=0<a.length?a.charAt(0):null;if($APP.I.h("true",a)||$APP.I.h("false",a))var c=vE(a);else{if($APP.Ba(isNaN(a)))var d= | ||
yE(a);else{var e=$APP.I.h(":",b);var f=e?$APP.Th(/:?[a-zA-Z0-9]+/,a):e;d=$APP.t(f)?zE(a):a}c=d}return c}catch(g){return a}else return a},GE=function(a,b){var c=function(){switch(b instanceof $APP.Q?b.Ba:null){case "boolean":return vE;case "int":case "long":return wE;case "double":return xE;case "number":return yE;case "symbol":return $APP.qi;case "keyword":return zE;case "string":return $APP.$d;case "edn":return CE;case "auto":return BE;default:return b}}();if("string"===typeof a){try{var d=c.g?c.g(a): | ||
c.call(null,a)}catch(e){d=DE}if($APP.I.h(DE,d))throw $APP.Bm.h(["Coerce failure: cannot transform input ",$APP.Yl.l($APP.W.h([a],0)),b instanceof $APP.Q?" to ":" with ",$APP.w.g(b instanceof $APP.Q?$APP.Fh(b):b)].join(""),new $APP.r(null,2,[EE,a,FE,b],null));return d}return a},HE=function(a,b,c){a=$APP.N.h(a,b);c=$APP.t(a)?a:$APP.wd(c)?$APP.ld(c):null;return $APP.t(c)?$APP.wd(c)?$APP.Jk.h($APP.ke,c):c:null},IE=function(a,b,c,d){return $APP.Ek.h(b,c)?$APP.dl.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},JE=function(a,b,c,d,e){d=$APP.t($APP.t(d)?!$APP.wd(d):d)?GE(e,d):BE(e);return $APP.t(c)?$APP.dl.G(a,b,c,d):$APP.X.j(a,b,d)},OE=function(a){return $APP.Wd.j(function(b,c){var d=$APP.J.j(c,0,null);c=$APP.J.j(c,1,null);c=$APP.Le(c);var e=$APP.N.h(c,KE),f=$APP.N.h(c,LE);c=$APP.N.h(c,$APP.rn);b=$APP.t(e)?$APP.dl.J(b,KE,$APP.X,d,e):b;b=$APP.t(f)?$APP.dl.j(b,ME,function(g){if($APP.Nd(g,f))throw $APP.Bm.h(["Conflicting alias ", | ||
$APP.w.g(f)," between ",$APP.w.g($APP.N.h(g,f))," and ",$APP.w.g(d)].join(""),new $APP.r(null,1,[LE,f],null));return $APP.X.j(g,f,d)}):b;return $APP.t(c)?$APP.dl.J(b,NE,$APP.X,d,c):b},$APP.Ke,a)},aF=function(){var a=process.argv.slice(2),b=new $APP.r(null,1,[ME,new $APP.r(null,1,[PE,QE],null)],null),c=RE.g(b);b=$APP.t(c)?$APP.Bl.l($APP.W.h([b,$APP.t(c)?OE(c):null],0)):b;var d=KE.g(b),e=ME.g(b),f=SE.g(b),g=NE.g(b),h=TE.g(b),l=$APP.I.h(!0,UE.g(b))?function(){var A=null==c?null:$APP.uh(c);A=null==A? | ||
null:$APP.Y.h(A,$APP.uh(e));A=null==A?null:$APP.Y.h(A,$APP.uh(d));return null==A?null:$APP.Dh(A)}():UE.g(b);a=$APP.Qh(function(A){var B=$APP.t(h)?null:0==A.lastIndexOf(":",0);return!($APP.t(B)?B:0==A.lastIndexOf("-",0))},a);var m=$APP.J.j(a,0,null),n=$APP.J.j(a,1,null);a=function(){var A=$APP.E(m);return null==A?null:$APP.Vf(A)}();var q=function(){for(var A=$APP.t(g)?g:$APP.Ke,B=null,C=null,M=$APP.t(h)?VE:null,R=$APP.E(n);;){if($APP.Ba(R))return new $APP.T(null,3,5,$APP.U,[A,B,C],null);var V=$APP.F(R), | ||
ia=HE(f,B,$APP.N.h(d,B)),ta=0<V.length?V.charAt(0):null,rb=$APP.I.h(ta,"-"),Ib=function(){var Sc=M;return $APP.t(Sc)?Sc:rb?VE:null}(),la=$APP.I.h(":",ta),Sb=$APP.Ek.h(VE,Ib)&&la&&($APP.Ba(B)||$APP.I.h(C,B));ta=function(){var Sc=Ib;return $APP.t(Sc)?Sc:Sb?WE:null}();if(rb||Sb){var Ra=(la=0==V.lastIndexOf("--",0))&&$APP.I.h("--",V);if(Ra){var md=$APP.G(R);return new $APP.T(null,3,5,$APP.U,[function(){var Sc=A;return md?$APP.Dk.G(Sc,$APP.bl,new $APP.T(null,2,5,$APP.U,[XE,YE],null),$APP.Vf(md)):Sc}(), | ||
B,C],null)}Ra=la?$APP.Vh.h(V,2):$APP.Vn(V,/^(:|-|)/,"");la=la?rE(Ra):new $APP.T(null,1,5,$APP.U,[Ra],null);Ra=$APP.J.j(la,0,null);la=$APP.J.j(la,1,null);Ra=$APP.fi.g(Ra);Ra=$APP.N.j(e,Ra,Ra);if($APP.t($APP.t(l)?$APP.Ba($APP.N.h(l,Ra)):l))throw $APP.Bm.h(["Unknown option ",$APP.w.g(V)].join(""),new $APP.r(null,1,[UE,l],null));$APP.t(la)?(B=IE(A,B,C,ia),C=Ra,R=$APP.P(la,$APP.Hc(R)),A=B,B=C,C=null,M=ta):(B=IE(A,B,C,ia),V=Ra,R=$APP.G(R),A=B,B=V,M=ta)}else{var zc=$APP.N.h(d,B);if(Ra=$APP.I.h(ZE,zc)&&$APP.Ba(C)&& | ||
$APP.Ek.h(V,"true")&&$APP.Ek.h(V,"false")||$APP.I.h(C,B)&&$APP.Ba(ia))return new $APP.T(null,3,5,$APP.U,[$APP.Dk.G(A,$APP.bl,new $APP.T(null,2,5,$APP.U,[XE,YE],null),$APP.Vf(R)),B,null],null);C=JE(A,B,ia,AE(zc),V);V=$APP.I.h(WE,ta)&&la?null:B;ia=$APP.I.h(WE,ta)&&la?null:B;R=$APP.G(R);A=C;B=V;C=ia;M=ta}}}();b=$APP.J.j(q,0,null);var u=$APP.J.j(q,1,null);q=$APP.J.j(q,2,null);var x=HE(f,u,$APP.N.h(GE,u));b=IE(b,u,q,x);return $APP.t(a)?$APP.Dk.G(b,$APP.bl,new $APP.T(null,2,5,$APP.U,[XE,$E],null),a):b}, | ||
cF=function(){var a=aF(),b=XE.g($APP.sd(a));return $APP.X.j(b,bF,$APP.Vj.h(a,XE))},dF=function(a,b){var c=$APP.vf($APP.H(a),b);b=$APP.J.j(c,0,null);c=$APP.J.j(c,1,null);return $APP.I.h(b,a)?c:null},hF=function(){var a=eF,b=cF(),c=$APP.Le(b),d=$APP.N.h(c,$E),e=$APP.N.h(c,bF);$APP.Wd.j(function(f,g){f=$APP.Le(g);var h=$APP.N.h(f,$E),l=$APP.N.h(f,$APP.Er),m=$APP.N.h(f,fF),n=dF(h,d);if($APP.t(n)){var q=function(){var A=null==n?null:$APP.E(n);return null==A?null:$APP.Vf(A)}();f=$APP.t($APP.t(q)?m:q)?function(){var A= | ||
$APP.H(q),B=$APP.H(m);return new $APP.T(null,2,5,$APP.U,[$APP.uf.h(A<B?A:B,q),$APP.Gh(m,q)],null)}():new $APP.T(null,2,5,$APP.U,[q,null],null);var u=$APP.J.j(f,0,null);f=$APP.J.j(f,1,null);var x=$APP.t(f)?$APP.Bl.l($APP.W.h([e,f],0)):e;return $APP.Tc(function(){var A=$APP.X.l(c,gF,u,$APP.W.h([bF,x,$APP.aC,h],0));return l.g?l.g(A):l.call(null,A)}())}return null},null,a)},iF=function(a){a=$APP.E(a);for(var b=null,c=0,d=0;;)if(d<c){var e=b.$(null,d);$APP.cm.l($APP.W.h(["Transpiling CLJS file:",e],0)); | ||
e=$APP.Ns(new $APP.r(null,1,[$APP.Ks,e],null));e=$APP.Le(e);e=$APP.N.h(e,$APP.Ls);$APP.cm.l($APP.W.h(["Wrote JS file:",e],0));d+=1}else if(a=$APP.E(a))$APP.Ed(a)?(c=$APP.dc(a),a=$APP.ec(a),b=c,c=$APP.H(c)):(e=$APP.F(a),$APP.cm.l($APP.W.h(["Transpiling CLJS file:",e],0)),b=$APP.Ns(new $APP.r(null,1,[$APP.Ks,e],null)),b=$APP.Le(b),b=$APP.N.h(b,$APP.Ls),$APP.cm.l($APP.W.h(["Wrote JS file:",b],0)),a=$APP.G(a),b=null,c=0),d=0;else return null},CE=function CE(a){switch(arguments.length){case 1:return CE.g(arguments[0]); | ||
case 2:return CE.h(arguments[0],arguments[1]);default:throw Error(["Invalid arity: ",$APP.w.g(arguments.length)].join(""));}};CE.g=function(a){return sE(new $APP.r(null,3,[$APP.Op,$APP.pb($APP.hE),$APP.rn,$APP.pb($APP.gE),$APP.Go,null],null),a)};CE.h=function(a,b){return sE($APP.dl.j($APP.Bl.l($APP.W.h([new $APP.r(null,1,[$APP.rn,$APP.pb($APP.gE)],null),a],0)),$APP.Op,function(c){return $APP.Bl.l($APP.W.h([$APP.pb($APP.hE),c],0))}),b)};CE.v=2; | ||
var RE=new $APP.Q(null,"spec","spec",347520401),ZE=new $APP.Q(null,"boolean","boolean",-1919418404),bF=new $APP.Q(null,"opts","opts",155075701),QE=new $APP.Q(null,"help","help",-439233446),FE=new $APP.Q(null,"coerce-fn","coerce-fn",-821146515),TE=new $APP.Q(null,"no-keyword-opts","no-keyword-opts",761286018),gF=new $APP.Q(null,"rest-cmds","rest-cmds",-423198324),WE=new $APP.Q(null,"keywords","keywords",1526959054),$E=new $APP.Q(null,"cmds","cmds",-1841503952),ME=new $APP.Q(null,"aliases","aliases", | ||
1346874714),SE=new $APP.Q(null,"collect","collect",-284321549),XE=new $APP.Q("org.babashka","cli","org.babashka/cli",1162430315),DE=new $APP.Q("babashka.cli","error","babashka.cli/error",-939678701),fF=new $APP.Q(null,"cmds-opts","cmds-opts",-390130362),NE=new $APP.Q(null,"exec-args","exec-args",-1860766354),EE=new $APP.Q(null,"input","input",556931961),KE=new $APP.Q(null,"coerce","coerce",1917884504),jF=new $APP.Q(null,"show","show",-576705889),UE=new $APP.Q(null,"closed","closed",-919675359),PE= | ||
new $APP.Q(null,"h","h",1109658740),kF=new $APP.Q(null,"e","e",1381269198),tE=new $APP.Q(null,"s","s",1705939918),VE=new $APP.Q(null,"hyphens","hyphens",2113533609),LE=new $APP.Q(null,"alias","alias",-2039751630),YE=new $APP.Q(null,"args","args",1315556576);var eF=new $APP.T(null,3,5,$APP.U,[new $APP.r(null,3,[$E,new $APP.T(null,1,5,$APP.U,["run"],null),$APP.Er,function(a){a=$APP.Le(a);a=$APP.N.h(a,bF);a=$APP.Le(a);a=$APP.N.h(a,$APP.yo);a=$APP.Ns(new $APP.r(null,1,[$APP.Ks,a],null));a=$APP.Le(a);a=$APP.N.h(a,$APP.Ls);return shadow_esm_import([$APP.w.g(process.cwd()),"/",$APP.w.g(a)].join(""))},fF,new $APP.T(null,1,5,$APP.U,[$APP.yo],null)],null),new $APP.r(null,2,[$E,new $APP.T(null,1,5,$APP.U,["transpile"],null),$APP.Er,iF],null),new $APP.r(null,2, | ||
[$E,$APP.Uf,$APP.Er,function(a){a=$APP.Le(a);var b=$APP.N.h(a,gF),c=$APP.N.h(a,bF);a=kF.g(c);if($APP.t(a)){a=$APP.Js(a);var d=$APP.Ms.mkdtempSync(".tmp"),e=[$APP.w.g(d),"/cherry.mjs"].join("");$APP.Ms.writeFileSync(e,a,"utf-8");$APP.t(jF.g(c))&&$APP.cm.l($APP.W.h([a],0));return shadow_esm_import([$APP.w.g(process.cwd()),"/",e].join("")).finally(function(){return $APP.Ms.rmSync(d,{force:!0,recursive:!0})})}return $APP.t(function(){var f=QE.g(c);return $APP.t(f)?f:$APP.I.h("help",$APP.F(b))||$APP.vd(b)}())? | ||
$APP.cm.l($APP.W.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)):iF(b)}],null)],null);try{hF()}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.25", | ||
"version": "0.0.0-alpha.26", | ||
"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
553934
3166