@lovrabet/cli 1.2.1-beta.3 → 1.2.3

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 (65) 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-doc-ui.js +1 -1
  5. package/lib/api/api-doc.js +1 -1
  6. package/lib/api/api-pull-ui.js +1 -1
  7. package/lib/api/fetch-model-list.js +1 -1
  8. package/lib/api/generate-api-file.js +1 -1
  9. package/lib/api/main.js +1 -1
  10. package/lib/api/pull-silent.js +1 -1
  11. package/lib/app-menu/app-menu-sync-ui.js +1 -1
  12. package/lib/app-menu/create-menu.js +1 -1
  13. package/lib/app-menu/get-local-pages.js +1 -1
  14. package/lib/app-menu/get-online-menu-list.js +1 -1
  15. package/lib/app-menu/use-get-online-menu-list.js +1 -1
  16. package/lib/app-menu/utils.js +1 -1
  17. package/lib/app-menu/valid-url.js +1 -1
  18. package/lib/app-menu-update-cdn/current-content.js +1 -1
  19. package/lib/app-menu-update-cdn/input-cdn-asset.js +1 -1
  20. package/lib/app-menu-update-cdn/main.js +1 -1
  21. package/lib/app-menu-update-cdn/update-menu-cdn-url.js +1 -1
  22. package/lib/auth/auth-server-ui.js +1 -1
  23. package/lib/auth/auth-server.js +1 -1
  24. package/lib/auth/constant.js +1 -1
  25. package/lib/auth/get-cookie.js +1 -1
  26. package/lib/auth/is-session-valid.js +1 -1
  27. package/lib/auth/logout.js +1 -1
  28. package/lib/cli.js +1 -1
  29. package/lib/cmd/build-watch.js +1 -1
  30. package/lib/cmd/build.js +1 -1
  31. package/lib/cmd/logs.js +1 -1
  32. package/lib/cmd/preview.js +1 -1
  33. package/lib/cmd/start.js +1 -1
  34. package/lib/config/config-help.js +1 -1
  35. package/lib/config/main.js +1 -1
  36. package/lib/constant/domain.js +1 -1
  37. package/lib/constant/env.js +1 -1
  38. package/lib/create-app/enhanced-guided-create.js +1 -1
  39. package/lib/create-app/format-elapsed.js +1 -1
  40. package/lib/create-app/main.js +1 -1
  41. package/lib/create-app/task-finished.js +1 -1
  42. package/lib/create-app/task-loading.js +1 -1
  43. package/lib/create-app/task-running.js +1 -1
  44. package/lib/create-app/task-time.js +1 -1
  45. package/lib/create-app/use-copy-project-template.js +1 -1
  46. package/lib/create-app/use-format-code.js +1 -1
  47. package/lib/create-app/use-install-dependencies.js +1 -1
  48. package/lib/help.js +1 -1
  49. package/lib/init/main.js +1 -1
  50. package/lib/mcp/cursor.js +1 -1
  51. package/lib/mcp/main.js +1 -1
  52. package/lib/utils/check-sdk-version.js +1 -1
  53. package/lib/utils/config.js +1 -1
  54. package/lib/utils/copy-directory.js +1 -1
  55. package/lib/utils/http-client.js +1 -1
  56. package/lib/utils/logger.js +1 -1
  57. package/lib/utils/router-updater.js +1 -1
  58. package/lib/utils/sleep.js +1 -1
  59. package/lib/utils/template-replacer.js +1 -1
  60. package/package.json +3 -3
  61. package/templates/projects/sub-app-react-demo/package.json +2 -2
  62. package/templates/projects/sub-app-react-demo/src/api/api.ts +42 -25
  63. package/templates/projects/sub-app-react-demo/src/api/client.ts +11 -10
  64. package/templates/projects/sub-app-react-demo/src/pages/sdk-demo/index.tsx +72 -19
  65. package/templates/projects/sub-app-react-demo/package-lock.json +0 -4062
