squint-cljs 0.1.20 → 0.1.21

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/cli.js CHANGED
@@ -33,8 +33,8 @@ f=$APP.ie.g(f,$APP.uL);$APP.qM.j($APP.B(["[squint] Wrote JS file:",f]));return f
33
33
  "no-run",-1534313596),$8=new $APP.F(null,"validate","validate",-201300827),n9=new $APP.F(null,"composite-opt","composite-opt",-2021292928),m9=new $APP.F(null,"hyphen-opt","hyphen-opt",1836909464),S9=new $APP.F(null,"help","help",-439233446),z9=new $APP.F(null,"cause","cause",231901252),p9=new $APP.F(null,"fst-colon","fst-colon",1618567071),S8=new $APP.F(null,"coerce-fn","coerce-fn",-821146515),e9=new $APP.F(null,"args","args",1315556576),c9=new $APP.F(null,"no-keyword-opts","no-keyword-opts",761286018),
34
34
  B9=new $APP.F(null,"value","value",305978217),C9=new $APP.F(null,"pred","pred",1927423397),v9=new $APP.F(null,"closed","closed",-919675359),P9=new $APP.F("squint.repl.node","eof-while-reading","squint.repl.node/eof-while-reading",198833493),w9=new $APP.F(null,"error-fn","error-fn",-171437615),A9=new $APP.F(null,"option","option",65132272),a9=new $APP.F(null,"exec-args","exec-args",-1860766354),D9=new $APP.F(null,"ex-msg","ex-msg",-1111774387),H8=new $APP.F(null,"s","s",1705939918),y9=new $APP.F(null,
35
35
  "cmds-opts","cmds-opts",-390130362),X9=new $APP.F(null,"h","h",1109658740),Y9=new $APP.F(null,"e","e",1381269198),d9=new $APP.F(null,"cmds","cmds",-1841503952);var I9=$APP.Yi.h(""),H9=$APP.Yi.h(!1),Z9,$9=process.stdout.isTTY;Z9=$APP.r($9)?process.stdin.setRawMode:$9;process.binding("contextify");var N9=$APP.Yi.h($APP.Zp),a$=function a$(a){switch(arguments.length){case 0:return a$.v();case 1:return a$.h(arguments[0]);default:throw Error(["Invalid arity: ",$APP.t.h(arguments.length)].join(""));}};a$.v=function(){return a$.h(null)};
