@lovrabet/cli 1.1.26 → 1.2.1-beta.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 (67) 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 -0
  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/types/index.js +1 -0
  53. package/lib/utils/check-sdk-version.js +1 -0
  54. package/lib/utils/config.js +1 -1
  55. package/lib/utils/copy-directory.js +1 -1
  56. package/lib/utils/http-client.js +1 -1
  57. package/lib/utils/logger.js +1 -1
  58. package/lib/utils/router-updater.js +1 -1
  59. package/lib/utils/sleep.js +1 -1
  60. package/lib/utils/template-replacer.js +1 -1
  61. package/package.json +3 -1
  62. package/templates/generate-api/api.ts.tpl +9 -4
  63. package/templates/rules/lovrabet_rules.mdc.tpl +90 -34
  64. package/lib/app-menu-cdn-version/app-menu-sync-cdn-version-ui.js +0 -1
  65. package/lib/app-menu-cdn-version/cdn-url-compare-table.js +0 -1
  66. package/lib/app-menu-cdn-version/update-menu-cdn-url.js +0 -1
  67. /package/lib/{app-menu-cdn-version → app-menu-update-cdn}/types.js +0 -0
@@ -1 +1 @@
1
- (function(_0x3b5c72,_0xefe7c5){const _0x585aeb=a35_0x2fa9,_0x461dbe=_0x3b5c72();while(!![]){try{const _0x491a1d=parseInt(_0x585aeb(0x1a1))/0x1+parseInt(_0x585aeb(0x19e))/0x2*(parseInt(_0x585aeb(0x1a6))/0x3)+parseInt(_0x585aeb(0x195))/0x4*(-parseInt(_0x585aeb(0x1a2))/0x5)+parseInt(_0x585aeb(0x1b1))/0x6*(parseInt(_0x585aeb(0x194))/0x7)+-parseInt(_0x585aeb(0x193))/0x8+-parseInt(_0x585aeb(0x1aa))/0x9+parseInt(_0x585aeb(0x196))/0xa*(parseInt(_0x585aeb(0x198))/0xb);if(_0x491a1d===_0xefe7c5)break;else _0x461dbe['push'](_0x461dbe['shift']());}catch(_0x2012e7){_0x461dbe['push'](_0x461dbe['shift']());}}}(a35_0x2bb9,0x5a8cd));import{delimiter,join}from'node:path';import{spawn}from'node:child_process';import{logger}from'../utils/logger.js';function a35_0x2fa9(_0x24d18d,_0xf0758){_0x24d18d=_0x24d18d-0x192;const _0x2bb906=a35_0x2bb9();let _0x2fa919=_0x2bb906[_0x24d18d];return _0x2fa919;}function a35_0x2bb9(){const _0x43bc0a=['toString','trim','292141zgdZRH','1555wPVVvA','close','vite','预览服务器启动成功','49479hWPGvg','now','vite\x20preview','vite\x20preview\x20exited\x20with\x20code\x20','3411945XMMqgg','env','cwd','error','info','inherit','node_modules','858414gTcJyU','预览服务器启动失败','preview','2769184BQouMc','7niGwop','5352OeQQWC','830mqgDdY','data','131813nlrwJc','message','stderr','PATH','pipe','启动预览服务器','10CowJUk'];a35_0x2bb9=function(){return _0x43bc0a;};return a35_0x2bb9();}export function runPreview(){return new Promise((_0x4fa9fb,_0x11be31)=>{const _0x2e00bd=a35_0x2fa9,_0x4ea3ac=Date[_0x2e00bd(0x1a7)]();logger[_0x2e00bd(0x1ae)]('preview',_0x2e00bd(0x19d),{'command':'vite\x20preview'});let _0x526081='';const _0x3411b8=spawn(_0x2e00bd(0x1a4),[_0x2e00bd(0x192)],{'stdio':[_0x2e00bd(0x1af),_0x2e00bd(0x1af),_0x2e00bd(0x19c)],'shell':!![],'env':{...process[_0x2e00bd(0x1ab)],'PATH':''+join(process[_0x2e00bd(0x1ac)](),_0x2e00bd(0x1b0),'.bin')+delimiter+process['env'][_0x2e00bd(0x19b)]}});_0x3411b8[_0x2e00bd(0x19a)]?.['on'](_0x2e00bd(0x197),_0x23e583=>{const _0x1f7008=_0x2e00bd;_0x526081+=_0x23e583[_0x1f7008(0x19f)]();}),_0x3411b8['on'](_0x2e00bd(0x1a3),_0xff1915=>{const _0x1523a3=_0x2e00bd,_0x754926=Date[_0x1523a3(0x1a7)]()-_0x4ea3ac;if(_0xff1915===0x0||_0xff1915===null)logger['success']('preview',_0x1523a3(0x1a5),_0x754926),_0x4fa9fb();else{const _0x30616d={'exitCode':_0xff1915,'duration':_0x754926,'command':_0x1523a3(0x1a8),'cwd':process[_0x1523a3(0x1ac)]()};_0x526081[_0x1523a3(0x1a0)]()&&(_0x30616d[_0x1523a3(0x19a)]=_0x526081[_0x1523a3(0x1a0)]()),logger['error']('preview',_0x1523a3(0x1b2),_0x30616d),_0x11be31(new Error(_0x1523a3(0x1a9)+_0xff1915));}}),_0x3411b8['on'](_0x2e00bd(0x1ad),_0x11e95d=>{const _0x8b2fa9=_0x2e00bd,_0x34518d=Date[_0x8b2fa9(0x1a7)]()-_0x4ea3ac;logger[_0x8b2fa9(0x1ad)](_0x8b2fa9(0x192),'预览服务器启动出错',{'error':_0x11e95d[_0x8b2fa9(0x199)],'duration':_0x34518d,'stderr':_0x526081[_0x8b2fa9(0x1a0)]()||undefined}),_0x11be31(_0x11e95d);});});}
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();}
package/lib/cmd/start.js CHANGED
@@ -1 +1 @@
1
- (function(_0x2376aa,_0x4d999b){const _0xb0e26b=a36_0x328b,_0x549e50=_0x2376aa();while(!![]){try{const _0x3c8403=-parseInt(_0xb0e26b(0x12b))/0x1+parseInt(_0xb0e26b(0x139))/0x2*(-parseInt(_0xb0e26b(0x131))/0x3)+parseInt(_0xb0e26b(0x128))/0x4+-parseInt(_0xb0e26b(0x12e))/0x5*(-parseInt(_0xb0e26b(0x13c))/0x6)+parseInt(_0xb0e26b(0x13e))/0x7*(-parseInt(_0xb0e26b(0x12d))/0x8)+-parseInt(_0xb0e26b(0x13d))/0x9+parseInt(_0xb0e26b(0x129))/0xa*(parseInt(_0xb0e26b(0x12a))/0xb);if(_0x3c8403===_0x4d999b)break;else _0x549e50['push'](_0x549e50['shift']());}catch(_0x221750){_0x549e50['push'](_0x549e50['shift']());}}}(a36_0x4186,0x8223b));import{delimiter,join}from'node:path';import{spawn}from'node:child_process';import{logger}from'../utils/logger.js';export function runStart(_0x177801){return new Promise((_0x49225b,_0x38bd2b)=>{const _0x250f8d=a36_0x328b,_0x459ee2=Date['now'](),_0x53b3f0=_0x177801||process[_0x250f8d(0x132)]();logger[_0x250f8d(0x143)](_0x250f8d(0x137),_0x250f8d(0x138),{'command':_0x250f8d(0x140),'cwd':_0x53b3f0});let _0x54c208='';const _0x1da965=spawn(_0x250f8d(0x140),{'stdio':[_0x250f8d(0x145),'inherit','pipe'],'shell':!![],'cwd':_0x53b3f0,'env':{...process[_0x250f8d(0x141)],'PATH':''+join(_0x53b3f0,_0x250f8d(0x133),'.bin')+delimiter+process[_0x250f8d(0x141)][_0x250f8d(0x142)]}});_0x1da965[_0x250f8d(0x130)]?.['on'](_0x250f8d(0x12c),_0x50d626=>{const _0x10b1ad=_0x250f8d,_0x3cc78b=_0x50d626[_0x10b1ad(0x146)]();_0x54c208+=_0x3cc78b,process[_0x10b1ad(0x130)]['write'](_0x3cc78b);}),_0x1da965['on'](_0x250f8d(0x13a),_0x6b5fcc=>{const _0x3345bf=_0x250f8d,_0x513fe0=Date[_0x3345bf(0x136)]()-_0x459ee2;if(_0x6b5fcc===0x0||_0x6b5fcc===null)logger[_0x3345bf(0x134)](_0x3345bf(0x137),_0x3345bf(0x148),_0x513fe0),_0x49225b();else{const _0x33c87b={'exitCode':_0x6b5fcc,'duration':_0x513fe0,'command':_0x3345bf(0x140),'cwd':_0x53b3f0};_0x54c208[_0x3345bf(0x147)]()&&(_0x33c87b[_0x3345bf(0x130)]=_0x54c208[_0x3345bf(0x147)]()),logger[_0x3345bf(0x144)](_0x3345bf(0x137),_0x3345bf(0x13f),_0x33c87b),_0x38bd2b(new Error(_0x3345bf(0x13b)+_0x6b5fcc));}}),_0x1da965['on'](_0x250f8d(0x144),_0x193e48=>{const _0x3d66e8=_0x250f8d,_0x293d94=Date[_0x3d66e8(0x136)]()-_0x459ee2,_0x109a92={'error':_0x193e48[_0x3d66e8(0x12f)],'duration':_0x293d94,'command':_0x3d66e8(0x140),'cwd':_0x53b3f0};_0x54c208[_0x3d66e8(0x147)]()&&(_0x109a92[_0x3d66e8(0x130)]=_0x54c208[_0x3d66e8(0x147)]()),logger[_0x3d66e8(0x144)](_0x3d66e8(0x137),_0x3d66e8(0x135),_0x109a92),_0x38bd2b(_0x193e48);});});}function a36_0x328b(_0xe1ff4,_0xe36fc0){_0xe1ff4=_0xe1ff4-0x128;const _0x418686=a36_0x4186();let _0x328bee=_0x418686[_0xe1ff4];return _0x328bee;}function a36_0x4186(){const _0x40bf97=['6IfKmpr','8131023SfbVOi','203nbpBEj','开发服务器启动失败','vite','env','PATH','info','error','inherit','toString','trim','开发服务器启动成功','642000xtBZxw','20zFAehy','9005887AuQNzr','202048ZDbBFe','data','1848OxgeLi','3077895ykbgpV','message','stderr','12ozCDnD','cwd','node_modules','success','开发服务器启动出错','now','start','启动开发服务器','384134DqRmKN','close','vite\x20exited\x20with\x20code\x20'];a36_0x4186=function(){return _0x40bf97;};return a36_0x4186();}
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 +1 @@
1
- function a37_0x1575(){const _0x2d5af3=['2852840nwnKNB','获取配置项','184SzXNGI','1388055muIzbm','无效的命令,可用命令如下:','command','35358zkwklG','99JFvtNR','lovrabet\x20config\x20set\x20env\x20daily\x20\x20\x20\x20\x20\x20\x20','1572WftEra','设置环境\x20(online/daily)','map','lovrabet\x20config\x20get\x20<key>\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','设置配置项','gray','81927JwugSM','\x20\x20\x20\x20','294Wbknzc','column','635bnFnDO','902rHXKed','description','配置当前项目的\x20App\x20Code','789yHVKYY','\x20*\x20配置示例:','列出所有配置项','1384800BclhrB'];a37_0x1575=function(){return _0x2d5af3;};return a37_0x1575();}(function(_0x375c57,_0xd8ad37){const _0x5bda5d=a37_0x5610,_0x4aed14=_0x375c57();while(!![]){try{const _0x2395a5=parseInt(_0x5bda5d(0x1bf))/0x1*(parseInt(_0x5bda5d(0x1c0))/0x2)+parseInt(_0x5bda5d(0x1c3))/0x3*(-parseInt(_0x5bda5d(0x1b5))/0x4)+parseInt(_0x5bda5d(0x1af))/0x5+parseInt(_0x5bda5d(0x1b2))/0x6*(parseInt(_0x5bda5d(0x1bd))/0x7)+parseInt(_0x5bda5d(0x1ae))/0x8*(parseInt(_0x5bda5d(0x1bb))/0x9)+parseInt(_0x5bda5d(0x1c7))/0xa+-parseInt(_0x5bda5d(0x1b3))/0xb*(parseInt(_0x5bda5d(0x1c6))/0xc);if(_0x2395a5===_0xd8ad37)break;else _0x4aed14['push'](_0x4aed14['shift']());}catch(_0xd32aeb){_0x4aed14['push'](_0x4aed14['shift']());}}}(a37_0x1575,0x28164));import{jsxs as a37_0x35fe4f,jsx as a37_0x1168eb}from'react/jsx-runtime';function a37_0x5610(_0x2d27e9,_0x14e834){_0x2d27e9=_0x2d27e9-0x1ad;const _0x15751c=a37_0x1575();let _0x56109e=_0x15751c[_0x2d27e9];return _0x56109e;}import{Box,Text}from'ink';export function ConfigHelp(){const _0x19d62e=a37_0x5610,_0x55c3ee=[{'command':'lovrabet\x20config\x20set\x20<key>\x20<value>\x20\x20\x20','description':_0x19d62e(0x1b9)},{'command':_0x19d62e(0x1b8),'description':_0x19d62e(0x1ad)},{'command':'lovrabet\x20config\x20list\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','description':_0x19d62e(0x1c5)}],_0x30688d=[{'command':'lovrabet\x20config\x20set\x20app\x20app-xxxxx\x20\x20\x20','description':_0x19d62e(0x1c2)},{'command':_0x19d62e(0x1b4),'description':_0x19d62e(0x1b6)}];return a37_0x35fe4f(Box,{'flexDirection':_0x19d62e(0x1be),'marginTop':0x1,'marginBottom':0x1,'children':[a37_0x1168eb(Box,{'marginBottom':0x1,'children':a37_0x35fe4f(Text,{'color':_0x19d62e(0x1ba),'children':['\x20!','\x20\x20',_0x19d62e(0x1b0)]})}),_0x55c3ee['map'](_0x389881=>a37_0x35fe4f(Box,{'children':[a37_0x35fe4f(Text,{'children':[_0x19d62e(0x1bc),_0x389881[_0x19d62e(0x1b1)]]}),a37_0x1168eb(Text,{'color':_0x19d62e(0x1ba),'children':_0x389881[_0x19d62e(0x1c1)]})]},_0x389881[_0x19d62e(0x1b1)])),a37_0x1168eb(Box,{'marginTop':0x1,'marginBottom':0x1,'children':a37_0x1168eb(Text,{'color':_0x19d62e(0x1ba),'children':_0x19d62e(0x1c4)})}),_0x30688d[_0x19d62e(0x1b7)](_0x2a65da=>a37_0x35fe4f(Box,{'children':[a37_0x35fe4f(Text,{'children':['\x20\x20\x20\x20',_0x2a65da['command']]}),a37_0x1168eb(Text,{'color':_0x19d62e(0x1ba),'children':_0x2a65da[_0x19d62e(0x1c1)]})]},_0x2a65da[_0x19d62e(0x1b1)]))]});}
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 +1 @@
1
- (function(_0x394b32,_0x332396){const _0x3a6e91=a38_0x2ea4,_0x38306a=_0x394b32();while(!![]){try{const _0x4a3503=parseInt(_0x3a6e91(0x179))/0x1+parseInt(_0x3a6e91(0x16f))/0x2+parseInt(_0x3a6e91(0x18e))/0x3*(-parseInt(_0x3a6e91(0x16d))/0x4)+-parseInt(_0x3a6e91(0x17e))/0x5+parseInt(_0x3a6e91(0x180))/0x6*(-parseInt(_0x3a6e91(0x17c))/0x7)+parseInt(_0x3a6e91(0x177))/0x8+parseInt(_0x3a6e91(0x174))/0x9;if(_0x4a3503===_0x332396)break;else _0x38306a['push'](_0x38306a['shift']());}catch(_0x45edb7){_0x38306a['push'](_0x38306a['shift']());}}}(a38_0x1bcc,0x3feb0));import{jsx as a38_0x5d2dcc,jsxs as a38_0x48964a}from'react/jsx-runtime';import{existsSync,readFileSync,writeFileSync}from'node:fs';import a38_0x3cb2c6 from'node:fs';import a38_0x2ed993 from'node:path';import{ConfigHelp}from'./config-help.js';import{Box,Text}from'ink';import{readConfig,isInProject,projectConfigPath,globalConfigPath}from'../utils/config.js';function a38_0x2ea4(_0x1d0d9a,_0x4c0514){_0x1d0d9a=_0x1d0d9a-0x16c;const _0x1bcc25=a38_0x1bcc();let _0x2ea469=_0x1bcc25[_0x1d0d9a];return _0x2ea469;}import{logger}from'../utils/logger.js';export function Config(_0x1b83da){const _0x4660d8=a38_0x2ea4,{cli:_0x3f35e5}=_0x1b83da,_0x3ff8be=_0x3f35e5[_0x4660d8(0x170)][0x1],_0x1690ae=_0x3f35e5['input'][0x2],_0x1a5587=[_0x4660d8(0x184),_0x4660d8(0x173)][_0x4660d8(0x17b)](_0x3ff8be||''),_0x2657fa=_0x3f35e5[_0x4660d8(0x170)]['length']>=0x3;if(_0x1690ae===_0x4660d8(0x186)||_0x3f35e5[_0x4660d8(0x189)]['help'])return a38_0x5d2dcc(ConfigHelp,{});const _0x5dc67e=readConfig();if(_0x3ff8be==='set'){if(_0x1690ae){const _0x4aa25c=_0x3f35e5[_0x4660d8(0x170)][0x3];if(typeof _0x4aa25c!==_0x4660d8(0x18f)){if(_0x1690ae==='env'&&!['online',_0x4660d8(0x16e)][_0x4660d8(0x17b)](_0x4aa25c))return a38_0x5d2dcc(Box,{'children':a38_0x5d2dcc(Text,{'color':_0x4660d8(0x18a),'children':_0x4660d8(0x18c)})});const _0x1885a4=isInProject(),_0x1d6ee1=_0x1885a4?projectConfigPath:globalConfigPath;let _0x13824b={};try{if(existsSync(_0x1d6ee1)){const _0x3161a0=readFileSync(_0x1d6ee1,{'encoding':_0x4660d8(0x175)});_0x3161a0&&(_0x13824b=JSON[_0x4660d8(0x17a)](_0x3161a0));}}catch(_0x44756c){}if(typeof _0x4aa25c!==_0x4660d8(0x17f)||_0x4aa25c[_0x4660d8(0x190)]>0x1f4)return a38_0x5d2dcc(Box,{'children':a38_0x5d2dcc(Text,{'color':_0x4660d8(0x18a),'children':_0x4660d8(0x191)})});let _0x40665c=_0x1690ae;_0x1690ae===_0x4660d8(0x187)&&(_0x40665c=_0x4660d8(0x176),delete _0x13824b['app']);_0x1690ae===_0x4660d8(0x176)&&delete _0x13824b['app'];_0x13824b[_0x40665c]=_0x4aa25c;try{const _0x136883=a38_0x2ed993[_0x4660d8(0x185)](_0x1d6ee1);!existsSync(_0x136883)&&a38_0x3cb2c6['mkdirSync'](_0x136883,{'recursive':!![]});const _0x2cfacc=_0x1d6ee1+'.tmp';writeFileSync(_0x2cfacc,JSON['stringify'](_0x13824b,null,0x2),{'encoding':_0x4660d8(0x175),'mode':0x180}),a38_0x3cb2c6['renameSync'](_0x2cfacc,_0x1d6ee1);if(_0x1690ae===_0x4660d8(0x178)){const _0x5f2dbd=_0x1885a4?'项目':'全局';console[_0x4660d8(0x17d)]('✓\x20'+_0x5f2dbd+_0x4660d8(0x18d)+_0x4aa25c);}}catch(_0x1e4649){const _0x4c9959=_0x1d6ee1+_0x4660d8(0x183);try{existsSync(_0x4c9959)&&a38_0x3cb2c6[_0x4660d8(0x172)](_0x4c9959);}catch(_0xef7b49){}return logger[_0x4660d8(0x181)](_0x4660d8(0x188),_0x4660d8(0x18b),{'error':_0x1e4649 instanceof Error?_0x1e4649[_0x4660d8(0x192)]:String(_0x1e4649),'configKey':_0x1690ae,'configValue':_0x4aa25c,'targetConfigPath':_0x1d6ee1}),a38_0x5d2dcc(Box,{'children':a38_0x48964a(Text,{'color':_0x4660d8(0x18a),'children':[_0x4660d8(0x16c),_0x1e4649 instanceof Error?_0x1e4649[_0x4660d8(0x192)]:String(_0x1e4649)]})});}return null;}return a38_0x5d2dcc(Box,{'children':a38_0x5d2dcc(Text,{'color':_0x4660d8(0x18a),'children':'未提供配置值'})});}}if(_0x3ff8be==='get'){if(_0x1690ae){let _0x496069=_0x1690ae;return _0x1690ae===_0x4660d8(0x187)&&(_0x496069='appcode'),console[_0x4660d8(0x17d)](_0x5dc67e[_0x496069]||'undefined'),null;}return null;}if(_0x3ff8be===_0x4660d8(0x171))return console[_0x4660d8(0x17d)](JSON[_0x4660d8(0x182)](_0x5dc67e,null,0x2)),null;if(!_0x1a5587||!_0x2657fa)return a38_0x5d2dcc(ConfigHelp,{});return null;}function a38_0x1bcc(){const _0x5b78e0=['utf8','appcode','4164096RHtczj','env','202672JFiPXM','parse','includes','16877nBJDzs','log','1165515vOwLeY','string','924zyLpcD','error','stringify','.tmp','set','dirname','--help','app','config','flags','red','保存配置失败','环境配置值只能是\x20\x22online\x22\x20或\x20\x22daily\x22','环境配置已设置为:\x20','31608PXyPrN','undefined','length','配置值无效或过长','message','保存配置失败:\x20','28zSbwXR','daily','424684lpgXQr','input','list','unlinkSync','get','39879hPHXVA'];a38_0x1bcc=function(){return _0x5b78e0;};return a38_0x1bcc();}
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 +1 @@
1
- const a39_0x4b59b6=a39_0x4905;function a39_0x4905(_0x3c3a49,_0x245c7d){_0x3c3a49=_0x3c3a49-0xc5;const _0x5dc437=a39_0x5dc4();let _0x4905b1=_0x5dc437[_0x3c3a49];return _0x4905b1;}(function(_0x115ff7,_0x48c9e5){const _0x3aa7bc=a39_0x4905,_0x3381d1=_0x115ff7();while(!![]){try{const _0x4c531d=-parseInt(_0x3aa7bc(0xc5))/0x1+-parseInt(_0x3aa7bc(0xcb))/0x2*(parseInt(_0x3aa7bc(0xce))/0x3)+-parseInt(_0x3aa7bc(0xcd))/0x4*(-parseInt(_0x3aa7bc(0xca))/0x5)+-parseInt(_0x3aa7bc(0xcc))/0x6*(-parseInt(_0x3aa7bc(0xd0))/0x7)+-parseInt(_0x3aa7bc(0xc8))/0x8*(-parseInt(_0x3aa7bc(0xd1))/0x9)+parseInt(_0x3aa7bc(0xd3))/0xa+-parseInt(_0x3aa7bc(0xc9))/0xb*(parseInt(_0x3aa7bc(0xc7))/0xc);if(_0x4c531d===_0x48c9e5)break;else _0x3381d1['push'](_0x3381d1['shift']());}catch(_0x4c4cde){_0x3381d1['push'](_0x3381d1['shift']());}}}(a39_0x5dc4,0xa170d));function a39_0x5dc4(){const _0x4d973a=['1251gdXiOq','online','7560440CLLqZU','1108532WBLEcz','https://user.lovrabet.com','99276WyFCCQ','74888DDlSUe','1826AGrVTG','40SNVJUI','571686qBdANn','1278906SAmGCi','152988deoczz','3QyvGoP','https://daily-api.lovrabet.com','35WhXdfA'];a39_0x5dc4=function(){return _0x4d973a;};return a39_0x5dc4();}import{getEnv}from'./env.js';export const getUserDomain=()=>getEnv()===a39_0x4b59b6(0xd2)?a39_0x4b59b6(0xc6):'https://user-daily.lovrabet.com';export const getApiDomain=()=>getEnv()===a39_0x4b59b6(0xd2)?'https://api.lovrabet.com':a39_0x4b59b6(0xcf);
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 +1 @@
1
- const a40_0x537fba=a40_0xa385;(function(_0x51ae73,_0x2aae9c){const _0x55da3e=a40_0xa385,_0x368c94=_0x51ae73();while(!![]){try{const _0x3d7aae=-parseInt(_0x55da3e(0xb3))/0x1+-parseInt(_0x55da3e(0xc0))/0x2+-parseInt(_0x55da3e(0xbb))/0x3*(-parseInt(_0x55da3e(0xbc))/0x4)+-parseInt(_0x55da3e(0xbd))/0x5*(parseInt(_0x55da3e(0xb8))/0x6)+-parseInt(_0x55da3e(0xbe))/0x7*(parseInt(_0x55da3e(0xb4))/0x8)+parseInt(_0x55da3e(0xb9))/0x9*(-parseInt(_0x55da3e(0xbf))/0xa)+parseInt(_0x55da3e(0xba))/0xb;if(_0x3d7aae===_0x2aae9c)break;else _0x368c94['push'](_0x368c94['shift']());}catch(_0x5cab62){_0x368c94['push'](_0x368c94['shift']());}}}(a40_0xff77,0xdb2d2));function a40_0xa385(_0x50a0e5,_0x6c70e5){_0x50a0e5=_0x50a0e5-0xb3;const _0xff7723=a40_0xff77();let _0xa38503=_0xff7723[_0x50a0e5];return _0xa38503;}let env=process[a40_0x537fba(0xb7)][a40_0x537fba(0xb6)]||a40_0x537fba(0xb5);export function getEnv(){return env;}function a40_0xff77(){const _0xb3b8ac=['env','96snKZiU','9725238JEJwkl','41136183RTWQwu','5130462FyhhMV','4LAtzyn','360465cMevIp','11785879HxpwLC','10NVyPdq','732916tJsARl','267836HdiOUJ','8WRZBPc','online','LOVRABET_ENV'];a40_0xff77=function(){return _0xb3b8ac;};return a40_0xff77();}export function initEnv(_0x326d58){env=_0x326d58;}
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 +1 @@
1
- (function(_0x4053af,_0x591560){const _0x7d3534=a41_0x2be4,_0x42f87d=_0x4053af();while(!![]){try{const _0x168f14=parseInt(_0x7d3534(0x188))/0x1*(parseInt(_0x7d3534(0x177))/0x2)+-parseInt(_0x7d3534(0x180))/0x3*(-parseInt(_0x7d3534(0x1a5))/0x4)+parseInt(_0x7d3534(0x1ac))/0x5+parseInt(_0x7d3534(0x19b))/0x6+-parseInt(_0x7d3534(0x1a0))/0x7*(-parseInt(_0x7d3534(0x19f))/0x8)+parseInt(_0x7d3534(0x172))/0x9*(-parseInt(_0x7d3534(0x19a))/0xa)+-parseInt(_0x7d3534(0x18f))/0xb;if(_0x168f14===_0x591560)break;else _0x42f87d['push'](_0x42f87d['shift']());}catch(_0x3b4c61){_0x42f87d['push'](_0x42f87d['shift']());}}}(a41_0x1835,0x27073));import{jsx as a41_0x264e77,jsxs as a41_0x7f3309,Fragment as a41_0xaffb98}from'react/jsx-runtime';function a41_0x2be4(_0x2aaad0,_0x25f9eb){_0x2aaad0=_0x2aaad0-0x169;const _0x18358d=a41_0x1835();let _0x2be42d=_0x18358d[_0x2aaad0];return _0x2be42d;}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(_0x56f7ee){const _0x3581e0=a41_0x2be4,{onCreate:_0x52d0cb,env:_0x40231b}=_0x56f7ee,[_0x37f45b,_0x48936b]=useState('project-name'),[_0x31e5d4,_0x33b989]=useState(''),[_0x5aa71c,_0xad81c4]=useState(''),[_0x123cf0,_0x2d0442]=useState(''),[_0x3924df,_0x2d8954]=useState(''),[_0x4c78d0,_0x3a074a]=useState([]),[_0x207218,_0x222011]=useState(null),[_0x59a069,_0x4ba640]=useState(![]),[_0x1735e2,_0x4f36fd]=useState(![]),[_0x375626,_0x2d9bea]=useState(![]),[_0x752721,_0x2bf96a]=useState(0x0),[_0x4456fb,_0x196850]=useState(0x0),_0x592730=_0x3581e0(0x187),_0x1349db=readConfig(),_0x5dff25=typeof _0x1349db[_0x3581e0(0x1aa)]==='string'?_0x1349db[_0x3581e0(0x1aa)]:undefined;function _0x30c9de(_0x4c3d96){const _0x13df4e=_0x3581e0;if(_0x4c3d96['length']>0x32)return{'valid':![],'message':'项目名长度不能超过\x2050\x20个字符'};const _0x190cfc=/^[A-Za-z0-9][A-Za-z0-9_-]*$/;if(_0x4c3d96?.[_0x13df4e(0x173)]()&&!_0x190cfc[_0x13df4e(0x16d)](_0x4c3d96))return{'valid':![],'message':_0x13df4e(0x17e)};return{'valid':!![]};}function _0x3aef77(_0x5c5ec7){const _0x1bc9b1=_0x3581e0;if(!_0x5c5ec7[_0x1bc9b1(0x173)]())return{'valid':!![]};if(_0x5c5ec7[_0x1bc9b1(0x190)]>0x64)return{'valid':![],'message':_0x1bc9b1(0x18b)};const _0x84ac8=/^[a-zA-Z0-9][a-zA-Z0-9_-]*$/;if(!_0x84ac8[_0x1bc9b1(0x16d)](_0x5c5ec7))return{'valid':![],'message':_0x1bc9b1(0x19d)};return{'valid':!![]};}async function _0x572f95(){_0x4ba640(!![]);try{const _0x5cffdb=await getIsSessionValid();return _0x222011(_0x5cffdb),_0x5cffdb;}catch(_0x37843f){return _0x222011(![]),![];}finally{_0x4ba640(![]);}}async function _0x2d4c4e(){_0x4f36fd(!![]);try{const _0x2259a4=await authServer({'silent':!![]});return _0x222011(_0x2259a4),_0x2259a4;}catch(_0x2a7295){return _0x222011(![]),![];}finally{_0x4f36fd(![]);}}return useInput(async(_0x3504df,_0x4a3d14)=>{const _0x3b5db2=_0x3581e0;if(_0x4a3d14[_0x3b5db2(0x178)]||_0x4a3d14['rightArrow']){if(_0x37f45b===_0x3b5db2(0x1a2)){_0x2bf96a(_0x4847f2=>_0x4847f2===0x0?0x1:0x0);return;}if(_0x37f45b===_0x3b5db2(0x192)){_0x196850(_0x5b63d8=>_0x5b63d8===0x0?0x1:0x0);return;}}if(_0x4a3d14['return']){if(_0x37f45b===_0x3b5db2(0x19c)){const _0x35e836=_0x123cf0[_0x3b5db2(0x173)]()||_0x592730;if(_0x3924df)return;_0x33b989(_0x35e836),_0x3a074a([{'step':_0x3b5db2(0x19c),'label':_0x3b5db2(0x16a),'value':_0x35e836}]),_0x2d0442(''),_0x2d8954(''),_0x48936b(_0x3b5db2(0x179));return;}if(_0x37f45b==='app-code'){if(_0x3924df)return;const _0x586c58=_0x123cf0[_0x3b5db2(0x173)]();_0xad81c4(_0x586c58),_0x3a074a(_0x5a52a8=>[..._0x5a52a8,{'step':_0x3b5db2(0x179),'label':_0x3b5db2(0x1a6),'value':_0x586c58||_0x3b5db2(0x1a1)}]),_0x2d0442(''),_0x2d8954('');if(_0x586c58){_0x48936b(_0x3b5db2(0x174));const _0x3343df=await _0x572f95();_0x3343df?_0x48936b(_0x3b5db2(0x1a2)):_0x48936b(_0x3b5db2(0x192));}else{const _0x2c44f0=_0x40231b||_0x5dff25||_0x3b5db2(0x17a);_0x52d0cb({'projectName':_0x31e5d4,'appCode':undefined,'pullApi':![],'env':_0x2c44f0}),_0x48936b(_0x3b5db2(0x16c));}return;}if(_0x37f45b===_0x3b5db2(0x1a2)){const _0x318c42=_0x752721===0x0;_0x2d9bea(_0x318c42),_0x3a074a(_0x56a455=>[..._0x56a455,{'step':'api-pull','label':_0x3b5db2(0x175),'value':_0x318c42?'是':'否'}]);const _0x2779e2=_0x40231b||_0x5dff25||_0x3b5db2(0x17a);_0x52d0cb({'projectName':_0x31e5d4,'appCode':_0x5aa71c,'pullApi':_0x318c42,'env':_0x2779e2}),_0x48936b(_0x3b5db2(0x16c));return;}if(_0x37f45b==='login-prompt'){const _0x10a38b=_0x4456fb===0x0;if(_0x10a38b){_0x48936b(_0x3b5db2(0x16b));const _0x3b421f=await _0x2d4c4e();if(_0x3b421f)_0x3a074a(_0x2c3d7f=>[..._0x2c3d7f,{'step':_0x3b5db2(0x181),'label':_0x3b5db2(0x191),'value':'已登录'}]),_0x48936b(_0x3b5db2(0x1a2));else{_0x3a074a(_0x308f19=>[..._0x308f19,{'step':_0x3b5db2(0x181),'label':_0x3b5db2(0x191),'value':_0x3b5db2(0x197)}]);const _0x56a05c=_0x40231b||_0x5dff25||'online';_0x52d0cb({'projectName':_0x31e5d4,'appCode':_0x5aa71c,'pullApi':![],'env':_0x56a05c}),_0x48936b(_0x3b5db2(0x16c));}}else{_0x3a074a(_0x49e04f=>[..._0x49e04f,{'step':_0x3b5db2(0x181),'label':'登录状态','value':_0x3b5db2(0x185)}]);const _0xe7c88d=_0x40231b||_0x5dff25||_0x3b5db2(0x17a);_0x52d0cb({'projectName':_0x31e5d4,'appCode':_0x5aa71c,'pullApi':![],'env':_0xe7c88d}),_0x48936b(_0x3b5db2(0x16c));}return;}}if(_0x4a3d14[_0x3b5db2(0x193)]||_0x4a3d14[_0x3b5db2(0x169)]){_0x2d0442(_0x1809c3=>{const _0x21df60=_0x3b5db2,_0x203c3c=_0x1809c3[_0x21df60(0x186)](0x0,-0x1);if(_0x37f45b==='project-name'){const {valid:_0x3f15dd,message:_0x34f29a}=_0x30c9de(_0x203c3c);_0x2d8954(_0x3f15dd?'':_0x34f29a||_0x21df60(0x194));}else{if(_0x37f45b===_0x21df60(0x179)){const {valid:_0x2cb071,message:_0x5d4d28}=_0x3aef77(_0x203c3c);_0x2d8954(_0x2cb071?'':_0x5d4d28||_0x21df60(0x17c));}}return _0x203c3c;});return;}if([_0x3b5db2(0x16c),_0x3b5db2(0x174),'login-process'][_0x3b5db2(0x195)](_0x37f45b))return;if(_0x37f45b==='confirm-api-pull'||_0x37f45b===_0x3b5db2(0x192))return;_0x2d0442(_0x333308=>{const _0x4bd8f6=_0x3b5db2,_0x64a89=_0x333308+_0x3504df;if(_0x37f45b===_0x4bd8f6(0x19c)){const {valid:_0x4c3b1e,message:_0x151af1}=_0x30c9de(_0x64a89);_0x2d8954(_0x4c3b1e?'':_0x151af1||_0x4bd8f6(0x194));}else{if(_0x37f45b===_0x4bd8f6(0x179)){const {valid:_0x588dcc,message:_0x4c9f6b}=_0x3aef77(_0x64a89);_0x2d8954(_0x588dcc?'':_0x4c9f6b||'应用AppCode不合法');}}return _0x64a89;});}),a41_0x7f3309(Box,{'flexDirection':_0x3581e0(0x1a4),'marginTop':0x1,'children':[_0x4c78d0[_0x3581e0(0x190)]===0x0&&a41_0x264e77(Box,{'children':a41_0x264e77(Text,{'color':_0x3581e0(0x16e),'children':_0x3581e0(0x170)})}),_0x4c78d0[_0x3581e0(0x184)](_0x57f16f=>a41_0x7f3309(Box,{'children':[a41_0x7f3309(Text,{'color':'green','children':['√\x20',_0x57f16f[_0x3581e0(0x17b)],':\x20']}),a41_0x264e77(Text,{'color':'cyan','children':_0x57f16f[_0x3581e0(0x189)]})]},_0x57f16f[_0x3581e0(0x176)])),_0x37f45b===_0x3581e0(0x19c)&&a41_0x7f3309(a41_0xaffb98,{'children':[a41_0x7f3309(Box,{'children':[a41_0x264e77(Text,{'children':_0x3581e0(0x1a7)}),_0x123cf0?a41_0x264e77(Text,{'color':'green','children':_0x123cf0}):a41_0x264e77(Text,{'color':_0x3581e0(0x1a8),'children':_0x592730}),_0x3924df&&a41_0x7f3309(Text,{'color':'red','children':[_0x3581e0(0x198),_0x3924df]})]}),!_0x3924df&&!_0x123cf0&&a41_0x264e77(Box,{'children':a41_0x264e77(Text,{'color':'gray','children':_0x3581e0(0x17d)})})]}),_0x37f45b===_0x3581e0(0x179)&&a41_0x7f3309(a41_0xaffb98,{'children':[a41_0x7f3309(Box,{'children':[a41_0x264e77(Text,{'children':_0x3581e0(0x1a3)}),a41_0x264e77(Text,{'color':_0x3581e0(0x1a8),'children':_0x3581e0(0x1a9)}),a41_0x264e77(Text,{'color':_0x3581e0(0x171),'children':_0x123cf0}),_0x3924df&&a41_0x7f3309(Text,{'color':_0x3581e0(0x183),'children':['\x20←\x20',_0x3924df]})]}),!_0x3924df&&a41_0x264e77(Box,{'children':a41_0x7f3309(Text,{'color':_0x3581e0(0x1a8),'children':['\x20',_0x3581e0(0x18c)]})})]}),_0x37f45b===_0x3581e0(0x174)&&a41_0x7f3309(Box,{'children':[a41_0x264e77(Text,{'children':_0x3581e0(0x18e)}),_0x59a069&&a41_0x264e77(Text,{'color':_0x3581e0(0x1a8),'children':_0x3581e0(0x18a)})]}),_0x37f45b==='confirm-api-pull'&&a41_0x7f3309(a41_0xaffb98,{'children':[a41_0x264e77(Box,{'children':a41_0x264e77(Text,{'color':_0x3581e0(0x171),'children':_0x3581e0(0x17f)})}),a41_0x264e77(Box,{'marginTop':0x1,'children':a41_0x264e77(Text,{'children':'*\x20是否要自动拉取\x20API\x20配置?'})}),a41_0x7f3309(Box,{'marginLeft':0x2,'children':[a41_0x7f3309(Text,{'color':_0x752721===0x0?_0x3581e0(0x171):_0x3581e0(0x1a8),'children':[_0x752721===0x0?'▶\x20':'\x20\x20',_0x3581e0(0x16f)]}),a41_0x264e77(Text,{'children':'\x20'}),a41_0x7f3309(Text,{'color':_0x752721===0x1?'green':'gray','children':[_0x752721===0x1?'▶\x20':'\x20\x20','No']})]}),a41_0x264e77(Box,{'children':a41_0x264e77(Text,{'color':_0x3581e0(0x1a8),'children':'\x20\x20使用\x20←→\x20选择,回车确认'})}),a41_0x264e77(Box,{'children':a41_0x264e77(Text,{'color':_0x3581e0(0x199),'children':_0x3581e0(0x182)})})]}),_0x37f45b==='login-prompt'&&a41_0x7f3309(a41_0xaffb98,{'children':[a41_0x264e77(Box,{'children':a41_0x264e77(Text,{'color':_0x3581e0(0x199),'children':_0x3581e0(0x1ab)})}),a41_0x264e77(Box,{'marginTop':0x1,'children':a41_0x264e77(Text,{'children':_0x3581e0(0x19e)})}),a41_0x7f3309(Box,{'marginLeft':0x2,'children':[a41_0x7f3309(Text,{'color':_0x4456fb===0x0?'green':_0x3581e0(0x1a8),'children':[_0x4456fb===0x0?'▶\x20':'\x20\x20',_0x3581e0(0x16f)]}),a41_0x264e77(Text,{'children':'\x20'}),a41_0x7f3309(Text,{'color':_0x4456fb===0x1?_0x3581e0(0x171):_0x3581e0(0x1a8),'children':[_0x4456fb===0x1?'▶\x20':'\x20\x20','No']})]}),a41_0x264e77(Box,{'children':a41_0x264e77(Text,{'color':_0x3581e0(0x1a8),'children':_0x3581e0(0x196)})}),a41_0x264e77(Box,{'children':a41_0x264e77(Text,{'color':_0x3581e0(0x199),'children':'\x20\x20推荐选择\x20Yes,登录后可自动拉取并配置\x20API\x20接口'})})]}),_0x37f45b===_0x3581e0(0x16b)&&a41_0x7f3309(Box,{'children':[a41_0x264e77(Text,{'children':_0x3581e0(0x18d)}),_0x1735e2&&a41_0x264e77(Text,{'color':'gray','children':'\x20登录中...'})]})]});}function a41_0x1835(){const _0x21eca5=['绑定应用AppCode可自动配置\x20API,如:\x20app-c4c89304\x20(直接回车跳过)','*\x20正在登录,请前往浏览器完成登录...','*\x20正在检查登录状态...','5797088czPpih','length','登录状态','login-prompt','backspace','项目名不合法','includes','\x20\x20使用\x20←→\x20选择,回车确认','登录失败','\x20←\x20','yellow','1867990gYImhZ','969702yNgzqC','project-name','应用AppCode只能包含字母、数字、连字符和下划线,且必须以字母或数字开头','*\x20是否要先登录以便拉取\x20API\x20配置?','8eyDzkc','2134559akjPIs','未设置','confirm-api-pull','*\x20应用AppCode\x20','column','76CQROLG','应用AppCode','*\x20项目名:\x20','gray','[可选]:\x20','env','!\x20未检测到有效登录','743010bFvUcC','delete','项目名','login-process','creating','test','cyan','Yes','*\x20创建新项目','green','9pkwuHc','trim','login-check','拉取API配置','step','1934QMhAva','leftArrow','app-code','online','label','应用AppCode不合法','\x20直接回车确认,或输入自定义名称','项目名只能以字母或数字开头,且只包含字母、数字、-\x20和\x20_','√\x20检测到有效登录状态','26007ZmuMwx','login','\x20\x20推荐选择\x20Yes,可自动配置\x20API\x20接口','red','map','跳过登录','slice','my-app','97ruymar','value','\x20检查中...','应用AppCode长度不能超过\x20100\x20个字符'];a41_0x1835=function(){return _0x21eca5;};return a41_0x1835();}
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 +1 @@
1
- function a42_0x36a9(_0x406cc8,_0x217eb6){_0x406cc8=_0x406cc8-0x14b;const _0x899da9=a42_0x899d();let _0x36a9ea=_0x899da9[_0x406cc8];return _0x36a9ea;}(function(_0x5132d0,_0x999468){const _0xaf26c3=a42_0x36a9,_0x2b6d51=_0x5132d0();while(!![]){try{const _0x309401=parseInt(_0xaf26c3(0x14c))/0x1+parseInt(_0xaf26c3(0x152))/0x2+-parseInt(_0xaf26c3(0x151))/0x3+parseInt(_0xaf26c3(0x153))/0x4*(-parseInt(_0xaf26c3(0x14b))/0x5)+parseInt(_0xaf26c3(0x14d))/0x6+parseInt(_0xaf26c3(0x155))/0x7*(-parseInt(_0xaf26c3(0x150))/0x8)+parseInt(_0xaf26c3(0x14e))/0x9;if(_0x309401===_0x999468)break;else _0x2b6d51['push'](_0x2b6d51['shift']());}catch(_0x156887){_0x2b6d51['push'](_0x2b6d51['shift']());}}}(a42_0x899d,0xf3eff));function a42_0x899d(){const _0x1aa152=['replace','79288uMkulq','1812291tUmmze','1976766idasTF','2503804RjIeKH','toFixed','364tmmpBy','15mBnceQ','488660YvhAdo','6669282jOtVlq','12671091bTFiRg'];a42_0x899d=function(){return _0x1aa152;};return a42_0x899d();}export function formatElapsed(_0x5e0a55){const _0x40f211=a42_0x36a9,_0x353354=Date['now']()-_0x5e0a55;if(_0x353354<0x3e8)return _0x353354+'ms';const _0x46f603=(_0x353354/0x3e8)[_0x40f211(0x154)](0x2),_0x243443=_0x46f603[_0x40f211(0x14f)](/\.?0+$/u,'');return _0x243443+'s';}
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 +1 @@
1
- (function(_0x187b1e,_0x410917){const _0x108b76=a43_0x4b61,_0x370c70=_0x187b1e();while(!![]){try{const _0x5cdcbe=parseInt(_0x108b76(0xe4))/0x1+parseInt(_0x108b76(0xd3))/0x2+parseInt(_0x108b76(0xe3))/0x3*(-parseInt(_0x108b76(0xda))/0x4)+parseInt(_0x108b76(0xb2))/0x5*(-parseInt(_0x108b76(0xbb))/0x6)+-parseInt(_0x108b76(0x9c))/0x7*(-parseInt(_0x108b76(0xd9))/0x8)+-parseInt(_0x108b76(0xbc))/0x9*(-parseInt(_0x108b76(0xa1))/0xa)+-parseInt(_0x108b76(0xa6))/0xb;if(_0x5cdcbe===_0x410917)break;else _0x370c70['push'](_0x370c70['shift']());}catch(_0x4bdac0){_0x370c70['push'](_0x370c70['shift']());}}}(a43_0x10f6,0x43f91));import{jsx as a43_0x32eb99,Fragment as a43_0x4cc24c,jsxs as a43_0x2ba9da}from'react/jsx-runtime';import a43_0x596acd from'node:path';import a43_0x1a8784 from'node:fs';import{fileURLToPath}from'node:url';import{Box,Text}from'ink';import{useEffect,useState}from'react';function a43_0x4b61(_0x1ecc31,_0x5124ca){_0x1ecc31=_0x1ecc31-0x8b;const _0x10f609=a43_0x10f6();let _0x4b61b8=_0x10f609[_0x1ecc31];return _0x4b61b8;}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';function a43_0x10f6(){const _0x460626=['更新\x20package.json\x20name\x20和\x20description\x20字段','existsSync','readFileSync','online','pullApi','配置AppCode:\x20','utf8','length','23508kgRaNF','135oVmhiH','error','create','repeat','!\x20API\x20配置拉取异常,项目已创建,可稍后手动执行:\x20lovrabet\x20api\x20pull','×\x20项目目录\x20','.lovrabetrc','column','📦\x20API配置:\x20','🎉\x20项目创建成功!','gray','!\x20API\x20配置拉取失败,可稍后手动执行:\x20lovrabet\x20api\x20pull','yellow','version','\x20√\x20','*\x20正在为项目\x20','doTask','项目创建失败:\x20','success','更新\x20package.json\x20失败:\x20','×\x20项目名包含非法字符,不允许使用:\x20<\x20>\x20:\x20\x22\x20|\x20?\x20*\x20及控制字符','拉取API配置:\x20','parse','103022IIchXp','warn','配置应用AppCode失败:\x20','1.0.0','开始创建项目:\x20','accessSync','16ZUwTxc','4BslEVU','writeFileSync','√\x20配置文件已创建,应用AppCode:\x20','lovrabet\x20api\x20pull','message','stringify','cwd','white','🔗\x20应用AppCode:\x20','1073238skLUpS','209718CglNYk','join','test','已自动拉取\x20✓','description','清理项目目录失败:\x20','未配置','info','dirname','🚀\x20接下来可以:','cd\x20','projectCode','env','projectName','cyan','../..','\x20创建配置文件','×\x20无法在当前目录创建项目,请检查目录权限','API\x20配置拉取失败:\x20','\x20&&\x20lovrabet\x20start','*\x20正在拉取\x20API\x20配置...','2.\x20','📁\x20项目名称:\x20','465766jnzeXj','*\x20配置文件路径:\x20','√\x20package.json\x20已更新:\x20name=','toLocaleString','\x20|\x20应用AppCode:\x20','268980vTwPgH','×\x20项目名不能为空','需手动拉取','string','3.\x20','355498GgwFFh','appCode','setLogPath',',\x20description=','resolve','green','项目名称:\x20','log','package.json','√\x20配置文件已创建,可稍后使用\x20\x27lovrabet\x20config\x20set\x20appcode\x20<app-code>\x27\x20配置','×\x20项目创建失败:\x20','rmSync','165oTOUFY'];a43_0x10f6=function(){return _0x460626;};return a43_0x10f6();}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(_0x2f58ba){const _0x434095=a43_0x4b61,[_0x1d5947,_0x16604f]=useState(![]),[_0x137868,_0x124059]=useState(![]),[_0x560629,_0x297c88]=useState(null),_0x49f1b6=useCopyProjectTemplate(),_0x521fe6=useInstallDependencies(),_0x2d78ff=useFormatCode(),_0x469b55=async _0x528cba=>{const _0x5bc2e3=a43_0x4b61;if(!_0x528cba['projectName']||_0x528cba[_0x5bc2e3(0x92)]['trim']()===''){console[_0x5bc2e3(0xbd)](_0x5bc2e3(0xa2));return;}const _0x4fc2ec=/[<>:"|?*\x00-\x1f\x7f]/;if(_0x4fc2ec[_0x5bc2e3(0xe6)](_0x528cba[_0x5bc2e3(0x92)])){console['error'](_0x5bc2e3(0xd0));return;}if(_0x528cba[_0x5bc2e3(0x92)][_0x5bc2e3(0xba)]>0x64){console['error']('×\x20项目名过长,最多支持\x20100\x20个字符');return;}const _0xeeec8d=a43_0x596acd[_0x5bc2e3(0xaa)](process[_0x5bc2e3(0xe0)](),_0x528cba['projectName']);if(a43_0x1a8784[_0x5bc2e3(0xb4)](_0xeeec8d)){console[_0x5bc2e3(0xbd)](_0x5bc2e3(0xc1)+_0x528cba['projectName']+'\x20已存在,请使用其他项目名');return;}try{const _0x3017cd=a43_0x596acd['dirname'](_0xeeec8d);a43_0x1a8784[_0x5bc2e3(0xd8)](_0x3017cd,a43_0x1a8784['constants']['W_OK']);}catch(_0x25910b){console[_0x5bc2e3(0xbd)](_0x5bc2e3(0x96));return;}_0x297c88(_0x528cba),_0x16604f(!![]),logger[_0x5bc2e3(0xa8)](_0xeeec8d),logger[_0x5bc2e3(0x8c)](_0x5bc2e3(0xbe),_0x5bc2e3(0xd7)+_0x528cba[_0x5bc2e3(0x92)],{'projectDir':_0xeeec8d,'appCode':_0x528cba[_0x5bc2e3(0xa7)]});try{await _0x49f1b6[_0x5bc2e3(0xcc)](_0x528cba[_0x5bc2e3(0x92)]),await _0x2ad07c(_0x528cba['projectName']),await _0x521fe6[_0x5bc2e3(0xcc)](_0x528cba['projectName']),await _0x2d78ff['doTask'](_0x528cba[_0x5bc2e3(0x92)]),await _0x49eda3(_0x528cba[_0x5bc2e3(0x92)],_0x528cba['appCode']||'',_0x528cba[_0x5bc2e3(0x91)]);if(_0x528cba[_0x5bc2e3(0xb7)]&&_0x528cba[_0x5bc2e3(0xa7)]){console[_0x5bc2e3(0xad)](_0x5bc2e3(0x99));try{const _0x35f3f4=await pullApiSilent(_0x528cba['appCode'],undefined,_0xeeec8d,_0x528cba[_0x5bc2e3(0x91)]);_0x35f3f4?(console[_0x5bc2e3(0xad)]('√\x20API\x20配置拉取完成'),logger['info']('create','API\x20配置拉取成功:\x20'+_0x528cba[_0x5bc2e3(0xa7)],{'projectDir':_0xeeec8d,'appCode':_0x528cba[_0x5bc2e3(0xa7)],'env':_0x528cba[_0x5bc2e3(0x91)]})):(console['log'](_0x5bc2e3(0xc7)),logger[_0x5bc2e3(0xd4)]('create',_0x5bc2e3(0x97)+_0x528cba[_0x5bc2e3(0xa7)],{'projectDir':_0xeeec8d,'appCode':_0x528cba[_0x5bc2e3(0xa7)],'env':_0x528cba[_0x5bc2e3(0x91)]}));}catch(_0x4261f4){console[_0x5bc2e3(0xad)](_0x5bc2e3(0xc0)),logger[_0x5bc2e3(0xd4)](_0x5bc2e3(0xbe),'API\x20配置拉取异常:\x20'+_0x528cba[_0x5bc2e3(0xa7)],{'projectDir':_0xeeec8d,'appCode':_0x528cba[_0x5bc2e3(0xa7)],'env':_0x528cba['env'],'error':_0x4261f4 instanceof Error?_0x4261f4[_0x5bc2e3(0xde)]:String(_0x4261f4)});}}logger[_0x5bc2e3(0xce)](_0x5bc2e3(0xbe),'项目创建完成:\x20'+_0x528cba[_0x5bc2e3(0x92)]),_0x124059(!![]),_0x16604f(![]);}catch(_0x378bfa){logger['error'](_0x5bc2e3(0xbe),_0x5bc2e3(0xcd)+_0x528cba[_0x5bc2e3(0x92)],{'error':_0x378bfa instanceof Error?_0x378bfa['message']:String(_0x378bfa)});try{a43_0x1a8784[_0x5bc2e3(0xb4)](_0xeeec8d)&&(console[_0x5bc2e3(0xad)]('*\x20清理失败的项目目录:\x20'+_0xeeec8d),a43_0x1a8784[_0x5bc2e3(0xb1)](_0xeeec8d,{'recursive':!![],'force':!![]}));}catch(_0x5933a5){logger[_0x5bc2e3(0xd4)](_0x5bc2e3(0xbe),_0x5bc2e3(0xe9)+_0xeeec8d,{'error':_0x5933a5 instanceof Error?_0x5933a5[_0x5bc2e3(0xde)]:String(_0x5933a5)});}_0x16604f(![]),console[_0x5bc2e3(0xbd)](_0x5bc2e3(0xb0)+(_0x378bfa instanceof Error?_0x378bfa['message']:String(_0x378bfa)));}},_0x569b4d=async _0x3cfe40=>{await _0x469b55({'projectName':_0x3cfe40,'env':_0x2f58ba['env']});},_0x2ad07c=async _0x3f0ff8=>{const _0x3f556c=a43_0x4b61,_0x5de38d=a43_0x596acd[_0x3f556c(0xaa)](process[_0x3f556c(0xe0)](),_0x3f0ff8),_0x6ad52a=a43_0x596acd['join'](_0x5de38d,_0x3f556c(0xae));try{console[_0x3f556c(0xad)]('*\x20正在更新\x20package.json\x20的\x20name\x20和\x20description\x20字段');const _0x88ebe9=fileURLToPath(import.meta.url),_0x20f339=a43_0x596acd[_0x3f556c(0xaa)](a43_0x596acd[_0x3f556c(0x8d)](_0x88ebe9),_0x3f556c(0x94)),_0x345bef=a43_0x596acd[_0x3f556c(0xe5)](_0x20f339,'package.json');let _0x870c08=_0x3f556c(0xd6);try{const _0x101638=JSON[_0x3f556c(0xd2)](a43_0x1a8784[_0x3f556c(0xb5)](_0x345bef,_0x3f556c(0xb9)));_0x870c08=_0x101638[_0x3f556c(0xc9)]||_0x3f556c(0xd6);}catch(_0x42e885){}const _0x3a9133=a43_0x1a8784['readFileSync'](_0x6ad52a,_0x3f556c(0xb9)),_0x434da7=JSON[_0x3f556c(0xd2)](_0x3a9133);_0x434da7['name']=_0x3f0ff8,_0x434da7['description']=_0x3f0ff8+'\x20Generated\x20by\x20lovrabet\x20cli\x20'+_0x870c08,a43_0x1a8784[_0x3f556c(0xdb)](_0x6ad52a,JSON[_0x3f556c(0xdf)](_0x434da7,null,0x2)+'\x0a',_0x3f556c(0xb9)),console['log'](_0x3f556c(0x9e)+_0x3f0ff8+_0x3f556c(0xa9)+_0x434da7[_0x3f556c(0xe8)]),logger['info']('create',_0x3f556c(0xb3),{'projectName':_0x3f0ff8,'description':_0x434da7[_0x3f556c(0xe8)],'cliVersion':_0x870c08,'packageJsonPath':_0x3f556c(0xae)});}catch(_0x3e6c4c){logger[_0x3f556c(0xbd)]('create',_0x3f556c(0xcf)+_0x3f0ff8,{'projectName':_0x3f0ff8,'error':_0x3e6c4c instanceof Error?_0x3e6c4c['message']:String(_0x3e6c4c)});throw _0x3e6c4c;}},_0x49eda3=async(_0x24827d,_0x240911,_0x2addb5)=>{const _0x12010f=a43_0x4b61,_0x1000b5=a43_0x596acd[_0x12010f(0xaa)](process[_0x12010f(0xe0)](),_0x24827d),_0xea4fbf=a43_0x596acd[_0x12010f(0xe5)](_0x1000b5,_0x12010f(0xc2));try{_0x240911?console[_0x12010f(0xad)](_0x12010f(0xcb)+_0x24827d+'\x20配置应用AppCode:\x20'+_0x240911):console[_0x12010f(0xad)](_0x12010f(0xcb)+_0x24827d+_0x12010f(0x95));console['log'](_0x12010f(0x9d)+_0xea4fbf);const _0x11ffa9=fileURLToPath(import.meta.url),_0x50f092=a43_0x596acd[_0x12010f(0xaa)](a43_0x596acd[_0x12010f(0x8d)](_0x11ffa9),'../..'),_0x304655=a43_0x596acd['join'](_0x50f092,_0x12010f(0xae));let _0x1ffcef=_0x12010f(0xd6);try{const _0x24ab2c=JSON[_0x12010f(0xd2)](a43_0x1a8784[_0x12010f(0xb5)](_0x304655,'utf8'));_0x1ffcef=_0x24ab2c['version']||_0x12010f(0xd6);}catch(_0x42cbd4){}const _0x282284=readConfig(),_0x5b9932=typeof _0x282284[_0x12010f(0x91)]===_0x12010f(0xa4)?_0x282284[_0x12010f(0x91)]:undefined,{app:_0x378458,appcode:_0x3e26b5,..._0x35c634}=_0x282284,_0x1e84d1={..._0x35c634,'appcode':_0x240911||'','env':_0x2addb5||_0x5b9932||_0x12010f(0xb6),'createdAt':new Date()[_0x12010f(0x9f)](),'version':_0x1ffcef};a43_0x1a8784['writeFileSync'](_0xea4fbf,JSON['stringify'](_0x1e84d1,null,0x2),_0x12010f(0xb9)),_0x240911?console[_0x12010f(0xad)](_0x12010f(0xdc)+_0x240911):console[_0x12010f(0xad)](_0x12010f(0xaf)),logger[_0x12010f(0x8c)](_0x12010f(0xbe),'配置应用AppCode:\x20'+_0x240911,{'projectName':_0x24827d,'configFile':_0x12010f(0xc2)});}catch(_0x1e2fb5){logger[_0x12010f(0xbd)](_0x12010f(0xbe),_0x12010f(0xd5)+_0x240911,{'projectName':_0x24827d,'error':_0x1e2fb5 instanceof Error?_0x1e2fb5[_0x12010f(0xde)]:String(_0x1e2fb5)});}};useEffect(()=>{const _0xa4025d=a43_0x4b61;_0x2f58ba[_0xa4025d(0x90)]&&_0x569b4d(_0x2f58ba[_0xa4025d(0x90)]);},[_0x2f58ba[_0x434095(0x90)]]);if(!_0x1d5947&&!_0x137868&&!_0x2f58ba[_0x434095(0x90)])return a43_0x32eb99(EnhancedGuidedCreate,{'onCreate':_0x469b55,'env':_0x2f58ba[_0x434095(0x91)]});if(_0x1d5947)return a43_0x2ba9da(a43_0x4cc24c,{'children':[a43_0x2ba9da(Box,{'marginTop':0x1,'children':[a43_0x32eb99(Box,{'width':'1'}),a43_0x32eb99(Text,{'color':'green','children':_0x434095(0xca)}),a43_0x32eb99(Text,{'children':_0x434095(0xac)}),a43_0x32eb99(Text,{'color':_0x434095(0xab),'children':_0x560629?.[_0x434095(0x92)]}),_0x560629?.['appCode']&&a43_0x2ba9da(a43_0x4cc24c,{'children':[a43_0x32eb99(Text,{'children':_0x434095(0xa0)}),a43_0x32eb99(Text,{'color':_0x434095(0x93),'children':_0x560629[_0x434095(0xa7)]})]})]}),a43_0x32eb99(TaskRunning,{..._0x49f1b6}),a43_0x32eb99(TaskRunning,{..._0x521fe6}),a43_0x32eb99(TaskRunning,{..._0x2d78ff})]});if(_0x137868)return a43_0x2ba9da(a43_0x4cc24c,{'children':[a43_0x2ba9da(Box,{'marginTop':0x1,'children':[a43_0x32eb99(Box,{'width':'1'}),a43_0x32eb99(Text,{'color':_0x434095(0xab),'children':_0x434095(0xca)}),a43_0x32eb99(Text,{'children':'项目名称:\x20'}),a43_0x32eb99(Text,{'color':_0x434095(0xab),'children':_0x560629?.[_0x434095(0x92)]}),_0x560629?.['appCode']&&a43_0x2ba9da(a43_0x4cc24c,{'children':[a43_0x32eb99(Text,{'children':_0x434095(0xa0)}),a43_0x32eb99(Text,{'color':_0x434095(0x93),'children':_0x560629['appCode']})]})]}),a43_0x32eb99(TaskFinished,{..._0x49f1b6}),a43_0x32eb99(TaskFinished,{..._0x521fe6}),a43_0x32eb99(TaskFinished,{..._0x2d78ff}),a43_0x32eb99(Box,{'marginTop':0x1,'marginBottom':0x1,'children':a43_0x32eb99(Text,{'color':_0x434095(0xab),'children':'─'[_0x434095(0xbf)](0x3c)})}),a43_0x32eb99(Box,{'children':a43_0x32eb99(Text,{'color':'green','bold':!![],'children':_0x434095(0xc5)})}),a43_0x2ba9da(Box,{'marginTop':0x1,'flexDirection':_0x434095(0xc3),'children':[a43_0x2ba9da(Box,{'children':[a43_0x32eb99(Text,{'color':_0x434095(0x93),'children':_0x434095(0x9b)}),a43_0x32eb99(Text,{'color':_0x434095(0xe1),'bold':!![],'children':_0x560629?.[_0x434095(0x92)]})]}),_0x560629?.[_0x434095(0xa7)]&&a43_0x2ba9da(Box,{'children':[a43_0x32eb99(Text,{'color':'cyan','children':_0x434095(0xe2)}),a43_0x32eb99(Text,{'color':_0x434095(0xe1),'bold':!![],'children':_0x560629[_0x434095(0xa7)]})]}),a43_0x2ba9da(Box,{'children':[a43_0x32eb99(Text,{'color':_0x434095(0x93),'children':_0x434095(0xc4)}),_0x560629?.['pullApi']?a43_0x32eb99(Text,{'color':_0x434095(0xab),'bold':!![],'children':_0x434095(0xe7)}):_0x560629?.[_0x434095(0xa7)]?a43_0x32eb99(Text,{'color':_0x434095(0xc8),'bold':!![],'children':_0x434095(0xa3)}):a43_0x32eb99(Text,{'color':_0x434095(0xc6),'bold':!![],'children':_0x434095(0x8b)})]})]}),a43_0x32eb99(Box,{'marginTop':0x1,'marginBottom':0x1,'children':a43_0x32eb99(Text,{'color':'cyan','bold':!![],'children':_0x434095(0x8e)})}),a43_0x2ba9da(Box,{'marginLeft':0x2,'flexDirection':'column','children':[a43_0x2ba9da(Box,{'children':[a43_0x32eb99(Text,{'color':'green','children':'1.\x20'}),a43_0x32eb99(Text,{'color':_0x434095(0xe1),'children':'启动项目:\x20'}),a43_0x32eb99(Text,{'color':_0x434095(0x93),'bold':!![],'children':_0x434095(0x8f)+_0x560629?.[_0x434095(0x92)]+_0x434095(0x98)})]}),_0x560629?.[_0x434095(0xa7)]&&!_0x560629?.[_0x434095(0xb7)]&&a43_0x2ba9da(Box,{'children':[a43_0x32eb99(Text,{'color':'yellow','children':_0x434095(0x9a)}),a43_0x32eb99(Text,{'color':_0x434095(0xe1),'children':_0x434095(0xd1)}),a43_0x32eb99(Text,{'color':_0x434095(0x93),'bold':!![],'children':_0x434095(0xdd)})]}),!_0x560629?.[_0x434095(0xa7)]&&a43_0x2ba9da(a43_0x4cc24c,{'children':[a43_0x2ba9da(Box,{'children':[a43_0x32eb99(Text,{'color':_0x434095(0xc6),'children':'2.\x20'}),a43_0x32eb99(Text,{'color':'white','children':_0x434095(0xb8)}),a43_0x32eb99(Text,{'color':'cyan','bold':!![],'children':'lovrabet\x20config\x20set\x20appcode\x20[app-code]'})]}),a43_0x2ba9da(Box,{'children':[a43_0x32eb99(Text,{'color':'gray','children':_0x434095(0xa5)}),a43_0x32eb99(Text,{'color':'white','children':_0x434095(0xd1)}),a43_0x32eb99(Text,{'color':_0x434095(0x93),'bold':!![],'children':'lovrabet\x20api\x20pull\x20--appcode\x20[app-code]'})]})]})]}),a43_0x32eb99(Box,{'marginTop':0x1,'children':a43_0x32eb99(Text,{'color':_0x434095(0xab),'children':'─'[_0x434095(0xbf)](0x3c)})})]});return null;}
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 +1 @@
1
- function a44_0x5585(_0x1cd21a,_0x253510){_0x1cd21a=_0x1cd21a-0x11f;var _0x24d1c4=a44_0x24d1();var _0x5585f2=_0x24d1c4[_0x1cd21a];return _0x5585f2;}(function(_0x2a725d,_0x528842){var _0x5f59c5=a44_0x5585,_0x4b33eb=_0x2a725d();while(!![]){try{var _0x11c931=-parseInt(_0x5f59c5(0x128))/0x1+-parseInt(_0x5f59c5(0x12a))/0x2*(parseInt(_0x5f59c5(0x122))/0x3)+-parseInt(_0x5f59c5(0x124))/0x4*(parseInt(_0x5f59c5(0x126))/0x5)+-parseInt(_0x5f59c5(0x120))/0x6+-parseInt(_0x5f59c5(0x129))/0x7+-parseInt(_0x5f59c5(0x123))/0x8+parseInt(_0x5f59c5(0x121))/0x9;if(_0x11c931===_0x528842)break;else _0x4b33eb['push'](_0x4b33eb['shift']());}catch(_0x34cd1c){_0x4b33eb['push'](_0x4b33eb['shift']());}}}(a44_0x24d1,0x4a97d));import{jsx as a44_0x421d8d,jsxs as a44_0x39121c}from'react/jsx-runtime';function a44_0x24d1(){var _0x4c987f=['20IpskEW','green','98105VJPCFw','1382801PaVQbP','23262wDbbSM','elapsed','\x20√\x20','1440474JLPZaE','16632873KFtjQb','99LycNYB','1790128fugMGr','399248HDfEeN','taskName'];a44_0x24d1=function(){return _0x4c987f;};return a44_0x24d1();}import{Box,Text}from'ink';import{TaskTime}from'./task-time.js';export function TaskFinished(_0xb05515){var _0xf3fc56=a44_0x5585;return a44_0x39121c(Box,{'children':[a44_0x421d8d(Box,{'width':'1'}),a44_0x421d8d(Text,{'color':_0xf3fc56(0x127),'children':_0xf3fc56(0x11f)}),a44_0x421d8d(Text,{'children':_0xb05515[_0xf3fc56(0x125)]}),a44_0x421d8d(TaskTime,{'elapsed':_0xb05515[_0xf3fc56(0x12b)]})]});}
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 +1 @@
1
- (function(_0x27daba,_0x12fbe3){var _0x39c3c8=a45_0x5294,_0x1f1aa9=_0x27daba();while(!![]){try{var _0x38184f=parseInt(_0x39c3c8(0x7f))/0x1+parseInt(_0x39c3c8(0x83))/0x2*(parseInt(_0x39c3c8(0x82))/0x3)+-parseInt(_0x39c3c8(0x87))/0x4*(parseInt(_0x39c3c8(0x84))/0x5)+-parseInt(_0x39c3c8(0x85))/0x6*(parseInt(_0x39c3c8(0x7d))/0x7)+parseInt(_0x39c3c8(0x7c))/0x8*(parseInt(_0x39c3c8(0x88))/0x9)+-parseInt(_0x39c3c8(0x89))/0xa+parseInt(_0x39c3c8(0x80))/0xb;if(_0x38184f===_0x12fbe3)break;else _0x1f1aa9['push'](_0x1f1aa9['shift']());}catch(_0x1d1398){_0x1f1aa9['push'](_0x1f1aa9['shift']());}}}(a45_0x4ce4,0x42a96));function a45_0x4ce4(){var _0xdcb1c3=['11034243cAQjME','\x20√\x20','592278CYfLLb','4CYyMrF','1255qGclPz','3342XTLZUW','dots','5592bRVvim','1020753tTTHpn','3813620nFxqyk','\x20\x20\x20','loading','8YzTvIz','6447dFzJml','green','6921AyFSrK'];a45_0x4ce4=function(){return _0xdcb1c3;};return a45_0x4ce4();}function a45_0x5294(_0x25c583,_0x55912f){_0x25c583=_0x25c583-0x7b;var _0x4ce485=a45_0x4ce4();var _0x529403=_0x4ce485[_0x25c583];return _0x529403;}import{jsx as a45_0x5500a3,jsxs as a45_0x5a78ca}from'react/jsx-runtime';import{Text}from'ink';import a45_0x1d9490 from'ink-spinner';export function TaskLoading(_0x5f7005){var _0x2fca21=a45_0x5294;if(_0x5f7005['finished'])return a45_0x5500a3(Text,{'color':'green','children':_0x2fca21(0x81)});if(_0x5f7005[_0x2fca21(0x7b)])return a45_0x5a78ca(Text,{'color':_0x2fca21(0x7e),'children':['\x20',a45_0x5500a3(a45_0x1d9490,{'type':_0x2fca21(0x86)}),'\x20']});return a45_0x5500a3(Text,{'children':_0x2fca21(0x8a)});}
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 +1 @@
1
- (function(_0xb7e08e,_0x461c6f){var _0x5ea80a=a46_0x2bfb,_0x193a1f=_0xb7e08e();while(!![]){try{var _0x264646=-parseInt(_0x5ea80a(0x1a2))/0x1*(parseInt(_0x5ea80a(0x1a8))/0x2)+parseInt(_0x5ea80a(0x1a6))/0x3+-parseInt(_0x5ea80a(0x1a9))/0x4+-parseInt(_0x5ea80a(0x1a7))/0x5+-parseInt(_0x5ea80a(0x1ab))/0x6*(parseInt(_0x5ea80a(0x1aa))/0x7)+-parseInt(_0x5ea80a(0x1a4))/0x8+parseInt(_0x5ea80a(0x1a3))/0x9;if(_0x264646===_0x461c6f)break;else _0x193a1f['push'](_0x193a1f['shift']());}catch(_0x1b8405){_0x193a1f['push'](_0x193a1f['shift']());}}}(a46_0x29f1,0xec9c1));function a46_0x2bfb(_0x4de4cc,_0x51ede1){_0x4de4cc=_0x4de4cc-0x1a2;var _0x29f19e=a46_0x29f1();var _0x2bfba1=_0x29f19e[_0x4de4cc];return _0x2bfba1;}import{jsx as a46_0x384f86,jsxs as a46_0xfa8bb2}from'react/jsx-runtime';import{Box,Text}from'ink';import{TaskLoading}from'./task-loading.js';function a46_0x29f1(){var _0x39d7f7=['494726WiCpgO','7133460hONJgO','558194EirPDp','6mirmOt','2luRcgy','36113571AHWPhj','6340512wgsrUr','elapsed','5797020iYWOtf','9127045MgnYcF'];a46_0x29f1=function(){return _0x39d7f7;};return a46_0x29f1();}import{TaskTime}from'./task-time.js';export function TaskRunning(_0x623afa){var _0x4620fb=a46_0x2bfb;return a46_0xfa8bb2(Box,{'children':[a46_0x384f86(Box,{'width':'1'}),a46_0x384f86(TaskLoading,{..._0x623afa}),a46_0x384f86(Text,{'children':_0x623afa['taskName']}),a46_0x384f86(TaskTime,{'elapsed':_0x623afa[_0x4620fb(0x1a5)]})]});}
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 +1 @@
1
- (function(_0x4e8730,_0x72d777){var _0x28e7fe=a47_0x12eb,_0x3c0996=_0x4e8730();while(!![]){try{var _0x8e3bf0=-parseInt(_0x28e7fe(0x16a))/0x1+-parseInt(_0x28e7fe(0x170))/0x2+parseInt(_0x28e7fe(0x16d))/0x3*(parseInt(_0x28e7fe(0x173))/0x4)+-parseInt(_0x28e7fe(0x16f))/0x5*(parseInt(_0x28e7fe(0x16e))/0x6)+parseInt(_0x28e7fe(0x16b))/0x7+-parseInt(_0x28e7fe(0x169))/0x8*(-parseInt(_0x28e7fe(0x16c))/0x9)+-parseInt(_0x28e7fe(0x174))/0xa;if(_0x8e3bf0===_0x72d777)break;else _0x3c0996['push'](_0x3c0996['shift']());}catch(_0xf9659a){_0x3c0996['push'](_0x3c0996['shift']());}}}(a47_0x41f3,0x5cbd0));import{jsx as a47_0x4ea6c7,Fragment as a47_0x3e0bb9,jsxs as a47_0x2106c9}from'react/jsx-runtime';function a47_0x41f3(){var _0x1da2f3=['elapsed','gray','1140684XYcRGI','1359110fKXRzb','375640xaXCGT','512023iUnZil','3846927MrTNGv','63koABeP','6CjDvnM','36GiDINN','183870DjYeMq','400308fcejFb'];a47_0x41f3=function(){return _0x1da2f3;};return a47_0x41f3();}import{Text}from'ink';function a47_0x12eb(_0xca8913,_0x50ea97){_0xca8913=_0xca8913-0x169;var _0x41f30e=a47_0x41f3();var _0x12ebf8=_0x41f30e[_0xca8913];return _0x12ebf8;}export function TaskTime(_0x43b136){var _0xccd6d8=a47_0x12eb;if(_0x43b136[_0xccd6d8(0x171)])return a47_0x2106c9(a47_0x3e0bb9,{'children':[a47_0x4ea6c7(Text,{'color':_0xccd6d8(0x172),'children':'\x20['}),a47_0x4ea6c7(Text,{'color':'gray','bold':!![],'children':_0x43b136[_0xccd6d8(0x171)]}),a47_0x4ea6c7(Text,{'color':_0xccd6d8(0x172),'children':']'})]});return null;}
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 +1 @@
1
- const a48_0x397d08=a48_0x521f;(function(_0x394a88,_0x5caccd){const _0x3d1d95=a48_0x521f,_0x32e374=_0x394a88();while(!![]){try{const _0x38ec47=parseInt(_0x3d1d95(0xf7))/0x1+-parseInt(_0x3d1d95(0xff))/0x2*(parseInt(_0x3d1d95(0x106))/0x3)+parseInt(_0x3d1d95(0xfd))/0x4*(-parseInt(_0x3d1d95(0xf8))/0x5)+parseInt(_0x3d1d95(0xfe))/0x6*(parseInt(_0x3d1d95(0x107))/0x7)+parseInt(_0x3d1d95(0xfc))/0x8+parseInt(_0x3d1d95(0x108))/0x9*(-parseInt(_0x3d1d95(0x10d))/0xa)+parseInt(_0x3d1d95(0x105))/0xb;if(_0x38ec47===_0x5caccd)break;else _0x32e374['push'](_0x32e374['shift']());}catch(_0x31243c){_0x32e374['push'](_0x32e374['shift']());}}}(a48_0xc986,0xd1087));import a48_0x47251c from'node:path';import{fileURLToPath}from'node:url';function a48_0x521f(_0x900a27,_0xac2f9){_0x900a27=_0x900a27-0xf7;const _0xc986af=a48_0xc986();let _0x521f1f=_0xc986af[_0x900a27];return _0x521f1f;}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 a48_0xc986(){const _0x5bca9a=['1540nVYcLT','dirname','1003765OEXRVm','590uWzlVZ','message','success','../../templates/projects/sub-app-react-demo','258240IOjGau','51340RiRmbd','1365690Lklmmn','277286czlpvV','项目模板复制完成','resolve','cwd','copy','now','40913917FhdMpN','27WeLLFp','14GYJDbz','93051xBeLEO','复制项目文件','error','项目模板复制失败','info'];a48_0xc986=function(){return _0x5bca9a;};return a48_0xc986();}const __dirname=a48_0x47251c[a48_0x397d08(0x10e)](fileURLToPath(import.meta.url)),templateDir=a48_0x47251c[a48_0x397d08(0x101)](__dirname,a48_0x397d08(0xfb));export function useCopyProjectTemplate(){const _0x494923=a48_0x397d08,[_0x533125,_0x28f066]=useState(![]),[_0x41eb18,_0x3f3464]=useState(![]),[_0x1dfd43,_0x22c604]=useState(''),_0x1bd2a0=useCallback(async _0x548467=>{const _0x194737=a48_0x521f,_0xc7bdc1=Date[_0x194737(0x104)](),_0x537956=a48_0x47251c[_0x194737(0x101)](process[_0x194737(0x102)](),_0x548467);_0x28f066(!![]);try{logger[_0x194737(0x10c)](_0x194737(0x103),'开始复制项目模板',{'projectCode':_0x548467,'templateDir':templateDir}),await copyDirectory(templateDir,_0x537956);const _0x254cfb=Date[_0x194737(0x104)]()-_0xc7bdc1;logger[_0x194737(0xfa)](_0x194737(0x103),_0x194737(0x100),_0x254cfb,{'projectCode':_0x548467});}catch(_0x522609){const _0x3a15c9=Date[_0x194737(0x104)]()-_0xc7bdc1;logger[_0x194737(0x10a)](_0x194737(0x103),_0x194737(0x10b),{'projectCode':_0x548467,'error':_0x522609 instanceof Error?_0x522609[_0x194737(0xf9)]:String(_0x522609),'duration':_0x3a15c9});throw _0x522609;}finally{_0x28f066(![]),_0x3f3464(!![]),_0x22c604(formatElapsed(_0xc7bdc1));}},[]);return{'taskName':_0x494923(0x109),'finished':_0x41eb18,'loading':_0x533125,'elapsed':_0x1dfd43,'doTask':_0x1bd2a0};}
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 +1 @@
1
- (function(_0x32b06c,_0x5a28e2){const _0x37b99f=a49_0x3e85,_0xd80e6f=_0x32b06c();while(!![]){try{const _0x1dc49f=parseInt(_0x37b99f(0xf4))/0x1+parseInt(_0x37b99f(0xec))/0x2*(-parseInt(_0x37b99f(0xe8))/0x3)+-parseInt(_0x37b99f(0xf3))/0x4+parseInt(_0x37b99f(0xf2))/0x5+parseInt(_0x37b99f(0xf8))/0x6+-parseInt(_0x37b99f(0xef))/0x7+parseInt(_0x37b99f(0xee))/0x8;if(_0x1dc49f===_0x5a28e2)break;else _0xd80e6f['push'](_0xd80e6f['shift']());}catch(_0x5b9fe7){_0xd80e6f['push'](_0xd80e6f['shift']());}}}(a49_0x3b0d,0xdb92a));import a49_0x27873c from'node:path';import{useCallback,useState}from'react';import{execa}from'execa';import{formatElapsed}from'./format-elapsed.js';function a49_0x3b0d(){const _0x8f06cf=['153039wlnzaK','代码格式化完成','代码格式化失败','npx','1987404YtyNRJ','格式化代码','开始格式化代码','resolve','cwd','6TKBMLj','error','now','message','658562KYpjqs','info','24227136nPodhV','12175793etqnpK','format','--write','4838865jRMFDw','4732428JQjKlq'];a49_0x3b0d=function(){return _0x8f06cf;};return a49_0x3b0d();}function a49_0x3e85(_0x2c9dd7,_0x56601e){_0x2c9dd7=_0x2c9dd7-0xe5;const _0x3b0d6d=a49_0x3b0d();let _0x3e8517=_0x3b0d6d[_0x2c9dd7];return _0x3e8517;}import{logger}from'../utils/logger.js';export function useFormatCode(){const _0x56eadb=a49_0x3e85,[_0x4217d3,_0x459912]=useState(![]),[_0x3b0ff4,_0xa06e23]=useState(![]),[_0x3ea471,_0x4a4213]=useState(''),_0x1073c0=useCallback(async _0x5a8d63=>{const _0x28f9a8=a49_0x3e85,_0x473062=Date[_0x28f9a8(0xea)](),_0x5b9ab0=a49_0x27873c[_0x28f9a8(0xe6)](process[_0x28f9a8(0xe7)](),_0x5a8d63);_0x459912(!![]);try{logger[_0x28f9a8(0xed)](_0x28f9a8(0xf0),_0x28f9a8(0xe5),{'projectCode':_0x5a8d63}),await execa(_0x28f9a8(0xf7),['prettier',_0x28f9a8(0xf1),'.'],{'cwd':_0x5b9ab0});const _0x562f04=Date[_0x28f9a8(0xea)]()-_0x473062;logger['success'](_0x28f9a8(0xf0),_0x28f9a8(0xf5),_0x562f04,{'projectCode':_0x5a8d63});}catch(_0x38b28f){const _0x19df54=Date[_0x28f9a8(0xea)]()-_0x473062;logger[_0x28f9a8(0xe9)](_0x28f9a8(0xf0),_0x28f9a8(0xf6),{'projectCode':_0x5a8d63,'error':_0x38b28f instanceof Error?_0x38b28f[_0x28f9a8(0xeb)]:String(_0x38b28f),'duration':_0x19df54});throw _0x38b28f;}finally{_0x459912(![]),_0xa06e23(!![]),_0x4a4213(formatElapsed(_0x473062));}},[]);return{'taskName':_0x56eadb(0xf9),'finished':_0x3b0ff4,'loading':_0x4217d3,'elapsed':_0x3ea471,'doTask':_0x1073c0};}
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 +1 @@
1
- function a50_0xbb3d(_0x196900,_0x3d97d3){_0x196900=_0x196900-0x1d1;const _0x1b22c1=a50_0x1b22();let _0xbb3d65=_0x1b22c1[_0x196900];return _0xbb3d65;}function a50_0x1b22(){const _0x4628fc=['148350WTpHXQ','resolve','4Yixjua','install','npm','--registry','开始安装依赖','2zZScQY','info','894121YnioIR','7GidjYp','21120210GqhUCh','1059156WfilbC','8383866LdHqny','依赖安装完成','6920355qpgJBP','cwd','8081048cRTfaH','now','error','https://registry.npmmirror.com'];a50_0x1b22=function(){return _0x4628fc;};return a50_0x1b22();}(function(_0x11b188,_0x300522){const _0x40b0b6=a50_0xbb3d,_0x5c4206=_0x11b188();while(!![]){try{const _0x583648=parseInt(_0x40b0b6(0x1dd))/0x1*(-parseInt(_0x40b0b6(0x1db))/0x2)+parseInt(_0x40b0b6(0x1d4))/0x3*(parseInt(_0x40b0b6(0x1d6))/0x4)+parseInt(_0x40b0b6(0x1e3))/0x5+-parseInt(_0x40b0b6(0x1e1))/0x6*(-parseInt(_0x40b0b6(0x1de))/0x7)+parseInt(_0x40b0b6(0x1e5))/0x8+-parseInt(_0x40b0b6(0x1e0))/0x9+-parseInt(_0x40b0b6(0x1df))/0xa;if(_0x583648===_0x300522)break;else _0x5c4206['push'](_0x5c4206['shift']());}catch(_0x2b7885){_0x5c4206['push'](_0x5c4206['shift']());}}}(a50_0x1b22,0xaf151));import a50_0x3c3bff 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 [_0x5b3e12,_0x25dd61]=useState(![]),[_0x159eaa,_0xfe112e]=useState(![]),[_0x53fb40,_0x57c533]=useState(''),_0x3bd656=useCallback(async _0x5837aa=>{const _0x5ef00d=a50_0xbb3d,_0x1c0b36=Date[_0x5ef00d(0x1d1)](),_0x1d8d37=a50_0x3c3bff[_0x5ef00d(0x1d5)](process[_0x5ef00d(0x1e4)](),_0x5837aa);_0x25dd61(!![]),_0xfe112e(![]);const _0x35d649=async(_0x3b313d,_0x44d98c)=>{await execa(_0x3b313d,_0x44d98c,{'cwd':_0x1d8d37});};try{logger[_0x5ef00d(0x1dc)](_0x5ef00d(0x1d7),_0x5ef00d(0x1da),{'projectCode':_0x5837aa,'registry':_0x5ef00d(0x1d3)}),await _0x35d649(_0x5ef00d(0x1d8),[_0x5ef00d(0x1d7),_0x5ef00d(0x1d9),_0x5ef00d(0x1d3)]);const _0x1c3ed3=Date[_0x5ef00d(0x1d1)]()-_0x1c0b36;logger['success'](_0x5ef00d(0x1d7),_0x5ef00d(0x1e2),_0x1c3ed3,{'projectCode':_0x5837aa});}catch(_0x294be7){const _0x426aac=Date[_0x5ef00d(0x1d1)]()-_0x1c0b36;logger[_0x5ef00d(0x1d2)](_0x5ef00d(0x1d7),'依赖安装失败',{'projectCode':_0x5837aa,'error':_0x294be7 instanceof Error?_0x294be7['message']:String(_0x294be7),'duration':_0x426aac});throw _0x294be7;}finally{_0x25dd61(![]),_0xfe112e(!![]),_0x57c533(formatElapsed(_0x1c0b36));}},[]);return{'taskName':'安装依赖','finished':_0x159eaa,'loading':_0x5b3e12,'elapsed':_0x53fb40,'doTask':_0x3bd656};}
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};}
package/lib/help.js CHANGED
@@ -1 +1 @@
1
- function a51_0x2728(_0x2769d4,_0x555dc3){_0x2769d4=_0x2769d4-0xa5;var _0x5d21c6=a51_0x5d21();var _0x2728c6=_0x5d21c6[_0x2769d4];return _0x2728c6;}(function(_0x159194,_0x2ef33a){var _0x35bd36=a51_0x2728,_0x9f0685=_0x159194();while(!![]){try{var _0xa7be44=parseInt(_0x35bd36(0xb1))/0x1*(parseInt(_0x35bd36(0xb0))/0x2)+parseInt(_0x35bd36(0xa9))/0x3*(parseInt(_0x35bd36(0xab))/0x4)+parseInt(_0x35bd36(0xa7))/0x5+-parseInt(_0x35bd36(0xb3))/0x6*(parseInt(_0x35bd36(0xaa))/0x7)+-parseInt(_0x35bd36(0xac))/0x8+-parseInt(_0x35bd36(0xa5))/0x9+-parseInt(_0x35bd36(0xb2))/0xa;if(_0xa7be44===_0x2ef33a)break;else _0x9f0685['push'](_0x9f0685['shift']());}catch(_0x12af04){_0x9f0685['push'](_0x9f0685['shift']());}}}(a51_0x5d21,0x1cd74));import{jsx as a51_0x1e8244,jsxs as a51_0x208fab}from'react/jsx-runtime';import{Box,Text}from'ink';export function Help(){var _0x179964=a51_0x2728;return a51_0x208fab(Box,{'flexDirection':_0x179964(0xad),'marginTop':0x1,'marginBottom':0x1,'children':[a51_0x208fab(Box,{'children':[a51_0x1e8244(Box,{'width':'1'}),a51_0x1e8244(Text,{'children':_0x179964(0xa8)})]}),a51_0x208fab(Box,{'marginTop':0x1,'children':[a51_0x1e8244(Box,{'width':'1'}),a51_0x208fab(Text,{'children':['\x20\x20','使用']}),a51_0x208fab(Text,{'bold':!![],'color':_0x179964(0xae),'children':['\x20',_0x179964(0xaf),'\x20']}),a51_0x1e8244(Text,{'children':_0x179964(0xa6)})]})]});}function a51_0x5d21(){var _0x49e2b1=['1049967luGPnC','查看可用命令。','955550pRlJef','!\x20请指定一个有效的命令。','3ymPQQi','7ohptVH','434956UWbsAZ','105656oNrnIW','column','green','lovrabet\x20--help','2odJBFQ','229697UfgWgb','2323150gyNvnf','295374MhxBHA'];a51_0x5d21=function(){return _0x49e2b1;};return a51_0x5d21();}
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)})]})]});}
package/lib/init/main.js CHANGED
@@ -1 +1 @@
1
- (function(_0x1bd822,_0x2717eb){const _0x544a77=a52_0x1ce1,_0x6b040a=_0x1bd822();while(!![]){try{const _0x2f8a2a=-parseInt(_0x544a77(0x1cc))/0x1*(parseInt(_0x544a77(0x1d1))/0x2)+-parseInt(_0x544a77(0x1c9))/0x3+parseInt(_0x544a77(0x1b9))/0x4+parseInt(_0x544a77(0x1d4))/0x5*(-parseInt(_0x544a77(0x1b7))/0x6)+parseInt(_0x544a77(0x1b6))/0x7*(-parseInt(_0x544a77(0x1e0))/0x8)+parseInt(_0x544a77(0x1bb))/0x9+parseInt(_0x544a77(0x1bd))/0xa*(parseInt(_0x544a77(0x1d6))/0xb);if(_0x2f8a2a===_0x2717eb)break;else _0x6b040a['push'](_0x6b040a['shift']());}catch(_0x32be5b){_0x6b040a['push'](_0x6b040a['shift']());}}}(a52_0x24cf,0x684ae));import{jsxs as a52_0x576fae,jsx as a52_0x5c3efd}from'react/jsx-runtime';import{useState,useEffect}from'react';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';function a52_0x1ce1(_0x4c2c14,_0x2ceca3){_0x4c2c14=_0x4c2c14-0x1b6;const _0x24cfd8=a52_0x24cf();let _0x1ce1c5=_0x24cfd8[_0x4c2c14];return _0x1ce1c5;}function a52_0x24cf(){const _0xe8ad9c=['stringify','length','当前目录已存在\x20.lovrabetrc\x20文件','version','cyan','393747cotsOf','应用代码不合法','gray','7tcQxIQ','backspace','.lovrabetrc','toLocaleString','test','61158AKpmIl','创建配置文件失败:\x20','green','327885IZJpxK','现在您可以使用\x20lovrabet\x20api\x20doc\x20和\x20lovrabet\x20api\x20pull\x20等命令了','110JQIlEY','../..','delete','utf8','应用代码长度不能超过\x20100\x20个字符','red','应用代码用于标识您的项目,只能包含字母、数字、-\x20和\x20_','string','请输入应用代码\x20(AppCode):\x20','\x20←\x20','8fUxpOp','env','创建配置文件失败','init','return','初始化项目配置文件成功','4196325OYLpWr','24wJxrBZ','message','3149000rjaMyL','应用代码只能包含字母、数字、-\x20和\x20_','3763863bxYJzn','应用代码不能为空','428810tnNrwJ','setLogPath','trim','exit','column','slice','online'];a52_0x24cf=function(){return _0xe8ad9c;};return a52_0x24cf();}export function Init({appcode:_0x48f0c1,env:_0x238b7d}){const _0x46f2de=a52_0x1ce1,[_0x511fc7,_0x43dbc1]=useState(null),[_0x2fd988,_0x351930]=useState(![]),[_0x395db1,_0x4940d1]=useState(!_0x48f0c1),[_0x372fef,_0x533ad4]=useState(''),[_0x2fc943,_0x41fcee]=useState(''),[_0x196492,_0x2b66c3]=useState(_0x48f0c1||''),[_0x1c67e1]=useState(_0x238b7d);function _0x53372b(_0x377ac5){const _0x3c6f6a=a52_0x1ce1;if(_0x377ac5[_0x3c6f6a(0x1c5)]===0x0)return{'valid':![],'message':''};if(_0x377ac5[_0x3c6f6a(0x1c5)]>0x64)return{'valid':![],'message':_0x3c6f6a(0x1da)};const _0x1889a4=/^[A-Za-z0-9_-]+$/;if(!_0x1889a4[_0x3c6f6a(0x1d0)](_0x377ac5))return{'valid':![],'message':_0x3c6f6a(0x1ba)};return{'valid':!![]};}useInput((_0x425ea2,_0x8aab5a)=>{const _0x46be7c=a52_0x1ce1;if(!_0x395db1)return;if(_0x8aab5a[_0x46be7c(0x1e4)]){if(_0x2fc943||!_0x372fef['trim']()){_0x41fcee(_0x46be7c(0x1bc));return;}const _0x1ef932=_0x372fef[_0x46be7c(0x1bf)](),{valid:_0x599f60,message:_0x175421}=_0x53372b(_0x1ef932);if(!_0x599f60){_0x41fcee(_0x175421||_0x46be7c(0x1ca));return;}_0x2b66c3(_0x1ef932),_0x4940d1(![]);}else{if(_0x8aab5a[_0x46be7c(0x1cd)]||_0x8aab5a[_0x46be7c(0x1d8)])_0x533ad4(_0x287ea0=>{const _0xd1e212=_0x46be7c,_0x2d203d=_0x287ea0[_0xd1e212(0x1c2)](0x0,-0x1);if(_0x2d203d[_0xd1e212(0x1c5)]===0x0)_0x41fcee('');else{const {valid:_0x5b2634,message:_0x20bcd2}=_0x53372b(_0x2d203d);_0x41fcee(_0x5b2634?'':_0x20bcd2||_0xd1e212(0x1ca));}return _0x2d203d;});else _0x8aab5a['ctrl']&&_0x425ea2==='c'?process[_0x46be7c(0x1c0)](0x0):_0x533ad4(_0x27d29f=>{const _0x12b239=_0x46be7c,_0x29a0f7=_0x27d29f+_0x425ea2,{valid:_0x25a63b,message:_0x5b7f2d}=_0x53372b(_0x29a0f7);return _0x41fcee(_0x25a63b?'':_0x5b7f2d||_0x12b239(0x1ca)),_0x29a0f7;});}},{'isActive':_0x395db1}),useEffect(()=>{const _0x15e916=a52_0x1ce1;if(!_0x196492||_0x395db1)return;const _0x3af9d5=resolve(process['cwd'](),_0x15e916(0x1ce));if(existsSync(_0x3af9d5)){_0x43dbc1(_0x15e916(0x1c6)),setTimeout(()=>process['exit'](0x1),0x64);return;}try{const _0x2c9865=fileURLToPath(import.meta.url),_0x91f2da=resolve(dirname(_0x2c9865),_0x15e916(0x1d7)),_0x18a6be=join(_0x91f2da,'package.json');let _0x298bbf='1.0.0';try{const _0xb25836=JSON['parse'](readFileSync(_0x18a6be,_0x15e916(0x1d9)));_0x298bbf=_0xb25836[_0x15e916(0x1c7)]||'1.0.0';}catch(_0x3be608){}const _0x56ecb9=readConfig(),_0x3703f5=typeof _0x56ecb9[_0x15e916(0x1e1)]===_0x15e916(0x1dd)?_0x56ecb9[_0x15e916(0x1e1)]:undefined,{app:_0x13d9c9,appcode:_0x2001bb,..._0x3edeb0}=_0x56ecb9,_0x428b59={..._0x3edeb0,'appcode':_0x196492,'env':_0x1c67e1||_0x3703f5||_0x15e916(0x1c3),'createdAt':new Date()[_0x15e916(0x1cf)](),'version':_0x298bbf};writeFileSync(_0x3af9d5,JSON[_0x15e916(0x1c4)](_0x428b59,null,0x2),{'encoding':_0x15e916(0x1d9),'mode':0x180}),logger[_0x15e916(0x1be)](process['cwd']()),logger['info'](_0x15e916(0x1e3),_0x15e916(0x1e5),{'appcode':_0x196492,'env':_0x428b59[_0x15e916(0x1e1)],'version':_0x428b59['version'],'configPath':_0x3af9d5}),_0x351930(!![]),setTimeout(()=>process[_0x15e916(0x1c0)](0x0),0x64);}catch(_0x1f1706){logger['error'](_0x15e916(0x1e3),_0x15e916(0x1e2),{'error':_0x1f1706 instanceof Error?_0x1f1706[_0x15e916(0x1b8)]:String(_0x1f1706)}),_0x43dbc1(_0x15e916(0x1d2)+(_0x1f1706 instanceof Error?_0x1f1706[_0x15e916(0x1b8)]:String(_0x1f1706))),setTimeout(()=>process[_0x15e916(0x1c0)](0x1),0x64);}},[_0x196492,_0x395db1,_0x1c67e1]);if(_0x511fc7)return a52_0x5c3efd(Box,{'flexDirection':_0x46f2de(0x1c1),'children':a52_0x576fae(Text,{'color':_0x46f2de(0x1db),'children':['✗\x20',_0x511fc7]})});if(_0x395db1)return a52_0x576fae(Box,{'flexDirection':_0x46f2de(0x1c1),'children':[a52_0x576fae(Box,{'children':[a52_0x5c3efd(Text,{'color':_0x46f2de(0x1c8),'children':_0x46f2de(0x1de)}),_0x372fef?a52_0x5c3efd(Text,{'color':_0x46f2de(0x1d3),'children':_0x372fef}):a52_0x5c3efd(Text,{'color':_0x46f2de(0x1cb),'children':'_'}),_0x2fc943&&a52_0x576fae(Text,{'color':_0x46f2de(0x1db),'children':[_0x46f2de(0x1df),_0x2fc943]})]}),!_0x2fc943&&!_0x372fef&&a52_0x5c3efd(Box,{'children':a52_0x5c3efd(Text,{'color':_0x46f2de(0x1cb),'children':_0x46f2de(0x1dc)})})]});if(_0x2fd988)return a52_0x576fae(Box,{'flexDirection':_0x46f2de(0x1c1),'children':[a52_0x5c3efd(Text,{'color':_0x46f2de(0x1d3),'children':'✓\x20成功在当前目录初始化\x20.lovrabetrc\x20文件'}),a52_0x576fae(Text,{'color':_0x46f2de(0x1c8),'children':['AppCode:\x20',_0x196492]}),a52_0x5c3efd(Text,{'children':_0x46f2de(0x1d5)})]});return a52_0x5c3efd(Box,{'children':a52_0x5c3efd(Text,{'children':'正在初始化配置文件...'})});}
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)})});}