@lovrabet/cli 1.1.9 → 1.1.11

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 (51) hide show
  1. package/README.md +51 -0
  2. package/lib/add-page/input-page-router.js +1 -1
  3. package/lib/add-page/main.js +1 -1
  4. package/lib/add-page/select-page-template.js +1 -1
  5. package/lib/api/api-doc-ui.js +1 -0
  6. package/lib/api/api-doc.js +1 -0
  7. package/lib/api/api-pull-ui.js +1 -1
  8. package/lib/api/fetch-datasets.js +1 -0
  9. package/lib/api/format-dataset.js +1 -1
  10. package/lib/api/generate-api-file.js +1 -1
  11. package/lib/api/main.js +1 -1
  12. package/lib/api/pull-silent.js +1 -1
  13. package/lib/api/pull.js +1 -1
  14. package/lib/auth/auth-server-ui.js +1 -1
  15. package/lib/auth/auth-server.js +1 -1
  16. package/lib/auth/constant.js +1 -1
  17. package/lib/auth/get-cookie.js +1 -1
  18. package/lib/auth/is-session-valid.js +1 -1
  19. package/lib/auth/logout.js +1 -1
  20. package/lib/cli.js +1 -1
  21. package/lib/cmd/build-watch.js +1 -1
  22. package/lib/cmd/build.js +1 -1
  23. package/lib/cmd/logs.js +1 -1
  24. package/lib/cmd/preview.js +1 -1
  25. package/lib/cmd/start.js +1 -1
  26. package/lib/config/config-help.js +1 -1
  27. package/lib/config/main.js +1 -1
  28. package/lib/constant/domain.js +1 -1
  29. package/lib/constant/env.js +1 -1
  30. package/lib/create-app/enhanced-guided-create.js +1 -1
  31. package/lib/create-app/format-elapsed.js +1 -1
  32. package/lib/create-app/main.js +1 -1
  33. package/lib/create-app/task-finished.js +1 -1
  34. package/lib/create-app/task-loading.js +1 -1
  35. package/lib/create-app/task-running.js +1 -1
  36. package/lib/create-app/task-time.js +1 -1
  37. package/lib/create-app/use-copy-project-template.js +1 -1
  38. package/lib/create-app/use-format-code.js +1 -1
  39. package/lib/create-app/use-install-dependencies.js +1 -1
  40. package/lib/help.js +1 -1
  41. package/lib/utils/config.js +1 -1
  42. package/lib/utils/copy-directory.js +1 -1
  43. package/lib/utils/http-client.js +1 -1
  44. package/lib/utils/logger.js +1 -1
  45. package/lib/utils/router-updater.js +1 -1
  46. package/lib/utils/template-replacer.js +1 -1
  47. package/package.json +1 -1
  48. package/templates/pages/sdk-fetch/index.tsx.tpl +41 -52
  49. package/templates/projects/sub-app-react-demo/package-lock.json +5 -4
  50. package/templates/projects/sub-app-react-demo/package.json +1 -1
  51. package/templates/projects/sub-app-react-demo/src/pages/sdk-demo/index.tsx +42 -28
