@lovrabet/cli 1.1.7 → 1.1.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (47) hide show
  1. package/LICENSE +45 -0
  2. package/README.md +85 -4
  3. package/lib/add-page/input-page-router.js +1 -1
  4. package/lib/add-page/main.js +1 -1
  5. package/lib/add-page/select-page-template.js +1 -1
  6. package/lib/api/api-pull-ui.js +1 -1
  7. package/lib/api/format-dataset.js +1 -1
  8. package/lib/api/generate-api-file.js +1 -1
  9. package/lib/api/main.js +1 -1
  10. package/lib/api/pull-silent.js +1 -1
  11. package/lib/api/pull.js +1 -1
  12. package/lib/auth/auth-server-ui.js +1 -1
  13. package/lib/auth/auth-server.js +1 -1
  14. package/lib/auth/constant.js +1 -1
  15. package/lib/auth/get-cookie.js +1 -1
  16. package/lib/auth/is-session-valid.js +1 -1
  17. package/lib/auth/logout.js +1 -1
  18. package/lib/cli.js +1 -1
  19. package/lib/cmd/build-watch.js +1 -1
  20. package/lib/cmd/build.js +1 -1
  21. package/lib/cmd/logs.js +1 -1
  22. package/lib/cmd/preview.js +1 -1
  23. package/lib/cmd/start.js +1 -1
  24. package/lib/config/config-help.js +1 -1
  25. package/lib/config/main.js +1 -1
  26. package/lib/constant/domain.js +1 -1
  27. package/lib/constant/env.js +1 -1
  28. package/lib/create-app/enhanced-guided-create.js +1 -1
  29. package/lib/create-app/format-elapsed.js +1 -1
  30. package/lib/create-app/main.js +1 -1
  31. package/lib/create-app/task-finished.js +1 -1
  32. package/lib/create-app/task-loading.js +1 -1
  33. package/lib/create-app/task-running.js +1 -1
  34. package/lib/create-app/task-time.js +1 -1
  35. package/lib/create-app/use-copy-project-template.js +1 -1
  36. package/lib/create-app/use-format-code.js +1 -1
  37. package/lib/create-app/use-install-dependencies.js +1 -1
  38. package/lib/help.js +1 -1
  39. package/lib/utils/config.js +1 -1
  40. package/lib/utils/copy-directory.js +1 -1
  41. package/lib/utils/http-client.js +1 -1
  42. package/lib/utils/logger.js +1 -1
  43. package/lib/utils/router-updater.js +1 -1
  44. package/lib/utils/template-replacer.js +1 -1
  45. package/package.json +2 -2
  46. package/templates/projects/sub-app-react-demo/package-lock.json +4 -4
  47. package/templates/projects/sub-app-react-demo/package.json +1 -1
@@ -1 +1 @@
1
- const a11_0xd67ccb=a11_0x5a38;function a11_0x5a38(_0x3c1f30,_0x387207){const _0x55800a=a11_0x5580();return a11_0x5a38=function(_0x5a38c8,_0xb96fd){_0x5a38c8=_0x5a38c8-0xdd;let _0x255947=_0x55800a[_0x5a38c8];return _0x255947;},a11_0x5a38(_0x3c1f30,_0x387207);}(function(_0x557fca,_0x48952f){const _0x543f68=a11_0x5a38,_0x13e710=_0x557fca();while(!![]){try{const _0x1243b0=parseInt(_0x543f68(0xea))/0x1+-parseInt(_0x543f68(0x105))/0x2+parseInt(_0x543f68(0x101))/0x3+parseInt(_0x543f68(0xf0))/0x4*(parseInt(_0x543f68(0xe5))/0x5)+-parseInt(_0x543f68(0xe6))/0x6+-parseInt(_0x543f68(0xe9))/0x7+parseInt(_0x543f68(0x102))/0x8;if(_0x1243b0===_0x48952f)break;else _0x13e710['push'](_0x13e710['shift']());}catch(_0x13b76f){_0x13e710['push'](_0x13e710['shift']());}}}(a11_0x5580,0x950cf));import{writeFileSync}from'node:fs';import a11_0x5ad76b 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';export async function authServer(_0x23a348){const _0x2404f1=a11_0x5a38,_0x2c2c47=_0x23a348?.[_0x2404f1(0xfd)]||![];if(await getIsSessionValid())return!![];const _0x55c370=await(await fetch(_0x2404f1(0xfa)))['json']();return new Promise(async(_0x8a7139,_0x23812d)=>{const _0x475818=_0x2404f1;let _0x14614e=0x0;const _0x53c290=a11_0x5ad76b['createServer'](_0x55c370,async(_0x3a3e62,_0x1c8f7f)=>{const _0x46c199=a11_0x5a38,_0x1c9f0e=getUserDomain(),_0x51c081=_0x3a3e62[_0x46c199(0xf1)][_0x46c199(0xf4)]||'',_0x3c9317=await fetch(_0x1c9f0e+'/api/auth/get-session',{'headers':{'cookie':_0x51c081}})[_0x46c199(0xf6)](_0x1c2ebc=>_0x1c2ebc[_0x46c199(0x100)]()),_0x5eeb42=_0x3c9317&&_0x3c9317[_0x46c199(0xe7)]&&_0x3c9317['user'];if(_0x5eeb42){writeFileSync(cookieFile,_0x51c081,'utf-8'),_0x8a7139(!![]);const _0x37106b=_0x46c199(0xf7);_0x1c8f7f[_0x46c199(0xfc)](0xc8,{'Content-Type':_0x46c199(0x104)}),_0x1c8f7f[_0x46c199(0xff)](_0x37106b),_0x53c290[_0x46c199(0xe4)]();}else{const _0x10e334=''+encodeURIComponent('https://dev.lovrabet.com:'+_0x14614e);_0x1c8f7f[_0x46c199(0xfc)](0x12e,{'location':_0x1c9f0e+_0x46c199(0xe3)+_0x10e334}),_0x1c8f7f[_0x46c199(0xff)]();return;}});_0x53c290['listen'](0x0,_0x475818(0xeb),()=>{const _0xa32bb7=_0x475818,_0x5f2f32=_0x53c290[_0xa32bb7(0xf3)]();_0x14614e=typeof _0x5f2f32===_0xa32bb7(0xef)&&_0x5f2f32?_0x5f2f32[_0xa32bb7(0xe0)]:Number(_0x5f2f32);const _0x3c243e='https://dev.lovrabet.com:'+_0x14614e;!_0x2c2c47&&(console[_0xa32bb7(0x103)](_0xa32bb7(0xec)),console['log'](_0xa32bb7(0xf8),_0x3c243e),console[_0xa32bb7(0x103)](_0xa32bb7(0xf9)),console[_0xa32bb7(0x103)](''),console[_0xa32bb7(0x103)]('💡\x20如果浏览器没有自动打开,请手动复制上面的登录地址到浏览器中打开'),console[_0xa32bb7(0x103)]('')),openInBrowser(_0x3c243e)['then'](_0x431e87=>{const _0x2b82b5=_0xa32bb7;!_0x2c2c47&&(_0x431e87?console[_0x2b82b5(0x103)](_0x2b82b5(0xdf)):(console['log'](_0x2b82b5(0xf5)),console[_0x2b82b5(0x103)](_0x2b82b5(0xdd),_0x3c243e)),console['log'](''));})[_0xa32bb7(0xe8)](()=>{const _0x54e458=_0xa32bb7;!_0x2c2c47&&(console[_0x54e458(0x103)](_0x54e458(0xf5)),console['log']('🔗\x20请手动复制登录地址到浏览器:',_0x3c243e),console[_0x54e458(0x103)](''));});}),_0x53c290['on']('error',_0x2e34b9=>{const _0x39ffe7=_0x475818;!_0x2c2c47&&console[_0x39ffe7(0xee)](_0x39ffe7(0xed),_0x2e34b9),_0x23812d(_0x2e34b9);});});}function openInBrowser(_0x18a29c){return new Promise(_0x1a8ae1=>{const _0x2e0207=a11_0x5a38,_0x4f1eb3=process[_0x2e0207(0xf2)];let _0x84e3a9;if(_0x4f1eb3===_0x2e0207(0xfb))_0x84e3a9='start\x20\x22\x22\x20\x22'+_0x18a29c+'\x22';else _0x4f1eb3===_0x2e0207(0xe1)?_0x84e3a9=_0x2e0207(0xe2)+_0x18a29c+'\x22':_0x84e3a9=_0x2e0207(0xde)+_0x18a29c+'\x22';exec(_0x84e3a9,_0x5ceb75=>{_0x5ceb75?_0x1a8ae1(![]):_0x1a8ae1(!![]);});});}function a11_0x5580(){const _0x3377a7=['close','5tsJUjn','3807144DobdSb','session','catch','6417243UfWNDm','1098934uEetEc','127.0.0.1','🔐\x20正在启动登录服务...','Auth\x20server\x20error:','error','object','3135032XkBeaZ','headers','platform','address','cookie','⚠️\x20\x20无法自动打开浏览器','then','<!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>','📍\x20登录地址:','🌐\x20正在尝试自动打开浏览器...','https://g.yuntooai.com/cert/lovrabet-dev.json','win32','writeHead','silent','main','end','json','1036704tiPCoK','8073784rqMGnw','log','text/html;\x20charset=utf-8','2151398kaGJDL','🔗\x20请手动复制登录地址到浏览器:','xdg-open\x20\x22','✅\x20浏览器已自动打开,请在浏览器中完成登录','port','darwin','open\x20\x22','/sign-in?redirect='];a11_0x5580=function(){return _0x3377a7;};return a11_0x5580();}if(import.meta[a11_0xd67ccb(0xfe)]){const isAuth=await authServer();console['log']('isAuth',isAuth);}
1
+ const a11_0xefd9c8=a11_0x11da;(function(_0xc0595f,_0x285de1){const _0x2416f3=a11_0x11da,_0x401340=_0xc0595f();while(!![]){try{const _0x3fc8c0=parseInt(_0x2416f3(0x130))/0x1+parseInt(_0x2416f3(0x11c))/0x2+parseInt(_0x2416f3(0x109))/0x3+-parseInt(_0x2416f3(0x12f))/0x4*(parseInt(_0x2416f3(0x10f))/0x5)+parseInt(_0x2416f3(0x124))/0x6*(parseInt(_0x2416f3(0x12d))/0x7)+-parseInt(_0x2416f3(0x12a))/0x8*(parseInt(_0x2416f3(0x113))/0x9)+parseInt(_0x2416f3(0x10d))/0xa*(-parseInt(_0x2416f3(0x108))/0xb);if(_0x3fc8c0===_0x285de1)break;else _0x401340['push'](_0x401340['shift']());}catch(_0x4bc584){_0x401340['push'](_0x401340['shift']());}}}(a11_0x336f,0x5835e));function a11_0x336f(){const _0x8dc609=['then','✅\x20浏览器已自动打开,请在浏览器中完成登录','object','main','close','user','Auth\x20server\x20error:','216000fAylkn','end','text/html;\x20charset=utf-8','127.0.0.1','listen','🔐\x20正在启动登录服务...','💡\x20如果浏览器没有自动打开,请手动复制上面的登录地址到浏览器中打开','writeHead','519744SeNJKa','darwin','platform','log','https://dev.lovrabet.com:','address','528qNaids','error','win32','56VKUxTd','⚠️\x20\x20无法自动打开浏览器','32SVZQkG','708308lsGSka','headers','catch','📍\x20登录地址:','start\x20\x22\x22\x20\x22','🔗\x20请手动复制登录地址到浏览器:','3798421NFhqJH','1281894IzZlzw','silent','xdg-open\x20\x22','https://g.yuntooai.com/cert/lovrabet-dev.json','20nuRgSk','createServer','357515ycNTST','session','<!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>','/sign-in?redirect=','42633ehVtTR','json'];a11_0x336f=function(){return _0x8dc609;};return a11_0x336f();}import{writeFileSync}from'node:fs';function a11_0x11da(_0x58db24,_0x29e815){const _0x336f9f=a11_0x336f();return a11_0x11da=function(_0x11da81,_0x370710){_0x11da81=_0x11da81-0x104;let _0x4d3831=_0x336f9f[_0x11da81];return _0x4d3831;},a11_0x11da(_0x58db24,_0x29e815);}import a11_0x2f81b8 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';export async function authServer(_0x2eeeba){const _0x2e2ee1=a11_0x11da,_0x16890d=_0x2eeeba?.[_0x2e2ee1(0x10a)]||![];if(await getIsSessionValid())return!![];const _0x2d448c=await(await fetch(_0x2e2ee1(0x10c)))[_0x2e2ee1(0x114)]();return new Promise(async(_0x37668f,_0x49be59)=>{const _0x4bebf4=_0x2e2ee1;let _0xd1f350=0x0;const _0x4da91e=a11_0x2f81b8[_0x4bebf4(0x10e)](_0x2d448c,async(_0x469832,_0x20a387)=>{const _0x137631=_0x4bebf4,_0x4684f0=getUserDomain(),_0x395179=_0x469832[_0x137631(0x131)]['cookie']||'',_0x52f465=await fetch(_0x4684f0+'/api/auth/get-session',{'headers':{'cookie':_0x395179}})['then'](_0x104182=>_0x104182[_0x137631(0x114)]()),_0x573fb6=_0x52f465&&_0x52f465[_0x137631(0x110)]&&_0x52f465[_0x137631(0x11a)];if(_0x573fb6){writeFileSync(cookieFile,_0x395179,'utf-8'),_0x37668f(!![]);const _0x4141cd=_0x137631(0x111);_0x20a387[_0x137631(0x123)](0xc8,{'Content-Type':_0x137631(0x11e)}),_0x20a387['end'](_0x4141cd),_0x4da91e[_0x137631(0x119)]();}else{const _0x2fb2e6=''+encodeURIComponent(_0x137631(0x128)+_0xd1f350);_0x20a387[_0x137631(0x123)](0x12e,{'location':_0x4684f0+_0x137631(0x112)+_0x2fb2e6}),_0x20a387[_0x137631(0x11d)]();return;}});_0x4da91e[_0x4bebf4(0x120)](0x0,_0x4bebf4(0x11f),()=>{const _0x5aa5f9=_0x4bebf4,_0x54ee87=_0x4da91e[_0x5aa5f9(0x129)]();_0xd1f350=typeof _0x54ee87===_0x5aa5f9(0x117)&&_0x54ee87?_0x54ee87['port']:Number(_0x54ee87);const _0x4ab59d=_0x5aa5f9(0x128)+_0xd1f350;!_0x16890d&&(console[_0x5aa5f9(0x127)](_0x5aa5f9(0x121)),console[_0x5aa5f9(0x127)](_0x5aa5f9(0x105),_0x4ab59d),console[_0x5aa5f9(0x127)]('🌐\x20正在尝试自动打开浏览器...'),console[_0x5aa5f9(0x127)](''),console[_0x5aa5f9(0x127)](_0x5aa5f9(0x122)),console[_0x5aa5f9(0x127)]('')),openInBrowser(_0x4ab59d)[_0x5aa5f9(0x115)](_0x210dfe=>{const _0x49437f=_0x5aa5f9;!_0x16890d&&(_0x210dfe?console['log'](_0x49437f(0x116)):(console[_0x49437f(0x127)]('⚠️\x20\x20无法自动打开浏览器'),console[_0x49437f(0x127)](_0x49437f(0x107),_0x4ab59d)),console[_0x49437f(0x127)](''));})[_0x5aa5f9(0x104)](()=>{const _0x170d1b=_0x5aa5f9;!_0x16890d&&(console['log'](_0x170d1b(0x12e)),console[_0x170d1b(0x127)](_0x170d1b(0x107),_0x4ab59d),console[_0x170d1b(0x127)](''));});}),_0x4da91e['on'](_0x4bebf4(0x12b),_0xf9a4d5=>{const _0x4e4ef3=_0x4bebf4;!_0x16890d&&console[_0x4e4ef3(0x12b)](_0x4e4ef3(0x11b),_0xf9a4d5),_0x49be59(_0xf9a4d5);});});}function openInBrowser(_0x177d5f){return new Promise(_0x539325=>{const _0xc7e635=a11_0x11da,_0x59126e=process[_0xc7e635(0x126)];let _0x580f96;if(_0x59126e===_0xc7e635(0x12c))_0x580f96=_0xc7e635(0x106)+_0x177d5f+'\x22';else _0x59126e===_0xc7e635(0x125)?_0x580f96='open\x20\x22'+_0x177d5f+'\x22':_0x580f96=_0xc7e635(0x10b)+_0x177d5f+'\x22';exec(_0x580f96,_0x289d4d=>{_0x289d4d?_0x539325(![]):_0x539325(!![]);});});}if(import.meta[a11_0xefd9c8(0x118)]){const isAuth=await authServer();console[a11_0xefd9c8(0x127)]('isAuth',isAuth);}
@@ -1 +1 @@
1
- const a12_0xa299d=a12_0x5167;function a12_0x5167(_0x9d2cac,_0x1c4397){const _0x146668=a12_0x1466();return a12_0x5167=function(_0x5167a5,_0x59e224){_0x5167a5=_0x5167a5-0x112;let _0x4fa2a8=_0x146668[_0x5167a5];return _0x4fa2a8;},a12_0x5167(_0x9d2cac,_0x1c4397);}(function(_0x41e52e,_0x205a0c){const _0x3ef18e=a12_0x5167,_0x2ecd0b=_0x41e52e();while(!![]){try{const _0xf4aa9=-parseInt(_0x3ef18e(0x113))/0x1*(parseInt(_0x3ef18e(0x112))/0x2)+-parseInt(_0x3ef18e(0x11a))/0x3+-parseInt(_0x3ef18e(0x116))/0x4*(parseInt(_0x3ef18e(0x11b))/0x5)+-parseInt(_0x3ef18e(0x11e))/0x6*(-parseInt(_0x3ef18e(0x114))/0x7)+-parseInt(_0x3ef18e(0x117))/0x8+-parseInt(_0x3ef18e(0x119))/0x9+parseInt(_0x3ef18e(0x11d))/0xa*(parseInt(_0x3ef18e(0x118))/0xb);if(_0xf4aa9===_0x205a0c)break;else _0x2ecd0b['push'](_0x2ecd0b['shift']());}catch(_0x2e05ac){_0x2ecd0b['push'](_0x2ecd0b['shift']());}}}(a12_0x1466,0x81560));import{mkdirSync}from'node:fs';import{homedir}from'node:os';function a12_0x1466(){const _0xb86f6d=['67243PuuWSs','2196864OGzguk','341187ZUQUrw','224050LdrymA','/.lovrabet','4020dLZOXo','22818igxYDl','2ZoVZVh','988732fVZmvA','637dVccAb','/cookie','64uiJPir','1681776MxuTop'];a12_0x1466=function(){return _0xb86f6d;};return a12_0x1466();}export const configDir=homedir()+a12_0xa299d(0x11c);export const cookieFile=configDir+a12_0xa299d(0x115);mkdirSync(configDir,{'recursive':!![]});
1
+ const a12_0x2e71ee=a12_0x2f5e;(function(_0x3d6b06,_0x173c92){const _0x1c38f1=a12_0x2f5e,_0x27d5ec=_0x3d6b06();while(!![]){try{const _0x20fe0c=-parseInt(_0x1c38f1(0x1cd))/0x1+parseInt(_0x1c38f1(0x1d2))/0x2*(parseInt(_0x1c38f1(0x1d3))/0x3)+parseInt(_0x1c38f1(0x1d5))/0x4*(parseInt(_0x1c38f1(0x1d6))/0x5)+parseInt(_0x1c38f1(0x1d0))/0x6*(parseInt(_0x1c38f1(0x1ce))/0x7)+parseInt(_0x1c38f1(0x1d4))/0x8+-parseInt(_0x1c38f1(0x1d1))/0x9+-parseInt(_0x1c38f1(0x1cf))/0xa*(parseInt(_0x1c38f1(0x1d7))/0xb);if(_0x20fe0c===_0x173c92)break;else _0x27d5ec['push'](_0x27d5ec['shift']());}catch(_0x5435a5){_0x27d5ec['push'](_0x27d5ec['shift']());}}}(a12_0x3714,0x1c37c));import{mkdirSync}from'node:fs';import{homedir}from'node:os';export const configDir=homedir()+'/.lovrabet';export const cookieFile=configDir+a12_0x2e71ee(0x1d8);function a12_0x3714(){const _0x55bea5=['4AqvfRI','741745CttQMb','219956EBLQVq','/cookie','13868XnVEMi','78337HdXePQ','100xVakEn','30nmMMCS','816102kejcAC','12nJMmdX','80892NqwAJE','431984lkmXMj'];a12_0x3714=function(){return _0x55bea5;};return a12_0x3714();}function a12_0x2f5e(_0x2b3e5e,_0xcc4cc7){const _0x3714a3=a12_0x3714();return a12_0x2f5e=function(_0x2f5eb7,_0x4d0e92){_0x2f5eb7=_0x2f5eb7-0x1cd;let _0x511869=_0x3714a3[_0x2f5eb7];return _0x511869;},a12_0x2f5e(_0x2b3e5e,_0xcc4cc7);}mkdirSync(configDir,{'recursive':!![]});
@@ -1 +1 @@
1
- (function(_0x39c31c,_0x346241){var _0x2c6daa=a13_0xe0ca,_0x48eb24=_0x39c31c();while(!![]){try{var _0x4e465c=-parseInt(_0x2c6daa(0xec))/0x1+parseInt(_0x2c6daa(0xea))/0x2+-parseInt(_0x2c6daa(0xe9))/0x3+parseInt(_0x2c6daa(0xef))/0x4*(-parseInt(_0x2c6daa(0xf0))/0x5)+parseInt(_0x2c6daa(0xf1))/0x6+parseInt(_0x2c6daa(0xe8))/0x7+parseInt(_0x2c6daa(0xeb))/0x8*(parseInt(_0x2c6daa(0xee))/0x9);if(_0x4e465c===_0x346241)break;else _0x48eb24['push'](_0x48eb24['shift']());}catch(_0x11b5d5){_0x48eb24['push'](_0x48eb24['shift']());}}}(a13_0x52e3,0x326c8));import{readFileSync}from'node:fs';import{cookieFile}from'./constant.js';function a13_0x52e3(){var _0x2f172d=['20WEILHp','1878630pdYujn','492422eAsMcF','235857CEswDc','226636zYbQuS','23776BmqyTt','229162Euyufd','utf-8','198ZCXgwF','47836WdCBjS'];a13_0x52e3=function(){return _0x2f172d;};return a13_0x52e3();}function a13_0xe0ca(_0x5c6875,_0x48b46b){var _0x52e314=a13_0x52e3();return a13_0xe0ca=function(_0xe0ca59,_0x50a8b6){_0xe0ca59=_0xe0ca59-0xe8;var _0x3ee262=_0x52e314[_0xe0ca59];return _0x3ee262;},a13_0xe0ca(_0x5c6875,_0x48b46b);}export function getCookie(){var _0x4fced4=a13_0xe0ca;try{return readFileSync(cookieFile,_0x4fced4(0xed));}catch{}return'';}
1
+ (function(_0x3746c4,_0x4e8191){var _0x5cdffd=a13_0x48f0,_0x545f15=_0x3746c4();while(!![]){try{var _0x38629a=parseInt(_0x5cdffd(0xc8))/0x1+-parseInt(_0x5cdffd(0xc2))/0x2*(parseInt(_0x5cdffd(0xc1))/0x3)+-parseInt(_0x5cdffd(0xc4))/0x4+-parseInt(_0x5cdffd(0xc3))/0x5+-parseInt(_0x5cdffd(0xc0))/0x6+-parseInt(_0x5cdffd(0xc5))/0x7*(-parseInt(_0x5cdffd(0xc7))/0x8)+parseInt(_0x5cdffd(0xca))/0x9*(parseInt(_0x5cdffd(0xc6))/0xa);if(_0x38629a===_0x4e8191)break;else _0x545f15['push'](_0x545f15['shift']());}catch(_0x1443b3){_0x545f15['push'](_0x545f15['shift']());}}}(a13_0x32c1,0x25aab));function a13_0x48f0(_0xaa112f,_0x328ac4){var _0x32c18a=a13_0x32c1();return a13_0x48f0=function(_0x48f085,_0x3222ad){_0x48f085=_0x48f085-0xc0;var _0x844851=_0x32c18a[_0x48f085];return _0x844851;},a13_0x48f0(_0xaa112f,_0x328ac4);}import{readFileSync}from'node:fs';import{cookieFile}from'./constant.js';function a13_0x32c1(){var _0x275450=['11694uShcoD','98sveUtw','927425gsIvnU','1035892qYGkSr','56567VYSpcx','10uwLJMb','8oCQXyM','215373QWUPMX','utf-8','5861556dXQkjL','509970HmVYds'];a13_0x32c1=function(){return _0x275450;};return a13_0x32c1();}export function getCookie(){var _0x8b5362=a13_0x48f0;try{return readFileSync(cookieFile,_0x8b5362(0xc9));}catch{}return'';}
@@ -1 +1 @@
1
- (function(_0x49023b,_0x4477b8){const _0x47724c=a14_0x18d5,_0x1858be=_0x49023b();while(!![]){try{const _0x422f79=parseInt(_0x47724c(0x1d8))/0x1+parseInt(_0x47724c(0x1df))/0x2*(-parseInt(_0x47724c(0x1da))/0x3)+-parseInt(_0x47724c(0x1de))/0x4+parseInt(_0x47724c(0x1db))/0x5*(parseInt(_0x47724c(0x1d4))/0x6)+-parseInt(_0x47724c(0x1d1))/0x7*(parseInt(_0x47724c(0x1d6))/0x8)+parseInt(_0x47724c(0x1dd))/0x9*(parseInt(_0x47724c(0x1d2))/0xa)+-parseInt(_0x47724c(0x1e0))/0xb*(-parseInt(_0x47724c(0x1d5))/0xc);if(_0x422f79===_0x4477b8)break;else _0x1858be['push'](_0x1858be['shift']());}catch(_0x2ad436){_0x1858be['push'](_0x1858be['shift']());}}}(a14_0x5b8a,0x3ba29));import{existsSync,readFileSync}from'node:fs';import{getUserDomain}from'../constant/domain.js';import{cookieFile}from'./constant.js';function a14_0x18d5(_0x292e99,_0xda29ef){const _0x5b8acf=a14_0x5b8a();return a14_0x18d5=function(_0x18d5ac,_0x46e699){_0x18d5ac=_0x18d5ac-0x1cf;let _0x9253d8=_0x5b8acf[_0x18d5ac];return _0x9253d8;},a14_0x18d5(_0x292e99,_0xda29ef);}function a14_0x5b8a(){const _0x1c6b37=['803xBMoSK','session','user','7HmvurW','280Tzglyw','/api/auth/get-session','1687674gkZknC','60216NzRfcH','2260336hHcgcO','utf-8','104671xhqSHI','then','171966UXWEGd','5CKhWJb','json','89901QLQAvT','1562020ielPyy','4cWTcrR'];a14_0x5b8a=function(){return _0x1c6b37;};return a14_0x5b8a();}export async function getIsSessionValid(){const _0x5e1a81=a14_0x18d5;try{if(!existsSync(cookieFile))return![];const _0x45d25b=readFileSync(cookieFile,_0x5e1a81(0x1d7)),_0x2a32b1=await fetch(getUserDomain()+_0x5e1a81(0x1d3),{'headers':{'cookie':_0x45d25b}})[_0x5e1a81(0x1d9)](_0x260bdb=>_0x260bdb[_0x5e1a81(0x1dc)]());return _0x2a32b1&&_0x2a32b1[_0x5e1a81(0x1cf)]&&_0x2a32b1[_0x5e1a81(0x1d0)];}catch{}return![];}
1
+ function a14_0x33cd(){const _0x31fbdd=['then','/api/auth/get-session','1226tLZXqY','user','476RaRKiK','json','session','1761910zZpLiR','167hDFwMI','7378656KJYrxg','11fUFjnk','utf-8','16FPlURJ','999198gvispJ','1145dkfHmd','36ivBnPJ','213479HxdlIg','762150zpcjcw'];a14_0x33cd=function(){return _0x31fbdd;};return a14_0x33cd();}(function(_0x1f951d,_0x2ca05c){const _0x1dfdff=a14_0x4ff8,_0x5c6d37=_0x1f951d();while(!![]){try{const _0x4a6d91=-parseInt(_0x1dfdff(0xd1))/0x1*(-parseInt(_0x1dfdff(0xcb))/0x2)+-parseInt(_0x1dfdff(0xc8))/0x3+parseInt(_0x1dfdff(0xcd))/0x4*(-parseInt(_0x1dfdff(0xc5))/0x5)+-parseInt(_0x1dfdff(0xc6))/0x6*(-parseInt(_0x1dfdff(0xc7))/0x7)+parseInt(_0x1dfdff(0xd5))/0x8*(-parseInt(_0x1dfdff(0xc4))/0x9)+parseInt(_0x1dfdff(0xd0))/0xa*(-parseInt(_0x1dfdff(0xd3))/0xb)+parseInt(_0x1dfdff(0xd2))/0xc;if(_0x4a6d91===_0x2ca05c)break;else _0x5c6d37['push'](_0x5c6d37['shift']());}catch(_0x294834){_0x5c6d37['push'](_0x5c6d37['shift']());}}}(a14_0x33cd,0x35e21));import{existsSync,readFileSync}from'node:fs';import{getUserDomain}from'../constant/domain.js';function a14_0x4ff8(_0x2e3933,_0x58cdc6){const _0x33cd04=a14_0x33cd();return a14_0x4ff8=function(_0x4ff8fc,_0x4315b5){_0x4ff8fc=_0x4ff8fc-0xc4;let _0x45dfb4=_0x33cd04[_0x4ff8fc];return _0x45dfb4;},a14_0x4ff8(_0x2e3933,_0x58cdc6);}import{cookieFile}from'./constant.js';export async function getIsSessionValid(){const _0x243bec=a14_0x4ff8;try{if(!existsSync(cookieFile))return![];const _0xd0bcc0=readFileSync(cookieFile,_0x243bec(0xd4)),_0x560e72=await fetch(getUserDomain()+_0x243bec(0xca),{'headers':{'cookie':_0xd0bcc0}})[_0x243bec(0xc9)](_0x17e754=>_0x17e754[_0x243bec(0xce)]());return _0x560e72&&_0x560e72[_0x243bec(0xcf)]&&_0x560e72[_0x243bec(0xcc)];}catch{}return![];}
@@ -1 +1 @@
1
- (function(_0x28c428,_0x422946){var _0x1006fa=a15_0xa705,_0x3d2617=_0x28c428();while(!![]){try{var _0x184901=parseInt(_0x1006fa(0xf1))/0x1*(parseInt(_0x1006fa(0xf3))/0x2)+-parseInt(_0x1006fa(0xf6))/0x3*(parseInt(_0x1006fa(0xef))/0x4)+parseInt(_0x1006fa(0xf5))/0x5+parseInt(_0x1006fa(0xf7))/0x6+parseInt(_0x1006fa(0xed))/0x7+parseInt(_0x1006fa(0xf9))/0x8*(parseInt(_0x1006fa(0xfa))/0x9)+-parseInt(_0x1006fa(0xee))/0xa*(parseInt(_0x1006fa(0xf4))/0xb);if(_0x184901===_0x422946)break;else _0x3d2617['push'](_0x3d2617['shift']());}catch(_0x4513bf){_0x3d2617['push'](_0x3d2617['shift']());}}}(a15_0x53b7,0xb1735));import{unlinkSync,existsSync}from'node:fs';function a15_0xa705(_0x3cbb15,_0x2117a5){var _0x53b75b=a15_0x53b7();return a15_0xa705=function(_0xa7053b,_0x38bbf0){_0xa7053b=_0xa7053b-0xed;var _0x4215e8=_0x53b75b[_0xa7053b];return _0x4215e8;},a15_0xa705(_0x3cbb15,_0x2117a5);}import{cookieFile}from'./constant.js';function a15_0x53b7(){var _0x162966=['✓\x20已退出登录','43934HUtZsS','209MVvfZz','6613765wwzbmh','18EXJIKc','467022Vabmaw','log','1989080GAyakG','18biTsyn','4643079QIZdDW','1112170wEZGCy','443852AxkggQ','!\x20当前未登录','43kQYDKE'];a15_0x53b7=function(){return _0x162966;};return a15_0x53b7();}export function logout(){var _0x67f66d=a15_0xa705;existsSync(cookieFile)?(unlinkSync(cookieFile),console[_0x67f66d(0xf8)](_0x67f66d(0xf2))):console['log'](_0x67f66d(0xf0));}
1
+ (function(_0x1bf359,_0x454f02){var _0x3eb964=a15_0x2b3b,_0x43ead6=_0x1bf359();while(!![]){try{var _0x51e230=parseInt(_0x3eb964(0x8f))/0x1+parseInt(_0x3eb964(0x93))/0x2+parseInt(_0x3eb964(0x89))/0x3+parseInt(_0x3eb964(0x94))/0x4+-parseInt(_0x3eb964(0x8d))/0x5*(parseInt(_0x3eb964(0x91))/0x6)+parseInt(_0x3eb964(0x8a))/0x7*(-parseInt(_0x3eb964(0x90))/0x8)+parseInt(_0x3eb964(0x8e))/0x9*(-parseInt(_0x3eb964(0x92))/0xa);if(_0x51e230===_0x454f02)break;else _0x43ead6['push'](_0x43ead6['shift']());}catch(_0x310d2d){_0x43ead6['push'](_0x43ead6['shift']());}}}(a15_0xb0ec,0x92833));import{unlinkSync,existsSync}from'node:fs';import{cookieFile}from'./constant.js';export function logout(){var _0x5cce91=a15_0x2b3b;existsSync(cookieFile)?(unlinkSync(cookieFile),console[_0x5cce91(0x8b)](_0x5cce91(0x8c))):console[_0x5cce91(0x8b)]('!\x20当前未登录');}function a15_0x2b3b(_0x1a6f32,_0x2ff6ea){var _0xb0ec89=a15_0xb0ec();return a15_0x2b3b=function(_0x2b3ba1,_0x301ea3){_0x2b3ba1=_0x2b3ba1-0x89;var _0x2af99d=_0xb0ec89[_0x2b3ba1];return _0x2af99d;},a15_0x2b3b(_0x1a6f32,_0x2ff6ea);}function a15_0xb0ec(){var _0x3cda3f=['log','✓\x20已退出登录','5894465wJVVFv','18klFKuK','701551isDKhQ','50672CNIuxu','6Pvefwy','1985450QVMStO','1817822ILfYun','512664lniMej','1559436PsRUib','91QIshEj'];a15_0xb0ec=function(){return _0x3cda3f;};return a15_0xb0ec();}
package/lib/cli.js CHANGED
@@ -1,2 +1,2 @@
1
1
  #!/usr/bin/env node
