@lovrabet/cli 1.1.8 → 1.1.10

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 (50) hide show
  1. package/README.md +51 -0
  2. package/lib/add-page/input-page-router.js +1 -1
  3. package/lib/add-page/main.js +1 -1
  4. package/lib/add-page/select-page-template.js +1 -1
  5. package/lib/api/api-doc-ui.js +1 -0
  6. package/lib/api/api-doc.js +1 -0
  7. package/lib/api/api-pull-ui.js +1 -1
  8. package/lib/api/fetch-datasets.js +1 -0
  9. package/lib/api/format-dataset.js +1 -1
  10. package/lib/api/generate-api-file.js +1 -1
  11. package/lib/api/main.js +1 -1
  12. package/lib/api/pull-silent.js +1 -1
  13. package/lib/api/pull.js +1 -1
  14. package/lib/auth/auth-server-ui.js +1 -1
  15. package/lib/auth/auth-server.js +1 -1
  16. package/lib/auth/constant.js +1 -1
  17. package/lib/auth/get-cookie.js +1 -1
  18. package/lib/auth/is-session-valid.js +1 -1
  19. package/lib/auth/logout.js +1 -1
  20. package/lib/cli.js +1 -1
  21. package/lib/cmd/build-watch.js +1 -1
  22. package/lib/cmd/build.js +1 -1
  23. package/lib/cmd/logs.js +1 -1
  24. package/lib/cmd/preview.js +1 -1
  25. package/lib/cmd/start.js +1 -1
  26. package/lib/config/config-help.js +1 -1
  27. package/lib/config/main.js +1 -1
  28. package/lib/constant/domain.js +1 -1
  29. package/lib/constant/env.js +1 -1
  30. package/lib/create-app/enhanced-guided-create.js +1 -1
  31. package/lib/create-app/format-elapsed.js +1 -1
  32. package/lib/create-app/main.js +1 -1
  33. package/lib/create-app/task-finished.js +1 -1
  34. package/lib/create-app/task-loading.js +1 -1
  35. package/lib/create-app/task-running.js +1 -1
  36. package/lib/create-app/task-time.js +1 -1
  37. package/lib/create-app/use-copy-project-template.js +1 -1
  38. package/lib/create-app/use-format-code.js +1 -1
  39. package/lib/create-app/use-install-dependencies.js +1 -1
  40. package/lib/help.js +1 -1
  41. package/lib/utils/config.js +1 -1
  42. package/lib/utils/copy-directory.js +1 -1
  43. package/lib/utils/http-client.js +1 -1
  44. package/lib/utils/logger.js +1 -1
  45. package/lib/utils/router-updater.js +1 -1
  46. package/lib/utils/template-replacer.js +1 -1
  47. package/package.json +1 -1
  48. package/templates/pages/sdk-fetch/index.tsx.tpl +41 -52
  49. package/templates/projects/sub-app-react-demo/package-lock.json +4 -4
  50. package/templates/projects/sub-app-react-demo/package.json +1 -1
@@ -1 +1 @@
1
- const a11_0x3aa726=a11_0x3ce3;(function(_0xf1ff00,_0x67df87){const _0x1e6048=a11_0x3ce3,_0x1d78ec=_0xf1ff00();while(!![]){try{const _0x5dc247=parseInt(_0x1e6048(0x175))/0x1*(parseInt(_0x1e6048(0x17d))/0x2)+parseInt(_0x1e6048(0x159))/0x3*(parseInt(_0x1e6048(0x161))/0x4)+-parseInt(_0x1e6048(0x166))/0x5*(parseInt(_0x1e6048(0x167))/0x6)+parseInt(_0x1e6048(0x16a))/0x7*(-parseInt(_0x1e6048(0x172))/0x8)+parseInt(_0x1e6048(0x158))/0x9+-parseInt(_0x1e6048(0x156))/0xa+parseInt(_0x1e6048(0x169))/0xb*(parseInt(_0x1e6048(0x157))/0xc);if(_0x5dc247===_0x67df87)break;else _0x1d78ec['push'](_0x1d78ec['shift']());}catch(_0x4aa6c2){_0x1d78ec['push'](_0x1d78ec['shift']());}}}(a11_0x2413,0xa15b0));import{writeFileSync}from'node:fs';import a11_0x7be3f6 from'node:https';import{getUserDomain}from'../constant/domain.js';import{exec}from'node:child_process';import{getIsSessionValid}from'./is-session-valid.js';import{cookieFile}from'./constant.js';function a11_0x2413(){const _0x5e2cd6=['user','createServer','darwin','112acIljF','🌐\x20正在尝试自动打开浏览器...','platform','54218bVWvrP','close','win32','⚠️\x20\x20无法自动打开浏览器','isAuth','log','silent','utf-8','22jBVMpx','error','then','/sign-in?redirect=','📍\x20登录地址:','💡\x20如果浏览器没有自动打开,请手动复制上面的登录地址到浏览器中打开','headers','<!doctype\x20html>\x0a<html>\x0a<head><meta\x20charset=\x22utf-8\x22><title>登录成功</title></head>\x0a<body>\x0a\x20\x20<div>登录成功,请返回命令行继续操作。当前窗口将在\x20<span\x20id=\x22t\x22>5</span>\x20秒内关闭。</div>\x0a\x20\x20<div\x20id=\x22manualMsg\x22\x20style=\x22display:none;margin-top:10px;color:#d00;\x22>无法自动关闭窗口,请手动关闭此标签页或窗口。</div>\x0a\x20\x20<script>\x0a\x20\x20(function(){\x0a\x20\x20\x20\x20var\x20t\x20=\x205;\x0a\x20\x20\x20\x20var\x20el\x20=\x20document.getElementById(\x27t\x27);\x0a\x20\x20\x20\x20var\x20manual\x20=\x20document.getElementById(\x27manualMsg\x27);\x0a\x20\x20\x20\x20var\x20id\x20=\x20setInterval(function(){\x0a\x20\x20\x20\x20\x20\x20t--;\x0a\x20\x20\x20\x20\x20\x20if\x20(t\x20<=\x200)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20clearInterval(id);\x0a\x20\x20\x20\x20\x20\x20\x20\x20el.textContent\x20=\x20\x270\x27;\x0a\x20\x20\x20\x20\x20\x20\x20\x20try\x20{\x20window.close();\x20}\x20catch(e)\x20{}\x0a\x20\x20\x20\x20\x20\x20\x20\x20//\x20如果自动关闭无效,显示文本提示让用户手动关闭\x0a\x20\x20\x20\x20\x20\x20\x20\x20setTimeout(function(){\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20if\x20(!window.closed)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20manual.style.display\x20=\x20\x27block\x27;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20},\x20300);\x0a\x20\x20\x20\x20\x20\x20}\x20else\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20el.textContent\x20=\x20String(t);\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20},\x201000);\x0a\x20\x20})();\x0a\x20\x20</script>\x0a</body>\x0a</html>','Auth\x20server\x20error:','12476470uzASAP','12tsHFHx','6291324DoSPGX','135CFLoUd','writeHead','🔗\x20请手动复制登录地址到浏览器:','json','port','session','catch','127.0.0.1','110776Mqdkne','end','https://dev.lovrabet.com:','🔐\x20正在启动登录服务...','/api/auth/get-session','5cuCYRy','6481380dvtnRk','address','12467609ozSTqZ','343147gyeyWF','main','open\x20\x22','start\x20\x22\x22\x20\x22','text/html;\x20charset=utf-8'];a11_0x2413=function(){return _0x5e2cd6;};return a11_0x2413();}export async function authServer(_0x371172){const _0x4042ac=a11_0x3ce3,_0x3b6c5d=_0x371172?.[_0x4042ac(0x17b)]||![];if(await getIsSessionValid())return!![];const _0x1b48fb=await(await fetch('https://g.yuntooai.com/cert/lovrabet-dev.json'))[_0x4042ac(0x15c)]();return new Promise(async(_0x4d6970,_0x484ede)=>{const _0xa80187=_0x4042ac;let _0x58f1cf=0x0;const _0x595067=a11_0x7be3f6[_0xa80187(0x170)](_0x1b48fb,async(_0x377556,_0x1c3616)=>{const _0x3eb66c=_0xa80187,_0xddc4d7=getUserDomain(),_0x36ea12=_0x377556[_0x3eb66c(0x153)]['cookie']||'',_0x2ca7e2=await fetch(_0xddc4d7+_0x3eb66c(0x165),{'headers':{'cookie':_0x36ea12}})[_0x3eb66c(0x17f)](_0x3248c6=>_0x3248c6[_0x3eb66c(0x15c)]()),_0x50ef67=_0x2ca7e2&&_0x2ca7e2[_0x3eb66c(0x15e)]&&_0x2ca7e2[_0x3eb66c(0x16f)];if(_0x50ef67){writeFileSync(cookieFile,_0x36ea12,_0x3eb66c(0x17c)),_0x4d6970(!![]);const _0x5bc7d5=_0x3eb66c(0x154);_0x1c3616[_0x3eb66c(0x15a)](0xc8,{'Content-Type':_0x3eb66c(0x16e)}),_0x1c3616[_0x3eb66c(0x162)](_0x5bc7d5),_0x595067[_0x3eb66c(0x176)]();}else{const _0x4aec96=''+encodeURIComponent(_0x3eb66c(0x163)+_0x58f1cf);_0x1c3616[_0x3eb66c(0x15a)](0x12e,{'location':_0xddc4d7+_0x3eb66c(0x180)+_0x4aec96}),_0x1c3616[_0x3eb66c(0x162)]();return;}});_0x595067['listen'](0x0,_0xa80187(0x160),()=>{const _0xc5d7ec=_0xa80187,_0x132d7c=_0x595067[_0xc5d7ec(0x168)]();_0x58f1cf=typeof _0x132d7c==='object'&&_0x132d7c?_0x132d7c[_0xc5d7ec(0x15d)]:Number(_0x132d7c);const _0x3c9c2b=_0xc5d7ec(0x163)+_0x58f1cf;!_0x3b6c5d&&(console[_0xc5d7ec(0x17a)](_0xc5d7ec(0x164)),console[_0xc5d7ec(0x17a)](_0xc5d7ec(0x181),_0x3c9c2b),console[_0xc5d7ec(0x17a)](_0xc5d7ec(0x173)),console['log'](''),console[_0xc5d7ec(0x17a)](_0xc5d7ec(0x152)),console[_0xc5d7ec(0x17a)]('')),openInBrowser(_0x3c9c2b)[_0xc5d7ec(0x17f)](_0x1b5b66=>{const _0x32c60d=_0xc5d7ec;!_0x3b6c5d&&(_0x1b5b66?console['log']('✅\x20浏览器已自动打开,请在浏览器中完成登录'):(console[_0x32c60d(0x17a)](_0x32c60d(0x178)),console[_0x32c60d(0x17a)](_0x32c60d(0x15b),_0x3c9c2b)),console['log'](''));})[_0xc5d7ec(0x15f)](()=>{const _0x19f634=_0xc5d7ec;!_0x3b6c5d&&(console[_0x19f634(0x17a)](_0x19f634(0x178)),console['log'](_0x19f634(0x15b),_0x3c9c2b),console[_0x19f634(0x17a)](''));});}),_0x595067['on'](_0xa80187(0x17e),_0x546ee4=>{const _0x488db5=_0xa80187;!_0x3b6c5d&&console[_0x488db5(0x17e)](_0x488db5(0x155),_0x546ee4),_0x484ede(_0x546ee4);});});}function openInBrowser(_0x49474f){return new Promise(_0x218428=>{const _0x1c81d5=a11_0x3ce3,_0x12d3b1=process[_0x1c81d5(0x174)];let _0x22b508;if(_0x12d3b1===_0x1c81d5(0x177))_0x22b508=_0x1c81d5(0x16d)+_0x49474f+'\x22';else _0x12d3b1===_0x1c81d5(0x171)?_0x22b508=_0x1c81d5(0x16c)+_0x49474f+'\x22':_0x22b508='xdg-open\x20\x22'+_0x49474f+'\x22';exec(_0x22b508,_0x476cb5=>{_0x476cb5?_0x218428(![]):_0x218428(!![]);});});}function a11_0x3ce3(_0x5d99a3,_0x4bf308){const _0x2413ce=a11_0x2413();return a11_0x3ce3=function(_0x3ce34f,_0x4d0e4b){_0x3ce34f=_0x3ce34f-0x152;let _0x1959ba=_0x2413ce[_0x3ce34f];return _0x1959ba;},a11_0x3ce3(_0x5d99a3,_0x4bf308);}if(import.meta[a11_0x3aa726(0x16b)]){const isAuth=await authServer();console['log'](a11_0x3aa726(0x179),isAuth);}
1
+ const a14_0x2e15d1=a14_0x467b;(function(_0x1466f7,_0x1d97c6){const _0x290eef=a14_0x467b,_0x33036e=_0x1466f7();while(!![]){try{const _0x4b0e40=-parseInt(_0x290eef(0xd1))/0x1*(parseInt(_0x290eef(0xd2))/0x2)+parseInt(_0x290eef(0xce))/0x3+-parseInt(_0x290eef(0xc1))/0x4*(parseInt(_0x290eef(0xc0))/0x5)+-parseInt(_0x290eef(0xb6))/0x6+parseInt(_0x290eef(0xb7))/0x7+parseInt(_0x290eef(0xca))/0x8*(-parseInt(_0x290eef(0xd3))/0x9)+-parseInt(_0x290eef(0xd9))/0xa*(-parseInt(_0x290eef(0xda))/0xb);if(_0x4b0e40===_0x1d97c6)break;else _0x33036e['push'](_0x33036e['shift']());}catch(_0x205f53){_0x33036e['push'](_0x33036e['shift']());}}}(a14_0x554f,0xf0e43));function a14_0x554f(){const _0x25a8b1=['8991000gCEIKN','182133WlnUTK','🔗\x20请手动复制登录地址到浏览器:','📍\x20登录地址:','writeHead','darwin','🔐\x20正在启动登录服务...','silent','utf-8','cookie','50hSYVRe','282428rAXkOH','<!doctype\x20html>\x0a<html>\x0a<head><meta\x20charset=\x22utf-8\x22><title>登录成功</title></head>\x0a<body>\x0a\x20\x20<div>登录成功,请返回命令行继续操作。当前窗口将在\x20<span\x20id=\x22t\x22>5</span>\x20秒内关闭。</div>\x0a\x20\x20<div\x20id=\x22manualMsg\x22\x20style=\x22display:none;margin-top:10px;color:#d00;\x22>无法自动关闭窗口,请手动关闭此标签页或窗口。</div>\x0a\x20\x20<script>\x0a\x20\x20(function(){\x0a\x20\x20\x20\x20var\x20t\x20=\x205;\x0a\x20\x20\x20\x20var\x20el\x20=\x20document.getElementById(\x27t\x27);\x0a\x20\x20\x20\x20var\x20manual\x20=\x20document.getElementById(\x27manualMsg\x27);\x0a\x20\x20\x20\x20var\x20id\x20=\x20setInterval(function(){\x0a\x20\x20\x20\x20\x20\x20t--;\x0a\x20\x20\x20\x20\x20\x20if\x20(t\x20<=\x200)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20clearInterval(id);\x0a\x20\x20\x20\x20\x20\x20\x20\x20el.textContent\x20=\x20\x270\x27;\x0a\x20\x20\x20\x20\x20\x20\x20\x20try\x20{\x20window.close();\x20}\x20catch(e)\x20{}\x0a\x20\x20\x20\x20\x20\x20\x20\x20//\x20如果自动关闭无效,显示文本提示让用户手动关闭\x0a\x20\x20\x20\x20\x20\x20\x20\x20setTimeout(function(){\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20if\x20(!window.closed)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20manual.style.display\x20=\x20\x27block\x27;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20},\x20300);\x0a\x20\x20\x20\x20\x20\x20}\x20else\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20el.textContent\x20=\x20String(t);\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20},\x201000);\x0a\x20\x20})();\x0a\x20\x20</script>\x0a</body>\x0a</html>','127.0.0.1','Auth\x20server\x20error:','json','main','then','user','xdg-open\x20\x22','8MLhipy','win32','end','/sign-in?redirect=','3313008QSfPcM','https://dev.lovrabet.com:','⚠️\x20\x20无法自动打开浏览器','8ftbtiF','130892yUjSRb','3016863gjNUWK','object','✅\x20浏览器已自动打开,请在浏览器中完成登录','catch','text/html;\x20charset=utf-8','platform','90ijQEek','3568499qEJIBN','createServer','💡\x20如果浏览器没有自动打开,请手动复制上面的登录地址到浏览器中打开','🌐\x20正在尝试自动打开浏览器...','log'];a14_0x554f=function(){return _0x25a8b1;};return a14_0x554f();}import{writeFileSync}from'node:fs';import a14_0x1f6a40 from'node:https';import{getUserDomain}from'../constant/domain.js';import{exec}from'node:child_process';import{getIsSessionValid}from'./is-session-valid.js';import{cookieFile}from'./constant.js';function a14_0x467b(_0x191f7c,_0x46e9df){const _0x554fa9=a14_0x554f();return a14_0x467b=function(_0x467b06,_0x4b3bb9){_0x467b06=_0x467b06-0xb6;let _0x1c9695=_0x554fa9[_0x467b06];return _0x1c9695;},a14_0x467b(_0x191f7c,_0x46e9df);}export async function authServer(_0x45da7f){const _0x480ee8=a14_0x467b,_0x32b936=_0x45da7f?.[_0x480ee8(0xbd)]||![];if(await getIsSessionValid())return!![];const _0x3b8f90=await(await fetch('https://g.yuntooai.com/cert/lovrabet-dev.json'))[_0x480ee8(0xc5)]();return new Promise(async(_0x4e4aa7,_0x28e555)=>{const _0x2dc8f2=_0x480ee8;let _0x3f082c=0x0;const _0x1d3300=a14_0x1f6a40[_0x2dc8f2(0xdb)](_0x3b8f90,async(_0x597319,_0x890ba9)=>{const _0x427796=_0x2dc8f2,_0x3ba96c=getUserDomain(),_0x5a6eec=_0x597319['headers'][_0x427796(0xbf)]||'',_0xc83954=await fetch(_0x3ba96c+'/api/auth/get-session',{'headers':{'cookie':_0x5a6eec}})['then'](_0x266db2=>_0x266db2[_0x427796(0xc5)]()),_0x82c3a9=_0xc83954&&_0xc83954['session']&&_0xc83954[_0x427796(0xc8)];if(_0x82c3a9){writeFileSync(cookieFile,_0x5a6eec,_0x427796(0xbe)),_0x4e4aa7(!![]);const _0x30e961=_0x427796(0xc2);_0x890ba9[_0x427796(0xba)](0xc8,{'Content-Type':_0x427796(0xd7)}),_0x890ba9[_0x427796(0xcc)](_0x30e961),_0x1d3300['close']();}else{const _0x1f042e=''+encodeURIComponent('https://dev.lovrabet.com:'+_0x3f082c);_0x890ba9[_0x427796(0xba)](0x12e,{'location':_0x3ba96c+_0x427796(0xcd)+_0x1f042e}),_0x890ba9[_0x427796(0xcc)]();return;}});_0x1d3300['listen'](0x0,_0x2dc8f2(0xc3),()=>{const _0x35daf1=_0x2dc8f2,_0x1ecb9b=_0x1d3300['address']();_0x3f082c=typeof _0x1ecb9b===_0x35daf1(0xd4)&&_0x1ecb9b?_0x1ecb9b['port']:Number(_0x1ecb9b);const _0x22e7a4=_0x35daf1(0xcf)+_0x3f082c;!_0x32b936&&(console['log'](_0x35daf1(0xbc)),console[_0x35daf1(0xde)](_0x35daf1(0xb9),_0x22e7a4),console[_0x35daf1(0xde)](_0x35daf1(0xdd)),console[_0x35daf1(0xde)](''),console[_0x35daf1(0xde)](_0x35daf1(0xdc)),console[_0x35daf1(0xde)]('')),openInBrowser(_0x22e7a4)[_0x35daf1(0xc7)](_0x500858=>{const _0x59ea9d=_0x35daf1;!_0x32b936&&(_0x500858?console[_0x59ea9d(0xde)](_0x59ea9d(0xd5)):(console[_0x59ea9d(0xde)](_0x59ea9d(0xd0)),console[_0x59ea9d(0xde)](_0x59ea9d(0xb8),_0x22e7a4)),console[_0x59ea9d(0xde)](''));})[_0x35daf1(0xd6)](()=>{const _0x653d21=_0x35daf1;!_0x32b936&&(console['log']('⚠️\x20\x20无法自动打开浏览器'),console[_0x653d21(0xde)](_0x653d21(0xb8),_0x22e7a4),console[_0x653d21(0xde)](''));});}),_0x1d3300['on']('error',_0x228a08=>{const _0x1182c9=_0x2dc8f2;!_0x32b936&&console['error'](_0x1182c9(0xc4),_0x228a08),_0x28e555(_0x228a08);});});}function openInBrowser(_0x314dfe){return new Promise(_0x2b7dd2=>{const _0x3d38c2=a14_0x467b,_0x229755=process[_0x3d38c2(0xd8)];let _0x363959;if(_0x229755===_0x3d38c2(0xcb))_0x363959='start\x20\x22\x22\x20\x22'+_0x314dfe+'\x22';else _0x229755===_0x3d38c2(0xbb)?_0x363959='open\x20\x22'+_0x314dfe+'\x22':_0x363959=_0x3d38c2(0xc9)+_0x314dfe+'\x22';exec(_0x363959,_0x35b832=>{_0x35b832?_0x2b7dd2(![]):_0x2b7dd2(!![]);});});}if(import.meta[a14_0x2e15d1(0xc6)]){const isAuth=await authServer();console[a14_0x2e15d1(0xde)]('isAuth',isAuth);}
@@ -1 +1 @@
1
- const a12_0xa729a4=a12_0x6a3a;(function(_0x208c81,_0x3802a4){const _0x19e272=a12_0x6a3a,_0x2a4d85=_0x208c81();while(!![]){try{const _0x498524=parseInt(_0x19e272(0x79))/0x1+parseInt(_0x19e272(0x7c))/0x2*(-parseInt(_0x19e272(0x7d))/0x3)+-parseInt(_0x19e272(0x77))/0x4+-parseInt(_0x19e272(0x7b))/0x5+-parseInt(_0x19e272(0x7a))/0x6*(parseInt(_0x19e272(0x82))/0x7)+parseInt(_0x19e272(0x76))/0x8*(parseInt(_0x19e272(0x80))/0x9)+parseInt(_0x19e272(0x78))/0xa*(parseInt(_0x19e272(0x7e))/0xb);if(_0x498524===_0x3802a4)break;else _0x2a4d85['push'](_0x2a4d85['shift']());}catch(_0x97b6b5){_0x2a4d85['push'](_0x2a4d85['shift']());}}}(a12_0x2ac4,0x7f423));import{mkdirSync}from'node:fs';function a12_0x2ac4(){const _0x4ae466=['40nJSEwa','916932eLzRYT','10CDGGAp','1020727MuVnBE','6990IgtMKI','1059050LTWyYb','2QHxpqL','956082PoIeHG','2415116srQPHP','/cookie','1230813qfeUDQ','/.lovrabet','3864wXGuZE'];a12_0x2ac4=function(){return _0x4ae466;};return a12_0x2ac4();}import{homedir}from'node:os';export const configDir=homedir()+a12_0xa729a4(0x81);export const cookieFile=configDir+a12_0xa729a4(0x7f);function a12_0x6a3a(_0x5a66e8,_0x192cde){const _0x2ac4b4=a12_0x2ac4();return a12_0x6a3a=function(_0x6a3ab4,_0x2b90a8){_0x6a3ab4=_0x6a3ab4-0x76;let _0x1e5790=_0x2ac4b4[_0x6a3ab4];return _0x1e5790;},a12_0x6a3a(_0x5a66e8,_0x192cde);}mkdirSync(configDir,{'recursive':!![]});
1
+ function a15_0x4785(){const _0x272c11=['4954600PQmfLi','913639KFjYcb','2eTMgHZ','78954Vulqoz','7280357VCYcYs','43064955Nsxmkz','5370655EJEjyU','3653334eRsOQl','184nLNKlz'];a15_0x4785=function(){return _0x272c11;};return a15_0x4785();}(function(_0x5cd204,_0x1c68fb){const _0xff8ed9=a15_0x2783,_0x275fd1=_0x5cd204();while(!![]){try{const _0xa731e5=parseInt(_0xff8ed9(0x18c))/0x1*(parseInt(_0xff8ed9(0x18d))/0x2)+parseInt(_0xff8ed9(0x18e))/0x3*(parseInt(_0xff8ed9(0x18a))/0x4)+parseInt(_0xff8ed9(0x188))/0x5+parseInt(_0xff8ed9(0x189))/0x6+parseInt(_0xff8ed9(0x186))/0x7+parseInt(_0xff8ed9(0x18b))/0x8+-parseInt(_0xff8ed9(0x187))/0x9;if(_0xa731e5===_0x1c68fb)break;else _0x275fd1['push'](_0x275fd1['shift']());}catch(_0x24b57e){_0x275fd1['push'](_0x275fd1['shift']());}}}(a15_0x4785,0xa66c4));function a15_0x2783(_0x32b3c8,_0x28aee3){const _0x478560=a15_0x4785();return a15_0x2783=function(_0x2783f7,_0x2935a3){_0x2783f7=_0x2783f7-0x186;let _0x32813a=_0x478560[_0x2783f7];return _0x32813a;},a15_0x2783(_0x32b3c8,_0x28aee3);}import{mkdirSync}from'node:fs';import{homedir}from'node:os';export const configDir=homedir()+'/.lovrabet';export const cookieFile=configDir+'/cookie';mkdirSync(configDir,{'recursive':!![]});
@@ -1 +1 @@
1
- function a13_0x586c(_0x717f12,_0x47f384){var _0x188cd7=a13_0x188c();return a13_0x586c=function(_0x586c0f,_0x3bc4ec){_0x586c0f=_0x586c0f-0xef;var _0x1074f8=_0x188cd7[_0x586c0f];return _0x1074f8;},a13_0x586c(_0x717f12,_0x47f384);}function a13_0x188c(){var _0x49114a=['7EnBXeq','4366395cAaAwC','5451200avzORe','32LFHhnN','587328NedxKR','13150926KlOEnY','145344ixsdGz','6495032Ukhqcp','74683hKpPeg','utf-8'];a13_0x188c=function(){return _0x49114a;};return a13_0x188c();}(function(_0x4904f5,_0x4ebefb){var _0x270c26=a13_0x586c,_0x52f08a=_0x4904f5();while(!![]){try{var _0x344496=parseInt(_0x270c26(0xf5))/0x1+parseInt(_0x270c26(0xf0))/0x2*(parseInt(_0x270c26(0xf3))/0x3)+-parseInt(_0x270c26(0xef))/0x4+-parseInt(_0x270c26(0xf8))/0x5+-parseInt(_0x270c26(0xf1))/0x6+-parseInt(_0x270c26(0xf7))/0x7*(-parseInt(_0x270c26(0xf4))/0x8)+parseInt(_0x270c26(0xf2))/0x9;if(_0x344496===_0x4ebefb)break;else _0x52f08a['push'](_0x52f08a['shift']());}catch(_0x21c78f){_0x52f08a['push'](_0x52f08a['shift']());}}}(a13_0x188c,0xc09f1));import{readFileSync}from'node:fs';import{cookieFile}from'./constant.js';export function getCookie(){var _0x19124e=a13_0x586c;try{return readFileSync(cookieFile,_0x19124e(0xf6));}catch{}return'';}
1
+ function a16_0x4d19(_0x2d56b6,_0x213bc2){var _0x53c345=a16_0x53c3();return a16_0x4d19=function(_0x4d1902,_0x3202ef){_0x4d1902=_0x4d1902-0x1ab;var _0x582b25=_0x53c345[_0x4d1902];return _0x582b25;},a16_0x4d19(_0x2d56b6,_0x213bc2);}(function(_0x3509ee,_0x2162ab){var _0x59d693=a16_0x4d19,_0x216a9d=_0x3509ee();while(!![]){try{var _0x4cb674=-parseInt(_0x59d693(0x1b3))/0x1+parseInt(_0x59d693(0x1ad))/0x2*(-parseInt(_0x59d693(0x1af))/0x3)+parseInt(_0x59d693(0x1ac))/0x4*(parseInt(_0x59d693(0x1b0))/0x5)+-parseInt(_0x59d693(0x1ae))/0x6+parseInt(_0x59d693(0x1b1))/0x7*(-parseInt(_0x59d693(0x1ab))/0x8)+parseInt(_0x59d693(0x1b2))/0x9+parseInt(_0x59d693(0x1b4))/0xa;if(_0x4cb674===_0x2162ab)break;else _0x216a9d['push'](_0x216a9d['shift']());}catch(_0x33dc2e){_0x216a9d['push'](_0x216a9d['shift']());}}}(a16_0x53c3,0xbbfea));import{readFileSync}from'node:fs';import{cookieFile}from'./constant.js';function a16_0x53c3(){var _0x3171c6=['31615970VTvkfI','476200qeLiHG','12yrKzZd','1094LpzZMN','1186590PtrLaK','7077QXncgV','283405ftjzcw','21ZYUGzk','426177laIujk','942254nNEbGj'];a16_0x53c3=function(){return _0x3171c6;};return a16_0x53c3();}export function getCookie(){try{return readFileSync(cookieFile,'utf-8');}catch{}return'';}
@@ -1 +1 @@
1
- (function(_0x2a7545,_0xb42c49){const _0x13d9c1=a14_0x9584,_0x3d6292=_0x2a7545();while(!![]){try{const _0x2751da=parseInt(_0x13d9c1(0x189))/0x1+parseInt(_0x13d9c1(0x191))/0x2+-parseInt(_0x13d9c1(0x192))/0x3+-parseInt(_0x13d9c1(0x188))/0x4*(-parseInt(_0x13d9c1(0x18f))/0x5)+parseInt(_0x13d9c1(0x18b))/0x6*(-parseInt(_0x13d9c1(0x193))/0x7)+parseInt(_0x13d9c1(0x18c))/0x8+parseInt(_0x13d9c1(0x18e))/0x9*(-parseInt(_0x13d9c1(0x18d))/0xa);if(_0x2751da===_0xb42c49)break;else _0x3d6292['push'](_0x3d6292['shift']());}catch(_0x293d8a){_0x3d6292['push'](_0x3d6292['shift']());}}}(a14_0x50cd,0x474f8));import{existsSync,readFileSync}from'node:fs';import{getUserDomain}from'../constant/domain.js';import{cookieFile}from'./constant.js';export async function getIsSessionValid(){const _0x763831=a14_0x9584;try{if(!existsSync(cookieFile))return![];const _0x5b991b=readFileSync(cookieFile,_0x763831(0x195)),_0x4e4070=await fetch(getUserDomain()+_0x763831(0x194),{'headers':{'cookie':_0x5b991b}})[_0x763831(0x18a)](_0x54342e=>_0x54342e[_0x763831(0x190)]());return _0x4e4070&&_0x4e4070[_0x763831(0x196)]&&_0x4e4070['user'];}catch{}return![];}function a14_0x9584(_0x3fe335,_0x3555fd){const _0x50cd98=a14_0x50cd();return a14_0x9584=function(_0x9584d9,_0x16b9b3){_0x9584d9=_0x9584d9-0x188;let _0x1e0e13=_0x50cd98[_0x9584d9];return _0x1e0e13;},a14_0x9584(_0x3fe335,_0x3555fd);}function a14_0x50cd(){const _0x21d741=['/api/auth/get-session','utf-8','session','1116wUDSSk','313887sxPyFo','then','168VNmdwa','1011320wzKvLA','1294330rdXGuP','9OYhbcG','3085uGsaQe','json','138494EmCykL','506757RfAozX','22813ULSrco'];a14_0x50cd=function(){return _0x21d741;};return a14_0x50cd();}
1
+ (function(_0x599282,_0x488ff1){const _0x26b9d2=a17_0x5ae1,_0xffeefe=_0x599282();while(!![]){try{const _0x2ecc2c=parseInt(_0x26b9d2(0x199))/0x1*(parseInt(_0x26b9d2(0x195))/0x2)+-parseInt(_0x26b9d2(0x19b))/0x3+-parseInt(_0x26b9d2(0x19e))/0x4+parseInt(_0x26b9d2(0x196))/0x5*(-parseInt(_0x26b9d2(0x194))/0x6)+parseInt(_0x26b9d2(0x19c))/0x7+parseInt(_0x26b9d2(0x19d))/0x8*(-parseInt(_0x26b9d2(0x1a0))/0x9)+parseInt(_0x26b9d2(0x193))/0xa;if(_0x2ecc2c===_0x488ff1)break;else _0xffeefe['push'](_0xffeefe['shift']());}catch(_0x3799e4){_0xffeefe['push'](_0xffeefe['shift']());}}}(a17_0x42f7,0x669ea));function a17_0x5ae1(_0x3b26be,_0xecf02a){const _0x42f73d=a17_0x42f7();return a17_0x5ae1=function(_0x5ae166,_0x463091){_0x5ae166=_0x5ae166-0x192;let _0x57d076=_0x42f73d[_0x5ae166];return _0x57d076;},a17_0x5ae1(_0x3b26be,_0xecf02a);}import{existsSync,readFileSync}from'node:fs';import{getUserDomain}from'../constant/domain.js';import{cookieFile}from'./constant.js';function a17_0x42f7(){const _0x1c86c6=['11354190OEnNIh','180AVSqRH','4hCluVn','56305URKKTe','/api/auth/get-session','utf-8','176687sNsnQP','user','243744zNWzpd','2460829fLJKDX','263416wjIzAT','1369568hghXyr','session','180wWLMgR','then'];a17_0x42f7=function(){return _0x1c86c6;};return a17_0x42f7();}export async function getIsSessionValid(){const _0x5af0e9=a17_0x5ae1;try{if(!existsSync(cookieFile))return![];const _0x338bd0=readFileSync(cookieFile,_0x5af0e9(0x198)),_0x26fe52=await fetch(getUserDomain()+_0x5af0e9(0x197),{'headers':{'cookie':_0x338bd0}})[_0x5af0e9(0x192)](_0x2d723d=>_0x2d723d['json']());return _0x26fe52&&_0x26fe52[_0x5af0e9(0x19f)]&&_0x26fe52[_0x5af0e9(0x19a)];}catch{}return![];}
@@ -1 +1 @@
1
- function a15_0x1c17(_0x557311,_0x7e0522){var _0x45b01c=a15_0x45b0();return a15_0x1c17=function(_0x1c17f3,_0x4c8421){_0x1c17f3=_0x1c17f3-0xf8;var _0x3ff18b=_0x45b01c[_0x1c17f3];return _0x3ff18b;},a15_0x1c17(_0x557311,_0x7e0522);}(function(_0x118a7b,_0x440c66){var _0x4608f5=a15_0x1c17,_0x298f96=_0x118a7b();while(!![]){try{var _0x3720fd=parseInt(_0x4608f5(0xfb))/0x1+-parseInt(_0x4608f5(0xfc))/0x2*(-parseInt(_0x4608f5(0xff))/0x3)+parseInt(_0x4608f5(0x100))/0x4*(parseInt(_0x4608f5(0xfd))/0x5)+parseInt(_0x4608f5(0xfa))/0x6*(parseInt(_0x4608f5(0x102))/0x7)+-parseInt(_0x4608f5(0x104))/0x8+parseInt(_0x4608f5(0x101))/0x9*(-parseInt(_0x4608f5(0xfe))/0xa)+-parseInt(_0x4608f5(0xf9))/0xb;if(_0x3720fd===_0x440c66)break;else _0x298f96['push'](_0x298f96['shift']());}catch(_0x52850a){_0x298f96['push'](_0x298f96['shift']());}}}(a15_0x45b0,0xcb89e));function a15_0x45b0(){var _0x5674d1=['22MNwCRt','5FxwKhd','1760KkwEMK','405639eINsVY','2047436aAhZTJ','61326kVcIov','228277TmhLVM','log','8156336mKVVuz','✓\x20已退出登录','12450438HJpIrD','258mpKQyl','782883mgaWwi'];a15_0x45b0=function(){return _0x5674d1;};return a15_0x45b0();}import{unlinkSync,existsSync}from'node:fs';import{cookieFile}from'./constant.js';export function logout(){var _0x265a4d=a15_0x1c17;existsSync(cookieFile)?(unlinkSync(cookieFile),console[_0x265a4d(0x103)](_0x265a4d(0xf8))):console[_0x265a4d(0x103)]('!\x20当前未登录');}
1
+ function a18_0x41d1(){var _0x3bf568=['950691OBnOYY','1236263qzDoYp','23468EWXyhg','!\x20当前未登录','39484070OWyLxw','log','6435018saFIwZ','2411128bZJrbZ','54LdXAVh','100aNvXIz','188562nyDcMC','36qeNtaS'];a18_0x41d1=function(){return _0x3bf568;};return a18_0x41d1();}(function(_0x358d23,_0x41a143){var _0x5960c0=a18_0x3568,_0x1b66ae=_0x358d23();while(!![]){try{var _0x24df4e=-parseInt(_0x5960c0(0xac))/0x1+-parseInt(_0x5960c0(0xb5))/0x2*(-parseInt(_0x5960c0(0xb6))/0x3)+parseInt(_0x5960c0(0xad))/0x4*(parseInt(_0x5960c0(0xb4))/0x5)+-parseInt(_0x5960c0(0xb1))/0x6+-parseInt(_0x5960c0(0xab))/0x7+-parseInt(_0x5960c0(0xb2))/0x8*(parseInt(_0x5960c0(0xb3))/0x9)+parseInt(_0x5960c0(0xaf))/0xa;if(_0x24df4e===_0x41a143)break;else _0x1b66ae['push'](_0x1b66ae['shift']());}catch(_0x54f864){_0x1b66ae['push'](_0x1b66ae['shift']());}}}(a18_0x41d1,0xe6842));function a18_0x3568(_0x428890,_0x50c2b1){var _0x41d1f9=a18_0x41d1();return a18_0x3568=function(_0x356861,_0x557eaa){_0x356861=_0x356861-0xab;var _0x17d9fb=_0x41d1f9[_0x356861];return _0x17d9fb;},a18_0x3568(_0x428890,_0x50c2b1);}import{unlinkSync,existsSync}from'node:fs';import{cookieFile}from'./constant.js';export function logout(){var _0x43bace=a18_0x3568;existsSync(cookieFile)?(unlinkSync(cookieFile),console[_0x43bace(0xb0)]('✓\x20已退出登录')):console[_0x43bace(0xb0)](_0x43bace(0xae));}
package/lib/cli.js CHANGED
@@ -1,2 +1,2 @@
1
1
  #!/usr/bin/env node
