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.26 to 0.0.0-alpha.27

38

lib/cli.js
import { $APP, shadow$provide, $jscomp } from "./transpiler.js";
const shadow_esm_import = function(x) { return import(x) };
'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;};
'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;};
export { $APP, shadow$provide, $jscomp };

@@ -5,3 +5,3 @@ {

"sideEffects": false,
"version": "0.0.0-alpha.26",
"version": "0.0.0-alpha.27",
"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