@@ -1 +1 @@
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
+ const a14_0x38f54c=a14_0x2e8e;function a14_0x2e8e(_0x28e83a,_0x2c39ac){const _0x18410b=a14_0x1841();return a14_0x2e8e=function(_0x2e8e51,_0x4d4a77){_0x2e8e51=_0x2e8e51-0x157;let _0x410ffe=_0x18410b[_0x2e8e51];return _0x410ffe;},a14_0x2e8e(_0x28e83a,_0x2c39ac);}(function(_0xabfaf9,_0x10cdef){const _0x2c7e0d=a14_0x2e8e,_0x4f09f6=_0xabfaf9();while(!![]){try{const _0x16eb24=parseInt(_0x2c7e0d(0x16b))/0x1+-parseInt(_0x2c7e0d(0x170))/0x2*(parseInt(_0x2c7e0d(0x16a))/0x3)+parseInt(_0x2c7e0d(0x16d))/0x4*(-parseInt(_0x2c7e0d(0x16c))/0x5)+-parseInt(_0x2c7e0d(0x16f))/0x6*(-parseInt(_0x2c7e0d(0x168))/0x7)+parseInt(_0x2c7e0d(0x174))/0x8+-parseInt(_0x2c7e0d(0x158))/0x9+parseInt(_0x2c7e0d(0x159))/0xa;if(_0x16eb24===_0x10cdef)break;else _0x4f09f6['push'](_0x4f09f6['shift']());}catch(_0x30544b){_0x4f09f6['push'](_0x4f09f6['shift']());}}}(a14_0x1841,0x4dafc));function a14_0x1841(){const _0x51b103=['1479070AiTvVn','open\x20\x22','🔗\x20请手动复制登录地址到浏览器:','main','https://g.yuntooai.com/cert/lovrabet-dev.json','error','createServer','isAuth','log','end','Auth\x20server\x20error:','json','win32','/sign-in?redirect=','listen','21qTrTcn','session','618TdAAPO','344682qPgIOA','1820rZGujj','4756bfOfIf','platform','786990SPfZkw','4068gmJDaa','address','⚠️\x20\x20无法自动打开浏览器','127.0.0.1','4006576fInGsj','xdg-open\x20\x22','start\x20\x22\x22\x20\x22','headers','user','https://dev.lovrabet.com:','then','🌐\x20正在尝试自动打开浏览器...','writeHead','✅\x20浏览器已自动打开,请在浏览器中完成登录','utf-8','catch','port','darwin','text/html;\x20charset=utf-8','🔐\x20正在启动登录服务...','<!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>','1952118ximkOa'];a14_0x1841=function(){return _0x51b103;};return a14_0x1841();}import{writeFileSync}from'node:fs';import a14_0x3dd402 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(_0x1c7410){const _0x30b5d0=a14_0x2e8e,_0x478cf0=_0x1c7410?.['silent']||![];if(await getIsSessionValid())return!![];const _0x19399e=await(await fetch(_0x30b5d0(0x15d)))[_0x30b5d0(0x164)]();return new Promise(async(_0x5a6c01,_0x2e48d8)=>{const _0x3a4992=_0x30b5d0;let _0x5ad752=0x0;const _0x351b2a=a14_0x3dd402[_0x3a4992(0x15f)](_0x19399e,async(_0x23c2f2,_0x1aa950)=>{const _0x1f14f1=_0x3a4992,_0x208022=getUserDomain(),_0xa96ac9=_0x23c2f2[_0x1f14f1(0x177)]['cookie']||'',_0x5afd9d=await fetch(_0x208022+'/api/auth/get-session',{'headers':{'cookie':_0xa96ac9}})[_0x1f14f1(0x17a)](_0x23a799=>_0x23a799['json']()),_0x46b6fe=_0x5afd9d&&_0x5afd9d[_0x1f14f1(0x169)]&&_0x5afd9d[_0x1f14f1(0x178)];if(_0x46b6fe){writeFileSync(cookieFile,_0xa96ac9,_0x1f14f1(0x17e)),_0x5a6c01(!![]);const _0x24154c=_0x1f14f1(0x157);_0x1aa950[_0x1f14f1(0x17c)](0xc8,{'Content-Type':_0x1f14f1(0x182)}),_0x1aa950[_0x1f14f1(0x162)](_0x24154c),_0x351b2a['close']();}else{const _0x1a6c2f=''+encodeURIComponent(_0x1f14f1(0x179)+_0x5ad752);_0x1aa950['writeHead'](0x12e,{'location':_0x208022+_0x1f14f1(0x166)+_0x1a6c2f}),_0x1aa950[_0x1f14f1(0x162)]();return;}});_0x351b2a[_0x3a4992(0x167)](0x0,_0x3a4992(0x173),()=>{const _0x499416=_0x3a4992,_0x2c7a1f=_0x351b2a[_0x499416(0x171)]();_0x5ad752=typeof _0x2c7a1f==='object'&&_0x2c7a1f?_0x2c7a1f[_0x499416(0x180)]:Number(_0x2c7a1f);const _0x172299='https://dev.lovrabet.com:'+_0x5ad752;!_0x478cf0&&(console[_0x499416(0x161)](_0x499416(0x183)),console[_0x499416(0x161)]('📍\x20登录地址:',_0x172299),console[_0x499416(0x161)](_0x499416(0x17b)),console['log'](''),console['log']('💡\x20如果浏览器没有自动打开,请手动复制上面的登录地址到浏览器中打开'),console[_0x499416(0x161)]('')),openInBrowser(_0x172299)[_0x499416(0x17a)](_0x5eae29=>{const _0x2de794=_0x499416;!_0x478cf0&&(_0x5eae29?console[_0x2de794(0x161)](_0x2de794(0x17d)):(console['log'](_0x2de794(0x172)),console[_0x2de794(0x161)](_0x2de794(0x15b),_0x172299)),console[_0x2de794(0x161)](''));})[_0x499416(0x17f)](()=>{const _0x2b5f7c=_0x499416;!_0x478cf0&&(console['log'](_0x2b5f7c(0x172)),console['log'](_0x2b5f7c(0x15b),_0x172299),console[_0x2b5f7c(0x161)](''));});}),_0x351b2a['on']('error',_0x5f3381=>{const _0x180558=_0x3a4992;!_0x478cf0&&console[_0x180558(0x15e)](_0x180558(0x163),_0x5f3381),_0x2e48d8(_0x5f3381);});});}function openInBrowser(_0x2dbb27){return new Promise(_0x5edb36=>{const _0x325f54=a14_0x2e8e,_0x156d98=process[_0x325f54(0x16e)];let _0x4d6e1c;if(_0x156d98===_0x325f54(0x165))_0x4d6e1c=_0x325f54(0x176)+_0x2dbb27+'\x22';else _0x156d98===_0x325f54(0x181)?_0x4d6e1c=_0x325f54(0x15a)+_0x2dbb27+'\x22':_0x4d6e1c=_0x325f54(0x175)+_0x2dbb27+'\x22';exec(_0x4d6e1c,_0x2fe820=>{_0x2fe820?_0x5edb36(![]):_0x5edb36(!![]);});});}if(import.meta[a14_0x38f54c(0x15c)]){const isAuth=await authServer();console['log'](a14_0x38f54c(0x160),isAuth);}
@@ -1 +1 @@
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
+ const a15_0x495b05=a15_0x5a79;(function(_0xdc926f,_0x3993ca){const _0x33401f=a15_0x5a79,_0x5c1807=_0xdc926f();while(!![]){try{const _0x1ad7ae=-parseInt(_0x33401f(0xdf))/0x1*(parseInt(_0x33401f(0xd9))/0x2)+-parseInt(_0x33401f(0xe1))/0x3*(parseInt(_0x33401f(0xde))/0x4)+parseInt(_0x33401f(0xd8))/0x5*(-parseInt(_0x33401f(0xd5))/0x6)+-parseInt(_0x33401f(0xda))/0x7*(-parseInt(_0x33401f(0xdc))/0x8)+-parseInt(_0x33401f(0xd6))/0x9+parseInt(_0x33401f(0xdd))/0xa+parseInt(_0x33401f(0xe0))/0xb*(parseInt(_0x33401f(0xd7))/0xc);if(_0x1ad7ae===_0x3993ca)break;else _0x5c1807['push'](_0x5c1807['shift']());}catch(_0x2be47f){_0x5c1807['push'](_0x5c1807['shift']());}}}(a15_0x4b18,0x44e0b));import{mkdirSync}from'node:fs';import{homedir}from'node:os';function a15_0x5a79(_0x246140,_0x52c338){const _0x4b18e9=a15_0x4b18();return a15_0x5a79=function(_0x5a790,_0x3851db){_0x5a790=_0x5a790-0xd5;let _0x3a9475=_0x4b18e9[_0x5a790];return _0x3a9475;},a15_0x5a79(_0x246140,_0x52c338);}function a15_0x4b18(){const _0x39bcb5=['1fRXaXV','9804729dEpyse','1977MnciwH','278946XrKRTG','4154706zqnemh','12sCQaSg','35ipmmYw','753226uFzceH','42HNDXuM','/cookie','746536Yfqlpe','3879890CcHNPO','2388Ugbqvu'];a15_0x4b18=function(){return _0x39bcb5;};return a15_0x4b18();}export const configDir=homedir()+'/.lovrabet';export const cookieFile=configDir+a15_0x495b05(0xdb);mkdirSync(configDir,{'recursive':!![]});
@@ -1 +1 @@
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
+ (function(_0x46caa6,_0x4e522a){var _0x177f1a=a16_0x1fa0,_0x4fe004=_0x46caa6();while(!![]){try{var _0x4ea3a9=-parseInt(_0x177f1a(0x18d))/0x1+-parseInt(_0x177f1a(0x18b))/0x2+-parseInt(_0x177f1a(0x189))/0x3*(-parseInt(_0x177f1a(0x18f))/0x4)+parseInt(_0x177f1a(0x190))/0x5*(-parseInt(_0x177f1a(0x18a))/0x6)+-parseInt(_0x177f1a(0x187))/0x7+parseInt(_0x177f1a(0x18c))/0x8+parseInt(_0x177f1a(0x18e))/0x9;if(_0x4ea3a9===_0x4e522a)break;else _0x4fe004['push'](_0x4fe004['shift']());}catch(_0x1c9639){_0x4fe004['push'](_0x4fe004['shift']());}}}(a16_0x93f7,0x6174e));import{readFileSync}from'node:fs';import{cookieFile}from'./constant.js';function a16_0x93f7(){var _0x91bbee=['3269399ukCpfy','utf-8','136833UeqwiI','3926568aEKkcX','1461102HMuptf','2856312eMvHqr','391050MsDITi','16462071gnUSFp','40EGPRIy','5WlInJv'];a16_0x93f7=function(){return _0x91bbee;};return a16_0x93f7();}function a16_0x1fa0(_0x288cd3,_0x5620e8){var _0x93f702=a16_0x93f7();return a16_0x1fa0=function(_0x1fa079,_0x27056d){_0x1fa079=_0x1fa079-0x187;var _0x43e8e3=_0x93f702[_0x1fa079];return _0x43e8e3;},a16_0x1fa0(_0x288cd3,_0x5620e8);}export function getCookie(){var _0x371492=a16_0x1fa0;try{return readFileSync(cookieFile,_0x371492(0x188));}catch{}return'';}
@@ -1 +1 @@
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
+ (function(_0x5e1487,_0x2c8b5a){const _0x3cfbe8=a17_0x3545,_0x2b2bea=_0x5e1487();while(!![]){try{const _0x25ed31=parseInt(_0x3cfbe8(0x156))/0x1+-parseInt(_0x3cfbe8(0x14f))/0x2+-parseInt(_0x3cfbe8(0x155))/0x3*(-parseInt(_0x3cfbe8(0x157))/0x4)+parseInt(_0x3cfbe8(0x154))/0x5+-parseInt(_0x3cfbe8(0x152))/0x6*(parseInt(_0x3cfbe8(0x150))/0x7)+parseInt(_0x3cfbe8(0x14a))/0x8*(parseInt(_0x3cfbe8(0x153))/0x9)+parseInt(_0x3cfbe8(0x14c))/0xa*(-parseInt(_0x3cfbe8(0x151))/0xb);if(_0x25ed31===_0x2c8b5a)break;else _0x2b2bea['push'](_0x2b2bea['shift']());}catch(_0xa834ef){_0x2b2bea['push'](_0x2b2bea['shift']());}}}(a17_0x121e,0x3a1aa));import{existsSync,readFileSync}from'node:fs';import{getUserDomain}from'../constant/domain.js';import{cookieFile}from'./constant.js';export async function getIsSessionValid(){const _0x1c01ae=a17_0x3545;try{if(!existsSync(cookieFile))return![];const _0x53696b=readFileSync(cookieFile,'utf-8'),_0x4191ef=await fetch(getUserDomain()+_0x1c01ae(0x14d),{'headers':{'cookie':_0x53696b}})['then'](_0x2504ff=>_0x2504ff[_0x1c01ae(0x14b)]());return _0x4191ef&&_0x4191ef[_0x1c01ae(0x149)]&&_0x4191ef[_0x1c01ae(0x14e)];}catch{}return![];}function a17_0x3545(_0x246def,_0x33c34c){const _0x121ecf=a17_0x121e();return a17_0x3545=function(_0x354524,_0xb9bf1a){_0x354524=_0x354524-0x149;let _0x2c594f=_0x121ecf[_0x354524];return _0x2c594f;},a17_0x3545(_0x246def,_0x33c34c);}function a17_0x121e(){const _0x2c9266=['710TbtgZC','/api/auth/get-session','user','879768jmbDXS','30422eCgnJN','10516ztMwyv','12HQCRui','27981xLNoCb','958515JGhOyJ','309KxMcoC','166293EcwyIP','14068bexkCR','session','88nmdloG','json'];a17_0x121e=function(){return _0x2c9266;};return a17_0x121e();}
@@ -1 +1 @@
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();}
1
+ (function(_0x531395,_0x16b057){var _0xca0cd8=a18_0x2960,_0x40aa50=_0x531395();while(!![]){try{var _0x3168e1=-parseInt(_0xca0cd8(0x6f))/0x1+-parseInt(_0xca0cd8(0x70))/0x2*(parseInt(_0xca0cd8(0x6a))/0x3)+parseInt(_0xca0cd8(0x6b))/0x4+-parseInt(_0xca0cd8(0x6e))/0x5*(parseInt(_0xca0cd8(0x6c))/0x6)+parseInt(_0xca0cd8(0x67))/0x7+-parseInt(_0xca0cd8(0x66))/0x8*(parseInt(_0xca0cd8(0x6d))/0x9)+parseInt(_0xca0cd8(0x68))/0xa;if(_0x3168e1===_0x16b057)break;else _0x40aa50['push'](_0x40aa50['shift']());}catch(_0x541dc3){_0x40aa50['push'](_0x40aa50['shift']());}}}(a18_0x3336,0x9cd98));import{unlinkSync,existsSync}from'node:fs';function a18_0x2960(_0x548077,_0x21c465){var _0x33369d=a18_0x3336();return a18_0x2960=function(_0x2960f7,_0x164fb2){_0x2960f7=_0x2960f7-0x66;var _0x5b4de9=_0x33369d[_0x2960f7];return _0x5b4de9;},a18_0x2960(_0x548077,_0x21c465);}import{cookieFile}from'./constant.js';function a18_0x3336(){var _0xe6d29d=['229205DLStsa','1177458TLaJVh','3562UFXfFa','395352CqxcQj','950439SQXTiR','23191890TfzPDQ','!\x20当前未登录','759OGuqbg','2874888YgFjHK','60PJgUIe','81YBZPsz'];a18_0x3336=function(){return _0xe6d29d;};return a18_0x3336();}export function logout(){var _0x435f05=a18_0x2960;existsSync(cookieFile)?(unlinkSync(cookieFile),console['log']('✓\x20已退出登录')):console['log'](_0x435f05(0x69));}
package/lib/cli.js CHANGED
@@ -1,2 +1,2 @@
1
1
  #!/usr/bin/env node
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;}}
2
+ const a19_0x5671af=a19_0x3093;(function(_0x5b4c7b,_0x542769){const _0x1651f9=a19_0x3093,_0x240e79=_0x5b4c7b();while(!![]){try{const _0x5d6ab4=parseInt(_0x1651f9(0x92))/0x1*(parseInt(_0x1651f9(0xa6))/0x2)+parseInt(_0x1651f9(0xa7))/0x3*(parseInt(_0x1651f9(0x95))/0x4)+-parseInt(_0x1651f9(0x8d))/0x5*(parseInt(_0x1651f9(0xa9))/0x6)+-parseInt(_0x1651f9(0xb4))/0x7+-parseInt(_0x1651f9(0xa8))/0x8+-parseInt(_0x1651f9(0x9e))/0x9+parseInt(_0x1651f9(0xb0))/0xa*(parseInt(_0x1651f9(0xa0))/0xb);if(_0x5d6ab4===_0x542769)break;else _0x240e79['push'](_0x240e79['shift']());}catch(_0x12097e){_0x240e79['push'](_0x240e79['shift']());}}}(a19_0xc268,0x7a0d7));import{jsx as a19_0x26230e}from'react/jsx-runtime';import a19_0x37c5a4 from'meow';import{render}from'ink';import{CreateApp}from'./create-app/main.js';import{AddPage}from'./add-page/main.js';function a19_0xc268(){const _0x38d966=['668694ZDmzYV','slice','cwd','boolean','create','start','auth','10SVIWLw','argv','input','api','2451351pQczou','error','page','all','15TnkNwQ','info','lovrabet\x20','\x20(监听模式)','trim','30697aFoLfR','preview','执行添加页面命令','4exwCEL','flags','watch','env','join','string','\x0a\x09Usage\x0a\x09\x20\x20$\x20lovrabet\x0a\x0a\x09Examples\x0a\x09\x20\x20$\x20lovrabet\x20auth\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20登录认证\x0a\x09\x20\x20$\x20lovrabet\x20logout\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20退出登录\x0a\x09\x20\x20$\x20lovrabet\x20create\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20创建一个项目\x0a\x09\x20\x20$\x20lovrabet\x20create\x20--env\x20daily\x20\x20\x20\x20\x20\x20\x20\x20//\x20创建项目并指定环境\x0a\x09\x20\x20$\x20lovrabet\x20add\x20page\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20添加一个页面\x0a\x09\x20\x20$\x20lovrabet\x20start\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20启动项目\x0a\x09\x20\x20$\x20lovrabet\x20build\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20构建项目\x0a\x09\x20\x20$\x20lovrabet\x20preview\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20预览项目\x0a\x09\x20\x20$\x20lovrabet\x20preview\x20--watch\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20监听文件变化并自动构建预览\x0a\x09\x20\x20$\x20lovrabet\x20config\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20项目配置\x0a\x09\x20\x20$\x20lovrabet\x20api\x20pull\x20--[options]\x20\x20\x20\x20\x20\x20//\x20拉取并生成\x20API\x20配置文件(详见\x20lovrabet\x20api\x20--help)\x0a\x09\x20\x20$\x20lovrabet\x20api\x20doc\x20--[options]\x20\x20\x20\x20\x20\x20\x20//\x20生成\x20API\x20文档(详见\x20lovrabet\x20api\x20--help)\x0a\x09\x20\x20$\x20lovrabet\x20logs\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20查看日志\x0a\x09\x20\x20$\x20lovrabet\x20logs\x20--clear\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20清空日志\x0a','setLogPath','config','7110756uxXvnM','执行构建命令','5773350IWPgqW','build','setRawCommand','add-page','exit','执行启动命令','46cCyVEt','2467419JlVuMJ','630424jYwfTR'];a19_0xc268=function(){return _0x38d966;};return a19_0xc268();}import{runStart}from'./cmd/start.js';function a19_0x3093(_0x5e295f,_0x3c94da){const _0xc268da=a19_0xc268();return a19_0x3093=function(_0x309376,_0x5790bd){_0x309376=_0x309376-0x8c;let _0x3e901d=_0xc268da[_0x309376];return _0x3e901d;},a19_0x3093(_0x5e295f,_0x3c94da);}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';import{showLogs,clearLogs}from'./cmd/logs.js';const cli=a19_0x37c5a4(a19_0x5671af(0x9b),{'importMeta':import.meta,'flags':{'name':{'type':a19_0x5671af(0x9a)},'clear':{'type':a19_0x5671af(0xac)},'env':{'type':a19_0x5671af(0x9a)},'watch':{'type':a19_0x5671af(0xac)},'help':{'type':'boolean'},'appcode':{'type':'string'},'output':{'type':a19_0x5671af(0x9a)}}});await run();async function run(){const _0x2f5a5f=a19_0x5671af,_0x292b18=cli[_0x2f5a5f(0xb2)][0x0],_0x217e15=(_0x2f5a5f(0x8f)+process[_0x2f5a5f(0xb1)][_0x2f5a5f(0xaa)](0x2)[_0x2f5a5f(0x99)]('\x20'))[_0x2f5a5f(0x91)]();logger[_0x2f5a5f(0xa2)](_0x217e15);switch(_0x292b18){case _0x2f5a5f(0xad):{const _0x577597=cli['input'][0x1]?.['trim'](),_0x372153=cli['flags'][_0x2f5a5f(0x98)];render(a19_0x26230e(CreateApp,{'projectCode':_0x577597,'env':_0x372153}));break;}case'add':{cli[_0x2f5a5f(0xb2)][0x1]===_0x2f5a5f(0xb6)&&(logger[_0x2f5a5f(0x9c)](process[_0x2f5a5f(0xab)]()),logger[_0x2f5a5f(0x8e)](_0x2f5a5f(0xa3),_0x2f5a5f(0x94)),render(a19_0x26230e(AddPage,{})));break;}case _0x2f5a5f(0xae):{try{logger[_0x2f5a5f(0x9c)](process[_0x2f5a5f(0xab)]()),logger[_0x2f5a5f(0x8e)](_0x2f5a5f(0xae),_0x2f5a5f(0xa5)),await runStart();}catch(_0xab8a2a){console[_0x2f5a5f(0xb5)](_0xab8a2a),process[_0x2f5a5f(0xa4)](0x1);}break;}case _0x2f5a5f(0xa1):{try{logger[_0x2f5a5f(0x9c)](process[_0x2f5a5f(0xab)]()),logger[_0x2f5a5f(0x8e)](_0x2f5a5f(0xa1),_0x2f5a5f(0x9f)),await runBuild();}catch(_0x3b7ad8){console[_0x2f5a5f(0xb5)](_0x3b7ad8),process['exit'](0x1);}break;}case'preview':{const _0x21711a=cli[_0x2f5a5f(0x96)][_0x2f5a5f(0x97)];logger[_0x2f5a5f(0x9c)](process['cwd']()),logger[_0x2f5a5f(0x8e)](_0x2f5a5f(0x93),'执行预览命令'+(_0x21711a?_0x2f5a5f(0x90):''));if(_0x21711a)try{await Promise[_0x2f5a5f(0x8c)]([runBuildWatch(),runPreview()]);}catch(_0xa64e42){console[_0x2f5a5f(0xb5)](_0xa64e42),process[_0x2f5a5f(0xa4)](0x1);}else try{await runPreview();}catch(_0x4a79cd){console[_0x2f5a5f(0xb5)](_0x4a79cd),process[_0x2f5a5f(0xa4)](0x1);}break;}case _0x2f5a5f(0x9d):{render(a19_0x26230e(Config,{'cli':cli}));break;}case _0x2f5a5f(0xb3):{await apiCli(cli);break;}case _0x2f5a5f(0xaf):{render(a19_0x26230e(AuthServer,{}));break;}case'logout':{logout();break;}case'logs':{cli['flags']['clear']?clearLogs():showLogs();break;}default:render(a19_0x26230e(Help,{}));break;}}
@@ -1 +1 @@
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);});}
1
+ (function(_0x155c15,_0x7ee60e){const _0x1bf653=a20_0x180c,_0x4b6f6f=_0x155c15();while(!![]){try{const _0x1cf91f=parseInt(_0x1bf653(0x111))/0x1*(parseInt(_0x1bf653(0x11a))/0x2)+parseInt(_0x1bf653(0x11c))/0x3*(-parseInt(_0x1bf653(0x119))/0x4)+-parseInt(_0x1bf653(0x114))/0x5+parseInt(_0x1bf653(0x115))/0x6+-parseInt(_0x1bf653(0x110))/0x7+-parseInt(_0x1bf653(0x10d))/0x8+parseInt(_0x1bf653(0x112))/0x9;if(_0x1cf91f===_0x7ee60e)break;else _0x4b6f6f['push'](_0x4b6f6f['shift']());}catch(_0xaec2af){_0x4b6f6f['push'](_0x4b6f6f['shift']());}}}(a20_0x5e32,0xa6c1e));import{spawn}from'node:child_process';function a20_0x180c(_0x25cbe7,_0x971e86){const _0x5e3241=a20_0x5e32();return a20_0x180c=function(_0x180c97,_0xb929cc){_0x180c97=_0x180c97-0x10a;let _0x2077b5=_0x5e3241[_0x180c97];return _0x2077b5;},a20_0x180c(_0x25cbe7,_0x971e86);}import{delimiter,join}from'node:path';function a20_0x5e32(){const _0x2f4c40=['4713003xTmHlB','close','201975XLjIhm','7462122FcDAoZ','env','error','inherit','12bYVALw','2301550xJsxYv','node_modules','832467DOXtTE','cwd','vite','--watch','8964952tmjpGM','PATH','npm\x20run\x20build\x20exited\x20with\x20code\x20','1691270BsrXNq','1gvpdbx'];a20_0x5e32=function(){return _0x2f4c40;};return a20_0x5e32();}export function runBuildWatch(){return new Promise((_0x586284,_0x35b5aa)=>{const _0x261fde=a20_0x180c,_0x36cd4c=spawn(_0x261fde(0x10b),['build',_0x261fde(0x10c)],{'stdio':_0x261fde(0x118),'shell':!![],'env':{...process[_0x261fde(0x116)],'PATH':''+join(process[_0x261fde(0x10a)](),_0x261fde(0x11b),'.bin')+delimiter+process[_0x261fde(0x116)][_0x261fde(0x10e)]}});_0x36cd4c['on'](_0x261fde(0x113),_0x464f4f=>{const _0xb62b5d=_0x261fde;if(_0x464f4f===0x0||_0x464f4f===null)_0x586284();else _0x35b5aa(new Error(_0xb62b5d(0x10f)+_0x464f4f));}),_0x36cd4c['on'](_0x261fde(0x117),_0x35b5aa);});}
package/lib/cmd/build.js CHANGED
@@ -1 +1 @@
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();}
1
+ (function(_0x5c5444,_0x168cdc){const _0x1e0b31=a21_0x1e40,_0x2c09c0=_0x5c5444();while(!![]){try{const _0x42d9d3=parseInt(_0x1e0b31(0x126))/0x1+parseInt(_0x1e0b31(0x12d))/0x2+parseInt(_0x1e0b31(0x134))/0x3*(-parseInt(_0x1e0b31(0x131))/0x4)+-parseInt(_0x1e0b31(0x12c))/0x5+parseInt(_0x1e0b31(0x13c))/0x6*(parseInt(_0x1e0b31(0x147))/0x7)+-parseInt(_0x1e0b31(0x12a))/0x8+parseInt(_0x1e0b31(0x137))/0x9*(parseInt(_0x1e0b31(0x12f))/0xa);if(_0x42d9d3===_0x168cdc)break;else _0x2c09c0['push'](_0x2c09c0['shift']());}catch(_0x587aed){_0x2c09c0['push'](_0x2c09c0['shift']());}}}(a21_0x3c49,0xcf823));function a21_0x1e40(_0x4db6a5,_0x49fae7){const _0x3c49e0=a21_0x3c49();return a21_0x1e40=function(_0x1e40eb,_0x5912fc){_0x1e40eb=_0x1e40eb-0x126;let _0x5c7d34=_0x3c49e0[_0x1e40eb];return _0x5c7d34;},a21_0x1e40(_0x4db6a5,_0x49fae7);}import{delimiter,join}from'node:path';function a21_0x3c49(){const _0xd70ad6=['close','PATH','toString','30fzNhpY','pipe','npm\x20run\x20build','项目构建出错','开始构建项目','项目构建失败','success','cwd','env','项目构建成功','trim','1642879TauAay','183693zMiyaQ','stderr','node_modules','build','10707616ObfKaC','.bin','1184245EpswSQ','277732XlIquz','inherit','471530gIzohN','npm\x20run\x20build\x20exited\x20with\x20code\x20','68FIXUhq','npm','error','19086XNDCKF','message','now','198VnOLzD','info'];a21_0x3c49=function(){return _0xd70ad6;};return a21_0x3c49();}import{spawn}from'node:child_process';import{logger}from'../utils/logger.js';export function runBuild(){return new Promise((_0x1ea736,_0x219b32)=>{const _0x5a4e72=a21_0x1e40,_0x25b23e=Date[_0x5a4e72(0x136)]();logger[_0x5a4e72(0x138)]('build',_0x5a4e72(0x140),{'command':_0x5a4e72(0x13e)});let _0x173f3d='';const _0x16c575=spawn(_0x5a4e72(0x132),['run','build'],{'stdio':['inherit',_0x5a4e72(0x12e),_0x5a4e72(0x13d)],'shell':!![],'env':{...process[_0x5a4e72(0x144)],'PATH':''+join(process[_0x5a4e72(0x143)](),_0x5a4e72(0x128),_0x5a4e72(0x12b))+delimiter+process['env'][_0x5a4e72(0x13a)]}});_0x16c575[_0x5a4e72(0x127)]?.['on']('data',_0x3ecdac=>{const _0x3836ce=_0x5a4e72;_0x173f3d+=_0x3ecdac[_0x3836ce(0x13b)]();}),_0x16c575['on'](_0x5a4e72(0x139),_0x448678=>{const _0x8f41c7=_0x5a4e72,_0x373595=Date[_0x8f41c7(0x136)]()-_0x25b23e;if(_0x448678===0x0||_0x448678===null)logger[_0x8f41c7(0x142)](_0x8f41c7(0x129),_0x8f41c7(0x145),_0x373595),_0x1ea736();else{const _0xff9dda={'exitCode':_0x448678,'duration':_0x373595,'command':_0x8f41c7(0x13e),'cwd':process['cwd']()};_0x173f3d['trim']()&&(_0xff9dda[_0x8f41c7(0x127)]=_0x173f3d[_0x8f41c7(0x146)]()),logger[_0x8f41c7(0x133)]('build',_0x8f41c7(0x141),_0xff9dda),_0x219b32(new Error(_0x8f41c7(0x130)+_0x448678));}}),_0x16c575['on'](_0x5a4e72(0x133),_0x201014=>{const _0x5a2f7c=_0x5a4e72,_0x122c2=Date[_0x5a2f7c(0x136)]()-_0x25b23e;logger[_0x5a2f7c(0x133)](_0x5a2f7c(0x129),_0x5a2f7c(0x13f),{'error':_0x201014[_0x5a2f7c(0x135)],'duration':_0x122c2,'stderr':_0x173f3d[_0x5a2f7c(0x146)]()||undefined}),_0x219b32(_0x201014);});});}
package/lib/cmd/logs.js CHANGED
@@ -1 +1 @@
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
+ function a22_0x98e3(){const _0x3c29d0=['timestamp','580088OHQYFZ','keys','cwd','command','7RlsYkT','*\x20日志已清空','583905eJgVpp','295MyvJJx','error','7780TwEBmP','success','72uGeZfJ','warn','zh-CN','setLogPath','\x20\x20\x20时间:\x20','stringify','9eVMLlw','level','toLocaleString','\x20\x20\x20耗时:\x20','103302xByFSG','log','clearLogs','*\x20Lovrabet\x20CLI\x20日志记录:\x0a','6725896HWECEY','duration','873070SlwWlS','\x20\x20\x20详情:\x20','length','forEach','1303324ONcWvv','message'];a22_0x98e3=function(){return _0x3c29d0;};return a22_0x98e3();}(function(_0x5e7a9f,_0x131955){const _0x5502c5=a22_0x34f3,_0x4d573b=_0x5e7a9f();while(!![]){try{const _0x34f994=-parseInt(_0x5502c5(0x1fa))/0x1+-parseInt(_0x5502c5(0x1f4))/0x2*(-parseInt(_0x5502c5(0x205))/0x3)+parseInt(_0x5502c5(0x1f1))/0x4+-parseInt(_0x5502c5(0x1fb))/0x5*(parseInt(_0x5502c5(0x1e7))/0x6)+-parseInt(_0x5502c5(0x1f8))/0x7*(-parseInt(_0x5502c5(0x1eb))/0x8)+-parseInt(_0x5502c5(0x1ff))/0x9*(-parseInt(_0x5502c5(0x1fd))/0xa)+parseInt(_0x5502c5(0x1ed))/0xb;if(_0x34f994===_0x131955)break;else _0x4d573b['push'](_0x4d573b['shift']());}catch(_0x5da7e4){_0x4d573b['push'](_0x4d573b['shift']());}}}(a22_0x98e3,0x7f95a));import{logger}from'../utils/logger.js';function a22_0x34f3(_0x4234ed,_0x315358){const _0x98e340=a22_0x98e3();return a22_0x34f3=function(_0x34f3dc,_0x146b56){_0x34f3dc=_0x34f3dc-0x1e6;let _0x58835e=_0x98e340[_0x34f3dc];return _0x58835e;},a22_0x34f3(_0x4234ed,_0x315358);}export function showLogs(){const _0x3e11e4=a22_0x34f3;logger['setLogPath'](process[_0x3e11e4(0x1f6)]());const _0x1655f2=logger['readLogs']();if(_0x1655f2[_0x3e11e4(0x1ef)]===0x0){console[_0x3e11e4(0x1e8)]('*\x20暂无日志记录');return;}console[_0x3e11e4(0x1e8)](_0x3e11e4(0x1ea)),_0x1655f2[_0x3e11e4(0x1f0)]((_0x8792c,_0x4c25b4)=>{const _0x128062=_0x3e11e4,_0x4a1322=new Date(_0x8792c[_0x128062(0x1f3)])[_0x128062(0x207)](_0x128062(0x201)),_0x57157f=_0x8792c[_0x128062(0x206)]===_0x128062(0x1fe)?'√':_0x8792c[_0x128062(0x206)]===_0x128062(0x1fc)?'×':_0x8792c[_0x128062(0x206)]===_0x128062(0x200)?'!':'i';console[_0x128062(0x1e8)](_0x4c25b4+0x1+'.\x20'+_0x57157f+'\x20['+_0x8792c[_0x128062(0x1f7)]+']\x20'+_0x8792c[_0x128062(0x1f2)]),console[_0x128062(0x1e8)](_0x128062(0x203)+_0x4a1322),_0x8792c[_0x128062(0x1ec)]&&console[_0x128062(0x1e8)](_0x128062(0x1e6)+_0x8792c['duration']+'ms'),_0x8792c['details']&&Object[_0x128062(0x1f5)](_0x8792c['details'])[_0x128062(0x1ef)]>0x0&&console['log'](_0x128062(0x1ee)+JSON[_0x128062(0x204)](_0x8792c['details'],null,0x2)),console[_0x128062(0x1e8)]('');});}export function clearLogs(){const _0x585cc3=a22_0x34f3;logger[_0x585cc3(0x202)](process[_0x585cc3(0x1f6)]()),logger[_0x585cc3(0x1e9)](),console['log'](_0x585cc3(0x1f9));}
@@ -1 +1 @@
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);});});}
1
+ function a23_0x2da9(){const _0x2236b3=['env','649650nzvKXN','预览服务器启动失败','2ZZcTAG','启动预览服务器','1505NTQMcv','5587410EQVpdB','trim','299885iOabpJ','now','message','预览服务器启动出错','inherit','预览服务器启动成功','preview','close','1900052CTvqpc','success','PATH','error','vite','stderr','.bin','2981376XvPXvQ','info','toString','18366mrNqLC','cwd','16bKMJmn','data','13385gWVBvr','pipe','256PfXlHr'];a23_0x2da9=function(){return _0x2236b3;};return a23_0x2da9();}(function(_0x3d2a29,_0x3a1661){const _0x296dd4=a23_0x7b8e,_0x12daa0=_0x3d2a29();while(!![]){try{const _0x4fb0d7=-parseInt(_0x296dd4(0x162))/0x1+-parseInt(_0x296dd4(0x17e))/0x2*(-parseInt(_0x296dd4(0x17c))/0x3)+-parseInt(_0x296dd4(0x17a))/0x4*(parseInt(_0x296dd4(0x178))/0x5)+-parseInt(_0x296dd4(0x174))/0x6*(-parseInt(_0x296dd4(0x180))/0x7)+parseInt(_0x296dd4(0x176))/0x8*(parseInt(_0x296dd4(0x171))/0x9)+-parseInt(_0x296dd4(0x181))/0xa+-parseInt(_0x296dd4(0x16a))/0xb;if(_0x4fb0d7===_0x3a1661)break;else _0x12daa0['push'](_0x12daa0['shift']());}catch(_0x287159){_0x12daa0['push'](_0x12daa0['shift']());}}}(a23_0x2da9,0x51aab));import{delimiter,join}from'node:path';import{spawn}from'node:child_process';function a23_0x7b8e(_0x31730a,_0x4585fe){const _0x2da90b=a23_0x2da9();return a23_0x7b8e=function(_0x7b8e1c,_0x542342){_0x7b8e1c=_0x7b8e1c-0x161;let _0xa3b3b1=_0x2da90b[_0x7b8e1c];return _0xa3b3b1;},a23_0x7b8e(_0x31730a,_0x4585fe);}import{logger}from'../utils/logger.js';export function runPreview(){return new Promise((_0x3541b5,_0x15b176)=>{const _0x248108=a23_0x7b8e,_0x545f5e=Date[_0x248108(0x163)]();logger[_0x248108(0x172)](_0x248108(0x168),_0x248108(0x17f),{'command':'vite\x20preview'});let _0x2c3c58='';const _0x1f0ca1=spawn(_0x248108(0x16e),[_0x248108(0x168)],{'stdio':[_0x248108(0x166),_0x248108(0x166),_0x248108(0x179)],'shell':!![],'env':{...process[_0x248108(0x17b)],'PATH':''+join(process['cwd'](),'node_modules',_0x248108(0x170))+delimiter+process[_0x248108(0x17b)][_0x248108(0x16c)]}});_0x1f0ca1[_0x248108(0x16f)]?.['on'](_0x248108(0x177),_0x594421=>{const _0x544f05=_0x248108;_0x2c3c58+=_0x594421[_0x544f05(0x173)]();}),_0x1f0ca1['on'](_0x248108(0x169),_0x29634a=>{const _0x42998a=_0x248108,_0x4d04d5=Date[_0x42998a(0x163)]()-_0x545f5e;if(_0x29634a===0x0||_0x29634a===null)logger[_0x42998a(0x16b)](_0x42998a(0x168),_0x42998a(0x167),_0x4d04d5),_0x3541b5();else{const _0xd65693={'exitCode':_0x29634a,'duration':_0x4d04d5,'command':'vite\x20preview','cwd':process[_0x42998a(0x175)]()};_0x2c3c58[_0x42998a(0x161)]()&&(_0xd65693[_0x42998a(0x16f)]=_0x2c3c58['trim']()),logger['error'](_0x42998a(0x168),_0x42998a(0x17d),_0xd65693),_0x15b176(new Error('vite\x20preview\x20exited\x20with\x20code\x20'+_0x29634a));}}),_0x1f0ca1['on'](_0x248108(0x16d),_0x5401c0=>{const _0x2ff184=_0x248108,_0x18a590=Date[_0x2ff184(0x163)]()-_0x545f5e;logger[_0x2ff184(0x16d)](_0x2ff184(0x168),_0x2ff184(0x165),{'error':_0x5401c0[_0x2ff184(0x164)],'duration':_0x18a590,'stderr':_0x2c3c58[_0x2ff184(0x161)]()||undefined}),_0x15b176(_0x5401c0);});});}
package/lib/cmd/start.js CHANGED
@@ -1 +1 @@
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
+ function a24_0x4d1e(){const _0x150a74=['close','开发服务器启动失败','trim','stderr','7390ywbwOu','开发服务器启动成功','node_modules','1730720EhBLWz','启动开发服务器','error','cwd','开发服务器启动出错','84kkQnVW','1466730kLPQQo','581585mwscHX','2808QvKegt','178020uqpaeS','448222FaVsGh','inherit','start','12548QURXBN','now','message','success','info','6AdnRqG','vite','env','PATH','.bin','pipe'];a24_0x4d1e=function(){return _0x150a74;};return a24_0x4d1e();}(function(_0x4fb6a2,_0x52c144){const _0x38e9eb=a24_0x4cdb,_0x153d26=_0x4fb6a2();while(!![]){try{const _0x470fda=parseInt(_0x38e9eb(0x15d))/0x1+-parseInt(_0x38e9eb(0x160))/0x2+parseInt(_0x38e9eb(0x149))/0x3*(parseInt(_0x38e9eb(0x163))/0x4)+parseInt(_0x38e9eb(0x15c))/0x5+parseInt(_0x38e9eb(0x15f))/0x6*(-parseInt(_0x38e9eb(0x15b))/0x7)+-parseInt(_0x38e9eb(0x156))/0x8+-parseInt(_0x38e9eb(0x15e))/0x9*(-parseInt(_0x38e9eb(0x153))/0xa);if(_0x470fda===_0x52c144)break;else _0x153d26['push'](_0x153d26['shift']());}catch(_0x4c6294){_0x153d26['push'](_0x153d26['shift']());}}}(a24_0x4d1e,0x4cf92));import{delimiter,join}from'node:path';import{spawn}from'node:child_process';import{logger}from'../utils/logger.js';function a24_0x4cdb(_0x54e87d,_0x45128a){const _0x4d1ed4=a24_0x4d1e();return a24_0x4cdb=function(_0x4cdb4c,_0x6eda91){_0x4cdb4c=_0x4cdb4c-0x147;let _0x192290=_0x4d1ed4[_0x4cdb4c];return _0x192290;},a24_0x4cdb(_0x54e87d,_0x45128a);}export function runStart(_0x4a71f0){return new Promise((_0x5fdcf,_0x3decea)=>{const _0x4e4d12=a24_0x4cdb,_0x379376=Date[_0x4e4d12(0x164)](),_0xfeb0a8=_0x4a71f0||process[_0x4e4d12(0x159)]();logger[_0x4e4d12(0x148)]('start',_0x4e4d12(0x157),{'command':_0x4e4d12(0x14a),'cwd':_0xfeb0a8});let _0x78424a='';const _0x5d29f3=spawn(_0x4e4d12(0x14a),{'stdio':[_0x4e4d12(0x161),_0x4e4d12(0x161),_0x4e4d12(0x14e)],'shell':!![],'cwd':_0xfeb0a8,'env':{...process['env'],'PATH':''+join(_0xfeb0a8,_0x4e4d12(0x155),_0x4e4d12(0x14d))+delimiter+process[_0x4e4d12(0x14b)][_0x4e4d12(0x14c)]}});_0x5d29f3[_0x4e4d12(0x152)]?.['on']('data',_0x3782d9=>{const _0x3b370d=_0x4e4d12,_0x12cfb5=_0x3782d9['toString']();_0x78424a+=_0x12cfb5,process[_0x3b370d(0x152)]['write'](_0x12cfb5);}),_0x5d29f3['on'](_0x4e4d12(0x14f),_0x16da10=>{const _0x200f4d=_0x4e4d12,_0x2a8499=Date['now']()-_0x379376;if(_0x16da10===0x0||_0x16da10===null)logger[_0x200f4d(0x147)]('start',_0x200f4d(0x154),_0x2a8499),_0x5fdcf();else{const _0x2ed1ff={'exitCode':_0x16da10,'duration':_0x2a8499,'command':_0x200f4d(0x14a),'cwd':_0xfeb0a8};_0x78424a['trim']()&&(_0x2ed1ff[_0x200f4d(0x152)]=_0x78424a[_0x200f4d(0x151)]()),logger[_0x200f4d(0x158)](_0x200f4d(0x162),_0x200f4d(0x150),_0x2ed1ff),_0x3decea(new Error('vite\x20exited\x20with\x20code\x20'+_0x16da10));}}),_0x5d29f3['on'](_0x4e4d12(0x158),_0x51abd9=>{const _0x3daf86=_0x4e4d12,_0x35eb2e=Date['now']()-_0x379376,_0x3aa9e7={'error':_0x51abd9[_0x3daf86(0x165)],'duration':_0x35eb2e,'command':_0x3daf86(0x14a),'cwd':_0xfeb0a8};_0x78424a[_0x3daf86(0x151)]()&&(_0x3aa9e7['stderr']=_0x78424a[_0x3daf86(0x151)]()),logger[_0x3daf86(0x158)](_0x3daf86(0x162),_0x3daf86(0x15a),_0x3aa9e7),_0x3decea(_0x51abd9);});});}
@@ -1 +1 @@
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
+ function a25_0x5b8b(){const _0x21b75e=['gray','配置当前项目的\x20App\x20Code','4059306vxsbYG','lovrabet\x20config\x20list\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','12574480yuaTFz','无效的命令,可用命令如下:','lovrabet\x20config\x20set\x20<key>\x20<value>\x20\x20\x20','\x20\x20\x20\x20','5392051IGhhtl','lovrabet\x20config\x20set\x20app\x20app-xxxxx\x20\x20\x20','6HECynl','97124APYAeM','85984VOCOyb','lovrabet\x20config\x20set\x20env\x20daily\x20\x20\x20\x20\x20\x20\x20','column','25AmRIec','218875OrGJYa','获取配置项','lovrabet\x20config\x20get\x20<key>\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','command','513BGRXXP','1318320awiDdc','map','\x20*\x20配置示例:'];a25_0x5b8b=function(){return _0x21b75e;};return a25_0x5b8b();}(function(_0x3f85bf,_0x1288d6){const _0x2d892b=a25_0x587a,_0x2f39e6=_0x3f85bf();while(!![]){try{const _0x19a48e=parseInt(_0x2d892b(0x1b5))/0x1*(parseInt(_0x2d892b(0x1af))/0x2)+parseInt(_0x2d892b(0x1ba))/0x3+-parseInt(_0x2d892b(0x1b0))/0x4*(-parseInt(_0x2d892b(0x1b4))/0x5)+-parseInt(_0x2d892b(0x1a7))/0x6+-parseInt(_0x2d892b(0x1ad))/0x7+-parseInt(_0x2d892b(0x1b1))/0x8*(parseInt(_0x2d892b(0x1b9))/0x9)+parseInt(_0x2d892b(0x1a9))/0xa;if(_0x19a48e===_0x1288d6)break;else _0x2f39e6['push'](_0x2f39e6['shift']());}catch(_0x2d056e){_0x2f39e6['push'](_0x2f39e6['shift']());}}}(a25_0x5b8b,0x656ce));import{jsxs as a25_0x48cd99,jsx as a25_0x1a1e7f}from'react/jsx-runtime';function a25_0x587a(_0x410130,_0x208510){const _0x5b8bbc=a25_0x5b8b();return a25_0x587a=function(_0x587add,_0x1080db){_0x587add=_0x587add-0x1a5;let _0x1a2976=_0x5b8bbc[_0x587add];return _0x1a2976;},a25_0x587a(_0x410130,_0x208510);}import{Box,Text}from'ink';export function ConfigHelp(){const _0xe39bc2=a25_0x587a,_0x235c01=[{'command':_0xe39bc2(0x1ab),'description':'设置配置项'},{'command':_0xe39bc2(0x1b7),'description':_0xe39bc2(0x1b6)},{'command':_0xe39bc2(0x1a8),'description':'列出所有配置项'}],_0x5ad806=[{'command':_0xe39bc2(0x1ae),'description':_0xe39bc2(0x1a6)},{'command':_0xe39bc2(0x1b2),'description':'设置环境\x20(online/daily)'}];return a25_0x48cd99(Box,{'flexDirection':_0xe39bc2(0x1b3),'marginTop':0x1,'marginBottom':0x1,'children':[a25_0x1a1e7f(Box,{'marginBottom':0x1,'children':a25_0x48cd99(Text,{'color':_0xe39bc2(0x1a5),'children':['\x20!','\x20\x20',_0xe39bc2(0x1aa)]})}),_0x235c01[_0xe39bc2(0x1bb)](_0x3dc05e=>a25_0x48cd99(Box,{'children':[a25_0x48cd99(Text,{'children':[_0xe39bc2(0x1ac),_0x3dc05e[_0xe39bc2(0x1b8)]]}),a25_0x1a1e7f(Text,{'color':_0xe39bc2(0x1a5),'children':_0x3dc05e['description']})]},_0x3dc05e[_0xe39bc2(0x1b8)])),a25_0x1a1e7f(Box,{'marginTop':0x1,'marginBottom':0x1,'children':a25_0x1a1e7f(Text,{'color':_0xe39bc2(0x1a5),'children':_0xe39bc2(0x1bc)})}),_0x5ad806['map'](_0x21cc3a=>a25_0x48cd99(Box,{'children':[a25_0x48cd99(Text,{'children':[_0xe39bc2(0x1ac),_0x21cc3a['command']]}),a25_0x1a1e7f(Text,{'color':_0xe39bc2(0x1a5),'children':_0x21cc3a['description']})]},_0x21cc3a[_0xe39bc2(0x1b8)]))]});}
@@ -1 +1 @@
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
+ (function(_0x24381e,_0x11df3){const _0x590237=a26_0x17be,_0x3efcee=_0x24381e();while(!![]){try{const _0x167c27=parseInt(_0x590237(0x152))/0x1*(parseInt(_0x590237(0x163))/0x2)+parseInt(_0x590237(0x160))/0x3*(parseInt(_0x590237(0x174))/0x4)+-parseInt(_0x590237(0x156))/0x5*(parseInt(_0x590237(0x157))/0x6)+-parseInt(_0x590237(0x170))/0x7+parseInt(_0x590237(0x161))/0x8+parseInt(_0x590237(0x176))/0x9+parseInt(_0x590237(0x171))/0xa*(-parseInt(_0x590237(0x162))/0xb);if(_0x167c27===_0x11df3)break;else _0x3efcee['push'](_0x3efcee['shift']());}catch(_0x169369){_0x3efcee['push'](_0x3efcee['shift']());}}}(a26_0x2759,0xcc24e));import{jsx as a26_0x2f7453,jsxs as a26_0x208da6}from'react/jsx-runtime';import{existsSync,readFileSync,writeFileSync}from'node:fs';import a26_0x36a17c from'node:fs';import a26_0x21a282 from'node:path';function a26_0x17be(_0x22934c,_0x44d254){const _0x27597d=a26_0x2759();return a26_0x17be=function(_0x17beeb,_0x47f33d){_0x17beeb=_0x17beeb-0x152;let _0x4a03e1=_0x27597d[_0x17beeb];return _0x4a03e1;},a26_0x17be(_0x22934c,_0x44d254);}import{ConfigHelp}from'./config-help.js';import{Box,Text}from'ink';function a26_0x2759(){const _0x54b6fb=['undefined','appcode','get','--help','help','online','1300243DLKCQU','2740fzcGQu','message','flags','3098684HLvqpW','red','4827087fFnUCz','unlinkSync','env','769221gqZAkc','stringify','parse','length','15XEAseX','1491564akNqSF','daily','includes','input','环境配置已设置为:\x20','utf8','set','config','dirname','6DywvPK','2959448ruiCQM','58498oQUunR','2wfvNgV','保存配置失败:\x20','配置值无效或过长','error','log','string','app'];a26_0x2759=function(){return _0x54b6fb;};return a26_0x2759();}import{readConfig,isInProject,projectConfigPath,globalConfigPath}from'../utils/config.js';import{logger}from'../utils/logger.js';export function Config(_0x33ebea){const _0x17b981=a26_0x17be,{cli:_0x5af058}=_0x33ebea,_0x46d21e=_0x5af058[_0x17b981(0x15a)][0x1],_0x1b8fc7=_0x5af058[_0x17b981(0x15a)][0x2],_0x3c5582=[_0x17b981(0x15d),_0x17b981(0x16c)][_0x17b981(0x159)](_0x46d21e||''),_0x2a7869=_0x5af058[_0x17b981(0x15a)]['length']>=0x3;if(_0x1b8fc7===_0x17b981(0x16d)||_0x5af058[_0x17b981(0x173)][_0x17b981(0x16e)])return a26_0x2f7453(ConfigHelp,{});const _0x449183=readConfig();if(_0x46d21e===_0x17b981(0x15d)){if(_0x1b8fc7){const _0x24bb6b=_0x5af058['input'][0x3];if(typeof _0x24bb6b!==_0x17b981(0x16a)){if(_0x1b8fc7==='env'&&![_0x17b981(0x16f),_0x17b981(0x158)]['includes'](_0x24bb6b))return a26_0x2f7453(Box,{'children':a26_0x2f7453(Text,{'color':_0x17b981(0x175),'children':'环境配置值只能是\x20\x22online\x22\x20或\x20\x22daily\x22'})});const _0x5e3eec=isInProject(),_0x4afbc9=_0x5e3eec?projectConfigPath:globalConfigPath;let _0x2ac32b={};try{if(existsSync(_0x4afbc9)){const _0x48f8e9=readFileSync(_0x4afbc9,{'encoding':_0x17b981(0x15c)});_0x48f8e9&&(_0x2ac32b=JSON[_0x17b981(0x154)](_0x48f8e9));}}catch(_0x3f3629){}if(typeof _0x24bb6b!==_0x17b981(0x168)||_0x24bb6b[_0x17b981(0x155)]>0x1f4)return a26_0x2f7453(Box,{'children':a26_0x2f7453(Text,{'color':_0x17b981(0x175),'children':_0x17b981(0x165)})});let _0x4fb383=_0x1b8fc7;_0x1b8fc7==='app'&&(_0x4fb383=_0x17b981(0x16b),delete _0x2ac32b[_0x17b981(0x169)]);_0x1b8fc7==='appcode'&&delete _0x2ac32b['app'];_0x2ac32b[_0x4fb383]=_0x24bb6b;try{const _0x1b2d41=a26_0x21a282[_0x17b981(0x15f)](_0x4afbc9);!existsSync(_0x1b2d41)&&a26_0x36a17c['mkdirSync'](_0x1b2d41,{'recursive':!![]});const _0xb7b635=_0x4afbc9+'.tmp';writeFileSync(_0xb7b635,JSON[_0x17b981(0x153)](_0x2ac32b,null,0x2),{'encoding':_0x17b981(0x15c),'mode':0x180}),a26_0x36a17c['renameSync'](_0xb7b635,_0x4afbc9);if(_0x1b8fc7===_0x17b981(0x178)){const _0x220fd9=_0x5e3eec?'项目':'全局';console[_0x17b981(0x167)]('✓\x20'+_0x220fd9+_0x17b981(0x15b)+_0x24bb6b);}}catch(_0x53bc8d){const _0x168904=_0x4afbc9+'.tmp';try{existsSync(_0x168904)&&a26_0x36a17c[_0x17b981(0x177)](_0x168904);}catch(_0x2d109c){}return logger[_0x17b981(0x166)](_0x17b981(0x15e),'保存配置失败',{'error':_0x53bc8d instanceof Error?_0x53bc8d['message']:String(_0x53bc8d),'configKey':_0x1b8fc7,'configValue':_0x24bb6b,'targetConfigPath':_0x4afbc9}),a26_0x2f7453(Box,{'children':a26_0x208da6(Text,{'color':'red','children':[_0x17b981(0x164),_0x53bc8d instanceof Error?_0x53bc8d[_0x17b981(0x172)]:String(_0x53bc8d)]})});}return null;}return a26_0x2f7453(Box,{'children':a26_0x2f7453(Text,{'color':_0x17b981(0x175),'children':'未提供配置值'})});}}if(_0x46d21e===_0x17b981(0x16c)){if(_0x1b8fc7){let _0x4980cf=_0x1b8fc7;return _0x1b8fc7===_0x17b981(0x169)&&(_0x4980cf=_0x17b981(0x16b)),console['log'](_0x449183[_0x4980cf]||_0x17b981(0x16a)),null;}return null;}if(_0x46d21e==='list')return console[_0x17b981(0x167)](JSON[_0x17b981(0x153)](_0x449183,null,0x2)),null;if(!_0x3c5582||!_0x2a7869)return a26_0x2f7453(ConfigHelp,{});return null;}
@@ -1 +1 @@
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
+ const a27_0x43eb1e=a27_0x3a23;(function(_0x3b9854,_0x407865){const _0x25a0b2=a27_0x3a23,_0x2e8ab8=_0x3b9854();while(!![]){try{const _0x398d3f=-parseInt(_0x25a0b2(0x174))/0x1+-parseInt(_0x25a0b2(0x172))/0x2+-parseInt(_0x25a0b2(0x168))/0x3*(-parseInt(_0x25a0b2(0x169))/0x4)+parseInt(_0x25a0b2(0x175))/0x5+parseInt(_0x25a0b2(0x16b))/0x6*(-parseInt(_0x25a0b2(0x16f))/0x7)+-parseInt(_0x25a0b2(0x16a))/0x8+-parseInt(_0x25a0b2(0x16d))/0x9*(-parseInt(_0x25a0b2(0x171))/0xa);if(_0x398d3f===_0x407865)break;else _0x2e8ab8['push'](_0x2e8ab8['shift']());}catch(_0x383edd){_0x2e8ab8['push'](_0x2e8ab8['shift']());}}}(a27_0x537a,0xf1149));import{getEnv}from'./env.js';function a27_0x3a23(_0x584cc0,_0x48a1fb){const _0x537a43=a27_0x537a();return a27_0x3a23=function(_0x3a2333,_0x5e3eed){_0x3a2333=_0x3a2333-0x168;let _0x7deca3=_0x537a43[_0x3a2333];return _0x7deca3;},a27_0x3a23(_0x584cc0,_0x48a1fb);}function a27_0x537a(){const _0x15ba7b=['7411420weWtXY','3329786ZeqwJc','online','31152VKBicH','8474610bOKYhn','https://user-daily.lovrabet.com','2365179fDIUlY','4fYeJjr','12898472pevywH','24JtNdfj','https://api.lovrabet.com','36xVeTGz','https://daily-api.lovrabet.com','2016112KoqMIM','https://user.lovrabet.com'];a27_0x537a=function(){return _0x15ba7b;};return a27_0x537a();}export const getUserDomain=()=>getEnv()===a27_0x43eb1e(0x173)?a27_0x43eb1e(0x170):a27_0x43eb1e(0x176);export const getApiDomain=()=>getEnv()===a27_0x43eb1e(0x173)?a27_0x43eb1e(0x16c):a27_0x43eb1e(0x16e);
@@ -1 +1 @@
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
+ const a28_0x71a844=a28_0x1a48;(function(_0x99187e,_0x158f0c){const _0x51fb0e=a28_0x1a48,_0x1e231c=_0x99187e();while(!![]){try{const _0x430765=-parseInt(_0x51fb0e(0xb6))/0x1*(parseInt(_0x51fb0e(0xbc))/0x2)+-parseInt(_0x51fb0e(0xb8))/0x3+-parseInt(_0x51fb0e(0xb9))/0x4+-parseInt(_0x51fb0e(0xb7))/0x5*(parseInt(_0x51fb0e(0xb4))/0x6)+parseInt(_0x51fb0e(0xbb))/0x7+-parseInt(_0x51fb0e(0xbe))/0x8+parseInt(_0x51fb0e(0xbd))/0x9*(parseInt(_0x51fb0e(0xba))/0xa);if(_0x430765===_0x158f0c)break;else _0x1e231c['push'](_0x1e231c['shift']());}catch(_0x4f9573){_0x1e231c['push'](_0x1e231c['shift']());}}}(a28_0x4984,0xe3c5c));function a28_0x1a48(_0x312185,_0x1bcac3){const _0x498478=a28_0x4984();return a28_0x1a48=function(_0x1a4811,_0x88e5dc){_0x1a4811=_0x1a4811-0xb4;let _0x2ce1a8=_0x498478[_0x1a4811];return _0x2ce1a8;},a28_0x1a48(_0x312185,_0x1bcac3);}function a28_0x4984(){const _0x465d7f=['5211xpFBuP','6752800XKdIzv','6Axvkqw','env','8056mdCVhg','933845bUmIph','5397459ggmTrw','383636LxvNxn','65390JGmMBu','735210prQPjb','8sbXzeY'];a28_0x4984=function(){return _0x465d7f;};return a28_0x4984();}let env=process[a28_0x71a844(0xb5)]['LOVRABET_ENV']||'online';export function getEnv(){return env;}export function initEnv(_0x186067){env=_0x186067;}
@@ -1 +1 @@
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
+ (function(_0x1846e5,_0x6d7e5f){const _0x30f93f=a29_0x2bc2,_0x23b942=_0x1846e5();while(!![]){try{const _0x300629=-parseInt(_0x30f93f(0x107))/0x1+-parseInt(_0x30f93f(0x112))/0x2*(-parseInt(_0x30f93f(0xf9))/0x3)+-parseInt(_0x30f93f(0xd3))/0x4*(-parseInt(_0x30f93f(0x105))/0x5)+-parseInt(_0x30f93f(0xeb))/0x6*(-parseInt(_0x30f93f(0x102))/0x7)+parseInt(_0x30f93f(0xd6))/0x8*(-parseInt(_0x30f93f(0xf2))/0x9)+-parseInt(_0x30f93f(0x10d))/0xa+-parseInt(_0x30f93f(0x114))/0xb*(parseInt(_0x30f93f(0xf7))/0xc);if(_0x300629===_0x6d7e5f)break;else _0x23b942['push'](_0x23b942['shift']());}catch(_0x36d6a4){_0x23b942['push'](_0x23b942['shift']());}}}(a29_0x1cb4,0x1d4d6));import{jsx as a29_0x33bf87,jsxs as a29_0x554154,Fragment as a29_0x34183c}from'react/jsx-runtime';function a29_0x2bc2(_0x54db9e,_0x3a306e){const _0x1cb461=a29_0x1cb4();return a29_0x2bc2=function(_0x2bc296,_0x37590f){_0x2bc296=_0x2bc296-0xd3;let _0x134b62=_0x1cb461[_0x2bc296];return _0x134b62;},a29_0x2bc2(_0x54db9e,_0x3a306e);}import{useState}from'react';import{Text,Box,useInput}from'ink';import{getIsSessionValid}from'../auth/is-session-valid.js';import{authServer}from'../auth/auth-server.js';function a29_0x1cb4(){const _0x4efce8=['login-prompt','\x20\x20推荐选择\x20Yes,登录后可自动拉取并配置\x20API\x20接口','yellow','27VSSlqd','map','delete','value','project-name','456kMyIhE','green','7602qonjlm','\x20直接回车确认,或输入自定义名称','*\x20创建新项目','\x20\x20使用\x20←→\x20选择,回车确认','应用AppCode','api-pull','login-check','*\x20正在检查登录状态...','includes','7EBCBYZ','creating','Yes','40TkFiVY','app-code','18159vwRLze','login','online','\x20\x20推荐选择\x20Yes,可自动配置\x20API\x20接口','*\x20正在登录,请前往浏览器完成登录...','confirm-api-pull','1129700lrASAr','return','拉取API配置','应用AppCode长度不能超过\x20100\x20个字符','*\x20是否要自动拉取\x20API\x20配置?','124fZROmO','leftArrow','12364NjoLil','87572kKZFkK','\x20登录中...','login-process','511312vikUzJ','env','应用AppCode只能包含字母、数字、连字符和下划线,且必须以字母或数字开头','*\x20应用AppCode\x20','[可选]:\x20','my-app','label','cyan','\x20←\x20','登录状态','应用AppCode不合法','step','!\x20未检测到有效登录','项目名','项目名不合法','slice','red','trim','rightArrow','绑定应用AppCode可自动配置\x20API,如:\x20app-c4c89304\x20(直接回车跳过)','跳过登录','920118cJALxI','length','gray','项目名只能以字母或数字开头,且只包含字母、数字、-\x20和\x20_'];a29_0x1cb4=function(){return _0x4efce8;};return a29_0x1cb4();}import{readConfig}from'../utils/config.js';export function EnhancedGuidedCreate(_0x47c2f1){const _0x508e95=a29_0x2bc2,{onCreate:_0x12651f,env:_0x540f60}=_0x47c2f1,[_0x3e7ff6,_0x487c2a]=useState(_0x508e95(0xf6)),[_0x5d1425,_0x50210d]=useState(''),[_0x1fb80b,_0x641874]=useState(''),[_0x34315f,_0x152175]=useState(''),[_0x46c952,_0x63a98a]=useState(''),[_0x43982b,_0x431a24]=useState([]),[_0x506d1b,_0x2e4787]=useState(null),[_0x1f511c,_0x272000]=useState(![]),[_0x1e5b65,_0x2e28ee]=useState(![]),[_0x100c05,_0x177703]=useState(![]),[_0x32a6bf,_0x8eaed2]=useState(0x0),[_0x52cc96,_0x53b4b0]=useState(0x0),_0x27f21d=_0x508e95(0xdb),_0xe2e8f9=readConfig(),_0x17507a=typeof _0xe2e8f9[_0x508e95(0xd7)]==='string'?_0xe2e8f9[_0x508e95(0xd7)]:undefined;function _0x14f708(_0x4d76cd){const _0x3fde93=_0x508e95;if(_0x4d76cd[_0x3fde93(0xec)]>0x32)return{'valid':![],'message':'项目名长度不能超过\x2050\x20个字符'};const _0x15a202=/^[A-Za-z0-9][A-Za-z0-9_-]*$/;if(_0x4d76cd?.[_0x3fde93(0xe7)]()&&!_0x15a202['test'](_0x4d76cd))return{'valid':![],'message':_0x3fde93(0xee)};return{'valid':!![]};}function _0x55cbe2(_0x16e357){const _0x1f8568=_0x508e95;if(!_0x16e357['trim']())return{'valid':!![]};if(_0x16e357[_0x1f8568(0xec)]>0x64)return{'valid':![],'message':_0x1f8568(0x110)};const _0x3ceeaf=/^[a-zA-Z0-9][a-zA-Z0-9_-]*$/;if(!_0x3ceeaf['test'](_0x16e357))return{'valid':![],'message':_0x1f8568(0xd8)};return{'valid':!![]};}async function _0x1e71af(){_0x272000(!![]);try{const _0x2bb9e6=await getIsSessionValid();return _0x2e4787(_0x2bb9e6),_0x2bb9e6;}catch(_0xe3b009){return _0x2e4787(![]),![];}finally{_0x272000(![]);}}async function _0x2ae90d(){_0x2e28ee(!![]);try{const _0x2edc26=await authServer({'silent':!![]});return _0x2e4787(_0x2edc26),_0x2edc26;}catch(_0x8c245){return _0x2e4787(![]),![];}finally{_0x2e28ee(![]);}}return useInput(async(_0x53280c,_0x1f9205)=>{const _0x9189b5=_0x508e95;if(_0x1f9205[_0x9189b5(0x113)]||_0x1f9205[_0x9189b5(0xe8)]){if(_0x3e7ff6==='confirm-api-pull'){_0x8eaed2(_0x1a5c4c=>_0x1a5c4c===0x0?0x1:0x0);return;}if(_0x3e7ff6===_0x9189b5(0xef)){_0x53b4b0(_0x379d91=>_0x379d91===0x0?0x1:0x0);return;}}if(_0x1f9205[_0x9189b5(0x10e)]){if(_0x3e7ff6===_0x9189b5(0xf6)){const _0x7a827a=_0x34315f[_0x9189b5(0xe7)]()||_0x27f21d;if(_0x46c952)return;_0x50210d(_0x7a827a),_0x431a24([{'step':_0x9189b5(0xf6),'label':_0x9189b5(0xe3),'value':_0x7a827a}]),_0x152175(''),_0x63a98a(''),_0x487c2a(_0x9189b5(0x106));return;}if(_0x3e7ff6===_0x9189b5(0x106)){if(_0x46c952)return;const _0x4127f9=_0x34315f[_0x9189b5(0xe7)]();_0x641874(_0x4127f9),_0x431a24(_0x17042e=>[..._0x17042e,{'step':_0x9189b5(0x106),'label':_0x9189b5(0xfd),'value':_0x4127f9||'未设置'}]),_0x152175(''),_0x63a98a('');if(_0x4127f9){_0x487c2a(_0x9189b5(0xff));const _0x5e2f6a=await _0x1e71af();_0x5e2f6a?_0x487c2a('confirm-api-pull'):_0x487c2a('login-prompt');}else{const _0x60d5cd=_0x540f60||_0x17507a||'online';_0x12651f({'projectName':_0x5d1425,'appCode':undefined,'pullApi':![],'env':_0x60d5cd}),_0x487c2a(_0x9189b5(0x103));}return;}if(_0x3e7ff6===_0x9189b5(0x10c)){const _0x3626a1=_0x32a6bf===0x0;_0x177703(_0x3626a1),_0x431a24(_0x3de522=>[..._0x3de522,{'step':_0x9189b5(0xfe),'label':_0x9189b5(0x10f),'value':_0x3626a1?'是':'否'}]);const _0x19695e=_0x540f60||_0x17507a||_0x9189b5(0x109);_0x12651f({'projectName':_0x5d1425,'appCode':_0x1fb80b,'pullApi':_0x3626a1,'env':_0x19695e}),_0x487c2a('creating');return;}if(_0x3e7ff6==='login-prompt'){const _0x1c21c0=_0x52cc96===0x0;if(_0x1c21c0){_0x487c2a(_0x9189b5(0xd5));const _0x1c93cf=await _0x2ae90d();if(_0x1c93cf)_0x431a24(_0x153a49=>[..._0x153a49,{'step':_0x9189b5(0x108),'label':_0x9189b5(0xdf),'value':'已登录'}]),_0x487c2a(_0x9189b5(0x10c));else{_0x431a24(_0x2f9039=>[..._0x2f9039,{'step':_0x9189b5(0x108),'label':_0x9189b5(0xdf),'value':'登录失败'}]);const _0x414f27=_0x540f60||_0x17507a||_0x9189b5(0x109);_0x12651f({'projectName':_0x5d1425,'appCode':_0x1fb80b,'pullApi':![],'env':_0x414f27}),_0x487c2a(_0x9189b5(0x103));}}else{_0x431a24(_0x130dba=>[..._0x130dba,{'step':_0x9189b5(0x108),'label':_0x9189b5(0xdf),'value':_0x9189b5(0xea)}]);const _0x535df3=_0x540f60||_0x17507a||_0x9189b5(0x109);_0x12651f({'projectName':_0x5d1425,'appCode':_0x1fb80b,'pullApi':![],'env':_0x535df3}),_0x487c2a(_0x9189b5(0x103));}return;}}if(_0x1f9205['backspace']||_0x1f9205[_0x9189b5(0xf4)]){_0x152175(_0x335380=>{const _0xe9bfe7=_0x9189b5,_0x2336fb=_0x335380[_0xe9bfe7(0xe5)](0x0,-0x1);if(_0x3e7ff6===_0xe9bfe7(0xf6)){const {valid:_0x58ffe0,message:_0x2690b4}=_0x14f708(_0x2336fb);_0x63a98a(_0x58ffe0?'':_0x2690b4||'项目名不合法');}else{if(_0x3e7ff6===_0xe9bfe7(0x106)){const {valid:_0x3069bf,message:_0x1b8c0e}=_0x55cbe2(_0x2336fb);_0x63a98a(_0x3069bf?'':_0x1b8c0e||_0xe9bfe7(0xe0));}}return _0x2336fb;});return;}if([_0x9189b5(0x103),_0x9189b5(0xff),'login-process'][_0x9189b5(0x101)](_0x3e7ff6))return;if(_0x3e7ff6===_0x9189b5(0x10c)||_0x3e7ff6===_0x9189b5(0xef))return;_0x152175(_0x334ede=>{const _0x1c6242=_0x9189b5,_0x15285e=_0x334ede+_0x53280c;if(_0x3e7ff6===_0x1c6242(0xf6)){const {valid:_0x2243ac,message:_0x138d70}=_0x14f708(_0x15285e);_0x63a98a(_0x2243ac?'':_0x138d70||_0x1c6242(0xe4));}else{if(_0x3e7ff6===_0x1c6242(0x106)){const {valid:_0x1cec2c,message:_0x4b65a3}=_0x55cbe2(_0x15285e);_0x63a98a(_0x1cec2c?'':_0x4b65a3||_0x1c6242(0xe0));}}return _0x15285e;});}),a29_0x554154(Box,{'flexDirection':'column','marginTop':0x1,'children':[_0x43982b[_0x508e95(0xec)]===0x0&&a29_0x33bf87(Box,{'children':a29_0x33bf87(Text,{'color':_0x508e95(0xdd),'children':_0x508e95(0xfb)})}),_0x43982b[_0x508e95(0xf3)](_0x1ab34d=>a29_0x554154(Box,{'children':[a29_0x554154(Text,{'color':_0x508e95(0xf8),'children':['√\x20',_0x1ab34d[_0x508e95(0xdc)],':\x20']}),a29_0x33bf87(Text,{'color':'cyan','children':_0x1ab34d[_0x508e95(0xf5)]})]},_0x1ab34d[_0x508e95(0xe1)])),_0x3e7ff6===_0x508e95(0xf6)&&a29_0x554154(a29_0x34183c,{'children':[a29_0x554154(Box,{'children':[a29_0x33bf87(Text,{'children':'*\x20项目名:\x20'}),_0x34315f?a29_0x33bf87(Text,{'color':'green','children':_0x34315f}):a29_0x33bf87(Text,{'color':_0x508e95(0xed),'children':_0x27f21d}),_0x46c952&&a29_0x554154(Text,{'color':_0x508e95(0xe6),'children':[_0x508e95(0xde),_0x46c952]})]}),!_0x46c952&&!_0x34315f&&a29_0x33bf87(Box,{'children':a29_0x33bf87(Text,{'color':_0x508e95(0xed),'children':_0x508e95(0xfa)})})]}),_0x3e7ff6===_0x508e95(0x106)&&a29_0x554154(a29_0x34183c,{'children':[a29_0x554154(Box,{'children':[a29_0x33bf87(Text,{'children':_0x508e95(0xd9)}),a29_0x33bf87(Text,{'color':_0x508e95(0xed),'children':_0x508e95(0xda)}),a29_0x33bf87(Text,{'color':_0x508e95(0xf8),'children':_0x34315f}),_0x46c952&&a29_0x554154(Text,{'color':'red','children':[_0x508e95(0xde),_0x46c952]})]}),!_0x46c952&&a29_0x33bf87(Box,{'children':a29_0x554154(Text,{'color':_0x508e95(0xed),'children':['\x20',_0x508e95(0xe9)]})})]}),_0x3e7ff6==='login-check'&&a29_0x554154(Box,{'children':[a29_0x33bf87(Text,{'children':_0x508e95(0x100)}),_0x1f511c&&a29_0x33bf87(Text,{'color':'gray','children':'\x20检查中...'})]}),_0x3e7ff6===_0x508e95(0x10c)&&a29_0x554154(a29_0x34183c,{'children':[a29_0x33bf87(Box,{'children':a29_0x33bf87(Text,{'color':'green','children':'√\x20检测到有效登录状态'})}),a29_0x33bf87(Box,{'marginTop':0x1,'children':a29_0x33bf87(Text,{'children':_0x508e95(0x111)})}),a29_0x554154(Box,{'marginLeft':0x2,'children':[a29_0x554154(Text,{'color':_0x32a6bf===0x0?_0x508e95(0xf8):_0x508e95(0xed),'children':[_0x32a6bf===0x0?'▶\x20':'\x20\x20',_0x508e95(0x104)]}),a29_0x33bf87(Text,{'children':'\x20'}),a29_0x554154(Text,{'color':_0x32a6bf===0x1?_0x508e95(0xf8):'gray','children':[_0x32a6bf===0x1?'▶\x20':'\x20\x20','No']})]}),a29_0x33bf87(Box,{'children':a29_0x33bf87(Text,{'color':_0x508e95(0xed),'children':_0x508e95(0xfc)})}),a29_0x33bf87(Box,{'children':a29_0x33bf87(Text,{'color':_0x508e95(0xf1),'children':_0x508e95(0x10a)})})]}),_0x3e7ff6===_0x508e95(0xef)&&a29_0x554154(a29_0x34183c,{'children':[a29_0x33bf87(Box,{'children':a29_0x33bf87(Text,{'color':_0x508e95(0xf1),'children':_0x508e95(0xe2)})}),a29_0x33bf87(Box,{'marginTop':0x1,'children':a29_0x33bf87(Text,{'children':'*\x20是否要先登录以便拉取\x20API\x20配置?'})}),a29_0x554154(Box,{'marginLeft':0x2,'children':[a29_0x554154(Text,{'color':_0x52cc96===0x0?'green':_0x508e95(0xed),'children':[_0x52cc96===0x0?'▶\x20':'\x20\x20','Yes']}),a29_0x33bf87(Text,{'children':'\x20'}),a29_0x554154(Text,{'color':_0x52cc96===0x1?_0x508e95(0xf8):_0x508e95(0xed),'children':[_0x52cc96===0x1?'▶\x20':'\x20\x20','No']})]}),a29_0x33bf87(Box,{'children':a29_0x33bf87(Text,{'color':_0x508e95(0xed),'children':_0x508e95(0xfc)})}),a29_0x33bf87(Box,{'children':a29_0x33bf87(Text,{'color':_0x508e95(0xf1),'children':_0x508e95(0xf0)})})]}),_0x3e7ff6===_0x508e95(0xd5)&&a29_0x554154(Box,{'children':[a29_0x33bf87(Text,{'children':_0x508e95(0x10b)}),_0x1e5b65&&a29_0x33bf87(Text,{'color':_0x508e95(0xed),'children':_0x508e95(0xd4)})]})]});}
@@ -1 +1 @@
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
+ function a30_0x4169(_0x356e46,_0x528b10){const _0x47d09c=a30_0x47d0();return a30_0x4169=function(_0x4169fd,_0x24c7ed){_0x4169fd=_0x4169fd-0xd6;let _0x5c43c4=_0x47d09c[_0x4169fd];return _0x5c43c4;},a30_0x4169(_0x356e46,_0x528b10);}(function(_0x1cdec0,_0x137908){const _0x35692f=a30_0x4169,_0x3c0f72=_0x1cdec0();while(!![]){try{const _0x12e4d6=-parseInt(_0x35692f(0xd8))/0x1*(-parseInt(_0x35692f(0xda))/0x2)+-parseInt(_0x35692f(0xdf))/0x3*(-parseInt(_0x35692f(0xe0))/0x4)+-parseInt(_0x35692f(0xd6))/0x5+parseInt(_0x35692f(0xdd))/0x6+-parseInt(_0x35692f(0xe1))/0x7+-parseInt(_0x35692f(0xdb))/0x8+-parseInt(_0x35692f(0xd7))/0x9*(-parseInt(_0x35692f(0xdc))/0xa);if(_0x12e4d6===_0x137908)break;else _0x3c0f72['push'](_0x3c0f72['shift']());}catch(_0x5d9e9d){_0x3c0f72['push'](_0x3c0f72['shift']());}}}(a30_0x47d0,0x6349c));export function formatElapsed(_0x40a3c8){const _0x4907c7=a30_0x4169,_0x3866a4=Date['now']()-_0x40a3c8;if(_0x3866a4<0x3e8)return _0x3866a4+'ms';const _0x23b456=(_0x3866a4/0x3e8)[_0x4907c7(0xd9)](0x2),_0x51942e=_0x23b456[_0x4907c7(0xde)](/\.?0+$/u,'');return _0x51942e+'s';}function a30_0x47d0(){const _0xc0c517=['42DKvvPO','404744wqnhaM','9770ntOInG','4787988mvdEsy','replace','117939jYURer','12zMsGzv','5628735kKRTZL','926985hfNxvr','3852sgYscA','5366FoZVfc','toFixed'];a30_0x47d0=function(){return _0xc0c517;};return a30_0x47d0();}
@@ -1 +1 @@
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
+ (function(_0x39d620,_0xa67858){const _0x488463=a31_0x1051,_0x30564d=_0x39d620();while(!![]){try{const _0x505081=parseInt(_0x488463(0x120))/0x1+parseInt(_0x488463(0x126))/0x2+parseInt(_0x488463(0x10f))/0x3+parseInt(_0x488463(0x151))/0x4*(-parseInt(_0x488463(0x144))/0x5)+-parseInt(_0x488463(0x161))/0x6+parseInt(_0x488463(0x130))/0x7*(parseInt(_0x488463(0x124))/0x8)+parseInt(_0x488463(0x137))/0x9*(-parseInt(_0x488463(0x127))/0xa);if(_0x505081===_0xa67858)break;else _0x30564d['push'](_0x30564d['shift']());}catch(_0x5e2532){_0x30564d['push'](_0x30564d['shift']());}}}(a31_0x1bf7,0x95ba1));import{jsx as a31_0x262045,Fragment as a31_0x1a2da8,jsxs as a31_0x294845}from'react/jsx-runtime';import a31_0x44e2c2 from'node:path';import a31_0x3e14fe from'node:fs';function a31_0x1bf7(){const _0x565698=['setLogPath','清理项目目录失败:\x20','stringify','1107309QTBqiX','writeFileSync','parse','W_OK','8nXhGBs','√\x20API\x20配置拉取完成','1786882ZubAEE','33910JXUmDA','appCode','×\x20无法在当前目录创建项目,请检查目录权限','1.0.0','\x20√\x20','√\x20配置文件已创建,应用AppCode:\x20','📦\x20API配置:\x20','√\x20配置文件已创建,可稍后使用\x20\x27lovrabet\x20config\x20set\x20appcode\x20<app-code>\x27\x20配置','\x20|\x20应用AppCode:\x20','8043749yoDMJT','🔗\x20应用AppCode:\x20','white','readFileSync','\x20已存在,请使用其他项目名','lovrabet\x20api\x20pull\x20--appcode\x20[app-code]','×\x20项目名不能为空','4383ObkhEb','\x20创建配置文件','green','doTask','🎉\x20项目创建成功!','cyan','cd\x20','配置AppCode:\x20','.lovrabetrc','×\x20项目名包含非法字符,不允许使用:\x20<\x20>\x20:\x20\x22\x20|\x20?\x20*\x20及控制字符','配置应用AppCode失败:\x20','API\x20配置拉取失败:\x20','gray','5269215jiQPYP','toLocaleString','package.json','API\x20配置拉取异常:\x20','*\x20正在拉取\x20API\x20配置...','string','column','!\x20API\x20配置拉取异常,项目已创建,可稍后手动执行:\x20lovrabet\x20api\x20pull','项目名称:\x20','未配置','*\x20配置文件路径:\x20','🚀\x20接下来可以:','📁\x20项目名称:\x20','4AHcdZp','resolve','utf8','message','trim','2.\x20','pullApi','projectName','existsSync','repeat','\x20配置应用AppCode:\x20','\x20&&\x20lovrabet\x20start','error','join','拉取API配置:\x20','rmSync','4002078rYKGcm','yellow','projectCode','length','*\x20正在为项目\x20','启动项目:\x20','2507091KUAZwH','warn','log','项目创建完成:\x20','create','dirname','version','url','!\x20API\x20配置拉取失败,可稍后手动执行:\x20lovrabet\x20api\x20pull','×\x20项目创建失败:\x20','×\x20项目名过长,最多支持\x20100\x20个字符','env','constants','info'];a31_0x1bf7=function(){return _0x565698;};return a31_0x1bf7();}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 a31_0x1051(_0x2181ea,_0x817120){const _0x1bf7b2=a31_0x1bf7();return a31_0x1051=function(_0x1051bc,_0x18fd6d){_0x1051bc=_0x1051bc-0x10d;let _0x50f102=_0x1bf7b2[_0x1051bc];return _0x50f102;},a31_0x1051(_0x2181ea,_0x817120);}import{readConfig}from'../utils/config.js';import{useCopyProjectTemplate}from'./use-copy-project-template.js';import{useInstallDependencies}from'./use-install-dependencies.js';import{useFormatCode}from'./use-format-code.js';import{TaskFinished}from'./task-finished.js';import{TaskRunning}from'./task-running.js';import{logger}from'../utils/logger.js';export function CreateApp(_0xc02973){const _0x460f6f=a31_0x1051,[_0x4eb940,_0x3977ff]=useState(![]),[_0x4e8693,_0x3ddec1]=useState(![]),[_0x4e23c6,_0x4b82bb]=useState(null),_0x38c248=useCopyProjectTemplate(),_0x441e70=useInstallDependencies(),_0x568410=useFormatCode(),_0x13390f=async _0x4ad68e=>{const _0x208c36=a31_0x1051;if(!_0x4ad68e[_0x208c36(0x158)]||_0x4ad68e['projectName'][_0x208c36(0x155)]()===''){console[_0x208c36(0x15d)](_0x208c36(0x136));return;}const _0x20263b=/[<>:"|?*\x00-\x1f\x7f]/;if(_0x20263b['test'](_0x4ad68e[_0x208c36(0x158)])){console[_0x208c36(0x15d)](_0x208c36(0x140));return;}if(_0x4ad68e[_0x208c36(0x158)][_0x208c36(0x164)]>0x64){console[_0x208c36(0x15d)](_0x208c36(0x119));return;}const _0x3ed7e5=a31_0x44e2c2[_0x208c36(0x152)](process['cwd'](),_0x4ad68e[_0x208c36(0x158)]);if(a31_0x3e14fe[_0x208c36(0x159)](_0x3ed7e5)){console[_0x208c36(0x15d)]('×\x20项目目录\x20'+_0x4ad68e[_0x208c36(0x158)]+_0x208c36(0x134));return;}try{const _0x272694=a31_0x44e2c2[_0x208c36(0x114)](_0x3ed7e5);a31_0x3e14fe['accessSync'](_0x272694,a31_0x3e14fe[_0x208c36(0x11b)][_0x208c36(0x123)]);}catch(_0x29cd5f){console[_0x208c36(0x15d)](_0x208c36(0x129));return;}_0x4b82bb(_0x4ad68e),_0x3977ff(!![]),logger[_0x208c36(0x11d)](_0x3ed7e5),logger[_0x208c36(0x11c)](_0x208c36(0x113),'开始创建项目:\x20'+_0x4ad68e['projectName'],{'projectDir':_0x3ed7e5,'appCode':_0x4ad68e[_0x208c36(0x128)]});try{await _0x38c248[_0x208c36(0x13a)](_0x4ad68e[_0x208c36(0x158)]),await _0x441e70[_0x208c36(0x13a)](_0x4ad68e[_0x208c36(0x158)]),await _0x568410['doTask'](_0x4ad68e[_0x208c36(0x158)]),await _0x721bc3(_0x4ad68e[_0x208c36(0x158)],_0x4ad68e[_0x208c36(0x128)]||'',_0x4ad68e[_0x208c36(0x11a)]);if(_0x4ad68e[_0x208c36(0x157)]&&_0x4ad68e[_0x208c36(0x128)]){console[_0x208c36(0x111)](_0x208c36(0x148));try{const _0x461d84=await pullApiSilent(_0x4ad68e['appCode'],undefined,_0x3ed7e5,_0x4ad68e['env']);_0x461d84?(console[_0x208c36(0x111)](_0x208c36(0x125)),logger['info']('create','API\x20配置拉取成功:\x20'+_0x4ad68e['appCode'],{'projectDir':_0x3ed7e5,'appCode':_0x4ad68e['appCode'],'env':_0x4ad68e[_0x208c36(0x11a)]})):(console[_0x208c36(0x111)](_0x208c36(0x117)),logger[_0x208c36(0x110)]('create',_0x208c36(0x142)+_0x4ad68e[_0x208c36(0x128)],{'projectDir':_0x3ed7e5,'appCode':_0x4ad68e[_0x208c36(0x128)],'env':_0x4ad68e[_0x208c36(0x11a)]}));}catch(_0x1986bf){console['log'](_0x208c36(0x14b)),logger[_0x208c36(0x110)]('create',_0x208c36(0x147)+_0x4ad68e[_0x208c36(0x128)],{'projectDir':_0x3ed7e5,'appCode':_0x4ad68e[_0x208c36(0x128)],'env':_0x4ad68e['env'],'error':_0x1986bf instanceof Error?_0x1986bf['message']:String(_0x1986bf)});}}logger['success'](_0x208c36(0x113),_0x208c36(0x112)+_0x4ad68e[_0x208c36(0x158)]),_0x3ddec1(!![]),_0x3977ff(![]);}catch(_0x519594){logger[_0x208c36(0x15d)](_0x208c36(0x113),'项目创建失败:\x20'+_0x4ad68e[_0x208c36(0x158)],{'error':_0x519594 instanceof Error?_0x519594[_0x208c36(0x154)]:String(_0x519594)});try{a31_0x3e14fe[_0x208c36(0x159)](_0x3ed7e5)&&(console[_0x208c36(0x111)]('*\x20清理失败的项目目录:\x20'+_0x3ed7e5),a31_0x3e14fe[_0x208c36(0x160)](_0x3ed7e5,{'recursive':!![],'force':!![]}));}catch(_0x62f29a){logger[_0x208c36(0x110)](_0x208c36(0x113),_0x208c36(0x11e)+_0x3ed7e5,{'error':_0x62f29a instanceof Error?_0x62f29a[_0x208c36(0x154)]:String(_0x62f29a)});}_0x3977ff(![]),console[_0x208c36(0x15d)](_0x208c36(0x118)+(_0x519594 instanceof Error?_0x519594[_0x208c36(0x154)]:String(_0x519594)));}},_0x1d012e=async _0x19dc1a=>{const _0x44b7d6=a31_0x1051;await _0x13390f({'projectName':_0x19dc1a,'env':_0xc02973[_0x44b7d6(0x11a)]});},_0x721bc3=async(_0x52cfb2,_0x42d8c8,_0x53992b)=>{const _0x255d87=a31_0x1051,_0x4059ab=a31_0x44e2c2[_0x255d87(0x152)](process['cwd'](),_0x52cfb2),_0x4155b9=a31_0x44e2c2['join'](_0x4059ab,_0x255d87(0x13f));try{_0x42d8c8?console['log'](_0x255d87(0x10d)+_0x52cfb2+_0x255d87(0x15b)+_0x42d8c8):console[_0x255d87(0x111)](_0x255d87(0x10d)+_0x52cfb2+_0x255d87(0x138));console['log'](_0x255d87(0x14e)+_0x4155b9);const _0x3867d5=fileURLToPath(import.meta[_0x255d87(0x116)]),_0x73b4bc=a31_0x44e2c2[_0x255d87(0x152)](a31_0x44e2c2[_0x255d87(0x114)](_0x3867d5),'../..'),_0x4a7ece=a31_0x44e2c2[_0x255d87(0x15e)](_0x73b4bc,_0x255d87(0x146));let _0x2560a4='1.0.0';try{const _0x267626=JSON[_0x255d87(0x122)](a31_0x3e14fe[_0x255d87(0x133)](_0x4a7ece,_0x255d87(0x153)));_0x2560a4=_0x267626[_0x255d87(0x115)]||_0x255d87(0x12a);}catch(_0x1b8642){}const _0x1b0a48=readConfig(),_0x3922e5=typeof _0x1b0a48[_0x255d87(0x11a)]===_0x255d87(0x149)?_0x1b0a48[_0x255d87(0x11a)]:undefined,{app:_0x11e5fa,appcode:_0x512b26,..._0x58ee5c}=_0x1b0a48,_0x34eedd={..._0x58ee5c,'appcode':_0x42d8c8||'','env':_0x53992b||_0x3922e5||'online','createdAt':new Date()[_0x255d87(0x145)](),'version':_0x2560a4};a31_0x3e14fe[_0x255d87(0x121)](_0x4155b9,JSON[_0x255d87(0x11f)](_0x34eedd,null,0x2),_0x255d87(0x153)),_0x42d8c8?console[_0x255d87(0x111)](_0x255d87(0x12c)+_0x42d8c8):console[_0x255d87(0x111)](_0x255d87(0x12e)),logger[_0x255d87(0x11c)]('create','配置应用AppCode:\x20'+_0x42d8c8,{'projectName':_0x52cfb2,'configFile':_0x255d87(0x13f)});}catch(_0x40ff1c){logger[_0x255d87(0x15d)](_0x255d87(0x113),_0x255d87(0x141)+_0x42d8c8,{'projectName':_0x52cfb2,'error':_0x40ff1c instanceof Error?_0x40ff1c['message']:String(_0x40ff1c)});}};useEffect(()=>{const _0x12d21f=a31_0x1051;_0xc02973['projectCode']&&_0x1d012e(_0xc02973[_0x12d21f(0x163)]);},[_0xc02973[_0x460f6f(0x163)]]);if(!_0x4eb940&&!_0x4e8693&&!_0xc02973['projectCode'])return a31_0x262045(EnhancedGuidedCreate,{'onCreate':_0x13390f,'env':_0xc02973[_0x460f6f(0x11a)]});if(_0x4eb940)return a31_0x294845(a31_0x1a2da8,{'children':[a31_0x294845(Box,{'marginTop':0x1,'children':[a31_0x262045(Box,{'width':'1'}),a31_0x262045(Text,{'color':_0x460f6f(0x139),'children':_0x460f6f(0x12b)}),a31_0x262045(Text,{'children':_0x460f6f(0x14c)}),a31_0x262045(Text,{'color':'green','children':_0x4e23c6?.['projectName']}),_0x4e23c6?.[_0x460f6f(0x128)]&&a31_0x294845(a31_0x1a2da8,{'children':[a31_0x262045(Text,{'children':_0x460f6f(0x12f)}),a31_0x262045(Text,{'color':_0x460f6f(0x13c),'children':_0x4e23c6[_0x460f6f(0x128)]})]})]}),a31_0x262045(TaskRunning,{..._0x38c248}),a31_0x262045(TaskRunning,{..._0x441e70}),a31_0x262045(TaskRunning,{..._0x568410})]});if(_0x4e8693)return a31_0x294845(a31_0x1a2da8,{'children':[a31_0x294845(Box,{'marginTop':0x1,'children':[a31_0x262045(Box,{'width':'1'}),a31_0x262045(Text,{'color':_0x460f6f(0x139),'children':_0x460f6f(0x12b)}),a31_0x262045(Text,{'children':'项目名称:\x20'}),a31_0x262045(Text,{'color':_0x460f6f(0x139),'children':_0x4e23c6?.[_0x460f6f(0x158)]}),_0x4e23c6?.[_0x460f6f(0x128)]&&a31_0x294845(a31_0x1a2da8,{'children':[a31_0x262045(Text,{'children':_0x460f6f(0x12f)}),a31_0x262045(Text,{'color':'cyan','children':_0x4e23c6[_0x460f6f(0x128)]})]})]}),a31_0x262045(TaskFinished,{..._0x38c248}),a31_0x262045(TaskFinished,{..._0x441e70}),a31_0x262045(TaskFinished,{..._0x568410}),a31_0x262045(Box,{'marginTop':0x1,'marginBottom':0x1,'children':a31_0x262045(Text,{'color':_0x460f6f(0x139),'children':'─'[_0x460f6f(0x15a)](0x3c)})}),a31_0x262045(Box,{'children':a31_0x262045(Text,{'color':_0x460f6f(0x139),'bold':!![],'children':_0x460f6f(0x13b)})}),a31_0x294845(Box,{'marginTop':0x1,'flexDirection':_0x460f6f(0x14a),'children':[a31_0x294845(Box,{'children':[a31_0x262045(Text,{'color':'cyan','children':_0x460f6f(0x150)}),a31_0x262045(Text,{'color':_0x460f6f(0x132),'bold':!![],'children':_0x4e23c6?.['projectName']})]}),_0x4e23c6?.['appCode']&&a31_0x294845(Box,{'children':[a31_0x262045(Text,{'color':_0x460f6f(0x13c),'children':_0x460f6f(0x131)}),a31_0x262045(Text,{'color':_0x460f6f(0x132),'bold':!![],'children':_0x4e23c6['appCode']})]}),a31_0x294845(Box,{'children':[a31_0x262045(Text,{'color':'cyan','children':_0x460f6f(0x12d)}),_0x4e23c6?.[_0x460f6f(0x157)]?a31_0x262045(Text,{'color':_0x460f6f(0x139),'bold':!![],'children':'已自动拉取\x20✓'}):_0x4e23c6?.[_0x460f6f(0x128)]?a31_0x262045(Text,{'color':'yellow','bold':!![],'children':'需手动拉取'}):a31_0x262045(Text,{'color':_0x460f6f(0x143),'bold':!![],'children':_0x460f6f(0x14d)})]})]}),a31_0x262045(Box,{'marginTop':0x1,'marginBottom':0x1,'children':a31_0x262045(Text,{'color':_0x460f6f(0x13c),'bold':!![],'children':_0x460f6f(0x14f)})}),a31_0x294845(Box,{'marginLeft':0x2,'flexDirection':_0x460f6f(0x14a),'children':[a31_0x294845(Box,{'children':[a31_0x262045(Text,{'color':'green','children':'1.\x20'}),a31_0x262045(Text,{'color':_0x460f6f(0x132),'children':_0x460f6f(0x10e)}),a31_0x262045(Text,{'color':_0x460f6f(0x13c),'bold':!![],'children':_0x460f6f(0x13d)+_0x4e23c6?.['projectName']+_0x460f6f(0x15c)})]}),_0x4e23c6?.[_0x460f6f(0x128)]&&!_0x4e23c6?.['pullApi']&&a31_0x294845(Box,{'children':[a31_0x262045(Text,{'color':_0x460f6f(0x162),'children':'2.\x20'}),a31_0x262045(Text,{'color':_0x460f6f(0x132),'children':_0x460f6f(0x15f)}),a31_0x262045(Text,{'color':_0x460f6f(0x13c),'bold':!![],'children':'lovrabet\x20api\x20pull'})]}),!_0x4e23c6?.[_0x460f6f(0x128)]&&a31_0x294845(a31_0x1a2da8,{'children':[a31_0x294845(Box,{'children':[a31_0x262045(Text,{'color':_0x460f6f(0x143),'children':_0x460f6f(0x156)}),a31_0x262045(Text,{'color':_0x460f6f(0x132),'children':_0x460f6f(0x13e)}),a31_0x262045(Text,{'color':'cyan','bold':!![],'children':'lovrabet\x20config\x20set\x20appcode\x20[app-code]'})]}),a31_0x294845(Box,{'children':[a31_0x262045(Text,{'color':_0x460f6f(0x143),'children':'3.\x20'}),a31_0x262045(Text,{'color':_0x460f6f(0x132),'children':'拉取API配置:\x20'}),a31_0x262045(Text,{'color':_0x460f6f(0x13c),'bold':!![],'children':_0x460f6f(0x135)})]})]})]}),a31_0x262045(Box,{'marginTop':0x1,'children':a31_0x262045(Text,{'color':_0x460f6f(0x139),'children':'─'[_0x460f6f(0x15a)](0x3c)})})]});return null;}
@@ -1 +1 @@
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
+ (function(_0x7b760c,_0x472566){var _0x1f18d6=a32_0x338f,_0x3be975=_0x7b760c();while(!![]){try{var _0x45784a=parseInt(_0x1f18d6(0x1ef))/0x1*(-parseInt(_0x1f18d6(0x1ea))/0x2)+parseInt(_0x1f18d6(0x1ed))/0x3*(-parseInt(_0x1f18d6(0x1f0))/0x4)+-parseInt(_0x1f18d6(0x1e8))/0x5*(parseInt(_0x1f18d6(0x1f1))/0x6)+-parseInt(_0x1f18d6(0x1e9))/0x7+-parseInt(_0x1f18d6(0x1eb))/0x8*(-parseInt(_0x1f18d6(0x1e6))/0x9)+parseInt(_0x1f18d6(0x1ee))/0xa*(parseInt(_0x1f18d6(0x1e5))/0xb)+parseInt(_0x1f18d6(0x1ec))/0xc;if(_0x45784a===_0x472566)break;else _0x3be975['push'](_0x3be975['shift']());}catch(_0x362af3){_0x3be975['push'](_0x3be975['shift']());}}}(a32_0x158e,0x8d37d));function a32_0x338f(_0x503638,_0xa05f69){var _0x158e9a=a32_0x158e();return a32_0x338f=function(_0x338f9b,_0x2c4cc0){_0x338f9b=_0x338f9b-0x1e5;var _0x223733=_0x158e9a[_0x338f9b];return _0x223733;},a32_0x338f(_0x503638,_0xa05f69);}import{jsx as a32_0x5c1d55,jsxs as a32_0x50c558}from'react/jsx-runtime';function a32_0x158e(){var _0x4ff3c7=['66kyjDHa','264zYtxkL','297WBDDiW','\x20√\x20','154885IZmbyO','6373500ktqzFY','201746ztwyED','97136HJbTUZ','16053036ZLvhoq','51ulprVS','334550WZeTzk','1ihaOFs','143720VOTgMG'];a32_0x158e=function(){return _0x4ff3c7;};return a32_0x158e();}import{Box,Text}from'ink';import{TaskTime}from'./task-time.js';export function TaskFinished(_0x347e41){var _0x220da8=a32_0x338f;return a32_0x50c558(Box,{'children':[a32_0x5c1d55(Box,{'width':'1'}),a32_0x5c1d55(Text,{'color':'green','children':_0x220da8(0x1e7)}),a32_0x5c1d55(Text,{'children':_0x347e41['taskName']}),a32_0x5c1d55(TaskTime,{'elapsed':_0x347e41['elapsed']})]});}