UNPKG

mixone

Version:

MixOne is a Node scaffolding tool implemented based on Vite, used for compiling HTML5, JavasCript, Vue, React and other codes. It supports packaging Web applications with multiple HTML entry points (BS architecture) and desktop installation packages (CS a

1 lines 9.97 kB
const H=d;(function(e,f){const C=d,g=e();while(!![]){try{const h=parseInt(C(0xc6))/0x1*(-parseInt(C(0xcc))/0x2)+-parseInt(C(0xf4))/0x3+parseInt(C(0x13d))/0x4*(-parseInt(C(0x115))/0x5)+-parseInt(C(0xcb))/0x6*(parseInt(C(0xc5))/0x7)+-parseInt(C(0x11d))/0x8+-parseInt(C(0x109))/0x9*(parseInt(C(0xf2))/0xa)+-parseInt(C(0x125))/0xb*(-parseInt(C(0xd7))/0xc);if(h===f)break;else g['push'](g['shift']());}catch(i){g['push'](g['shift']());}}}(c,0xb53d9));const b=(function(){const D=d,e={'JJAQL':function(g,h){return g!==h;},'IbDoy':D(0xe4)};let f=!![];return function(g,h){const E=D,i={'KLcJR':function(k,l){return e['JJAQL'](k,l);},'bxQdM':e[E(0xb8)]},j=f?function(){const F=E;if(i[F(0x141)](i[F(0xb6)],i[F(0xb6)])){const l=h['apply'](i,arguments);return j=null,l;}else{if(h){if(F(0x14b)===F(0x14b)){const l=h[F(0xca)](g,arguments);return h=null,l;}else f();}}}:function(){};return f=![],j;};}()),a=b(this,function(){const G=d,e={'hrRWs':'(((.+)+)+)+$'};return a[G(0x123)]()[G(0xd8)](e[G(0xe0)])[G(0x123)]()[G(0xf0)](a)[G(0xd8)](e[G(0xe0)]);});a();const path=require(H(0x127)),fs=require('fs'),{exec,spawnSync}=require('child_process'),express=require(H(0xc1)),LOCK_FILE=path[H(0xd3)](__dirname,H(0x114)),DEBOUNCE_TIME=0x3e8;function shouldExecute(){const I=H,e={'zjfAi':function(f,g){return f<g;},'sPTFY':function(f,g){return f-g;}};try{if(fs['existsSync'](LOCK_FILE)){const f=fs[I(0xc4)](LOCK_FILE),g=Date[I(0xce)]();if(e[I(0xf6)](e[I(0x110)](g,f['mtimeMs']),DEBOUNCE_TIME))return![];}return fs[I(0xdc)](LOCK_FILE,Date[I(0xce)]()[I(0x123)]()),!![];}catch(h){return console[I(0xfa)](I(0xd6),h),!![];}}const outDir=path[H(0xd3)](process[H(0xf5)](),H(0x12b)),distDir=path['join'](outDir,H(0x14d),H(0x131)),packageJson=JSON[H(0xee)](fs[H(0xe9)](path['join'](process[H(0xf5)](),H(0xe6)),'utf-8')),args=process[H(0x14e)][H(0x10b)](0x2),isElectron=args['includes'](H(0x101)),isWeb=args[H(0xdb)](H(0x116)),isStartElectron=args[H(0xdb)](H(0xba)),isStartWeb=args[H(0xdb)](H(0xd0)),portArg=args[H(0x117)](e=>e[H(0xd9)](H(0x138))),port=portArg?parseInt(portArg['split']('=')[0x1]):0x1496,versionArg=args[H(0x117)](e=>e[H(0xd9)](H(0xf1))),versionName=versionArg?'v'+versionArg['split']('=')[0x1]:'v'+packageJson['version'],webDistDir=path[H(0xd3)](process['cwd'](),'dist','web',versionName);versionArg&&!fs['existsSync'](webDistDir)&&(console[H(0xfa)](H(0xc2)+versionName+H(0x107)),console[H(0xd2)](H(0xbb)+webDistDir),process[H(0x11e)](0x1));function runBuild(){const J=H,e={'zvdqf':function(g,h){return g<h;},'HupFS':function(g,h){return g-h;},'gjwwS':J(0xcf),'jErGK':function(g,h,i,j){return g(h,i,j);},'xCqUs':J(0x134),'XBWcm':J(0x139),'dEkQy':J(0x101),'yvRfB':function(g,h){return g!==h;},'SUjEr':function(g,h){return g===h;},'NNLFM':J(0xd1),'zWgXv':J(0x129)};console[J(0xd2)](e[J(0x10c)]);const f=e[J(0xde)](spawnSync,e[J(0xeb)],[e['XBWcm'],e['dEkQy']],{'stdio':'inherit','shell':!![],'cwd':path['join'](__dirname,'..')});if(e[J(0x108)](f['status'],0x0)){if(e['SUjEr'](e[J(0xd4)],J(0x120))){if(n['existsSync'](o)){const h=w[J(0xc4)](x),i=y[J(0xce)]();if(e[J(0x144)](e[J(0x133)](i,h['mtimeMs']),z))return![];}return t[J(0xdc)](u,v[J(0xce)]()[J(0x123)]()),!![];}else console[J(0xfa)](e[J(0xb7)]),process['exit'](0x1);}console[J(0xd2)](J(0xda));}function checkBuildExists(){return fs['existsSync'](distDir);}function d(a,b){const e=c();return d=function(f,g){f=f-0xb6;let h=e[f];return h;},d(a,b);}function startElectron(){const K=H,e={'zerfK':'Starting\x20Electron...','rDejz':function(h,i,j,k){return h(i,j,k);},'AFJhA':function(h,i){return h!==i;},'tzXTA':'Failed\x20to\x20change\x20directory','KqKbO':K(0xbd),'HpnXZ':'inherit','oevmo':function(h,i){return h!==i;},'tyhXA':K(0x10e),'twjDk':K(0x146)};console[K(0xd2)](e[K(0x14a)]);const f=e['rDejz'](spawnSync,'cd',[outDir],{'stdio':'inherit','shell':!![]});e[K(0xe8)](f[K(0x106)],0x0)&&(console['error'](e[K(0xf8)]),process[K(0x11e)](0x1));const g=spawnSync(e['KqKbO'],['.'],{'stdio':e[K(0x102)],'shell':!![],'cwd':outDir});e[K(0x121)](g[K(0x106)],0x0)&&(e[K(0x121)](e[K(0xc0)],'PKHcK')?g['sendFile'](h):(console[K(0xfa)](e[K(0xed)]),process[K(0x11e)](0x1)));}function createHttpServer(){const L=H,e={'aFetn':function(h,i){return h===i;},'AOplt':L(0x112),'TpwHh':L(0xfe),'tOzWV':L(0xd6),'XgoBP':function(h,i){return h===i;},'gSGeO':L(0x126),'yqCok':L(0xd5),'mIJYh':L(0xe3),'UhQJp':function(h){return h();},'LcwtF':function(h,i){return h===i;},'kBFPm':L(0xfc),'puQPD':L(0x13c),'xanVU':function(h,i){return h!==i;},'bYUMS':L(0x10a),'OdSsc':function(h,i){return h(i);},'AZJhz':function(h){return h();},'ThpEZ':function(h){return h();},'METLb':L(0x122),'wZXaY':L(0xc7),'MJLPp':L(0x111),'ZzPks':'CzoKi','wzMEp':L(0xcd),'PwhkC':L(0x13b),'qVmMr':L(0x103),'DXFIc':L(0xfa)},f=e[L(0x130)](express);console[L(0xd2)](e['PwhkC'],webDistDir),f['use'](express[L(0xdf)](webDistDir)),f[L(0x128)]('/',(h,i)=>{const M=L,j=path[M(0xd3)](webDistDir,'index.html');if(fs[M(0xc9)](j))i[M(0xf3)](j);else{if(e[M(0x11b)](e[M(0x12d)],e[M(0x11f)]))g[M(0xfa)](M(0xcd),h);else{const l=fs[M(0x119)](webDistDir)[M(0xe5)](m=>m[M(0x142)]('.html'))[M(0x137)](m=>M(0xff)+m+'\x22>'+m+M(0x12c))[M(0xd3)]('\x0a');i['send'](M(0x12f)+l+M(0x10d));}}}),f['get'](e['qVmMr'],(h,i,j)=>{const N=L,k={'zyNgH':e[N(0xdd)]};if(e[N(0xf7)](e[N(0x104)],N(0x132)))return g['error'](k['zyNgH'],h),!![];else{const m=h[N(0xe2)]['page'];if(!m[N(0x142)](e[N(0x13e)])){if(e[N(0xf7)](e[N(0x145)],N(0xe3))){e[N(0x13f)](j);return;}else g[N(0xf3)](h);}const n=path[N(0xd3)](webDistDir,m);fs[N(0xc9)](n)?e[N(0xbe)]('LtFtX','kyJQT')?g[N(0xfa)]('Port\x20'+h+N(0xfd)):i[N(0xf3)](n):i['status'](0x194)[N(0x113)](e['kBFPm']);}});const g=f['listen'](port,()=>{const O=L;e[O(0x147)](e[O(0x14f)],O(0x10a))?(g['error'](e[O(0xc8)]),h[O(0x11e)](0x1)):(console[O(0xd2)]('HTTP\x20server\x20started:\x20http://localhost:'+port),e[O(0xbf)](exec,O(0x11c)+port));});g['on'](e[L(0x124)],h=>{const P=L;e[P(0x14c)]===e['wZXaY']?(e['UhQJp'](g),e['AZJhz'](h)):(h[P(0x118)]===e[P(0x149)]?console[P(0xfa)](P(0x12a)+port+P(0xfd)):e[P(0x140)]!==e['ZzPks']?(g(),e['ThpEZ'](h)):console[P(0xfa)](e[P(0xbc)],h),process['exit'](0x1));});}function c(){const U=['27MfMEPR','vzALg','slice','gjwwS','</ul>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</body>\x0a\x20\x20\x20\x20\x20\x20\x20\x20</html>\x0a\x20\x20\x20\x20\x20\x20','PKHcK','Run\x20error:','sPTFY','EADDRINUSE','KvqFQ','send','preview.lock','3543625eazPCA','--web','find','code','readdirSync','Web\x20build\x20completed','aFetn','start\x20http://localhost:','6246360CnOXsB','exit','TpwHh','uMjiP','oevmo','MEjVu','toString','DXFIc','11iBQSxr','LZCYh','path','get','Build\x20failed','Port\x20','out','</a></li>','AOplt','DpyDI','\x0a\x20\x20\x20\x20\x20\x20\x20\x20<!DOCTYPE\x20html>\x0a\x20\x20\x20\x20\x20\x20\x20\x20<html>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<head><title>Available\x20Pages</title></head>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<body>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<h1>Available\x20Pages:</h1>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<ul>','ThpEZ','dist','tyIEq','HupFS','node','ydgxn','inherit','map','--port=','build.js','mwtha','Static\x20file\x20directory:','Web\x20build\x20failed','8oXSlzN','yqCok','UhQJp','ZzPks','KLcJR','endsWith','hzzXt','zvdqf','mIJYh','Failed\x20to\x20start\x20Electron','xanVU','IUUEr','MJLPp','zerfK','AJrms','METLb','windows','argv','bYUMS','bxQdM','zWgXv','IbDoy','KFmcu','--start-desktop','Please\x20check\x20the\x20directory:\x20','wzMEp','electron','LcwtF','OdSsc','tyhXA','express','The\x20specified\x20version\x20','Please\x20specify\x20a\x20running\x20mode:\x20--desktop,\x20--web,\x20--start-desktop\x20or\x20--start-web','statSync','646198yrKDrw','2697SqAJLE','ixrfG','puQPD','existsSync','apply','48tAxfIr','562iIAYTg','Server\x20error:','now','Start\x20building...','--start-web','UGQuJ','log','join','NNLFM','.html','Lock\x20file\x20operation\x20failed:','78996228YELlOm','search','startsWith','Build\x20completed','includes','writeFileSync','tOzWV','jErGK','static','hrRWs','catch','params','IZseq','gYuTO','filter','package.json','rCPTg','AFJhA','readFileSync','hMomM','xCqUs','MZbOp','twjDk','parse','TVeZe','constructor','--v=','3939140wjbaCh','sendFile','2892906IQRqoT','cwd','zjfAi','XgoBP','tzXTA','fjmCy','error','JZhHv','Page\x20not\x20found','\x20is\x20already\x20in\x20use','AysSO','<li><a\x20href=\x22/','YSOQf','--desktop','HpnXZ','/:page','gSGeO','cqpeG','status','\x20does\x20not\x20exist','yvRfB'];c=function(){return U;};return c();}function runWebBuild(){const Q=H,e={'TVeZe':'Start\x20Web\x20build...','YSOQf':function(g,h,i,j){return g(h,i,j);},'ydgxn':Q(0x134),'YpCmE':'build.js','PqGie':Q(0x116),'IRyEV':function(g,h){return g===h;},'hMomM':Q(0x148),'rCPTg':Q(0x13c),'JZhHv':Q(0x11a)};console['log'](e[Q(0xef)]);const f=e[Q(0x100)](spawnSync,e[Q(0x135)],[e['YpCmE'],e['PqGie']],{'stdio':Q(0x136),'shell':!![],'cwd':path[Q(0xd3)](__dirname,'..')});f[Q(0x106)]!==0x0&&(e['IRyEV'](e[Q(0xea)],Q(0x148))?(console[Q(0xfa)](e[Q(0xe7)]),process['exit'](0x1)):(j[Q(0xfa)](Q(0xc2)+k+Q(0x107)),l['log'](Q(0xbb)+m),n['exit'](0x1))),console[Q(0xd2)](e[Q(0xfb)]);}function checkWebBuildExists(){const R=H;return fs[R(0xc9)](webDistDir);}async function main(){const S=H,e={'MZbOp':function(f){return f();},'cqpeG':function(f){return f();},'hzzXt':function(f){return f();},'MfWzi':function(f){return f();},'KFmcu':function(f){return f();},'DpyDI':function(f){return f();},'fjmCy':function(f){return f();},'mwtha':S(0xc3)};if(!e[S(0xec)](shouldExecute))return;if(isElectron)e[S(0x105)](runBuild),e[S(0x105)](startElectron);else{if(isWeb)e[S(0x143)](runWebBuild),e['MfWzi'](createHttpServer);else{if(isStartElectron)!e[S(0xb9)](checkBuildExists)&&e[S(0xb9)](runBuild),e[S(0xec)](startElectron);else isStartWeb?(!e[S(0x12e)](checkWebBuildExists)&&e[S(0xb9)](runWebBuild),e[S(0xf9)](createHttpServer)):(console['error'](e[S(0x13a)]),process[S(0x11e)](0x1));}}}main()[H(0xe1)](e=>{const T=H,f={'zloPy':T(0x10f)};console[T(0xfa)](f['zloPy'],e),process[T(0x11e)](0x1);});