package/lib/cmd/logs.js CHANGED
@@ -1 +1 @@
1
- (function(_0x104120,_0x3f7120){const _0x21adf6=a32_0x5193,_0x30ce6b=_0x104120();while(!![]){try{const _0x82dbe=parseInt(_0x21adf6(0x176))/0x1*(parseInt(_0x21adf6(0x172))/0x2)+parseInt(_0x21adf6(0x167))/0x3+-parseInt(_0x21adf6(0x165))/0x4+parseInt(_0x21adf6(0x17b))/0x5*(parseInt(_0x21adf6(0x17e))/0x6)+parseInt(_0x21adf6(0x17f))/0x7+parseInt(_0x21adf6(0x174))/0x8*(-parseInt(_0x21adf6(0x17c))/0x9)+-parseInt(_0x21adf6(0x16b))/0xa;if(_0x82dbe===_0x3f7120)break;else _0x30ce6b['push'](_0x30ce6b['shift']());}catch(_0x52bb6e){_0x30ce6b['push'](_0x30ce6b['shift']());}}}(a32_0x2866,0x537ff));import{logger}from'../utils/logger.js';export function showLogs(){const _0x39432=a32_0x5193;logger[_0x39432(0x169)](process[_0x39432(0x173)]());const _0x435eb0=logger[_0x39432(0x164)]();if(_0x435eb0[_0x39432(0x17a)]===0x0){console['log']('*\x20暂无日志记录');return;}console[_0x39432(0x168)](_0x39432(0x171)),_0x435eb0[_0x39432(0x16e)]((_0x41aa32,_0x14064e)=>{const _0x17d3bb=_0x39432,_0x27adbb=new Date(_0x41aa32['timestamp'])['toLocaleString'](_0x17d3bb(0x16d)),_0x163e69=_0x41aa32[_0x17d3bb(0x179)]===_0x17d3bb(0x178)?'√':_0x41aa32['level']==='error'?'×':_0x41aa32[_0x17d3bb(0x179)]===_0x17d3bb(0x166)?'!':'i';console['log'](_0x14064e+0x1+'.\x20'+_0x163e69+'\x20['+_0x41aa32['command']+']\x20'+_0x41aa32[_0x17d3bb(0x16a)]),console[_0x17d3bb(0x168)]('\x20\x20\x20时间:\x20'+_0x27adbb),_0x41aa32[_0x17d3bb(0x16f)]&&console[_0x17d3bb(0x168)]('\x20\x20\x20耗时:\x20'+_0x41aa32['duration']+'ms'),_0x41aa32[_0x17d3bb(0x175)]&&Object['keys'](_0x41aa32[_0x17d3bb(0x175)])[_0x17d3bb(0x17a)]>0x0&&console['log'](_0x17d3bb(0x177)+JSON[_0x17d3bb(0x16c)](_0x41aa32[_0x17d3bb(0x175)],null,0x2)),console[_0x17d3bb(0x168)]('');});}export function clearLogs(){const _0x440758=a32_0x5193;logger[_0x440758(0x169)](process[_0x440758(0x173)]()),logger[_0x440758(0x17d)](),console['log'](_0x440758(0x170));}function a32_0x5193(_0x4d6f37,_0xd5ae69){_0x4d6f37=_0x4d6f37-0x164;const _0x28663f=a32_0x2866();let _0x51935e=_0x28663f[_0x4d6f37];return _0x51935e;}function a32_0x2866(){const _0x5c5e3d=['706zcnrwv','\x20\x20\x20详情:\x20','success','level','length','55LgHRkp','9pawbRf','clearLogs','92622BStqSs','3514707brtzFM','readLogs','821336MqCUtB','warn','1778247TRcMYE','log','setLogPath','message','8247950YxPIro','stringify','zh-CN','forEach','duration','*\x20日志已清空','*\x20Lovrabet\x20CLI\x20日志记录:\x0a','1306RZbozs','cwd','2828248hHqTMa','details'];a32_0x2866=function(){return _0x5c5e3d;};return a32_0x2866();}
1
+ function a32_0x5a1e(){const _0x4e5dcb=['\x20\x20\x20时间:\x20','2168684TefiGe','zh-CN','setLogPath','25HxaqFP','clearLogs','duration','187689YEWRRf','*\x20日志已清空','1129530ecretp','*\x20Lovrabet\x20CLI\x20日志记录:\x0a','2111010ecszjf','error','12430864MBXVNj','timestamp','\x20\x20\x20详情:\x20','warn','\x20\x20\x20耗时:\x20','level','35694648WCgntJ','log','320157AxhrtU','length','forEach','cwd','message','36ytrksb'];a32_0x5a1e=function(){return _0x4e5dcb;};return a32_0x5a1e();}(function(_0x4d91d5,_0x14d8d2){const _0x3a7141=a32_0x10b6,_0x4f9009=_0x4d91d5();while(!![]){try{const _0x17c62c=parseInt(_0x3a7141(0x158))/0x1+parseInt(_0x3a7141(0x169))/0x2+parseInt(_0x3a7141(0x165))/0x3*(parseInt(_0x3a7141(0x15d))/0x4)+parseInt(_0x3a7141(0x162))/0x5*(parseInt(_0x3a7141(0x167))/0x6)+parseInt(_0x3a7141(0x15f))/0x7+parseInt(_0x3a7141(0x150))/0x8+-parseInt(_0x3a7141(0x156))/0x9;if(_0x17c62c===_0x14d8d2)break;else _0x4f9009['push'](_0x4f9009['shift']());}catch(_0xe7aa65){_0x4f9009['push'](_0x4f9009['shift']());}}}(a32_0x5a1e,0xbdd82));import{logger}from'../utils/logger.js';function a32_0x10b6(_0x135cef,_0x199082){_0x135cef=_0x135cef-0x150;const _0x5a1e09=a32_0x5a1e();let _0x10b62b=_0x5a1e09[_0x135cef];return _0x10b62b;}export function showLogs(){const _0xeb9f9b=a32_0x10b6;logger['setLogPath'](process[_0xeb9f9b(0x15b)]());const _0x4fd25d=logger['readLogs']();if(_0x4fd25d[_0xeb9f9b(0x159)]===0x0){console[_0xeb9f9b(0x157)]('*\x20暂无日志记录');return;}console[_0xeb9f9b(0x157)](_0xeb9f9b(0x168)),_0x4fd25d[_0xeb9f9b(0x15a)]((_0x3376de,_0x35ff69)=>{const _0x1e481c=_0xeb9f9b,_0x202538=new Date(_0x3376de[_0x1e481c(0x151)])['toLocaleString'](_0x1e481c(0x160)),_0x2049eb=_0x3376de[_0x1e481c(0x155)]==='success'?'√':_0x3376de['level']===_0x1e481c(0x16a)?'×':_0x3376de[_0x1e481c(0x155)]===_0x1e481c(0x153)?'!':'i';console[_0x1e481c(0x157)](_0x35ff69+0x1+'.\x20'+_0x2049eb+'\x20['+_0x3376de['command']+']\x20'+_0x3376de[_0x1e481c(0x15c)]),console[_0x1e481c(0x157)](_0x1e481c(0x15e)+_0x202538),_0x3376de[_0x1e481c(0x164)]&&console['log'](_0x1e481c(0x154)+_0x3376de[_0x1e481c(0x164)]+'ms'),_0x3376de['details']&&Object['keys'](_0x3376de['details'])[_0x1e481c(0x159)]>0x0&&console[_0x1e481c(0x157)](_0x1e481c(0x152)+JSON['stringify'](_0x3376de['details'],null,0x2)),console[_0x1e481c(0x157)]('');});}export function clearLogs(){const _0x155e82=a32_0x10b6;logger[_0x155e82(0x161)](process[_0x155e82(0x15b)]()),logger[_0x155e82(0x163)](),console[_0x155e82(0x157)](_0x155e82(0x166));}
@@ -1 +1 @@
1
- (function(_0x4f3b3a,_0x33c8e4){const _0x4aa2f2=a33_0x1467,_0x5c9e7d=_0x4f3b3a();while(!![]){try{const _0x570eaa=parseInt(_0x4aa2f2(0xc6))/0x1+parseInt(_0x4aa2f2(0xbe))/0x2+parseInt(_0x4aa2f2(0xbc))/0x3+-parseInt(_0x4aa2f2(0xba))/0x4+-parseInt(_0x4aa2f2(0xb0))/0x5+parseInt(_0x4aa2f2(0xc7))/0x6+-parseInt(_0x4aa2f2(0xc2))/0x7;if(_0x570eaa===_0x33c8e4)break;else _0x5c9e7d['push'](_0x5c9e7d['shift']());}catch(_0x299b96){_0x5c9e7d['push'](_0x5c9e7d['shift']());}}}(a33_0x127a,0xa287f));import{delimiter,join}from'node:path';function a33_0x1467(_0x2b12b0,_0x429341){_0x2b12b0=_0x2b12b0-0xb0;const _0x127a51=a33_0x127a();let _0x146763=_0x127a51[_0x2b12b0];return _0x146763;}import{spawn}from'node:child_process';import{logger}from'../utils/logger.js';export function runPreview(){return new Promise((_0x6202a4,_0x4d4948)=>{const _0x1c2261=a33_0x1467,_0x461eda=Date['now']();logger[_0x1c2261(0xc1)]('preview',_0x1c2261(0xb8),{'command':_0x1c2261(0xb5)});let _0x47a128='';const _0x225bfb=spawn('vite',[_0x1c2261(0xb3)],{'stdio':[_0x1c2261(0xb6),_0x1c2261(0xb6),_0x1c2261(0xb1)],'shell':!![],'env':{...process[_0x1c2261(0xbf)],'PATH':''+join(process[_0x1c2261(0xc8)](),_0x1c2261(0xc4),_0x1c2261(0xca))+delimiter+process[_0x1c2261(0xbf)][_0x1c2261(0xb2)]}});_0x225bfb[_0x1c2261(0xbb)]?.['on'](_0x1c2261(0xbd),_0x17c3bc=>{const _0xe32880=_0x1c2261;_0x47a128+=_0x17c3bc[_0xe32880(0xb4)]();}),_0x225bfb['on']('close',_0x293eac=>{const _0x1b2d6a=_0x1c2261,_0x9e9aa4=Date[_0x1b2d6a(0xc9)]()-_0x461eda;if(_0x293eac===0x0||_0x293eac===null)logger['success'](_0x1b2d6a(0xb3),'预览服务器启动成功',_0x9e9aa4),_0x6202a4();else{const _0x560df8={'exitCode':_0x293eac,'duration':_0x9e9aa4,'command':_0x1b2d6a(0xb5),'cwd':process[_0x1b2d6a(0xc8)]()};_0x47a128['trim']()&&(_0x560df8[_0x1b2d6a(0xbb)]=_0x47a128[_0x1b2d6a(0xb9)]()),logger[_0x1b2d6a(0xc5)](_0x1b2d6a(0xb3),'预览服务器启动失败',_0x560df8),_0x4d4948(new Error(_0x1b2d6a(0xc3)+_0x293eac));}}),_0x225bfb['on']('error',_0x13da69=>{const _0x14c31b=_0x1c2261,_0x5d8bbe=Date[_0x14c31b(0xc9)]()-_0x461eda;logger[_0x14c31b(0xc5)](_0x14c31b(0xb3),_0x14c31b(0xb7),{'error':_0x13da69[_0x14c31b(0xc0)],'duration':_0x5d8bbe,'stderr':_0x47a128['trim']()||undefined}),_0x4d4948(_0x13da69);});});}function a33_0x127a(){const _0x239ac5=['3936065eMwrnc','pipe','PATH','preview','toString','vite\x20preview','inherit','预览服务器启动出错','启动预览服务器','trim','3050592pbPMic','stderr','1764960kFBKTM','data','1017100DnXJSP','env','message','info','8514758PNNqEc','vite\x20preview\x20exited\x20with\x20code\x20','node_modules','error','1317976CSgWFJ','6102816jJljBs','cwd','now','.bin'];a33_0x127a=function(){return _0x239ac5;};return a33_0x127a();}
1
+ (function(_0x2a1a0f,_0x1f25c9){const _0x40b2a4=a33_0x4774,_0x1792d7=_0x2a1a0f();while(!![]){try{const _0x37c29b=parseInt(_0x40b2a4(0xb7))/0x1*(parseInt(_0x40b2a4(0xb5))/0x2)+-parseInt(_0x40b2a4(0xae))/0x3+parseInt(_0x40b2a4(0xb9))/0x4+parseInt(_0x40b2a4(0xbb))/0x5+-parseInt(_0x40b2a4(0xb6))/0x6*(parseInt(_0x40b2a4(0xb0))/0x7)+parseInt(_0x40b2a4(0xc0))/0x8+parseInt(_0x40b2a4(0xb3))/0x9;if(_0x37c29b===_0x1f25c9)break;else _0x1792d7['push'](_0x1792d7['shift']());}catch(_0x3676db){_0x1792d7['push'](_0x1792d7['shift']());}}}(a33_0x1d20,0x56120));import{delimiter,join}from'node:path';import{spawn}from'node:child_process';function a33_0x4774(_0x58bac6,_0x4ea04a){_0x58bac6=_0x58bac6-0xa3;const _0x1d2010=a33_0x1d20();let _0x477499=_0x1d2010[_0x58bac6];return _0x477499;}function a33_0x1d20(){const _0x1dbe04=['data','1704055XWIvZv','trim','.bin','info','cwd','610432iPMgOM','preview','inherit','stderr','预览服务器启动失败','node_modules','启动预览服务器','预览服务器启动出错','now','close','pipe','vite\x20preview','2072055KSrDOx','toString','3504361aGPGip','env','vite','8868699YSgAso','success','62024goPSjk','6ddcpPA','3QMqffy','message','193160UBiZTV'];a33_0x1d20=function(){return _0x1dbe04;};return a33_0x1d20();}import{logger}from'../utils/logger.js';export function runPreview(){return new Promise((_0x5ae9ad,_0x3d1874)=>{const _0x204d5e=a33_0x4774,_0xd1d61=Date[_0x204d5e(0xaa)]();logger[_0x204d5e(0xbe)]('preview',_0x204d5e(0xa8),{'command':_0x204d5e(0xad)});let _0x49baa3='';const _0x4b82d5=spawn(_0x204d5e(0xb2),[_0x204d5e(0xa3)],{'stdio':[_0x204d5e(0xa4),_0x204d5e(0xa4),_0x204d5e(0xac)],'shell':!![],'env':{...process[_0x204d5e(0xb1)],'PATH':''+join(process[_0x204d5e(0xbf)](),_0x204d5e(0xa7),_0x204d5e(0xbd))+delimiter+process[_0x204d5e(0xb1)]['PATH']}});_0x4b82d5[_0x204d5e(0xa5)]?.['on'](_0x204d5e(0xba),_0x40f17a=>{const _0x5050af=_0x204d5e;_0x49baa3+=_0x40f17a[_0x5050af(0xaf)]();}),_0x4b82d5['on'](_0x204d5e(0xab),_0x154d1a=>{const _0x1d091c=_0x204d5e,_0x1f9bba=Date[_0x1d091c(0xaa)]()-_0xd1d61;if(_0x154d1a===0x0||_0x154d1a===null)logger[_0x1d091c(0xb4)](_0x1d091c(0xa3),'预览服务器启动成功',_0x1f9bba),_0x5ae9ad();else{const _0x5df6a9={'exitCode':_0x154d1a,'duration':_0x1f9bba,'command':_0x1d091c(0xad),'cwd':process[_0x1d091c(0xbf)]()};_0x49baa3[_0x1d091c(0xbc)]()&&(_0x5df6a9[_0x1d091c(0xa5)]=_0x49baa3[_0x1d091c(0xbc)]()),logger['error']('preview',_0x1d091c(0xa6),_0x5df6a9),_0x3d1874(new Error('vite\x20preview\x20exited\x20with\x20code\x20'+_0x154d1a));}}),_0x4b82d5['on']('error',_0x23bd51=>{const _0x2ffdde=_0x204d5e,_0x1801d6=Date[_0x2ffdde(0xaa)]()-_0xd1d61;logger['error']('preview',_0x2ffdde(0xa9),{'error':_0x23bd51[_0x2ffdde(0xb8)],'duration':_0x1801d6,'stderr':_0x49baa3[_0x2ffdde(0xbc)]()||undefined}),_0x3d1874(_0x23bd51);});});}
package/lib/cmd/start.js CHANGED
@@ -1 +1 @@
1
- (function(_0x5a0ae8,_0x1a2231){const _0x3edd7a=a34_0x2a8f,_0x4d568c=_0x5a0ae8();while(!![]){try{const _0x12a848=parseInt(_0x3edd7a(0x1d9))/0x1*(-parseInt(_0x3edd7a(0x1c5))/0x2)+parseInt(_0x3edd7a(0x1d1))/0x3*(parseInt(_0x3edd7a(0x1cf))/0x4)+-parseInt(_0x3edd7a(0x1d2))/0x5*(-parseInt(_0x3edd7a(0x1da))/0x6)+parseInt(_0x3edd7a(0x1c8))/0x7+parseInt(_0x3edd7a(0x1dc))/0x8*(parseInt(_0x3edd7a(0x1dd))/0x9)+parseInt(_0x3edd7a(0x1be))/0xa+parseInt(_0x3edd7a(0x1d5))/0xb*(-parseInt(_0x3edd7a(0x1df))/0xc);if(_0x12a848===_0x1a2231)break;else _0x4d568c['push'](_0x4d568c['shift']());}catch(_0x548345){_0x4d568c['push'](_0x4d568c['shift']());}}}(a34_0x1bee,0x1b7d0));function a34_0x2a8f(_0x490e6c,_0x55e9ed){_0x490e6c=_0x490e6c-0x1be;const _0x1bee79=a34_0x1bee();let _0x2a8fa7=_0x1bee79[_0x490e6c];return _0x2a8fa7;}import{delimiter,join}from'node:path';import{spawn}from'node:child_process';function a34_0x1bee(){const _0x584115=['write','11sXOcxQ','info','PATH','SDK\x20版本低于推荐版本','681LKCtTa','6NlBuRb','pipe','616qmnWdX','9729xAAqQl','toString','3988920qIDxYs','vite\x20exited\x20with\x20code\x20','cwd','429140OpMASE','start','error','warn','needsUpgrade','.bin','env','604CvBXJs','vite','开发服务器启动成功','864661yhgrhn','success','message','version','trim','now','stderr','4cqOnks','启动开发服务器','547143Khywym','1093045lCJNce','inherit'];a34_0x1bee=function(){return _0x584115;};return a34_0x1bee();}import{logger}from'../utils/logger.js';import{checkSdkVersion,printSdkUpgradeWarning}from'../utils/check-sdk-version.js';export function runStart(_0x3a476e){return new Promise((_0x128d1c,_0x670e60)=>{const _0x3149c2=a34_0x2a8f,_0x146143=Date[_0x3149c2(0x1cd)](),_0x189fe9=_0x3a476e||process[_0x3149c2(0x1e1)](),_0x1a61a2=checkSdkVersion(_0x189fe9);_0x1a61a2[_0x3149c2(0x1c2)]&&(printSdkUpgradeWarning(_0x1a61a2),logger[_0x3149c2(0x1c1)](_0x3149c2(0x1bf),_0x3149c2(0x1d8),{'currentVersion':_0x1a61a2[_0x3149c2(0x1cb)],'minVersion':_0x1a61a2['minVersion']}));logger[_0x3149c2(0x1d6)](_0x3149c2(0x1bf),_0x3149c2(0x1d0),{'command':_0x3149c2(0x1c6),'cwd':_0x189fe9});let _0xe5b4c8='';const _0x254ebc=spawn(_0x3149c2(0x1c6),{'stdio':['inherit',_0x3149c2(0x1d3),_0x3149c2(0x1db)],'shell':!![],'cwd':_0x189fe9,'env':{...process[_0x3149c2(0x1c4)],'PATH':''+join(_0x189fe9,'node_modules',_0x3149c2(0x1c3))+delimiter+process[_0x3149c2(0x1c4)][_0x3149c2(0x1d7)]}});_0x254ebc[_0x3149c2(0x1ce)]?.['on']('data',_0x488e8b=>{const _0x58097f=_0x3149c2,_0x1b1aa2=_0x488e8b[_0x58097f(0x1de)]();_0xe5b4c8+=_0x1b1aa2,process['stderr'][_0x58097f(0x1d4)](_0x1b1aa2);}),_0x254ebc['on']('close',_0x5477c1=>{const _0x4687a5=_0x3149c2,_0x525eeb=Date[_0x4687a5(0x1cd)]()-_0x146143;if(_0x5477c1===0x0||_0x5477c1===null)logger[_0x4687a5(0x1c9)](_0x4687a5(0x1bf),_0x4687a5(0x1c7),_0x525eeb),_0x128d1c();else{const _0x7d320e={'exitCode':_0x5477c1,'duration':_0x525eeb,'command':_0x4687a5(0x1c6),'cwd':_0x189fe9};_0xe5b4c8[_0x4687a5(0x1cc)]()&&(_0x7d320e[_0x4687a5(0x1ce)]=_0xe5b4c8[_0x4687a5(0x1cc)]()),logger[_0x4687a5(0x1c0)](_0x4687a5(0x1bf),'开发服务器启动失败',_0x7d320e),_0x670e60(new Error(_0x4687a5(0x1e0)+_0x5477c1));}}),_0x254ebc['on'](_0x3149c2(0x1c0),_0x4f77b2=>{const _0x43af9a=_0x3149c2,_0x16c085=Date['now']()-_0x146143,_0x1b890b={'error':_0x4f77b2[_0x43af9a(0x1ca)],'duration':_0x16c085,'command':'vite','cwd':_0x189fe9};_0xe5b4c8[_0x43af9a(0x1cc)]()&&(_0x1b890b[_0x43af9a(0x1ce)]=_0xe5b4c8[_0x43af9a(0x1cc)]()),logger[_0x43af9a(0x1c0)]('start','开发服务器启动出错',_0x1b890b),_0x670e60(_0x4f77b2);});});}
1
+ (function(_0x8f4bb,_0x469af8){const _0x5aba15=a34_0x25f6,_0x51dd50=_0x8f4bb();while(!![]){try{const _0x356f28=parseInt(_0x5aba15(0x125))/0x1*(parseInt(_0x5aba15(0x11e))/0x2)+-parseInt(_0x5aba15(0x10e))/0x3+parseInt(_0x5aba15(0x124))/0x4+-parseInt(_0x5aba15(0x127))/0x5*(parseInt(_0x5aba15(0x118))/0x6)+parseInt(_0x5aba15(0x10b))/0x7+parseInt(_0x5aba15(0x11f))/0x8+parseInt(_0x5aba15(0x11c))/0x9;if(_0x356f28===_0x469af8)break;else _0x51dd50['push'](_0x51dd50['shift']());}catch(_0x3c3074){_0x51dd50['push'](_0x51dd50['shift']());}}}(a34_0x1516,0x2c6c0));function a34_0x25f6(_0x24cc47,_0x417813){_0x24cc47=_0x24cc47-0x104;const _0x151627=a34_0x1516();let _0x25f6f8=_0x151627[_0x24cc47];return _0x25f6f8;}function a34_0x1516(){const _0x29127f=['1031925tKkEVS','开发服务器启动出错','vite','node_modules','inherit','stderr','success','close','start','1074164leojGP','cwd','version','429273xaayKM','minVersion','error','SDK\x20版本低于推荐版本','data','.bin','env','trim','warn','vite\x20exited\x20with\x20code\x20','6dvoGwf','PATH','开发服务器启动成功','开发服务器启动失败','548811IWEuep','toString','51026EmfYuz','12448dmGZIx','now','message','pipe','write','853556RocQlo','4gqxkxv','启动开发服务器'];a34_0x1516=function(){return _0x29127f;};return a34_0x1516();}import{delimiter,join}from'node:path';import{spawn}from'node:child_process';import{logger}from'../utils/logger.js';import{checkSdkVersion,printSdkUpgradeWarning}from'../utils/check-sdk-version.js';export function runStart(_0x5d921a){return new Promise((_0x11c930,_0x59822a)=>{const _0x146af9=a34_0x25f6,_0x4f12e7=Date[_0x146af9(0x120)](),_0xf14073=_0x5d921a||process[_0x146af9(0x10c)](),_0x2ff68d=checkSdkVersion(_0xf14073);_0x2ff68d['needsUpgrade']&&(printSdkUpgradeWarning(_0x2ff68d),logger[_0x146af9(0x116)](_0x146af9(0x10a),_0x146af9(0x111),{'currentVersion':_0x2ff68d[_0x146af9(0x10d)],'minVersion':_0x2ff68d[_0x146af9(0x10f)]}));logger['info'](_0x146af9(0x10a),_0x146af9(0x126),{'command':_0x146af9(0x104),'cwd':_0xf14073});let _0x865e28='';const _0x3b43ba=spawn(_0x146af9(0x104),{'stdio':[_0x146af9(0x106),'inherit',_0x146af9(0x122)],'shell':!![],'cwd':_0xf14073,'env':{...process['env'],'PATH':''+join(_0xf14073,_0x146af9(0x105),_0x146af9(0x113))+delimiter+process[_0x146af9(0x114)][_0x146af9(0x119)]}});_0x3b43ba[_0x146af9(0x107)]?.['on'](_0x146af9(0x112),_0x23288d=>{const _0x304730=_0x146af9,_0x2a4949=_0x23288d[_0x304730(0x11d)]();_0x865e28+=_0x2a4949,process[_0x304730(0x107)][_0x304730(0x123)](_0x2a4949);}),_0x3b43ba['on'](_0x146af9(0x109),_0x17967a=>{const _0x2d730b=_0x146af9,_0x24faa9=Date[_0x2d730b(0x120)]()-_0x4f12e7;if(_0x17967a===0x0||_0x17967a===null)logger[_0x2d730b(0x108)]('start',_0x2d730b(0x11a),_0x24faa9),_0x11c930();else{const _0x245d90={'exitCode':_0x17967a,'duration':_0x24faa9,'command':'vite','cwd':_0xf14073};_0x865e28['trim']()&&(_0x245d90[_0x2d730b(0x107)]=_0x865e28['trim']()),logger['error'](_0x2d730b(0x10a),_0x2d730b(0x11b),_0x245d90),_0x59822a(new Error(_0x2d730b(0x117)+_0x17967a));}}),_0x3b43ba['on'](_0x146af9(0x110),_0x405280=>{const _0x145da1=_0x146af9,_0x5cbb0c=Date[_0x145da1(0x120)]()-_0x4f12e7,_0x421104={'error':_0x405280[_0x145da1(0x121)],'duration':_0x5cbb0c,'command':_0x145da1(0x104),'cwd':_0xf14073};_0x865e28[_0x145da1(0x115)]()&&(_0x421104[_0x145da1(0x107)]=_0x865e28[_0x145da1(0x115)]()),logger[_0x145da1(0x110)](_0x145da1(0x10a),_0x145da1(0x128),_0x421104),_0x59822a(_0x405280);});});}
@@ -1 +1 @@
1
- (function(_0x517b1b,_0x12c2f9){const _0x5e43dd=a35_0x49b4,_0x530aed=_0x517b1b();while(!![]){try{const _0x7185=parseInt(_0x5e43dd(0x12c))/0x1*(-parseInt(_0x5e43dd(0x12a))/0x2)+-parseInt(_0x5e43dd(0x11a))/0x3+-parseInt(_0x5e43dd(0x11e))/0x4*(parseInt(_0x5e43dd(0x121))/0x5)+-parseInt(_0x5e43dd(0x131))/0x6+parseInt(_0x5e43dd(0x127))/0x7+parseInt(_0x5e43dd(0x12e))/0x8+parseInt(_0x5e43dd(0x12d))/0x9;if(_0x7185===_0x12c2f9)break;else _0x530aed['push'](_0x530aed['shift']());}catch(_0x4124cf){_0x530aed['push'](_0x530aed['shift']());}}}(a35_0x3fe4,0x9f005));import{jsxs as a35_0xbbdb2,jsx as a35_0x59eb31}from'react/jsx-runtime';import{Box,Text}from'ink';function a35_0x49b4(_0x93bd14,_0xe8eddd){_0x93bd14=_0x93bd14-0x11a;const _0x3fe45a=a35_0x3fe4();let _0x49b434=_0x3fe45a[_0x93bd14];return _0x49b434;}function a35_0x3fe4(){const _0x360992=['lovrabet\x20config\x20set\x20<key>\x20<value>\x20\x20\x20','2598565hMKTgi','command','map','设置环境\x20(online/daily)','设置配置项','无效的命令,可用命令如下:','3862740HkZjuQ','获取配置项','column','16hLmBzQ','lovrabet\x20config\x20set\x20app\x20app-xxxxx\x20\x20\x20','115777dfaLnl','16287552mFBzpt','7353752vMlthf','\x20\x20\x20\x20','\x20*\x20配置示例:','1381152SbUSAH','2860131umfFbt','lovrabet\x20config\x20get\x20<key>\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','lovrabet\x20config\x20list\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','description','4cAzKVG','gray'];a35_0x3fe4=function(){return _0x360992;};return a35_0x3fe4();}export function ConfigHelp(){const _0x31e013=a35_0x49b4,_0x527f7e=[{'command':_0x31e013(0x120),'description':_0x31e013(0x125)},{'command':_0x31e013(0x11b),'description':_0x31e013(0x128)},{'command':_0x31e013(0x11c),'description':'列出所有配置项'}],_0x2626cb=[{'command':_0x31e013(0x12b),'description':'配置当前项目的\x20App\x20Code'},{'command':'lovrabet\x20config\x20set\x20env\x20daily\x20\x20\x20\x20\x20\x20\x20','description':_0x31e013(0x124)}];return a35_0xbbdb2(Box,{'flexDirection':_0x31e013(0x129),'marginTop':0x1,'marginBottom':0x1,'children':[a35_0x59eb31(Box,{'marginBottom':0x1,'children':a35_0xbbdb2(Text,{'color':_0x31e013(0x11f),'children':['\x20!','\x20\x20',_0x31e013(0x126)]})}),_0x527f7e[_0x31e013(0x123)](_0x313dd8=>a35_0xbbdb2(Box,{'children':[a35_0xbbdb2(Text,{'children':['\x20\x20\x20\x20',_0x313dd8[_0x31e013(0x122)]]}),a35_0x59eb31(Text,{'color':_0x31e013(0x11f),'children':_0x313dd8[_0x31e013(0x11d)]})]},_0x313dd8[_0x31e013(0x122)])),a35_0x59eb31(Box,{'marginTop':0x1,'marginBottom':0x1,'children':a35_0x59eb31(Text,{'color':_0x31e013(0x11f),'children':_0x31e013(0x130)})}),_0x2626cb['map'](_0x802e70=>a35_0xbbdb2(Box,{'children':[a35_0xbbdb2(Text,{'children':[_0x31e013(0x12f),_0x802e70['command']]}),a35_0x59eb31(Text,{'color':'gray','children':_0x802e70[_0x31e013(0x11d)]})]},_0x802e70[_0x31e013(0x122)]))]});}
1
+ function a35_0x2bdb(_0x2b997b,_0x3b35eb){_0x2b997b=_0x2b997b-0xb8;const _0x1c47ce=a35_0x1c47();let _0x2bdb54=_0x1c47ce[_0x2b997b];return _0x2bdb54;}(function(_0x4176f9,_0x259eb3){const _0x3b0979=a35_0x2bdb,_0x2900ec=_0x4176f9();while(!![]){try{const _0x4a9c5d=parseInt(_0x3b0979(0xcc))/0x1*(-parseInt(_0x3b0979(0xbf))/0x2)+parseInt(_0x3b0979(0xd0))/0x3*(parseInt(_0x3b0979(0xc1))/0x4)+-parseInt(_0x3b0979(0xcd))/0x5+-parseInt(_0x3b0979(0xc4))/0x6*(-parseInt(_0x3b0979(0xc6))/0x7)+-parseInt(_0x3b0979(0xc3))/0x8+parseInt(_0x3b0979(0xba))/0x9*(parseInt(_0x3b0979(0xc0))/0xa)+parseInt(_0x3b0979(0xc9))/0xb*(parseInt(_0x3b0979(0xc2))/0xc);if(_0x4a9c5d===_0x259eb3)break;else _0x2900ec['push'](_0x2900ec['shift']());}catch(_0x5383b2){_0x2900ec['push'](_0x2900ec['shift']());}}}(a35_0x1c47,0x37586));import{jsxs as a35_0x56081a,jsx as a35_0x2a332c}from'react/jsx-runtime';import{Box,Text}from'ink';export function ConfigHelp(){const _0x2519fa=a35_0x2bdb,_0x3c7d0f=[{'command':_0x2519fa(0xb9),'description':'设置配置项'},{'command':_0x2519fa(0xd1),'description':_0x2519fa(0xc7)},{'command':_0x2519fa(0xd2),'description':_0x2519fa(0xbb)}],_0xe1402b=[{'command':_0x2519fa(0xca),'description':_0x2519fa(0xbc)},{'command':'lovrabet\x20config\x20set\x20env\x20daily\x20\x20\x20\x20\x20\x20\x20','description':_0x2519fa(0xbe)}];return a35_0x56081a(Box,{'flexDirection':_0x2519fa(0xbd),'marginTop':0x1,'marginBottom':0x1,'children':[a35_0x2a332c(Box,{'marginBottom':0x1,'children':a35_0x56081a(Text,{'color':_0x2519fa(0xcb),'children':['\x20!','\x20\x20',_0x2519fa(0xcf)]})}),_0x3c7d0f[_0x2519fa(0xc5)](_0x1398f7=>a35_0x56081a(Box,{'children':[a35_0x56081a(Text,{'children':[_0x2519fa(0xc8),_0x1398f7[_0x2519fa(0xd3)]]}),a35_0x2a332c(Text,{'color':_0x2519fa(0xcb),'children':_0x1398f7[_0x2519fa(0xce)]})]},_0x1398f7[_0x2519fa(0xd3)])),a35_0x2a332c(Box,{'marginTop':0x1,'marginBottom':0x1,'children':a35_0x2a332c(Text,{'color':_0x2519fa(0xcb),'children':_0x2519fa(0xb8)})}),_0xe1402b['map'](_0x4f49ce=>a35_0x56081a(Box,{'children':[a35_0x56081a(Text,{'children':[_0x2519fa(0xc8),_0x4f49ce[_0x2519fa(0xd3)]]}),a35_0x2a332c(Text,{'color':'gray','children':_0x4f49ce['description']})]},_0x4f49ce['command']))]});}function a35_0x1c47(){const _0x23f417=['99372FTKrLO','lovrabet\x20config\x20get\x20<key>\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','lovrabet\x20config\x20list\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','command','\x20*\x20配置示例:','lovrabet\x20config\x20set\x20<key>\x20<value>\x20\x20\x20','579825LZpiYO','列出所有配置项','配置当前项目的\x20App\x20Code','column','设置环境\x20(online/daily)','109070vPANKm','70DlmBSC','16yjdXHN','64068yEwTMW','2866344xVpKdy','1740qirexB','map','1085aKuFdj','获取配置项','\x20\x20\x20\x20','869FzNCEV','lovrabet\x20config\x20set\x20app\x20app-xxxxx\x20\x20\x20','gray','5tXuBpO','962700DezDwI','description','无效的命令,可用命令如下:'];a35_0x1c47=function(){return _0x23f417;};return a35_0x1c47();}
@@ -1 +1 @@
1
- (function(_0x2fc115,_0x44e594){const _0x5b6dc9=a36_0x2216,_0x566c76=_0x2fc115();while(!![]){try{const _0x2b9192=parseInt(_0x5b6dc9(0x1fb))/0x1+parseInt(_0x5b6dc9(0x1f4))/0x2*(parseInt(_0x5b6dc9(0x217))/0x3)+-parseInt(_0x5b6dc9(0x1f3))/0x4+parseInt(_0x5b6dc9(0x21c))/0x5*(-parseInt(_0x5b6dc9(0x219))/0x6)+parseInt(_0x5b6dc9(0x213))/0x7+parseInt(_0x5b6dc9(0x20f))/0x8*(-parseInt(_0x5b6dc9(0x212))/0x9)+-parseInt(_0x5b6dc9(0x208))/0xa*(-parseInt(_0x5b6dc9(0x21b))/0xb);if(_0x2b9192===_0x44e594)break;else _0x566c76['push'](_0x566c76['shift']());}catch(_0x333c95){_0x566c76['push'](_0x566c76['shift']());}}}(a36_0x5611,0x3124e));import{jsx as a36_0x8803d,jsxs as a36_0x314285}from'react/jsx-runtime';import{existsSync,readFileSync,writeFileSync}from'node:fs';import a36_0x2cdba6 from'node:fs';import a36_0x21cc94 from'node:path';import{ConfigHelp}from'./config-help.js';function a36_0x5611(){const _0x43aaed=['未提供配置值','10362slRceC','保存配置失败:\x20','11yntwpg','305pWCYLj','log','487460KWXUJH','2NVLwaL','input','includes','unlinkSync','length','string','保存配置失败','80934iPLJsE','.tmp','flags','环境配置值只能是\x20\x22online\x22\x20或\x20\x22daily\x22','red','config','help','utf8','undefined','配置值无效或过长','error','appcode','daily','5152180LMxVEu','online','app','message','set','get','--help','662344lYIfpi','dirname','环境配置已设置为:\x20','27weyZEc','343007YkyXKw','list','env','stringify','95196jwXhjG'];a36_0x5611=function(){return _0x43aaed;};return a36_0x5611();}import{Box,Text}from'ink';import{readConfig,isInProject,projectConfigPath,globalConfigPath}from'../utils/config.js';function a36_0x2216(_0x155810,_0x516f00){_0x155810=_0x155810-0x1f3;const _0x561147=a36_0x5611();let _0x2216da=_0x561147[_0x155810];return _0x2216da;}import{logger}from'../utils/logger.js';export function Config(_0x2d0ee1){const _0x52e693=a36_0x2216,{cli:_0x298a7c}=_0x2d0ee1,_0x2ce54d=_0x298a7c[_0x52e693(0x1f5)][0x1],_0x42f777=_0x298a7c[_0x52e693(0x1f5)][0x2],_0xf461f6=[_0x52e693(0x20c),_0x52e693(0x20d)][_0x52e693(0x1f6)](_0x2ce54d||''),_0x4ca83f=_0x298a7c['input'][_0x52e693(0x1f8)]>=0x3;if(_0x42f777===_0x52e693(0x20e)||_0x298a7c[_0x52e693(0x1fd)][_0x52e693(0x201)])return a36_0x8803d(ConfigHelp,{});const _0x5da26b=readConfig();if(_0x2ce54d==='set'){if(_0x42f777){const _0x20c34c=_0x298a7c[_0x52e693(0x1f5)][0x3];if(typeof _0x20c34c!==_0x52e693(0x203)){if(_0x42f777==='env'&&![_0x52e693(0x209),_0x52e693(0x207)][_0x52e693(0x1f6)](_0x20c34c))return a36_0x8803d(Box,{'children':a36_0x8803d(Text,{'color':'red','children':_0x52e693(0x1fe)})});const _0x3a13af=isInProject(),_0x6ef02f=_0x3a13af?projectConfigPath:globalConfigPath;let _0x18bd00={};try{if(existsSync(_0x6ef02f)){const _0x95b857=readFileSync(_0x6ef02f,{'encoding':_0x52e693(0x202)});_0x95b857&&(_0x18bd00=JSON['parse'](_0x95b857));}}catch(_0x29b5f9){}if(typeof _0x20c34c!==_0x52e693(0x1f9)||_0x20c34c['length']>0x1f4)return a36_0x8803d(Box,{'children':a36_0x8803d(Text,{'color':'red','children':_0x52e693(0x204)})});let _0x7e1290=_0x42f777;_0x42f777==='app'&&(_0x7e1290='appcode',delete _0x18bd00[_0x52e693(0x20a)]);_0x42f777===_0x52e693(0x206)&&delete _0x18bd00['app'];_0x18bd00[_0x7e1290]=_0x20c34c;try{const _0xadc86d=a36_0x21cc94[_0x52e693(0x210)](_0x6ef02f);!existsSync(_0xadc86d)&&a36_0x2cdba6['mkdirSync'](_0xadc86d,{'recursive':!![]});const _0x178359=_0x6ef02f+'.tmp';writeFileSync(_0x178359,JSON[_0x52e693(0x216)](_0x18bd00,null,0x2),{'encoding':_0x52e693(0x202),'mode':0x180}),a36_0x2cdba6['renameSync'](_0x178359,_0x6ef02f);if(_0x42f777===_0x52e693(0x215)){const _0xec15e3=_0x3a13af?'项目':'全局';console[_0x52e693(0x21d)]('✓\x20'+_0xec15e3+_0x52e693(0x211)+_0x20c34c);}}catch(_0xb89bfa){const _0x108766=_0x6ef02f+_0x52e693(0x1fc);try{existsSync(_0x108766)&&a36_0x2cdba6[_0x52e693(0x1f7)](_0x108766);}catch(_0x36bd28){}return logger[_0x52e693(0x205)](_0x52e693(0x200),_0x52e693(0x1fa),{'error':_0xb89bfa instanceof Error?_0xb89bfa['message']:String(_0xb89bfa),'configKey':_0x42f777,'configValue':_0x20c34c,'targetConfigPath':_0x6ef02f}),a36_0x8803d(Box,{'children':a36_0x314285(Text,{'color':_0x52e693(0x1ff),'children':[_0x52e693(0x21a),_0xb89bfa instanceof Error?_0xb89bfa[_0x52e693(0x20b)]:String(_0xb89bfa)]})});}return null;}return a36_0x8803d(Box,{'children':a36_0x8803d(Text,{'color':_0x52e693(0x1ff),'children':_0x52e693(0x218)})});}}if(_0x2ce54d==='get'){if(_0x42f777){let _0x52db76=_0x42f777;return _0x42f777===_0x52e693(0x20a)&&(_0x52db76=_0x52e693(0x206)),console[_0x52e693(0x21d)](_0x5da26b[_0x52db76]||'undefined'),null;}return null;}if(_0x2ce54d===_0x52e693(0x214))return console[_0x52e693(0x21d)](JSON['stringify'](_0x5da26b,null,0x2)),null;if(!_0xf461f6||!_0x4ca83f)return a36_0x8803d(ConfigHelp,{});return null;}
1
+ (function(_0x3ea12d,_0x20e735){const _0x4922a4=a36_0x26f8,_0x51c200=_0x3ea12d();while(!![]){try{const _0x2cf155=parseInt(_0x4922a4(0x197))/0x1*(parseInt(_0x4922a4(0x186))/0x2)+-parseInt(_0x4922a4(0x190))/0x3*(parseInt(_0x4922a4(0x18e))/0x4)+-parseInt(_0x4922a4(0x18f))/0x5+parseInt(_0x4922a4(0x188))/0x6*(parseInt(_0x4922a4(0x199))/0x7)+parseInt(_0x4922a4(0x17e))/0x8+parseInt(_0x4922a4(0x196))/0x9+-parseInt(_0x4922a4(0x17d))/0xa;if(_0x2cf155===_0x20e735)break;else _0x51c200['push'](_0x51c200['shift']());}catch(_0x439b3c){_0x51c200['push'](_0x51c200['shift']());}}}(a36_0x5f37,0x2f282));import{jsx as a36_0x1d942c,jsxs as a36_0x285424}from'react/jsx-runtime';import{existsSync,readFileSync,writeFileSync}from'node:fs';import a36_0x280ef1 from'node:fs';import a36_0x3a422f from'node:path';import{ConfigHelp}from'./config-help.js';import{Box,Text}from'ink';import{readConfig,isInProject,projectConfigPath,globalConfigPath}from'../utils/config.js';function a36_0x5f37(){const _0x4f3b37=['2089480CylGNe','flags','includes','.tmp','保存配置失败','daily','parse','配置值无效或过长','718598xciKKQ','undefined','138324vnIYPw','环境配置已设置为:\x20','length','message','log','string','168ogjxbJ','821515tZPmJF','405YpYUHf','red','保存配置失败:\x20','dirname','list','未提供配置值','2087775ZyIwlO','1KSWOSe','env','35GcTEqk','unlinkSync','input','set','utf8','appcode','get','online','stringify','--help','app','6046020UJcVyK'];a36_0x5f37=function(){return _0x4f3b37;};return a36_0x5f37();}import{logger}from'../utils/logger.js';function a36_0x26f8(_0x1a92fd,_0x3e7db9){_0x1a92fd=_0x1a92fd-0x175;const _0x5f37c6=a36_0x5f37();let _0x26f86e=_0x5f37c6[_0x1a92fd];return _0x26f86e;}export function Config(_0x28e92d){const _0x3a6427=a36_0x26f8,{cli:_0x573afb}=_0x28e92d,_0x41a5a7=_0x573afb['input'][0x1],_0x190496=_0x573afb[_0x3a6427(0x19b)][0x2],_0x1d824c=[_0x3a6427(0x175),_0x3a6427(0x178)][_0x3a6427(0x180)](_0x41a5a7||''),_0x4ab5fd=_0x573afb['input'][_0x3a6427(0x18a)]>=0x3;if(_0x190496===_0x3a6427(0x17b)||_0x573afb[_0x3a6427(0x17f)]['help'])return a36_0x1d942c(ConfigHelp,{});const _0x1693ba=readConfig();if(_0x41a5a7==='set'){if(_0x190496){const _0x67a80a=_0x573afb[_0x3a6427(0x19b)][0x3];if(typeof _0x67a80a!==_0x3a6427(0x187)){if(_0x190496===_0x3a6427(0x198)&&![_0x3a6427(0x179),_0x3a6427(0x183)]['includes'](_0x67a80a))return a36_0x1d942c(Box,{'children':a36_0x1d942c(Text,{'color':_0x3a6427(0x191),'children':'环境配置值只能是\x20\x22online\x22\x20或\x20\x22daily\x22'})});const _0x435096=isInProject(),_0x324ec0=_0x435096?projectConfigPath:globalConfigPath;let _0x8737b8={};try{if(existsSync(_0x324ec0)){const _0x502113=readFileSync(_0x324ec0,{'encoding':_0x3a6427(0x176)});_0x502113&&(_0x8737b8=JSON[_0x3a6427(0x184)](_0x502113));}}catch(_0x17e0f2){}if(typeof _0x67a80a!==_0x3a6427(0x18d)||_0x67a80a['length']>0x1f4)return a36_0x1d942c(Box,{'children':a36_0x1d942c(Text,{'color':'red','children':_0x3a6427(0x185)})});let _0x1319ee=_0x190496;_0x190496===_0x3a6427(0x17c)&&(_0x1319ee=_0x3a6427(0x177),delete _0x8737b8[_0x3a6427(0x17c)]);_0x190496===_0x3a6427(0x177)&&delete _0x8737b8[_0x3a6427(0x17c)];_0x8737b8[_0x1319ee]=_0x67a80a;try{const _0x1ba1db=a36_0x3a422f[_0x3a6427(0x193)](_0x324ec0);!existsSync(_0x1ba1db)&&a36_0x280ef1['mkdirSync'](_0x1ba1db,{'recursive':!![]});const _0x1b95c0=_0x324ec0+_0x3a6427(0x181);writeFileSync(_0x1b95c0,JSON[_0x3a6427(0x17a)](_0x8737b8,null,0x2),{'encoding':_0x3a6427(0x176),'mode':0x180}),a36_0x280ef1['renameSync'](_0x1b95c0,_0x324ec0);if(_0x190496===_0x3a6427(0x198)){const _0x49950c=_0x435096?'项目':'全局';console[_0x3a6427(0x18c)]('✓\x20'+_0x49950c+_0x3a6427(0x189)+_0x67a80a);}}catch(_0x3eadfe){const _0x3b49aa=_0x324ec0+'.tmp';try{existsSync(_0x3b49aa)&&a36_0x280ef1[_0x3a6427(0x19a)](_0x3b49aa);}catch(_0x3a748e){}return logger['error']('config',_0x3a6427(0x182),{'error':_0x3eadfe instanceof Error?_0x3eadfe[_0x3a6427(0x18b)]:String(_0x3eadfe),'configKey':_0x190496,'configValue':_0x67a80a,'targetConfigPath':_0x324ec0}),a36_0x1d942c(Box,{'children':a36_0x285424(Text,{'color':_0x3a6427(0x191),'children':[_0x3a6427(0x192),_0x3eadfe instanceof Error?_0x3eadfe['message']:String(_0x3eadfe)]})});}return null;}return a36_0x1d942c(Box,{'children':a36_0x1d942c(Text,{'color':'red','children':_0x3a6427(0x195)})});}}if(_0x41a5a7===_0x3a6427(0x178)){if(_0x190496){let _0x55bbbe=_0x190496;return _0x190496==='app'&&(_0x55bbbe='appcode'),console[_0x3a6427(0x18c)](_0x1693ba[_0x55bbbe]||'undefined'),null;}return null;}if(_0x41a5a7===_0x3a6427(0x194))return console[_0x3a6427(0x18c)](JSON[_0x3a6427(0x17a)](_0x1693ba,null,0x2)),null;if(!_0x1d824c||!_0x4ab5fd)return a36_0x1d942c(ConfigHelp,{});return null;}
@@ -1 +1 @@
1
- const a37_0x43e3d6=a37_0x4122;(function(_0x649bf4,_0x58e6bb){const _0x4866ac=a37_0x4122,_0x551cf1=_0x649bf4();while(!![]){try{const _0x272cbd=-parseInt(_0x4866ac(0x1af))/0x1*(parseInt(_0x4866ac(0x1b8))/0x2)+parseInt(_0x4866ac(0x1b7))/0x3*(-parseInt(_0x4866ac(0x1b3))/0x4)+parseInt(_0x4866ac(0x1b6))/0x5+-parseInt(_0x4866ac(0x1b9))/0x6*(-parseInt(_0x4866ac(0x1b0))/0x7)+parseInt(_0x4866ac(0x1b5))/0x8*(parseInt(_0x4866ac(0x1b1))/0x9)+-parseInt(_0x4866ac(0x1bb))/0xa+parseInt(_0x4866ac(0x1ba))/0xb;if(_0x272cbd===_0x58e6bb)break;else _0x551cf1['push'](_0x551cf1['shift']());}catch(_0x5cb65){_0x551cf1['push'](_0x551cf1['shift']());}}}(a37_0x1b5c,0xba71a));import{getEnv}from'./env.js';function a37_0x4122(_0x2501b8,_0x3692bf){_0x2501b8=_0x2501b8-0x1ad;const _0x1b5c9c=a37_0x1b5c();let _0x4122cb=_0x1b5c9c[_0x2501b8];return _0x4122cb;}export const getUserDomain=()=>getEnv()==='online'?a37_0x43e3d6(0x1b4):'https://user-daily.lovrabet.com';function a37_0x1b5c(){const _0x318b80=['130ZRNrjs','38796MVDOUR','4487538FychAJ','13213700OfGieX','https://daily-api.lovrabet.com','online','6512ipSAso','1561OBFEWM','13707kJgbgF','https://api.lovrabet.com','2346964BOyfuG','https://user.lovrabet.com','3096simJeH','3278940IUehSC','3CeHVWa'];a37_0x1b5c=function(){return _0x318b80;};return a37_0x1b5c();}export const getApiDomain=()=>getEnv()===a37_0x43e3d6(0x1ae)?a37_0x43e3d6(0x1b2):a37_0x43e3d6(0x1ad);
1
+ const a37_0x22d55e=a37_0x5370;function a37_0x5370(_0x63b38f,_0x105b5b){_0x63b38f=_0x63b38f-0x10c;const _0x37a211=a37_0x37a2();let _0x537095=_0x37a211[_0x63b38f];return _0x537095;}(function(_0x22c668,_0x451442){const _0x12cd48=a37_0x5370,_0x541e69=_0x22c668();while(!![]){try{const _0x269b08=-parseInt(_0x12cd48(0x118))/0x1*(-parseInt(_0x12cd48(0x10e))/0x2)+parseInt(_0x12cd48(0x10f))/0x3+-parseInt(_0x12cd48(0x119))/0x4+parseInt(_0x12cd48(0x11a))/0x5*(parseInt(_0x12cd48(0x11b))/0x6)+-parseInt(_0x12cd48(0x115))/0x7*(parseInt(_0x12cd48(0x113))/0x8)+-parseInt(_0x12cd48(0x11c))/0x9*(parseInt(_0x12cd48(0x117))/0xa)+parseInt(_0x12cd48(0x112))/0xb*(parseInt(_0x12cd48(0x111))/0xc);if(_0x269b08===_0x451442)break;else _0x541e69['push'](_0x541e69['shift']());}catch(_0x2a7b07){_0x541e69['push'](_0x541e69['shift']());}}}(a37_0x37a2,0x619c7));function a37_0x37a2(){const _0x465eb2=['2yReHig','1376877QztaSc','online','12348xzOgVx','8371QCfhni','8yKyqbv','https://api.lovrabet.com','1724023ONqhse','https://user.lovrabet.com','20nKfQZv','409074gOmvxA','1585592QwZMJj','30DRoxPz','50610OdRPxH','2966445qtLGny','https://daily-api.lovrabet.com','https://user-daily.lovrabet.com'];a37_0x37a2=function(){return _0x465eb2;};return a37_0x37a2();}import{getEnv}from'./env.js';export const getUserDomain=()=>getEnv()==='online'?a37_0x22d55e(0x116):a37_0x22d55e(0x10d);export const getApiDomain=()=>getEnv()===a37_0x22d55e(0x110)?a37_0x22d55e(0x114):a37_0x22d55e(0x10c);
@@ -1 +1 @@
1
- function a38_0x180d(){const _0x16eb88=['160833xizVSc','41230cHbOyF','314354SUtHzn','4104402SbSYmR','44TKTMYK','5CdJjLE','1297653IrgEKx','LOVRABET_ENV','4068075OxWvFz','2zHOHqK','386586jAIIIo','24GaZrfD'];a38_0x180d=function(){return _0x16eb88;};return a38_0x180d();}const a38_0x37a86f=a38_0x5c7c;(function(_0x989faa,_0xd7869e){const _0x482631=a38_0x5c7c,_0x472d8a=_0x989faa();while(!![]){try{const _0x38412e=parseInt(_0x482631(0x148))/0x1*(parseInt(_0x482631(0x141))/0x2)+parseInt(_0x482631(0x14b))/0x3*(-parseInt(_0x482631(0x143))/0x4)+parseInt(_0x482631(0x144))/0x5*(parseInt(_0x482631(0x142))/0x6)+-parseInt(_0x482631(0x145))/0x7+parseInt(_0x482631(0x14a))/0x8*(-parseInt(_0x482631(0x149))/0x9)+-parseInt(_0x482631(0x140))/0xa+parseInt(_0x482631(0x147))/0xb;if(_0x38412e===_0xd7869e)break;else _0x472d8a['push'](_0x472d8a['shift']());}catch(_0x6a8f7d){_0x472d8a['push'](_0x472d8a['shift']());}}}(a38_0x180d,0x70581));let env=process['env'][a38_0x37a86f(0x146)]||'online';export function getEnv(){return env;}function a38_0x5c7c(_0x2bc3f2,_0xe229ae){_0x2bc3f2=_0x2bc3f2-0x140;const _0x180d38=a38_0x180d();let _0x5c7c5a=_0x180d38[_0x2bc3f2];return _0x5c7c5a;}export function initEnv(_0x2e1cb7){env=_0x2e1cb7;}
1
+ const a38_0x24b6a5=a38_0xb1e2;(function(_0x4a92b8,_0x3f4f71){const _0x248429=a38_0xb1e2,_0x157d6c=_0x4a92b8();while(!![]){try{const _0x1f2b2c=-parseInt(_0x248429(0xf3))/0x1*(-parseInt(_0x248429(0xf0))/0x2)+parseInt(_0x248429(0xef))/0x3+-parseInt(_0x248429(0xf1))/0x4*(parseInt(_0x248429(0xed))/0x5)+-parseInt(_0x248429(0xeb))/0x6*(parseInt(_0x248429(0xec))/0x7)+parseInt(_0x248429(0xea))/0x8*(parseInt(_0x248429(0xe9))/0x9)+-parseInt(_0x248429(0xf2))/0xa*(-parseInt(_0x248429(0xf4))/0xb)+-parseInt(_0x248429(0xee))/0xc;if(_0x1f2b2c===_0x3f4f71)break;else _0x157d6c['push'](_0x157d6c['shift']());}catch(_0x47a3bd){_0x157d6c['push'](_0x157d6c['shift']());}}}(a38_0x340d,0xcf365));let env=process[a38_0x24b6a5(0xe8)][a38_0x24b6a5(0xe7)]||'online';export function getEnv(){return env;}function a38_0xb1e2(_0x5354e3,_0x2d58da){_0x5354e3=_0x5354e3-0xe7;const _0x340de6=a38_0x340d();let _0xb1e2f=_0x340de6[_0x5354e3];return _0xb1e2f;}function a38_0x340d(){const _0x98673c=['2SZYGkS','44363feZgWU','LOVRABET_ENV','env','9RDpIGv','6172520SRDyyi','2298690lzuJZm','28kVXwqy','1070mMnlIc','2783832rZOzeX','302076czObuY','1316334yrlyiu','20860CQIkVq','3820yulGAJ'];a38_0x340d=function(){return _0x98673c;};return a38_0x340d();}export function initEnv(_0x3c7f43){env=_0x3c7f43;}
@@ -1 +1 @@
1
- (function(_0x5266bf,_0x35250a){const _0x1dc515=a39_0x5902,_0x39decd=_0x5266bf();while(!![]){try{const _0x4d185e=-parseInt(_0x1dc515(0x1d9))/0x1*(-parseInt(_0x1dc515(0x1c8))/0x2)+-parseInt(_0x1dc515(0x1ea))/0x3+-parseInt(_0x1dc515(0x1fc))/0x4+-parseInt(_0x1dc515(0x1f4))/0x5+parseInt(_0x1dc515(0x1db))/0x6*(parseInt(_0x1dc515(0x1e4))/0x7)+parseInt(_0x1dc515(0x1d5))/0x8*(parseInt(_0x1dc515(0x1f9))/0x9)+parseInt(_0x1dc515(0x1c6))/0xa*(parseInt(_0x1dc515(0x1c4))/0xb);if(_0x4d185e===_0x35250a)break;else _0x39decd['push'](_0x39decd['shift']());}catch(_0x1bc179){_0x39decd['push'](_0x39decd['shift']());}}}(a39_0x35cb,0x3b1ea));import{jsx as a39_0x2e7943,jsxs as a39_0x2ec2f6,Fragment as a39_0x166faa}from'react/jsx-runtime';import{useState}from'react';function a39_0x35cb(){const _0x855331=['拉取API配置','\x20登录中...','11GFELUY','rightArrow','3645490cdpiCt','value','3796GPPLFV','test','column','绑定应用AppCode可自动配置\x20API,如:\x20app-c4c89304\x20(直接回车跳过)','trim','*\x20正在检查登录状态...','!\x20未检测到有效登录','\x20\x20推荐选择\x20Yes,登录后可自动拉取并配置\x20API\x20接口','*\x20创建新项目','\x20\x20推荐选择\x20Yes,可自动配置\x20API\x20接口','cyan','*\x20项目名:\x20','项目名只能以字母或数字开头,且只包含字母、数字、-\x20和\x20_','8eyZEUT','red','登录状态','leftArrow','42AXvwQh','online','6ZyEMKW','项目名不合法','green','login','login-check','env','login-prompt','\x20←\x20','已登录','619815XmjcFu','confirm-api-pull','string','return','map','includes','704649nyukBl','应用AppCode只能包含字母、数字、连字符和下划线,且必须以字母或数字开头','\x20\x20使用\x20←→\x20选择,回车确认','label','yellow','creating','登录失败','project-name','[可选]:\x20','*\x20应用AppCode\x20','998855YAzFRl','\x20检查中...','Yes','backspace','gray','1569717sGRzzd','应用AppCode','项目名长度不能超过\x2050\x20个字符','121660rASCdH','未设置','slice','app-code','length'];a39_0x35cb=function(){return _0x855331;};return a39_0x35cb();}function a39_0x5902(_0x1e4f32,_0x305e56){_0x1e4f32=_0x1e4f32-0x1c4;const _0x35cb8d=a39_0x35cb();let _0x5902e3=_0x35cb8d[_0x1e4f32];return _0x5902e3;}import{Text,Box,useInput}from'ink';import{getIsSessionValid}from'../auth/is-session-valid.js';import{authServer}from'../auth/auth-server.js';import{readConfig}from'../utils/config.js';export function EnhancedGuidedCreate(_0x3a92f3){const _0x52c7e7=a39_0x5902,{onCreate:_0x798227,env:_0x31f566}=_0x3a92f3,[_0x2f0eca,_0x5117b4]=useState(_0x52c7e7(0x1f1)),[_0x5b279d,_0x38221e]=useState(''),[_0x41dd5d,_0x490120]=useState(''),[_0x1480a7,_0xf42a33]=useState(''),[_0x999d15,_0x16ca46]=useState(''),[_0x1b032d,_0x49cbb6]=useState([]),[_0x58a5d5,_0x535ec4]=useState(null),[_0x408059,_0x3ba60e]=useState(![]),[_0x3ba90e,_0x2fef6d]=useState(![]),[_0x3f0ef3,_0x5aeae6]=useState(![]),[_0x1776f7,_0x260da3]=useState(0x0),[_0x938d5c,_0x36f093]=useState(0x0),_0xe115eb='my-app',_0x4a8416=readConfig(),_0x320f3b=typeof _0x4a8416[_0x52c7e7(0x1e0)]===_0x52c7e7(0x1e6)?_0x4a8416[_0x52c7e7(0x1e0)]:undefined;function _0x314cba(_0x519f96){const _0x1296c0=_0x52c7e7;if(_0x519f96[_0x1296c0(0x200)]>0x32)return{'valid':![],'message':_0x1296c0(0x1fb)};const _0x1663f8=/^[A-Za-z0-9][A-Za-z0-9_-]*$/;if(_0x519f96?.[_0x1296c0(0x1cc)]()&&!_0x1663f8[_0x1296c0(0x1c9)](_0x519f96))return{'valid':![],'message':_0x1296c0(0x1d4)};return{'valid':!![]};}function _0x31172b(_0x4617d3){const _0x130f44=_0x52c7e7;if(!_0x4617d3[_0x130f44(0x1cc)]())return{'valid':!![]};if(_0x4617d3[_0x130f44(0x200)]>0x64)return{'valid':![],'message':'应用AppCode长度不能超过\x20100\x20个字符'};const _0xe6030d=/^[a-zA-Z0-9][a-zA-Z0-9_-]*$/;if(!_0xe6030d[_0x130f44(0x1c9)](_0x4617d3))return{'valid':![],'message':_0x130f44(0x1eb)};return{'valid':!![]};}async function _0x2e2723(){_0x3ba60e(!![]);try{const _0x3ed6d5=await getIsSessionValid();return _0x535ec4(_0x3ed6d5),_0x3ed6d5;}catch(_0xe68bd9){return _0x535ec4(![]),![];}finally{_0x3ba60e(![]);}}async function _0x5179db(){_0x2fef6d(!![]);try{const _0xd706ca=await authServer({'silent':!![]});return _0x535ec4(_0xd706ca),_0xd706ca;}catch(_0x1a87fb){return _0x535ec4(![]),![];}finally{_0x2fef6d(![]);}}return useInput(async(_0x160879,_0x162ea2)=>{const _0xa7933b=_0x52c7e7;if(_0x162ea2[_0xa7933b(0x1d8)]||_0x162ea2[_0xa7933b(0x1c5)]){if(_0x2f0eca===_0xa7933b(0x1e5)){_0x260da3(_0x548e83=>_0x548e83===0x0?0x1:0x0);return;}if(_0x2f0eca===_0xa7933b(0x1e1)){_0x36f093(_0x2ff3fb=>_0x2ff3fb===0x0?0x1:0x0);return;}}if(_0x162ea2[_0xa7933b(0x1e7)]){if(_0x2f0eca===_0xa7933b(0x1f1)){const _0x2450e9=_0x1480a7[_0xa7933b(0x1cc)]()||_0xe115eb;if(_0x999d15)return;_0x38221e(_0x2450e9),_0x49cbb6([{'step':_0xa7933b(0x1f1),'label':'项目名','value':_0x2450e9}]),_0xf42a33(''),_0x16ca46(''),_0x5117b4(_0xa7933b(0x1ff));return;}if(_0x2f0eca===_0xa7933b(0x1ff)){if(_0x999d15)return;const _0x3761da=_0x1480a7['trim']();_0x490120(_0x3761da),_0x49cbb6(_0x1a1267=>[..._0x1a1267,{'step':_0xa7933b(0x1ff),'label':_0xa7933b(0x1fa),'value':_0x3761da||_0xa7933b(0x1fd)}]),_0xf42a33(''),_0x16ca46('');if(_0x3761da){_0x5117b4(_0xa7933b(0x1df));const _0x6aa7e8=await _0x2e2723();_0x6aa7e8?_0x5117b4('confirm-api-pull'):_0x5117b4(_0xa7933b(0x1e1));}else{const _0xf5f5c=_0x31f566||_0x320f3b||_0xa7933b(0x1da);_0x798227({'projectName':_0x5b279d,'appCode':undefined,'pullApi':![],'env':_0xf5f5c}),_0x5117b4(_0xa7933b(0x1ef));}return;}if(_0x2f0eca===_0xa7933b(0x1e5)){const _0x1f8de4=_0x1776f7===0x0;_0x5aeae6(_0x1f8de4),_0x49cbb6(_0x5d52d8=>[..._0x5d52d8,{'step':'api-pull','label':_0xa7933b(0x201),'value':_0x1f8de4?'是':'否'}]);const _0x28ff9a=_0x31f566||_0x320f3b||_0xa7933b(0x1da);_0x798227({'projectName':_0x5b279d,'appCode':_0x41dd5d,'pullApi':_0x1f8de4,'env':_0x28ff9a}),_0x5117b4(_0xa7933b(0x1ef));return;}if(_0x2f0eca===_0xa7933b(0x1e1)){const _0x2f949e=_0x938d5c===0x0;if(_0x2f949e){_0x5117b4('login-process');const _0x5b5599=await _0x5179db();if(_0x5b5599)_0x49cbb6(_0x235b26=>[..._0x235b26,{'step':'login','label':_0xa7933b(0x1d7),'value':_0xa7933b(0x1e3)}]),_0x5117b4(_0xa7933b(0x1e5));else{_0x49cbb6(_0x7e102f=>[..._0x7e102f,{'step':_0xa7933b(0x1de),'label':'登录状态','value':_0xa7933b(0x1f0)}]);const _0x90b16b=_0x31f566||_0x320f3b||_0xa7933b(0x1da);_0x798227({'projectName':_0x5b279d,'appCode':_0x41dd5d,'pullApi':![],'env':_0x90b16b}),_0x5117b4('creating');}}else{_0x49cbb6(_0x22852a=>[..._0x22852a,{'step':_0xa7933b(0x1de),'label':'登录状态','value':'跳过登录'}]);const _0x333c07=_0x31f566||_0x320f3b||_0xa7933b(0x1da);_0x798227({'projectName':_0x5b279d,'appCode':_0x41dd5d,'pullApi':![],'env':_0x333c07}),_0x5117b4(_0xa7933b(0x1ef));}return;}}if(_0x162ea2[_0xa7933b(0x1f7)]||_0x162ea2['delete']){_0xf42a33(_0x35ae6a=>{const _0x26b328=_0xa7933b,_0x5e5a77=_0x35ae6a[_0x26b328(0x1fe)](0x0,-0x1);if(_0x2f0eca===_0x26b328(0x1f1)){const {valid:_0x467240,message:_0x302d8b}=_0x314cba(_0x5e5a77);_0x16ca46(_0x467240?'':_0x302d8b||_0x26b328(0x1dc));}else{if(_0x2f0eca===_0x26b328(0x1ff)){const {valid:_0x53390a,message:_0x974253}=_0x31172b(_0x5e5a77);_0x16ca46(_0x53390a?'':_0x974253||'应用AppCode不合法');}}return _0x5e5a77;});return;}if([_0xa7933b(0x1ef),_0xa7933b(0x1df),'login-process'][_0xa7933b(0x1e9)](_0x2f0eca))return;if(_0x2f0eca===_0xa7933b(0x1e5)||_0x2f0eca===_0xa7933b(0x1e1))return;_0xf42a33(_0x27a9f0=>{const _0x19fe21=_0xa7933b,_0x465335=_0x27a9f0+_0x160879;if(_0x2f0eca===_0x19fe21(0x1f1)){const {valid:_0x1cde2c,message:_0xa85ea2}=_0x314cba(_0x465335);_0x16ca46(_0x1cde2c?'':_0xa85ea2||_0x19fe21(0x1dc));}else{if(_0x2f0eca===_0x19fe21(0x1ff)){const {valid:_0x440370,message:_0x3de772}=_0x31172b(_0x465335);_0x16ca46(_0x440370?'':_0x3de772||'应用AppCode不合法');}}return _0x465335;});}),a39_0x2ec2f6(Box,{'flexDirection':_0x52c7e7(0x1ca),'marginTop':0x1,'children':[_0x1b032d[_0x52c7e7(0x200)]===0x0&&a39_0x2e7943(Box,{'children':a39_0x2e7943(Text,{'color':_0x52c7e7(0x1d2),'children':_0x52c7e7(0x1d0)})}),_0x1b032d[_0x52c7e7(0x1e8)](_0x2eec24=>a39_0x2ec2f6(Box,{'children':[a39_0x2ec2f6(Text,{'color':_0x52c7e7(0x1dd),'children':['√\x20',_0x2eec24[_0x52c7e7(0x1ed)],':\x20']}),a39_0x2e7943(Text,{'color':_0x52c7e7(0x1d2),'children':_0x2eec24[_0x52c7e7(0x1c7)]})]},_0x2eec24['step'])),_0x2f0eca==='project-name'&&a39_0x2ec2f6(a39_0x166faa,{'children':[a39_0x2ec2f6(Box,{'children':[a39_0x2e7943(Text,{'children':_0x52c7e7(0x1d3)}),_0x1480a7?a39_0x2e7943(Text,{'color':'green','children':_0x1480a7}):a39_0x2e7943(Text,{'color':_0x52c7e7(0x1f8),'children':_0xe115eb}),_0x999d15&&a39_0x2ec2f6(Text,{'color':_0x52c7e7(0x1d6),'children':[_0x52c7e7(0x1e2),_0x999d15]})]}),!_0x999d15&&!_0x1480a7&&a39_0x2e7943(Box,{'children':a39_0x2e7943(Text,{'color':_0x52c7e7(0x1f8),'children':'\x20直接回车确认,或输入自定义名称'})})]}),_0x2f0eca===_0x52c7e7(0x1ff)&&a39_0x2ec2f6(a39_0x166faa,{'children':[a39_0x2ec2f6(Box,{'children':[a39_0x2e7943(Text,{'children':_0x52c7e7(0x1f3)}),a39_0x2e7943(Text,{'color':_0x52c7e7(0x1f8),'children':_0x52c7e7(0x1f2)}),a39_0x2e7943(Text,{'color':_0x52c7e7(0x1dd),'children':_0x1480a7}),_0x999d15&&a39_0x2ec2f6(Text,{'color':_0x52c7e7(0x1d6),'children':[_0x52c7e7(0x1e2),_0x999d15]})]}),!_0x999d15&&a39_0x2e7943(Box,{'children':a39_0x2ec2f6(Text,{'color':_0x52c7e7(0x1f8),'children':['\x20',_0x52c7e7(0x1cb)]})})]}),_0x2f0eca===_0x52c7e7(0x1df)&&a39_0x2ec2f6(Box,{'children':[a39_0x2e7943(Text,{'children':_0x52c7e7(0x1cd)}),_0x408059&&a39_0x2e7943(Text,{'color':_0x52c7e7(0x1f8),'children':_0x52c7e7(0x1f5)})]}),_0x2f0eca==='confirm-api-pull'&&a39_0x2ec2f6(a39_0x166faa,{'children':[a39_0x2e7943(Box,{'children':a39_0x2e7943(Text,{'color':_0x52c7e7(0x1dd),'children':'√\x20检测到有效登录状态'})}),a39_0x2e7943(Box,{'marginTop':0x1,'children':a39_0x2e7943(Text,{'children':'*\x20是否要自动拉取\x20API\x20配置?'})}),a39_0x2ec2f6(Box,{'marginLeft':0x2,'children':[a39_0x2ec2f6(Text,{'color':_0x1776f7===0x0?_0x52c7e7(0x1dd):_0x52c7e7(0x1f8),'children':[_0x1776f7===0x0?'▶\x20':'\x20\x20',_0x52c7e7(0x1f6)]}),a39_0x2e7943(Text,{'children':'\x20'}),a39_0x2ec2f6(Text,{'color':_0x1776f7===0x1?_0x52c7e7(0x1dd):_0x52c7e7(0x1f8),'children':[_0x1776f7===0x1?'▶\x20':'\x20\x20','No']})]}),a39_0x2e7943(Box,{'children':a39_0x2e7943(Text,{'color':_0x52c7e7(0x1f8),'children':_0x52c7e7(0x1ec)})}),a39_0x2e7943(Box,{'children':a39_0x2e7943(Text,{'color':_0x52c7e7(0x1ee),'children':_0x52c7e7(0x1d1)})})]}),_0x2f0eca===_0x52c7e7(0x1e1)&&a39_0x2ec2f6(a39_0x166faa,{'children':[a39_0x2e7943(Box,{'children':a39_0x2e7943(Text,{'color':_0x52c7e7(0x1ee),'children':_0x52c7e7(0x1ce)})}),a39_0x2e7943(Box,{'marginTop':0x1,'children':a39_0x2e7943(Text,{'children':'*\x20是否要先登录以便拉取\x20API\x20配置?'})}),a39_0x2ec2f6(Box,{'marginLeft':0x2,'children':[a39_0x2ec2f6(Text,{'color':_0x938d5c===0x0?'green':'gray','children':[_0x938d5c===0x0?'▶\x20':'\x20\x20',_0x52c7e7(0x1f6)]}),a39_0x2e7943(Text,{'children':'\x20'}),a39_0x2ec2f6(Text,{'color':_0x938d5c===0x1?_0x52c7e7(0x1dd):_0x52c7e7(0x1f8),'children':[_0x938d5c===0x1?'▶\x20':'\x20\x20','No']})]}),a39_0x2e7943(Box,{'children':a39_0x2e7943(Text,{'color':_0x52c7e7(0x1f8),'children':'\x20\x20使用\x20←→\x20选择,回车确认'})}),a39_0x2e7943(Box,{'children':a39_0x2e7943(Text,{'color':'yellow','children':_0x52c7e7(0x1cf)})})]}),_0x2f0eca==='login-process'&&a39_0x2ec2f6(Box,{'children':[a39_0x2e7943(Text,{'children':'*\x20正在登录,请前往浏览器完成登录...'}),_0x3ba90e&&a39_0x2e7943(Text,{'color':_0x52c7e7(0x1f8),'children':_0x52c7e7(0x202)})]})]});}
1
+ function a39_0x3c50(){const _0x912466=['*\x20项目名:\x20','619482IMOZew','!\x20未检测到有效登录','api-pull','login','return','yellow','[可选]:\x20','\x20\x20推荐选择\x20Yes,登录后可自动拉取并配置\x20API\x20接口','9ViKrvF','backspace','length','项目名长度不能超过\x2050\x20个字符','slice','map','login-check','项目名不合法','未设置','rightArrow','confirm-api-pull','*\x20是否要自动拉取\x20API\x20配置?','login-process','\x20登录中...','项目名','label','\x20\x20使用\x20←→\x20选择,回车确认','拉取API配置','green','登录状态','cyan','online','\x20\x20推荐选择\x20Yes,可自动配置\x20API\x20接口','151451InOgRO','*\x20正在登录,请前往浏览器完成登录...','*\x20创建新项目','Yes','应用AppCode','login-prompt','gray','*\x20应用AppCode\x20','9708QlUoRQ','project-name','*\x20正在检查登录状态...','跳过登录','√\x20检测到有效登录状态','delete','604933EYMcxC','creating','\x20直接回车确认,或输入自定义名称','trim','应用AppCode不合法','leftArrow','my-app','7450920pVPlPb','env','column','585164tKGqQU','应用AppCode长度不能超过\x20100\x20个字符','36XjEbtn','test','775280uogfxs','app-code','\x20←\x20','*\x20是否要先登录以便拉取\x20API\x20配置?','绑定应用AppCode可自动配置\x20API,如:\x20app-c4c89304\x20(直接回车跳过)','已登录'];a39_0x3c50=function(){return _0x912466;};return a39_0x3c50();}function a39_0x4b29(_0x2f1900,_0x483dc7){_0x2f1900=_0x2f1900-0x196;const _0x3c5070=a39_0x3c50();let _0x4b2976=_0x3c5070[_0x2f1900];return _0x4b2976;}(function(_0x4ce934,_0x50d234){const _0x5a6c23=a39_0x4b29,_0x4160b5=_0x4ce934();while(!![]){try{const _0x2ebc28=-parseInt(_0x5a6c23(0x1d3))/0x1+-parseInt(_0x5a6c23(0x1ab))/0x2*(parseInt(_0x5a6c23(0x199))/0x3)+-parseInt(_0x5a6c23(0x1a9))/0x4+-parseInt(_0x5a6c23(0x1ad))/0x5+-parseInt(_0x5a6c23(0x1b4))/0x6+-parseInt(_0x5a6c23(0x19f))/0x7+-parseInt(_0x5a6c23(0x1a6))/0x8*(-parseInt(_0x5a6c23(0x1bc))/0x9);if(_0x2ebc28===_0x50d234)break;else _0x4160b5['push'](_0x4160b5['shift']());}catch(_0x1ec5e9){_0x4160b5['push'](_0x4160b5['shift']());}}}(a39_0x3c50,0x384fd));import{jsx as a39_0x5c448b,jsxs as a39_0x21ab56,Fragment as a39_0x2d01c9}from'react/jsx-runtime';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';import{readConfig}from'../utils/config.js';export function EnhancedGuidedCreate(_0x351162){const _0x3a91b1=a39_0x4b29,{onCreate:_0x21b672,env:_0x185a93}=_0x351162,[_0x487bc9,_0x4257c4]=useState(_0x3a91b1(0x19a)),[_0x2907e5,_0x2020c4]=useState(''),[_0x1d8a6c,_0x8d2ddc]=useState(''),[_0x247c82,_0x319ad1]=useState(''),[_0x20ce46,_0x1f4e2e]=useState(''),[_0x3e5576,_0x5cf8d2]=useState([]),[_0x48b8b4,_0x1bb1a0]=useState(null),[_0x5d29f9,_0x4e0ab1]=useState(![]),[_0x1b7e9c,_0x2838c7]=useState(![]),[_0x150e18,_0x5c9594]=useState(![]),[_0x1a37f5,_0x5efb22]=useState(0x0),[_0x12f4d4,_0x4f396b]=useState(0x0),_0x2ca476=_0x3a91b1(0x1a5),_0x4dfda8=readConfig(),_0x5a16c1=typeof _0x4dfda8[_0x3a91b1(0x1a7)]==='string'?_0x4dfda8[_0x3a91b1(0x1a7)]:undefined;function _0x9559b1(_0xb54937){const _0x253ff5=_0x3a91b1;if(_0xb54937[_0x253ff5(0x1be)]>0x32)return{'valid':![],'message':_0x253ff5(0x1bf)};const _0x5797ac=/^[A-Za-z0-9][A-Za-z0-9_-]*$/;if(_0xb54937?.[_0x253ff5(0x1a2)]()&&!_0x5797ac[_0x253ff5(0x1ac)](_0xb54937))return{'valid':![],'message':'项目名只能以字母或数字开头,且只包含字母、数字、-\x20和\x20_'};return{'valid':!![]};}function _0x204443(_0x3b1c26){const _0x29f942=_0x3a91b1;if(!_0x3b1c26[_0x29f942(0x1a2)]())return{'valid':!![]};if(_0x3b1c26['length']>0x64)return{'valid':![],'message':_0x29f942(0x1aa)};const _0x2b0227=/^[a-zA-Z0-9][a-zA-Z0-9_-]*$/;if(!_0x2b0227['test'](_0x3b1c26))return{'valid':![],'message':'应用AppCode只能包含字母、数字、连字符和下划线,且必须以字母或数字开头'};return{'valid':!![]};}async function _0x2c3c06(){_0x4e0ab1(!![]);try{const _0x350080=await getIsSessionValid();return _0x1bb1a0(_0x350080),_0x350080;}catch(_0x15151a){return _0x1bb1a0(![]),![];}finally{_0x4e0ab1(![]);}}async function _0x5b3e13(){_0x2838c7(!![]);try{const _0x243b72=await authServer({'silent':!![]});return _0x1bb1a0(_0x243b72),_0x243b72;}catch(_0x12478f){return _0x1bb1a0(![]),![];}finally{_0x2838c7(![]);}}return useInput(async(_0x52a8b8,_0x2f3e3e)=>{const _0x330509=_0x3a91b1;if(_0x2f3e3e[_0x330509(0x1a4)]||_0x2f3e3e[_0x330509(0x1c5)]){if(_0x487bc9===_0x330509(0x1c6)){_0x5efb22(_0x104796=>_0x104796===0x0?0x1:0x0);return;}if(_0x487bc9===_0x330509(0x196)){_0x4f396b(_0x46fd4b=>_0x46fd4b===0x0?0x1:0x0);return;}}if(_0x2f3e3e[_0x330509(0x1b8)]){if(_0x487bc9==='project-name'){const _0x2586e3=_0x247c82['trim']()||_0x2ca476;if(_0x20ce46)return;_0x2020c4(_0x2586e3),_0x5cf8d2([{'step':_0x330509(0x19a),'label':_0x330509(0x1ca),'value':_0x2586e3}]),_0x319ad1(''),_0x1f4e2e(''),_0x4257c4('app-code');return;}if(_0x487bc9===_0x330509(0x1ae)){if(_0x20ce46)return;const _0x4a60a0=_0x247c82[_0x330509(0x1a2)]();_0x8d2ddc(_0x4a60a0),_0x5cf8d2(_0x5d3c5e=>[..._0x5d3c5e,{'step':_0x330509(0x1ae),'label':_0x330509(0x1d7),'value':_0x4a60a0||_0x330509(0x1c4)}]),_0x319ad1(''),_0x1f4e2e('');if(_0x4a60a0){_0x4257c4('login-check');const _0x4a76cb=await _0x2c3c06();_0x4a76cb?_0x4257c4(_0x330509(0x1c6)):_0x4257c4(_0x330509(0x196));}else{const _0x19b497=_0x185a93||_0x5a16c1||'online';_0x21b672({'projectName':_0x2907e5,'appCode':undefined,'pullApi':![],'env':_0x19b497}),_0x4257c4(_0x330509(0x1a0));}return;}if(_0x487bc9===_0x330509(0x1c6)){const _0x23319b=_0x1a37f5===0x0;_0x5c9594(_0x23319b),_0x5cf8d2(_0x1da41d=>[..._0x1da41d,{'step':_0x330509(0x1b6),'label':_0x330509(0x1cd),'value':_0x23319b?'是':'否'}]);const _0x5a5253=_0x185a93||_0x5a16c1||_0x330509(0x1d1);_0x21b672({'projectName':_0x2907e5,'appCode':_0x1d8a6c,'pullApi':_0x23319b,'env':_0x5a5253}),_0x4257c4(_0x330509(0x1a0));return;}if(_0x487bc9==='login-prompt'){const _0x525e1d=_0x12f4d4===0x0;if(_0x525e1d){_0x4257c4(_0x330509(0x1c8));const _0x4f26f1=await _0x5b3e13();if(_0x4f26f1)_0x5cf8d2(_0x48d7aa=>[..._0x48d7aa,{'step':_0x330509(0x1b7),'label':_0x330509(0x1cf),'value':_0x330509(0x1b2)}]),_0x4257c4(_0x330509(0x1c6));else{_0x5cf8d2(_0x4b3911=>[..._0x4b3911,{'step':_0x330509(0x1b7),'label':_0x330509(0x1cf),'value':'登录失败'}]);const _0x3b75c9=_0x185a93||_0x5a16c1||_0x330509(0x1d1);_0x21b672({'projectName':_0x2907e5,'appCode':_0x1d8a6c,'pullApi':![],'env':_0x3b75c9}),_0x4257c4(_0x330509(0x1a0));}}else{_0x5cf8d2(_0x3ebe2c=>[..._0x3ebe2c,{'step':_0x330509(0x1b7),'label':'登录状态','value':_0x330509(0x19c)}]);const _0x461dfe=_0x185a93||_0x5a16c1||_0x330509(0x1d1);_0x21b672({'projectName':_0x2907e5,'appCode':_0x1d8a6c,'pullApi':![],'env':_0x461dfe}),_0x4257c4(_0x330509(0x1a0));}return;}}if(_0x2f3e3e[_0x330509(0x1bd)]||_0x2f3e3e[_0x330509(0x19e)]){_0x319ad1(_0x16a9a4=>{const _0x11869f=_0x330509,_0x11ff95=_0x16a9a4[_0x11869f(0x1c0)](0x0,-0x1);if(_0x487bc9===_0x11869f(0x19a)){const {valid:_0x5c45f3,message:_0x46b628}=_0x9559b1(_0x11ff95);_0x1f4e2e(_0x5c45f3?'':_0x46b628||_0x11869f(0x1c3));}else{if(_0x487bc9===_0x11869f(0x1ae)){const {valid:_0x3f74ab,message:_0xe2b8e}=_0x204443(_0x11ff95);_0x1f4e2e(_0x3f74ab?'':_0xe2b8e||_0x11869f(0x1a3));}}return _0x11ff95;});return;}if([_0x330509(0x1a0),_0x330509(0x1c2),_0x330509(0x1c8)]['includes'](_0x487bc9))return;if(_0x487bc9==='confirm-api-pull'||_0x487bc9===_0x330509(0x196))return;_0x319ad1(_0x1b8105=>{const _0x596239=_0x330509,_0x878078=_0x1b8105+_0x52a8b8;if(_0x487bc9===_0x596239(0x19a)){const {valid:_0x5d3ab1,message:_0x52c7fd}=_0x9559b1(_0x878078);_0x1f4e2e(_0x5d3ab1?'':_0x52c7fd||_0x596239(0x1c3));}else{if(_0x487bc9===_0x596239(0x1ae)){const {valid:_0x4aa96d,message:_0x504869}=_0x204443(_0x878078);_0x1f4e2e(_0x4aa96d?'':_0x504869||_0x596239(0x1a3));}}return _0x878078;});}),a39_0x21ab56(Box,{'flexDirection':_0x3a91b1(0x1a8),'marginTop':0x1,'children':[_0x3e5576['length']===0x0&&a39_0x5c448b(Box,{'children':a39_0x5c448b(Text,{'color':_0x3a91b1(0x1d0),'children':_0x3a91b1(0x1d5)})}),_0x3e5576[_0x3a91b1(0x1c1)](_0xfbe590=>a39_0x21ab56(Box,{'children':[a39_0x21ab56(Text,{'color':_0x3a91b1(0x1ce),'children':['√\x20',_0xfbe590[_0x3a91b1(0x1cb)],':\x20']}),a39_0x5c448b(Text,{'color':_0x3a91b1(0x1d0),'children':_0xfbe590['value']})]},_0xfbe590['step'])),_0x487bc9===_0x3a91b1(0x19a)&&a39_0x21ab56(a39_0x2d01c9,{'children':[a39_0x21ab56(Box,{'children':[a39_0x5c448b(Text,{'children':_0x3a91b1(0x1b3)}),_0x247c82?a39_0x5c448b(Text,{'color':_0x3a91b1(0x1ce),'children':_0x247c82}):a39_0x5c448b(Text,{'color':_0x3a91b1(0x197),'children':_0x2ca476}),_0x20ce46&&a39_0x21ab56(Text,{'color':'red','children':[_0x3a91b1(0x1af),_0x20ce46]})]}),!_0x20ce46&&!_0x247c82&&a39_0x5c448b(Box,{'children':a39_0x5c448b(Text,{'color':_0x3a91b1(0x197),'children':_0x3a91b1(0x1a1)})})]}),_0x487bc9==='app-code'&&a39_0x21ab56(a39_0x2d01c9,{'children':[a39_0x21ab56(Box,{'children':[a39_0x5c448b(Text,{'children':_0x3a91b1(0x198)}),a39_0x5c448b(Text,{'color':_0x3a91b1(0x197),'children':_0x3a91b1(0x1ba)}),a39_0x5c448b(Text,{'color':_0x3a91b1(0x1ce),'children':_0x247c82}),_0x20ce46&&a39_0x21ab56(Text,{'color':'red','children':[_0x3a91b1(0x1af),_0x20ce46]})]}),!_0x20ce46&&a39_0x5c448b(Box,{'children':a39_0x21ab56(Text,{'color':'gray','children':['\x20',_0x3a91b1(0x1b1)]})})]}),_0x487bc9===_0x3a91b1(0x1c2)&&a39_0x21ab56(Box,{'children':[a39_0x5c448b(Text,{'children':_0x3a91b1(0x19b)}),_0x5d29f9&&a39_0x5c448b(Text,{'color':_0x3a91b1(0x197),'children':'\x20检查中...'})]}),_0x487bc9===_0x3a91b1(0x1c6)&&a39_0x21ab56(a39_0x2d01c9,{'children':[a39_0x5c448b(Box,{'children':a39_0x5c448b(Text,{'color':_0x3a91b1(0x1ce),'children':_0x3a91b1(0x19d)})}),a39_0x5c448b(Box,{'marginTop':0x1,'children':a39_0x5c448b(Text,{'children':_0x3a91b1(0x1c7)})}),a39_0x21ab56(Box,{'marginLeft':0x2,'children':[a39_0x21ab56(Text,{'color':_0x1a37f5===0x0?'green':_0x3a91b1(0x197),'children':[_0x1a37f5===0x0?'▶\x20':'\x20\x20',_0x3a91b1(0x1d6)]}),a39_0x5c448b(Text,{'children':'\x20'}),a39_0x21ab56(Text,{'color':_0x1a37f5===0x1?_0x3a91b1(0x1ce):_0x3a91b1(0x197),'children':[_0x1a37f5===0x1?'▶\x20':'\x20\x20','No']})]}),a39_0x5c448b(Box,{'children':a39_0x5c448b(Text,{'color':'gray','children':'\x20\x20使用\x20←→\x20选择,回车确认'})}),a39_0x5c448b(Box,{'children':a39_0x5c448b(Text,{'color':_0x3a91b1(0x1b9),'children':_0x3a91b1(0x1d2)})})]}),_0x487bc9===_0x3a91b1(0x196)&&a39_0x21ab56(a39_0x2d01c9,{'children':[a39_0x5c448b(Box,{'children':a39_0x5c448b(Text,{'color':_0x3a91b1(0x1b9),'children':_0x3a91b1(0x1b5)})}),a39_0x5c448b(Box,{'marginTop':0x1,'children':a39_0x5c448b(Text,{'children':_0x3a91b1(0x1b0)})}),a39_0x21ab56(Box,{'marginLeft':0x2,'children':[a39_0x21ab56(Text,{'color':_0x12f4d4===0x0?_0x3a91b1(0x1ce):'gray','children':[_0x12f4d4===0x0?'▶\x20':'\x20\x20','Yes']}),a39_0x5c448b(Text,{'children':'\x20'}),a39_0x21ab56(Text,{'color':_0x12f4d4===0x1?_0x3a91b1(0x1ce):_0x3a91b1(0x197),'children':[_0x12f4d4===0x1?'▶\x20':'\x20\x20','No']})]}),a39_0x5c448b(Box,{'children':a39_0x5c448b(Text,{'color':_0x3a91b1(0x197),'children':_0x3a91b1(0x1cc)})}),a39_0x5c448b(Box,{'children':a39_0x5c448b(Text,{'color':'yellow','children':_0x3a91b1(0x1bb)})})]}),_0x487bc9===_0x3a91b1(0x1c8)&&a39_0x21ab56(Box,{'children':[a39_0x5c448b(Text,{'children':_0x3a91b1(0x1d4)}),_0x1b7e9c&&a39_0x5c448b(Text,{'color':_0x3a91b1(0x197),'children':_0x3a91b1(0x1c9)})]})]});}
@@ -1 +1 @@
1
- (function(_0x1e5c8b,_0x17b50d){const _0x4ee697=a40_0x21b3,_0xc3b03d=_0x1e5c8b();while(!![]){try{const _0x48d155=-parseInt(_0x4ee697(0x159))/0x1*(-parseInt(_0x4ee697(0x153))/0x2)+parseInt(_0x4ee697(0x156))/0x3+-parseInt(_0x4ee697(0x15b))/0x4+-parseInt(_0x4ee697(0x15c))/0x5+parseInt(_0x4ee697(0x158))/0x6*(parseInt(_0x4ee697(0x155))/0x7)+-parseInt(_0x4ee697(0x154))/0x8+parseInt(_0x4ee697(0x15e))/0x9*(parseInt(_0x4ee697(0x15a))/0xa);if(_0x48d155===_0x17b50d)break;else _0xc3b03d['push'](_0xc3b03d['shift']());}catch(_0x16901c){_0xc3b03d['push'](_0xc3b03d['shift']());}}}(a40_0x1cc4,0x24ad3));function a40_0x1cc4(){const _0x5b23de=['1023284TyZePS','942695QXpqIN','now','973881vGpMFu','2napHoT','690920fqlmQd','880551xwcfVD','362688fgISnr','toFixed','6zltPCz','1427zrGGTV','40gPxDdv'];a40_0x1cc4=function(){return _0x5b23de;};return a40_0x1cc4();}function a40_0x21b3(_0xbf3380,_0x7215bf){_0xbf3380=_0xbf3380-0x153;const _0x1cc429=a40_0x1cc4();let _0x21b353=_0x1cc429[_0xbf3380];return _0x21b353;}export function formatElapsed(_0xd4f0af){const _0x4290b4=a40_0x21b3,_0x52e025=Date[_0x4290b4(0x15d)]()-_0xd4f0af;if(_0x52e025<0x3e8)return _0x52e025+'ms';const _0x347dde=(_0x52e025/0x3e8)[_0x4290b4(0x157)](0x2),_0x150ab9=_0x347dde['replace'](/\.?0+$/u,'');return _0x150ab9+'s';}
1
+ (function(_0x2e38e2,_0x3efd92){const _0x233996=a40_0x3e0e,_0x504258=_0x2e38e2();while(!![]){try{const _0x370ec0=-parseInt(_0x233996(0x17c))/0x1+parseInt(_0x233996(0x180))/0x2+parseInt(_0x233996(0x17f))/0x3+-parseInt(_0x233996(0x178))/0x4+parseInt(_0x233996(0x17e))/0x5*(parseInt(_0x233996(0x17b))/0x6)+-parseInt(_0x233996(0x182))/0x7*(-parseInt(_0x233996(0x179))/0x8)+parseInt(_0x233996(0x17a))/0x9*(-parseInt(_0x233996(0x183))/0xa);if(_0x370ec0===_0x3efd92)break;else _0x504258['push'](_0x504258['shift']());}catch(_0x54ba5a){_0x504258['push'](_0x504258['shift']());}}}(a40_0x4b9a,0xdb53c));function a40_0x3e0e(_0x3f6617,_0x553ed6){_0x3f6617=_0x3f6617-0x178;const _0x4b9aac=a40_0x4b9a();let _0x3e0e8a=_0x4b9aac[_0x3f6617];return _0x3e0e8a;}function a40_0x4b9a(){const _0x2a9f26=['20uHzAPx','1066788gApnyF','379438fUQxvO','replace','21kXBdXc','19540YYPoQV','toFixed','2749336kVFAxF','4238632RhgGDn','6750NENHBV','2356590GLlwMA','654664acQtVb','now'];a40_0x4b9a=function(){return _0x2a9f26;};return a40_0x4b9a();}export function formatElapsed(_0x4f7823){const _0x14a16b=a40_0x3e0e,_0x486ff7=Date[_0x14a16b(0x17d)]()-_0x4f7823;if(_0x486ff7<0x3e8)return _0x486ff7+'ms';const _0x475052=(_0x486ff7/0x3e8)[_0x14a16b(0x184)](0x2),_0x39197=_0x475052[_0x14a16b(0x181)](/\.?0+$/u,'');return _0x39197+'s';}
@@ -1 +1 @@
1
- (function(_0x5ab037,_0x3316c7){const _0x4477f9=a41_0x5857,_0x2fc739=_0x5ab037();while(!![]){try{const _0x212908=parseInt(_0x4477f9(0x180))/0x1*(-parseInt(_0x4477f9(0x1bc))/0x2)+parseInt(_0x4477f9(0x198))/0x3*(-parseInt(_0x4477f9(0x196))/0x4)+-parseInt(_0x4477f9(0x181))/0x5*(-parseInt(_0x4477f9(0x1ba))/0x6)+-parseInt(_0x4477f9(0x174))/0x7*(-parseInt(_0x4477f9(0x1c5))/0x8)+parseInt(_0x4477f9(0x1b6))/0x9*(parseInt(_0x4477f9(0x16d))/0xa)+-parseInt(_0x4477f9(0x1b8))/0xb+parseInt(_0x4477f9(0x16f))/0xc*(-parseInt(_0x4477f9(0x195))/0xd);if(_0x212908===_0x3316c7)break;else _0x2fc739['push'](_0x2fc739['shift']());}catch(_0x3b0f34){_0x2fc739['push'](_0x2fc739['shift']());}}}(a41_0x5a47,0x61df0));import{jsx as a41_0x5e2cd4,Fragment as a41_0x4d7a9c,jsxs as a41_0x4a67d7}from'react/jsx-runtime';import a41_0x5d9fea from'node:path';import a41_0x31105d from'node:fs';import{fileURLToPath}from'node:url';function a41_0x5857(_0x54a561,_0x2d624c){_0x54a561=_0x54a561-0x164;const _0x5a47c0=a41_0x5a47();let _0x585774=_0x5a47c0[_0x54a561];return _0x585774;}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{readConfig}from'../utils/config.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';import{logger}from'../utils/logger.js';export function CreateApp(_0x3f2892){const _0x3aa6d8=a41_0x5857,[_0x328de8,_0x5c599b]=useState(![]),[_0x31cdeb,_0x4d2f81]=useState(![]),[_0xba93ff,_0x5025e3]=useState(null),_0x5d60a2=useCopyProjectTemplate(),_0x459e2b=useInstallDependencies(),_0xdc1691=useFormatCode(),_0x16dfd2=async _0x2984fe=>{const _0x1e5212=a41_0x5857;if(!_0x2984fe[_0x1e5212(0x17a)]||_0x2984fe['projectName'][_0x1e5212(0x1bb)]()===''){console['error'](_0x1e5212(0x18f));return;}const _0x1c88d1=/[<>:"|?*\x00-\x1f\x7f]/;if(_0x1c88d1[_0x1e5212(0x17b)](_0x2984fe[_0x1e5212(0x17a)])){console['error'](_0x1e5212(0x197));return;}if(_0x2984fe[_0x1e5212(0x17a)][_0x1e5212(0x1c8)]>0x64){console[_0x1e5212(0x1a5)]('×\x20项目名过长,最多支持\x20100\x20个字符');return;}const _0x26b402=a41_0x5d9fea[_0x1e5212(0x19a)](process['cwd'](),_0x2984fe['projectName']);if(a41_0x31105d[_0x1e5212(0x1b5)](_0x26b402)){console[_0x1e5212(0x1a5)](_0x1e5212(0x1a9)+_0x2984fe[_0x1e5212(0x17a)]+_0x1e5212(0x192));return;}try{const _0x27c648=a41_0x5d9fea[_0x1e5212(0x179)](_0x26b402);a41_0x31105d[_0x1e5212(0x185)](_0x27c648,a41_0x31105d[_0x1e5212(0x164)][_0x1e5212(0x1be)]);}catch(_0x5916df){console['error'](_0x1e5212(0x17c));return;}_0x5025e3(_0x2984fe),_0x5c599b(!![]),logger[_0x1e5212(0x190)](_0x26b402),logger[_0x1e5212(0x1ae)](_0x1e5212(0x189),'开始创建项目:\x20'+_0x2984fe[_0x1e5212(0x17a)],{'projectDir':_0x26b402,'appCode':_0x2984fe['appCode']});try{await _0x5d60a2[_0x1e5212(0x1b3)](_0x2984fe[_0x1e5212(0x17a)]),await _0x37981b(_0x2984fe[_0x1e5212(0x17a)]),await _0x459e2b[_0x1e5212(0x1b3)](_0x2984fe['projectName']),await _0xdc1691[_0x1e5212(0x1b3)](_0x2984fe[_0x1e5212(0x17a)]),await _0x2a43b7(_0x2984fe[_0x1e5212(0x17a)],_0x2984fe['appCode']||'',_0x2984fe['env']);if(_0x2984fe['pullApi']&&_0x2984fe[_0x1e5212(0x1a0)]){console['log'](_0x1e5212(0x17e));try{const _0x23ab2f=await pullApiSilent(_0x2984fe['appCode'],undefined,_0x26b402,_0x2984fe[_0x1e5212(0x1a1)]);_0x23ab2f?(console['log'](_0x1e5212(0x1a7)),logger['info'](_0x1e5212(0x189),_0x1e5212(0x17d)+_0x2984fe[_0x1e5212(0x1a0)],{'projectDir':_0x26b402,'appCode':_0x2984fe[_0x1e5212(0x1a0)],'env':_0x2984fe[_0x1e5212(0x1a1)]})):(console['log'](_0x1e5212(0x1a8)),logger[_0x1e5212(0x166)](_0x1e5212(0x189),_0x1e5212(0x1b2)+_0x2984fe[_0x1e5212(0x1a0)],{'projectDir':_0x26b402,'appCode':_0x2984fe['appCode'],'env':_0x2984fe[_0x1e5212(0x1a1)]}));}catch(_0x54c412){console[_0x1e5212(0x19d)]('!\x20API\x20配置拉取异常,项目已创建,可稍后手动执行:\x20lovrabet\x20api\x20pull'),logger[_0x1e5212(0x166)]('create','API\x20配置拉取异常:\x20'+_0x2984fe[_0x1e5212(0x1a0)],{'projectDir':_0x26b402,'appCode':_0x2984fe[_0x1e5212(0x1a0)],'env':_0x2984fe[_0x1e5212(0x1a1)],'error':_0x54c412 instanceof Error?_0x54c412['message']:String(_0x54c412)});}}logger[_0x1e5212(0x18a)](_0x1e5212(0x189),'项目创建完成:\x20'+_0x2984fe[_0x1e5212(0x17a)]),_0x4d2f81(!![]),_0x5c599b(![]);}catch(_0x18ffd4){logger['error'](_0x1e5212(0x189),_0x1e5212(0x19c)+_0x2984fe['projectName'],{'error':_0x18ffd4 instanceof Error?_0x18ffd4[_0x1e5212(0x1b1)]:String(_0x18ffd4)});try{a41_0x31105d[_0x1e5212(0x1b5)](_0x26b402)&&(console['log'](_0x1e5212(0x18b)+_0x26b402),a41_0x31105d[_0x1e5212(0x18c)](_0x26b402,{'recursive':!![],'force':!![]}));}catch(_0x232da2){logger['warn']('create','清理项目目录失败:\x20'+_0x26b402,{'error':_0x232da2 instanceof Error?_0x232da2[_0x1e5212(0x1b1)]:String(_0x232da2)});}_0x5c599b(![]),console['error'](_0x1e5212(0x172)+(_0x18ffd4 instanceof Error?_0x18ffd4[_0x1e5212(0x1b1)]:String(_0x18ffd4)));}},_0xd73077=async _0x1a801f=>{const _0x3f41fc=a41_0x5857;await _0x16dfd2({'projectName':_0x1a801f,'env':_0x3f2892[_0x3f41fc(0x1a1)]});},_0x37981b=async _0x462ea6=>{const _0x502ff8=a41_0x5857,_0x34ea7a=a41_0x5d9fea[_0x502ff8(0x19a)](process[_0x502ff8(0x171)](),_0x462ea6),_0x32af4b=a41_0x5d9fea['join'](_0x34ea7a,'package.json');try{console['log'](_0x502ff8(0x170));const _0x4f82cf=fileURLToPath(import.meta.url),_0x153aea=a41_0x5d9fea['resolve'](a41_0x5d9fea[_0x502ff8(0x179)](_0x4f82cf),'../..'),_0x4542d3=a41_0x5d9fea['join'](_0x153aea,_0x502ff8(0x1ac));let _0x4ae39d=_0x502ff8(0x167);try{const _0x247f2b=JSON[_0x502ff8(0x1c4)](a41_0x31105d[_0x502ff8(0x1c2)](_0x4542d3,'utf8'));_0x4ae39d=_0x247f2b['version']||'1.0.0';}catch(_0x33f1b7){}const _0x50e59e=a41_0x31105d[_0x502ff8(0x1c2)](_0x32af4b,_0x502ff8(0x1c3)),_0x44d1ab=JSON[_0x502ff8(0x1c4)](_0x50e59e);_0x44d1ab[_0x502ff8(0x1aa)]=_0x462ea6,_0x44d1ab[_0x502ff8(0x169)]=_0x462ea6+_0x502ff8(0x18d)+_0x4ae39d,a41_0x31105d[_0x502ff8(0x1af)](_0x32af4b,JSON['stringify'](_0x44d1ab,null,0x2)+'\x0a',_0x502ff8(0x1c3)),console['log'](_0x502ff8(0x187)+_0x462ea6+_0x502ff8(0x1b7)+_0x44d1ab[_0x502ff8(0x169)]),logger[_0x502ff8(0x1ae)](_0x502ff8(0x189),_0x502ff8(0x1ad),{'projectName':_0x462ea6,'description':_0x44d1ab[_0x502ff8(0x169)],'cliVersion':_0x4ae39d,'packageJsonPath':_0x502ff8(0x1ac)});}catch(_0xd59806){logger[_0x502ff8(0x1a5)](_0x502ff8(0x189),'更新\x20package.json\x20失败:\x20'+_0x462ea6,{'projectName':_0x462ea6,'error':_0xd59806 instanceof Error?_0xd59806['message']:String(_0xd59806)});throw _0xd59806;}},_0x2a43b7=async(_0x2bb23e,_0x48c880,_0x52cd47)=>{const _0x13f4c1=a41_0x5857,_0x3dce57=a41_0x5d9fea[_0x13f4c1(0x19a)](process[_0x13f4c1(0x171)](),_0x2bb23e),_0x2e501b=a41_0x5d9fea[_0x13f4c1(0x19f)](_0x3dce57,'.lovrabetrc');try{_0x48c880?console[_0x13f4c1(0x19d)]('*\x20正在为项目\x20'+_0x2bb23e+_0x13f4c1(0x1a3)+_0x48c880):console[_0x13f4c1(0x19d)](_0x13f4c1(0x1a4)+_0x2bb23e+_0x13f4c1(0x186));console['log'](_0x13f4c1(0x184)+_0x2e501b);const _0x4a3510=fileURLToPath(import.meta.url),_0x2b1be2=a41_0x5d9fea[_0x13f4c1(0x19a)](a41_0x5d9fea['dirname'](_0x4a3510),_0x13f4c1(0x1ab)),_0x297f12=a41_0x5d9fea[_0x13f4c1(0x19f)](_0x2b1be2,'package.json');let _0x4c373f=_0x13f4c1(0x167);try{const _0x516c44=JSON[_0x13f4c1(0x1c4)](a41_0x31105d[_0x13f4c1(0x1c2)](_0x297f12,_0x13f4c1(0x1c3)));_0x4c373f=_0x516c44['version']||'1.0.0';}catch(_0x38ca3f){}const _0x50549d=readConfig(),_0x5981d9=typeof _0x50549d[_0x13f4c1(0x1a1)]==='string'?_0x50549d[_0x13f4c1(0x1a1)]:undefined,{app:_0x2330df,appcode:_0x497db3,..._0x313336}=_0x50549d,_0x3ff843={..._0x313336,'appcode':_0x48c880||'','env':_0x52cd47||_0x5981d9||'online','createdAt':new Date()['toLocaleString'](),'version':_0x4c373f};a41_0x31105d[_0x13f4c1(0x1af)](_0x2e501b,JSON[_0x13f4c1(0x1b9)](_0x3ff843,null,0x2),_0x13f4c1(0x1c3)),_0x48c880?console[_0x13f4c1(0x19d)](_0x13f4c1(0x1c1)+_0x48c880):console[_0x13f4c1(0x19d)]('√\x20配置文件已创建,可稍后使用\x20\x27lovrabet\x20config\x20set\x20appcode\x20<app-code>\x27\x20配置'),logger[_0x13f4c1(0x1ae)](_0x13f4c1(0x189),_0x13f4c1(0x173)+_0x48c880,{'projectName':_0x2bb23e,'configFile':_0x13f4c1(0x191)});}catch(_0x64c02d){logger['error']('create','配置应用AppCode失败:\x20'+_0x48c880,{'projectName':_0x2bb23e,'error':_0x64c02d instanceof Error?_0x64c02d[_0x13f4c1(0x1b1)]:String(_0x64c02d)});}};useEffect(()=>{const _0x33db0f=a41_0x5857;_0x3f2892[_0x33db0f(0x1b0)]&&_0xd73077(_0x3f2892['projectCode']);},[_0x3f2892[_0x3aa6d8(0x1b0)]]);if(!_0x328de8&&!_0x31cdeb&&!_0x3f2892[_0x3aa6d8(0x1b0)])return a41_0x5e2cd4(EnhancedGuidedCreate,{'onCreate':_0x16dfd2,'env':_0x3f2892[_0x3aa6d8(0x1a1)]});if(_0x328de8)return a41_0x4a67d7(a41_0x4d7a9c,{'children':[a41_0x4a67d7(Box,{'marginTop':0x1,'children':[a41_0x5e2cd4(Box,{'width':'1'}),a41_0x5e2cd4(Text,{'color':_0x3aa6d8(0x165),'children':_0x3aa6d8(0x175)}),a41_0x5e2cd4(Text,{'children':_0x3aa6d8(0x1b4)}),a41_0x5e2cd4(Text,{'color':_0x3aa6d8(0x165),'children':_0xba93ff?.['projectName']}),_0xba93ff?.[_0x3aa6d8(0x1a0)]&&a41_0x4a67d7(a41_0x4d7a9c,{'children':[a41_0x5e2cd4(Text,{'children':_0x3aa6d8(0x18e)}),a41_0x5e2cd4(Text,{'color':_0x3aa6d8(0x1c6),'children':_0xba93ff[_0x3aa6d8(0x1a0)]})]})]}),a41_0x5e2cd4(TaskRunning,{..._0x5d60a2}),a41_0x5e2cd4(TaskRunning,{..._0x459e2b}),a41_0x5e2cd4(TaskRunning,{..._0xdc1691})]});if(_0x31cdeb)return a41_0x4a67d7(a41_0x4d7a9c,{'children':[a41_0x4a67d7(Box,{'marginTop':0x1,'children':[a41_0x5e2cd4(Box,{'width':'1'}),a41_0x5e2cd4(Text,{'color':'green','children':_0x3aa6d8(0x175)}),a41_0x5e2cd4(Text,{'children':'项目名称:\x20'}),a41_0x5e2cd4(Text,{'color':_0x3aa6d8(0x165),'children':_0xba93ff?.['projectName']}),_0xba93ff?.[_0x3aa6d8(0x1a0)]&&a41_0x4a67d7(a41_0x4d7a9c,{'children':[a41_0x5e2cd4(Text,{'children':'\x20|\x20应用AppCode:\x20'}),a41_0x5e2cd4(Text,{'color':_0x3aa6d8(0x1c6),'children':_0xba93ff['appCode']})]})]}),a41_0x5e2cd4(TaskFinished,{..._0x5d60a2}),a41_0x5e2cd4(TaskFinished,{..._0x459e2b}),a41_0x5e2cd4(TaskFinished,{..._0xdc1691}),a41_0x5e2cd4(Box,{'marginTop':0x1,'marginBottom':0x1,'children':a41_0x5e2cd4(Text,{'color':'green','children':'─'[_0x3aa6d8(0x1bf)](0x3c)})}),a41_0x5e2cd4(Box,{'children':a41_0x5e2cd4(Text,{'color':_0x3aa6d8(0x165),'bold':!![],'children':_0x3aa6d8(0x16b)})}),a41_0x4a67d7(Box,{'marginTop':0x1,'flexDirection':'column','children':[a41_0x4a67d7(Box,{'children':[a41_0x5e2cd4(Text,{'color':_0x3aa6d8(0x1c6),'children':_0x3aa6d8(0x16c)}),a41_0x5e2cd4(Text,{'color':_0x3aa6d8(0x168),'bold':!![],'children':_0xba93ff?.[_0x3aa6d8(0x17a)]})]}),_0xba93ff?.[_0x3aa6d8(0x1a0)]&&a41_0x4a67d7(Box,{'children':[a41_0x5e2cd4(Text,{'color':_0x3aa6d8(0x1c6),'children':_0x3aa6d8(0x19e)}),a41_0x5e2cd4(Text,{'color':_0x3aa6d8(0x168),'bold':!![],'children':_0xba93ff[_0x3aa6d8(0x1a0)]})]}),a41_0x4a67d7(Box,{'children':[a41_0x5e2cd4(Text,{'color':_0x3aa6d8(0x1c6),'children':_0x3aa6d8(0x199)}),_0xba93ff?.[_0x3aa6d8(0x1a2)]?a41_0x5e2cd4(Text,{'color':_0x3aa6d8(0x165),'bold':!![],'children':_0x3aa6d8(0x16a)}):_0xba93ff?.['appCode']?a41_0x5e2cd4(Text,{'color':_0x3aa6d8(0x182),'bold':!![],'children':_0x3aa6d8(0x1c0)}):a41_0x5e2cd4(Text,{'color':_0x3aa6d8(0x176),'bold':!![],'children':'未配置'})]})]}),a41_0x5e2cd4(Box,{'marginTop':0x1,'marginBottom':0x1,'children':a41_0x5e2cd4(Text,{'color':_0x3aa6d8(0x1c6),'bold':!![],'children':_0x3aa6d8(0x188)})}),a41_0x4a67d7(Box,{'marginLeft':0x2,'flexDirection':_0x3aa6d8(0x178),'children':[a41_0x4a67d7(Box,{'children':[a41_0x5e2cd4(Text,{'color':_0x3aa6d8(0x165),'children':_0x3aa6d8(0x17f)}),a41_0x5e2cd4(Text,{'color':_0x3aa6d8(0x168),'children':_0x3aa6d8(0x194)}),a41_0x5e2cd4(Text,{'color':'cyan','bold':!![],'children':_0x3aa6d8(0x1c7)+_0xba93ff?.['projectName']+'\x20&&\x20lovrabet\x20start'})]}),_0xba93ff?.[_0x3aa6d8(0x1a0)]&&!_0xba93ff?.[_0x3aa6d8(0x1a2)]&&a41_0x4a67d7(Box,{'children':[a41_0x5e2cd4(Text,{'color':_0x3aa6d8(0x182),'children':_0x3aa6d8(0x16e)}),a41_0x5e2cd4(Text,{'color':_0x3aa6d8(0x168),'children':_0x3aa6d8(0x193)}),a41_0x5e2cd4(Text,{'color':'cyan','bold':!![],'children':_0x3aa6d8(0x1a6)})]}),!_0xba93ff?.[_0x3aa6d8(0x1a0)]&&a41_0x4a67d7(a41_0x4d7a9c,{'children':[a41_0x4a67d7(Box,{'children':[a41_0x5e2cd4(Text,{'color':_0x3aa6d8(0x176),'children':_0x3aa6d8(0x16e)}),a41_0x5e2cd4(Text,{'color':'white','children':_0x3aa6d8(0x1bd)}),a41_0x5e2cd4(Text,{'color':'cyan','bold':!![],'children':_0x3aa6d8(0x183)})]}),a41_0x4a67d7(Box,{'children':[a41_0x5e2cd4(Text,{'color':_0x3aa6d8(0x176),'children':_0x3aa6d8(0x19b)}),a41_0x5e2cd4(Text,{'color':_0x3aa6d8(0x168),'children':_0x3aa6d8(0x193)}),a41_0x5e2cd4(Text,{'color':_0x3aa6d8(0x1c6),'bold':!![],'children':_0x3aa6d8(0x177)})]})]})]}),a41_0x5e2cd4(Box,{'marginTop':0x1,'children':a41_0x5e2cd4(Text,{'color':_0x3aa6d8(0x165),'children':'─'[_0x3aa6d8(0x1bf)](0x3c)})})]});return null;}function a41_0x5a47(){const _0x40a80f=['项目名称:\x20','existsSync','27441YKYZoW',',\x20description=','5270672KocUCX','stringify','73836EdrGgj','trim','292106IDaaWC','配置AppCode:\x20','W_OK','repeat','需手动拉取','√\x20配置文件已创建,应用AppCode:\x20','readFileSync','utf8','parse','4514592wVFqOI','cyan','cd\x20','length','constants','green','warn','1.0.0','white','description','已自动拉取\x20✓','🎉\x20项目创建成功!','📁\x20项目名称:\x20','670GdFfki','2.\x20','1596tGnZHf','*\x20正在更新\x20package.json\x20的\x20name\x20和\x20description\x20字段','cwd','×\x20项目创建失败:\x20','配置应用AppCode:\x20','7wAOowb','\x20√\x20','gray','lovrabet\x20api\x20pull\x20--appcode\x20[app-code]','column','dirname','projectName','test','×\x20无法在当前目录创建项目,请检查目录权限','API\x20配置拉取成功:\x20','*\x20正在拉取\x20API\x20配置...','1.\x20','1yAwDBE','285NCyznL','yellow','lovrabet\x20config\x20set\x20appcode\x20[app-code]','*\x20配置文件路径:\x20','accessSync','\x20创建配置文件','√\x20package.json\x20已更新:\x20name=','🚀\x20接下来可以:','create','success','*\x20清理失败的项目目录:\x20','rmSync','\x20Generated\x20by\x20lovrabet\x20cli\x20','\x20|\x20应用AppCode:\x20','×\x20项目名不能为空','setLogPath','.lovrabetrc','\x20已存在,请使用其他项目名','拉取API配置:\x20','启动项目:\x20','36634fTgGIr','20qsFGMR','×\x20项目名包含非法字符,不允许使用:\x20<\x20>\x20:\x20\x22\x20|\x20?\x20*\x20及控制字符','41502Szgcpk','📦\x20API配置:\x20','resolve','3.\x20','项目创建失败:\x20','log','🔗\x20应用AppCode:\x20','join','appCode','env','pullApi','\x20配置应用AppCode:\x20','*\x20正在为项目\x20','error','lovrabet\x20api\x20pull','√\x20API\x20配置拉取完成','!\x20API\x20配置拉取失败,可稍后手动执行:\x20lovrabet\x20api\x20pull','×\x20项目目录\x20','name','../..','package.json','更新\x20package.json\x20name\x20和\x20description\x20字段','info','writeFileSync','projectCode','message','API\x20配置拉取失败:\x20','doTask'];a41_0x5a47=function(){return _0x40a80f;};return a41_0x5a47();}
1
+ (function(_0x87510d,_0x1ac1c6){const _0x42eafe=a41_0x2eb0,_0x1ea0fa=_0x87510d();while(!![]){try{const _0xf4b473=-parseInt(_0x42eafe(0x142))/0x1*(-parseInt(_0x42eafe(0x12d))/0x2)+parseInt(_0x42eafe(0x138))/0x3*(-parseInt(_0x42eafe(0x132))/0x4)+parseInt(_0x42eafe(0x14d))/0x5*(-parseInt(_0x42eafe(0x124))/0x6)+-parseInt(_0x42eafe(0x15f))/0x7+parseInt(_0x42eafe(0x175))/0x8+-parseInt(_0x42eafe(0x137))/0x9*(parseInt(_0x42eafe(0x133))/0xa)+-parseInt(_0x42eafe(0x169))/0xb*(-parseInt(_0x42eafe(0x13b))/0xc);if(_0xf4b473===_0x1ac1c6)break;else _0x1ea0fa['push'](_0x1ea0fa['shift']());}catch(_0x354c35){_0x1ea0fa['push'](_0x1ea0fa['shift']());}}}(a41_0x5036,0xe2f05));import{jsx as a41_0x1d9e59,Fragment as a41_0x32a5aa,jsxs as a41_0x1c8b3a}from'react/jsx-runtime';import a41_0x295675 from'node:path';import a41_0x5c289c from'node:fs';import{fileURLToPath}from'node:url';import{Box,Text}from'ink';function a41_0x2eb0(_0x229a75,_0xcc872a){_0x229a75=_0x229a75-0x11c;const _0x503667=a41_0x5036();let _0x2eb0d8=_0x503667[_0x229a75];return _0x2eb0d8;}import{useEffect,useState}from'react';import{EnhancedGuidedCreate}from'./enhanced-guided-create.js';import{pullApiSilent}from'../api/pull-silent.js';import{readConfig}from'../utils/config.js';import{useCopyProjectTemplate}from'./use-copy-project-template.js';function a41_0x5036(){const _0x49a925=['更新\x20package.json\x20name\x20和\x20description\x20字段','cwd','log','length','*\x20正在为项目\x20','../..','清理项目目录失败:\x20','6927224KhCfAL','lovrabet\x20config\x20set\x20appcode\x20[app-code]','toLocaleString','已自动拉取\x20✓','utf8','*\x20正在拉取\x20API\x20配置...','accessSync','启动项目:\x20','green','lovrabet\x20api\x20pull','package.json','1.\x20','未配置','setLogPath','🎉\x20项目创建成功!','拉取API配置:\x20','6ViGOod','message','API\x20配置拉取失败:\x20','项目名称:\x20','🔗\x20应用AppCode:\x20','cyan',',\x20description=','version','\x20配置应用AppCode:\x20','38sLBucq','stringify','\x20|\x20应用AppCode:\x20','yellow','online','4ohIboX','10pZNFdK','*\x20配置文件路径:\x20','.lovrabetrc','constants','1739196CdsFDv','165831yXlWfd','配置应用AppCode失败:\x20','需手动拉取','60opHZSS','更新\x20package.json\x20失败:\x20','trim','gray','×\x20项目创建失败:\x20','dirname','parse','59489FqRGZt','resolve','×\x20项目名包含非法字符,不允许使用:\x20<\x20>\x20:\x20\x22\x20|\x20?\x20*\x20及控制字符','2.\x20','rmSync','env','√\x20API\x20配置拉取完成','projectName','1.0.0','×\x20项目目录\x20','pullApi','7200145hDmFpu','projectCode','white','API\x20配置拉取异常:\x20','description','readFileSync','cd\x20','repeat','create','writeFileSync','test','√\x20配置文件已创建,应用AppCode:\x20','√\x20package.json\x20已更新:\x20name=','×\x20无法在当前目录创建项目,请检查目录权限','info','开始创建项目:\x20','配置应用AppCode:\x20','join','472976pjzRCZ','*\x20清理失败的项目目录:\x20','!\x20API\x20配置拉取异常,项目已创建,可稍后手动执行:\x20lovrabet\x20api\x20pull','existsSync','doTask','appCode','API\x20配置拉取成功:\x20','warn','*\x20正在更新\x20package.json\x20的\x20name\x20和\x20description\x20字段','\x20Generated\x20by\x20lovrabet\x20cli\x20','1516823xSWLIi','\x20√\x20','column','string','error'];a41_0x5036=function(){return _0x49a925;};return a41_0x5036();}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(_0x537d0c){const _0x4e8e91=a41_0x2eb0,[_0x41f8a6,_0x2e8572]=useState(![]),[_0xfad347,_0x13110b]=useState(![]),[_0x11824c,_0x3869ad]=useState(null),_0x17ef51=useCopyProjectTemplate(),_0x3b732b=useInstallDependencies(),_0x4afcae=useFormatCode(),_0x1fb133=async _0xf0e5ae=>{const _0x55072a=a41_0x2eb0;if(!_0xf0e5ae['projectName']||_0xf0e5ae[_0x55072a(0x149)][_0x55072a(0x13d)]()===''){console[_0x55072a(0x16d)]('×\x20项目名不能为空');return;}const _0x55eee6=/[<>:"|?*\x00-\x1f\x7f]/;if(_0x55eee6[_0x55072a(0x157)](_0xf0e5ae[_0x55072a(0x149)])){console[_0x55072a(0x16d)](_0x55072a(0x144));return;}if(_0xf0e5ae[_0x55072a(0x149)][_0x55072a(0x171)]>0x64){console[_0x55072a(0x16d)]('×\x20项目名过长,最多支持\x20100\x20个字符');return;}const _0x160723=a41_0x295675[_0x55072a(0x143)](process[_0x55072a(0x16f)](),_0xf0e5ae[_0x55072a(0x149)]);if(a41_0x5c289c[_0x55072a(0x162)](_0x160723)){console[_0x55072a(0x16d)](_0x55072a(0x14b)+_0xf0e5ae[_0x55072a(0x149)]+'\x20已存在,请使用其他项目名');return;}try{const _0x2ae4e2=a41_0x295675[_0x55072a(0x140)](_0x160723);a41_0x5c289c[_0x55072a(0x17b)](_0x2ae4e2,a41_0x5c289c[_0x55072a(0x136)]['W_OK']);}catch(_0x5a9cea){console[_0x55072a(0x16d)](_0x55072a(0x15a));return;}_0x3869ad(_0xf0e5ae),_0x2e8572(!![]),logger[_0x55072a(0x121)](_0x160723),logger[_0x55072a(0x15b)](_0x55072a(0x155),_0x55072a(0x15c)+_0xf0e5ae[_0x55072a(0x149)],{'projectDir':_0x160723,'appCode':_0xf0e5ae[_0x55072a(0x164)]});try{await _0x17ef51[_0x55072a(0x163)](_0xf0e5ae[_0x55072a(0x149)]),await _0xc1646f(_0xf0e5ae[_0x55072a(0x149)]),await _0x3b732b[_0x55072a(0x163)](_0xf0e5ae[_0x55072a(0x149)]),await _0x4afcae[_0x55072a(0x163)](_0xf0e5ae['projectName']),await _0x124866(_0xf0e5ae[_0x55072a(0x149)],_0xf0e5ae['appCode']||'',_0xf0e5ae[_0x55072a(0x147)]);if(_0xf0e5ae[_0x55072a(0x14c)]&&_0xf0e5ae[_0x55072a(0x164)]){console[_0x55072a(0x170)](_0x55072a(0x17a));try{const _0x514cd4=await pullApiSilent(_0xf0e5ae[_0x55072a(0x164)],undefined,_0x160723,_0xf0e5ae[_0x55072a(0x147)]);_0x514cd4?(console['log'](_0x55072a(0x148)),logger[_0x55072a(0x15b)](_0x55072a(0x155),_0x55072a(0x165)+_0xf0e5ae[_0x55072a(0x164)],{'projectDir':_0x160723,'appCode':_0xf0e5ae[_0x55072a(0x164)],'env':_0xf0e5ae[_0x55072a(0x147)]})):(console[_0x55072a(0x170)]('!\x20API\x20配置拉取失败,可稍后手动执行:\x20lovrabet\x20api\x20pull'),logger[_0x55072a(0x166)](_0x55072a(0x155),_0x55072a(0x126)+_0xf0e5ae[_0x55072a(0x164)],{'projectDir':_0x160723,'appCode':_0xf0e5ae[_0x55072a(0x164)],'env':_0xf0e5ae[_0x55072a(0x147)]}));}catch(_0x2ed9e6){console[_0x55072a(0x170)](_0x55072a(0x161)),logger[_0x55072a(0x166)](_0x55072a(0x155),_0x55072a(0x150)+_0xf0e5ae['appCode'],{'projectDir':_0x160723,'appCode':_0xf0e5ae[_0x55072a(0x164)],'env':_0xf0e5ae['env'],'error':_0x2ed9e6 instanceof Error?_0x2ed9e6[_0x55072a(0x125)]:String(_0x2ed9e6)});}}logger['success'](_0x55072a(0x155),'项目创建完成:\x20'+_0xf0e5ae[_0x55072a(0x149)]),_0x13110b(!![]),_0x2e8572(![]);}catch(_0x18aa3b){logger[_0x55072a(0x16d)](_0x55072a(0x155),'项目创建失败:\x20'+_0xf0e5ae[_0x55072a(0x149)],{'error':_0x18aa3b instanceof Error?_0x18aa3b[_0x55072a(0x125)]:String(_0x18aa3b)});try{a41_0x5c289c[_0x55072a(0x162)](_0x160723)&&(console[_0x55072a(0x170)](_0x55072a(0x160)+_0x160723),a41_0x5c289c[_0x55072a(0x146)](_0x160723,{'recursive':!![],'force':!![]}));}catch(_0x1cf5fc){logger['warn'](_0x55072a(0x155),_0x55072a(0x174)+_0x160723,{'error':_0x1cf5fc instanceof Error?_0x1cf5fc['message']:String(_0x1cf5fc)});}_0x2e8572(![]),console[_0x55072a(0x16d)](_0x55072a(0x13f)+(_0x18aa3b instanceof Error?_0x18aa3b[_0x55072a(0x125)]:String(_0x18aa3b)));}},_0x5953cc=async _0x22871f=>{await _0x1fb133({'projectName':_0x22871f,'env':_0x537d0c['env']});},_0xc1646f=async _0x208962=>{const _0x22d221=a41_0x2eb0,_0x26b8a6=a41_0x295675[_0x22d221(0x143)](process[_0x22d221(0x16f)](),_0x208962),_0x281d4d=a41_0x295675['join'](_0x26b8a6,_0x22d221(0x11e));try{console[_0x22d221(0x170)](_0x22d221(0x167));const _0x1261b0=fileURLToPath(import.meta.url),_0x498519=a41_0x295675[_0x22d221(0x143)](a41_0x295675[_0x22d221(0x140)](_0x1261b0),_0x22d221(0x173)),_0x5e7d8e=a41_0x295675[_0x22d221(0x15e)](_0x498519,_0x22d221(0x11e));let _0xed9f67=_0x22d221(0x14a);try{const _0x232ebc=JSON[_0x22d221(0x141)](a41_0x5c289c[_0x22d221(0x152)](_0x5e7d8e,_0x22d221(0x179)));_0xed9f67=_0x232ebc[_0x22d221(0x12b)]||'1.0.0';}catch(_0x6b6e54){}const _0x2385cb=a41_0x5c289c[_0x22d221(0x152)](_0x281d4d,'utf8'),_0x5a7df8=JSON['parse'](_0x2385cb);_0x5a7df8['name']=_0x208962,_0x5a7df8[_0x22d221(0x151)]=_0x208962+_0x22d221(0x168)+_0xed9f67,a41_0x5c289c[_0x22d221(0x156)](_0x281d4d,JSON[_0x22d221(0x12e)](_0x5a7df8,null,0x2)+'\x0a',_0x22d221(0x179)),console[_0x22d221(0x170)](_0x22d221(0x159)+_0x208962+_0x22d221(0x12a)+_0x5a7df8[_0x22d221(0x151)]),logger[_0x22d221(0x15b)](_0x22d221(0x155),_0x22d221(0x16e),{'projectName':_0x208962,'description':_0x5a7df8['description'],'cliVersion':_0xed9f67,'packageJsonPath':'package.json'});}catch(_0x143a41){logger[_0x22d221(0x16d)](_0x22d221(0x155),_0x22d221(0x13c)+_0x208962,{'projectName':_0x208962,'error':_0x143a41 instanceof Error?_0x143a41[_0x22d221(0x125)]:String(_0x143a41)});throw _0x143a41;}},_0x124866=async(_0x3073fd,_0x2a1f2a,_0x28baf8)=>{const _0x1446c8=a41_0x2eb0,_0x412ed3=a41_0x295675['resolve'](process[_0x1446c8(0x16f)](),_0x3073fd),_0x5f0dc4=a41_0x295675[_0x1446c8(0x15e)](_0x412ed3,_0x1446c8(0x135));try{_0x2a1f2a?console['log']('*\x20正在为项目\x20'+_0x3073fd+_0x1446c8(0x12c)+_0x2a1f2a):console[_0x1446c8(0x170)](_0x1446c8(0x172)+_0x3073fd+'\x20创建配置文件');console[_0x1446c8(0x170)](_0x1446c8(0x134)+_0x5f0dc4);const _0x389076=fileURLToPath(import.meta.url),_0x4217f9=a41_0x295675[_0x1446c8(0x143)](a41_0x295675[_0x1446c8(0x140)](_0x389076),'../..'),_0x3729c7=a41_0x295675[_0x1446c8(0x15e)](_0x4217f9,_0x1446c8(0x11e));let _0xff18f9='1.0.0';try{const _0xb3e394=JSON[_0x1446c8(0x141)](a41_0x5c289c[_0x1446c8(0x152)](_0x3729c7,'utf8'));_0xff18f9=_0xb3e394[_0x1446c8(0x12b)]||_0x1446c8(0x14a);}catch(_0x346dad){}const _0x9a0916=readConfig(),_0x3f9426=typeof _0x9a0916[_0x1446c8(0x147)]===_0x1446c8(0x16c)?_0x9a0916[_0x1446c8(0x147)]:undefined,{app:_0x255cdd,appcode:_0x196dd0,..._0xed39d3}=_0x9a0916,_0x30dc45={..._0xed39d3,'appcode':_0x2a1f2a||'','env':_0x28baf8||_0x3f9426||_0x1446c8(0x131),'createdAt':new Date()[_0x1446c8(0x177)](),'version':_0xff18f9};a41_0x5c289c[_0x1446c8(0x156)](_0x5f0dc4,JSON[_0x1446c8(0x12e)](_0x30dc45,null,0x2),_0x1446c8(0x179)),_0x2a1f2a?console[_0x1446c8(0x170)](_0x1446c8(0x158)+_0x2a1f2a):console[_0x1446c8(0x170)]('√\x20配置文件已创建,可稍后使用\x20\x27lovrabet\x20config\x20set\x20appcode\x20<app-code>\x27\x20配置'),logger[_0x1446c8(0x15b)](_0x1446c8(0x155),_0x1446c8(0x15d)+_0x2a1f2a,{'projectName':_0x3073fd,'configFile':_0x1446c8(0x135)});}catch(_0x5e8406){logger[_0x1446c8(0x16d)]('create',_0x1446c8(0x139)+_0x2a1f2a,{'projectName':_0x3073fd,'error':_0x5e8406 instanceof Error?_0x5e8406[_0x1446c8(0x125)]:String(_0x5e8406)});}};useEffect(()=>{const _0x3d120b=a41_0x2eb0;_0x537d0c[_0x3d120b(0x14e)]&&_0x5953cc(_0x537d0c[_0x3d120b(0x14e)]);},[_0x537d0c[_0x4e8e91(0x14e)]]);if(!_0x41f8a6&&!_0xfad347&&!_0x537d0c[_0x4e8e91(0x14e)])return a41_0x1d9e59(EnhancedGuidedCreate,{'onCreate':_0x1fb133,'env':_0x537d0c['env']});if(_0x41f8a6)return a41_0x1c8b3a(a41_0x32a5aa,{'children':[a41_0x1c8b3a(Box,{'marginTop':0x1,'children':[a41_0x1d9e59(Box,{'width':'1'}),a41_0x1d9e59(Text,{'color':_0x4e8e91(0x11c),'children':_0x4e8e91(0x16a)}),a41_0x1d9e59(Text,{'children':_0x4e8e91(0x127)}),a41_0x1d9e59(Text,{'color':'green','children':_0x11824c?.['projectName']}),_0x11824c?.[_0x4e8e91(0x164)]&&a41_0x1c8b3a(a41_0x32a5aa,{'children':[a41_0x1d9e59(Text,{'children':'\x20|\x20应用AppCode:\x20'}),a41_0x1d9e59(Text,{'color':_0x4e8e91(0x129),'children':_0x11824c[_0x4e8e91(0x164)]})]})]}),a41_0x1d9e59(TaskRunning,{..._0x17ef51}),a41_0x1d9e59(TaskRunning,{..._0x3b732b}),a41_0x1d9e59(TaskRunning,{..._0x4afcae})]});if(_0xfad347)return a41_0x1c8b3a(a41_0x32a5aa,{'children':[a41_0x1c8b3a(Box,{'marginTop':0x1,'children':[a41_0x1d9e59(Box,{'width':'1'}),a41_0x1d9e59(Text,{'color':_0x4e8e91(0x11c),'children':_0x4e8e91(0x16a)}),a41_0x1d9e59(Text,{'children':_0x4e8e91(0x127)}),a41_0x1d9e59(Text,{'color':_0x4e8e91(0x11c),'children':_0x11824c?.[_0x4e8e91(0x149)]}),_0x11824c?.[_0x4e8e91(0x164)]&&a41_0x1c8b3a(a41_0x32a5aa,{'children':[a41_0x1d9e59(Text,{'children':_0x4e8e91(0x12f)}),a41_0x1d9e59(Text,{'color':_0x4e8e91(0x129),'children':_0x11824c[_0x4e8e91(0x164)]})]})]}),a41_0x1d9e59(TaskFinished,{..._0x17ef51}),a41_0x1d9e59(TaskFinished,{..._0x3b732b}),a41_0x1d9e59(TaskFinished,{..._0x4afcae}),a41_0x1d9e59(Box,{'marginTop':0x1,'marginBottom':0x1,'children':a41_0x1d9e59(Text,{'color':'green','children':'─'['repeat'](0x3c)})}),a41_0x1d9e59(Box,{'children':a41_0x1d9e59(Text,{'color':_0x4e8e91(0x11c),'bold':!![],'children':_0x4e8e91(0x122)})}),a41_0x1c8b3a(Box,{'marginTop':0x1,'flexDirection':_0x4e8e91(0x16b),'children':[a41_0x1c8b3a(Box,{'children':[a41_0x1d9e59(Text,{'color':'cyan','children':'📁\x20项目名称:\x20'}),a41_0x1d9e59(Text,{'color':_0x4e8e91(0x14f),'bold':!![],'children':_0x11824c?.[_0x4e8e91(0x149)]})]}),_0x11824c?.[_0x4e8e91(0x164)]&&a41_0x1c8b3a(Box,{'children':[a41_0x1d9e59(Text,{'color':_0x4e8e91(0x129),'children':_0x4e8e91(0x128)}),a41_0x1d9e59(Text,{'color':_0x4e8e91(0x14f),'bold':!![],'children':_0x11824c[_0x4e8e91(0x164)]})]}),a41_0x1c8b3a(Box,{'children':[a41_0x1d9e59(Text,{'color':_0x4e8e91(0x129),'children':'📦\x20API配置:\x20'}),_0x11824c?.[_0x4e8e91(0x14c)]?a41_0x1d9e59(Text,{'color':_0x4e8e91(0x11c),'bold':!![],'children':_0x4e8e91(0x178)}):_0x11824c?.[_0x4e8e91(0x164)]?a41_0x1d9e59(Text,{'color':_0x4e8e91(0x130),'bold':!![],'children':_0x4e8e91(0x13a)}):a41_0x1d9e59(Text,{'color':_0x4e8e91(0x13e),'bold':!![],'children':_0x4e8e91(0x120)})]})]}),a41_0x1d9e59(Box,{'marginTop':0x1,'marginBottom':0x1,'children':a41_0x1d9e59(Text,{'color':_0x4e8e91(0x129),'bold':!![],'children':'🚀\x20接下来可以:'})}),a41_0x1c8b3a(Box,{'marginLeft':0x2,'flexDirection':_0x4e8e91(0x16b),'children':[a41_0x1c8b3a(Box,{'children':[a41_0x1d9e59(Text,{'color':_0x4e8e91(0x11c),'children':_0x4e8e91(0x11f)}),a41_0x1d9e59(Text,{'color':_0x4e8e91(0x14f),'children':_0x4e8e91(0x17c)}),a41_0x1d9e59(Text,{'color':_0x4e8e91(0x129),'bold':!![],'children':_0x4e8e91(0x153)+_0x11824c?.[_0x4e8e91(0x149)]+'\x20&&\x20lovrabet\x20start'})]}),_0x11824c?.[_0x4e8e91(0x164)]&&!_0x11824c?.['pullApi']&&a41_0x1c8b3a(Box,{'children':[a41_0x1d9e59(Text,{'color':_0x4e8e91(0x130),'children':_0x4e8e91(0x145)}),a41_0x1d9e59(Text,{'color':_0x4e8e91(0x14f),'children':_0x4e8e91(0x123)}),a41_0x1d9e59(Text,{'color':_0x4e8e91(0x129),'bold':!![],'children':_0x4e8e91(0x11d)})]}),!_0x11824c?.[_0x4e8e91(0x164)]&&a41_0x1c8b3a(a41_0x32a5aa,{'children':[a41_0x1c8b3a(Box,{'children':[a41_0x1d9e59(Text,{'color':_0x4e8e91(0x13e),'children':_0x4e8e91(0x145)}),a41_0x1d9e59(Text,{'color':_0x4e8e91(0x14f),'children':'配置AppCode:\x20'}),a41_0x1d9e59(Text,{'color':_0x4e8e91(0x129),'bold':!![],'children':_0x4e8e91(0x176)})]}),a41_0x1c8b3a(Box,{'children':[a41_0x1d9e59(Text,{'color':'gray','children':'3.\x20'}),a41_0x1d9e59(Text,{'color':_0x4e8e91(0x14f),'children':_0x4e8e91(0x123)}),a41_0x1d9e59(Text,{'color':_0x4e8e91(0x129),'bold':!![],'children':'lovrabet\x20api\x20pull\x20--appcode\x20[app-code]'})]})]})]}),a41_0x1d9e59(Box,{'marginTop':0x1,'children':a41_0x1d9e59(Text,{'color':_0x4e8e91(0x11c),'children':'─'[_0x4e8e91(0x154)](0x3c)})})]});return null;}
@@ -1 +1 @@
1
- function a42_0x319d(){var _0x45da73=['30678PqESgr','4170201RoYxtR','40hTumuJ','3523212kyIvnt','16VZMnmc','\x20√\x20','1045517XHJLkF','4025241dVTnmt','taskName','green','3260lsYrZS','13717485VmUQzT'];a42_0x319d=function(){return _0x45da73;};return a42_0x319d();}function a42_0x5250(_0x462c94,_0x5618eb){_0x462c94=_0x462c94-0x87;var _0x319d37=a42_0x319d();var _0x525023=_0x319d37[_0x462c94];return _0x525023;}(function(_0x4ca48f,_0xecb859){var _0x10cdbf=a42_0x5250,_0x2681b0=_0x4ca48f();while(!![]){try{var _0x3e17b6=-parseInt(_0x10cdbf(0x8c))/0x1+parseInt(_0x10cdbf(0x92))/0x2+-parseInt(_0x10cdbf(0x8d))/0x3+parseInt(_0x10cdbf(0x88))/0x4*(parseInt(_0x10cdbf(0x90))/0x5)+-parseInt(_0x10cdbf(0x89))/0x6+parseInt(_0x10cdbf(0x87))/0x7+-parseInt(_0x10cdbf(0x8a))/0x8*(-parseInt(_0x10cdbf(0x91))/0x9);if(_0x3e17b6===_0xecb859)break;else _0x2681b0['push'](_0x2681b0['shift']());}catch(_0xed7177){_0x2681b0['push'](_0x2681b0['shift']());}}}(a42_0x319d,0xa8d0a));import{jsx as a42_0x57c67f,jsxs as a42_0x216e9a}from'react/jsx-runtime';import{Box,Text}from'ink';import{TaskTime}from'./task-time.js';export function TaskFinished(_0x56c3fd){var _0x153e92=a42_0x5250;return a42_0x216e9a(Box,{'children':[a42_0x57c67f(Box,{'width':'1'}),a42_0x57c67f(Text,{'color':_0x153e92(0x8f),'children':_0x153e92(0x8b)}),a42_0x57c67f(Text,{'children':_0x56c3fd[_0x153e92(0x8e)]}),a42_0x57c67f(TaskTime,{'elapsed':_0x56c3fd['elapsed']})]});}
1
+ (function(_0x115d8f,_0x53b049){var _0x210fc4=a42_0x5413,_0x122c0c=_0x115d8f();while(!![]){try{var _0x538eb6=parseInt(_0x210fc4(0x193))/0x1*(parseInt(_0x210fc4(0x18e))/0x2)+parseInt(_0x210fc4(0x189))/0x3+parseInt(_0x210fc4(0x18b))/0x4*(parseInt(_0x210fc4(0x195))/0x5)+-parseInt(_0x210fc4(0x18f))/0x6*(-parseInt(_0x210fc4(0x18c))/0x7)+-parseInt(_0x210fc4(0x18a))/0x8+-parseInt(_0x210fc4(0x194))/0x9*(-parseInt(_0x210fc4(0x191))/0xa)+-parseInt(_0x210fc4(0x18d))/0xb;if(_0x538eb6===_0x53b049)break;else _0x122c0c['push'](_0x122c0c['shift']());}catch(_0xc58bc2){_0x122c0c['push'](_0x122c0c['shift']());}}}(a42_0x23f7,0x83579));import{jsx as a42_0x459593,jsxs as a42_0x3768db}from'react/jsx-runtime';import{Box,Text}from'ink';function a42_0x5413(_0x398537,_0x57ed4c){_0x398537=_0x398537-0x189;var _0x23f703=a42_0x23f7();var _0x5413a3=_0x23f703[_0x398537];return _0x5413a3;}function a42_0x23f7(){var _0x4d397a=['green','240220ckHLSr','1062bsolRK','7675JmAVZp','1703541lubgJq','1711920KtVgWA','716ZTIYLr','35VdFaSJ','18744616vfOYXM','8UatdXP','447162vupMNM','elapsed','23720ylyMVU'];a42_0x23f7=function(){return _0x4d397a;};return a42_0x23f7();}import{TaskTime}from'./task-time.js';export function TaskFinished(_0x4836f4){var _0x29771d=a42_0x5413;return a42_0x3768db(Box,{'children':[a42_0x459593(Box,{'width':'1'}),a42_0x459593(Text,{'color':_0x29771d(0x192),'children':'\x20√\x20'}),a42_0x459593(Text,{'children':_0x4836f4['taskName']}),a42_0x459593(TaskTime,{'elapsed':_0x4836f4[_0x29771d(0x190)]})]});}
@@ -1 +1 @@
1
- (function(_0x4f0ad6,_0x319dcf){var _0x383d1d=a43_0x28c3,_0x2fa4b9=_0x4f0ad6();while(!![]){try{var _0x11ffd1=parseInt(_0x383d1d(0xf1))/0x1+-parseInt(_0x383d1d(0xf3))/0x2+parseInt(_0x383d1d(0xec))/0x3+parseInt(_0x383d1d(0xeb))/0x4*(-parseInt(_0x383d1d(0xf0))/0x5)+-parseInt(_0x383d1d(0xf7))/0x6*(-parseInt(_0x383d1d(0xf6))/0x7)+parseInt(_0x383d1d(0xef))/0x8+-parseInt(_0x383d1d(0xf5))/0x9*(parseInt(_0x383d1d(0xf2))/0xa);if(_0x11ffd1===_0x319dcf)break;else _0x2fa4b9['push'](_0x2fa4b9['shift']());}catch(_0x38e52f){_0x2fa4b9['push'](_0x2fa4b9['shift']());}}}(a43_0x4cb1,0xbc147));function a43_0x28c3(_0x5a88cb,_0x31c5d4){_0x5a88cb=_0x5a88cb-0xe9;var _0x4cb138=a43_0x4cb1();var _0x28c3e1=_0x4cb138[_0x5a88cb];return _0x28c3e1;}function a43_0x4cb1(){var _0x1df463=['35sMPQZm','1414541KvOAgh','350FuIKNy','453638JVmWKx','green','439047jTayAr','311815ZCiacf','30YIMpXs','dots','loading','593524QLKDQR','4030851iwumRe','finished','\x20√\x20','6099064wDARhG'];a43_0x4cb1=function(){return _0x1df463;};return a43_0x4cb1();}import{jsx as a43_0x5a4951,jsxs as a43_0x3eea96}from'react/jsx-runtime';import{Text}from'ink';import a43_0x447cd6 from'ink-spinner';export function TaskLoading(_0x3e4145){var _0x2e25bc=a43_0x28c3;if(_0x3e4145[_0x2e25bc(0xed)])return a43_0x5a4951(Text,{'color':'green','children':_0x2e25bc(0xee)});if(_0x3e4145[_0x2e25bc(0xea)])return a43_0x3eea96(Text,{'color':_0x2e25bc(0xf4),'children':['\x20',a43_0x5a4951(a43_0x447cd6,{'type':_0x2e25bc(0xe9)}),'\x20']});return a43_0x5a4951(Text,{'children':'\x20\x20\x20'});}
1
+ (function(_0x25e37c,_0x2fd928){var _0xf800eb=a43_0xd5de,_0x2661a3=_0x25e37c();while(!![]){try{var _0x3abb09=-parseInt(_0xf800eb(0x77))/0x1+-parseInt(_0xf800eb(0x78))/0x2+parseInt(_0xf800eb(0x7e))/0x3+-parseInt(_0xf800eb(0x79))/0x4+parseInt(_0xf800eb(0x7b))/0x5+-parseInt(_0xf800eb(0x75))/0x6+parseInt(_0xf800eb(0x73))/0x7;if(_0x3abb09===_0x2fd928)break;else _0x2661a3['push'](_0x2661a3['shift']());}catch(_0x4e0082){_0x2661a3['push'](_0x2661a3['shift']());}}}(a43_0x2c2c,0x1dcb7));function a43_0x2c2c(){var _0x4205d1=['2051140znrKcb','finished','715794TLFsNs','\x20\x20\x20','98538WGyQuD','263882lQGchF','80036zSNppA','dots','334860IoAToR','green','loading','395502xJdbEl'];a43_0x2c2c=function(){return _0x4205d1;};return a43_0x2c2c();}import{jsx as a43_0x3ef0d8,jsxs as a43_0x515587}from'react/jsx-runtime';import{Text}from'ink';function a43_0xd5de(_0x15ef8b,_0x8a3fee){_0x15ef8b=_0x15ef8b-0x73;var _0x2c2c93=a43_0x2c2c();var _0xd5de1e=_0x2c2c93[_0x15ef8b];return _0xd5de1e;}import a43_0x310142 from'ink-spinner';export function TaskLoading(_0x1cab5a){var _0x5af9d9=a43_0xd5de;if(_0x1cab5a[_0x5af9d9(0x74)])return a43_0x3ef0d8(Text,{'color':_0x5af9d9(0x7c),'children':'\x20√\x20'});if(_0x1cab5a[_0x5af9d9(0x7d)])return a43_0x515587(Text,{'color':'green','children':['\x20',a43_0x3ef0d8(a43_0x310142,{'type':_0x5af9d9(0x7a)}),'\x20']});return a43_0x3ef0d8(Text,{'children':_0x5af9d9(0x76)});}
@@ -1 +1 @@
1
- (function(_0x10136f,_0x3fec65){var _0x296a7d=a44_0xbcf2,_0x25aea4=_0x10136f();while(!![]){try{var _0x5300d8=parseInt(_0x296a7d(0x19b))/0x1*(parseInt(_0x296a7d(0x19d))/0x2)+parseInt(_0x296a7d(0x19c))/0x3*(-parseInt(_0x296a7d(0x196))/0x4)+parseInt(_0x296a7d(0x19f))/0x5+-parseInt(_0x296a7d(0x194))/0x6+parseInt(_0x296a7d(0x199))/0x7*(parseInt(_0x296a7d(0x198))/0x8)+-parseInt(_0x296a7d(0x195))/0x9*(parseInt(_0x296a7d(0x19e))/0xa)+-parseInt(_0x296a7d(0x19a))/0xb*(-parseInt(_0x296a7d(0x1a0))/0xc);if(_0x5300d8===_0x3fec65)break;else _0x25aea4['push'](_0x25aea4['shift']());}catch(_0x1545e6){_0x25aea4['push'](_0x25aea4['shift']());}}}(a44_0x20fb,0x8f44d));import{jsx as a44_0x40a3f7,jsxs as a44_0xc0c5d4}from'react/jsx-runtime';import{Box,Text}from'ink';function a44_0xbcf2(_0x35181c,_0x35898a){_0x35181c=_0x35181c-0x194;var _0x20fb2b=a44_0x20fb();var _0xbcf28f=_0x20fb2b[_0x35181c];return _0xbcf28f;}import{TaskLoading}from'./task-loading.js';import{TaskTime}from'./task-time.js';export function TaskRunning(_0x2f5cb4){var _0x20d904=a44_0xbcf2;return a44_0xc0c5d4(Box,{'children':[a44_0x40a3f7(Box,{'width':'1'}),a44_0x40a3f7(TaskLoading,{..._0x2f5cb4}),a44_0x40a3f7(Text,{'children':_0x2f5cb4['taskName']}),a44_0x40a3f7(TaskTime,{'elapsed':_0x2f5cb4[_0x20d904(0x197)]})]});}function a44_0x20fb(){var _0x20f5c7=['6zPwpwQ','2802000WbpXxz','654130RxWRtq','5187744JRWFaD','72078WyujdD','27PujYOg','4GNmplM','elapsed','64wFXNEl','29239ZDJkjd','44gGyLXn','230477lFfsha','3436437zEFtEW'];a44_0x20fb=function(){return _0x20f5c7;};return a44_0x20fb();}
1
+ (function(_0x41eb70,_0x35e5ba){var _0x3c74fe=a44_0x8a66,_0x5bf760=_0x41eb70();while(!![]){try{var _0x321e83=parseInt(_0x3c74fe(0xa7))/0x1*(parseInt(_0x3c74fe(0xa5))/0x2)+parseInt(_0x3c74fe(0xaf))/0x3*(-parseInt(_0x3c74fe(0xb0))/0x4)+-parseInt(_0x3c74fe(0xad))/0x5+parseInt(_0x3c74fe(0xae))/0x6*(parseInt(_0x3c74fe(0xa8))/0x7)+parseInt(_0x3c74fe(0xa9))/0x8+parseInt(_0x3c74fe(0xa4))/0x9*(parseInt(_0x3c74fe(0xac))/0xa)+-parseInt(_0x3c74fe(0xa6))/0xb;if(_0x321e83===_0x35e5ba)break;else _0x5bf760['push'](_0x5bf760['shift']());}catch(_0x135caa){_0x5bf760['push'](_0x5bf760['shift']());}}}(a44_0x5505,0x4c017));import{jsx as a44_0x400b30,jsxs as a44_0x2bf371}from'react/jsx-runtime';import{Box,Text}from'ink';function a44_0x8a66(_0x28b928,_0x483dd0){_0x28b928=_0x28b928-0xa4;var _0x550504=a44_0x5505();var _0x8a6665=_0x550504[_0x28b928];return _0x8a6665;}import{TaskLoading}from'./task-loading.js';import{TaskTime}from'./task-time.js';export function TaskRunning(_0x10f825){var _0x5315a3=a44_0x8a66;return a44_0x2bf371(Box,{'children':[a44_0x400b30(Box,{'width':'1'}),a44_0x400b30(TaskLoading,{..._0x10f825}),a44_0x400b30(Text,{'children':_0x10f825[_0x5315a3(0xab)]}),a44_0x400b30(TaskTime,{'elapsed':_0x10f825[_0x5315a3(0xaa)]})]});}function a44_0x5505(){var _0x19d159=['519740KJYbYc','2772375SmpNag','1062QvPpzU','33oRrRbf','126876OckgnD','90xTaPzc','360214oDhkkI','5510186vyQTgP','3qCIKVU','13601UPmRbf','2493256fyiceK','elapsed','taskName'];a44_0x5505=function(){return _0x19d159;};return a44_0x5505();}
@@ -1 +1 @@
1
- function a45_0x20ee(){var _0x3fe5e1=['gray','4nQwwVz','967571DInjAb','605850wWaGzg','12lPnwTU','482212KBWBFU','27fVWbDk','48DMnjkZ','1217704oNOdEq','321279KehOBz','588970kNlntq','8MjvuoL','120705vXzSOZ','elapsed'];a45_0x20ee=function(){return _0x3fe5e1;};return a45_0x20ee();}(function(_0x5ed3d0,_0x3d102f){var _0x2599a6=a45_0x3382,_0x54ab4e=_0x5ed3d0();while(!![]){try{var _0x51109f=parseInt(_0x2599a6(0xf3))/0x1+-parseInt(_0x2599a6(0xeb))/0x2*(parseInt(_0x2599a6(0xec))/0x3)+-parseInt(_0x2599a6(0xef))/0x4*(parseInt(_0x2599a6(0xf1))/0x5)+-parseInt(_0x2599a6(0xf5))/0x6*(parseInt(_0x2599a6(0xf7))/0x7)+parseInt(_0x2599a6(0xf6))/0x8*(parseInt(_0x2599a6(0xf4))/0x9)+parseInt(_0x2599a6(0xf8))/0xa+parseInt(_0x2599a6(0xf0))/0xb*(-parseInt(_0x2599a6(0xf2))/0xc);if(_0x51109f===_0x3d102f)break;else _0x54ab4e['push'](_0x54ab4e['shift']());}catch(_0x216612){_0x54ab4e['push'](_0x54ab4e['shift']());}}}(a45_0x20ee,0x3f995));function a45_0x3382(_0x2bade9,_0x50c6a1){_0x2bade9=_0x2bade9-0xeb;var _0x20eef6=a45_0x20ee();var _0x3382b2=_0x20eef6[_0x2bade9];return _0x3382b2;}import{jsx as a45_0xe83e61,Fragment as a45_0x45ce29,jsxs as a45_0x575eb0}from'react/jsx-runtime';import{Text}from'ink';export function TaskTime(_0x62025c){var _0x56cbac=a45_0x3382;if(_0x62025c['elapsed'])return a45_0x575eb0(a45_0x45ce29,{'children':[a45_0xe83e61(Text,{'color':_0x56cbac(0xee),'children':'\x20['}),a45_0xe83e61(Text,{'color':_0x56cbac(0xee),'bold':!![],'children':_0x62025c[_0x56cbac(0xed)]}),a45_0xe83e61(Text,{'color':'gray','children':']'})]});return null;}
1
+ (function(_0x59fe26,_0x40b199){var _0x3af824=a45_0x9eb0,_0x2b9e0f=_0x59fe26();while(!![]){try{var _0x18491d=parseInt(_0x3af824(0xb3))/0x1+parseInt(_0x3af824(0xab))/0x2*(parseInt(_0x3af824(0xb2))/0x3)+-parseInt(_0x3af824(0xad))/0x4*(parseInt(_0x3af824(0xae))/0x5)+-parseInt(_0x3af824(0xa9))/0x6+-parseInt(_0x3af824(0xb4))/0x7*(parseInt(_0x3af824(0xaa))/0x8)+parseInt(_0x3af824(0xb1))/0x9+parseInt(_0x3af824(0xaf))/0xa;if(_0x18491d===_0x40b199)break;else _0x2b9e0f['push'](_0x2b9e0f['shift']());}catch(_0x4ad142){_0x2b9e0f['push'](_0x2b9e0f['shift']());}}}(a45_0x3a5e,0xb1192));import{jsx as a45_0x31bf0b,Fragment as a45_0x51d0e8,jsxs as a45_0x45229a}from'react/jsx-runtime';import{Text}from'ink';function a45_0x3a5e(){var _0x56b2a0=['8432ADwyrK','2044828WtWkzW','elapsed','380qGHCif','55095LybEgu','4741940ZmfEgz','gray','11120868JckupM','3tkPrva','185733BnVhHS','1939SccukN','5123016ARptgm'];a45_0x3a5e=function(){return _0x56b2a0;};return a45_0x3a5e();}function a45_0x9eb0(_0x43bc79,_0x5cb17e){_0x43bc79=_0x43bc79-0xa9;var _0x3a5e43=a45_0x3a5e();var _0x9eb003=_0x3a5e43[_0x43bc79];return _0x9eb003;}export function TaskTime(_0x367512){var _0x48a266=a45_0x9eb0;if(_0x367512[_0x48a266(0xac)])return a45_0x45229a(a45_0x51d0e8,{'children':[a45_0x31bf0b(Text,{'color':_0x48a266(0xb0),'children':'\x20['}),a45_0x31bf0b(Text,{'color':_0x48a266(0xb0),'bold':!![],'children':_0x367512[_0x48a266(0xac)]}),a45_0x31bf0b(Text,{'color':_0x48a266(0xb0),'children':']'})]});return null;}
@@ -1 +1 @@
1
- const a46_0x5ea8a2=a46_0x5ef6;(function(_0xdda252,_0x321d1e){const _0x346d1d=a46_0x5ef6,_0x2ca290=_0xdda252();while(!![]){try{const _0x2381e2=-parseInt(_0x346d1d(0xe7))/0x1+-parseInt(_0x346d1d(0xf5))/0x2*(parseInt(_0x346d1d(0xec))/0x3)+-parseInt(_0x346d1d(0xf3))/0x4*(-parseInt(_0x346d1d(0xea))/0x5)+parseInt(_0x346d1d(0xee))/0x6*(-parseInt(_0x346d1d(0xe6))/0x7)+parseInt(_0x346d1d(0xe4))/0x8*(parseInt(_0x346d1d(0xef))/0x9)+-parseInt(_0x346d1d(0xf8))/0xa+parseInt(_0x346d1d(0xe5))/0xb;if(_0x2381e2===_0x321d1e)break;else _0x2ca290['push'](_0x2ca290['shift']());}catch(_0x48a68e){_0x2ca290['push'](_0x2ca290['shift']());}}}(a46_0x496b,0x21c7a));import a46_0x435017 from'node:path';import{fileURLToPath}from'node:url';import{useCallback,useState}from'react';import{copyDirectory}from'../utils/copy-directory.js';import{formatElapsed}from'./format-elapsed.js';import{logger}from'../utils/logger.js';const __dirname=a46_0x435017[a46_0x5ea8a2(0xf9)](fileURLToPath(import.meta.url)),templateDir=a46_0x435017[a46_0x5ea8a2(0xed)](__dirname,a46_0x5ea8a2(0xf0));function a46_0x5ef6(_0x12d7f4,_0x19c1e7){_0x12d7f4=_0x12d7f4-0xe3;const _0x496bfa=a46_0x496b();let _0x5ef658=_0x496bfa[_0x12d7f4];return _0x5ef658;}export function useCopyProjectTemplate(){const _0x12517b=a46_0x5ea8a2,[_0x1da982,_0x1c10c5]=useState(![]),[_0x198a1b,_0x5a61a1]=useState(![]),[_0x4db61d,_0x318241]=useState(''),_0x79db49=useCallback(async _0x1bc41c=>{const _0x36a505=a46_0x5ef6,_0x1253fc=Date[_0x36a505(0xf6)](),_0x23b04f=a46_0x435017[_0x36a505(0xed)](process['cwd'](),_0x1bc41c);_0x1c10c5(!![]);try{logger[_0x36a505(0xf4)]('copy',_0x36a505(0xe9),{'projectCode':_0x1bc41c,'templateDir':templateDir}),await copyDirectory(templateDir,_0x23b04f);const _0x49e039=Date[_0x36a505(0xf6)]()-_0x1253fc;logger[_0x36a505(0xf1)](_0x36a505(0xe8),_0x36a505(0xeb),_0x49e039,{'projectCode':_0x1bc41c});}catch(_0xc36d1){const _0x3ea7ac=Date['now']()-_0x1253fc;logger[_0x36a505(0xf7)](_0x36a505(0xe8),'项目模板复制失败',{'projectCode':_0x1bc41c,'error':_0xc36d1 instanceof Error?_0xc36d1[_0x36a505(0xf2)]:String(_0xc36d1),'duration':_0x3ea7ac});throw _0xc36d1;}finally{_0x1c10c5(![]),_0x5a61a1(!![]),_0x318241(formatElapsed(_0x1253fc));}},[]);return{'taskName':_0x12517b(0xe3),'finished':_0x198a1b,'loading':_0x1da982,'elapsed':_0x4db61d,'doTask':_0x79db49};}function a46_0x496b(){const _0x565165=['开始复制项目模板','5vKvosj','项目模板复制完成','3zcSLXK','resolve','6BsTVYH','99EIAbjN','../../templates/projects/sub-app-react-demo','success','message','71780UgzVya','info','208556Cmrjyi','now','error','805810rDLaOo','dirname','复制项目文件','140848OQiyBe','2707870wuIUzW','398881UwKNCd','77577lYthsm','copy'];a46_0x496b=function(){return _0x565165;};return a46_0x496b();}
1
+ const a46_0xb100e8=a46_0x45a2;(function(_0x2e1352,_0x5a562f){const _0x38cf61=a46_0x45a2,_0x252c9f=_0x2e1352();while(!![]){try{const _0x4097ea=parseInt(_0x38cf61(0xb1))/0x1*(-parseInt(_0x38cf61(0xb4))/0x2)+-parseInt(_0x38cf61(0xb6))/0x3+parseInt(_0x38cf61(0xc0))/0x4*(-parseInt(_0x38cf61(0xba))/0x5)+parseInt(_0x38cf61(0xb3))/0x6*(-parseInt(_0x38cf61(0xb0))/0x7)+parseInt(_0x38cf61(0xb9))/0x8+-parseInt(_0x38cf61(0xbe))/0x9*(-parseInt(_0x38cf61(0xbf))/0xa)+parseInt(_0x38cf61(0xaf))/0xb*(parseInt(_0x38cf61(0xb2))/0xc);if(_0x4097ea===_0x5a562f)break;else _0x252c9f['push'](_0x252c9f['shift']());}catch(_0x375a41){_0x252c9f['push'](_0x252c9f['shift']());}}}(a46_0x10a2,0x9a6da));import a46_0x1f3e6e from'node:path';import{fileURLToPath}from'node:url';import{useCallback,useState}from'react';import{copyDirectory}from'../utils/copy-directory.js';import{formatElapsed}from'./format-elapsed.js';import{logger}from'../utils/logger.js';function a46_0x45a2(_0x4085d3,_0x12e8b2){_0x4085d3=_0x4085d3-0xae;const _0x10a2c9=a46_0x10a2();let _0x45a252=_0x10a2c9[_0x4085d3];return _0x45a252;}const __dirname=a46_0x1f3e6e['dirname'](fileURLToPath(import.meta.url)),templateDir=a46_0x1f3e6e[a46_0xb100e8(0xbc)](__dirname,a46_0xb100e8(0xbd));function a46_0x10a2(){const _0x16ab18=['472848JtKNAU','30aGCwMK','44786wFrGti','now','2894643mxwUea','info','copy','8040792GlhUFY','4130QKmuKf','cwd','resolve','../../templates/projects/sub-app-react-demo','4329171bvDTWz','10xOjihL','4300vclHfi','项目模板复制完成','error','开始复制项目模板','复制项目文件','781ynbsMl','1545950HePDxS','31HQUQQd'];a46_0x10a2=function(){return _0x16ab18;};return a46_0x10a2();}export function useCopyProjectTemplate(){const _0x716a79=a46_0xb100e8,[_0x4c1339,_0x1e4276]=useState(![]),[_0x2318a7,_0x5e794f]=useState(![]),[_0x268092,_0x5d30b9]=useState(''),_0x22bc5f=useCallback(async _0x1b298b=>{const _0x2bdbfa=a46_0x45a2,_0x2f26b5=Date[_0x2bdbfa(0xb5)](),_0x37037f=a46_0x1f3e6e[_0x2bdbfa(0xbc)](process[_0x2bdbfa(0xbb)](),_0x1b298b);_0x1e4276(!![]);try{logger[_0x2bdbfa(0xb7)](_0x2bdbfa(0xb8),_0x2bdbfa(0xc3),{'projectCode':_0x1b298b,'templateDir':templateDir}),await copyDirectory(templateDir,_0x37037f);const _0x8422c2=Date[_0x2bdbfa(0xb5)]()-_0x2f26b5;logger['success'](_0x2bdbfa(0xb8),_0x2bdbfa(0xc1),_0x8422c2,{'projectCode':_0x1b298b});}catch(_0x43b73e){const _0x103312=Date[_0x2bdbfa(0xb5)]()-_0x2f26b5;logger[_0x2bdbfa(0xc2)](_0x2bdbfa(0xb8),'项目模板复制失败',{'projectCode':_0x1b298b,'error':_0x43b73e instanceof Error?_0x43b73e['message']:String(_0x43b73e),'duration':_0x103312});throw _0x43b73e;}finally{_0x1e4276(![]),_0x5e794f(!![]),_0x5d30b9(formatElapsed(_0x2f26b5));}},[]);return{'taskName':_0x716a79(0xae),'finished':_0x2318a7,'loading':_0x4c1339,'elapsed':_0x268092,'doTask':_0x22bc5f};}
@@ -1 +1 @@
1
- (function(_0xa44078,_0x46e3b3){const _0x59984d=a47_0xc41d,_0x5becce=_0xa44078();while(!![]){try{const _0x51ad99=-parseInt(_0x59984d(0xaf))/0x1+parseInt(_0x59984d(0xa3))/0x2*(-parseInt(_0x59984d(0xa2))/0x3)+parseInt(_0x59984d(0xab))/0x4*(-parseInt(_0x59984d(0xb2))/0x5)+-parseInt(_0x59984d(0xa5))/0x6+-parseInt(_0x59984d(0xa4))/0x7+-parseInt(_0x59984d(0xa7))/0x8+parseInt(_0x59984d(0xb3))/0x9;if(_0x51ad99===_0x46e3b3)break;else _0x5becce['push'](_0x5becce['shift']());}catch(_0x368734){_0x5becce['push'](_0x5becce['shift']());}}}(a47_0x5c90,0x26327));import a47_0x6e8cbc from'node:path';import{useCallback,useState}from'react';function a47_0xc41d(_0x50d299,_0x3d7dcf){_0x50d299=_0x50d299-0xa2;const _0x5c900f=a47_0x5c90();let _0xc41d0e=_0x5c900f[_0x50d299];return _0xc41d0e;}import{execa}from'execa';import{formatElapsed}from'./format-elapsed.js';import{logger}from'../utils/logger.js';export function useFormatCode(){const [_0x5ab880,_0x4909ee]=useState(![]),[_0x1e8c9a,_0x359464]=useState(![]),[_0x1c2b2f,_0x1c83c7]=useState(''),_0x2b7ea8=useCallback(async _0x3593ce=>{const _0x549864=a47_0xc41d,_0x531cf1=Date[_0x549864(0xae)](),_0xf0d0ac=a47_0x6e8cbc[_0x549864(0xa9)](process['cwd'](),_0x3593ce);_0x4909ee(!![]);try{logger[_0x549864(0xb1)]('format',_0x549864(0xaa),{'projectCode':_0x3593ce}),await execa('npx',[_0x549864(0xa6),_0x549864(0xb0),'.'],{'cwd':_0xf0d0ac});const _0xe640c7=Date[_0x549864(0xae)]()-_0x531cf1;logger[_0x549864(0xac)](_0x549864(0xad),_0x549864(0xa8),_0xe640c7,{'projectCode':_0x3593ce});}catch(_0x5df1df){const _0xffe98a=Date[_0x549864(0xae)]()-_0x531cf1;logger[_0x549864(0xb4)](_0x549864(0xad),_0x549864(0xb5),{'projectCode':_0x3593ce,'error':_0x5df1df instanceof Error?_0x5df1df[_0x549864(0xb6)]:String(_0x5df1df),'duration':_0xffe98a});throw _0x5df1df;}finally{_0x4909ee(![]),_0x359464(!![]),_0x1c83c7(formatElapsed(_0x531cf1));}},[]);return{'taskName':'格式化代码','finished':_0x1e8c9a,'loading':_0x5ab880,'elapsed':_0x1c2b2f,'doTask':_0x2b7ea8};}function a47_0x5c90(){const _0x30be69=['message','1842uTemJc','454ecxmMa','1584478ShHwqh','1849836UfUOJD','prettier','2003944GEvcbS','代码格式化完成','resolve','开始格式化代码','508204THgiLZ','success','format','now','174062JUdZLs','--write','info','5luGtMw','12438891EIpean','error','代码格式化失败'];a47_0x5c90=function(){return _0x30be69;};return a47_0x5c90();}
1
+ (function(_0x59ee40,_0x55b4c9){const _0x1f4cbe=a47_0x9aee,_0x2d8720=_0x59ee40();while(!![]){try{const _0x120317=-parseInt(_0x1f4cbe(0x1dc))/0x1+-parseInt(_0x1f4cbe(0x1e2))/0x2*(parseInt(_0x1f4cbe(0x1df))/0x3)+parseInt(_0x1f4cbe(0x1da))/0x4*(parseInt(_0x1f4cbe(0x1db))/0x5)+-parseInt(_0x1f4cbe(0x1d2))/0x6*(-parseInt(_0x1f4cbe(0x1d1))/0x7)+-parseInt(_0x1f4cbe(0x1d4))/0x8+parseInt(_0x1f4cbe(0x1dd))/0x9*(-parseInt(_0x1f4cbe(0x1d3))/0xa)+parseInt(_0x1f4cbe(0x1de))/0xb;if(_0x120317===_0x55b4c9)break;else _0x2d8720['push'](_0x2d8720['shift']());}catch(_0x315eb9){_0x2d8720['push'](_0x2d8720['shift']());}}}(a47_0x2d46,0x613e6));function a47_0x2d46(){const _0x2e50e0=['246nqdGzF','3152810dWpiMR','3468928aMdjar','--write','cwd','now','开始格式化代码','info','1800808vwGEfS','5akpEkC','691151VhfHMa','9mfgrjF','14893296XPGHKX','70383haHTIG','npx','error','58mFzGzS','format','prettier','resolve','代码格式化失败','代码格式化完成','122003UFUAjH'];a47_0x2d46=function(){return _0x2e50e0;};return a47_0x2d46();}import a47_0x4e3826 from'node:path';import{useCallback,useState}from'react';import{execa}from'execa';import{formatElapsed}from'./format-elapsed.js';import{logger}from'../utils/logger.js';function a47_0x9aee(_0x221ac2,_0x53978d){_0x221ac2=_0x221ac2-0x1cc;const _0x2d46c7=a47_0x2d46();let _0x9aeec3=_0x2d46c7[_0x221ac2];return _0x9aeec3;}export function useFormatCode(){const [_0xf3481e,_0xe616bc]=useState(![]),[_0x5191af,_0x14f206]=useState(![]),[_0x29134f,_0x533b49]=useState(''),_0x5b1d53=useCallback(async _0x16e74a=>{const _0x464034=a47_0x9aee,_0x533dce=Date[_0x464034(0x1d7)](),_0x5a8bc3=a47_0x4e3826[_0x464034(0x1ce)](process[_0x464034(0x1d6)](),_0x16e74a);_0xe616bc(!![]);try{logger[_0x464034(0x1d9)](_0x464034(0x1cc),_0x464034(0x1d8),{'projectCode':_0x16e74a}),await execa(_0x464034(0x1e0),[_0x464034(0x1cd),_0x464034(0x1d5),'.'],{'cwd':_0x5a8bc3});const _0x3d6d1b=Date[_0x464034(0x1d7)]()-_0x533dce;logger['success'](_0x464034(0x1cc),_0x464034(0x1d0),_0x3d6d1b,{'projectCode':_0x16e74a});}catch(_0x546a24){const _0x424efd=Date[_0x464034(0x1d7)]()-_0x533dce;logger[_0x464034(0x1e1)](_0x464034(0x1cc),_0x464034(0x1cf),{'projectCode':_0x16e74a,'error':_0x546a24 instanceof Error?_0x546a24['message']:String(_0x546a24),'duration':_0x424efd});throw _0x546a24;}finally{_0xe616bc(![]),_0x14f206(!![]),_0x533b49(formatElapsed(_0x533dce));}},[]);return{'taskName':'格式化代码','finished':_0x5191af,'loading':_0xf3481e,'elapsed':_0x29134f,'doTask':_0x5b1d53};}
@@ -1 +1 @@
1
- (function(_0x3d941e,_0x333f3c){const _0x4ea657=a48_0x1c86,_0x386de8=_0x3d941e();while(!![]){try{const _0x279d78=parseInt(_0x4ea657(0x1ed))/0x1+parseInt(_0x4ea657(0x1e7))/0x2+-parseInt(_0x4ea657(0x1e8))/0x3+parseInt(_0x4ea657(0x1f0))/0x4+parseInt(_0x4ea657(0x1f8))/0x5*(parseInt(_0x4ea657(0x1f5))/0x6)+parseInt(_0x4ea657(0x1ea))/0x7+-parseInt(_0x4ea657(0x1ee))/0x8*(parseInt(_0x4ea657(0x1f1))/0x9);if(_0x279d78===_0x333f3c)break;else _0x386de8['push'](_0x386de8['shift']());}catch(_0x21f9d6){_0x386de8['push'](_0x386de8['shift']());}}}(a48_0x2f92,0x4cac0));function a48_0x2f92(){const _0x4b26a7=['success','https://registry.npmmirror.com','144256XEPxrv','695604DAcqHf','开始安装依赖','2921611ohKhbX','安装依赖','cwd','153538ylLsro','5120144bsgfrj','install','1812104lEwdQm','9JXgvwH','resolve','依赖安装完成','info','78vnAKoO','--registry','now','34565xxdukO'];a48_0x2f92=function(){return _0x4b26a7;};return a48_0x2f92();}import a48_0x5988d3 from'node:path';import{useCallback,useState}from'react';function a48_0x1c86(_0x2e6189,_0x3fab9e){_0x2e6189=_0x2e6189-0x1e6;const _0x2f920d=a48_0x2f92();let _0x1c86a7=_0x2f920d[_0x2e6189];return _0x1c86a7;}import{execa}from'execa';import{formatElapsed}from'./format-elapsed.js';import{logger}from'../utils/logger.js';export function useInstallDependencies(){const _0x38b255=a48_0x1c86,[_0x5849f7,_0x331681]=useState(![]),[_0x4e7460,_0x37bb71]=useState(![]),[_0x422e87,_0x2db282]=useState(''),_0x370fbf=useCallback(async _0x3bcd7b=>{const _0x51e2e2=a48_0x1c86,_0x1a3e33=Date[_0x51e2e2(0x1f7)](),_0x56991e=a48_0x5988d3[_0x51e2e2(0x1f2)](process[_0x51e2e2(0x1ec)](),_0x3bcd7b);_0x331681(!![]),_0x37bb71(![]);const _0x20a4f6=async(_0x560101,_0x3dfe99)=>{await execa(_0x560101,_0x3dfe99,{'cwd':_0x56991e});};try{logger[_0x51e2e2(0x1f4)](_0x51e2e2(0x1ef),_0x51e2e2(0x1e9),{'projectCode':_0x3bcd7b,'registry':'https://registry.npmmirror.com'}),await _0x20a4f6('npm',['install',_0x51e2e2(0x1f6),_0x51e2e2(0x1e6)]);const _0x117fea=Date['now']()-_0x1a3e33;logger[_0x51e2e2(0x1f9)](_0x51e2e2(0x1ef),_0x51e2e2(0x1f3),_0x117fea,{'projectCode':_0x3bcd7b});}catch(_0x4b6551){const _0x33a404=Date['now']()-_0x1a3e33;logger['error'](_0x51e2e2(0x1ef),'依赖安装失败',{'projectCode':_0x3bcd7b,'error':_0x4b6551 instanceof Error?_0x4b6551['message']:String(_0x4b6551),'duration':_0x33a404});throw _0x4b6551;}finally{_0x331681(![]),_0x37bb71(!![]),_0x2db282(formatElapsed(_0x1a3e33));}},[]);return{'taskName':_0x38b255(0x1eb),'finished':_0x4e7460,'loading':_0x5849f7,'elapsed':_0x422e87,'doTask':_0x370fbf};}
1
+ (function(_0x14c44e,_0x48b813){const _0x877424=a48_0xd91a,_0x1b217f=_0x14c44e();while(!![]){try{const _0x96600a=-parseInt(_0x877424(0x1ef))/0x1+parseInt(_0x877424(0x1f3))/0x2*(parseInt(_0x877424(0x1ec))/0x3)+-parseInt(_0x877424(0x1f6))/0x4*(parseInt(_0x877424(0x1e8))/0x5)+-parseInt(_0x877424(0x1ed))/0x6+parseInt(_0x877424(0x1ea))/0x7+parseInt(_0x877424(0x1e9))/0x8*(parseInt(_0x877424(0x1e6))/0x9)+-parseInt(_0x877424(0x1f4))/0xa*(-parseInt(_0x877424(0x1f7))/0xb);if(_0x96600a===_0x48b813)break;else _0x1b217f['push'](_0x1b217f['shift']());}catch(_0x531993){_0x1b217f['push'](_0x1b217f['shift']());}}}(a48_0x5534,0x9fe5e));import a48_0x428d3e 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 _0x21980d=a48_0xd91a,[_0x79cc1,_0x57dec3]=useState(![]),[_0x553b12,_0x598b1b]=useState(![]),[_0x10a28c,_0x2edc23]=useState(''),_0x202f2a=useCallback(async _0x1229bd=>{const _0x4d02a4=a48_0xd91a,_0x3bb906=Date[_0x4d02a4(0x1e5)](),_0x241af5=a48_0x428d3e[_0x4d02a4(0x1eb)](process['cwd'](),_0x1229bd);_0x57dec3(!![]),_0x598b1b(![]);const _0x5b5b33=async(_0xc78dd4,_0x35e5d2)=>{await execa(_0xc78dd4,_0x35e5d2,{'cwd':_0x241af5});};try{logger[_0x4d02a4(0x1f2)](_0x4d02a4(0x1f0),'开始安装依赖',{'projectCode':_0x1229bd,'registry':_0x4d02a4(0x1e7)}),await _0x5b5b33('npm',[_0x4d02a4(0x1f0),_0x4d02a4(0x1f5),'https://registry.npmmirror.com']);const _0xe1e7e1=Date[_0x4d02a4(0x1e5)]()-_0x3bb906;logger['success'](_0x4d02a4(0x1f0),'依赖安装完成',_0xe1e7e1,{'projectCode':_0x1229bd});}catch(_0x111bd6){const _0x3b3daa=Date[_0x4d02a4(0x1e5)]()-_0x3bb906;logger['error']('install',_0x4d02a4(0x1ee),{'projectCode':_0x1229bd,'error':_0x111bd6 instanceof Error?_0x111bd6['message']:String(_0x111bd6),'duration':_0x3b3daa});throw _0x111bd6;}finally{_0x57dec3(![]),_0x598b1b(!![]),_0x2edc23(formatElapsed(_0x3bb906));}},[]);return{'taskName':_0x21980d(0x1f1),'finished':_0x553b12,'loading':_0x79cc1,'elapsed':_0x10a28c,'doTask':_0x202f2a};}function a48_0xd91a(_0x59125a,_0x12d92c){_0x59125a=_0x59125a-0x1e5;const _0x55344c=a48_0x5534();let _0xd91a48=_0x55344c[_0x59125a];return _0xd91a48;}function a48_0x5534(){const _0x458883=['94761ilVZpZ','https://registry.npmmirror.com','1275iUAzbL','272ewoKMH','5154877jyDITp','resolve','3ENWNvC','7221450DDsLzW','依赖安装失败','1227248OLEdqd','install','安装依赖','info','1409502zEInkY','10mEJIQh','--registry','14664veiZjl','24435917hrQIbC','now'];a48_0x5534=function(){return _0x458883;};return a48_0x5534();}
package/lib/help.js CHANGED
@@ -1 +1 @@
1
- function a49_0x33e4(_0x3a8ca4,_0x1ccdbb){_0x3a8ca4=_0x3a8ca4-0x158;var _0x59c860=a49_0x59c8();var _0x33e484=_0x59c860[_0x3a8ca4];return _0x33e484;}(function(_0x5a78c9,_0x1b0a46){var _0x5e97a9=a49_0x33e4,_0x1d545b=_0x5a78c9();while(!![]){try{var _0xe59859=-parseInt(_0x5e97a9(0x162))/0x1+parseInt(_0x5e97a9(0x15e))/0x2*(-parseInt(_0x5e97a9(0x15c))/0x3)+-parseInt(_0x5e97a9(0x161))/0x4+-parseInt(_0x5e97a9(0x15d))/0x5+parseInt(_0x5e97a9(0x15a))/0x6+-parseInt(_0x5e97a9(0x158))/0x7*(-parseInt(_0x5e97a9(0x160))/0x8)+parseInt(_0x5e97a9(0x163))/0x9;if(_0xe59859===_0x1b0a46)break;else _0x1d545b['push'](_0x1d545b['shift']());}catch(_0x4d427c){_0x1d545b['push'](_0x1d545b['shift']());}}}(a49_0x59c8,0xee3d5));import{jsx as a49_0x5948c5,jsxs as a49_0x1989e8}from'react/jsx-runtime';function a49_0x59c8(){var _0x43a681=['lovrabet\x20--help','7590570LNjfps','查看可用命令。','2517702vSvjlK','3163845NYopCd','4FujRUq','green','8PbehHV','5626468scBiuk','1065726uNTIAK','24862257ngLOQA','!\x20请指定一个有效的命令。','12122887Gcvdge'];a49_0x59c8=function(){return _0x43a681;};return a49_0x59c8();}import{Box,Text}from'ink';export function Help(){var _0x2145f4=a49_0x33e4;return a49_0x1989e8(Box,{'flexDirection':'column','marginTop':0x1,'marginBottom':0x1,'children':[a49_0x1989e8(Box,{'children':[a49_0x5948c5(Box,{'width':'1'}),a49_0x5948c5(Text,{'children':_0x2145f4(0x164)})]}),a49_0x1989e8(Box,{'marginTop':0x1,'children':[a49_0x5948c5(Box,{'width':'1'}),a49_0x1989e8(Text,{'children':['\x20\x20','使用']}),a49_0x1989e8(Text,{'bold':!![],'color':_0x2145f4(0x15f),'children':['\x20',_0x2145f4(0x159),'\x20']}),a49_0x5948c5(Text,{'children':_0x2145f4(0x15b)})]})]});}
1
+ (function(_0x585448,_0x4548ed){var _0x2a6271=a49_0x5a83,_0x2de0ab=_0x585448();while(!![]){try{var _0x3a0106=parseInt(_0x2a6271(0x194))/0x1*(-parseInt(_0x2a6271(0x197))/0x2)+-parseInt(_0x2a6271(0x18f))/0x3*(-parseInt(_0x2a6271(0x18e))/0x4)+parseInt(_0x2a6271(0x19a))/0x5*(-parseInt(_0x2a6271(0x18c))/0x6)+parseInt(_0x2a6271(0x18d))/0x7+parseInt(_0x2a6271(0x192))/0x8+parseInt(_0x2a6271(0x195))/0x9*(parseInt(_0x2a6271(0x196))/0xa)+-parseInt(_0x2a6271(0x191))/0xb*(-parseInt(_0x2a6271(0x190))/0xc);if(_0x3a0106===_0x4548ed)break;else _0x2de0ab['push'](_0x2de0ab['shift']());}catch(_0x3852e7){_0x2de0ab['push'](_0x2de0ab['shift']());}}}(a49_0x5426,0x9c958));import{jsx as a49_0x5e1dea,jsxs as a49_0x38f6fa}from'react/jsx-runtime';function a49_0x5426(){var _0x5591f8=['lovrabet\x20--help','6uWiAmg','1497069LZGunc','8PBurYW','1804569SiAoTR','685284rhHCWQ','11BXZIvY','2077016bEQhFm','green','2nKdnVe','4419kzRICb','8350uMckVe','504066AjQqfS','查看可用命令。','column','4990990cOyiTO'];a49_0x5426=function(){return _0x5591f8;};return a49_0x5426();}import{Box,Text}from'ink';function a49_0x5a83(_0x7afe7d,_0x4d7416){_0x7afe7d=_0x7afe7d-0x18b;var _0x542600=a49_0x5426();var _0x5a83b9=_0x542600[_0x7afe7d];return _0x5a83b9;}export function Help(){var _0x468d93=a49_0x5a83;return a49_0x38f6fa(Box,{'flexDirection':_0x468d93(0x199),'marginTop':0x1,'marginBottom':0x1,'children':[a49_0x38f6fa(Box,{'children':[a49_0x5e1dea(Box,{'width':'1'}),a49_0x5e1dea(Text,{'children':'!\x20请指定一个有效的命令。'})]}),a49_0x38f6fa(Box,{'marginTop':0x1,'children':[a49_0x5e1dea(Box,{'width':'1'}),a49_0x38f6fa(Text,{'children':['\x20\x20','使用']}),a49_0x38f6fa(Text,{'bold':!![],'color':_0x468d93(0x193),'children':['\x20',_0x468d93(0x18b),'\x20']}),a49_0x5e1dea(Text,{'children':_0x468d93(0x198)})]})]});}
package/lib/init/main.js CHANGED
@@ -1 +1 @@
1
- (function(_0x279ec1,_0x19e187){const _0x181b5e=a50_0x1cbb,_0x307b63=_0x279ec1();while(!![]){try{const _0x277ebf=-parseInt(_0x181b5e(0xbc))/0x1*(parseInt(_0x181b5e(0xd8))/0x2)+parseInt(_0x181b5e(0xb5))/0x3*(-parseInt(_0x181b5e(0xb3))/0x4)+-parseInt(_0x181b5e(0xb6))/0x5*(parseInt(_0x181b5e(0xb1))/0x6)+-parseInt(_0x181b5e(0xb7))/0x7*(parseInt(_0x181b5e(0xb8))/0x8)+parseInt(_0x181b5e(0xad))/0x9*(-parseInt(_0x181b5e(0xca))/0xa)+parseInt(_0x181b5e(0xdb))/0xb+parseInt(_0x181b5e(0xd9))/0xc;if(_0x277ebf===_0x19e187)break;else _0x307b63['push'](_0x307b63['shift']());}catch(_0x52d868){_0x307b63['push'](_0x307b63['shift']());}}}(a50_0x1e04,0xd7c90));import{jsxs as a50_0x5552b4,jsx as a50_0x361b5c}from'react/jsx-runtime';import{useState,useEffect}from'react';function a50_0x1e04(){const _0x38a60f=['18zXoqSS','version','4wAdqKO','当前目录已存在\x20.lovrabetrc\x20文件','1407459qMpxSr','1952220WpUPak','8337539gECEAk','8mKDqOR','应用代码只能包含字母、数字、-\x20和\x20_','cwd','length','621221bOoWrm','backspace','.lovrabetrc','现在您可以使用\x20lovrabet\x20api\x20doc\x20和\x20lovrabet\x20api\x20pull\x20等命令了','ctrl','trim','../..','init','online','gray','exit','parse','red','return','130nYfCMR','创建配置文件失败','package.json','应用代码长度不能超过\x20100\x20个字符','应用代码用于标识您的项目,只能包含字母、数字、-\x20和\x20_','test','应用代码不能为空','green','应用代码不合法','message','env','column','error','✓\x20成功在当前目录初始化\x20.lovrabetrc\x20文件','2PCmEDO','56207844LmVsvk','cyan','4494765SiSgPV','string','1.0.0','slice','utf8','创建配置文件失败:\x20','stringify','info','523359hdmPFt','正在初始化配置文件...','setLogPath','\x20←\x20'];a50_0x1e04=function(){return _0x38a60f;};return a50_0x1e04();}function a50_0x1cbb(_0x3920f4,_0x508186){_0x3920f4=_0x3920f4-0xa8;const _0x1e048b=a50_0x1e04();let _0x1cbbce=_0x1e048b[_0x3920f4];return _0x1cbbce;}import{Box,Text,useInput}from'ink';import{existsSync,writeFileSync,readFileSync}from'node:fs';import{resolve,join,dirname}from'node:path';import{fileURLToPath}from'node:url';import{logger}from'../utils/logger.js';import{readConfig}from'../utils/config.js';export function Init({appcode:_0x34f063,env:_0x2ad53b}){const _0x3ab1ef=a50_0x1cbb,[_0x535175,_0x3660bc]=useState(null),[_0xc46b5a,_0x319ad2]=useState(![]),[_0x1c83b4,_0x2baf8b]=useState(!_0x34f063),[_0x3dd01a,_0x186fe2]=useState(''),[_0x4a9e7c,_0x314b9e]=useState(''),[_0x574dab,_0x185c7c]=useState(_0x34f063||''),[_0x3d84a5]=useState(_0x2ad53b);function _0x1b6b93(_0x4c43a7){const _0x567bd7=a50_0x1cbb;if(_0x4c43a7[_0x567bd7(0xbb)]===0x0)return{'valid':![],'message':''};if(_0x4c43a7[_0x567bd7(0xbb)]>0x64)return{'valid':![],'message':_0x567bd7(0xcd)};const _0x2f4a0f=/^[A-Za-z0-9_-]+$/;if(!_0x2f4a0f[_0x567bd7(0xcf)](_0x4c43a7))return{'valid':![],'message':_0x567bd7(0xb9)};return{'valid':!![]};}useInput((_0x48cd76,_0x13cefe)=>{const _0xb3f8a4=a50_0x1cbb;if(!_0x1c83b4)return;if(_0x13cefe[_0xb3f8a4(0xc9)]){if(_0x4a9e7c||!_0x3dd01a[_0xb3f8a4(0xc1)]()){_0x314b9e(_0xb3f8a4(0xd0));return;}const _0x138b10=_0x3dd01a[_0xb3f8a4(0xc1)](),{valid:_0x5a77d3,message:_0x5b396c}=_0x1b6b93(_0x138b10);if(!_0x5a77d3){_0x314b9e(_0x5b396c||_0xb3f8a4(0xd2));return;}_0x185c7c(_0x138b10),_0x2baf8b(![]);}else{if(_0x13cefe[_0xb3f8a4(0xbd)]||_0x13cefe['delete'])_0x186fe2(_0x4f7cab=>{const _0x11d376=_0xb3f8a4,_0x4e33cc=_0x4f7cab[_0x11d376(0xa8)](0x0,-0x1);if(_0x4e33cc['length']===0x0)_0x314b9e('');else{const {valid:_0x35f542,message:_0x27d8ba}=_0x1b6b93(_0x4e33cc);_0x314b9e(_0x35f542?'':_0x27d8ba||_0x11d376(0xd2));}return _0x4e33cc;});else _0x13cefe[_0xb3f8a4(0xc0)]&&_0x48cd76==='c'?process[_0xb3f8a4(0xc6)](0x0):_0x186fe2(_0x365fd5=>{const _0x34e303=_0xb3f8a4,_0x33c7d5=_0x365fd5+_0x48cd76,{valid:_0x9d3c59,message:_0x15b2e8}=_0x1b6b93(_0x33c7d5);return _0x314b9e(_0x9d3c59?'':_0x15b2e8||_0x34e303(0xd2)),_0x33c7d5;});}},{'isActive':_0x1c83b4}),useEffect(()=>{const _0x462c1e=a50_0x1cbb;if(!_0x574dab||_0x1c83b4)return;const _0x568101=resolve(process['cwd'](),_0x462c1e(0xbe));if(existsSync(_0x568101)){_0x3660bc(_0x462c1e(0xb4)),setTimeout(()=>process['exit'](0x1),0x64);return;}try{const _0x1e558a=fileURLToPath(import.meta.url),_0x1451b4=resolve(dirname(_0x1e558a),_0x462c1e(0xc2)),_0x398f1c=join(_0x1451b4,_0x462c1e(0xcc));let _0x52c590=_0x462c1e(0xdd);try{const _0xfe744e=JSON[_0x462c1e(0xc7)](readFileSync(_0x398f1c,_0x462c1e(0xa9)));_0x52c590=_0xfe744e[_0x462c1e(0xb2)]||_0x462c1e(0xdd);}catch(_0x30d9ba){}const _0x54bf5f=readConfig(),_0x51f4c1=typeof _0x54bf5f['env']===_0x462c1e(0xdc)?_0x54bf5f[_0x462c1e(0xd4)]:undefined,{app:_0x2b1b48,appcode:_0x58e68e,..._0xaa39e0}=_0x54bf5f,_0x6894be={..._0xaa39e0,'appcode':_0x574dab,'env':_0x3d84a5||_0x51f4c1||_0x462c1e(0xc4),'createdAt':new Date()['toLocaleString'](),'version':_0x52c590};writeFileSync(_0x568101,JSON[_0x462c1e(0xab)](_0x6894be,null,0x2),{'encoding':_0x462c1e(0xa9),'mode':0x180}),logger[_0x462c1e(0xaf)](process[_0x462c1e(0xba)]()),logger[_0x462c1e(0xac)](_0x462c1e(0xc3),'初始化项目配置文件成功',{'appcode':_0x574dab,'env':_0x6894be[_0x462c1e(0xd4)],'version':_0x6894be[_0x462c1e(0xb2)],'configPath':_0x568101}),_0x319ad2(!![]),setTimeout(()=>process[_0x462c1e(0xc6)](0x0),0x64);}catch(_0x134c68){logger[_0x462c1e(0xd6)]('init',_0x462c1e(0xcb),{'error':_0x134c68 instanceof Error?_0x134c68['message']:String(_0x134c68)}),_0x3660bc(_0x462c1e(0xaa)+(_0x134c68 instanceof Error?_0x134c68[_0x462c1e(0xd3)]:String(_0x134c68))),setTimeout(()=>process['exit'](0x1),0x64);}},[_0x574dab,_0x1c83b4,_0x3d84a5]);if(_0x535175)return a50_0x361b5c(Box,{'flexDirection':_0x3ab1ef(0xd5),'children':a50_0x5552b4(Text,{'color':_0x3ab1ef(0xc8),'children':['✗\x20',_0x535175]})});if(_0x1c83b4)return a50_0x5552b4(Box,{'flexDirection':_0x3ab1ef(0xd5),'children':[a50_0x5552b4(Box,{'children':[a50_0x361b5c(Text,{'color':_0x3ab1ef(0xda),'children':'请输入应用代码\x20(AppCode):\x20'}),_0x3dd01a?a50_0x361b5c(Text,{'color':_0x3ab1ef(0xd1),'children':_0x3dd01a}):a50_0x361b5c(Text,{'color':_0x3ab1ef(0xc5),'children':'_'}),_0x4a9e7c&&a50_0x5552b4(Text,{'color':_0x3ab1ef(0xc8),'children':[_0x3ab1ef(0xb0),_0x4a9e7c]})]}),!_0x4a9e7c&&!_0x3dd01a&&a50_0x361b5c(Box,{'children':a50_0x361b5c(Text,{'color':_0x3ab1ef(0xc5),'children':_0x3ab1ef(0xce)})})]});if(_0xc46b5a)return a50_0x5552b4(Box,{'flexDirection':_0x3ab1ef(0xd5),'children':[a50_0x361b5c(Text,{'color':_0x3ab1ef(0xd1),'children':_0x3ab1ef(0xd7)}),a50_0x5552b4(Text,{'color':'cyan','children':['AppCode:\x20',_0x574dab]}),a50_0x361b5c(Text,{'children':_0x3ab1ef(0xbf)})]});return a50_0x361b5c(Box,{'children':a50_0x361b5c(Text,{'children':_0x3ab1ef(0xae)})});}
1
+ (function(_0x5c9a07,_0x56fa91){const _0xc87679=a50_0x7b5f,_0x43e33b=_0x5c9a07();while(!![]){try{const _0x5c38c5=-parseInt(_0xc87679(0x1dd))/0x1*(-parseInt(_0xc87679(0x1f8))/0x2)+-parseInt(_0xc87679(0x1e3))/0x3*(-parseInt(_0xc87679(0x1ee))/0x4)+parseInt(_0xc87679(0x1ed))/0x5+-parseInt(_0xc87679(0x1fa))/0x6*(parseInt(_0xc87679(0x1db))/0x7)+parseInt(_0xc87679(0x1fb))/0x8*(-parseInt(_0xc87679(0x1f1))/0x9)+parseInt(_0xc87679(0x1df))/0xa*(parseInt(_0xc87679(0x1ec))/0xb)+-parseInt(_0xc87679(0x1d1))/0xc*(parseInt(_0xc87679(0x1c8))/0xd);if(_0x5c38c5===_0x56fa91)break;else _0x43e33b['push'](_0x43e33b['shift']());}catch(_0x4a255a){_0x43e33b['push'](_0x43e33b['shift']());}}}(a50_0x486c,0x3d07b));import{jsxs as a50_0x22e97c,jsx as a50_0x278143}from'react/jsx-runtime';import{useState,useEffect}from'react';import{Box,Text,useInput}from'ink';function a50_0x486c(){const _0x20d112=['error','初始化项目配置文件成功','column','189cfJMnT','现在您可以使用\x20lovrabet\x20api\x20doc\x20和\x20lovrabet\x20api\x20pull\x20等命令了','158kZgGGo','backspace','40JzdoiN','slice','setLogPath','red','880788eEBApd','stringify','应用代码不合法','请输入应用代码\x20(AppCode):\x20','trim','green','env','delete','1.0.0','987646UsmJQv','2185040ymqGMO','4jpXQFF','AppCode:\x20','cwd','152127ncZRzD','info','cyan','message','parse','version','✓\x20成功在当前目录初始化\x20.lovrabetrc\x20文件','1592LSikwL','应用代码只能包含字母、数字、-\x20和\x20_','31230yvjcHm','16dnkWwo','length','13sjDuUU','package.json','utf8','exit','../..','string','ctrl','当前目录已存在\x20.lovrabetrc\x20文件','创建配置文件失败:\x20','9494352TXtCeS','test','online','return','应用代码长度不能超过\x20100\x20个字符','应用代码用于标识您的项目,只能包含字母、数字、-\x20和\x20_','toLocaleString'];a50_0x486c=function(){return _0x20d112;};return a50_0x486c();}import{existsSync,writeFileSync,readFileSync}from'node:fs';import{resolve,join,dirname}from'node:path';function a50_0x7b5f(_0x528159,_0x3b909a){_0x528159=_0x528159-0x1c7;const _0x486cb3=a50_0x486c();let _0x7b5ff8=_0x486cb3[_0x528159];return _0x7b5ff8;}import{fileURLToPath}from'node:url';import{logger}from'../utils/logger.js';import{readConfig}from'../utils/config.js';export function Init({appcode:_0x10523b,env:_0xb8665a}){const _0x2e86d0=a50_0x7b5f,[_0x338301,_0x64b9cc]=useState(null),[_0x5c1663,_0xb3849e]=useState(![]),[_0x187fc1,_0x3e5fc8]=useState(!_0x10523b),[_0x5c0a81,_0x59de4f]=useState(''),[_0x17e47d,_0x2469a5]=useState(''),[_0x25f684,_0x4c80cb]=useState(_0x10523b||''),[_0x4d8314]=useState(_0xb8665a);function _0x253392(_0x4a7edd){const _0x1c503c=a50_0x7b5f;if(_0x4a7edd[_0x1c503c(0x1c7)]===0x0)return{'valid':![],'message':''};if(_0x4a7edd[_0x1c503c(0x1c7)]>0x64)return{'valid':![],'message':_0x1c503c(0x1d5)};const _0x3a13e4=/^[A-Za-z0-9_-]+$/;if(!_0x3a13e4[_0x1c503c(0x1d2)](_0x4a7edd))return{'valid':![],'message':_0x1c503c(0x1f9)};return{'valid':!![]};}useInput((_0x1cf96c,_0x5d70a0)=>{const _0x4631aa=a50_0x7b5f;if(!_0x187fc1)return;if(_0x5d70a0[_0x4631aa(0x1d4)]){if(_0x17e47d||!_0x5c0a81[_0x4631aa(0x1e7)]()){_0x2469a5('应用代码不能为空');return;}const _0x4bf084=_0x5c0a81[_0x4631aa(0x1e7)](),{valid:_0x10acbb,message:_0x451c82}=_0x253392(_0x4bf084);if(!_0x10acbb){_0x2469a5(_0x451c82||'应用代码不合法');return;}_0x4c80cb(_0x4bf084),_0x3e5fc8(![]);}else{if(_0x5d70a0[_0x4631aa(0x1de)]||_0x5d70a0[_0x4631aa(0x1ea)])_0x59de4f(_0x9f7a7a=>{const _0x165f52=_0x4631aa,_0x12b1d4=_0x9f7a7a[_0x165f52(0x1e0)](0x0,-0x1);if(_0x12b1d4['length']===0x0)_0x2469a5('');else{const {valid:_0x28a5a4,message:_0x50a63f}=_0x253392(_0x12b1d4);_0x2469a5(_0x28a5a4?'':_0x50a63f||_0x165f52(0x1e5));}return _0x12b1d4;});else _0x5d70a0[_0x4631aa(0x1ce)]&&_0x1cf96c==='c'?process[_0x4631aa(0x1cb)](0x0):_0x59de4f(_0x25091f=>{const _0x4c2407=_0x25091f+_0x1cf96c,{valid:_0x3f6816,message:_0x410bee}=_0x253392(_0x4c2407);return _0x2469a5(_0x3f6816?'':_0x410bee||'应用代码不合法'),_0x4c2407;});}},{'isActive':_0x187fc1}),useEffect(()=>{const _0x5279d4=a50_0x7b5f;if(!_0x25f684||_0x187fc1)return;const _0x15b874=resolve(process[_0x5279d4(0x1f0)](),'.lovrabetrc');if(existsSync(_0x15b874)){_0x64b9cc(_0x5279d4(0x1cf)),setTimeout(()=>process[_0x5279d4(0x1cb)](0x1),0x64);return;}try{const _0x477d5a=fileURLToPath(import.meta.url),_0x586de9=resolve(dirname(_0x477d5a),_0x5279d4(0x1cc)),_0x1018e9=join(_0x586de9,_0x5279d4(0x1c9));let _0x6dc5f0=_0x5279d4(0x1eb);try{const _0x47e579=JSON[_0x5279d4(0x1f5)](readFileSync(_0x1018e9,_0x5279d4(0x1ca)));_0x6dc5f0=_0x47e579['version']||_0x5279d4(0x1eb);}catch(_0x418c0a){}const _0x24f5cf=readConfig(),_0x20e93f=typeof _0x24f5cf[_0x5279d4(0x1e9)]===_0x5279d4(0x1cd)?_0x24f5cf[_0x5279d4(0x1e9)]:undefined,{app:_0x35763a,appcode:_0x368a08,..._0x4e559b}=_0x24f5cf,_0x3c3bb9={..._0x4e559b,'appcode':_0x25f684,'env':_0x4d8314||_0x20e93f||_0x5279d4(0x1d3),'createdAt':new Date()[_0x5279d4(0x1d7)](),'version':_0x6dc5f0};writeFileSync(_0x15b874,JSON[_0x5279d4(0x1e4)](_0x3c3bb9,null,0x2),{'encoding':_0x5279d4(0x1ca),'mode':0x180}),logger[_0x5279d4(0x1e1)](process[_0x5279d4(0x1f0)]()),logger[_0x5279d4(0x1f2)]('init',_0x5279d4(0x1d9),{'appcode':_0x25f684,'env':_0x3c3bb9[_0x5279d4(0x1e9)],'version':_0x3c3bb9[_0x5279d4(0x1f6)],'configPath':_0x15b874}),_0xb3849e(!![]),setTimeout(()=>process[_0x5279d4(0x1cb)](0x0),0x64);}catch(_0x2fb2b7){logger[_0x5279d4(0x1d8)]('init','创建配置文件失败',{'error':_0x2fb2b7 instanceof Error?_0x2fb2b7['message']:String(_0x2fb2b7)}),_0x64b9cc(_0x5279d4(0x1d0)+(_0x2fb2b7 instanceof Error?_0x2fb2b7[_0x5279d4(0x1f4)]:String(_0x2fb2b7))),setTimeout(()=>process[_0x5279d4(0x1cb)](0x1),0x64);}},[_0x25f684,_0x187fc1,_0x4d8314]);if(_0x338301)return a50_0x278143(Box,{'flexDirection':_0x2e86d0(0x1da),'children':a50_0x22e97c(Text,{'color':'red','children':['✗\x20',_0x338301]})});if(_0x187fc1)return a50_0x22e97c(Box,{'flexDirection':_0x2e86d0(0x1da),'children':[a50_0x22e97c(Box,{'children':[a50_0x278143(Text,{'color':_0x2e86d0(0x1f3),'children':_0x2e86d0(0x1e6)}),_0x5c0a81?a50_0x278143(Text,{'color':_0x2e86d0(0x1e8),'children':_0x5c0a81}):a50_0x278143(Text,{'color':'gray','children':'_'}),_0x17e47d&&a50_0x22e97c(Text,{'color':_0x2e86d0(0x1e2),'children':['\x20←\x20',_0x17e47d]})]}),!_0x17e47d&&!_0x5c0a81&&a50_0x278143(Box,{'children':a50_0x278143(Text,{'color':'gray','children':_0x2e86d0(0x1d6)})})]});if(_0x5c1663)return a50_0x22e97c(Box,{'flexDirection':'column','children':[a50_0x278143(Text,{'color':'green','children':_0x2e86d0(0x1f7)}),a50_0x22e97c(Text,{'color':_0x2e86d0(0x1f3),'children':[_0x2e86d0(0x1ef),_0x25f684]}),a50_0x278143(Text,{'children':_0x2e86d0(0x1dc)})]});return a50_0x278143(Box,{'children':a50_0x278143(Text,{'children':'正在初始化配置文件...'})});}