@lovrabet/cli 1.1.3 → 1.1.4
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/add-page/input-page-router.js +1 -1
- package/lib/add-page/main.js +1 -1
- package/lib/add-page/select-page-template.js +1 -1
- package/lib/api/api-pull-ui.js +1 -1
- package/lib/api/format-dataset.js +1 -1
- package/lib/api/generate-api-file.js +1 -1
- package/lib/api/main.js +1 -1
- package/lib/api/pull-silent.js +1 -1
- package/lib/api/pull.js +1 -1
- package/lib/auth/auth-server-ui.js +1 -1
- package/lib/auth/auth-server.js +1 -1
- package/lib/auth/constant.js +1 -1
- package/lib/auth/get-cookie.js +1 -1
- package/lib/auth/is-session-valid.js +1 -1
- package/lib/auth/logout.js +1 -1
- package/lib/cli.js +1 -1
- package/lib/cmd/build-watch.js +1 -1
- package/lib/cmd/build.js +1 -1
- package/lib/cmd/logs.js +1 -1
- package/lib/cmd/preview.js +1 -1
- package/lib/cmd/start.js +1 -1
- package/lib/config/config-help.js +1 -1
- package/lib/config/main.js +1 -1
- package/lib/constant/domain.js +1 -1
- package/lib/constant/env.js +1 -1
- package/lib/create-app/enhanced-guided-create.js +1 -1
- package/lib/create-app/format-elapsed.js +1 -1
- package/lib/create-app/main.js +1 -1
- package/lib/create-app/task-finished.js +1 -1
- package/lib/create-app/task-loading.js +1 -1
- package/lib/create-app/task-running.js +1 -1
- package/lib/create-app/task-time.js +1 -1
- package/lib/create-app/use-copy-project-template.js +1 -1
- package/lib/create-app/use-format-code.js +1 -1
- package/lib/create-app/use-install-dependencies.js +1 -1
- package/lib/help.js +1 -1
- package/lib/utils/config.js +1 -1
- package/lib/utils/copy-directory.js +1 -1
- package/lib/utils/logger.js +1 -1
- package/lib/utils/router-updater.js +1 -1
- package/lib/utils/template-replacer.js +1 -1
- package/package.json +1 -1
- package/templates/projects/sub-app-react-demo/package-lock.json +2856 -0
- package/templates/projects/sub-app-react-demo/package.json +1 -1
- package/templates/projects/sub-app-react-demo/src/api/api.ts +6 -6
package/lib/cmd/build.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x19a30c,_0xc4f9ea){const _0x4f26c8=a18_0x1f04,_0x583f95=_0x19a30c();while(!![]){try{const _0x37770a=-parseInt(_0x4f26c8(0x102))/0x1*(parseInt(_0x4f26c8(0x101))/0x2)+-parseInt(_0x4f26c8(0xe5))/0x3*(parseInt(_0x4f26c8(0xf5))/0x4)+parseInt(_0x4f26c8(0xef))/0x5+-parseInt(_0x4f26c8(0xe4))/0x6*(-parseInt(_0x4f26c8(0xff))/0x7)+parseInt(_0x4f26c8(0xf6))/0x8*(parseInt(_0x4f26c8(0xfc))/0x9)+parseInt(_0x4f26c8(0xfb))/0xa+-parseInt(_0x4f26c8(0xeb))/0xb*(parseInt(_0x4f26c8(0xf4))/0xc);if(_0x37770a===_0xc4f9ea)break;else _0x583f95['push'](_0x583f95['shift']());}catch(_0x24aa57){_0x583f95['push'](_0x583f95['shift']());}}}(a18_0x59ad,0xc9306));import{delimiter,join}from'node:path';function a18_0x59ad(){const _0x178a66=['npm\x20run\x20build\x20exited\x20with\x20code\x20','PATH','29582971XGksTj','stderr','pipe','开始构建项目','5826900ulMbYj','run','close','npm','message','12ZIEztn','4ZPdofm','40224jpXRmq','now','error','项目构建成功','inherit','13475740CZSseL','2493jFTMjN','success','项目构建失败','8309GrxddJ','env','22tlnOVZ','79882RzePEd','toString','data','项目构建出错','info','node_modules','4452QsrVnK','1182993NfMvHa','cwd','build','trim'];a18_0x59ad=function(){return _0x178a66;};return a18_0x59ad();}import{spawn}from'node:child_process';function a18_0x1f04(_0xa6d45d,_0x44761d){const _0x59ad62=a18_0x59ad();return a18_0x1f04=function(_0x1f046c,_0x247e8f){_0x1f046c=_0x1f046c-0xe4;let _0x221787=_0x59ad62[_0x1f046c];return _0x221787;},a18_0x1f04(_0xa6d45d,_0x44761d);}import{logger}from'../utils/logger.js';export function runBuild(){return new Promise((_0x7ff016,_0x947301)=>{const _0xb6b62f=a18_0x1f04,_0x2c2393=Date[_0xb6b62f(0xf7)]();logger[_0xb6b62f(0x106)](_0xb6b62f(0xe7),_0xb6b62f(0xee),{'command':'npm\x20run\x20build'});let _0x2f90ea='';const _0x8313d9=spawn(_0xb6b62f(0xf2),[_0xb6b62f(0xf0),'build'],{'stdio':[_0xb6b62f(0xfa),_0xb6b62f(0xfa),_0xb6b62f(0xed)],'shell':!![],'env':{...process[_0xb6b62f(0x100)],'PATH':''+join(process[_0xb6b62f(0xe6)](),_0xb6b62f(0x107),'.bin')+delimiter+process[_0xb6b62f(0x100)][_0xb6b62f(0xea)]}});_0x8313d9[_0xb6b62f(0xec)]?.['on'](_0xb6b62f(0x104),_0x231b08=>{const _0x574310=_0xb6b62f;_0x2f90ea+=_0x231b08[_0x574310(0x103)]();}),_0x8313d9['on'](_0xb6b62f(0xf1),_0x2dbc02=>{const _0x58e15e=_0xb6b62f,_0x211859=Date[_0x58e15e(0xf7)]()-_0x2c2393;if(_0x2dbc02===0x0||_0x2dbc02===null)logger[_0x58e15e(0xfd)](_0x58e15e(0xe7),_0x58e15e(0xf9),_0x211859),_0x7ff016();else{const _0x32b16c={'exitCode':_0x2dbc02,'duration':_0x211859,'command':'npm\x20run\x20build','cwd':process[_0x58e15e(0xe6)]()};_0x2f90ea[_0x58e15e(0xe8)]()&&(_0x32b16c[_0x58e15e(0xec)]=_0x2f90ea[_0x58e15e(0xe8)]()),logger[_0x58e15e(0xf8)](_0x58e15e(0xe7),_0x58e15e(0xfe),_0x32b16c),_0x947301(new Error(_0x58e15e(0xe9)+_0x2dbc02));}}),_0x8313d9['on']('error',_0x2ee457=>{const _0x31a913=_0xb6b62f,_0x24c9b0=Date[_0x31a913(0xf7)]()-_0x2c2393;logger['error'](_0x31a913(0xe7),_0x31a913(0x105),{'error':_0x2ee457[_0x31a913(0xf3)],'duration':_0x24c9b0,'stderr':_0x2f90ea[_0x31a913(0xe8)]()||undefined}),_0x947301(_0x2ee457);});});}
|
package/lib/cmd/logs.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x5856e3,_0x12902d){const _0x1d25ae=a19_0x41d6,_0x23c6ab=_0x5856e3();while(!![]){try{const _0x481d79=parseInt(_0x1d25ae(0x1a6))/0x1+-parseInt(_0x1d25ae(0x197))/0x2*(-parseInt(_0x1d25ae(0x19f))/0x3)+-parseInt(_0x1d25ae(0x19a))/0x4+-parseInt(_0x1d25ae(0x19b))/0x5+parseInt(_0x1d25ae(0x1a3))/0x6+-parseInt(_0x1d25ae(0x1b1))/0x7+parseInt(_0x1d25ae(0x19d))/0x8;if(_0x481d79===_0x12902d)break;else _0x23c6ab['push'](_0x23c6ab['shift']());}catch(_0xda117e){_0x23c6ab['push'](_0x23c6ab['shift']());}}}(a19_0x131a,0x4129a));function a19_0x41d6(_0x1bec12,_0x1d8457){const _0x131abf=a19_0x131a();return a19_0x41d6=function(_0x41d679,_0xfbb97a){_0x41d679=_0x41d679-0x197;let _0xfd3244=_0x131abf[_0x41d679];return _0xfd3244;},a19_0x41d6(_0x1bec12,_0x1d8457);}import{logger}from'../utils/logger.js';export function showLogs(){const _0x536533=a19_0x41d6;logger[_0x536533(0x1ab)](process[_0x536533(0x1b0)]());const _0x351593=logger[_0x536533(0x1ae)]();if(_0x351593[_0x536533(0x1ac)]===0x0){console[_0x536533(0x199)](_0x536533(0x1aa));return;}console[_0x536533(0x199)](_0x536533(0x1a7)),_0x351593[_0x536533(0x19c)]((_0x504f52,_0x32255f)=>{const _0x18bdf5=_0x536533,_0x10af44=new Date(_0x504f52['timestamp'])[_0x18bdf5(0x1a5)]('zh-CN'),_0x310dca=_0x504f52[_0x18bdf5(0x1af)]===_0x18bdf5(0x1a9)?'√':_0x504f52[_0x18bdf5(0x1af)]===_0x18bdf5(0x1a8)?'×':_0x504f52[_0x18bdf5(0x1af)]==='warn'?'!':'i';console[_0x18bdf5(0x199)](_0x32255f+0x1+'.\x20'+_0x310dca+'\x20['+_0x504f52[_0x18bdf5(0x198)]+']\x20'+_0x504f52[_0x18bdf5(0x1ad)]),console['log'](_0x18bdf5(0x1a0)+_0x10af44),_0x504f52[_0x18bdf5(0x1a2)]&&console['log']('\x20\x20\x20耗时:\x20'+_0x504f52[_0x18bdf5(0x1a2)]+'ms'),_0x504f52[_0x18bdf5(0x1a1)]&&Object['keys'](_0x504f52[_0x18bdf5(0x1a1)])[_0x18bdf5(0x1ac)]>0x0&&console['log'](_0x18bdf5(0x19e)+JSON[_0x18bdf5(0x1a4)](_0x504f52['details'],null,0x2)),console[_0x18bdf5(0x199)]('');});}export function clearLogs(){const _0x3b4130=a19_0x41d6;logger[_0x3b4130(0x1ab)](process[_0x3b4130(0x1b0)]()),logger['clearLogs'](),console['log'](_0x3b4130(0x1b2));}function a19_0x131a(){const _0x3be34d=['1683144xzJrfh','\x20\x20\x20详情:\x20','3NWqRZq','\x20\x20\x20时间:\x20','details','duration','2791368TCIHbw','stringify','toLocaleString','166667OBpsjS','*\x20Lovrabet\x20CLI\x20日志记录:\x0a','error','success','*\x20暂无日志记录','setLogPath','length','message','readLogs','level','cwd','453159TmGFgJ','*\x20日志已清空','123174FUXDeE','command','log','1422572RrqgIC','1082945RwlufS','forEach'];a19_0x131a=function(){return _0x3be34d;};return a19_0x131a();}
|
package/lib/cmd/preview.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a20_0x46fc(){const _0x565525=['vite\x20preview','data','4533604PifbNg','stderr','env','PATH','预览服务器启动失败','trim','607728moDBmK','vite','cwd','1049914HurgAe','preview','node_modules','pipe','3vsihBg','211366wnuPCp','预览服务器启动成功','inherit','toString','16761609TJFtLd','success','64tlyeGS','303982yofEUY','启动预览服务器','now','1720860TrYjoC','info','error'];a20_0x46fc=function(){return _0x565525;};return a20_0x46fc();}(function(_0x41d472,_0x44782a){const _0x45ea50=a20_0x205f,_0x355065=_0x41d472();while(!![]){try{const _0x20d998=-parseInt(_0x45ea50(0xf7))/0x1+-parseInt(_0x45ea50(0x10f))/0x2+parseInt(_0x45ea50(0xf6))/0x3*(-parseInt(_0x45ea50(0x106))/0x4)+parseInt(_0x45ea50(0x101))/0x5+-parseInt(_0x45ea50(0x10c))/0x6+-parseInt(_0x45ea50(0xfe))/0x7*(-parseInt(_0x45ea50(0xfd))/0x8)+parseInt(_0x45ea50(0xfb))/0x9;if(_0x20d998===_0x44782a)break;else _0x355065['push'](_0x355065['shift']());}catch(_0x487d94){_0x355065['push'](_0x355065['shift']());}}}(a20_0x46fc,0x8e539));import{delimiter,join}from'node:path';import{spawn}from'node:child_process';function a20_0x205f(_0x51b9d1,_0x223cce){const _0x46fc07=a20_0x46fc();return a20_0x205f=function(_0x205f76,_0x9c62){_0x205f76=_0x205f76-0xf6;let _0x50d171=_0x46fc07[_0x205f76];return _0x50d171;},a20_0x205f(_0x51b9d1,_0x223cce);}import{logger}from'../utils/logger.js';export function runPreview(){return new Promise((_0x173145,_0x5ed404)=>{const _0x5b9434=a20_0x205f,_0x38a25f=Date['now']();logger[_0x5b9434(0x102)](_0x5b9434(0x110),_0x5b9434(0xff),{'command':_0x5b9434(0x104)});let _0x2ed725='';const _0x4861=spawn(_0x5b9434(0x10d),[_0x5b9434(0x110)],{'stdio':[_0x5b9434(0xf9),_0x5b9434(0xf9),_0x5b9434(0x112)],'shell':!![],'env':{...process[_0x5b9434(0x108)],'PATH':''+join(process[_0x5b9434(0x10e)](),_0x5b9434(0x111),'.bin')+delimiter+process['env'][_0x5b9434(0x109)]}});_0x4861[_0x5b9434(0x107)]?.['on'](_0x5b9434(0x105),_0xa4cd31=>{const _0x5da27c=_0x5b9434;_0x2ed725+=_0xa4cd31[_0x5da27c(0xfa)]();}),_0x4861['on']('close',_0x40858c=>{const _0x2b97fd=_0x5b9434,_0x52f61c=Date[_0x2b97fd(0x100)]()-_0x38a25f;if(_0x40858c===0x0||_0x40858c===null)logger[_0x2b97fd(0xfc)]('preview',_0x2b97fd(0xf8),_0x52f61c),_0x173145();else{const _0x3e03d8={'exitCode':_0x40858c,'duration':_0x52f61c,'command':'vite\x20preview','cwd':process[_0x2b97fd(0x10e)]()};_0x2ed725[_0x2b97fd(0x10b)]()&&(_0x3e03d8[_0x2b97fd(0x107)]=_0x2ed725[_0x2b97fd(0x10b)]()),logger['error'](_0x2b97fd(0x110),_0x2b97fd(0x10a),_0x3e03d8),_0x5ed404(new Error('vite\x20preview\x20exited\x20with\x20code\x20'+_0x40858c));}}),_0x4861['on'](_0x5b9434(0x103),_0x4eec2c=>{const _0x334e12=_0x5b9434,_0x4dec36=Date[_0x334e12(0x100)]()-_0x38a25f;logger['error']('preview','预览服务器启动出错',{'error':_0x4eec2c['message'],'duration':_0x4dec36,'stderr':_0x2ed725['trim']()||undefined}),_0x5ed404(_0x4eec2c);});});}
|
package/lib/cmd/start.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a21_0x361d(_0x48465b,_0x1d7488){const _0x48ef1e=a21_0x48ef();return a21_0x361d=function(_0x361dff,_0x25dbcb){_0x361dff=_0x361dff-0x8f;let _0x497f6d=_0x48ef1e[_0x361dff];return _0x497f6d;},a21_0x361d(_0x48465b,_0x1d7488);}(function(_0x310c92,_0x38dc12){const _0xfe0418=a21_0x361d,_0x55666e=_0x310c92();while(!![]){try{const _0x14a079=parseInt(_0xfe0418(0xa8))/0x1*(-parseInt(_0xfe0418(0xa3))/0x2)+parseInt(_0xfe0418(0xaa))/0x3*(parseInt(_0xfe0418(0xa6))/0x4)+-parseInt(_0xfe0418(0xa0))/0x5+parseInt(_0xfe0418(0x94))/0x6*(parseInt(_0xfe0418(0x8f))/0x7)+-parseInt(_0xfe0418(0x97))/0x8*(parseInt(_0xfe0418(0xa1))/0x9)+parseInt(_0xfe0418(0xa2))/0xa+parseInt(_0xfe0418(0x90))/0xb*(parseInt(_0xfe0418(0xac))/0xc);if(_0x14a079===_0x38dc12)break;else _0x55666e['push'](_0x55666e['shift']());}catch(_0x1d047c){_0x55666e['push'](_0x55666e['shift']());}}}(a21_0x48ef,0x757a3));import{delimiter,join}from'node:path';import{spawn}from'node:child_process';import{logger}from'../utils/logger.js';function a21_0x48ef(){const _0x165939=['env','inherit','1783280GeGOWQ','5759100EvQxFl','4428860bIDcKj','7102DBPQAe','node_modules','success','251884shYxYk','start','159HVqObv','now','27EzFbuL','stderr','24utjnSA','info','error','vite','启动开发服务器','505897GfBJyX','1307603nxHRwA','trim','开发服务器启动成功','toString','66fiWqQT','开发服务器启动出错','cwd','8IbAfvu','.bin','message','close','data','pipe','vite\x20exited\x20with\x20code\x20'];a21_0x48ef=function(){return _0x165939;};return a21_0x48ef();}export function runStart(_0x9c8e6c){return new Promise((_0x10d414,_0x690374)=>{const _0x3d1754=a21_0x361d,_0x3de577=Date['now'](),_0x5d4bee=_0x9c8e6c||process[_0x3d1754(0x96)]();logger[_0x3d1754(0xad)](_0x3d1754(0xa7),_0x3d1754(0xb0),{'command':_0x3d1754(0xaf),'cwd':_0x5d4bee});let _0x5a13a8='';const _0x1f4735=spawn(_0x3d1754(0xaf),{'stdio':[_0x3d1754(0x9f),_0x3d1754(0x9f),_0x3d1754(0x9c)],'shell':!![],'cwd':_0x5d4bee,'env':{...process[_0x3d1754(0x9e)],'PATH':''+join(_0x5d4bee,_0x3d1754(0xa4),_0x3d1754(0x98))+delimiter+process[_0x3d1754(0x9e)]['PATH']}});_0x1f4735[_0x3d1754(0xab)]?.['on'](_0x3d1754(0x9b),_0x3bebfa=>{const _0x5c596c=_0x3d1754,_0x5ca47d=_0x3bebfa[_0x5c596c(0x93)]();_0x5a13a8+=_0x5ca47d,process[_0x5c596c(0xab)]['write'](_0x5ca47d);}),_0x1f4735['on'](_0x3d1754(0x9a),_0x340749=>{const _0x2f201b=_0x3d1754,_0x35564b=Date['now']()-_0x3de577;if(_0x340749===0x0||_0x340749===null)logger[_0x2f201b(0xa5)]('start',_0x2f201b(0x92),_0x35564b),_0x10d414();else{const _0xeec043={'exitCode':_0x340749,'duration':_0x35564b,'command':_0x2f201b(0xaf),'cwd':_0x5d4bee};_0x5a13a8[_0x2f201b(0x91)]()&&(_0xeec043[_0x2f201b(0xab)]=_0x5a13a8['trim']()),logger[_0x2f201b(0xae)](_0x2f201b(0xa7),'开发服务器启动失败',_0xeec043),_0x690374(new Error(_0x2f201b(0x9d)+_0x340749));}}),_0x1f4735['on']('error',_0x375cce=>{const _0x2f06b1=_0x3d1754,_0x18f3d5=Date[_0x2f06b1(0xa9)]()-_0x3de577,_0x2c3c3e={'error':_0x375cce[_0x2f06b1(0x99)],'duration':_0x18f3d5,'command':_0x2f06b1(0xaf),'cwd':_0x5d4bee};_0x5a13a8[_0x2f06b1(0x91)]()&&(_0x2c3c3e['stderr']=_0x5a13a8[_0x2f06b1(0x91)]()),logger[_0x2f06b1(0xae)](_0x2f06b1(0xa7),_0x2f06b1(0x95),_0x2c3c3e),_0x690374(_0x375cce);});});}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function a22_0x2ff3(){const _0x4ffa7f=['获取配置项','map','4tsvhjy','63MIGFMG','486838vzCSYo','326964tOSzpt','2226745yoMtae','186216LFoDTu','lovrabet\x20config\x20list\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','lovrabet\x20config\x20set\x20<key>\x20<value>\x20\x20\x20','无效的命令,可用命令如下:','description','列出所有配置项','column','配置当前项目的\x20App\x20Code','15xKvqsk','gray','10eKsxeG','\x20\x20\x20\x20','2151063dkMIlY','150838gPTxOk','8744NODbSQ','\x20*\x20配置示例:','command'];a22_0x2ff3=function(){return _0x4ffa7f;};return a22_0x2ff3();}(function(_0x3a9a8d,_0x39f5e4){const _0xca50e2=a22_0x52d6,_0x4f0574=_0x3a9a8d();while(!![]){try{const _0x2cb906=parseInt(_0xca50e2(0xdb))/0x1*(-parseInt(_0xca50e2(0xd5))/0x2)+-parseInt(_0xca50e2(0xd0))/0x3*(parseInt(_0xca50e2(0xc8))/0x4)+parseInt(_0xca50e2(0xc7))/0x5+parseInt(_0xca50e2(0xc6))/0x6+parseInt(_0xca50e2(0xdc))/0x7*(-parseInt(_0xca50e2(0xd6))/0x8)+parseInt(_0xca50e2(0xd4))/0x9+parseInt(_0xca50e2(0xd2))/0xa*(parseInt(_0xca50e2(0xdd))/0xb);if(_0x2cb906===_0x39f5e4)break;else _0x4f0574['push'](_0x4f0574['shift']());}catch(_0x334a2b){_0x4f0574['push'](_0x4f0574['shift']());}}}(a22_0x2ff3,0x3a4e9));import{jsxs as a22_0x22a208,jsx as a22_0x59af41}from'react/jsx-runtime';import{Box,Text}from'ink';function a22_0x52d6(_0x15fe21,_0x27181e){const _0x2ff350=a22_0x2ff3();return a22_0x52d6=function(_0x52d665,_0x26cf3a){_0x52d665=_0x52d665-0xc6;let _0x19c07a=_0x2ff350[_0x52d665];return _0x19c07a;},a22_0x52d6(_0x15fe21,_0x27181e);}export function ConfigHelp(){const _0x4208f7=a22_0x52d6,_0x11ded3=[{'command':_0x4208f7(0xca),'description':'设置配置项'},{'command':'lovrabet\x20config\x20get\x20<key>\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','description':_0x4208f7(0xd9)},{'command':_0x4208f7(0xc9),'description':_0x4208f7(0xcd)}],_0x18977d=[{'command':'lovrabet\x20config\x20set\x20app\x20app-xxxxx\x20\x20\x20','description':_0x4208f7(0xcf)}];return a22_0x22a208(Box,{'flexDirection':_0x4208f7(0xce),'marginTop':0x1,'marginBottom':0x1,'children':[a22_0x59af41(Box,{'marginBottom':0x1,'children':a22_0x22a208(Text,{'color':_0x4208f7(0xd1),'children':['\x20!','\x20\x20',_0x4208f7(0xcb)]})}),_0x11ded3[_0x4208f7(0xda)](_0x22ecdb=>a22_0x22a208(Box,{'children':[a22_0x22a208(Text,{'children':[_0x4208f7(0xd3),_0x22ecdb[_0x4208f7(0xd8)]]}),a22_0x59af41(Text,{'color':_0x4208f7(0xd1),'children':_0x22ecdb[_0x4208f7(0xcc)]})]},_0x22ecdb[_0x4208f7(0xd8)])),a22_0x59af41(Box,{'marginTop':0x1,'marginBottom':0x1,'children':a22_0x59af41(Text,{'color':_0x4208f7(0xd1),'children':_0x4208f7(0xd7)})}),_0x18977d[_0x4208f7(0xda)](_0x5ed199=>a22_0x22a208(Box,{'children':[a22_0x22a208(Text,{'children':[_0x4208f7(0xd3),_0x5ed199[_0x4208f7(0xd8)]]}),a22_0x59af41(Text,{'color':'gray','children':_0x5ed199[_0x4208f7(0xcc)]})]},_0x5ed199['command']))]});}
|
package/lib/config/main.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a23_0x34a5(){const _0x24acd7=['list','571172kbMRiC','red','cwd','230EVsGEz','.lovrabetrc','set','833562ZBGtbD','1431057kWJQca','479280oZuPkV','undefined','length','stringify','保存配置失败','8DsCxVf','12199mkGYdz','get','16460zMxFLY','1775424ZhMWAA','2vrKzqB','log','42030lWAsnP','input','includes'];a23_0x34a5=function(){return _0x24acd7;};return a23_0x34a5();}const a23_0x5634b7=a23_0x33ed;(function(_0x552136,_0x130293){const _0x1de7a0=a23_0x33ed,_0x434b01=_0x552136();while(!![]){try{const _0x56ab74=-parseInt(_0x1de7a0(0x1eb))/0x1+parseInt(_0x1de7a0(0x1f5))/0x2*(-parseInt(_0x1de7a0(0x1ea))/0x3)+-parseInt(_0x1de7a0(0x1e3))/0x4+parseInt(_0x1de7a0(0x1e6))/0x5*(-parseInt(_0x1de7a0(0x1f7))/0x6)+-parseInt(_0x1de7a0(0x1f4))/0x7+-parseInt(_0x1de7a0(0x1f0))/0x8*(-parseInt(_0x1de7a0(0x1e9))/0x9)+parseInt(_0x1de7a0(0x1f3))/0xa*(parseInt(_0x1de7a0(0x1f1))/0xb);if(_0x56ab74===_0x130293)break;else _0x434b01['push'](_0x434b01['shift']());}catch(_0x4e863a){_0x434b01['push'](_0x434b01['shift']());}}}(a23_0x34a5,0x3b586));function a23_0x33ed(_0x409645,_0x20f1ce){const _0x34a500=a23_0x34a5();return a23_0x33ed=function(_0x33ede7,_0x12d38b){_0x33ede7=_0x33ede7-0x1e3;let _0x45c01f=_0x34a500[_0x33ede7];return _0x45c01f;},a23_0x33ed(_0x409645,_0x20f1ce);}import{jsx as a23_0x7ed2b}from'react/jsx-runtime';import{resolve}from'node:path';import{writeFileSync}from'node:fs';import{ConfigHelp}from'./config-help.js';import{Box,Text}from'ink';import{readConfig}from'../utils/config.js';const configPath=resolve(process[a23_0x5634b7(0x1e5)](),a23_0x5634b7(0x1e7));export function Config(_0x725a72){const _0x3e60b1=a23_0x5634b7,{cli:_0x5665e8}=_0x725a72,_0x32d6dd=_0x5665e8['input'][0x1],_0x17d796=_0x5665e8[_0x3e60b1(0x1f8)][0x2],_0x3d3223=[_0x3e60b1(0x1e8),_0x3e60b1(0x1f2)][_0x3e60b1(0x1f9)](_0x32d6dd||''),_0x30590c=_0x5665e8['input'][_0x3e60b1(0x1ed)]>=0x3,_0x5659a2=readConfig();if(_0x32d6dd===_0x3e60b1(0x1e8)){if(_0x17d796){const _0x5a6eb6=_0x5665e8[_0x3e60b1(0x1f8)][0x3];if(typeof _0x5a6eb6!=='undefined'){_0x5659a2[_0x17d796]=_0x5a6eb6;try{writeFileSync(configPath,JSON[_0x3e60b1(0x1ee)](_0x5659a2,null,0x2),{'encoding':'utf8'});}catch(_0x36d2fb){return a23_0x7ed2b(Box,{'children':a23_0x7ed2b(Text,{'color':_0x3e60b1(0x1e4),'children':_0x3e60b1(0x1ef)})});}return null;}return a23_0x7ed2b(Box,{'children':a23_0x7ed2b(Text,{'color':_0x3e60b1(0x1e4),'children':'未提供配置值'})});}}if(_0x32d6dd===_0x3e60b1(0x1f2)){if(_0x17d796)return console[_0x3e60b1(0x1f6)](_0x5659a2[_0x17d796]||_0x3e60b1(0x1ec)),null;return null;}if(_0x32d6dd===_0x3e60b1(0x1fa))return console[_0x3e60b1(0x1f6)](JSON[_0x3e60b1(0x1ee)](_0x5659a2,null,0x2)),null;if(!_0x3d3223||!_0x30590c)return a23_0x7ed2b(ConfigHelp,{});return null;}
|
package/lib/constant/domain.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a24_0x3129(_0x581295,_0x271698){const _0x10c7c0=a24_0x10c7();return a24_0x3129=function(_0x3129bc,_0x15fbfa){_0x3129bc=_0x3129bc-0x11e;let _0x2fb5e1=_0x10c7c0[_0x3129bc];return _0x2fb5e1;},a24_0x3129(_0x581295,_0x271698);}const a24_0x2780f0=a24_0x3129;function a24_0x10c7(){const _0x55a048=['148lwCVdF','22215JbURqs','48632OjJdJa','48444fJsNvX','6698030SFMHAb','1937931ZBpHLB','6tlpBZl','https://user-daily.lovrabet.com','online','246164JHwwcI','https://api.lovrabet.com','136003QrsVzQ','2WPhvKw','459adjWsc'];a24_0x10c7=function(){return _0x55a048;};return a24_0x10c7();}(function(_0x532132,_0xe626e7){const _0xd86cda=a24_0x3129,_0x1f779f=_0x532132();while(!![]){try{const _0x1cced3=parseInt(_0xd86cda(0x128))/0x1*(parseInt(_0xd86cda(0x12b))/0x2)+-parseInt(_0xd86cda(0x124))/0x3+-parseInt(_0xd86cda(0x11f))/0x4*(parseInt(_0xd86cda(0x120))/0x5)+parseInt(_0xd86cda(0x125))/0x6*(parseInt(_0xd86cda(0x12a))/0x7)+parseInt(_0xd86cda(0x121))/0x8*(parseInt(_0xd86cda(0x11e))/0x9)+parseInt(_0xd86cda(0x123))/0xa+-parseInt(_0xd86cda(0x122))/0xb;if(_0x1cced3===_0xe626e7)break;else _0x1f779f['push'](_0x1f779f['shift']());}catch(_0x320eed){_0x1f779f['push'](_0x1f779f['shift']());}}}(a24_0x10c7,0x6923d));import{getEnv}from'./env.js';export const getUserDomain=()=>getEnv()===a24_0x2780f0(0x127)?'https://user.lovrabet.com':a24_0x2780f0(0x126);export const getApiDomain=()=>getEnv()==='online'?a24_0x2780f0(0x129):'https://daily-api.lovrabet.com';
|
package/lib/constant/env.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a25_0x54e24f=a25_0x562a;(function(_0xf00e2c,_0x2cabe0){const _0x5f08e2=a25_0x562a,_0x4c6308=_0xf00e2c();while(!![]){try{const _0x3ba83f=parseInt(_0x5f08e2(0xb5))/0x1*(-parseInt(_0x5f08e2(0xb3))/0x2)+-parseInt(_0x5f08e2(0xb9))/0x3*(parseInt(_0x5f08e2(0xb4))/0x4)+-parseInt(_0x5f08e2(0xae))/0x5*(parseInt(_0x5f08e2(0xaf))/0x6)+-parseInt(_0x5f08e2(0xb7))/0x7+-parseInt(_0x5f08e2(0xb6))/0x8*(parseInt(_0x5f08e2(0xbb))/0x9)+-parseInt(_0x5f08e2(0xb8))/0xa+parseInt(_0x5f08e2(0xb0))/0xb*(parseInt(_0x5f08e2(0xb2))/0xc);if(_0x3ba83f===_0x2cabe0)break;else _0x4c6308['push'](_0x4c6308['shift']());}catch(_0x1b960c){_0x4c6308['push'](_0x4c6308['shift']());}}}(a25_0x1d46,0x98c8d));function a25_0x562a(_0x45b02a,_0x56c707){const _0x1d464b=a25_0x1d46();return a25_0x562a=function(_0x562a09,_0x25ddf8){_0x562a09=_0x562a09-0xae;let _0x484858=_0x1d464b[_0x562a09];return _0x484858;},a25_0x562a(_0x45b02a,_0x56c707);}let env=process[a25_0x54e24f(0xb1)][a25_0x54e24f(0xba)]||'online';export function getEnv(){return env;}function a25_0x1d46(){const _0x466bcb=['341iKIfAp','env','1531596mqhukO','2UWowUP','3234388ziziJg','278071uoyAsJ','16jhjxuN','8276240oRQjXL','5024080dzEgEj','3tPBoeH','LOVRABET_ENV','1429209eHVZEJ','10700lyZCBq','678cIZsxr'];a25_0x1d46=function(){return _0x466bcb;};return a25_0x1d46();}export function initEnv(_0x150ed2){env=_0x150ed2;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x3d21bb,_0x420aa6){const _0x2b5f0f=a26_0x5aba,_0x100076=_0x3d21bb();while(!![]){try{const _0x8fe3b0=-parseInt(_0x2b5f0f(0x134))/0x1+-parseInt(_0x2b5f0f(0x141))/0x2*(parseInt(_0x2b5f0f(0x137))/0x3)+parseInt(_0x2b5f0f(0x15b))/0x4+-parseInt(_0x2b5f0f(0x143))/0x5+parseInt(_0x2b5f0f(0x157))/0x6+parseInt(_0x2b5f0f(0x12a))/0x7*(-parseInt(_0x2b5f0f(0x144))/0x8)+parseInt(_0x2b5f0f(0x12d))/0x9*(parseInt(_0x2b5f0f(0x160))/0xa);if(_0x8fe3b0===_0x420aa6)break;else _0x100076['push'](_0x100076['shift']());}catch(_0x160eeb){_0x100076['push'](_0x100076['shift']());}}}(a26_0x34c0,0x78054));function a26_0x5aba(_0x30b400,_0x5d4c65){const _0x34c01c=a26_0x34c0();return a26_0x5aba=function(_0x5aba75,_0x1d5c36){_0x5aba75=_0x5aba75-0x125;let _0x2787cb=_0x34c01c[_0x5aba75];return _0x2787cb;},a26_0x5aba(_0x30b400,_0x5d4c65);}import{jsx as a26_0x11315b,jsxs as a26_0x45f732,Fragment as a26_0x5ae059}from'react/jsx-runtime';function a26_0x34c0(){const _0xba6f0=['2138692xxNRst','confirm-api-pull','green','creating','\x20\x20推荐选择\x20Yes,登录后可自动拉取并配置\x20API\x20接口','3962510nsEZHN','\x20直接回车确认,或输入自定义名称','column','登录失败','api-pull','项目名长度不能超过\x2050\x20个字符','应用AppCode长度不能超过\x20100\x20个字符','leftArrow','*\x20正在登录,请前往浏览器完成登录...','21qciNtJ','app-code','√\x20检测到有效登录状态','18NzOIzg','*\x20是否要先登录以便拉取\x20API\x20配置?','length','未设置','登录状态','trim','step','639512DUmgze','gray','project-name','12EvjmDL','map','label','*\x20创建新项目','rightArrow','项目名','login','login-prompt','应用AppCode只能包含字母、数字、连字符和下划线,且必须以字母或数字开头','应用AppCode不合法','117874JLemmV','return','1213520vUaJOd','512016WZagWB','!\x20未检测到有效登录','*\x20正在检查登录状态...','my-app','[可选]:\x20','Yes','*\x20应用AppCode\x20','value','slice','已登录','跳过登录','yellow','应用AppCode','red','test','\x20登录中...','\x20\x20使用\x20←→\x20选择,回车确认','绑定应用AppCode可自动配置\x20API,如:\x20app-c4c89304\x20(直接回车跳过)','delete','2846394OLlttR','login-check','项目名不合法','login-process'];a26_0x34c0=function(){return _0xba6f0;};return a26_0x34c0();}import{useState}from'react';import{Text,Box,useInput}from'ink';import{getIsSessionValid}from'../auth/is-session-valid.js';import{authServer}from'../auth/auth-server.js';export function EnhancedGuidedCreate(_0xa55386){const _0x1c0320=a26_0x5aba,{onCreate:_0x5b4ccb}=_0xa55386,[_0x74312d,_0x19b8bd]=useState('project-name'),[_0x2db95a,_0x430f02]=useState(''),[_0x1ea9e9,_0x432326]=useState(''),[_0x38587f,_0x382eee]=useState(''),[_0x7d8ab5,_0x2bfba7]=useState(''),[_0x550d9d,_0x1411a3]=useState([]),[_0x4017af,_0xacbf79]=useState(null),[_0x5d4717,_0x47bc94]=useState(![]),[_0xe430a7,_0x308ce6]=useState(![]),[_0x314858,_0x31d7c8]=useState(![]),[_0x538309,_0x5e1a17]=useState(0x0),[_0x3eae79,_0x37b79f]=useState(0x0),_0x56b451=_0x1c0320(0x147);function _0x323518(_0x35aba3){const _0x111260=_0x1c0320;if(_0x35aba3['length']>0x32)return{'valid':![],'message':_0x111260(0x126)};const _0x4bb111=/^[A-Za-z0-9][A-Za-z0-9_-]*$/;if(_0x35aba3?.['trim']()&&!_0x4bb111['test'](_0x35aba3))return{'valid':![],'message':'项目名只能以字母或数字开头,且只包含字母、数字、-\x20和\x20_'};return{'valid':!![]};}function _0x27403d(_0x379268){const _0x2c74a7=_0x1c0320;if(!_0x379268[_0x2c74a7(0x132)]())return{'valid':!![]};if(_0x379268['length']>0x64)return{'valid':![],'message':_0x2c74a7(0x127)};const _0x1cbe30=/^[a-zA-Z0-9][a-zA-Z0-9_-]*$/;if(!_0x1cbe30[_0x2c74a7(0x152)](_0x379268))return{'valid':![],'message':_0x2c74a7(0x13f)};return{'valid':!![]};}async function _0x1c79dd(){_0x47bc94(!![]);try{const _0x2a25f2=await getIsSessionValid();return _0xacbf79(_0x2a25f2),_0x2a25f2;}catch(_0x365b9c){return _0xacbf79(![]),![];}finally{_0x47bc94(![]);}}async function _0x4f6875(){_0x308ce6(!![]);try{const _0xec6df1=await authServer({'silent':!![]});return _0xacbf79(_0xec6df1),_0xec6df1;}catch(_0x77f2f2){return _0xacbf79(![]),![];}finally{_0x308ce6(![]);}}return useInput(async(_0x9217e1,_0x1d0cd3)=>{const _0x7094ad=_0x1c0320;if(_0x1d0cd3[_0x7094ad(0x128)]||_0x1d0cd3[_0x7094ad(0x13b)]){if(_0x74312d===_0x7094ad(0x15c)){_0x5e1a17(_0x2f1c68=>_0x2f1c68===0x0?0x1:0x0);return;}if(_0x74312d===_0x7094ad(0x13e)){_0x37b79f(_0x24feef=>_0x24feef===0x0?0x1:0x0);return;}}if(_0x1d0cd3[_0x7094ad(0x142)]){if(_0x74312d===_0x7094ad(0x136)){const _0x46051a=_0x38587f['trim']()||_0x56b451;if(_0x7d8ab5)return;_0x430f02(_0x46051a),_0x1411a3([{'step':'project-name','label':_0x7094ad(0x13c),'value':_0x46051a}]),_0x382eee(''),_0x2bfba7(''),_0x19b8bd(_0x7094ad(0x12b));return;}if(_0x74312d===_0x7094ad(0x12b)){if(_0x7d8ab5)return;const _0xb4d968=_0x38587f['trim']();_0x432326(_0xb4d968),_0x1411a3(_0x4013a9=>[..._0x4013a9,{'step':'app-code','label':_0x7094ad(0x150),'value':_0xb4d968||_0x7094ad(0x130)}]),_0x382eee(''),_0x2bfba7('');if(_0xb4d968){_0x19b8bd(_0x7094ad(0x158));const _0x387456=await _0x1c79dd();_0x387456?_0x19b8bd(_0x7094ad(0x15c)):_0x19b8bd(_0x7094ad(0x13e));}else _0x5b4ccb({'projectName':_0x2db95a,'appCode':undefined,'pullApi':![]}),_0x19b8bd(_0x7094ad(0x15e));return;}if(_0x74312d===_0x7094ad(0x15c)){const _0x3d1f5f=_0x538309===0x0;_0x31d7c8(_0x3d1f5f),_0x1411a3(_0x5e998e=>[..._0x5e998e,{'step':_0x7094ad(0x125),'label':'拉取API配置','value':_0x3d1f5f?'是':'否'}]),_0x5b4ccb({'projectName':_0x2db95a,'appCode':_0x1ea9e9,'pullApi':_0x3d1f5f}),_0x19b8bd(_0x7094ad(0x15e));return;}if(_0x74312d==='login-prompt'){const _0x39212a=_0x3eae79===0x0;if(_0x39212a){_0x19b8bd(_0x7094ad(0x15a));const _0x58860d=await _0x4f6875();_0x58860d?(_0x1411a3(_0x4cd43f=>[..._0x4cd43f,{'step':'login','label':_0x7094ad(0x131),'value':_0x7094ad(0x14d)}]),_0x19b8bd(_0x7094ad(0x15c))):(_0x1411a3(_0x17752d=>[..._0x17752d,{'step':_0x7094ad(0x13d),'label':'登录状态','value':_0x7094ad(0x163)}]),_0x5b4ccb({'projectName':_0x2db95a,'appCode':_0x1ea9e9,'pullApi':![]}),_0x19b8bd(_0x7094ad(0x15e)));}else _0x1411a3(_0x10e8cd=>[..._0x10e8cd,{'step':'login','label':_0x7094ad(0x131),'value':_0x7094ad(0x14e)}]),_0x5b4ccb({'projectName':_0x2db95a,'appCode':_0x1ea9e9,'pullApi':![]}),_0x19b8bd('creating');return;}}if(_0x1d0cd3['backspace']||_0x1d0cd3[_0x7094ad(0x156)]){_0x382eee(_0x3c935c=>{const _0x23b045=_0x7094ad,_0x4c9c23=_0x3c935c[_0x23b045(0x14c)](0x0,-0x1);if(_0x74312d===_0x23b045(0x136)){const {valid:_0x5b02d4,message:_0x333615}=_0x323518(_0x4c9c23);_0x2bfba7(_0x5b02d4?'':_0x333615||_0x23b045(0x159));}else{if(_0x74312d===_0x23b045(0x12b)){const {valid:_0x48d526,message:_0x19dcb1}=_0x27403d(_0x4c9c23);_0x2bfba7(_0x48d526?'':_0x19dcb1||_0x23b045(0x140));}}return _0x4c9c23;});return;}if(['creating',_0x7094ad(0x158),_0x7094ad(0x15a)]['includes'](_0x74312d))return;if(_0x74312d===_0x7094ad(0x15c)||_0x74312d===_0x7094ad(0x13e))return;_0x382eee(_0x4efa9a=>{const _0x16bb68=_0x7094ad,_0x449844=_0x4efa9a+_0x9217e1;if(_0x74312d===_0x16bb68(0x136)){const {valid:_0x3fd90e,message:_0x40bc0b}=_0x323518(_0x449844);_0x2bfba7(_0x3fd90e?'':_0x40bc0b||_0x16bb68(0x159));}else{if(_0x74312d==='app-code'){const {valid:_0x22eaea,message:_0x5280f7}=_0x27403d(_0x449844);_0x2bfba7(_0x22eaea?'':_0x5280f7||_0x16bb68(0x140));}}return _0x449844;});}),a26_0x45f732(Box,{'flexDirection':_0x1c0320(0x162),'marginTop':0x1,'children':[_0x550d9d[_0x1c0320(0x12f)]===0x0&&a26_0x11315b(Box,{'children':a26_0x11315b(Text,{'color':'cyan','children':_0x1c0320(0x13a)})}),_0x550d9d[_0x1c0320(0x138)](_0x2d3df6=>a26_0x45f732(Box,{'children':[a26_0x45f732(Text,{'color':_0x1c0320(0x15d),'children':['√\x20',_0x2d3df6[_0x1c0320(0x139)],':\x20']}),a26_0x11315b(Text,{'color':'cyan','children':_0x2d3df6[_0x1c0320(0x14b)]})]},_0x2d3df6[_0x1c0320(0x133)])),_0x74312d===_0x1c0320(0x136)&&a26_0x45f732(a26_0x5ae059,{'children':[a26_0x45f732(Box,{'children':[a26_0x11315b(Text,{'children':'*\x20项目名:\x20'}),_0x38587f?a26_0x11315b(Text,{'color':_0x1c0320(0x15d),'children':_0x38587f}):a26_0x11315b(Text,{'color':_0x1c0320(0x135),'children':_0x56b451}),_0x7d8ab5&&a26_0x45f732(Text,{'color':_0x1c0320(0x151),'children':['\x20←\x20',_0x7d8ab5]})]}),!_0x7d8ab5&&!_0x38587f&&a26_0x11315b(Box,{'children':a26_0x11315b(Text,{'color':_0x1c0320(0x135),'children':_0x1c0320(0x161)})})]}),_0x74312d===_0x1c0320(0x12b)&&a26_0x45f732(a26_0x5ae059,{'children':[a26_0x45f732(Box,{'children':[a26_0x11315b(Text,{'children':_0x1c0320(0x14a)}),a26_0x11315b(Text,{'color':_0x1c0320(0x135),'children':_0x1c0320(0x148)}),a26_0x11315b(Text,{'color':_0x1c0320(0x15d),'children':_0x38587f}),_0x7d8ab5&&a26_0x45f732(Text,{'color':'red','children':['\x20←\x20',_0x7d8ab5]})]}),!_0x7d8ab5&&a26_0x11315b(Box,{'children':a26_0x45f732(Text,{'color':'gray','children':['\x20',_0x1c0320(0x155)]})})]}),_0x74312d===_0x1c0320(0x158)&&a26_0x45f732(Box,{'children':[a26_0x11315b(Text,{'children':_0x1c0320(0x146)}),_0x5d4717&&a26_0x11315b(Text,{'color':_0x1c0320(0x135),'children':'\x20检查中...'})]}),_0x74312d===_0x1c0320(0x15c)&&a26_0x45f732(a26_0x5ae059,{'children':[a26_0x11315b(Box,{'children':a26_0x11315b(Text,{'color':_0x1c0320(0x15d),'children':_0x1c0320(0x12c)})}),a26_0x11315b(Box,{'marginTop':0x1,'children':a26_0x11315b(Text,{'children':'*\x20是否要自动拉取\x20API\x20配置?'})}),a26_0x45f732(Box,{'marginLeft':0x2,'children':[a26_0x45f732(Text,{'color':_0x538309===0x0?_0x1c0320(0x15d):_0x1c0320(0x135),'children':[_0x538309===0x0?'▶\x20':'\x20\x20',_0x1c0320(0x149)]}),a26_0x11315b(Text,{'children':'\x20'}),a26_0x45f732(Text,{'color':_0x538309===0x1?_0x1c0320(0x15d):_0x1c0320(0x135),'children':[_0x538309===0x1?'▶\x20':'\x20\x20','No']})]}),a26_0x11315b(Box,{'children':a26_0x11315b(Text,{'color':_0x1c0320(0x135),'children':_0x1c0320(0x154)})}),a26_0x11315b(Box,{'children':a26_0x11315b(Text,{'color':_0x1c0320(0x14f),'children':'\x20\x20推荐选择\x20Yes,可自动配置\x20API\x20接口'})})]}),_0x74312d===_0x1c0320(0x13e)&&a26_0x45f732(a26_0x5ae059,{'children':[a26_0x11315b(Box,{'children':a26_0x11315b(Text,{'color':_0x1c0320(0x14f),'children':_0x1c0320(0x145)})}),a26_0x11315b(Box,{'marginTop':0x1,'children':a26_0x11315b(Text,{'children':_0x1c0320(0x12e)})}),a26_0x45f732(Box,{'marginLeft':0x2,'children':[a26_0x45f732(Text,{'color':_0x3eae79===0x0?_0x1c0320(0x15d):'gray','children':[_0x3eae79===0x0?'▶\x20':'\x20\x20',_0x1c0320(0x149)]}),a26_0x11315b(Text,{'children':'\x20'}),a26_0x45f732(Text,{'color':_0x3eae79===0x1?'green':_0x1c0320(0x135),'children':[_0x3eae79===0x1?'▶\x20':'\x20\x20','No']})]}),a26_0x11315b(Box,{'children':a26_0x11315b(Text,{'color':_0x1c0320(0x135),'children':'\x20\x20使用\x20←→\x20选择,回车确认'})}),a26_0x11315b(Box,{'children':a26_0x11315b(Text,{'color':'yellow','children':_0x1c0320(0x15f)})})]}),_0x74312d===_0x1c0320(0x15a)&&a26_0x45f732(Box,{'children':[a26_0x11315b(Text,{'children':_0x1c0320(0x129)}),_0xe430a7&&a26_0x11315b(Text,{'color':_0x1c0320(0x135),'children':_0x1c0320(0x153)})]})]});}
|
|
1
|
+
(function(_0x402512,_0x3a1729){const _0x409da8=a26_0x22d0,_0x45da02=_0x402512();while(!![]){try{const _0x386c6b=-parseInt(_0x409da8(0x1f6))/0x1+-parseInt(_0x409da8(0x1f3))/0x2+parseInt(_0x409da8(0x20c))/0x3+parseInt(_0x409da8(0x205))/0x4*(-parseInt(_0x409da8(0x1ff))/0x5)+-parseInt(_0x409da8(0x1ef))/0x6*(parseInt(_0x409da8(0x20a))/0x7)+parseInt(_0x409da8(0x1fa))/0x8*(-parseInt(_0x409da8(0x1f8))/0x9)+parseInt(_0x409da8(0x1e4))/0xa;if(_0x386c6b===_0x3a1729)break;else _0x45da02['push'](_0x45da02['shift']());}catch(_0x539704){_0x45da02['push'](_0x45da02['shift']());}}}(a26_0x20ba,0xc5f5b));import{jsx as a26_0x576e02,jsxs as a26_0x272e05,Fragment as a26_0x5709ab}from'react/jsx-runtime';function a26_0x20ba(){const _0x4fcce5=['red','绑定应用AppCode可自动配置\x20API,如:\x20app-c4c89304\x20(直接回车跳过)','\x20←\x20','√\x20检测到有效登录状态','api-pull','应用AppCode不合法','project-name','slice','yellow','项目名长度不能超过\x2050\x20个字符','green','35049300oDKnlc','*\x20创建新项目','\x20检查中...','return','app-code','项目名','leftArrow','trim','\x20\x20使用\x20←→\x20选择,回车确认','!\x20未检测到有效登录','项目名不合法','808512vdkmVu','my-app','confirm-api-pull','login','2340052exAWuf','Yes','test','883464epyhNN','应用AppCode','27DiyRRE','登录状态','1124648IgnluN','value','跳过登录','creating','login-check','3045290MjoZxX','login-process','gray','rightArrow','未设置','\x20\x20推荐选择\x20Yes,登录后可自动拉取并配置\x20API\x20接口','4gQtNbL','*\x20正在登录,请前往浏览器完成登录...','backspace','*\x20应用AppCode\x20','step','56QjUecA','\x20\x20推荐选择\x20Yes,可自动配置\x20API\x20接口','4404660vwZNhg','应用AppCode只能包含字母、数字、连字符和下划线,且必须以字母或数字开头','\x20登录中...','拉取API配置','length','应用AppCode长度不能超过\x20100\x20个字符','已登录','login-prompt'];a26_0x20ba=function(){return _0x4fcce5;};return a26_0x20ba();}import{useState}from'react';function a26_0x22d0(_0xc0c85c,_0x56a90a){const _0x20ba02=a26_0x20ba();return a26_0x22d0=function(_0x22d074,_0xa9f9a2){_0x22d074=_0x22d074-0x1d5;let _0x50f686=_0x20ba02[_0x22d074];return _0x50f686;},a26_0x22d0(_0xc0c85c,_0x56a90a);}import{Text,Box,useInput}from'ink';import{getIsSessionValid}from'../auth/is-session-valid.js';import{authServer}from'../auth/auth-server.js';export function EnhancedGuidedCreate(_0x4dde7d){const _0xa28773=a26_0x22d0,{onCreate:_0x24d767}=_0x4dde7d,[_0x2b2d94,_0x23b38d]=useState('project-name'),[_0x3135b2,_0x252d92]=useState(''),[_0x7996c6,_0x308746]=useState(''),[_0x55c032,_0x4a4262]=useState(''),[_0x4dc370,_0x2dad70]=useState(''),[_0x15520c,_0xda5de8]=useState([]),[_0x473992,_0x4e6f63]=useState(null),[_0x3eaea3,_0xd9ef21]=useState(![]),[_0x3e07f2,_0x437371]=useState(![]),[_0x53c516,_0x1aebc7]=useState(![]),[_0x13d28c,_0x33ad6d]=useState(0x0),[_0x35b162,_0x308045]=useState(0x0),_0x39b412=_0xa28773(0x1f0);function _0x152869(_0x58c3c9){const _0x5e153e=_0xa28773;if(_0x58c3c9[_0x5e153e(0x1d5)]>0x32)return{'valid':![],'message':_0x5e153e(0x1e2)};const _0x50af45=/^[A-Za-z0-9][A-Za-z0-9_-]*$/;if(_0x58c3c9?.[_0x5e153e(0x1eb)]()&&!_0x50af45[_0x5e153e(0x1f5)](_0x58c3c9))return{'valid':![],'message':'项目名只能以字母或数字开头,且只包含字母、数字、-\x20和\x20_'};return{'valid':!![]};}function _0x1341c1(_0x228425){const _0x4c5cea=_0xa28773;if(!_0x228425[_0x4c5cea(0x1eb)]())return{'valid':!![]};if(_0x228425['length']>0x64)return{'valid':![],'message':_0x4c5cea(0x1d6)};const _0x214278=/^[a-zA-Z0-9][a-zA-Z0-9_-]*$/;if(!_0x214278[_0x4c5cea(0x1f5)](_0x228425))return{'valid':![],'message':_0x4c5cea(0x20d)};return{'valid':!![]};}async function _0x5bea1f(){_0xd9ef21(!![]);try{const _0x187490=await getIsSessionValid();return _0x4e6f63(_0x187490),_0x187490;}catch(_0x34009b){return _0x4e6f63(![]),![];}finally{_0xd9ef21(![]);}}async function _0x57078c(){_0x437371(!![]);try{const _0x5e98f7=await authServer({'silent':!![]});return _0x4e6f63(_0x5e98f7),_0x5e98f7;}catch(_0x4b7b06){return _0x4e6f63(![]),![];}finally{_0x437371(![]);}}return useInput(async(_0x155fc7,_0x1d400d)=>{const _0x39f773=_0xa28773;if(_0x1d400d[_0x39f773(0x1ea)]||_0x1d400d[_0x39f773(0x202)]){if(_0x2b2d94==='confirm-api-pull'){_0x33ad6d(_0x3bc7b0=>_0x3bc7b0===0x0?0x1:0x0);return;}if(_0x2b2d94===_0x39f773(0x1d8)){_0x308045(_0x49e201=>_0x49e201===0x0?0x1:0x0);return;}}if(_0x1d400d[_0x39f773(0x1e7)]){if(_0x2b2d94===_0x39f773(0x1df)){const _0xa114a9=_0x55c032[_0x39f773(0x1eb)]()||_0x39b412;if(_0x4dc370)return;_0x252d92(_0xa114a9),_0xda5de8([{'step':_0x39f773(0x1df),'label':_0x39f773(0x1e9),'value':_0xa114a9}]),_0x4a4262(''),_0x2dad70(''),_0x23b38d(_0x39f773(0x1e8));return;}if(_0x2b2d94===_0x39f773(0x1e8)){if(_0x4dc370)return;const _0x439088=_0x55c032['trim']();_0x308746(_0x439088),_0xda5de8(_0x19a998=>[..._0x19a998,{'step':'app-code','label':_0x39f773(0x1f7),'value':_0x439088||_0x39f773(0x203)}]),_0x4a4262(''),_0x2dad70('');if(_0x439088){_0x23b38d('login-check');const _0x16600b=await _0x5bea1f();_0x16600b?_0x23b38d('confirm-api-pull'):_0x23b38d(_0x39f773(0x1d8));}else _0x24d767({'projectName':_0x3135b2,'appCode':undefined,'pullApi':![]}),_0x23b38d(_0x39f773(0x1fd));return;}if(_0x2b2d94==='confirm-api-pull'){const _0x5d3424=_0x13d28c===0x0;_0x1aebc7(_0x5d3424),_0xda5de8(_0x3f7155=>[..._0x3f7155,{'step':_0x39f773(0x1dd),'label':_0x39f773(0x20f),'value':_0x5d3424?'是':'否'}]),_0x24d767({'projectName':_0x3135b2,'appCode':_0x7996c6,'pullApi':_0x5d3424}),_0x23b38d(_0x39f773(0x1fd));return;}if(_0x2b2d94===_0x39f773(0x1d8)){const _0x53b94c=_0x35b162===0x0;if(_0x53b94c){_0x23b38d(_0x39f773(0x200));const _0xc84724=await _0x57078c();_0xc84724?(_0xda5de8(_0x579bf2=>[..._0x579bf2,{'step':_0x39f773(0x1f2),'label':_0x39f773(0x1f9),'value':_0x39f773(0x1d7)}]),_0x23b38d(_0x39f773(0x1f1))):(_0xda5de8(_0x1c1399=>[..._0x1c1399,{'step':_0x39f773(0x1f2),'label':_0x39f773(0x1f9),'value':'登录失败'}]),_0x24d767({'projectName':_0x3135b2,'appCode':_0x7996c6,'pullApi':![]}),_0x23b38d('creating'));}else _0xda5de8(_0x56abeb=>[..._0x56abeb,{'step':_0x39f773(0x1f2),'label':_0x39f773(0x1f9),'value':_0x39f773(0x1fc)}]),_0x24d767({'projectName':_0x3135b2,'appCode':_0x7996c6,'pullApi':![]}),_0x23b38d('creating');return;}}if(_0x1d400d[_0x39f773(0x207)]||_0x1d400d['delete']){_0x4a4262(_0x39373c=>{const _0xecc437=_0x39f773,_0x1068f9=_0x39373c[_0xecc437(0x1e0)](0x0,-0x1);if(_0x2b2d94===_0xecc437(0x1df)){const {valid:_0x1bebf8,message:_0x266d21}=_0x152869(_0x1068f9);_0x2dad70(_0x1bebf8?'':_0x266d21||'项目名不合法');}else{if(_0x2b2d94===_0xecc437(0x1e8)){const {valid:_0x1dedf7,message:_0x355c27}=_0x1341c1(_0x1068f9);_0x2dad70(_0x1dedf7?'':_0x355c27||_0xecc437(0x1de));}}return _0x1068f9;});return;}if([_0x39f773(0x1fd),'login-check',_0x39f773(0x200)]['includes'](_0x2b2d94))return;if(_0x2b2d94===_0x39f773(0x1f1)||_0x2b2d94==='login-prompt')return;_0x4a4262(_0x489a1b=>{const _0x208d67=_0x39f773,_0x39dd1e=_0x489a1b+_0x155fc7;if(_0x2b2d94===_0x208d67(0x1df)){const {valid:_0x529998,message:_0x5add2b}=_0x152869(_0x39dd1e);_0x2dad70(_0x529998?'':_0x5add2b||_0x208d67(0x1ee));}else{if(_0x2b2d94===_0x208d67(0x1e8)){const {valid:_0x385e7b,message:_0x113140}=_0x1341c1(_0x39dd1e);_0x2dad70(_0x385e7b?'':_0x113140||_0x208d67(0x1de));}}return _0x39dd1e;});}),a26_0x272e05(Box,{'flexDirection':'column','marginTop':0x1,'children':[_0x15520c[_0xa28773(0x1d5)]===0x0&&a26_0x576e02(Box,{'children':a26_0x576e02(Text,{'color':'cyan','children':_0xa28773(0x1e5)})}),_0x15520c['map'](_0x274983=>a26_0x272e05(Box,{'children':[a26_0x272e05(Text,{'color':'green','children':['√\x20',_0x274983['label'],':\x20']}),a26_0x576e02(Text,{'color':'cyan','children':_0x274983[_0xa28773(0x1fb)]})]},_0x274983[_0xa28773(0x209)])),_0x2b2d94===_0xa28773(0x1df)&&a26_0x272e05(a26_0x5709ab,{'children':[a26_0x272e05(Box,{'children':[a26_0x576e02(Text,{'children':'*\x20项目名:\x20'}),_0x55c032?a26_0x576e02(Text,{'color':_0xa28773(0x1e3),'children':_0x55c032}):a26_0x576e02(Text,{'color':_0xa28773(0x201),'children':_0x39b412}),_0x4dc370&&a26_0x272e05(Text,{'color':_0xa28773(0x1d9),'children':[_0xa28773(0x1db),_0x4dc370]})]}),!_0x4dc370&&!_0x55c032&&a26_0x576e02(Box,{'children':a26_0x576e02(Text,{'color':_0xa28773(0x201),'children':'\x20直接回车确认,或输入自定义名称'})})]}),_0x2b2d94===_0xa28773(0x1e8)&&a26_0x272e05(a26_0x5709ab,{'children':[a26_0x272e05(Box,{'children':[a26_0x576e02(Text,{'children':_0xa28773(0x208)}),a26_0x576e02(Text,{'color':'gray','children':'[可选]:\x20'}),a26_0x576e02(Text,{'color':_0xa28773(0x1e3),'children':_0x55c032}),_0x4dc370&&a26_0x272e05(Text,{'color':_0xa28773(0x1d9),'children':[_0xa28773(0x1db),_0x4dc370]})]}),!_0x4dc370&&a26_0x576e02(Box,{'children':a26_0x272e05(Text,{'color':'gray','children':['\x20',_0xa28773(0x1da)]})})]}),_0x2b2d94===_0xa28773(0x1fe)&&a26_0x272e05(Box,{'children':[a26_0x576e02(Text,{'children':'*\x20正在检查登录状态...'}),_0x3eaea3&&a26_0x576e02(Text,{'color':_0xa28773(0x201),'children':_0xa28773(0x1e6)})]}),_0x2b2d94==='confirm-api-pull'&&a26_0x272e05(a26_0x5709ab,{'children':[a26_0x576e02(Box,{'children':a26_0x576e02(Text,{'color':_0xa28773(0x1e3),'children':_0xa28773(0x1dc)})}),a26_0x576e02(Box,{'marginTop':0x1,'children':a26_0x576e02(Text,{'children':'*\x20是否要自动拉取\x20API\x20配置?'})}),a26_0x272e05(Box,{'marginLeft':0x2,'children':[a26_0x272e05(Text,{'color':_0x13d28c===0x0?_0xa28773(0x1e3):_0xa28773(0x201),'children':[_0x13d28c===0x0?'▶\x20':'\x20\x20',_0xa28773(0x1f4)]}),a26_0x576e02(Text,{'children':'\x20'}),a26_0x272e05(Text,{'color':_0x13d28c===0x1?_0xa28773(0x1e3):_0xa28773(0x201),'children':[_0x13d28c===0x1?'▶\x20':'\x20\x20','No']})]}),a26_0x576e02(Box,{'children':a26_0x576e02(Text,{'color':_0xa28773(0x201),'children':_0xa28773(0x1ec)})}),a26_0x576e02(Box,{'children':a26_0x576e02(Text,{'color':_0xa28773(0x1e1),'children':_0xa28773(0x20b)})})]}),_0x2b2d94===_0xa28773(0x1d8)&&a26_0x272e05(a26_0x5709ab,{'children':[a26_0x576e02(Box,{'children':a26_0x576e02(Text,{'color':_0xa28773(0x1e1),'children':_0xa28773(0x1ed)})}),a26_0x576e02(Box,{'marginTop':0x1,'children':a26_0x576e02(Text,{'children':'*\x20是否要先登录以便拉取\x20API\x20配置?'})}),a26_0x272e05(Box,{'marginLeft':0x2,'children':[a26_0x272e05(Text,{'color':_0x35b162===0x0?_0xa28773(0x1e3):_0xa28773(0x201),'children':[_0x35b162===0x0?'▶\x20':'\x20\x20','Yes']}),a26_0x576e02(Text,{'children':'\x20'}),a26_0x272e05(Text,{'color':_0x35b162===0x1?'green':_0xa28773(0x201),'children':[_0x35b162===0x1?'▶\x20':'\x20\x20','No']})]}),a26_0x576e02(Box,{'children':a26_0x576e02(Text,{'color':_0xa28773(0x201),'children':_0xa28773(0x1ec)})}),a26_0x576e02(Box,{'children':a26_0x576e02(Text,{'color':_0xa28773(0x1e1),'children':_0xa28773(0x204)})})]}),_0x2b2d94===_0xa28773(0x200)&&a26_0x272e05(Box,{'children':[a26_0x576e02(Text,{'children':_0xa28773(0x206)}),_0x3e07f2&&a26_0x576e02(Text,{'color':'gray','children':_0xa28773(0x20e)})]})]});}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x59d443,_0xca8014){const _0x39bb79=a27_0x1c95,_0x1ee3a4=_0x59d443();while(!![]){try{const _0x576801=parseInt(_0x39bb79(0x188))/0x1+-parseInt(_0x39bb79(0x185))/0x2*(parseInt(_0x39bb79(0x189))/0x3)+parseInt(_0x39bb79(0x180))/0x4+-parseInt(_0x39bb79(0x182))/0x5*(parseInt(_0x39bb79(0x183))/0x6)+-parseInt(_0x39bb79(0x186))/0x7+parseInt(_0x39bb79(0x18b))/0x8+-parseInt(_0x39bb79(0x18a))/0x9;if(_0x576801===_0xca8014)break;else _0x1ee3a4['push'](_0x1ee3a4['shift']());}catch(_0x1f1ef4){_0x1ee3a4['push'](_0x1ee3a4['shift']());}}}(a27_0x3192,0x6b013));function a27_0x1c95(_0x3b3979,_0x134450){const _0x31920c=a27_0x3192();return a27_0x1c95=function(_0x1c95df,_0xac48b0){_0x1c95df=_0x1c95df-0x180;let _0x2aaf81=_0x31920c[_0x1c95df];return _0x2aaf81;},a27_0x1c95(_0x3b3979,_0x134450);}function a27_0x3192(){const _0x58c7e5=['2XcsODS','1364923UpZkjy','toFixed','799732wPhElV','1382529JOHvyG','3458466EJSJvp','4273080JxzkyM','2054552FicLZx','now','153795axnIJW','72lSjFzi','replace'];a27_0x3192=function(){return _0x58c7e5;};return a27_0x3192();}export function formatElapsed(_0x54fd3d){const _0x4b807d=a27_0x1c95,_0x653991=Date[_0x4b807d(0x181)]()-_0x54fd3d;if(_0x653991<0x3e8)return _0x653991+'ms';const _0x41c39d=(_0x653991/0x3e8)[_0x4b807d(0x187)](0x2),_0x9c8f92=_0x41c39d[_0x4b807d(0x184)](/\.?0+$/u,'');return _0x9c8f92+'s';}
|
package/lib/create-app/main.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x596fb6,_0x1b8d1f){const _0xa8b9e2=a28_0x450c,_0x1b8986=_0x596fb6();while(!![]){try{const _0x3e79cf=parseInt(_0xa8b9e2(0xd7))/0x1*(-parseInt(_0xa8b9e2(0xe4))/0x2)+parseInt(_0xa8b9e2(0xe6))/0x3*(-parseInt(_0xa8b9e2(0x9c))/0x4)+parseInt(_0xa8b9e2(0xa1))/0x5*(parseInt(_0xa8b9e2(0xb0))/0x6)+-parseInt(_0xa8b9e2(0xc8))/0x7*(parseInt(_0xa8b9e2(0xe5))/0x8)+-parseInt(_0xa8b9e2(0xc2))/0x9*(parseInt(_0xa8b9e2(0xcd))/0xa)+parseInt(_0xa8b9e2(0xab))/0xb*(parseInt(_0xa8b9e2(0xc1))/0xc)+-parseInt(_0xa8b9e2(0xd5))/0xd*(-parseInt(_0xa8b9e2(0xc0))/0xe);if(_0x3e79cf===_0x1b8d1f)break;else _0x1b8986['push'](_0x1b8986['shift']());}catch(_0x3c75e8){_0x1b8986['push'](_0x1b8986['shift']());}}}(a28_0x22a7,0xddf4e));import{jsx as a28_0x3cfb72,Fragment as a28_0x4479c2,jsxs as a28_0x33d72d}from'react/jsx-runtime';function a28_0x22a7(){const _0x41fd7d=['lovrabet\x20config\x20set\x20app\x20[app-code]','配置应用AppCode失败:\x20','7xgkskn','*\x20正在为项目\x20','项目创建完成:\x20','\x20已存在,请使用其他项目名','pullApi','116380tbDtsW','1.\x20','\x20|\x20应用AppCode:\x20','doTask','🎉\x20项目创建成功!','warn','!\x20API\x20配置拉取失败,可稍后手动执行:\x20lovrabet\x20api\x20pull','启动项目:\x20','117fbroJP','🔗\x20应用AppCode:\x20','39161zsvjuM','项目名称:\x20','info','projectCode','🚀\x20接下来可以:','stringify','lovrabet\x20api\x20pull','2.\x20','配置AppCode:\x20','\x20&&\x20lovrabet\x20start','message','error','√\x20配置文件已创建,可稍后使用\x20\x27lovrabet\x20config\x20set\x20app\x20<app-code>\x27\x20配置','28OcUtxC','10642096KVNRtU','3vfliaB','3948844GQLdIr','setLogPath','📁\x20项目名称:\x20','gray','yellow','20rLOfWh','join','projectName','cwd','create','\x20√\x20','*\x20配置文件路径:\x20','toISOString','resolve','repeat','22VJNfra','API\x20配置拉取失败:\x20','log','📦\x20API配置:\x20','utf8','942822yaMfhN','.lovrabetrc','appCode','*\x20正在拉取\x20API\x20配置...','3.\x20','\x20创建配置文件','cyan','white','column','开始创建项目:\x20','拉取API配置:\x20','green','success','existsSync','配置应用AppCode:\x20','项目创建失败:\x20','3643654gVPhuM','9292776ANsJEd','576PFMENt','cd\x20','未配置','需手动拉取'];a28_0x22a7=function(){return _0x41fd7d;};return a28_0x22a7();}import a28_0x463791 from'node:path';import a28_0x357948 from'node:fs';import{Box,Text}from'ink';import{useEffect,useState}from'react';import{EnhancedGuidedCreate}from'./enhanced-guided-create.js';import{pullApiSilent}from'../api/pull-silent.js';import{useCopyProjectTemplate}from'./use-copy-project-template.js';import{useInstallDependencies}from'./use-install-dependencies.js';import{useFormatCode}from'./use-format-code.js';import{TaskFinished}from'./task-finished.js';import{TaskRunning}from'./task-running.js';function a28_0x450c(_0x1c92be,_0x44a8cb){const _0x22a7d0=a28_0x22a7();return a28_0x450c=function(_0x450c09,_0x46bac7){_0x450c09=_0x450c09-0x9c;let _0x45f675=_0x22a7d0[_0x450c09];return _0x45f675;},a28_0x450c(_0x1c92be,_0x44a8cb);}import{logger}from'../utils/logger.js';export function CreateApp(_0x215266){const _0x3fb03c=a28_0x450c,[_0x46f4af,_0x472c59]=useState(![]),[_0x221a15,_0x505d4b]=useState(![]),[_0x37380d,_0x314c0d]=useState(null),_0x258d6c=useCopyProjectTemplate(),_0x74fcc=useInstallDependencies(),_0x44c33d=useFormatCode(),_0x4bde56=async _0x3a5148=>{const _0x26fced=a28_0x450c,_0x3f43e1=a28_0x463791[_0x26fced(0xa9)](process['cwd'](),_0x3a5148[_0x26fced(0xa3)]);if(a28_0x357948[_0x26fced(0xbd)](_0x3f43e1)){console[_0x26fced(0xe2)]('×\x20项目目录\x20'+_0x3a5148[_0x26fced(0xa3)]+_0x26fced(0xcb));return;}_0x314c0d(_0x3a5148),_0x472c59(!![]),logger[_0x26fced(0x9d)](_0x3f43e1),logger[_0x26fced(0xd9)](_0x26fced(0xa5),_0x26fced(0xb9)+_0x3a5148[_0x26fced(0xa3)],{'projectDir':_0x3f43e1,'appCode':_0x3a5148['appCode']});try{await _0x258d6c[_0x26fced(0xd0)](_0x3a5148[_0x26fced(0xa3)]),await _0x74fcc[_0x26fced(0xd0)](_0x3a5148[_0x26fced(0xa3)]),await _0x44c33d[_0x26fced(0xd0)](_0x3a5148['projectName']),await _0x113bd6(_0x3a5148['projectName'],_0x3a5148[_0x26fced(0xb2)]||'');if(_0x3a5148[_0x26fced(0xcc)]&&_0x3a5148[_0x26fced(0xb2)]){console[_0x26fced(0xad)](_0x26fced(0xb3));const _0x5d849a=await pullApiSilent(_0x3a5148[_0x26fced(0xb2)],undefined,_0x3f43e1);_0x5d849a?(console[_0x26fced(0xad)]('√\x20API\x20配置拉取完成'),logger[_0x26fced(0xd9)](_0x26fced(0xa5),'API\x20配置拉取成功:\x20'+_0x3a5148[_0x26fced(0xb2)],{'projectDir':_0x3f43e1,'appCode':_0x3a5148[_0x26fced(0xb2)]})):(console['log'](_0x26fced(0xd3)),logger[_0x26fced(0xd2)](_0x26fced(0xa5),_0x26fced(0xac)+_0x3a5148[_0x26fced(0xb2)],{'projectDir':_0x3f43e1,'appCode':_0x3a5148[_0x26fced(0xb2)]}));}logger[_0x26fced(0xbc)]('create',_0x26fced(0xca)+_0x3a5148['projectName']),_0x505d4b(!![]),_0x472c59(![]);}catch(_0x36a8a0){logger[_0x26fced(0xe2)](_0x26fced(0xa5),_0x26fced(0xbf)+_0x3a5148['projectName'],{'error':_0x36a8a0 instanceof Error?_0x36a8a0[_0x26fced(0xe1)]:String(_0x36a8a0)}),_0x472c59(![]);throw _0x36a8a0;}},_0x924d66=async _0xb243d5=>{await _0x4bde56({'projectName':_0xb243d5});},_0x113bd6=async(_0x4c6834,_0x25c220)=>{const _0x1ec70c=a28_0x450c,_0x5b7e4f=a28_0x463791[_0x1ec70c(0xa9)](process[_0x1ec70c(0xa4)](),_0x4c6834),_0x2ce808=a28_0x463791[_0x1ec70c(0xa2)](_0x5b7e4f,_0x1ec70c(0xb1));try{_0x25c220?console[_0x1ec70c(0xad)]('*\x20正在为项目\x20'+_0x4c6834+'\x20配置应用AppCode:\x20'+_0x25c220):console[_0x1ec70c(0xad)](_0x1ec70c(0xc9)+_0x4c6834+_0x1ec70c(0xb5));console[_0x1ec70c(0xad)](_0x1ec70c(0xa7)+_0x2ce808);const _0x394255={'app':_0x25c220||'','createdAt':new Date()[_0x1ec70c(0xa8)](),'version':'1.0.0'};a28_0x357948['writeFileSync'](_0x2ce808,JSON[_0x1ec70c(0xdc)](_0x394255,null,0x2),_0x1ec70c(0xaf)),_0x25c220?console[_0x1ec70c(0xad)]('√\x20配置文件已创建,应用AppCode:\x20'+_0x25c220):console[_0x1ec70c(0xad)](_0x1ec70c(0xe3)),logger['info']('create',_0x1ec70c(0xbe)+_0x25c220,{'projectName':_0x4c6834,'configFile':_0x1ec70c(0xb1)});}catch(_0x579a09){logger['error'](_0x1ec70c(0xa5),_0x1ec70c(0xc7)+_0x25c220,{'projectName':_0x4c6834,'error':_0x579a09 instanceof Error?_0x579a09[_0x1ec70c(0xe1)]:String(_0x579a09)});}};useEffect(()=>{const _0xeacd32=a28_0x450c;_0x215266['projectCode']&&_0x924d66(_0x215266[_0xeacd32(0xda)]);},[_0x215266['projectCode']]);if(!_0x46f4af&&!_0x221a15&&!_0x215266['projectCode'])return a28_0x3cfb72(EnhancedGuidedCreate,{'onCreate':_0x4bde56});if(_0x46f4af)return a28_0x33d72d(a28_0x4479c2,{'children':[a28_0x33d72d(Box,{'marginTop':0x1,'children':[a28_0x3cfb72(Box,{'width':'1'}),a28_0x3cfb72(Text,{'color':'green','children':_0x3fb03c(0xa6)}),a28_0x3cfb72(Text,{'children':_0x3fb03c(0xd8)}),a28_0x3cfb72(Text,{'color':'green','children':_0x37380d?.[_0x3fb03c(0xa3)]}),_0x37380d?.['appCode']&&a28_0x33d72d(a28_0x4479c2,{'children':[a28_0x3cfb72(Text,{'children':_0x3fb03c(0xcf)}),a28_0x3cfb72(Text,{'color':_0x3fb03c(0xb6),'children':_0x37380d[_0x3fb03c(0xb2)]})]})]}),a28_0x3cfb72(TaskRunning,{..._0x258d6c}),a28_0x3cfb72(TaskRunning,{..._0x74fcc}),a28_0x3cfb72(TaskRunning,{..._0x44c33d})]});if(_0x221a15)return a28_0x33d72d(a28_0x4479c2,{'children':[a28_0x33d72d(Box,{'marginTop':0x1,'children':[a28_0x3cfb72(Box,{'width':'1'}),a28_0x3cfb72(Text,{'color':'green','children':'\x20√\x20'}),a28_0x3cfb72(Text,{'children':_0x3fb03c(0xd8)}),a28_0x3cfb72(Text,{'color':'green','children':_0x37380d?.['projectName']}),_0x37380d?.[_0x3fb03c(0xb2)]&&a28_0x33d72d(a28_0x4479c2,{'children':[a28_0x3cfb72(Text,{'children':'\x20|\x20应用AppCode:\x20'}),a28_0x3cfb72(Text,{'color':_0x3fb03c(0xb6),'children':_0x37380d['appCode']})]})]}),a28_0x3cfb72(TaskFinished,{..._0x258d6c}),a28_0x3cfb72(TaskFinished,{..._0x74fcc}),a28_0x3cfb72(TaskFinished,{..._0x44c33d}),a28_0x3cfb72(Box,{'marginTop':0x1,'marginBottom':0x1,'children':a28_0x3cfb72(Text,{'color':_0x3fb03c(0xbb),'children':'─'[_0x3fb03c(0xaa)](0x3c)})}),a28_0x3cfb72(Box,{'children':a28_0x3cfb72(Text,{'color':_0x3fb03c(0xbb),'bold':!![],'children':_0x3fb03c(0xd1)})}),a28_0x33d72d(Box,{'marginTop':0x1,'flexDirection':_0x3fb03c(0xb8),'children':[a28_0x33d72d(Box,{'children':[a28_0x3cfb72(Text,{'color':'cyan','children':_0x3fb03c(0x9e)}),a28_0x3cfb72(Text,{'color':'white','bold':!![],'children':_0x37380d?.['projectName']})]}),_0x37380d?.[_0x3fb03c(0xb2)]&&a28_0x33d72d(Box,{'children':[a28_0x3cfb72(Text,{'color':_0x3fb03c(0xb6),'children':_0x3fb03c(0xd6)}),a28_0x3cfb72(Text,{'color':_0x3fb03c(0xb7),'bold':!![],'children':_0x37380d['appCode']})]}),a28_0x33d72d(Box,{'children':[a28_0x3cfb72(Text,{'color':'cyan','children':_0x3fb03c(0xae)}),_0x37380d?.[_0x3fb03c(0xcc)]?a28_0x3cfb72(Text,{'color':'green','bold':!![],'children':'已自动拉取\x20✓'}):_0x37380d?.[_0x3fb03c(0xb2)]?a28_0x3cfb72(Text,{'color':'yellow','bold':!![],'children':_0x3fb03c(0xc5)}):a28_0x3cfb72(Text,{'color':_0x3fb03c(0x9f),'bold':!![],'children':_0x3fb03c(0xc4)})]})]}),a28_0x3cfb72(Box,{'marginTop':0x1,'marginBottom':0x1,'children':a28_0x3cfb72(Text,{'color':_0x3fb03c(0xb6),'bold':!![],'children':_0x3fb03c(0xdb)})}),a28_0x33d72d(Box,{'marginLeft':0x2,'flexDirection':'column','children':[a28_0x33d72d(Box,{'children':[a28_0x3cfb72(Text,{'color':_0x3fb03c(0xbb),'children':_0x3fb03c(0xce)}),a28_0x3cfb72(Text,{'color':'white','children':_0x3fb03c(0xd4)}),a28_0x3cfb72(Text,{'color':_0x3fb03c(0xb6),'bold':!![],'children':_0x3fb03c(0xc3)+_0x37380d?.[_0x3fb03c(0xa3)]+_0x3fb03c(0xe0)})]}),_0x37380d?.[_0x3fb03c(0xb2)]&&!_0x37380d?.['pullApi']&&a28_0x33d72d(Box,{'children':[a28_0x3cfb72(Text,{'color':_0x3fb03c(0xa0),'children':_0x3fb03c(0xde)}),a28_0x3cfb72(Text,{'color':_0x3fb03c(0xb7),'children':_0x3fb03c(0xba)}),a28_0x3cfb72(Text,{'color':'cyan','bold':!![],'children':_0x3fb03c(0xdd)})]}),!_0x37380d?.[_0x3fb03c(0xb2)]&&a28_0x33d72d(a28_0x4479c2,{'children':[a28_0x33d72d(Box,{'children':[a28_0x3cfb72(Text,{'color':_0x3fb03c(0x9f),'children':_0x3fb03c(0xde)}),a28_0x3cfb72(Text,{'color':_0x3fb03c(0xb7),'children':_0x3fb03c(0xdf)}),a28_0x3cfb72(Text,{'color':'cyan','bold':!![],'children':_0x3fb03c(0xc6)})]}),a28_0x33d72d(Box,{'children':[a28_0x3cfb72(Text,{'color':'gray','children':_0x3fb03c(0xb4)}),a28_0x3cfb72(Text,{'color':_0x3fb03c(0xb7),'children':'拉取API配置:\x20'}),a28_0x3cfb72(Text,{'color':'cyan','bold':!![],'children':'lovrabet\x20api\x20pull\x20[app-code]'})]})]})]}),a28_0x3cfb72(Box,{'marginTop':0x1,'children':a28_0x3cfb72(Text,{'color':_0x3fb03c(0xbb),'children':'─'[_0x3fb03c(0xaa)](0x3c)})})]});return null;}
|
|
1
|
+
(function(_0x122d17,_0x3368b0){const _0x26d89=a28_0x1929,_0x1cbdbf=_0x122d17();while(!![]){try{const _0x3262ef=parseInt(_0x26d89(0x9a))/0x1*(-parseInt(_0x26d89(0xaf))/0x2)+-parseInt(_0x26d89(0xae))/0x3*(-parseInt(_0x26d89(0xb7))/0x4)+parseInt(_0x26d89(0xa7))/0x5*(-parseInt(_0x26d89(0xbc))/0x6)+parseInt(_0x26d89(0xad))/0x7+-parseInt(_0x26d89(0xac))/0x8*(-parseInt(_0x26d89(0xd4))/0x9)+-parseInt(_0x26d89(0xa6))/0xa+parseInt(_0x26d89(0xc2))/0xb;if(_0x3262ef===_0x3368b0)break;else _0x1cbdbf['push'](_0x1cbdbf['shift']());}catch(_0x3a0349){_0x1cbdbf['push'](_0x1cbdbf['shift']());}}}(a28_0x5267,0xdb052));import{jsx as a28_0x1906bd,Fragment as a28_0x4b9c4a,jsxs as a28_0x47bbcd}from'react/jsx-runtime';import a28_0x45c8fd from'node:path';import a28_0x48465c from'node:fs';import{Box,Text}from'ink';import{useEffect,useState}from'react';import{EnhancedGuidedCreate}from'./enhanced-guided-create.js';function a28_0x5267(){const _0x183af3=['已自动拉取\x20✓','856sZyJjU','1478211YJIxQQ','5982DTpdAd','334VUiuur','gray','√\x20配置文件已创建,应用AppCode:\x20','*\x20正在为项目\x20','1.\x20','stringify','3.\x20','yellow','2060OFSRvH','*\x20正在拉取\x20API\x20配置...','启动项目:\x20','📁\x20项目名称:\x20','lovrabet\x20api\x20pull\x20[app-code]','498642ucyjFc','√\x20配置文件已创建,可稍后使用\x20\x27lovrabet\x20config\x20set\x20app\x20<app-code>\x27\x20配置','配置AppCode:\x20','API\x20配置拉取成功:\x20','lovrabet\x20api\x20pull','配置应用AppCode失败:\x20','731434ClycSm','配置应用AppCode:\x20','\x20&&\x20lovrabet\x20start','error','\x20创建配置文件','√\x20API\x20配置拉取完成','log','projectCode','cwd','拉取API配置:\x20','green','toISOString','lovrabet\x20config\x20set\x20app\x20[app-code]','*\x20配置文件路径:\x20','.lovrabetrc','pullApi','🔗\x20应用AppCode:\x20','message','76239fTqLFZ','setLogPath','\x20已存在,请使用其他项目名','\x20|\x20应用AppCode:\x20','resolve','1.0.0','success','create','cyan','doTask','452xXgQrJ','warn','projectName','utf8','repeat','2.\x20','开始创建项目:\x20','white','column','info','\x20√\x20','🎉\x20项目创建成功!','3242070CyuxZq','55zDXxYl','appCode','需手动拉取','未配置'];a28_0x5267=function(){return _0x183af3;};return a28_0x5267();}import{pullApiSilent}from'../api/pull-silent.js';import{useCopyProjectTemplate}from'./use-copy-project-template.js';function a28_0x1929(_0x41408e,_0x5cd3f5){const _0x5267bf=a28_0x5267();return a28_0x1929=function(_0x19298e,_0x2eb27f){_0x19298e=_0x19298e-0x92;let _0x22634b=_0x5267bf[_0x19298e];return _0x22634b;},a28_0x1929(_0x41408e,_0x5cd3f5);}import{useInstallDependencies}from'./use-install-dependencies.js';import{useFormatCode}from'./use-format-code.js';import{TaskFinished}from'./task-finished.js';import{TaskRunning}from'./task-running.js';import{logger}from'../utils/logger.js';export function CreateApp(_0x3f3a93){const _0x173f03=a28_0x1929,[_0x551021,_0x135a36]=useState(![]),[_0x16dd74,_0x10978e]=useState(![]),[_0x1a3124,_0x21ebc6]=useState(null),_0x12c74f=useCopyProjectTemplate(),_0x4e43ee=useInstallDependencies(),_0x173b8c=useFormatCode(),_0x1c9d52=async _0x4f849e=>{const _0x5a5655=a28_0x1929,_0x375232=a28_0x45c8fd[_0x5a5655(0x94)](process[_0x5a5655(0xca)](),_0x4f849e[_0x5a5655(0x9c)]);if(a28_0x48465c['existsSync'](_0x375232)){console[_0x5a5655(0xc5)]('×\x20项目目录\x20'+_0x4f849e['projectName']+_0x5a5655(0x92));return;}_0x21ebc6(_0x4f849e),_0x135a36(!![]),logger[_0x5a5655(0xd5)](_0x375232),logger[_0x5a5655(0xa3)](_0x5a5655(0x97),_0x5a5655(0xa0)+_0x4f849e[_0x5a5655(0x9c)],{'projectDir':_0x375232,'appCode':_0x4f849e['appCode']});try{await _0x12c74f[_0x5a5655(0x99)](_0x4f849e[_0x5a5655(0x9c)]),await _0x4e43ee[_0x5a5655(0x99)](_0x4f849e[_0x5a5655(0x9c)]),await _0x173b8c[_0x5a5655(0x99)](_0x4f849e['projectName']),await _0x2299d8(_0x4f849e['projectName'],_0x4f849e[_0x5a5655(0xa8)]||'');if(_0x4f849e['pullApi']&&_0x4f849e['appCode']){console[_0x5a5655(0xc8)](_0x5a5655(0xb8));const _0x55aeef=await pullApiSilent(_0x4f849e['appCode'],undefined,_0x375232);_0x55aeef?(console[_0x5a5655(0xc8)](_0x5a5655(0xc7)),logger['info'](_0x5a5655(0x97),_0x5a5655(0xbf)+_0x4f849e[_0x5a5655(0xa8)],{'projectDir':_0x375232,'appCode':_0x4f849e[_0x5a5655(0xa8)]})):(console[_0x5a5655(0xc8)]('!\x20API\x20配置拉取失败,可稍后手动执行:\x20lovrabet\x20api\x20pull'),logger[_0x5a5655(0x9b)]('create','API\x20配置拉取失败:\x20'+_0x4f849e[_0x5a5655(0xa8)],{'projectDir':_0x375232,'appCode':_0x4f849e[_0x5a5655(0xa8)]}));}logger[_0x5a5655(0x96)]('create','项目创建完成:\x20'+_0x4f849e[_0x5a5655(0x9c)]),_0x10978e(!![]),_0x135a36(![]);}catch(_0x7bba19){logger[_0x5a5655(0xc5)](_0x5a5655(0x97),'项目创建失败:\x20'+_0x4f849e[_0x5a5655(0x9c)],{'error':_0x7bba19 instanceof Error?_0x7bba19[_0x5a5655(0xd3)]:String(_0x7bba19)}),_0x135a36(![]);throw _0x7bba19;}},_0x2a650f=async _0x499802=>{await _0x1c9d52({'projectName':_0x499802});},_0x2299d8=async(_0x17e634,_0x1a73b5)=>{const _0x23ac4e=a28_0x1929,_0x46f749=a28_0x45c8fd[_0x23ac4e(0x94)](process['cwd'](),_0x17e634),_0x59aa5c=a28_0x45c8fd['join'](_0x46f749,_0x23ac4e(0xd0));try{_0x1a73b5?console['log'](_0x23ac4e(0xb2)+_0x17e634+'\x20配置应用AppCode:\x20'+_0x1a73b5):console[_0x23ac4e(0xc8)](_0x23ac4e(0xb2)+_0x17e634+_0x23ac4e(0xc6));console['log'](_0x23ac4e(0xcf)+_0x59aa5c);const _0x418fb7={'app':_0x1a73b5||'','createdAt':new Date()[_0x23ac4e(0xcd)](),'version':_0x23ac4e(0x95)};a28_0x48465c['writeFileSync'](_0x59aa5c,JSON[_0x23ac4e(0xb4)](_0x418fb7,null,0x2),_0x23ac4e(0x9d)),_0x1a73b5?console['log'](_0x23ac4e(0xb1)+_0x1a73b5):console['log'](_0x23ac4e(0xbd)),logger['info'](_0x23ac4e(0x97),_0x23ac4e(0xc3)+_0x1a73b5,{'projectName':_0x17e634,'configFile':'.lovrabetrc'});}catch(_0x508200){logger[_0x23ac4e(0xc5)](_0x23ac4e(0x97),_0x23ac4e(0xc1)+_0x1a73b5,{'projectName':_0x17e634,'error':_0x508200 instanceof Error?_0x508200[_0x23ac4e(0xd3)]:String(_0x508200)});}};useEffect(()=>{const _0x35ad90=a28_0x1929;_0x3f3a93[_0x35ad90(0xc9)]&&_0x2a650f(_0x3f3a93['projectCode']);},[_0x3f3a93['projectCode']]);if(!_0x551021&&!_0x16dd74&&!_0x3f3a93[_0x173f03(0xc9)])return a28_0x1906bd(EnhancedGuidedCreate,{'onCreate':_0x1c9d52});if(_0x551021)return a28_0x47bbcd(a28_0x4b9c4a,{'children':[a28_0x47bbcd(Box,{'marginTop':0x1,'children':[a28_0x1906bd(Box,{'width':'1'}),a28_0x1906bd(Text,{'color':_0x173f03(0xcc),'children':_0x173f03(0xa4)}),a28_0x1906bd(Text,{'children':'项目名称:\x20'}),a28_0x1906bd(Text,{'color':_0x173f03(0xcc),'children':_0x1a3124?.[_0x173f03(0x9c)]}),_0x1a3124?.[_0x173f03(0xa8)]&&a28_0x47bbcd(a28_0x4b9c4a,{'children':[a28_0x1906bd(Text,{'children':'\x20|\x20应用AppCode:\x20'}),a28_0x1906bd(Text,{'color':_0x173f03(0x98),'children':_0x1a3124[_0x173f03(0xa8)]})]})]}),a28_0x1906bd(TaskRunning,{..._0x12c74f}),a28_0x1906bd(TaskRunning,{..._0x4e43ee}),a28_0x1906bd(TaskRunning,{..._0x173b8c})]});if(_0x16dd74)return a28_0x47bbcd(a28_0x4b9c4a,{'children':[a28_0x47bbcd(Box,{'marginTop':0x1,'children':[a28_0x1906bd(Box,{'width':'1'}),a28_0x1906bd(Text,{'color':'green','children':_0x173f03(0xa4)}),a28_0x1906bd(Text,{'children':'项目名称:\x20'}),a28_0x1906bd(Text,{'color':_0x173f03(0xcc),'children':_0x1a3124?.['projectName']}),_0x1a3124?.[_0x173f03(0xa8)]&&a28_0x47bbcd(a28_0x4b9c4a,{'children':[a28_0x1906bd(Text,{'children':_0x173f03(0x93)}),a28_0x1906bd(Text,{'color':_0x173f03(0x98),'children':_0x1a3124[_0x173f03(0xa8)]})]})]}),a28_0x1906bd(TaskFinished,{..._0x12c74f}),a28_0x1906bd(TaskFinished,{..._0x4e43ee}),a28_0x1906bd(TaskFinished,{..._0x173b8c}),a28_0x1906bd(Box,{'marginTop':0x1,'marginBottom':0x1,'children':a28_0x1906bd(Text,{'color':_0x173f03(0xcc),'children':'─'[_0x173f03(0x9e)](0x3c)})}),a28_0x1906bd(Box,{'children':a28_0x1906bd(Text,{'color':_0x173f03(0xcc),'bold':!![],'children':_0x173f03(0xa5)})}),a28_0x47bbcd(Box,{'marginTop':0x1,'flexDirection':_0x173f03(0xa2),'children':[a28_0x47bbcd(Box,{'children':[a28_0x1906bd(Text,{'color':_0x173f03(0x98),'children':_0x173f03(0xba)}),a28_0x1906bd(Text,{'color':'white','bold':!![],'children':_0x1a3124?.[_0x173f03(0x9c)]})]}),_0x1a3124?.[_0x173f03(0xa8)]&&a28_0x47bbcd(Box,{'children':[a28_0x1906bd(Text,{'color':_0x173f03(0x98),'children':_0x173f03(0xd2)}),a28_0x1906bd(Text,{'color':'white','bold':!![],'children':_0x1a3124[_0x173f03(0xa8)]})]}),a28_0x47bbcd(Box,{'children':[a28_0x1906bd(Text,{'color':'cyan','children':'📦\x20API配置:\x20'}),_0x1a3124?.[_0x173f03(0xd1)]?a28_0x1906bd(Text,{'color':'green','bold':!![],'children':_0x173f03(0xab)}):_0x1a3124?.['appCode']?a28_0x1906bd(Text,{'color':'yellow','bold':!![],'children':_0x173f03(0xa9)}):a28_0x1906bd(Text,{'color':_0x173f03(0xb0),'bold':!![],'children':_0x173f03(0xaa)})]})]}),a28_0x1906bd(Box,{'marginTop':0x1,'marginBottom':0x1,'children':a28_0x1906bd(Text,{'color':_0x173f03(0x98),'bold':!![],'children':'🚀\x20接下来可以:'})}),a28_0x47bbcd(Box,{'marginLeft':0x2,'flexDirection':'column','children':[a28_0x47bbcd(Box,{'children':[a28_0x1906bd(Text,{'color':'green','children':_0x173f03(0xb3)}),a28_0x1906bd(Text,{'color':_0x173f03(0xa1),'children':_0x173f03(0xb9)}),a28_0x1906bd(Text,{'color':'cyan','bold':!![],'children':'cd\x20'+_0x1a3124?.[_0x173f03(0x9c)]+_0x173f03(0xc4)})]}),_0x1a3124?.[_0x173f03(0xa8)]&&!_0x1a3124?.[_0x173f03(0xd1)]&&a28_0x47bbcd(Box,{'children':[a28_0x1906bd(Text,{'color':_0x173f03(0xb6),'children':_0x173f03(0x9f)}),a28_0x1906bd(Text,{'color':_0x173f03(0xa1),'children':_0x173f03(0xcb)}),a28_0x1906bd(Text,{'color':_0x173f03(0x98),'bold':!![],'children':_0x173f03(0xc0)})]}),!_0x1a3124?.[_0x173f03(0xa8)]&&a28_0x47bbcd(a28_0x4b9c4a,{'children':[a28_0x47bbcd(Box,{'children':[a28_0x1906bd(Text,{'color':'gray','children':'2.\x20'}),a28_0x1906bd(Text,{'color':_0x173f03(0xa1),'children':_0x173f03(0xbe)}),a28_0x1906bd(Text,{'color':'cyan','bold':!![],'children':_0x173f03(0xce)})]}),a28_0x47bbcd(Box,{'children':[a28_0x1906bd(Text,{'color':'gray','children':_0x173f03(0xb5)}),a28_0x1906bd(Text,{'color':'white','children':'拉取API配置:\x20'}),a28_0x1906bd(Text,{'color':'cyan','bold':!![],'children':_0x173f03(0xbb)})]})]})]}),a28_0x1906bd(Box,{'marginTop':0x1,'children':a28_0x1906bd(Text,{'color':'green','children':'─'[_0x173f03(0x9e)](0x3c)})})]});return null;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x5e2920,_0x4a6844){var _0x1e0fa2=a29_0x417f,_0x57ede1=_0x5e2920();while(!![]){try{var _0x48c607=-parseInt(_0x1e0fa2(0xc9))/0x1*(parseInt(_0x1e0fa2(0xc7))/0x2)+parseInt(_0x1e0fa2(0xc4))/0x3*(parseInt(_0x1e0fa2(0xcd))/0x4)+-parseInt(_0x1e0fa2(0xd0))/0x5*(-parseInt(_0x1e0fa2(0xcb))/0x6)+-parseInt(_0x1e0fa2(0xc8))/0x7+parseInt(_0x1e0fa2(0xcf))/0x8+parseInt(_0x1e0fa2(0xc6))/0x9*(parseInt(_0x1e0fa2(0xc5))/0xa)+parseInt(_0x1e0fa2(0xc3))/0xb*(parseInt(_0x1e0fa2(0xc2))/0xc);if(_0x48c607===_0x4a6844)break;else _0x57ede1['push'](_0x57ede1['shift']());}catch(_0x3c8bef){_0x57ede1['push'](_0x57ede1['shift']());}}}(a29_0x4211,0xaed51));import{jsx as a29_0x4f78fc,jsxs as a29_0x40e3b6}from'react/jsx-runtime';import{Box,Text}from'ink';function a29_0x4211(){var _0x36b9d7=['3177ucYayk','33830btckfK','9960825LjxiDF','29CHJgdq','green','433128erZagv','taskName','5980QyoSKT','elapsed','1096224XjfoYY','5QzOHZi','6024cFntub','17248UhKAax','2001iDSrgB','18020WAKAEn'];a29_0x4211=function(){return _0x36b9d7;};return a29_0x4211();}import{TaskTime}from'./task-time.js';function a29_0x417f(_0x28c5a0,_0x2c10fe){var _0x42116e=a29_0x4211();return a29_0x417f=function(_0x417f13,_0x38062e){_0x417f13=_0x417f13-0xc2;var _0x566df6=_0x42116e[_0x417f13];return _0x566df6;},a29_0x417f(_0x28c5a0,_0x2c10fe);}export function TaskFinished(_0x4bf1be){var _0x746aee=a29_0x417f;return a29_0x40e3b6(Box,{'children':[a29_0x4f78fc(Box,{'width':'1'}),a29_0x4f78fc(Text,{'color':_0x746aee(0xca),'children':'\x20√\x20'}),a29_0x4f78fc(Text,{'children':_0x4bf1be[_0x746aee(0xcc)]}),a29_0x4f78fc(TaskTime,{'elapsed':_0x4bf1be[_0x746aee(0xce)]})]});}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x2dfe9a,_0xd534e0){var _0x312243=a30_0x2af8,_0x265cce=_0x2dfe9a();while(!![]){try{var _0x376b54=-parseInt(_0x312243(0xc0))/0x1+-parseInt(_0x312243(0xc7))/0x2+-parseInt(_0x312243(0xc3))/0x3*(-parseInt(_0x312243(0xc6))/0x4)+-parseInt(_0x312243(0xc4))/0x5+-parseInt(_0x312243(0xbf))/0x6+parseInt(_0x312243(0xc9))/0x7*(parseInt(_0x312243(0xc8))/0x8)+parseInt(_0x312243(0xbe))/0x9;if(_0x376b54===_0xd534e0)break;else _0x265cce['push'](_0x265cce['shift']());}catch(_0x53881c){_0x265cce['push'](_0x265cce['shift']());}}}(a30_0x3742,0x5bb41));import{jsx as a30_0x46f7c1,jsxs as a30_0xb8d67b}from'react/jsx-runtime';function a30_0x2af8(_0x44bf9b,_0x2d022e){var _0x3742af=a30_0x3742();return a30_0x2af8=function(_0x2af8f7,_0x21690a){_0x2af8f7=_0x2af8f7-0xbd;var _0x34297f=_0x3742af[_0x2af8f7];return _0x34297f;},a30_0x2af8(_0x44bf9b,_0x2d022e);}function a30_0x3742(){var _0x149d27=['1192kcDueR','17424chRsDn','2712IWEPEW','77FnAiKj','\x20√\x20','green','12770091MIXlcE','3663678wAZjJl','176048TVDnxJ','\x20\x20\x20','finished','495lAkLRv','1504040njREpQ','dots'];a30_0x3742=function(){return _0x149d27;};return a30_0x3742();}import{Text}from'ink';import a30_0x3f9eec from'ink-spinner';export function TaskLoading(_0x5161df){var _0x47b832=a30_0x2af8;if(_0x5161df[_0x47b832(0xc2)])return a30_0x46f7c1(Text,{'color':_0x47b832(0xbd),'children':_0x47b832(0xca)});if(_0x5161df['loading'])return a30_0xb8d67b(Text,{'color':_0x47b832(0xbd),'children':['\x20',a30_0x46f7c1(a30_0x3f9eec,{'type':_0x47b832(0xc5)}),'\x20']});return a30_0x46f7c1(Text,{'children':_0x47b832(0xc1)});}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x542fbc,_0x938675){var _0x56589f=a31_0x164a,_0x38d49c=_0x542fbc();while(!![]){try{var _0x5cdbcb=parseInt(_0x56589f(0x136))/0x1*(-parseInt(_0x56589f(0x137))/0x2)+parseInt(_0x56589f(0x134))/0x3+-parseInt(_0x56589f(0x138))/0x4+parseInt(_0x56589f(0x139))/0x5+-parseInt(_0x56589f(0x135))/0x6*(-parseInt(_0x56589f(0x13a))/0x7)+-parseInt(_0x56589f(0x13b))/0x8+parseInt(_0x56589f(0x133))/0x9;if(_0x5cdbcb===_0x938675)break;else _0x38d49c['push'](_0x38d49c['shift']());}catch(_0xa59a0c){_0x38d49c['push'](_0x38d49c['shift']());}}}(a31_0x44ea,0xdb23c));import{jsx as a31_0x3a28a5,jsxs as a31_0x4e6ad8}from'react/jsx-runtime';function a31_0x164a(_0x577a89,_0x572992){var _0x44eae7=a31_0x44ea();return a31_0x164a=function(_0x164a1d,_0x38346f){_0x164a1d=_0x164a1d-0x132;var _0x4d76d8=_0x44eae7[_0x164a1d];return _0x4d76d8;},a31_0x164a(_0x577a89,_0x572992);}import{Box,Text}from'ink';import{TaskLoading}from'./task-loading.js';function a31_0x44ea(){var _0x41343a=['1CyNcJc','935218CdTDdP','7142004IgVmDk','1332230iXMQgL','7yerlDi','10687952LBXSNw','elapsed','13204125BDudmf','3980529ORmHOF','8557716FpYqrw'];a31_0x44ea=function(){return _0x41343a;};return a31_0x44ea();}import{TaskTime}from'./task-time.js';export function TaskRunning(_0x38c18a){var _0x351926=a31_0x164a;return a31_0x4e6ad8(Box,{'children':[a31_0x3a28a5(Box,{'width':'1'}),a31_0x3a28a5(TaskLoading,{..._0x38c18a}),a31_0x3a28a5(Text,{'children':_0x38c18a['taskName']}),a31_0x3a28a5(TaskTime,{'elapsed':_0x38c18a[_0x351926(0x132)]})]});}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x5c2c7f,_0x13c302){var _0x2704e7=a32_0x38f8,_0x266985=_0x5c2c7f();while(!![]){try{var _0x1d7da9=parseInt(_0x2704e7(0x1b1))/0x1*(-parseInt(_0x2704e7(0x1b5))/0x2)+parseInt(_0x2704e7(0x1b4))/0x3+parseInt(_0x2704e7(0x1b3))/0x4+-parseInt(_0x2704e7(0x1b7))/0x5*(-parseInt(_0x2704e7(0x1b2))/0x6)+parseInt(_0x2704e7(0x1ae))/0x7*(parseInt(_0x2704e7(0x1af))/0x8)+-parseInt(_0x2704e7(0x1ad))/0x9*(parseInt(_0x2704e7(0x1b0))/0xa)+-parseInt(_0x2704e7(0x1ac))/0xb;if(_0x1d7da9===_0x13c302)break;else _0x266985['push'](_0x266985['shift']());}catch(_0x5b05bf){_0x266985['push'](_0x266985['shift']());}}}(a32_0x2594,0x804f9));import{jsx as a32_0x540ad1,Fragment as a32_0x28e129,jsxs as a32_0x2cc343}from'react/jsx-runtime';import{Text}from'ink';function a32_0x38f8(_0x22df7a,_0x583846){var _0x2594c4=a32_0x2594();return a32_0x38f8=function(_0x38f8b4,_0x34fc5d){_0x38f8b4=_0x38f8b4-0x1ac;var _0x4bd6f4=_0x2594c4[_0x38f8b4];return _0x4bd6f4;},a32_0x38f8(_0x22df7a,_0x583846);}export function TaskTime(_0x5bea80){var _0x51399d=a32_0x38f8;if(_0x5bea80[_0x51399d(0x1b8)])return a32_0x2cc343(a32_0x28e129,{'children':[a32_0x540ad1(Text,{'color':'gray','children':'\x20['}),a32_0x540ad1(Text,{'color':'gray','bold':!![],'children':_0x5bea80[_0x51399d(0x1b8)]}),a32_0x540ad1(Text,{'color':_0x51399d(0x1b6),'children':']'})]});return null;}function a32_0x2594(){var _0x3004d2=['3414xxJzhK','gray','20vseFYI','elapsed','15363227jRVnnB','2710431fGHNHm','7QUKNjd','4499392CbbXxg','10xfwmLT','242MQiFHW','827712zbvNEB','2545040kIfABV','2657937HqmOzY'];a32_0x2594=function(){return _0x3004d2;};return a32_0x2594();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a33_0x526d89=a33_0x37ff;(function(_0x3d0f46,_0x13140e){const _0x11db0f=a33_0x37ff,_0x1ead3d=_0x3d0f46();while(!![]){try{const _0x3c76d9=-parseInt(_0x11db0f(0x155))/0x1*(parseInt(_0x11db0f(0x157))/0x2)+-parseInt(_0x11db0f(0x165))/0x3*(-parseInt(_0x11db0f(0x153))/0x4)+-parseInt(_0x11db0f(0x15e))/0x5*(parseInt(_0x11db0f(0x156))/0x6)+-parseInt(_0x11db0f(0x15c))/0x7+parseInt(_0x11db0f(0x15a))/0x8+parseInt(_0x11db0f(0x152))/0x9+-parseInt(_0x11db0f(0x162))/0xa;if(_0x3c76d9===_0x13140e)break;else _0x1ead3d['push'](_0x1ead3d['shift']());}catch(_0x75243e){_0x1ead3d['push'](_0x1ead3d['shift']());}}}(a33_0x29f8,0x58249));import a33_0x59e965 from'node:path';import{fileURLToPath}from'node:url';import{useCallback,useState}from'react';import{copyDirectory}from'../utils/copy-directory.js';function a33_0x37ff(_0x1d315b,_0x16bf17){const _0x29f8aa=a33_0x29f8();return a33_0x37ff=function(_0x37ff3e,_0x23406d){_0x37ff3e=_0x37ff3e-0x151;let _0x44a517=_0x29f8aa[_0x37ff3e];return _0x44a517;},a33_0x37ff(_0x1d315b,_0x16bf17);}function a33_0x29f8(){const _0x131c5d=['复制项目文件','386554KKbCLg','success','5vAVgRB','info','url','message','1453300OeAJqO','cwd','dirname','4926PcTArT','resolve','now','3040335LuYgpN','548XIqDEy','copy','5GFZrtp','665928ASTTgn','156710wuELkV','项目模板复制完成','../../templates/projects/sub-app-react-demo','4012632kWhfys'];a33_0x29f8=function(){return _0x131c5d;};return a33_0x29f8();}import{formatElapsed}from'./format-elapsed.js';import{logger}from'../utils/logger.js';const __dirname=a33_0x59e965[a33_0x526d89(0x164)](fileURLToPath(import.meta[a33_0x526d89(0x160)])),templateDir=a33_0x59e965[a33_0x526d89(0x166)](__dirname,a33_0x526d89(0x159));export function useCopyProjectTemplate(){const _0x24c373=a33_0x526d89,[_0x101c21,_0x3ce390]=useState(![]),[_0x1f7b68,_0x46e696]=useState(![]),[_0x289158,_0x2d8784]=useState(''),_0xcd0cc1=useCallback(async _0x4c49c=>{const _0x592f57=a33_0x37ff,_0x1fe9f2=Date[_0x592f57(0x151)](),_0x339a19=a33_0x59e965[_0x592f57(0x166)](process[_0x592f57(0x163)](),_0x4c49c);_0x3ce390(!![]);try{logger[_0x592f57(0x15f)]('copy','开始复制项目模板',{'projectCode':_0x4c49c,'templateDir':templateDir}),await copyDirectory(templateDir,_0x339a19);const _0x22da45=Date[_0x592f57(0x151)]()-_0x1fe9f2;logger[_0x592f57(0x15d)](_0x592f57(0x154),_0x592f57(0x158),_0x22da45,{'projectCode':_0x4c49c});}catch(_0x1b70a4){const _0x5b9623=Date['now']()-_0x1fe9f2;logger['error'](_0x592f57(0x154),'项目模板复制失败',{'projectCode':_0x4c49c,'error':_0x1b70a4 instanceof Error?_0x1b70a4[_0x592f57(0x161)]:String(_0x1b70a4),'duration':_0x5b9623});throw _0x1b70a4;}finally{_0x3ce390(![]),_0x46e696(!![]),_0x2d8784(formatElapsed(_0x1fe9f2));}},[]);return{'taskName':_0x24c373(0x15b),'finished':_0x1f7b68,'loading':_0x101c21,'elapsed':_0x289158,'doTask':_0xcd0cc1};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x5955c8,_0x597736){const _0x232a6e=a34_0x1eae,_0x83838a=_0x5955c8();while(!![]){try{const _0x522085=parseInt(_0x232a6e(0x139))/0x1+-parseInt(_0x232a6e(0x143))/0x2*(parseInt(_0x232a6e(0x13b))/0x3)+parseInt(_0x232a6e(0x13e))/0x4+-parseInt(_0x232a6e(0x144))/0x5+-parseInt(_0x232a6e(0x14c))/0x6*(-parseInt(_0x232a6e(0x149))/0x7)+-parseInt(_0x232a6e(0x145))/0x8*(-parseInt(_0x232a6e(0x140))/0x9)+parseInt(_0x232a6e(0x13f))/0xa*(parseInt(_0x232a6e(0x13a))/0xb);if(_0x522085===_0x597736)break;else _0x83838a['push'](_0x83838a['shift']());}catch(_0x5ce55d){_0x83838a['push'](_0x83838a['shift']());}}}(a34_0x18d8,0xb5b38));import a34_0x5ebafc from'node:path';import{useCallback,useState}from'react';import{execa}from'execa';function a34_0x18d8(){const _0x23033c=['代码格式化完成','1376990xSCxPz','4114DNMXKK','462015wjfcwU','格式化代码','npx','2367292cYJags','1580DecFJK','232425SihVVA','now','代码格式化失败','12SmJMLZ','5367000DHOmzq','64BrJamu','cwd','开始格式化代码','resolve','3550211FZkgWm','format','info','6GvDeUh','--write','message','success','prettier'];a34_0x18d8=function(){return _0x23033c;};return a34_0x18d8();}import{formatElapsed}from'./format-elapsed.js';import{logger}from'../utils/logger.js';function a34_0x1eae(_0x4f6be1,_0x1440ad){const _0x18d893=a34_0x18d8();return a34_0x1eae=function(_0x1eaeca,_0x394af4){_0x1eaeca=_0x1eaeca-0x136;let _0x2db9dc=_0x18d893[_0x1eaeca];return _0x2db9dc;},a34_0x1eae(_0x4f6be1,_0x1440ad);}export function useFormatCode(){const _0x585b60=a34_0x1eae,[_0x321b6d,_0x2c72e8]=useState(![]),[_0x4caeba,_0x28cc90]=useState(![]),[_0x289dea,_0x524481]=useState(''),_0x13aaca=useCallback(async _0x3d646c=>{const _0x5320f3=a34_0x1eae,_0x1f92d8=Date['now'](),_0x2f156f=a34_0x5ebafc[_0x5320f3(0x148)](process[_0x5320f3(0x146)](),_0x3d646c);_0x2c72e8(!![]);try{logger[_0x5320f3(0x14b)](_0x5320f3(0x14a),_0x5320f3(0x147),{'projectCode':_0x3d646c}),await execa(_0x5320f3(0x13d),[_0x5320f3(0x137),_0x5320f3(0x14d),'.'],{'cwd':_0x2f156f});const _0x247149=Date[_0x5320f3(0x141)]()-_0x1f92d8;logger[_0x5320f3(0x136)](_0x5320f3(0x14a),_0x5320f3(0x138),_0x247149,{'projectCode':_0x3d646c});}catch(_0x2f5313){const _0x2a7ff4=Date[_0x5320f3(0x141)]()-_0x1f92d8;logger['error'](_0x5320f3(0x14a),_0x5320f3(0x142),{'projectCode':_0x3d646c,'error':_0x2f5313 instanceof Error?_0x2f5313[_0x5320f3(0x14e)]:String(_0x2f5313),'duration':_0x2a7ff4});throw _0x2f5313;}finally{_0x2c72e8(![]),_0x28cc90(!![]),_0x524481(formatElapsed(_0x1f92d8));}},[]);return{'taskName':_0x585b60(0x13c),'finished':_0x4caeba,'loading':_0x321b6d,'elapsed':_0x289dea,'doTask':_0x13aaca};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a35_0x2f63(_0x23a01f,_0x1c7f52){const _0x53a778=a35_0x53a7();return a35_0x2f63=function(_0x2f6308,_0x1b00af){_0x2f6308=_0x2f6308-0x9f;let _0x44e54f=_0x53a778[_0x2f6308];return _0x44e54f;},a35_0x2f63(_0x23a01f,_0x1c7f52);}(function(_0x423c72,_0x352822){const _0x3e36da=a35_0x2f63,_0x3ea902=_0x423c72();while(!![]){try{const _0x202e5c=parseInt(_0x3e36da(0xaa))/0x1+-parseInt(_0x3e36da(0xa0))/0x2*(parseInt(_0x3e36da(0xa1))/0x3)+-parseInt(_0x3e36da(0xb3))/0x4*(-parseInt(_0x3e36da(0xaf))/0x5)+parseInt(_0x3e36da(0xad))/0x6*(-parseInt(_0x3e36da(0xb2))/0x7)+parseInt(_0x3e36da(0xa8))/0x8+-parseInt(_0x3e36da(0xa4))/0x9*(parseInt(_0x3e36da(0xae))/0xa)+parseInt(_0x3e36da(0x9f))/0xb;if(_0x202e5c===_0x352822)break;else _0x3ea902['push'](_0x3ea902['shift']());}catch(_0x3ccd2c){_0x3ea902['push'](_0x3ea902['shift']());}}}(a35_0x53a7,0x5c419));import a35_0x12815b from'node:path';import{useCallback,useState}from'react';import{execa}from'execa';import{formatElapsed}from'./format-elapsed.js';import{logger}from'../utils/logger.js';export function useInstallDependencies(){const _0x55c76a=a35_0x2f63,[_0x3ebc4a,_0x40424d]=useState(![]),[_0x4b1bc7,_0x1bed74]=useState(![]),[_0x28447b,_0x1284e1]=useState(''),_0x327dac=useCallback(async _0x3c9dd4=>{const _0x1dea7f=a35_0x2f63,_0x19fde5=Date[_0x1dea7f(0xa3)](),_0x335e3d=a35_0x12815b[_0x1dea7f(0xb1)](process['cwd'](),_0x3c9dd4);_0x40424d(!![]),_0x1bed74(![]);const _0x10d75a=async(_0x49833b,_0x4f8ab5)=>{await execa(_0x49833b,_0x4f8ab5,{'cwd':_0x335e3d});};try{logger[_0x1dea7f(0xa5)](_0x1dea7f(0xa6),'开始安装依赖',{'projectCode':_0x3c9dd4,'registry':'https://registry.npmmirror.com'}),await _0x10d75a('npm',['install','--registry',_0x1dea7f(0xab)]);const _0x130006=Date['now']()-_0x19fde5;logger[_0x1dea7f(0xa9)](_0x1dea7f(0xa6),_0x1dea7f(0xb0),_0x130006,{'projectCode':_0x3c9dd4});}catch(_0x3dfb04){const _0x2a3815=Date[_0x1dea7f(0xa3)]()-_0x19fde5;logger['error'](_0x1dea7f(0xa6),_0x1dea7f(0xac),{'projectCode':_0x3c9dd4,'error':_0x3dfb04 instanceof Error?_0x3dfb04[_0x1dea7f(0xa2)]:String(_0x3dfb04),'duration':_0x2a3815});throw _0x3dfb04;}finally{_0x40424d(![]),_0x1bed74(!![]),_0x1284e1(formatElapsed(_0x19fde5));}},[]);return{'taskName':_0x55c76a(0xa7),'finished':_0x4b1bc7,'loading':_0x3ebc4a,'elapsed':_0x28447b,'doTask':_0x327dac};}function a35_0x53a7(){const _0x4a93a0=['resolve','1813oLeKYi','36Ojuats','18103393LVYJof','538OsFYnw','6363FVkMin','message','now','18477LVuTiC','info','install','安装依赖','947704zqdwno','success','53071gHQawd','https://registry.npmmirror.com','依赖安装失败','4302PTRgsy','3340AscjQV','1410vUXQSg','依赖安装完成'];a35_0x53a7=function(){return _0x4a93a0;};return a35_0x53a7();}
|
package/lib/help.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x1b3204,_0xcff59f){var _0x43c31c=a36_0x1ba7,_0x1a0823=_0x1b3204();while(!![]){try{var _0xd829b3=-parseInt(_0x43c31c(0x1f4))/0x1+-parseInt(_0x43c31c(0x1fd))/0x2+-parseInt(_0x43c31c(0x1f8))/0x3*(-parseInt(_0x43c31c(0x1fa))/0x4)+-parseInt(_0x43c31c(0x201))/0x5+-parseInt(_0x43c31c(0x1fc))/0x6*(parseInt(_0x43c31c(0x200))/0x7)+parseInt(_0x43c31c(0x1f7))/0x8+parseInt(_0x43c31c(0x1f3))/0x9*(parseInt(_0x43c31c(0x1ff))/0xa);if(_0xd829b3===_0xcff59f)break;else _0x1a0823['push'](_0x1a0823['shift']());}catch(_0x5001a2){_0x1a0823['push'](_0x1a0823['shift']());}}}(a36_0xbad8,0xb5a0f));function a36_0x1ba7(_0x1b432e,_0x375e6b){var _0xbad876=a36_0xbad8();return a36_0x1ba7=function(_0x1ba791,_0x25cb7a){_0x1ba791=_0x1ba791-0x1f3;var _0x297cac=_0xbad876[_0x1ba791];return _0x297cac;},a36_0x1ba7(_0x1b432e,_0x375e6b);}import{jsx as a36_0x1a28db,jsxs as a36_0x40e09b}from'react/jsx-runtime';function a36_0xbad8(){var _0x267f2c=['!\x20请指定一个有效的命令。','5748056ToJyLP','9hvofpI','lovrabet\x20--help','932948AHRAPm','green','6174342TaGbKi','31150HCtqmE','column','1030GGXJau','7vutIiH','2339350lsUyzh','129915xLsRAB','648570kHhmhM','查看可用命令。'];a36_0xbad8=function(){return _0x267f2c;};return a36_0xbad8();}import{Box,Text}from'ink';export function Help(){var _0x567850=a36_0x1ba7;return a36_0x40e09b(Box,{'flexDirection':_0x567850(0x1fe),'marginTop':0x1,'marginBottom':0x1,'children':[a36_0x40e09b(Box,{'children':[a36_0x1a28db(Box,{'width':'1'}),a36_0x1a28db(Text,{'children':_0x567850(0x1f6)})]}),a36_0x40e09b(Box,{'marginTop':0x1,'children':[a36_0x1a28db(Box,{'width':'1'}),a36_0x40e09b(Text,{'children':['\x20\x20','使用']}),a36_0x40e09b(Text,{'bold':!![],'color':_0x567850(0x1fb),'children':['\x20',_0x567850(0x1f9),'\x20']}),a36_0x1a28db(Text,{'children':_0x567850(0x1f5)})]})]});}
|
package/lib/utils/config.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a37_0x481fd3=a37_0x4414;(function(_0x272d0c,_0x51d854){const _0x33b100=a37_0x4414,_0x56498b=_0x272d0c();while(!![]){try{const _0x57e752=-parseInt(_0x33b100(0x17f))/0x1+parseInt(_0x33b100(0x188))/0x2*(-parseInt(_0x33b100(0x189))/0x3)+parseInt(_0x33b100(0x182))/0x4*(-parseInt(_0x33b100(0x17e))/0x5)+-parseInt(_0x33b100(0x185))/0x6+parseInt(_0x33b100(0x183))/0x7+parseInt(_0x33b100(0x184))/0x8+parseInt(_0x33b100(0x186))/0x9*(parseInt(_0x33b100(0x187))/0xa);if(_0x57e752===_0x51d854)break;else _0x56498b['push'](_0x56498b['shift']());}catch(_0x1c5b91){_0x56498b['push'](_0x56498b['shift']());}}}(a37_0x161b,0x21ee2));function a37_0x161b(){const _0x346f6c=['parse','15490qUwKPs','163557jiMqZG','utf8','.lovrabetrc','20ECWJwJ','1111334CauWmL','394816DHHpyA','639948ptfOAY','68103UQvqGn','410XVnPYV','6EEePOW','93678rHrzfg'];a37_0x161b=function(){return _0x346f6c;};return a37_0x161b();}import{existsSync,readFileSync}from'node:fs';function a37_0x4414(_0x2cf8e8,_0x22273e){const _0x161be8=a37_0x161b();return a37_0x4414=function(_0x441408,_0x3d2e21){_0x441408=_0x441408-0x17d;let _0x425934=_0x161be8[_0x441408];return _0x425934;},a37_0x4414(_0x2cf8e8,_0x22273e);}import{resolve}from'node:path';export const configPath=resolve(process['cwd'](),a37_0x481fd3(0x181));export function readConfig(){const _0x291430=a37_0x481fd3;try{if(existsSync(configPath)){const _0x20d518=readFileSync(configPath,{'encoding':_0x291430(0x180)});return _0x20d518?JSON[_0x291430(0x17d)](_0x20d518):{};}}catch(_0x552f54){}return{};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x5af9af,_0x1a0181){const _0x215c81=a38_0x2693,_0x1a1e08=_0x5af9af();while(!![]){try{const _0x1ef0d2=parseInt(_0x215c81(0x1ec))/0x1+-parseInt(_0x215c81(0x1e1))/0x2+parseInt(_0x215c81(0x1e9))/0x3*(parseInt(_0x215c81(0x1e4))/0x4)+-parseInt(_0x215c81(0x1e6))/0x5*(-parseInt(_0x215c81(0x1de))/0x6)+-parseInt(_0x215c81(0x1df))/0x7+-parseInt(_0x215c81(0x1e3))/0x8+-parseInt(_0x215c81(0x1e7))/0x9*(parseInt(_0x215c81(0x1ef))/0xa);if(_0x1ef0d2===_0x1a0181)break;else _0x1a1e08['push'](_0x1a1e08['shift']());}catch(_0x59f77a){_0x1a1e08['push'](_0x1a1e08['shift']());}}}(a38_0xd5a8,0xbe50c));function a38_0x2693(_0x1edc56,_0x48c48e){const _0xd5a800=a38_0xd5a8();return a38_0x2693=function(_0x2693b0,_0x3c8adc){_0x2693b0=_0x2693b0-0x1de;let _0x567dbf=_0xd5a800[_0x2693b0];return _0x567dbf;},a38_0x2693(_0x1edc56,_0x48c48e);}import a38_0x55e58a from'node:path';import a38_0x21cb0d from'node:fs';export async function copyDirectory(_0x522dfc,_0xdc9674){const _0x5632ef=a38_0x2693;try{const _0x3b5100=a38_0x21cb0d[_0x5632ef(0x1e5)](_0x522dfc,{'withFileTypes':!![]});a38_0x21cb0d[_0x5632ef(0x1eb)](_0xdc9674,{'recursive':!![]});for(const _0x569ebf of _0x3b5100){const _0x1f3fd2=a38_0x55e58a[_0x5632ef(0x1e8)](_0x522dfc,_0x569ebf[_0x5632ef(0x1ed)]),_0x590426=a38_0x55e58a[_0x5632ef(0x1e8)](_0xdc9674,_0x569ebf[_0x5632ef(0x1ed)]);_0x569ebf[_0x5632ef(0x1ee)]()?await copyDirectory(_0x1f3fd2,_0x590426):a38_0x21cb0d[_0x5632ef(0x1e0)](_0x1f3fd2,_0x590426);}}catch(_0x41934f){console[_0x5632ef(0x1ea)](_0x5632ef(0x1e2),_0x41934f);}}function a38_0xd5a8(){const _0x2d0317=['isDirectory','667340PdTaaB','1185798NSVZED','10334415QBebwr','copyFileSync','584224jUdMZm','复制目录时出错:','7330048VUThIY','9532isIpQf','readdirSync','25hUjteo','72HrAqcc','join','1830tsMALK','error','mkdirSync','1556322yntJAC','name'];a38_0xd5a8=function(){return _0x2d0317;};return a38_0xd5a8();}
|