Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

cherry-cljs

Package Overview
Dependencies
Maintainers
1
Versions
84
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cherry-cljs - npm Package Compare versions

Comparing version 0.0.0-alpha.27 to 0.0.0-alpha.28

38

lib/cli.js
import { $APP, shadow$provide, $jscomp } from "./transpiler.js";
const shadow_esm_import = function(x) { return import(x) };
'use strict';var uE=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},vE=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},xE=function(a){throw $APP.Bm.h(["Unexpected format: ",$APP.w.g(a)].join(""),new $APP.r(null,1,[wE,a],null));},yE=function(a){var b=JSON.parse(a);return $APP.Gd(b)?
b:xE(a)},zE=function(a){var b=JSON.parse(a);return $APP.Kd(b)?b:xE(a)},AE=function(a){var b=JSON.parse(a);return $APP.Ld(b)?b:xE(a)},BE=function(a){var b=JSON.parse(a);return"number"===typeof b?b:xE(a)},CE=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)},DE=function(a){return $APP.wd(a)?$APP.F(a):a},EE=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=yE(a);else{if($APP.Ba(isNaN(a)))var d=
BE(a);else{var e=$APP.I.h(":",b);var f=e?$APP.Th(/:?[a-zA-Z0-9]+/,a):e;d=$APP.t(f)?CE(a):a}c=d}return c}catch(g){return a}else return a},JE=function(a,b){var c=function(){switch(b instanceof $APP.Q?b.Ba:null){case "boolean":return yE;case "int":case "long":return zE;case "double":return AE;case "number":return BE;case "symbol":return $APP.qi;case "keyword":return CE;case "string":return $APP.$d;case "edn":return FE;case "auto":return EE;default:return b}}();if("string"===typeof a){try{var d=c.g?c.g(a):
c.call(null,a)}catch(e){d=GE}if($APP.I.h(GE,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,[HE,a,IE,b],null));return d}return a},KE=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},LE=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},ME=function(a,b,c,d,e){d=$APP.t($APP.t(d)?!$APP.wd(d):d)?JE(e,d):EE(e);return $APP.t(c)?$APP.dl.G(a,b,c,d):$APP.X.j(a,b,d)},RE=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,NE),f=$APP.N.h(c,OE);c=$APP.N.h(c,$APP.rn);b=$APP.t(e)?$APP.dl.J(b,NE,$APP.X,d,e):b;b=$APP.t(f)?$APP.dl.j(b,PE,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,[OE,f],null));return $APP.X.j(g,f,d)}):b;return $APP.t(c)?$APP.dl.J(b,QE,$APP.X,d,c):b},$APP.Ke,a)},dF=function(){var a=process.argv.slice(2),b=new $APP.r(null,1,[PE,new $APP.r(null,1,[SE,TE],null)],null),c=UE.g(b);b=$APP.t(c)?$APP.Bl.l($APP.W.h([b,$APP.t(c)?RE(c):null],0)):b;var d=NE.g(b),e=PE.g(b),f=VE.g(b),g=QE.g(b),h=WE.g(b),l=$APP.I.h(!0,XE.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)}():XE.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)?YE: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=KE(f,B,$APP.N.h(d,B)),ua=0<V.length?V.charAt(0):null,rb=$APP.I.h(ua,"-"),Ib=function(){var Sc=M;return $APP.t(Sc)?Sc:rb?YE:null}(),la=$APP.I.h(":",ua),Sb=$APP.Ek.h(YE,Ib)&&la&&($APP.Ba(B)||$APP.I.h(C,B));ua=function(){var Sc=Ib;return $APP.t(Sc)?Sc:Sb?ZE: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,[$E,aF],null),$APP.Vf(md)):Sc}(),
B,C],null)}Ra=la?$APP.Vh.h(V,2):$APP.Vn(V,/^(:|-|)/,"");la=la?uE(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,[XE,l],null));$APP.t(la)?(B=LE(A,B,C,ia),C=Ra,R=$APP.P(la,$APP.Hc(R)),A=B,B=C,C=null,M=ua):(B=LE(A,B,C,ia),V=Ra,R=$APP.G(R),A=B,B=V,M=ua)}else{var zc=$APP.N.h(d,B);if(Ra=$APP.I.h(bF,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,[$E,aF],null),$APP.Vf(R)),B,null],null);C=ME(A,B,ia,DE(zc),V);V=$APP.I.h(ZE,ua)&&la?null:B;ia=$APP.I.h(ZE,ua)&&la?null:B;R=$APP.G(R);A=C;B=V;C=ia;M=ua}}}();b=$APP.J.j(q,0,null);var u=$APP.J.j(q,1,null);q=$APP.J.j(q,2,null);var x=KE(f,u,$APP.N.h(JE,u));b=LE(b,u,q,x);return $APP.t(a)?$APP.Dk.G(b,$APP.bl,new $APP.T(null,2,5,$APP.U,[$E,cF],null),a):b},
fF=function(){var a=dF(),b=$E.g($APP.sd(a));return $APP.X.j(b,eF,$APP.Vj.h(a,$E))},gF=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},kF=function(){var a=hF,b=fF(),c=$APP.Le(b),d=$APP.N.h(c,cF),e=$APP.N.h(c,eF);$APP.Wd.j(function(f,g){f=$APP.Le(g);var h=$APP.N.h(f,cF),l=$APP.N.h(f,$APP.Er),m=$APP.N.h(f,iF),n=gF(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,jF,u,$APP.W.h([eF,x,$APP.cC,h],0));return l.g?l.g(A):l.call(null,A)}())}return null},null,a)},lF=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.Ps(new $APP.r(null,1,[$APP.Ms,e],null));e=$APP.Le(e);e=$APP.N.h(e,$APP.Ns);$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.Ps(new $APP.r(null,1,[$APP.Ms,e],null)),b=$APP.Le(b),b=$APP.N.h(b,$APP.Ns),$APP.cm.l($APP.W.h(["Wrote JS file:",b],0)),a=$APP.G(a),b=null,c=0),d=0;else return null},FE=function FE(a){switch(arguments.length){case 1:return FE.g(arguments[0]);
case 2:return FE.h(arguments[0],arguments[1]);default:throw Error(["Invalid arity: ",$APP.w.g(arguments.length)].join(""));}};FE.g=function(a){return vE(new $APP.r(null,3,[$APP.Op,$APP.pb($APP.lE),$APP.rn,$APP.pb($APP.kE),$APP.Go,null],null),a)};FE.h=function(a,b){return vE($APP.dl.j($APP.Bl.l($APP.W.h([new $APP.r(null,1,[$APP.rn,$APP.pb($APP.kE)],null),a],0)),$APP.Op,function(c){return $APP.Bl.l($APP.W.h([$APP.pb($APP.lE),c],0))}),b)};FE.v=2;
var UE=new $APP.Q(null,"spec","spec",347520401),bF=new $APP.Q(null,"boolean","boolean",-1919418404),eF=new $APP.Q(null,"opts","opts",155075701),TE=new $APP.Q(null,"help","help",-439233446),IE=new $APP.Q(null,"coerce-fn","coerce-fn",-821146515),WE=new $APP.Q(null,"no-keyword-opts","no-keyword-opts",761286018),jF=new $APP.Q(null,"rest-cmds","rest-cmds",-423198324),ZE=new $APP.Q(null,"keywords","keywords",1526959054),cF=new $APP.Q(null,"cmds","cmds",-1841503952),PE=new $APP.Q(null,"aliases","aliases",
1346874714),VE=new $APP.Q(null,"collect","collect",-284321549),$E=new $APP.Q("org.babashka","cli","org.babashka/cli",1162430315),GE=new $APP.Q("babashka.cli","error","babashka.cli/error",-939678701),iF=new $APP.Q(null,"cmds-opts","cmds-opts",-390130362),QE=new $APP.Q(null,"exec-args","exec-args",-1860766354),HE=new $APP.Q(null,"input","input",556931961),NE=new $APP.Q(null,"coerce","coerce",1917884504),mF=new $APP.Q(null,"show","show",-576705889),XE=new $APP.Q(null,"closed","closed",-919675359),SE=
new $APP.Q(null,"h","h",1109658740),nF=new $APP.Q(null,"e","e",1381269198),wE=new $APP.Q(null,"s","s",1705939918),YE=new $APP.Q(null,"hyphens","hyphens",2113533609),OE=new $APP.Q(null,"alias","alias",-2039751630),aF=new $APP.Q(null,"args","args",1315556576);var hF=new $APP.T(null,3,5,$APP.U,[new $APP.r(null,3,[cF,new $APP.T(null,1,5,$APP.U,["run"],null),$APP.Er,function(a){a=$APP.Le(a);a=$APP.N.h(a,eF);a=$APP.Le(a);a=$APP.N.h(a,$APP.yo);a=$APP.Ps(new $APP.r(null,1,[$APP.Ms,a],null));a=$APP.Le(a);a=$APP.N.h(a,$APP.Ns);return shadow_esm_import([$APP.w.g(process.cwd()),"/",$APP.w.g(a)].join(""))},iF,new $APP.T(null,1,5,$APP.U,[$APP.yo],null)],null),new $APP.r(null,2,[cF,new $APP.T(null,1,5,$APP.U,["transpile"],null),$APP.Er,lF],null),new $APP.r(null,2,
[cF,$APP.Uf,$APP.Er,function(a){a=$APP.Le(a);var b=$APP.N.h(a,jF),c=$APP.N.h(a,eF);a=nF.g(c);if($APP.t(a)){a=$APP.Ls(a);var d=$APP.Os.mkdtempSync(".tmp"),e=[$APP.w.g(d),"/cherry.mjs"].join("");$APP.Os.writeFileSync(e,a,"utf-8");$APP.t(mF.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.Os.rmSync(d,{force:!0,recursive:!0})})}return $APP.t(function(){var f=TE.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)):lF(b)}],null)],null);try{kF()}catch(a){throw console.error("An error occurred when calling (cherry.internal.cli/init)"),a;};
'use strict';var KE=function(a,b){return $APP.t($APP.t(b)?$APP.Ek.h(b,""):b)?$APP.Rp(a,new $APP.oo(new $APP.no(b,$APP.H(b)))):null},ME=function(a){throw $APP.Bm.h(["Unexpected format: ",$APP.w.g(a)].join(""),new $APP.r(null,1,[LE,a],null));},NE=function(a){var b=JSON.parse(a);return $APP.Gd(b)?b:ME(a)},OE=function(a){var b=JSON.parse(a);return $APP.Kd(b)?b:ME(a)},PE=function(a){var b=JSON.parse(a);return $APP.Ld(b)?b:ME(a)},QE=function(a){var b=JSON.parse(a);return"number"===typeof b?b:ME(a)},RE=
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)},SE=function(a){return $APP.vd(a)?$APP.F(a):a},TE=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=NE(a);else{if($APP.Ba(isNaN(a)))var d=QE(a);else{var e=$APP.I.h(":",b);var f=e?$APP.Th(/:?[a-zA-Z0-9]+/,a):e;d=$APP.t(f)?RE(a):a}c=d}return c}catch(g){return a}else return a},YE=function(a,b){var c=function(){switch(b instanceof $APP.Q?
b.Na:null){case "boolean":return NE;case "int":case "long":return OE;case "double":return PE;case "number":return QE;case "symbol":return $APP.qi;case "keyword":return RE;case "string":return $APP.$d;case "edn":return UE;case "auto":return TE;default:return b}}();if("string"===typeof a){try{var d=c.g?c.g(a):c.call(null,a)}catch(e){d=VE}if($APP.I.h(VE,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,[WE,a,XE,b],null));return d}return a},ZE=function(a,b,c){a=$APP.M.h(a,b);c=$APP.t(a)?a:$APP.vd(c)?$APP.ld(c):null;return $APP.t(c)?$APP.vd(c)?$APP.Jk.h($APP.ke,c):c:null},$E=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},aF=function(a,b,c,d,e){d=$APP.t($APP.t(d)?!$APP.vd(d):d)?YE(e,d):TE(e);return $APP.t(c)?$APP.dl.F(a,b,c,d):$APP.X.j(a,
b,d)},fF=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.M.h(c,bF),f=$APP.M.h(c,cF);c=$APP.M.h(c,$APP.rn);b=$APP.t(e)?$APP.dl.J(b,bF,$APP.X,d,e):b;b=$APP.t(f)?$APP.dl.j(b,dF,function(g){if($APP.Nd(g,f))throw $APP.Bm.h(["Conflicting alias ",$APP.w.g(f)," between ",$APP.w.g($APP.M.h(g,f))," and ",$APP.w.g(d)].join(""),new $APP.r(null,1,[cF,f],null));return $APP.X.j(g,f,d)}):b;return $APP.t(c)?$APP.dl.J(b,eF,$APP.X,d,c):b},$APP.Ke,a)},
sF=function(){var a=process.argv.slice(2),b=new $APP.r(null,1,[dF,new $APP.r(null,1,[gF,hF],null)],null),c=iF.g(b);b=$APP.t(c)?$APP.Bl.l($APP.W.h([b,$APP.t(c)?fF(c):null],0)):b;var d=bF.g(b),e=dF.g(b),f=jF.g(b),g=eF.g(b),h=kF.g(b),l=$APP.I.h(!0,lF.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)}():lF.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,N=$APP.t(h)?mF:null,S=$APP.E(n);;){if($APP.Ba(S))return new $APP.T(null,3,5,$APP.U,[A,B,C],null);var V=$APP.F(S),ja=ZE(f,B,$APP.M.h(d,B)),ua=0<V.length?V.charAt(0):null,tb=$APP.I.h(ua,"-"),Nb=function(){var cd=N;return $APP.t(cd)?cd:tb?mF:null}(),ma=$APP.I.h(":",ua),Tb=$APP.Ek.h(mF,Nb)&&ma&&($APP.Ba(B)||
$APP.I.h(C,B));ua=function(){var cd=Nb;return $APP.t(cd)?cd:Tb?nF:null}();if(tb||Tb){var Ta=(ma=0==V.lastIndexOf("--",0))&&$APP.I.h("--",V);if(Ta){var wd=$APP.G(S);return new $APP.T(null,3,5,$APP.U,[function(){var cd=A;return wd?$APP.Dk.F(cd,$APP.bl,new $APP.T(null,2,5,$APP.U,[oF,pF],null),$APP.Vf(wd)):cd}(),B,C],null)}Ta=ma?$APP.Vh.h(V,2):$APP.Rn(V,/^(:|-|)/,"");ma=ma?$APP.Un(Ta,/=/):new $APP.T(null,1,5,$APP.U,[Ta],null);Ta=$APP.J.j(ma,0,null);ma=$APP.J.j(ma,1,null);Ta=$APP.fi.g(Ta);Ta=$APP.M.j(e,
Ta,Ta);if($APP.t($APP.t(l)?$APP.Ba($APP.M.h(l,Ta)):l))throw $APP.Bm.h(["Unknown option ",$APP.w.g(V)].join(""),new $APP.r(null,1,[lF,l],null));$APP.t(ma)?(B=$E(A,B,C,ja),C=Ta,S=$APP.P(ma,$APP.Hc(S)),A=B,B=C,C=null,N=ua):(B=$E(A,B,C,ja),V=Ta,S=$APP.G(S),A=B,B=V,N=ua)}else{var Ec=$APP.M.h(d,B);if(Ta=$APP.I.h(qF,Ec)&&$APP.Ba(C)&&$APP.Ek.h(V,"true")&&$APP.Ek.h(V,"false")||$APP.I.h(C,B)&&$APP.Ba(ja))return new $APP.T(null,3,5,$APP.U,[$APP.Dk.F(A,$APP.bl,new $APP.T(null,2,5,$APP.U,[oF,pF],null),$APP.Vf(S)),
B,null],null);C=aF(A,B,ja,SE(Ec),V);V=$APP.I.h(nF,ua)&&ma?null:B;ja=$APP.I.h(nF,ua)&&ma?null:B;S=$APP.G(S);A=C;B=V;C=ja;N=ua}}}();b=$APP.J.j(q,0,null);var u=$APP.J.j(q,1,null);q=$APP.J.j(q,2,null);var x=ZE(f,u,$APP.M.h(YE,u));b=$E(b,u,q,x);return $APP.t(a)?$APP.Dk.F(b,$APP.bl,new $APP.T(null,2,5,$APP.U,[oF,rF],null),a):b},uF=function(){var a=sF(),b=oF.g($APP.rd(a));return $APP.X.j(b,tF,$APP.Vj.h(a,oF))},vF=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},zF=function(){var a=wF,b=uF(),c=$APP.Le(b),d=$APP.M.h(c,rF),e=$APP.M.h(c,tF);$APP.Wd.j(function(f,g){f=$APP.Le(g);var h=$APP.M.h(f,rF),l=$APP.M.h(f,$APP.Gr),m=$APP.M.h(f,xF),n=vF(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.Sc(function(){var A=$APP.X.l(c,yF,u,$APP.W.h([tF,x,$APP.fs,h],0));return l.g?l.g(A):l.call(null,A)}())}return null},null,a)},AF=function(a){a=$APP.E(a);for(var b=null,c=0,d=0;;)if(d<c){var e=b.ca(null,d);$APP.cm.l($APP.W.h(["Transpiling CLJS file:",e],0));e=$APP.Zs(new $APP.r(null,1,[$APP.Ws,e],null));e=$APP.Le(e);e=$APP.M.h(e,$APP.Xs);$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.Zs(new $APP.r(null,1,[$APP.Ws,e],null)),b=$APP.Le(b),b=$APP.M.h(b,$APP.Xs),$APP.cm.l($APP.W.h(["Wrote JS file:",b],0)),a=$APP.G(a),b=null,c=0),d=0;else return null},UE=function UE(a){switch(arguments.length){case 1:return UE.g(arguments[0]);case 2:return UE.h(arguments[0],arguments[1]);default:throw Error(["Invalid arity: ",$APP.w.g(arguments.length)].join(""));}};
UE.g=function(a){return KE(new $APP.r(null,3,[$APP.Qp,$APP.pb($APP.BE),$APP.rn,$APP.pb($APP.AE),$APP.Io,null],null),a)};UE.h=function(a,b){return KE($APP.dl.j($APP.Bl.l($APP.W.h([new $APP.r(null,1,[$APP.rn,$APP.pb($APP.AE)],null),a],0)),$APP.Qp,function(c){return $APP.Bl.l($APP.W.h([$APP.pb($APP.BE),c],0))}),b)};UE.v=2;
var iF=new $APP.Q(null,"spec","spec",347520401),qF=new $APP.Q(null,"boolean","boolean",-1919418404),tF=new $APP.Q(null,"opts","opts",155075701),hF=new $APP.Q(null,"help","help",-439233446),XE=new $APP.Q(null,"coerce-fn","coerce-fn",-821146515),kF=new $APP.Q(null,"no-keyword-opts","no-keyword-opts",761286018),yF=new $APP.Q(null,"rest-cmds","rest-cmds",-423198324),nF=new $APP.Q(null,"keywords","keywords",1526959054),rF=new $APP.Q(null,"cmds","cmds",-1841503952),dF=new $APP.Q(null,"aliases","aliases",
1346874714),jF=new $APP.Q(null,"collect","collect",-284321549),oF=new $APP.Q("org.babashka","cli","org.babashka/cli",1162430315),VE=new $APP.Q("babashka.cli","error","babashka.cli/error",-939678701),xF=new $APP.Q(null,"cmds-opts","cmds-opts",-390130362),eF=new $APP.Q(null,"exec-args","exec-args",-1860766354),WE=new $APP.Q(null,"input","input",556931961),bF=new $APP.Q(null,"coerce","coerce",1917884504),BF=new $APP.Q(null,"show","show",-576705889),lF=new $APP.Q(null,"closed","closed",-919675359),gF=
new $APP.Q(null,"h","h",1109658740),CF=new $APP.Q(null,"e","e",1381269198),LE=new $APP.Q(null,"s","s",1705939918),mF=new $APP.Q(null,"hyphens","hyphens",2113533609),cF=new $APP.Q(null,"alias","alias",-2039751630),pF=new $APP.Q(null,"args","args",1315556576);var wF=new $APP.T(null,3,5,$APP.U,[new $APP.r(null,3,[rF,new $APP.T(null,1,5,$APP.U,["run"],null),$APP.Gr,function(a){a=$APP.Le(a);a=$APP.M.h(a,tF);a=$APP.Le(a);a=$APP.M.h(a,$APP.Ao);a=$APP.Zs(new $APP.r(null,1,[$APP.Ws,a],null));a=$APP.Le(a);a=$APP.M.h(a,$APP.Xs);return shadow_esm_import([$APP.w.g(process.cwd()),"/",$APP.w.g(a)].join(""))},xF,new $APP.T(null,1,5,$APP.U,[$APP.Ao],null)],null),new $APP.r(null,2,[rF,new $APP.T(null,1,5,$APP.U,["transpile"],null),$APP.Gr,function(a){a=$APP.Le(a);a=$APP.M.h(a,
yF);return AF(a)}],null),new $APP.r(null,2,[rF,$APP.Uf,$APP.Gr,function(a){a=$APP.Le(a);var b=$APP.M.h(a,yF),c=$APP.M.h(a,tF);a=CF.g(c);if($APP.t(a)){a=$APP.Vs(a);var d=$APP.Ys.mkdtempSync(".tmp"),e=[$APP.w.g(d),"/cherry.mjs"].join("");$APP.Ys.writeFileSync(e,a,"utf-8");$APP.t(BF.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.Ys.rmSync(d,{force:!0,recursive:!0})})}return $APP.t(function(){var f=hF.g(c);return $APP.t(f)?
f:$APP.I.h("help",$APP.F(b))||$APP.ud(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)):AF(b)}],null)],null);try{zF()}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.27",
"version": "0.0.0-alpha.28",
"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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc