@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.
Files changed (45) hide show
  1. package/lib/add-page/input-page-router.js +1 -1
  2. package/lib/add-page/main.js +1 -1
  3. package/lib/add-page/select-page-template.js +1 -1
  4. package/lib/api/api-pull-ui.js +1 -1
  5. package/lib/api/format-dataset.js +1 -1
  6. package/lib/api/generate-api-file.js +1 -1
  7. package/lib/api/main.js +1 -1
  8. package/lib/api/pull-silent.js +1 -1
  9. package/lib/api/pull.js +1 -1
  10. package/lib/auth/auth-server-ui.js +1 -1
  11. package/lib/auth/auth-server.js +1 -1
  12. package/lib/auth/constant.js +1 -1
  13. package/lib/auth/get-cookie.js +1 -1
  14. package/lib/auth/is-session-valid.js +1 -1
  15. package/lib/auth/logout.js +1 -1
  16. package/lib/cli.js +1 -1
  17. package/lib/cmd/build-watch.js +1 -1
  18. package/lib/cmd/build.js +1 -1
  19. package/lib/cmd/logs.js +1 -1
  20. package/lib/cmd/preview.js +1 -1
  21. package/lib/cmd/start.js +1 -1
  22. package/lib/config/config-help.js +1 -1
  23. package/lib/config/main.js +1 -1
  24. package/lib/constant/domain.js +1 -1
  25. package/lib/constant/env.js +1 -1
  26. package/lib/create-app/enhanced-guided-create.js +1 -1
  27. package/lib/create-app/format-elapsed.js +1 -1
  28. package/lib/create-app/main.js +1 -1
  29. package/lib/create-app/task-finished.js +1 -1
  30. package/lib/create-app/task-loading.js +1 -1
  31. package/lib/create-app/task-running.js +1 -1
  32. package/lib/create-app/task-time.js +1 -1
  33. package/lib/create-app/use-copy-project-template.js +1 -1
  34. package/lib/create-app/use-format-code.js +1 -1
  35. package/lib/create-app/use-install-dependencies.js +1 -1
  36. package/lib/help.js +1 -1
  37. package/lib/utils/config.js +1 -1
  38. package/lib/utils/copy-directory.js +1 -1
  39. package/lib/utils/logger.js +1 -1
  40. package/lib/utils/router-updater.js +1 -1
  41. package/lib/utils/template-replacer.js +1 -1
  42. package/package.json +1 -1
  43. package/templates/projects/sub-app-react-demo/package-lock.json +2856 -0
  44. package/templates/projects/sub-app-react-demo/package.json +1 -1
  45. package/templates/projects/sub-app-react-demo/src/api/api.ts +6 -6
