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.46 to 0.0.0-alpha.47

11

index.js

@@ -1,10 +0,1 @@

import { transpileFile as t} from './lib/transpiler.js'
import { js__GT_clj, keyword, clj__GT_js, str } from './cljs.core.js'
function transpileFile({ inFile }) {
const resClj = t(js__GT_clj({"in-file": inFile}, keyword("keywordize-keys"), true));
const resJ = clj__GT_js(resClj);
return { outFile: resJ["out-file"]};
}
export { transpileFile }
export { compileString } from 'lib/compiler.js'

40

lib/cli.js
import { $APP, shadow$provide, $jscomp } from "./compiler.js";
const shadow_esm_import = function(x) { return import(x) };
'use strict';var TI=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},VI=function(a){throw $APP.Hm.h(["Unexpected format: ",$APP.t.g(a)].join(""),new $APP.m(null,1,[UI,a],null));},WI=function(a){var b=JSON.parse(a);return $APP.Jd(b)?b:VI(a)},XI=function(a){var b=JSON.parse(a);return $APP.Od(b)?b:VI(a)},YI=function(a){var b=JSON.parse(a);return $APP.Pd(b)?b:VI(a)},ZI=function(a){var b=JSON.parse(a);return"number"===typeof b?b:VI(a)},$I=
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)},aJ=function(a){return $APP.zd(a)?$APP.A(a):a},bJ=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=WI(a);else{if($APP.Da(isNaN(a)))var d=ZI(a);else{var e=$APP.G.h(":",b);var f=e?$APP.Xh(/:?[a-zA-Z0-9]+/,a):e;d=$APP.q(f)?$I(a):a}c=d}return c}catch(g){return a}else return a},gJ=function(a,b){var c=function(){switch(b instanceof $APP.N?
b.Na:null){case "boolean":return WI;case "int":case "long":return XI;case "double":return YI;case "number":return ZI;case "symbol":return $APP.ti;case "keyword":return $I;case "string":return $APP.de;case "edn":return cJ;case "auto":return bJ;default:return b}}();if("string"===typeof a){try{var d=c.g?c.g(a):c.call(null,a)}catch(e){d=dJ}if($APP.G.h(dJ,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,[eJ,a,fJ,b],null));return d}return a},hJ=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},iJ=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},jJ=function(a,b,c,d,e){d=$APP.q($APP.q(d)?!$APP.zd(d):d)?gJ(e,d):bJ(e);return $APP.q(c)?$APP.jl.D(a,b,c,d):$APP.W.j(a,
b,d)},oJ=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,kJ),f=$APP.J.h(c,lJ);c=$APP.J.h(c,$APP.xn);b=$APP.q(e)?$APP.jl.J(b,kJ,$APP.W,d,e):b;b=$APP.q(f)?$APP.jl.j(b,mJ,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,[lJ,f],null));return $APP.W.j(g,f,d)}):b;return $APP.q(c)?$APP.jl.J(b,nJ,$APP.W,d,c):b},$APP.Pe,a)},
BJ=function(){var a=process.argv.slice(2),b=new $APP.m(null,1,[mJ,new $APP.m(null,1,[pJ,qJ],null)],null),c=rJ.g(b);b=$APP.q(c)?$APP.Hl.l($APP.T.h([b,$APP.q(c)?oJ(c):null],0)):b;var d=kJ.g(b),e=mJ.g(b),f=sJ.g(b),g=nJ.g(b),k=tJ.g(b),l=$APP.G.h(!0,uJ.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)}():uJ.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)?vJ: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=hJ(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?vJ:null}(),pa=$APP.G.h(":",xa),ic=$APP.Kk.h(vJ,ac)&&pa&&($APP.Da(E)||$APP.G.h(F,
E));xa=function(){var rd=ac;return $APP.q(rd)?rd:ic?wJ: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,[xJ,yJ],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,[uJ,l],null));$APP.q(pa)?(E=iJ(C,E,F,ka),F=Ya,S=$APP.M(pa,$APP.Kc(S)),C=E,E=F,F=null,O=xa):(E=iJ(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(zJ,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,[xJ,yJ],null),$APP.U(S)),E,null],null);F=jJ(C,E,
ka,aJ(Rc),Y);Y=$APP.G.h(wJ,xa)&&pa?null:E;ka=$APP.G.h(wJ,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=hJ(f,v,$APP.J.h(gJ,v));b=iJ(b,v,r,y);return $APP.q(a)?$APP.Jk.D(b,$APP.hl,new $APP.Q(null,2,5,$APP.R,[xJ,AJ],null),a):b},DJ=function(){var a=BJ(),b=xJ.g($APP.vd(a));return $APP.W.j(b,CJ,$APP.Xj.h(a,xJ))},EJ=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},IJ=
function(){var a=FJ,b=DJ(),c=$APP.Qe(b),d=$APP.J.h(c,AJ),e=$APP.J.h(c,CJ);$APP.$d.j(function(f,g){f=$APP.Qe(g);var k=$APP.J.h(f,AJ),l=$APP.J.h(f,$APP.it),n=$APP.J.h(f,GJ),p=EJ(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,HJ,v,$APP.T.h([CJ,y,$APP.It,k],0));return l.g?l.g(C):l.call(null,C)}())}return null},null,a)},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 $APP.Gu(new $APP.m(null,1,[$APP.Eu,c],null))}).then(function(d){d=$APP.Qe(d);d=$APP.J.h(d,$APP.Fu);$APP.im.l($APP.T.h(["[cherry] Wrote JS file:",d],0));return d})},
null,a)},cJ=function cJ(a){switch(arguments.length){case 1:return cJ.g(arguments[0]);case 2:return cJ.h(arguments[0],arguments[1]);default:throw Error(["Invalid arity: ",$APP.t.g(arguments.length)].join(""));}};cJ.g=function(a){return TI(new $APP.m(null,3,[$APP.ur,$APP.tb($APP.LI),$APP.xn,$APP.tb($APP.KI),$APP.mq,null],null),a)};
cJ.h=function(a,b){return TI($APP.jl.j($APP.Hl.l($APP.T.h([new $APP.m(null,1,[$APP.xn,$APP.tb($APP.KI)],null),a],0)),$APP.ur,function(c){return $APP.Hl.l($APP.T.h([$APP.tb($APP.LI),c],0))}),b)};cJ.o=2;
var rJ=new $APP.N(null,"spec","spec",347520401),zJ=new $APP.N(null,"boolean","boolean",-1919418404),CJ=new $APP.N(null,"opts","opts",155075701),qJ=new $APP.N(null,"help","help",-439233446),fJ=new $APP.N(null,"coerce-fn","coerce-fn",-821146515),tJ=new $APP.N(null,"no-keyword-opts","no-keyword-opts",761286018),HJ=new $APP.N(null,"rest-cmds","rest-cmds",-423198324),wJ=new $APP.N(null,"keywords","keywords",1526959054),AJ=new $APP.N(null,"cmds","cmds",-1841503952),mJ=new $APP.N(null,"aliases","aliases",
1346874714),sJ=new $APP.N(null,"collect","collect",-284321549),xJ=new $APP.N("org.babashka","cli","org.babashka/cli",1162430315),dJ=new $APP.N("babashka.cli","error","babashka.cli/error",-939678701),GJ=new $APP.N(null,"cmds-opts","cmds-opts",-390130362),nJ=new $APP.N(null,"exec-args","exec-args",-1860766354),eJ=new $APP.N(null,"input","input",556931961),kJ=new $APP.N(null,"coerce","coerce",1917884504),KJ=new $APP.N(null,"show","show",-576705889),uJ=new $APP.N(null,"closed","closed",-919675359),pJ=
new $APP.N(null,"h","h",1109658740),LJ=new $APP.N(null,"e","e",1381269198),UI=new $APP.N(null,"s","s",1705939918),vJ=new $APP.N(null,"hyphens","hyphens",2113533609),lJ=new $APP.N(null,"alias","alias",-2039751630),yJ=new $APP.N(null,"args","args",1315556576);var FJ=new $APP.Q(null,3,5,$APP.R,[new $APP.m(null,3,[AJ,new $APP.Q(null,1,5,$APP.R,["run"],null),$APP.it,function(a){a=$APP.Qe(a);a=$APP.J.h(a,CJ);a=$APP.Qe(a);a=$APP.J.h(a,$APP.Mo);$APP.im.l($APP.T.h(["[cherry] Running",a],0));return $APP.Gu(new $APP.m(null,1,[$APP.Eu,a],null)).then(function(b){b=$APP.Qe(b);b=$APP.J.h(b,$APP.Fu);return shadow_esm_import([$APP.t.g(process.cwd()),"/",$APP.t.g(b)].join(""))})},GJ,new $APP.Q(null,1,5,$APP.R,[$APP.Mo],null)],null),new $APP.m(null,2,[AJ,new $APP.Q(null,
1,5,$APP.R,["compile"],null),$APP.it,function(a){a=$APP.Qe(a);a=$APP.J.h(a,HJ);return JJ(a)}],null),new $APP.m(null,2,[AJ,$APP.Zf,$APP.it,function(a){a=$APP.Qe(a);var b=$APP.J.h(a,HJ),c=$APP.J.h(a,CJ);a=LJ.g(c);if($APP.q(a)){a=$APP.xu(a);var d=$APP.zu.mkdtempSync(".tmp"),e=[$APP.t.g(d),"/cherry.mjs"].join("");$APP.zu.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 $APP.zu.rmSync(d,{force:!0,
recursive:!0})})}return $APP.q(function(){var f=qJ.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{IJ()}catch(a){throw console.error("An error occurred when calling (cherry.internal.cli/init)"),a;};
'use strict';var MI=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},OI=function(a){throw $APP.Hm.h(["Unexpected format: ",$APP.t.g(a)].join(""),new $APP.m(null,1,[NI,a],null));},PI=function(a){var b=JSON.parse(a);return $APP.Jd(b)?b:OI(a)},QI=function(a){var b=JSON.parse(a);return $APP.Od(b)?b:OI(a)},RI=function(a){var b=JSON.parse(a);return $APP.Pd(b)?b:OI(a)},SI=function(a){var b=JSON.parse(a);return"number"===typeof b?b:OI(a)},TI=
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)},UI=function(a){return $APP.zd(a)?$APP.A(a):a},VI=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=PI(a);else{if($APP.Da(isNaN(a)))var d=SI(a);else{var e=$APP.G.h(":",b);var f=e?$APP.Xh(/:?[a-zA-Z0-9]+/,a):e;d=$APP.q(f)?TI(a):a}c=d}return c}catch(g){return a}else return a},$I=function(a,b){var c=function(){switch(b instanceof $APP.N?
b.Na:null){case "boolean":return PI;case "int":case "long":return QI;case "double":return RI;case "number":return SI;case "symbol":return $APP.ti;case "keyword":return TI;case "string":return $APP.de;case "edn":return WI;case "auto":return VI;default:return b}}();if("string"===typeof a){try{var d=c.g?c.g(a):c.call(null,a)}catch(e){d=XI}if($APP.G.h(XI,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,[YI,a,ZI,b],null));return d}return a},aJ=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},bJ=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},cJ=function(a,b,c,d,e){d=$APP.q($APP.q(d)?!$APP.zd(d):d)?$I(e,d):VI(e);return $APP.q(c)?$APP.jl.D(a,b,c,d):$APP.W.j(a,
b,d)},hJ=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,dJ),f=$APP.J.h(c,eJ);c=$APP.J.h(c,$APP.xn);b=$APP.q(e)?$APP.jl.J(b,dJ,$APP.W,d,e):b;b=$APP.q(f)?$APP.jl.j(b,fJ,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,[eJ,f],null));return $APP.W.j(g,f,d)}):b;return $APP.q(c)?$APP.jl.J(b,gJ,$APP.W,d,c):b},$APP.Pe,a)},
uJ=function(){var a=process.argv.slice(2),b=new $APP.m(null,1,[fJ,new $APP.m(null,1,[iJ,jJ],null)],null),c=kJ.g(b);b=$APP.q(c)?$APP.Hl.l($APP.T.h([b,$APP.q(c)?hJ(c):null],0)):b;var d=dJ.g(b),e=fJ.g(b),f=lJ.g(b),g=gJ.g(b),k=mJ.g(b),l=$APP.G.h(!0,nJ.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)}():nJ.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)?oJ: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=aJ(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?oJ:null}(),pa=$APP.G.h(":",xa),ic=$APP.Kk.h(oJ,ac)&&pa&&($APP.Da(E)||$APP.G.h(F,
E));xa=function(){var rd=ac;return $APP.q(rd)?rd:ic?pJ: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,[qJ,rJ],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,[nJ,l],null));$APP.q(pa)?(E=bJ(C,E,F,ka),F=Ya,S=$APP.M(pa,$APP.Kc(S)),C=E,E=F,F=null,O=xa):(E=bJ(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(sJ,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,[qJ,rJ],null),$APP.U(S)),E,null],null);F=cJ(C,E,
ka,UI(Rc),Y);Y=$APP.G.h(pJ,xa)&&pa?null:E;ka=$APP.G.h(pJ,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=aJ(f,v,$APP.J.h($I,v));b=bJ(b,v,r,y);return $APP.q(a)?$APP.Jk.D(b,$APP.hl,new $APP.Q(null,2,5,$APP.R,[qJ,tJ],null),a):b},wJ=function(){var a=uJ(),b=qJ.g($APP.vd(a));return $APP.W.j(b,vJ,$APP.Xj.h(a,qJ))},xJ=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},BJ=
function(){var a=yJ,b=wJ(),c=$APP.Qe(b),d=$APP.J.h(c,tJ),e=$APP.J.h(c,vJ);$APP.$d.j(function(f,g){f=$APP.Qe(g);var k=$APP.J.h(f,tJ),l=$APP.J.h(f,$APP.it),n=$APP.J.h(f,zJ),p=xJ(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,AJ,v,$APP.T.h([vJ,y,$APP.It,k],0));return l.g?l.g(C):l.call(null,C)}())}return null},null,a)},CJ=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=$APP.OH.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=CJ(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.GI=$APP.Hl.l($APP.T.h([$APP.GI,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.LI.g($APP.OH.readFileSync(b,"utf-8"))}).then(function(d){$APP.OH.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)},WI=function WI(a){switch(arguments.length){case 1:return WI.g(arguments[0]);case 2:return WI.h(arguments[0],arguments[1]);default:throw Error(["Invalid arity: ",$APP.t.g(arguments.length)].join(""));}};WI.g=function(a){return MI(new $APP.m(null,3,[$APP.ur,$APP.tb($APP.CI),$APP.xn,$APP.tb($APP.BI),$APP.mq,null],null),a)};
WI.h=function(a,b){return MI($APP.jl.j($APP.Hl.l($APP.T.h([new $APP.m(null,1,[$APP.xn,$APP.tb($APP.BI)],null),a],0)),$APP.ur,function(c){return $APP.Hl.l($APP.T.h([$APP.tb($APP.CI),c],0))}),b)};WI.o=2;
var kJ=new $APP.N(null,"spec","spec",347520401),sJ=new $APP.N(null,"boolean","boolean",-1919418404),vJ=new $APP.N(null,"opts","opts",155075701),jJ=new $APP.N(null,"help","help",-439233446),ZI=new $APP.N(null,"coerce-fn","coerce-fn",-821146515),mJ=new $APP.N(null,"no-keyword-opts","no-keyword-opts",761286018),AJ=new $APP.N(null,"rest-cmds","rest-cmds",-423198324),pJ=new $APP.N(null,"keywords","keywords",1526959054),tJ=new $APP.N(null,"cmds","cmds",-1841503952),fJ=new $APP.N(null,"aliases","aliases",
1346874714),lJ=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),qJ=new $APP.N("org.babashka","cli","org.babashka/cli",1162430315),XI=new $APP.N("babashka.cli","error","babashka.cli/error",-939678701),zJ=new $APP.N(null,"cmds-opts","cmds-opts",-390130362),gJ=new $APP.N(null,"exec-args","exec-args",-1860766354),YI=new $APP.N(null,"input","input",556931961),dJ=new $APP.N(null,"coerce","coerce",
1917884504),KJ=new $APP.N(null,"show","show",-576705889),nJ=new $APP.N(null,"closed","closed",-919675359),iJ=new $APP.N(null,"h","h",1109658740),LJ=new $APP.N(null,"e","e",1381269198),NI=new $APP.N(null,"s","s",1705939918),oJ=new $APP.N(null,"hyphens","hyphens",2113533609),eJ=new $APP.N(null,"alias","alias",-2039751630),rJ=new $APP.N(null,"args","args",1315556576),HJ=new $APP.N(null,"out-file","out-file",-1187066405);var EJ=eval("(x) \x3d\x3e { return import(x) }");var yJ=new $APP.Q(null,3,5,$APP.R,[new $APP.m(null,3,[tJ,new $APP.Q(null,1,5,$APP.R,["run"],null),$APP.it,function(a){a=$APP.Qe(a);a=$APP.J.h(a,vJ);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(""))})},zJ,new $APP.Q(null,1,5,$APP.R,[$APP.Mo],null)],null),new $APP.m(null,2,[tJ,new $APP.Q(null,1,5,$APP.R,["compile"],
null),$APP.it,function(a){a=$APP.Qe(a);a=$APP.J.h(a,AJ);return JJ(a)}],null),new $APP.m(null,2,[tJ,$APP.Zf,$APP.it,function(a){a=$APP.Qe(a);var b=$APP.J.h(a,AJ),c=$APP.J.h(a,vJ);a=LJ.g(c);if($APP.q(a)){a=$APP.LI.g(a);var d=$APP.OH.mkdtempSync(".tmp"),e=[$APP.t.g(d),"/cherry.mjs"].join("");$APP.OH.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 $APP.OH.rmSync(d,{force:!0,recursive:!0})})}return $APP.q(function(){var f=
jJ.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{BJ()}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.46",
"version": "0.0.0-alpha.47",
"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