2
- const a16_0x3ed280=a16_0x2503;(function(_0x20271a,_0x1b18be){const _0x2e1b9a=a16_0x2503,_0x18f0b2=_0x20271a();while(!![]){try{const _0x1851c0=-parseInt(_0x2e1b9a(0x13a))/0x1+-parseInt(_0x2e1b9a(0x12c))/0x2*(-parseInt(_0x2e1b9a(0x12a))/0x3)+-parseInt(_0x2e1b9a(0x13c))/0x4*(-parseInt(_0x2e1b9a(0x136))/0x5)+-parseInt(_0x2e1b9a(0x13e))/0x6*(-parseInt(_0x2e1b9a(0x132))/0x7)+-parseInt(_0x2e1b9a(0x12e))/0x8*(-parseInt(_0x2e1b9a(0x120))/0x9)+parseInt(_0x2e1b9a(0x125))/0xa*(parseInt(_0x2e1b9a(0x126))/0xb)+-parseInt(_0x2e1b9a(0x13d))/0xc;if(_0x1851c0===_0x1b18be)break;else _0x18f0b2['push'](_0x18f0b2['shift']());}catch(_0xf72ef5){_0x18f0b2['push'](_0x18f0b2['shift']());}}}(a16_0x53a4,0xb3736));import{jsx as a16_0x6f2008}from'react/jsx-runtime';import a16_0x5b5a22 from'meow';import{render}from'ink';import{CreateApp}from'./create-app/main.js';import{AddPage}from'./add-page/main.js';import{runStart}from'./cmd/start.js';import{runBuild}from'./cmd/build.js';function a16_0x2503(_0xb0139b,_0xf1424e){const _0x53a465=a16_0x53a4();return a16_0x2503=function(_0x250320,_0x112747){_0x250320=_0x250320-0x11e;let _0xb5372e=_0x53a465[_0x250320];return _0xb5372e;},a16_0x2503(_0xb0139b,_0xf1424e);}function a16_0x53a4(){const _0x34aab2=['27270888kBuCwZ','5229276wyibGf','\x0a\x09Usage\x0a\x09\x20\x20$\x20lovrabet\x0a\x0a\x09Examples\x0a\x09\x20\x20$\x20lovrabet\x20auth\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20登录认证\x0a\x09\x20\x20$\x20lovrabet\x20logout\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20退出登录\x0a\x09\x20\x20$\x20lovrabet\x20create\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20创建一个项目\x0a\x09\x20\x20$\x20lovrabet\x20create\x20--env\x20daily\x20\x20\x20\x20\x20\x20\x20\x20//\x20创建项目并指定环境\x0a\x09\x20\x20$\x20lovrabet\x20add\x20page\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20添加一个页面\x0a\x09\x20\x20$\x20lovrabet\x20start\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20启动项目\x0a\x09\x20\x20$\x20lovrabet\x20build\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20构建项目\x0a\x09\x20\x20$\x20lovrabet\x20preview\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20预览项目\x0a\x09\x20\x20$\x20lovrabet\x20preview\x20--watch\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20监听文件变化并自动构建预览\x0a\x09\x20\x20$\x20lovrabet\x20config\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20项目配置\x0a\x09\x20\x20$\x20lovrabet\x20api\x20pull\x20--[options]\x20\x20\x20\x20\x20\x20//\x20拉取并生成\x20API\x20配置文件(详见\x20lovrabet\x20api\x20--help)\x0a\x09\x20\x20$\x20lovrabet\x20logs\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20查看日志\x0a\x09\x20\x20$\x20lovrabet\x20logs\x20--clear\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20清空日志\x0a','boolean','369tfIOxf','env','all','auth','config','220GWfuWM','278575VgXulL','preview','page','setLogPath','4602ahazCV','api','454eytqGC','exit','25912kroCPj','cwd','add','string','7ppPPFN','create','build','error','6133725VmJIPa','trim','logs','input','128854dwkxJH','flags','4WEWwkm'];a16_0x53a4=function(){return _0x34aab2;};return a16_0x53a4();}import{runPreview}from'./cmd/preview.js';import{runBuildWatch}from'./cmd/build-watch.js';import{Config}from'./config/main.js';import{apiCli}from'./api/main.js';import{AuthServer}from'./auth/auth-server-ui.js';import{logout}from'./auth/logout.js';import{Help}from'./help.js';import{logger}from'./utils/logger.js';import{showLogs,clearLogs}from'./cmd/logs.js';const cli=a16_0x5b5a22(a16_0x3ed280(0x11e),{'importMeta':import.meta,'flags':{'name':{'type':a16_0x3ed280(0x131)},'clear':{'type':a16_0x3ed280(0x11f)},'env':{'type':a16_0x3ed280(0x131)},'watch':{'type':a16_0x3ed280(0x11f)},'help':{'type':'boolean'},'appcode':{'type':a16_0x3ed280(0x131)},'output':{'type':'string'}}});await run();async function run(){const _0x307ee4=a16_0x3ed280,_0x3da0fa=cli['input'][0x0];switch(_0x3da0fa){case _0x307ee4(0x133):{const _0x84b3ae=cli[_0x307ee4(0x139)][0x1]?.[_0x307ee4(0x137)](),_0x38115b=cli[_0x307ee4(0x13b)][_0x307ee4(0x121)];render(a16_0x6f2008(CreateApp,{'projectCode':_0x84b3ae,'env':_0x38115b}));break;}case _0x307ee4(0x130):{cli[_0x307ee4(0x139)][0x1]===_0x307ee4(0x128)&&(logger[_0x307ee4(0x129)](process[_0x307ee4(0x12f)]()),render(a16_0x6f2008(AddPage,{})));break;}case'start':{try{logger['setLogPath'](process['cwd']()),await runStart();}catch(_0x4d1b49){console[_0x307ee4(0x135)](_0x4d1b49),process[_0x307ee4(0x12d)](0x1);}break;}case _0x307ee4(0x134):{try{logger[_0x307ee4(0x129)](process[_0x307ee4(0x12f)]()),await runBuild();}catch(_0x3344b0){console[_0x307ee4(0x135)](_0x3344b0),process[_0x307ee4(0x12d)](0x1);}break;}case _0x307ee4(0x127):{const _0x37fd3e=cli[_0x307ee4(0x13b)]['watch'];logger['setLogPath'](process['cwd']());if(_0x37fd3e)try{await Promise[_0x307ee4(0x122)]([runBuildWatch(),runPreview()]);}catch(_0x3d14e7){console['error'](_0x3d14e7),process[_0x307ee4(0x12d)](0x1);}else try{await runPreview();}catch(_0x142952){console[_0x307ee4(0x135)](_0x142952),process[_0x307ee4(0x12d)](0x1);}break;}case _0x307ee4(0x124):{render(a16_0x6f2008(Config,{'cli':cli}));break;}case _0x307ee4(0x12b):{await apiCli(cli);break;}case _0x307ee4(0x123):{render(a16_0x6f2008(AuthServer,{}));break;}case'logout':{logout();break;}case _0x307ee4(0x138):{cli[_0x307ee4(0x13b)]['clear']?clearLogs():showLogs();break;}default:render(a16_0x6f2008(Help,{}));break;}}
2
+ const a19_0x179650=a19_0x52d9;function a19_0x52d9(_0x1a7632,_0x263523){const _0x5c9223=a19_0x5c92();return a19_0x52d9=function(_0x52d9e0,_0x33e665){_0x52d9e0=_0x52d9e0-0x1f2;let _0x487b9a=_0x5c9223[_0x52d9e0];return _0x487b9a;},a19_0x52d9(_0x1a7632,_0x263523);}(function(_0x4f78a6,_0x289a36){const _0x4b7cd8=a19_0x52d9,_0x4baeeb=_0x4f78a6();while(!![]){try{const _0x48dcca=parseInt(_0x4b7cd8(0x1f7))/0x1+parseInt(_0x4b7cd8(0x1f3))/0x2+-parseInt(_0x4b7cd8(0x1fe))/0x3+parseInt(_0x4b7cd8(0x1f8))/0x4*(parseInt(_0x4b7cd8(0x20b))/0x5)+parseInt(_0x4b7cd8(0x201))/0x6+-parseInt(_0x4b7cd8(0x213))/0x7*(parseInt(_0x4b7cd8(0x203))/0x8)+parseInt(_0x4b7cd8(0x215))/0x9;if(_0x48dcca===_0x289a36)break;else _0x4baeeb['push'](_0x4baeeb['shift']());}catch(_0x848143){_0x4baeeb['push'](_0x4baeeb['shift']());}}}(a19_0x5c92,0x8eb0d));import{jsx as a19_0x440ad9}from'react/jsx-runtime';import a19_0x2eb092 from'meow';import{render}from'ink';import{CreateApp}from'./create-app/main.js';import{AddPage}from'./add-page/main.js';import{runStart}from'./cmd/start.js';import{runBuild}from'./cmd/build.js';import{runPreview}from'./cmd/preview.js';import{runBuildWatch}from'./cmd/build-watch.js';import{Config}from'./config/main.js';function a19_0x5c92(){const _0x46afcc=['执行添加页面命令','preview','执行启动命令','2388996PsCbbp','\x0a\x09Usage\x0a\x09\x20\x20$\x20lovrabet\x0a\x0a\x09Examples\x0a\x09\x20\x20$\x20lovrabet\x20auth\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20登录认证\x0a\x09\x20\x20$\x20lovrabet\x20logout\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20退出登录\x0a\x09\x20\x20$\x20lovrabet\x20create\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20创建一个项目\x0a\x09\x20\x20$\x20lovrabet\x20create\x20--env\x20daily\x20\x20\x20\x20\x20\x20\x20\x20//\x20创建项目并指定环境\x0a\x09\x20\x20$\x20lovrabet\x20add\x20page\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20添加一个页面\x0a\x09\x20\x20$\x20lovrabet\x20start\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20启动项目\x0a\x09\x20\x20$\x20lovrabet\x20build\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20构建项目\x0a\x09\x20\x20$\x20lovrabet\x20preview\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20预览项目\x0a\x09\x20\x20$\x20lovrabet\x20preview\x20--watch\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20监听文件变化并自动构建预览\x0a\x09\x20\x20$\x20lovrabet\x20config\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20项目配置\x0a\x09\x20\x20$\x20lovrabet\x20api\x20pull\x20--[options]\x20\x20\x20\x20\x20\x20//\x20拉取并生成\x20API\x20配置文件(详见\x20lovrabet\x20api\x20--help)\x0a\x09\x20\x20$\x20lovrabet\x20api\x20doc\x20--[options]\x20\x20\x20\x20\x20\x20\x20//\x20生成\x20API\x20文档(详见\x20lovrabet\x20api\x20--help)\x0a\x09\x20\x20$\x20lovrabet\x20logs\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20查看日志\x0a\x09\x20\x20$\x20lovrabet\x20logs\x20--clear\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20清空日志\x0a','start','736176ZlGClG','string','24dmlxUc','exit','page','slice','input','trim','执行预览命令','add','18665XnUiFn','logout','setRawCommand','watch','error','执行构建命令','setLogPath','join','1339492WGTjbN','boolean','5399370izzvrk','create','build','add-page','info','2044234HqxvKC','cwd','config','flags','169055thHspk','44VADTNo','\x20(监听模式)','logs'];a19_0x5c92=function(){return _0x46afcc;};return a19_0x5c92();}import{apiCli}from'./api/main.js';import{AuthServer}from'./auth/auth-server-ui.js';import{logout}from'./auth/logout.js';import{Help}from'./help.js';import{logger}from'./utils/logger.js';import{showLogs,clearLogs}from'./cmd/logs.js';const cli=a19_0x2eb092(a19_0x179650(0x1ff),{'importMeta':import.meta,'flags':{'name':{'type':a19_0x179650(0x202)},'clear':{'type':'boolean'},'env':{'type':a19_0x179650(0x202)},'watch':{'type':'boolean'},'help':{'type':a19_0x179650(0x214)},'appcode':{'type':a19_0x179650(0x202)},'output':{'type':'string'}}});await run();async function run(){const _0x49cd84=a19_0x179650,_0x50ed43=cli[_0x49cd84(0x207)][0x0],_0x5ca1c4=('lovrabet\x20'+process['argv'][_0x49cd84(0x206)](0x2)[_0x49cd84(0x212)]('\x20'))[_0x49cd84(0x208)]();logger[_0x49cd84(0x20d)](_0x5ca1c4);switch(_0x50ed43){case _0x49cd84(0x216):{const _0x28af98=cli[_0x49cd84(0x207)][0x1]?.[_0x49cd84(0x208)](),_0x5229eb=cli[_0x49cd84(0x1f6)]['env'];render(a19_0x440ad9(CreateApp,{'projectCode':_0x28af98,'env':_0x5229eb}));break;}case _0x49cd84(0x20a):{cli[_0x49cd84(0x207)][0x1]===_0x49cd84(0x205)&&(logger['setLogPath'](process[_0x49cd84(0x1f4)]()),logger['info'](_0x49cd84(0x218),_0x49cd84(0x1fb)),render(a19_0x440ad9(AddPage,{})));break;}case'start':{try{logger[_0x49cd84(0x211)](process[_0x49cd84(0x1f4)]()),logger[_0x49cd84(0x1f2)](_0x49cd84(0x200),_0x49cd84(0x1fd)),await runStart();}catch(_0x3fd862){console[_0x49cd84(0x20f)](_0x3fd862),process['exit'](0x1);}break;}case _0x49cd84(0x217):{try{logger[_0x49cd84(0x211)](process[_0x49cd84(0x1f4)]()),logger[_0x49cd84(0x1f2)](_0x49cd84(0x217),_0x49cd84(0x210)),await runBuild();}catch(_0x4e0d0b){console[_0x49cd84(0x20f)](_0x4e0d0b),process[_0x49cd84(0x204)](0x1);}break;}case'preview':{const _0x54ee5f=cli[_0x49cd84(0x1f6)][_0x49cd84(0x20e)];logger[_0x49cd84(0x211)](process[_0x49cd84(0x1f4)]()),logger[_0x49cd84(0x1f2)](_0x49cd84(0x1fc),_0x49cd84(0x209)+(_0x54ee5f?_0x49cd84(0x1f9):''));if(_0x54ee5f)try{await Promise['all']([runBuildWatch(),runPreview()]);}catch(_0x5e4394){console['error'](_0x5e4394),process['exit'](0x1);}else try{await runPreview();}catch(_0x2e76ae){console[_0x49cd84(0x20f)](_0x2e76ae),process[_0x49cd84(0x204)](0x1);}break;}case _0x49cd84(0x1f5):{render(a19_0x440ad9(Config,{'cli':cli}));break;}case'api':{await apiCli(cli);break;}case'auth':{render(a19_0x440ad9(AuthServer,{}));break;}case _0x49cd84(0x20c):{logout();break;}case _0x49cd84(0x1fa):{cli[_0x49cd84(0x1f6)]['clear']?clearLogs():showLogs();break;}default:render(a19_0x440ad9(Help,{}));break;}}
@@ -1 +1 @@
1
- (function(_0x1a5ff1,_0x3ee864){const _0x122f10=a17_0x35d0,_0x303371=_0x1a5ff1();while(!![]){try{const _0x5b59fa=-parseInt(_0x122f10(0x94))/0x1+parseInt(_0x122f10(0x96))/0x2+-parseInt(_0x122f10(0x90))/0x3*(parseInt(_0x122f10(0x91))/0x4)+parseInt(_0x122f10(0x8c))/0x5*(parseInt(_0x122f10(0x89))/0x6)+parseInt(_0x122f10(0x97))/0x7+-parseInt(_0x122f10(0x98))/0x8*(-parseInt(_0x122f10(0x88))/0x9)+parseInt(_0x122f10(0x9b))/0xa;if(_0x5b59fa===_0x3ee864)break;else _0x303371['push'](_0x303371['shift']());}catch(_0x4fec19){_0x303371['push'](_0x303371['shift']());}}}(a17_0x5e7c,0xad95b));function a17_0x5e7c(){const _0xa36669=['1581384PNveHS','error','cwd','7505260mQHrVE','.bin','27BQmrOV','18hrZywh','npm\x20run\x20build\x20exited\x20with\x20code\x20','build','154270SrbjGF','close','PATH','node_modules','3WHtLfV','5336132XlOGCR','vite','inherit','941696ALgEOw','env','531492aGhEUw','8994153GZQoRb'];a17_0x5e7c=function(){return _0xa36669;};return a17_0x5e7c();}import{spawn}from'node:child_process';function a17_0x35d0(_0x2db346,_0x54cc2e){const _0x5e7ca8=a17_0x5e7c();return a17_0x35d0=function(_0x35d084,_0x5beb17){_0x35d084=_0x35d084-0x87;let _0x27e282=_0x5e7ca8[_0x35d084];return _0x27e282;},a17_0x35d0(_0x2db346,_0x54cc2e);}import{delimiter,join}from'node:path';export function runBuildWatch(){return new Promise((_0x40dadf,_0x209f79)=>{const _0x3ce491=a17_0x35d0,_0x4bb912=spawn(_0x3ce491(0x92),[_0x3ce491(0x8b),'--watch'],{'stdio':_0x3ce491(0x93),'shell':!![],'env':{...process[_0x3ce491(0x95)],'PATH':''+join(process[_0x3ce491(0x9a)](),_0x3ce491(0x8f),_0x3ce491(0x87))+delimiter+process[_0x3ce491(0x95)][_0x3ce491(0x8e)]}});_0x4bb912['on'](_0x3ce491(0x8d),_0xfb5f5f=>{const _0x169f37=_0x3ce491;if(_0xfb5f5f===0x0||_0xfb5f5f===null)_0x40dadf();else _0x209f79(new Error(_0x169f37(0x8a)+_0xfb5f5f));}),_0x4bb912['on'](_0x3ce491(0x99),_0x209f79);});}
1
+ (function(_0x35554b,_0xcab9df){const _0x540ef0=a20_0x2ad4,_0x3ecb26=_0x35554b();while(!![]){try{const _0x2b739e=parseInt(_0x540ef0(0xfe))/0x1+-parseInt(_0x540ef0(0x106))/0x2*(parseInt(_0x540ef0(0xfc))/0x3)+-parseInt(_0x540ef0(0xfd))/0x4+-parseInt(_0x540ef0(0x104))/0x5*(-parseInt(_0x540ef0(0x102))/0x6)+-parseInt(_0x540ef0(0x109))/0x7*(parseInt(_0x540ef0(0xff))/0x8)+-parseInt(_0x540ef0(0x100))/0x9*(-parseInt(_0x540ef0(0x10b))/0xa)+parseInt(_0x540ef0(0xfb))/0xb*(-parseInt(_0x540ef0(0x10c))/0xc);if(_0x2b739e===_0xcab9df)break;else _0x3ecb26['push'](_0x3ecb26['shift']());}catch(_0x30cedb){_0x3ecb26['push'](_0x3ecb26['shift']());}}}(a20_0x4db2,0xa2a98));import{spawn}from'node:child_process';import{delimiter,join}from'node:path';function a20_0x2ad4(_0x2b8378,_0x234e7b){const _0x4db2be=a20_0x4db2();return a20_0x2ad4=function(_0x2ad408,_0x2e189b){_0x2ad408=_0x2ad408-0xfb;let _0x512d05=_0x4db2be[_0x2ad408];return _0x512d05;},a20_0x2ad4(_0x2b8378,_0x234e7b);}export function runBuildWatch(){return new Promise((_0x47e59e,_0x2151f9)=>{const _0x5c53a0=a20_0x2ad4,_0x235c55=spawn(_0x5c53a0(0x107),['build',_0x5c53a0(0x103)],{'stdio':_0x5c53a0(0x101),'shell':!![],'env':{...process['env'],'PATH':''+join(process['cwd'](),_0x5c53a0(0x10a),_0x5c53a0(0x10d))+delimiter+process['env'][_0x5c53a0(0x108)]}});_0x235c55['on'](_0x5c53a0(0x10e),_0x12997d=>{const _0x250213=_0x5c53a0;if(_0x12997d===0x0||_0x12997d===null)_0x47e59e();else _0x2151f9(new Error(_0x250213(0x105)+_0x12997d));}),_0x235c55['on']('error',_0x2151f9);});}function a20_0x4db2(){const _0x2d9696=['7pKRgeU','node_modules','10QsithG','648tuvUeJ','.bin','close','92092aIOWyx','18363kEbzDC','186116jIRAbn','592949UNGCEG','474080zBZSsx','7142283AtpDNa','inherit','4681434HURCWI','--watch','5BArGXh','npm\x20run\x20build\x20exited\x20with\x20code\x20','308idQdIp','vite','PATH'];a20_0x4db2=function(){return _0x2d9696;};return a20_0x4db2();}
package/lib/cmd/build.js CHANGED
@@ -1 +1 @@
1
- (function(_0x1206a5,_0x38a501){const _0x39f50a=a18_0x1bed,_0x569da1=_0x1206a5();while(!![]){try{const _0x1dc255=parseInt(_0x39f50a(0xac))/0x1+-parseInt(_0x39f50a(0xa8))/0x2+parseInt(_0x39f50a(0xb5))/0x3*(-parseInt(_0x39f50a(0xab))/0x4)+-parseInt(_0x39f50a(0xb9))/0x5*(parseInt(_0x39f50a(0xbf))/0x6)+parseInt(_0x39f50a(0xb7))/0x7*(-parseInt(_0x39f50a(0xc0))/0x8)+parseInt(_0x39f50a(0xa7))/0x9*(parseInt(_0x39f50a(0xbe))/0xa)+parseInt(_0x39f50a(0xa5))/0xb;if(_0x1dc255===_0x38a501)break;else _0x569da1['push'](_0x569da1['shift']());}catch(_0x363697){_0x569da1['push'](_0x569da1['shift']());}}}(a18_0x245b,0x52760));import{delimiter,join}from'node:path';import{spawn}from'node:child_process';import{logger}from'../utils/logger.js';function a18_0x1bed(_0x9f62bc,_0x2c49e0){const _0x245b99=a18_0x245b();return a18_0x1bed=function(_0x1bed53,_0x21128b){_0x1bed53=_0x1bed53-0xa1;let _0x8ee9b1=_0x245b99[_0x1bed53];return _0x8ee9b1;},a18_0x1bed(_0x9f62bc,_0x2c49e0);}function a18_0x245b(){const _0x1b431b=['cwd','12620069PqjuVG','npm\x20run\x20build\x20exited\x20with\x20code\x20','1422fqUSgV','1207994pSlUyH','success','now','8bWPWIn','472256dCXRnr','npm','run','data','.bin','error','info','env','npm\x20run\x20build','573054XWgnWq','toString','1052261aEumtD','stderr','63515hkBaQd','项目构建成功','开始构建项目','PATH','build','24430xzppVc','180hoELct','16VKNEJP','trim','inherit','node_modules','项目构建出错'];a18_0x245b=function(){return _0x1b431b;};return a18_0x245b();}export function runBuild(){return new Promise((_0x4ecdf1,_0x46268b)=>{const _0x14442e=a18_0x1bed,_0x14bd4f=Date[_0x14442e(0xaa)]();logger[_0x14442e(0xb2)](_0x14442e(0xbd),_0x14442e(0xbb),{'command':_0x14442e(0xb4)});let _0x10ebf='';const _0x4eca65=spawn(_0x14442e(0xad),[_0x14442e(0xae),'build'],{'stdio':[_0x14442e(0xa1),_0x14442e(0xa1),'pipe'],'shell':!![],'env':{...process[_0x14442e(0xb3)],'PATH':''+join(process[_0x14442e(0xa4)](),_0x14442e(0xa2),_0x14442e(0xb0))+delimiter+process['env'][_0x14442e(0xbc)]}});_0x4eca65[_0x14442e(0xb8)]?.['on'](_0x14442e(0xaf),_0x1d0a64=>{const _0x15a18a=_0x14442e;_0x10ebf+=_0x1d0a64[_0x15a18a(0xb6)]();}),_0x4eca65['on']('close',_0xe16092=>{const _0x47d39d=_0x14442e,_0xb84859=Date[_0x47d39d(0xaa)]()-_0x14bd4f;if(_0xe16092===0x0||_0xe16092===null)logger[_0x47d39d(0xa9)]('build',_0x47d39d(0xba),_0xb84859),_0x4ecdf1();else{const _0x5c73b7={'exitCode':_0xe16092,'duration':_0xb84859,'command':_0x47d39d(0xb4),'cwd':process[_0x47d39d(0xa4)]()};_0x10ebf['trim']()&&(_0x5c73b7[_0x47d39d(0xb8)]=_0x10ebf[_0x47d39d(0xc1)]()),logger[_0x47d39d(0xb1)](_0x47d39d(0xbd),'项目构建失败',_0x5c73b7),_0x46268b(new Error(_0x47d39d(0xa6)+_0xe16092));}}),_0x4eca65['on'](_0x14442e(0xb1),_0x562871=>{const _0x1fc77e=_0x14442e,_0x2d6d22=Date[_0x1fc77e(0xaa)]()-_0x14bd4f;logger[_0x1fc77e(0xb1)](_0x1fc77e(0xbd),_0x1fc77e(0xa3),{'error':_0x562871['message'],'duration':_0x2d6d22,'stderr':_0x10ebf[_0x1fc77e(0xc1)]()||undefined}),_0x46268b(_0x562871);});});}
1
+ (function(_0x3aea00,_0x5f0f68){const _0x102b18=a21_0x4779,_0x3ad2b3=_0x3aea00();while(!![]){try{const _0x19339e=parseInt(_0x102b18(0xd2))/0x1+parseInt(_0x102b18(0xe1))/0x2*(-parseInt(_0x102b18(0xe5))/0x3)+-parseInt(_0x102b18(0xe8))/0x4+-parseInt(_0x102b18(0xeb))/0x5+parseInt(_0x102b18(0xde))/0x6+-parseInt(_0x102b18(0xef))/0x7*(parseInt(_0x102b18(0xdd))/0x8)+parseInt(_0x102b18(0xdf))/0x9;if(_0x19339e===_0x5f0f68)break;else _0x3ad2b3['push'](_0x3ad2b3['shift']());}catch(_0x49e82a){_0x3ad2b3['push'](_0x3ad2b3['shift']());}}}(a21_0x27a1,0x7f80d));function a21_0x27a1(){const _0x37c56b=['now','PATH','build','npm','开始构建项目','stderr','pipe','info','205256ucYaJA','4521252IVvffh','12683646Bccoxh','cwd','3154nFLIxC','项目构建失败','.bin','项目构建出错','1545kPpSwJ','error','close','1132568TQStJg','inherit','项目构建成功','2560000OqtNCg','toString','data','env','154QBJgdE','531168EbqcQo','npm\x20run\x20build','trim'];a21_0x27a1=function(){return _0x37c56b;};return a21_0x27a1();}function a21_0x4779(_0x5af347,_0x46cd0f){const _0x27a151=a21_0x27a1();return a21_0x4779=function(_0x47798b,_0x574540){_0x47798b=_0x47798b-0xd2;let _0x14b59c=_0x27a151[_0x47798b];return _0x14b59c;},a21_0x4779(_0x5af347,_0x46cd0f);}import{delimiter,join}from'node:path';import{spawn}from'node:child_process';import{logger}from'../utils/logger.js';export function runBuild(){return new Promise((_0x3f89a6,_0x5b5d9e)=>{const _0x23a920=a21_0x4779,_0x3d38b9=Date[_0x23a920(0xd5)]();logger[_0x23a920(0xdc)](_0x23a920(0xd7),_0x23a920(0xd9),{'command':_0x23a920(0xd3)});let _0x459f84='';const _0x4b0846=spawn(_0x23a920(0xd8),['run',_0x23a920(0xd7)],{'stdio':['inherit',_0x23a920(0xe9),_0x23a920(0xdb)],'shell':!![],'env':{...process[_0x23a920(0xee)],'PATH':''+join(process[_0x23a920(0xe0)](),'node_modules',_0x23a920(0xe3))+delimiter+process['env'][_0x23a920(0xd6)]}});_0x4b0846[_0x23a920(0xda)]?.['on'](_0x23a920(0xed),_0x3a2ca9=>{const _0x14307e=_0x23a920;_0x459f84+=_0x3a2ca9[_0x14307e(0xec)]();}),_0x4b0846['on'](_0x23a920(0xe7),_0x157994=>{const _0x598c33=_0x23a920,_0x4e437e=Date['now']()-_0x3d38b9;if(_0x157994===0x0||_0x157994===null)logger['success'](_0x598c33(0xd7),_0x598c33(0xea),_0x4e437e),_0x3f89a6();else{const _0x1ad4a9={'exitCode':_0x157994,'duration':_0x4e437e,'command':'npm\x20run\x20build','cwd':process['cwd']()};_0x459f84[_0x598c33(0xd4)]()&&(_0x1ad4a9[_0x598c33(0xda)]=_0x459f84[_0x598c33(0xd4)]()),logger[_0x598c33(0xe6)](_0x598c33(0xd7),_0x598c33(0xe2),_0x1ad4a9),_0x5b5d9e(new Error('npm\x20run\x20build\x20exited\x20with\x20code\x20'+_0x157994));}}),_0x4b0846['on'](_0x23a920(0xe6),_0x590dd9=>{const _0x4578c4=_0x23a920,_0x1eab61=Date['now']()-_0x3d38b9;logger[_0x4578c4(0xe6)](_0x4578c4(0xd7),_0x4578c4(0xe4),{'error':_0x590dd9['message'],'duration':_0x1eab61,'stderr':_0x459f84[_0x4578c4(0xd4)]()||undefined}),_0x5b5d9e(_0x590dd9);});});}
package/lib/cmd/logs.js CHANGED
@@ -1 +1 @@
1
- (function(_0x27d780,_0x36fd83){const _0x35aa97=a19_0x23b6,_0x1fdfb4=_0x27d780();while(!![]){try{const _0x320cbb=parseInt(_0x35aa97(0x1d3))/0x1*(-parseInt(_0x35aa97(0x1c8))/0x2)+-parseInt(_0x35aa97(0x1d8))/0x3+-parseInt(_0x35aa97(0x1c6))/0x4*(parseInt(_0x35aa97(0x1d1))/0x5)+parseInt(_0x35aa97(0x1cc))/0x6+parseInt(_0x35aa97(0x1cf))/0x7+parseInt(_0x35aa97(0x1ca))/0x8*(parseInt(_0x35aa97(0x1ce))/0x9)+-parseInt(_0x35aa97(0x1e1))/0xa*(-parseInt(_0x35aa97(0x1e0))/0xb);if(_0x320cbb===_0x36fd83)break;else _0x1fdfb4['push'](_0x1fdfb4['shift']());}catch(_0x1e32ad){_0x1fdfb4['push'](_0x1fdfb4['shift']());}}}(a19_0x60d4,0x36755));import{logger}from'../utils/logger.js';export function showLogs(){const _0x5f7bdf=a19_0x23b6;logger[_0x5f7bdf(0x1e3)](process[_0x5f7bdf(0x1c7)]());const _0x411089=logger['readLogs']();if(_0x411089[_0x5f7bdf(0x1d0)]===0x0){console[_0x5f7bdf(0x1cd)](_0x5f7bdf(0x1df));return;}console[_0x5f7bdf(0x1cd)](_0x5f7bdf(0x1d5)),_0x411089[_0x5f7bdf(0x1dc)]((_0x328833,_0x5b6330)=>{const _0xc6ea8e=_0x5f7bdf,_0x1b6212=new Date(_0x328833['timestamp'])[_0xc6ea8e(0x1da)]('zh-CN'),_0xda9257=_0x328833[_0xc6ea8e(0x1d9)]===_0xc6ea8e(0x1d7)?'√':_0x328833[_0xc6ea8e(0x1d9)]===_0xc6ea8e(0x1cb)?'×':_0x328833[_0xc6ea8e(0x1d9)]===_0xc6ea8e(0x1d4)?'!':'i';console[_0xc6ea8e(0x1cd)](_0x5b6330+0x1+'.\x20'+_0xda9257+'\x20['+_0x328833['command']+']\x20'+_0x328833['message']),console[_0xc6ea8e(0x1cd)](_0xc6ea8e(0x1d2)+_0x1b6212),_0x328833['duration']&&console[_0xc6ea8e(0x1cd)](_0xc6ea8e(0x1dd)+_0x328833[_0xc6ea8e(0x1de)]+'ms'),_0x328833[_0xc6ea8e(0x1db)]&&Object[_0xc6ea8e(0x1c9)](_0x328833[_0xc6ea8e(0x1db)])['length']>0x0&&console[_0xc6ea8e(0x1cd)]('\x20\x20\x20详情:\x20'+JSON['stringify'](_0x328833[_0xc6ea8e(0x1db)],null,0x2)),console[_0xc6ea8e(0x1cd)]('');});}function a19_0x23b6(_0x319a5c,_0x37d215){const _0x60d438=a19_0x60d4();return a19_0x23b6=function(_0x23b68a,_0x574ee0){_0x23b68a=_0x23b68a-0x1c6;let _0x1efcb3=_0x60d438[_0x23b68a];return _0x1efcb3;},a19_0x23b6(_0x319a5c,_0x37d215);}export function clearLogs(){const _0x497dcc=a19_0x23b6;logger[_0x497dcc(0x1e3)](process[_0x497dcc(0x1c7)]()),logger[_0x497dcc(0x1e2)](),console[_0x497dcc(0x1cd)](_0x497dcc(0x1d6));}function a19_0x60d4(){const _0xff90dd=['*\x20暂无日志记录','33Wkvgeg','1425830kziJoD','clearLogs','setLogPath','44948DsDurE','cwd','2LkuQmh','keys','32LpJSmw','error','2658834RaLZkq','log','201015VsDNnr','741734IOPuZC','length','170XlmMQf','\x20\x20\x20时间:\x20','297213agOJND','warn','*\x20Lovrabet\x20CLI\x20日志记录:\x0a','*\x20日志已清空','success','491574vjMBtF','level','toLocaleString','details','forEach','\x20\x20\x20耗时:\x20','duration'];a19_0x60d4=function(){return _0xff90dd;};return a19_0x60d4();}
1
+ function a22_0x145d(){const _0x4ebb9a=['warn','level','length','\x20\x20\x20时间:\x20','3183435voYFwP','271957UYHfQh','timestamp','284028rJEmfT','*\x20日志已清空','details','zh-CN','13rDGwwX','6MftrIB','898446esWaSh','30830THZcFQ','4gFkLrX','200CBuHLM','clearLogs','26487384TdwgYD','duration','command','*\x20Lovrabet\x20CLI\x20日志记录:\x0a','\x20\x20\x20详情:\x20','\x20\x20\x20耗时:\x20','setLogPath','121eBcyMV','message','error','1352886AECMDh','toLocaleString','forEach','success','2vTRCJZ','log','keys','readLogs','324QiSjPu','*\x20暂无日志记录'];a22_0x145d=function(){return _0x4ebb9a;};return a22_0x145d();}(function(_0x43e592,_0x2f733c){const _0x4a76fd=a22_0x353b,_0x19fb13=_0x43e592();while(!![]){try{const _0x5d23f2=parseInt(_0x4a76fd(0xc7))/0x1*(parseInt(_0x4a76fd(0xda))/0x2)+-parseInt(_0x4a76fd(0xe9))/0x3*(parseInt(_0x4a76fd(0xdc))/0x4)+parseInt(_0x4a76fd(0xd1))/0x5*(parseInt(_0x4a76fd(0xd9))/0x6)+parseInt(_0x4a76fd(0xd2))/0x7*(parseInt(_0x4a76fd(0xdd))/0x8)+parseInt(_0x4a76fd(0xcb))/0x9*(parseInt(_0x4a76fd(0xdb))/0xa)+parseInt(_0x4a76fd(0xe6))/0xb*(parseInt(_0x4a76fd(0xd4))/0xc)+-parseInt(_0x4a76fd(0xd8))/0xd*(parseInt(_0x4a76fd(0xdf))/0xe);if(_0x5d23f2===_0x2f733c)break;else _0x19fb13['push'](_0x19fb13['shift']());}catch(_0x235f62){_0x19fb13['push'](_0x19fb13['shift']());}}}(a22_0x145d,0x82935));import{logger}from'../utils/logger.js';function a22_0x353b(_0xdb6db3,_0x4f9e0a){const _0x145d72=a22_0x145d();return a22_0x353b=function(_0x353be8,_0x53612e){_0x353be8=_0x353be8-0xc6;let _0x54f748=_0x145d72[_0x353be8];return _0x54f748;},a22_0x353b(_0xdb6db3,_0x4f9e0a);}export function showLogs(){const _0x3ff33d=a22_0x353b;logger['setLogPath'](process['cwd']());const _0x1b559b=logger[_0x3ff33d(0xca)]();if(_0x1b559b[_0x3ff33d(0xcf)]===0x0){console[_0x3ff33d(0xc8)](_0x3ff33d(0xcc));return;}console['log'](_0x3ff33d(0xe2)),_0x1b559b[_0x3ff33d(0xeb)]((_0x33978d,_0x3061f1)=>{const _0x20e16f=_0x3ff33d,_0x5e173c=new Date(_0x33978d[_0x20e16f(0xd3)])[_0x20e16f(0xea)](_0x20e16f(0xd7)),_0x52c71c=_0x33978d['level']===_0x20e16f(0xc6)?'√':_0x33978d[_0x20e16f(0xce)]===_0x20e16f(0xe8)?'×':_0x33978d[_0x20e16f(0xce)]===_0x20e16f(0xcd)?'!':'i';console[_0x20e16f(0xc8)](_0x3061f1+0x1+'.\x20'+_0x52c71c+'\x20['+_0x33978d[_0x20e16f(0xe1)]+']\x20'+_0x33978d[_0x20e16f(0xe7)]),console[_0x20e16f(0xc8)](_0x20e16f(0xd0)+_0x5e173c),_0x33978d[_0x20e16f(0xe0)]&&console[_0x20e16f(0xc8)](_0x20e16f(0xe4)+_0x33978d[_0x20e16f(0xe0)]+'ms'),_0x33978d['details']&&Object[_0x20e16f(0xc9)](_0x33978d[_0x20e16f(0xd6)])['length']>0x0&&console[_0x20e16f(0xc8)](_0x20e16f(0xe3)+JSON['stringify'](_0x33978d[_0x20e16f(0xd6)],null,0x2)),console['log']('');});}export function clearLogs(){const _0x167e6c=a22_0x353b;logger[_0x167e6c(0xe5)](process['cwd']()),logger[_0x167e6c(0xde)](),console[_0x167e6c(0xc8)](_0x167e6c(0xd5));}
@@ -1 +1 @@
1
- (function(_0x4bb5e7,_0x4d402b){const _0x22e4e7=a20_0x9b1d,_0x18de03=_0x4bb5e7();while(!![]){try{const _0x1e3ef9=-parseInt(_0x22e4e7(0x184))/0x1+parseInt(_0x22e4e7(0x179))/0x2*(parseInt(_0x22e4e7(0x180))/0x3)+-parseInt(_0x22e4e7(0x185))/0x4+-parseInt(_0x22e4e7(0x17b))/0x5*(-parseInt(_0x22e4e7(0x178))/0x6)+-parseInt(_0x22e4e7(0x18b))/0x7*(-parseInt(_0x22e4e7(0x17f))/0x8)+parseInt(_0x22e4e7(0x17e))/0x9*(-parseInt(_0x22e4e7(0x173))/0xa)+parseInt(_0x22e4e7(0x186))/0xb;if(_0x1e3ef9===_0x4d402b)break;else _0x18de03['push'](_0x18de03['shift']());}catch(_0x2eb772){_0x18de03['push'](_0x18de03['shift']());}}}(a20_0x1518,0x4dfa7));import{delimiter,join}from'node:path';import{spawn}from'node:child_process';function a20_0x9b1d(_0x733a67,_0x251aef){const _0x1518a2=a20_0x1518();return a20_0x9b1d=function(_0x9b1d3f,_0x3f6b1c){_0x9b1d3f=_0x9b1d3f-0x16f;let _0xd963e4=_0x1518a2[_0x9b1d3f];return _0xd963e4;},a20_0x9b1d(_0x733a67,_0x251aef);}import{logger}from'../utils/logger.js';export function runPreview(){return new Promise((_0x631bd9,_0x8bbe8d)=>{const _0x4d6722=a20_0x9b1d,_0x4cd0fa=Date['now']();logger[_0x4d6722(0x18e)](_0x4d6722(0x188),_0x4d6722(0x174),{'command':_0x4d6722(0x182)});let _0xd3f981='';const _0xa5e0b4=spawn(_0x4d6722(0x187),[_0x4d6722(0x188)],{'stdio':[_0x4d6722(0x177),_0x4d6722(0x177),'pipe'],'shell':!![],'env':{...process[_0x4d6722(0x17d)],'PATH':''+join(process[_0x4d6722(0x18f)](),_0x4d6722(0x17c),_0x4d6722(0x18c))+delimiter+process[_0x4d6722(0x17d)][_0x4d6722(0x16f)]}});_0xa5e0b4[_0x4d6722(0x18a)]?.['on']('data',_0x32852b=>{const _0x2af59a=_0x4d6722;_0xd3f981+=_0x32852b[_0x2af59a(0x18d)]();}),_0xa5e0b4['on'](_0x4d6722(0x172),_0x84995=>{const _0x7f6696=_0x4d6722,_0x165a34=Date['now']()-_0x4cd0fa;if(_0x84995===0x0||_0x84995===null)logger[_0x7f6696(0x189)](_0x7f6696(0x188),_0x7f6696(0x183),_0x165a34),_0x631bd9();else{const _0x85db75={'exitCode':_0x84995,'duration':_0x165a34,'command':_0x7f6696(0x182),'cwd':process[_0x7f6696(0x18f)]()};_0xd3f981[_0x7f6696(0x17a)]()&&(_0x85db75['stderr']=_0xd3f981[_0x7f6696(0x17a)]()),logger['error'](_0x7f6696(0x188),_0x7f6696(0x175),_0x85db75),_0x8bbe8d(new Error(_0x7f6696(0x171)+_0x84995));}}),_0xa5e0b4['on'](_0x4d6722(0x181),_0x952328=>{const _0x478150=_0x4d6722,_0x57e9eb=Date[_0x478150(0x170)]()-_0x4cd0fa;logger['error'](_0x478150(0x188),_0x478150(0x176),{'error':_0x952328['message'],'duration':_0x57e9eb,'stderr':_0xd3f981['trim']()||undefined}),_0x8bbe8d(_0x952328);});});}function a20_0x1518(){const _0x643878=['stderr','217OvxzgM','.bin','toString','info','cwd','PATH','now','vite\x20preview\x20exited\x20with\x20code\x20','close','20xGeWVl','启动预览服务器','预览服务器启动失败','预览服务器启动出错','inherit','3558iDzNFI','373916TACtSq','trim','3245jLrCoc','node_modules','env','1096479GnnwgP','35176MIMEXK','9AmUaCx','error','vite\x20preview','预览服务器启动成功','367019bjwgNU','1755588ymsLED','3156329dFLIki','vite','preview','success'];a20_0x1518=function(){return _0x643878;};return a20_0x1518();}
1
+ (function(_0x21bac9,_0x8baaef){const _0x55ec0e=a23_0x524f,_0x38d689=_0x21bac9();while(!![]){try{const _0x18283c=-parseInt(_0x55ec0e(0x203))/0x1*(-parseInt(_0x55ec0e(0x1ee))/0x2)+-parseInt(_0x55ec0e(0x1fa))/0x3*(parseInt(_0x55ec0e(0x1ef))/0x4)+parseInt(_0x55ec0e(0x1f3))/0x5*(-parseInt(_0x55ec0e(0x1f8))/0x6)+parseInt(_0x55ec0e(0x202))/0x7*(-parseInt(_0x55ec0e(0x1fd))/0x8)+-parseInt(_0x55ec0e(0x209))/0x9+parseInt(_0x55ec0e(0x207))/0xa*(parseInt(_0x55ec0e(0x1fe))/0xb)+parseInt(_0x55ec0e(0x1f5))/0xc*(parseInt(_0x55ec0e(0x1f7))/0xd);if(_0x18283c===_0x8baaef)break;else _0x38d689['push'](_0x38d689['shift']());}catch(_0x456072){_0x38d689['push'](_0x38d689['shift']());}}}(a23_0x1cfe,0x7550e));import{delimiter,join}from'node:path';import{spawn}from'node:child_process';function a23_0x524f(_0x4b8c5a,_0xe65301){const _0x1cfe3d=a23_0x1cfe();return a23_0x524f=function(_0x524f20,_0x2623ca){_0x524f20=_0x524f20-0x1ee;let _0x2911a8=_0x1cfe3d[_0x524f20];return _0x2911a8;},a23_0x524f(_0x4b8c5a,_0xe65301);}import{logger}from'../utils/logger.js';function a23_0x1cfe(){const _0x53776d=['inherit','7908PEYgDy','8GfNDcb','close','error','stderr','131780vyWFIs','预览服务器启动出错','761784aMotol','vite\x20preview','364fCBNaE','138NZBWsr','info','757173QyEjzn','预览服务器启动成功','node_modules','21552WtjdCi','11klxNQw','preview','vite','env','497nDhbwX','77okKXgY','now','toString','pipe','315160oroRRG','data','2976300HVtwYJ','启动预览服务器','cwd','message','success'];a23_0x1cfe=function(){return _0x53776d;};return a23_0x1cfe();}export function runPreview(){return new Promise((_0x510a47,_0x399f98)=>{const _0x58405d=a23_0x524f,_0x899c9b=Date[_0x58405d(0x204)]();logger[_0x58405d(0x1f9)](_0x58405d(0x1ff),_0x58405d(0x20a),{'command':_0x58405d(0x1f6)});let _0x329e81='';const _0x13b6b8=spawn(_0x58405d(0x200),[_0x58405d(0x1ff)],{'stdio':['inherit',_0x58405d(0x20e),_0x58405d(0x206)],'shell':!![],'env':{...process[_0x58405d(0x201)],'PATH':''+join(process['cwd'](),_0x58405d(0x1fc),'.bin')+delimiter+process['env']['PATH']}});_0x13b6b8[_0x58405d(0x1f2)]?.['on'](_0x58405d(0x208),_0x2b870a=>{const _0x52f4c0=_0x58405d;_0x329e81+=_0x2b870a[_0x52f4c0(0x205)]();}),_0x13b6b8['on'](_0x58405d(0x1f0),_0xab7b7b=>{const _0x11b983=_0x58405d,_0x260ea1=Date[_0x11b983(0x204)]()-_0x899c9b;if(_0xab7b7b===0x0||_0xab7b7b===null)logger[_0x11b983(0x20d)](_0x11b983(0x1ff),_0x11b983(0x1fb),_0x260ea1),_0x510a47();else{const _0x2b3197={'exitCode':_0xab7b7b,'duration':_0x260ea1,'command':_0x11b983(0x1f6),'cwd':process[_0x11b983(0x20b)]()};_0x329e81['trim']()&&(_0x2b3197[_0x11b983(0x1f2)]=_0x329e81['trim']()),logger[_0x11b983(0x1f1)](_0x11b983(0x1ff),'预览服务器启动失败',_0x2b3197),_0x399f98(new Error('vite\x20preview\x20exited\x20with\x20code\x20'+_0xab7b7b));}}),_0x13b6b8['on'](_0x58405d(0x1f1),_0x3b4eae=>{const _0x2e7b67=_0x58405d,_0x4201a6=Date[_0x2e7b67(0x204)]()-_0x899c9b;logger['error']('preview',_0x2e7b67(0x1f4),{'error':_0x3b4eae[_0x2e7b67(0x20c)],'duration':_0x4201a6,'stderr':_0x329e81['trim']()||undefined}),_0x399f98(_0x3b4eae);});});}
package/lib/cmd/start.js CHANGED
@@ -1 +1 @@
1
- function a21_0x25b1(_0x1095df,_0x130966){const _0x5044d7=a21_0x5044();return a21_0x25b1=function(_0x25b176,_0x1b76f2){_0x25b176=_0x25b176-0xf5;let _0x37deee=_0x5044d7[_0x25b176];return _0x37deee;},a21_0x25b1(_0x1095df,_0x130966);}(function(_0x99d8d1,_0x380b94){const _0x3397f2=a21_0x25b1,_0x41d2ea=_0x99d8d1();while(!![]){try{const _0x53ef80=-parseInt(_0x3397f2(0x114))/0x1*(parseInt(_0x3397f2(0x112))/0x2)+-parseInt(_0x3397f2(0x100))/0x3*(-parseInt(_0x3397f2(0x10f))/0x4)+-parseInt(_0x3397f2(0x10c))/0x5*(parseInt(_0x3397f2(0x107))/0x6)+-parseInt(_0x3397f2(0x102))/0x7*(-parseInt(_0x3397f2(0x101))/0x8)+-parseInt(_0x3397f2(0x109))/0x9+parseInt(_0x3397f2(0x106))/0xa*(-parseInt(_0x3397f2(0x10b))/0xb)+parseInt(_0x3397f2(0xff))/0xc;if(_0x53ef80===_0x380b94)break;else _0x41d2ea['push'](_0x41d2ea['shift']());}catch(_0x5741e4){_0x41d2ea['push'](_0x41d2ea['shift']());}}}(a21_0x5044,0x6f879));import{delimiter,join}from'node:path';import{spawn}from'node:child_process';function a21_0x5044(){const _0x668bc2=['inherit','error','trim','stderr','data','26521344LIhFCK','187293xpHuss','192vsBeAF','217819UdnOae','message','开发服务器启动出错','.bin','150XcFXJf','6UNuZFd','now','4106421TTrcxt','toString','479721ZvujIl','3775685jztEQY','node_modules','vite','8MSLHUs','info','cwd','759386fieOOf','start','2oHPAhu','PATH','write','pipe','close','开发服务器启动失败','开发服务器启动成功','启动开发服务器'];a21_0x5044=function(){return _0x668bc2;};return a21_0x5044();}import{logger}from'../utils/logger.js';export function runStart(_0x24fa37){return new Promise((_0x579317,_0x14584f)=>{const _0x2a394c=a21_0x25b1,_0x3e6d8c=Date[_0x2a394c(0x108)](),_0x21492c=_0x24fa37||process[_0x2a394c(0x111)]();logger[_0x2a394c(0x110)]('start',_0x2a394c(0xf9),{'command':'vite','cwd':_0x21492c});let _0x24ed4f='';const _0x5c869a=spawn(_0x2a394c(0x10e),{'stdio':[_0x2a394c(0xfa),_0x2a394c(0xfa),_0x2a394c(0xf5)],'shell':!![],'cwd':_0x21492c,'env':{...process['env'],'PATH':''+join(_0x21492c,_0x2a394c(0x10d),_0x2a394c(0x105))+delimiter+process['env'][_0x2a394c(0x115)]}});_0x5c869a[_0x2a394c(0xfd)]?.['on'](_0x2a394c(0xfe),_0x12cd04=>{const _0x1cf35a=_0x2a394c,_0x68d221=_0x12cd04[_0x1cf35a(0x10a)]();_0x24ed4f+=_0x68d221,process[_0x1cf35a(0xfd)][_0x1cf35a(0x116)](_0x68d221);}),_0x5c869a['on'](_0x2a394c(0xf6),_0x3d45d7=>{const _0xeb3654=_0x2a394c,_0x45e5e1=Date[_0xeb3654(0x108)]()-_0x3e6d8c;if(_0x3d45d7===0x0||_0x3d45d7===null)logger['success'](_0xeb3654(0x113),_0xeb3654(0xf8),_0x45e5e1),_0x579317();else{const _0x52cc01={'exitCode':_0x3d45d7,'duration':_0x45e5e1,'command':_0xeb3654(0x10e),'cwd':_0x21492c};_0x24ed4f['trim']()&&(_0x52cc01[_0xeb3654(0xfd)]=_0x24ed4f[_0xeb3654(0xfc)]()),logger[_0xeb3654(0xfb)](_0xeb3654(0x113),_0xeb3654(0xf7),_0x52cc01),_0x14584f(new Error('vite\x20exited\x20with\x20code\x20'+_0x3d45d7));}}),_0x5c869a['on'](_0x2a394c(0xfb),_0xa0fd4c=>{const _0x40a5f3=_0x2a394c,_0x3371bf=Date[_0x40a5f3(0x108)]()-_0x3e6d8c,_0x203528={'error':_0xa0fd4c[_0x40a5f3(0x103)],'duration':_0x3371bf,'command':_0x40a5f3(0x10e),'cwd':_0x21492c};_0x24ed4f[_0x40a5f3(0xfc)]()&&(_0x203528[_0x40a5f3(0xfd)]=_0x24ed4f[_0x40a5f3(0xfc)]()),logger[_0x40a5f3(0xfb)](_0x40a5f3(0x113),_0x40a5f3(0x104),_0x203528),_0x14584f(_0xa0fd4c);});});}
1
+ (function(_0x41f459,_0x5946f7){const _0x4fc3a2=a24_0x1c37,_0x42d351=_0x41f459();while(!![]){try{const _0x37b283=-parseInt(_0x4fc3a2(0x1a9))/0x1*(parseInt(_0x4fc3a2(0x1b0))/0x2)+parseInt(_0x4fc3a2(0x19f))/0x3*(parseInt(_0x4fc3a2(0x1aa))/0x4)+-parseInt(_0x4fc3a2(0x1b4))/0x5*(parseInt(_0x4fc3a2(0x1b3))/0x6)+parseInt(_0x4fc3a2(0x1a4))/0x7*(-parseInt(_0x4fc3a2(0x198))/0x8)+-parseInt(_0x4fc3a2(0x197))/0x9+parseInt(_0x4fc3a2(0x19a))/0xa*(parseInt(_0x4fc3a2(0x1ad))/0xb)+-parseInt(_0x4fc3a2(0x1ae))/0xc*(-parseInt(_0x4fc3a2(0x19d))/0xd);if(_0x37b283===_0x5946f7)break;else _0x42d351['push'](_0x42d351['shift']());}catch(_0x4ea580){_0x42d351['push'](_0x42d351['shift']());}}}(a24_0x3ad5,0x77486));import{delimiter,join}from'node:path';import{spawn}from'node:child_process';function a24_0x1c37(_0x1d6fa8,_0x533511){const _0x3ad510=a24_0x3ad5();return a24_0x1c37=function(_0x1c3780,_0x1f8e2d){_0x1c3780=_0x1c3780-0x195;let _0x4176cf=_0x3ad510[_0x1c3780];return _0x4176cf;},a24_0x1c37(_0x1d6fa8,_0x533511);}import{logger}from'../utils/logger.js';function a24_0x3ad5(){const _0x5bce09=['.bin','toString','2866284XlGain','20128TwAboj','启动开发服务器','30gXaQVk','vite','cwd','8879JgQukX','vite\x20exited\x20with\x20code\x20','3bVBKfQ','inherit','开发服务器启动失败','info','node_modules','1841CStfxV','trim','error','message','success','1757DDHcAZ','1839848QefjyJ','start','开发服务器启动成功','2581733kGOIMy','7404BXYMoN','stderr','52kWGHEX','data','pipe','213102IVESPz','10SypYdg'];a24_0x3ad5=function(){return _0x5bce09;};return a24_0x3ad5();}export function runStart(_0x23ebdd){return new Promise((_0x15d4f1,_0x4524ed)=>{const _0x5b3f0a=a24_0x1c37,_0x72781b=Date['now'](),_0x2af175=_0x23ebdd||process[_0x5b3f0a(0x19c)]();logger[_0x5b3f0a(0x1a2)](_0x5b3f0a(0x1ab),_0x5b3f0a(0x199),{'command':_0x5b3f0a(0x19b),'cwd':_0x2af175});let _0x5b431b='';const _0x3e87e1=spawn(_0x5b3f0a(0x19b),{'stdio':[_0x5b3f0a(0x1a0),_0x5b3f0a(0x1a0),_0x5b3f0a(0x1b2)],'shell':!![],'cwd':_0x2af175,'env':{...process['env'],'PATH':''+join(_0x2af175,_0x5b3f0a(0x1a3),_0x5b3f0a(0x195))+delimiter+process['env']['PATH']}});_0x3e87e1[_0x5b3f0a(0x1af)]?.['on'](_0x5b3f0a(0x1b1),_0x28399d=>{const _0x1b7c5d=_0x5b3f0a,_0x1f6d55=_0x28399d[_0x1b7c5d(0x196)]();_0x5b431b+=_0x1f6d55,process['stderr']['write'](_0x1f6d55);}),_0x3e87e1['on']('close',_0xe72c55=>{const _0x184385=_0x5b3f0a,_0x2e7d3f=Date['now']()-_0x72781b;if(_0xe72c55===0x0||_0xe72c55===null)logger[_0x184385(0x1a8)]('start',_0x184385(0x1ac),_0x2e7d3f),_0x15d4f1();else{const _0x59d3c5={'exitCode':_0xe72c55,'duration':_0x2e7d3f,'command':_0x184385(0x19b),'cwd':_0x2af175};_0x5b431b[_0x184385(0x1a5)]()&&(_0x59d3c5[_0x184385(0x1af)]=_0x5b431b[_0x184385(0x1a5)]()),logger[_0x184385(0x1a6)](_0x184385(0x1ab),_0x184385(0x1a1),_0x59d3c5),_0x4524ed(new Error(_0x184385(0x19e)+_0xe72c55));}}),_0x3e87e1['on'](_0x5b3f0a(0x1a6),_0x3e2d70=>{const _0x2b4fca=_0x5b3f0a,_0x29a691=Date['now']()-_0x72781b,_0x2aa386={'error':_0x3e2d70[_0x2b4fca(0x1a7)],'duration':_0x29a691,'command':_0x2b4fca(0x19b),'cwd':_0x2af175};_0x5b431b['trim']()&&(_0x2aa386['stderr']=_0x5b431b['trim']()),logger[_0x2b4fca(0x1a6)](_0x2b4fca(0x1ab),'开发服务器启动出错',_0x2aa386),_0x4524ed(_0x3e2d70);});});}
@@ -1 +1 @@
1
- function a22_0x4365(){const _0x1caded=['获取配置项','lovrabet\x20config\x20set\x20app\x20app-xxxxx\x20\x20\x20','配置当前项目的\x20App\x20Code','无效的命令,可用命令如下:','485586fBwXCQ','3235644YgQxsD','description','505jlqdxw','lovrabet\x20config\x20list\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','lovrabet\x20config\x20get\x20<key>\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20*\x20配置示例:','gray','map','lovrabet\x20config\x20set\x20<key>\x20<value>\x20\x20\x20','827583tWrPnf','54744GNazIJ','command','2057937MdpfQy','411414unNXou','lovrabet\x20config\x20set\x20env\x20daily\x20\x20\x20\x20\x20\x20\x20','设置环境\x20(online/daily)','4260528RCHQsh','设置配置项'];a22_0x4365=function(){return _0x1caded;};return a22_0x4365();}(function(_0xa93a95,_0x304b87){const _0x4ebc63=a22_0x2b0f,_0x55ca49=_0xa93a95();while(!![]){try{const _0x919aa8=parseInt(_0x4ebc63(0x86))/0x1+-parseInt(_0x4ebc63(0x8f))/0x2+-parseInt(_0x4ebc63(0x82))/0x3+parseInt(_0x4ebc63(0x90))/0x4+-parseInt(_0x4ebc63(0x92))/0x5*(parseInt(_0x4ebc63(0x83))/0x6)+parseInt(_0x4ebc63(0x85))/0x7+parseInt(_0x4ebc63(0x89))/0x8;if(_0x919aa8===_0x304b87)break;else _0x55ca49['push'](_0x55ca49['shift']());}catch(_0x37bf10){_0x55ca49['push'](_0x55ca49['shift']());}}}(a22_0x4365,0x941f0));import{jsxs as a22_0x47a3ae,jsx as a22_0x51a77f}from'react/jsx-runtime';function a22_0x2b0f(_0x66485f,_0xce154b){const _0x4365c3=a22_0x4365();return a22_0x2b0f=function(_0x2b0fdc,_0x5808fc){_0x2b0fdc=_0x2b0fdc-0x7c;let _0x112286=_0x4365c3[_0x2b0fdc];return _0x112286;},a22_0x2b0f(_0x66485f,_0xce154b);}import{Box,Text}from'ink';export function ConfigHelp(){const _0x32466b=a22_0x2b0f,_0x42cfa0=[{'command':_0x32466b(0x81),'description':_0x32466b(0x8a)},{'command':_0x32466b(0x7d),'description':_0x32466b(0x8b)},{'command':_0x32466b(0x7c),'description':'列出所有配置项'}],_0x4c39bd=[{'command':_0x32466b(0x8c),'description':_0x32466b(0x8d)},{'command':_0x32466b(0x87),'description':_0x32466b(0x88)}];return a22_0x47a3ae(Box,{'flexDirection':'column','marginTop':0x1,'marginBottom':0x1,'children':[a22_0x51a77f(Box,{'marginBottom':0x1,'children':a22_0x47a3ae(Text,{'color':_0x32466b(0x7f),'children':['\x20!','\x20\x20',_0x32466b(0x8e)]})}),_0x42cfa0[_0x32466b(0x80)](_0x283953=>a22_0x47a3ae(Box,{'children':[a22_0x47a3ae(Text,{'children':['\x20\x20\x20\x20',_0x283953[_0x32466b(0x84)]]}),a22_0x51a77f(Text,{'color':_0x32466b(0x7f),'children':_0x283953[_0x32466b(0x91)]})]},_0x283953[_0x32466b(0x84)])),a22_0x51a77f(Box,{'marginTop':0x1,'marginBottom':0x1,'children':a22_0x51a77f(Text,{'color':_0x32466b(0x7f),'children':_0x32466b(0x7e)})}),_0x4c39bd[_0x32466b(0x80)](_0x3041fa=>a22_0x47a3ae(Box,{'children':[a22_0x47a3ae(Text,{'children':['\x20\x20\x20\x20',_0x3041fa[_0x32466b(0x84)]]}),a22_0x51a77f(Text,{'color':_0x32466b(0x7f),'children':_0x3041fa[_0x32466b(0x91)]})]},_0x3041fa['command']))]});}
1
+ function a25_0x3724(){const _0x44cd6c=['command','4FdRCPE','312rCoENp','无效的命令,可用命令如下:','6gHxnra','列出所有配置项','803giGfbR','lovrabet\x20config\x20get\x20<key>\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','4523919ikBxdq','27ruwIZp','设置配置项','762bNyOYy','3829560ywGFJw','lovrabet\x20config\x20set\x20app\x20app-xxxxx\x20\x20\x20','column','lovrabet\x20config\x20list\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','6354985YAjxKM','设置环境\x20(online/daily)','350203wyKPem','gray','1046914XOsoxh','获取配置项','3054608XuIOGe','map','lovrabet\x20config\x20set\x20<key>\x20<value>\x20\x20\x20','description'];a25_0x3724=function(){return _0x44cd6c;};return a25_0x3724();}(function(_0xb3ffc2,_0x1d8b40){const _0x5a55e1=a25_0x4263,_0x31ca58=_0xb3ffc2();while(!![]){try{const _0x19c3f2=parseInt(_0x5a55e1(0x145))/0x1*(-parseInt(_0x5a55e1(0x14a))/0x2)+parseInt(_0x5a55e1(0x147))/0x3+parseInt(_0x5a55e1(0x140))/0x4*(parseInt(_0x5a55e1(0x14f))/0x5)+-parseInt(_0x5a55e1(0x143))/0x6*(-parseInt(_0x5a55e1(0x151))/0x7)+parseInt(_0x5a55e1(0x155))/0x8*(parseInt(_0x5a55e1(0x148))/0x9)+-parseInt(_0x5a55e1(0x14b))/0xa+parseInt(_0x5a55e1(0x153))/0xb*(-parseInt(_0x5a55e1(0x141))/0xc);if(_0x19c3f2===_0x1d8b40)break;else _0x31ca58['push'](_0x31ca58['shift']());}catch(_0x3f3cbf){_0x31ca58['push'](_0x31ca58['shift']());}}}(a25_0x3724,0xc602e));function a25_0x4263(_0x5b8023,_0x212d00){const _0x372445=a25_0x3724();return a25_0x4263=function(_0x42635c,_0x2b1e2d){_0x42635c=_0x42635c-0x13f;let _0x851f8b=_0x372445[_0x42635c];return _0x851f8b;},a25_0x4263(_0x5b8023,_0x212d00);}import{jsxs as a25_0x38be5d,jsx as a25_0x28eb42}from'react/jsx-runtime';import{Box,Text}from'ink';export function ConfigHelp(){const _0xb3015e=a25_0x4263,_0x57181f=[{'command':_0xb3015e(0x157),'description':_0xb3015e(0x149)},{'command':_0xb3015e(0x146),'description':_0xb3015e(0x154)},{'command':_0xb3015e(0x14e),'description':_0xb3015e(0x144)}],_0x3471b4=[{'command':_0xb3015e(0x14c),'description':'配置当前项目的\x20App\x20Code'},{'command':'lovrabet\x20config\x20set\x20env\x20daily\x20\x20\x20\x20\x20\x20\x20','description':_0xb3015e(0x150)}];return a25_0x38be5d(Box,{'flexDirection':_0xb3015e(0x14d),'marginTop':0x1,'marginBottom':0x1,'children':[a25_0x28eb42(Box,{'marginBottom':0x1,'children':a25_0x38be5d(Text,{'color':_0xb3015e(0x152),'children':['\x20!','\x20\x20',_0xb3015e(0x142)]})}),_0x57181f['map'](_0x436519=>a25_0x38be5d(Box,{'children':[a25_0x38be5d(Text,{'children':['\x20\x20\x20\x20',_0x436519[_0xb3015e(0x13f)]]}),a25_0x28eb42(Text,{'color':_0xb3015e(0x152),'children':_0x436519[_0xb3015e(0x158)]})]},_0x436519[_0xb3015e(0x13f)])),a25_0x28eb42(Box,{'marginTop':0x1,'marginBottom':0x1,'children':a25_0x28eb42(Text,{'color':_0xb3015e(0x152),'children':'\x20*\x20配置示例:'})}),_0x3471b4[_0xb3015e(0x156)](_0x5235e8=>a25_0x38be5d(Box,{'children':[a25_0x38be5d(Text,{'children':['\x20\x20\x20\x20',_0x5235e8[_0xb3015e(0x13f)]]}),a25_0x28eb42(Text,{'color':_0xb3015e(0x152),'children':_0x5235e8['description']})]},_0x5235e8[_0xb3015e(0x13f)]))]});}
@@ -1 +1 @@
1
- (function(_0x84d781,_0x26a213){const _0x438415=a23_0x20ae,_0x33b4fb=_0x84d781();while(!![]){try{const _0x2a0bbe=parseInt(_0x438415(0xc7))/0x1+parseInt(_0x438415(0xbf))/0x2+-parseInt(_0x438415(0xab))/0x3*(parseInt(_0x438415(0xbb))/0x4)+parseInt(_0x438415(0xc8))/0x5*(-parseInt(_0x438415(0xac))/0x6)+parseInt(_0x438415(0xc1))/0x7*(-parseInt(_0x438415(0xb9))/0x8)+-parseInt(_0x438415(0xae))/0x9+parseInt(_0x438415(0xc6))/0xa*(parseInt(_0x438415(0xb4))/0xb);if(_0x2a0bbe===_0x26a213)break;else _0x33b4fb['push'](_0x33b4fb['shift']());}catch(_0x2be005){_0x33b4fb['push'](_0x33b4fb['shift']());}}}(a23_0x4ffb,0x87f63));function a23_0x20ae(_0x250ae5,_0x2f73f2){const _0x4ffbd0=a23_0x4ffb();return a23_0x20ae=function(_0x20ae23,_0x2fb626){_0x20ae23=_0x20ae23-0xa9;let _0x25a163=_0x4ffbd0[_0x20ae23];return _0x25a163;},a23_0x20ae(_0x250ae5,_0x2f73f2);}import{jsx as a23_0x343646,jsxs as a23_0x57ac06}from'react/jsx-runtime';import{existsSync,readFileSync,writeFileSync}from'node:fs';import a23_0x4b6188 from'node:fs';import a23_0x3f26df from'node:path';import{ConfigHelp}from'./config-help.js';import{Box,Text}from'ink';import{readConfig,isInProject,projectConfigPath,globalConfigPath}from'../utils/config.js';function a23_0x4ffb(){const _0x568209=['unlinkSync','3017fkxpnk','环境配置已设置为:\x20','get','dirname','--help','7181450xkpgMU','487682BOAitx','10PLmJXY','string','includes','配置值无效或过长','red','list','config','online','utf8','未提供配置值','mkdirSync','9rAqttd','3099882XBnTYG','env','1567476kCbFOJ','flags','error','input','保存配置失败','环境配置值只能是\x20\x22online\x22\x20或\x20\x22daily\x22','33JXWcmz','stringify','parse','log','help','5432oPdrrS','message','1063076ZoLmXP','set','undefined','.tmp','424392SsYgLl'];a23_0x4ffb=function(){return _0x568209;};return a23_0x4ffb();}import{logger}from'../utils/logger.js';export function Config(_0x2fadbd){const _0x407b91=a23_0x20ae,{cli:_0x20f854}=_0x2fadbd,_0x42a0bf=_0x20f854[_0x407b91(0xb1)][0x1],_0x5f5719=_0x20f854[_0x407b91(0xb1)][0x2],_0x404d10=[_0x407b91(0xbc),_0x407b91(0xc3)]['includes'](_0x42a0bf||''),_0x59b7f1=_0x20f854[_0x407b91(0xb1)]['length']>=0x3;if(_0x5f5719===_0x407b91(0xc5)||_0x20f854[_0x407b91(0xaf)][_0x407b91(0xb8)])return a23_0x343646(ConfigHelp,{});const _0x5bca65=readConfig();if(_0x42a0bf===_0x407b91(0xbc)){if(_0x5f5719){const _0x37d875=_0x20f854[_0x407b91(0xb1)][0x3];if(typeof _0x37d875!==_0x407b91(0xbd)){if(_0x5f5719==='env'&&![_0x407b91(0xcf),'daily'][_0x407b91(0xca)](_0x37d875))return a23_0x343646(Box,{'children':a23_0x343646(Text,{'color':_0x407b91(0xcc),'children':_0x407b91(0xb3)})});const _0x3638ff=isInProject(),_0xc41be6=_0x3638ff?projectConfigPath:globalConfigPath;let _0x162683={};try{if(existsSync(_0xc41be6)){const _0x5808f4=readFileSync(_0xc41be6,{'encoding':_0x407b91(0xd0)});_0x5808f4&&(_0x162683=JSON[_0x407b91(0xb6)](_0x5808f4));}}catch(_0x3c65f0){}if(typeof _0x37d875!==_0x407b91(0xc9)||_0x37d875['length']>0x1f4)return a23_0x343646(Box,{'children':a23_0x343646(Text,{'color':_0x407b91(0xcc),'children':_0x407b91(0xcb)})});_0x162683[_0x5f5719]=_0x37d875;try{const _0x3cf98f=a23_0x3f26df[_0x407b91(0xc4)](_0xc41be6);!existsSync(_0x3cf98f)&&a23_0x4b6188[_0x407b91(0xaa)](_0x3cf98f,{'recursive':!![]});const _0x32729d=_0xc41be6+_0x407b91(0xbe);writeFileSync(_0x32729d,JSON[_0x407b91(0xb5)](_0x162683,null,0x2),{'encoding':_0x407b91(0xd0),'mode':0x180}),a23_0x4b6188['renameSync'](_0x32729d,_0xc41be6);if(_0x5f5719===_0x407b91(0xad)){const _0x12f4f0=_0x3638ff?'项目':'全局';console['log']('✓\x20'+_0x12f4f0+_0x407b91(0xc2)+_0x37d875);}}catch(_0x3f3156){const _0x725e86=_0xc41be6+_0x407b91(0xbe);try{existsSync(_0x725e86)&&a23_0x4b6188[_0x407b91(0xc0)](_0x725e86);}catch(_0x5acb86){}return logger[_0x407b91(0xb0)](_0x407b91(0xce),_0x407b91(0xb2),{'error':_0x3f3156 instanceof Error?_0x3f3156[_0x407b91(0xba)]:String(_0x3f3156),'configKey':_0x5f5719,'configValue':_0x37d875,'targetConfigPath':_0xc41be6}),a23_0x343646(Box,{'children':a23_0x57ac06(Text,{'color':'red','children':['保存配置失败:\x20',_0x3f3156 instanceof Error?_0x3f3156[_0x407b91(0xba)]:String(_0x3f3156)]})});}return null;}return a23_0x343646(Box,{'children':a23_0x343646(Text,{'color':_0x407b91(0xcc),'children':_0x407b91(0xa9)})});}}if(_0x42a0bf===_0x407b91(0xc3)){if(_0x5f5719)return console[_0x407b91(0xb7)](_0x5bca65[_0x5f5719]||_0x407b91(0xbd)),null;return null;}if(_0x42a0bf===_0x407b91(0xcd))return console[_0x407b91(0xb7)](JSON['stringify'](_0x5bca65,null,0x2)),null;if(!_0x404d10||!_0x59b7f1)return a23_0x343646(ConfigHelp,{});return null;}
1
+ (function(_0x42338f,_0xc64d95){const _0x50428e=a26_0xac39,_0xe50552=_0x42338f();while(!![]){try{const _0x139a8e=parseInt(_0x50428e(0x1a2))/0x1*(-parseInt(_0x50428e(0x1af))/0x2)+parseInt(_0x50428e(0x1ba))/0x3*(parseInt(_0x50428e(0x1bb))/0x4)+parseInt(_0x50428e(0x1a8))/0x5+-parseInt(_0x50428e(0x1ab))/0x6*(parseInt(_0x50428e(0x1b8))/0x7)+parseInt(_0x50428e(0x1ad))/0x8+-parseInt(_0x50428e(0x1bc))/0x9*(parseInt(_0x50428e(0x1be))/0xa)+parseInt(_0x50428e(0x1a7))/0xb;if(_0x139a8e===_0xc64d95)break;else _0xe50552['push'](_0xe50552['shift']());}catch(_0x4033c2){_0xe50552['push'](_0xe50552['shift']());}}}(a26_0x58df,0x525da));import{jsx as a26_0x254279,jsxs as a26_0x1c2bb8}from'react/jsx-runtime';function a26_0x58df(){const _0x2882b4=['parse','35dluvPl','config','3iZnaNt','1081652PPmlWO','9sLLUEE','unlinkSync','4887490nSPNhF','环境配置值只能是\x20\x22online\x22\x20或\x20\x22daily\x22','utf8','renameSync','online','string','dirname','env','log','get','67965btaPxw','list','includes','undefined','app','6052497iTPBvI','110190NaCafO','.tmp','appcode','345990kUxSzA','message','3261568MnbGzu','set','4kGzqBS','保存配置失败:\x20','input','help','red','保存配置失败','配置值无效或过长','环境配置已设置为:\x20'];a26_0x58df=function(){return _0x2882b4;};return a26_0x58df();}function a26_0xac39(_0x26d6b2,_0x46f5ab){const _0x58df9f=a26_0x58df();return a26_0xac39=function(_0xac3947,_0x30d21b){_0xac3947=_0xac3947-0x19f;let _0x5375cd=_0x58df9f[_0xac3947];return _0x5375cd;},a26_0xac39(_0x26d6b2,_0x46f5ab);}import{existsSync,readFileSync,writeFileSync}from'node:fs';import a26_0x3fd9af from'node:fs';import a26_0x2b726e 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(_0x4d072e){const _0xa098f3=a26_0xac39,{cli:_0x5f3952}=_0x4d072e,_0x2545ac=_0x5f3952[_0xa098f3(0x1b1)][0x1],_0x15df23=_0x5f3952[_0xa098f3(0x1b1)][0x2],_0x36e5a7=[_0xa098f3(0x1ae),'get'][_0xa098f3(0x1a4)](_0x2545ac||''),_0xefc67a=_0x5f3952[_0xa098f3(0x1b1)]['length']>=0x3;if(_0x15df23==='--help'||_0x5f3952['flags'][_0xa098f3(0x1b2)])return a26_0x254279(ConfigHelp,{});const _0x59e578=readConfig();if(_0x2545ac===_0xa098f3(0x1ae)){if(_0x15df23){const _0x53f906=_0x5f3952[_0xa098f3(0x1b1)][0x3];if(typeof _0x53f906!==_0xa098f3(0x1a5)){if(_0x15df23===_0xa098f3(0x19f)&&![_0xa098f3(0x1c2),'daily']['includes'](_0x53f906))return a26_0x254279(Box,{'children':a26_0x254279(Text,{'color':_0xa098f3(0x1b3),'children':_0xa098f3(0x1bf)})});const _0x4202fb=isInProject(),_0x2299c8=_0x4202fb?projectConfigPath:globalConfigPath;let _0x5eaacb={};try{if(existsSync(_0x2299c8)){const _0x299c2b=readFileSync(_0x2299c8,{'encoding':_0xa098f3(0x1c0)});_0x299c2b&&(_0x5eaacb=JSON[_0xa098f3(0x1b7)](_0x299c2b));}}catch(_0x239bf2){}if(typeof _0x53f906!==_0xa098f3(0x1c3)||_0x53f906['length']>0x1f4)return a26_0x254279(Box,{'children':a26_0x254279(Text,{'color':_0xa098f3(0x1b3),'children':_0xa098f3(0x1b5)})});let _0x370238=_0x15df23;_0x15df23===_0xa098f3(0x1a6)&&(_0x370238=_0xa098f3(0x1aa),delete _0x5eaacb['app']);_0x15df23===_0xa098f3(0x1aa)&&delete _0x5eaacb[_0xa098f3(0x1a6)];_0x5eaacb[_0x370238]=_0x53f906;try{const _0x17d522=a26_0x2b726e[_0xa098f3(0x1c4)](_0x2299c8);!existsSync(_0x17d522)&&a26_0x3fd9af['mkdirSync'](_0x17d522,{'recursive':!![]});const _0xdb697e=_0x2299c8+_0xa098f3(0x1a9);writeFileSync(_0xdb697e,JSON['stringify'](_0x5eaacb,null,0x2),{'encoding':_0xa098f3(0x1c0),'mode':0x180}),a26_0x3fd9af[_0xa098f3(0x1c1)](_0xdb697e,_0x2299c8);if(_0x15df23===_0xa098f3(0x19f)){const _0x29056e=_0x4202fb?'项目':'全局';console[_0xa098f3(0x1a0)]('✓\x20'+_0x29056e+_0xa098f3(0x1b6)+_0x53f906);}}catch(_0x334cdd){const _0x3e43a6=_0x2299c8+_0xa098f3(0x1a9);try{existsSync(_0x3e43a6)&&a26_0x3fd9af[_0xa098f3(0x1bd)](_0x3e43a6);}catch(_0x20ec9e){}return logger['error'](_0xa098f3(0x1b9),_0xa098f3(0x1b4),{'error':_0x334cdd instanceof Error?_0x334cdd[_0xa098f3(0x1ac)]:String(_0x334cdd),'configKey':_0x15df23,'configValue':_0x53f906,'targetConfigPath':_0x2299c8}),a26_0x254279(Box,{'children':a26_0x1c2bb8(Text,{'color':_0xa098f3(0x1b3),'children':[_0xa098f3(0x1b0),_0x334cdd instanceof Error?_0x334cdd[_0xa098f3(0x1ac)]:String(_0x334cdd)]})});}return null;}return a26_0x254279(Box,{'children':a26_0x254279(Text,{'color':_0xa098f3(0x1b3),'children':'未提供配置值'})});}}if(_0x2545ac===_0xa098f3(0x1a1)){if(_0x15df23){let _0x4e175c=_0x15df23;return _0x15df23===_0xa098f3(0x1a6)&&(_0x4e175c='appcode'),console[_0xa098f3(0x1a0)](_0x59e578[_0x4e175c]||'undefined'),null;}return null;}if(_0x2545ac===_0xa098f3(0x1a3))return console['log'](JSON['stringify'](_0x59e578,null,0x2)),null;if(!_0x36e5a7||!_0xefc67a)return a26_0x254279(ConfigHelp,{});return null;}
@@ -1 +1 @@
1
- function a24_0x1328(){const _0x54b8a0=['4691024XpNGND','1946265lmhFXP','313344qMyoDu','22605RIeAIW','158FjJTPY','8uFTaek','https://user-daily.lovrabet.com','online','6lGeJEY','3758146UvOmDr','4384010afVYev','https://user.lovrabet.com','487172jlFJmO','22GgwPCN','https://daily-api.lovrabet.com'];a24_0x1328=function(){return _0x54b8a0;};return a24_0x1328();}const a24_0x13dc84=a24_0x51fe;(function(_0x2bb7c8,_0x2ee397){const _0x8e892e=a24_0x51fe,_0x5c4219=_0x2bb7c8();while(!![]){try{const _0xf77ce1=-parseInt(_0x8e892e(0x132))/0x1+parseInt(_0x8e892e(0x139))/0x2*(parseInt(_0x8e892e(0x138))/0x3)+parseInt(_0x8e892e(0x135))/0x4+-parseInt(_0x8e892e(0x136))/0x5*(parseInt(_0x8e892e(0x12e))/0x6)+parseInt(_0x8e892e(0x12f))/0x7*(parseInt(_0x8e892e(0x12b))/0x8)+parseInt(_0x8e892e(0x137))/0x9+parseInt(_0x8e892e(0x130))/0xa*(-parseInt(_0x8e892e(0x133))/0xb);if(_0xf77ce1===_0x2ee397)break;else _0x5c4219['push'](_0x5c4219['shift']());}catch(_0x5d19e4){_0x5c4219['push'](_0x5c4219['shift']());}}}(a24_0x1328,0x8f2f8));import{getEnv}from'./env.js';function a24_0x51fe(_0x3b7ffd,_0x4d7da2){const _0x132817=a24_0x1328();return a24_0x51fe=function(_0x51fe55,_0x4c5d1d){_0x51fe55=_0x51fe55-0x12b;let _0x5e8d60=_0x132817[_0x51fe55];return _0x5e8d60;},a24_0x51fe(_0x3b7ffd,_0x4d7da2);}export const getUserDomain=()=>getEnv()===a24_0x13dc84(0x12d)?a24_0x13dc84(0x131):a24_0x13dc84(0x12c);export const getApiDomain=()=>getEnv()===a24_0x13dc84(0x12d)?'https://api.lovrabet.com':a24_0x13dc84(0x134);
1
+ function a27_0x31e3(_0x1e12e6,_0x205adc){const _0x30035f=a27_0x3003();return a27_0x31e3=function(_0x31e326,_0x3eafe8){_0x31e326=_0x31e326-0x116;let _0xacf6d4=_0x30035f[_0x31e326];return _0xacf6d4;},a27_0x31e3(_0x1e12e6,_0x205adc);}const a27_0x3204fc=a27_0x31e3;(function(_0x1acee4,_0x12aad5){const _0x231312=a27_0x31e3,_0x5f0793=_0x1acee4();while(!![]){try{const _0x231a6e=-parseInt(_0x231312(0x11c))/0x1*(parseInt(_0x231312(0x11f))/0x2)+-parseInt(_0x231312(0x119))/0x3+-parseInt(_0x231312(0x121))/0x4*(parseInt(_0x231312(0x11e))/0x5)+-parseInt(_0x231312(0x11b))/0x6*(-parseInt(_0x231312(0x116))/0x7)+parseInt(_0x231312(0x120))/0x8+-parseInt(_0x231312(0x11d))/0x9*(-parseInt(_0x231312(0x11a))/0xa)+parseInt(_0x231312(0x117))/0xb;if(_0x231a6e===_0x12aad5)break;else _0x5f0793['push'](_0x5f0793['shift']());}catch(_0xa66040){_0x5f0793['push'](_0x5f0793['shift']());}}}(a27_0x3003,0x6face));import{getEnv}from'./env.js';export const getUserDomain=()=>getEnv()==='online'?a27_0x3204fc(0x123):'https://user-daily.lovrabet.com';export const getApiDomain=()=>getEnv()===a27_0x3204fc(0x122)?a27_0x3204fc(0x124):a27_0x3204fc(0x118);function a27_0x3003(){const _0x5199aa=['13704edRBlY','1ZSpfnN','53883MqqVhC','1736445ujZeqe','226454iLTCMK','952688agCUse','4UylxUA','online','https://user.lovrabet.com','https://api.lovrabet.com','245YsVvZN','13975500vQlyxS','https://daily-api.lovrabet.com','2534853BxswmV','490IewmAu'];a27_0x3003=function(){return _0x5199aa;};return a27_0x3003();}
@@ -1 +1 @@
1
- function a25_0x191d(_0x5cb20f,_0x427ea6){const _0x455ed0=a25_0x455e();return a25_0x191d=function(_0x191d10,_0xec1f4a){_0x191d10=_0x191d10-0xb8;let _0x25c464=_0x455ed0[_0x191d10];return _0x25c464;},a25_0x191d(_0x5cb20f,_0x427ea6);}const a25_0x118d5e=a25_0x191d;(function(_0x1e9f45,_0x51f284){const _0x3b716b=a25_0x191d,_0x4726ac=_0x1e9f45();while(!![]){try{const _0x512af5=-parseInt(_0x3b716b(0xc2))/0x1*(-parseInt(_0x3b716b(0xb8))/0x2)+parseInt(_0x3b716b(0xb9))/0x3+parseInt(_0x3b716b(0xc1))/0x4*(-parseInt(_0x3b716b(0xbb))/0x5)+parseInt(_0x3b716b(0xbf))/0x6+parseInt(_0x3b716b(0xc0))/0x7+-parseInt(_0x3b716b(0xbd))/0x8*(parseInt(_0x3b716b(0xbc))/0x9)+-parseInt(_0x3b716b(0xba))/0xa;if(_0x512af5===_0x51f284)break;else _0x4726ac['push'](_0x4726ac['shift']());}catch(_0xdfe393){_0x4726ac['push'](_0x4726ac['shift']());}}}(a25_0x455e,0xb7f8a));let env=process[a25_0x118d5e(0xc3)]['LOVRABET_ENV']||a25_0x118d5e(0xbe);export function getEnv(){return env;}function a25_0x455e(){const _0x2b16f7=['1189287rGlbwV','8872070tTfMAQ','430xzjnNW','9YxNmFP','10643048MlQvtq','online','5394618mZIIcX','2812530RXHepd','8008yrGrQq','1168OgMsJd','env','2476JPUHww'];a25_0x455e=function(){return _0x2b16f7;};return a25_0x455e();}export function initEnv(_0x2796a3){env=_0x2796a3;}
1
+ const a28_0x23d692=a28_0x1420;(function(_0x4307b9,_0x455427){const _0x42c951=a28_0x1420,_0x51e329=_0x4307b9();while(!![]){try{const _0xb5f1a4=-parseInt(_0x42c951(0x1df))/0x1+parseInt(_0x42c951(0x1da))/0x2*(-parseInt(_0x42c951(0x1d9))/0x3)+-parseInt(_0x42c951(0x1de))/0x4+parseInt(_0x42c951(0x1e0))/0x5+parseInt(_0x42c951(0x1dd))/0x6+-parseInt(_0x42c951(0x1d6))/0x7+parseInt(_0x42c951(0x1d8))/0x8*(parseInt(_0x42c951(0x1d7))/0x9);if(_0xb5f1a4===_0x455427)break;else _0x51e329['push'](_0x51e329['shift']());}catch(_0x92a7d4){_0x51e329['push'](_0x51e329['shift']());}}}(a28_0x2089,0xed111));let env=process['env'][a28_0x23d692(0x1db)]||a28_0x23d692(0x1dc);export function getEnv(){return env;}function a28_0x1420(_0x2323e1,_0x2bed2b){const _0x20894f=a28_0x2089();return a28_0x1420=function(_0x142035,_0x57ee98){_0x142035=_0x142035-0x1d6;let _0x1aeacd=_0x20894f[_0x142035];return _0x1aeacd;},a28_0x1420(_0x2323e1,_0x2bed2b);}export function initEnv(_0xf58513){env=_0xf58513;}function a28_0x2089(){const _0x5bcee2=['5993610eRQGgv','32442921YWhOUz','8jGgzNQ','3MeULtc','561166IUZJcg','LOVRABET_ENV','online','5616252wGDmMG','6781368GtDuFu','1741101kezjCl','5017350iZzmsl'];a28_0x2089=function(){return _0x5bcee2;};return a28_0x2089();}
@@ -1 +1 @@
1
- function a26_0x3d26(){const _0x36df3e=['green','[可选]:\x20','gray','119112gNilHG','\x20登录中...','应用AppCode','项目名不合法','env','应用AppCode只能包含字母、数字、连字符和下划线,且必须以字母或数字开头','\x20\x20推荐选择\x20Yes,登录后可自动拉取并配置\x20API\x20接口','5loeFHC','\x20←\x20','test','90AllNtW','应用AppCode长度不能超过\x20100\x20个字符','10002090PPkmyW','7qvBkkB','value','login-check','拉取API配置','*\x20是否要先登录以便拉取\x20API\x20配置?','\x20\x20推荐选择\x20Yes,可自动配置\x20API\x20接口','api-pull','length','backspace','rightArrow','red','1097892qrgEVl','2789300rdntsR','1536339mgQgWi','绑定应用AppCode可自动配置\x20API,如:\x20app-c4c89304\x20(直接回车跳过)','trim','*\x20正在检查登录状态...','yellow','\x20检查中...','*\x20正在登录,请前往浏览器完成登录...','*\x20项目名:\x20','my-app','\x20直接回车确认,或输入自定义名称','!\x20未检测到有效登录','login-process','应用AppCode不合法','project-name','\x20\x20使用\x20←→\x20选择,回车确认','5303336dyMHne','项目名长度不能超过\x2050\x20个字符','step','login-prompt','login','delete','715pebJIS','online','creating','跳过登录','slice','Yes','登录失败','6IraPNe','confirm-api-pull','登录状态','719811fRVGnK','app-code','*\x20应用AppCode\x20','*\x20是否要自动拉取\x20API\x20配置?','项目名'];a26_0x3d26=function(){return _0x36df3e;};return a26_0x3d26();}(function(_0x33c1fe,_0x500c14){const _0xc94395=a26_0x423c,_0x6618db=_0x33c1fe();while(!![]){try{const _0x2477ac=parseInt(_0xc94395(0x136))/0x1+-parseInt(_0xc94395(0x134))/0x2*(-parseInt(_0xc94395(0x152))/0x3)+-parseInt(_0xc94395(0x135))/0x4*(parseInt(_0xc94395(0x123))/0x5)+-parseInt(_0xc94395(0x128))/0x6+parseInt(_0xc94395(0x129))/0x7*(-parseInt(_0xc94395(0x145))/0x8)+-parseInt(_0xc94395(0x155))/0x9*(-parseInt(_0xc94395(0x126))/0xa)+-parseInt(_0xc94395(0x14b))/0xb*(-parseInt(_0xc94395(0x11c))/0xc);if(_0x2477ac===_0x500c14)break;else _0x6618db['push'](_0x6618db['shift']());}catch(_0x228f32){_0x6618db['push'](_0x6618db['shift']());}}}(a26_0x3d26,0xed4c7));import{jsx as a26_0x22bcb8,jsxs as a26_0x3060cb,Fragment as a26_0x57d7ba}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 a26_0x423c(_0x265bde,_0x88a94d){const _0x3d2652=a26_0x3d26();return a26_0x423c=function(_0x423c91,_0x1b0cbf){_0x423c91=_0x423c91-0x118;let _0x21b4a4=_0x3d2652[_0x423c91];return _0x21b4a4;},a26_0x423c(_0x265bde,_0x88a94d);}export function EnhancedGuidedCreate(_0x43eb68){const _0x1b345e=a26_0x423c,{onCreate:_0x517e18,env:_0x2e6ca4}=_0x43eb68,[_0x5d9ea9,_0x2e383a]=useState('project-name'),[_0x89a5ee,_0x5c551a]=useState(''),[_0x794e24,_0x1f99ff]=useState(''),[_0x46e158,_0x58a7d8]=useState(''),[_0x44f4d7,_0x2c72e4]=useState(''),[_0x5d4f0c,_0x3c763c]=useState([]),[_0x122372,_0x358a1a]=useState(null),[_0x50c005,_0x20699f]=useState(![]),[_0x1fc0c7,_0x32cd14]=useState(![]),[_0x4560d4,_0x315c40]=useState(![]),[_0x366e0c,_0x1d30bd]=useState(0x0),[_0xf5b855,_0x29ee34]=useState(0x0),_0x49bb59=_0x1b345e(0x13e),_0xca3a9c=readConfig(),_0x2d7964=typeof _0xca3a9c[_0x1b345e(0x120)]==='string'?_0xca3a9c['env']:undefined;function _0x1e3f99(_0x4d413e){const _0x4d2afe=_0x1b345e;if(_0x4d413e[_0x4d2afe(0x130)]>0x32)return{'valid':![],'message':_0x4d2afe(0x146)};const _0x3443f9=/^[A-Za-z0-9][A-Za-z0-9_-]*$/;if(_0x4d413e?.[_0x4d2afe(0x138)]()&&!_0x3443f9[_0x4d2afe(0x125)](_0x4d413e))return{'valid':![],'message':'项目名只能以字母或数字开头,且只包含字母、数字、-\x20和\x20_'};return{'valid':!![]};}function _0x54a67b(_0x42952e){const _0x57a173=_0x1b345e;if(!_0x42952e['trim']())return{'valid':!![]};if(_0x42952e[_0x57a173(0x130)]>0x64)return{'valid':![],'message':_0x57a173(0x127)};const _0x5a0bcc=/^[a-zA-Z0-9][a-zA-Z0-9_-]*$/;if(!_0x5a0bcc['test'](_0x42952e))return{'valid':![],'message':_0x57a173(0x121)};return{'valid':!![]};}async function _0x286c7b(){_0x20699f(!![]);try{const _0x485128=await getIsSessionValid();return _0x358a1a(_0x485128),_0x485128;}catch(_0x16b3b4){return _0x358a1a(![]),![];}finally{_0x20699f(![]);}}async function _0x240c9d(){_0x32cd14(!![]);try{const _0x3be45c=await authServer({'silent':!![]});return _0x358a1a(_0x3be45c),_0x3be45c;}catch(_0x281278){return _0x358a1a(![]),![];}finally{_0x32cd14(![]);}}return useInput(async(_0x3fbb02,_0x383a44)=>{const _0x3de723=_0x1b345e;if(_0x383a44['leftArrow']||_0x383a44[_0x3de723(0x132)]){if(_0x5d9ea9==='confirm-api-pull'){_0x1d30bd(_0x2250c4=>_0x2250c4===0x0?0x1:0x0);return;}if(_0x5d9ea9===_0x3de723(0x148)){_0x29ee34(_0x1ac1d=>_0x1ac1d===0x0?0x1:0x0);return;}}if(_0x383a44['return']){if(_0x5d9ea9===_0x3de723(0x143)){const _0x59b895=_0x46e158[_0x3de723(0x138)]()||_0x49bb59;if(_0x44f4d7)return;_0x5c551a(_0x59b895),_0x3c763c([{'step':'project-name','label':_0x3de723(0x118),'value':_0x59b895}]),_0x58a7d8(''),_0x2c72e4(''),_0x2e383a(_0x3de723(0x156));return;}if(_0x5d9ea9==='app-code'){if(_0x44f4d7)return;const _0x4b1ea0=_0x46e158[_0x3de723(0x138)]();_0x1f99ff(_0x4b1ea0),_0x3c763c(_0x9133f5=>[..._0x9133f5,{'step':_0x3de723(0x156),'label':_0x3de723(0x11e),'value':_0x4b1ea0||'未设置'}]),_0x58a7d8(''),_0x2c72e4('');if(_0x4b1ea0){_0x2e383a(_0x3de723(0x12b));const _0x426fda=await _0x286c7b();_0x426fda?_0x2e383a(_0x3de723(0x153)):_0x2e383a('login-prompt');}else{const _0x142d07=_0x2e6ca4||_0x2d7964||'online';_0x517e18({'projectName':_0x89a5ee,'appCode':undefined,'pullApi':![],'env':_0x142d07}),_0x2e383a('creating');}return;}if(_0x5d9ea9===_0x3de723(0x153)){const _0x18472a=_0x366e0c===0x0;_0x315c40(_0x18472a),_0x3c763c(_0x2d2641=>[..._0x2d2641,{'step':_0x3de723(0x12f),'label':_0x3de723(0x12c),'value':_0x18472a?'是':'否'}]);const _0x5d0a0b=_0x2e6ca4||_0x2d7964||_0x3de723(0x14c);_0x517e18({'projectName':_0x89a5ee,'appCode':_0x794e24,'pullApi':_0x18472a,'env':_0x5d0a0b}),_0x2e383a(_0x3de723(0x14d));return;}if(_0x5d9ea9===_0x3de723(0x148)){const _0x2d9c21=_0xf5b855===0x0;if(_0x2d9c21){_0x2e383a('login-process');const _0x10010a=await _0x240c9d();if(_0x10010a)_0x3c763c(_0x4edc2e=>[..._0x4edc2e,{'step':_0x3de723(0x149),'label':_0x3de723(0x154),'value':'已登录'}]),_0x2e383a(_0x3de723(0x153));else{_0x3c763c(_0x2fd556=>[..._0x2fd556,{'step':_0x3de723(0x149),'label':_0x3de723(0x154),'value':_0x3de723(0x151)}]);const _0x15834d=_0x2e6ca4||_0x2d7964||'online';_0x517e18({'projectName':_0x89a5ee,'appCode':_0x794e24,'pullApi':![],'env':_0x15834d}),_0x2e383a('creating');}}else{_0x3c763c(_0x43e031=>[..._0x43e031,{'step':_0x3de723(0x149),'label':'登录状态','value':_0x3de723(0x14e)}]);const _0x1a5f12=_0x2e6ca4||_0x2d7964||'online';_0x517e18({'projectName':_0x89a5ee,'appCode':_0x794e24,'pullApi':![],'env':_0x1a5f12}),_0x2e383a('creating');}return;}}if(_0x383a44[_0x3de723(0x131)]||_0x383a44[_0x3de723(0x14a)]){_0x58a7d8(_0x30e46a=>{const _0x2d7851=_0x3de723,_0x3c8fa9=_0x30e46a[_0x2d7851(0x14f)](0x0,-0x1);if(_0x5d9ea9===_0x2d7851(0x143)){const {valid:_0x11acae,message:_0x563cac}=_0x1e3f99(_0x3c8fa9);_0x2c72e4(_0x11acae?'':_0x563cac||_0x2d7851(0x11f));}else{if(_0x5d9ea9===_0x2d7851(0x156)){const {valid:_0x6357e4,message:_0x1d87d8}=_0x54a67b(_0x3c8fa9);_0x2c72e4(_0x6357e4?'':_0x1d87d8||_0x2d7851(0x142));}}return _0x3c8fa9;});return;}if([_0x3de723(0x14d),_0x3de723(0x12b),'login-process']['includes'](_0x5d9ea9))return;if(_0x5d9ea9===_0x3de723(0x153)||_0x5d9ea9===_0x3de723(0x148))return;_0x58a7d8(_0x5a708b=>{const _0x1c6653=_0x3de723,_0x94dddf=_0x5a708b+_0x3fbb02;if(_0x5d9ea9===_0x1c6653(0x143)){const {valid:_0x5a54a2,message:_0x5d0950}=_0x1e3f99(_0x94dddf);_0x2c72e4(_0x5a54a2?'':_0x5d0950||_0x1c6653(0x11f));}else{if(_0x5d9ea9===_0x1c6653(0x156)){const {valid:_0x59326e,message:_0x3e856e}=_0x54a67b(_0x94dddf);_0x2c72e4(_0x59326e?'':_0x3e856e||_0x1c6653(0x142));}}return _0x94dddf;});}),a26_0x3060cb(Box,{'flexDirection':'column','marginTop':0x1,'children':[_0x5d4f0c[_0x1b345e(0x130)]===0x0&&a26_0x22bcb8(Box,{'children':a26_0x22bcb8(Text,{'color':'cyan','children':'*\x20创建新项目'})}),_0x5d4f0c['map'](_0x2bf4e8=>a26_0x3060cb(Box,{'children':[a26_0x3060cb(Text,{'color':_0x1b345e(0x119),'children':['√\x20',_0x2bf4e8['label'],':\x20']}),a26_0x22bcb8(Text,{'color':'cyan','children':_0x2bf4e8[_0x1b345e(0x12a)]})]},_0x2bf4e8[_0x1b345e(0x147)])),_0x5d9ea9===_0x1b345e(0x143)&&a26_0x3060cb(a26_0x57d7ba,{'children':[a26_0x3060cb(Box,{'children':[a26_0x22bcb8(Text,{'children':_0x1b345e(0x13d)}),_0x46e158?a26_0x22bcb8(Text,{'color':_0x1b345e(0x119),'children':_0x46e158}):a26_0x22bcb8(Text,{'color':_0x1b345e(0x11b),'children':_0x49bb59}),_0x44f4d7&&a26_0x3060cb(Text,{'color':'red','children':[_0x1b345e(0x124),_0x44f4d7]})]}),!_0x44f4d7&&!_0x46e158&&a26_0x22bcb8(Box,{'children':a26_0x22bcb8(Text,{'color':_0x1b345e(0x11b),'children':_0x1b345e(0x13f)})})]}),_0x5d9ea9==='app-code'&&a26_0x3060cb(a26_0x57d7ba,{'children':[a26_0x3060cb(Box,{'children':[a26_0x22bcb8(Text,{'children':_0x1b345e(0x157)}),a26_0x22bcb8(Text,{'color':_0x1b345e(0x11b),'children':_0x1b345e(0x11a)}),a26_0x22bcb8(Text,{'color':_0x1b345e(0x119),'children':_0x46e158}),_0x44f4d7&&a26_0x3060cb(Text,{'color':_0x1b345e(0x133),'children':['\x20←\x20',_0x44f4d7]})]}),!_0x44f4d7&&a26_0x22bcb8(Box,{'children':a26_0x3060cb(Text,{'color':_0x1b345e(0x11b),'children':['\x20',_0x1b345e(0x137)]})})]}),_0x5d9ea9==='login-check'&&a26_0x3060cb(Box,{'children':[a26_0x22bcb8(Text,{'children':_0x1b345e(0x139)}),_0x50c005&&a26_0x22bcb8(Text,{'color':_0x1b345e(0x11b),'children':_0x1b345e(0x13b)})]}),_0x5d9ea9===_0x1b345e(0x153)&&a26_0x3060cb(a26_0x57d7ba,{'children':[a26_0x22bcb8(Box,{'children':a26_0x22bcb8(Text,{'color':_0x1b345e(0x119),'children':'√\x20检测到有效登录状态'})}),a26_0x22bcb8(Box,{'marginTop':0x1,'children':a26_0x22bcb8(Text,{'children':_0x1b345e(0x158)})}),a26_0x3060cb(Box,{'marginLeft':0x2,'children':[a26_0x3060cb(Text,{'color':_0x366e0c===0x0?_0x1b345e(0x119):_0x1b345e(0x11b),'children':[_0x366e0c===0x0?'▶\x20':'\x20\x20',_0x1b345e(0x150)]}),a26_0x22bcb8(Text,{'children':'\x20'}),a26_0x3060cb(Text,{'color':_0x366e0c===0x1?_0x1b345e(0x119):_0x1b345e(0x11b),'children':[_0x366e0c===0x1?'▶\x20':'\x20\x20','No']})]}),a26_0x22bcb8(Box,{'children':a26_0x22bcb8(Text,{'color':'gray','children':_0x1b345e(0x144)})}),a26_0x22bcb8(Box,{'children':a26_0x22bcb8(Text,{'color':_0x1b345e(0x13a),'children':_0x1b345e(0x12e)})})]}),_0x5d9ea9===_0x1b345e(0x148)&&a26_0x3060cb(a26_0x57d7ba,{'children':[a26_0x22bcb8(Box,{'children':a26_0x22bcb8(Text,{'color':_0x1b345e(0x13a),'children':_0x1b345e(0x140)})}),a26_0x22bcb8(Box,{'marginTop':0x1,'children':a26_0x22bcb8(Text,{'children':_0x1b345e(0x12d)})}),a26_0x3060cb(Box,{'marginLeft':0x2,'children':[a26_0x3060cb(Text,{'color':_0xf5b855===0x0?'green':_0x1b345e(0x11b),'children':[_0xf5b855===0x0?'▶\x20':'\x20\x20',_0x1b345e(0x150)]}),a26_0x22bcb8(Text,{'children':'\x20'}),a26_0x3060cb(Text,{'color':_0xf5b855===0x1?'green':_0x1b345e(0x11b),'children':[_0xf5b855===0x1?'▶\x20':'\x20\x20','No']})]}),a26_0x22bcb8(Box,{'children':a26_0x22bcb8(Text,{'color':_0x1b345e(0x11b),'children':_0x1b345e(0x144)})}),a26_0x22bcb8(Box,{'children':a26_0x22bcb8(Text,{'color':'yellow','children':_0x1b345e(0x122)})})]}),_0x5d9ea9===_0x1b345e(0x141)&&a26_0x3060cb(Box,{'children':[a26_0x22bcb8(Text,{'children':_0x1b345e(0x13c)}),_0x1fc0c7&&a26_0x22bcb8(Text,{'color':'gray','children':_0x1b345e(0x11d)})]})]});}
1
+ (function(_0x275ed4,_0x1fed9e){const _0x207f47=a29_0x22df,_0xa242f8=_0x275ed4();while(!![]){try{const _0x3c14e1=-parseInt(_0x207f47(0xbb))/0x1*(-parseInt(_0x207f47(0xc7))/0x2)+-parseInt(_0x207f47(0xeb))/0x3*(parseInt(_0x207f47(0xba))/0x4)+-parseInt(_0x207f47(0xb1))/0x5+parseInt(_0x207f47(0xcf))/0x6*(parseInt(_0x207f47(0xd5))/0x7)+parseInt(_0x207f47(0xd0))/0x8+parseInt(_0x207f47(0xaf))/0x9*(-parseInt(_0x207f47(0xb2))/0xa)+parseInt(_0x207f47(0xbd))/0xb;if(_0x3c14e1===_0x1fed9e)break;else _0xa242f8['push'](_0xa242f8['shift']());}catch(_0x279de0){_0xa242f8['push'](_0xa242f8['shift']());}}}(a29_0x3c4d,0xddeb4));function a29_0x3c4d(){const _0x5f20ac=['env','*\x20是否要先登录以便拉取\x20API\x20配置?','8HqyQNT','337rSXAoY','!\x20未检测到有效登录','19935806oPVHlp','login-process','cyan','\x20←\x20','Yes','登录状态','项目名长度不能超过\x2050\x20个字符','未设置','*\x20创建新项目','creating','2874ECnFAF','value','yellow','跳过登录','*\x20项目名:\x20','*\x20正在登录,请前往浏览器完成登录...','应用AppCode只能包含字母、数字、连字符和下划线,且必须以字母或数字开头','已登录','4612758gphNTk','5036976SAbiLj','绑定应用AppCode可自动配置\x20API,如:\x20app-c4c89304\x20(直接回车跳过)','\x20\x20推荐选择\x20Yes,可自动配置\x20API\x20接口','项目名','leftArrow','7mgehLU','return','项目名不合法','trim','\x20\x20使用\x20←→\x20选择,回车确认','label','*\x20是否要自动拉取\x20API\x20配置?','拉取API配置','app-code','\x20检查中...','delete','project-name','online','login-check','backspace','confirm-api-pull','rightArrow','项目名只能以字母或数字开头,且只包含字母、数字、-\x20和\x20_','string','\x20登录中...','red','√\x20检测到有效登录状态','2667981mObuvS','slice','length','gray','*\x20应用AppCode\x20','6525837raotPn','login-prompt','1411515ToPiFO','10qfmFxQ','\x20直接回车确认,或输入自定义名称','login','应用AppCode长度不能超过\x20100\x20个字符','green','应用AppCode不合法'];a29_0x3c4d=function(){return _0x5f20ac;};return a29_0x3c4d();}import{jsx as a29_0x4b1952,jsxs as a29_0x121168,Fragment as a29_0x4abb7d}from'react/jsx-runtime';import{useState}from'react';import{Text,Box,useInput}from'ink';import{getIsSessionValid}from'../auth/is-session-valid.js';function a29_0x22df(_0x1373e6,_0x4c376b){const _0x3c4dad=a29_0x3c4d();return a29_0x22df=function(_0x22dfe8,_0x200d93){_0x22dfe8=_0x22dfe8-0xac;let _0x59df54=_0x3c4dad[_0x22dfe8];return _0x59df54;},a29_0x22df(_0x1373e6,_0x4c376b);}import{authServer}from'../auth/auth-server.js';import{readConfig}from'../utils/config.js';export function EnhancedGuidedCreate(_0x4d9762){const _0x3172e3=a29_0x22df,{onCreate:_0x202bf2,env:_0x100941}=_0x4d9762,[_0x391340,_0x49d0ef]=useState(_0x3172e3(0xe0)),[_0x2ff4a3,_0x2ea821]=useState(''),[_0x4b2734,_0xcac304]=useState(''),[_0xf3b11e,_0x1803d5]=useState(''),[_0x24cc8c,_0x374ece]=useState(''),[_0x5ce6a2,_0x4350ca]=useState([]),[_0x39041c,_0x404e32]=useState(null),[_0x4778ed,_0x1f496b]=useState(![]),[_0x4e5972,_0x585eac]=useState(![]),[_0x5aaec6,_0x471254]=useState(![]),[_0x2bdde8,_0x473b2f]=useState(0x0),[_0x370ea6,_0x2368b5]=useState(0x0),_0x480a06='my-app',_0x1c0d0a=readConfig(),_0x25c930=typeof _0x1c0d0a[_0x3172e3(0xb8)]===_0x3172e3(0xe7)?_0x1c0d0a[_0x3172e3(0xb8)]:undefined;function _0x38ba46(_0x5903c4){const _0x24515d=_0x3172e3;if(_0x5903c4[_0x24515d(0xac)]>0x32)return{'valid':![],'message':_0x24515d(0xc3)};const _0x399115=/^[A-Za-z0-9][A-Za-z0-9_-]*$/;if(_0x5903c4?.[_0x24515d(0xd8)]()&&!_0x399115['test'](_0x5903c4))return{'valid':![],'message':_0x24515d(0xe6)};return{'valid':!![]};}function _0x186c56(_0x33dac4){const _0x13d7a0=_0x3172e3;if(!_0x33dac4[_0x13d7a0(0xd8)]())return{'valid':!![]};if(_0x33dac4['length']>0x64)return{'valid':![],'message':_0x13d7a0(0xb5)};const _0x827a20=/^[a-zA-Z0-9][a-zA-Z0-9_-]*$/;if(!_0x827a20['test'](_0x33dac4))return{'valid':![],'message':_0x13d7a0(0xcd)};return{'valid':!![]};}async function _0x1df5fe(){_0x1f496b(!![]);try{const _0x2af55e=await getIsSessionValid();return _0x404e32(_0x2af55e),_0x2af55e;}catch(_0x1ff416){return _0x404e32(![]),![];}finally{_0x1f496b(![]);}}async function _0x36b012(){_0x585eac(!![]);try{const _0x5c6e2a=await authServer({'silent':!![]});return _0x404e32(_0x5c6e2a),_0x5c6e2a;}catch(_0x386dee){return _0x404e32(![]),![];}finally{_0x585eac(![]);}}return useInput(async(_0x1b4a8c,_0x18849a)=>{const _0x52c52a=_0x3172e3;if(_0x18849a[_0x52c52a(0xd4)]||_0x18849a[_0x52c52a(0xe5)]){if(_0x391340===_0x52c52a(0xe4)){_0x473b2f(_0x5a086b=>_0x5a086b===0x0?0x1:0x0);return;}if(_0x391340===_0x52c52a(0xb0)){_0x2368b5(_0x12827a=>_0x12827a===0x0?0x1:0x0);return;}}if(_0x18849a[_0x52c52a(0xd6)]){if(_0x391340===_0x52c52a(0xe0)){const _0x21eb60=_0xf3b11e[_0x52c52a(0xd8)]()||_0x480a06;if(_0x24cc8c)return;_0x2ea821(_0x21eb60),_0x4350ca([{'step':_0x52c52a(0xe0),'label':_0x52c52a(0xd3),'value':_0x21eb60}]),_0x1803d5(''),_0x374ece(''),_0x49d0ef(_0x52c52a(0xdd));return;}if(_0x391340===_0x52c52a(0xdd)){if(_0x24cc8c)return;const _0x50bcb7=_0xf3b11e['trim']();_0xcac304(_0x50bcb7),_0x4350ca(_0x30ef41=>[..._0x30ef41,{'step':'app-code','label':'应用AppCode','value':_0x50bcb7||_0x52c52a(0xc4)}]),_0x1803d5(''),_0x374ece('');if(_0x50bcb7){_0x49d0ef(_0x52c52a(0xe2));const _0x1d2864=await _0x1df5fe();_0x1d2864?_0x49d0ef(_0x52c52a(0xe4)):_0x49d0ef('login-prompt');}else{const _0x1a4026=_0x100941||_0x25c930||'online';_0x202bf2({'projectName':_0x2ff4a3,'appCode':undefined,'pullApi':![],'env':_0x1a4026}),_0x49d0ef(_0x52c52a(0xc6));}return;}if(_0x391340===_0x52c52a(0xe4)){const _0x15ffe8=_0x2bdde8===0x0;_0x471254(_0x15ffe8),_0x4350ca(_0xe654d1=>[..._0xe654d1,{'step':'api-pull','label':_0x52c52a(0xdc),'value':_0x15ffe8?'是':'否'}]);const _0x2ca29e=_0x100941||_0x25c930||'online';_0x202bf2({'projectName':_0x2ff4a3,'appCode':_0x4b2734,'pullApi':_0x15ffe8,'env':_0x2ca29e}),_0x49d0ef(_0x52c52a(0xc6));return;}if(_0x391340===_0x52c52a(0xb0)){const _0x106403=_0x370ea6===0x0;if(_0x106403){_0x49d0ef(_0x52c52a(0xbe));const _0x588327=await _0x36b012();if(_0x588327)_0x4350ca(_0x4b5d8d=>[..._0x4b5d8d,{'step':_0x52c52a(0xb4),'label':_0x52c52a(0xc2),'value':_0x52c52a(0xce)}]),_0x49d0ef(_0x52c52a(0xe4));else{_0x4350ca(_0x44d0fd=>[..._0x44d0fd,{'step':_0x52c52a(0xb4),'label':'登录状态','value':'登录失败'}]);const _0x303008=_0x100941||_0x25c930||_0x52c52a(0xe1);_0x202bf2({'projectName':_0x2ff4a3,'appCode':_0x4b2734,'pullApi':![],'env':_0x303008}),_0x49d0ef(_0x52c52a(0xc6));}}else{_0x4350ca(_0x1d391d=>[..._0x1d391d,{'step':_0x52c52a(0xb4),'label':'登录状态','value':_0x52c52a(0xca)}]);const _0x25e7de=_0x100941||_0x25c930||_0x52c52a(0xe1);_0x202bf2({'projectName':_0x2ff4a3,'appCode':_0x4b2734,'pullApi':![],'env':_0x25e7de}),_0x49d0ef(_0x52c52a(0xc6));}return;}}if(_0x18849a[_0x52c52a(0xe3)]||_0x18849a[_0x52c52a(0xdf)]){_0x1803d5(_0x28bea7=>{const _0x477c6f=_0x52c52a,_0x59beaf=_0x28bea7[_0x477c6f(0xec)](0x0,-0x1);if(_0x391340===_0x477c6f(0xe0)){const {valid:_0x1f1492,message:_0x2c3905}=_0x38ba46(_0x59beaf);_0x374ece(_0x1f1492?'':_0x2c3905||_0x477c6f(0xd7));}else{if(_0x391340===_0x477c6f(0xdd)){const {valid:_0x1b0bc2,message:_0x1d5f88}=_0x186c56(_0x59beaf);_0x374ece(_0x1b0bc2?'':_0x1d5f88||_0x477c6f(0xb7));}}return _0x59beaf;});return;}if([_0x52c52a(0xc6),_0x52c52a(0xe2),'login-process']['includes'](_0x391340))return;if(_0x391340===_0x52c52a(0xe4)||_0x391340==='login-prompt')return;_0x1803d5(_0x39b5bc=>{const _0x459132=_0x52c52a,_0x241736=_0x39b5bc+_0x1b4a8c;if(_0x391340==='project-name'){const {valid:_0x39b83b,message:_0xa1d88f}=_0x38ba46(_0x241736);_0x374ece(_0x39b83b?'':_0xa1d88f||_0x459132(0xd7));}else{if(_0x391340==='app-code'){const {valid:_0x47d781,message:_0x4eb25a}=_0x186c56(_0x241736);_0x374ece(_0x47d781?'':_0x4eb25a||_0x459132(0xb7));}}return _0x241736;});}),a29_0x121168(Box,{'flexDirection':'column','marginTop':0x1,'children':[_0x5ce6a2[_0x3172e3(0xac)]===0x0&&a29_0x4b1952(Box,{'children':a29_0x4b1952(Text,{'color':_0x3172e3(0xbf),'children':_0x3172e3(0xc5)})}),_0x5ce6a2['map'](_0x1cda9b=>a29_0x121168(Box,{'children':[a29_0x121168(Text,{'color':_0x3172e3(0xb6),'children':['√\x20',_0x1cda9b[_0x3172e3(0xda)],':\x20']}),a29_0x4b1952(Text,{'color':_0x3172e3(0xbf),'children':_0x1cda9b[_0x3172e3(0xc8)]})]},_0x1cda9b['step'])),_0x391340===_0x3172e3(0xe0)&&a29_0x121168(a29_0x4abb7d,{'children':[a29_0x121168(Box,{'children':[a29_0x4b1952(Text,{'children':_0x3172e3(0xcb)}),_0xf3b11e?a29_0x4b1952(Text,{'color':_0x3172e3(0xb6),'children':_0xf3b11e}):a29_0x4b1952(Text,{'color':'gray','children':_0x480a06}),_0x24cc8c&&a29_0x121168(Text,{'color':'red','children':[_0x3172e3(0xc0),_0x24cc8c]})]}),!_0x24cc8c&&!_0xf3b11e&&a29_0x4b1952(Box,{'children':a29_0x4b1952(Text,{'color':_0x3172e3(0xad),'children':_0x3172e3(0xb3)})})]}),_0x391340===_0x3172e3(0xdd)&&a29_0x121168(a29_0x4abb7d,{'children':[a29_0x121168(Box,{'children':[a29_0x4b1952(Text,{'children':_0x3172e3(0xae)}),a29_0x4b1952(Text,{'color':_0x3172e3(0xad),'children':'[可选]:\x20'}),a29_0x4b1952(Text,{'color':_0x3172e3(0xb6),'children':_0xf3b11e}),_0x24cc8c&&a29_0x121168(Text,{'color':_0x3172e3(0xe9),'children':[_0x3172e3(0xc0),_0x24cc8c]})]}),!_0x24cc8c&&a29_0x4b1952(Box,{'children':a29_0x121168(Text,{'color':_0x3172e3(0xad),'children':['\x20',_0x3172e3(0xd1)]})})]}),_0x391340===_0x3172e3(0xe2)&&a29_0x121168(Box,{'children':[a29_0x4b1952(Text,{'children':'*\x20正在检查登录状态...'}),_0x4778ed&&a29_0x4b1952(Text,{'color':'gray','children':_0x3172e3(0xde)})]}),_0x391340===_0x3172e3(0xe4)&&a29_0x121168(a29_0x4abb7d,{'children':[a29_0x4b1952(Box,{'children':a29_0x4b1952(Text,{'color':_0x3172e3(0xb6),'children':_0x3172e3(0xea)})}),a29_0x4b1952(Box,{'marginTop':0x1,'children':a29_0x4b1952(Text,{'children':_0x3172e3(0xdb)})}),a29_0x121168(Box,{'marginLeft':0x2,'children':[a29_0x121168(Text,{'color':_0x2bdde8===0x0?_0x3172e3(0xb6):_0x3172e3(0xad),'children':[_0x2bdde8===0x0?'▶\x20':'\x20\x20',_0x3172e3(0xc1)]}),a29_0x4b1952(Text,{'children':'\x20'}),a29_0x121168(Text,{'color':_0x2bdde8===0x1?'green':'gray','children':[_0x2bdde8===0x1?'▶\x20':'\x20\x20','No']})]}),a29_0x4b1952(Box,{'children':a29_0x4b1952(Text,{'color':'gray','children':_0x3172e3(0xd9)})}),a29_0x4b1952(Box,{'children':a29_0x4b1952(Text,{'color':_0x3172e3(0xc9),'children':_0x3172e3(0xd2)})})]}),_0x391340===_0x3172e3(0xb0)&&a29_0x121168(a29_0x4abb7d,{'children':[a29_0x4b1952(Box,{'children':a29_0x4b1952(Text,{'color':'yellow','children':_0x3172e3(0xbc)})}),a29_0x4b1952(Box,{'marginTop':0x1,'children':a29_0x4b1952(Text,{'children':_0x3172e3(0xb9)})}),a29_0x121168(Box,{'marginLeft':0x2,'children':[a29_0x121168(Text,{'color':_0x370ea6===0x0?_0x3172e3(0xb6):_0x3172e3(0xad),'children':[_0x370ea6===0x0?'▶\x20':'\x20\x20',_0x3172e3(0xc1)]}),a29_0x4b1952(Text,{'children':'\x20'}),a29_0x121168(Text,{'color':_0x370ea6===0x1?'green':_0x3172e3(0xad),'children':[_0x370ea6===0x1?'▶\x20':'\x20\x20','No']})]}),a29_0x4b1952(Box,{'children':a29_0x4b1952(Text,{'color':_0x3172e3(0xad),'children':_0x3172e3(0xd9)})}),a29_0x4b1952(Box,{'children':a29_0x4b1952(Text,{'color':'yellow','children':'\x20\x20推荐选择\x20Yes,登录后可自动拉取并配置\x20API\x20接口'})})]}),_0x391340===_0x3172e3(0xbe)&&a29_0x121168(Box,{'children':[a29_0x4b1952(Text,{'children':_0x3172e3(0xcc)}),_0x4e5972&&a29_0x4b1952(Text,{'color':_0x3172e3(0xad),'children':_0x3172e3(0xe8)})]})]});}
@@ -1 +1 @@
1
- (function(_0x13e801,_0x5e7b0b){const _0x5ab1dc=a27_0x3c32,_0x90516b=_0x13e801();while(!![]){try{const _0x3bce25=parseInt(_0x5ab1dc(0xc8))/0x1*(-parseInt(_0x5ab1dc(0xc9))/0x2)+parseInt(_0x5ab1dc(0xc4))/0x3*(-parseInt(_0x5ab1dc(0xc7))/0x4)+-parseInt(_0x5ab1dc(0xc0))/0x5*(-parseInt(_0x5ab1dc(0xc2))/0x6)+-parseInt(_0x5ab1dc(0xc5))/0x7+parseInt(_0x5ab1dc(0xc1))/0x8+-parseInt(_0x5ab1dc(0xbe))/0x9+-parseInt(_0x5ab1dc(0xc6))/0xa*(-parseInt(_0x5ab1dc(0xca))/0xb);if(_0x3bce25===_0x5e7b0b)break;else _0x90516b['push'](_0x90516b['shift']());}catch(_0x41e8e2){_0x90516b['push'](_0x90516b['shift']());}}}(a27_0x350f,0x751bf));function a27_0x3c32(_0x31d9c6,_0x4b32c1){const _0x350f46=a27_0x350f();return a27_0x3c32=function(_0x3c328b,_0x22335a){_0x3c328b=_0x3c328b-0xbd;let _0x3b7ddb=_0x350f46[_0x3c328b];return _0x3b7ddb;},a27_0x3c32(_0x31d9c6,_0x4b32c1);}function a27_0x350f(){const _0x369311=['47351pGAUWu','2FeVCwI','3473261phSMgf','toFixed','1619118ZstYGp','replace','1143015lFFLLS','4931112HYPnWc','6ZbFrRJ','now','969kcrdAH','1726375ggSqpE','20zpobEq','6476CHgcvD'];a27_0x350f=function(){return _0x369311;};return a27_0x350f();}export function formatElapsed(_0x2759a6){const _0xdc9cee=a27_0x3c32,_0x3d4c17=Date[_0xdc9cee(0xc3)]()-_0x2759a6;if(_0x3d4c17<0x3e8)return _0x3d4c17+'ms';const _0x2155b2=(_0x3d4c17/0x3e8)[_0xdc9cee(0xbd)](0x2),_0x1c1ce0=_0x2155b2[_0xdc9cee(0xbf)](/\.?0+$/u,'');return _0x1c1ce0+'s';}
1
+ function a30_0x43cf(){const _0x2a1607=['485814JGPNWn','17836236WYMioH','533730CSvoiX','344ZjgtSe','1939WjBBZl','toFixed','17864WhsJFM','132OEOcHP','now','200645Uqdrea','117uqFKjA','1619102pjTLYI','2061bZuMdL'];a30_0x43cf=function(){return _0x2a1607;};return a30_0x43cf();}(function(_0x3c6e55,_0xf70f72){const _0x2dca81=a30_0x50fe,_0x43961a=_0x3c6e55();while(!![]){try{const _0x37e061=parseInt(_0x2dca81(0x197))/0x1+parseInt(_0x2dca81(0x1a2))/0x2+-parseInt(_0x2dca81(0x196))/0x3*(-parseInt(_0x2dca81(0x19a))/0x4)+parseInt(_0x2dca81(0x1a0))/0x5*(parseInt(_0x2dca81(0x19e))/0x6)+-parseInt(_0x2dca81(0x19b))/0x7*(-parseInt(_0x2dca81(0x19d))/0x8)+parseInt(_0x2dca81(0x1a1))/0x9*(-parseInt(_0x2dca81(0x199))/0xa)+-parseInt(_0x2dca81(0x198))/0xb;if(_0x37e061===_0xf70f72)break;else _0x43961a['push'](_0x43961a['shift']());}catch(_0x3525b9){_0x43961a['push'](_0x43961a['shift']());}}}(a30_0x43cf,0x83f55));function a30_0x50fe(_0x32495a,_0x7c3557){const _0x43cf12=a30_0x43cf();return a30_0x50fe=function(_0x50fe22,_0x2eec82){_0x50fe22=_0x50fe22-0x196;let _0x5a70d9=_0x43cf12[_0x50fe22];return _0x5a70d9;},a30_0x50fe(_0x32495a,_0x7c3557);}export function formatElapsed(_0x5ba839){const _0x5953d5=a30_0x50fe,_0x2c7ffc=Date[_0x5953d5(0x19f)]()-_0x5ba839;if(_0x2c7ffc<0x3e8)return _0x2c7ffc+'ms';const _0x17d4c4=(_0x2c7ffc/0x3e8)[_0x5953d5(0x19c)](0x2),_0x1a2792=_0x17d4c4['replace'](/\.?0+$/u,'');return _0x1a2792+'s';}
@@ -1 +1 @@
1
- function a28_0x3880(_0x1221c2,_0x407170){const _0x562ce3=a28_0x562c();return a28_0x3880=function(_0x388009,_0x35c376){_0x388009=_0x388009-0x67;let _0x4be00b=_0x562ce3[_0x388009];return _0x4be00b;},a28_0x3880(_0x1221c2,_0x407170);}(function(_0x2d1ef6,_0x311926){const _0x45d85b=a28_0x3880,_0x566fd6=_0x2d1ef6();while(!![]){try{const _0xbb4dff=-parseInt(_0x45d85b(0x7b))/0x1*(parseInt(_0x45d85b(0x98))/0x2)+parseInt(_0x45d85b(0x77))/0x3+parseInt(_0x45d85b(0x8b))/0x4*(-parseInt(_0x45d85b(0xa6))/0x5)+-parseInt(_0x45d85b(0xa1))/0x6*(-parseInt(_0x45d85b(0x85))/0x7)+parseInt(_0x45d85b(0xad))/0x8+-parseInt(_0x45d85b(0x71))/0x9+-parseInt(_0x45d85b(0x8c))/0xa;if(_0xbb4dff===_0x311926)break;else _0x566fd6['push'](_0x566fd6['shift']());}catch(_0x36f7d5){_0x566fd6['push'](_0x566fd6['shift']());}}}(a28_0x562c,0xa11aa));import{jsx as a28_0x3394fb,Fragment as a28_0x160579,jsxs as a28_0x39843}from'react/jsx-runtime';import a28_0x17a7de from'node:path';import a28_0x53f797 from'node:fs';import{fileURLToPath}from'node:url';function a28_0x562c(){const _0x22ebe8=['\x20|\x20应用AppCode:\x20','cd\x20','2972ppPCIs','1682620VCCIGs','trim','gray','green','accessSync','1.\x20','create','启动项目:\x20','log','message','setLogPath','readFileSync','32qquJKP','cyan','.lovrabetrc','×\x20项目创建失败:\x20','info','length','\x20√\x20','需手动拉取','repeat','153966RUghNn','×\x20项目名包含非法字符,不允许使用:\x20<\x20>\x20:\x20\x22\x20|\x20?\x20*\x20及控制字符','projectCode','√\x20配置文件已创建,应用AppCode:\x20','🔗\x20应用AppCode:\x20','8605kFwMmu','error','W_OK','*\x20正在为项目\x20','env','1.0.0','*\x20清理失败的项目目录:\x20','2865744hSscUm','join','lovrabet\x20api\x20pull','online','white','\x20创建配置文件','🚀\x20接下来可以:','doTask','√\x20配置文件已创建,可稍后使用\x20\x27lovrabet\x20config\x20set\x20app\x20<app-code>\x27\x20配置','×\x20项目名不能为空','column','项目创建失败:\x20','清理项目目录失败:\x20','3.\x20','📁\x20项目名称:\x20','×\x20无法在当前目录创建项目,请检查目录权限','writeFileSync','2.\x20','projectName','constants','拉取API配置:\x20','项目名称:\x20','83520YLWFon','!\x20API\x20配置拉取失败,可稍后手动执行:\x20lovrabet\x20api\x20pull','🎉\x20项目创建成功!','../..','dirname','配置应用AppCode失败:\x20','3748665YHjpjW','项目创建完成:\x20','配置应用AppCode:\x20','cwd','9927CPhDPL','yellow','utf8','resolve','×\x20项目目录\x20','toLocaleString','appCode','url','\x20已存在,请使用其他项目名','!\x20API\x20配置拉取异常,项目已创建,可稍后手动执行:\x20lovrabet\x20api\x20pull','182HKokeo','existsSync','√\x20API\x20配置拉取完成','pullApi'];a28_0x562c=function(){return _0x22ebe8;};return a28_0x562c();}import{Box,Text}from'ink';import{useEffect,useState}from'react';import{EnhancedGuidedCreate}from'./enhanced-guided-create.js';import{pullApiSilent}from'../api/pull-silent.js';import{readConfig}from'../utils/config.js';import{useCopyProjectTemplate}from'./use-copy-project-template.js';import{useInstallDependencies}from'./use-install-dependencies.js';import{useFormatCode}from'./use-format-code.js';import{TaskFinished}from'./task-finished.js';import{TaskRunning}from'./task-running.js';import{logger}from'../utils/logger.js';export function CreateApp(_0x597a66){const _0xe87ba8=a28_0x3880,[_0x1ce565,_0x4cd3e1]=useState(![]),[_0x2df7ac,_0x41ac27]=useState(![]),[_0xc30f85,_0x9f33b1]=useState(null),_0x460867=useCopyProjectTemplate(),_0x5bf7ab=useInstallDependencies(),_0x3cf3ac=useFormatCode(),_0x1f8885=async _0x21660f=>{const _0x38de93=a28_0x3880;if(!_0x21660f[_0x38de93(0x6d)]||_0x21660f['projectName'][_0x38de93(0x8d)]()===''){console[_0x38de93(0xa7)](_0x38de93(0xb6));return;}const _0x1f5127=/[<>:"|?*\x00-\x1f\x7f]/;if(_0x1f5127['test'](_0x21660f[_0x38de93(0x6d)])){console['error'](_0x38de93(0xa2));return;}if(_0x21660f[_0x38de93(0x6d)][_0x38de93(0x9d)]>0x64){console[_0x38de93(0xa7)]('×\x20项目名过长,最多支持\x20100\x20个字符');return;}const _0x35d164=a28_0x17a7de[_0x38de93(0x7e)](process[_0x38de93(0x7a)](),_0x21660f['projectName']);if(a28_0x53f797[_0x38de93(0x86)](_0x35d164)){console[_0x38de93(0xa7)](_0x38de93(0x7f)+_0x21660f[_0x38de93(0x6d)]+_0x38de93(0x83));return;}try{const _0x5d7c16=a28_0x17a7de[_0x38de93(0x75)](_0x35d164);a28_0x53f797[_0x38de93(0x90)](_0x5d7c16,a28_0x53f797[_0x38de93(0x6e)][_0x38de93(0xa8)]);}catch(_0x45dd00){console[_0x38de93(0xa7)](_0x38de93(0x6a));return;}_0x9f33b1(_0x21660f),_0x4cd3e1(!![]),logger[_0x38de93(0x96)](_0x35d164),logger[_0x38de93(0x9c)](_0x38de93(0x92),'开始创建项目:\x20'+_0x21660f[_0x38de93(0x6d)],{'projectDir':_0x35d164,'appCode':_0x21660f[_0x38de93(0x81)]});try{await _0x460867[_0x38de93(0xb4)](_0x21660f[_0x38de93(0x6d)]),await _0x5bf7ab[_0x38de93(0xb4)](_0x21660f[_0x38de93(0x6d)]),await _0x3cf3ac[_0x38de93(0xb4)](_0x21660f[_0x38de93(0x6d)]),await _0x172f13(_0x21660f[_0x38de93(0x6d)],_0x21660f['appCode']||'',_0x21660f['env']);if(_0x21660f[_0x38de93(0x88)]&&_0x21660f[_0x38de93(0x81)]){console[_0x38de93(0x94)]('*\x20正在拉取\x20API\x20配置...');try{const _0x1a7bf4=await pullApiSilent(_0x21660f[_0x38de93(0x81)],undefined,_0x35d164,_0x21660f[_0x38de93(0xaa)]);_0x1a7bf4?(console[_0x38de93(0x94)](_0x38de93(0x87)),logger[_0x38de93(0x9c)](_0x38de93(0x92),'API\x20配置拉取成功:\x20'+_0x21660f[_0x38de93(0x81)],{'projectDir':_0x35d164,'appCode':_0x21660f[_0x38de93(0x81)],'env':_0x21660f[_0x38de93(0xaa)]})):(console[_0x38de93(0x94)](_0x38de93(0x72)),logger['warn']('create','API\x20配置拉取失败:\x20'+_0x21660f[_0x38de93(0x81)],{'projectDir':_0x35d164,'appCode':_0x21660f[_0x38de93(0x81)],'env':_0x21660f[_0x38de93(0xaa)]}));}catch(_0x2ea472){console['log'](_0x38de93(0x84)),logger['warn'](_0x38de93(0x92),'API\x20配置拉取异常:\x20'+_0x21660f[_0x38de93(0x81)],{'projectDir':_0x35d164,'appCode':_0x21660f[_0x38de93(0x81)],'env':_0x21660f['env'],'error':_0x2ea472 instanceof Error?_0x2ea472[_0x38de93(0x95)]:String(_0x2ea472)});}}logger['success'](_0x38de93(0x92),_0x38de93(0x78)+_0x21660f['projectName']),_0x41ac27(!![]),_0x4cd3e1(![]);}catch(_0x3ecf17){logger[_0x38de93(0xa7)](_0x38de93(0x92),_0x38de93(0xb8)+_0x21660f[_0x38de93(0x6d)],{'error':_0x3ecf17 instanceof Error?_0x3ecf17[_0x38de93(0x95)]:String(_0x3ecf17)});try{a28_0x53f797['existsSync'](_0x35d164)&&(console[_0x38de93(0x94)](_0x38de93(0xac)+_0x35d164),a28_0x53f797['rmSync'](_0x35d164,{'recursive':!![],'force':!![]}));}catch(_0x256f2b){logger['warn'](_0x38de93(0x92),_0x38de93(0x67)+_0x35d164,{'error':_0x256f2b instanceof Error?_0x256f2b[_0x38de93(0x95)]:String(_0x256f2b)});}_0x4cd3e1(![]),console['error'](_0x38de93(0x9b)+(_0x3ecf17 instanceof Error?_0x3ecf17[_0x38de93(0x95)]:String(_0x3ecf17)));}},_0x15ab66=async _0x40ebf3=>{await _0x1f8885({'projectName':_0x40ebf3,'env':_0x597a66['env']});},_0x172f13=async(_0x10ecae,_0x485eae,_0x28125e)=>{const _0x240e98=a28_0x3880,_0xdee46f=a28_0x17a7de[_0x240e98(0x7e)](process[_0x240e98(0x7a)](),_0x10ecae),_0x40546d=a28_0x17a7de[_0x240e98(0xae)](_0xdee46f,_0x240e98(0x9a));try{_0x485eae?console['log'](_0x240e98(0xa9)+_0x10ecae+'\x20配置应用AppCode:\x20'+_0x485eae):console[_0x240e98(0x94)](_0x240e98(0xa9)+_0x10ecae+_0x240e98(0xb2));console['log']('*\x20配置文件路径:\x20'+_0x40546d);const _0x32797b=fileURLToPath(import.meta[_0x240e98(0x82)]),_0x138693=a28_0x17a7de[_0x240e98(0x7e)](a28_0x17a7de[_0x240e98(0x75)](_0x32797b),_0x240e98(0x74)),_0x524c25=a28_0x17a7de['join'](_0x138693,'package.json');let _0x3bfcc9=_0x240e98(0xab);try{const _0x4e7908=JSON['parse'](a28_0x53f797[_0x240e98(0x97)](_0x524c25,_0x240e98(0x7d)));_0x3bfcc9=_0x4e7908['version']||_0x240e98(0xab);}catch(_0x183384){}const _0xeca3c1=readConfig(),_0x5bea23=typeof _0xeca3c1[_0x240e98(0xaa)]==='string'?_0xeca3c1[_0x240e98(0xaa)]:undefined,_0x4bdffd={..._0xeca3c1,'app':_0x485eae||'','env':_0x28125e||_0x5bea23||_0x240e98(0xb0),'createdAt':new Date()[_0x240e98(0x80)](),'version':_0x3bfcc9};a28_0x53f797[_0x240e98(0x6b)](_0x40546d,JSON['stringify'](_0x4bdffd,null,0x2),_0x240e98(0x7d)),_0x485eae?console[_0x240e98(0x94)](_0x240e98(0xa4)+_0x485eae):console[_0x240e98(0x94)](_0x240e98(0xb5)),logger[_0x240e98(0x9c)]('create',_0x240e98(0x79)+_0x485eae,{'projectName':_0x10ecae,'configFile':'.lovrabetrc'});}catch(_0x315684){logger[_0x240e98(0xa7)](_0x240e98(0x92),_0x240e98(0x76)+_0x485eae,{'projectName':_0x10ecae,'error':_0x315684 instanceof Error?_0x315684['message']:String(_0x315684)});}};useEffect(()=>{const _0x36efd0=a28_0x3880;_0x597a66[_0x36efd0(0xa3)]&&_0x15ab66(_0x597a66['projectCode']);},[_0x597a66[_0xe87ba8(0xa3)]]);if(!_0x1ce565&&!_0x2df7ac&&!_0x597a66[_0xe87ba8(0xa3)])return a28_0x3394fb(EnhancedGuidedCreate,{'onCreate':_0x1f8885,'env':_0x597a66[_0xe87ba8(0xaa)]});if(_0x1ce565)return a28_0x39843(a28_0x160579,{'children':[a28_0x39843(Box,{'marginTop':0x1,'children':[a28_0x3394fb(Box,{'width':'1'}),a28_0x3394fb(Text,{'color':'green','children':_0xe87ba8(0x9e)}),a28_0x3394fb(Text,{'children':_0xe87ba8(0x70)}),a28_0x3394fb(Text,{'color':_0xe87ba8(0x8f),'children':_0xc30f85?.[_0xe87ba8(0x6d)]}),_0xc30f85?.[_0xe87ba8(0x81)]&&a28_0x39843(a28_0x160579,{'children':[a28_0x3394fb(Text,{'children':_0xe87ba8(0x89)}),a28_0x3394fb(Text,{'color':_0xe87ba8(0x99),'children':_0xc30f85[_0xe87ba8(0x81)]})]})]}),a28_0x3394fb(TaskRunning,{..._0x460867}),a28_0x3394fb(TaskRunning,{..._0x5bf7ab}),a28_0x3394fb(TaskRunning,{..._0x3cf3ac})]});if(_0x2df7ac)return a28_0x39843(a28_0x160579,{'children':[a28_0x39843(Box,{'marginTop':0x1,'children':[a28_0x3394fb(Box,{'width':'1'}),a28_0x3394fb(Text,{'color':_0xe87ba8(0x8f),'children':_0xe87ba8(0x9e)}),a28_0x3394fb(Text,{'children':'项目名称:\x20'}),a28_0x3394fb(Text,{'color':_0xe87ba8(0x8f),'children':_0xc30f85?.['projectName']}),_0xc30f85?.[_0xe87ba8(0x81)]&&a28_0x39843(a28_0x160579,{'children':[a28_0x3394fb(Text,{'children':'\x20|\x20应用AppCode:\x20'}),a28_0x3394fb(Text,{'color':'cyan','children':_0xc30f85[_0xe87ba8(0x81)]})]})]}),a28_0x3394fb(TaskFinished,{..._0x460867}),a28_0x3394fb(TaskFinished,{..._0x5bf7ab}),a28_0x3394fb(TaskFinished,{..._0x3cf3ac}),a28_0x3394fb(Box,{'marginTop':0x1,'marginBottom':0x1,'children':a28_0x3394fb(Text,{'color':_0xe87ba8(0x8f),'children':'─'[_0xe87ba8(0xa0)](0x3c)})}),a28_0x3394fb(Box,{'children':a28_0x3394fb(Text,{'color':_0xe87ba8(0x8f),'bold':!![],'children':_0xe87ba8(0x73)})}),a28_0x39843(Box,{'marginTop':0x1,'flexDirection':'column','children':[a28_0x39843(Box,{'children':[a28_0x3394fb(Text,{'color':'cyan','children':_0xe87ba8(0x69)}),a28_0x3394fb(Text,{'color':_0xe87ba8(0xb1),'bold':!![],'children':_0xc30f85?.[_0xe87ba8(0x6d)]})]}),_0xc30f85?.['appCode']&&a28_0x39843(Box,{'children':[a28_0x3394fb(Text,{'color':_0xe87ba8(0x99),'children':_0xe87ba8(0xa5)}),a28_0x3394fb(Text,{'color':_0xe87ba8(0xb1),'bold':!![],'children':_0xc30f85[_0xe87ba8(0x81)]})]}),a28_0x39843(Box,{'children':[a28_0x3394fb(Text,{'color':_0xe87ba8(0x99),'children':'📦\x20API配置:\x20'}),_0xc30f85?.[_0xe87ba8(0x88)]?a28_0x3394fb(Text,{'color':_0xe87ba8(0x8f),'bold':!![],'children':'已自动拉取\x20✓'}):_0xc30f85?.[_0xe87ba8(0x81)]?a28_0x3394fb(Text,{'color':_0xe87ba8(0x7c),'bold':!![],'children':_0xe87ba8(0x9f)}):a28_0x3394fb(Text,{'color':_0xe87ba8(0x8e),'bold':!![],'children':'未配置'})]})]}),a28_0x3394fb(Box,{'marginTop':0x1,'marginBottom':0x1,'children':a28_0x3394fb(Text,{'color':'cyan','bold':!![],'children':_0xe87ba8(0xb3)})}),a28_0x39843(Box,{'marginLeft':0x2,'flexDirection':_0xe87ba8(0xb7),'children':[a28_0x39843(Box,{'children':[a28_0x3394fb(Text,{'color':_0xe87ba8(0x8f),'children':_0xe87ba8(0x91)}),a28_0x3394fb(Text,{'color':_0xe87ba8(0xb1),'children':_0xe87ba8(0x93)}),a28_0x3394fb(Text,{'color':'cyan','bold':!![],'children':_0xe87ba8(0x8a)+_0xc30f85?.['projectName']+'\x20&&\x20lovrabet\x20start'})]}),_0xc30f85?.['appCode']&&!_0xc30f85?.['pullApi']&&a28_0x39843(Box,{'children':[a28_0x3394fb(Text,{'color':_0xe87ba8(0x7c),'children':_0xe87ba8(0x6c)}),a28_0x3394fb(Text,{'color':'white','children':'拉取API配置:\x20'}),a28_0x3394fb(Text,{'color':_0xe87ba8(0x99),'bold':!![],'children':_0xe87ba8(0xaf)})]}),!_0xc30f85?.[_0xe87ba8(0x81)]&&a28_0x39843(a28_0x160579,{'children':[a28_0x39843(Box,{'children':[a28_0x3394fb(Text,{'color':'gray','children':_0xe87ba8(0x6c)}),a28_0x3394fb(Text,{'color':'white','children':'配置AppCode:\x20'}),a28_0x3394fb(Text,{'color':_0xe87ba8(0x99),'bold':!![],'children':'lovrabet\x20config\x20set\x20app\x20[app-code]'})]}),a28_0x39843(Box,{'children':[a28_0x3394fb(Text,{'color':'gray','children':_0xe87ba8(0x68)}),a28_0x3394fb(Text,{'color':_0xe87ba8(0xb1),'children':_0xe87ba8(0x6f)}),a28_0x3394fb(Text,{'color':'cyan','bold':!![],'children':'lovrabet\x20api\x20pull\x20[app-code]'})]})]})]}),a28_0x3394fb(Box,{'marginTop':0x1,'children':a28_0x3394fb(Text,{'color':'green','children':'─'[_0xe87ba8(0xa0)](0x3c)})})]});return null;}
1
+ function a31_0x5c0a(_0x5d98f4,_0x44e55d){const _0x17ed5d=a31_0x17ed();return a31_0x5c0a=function(_0x5c0a5c,_0x25e6e9){_0x5c0a5c=_0x5c0a5c-0x1e8;let _0x186d3c=_0x17ed5d[_0x5c0a5c];return _0x186d3c;},a31_0x5c0a(_0x5d98f4,_0x44e55d);}(function(_0x5eead5,_0x27c8b8){const _0x5a6e62=a31_0x5c0a,_0x3ab508=_0x5eead5();while(!![]){try{const _0x56e76f=-parseInt(_0x5a6e62(0x1f3))/0x1*(parseInt(_0x5a6e62(0x229))/0x2)+-parseInt(_0x5a6e62(0x217))/0x3*(parseInt(_0x5a6e62(0x20e))/0x4)+parseInt(_0x5a6e62(0x20f))/0x5*(-parseInt(_0x5a6e62(0x1f6))/0x6)+-parseInt(_0x5a6e62(0x23e))/0x7+parseInt(_0x5a6e62(0x20c))/0x8+parseInt(_0x5a6e62(0x238))/0x9*(parseInt(_0x5a6e62(0x205))/0xa)+parseInt(_0x5a6e62(0x1ef))/0xb;if(_0x56e76f===_0x27c8b8)break;else _0x3ab508['push'](_0x3ab508['shift']());}catch(_0x244df8){_0x3ab508['push'](_0x3ab508['shift']());}}}(a31_0x17ed,0x568d3));import{jsx as a31_0x5bc2c0,Fragment as a31_0x1c29da,jsxs as a31_0x4b3143}from'react/jsx-runtime';import a31_0x507299 from'node:path';import a31_0x10a506 from'node:fs';import{fileURLToPath}from'node:url';import{Box,Text}from'ink';import{useEffect,useState}from'react';import{EnhancedGuidedCreate}from'./enhanced-guided-create.js';import{pullApiSilent}from'../api/pull-silent.js';import{readConfig}from'../utils/config.js';import{useCopyProjectTemplate}from'./use-copy-project-template.js';import{useInstallDependencies}from'./use-install-dependencies.js';import{useFormatCode}from'./use-format-code.js';import{TaskFinished}from'./task-finished.js';import{TaskRunning}from'./task-running.js';import{logger}from'../utils/logger.js';export function CreateApp(_0x47f2b2){const _0x6eb9a6=a31_0x5c0a,[_0x5d621d,_0x5ec793]=useState(![]),[_0x19dac9,_0x2c0e74]=useState(![]),[_0x1e0954,_0x3fdf71]=useState(null),_0xc953fb=useCopyProjectTemplate(),_0xe7f386=useInstallDependencies(),_0x51148d=useFormatCode(),_0x1bb81f=async _0x34dfc8=>{const _0x5f5ced=a31_0x5c0a;if(!_0x34dfc8[_0x5f5ced(0x22d)]||_0x34dfc8[_0x5f5ced(0x22d)]['trim']()===''){console[_0x5f5ced(0x220)](_0x5f5ced(0x21d));return;}const _0x5dac06=/[<>:"|?*\x00-\x1f\x7f]/;if(_0x5dac06[_0x5f5ced(0x239)](_0x34dfc8[_0x5f5ced(0x22d)])){console[_0x5f5ced(0x220)](_0x5f5ced(0x1e9));return;}if(_0x34dfc8[_0x5f5ced(0x22d)][_0x5f5ced(0x215)]>0x64){console[_0x5f5ced(0x220)](_0x5f5ced(0x21a));return;}const _0x550a51=a31_0x507299[_0x5f5ced(0x228)](process['cwd'](),_0x34dfc8[_0x5f5ced(0x22d)]);if(a31_0x10a506[_0x5f5ced(0x201)](_0x550a51)){console['error'](_0x5f5ced(0x1fb)+_0x34dfc8['projectName']+_0x5f5ced(0x1f7));return;}try{const _0x4ad0ab=a31_0x507299['dirname'](_0x550a51);a31_0x10a506['accessSync'](_0x4ad0ab,a31_0x10a506[_0x5f5ced(0x1f4)][_0x5f5ced(0x236)]);}catch(_0x2cc25d){console[_0x5f5ced(0x220)](_0x5f5ced(0x1f1));return;}_0x3fdf71(_0x34dfc8),_0x5ec793(!![]),logger[_0x5f5ced(0x1fc)](_0x550a51),logger[_0x5f5ced(0x207)]('create',_0x5f5ced(0x21b)+_0x34dfc8[_0x5f5ced(0x22d)],{'projectDir':_0x550a51,'appCode':_0x34dfc8['appCode']});try{await _0xc953fb[_0x5f5ced(0x225)](_0x34dfc8[_0x5f5ced(0x22d)]),await _0xe7f386[_0x5f5ced(0x225)](_0x34dfc8['projectName']),await _0x51148d[_0x5f5ced(0x225)](_0x34dfc8[_0x5f5ced(0x22d)]),await _0x7bb37(_0x34dfc8[_0x5f5ced(0x22d)],_0x34dfc8[_0x5f5ced(0x21f)]||'',_0x34dfc8[_0x5f5ced(0x212)]);if(_0x34dfc8[_0x5f5ced(0x1ed)]&&_0x34dfc8[_0x5f5ced(0x21f)]){console[_0x5f5ced(0x213)](_0x5f5ced(0x221));try{const _0x3007f3=await pullApiSilent(_0x34dfc8[_0x5f5ced(0x21f)],undefined,_0x550a51,_0x34dfc8['env']);_0x3007f3?(console['log'](_0x5f5ced(0x206)),logger[_0x5f5ced(0x207)](_0x5f5ced(0x1f5),_0x5f5ced(0x1ee)+_0x34dfc8[_0x5f5ced(0x21f)],{'projectDir':_0x550a51,'appCode':_0x34dfc8['appCode'],'env':_0x34dfc8[_0x5f5ced(0x212)]})):(console['log'](_0x5f5ced(0x1ec)),logger[_0x5f5ced(0x20a)](_0x5f5ced(0x1f5),_0x5f5ced(0x23a)+_0x34dfc8[_0x5f5ced(0x21f)],{'projectDir':_0x550a51,'appCode':_0x34dfc8[_0x5f5ced(0x21f)],'env':_0x34dfc8['env']}));}catch(_0xa38f76){console[_0x5f5ced(0x213)](_0x5f5ced(0x22f)),logger['warn'](_0x5f5ced(0x1f5),_0x5f5ced(0x20b)+_0x34dfc8[_0x5f5ced(0x21f)],{'projectDir':_0x550a51,'appCode':_0x34dfc8[_0x5f5ced(0x21f)],'env':_0x34dfc8[_0x5f5ced(0x212)],'error':_0xa38f76 instanceof Error?_0xa38f76[_0x5f5ced(0x200)]:String(_0xa38f76)});}}logger[_0x5f5ced(0x224)](_0x5f5ced(0x1f5),_0x5f5ced(0x222)+_0x34dfc8[_0x5f5ced(0x22d)]),_0x2c0e74(!![]),_0x5ec793(![]);}catch(_0x3942d5){logger['error'](_0x5f5ced(0x1f5),_0x5f5ced(0x1fd)+_0x34dfc8[_0x5f5ced(0x22d)],{'error':_0x3942d5 instanceof Error?_0x3942d5[_0x5f5ced(0x200)]:String(_0x3942d5)});try{a31_0x10a506['existsSync'](_0x550a51)&&(console[_0x5f5ced(0x213)]('*\x20清理失败的项目目录:\x20'+_0x550a51),a31_0x10a506[_0x5f5ced(0x233)](_0x550a51,{'recursive':!![],'force':!![]}));}catch(_0x5a7bbc){logger[_0x5f5ced(0x20a)]('create',_0x5f5ced(0x1ea)+_0x550a51,{'error':_0x5a7bbc instanceof Error?_0x5a7bbc[_0x5f5ced(0x200)]:String(_0x5a7bbc)});}_0x5ec793(![]),console['error']('×\x20项目创建失败:\x20'+(_0x3942d5 instanceof Error?_0x3942d5['message']:String(_0x3942d5)));}},_0x246c46=async _0x5f0372=>{const _0x48b3fd=a31_0x5c0a;await _0x1bb81f({'projectName':_0x5f0372,'env':_0x47f2b2[_0x48b3fd(0x212)]});},_0x7bb37=async(_0x15aa35,_0x3521ff,_0x3a993a)=>{const _0x3bdf37=a31_0x5c0a,_0x594bb5=a31_0x507299['resolve'](process['cwd'](),_0x15aa35),_0x4af1cc=a31_0x507299[_0x3bdf37(0x1fa)](_0x594bb5,_0x3bdf37(0x234));try{_0x3521ff?console['log'](_0x3bdf37(0x23b)+_0x15aa35+_0x3bdf37(0x22b)+_0x3521ff):console[_0x3bdf37(0x213)](_0x3bdf37(0x23b)+_0x15aa35+_0x3bdf37(0x21e));console[_0x3bdf37(0x213)]('*\x20配置文件路径:\x20'+_0x4af1cc);const _0x3746e3=fileURLToPath(import.meta[_0x3bdf37(0x22c)]),_0x195bd2=a31_0x507299[_0x3bdf37(0x228)](a31_0x507299['dirname'](_0x3746e3),_0x3bdf37(0x219)),_0x2a187f=a31_0x507299[_0x3bdf37(0x1fa)](_0x195bd2,'package.json');let _0x1d9ac1=_0x3bdf37(0x208);try{const _0x188e54=JSON['parse'](a31_0x10a506[_0x3bdf37(0x211)](_0x2a187f,_0x3bdf37(0x23d)));_0x1d9ac1=_0x188e54[_0x3bdf37(0x21c)]||_0x3bdf37(0x208);}catch(_0x3c4312){}const _0x3a2bc6=readConfig(),_0x3b0aa4=typeof _0x3a2bc6[_0x3bdf37(0x212)]===_0x3bdf37(0x203)?_0x3a2bc6[_0x3bdf37(0x212)]:undefined,{app:_0x5ca704,appcode:_0x4a2648,..._0x9e55fe}=_0x3a2bc6,_0x43388a={..._0x9e55fe,'appcode':_0x3521ff||'','env':_0x3a993a||_0x3b0aa4||_0x3bdf37(0x1fe),'createdAt':new Date()[_0x3bdf37(0x22e)](),'version':_0x1d9ac1};a31_0x10a506['writeFileSync'](_0x4af1cc,JSON[_0x3bdf37(0x1e8)](_0x43388a,null,0x2),_0x3bdf37(0x23d)),_0x3521ff?console[_0x3bdf37(0x213)](_0x3bdf37(0x223)+_0x3521ff):console[_0x3bdf37(0x213)](_0x3bdf37(0x214)),logger[_0x3bdf37(0x207)](_0x3bdf37(0x1f5),'配置应用AppCode:\x20'+_0x3521ff,{'projectName':_0x15aa35,'configFile':_0x3bdf37(0x234)});}catch(_0x2d820d){logger[_0x3bdf37(0x220)](_0x3bdf37(0x1f5),_0x3bdf37(0x1eb)+_0x3521ff,{'projectName':_0x15aa35,'error':_0x2d820d instanceof Error?_0x2d820d[_0x3bdf37(0x200)]:String(_0x2d820d)});}};useEffect(()=>{const _0x4360ab=a31_0x5c0a;_0x47f2b2[_0x4360ab(0x216)]&&_0x246c46(_0x47f2b2[_0x4360ab(0x216)]);},[_0x47f2b2[_0x6eb9a6(0x216)]]);if(!_0x5d621d&&!_0x19dac9&&!_0x47f2b2[_0x6eb9a6(0x216)])return a31_0x5bc2c0(EnhancedGuidedCreate,{'onCreate':_0x1bb81f,'env':_0x47f2b2[_0x6eb9a6(0x212)]});if(_0x5d621d)return a31_0x4b3143(a31_0x1c29da,{'children':[a31_0x4b3143(Box,{'marginTop':0x1,'children':[a31_0x5bc2c0(Box,{'width':'1'}),a31_0x5bc2c0(Text,{'color':_0x6eb9a6(0x209),'children':_0x6eb9a6(0x237)}),a31_0x5bc2c0(Text,{'children':'项目名称:\x20'}),a31_0x5bc2c0(Text,{'color':'green','children':_0x1e0954?.['projectName']}),_0x1e0954?.[_0x6eb9a6(0x21f)]&&a31_0x4b3143(a31_0x1c29da,{'children':[a31_0x5bc2c0(Text,{'children':_0x6eb9a6(0x235)}),a31_0x5bc2c0(Text,{'color':_0x6eb9a6(0x218),'children':_0x1e0954['appCode']})]})]}),a31_0x5bc2c0(TaskRunning,{..._0xc953fb}),a31_0x5bc2c0(TaskRunning,{..._0xe7f386}),a31_0x5bc2c0(TaskRunning,{..._0x51148d})]});if(_0x19dac9)return a31_0x4b3143(a31_0x1c29da,{'children':[a31_0x4b3143(Box,{'marginTop':0x1,'children':[a31_0x5bc2c0(Box,{'width':'1'}),a31_0x5bc2c0(Text,{'color':_0x6eb9a6(0x209),'children':'\x20√\x20'}),a31_0x5bc2c0(Text,{'children':_0x6eb9a6(0x230)}),a31_0x5bc2c0(Text,{'color':_0x6eb9a6(0x209),'children':_0x1e0954?.['projectName']}),_0x1e0954?.[_0x6eb9a6(0x21f)]&&a31_0x4b3143(a31_0x1c29da,{'children':[a31_0x5bc2c0(Text,{'children':'\x20|\x20应用AppCode:\x20'}),a31_0x5bc2c0(Text,{'color':'cyan','children':_0x1e0954[_0x6eb9a6(0x21f)]})]})]}),a31_0x5bc2c0(TaskFinished,{..._0xc953fb}),a31_0x5bc2c0(TaskFinished,{..._0xe7f386}),a31_0x5bc2c0(TaskFinished,{..._0x51148d}),a31_0x5bc2c0(Box,{'marginTop':0x1,'marginBottom':0x1,'children':a31_0x5bc2c0(Text,{'color':_0x6eb9a6(0x209),'children':'─'[_0x6eb9a6(0x210)](0x3c)})}),a31_0x5bc2c0(Box,{'children':a31_0x5bc2c0(Text,{'color':'green','bold':!![],'children':_0x6eb9a6(0x226)})}),a31_0x4b3143(Box,{'marginTop':0x1,'flexDirection':_0x6eb9a6(0x20d),'children':[a31_0x4b3143(Box,{'children':[a31_0x5bc2c0(Text,{'color':_0x6eb9a6(0x218),'children':_0x6eb9a6(0x232)}),a31_0x5bc2c0(Text,{'color':_0x6eb9a6(0x1f9),'bold':!![],'children':_0x1e0954?.[_0x6eb9a6(0x22d)]})]}),_0x1e0954?.[_0x6eb9a6(0x21f)]&&a31_0x4b3143(Box,{'children':[a31_0x5bc2c0(Text,{'color':'cyan','children':'🔗\x20应用AppCode:\x20'}),a31_0x5bc2c0(Text,{'color':_0x6eb9a6(0x1f9),'bold':!![],'children':_0x1e0954['appCode']})]}),a31_0x4b3143(Box,{'children':[a31_0x5bc2c0(Text,{'color':_0x6eb9a6(0x218),'children':_0x6eb9a6(0x1ff)}),_0x1e0954?.[_0x6eb9a6(0x1ed)]?a31_0x5bc2c0(Text,{'color':_0x6eb9a6(0x209),'bold':!![],'children':'已自动拉取\x20✓'}):_0x1e0954?.[_0x6eb9a6(0x21f)]?a31_0x5bc2c0(Text,{'color':_0x6eb9a6(0x23c),'bold':!![],'children':'需手动拉取'}):a31_0x5bc2c0(Text,{'color':_0x6eb9a6(0x1f8),'bold':!![],'children':_0x6eb9a6(0x202)})]})]}),a31_0x5bc2c0(Box,{'marginTop':0x1,'marginBottom':0x1,'children':a31_0x5bc2c0(Text,{'color':_0x6eb9a6(0x218),'bold':!![],'children':'🚀\x20接下来可以:'})}),a31_0x4b3143(Box,{'marginLeft':0x2,'flexDirection':_0x6eb9a6(0x20d),'children':[a31_0x4b3143(Box,{'children':[a31_0x5bc2c0(Text,{'color':_0x6eb9a6(0x209),'children':_0x6eb9a6(0x204)}),a31_0x5bc2c0(Text,{'color':_0x6eb9a6(0x1f9),'children':_0x6eb9a6(0x1f2)}),a31_0x5bc2c0(Text,{'color':_0x6eb9a6(0x218),'bold':!![],'children':_0x6eb9a6(0x227)+_0x1e0954?.[_0x6eb9a6(0x22d)]+'\x20&&\x20lovrabet\x20start'})]}),_0x1e0954?.[_0x6eb9a6(0x21f)]&&!_0x1e0954?.[_0x6eb9a6(0x1ed)]&&a31_0x4b3143(Box,{'children':[a31_0x5bc2c0(Text,{'color':_0x6eb9a6(0x23c),'children':_0x6eb9a6(0x22a)}),a31_0x5bc2c0(Text,{'color':_0x6eb9a6(0x1f9),'children':'拉取API配置:\x20'}),a31_0x5bc2c0(Text,{'color':'cyan','bold':!![],'children':'lovrabet\x20api\x20pull'})]}),!_0x1e0954?.[_0x6eb9a6(0x21f)]&&a31_0x4b3143(a31_0x1c29da,{'children':[a31_0x4b3143(Box,{'children':[a31_0x5bc2c0(Text,{'color':_0x6eb9a6(0x1f8),'children':_0x6eb9a6(0x22a)}),a31_0x5bc2c0(Text,{'color':_0x6eb9a6(0x1f9),'children':'配置AppCode:\x20'}),a31_0x5bc2c0(Text,{'color':_0x6eb9a6(0x218),'bold':!![],'children':_0x6eb9a6(0x231)})]}),a31_0x4b3143(Box,{'children':[a31_0x5bc2c0(Text,{'color':_0x6eb9a6(0x1f8),'children':'3.\x20'}),a31_0x5bc2c0(Text,{'color':'white','children':'拉取API配置:\x20'}),a31_0x5bc2c0(Text,{'color':_0x6eb9a6(0x218),'bold':!![],'children':_0x6eb9a6(0x1f0)})]})]})]}),a31_0x5bc2c0(Box,{'marginTop':0x1,'children':a31_0x5bc2c0(Text,{'color':_0x6eb9a6(0x209),'children':'─'[_0x6eb9a6(0x210)](0x3c)})})]});return null;}function a31_0x17ed(){const _0x56aa90=['3230096EnMXCe','column','300fCicMe','1810WICUSP','repeat','readFileSync','env','log','√\x20配置文件已创建,可稍后使用\x20\x27lovrabet\x20config\x20set\x20appcode\x20<app-code>\x27\x20配置','length','projectCode','11283kBDbql','cyan','../..','×\x20项目名过长,最多支持\x20100\x20个字符','开始创建项目:\x20','version','×\x20项目名不能为空','\x20创建配置文件','appCode','error','*\x20正在拉取\x20API\x20配置...','项目创建完成:\x20','√\x20配置文件已创建,应用AppCode:\x20','success','doTask','🎉\x20项目创建成功!','cd\x20','resolve','760024CKEhZp','2.\x20','\x20配置应用AppCode:\x20','url','projectName','toLocaleString','!\x20API\x20配置拉取异常,项目已创建,可稍后手动执行:\x20lovrabet\x20api\x20pull','项目名称:\x20','lovrabet\x20config\x20set\x20appcode\x20[app-code]','📁\x20项目名称:\x20','rmSync','.lovrabetrc','\x20|\x20应用AppCode:\x20','W_OK','\x20√\x20','24867BLuxwh','test','API\x20配置拉取失败:\x20','*\x20正在为项目\x20','yellow','utf8','2954203YkpggZ','stringify','×\x20项目名包含非法字符,不允许使用:\x20<\x20>\x20:\x20\x22\x20|\x20?\x20*\x20及控制字符','清理项目目录失败:\x20','配置应用AppCode失败:\x20','!\x20API\x20配置拉取失败,可稍后手动执行:\x20lovrabet\x20api\x20pull','pullApi','API\x20配置拉取成功:\x20','8672356rWcKCj','lovrabet\x20api\x20pull\x20--appcode\x20[app-code]','×\x20无法在当前目录创建项目,请检查目录权限','启动项目:\x20','1tIWBnz','constants','create','6402odhEGD','\x20已存在,请使用其他项目名','gray','white','join','×\x20项目目录\x20','setLogPath','项目创建失败:\x20','online','📦\x20API配置:\x20','message','existsSync','未配置','string','1.\x20','2290vMWrxn','√\x20API\x20配置拉取完成','info','1.0.0','green','warn','API\x20配置拉取异常:\x20'];a31_0x17ed=function(){return _0x56aa90;};return a31_0x17ed();}
@@ -1 +1 @@
1
- function a29_0x1b84(){var _0x49dbe0=['green','4866024UySroD','taskName','144QtmLTV','elapsed','890178rkCbvl','10611090sPZfec','1389069NmkiGo','2498574JWyugw','131825baaGSb','40572248sFGgaK'];a29_0x1b84=function(){return _0x49dbe0;};return a29_0x1b84();}(function(_0x1e4d68,_0xdbb445){var _0xebaf9a=a29_0x41b3,_0x59c7af=_0x1e4d68();while(!![]){try{var _0x7349a=-parseInt(_0xebaf9a(0x1e1))/0x1+-parseInt(_0xebaf9a(0x1df))/0x2+parseInt(_0xebaf9a(0x1e2))/0x3+-parseInt(_0xebaf9a(0x1e8))/0x4*(parseInt(_0xebaf9a(0x1e3))/0x5)+-parseInt(_0xebaf9a(0x1e6))/0x6+-parseInt(_0xebaf9a(0x1e0))/0x7+parseInt(_0xebaf9a(0x1e4))/0x8;if(_0x7349a===_0xdbb445)break;else _0x59c7af['push'](_0x59c7af['shift']());}catch(_0x273af3){_0x59c7af['push'](_0x59c7af['shift']());}}}(a29_0x1b84,0xc1e69));import{jsx as a29_0x1249c4,jsxs as a29_0x372c8c}from'react/jsx-runtime';function a29_0x41b3(_0x234bb9,_0x52b1ec){var _0x1b840a=a29_0x1b84();return a29_0x41b3=function(_0x41b3cc,_0x4b9f6a){_0x41b3cc=_0x41b3cc-0x1de;var _0x3ae58a=_0x1b840a[_0x41b3cc];return _0x3ae58a;},a29_0x41b3(_0x234bb9,_0x52b1ec);}import{Box,Text}from'ink';import{TaskTime}from'./task-time.js';export function TaskFinished(_0x2ac8e8){var _0x1731ec=a29_0x41b3;return a29_0x372c8c(Box,{'children':[a29_0x1249c4(Box,{'width':'1'}),a29_0x1249c4(Text,{'color':_0x1731ec(0x1e5),'children':'\x20√\x20'}),a29_0x1249c4(Text,{'children':_0x2ac8e8[_0x1731ec(0x1e7)]}),a29_0x1249c4(TaskTime,{'elapsed':_0x2ac8e8[_0x1731ec(0x1de)]})]});}
1
+ (function(_0x27e81b,_0x1b723a){var _0x2c2933=a32_0x3cdb,_0x1d5398=_0x27e81b();while(!![]){try{var _0x3b96dc=parseInt(_0x2c2933(0x13e))/0x1+-parseInt(_0x2c2933(0x146))/0x2+-parseInt(_0x2c2933(0x144))/0x3*(parseInt(_0x2c2933(0x147))/0x4)+parseInt(_0x2c2933(0x143))/0x5+-parseInt(_0x2c2933(0x141))/0x6*(-parseInt(_0x2c2933(0x149))/0x7)+parseInt(_0x2c2933(0x142))/0x8+-parseInt(_0x2c2933(0x148))/0x9;if(_0x3b96dc===_0x1b723a)break;else _0x1d5398['push'](_0x1d5398['shift']());}catch(_0x367680){_0x1d5398['push'](_0x1d5398['shift']());}}}(a32_0x3fd9,0x4ca66));function a32_0x3cdb(_0x43db4d,_0x7babf7){var _0x3fd99b=a32_0x3fd9();return a32_0x3cdb=function(_0x3cdbc5,_0x35817a){_0x3cdbc5=_0x3cdbc5-0x13e;var _0x232f40=_0x3fd99b[_0x3cdbc5];return _0x232f40;},a32_0x3cdb(_0x43db4d,_0x7babf7);}import{jsx as a32_0x1fe233,jsxs as a32_0x3ba3a4}from'react/jsx-runtime';import{Box,Text}from'ink';function a32_0x3fd9(){var _0x237dd2=['118444smGhVK','12367665CBiexi','80101dfbshw','583683RdDiEt','\x20√\x20','taskName','222XvZhGT','3854536dfNffE','2996045ZJbQkt','24JSHtBg','elapsed','326138rXXqqR'];a32_0x3fd9=function(){return _0x237dd2;};return a32_0x3fd9();}import{TaskTime}from'./task-time.js';export function TaskFinished(_0x396724){var _0x539240=a32_0x3cdb;return a32_0x3ba3a4(Box,{'children':[a32_0x1fe233(Box,{'width':'1'}),a32_0x1fe233(Text,{'color':'green','children':_0x539240(0x13f)}),a32_0x1fe233(Text,{'children':_0x396724[_0x539240(0x140)]}),a32_0x1fe233(TaskTime,{'elapsed':_0x396724[_0x539240(0x145)]})]});}