36
- a$.h=function(){$APP.Zp=$APP.rw;$APP.Qp=$APP.pp=!0;$APP.r(Z9)&&process.stdin.setRawMode(!0);return M9("globalThis.user \x3d globalThis.user || {};").then(function(){return new Promise(function(a){var b=$APP.r(null)?esm_import$readline.createInterface({input:null,output:null}):esm_import$readline.createInterface({input:process.stdin,output:process.stdout});R9(b);b.setPrompt([$APP.t.h($APP.Zp),"\x3d\x3e "].join(""));b.on("close",a);return b.prompt()})})};a$.m=1;var b$=new $APP.H(null,4,5,$APP.I,[new $APP.q(null,3,[d9,new $APP.H(null,1,5,$APP.I,["run"],null),$APP.io,function(a){a=$APP.nf(a);a=$APP.ie.g(a,$APP.bI);var b=$APP.nf(a),c=$APP.ie.g(b,$APP.Tk);b=$APP.ie.g(b,S9);if($APP.r(b))return null;$APP.qM.j($APP.B(["[squint] Running",c]));return $APP.xL($APP.yi.l(a,$APP.sL,c)).then(function(d){d=$APP.nf(d);d=$APP.ie.g(d,$APP.uL);d=$APP.r(esm_import$path.isAbsolute(d))?d:[$APP.t.h(process.cwd()),"/",$APP.t.h(d)].join("");return shadow_esm_import(d)})},y9,new $APP.H(null,
36
+ a$.h=function(){$APP.Zp=$APP.qw;$APP.Qp=$APP.pp=!0;$APP.r(Z9)&&process.stdin.setRawMode(!0);return M9("globalThis.user \x3d globalThis.user || {};").then(function(){return new Promise(function(a){var b=$APP.r(null)?esm_import$readline.createInterface({input:null,output:null}):esm_import$readline.createInterface({input:process.stdin,output:process.stdout});R9(b);b.setPrompt([$APP.t.h($APP.Zp),"\x3d\x3e "].join(""));b.on("close",a);return b.prompt()})})};a$.m=1;var b$=new $APP.H(null,4,5,$APP.I,[new $APP.q(null,3,[d9,new $APP.H(null,1,5,$APP.I,["run"],null),$APP.io,function(a){a=$APP.nf(a);a=$APP.ie.g(a,$APP.bI);var b=$APP.nf(a),c=$APP.ie.g(b,$APP.Tk);b=$APP.ie.g(b,S9);if($APP.r(b))return null;$APP.qM.j($APP.B(["[squint] Running",c]));return $APP.xL($APP.yi.l(a,$APP.sL,c)).then(function(d){d=$APP.nf(d);d=$APP.ie.g(d,$APP.uL);d=$APP.r(esm_import$path.isAbsolute(d))?d:[$APP.t.h(process.cwd()),"/",$APP.t.h(d)].join("");return shadow_esm_import(d)})},y9,new $APP.H(null,
37
37
  1,5,$APP.I,[$APP.Tk],null)],null),new $APP.q(null,3,[d9,new $APP.H(null,1,5,$APP.I,["compile"],null),Y8,new $APP.q(null,3,[$APP.at,j9,$APP.dt,j9,$APP.wL,$APP.gl],null),$APP.io,function(a){var b=$APP.nf(a);a=$APP.ie.g(b,V9);b=$APP.ie.g(b,$APP.bI);return T9(b,a)}],null),new $APP.q(null,2,[d9,new $APP.H(null,1,5,$APP.I,["repl"],null),$APP.io,a$],null),new $APP.q(null,2,[d9,$APP.kg,$APP.io,function(a){a=$APP.nf(a);var b=$APP.ie.g(a,V9),c=$APP.ie.g(a,$APP.bI);a=Y9.h(c);if($APP.r(a)){if($APP.r(S9.h(c)))return $APP.qM.j($APP.B(["Usage: squint -e \x3cexpr\x3e \x3copts\x3e\n\nOptions:\n\n--no-run: do not run compiled expression\n--show: print compiled expression"]));
38
- a=$APP.UC.g(a,new $APP.q(null,1,[$APP.gt,$APP.Yi.h(new $APP.q(null,1,[$APP.co,$APP.rw],null))],null));var d=esm_import$fs.mkdtempSync(".tmp"),e=[$APP.t.h(d),"/squint.mjs"].join("");esm_import$fs.writeFileSync(e,a,"utf-8");$APP.r(U9.h(c))&&$APP.qM.j($APP.B([a]));if($APP.r(W9.h(c)))return null;a=$APP.r(esm_import$path.isAbsolute(e))?e:[$APP.t.h(process.cwd()),"/",e].join("");return shadow_esm_import(a).finally(function(){return esm_import$fs.rmSync(d,{force:!0,recursive:!0})})}return $APP.r(function(){var f=
38
+ a=$APP.UC.g(a,new $APP.q(null,1,[$APP.gt,$APP.Yi.h(new $APP.q(null,1,[$APP.co,$APP.qw],null))],null));var d=esm_import$fs.mkdtempSync(".tmp"),e=[$APP.t.h(d),"/squint.mjs"].join("");esm_import$fs.writeFileSync(e,a,"utf-8");$APP.r(U9.h(c))&&$APP.qM.j($APP.B([a]));if($APP.r(W9.h(c)))return null;a=$APP.r(esm_import$path.isAbsolute(e))?e:[$APP.t.h(process.cwd()),"/",e].join("");return shadow_esm_import(a).finally(function(){return esm_import$fs.rmSync(d,{force:!0,recursive:!0})})}return $APP.r(function(){var f=
39
39
  S9.h(c);return $APP.r(f)?f:$APP.yd.g("help",$APP.x(b))||$APP.Sd(b)}())?$APP.qM.j($APP.B(["Squint v0.0.0\n\nUsage: squint \x3csubcommand\x3e \x3copts\x3e\n\nSubcommands:\n\n-e \x3cexpr\x3e Compile and run expression.\nrun \x3cfile.cljs\x3e Compile and run a file\ncompile \x3cfile.cljs\x3e ... Compile file(s)\nrepl Start repl\nhelp Print this help\n\nUse squint \x3csubcommand\x3e --help to show more info."])):T9(c,b)}],null)],null);(function(){var a=new $APP.q(null,1,[$APP.NH,new $APP.q(null,1,[X9,S9],null)],null),b=f9(process.argv.slice(2),a),c=$APP.nf(b),d=$APP.ie.g(c,d9),e=$APP.ie.g(c,e9);return $APP.qe.l(function(f,k){f=$APP.nf(k);var l=$APP.ie.g(f,d9),m=$APP.ie.g(f,$APP.io),h=G9(l,d);if($APP.r(h)){k=function(){var v=null==h?null:$APP.w(h);return null==v?null:$APP.lg(v)}();k=$APP.N.g(k,e);f=F9(k,G8(a,$APP.B([f])));k=$APP.nf(f);var p=$APP.ie.g(k,$APP.bI);f=$APP.ie.g(k,e9);k=$APP.ie.g(k,d9);var n=$APP.N.g(k,f);return $APP.kd(function(){var v=
40
40
  $APP.yi.j(c,e9,n,$APP.B([V9,n,$APP.bI,p,$APP.Mo,l]));return m.h?m.h(v):m.call(null,v)}())}return null},null,b$)})();