2
- const a16_0x42fca=a16_0x4fef;(function(_0x5c5d93,_0x5c859d){const _0x38fec8=a16_0x4fef,_0x33afcb=_0x5c5d93();while(!![]){try{const _0x2d06a7=parseInt(_0x38fec8(0xb1))/0x1*(parseInt(_0x38fec8(0xac))/0x2)+-parseInt(_0x38fec8(0xb7))/0x3*(-parseInt(_0x38fec8(0x9d))/0x4)+-parseInt(_0x38fec8(0xa7))/0x5*(-parseInt(_0x38fec8(0x9e))/0x6)+parseInt(_0x38fec8(0xb8))/0x7+-parseInt(_0x38fec8(0xa3))/0x8*(parseInt(_0x38fec8(0xb9))/0x9)+-parseInt(_0x38fec8(0xa0))/0xa*(parseInt(_0x38fec8(0x9c))/0xb)+-parseInt(_0x38fec8(0xa2))/0xc*(-parseInt(_0x38fec8(0xa6))/0xd);if(_0x2d06a7===_0x5c859d)break;else _0x33afcb['push'](_0x33afcb['shift']());}catch(_0x2b9a20){_0x33afcb['push'](_0x33afcb['shift']());}}}(a16_0x93cc,0x8c80e));import{jsx as a16_0xe25169}from'react/jsx-runtime';import a16_0x5ca777 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';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';function a16_0x93cc(){const _0x22a22b=['10hpzOZh','watch','2698332fvVuYe','56ZrltBL','cwd','add','52lxkCxx','5cxwoGC','exit','boolean','logs','start','1612AGQOXu','input','string','logout','api','263FVHqHr','env','error','\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','preview','flags','167445wDGHaT','5179216zDRgWZ','1295181AymqfY','setLogPath','build','page','6700881XmXqHP','12gcwXCK','1039686VILySx','trim'];a16_0x93cc=function(){return _0x22a22b;};return a16_0x93cc();}function a16_0x4fef(_0x4d0b45,_0x214036){const _0x93ccb9=a16_0x93cc();return a16_0x4fef=function(_0x4fefce,_0x163e38){_0x4fefce=_0x4fefce-0x99;let _0x49c45a=_0x93ccb9[_0x4fefce];return _0x49c45a;},a16_0x4fef(_0x4d0b45,_0x214036);}import{showLogs,clearLogs}from'./cmd/logs.js';const cli=a16_0x5ca777(a16_0x42fca(0xb4),{'importMeta':import.meta,'flags':{'name':{'type':a16_0x42fca(0xae)},'clear':{'type':a16_0x42fca(0xa9)},'env':{'type':a16_0x42fca(0xae)},'watch':{'type':'boolean'},'help':{'type':a16_0x42fca(0xa9)},'appcode':{'type':a16_0x42fca(0xae)},'output':{'type':'string'}}});await run();async function run(){const _0x3bf2e3=a16_0x42fca,_0x264153=cli[_0x3bf2e3(0xad)][0x0];switch(_0x264153){case'create':{const _0x4751f6=cli['input'][0x1]?.[_0x3bf2e3(0x9f)](),_0x2d68a4=cli[_0x3bf2e3(0xb6)][_0x3bf2e3(0xb2)];render(a16_0xe25169(CreateApp,{'projectCode':_0x4751f6,'env':_0x2d68a4}));break;}case _0x3bf2e3(0xa5):{cli[_0x3bf2e3(0xad)][0x1]===_0x3bf2e3(0x9b)&&(logger[_0x3bf2e3(0x99)](process[_0x3bf2e3(0xa4)]()),render(a16_0xe25169(AddPage,{})));break;}case _0x3bf2e3(0xab):{try{logger['setLogPath'](process[_0x3bf2e3(0xa4)]()),await runStart();}catch(_0x29d967){console['error'](_0x29d967),process[_0x3bf2e3(0xa8)](0x1);}break;}case _0x3bf2e3(0x9a):{try{logger[_0x3bf2e3(0x99)](process[_0x3bf2e3(0xa4)]()),await runBuild();}catch(_0x32ee78){console[_0x3bf2e3(0xb3)](_0x32ee78),process[_0x3bf2e3(0xa8)](0x1);}break;}case _0x3bf2e3(0xb5):{const _0x49225a=cli[_0x3bf2e3(0xb6)][_0x3bf2e3(0xa1)];logger[_0x3bf2e3(0x99)](process[_0x3bf2e3(0xa4)]());if(_0x49225a)try{await Promise['all']([runBuildWatch(),runPreview()]);}catch(_0x409bd2){console[_0x3bf2e3(0xb3)](_0x409bd2),process[_0x3bf2e3(0xa8)](0x1);}else try{await runPreview();}catch(_0x444332){console['error'](_0x444332),process[_0x3bf2e3(0xa8)](0x1);}break;}case'config':{render(a16_0xe25169(Config,{'cli':cli}));break;}case _0x3bf2e3(0xb0):{await apiCli(cli);break;}case'auth':{render(a16_0xe25169(AuthServer,{}));break;}case _0x3bf2e3(0xaf):{logout();break;}case _0x3bf2e3(0xaa):{cli['flags']['clear']?clearLogs():showLogs();break;}default:render(a16_0xe25169(Help,{}));break;}}
2
+ const a16_0x5456f1=a16_0x4236;(function(_0x546a24,_0x4d1e2f){const _0x82cf60=a16_0x4236,_0x199f40=_0x546a24();while(!![]){try{const _0x2a9972=parseInt(_0x82cf60(0xa6))/0x1*(parseInt(_0x82cf60(0xa2))/0x2)+-parseInt(_0x82cf60(0xac))/0x3*(-parseInt(_0x82cf60(0xb9))/0x4)+parseInt(_0x82cf60(0xae))/0x5*(-parseInt(_0x82cf60(0xa5))/0x6)+-parseInt(_0x82cf60(0x9e))/0x7*(-parseInt(_0x82cf60(0xbd))/0x8)+parseInt(_0x82cf60(0xaf))/0x9*(parseInt(_0x82cf60(0xbe))/0xa)+parseInt(_0x82cf60(0xb2))/0xb+parseInt(_0x82cf60(0xb0))/0xc*(-parseInt(_0x82cf60(0x9d))/0xd);if(_0x2a9972===_0x4d1e2f)break;else _0x199f40['push'](_0x199f40['shift']());}catch(_0x2b071d){_0x199f40['push'](_0x199f40['shift']());}}}(a16_0x3981,0x202bd));import{jsx as a16_0x120b84}from'react/jsx-runtime';import a16_0x56e1f9 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';import{apiCli}from'./api/main.js';import{AuthServer}from'./auth/auth-server-ui.js';import{logout}from'./auth/logout.js';function a16_0x3981(){const _0x4586b6=['501VlyrVL','setLogPath','1087195jzzchS','9noFmla','12DpmXMm','page','250239yUhVDP','logs','input','string','all','trim','config','5812TVJytF','cwd','boolean','start','277584mbHWqF','879640oWQOJp','error','1234246YVaAdP','14ilXNYl','auth','add','api','42788bQLLix','preview','env','6uOhnrQ','1UQsljv','logout','watch','flags','build','exit'];a16_0x3981=function(){return _0x4586b6;};return a16_0x3981();}import{Help}from'./help.js';function a16_0x4236(_0x30e727,_0x1c20cf){const _0x39816a=a16_0x3981();return a16_0x4236=function(_0x42369c,_0x222fd1){_0x42369c=_0x42369c-0x9d;let _0x40b318=_0x39816a[_0x42369c];return _0x40b318;},a16_0x4236(_0x30e727,_0x1c20cf);}import{logger}from'./utils/logger.js';import{showLogs,clearLogs}from'./cmd/logs.js';const cli=a16_0x56e1f9('\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',{'importMeta':import.meta,'flags':{'name':{'type':a16_0x5456f1(0xb5)},'clear':{'type':'boolean'},'env':{'type':a16_0x5456f1(0xb5)},'watch':{'type':a16_0x5456f1(0xbb)},'help':{'type':'boolean'},'appcode':{'type':a16_0x5456f1(0xb5)},'output':{'type':a16_0x5456f1(0xb5)}}});await run();async function run(){const _0x4343a1=a16_0x5456f1,_0x38bca4=cli[_0x4343a1(0xb4)][0x0];switch(_0x38bca4){case'create':{const _0x5ad1cc=cli[_0x4343a1(0xb4)][0x1]?.[_0x4343a1(0xb7)](),_0x24f470=cli['flags'][_0x4343a1(0xa4)];render(a16_0x120b84(CreateApp,{'projectCode':_0x5ad1cc,'env':_0x24f470}));break;}case _0x4343a1(0xa0):{cli[_0x4343a1(0xb4)][0x1]===_0x4343a1(0xb1)&&(logger[_0x4343a1(0xad)](process['cwd']()),render(a16_0x120b84(AddPage,{})));break;}case _0x4343a1(0xbc):{try{logger[_0x4343a1(0xad)](process[_0x4343a1(0xba)]()),await runStart();}catch(_0x45c3be){console['error'](_0x45c3be),process[_0x4343a1(0xab)](0x1);}break;}case _0x4343a1(0xaa):{try{logger[_0x4343a1(0xad)](process[_0x4343a1(0xba)]()),await runBuild();}catch(_0x23d71e){console[_0x4343a1(0xbf)](_0x23d71e),process['exit'](0x1);}break;}case _0x4343a1(0xa3):{const _0x36ddf5=cli[_0x4343a1(0xa9)][_0x4343a1(0xa8)];logger[_0x4343a1(0xad)](process[_0x4343a1(0xba)]());if(_0x36ddf5)try{await Promise[_0x4343a1(0xb6)]([runBuildWatch(),runPreview()]);}catch(_0x4215c3){console[_0x4343a1(0xbf)](_0x4215c3),process[_0x4343a1(0xab)](0x1);}else try{await runPreview();}catch(_0x37e011){console[_0x4343a1(0xbf)](_0x37e011),process[_0x4343a1(0xab)](0x1);}break;}case _0x4343a1(0xb8):{render(a16_0x120b84(Config,{'cli':cli}));break;}case _0x4343a1(0xa1):{await apiCli(cli);break;}case _0x4343a1(0x9f):{render(a16_0x120b84(AuthServer,{}));break;}case _0x4343a1(0xa7):{logout();break;}case _0x4343a1(0xb3):{cli[_0x4343a1(0xa9)]['clear']?clearLogs():showLogs();break;}default:render(a16_0x120b84(Help,{}));break;}}
@@ -1 +1 @@
1
- function a17_0x2154(){const _0x1fa6c3=['npm\x20run\x20build\x20exited\x20with\x20code\x20','2640491lKfzrs','build','--watch','2010363oaSwmg','24427304VEltdW','close','2197280vvsmBv','node_modules','error','7434145LYLVIm','3216744UMuMhe','4IWhFDJ','206496TSGcsy','cwd','env','.bin'];a17_0x2154=function(){return _0x1fa6c3;};return a17_0x2154();}function a17_0x3f2a(_0x27f5f3,_0x53d3c7){const _0x215409=a17_0x2154();return a17_0x3f2a=function(_0x3f2a07,_0x321723){_0x3f2a07=_0x3f2a07-0x194;let _0x5d44f5=_0x215409[_0x3f2a07];return _0x5d44f5;},a17_0x3f2a(_0x27f5f3,_0x53d3c7);}(function(_0x55946e,_0x158aa8){const _0x2a018f=a17_0x3f2a,_0x5cb3ee=_0x55946e();while(!![]){try{const _0x272f2e=-parseInt(_0x2a018f(0x19f))/0x1+parseInt(_0x2a018f(0x199))/0x2+-parseInt(_0x2a018f(0x196))/0x3+-parseInt(_0x2a018f(0x19e))/0x4*(parseInt(_0x2a018f(0x19c))/0x5)+-parseInt(_0x2a018f(0x19d))/0x6+-parseInt(_0x2a018f(0x1a4))/0x7+parseInt(_0x2a018f(0x197))/0x8;if(_0x272f2e===_0x158aa8)break;else _0x5cb3ee['push'](_0x5cb3ee['shift']());}catch(_0x16963c){_0x5cb3ee['push'](_0x5cb3ee['shift']());}}}(a17_0x2154,0xd5b06));import{spawn}from'node:child_process';import{delimiter,join}from'node:path';export function runBuildWatch(){return new Promise((_0x2f1df2,_0x29a97a)=>{const _0x4ddafc=a17_0x3f2a,_0x2377d5=spawn('vite',[_0x4ddafc(0x194),_0x4ddafc(0x195)],{'stdio':'inherit','shell':!![],'env':{...process[_0x4ddafc(0x1a1)],'PATH':''+join(process[_0x4ddafc(0x1a0)](),_0x4ddafc(0x19a),_0x4ddafc(0x1a2))+delimiter+process[_0x4ddafc(0x1a1)]['PATH']}});_0x2377d5['on'](_0x4ddafc(0x198),_0x618bf4=>{const _0x13dbfa=_0x4ddafc;if(_0x618bf4===0x0||_0x618bf4===null)_0x2f1df2();else _0x29a97a(new Error(_0x13dbfa(0x1a3)+_0x618bf4));}),_0x2377d5['on'](_0x4ddafc(0x19b),_0x29a97a);});}
1
+ function a17_0x7b02(_0x53864e,_0x73c613){const _0x476386=a17_0x4763();return a17_0x7b02=function(_0x7b022e,_0x3dfec3){_0x7b022e=_0x7b022e-0x1c4;let _0xe8f1bd=_0x476386[_0x7b022e];return _0xe8f1bd;},a17_0x7b02(_0x53864e,_0x73c613);}(function(_0x3c3743,_0x1bc56c){const _0x1cbf8d=a17_0x7b02,_0x5a6089=_0x3c3743();while(!![]){try{const _0x863cc0=parseInt(_0x1cbf8d(0x1c9))/0x1+parseInt(_0x1cbf8d(0x1ca))/0x2*(-parseInt(_0x1cbf8d(0x1ce))/0x3)+parseInt(_0x1cbf8d(0x1d3))/0x4+-parseInt(_0x1cbf8d(0x1d4))/0x5+-parseInt(_0x1cbf8d(0x1cb))/0x6*(-parseInt(_0x1cbf8d(0x1d6))/0x7)+parseInt(_0x1cbf8d(0x1c7))/0x8*(-parseInt(_0x1cbf8d(0x1cd))/0x9)+-parseInt(_0x1cbf8d(0x1d5))/0xa*(-parseInt(_0x1cbf8d(0x1cf))/0xb);if(_0x863cc0===_0x1bc56c)break;else _0x5a6089['push'](_0x5a6089['shift']());}catch(_0x2d7b43){_0x5a6089['push'](_0x5a6089['shift']());}}}(a17_0x4763,0xbf35f));import{spawn}from'node:child_process';function a17_0x4763(){const _0x42080c=['294330qhsgvc','--watch','15894JpwzCn','6cpodcv','14375735PNDmHp','error','node_modules','PATH','1038684FmpEqc','1063600gZoBCA','10KyGtUJ','140dZmEwd','.bin','cwd','npm\x20run\x20build\x20exited\x20with\x20code\x20','close','5472nGnJVK','build','736745RTHipO','1080538bttfTQ'];a17_0x4763=function(){return _0x42080c;};return a17_0x4763();}import{delimiter,join}from'node:path';export function runBuildWatch(){return new Promise((_0x159938,_0x49e8e7)=>{const _0x3f5f20=a17_0x7b02,_0x1065d9=spawn('vite',[_0x3f5f20(0x1c8),_0x3f5f20(0x1cc)],{'stdio':'inherit','shell':!![],'env':{...process['env'],'PATH':''+join(process[_0x3f5f20(0x1c4)](),_0x3f5f20(0x1d1),_0x3f5f20(0x1d7))+delimiter+process['env'][_0x3f5f20(0x1d2)]}});_0x1065d9['on'](_0x3f5f20(0x1c6),_0x5d9925=>{const _0x1fdaa6=_0x3f5f20;if(_0x5d9925===0x0||_0x5d9925===null)_0x159938();else _0x49e8e7(new Error(_0x1fdaa6(0x1c5)+_0x5d9925));}),_0x1065d9['on'](_0x3f5f20(0x1d0),_0x49e8e7);});}
package/lib/cmd/build.js CHANGED
@@ -1 +1 @@
1
- function a18_0x2325(_0x4e8ede,_0x5843bf){const _0x20b485=a18_0x20b4();return a18_0x2325=function(_0x232548,_0x511c71){_0x232548=_0x232548-0x152;let _0x2813a4=_0x20b485[_0x232548];return _0x2813a4;},a18_0x2325(_0x4e8ede,_0x5843bf);}(function(_0x5b7ff0,_0x183feb){const _0x128ede=a18_0x2325,_0x4cb81a=_0x5b7ff0();while(!![]){try{const _0x200d28=-parseInt(_0x128ede(0x164))/0x1+parseInt(_0x128ede(0x16b))/0x2+parseInt(_0x128ede(0x155))/0x3+parseInt(_0x128ede(0x163))/0x4+-parseInt(_0x128ede(0x165))/0x5*(parseInt(_0x128ede(0x154))/0x6)+-parseInt(_0x128ede(0x162))/0x7+parseInt(_0x128ede(0x15b))/0x8*(parseInt(_0x128ede(0x166))/0x9);if(_0x200d28===_0x183feb)break;else _0x4cb81a['push'](_0x4cb81a['shift']());}catch(_0x21ecee){_0x4cb81a['push'](_0x4cb81a['shift']());}}}(a18_0x20b4,0xec26e));import{delimiter,join}from'node:path';function a18_0x20b4(){const _0x3f0ef2=['26516264DnhnsR','run','env','npm\x20run\x20build','pipe','项目构建出错','now','4696475xxiyxs','2105692CiuktY','1911919MChqhC','15mkwlEW','9WjtQMY','cwd','stderr','npm','PATH','1313038MbvgvH','error','info','node_modules','开始构建项目','trim','项目构建成功','npm\x20run\x20build\x20exited\x20with\x20code\x20','2380662sngWGV','728934bnWUXI','data','build','inherit','success','.bin'];a18_0x20b4=function(){return _0x3f0ef2;};return a18_0x20b4();}import{spawn}from'node:child_process';import{logger}from'../utils/logger.js';export function runBuild(){return new Promise((_0x15ba3b,_0x4009fb)=>{const _0x2c78c4=a18_0x2325,_0x37f85d=Date[_0x2c78c4(0x161)]();logger[_0x2c78c4(0x16d)]('build',_0x2c78c4(0x16f),{'command':_0x2c78c4(0x15e)});let _0xa0bf1a='';const _0x4d23b8=spawn(_0x2c78c4(0x169),[_0x2c78c4(0x15c),_0x2c78c4(0x157)],{'stdio':[_0x2c78c4(0x158),_0x2c78c4(0x158),_0x2c78c4(0x15f)],'shell':!![],'env':{...process[_0x2c78c4(0x15d)],'PATH':''+join(process['cwd'](),_0x2c78c4(0x16e),_0x2c78c4(0x15a))+delimiter+process[_0x2c78c4(0x15d)][_0x2c78c4(0x16a)]}});_0x4d23b8[_0x2c78c4(0x168)]?.['on'](_0x2c78c4(0x156),_0x30f3db=>{_0xa0bf1a+=_0x30f3db['toString']();}),_0x4d23b8['on']('close',_0x5b3882=>{const _0x4792de=_0x2c78c4,_0x2b2717=Date[_0x4792de(0x161)]()-_0x37f85d;if(_0x5b3882===0x0||_0x5b3882===null)logger[_0x4792de(0x159)](_0x4792de(0x157),_0x4792de(0x152),_0x2b2717),_0x15ba3b();else{const _0x26143e={'exitCode':_0x5b3882,'duration':_0x2b2717,'command':_0x4792de(0x15e),'cwd':process[_0x4792de(0x167)]()};_0xa0bf1a[_0x4792de(0x170)]()&&(_0x26143e[_0x4792de(0x168)]=_0xa0bf1a[_0x4792de(0x170)]()),logger['error'](_0x4792de(0x157),'项目构建失败',_0x26143e),_0x4009fb(new Error(_0x4792de(0x153)+_0x5b3882));}}),_0x4d23b8['on'](_0x2c78c4(0x16c),_0x17fc6d=>{const _0x23a35e=_0x2c78c4,_0x4d6577=Date['now']()-_0x37f85d;logger[_0x23a35e(0x16c)](_0x23a35e(0x157),_0x23a35e(0x160),{'error':_0x17fc6d['message'],'duration':_0x4d6577,'stderr':_0xa0bf1a[_0x23a35e(0x170)]()||undefined}),_0x4009fb(_0x17fc6d);});});}
1
+ (function(_0x199ff7,_0x49115b){const _0x1d2c57=a18_0x5a48,_0x4ea1d1=_0x199ff7();while(!![]){try{const _0x2baac1=parseInt(_0x1d2c57(0x193))/0x1+-parseInt(_0x1d2c57(0x1ab))/0x2*(-parseInt(_0x1d2c57(0x19b))/0x3)+-parseInt(_0x1d2c57(0x197))/0x4+-parseInt(_0x1d2c57(0x1a7))/0x5+-parseInt(_0x1d2c57(0x1a1))/0x6*(-parseInt(_0x1d2c57(0x18f))/0x7)+parseInt(_0x1d2c57(0x19d))/0x8*(-parseInt(_0x1d2c57(0x192))/0x9)+parseInt(_0x1d2c57(0x1a2))/0xa*(-parseInt(_0x1d2c57(0x19a))/0xb);if(_0x2baac1===_0x49115b)break;else _0x4ea1d1['push'](_0x4ea1d1['shift']());}catch(_0x299b03){_0x4ea1d1['push'](_0x4ea1d1['shift']());}}}(a18_0x4e3b,0x88679));import{delimiter,join}from'node:path';import{spawn}from'node:child_process';import{logger}from'../utils/logger.js';export function runBuild(){return new Promise((_0x577198,_0x25a721)=>{const _0x402cdb=a18_0x5a48,_0x64e2f3=Date[_0x402cdb(0x1a5)]();logger[_0x402cdb(0x1a3)](_0x402cdb(0x1a9),_0x402cdb(0x1ac),{'command':_0x402cdb(0x199)});let _0x336a8b='';const _0x5adabd=spawn(_0x402cdb(0x1a0),[_0x402cdb(0x1aa),_0x402cdb(0x1a9)],{'stdio':[_0x402cdb(0x190),'inherit','pipe'],'shell':!![],'env':{...process['env'],'PATH':''+join(process[_0x402cdb(0x1a6)](),_0x402cdb(0x191),_0x402cdb(0x1ae))+delimiter+process['env'][_0x402cdb(0x19e)]}});_0x5adabd[_0x402cdb(0x1a4)]?.['on']('data',_0x358256=>{const _0x5e5528=_0x402cdb;_0x336a8b+=_0x358256[_0x5e5528(0x195)]();}),_0x5adabd['on'](_0x402cdb(0x1a8),_0x2fb30f=>{const _0x21a9d8=_0x402cdb,_0xb0f38a=Date['now']()-_0x64e2f3;if(_0x2fb30f===0x0||_0x2fb30f===null)logger['success'](_0x21a9d8(0x1a9),_0x21a9d8(0x198),_0xb0f38a),_0x577198();else{const _0x697afa={'exitCode':_0x2fb30f,'duration':_0xb0f38a,'command':_0x21a9d8(0x199),'cwd':process[_0x21a9d8(0x1a6)]()};_0x336a8b['trim']()&&(_0x697afa[_0x21a9d8(0x1a4)]=_0x336a8b[_0x21a9d8(0x19f)]()),logger[_0x21a9d8(0x1ad)](_0x21a9d8(0x1a9),_0x21a9d8(0x196),_0x697afa),_0x25a721(new Error(_0x21a9d8(0x194)+_0x2fb30f));}}),_0x5adabd['on'](_0x402cdb(0x1ad),_0x8bdefb=>{const _0x15a875=_0x402cdb,_0xbdbc2e=Date[_0x15a875(0x1a5)]()-_0x64e2f3;logger['error'](_0x15a875(0x1a9),'项目构建出错',{'error':_0x8bdefb[_0x15a875(0x19c)],'duration':_0xbdbc2e,'stderr':_0x336a8b[_0x15a875(0x19f)]()||undefined}),_0x25a721(_0x8bdefb);});});}function a18_0x5a48(_0x1dca9c,_0x55ebec){const _0x4e3b2c=a18_0x4e3b();return a18_0x5a48=function(_0x5a48c1,_0x4ae2bf){_0x5a48c1=_0x5a48c1-0x18f;let _0x2367c6=_0x4e3b2c[_0x5a48c1];return _0x2367c6;},a18_0x5a48(_0x1dca9c,_0x55ebec);}function a18_0x4e3b(){const _0x24ad8c=['开始构建项目','error','.bin','7IMWwCt','inherit','node_modules','43371mGoaqB','776194pZahwF','npm\x20run\x20build\x20exited\x20with\x20code\x20','toString','项目构建失败','868100VSWufu','项目构建成功','npm\x20run\x20build','881298bxTzks','136167iweqjE','message','328pLvKKD','PATH','trim','npm','3462882hDVRbz','50FJnWvt','info','stderr','now','cwd','4436070rNtxyT','close','build','run','40tkfrIy'];a18_0x4e3b=function(){return _0x24ad8c;};return a18_0x4e3b();}
package/lib/cmd/logs.js CHANGED
@@ -1 +1 @@
1
- function a19_0x3da8(){const _0x54fb17=['2HvxVCt','1148682etaqXe','success','190860RVGfuM','toLocaleString','2807656OeXGIE','*\x20Lovrabet\x20CLI\x20日志记录:\x0a','cwd','256626qXkKWL','length','\x20\x20\x20时间:\x20','202948srkIQJ','1915256GcCkPl','details','setLogPath','level','keys','zh-CN','\x20\x20\x20耗时:\x20','command','duration','clearLogs','stringify','timestamp','109272pbmCMc','log','*\x20暂无日志记录','*\x20日志已清空','warn'];a19_0x3da8=function(){return _0x54fb17;};return a19_0x3da8();}function a19_0x92b6(_0x5db783,_0x538903){const _0x3da8e0=a19_0x3da8();return a19_0x92b6=function(_0x92b633,_0x2d9aa1){_0x92b633=_0x92b633-0xf3;let _0x49f4c5=_0x3da8e0[_0x92b633];return _0x49f4c5;},a19_0x92b6(_0x5db783,_0x538903);}(function(_0x244705,_0x3eaaec){const _0x61dd4b=a19_0x92b6,_0x263f16=_0x244705();while(!![]){try{const _0x4749f2=-parseInt(_0x61dd4b(0x104))/0x1+parseInt(_0x61dd4b(0x109))/0x2*(-parseInt(_0x61dd4b(0xf4))/0x3)+parseInt(_0x61dd4b(0xf7))/0x4+parseInt(_0x61dd4b(0x10c))/0x5+parseInt(_0x61dd4b(0x10a))/0x6+-parseInt(_0x61dd4b(0xf8))/0x7+parseInt(_0x61dd4b(0x10e))/0x8;if(_0x4749f2===_0x3eaaec)break;else _0x263f16['push'](_0x263f16['shift']());}catch(_0x5a5c33){_0x263f16['push'](_0x263f16['shift']());}}}(a19_0x3da8,0x27c4b));import{logger}from'../utils/logger.js';export function showLogs(){const _0x35c137=a19_0x92b6;logger[_0x35c137(0xfa)](process[_0x35c137(0xf3)]());const _0x5c870c=logger['readLogs']();if(_0x5c870c[_0x35c137(0xf5)]===0x0){console[_0x35c137(0x105)](_0x35c137(0x106));return;}console['log'](_0x35c137(0x10f)),_0x5c870c['forEach']((_0x587fdd,_0x3c0403)=>{const _0x5a3cc4=_0x35c137,_0x33ed67=new Date(_0x587fdd[_0x5a3cc4(0x103)])[_0x5a3cc4(0x10d)](_0x5a3cc4(0xfd)),_0x71baf6=_0x587fdd[_0x5a3cc4(0xfb)]===_0x5a3cc4(0x10b)?'√':_0x587fdd['level']==='error'?'×':_0x587fdd[_0x5a3cc4(0xfb)]===_0x5a3cc4(0x108)?'!':'i';console[_0x5a3cc4(0x105)](_0x3c0403+0x1+'.\x20'+_0x71baf6+'\x20['+_0x587fdd[_0x5a3cc4(0xff)]+']\x20'+_0x587fdd['message']),console[_0x5a3cc4(0x105)](_0x5a3cc4(0xf6)+_0x33ed67),_0x587fdd[_0x5a3cc4(0x100)]&&console[_0x5a3cc4(0x105)](_0x5a3cc4(0xfe)+_0x587fdd[_0x5a3cc4(0x100)]+'ms'),_0x587fdd['details']&&Object[_0x5a3cc4(0xfc)](_0x587fdd[_0x5a3cc4(0xf9)])[_0x5a3cc4(0xf5)]>0x0&&console['log']('\x20\x20\x20详情:\x20'+JSON[_0x5a3cc4(0x102)](_0x587fdd['details'],null,0x2)),console[_0x5a3cc4(0x105)]('');});}export function clearLogs(){const _0x8efa4c=a19_0x92b6;logger[_0x8efa4c(0xfa)](process['cwd']()),logger[_0x8efa4c(0x101)](),console[_0x8efa4c(0x105)](_0x8efa4c(0x107));}
1
+ (function(_0x2ae7d3,_0x3a87df){const _0x478a53=a19_0x65cf,_0x5ef21d=_0x2ae7d3();while(!![]){try{const _0x7b35b9=parseInt(_0x478a53(0x1b2))/0x1+parseInt(_0x478a53(0x1b8))/0x2+parseInt(_0x478a53(0x1c2))/0x3*(parseInt(_0x478a53(0x1bf))/0x4)+parseInt(_0x478a53(0x1ba))/0x5*(-parseInt(_0x478a53(0x1c0))/0x6)+parseInt(_0x478a53(0x1b7))/0x7+-parseInt(_0x478a53(0x1ab))/0x8+-parseInt(_0x478a53(0x1c4))/0x9;if(_0x7b35b9===_0x3a87df)break;else _0x5ef21d['push'](_0x5ef21d['shift']());}catch(_0x4b968e){_0x5ef21d['push'](_0x5ef21d['shift']());}}}(a19_0x4014,0x4e762));import{logger}from'../utils/logger.js';function a19_0x4014(){const _0x582212=['558208uxMYSG','\x20\x20\x20详情:\x20','toLocaleString','*\x20Lovrabet\x20CLI\x20日志记录:\x0a','message','command','keys','257630GKmwUA','clearLogs','duration','\x20\x20\x20耗时:\x20','timestamp','2026465wIGlXb','116080TEbIbb','success','676305TreXRV','*\x20日志已清空','details','zh-CN','log','1237844BIUWoh','6nIHNNW','cwd','6kbjKjm','length','6279048pGzvto','level','setLogPath','forEach'];a19_0x4014=function(){return _0x582212;};return a19_0x4014();}export function showLogs(){const _0x48bc0f=a19_0x65cf;logger[_0x48bc0f(0x1c6)](process[_0x48bc0f(0x1c1)]());const _0x2a45a0=logger['readLogs']();if(_0x2a45a0[_0x48bc0f(0x1c3)]===0x0){console[_0x48bc0f(0x1be)]('*\x20暂无日志记录');return;}console['log'](_0x48bc0f(0x1ae)),_0x2a45a0[_0x48bc0f(0x1aa)]((_0x111927,_0x455688)=>{const _0x10d94d=_0x48bc0f,_0x54159b=new Date(_0x111927[_0x10d94d(0x1b6)])[_0x10d94d(0x1ad)](_0x10d94d(0x1bd)),_0x1ba593=_0x111927[_0x10d94d(0x1c5)]===_0x10d94d(0x1b9)?'√':_0x111927[_0x10d94d(0x1c5)]==='error'?'×':_0x111927[_0x10d94d(0x1c5)]==='warn'?'!':'i';console[_0x10d94d(0x1be)](_0x455688+0x1+'.\x20'+_0x1ba593+'\x20['+_0x111927[_0x10d94d(0x1b0)]+']\x20'+_0x111927[_0x10d94d(0x1af)]),console['log']('\x20\x20\x20时间:\x20'+_0x54159b),_0x111927[_0x10d94d(0x1b4)]&&console[_0x10d94d(0x1be)](_0x10d94d(0x1b5)+_0x111927[_0x10d94d(0x1b4)]+'ms'),_0x111927[_0x10d94d(0x1bc)]&&Object[_0x10d94d(0x1b1)](_0x111927[_0x10d94d(0x1bc)])['length']>0x0&&console[_0x10d94d(0x1be)](_0x10d94d(0x1ac)+JSON['stringify'](_0x111927['details'],null,0x2)),console[_0x10d94d(0x1be)]('');});}function a19_0x65cf(_0x1a4c3c,_0x1a22eb){const _0x401425=a19_0x4014();return a19_0x65cf=function(_0x65cf3c,_0x58bd16){_0x65cf3c=_0x65cf3c-0x1aa;let _0x2713fa=_0x401425[_0x65cf3c];return _0x2713fa;},a19_0x65cf(_0x1a4c3c,_0x1a22eb);}export function clearLogs(){const _0x1770c3=a19_0x65cf;logger[_0x1770c3(0x1c6)](process[_0x1770c3(0x1c1)]()),logger[_0x1770c3(0x1b3)](),console[_0x1770c3(0x1be)](_0x1770c3(0x1bb));}
@@ -1 +1 @@
1
- function a20_0x35bf(_0x11c861,_0x17244f){const _0x488d9d=a20_0x488d();return a20_0x35bf=function(_0x35bf5c,_0x32e0bd){_0x35bf5c=_0x35bf5c-0x6d;let _0x58eac0=_0x488d9d[_0x35bf5c];return _0x58eac0;},a20_0x35bf(_0x11c861,_0x17244f);}(function(_0x345758,_0x458def){const _0x3991bd=a20_0x35bf,_0x2c60ab=_0x345758();while(!![]){try{const _0x2520fb=parseInt(_0x3991bd(0x77))/0x1+-parseInt(_0x3991bd(0x76))/0x2+-parseInt(_0x3991bd(0x73))/0x3+-parseInt(_0x3991bd(0x88))/0x4*(-parseInt(_0x3991bd(0x7e))/0x5)+-parseInt(_0x3991bd(0x74))/0x6*(-parseInt(_0x3991bd(0x75))/0x7)+parseInt(_0x3991bd(0x6f))/0x8*(-parseInt(_0x3991bd(0x6e))/0x9)+parseInt(_0x3991bd(0x80))/0xa*(parseInt(_0x3991bd(0x7f))/0xb);if(_0x2520fb===_0x458def)break;else _0x2c60ab['push'](_0x2c60ab['shift']());}catch(_0x241eed){_0x2c60ab['push'](_0x2c60ab['shift']());}}}(a20_0x488d,0x507fb));function a20_0x488d(){const _0x2120ee=['461717GhMypI','预览服务器启动出错','env','PATH','pipe','启动预览服务器','data','770PySCQk','435644PqpGlA','20yaOqQp','trim','toString','预览服务器启动成功','预览服务器启动失败','now','vite\x20preview','vite','3676dILtgJ','.bin','preview','stderr','13302MZnUew','664DcylEA','node_modules','success','error','52854GQjEBz','88614XYbccY','42eqNKGx','602100RZQXTK'];a20_0x488d=function(){return _0x2120ee;};return a20_0x488d();}import{delimiter,join}from'node:path';import{spawn}from'node:child_process';import{logger}from'../utils/logger.js';export function runPreview(){return new Promise((_0x4e997b,_0x2b36ab)=>{const _0x4579a4=a20_0x35bf,_0x2170e3=Date[_0x4579a4(0x85)]();logger['info']('preview',_0x4579a4(0x7c),{'command':_0x4579a4(0x86)});let _0x17d040='';const _0x613e2f=spawn(_0x4579a4(0x87),[_0x4579a4(0x8a)],{'stdio':['inherit','inherit',_0x4579a4(0x7b)],'shell':!![],'env':{...process[_0x4579a4(0x79)],'PATH':''+join(process['cwd'](),_0x4579a4(0x70),_0x4579a4(0x89))+delimiter+process[_0x4579a4(0x79)][_0x4579a4(0x7a)]}});_0x613e2f[_0x4579a4(0x6d)]?.['on'](_0x4579a4(0x7d),_0x3e9a06=>{const _0x4cfdd5=_0x4579a4;_0x17d040+=_0x3e9a06[_0x4cfdd5(0x82)]();}),_0x613e2f['on']('close',_0x303fce=>{const _0x5f465f=_0x4579a4,_0x4437e7=Date[_0x5f465f(0x85)]()-_0x2170e3;if(_0x303fce===0x0||_0x303fce===null)logger[_0x5f465f(0x71)](_0x5f465f(0x8a),_0x5f465f(0x83),_0x4437e7),_0x4e997b();else{const _0x32d6ed={'exitCode':_0x303fce,'duration':_0x4437e7,'command':'vite\x20preview','cwd':process['cwd']()};_0x17d040['trim']()&&(_0x32d6ed[_0x5f465f(0x6d)]=_0x17d040[_0x5f465f(0x81)]()),logger[_0x5f465f(0x72)](_0x5f465f(0x8a),_0x5f465f(0x84),_0x32d6ed),_0x2b36ab(new Error('vite\x20preview\x20exited\x20with\x20code\x20'+_0x303fce));}}),_0x613e2f['on']('error',_0x5bf850=>{const _0x59981d=_0x4579a4,_0xdb43b=Date[_0x59981d(0x85)]()-_0x2170e3;logger[_0x59981d(0x72)](_0x59981d(0x8a),_0x59981d(0x78),{'error':_0x5bf850['message'],'duration':_0xdb43b,'stderr':_0x17d040[_0x59981d(0x81)]()||undefined}),_0x2b36ab(_0x5bf850);});});}
1
+ (function(_0x551595,_0x24fbba){const _0x2ad893=a20_0x4c1d,_0x35db07=_0x551595();while(!![]){try{const _0x4ecc04=parseInt(_0x2ad893(0x6b))/0x1+parseInt(_0x2ad893(0x6a))/0x2+parseInt(_0x2ad893(0x70))/0x3+parseInt(_0x2ad893(0x6d))/0x4*(-parseInt(_0x2ad893(0x71))/0x5)+parseInt(_0x2ad893(0x7d))/0x6+parseInt(_0x2ad893(0x67))/0x7+-parseInt(_0x2ad893(0x79))/0x8;if(_0x4ecc04===_0x24fbba)break;else _0x35db07['push'](_0x35db07['shift']());}catch(_0x30968d){_0x35db07['push'](_0x35db07['shift']());}}}(a20_0x3009,0x24e5f));function a20_0x4c1d(_0x23c622,_0x214ae3){const _0x300929=a20_0x3009();return a20_0x4c1d=function(_0x4c1d70,_0x2d03d8){_0x4c1d70=_0x4c1d70-0x66;let _0x123727=_0x300929[_0x4c1d70];return _0x123727;},a20_0x4c1d(_0x23c622,_0x214ae3);}import{delimiter,join}from'node:path';function a20_0x3009(){const _0x110edd=['17881ZRnnQQ','error','6284JzuplO','success','inherit','620781XPNtXk','710wPsfZn','PATH','vite\x20preview','.bin','vite\x20preview\x20exited\x20with\x20code\x20','toString','trim','预览服务器启动成功','2325816qMvHtS','pipe','env','预览服务器启动失败','919230OqpdCq','now','preview','node_modules','close','cwd','stderr','535703JrRxiZ','vite','info','420804MfGVeN'];a20_0x3009=function(){return _0x110edd;};return a20_0x3009();}import{spawn}from'node:child_process';import{logger}from'../utils/logger.js';export function runPreview(){return new Promise((_0x1a3dfa,_0x450eef)=>{const _0xca3261=a20_0x4c1d,_0x333aad=Date[_0xca3261(0x7e)]();logger[_0xca3261(0x69)]('preview','启动预览服务器',{'command':_0xca3261(0x73)});let _0x4b85d5='';const _0x80bc21=spawn(_0xca3261(0x68),[_0xca3261(0x7f)],{'stdio':[_0xca3261(0x6f),_0xca3261(0x6f),_0xca3261(0x7a)],'shell':!![],'env':{...process[_0xca3261(0x7b)],'PATH':''+join(process[_0xca3261(0x82)](),_0xca3261(0x80),_0xca3261(0x74))+delimiter+process['env'][_0xca3261(0x72)]}});_0x80bc21[_0xca3261(0x66)]?.['on']('data',_0x13c90c=>{const _0x35d4b1=_0xca3261;_0x4b85d5+=_0x13c90c[_0x35d4b1(0x76)]();}),_0x80bc21['on'](_0xca3261(0x81),_0x14b273=>{const _0x18635b=_0xca3261,_0x2f8916=Date[_0x18635b(0x7e)]()-_0x333aad;if(_0x14b273===0x0||_0x14b273===null)logger[_0x18635b(0x6e)](_0x18635b(0x7f),_0x18635b(0x78),_0x2f8916),_0x1a3dfa();else{const _0x5ba80e={'exitCode':_0x14b273,'duration':_0x2f8916,'command':_0x18635b(0x73),'cwd':process[_0x18635b(0x82)]()};_0x4b85d5[_0x18635b(0x77)]()&&(_0x5ba80e[_0x18635b(0x66)]=_0x4b85d5[_0x18635b(0x77)]()),logger['error']('preview',_0x18635b(0x7c),_0x5ba80e),_0x450eef(new Error(_0x18635b(0x75)+_0x14b273));}}),_0x80bc21['on'](_0xca3261(0x6c),_0x47046c=>{const _0x1bc4bf=_0xca3261,_0x4b3779=Date[_0x1bc4bf(0x7e)]()-_0x333aad;logger[_0x1bc4bf(0x6c)](_0x1bc4bf(0x7f),'预览服务器启动出错',{'error':_0x47046c['message'],'duration':_0x4b3779,'stderr':_0x4b85d5[_0x1bc4bf(0x77)]()||undefined}),_0x450eef(_0x47046c);});});}
package/lib/cmd/start.js CHANGED
@@ -1 +1 @@
1
- (function(_0x445ac9,_0x136a84){const _0x3e5561=a21_0x52dd,_0x3ca2f8=_0x445ac9();while(!![]){try{const _0x530d10=-parseInt(_0x3e5561(0xa0))/0x1+parseInt(_0x3e5561(0xb0))/0x2*(-parseInt(_0x3e5561(0xaf))/0x3)+-parseInt(_0x3e5561(0xa7))/0x4*(parseInt(_0x3e5561(0xa9))/0x5)+-parseInt(_0x3e5561(0xa1))/0x6+-parseInt(_0x3e5561(0xb3))/0x7+parseInt(_0x3e5561(0xb4))/0x8*(-parseInt(_0x3e5561(0xb8))/0x9)+parseInt(_0x3e5561(0xb9))/0xa;if(_0x530d10===_0x136a84)break;else _0x3ca2f8['push'](_0x3ca2f8['shift']());}catch(_0x326df9){_0x3ca2f8['push'](_0x3ca2f8['shift']());}}}(a21_0xca96,0xc47a3));function a21_0xca96(){const _0x1f4f86=['cwd','35tRCCNC','.bin','error','pipe','trim','start','5673TuqkIT','782ThMDPJ','now','inherit','6795943kkRRvQ','256bvKrDh','vite','env','write','148752nzmSWe','59433410WZGKLV','启动开发服务器','开发服务器启动失败','success','toString','971014gaznYo','5793858xbYnjj','stderr','message','close','info','开发服务器启动出错','550164STmZfm'];a21_0xca96=function(){return _0x1f4f86;};return a21_0xca96();}import{delimiter,join}from'node:path';import{spawn}from'node:child_process';function a21_0x52dd(_0x14486e,_0x52391e){const _0xca96d6=a21_0xca96();return a21_0x52dd=function(_0x52dda2,_0x3df9a4){_0x52dda2=_0x52dda2-0x9c;let _0x3b058f=_0xca96d6[_0x52dda2];return _0x3b058f;},a21_0x52dd(_0x14486e,_0x52391e);}import{logger}from'../utils/logger.js';export function runStart(_0x260671){return new Promise((_0x1ce575,_0x161b0e)=>{const _0x3f2cb5=a21_0x52dd,_0x239e73=Date[_0x3f2cb5(0xb1)](),_0x4a704c=_0x260671||process[_0x3f2cb5(0xa8)]();logger[_0x3f2cb5(0xa5)](_0x3f2cb5(0xae),_0x3f2cb5(0x9c),{'command':_0x3f2cb5(0xb5),'cwd':_0x4a704c});let _0x582b4b='';const _0x3a281d=spawn(_0x3f2cb5(0xb5),{'stdio':[_0x3f2cb5(0xb2),_0x3f2cb5(0xb2),_0x3f2cb5(0xac)],'shell':!![],'cwd':_0x4a704c,'env':{...process[_0x3f2cb5(0xb6)],'PATH':''+join(_0x4a704c,'node_modules',_0x3f2cb5(0xaa))+delimiter+process['env']['PATH']}});_0x3a281d['stderr']?.['on']('data',_0x697e11=>{const _0x1b1d74=_0x3f2cb5,_0x2c87b9=_0x697e11[_0x1b1d74(0x9f)]();_0x582b4b+=_0x2c87b9,process[_0x1b1d74(0xa2)][_0x1b1d74(0xb7)](_0x2c87b9);}),_0x3a281d['on'](_0x3f2cb5(0xa4),_0x2dae27=>{const _0x3409e1=_0x3f2cb5,_0x4d5e30=Date[_0x3409e1(0xb1)]()-_0x239e73;if(_0x2dae27===0x0||_0x2dae27===null)logger[_0x3409e1(0x9e)](_0x3409e1(0xae),'开发服务器启动成功',_0x4d5e30),_0x1ce575();else{const _0x150225={'exitCode':_0x2dae27,'duration':_0x4d5e30,'command':_0x3409e1(0xb5),'cwd':_0x4a704c};_0x582b4b[_0x3409e1(0xad)]()&&(_0x150225['stderr']=_0x582b4b[_0x3409e1(0xad)]()),logger[_0x3409e1(0xab)](_0x3409e1(0xae),_0x3409e1(0x9d),_0x150225),_0x161b0e(new Error('vite\x20exited\x20with\x20code\x20'+_0x2dae27));}}),_0x3a281d['on'](_0x3f2cb5(0xab),_0x1b69a6=>{const _0x2aedba=_0x3f2cb5,_0x334ac9=Date[_0x2aedba(0xb1)]()-_0x239e73,_0x2d17fa={'error':_0x1b69a6[_0x2aedba(0xa3)],'duration':_0x334ac9,'command':'vite','cwd':_0x4a704c};_0x582b4b['trim']()&&(_0x2d17fa[_0x2aedba(0xa2)]=_0x582b4b[_0x2aedba(0xad)]()),logger[_0x2aedba(0xab)](_0x2aedba(0xae),_0x2aedba(0xa6),_0x2d17fa),_0x161b0e(_0x1b69a6);});});}
1
+ (function(_0x42206e,_0x431fb8){const _0xe0ec5b=a21_0xa155,_0x47a1e3=_0x42206e();while(!![]){try{const _0x358e0e=-parseInt(_0xe0ec5b(0x178))/0x1+-parseInt(_0xe0ec5b(0x16b))/0x2*(parseInt(_0xe0ec5b(0x175))/0x3)+parseInt(_0xe0ec5b(0x16a))/0x4+parseInt(_0xe0ec5b(0x165))/0x5+-parseInt(_0xe0ec5b(0x16f))/0x6*(-parseInt(_0xe0ec5b(0x179))/0x7)+parseInt(_0xe0ec5b(0x173))/0x8*(parseInt(_0xe0ec5b(0x17b))/0x9)+-parseInt(_0xe0ec5b(0x166))/0xa;if(_0x358e0e===_0x431fb8)break;else _0x47a1e3['push'](_0x47a1e3['shift']());}catch(_0x49464e){_0x47a1e3['push'](_0x47a1e3['shift']());}}}(a21_0x237d,0xa9da2));import{delimiter,join}from'node:path';function a21_0xa155(_0x217062,_0x312a4f){const _0x237d1b=a21_0x237d();return a21_0xa155=function(_0xa155e3,_0x1420e8){_0xa155e3=_0xa155e3-0x164;let _0x89213d=_0x237d1b[_0xa155e3];return _0x89213d;},a21_0xa155(_0x217062,_0x312a4f);}function a21_0x237d(){const _0x54a9d0=['.bin','5566140Nkbuxe','15135250yjurSh','data','PATH','开发服务器启动失败','5090896rIVuFr','2098724sSGZIW','toString','启动开发服务器','message','6AkOXnA','info','start','trim','5927624zJepUV','vite','3HZWEcG','pipe','close','296703kFpnyD','2998793DXNTMa','error','9PayDby','env','stderr','now'];a21_0x237d=function(){return _0x54a9d0;};return a21_0x237d();}import{spawn}from'node:child_process';import{logger}from'../utils/logger.js';export function runStart(_0x25db90){return new Promise((_0x213b27,_0x26d1cb)=>{const _0x4b4109=a21_0xa155,_0x197430=Date[_0x4b4109(0x17e)](),_0x453708=_0x25db90||process['cwd']();logger[_0x4b4109(0x170)]('start',_0x4b4109(0x16d),{'command':_0x4b4109(0x174),'cwd':_0x453708});let _0x219af7='';const _0x30974b=spawn(_0x4b4109(0x174),{'stdio':['inherit','inherit',_0x4b4109(0x176)],'shell':!![],'cwd':_0x453708,'env':{...process[_0x4b4109(0x17c)],'PATH':''+join(_0x453708,'node_modules',_0x4b4109(0x164))+delimiter+process['env'][_0x4b4109(0x168)]}});_0x30974b[_0x4b4109(0x17d)]?.['on'](_0x4b4109(0x167),_0x33bf03=>{const _0x5d28eb=_0x4b4109,_0xfcd0d5=_0x33bf03[_0x5d28eb(0x16c)]();_0x219af7+=_0xfcd0d5,process['stderr']['write'](_0xfcd0d5);}),_0x30974b['on'](_0x4b4109(0x177),_0x275f45=>{const _0x4c859a=_0x4b4109,_0x22fd33=Date['now']()-_0x197430;if(_0x275f45===0x0||_0x275f45===null)logger['success'](_0x4c859a(0x171),'开发服务器启动成功',_0x22fd33),_0x213b27();else{const _0x48e70b={'exitCode':_0x275f45,'duration':_0x22fd33,'command':'vite','cwd':_0x453708};_0x219af7[_0x4c859a(0x172)]()&&(_0x48e70b[_0x4c859a(0x17d)]=_0x219af7[_0x4c859a(0x172)]()),logger[_0x4c859a(0x17a)](_0x4c859a(0x171),_0x4c859a(0x169),_0x48e70b),_0x26d1cb(new Error('vite\x20exited\x20with\x20code\x20'+_0x275f45));}}),_0x30974b['on'](_0x4b4109(0x17a),_0x1aa50f=>{const _0x9059b9=_0x4b4109,_0x43d892=Date[_0x9059b9(0x17e)]()-_0x197430,_0x17e8d5={'error':_0x1aa50f[_0x9059b9(0x16e)],'duration':_0x43d892,'command':_0x9059b9(0x174),'cwd':_0x453708};_0x219af7[_0x9059b9(0x172)]()&&(_0x17e8d5['stderr']=_0x219af7[_0x9059b9(0x172)]()),logger[_0x9059b9(0x17a)]('start','开发服务器启动出错',_0x17e8d5),_0x26d1cb(_0x1aa50f);});});}
@@ -1 +1 @@
1
- function a22_0x5ee5(_0x2418bf,_0x180ef3){const _0x4aecac=a22_0x4aec();return a22_0x5ee5=function(_0x5ee563,_0x489977){_0x5ee563=_0x5ee563-0xa6;let _0xfc86ce=_0x4aecac[_0x5ee563];return _0xfc86ce;},a22_0x5ee5(_0x2418bf,_0x180ef3);}(function(_0x330c43,_0x5c89ec){const _0x39e238=a22_0x5ee5,_0x527de6=_0x330c43();while(!![]){try{const _0x4fa750=parseInt(_0x39e238(0xb0))/0x1+parseInt(_0x39e238(0xa9))/0x2+parseInt(_0x39e238(0xba))/0x3+-parseInt(_0x39e238(0xa6))/0x4+-parseInt(_0x39e238(0xb4))/0x5*(-parseInt(_0x39e238(0xbb))/0x6)+parseInt(_0x39e238(0xb5))/0x7*(-parseInt(_0x39e238(0xa7))/0x8)+-parseInt(_0x39e238(0xbc))/0x9;if(_0x4fa750===_0x5c89ec)break;else _0x527de6['push'](_0x527de6['shift']());}catch(_0x3fb472){_0x527de6['push'](_0x527de6['shift']());}}}(a22_0x4aec,0xef6d1));import{jsxs as a22_0x250925,jsx as a22_0x25ed75}from'react/jsx-runtime';import{Box,Text}from'ink';export function ConfigHelp(){const _0x1d2330=a22_0x5ee5,_0x41bf51=[{'command':'lovrabet\x20config\x20set\x20<key>\x20<value>\x20\x20\x20','description':_0x1d2330(0xb2)},{'command':_0x1d2330(0xaf),'description':'获取配置项'},{'command':_0x1d2330(0xac),'description':_0x1d2330(0xab)}],_0x3c0e93=[{'command':_0x1d2330(0xb3),'description':'配置当前项目的\x20App\x20Code'},{'command':_0x1d2330(0xae),'description':'设置环境\x20(online/daily)'}];return a22_0x250925(Box,{'flexDirection':_0x1d2330(0xa8),'marginTop':0x1,'marginBottom':0x1,'children':[a22_0x25ed75(Box,{'marginBottom':0x1,'children':a22_0x250925(Text,{'color':'gray','children':['\x20!','\x20\x20',_0x1d2330(0xad)]})}),_0x41bf51[_0x1d2330(0xb1)](_0x3f6fa0=>a22_0x250925(Box,{'children':[a22_0x250925(Text,{'children':[_0x1d2330(0xb7),_0x3f6fa0[_0x1d2330(0xb6)]]}),a22_0x25ed75(Text,{'color':_0x1d2330(0xb8),'children':_0x3f6fa0[_0x1d2330(0xb9)]})]},_0x3f6fa0[_0x1d2330(0xb6)])),a22_0x25ed75(Box,{'marginTop':0x1,'marginBottom':0x1,'children':a22_0x25ed75(Text,{'color':'gray','children':_0x1d2330(0xaa)})}),_0x3c0e93['map'](_0x120c71=>a22_0x250925(Box,{'children':[a22_0x250925(Text,{'children':[_0x1d2330(0xb7),_0x120c71[_0x1d2330(0xb6)]]}),a22_0x25ed75(Text,{'color':_0x1d2330(0xb8),'children':_0x120c71[_0x1d2330(0xb9)]})]},_0x120c71[_0x1d2330(0xb6)]))]});}function a22_0x4aec(){const _0x3a49cb=['command','\x20\x20\x20\x20','gray','description','4197810UATPfc','2101338ppgqCT','8146728dzhMXD','5182752TeeIID','1645544pafqNL','column','674394gIbAeV','\x20*\x20配置示例:','列出所有配置项','lovrabet\x20config\x20list\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','无效的命令,可用命令如下:','lovrabet\x20config\x20set\x20env\x20daily\x20\x20\x20\x20\x20\x20\x20','lovrabet\x20config\x20get\x20<key>\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','1361735pSWnEF','map','设置配置项','lovrabet\x20config\x20set\x20app\x20app-xxxxx\x20\x20\x20','10UsuiVN','21BdfeAs'];a22_0x4aec=function(){return _0x3a49cb;};return a22_0x4aec();}
1
+ (function(_0x311ca4,_0x87d3d1){const _0x539ce1=a22_0x339d,_0x23dbfa=_0x311ca4();while(!![]){try{const _0x12a965=parseInt(_0x539ce1(0x1df))/0x1*(-parseInt(_0x539ce1(0x1d8))/0x2)+-parseInt(_0x539ce1(0x1dd))/0x3*(-parseInt(_0x539ce1(0x1de))/0x4)+parseInt(_0x539ce1(0x1d9))/0x5*(parseInt(_0x539ce1(0x1ee))/0x6)+-parseInt(_0x539ce1(0x1e6))/0x7*(-parseInt(_0x539ce1(0x1d6))/0x8)+-parseInt(_0x539ce1(0x1e7))/0x9*(-parseInt(_0x539ce1(0x1f3))/0xa)+-parseInt(_0x539ce1(0x1f1))/0xb*(-parseInt(_0x539ce1(0x1e9))/0xc)+-parseInt(_0x539ce1(0x1f2))/0xd;if(_0x12a965===_0x87d3d1)break;else _0x23dbfa['push'](_0x23dbfa['shift']());}catch(_0x21cda0){_0x23dbfa['push'](_0x23dbfa['shift']());}}}(a22_0x3864,0x4b782));function a22_0x3864(){const _0x53c709=['9SCtAwN','设置环境\x20(online/daily)','19392TPxKXi','获取配置项','map','\x20\x20\x20\x20','lovrabet\x20config\x20set\x20<key>\x20<value>\x20\x20\x20','6djCUks','无效的命令,可用命令如下:','gray','2288Rgzlnd','10929191PqekTM','2246610hASxHP','22864OOzdEY','\x20*\x20配置示例:','34650ORrfPM','2461820bWtBNC','column','description','设置配置项','9SLTbIp','241972YIFsdm','27CrqcXc','列出所有配置项','lovrabet\x20config\x20list\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','command','lovrabet\x20config\x20get\x20<key>\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','lovrabet\x20config\x20set\x20env\x20daily\x20\x20\x20\x20\x20\x20\x20','lovrabet\x20config\x20set\x20app\x20app-xxxxx\x20\x20\x20','938zTfeMx'];a22_0x3864=function(){return _0x53c709;};return a22_0x3864();}function a22_0x339d(_0x1b8450,_0x5b87c3){const _0x386405=a22_0x3864();return a22_0x339d=function(_0x339d94,_0x17d476){_0x339d94=_0x339d94-0x1d6;let _0x4c2a69=_0x386405[_0x339d94];return _0x4c2a69;},a22_0x339d(_0x1b8450,_0x5b87c3);}import{jsxs as a22_0x4c9265,jsx as a22_0x35e9de}from'react/jsx-runtime';import{Box,Text}from'ink';export function ConfigHelp(){const _0xedd40d=a22_0x339d,_0x443a85=[{'command':_0xedd40d(0x1ed),'description':_0xedd40d(0x1dc)},{'command':_0xedd40d(0x1e3),'description':_0xedd40d(0x1ea)},{'command':_0xedd40d(0x1e1),'description':_0xedd40d(0x1e0)}],_0x3272eb=[{'command':_0xedd40d(0x1e5),'description':'配置当前项目的\x20App\x20Code'},{'command':_0xedd40d(0x1e4),'description':_0xedd40d(0x1e8)}];return a22_0x4c9265(Box,{'flexDirection':_0xedd40d(0x1da),'marginTop':0x1,'marginBottom':0x1,'children':[a22_0x35e9de(Box,{'marginBottom':0x1,'children':a22_0x4c9265(Text,{'color':_0xedd40d(0x1f0),'children':['\x20!','\x20\x20',_0xedd40d(0x1ef)]})}),_0x443a85[_0xedd40d(0x1eb)](_0x275930=>a22_0x4c9265(Box,{'children':[a22_0x4c9265(Text,{'children':[_0xedd40d(0x1ec),_0x275930[_0xedd40d(0x1e2)]]}),a22_0x35e9de(Text,{'color':_0xedd40d(0x1f0),'children':_0x275930[_0xedd40d(0x1db)]})]},_0x275930['command'])),a22_0x35e9de(Box,{'marginTop':0x1,'marginBottom':0x1,'children':a22_0x35e9de(Text,{'color':_0xedd40d(0x1f0),'children':_0xedd40d(0x1d7)})}),_0x3272eb[_0xedd40d(0x1eb)](_0x4f0d44=>a22_0x4c9265(Box,{'children':[a22_0x4c9265(Text,{'children':[_0xedd40d(0x1ec),_0x4f0d44[_0xedd40d(0x1e2)]]}),a22_0x35e9de(Text,{'color':_0xedd40d(0x1f0),'children':_0x4f0d44[_0xedd40d(0x1db)]})]},_0x4f0d44[_0xedd40d(0x1e2)]))]});}
@@ -1 +1 @@
1
- (function(_0x584583,_0x555a39){const _0x546054=a23_0x3002,_0x50877b=_0x584583();while(!![]){try{const _0x51cdb5=parseInt(_0x546054(0xf5))/0x1+parseInt(_0x546054(0xf7))/0x2+parseInt(_0x546054(0xee))/0x3+parseInt(_0x546054(0xe5))/0x4+-parseInt(_0x546054(0xf3))/0x5*(-parseInt(_0x546054(0x102))/0x6)+parseInt(_0x546054(0x104))/0x7*(-parseInt(_0x546054(0xe2))/0x8)+-parseInt(_0x546054(0xfc))/0x9*(parseInt(_0x546054(0x103))/0xa);if(_0x51cdb5===_0x555a39)break;else _0x50877b['push'](_0x50877b['shift']());}catch(_0x39a158){_0x50877b['push'](_0x50877b['shift']());}}}(a23_0xca6f,0xeaacd));function a23_0xca6f(){const _0x383be9=['includes','mkdirSync','set','42WGeWnA','2180UtEYJA','91YQfpVQ','renameSync','flags','stringify','error','978504okhPbJ','red','undefined','7245416iBnbAn','parse','dirname','help','list','保存配置失败:\x20','string','log','配置值无效或过长','4173225KUbWlN','--help','utf8','get','.tmp','46275KCsVER','message','757728HRrDhc','unlinkSync','2820120veWicP','online','环境配置值只能是\x20\x22online\x22\x20或\x20\x22daily\x22','保存配置失败','env','119052eDWmNc','input','环境配置已设置为:\x20'];a23_0xca6f=function(){return _0x383be9;};return a23_0xca6f();}import{jsx as a23_0x4944d4,jsxs as a23_0x4382b3}from'react/jsx-runtime';import{existsSync,readFileSync,writeFileSync}from'node:fs';import a23_0x21bca3 from'node:fs';import a23_0x2fb033 from'node:path';import{ConfigHelp}from'./config-help.js';function a23_0x3002(_0x51f31b,_0x13a449){const _0xca6f7a=a23_0xca6f();return a23_0x3002=function(_0x3002b6,_0x5bc1a1){_0x3002b6=_0x3002b6-0xe0;let _0xbb55d=_0xca6f7a[_0x3002b6];return _0xbb55d;},a23_0x3002(_0x51f31b,_0x13a449);}import{Box,Text}from'ink';import{readConfig,isInProject,projectConfigPath,globalConfigPath}from'../utils/config.js';import{logger}from'../utils/logger.js';export function Config(_0x37c10b){const _0x5467e1=a23_0x3002,{cli:_0x4c977e}=_0x37c10b,_0xc21742=_0x4c977e[_0x5467e1(0xfd)][0x1],_0xe9bf75=_0x4c977e[_0x5467e1(0xfd)][0x2],_0x6e9483=[_0x5467e1(0x101),_0x5467e1(0xf1)][_0x5467e1(0xff)](_0xc21742||''),_0x358fb0=_0x4c977e[_0x5467e1(0xfd)]['length']>=0x3;if(_0xe9bf75===_0x5467e1(0xef)||_0x4c977e[_0x5467e1(0x106)][_0x5467e1(0xe8)])return a23_0x4944d4(ConfigHelp,{});const _0x3d6354=readConfig();if(_0xc21742==='set'){if(_0xe9bf75){const _0xc752c0=_0x4c977e[_0x5467e1(0xfd)][0x3];if(typeof _0xc752c0!==_0x5467e1(0xe4)){if(_0xe9bf75===_0x5467e1(0xfb)&&![_0x5467e1(0xf8),'daily'][_0x5467e1(0xff)](_0xc752c0))return a23_0x4944d4(Box,{'children':a23_0x4944d4(Text,{'color':_0x5467e1(0xe3),'children':_0x5467e1(0xf9)})});const _0xb3e943=isInProject(),_0x546f66=_0xb3e943?projectConfigPath:globalConfigPath;let _0x4f3039={};try{if(existsSync(_0x546f66)){const _0x483b64=readFileSync(_0x546f66,{'encoding':_0x5467e1(0xf0)});_0x483b64&&(_0x4f3039=JSON[_0x5467e1(0xe6)](_0x483b64));}}catch(_0x43b023){}if(typeof _0xc752c0!==_0x5467e1(0xeb)||_0xc752c0['length']>0x1f4)return a23_0x4944d4(Box,{'children':a23_0x4944d4(Text,{'color':_0x5467e1(0xe3),'children':_0x5467e1(0xed)})});_0x4f3039[_0xe9bf75]=_0xc752c0;try{const _0x13c73d=a23_0x2fb033[_0x5467e1(0xe7)](_0x546f66);!existsSync(_0x13c73d)&&a23_0x21bca3[_0x5467e1(0x100)](_0x13c73d,{'recursive':!![]});const _0x54471e=_0x546f66+'.tmp';writeFileSync(_0x54471e,JSON[_0x5467e1(0xe0)](_0x4f3039,null,0x2),{'encoding':_0x5467e1(0xf0),'mode':0x180}),a23_0x21bca3[_0x5467e1(0x105)](_0x54471e,_0x546f66);if(_0xe9bf75==='env'){const _0x1e9e8c=_0xb3e943?'项目':'全局';console[_0x5467e1(0xec)]('✓\x20'+_0x1e9e8c+_0x5467e1(0xfe)+_0xc752c0);}}catch(_0x2f6a9f){const _0x49efe9=_0x546f66+_0x5467e1(0xf2);try{existsSync(_0x49efe9)&&a23_0x21bca3[_0x5467e1(0xf6)](_0x49efe9);}catch(_0x3ff738){}return logger[_0x5467e1(0xe1)]('config',_0x5467e1(0xfa),{'error':_0x2f6a9f instanceof Error?_0x2f6a9f[_0x5467e1(0xf4)]:String(_0x2f6a9f),'configKey':_0xe9bf75,'configValue':_0xc752c0,'targetConfigPath':_0x546f66}),a23_0x4944d4(Box,{'children':a23_0x4382b3(Text,{'color':_0x5467e1(0xe3),'children':[_0x5467e1(0xea),_0x2f6a9f instanceof Error?_0x2f6a9f[_0x5467e1(0xf4)]:String(_0x2f6a9f)]})});}return null;}return a23_0x4944d4(Box,{'children':a23_0x4944d4(Text,{'color':_0x5467e1(0xe3),'children':'未提供配置值'})});}}if(_0xc21742===_0x5467e1(0xf1)){if(_0xe9bf75)return console[_0x5467e1(0xec)](_0x3d6354[_0xe9bf75]||'undefined'),null;return null;}if(_0xc21742===_0x5467e1(0xe9))return console['log'](JSON[_0x5467e1(0xe0)](_0x3d6354,null,0x2)),null;if(!_0x6e9483||!_0x358fb0)return a23_0x4944d4(ConfigHelp,{});return null;}
1
+ (function(_0x13fb5d,_0x3b1ff3){const _0x4cf980=a23_0x36b3,_0x581c77=_0x13fb5d();while(!![]){try{const _0x23caef=-parseInt(_0x4cf980(0x96))/0x1*(parseInt(_0x4cf980(0x74))/0x2)+-parseInt(_0x4cf980(0x8e))/0x3*(parseInt(_0x4cf980(0x93))/0x4)+parseInt(_0x4cf980(0x85))/0x5*(parseInt(_0x4cf980(0x8b))/0x6)+-parseInt(_0x4cf980(0x7f))/0x7*(parseInt(_0x4cf980(0x73))/0x8)+-parseInt(_0x4cf980(0x78))/0x9+-parseInt(_0x4cf980(0x92))/0xa*(-parseInt(_0x4cf980(0x81))/0xb)+parseInt(_0x4cf980(0x82))/0xc;if(_0x23caef===_0x3b1ff3)break;else _0x581c77['push'](_0x581c77['shift']());}catch(_0x91e700){_0x581c77['push'](_0x581c77['shift']());}}}(a23_0x12ef,0xd64d1));import{jsx as a23_0x521142,jsxs as a23_0x50959e}from'react/jsx-runtime';import{existsSync,readFileSync,writeFileSync}from'node:fs';import a23_0x493f1a from'node:fs';function a23_0x36b3(_0x1dd1e0,_0x36eea4){const _0x12efc4=a23_0x12ef();return a23_0x36b3=function(_0x36b3af,_0x32290d){_0x36b3af=_0x36b3af-0x6e;let _0x2d318c=_0x12efc4[_0x36b3af];return _0x2d318c;},a23_0x36b3(_0x1dd1e0,_0x36eea4);}import a23_0xd6cc7 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(_0x4582b3){const _0x2f9b67=a23_0x36b3,{cli:_0x15a0e1}=_0x4582b3,_0x409845=_0x15a0e1[_0x2f9b67(0x7c)][0x1],_0x582ed0=_0x15a0e1[_0x2f9b67(0x7c)][0x2],_0x17dcad=[_0x2f9b67(0x77),_0x2f9b67(0x80)][_0x2f9b67(0x7a)](_0x409845||''),_0x4b5124=_0x15a0e1[_0x2f9b67(0x7c)][_0x2f9b67(0x84)]>=0x3;if(_0x582ed0===_0x2f9b67(0x7b)||_0x15a0e1[_0x2f9b67(0x76)][_0x2f9b67(0x83)])return a23_0x521142(ConfigHelp,{});const _0x1dba7d=readConfig();if(_0x409845==='set'){if(_0x582ed0){const _0x29815a=_0x15a0e1[_0x2f9b67(0x7c)][0x3];if(typeof _0x29815a!=='undefined'){if(_0x582ed0===_0x2f9b67(0x8c)&&![_0x2f9b67(0x89),_0x2f9b67(0x7d)]['includes'](_0x29815a))return a23_0x521142(Box,{'children':a23_0x521142(Text,{'color':_0x2f9b67(0x86),'children':_0x2f9b67(0x7e)})});const _0x348c9b=isInProject(),_0xfb8913=_0x348c9b?projectConfigPath:globalConfigPath;let _0x4552cd={};try{if(existsSync(_0xfb8913)){const _0x1be119=readFileSync(_0xfb8913,{'encoding':_0x2f9b67(0x6f)});_0x1be119&&(_0x4552cd=JSON[_0x2f9b67(0x70)](_0x1be119));}}catch(_0x52feef){}if(typeof _0x29815a!==_0x2f9b67(0x90)||_0x29815a[_0x2f9b67(0x84)]>0x1f4)return a23_0x521142(Box,{'children':a23_0x521142(Text,{'color':_0x2f9b67(0x86),'children':'配置值无效或过长'})});_0x4552cd[_0x582ed0]=_0x29815a;try{const _0xbc2fb7=a23_0xd6cc7[_0x2f9b67(0x91)](_0xfb8913);!existsSync(_0xbc2fb7)&&a23_0x493f1a['mkdirSync'](_0xbc2fb7,{'recursive':!![]});const _0x6b179c=_0xfb8913+_0x2f9b67(0x75);writeFileSync(_0x6b179c,JSON[_0x2f9b67(0x71)](_0x4552cd,null,0x2),{'encoding':'utf8','mode':0x180}),a23_0x493f1a[_0x2f9b67(0x8d)](_0x6b179c,_0xfb8913);if(_0x582ed0===_0x2f9b67(0x8c)){const _0xfa2a87=_0x348c9b?'项目':'全局';console[_0x2f9b67(0x95)]('✓\x20'+_0xfa2a87+'环境配置已设置为:\x20'+_0x29815a);}}catch(_0x16ff2b){const _0x8ff18c=_0xfb8913+_0x2f9b67(0x75);try{existsSync(_0x8ff18c)&&a23_0x493f1a['unlinkSync'](_0x8ff18c);}catch(_0x45f850){}return logger[_0x2f9b67(0x8f)](_0x2f9b67(0x88),_0x2f9b67(0x8a),{'error':_0x16ff2b instanceof Error?_0x16ff2b[_0x2f9b67(0x79)]:String(_0x16ff2b),'configKey':_0x582ed0,'configValue':_0x29815a,'targetConfigPath':_0xfb8913}),a23_0x521142(Box,{'children':a23_0x50959e(Text,{'color':'red','children':[_0x2f9b67(0x94),_0x16ff2b instanceof Error?_0x16ff2b[_0x2f9b67(0x79)]:String(_0x16ff2b)]})});}return null;}return a23_0x521142(Box,{'children':a23_0x521142(Text,{'color':'red','children':_0x2f9b67(0x72)})});}}if(_0x409845===_0x2f9b67(0x80)){if(_0x582ed0)return console['log'](_0x1dba7d[_0x582ed0]||_0x2f9b67(0x87)),null;return null;}if(_0x409845===_0x2f9b67(0x6e))return console[_0x2f9b67(0x95)](JSON[_0x2f9b67(0x71)](_0x1dba7d,null,0x2)),null;if(!_0x17dcad||!_0x4b5124)return a23_0x521142(ConfigHelp,{});return null;}function a23_0x12ef(){const _0x294f81=['14967729MwDiWk','message','includes','--help','input','daily','环境配置值只能是\x20\x22online\x22\x20或\x20\x22daily\x22','8491EBapnT','get','55kZAlKG','47063688XhXSYy','help','length','195GbiRPa','red','undefined','config','online','保存配置失败','137586DxUtgZ','env','renameSync','5475ltVWbw','error','string','dirname','1749010dMeouH','1868vIFvhd','保存配置失败:\x20','log','1qqLhpO','list','utf8','parse','stringify','未提供配置值','7472PYhAVl','2329426qHvwPj','.tmp','flags','set'];a23_0x12ef=function(){return _0x294f81;};return a23_0x12ef();}
@@ -1 +1 @@
1
- const a24_0x4919b0=a24_0x5cfb;function a24_0x5cfb(_0x5e0274,_0x1839c1){const _0x397d7c=a24_0x397d();return a24_0x5cfb=function(_0x5cfbbb,_0x2aebbe){_0x5cfbbb=_0x5cfbbb-0xf9;let _0x4e264f=_0x397d7c[_0x5cfbbb];return _0x4e264f;},a24_0x5cfb(_0x5e0274,_0x1839c1);}(function(_0x2d35b0,_0x1def35){const _0x526364=a24_0x5cfb,_0x5bc820=_0x2d35b0();while(!![]){try{const _0xfe2930=parseInt(_0x526364(0xfd))/0x1*(-parseInt(_0x526364(0x103))/0x2)+parseInt(_0x526364(0x105))/0x3+parseInt(_0x526364(0xf9))/0x4*(parseInt(_0x526364(0x100))/0x5)+-parseInt(_0x526364(0x106))/0x6+-parseInt(_0x526364(0xff))/0x7+-parseInt(_0x526364(0x101))/0x8*(-parseInt(_0x526364(0x104))/0x9)+parseInt(_0x526364(0xfa))/0xa;if(_0xfe2930===_0x1def35)break;else _0x5bc820['push'](_0x5bc820['shift']());}catch(_0x474c09){_0x5bc820['push'](_0x5bc820['shift']());}}}(a24_0x397d,0xc2dec));import{getEnv}from'./env.js';export const getUserDomain=()=>getEnv()===a24_0x4919b0(0x102)?'https://user.lovrabet.com':a24_0x4919b0(0xfb);export const getApiDomain=()=>getEnv()==='online'?a24_0x4919b0(0xfc):a24_0x4919b0(0xfe);function a24_0x397d(){const _0x2b184d=['https://user-daily.lovrabet.com','https://api.lovrabet.com','15955JetwGw','https://daily-api.lovrabet.com','7438935pekdog','30uMqupq','16MArFar','online','182RltLit','5339619GERASP','1697676XqUVmY','471210CAVFTl','279900ZCanZO','12190090TrIaNb'];a24_0x397d=function(){return _0x2b184d;};return a24_0x397d();}
1
+ function a24_0x3bc7(){const _0x261eaa=['https://daily-api.lovrabet.com','568410ebZOzC','8379848lGHaIv','1337ZItZsz','online','643605uzAtvD','29691MaFnjJ','1405294AVViek','https://user-daily.lovrabet.com','https://api.lovrabet.com','33138dtLiAS','6290PdsoUc','https://user.lovrabet.com','237232QKwHyI','18RmeaFh'];a24_0x3bc7=function(){return _0x261eaa;};return a24_0x3bc7();}function a24_0x4fb8(_0x1ed9b8,_0x4a2481){const _0x3bc74f=a24_0x3bc7();return a24_0x4fb8=function(_0x4fb874,_0x1abf0f){_0x4fb874=_0x4fb874-0x170;let _0x4dbc33=_0x3bc74f[_0x4fb874];return _0x4dbc33;},a24_0x4fb8(_0x1ed9b8,_0x4a2481);}const a24_0x2ad4bf=a24_0x4fb8;(function(_0x1d90f3,_0xcce9aa){const _0x27e6fe=a24_0x4fb8,_0x461624=_0x1d90f3();while(!![]){try{const _0x500e07=-parseInt(_0x27e6fe(0x175))/0x1+-parseInt(_0x27e6fe(0x17b))/0x2+-parseInt(_0x27e6fe(0x173))/0x3*(parseInt(_0x27e6fe(0x172))/0x4)+parseInt(_0x27e6fe(0x179))/0x5+parseInt(_0x27e6fe(0x17e))/0x6*(-parseInt(_0x27e6fe(0x177))/0x7)+parseInt(_0x27e6fe(0x176))/0x8+-parseInt(_0x27e6fe(0x17a))/0x9*(-parseInt(_0x27e6fe(0x170))/0xa);if(_0x500e07===_0xcce9aa)break;else _0x461624['push'](_0x461624['shift']());}catch(_0x4b52cb){_0x461624['push'](_0x461624['shift']());}}}(a24_0x3bc7,0x8b083));import{getEnv}from'./env.js';export const getUserDomain=()=>getEnv()===a24_0x2ad4bf(0x178)?a24_0x2ad4bf(0x171):a24_0x2ad4bf(0x17c);export const getApiDomain=()=>getEnv()===a24_0x2ad4bf(0x178)?a24_0x2ad4bf(0x17d):a24_0x2ad4bf(0x174);
@@ -1 +1 @@
1
- const a25_0x46a653=a25_0x53fb;(function(_0x550bbb,_0x3392bb){const _0x3a50ee=a25_0x53fb,_0x235e2b=_0x550bbb();while(!![]){try{const _0x3763f9=-parseInt(_0x3a50ee(0x19e))/0x1*(parseInt(_0x3a50ee(0x19f))/0x2)+-parseInt(_0x3a50ee(0x19c))/0x3+parseInt(_0x3a50ee(0x19b))/0x4+parseInt(_0x3a50ee(0x198))/0x5+parseInt(_0x3a50ee(0x1a0))/0x6+-parseInt(_0x3a50ee(0x197))/0x7+parseInt(_0x3a50ee(0x19d))/0x8;if(_0x3763f9===_0x3392bb)break;else _0x235e2b['push'](_0x235e2b['shift']());}catch(_0x5016c3){_0x235e2b['push'](_0x235e2b['shift']());}}}(a25_0x32b5,0x36873));let env=process[a25_0x46a653(0x19a)][a25_0x46a653(0x1a1)]||a25_0x46a653(0x199);function a25_0x53fb(_0x2c55ca,_0x4dfc69){const _0x32b5fb=a25_0x32b5();return a25_0x53fb=function(_0x53fb09,_0x3b9461){_0x53fb09=_0x53fb09-0x197;let _0x1ddee3=_0x32b5fb[_0x53fb09];return _0x1ddee3;},a25_0x53fb(_0x2c55ca,_0x4dfc69);}function a25_0x32b5(){const _0x308b9c=['LOVRABET_ENV','1473927MLFokx','938900RaEvaJ','online','env','607228QSVRPm','947934pQEDpy','2715552ryFEHv','156022LEbJdJ','4BooyHX','2297394hCopcN'];a25_0x32b5=function(){return _0x308b9c;};return a25_0x32b5();}export function getEnv(){return env;}export function initEnv(_0x2fc9ab){env=_0x2fc9ab;}
1
+ (function(_0x52af27,_0x1fdc2a){const _0x32ae6e=a25_0xfe10,_0xb09562=_0x52af27();while(!![]){try{const _0x56bb25=-parseInt(_0x32ae6e(0xcb))/0x1*(-parseInt(_0x32ae6e(0xc2))/0x2)+parseInt(_0x32ae6e(0xc9))/0x3+parseInt(_0x32ae6e(0xc6))/0x4*(parseInt(_0x32ae6e(0xc0))/0x5)+parseInt(_0x32ae6e(0xc3))/0x6*(-parseInt(_0x32ae6e(0xc4))/0x7)+-parseInt(_0x32ae6e(0xc1))/0x8*(-parseInt(_0x32ae6e(0xbf))/0x9)+parseInt(_0x32ae6e(0xca))/0xa*(parseInt(_0x32ae6e(0xc8))/0xb)+parseInt(_0x32ae6e(0xc5))/0xc*(-parseInt(_0x32ae6e(0xc7))/0xd);if(_0x56bb25===_0x1fdc2a)break;else _0xb09562['push'](_0xb09562['shift']());}catch(_0x1ebbf0){_0xb09562['push'](_0xb09562['shift']());}}}(a25_0x4b51,0x2ff99));function a25_0x4b51(){const _0x2961f4=['236529TnvHEa','335zeHFQD','96PHKCde','142854uYhZul','698376lAAiWx','14Dqkhlp','3848472PthHak','11504BRpYWE','26pvShZv','1393645jGhBCt','1093569ukdICh','10yoFWoN','1qGgKYo'];a25_0x4b51=function(){return _0x2961f4;};return a25_0x4b51();}function a25_0xfe10(_0x218858,_0x16c528){const _0x4b5162=a25_0x4b51();return a25_0xfe10=function(_0xfe10ee,_0x1bfe1c){_0xfe10ee=_0xfe10ee-0xbf;let _0x5d7e04=_0x4b5162[_0xfe10ee];return _0x5d7e04;},a25_0xfe10(_0x218858,_0x16c528);}let env=process['env']['LOVRABET_ENV']||'online';export function getEnv(){return env;}export function initEnv(_0x14e4e5){env=_0x14e4e5;}
@@ -1 +1 @@
1
- (function(_0x4de978,_0x165ba2){const _0x416910=a26_0x348b,_0x22a54c=_0x4de978();while(!![]){try{const _0x3c4b45=parseInt(_0x416910(0x17a))/0x1+-parseInt(_0x416910(0x163))/0x2*(-parseInt(_0x416910(0x182))/0x3)+parseInt(_0x416910(0x18b))/0x4+-parseInt(_0x416910(0x173))/0x5*(parseInt(_0x416910(0x16f))/0x6)+-parseInt(_0x416910(0x185))/0x7*(parseInt(_0x416910(0x179))/0x8)+parseInt(_0x416910(0x190))/0x9+parseInt(_0x416910(0x177))/0xa*(-parseInt(_0x416910(0x162))/0xb);if(_0x3c4b45===_0x165ba2)break;else _0x22a54c['push'](_0x22a54c['shift']());}catch(_0x1fa46c){_0x22a54c['push'](_0x22a54c['shift']());}}}(a26_0x5c2f,0xcbea6));function a26_0x348b(_0x28cb43,_0x4ee18e){const _0x5c2fb8=a26_0x5c2f();return a26_0x348b=function(_0x348b7a,_0x57e0ed){_0x348b7a=_0x348b7a-0x155;let _0x5388d0=_0x5c2fb8[_0x348b7a];return _0x5388d0;},a26_0x348b(_0x28cb43,_0x4ee18e);}import{jsx as a26_0x4dae19,jsxs as a26_0x19a134,Fragment as a26_0x1b2232}from'react/jsx-runtime';import{useState}from'react';import{Text,Box,useInput}from'ink';function a26_0x5c2f(){const _0x39ecf9=['10398mWrkOz','green','step','7NlaJGn','gray','slice','my-app','应用AppCode长度不能超过\x20100\x20个字符','\x20\x20推荐选择\x20Yes,可自动配置\x20API\x20接口','5955672yJNfCi','拉取API配置','env','trim','online','4653000hoESII','map','login-prompt','includes','\x20直接回车确认,或输入自定义名称','项目名','*\x20是否要自动拉取\x20API\x20配置?','length','red','*\x20应用AppCode\x20','√\x20检测到有效登录状态','delete','\x20检查中...','column','已登录','string','11zMouML','674vFNjgF','应用AppCode只能包含字母、数字、连字符和下划线,且必须以字母或数字开头','return','project-name','*\x20项目名:\x20','cyan','test','yellow','登录失败','项目名不合法','login-check','*\x20正在登录,请前往浏览器完成登录...','3276444AqLAie','\x20←\x20','应用AppCode不合法','登录状态','15PeOidi','confirm-api-pull','login','\x20\x20推荐选择\x20Yes,登录后可自动拉取并配置\x20API\x20接口','6220190ccpyrC','Yes','7267992bjLVGv','830018RRTCuh','项目名长度不能超过\x2050\x20个字符','跳过登录','绑定应用AppCode可自动配置\x20API,如:\x20app-c4c89304\x20(直接回车跳过)','app-code','login-process','creating','[可选]:\x20'];a26_0x5c2f=function(){return _0x39ecf9;};return a26_0x5c2f();}import{getIsSessionValid}from'../auth/is-session-valid.js';import{authServer}from'../auth/auth-server.js';import{readConfig}from'../utils/config.js';export function EnhancedGuidedCreate(_0x2326b7){const _0x3f0079=a26_0x348b,{onCreate:_0x4e2911,env:_0x47eec1}=_0x2326b7,[_0x5c2da3,_0xebd162]=useState(_0x3f0079(0x166)),[_0x415a34,_0x4dd996]=useState(''),[_0x5d7fe2,_0xca261e]=useState(''),[_0x546bf3,_0x1715cc]=useState(''),[_0x43d2ef,_0x39967a]=useState(''),[_0x514110,_0x4c8b51]=useState([]),[_0x2c3333,_0x5461c3]=useState(null),[_0x2dd430,_0x427b50]=useState(![]),[_0x3b3fd4,_0xba43bf]=useState(![]),[_0x440e78,_0xf5e336]=useState(![]),[_0x14c953,_0x27234a]=useState(0x0),[_0x27f081,_0x89ef31]=useState(0x0),_0x38bb85=_0x3f0079(0x188),_0x49476d=readConfig(),_0x16c71a=typeof _0x49476d[_0x3f0079(0x18d)]===_0x3f0079(0x161)?_0x49476d[_0x3f0079(0x18d)]:undefined;function _0x3cf8c3(_0x14f7d0){const _0x5ebf66=_0x3f0079;if(_0x14f7d0[_0x5ebf66(0x159)]>0x32)return{'valid':![],'message':_0x5ebf66(0x17b)};const _0x191a49=/^[A-Za-z0-9][A-Za-z0-9_-]*$/;if(_0x14f7d0?.[_0x5ebf66(0x18e)]()&&!_0x191a49[_0x5ebf66(0x169)](_0x14f7d0))return{'valid':![],'message':'项目名只能以字母或数字开头,且只包含字母、数字、-\x20和\x20_'};return{'valid':!![]};}function _0x158bf7(_0x35aea9){const _0x53a724=_0x3f0079;if(!_0x35aea9[_0x53a724(0x18e)]())return{'valid':!![]};if(_0x35aea9[_0x53a724(0x159)]>0x64)return{'valid':![],'message':_0x53a724(0x189)};const _0x25157c=/^[a-zA-Z0-9][a-zA-Z0-9_-]*$/;if(!_0x25157c[_0x53a724(0x169)](_0x35aea9))return{'valid':![],'message':_0x53a724(0x164)};return{'valid':!![]};}async function _0x13b4ab(){_0x427b50(!![]);try{const _0x514c1b=await getIsSessionValid();return _0x5461c3(_0x514c1b),_0x514c1b;}catch(_0x5176db){return _0x5461c3(![]),![];}finally{_0x427b50(![]);}}async function _0x1550bc(){_0xba43bf(!![]);try{const _0x3450fd=await authServer({'silent':!![]});return _0x5461c3(_0x3450fd),_0x3450fd;}catch(_0x550fef){return _0x5461c3(![]),![];}finally{_0xba43bf(![]);}}return useInput(async(_0x2e5919,_0x5df050)=>{const _0x57672d=_0x3f0079;if(_0x5df050['leftArrow']||_0x5df050['rightArrow']){if(_0x5c2da3==='confirm-api-pull'){_0x27234a(_0x1fb97e=>_0x1fb97e===0x0?0x1:0x0);return;}if(_0x5c2da3==='login-prompt'){_0x89ef31(_0x28bdb6=>_0x28bdb6===0x0?0x1:0x0);return;}}if(_0x5df050[_0x57672d(0x165)]){if(_0x5c2da3===_0x57672d(0x166)){const _0x598534=_0x546bf3[_0x57672d(0x18e)]()||_0x38bb85;if(_0x43d2ef)return;_0x4dd996(_0x598534),_0x4c8b51([{'step':_0x57672d(0x166),'label':_0x57672d(0x157),'value':_0x598534}]),_0x1715cc(''),_0x39967a(''),_0xebd162(_0x57672d(0x17e));return;}if(_0x5c2da3===_0x57672d(0x17e)){if(_0x43d2ef)return;const _0x5b75ea=_0x546bf3[_0x57672d(0x18e)]();_0xca261e(_0x5b75ea),_0x4c8b51(_0x15995a=>[..._0x15995a,{'step':_0x57672d(0x17e),'label':'应用AppCode','value':_0x5b75ea||'未设置'}]),_0x1715cc(''),_0x39967a('');if(_0x5b75ea){_0xebd162(_0x57672d(0x16d));const _0x518852=await _0x13b4ab();_0x518852?_0xebd162(_0x57672d(0x174)):_0xebd162(_0x57672d(0x192));}else{const _0x1ff342=_0x47eec1||_0x16c71a||'online';_0x4e2911({'projectName':_0x415a34,'appCode':undefined,'pullApi':![],'env':_0x1ff342}),_0xebd162(_0x57672d(0x180));}return;}if(_0x5c2da3===_0x57672d(0x174)){const _0x3a32e9=_0x14c953===0x0;_0xf5e336(_0x3a32e9),_0x4c8b51(_0x240c8d=>[..._0x240c8d,{'step':'api-pull','label':_0x57672d(0x18c),'value':_0x3a32e9?'是':'否'}]);const _0x4c1a97=_0x47eec1||_0x16c71a||_0x57672d(0x18f);_0x4e2911({'projectName':_0x415a34,'appCode':_0x5d7fe2,'pullApi':_0x3a32e9,'env':_0x4c1a97}),_0xebd162('creating');return;}if(_0x5c2da3===_0x57672d(0x192)){const _0x59b747=_0x27f081===0x0;if(_0x59b747){_0xebd162(_0x57672d(0x17f));const _0xf15c3e=await _0x1550bc();if(_0xf15c3e)_0x4c8b51(_0x466c02=>[..._0x466c02,{'step':'login','label':_0x57672d(0x172),'value':_0x57672d(0x160)}]),_0xebd162('confirm-api-pull');else{_0x4c8b51(_0x3b9d97=>[..._0x3b9d97,{'step':_0x57672d(0x175),'label':_0x57672d(0x172),'value':_0x57672d(0x16b)}]);const _0x3d3bbe=_0x47eec1||_0x16c71a||_0x57672d(0x18f);_0x4e2911({'projectName':_0x415a34,'appCode':_0x5d7fe2,'pullApi':![],'env':_0x3d3bbe}),_0xebd162(_0x57672d(0x180));}}else{_0x4c8b51(_0x1daf1c=>[..._0x1daf1c,{'step':'login','label':'登录状态','value':_0x57672d(0x17c)}]);const _0x42c727=_0x47eec1||_0x16c71a||_0x57672d(0x18f);_0x4e2911({'projectName':_0x415a34,'appCode':_0x5d7fe2,'pullApi':![],'env':_0x42c727}),_0xebd162(_0x57672d(0x180));}return;}}if(_0x5df050['backspace']||_0x5df050[_0x57672d(0x15d)]){_0x1715cc(_0x49203b=>{const _0x392181=_0x57672d,_0x4ab571=_0x49203b[_0x392181(0x187)](0x0,-0x1);if(_0x5c2da3===_0x392181(0x166)){const {valid:_0x3b5fee,message:_0x35009e}=_0x3cf8c3(_0x4ab571);_0x39967a(_0x3b5fee?'':_0x35009e||_0x392181(0x16c));}else{if(_0x5c2da3===_0x392181(0x17e)){const {valid:_0x5b433e,message:_0x2e86a5}=_0x158bf7(_0x4ab571);_0x39967a(_0x5b433e?'':_0x2e86a5||'应用AppCode不合法');}}return _0x4ab571;});return;}if([_0x57672d(0x180),_0x57672d(0x16d),_0x57672d(0x17f)][_0x57672d(0x155)](_0x5c2da3))return;if(_0x5c2da3===_0x57672d(0x174)||_0x5c2da3==='login-prompt')return;_0x1715cc(_0x19963f=>{const _0x20c9ce=_0x57672d,_0x25c09f=_0x19963f+_0x2e5919;if(_0x5c2da3===_0x20c9ce(0x166)){const {valid:_0xddc22a,message:_0x348ab3}=_0x3cf8c3(_0x25c09f);_0x39967a(_0xddc22a?'':_0x348ab3||_0x20c9ce(0x16c));}else{if(_0x5c2da3===_0x20c9ce(0x17e)){const {valid:_0x1c3570,message:_0x424f37}=_0x158bf7(_0x25c09f);_0x39967a(_0x1c3570?'':_0x424f37||_0x20c9ce(0x171));}}return _0x25c09f;});}),a26_0x19a134(Box,{'flexDirection':_0x3f0079(0x15f),'marginTop':0x1,'children':[_0x514110[_0x3f0079(0x159)]===0x0&&a26_0x4dae19(Box,{'children':a26_0x4dae19(Text,{'color':_0x3f0079(0x168),'children':'*\x20创建新项目'})}),_0x514110[_0x3f0079(0x191)](_0x12ee9a=>a26_0x19a134(Box,{'children':[a26_0x19a134(Text,{'color':_0x3f0079(0x183),'children':['√\x20',_0x12ee9a['label'],':\x20']}),a26_0x4dae19(Text,{'color':_0x3f0079(0x168),'children':_0x12ee9a['value']})]},_0x12ee9a[_0x3f0079(0x184)])),_0x5c2da3===_0x3f0079(0x166)&&a26_0x19a134(a26_0x1b2232,{'children':[a26_0x19a134(Box,{'children':[a26_0x4dae19(Text,{'children':_0x3f0079(0x167)}),_0x546bf3?a26_0x4dae19(Text,{'color':_0x3f0079(0x183),'children':_0x546bf3}):a26_0x4dae19(Text,{'color':'gray','children':_0x38bb85}),_0x43d2ef&&a26_0x19a134(Text,{'color':_0x3f0079(0x15a),'children':[_0x3f0079(0x170),_0x43d2ef]})]}),!_0x43d2ef&&!_0x546bf3&&a26_0x4dae19(Box,{'children':a26_0x4dae19(Text,{'color':_0x3f0079(0x186),'children':_0x3f0079(0x156)})})]}),_0x5c2da3==='app-code'&&a26_0x19a134(a26_0x1b2232,{'children':[a26_0x19a134(Box,{'children':[a26_0x4dae19(Text,{'children':_0x3f0079(0x15b)}),a26_0x4dae19(Text,{'color':_0x3f0079(0x186),'children':_0x3f0079(0x181)}),a26_0x4dae19(Text,{'color':_0x3f0079(0x183),'children':_0x546bf3}),_0x43d2ef&&a26_0x19a134(Text,{'color':'red','children':[_0x3f0079(0x170),_0x43d2ef]})]}),!_0x43d2ef&&a26_0x4dae19(Box,{'children':a26_0x19a134(Text,{'color':_0x3f0079(0x186),'children':['\x20',_0x3f0079(0x17d)]})})]}),_0x5c2da3===_0x3f0079(0x16d)&&a26_0x19a134(Box,{'children':[a26_0x4dae19(Text,{'children':'*\x20正在检查登录状态...'}),_0x2dd430&&a26_0x4dae19(Text,{'color':_0x3f0079(0x186),'children':_0x3f0079(0x15e)})]}),_0x5c2da3===_0x3f0079(0x174)&&a26_0x19a134(a26_0x1b2232,{'children':[a26_0x4dae19(Box,{'children':a26_0x4dae19(Text,{'color':_0x3f0079(0x183),'children':_0x3f0079(0x15c)})}),a26_0x4dae19(Box,{'marginTop':0x1,'children':a26_0x4dae19(Text,{'children':_0x3f0079(0x158)})}),a26_0x19a134(Box,{'marginLeft':0x2,'children':[a26_0x19a134(Text,{'color':_0x14c953===0x0?'green':_0x3f0079(0x186),'children':[_0x14c953===0x0?'▶\x20':'\x20\x20',_0x3f0079(0x178)]}),a26_0x4dae19(Text,{'children':'\x20'}),a26_0x19a134(Text,{'color':_0x14c953===0x1?_0x3f0079(0x183):_0x3f0079(0x186),'children':[_0x14c953===0x1?'▶\x20':'\x20\x20','No']})]}),a26_0x4dae19(Box,{'children':a26_0x4dae19(Text,{'color':'gray','children':'\x20\x20使用\x20←→\x20选择,回车确认'})}),a26_0x4dae19(Box,{'children':a26_0x4dae19(Text,{'color':_0x3f0079(0x16a),'children':_0x3f0079(0x18a)})})]}),_0x5c2da3===_0x3f0079(0x192)&&a26_0x19a134(a26_0x1b2232,{'children':[a26_0x4dae19(Box,{'children':a26_0x4dae19(Text,{'color':'yellow','children':'!\x20未检测到有效登录'})}),a26_0x4dae19(Box,{'marginTop':0x1,'children':a26_0x4dae19(Text,{'children':'*\x20是否要先登录以便拉取\x20API\x20配置?'})}),a26_0x19a134(Box,{'marginLeft':0x2,'children':[a26_0x19a134(Text,{'color':_0x27f081===0x0?_0x3f0079(0x183):'gray','children':[_0x27f081===0x0?'▶\x20':'\x20\x20','Yes']}),a26_0x4dae19(Text,{'children':'\x20'}),a26_0x19a134(Text,{'color':_0x27f081===0x1?'green':'gray','children':[_0x27f081===0x1?'▶\x20':'\x20\x20','No']})]}),a26_0x4dae19(Box,{'children':a26_0x4dae19(Text,{'color':_0x3f0079(0x186),'children':'\x20\x20使用\x20←→\x20选择,回车确认'})}),a26_0x4dae19(Box,{'children':a26_0x4dae19(Text,{'color':_0x3f0079(0x16a),'children':_0x3f0079(0x176)})})]}),_0x5c2da3===_0x3f0079(0x17f)&&a26_0x19a134(Box,{'children':[a26_0x4dae19(Text,{'children':_0x3f0079(0x16e)}),_0x3b3fd4&&a26_0x4dae19(Text,{'color':_0x3f0079(0x186),'children':'\x20登录中...'})]})]});}
1
+ (function(_0x321672,_0x4c5cb9){const _0x511aed=a26_0x4013,_0x4f4240=_0x321672();while(!![]){try{const _0x109916=parseInt(_0x511aed(0x195))/0x1+-parseInt(_0x511aed(0x174))/0x2+-parseInt(_0x511aed(0x191))/0x3+parseInt(_0x511aed(0x17d))/0x4+-parseInt(_0x511aed(0x197))/0x5*(-parseInt(_0x511aed(0x19a))/0x6)+-parseInt(_0x511aed(0x190))/0x7*(parseInt(_0x511aed(0x18c))/0x8)+-parseInt(_0x511aed(0x172))/0x9;if(_0x109916===_0x4c5cb9)break;else _0x4f4240['push'](_0x4f4240['shift']());}catch(_0x4b35ab){_0x4f4240['push'](_0x4f4240['shift']());}}}(a26_0x1fd9,0x72c3c));import{jsx as a26_0x5b9635,jsxs as a26_0x996b1c,Fragment as a26_0x17c1e6}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_0x1fd9(){const _0x51e6b5=['length','未设置','*\x20正在检查登录状态...','\x20检查中...','项目名只能以字母或数字开头,且只包含字母、数字、-\x20和\x20_','Yes','项目名','跳过登录','confirm-api-pull','*\x20创建新项目','cyan','env','应用AppCode','step','\x20\x20推荐选择\x20Yes,登录后可自动拉取并配置\x20API\x20接口','creating','项目名不合法','api-pull','*\x20应用AppCode\x20','test','6206229RGJXVB','应用AppCode只能包含字母、数字、连字符和下划线,且必须以字母或数字开头','1001374pyIGeD','*\x20是否要自动拉取\x20API\x20配置?','\x20\x20使用\x20←→\x20选择,回车确认','[可选]:\x20','rightArrow','\x20登录中...','\x20←\x20','yellow','*\x20正在登录,请前往浏览器完成登录...','3505980HypXJa','\x20直接回车确认,或输入自定义名称','project-name','includes','\x20\x20推荐选择\x20Yes,可自动配置\x20API\x20接口','login-process','return','map','登录状态','online','value','green','*\x20是否要先登录以便拉取\x20API\x20配置?','登录失败','login-prompt','9584uOdOPM','login-check','red','string','763HLnFqg','427233kmroZC','√\x20检测到有效登录状态','!\x20未检测到有效登录','应用AppCode不合法','532935JrVNfd','项目名长度不能超过\x2050\x20个字符','5NPksYm','gray','backspace','3143442ZRDsfd','app-code','label','trim','应用AppCode长度不能超过\x20100\x20个字符','leftArrow','绑定应用AppCode可自动配置\x20API,如:\x20app-c4c89304\x20(直接回车跳过)'];a26_0x1fd9=function(){return _0x51e6b5;};return a26_0x1fd9();}function a26_0x4013(_0x18a6b7,_0x5255d6){const _0x1fd9f7=a26_0x1fd9();return a26_0x4013=function(_0x4013cf,_0x59a10d){_0x4013cf=_0x4013cf-0x15a;let _0x5e15ad=_0x1fd9f7[_0x4013cf];return _0x5e15ad;},a26_0x4013(_0x18a6b7,_0x5255d6);}export function EnhancedGuidedCreate(_0x4921bb){const _0x203355=a26_0x4013,{onCreate:_0x73d39,env:_0x9d1d0f}=_0x4921bb,[_0xbd384b,_0x170107]=useState(_0x203355(0x17f)),[_0x3030f6,_0x594fd2]=useState(''),[_0x30d756,_0x8b109]=useState(''),[_0x4f0547,_0x8d5d56]=useState(''),[_0x422f74,_0x372651]=useState(''),[_0x2944d1,_0x525946]=useState([]),[_0x5eaa81,_0x3eca5c]=useState(null),[_0x53af95,_0x5d2d5e]=useState(![]),[_0x549674,_0x1e5edd]=useState(![]),[_0x44602d,_0x56d109]=useState(![]),[_0x2b22f0,_0x7b4a22]=useState(0x0),[_0x276efe,_0x1c68ed]=useState(0x0),_0x32c60f='my-app',_0x266a0a=readConfig(),_0x3c7a62=typeof _0x266a0a[_0x203355(0x169)]===_0x203355(0x18f)?_0x266a0a[_0x203355(0x169)]:undefined;function _0x379d3e(_0x340f7c){const _0x2d28d8=_0x203355;if(_0x340f7c['length']>0x32)return{'valid':![],'message':_0x2d28d8(0x196)};const _0x53c40b=/^[A-Za-z0-9][A-Za-z0-9_-]*$/;if(_0x340f7c?.[_0x2d28d8(0x15a)]()&&!_0x53c40b[_0x2d28d8(0x171)](_0x340f7c))return{'valid':![],'message':_0x2d28d8(0x162)};return{'valid':!![]};}function _0xb5f1d8(_0x139963){const _0x3900bf=_0x203355;if(!_0x139963[_0x3900bf(0x15a)]())return{'valid':!![]};if(_0x139963[_0x3900bf(0x15e)]>0x64)return{'valid':![],'message':_0x3900bf(0x15b)};const _0x3ff517=/^[a-zA-Z0-9][a-zA-Z0-9_-]*$/;if(!_0x3ff517[_0x3900bf(0x171)](_0x139963))return{'valid':![],'message':_0x3900bf(0x173)};return{'valid':!![]};}async function _0x66b210(){_0x5d2d5e(!![]);try{const _0x220d53=await getIsSessionValid();return _0x3eca5c(_0x220d53),_0x220d53;}catch(_0x1f2f4f){return _0x3eca5c(![]),![];}finally{_0x5d2d5e(![]);}}async function _0x39c9f7(){_0x1e5edd(!![]);try{const _0x5c8e54=await authServer({'silent':!![]});return _0x3eca5c(_0x5c8e54),_0x5c8e54;}catch(_0x4b6831){return _0x3eca5c(![]),![];}finally{_0x1e5edd(![]);}}return useInput(async(_0x114945,_0x125a8f)=>{const _0x29ec7a=_0x203355;if(_0x125a8f[_0x29ec7a(0x15c)]||_0x125a8f[_0x29ec7a(0x178)]){if(_0xbd384b===_0x29ec7a(0x166)){_0x7b4a22(_0x37cb07=>_0x37cb07===0x0?0x1:0x0);return;}if(_0xbd384b===_0x29ec7a(0x18b)){_0x1c68ed(_0x57659c=>_0x57659c===0x0?0x1:0x0);return;}}if(_0x125a8f[_0x29ec7a(0x183)]){if(_0xbd384b===_0x29ec7a(0x17f)){const _0x2d4b4c=_0x4f0547[_0x29ec7a(0x15a)]()||_0x32c60f;if(_0x422f74)return;_0x594fd2(_0x2d4b4c),_0x525946([{'step':_0x29ec7a(0x17f),'label':_0x29ec7a(0x164),'value':_0x2d4b4c}]),_0x8d5d56(''),_0x372651(''),_0x170107(_0x29ec7a(0x19b));return;}if(_0xbd384b===_0x29ec7a(0x19b)){if(_0x422f74)return;const _0x4a2089=_0x4f0547[_0x29ec7a(0x15a)]();_0x8b109(_0x4a2089),_0x525946(_0x4cda4b=>[..._0x4cda4b,{'step':_0x29ec7a(0x19b),'label':_0x29ec7a(0x16a),'value':_0x4a2089||_0x29ec7a(0x15f)}]),_0x8d5d56(''),_0x372651('');if(_0x4a2089){_0x170107(_0x29ec7a(0x18d));const _0x214a72=await _0x66b210();_0x214a72?_0x170107('confirm-api-pull'):_0x170107(_0x29ec7a(0x18b));}else{const _0x383fa5=_0x9d1d0f||_0x3c7a62||'online';_0x73d39({'projectName':_0x3030f6,'appCode':undefined,'pullApi':![],'env':_0x383fa5}),_0x170107('creating');}return;}if(_0xbd384b===_0x29ec7a(0x166)){const _0x331543=_0x2b22f0===0x0;_0x56d109(_0x331543),_0x525946(_0x13707c=>[..._0x13707c,{'step':_0x29ec7a(0x16f),'label':'拉取API配置','value':_0x331543?'是':'否'}]);const _0xd3934a=_0x9d1d0f||_0x3c7a62||_0x29ec7a(0x186);_0x73d39({'projectName':_0x3030f6,'appCode':_0x30d756,'pullApi':_0x331543,'env':_0xd3934a}),_0x170107(_0x29ec7a(0x16d));return;}if(_0xbd384b===_0x29ec7a(0x18b)){const _0x549825=_0x276efe===0x0;if(_0x549825){_0x170107('login-process');const _0x5ab44c=await _0x39c9f7();if(_0x5ab44c)_0x525946(_0x2e3ab2=>[..._0x2e3ab2,{'step':'login','label':_0x29ec7a(0x185),'value':'已登录'}]),_0x170107(_0x29ec7a(0x166));else{_0x525946(_0x37d9da=>[..._0x37d9da,{'step':'login','label':'登录状态','value':_0x29ec7a(0x18a)}]);const _0x805c56=_0x9d1d0f||_0x3c7a62||'online';_0x73d39({'projectName':_0x3030f6,'appCode':_0x30d756,'pullApi':![],'env':_0x805c56}),_0x170107(_0x29ec7a(0x16d));}}else{_0x525946(_0xb8f3c5=>[..._0xb8f3c5,{'step':'login','label':_0x29ec7a(0x185),'value':_0x29ec7a(0x165)}]);const _0x4451c7=_0x9d1d0f||_0x3c7a62||'online';_0x73d39({'projectName':_0x3030f6,'appCode':_0x30d756,'pullApi':![],'env':_0x4451c7}),_0x170107('creating');}return;}}if(_0x125a8f[_0x29ec7a(0x199)]||_0x125a8f['delete']){_0x8d5d56(_0xac370a=>{const _0x3c8cc1=_0x29ec7a,_0x511e8a=_0xac370a['slice'](0x0,-0x1);if(_0xbd384b===_0x3c8cc1(0x17f)){const {valid:_0x162ba,message:_0x3e9a08}=_0x379d3e(_0x511e8a);_0x372651(_0x162ba?'':_0x3e9a08||_0x3c8cc1(0x16e));}else{if(_0xbd384b===_0x3c8cc1(0x19b)){const {valid:_0x5dcb90,message:_0xc39dfa}=_0xb5f1d8(_0x511e8a);_0x372651(_0x5dcb90?'':_0xc39dfa||_0x3c8cc1(0x194));}}return _0x511e8a;});return;}if([_0x29ec7a(0x16d),_0x29ec7a(0x18d),'login-process'][_0x29ec7a(0x180)](_0xbd384b))return;if(_0xbd384b===_0x29ec7a(0x166)||_0xbd384b===_0x29ec7a(0x18b))return;_0x8d5d56(_0x2fc3a1=>{const _0x28e67f=_0x29ec7a,_0x5a2bec=_0x2fc3a1+_0x114945;if(_0xbd384b===_0x28e67f(0x17f)){const {valid:_0x44179e,message:_0x19297e}=_0x379d3e(_0x5a2bec);_0x372651(_0x44179e?'':_0x19297e||_0x28e67f(0x16e));}else{if(_0xbd384b===_0x28e67f(0x19b)){const {valid:_0x419a34,message:_0x28b97b}=_0xb5f1d8(_0x5a2bec);_0x372651(_0x419a34?'':_0x28b97b||_0x28e67f(0x194));}}return _0x5a2bec;});}),a26_0x996b1c(Box,{'flexDirection':'column','marginTop':0x1,'children':[_0x2944d1['length']===0x0&&a26_0x5b9635(Box,{'children':a26_0x5b9635(Text,{'color':'cyan','children':_0x203355(0x167)})}),_0x2944d1[_0x203355(0x184)](_0xf0ede=>a26_0x996b1c(Box,{'children':[a26_0x996b1c(Text,{'color':_0x203355(0x188),'children':['√\x20',_0xf0ede[_0x203355(0x19c)],':\x20']}),a26_0x5b9635(Text,{'color':_0x203355(0x168),'children':_0xf0ede[_0x203355(0x187)]})]},_0xf0ede[_0x203355(0x16b)])),_0xbd384b===_0x203355(0x17f)&&a26_0x996b1c(a26_0x17c1e6,{'children':[a26_0x996b1c(Box,{'children':[a26_0x5b9635(Text,{'children':'*\x20项目名:\x20'}),_0x4f0547?a26_0x5b9635(Text,{'color':'green','children':_0x4f0547}):a26_0x5b9635(Text,{'color':_0x203355(0x198),'children':_0x32c60f}),_0x422f74&&a26_0x996b1c(Text,{'color':_0x203355(0x18e),'children':['\x20←\x20',_0x422f74]})]}),!_0x422f74&&!_0x4f0547&&a26_0x5b9635(Box,{'children':a26_0x5b9635(Text,{'color':_0x203355(0x198),'children':_0x203355(0x17e)})})]}),_0xbd384b==='app-code'&&a26_0x996b1c(a26_0x17c1e6,{'children':[a26_0x996b1c(Box,{'children':[a26_0x5b9635(Text,{'children':_0x203355(0x170)}),a26_0x5b9635(Text,{'color':_0x203355(0x198),'children':_0x203355(0x177)}),a26_0x5b9635(Text,{'color':_0x203355(0x188),'children':_0x4f0547}),_0x422f74&&a26_0x996b1c(Text,{'color':_0x203355(0x18e),'children':[_0x203355(0x17a),_0x422f74]})]}),!_0x422f74&&a26_0x5b9635(Box,{'children':a26_0x996b1c(Text,{'color':_0x203355(0x198),'children':['\x20',_0x203355(0x15d)]})})]}),_0xbd384b==='login-check'&&a26_0x996b1c(Box,{'children':[a26_0x5b9635(Text,{'children':_0x203355(0x160)}),_0x53af95&&a26_0x5b9635(Text,{'color':_0x203355(0x198),'children':_0x203355(0x161)})]}),_0xbd384b===_0x203355(0x166)&&a26_0x996b1c(a26_0x17c1e6,{'children':[a26_0x5b9635(Box,{'children':a26_0x5b9635(Text,{'color':_0x203355(0x188),'children':_0x203355(0x192)})}),a26_0x5b9635(Box,{'marginTop':0x1,'children':a26_0x5b9635(Text,{'children':_0x203355(0x175)})}),a26_0x996b1c(Box,{'marginLeft':0x2,'children':[a26_0x996b1c(Text,{'color':_0x2b22f0===0x0?_0x203355(0x188):'gray','children':[_0x2b22f0===0x0?'▶\x20':'\x20\x20',_0x203355(0x163)]}),a26_0x5b9635(Text,{'children':'\x20'}),a26_0x996b1c(Text,{'color':_0x2b22f0===0x1?_0x203355(0x188):_0x203355(0x198),'children':[_0x2b22f0===0x1?'▶\x20':'\x20\x20','No']})]}),a26_0x5b9635(Box,{'children':a26_0x5b9635(Text,{'color':'gray','children':_0x203355(0x176)})}),a26_0x5b9635(Box,{'children':a26_0x5b9635(Text,{'color':_0x203355(0x17b),'children':_0x203355(0x181)})})]}),_0xbd384b===_0x203355(0x18b)&&a26_0x996b1c(a26_0x17c1e6,{'children':[a26_0x5b9635(Box,{'children':a26_0x5b9635(Text,{'color':'yellow','children':_0x203355(0x193)})}),a26_0x5b9635(Box,{'marginTop':0x1,'children':a26_0x5b9635(Text,{'children':_0x203355(0x189)})}),a26_0x996b1c(Box,{'marginLeft':0x2,'children':[a26_0x996b1c(Text,{'color':_0x276efe===0x0?_0x203355(0x188):_0x203355(0x198),'children':[_0x276efe===0x0?'▶\x20':'\x20\x20',_0x203355(0x163)]}),a26_0x5b9635(Text,{'children':'\x20'}),a26_0x996b1c(Text,{'color':_0x276efe===0x1?_0x203355(0x188):_0x203355(0x198),'children':[_0x276efe===0x1?'▶\x20':'\x20\x20','No']})]}),a26_0x5b9635(Box,{'children':a26_0x5b9635(Text,{'color':'gray','children':_0x203355(0x176)})}),a26_0x5b9635(Box,{'children':a26_0x5b9635(Text,{'color':_0x203355(0x17b),'children':_0x203355(0x16c)})})]}),_0xbd384b===_0x203355(0x182)&&a26_0x996b1c(Box,{'children':[a26_0x5b9635(Text,{'children':_0x203355(0x17c)}),_0x549674&&a26_0x5b9635(Text,{'color':_0x203355(0x198),'children':_0x203355(0x179)})]})]});}
@@ -1 +1 @@
1
- function a27_0x514e(_0xb9259b,_0x393ad4){const _0x594c9a=a27_0x594c();return a27_0x514e=function(_0x514ecd,_0x21af52){_0x514ecd=_0x514ecd-0x1c0;let _0x1be809=_0x594c9a[_0x514ecd];return _0x1be809;},a27_0x514e(_0xb9259b,_0x393ad4);}(function(_0x5228b8,_0x4783e0){const _0x4597d1=a27_0x514e,_0x4f7a49=_0x5228b8();while(!![]){try{const _0x474fe7=-parseInt(_0x4597d1(0x1c9))/0x1*(-parseInt(_0x4597d1(0x1ca))/0x2)+parseInt(_0x4597d1(0x1c1))/0x3+-parseInt(_0x4597d1(0x1cb))/0x4+parseInt(_0x4597d1(0x1c2))/0x5*(-parseInt(_0x4597d1(0x1c7))/0x6)+parseInt(_0x4597d1(0x1c0))/0x7*(-parseInt(_0x4597d1(0x1c3))/0x8)+-parseInt(_0x4597d1(0x1c6))/0x9+parseInt(_0x4597d1(0x1c4))/0xa;if(_0x474fe7===_0x4783e0)break;else _0x4f7a49['push'](_0x4f7a49['shift']());}catch(_0x49c09c){_0x4f7a49['push'](_0x4f7a49['shift']());}}}(a27_0x594c,0xa97bd));export function formatElapsed(_0x4cfe1d){const _0x4b6140=a27_0x514e,_0x505558=Date[_0x4b6140(0x1c5)]()-_0x4cfe1d;if(_0x505558<0x3e8)return _0x505558+'ms';const _0x3cb69b=(_0x505558/0x3e8)['toFixed'](0x2),_0x83cbf9=_0x3cb69b[_0x4b6140(0x1c8)](/\.?0+$/u,'');return _0x83cbf9+'s';}function a27_0x594c(){const _0x14b2d6=['21745020eicXkb','now','12469914WpHhjJ','18TqvAXr','replace','265shCFwN','4710monQsG','2753216iSrIKt','21dWEmCU','3721977beDGSi','24715ykdeLM','3350272ZxzhXQ'];a27_0x594c=function(){return _0x14b2d6;};return a27_0x594c();}
1
+ function a27_0x1cad(){const _0x9a8c30=['13878nHFVEg','22977053mXuIFj','174830pwePGV','62104mCfhNw','12158HesEFU','123IrXvZm','replace','5849020vedhtY','now','2023nKVmQc','315buTqOF','31112ZdPQtY','149iqsTxK','toFixed'];a27_0x1cad=function(){return _0x9a8c30;};return a27_0x1cad();}function a27_0x5ee2(_0x4d2129,_0x414d43){const _0x1cad0b=a27_0x1cad();return a27_0x5ee2=function(_0x5ee210,_0x52437f){_0x5ee210=_0x5ee210-0x176;let _0x10625a=_0x1cad0b[_0x5ee210];return _0x10625a;},a27_0x5ee2(_0x4d2129,_0x414d43);}(function(_0x41ff15,_0x468d5b){const _0x5d812d=a27_0x5ee2,_0x2dd39d=_0x41ff15();while(!![]){try{const _0x4e5864=-parseInt(_0x5d812d(0x17c))/0x1*(parseInt(_0x5d812d(0x182))/0x2)+parseInt(_0x5d812d(0x183))/0x3*(parseInt(_0x5d812d(0x17b))/0x4)+-parseInt(_0x5d812d(0x177))/0x5+parseInt(_0x5d812d(0x17e))/0x6*(parseInt(_0x5d812d(0x179))/0x7)+-parseInt(_0x5d812d(0x181))/0x8*(parseInt(_0x5d812d(0x17a))/0x9)+parseInt(_0x5d812d(0x180))/0xa+parseInt(_0x5d812d(0x17f))/0xb;if(_0x4e5864===_0x468d5b)break;else _0x2dd39d['push'](_0x2dd39d['shift']());}catch(_0x246c0e){_0x2dd39d['push'](_0x2dd39d['shift']());}}}(a27_0x1cad,0xb638d));export function formatElapsed(_0x3c818d){const _0x39140d=a27_0x5ee2,_0x447765=Date[_0x39140d(0x178)]()-_0x3c818d;if(_0x447765<0x3e8)return _0x447765+'ms';const _0x2bcc81=(_0x447765/0x3e8)[_0x39140d(0x17d)](0x2),_0x53f480=_0x2bcc81[_0x39140d(0x176)](/\.?0+$/u,'');return _0x53f480+'s';}
@@ -1 +1 @@
1
- (function(_0xae6694,_0x4c6d1e){const _0x48d906=a28_0x47dd,_0x558224=_0xae6694();while(!![]){try{const _0x3b5448=-parseInt(_0x48d906(0xcd))/0x1*(parseInt(_0x48d906(0xd4))/0x2)+-parseInt(_0x48d906(0x95))/0x3+parseInt(_0x48d906(0xb8))/0x4*(-parseInt(_0x48d906(0x98))/0x5)+-parseInt(_0x48d906(0xe4))/0x6+-parseInt(_0x48d906(0x8a))/0x7*(-parseInt(_0x48d906(0xa1))/0x8)+parseInt(_0x48d906(0xb0))/0x9+parseInt(_0x48d906(0xcb))/0xa;if(_0x3b5448===_0x4c6d1e)break;else _0x558224['push'](_0x558224['shift']());}catch(_0x46efdf){_0x558224['push'](_0x558224['shift']());}}}(a28_0x20ee,0x6d377));import{jsx as a28_0x29bf3f,Fragment as a28_0x2f4ba1,jsxs as a28_0x5724bd}from'react/jsx-runtime';import a28_0x21384f from'node:path';import a28_0x16d927 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';function a28_0x47dd(_0x43b211,_0x2572c0){const _0x20eee4=a28_0x20ee();return a28_0x47dd=function(_0x47dda6,_0x29c947){_0x47dda6=_0x47dda6-0x8a;let _0x2d43e9=_0x20eee4[_0x47dda6];return _0x2d43e9;},a28_0x47dd(_0x43b211,_0x2572c0);}import{readConfig}from'../utils/config.js';function a28_0x20ee(){const _0x4c892d=['cd\x20','743403UcUWRS','stringify','lovrabet\x20api\x20pull','175085vdhdaI','accessSync','resolve','white','2.\x20','√\x20配置文件已创建,可稍后使用\x20\x27lovrabet\x20config\x20set\x20app\x20<app-code>\x27\x20配置','清理项目目录失败:\x20','*\x20正在为项目\x20','📁\x20项目名称:\x20','24MtMfdd','×\x20项目创建失败:\x20','×\x20无法在当前目录创建项目,请检查目录权限','appCode','\x20&&\x20lovrabet\x20start','需手动拉取','version','\x20|\x20应用AppCode:\x20','项目创建完成:\x20','writeFileSync','.lovrabetrc','项目创建失败:\x20','\x20√\x20','../..','×\x20项目目录\x20','2351502zevWeZ','length','yellow','gray','constants','readFileSync','rmSync','*\x20正在拉取\x20API\x20配置...','68DoeDSH','配置应用AppCode:\x20','message','🎉\x20项目创建成功!','cyan','\x20已存在,请使用其他项目名','error','utf8','3.\x20','green','trim','📦\x20API配置:\x20','package.json','配置应用AppCode失败:\x20','column','API\x20配置拉取失败:\x20','success','项目名称:\x20','pullApi','9973170OMtIXj','lovrabet\x20config\x20set\x20app\x20[app-code]','4554LZITTP','!\x20API\x20配置拉取异常,项目已创建,可稍后手动执行:\x20lovrabet\x20api\x20pull','开始创建项目:\x20','log','repeat','配置AppCode:\x20','API\x20配置拉取异常:\x20','236boELbc','cwd','info','projectCode','dirname','warn','join','url','existsSync','projectName','1.\x20','\x20创建配置文件','env','toLocaleString','test','🔗\x20应用AppCode:\x20','160140nDQnpe','拉取API配置:\x20','parse','1390452dWWXKC','string','1.0.0','create','doTask','×\x20项目名不能为空','setLogPath','*\x20清理失败的项目目录:\x20','*\x20配置文件路径:\x20','√\x20API\x20配置拉取完成'];a28_0x20ee=function(){return _0x4c892d;};return a28_0x20ee();}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(_0x31756d){const _0x3e294a=a28_0x47dd,[_0x2e6429,_0x37c7c2]=useState(![]),[_0x21807e,_0x5380f2]=useState(![]),[_0xa7b15d,_0x517e67]=useState(null),_0x2890c1=useCopyProjectTemplate(),_0x90a6e=useInstallDependencies(),_0x27989f=useFormatCode(),_0x22ea64=async _0x4d282f=>{const _0x50022a=a28_0x47dd;if(!_0x4d282f['projectName']||_0x4d282f['projectName'][_0x50022a(0xc2)]()===''){console['error'](_0x50022a(0x8f));return;}const _0x1953d1=/[<>:"|?*\x00-\x1f\x7f]/;if(_0x1953d1[_0x50022a(0xe2)](_0x4d282f[_0x50022a(0xdd)])){console['error']('×\x20项目名包含非法字符,不允许使用:\x20<\x20>\x20:\x20\x22\x20|\x20?\x20*\x20及控制字符');return;}if(_0x4d282f[_0x50022a(0xdd)][_0x50022a(0xb1)]>0x64){console[_0x50022a(0xbe)]('×\x20项目名过长,最多支持\x20100\x20个字符');return;}const _0x39423c=a28_0x21384f['resolve'](process['cwd'](),_0x4d282f[_0x50022a(0xdd)]);if(a28_0x16d927[_0x50022a(0xdc)](_0x39423c)){console[_0x50022a(0xbe)](_0x50022a(0xaf)+_0x4d282f[_0x50022a(0xdd)]+_0x50022a(0xbd));return;}try{const _0x5b888e=a28_0x21384f[_0x50022a(0xd8)](_0x39423c);a28_0x16d927[_0x50022a(0x99)](_0x5b888e,a28_0x16d927[_0x50022a(0xb4)]['W_OK']);}catch(_0x279d77){console['error'](_0x50022a(0xa3));return;}_0x517e67(_0x4d282f),_0x37c7c2(!![]),logger[_0x50022a(0x90)](_0x39423c),logger[_0x50022a(0xd6)](_0x50022a(0x8d),_0x50022a(0xcf)+_0x4d282f[_0x50022a(0xdd)],{'projectDir':_0x39423c,'appCode':_0x4d282f[_0x50022a(0xa4)]});try{await _0x2890c1[_0x50022a(0x8e)](_0x4d282f[_0x50022a(0xdd)]),await _0x90a6e[_0x50022a(0x8e)](_0x4d282f[_0x50022a(0xdd)]),await _0x27989f['doTask'](_0x4d282f['projectName']),await _0x3a33a7(_0x4d282f[_0x50022a(0xdd)],_0x4d282f[_0x50022a(0xa4)]||'',_0x4d282f['env']);if(_0x4d282f[_0x50022a(0xca)]&&_0x4d282f['appCode']){console[_0x50022a(0xd0)](_0x50022a(0xb7));try{const _0x8fff23=await pullApiSilent(_0x4d282f['appCode'],undefined,_0x39423c,_0x4d282f[_0x50022a(0xe0)]);_0x8fff23?(console[_0x50022a(0xd0)](_0x50022a(0x93)),logger[_0x50022a(0xd6)](_0x50022a(0x8d),'API\x20配置拉取成功:\x20'+_0x4d282f[_0x50022a(0xa4)],{'projectDir':_0x39423c,'appCode':_0x4d282f['appCode'],'env':_0x4d282f['env']})):(console[_0x50022a(0xd0)]('!\x20API\x20配置拉取失败,可稍后手动执行:\x20lovrabet\x20api\x20pull'),logger[_0x50022a(0xd9)](_0x50022a(0x8d),_0x50022a(0xc7)+_0x4d282f[_0x50022a(0xa4)],{'projectDir':_0x39423c,'appCode':_0x4d282f['appCode'],'env':_0x4d282f['env']}));}catch(_0x38fcbe){console[_0x50022a(0xd0)](_0x50022a(0xce)),logger[_0x50022a(0xd9)](_0x50022a(0x8d),_0x50022a(0xd3)+_0x4d282f[_0x50022a(0xa4)],{'projectDir':_0x39423c,'appCode':_0x4d282f['appCode'],'env':_0x4d282f[_0x50022a(0xe0)],'error':_0x38fcbe instanceof Error?_0x38fcbe['message']:String(_0x38fcbe)});}}logger[_0x50022a(0xc8)](_0x50022a(0x8d),_0x50022a(0xa9)+_0x4d282f[_0x50022a(0xdd)]),_0x5380f2(!![]),_0x37c7c2(![]);}catch(_0x2fd397){logger[_0x50022a(0xbe)](_0x50022a(0x8d),_0x50022a(0xac)+_0x4d282f[_0x50022a(0xdd)],{'error':_0x2fd397 instanceof Error?_0x2fd397[_0x50022a(0xba)]:String(_0x2fd397)});try{a28_0x16d927[_0x50022a(0xdc)](_0x39423c)&&(console[_0x50022a(0xd0)](_0x50022a(0x91)+_0x39423c),a28_0x16d927[_0x50022a(0xb6)](_0x39423c,{'recursive':!![],'force':!![]}));}catch(_0x1597c2){logger[_0x50022a(0xd9)](_0x50022a(0x8d),_0x50022a(0x9e)+_0x39423c,{'error':_0x1597c2 instanceof Error?_0x1597c2[_0x50022a(0xba)]:String(_0x1597c2)});}_0x37c7c2(![]),console[_0x50022a(0xbe)](_0x50022a(0xa2)+(_0x2fd397 instanceof Error?_0x2fd397[_0x50022a(0xba)]:String(_0x2fd397)));}},_0x2e0767=async _0x274ae9=>{const _0x2e1e77=a28_0x47dd;await _0x22ea64({'projectName':_0x274ae9,'env':_0x31756d[_0x2e1e77(0xe0)]});},_0x3a33a7=async(_0x4e46bd,_0x170142,_0x57b047)=>{const _0x4a6668=a28_0x47dd,_0x5df1ff=a28_0x21384f['resolve'](process[_0x4a6668(0xd5)](),_0x4e46bd),_0x126842=a28_0x21384f['join'](_0x5df1ff,_0x4a6668(0xab));try{_0x170142?console['log'](_0x4a6668(0x9f)+_0x4e46bd+'\x20配置应用AppCode:\x20'+_0x170142):console[_0x4a6668(0xd0)](_0x4a6668(0x9f)+_0x4e46bd+_0x4a6668(0xdf));console[_0x4a6668(0xd0)](_0x4a6668(0x92)+_0x126842);const _0x2a599c=fileURLToPath(import.meta[_0x4a6668(0xdb)]),_0x54c6d0=a28_0x21384f[_0x4a6668(0x9a)](a28_0x21384f[_0x4a6668(0xd8)](_0x2a599c),_0x4a6668(0xae)),_0x391872=a28_0x21384f[_0x4a6668(0xda)](_0x54c6d0,_0x4a6668(0xc4));let _0x2cbbce=_0x4a6668(0x8c);try{const _0x3fa74f=JSON[_0x4a6668(0xe6)](a28_0x16d927[_0x4a6668(0xb5)](_0x391872,_0x4a6668(0xbf)));_0x2cbbce=_0x3fa74f[_0x4a6668(0xa7)]||_0x4a6668(0x8c);}catch(_0x1e41ce){}const _0x3fc99f=readConfig(),_0x675a7a=typeof _0x3fc99f[_0x4a6668(0xe0)]===_0x4a6668(0x8b)?_0x3fc99f[_0x4a6668(0xe0)]:undefined,_0x117c11={..._0x3fc99f,'app':_0x170142||'','env':_0x57b047||_0x675a7a||'online','createdAt':new Date()[_0x4a6668(0xe1)](),'version':_0x2cbbce};a28_0x16d927[_0x4a6668(0xaa)](_0x126842,JSON[_0x4a6668(0x96)](_0x117c11,null,0x2),_0x4a6668(0xbf)),_0x170142?console[_0x4a6668(0xd0)]('√\x20配置文件已创建,应用AppCode:\x20'+_0x170142):console[_0x4a6668(0xd0)](_0x4a6668(0x9d)),logger['info'](_0x4a6668(0x8d),_0x4a6668(0xb9)+_0x170142,{'projectName':_0x4e46bd,'configFile':'.lovrabetrc'});}catch(_0x4b77bd){logger[_0x4a6668(0xbe)]('create',_0x4a6668(0xc5)+_0x170142,{'projectName':_0x4e46bd,'error':_0x4b77bd instanceof Error?_0x4b77bd[_0x4a6668(0xba)]:String(_0x4b77bd)});}};useEffect(()=>{_0x31756d['projectCode']&&_0x2e0767(_0x31756d['projectCode']);},[_0x31756d[_0x3e294a(0xd7)]]);if(!_0x2e6429&&!_0x21807e&&!_0x31756d[_0x3e294a(0xd7)])return a28_0x29bf3f(EnhancedGuidedCreate,{'onCreate':_0x22ea64,'env':_0x31756d[_0x3e294a(0xe0)]});if(_0x2e6429)return a28_0x5724bd(a28_0x2f4ba1,{'children':[a28_0x5724bd(Box,{'marginTop':0x1,'children':[a28_0x29bf3f(Box,{'width':'1'}),a28_0x29bf3f(Text,{'color':'green','children':_0x3e294a(0xad)}),a28_0x29bf3f(Text,{'children':'项目名称:\x20'}),a28_0x29bf3f(Text,{'color':'green','children':_0xa7b15d?.[_0x3e294a(0xdd)]}),_0xa7b15d?.['appCode']&&a28_0x5724bd(a28_0x2f4ba1,{'children':[a28_0x29bf3f(Text,{'children':_0x3e294a(0xa8)}),a28_0x29bf3f(Text,{'color':_0x3e294a(0xbc),'children':_0xa7b15d[_0x3e294a(0xa4)]})]})]}),a28_0x29bf3f(TaskRunning,{..._0x2890c1}),a28_0x29bf3f(TaskRunning,{..._0x90a6e}),a28_0x29bf3f(TaskRunning,{..._0x27989f})]});if(_0x21807e)return a28_0x5724bd(a28_0x2f4ba1,{'children':[a28_0x5724bd(Box,{'marginTop':0x1,'children':[a28_0x29bf3f(Box,{'width':'1'}),a28_0x29bf3f(Text,{'color':_0x3e294a(0xc1),'children':_0x3e294a(0xad)}),a28_0x29bf3f(Text,{'children':_0x3e294a(0xc9)}),a28_0x29bf3f(Text,{'color':'green','children':_0xa7b15d?.[_0x3e294a(0xdd)]}),_0xa7b15d?.[_0x3e294a(0xa4)]&&a28_0x5724bd(a28_0x2f4ba1,{'children':[a28_0x29bf3f(Text,{'children':_0x3e294a(0xa8)}),a28_0x29bf3f(Text,{'color':_0x3e294a(0xbc),'children':_0xa7b15d[_0x3e294a(0xa4)]})]})]}),a28_0x29bf3f(TaskFinished,{..._0x2890c1}),a28_0x29bf3f(TaskFinished,{..._0x90a6e}),a28_0x29bf3f(TaskFinished,{..._0x27989f}),a28_0x29bf3f(Box,{'marginTop':0x1,'marginBottom':0x1,'children':a28_0x29bf3f(Text,{'color':_0x3e294a(0xc1),'children':'─'[_0x3e294a(0xd1)](0x3c)})}),a28_0x29bf3f(Box,{'children':a28_0x29bf3f(Text,{'color':'green','bold':!![],'children':_0x3e294a(0xbb)})}),a28_0x5724bd(Box,{'marginTop':0x1,'flexDirection':'column','children':[a28_0x5724bd(Box,{'children':[a28_0x29bf3f(Text,{'color':_0x3e294a(0xbc),'children':_0x3e294a(0xa0)}),a28_0x29bf3f(Text,{'color':_0x3e294a(0x9b),'bold':!![],'children':_0xa7b15d?.[_0x3e294a(0xdd)]})]}),_0xa7b15d?.[_0x3e294a(0xa4)]&&a28_0x5724bd(Box,{'children':[a28_0x29bf3f(Text,{'color':_0x3e294a(0xbc),'children':_0x3e294a(0xe3)}),a28_0x29bf3f(Text,{'color':_0x3e294a(0x9b),'bold':!![],'children':_0xa7b15d[_0x3e294a(0xa4)]})]}),a28_0x5724bd(Box,{'children':[a28_0x29bf3f(Text,{'color':_0x3e294a(0xbc),'children':_0x3e294a(0xc3)}),_0xa7b15d?.['pullApi']?a28_0x29bf3f(Text,{'color':_0x3e294a(0xc1),'bold':!![],'children':'已自动拉取\x20✓'}):_0xa7b15d?.['appCode']?a28_0x29bf3f(Text,{'color':_0x3e294a(0xb2),'bold':!![],'children':_0x3e294a(0xa6)}):a28_0x29bf3f(Text,{'color':_0x3e294a(0xb3),'bold':!![],'children':'未配置'})]})]}),a28_0x29bf3f(Box,{'marginTop':0x1,'marginBottom':0x1,'children':a28_0x29bf3f(Text,{'color':_0x3e294a(0xbc),'bold':!![],'children':'🚀\x20接下来可以:'})}),a28_0x5724bd(Box,{'marginLeft':0x2,'flexDirection':_0x3e294a(0xc6),'children':[a28_0x5724bd(Box,{'children':[a28_0x29bf3f(Text,{'color':_0x3e294a(0xc1),'children':_0x3e294a(0xde)}),a28_0x29bf3f(Text,{'color':_0x3e294a(0x9b),'children':'启动项目:\x20'}),a28_0x29bf3f(Text,{'color':_0x3e294a(0xbc),'bold':!![],'children':_0x3e294a(0x94)+_0xa7b15d?.[_0x3e294a(0xdd)]+_0x3e294a(0xa5)})]}),_0xa7b15d?.[_0x3e294a(0xa4)]&&!_0xa7b15d?.['pullApi']&&a28_0x5724bd(Box,{'children':[a28_0x29bf3f(Text,{'color':_0x3e294a(0xb2),'children':_0x3e294a(0x9c)}),a28_0x29bf3f(Text,{'color':'white','children':'拉取API配置:\x20'}),a28_0x29bf3f(Text,{'color':_0x3e294a(0xbc),'bold':!![],'children':_0x3e294a(0x97)})]}),!_0xa7b15d?.['appCode']&&a28_0x5724bd(a28_0x2f4ba1,{'children':[a28_0x5724bd(Box,{'children':[a28_0x29bf3f(Text,{'color':_0x3e294a(0xb3),'children':'2.\x20'}),a28_0x29bf3f(Text,{'color':_0x3e294a(0x9b),'children':_0x3e294a(0xd2)}),a28_0x29bf3f(Text,{'color':_0x3e294a(0xbc),'bold':!![],'children':_0x3e294a(0xcc)})]}),a28_0x5724bd(Box,{'children':[a28_0x29bf3f(Text,{'color':'gray','children':_0x3e294a(0xc0)}),a28_0x29bf3f(Text,{'color':_0x3e294a(0x9b),'children':_0x3e294a(0xe5)}),a28_0x29bf3f(Text,{'color':_0x3e294a(0xbc),'bold':!![],'children':'lovrabet\x20api\x20pull\x20[app-code]'})]})]})]}),a28_0x29bf3f(Box,{'marginTop':0x1,'children':a28_0x29bf3f(Text,{'color':'green','children':'─'[_0x3e294a(0xd1)](0x3c)})})]});return null;}
1
+ (function(_0xac6c20,_0x32e368){const _0x51d88b=a28_0x2ca5,_0x18036b=_0xac6c20();while(!![]){try{const _0x72c661=-parseInt(_0x51d88b(0xd2))/0x1*(-parseInt(_0x51d88b(0x10b))/0x2)+parseInt(_0x51d88b(0xe3))/0x3+-parseInt(_0x51d88b(0x100))/0x4*(parseInt(_0x51d88b(0xd3))/0x5)+parseInt(_0x51d88b(0x106))/0x6*(parseInt(_0x51d88b(0x10d))/0x7)+parseInt(_0x51d88b(0xda))/0x8+parseInt(_0x51d88b(0xe6))/0x9*(-parseInt(_0x51d88b(0xdb))/0xa)+-parseInt(_0x51d88b(0xe0))/0xb;if(_0x72c661===_0x32e368)break;else _0x18036b['push'](_0x18036b['shift']());}catch(_0x5ac2ee){_0x18036b['push'](_0x18036b['shift']());}}}(a28_0x198a,0x46320));import{jsx as a28_0x7caf05,Fragment as a28_0x23e781,jsxs as a28_0x586d84}from'react/jsx-runtime';import a28_0x972927 from'node:path';import a28_0x438b3f from'node:fs';import{fileURLToPath}from'node:url';import{Box,Text}from'ink';function a28_0x2ca5(_0x580fe8,_0x1dc27b){const _0x198abd=a28_0x198a();return a28_0x2ca5=function(_0x2ca55f,_0x3ae685){_0x2ca55f=_0x2ca55f-0xc9;let _0x83980e=_0x198abd[_0x2ca55f];return _0x83980e;},a28_0x2ca5(_0x580fe8,_0x1dc27b);}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';function a28_0x198a(){const _0x397946=['\x20√\x20','string','配置AppCode:\x20','online','×\x20项目名不能为空','🔗\x20应用AppCode:\x20','√\x20配置文件已创建,可稍后使用\x20\x27lovrabet\x20config\x20set\x20app\x20<app-code>\x27\x20配置','√\x20配置文件已创建,应用AppCode:\x20','1NVhvuR','15commzh','\x20已存在,请使用其他项目名','cwd','create','API\x20配置拉取异常:\x20','项目创建失败:\x20','*\x20正在为项目\x20','3460312SEHVuT','811740xZMCda','yellow','配置应用AppCode失败:\x20','trim','constants','5022886ySgECB','writeFileSync','启动项目:\x20','878244xoFvXe','stringify','🎉\x20项目创建成功!','18DlMyva','projectCode','readFileSync','项目创建完成:\x20','\x20|\x20应用AppCode:\x20','parse','log','已自动拉取\x20✓','green','dirname','repeat','.lovrabetrc','join','lovrabet\x20config\x20set\x20app\x20[app-code]','doTask','utf8','resolve','projectName','*\x20配置文件路径:\x20','API\x20配置拉取成功:\x20','×\x20项目目录\x20','setLogPath','🚀\x20接下来可以:','2.\x20','info','warn','329036niZKqU','配置应用AppCode:\x20','lovrabet\x20api\x20pull','!\x20API\x20配置拉取异常,项目已创建,可稍后手动执行:\x20lovrabet\x20api\x20pull','×\x20项目名包含非法字符,不允许使用:\x20<\x20>\x20:\x20\x22\x20|\x20?\x20*\x20及控制字符','env','66ezKhbN','appCode','1.0.0','gray','error','32530ArinRU','column','262003DwZFNi','\x20配置应用AppCode:\x20','1.\x20','*\x20清理失败的项目目录:\x20','white','version','test','package.json','\x20创建配置文件','×\x20项目名过长,最多支持\x20100\x20个字符','url','API\x20配置拉取失败:\x20','拉取API配置:\x20','3.\x20','×\x20无法在当前目录创建项目,请检查目录权限','未配置','message','pullApi','📁\x20项目名称:\x20','success','toLocaleString','项目名称:\x20','*\x20正在拉取\x20API\x20配置...','cyan','rmSync','existsSync','📦\x20API配置:\x20'];a28_0x198a=function(){return _0x397946;};return a28_0x198a();}import{TaskRunning}from'./task-running.js';import{logger}from'../utils/logger.js';export function CreateApp(_0x816185){const _0x4727f9=a28_0x2ca5,[_0x54ff8f,_0x393b2c]=useState(![]),[_0x2db1da,_0x5de6a6]=useState(![]),[_0x846f7,_0x3653d0]=useState(null),_0x358d1c=useCopyProjectTemplate(),_0x1e7feb=useInstallDependencies(),_0x19c31e=useFormatCode(),_0x31dc34=async _0x462dbe=>{const _0x5f049a=a28_0x2ca5;if(!_0x462dbe[_0x5f049a(0xf7)]||_0x462dbe[_0x5f049a(0xf7)][_0x5f049a(0xde)]()===''){console[_0x5f049a(0x10a)](_0x5f049a(0xce));return;}const _0x5159f1=/[<>:"|?*\x00-\x1f\x7f]/;if(_0x5159f1[_0x5f049a(0x113)](_0x462dbe['projectName'])){console['error'](_0x5f049a(0x104));return;}if(_0x462dbe[_0x5f049a(0xf7)]['length']>0x64){console['error'](_0x5f049a(0x116));return;}const _0xc9218c=a28_0x972927[_0x5f049a(0xf6)](process['cwd'](),_0x462dbe[_0x5f049a(0xf7)]);if(a28_0x438b3f[_0x5f049a(0x126)](_0xc9218c)){console[_0x5f049a(0x10a)](_0x5f049a(0xfa)+_0x462dbe['projectName']+_0x5f049a(0xd4));return;}try{const _0xada8ca=a28_0x972927['dirname'](_0xc9218c);a28_0x438b3f['accessSync'](_0xada8ca,a28_0x438b3f[_0x5f049a(0xdf)]['W_OK']);}catch(_0x56d018){console[_0x5f049a(0x10a)](_0x5f049a(0x11b));return;}_0x3653d0(_0x462dbe),_0x393b2c(!![]),logger[_0x5f049a(0xfb)](_0xc9218c),logger[_0x5f049a(0xfe)](_0x5f049a(0xd6),'开始创建项目:\x20'+_0x462dbe[_0x5f049a(0xf7)],{'projectDir':_0xc9218c,'appCode':_0x462dbe[_0x5f049a(0x107)]});try{await _0x358d1c[_0x5f049a(0xf4)](_0x462dbe[_0x5f049a(0xf7)]),await _0x1e7feb[_0x5f049a(0xf4)](_0x462dbe['projectName']),await _0x19c31e['doTask'](_0x462dbe[_0x5f049a(0xf7)]),await _0x26d741(_0x462dbe[_0x5f049a(0xf7)],_0x462dbe[_0x5f049a(0x107)]||'',_0x462dbe['env']);if(_0x462dbe[_0x5f049a(0x11e)]&&_0x462dbe[_0x5f049a(0x107)]){console[_0x5f049a(0xec)](_0x5f049a(0x123));try{const _0x42adb7=await pullApiSilent(_0x462dbe['appCode'],undefined,_0xc9218c,_0x462dbe[_0x5f049a(0x105)]);_0x42adb7?(console[_0x5f049a(0xec)]('√\x20API\x20配置拉取完成'),logger['info']('create',_0x5f049a(0xf9)+_0x462dbe[_0x5f049a(0x107)],{'projectDir':_0xc9218c,'appCode':_0x462dbe[_0x5f049a(0x107)],'env':_0x462dbe[_0x5f049a(0x105)]})):(console[_0x5f049a(0xec)]('!\x20API\x20配置拉取失败,可稍后手动执行:\x20lovrabet\x20api\x20pull'),logger['warn']('create',_0x5f049a(0x118)+_0x462dbe[_0x5f049a(0x107)],{'projectDir':_0xc9218c,'appCode':_0x462dbe[_0x5f049a(0x107)],'env':_0x462dbe[_0x5f049a(0x105)]}));}catch(_0x55ef3b){console[_0x5f049a(0xec)](_0x5f049a(0x103)),logger[_0x5f049a(0xff)](_0x5f049a(0xd6),_0x5f049a(0xd7)+_0x462dbe[_0x5f049a(0x107)],{'projectDir':_0xc9218c,'appCode':_0x462dbe[_0x5f049a(0x107)],'env':_0x462dbe[_0x5f049a(0x105)],'error':_0x55ef3b instanceof Error?_0x55ef3b[_0x5f049a(0x11d)]:String(_0x55ef3b)});}}logger[_0x5f049a(0x120)](_0x5f049a(0xd6),_0x5f049a(0xe9)+_0x462dbe['projectName']),_0x5de6a6(!![]),_0x393b2c(![]);}catch(_0x2351e9){logger[_0x5f049a(0x10a)]('create',_0x5f049a(0xd8)+_0x462dbe[_0x5f049a(0xf7)],{'error':_0x2351e9 instanceof Error?_0x2351e9[_0x5f049a(0x11d)]:String(_0x2351e9)});try{a28_0x438b3f['existsSync'](_0xc9218c)&&(console[_0x5f049a(0xec)](_0x5f049a(0x110)+_0xc9218c),a28_0x438b3f[_0x5f049a(0x125)](_0xc9218c,{'recursive':!![],'force':!![]}));}catch(_0x8b6006){logger[_0x5f049a(0xff)]('create','清理项目目录失败:\x20'+_0xc9218c,{'error':_0x8b6006 instanceof Error?_0x8b6006['message']:String(_0x8b6006)});}_0x393b2c(![]),console['error']('×\x20项目创建失败:\x20'+(_0x2351e9 instanceof Error?_0x2351e9['message']:String(_0x2351e9)));}},_0x10d94e=async _0x1fa17a=>{const _0xa61c40=a28_0x2ca5;await _0x31dc34({'projectName':_0x1fa17a,'env':_0x816185[_0xa61c40(0x105)]});},_0x26d741=async(_0x2d8ed1,_0x5ba7f4,_0x409734)=>{const _0x12f0c0=a28_0x2ca5,_0xcdf012=a28_0x972927[_0x12f0c0(0xf6)](process[_0x12f0c0(0xd5)](),_0x2d8ed1),_0x3fed19=a28_0x972927[_0x12f0c0(0xf2)](_0xcdf012,_0x12f0c0(0xf1));try{_0x5ba7f4?console[_0x12f0c0(0xec)](_0x12f0c0(0xd9)+_0x2d8ed1+_0x12f0c0(0x10e)+_0x5ba7f4):console['log'](_0x12f0c0(0xd9)+_0x2d8ed1+_0x12f0c0(0x115));console[_0x12f0c0(0xec)](_0x12f0c0(0xf8)+_0x3fed19);const _0x577adb=fileURLToPath(import.meta[_0x12f0c0(0x117)]),_0x37f757=a28_0x972927[_0x12f0c0(0xf6)](a28_0x972927[_0x12f0c0(0xef)](_0x577adb),'../..'),_0x48cfbc=a28_0x972927[_0x12f0c0(0xf2)](_0x37f757,_0x12f0c0(0x114));let _0x136249=_0x12f0c0(0x108);try{const _0x123b7f=JSON[_0x12f0c0(0xeb)](a28_0x438b3f[_0x12f0c0(0xe8)](_0x48cfbc,_0x12f0c0(0xf5)));_0x136249=_0x123b7f[_0x12f0c0(0x112)]||_0x12f0c0(0x108);}catch(_0x343471){}const _0x238990=readConfig(),_0x2ab63b=typeof _0x238990[_0x12f0c0(0x105)]===_0x12f0c0(0xcb)?_0x238990[_0x12f0c0(0x105)]:undefined,_0x5eec83={..._0x238990,'app':_0x5ba7f4||'','env':_0x409734||_0x2ab63b||_0x12f0c0(0xcd),'createdAt':new Date()[_0x12f0c0(0x121)](),'version':_0x136249};a28_0x438b3f[_0x12f0c0(0xe1)](_0x3fed19,JSON[_0x12f0c0(0xe4)](_0x5eec83,null,0x2),_0x12f0c0(0xf5)),_0x5ba7f4?console[_0x12f0c0(0xec)](_0x12f0c0(0xd1)+_0x5ba7f4):console['log'](_0x12f0c0(0xd0)),logger[_0x12f0c0(0xfe)](_0x12f0c0(0xd6),_0x12f0c0(0x101)+_0x5ba7f4,{'projectName':_0x2d8ed1,'configFile':'.lovrabetrc'});}catch(_0xf9f080){logger[_0x12f0c0(0x10a)](_0x12f0c0(0xd6),_0x12f0c0(0xdd)+_0x5ba7f4,{'projectName':_0x2d8ed1,'error':_0xf9f080 instanceof Error?_0xf9f080[_0x12f0c0(0x11d)]:String(_0xf9f080)});}};useEffect(()=>{const _0x1eb929=a28_0x2ca5;_0x816185[_0x1eb929(0xe7)]&&_0x10d94e(_0x816185[_0x1eb929(0xe7)]);},[_0x816185[_0x4727f9(0xe7)]]);if(!_0x54ff8f&&!_0x2db1da&&!_0x816185[_0x4727f9(0xe7)])return a28_0x7caf05(EnhancedGuidedCreate,{'onCreate':_0x31dc34,'env':_0x816185[_0x4727f9(0x105)]});if(_0x54ff8f)return a28_0x586d84(a28_0x23e781,{'children':[a28_0x586d84(Box,{'marginTop':0x1,'children':[a28_0x7caf05(Box,{'width':'1'}),a28_0x7caf05(Text,{'color':_0x4727f9(0xee),'children':_0x4727f9(0xca)}),a28_0x7caf05(Text,{'children':'项目名称:\x20'}),a28_0x7caf05(Text,{'color':_0x4727f9(0xee),'children':_0x846f7?.[_0x4727f9(0xf7)]}),_0x846f7?.[_0x4727f9(0x107)]&&a28_0x586d84(a28_0x23e781,{'children':[a28_0x7caf05(Text,{'children':_0x4727f9(0xea)}),a28_0x7caf05(Text,{'color':'cyan','children':_0x846f7[_0x4727f9(0x107)]})]})]}),a28_0x7caf05(TaskRunning,{..._0x358d1c}),a28_0x7caf05(TaskRunning,{..._0x1e7feb}),a28_0x7caf05(TaskRunning,{..._0x19c31e})]});if(_0x2db1da)return a28_0x586d84(a28_0x23e781,{'children':[a28_0x586d84(Box,{'marginTop':0x1,'children':[a28_0x7caf05(Box,{'width':'1'}),a28_0x7caf05(Text,{'color':_0x4727f9(0xee),'children':_0x4727f9(0xca)}),a28_0x7caf05(Text,{'children':_0x4727f9(0x122)}),a28_0x7caf05(Text,{'color':_0x4727f9(0xee),'children':_0x846f7?.[_0x4727f9(0xf7)]}),_0x846f7?.['appCode']&&a28_0x586d84(a28_0x23e781,{'children':[a28_0x7caf05(Text,{'children':_0x4727f9(0xea)}),a28_0x7caf05(Text,{'color':'cyan','children':_0x846f7[_0x4727f9(0x107)]})]})]}),a28_0x7caf05(TaskFinished,{..._0x358d1c}),a28_0x7caf05(TaskFinished,{..._0x1e7feb}),a28_0x7caf05(TaskFinished,{..._0x19c31e}),a28_0x7caf05(Box,{'marginTop':0x1,'marginBottom':0x1,'children':a28_0x7caf05(Text,{'color':'green','children':'─'[_0x4727f9(0xf0)](0x3c)})}),a28_0x7caf05(Box,{'children':a28_0x7caf05(Text,{'color':_0x4727f9(0xee),'bold':!![],'children':_0x4727f9(0xe5)})}),a28_0x586d84(Box,{'marginTop':0x1,'flexDirection':_0x4727f9(0x10c),'children':[a28_0x586d84(Box,{'children':[a28_0x7caf05(Text,{'color':_0x4727f9(0x124),'children':_0x4727f9(0x11f)}),a28_0x7caf05(Text,{'color':_0x4727f9(0x111),'bold':!![],'children':_0x846f7?.[_0x4727f9(0xf7)]})]}),_0x846f7?.[_0x4727f9(0x107)]&&a28_0x586d84(Box,{'children':[a28_0x7caf05(Text,{'color':'cyan','children':_0x4727f9(0xcf)}),a28_0x7caf05(Text,{'color':_0x4727f9(0x111),'bold':!![],'children':_0x846f7['appCode']})]}),a28_0x586d84(Box,{'children':[a28_0x7caf05(Text,{'color':_0x4727f9(0x124),'children':_0x4727f9(0xc9)}),_0x846f7?.['pullApi']?a28_0x7caf05(Text,{'color':'green','bold':!![],'children':_0x4727f9(0xed)}):_0x846f7?.[_0x4727f9(0x107)]?a28_0x7caf05(Text,{'color':_0x4727f9(0xdc),'bold':!![],'children':'需手动拉取'}):a28_0x7caf05(Text,{'color':'gray','bold':!![],'children':_0x4727f9(0x11c)})]})]}),a28_0x7caf05(Box,{'marginTop':0x1,'marginBottom':0x1,'children':a28_0x7caf05(Text,{'color':'cyan','bold':!![],'children':_0x4727f9(0xfc)})}),a28_0x586d84(Box,{'marginLeft':0x2,'flexDirection':_0x4727f9(0x10c),'children':[a28_0x586d84(Box,{'children':[a28_0x7caf05(Text,{'color':'green','children':_0x4727f9(0x10f)}),a28_0x7caf05(Text,{'color':'white','children':_0x4727f9(0xe2)}),a28_0x7caf05(Text,{'color':'cyan','bold':!![],'children':'cd\x20'+_0x846f7?.[_0x4727f9(0xf7)]+'\x20&&\x20lovrabet\x20start'})]}),_0x846f7?.[_0x4727f9(0x107)]&&!_0x846f7?.[_0x4727f9(0x11e)]&&a28_0x586d84(Box,{'children':[a28_0x7caf05(Text,{'color':_0x4727f9(0xdc),'children':_0x4727f9(0xfd)}),a28_0x7caf05(Text,{'color':_0x4727f9(0x111),'children':_0x4727f9(0x119)}),a28_0x7caf05(Text,{'color':_0x4727f9(0x124),'bold':!![],'children':_0x4727f9(0x102)})]}),!_0x846f7?.[_0x4727f9(0x107)]&&a28_0x586d84(a28_0x23e781,{'children':[a28_0x586d84(Box,{'children':[a28_0x7caf05(Text,{'color':_0x4727f9(0x109),'children':_0x4727f9(0xfd)}),a28_0x7caf05(Text,{'color':_0x4727f9(0x111),'children':_0x4727f9(0xcc)}),a28_0x7caf05(Text,{'color':_0x4727f9(0x124),'bold':!![],'children':_0x4727f9(0xf3)})]}),a28_0x586d84(Box,{'children':[a28_0x7caf05(Text,{'color':_0x4727f9(0x109),'children':_0x4727f9(0x11a)}),a28_0x7caf05(Text,{'color':_0x4727f9(0x111),'children':_0x4727f9(0x119)}),a28_0x7caf05(Text,{'color':_0x4727f9(0x124),'bold':!![],'children':'lovrabet\x20api\x20pull\x20[app-code]'})]})]})]}),a28_0x7caf05(Box,{'marginTop':0x1,'children':a28_0x7caf05(Text,{'color':'green','children':'─'[_0x4727f9(0xf0)](0x3c)})})]});return null;}
@@ -1 +1 @@
1
- function a29_0x4333(_0x3c961e,_0x1a54ea){var _0x32bcaf=a29_0x32bc();return a29_0x4333=function(_0x4333ff,_0x1c714a){_0x4333ff=_0x4333ff-0xc0;var _0x507a85=_0x32bcaf[_0x4333ff];return _0x507a85;},a29_0x4333(_0x3c961e,_0x1a54ea);}(function(_0x34646e,_0x1b6d91){var _0x494e71=a29_0x4333,_0x4fe920=_0x34646e();while(!![]){try{var _0x14ae55=parseInt(_0x494e71(0xcd))/0x1*(-parseInt(_0x494e71(0xc9))/0x2)+parseInt(_0x494e71(0xca))/0x3*(-parseInt(_0x494e71(0xc0))/0x4)+-parseInt(_0x494e71(0xcb))/0x5+parseInt(_0x494e71(0xc4))/0x6+-parseInt(_0x494e71(0xc6))/0x7*(parseInt(_0x494e71(0xc8))/0x8)+-parseInt(_0x494e71(0xc3))/0x9+parseInt(_0x494e71(0xcc))/0xa;if(_0x14ae55===_0x1b6d91)break;else _0x4fe920['push'](_0x4fe920['shift']());}catch(_0x5c17e1){_0x4fe920['push'](_0x4fe920['shift']());}}}(a29_0x32bc,0x30db8));import{jsx as a29_0x3dfc42,jsxs as a29_0x1fa5a4}from'react/jsx-runtime';import{Box,Text}from'ink';function a29_0x32bc(){var _0x3746d4=['taskName','35LBfslo','\x20√\x20','579560dCVSkT','142586deCZds','155742JjXqGI','423075SpQgJd','9896710UJDFAQ','1MkLbAN','4edtxwr','green','elapsed','2158326iMamSN','121860fTktKl'];a29_0x32bc=function(){return _0x3746d4;};return a29_0x32bc();}import{TaskTime}from'./task-time.js';export function TaskFinished(_0x4e7b5a){var _0x10ef03=a29_0x4333;return a29_0x1fa5a4(Box,{'children':[a29_0x3dfc42(Box,{'width':'1'}),a29_0x3dfc42(Text,{'color':_0x10ef03(0xc1),'children':_0x10ef03(0xc7)}),a29_0x3dfc42(Text,{'children':_0x4e7b5a[_0x10ef03(0xc5)]}),a29_0x3dfc42(TaskTime,{'elapsed':_0x4e7b5a[_0x10ef03(0xc2)]})]});}
1
+ function a29_0x54a2(){var _0x19bb6b=['5307848zdWEiA','930OlhzEd','2734501IXfQty','green','7549WrGnim','240CVmYAY','\x20√\x20','50iTYggu','32823kMKMlI','4zXsvdH','elapsed','8348697DWoiqh','taskName','2456634zzStLq','679135ygFMJt'];a29_0x54a2=function(){return _0x19bb6b;};return a29_0x54a2();}function a29_0x50c3(_0x447372,_0x4071ae){var _0x54a207=a29_0x54a2();return a29_0x50c3=function(_0x50c304,_0x5637d8){_0x50c304=_0x50c304-0x8d;var _0x1b5d79=_0x54a207[_0x50c304];return _0x1b5d79;},a29_0x50c3(_0x447372,_0x4071ae);}(function(_0x1f86d2,_0x4a0609){var _0x2a9926=a29_0x50c3,_0x25d28a=_0x1f86d2();while(!![]){try{var _0x1fa5e7=parseInt(_0x2a9926(0x8e))/0x1*(-parseInt(_0x2a9926(0x8f))/0x2)+-parseInt(_0x2a9926(0x97))/0x3*(-parseInt(_0x2a9926(0x93))/0x4)+-parseInt(_0x2a9926(0x98))/0x5+parseInt(_0x2a9926(0x9a))/0x6*(-parseInt(_0x2a9926(0x92))/0x7)+-parseInt(_0x2a9926(0x99))/0x8+parseInt(_0x2a9926(0x95))/0x9+-parseInt(_0x2a9926(0x91))/0xa*(-parseInt(_0x2a9926(0x9b))/0xb);if(_0x1fa5e7===_0x4a0609)break;else _0x25d28a['push'](_0x25d28a['shift']());}catch(_0x2e60f5){_0x25d28a['push'](_0x25d28a['shift']());}}}(a29_0x54a2,0x881ab));import{jsx as a29_0x38ed74,jsxs as a29_0x1a3986}from'react/jsx-runtime';import{Box,Text}from'ink';import{TaskTime}from'./task-time.js';export function TaskFinished(_0x458cbb){var _0xe84ff0=a29_0x50c3;return a29_0x1a3986(Box,{'children':[a29_0x38ed74(Box,{'width':'1'}),a29_0x38ed74(Text,{'color':_0xe84ff0(0x8d),'children':_0xe84ff0(0x90)}),a29_0x38ed74(Text,{'children':_0x458cbb[_0xe84ff0(0x96)]}),a29_0x38ed74(TaskTime,{'elapsed':_0x458cbb[_0xe84ff0(0x94)]})]});}
@@ -1 +1 @@
1
- function a30_0x346c(){var _0x2e11b1=['6lxuHFq','loading','1336255JFUKqG','212526JOqUIs','376zBuPWE','8XtWEUq','9ITszZo','1050395kImkWG','2630230pmFLaQ','\x20\x20\x20','146573kAeOgh','4016749iVyNHs','green','2373588GrfaZX','finished','\x20√\x20'];a30_0x346c=function(){return _0x2e11b1;};return a30_0x346c();}(function(_0x2acfeb,_0x513c38){var _0x37141c=a30_0x4d12,_0x2e6b34=_0x2acfeb();while(!![]){try{var _0x177232=parseInt(_0x37141c(0x8f))/0x1+parseInt(_0x37141c(0x8a))/0x2+-parseInt(_0x37141c(0x90))/0x3*(-parseInt(_0x37141c(0x92))/0x4)+-parseInt(_0x37141c(0x94))/0x5*(parseInt(_0x37141c(0x8d))/0x6)+-parseInt(_0x37141c(0x87))/0x7*(parseInt(_0x37141c(0x91))/0x8)+-parseInt(_0x37141c(0x93))/0x9*(parseInt(_0x37141c(0x95))/0xa)+-parseInt(_0x37141c(0x88))/0xb;if(_0x177232===_0x513c38)break;else _0x2e6b34['push'](_0x2e6b34['shift']());}catch(_0x44e2e0){_0x2e6b34['push'](_0x2e6b34['shift']());}}}(a30_0x346c,0xcda63));function a30_0x4d12(_0x354405,_0x3aaaca){var _0x346cce=a30_0x346c();return a30_0x4d12=function(_0x4d1200,_0x3a9e51){_0x4d1200=_0x4d1200-0x86;var _0x5401df=_0x346cce[_0x4d1200];return _0x5401df;},a30_0x4d12(_0x354405,_0x3aaaca);}import{jsx as a30_0x347b7b,jsxs as a30_0x24662e}from'react/jsx-runtime';import{Text}from'ink';import a30_0x3cb39a from'ink-spinner';export function TaskLoading(_0x2d1643){var _0x521d77=a30_0x4d12;if(_0x2d1643[_0x521d77(0x8b)])return a30_0x347b7b(Text,{'color':'green','children':_0x521d77(0x8c)});if(_0x2d1643[_0x521d77(0x8e)])return a30_0x24662e(Text,{'color':_0x521d77(0x89),'children':['\x20',a30_0x347b7b(a30_0x3cb39a,{'type':'dots'}),'\x20']});return a30_0x347b7b(Text,{'children':_0x521d77(0x86)});}
1
+ (function(_0x19a307,_0x55a8dc){var _0x222e06=a30_0x3700,_0x590c3d=_0x19a307();while(!![]){try{var _0xece98=-parseInt(_0x222e06(0x72))/0x1+-parseInt(_0x222e06(0x75))/0x2+-parseInt(_0x222e06(0x6f))/0x3*(-parseInt(_0x222e06(0x70))/0x4)+-parseInt(_0x222e06(0x6e))/0x5+parseInt(_0x222e06(0x6a))/0x6*(-parseInt(_0x222e06(0x6c))/0x7)+parseInt(_0x222e06(0x74))/0x8+parseInt(_0x222e06(0x6d))/0x9;if(_0xece98===_0x55a8dc)break;else _0x590c3d['push'](_0x590c3d['shift']());}catch(_0xc1dd5b){_0x590c3d['push'](_0x590c3d['shift']());}}}(a30_0x5bf5,0xa3766));import{jsx as a30_0x1efb8a,jsxs as a30_0x5dc3d7}from'react/jsx-runtime';function a30_0x5bf5(){var _0x5e1781=['1294988Etewog','green','5633742ghxhxR','loading','7ZpoIGN','23009112buWjKK','4486420KtkNcw','1231869OgbkZm','8fOvege','finished','875245dyaEeJ','dots','5205664IovFrC'];a30_0x5bf5=function(){return _0x5e1781;};return a30_0x5bf5();}function a30_0x3700(_0x20dbdb,_0x10b751){var _0x5bf546=a30_0x5bf5();return a30_0x3700=function(_0x3700e9,_0x2882a8){_0x3700e9=_0x3700e9-0x6a;var _0x43d842=_0x5bf546[_0x3700e9];return _0x43d842;},a30_0x3700(_0x20dbdb,_0x10b751);}import{Text}from'ink';import a30_0x574e11 from'ink-spinner';export function TaskLoading(_0xa8e08b){var _0x27d871=a30_0x3700;if(_0xa8e08b[_0x27d871(0x71)])return a30_0x1efb8a(Text,{'color':_0x27d871(0x76),'children':'\x20√\x20'});if(_0xa8e08b[_0x27d871(0x6b)])return a30_0x5dc3d7(Text,{'color':_0x27d871(0x76),'children':['\x20',a30_0x1efb8a(a30_0x574e11,{'type':_0x27d871(0x73)}),'\x20']});return a30_0x1efb8a(Text,{'children':'\x20\x20\x20'});}