@lovrabet/cli 1.1.26-beta.8 → 1.1.26-beta.9

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 (58) 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-cdn-version/app-menu-sync-cdn-version-ui.js +1 -1
  19. package/lib/app-menu-cdn-version/cdn-url-compare-table.js +1 -1
  20. package/lib/app-menu-cdn-version/update-menu-cdn-url.js +1 -1
  21. package/lib/auth/auth-server-ui.js +1 -1
  22. package/lib/auth/auth-server.js +1 -1
  23. package/lib/auth/constant.js +1 -1
  24. package/lib/auth/get-cookie.js +1 -1
  25. package/lib/auth/is-session-valid.js +1 -1
  26. package/lib/auth/logout.js +1 -1
  27. package/lib/cli.js +1 -1
  28. package/lib/cmd/build-watch.js +1 -1
  29. package/lib/cmd/build.js +1 -1
  30. package/lib/cmd/logs.js +1 -1
  31. package/lib/cmd/preview.js +1 -1
  32. package/lib/cmd/start.js +1 -1
  33. package/lib/config/config-help.js +1 -1
  34. package/lib/config/main.js +1 -1
  35. package/lib/constant/domain.js +1 -1
  36. package/lib/constant/env.js +1 -1
  37. package/lib/create-app/enhanced-guided-create.js +1 -1
  38. package/lib/create-app/format-elapsed.js +1 -1
  39. package/lib/create-app/main.js +1 -1
  40. package/lib/create-app/task-finished.js +1 -1
  41. package/lib/create-app/task-loading.js +1 -1
  42. package/lib/create-app/task-running.js +1 -1
  43. package/lib/create-app/task-time.js +1 -1
  44. package/lib/create-app/use-copy-project-template.js +1 -1
  45. package/lib/create-app/use-format-code.js +1 -1
  46. package/lib/create-app/use-install-dependencies.js +1 -1
  47. package/lib/help.js +1 -1
  48. package/lib/init/main.js +1 -1
  49. package/lib/mcp/cursor.js +1 -1
  50. package/lib/mcp/main.js +1 -1
  51. package/lib/utils/config.js +1 -1
  52. package/lib/utils/copy-directory.js +1 -1
  53. package/lib/utils/http-client.js +1 -1
  54. package/lib/utils/logger.js +1 -1
  55. package/lib/utils/router-updater.js +1 -1
  56. package/lib/utils/sleep.js +1 -1
  57. package/lib/utils/template-replacer.js +1 -1
  58. package/package.json +1 -1
