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.49 to 0.0.0-alpha.50

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 LI=function(a,b){return $APP.q($APP.q(b)?$APP.Kk.h(b,""):b)?$APP.vr(a,new $APP.Vp(new $APP.Up(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.q(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.q(a)?a:$APP.zd(c)?$APP.od(c):null;return $APP.q(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.q(d)?d.h?d.h(e,!0):d.call(null,e,!0):!0:$APP.q(d)?d.h?d.h(e,!0):d.call(null,e,!0):e}):a},bJ=function(a,b,c,d,e){d=$APP.q($APP.q(d)?!$APP.zd(d):d)?ZI(e,d):UI(e);return $APP.q(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.q(e)?$APP.jl.J(b,cJ,$APP.W,d,e):b;b=$APP.q(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.q(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.q(c)?$APP.Hl.l($APP.T.h([b,$APP.q(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.q(k)?null:0==C.lastIndexOf(":",0);return!($APP.q(E)?E:0==
C.lastIndexOf("-",0))},a);var n=$APP.H.j(a,0,null),p=$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.q(g)?g:$APP.Pe,E=null,F=null,O=$APP.q(k)?nJ:null,S=$APP.z(p);;){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)),xa=0<Y.length?Y.charAt(0):null,Db=$APP.G.h(xa,"-"),ac=function(){var rd=O;return $APP.q(rd)?rd:Db?nJ:null}(),pa=$APP.G.h(":",xa),ic=$APP.Kk.h(nJ,ac)&&pa&&($APP.Da(E)||$APP.G.h(F,
E));xa=function(){var rd=ac;return $APP.q(rd)?rd:ic?oJ:null}();if(Db||ic){var Ya=(pa=0==Y.lastIndexOf("--",0))&&$APP.G.h("--",Y);if(Ya){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)}Ya=pa?$APP.Zh.h(Y,2):$APP.zp(Y,/^(:|-|)/,"");pa=pa?$APP.Ep(Ya,/=/):new $APP.Q(null,1,5,$APP.R,[Ya],null);Ya=$APP.H.j(pa,0,null);pa=$APP.H.j(pa,1,null);Ya=$APP.ii.g(Ya);Ya=$APP.J.j(e,Ya,Ya);if($APP.q($APP.q(l)?
$APP.Da($APP.J.h(l,Ya)):l))throw $APP.Hm.h(["Unknown option ",$APP.t.g(Y)].join(""),new $APP.m(null,1,[mJ,l],null));$APP.q(pa)?(E=aJ(C,E,F,ka),F=Ya,S=$APP.M(pa,$APP.Kc(S)),C=E,E=F,F=null,O=xa):(E=aJ(C,E,F,ka),Y=Ya,S=$APP.B(S),C=E,E=Y,O=xa)}else{var Rc=$APP.J.h(d,E);if(Ya=$APP.G.h(rJ,Rc)&&$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(Rc),Y);Y=$APP.G.h(oJ,xa)&&pa?null:E;ka=$APP.G.h(oJ,xa)&&pa?null:E;S=$APP.B(S);C=F;E=Y;F=ka;O=xa}}}();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.q(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.Xj.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.it),n=$APP.J.h(f,yJ),p=wJ(k,d);if($APP.q(p)){var r=function(){var C=null==p?null:$APP.z(p);return null==C?null:$APP.U(C)}();f=$APP.q($APP.q(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.q(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.It,k],0));return l.g?l.g(C):l.call(null,C)}())}return null},null,a)},BJ=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},FJ=function(a){var b=CJ.readFileSync(a,"utf-8");b=$APP.Nt($APP.Kt(b));return $APP.Kd(b)&&$APP.G.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.G.h(DJ,$APP.A(c))?$APP.Kc(c):null},b),$APP.q(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=BJ(a,f);return(EJ.g?EJ.g(f):EJ.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.FI=$APP.Hl.l($APP.T.h([$APP.FI,k],0))})})},Promise.resolve(null),
b):null):null},IJ=function(a){a=$APP.Qe(a);var b=$APP.J.h(a,GJ);a=$APP.J.h(a,HJ);var c=$APP.q(a)?a:$APP.zp(b,/.clj(s|c)$/,".mjs");return Promise.resolve(FJ(b)).then(function(){return $APP.KI.g(CJ.readFileSync(b,"utf-8"))}).then(function(d){CJ.writeFileSync(c,d,"utf-8");return new $APP.m(null,1,[HJ,c],null)})},JJ=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 IJ(new $APP.m(null,1,[GJ,c],null))}).then(function(d){d=
$APP.Qe(d);d=$APP.J.h(d,HJ);$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.ur,$APP.tb($APP.BI),$APP.xn,$APP.tb($APP.AI),$APP.mq,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.AI)],null),a],0)),$APP.ur,function(c){return $APP.Hl.l($APP.T.h([$APP.tb($APP.BI),c],0))}),b)};VI.o=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),GJ=new $APP.N(null,"in-file","in-file",-1682176692),DJ=new $APP.N(null,"require-macros","require-macros",707947416),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),KJ=new $APP.N(null,"show","show",-576705889),mJ=new $APP.N(null,"closed","closed",-919675359),hJ=new $APP.N(null,"h","h",1109658740),LJ=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),HJ=new $APP.N(null,"out-file","out-file",-1187066405);var CJ=esm_import$fs;var EJ=eval("(x) \x3d\x3e { return import(x) }");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.it,function(a){a=$APP.Qe(a);a=$APP.J.h(a,uJ);a=$APP.Qe(a);a=$APP.J.h(a,$APP.Mo);$APP.im.l($APP.T.h(["[cherry] Running",a],0));return IJ(new $APP.m(null,1,[GJ,a],null)).then(function(b){b=$APP.Qe(b);b=$APP.J.h(b,HJ);return shadow_esm_import([$APP.t.g(process.cwd()),"/",$APP.t.g(b)].join(""))})},yJ,new $APP.Q(null,1,5,$APP.R,[$APP.Mo],null)],null),new $APP.m(null,2,[sJ,new $APP.Q(null,1,5,$APP.R,["compile"],
null),$APP.it,function(a){a=$APP.Qe(a);a=$APP.J.h(a,zJ);return JJ(a)}],null),new $APP.m(null,2,[sJ,$APP.Zf,$APP.it,function(a){a=$APP.Qe(a);var b=$APP.J.h(a,zJ),c=$APP.J.h(a,uJ);a=LJ.g(c);if($APP.q(a)){a=$APP.KI.g(a);var d=CJ.mkdtempSync(".tmp"),e=[$APP.t.g(d),"/cherry.mjs"].join("");CJ.writeFileSync(e,a,"utf-8");$APP.q(KJ.g(c))&&$APP.im.l($APP.T.h([a],0));return shadow_esm_import([$APP.t.g(process.cwd()),"/",e].join("")).finally(function(){return CJ.rmSync(d,{force:!0,recursive:!0})})}return $APP.q(function(){var f=
iJ.g(c);return $APP.q(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)):JJ(b)}],null)],null);try{AJ()}catch(a){throw console.error("An error occurred when calling (cherry.internal.cli/init)"),a;};
'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;};
export { $APP, shadow$provide, $jscomp };

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

"sideEffects": false,
"version": "0.0.0-alpha.49",
"version": "0.0.0-alpha.50",
"files": [

@@ -8,0 +8,0 @@ "cljs.core.js",

@@ -49,2 +49,3 @@ ## Cherry :cherries:

- [playground](https://borkdude.github.io/cherry/)
- [wordle](https://borkdude.github.io/cherry/examples/wordle/index.html)

@@ -83,2 +84,3 @@ - [react](https://borkdude.github.io/cherry/examples/react/index.html)

- Native support for JS object destructuring: `[^:js {:keys [a b]} #js {:a 1 :b 2}]`
- Native support for JSX via `#jsx` reader tag

@@ -85,0 +87,0 @@ Cherry may introduce new constructs such as `js/await` which won't be compatible

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