package/lib/cmd/build.js CHANGED
@@ -1 +1 @@
1
- (function(_0x5c7a09,_0x5c9b3f){const _0xb9fe15=a18_0xfdf9,_0x4edf06=_0x5c7a09();while(!![]){try{const _0x176da3=-parseInt(_0xb9fe15(0x14c))/0x1*(parseInt(_0xb9fe15(0x143))/0x2)+-parseInt(_0xb9fe15(0x13f))/0x3*(parseInt(_0xb9fe15(0x133))/0x4)+parseInt(_0xb9fe15(0x145))/0x5*(parseInt(_0xb9fe15(0x14e))/0x6)+parseInt(_0xb9fe15(0x144))/0x7+parseInt(_0xb9fe15(0x132))/0x8+parseInt(_0xb9fe15(0x12f))/0x9+parseInt(_0xb9fe15(0x130))/0xa;if(_0x176da3===_0x5c9b3f)break;else _0x4edf06['push'](_0x4edf06['shift']());}catch(_0x1baab5){_0x4edf06['push'](_0x4edf06['shift']());}}}(a18_0x883c,0x7ae6e));import{delimiter,join}from'node:path';import{spawn}from'node:child_process';function a18_0x883c(){const _0x15cb9c=['1403058YtnNqH','now','开始构建项目','inherit','4630DkHaJA','4287234iIjeMf','915rlZUGd','build','toString','项目构建失败','项目构建成功','info','env','19sVznsX','node_modules','11460xzbcQE','1954539GvlFUv','800940mrWCxr','close','1788048NHsajM','8hnYbjr','npm\x20run\x20build\x20exited\x20with\x20code\x20','项目构建出错','message','cwd','npm','stderr','run','error','npm\x20run\x20build','PATH','trim'];a18_0x883c=function(){return _0x15cb9c;};return a18_0x883c();}import{logger}from'../utils/logger.js';function a18_0xfdf9(_0x2520ac,_0xf68641){const _0x883cc7=a18_0x883c();return a18_0xfdf9=function(_0xfdf97f,_0x53d297){_0xfdf97f=_0xfdf97f-0x12f;let _0xbef4a=_0x883cc7[_0xfdf97f];return _0xbef4a;},a18_0xfdf9(_0x2520ac,_0xf68641);}export function runBuild(){return new Promise((_0x35eb00,_0xc83243)=>{const _0x11ad57=a18_0xfdf9,_0x4b9e2c=Date[_0x11ad57(0x140)]();logger[_0x11ad57(0x14a)]('build',_0x11ad57(0x141),{'command':'npm\x20run\x20build'});let _0xd40c02='';const _0x4aba0e=spawn(_0x11ad57(0x138),[_0x11ad57(0x13a),_0x11ad57(0x146)],{'stdio':['inherit',_0x11ad57(0x142),'pipe'],'shell':!![],'env':{...process[_0x11ad57(0x14b)],'PATH':''+join(process[_0x11ad57(0x137)](),_0x11ad57(0x14d),'.bin')+delimiter+process[_0x11ad57(0x14b)][_0x11ad57(0x13d)]}});_0x4aba0e['stderr']?.['on']('data',_0x124542=>{const _0xa2c3de=_0x11ad57;_0xd40c02+=_0x124542[_0xa2c3de(0x147)]();}),_0x4aba0e['on'](_0x11ad57(0x131),_0x1b91b5=>{const _0x178086=_0x11ad57,_0x33fc91=Date['now']()-_0x4b9e2c;if(_0x1b91b5===0x0||_0x1b91b5===null)logger['success'](_0x178086(0x146),_0x178086(0x149),_0x33fc91),_0x35eb00();else{const _0x288f44={'exitCode':_0x1b91b5,'duration':_0x33fc91,'command':_0x178086(0x13c),'cwd':process[_0x178086(0x137)]()};_0xd40c02['trim']()&&(_0x288f44[_0x178086(0x139)]=_0xd40c02['trim']()),logger[_0x178086(0x13b)](_0x178086(0x146),_0x178086(0x148),_0x288f44),_0xc83243(new Error(_0x178086(0x134)+_0x1b91b5));}}),_0x4aba0e['on'](_0x11ad57(0x13b),_0x34de72=>{const _0x7492cc=_0x11ad57,_0x54b5b5=Date['now']()-_0x4b9e2c;logger[_0x7492cc(0x13b)](_0x7492cc(0x146),_0x7492cc(0x135),{'error':_0x34de72[_0x7492cc(0x136)],'duration':_0x54b5b5,'stderr':_0xd40c02[_0x7492cc(0x13e)]()||undefined}),_0xc83243(_0x34de72);});});}
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
- function a19_0x2900(){const _0x538f13=['10784430ScerzN','\x20\x20\x20详情:\x20','\x20\x20\x20时间:\x20','stringify','duration','warn','26992GHfZdj','keys','2408226CUbAdi','cwd','20DnggPQ','log','readLogs','3755610rAohjz','level','zh-CN','976vjaQkQ','toLocaleString','772qiqYDa','14215jTfhqf','command','forEach','*\x20日志已清空','details','clearLogs','8055113YnAtcK','length','784374dxldKA','*\x20Lovrabet\x20CLI\x20日志记录:\x0a','3heruZm'];a19_0x2900=function(){return _0x538f13;};return a19_0x2900();}function a19_0x54da(_0x104794,_0x38a1a3){const _0x29006a=a19_0x2900();return a19_0x54da=function(_0x54da45,_0x4f3785){_0x54da45=_0x54da45-0x19e;let _0x16c697=_0x29006a[_0x54da45];return _0x16c697;},a19_0x54da(_0x104794,_0x38a1a3);}(function(_0x257507,_0x203f2e){const _0x31b733=a19_0x54da,_0x4f04c8=_0x257507();while(!![]){try{const _0xeb618e=parseInt(_0x31b733(0x1aa))/0x1*(parseInt(_0x31b733(0x1a8))/0x2)+-parseInt(_0x31b733(0x1b8))/0x3+-parseInt(_0x31b733(0x19f))/0x4*(-parseInt(_0x31b733(0x1a0))/0x5)+parseInt(_0x31b733(0x1b3))/0x6+parseInt(_0x31b733(0x1b1))/0x7*(-parseInt(_0x31b733(0x1bb))/0x8)+-parseInt(_0x31b733(0x1ab))/0x9+-parseInt(_0x31b733(0x1b5))/0xa*(-parseInt(_0x31b733(0x1a6))/0xb);if(_0xeb618e===_0x203f2e)break;else _0x4f04c8['push'](_0x4f04c8['shift']());}catch(_0x2dad7a){_0x4f04c8['push'](_0x4f04c8['shift']());}}}(a19_0x2900,0xa3ba1));import{logger}from'../utils/logger.js';export function showLogs(){const _0x4dab0b=a19_0x54da;logger['setLogPath'](process['cwd']());const _0x51dd42=logger[_0x4dab0b(0x1b7)]();if(_0x51dd42[_0x4dab0b(0x1a7)]===0x0){console[_0x4dab0b(0x1b6)]('*\x20暂无日志记录');return;}console['log'](_0x4dab0b(0x1a9)),_0x51dd42[_0x4dab0b(0x1a2)]((_0x1856c1,_0x316d12)=>{const _0x5bb7b5=_0x4dab0b,_0x318c0a=new Date(_0x1856c1['timestamp'])[_0x5bb7b5(0x19e)](_0x5bb7b5(0x1ba)),_0x42759a=_0x1856c1[_0x5bb7b5(0x1b9)]==='success'?'√':_0x1856c1[_0x5bb7b5(0x1b9)]==='error'?'×':_0x1856c1[_0x5bb7b5(0x1b9)]===_0x5bb7b5(0x1b0)?'!':'i';console['log'](_0x316d12+0x1+'.\x20'+_0x42759a+'\x20['+_0x1856c1[_0x5bb7b5(0x1a1)]+']\x20'+_0x1856c1['message']),console[_0x5bb7b5(0x1b6)](_0x5bb7b5(0x1ad)+_0x318c0a),_0x1856c1[_0x5bb7b5(0x1af)]&&console[_0x5bb7b5(0x1b6)]('\x20\x20\x20耗时:\x20'+_0x1856c1[_0x5bb7b5(0x1af)]+'ms'),_0x1856c1['details']&&Object[_0x5bb7b5(0x1b2)](_0x1856c1[_0x5bb7b5(0x1a4)])[_0x5bb7b5(0x1a7)]>0x0&&console[_0x5bb7b5(0x1b6)](_0x5bb7b5(0x1ac)+JSON[_0x5bb7b5(0x1ae)](_0x1856c1[_0x5bb7b5(0x1a4)],null,0x2)),console['log']('');});}export function clearLogs(){const _0x2ebd08=a19_0x54da;logger['setLogPath'](process[_0x2ebd08(0x1b4)]()),logger[_0x2ebd08(0x1a5)](),console['log'](_0x2ebd08(0x1a3));}
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();}
@@ -1 +1 @@
1
- (function(_0x99be19,_0x487c35){const _0x749c7d=a20_0x542d,_0x307843=_0x99be19();while(!![]){try{const _0x3e6f03=-parseInt(_0x749c7d(0x12d))/0x1+parseInt(_0x749c7d(0x134))/0x2+parseInt(_0x749c7d(0x124))/0x3*(parseInt(_0x749c7d(0x12b))/0x4)+parseInt(_0x749c7d(0x128))/0x5+parseInt(_0x749c7d(0x127))/0x6+-parseInt(_0x749c7d(0x12f))/0x7+-parseInt(_0x749c7d(0x132))/0x8;if(_0x3e6f03===_0x487c35)break;else _0x307843['push'](_0x307843['shift']());}catch(_0xa8c6f5){_0x307843['push'](_0x307843['shift']());}}}(a20_0x50d5,0x3a5f6));function a20_0x542d(_0x97f30c,_0x286f21){const _0x50d539=a20_0x50d5();return a20_0x542d=function(_0x542d2f,_0x4bc3ec){_0x542d2f=_0x542d2f-0x120;let _0x37c5db=_0x50d539[_0x542d2f];return _0x37c5db;},a20_0x542d(_0x97f30c,_0x286f21);}import{delimiter,join}from'node:path';import{spawn}from'node:child_process';function a20_0x50d5(){const _0x3222dd=['预览服务器启动失败','pipe','1458536eChzQd','now','430400BOmSqU','node_modules','toString','error','env','预览服务器启动出错','vite\x20preview\x20exited\x20with\x20code\x20','trim','cwd','preview','success','data','138JAKrYW','inherit','stderr','2478978CsGPoR','895320BMZBqv','.bin','vite\x20preview','27692EMeTXZ','预览服务器启动成功','427164GtANBj','PATH','1941170LiZhWb'];a20_0x50d5=function(){return _0x3222dd;};return a20_0x50d5();}import{logger}from'../utils/logger.js';export function runPreview(){return new Promise((_0x8437f8,_0x2fbc73)=>{const _0x3d06a8=a20_0x542d,_0x157544=Date[_0x3d06a8(0x133)]();logger['info'](_0x3d06a8(0x121),'启动预览服务器',{'command':_0x3d06a8(0x12a)});let _0xb7a4f='';const _0xed884f=spawn('vite',[_0x3d06a8(0x121)],{'stdio':['inherit',_0x3d06a8(0x125),_0x3d06a8(0x131)],'shell':!![],'env':{...process[_0x3d06a8(0x138)],'PATH':''+join(process[_0x3d06a8(0x120)](),_0x3d06a8(0x135),_0x3d06a8(0x129))+delimiter+process['env'][_0x3d06a8(0x12e)]}});_0xed884f['stderr']?.['on'](_0x3d06a8(0x123),_0xa2ef1b=>{const _0x13793a=_0x3d06a8;_0xb7a4f+=_0xa2ef1b[_0x13793a(0x136)]();}),_0xed884f['on']('close',_0x2dbac0=>{const _0x1ef6b0=_0x3d06a8,_0x4e5589=Date[_0x1ef6b0(0x133)]()-_0x157544;if(_0x2dbac0===0x0||_0x2dbac0===null)logger[_0x1ef6b0(0x122)](_0x1ef6b0(0x121),_0x1ef6b0(0x12c),_0x4e5589),_0x8437f8();else{const _0x5b319f={'exitCode':_0x2dbac0,'duration':_0x4e5589,'command':_0x1ef6b0(0x12a),'cwd':process[_0x1ef6b0(0x120)]()};_0xb7a4f[_0x1ef6b0(0x13b)]()&&(_0x5b319f[_0x1ef6b0(0x126)]=_0xb7a4f[_0x1ef6b0(0x13b)]()),logger[_0x1ef6b0(0x137)](_0x1ef6b0(0x121),_0x1ef6b0(0x130),_0x5b319f),_0x2fbc73(new Error(_0x1ef6b0(0x13a)+_0x2dbac0));}}),_0xed884f['on']('error',_0x351a10=>{const _0x54034a=_0x3d06a8,_0x4fee9b=Date['now']()-_0x157544;logger[_0x54034a(0x137)](_0x54034a(0x121),_0x54034a(0x139),{'error':_0x351a10['message'],'duration':_0x4fee9b,'stderr':_0xb7a4f[_0x54034a(0x13b)]()||undefined}),_0x2fbc73(_0x351a10);});});}
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 a21_0x3420(_0x1e2125,_0x5363b3){const _0x447724=a21_0x4477();return a21_0x3420=function(_0x3420a2,_0x3c3196){_0x3420a2=_0x3420a2-0x9f;let _0x30c78e=_0x447724[_0x3420a2];return _0x30c78e;},a21_0x3420(_0x1e2125,_0x5363b3);}(function(_0x2dfb49,_0x313e0e){const _0x26931d=a21_0x3420,_0x602f8b=_0x2dfb49();while(!![]){try{const _0x4c23a0=parseInt(_0x26931d(0xb3))/0x1+parseInt(_0x26931d(0xae))/0x2+parseInt(_0x26931d(0xb5))/0x3*(parseInt(_0x26931d(0xa0))/0x4)+parseInt(_0x26931d(0xb8))/0x5+-parseInt(_0x26931d(0xa2))/0x6*(-parseInt(_0x26931d(0xa4))/0x7)+-parseInt(_0x26931d(0xa9))/0x8+-parseInt(_0x26931d(0xb4))/0x9*(parseInt(_0x26931d(0xa6))/0xa);if(_0x4c23a0===_0x313e0e)break;else _0x602f8b['push'](_0x602f8b['shift']());}catch(_0x11e4f5){_0x602f8b['push'](_0x602f8b['shift']());}}}(a21_0x4477,0xde2ad));import{delimiter,join}from'node:path';function a21_0x4477(){const _0x579284=['3208895dDlEWP','trim','23224XhfedX','stderr','12LtLBJc','vite\x20exited\x20with\x20code\x20','2386181TwtVTv','now','32596900RNtTTa','start','info','13664128sOIfjO','PATH','success','message','启动开发服务器','2696468qDgrJg','vite','error','inherit','node_modules','1568632EbtplE','9fEQfnF','846uTlYZW','env','开发服务器启动出错'];a21_0x4477=function(){return _0x579284;};return a21_0x4477();}import{spawn}from'node:child_process';import{logger}from'../utils/logger.js';export function runStart(_0x36b01f){return new Promise((_0x248b86,_0x4fb74f)=>{const _0x242080=a21_0x3420,_0x3f23b1=Date[_0x242080(0xa5)](),_0x43bc07=_0x36b01f||process['cwd']();logger[_0x242080(0xa8)](_0x242080(0xa7),_0x242080(0xad),{'command':'vite','cwd':_0x43bc07});let _0x5b4ca3='';const _0x402816=spawn(_0x242080(0xaf),{'stdio':['inherit',_0x242080(0xb1),'pipe'],'shell':!![],'cwd':_0x43bc07,'env':{...process[_0x242080(0xb6)],'PATH':''+join(_0x43bc07,_0x242080(0xb2),'.bin')+delimiter+process[_0x242080(0xb6)][_0x242080(0xaa)]}});_0x402816[_0x242080(0xa1)]?.['on']('data',_0xfb139d=>{const _0x449f27=_0xfb139d['toString']();_0x5b4ca3+=_0x449f27,process['stderr']['write'](_0x449f27);}),_0x402816['on']('close',_0x2bf7fb=>{const _0x31f8cc=_0x242080,_0x3620d4=Date[_0x31f8cc(0xa5)]()-_0x3f23b1;if(_0x2bf7fb===0x0||_0x2bf7fb===null)logger[_0x31f8cc(0xab)](_0x31f8cc(0xa7),'开发服务器启动成功',_0x3620d4),_0x248b86();else{const _0x5a13a1={'exitCode':_0x2bf7fb,'duration':_0x3620d4,'command':'vite','cwd':_0x43bc07};_0x5b4ca3[_0x31f8cc(0x9f)]()&&(_0x5a13a1[_0x31f8cc(0xa1)]=_0x5b4ca3[_0x31f8cc(0x9f)]()),logger['error'](_0x31f8cc(0xa7),'开发服务器启动失败',_0x5a13a1),_0x4fb74f(new Error(_0x31f8cc(0xa3)+_0x2bf7fb));}}),_0x402816['on'](_0x242080(0xb0),_0x5db6ae=>{const _0x35b1ce=_0x242080,_0x1ae3b5=Date[_0x35b1ce(0xa5)]()-_0x3f23b1,_0xfa9590={'error':_0x5db6ae[_0x35b1ce(0xac)],'duration':_0x1ae3b5,'command':'vite','cwd':_0x43bc07};_0x5b4ca3[_0x35b1ce(0x9f)]()&&(_0xfa9590[_0x35b1ce(0xa1)]=_0x5b4ca3[_0x35b1ce(0x9f)]()),logger['error']('start',_0x35b1ce(0xb7),_0xfa9590),_0x4fb74f(_0x5db6ae);});});}
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
- (function(_0x38aee3,_0x50d65f){const _0x39eacd=a22_0x4240,_0x4e6dac=_0x38aee3();while(!![]){try{const _0x419ec8=-parseInt(_0x39eacd(0xab))/0x1+-parseInt(_0x39eacd(0xac))/0x2+parseInt(_0x39eacd(0xa7))/0x3+-parseInt(_0x39eacd(0xa6))/0x4*(-parseInt(_0x39eacd(0x9d))/0x5)+parseInt(_0x39eacd(0x9f))/0x6*(-parseInt(_0x39eacd(0x9c))/0x7)+parseInt(_0x39eacd(0x9e))/0x8+-parseInt(_0x39eacd(0xa9))/0x9;if(_0x419ec8===_0x50d65f)break;else _0x4e6dac['push'](_0x4e6dac['shift']());}catch(_0x285a15){_0x4e6dac['push'](_0x4e6dac['shift']());}}}(a22_0x47c6,0xf416f));function a22_0x47c6(){const _0x4532ff=['168lLDyCF','8420675DDTfKV','12752088RsptwF','483504apGyCA','map','\x20\x20\x20\x20','lovrabet\x20config\x20list\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','command','lovrabet\x20config\x20get\x20<key>\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','description','4hlRdLF','4027161CARyLT','lovrabet\x20config\x20set\x20app\x20app-xxxxx\x20\x20\x20','1801647UuSUnQ','设置配置项','1188192ZeqLwu','596702MaIdUV','\x20*\x20配置示例:','gray'];a22_0x47c6=function(){return _0x4532ff;};return a22_0x47c6();}import{jsxs as a22_0x101712,jsx as a22_0x559ce2}from'react/jsx-runtime';import{Box,Text}from'ink';function a22_0x4240(_0x118cf7,_0x36189d){const _0x47c6cc=a22_0x47c6();return a22_0x4240=function(_0x42409e,_0x5baa9f){_0x42409e=_0x42409e-0x9a;let _0x2710b8=_0x47c6cc[_0x42409e];return _0x2710b8;},a22_0x4240(_0x118cf7,_0x36189d);}export function ConfigHelp(){const _0x5f0d5c=a22_0x4240,_0x10c4c0=[{'command':'lovrabet\x20config\x20set\x20<key>\x20<value>\x20\x20\x20','description':_0x5f0d5c(0xaa)},{'command':_0x5f0d5c(0xa4),'description':'获取配置项'},{'command':_0x5f0d5c(0xa2),'description':'列出所有配置项'}],_0x276f21=[{'command':_0x5f0d5c(0xa8),'description':'配置当前项目的\x20App\x20Code'}];return a22_0x101712(Box,{'flexDirection':'column','marginTop':0x1,'marginBottom':0x1,'children':[a22_0x559ce2(Box,{'marginBottom':0x1,'children':a22_0x101712(Text,{'color':_0x5f0d5c(0x9b),'children':['\x20!','\x20\x20','无效的命令,可用命令如下:']})}),_0x10c4c0[_0x5f0d5c(0xa0)](_0x2313a8=>a22_0x101712(Box,{'children':[a22_0x101712(Text,{'children':[_0x5f0d5c(0xa1),_0x2313a8[_0x5f0d5c(0xa3)]]}),a22_0x559ce2(Text,{'color':'gray','children':_0x2313a8[_0x5f0d5c(0xa5)]})]},_0x2313a8[_0x5f0d5c(0xa3)])),a22_0x559ce2(Box,{'marginTop':0x1,'marginBottom':0x1,'children':a22_0x559ce2(Text,{'color':_0x5f0d5c(0x9b),'children':_0x5f0d5c(0x9a)})}),_0x276f21[_0x5f0d5c(0xa0)](_0x2f601b=>a22_0x101712(Box,{'children':[a22_0x101712(Text,{'children':[_0x5f0d5c(0xa1),_0x2f601b[_0x5f0d5c(0xa3)]]}),a22_0x559ce2(Text,{'color':_0x5f0d5c(0x9b),'children':_0x2f601b[_0x5f0d5c(0xa5)]})]},_0x2f601b['command']))]});}
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']))]});}
@@ -1 +1 @@
1
- (function(_0x4721de,_0x15d863){const _0x27c453=a23_0x2035,_0x2647cc=_0x4721de();while(!![]){try{const _0x1482af=parseInt(_0x27c453(0x1bc))/0x1+parseInt(_0x27c453(0x1b5))/0x2+-parseInt(_0x27c453(0x1c8))/0x3*(-parseInt(_0x27c453(0x1ba))/0x4)+-parseInt(_0x27c453(0x1c9))/0x5*(-parseInt(_0x27c453(0x1c2))/0x6)+parseInt(_0x27c453(0x1c5))/0x7+-parseInt(_0x27c453(0x1bf))/0x8*(parseInt(_0x27c453(0x1c1))/0x9)+parseInt(_0x27c453(0x1c7))/0xa*(-parseInt(_0x27c453(0x1b8))/0xb);if(_0x1482af===_0x15d863)break;else _0x2647cc['push'](_0x2647cc['shift']());}catch(_0x1e6049){_0x2647cc['push'](_0x2647cc['shift']());}}}(a23_0x3d21,0x5c7d0));import{jsx as a23_0x140ca5}from'react/jsx-runtime';import{resolve}from'node:path';import{writeFileSync}from'node:fs';function a23_0x3d21(){const _0x17cda8=['log','320439qTjEsb','get','stringify','8ViSFoY','undefined','148869ukmDST','129702SUaMPE','utf8','includes','4730992ycYFSM','未提供配置值','46820DuEWPh','426741YhyXSj','60rXTLcA','72304qDwKVG','red','set','3443JueUFf','input','16NNlDHj'];a23_0x3d21=function(){return _0x17cda8;};return a23_0x3d21();}import{ConfigHelp}from'./config-help.js';function a23_0x2035(_0x18b010,_0x2fb902){const _0x3d21b1=a23_0x3d21();return a23_0x2035=function(_0x2035ed,_0x1435e9){_0x2035ed=_0x2035ed-0x1b5;let _0x4f96a9=_0x3d21b1[_0x2035ed];return _0x4f96a9;},a23_0x2035(_0x18b010,_0x2fb902);}import{Box,Text}from'ink';import{readConfig}from'../utils/config.js';const configPath=resolve(process['cwd'](),'.lovrabetrc');export function Config(_0xbbf957){const _0x30c011=a23_0x2035,{cli:_0x3583dd}=_0xbbf957,_0x147c3d=_0x3583dd['input'][0x1],_0x3a201d=_0x3583dd[_0x30c011(0x1b9)][0x2],_0x4048c7=[_0x30c011(0x1b7),'get'][_0x30c011(0x1c4)](_0x147c3d||''),_0x859c8a=_0x3583dd['input']['length']>=0x3,_0xe0e042=readConfig();if(_0x147c3d===_0x30c011(0x1b7)){if(_0x3a201d){const _0x10c44f=_0x3583dd['input'][0x3];if(typeof _0x10c44f!==_0x30c011(0x1c0)){_0xe0e042[_0x3a201d]=_0x10c44f;try{writeFileSync(configPath,JSON[_0x30c011(0x1be)](_0xe0e042,null,0x2),{'encoding':_0x30c011(0x1c3)});}catch(_0x26ce72){return a23_0x140ca5(Box,{'children':a23_0x140ca5(Text,{'color':_0x30c011(0x1b6),'children':'保存配置失败'})});}return null;}return a23_0x140ca5(Box,{'children':a23_0x140ca5(Text,{'color':_0x30c011(0x1b6),'children':_0x30c011(0x1c6)})});}}if(_0x147c3d===_0x30c011(0x1bd)){if(_0x3a201d)return console[_0x30c011(0x1bb)](_0xe0e042[_0x3a201d]||_0x30c011(0x1c0)),null;return null;}if(_0x147c3d==='list')return console[_0x30c011(0x1bb)](JSON[_0x30c011(0x1be)](_0xe0e042,null,0x2)),null;if(!_0x4048c7||!_0x859c8a)return a23_0x140ca5(ConfigHelp,{});return null;}
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;}
@@ -1 +1 @@
1
- function a24_0x14f0(){const _0x3ba126=['https://daily-api.lovrabet.com','online','226330CaRFdP','1647531IoYhuE','945832TLszuY','https://api.lovrabet.com','334826lsrKMn','2EBMyiG','15ugjUXQ','https://user-daily.lovrabet.com','50375aoMyHp','892644ATiBPQ','796344wpGASb','14xOUlLD','286jsjvLn','16pJTNus','6684LlpugY'];a24_0x14f0=function(){return _0x3ba126;};return a24_0x14f0();}const a24_0x431436=a24_0x3b4c;(function(_0x3d58ad,_0x4d9a0e){const _0x5724f9=a24_0x3b4c,_0x439ffd=_0x3d58ad();while(!![]){try{const _0x6db49e=parseInt(_0x5724f9(0xca))/0x1*(parseInt(_0x5724f9(0xcb))/0x2)+parseInt(_0x5724f9(0xcf))/0x3+parseInt(_0x5724f9(0xc8))/0x4*(parseInt(_0x5724f9(0xcc))/0x5)+-parseInt(_0x5724f9(0xd0))/0x6*(-parseInt(_0x5724f9(0xd1))/0x7)+-parseInt(_0x5724f9(0xd3))/0x8*(-parseInt(_0x5724f9(0xc7))/0x9)+-parseInt(_0x5724f9(0xc6))/0xa*(-parseInt(_0x5724f9(0xd2))/0xb)+-parseInt(_0x5724f9(0xd4))/0xc*(parseInt(_0x5724f9(0xce))/0xd);if(_0x6db49e===_0x4d9a0e)break;else _0x439ffd['push'](_0x439ffd['shift']());}catch(_0x1f1c47){_0x439ffd['push'](_0x439ffd['shift']());}}}(a24_0x14f0,0x627c5));import{getEnv}from'./env.js';function a24_0x3b4c(_0x4a0121,_0x4d1a5f){const _0x14f0eb=a24_0x14f0();return a24_0x3b4c=function(_0x3b4cc3,_0x15fbce){_0x3b4cc3=_0x3b4cc3-0xc4;let _0x13a241=_0x14f0eb[_0x3b4cc3];return _0x13a241;},a24_0x3b4c(_0x4a0121,_0x4d1a5f);}export const getUserDomain=()=>getEnv()===a24_0x431436(0xc5)?'https://user.lovrabet.com':a24_0x431436(0xcd);export const getApiDomain=()=>getEnv()==='online'?a24_0x431436(0xc9):a24_0x431436(0xc4);
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';
@@ -1 +1 @@
1
- const a25_0x230747=a25_0x5da6;function a25_0x5da6(_0x3d086d,_0x1d4ab7){const _0x5bc036=a25_0x5bc0();return a25_0x5da6=function(_0x5da635,_0x2205e2){_0x5da635=_0x5da635-0x159;let _0x4fc8e1=_0x5bc036[_0x5da635];return _0x4fc8e1;},a25_0x5da6(_0x3d086d,_0x1d4ab7);}(function(_0x5cf4f9,_0x83ed01){const _0x3de6c5=a25_0x5da6,_0x497bd4=_0x5cf4f9();while(!![]){try{const _0x4ae4d6=parseInt(_0x3de6c5(0x15b))/0x1*(parseInt(_0x3de6c5(0x166))/0x2)+parseInt(_0x3de6c5(0x15f))/0x3+-parseInt(_0x3de6c5(0x162))/0x4*(-parseInt(_0x3de6c5(0x160))/0x5)+-parseInt(_0x3de6c5(0x164))/0x6*(parseInt(_0x3de6c5(0x167))/0x7)+-parseInt(_0x3de6c5(0x163))/0x8+-parseInt(_0x3de6c5(0x159))/0x9*(parseInt(_0x3de6c5(0x15c))/0xa)+-parseInt(_0x3de6c5(0x15d))/0xb*(-parseInt(_0x3de6c5(0x161))/0xc);if(_0x4ae4d6===_0x83ed01)break;else _0x497bd4['push'](_0x497bd4['shift']());}catch(_0x399cdf){_0x497bd4['push'](_0x497bd4['shift']());}}}(a25_0x5bc0,0x33038));let env=process[a25_0x230747(0x165)][a25_0x230747(0x15e)]||a25_0x230747(0x15a);function a25_0x5bc0(){const _0xf1f65e=['831330mfGvag','env','222dekMkn','7YsLrsy','1316457UnHLtL','online','15tYQxWU','10JaTmGS','6339091XsBDGU','LOVRABET_ENV','179079tqjaBf','30QqbFLo','12cMyeDc','53768hyJGdJ','1796088WBulCa'];a25_0x5bc0=function(){return _0xf1f65e;};return a25_0x5bc0();}export function getEnv(){return env;}export function initEnv(_0x59b5c8){env=_0x59b5c8;}
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
- function a27_0x3ce4(){const _0x31e9d2=['replace','2xukVKR','899717oBIVex','3116052npkiKQ','48LaHZpQ','58683ZSacQZ','10ZvmFSt','14xYbDxz','now','407792SKsGWt','toFixed','749440CZRETt','4880337VskVSu','6208443SsLTLA'];a27_0x3ce4=function(){return _0x31e9d2;};return a27_0x3ce4();}(function(_0x6576bb,_0xbdb394){const _0x250525=a27_0x5623,_0x4d5aed=_0x6576bb();while(!![]){try{const _0x4029b9=parseInt(_0x250525(0x180))/0x1+parseInt(_0x250525(0x18d))/0x2*(parseInt(_0x250525(0x183))/0x3)+parseInt(_0x250525(0x181))/0x4+-parseInt(_0x250525(0x189))/0x5*(parseInt(_0x250525(0x182))/0x6)+parseInt(_0x250525(0x185))/0x7*(-parseInt(_0x250525(0x187))/0x8)+parseInt(_0x250525(0x18b))/0x9*(parseInt(_0x250525(0x184))/0xa)+-parseInt(_0x250525(0x18a))/0xb;if(_0x4029b9===_0xbdb394)break;else _0x4d5aed['push'](_0x4d5aed['shift']());}catch(_0x309f2a){_0x4d5aed['push'](_0x4d5aed['shift']());}}}(a27_0x3ce4,0x9d147));function a27_0x5623(_0x39d34d,_0x4a19c6){const _0x3ce4a5=a27_0x3ce4();return a27_0x5623=function(_0x562339,_0xe830ed){_0x562339=_0x562339-0x180;let _0x35621c=_0x3ce4a5[_0x562339];return _0x35621c;},a27_0x5623(_0x39d34d,_0x4a19c6);}export function formatElapsed(_0x2f7c26){const _0x3027ea=a27_0x5623,_0x117140=Date[_0x3027ea(0x186)]()-_0x2f7c26;if(_0x117140<0x3e8)return _0x117140+'ms';const _0x2c85d8=(_0x117140/0x3e8)[_0x3027ea(0x188)](0x2),_0x3afb4b=_0x2c85d8[_0x3027ea(0x18c)](/\.?0+$/u,'');return _0x3afb4b+'s';}
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';}
@@ -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(_0x3df42e,_0x1a7e82){var _0xf66d78=a29_0x512d,_0x29a83f=_0x3df42e();while(!![]){try{var _0x35a139=parseInt(_0xf66d78(0xdf))/0x1+-parseInt(_0xf66d78(0xe2))/0x2*(parseInt(_0xf66d78(0xe7))/0x3)+-parseInt(_0xf66d78(0xe9))/0x4*(parseInt(_0xf66d78(0xe6))/0x5)+parseInt(_0xf66d78(0xde))/0x6*(parseInt(_0xf66d78(0xe0))/0x7)+-parseInt(_0xf66d78(0xe4))/0x8+-parseInt(_0xf66d78(0xe1))/0x9*(parseInt(_0xf66d78(0xe5))/0xa)+parseInt(_0xf66d78(0xea))/0xb*(parseInt(_0xf66d78(0xeb))/0xc);if(_0x35a139===_0x1a7e82)break;else _0x29a83f['push'](_0x29a83f['shift']());}catch(_0x3fda4d){_0x29a83f['push'](_0x29a83f['shift']());}}}(a29_0x7c82,0x3035a));function a29_0x512d(_0x4d2cb9,_0x1672d6){var _0x7c821=a29_0x7c82();return a29_0x512d=function(_0x512d91,_0x58dd78){_0x512d91=_0x512d91-0xde;var _0x470be8=_0x7c821[_0x512d91];return _0x470be8;},a29_0x512d(_0x4d2cb9,_0x1672d6);}import{jsx as a29_0x11d97c,jsxs as a29_0x25db55}from'react/jsx-runtime';import{Box,Text}from'ink';import{TaskTime}from'./task-time.js';export function TaskFinished(_0x516869){var _0x187339=a29_0x512d;return a29_0x25db55(Box,{'children':[a29_0x11d97c(Box,{'width':'1'}),a29_0x11d97c(Text,{'color':_0x187339(0xe8),'children':_0x187339(0xe3)}),a29_0x11d97c(Text,{'children':_0x516869[_0x187339(0xec)]}),a29_0x11d97c(TaskTime,{'elapsed':_0x516869['elapsed']})]});}function a29_0x7c82(){var _0x241ca4=['710886rINInB','green','36HoCAtI','77627ZKPEQw','1284xaUqJE','taskName','58314qspwco','375277vizpdf','21aSbSlQ','1818FjqWrp','2TNucbu','\x20√\x20','2580632tixKYl','18340fgtEiJ','17810GlfDGT'];a29_0x7c82=function(){return _0x241ca4;};return a29_0x7c82();}
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
- function a30_0x2a1c(){var _0x5d5bcd=['1900zLUYWo','2615755qISyhf','loading','\x20\x20\x20','18DMJeFf','64695EjGTzH','91267ZfkUVY','finished','672896RqaXXl','208200EFvSfA','2105066DMvlDx','8QQPIYd','617175LIWrGR','dots','green','234qNhOjE'];a30_0x2a1c=function(){return _0x5d5bcd;};return a30_0x2a1c();}(function(_0xd5e890,_0x5bd632){var _0xb791d4=a30_0x35b4,_0x5e6a5e=_0xd5e890();while(!![]){try{var _0x49acb0=-parseInt(_0xb791d4(0x177))/0x1+parseInt(_0xb791d4(0x175))/0x2+parseInt(_0xb791d4(0x170))/0x3+parseInt(_0xb791d4(0x176))/0x4*(-parseInt(_0xb791d4(0x16c))/0x5)+parseInt(_0xb791d4(0x16f))/0x6*(parseInt(_0xb791d4(0x173))/0x7)+parseInt(_0xb791d4(0x174))/0x8*(-parseInt(_0xb791d4(0x16a))/0x9)+-parseInt(_0xb791d4(0x16b))/0xa*(-parseInt(_0xb791d4(0x171))/0xb);if(_0x49acb0===_0x5bd632)break;else _0x5e6a5e['push'](_0x5e6a5e['shift']());}catch(_0x50372c){_0x5e6a5e['push'](_0x5e6a5e['shift']());}}}(a30_0x2a1c,0x92301));import{jsx as a30_0x40d8ec,jsxs as a30_0x2bd7e3}from'react/jsx-runtime';import{Text}from'ink';import a30_0x2d7dde from'ink-spinner';function a30_0x35b4(_0x46853b,_0x1f38c8){var _0x2a1cc4=a30_0x2a1c();return a30_0x35b4=function(_0x35b4e4,_0x1de7c2){_0x35b4e4=_0x35b4e4-0x169;var _0x5c0343=_0x2a1cc4[_0x35b4e4];return _0x5c0343;},a30_0x35b4(_0x46853b,_0x1f38c8);}export function TaskLoading(_0x2bc886){var _0x42aa0b=a30_0x35b4;if(_0x2bc886[_0x42aa0b(0x172)])return a30_0x40d8ec(Text,{'color':_0x42aa0b(0x169),'children':'\x20√\x20'});if(_0x2bc886[_0x42aa0b(0x16d)])return a30_0x2bd7e3(Text,{'color':_0x42aa0b(0x169),'children':['\x20',a30_0x40d8ec(a30_0x2d7dde,{'type':_0x42aa0b(0x178)}),'\x20']});return a30_0x40d8ec(Text,{'children':_0x42aa0b(0x16e)});}
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
- function a31_0x1d3b(_0x27d585,_0x389f39){var _0x1ac74f=a31_0x1ac7();return a31_0x1d3b=function(_0x1d3b7a,_0x4b69bc){_0x1d3b7a=_0x1d3b7a-0x1e8;var _0x2f6092=_0x1ac74f[_0x1d3b7a];return _0x2f6092;},a31_0x1d3b(_0x27d585,_0x389f39);}(function(_0x3f3162,_0x571b96){var _0x443b3f=a31_0x1d3b,_0x132280=_0x3f3162();while(!![]){try{var _0x284912=parseInt(_0x443b3f(0x1eb))/0x1+parseInt(_0x443b3f(0x1ef))/0x2*(-parseInt(_0x443b3f(0x1f3))/0x3)+-parseInt(_0x443b3f(0x1e9))/0x4*(-parseInt(_0x443b3f(0x1ee))/0x5)+-parseInt(_0x443b3f(0x1ec))/0x6+-parseInt(_0x443b3f(0x1f1))/0x7+-parseInt(_0x443b3f(0x1ed))/0x8*(-parseInt(_0x443b3f(0x1f4))/0x9)+parseInt(_0x443b3f(0x1ea))/0xa*(parseInt(_0x443b3f(0x1f0))/0xb);if(_0x284912===_0x571b96)break;else _0x132280['push'](_0x132280['shift']());}catch(_0x276589){_0x132280['push'](_0x132280['shift']());}}}(a31_0x1ac7,0xf35b5));import{jsx as a31_0x672ffd,jsxs as a31_0x1bf841}from'react/jsx-runtime';function a31_0x1ac7(){var _0x49e5b7=['5WjaFIQ','2tAFlGO','11CdIVvZ','5983187NtnQGk','taskName','3566841RwcqWW','117DnvmWV','elapsed','7188468CLiHyE','8366730qIikNE','616763klIgik','3585792WkdMHc','238496xWHNDg'];a31_0x1ac7=function(){return _0x49e5b7;};return a31_0x1ac7();}import{Box,Text}from'ink';import{TaskLoading}from'./task-loading.js';import{TaskTime}from'./task-time.js';export function TaskRunning(_0x25ead6){var _0x26e94e=a31_0x1d3b;return a31_0x1bf841(Box,{'children':[a31_0x672ffd(Box,{'width':'1'}),a31_0x672ffd(TaskLoading,{..._0x25ead6}),a31_0x672ffd(Text,{'children':_0x25ead6[_0x26e94e(0x1f2)]}),a31_0x672ffd(TaskTime,{'elapsed':_0x25ead6[_0x26e94e(0x1e8)]})]});}
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
- function a32_0x4b85(){var _0x186b23=['8uBzPrq','165PlwTfM','690410JbjCVP','897171PMFKiG','106866eaiUup','695280fbrjjZ','elapsed','150FkKmdJ','4123160vKcVLd','1419390GixqyP','20796KWbDDb','189vAxtUs'];a32_0x4b85=function(){return _0x186b23;};return a32_0x4b85();}(function(_0x1bec65,_0x23749b){var _0x5e12cc=a32_0x22c3,_0x5d7934=_0x1bec65();while(!![]){try{var _0x41c9c6=parseInt(_0x5e12cc(0x1b0))/0x1+-parseInt(_0x5e12cc(0x1ac))/0x2*(-parseInt(_0x5e12cc(0x1af))/0x3)+parseInt(_0x5e12cc(0x1a7))/0x4+parseInt(_0x5e12cc(0x1aa))/0x5+parseInt(_0x5e12cc(0x1a6))/0x6*(-parseInt(_0x5e12cc(0x1ad))/0x7)+-parseInt(_0x5e12cc(0x1ae))/0x8*(-parseInt(_0x5e12cc(0x1ab))/0x9)+-parseInt(_0x5e12cc(0x1a9))/0xa*(parseInt(_0x5e12cc(0x1a5))/0xb);if(_0x41c9c6===_0x23749b)break;else _0x5d7934['push'](_0x5d7934['shift']());}catch(_0x4f88be){_0x5d7934['push'](_0x5d7934['shift']());}}}(a32_0x4b85,0xae5a6));function a32_0x22c3(_0x2a0276,_0xf3753b){var _0x4b8520=a32_0x4b85();return a32_0x22c3=function(_0x22c39b,_0x25c082){_0x22c39b=_0x22c39b-0x1a5;var _0x130bde=_0x4b8520[_0x22c39b];return _0x130bde;},a32_0x22c3(_0x2a0276,_0xf3753b);}import{jsx as a32_0x33eacf,Fragment as a32_0x587482,jsxs as a32_0x50fc13}from'react/jsx-runtime';import{Text}from'ink';export function TaskTime(_0x5461a5){var _0x27cd98=a32_0x22c3;if(_0x5461a5[_0x27cd98(0x1a8)])return a32_0x50fc13(a32_0x587482,{'children':[a32_0x33eacf(Text,{'color':'gray','children':'\x20['}),a32_0x33eacf(Text,{'color':'gray','bold':!![],'children':_0x5461a5[_0x27cd98(0x1a8)]}),a32_0x33eacf(Text,{'color':'gray','children':']'})]});return null;}
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 a33_0x23943f=a33_0x43c6;(function(_0x5c4e67,_0x1220b1){const _0x49317a=a33_0x43c6,_0x5d1198=_0x5c4e67();while(!![]){try{const _0x27b0ff=parseInt(_0x49317a(0x121))/0x1+-parseInt(_0x49317a(0x12a))/0x2*(-parseInt(_0x49317a(0x132))/0x3)+parseInt(_0x49317a(0x130))/0x4*(parseInt(_0x49317a(0x12f))/0x5)+-parseInt(_0x49317a(0x127))/0x6+parseInt(_0x49317a(0x126))/0x7*(parseInt(_0x49317a(0x124))/0x8)+-parseInt(_0x49317a(0x12d))/0x9*(parseInt(_0x49317a(0x131))/0xa)+parseInt(_0x49317a(0x133))/0xb;if(_0x27b0ff===_0x1220b1)break;else _0x5d1198['push'](_0x5d1198['shift']());}catch(_0x4c4f6d){_0x5d1198['push'](_0x5d1198['shift']());}}}(a33_0xdab8,0x6ebd0));import a33_0x441130 from'node:path';import{fileURLToPath}from'node:url';import{useCallback,useState}from'react';function a33_0x43c6(_0x2c77a9,_0x387545){const _0xdab839=a33_0xdab8();return a33_0x43c6=function(_0x43c61a,_0x282034){_0x43c61a=_0x43c61a-0x121;let _0x2194ba=_0xdab839[_0x43c61a];return _0x2194ba;},a33_0x43c6(_0x2c77a9,_0x387545);}import{copyDirectory}from'../utils/copy-directory.js';import{formatElapsed}from'./format-elapsed.js';import{logger}from'../utils/logger.js';const __dirname=a33_0x441130[a33_0x23943f(0x122)](fileURLToPath(import.meta['url'])),templateDir=a33_0x441130['resolve'](__dirname,a33_0x23943f(0x12e));export function useCopyProjectTemplate(){const [_0x103eaf,_0x4f2244]=useState(![]),[_0x32dbd7,_0x5cc5d6]=useState(![]),[_0x5bc629,_0x300002]=useState(''),_0x1e9f8f=useCallback(async _0x4a1b6a=>{const _0x38526b=a33_0x43c6,_0x47618d=Date[_0x38526b(0x123)](),_0x5e345b=a33_0x441130[_0x38526b(0x135)](process[_0x38526b(0x12c)](),_0x4a1b6a);_0x4f2244(!![]);try{logger[_0x38526b(0x129)](_0x38526b(0x128),'开始复制项目模板',{'projectCode':_0x4a1b6a,'templateDir':templateDir}),await copyDirectory(templateDir,_0x5e345b);const _0x34be85=Date['now']()-_0x47618d;logger['success'](_0x38526b(0x128),_0x38526b(0x134),_0x34be85,{'projectCode':_0x4a1b6a});}catch(_0x1b610b){const _0x509ac5=Date[_0x38526b(0x123)]()-_0x47618d;logger[_0x38526b(0x12b)](_0x38526b(0x128),_0x38526b(0x125),{'projectCode':_0x4a1b6a,'error':_0x1b610b instanceof Error?_0x1b610b['message']:String(_0x1b610b),'duration':_0x509ac5});throw _0x1b610b;}finally{_0x4f2244(![]),_0x5cc5d6(!![]),_0x300002(formatElapsed(_0x47618d));}},[]);return{'taskName':'复制项目文件','finished':_0x32dbd7,'loading':_0x103eaf,'elapsed':_0x5bc629,'doTask':_0x1e9f8f};}function a33_0xdab8(){const _0x371d95=['126120GUvgws','387417sytlIF','5057107SqhCWv','项目模板复制完成','resolve','37374kcCHAf','dirname','now','520sITSyC','项目模板复制失败','11725qFTgFE','2375496mgiDNy','copy','info','2ArvABA','error','cwd','495DjkOhp','../../templates/projects/sub-app-react-demo','1346725feeCDL','12LBMQAx'];a33_0xdab8=function(){return _0x371d95;};return a33_0xdab8();}
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(_0x155e62,_0x8831b5){const _0x30e306=a34_0x4d4f,_0x2f46d3=_0x155e62();while(!![]){try{const _0x5f180e=parseInt(_0x30e306(0x18f))/0x1*(parseInt(_0x30e306(0x188))/0x2)+parseInt(_0x30e306(0x17f))/0x3+parseInt(_0x30e306(0x189))/0x4*(parseInt(_0x30e306(0x187))/0x5)+parseInt(_0x30e306(0x182))/0x6+-parseInt(_0x30e306(0x18d))/0x7+parseInt(_0x30e306(0x193))/0x8*(-parseInt(_0x30e306(0x192))/0x9)+parseInt(_0x30e306(0x18e))/0xa;if(_0x5f180e===_0x8831b5)break;else _0x2f46d3['push'](_0x2f46d3['shift']());}catch(_0x388d32){_0x2f46d3['push'](_0x2f46d3['shift']());}}}(a34_0x47d3,0xcefa9));import a34_0xd2bb04 from'node:path';import{useCallback,useState}from'react';function a34_0x47d3(){const _0x4a21c8=['2sZqBRt','604160yFrYVX','代码格式化失败','error','info','8253595diDpgK','9965660kCGusO','87121yecvkU','prettier','resolve','28989kUVEzW','2696rpXpxk','624339mxRsKV','format','开始格式化代码','1860882cFVdpE','success','now','message','代码格式化完成','50yXVNgB'];a34_0x47d3=function(){return _0x4a21c8;};return a34_0x47d3();}function a34_0x4d4f(_0x105634,_0x226e5c){const _0x47d3da=a34_0x47d3();return a34_0x4d4f=function(_0x4d4fa6,_0x4fc897){_0x4d4fa6=_0x4d4fa6-0x17f;let _0x3f3766=_0x47d3da[_0x4d4fa6];return _0x3f3766;},a34_0x4d4f(_0x105634,_0x226e5c);}import{execa}from'execa';import{formatElapsed}from'./format-elapsed.js';import{logger}from'../utils/logger.js';export function useFormatCode(){const [_0x30d5c4,_0x2475f4]=useState(![]),[_0x43b4ef,_0xe205d0]=useState(![]),[_0x4ebca8,_0x4d91c6]=useState(''),_0x4d5d3b=useCallback(async _0x111859=>{const _0x2ea943=a34_0x4d4f,_0x28d19d=Date['now'](),_0xa102a3=a34_0xd2bb04[_0x2ea943(0x191)](process['cwd'](),_0x111859);_0x2475f4(!![]);try{logger[_0x2ea943(0x18c)](_0x2ea943(0x180),_0x2ea943(0x181),{'projectCode':_0x111859}),await execa('npx',[_0x2ea943(0x190),'--write','.'],{'cwd':_0xa102a3});const _0x35f85a=Date['now']()-_0x28d19d;logger[_0x2ea943(0x183)](_0x2ea943(0x180),_0x2ea943(0x186),_0x35f85a,{'projectCode':_0x111859});}catch(_0x4827bb){const _0x127c02=Date[_0x2ea943(0x184)]()-_0x28d19d;logger[_0x2ea943(0x18b)]('format',_0x2ea943(0x18a),{'projectCode':_0x111859,'error':_0x4827bb instanceof Error?_0x4827bb[_0x2ea943(0x185)]:String(_0x4827bb),'duration':_0x127c02});throw _0x4827bb;}finally{_0x2475f4(![]),_0xe205d0(!![]),_0x4d91c6(formatElapsed(_0x28d19d));}},[]);return{'taskName':'格式化代码','finished':_0x43b4ef,'loading':_0x30d5c4,'elapsed':_0x4ebca8,'doTask':_0x4d5d3b};}
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 a35_0x3c26(){const _0x53c88d=['364468ITYHOL','依赖安装完成','依赖安装失败','10882932qWSVsS','cwd','82408tQiDWe','安装依赖','10042713GovbDv','npm','success','11XEQwZi','开始安装依赖','https://registry.npmmirror.com','error','266EVhZyj','827223Lckyqo','info','588czAKaP','10AQtFIz','now','message','9ZwsuBk','68810YQKHEA','resolve','install','54364rwrtqi'];a35_0x3c26=function(){return _0x53c88d;};return a35_0x3c26();}function a35_0x3b21(_0x43c5ef,_0x2f6623){const _0x3c2621=a35_0x3c26();return a35_0x3b21=function(_0x3b2147,_0x56f58e){_0x3b2147=_0x3b2147-0x173;let _0x12f4a2=_0x3c2621[_0x3b2147];return _0x12f4a2;},a35_0x3b21(_0x43c5ef,_0x2f6623);}(function(_0x3c520c,_0x3088e9){const _0x157f47=a35_0x3b21,_0x53847f=_0x3c520c();while(!![]){try{const _0xbcd5c1=-parseInt(_0x157f47(0x17d))/0x1+parseInt(_0x157f47(0x187))/0x2*(-parseInt(_0x157f47(0x183))/0x3)+parseInt(_0x157f47(0x188))/0x4+parseInt(_0x157f47(0x184))/0x5*(parseInt(_0x157f47(0x17f))/0x6)+-parseInt(_0x157f47(0x17c))/0x7*(-parseInt(_0x157f47(0x173))/0x8)+-parseInt(_0x157f47(0x175))/0x9*(parseInt(_0x157f47(0x180))/0xa)+parseInt(_0x157f47(0x178))/0xb*(parseInt(_0x157f47(0x18b))/0xc);if(_0xbcd5c1===_0x3088e9)break;else _0x53847f['push'](_0x53847f['shift']());}catch(_0x3434c9){_0x53847f['push'](_0x53847f['shift']());}}}(a35_0x3c26,0xae32c));import a35_0x4545d6 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 _0x98e376=a35_0x3b21,[_0xe2f75c,_0x10f1c2]=useState(![]),[_0x5c0f4a,_0x38edec]=useState(![]),[_0x3de890,_0x4ab3a1]=useState(''),_0x18b5f3=useCallback(async _0xd41336=>{const _0x376b9d=a35_0x3b21,_0x26f332=Date[_0x376b9d(0x181)](),_0x3a8106=a35_0x4545d6[_0x376b9d(0x185)](process[_0x376b9d(0x18c)](),_0xd41336);_0x10f1c2(!![]),_0x38edec(![]);const _0x2ed679=async(_0x2d70c4,_0x5491c5)=>{await execa(_0x2d70c4,_0x5491c5,{'cwd':_0x3a8106});};try{logger[_0x376b9d(0x17e)]('install',_0x376b9d(0x179),{'projectCode':_0xd41336,'registry':_0x376b9d(0x17a)}),await _0x2ed679(_0x376b9d(0x176),[_0x376b9d(0x186),'--registry',_0x376b9d(0x17a)]);const _0x4f8834=Date[_0x376b9d(0x181)]()-_0x26f332;logger[_0x376b9d(0x177)](_0x376b9d(0x186),_0x376b9d(0x189),_0x4f8834,{'projectCode':_0xd41336});}catch(_0x14cbe0){const _0x558781=Date['now']()-_0x26f332;logger[_0x376b9d(0x17b)](_0x376b9d(0x186),_0x376b9d(0x18a),{'projectCode':_0xd41336,'error':_0x14cbe0 instanceof Error?_0x14cbe0[_0x376b9d(0x182)]:String(_0x14cbe0),'duration':_0x558781});throw _0x14cbe0;}finally{_0x10f1c2(![]),_0x38edec(!![]),_0x4ab3a1(formatElapsed(_0x26f332));}},[]);return{'taskName':_0x98e376(0x174),'finished':_0x5c0f4a,'loading':_0xe2f75c,'elapsed':_0x3de890,'doTask':_0x18b5f3};}
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(_0x260246,_0x4f0271){var _0x19e8f7=a36_0x4e76,_0x208331=_0x260246();while(!![]){try{var _0x3466ea=parseInt(_0x19e8f7(0x16b))/0x1*(-parseInt(_0x19e8f7(0x165))/0x2)+parseInt(_0x19e8f7(0x169))/0x3+parseInt(_0x19e8f7(0x16f))/0x4+parseInt(_0x19e8f7(0x170))/0x5+-parseInt(_0x19e8f7(0x171))/0x6*(parseInt(_0x19e8f7(0x172))/0x7)+parseInt(_0x19e8f7(0x173))/0x8+parseInt(_0x19e8f7(0x167))/0x9*(-parseInt(_0x19e8f7(0x16e))/0xa);if(_0x3466ea===_0x4f0271)break;else _0x208331['push'](_0x208331['shift']());}catch(_0x2cf4ac){_0x208331['push'](_0x208331['shift']());}}}(a36_0x1540,0x43fcb));import{jsx as a36_0x2d4880,jsxs as a36_0x408f3f}from'react/jsx-runtime';function a36_0x4e76(_0x23b84f,_0x52dcfb){var _0x154070=a36_0x1540();return a36_0x4e76=function(_0x4e76b1,_0x4ad01a){_0x4e76b1=_0x4e76b1-0x165;var _0x34cf40=_0x154070[_0x4e76b1];return _0x34cf40;},a36_0x4e76(_0x23b84f,_0x52dcfb);}import{Box,Text}from'ink';export function Help(){var _0x2296bf=a36_0x4e76;return a36_0x408f3f(Box,{'flexDirection':_0x2296bf(0x16c),'marginTop':0x1,'marginBottom':0x1,'children':[a36_0x408f3f(Box,{'children':[a36_0x2d4880(Box,{'width':'1'}),a36_0x2d4880(Text,{'children':_0x2296bf(0x168)})]}),a36_0x408f3f(Box,{'marginTop':0x1,'children':[a36_0x2d4880(Box,{'width':'1'}),a36_0x408f3f(Text,{'children':['\x20\x20','使用']}),a36_0x408f3f(Text,{'bold':!![],'color':_0x2296bf(0x16a),'children':['\x20',_0x2296bf(0x16d),'\x20']}),a36_0x2d4880(Text,{'children':_0x2296bf(0x166)})]})]});}function a36_0x1540(){var _0x1a4302=['1391900WYjzno','2512280VRZClX','18bxYZdv','267862wkgplV','1591272TxOTZN','570694heCbks','查看可用命令。','6310251USBTVS','!\x20请指定一个有效的命令。','991257WxVVOZ','green','1iBPfmP','column','lovrabet\x20--help','10NTWxyQ'];a36_0x1540=function(){return _0x1a4302;};return a36_0x1540();}
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)})]})]});}
@@ -1 +1 @@
1
- const a37_0x2ff1c7=a37_0x4872;function a37_0x4872(_0x4b4de5,_0x3f12ae){const _0x2b87f9=a37_0x2b87();return a37_0x4872=function(_0x487208,_0x296e4e){_0x487208=_0x487208-0xd1;let _0x40d63b=_0x2b87f9[_0x487208];return _0x40d63b;},a37_0x4872(_0x4b4de5,_0x3f12ae);}(function(_0xdab77c,_0x6b5845){const _0x15560e=a37_0x4872,_0x4ea059=_0xdab77c();while(!![]){try{const _0x146532=-parseInt(_0x15560e(0xd9))/0x1+parseInt(_0x15560e(0xde))/0x2*(-parseInt(_0x15560e(0xe0))/0x3)+-parseInt(_0x15560e(0xdd))/0x4*(-parseInt(_0x15560e(0xdf))/0x5)+parseInt(_0x15560e(0xd8))/0x6*(parseInt(_0x15560e(0xd5))/0x7)+parseInt(_0x15560e(0xd4))/0x8*(parseInt(_0x15560e(0xd3))/0x9)+parseInt(_0x15560e(0xdb))/0xa*(-parseInt(_0x15560e(0xd7))/0xb)+parseInt(_0x15560e(0xdc))/0xc*(parseInt(_0x15560e(0xd2))/0xd);if(_0x146532===_0x6b5845)break;else _0x4ea059['push'](_0x4ea059['shift']());}catch(_0x14f726){_0x4ea059['push'](_0x4ea059['shift']());}}}(a37_0x2b87,0x7d5de));import{existsSync,readFileSync}from'node:fs';import{resolve}from'node:path';export const configPath=resolve(process[a37_0x2ff1c7(0xd6)](),a37_0x2ff1c7(0xd1));function a37_0x2b87(){const _0x2060b0=['2616zGWxPh','1222768EIhdCk','2212zxKIuN','10Vqsbgj','183aaVLso','utf8','.lovrabetrc','24453gFHUXC','25677UqRzuO','1376VWvGga','7aVWBmC','cwd','11qfmiwg','398874ooUVtV','853034FLYkvN','parse','1446350YNJmZJ'];a37_0x2b87=function(){return _0x2060b0;};return a37_0x2b87();}export function readConfig(){const _0x1962de=a37_0x2ff1c7;try{if(existsSync(configPath)){const _0x51df3f=readFileSync(configPath,{'encoding':_0x1962de(0xe1)});return _0x51df3f?JSON[_0x1962de(0xda)](_0x51df3f):{};}}catch(_0x4fee76){}return{};}
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(_0x2f8c19,_0x3e0831){const _0x1bc00a=a38_0x458e,_0x2b6be8=_0x2f8c19();while(!![]){try{const _0x4d70af=parseInt(_0x1bc00a(0x1aa))/0x1*(parseInt(_0x1bc00a(0x1af))/0x2)+-parseInt(_0x1bc00a(0x1ae))/0x3*(parseInt(_0x1bc00a(0x1ad))/0x4)+-parseInt(_0x1bc00a(0x1b2))/0x5*(parseInt(_0x1bc00a(0x1ac))/0x6)+-parseInt(_0x1bc00a(0x1b6))/0x7+parseInt(_0x1bc00a(0x1b3))/0x8+parseInt(_0x1bc00a(0x1ab))/0x9*(parseInt(_0x1bc00a(0x1a9))/0xa)+parseInt(_0x1bc00a(0x1a6))/0xb*(-parseInt(_0x1bc00a(0x1a7))/0xc);if(_0x4d70af===_0x3e0831)break;else _0x2b6be8['push'](_0x2b6be8['shift']());}catch(_0x5918eb){_0x2b6be8['push'](_0x2b6be8['shift']());}}}(a38_0x234f,0x8455a));import a38_0x335f2a from'node:path';function a38_0x458e(_0x3e2378,_0x1d0649){const _0x234f25=a38_0x234f();return a38_0x458e=function(_0x458ec1,_0x1c3fee){_0x458ec1=_0x458ec1-0x1a4;let _0x40582d=_0x234f25[_0x458ec1];return _0x40582d;},a38_0x458e(_0x3e2378,_0x1d0649);}import a38_0x482fd2 from'node:fs';export async function copyDirectory(_0x54c513,_0x391aa3){const _0x36ff96=a38_0x458e;try{const _0x1f9d4e=a38_0x482fd2[_0x36ff96(0x1a4)](_0x54c513,{'withFileTypes':!![]});a38_0x482fd2[_0x36ff96(0x1b1)](_0x391aa3,{'recursive':!![]});for(const _0x370f4c of _0x1f9d4e){const _0x3f8f1d=a38_0x335f2a[_0x36ff96(0x1a8)](_0x54c513,_0x370f4c[_0x36ff96(0x1b0)]),_0x5e71a1=a38_0x335f2a['join'](_0x391aa3,_0x370f4c[_0x36ff96(0x1b0)]);_0x370f4c[_0x36ff96(0x1a5)]()?await copyDirectory(_0x3f8f1d,_0x5e71a1):a38_0x482fd2['copyFileSync'](_0x3f8f1d,_0x5e71a1);}}catch(_0x232b72){console[_0x36ff96(0x1b5)](_0x36ff96(0x1b4),_0x232b72);}}function a38_0x234f(){const _0x4cc8e7=['1155232uviULt','复制目录时出错:','error','2314928eYSuzH','readdirSync','isDirectory','11qcPrjt','3675120lpZJFP','join','56930upOYNn','226zuDpyO','1269ptiyTR','258QTFpno','212ZAwSJj','25458QIHHxp','7914oSKEFG','name','mkdirSync','24725DxVtjT'];a38_0x234f=function(){return _0x4cc8e7;};return a38_0x234f();}
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();}