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.51 to 0.0.0-alpha.54

42

lib/cli.js
import * as esm_import$fs from "fs";
import { $APP, shadow$provide, $jscomp } from "./compiler.js";
const shadow_esm_import = function(x) { return import(x) };
'use strict';var UI=function(a,b){return $APP.p($APP.p(b)?$APP.Kk.h(b,""):b)?$APP.vr(a,new $APP.Vp(new $APP.Up(b,$APP.D(b)))):null},WI=function(a){throw $APP.Hm.h(["Unexpected format: ",$APP.t.g(a)].join(""),new $APP.m(null,1,[VI,a],null));},XI=function(a){var b=JSON.parse(a);return $APP.Jd(b)?b:WI(a)},YI=function(a){var b=JSON.parse(a);return $APP.Od(b)?b:WI(a)},ZI=function(a){var b=JSON.parse(a);return $APP.Pd(b)?b:WI(a)},$I=function(a){var b=JSON.parse(a);return"number"===typeof b?b:WI(a)},aJ=
function(a){return $APP.F.h(":",0<a.length?a.charAt(0):null)?$APP.ii.g($APP.Zh.h(a,1)):$APP.ii.g(a)},bJ=function(a){return $APP.zd(a)?$APP.A(a):a},cJ=function(a){if("string"===typeof a)try{var b=0<a.length?a.charAt(0):null;if($APP.F.h("true",a)||$APP.F.h("false",a))var c=XI(a);else{if($APP.Da(isNaN(a)))var d=$I(a);else{var e=$APP.F.h(":",b);var f=e?$APP.Xh(/:?[a-zA-Z0-9]+/,a):e;d=$APP.p(f)?aJ(a):a}c=d}return c}catch(g){return a}else return a},hJ=function(a,b){var c=function(){switch(b instanceof $APP.N?
b.Na:null){case "boolean":return XI;case "int":case "long":return YI;case "double":return ZI;case "number":return $I;case "symbol":return $APP.ti;case "keyword":return aJ;case "string":return $APP.de;case "edn":return dJ;case "auto":return cJ;default:return b}}();if("string"===typeof a){try{var d=c.g?c.g(a):c.call(null,a)}catch(e){d=eJ}if($APP.F.h(eJ,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,[fJ,a,gJ,b],null));return d}return a},iJ=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},jJ=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},kJ=function(a,b,c,d,e){d=$APP.p($APP.p(d)?!$APP.zd(d):d)?hJ(e,d):cJ(e);return $APP.p(c)?$APP.jl.D(a,b,c,d):$APP.W.j(a,
b,d)},pJ=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,lJ),f=$APP.J.h(c,mJ);c=$APP.J.h(c,$APP.xn);b=$APP.p(e)?$APP.jl.J(b,lJ,$APP.W,d,e):b;b=$APP.p(f)?$APP.jl.j(b,nJ,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,[mJ,f],null));return $APP.W.j(g,f,d)}):b;return $APP.p(c)?$APP.jl.J(b,oJ,$APP.W,d,c):b},$APP.Pe,a)},
CJ=function(){var a=process.argv.slice(2),b=new $APP.m(null,1,[nJ,new $APP.m(null,1,[qJ,rJ],null)],null),c=sJ.g(b);b=$APP.p(c)?$APP.Hl.l($APP.T.h([b,$APP.p(c)?pJ(c):null],0)):b;var d=lJ.g(b),e=nJ.g(b),f=tJ.g(b),g=oJ.g(b),k=uJ.g(b),l=$APP.F.h(!0,vJ.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)}():vJ.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,G=null,O=$APP.p(k)?wJ:null,S=$APP.z(q);;){if($APP.Da(S))return new $APP.Q(null,3,5,$APP.R,[C,E,G],null);var Y=$APP.A(S),ka=iJ(f,E,$APP.J.h(d,E)),ya=0<Y.length?Y.charAt(0):null,Db=$APP.F.h(ya,"-"),ac=function(){var td=O;return $APP.p(td)?td:Db?wJ:null}(),qa=$APP.F.h(":",ya),jc=$APP.Kk.h(wJ,ac)&&qa&&($APP.Da(E)||$APP.F.h(G,
E));ya=function(){var td=ac;return $APP.p(td)?td:jc?xJ:null}();if(Db||jc){var $a=(qa=0==Y.lastIndexOf("--",0))&&$APP.F.h("--",Y);if($a){var Nd=$APP.B(S);return new $APP.Q(null,3,5,$APP.R,[function(){var td=C;return Nd?$APP.Jk.D(td,$APP.hl,new $APP.Q(null,2,5,$APP.R,[yJ,zJ],null),$APP.U(Nd)):td}(),E,G],null)}$a=qa?$APP.Zh.h(Y,2):$APP.zp(Y,/^(:|-|)/,"");qa=qa?$APP.Ep($a,/=/):new $APP.Q(null,1,5,$APP.R,[$a],null);$a=$APP.H.j(qa,0,null);qa=$APP.H.j(qa,1,null);$a=$APP.ii.g($a);$a=$APP.J.j(e,$a,$a);if($APP.p($APP.p(l)?
$APP.Da($APP.J.h(l,$a)):l))throw $APP.Hm.h(["Unknown option ",$APP.t.g(Y)].join(""),new $APP.m(null,1,[vJ,l],null));$APP.p(qa)?(E=jJ(C,E,G,ka),G=$a,S=$APP.M(qa,$APP.Kc(S)),C=E,E=G,G=null,O=ya):(E=jJ(C,E,G,ka),Y=$a,S=$APP.B(S),C=E,E=Y,O=ya)}else{var Sc=$APP.J.h(d,E);if($a=$APP.F.h(AJ,Sc)&&$APP.Da(G)&&$APP.Kk.h(Y,"true")&&$APP.Kk.h(Y,"false")||$APP.F.h(G,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,[yJ,zJ],null),$APP.U(S)),E,null],null);G=kJ(C,E,
ka,bJ(Sc),Y);Y=$APP.F.h(xJ,ya)&&qa?null:E;ka=$APP.F.h(xJ,ya)&&qa?null:E;S=$APP.B(S);C=G;E=Y;G=ka;O=ya}}}();b=$APP.H.j(r,0,null);var v=$APP.H.j(r,1,null);r=$APP.H.j(r,2,null);var y=iJ(f,v,$APP.J.h(hJ,v));b=jJ(b,v,r,y);return $APP.p(a)?$APP.Jk.D(b,$APP.hl,new $APP.Q(null,2,5,$APP.R,[yJ,BJ],null),a):b},EJ=function(){var a=CJ(),b=yJ.g($APP.vd(a));return $APP.W.j(b,DJ,$APP.Xj.h(a,yJ))},FJ=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.F.h(b,a)?c:null},JJ=
function(){var a=GJ,b=EJ(),c=$APP.Qe(b),d=$APP.J.h(c,BJ),e=$APP.J.h(c,DJ);$APP.$d.j(function(f,g){f=$APP.Qe(g);var k=$APP.J.h(f,BJ),l=$APP.J.h(f,$APP.it),n=$APP.J.h(f,HJ),q=FJ(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,IJ,v,$APP.T.h([DJ,y,$APP.It,k],0));return l.g?l.g(C):l.call(null,C)}())}return null},null,a)},KJ=function(a,b){return 0==b.lastIndexOf("./",0)?$APP.Cp("/",$APP.X.l(new $APP.Q(null,1,5,$APP.R,[process.cwd()],null),$APP.Ih($APP.Dp(a,"/")),$APP.T.h([new $APP.Q(null,1,5,$APP.R,[$APP.Zh.h(b,2)],null)],0))):b},OJ=function(a){var b=LJ.readFileSync(a,"utf-8");b=$APP.Nt($APP.Kt(b));return $APP.Kd(b)&&$APP.F.h($APP.jj,
$APP.A(b))?(b=$APP.z(b),$APP.A(b),b=$APP.B(b),$APP.A(b),b=$APP.B(b),b=$APP.nf(function(c){return $APP.Kd(c)&&$APP.F.h(MJ,$APP.A(c))?$APP.Kc(c):null},b),$APP.p(b)?$APP.$d.j(function(c,d){return c.then(function(){var e=$APP.z(d),f=$APP.A(e);e=$APP.B(e);e=$APP.Qe(e);var g=$APP.J.h(e,$APP.hu);f=KJ(a,f);return(NJ.g?NJ.g(f):NJ.call(null,f)).then(function(k){return $APP.Kh(g,$APP.V.h(function(l){return k[$APP.Gj(l)]},g))}).then(function(k){return $APP.NI=$APP.Hl.l($APP.T.h([$APP.NI,k],0))})})},Promise.resolve(null),
b):null):null},RJ=function(a){a=$APP.Qe(a);var b=$APP.J.h(a,PJ),c=$APP.J.h(a,QJ);return Promise.resolve(OJ(b)).then(function(){return $APP.Bu(LJ.readFileSync(b,"utf-8"),null)}).then(function(d){var e=$APP.Qe(d);d=$APP.J.h(e,$APP.zu);e=$APP.J.h(e,$APP.Au);e=$APP.p(c)?c:$APP.zp(b,/.clj(s|c)$/,$APP.p(e)?".jsx":".mjs");LJ.writeFileSync(e,d,"utf-8");return new $APP.m(null,1,[QJ,e],null)})},SJ=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 RJ(new $APP.m(null,1,[PJ,c],null))}).then(function(d){d=$APP.Qe(d);d=$APP.J.h(d,QJ);$APP.im.l($APP.T.h(["[cherry] Wrote JS file:",d],0));return d})},null,a)},dJ=function dJ(a){switch(arguments.length){case 1:return dJ.g(arguments[0]);case 2:return dJ.h(arguments[0],arguments[1]);default:throw Error(["Invalid arity: ",$APP.t.g(arguments.length)].join(""));}};dJ.g=function(a){return UI(new $APP.m(null,3,[$APP.ur,$APP.tb($APP.JI),$APP.xn,$APP.tb($APP.II),$APP.mq,null],null),a)};
dJ.h=function(a,b){return UI($APP.jl.j($APP.Hl.l($APP.T.h([new $APP.m(null,1,[$APP.xn,$APP.tb($APP.II)],null),a],0)),$APP.ur,function(c){return $APP.Hl.l($APP.T.h([$APP.tb($APP.JI),c],0))}),b)};dJ.o=2;
var sJ=new $APP.N(null,"spec","spec",347520401),AJ=new $APP.N(null,"boolean","boolean",-1919418404),DJ=new $APP.N(null,"opts","opts",155075701),rJ=new $APP.N(null,"help","help",-439233446),gJ=new $APP.N(null,"coerce-fn","coerce-fn",-821146515),uJ=new $APP.N(null,"no-keyword-opts","no-keyword-opts",761286018),IJ=new $APP.N(null,"rest-cmds","rest-cmds",-423198324),xJ=new $APP.N(null,"keywords","keywords",1526959054),BJ=new $APP.N(null,"cmds","cmds",-1841503952),nJ=new $APP.N(null,"aliases","aliases",
1346874714),tJ=new $APP.N(null,"collect","collect",-284321549),PJ=new $APP.N(null,"in-file","in-file",-1682176692),MJ=new $APP.N(null,"require-macros","require-macros",707947416),yJ=new $APP.N("org.babashka","cli","org.babashka/cli",1162430315),eJ=new $APP.N("babashka.cli","error","babashka.cli/error",-939678701),HJ=new $APP.N(null,"cmds-opts","cmds-opts",-390130362),oJ=new $APP.N(null,"exec-args","exec-args",-1860766354),fJ=new $APP.N(null,"input","input",556931961),lJ=new $APP.N(null,"coerce","coerce",
1917884504),TJ=new $APP.N(null,"show","show",-576705889),vJ=new $APP.N(null,"closed","closed",-919675359),qJ=new $APP.N(null,"h","h",1109658740),UJ=new $APP.N(null,"e","e",1381269198),VI=new $APP.N(null,"s","s",1705939918),wJ=new $APP.N(null,"hyphens","hyphens",2113533609),mJ=new $APP.N(null,"alias","alias",-2039751630),zJ=new $APP.N(null,"args","args",1315556576),QJ=new $APP.N(null,"out-file","out-file",-1187066405);var LJ=esm_import$fs;var NJ=eval("(x) \x3d\x3e { return import(x) }");var GJ=new $APP.Q(null,3,5,$APP.R,[new $APP.m(null,3,[BJ,new $APP.Q(null,1,5,$APP.R,["run"],null),$APP.it,function(a){a=$APP.Qe(a);a=$APP.J.h(a,DJ);a=$APP.Qe(a);a=$APP.J.h(a,$APP.Mo);$APP.im.l($APP.T.h(["[cherry] Running",a],0));return RJ(new $APP.m(null,1,[PJ,a],null)).then(function(b){b=$APP.Qe(b);b=$APP.J.h(b,QJ);return shadow_esm_import([$APP.t.g(process.cwd()),"/",$APP.t.g(b)].join(""))})},HJ,new $APP.Q(null,1,5,$APP.R,[$APP.Mo],null)],null),new $APP.m(null,2,[BJ,new $APP.Q(null,1,5,$APP.R,["compile"],
null),$APP.it,function(a){a=$APP.Qe(a);a=$APP.J.h(a,IJ);return SJ(a)}],null),new $APP.m(null,2,[BJ,$APP.Zf,$APP.it,function(a){a=$APP.Qe(a);var b=$APP.J.h(a,IJ),c=$APP.J.h(a,DJ);a=UJ.g(c);if($APP.p(a)){a=$APP.TI.g(a);var d=LJ.mkdtempSync(".tmp"),e=[$APP.t.g(d),"/cherry.mjs"].join("");LJ.writeFileSync(e,a,"utf-8");$APP.p(TJ.g(c))&&$APP.im.l($APP.T.h([a],0));return shadow_esm_import([$APP.t.g(process.cwd()),"/",e].join("")).finally(function(){return LJ.rmSync(d,{force:!0,recursive:!0})})}return $APP.p(function(){var f=
rJ.g(c);return $APP.p(f)?f:$APP.F.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)):SJ(b)}],null)],null);try{JJ()}catch(a){throw console.error("An error occurred when calling (cherry.internal.cli/init)"),a;};
'use strict';var VI=function(a,b){return $APP.p($APP.p(b)?$APP.Kk.h(b,""):b)?$APP.vr(a,new $APP.Vp(new $APP.Up(b,$APP.D(b)))):null},XI=function(a){throw $APP.Hm.h(["Unexpected format: ",$APP.t.g(a)].join(""),new $APP.m(null,1,[WI,a],null));},YI=function(a){var b=JSON.parse(a);return $APP.Jd(b)?b:XI(a)},ZI=function(a){var b=JSON.parse(a);return $APP.Od(b)?b:XI(a)},$I=function(a){var b=JSON.parse(a);return $APP.Pd(b)?b:XI(a)},aJ=function(a){var b=JSON.parse(a);return"number"===typeof b?b:XI(a)},bJ=
function(a){return $APP.F.h(":",0<a.length?a.charAt(0):null)?$APP.ii.g($APP.Zh.h(a,1)):$APP.ii.g(a)},cJ=function(a){return $APP.zd(a)?$APP.A(a):a},dJ=function(a){if("string"===typeof a)try{var b=0<a.length?a.charAt(0):null;if($APP.F.h("true",a)||$APP.F.h("false",a))var c=YI(a);else{if($APP.Da(isNaN(a)))var d=aJ(a);else{var e=$APP.F.h(":",b);var f=e?$APP.Xh(/:?[a-zA-Z0-9]+/,a):e;d=$APP.p(f)?bJ(a):a}c=d}return c}catch(g){return a}else return a},iJ=function(a,b){var c=function(){switch(b instanceof $APP.N?
b.La:null){case "boolean":return YI;case "int":case "long":return ZI;case "double":return $I;case "number":return aJ;case "symbol":return $APP.ti;case "keyword":return bJ;case "string":return $APP.de;case "edn":return eJ;case "auto":return dJ;default:return b}}();if("string"===typeof a){try{var d=c.g?c.g(a):c.call(null,a)}catch(e){d=fJ}if($APP.F.h(fJ,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,[gJ,a,hJ,b],null));return d}return a},jJ=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},kJ=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},lJ=function(a,b,c,d,e){d=$APP.p($APP.p(d)?!$APP.zd(d):d)?iJ(e,d):dJ(e);return $APP.p(c)?$APP.jl.D(a,b,c,d):$APP.W.j(a,
b,d)},qJ=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,mJ),f=$APP.J.h(c,nJ);c=$APP.J.h(c,$APP.xn);b=$APP.p(e)?$APP.jl.J(b,mJ,$APP.W,d,e):b;b=$APP.p(f)?$APP.jl.j(b,oJ,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,[nJ,f],null));return $APP.W.j(g,f,d)}):b;return $APP.p(c)?$APP.jl.J(b,pJ,$APP.W,d,c):b},$APP.Pe,a)},
DJ=function(){var a=process.argv.slice(2),b=new $APP.m(null,1,[oJ,new $APP.m(null,1,[rJ,sJ],null)],null),c=tJ.g(b);b=$APP.p(c)?$APP.Hl.l($APP.T.h([b,$APP.p(c)?qJ(c):null],0)):b;var d=mJ.g(b),e=oJ.g(b),f=uJ.g(b),g=pJ.g(b),k=vJ.g(b),l=$APP.F.h(!0,wJ.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)}():wJ.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,G=null,O=$APP.p(k)?xJ:null,S=$APP.z(q);;){if($APP.Da(S))return new $APP.Q(null,3,5,$APP.R,[C,E,G],null);var Y=$APP.A(S),ka=jJ(f,E,$APP.J.h(d,E)),ya=0<Y.length?Y.charAt(0):null,Db=$APP.F.h(ya,"-"),ac=function(){var td=O;return $APP.p(td)?td:Db?xJ:null}(),qa=$APP.F.h(":",ya),jc=$APP.Kk.h(xJ,ac)&&qa&&($APP.Da(E)||$APP.F.h(G,
E));ya=function(){var td=ac;return $APP.p(td)?td:jc?yJ:null}();if(Db||jc){var $a=(qa=0==Y.lastIndexOf("--",0))&&$APP.F.h("--",Y);if($a){var Nd=$APP.B(S);return new $APP.Q(null,3,5,$APP.R,[function(){var td=C;return Nd?$APP.Jk.D(td,$APP.hl,new $APP.Q(null,2,5,$APP.R,[zJ,AJ],null),$APP.U(Nd)):td}(),E,G],null)}$a=qa?$APP.Zh.h(Y,2):$APP.zp(Y,/^(:|-|)/,"");qa=qa?$APP.Ep($a,/=/):new $APP.Q(null,1,5,$APP.R,[$a],null);$a=$APP.H.j(qa,0,null);qa=$APP.H.j(qa,1,null);$a=$APP.ii.g($a);$a=$APP.J.j(e,$a,$a);if($APP.p($APP.p(l)?
$APP.Da($APP.J.h(l,$a)):l))throw $APP.Hm.h(["Unknown option ",$APP.t.g(Y)].join(""),new $APP.m(null,1,[wJ,l],null));$APP.p(qa)?(E=kJ(C,E,G,ka),G=$a,S=$APP.M(qa,$APP.Kc(S)),C=E,E=G,G=null,O=ya):(E=kJ(C,E,G,ka),Y=$a,S=$APP.B(S),C=E,E=Y,O=ya)}else{var Sc=$APP.J.h(d,E);if($a=$APP.F.h(BJ,Sc)&&$APP.Da(G)&&$APP.Kk.h(Y,"true")&&$APP.Kk.h(Y,"false")||$APP.F.h(G,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,[zJ,AJ],null),$APP.U(S)),E,null],null);G=lJ(C,E,
ka,cJ(Sc),Y);Y=$APP.F.h(yJ,ya)&&qa?null:E;ka=$APP.F.h(yJ,ya)&&qa?null:E;S=$APP.B(S);C=G;E=Y;G=ka;O=ya}}}();b=$APP.H.j(r,0,null);var v=$APP.H.j(r,1,null);r=$APP.H.j(r,2,null);var y=jJ(f,v,$APP.J.h(iJ,v));b=kJ(b,v,r,y);return $APP.p(a)?$APP.Jk.D(b,$APP.hl,new $APP.Q(null,2,5,$APP.R,[zJ,CJ],null),a):b},FJ=function(){var a=DJ(),b=zJ.g($APP.vd(a));return $APP.W.j(b,EJ,$APP.Xj.h(a,zJ))},GJ=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.F.h(b,a)?c:null},KJ=
function(){var a=HJ,b=FJ(),c=$APP.Qe(b),d=$APP.J.h(c,CJ),e=$APP.J.h(c,EJ);$APP.$d.j(function(f,g){f=$APP.Qe(g);var k=$APP.J.h(f,CJ),l=$APP.J.h(f,$APP.it),n=$APP.J.h(f,IJ),q=GJ(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,JJ,v,$APP.T.h([EJ,y,$APP.It,k],0));return l.g?l.g(C):l.call(null,C)}())}return null},null,a)},LJ=function(a,b){return 0==b.lastIndexOf("./",0)?$APP.Cp("/",$APP.X.l(new $APP.Q(null,1,5,$APP.R,[process.cwd()],null),$APP.Ih($APP.Dp(a,"/")),$APP.T.h([new $APP.Q(null,1,5,$APP.R,[$APP.Zh.h(b,2)],null)],0))):b},PJ=function(a){var b=MJ.readFileSync(a,"utf-8");b=$APP.Mt($APP.Kt(b),$APP.qu);return $APP.Kd(b)&&$APP.F.h($APP.jj,
$APP.A(b))?(b=$APP.z(b),$APP.A(b),b=$APP.B(b),$APP.A(b),b=$APP.B(b),b=$APP.nf(function(c){return $APP.Kd(c)&&$APP.F.h(NJ,$APP.A(c))?$APP.Kc(c):null},b),$APP.p(b)?$APP.$d.j(function(c,d){return c.then(function(){var e=$APP.z(d),f=$APP.A(e);e=$APP.B(e);e=$APP.Qe(e);var g=$APP.J.h(e,$APP.gu);f=LJ(a,f);return(OJ.g?OJ.g(f):OJ.call(null,f)).then(function(k){return $APP.Kh(g,$APP.V.h(function(l){return k[$APP.Gj(l)]},g))}).then(function(k){return $APP.OI=$APP.Hl.l($APP.T.h([$APP.OI,k],0))})})},Promise.resolve(null),
b):null):null},SJ=function(a){a=$APP.Qe(a);var b=$APP.J.h(a,QJ),c=$APP.J.h(a,RJ);return Promise.resolve(PJ(b)).then(function(){return $APP.Cu(MJ.readFileSync(b,"utf-8"),null)}).then(function(d){var e=$APP.Qe(d);d=$APP.J.h(e,$APP.Au);e=$APP.J.h(e,$APP.Bu);e=$APP.p(c)?c:$APP.zp(b,/.clj(s|c)$/,$APP.p(e)?".jsx":".mjs");MJ.writeFileSync(e,d,"utf-8");return new $APP.m(null,1,[RJ,e],null)})},TJ=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 SJ(new $APP.m(null,1,[QJ,c],null))}).then(function(d){d=$APP.Qe(d);d=$APP.J.h(d,RJ);$APP.im.l($APP.T.h(["[cherry] Wrote JS file:",d],0));return d})},null,a)},eJ=function eJ(a){switch(arguments.length){case 1:return eJ.g(arguments[0]);case 2:return eJ.h(arguments[0],arguments[1]);default:throw Error(["Invalid arity: ",$APP.t.g(arguments.length)].join(""));}};eJ.g=function(a){return VI(new $APP.m(null,3,[$APP.ur,$APP.tb($APP.KI),$APP.xn,$APP.tb($APP.JI),$APP.mq,null],null),a)};
eJ.h=function(a,b){return VI($APP.jl.j($APP.Hl.l($APP.T.h([new $APP.m(null,1,[$APP.xn,$APP.tb($APP.JI)],null),a],0)),$APP.ur,function(c){return $APP.Hl.l($APP.T.h([$APP.tb($APP.KI),c],0))}),b)};eJ.o=2;
var tJ=new $APP.N(null,"spec","spec",347520401),BJ=new $APP.N(null,"boolean","boolean",-1919418404),EJ=new $APP.N(null,"opts","opts",155075701),sJ=new $APP.N(null,"help","help",-439233446),hJ=new $APP.N(null,"coerce-fn","coerce-fn",-821146515),vJ=new $APP.N(null,"no-keyword-opts","no-keyword-opts",761286018),JJ=new $APP.N(null,"rest-cmds","rest-cmds",-423198324),yJ=new $APP.N(null,"keywords","keywords",1526959054),CJ=new $APP.N(null,"cmds","cmds",-1841503952),oJ=new $APP.N(null,"aliases","aliases",
1346874714),uJ=new $APP.N(null,"collect","collect",-284321549),QJ=new $APP.N(null,"in-file","in-file",-1682176692),NJ=new $APP.N(null,"require-macros","require-macros",707947416),zJ=new $APP.N("org.babashka","cli","org.babashka/cli",1162430315),fJ=new $APP.N("babashka.cli","error","babashka.cli/error",-939678701),IJ=new $APP.N(null,"cmds-opts","cmds-opts",-390130362),pJ=new $APP.N(null,"exec-args","exec-args",-1860766354),gJ=new $APP.N(null,"input","input",556931961),mJ=new $APP.N(null,"coerce","coerce",
1917884504),UJ=new $APP.N(null,"show","show",-576705889),wJ=new $APP.N(null,"closed","closed",-919675359),rJ=new $APP.N(null,"h","h",1109658740),VJ=new $APP.N(null,"e","e",1381269198),WI=new $APP.N(null,"s","s",1705939918),xJ=new $APP.N(null,"hyphens","hyphens",2113533609),nJ=new $APP.N(null,"alias","alias",-2039751630),AJ=new $APP.N(null,"args","args",1315556576),RJ=new $APP.N(null,"out-file","out-file",-1187066405);var MJ=esm_import$fs;var OJ=eval("(x) \x3d\x3e { return import(x) }");var HJ=new $APP.Q(null,3,5,$APP.R,[new $APP.m(null,3,[CJ,new $APP.Q(null,1,5,$APP.R,["run"],null),$APP.it,function(a){a=$APP.Qe(a);a=$APP.J.h(a,EJ);a=$APP.Qe(a);a=$APP.J.h(a,$APP.Mo);$APP.im.l($APP.T.h(["[cherry] Running",a],0));return SJ(new $APP.m(null,1,[QJ,a],null)).then(function(b){b=$APP.Qe(b);b=$APP.J.h(b,RJ);return shadow_esm_import([$APP.t.g(process.cwd()),"/",$APP.t.g(b)].join(""))})},IJ,new $APP.Q(null,1,5,$APP.R,[$APP.Mo],null)],null),new $APP.m(null,2,[CJ,new $APP.Q(null,1,5,$APP.R,["compile"],
null),$APP.it,function(a){a=$APP.Qe(a);a=$APP.J.h(a,JJ);return TJ(a)}],null),new $APP.m(null,2,[CJ,$APP.Zf,$APP.it,function(a){a=$APP.Qe(a);var b=$APP.J.h(a,JJ),c=$APP.J.h(a,EJ);a=VJ.g(c);if($APP.p(a)){a=$APP.UI.g(a);var d=MJ.mkdtempSync(".tmp"),e=[$APP.t.g(d),"/cherry.mjs"].join("");MJ.writeFileSync(e,a,"utf-8");$APP.p(UJ.g(c))&&$APP.im.l($APP.T.h([a],0));return shadow_esm_import([$APP.t.g(process.cwd()),"/",e].join("")).finally(function(){return MJ.rmSync(d,{force:!0,recursive:!0})})}return $APP.p(function(){var f=
sJ.g(c);return $APP.p(f)?f:$APP.F.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)):TJ(b)}],null)],null);try{KJ()}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.51",
"version": "0.0.0-alpha.54",
"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