@@ -1 +1 @@
1
- (function(_0x4fb6b4,_0x52568d){const _0x2d1299=a32_0xd7de,_0x4e0aa6=_0x4fb6b4();while(!![]){try{const _0x5ec82e=-parseInt(_0x2d1299(0x1da))/0x1*(-parseInt(_0x2d1299(0x1e1))/0x2)+-parseInt(_0x2d1299(0x1e6))/0x3*(parseInt(_0x2d1299(0x1e8))/0x4)+parseInt(_0x2d1299(0x1f1))/0x5+-parseInt(_0x2d1299(0x1d7))/0x6+parseInt(_0x2d1299(0x1e5))/0x7+-parseInt(_0x2d1299(0x1de))/0x8*(parseInt(_0x2d1299(0x1ee))/0x9)+parseInt(_0x2d1299(0x1ef))/0xa;if(_0x5ec82e===_0x52568d)break;else _0x4e0aa6['push'](_0x4e0aa6['shift']());}catch(_0x349019){_0x4e0aa6['push'](_0x4e0aa6['shift']());}}}(a32_0x2574,0x861e0));import{delimiter,join}from'node:path';function a32_0xd7de(_0x1b3d3c,_0x4af713){const _0x25748e=a32_0x2574();return a32_0xd7de=function(_0xd7de9e,_0x4739e2){_0xd7de9e=_0xd7de9e-0x1d7;let _0xe87903=_0x25748e[_0xd7de9e];return _0xe87903;},a32_0xd7de(_0x1b3d3c,_0x4af713);}import{spawn}from'node:child_process';function a32_0x2574(){const _0x3875db=['env','3423553EtZzQw','507453EKPgrI','pipe','24yOXHZj','stderr','PATH','info','preview','预览服务器启动出错','880794oLckaz','15894180YBjHUl','.bin','2113445QobcLL','close','error','node_modules','5260662kHLpzw','toString','trim','12569fOQSFZ','success','vite\x20preview','预览服务器启动成功','8kqSeGq','cwd','vite\x20preview\x20exited\x20with\x20code\x20','6GOgqtr','now','inherit'];a32_0x2574=function(){return _0x3875db;};return a32_0x2574();}import{logger}from'../utils/logger.js';export function runPreview(){return new Promise((_0x38aaef,_0x33ffe8)=>{const _0x1935cd=a32_0xd7de,_0x54c001=Date[_0x1935cd(0x1e2)]();logger[_0x1935cd(0x1eb)](_0x1935cd(0x1ec),'启动预览服务器',{'command':_0x1935cd(0x1dc)});let _0x2ba14a='';const _0x157953=spawn('vite',['preview'],{'stdio':[_0x1935cd(0x1e3),_0x1935cd(0x1e3),_0x1935cd(0x1e7)],'shell':!![],'env':{...process['env'],'PATH':''+join(process[_0x1935cd(0x1df)](),_0x1935cd(0x1f4),_0x1935cd(0x1f0))+delimiter+process[_0x1935cd(0x1e4)][_0x1935cd(0x1ea)]}});_0x157953[_0x1935cd(0x1e9)]?.['on']('data',_0xfa98b8=>{const _0x6eb89b=_0x1935cd;_0x2ba14a+=_0xfa98b8[_0x6eb89b(0x1d8)]();}),_0x157953['on'](_0x1935cd(0x1f2),_0x38e53a=>{const _0x4db757=_0x1935cd,_0xa6bd80=Date[_0x4db757(0x1e2)]()-_0x54c001;if(_0x38e53a===0x0||_0x38e53a===null)logger[_0x4db757(0x1db)]('preview',_0x4db757(0x1dd),_0xa6bd80),_0x38aaef();else{const _0x554096={'exitCode':_0x38e53a,'duration':_0xa6bd80,'command':'vite\x20preview','cwd':process[_0x4db757(0x1df)]()};_0x2ba14a[_0x4db757(0x1d9)]()&&(_0x554096[_0x4db757(0x1e9)]=_0x2ba14a['trim']()),logger['error']('preview','预览服务器启动失败',_0x554096),_0x33ffe8(new Error(_0x4db757(0x1e0)+_0x38e53a));}}),_0x157953['on'](_0x1935cd(0x1f3),_0x3e3636=>{const _0x268f94=_0x1935cd,_0x13b911=Date['now']()-_0x54c001;logger[_0x268f94(0x1f3)](_0x268f94(0x1ec),_0x268f94(0x1ed),{'error':_0x3e3636['message'],'duration':_0x13b911,'stderr':_0x2ba14a[_0x268f94(0x1d9)]()||undefined}),_0x33ffe8(_0x3e3636);});});}
1
+ function a32_0x1c21(_0x5660ec,_0xdd1887){const _0x467a18=a32_0x467a();return a32_0x1c21=function(_0x1c2131,_0x35bd07){_0x1c2131=_0x1c2131-0x127;let _0x93c8ac=_0x467a18[_0x1c2131];return _0x93c8ac;},a32_0x1c21(_0x5660ec,_0xdd1887);}(function(_0x3ba6b2,_0x1edd51){const _0x4955e3=a32_0x1c21,_0x4fdf2d=_0x3ba6b2();while(!![]){try{const _0x132bdc=-parseInt(_0x4955e3(0x13e))/0x1*(-parseInt(_0x4955e3(0x12f))/0x2)+parseInt(_0x4955e3(0x138))/0x3+parseInt(_0x4955e3(0x127))/0x4+parseInt(_0x4955e3(0x136))/0x5*(-parseInt(_0x4955e3(0x128))/0x6)+parseInt(_0x4955e3(0x143))/0x7*(-parseInt(_0x4955e3(0x130))/0x8)+parseInt(_0x4955e3(0x144))/0x9+parseInt(_0x4955e3(0x13c))/0xa;if(_0x132bdc===_0x1edd51)break;else _0x4fdf2d['push'](_0x4fdf2d['shift']());}catch(_0x52c85c){_0x4fdf2d['push'](_0x4fdf2d['shift']());}}}(a32_0x467a,0xc89fd));import{delimiter,join}from'node:path';import{spawn}from'node:child_process';function a32_0x467a(){const _0x3bc418=['vite\x20preview','.bin','stderr','1633933yqOoFO','3262500vkUCEV','preview','3003324UJxOsE','4836GiNZWI','node_modules','success','close','PATH','now','info','38PcpTBd','56AwGBGt','env','message','inherit','toString','error','805PmHJid','vite','2610705vtFCXX','预览服务器启动出错','pipe','cwd','3079220RgwwGo','trim','15472IiBUMx','预览服务器启动失败'];a32_0x467a=function(){return _0x3bc418;};return a32_0x467a();}import{logger}from'../utils/logger.js';export function runPreview(){return new Promise((_0x33d7b3,_0x1d35cb)=>{const _0x367af1=a32_0x1c21,_0x1ccebe=Date['now']();logger[_0x367af1(0x12e)](_0x367af1(0x145),'启动预览服务器',{'command':'vite\x20preview'});let _0x43c26f='';const _0x3181fe=spawn(_0x367af1(0x137),[_0x367af1(0x145)],{'stdio':[_0x367af1(0x133),_0x367af1(0x133),_0x367af1(0x13a)],'shell':!![],'env':{...process['env'],'PATH':''+join(process[_0x367af1(0x13b)](),_0x367af1(0x129),_0x367af1(0x141))+delimiter+process[_0x367af1(0x131)][_0x367af1(0x12c)]}});_0x3181fe[_0x367af1(0x142)]?.['on']('data',_0x5553c6=>{const _0x28e8f5=_0x367af1;_0x43c26f+=_0x5553c6[_0x28e8f5(0x134)]();}),_0x3181fe['on'](_0x367af1(0x12b),_0x461b0b=>{const _0x42f807=_0x367af1,_0x1aca06=Date[_0x42f807(0x12d)]()-_0x1ccebe;if(_0x461b0b===0x0||_0x461b0b===null)logger[_0x42f807(0x12a)](_0x42f807(0x145),'预览服务器启动成功',_0x1aca06),_0x33d7b3();else{const _0x47a633={'exitCode':_0x461b0b,'duration':_0x1aca06,'command':_0x42f807(0x140),'cwd':process[_0x42f807(0x13b)]()};_0x43c26f[_0x42f807(0x13d)]()&&(_0x47a633[_0x42f807(0x142)]=_0x43c26f['trim']()),logger['error'](_0x42f807(0x145),_0x42f807(0x13f),_0x47a633),_0x1d35cb(new Error('vite\x20preview\x20exited\x20with\x20code\x20'+_0x461b0b));}}),_0x3181fe['on'](_0x367af1(0x135),_0x4d7d01=>{const _0x5b9b35=_0x367af1,_0x4eacb1=Date['now']()-_0x1ccebe;logger[_0x5b9b35(0x135)](_0x5b9b35(0x145),_0x5b9b35(0x139),{'error':_0x4d7d01[_0x5b9b35(0x132)],'duration':_0x4eacb1,'stderr':_0x43c26f[_0x5b9b35(0x13d)]()||undefined}),_0x1d35cb(_0x4d7d01);});});}
package/lib/cmd/start.js CHANGED
@@ -1 +1 @@
1
- (function(_0x11b4bb,_0x16b3aa){const _0xaa100e=a33_0xf406,_0x5e73e2=_0x11b4bb();while(!![]){try{const _0x4cba81=parseInt(_0xaa100e(0x1fd))/0x1+-parseInt(_0xaa100e(0x1fb))/0x2+-parseInt(_0xaa100e(0x1fe))/0x3+-parseInt(_0xaa100e(0x1fa))/0x4+-parseInt(_0xaa100e(0x201))/0x5*(parseInt(_0xaa100e(0x1ec))/0x6)+parseInt(_0xaa100e(0x1f1))/0x7*(-parseInt(_0xaa100e(0x1f7))/0x8)+parseInt(_0xaa100e(0x1e7))/0x9;if(_0x4cba81===_0x16b3aa)break;else _0x5e73e2['push'](_0x5e73e2['shift']());}catch(_0x3340ab){_0x5e73e2['push'](_0x5e73e2['shift']());}}}(a33_0x543d,0x3dc18));import{delimiter,join}from'node:path';function a33_0xf406(_0x5a06ac,_0x2cf393){const _0x543dcb=a33_0x543d();return a33_0xf406=function(_0xf40689,_0xc7c601){_0xf40689=_0xf40689-0x1e5;let _0x26d733=_0x543dcb[_0xf40689];return _0x26d733;},a33_0xf406(_0x5a06ac,_0x2cf393);}import{spawn}from'node:child_process';import{logger}from'../utils/logger.js';function a33_0x543d(){const _0x54f6d4=['error','164815VhoKNW','close','cwd','17300970LupoEG','node_modules','vite\x20exited\x20with\x20code\x20','vite','.bin','24GxPwQE','toString','now','开发服务器启动失败','trim','7FIIAPy','success','inherit','stderr','PATH','env','3880808NTRMSx','write','message','1483956jXbuSQ','1010864knvNsf','start','2680xLtNwx','536052fZIfMA','pipe'];a33_0x543d=function(){return _0x54f6d4;};return a33_0x543d();}export function runStart(_0x3a208a){return new Promise((_0x5083ed,_0x5e0209)=>{const _0x4632f0=a33_0xf406,_0x1fac85=Date[_0x4632f0(0x1ee)](),_0x142afc=_0x3a208a||process[_0x4632f0(0x1e6)]();logger['info'](_0x4632f0(0x1fc),'启动开发服务器',{'command':_0x4632f0(0x1ea),'cwd':_0x142afc});let _0x51dac6='';const _0x21491a=spawn(_0x4632f0(0x1ea),{'stdio':[_0x4632f0(0x1f3),_0x4632f0(0x1f3),_0x4632f0(0x1ff)],'shell':!![],'cwd':_0x142afc,'env':{...process[_0x4632f0(0x1f6)],'PATH':''+join(_0x142afc,_0x4632f0(0x1e8),_0x4632f0(0x1eb))+delimiter+process[_0x4632f0(0x1f6)][_0x4632f0(0x1f5)]}});_0x21491a[_0x4632f0(0x1f4)]?.['on']('data',_0x2be0fb=>{const _0x41add9=_0x4632f0,_0x3184a1=_0x2be0fb[_0x41add9(0x1ed)]();_0x51dac6+=_0x3184a1,process['stderr'][_0x41add9(0x1f8)](_0x3184a1);}),_0x21491a['on'](_0x4632f0(0x1e5),_0x315cf5=>{const _0x424285=_0x4632f0,_0x24196f=Date['now']()-_0x1fac85;if(_0x315cf5===0x0||_0x315cf5===null)logger[_0x424285(0x1f2)](_0x424285(0x1fc),'开发服务器启动成功',_0x24196f),_0x5083ed();else{const _0x1e261a={'exitCode':_0x315cf5,'duration':_0x24196f,'command':_0x424285(0x1ea),'cwd':_0x142afc};_0x51dac6[_0x424285(0x1f0)]()&&(_0x1e261a[_0x424285(0x1f4)]=_0x51dac6['trim']()),logger['error']('start',_0x424285(0x1ef),_0x1e261a),_0x5e0209(new Error(_0x424285(0x1e9)+_0x315cf5));}}),_0x21491a['on'](_0x4632f0(0x200),_0x129899=>{const _0x21638c=_0x4632f0,_0x1552b5=Date[_0x21638c(0x1ee)]()-_0x1fac85,_0x8efabd={'error':_0x129899[_0x21638c(0x1f9)],'duration':_0x1552b5,'command':'vite','cwd':_0x142afc};_0x51dac6['trim']()&&(_0x8efabd[_0x21638c(0x1f4)]=_0x51dac6[_0x21638c(0x1f0)]()),logger[_0x21638c(0x200)](_0x21638c(0x1fc),'开发服务器启动出错',_0x8efabd),_0x5e0209(_0x129899);});});}
1
+ (function(_0x358889,_0x48836c){const _0x294176=a33_0x1bbe,_0x344725=_0x358889();while(!![]){try{const _0x5f08fe=parseInt(_0x294176(0xb5))/0x1+-parseInt(_0x294176(0xb1))/0x2*(parseInt(_0x294176(0xc6))/0x3)+-parseInt(_0x294176(0xcd))/0x4*(-parseInt(_0x294176(0xc4))/0x5)+-parseInt(_0x294176(0xc0))/0x6*(parseInt(_0x294176(0xcb))/0x7)+parseInt(_0x294176(0xbe))/0x8*(parseInt(_0x294176(0xce))/0x9)+parseInt(_0x294176(0xb6))/0xa+parseInt(_0x294176(0xb3))/0xb;if(_0x5f08fe===_0x48836c)break;else _0x344725['push'](_0x344725['shift']());}catch(_0x274a53){_0x344725['push'](_0x344725['shift']());}}}(a33_0x2b53,0xe0d57));function a33_0x1bbe(_0x14257d,_0x42abac){const _0x2b5301=a33_0x2b53();return a33_0x1bbe=function(_0x1bbea6,_0x9696d6){_0x1bbea6=_0x1bbea6-0xae;let _0x4f0b8b=_0x2b5301[_0x1bbea6];return _0x4f0b8b;},a33_0x1bbe(_0x14257d,_0x42abac);}function a33_0x2b53(){const _0x15a287=['data','now','info','close','8GHWZVb','pipe','10812036CGKrIV','cwd','trim','inherit','539160hetyfi','stderr','4978245cFRRVj','node_modules','message','开发服务器启动成功','vite','7FLojnp','env','48bdiQPS','11026413XqNOcs','toString','.bin','write','start','2LDepYV','启动开发服务器','2770240OSddiz','PATH','717343imYiMB','8940160cKXqDp','vite\x20exited\x20with\x20code\x20','开发服务器启动失败','error'];a33_0x2b53=function(){return _0x15a287;};return a33_0x2b53();}import{delimiter,join}from'node:path';import{spawn}from'node:child_process';import{logger}from'../utils/logger.js';export function runStart(_0x2b33d9){return new Promise((_0x1c4ba2,_0x28630c)=>{const _0x4684b3=a33_0x1bbe,_0x496db2=Date['now'](),_0x1900ad=_0x2b33d9||process[_0x4684b3(0xc1)]();logger[_0x4684b3(0xbc)]('start',_0x4684b3(0xb2),{'command':_0x4684b3(0xca),'cwd':_0x1900ad});let _0x1bdf20='';const _0x2f730f=spawn('vite',{'stdio':[_0x4684b3(0xc3),'inherit',_0x4684b3(0xbf)],'shell':!![],'cwd':_0x1900ad,'env':{...process[_0x4684b3(0xcc)],'PATH':''+join(_0x1900ad,_0x4684b3(0xc7),_0x4684b3(0xae))+delimiter+process[_0x4684b3(0xcc)][_0x4684b3(0xb4)]}});_0x2f730f[_0x4684b3(0xc5)]?.['on'](_0x4684b3(0xba),_0x518d5b=>{const _0xac9dd1=_0x4684b3,_0x35da87=_0x518d5b[_0xac9dd1(0xcf)]();_0x1bdf20+=_0x35da87,process[_0xac9dd1(0xc5)][_0xac9dd1(0xaf)](_0x35da87);}),_0x2f730f['on'](_0x4684b3(0xbd),_0x4575b7=>{const _0x495eb7=_0x4684b3,_0x1ec8bf=Date[_0x495eb7(0xbb)]()-_0x496db2;if(_0x4575b7===0x0||_0x4575b7===null)logger['success'](_0x495eb7(0xb0),_0x495eb7(0xc9),_0x1ec8bf),_0x1c4ba2();else{const _0x4e89c0={'exitCode':_0x4575b7,'duration':_0x1ec8bf,'command':_0x495eb7(0xca),'cwd':_0x1900ad};_0x1bdf20[_0x495eb7(0xc2)]()&&(_0x4e89c0[_0x495eb7(0xc5)]=_0x1bdf20[_0x495eb7(0xc2)]()),logger['error'](_0x495eb7(0xb0),_0x495eb7(0xb8),_0x4e89c0),_0x28630c(new Error(_0x495eb7(0xb7)+_0x4575b7));}}),_0x2f730f['on'](_0x4684b3(0xb9),_0x16919e=>{const _0x781649=_0x4684b3,_0x578085=Date[_0x781649(0xbb)]()-_0x496db2,_0x4a9eca={'error':_0x16919e[_0x781649(0xc8)],'duration':_0x578085,'command':_0x781649(0xca),'cwd':_0x1900ad};_0x1bdf20['trim']()&&(_0x4a9eca[_0x781649(0xc5)]=_0x1bdf20[_0x781649(0xc2)]()),logger[_0x781649(0xb9)](_0x781649(0xb0),'开发服务器启动出错',_0x4a9eca),_0x28630c(_0x16919e);});});}
@@ -1 +1 @@
1
- function a34_0xf8aa(){const _0x28661f=['4844068yThTTL','1322527gPcTWl','lovrabet\x20config\x20set\x20<key>\x20<value>\x20\x20\x20','lovrabet\x20config\x20get\x20<key>\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','2493310VrStYw','获取配置项','3494538VFZWZh','\x20*\x20配置示例:','\x20\x20\x20\x20','5sMRIIT','3909102OayqDK','description','33903ywpnBx','14VkxsOo','map','gray','4250292yvFqZB','配置当前项目的\x20App\x20Code','2336iYcRUP','lovrabet\x20config\x20set\x20app\x20app-xxxxx\x20\x20\x20','column','设置配置项','command','设置环境\x20(online/daily)'];a34_0xf8aa=function(){return _0x28661f;};return a34_0xf8aa();}function a34_0x2c22(_0x59283a,_0x37e7c6){const _0xf8aa10=a34_0xf8aa();return a34_0x2c22=function(_0x2c226c,_0x1c53a4){_0x2c226c=_0x2c226c-0x1cb;let _0x513936=_0xf8aa10[_0x2c226c];return _0x513936;},a34_0x2c22(_0x59283a,_0x37e7c6);}(function(_0x13056b,_0x455b2a){const _0x3f588b=a34_0x2c22,_0x4507fb=_0x13056b();while(!![]){try{const _0x5c8743=parseInt(_0x3f588b(0x1de))/0x1+parseInt(_0x3f588b(0x1cb))/0x2+parseInt(_0x3f588b(0x1cf))/0x3+parseInt(_0x3f588b(0x1dd))/0x4*(-parseInt(_0x3f588b(0x1ce))/0x5)+parseInt(_0x3f588b(0x1d5))/0x6*(-parseInt(_0x3f588b(0x1d2))/0x7)+parseInt(_0x3f588b(0x1d7))/0x8*(-parseInt(_0x3f588b(0x1d1))/0x9)+parseInt(_0x3f588b(0x1e1))/0xa;if(_0x5c8743===_0x455b2a)break;else _0x4507fb['push'](_0x4507fb['shift']());}catch(_0x397a46){_0x4507fb['push'](_0x4507fb['shift']());}}}(a34_0xf8aa,0xda5d0));import{jsxs as a34_0xeaecf4,jsx as a34_0x440974}from'react/jsx-runtime';import{Box,Text}from'ink';export function ConfigHelp(){const _0x2025c8=a34_0x2c22,_0x178bc2=[{'command':_0x2025c8(0x1df),'description':_0x2025c8(0x1da)},{'command':_0x2025c8(0x1e0),'description':_0x2025c8(0x1e2)},{'command':'lovrabet\x20config\x20list\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','description':'列出所有配置项'}],_0x5f08bc=[{'command':_0x2025c8(0x1d8),'description':_0x2025c8(0x1d6)},{'command':'lovrabet\x20config\x20set\x20env\x20daily\x20\x20\x20\x20\x20\x20\x20','description':_0x2025c8(0x1dc)}];return a34_0xeaecf4(Box,{'flexDirection':_0x2025c8(0x1d9),'marginTop':0x1,'marginBottom':0x1,'children':[a34_0x440974(Box,{'marginBottom':0x1,'children':a34_0xeaecf4(Text,{'color':_0x2025c8(0x1d4),'children':['\x20!','\x20\x20','无效的命令,可用命令如下:']})}),_0x178bc2[_0x2025c8(0x1d3)](_0x1b9afc=>a34_0xeaecf4(Box,{'children':[a34_0xeaecf4(Text,{'children':[_0x2025c8(0x1cd),_0x1b9afc[_0x2025c8(0x1db)]]}),a34_0x440974(Text,{'color':_0x2025c8(0x1d4),'children':_0x1b9afc[_0x2025c8(0x1d0)]})]},_0x1b9afc[_0x2025c8(0x1db)])),a34_0x440974(Box,{'marginTop':0x1,'marginBottom':0x1,'children':a34_0x440974(Text,{'color':_0x2025c8(0x1d4),'children':_0x2025c8(0x1cc)})}),_0x5f08bc[_0x2025c8(0x1d3)](_0x340e3c=>a34_0xeaecf4(Box,{'children':[a34_0xeaecf4(Text,{'children':[_0x2025c8(0x1cd),_0x340e3c[_0x2025c8(0x1db)]]}),a34_0x440974(Text,{'color':_0x2025c8(0x1d4),'children':_0x340e3c['description']})]},_0x340e3c[_0x2025c8(0x1db)]))]});}
1
+ (function(_0x4ed6a9,_0x18846f){const _0x3f918d=a34_0x10de,_0x95ca17=_0x4ed6a9();while(!![]){try{const _0xfb7ef6=-parseInt(_0x3f918d(0x131))/0x1+parseInt(_0x3f918d(0x12e))/0x2*(parseInt(_0x3f918d(0x134))/0x3)+-parseInt(_0x3f918d(0x13d))/0x4+-parseInt(_0x3f918d(0x139))/0x5*(-parseInt(_0x3f918d(0x13c))/0x6)+parseInt(_0x3f918d(0x138))/0x7*(parseInt(_0x3f918d(0x141))/0x8)+-parseInt(_0x3f918d(0x12a))/0x9*(parseInt(_0x3f918d(0x13a))/0xa)+parseInt(_0x3f918d(0x12b))/0xb;if(_0xfb7ef6===_0x18846f)break;else _0x95ca17['push'](_0x95ca17['shift']());}catch(_0x27455a){_0x95ca17['push'](_0x95ca17['shift']());}}}(a34_0x15ae,0x6b533));function a34_0x10de(_0x2f11d8,_0x536088){const _0x15ae75=a34_0x15ae();return a34_0x10de=function(_0x10de14,_0x774983){_0x10de14=_0x10de14-0x12a;let _0x1f8770=_0x15ae75[_0x10de14];return _0x1f8770;},a34_0x10de(_0x2f11d8,_0x536088);}function a34_0x15ae(){const _0x43a1e3=['4456302bruDkF','2601468HdsnDC','gray','无效的命令,可用命令如下:','lovrabet\x20config\x20set\x20app\x20app-xxxxx\x20\x20\x20','3056VSUkQy','command','lovrabet\x20config\x20list\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','获取配置项','419751BJHNtg','8027910yVnLuR','设置配置项','column','116PXDPhT','\x20\x20\x20\x20','列出所有配置项','339201WYsrDr','map','配置当前项目的\x20App\x20Code','14874rWwKca','lovrabet\x20config\x20set\x20<key>\x20<value>\x20\x20\x20','lovrabet\x20config\x20get\x20<key>\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','lovrabet\x20config\x20set\x20env\x20daily\x20\x20\x20\x20\x20\x20\x20','5901GMhcrK','5fUifSo','140byoJRO','description'];a34_0x15ae=function(){return _0x43a1e3;};return a34_0x15ae();}import{jsxs as a34_0x4bcd7c,jsx as a34_0x201823}from'react/jsx-runtime';import{Box,Text}from'ink';export function ConfigHelp(){const _0x59133d=a34_0x10de,_0x3e73db=[{'command':_0x59133d(0x135),'description':_0x59133d(0x12c)},{'command':_0x59133d(0x136),'description':_0x59133d(0x144)},{'command':_0x59133d(0x143),'description':_0x59133d(0x130)}],_0x1f2e64=[{'command':_0x59133d(0x140),'description':_0x59133d(0x133)},{'command':_0x59133d(0x137),'description':'设置环境\x20(online/daily)'}];return a34_0x4bcd7c(Box,{'flexDirection':_0x59133d(0x12d),'marginTop':0x1,'marginBottom':0x1,'children':[a34_0x201823(Box,{'marginBottom':0x1,'children':a34_0x4bcd7c(Text,{'color':_0x59133d(0x13e),'children':['\x20!','\x20\x20',_0x59133d(0x13f)]})}),_0x3e73db['map'](_0x2a6019=>a34_0x4bcd7c(Box,{'children':[a34_0x4bcd7c(Text,{'children':[_0x59133d(0x12f),_0x2a6019[_0x59133d(0x142)]]}),a34_0x201823(Text,{'color':'gray','children':_0x2a6019['description']})]},_0x2a6019[_0x59133d(0x142)])),a34_0x201823(Box,{'marginTop':0x1,'marginBottom':0x1,'children':a34_0x201823(Text,{'color':_0x59133d(0x13e),'children':'\x20*\x20配置示例:'})}),_0x1f2e64[_0x59133d(0x132)](_0x4bcf87=>a34_0x4bcd7c(Box,{'children':[a34_0x4bcd7c(Text,{'children':['\x20\x20\x20\x20',_0x4bcf87[_0x59133d(0x142)]]}),a34_0x201823(Text,{'color':_0x59133d(0x13e),'children':_0x4bcf87[_0x59133d(0x13b)]})]},_0x4bcf87['command']))]});}
@@ -1 +1 @@
1
- (function(_0x143c36,_0x5991a0){const _0x9536df=a35_0x543b,_0x3a52a8=_0x143c36();while(!![]){try{const _0x3dd580=parseInt(_0x9536df(0x1d4))/0x1*(parseInt(_0x9536df(0x1cf))/0x2)+-parseInt(_0x9536df(0x1e7))/0x3*(parseInt(_0x9536df(0x1e0))/0x4)+parseInt(_0x9536df(0x1c9))/0x5+parseInt(_0x9536df(0x1c7))/0x6+-parseInt(_0x9536df(0x1d6))/0x7*(parseInt(_0x9536df(0x1d9))/0x8)+-parseInt(_0x9536df(0x1d1))/0x9+-parseInt(_0x9536df(0x1db))/0xa*(parseInt(_0x9536df(0x1cc))/0xb);if(_0x3dd580===_0x5991a0)break;else _0x3a52a8['push'](_0x3a52a8['shift']());}catch(_0x1a1daa){_0x3a52a8['push'](_0x3a52a8['shift']());}}}(a35_0x312e,0xd6e34));function a35_0x543b(_0x423cbc,_0x17e2a0){const _0x312e18=a35_0x312e();return a35_0x543b=function(_0x543b01,_0x34f861){_0x543b01=_0x543b01-0x1bf;let _0x173b92=_0x312e18[_0x543b01];return _0x173b92;},a35_0x543b(_0x423cbc,_0x17e2a0);}import{jsx as a35_0x35f836,jsxs as a35_0x29a960}from'react/jsx-runtime';import{existsSync,readFileSync,writeFileSync}from'node:fs';import a35_0x50b376 from'node:fs';import a35_0x51b107 from'node:path';import{ConfigHelp}from'./config-help.js';import{Box,Text}from'ink';import{readConfig,isInProject,projectConfigPath,globalConfigPath}from'../utils/config.js';import{logger}from'../utils/logger.js';export function Config(_0x314e86){const _0x1feb8a=a35_0x543b,{cli:_0x15c8cd}=_0x314e86,_0x21ea41=_0x15c8cd[_0x1feb8a(0x1c4)][0x1],_0x587b10=_0x15c8cd[_0x1feb8a(0x1c4)][0x2],_0x2b97a2=['set',_0x1feb8a(0x1da)]['includes'](_0x21ea41||''),_0x507f8c=_0x15c8cd[_0x1feb8a(0x1c4)][_0x1feb8a(0x1c2)]>=0x3;if(_0x587b10===_0x1feb8a(0x1e4)||_0x15c8cd[_0x1feb8a(0x1c6)]['help'])return a35_0x35f836(ConfigHelp,{});const _0x3f6870=readConfig();if(_0x21ea41===_0x1feb8a(0x1e5)){if(_0x587b10){const _0x474765=_0x15c8cd[_0x1feb8a(0x1c4)][0x3];if(typeof _0x474765!==_0x1feb8a(0x1cb)){if(_0x587b10===_0x1feb8a(0x1d5)&&![_0x1feb8a(0x1e3),'daily']['includes'](_0x474765))return a35_0x35f836(Box,{'children':a35_0x35f836(Text,{'color':_0x1feb8a(0x1cd),'children':_0x1feb8a(0x1dd)})});const _0x5d0c78=isInProject(),_0x263317=_0x5d0c78?projectConfigPath:globalConfigPath;let _0x12df32={};try{if(existsSync(_0x263317)){const _0x365a33=readFileSync(_0x263317,{'encoding':_0x1feb8a(0x1d7)});_0x365a33&&(_0x12df32=JSON[_0x1feb8a(0x1d2)](_0x365a33));}}catch(_0x43e192){}if(typeof _0x474765!==_0x1feb8a(0x1c3)||_0x474765[_0x1feb8a(0x1c2)]>0x1f4)return a35_0x35f836(Box,{'children':a35_0x35f836(Text,{'color':'red','children':_0x1feb8a(0x1e1)})});let _0x56b6b0=_0x587b10;_0x587b10===_0x1feb8a(0x1e2)&&(_0x56b6b0=_0x1feb8a(0x1c0),delete _0x12df32[_0x1feb8a(0x1e2)]);_0x587b10===_0x1feb8a(0x1c0)&&delete _0x12df32[_0x1feb8a(0x1e2)];_0x12df32[_0x56b6b0]=_0x474765;try{const _0x38759d=a35_0x51b107[_0x1feb8a(0x1dc)](_0x263317);!existsSync(_0x38759d)&&a35_0x50b376[_0x1feb8a(0x1d8)](_0x38759d,{'recursive':!![]});const _0x4a67e5=_0x263317+_0x1feb8a(0x1c1);writeFileSync(_0x4a67e5,JSON[_0x1feb8a(0x1ca)](_0x12df32,null,0x2),{'encoding':_0x1feb8a(0x1d7),'mode':0x180}),a35_0x50b376['renameSync'](_0x4a67e5,_0x263317);if(_0x587b10===_0x1feb8a(0x1d5)){const _0x122b5a=_0x5d0c78?'项目':'全局';console[_0x1feb8a(0x1df)]('✓\x20'+_0x122b5a+_0x1feb8a(0x1c8)+_0x474765);}}catch(_0x5b71b4){const _0x4257fa=_0x263317+_0x1feb8a(0x1c1);try{existsSync(_0x4257fa)&&a35_0x50b376[_0x1feb8a(0x1d3)](_0x4257fa);}catch(_0x1f272c){}return logger['error'](_0x1feb8a(0x1de),_0x1feb8a(0x1bf),{'error':_0x5b71b4 instanceof Error?_0x5b71b4[_0x1feb8a(0x1c5)]:String(_0x5b71b4),'configKey':_0x587b10,'configValue':_0x474765,'targetConfigPath':_0x263317}),a35_0x35f836(Box,{'children':a35_0x29a960(Text,{'color':_0x1feb8a(0x1cd),'children':[_0x1feb8a(0x1e6),_0x5b71b4 instanceof Error?_0x5b71b4['message']:String(_0x5b71b4)]})});}return null;}return a35_0x35f836(Box,{'children':a35_0x35f836(Text,{'color':_0x1feb8a(0x1cd),'children':_0x1feb8a(0x1ce)})});}}if(_0x21ea41===_0x1feb8a(0x1da)){if(_0x587b10){let _0x432d3f=_0x587b10;return _0x587b10==='app'&&(_0x432d3f='appcode'),console[_0x1feb8a(0x1df)](_0x3f6870[_0x432d3f]||'undefined'),null;}return null;}if(_0x21ea41===_0x1feb8a(0x1d0))return console[_0x1feb8a(0x1df)](JSON[_0x1feb8a(0x1ca)](_0x3f6870,null,0x2)),null;if(!_0x2b97a2||!_0x507f8c)return a35_0x35f836(ConfigHelp,{});return null;}function a35_0x312e(){const _0x4ac25f=['message','flags','10559544jxwRxa','环境配置已设置为:\x20','4996440sBqecg','stringify','undefined','154iSwnuC','red','未提供配置值','352962cOiDqB','list','2357118iLPpRC','parse','unlinkSync','9AFFcyq','env','256109ofbpBq','utf8','mkdirSync','112qIVonl','get','1461920YTFVXR','dirname','环境配置值只能是\x20\x22online\x22\x20或\x20\x22daily\x22','config','log','2586212LAyLaL','配置值无效或过长','app','online','--help','set','保存配置失败:\x20','3dnEbab','保存配置失败','appcode','.tmp','length','string','input'];a35_0x312e=function(){return _0x4ac25f;};return a35_0x312e();}
1
+ (function(_0x4acb1f,_0x538b5f){const _0x2d5ce9=a35_0x4ef9,_0x11d9c8=_0x4acb1f();while(!![]){try{const _0x3d62cb=parseInt(_0x2d5ce9(0x101))/0x1+parseInt(_0x2d5ce9(0x10d))/0x2*(parseInt(_0x2d5ce9(0x100))/0x3)+parseInt(_0x2d5ce9(0x10b))/0x4+parseInt(_0x2d5ce9(0x102))/0x5+parseInt(_0x2d5ce9(0x119))/0x6+-parseInt(_0x2d5ce9(0x113))/0x7*(parseInt(_0x2d5ce9(0x107))/0x8)+-parseInt(_0x2d5ce9(0x10e))/0x9;if(_0x3d62cb===_0x538b5f)break;else _0x11d9c8['push'](_0x11d9c8['shift']());}catch(_0x1bba0a){_0x11d9c8['push'](_0x11d9c8['shift']());}}}(a35_0x8f2c,0x83202));import{jsx as a35_0x1d821d,jsxs as a35_0x527bb4}from'react/jsx-runtime';import{existsSync,readFileSync,writeFileSync}from'node:fs';function a35_0x8f2c(){const _0x220a3e=['red','utf8','app','error','3063VFRASu','593028IJAKeV','5096240LvvVYB','message','log','input','get','1032QADych','includes','help','未提供配置值','3873716GtPkuW','env','932qyhivp','20617560JvtZcQ','环境配置值只能是\x20\x22online\x22\x20或\x20\x22daily\x22','parse','unlinkSync','环境配置已设置为:\x20','38066FTcBpG','length','undefined','保存配置失败:\x20','配置值无效或过长','set','2837646EsIeQN','appcode','online','renameSync','dirname'];a35_0x8f2c=function(){return _0x220a3e;};return a35_0x8f2c();}import a35_0x578934 from'node:fs';import a35_0x1917e8 from'node:path';function a35_0x4ef9(_0x5717f2,_0x213fc6){const _0x8f2ca6=a35_0x8f2c();return a35_0x4ef9=function(_0x4ef964,_0x221d6d){_0x4ef964=_0x4ef964-0xfd;let _0x1a86fe=_0x8f2ca6[_0x4ef964];return _0x1a86fe;},a35_0x4ef9(_0x5717f2,_0x213fc6);}import{ConfigHelp}from'./config-help.js';import{Box,Text}from'ink';import{readConfig,isInProject,projectConfigPath,globalConfigPath}from'../utils/config.js';import{logger}from'../utils/logger.js';export function Config(_0x272337){const _0x4b21f5=a35_0x4ef9,{cli:_0x2c8494}=_0x272337,_0x37d7be=_0x2c8494[_0x4b21f5(0x105)][0x1],_0x1f3b09=_0x2c8494[_0x4b21f5(0x105)][0x2],_0x4fab33=[_0x4b21f5(0x118),_0x4b21f5(0x106)][_0x4b21f5(0x108)](_0x37d7be||''),_0x2e2f62=_0x2c8494[_0x4b21f5(0x105)][_0x4b21f5(0x114)]>=0x3;if(_0x1f3b09==='--help'||_0x2c8494['flags'][_0x4b21f5(0x109)])return a35_0x1d821d(ConfigHelp,{});const _0x10708c=readConfig();if(_0x37d7be===_0x4b21f5(0x118)){if(_0x1f3b09){const _0x5a0b50=_0x2c8494['input'][0x3];if(typeof _0x5a0b50!=='undefined'){if(_0x1f3b09==='env'&&![_0x4b21f5(0x11b),'daily'][_0x4b21f5(0x108)](_0x5a0b50))return a35_0x1d821d(Box,{'children':a35_0x1d821d(Text,{'color':_0x4b21f5(0x11e),'children':_0x4b21f5(0x10f)})});const _0x225fd4=isInProject(),_0x43b3fd=_0x225fd4?projectConfigPath:globalConfigPath;let _0x57ec69={};try{if(existsSync(_0x43b3fd)){const _0x165ab9=readFileSync(_0x43b3fd,{'encoding':_0x4b21f5(0xfd)});_0x165ab9&&(_0x57ec69=JSON[_0x4b21f5(0x110)](_0x165ab9));}}catch(_0x279990){}if(typeof _0x5a0b50!=='string'||_0x5a0b50[_0x4b21f5(0x114)]>0x1f4)return a35_0x1d821d(Box,{'children':a35_0x1d821d(Text,{'color':_0x4b21f5(0x11e),'children':_0x4b21f5(0x117)})});let _0x3871d1=_0x1f3b09;_0x1f3b09===_0x4b21f5(0xfe)&&(_0x3871d1=_0x4b21f5(0x11a),delete _0x57ec69[_0x4b21f5(0xfe)]);_0x1f3b09===_0x4b21f5(0x11a)&&delete _0x57ec69[_0x4b21f5(0xfe)];_0x57ec69[_0x3871d1]=_0x5a0b50;try{const _0x1964ab=a35_0x1917e8[_0x4b21f5(0x11d)](_0x43b3fd);!existsSync(_0x1964ab)&&a35_0x578934['mkdirSync'](_0x1964ab,{'recursive':!![]});const _0x3da0e9=_0x43b3fd+'.tmp';writeFileSync(_0x3da0e9,JSON['stringify'](_0x57ec69,null,0x2),{'encoding':'utf8','mode':0x180}),a35_0x578934[_0x4b21f5(0x11c)](_0x3da0e9,_0x43b3fd);if(_0x1f3b09===_0x4b21f5(0x10c)){const _0x2facdd=_0x225fd4?'项目':'全局';console[_0x4b21f5(0x104)]('✓\x20'+_0x2facdd+_0x4b21f5(0x112)+_0x5a0b50);}}catch(_0x3d0a54){const _0x4afb7f=_0x43b3fd+'.tmp';try{existsSync(_0x4afb7f)&&a35_0x578934[_0x4b21f5(0x111)](_0x4afb7f);}catch(_0x598006){}return logger[_0x4b21f5(0xff)]('config','保存配置失败',{'error':_0x3d0a54 instanceof Error?_0x3d0a54[_0x4b21f5(0x103)]:String(_0x3d0a54),'configKey':_0x1f3b09,'configValue':_0x5a0b50,'targetConfigPath':_0x43b3fd}),a35_0x1d821d(Box,{'children':a35_0x527bb4(Text,{'color':_0x4b21f5(0x11e),'children':[_0x4b21f5(0x116),_0x3d0a54 instanceof Error?_0x3d0a54[_0x4b21f5(0x103)]:String(_0x3d0a54)]})});}return null;}return a35_0x1d821d(Box,{'children':a35_0x1d821d(Text,{'color':'red','children':_0x4b21f5(0x10a)})});}}if(_0x37d7be===_0x4b21f5(0x106)){if(_0x1f3b09){let _0x42de4e=_0x1f3b09;return _0x1f3b09===_0x4b21f5(0xfe)&&(_0x42de4e='appcode'),console[_0x4b21f5(0x104)](_0x10708c[_0x42de4e]||_0x4b21f5(0x115)),null;}return null;}if(_0x37d7be==='list')return console[_0x4b21f5(0x104)](JSON['stringify'](_0x10708c,null,0x2)),null;if(!_0x4fab33||!_0x2e2f62)return a35_0x1d821d(ConfigHelp,{});return null;}
@@ -1 +1 @@
1
- function a36_0x4f02(_0x51936c,_0x1e293b){const _0x544ef5=a36_0x544e();return a36_0x4f02=function(_0x4f020d,_0x36c24d){_0x4f020d=_0x4f020d-0x67;let _0x170d58=_0x544ef5[_0x4f020d];return _0x170d58;},a36_0x4f02(_0x51936c,_0x1e293b);}const a36_0x545c07=a36_0x4f02;(function(_0x48f12e,_0x29dda4){const _0x2e36ac=a36_0x4f02,_0x336c7f=_0x48f12e();while(!![]){try{const _0x178a66=-parseInt(_0x2e36ac(0x6c))/0x1+-parseInt(_0x2e36ac(0x70))/0x2*(parseInt(_0x2e36ac(0x68))/0x3)+parseInt(_0x2e36ac(0x6d))/0x4+-parseInt(_0x2e36ac(0x72))/0x5+-parseInt(_0x2e36ac(0x71))/0x6+parseInt(_0x2e36ac(0x6e))/0x7+parseInt(_0x2e36ac(0x69))/0x8*(parseInt(_0x2e36ac(0x74))/0x9);if(_0x178a66===_0x29dda4)break;else _0x336c7f['push'](_0x336c7f['shift']());}catch(_0x56d3b9){_0x336c7f['push'](_0x336c7f['shift']());}}}(a36_0x544e,0x4a8fd));function a36_0x544e(){const _0x36106b=['https://daily-api.lovrabet.com','586953kARNnM','683276LztMUT','4059153vjorBR','https://api.lovrabet.com','46juIiZq','113730WuPDuq','1522510NoNgdB','https://user.lovrabet.com','4572bBXNBp','https://user-daily.lovrabet.com','77619FyMgVR','16696iXAfMM','online'];a36_0x544e=function(){return _0x36106b;};return a36_0x544e();}import{getEnv}from'./env.js';export const getUserDomain=()=>getEnv()===a36_0x545c07(0x6a)?a36_0x545c07(0x73):a36_0x545c07(0x67);export const getApiDomain=()=>getEnv()==='online'?a36_0x545c07(0x6f):a36_0x545c07(0x6b);
1
+ function a36_0x4784(_0x1acc9b,_0x4288f4){const _0x410653=a36_0x4106();return a36_0x4784=function(_0x47840d,_0x5ad935){_0x47840d=_0x47840d-0xb6;let _0x9234a7=_0x410653[_0x47840d];return _0x9234a7;},a36_0x4784(_0x1acc9b,_0x4288f4);}const a36_0x5927d5=a36_0x4784;function a36_0x4106(){const _0xb67948=['https://user.lovrabet.com','1590015dkoeuX','738515NBQSEK','1909596ypDulw','https://daily-api.lovrabet.com','4082742nxHqMV','21OFZrQX','online','1364986JtcjhE','8702008yTXsCs','https://user-daily.lovrabet.com','6YyQKRu','2054692vgiIop'];a36_0x4106=function(){return _0xb67948;};return a36_0x4106();}(function(_0x3f567a,_0x4ecbdc){const _0x18eb35=a36_0x4784,_0xbf4067=_0x3f567a();while(!![]){try{const _0x421a68=-parseInt(_0x18eb35(0xb8))/0x1+parseInt(_0x18eb35(0xbf))/0x2+parseInt(_0x18eb35(0xc2))/0x3*(parseInt(_0x18eb35(0xb6))/0x4)+parseInt(_0x18eb35(0xb9))/0x5+parseInt(_0x18eb35(0xba))/0x6*(-parseInt(_0x18eb35(0xbd))/0x7)+parseInt(_0x18eb35(0xc0))/0x8+parseInt(_0x18eb35(0xbc))/0x9;if(_0x421a68===_0x4ecbdc)break;else _0xbf4067['push'](_0xbf4067['shift']());}catch(_0x27501f){_0xbf4067['push'](_0xbf4067['shift']());}}}(a36_0x4106,0xd0866));import{getEnv}from'./env.js';export const getUserDomain=()=>getEnv()===a36_0x5927d5(0xbe)?a36_0x5927d5(0xb7):a36_0x5927d5(0xc1);export const getApiDomain=()=>getEnv()===a36_0x5927d5(0xbe)?'https://api.lovrabet.com':a36_0x5927d5(0xbb);
@@ -1 +1 @@
1
- const a37_0x505f6f=a37_0x166c;(function(_0x2afd4e,_0x399461){const _0x51ab62=a37_0x166c,_0x19365d=_0x2afd4e();while(!![]){try{const _0x6ba199=parseInt(_0x51ab62(0x148))/0x1+parseInt(_0x51ab62(0x14d))/0x2*(-parseInt(_0x51ab62(0x14e))/0x3)+parseInt(_0x51ab62(0x151))/0x4*(parseInt(_0x51ab62(0x14c))/0x5)+-parseInt(_0x51ab62(0x153))/0x6*(parseInt(_0x51ab62(0x150))/0x7)+parseInt(_0x51ab62(0x14f))/0x8*(parseInt(_0x51ab62(0x14a))/0x9)+parseInt(_0x51ab62(0x149))/0xa*(-parseInt(_0x51ab62(0x14b))/0xb)+-parseInt(_0x51ab62(0x147))/0xc*(-parseInt(_0x51ab62(0x152))/0xd);if(_0x6ba199===_0x399461)break;else _0x19365d['push'](_0x19365d['shift']());}catch(_0x2780f3){_0x19365d['push'](_0x19365d['shift']());}}}(a37_0xe25e,0x3e229));let env=process[a37_0x505f6f(0x155)][a37_0x505f6f(0x154)]||'online';function a37_0x166c(_0x27d1de,_0x1b69cb){const _0xe25e19=a37_0xe25e();return a37_0x166c=function(_0x166cb1,_0x5f43c7){_0x166cb1=_0x166cb1-0x147;let _0x191d79=_0xe25e19[_0x166cb1];return _0x191d79;},a37_0x166c(_0x27d1de,_0x1b69cb);}export function getEnv(){return env;}function a37_0xe25e(){const _0x278bdb=['12bpaeNE','89773AHJZSG','30DwklyO','1818hcEIXe','422147cCNTDz','245SpFxkC','2ZWllZz','712995HhTjKT','3704UieISu','707VPAgRH','34644kzwoif','742066SOquci','3414vajCBu','LOVRABET_ENV','env'];a37_0xe25e=function(){return _0x278bdb;};return a37_0xe25e();}export function initEnv(_0x2f67b1){env=_0x2f67b1;}
1
+ function a37_0x25d0(){const _0x1f600f=['291RFElUU','LOVRABET_ENV','10748568NEopOT','5712gMCTvW','7924fJTddD','12273580mUfpyD','18284QdyloH','9WBrmnP','3517162foAwMi','3894790tokEbW','27442GpRIgA','180FXRSDv','env','online','10GIarum'];a37_0x25d0=function(){return _0x1f600f;};return a37_0x25d0();}const a37_0x3befd4=a37_0x4fd8;(function(_0x2fd3c6,_0x42a286){const _0x423191=a37_0x4fd8,_0x3133b4=_0x2fd3c6();while(!![]){try{const _0x3d2b63=parseInt(_0x423191(0x11d))/0x1*(-parseInt(_0x423191(0x121))/0x2)+-parseInt(_0x423191(0x122))/0x3*(-parseInt(_0x423191(0x119))/0x4)+-parseInt(_0x423191(0x11c))/0x5+parseInt(_0x423191(0x116))/0x6*(-parseInt(_0x423191(0x117))/0x7)+-parseInt(_0x423191(0x124))/0x8*(parseInt(_0x423191(0x11a))/0x9)+-parseInt(_0x423191(0x118))/0xa+-parseInt(_0x423191(0x11b))/0xb*(-parseInt(_0x423191(0x11e))/0xc);if(_0x3d2b63===_0x42a286)break;else _0x3133b4['push'](_0x3133b4['shift']());}catch(_0x37a83e){_0x3133b4['push'](_0x3133b4['shift']());}}}(a37_0x25d0,0xa4bc4));function a37_0x4fd8(_0x1e283a,_0x3585ed){const _0x25d0cd=a37_0x25d0();return a37_0x4fd8=function(_0x4fd87f,_0x492387){_0x4fd87f=_0x4fd87f-0x116;let _0x42ae0a=_0x25d0cd[_0x4fd87f];return _0x42ae0a;},a37_0x4fd8(_0x1e283a,_0x3585ed);}let env=process[a37_0x3befd4(0x11f)][a37_0x3befd4(0x123)]||a37_0x3befd4(0x120);export function getEnv(){return env;}export function initEnv(_0xbeff7e){env=_0xbeff7e;}
@@ -1 +1 @@
1
- (function(_0x5af969,_0x2ad281){const _0x134089=a38_0x2f13,_0x163133=_0x5af969();while(!![]){try{const _0x2076ff=parseInt(_0x134089(0x77))/0x1+-parseInt(_0x134089(0x93))/0x2*(-parseInt(_0x134089(0x96))/0x3)+-parseInt(_0x134089(0xb4))/0x4*(parseInt(_0x134089(0x9f))/0x5)+-parseInt(_0x134089(0x99))/0x6*(-parseInt(_0x134089(0x9e))/0x7)+parseInt(_0x134089(0x95))/0x8+parseInt(_0x134089(0x9d))/0x9+-parseInt(_0x134089(0xb1))/0xa*(parseInt(_0x134089(0xa5))/0xb);if(_0x2076ff===_0x2ad281)break;else _0x163133['push'](_0x163133['shift']());}catch(_0x387ef3){_0x163133['push'](_0x163133['shift']());}}}(a38_0x4213,0xa4203));import{jsx as a38_0xeb10be,jsxs as a38_0x220895,Fragment as a38_0x17a304}from'react/jsx-runtime';import{useState}from'react';import{Text,Box,useInput}from'ink';import{getIsSessionValid}from'../auth/is-session-valid.js';import{authServer}from'../auth/auth-server.js';import{readConfig}from'../utils/config.js';function a38_0x2f13(_0x22f305,_0x25ce94){const _0x4213d2=a38_0x4213();return a38_0x2f13=function(_0x2f1353,_0x4ba19c){_0x2f1353=_0x2f1353-0x77;let _0x490b12=_0x4213d2[_0x2f1353];return _0x490b12;},a38_0x2f13(_0x22f305,_0x25ce94);}export function EnhancedGuidedCreate(_0x348036){const _0x20e787=a38_0x2f13,{onCreate:_0x1e418d,env:_0x28f42f}=_0x348036,[_0xd9daf,_0x5e0757]=useState(_0x20e787(0x90)),[_0x2b72e5,_0xbfb1b6]=useState(''),[_0x27e6a3,_0x343eeb]=useState(''),[_0x2980cd,_0x4d7989]=useState(''),[_0x7a1c1e,_0x551e03]=useState(''),[_0xd1772b,_0x8d58c0]=useState([]),[_0x20eef6,_0x40c854]=useState(null),[_0x1ab71d,_0x1d71ab]=useState(![]),[_0x244d1d,_0x45942f]=useState(![]),[_0x17d07c,_0x1c88e2]=useState(![]),[_0x59139a,_0x5d3c74]=useState(0x0),[_0x57b872,_0x26efb4]=useState(0x0),_0x31a2c3='my-app',_0x3207bc=readConfig(),_0x131d3e=typeof _0x3207bc['env']===_0x20e787(0xab)?_0x3207bc[_0x20e787(0x8b)]:undefined;function _0x426ce6(_0x243867){const _0x82d14f=_0x20e787;if(_0x243867[_0x82d14f(0x89)]>0x32)return{'valid':![],'message':_0x82d14f(0xad)};const _0x4f62c5=/^[A-Za-z0-9][A-Za-z0-9_-]*$/;if(_0x243867?.[_0x82d14f(0xb6)]()&&!_0x4f62c5[_0x82d14f(0xa1)](_0x243867))return{'valid':![],'message':_0x82d14f(0x92)};return{'valid':!![]};}function _0x599030(_0x36f95c){const _0x30de98=_0x20e787;if(!_0x36f95c['trim']())return{'valid':!![]};if(_0x36f95c[_0x30de98(0x89)]>0x64)return{'valid':![],'message':'应用AppCode长度不能超过\x20100\x20个字符'};const _0x1dc477=/^[a-zA-Z0-9][a-zA-Z0-9_-]*$/;if(!_0x1dc477[_0x30de98(0xa1)](_0x36f95c))return{'valid':![],'message':_0x30de98(0x85)};return{'valid':!![]};}async function _0x29f897(){_0x1d71ab(!![]);try{const _0x40f62c=await getIsSessionValid();return _0x40c854(_0x40f62c),_0x40f62c;}catch(_0x515823){return _0x40c854(![]),![];}finally{_0x1d71ab(![]);}}async function _0x231d19(){_0x45942f(!![]);try{const _0x513ff2=await authServer({'silent':!![]});return _0x40c854(_0x513ff2),_0x513ff2;}catch(_0x3596dc){return _0x40c854(![]),![];}finally{_0x45942f(![]);}}return useInput(async(_0x458735,_0x3684b5)=>{const _0x34662a=_0x20e787;if(_0x3684b5[_0x34662a(0x81)]||_0x3684b5['rightArrow']){if(_0xd9daf===_0x34662a(0xac)){_0x5d3c74(_0x442f72=>_0x442f72===0x0?0x1:0x0);return;}if(_0xd9daf===_0x34662a(0xa0)){_0x26efb4(_0x4b1545=>_0x4b1545===0x0?0x1:0x0);return;}}if(_0x3684b5['return']){if(_0xd9daf==='project-name'){const _0x1fd8bf=_0x2980cd[_0x34662a(0xb6)]()||_0x31a2c3;if(_0x7a1c1e)return;_0xbfb1b6(_0x1fd8bf),_0x8d58c0([{'step':_0x34662a(0x90),'label':_0x34662a(0x98),'value':_0x1fd8bf}]),_0x4d7989(''),_0x551e03(''),_0x5e0757(_0x34662a(0x80));return;}if(_0xd9daf===_0x34662a(0x80)){if(_0x7a1c1e)return;const _0x308b30=_0x2980cd[_0x34662a(0xb6)]();_0x343eeb(_0x308b30),_0x8d58c0(_0x476264=>[..._0x476264,{'step':_0x34662a(0x80),'label':_0x34662a(0x7d),'value':_0x308b30||_0x34662a(0x7f)}]),_0x4d7989(''),_0x551e03('');if(_0x308b30){_0x5e0757(_0x34662a(0x8d));const _0x2d49fe=await _0x29f897();_0x2d49fe?_0x5e0757('confirm-api-pull'):_0x5e0757(_0x34662a(0xa0));}else{const _0x5e014d=_0x28f42f||_0x131d3e||_0x34662a(0x86);_0x1e418d({'projectName':_0x2b72e5,'appCode':undefined,'pullApi':![],'env':_0x5e014d}),_0x5e0757(_0x34662a(0xb7));}return;}if(_0xd9daf==='confirm-api-pull'){const _0x5dd81d=_0x59139a===0x0;_0x1c88e2(_0x5dd81d),_0x8d58c0(_0x39b557=>[..._0x39b557,{'step':_0x34662a(0xa7),'label':_0x34662a(0xb3),'value':_0x5dd81d?'是':'否'}]);const _0x3e33eb=_0x28f42f||_0x131d3e||_0x34662a(0x86);_0x1e418d({'projectName':_0x2b72e5,'appCode':_0x27e6a3,'pullApi':_0x5dd81d,'env':_0x3e33eb}),_0x5e0757(_0x34662a(0xb7));return;}if(_0xd9daf===_0x34662a(0xa0)){const _0xba76bb=_0x57b872===0x0;if(_0xba76bb){_0x5e0757('login-process');const _0x4e30bc=await _0x231d19();if(_0x4e30bc)_0x8d58c0(_0x4ec68a=>[..._0x4ec68a,{'step':_0x34662a(0x83),'label':'登录状态','value':_0x34662a(0x7a)}]),_0x5e0757('confirm-api-pull');else{_0x8d58c0(_0x5754df=>[..._0x5754df,{'step':_0x34662a(0x83),'label':_0x34662a(0xa4),'value':_0x34662a(0xa6)}]);const _0x44421e=_0x28f42f||_0x131d3e||_0x34662a(0x86);_0x1e418d({'projectName':_0x2b72e5,'appCode':_0x27e6a3,'pullApi':![],'env':_0x44421e}),_0x5e0757(_0x34662a(0xb7));}}else{_0x8d58c0(_0xb6a6de=>[..._0xb6a6de,{'step':_0x34662a(0x83),'label':_0x34662a(0xa4),'value':_0x34662a(0xaa)}]);const _0x539746=_0x28f42f||_0x131d3e||'online';_0x1e418d({'projectName':_0x2b72e5,'appCode':_0x27e6a3,'pullApi':![],'env':_0x539746}),_0x5e0757('creating');}return;}}if(_0x3684b5[_0x34662a(0x8a)]||_0x3684b5[_0x34662a(0x79)]){_0x4d7989(_0x3f4d06=>{const _0x1cb512=_0x34662a,_0x59b579=_0x3f4d06[_0x1cb512(0xae)](0x0,-0x1);if(_0xd9daf===_0x1cb512(0x90)){const {valid:_0x3e098c,message:_0x494eee}=_0x426ce6(_0x59b579);_0x551e03(_0x3e098c?'':_0x494eee||_0x1cb512(0xa2));}else{if(_0xd9daf===_0x1cb512(0x80)){const {valid:_0x1641f9,message:_0x41f34d}=_0x599030(_0x59b579);_0x551e03(_0x1641f9?'':_0x41f34d||_0x1cb512(0x8e));}}return _0x59b579;});return;}if(['creating','login-check',_0x34662a(0x8f)]['includes'](_0xd9daf))return;if(_0xd9daf===_0x34662a(0xac)||_0xd9daf===_0x34662a(0xa0))return;_0x4d7989(_0x55d2da=>{const _0x47b445=_0x34662a,_0x4086bc=_0x55d2da+_0x458735;if(_0xd9daf===_0x47b445(0x90)){const {valid:_0x391a5f,message:_0x493409}=_0x426ce6(_0x4086bc);_0x551e03(_0x391a5f?'':_0x493409||_0x47b445(0xa2));}else{if(_0xd9daf===_0x47b445(0x80)){const {valid:_0x12947c,message:_0x436567}=_0x599030(_0x4086bc);_0x551e03(_0x12947c?'':_0x436567||_0x47b445(0x8e));}}return _0x4086bc;});}),a38_0x220895(Box,{'flexDirection':_0x20e787(0xb8),'marginTop':0x1,'children':[_0xd1772b['length']===0x0&&a38_0xeb10be(Box,{'children':a38_0xeb10be(Text,{'color':'cyan','children':_0x20e787(0x7e)})}),_0xd1772b[_0x20e787(0xb0)](_0x502dab=>a38_0x220895(Box,{'children':[a38_0x220895(Text,{'color':_0x20e787(0x82),'children':['√\x20',_0x502dab[_0x20e787(0x88)],':\x20']}),a38_0xeb10be(Text,{'color':'cyan','children':_0x502dab[_0x20e787(0x78)]})]},_0x502dab['step'])),_0xd9daf==='project-name'&&a38_0x220895(a38_0x17a304,{'children':[a38_0x220895(Box,{'children':[a38_0xeb10be(Text,{'children':_0x20e787(0x97)}),_0x2980cd?a38_0xeb10be(Text,{'color':_0x20e787(0x82),'children':_0x2980cd}):a38_0xeb10be(Text,{'color':_0x20e787(0x8c),'children':_0x31a2c3}),_0x7a1c1e&&a38_0x220895(Text,{'color':_0x20e787(0xa9),'children':[_0x20e787(0x94),_0x7a1c1e]})]}),!_0x7a1c1e&&!_0x2980cd&&a38_0xeb10be(Box,{'children':a38_0xeb10be(Text,{'color':'gray','children':_0x20e787(0xaf)})})]}),_0xd9daf===_0x20e787(0x80)&&a38_0x220895(a38_0x17a304,{'children':[a38_0x220895(Box,{'children':[a38_0xeb10be(Text,{'children':_0x20e787(0xa3)}),a38_0xeb10be(Text,{'color':_0x20e787(0x8c),'children':'[可选]:\x20'}),a38_0xeb10be(Text,{'color':'green','children':_0x2980cd}),_0x7a1c1e&&a38_0x220895(Text,{'color':_0x20e787(0xa9),'children':['\x20←\x20',_0x7a1c1e]})]}),!_0x7a1c1e&&a38_0xeb10be(Box,{'children':a38_0x220895(Text,{'color':_0x20e787(0x8c),'children':['\x20',_0x20e787(0x9a)]})})]}),_0xd9daf===_0x20e787(0x8d)&&a38_0x220895(Box,{'children':[a38_0xeb10be(Text,{'children':_0x20e787(0x91)}),_0x1ab71d&&a38_0xeb10be(Text,{'color':_0x20e787(0x8c),'children':_0x20e787(0x87)})]}),_0xd9daf===_0x20e787(0xac)&&a38_0x220895(a38_0x17a304,{'children':[a38_0xeb10be(Box,{'children':a38_0xeb10be(Text,{'color':_0x20e787(0x82),'children':'√\x20检测到有效登录状态'})}),a38_0xeb10be(Box,{'marginTop':0x1,'children':a38_0xeb10be(Text,{'children':_0x20e787(0x9b)})}),a38_0x220895(Box,{'marginLeft':0x2,'children':[a38_0x220895(Text,{'color':_0x59139a===0x0?_0x20e787(0x82):_0x20e787(0x8c),'children':[_0x59139a===0x0?'▶\x20':'\x20\x20',_0x20e787(0xa8)]}),a38_0xeb10be(Text,{'children':'\x20'}),a38_0x220895(Text,{'color':_0x59139a===0x1?_0x20e787(0x82):_0x20e787(0x8c),'children':[_0x59139a===0x1?'▶\x20':'\x20\x20','No']})]}),a38_0xeb10be(Box,{'children':a38_0xeb10be(Text,{'color':_0x20e787(0x8c),'children':_0x20e787(0xb9)})}),a38_0xeb10be(Box,{'children':a38_0xeb10be(Text,{'color':_0x20e787(0x9c),'children':_0x20e787(0xb2)})})]}),_0xd9daf==='login-prompt'&&a38_0x220895(a38_0x17a304,{'children':[a38_0xeb10be(Box,{'children':a38_0xeb10be(Text,{'color':'yellow','children':_0x20e787(0x7c)})}),a38_0xeb10be(Box,{'marginTop':0x1,'children':a38_0xeb10be(Text,{'children':_0x20e787(0x7b)})}),a38_0x220895(Box,{'marginLeft':0x2,'children':[a38_0x220895(Text,{'color':_0x57b872===0x0?'green':'gray','children':[_0x57b872===0x0?'▶\x20':'\x20\x20',_0x20e787(0xa8)]}),a38_0xeb10be(Text,{'children':'\x20'}),a38_0x220895(Text,{'color':_0x57b872===0x1?'green':'gray','children':[_0x57b872===0x1?'▶\x20':'\x20\x20','No']})]}),a38_0xeb10be(Box,{'children':a38_0xeb10be(Text,{'color':_0x20e787(0x8c),'children':_0x20e787(0xb9)})}),a38_0xeb10be(Box,{'children':a38_0xeb10be(Text,{'color':_0x20e787(0x9c),'children':_0x20e787(0xb5)})})]}),_0xd9daf==='login-process'&&a38_0x220895(Box,{'children':[a38_0xeb10be(Text,{'children':_0x20e787(0x84)}),_0x244d1d&&a38_0xeb10be(Text,{'color':'gray','children':'\x20登录中...'})]})]});}function a38_0x4213(){const _0xc2896e=['181108iIfvxd','\x20\x20推荐选择\x20Yes,登录后可自动拉取并配置\x20API\x20接口','trim','creating','column','\x20\x20使用\x20←→\x20选择,回车确认','1323503NuIDTn','value','delete','已登录','*\x20是否要先登录以便拉取\x20API\x20配置?','!\x20未检测到有效登录','应用AppCode','*\x20创建新项目','未设置','app-code','leftArrow','green','login','*\x20正在登录,请前往浏览器完成登录...','应用AppCode只能包含字母、数字、连字符和下划线,且必须以字母或数字开头','online','\x20检查中...','label','length','backspace','env','gray','login-check','应用AppCode不合法','login-process','project-name','*\x20正在检查登录状态...','项目名只能以字母或数字开头,且只包含字母、数字、-\x20和\x20_','417986SgaKyW','\x20←\x20','2251128cTCmIP','3ZBuxot','*\x20项目名:\x20','项目名','203688bcScfQ','绑定应用AppCode可自动配置\x20API,如:\x20app-c4c89304\x20(直接回车跳过)','*\x20是否要自动拉取\x20API\x20配置?','yellow','9758844nNfrrV','154QPVkvB','110INuOsQ','login-prompt','test','项目名不合法','*\x20应用AppCode\x20','登录状态','3623961LsySOX','登录失败','api-pull','Yes','red','跳过登录','string','confirm-api-pull','项目名长度不能超过\x2050\x20个字符','slice','\x20直接回车确认,或输入自定义名称','map','60IERFjC','\x20\x20推荐选择\x20Yes,可自动配置\x20API\x20接口','拉取API配置'];a38_0x4213=function(){return _0xc2896e;};return a38_0x4213();}
1
+ (function(_0x592ba4,_0x3b5be8){const _0x236c1d=a38_0x2d5f,_0x16e115=_0x592ba4();while(!![]){try{const _0x29c9f8=parseInt(_0x236c1d(0x220))/0x1+-parseInt(_0x236c1d(0x216))/0x2+-parseInt(_0x236c1d(0x20a))/0x3*(-parseInt(_0x236c1d(0x219))/0x4)+-parseInt(_0x236c1d(0x205))/0x5*(-parseInt(_0x236c1d(0x1ef))/0x6)+parseInt(_0x236c1d(0x212))/0x7+-parseInt(_0x236c1d(0x21e))/0x8*(-parseInt(_0x236c1d(0x21d))/0x9)+-parseInt(_0x236c1d(0x207))/0xa;if(_0x29c9f8===_0x3b5be8)break;else _0x16e115['push'](_0x16e115['shift']());}catch(_0x4f942f){_0x16e115['push'](_0x16e115['shift']());}}}(a38_0x3877,0xba242));import{jsx as a38_0x481c44,jsxs as a38_0x48d3fc,Fragment as a38_0x528de6}from'react/jsx-runtime';function a38_0x2d5f(_0x5c038b,_0x128c8a){const _0x3877d3=a38_0x3877();return a38_0x2d5f=function(_0x2d5f09,_0x28c98f){_0x2d5f09=_0x2d5f09-0x1eb;let _0x451eb7=_0x3877d3[_0x2d5f09];return _0x451eb7;},a38_0x2d5f(_0x5c038b,_0x128c8a);}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';function a38_0x3877(){const _0x4be034=['login-prompt','\x20\x20使用\x20←→\x20选择,回车确认','step','拉取API配置','login-check','yellow','应用AppCode不合法','*\x20正在检查登录状态...','gray','!\x20未检测到有效登录','\x20\x20推荐选择\x20Yes,登录后可自动拉取并配置\x20API\x20接口','18ySRaqJ','项目名','*\x20应用AppCode\x20','*\x20是否要先登录以便拉取\x20API\x20配置?','跳过登录','trim','未设置','*\x20创建新项目','\x20登录中...','Yes','绑定应用AppCode可自动配置\x20API,如:\x20app-c4c89304\x20(直接回车跳过)','cyan','delete','项目名只能以字母或数字开头,且只包含字母、数字、-\x20和\x20_','已登录','test','slice','env','label','online','*\x20是否要自动拉取\x20API\x20配置?','\x20←\x20','342620fjftdS','*\x20项目名:\x20','11892090qAJOlQ','creating','length','2457423pQRvWJ','green','\x20检查中...','应用AppCode只能包含字母、数字、连字符和下划线,且必须以字母或数字开头','project-name','√\x20检测到有效登录状态','includes','confirm-api-pull','3174192rEgVIu','login','\x20直接回车确认,或输入自定义名称','rightArrow','2410306xnUbHQ','应用AppCode长度不能超过\x20100\x20个字符','value','4uAymtE','login-process','column','app-code','169002xsTZXi','296RrFydi','red','983841VCSAja','my-app','登录状态'];a38_0x3877=function(){return _0x4be034;};return a38_0x3877();}import{readConfig}from'../utils/config.js';export function EnhancedGuidedCreate(_0x1a441c){const _0x4d301c=a38_0x2d5f,{onCreate:_0x2cc701,env:_0xe8c040}=_0x1a441c,[_0x248c9f,_0x4be61b]=useState(_0x4d301c(0x20e)),[_0x499143,_0x4854e4]=useState(''),[_0x549052,_0x547c4a]=useState(''),[_0x2b8f7b,_0x1e2b54]=useState(''),[_0x2e00fd,_0x3629c1]=useState(''),[_0x1a6183,_0x337606]=useState([]),[_0x246fb1,_0xbb3eb0]=useState(null),[_0x190cc5,_0x4feb6a]=useState(![]),[_0x2a399a,_0x2b5e89]=useState(![]),[_0x3a0747,_0x3d4bcc]=useState(![]),[_0x19a39f,_0x1b4c40]=useState(0x0),[_0x2c9911,_0x55b708]=useState(0x0),_0x25e444=_0x4d301c(0x221),_0x5451aa=readConfig(),_0x308490=typeof _0x5451aa[_0x4d301c(0x200)]==='string'?_0x5451aa[_0x4d301c(0x200)]:undefined;function _0xf57268(_0x1cfa0f){const _0x367cb7=_0x4d301c;if(_0x1cfa0f[_0x367cb7(0x209)]>0x32)return{'valid':![],'message':'项目名长度不能超过\x2050\x20个字符'};const _0x57c59e=/^[A-Za-z0-9][A-Za-z0-9_-]*$/;if(_0x1cfa0f?.[_0x367cb7(0x1f4)]()&&!_0x57c59e[_0x367cb7(0x1fe)](_0x1cfa0f))return{'valid':![],'message':_0x367cb7(0x1fc)};return{'valid':!![]};}function _0x5440c0(_0x515903){const _0x306879=_0x4d301c;if(!_0x515903[_0x306879(0x1f4)]())return{'valid':!![]};if(_0x515903['length']>0x64)return{'valid':![],'message':_0x306879(0x217)};const _0x26eb0b=/^[a-zA-Z0-9][a-zA-Z0-9_-]*$/;if(!_0x26eb0b[_0x306879(0x1fe)](_0x515903))return{'valid':![],'message':_0x306879(0x20d)};return{'valid':!![]};}async function _0x2da39e(){_0x4feb6a(!![]);try{const _0x4a6ee4=await getIsSessionValid();return _0xbb3eb0(_0x4a6ee4),_0x4a6ee4;}catch(_0x491799){return _0xbb3eb0(![]),![];}finally{_0x4feb6a(![]);}}async function _0x1ae4aa(){_0x2b5e89(!![]);try{const _0x147ec0=await authServer({'silent':!![]});return _0xbb3eb0(_0x147ec0),_0x147ec0;}catch(_0x1cbbaa){return _0xbb3eb0(![]),![];}finally{_0x2b5e89(![]);}}return useInput(async(_0xe63fb,_0x2b777b)=>{const _0x3092d0=_0x4d301c;if(_0x2b777b['leftArrow']||_0x2b777b[_0x3092d0(0x215)]){if(_0x248c9f===_0x3092d0(0x211)){_0x1b4c40(_0xd370a4=>_0xd370a4===0x0?0x1:0x0);return;}if(_0x248c9f===_0x3092d0(0x223)){_0x55b708(_0x2ff4f8=>_0x2ff4f8===0x0?0x1:0x0);return;}}if(_0x2b777b['return']){if(_0x248c9f==='project-name'){const _0x5dfe14=_0x2b8f7b[_0x3092d0(0x1f4)]()||_0x25e444;if(_0x2e00fd)return;_0x4854e4(_0x5dfe14),_0x337606([{'step':_0x3092d0(0x20e),'label':_0x3092d0(0x1f0),'value':_0x5dfe14}]),_0x1e2b54(''),_0x3629c1(''),_0x4be61b(_0x3092d0(0x21c));return;}if(_0x248c9f===_0x3092d0(0x21c)){if(_0x2e00fd)return;const _0x3de3dc=_0x2b8f7b[_0x3092d0(0x1f4)]();_0x547c4a(_0x3de3dc),_0x337606(_0x407146=>[..._0x407146,{'step':_0x3092d0(0x21c),'label':'应用AppCode','value':_0x3de3dc||_0x3092d0(0x1f5)}]),_0x1e2b54(''),_0x3629c1('');if(_0x3de3dc){_0x4be61b('login-check');const _0x3bff24=await _0x2da39e();_0x3bff24?_0x4be61b(_0x3092d0(0x211)):_0x4be61b('login-prompt');}else{const _0x1b54c5=_0xe8c040||_0x308490||_0x3092d0(0x202);_0x2cc701({'projectName':_0x499143,'appCode':undefined,'pullApi':![],'env':_0x1b54c5}),_0x4be61b(_0x3092d0(0x208));}return;}if(_0x248c9f==='confirm-api-pull'){const _0x464d70=_0x19a39f===0x0;_0x3d4bcc(_0x464d70),_0x337606(_0x22b0c9=>[..._0x22b0c9,{'step':'api-pull','label':_0x3092d0(0x226),'value':_0x464d70?'是':'否'}]);const _0x46a3c9=_0xe8c040||_0x308490||_0x3092d0(0x202);_0x2cc701({'projectName':_0x499143,'appCode':_0x549052,'pullApi':_0x464d70,'env':_0x46a3c9}),_0x4be61b(_0x3092d0(0x208));return;}if(_0x248c9f===_0x3092d0(0x223)){const _0x2efccf=_0x2c9911===0x0;if(_0x2efccf){_0x4be61b(_0x3092d0(0x21a));const _0x400b35=await _0x1ae4aa();if(_0x400b35)_0x337606(_0x496a6c=>[..._0x496a6c,{'step':'login','label':_0x3092d0(0x222),'value':_0x3092d0(0x1fd)}]),_0x4be61b(_0x3092d0(0x211));else{_0x337606(_0x3ac731=>[..._0x3ac731,{'step':'login','label':_0x3092d0(0x222),'value':'登录失败'}]);const _0x157626=_0xe8c040||_0x308490||_0x3092d0(0x202);_0x2cc701({'projectName':_0x499143,'appCode':_0x549052,'pullApi':![],'env':_0x157626}),_0x4be61b(_0x3092d0(0x208));}}else{_0x337606(_0x55f9e8=>[..._0x55f9e8,{'step':_0x3092d0(0x213),'label':_0x3092d0(0x222),'value':_0x3092d0(0x1f3)}]);const _0x5c5946=_0xe8c040||_0x308490||_0x3092d0(0x202);_0x2cc701({'projectName':_0x499143,'appCode':_0x549052,'pullApi':![],'env':_0x5c5946}),_0x4be61b(_0x3092d0(0x208));}return;}}if(_0x2b777b['backspace']||_0x2b777b[_0x3092d0(0x1fb)]){_0x1e2b54(_0x491382=>{const _0x3d393a=_0x3092d0,_0x145154=_0x491382[_0x3d393a(0x1ff)](0x0,-0x1);if(_0x248c9f==='project-name'){const {valid:_0x73936f,message:_0x58a262}=_0xf57268(_0x145154);_0x3629c1(_0x73936f?'':_0x58a262||'项目名不合法');}else{if(_0x248c9f==='app-code'){const {valid:_0x3dfabd,message:_0x4bcde2}=_0x5440c0(_0x145154);_0x3629c1(_0x3dfabd?'':_0x4bcde2||'应用AppCode不合法');}}return _0x145154;});return;}if([_0x3092d0(0x208),_0x3092d0(0x227),_0x3092d0(0x21a)][_0x3092d0(0x210)](_0x248c9f))return;if(_0x248c9f==='confirm-api-pull'||_0x248c9f==='login-prompt')return;_0x1e2b54(_0xe6f9a3=>{const _0x12fe28=_0x3092d0,_0x14873e=_0xe6f9a3+_0xe63fb;if(_0x248c9f===_0x12fe28(0x20e)){const {valid:_0xd15533,message:_0x291b55}=_0xf57268(_0x14873e);_0x3629c1(_0xd15533?'':_0x291b55||'项目名不合法');}else{if(_0x248c9f===_0x12fe28(0x21c)){const {valid:_0x16eea2,message:_0x3a4d60}=_0x5440c0(_0x14873e);_0x3629c1(_0x16eea2?'':_0x3a4d60||_0x12fe28(0x229));}}return _0x14873e;});}),a38_0x48d3fc(Box,{'flexDirection':_0x4d301c(0x21b),'marginTop':0x1,'children':[_0x1a6183[_0x4d301c(0x209)]===0x0&&a38_0x481c44(Box,{'children':a38_0x481c44(Text,{'color':_0x4d301c(0x1fa),'children':_0x4d301c(0x1f6)})}),_0x1a6183['map'](_0x301a64=>a38_0x48d3fc(Box,{'children':[a38_0x48d3fc(Text,{'color':_0x4d301c(0x20b),'children':['√\x20',_0x301a64[_0x4d301c(0x201)],':\x20']}),a38_0x481c44(Text,{'color':'cyan','children':_0x301a64[_0x4d301c(0x218)]})]},_0x301a64[_0x4d301c(0x225)])),_0x248c9f===_0x4d301c(0x20e)&&a38_0x48d3fc(a38_0x528de6,{'children':[a38_0x48d3fc(Box,{'children':[a38_0x481c44(Text,{'children':_0x4d301c(0x206)}),_0x2b8f7b?a38_0x481c44(Text,{'color':_0x4d301c(0x20b),'children':_0x2b8f7b}):a38_0x481c44(Text,{'color':_0x4d301c(0x1ec),'children':_0x25e444}),_0x2e00fd&&a38_0x48d3fc(Text,{'color':_0x4d301c(0x21f),'children':[_0x4d301c(0x204),_0x2e00fd]})]}),!_0x2e00fd&&!_0x2b8f7b&&a38_0x481c44(Box,{'children':a38_0x481c44(Text,{'color':_0x4d301c(0x1ec),'children':_0x4d301c(0x214)})})]}),_0x248c9f===_0x4d301c(0x21c)&&a38_0x48d3fc(a38_0x528de6,{'children':[a38_0x48d3fc(Box,{'children':[a38_0x481c44(Text,{'children':_0x4d301c(0x1f1)}),a38_0x481c44(Text,{'color':_0x4d301c(0x1ec),'children':'[可选]:\x20'}),a38_0x481c44(Text,{'color':'green','children':_0x2b8f7b}),_0x2e00fd&&a38_0x48d3fc(Text,{'color':_0x4d301c(0x21f),'children':['\x20←\x20',_0x2e00fd]})]}),!_0x2e00fd&&a38_0x481c44(Box,{'children':a38_0x48d3fc(Text,{'color':'gray','children':['\x20',_0x4d301c(0x1f9)]})})]}),_0x248c9f==='login-check'&&a38_0x48d3fc(Box,{'children':[a38_0x481c44(Text,{'children':_0x4d301c(0x1eb)}),_0x190cc5&&a38_0x481c44(Text,{'color':'gray','children':_0x4d301c(0x20c)})]}),_0x248c9f==='confirm-api-pull'&&a38_0x48d3fc(a38_0x528de6,{'children':[a38_0x481c44(Box,{'children':a38_0x481c44(Text,{'color':_0x4d301c(0x20b),'children':_0x4d301c(0x20f)})}),a38_0x481c44(Box,{'marginTop':0x1,'children':a38_0x481c44(Text,{'children':_0x4d301c(0x203)})}),a38_0x48d3fc(Box,{'marginLeft':0x2,'children':[a38_0x48d3fc(Text,{'color':_0x19a39f===0x0?'green':_0x4d301c(0x1ec),'children':[_0x19a39f===0x0?'▶\x20':'\x20\x20','Yes']}),a38_0x481c44(Text,{'children':'\x20'}),a38_0x48d3fc(Text,{'color':_0x19a39f===0x1?_0x4d301c(0x20b):_0x4d301c(0x1ec),'children':[_0x19a39f===0x1?'▶\x20':'\x20\x20','No']})]}),a38_0x481c44(Box,{'children':a38_0x481c44(Text,{'color':'gray','children':_0x4d301c(0x224)})}),a38_0x481c44(Box,{'children':a38_0x481c44(Text,{'color':_0x4d301c(0x228),'children':'\x20\x20推荐选择\x20Yes,可自动配置\x20API\x20接口'})})]}),_0x248c9f===_0x4d301c(0x223)&&a38_0x48d3fc(a38_0x528de6,{'children':[a38_0x481c44(Box,{'children':a38_0x481c44(Text,{'color':_0x4d301c(0x228),'children':_0x4d301c(0x1ed)})}),a38_0x481c44(Box,{'marginTop':0x1,'children':a38_0x481c44(Text,{'children':_0x4d301c(0x1f2)})}),a38_0x48d3fc(Box,{'marginLeft':0x2,'children':[a38_0x48d3fc(Text,{'color':_0x2c9911===0x0?_0x4d301c(0x20b):_0x4d301c(0x1ec),'children':[_0x2c9911===0x0?'▶\x20':'\x20\x20',_0x4d301c(0x1f8)]}),a38_0x481c44(Text,{'children':'\x20'}),a38_0x48d3fc(Text,{'color':_0x2c9911===0x1?'green':_0x4d301c(0x1ec),'children':[_0x2c9911===0x1?'▶\x20':'\x20\x20','No']})]}),a38_0x481c44(Box,{'children':a38_0x481c44(Text,{'color':'gray','children':_0x4d301c(0x224)})}),a38_0x481c44(Box,{'children':a38_0x481c44(Text,{'color':_0x4d301c(0x228),'children':_0x4d301c(0x1ee)})})]}),_0x248c9f===_0x4d301c(0x21a)&&a38_0x48d3fc(Box,{'children':[a38_0x481c44(Text,{'children':'*\x20正在登录,请前往浏览器完成登录...'}),_0x2a399a&&a38_0x481c44(Text,{'color':_0x4d301c(0x1ec),'children':_0x4d301c(0x1f7)})]})]});}
@@ -1 +1 @@
1
- function a39_0x612d(_0x2d471e,_0x108325){const _0xb788e9=a39_0xb788();return a39_0x612d=function(_0x612d3f,_0xcdb202){_0x612d3f=_0x612d3f-0x11a;let _0x8f7f30=_0xb788e9[_0x612d3f];return _0x8f7f30;},a39_0x612d(_0x2d471e,_0x108325);}(function(_0x3e50d1,_0x5e5987){const _0x41d409=a39_0x612d,_0x941475=_0x3e50d1();while(!![]){try{const _0xfd4604=-parseInt(_0x41d409(0x122))/0x1*(-parseInt(_0x41d409(0x11b))/0x2)+-parseInt(_0x41d409(0x11c))/0x3*(-parseInt(_0x41d409(0x11a))/0x4)+parseInt(_0x41d409(0x125))/0x5+parseInt(_0x41d409(0x120))/0x6*(parseInt(_0x41d409(0x11e))/0x7)+-parseInt(_0x41d409(0x124))/0x8*(parseInt(_0x41d409(0x126))/0x9)+parseInt(_0x41d409(0x123))/0xa*(parseInt(_0x41d409(0x128))/0xb)+parseInt(_0x41d409(0x127))/0xc*(-parseInt(_0x41d409(0x121))/0xd);if(_0xfd4604===_0x5e5987)break;else _0x941475['push'](_0x941475['shift']());}catch(_0x49b254){_0x941475['push'](_0x941475['shift']());}}}(a39_0xb788,0xd50de));function a39_0xb788(){const _0x27d3b6=['3765723nNsCkL','toFixed','182rqUqil','now','355896gJijpv','13NbuueX','9pBUSPN','60910qGPoCX','16LWJttv','5397350QVikUS','2418201UlwMMJ','43478004aPEXkB','1562waqMPy','4FcgOMc','64748XlszBt'];a39_0xb788=function(){return _0x27d3b6;};return a39_0xb788();}export function formatElapsed(_0x15e41f){const _0x528ff9=a39_0x612d,_0x5dae64=Date[_0x528ff9(0x11f)]()-_0x15e41f;if(_0x5dae64<0x3e8)return _0x5dae64+'ms';const _0x48faef=(_0x5dae64/0x3e8)[_0x528ff9(0x11d)](0x2),_0x3303db=_0x48faef['replace'](/\.?0+$/u,'');return _0x3303db+'s';}
1
+ function a39_0x1604(_0x492898,_0x1d4c8e){const _0x245b76=a39_0x245b();return a39_0x1604=function(_0x1604a0,_0x348fce){_0x1604a0=_0x1604a0-0x1b1;let _0x4a1328=_0x245b76[_0x1604a0];return _0x4a1328;},a39_0x1604(_0x492898,_0x1d4c8e);}(function(_0x1b0276,_0x452e51){const _0x12de68=a39_0x1604,_0x248c9b=_0x1b0276();while(!![]){try{const _0x45f53b=parseInt(_0x12de68(0x1b3))/0x1+parseInt(_0x12de68(0x1b9))/0x2*(-parseInt(_0x12de68(0x1b1))/0x3)+-parseInt(_0x12de68(0x1b6))/0x4*(-parseInt(_0x12de68(0x1b7))/0x5)+-parseInt(_0x12de68(0x1b2))/0x6+-parseInt(_0x12de68(0x1bc))/0x7+parseInt(_0x12de68(0x1bb))/0x8*(parseInt(_0x12de68(0x1b4))/0x9)+parseInt(_0x12de68(0x1ba))/0xa;if(_0x45f53b===_0x452e51)break;else _0x248c9b['push'](_0x248c9b['shift']());}catch(_0x2c7f76){_0x248c9b['push'](_0x248c9b['shift']());}}}(a39_0x245b,0x2cfb5));function a39_0x245b(){const _0x8c28e0=['231026lEHHEF','9uVVail','replace','817348uFJlSw','5fuvXYH','toFixed','30VNgTOt','5411870FxtcjJ','389152rxiGtC','1499274nyGhYu','63219OlaUiw','1864032IuhdfS'];a39_0x245b=function(){return _0x8c28e0;};return a39_0x245b();}export function formatElapsed(_0x280780){const _0x1f319e=a39_0x1604,_0xb75bee=Date['now']()-_0x280780;if(_0xb75bee<0x3e8)return _0xb75bee+'ms';const _0xb393bd=(_0xb75bee/0x3e8)[_0x1f319e(0x1b8)](0x2),_0x657b6e=_0xb393bd[_0x1f319e(0x1b5)](/\.?0+$/u,'');return _0x657b6e+'s';}
@@ -1 +1 @@
1
- (function(_0x3917bb,_0x4671bf){const _0x49684c=a40_0x54c1,_0x321e14=_0x3917bb();while(!![]){try{const _0x2833aa=parseInt(_0x49684c(0x103))/0x1+-parseInt(_0x49684c(0x11f))/0x2+-parseInt(_0x49684c(0x12d))/0x3+parseInt(_0x49684c(0x106))/0x4*(-parseInt(_0x49684c(0x124))/0x5)+parseInt(_0x49684c(0xe9))/0x6*(-parseInt(_0x49684c(0x135))/0x7)+-parseInt(_0x49684c(0x107))/0x8+parseInt(_0x49684c(0x12b))/0x9;if(_0x2833aa===_0x4671bf)break;else _0x321e14['push'](_0x321e14['shift']());}catch(_0x4aefae){_0x321e14['push'](_0x321e14['shift']());}}}(a40_0x368b,0x60f9b));import{jsx as a40_0x55bcbb,Fragment as a40_0x297e11,jsxs as a40_0x4ce7ca}from'react/jsx-runtime';import a40_0x42ac69 from'node:path';import a40_0x106d13 from'node:fs';import{fileURLToPath}from'node:url';import{Box,Text}from'ink';import{useEffect,useState}from'react';function a40_0x54c1(_0x208028,_0x55ed0a){const _0x368b34=a40_0x368b();return a40_0x54c1=function(_0x54c1a0,_0x402ceb){_0x54c1a0=_0x54c1a0-0xd7;let _0x3cca19=_0x368b34[_0x54c1a0];return _0x3cca19;},a40_0x54c1(_0x208028,_0x55ed0a);}import{EnhancedGuidedCreate}from'./enhanced-guided-create.js';function a40_0x368b(){const _0x1885d7=['1109536AbkpKm','\x20配置应用AppCode:\x20','utf8','更新\x20package.json\x20name\x20和\x20description\x20字段','*\x20正在拉取\x20API\x20配置...','815hHOjBA','error','stringify','W_OK','API\x20配置拉取异常:\x20','清理项目目录失败:\x20','../..','25943994qbgRqH','column','664236vJasSJ','projectCode','×\x20项目名过长,最多支持\x20100\x20个字符','\x20√\x20','🎉\x20项目创建成功!','setLogPath','1.\x20','version','321741ZFGPzH','×\x20无法在当前目录创建项目,请检查目录权限','📁\x20项目名称:\x20','\x20|\x20应用AppCode:\x20','warn','📦\x20API配置:\x20','success','🚀\x20接下来可以:','\x20创建配置文件','cyan','*\x20正在更新\x20package.json\x20的\x20name\x20和\x20description\x20字段','cwd','resolve','trim','已自动拉取\x20✓','API\x20配置拉取成功:\x20','3.\x20','join','API\x20配置拉取失败:\x20','项目创建失败:\x20','message','description','需手动拉取','gray','accessSync','66mmxqsL','create','package.json','parse','×\x20项目目录\x20','2.\x20',',\x20description=','√\x20配置文件已创建,可稍后使用\x20\x27lovrabet\x20config\x20set\x20appcode\x20<app-code>\x27\x20配置','repeat','green','*\x20正在为项目\x20','项目创建完成:\x20','lovrabet\x20api\x20pull\x20--appcode\x20[app-code]','√\x20配置文件已创建,应用AppCode:\x20','√\x20API\x20配置拉取完成','dirname','env','\x20&&\x20lovrabet\x20start','string','!\x20API\x20配置拉取异常,项目已创建,可稍后手动执行:\x20lovrabet\x20api\x20pull','配置应用AppCode:\x20','name','test','log','writeFileSync','.lovrabetrc','102804geObqK','info','项目名称:\x20','13444yMltML','6069144ZmOOkV','appCode','toLocaleString','existsSync','projectName','online','*\x20配置文件路径:\x20','\x20Generated\x20by\x20lovrabet\x20cli\x20','url','readFileSync','white','开始创建项目:\x20','doTask','rmSync','length','lovrabet\x20api\x20pull','配置AppCode:\x20','配置应用AppCode失败:\x20','🔗\x20应用AppCode:\x20','pullApi','1.0.0','*\x20清理失败的项目目录:\x20','×\x20项目创建失败:\x20','拉取API配置:\x20'];a40_0x368b=function(){return _0x1885d7;};return a40_0x368b();}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(_0x2857b3){const _0x589360=a40_0x54c1,[_0x22a3fa,_0x1b40c9]=useState(![]),[_0x563a9e,_0x3eba3c]=useState(![]),[_0x2b8943,_0x1ed3ab]=useState(null),_0x27479b=useCopyProjectTemplate(),_0x234172=useInstallDependencies(),_0x5c9950=useFormatCode(),_0x14555a=async _0x8c96f4=>{const _0x17685b=a40_0x54c1;if(!_0x8c96f4[_0x17685b(0x10b)]||_0x8c96f4['projectName'][_0x17685b(0xdd)]()===''){console['error']('×\x20项目名不能为空');return;}const _0x12ae7d=/[<>:"|?*\x00-\x1f\x7f]/;if(_0x12ae7d[_0x17685b(0xff)](_0x8c96f4['projectName'])){console[_0x17685b(0x125)]('×\x20项目名包含非法字符,不允许使用:\x20<\x20>\x20:\x20\x22\x20|\x20?\x20*\x20及控制字符');return;}if(_0x8c96f4[_0x17685b(0x10b)][_0x17685b(0x115)]>0x64){console[_0x17685b(0x125)](_0x17685b(0x12f));return;}const _0x25d85b=a40_0x42ac69[_0x17685b(0xdc)](process['cwd'](),_0x8c96f4['projectName']);if(a40_0x106d13['existsSync'](_0x25d85b)){console[_0x17685b(0x125)](_0x17685b(0xed)+_0x8c96f4[_0x17685b(0x10b)]+'\x20已存在,请使用其他项目名');return;}try{const _0x222ede=a40_0x42ac69[_0x17685b(0xf8)](_0x25d85b);a40_0x106d13[_0x17685b(0xe8)](_0x222ede,a40_0x106d13['constants'][_0x17685b(0x127)]);}catch(_0x5db849){console[_0x17685b(0x125)](_0x17685b(0x136));return;}_0x1ed3ab(_0x8c96f4),_0x1b40c9(!![]),logger[_0x17685b(0x132)](_0x25d85b),logger['info'](_0x17685b(0xea),_0x17685b(0x112)+_0x8c96f4[_0x17685b(0x10b)],{'projectDir':_0x25d85b,'appCode':_0x8c96f4[_0x17685b(0x108)]});try{await _0x27479b[_0x17685b(0x113)](_0x8c96f4['projectName']),await _0x9c8841(_0x8c96f4[_0x17685b(0x10b)]),await _0x234172[_0x17685b(0x113)](_0x8c96f4[_0x17685b(0x10b)]),await _0x5c9950[_0x17685b(0x113)](_0x8c96f4[_0x17685b(0x10b)]),await _0x5ba009(_0x8c96f4[_0x17685b(0x10b)],_0x8c96f4[_0x17685b(0x108)]||'',_0x8c96f4['env']);if(_0x8c96f4[_0x17685b(0x11a)]&&_0x8c96f4[_0x17685b(0x108)]){console[_0x17685b(0x100)](_0x17685b(0x123));try{const _0x1da9c0=await pullApiSilent(_0x8c96f4[_0x17685b(0x108)],undefined,_0x25d85b,_0x8c96f4[_0x17685b(0xf9)]);_0x1da9c0?(console[_0x17685b(0x100)](_0x17685b(0xf7)),logger['info'](_0x17685b(0xea),_0x17685b(0xdf)+_0x8c96f4[_0x17685b(0x108)],{'projectDir':_0x25d85b,'appCode':_0x8c96f4[_0x17685b(0x108)],'env':_0x8c96f4[_0x17685b(0xf9)]})):(console[_0x17685b(0x100)]('!\x20API\x20配置拉取失败,可稍后手动执行:\x20lovrabet\x20api\x20pull'),logger[_0x17685b(0x139)](_0x17685b(0xea),_0x17685b(0xe2)+_0x8c96f4['appCode'],{'projectDir':_0x25d85b,'appCode':_0x8c96f4[_0x17685b(0x108)],'env':_0x8c96f4[_0x17685b(0xf9)]}));}catch(_0x572a6e){console['log'](_0x17685b(0xfc)),logger[_0x17685b(0x139)](_0x17685b(0xea),_0x17685b(0x128)+_0x8c96f4['appCode'],{'projectDir':_0x25d85b,'appCode':_0x8c96f4[_0x17685b(0x108)],'env':_0x8c96f4[_0x17685b(0xf9)],'error':_0x572a6e instanceof Error?_0x572a6e[_0x17685b(0xe4)]:String(_0x572a6e)});}}logger[_0x17685b(0x13b)](_0x17685b(0xea),_0x17685b(0xf4)+_0x8c96f4['projectName']),_0x3eba3c(!![]),_0x1b40c9(![]);}catch(_0xbcf793){logger[_0x17685b(0x125)](_0x17685b(0xea),_0x17685b(0xe3)+_0x8c96f4[_0x17685b(0x10b)],{'error':_0xbcf793 instanceof Error?_0xbcf793['message']:String(_0xbcf793)});try{a40_0x106d13[_0x17685b(0x10a)](_0x25d85b)&&(console[_0x17685b(0x100)](_0x17685b(0x11c)+_0x25d85b),a40_0x106d13[_0x17685b(0x114)](_0x25d85b,{'recursive':!![],'force':!![]}));}catch(_0x50686b){logger[_0x17685b(0x139)](_0x17685b(0xea),_0x17685b(0x129)+_0x25d85b,{'error':_0x50686b instanceof Error?_0x50686b[_0x17685b(0xe4)]:String(_0x50686b)});}_0x1b40c9(![]),console['error'](_0x17685b(0x11d)+(_0xbcf793 instanceof Error?_0xbcf793[_0x17685b(0xe4)]:String(_0xbcf793)));}},_0x666286=async _0x4a880c=>{const _0x4a23ed=a40_0x54c1;await _0x14555a({'projectName':_0x4a880c,'env':_0x2857b3[_0x4a23ed(0xf9)]});},_0x9c8841=async _0x42a005=>{const _0x47aaf7=a40_0x54c1,_0x2394a4=a40_0x42ac69[_0x47aaf7(0xdc)](process[_0x47aaf7(0xdb)](),_0x42a005),_0x23dd27=a40_0x42ac69['join'](_0x2394a4,'package.json');try{console[_0x47aaf7(0x100)](_0x47aaf7(0xda));const _0x3e2396=fileURLToPath(import.meta['url']),_0x1d6fc8=a40_0x42ac69[_0x47aaf7(0xdc)](a40_0x42ac69[_0x47aaf7(0xf8)](_0x3e2396),'../..'),_0xd48775=a40_0x42ac69[_0x47aaf7(0xe1)](_0x1d6fc8,_0x47aaf7(0xeb));let _0x301722=_0x47aaf7(0x11b);try{const _0x58c773=JSON['parse'](a40_0x106d13['readFileSync'](_0xd48775,'utf8'));_0x301722=_0x58c773[_0x47aaf7(0x134)]||_0x47aaf7(0x11b);}catch(_0x221614){}const _0x2067b5=a40_0x106d13[_0x47aaf7(0x110)](_0x23dd27,_0x47aaf7(0x121)),_0x1b2caf=JSON[_0x47aaf7(0xec)](_0x2067b5);_0x1b2caf[_0x47aaf7(0xfe)]=_0x42a005,_0x1b2caf['description']=_0x42a005+_0x47aaf7(0x10e)+_0x301722,a40_0x106d13[_0x47aaf7(0x101)](_0x23dd27,JSON[_0x47aaf7(0x126)](_0x1b2caf,null,0x2)+'\x0a',_0x47aaf7(0x121)),console[_0x47aaf7(0x100)]('√\x20package.json\x20已更新:\x20name='+_0x42a005+_0x47aaf7(0xef)+_0x1b2caf['description']),logger[_0x47aaf7(0x104)](_0x47aaf7(0xea),_0x47aaf7(0x122),{'projectName':_0x42a005,'description':_0x1b2caf[_0x47aaf7(0xe5)],'cliVersion':_0x301722,'packageJsonPath':_0x47aaf7(0xeb)});}catch(_0x15224c){logger['error'](_0x47aaf7(0xea),'更新\x20package.json\x20失败:\x20'+_0x42a005,{'projectName':_0x42a005,'error':_0x15224c instanceof Error?_0x15224c[_0x47aaf7(0xe4)]:String(_0x15224c)});throw _0x15224c;}},_0x5ba009=async(_0x4ca4a7,_0x218270,_0x195d72)=>{const _0x2078ab=a40_0x54c1,_0x2e8e5a=a40_0x42ac69['resolve'](process[_0x2078ab(0xdb)](),_0x4ca4a7),_0x10b1ca=a40_0x42ac69[_0x2078ab(0xe1)](_0x2e8e5a,_0x2078ab(0x102));try{_0x218270?console[_0x2078ab(0x100)](_0x2078ab(0xf3)+_0x4ca4a7+_0x2078ab(0x120)+_0x218270):console['log'](_0x2078ab(0xf3)+_0x4ca4a7+_0x2078ab(0xd8));console[_0x2078ab(0x100)](_0x2078ab(0x10d)+_0x10b1ca);const _0x387aea=fileURLToPath(import.meta[_0x2078ab(0x10f)]),_0x4d20cc=a40_0x42ac69['resolve'](a40_0x42ac69['dirname'](_0x387aea),_0x2078ab(0x12a)),_0xcb6232=a40_0x42ac69[_0x2078ab(0xe1)](_0x4d20cc,'package.json');let _0x419780=_0x2078ab(0x11b);try{const _0x2fb2f9=JSON[_0x2078ab(0xec)](a40_0x106d13['readFileSync'](_0xcb6232,_0x2078ab(0x121)));_0x419780=_0x2fb2f9[_0x2078ab(0x134)]||_0x2078ab(0x11b);}catch(_0x320286){}const _0x9bfcd2=readConfig(),_0x779c84=typeof _0x9bfcd2[_0x2078ab(0xf9)]===_0x2078ab(0xfb)?_0x9bfcd2[_0x2078ab(0xf9)]:undefined,{app:_0x1c62a5,appcode:_0x16a719,..._0x64462}=_0x9bfcd2,_0x44e412={..._0x64462,'appcode':_0x218270||'','env':_0x195d72||_0x779c84||_0x2078ab(0x10c),'createdAt':new Date()[_0x2078ab(0x109)](),'version':_0x419780};a40_0x106d13['writeFileSync'](_0x10b1ca,JSON[_0x2078ab(0x126)](_0x44e412,null,0x2),_0x2078ab(0x121)),_0x218270?console[_0x2078ab(0x100)](_0x2078ab(0xf6)+_0x218270):console[_0x2078ab(0x100)](_0x2078ab(0xf0)),logger[_0x2078ab(0x104)]('create',_0x2078ab(0xfd)+_0x218270,{'projectName':_0x4ca4a7,'configFile':_0x2078ab(0x102)});}catch(_0x8e82d6){logger[_0x2078ab(0x125)]('create',_0x2078ab(0x118)+_0x218270,{'projectName':_0x4ca4a7,'error':_0x8e82d6 instanceof Error?_0x8e82d6['message']:String(_0x8e82d6)});}};useEffect(()=>{const _0x36c746=a40_0x54c1;_0x2857b3[_0x36c746(0x12e)]&&_0x666286(_0x2857b3[_0x36c746(0x12e)]);},[_0x2857b3[_0x589360(0x12e)]]);if(!_0x22a3fa&&!_0x563a9e&&!_0x2857b3[_0x589360(0x12e)])return a40_0x55bcbb(EnhancedGuidedCreate,{'onCreate':_0x14555a,'env':_0x2857b3['env']});if(_0x22a3fa)return a40_0x4ce7ca(a40_0x297e11,{'children':[a40_0x4ce7ca(Box,{'marginTop':0x1,'children':[a40_0x55bcbb(Box,{'width':'1'}),a40_0x55bcbb(Text,{'color':'green','children':_0x589360(0x130)}),a40_0x55bcbb(Text,{'children':_0x589360(0x105)}),a40_0x55bcbb(Text,{'color':'green','children':_0x2b8943?.[_0x589360(0x10b)]}),_0x2b8943?.[_0x589360(0x108)]&&a40_0x4ce7ca(a40_0x297e11,{'children':[a40_0x55bcbb(Text,{'children':_0x589360(0x138)}),a40_0x55bcbb(Text,{'color':_0x589360(0xd9),'children':_0x2b8943[_0x589360(0x108)]})]})]}),a40_0x55bcbb(TaskRunning,{..._0x27479b}),a40_0x55bcbb(TaskRunning,{..._0x234172}),a40_0x55bcbb(TaskRunning,{..._0x5c9950})]});if(_0x563a9e)return a40_0x4ce7ca(a40_0x297e11,{'children':[a40_0x4ce7ca(Box,{'marginTop':0x1,'children':[a40_0x55bcbb(Box,{'width':'1'}),a40_0x55bcbb(Text,{'color':_0x589360(0xf2),'children':_0x589360(0x130)}),a40_0x55bcbb(Text,{'children':_0x589360(0x105)}),a40_0x55bcbb(Text,{'color':_0x589360(0xf2),'children':_0x2b8943?.[_0x589360(0x10b)]}),_0x2b8943?.[_0x589360(0x108)]&&a40_0x4ce7ca(a40_0x297e11,{'children':[a40_0x55bcbb(Text,{'children':_0x589360(0x138)}),a40_0x55bcbb(Text,{'color':_0x589360(0xd9),'children':_0x2b8943[_0x589360(0x108)]})]})]}),a40_0x55bcbb(TaskFinished,{..._0x27479b}),a40_0x55bcbb(TaskFinished,{..._0x234172}),a40_0x55bcbb(TaskFinished,{..._0x5c9950}),a40_0x55bcbb(Box,{'marginTop':0x1,'marginBottom':0x1,'children':a40_0x55bcbb(Text,{'color':_0x589360(0xf2),'children':'─'[_0x589360(0xf1)](0x3c)})}),a40_0x55bcbb(Box,{'children':a40_0x55bcbb(Text,{'color':_0x589360(0xf2),'bold':!![],'children':_0x589360(0x131)})}),a40_0x4ce7ca(Box,{'marginTop':0x1,'flexDirection':'column','children':[a40_0x4ce7ca(Box,{'children':[a40_0x55bcbb(Text,{'color':'cyan','children':_0x589360(0x137)}),a40_0x55bcbb(Text,{'color':_0x589360(0x111),'bold':!![],'children':_0x2b8943?.[_0x589360(0x10b)]})]}),_0x2b8943?.[_0x589360(0x108)]&&a40_0x4ce7ca(Box,{'children':[a40_0x55bcbb(Text,{'color':'cyan','children':_0x589360(0x119)}),a40_0x55bcbb(Text,{'color':'white','bold':!![],'children':_0x2b8943[_0x589360(0x108)]})]}),a40_0x4ce7ca(Box,{'children':[a40_0x55bcbb(Text,{'color':'cyan','children':_0x589360(0x13a)}),_0x2b8943?.[_0x589360(0x11a)]?a40_0x55bcbb(Text,{'color':_0x589360(0xf2),'bold':!![],'children':_0x589360(0xde)}):_0x2b8943?.[_0x589360(0x108)]?a40_0x55bcbb(Text,{'color':'yellow','bold':!![],'children':_0x589360(0xe6)}):a40_0x55bcbb(Text,{'color':'gray','bold':!![],'children':'未配置'})]})]}),a40_0x55bcbb(Box,{'marginTop':0x1,'marginBottom':0x1,'children':a40_0x55bcbb(Text,{'color':'cyan','bold':!![],'children':_0x589360(0xd7)})}),a40_0x4ce7ca(Box,{'marginLeft':0x2,'flexDirection':_0x589360(0x12c),'children':[a40_0x4ce7ca(Box,{'children':[a40_0x55bcbb(Text,{'color':_0x589360(0xf2),'children':_0x589360(0x133)}),a40_0x55bcbb(Text,{'color':_0x589360(0x111),'children':'启动项目:\x20'}),a40_0x55bcbb(Text,{'color':'cyan','bold':!![],'children':'cd\x20'+_0x2b8943?.[_0x589360(0x10b)]+_0x589360(0xfa)})]}),_0x2b8943?.[_0x589360(0x108)]&&!_0x2b8943?.[_0x589360(0x11a)]&&a40_0x4ce7ca(Box,{'children':[a40_0x55bcbb(Text,{'color':'yellow','children':_0x589360(0xee)}),a40_0x55bcbb(Text,{'color':'white','children':_0x589360(0x11e)}),a40_0x55bcbb(Text,{'color':_0x589360(0xd9),'bold':!![],'children':_0x589360(0x116)})]}),!_0x2b8943?.[_0x589360(0x108)]&&a40_0x4ce7ca(a40_0x297e11,{'children':[a40_0x4ce7ca(Box,{'children':[a40_0x55bcbb(Text,{'color':_0x589360(0xe7),'children':'2.\x20'}),a40_0x55bcbb(Text,{'color':_0x589360(0x111),'children':_0x589360(0x117)}),a40_0x55bcbb(Text,{'color':_0x589360(0xd9),'bold':!![],'children':'lovrabet\x20config\x20set\x20appcode\x20[app-code]'})]}),a40_0x4ce7ca(Box,{'children':[a40_0x55bcbb(Text,{'color':'gray','children':_0x589360(0xe0)}),a40_0x55bcbb(Text,{'color':_0x589360(0x111),'children':'拉取API配置:\x20'}),a40_0x55bcbb(Text,{'color':'cyan','bold':!![],'children':_0x589360(0xf5)})]})]})]}),a40_0x55bcbb(Box,{'marginTop':0x1,'children':a40_0x55bcbb(Text,{'color':_0x589360(0xf2),'children':'─'['repeat'](0x3c)})})]});return null;}
1
+ (function(_0xc2f7f4,_0x1098c1){const _0x4c7685=a40_0x54a3,_0x4c4dff=_0xc2f7f4();while(!![]){try{const _0x37ee55=parseInt(_0x4c7685(0x137))/0x1+-parseInt(_0x4c7685(0x14e))/0x2*(parseInt(_0x4c7685(0x181))/0x3)+-parseInt(_0x4c7685(0x184))/0x4*(-parseInt(_0x4c7685(0x140))/0x5)+-parseInt(_0x4c7685(0x188))/0x6*(-parseInt(_0x4c7685(0x13e))/0x7)+parseInt(_0x4c7685(0x157))/0x8*(parseInt(_0x4c7685(0x191))/0x9)+-parseInt(_0x4c7685(0x189))/0xa*(-parseInt(_0x4c7685(0x148))/0xb)+-parseInt(_0x4c7685(0x158))/0xc;if(_0x37ee55===_0x1098c1)break;else _0x4c4dff['push'](_0x4c4dff['shift']());}catch(_0x3c86c8){_0x4c4dff['push'](_0x4c4dff['shift']());}}}(a40_0x524b,0xad8b8));import{jsx as a40_0x145927,Fragment as a40_0x5d06ee,jsxs as a40_0x4ff03b}from'react/jsx-runtime';import a40_0x171467 from'node:path';import a40_0x4ee4e7 from'node:fs';import{fileURLToPath}from'node:url';import{Box,Text}from'ink';function a40_0x54a3(_0xf08abf,_0x2a4bbf){const _0x524b36=a40_0x524b();return a40_0x54a3=function(_0x54a38f,_0x20d13b){_0x54a38f=_0x54a38f-0x131;let _0x28df01=_0x524b36[_0x54a38f];return _0x28df01;},a40_0x54a3(_0xf08abf,_0x2a4bbf);}function a40_0x524b(){const _0x5b4a8e=['1.0.0','env','lovrabet\x20api\x20pull\x20--appcode\x20[app-code]','gray','\x20Generated\x20by\x20lovrabet\x20cli\x20','1247067AfmgQj','√\x20package.json\x20已更新:\x20name=','resolve','message','*\x20正在拉取\x20API\x20配置...','success','warn','3850364KHlpqY','doTask','1015tEdZPq','🎉\x20项目创建成功!','rmSync','package.json','projectName','test','accessSync','API\x20配置拉取失败:\x20','423335Fitcgs','length','×\x20项目名包含非法字符,不允许使用:\x20<\x20>\x20:\x20\x22\x20|\x20?\x20*\x20及控制字符','项目创建失败:\x20','url','已自动拉取\x20✓','4XNKTLL','../..','🚀\x20接下来可以:','setLogPath','log','更新\x20package.json\x20失败:\x20','readFileSync','parse','拉取API配置:\x20','163336dhGhux','30835008SFAjPL','√\x20配置文件已创建,可稍后使用\x20\x27lovrabet\x20config\x20set\x20appcode\x20<app-code>\x27\x20配置','description','toLocaleString','W_OK','*\x20清理失败的项目目录:\x20','writeFileSync','配置应用AppCode:\x20','启动项目:\x20','white','dirname','*\x20正在为项目\x20','\x20&&\x20lovrabet\x20start','green','string','version','1.\x20','\x20|\x20应用AppCode:\x20','name','API\x20配置拉取异常:\x20','cyan','online','error','constants','未配置','yellow','appCode','info','📁\x20项目名称:\x20','*\x20正在更新\x20package.json\x20的\x20name\x20和\x20description\x20字段','API\x20配置拉取成功:\x20','.lovrabetrc','projectCode','×\x20项目名过长,最多支持\x20100\x20个字符','×\x20项目目录\x20','trim','清理项目目录失败:\x20','更新\x20package.json\x20name\x20和\x20description\x20字段','×\x20无法在当前目录创建项目,请检查目录权限','项目创建完成:\x20','utf8','1078689FgXrXZ','!\x20API\x20配置拉取异常,项目已创建,可稍后手动执行:\x20lovrabet\x20api\x20pull','2.\x20','26044LApcDx','cwd','repeat','×\x20项目创建失败:\x20','12MiFyZI','70KOnArb','\x20√\x20','\x20已存在,请使用其他项目名','\x20创建配置文件','create','🔗\x20应用AppCode:\x20','需手动拉取','项目名称:\x20','27kxURRE','pullApi','column','existsSync','配置应用AppCode失败:\x20','join'];a40_0x524b=function(){return _0x5b4a8e;};return a40_0x524b();}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(_0x1d97b2){const _0xfbac6c=a40_0x54a3,[_0x565baf,_0x3887b7]=useState(![]),[_0x4a0469,_0x38b77f]=useState(![]),[_0x4056c1,_0x3b6138]=useState(null),_0xaab65c=useCopyProjectTemplate(),_0x5e6f35=useInstallDependencies(),_0x2a16b9=useFormatCode(),_0x441f78=async _0x2bd15f=>{const _0x5d2cb7=a40_0x54a3;if(!_0x2bd15f['projectName']||_0x2bd15f[_0x5d2cb7(0x144)][_0x5d2cb7(0x17b)]()===''){console['error']('×\x20项目名不能为空');return;}const _0x28278e=/[<>:"|?*\x00-\x1f\x7f]/;if(_0x28278e[_0x5d2cb7(0x145)](_0x2bd15f[_0x5d2cb7(0x144)])){console[_0x5d2cb7(0x16e)](_0x5d2cb7(0x14a));return;}if(_0x2bd15f[_0x5d2cb7(0x144)][_0x5d2cb7(0x149)]>0x64){console[_0x5d2cb7(0x16e)](_0x5d2cb7(0x179));return;}const _0x4eb246=a40_0x171467['resolve'](process[_0x5d2cb7(0x185)](),_0x2bd15f[_0x5d2cb7(0x144)]);if(a40_0x4ee4e7[_0x5d2cb7(0x194)](_0x4eb246)){console[_0x5d2cb7(0x16e)](_0x5d2cb7(0x17a)+_0x2bd15f[_0x5d2cb7(0x144)]+_0x5d2cb7(0x18b));return;}try{const _0x133453=a40_0x171467['dirname'](_0x4eb246);a40_0x4ee4e7[_0x5d2cb7(0x146)](_0x133453,a40_0x4ee4e7[_0x5d2cb7(0x16f)][_0x5d2cb7(0x15c)]);}catch(_0x21efd8){console['error'](_0x5d2cb7(0x17e));return;}_0x3b6138(_0x2bd15f),_0x3887b7(!![]),logger[_0x5d2cb7(0x151)](_0x4eb246),logger[_0x5d2cb7(0x173)]('create','开始创建项目:\x20'+_0x2bd15f[_0x5d2cb7(0x144)],{'projectDir':_0x4eb246,'appCode':_0x2bd15f[_0x5d2cb7(0x172)]});try{await _0xaab65c[_0x5d2cb7(0x13f)](_0x2bd15f[_0x5d2cb7(0x144)]),await _0x5e7111(_0x2bd15f[_0x5d2cb7(0x144)]),await _0x5e6f35['doTask'](_0x2bd15f[_0x5d2cb7(0x144)]),await _0x2a16b9[_0x5d2cb7(0x13f)](_0x2bd15f[_0x5d2cb7(0x144)]),await _0x48528d(_0x2bd15f['projectName'],_0x2bd15f[_0x5d2cb7(0x172)]||'',_0x2bd15f['env']);if(_0x2bd15f[_0x5d2cb7(0x192)]&&_0x2bd15f[_0x5d2cb7(0x172)]){console['log'](_0x5d2cb7(0x13b));try{const _0x247516=await pullApiSilent(_0x2bd15f[_0x5d2cb7(0x172)],undefined,_0x4eb246,_0x2bd15f[_0x5d2cb7(0x133)]);_0x247516?(console[_0x5d2cb7(0x152)]('√\x20API\x20配置拉取完成'),logger[_0x5d2cb7(0x173)](_0x5d2cb7(0x18d),_0x5d2cb7(0x176)+_0x2bd15f[_0x5d2cb7(0x172)],{'projectDir':_0x4eb246,'appCode':_0x2bd15f['appCode'],'env':_0x2bd15f[_0x5d2cb7(0x133)]})):(console[_0x5d2cb7(0x152)]('!\x20API\x20配置拉取失败,可稍后手动执行:\x20lovrabet\x20api\x20pull'),logger[_0x5d2cb7(0x13d)](_0x5d2cb7(0x18d),_0x5d2cb7(0x147)+_0x2bd15f['appCode'],{'projectDir':_0x4eb246,'appCode':_0x2bd15f[_0x5d2cb7(0x172)],'env':_0x2bd15f[_0x5d2cb7(0x133)]}));}catch(_0x254bc0){console[_0x5d2cb7(0x152)](_0x5d2cb7(0x182)),logger[_0x5d2cb7(0x13d)](_0x5d2cb7(0x18d),_0x5d2cb7(0x16b)+_0x2bd15f['appCode'],{'projectDir':_0x4eb246,'appCode':_0x2bd15f[_0x5d2cb7(0x172)],'env':_0x2bd15f['env'],'error':_0x254bc0 instanceof Error?_0x254bc0[_0x5d2cb7(0x13a)]:String(_0x254bc0)});}}logger[_0x5d2cb7(0x13c)]('create',_0x5d2cb7(0x17f)+_0x2bd15f[_0x5d2cb7(0x144)]),_0x38b77f(!![]),_0x3887b7(![]);}catch(_0x1e0d06){logger[_0x5d2cb7(0x16e)](_0x5d2cb7(0x18d),_0x5d2cb7(0x14b)+_0x2bd15f[_0x5d2cb7(0x144)],{'error':_0x1e0d06 instanceof Error?_0x1e0d06[_0x5d2cb7(0x13a)]:String(_0x1e0d06)});try{a40_0x4ee4e7['existsSync'](_0x4eb246)&&(console['log'](_0x5d2cb7(0x15d)+_0x4eb246),a40_0x4ee4e7[_0x5d2cb7(0x142)](_0x4eb246,{'recursive':!![],'force':!![]}));}catch(_0x40d09e){logger[_0x5d2cb7(0x13d)]('create',_0x5d2cb7(0x17c)+_0x4eb246,{'error':_0x40d09e instanceof Error?_0x40d09e[_0x5d2cb7(0x13a)]:String(_0x40d09e)});}_0x3887b7(![]),console[_0x5d2cb7(0x16e)](_0x5d2cb7(0x187)+(_0x1e0d06 instanceof Error?_0x1e0d06[_0x5d2cb7(0x13a)]:String(_0x1e0d06)));}},_0x4fea42=async _0x11b7e9=>{const _0x4c16e4=a40_0x54a3;await _0x441f78({'projectName':_0x11b7e9,'env':_0x1d97b2[_0x4c16e4(0x133)]});},_0x5e7111=async _0x288cd4=>{const _0x3c85a1=a40_0x54a3,_0x5d2981=a40_0x171467[_0x3c85a1(0x139)](process[_0x3c85a1(0x185)](),_0x288cd4),_0x3bd69a=a40_0x171467['join'](_0x5d2981,'package.json');try{console[_0x3c85a1(0x152)](_0x3c85a1(0x175));const _0x487f8c=fileURLToPath(import.meta['url']),_0x5a1714=a40_0x171467[_0x3c85a1(0x139)](a40_0x171467[_0x3c85a1(0x162)](_0x487f8c),_0x3c85a1(0x14f)),_0x20fece=a40_0x171467[_0x3c85a1(0x131)](_0x5a1714,'package.json');let _0x1ff976='1.0.0';try{const _0x1f90e5=JSON['parse'](a40_0x4ee4e7[_0x3c85a1(0x154)](_0x20fece,'utf8'));_0x1ff976=_0x1f90e5[_0x3c85a1(0x167)]||'1.0.0';}catch(_0xac2413){}const _0x4379c8=a40_0x4ee4e7[_0x3c85a1(0x154)](_0x3bd69a,'utf8'),_0x4a389c=JSON['parse'](_0x4379c8);_0x4a389c[_0x3c85a1(0x16a)]=_0x288cd4,_0x4a389c[_0x3c85a1(0x15a)]=_0x288cd4+_0x3c85a1(0x136)+_0x1ff976,a40_0x4ee4e7['writeFileSync'](_0x3bd69a,JSON['stringify'](_0x4a389c,null,0x2)+'\x0a',_0x3c85a1(0x180)),console[_0x3c85a1(0x152)](_0x3c85a1(0x138)+_0x288cd4+',\x20description='+_0x4a389c[_0x3c85a1(0x15a)]),logger[_0x3c85a1(0x173)](_0x3c85a1(0x18d),_0x3c85a1(0x17d),{'projectName':_0x288cd4,'description':_0x4a389c['description'],'cliVersion':_0x1ff976,'packageJsonPath':_0x3c85a1(0x143)});}catch(_0x4d9a41){logger[_0x3c85a1(0x16e)](_0x3c85a1(0x18d),_0x3c85a1(0x153)+_0x288cd4,{'projectName':_0x288cd4,'error':_0x4d9a41 instanceof Error?_0x4d9a41[_0x3c85a1(0x13a)]:String(_0x4d9a41)});throw _0x4d9a41;}},_0x48528d=async(_0x307bdf,_0x32ff54,_0x544014)=>{const _0x3ac47e=a40_0x54a3,_0x8b13fd=a40_0x171467[_0x3ac47e(0x139)](process['cwd'](),_0x307bdf),_0x190846=a40_0x171467[_0x3ac47e(0x131)](_0x8b13fd,_0x3ac47e(0x177));try{_0x32ff54?console[_0x3ac47e(0x152)](_0x3ac47e(0x163)+_0x307bdf+'\x20配置应用AppCode:\x20'+_0x32ff54):console['log'](_0x3ac47e(0x163)+_0x307bdf+_0x3ac47e(0x18c));console[_0x3ac47e(0x152)]('*\x20配置文件路径:\x20'+_0x190846);const _0x53021b=fileURLToPath(import.meta[_0x3ac47e(0x14c)]),_0x32c9fb=a40_0x171467['resolve'](a40_0x171467[_0x3ac47e(0x162)](_0x53021b),'../..'),_0x4fab5d=a40_0x171467[_0x3ac47e(0x131)](_0x32c9fb,'package.json');let _0x350135=_0x3ac47e(0x132);try{const _0x34db4b=JSON[_0x3ac47e(0x155)](a40_0x4ee4e7[_0x3ac47e(0x154)](_0x4fab5d,_0x3ac47e(0x180)));_0x350135=_0x34db4b[_0x3ac47e(0x167)]||_0x3ac47e(0x132);}catch(_0xebd454){}const _0x24d0cf=readConfig(),_0xef94f9=typeof _0x24d0cf[_0x3ac47e(0x133)]===_0x3ac47e(0x166)?_0x24d0cf['env']:undefined,{app:_0x2abe5f,appcode:_0x24219a,..._0x5d1f00}=_0x24d0cf,_0x6a0f37={..._0x5d1f00,'appcode':_0x32ff54||'','env':_0x544014||_0xef94f9||_0x3ac47e(0x16d),'createdAt':new Date()[_0x3ac47e(0x15b)](),'version':_0x350135};a40_0x4ee4e7[_0x3ac47e(0x15e)](_0x190846,JSON['stringify'](_0x6a0f37,null,0x2),_0x3ac47e(0x180)),_0x32ff54?console['log']('√\x20配置文件已创建,应用AppCode:\x20'+_0x32ff54):console[_0x3ac47e(0x152)](_0x3ac47e(0x159)),logger[_0x3ac47e(0x173)](_0x3ac47e(0x18d),_0x3ac47e(0x15f)+_0x32ff54,{'projectName':_0x307bdf,'configFile':_0x3ac47e(0x177)});}catch(_0x4a56ba){logger[_0x3ac47e(0x16e)]('create',_0x3ac47e(0x195)+_0x32ff54,{'projectName':_0x307bdf,'error':_0x4a56ba instanceof Error?_0x4a56ba['message']:String(_0x4a56ba)});}};useEffect(()=>{const _0x189c84=a40_0x54a3;_0x1d97b2[_0x189c84(0x178)]&&_0x4fea42(_0x1d97b2[_0x189c84(0x178)]);},[_0x1d97b2[_0xfbac6c(0x178)]]);if(!_0x565baf&&!_0x4a0469&&!_0x1d97b2[_0xfbac6c(0x178)])return a40_0x145927(EnhancedGuidedCreate,{'onCreate':_0x441f78,'env':_0x1d97b2[_0xfbac6c(0x133)]});if(_0x565baf)return a40_0x4ff03b(a40_0x5d06ee,{'children':[a40_0x4ff03b(Box,{'marginTop':0x1,'children':[a40_0x145927(Box,{'width':'1'}),a40_0x145927(Text,{'color':'green','children':_0xfbac6c(0x18a)}),a40_0x145927(Text,{'children':'项目名称:\x20'}),a40_0x145927(Text,{'color':_0xfbac6c(0x165),'children':_0x4056c1?.[_0xfbac6c(0x144)]}),_0x4056c1?.[_0xfbac6c(0x172)]&&a40_0x4ff03b(a40_0x5d06ee,{'children':[a40_0x145927(Text,{'children':_0xfbac6c(0x169)}),a40_0x145927(Text,{'color':'cyan','children':_0x4056c1[_0xfbac6c(0x172)]})]})]}),a40_0x145927(TaskRunning,{..._0xaab65c}),a40_0x145927(TaskRunning,{..._0x5e6f35}),a40_0x145927(TaskRunning,{..._0x2a16b9})]});if(_0x4a0469)return a40_0x4ff03b(a40_0x5d06ee,{'children':[a40_0x4ff03b(Box,{'marginTop':0x1,'children':[a40_0x145927(Box,{'width':'1'}),a40_0x145927(Text,{'color':_0xfbac6c(0x165),'children':_0xfbac6c(0x18a)}),a40_0x145927(Text,{'children':_0xfbac6c(0x190)}),a40_0x145927(Text,{'color':'green','children':_0x4056c1?.[_0xfbac6c(0x144)]}),_0x4056c1?.[_0xfbac6c(0x172)]&&a40_0x4ff03b(a40_0x5d06ee,{'children':[a40_0x145927(Text,{'children':'\x20|\x20应用AppCode:\x20'}),a40_0x145927(Text,{'color':'cyan','children':_0x4056c1[_0xfbac6c(0x172)]})]})]}),a40_0x145927(TaskFinished,{..._0xaab65c}),a40_0x145927(TaskFinished,{..._0x5e6f35}),a40_0x145927(TaskFinished,{..._0x2a16b9}),a40_0x145927(Box,{'marginTop':0x1,'marginBottom':0x1,'children':a40_0x145927(Text,{'color':_0xfbac6c(0x165),'children':'─'[_0xfbac6c(0x186)](0x3c)})}),a40_0x145927(Box,{'children':a40_0x145927(Text,{'color':'green','bold':!![],'children':_0xfbac6c(0x141)})}),a40_0x4ff03b(Box,{'marginTop':0x1,'flexDirection':_0xfbac6c(0x193),'children':[a40_0x4ff03b(Box,{'children':[a40_0x145927(Text,{'color':_0xfbac6c(0x16c),'children':_0xfbac6c(0x174)}),a40_0x145927(Text,{'color':_0xfbac6c(0x161),'bold':!![],'children':_0x4056c1?.[_0xfbac6c(0x144)]})]}),_0x4056c1?.[_0xfbac6c(0x172)]&&a40_0x4ff03b(Box,{'children':[a40_0x145927(Text,{'color':_0xfbac6c(0x16c),'children':_0xfbac6c(0x18e)}),a40_0x145927(Text,{'color':_0xfbac6c(0x161),'bold':!![],'children':_0x4056c1['appCode']})]}),a40_0x4ff03b(Box,{'children':[a40_0x145927(Text,{'color':_0xfbac6c(0x16c),'children':'📦\x20API配置:\x20'}),_0x4056c1?.['pullApi']?a40_0x145927(Text,{'color':_0xfbac6c(0x165),'bold':!![],'children':_0xfbac6c(0x14d)}):_0x4056c1?.[_0xfbac6c(0x172)]?a40_0x145927(Text,{'color':_0xfbac6c(0x171),'bold':!![],'children':_0xfbac6c(0x18f)}):a40_0x145927(Text,{'color':_0xfbac6c(0x135),'bold':!![],'children':_0xfbac6c(0x170)})]})]}),a40_0x145927(Box,{'marginTop':0x1,'marginBottom':0x1,'children':a40_0x145927(Text,{'color':_0xfbac6c(0x16c),'bold':!![],'children':_0xfbac6c(0x150)})}),a40_0x4ff03b(Box,{'marginLeft':0x2,'flexDirection':_0xfbac6c(0x193),'children':[a40_0x4ff03b(Box,{'children':[a40_0x145927(Text,{'color':'green','children':_0xfbac6c(0x168)}),a40_0x145927(Text,{'color':_0xfbac6c(0x161),'children':_0xfbac6c(0x160)}),a40_0x145927(Text,{'color':'cyan','bold':!![],'children':'cd\x20'+_0x4056c1?.[_0xfbac6c(0x144)]+_0xfbac6c(0x164)})]}),_0x4056c1?.[_0xfbac6c(0x172)]&&!_0x4056c1?.[_0xfbac6c(0x192)]&&a40_0x4ff03b(Box,{'children':[a40_0x145927(Text,{'color':'yellow','children':_0xfbac6c(0x183)}),a40_0x145927(Text,{'color':_0xfbac6c(0x161),'children':'拉取API配置:\x20'}),a40_0x145927(Text,{'color':_0xfbac6c(0x16c),'bold':!![],'children':'lovrabet\x20api\x20pull'})]}),!_0x4056c1?.[_0xfbac6c(0x172)]&&a40_0x4ff03b(a40_0x5d06ee,{'children':[a40_0x4ff03b(Box,{'children':[a40_0x145927(Text,{'color':_0xfbac6c(0x135),'children':_0xfbac6c(0x183)}),a40_0x145927(Text,{'color':_0xfbac6c(0x161),'children':'配置AppCode:\x20'}),a40_0x145927(Text,{'color':_0xfbac6c(0x16c),'bold':!![],'children':'lovrabet\x20config\x20set\x20appcode\x20[app-code]'})]}),a40_0x4ff03b(Box,{'children':[a40_0x145927(Text,{'color':_0xfbac6c(0x135),'children':'3.\x20'}),a40_0x145927(Text,{'color':_0xfbac6c(0x161),'children':_0xfbac6c(0x156)}),a40_0x145927(Text,{'color':'cyan','bold':!![],'children':_0xfbac6c(0x134)})]})]})]}),a40_0x145927(Box,{'marginTop':0x1,'children':a40_0x145927(Text,{'color':'green','children':'─'[_0xfbac6c(0x186)](0x3c)})})]});return null;}
@@ -1 +1 @@
1
- (function(_0xe5c611,_0x178e01){var _0x194d26=a41_0x4706,_0x3de1d6=_0xe5c611();while(!![]){try{var _0x313901=-parseInt(_0x194d26(0xc5))/0x1+-parseInt(_0x194d26(0xc8))/0x2+-parseInt(_0x194d26(0xcc))/0x3+parseInt(_0x194d26(0xce))/0x4+-parseInt(_0x194d26(0xc4))/0x5+parseInt(_0x194d26(0xc6))/0x6+parseInt(_0x194d26(0xc7))/0x7*(parseInt(_0x194d26(0xcb))/0x8);if(_0x313901===_0x178e01)break;else _0x3de1d6['push'](_0x3de1d6['shift']());}catch(_0x183ee6){_0x3de1d6['push'](_0x3de1d6['shift']());}}}(a41_0x13f0,0x87226));import{jsx as a41_0x4b8041,jsxs as a41_0x518305}from'react/jsx-runtime';import{Box,Text}from'ink';import{TaskTime}from'./task-time.js';export function TaskFinished(_0x527b86){var _0x35aeae=a41_0x4706;return a41_0x518305(Box,{'children':[a41_0x4b8041(Box,{'width':'1'}),a41_0x4b8041(Text,{'color':_0x35aeae(0xca),'children':_0x35aeae(0xc9)}),a41_0x4b8041(Text,{'children':_0x527b86[_0x35aeae(0xcd)]}),a41_0x4b8041(TaskTime,{'elapsed':_0x527b86[_0x35aeae(0xc3)]})]});}function a41_0x4706(_0x34bc0f,_0x511847){var _0x13f030=a41_0x13f0();return a41_0x4706=function(_0x470605,_0x34b233){_0x470605=_0x470605-0xc3;var _0x44f565=_0x13f030[_0x470605];return _0x44f565;},a41_0x4706(_0x34bc0f,_0x511847);}function a41_0x13f0(){var _0x4f9097=['\x20√\x20','green','8cervyQ','1710975lHPDRR','taskName','3428348QEnDXp','elapsed','4127540BQoXfE','959210gpbGjx','4411344CExxEI','14490721XQVdXd','1507722CrUNAR'];a41_0x13f0=function(){return _0x4f9097;};return a41_0x13f0();}
1
+ function a41_0x378e(){var _0x459e45=['4771568dFFCru','63620fHiJHj','63tlGBlN','7379645cXuDrC','4701927cjTEkM','84PhiNNM','elapsed','491368MpXlaY','39874abaLRU','22BNOcyE','\x20√\x20','660rEXIxP','33306TCYDof'];a41_0x378e=function(){return _0x459e45;};return a41_0x378e();}(function(_0x52eba4,_0x327173){var _0xfbf33=a41_0x4f89,_0x14ee37=_0x52eba4();while(!![]){try{var _0x36df20=parseInt(_0xfbf33(0x67))/0x1*(parseInt(_0xfbf33(0x73))/0x2)+-parseInt(_0xfbf33(0x6f))/0x3+parseInt(_0xfbf33(0x6b))/0x4+parseInt(_0xfbf33(0x6e))/0x5+parseInt(_0xfbf33(0x6a))/0x6*(parseInt(_0xfbf33(0x70))/0x7)+parseInt(_0xfbf33(0x72))/0x8*(-parseInt(_0xfbf33(0x6d))/0x9)+parseInt(_0xfbf33(0x6c))/0xa*(-parseInt(_0xfbf33(0x69))/0xb);if(_0x36df20===_0x327173)break;else _0x14ee37['push'](_0x14ee37['shift']());}catch(_0x779ea0){_0x14ee37['push'](_0x14ee37['shift']());}}}(a41_0x378e,0xc21bf));import{jsx as a41_0x2d3536,jsxs as a41_0x19318a}from'react/jsx-runtime';import{Box,Text}from'ink';function a41_0x4f89(_0x434ea0,_0x390f5e){var _0x378e16=a41_0x378e();return a41_0x4f89=function(_0x4f89ba,_0x1ab42e){_0x4f89ba=_0x4f89ba-0x67;var _0x478e80=_0x378e16[_0x4f89ba];return _0x478e80;},a41_0x4f89(_0x434ea0,_0x390f5e);}import{TaskTime}from'./task-time.js';export function TaskFinished(_0x49cc03){var _0x5b8dc5=a41_0x4f89;return a41_0x19318a(Box,{'children':[a41_0x2d3536(Box,{'width':'1'}),a41_0x2d3536(Text,{'color':'green','children':_0x5b8dc5(0x68)}),a41_0x2d3536(Text,{'children':_0x49cc03['taskName']}),a41_0x2d3536(TaskTime,{'elapsed':_0x49cc03[_0x5b8dc5(0x71)]})]});}
@@ -1 +1 @@
1
- (function(_0x546d18,_0x9e7a11){var _0x5e155c=a42_0xb940,_0x1bcbe2=_0x546d18();while(!![]){try{var _0x546ccb=-parseInt(_0x5e155c(0x9e))/0x1+parseInt(_0x5e155c(0x9b))/0x2*(parseInt(_0x5e155c(0xa1))/0x3)+-parseInt(_0x5e155c(0x9c))/0x4+parseInt(_0x5e155c(0xa2))/0x5*(parseInt(_0x5e155c(0x98))/0x6)+parseInt(_0x5e155c(0x9d))/0x7+-parseInt(_0x5e155c(0x9a))/0x8+parseInt(_0x5e155c(0xa3))/0x9;if(_0x546ccb===_0x9e7a11)break;else _0x1bcbe2['push'](_0x1bcbe2['shift']());}catch(_0x7281a4){_0x1bcbe2['push'](_0x1bcbe2['shift']());}}}(a42_0x15f4,0x8e2bb));import{jsx as a42_0x73efd7,jsxs as a42_0x2ce9e6}from'react/jsx-runtime';function a42_0x15f4(){var _0x26486c=['loading','658113VaxCIe','1374990mwNKsW','8852958CcAsIU','12pIlMfm','green','5685624LpcKNg','2pZxgOX','1699324qfgcoc','6289269lzUebQ','933631FbIscE','\x20\x20\x20'];a42_0x15f4=function(){return _0x26486c;};return a42_0x15f4();}import{Text}from'ink';function a42_0xb940(_0x8ba31e,_0x3524ce){var _0x15f4c0=a42_0x15f4();return a42_0xb940=function(_0xb940bb,_0x43d4a4){_0xb940bb=_0xb940bb-0x98;var _0x1f5405=_0x15f4c0[_0xb940bb];return _0x1f5405;},a42_0xb940(_0x8ba31e,_0x3524ce);}import a42_0x5d8b17 from'ink-spinner';export function TaskLoading(_0x1a5dd2){var _0x37cc62=a42_0xb940;if(_0x1a5dd2['finished'])return a42_0x73efd7(Text,{'color':_0x37cc62(0x99),'children':'\x20√\x20'});if(_0x1a5dd2[_0x37cc62(0xa0)])return a42_0x2ce9e6(Text,{'color':_0x37cc62(0x99),'children':['\x20',a42_0x73efd7(a42_0x5d8b17,{'type':'dots'}),'\x20']});return a42_0x73efd7(Text,{'children':_0x37cc62(0x9f)});}
1
+ (function(_0x47b4d8,_0x20de70){var _0x5e7990=a42_0x5efe,_0x51d3cd=_0x47b4d8();while(!![]){try{var _0x22b493=-parseInt(_0x5e7990(0x1bb))/0x1*(parseInt(_0x5e7990(0x1af))/0x2)+parseInt(_0x5e7990(0x1b7))/0x3*(parseInt(_0x5e7990(0x1b2))/0x4)+-parseInt(_0x5e7990(0x1ae))/0x5+parseInt(_0x5e7990(0x1b8))/0x6*(parseInt(_0x5e7990(0x1b1))/0x7)+parseInt(_0x5e7990(0x1b4))/0x8+parseInt(_0x5e7990(0x1b9))/0x9+parseInt(_0x5e7990(0x1ba))/0xa*(-parseInt(_0x5e7990(0x1b6))/0xb);if(_0x22b493===_0x20de70)break;else _0x51d3cd['push'](_0x51d3cd['shift']());}catch(_0x17742a){_0x51d3cd['push'](_0x51d3cd['shift']());}}}(a42_0x93aa,0xd0290));function a42_0x93aa(){var _0x4c5204=['48llKzoi','11307834lltDCx','10AaPkTf','1457upPKiH','loading','\x20\x20\x20','7091460nHmVzC','1774VeNpBv','\x20√\x20','961926sdzHjF','8rWDOaS','finished','10809072WzRFIb','dots','8427837DiFwNo','933807ymwfWK'];a42_0x93aa=function(){return _0x4c5204;};return a42_0x93aa();}function a42_0x5efe(_0x25d065,_0x341a9c){var _0x93aa70=a42_0x93aa();return a42_0x5efe=function(_0x5efec6,_0x311ef9){_0x5efec6=_0x5efec6-0x1ac;var _0x17304f=_0x93aa70[_0x5efec6];return _0x17304f;},a42_0x5efe(_0x25d065,_0x341a9c);}import{jsx as a42_0xf98c74,jsxs as a42_0x314a25}from'react/jsx-runtime';import{Text}from'ink';import a42_0x572084 from'ink-spinner';export function TaskLoading(_0x1131a4){var _0x550396=a42_0x5efe;if(_0x1131a4[_0x550396(0x1b3)])return a42_0xf98c74(Text,{'color':'green','children':_0x550396(0x1b0)});if(_0x1131a4[_0x550396(0x1ac)])return a42_0x314a25(Text,{'color':'green','children':['\x20',a42_0xf98c74(a42_0x572084,{'type':_0x550396(0x1b5)}),'\x20']});return a42_0xf98c74(Text,{'children':_0x550396(0x1ad)});}
@@ -1 +1 @@
1
- (function(_0x23d6ee,_0x43ec93){var _0x270896=a43_0x441f,_0x49c471=_0x23d6ee();while(!![]){try{var _0x180c42=-parseInt(_0x270896(0x1e0))/0x1*(parseInt(_0x270896(0x1da))/0x2)+-parseInt(_0x270896(0x1de))/0x3*(parseInt(_0x270896(0x1d7))/0x4)+parseInt(_0x270896(0x1dc))/0x5*(parseInt(_0x270896(0x1d5))/0x6)+parseInt(_0x270896(0x1d6))/0x7+-parseInt(_0x270896(0x1d8))/0x8+parseInt(_0x270896(0x1db))/0x9*(-parseInt(_0x270896(0x1d9))/0xa)+parseInt(_0x270896(0x1dd))/0xb;if(_0x180c42===_0x43ec93)break;else _0x49c471['push'](_0x49c471['shift']());}catch(_0xe3dbe9){_0x49c471['push'](_0x49c471['shift']());}}}(a43_0xff9e,0x599ec));import{jsx as a43_0xdc0ad7,jsxs as a43_0x4a6e10}from'react/jsx-runtime';import{Box,Text}from'ink';function a43_0xff9e(){var _0x36a08c=['3SJJfYx','taskName','8249bGyVSE','12qRFZLg','3170195kNyEJz','1277140qlupUx','538648ddWOdY','11590rPtbyg','20Xjyvbg','5418gFnUTV','875945qsSCBW','8037095EsZUsi'];a43_0xff9e=function(){return _0x36a08c;};return a43_0xff9e();}function a43_0x441f(_0x556cec,_0xc693cf){var _0xff9e32=a43_0xff9e();return a43_0x441f=function(_0x441f3c,_0x2d6aee){_0x441f3c=_0x441f3c-0x1d5;var _0x5d7047=_0xff9e32[_0x441f3c];return _0x5d7047;},a43_0x441f(_0x556cec,_0xc693cf);}import{TaskLoading}from'./task-loading.js';import{TaskTime}from'./task-time.js';export function TaskRunning(_0x3acfed){var _0x43e1fa=a43_0x441f;return a43_0x4a6e10(Box,{'children':[a43_0xdc0ad7(Box,{'width':'1'}),a43_0xdc0ad7(TaskLoading,{..._0x3acfed}),a43_0xdc0ad7(Text,{'children':_0x3acfed[_0x43e1fa(0x1df)]}),a43_0xdc0ad7(TaskTime,{'elapsed':_0x3acfed['elapsed']})]});}
1
+ (function(_0x3a4ca4,_0x28ac0e){var _0x2e2475=a43_0x5cad,_0x35aaf6=_0x3a4ca4();while(!![]){try{var _0x4ddfc5=-parseInt(_0x2e2475(0x1c0))/0x1*(-parseInt(_0x2e2475(0x1c9))/0x2)+parseInt(_0x2e2475(0x1c8))/0x3+parseInt(_0x2e2475(0x1c7))/0x4+-parseInt(_0x2e2475(0x1c1))/0x5+-parseInt(_0x2e2475(0x1c5))/0x6*(parseInt(_0x2e2475(0x1c3))/0x7)+-parseInt(_0x2e2475(0x1bf))/0x8+parseInt(_0x2e2475(0x1c2))/0x9*(parseInt(_0x2e2475(0x1c6))/0xa);if(_0x4ddfc5===_0x28ac0e)break;else _0x35aaf6['push'](_0x35aaf6['shift']());}catch(_0xa613e4){_0x35aaf6['push'](_0x35aaf6['shift']());}}}(a43_0x5c07,0xa7fd9));import{jsx as a43_0x4bd517,jsxs as a43_0x14fa6c}from'react/jsx-runtime';import{Box,Text}from'ink';import{TaskLoading}from'./task-loading.js';import{TaskTime}from'./task-time.js';export function TaskRunning(_0x3a9f5b){var _0x3a3852=a43_0x5cad;return a43_0x14fa6c(Box,{'children':[a43_0x4bd517(Box,{'width':'1'}),a43_0x4bd517(TaskLoading,{..._0x3a9f5b}),a43_0x4bd517(Text,{'children':_0x3a9f5b['taskName']}),a43_0x4bd517(TaskTime,{'elapsed':_0x3a9f5b[_0x3a3852(0x1c4)]})]});}function a43_0x5cad(_0x500515,_0x18d4ec){var _0x5c070d=a43_0x5c07();return a43_0x5cad=function(_0x5cad50,_0x1a4735){_0x5cad50=_0x5cad50-0x1bf;var _0x3f6e51=_0x5c070d[_0x5cad50];return _0x3f6e51;},a43_0x5cad(_0x500515,_0x18d4ec);}function a43_0x5c07(){var _0x250663=['116478jISSil','847zRzPJf','elapsed','9222sXYLgE','340EzsUEU','564384yPCPBr','1969080JYmZyr','26010HVIHiV','9539376BbqDZn','66ixeEvI','146630EmVGcY'];a43_0x5c07=function(){return _0x250663;};return a43_0x5c07();}
@@ -1 +1 @@
1
- (function(_0x329875,_0xe4bb0f){var _0x24fe9c=a44_0x5630,_0x5537d0=_0x329875();while(!![]){try{var _0x5d923a=parseInt(_0x24fe9c(0x1dd))/0x1+-parseInt(_0x24fe9c(0x1dc))/0x2*(-parseInt(_0x24fe9c(0x1df))/0x3)+parseInt(_0x24fe9c(0x1e4))/0x4*(parseInt(_0x24fe9c(0x1e2))/0x5)+-parseInt(_0x24fe9c(0x1db))/0x6+-parseInt(_0x24fe9c(0x1e3))/0x7*(-parseInt(_0x24fe9c(0x1e0))/0x8)+-parseInt(_0x24fe9c(0x1e5))/0x9+parseInt(_0x24fe9c(0x1e1))/0xa;if(_0x5d923a===_0xe4bb0f)break;else _0x5537d0['push'](_0x5537d0['shift']());}catch(_0x5df0b3){_0x5537d0['push'](_0x5537d0['shift']());}}}(a44_0x2d33,0x8f4a7));function a44_0x5630(_0x12a3d3,_0x2a2a18){var _0x2d3379=a44_0x2d33();return a44_0x5630=function(_0x5630fd,_0x5645db){_0x5630fd=_0x5630fd-0x1db;var _0x2861f4=_0x2d3379[_0x5630fd];return _0x2861f4;},a44_0x5630(_0x12a3d3,_0x2a2a18);}function a44_0x2d33(){var _0x1871f1=['elapsed','3oMDAGr','4776GKQTjf','5902770pKduYV','145LqodSq','301XXMCvi','78852bRehTr','9394434CtLfEK','gray','3338052QFlZgX','244680QNvoAM','877122sqQZdh'];a44_0x2d33=function(){return _0x1871f1;};return a44_0x2d33();}import{jsx as a44_0x308813,Fragment as a44_0x55c0e9,jsxs as a44_0x3cb4ad}from'react/jsx-runtime';import{Text}from'ink';export function TaskTime(_0x1a0ed5){var _0x399d42=a44_0x5630;if(_0x1a0ed5[_0x399d42(0x1de)])return a44_0x3cb4ad(a44_0x55c0e9,{'children':[a44_0x308813(Text,{'color':'gray','children':'\x20['}),a44_0x308813(Text,{'color':_0x399d42(0x1e6),'bold':!![],'children':_0x1a0ed5[_0x399d42(0x1de)]}),a44_0x308813(Text,{'color':'gray','children':']'})]});return null;}
1
+ function a44_0x28d7(){var _0x564c86=['188PiweWC','elapsed','22751597vnemwn','48nlikwt','611578waiSfA','gray','1785889aOTHjk','5830830djqXID','4489191CIWHUO','2urjCBU','4585935JNsfSz','103245hHOZRD','10ebnwcW'];a44_0x28d7=function(){return _0x564c86;};return a44_0x28d7();}(function(_0xea0bcb,_0x19c134){var _0x45a256=a44_0x2a9e,_0x49ff86=_0xea0bcb();while(!![]){try{var _0x14d420=-parseInt(_0x45a256(0x85))/0x1+-parseInt(_0x45a256(0x7d))/0x2*(parseInt(_0x45a256(0x7e))/0x3)+-parseInt(_0x45a256(0x81))/0x4*(-parseInt(_0x45a256(0x7f))/0x5)+-parseInt(_0x45a256(0x7b))/0x6+parseInt(_0x45a256(0x7a))/0x7*(parseInt(_0x45a256(0x84))/0x8)+-parseInt(_0x45a256(0x7c))/0x9*(parseInt(_0x45a256(0x80))/0xa)+parseInt(_0x45a256(0x83))/0xb;if(_0x14d420===_0x19c134)break;else _0x49ff86['push'](_0x49ff86['shift']());}catch(_0x4c21a1){_0x49ff86['push'](_0x49ff86['shift']());}}}(a44_0x28d7,0xea12d));import{jsx as a44_0x39084c,Fragment as a44_0x5749c0,jsxs as a44_0x472fcd}from'react/jsx-runtime';function a44_0x2a9e(_0x1a023e,_0x3a1cdb){var _0x28d779=a44_0x28d7();return a44_0x2a9e=function(_0x2a9edc,_0x17393d){_0x2a9edc=_0x2a9edc-0x7a;var _0x1af5b2=_0x28d779[_0x2a9edc];return _0x1af5b2;},a44_0x2a9e(_0x1a023e,_0x3a1cdb);}import{Text}from'ink';export function TaskTime(_0x2b3b52){var _0x2ff877=a44_0x2a9e;if(_0x2b3b52[_0x2ff877(0x82)])return a44_0x472fcd(a44_0x5749c0,{'children':[a44_0x39084c(Text,{'color':_0x2ff877(0x86),'children':'\x20['}),a44_0x39084c(Text,{'color':_0x2ff877(0x86),'bold':!![],'children':_0x2b3b52[_0x2ff877(0x82)]}),a44_0x39084c(Text,{'color':_0x2ff877(0x86),'children':']'})]});return null;}
@@ -1 +1 @@
1
- const a45_0x2c7252=a45_0x20be;(function(_0x1feee5,_0x497d82){const _0x5296af=a45_0x20be,_0x1832c3=_0x1feee5();while(!![]){try{const _0x44c960=-parseInt(_0x5296af(0xe5))/0x1+parseInt(_0x5296af(0xe0))/0x2*(parseInt(_0x5296af(0xdd))/0x3)+-parseInt(_0x5296af(0xdc))/0x4*(-parseInt(_0x5296af(0xe3))/0x5)+-parseInt(_0x5296af(0xe4))/0x6+parseInt(_0x5296af(0xd4))/0x7+parseInt(_0x5296af(0xe1))/0x8*(parseInt(_0x5296af(0xdb))/0x9)+parseInt(_0x5296af(0xde))/0xa*(-parseInt(_0x5296af(0xd2))/0xb);if(_0x44c960===_0x497d82)break;else _0x1832c3['push'](_0x1832c3['shift']());}catch(_0x3190fd){_0x1832c3['push'](_0x1832c3['shift']());}}}(a45_0x3d8e,0x621e9));import a45_0x15ae31 from'node:path';import{fileURLToPath}from'node:url';import{useCallback,useState}from'react';import{copyDirectory}from'../utils/copy-directory.js';import{formatElapsed}from'./format-elapsed.js';import{logger}from'../utils/logger.js';function a45_0x3d8e(){const _0x4390e4=['message','开始复制项目模板','info','url','error','resolve','315ilVwIU','116968FZkNxD','37494vRDthN','20DcVeuu','copy','2tsBrlE','170192lAdryO','../../templates/projects/sub-app-react-demo','25eWOGpa','1126794gczhYV','783384qOGwDz','项目模板复制完成','复制项目文件','now','dirname','cwd','1322497iBkgpj','success','4971652DfxkMV'];a45_0x3d8e=function(){return _0x4390e4;};return a45_0x3d8e();}const __dirname=a45_0x15ae31[a45_0x2c7252(0xd0)](fileURLToPath(import.meta[a45_0x2c7252(0xd8)])),templateDir=a45_0x15ae31[a45_0x2c7252(0xda)](__dirname,a45_0x2c7252(0xe2));function a45_0x20be(_0x3fd372,_0x276b10){const _0x3d8e12=a45_0x3d8e();return a45_0x20be=function(_0x20bebc,_0x3f65b5){_0x20bebc=_0x20bebc-0xcf;let _0x2181ed=_0x3d8e12[_0x20bebc];return _0x2181ed;},a45_0x20be(_0x3fd372,_0x276b10);}export function useCopyProjectTemplate(){const _0x32e303=a45_0x2c7252,[_0x16768f,_0x29cec8]=useState(![]),[_0x3c4793,_0x39a61c]=useState(![]),[_0xd001da,_0x635ab2]=useState(''),_0x2b9213=useCallback(async _0x413ec0=>{const _0xb14e1=a45_0x20be,_0x5be3e0=Date[_0xb14e1(0xcf)](),_0x4d8e42=a45_0x15ae31[_0xb14e1(0xda)](process[_0xb14e1(0xd1)](),_0x413ec0);_0x29cec8(!![]);try{logger[_0xb14e1(0xd7)](_0xb14e1(0xdf),_0xb14e1(0xd6),{'projectCode':_0x413ec0,'templateDir':templateDir}),await copyDirectory(templateDir,_0x4d8e42);const _0x5ea4e6=Date[_0xb14e1(0xcf)]()-_0x5be3e0;logger[_0xb14e1(0xd3)](_0xb14e1(0xdf),_0xb14e1(0xe6),_0x5ea4e6,{'projectCode':_0x413ec0});}catch(_0x52e8c5){const _0x3b64af=Date[_0xb14e1(0xcf)]()-_0x5be3e0;logger[_0xb14e1(0xd9)](_0xb14e1(0xdf),'项目模板复制失败',{'projectCode':_0x413ec0,'error':_0x52e8c5 instanceof Error?_0x52e8c5[_0xb14e1(0xd5)]:String(_0x52e8c5),'duration':_0x3b64af});throw _0x52e8c5;}finally{_0x29cec8(![]),_0x39a61c(!![]),_0x635ab2(formatElapsed(_0x5be3e0));}},[]);return{'taskName':_0x32e303(0xe7),'finished':_0x3c4793,'loading':_0x16768f,'elapsed':_0xd001da,'doTask':_0x2b9213};}
1
+ const a45_0x367e84=a45_0x26d2;(function(_0x597ee3,_0x161c47){const _0x425fa3=a45_0x26d2,_0x243a4d=_0x597ee3();while(!![]){try{const _0x1b272b=-parseInt(_0x425fa3(0xac))/0x1+parseInt(_0x425fa3(0x9c))/0x2+parseInt(_0x425fa3(0x9d))/0x3+parseInt(_0x425fa3(0x99))/0x4+parseInt(_0x425fa3(0xa4))/0x5+parseInt(_0x425fa3(0xa0))/0x6+-parseInt(_0x425fa3(0xa2))/0x7*(parseInt(_0x425fa3(0xa5))/0x8);if(_0x1b272b===_0x161c47)break;else _0x243a4d['push'](_0x243a4d['shift']());}catch(_0x5212b6){_0x243a4d['push'](_0x243a4d['shift']());}}}(a45_0x51ae,0x6c085));function a45_0x51ae(){const _0x18e615=['8xDhUYG','copy','info','项目模板复制完成','项目模板复制失败','success','../../templates/projects/sub-app-react-demo','381774IwGkpC','dirname','1052484WNwJDf','复制项目文件','now','530208GAhGVt','1310967tWJsHS','开始复制项目模板','cwd','2564778PntRTm','resolve','9953678OAcdae','message','4267760UgEOIQ'];a45_0x51ae=function(){return _0x18e615;};return a45_0x51ae();}import a45_0x5ab8e6 from'node:path';import{fileURLToPath}from'node:url';import{useCallback,useState}from'react';import{copyDirectory}from'../utils/copy-directory.js';import{formatElapsed}from'./format-elapsed.js';import{logger}from'../utils/logger.js';function a45_0x26d2(_0x2fc7f4,_0x4b9a7f){const _0x51ae2d=a45_0x51ae();return a45_0x26d2=function(_0x26d20b,_0x167e1b){_0x26d20b=_0x26d20b-0x98;let _0x1bec98=_0x51ae2d[_0x26d20b];return _0x1bec98;},a45_0x26d2(_0x2fc7f4,_0x4b9a7f);}const __dirname=a45_0x5ab8e6[a45_0x367e84(0x98)](fileURLToPath(import.meta['url'])),templateDir=a45_0x5ab8e6[a45_0x367e84(0xa1)](__dirname,a45_0x367e84(0xab));export function useCopyProjectTemplate(){const _0x1ca885=a45_0x367e84,[_0x4869d9,_0x26057f]=useState(![]),[_0x29851d,_0x52f7c5]=useState(![]),[_0x2b633d,_0x272e3d]=useState(''),_0x5826d7=useCallback(async _0x53640b=>{const _0x1e44ed=a45_0x26d2,_0x1a6fe8=Date[_0x1e44ed(0x9b)](),_0x3d6970=a45_0x5ab8e6[_0x1e44ed(0xa1)](process[_0x1e44ed(0x9f)](),_0x53640b);_0x26057f(!![]);try{logger[_0x1e44ed(0xa7)]('copy',_0x1e44ed(0x9e),{'projectCode':_0x53640b,'templateDir':templateDir}),await copyDirectory(templateDir,_0x3d6970);const _0x490d48=Date[_0x1e44ed(0x9b)]()-_0x1a6fe8;logger[_0x1e44ed(0xaa)](_0x1e44ed(0xa6),_0x1e44ed(0xa8),_0x490d48,{'projectCode':_0x53640b});}catch(_0x3d1c95){const _0x169eb1=Date[_0x1e44ed(0x9b)]()-_0x1a6fe8;logger['error'](_0x1e44ed(0xa6),_0x1e44ed(0xa9),{'projectCode':_0x53640b,'error':_0x3d1c95 instanceof Error?_0x3d1c95[_0x1e44ed(0xa3)]:String(_0x3d1c95),'duration':_0x169eb1});throw _0x3d1c95;}finally{_0x26057f(![]),_0x52f7c5(!![]),_0x272e3d(formatElapsed(_0x1a6fe8));}},[]);return{'taskName':_0x1ca885(0x9a),'finished':_0x29851d,'loading':_0x4869d9,'elapsed':_0x2b633d,'doTask':_0x5826d7};}
@@ -1 +1 @@
1
- function a46_0x5efe(){const _0x19e7c9=['38549VElbdD','5958FzHgDE','npx','35sgTpIT','prettier','746360OKrHHs','15657BNUUpz','cwd','format','--write','216612kiKfmL','格式化代码','now','代码格式化失败','error','info','2021004pJbxaW','224ndImsv','代码格式化完成','resolve','440776dGioEd'];a46_0x5efe=function(){return _0x19e7c9;};return a46_0x5efe();}function a46_0x70bc(_0x32e6a0,_0x165515){const _0x5efed2=a46_0x5efe();return a46_0x70bc=function(_0x70bca7,_0x2cd544){_0x70bca7=_0x70bca7-0x10c;let _0x37b587=_0x5efed2[_0x70bca7];return _0x37b587;},a46_0x70bc(_0x32e6a0,_0x165515);}(function(_0x2561c9,_0x1df20a){const _0x3c2418=a46_0x70bc,_0x32ae61=_0x2561c9();while(!![]){try{const _0x42b09e=-parseInt(_0x3c2418(0x113))/0x1+-parseInt(_0x3c2418(0x11d))/0x2+-parseInt(_0x3c2418(0x10f))/0x3+parseInt(_0x3c2418(0x10e))/0x4+-parseInt(_0x3c2418(0x10c))/0x5*(-parseInt(_0x3c2418(0x11f))/0x6)+parseInt(_0x3c2418(0x11e))/0x7*(parseInt(_0x3c2418(0x11a))/0x8)+parseInt(_0x3c2418(0x119))/0x9;if(_0x42b09e===_0x1df20a)break;else _0x32ae61['push'](_0x32ae61['shift']());}catch(_0x3c6e53){_0x32ae61['push'](_0x32ae61['shift']());}}}(a46_0x5efe,0x1fc1a));import a46_0x4b73e3 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 useFormatCode(){const _0x1b628a=a46_0x70bc,[_0x1dd849,_0x51bf16]=useState(![]),[_0xf9eb7,_0x59a089]=useState(![]),[_0x458455,_0x59ae32]=useState(''),_0x17fbb5=useCallback(async _0xabdf71=>{const _0x3bc3c8=a46_0x70bc,_0x207458=Date[_0x3bc3c8(0x115)](),_0x3b097c=a46_0x4b73e3[_0x3bc3c8(0x11c)](process[_0x3bc3c8(0x110)](),_0xabdf71);_0x51bf16(!![]);try{logger[_0x3bc3c8(0x118)](_0x3bc3c8(0x111),'开始格式化代码',{'projectCode':_0xabdf71}),await execa(_0x3bc3c8(0x120),[_0x3bc3c8(0x10d),_0x3bc3c8(0x112),'.'],{'cwd':_0x3b097c});const _0x126d3f=Date['now']()-_0x207458;logger['success']('format',_0x3bc3c8(0x11b),_0x126d3f,{'projectCode':_0xabdf71});}catch(_0x19ccbc){const _0x4a4b37=Date[_0x3bc3c8(0x115)]()-_0x207458;logger[_0x3bc3c8(0x117)]('format',_0x3bc3c8(0x116),{'projectCode':_0xabdf71,'error':_0x19ccbc instanceof Error?_0x19ccbc['message']:String(_0x19ccbc),'duration':_0x4a4b37});throw _0x19ccbc;}finally{_0x51bf16(![]),_0x59a089(!![]),_0x59ae32(formatElapsed(_0x207458));}},[]);return{'taskName':_0x1b628a(0x114),'finished':_0xf9eb7,'loading':_0x1dd849,'elapsed':_0x458455,'doTask':_0x17fbb5};}
1
+ (function(_0x226d2e,_0x5dd906){const _0x4ba3bf=a46_0x1c8d,_0x536d7e=_0x226d2e();while(!![]){try{const _0x8d2fb8=-parseInt(_0x4ba3bf(0x174))/0x1+-parseInt(_0x4ba3bf(0x16b))/0x2+-parseInt(_0x4ba3bf(0x177))/0x3*(-parseInt(_0x4ba3bf(0x16f))/0x4)+parseInt(_0x4ba3bf(0x178))/0x5+parseInt(_0x4ba3bf(0x170))/0x6*(-parseInt(_0x4ba3bf(0x16a))/0x7)+-parseInt(_0x4ba3bf(0x173))/0x8*(parseInt(_0x4ba3bf(0x169))/0x9)+parseInt(_0x4ba3bf(0x171))/0xa;if(_0x8d2fb8===_0x5dd906)break;else _0x536d7e['push'](_0x536d7e['shift']());}catch(_0x3d6051){_0x536d7e['push'](_0x536d7e['shift']());}}}(a46_0x31a8,0xb0be3));import a46_0x553ba5 from'node:path';function a46_0x1c8d(_0x2f119d,_0x1c4cb1){const _0x31a8de=a46_0x31a8();return a46_0x1c8d=function(_0x1c8d46,_0x4a98ac){_0x1c8d46=_0x1c8d46-0x163;let _0x2136b0=_0x31a8de[_0x1c8d46];return _0x2136b0;},a46_0x1c8d(_0x2f119d,_0x1c4cb1);}import{useCallback,useState}from'react';import{execa}from'execa';import{formatElapsed}from'./format-elapsed.js';import{logger}from'../utils/logger.js';export function useFormatCode(){const _0x47a6bb=a46_0x1c8d,[_0x1a2138,_0x381b84]=useState(![]),[_0x45d6f3,_0x50b813]=useState(![]),[_0x1f0d6b,_0x1be79b]=useState(''),_0x130d99=useCallback(async _0x105e8f=>{const _0x306f90=a46_0x1c8d,_0x34a219=Date[_0x306f90(0x172)](),_0x5a7f4f=a46_0x553ba5[_0x306f90(0x164)](process[_0x306f90(0x165)](),_0x105e8f);_0x381b84(!![]);try{logger[_0x306f90(0x17a)](_0x306f90(0x16c),_0x306f90(0x167),{'projectCode':_0x105e8f}),await execa(_0x306f90(0x179),[_0x306f90(0x166),_0x306f90(0x163),'.'],{'cwd':_0x5a7f4f});const _0x2952de=Date[_0x306f90(0x172)]()-_0x34a219;logger['success'](_0x306f90(0x16c),_0x306f90(0x175),_0x2952de,{'projectCode':_0x105e8f});}catch(_0x1bac92){const _0x2bf217=Date[_0x306f90(0x172)]()-_0x34a219;logger[_0x306f90(0x16e)](_0x306f90(0x16c),_0x306f90(0x16d),{'projectCode':_0x105e8f,'error':_0x1bac92 instanceof Error?_0x1bac92[_0x306f90(0x176)]:String(_0x1bac92),'duration':_0x2bf217});throw _0x1bac92;}finally{_0x381b84(![]),_0x50b813(!![]),_0x1be79b(formatElapsed(_0x34a219));}},[]);return{'taskName':_0x47a6bb(0x168),'finished':_0x45d6f3,'loading':_0x1a2138,'elapsed':_0x1f0d6b,'doTask':_0x130d99};}function a46_0x31a8(){const _0x18430d=['4978135mqVDEa','npx','info','--write','resolve','cwd','prettier','开始格式化代码','格式化代码','13320kYKlBJ','5711363uBpUxE','2014102JkEiag','format','代码格式化失败','error','40icdAwo','6vasxOI','20852810XwtYJH','now','2920RVYlDx','1440099AMJXkH','代码格式化完成','message','433887CGGYQK'];a46_0x31a8=function(){return _0x18430d;};return a46_0x31a8();}
@@ -1 +1 @@
1
- (function(_0x517ce8,_0x2fe8bd){const _0x22e9d8=a47_0x229c,_0x43c5a6=_0x517ce8();while(!![]){try{const _0x3772b1=-parseInt(_0x22e9d8(0x1f0))/0x1+-parseInt(_0x22e9d8(0x1f5))/0x2+parseInt(_0x22e9d8(0x1f2))/0x3+-parseInt(_0x22e9d8(0x1ef))/0x4+-parseInt(_0x22e9d8(0x1fc))/0x5*(parseInt(_0x22e9d8(0x1e9))/0x6)+parseInt(_0x22e9d8(0x1ed))/0x7*(parseInt(_0x22e9d8(0x1e8))/0x8)+parseInt(_0x22e9d8(0x1eb))/0x9;if(_0x3772b1===_0x2fe8bd)break;else _0x43c5a6['push'](_0x43c5a6['shift']());}catch(_0xcd72d4){_0x43c5a6['push'](_0x43c5a6['shift']());}}}(a47_0x1d3c,0xda798));import a47_0x5362bf from'node:path';function a47_0x229c(_0x4a3078,_0x1b8661){const _0x1d3c32=a47_0x1d3c();return a47_0x229c=function(_0x229c9b,_0x2b80d0){_0x229c9b=_0x229c9b-0x1e8;let _0x45f189=_0x1d3c32[_0x229c9b];return _0x45f189;},a47_0x229c(_0x4a3078,_0x1b8661);}import{useCallback,useState}from'react';function a47_0x1d3c(){const _0x48ba85=['install','安装依赖','message','7815670zuonOL','1561736zBnumn','6hRxpGs','https://registry.npmmirror.com','53397594PlznxO','now','14EzzPNn','info','6476388oIBVgp','1581439jcQmHh','cwd','2114223nGNyfR','依赖安装失败','依赖安装完成','2739398XVwLke','resolve','npm','--registry'];a47_0x1d3c=function(){return _0x48ba85;};return a47_0x1d3c();}import{execa}from'execa';import{formatElapsed}from'./format-elapsed.js';import{logger}from'../utils/logger.js';export function useInstallDependencies(){const _0x42e415=a47_0x229c,[_0x48a4f9,_0x5d8880]=useState(![]),[_0x50fba4,_0x2c4a87]=useState(![]),[_0x3e8a41,_0x74be71]=useState(''),_0x4de64c=useCallback(async _0x8fc8ad=>{const _0x27357a=a47_0x229c,_0x11684a=Date[_0x27357a(0x1ec)](),_0xa8a264=a47_0x5362bf[_0x27357a(0x1f6)](process[_0x27357a(0x1f1)](),_0x8fc8ad);_0x5d8880(!![]),_0x2c4a87(![]);const _0xcfa1ea=async(_0x28acae,_0x3fdb27)=>{await execa(_0x28acae,_0x3fdb27,{'cwd':_0xa8a264});};try{logger[_0x27357a(0x1ee)](_0x27357a(0x1f9),'开始安装依赖',{'projectCode':_0x8fc8ad,'registry':_0x27357a(0x1ea)}),await _0xcfa1ea(_0x27357a(0x1f7),[_0x27357a(0x1f9),_0x27357a(0x1f8),'https://registry.npmmirror.com']);const _0x21a0f6=Date[_0x27357a(0x1ec)]()-_0x11684a;logger['success'](_0x27357a(0x1f9),_0x27357a(0x1f4),_0x21a0f6,{'projectCode':_0x8fc8ad});}catch(_0x35f545){const _0x320bda=Date[_0x27357a(0x1ec)]()-_0x11684a;logger['error'](_0x27357a(0x1f9),_0x27357a(0x1f3),{'projectCode':_0x8fc8ad,'error':_0x35f545 instanceof Error?_0x35f545[_0x27357a(0x1fb)]:String(_0x35f545),'duration':_0x320bda});throw _0x35f545;}finally{_0x5d8880(![]),_0x2c4a87(!![]),_0x74be71(formatElapsed(_0x11684a));}},[]);return{'taskName':_0x42e415(0x1fa),'finished':_0x50fba4,'loading':_0x48a4f9,'elapsed':_0x3e8a41,'doTask':_0x4de64c};}
1
+ (function(_0x28ebb6,_0x196cc7){const _0x524377=a47_0x3dce,_0x1b5cb1=_0x28ebb6();while(!![]){try{const _0xae0cd4=-parseInt(_0x524377(0x130))/0x1+-parseInt(_0x524377(0x12d))/0x2*(parseInt(_0x524377(0x128))/0x3)+-parseInt(_0x524377(0x12a))/0x4+parseInt(_0x524377(0x126))/0x5*(parseInt(_0x524377(0x129))/0x6)+parseInt(_0x524377(0x121))/0x7*(parseInt(_0x524377(0x131))/0x8)+-parseInt(_0x524377(0x12e))/0x9+parseInt(_0x524377(0x124))/0xa;if(_0xae0cd4===_0x196cc7)break;else _0x1b5cb1['push'](_0x1b5cb1['shift']());}catch(_0x1f4e4c){_0x1b5cb1['push'](_0x1b5cb1['shift']());}}}(a47_0x1632,0x99cdc));import a47_0x1c6405 from'node:path';import{useCallback,useState}from'react';import{execa}from'execa';function a47_0x3dce(_0x5b6f02,_0x372c73){const _0x163239=a47_0x1632();return a47_0x3dce=function(_0x3dce2c,_0x4fe8a6){_0x3dce2c=_0x3dce2c-0x11c;let _0x164a70=_0x163239[_0x3dce2c];return _0x164a70;},a47_0x3dce(_0x5b6f02,_0x372c73);}import{formatElapsed}from'./format-elapsed.js';function a47_0x1632(){const _0x41eada=['10jKcqBr','message','1668003yUeOHs','3251154ILJvGf','2418788aLfSRz','npm','安装依赖','4xJIZwJ','4000338OgeQhi','install','1073084jQOgDn','48jruuMT','now','开始安装依赖','cwd','依赖安装完成','resolve','1403304hgiDIq','依赖安装失败','https://registry.npmmirror.com','15776950qHTlYW','info'];a47_0x1632=function(){return _0x41eada;};return a47_0x1632();}import{logger}from'../utils/logger.js';export function useInstallDependencies(){const _0x5e17df=a47_0x3dce,[_0x35fa19,_0x49c312]=useState(![]),[_0x279e7c,_0x5cd0d3]=useState(![]),[_0x3815b8,_0x4a2734]=useState(''),_0x195b11=useCallback(async _0x57489e=>{const _0x394fbb=a47_0x3dce,_0x48d36e=Date['now'](),_0xe65ff0=a47_0x1c6405[_0x394fbb(0x120)](process[_0x394fbb(0x11e)](),_0x57489e);_0x49c312(!![]),_0x5cd0d3(![]);const _0x131687=async(_0x121be3,_0x1df91f)=>{await execa(_0x121be3,_0x1df91f,{'cwd':_0xe65ff0});};try{logger[_0x394fbb(0x125)]('install',_0x394fbb(0x11d),{'projectCode':_0x57489e,'registry':'https://registry.npmmirror.com'}),await _0x131687(_0x394fbb(0x12b),[_0x394fbb(0x12f),'--registry',_0x394fbb(0x123)]);const _0x2bd5e5=Date[_0x394fbb(0x11c)]()-_0x48d36e;logger['success']('install',_0x394fbb(0x11f),_0x2bd5e5,{'projectCode':_0x57489e});}catch(_0x487ef8){const _0x2f2257=Date[_0x394fbb(0x11c)]()-_0x48d36e;logger['error'](_0x394fbb(0x12f),_0x394fbb(0x122),{'projectCode':_0x57489e,'error':_0x487ef8 instanceof Error?_0x487ef8[_0x394fbb(0x127)]:String(_0x487ef8),'duration':_0x2f2257});throw _0x487ef8;}finally{_0x49c312(![]),_0x5cd0d3(!![]),_0x4a2734(formatElapsed(_0x48d36e));}},[]);return{'taskName':_0x5e17df(0x12c),'finished':_0x279e7c,'loading':_0x35fa19,'elapsed':_0x3815b8,'doTask':_0x195b11};}
package/lib/help.js CHANGED
@@ -1 +1 @@
1
- (function(_0x36d7e4,_0x3818e6){var _0x11a10d=a48_0xb0f8,_0x16f10d=_0x36d7e4();while(!![]){try{var _0x260a9d=-parseInt(_0x11a10d(0x109))/0x1+parseInt(_0x11a10d(0x108))/0x2*(parseInt(_0x11a10d(0x102))/0x3)+-parseInt(_0x11a10d(0x10b))/0x4+parseInt(_0x11a10d(0x107))/0x5+parseInt(_0x11a10d(0x103))/0x6+-parseInt(_0x11a10d(0x101))/0x7+-parseInt(_0x11a10d(0x105))/0x8*(-parseInt(_0x11a10d(0x106))/0x9);if(_0x260a9d===_0x3818e6)break;else _0x16f10d['push'](_0x16f10d['shift']());}catch(_0x10565a){_0x16f10d['push'](_0x16f10d['shift']());}}}(a48_0xca4a,0x33626));function a48_0xb0f8(_0x38fab5,_0x445058){var _0xca4a1f=a48_0xca4a();return a48_0xb0f8=function(_0xb0f8ed,_0x5f23f0){_0xb0f8ed=_0xb0f8ed-0x100;var _0x570edf=_0xca4a1f[_0xb0f8ed];return _0x570edf;},a48_0xb0f8(_0x38fab5,_0x445058);}import{jsx as a48_0x2aa99e,jsxs as a48_0x23c785}from'react/jsx-runtime';function a48_0xca4a(){var _0x22c54d=['36426HiIjyt','823464XaIpTp','查看可用命令。','104dxlBsM','104175nvomOF','896530nPnSAX','24OvKDAU','395692FJhXeM','green','13068gpKgrq','column','lovrabet\x20--help','23100qtYVVy'];a48_0xca4a=function(){return _0x22c54d;};return a48_0xca4a();}import{Box,Text}from'ink';export function Help(){var _0x5d3495=a48_0xb0f8;return a48_0x23c785(Box,{'flexDirection':_0x5d3495(0x10c),'marginTop':0x1,'marginBottom':0x1,'children':[a48_0x23c785(Box,{'children':[a48_0x2aa99e(Box,{'width':'1'}),a48_0x2aa99e(Text,{'children':'!\x20请指定一个有效的命令。'})]}),a48_0x23c785(Box,{'marginTop':0x1,'children':[a48_0x2aa99e(Box,{'width':'1'}),a48_0x23c785(Text,{'children':['\x20\x20','使用']}),a48_0x23c785(Text,{'bold':!![],'color':_0x5d3495(0x10a),'children':['\x20',_0x5d3495(0x100),'\x20']}),a48_0x2aa99e(Text,{'children':_0x5d3495(0x104)})]})]});}
1
+ function a48_0x4032(){var _0x3cb8ba=['!\x20请指定一个有效的命令。','12050048CVnfqL','3442820heWXEM','column','2732136XEIffn','310LCAEas','13800zPqezr','918368GZDaqM','285081AppPCf','lovrabet\x20--help','green','6827394PiLKfh'];a48_0x4032=function(){return _0x3cb8ba;};return a48_0x4032();}(function(_0x39f138,_0x15743c){var _0x51fd8f=a48_0x15d0,_0x33bfa0=_0x39f138();while(!![]){try{var _0x3c4b42=parseInt(_0x51fd8f(0x137))/0x1+-parseInt(_0x51fd8f(0x136))/0x2+parseInt(_0x51fd8f(0x133))/0x3+-parseInt(_0x51fd8f(0x131))/0x4+-parseInt(_0x51fd8f(0x134))/0x5*(-parseInt(_0x51fd8f(0x135))/0x6)+-parseInt(_0x51fd8f(0x13a))/0x7+parseInt(_0x51fd8f(0x130))/0x8;if(_0x3c4b42===_0x15743c)break;else _0x33bfa0['push'](_0x33bfa0['shift']());}catch(_0x16cf01){_0x33bfa0['push'](_0x33bfa0['shift']());}}}(a48_0x4032,0x8622a));function a48_0x15d0(_0x3b3dde,_0x331feb){var _0x403231=a48_0x4032();return a48_0x15d0=function(_0x15d04b,_0x5127c8){_0x15d04b=_0x15d04b-0x130;var _0x4859e6=_0x403231[_0x15d04b];return _0x4859e6;},a48_0x15d0(_0x3b3dde,_0x331feb);}import{jsx as a48_0x33de45,jsxs as a48_0xd57e78}from'react/jsx-runtime';import{Box,Text}from'ink';export function Help(){var _0x21b4fd=a48_0x15d0;return a48_0xd57e78(Box,{'flexDirection':_0x21b4fd(0x132),'marginTop':0x1,'marginBottom':0x1,'children':[a48_0xd57e78(Box,{'children':[a48_0x33de45(Box,{'width':'1'}),a48_0x33de45(Text,{'children':_0x21b4fd(0x13b)})]}),a48_0xd57e78(Box,{'marginTop':0x1,'children':[a48_0x33de45(Box,{'width':'1'}),a48_0xd57e78(Text,{'children':['\x20\x20','使用']}),a48_0xd57e78(Text,{'bold':!![],'color':_0x21b4fd(0x139),'children':['\x20',_0x21b4fd(0x138),'\x20']}),a48_0x33de45(Text,{'children':'查看可用命令。'})]})]});}
package/lib/init/main.js CHANGED
@@ -1 +1 @@
1
- (function(_0x3c5a95,_0x4aec1b){const _0x1bf6df=a49_0x43a4,_0x41fd24=_0x3c5a95();while(!![]){try{const _0x205a9f=parseInt(_0x1bf6df(0x11c))/0x1*(-parseInt(_0x1bf6df(0x101))/0x2)+parseInt(_0x1bf6df(0xf9))/0x3+parseInt(_0x1bf6df(0xf3))/0x4*(-parseInt(_0x1bf6df(0xfa))/0x5)+parseInt(_0x1bf6df(0x114))/0x6*(parseInt(_0x1bf6df(0xf2))/0x7)+-parseInt(_0x1bf6df(0xec))/0x8+-parseInt(_0x1bf6df(0x100))/0x9*(-parseInt(_0x1bf6df(0x113))/0xa)+parseInt(_0x1bf6df(0x11b))/0xb;if(_0x205a9f===_0x4aec1b)break;else _0x41fd24['push'](_0x41fd24['shift']());}catch(_0x2003ea){_0x41fd24['push'](_0x41fd24['shift']());}}}(a49_0xb5e8,0xb02b4));import{jsxs as a49_0x2b5ea5,jsx as a49_0xab992}from'react/jsx-runtime';function a49_0x43a4(_0x1c54f1,_0x3c7401){const _0xb5e873=a49_0xb5e8();return a49_0x43a4=function(_0x43a44f,_0x2b1b45){_0x43a44f=_0x43a44f-0xea;let _0x54a573=_0xb5e873[_0x43a44f];return _0x54a573;},a49_0x43a4(_0x1c54f1,_0x3c7401);}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';function a49_0xb5e8(){const _0x24a224=['utf8','应用代码只能包含字母、数字、-\x20和\x20_','setLogPath','1314006oflDcm','5eYKBVi','toLocaleString','1.0.0','slice','length','green','405UvXIVa','1996hjdfoj','创建配置文件失败','message','应用代码不能为空','cyan','version','../..','.lovrabetrc','return','string','gray','exit','✓\x20成功在当前目录初始化\x20.lovrabetrc\x20文件','\x20←\x20','AppCode:\x20','stringify','正在初始化配置文件...','red','245510CZqUBp','702cbXmQF','init','env','请输入应用代码\x20(AppCode):\x20','应用代码不合法','初始化项目配置文件成功','test','16490606fjxMUl','1097bjYBPY','cwd','trim','5690416wwZiDa','现在您可以使用\x20lovrabet\x20api\x20doc\x20和\x20lovrabet\x20api\x20pull\x20等命令了','column','online','url','error','9709zrzLis','2706104iEtVDa','创建配置文件失败:\x20','应用代码长度不能超过\x20100\x20个字符'];a49_0xb5e8=function(){return _0x24a224;};return a49_0xb5e8();}import{readConfig}from'../utils/config.js';export function Init({appcode:_0x46bf6d,env:_0x577454}){const _0x3322b6=a49_0x43a4,[_0x3ea506,_0x1aef1e]=useState(null),[_0x488d78,_0x50cd4d]=useState(![]),[_0x319234,_0x29cc75]=useState(!_0x46bf6d),[_0x1228e1,_0x574ed7]=useState(''),[_0x1e36c8,_0x1a1b6a]=useState(''),[_0x45cc42,_0x3e0432]=useState(_0x46bf6d||''),[_0x1d7a1e]=useState(_0x577454);function _0x9a9fff(_0x64b7cc){const _0x33918d=a49_0x43a4;if(_0x64b7cc['length']===0x0)return{'valid':![],'message':''};if(_0x64b7cc[_0x33918d(0xfe)]>0x64)return{'valid':![],'message':_0x33918d(0xf5)};const _0x33bfb1=/^[A-Za-z0-9_-]+$/;if(!_0x33bfb1[_0x33918d(0x11a)](_0x64b7cc))return{'valid':![],'message':_0x33918d(0xf7)};return{'valid':!![]};}useInput((_0xe0aa0b,_0x2f8f18)=>{const _0x1e6a21=a49_0x43a4;if(!_0x319234)return;if(_0x2f8f18[_0x1e6a21(0x109)]){if(_0x1e36c8||!_0x1228e1['trim']()){_0x1a1b6a(_0x1e6a21(0x104));return;}const _0x3e93ac=_0x1228e1[_0x1e6a21(0xeb)](),{valid:_0x48bed6,message:_0xe60878}=_0x9a9fff(_0x3e93ac);if(!_0x48bed6){_0x1a1b6a(_0xe60878||_0x1e6a21(0x118));return;}_0x3e0432(_0x3e93ac),_0x29cc75(![]);}else{if(_0x2f8f18['backspace']||_0x2f8f18['delete'])_0x574ed7(_0x3aad10=>{const _0x1e43c2=_0x1e6a21,_0x2f4abf=_0x3aad10[_0x1e43c2(0xfd)](0x0,-0x1);if(_0x2f4abf[_0x1e43c2(0xfe)]===0x0)_0x1a1b6a('');else{const {valid:_0x1a30c1,message:_0x54a621}=_0x9a9fff(_0x2f4abf);_0x1a1b6a(_0x1a30c1?'':_0x54a621||_0x1e43c2(0x118));}return _0x2f4abf;});else _0x2f8f18['ctrl']&&_0xe0aa0b==='c'?process[_0x1e6a21(0x10c)](0x0):_0x574ed7(_0x26e92b=>{const _0x1a93bf=_0x1e6a21,_0x5467e7=_0x26e92b+_0xe0aa0b,{valid:_0x560fe2,message:_0x3af56d}=_0x9a9fff(_0x5467e7);return _0x1a1b6a(_0x560fe2?'':_0x3af56d||_0x1a93bf(0x118)),_0x5467e7;});}},{'isActive':_0x319234}),useEffect(()=>{const _0x1ba65a=a49_0x43a4;if(!_0x45cc42||_0x319234)return;const _0xcb6170=resolve(process[_0x1ba65a(0xea)](),_0x1ba65a(0x108));if(existsSync(_0xcb6170)){_0x1aef1e('当前目录已存在\x20.lovrabetrc\x20文件'),setTimeout(()=>process[_0x1ba65a(0x10c)](0x1),0x64);return;}try{const _0x7e144a=fileURLToPath(import.meta[_0x1ba65a(0xf0)]),_0x356ed0=resolve(dirname(_0x7e144a),_0x1ba65a(0x107)),_0x81ea1=join(_0x356ed0,'package.json');let _0x5a63bf=_0x1ba65a(0xfc);try{const _0x27a19d=JSON['parse'](readFileSync(_0x81ea1,'utf8'));_0x5a63bf=_0x27a19d['version']||_0x1ba65a(0xfc);}catch(_0xe2588){}const _0x2bbe0b=readConfig(),_0x2db779=typeof _0x2bbe0b['env']===_0x1ba65a(0x10a)?_0x2bbe0b[_0x1ba65a(0x116)]:undefined,{app:_0x2c6e76,appcode:_0x6d517d,..._0x821a92}=_0x2bbe0b,_0x1eb73c={..._0x821a92,'appcode':_0x45cc42,'env':_0x1d7a1e||_0x2db779||_0x1ba65a(0xef),'createdAt':new Date()[_0x1ba65a(0xfb)](),'version':_0x5a63bf};writeFileSync(_0xcb6170,JSON[_0x1ba65a(0x110)](_0x1eb73c,null,0x2),{'encoding':_0x1ba65a(0xf6),'mode':0x180}),logger[_0x1ba65a(0xf8)](process[_0x1ba65a(0xea)]()),logger['info'](_0x1ba65a(0x115),_0x1ba65a(0x119),{'appcode':_0x45cc42,'env':_0x1eb73c[_0x1ba65a(0x116)],'version':_0x1eb73c[_0x1ba65a(0x106)],'configPath':_0xcb6170}),_0x50cd4d(!![]),setTimeout(()=>process['exit'](0x0),0x64);}catch(_0x33e0cc){logger[_0x1ba65a(0xf1)](_0x1ba65a(0x115),_0x1ba65a(0x102),{'error':_0x33e0cc instanceof Error?_0x33e0cc[_0x1ba65a(0x103)]:String(_0x33e0cc)}),_0x1aef1e(_0x1ba65a(0xf4)+(_0x33e0cc instanceof Error?_0x33e0cc[_0x1ba65a(0x103)]:String(_0x33e0cc))),setTimeout(()=>process[_0x1ba65a(0x10c)](0x1),0x64);}},[_0x45cc42,_0x319234,_0x1d7a1e]);if(_0x3ea506)return a49_0xab992(Box,{'flexDirection':_0x3322b6(0xee),'children':a49_0x2b5ea5(Text,{'color':_0x3322b6(0x112),'children':['✗\x20',_0x3ea506]})});if(_0x319234)return a49_0x2b5ea5(Box,{'flexDirection':'column','children':[a49_0x2b5ea5(Box,{'children':[a49_0xab992(Text,{'color':_0x3322b6(0x105),'children':_0x3322b6(0x117)}),_0x1228e1?a49_0xab992(Text,{'color':_0x3322b6(0xff),'children':_0x1228e1}):a49_0xab992(Text,{'color':_0x3322b6(0x10b),'children':'_'}),_0x1e36c8&&a49_0x2b5ea5(Text,{'color':_0x3322b6(0x112),'children':[_0x3322b6(0x10e),_0x1e36c8]})]}),!_0x1e36c8&&!_0x1228e1&&a49_0xab992(Box,{'children':a49_0xab992(Text,{'color':_0x3322b6(0x10b),'children':'应用代码用于标识您的项目,只能包含字母、数字、-\x20和\x20_'})})]});if(_0x488d78)return a49_0x2b5ea5(Box,{'flexDirection':_0x3322b6(0xee),'children':[a49_0xab992(Text,{'color':_0x3322b6(0xff),'children':_0x3322b6(0x10d)}),a49_0x2b5ea5(Text,{'color':'cyan','children':[_0x3322b6(0x10f),_0x45cc42]}),a49_0xab992(Text,{'children':_0x3322b6(0xed)})]});return a49_0xab992(Box,{'children':a49_0xab992(Text,{'children':_0x3322b6(0x111)})});}
1
+ (function(_0x109e9a,_0x219a7f){const _0x37ebea=a49_0x2d15,_0x4bc9f4=_0x109e9a();while(!![]){try{const _0x510fc9=parseInt(_0x37ebea(0x1cd))/0x1*(-parseInt(_0x37ebea(0x1c6))/0x2)+parseInt(_0x37ebea(0x1bc))/0x3+parseInt(_0x37ebea(0x1ba))/0x4*(-parseInt(_0x37ebea(0x1b8))/0x5)+parseInt(_0x37ebea(0x1a9))/0x6+parseInt(_0x37ebea(0x1bf))/0x7+-parseInt(_0x37ebea(0x1a4))/0x8+-parseInt(_0x37ebea(0x1a6))/0x9*(-parseInt(_0x37ebea(0x1ab))/0xa);if(_0x510fc9===_0x219a7f)break;else _0x4bc9f4['push'](_0x4bc9f4['shift']());}catch(_0x1fd7ee){_0x4bc9f4['push'](_0x4bc9f4['shift']());}}}(a49_0x5a48,0x39beb));import{jsxs as a49_0x5ed453,jsx as a49_0x44aeb5}from'react/jsx-runtime';import{useState,useEffect}from'react';import{Box,Text,useInput}from'ink';import{existsSync,writeFileSync,readFileSync}from'node:fs';function a49_0x2d15(_0x4dcea1,_0x18181c){const _0x5a4877=a49_0x5a48();return a49_0x2d15=function(_0x2d151b,_0x12ecbd){_0x2d151b=_0x2d151b-0x19f;let _0x58ed7f=_0x5a4877[_0x2d151b];return _0x58ed7f;},a49_0x2d15(_0x4dcea1,_0x18181c);}import{resolve,join,dirname}from'node:path';function a49_0x5a48(){const _0x9faf67=['trim','utf8','toLocaleString','column','正在初始化配置文件...','message','应用代码只能包含字母、数字、-\x20和\x20_','cwd','.lovrabetrc','return','../..','init','15SWoHPa','1.0.0','556164lWVyPn','parse','76296McYcKK','green','test','2713648lKQmKW','length','env','AppCode:\x20','✓\x20成功在当前目录初始化\x20.lovrabetrc\x20文件','\x20←\x20','应用代码不能为空','126878MhRUAn','gray','ctrl','red','请输入应用代码\x20(AppCode):\x20','cyan','应用代码不合法','5TzWlns','version','当前目录已存在\x20.lovrabetrc\x20文件','delete','exit','url','199704ENkaiw','应用代码长度不能超过\x20100\x20个字符','320391mQKesS','应用代码用于标识您的项目,只能包含字母、数字、-\x20和\x20_','string','2641872GPNCZz','创建配置文件失败','40RiNsbm'];a49_0x5a48=function(){return _0x9faf67;};return a49_0x5a48();}import{fileURLToPath}from'node:url';import{logger}from'../utils/logger.js';import{readConfig}from'../utils/config.js';export function Init({appcode:_0x3eca48,env:_0x193c78}){const _0x34d3a9=a49_0x2d15,[_0x20d9da,_0x39cd2]=useState(null),[_0x3c9785,_0x5dbc2a]=useState(![]),[_0x5770e2,_0xffd527]=useState(!_0x3eca48),[_0x3124b6,_0x107987]=useState(''),[_0xb0908b,_0x4daa3b]=useState(''),[_0x1a5684,_0xd10440]=useState(_0x3eca48||''),[_0x247cd8]=useState(_0x193c78);function _0x4a5c50(_0x4d38fd){const _0x160ecb=a49_0x2d15;if(_0x4d38fd[_0x160ecb(0x1c0)]===0x0)return{'valid':![],'message':''};if(_0x4d38fd[_0x160ecb(0x1c0)]>0x64)return{'valid':![],'message':_0x160ecb(0x1a5)};const _0x4be6b4=/^[A-Za-z0-9_-]+$/;if(!_0x4be6b4[_0x160ecb(0x1be)](_0x4d38fd))return{'valid':![],'message':_0x160ecb(0x1b2)};return{'valid':!![]};}useInput((_0x58222f,_0x53ea4f)=>{const _0xe1c6d7=a49_0x2d15;if(!_0x5770e2)return;if(_0x53ea4f[_0xe1c6d7(0x1b5)]){if(_0xb0908b||!_0x3124b6[_0xe1c6d7(0x1ac)]()){_0x4daa3b(_0xe1c6d7(0x1c5));return;}const _0xbd61ba=_0x3124b6['trim'](),{valid:_0x1e9c3f,message:_0x4f0977}=_0x4a5c50(_0xbd61ba);if(!_0x1e9c3f){_0x4daa3b(_0x4f0977||_0xe1c6d7(0x1cc));return;}_0xd10440(_0xbd61ba),_0xffd527(![]);}else{if(_0x53ea4f['backspace']||_0x53ea4f[_0xe1c6d7(0x1a1)])_0x107987(_0x4f20d7=>{const _0x37ba2d=_0xe1c6d7,_0x24a65a=_0x4f20d7['slice'](0x0,-0x1);if(_0x24a65a[_0x37ba2d(0x1c0)]===0x0)_0x4daa3b('');else{const {valid:_0x3238ac,message:_0xfb477f}=_0x4a5c50(_0x24a65a);_0x4daa3b(_0x3238ac?'':_0xfb477f||_0x37ba2d(0x1cc));}return _0x24a65a;});else _0x53ea4f[_0xe1c6d7(0x1c8)]&&_0x58222f==='c'?process['exit'](0x0):_0x107987(_0x16356a=>{const _0x589ff2=_0xe1c6d7,_0x25dbe3=_0x16356a+_0x58222f,{valid:_0x3fdec4,message:_0x4491eb}=_0x4a5c50(_0x25dbe3);return _0x4daa3b(_0x3fdec4?'':_0x4491eb||_0x589ff2(0x1cc)),_0x25dbe3;});}},{'isActive':_0x5770e2}),useEffect(()=>{const _0x5db40d=a49_0x2d15;if(!_0x1a5684||_0x5770e2)return;const _0x26d8ed=resolve(process[_0x5db40d(0x1b3)](),_0x5db40d(0x1b4));if(existsSync(_0x26d8ed)){_0x39cd2(_0x5db40d(0x1a0)),setTimeout(()=>process[_0x5db40d(0x1a2)](0x1),0x64);return;}try{const _0xf6e752=fileURLToPath(import.meta[_0x5db40d(0x1a3)]),_0xf41a17=resolve(dirname(_0xf6e752),_0x5db40d(0x1b6)),_0x167e7f=join(_0xf41a17,'package.json');let _0x5b12b7=_0x5db40d(0x1b9);try{const _0x4a7803=JSON[_0x5db40d(0x1bb)](readFileSync(_0x167e7f,'utf8'));_0x5b12b7=_0x4a7803[_0x5db40d(0x19f)]||'1.0.0';}catch(_0x43aa23){}const _0x1cd17e=readConfig(),_0x5ea81c=typeof _0x1cd17e['env']===_0x5db40d(0x1a8)?_0x1cd17e[_0x5db40d(0x1c1)]:undefined,{app:_0x536806,appcode:_0x170e13,..._0x330ff8}=_0x1cd17e,_0x1c772d={..._0x330ff8,'appcode':_0x1a5684,'env':_0x247cd8||_0x5ea81c||'online','createdAt':new Date()[_0x5db40d(0x1ae)](),'version':_0x5b12b7};writeFileSync(_0x26d8ed,JSON['stringify'](_0x1c772d,null,0x2),{'encoding':_0x5db40d(0x1ad),'mode':0x180}),logger['setLogPath'](process[_0x5db40d(0x1b3)]()),logger['info'](_0x5db40d(0x1b7),'初始化项目配置文件成功',{'appcode':_0x1a5684,'env':_0x1c772d[_0x5db40d(0x1c1)],'version':_0x1c772d['version'],'configPath':_0x26d8ed}),_0x5dbc2a(!![]),setTimeout(()=>process[_0x5db40d(0x1a2)](0x0),0x64);}catch(_0x2e8023){logger['error'](_0x5db40d(0x1b7),_0x5db40d(0x1aa),{'error':_0x2e8023 instanceof Error?_0x2e8023[_0x5db40d(0x1b1)]:String(_0x2e8023)}),_0x39cd2('创建配置文件失败:\x20'+(_0x2e8023 instanceof Error?_0x2e8023[_0x5db40d(0x1b1)]:String(_0x2e8023))),setTimeout(()=>process[_0x5db40d(0x1a2)](0x1),0x64);}},[_0x1a5684,_0x5770e2,_0x247cd8]);if(_0x20d9da)return a49_0x44aeb5(Box,{'flexDirection':'column','children':a49_0x5ed453(Text,{'color':_0x34d3a9(0x1c9),'children':['✗\x20',_0x20d9da]})});if(_0x5770e2)return a49_0x5ed453(Box,{'flexDirection':'column','children':[a49_0x5ed453(Box,{'children':[a49_0x44aeb5(Text,{'color':_0x34d3a9(0x1cb),'children':_0x34d3a9(0x1ca)}),_0x3124b6?a49_0x44aeb5(Text,{'color':_0x34d3a9(0x1bd),'children':_0x3124b6}):a49_0x44aeb5(Text,{'color':_0x34d3a9(0x1c7),'children':'_'}),_0xb0908b&&a49_0x5ed453(Text,{'color':_0x34d3a9(0x1c9),'children':[_0x34d3a9(0x1c4),_0xb0908b]})]}),!_0xb0908b&&!_0x3124b6&&a49_0x44aeb5(Box,{'children':a49_0x44aeb5(Text,{'color':'gray','children':_0x34d3a9(0x1a7)})})]});if(_0x3c9785)return a49_0x5ed453(Box,{'flexDirection':_0x34d3a9(0x1af),'children':[a49_0x44aeb5(Text,{'color':_0x34d3a9(0x1bd),'children':_0x34d3a9(0x1c3)}),a49_0x5ed453(Text,{'color':_0x34d3a9(0x1cb),'children':[_0x34d3a9(0x1c2),_0x1a5684]}),a49_0x44aeb5(Text,{'children':'现在您可以使用\x20lovrabet\x20api\x20doc\x20和\x20lovrabet\x20api\x20pull\x20等命令了'})]});return a49_0x44aeb5(Box,{'children':a49_0x44aeb5(Text,{'children':_0x34d3a9(0x1b0)})});}